diff --git a/GX-PAW/common/AUTHORS b/GX-PAW/common/AUTHORS new file mode 100644 index 00000000..d761957c --- /dev/null +++ b/GX-PAW/common/AUTHORS @@ -0,0 +1,5 @@ +Authors of ABINIT +================= + +See ~abinit/doc/developers/contributors.txt for details. + diff --git a/GX-PAW/common/COPYING b/GX-PAW/common/COPYING new file mode 100644 index 00000000..9edb6a1c --- /dev/null +++ b/GX-PAW/common/COPYING @@ -0,0 +1,684 @@ +Most of the source code and documents available in the ABINIT package +are available under the GNU GENERAL PUBLIC LICENSE, Version 3, reproduced below. +A small number of routines (e.g. those related to the NOMAD CoE project - Low-scaling GW and RPA -) +are made available under a more liberal licence, APACHE v2.0, compatible with GPL. +For the text of the APACHE v2.0 licence, see https://www.apache.org/licenses/LICENSE-2.0 . +When interfacing routines from ABINIT package and non-GPL code, the developer should check +compatibility of licencing schemes. + + + 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/GX-PAW/common/ChangeLog b/GX-PAW/common/ChangeLog new file mode 100644 index 00000000..04527d3a --- /dev/null +++ b/GX-PAW/common/ChangeLog @@ -0,0 +1 @@ +There is currently no policy for this file. Please do not edit. diff --git a/GX-PAW/common/Makefile b/GX-PAW/common/Makefile new file mode 100644 index 00000000..84a6e3e8 --- /dev/null +++ b/GX-PAW/common/Makefile @@ -0,0 +1,1490 @@ +# Makefile.in generated by automake 1.16.3 from Makefile.am. +# shared/common/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994-2020 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-inter on 2024/03/16 21:07:39 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-inter script or its config file instead. +# + +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/abinit +pkgincludedir = $(includedir)/abinit +pkglibdir = $(libdir)/abinit +pkglibexecdir = $(libexecdir)/abinit +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = x86_64-apple-darwin18.7.0 +host_triplet = x86_64-apple-darwin18.7.0 +target_triplet = x86_64-apple-darwin18.7.0 +subdir = shared/common +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/m4/arch-gpu.m4 \ + $(top_srcdir)/config/m4/arch-mpi.m4 \ + $(top_srcdir)/config/m4/auto-autotools.m4 \ + $(top_srcdir)/config/m4/auto-corelibs.m4 \ + $(top_srcdir)/config/m4/auto-debug.m4 \ + $(top_srcdir)/config/m4/auto-dirflags.m4 \ + $(top_srcdir)/config/m4/auto-env.m4 \ + $(top_srcdir)/config/m4/auto-hints.m4 \ + $(top_srcdir)/config/m4/auto-optim.m4 \ + $(top_srcdir)/config/m4/auto-options.m4 \ + $(top_srcdir)/config/m4/auto-output.m4 \ + $(top_srcdir)/config/m4/auto-triggers.m4 \ + $(top_srcdir)/config/m4/conf-atompaw.m4 \ + $(top_srcdir)/config/m4/conf-debug.m4 \ + $(top_srcdir)/config/m4/conf-fallbacks.m4 \ + $(top_srcdir)/config/m4/conf-files.m4 \ + $(top_srcdir)/config/m4/conf-init.m4 \ + $(top_srcdir)/config/m4/conf-openmp.m4 \ + $(top_srcdir)/config/m4/conf-optim.m4 \ + $(top_srcdir)/config/m4/lang-c++.m4 \ + $(top_srcdir)/config/m4/lang-c.m4 \ + $(top_srcdir)/config/m4/lang-fortran-import.m4 \ + $(top_srcdir)/config/m4/lang-fortran.m4 \ + $(top_srcdir)/config/m4/lang-python.m4 \ + $(top_srcdir)/config/m4/libxml2.m4 \ + $(top_srcdir)/config/m4/misc-display.m4 \ + $(top_srcdir)/config/m4/sd_abinit_common.m4 \ + $(top_srcdir)/config/m4/sd_arch_gpu.m4 \ + $(top_srcdir)/config/m4/sd_arch_mpi.m4 \ + $(top_srcdir)/config/m4/sd_bigdft.m4 \ + $(top_srcdir)/config/m4/sd_core.m4 \ + $(top_srcdir)/config/m4/sd_esl.m4 \ + $(top_srcdir)/config/m4/sd_fftw3.m4 \ + $(top_srcdir)/config/m4/sd_gpu_kokkos.m4 \ + $(top_srcdir)/config/m4/sd_gpu_yakl.m4 \ + $(top_srcdir)/config/m4/sd_io_hdf5.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf_fortran.m4 \ + $(top_srcdir)/config/m4/sd_levmar.m4 \ + $(top_srcdir)/config/m4/sd_libpaw.m4 \ + $(top_srcdir)/config/m4/sd_libpsml.m4 \ + $(top_srcdir)/config/m4/sd_libxc.m4 \ + $(top_srcdir)/config/m4/sd_math_fft.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_core.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_util.m4 \ + $(top_srcdir)/config/m4/sd_papi.m4 \ + $(top_srcdir)/config/m4/sd_pfft.m4 \ + $(top_srcdir)/config/m4/sd_triqs.m4 \ + $(top_srcdir)/config/m4/sd_wannier90.m4 \ + $(top_srcdir)/config/m4/sd_xmlf90.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_$(V)) +am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY)) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +am__v_at_1 = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + distdir distdir-am +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +am__DIST_COMMON = $(srcdir)/Makefile.in AUTHORS COPYING ChangeLog NEWS \ + README +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ABINIT_BINARY_PACKAGE = abinit-10.0.0.83-58be4d_x86_64_darwin18.7.0_gnu9.4 +ABINIT_COMMON_CPPFLAGS = +ABINIT_COMMON_FCFLAGS = +ABINIT_COMMON_LDFLAGS = +ABINIT_COMMON_LIBS = +ABINIT_TARGET = x86_64_darwin18.7.0_gnu9.4 +ABINIT_VERSION = 10.0.0.83-58be4d +ABINIT_VERSION_BASE = 10.0 +ABINIT_VERSION_BUILD = 20240316 +ABINIT_VERSION_MAJOR = 10 +ABINIT_VERSION_MICRO = 0 +ABINIT_VERSION_MINOR = 0 +ABI_CPPFLAGS = -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include +ACLOCAL = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' aclocal-1.16 +AMTAR = $${TAR-tar} +AM_DEFAULT_VERBOSITY = 1 +AR = ar +ARFLAGS = rc +ARFLAGS_CMD = rc +ARFLAGS_DEBUG = +ARFLAGS_EXTRA = +ARFLAGS_HINTS = +ARFLAGS_OPTIM = +ATOMPAW_BIN = +AUTOCONF = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' autoconf +AUTOHEADER = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' autoheader +AUTOMAKE = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' automake-1.16 +AWK = awk +BIGDFT_CPPFLAGS = +BIGDFT_FCFLAGS = +BIGDFT_LDFLAGS = +BIGDFT_LIBS = +BOURNE_SHELL = /bin/sh +CC = /opt/local/bin/mpicc +CCDEPMODE = depmode=gcc3 +CC_LDFLAGS = +CC_LDFLAGS_DEBUG = +CC_LDFLAGS_EXTRA = +CC_LDFLAGS_GPU = +CC_LDFLAGS_HINTS = +CC_LDFLAGS_OPTIM = +CC_LIBS = +CC_LIBS_DEBUG = +CC_LIBS_EXTRA = +CC_LIBS_GPU = +CC_LIBS_HINTS = +CC_LIBS_OPTIM = +CFLAGS = -O2 -g +CFLAGS_DEBUG = +CFLAGS_EXTRA = +CFLAGS_GPU = +CFLAGS_HINTS = +CFLAGS_OPTIM = +CPP = /opt/local/bin/mpicc -E +CPPFLAGS = +CPPFLAGS_DEBUG = +CPPFLAGS_EXTRA = +CPPFLAGS_GPU = +CPPFLAGS_HINTS = +CPPFLAGS_HINTS_EXT = -P -std=c99 +CPPFLAGS_OPTIM = +CXX = /opt/local/bin/mpicxx +CXXDEPMODE = depmode=gcc3 +CXXFLAGS = -O2 -g +CXXFLAGS_DEBUG = +CXXFLAGS_EXTRA = +CXXFLAGS_GPU = +CXXFLAGS_HINTS = +CXXFLAGS_OPTIM = +CXX_LDFLAGS = +CXX_LDFLAGS_DEBUG = +CXX_LDFLAGS_EXTRA = +CXX_LDFLAGS_GPU = +CXX_LDFLAGS_HINTS = +CXX_LDFLAGS_OPTIM = +CXX_LIBS = +CXX_LIBS_DEBUG = +CXX_LIBS_EXTRA = +CXX_LIBS_GPU = +CXX_LIBS_HINTS = +CXX_LIBS_OPTIM = +CYGPATH_W = echo +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +ECHO_C = \c +ECHO_N = +ECHO_T = +EGREP = /usr/bin/grep -E +EXEEXT = +F77 = /opt/local/bin/mpif90 +FC = /opt/local/bin/mpif90 +FCFLAGS = -O2 -g -ffree-line-length-none -I/opt/local/include -I/opt/local/include -I/opt/local/include +FCFLAGS_DEBUG = +FCFLAGS_EXTRA = +FCFLAGS_F90 = +FCFLAGS_FIXEDFORM = -ffixed-form +FCFLAGS_FREEFORM = -ffree-form +FCFLAGS_HINTS = -ffree-line-length-none +FCFLAGS_MODDIR = -J../mods +FCFLAGS_OPENMP = +FCFLAGS_OPENMP_OFFLOAD = +FCFLAGS_OPTIM = +FCLIBS = -L/opt/local/lib -L/opt/local/lib/openmpi-gcc9 -L/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0 -L/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/../../.. -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi -lgfortran -lquadmath -lm +FC_LDFLAGS = +FC_LDFLAGS_DEBUG = +FC_LDFLAGS_EXTRA = +FC_LDFLAGS_HINTS = +FC_LDFLAGS_OPTIM = +FC_LIBS = +FC_LIBS_DEBUG = +FC_LIBS_EXTRA = +FC_LIBS_HINTS = +FC_LIBS_OPTIM = +FC_NOWRAP = /opt/local/bin/mpif90 +FFLAGS = -O2 -g -ffree-line-length-none -I/opt/local/include -I/opt/local/include -I/opt/local/include +FFTW3_CFLAGS = +FFTW3_CPPFLAGS = -I/opt/local/include +FFTW3_FCFLAGS = -I/opt/local/include +FFTW3_LDFLAGS = +FFTW3_LIBS = -L/opt/local/lib -lfftw3 -lfftw3f +FFT_CFLAGS = +FFT_FCFLAGS = +FPP = +FPPFLAGS = +FPPFLAGS_DEBUG = +FPPFLAGS_EXTRA = +FPPFLAGS_HINTS = +FPPFLAGS_OPTIM = +GPU_ARCH = +GPU_CFLAGS = +GPU_CPPFLAGS = +GPU_CXXFLAGS = +GPU_FCFLAGS = +GPU_LDFLAGS = +GPU_LIBS = +GRAPHATOM_BIN = +GREP = /usr/bin/grep +H5CC = +HDF5_CFLAGS = +HDF5_CPPFLAGS = +HDF5_CXXFLAGS = +HDF5_FCFLAGS = +HDF5_LDFLAGS = +HDF5_LIBS = +INSTALL = /opt/local/libexec/gnubin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +KOKKOS_CPPFLAGS = +KOKKOS_CXXFLAGS = +KOKKOS_LDFLAGS = +KOKKOS_LIBS = +LDFLAGS = +LEVMAR_CFLAGS = +LEVMAR_CPPFLAGS = +LEVMAR_LDFLAGS = +LEVMAR_LIBS = +LIBOBJS = +LIBPAW_CPPFLAGS = +LIBPAW_FCFLAGS = +LIBPAW_LDFLAGS = +LIBPAW_LIBS = +LIBPSML_CPPFLAGS = +LIBPSML_FCFLAGS = +LIBPSML_LDFLAGS = +LIBPSML_LIBS = +LIBS = -L/opt/local/lib -lwannier -L/opt/local/lib -lxc -L/opt/local/lib -lnetcdff -L/opt/local/lib -lnetcdf -L/opt/local/lib -L/opt/local/lib -lhdf5_hl -L/opt/local/lib -lhdf5 -lz -ldl -lm -L/opt/local/lib -lfftw3 -lfftw3f +LIBXC_CFLAGS = +LIBXC_CPPFLAGS = +LIBXC_FCFLAGS = +LIBXC_LDFLAGS = +LIBXC_LIBS = +LIBXML2_CPPFLAGS = +LIBXML2_FCFLAGS = +LIBXML2_LIBS = +LINALG_CFLAGS = +LINALG_CPPFLAGS = +LINALG_CXXFLAGS = +LINALG_FCFLAGS = -I/opt/local/include +LINALG_LDFLAGS = +LINALG_LIBS = -L/opt/local/lib -lopenblas +LN_S = ln -s +LTLIBOBJS = +MAKEINFO = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' makeinfo +MKDIR_P = /opt/local/libexec/gnubin/mkdir -p +MODEXT = mod +MPI_CFLAGS = +MPI_CPPFLAGS = +MPI_CXXFLAGS = +MPI_FCFLAGS = +MPI_LDFLAGS = +MPI_LIBS = +MV = /opt/local/libexec/gnubin/mv +NETCDF_CFLAGS = +NETCDF_CPPFLAGS = +NETCDF_CXXFLAGS = +NETCDF_FCFLAGS = +NETCDF_FORTRAN_CFLAGS = +NETCDF_FORTRAN_CPPFLAGS = +NETCDF_FORTRAN_CXXFLAGS = +NETCDF_FORTRAN_FCFLAGS = +NETCDF_FORTRAN_LDFLAGS = +NETCDF_FORTRAN_LIBS = +NETCDF_LDFLAGS = +NETCDF_LIBS = +NVCC = +NVCC_CFLAGS = +NVCC_CPPFLAGS = +NVCC_LDFLAGS = +NVCC_LIBS = +OBJEXT = o +PACKAGE = abinit +PACKAGE_BUGREPORT = https://bugs.launchpad.net/abinit/ +PACKAGE_NAME = ABINIT +PACKAGE_STRING = ABINIT 10.0.0.83-58be4d +PACKAGE_TARNAME = abinit +PACKAGE_URL = +PACKAGE_VERSION = 10.0.0.83-58be4d +PAPI_CFLAGS = +PAPI_CPPFLAGS = +PAPI_LDFLAGS = +PAPI_LIBS = +PATCH = patch +PATH_SEPARATOR = : +PERL = /usr/bin/perl +PFFT_CFLAGS = +PFFT_CPPFLAGS = +PFFT_LDFLAGS = +PFFT_LIBS = +PYFLAGS = +PYTHON = python3.9 +PYTHON_CONFIG = python3.9-config +PYTHON_CPPFLAGS = -I/opt/local/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -I/opt/local/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 +RANLIB = ranlib +REALPATH = realpath +RM = /opt/local/libexec/gnubin/rm +SED = /usr/bin/sed +SET_MAKE = +SHELL = /bin/sh +STRIP = +TAR = tar +TRIQS_CFLAGS = +TRIQS_CPPFLAGS = +TRIQS_CXXFLAGS = +TRIQS_LDFLAGS = +TRIQS_LIBS = +TRUE_CPP = cpp +VERSION = 10.0.0.83-58be4d +WANNIER90_CPPFLAGS = +WANNIER90_FCFLAGS = -I/opt/local/include +WANNIER90_LDFLAGS = +WANNIER90_LIBS = -L/opt/local/lib -lwannier +XML2_CONFIG = +XMLF90_CPPFLAGS = +XMLF90_FCFLAGS = +XMLF90_LDFLAGS = +XMLF90_LIBS = +XML_CPPFLAGS = +XML_LIBS = +XPP = +XPPFLAGS = +XPPFLAGS_DEBUG = +XPPFLAGS_EXTRA = +XPPFLAGS_OPTIM = +YAKL_CPPFLAGS = +YAKL_FCFLAGS = +YAKL_LDFLAGS = +YAKL_LIBS = +abi_ac_distcheck = --with-config-file="/Users/gonze/_Research/ABINIT_git/gonze/mac-1P0-225.ac9" +abi_ac_version = 027100 +abi_am_version = 011603 +abi_avx_safe_mode_enable = no +abi_bse_unpacked_enable = no +abi_cc_path = +abi_cc_vendor = gnu +abi_cc_version = 9.4 +abi_cclock_enable = no +abi_cpp_path = +abi_cpu_64bits = yes +abi_cpu_bits = 64 +abi_cpu_model = unknown +abi_cpu_platform = apple +abi_cpu_spec = unknown_unknown +abi_cpu_vendor = unknown +abi_crpa_optim_enable = no +abi_cxx_path = +abi_cxx_vendor = gnu +abi_cxx_version = 9.4 +abi_debug_flavor = basic +abi_exports_enable = no +abi_fbk_abinit_common_ok = no +abi_fbk_bigdft_ok = disabled +abi_fbk_config = +abi_fbk_enable = no +abi_fbk_fft_ok = no +abi_fbk_fftw3_ok = no +abi_fbk_gpu_ok = no +abi_fbk_hdf5_ok = disabled +abi_fbk_init = def +abi_fbk_kokkos_ok = no +abi_fbk_levmar_ok = no +abi_fbk_libpaw_ok = no +abi_fbk_libpsml_ok = disabled +abi_fbk_libxc_ok = disabled +abi_fbk_libxml2_ok = no +abi_fbk_linalg_ok = disabled +abi_fbk_list = +abi_fbk_mpi_ok = no +abi_fbk_netcdf_fortran_ok = disabled +abi_fbk_netcdf_ok = disabled +abi_fbk_papi_ok = no +abi_fbk_pfft_ok = no +abi_fbk_prefix = +abi_fbk_required = +abi_fbk_triqs_ok = no +abi_fbk_wannier90_ok = disabled +abi_fbk_xmlf90_ok = disabled +abi_fbk_yakl_ok = no +abi_fc_path = +abi_fc_vendor = gnu +abi_fc_version = 9.4 +abi_fc_wrap = no +abi_fc_wrapper_enable = no +abi_fpp_path = +abi_gpu_arch = +abi_gpu_fcflags = +abi_gpu_flavor = none +abi_gpu_hip_libdir = +abi_gpu_incs = +abi_gpu_ldflags = +abi_gpu_libs = +abi_gpu_nvtx_v3 = +abi_gpu_roctx = +abi_gw_dpc_enable = yes +abi_hints_enable = yes +abi_libtetra_enable = yes +abi_libxml2_cppflags = +abi_libxml2_enable = no +abi_libxml2_fcflags = +abi_libxml2_init = def +abi_libxml2_ldflags = +abi_libxml2_libs = +abi_libxml2_ok = unknown +abi_libxml2_prefix = +abi_lotf_enable = no +abi_lt_version = 020406 +abi_m4_version = 010419 +abi_memory_profiling_enable = no +abi_mpi_cflags = +abi_mpi_cppflags = +abi_mpi_cxxflags = +abi_mpi_enable = yes +abi_mpi_fcflags = +abi_mpi_flavor = auto +abi_mpi_gpu_aware_enable = no +abi_mpi_incs = +abi_mpi_inplace_enable = yes +abi_mpi_interfaces_bugfix_enable = no +abi_mpi_io_default_enable = no +abi_mpi_io_enable = yes +abi_mpi_ldflags = +abi_mpi_level = 2 +abi_mpi_libs = +abi_netcdf_default_enable = no +abi_openmp_enable = no +abi_openmp_offload_enable = no +abi_optim_flavor = standard +abi_python_invocation_enable = no +abi_source_debug_enable = no +abi_stdin_enable = yes +abi_sys_spec = darwin-x86_64 +abi_timer_enable = yes +abi_triqs_v1_4_enable = no +abi_triqs_v2_0_enable = no +abi_zdot_bugfix_enable = no +abinit_bindir = /usr/local/bin +abinit_builddir = /Users/gonze/_Research/ABINIT_git/gonze +abinit_chkdir = /usr/local/share/abinit/tests +abinit_datdir = /usr/local/share/abinit +abinit_docdir = /usr/local/doc/abinit +abinit_incdir = /usr/local/include +abinit_libdir = /usr/local/lib +abinit_mandir = /usr/local/share/man +abinit_prefix = /usr/local +abinit_srcdir = /Users/gonze/_Research/ABINIT_git/gonze +abs_builddir = /Users/gonze/_Research/ABINIT_git/gonze/shared/common +abs_srcdir = /Users/gonze/_Research/ABINIT_git/gonze/shared/common +abs_top_builddir = /Users/gonze/_Research/ABINIT_git/gonze +abs_top_srcdir = /Users/gonze/_Research/ABINIT_git/gonze +ac_ct_CC = +ac_ct_CXX = +ac_ct_FC = +am__include = include +am__leading_dot = . +am__quote = +am__tar = tar --format=ustar -chf - "$$tardir" +am__untar = tar -xf - +bindir = ${exec_prefix}/bin +build = x86_64-apple-darwin18.7.0 +build_alias = +build_cpu = x86_64 +build_os = darwin18.7.0 +build_vendor = apple +builddir = . +cc_info_string = gcc-mp-9 (MacPorts gcc9 9.4.0_0) 9.4.0 +cxx_info_string = g++-mp-9 (MacPorts gcc9 9.4.0_0) 9.4.0 +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +enable_avx_safe_mode = +enable_bse_unpacked = +enable_cclock = +enable_crpa_optim = +enable_exports = +enable_fc_wrapper = +enable_gw_dpc = yes +enable_hints = +enable_libtetra = +enable_lotf = +enable_memory_profiling = +enable_mpi_gpu_aware = +enable_mpi_inplace = +enable_mpi_interfaces_bugfix = +enable_mpi_io = yes +enable_mpi_io_default = +enable_netcdf_default = +enable_openmp = +enable_openmp_offload = +enable_python_invocation = +enable_shared = +enable_source_debug = +enable_static = +enable_stdin = +enable_timer = +enable_triqs_v1_4 = +enable_triqs_v2_0 = +enable_zdot_bugfix = +exec_prefix = ${prefix} +fc_info_string = GNU Fortran (MacPorts gcc9 9.4.0_0) 9.4.0 +fc_mod_fcflags = +fc_timing = standard +fcflags_opt_02_clib = +fcflags_opt_10_defs = +fcflags_opt_11_memory_mpi = +fcflags_opt_12_hide_mpi = +fcflags_opt_14_hidewrite = +fcflags_opt_16_hideleave = +fcflags_opt_16_kokkos_toolbox = +fcflags_opt_17_gpu_toolbox = +fcflags_opt_17_libtetra_ext = +fcflags_opt_17_minimax = +fcflags_opt_17_yaml_out = +fcflags_opt_18_timing = +fcflags_opt_21_hashfuncs = +fcflags_opt_27_toolbox_oop = +fcflags_opt_28_numeric_noabirule = +fcflags_opt_29_kpoints = +fcflags_opt_32_util = +fcflags_opt_33_xc_lowlevel = +fcflags_opt_39_libpaw = +fcflags_opt_41_geometry = +fcflags_opt_42_nlstrain = +fcflags_opt_42_parser = +fcflags_opt_43_ptgroups = -O0 +fcflags_opt_43_wvl_wrappers = +fcflags_opt_44_abitools = +fcflags_opt_44_abitypes_defs = +fcflags_opt_44_manage_kokkos = +fcflags_opt_45_geomoptim = +fcflags_opt_45_xgTools = +fcflags_opt_46_ghc_omp = +fcflags_opt_46_manage_cuda = +fcflags_opt_48_diago = +fcflags_opt_49_gw_toolbox_oop = +fcflags_opt_51_manage_mpi = +fcflags_opt_52_fft_mpi_noabirule = +fcflags_opt_53_ffts = +fcflags_opt_54_spacepar = +fcflags_opt_55_abiutil = +fcflags_opt_56_io_mpi = +fcflags_opt_56_mixing = +fcflags_opt_56_recipspace = +fcflags_opt_56_xc = +fcflags_opt_57_iopsp_parser = +fcflags_opt_57_iovars = +fcflags_opt_61_occeig = +fcflags_opt_62_cg_noabirule = +fcflags_opt_62_ctqmc = +fcflags_opt_62_iowfdenpot = +fcflags_opt_62_poisson = +fcflags_opt_62_wvl_wfs = +fcflags_opt_64_psp = +fcflags_opt_65_lotf_base = +fcflags_opt_65_paw = +fcflags_opt_66_nonlocal = +fcflags_opt_66_vdwxc = +fcflags_opt_66_wfs = +fcflags_opt_67_common = +fcflags_opt_67_python_invocation_ext = +fcflags_opt_67_triqs_ext = +fcflags_opt_68_dmft = +fcflags_opt_68_lotf = +fcflags_opt_68_recursion = +fcflags_opt_68_rsprc = +fcflags_opt_69_wfdesc = +fcflags_opt_70_gw = +fcflags_opt_71_bse = +fcflags_opt_71_wannier = +fcflags_opt_72_response = +fcflags_opt_77_ddb = +fcflags_opt_77_suscep = +fcflags_opt_78_effpot = +fcflags_opt_78_eph = +fcflags_opt_79_seqpar_mpi = +fcflags_opt_80_rttddft = +fcflags_opt_80_tdep = +fcflags_opt_94_scfcv = +fcflags_opt_95_drive = +fcflags_opt_98_main = +fcflags_opt_bigdft = +fcflags_opt_default = +fcflags_opt_hdf5 = +fcflags_opt_levmar = +fcflags_opt_libpsml = +fcflags_opt_libxc = +fcflags_opt_libxml2 = +fcflags_opt_linalg = +fcflags_opt_netcdf = +fcflags_opt_netcdf_fortran = +fcflags_opt_papi = +fcflags_opt_triqs = +fcflags_opt_wannier90 = +fcflags_opt_xmlf90 = +host = x86_64-apple-darwin18.7.0 +host_alias = +host_cpu = x86_64 +host_os = darwin18.7.0 +host_vendor = apple +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = ${SHELL} /Users/gonze/_Research/ABINIT_git/gonze/config/gnu/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = ${datarootdir}/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = $(MKDIR_P) +oldincludedir = /usr/include +pdfdir = ${docdir} +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +runstatedir = ${localstatedir}/run +sbindir = ${exec_prefix}/sbin +sd_abinit_common_cppflags = +sd_abinit_common_enable = no +sd_abinit_common_enable_def = no +sd_abinit_common_fcflags = +sd_abinit_common_init = def +sd_abinit_common_ldflags = +sd_abinit_common_libs = +sd_abinit_common_ok = unknown +sd_abinit_common_options = optional skip +sd_abinit_common_policy = skip +sd_abinit_common_status = optional +sd_bigdft_cppflags = +sd_bigdft_enable = no +sd_bigdft_enable_def = no +sd_bigdft_fcflags = +sd_bigdft_init = def +sd_bigdft_ldflags = +sd_bigdft_libs = +sd_bigdft_ok = unknown +sd_bigdft_options = optional warn +sd_bigdft_policy = warn +sd_bigdft_status = optional +sd_fft_cflags = +sd_fft_choices = +sd_fft_cppflags = -I/opt/local/include +sd_fft_cxxflags = +sd_fft_enable = yes +sd_fft_fcflags = -I/opt/local/include +sd_fft_flavor = fftw3 +sd_fft_init = kwd +sd_fft_ldflags = +sd_fft_libs = -L/opt/local/lib -lfftw3 -lfftw3f +sd_fft_ok = yes +sd_fftw3_cflags = +sd_fftw3_cppflags = -I/opt/local/include +sd_fftw3_enable = yes +sd_fftw3_enable_def = no +sd_fftw3_fcflags = -I/opt/local/include +sd_fftw3_init = env +sd_fftw3_ldflags = +sd_fftw3_libs = -L/opt/local/lib -lfftw3 -lfftw3f +sd_fftw3_ok = yes +sd_fftw3_options = optional skip +sd_fftw3_policy = skip +sd_fftw3_status = optional +sd_gpu_cflags = +sd_gpu_cppflags = +sd_gpu_cxxflags = +sd_gpu_enable = no +sd_gpu_enable_def = no +sd_gpu_fcflags = +sd_gpu_init = def +sd_gpu_ldflags = +sd_gpu_libs = +sd_gpu_ok = no +sd_gpu_options = optional warn +sd_gpu_policy = warn +sd_gpu_prefix = +sd_gpu_status = optional +sd_hdf5_cflags = +sd_hdf5_cppflags = -I/opt/local/include -I/opt/local/include +sd_hdf5_cxxflags = +sd_hdf5_enable = yes +sd_hdf5_enable_def = yes +sd_hdf5_enable_fc = no +sd_hdf5_fcflags = +sd_hdf5_h5cc = /opt/local/bin/h5cc +sd_hdf5_h5fc = +sd_hdf5_init = dir +sd_hdf5_ldflags = +sd_hdf5_libs = -L/opt/local/lib -L/opt/local/lib -lhdf5_hl -L/opt/local/lib -lhdf5 -lz -ldl -lm +sd_hdf5_ok = yes +sd_hdf5_options = required no-fortran warn +sd_hdf5_policy = warn +sd_hdf5_status = required +sd_kokkos_cppflags = +sd_kokkos_cxxflags = +sd_kokkos_enable = no +sd_kokkos_enable_def = no +sd_kokkos_init = def +sd_kokkos_ldflags = +sd_kokkos_libs = +sd_kokkos_ok = unknown +sd_kokkos_options = optional fail +sd_kokkos_policy = fail +sd_kokkos_status = optional +sd_levmar_cflags = +sd_levmar_cppflags = +sd_levmar_enable = no +sd_levmar_enable_def = no +sd_levmar_init = def +sd_levmar_ldflags = +sd_levmar_libs = +sd_levmar_ok = unknown +sd_levmar_options = optional fail +sd_levmar_policy = fail +sd_levmar_status = optional +sd_libpaw_cppflags = +sd_libpaw_enable = no +sd_libpaw_enable_def = no +sd_libpaw_fcflags = +sd_libpaw_init = def +sd_libpaw_ldflags = +sd_libpaw_libs = +sd_libpaw_ok = unknown +sd_libpaw_options = optional skip +sd_libpaw_policy = skip +sd_libpaw_status = optional +sd_libpsml_cppflags = +sd_libpsml_enable = no +sd_libpsml_enable_def = no +sd_libpsml_fcflags = +sd_libpsml_init = def +sd_libpsml_ldflags = +sd_libpsml_libs = +sd_libpsml_ok = unknown +sd_libpsml_options = optional warn +sd_libpsml_policy = warn +sd_libpsml_status = optional +sd_libxc_cflags = +sd_libxc_cppflags = -I/opt/local/include +sd_libxc_enable = yes +sd_libxc_enable_def = yes +sd_libxc_enable_fc = no +sd_libxc_fcflags = +sd_libxc_init = dir +sd_libxc_ldflags = +sd_libxc_libs = -L/opt/local/lib -lxc +sd_libxc_ok = yes +sd_libxc_options = required no-fortran warn +sd_libxc_policy = warn +sd_libxc_status = required +sd_linalg_cflags = +sd_linalg_choices = +sd_linalg_cppflags = +sd_linalg_cxxflags = +sd_linalg_enable = yes +sd_linalg_fcflags = -I/opt/local/include +sd_linalg_flavor = openblas +sd_linalg_has_elpa = no +sd_linalg_has_scalapack = no +sd_linalg_init = env +sd_linalg_ldflags = +sd_linalg_libs = -L/opt/local/lib -lopenblas +sd_linalg_ok = yes +sd_mpi_cc = /opt/local/bin/mpicc +sd_mpi_cflags = +sd_mpi_cppflags = -I/opt/local/include +sd_mpi_cxx = /opt/local/bin/mpicxx +sd_mpi_enable = yes +sd_mpi_enable_cxx = yes +sd_mpi_enable_def = auto +sd_mpi_enable_fc = yes +sd_mpi_fc = /opt/local/bin/mpif90 +sd_mpi_fcflags = -I/opt/local/include +sd_mpi_init = dir +sd_mpi_ldflags = +sd_mpi_libs = +sd_mpi_ok = yes +sd_mpi_options = auto optional fail +sd_mpi_policy = fail +sd_mpi_status = optional +sd_netcdf_cflags = +sd_netcdf_cppflags = -I/opt/local/include +sd_netcdf_enable = yes +sd_netcdf_enable_def = yes +sd_netcdf_fcflags = -I/opt/local/include +sd_netcdf_fortran_cflags = +sd_netcdf_fortran_cppflags = -I/opt/local/include +sd_netcdf_fortran_enable = yes +sd_netcdf_fortran_enable_def = yes +sd_netcdf_fortran_fcflags = -I/opt/local/include +sd_netcdf_fortran_init = dir +sd_netcdf_fortran_ldflags = +sd_netcdf_fortran_libs = -L/opt/local/lib -lnetcdff +sd_netcdf_fortran_ok = yes +sd_netcdf_fortran_options = required warn +sd_netcdf_fortran_policy = warn +sd_netcdf_fortran_status = required +sd_netcdf_init = dir +sd_netcdf_ldflags = +sd_netcdf_libs = -L/opt/local/lib -lnetcdf +sd_netcdf_ok = yes +sd_netcdf_options = required warn +sd_netcdf_policy = warn +sd_netcdf_status = required +sd_papi_cflags = +sd_papi_cppflags = +sd_papi_enable = no +sd_papi_enable_def = no +sd_papi_init = def +sd_papi_ldflags = +sd_papi_libs = +sd_papi_ok = unknown +sd_papi_options = optional fail +sd_papi_policy = fail +sd_papi_sd_papi_fcflags = +sd_papi_status = optional +sd_pfft_cflags = +sd_pfft_cppflags = +sd_pfft_enable = no +sd_pfft_enable_def = no +sd_pfft_init = def +sd_pfft_ldflags = +sd_pfft_libs = +sd_pfft_ok = unknown +sd_pfft_options = optional skip +sd_pfft_policy = skip +sd_pfft_status = optional +sd_sys_fcflags = +sd_triqs_cflags = +sd_triqs_cppflags = +sd_triqs_cxxflags = +sd_triqs_enable = no +sd_triqs_enable_def = no +sd_triqs_fcflags = +sd_triqs_init = def +sd_triqs_ldflags = +sd_triqs_libs = +sd_triqs_ok = unknown +sd_triqs_options = optional fail +sd_triqs_policy = fail +sd_triqs_status = optional +sd_wannier90_cppflags = +sd_wannier90_enable = yes +sd_wannier90_enable_def = no +sd_wannier90_fcflags = -I/opt/local/include +sd_wannier90_init = env +sd_wannier90_ldflags = +sd_wannier90_libs = -L/opt/local/lib -lwannier +sd_wannier90_ok = yes +sd_wannier90_options = optional warn +sd_wannier90_policy = warn +sd_wannier90_status = optional +sd_xmlf90_cppflags = +sd_xmlf90_enable = no +sd_xmlf90_enable_def = no +sd_xmlf90_fcflags = +sd_xmlf90_init = def +sd_xmlf90_ldflags = +sd_xmlf90_libs = +sd_xmlf90_ok = unknown +sd_xmlf90_options = optional warn +sd_xmlf90_policy = warn +sd_xmlf90_status = optional +sd_yakl_cppflags = +sd_yakl_enable = no +sd_yakl_enable_def = no +sd_yakl_fcflags = +sd_yakl_init = def +sd_yakl_ldflags = +sd_yakl_libs = +sd_yakl_ok = unknown +sd_yakl_options = optional fail +sd_yakl_policy = fail +sd_yakl_status = optional +sharedstatedir = ${prefix}/com +src_02_clib_fcflags = -I$(top_builddir)/shared/common/src/02_clib -I$(top_srcdir)/shared/common/src/02_clib +src_10_defs_fcflags = -I$(top_builddir)/shared/common/src/10_defs -I$(top_srcdir)/shared/common/src/10_defs +src_11_memory_mpi_fcflags = -I$(top_builddir)/shared/common/src/11_memory_mpi -I$(top_srcdir)/shared/common/src/11_memory_mpi +src_12_hide_mpi_fcflags = -I$(top_builddir)/shared/common/src/12_hide_mpi -I$(top_srcdir)/shared/common/src/12_hide_mpi +src_14_hidewrite_fcflags = -I$(top_builddir)/shared/common/src/14_hidewrite -I$(top_srcdir)/shared/common/src/14_hidewrite +src_16_hideleave_fcflags = -I$(top_builddir)/shared/common/src/16_hideleave -I$(top_srcdir)/shared/common/src/16_hideleave +src_16_kokkos_toolbox_fcflags = -I$(top_builddir)/shared/common/src/16_kokkos_toolbox -I$(top_srcdir)/shared/common/src/16_kokkos_toolbox +src_17_gpu_toolbox_fcflags = -I$(top_builddir)/shared/common/src/17_gpu_toolbox -I$(top_srcdir)/shared/common/src/17_gpu_toolbox +src_17_libtetra_ext_fcflags = -I$(top_builddir)/shared/common/src/17_libtetra_ext -I$(top_srcdir)/shared/common/src/17_libtetra_ext +src_17_minimax_fcflags = -I$(top_builddir)/shared/common/src/17_minimax -I$(top_srcdir)/shared/common/src/17_minimax +src_17_yaml_out_fcflags = -I$(top_builddir)/shared/common/src/17_yaml_out -I$(top_srcdir)/shared/common/src/17_yaml_out +src_18_timing_fcflags = -I$(top_builddir)/shared/common/src/18_timing -I$(top_srcdir)/shared/common/src/18_timing +src_21_hashfuncs_fcflags = -I$(top_builddir)/shared/common/src/21_hashfuncs -I$(top_srcdir)/shared/common/src/21_hashfuncs +src_27_toolbox_oop_fcflags = -I$(top_builddir)/shared/common/src/27_toolbox_oop -I$(top_srcdir)/shared/common/src/27_toolbox_oop +src_28_numeric_noabirule_fcflags = -I$(top_builddir)/shared/common/src/28_numeric_noabirule -I$(top_srcdir)/shared/common/src/28_numeric_noabirule +src_29_kpoints_fcflags = -I$(top_builddir)/shared/common/src/29_kpoints -I$(top_srcdir)/shared/common/src/29_kpoints +src_32_util_fcflags = -I$(top_builddir)/shared/common/src/32_util -I$(top_srcdir)/shared/common/src/32_util +src_33_xc_lowlevel_fcflags = -I$(top_builddir)/shared/common/src/33_xc_lowlevel -I$(top_srcdir)/shared/common/src/33_xc_lowlevel +src_39_libpaw_fcflags = -I$(top_builddir)/shared/libpaw/src -I$(top_srcdir)/shared/libpaw/src +src_41_geometry_fcflags = -I$(top_builddir)/src/41_geometry -I$(top_srcdir)/src/41_geometry +src_42_nlstrain_fcflags = -I$(top_builddir)/src/42_nlstrain -I$(top_srcdir)/src/42_nlstrain +src_42_parser_fcflags = -I$(top_builddir)/src/42_parser -I$(top_srcdir)/src/42_parser +src_43_ptgroups_fcflags = -I$(top_builddir)/src/43_ptgroups -I$(top_srcdir)/src/43_ptgroups +src_43_wvl_wrappers_fcflags = -I$(top_builddir)/src/43_wvl_wrappers -I$(top_srcdir)/src/43_wvl_wrappers +src_44_abitools_fcflags = -I$(top_builddir)/src/44_abitools -I$(top_srcdir)/src/44_abitools +src_44_abitypes_defs_fcflags = -I$(top_builddir)/src/44_abitypes_defs -I$(top_srcdir)/src/44_abitypes_defs +src_44_manage_kokkos_fcflags = -I$(top_builddir)/src/44_manage_kokkos -I$(top_srcdir)/src/44_manage_kokkos +src_45_geomoptim_fcflags = -I$(top_builddir)/src/45_geomoptim -I$(top_srcdir)/src/45_geomoptim +src_45_xgTools_fcflags = -I$(top_builddir)/src/45_xgTools -I$(top_srcdir)/src/45_xgTools +src_46_ghc_omp_fcflags = -I$(top_builddir)/src/46_ghc_omp -I$(top_srcdir)/src/46_ghc_omp +src_46_manage_cuda_fcflags = -I$(top_builddir)/src/46_manage_cuda -I$(top_srcdir)/src/46_manage_cuda +src_48_diago_fcflags = -I$(top_builddir)/src/48_diago -I$(top_srcdir)/src/48_diago +src_49_gw_toolbox_oop_fcflags = -I$(top_builddir)/src/49_gw_toolbox_oop -I$(top_srcdir)/src/49_gw_toolbox_oop +src_51_manage_mpi_fcflags = -I$(top_builddir)/src/51_manage_mpi -I$(top_srcdir)/src/51_manage_mpi +src_52_fft_mpi_noabirule_fcflags = -I$(top_builddir)/src/52_fft_mpi_noabirule -I$(top_srcdir)/src/52_fft_mpi_noabirule +src_53_ffts_fcflags = -I$(top_builddir)/src/53_ffts -I$(top_srcdir)/src/53_ffts +src_54_spacepar_fcflags = -I$(top_builddir)/src/54_spacepar -I$(top_srcdir)/src/54_spacepar +src_55_abiutil_fcflags = -I$(top_builddir)/src/55_abiutil -I$(top_srcdir)/src/55_abiutil +src_56_io_mpi_fcflags = -I$(top_builddir)/src/56_io_mpi -I$(top_srcdir)/src/56_io_mpi +src_56_mixing_fcflags = -I$(top_builddir)/src/56_mixing -I$(top_srcdir)/src/56_mixing +src_56_recipspace_fcflags = -I$(top_builddir)/src/56_recipspace -I$(top_srcdir)/src/56_recipspace +src_56_xc_fcflags = -I$(top_builddir)/src/56_xc -I$(top_srcdir)/src/56_xc +src_57_iopsp_parser_fcflags = -I$(top_builddir)/src/57_iopsp_parser -I$(top_srcdir)/src/57_iopsp_parser +src_57_iovars_fcflags = -I$(top_builddir)/src/57_iovars -I$(top_srcdir)/src/57_iovars +src_61_occeig_fcflags = -I$(top_builddir)/src/61_occeig -I$(top_srcdir)/src/61_occeig +src_62_cg_noabirule_fcflags = -I$(top_builddir)/src/62_cg_noabirule -I$(top_srcdir)/src/62_cg_noabirule +src_62_ctqmc_fcflags = -I$(top_builddir)/src/62_ctqmc -I$(top_srcdir)/src/62_ctqmc +src_62_iowfdenpot_fcflags = -I$(top_builddir)/src/62_iowfdenpot -I$(top_srcdir)/src/62_iowfdenpot +src_62_poisson_fcflags = -I$(top_builddir)/src/62_poisson -I$(top_srcdir)/src/62_poisson +src_62_wvl_wfs_fcflags = -I$(top_builddir)/src/62_wvl_wfs -I$(top_srcdir)/src/62_wvl_wfs +src_64_psp_fcflags = -I$(top_builddir)/src/64_psp -I$(top_srcdir)/src/64_psp +src_65_lotf_base_fcflags = -I$(top_builddir)/src/65_lotf_base -I$(top_srcdir)/src/65_lotf_base +src_65_paw_fcflags = -I$(top_builddir)/src/65_paw -I$(top_srcdir)/src/65_paw +src_66_nonlocal_fcflags = -I$(top_builddir)/src/66_nonlocal -I$(top_srcdir)/src/66_nonlocal +src_66_vdwxc_fcflags = -I$(top_builddir)/src/66_vdwxc -I$(top_srcdir)/src/66_vdwxc +src_66_wfs_fcflags = -I$(top_builddir)/src/66_wfs -I$(top_srcdir)/src/66_wfs +src_67_common_fcflags = -I$(top_builddir)/src/67_common -I$(top_srcdir)/src/67_common +src_67_python_invocation_ext_fcflags = -I$(top_builddir)/src/67_python_invocation_ext -I$(top_srcdir)/src/67_python_invocation_ext +src_67_triqs_ext_fcflags = -I$(top_builddir)/src/67_triqs_ext -I$(top_srcdir)/src/67_triqs_ext +src_68_dmft_fcflags = -I$(top_builddir)/src/68_dmft -I$(top_srcdir)/src/68_dmft +src_68_lotf_fcflags = -I$(top_builddir)/src/68_lotf -I$(top_srcdir)/src/68_lotf +src_68_recursion_fcflags = -I$(top_builddir)/src/68_recursion -I$(top_srcdir)/src/68_recursion +src_68_rsprc_fcflags = -I$(top_builddir)/src/68_rsprc -I$(top_srcdir)/src/68_rsprc +src_69_wfdesc_fcflags = -I$(top_builddir)/src/69_wfdesc -I$(top_srcdir)/src/69_wfdesc +src_70_gw_fcflags = -I$(top_builddir)/src/70_gw -I$(top_srcdir)/src/70_gw +src_71_bse_fcflags = -I$(top_builddir)/src/71_bse -I$(top_srcdir)/src/71_bse +src_71_wannier_fcflags = -I$(top_builddir)/src/71_wannier -I$(top_srcdir)/src/71_wannier +src_72_response_fcflags = -I$(top_builddir)/src/72_response -I$(top_srcdir)/src/72_response +src_77_ddb_fcflags = -I$(top_builddir)/src/77_ddb -I$(top_srcdir)/src/77_ddb +src_77_suscep_fcflags = -I$(top_builddir)/src/77_suscep -I$(top_srcdir)/src/77_suscep +src_78_effpot_fcflags = -I$(top_builddir)/src/78_effpot -I$(top_srcdir)/src/78_effpot +src_78_eph_fcflags = -I$(top_builddir)/src/78_eph -I$(top_srcdir)/src/78_eph +src_79_seqpar_mpi_fcflags = -I$(top_builddir)/src/79_seqpar_mpi -I$(top_srcdir)/src/79_seqpar_mpi +src_80_rttddft_fcflags = -I$(top_builddir)/src/80_rttddft -I$(top_srcdir)/src/80_rttddft +src_80_tdep_fcflags = -I$(top_builddir)/src/80_tdep -I$(top_srcdir)/src/80_tdep +src_94_scfcv_fcflags = -I$(top_builddir)/src/94_scfcv -I$(top_srcdir)/src/94_scfcv +src_95_drive_fcflags = -I$(top_builddir)/src/95_drive -I$(top_srcdir)/src/95_drive +src_common_fcflags = -I$(top_builddir)/shared/common/src/incs -I$(top_srcdir)/shared/common/src/incs -I$(top_builddir)/shared/common/src/mods -I$(top_srcdir)/shared/common/src/mods +src_core_fcflags = -I$(top_builddir)/src/incs -I$(top_srcdir)/src/incs -I$(top_builddir)/src/mods -I$(top_srcdir)/src/mods +src_libpaw_fcflags = -I$(top_builddir)/shared/libpaw/incs -I$(top_srcdir)/shared/libpaw/incs -I$(top_builddir)/shared/libpaw/mods -I$(top_srcdir)/shared/libpaw/mods +srcdir = . +sysconfdir = ${prefix}/etc +target = x86_64-apple-darwin18.7.0 +target_alias = +target_cpu = x86_64 +target_os = darwin18.7.0 +target_vendor = apple +top_build_prefix = ../../ +top_builddir = ../.. +top_srcdir = ../.. +with_abinit_common = +with_bigdft = +with_config_file = +with_debug_flavor = +with_fallbacks = +with_fc_vendor = +with_fc_version = +with_fft_flavor = fftw3 +with_fftw3 = +with_gnu_ld = +with_gpu = +with_hdf5 = /opt/local +with_kokkos = +with_levmar = +with_libpaw = +with_libpsml = +with_libxc = /opt/local +with_libxml2 = +with_linalg_flavor = openblas +with_mpi = /opt/local +with_mpi_level = +with_netcdf = /opt/local +with_optim_flavor = +with_papi = +with_pfft = +with_triqs = +with_wannier90 = +with_xmlf90 = +with_yakl = +SUBDIRS = src +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu shared/common/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu shared/common/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +# This directory's subdirectories are mostly independent; you can cd +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(am__recursive_targets) install-am install-strip + +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ + check-am clean clean-generic cscopelist-am ctags ctags-am \ + distclean distclean-generic distclean-tags distdir dvi dvi-am \ + html html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ + pdf-am ps ps-am tags tags-am uninstall uninstall-am + +.PRECIOUS: Makefile + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/GX-PAW/common/Makefile.am b/GX-PAW/common/Makefile.am new file mode 100644 index 00000000..590cf346 --- /dev/null +++ b/GX-PAW/common/Makefile.am @@ -0,0 +1,12 @@ +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-inter on 2024/03/16 21:07:39 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-inter script or its config file instead. +# + +SUBDIRS = src diff --git a/GX-PAW/common/Makefile.in b/GX-PAW/common/Makefile.in new file mode 100644 index 00000000..312389c9 --- /dev/null +++ b/GX-PAW/common/Makefile.in @@ -0,0 +1,1490 @@ +# Makefile.in generated by automake 1.16.3 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2020 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-inter on 2024/03/16 21:07:39 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-inter script or its config file instead. +# +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = shared/common +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/m4/arch-gpu.m4 \ + $(top_srcdir)/config/m4/arch-mpi.m4 \ + $(top_srcdir)/config/m4/auto-autotools.m4 \ + $(top_srcdir)/config/m4/auto-corelibs.m4 \ + $(top_srcdir)/config/m4/auto-debug.m4 \ + $(top_srcdir)/config/m4/auto-dirflags.m4 \ + $(top_srcdir)/config/m4/auto-env.m4 \ + $(top_srcdir)/config/m4/auto-hints.m4 \ + $(top_srcdir)/config/m4/auto-optim.m4 \ + $(top_srcdir)/config/m4/auto-options.m4 \ + $(top_srcdir)/config/m4/auto-output.m4 \ + $(top_srcdir)/config/m4/auto-triggers.m4 \ + $(top_srcdir)/config/m4/conf-atompaw.m4 \ + $(top_srcdir)/config/m4/conf-debug.m4 \ + $(top_srcdir)/config/m4/conf-fallbacks.m4 \ + $(top_srcdir)/config/m4/conf-files.m4 \ + $(top_srcdir)/config/m4/conf-init.m4 \ + $(top_srcdir)/config/m4/conf-openmp.m4 \ + $(top_srcdir)/config/m4/conf-optim.m4 \ + $(top_srcdir)/config/m4/lang-c++.m4 \ + $(top_srcdir)/config/m4/lang-c.m4 \ + $(top_srcdir)/config/m4/lang-fortran-import.m4 \ + $(top_srcdir)/config/m4/lang-fortran.m4 \ + $(top_srcdir)/config/m4/lang-python.m4 \ + $(top_srcdir)/config/m4/libxml2.m4 \ + $(top_srcdir)/config/m4/misc-display.m4 \ + $(top_srcdir)/config/m4/sd_abinit_common.m4 \ + $(top_srcdir)/config/m4/sd_arch_gpu.m4 \ + $(top_srcdir)/config/m4/sd_arch_mpi.m4 \ + $(top_srcdir)/config/m4/sd_bigdft.m4 \ + $(top_srcdir)/config/m4/sd_core.m4 \ + $(top_srcdir)/config/m4/sd_esl.m4 \ + $(top_srcdir)/config/m4/sd_fftw3.m4 \ + $(top_srcdir)/config/m4/sd_gpu_kokkos.m4 \ + $(top_srcdir)/config/m4/sd_gpu_yakl.m4 \ + $(top_srcdir)/config/m4/sd_io_hdf5.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf_fortran.m4 \ + $(top_srcdir)/config/m4/sd_levmar.m4 \ + $(top_srcdir)/config/m4/sd_libpaw.m4 \ + $(top_srcdir)/config/m4/sd_libpsml.m4 \ + $(top_srcdir)/config/m4/sd_libxc.m4 \ + $(top_srcdir)/config/m4/sd_math_fft.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_core.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_util.m4 \ + $(top_srcdir)/config/m4/sd_papi.m4 \ + $(top_srcdir)/config/m4/sd_pfft.m4 \ + $(top_srcdir)/config/m4/sd_triqs.m4 \ + $(top_srcdir)/config/m4/sd_wannier90.m4 \ + $(top_srcdir)/config/m4/sd_xmlf90.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + distdir distdir-am +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +am__DIST_COMMON = $(srcdir)/Makefile.in AUTHORS COPYING ChangeLog NEWS \ + README +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ABINIT_BINARY_PACKAGE = @ABINIT_BINARY_PACKAGE@ +ABINIT_COMMON_CPPFLAGS = @ABINIT_COMMON_CPPFLAGS@ +ABINIT_COMMON_FCFLAGS = @ABINIT_COMMON_FCFLAGS@ +ABINIT_COMMON_LDFLAGS = @ABINIT_COMMON_LDFLAGS@ +ABINIT_COMMON_LIBS = @ABINIT_COMMON_LIBS@ +ABINIT_TARGET = @ABINIT_TARGET@ +ABINIT_VERSION = @ABINIT_VERSION@ +ABINIT_VERSION_BASE = @ABINIT_VERSION_BASE@ +ABINIT_VERSION_BUILD = @ABINIT_VERSION_BUILD@ +ABINIT_VERSION_MAJOR = @ABINIT_VERSION_MAJOR@ +ABINIT_VERSION_MICRO = @ABINIT_VERSION_MICRO@ +ABINIT_VERSION_MINOR = @ABINIT_VERSION_MINOR@ +ABI_CPPFLAGS = @ABI_CPPFLAGS@ +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +ARFLAGS = @ARFLAGS@ +ARFLAGS_CMD = @ARFLAGS_CMD@ +ARFLAGS_DEBUG = @ARFLAGS_DEBUG@ +ARFLAGS_EXTRA = @ARFLAGS_EXTRA@ +ARFLAGS_HINTS = @ARFLAGS_HINTS@ +ARFLAGS_OPTIM = @ARFLAGS_OPTIM@ +ATOMPAW_BIN = @ATOMPAW_BIN@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BIGDFT_CPPFLAGS = @BIGDFT_CPPFLAGS@ +BIGDFT_FCFLAGS = @BIGDFT_FCFLAGS@ +BIGDFT_LDFLAGS = @BIGDFT_LDFLAGS@ +BIGDFT_LIBS = @BIGDFT_LIBS@ +BOURNE_SHELL = @BOURNE_SHELL@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CC_LDFLAGS = @CC_LDFLAGS@ +CC_LDFLAGS_DEBUG = @CC_LDFLAGS_DEBUG@ +CC_LDFLAGS_EXTRA = @CC_LDFLAGS_EXTRA@ +CC_LDFLAGS_GPU = @CC_LDFLAGS_GPU@ +CC_LDFLAGS_HINTS = @CC_LDFLAGS_HINTS@ +CC_LDFLAGS_OPTIM = @CC_LDFLAGS_OPTIM@ +CC_LIBS = @CC_LIBS@ +CC_LIBS_DEBUG = @CC_LIBS_DEBUG@ +CC_LIBS_EXTRA = @CC_LIBS_EXTRA@ +CC_LIBS_GPU = @CC_LIBS_GPU@ +CC_LIBS_HINTS = @CC_LIBS_HINTS@ +CC_LIBS_OPTIM = @CC_LIBS_OPTIM@ +CFLAGS = @CFLAGS@ +CFLAGS_DEBUG = @CFLAGS_DEBUG@ +CFLAGS_EXTRA = @CFLAGS_EXTRA@ +CFLAGS_GPU = @CFLAGS_GPU@ +CFLAGS_HINTS = @CFLAGS_HINTS@ +CFLAGS_OPTIM = @CFLAGS_OPTIM@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CPPFLAGS_DEBUG = @CPPFLAGS_DEBUG@ +CPPFLAGS_EXTRA = @CPPFLAGS_EXTRA@ +CPPFLAGS_GPU = @CPPFLAGS_GPU@ +CPPFLAGS_HINTS = @CPPFLAGS_HINTS@ +CPPFLAGS_HINTS_EXT = @CPPFLAGS_HINTS_EXT@ +CPPFLAGS_OPTIM = @CPPFLAGS_OPTIM@ +CXX = @CXX@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CXXFLAGS_DEBUG = @CXXFLAGS_DEBUG@ +CXXFLAGS_EXTRA = @CXXFLAGS_EXTRA@ +CXXFLAGS_GPU = @CXXFLAGS_GPU@ +CXXFLAGS_HINTS = @CXXFLAGS_HINTS@ +CXXFLAGS_OPTIM = @CXXFLAGS_OPTIM@ +CXX_LDFLAGS = @CXX_LDFLAGS@ +CXX_LDFLAGS_DEBUG = @CXX_LDFLAGS_DEBUG@ +CXX_LDFLAGS_EXTRA = @CXX_LDFLAGS_EXTRA@ +CXX_LDFLAGS_GPU = @CXX_LDFLAGS_GPU@ +CXX_LDFLAGS_HINTS = @CXX_LDFLAGS_HINTS@ +CXX_LDFLAGS_OPTIM = @CXX_LDFLAGS_OPTIM@ +CXX_LIBS = @CXX_LIBS@ +CXX_LIBS_DEBUG = @CXX_LIBS_DEBUG@ +CXX_LIBS_EXTRA = @CXX_LIBS_EXTRA@ +CXX_LIBS_GPU = @CXX_LIBS_GPU@ +CXX_LIBS_HINTS = @CXX_LIBS_HINTS@ +CXX_LIBS_OPTIM = @CXX_LIBS_OPTIM@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ +FCFLAGS = @FCFLAGS@ +FCFLAGS_DEBUG = @FCFLAGS_DEBUG@ +FCFLAGS_EXTRA = @FCFLAGS_EXTRA@ +FCFLAGS_F90 = @FCFLAGS_F90@ +FCFLAGS_FIXEDFORM = @FCFLAGS_FIXEDFORM@ +FCFLAGS_FREEFORM = @FCFLAGS_FREEFORM@ +FCFLAGS_HINTS = @FCFLAGS_HINTS@ +FCFLAGS_MODDIR = @FCFLAGS_MODDIR@ +FCFLAGS_OPENMP = @FCFLAGS_OPENMP@ +FCFLAGS_OPENMP_OFFLOAD = @FCFLAGS_OPENMP_OFFLOAD@ +FCFLAGS_OPTIM = @FCFLAGS_OPTIM@ +FCLIBS = @FCLIBS@ +FC_LDFLAGS = @FC_LDFLAGS@ +FC_LDFLAGS_DEBUG = @FC_LDFLAGS_DEBUG@ +FC_LDFLAGS_EXTRA = @FC_LDFLAGS_EXTRA@ +FC_LDFLAGS_HINTS = @FC_LDFLAGS_HINTS@ +FC_LDFLAGS_OPTIM = @FC_LDFLAGS_OPTIM@ +FC_LIBS = @FC_LIBS@ +FC_LIBS_DEBUG = @FC_LIBS_DEBUG@ +FC_LIBS_EXTRA = @FC_LIBS_EXTRA@ +FC_LIBS_HINTS = @FC_LIBS_HINTS@ +FC_LIBS_OPTIM = @FC_LIBS_OPTIM@ +FC_NOWRAP = @FC_NOWRAP@ +FFLAGS = @FFLAGS@ +FFTW3_CFLAGS = @FFTW3_CFLAGS@ +FFTW3_CPPFLAGS = @FFTW3_CPPFLAGS@ +FFTW3_FCFLAGS = @FFTW3_FCFLAGS@ +FFTW3_LDFLAGS = @FFTW3_LDFLAGS@ +FFTW3_LIBS = @FFTW3_LIBS@ +FFT_CFLAGS = @FFT_CFLAGS@ +FFT_FCFLAGS = @FFT_FCFLAGS@ +FPP = @FPP@ +FPPFLAGS = @FPPFLAGS@ +FPPFLAGS_DEBUG = @FPPFLAGS_DEBUG@ +FPPFLAGS_EXTRA = @FPPFLAGS_EXTRA@ +FPPFLAGS_HINTS = @FPPFLAGS_HINTS@ +FPPFLAGS_OPTIM = @FPPFLAGS_OPTIM@ +GPU_ARCH = @GPU_ARCH@ +GPU_CFLAGS = @GPU_CFLAGS@ +GPU_CPPFLAGS = @GPU_CPPFLAGS@ +GPU_CXXFLAGS = @GPU_CXXFLAGS@ +GPU_FCFLAGS = @GPU_FCFLAGS@ +GPU_LDFLAGS = @GPU_LDFLAGS@ +GPU_LIBS = @GPU_LIBS@ +GRAPHATOM_BIN = @GRAPHATOM_BIN@ +GREP = @GREP@ +H5CC = @H5CC@ +HDF5_CFLAGS = @HDF5_CFLAGS@ +HDF5_CPPFLAGS = @HDF5_CPPFLAGS@ +HDF5_CXXFLAGS = @HDF5_CXXFLAGS@ +HDF5_FCFLAGS = @HDF5_FCFLAGS@ +HDF5_LDFLAGS = @HDF5_LDFLAGS@ +HDF5_LIBS = @HDF5_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +LDFLAGS = @LDFLAGS@ +LEVMAR_CFLAGS = @LEVMAR_CFLAGS@ +LEVMAR_CPPFLAGS = @LEVMAR_CPPFLAGS@ +LEVMAR_LDFLAGS = @LEVMAR_LDFLAGS@ +LEVMAR_LIBS = @LEVMAR_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPAW_CPPFLAGS = @LIBPAW_CPPFLAGS@ +LIBPAW_FCFLAGS = @LIBPAW_FCFLAGS@ +LIBPAW_LDFLAGS = @LIBPAW_LDFLAGS@ +LIBPAW_LIBS = @LIBPAW_LIBS@ +LIBPSML_CPPFLAGS = @LIBPSML_CPPFLAGS@ +LIBPSML_FCFLAGS = @LIBPSML_FCFLAGS@ +LIBPSML_LDFLAGS = @LIBPSML_LDFLAGS@ +LIBPSML_LIBS = @LIBPSML_LIBS@ +LIBS = @LIBS@ +LIBXC_CFLAGS = @LIBXC_CFLAGS@ +LIBXC_CPPFLAGS = @LIBXC_CPPFLAGS@ +LIBXC_FCFLAGS = @LIBXC_FCFLAGS@ +LIBXC_LDFLAGS = @LIBXC_LDFLAGS@ +LIBXC_LIBS = @LIBXC_LIBS@ +LIBXML2_CPPFLAGS = @LIBXML2_CPPFLAGS@ +LIBXML2_FCFLAGS = @LIBXML2_FCFLAGS@ +LIBXML2_LIBS = @LIBXML2_LIBS@ +LINALG_CFLAGS = @LINALG_CFLAGS@ +LINALG_CPPFLAGS = @LINALG_CPPFLAGS@ +LINALG_CXXFLAGS = @LINALG_CXXFLAGS@ +LINALG_FCFLAGS = @LINALG_FCFLAGS@ +LINALG_LDFLAGS = @LINALG_LDFLAGS@ +LINALG_LIBS = @LINALG_LIBS@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODEXT = @MODEXT@ +MPI_CFLAGS = @MPI_CFLAGS@ +MPI_CPPFLAGS = @MPI_CPPFLAGS@ +MPI_CXXFLAGS = @MPI_CXXFLAGS@ +MPI_FCFLAGS = @MPI_FCFLAGS@ +MPI_LDFLAGS = @MPI_LDFLAGS@ +MPI_LIBS = @MPI_LIBS@ +MV = @MV@ +NETCDF_CFLAGS = @NETCDF_CFLAGS@ +NETCDF_CPPFLAGS = @NETCDF_CPPFLAGS@ +NETCDF_CXXFLAGS = @NETCDF_CXXFLAGS@ +NETCDF_FCFLAGS = @NETCDF_FCFLAGS@ +NETCDF_FORTRAN_CFLAGS = @NETCDF_FORTRAN_CFLAGS@ +NETCDF_FORTRAN_CPPFLAGS = @NETCDF_FORTRAN_CPPFLAGS@ +NETCDF_FORTRAN_CXXFLAGS = @NETCDF_FORTRAN_CXXFLAGS@ +NETCDF_FORTRAN_FCFLAGS = @NETCDF_FORTRAN_FCFLAGS@ +NETCDF_FORTRAN_LDFLAGS = @NETCDF_FORTRAN_LDFLAGS@ +NETCDF_FORTRAN_LIBS = @NETCDF_FORTRAN_LIBS@ +NETCDF_LDFLAGS = @NETCDF_LDFLAGS@ +NETCDF_LIBS = @NETCDF_LIBS@ +NVCC = @NVCC@ +NVCC_CFLAGS = @NVCC_CFLAGS@ +NVCC_CPPFLAGS = @NVCC_CPPFLAGS@ +NVCC_LDFLAGS = @NVCC_LDFLAGS@ +NVCC_LIBS = @NVCC_LIBS@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PAPI_CFLAGS = @PAPI_CFLAGS@ +PAPI_CPPFLAGS = @PAPI_CPPFLAGS@ +PAPI_LDFLAGS = @PAPI_LDFLAGS@ +PAPI_LIBS = @PAPI_LIBS@ +PATCH = @PATCH@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PFFT_CFLAGS = @PFFT_CFLAGS@ +PFFT_CPPFLAGS = @PFFT_CPPFLAGS@ +PFFT_LDFLAGS = @PFFT_LDFLAGS@ +PFFT_LIBS = @PFFT_LIBS@ +PYFLAGS = @PYFLAGS@ +PYTHON = @PYTHON@ +PYTHON_CONFIG = @PYTHON_CONFIG@ +PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ +RANLIB = @RANLIB@ +REALPATH = @REALPATH@ +RM = @RM@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +TAR = @TAR@ +TRIQS_CFLAGS = @TRIQS_CFLAGS@ +TRIQS_CPPFLAGS = @TRIQS_CPPFLAGS@ +TRIQS_CXXFLAGS = @TRIQS_CXXFLAGS@ +TRIQS_LDFLAGS = @TRIQS_LDFLAGS@ +TRIQS_LIBS = @TRIQS_LIBS@ +TRUE_CPP = @TRUE_CPP@ +VERSION = @VERSION@ +WANNIER90_CPPFLAGS = @WANNIER90_CPPFLAGS@ +WANNIER90_FCFLAGS = @WANNIER90_FCFLAGS@ +WANNIER90_LDFLAGS = @WANNIER90_LDFLAGS@ +WANNIER90_LIBS = @WANNIER90_LIBS@ +XML2_CONFIG = @XML2_CONFIG@ +XMLF90_CPPFLAGS = @XMLF90_CPPFLAGS@ +XMLF90_FCFLAGS = @XMLF90_FCFLAGS@ +XMLF90_LDFLAGS = @XMLF90_LDFLAGS@ +XMLF90_LIBS = @XMLF90_LIBS@ +XML_CPPFLAGS = @XML_CPPFLAGS@ +XML_LIBS = @XML_LIBS@ +XPP = @XPP@ +XPPFLAGS = @XPPFLAGS@ +XPPFLAGS_DEBUG = @XPPFLAGS_DEBUG@ +XPPFLAGS_EXTRA = @XPPFLAGS_EXTRA@ +XPPFLAGS_OPTIM = @XPPFLAGS_OPTIM@ +YAKL_CPPFLAGS = @YAKL_CPPFLAGS@ +YAKL_FCFLAGS = @YAKL_FCFLAGS@ +YAKL_LDFLAGS = @YAKL_LDFLAGS@ +YAKL_LIBS = @YAKL_LIBS@ +abi_ac_distcheck = @abi_ac_distcheck@ +abi_ac_version = @abi_ac_version@ +abi_am_version = @abi_am_version@ +abi_avx_safe_mode_enable = @abi_avx_safe_mode_enable@ +abi_bse_unpacked_enable = @abi_bse_unpacked_enable@ +abi_cc_path = @abi_cc_path@ +abi_cc_vendor = @abi_cc_vendor@ +abi_cc_version = @abi_cc_version@ +abi_cclock_enable = @abi_cclock_enable@ +abi_cpp_path = @abi_cpp_path@ +abi_cpu_64bits = @abi_cpu_64bits@ +abi_cpu_bits = @abi_cpu_bits@ +abi_cpu_model = @abi_cpu_model@ +abi_cpu_platform = @abi_cpu_platform@ +abi_cpu_spec = @abi_cpu_spec@ +abi_cpu_vendor = @abi_cpu_vendor@ +abi_crpa_optim_enable = @abi_crpa_optim_enable@ +abi_cxx_path = @abi_cxx_path@ +abi_cxx_vendor = @abi_cxx_vendor@ +abi_cxx_version = @abi_cxx_version@ +abi_debug_flavor = @abi_debug_flavor@ +abi_exports_enable = @abi_exports_enable@ +abi_fbk_abinit_common_ok = @abi_fbk_abinit_common_ok@ +abi_fbk_bigdft_ok = @abi_fbk_bigdft_ok@ +abi_fbk_config = @abi_fbk_config@ +abi_fbk_enable = @abi_fbk_enable@ +abi_fbk_fft_ok = @abi_fbk_fft_ok@ +abi_fbk_fftw3_ok = @abi_fbk_fftw3_ok@ +abi_fbk_gpu_ok = @abi_fbk_gpu_ok@ +abi_fbk_hdf5_ok = @abi_fbk_hdf5_ok@ +abi_fbk_init = @abi_fbk_init@ +abi_fbk_kokkos_ok = @abi_fbk_kokkos_ok@ +abi_fbk_levmar_ok = @abi_fbk_levmar_ok@ +abi_fbk_libpaw_ok = @abi_fbk_libpaw_ok@ +abi_fbk_libpsml_ok = @abi_fbk_libpsml_ok@ +abi_fbk_libxc_ok = @abi_fbk_libxc_ok@ +abi_fbk_libxml2_ok = @abi_fbk_libxml2_ok@ +abi_fbk_linalg_ok = @abi_fbk_linalg_ok@ +abi_fbk_list = @abi_fbk_list@ +abi_fbk_mpi_ok = @abi_fbk_mpi_ok@ +abi_fbk_netcdf_fortran_ok = @abi_fbk_netcdf_fortran_ok@ +abi_fbk_netcdf_ok = @abi_fbk_netcdf_ok@ +abi_fbk_papi_ok = @abi_fbk_papi_ok@ +abi_fbk_pfft_ok = @abi_fbk_pfft_ok@ +abi_fbk_prefix = @abi_fbk_prefix@ +abi_fbk_required = @abi_fbk_required@ +abi_fbk_triqs_ok = @abi_fbk_triqs_ok@ +abi_fbk_wannier90_ok = @abi_fbk_wannier90_ok@ +abi_fbk_xmlf90_ok = @abi_fbk_xmlf90_ok@ +abi_fbk_yakl_ok = @abi_fbk_yakl_ok@ +abi_fc_path = @abi_fc_path@ +abi_fc_vendor = @abi_fc_vendor@ +abi_fc_version = @abi_fc_version@ +abi_fc_wrap = @abi_fc_wrap@ +abi_fc_wrapper_enable = @abi_fc_wrapper_enable@ +abi_fpp_path = @abi_fpp_path@ +abi_gpu_arch = @abi_gpu_arch@ +abi_gpu_fcflags = @abi_gpu_fcflags@ +abi_gpu_flavor = @abi_gpu_flavor@ +abi_gpu_hip_libdir = @abi_gpu_hip_libdir@ +abi_gpu_incs = @abi_gpu_incs@ +abi_gpu_ldflags = @abi_gpu_ldflags@ +abi_gpu_libs = @abi_gpu_libs@ +abi_gpu_nvtx_v3 = @abi_gpu_nvtx_v3@ +abi_gpu_roctx = @abi_gpu_roctx@ +abi_gw_dpc_enable = @abi_gw_dpc_enable@ +abi_hints_enable = @abi_hints_enable@ +abi_libtetra_enable = @abi_libtetra_enable@ +abi_libxml2_cppflags = @abi_libxml2_cppflags@ +abi_libxml2_enable = @abi_libxml2_enable@ +abi_libxml2_fcflags = @abi_libxml2_fcflags@ +abi_libxml2_init = @abi_libxml2_init@ +abi_libxml2_ldflags = @abi_libxml2_ldflags@ +abi_libxml2_libs = @abi_libxml2_libs@ +abi_libxml2_ok = @abi_libxml2_ok@ +abi_libxml2_prefix = @abi_libxml2_prefix@ +abi_lotf_enable = @abi_lotf_enable@ +abi_lt_version = @abi_lt_version@ +abi_m4_version = @abi_m4_version@ +abi_memory_profiling_enable = @abi_memory_profiling_enable@ +abi_mpi_cflags = @abi_mpi_cflags@ +abi_mpi_cppflags = @abi_mpi_cppflags@ +abi_mpi_cxxflags = @abi_mpi_cxxflags@ +abi_mpi_enable = @abi_mpi_enable@ +abi_mpi_fcflags = @abi_mpi_fcflags@ +abi_mpi_flavor = @abi_mpi_flavor@ +abi_mpi_gpu_aware_enable = @abi_mpi_gpu_aware_enable@ +abi_mpi_incs = @abi_mpi_incs@ +abi_mpi_inplace_enable = @abi_mpi_inplace_enable@ +abi_mpi_interfaces_bugfix_enable = @abi_mpi_interfaces_bugfix_enable@ +abi_mpi_io_default_enable = @abi_mpi_io_default_enable@ +abi_mpi_io_enable = @abi_mpi_io_enable@ +abi_mpi_ldflags = @abi_mpi_ldflags@ +abi_mpi_level = @abi_mpi_level@ +abi_mpi_libs = @abi_mpi_libs@ +abi_netcdf_default_enable = @abi_netcdf_default_enable@ +abi_openmp_enable = @abi_openmp_enable@ +abi_openmp_offload_enable = @abi_openmp_offload_enable@ +abi_optim_flavor = @abi_optim_flavor@ +abi_python_invocation_enable = @abi_python_invocation_enable@ +abi_source_debug_enable = @abi_source_debug_enable@ +abi_stdin_enable = @abi_stdin_enable@ +abi_sys_spec = @abi_sys_spec@ +abi_timer_enable = @abi_timer_enable@ +abi_triqs_v1_4_enable = @abi_triqs_v1_4_enable@ +abi_triqs_v2_0_enable = @abi_triqs_v2_0_enable@ +abi_zdot_bugfix_enable = @abi_zdot_bugfix_enable@ +abinit_bindir = @abinit_bindir@ +abinit_builddir = @abinit_builddir@ +abinit_chkdir = @abinit_chkdir@ +abinit_datdir = @abinit_datdir@ +abinit_docdir = @abinit_docdir@ +abinit_incdir = @abinit_incdir@ +abinit_libdir = @abinit_libdir@ +abinit_mandir = @abinit_mandir@ +abinit_prefix = @abinit_prefix@ +abinit_srcdir = @abinit_srcdir@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_FC = @ac_ct_FC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cc_info_string = @cc_info_string@ +cxx_info_string = @cxx_info_string@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +enable_avx_safe_mode = @enable_avx_safe_mode@ +enable_bse_unpacked = @enable_bse_unpacked@ +enable_cclock = @enable_cclock@ +enable_crpa_optim = @enable_crpa_optim@ +enable_exports = @enable_exports@ +enable_fc_wrapper = @enable_fc_wrapper@ +enable_gw_dpc = @enable_gw_dpc@ +enable_hints = @enable_hints@ +enable_libtetra = @enable_libtetra@ +enable_lotf = @enable_lotf@ +enable_memory_profiling = @enable_memory_profiling@ +enable_mpi_gpu_aware = @enable_mpi_gpu_aware@ +enable_mpi_inplace = @enable_mpi_inplace@ +enable_mpi_interfaces_bugfix = @enable_mpi_interfaces_bugfix@ +enable_mpi_io = @enable_mpi_io@ +enable_mpi_io_default = @enable_mpi_io_default@ +enable_netcdf_default = @enable_netcdf_default@ +enable_openmp = @enable_openmp@ +enable_openmp_offload = @enable_openmp_offload@ +enable_python_invocation = @enable_python_invocation@ +enable_shared = @enable_shared@ +enable_source_debug = @enable_source_debug@ +enable_static = @enable_static@ +enable_stdin = @enable_stdin@ +enable_timer = @enable_timer@ +enable_triqs_v1_4 = @enable_triqs_v1_4@ +enable_triqs_v2_0 = @enable_triqs_v2_0@ +enable_zdot_bugfix = @enable_zdot_bugfix@ +exec_prefix = @exec_prefix@ +fc_info_string = @fc_info_string@ +fc_mod_fcflags = @fc_mod_fcflags@ +fc_timing = @fc_timing@ +fcflags_opt_02_clib = @fcflags_opt_02_clib@ +fcflags_opt_10_defs = @fcflags_opt_10_defs@ +fcflags_opt_11_memory_mpi = @fcflags_opt_11_memory_mpi@ +fcflags_opt_12_hide_mpi = @fcflags_opt_12_hide_mpi@ +fcflags_opt_14_hidewrite = @fcflags_opt_14_hidewrite@ +fcflags_opt_16_hideleave = @fcflags_opt_16_hideleave@ +fcflags_opt_16_kokkos_toolbox = @fcflags_opt_16_kokkos_toolbox@ +fcflags_opt_17_gpu_toolbox = @fcflags_opt_17_gpu_toolbox@ +fcflags_opt_17_libtetra_ext = @fcflags_opt_17_libtetra_ext@ +fcflags_opt_17_minimax = @fcflags_opt_17_minimax@ +fcflags_opt_17_yaml_out = @fcflags_opt_17_yaml_out@ +fcflags_opt_18_timing = @fcflags_opt_18_timing@ +fcflags_opt_21_hashfuncs = @fcflags_opt_21_hashfuncs@ +fcflags_opt_27_toolbox_oop = @fcflags_opt_27_toolbox_oop@ +fcflags_opt_28_numeric_noabirule = @fcflags_opt_28_numeric_noabirule@ +fcflags_opt_29_kpoints = @fcflags_opt_29_kpoints@ +fcflags_opt_32_util = @fcflags_opt_32_util@ +fcflags_opt_33_xc_lowlevel = @fcflags_opt_33_xc_lowlevel@ +fcflags_opt_39_libpaw = @fcflags_opt_39_libpaw@ +fcflags_opt_41_geometry = @fcflags_opt_41_geometry@ +fcflags_opt_42_nlstrain = @fcflags_opt_42_nlstrain@ +fcflags_opt_42_parser = @fcflags_opt_42_parser@ +fcflags_opt_43_ptgroups = @fcflags_opt_43_ptgroups@ +fcflags_opt_43_wvl_wrappers = @fcflags_opt_43_wvl_wrappers@ +fcflags_opt_44_abitools = @fcflags_opt_44_abitools@ +fcflags_opt_44_abitypes_defs = @fcflags_opt_44_abitypes_defs@ +fcflags_opt_44_manage_kokkos = @fcflags_opt_44_manage_kokkos@ +fcflags_opt_45_geomoptim = @fcflags_opt_45_geomoptim@ +fcflags_opt_45_xgTools = @fcflags_opt_45_xgTools@ +fcflags_opt_46_ghc_omp = @fcflags_opt_46_ghc_omp@ +fcflags_opt_46_manage_cuda = @fcflags_opt_46_manage_cuda@ +fcflags_opt_48_diago = @fcflags_opt_48_diago@ +fcflags_opt_49_gw_toolbox_oop = @fcflags_opt_49_gw_toolbox_oop@ +fcflags_opt_51_manage_mpi = @fcflags_opt_51_manage_mpi@ +fcflags_opt_52_fft_mpi_noabirule = @fcflags_opt_52_fft_mpi_noabirule@ +fcflags_opt_53_ffts = @fcflags_opt_53_ffts@ +fcflags_opt_54_spacepar = @fcflags_opt_54_spacepar@ +fcflags_opt_55_abiutil = @fcflags_opt_55_abiutil@ +fcflags_opt_56_io_mpi = @fcflags_opt_56_io_mpi@ +fcflags_opt_56_mixing = @fcflags_opt_56_mixing@ +fcflags_opt_56_recipspace = @fcflags_opt_56_recipspace@ +fcflags_opt_56_xc = @fcflags_opt_56_xc@ +fcflags_opt_57_iopsp_parser = @fcflags_opt_57_iopsp_parser@ +fcflags_opt_57_iovars = @fcflags_opt_57_iovars@ +fcflags_opt_61_occeig = @fcflags_opt_61_occeig@ +fcflags_opt_62_cg_noabirule = @fcflags_opt_62_cg_noabirule@ +fcflags_opt_62_ctqmc = @fcflags_opt_62_ctqmc@ +fcflags_opt_62_iowfdenpot = @fcflags_opt_62_iowfdenpot@ +fcflags_opt_62_poisson = @fcflags_opt_62_poisson@ +fcflags_opt_62_wvl_wfs = @fcflags_opt_62_wvl_wfs@ +fcflags_opt_64_psp = @fcflags_opt_64_psp@ +fcflags_opt_65_lotf_base = @fcflags_opt_65_lotf_base@ +fcflags_opt_65_paw = @fcflags_opt_65_paw@ +fcflags_opt_66_nonlocal = @fcflags_opt_66_nonlocal@ +fcflags_opt_66_vdwxc = @fcflags_opt_66_vdwxc@ +fcflags_opt_66_wfs = @fcflags_opt_66_wfs@ +fcflags_opt_67_common = @fcflags_opt_67_common@ +fcflags_opt_67_python_invocation_ext = @fcflags_opt_67_python_invocation_ext@ +fcflags_opt_67_triqs_ext = @fcflags_opt_67_triqs_ext@ +fcflags_opt_68_dmft = @fcflags_opt_68_dmft@ +fcflags_opt_68_lotf = @fcflags_opt_68_lotf@ +fcflags_opt_68_recursion = @fcflags_opt_68_recursion@ +fcflags_opt_68_rsprc = @fcflags_opt_68_rsprc@ +fcflags_opt_69_wfdesc = @fcflags_opt_69_wfdesc@ +fcflags_opt_70_gw = @fcflags_opt_70_gw@ +fcflags_opt_71_bse = @fcflags_opt_71_bse@ +fcflags_opt_71_wannier = @fcflags_opt_71_wannier@ +fcflags_opt_72_response = @fcflags_opt_72_response@ +fcflags_opt_77_ddb = @fcflags_opt_77_ddb@ +fcflags_opt_77_suscep = @fcflags_opt_77_suscep@ +fcflags_opt_78_effpot = @fcflags_opt_78_effpot@ +fcflags_opt_78_eph = @fcflags_opt_78_eph@ +fcflags_opt_79_seqpar_mpi = @fcflags_opt_79_seqpar_mpi@ +fcflags_opt_80_rttddft = @fcflags_opt_80_rttddft@ +fcflags_opt_80_tdep = @fcflags_opt_80_tdep@ +fcflags_opt_94_scfcv = @fcflags_opt_94_scfcv@ +fcflags_opt_95_drive = @fcflags_opt_95_drive@ +fcflags_opt_98_main = @fcflags_opt_98_main@ +fcflags_opt_bigdft = @fcflags_opt_bigdft@ +fcflags_opt_default = @fcflags_opt_default@ +fcflags_opt_hdf5 = @fcflags_opt_hdf5@ +fcflags_opt_levmar = @fcflags_opt_levmar@ +fcflags_opt_libpsml = @fcflags_opt_libpsml@ +fcflags_opt_libxc = @fcflags_opt_libxc@ +fcflags_opt_libxml2 = @fcflags_opt_libxml2@ +fcflags_opt_linalg = @fcflags_opt_linalg@ +fcflags_opt_netcdf = @fcflags_opt_netcdf@ +fcflags_opt_netcdf_fortran = @fcflags_opt_netcdf_fortran@ +fcflags_opt_papi = @fcflags_opt_papi@ +fcflags_opt_triqs = @fcflags_opt_triqs@ +fcflags_opt_wannier90 = @fcflags_opt_wannier90@ +fcflags_opt_xmlf90 = @fcflags_opt_xmlf90@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sd_abinit_common_cppflags = @sd_abinit_common_cppflags@ +sd_abinit_common_enable = @sd_abinit_common_enable@ +sd_abinit_common_enable_def = @sd_abinit_common_enable_def@ +sd_abinit_common_fcflags = @sd_abinit_common_fcflags@ +sd_abinit_common_init = @sd_abinit_common_init@ +sd_abinit_common_ldflags = @sd_abinit_common_ldflags@ +sd_abinit_common_libs = @sd_abinit_common_libs@ +sd_abinit_common_ok = @sd_abinit_common_ok@ +sd_abinit_common_options = @sd_abinit_common_options@ +sd_abinit_common_policy = @sd_abinit_common_policy@ +sd_abinit_common_status = @sd_abinit_common_status@ +sd_bigdft_cppflags = @sd_bigdft_cppflags@ +sd_bigdft_enable = @sd_bigdft_enable@ +sd_bigdft_enable_def = @sd_bigdft_enable_def@ +sd_bigdft_fcflags = @sd_bigdft_fcflags@ +sd_bigdft_init = @sd_bigdft_init@ +sd_bigdft_ldflags = @sd_bigdft_ldflags@ +sd_bigdft_libs = @sd_bigdft_libs@ +sd_bigdft_ok = @sd_bigdft_ok@ +sd_bigdft_options = @sd_bigdft_options@ +sd_bigdft_policy = @sd_bigdft_policy@ +sd_bigdft_status = @sd_bigdft_status@ +sd_fft_cflags = @sd_fft_cflags@ +sd_fft_choices = @sd_fft_choices@ +sd_fft_cppflags = @sd_fft_cppflags@ +sd_fft_cxxflags = @sd_fft_cxxflags@ +sd_fft_enable = @sd_fft_enable@ +sd_fft_fcflags = @sd_fft_fcflags@ +sd_fft_flavor = @sd_fft_flavor@ +sd_fft_init = @sd_fft_init@ +sd_fft_ldflags = @sd_fft_ldflags@ +sd_fft_libs = @sd_fft_libs@ +sd_fft_ok = @sd_fft_ok@ +sd_fftw3_cflags = @sd_fftw3_cflags@ +sd_fftw3_cppflags = @sd_fftw3_cppflags@ +sd_fftw3_enable = @sd_fftw3_enable@ +sd_fftw3_enable_def = @sd_fftw3_enable_def@ +sd_fftw3_fcflags = @sd_fftw3_fcflags@ +sd_fftw3_init = @sd_fftw3_init@ +sd_fftw3_ldflags = @sd_fftw3_ldflags@ +sd_fftw3_libs = @sd_fftw3_libs@ +sd_fftw3_ok = @sd_fftw3_ok@ +sd_fftw3_options = @sd_fftw3_options@ +sd_fftw3_policy = @sd_fftw3_policy@ +sd_fftw3_status = @sd_fftw3_status@ +sd_gpu_cflags = @sd_gpu_cflags@ +sd_gpu_cppflags = @sd_gpu_cppflags@ +sd_gpu_cxxflags = @sd_gpu_cxxflags@ +sd_gpu_enable = @sd_gpu_enable@ +sd_gpu_enable_def = @sd_gpu_enable_def@ +sd_gpu_fcflags = @sd_gpu_fcflags@ +sd_gpu_init = @sd_gpu_init@ +sd_gpu_ldflags = @sd_gpu_ldflags@ +sd_gpu_libs = @sd_gpu_libs@ +sd_gpu_ok = @sd_gpu_ok@ +sd_gpu_options = @sd_gpu_options@ +sd_gpu_policy = @sd_gpu_policy@ +sd_gpu_prefix = @sd_gpu_prefix@ +sd_gpu_status = @sd_gpu_status@ +sd_hdf5_cflags = @sd_hdf5_cflags@ +sd_hdf5_cppflags = @sd_hdf5_cppflags@ +sd_hdf5_cxxflags = @sd_hdf5_cxxflags@ +sd_hdf5_enable = @sd_hdf5_enable@ +sd_hdf5_enable_def = @sd_hdf5_enable_def@ +sd_hdf5_enable_fc = @sd_hdf5_enable_fc@ +sd_hdf5_fcflags = @sd_hdf5_fcflags@ +sd_hdf5_h5cc = @sd_hdf5_h5cc@ +sd_hdf5_h5fc = @sd_hdf5_h5fc@ +sd_hdf5_init = @sd_hdf5_init@ +sd_hdf5_ldflags = @sd_hdf5_ldflags@ +sd_hdf5_libs = @sd_hdf5_libs@ +sd_hdf5_ok = @sd_hdf5_ok@ +sd_hdf5_options = @sd_hdf5_options@ +sd_hdf5_policy = @sd_hdf5_policy@ +sd_hdf5_status = @sd_hdf5_status@ +sd_kokkos_cppflags = @sd_kokkos_cppflags@ +sd_kokkos_cxxflags = @sd_kokkos_cxxflags@ +sd_kokkos_enable = @sd_kokkos_enable@ +sd_kokkos_enable_def = @sd_kokkos_enable_def@ +sd_kokkos_init = @sd_kokkos_init@ +sd_kokkos_ldflags = @sd_kokkos_ldflags@ +sd_kokkos_libs = @sd_kokkos_libs@ +sd_kokkos_ok = @sd_kokkos_ok@ +sd_kokkos_options = @sd_kokkos_options@ +sd_kokkos_policy = @sd_kokkos_policy@ +sd_kokkos_status = @sd_kokkos_status@ +sd_levmar_cflags = @sd_levmar_cflags@ +sd_levmar_cppflags = @sd_levmar_cppflags@ +sd_levmar_enable = @sd_levmar_enable@ +sd_levmar_enable_def = @sd_levmar_enable_def@ +sd_levmar_init = @sd_levmar_init@ +sd_levmar_ldflags = @sd_levmar_ldflags@ +sd_levmar_libs = @sd_levmar_libs@ +sd_levmar_ok = @sd_levmar_ok@ +sd_levmar_options = @sd_levmar_options@ +sd_levmar_policy = @sd_levmar_policy@ +sd_levmar_status = @sd_levmar_status@ +sd_libpaw_cppflags = @sd_libpaw_cppflags@ +sd_libpaw_enable = @sd_libpaw_enable@ +sd_libpaw_enable_def = @sd_libpaw_enable_def@ +sd_libpaw_fcflags = @sd_libpaw_fcflags@ +sd_libpaw_init = @sd_libpaw_init@ +sd_libpaw_ldflags = @sd_libpaw_ldflags@ +sd_libpaw_libs = @sd_libpaw_libs@ +sd_libpaw_ok = @sd_libpaw_ok@ +sd_libpaw_options = @sd_libpaw_options@ +sd_libpaw_policy = @sd_libpaw_policy@ +sd_libpaw_status = @sd_libpaw_status@ +sd_libpsml_cppflags = @sd_libpsml_cppflags@ +sd_libpsml_enable = @sd_libpsml_enable@ +sd_libpsml_enable_def = @sd_libpsml_enable_def@ +sd_libpsml_fcflags = @sd_libpsml_fcflags@ +sd_libpsml_init = @sd_libpsml_init@ +sd_libpsml_ldflags = @sd_libpsml_ldflags@ +sd_libpsml_libs = @sd_libpsml_libs@ +sd_libpsml_ok = @sd_libpsml_ok@ +sd_libpsml_options = @sd_libpsml_options@ +sd_libpsml_policy = @sd_libpsml_policy@ +sd_libpsml_status = @sd_libpsml_status@ +sd_libxc_cflags = @sd_libxc_cflags@ +sd_libxc_cppflags = @sd_libxc_cppflags@ +sd_libxc_enable = @sd_libxc_enable@ +sd_libxc_enable_def = @sd_libxc_enable_def@ +sd_libxc_enable_fc = @sd_libxc_enable_fc@ +sd_libxc_fcflags = @sd_libxc_fcflags@ +sd_libxc_init = @sd_libxc_init@ +sd_libxc_ldflags = @sd_libxc_ldflags@ +sd_libxc_libs = @sd_libxc_libs@ +sd_libxc_ok = @sd_libxc_ok@ +sd_libxc_options = @sd_libxc_options@ +sd_libxc_policy = @sd_libxc_policy@ +sd_libxc_status = @sd_libxc_status@ +sd_linalg_cflags = @sd_linalg_cflags@ +sd_linalg_choices = @sd_linalg_choices@ +sd_linalg_cppflags = @sd_linalg_cppflags@ +sd_linalg_cxxflags = @sd_linalg_cxxflags@ +sd_linalg_enable = @sd_linalg_enable@ +sd_linalg_fcflags = @sd_linalg_fcflags@ +sd_linalg_flavor = @sd_linalg_flavor@ +sd_linalg_has_elpa = @sd_linalg_has_elpa@ +sd_linalg_has_scalapack = @sd_linalg_has_scalapack@ +sd_linalg_init = @sd_linalg_init@ +sd_linalg_ldflags = @sd_linalg_ldflags@ +sd_linalg_libs = @sd_linalg_libs@ +sd_linalg_ok = @sd_linalg_ok@ +sd_mpi_cc = @sd_mpi_cc@ +sd_mpi_cflags = @sd_mpi_cflags@ +sd_mpi_cppflags = @sd_mpi_cppflags@ +sd_mpi_cxx = @sd_mpi_cxx@ +sd_mpi_enable = @sd_mpi_enable@ +sd_mpi_enable_cxx = @sd_mpi_enable_cxx@ +sd_mpi_enable_def = @sd_mpi_enable_def@ +sd_mpi_enable_fc = @sd_mpi_enable_fc@ +sd_mpi_fc = @sd_mpi_fc@ +sd_mpi_fcflags = @sd_mpi_fcflags@ +sd_mpi_init = @sd_mpi_init@ +sd_mpi_ldflags = @sd_mpi_ldflags@ +sd_mpi_libs = @sd_mpi_libs@ +sd_mpi_ok = @sd_mpi_ok@ +sd_mpi_options = @sd_mpi_options@ +sd_mpi_policy = @sd_mpi_policy@ +sd_mpi_status = @sd_mpi_status@ +sd_netcdf_cflags = @sd_netcdf_cflags@ +sd_netcdf_cppflags = @sd_netcdf_cppflags@ +sd_netcdf_enable = @sd_netcdf_enable@ +sd_netcdf_enable_def = @sd_netcdf_enable_def@ +sd_netcdf_fcflags = @sd_netcdf_fcflags@ +sd_netcdf_fortran_cflags = @sd_netcdf_fortran_cflags@ +sd_netcdf_fortran_cppflags = @sd_netcdf_fortran_cppflags@ +sd_netcdf_fortran_enable = @sd_netcdf_fortran_enable@ +sd_netcdf_fortran_enable_def = @sd_netcdf_fortran_enable_def@ +sd_netcdf_fortran_fcflags = @sd_netcdf_fortran_fcflags@ +sd_netcdf_fortran_init = @sd_netcdf_fortran_init@ +sd_netcdf_fortran_ldflags = @sd_netcdf_fortran_ldflags@ +sd_netcdf_fortran_libs = @sd_netcdf_fortran_libs@ +sd_netcdf_fortran_ok = @sd_netcdf_fortran_ok@ +sd_netcdf_fortran_options = @sd_netcdf_fortran_options@ +sd_netcdf_fortran_policy = @sd_netcdf_fortran_policy@ +sd_netcdf_fortran_status = @sd_netcdf_fortran_status@ +sd_netcdf_init = @sd_netcdf_init@ +sd_netcdf_ldflags = @sd_netcdf_ldflags@ +sd_netcdf_libs = @sd_netcdf_libs@ +sd_netcdf_ok = @sd_netcdf_ok@ +sd_netcdf_options = @sd_netcdf_options@ +sd_netcdf_policy = @sd_netcdf_policy@ +sd_netcdf_status = @sd_netcdf_status@ +sd_papi_cflags = @sd_papi_cflags@ +sd_papi_cppflags = @sd_papi_cppflags@ +sd_papi_enable = @sd_papi_enable@ +sd_papi_enable_def = @sd_papi_enable_def@ +sd_papi_init = @sd_papi_init@ +sd_papi_ldflags = @sd_papi_ldflags@ +sd_papi_libs = @sd_papi_libs@ +sd_papi_ok = @sd_papi_ok@ +sd_papi_options = @sd_papi_options@ +sd_papi_policy = @sd_papi_policy@ +sd_papi_sd_papi_fcflags = @sd_papi_sd_papi_fcflags@ +sd_papi_status = @sd_papi_status@ +sd_pfft_cflags = @sd_pfft_cflags@ +sd_pfft_cppflags = @sd_pfft_cppflags@ +sd_pfft_enable = @sd_pfft_enable@ +sd_pfft_enable_def = @sd_pfft_enable_def@ +sd_pfft_init = @sd_pfft_init@ +sd_pfft_ldflags = @sd_pfft_ldflags@ +sd_pfft_libs = @sd_pfft_libs@ +sd_pfft_ok = @sd_pfft_ok@ +sd_pfft_options = @sd_pfft_options@ +sd_pfft_policy = @sd_pfft_policy@ +sd_pfft_status = @sd_pfft_status@ +sd_sys_fcflags = @sd_sys_fcflags@ +sd_triqs_cflags = @sd_triqs_cflags@ +sd_triqs_cppflags = @sd_triqs_cppflags@ +sd_triqs_cxxflags = @sd_triqs_cxxflags@ +sd_triqs_enable = @sd_triqs_enable@ +sd_triqs_enable_def = @sd_triqs_enable_def@ +sd_triqs_fcflags = @sd_triqs_fcflags@ +sd_triqs_init = @sd_triqs_init@ +sd_triqs_ldflags = @sd_triqs_ldflags@ +sd_triqs_libs = @sd_triqs_libs@ +sd_triqs_ok = @sd_triqs_ok@ +sd_triqs_options = @sd_triqs_options@ +sd_triqs_policy = @sd_triqs_policy@ +sd_triqs_status = @sd_triqs_status@ +sd_wannier90_cppflags = @sd_wannier90_cppflags@ +sd_wannier90_enable = @sd_wannier90_enable@ +sd_wannier90_enable_def = @sd_wannier90_enable_def@ +sd_wannier90_fcflags = @sd_wannier90_fcflags@ +sd_wannier90_init = @sd_wannier90_init@ +sd_wannier90_ldflags = @sd_wannier90_ldflags@ +sd_wannier90_libs = @sd_wannier90_libs@ +sd_wannier90_ok = @sd_wannier90_ok@ +sd_wannier90_options = @sd_wannier90_options@ +sd_wannier90_policy = @sd_wannier90_policy@ +sd_wannier90_status = @sd_wannier90_status@ +sd_xmlf90_cppflags = @sd_xmlf90_cppflags@ +sd_xmlf90_enable = @sd_xmlf90_enable@ +sd_xmlf90_enable_def = @sd_xmlf90_enable_def@ +sd_xmlf90_fcflags = @sd_xmlf90_fcflags@ +sd_xmlf90_init = @sd_xmlf90_init@ +sd_xmlf90_ldflags = @sd_xmlf90_ldflags@ +sd_xmlf90_libs = @sd_xmlf90_libs@ +sd_xmlf90_ok = @sd_xmlf90_ok@ +sd_xmlf90_options = @sd_xmlf90_options@ +sd_xmlf90_policy = @sd_xmlf90_policy@ +sd_xmlf90_status = @sd_xmlf90_status@ +sd_yakl_cppflags = @sd_yakl_cppflags@ +sd_yakl_enable = @sd_yakl_enable@ +sd_yakl_enable_def = @sd_yakl_enable_def@ +sd_yakl_fcflags = @sd_yakl_fcflags@ +sd_yakl_init = @sd_yakl_init@ +sd_yakl_ldflags = @sd_yakl_ldflags@ +sd_yakl_libs = @sd_yakl_libs@ +sd_yakl_ok = @sd_yakl_ok@ +sd_yakl_options = @sd_yakl_options@ +sd_yakl_policy = @sd_yakl_policy@ +sd_yakl_status = @sd_yakl_status@ +sharedstatedir = @sharedstatedir@ +src_02_clib_fcflags = @src_02_clib_fcflags@ +src_10_defs_fcflags = @src_10_defs_fcflags@ +src_11_memory_mpi_fcflags = @src_11_memory_mpi_fcflags@ +src_12_hide_mpi_fcflags = @src_12_hide_mpi_fcflags@ +src_14_hidewrite_fcflags = @src_14_hidewrite_fcflags@ +src_16_hideleave_fcflags = @src_16_hideleave_fcflags@ +src_16_kokkos_toolbox_fcflags = @src_16_kokkos_toolbox_fcflags@ +src_17_gpu_toolbox_fcflags = @src_17_gpu_toolbox_fcflags@ +src_17_libtetra_ext_fcflags = @src_17_libtetra_ext_fcflags@ +src_17_minimax_fcflags = @src_17_minimax_fcflags@ +src_17_yaml_out_fcflags = @src_17_yaml_out_fcflags@ +src_18_timing_fcflags = @src_18_timing_fcflags@ +src_21_hashfuncs_fcflags = @src_21_hashfuncs_fcflags@ +src_27_toolbox_oop_fcflags = @src_27_toolbox_oop_fcflags@ +src_28_numeric_noabirule_fcflags = @src_28_numeric_noabirule_fcflags@ +src_29_kpoints_fcflags = @src_29_kpoints_fcflags@ +src_32_util_fcflags = @src_32_util_fcflags@ +src_33_xc_lowlevel_fcflags = @src_33_xc_lowlevel_fcflags@ +src_39_libpaw_fcflags = @src_39_libpaw_fcflags@ +src_41_geometry_fcflags = @src_41_geometry_fcflags@ +src_42_nlstrain_fcflags = @src_42_nlstrain_fcflags@ +src_42_parser_fcflags = @src_42_parser_fcflags@ +src_43_ptgroups_fcflags = @src_43_ptgroups_fcflags@ +src_43_wvl_wrappers_fcflags = @src_43_wvl_wrappers_fcflags@ +src_44_abitools_fcflags = @src_44_abitools_fcflags@ +src_44_abitypes_defs_fcflags = @src_44_abitypes_defs_fcflags@ +src_44_manage_kokkos_fcflags = @src_44_manage_kokkos_fcflags@ +src_45_geomoptim_fcflags = @src_45_geomoptim_fcflags@ +src_45_xgTools_fcflags = @src_45_xgTools_fcflags@ +src_46_ghc_omp_fcflags = @src_46_ghc_omp_fcflags@ +src_46_manage_cuda_fcflags = @src_46_manage_cuda_fcflags@ +src_48_diago_fcflags = @src_48_diago_fcflags@ +src_49_gw_toolbox_oop_fcflags = @src_49_gw_toolbox_oop_fcflags@ +src_51_manage_mpi_fcflags = @src_51_manage_mpi_fcflags@ +src_52_fft_mpi_noabirule_fcflags = @src_52_fft_mpi_noabirule_fcflags@ +src_53_ffts_fcflags = @src_53_ffts_fcflags@ +src_54_spacepar_fcflags = @src_54_spacepar_fcflags@ +src_55_abiutil_fcflags = @src_55_abiutil_fcflags@ +src_56_io_mpi_fcflags = @src_56_io_mpi_fcflags@ +src_56_mixing_fcflags = @src_56_mixing_fcflags@ +src_56_recipspace_fcflags = @src_56_recipspace_fcflags@ +src_56_xc_fcflags = @src_56_xc_fcflags@ +src_57_iopsp_parser_fcflags = @src_57_iopsp_parser_fcflags@ +src_57_iovars_fcflags = @src_57_iovars_fcflags@ +src_61_occeig_fcflags = @src_61_occeig_fcflags@ +src_62_cg_noabirule_fcflags = @src_62_cg_noabirule_fcflags@ +src_62_ctqmc_fcflags = @src_62_ctqmc_fcflags@ +src_62_iowfdenpot_fcflags = @src_62_iowfdenpot_fcflags@ +src_62_poisson_fcflags = @src_62_poisson_fcflags@ +src_62_wvl_wfs_fcflags = @src_62_wvl_wfs_fcflags@ +src_64_psp_fcflags = @src_64_psp_fcflags@ +src_65_lotf_base_fcflags = @src_65_lotf_base_fcflags@ +src_65_paw_fcflags = @src_65_paw_fcflags@ +src_66_nonlocal_fcflags = @src_66_nonlocal_fcflags@ +src_66_vdwxc_fcflags = @src_66_vdwxc_fcflags@ +src_66_wfs_fcflags = @src_66_wfs_fcflags@ +src_67_common_fcflags = @src_67_common_fcflags@ +src_67_python_invocation_ext_fcflags = @src_67_python_invocation_ext_fcflags@ +src_67_triqs_ext_fcflags = @src_67_triqs_ext_fcflags@ +src_68_dmft_fcflags = @src_68_dmft_fcflags@ +src_68_lotf_fcflags = @src_68_lotf_fcflags@ +src_68_recursion_fcflags = @src_68_recursion_fcflags@ +src_68_rsprc_fcflags = @src_68_rsprc_fcflags@ +src_69_wfdesc_fcflags = @src_69_wfdesc_fcflags@ +src_70_gw_fcflags = @src_70_gw_fcflags@ +src_71_bse_fcflags = @src_71_bse_fcflags@ +src_71_wannier_fcflags = @src_71_wannier_fcflags@ +src_72_response_fcflags = @src_72_response_fcflags@ +src_77_ddb_fcflags = @src_77_ddb_fcflags@ +src_77_suscep_fcflags = @src_77_suscep_fcflags@ +src_78_effpot_fcflags = @src_78_effpot_fcflags@ +src_78_eph_fcflags = @src_78_eph_fcflags@ +src_79_seqpar_mpi_fcflags = @src_79_seqpar_mpi_fcflags@ +src_80_rttddft_fcflags = @src_80_rttddft_fcflags@ +src_80_tdep_fcflags = @src_80_tdep_fcflags@ +src_94_scfcv_fcflags = @src_94_scfcv_fcflags@ +src_95_drive_fcflags = @src_95_drive_fcflags@ +src_common_fcflags = @src_common_fcflags@ +src_core_fcflags = @src_core_fcflags@ +src_libpaw_fcflags = @src_libpaw_fcflags@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +with_abinit_common = @with_abinit_common@ +with_bigdft = @with_bigdft@ +with_config_file = @with_config_file@ +with_debug_flavor = @with_debug_flavor@ +with_fallbacks = @with_fallbacks@ +with_fc_vendor = @with_fc_vendor@ +with_fc_version = @with_fc_version@ +with_fft_flavor = @with_fft_flavor@ +with_fftw3 = @with_fftw3@ +with_gnu_ld = @with_gnu_ld@ +with_gpu = @with_gpu@ +with_hdf5 = @with_hdf5@ +with_kokkos = @with_kokkos@ +with_levmar = @with_levmar@ +with_libpaw = @with_libpaw@ +with_libpsml = @with_libpsml@ +with_libxc = @with_libxc@ +with_libxml2 = @with_libxml2@ +with_linalg_flavor = @with_linalg_flavor@ +with_mpi = @with_mpi@ +with_mpi_level = @with_mpi_level@ +with_netcdf = @with_netcdf@ +with_optim_flavor = @with_optim_flavor@ +with_papi = @with_papi@ +with_pfft = @with_pfft@ +with_triqs = @with_triqs@ +with_wannier90 = @with_wannier90@ +with_xmlf90 = @with_xmlf90@ +with_yakl = @with_yakl@ +SUBDIRS = src +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu shared/common/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu shared/common/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +# This directory's subdirectories are mostly independent; you can cd +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(am__recursive_targets) install-am install-strip + +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ + check-am clean clean-generic cscopelist-am ctags ctags-am \ + distclean distclean-generic distclean-tags distdir dvi dvi-am \ + html html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ + pdf-am ps ps-am tags tags-am uninstall uninstall-am + +.PRECIOUS: Makefile + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/GX-PAW/common/NEWS b/GX-PAW/common/NEWS new file mode 100644 index 00000000..eac67be2 --- /dev/null +++ b/GX-PAW/common/NEWS @@ -0,0 +1,291 @@ +Latest news +=========== + +User-visible changes +-------------------- + +### Main binaries of Abinit ### + +When building Abinit 6, the greatest difference with respect to Abinit 5 +is that only one flavour of the "abinit" main binary will be built at +once. The former "abinis" and "abinip" flavours have been replaced by +wrapper scripts which will work only after a "make install" has been +performed. These wrappers have been made available to facilitate the +transition and will be removed in version 6.1 or 6.2. + +More precisely, this means that all occurences of "abinis" and "abinip" +in calculation scripts will have to be replaced by calls to "abinit", or +by symbolic links. If you wish however to continue using concurrently a +serial and a parallel version of Abinit, you'll have to build them +separately. In order to easily distinguish them at install-time, you may +use the "--with-program-suffix" option of the configure script. + +This change was necessary to be able to run the whole test suite on any +flavour of Abinit (e.g. with MPI, ScaLAPACK, or FFTW support), and to +make the management of the Fortran modules possible. The main results +are an increased modularity of the source code, an improved robustness, +and an earlier detection of bugs and design flaws. + + + +### Parallel builds ### + +It is now possible to build Abinit in parallel - with "make -j" - +using an arbitrary value of "". Tests have been performed up to 16 +processors, resulting in the very good speed-up factor of 15.1. This is +particularly important on architectures where the build is slow, e.g. +Itaniums with the Intel Fortran compiler. + +Parallel builds will nevertheless work for the core source of Abinit +only. Convenience targets are thus provided to work around the +limitations of the plugins: "multi" and "mj4". It is possible to tune +the number of processors for "multi" by specifying e.g.: + + make multi multi_nprocs=16 + +on the command-line. For mj4, which is mainly used for automatic builds, +the number of processors is fixed to 4. + + + +### Test suite ### + +Several improvements have been done to the test suite, in order to +better support the various situations it can be used within. In +particular, "make check" now properly succeeds when all tests pass. + + + +### Install ### + +The install prefix of Abinit is now fully left to the user's choice. The +build system will not try anymore to add further prefixes, such as +version numbers. This change greatly improves the flexibility of the +install procedure and was long-awaited by packagers. + + + +### MPI ### + +MPI support in Abinit has been thoroughly cleaned-up, plus made more +robust and more consistent. The build system is also much stricter about +the way options can be specified. + +At configure-time, the build system now behaves the following way: + + * if no option is given, the build system will take the decision + whether to enable MPI depending on the build environment; the + parallel code will be built if MPI-capable C and Fortran compilers + are found, as well as a working MPI runner; + + * if --enable-mpi is specified, the build system will activate the + build of the parallel code, regardless of what has been detected; + it is supposed that the users know what they are doing (ahem!); + + * if --with-mpi-prefix is used, the build system will set the build + parameters according to what if finds in the specified directory; + in this case, manually setting the compilers or the MPI runner is + strictly forbidden. + + + +### XLF ### + +XLF is not wrapped anymore by the build system, which allows for a +finer-grained control of the build but may also cause some new problems. + +Please consult ~abinit/README.xlf for troubleshooting, and do not +hesitate to enhance this file with your successful tricks by sending +them to Yann Pouillon . + + + +### Config files ### + +The build system is now much less tolerant about obsolete options to the +configure script. Outdated config files will thus likely cause errors. + +Build examples (found in ~abinit/doc/build/config-examples), as well as +their template (~abinit/doc/build/config-template.ac9), have been +substantially modified, to match the changes in the build system. All +personal config files (usually found in ~/.abinit/build/) should be +updated using this material as reference. + + + +Developer-visible changes +------------------------- + +### Fortran modules ### + +All ".mod" files generated during the build of Abinit are now stored in +a separate directory, src/mods/. This strategy addresses several tricky +issues for the build system. In particular: + + * it is now much simpler to access them, since there is only one + directory to include; + + * it is much easier to clean them all, and check that they have + actually been removed. + +This option has however not been activated for the plugins, since their +respective build systems do not support this kind of trick. + + + +### Hand-written include files ### + +Hand-written include files, i.e. C headers at present, should be stored +in src/incs/ to be properly recognized by the build system. + +The "DBG_ASSERT" and "ABI_ASSERT" macros of abi_common.h have been +deactivated because they were not portable enough. They should be fixed +and improved. + + + +### Installable libraries ### + +The support for installable libraries, aka "exports", is still under +heavy development. Such libraries are built in src/libs/ when the +"--enable-exports" option of configure is used. + +For the moment, this feature is used to export Python bindings to the +Abinit parser, for use in other codes usch as V_Sim. Only GCC is +currently supported, and the full activation of this feature will +require the implementation of Libtool support into the build system. + +Please contact Yann Pouillon if you are +interested by this feature. + + + +### Compile flags ### + +The management of compile flags has undergone several improvements. They +include: + + * the complete separation of optimization and debug flags; + + * the enhancement of debug flags (many more warnings); + + * the creation of a specific flag category for tricks; + + * the ability to specify additional flags via environment variables, + i.e. "*FLAGS_EXTRA". + +The extra flags provide a significant additional flexibility, since they +do not short-circuit the build system auto-detection process, contrary +to the use of bare flags. For instance: + + FCFLAGS_EXTRA="-dummy_option" + +will be _appended_ to the compile flags set by the build system, while: + + FCFLAGS="-dummy_option" + +will _replace_ them. + +This way of doing is also meant to minimize the interferences between +the various steps of the configuration. + + + +### Python ### + +The proper detection of the Python environment is still under +development but has improved substanitially. More efforts will be +devoted to this part in the near future, and feature requests are now +welcome. Please send them to Yann Pouillon . + + + +### MPI ### + +MPI preprocessing options are not handled anymore through external +CPPFLAGS, but via the "config.h" include file. As a consequence, they +have been renamed from "MPI_*" to "HAVE_MPI_*". This is to keep in mind +when developing new parallel code. + +The confusing "--enable-mpi-io-buggy" option of configure has been +replaced by "--enable-mpi-io-test", for developers who want to check and +tune new MPI I/O related developments. It defines the HAVE_MPI_IO_TEST +macro, which should encapsulate such experimental code. + + + +Maintainer-visible changes +-------------------------- + +### M4 macros ### + +M4 macros have been refactored and strict naming conventions have been +adopted. See ~abinit/config/m4/ for details. + + + +### Makefiles ### + +The "defsinterfaces" target in config/makefiles/top.am has now +disappeared. It was previously required by the simultaneous build of the +serial and parallel libraries and has become completely useless. + + + +### Information for packagers ### + +The ~abinit/PACKAGING file contains essential information for packagers. +All maintainers of Abinit should feel free to improve and enhance this +file. + + + +### File naming conventions ### + +Legacies remaining from the prior use of TLA (an ancestor of the Bazaar +version control system) have all been removed. All incriminated files +have been renamed from ",,*" to "tmp-*". This is particularly visible in +the test suite. + +This change was necessary because the Autotools use commas as separators +for sed substitutions, which was resulting in spurious crashes of the +configure script under some circumstances. + + + +### Test suite ### + +The timeout utility used for nightly builds has been moved from +src/nightly/ to tests/Nightly/. + +The fldiff has been hacked to ignore extra output when MPI support is +activated. The absence of ripple effects should be checked carefully. + + + +### MPI ### + +Several binaries have had MPI support added, so that they can be tested +when the parallel code is built: anaddb, cut3d, lwf, mrgddb, mrgscr. +Though this should not affect developers, these changes should +only be considered temporary and a better solution provided. + + + +### Checker scripts ### + +The preprocessing option checker has been rewritten in Python and +re-targetted at finding forbidden options. It may be updated and +enhanced at will (see util/source/check-cpp-options.py). + +This script should be used on a more systematic basis, together with the +conflict marker checker (util/source/check-conflict-markers.py). + + + +Other news +---------- + +More news can be found in the [release-notes directory](https://docs.abinit.org/about/release-notes), +more specifically in the latest of the release_notes_v*.*. files. + diff --git a/GX-PAW/common/README b/GX-PAW/common/README new file mode 100644 index 00000000..871e3820 --- /dev/null +++ b/GX-PAW/common/README @@ -0,0 +1,32 @@ +README for ABINIT +================= + +ABINIT is an atomic-scale simulation software suite. + +Most of the relevant information can be found on the ABINIT [website](https://www.abinit.org) +and the [Forum](https://forum.abinit.org). + +Many documentation files can be found in the doc directory. +See the file [INSTALL](INSTALL) for generic compilation and installation instructions. +Please see the file [COPYING](COPYING) for copying conditions. + +## LICENSE + + Copyright (C) 2006-2024 ABINIT Group + + This file is part of ABINIT. + + 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 2, 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; see the file COPYING. If not, write to + the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. diff --git a/GX-PAW/common/README.md b/GX-PAW/common/README.md new file mode 100644 index 00000000..871e3820 --- /dev/null +++ b/GX-PAW/common/README.md @@ -0,0 +1,32 @@ +README for ABINIT +================= + +ABINIT is an atomic-scale simulation software suite. + +Most of the relevant information can be found on the ABINIT [website](https://www.abinit.org) +and the [Forum](https://forum.abinit.org). + +Many documentation files can be found in the doc directory. +See the file [INSTALL](INSTALL) for generic compilation and installation instructions. +Please see the file [COPYING](COPYING) for copying conditions. + +## LICENSE + + Copyright (C) 2006-2024 ABINIT Group + + This file is part of ABINIT. + + 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 2, 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; see the file COPYING. If not, write to + the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. diff --git a/GX-PAW/common/configure.ac b/GX-PAW/common/configure.ac new file mode 100644 index 00000000..1cd76c18 --- /dev/null +++ b/GX-PAW/common/configure.ac @@ -0,0 +1,660 @@ +# -*- Autoconf -*- +# +# Copyright (C) 2019-2024 ABINIT Group (Yann Pouillon) +# +# This file is part of the ABINIT software package. For license information, +# please see the COPYING file in the top-level directory of the ABINIT source +# distribution. +# + +# ---------------------------------------------------------------------------- # + +# +# IMPORTANT NOTE +# +# Please DO NOT EDIT this file unless you REALLY know what you are doing. +# Everything is important, in particular the order of the various commands +# executed here. YOU HAVE BEEN WARNED ! +# + +# ---------------------------------------------------------------------------- # + +# +# Autoconf & Automake startup +# + +# Initialize Autoconf +AC_PREREQ(2.59) +AC_INIT([ABINIT Common],[8.11.11], + [https://bugs.launchpad.net/abinit/], + [abinit-common]) +AC_REVISION([Autotools support for ABINIT Common]) +AC_CONFIG_AUX_DIR([config/gnu]) +AC_CONFIG_MACRO_DIR([config/m4]) +AC_CONFIG_SRCDIR([src/10_defs/defs_basis.F90]) +AC_CONFIG_HEADERS([config.h]) + +# Initial setup +AC_CANONICAL_TARGET + +# Disable pax to initialize Automake because it causes 'make dist' to fail +alias pax='/bin/false' +AM_INIT_AUTOMAKE([1.10 tar-ustar]) +unalias pax + +# Early ABINIT Common setup - the order is important! +ABI_INIT_DIRS +ABI_INIT_VERSION +ABI_INIT_CPU_INFO +ABI_INIT_OS_INFO +ABI_INIT_HEADER +ABI_INIT_ARCH + +# Check for common programs +AC_PROG_MAKE_SET +AC_PROG_INSTALL +AC_PROG_LN_S +AC_PROG_SED +AC_PROG_AWK +AC_PROG_GREP +AC_PATH_PROG(BOURNE_SHELL, sh, /bin/sh) +AC_PATH_PROG(MV, mv, /bin/false) +AC_PATH_PROG(PERL, perl, /bin/false) +AC_PATH_PROG(RM, rm, /bin/false) +AC_CHECK_PROGS(TAR, [tar gtar star]) + +# Workaround for the wrong path to install-sh on Mac systems +ABI_PROG_MKDIR_P + +# Look for a command that provide absolute paths +AC_CHECK_PROGS(REALPATH, [realpath readlink], [/bin/true]) +test "${REALPATH}" = "readlink" && REALPATH="${REALPATH} -f" + +# We might need a Python interpreter early on +ABI_PROG_PYTHON + +# Define command-line arguments +ABI_OPTIONS_DEFINE + +# Read config file and ensure that priorities are respected +ABI_ENV_BACKUP +ABI_OPTIONS_BACKUP +ABI_LOAD_OPTIONS +ABI_OPTIONS_CFG_TRANSFER +ABI_OPTIONS_RECALL +ABI_ENV_RECALL + +# Set still undefined options +ABI_OPTIONS_SETUP + +# Initialize environment, taking options into account +ABI_ENV_INIT + +AC_SUBST(CC_LDFLAGS) +AC_SUBST(CC_LIBS) +AC_SUBST(CXX_LDFLAGS) +AC_SUBST(CXX_LIBS) +AC_SUBST(FC_LDFLAGS) +AC_SUBST(FC_LIBS) + +# Initialize install dirs (requires version and config options to be set) +ABI_INIT_INSTALL_DIRS + +# Disable wrapping of Fortran compiler by default +abi_fc_wrap="no" + +# Save user-defined CPP +abi_cpp_user="${CPP}" + +# Set-up required information for core libraries +ABI_CORELIBS_INIT + +# Init Steredeg core features +SD_CORE_INIT + +# Prepare MPI support +ABI_MPI_INIT + +# GPU support requires MPI +if test "${abi_gpu_enable}" = "yes" -a "${abi_mpi_enable}" != "yes"; then + AC_MSG_ERROR([GPU support requires MPI]) +fi + +# Prepare GPU support +# Note: must be done after MPI +ABI_GPU_INIT + +# Set basic ABINIT Common C parameters +# Note: advanced fetaures are set later on +ABI_PROG_CC + +# Set basic ABINIT Common C++ parameters +# Note: advanced fetaures are set later on +ABI_PROG_CXX + +# Set basic ABINIT Common Fortran parameters +# Note: advanced fetaures are set later on +ABI_PROG_FC + +# Set default file extensions +ABI_FC_EXTENSIONS + +# Get module file case +ABI_FC_MOD_CASE + +# Determine Fortran-C name mangling scheme +AC_FC_WRAPPERS + +# The IBM Fortran compiler crashes if the mpi module is included +# more than once +if test "${abi_fc_vendor}" = "ibm" -a "${abi_mpi_enable}" = "yes"; then + AC_MSG_NOTICE([activating MPI workaround for the IBM Fortran compiler]) + AC_DEFINE([HAVE_MPI_INCLUDED_ONCE], 1, + [Define to 1 if you are using XLF.]) +fi + +# Wrap Fortran compiler calls if needed or requested +# Note: must be the last step of basic Fortran configuration +if test "${abi_fc_wrapper_enable}" = "yes"; then + abi_fc_wrap="yes" +fi + +# FIXME: obsolete mechanism +AC_SUBST(fc_mod_fcflags) + +# Look for a true C preprocessor +if test "${TRUE_CPP}" = ""; then + AC_CHECK_PROGS([TRUE_CPP],[cpp]) +fi +if test "${TRUE_CPP}" = ""; then + AC_PATH_PROG([TRUE_CPP],[cpp]) +fi +if test "${TRUE_CPP}" = ""; then + if test -x "/lib/cpp"; then + TRUE_CPP="/lib/cpp" + fi +fi +AC_MSG_CHECKING([for a true C preprocessor]) +if test "${TRUE_CPP}" = ""; then + AC_MSG_RESULT([none]) +else + AC_MSG_RESULT([${TRUE_CPP}]) +fi + +# Set Fortran preprocessor when needed +if test "${abi_fc_wrap}" = "yes"; then + AC_MSG_CHECKING([for a Fortran-compatible C preprocessor]) + if test "${FPP}" = ""; then + if test "${abi_cpp_user}" != ""; then + FPP="${abi_cpp_user}" + else + if test "${TRUE_CPP}" != ""; then + FPP="${TRUE_CPP}" + else + FPP="${CPP}" + fi + fi + fi + AC_MSG_RESULT([${FPP}]) +fi + +# FIXME: set CPP vendor +case "${target_os}" in + aix*) + abi_cpp_vendor="ibm" + abi_xpp_vendor="ibm" + abi_fpp_vendor="ibm" + ;; + *) + abi_cpp_vendor="default" + abi_xpp_vendor="default" + abi_fpp_vendor="default" + ;; +esac +case "${abi_fc_vendor}" in + ibm) + abi_fpp_vendor="ibm" + ;; +esac +AC_MSG_NOTICE([setting C preprocessor vendor to '${abi_cpp_vendor}']) +AC_MSG_NOTICE([setting C++ preprocessor vendor to '${abi_xpp_vendor}']) +AC_MSG_NOTICE([setting Fortran preprocessor vendor to '${abi_fpp_vendor}']) + +# Preset flags to have the source building properly +if test "${abi_hints_enable}" = "yes"; then + + # C support + ABI_CPP_HINTS + ABI_CC_HINTS + + # C++ support + ABI_XPP_HINTS + ABI_CXX_HINTS + + # Fortran support + ABI_FPP_HINTS + ABI_FC_HINTS + + # Library archiver support + #ABI_AR_HINTS + +fi + +# Adjust OpenMP flags if not used +if test "${abi_openmp_enable}" != "yes"; then + FCFLAGS_OPENMP="" +fi + +# Set Fortran preprocessing flags +if test "${abi_fc_wrap}" = "yes"; then + test "${FPPFLAGS}" = "" && FPPFLAGS="${FPPFLAGS_HINTS_EXT}" +fi + +# Display Fortran preprocessing parameters +AC_MSG_CHECKING([which Fortran preprocessor to use]) +if test "${FPP}" = ""; then + AC_MSG_RESULT([none]) +else + AC_MSG_RESULT([${FPP}]) +fi +AC_MSG_CHECKING([which Fortran preprocessor flags to apply]) +if test "${FPPFLAGS}" = ""; then + AC_MSG_RESULT([none]) +else + AC_MSG_RESULT([${FPPFLAGS}]) +fi + +# Display Fortran compiler wrapper status +AC_MSG_CHECKING([whether to wrap Fortran compiler calls]) +AC_MSG_RESULT([${abi_fc_wrap}]) + +# Export true CPPFLAGS (required by LibXC) +AC_SUBST(CPPFLAGS_HINTS_EXT) + +# Init debug flags +ABI_DEBUG_INIT([${abi_debug_flavor}]) + +# Activate "design-by-contract" debugging tests when paranoid +AC_MSG_CHECKING([whether to activate design-by-contract debugging]) +if test "${abi_debug_flavor}" = "paranoid"; then + AC_DEFINE([DEBUG_CONTRACT], 1, + [Define to 1 if you want to activate design-by-contract debugging tests.]) + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([no]) +fi +AM_CONDITIONAL(DO_BUILD_32_CONTRACT, + [test "${abi_debug_flavor}" = "paranoid"]) + +# Disable optimizations if debug mode is activated in source files +if test "${abi_debug_source}" = "yes"; then + if test "${abi_optim_flavor}" != "none"; then + AC_MSG_WARN([disabling optimizations]) + fi + abi_optim_flavor="none" +fi + +# Init optimization flags +# Note: must be done only once debugging is configured +ABI_OPTIM_INIT([${abi_optim_flavor}]) + +# FIXME: 20_datashare does not support optimizations +if test "${abi_optim_flavor}" != "none"; then + AC_MSG_NOTICE([disabling optimizations for src/20_datashare/]) + fcflags_opt_20_datashare="-O0" + AC_MSG_NOTICE([disabling optimizations for src/43_ptgroups/]) + fcflags_opt_43_ptgroups="-O0" +fi + +# Set per-directory Fortran optimizations +# Note: must be done only once FCFLAGS_OPTIM is set +ABI_OPTFLAGS_DIRS([${FCFLAGS_OPTIM}]) + +# ---------------------------------------------------------------------------- # + +# Set-up target and binary package names +# Note: requires knowledge of Fortran compiler +ABI_INIT_TARGET +ABINIT_BINARY_PACKAGE="${PACKAGE}-${VERSION}_${ABINIT_TARGET}" +AC_SUBST(ABINIT_BINARY_PACKAGE) + +# Preserve environment +ABI_ENV_BACKUP + +# Look for archiver +if test "${AR}" = ""; then + AC_CHECK_PROGS(AR,[ar xiar]) +fi + +# Set archiver command flag +test "${ARFLAGS_CMD}" = "" && ARFLAGS_CMD="rc" +AC_SUBST(ARFLAGS_CMD) + +# Look for ranlib +AC_PROG_RANLIB + +# Restore back compile flags +CFLAGS="${abi_env_CFLAGS}" +CXXFLAGS="${abi_env_CXXFLAGS}" +FCFLAGS="${abi_env_FCFLAGS}" + +# We want to be able access the archiver from anywhere +AC_SUBST(AR) +AC_SUBST(ARFLAGS) + +# Report the use of libtool-related options +AC_SUBST(enable_shared) +AC_SUBST(enable_static) +AC_SUBST(with_gnu_ld) + +# Final adjustments for library archiver +test "${ARFLAGS}" = "" && \ + ARFLAGS="${ARFLAGS_DEBUG} ${ARFLAGS_OPTIM} ${ARFLAGS_HINTS} ${ARFLAGS_EXTRA} ${ARFLAGS_CMD}" + +# Final adjustments for C +test "${CFLAGS}" = "" && \ + CFLAGS="${CFLAGS_DEBUG} ${CFLAGS_OPTIM} ${CFLAGS_HINTS} ${CFLAGS_EXTRA}" +test "${CC_LDFLAGS}" = "" && \ + CC_LDFLAGS="${CC_LDFLAGS_DEBUG} ${CC_LDFLAGS_OPTIM} ${CC_LDFLAGS_HINTS} ${CC_LDFLAGS_EXTRA}" +test "${CC_LIBS}" = "" && \ + CC_LIBS="${CC_LIBS_DEBUG} ${CC_LIBS_OPTIM} ${CC_LIBS_HINTS} ${CC_LIBS_EXTRA}" + +# Final adjustments for C++ +test "${CXXFLAGS}" = "" && \ + CXXFLAGS="${CXXFLAGS_DEBUG} ${CXXFLAGS_OPTIM} ${CXXFLAGS_HINTS} ${CXXFLAGS_EXTRA}" +test "${CXX_LDFLAGS}" = "" && \ + CXX_LDFLAGS="${CXX_LDFLAGS_DEBUG} ${CXX_LDFLAGS_OPTIM} ${CXX_LDFLAGS_HINTS} ${CXX_LDFLAGS_EXTRA}" +test "${CXX_LIBS}" = "" && \ + CXX_LIBS="${CXX_LIBS_DEBUG} ${CXX_LIBS_OPTIM} ${CXX_LIBS_HINTS} ${CXX_LIBS_EXTRA}" + +# Final adjustments for Fortran +# Note: FCFLAGS_OPTIM must not be included (per-directory optimizations) +test "${FCFLAGS}" = "" && \ + FCFLAGS="${FCFLAGS_DEBUG} ${FCFLAGS_HINTS} ${FCFLAGS_EXTRA} ${FCFLAGS_OPENMP}" +test "${FC_LDFLAGS}" = "" && \ + FC_LDFLAGS="${FC_LDFLAGS_DEBUG} ${FC_LDFLAGS_OPTIM} ${FC_LDFLAGS_HINTS} ${FC_LDFLAGS_EXTRA}" +test "${FC_LIBS}" = "" && \ + FC_LIBS="${FC_LIBS_DEBUG} ${FC_LIBS_OPTIM} ${FC_LIBS_HINTS} ${FC_LIBS_EXTRA}" + +# Final adjustments for preprocessors +test "${CPPFLAGS}" = "" && \ + CPPFLAGS="${CPPFLAGS_DEBUG} ${CPPFLAGS_OPTIM} ${CPPFLAGS_HINTS} ${CPPFLAGS_EXTRA}" +test "${XPPFLAGS}" = "" && \ + XPPFLAGS="${XPPFLAGS_DEBUG} ${XPPFLAGS_OPTIM} ${XPPFLAGS_HINTS} ${XPPFLAGS_EXTRA}" +test "${FPPFLAGS}" = "" -a "${abi_fc_wrap}" = "no" && \ + FPPFLAGS="${FPPFLAGS_DEBUG} ${FPPFLAGS_OPTIM} ${FPPFLAGS_HINTS} ${FPPFLAGS_EXTRA}" + +# FIXME: temporary workaround for Macs +if test "${abi_cpu_platform}" = "apple"; then + AC_MSG_WARN([${abi_cpu_platform} is not able to handle full link information]) + AC_MSG_WARN([static builds will fail]) +else + AC_MSG_NOTICE([static builds may be performed]) + FC_LIBS="${FC_LIBS} ${FCLIBS}" +fi + +# ---------------------------------------------------------------------------- # + +# Look for desired C features +ABI_CC_FEATURES + +# Look for desired Fortran features +ABI_FC_FEATURES + +# Look for desired Python features +ABI_PY_FEATURES + +# Platform-specific libraries +AC_MSG_CHECKING([which operating system we have]) +AC_MSG_RESULT([${target_os}]) + +# Basic mathematical functions +AC_LANG_PUSH([C]) +AC_SEARCH_LIBS([expl], [m ml], + [abi_math_expl_ok="yes"], [abi_math_expl_ok="no"]) +AC_SEARCH_LIBS([logl], [m ml], + [abi_math_logl_ok="yes"], [abi_math_logl_ok="no"]) +AC_LANG_POP([C]) + +# OpenMP support +AC_MSG_CHECKING([whether to enable OpenMP support]) +AC_MSG_RESULT([${abi_openmp_enable}]) +if test "${abi_openmp_enable}" = "yes"; then + AC_MSG_CHECKING([Fortran flags for OpenMP]) + AC_MSG_RESULT([${FCFLAGS_OPENMP}]) + ABI_OMP_CHECK_COLLAPSE + AC_MSG_NOTICE([OpenMP support is enabled in Fortran source code only]) +fi + +# MPI support +ABI_MPI_DETECT +if test "${abi_mpi_enable}" = "yes"; then + ABI_MPI_DUMP +fi + +# GPU support +ABI_GPU_DETECT + +# Init FFTW3 +SD_FFTW3_INIT([optional skip]) + +# Init Levmar +SD_LEVMAR_INIT([optional fail]) + +# Init LibPSML +SD_LIBPSML_INIT([optional fail]) + +# Init LibXC +SD_LIBXC_INIT([no-fortran optional fail]) + +# Init PAPI +SD_NETCDF_INIT([no-cxx optional fail]) + +# Init PAPI +SD_PAPI_INIT([optional fail]) + +# Init PFFT +SD_PFFT_INIT([optional skip]) + +# Init TRIQS +SD_TRIQS_INIT([optional fail]) + +# Init Wannier90 +SD_WANNIER90_INIT([optional fail], [-lwannier90]) + +# Init XMLF90 +SD_XMLF90_INIT([optional fail]) + +# Linear algebra support +SD_LINALG_INIT([required fail]) +SD_LINALG_INIT_FLAVOR + +SD_LINALG_DETECT + +# Optimized FFT support (must be done after linear algebra is fully configured) +SD_FFT_INIT + +SD_FFT_DETECT + + # ------------------------------ # + +# PAPI library support +SD_PAPI_DETECT +AC_MSG_CHECKING([whether to enable the internal ABINIT Common timer]) +AC_MSG_RESULT([${abi_timer_enable}]) +if test "${sd_papi_ok}" != "yes"; then + if test "${abi_timer_enable}" = "yes"; then + AC_DEFINE([HAVE_TIMER_ABINIT], 1, + [Define to 1 if you want to use the ABINIT Common timer.]) + fi +fi + + # ------------------------------ # + +# NetCDF library support +SD_NETCDF_DETECT +# FIXME: quick workaround +if test "${sd_netcdf_ok}" = "yes"; then + sd_netcdf_fcflags="${sd_netcdf_fcflags} ${sd_netcdf_cppflags}" +fi + +# XMLF90 library support +SD_XMLF90_DETECT + +# LibPSML library support +if test "${sd_xmlf90_ok}" = "yes"; then + SD_LIBPSML_DETECT +else + if test "${sd_libpsml_enable}" = "auto"; then + sd_libpsml_enable="no" + else + if test "${sd_libpsml_enable}" != "no"; then + AC_MSG_ERROR([LibPSML support has been requested but XMLF90 does not work + Please point the configuration to a working XMLF90 + installation or disable LibPSML support]) + fi + fi +fi +AM_CONDITIONAL([DO_BUILD_PSML], + [test "${sd_libpsml_enable}" = "yes " -a "${sd_libpsml_ok}" = "yes"]) + + # ------------------------------ # + +# Levmar library support +SD_LEVMAR_DETECT + + # ------------------------------ # + +# LibXC library support +#ABI_LIBXC_DETECT(2, 2) +SD_LIBXC_DETECT +AM_CONDITIONAL([DO_BUILD_01_LIBXC_EXT], + [test "${sd_libxc_ok}" = "yes"]) + +# TRIQS support +SD_TRIQS_DETECT +AM_CONDITIONAL([DO_BUILD_67_TRIQS_EXT], + [test "${sd_triqs_enable}" = "yes" -a "${sd_triqs_ok}" = "yes"]) + +# Wannier90 library support +SD_WANNIER90_DETECT + +# Display summary table +ABI_TRIGGERS_SUMMARY + +# Always generate a build script for required fallbacks +AC_OUTPUT([transient/build-abinit-fallbacks.sh]) + +# Check that we have all required fallbacks +ABI_FALLBACKS_VALIDATE([${abi_fbk_required}]) + +# Report situation +if test "${abi_fbk_required}" = ""; then + AC_MSG_NOTICE([no fallback required - you may run production calculations]) +else + AC_MSG_NOTICE([fallbacks required - you should not run production calculations]) +fi + +# FIXME: copying linear algebra tarball for now, +# ensuring ~/.abinit/tarballs/ exists +if test "${abi_fbk_linalg}" = "yes"; then + tmp_abinit_tardir="${HOME}/.abinit/tarballs" + tmp_linalg_tarball="lapack-abinit_6.10.tar.gz" + if test ! -s "${tmp_abinit_tardir}/${tmp_linalg_tarball}"; then + AC_MSG_NOTICE([using tarball repository ${tmp_abinit_tardir}]) + if test ! -e "${tmp_abinit_tardir}"; then + AC_MSG_NOTICE([creating '${tmp_abinit_tardir}']) + ${INSTALL} -d -m 755 "${tmp_abinit_tardir}" + elif test ! -d "${tmp_abinit_tardir}"; then + AC_MSG_ERROR(['${tmp_abinit_tardir}' is not a directory + please move away the current file and reconfigure ABINIT Common]) + fi + + AC_MSG_NOTICE([installing linear algebra fallback tarball to '${tmp_abinit_tardir}']) + ${INSTALL} -m 644 "${abinit_srcdir}/transient/${tmp_linalg_tarball}" \ + "${tmp_abinit_tardir}" + fi +fi + +# Check that all triggers or their fallbacks are working +# FIXME: triggers must not fall back if with_* options are provided +for pkg in ${abi_trig_packages}; do + tmp_trig_errors="" + eval tmp_pkg_ok=\"\$\{abi_${pkg}_ok\}\" + eval tmp_fbk_ok=\"\$\{abi_fbk_${pkg}_ok\}\" + if test "${tmp_pkg_ok}" = "no" -a "${tmp_fbk_ok}" != "yes"; then + tmp_trig_errors="${tmp_trig_errors} ${pkg}" + fi +done +if test "${tmp_trig_errors}" != ""; then + for pkg in ${tmp_trig_errors}; do + tmp_fbk_error=`echo "${abi_fbk_packages}" | grep "${pkg}"` + AC_MSG_WARN([${pkg} support is unavailable or broken]) + if test "${tmp_fbk_error}" != ""; then + AC_MSG_WARN([${pkg} fallback is unavailable]) + fi + done + AC_MSG_ERROR([some optional features were not found on this system + (see messages above) + Please correct the options of configure to match your + actual situation]) +fi + +# Defines and conditionals for CPP options +# (see config/specs/options.conf for details) +ABI_OPTIONS_CPP_DEFINES + +# Wrap buggy Fortran compilers +FC_NOWRAP="${FC}" +if test "${abi_fc_wrap}" = "yes"; then + FC="${abinit_builddir}/config/wrappers/wrap-fc" +fi +AC_SUBST(FC_NOWRAP) + +# Force F77 and F90 environment variables (keep always last) +F77="${FC}" +FFLAGS="${FCFLAGS}" +F90="${FC}" +F90FLAGS="${FCFLAGS}" + +# The following is required for oldish fixed-form Fortran libraries +AC_SUBST(F77) +AC_SUBST(FFLAGS) + +# Void CPPFLAGS to allow for C/Fortran mixing +ABI_CPPFLAGS="${CPPFLAGS}" +CPPFLAGS="" + +# FIXME: Temporary options to remove +case "${ABINIT_LEGACY_OPTION}" in + mpi1) + AC_DEFINE([HAVE_MPI1], 1, + [Define to 1 if you have a MPI-1 implementation (obsolete, broken).]) + ;; + wannier90_v1) + AC_DEFINE([HAVE_WANNIER90_V1], 1, + [Define to 1 if you want to use Wanner90 1.x (awfully obsolete).]) + ;; +esac + +# FIXME: temporary translation of XML status +if test "${abi_libxml2_enable}" = "yes"; then + AC_DEFINE([HAVE_XML], 1, + [Define to 1 if you want to use LibXML2-based XML I/O.]) +fi + +# Output files +# Note: later, add tests/atconfig and tests/atlocal for test suite +ABI_OUTPUT + +# The end +if test "${sd_linalg_flavor}" = "netlib-fallback"; then + ABI_MSG_NOTICE([linalg-abinit], + [Suboptimal linear algebra configuration]) +fi +if test "${abi_gpu_enable}" = "yes" -a "${sd_linalg_chk_gpu}" != "magma"; then + ABI_MSG_NOTICE([gpu-without-magma], + [Suboptimal GPU configuration]) +fi +ABI_MSG_FC_BUGGY(${abi_fc_vendor}) +ABI_MSG_END diff --git a/GX-PAW/common/src/.gitignore b/GX-PAW/common/src/.gitignore new file mode 100644 index 00000000..4adf8cd8 --- /dev/null +++ b/GX-PAW/common/src/.gitignore @@ -0,0 +1 @@ +39_libpaw diff --git a/GX-PAW/common/src/02_clib/.deps/calling_levmar.Po b/GX-PAW/common/src/02_clib/.deps/calling_levmar.Po new file mode 100644 index 00000000..9e79d55c --- /dev/null +++ b/GX-PAW/common/src/02_clib/.deps/calling_levmar.Po @@ -0,0 +1,193 @@ +calling_levmar.o: calling_levmar.c \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdlib.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/Availability.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/AvailabilityInternal.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_symbol_aliasing.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_posix_availability.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/wait.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_pid_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_id_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/signal.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/appleapiopts.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/signal.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/signal.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_mcontext.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/_mcontext.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/machine/_structs.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/i386/_structs.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int8_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int16_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int32_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int64_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int8_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int16_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int32_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int64_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_intptr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uintptr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_attr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_sigaltstack.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ucontext.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_sigset_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_size_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uid_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/resource.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include/stdint.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/stdint.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint8_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint16_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint32_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint64_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_intmax_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uintmax_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_timeval.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/endian.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/endian.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_endian.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/_OSByteOrder.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/i386/_OSByteOrder.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/alloca.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ct_rune_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_rune_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_wchar_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_null.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/malloc/_malloc.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_dev_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_mode_t.h \ + ../../../../config.h + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdlib.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/Availability.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/AvailabilityInternal.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_symbol_aliasing.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_posix_availability.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/wait.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_pid_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_id_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/signal.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/appleapiopts.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/signal.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/signal.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_mcontext.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/_mcontext.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/machine/_structs.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/i386/_structs.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int8_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int16_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int32_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int64_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int8_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int16_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int32_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int64_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_intptr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uintptr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_attr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_sigaltstack.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ucontext.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_sigset_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_size_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uid_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/resource.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include/stdint.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/stdint.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint8_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint16_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint32_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint64_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_intmax_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uintmax_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_timeval.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/endian.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/endian.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_endian.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/_OSByteOrder.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/i386/_OSByteOrder.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/alloca.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ct_rune_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_rune_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_wchar_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_null.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/malloc/_malloc.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_dev_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_mode_t.h: + +../../../../config.h: diff --git a/GX-PAW/common/src/02_clib/.deps/cclock.Po b/GX-PAW/common/src/02_clib/.deps/cclock.Po new file mode 100644 index 00000000..61966226 --- /dev/null +++ b/GX-PAW/common/src/02_clib/.deps/cclock.Po @@ -0,0 +1,87 @@ +cclock.o: cclock.c ../../../../config.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/time.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_symbol_aliasing.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_posix_availability.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/Availability.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/AvailabilityInternal.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_clock_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int8_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int16_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int32_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int64_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int8_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int16_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int32_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int64_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_intptr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uintptr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_null.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_size_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_time_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_timespec.h + +../../../../config.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/time.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_symbol_aliasing.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_posix_availability.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/Availability.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/AvailabilityInternal.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_clock_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int8_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int16_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int32_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int64_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int8_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int16_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int32_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int64_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_intptr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uintptr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_null.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_size_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_time_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_timespec.h: diff --git a/GX-PAW/common/src/02_clib/.deps/etime.Po b/GX-PAW/common/src/02_clib/.deps/etime.Po new file mode 100644 index 00000000..cbcf696f --- /dev/null +++ b/GX-PAW/common/src/02_clib/.deps/etime.Po @@ -0,0 +1,411 @@ +etime.o: etime.c ../../../../shared/common/src/incs/abi_clib.h \ + ../../../../config.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/stdio.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include/stdarg.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_stdio.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_symbol_aliasing.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_posix_availability.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/Availability.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/AvailabilityInternal.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_va_list.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int8_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int16_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int32_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int64_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int8_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int16_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int32_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int64_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_intptr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uintptr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_size_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_null.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/stdio.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_off_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ssize_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_stdio.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_common.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdlib.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/wait.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_pid_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_id_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/signal.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/appleapiopts.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/signal.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/signal.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_mcontext.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/_mcontext.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/machine/_structs.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/i386/_structs.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_attr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_sigaltstack.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ucontext.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_sigset_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uid_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/resource.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include/stdint.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/stdint.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint8_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint16_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint32_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint64_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_intmax_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uintmax_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_timeval.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/endian.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/endian.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_endian.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/_OSByteOrder.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/i386/_OSByteOrder.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/alloca.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ct_rune_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_rune_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_wchar_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/malloc/_malloc.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_dev_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_mode_t.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include/stddef.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_char.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_short.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_caddr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_blkcnt_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_blksize_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_gid_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_in_addr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_in_port_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ino_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ino64_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_key_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_nlink_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_clock_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_time_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_useconds_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_suseconds_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_rsize_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_errno_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_def.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_setsize.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_set.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_clr.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_zero.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_isset.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_copy.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_cond_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_condattr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_mutex_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_mutexattr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_once_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_rwlock_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_rwlockattr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_key_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fsblkcnt_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fsfilcnt_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/inttypes.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/string.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/strings.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_strings.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_string.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/errno.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/errno.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/malloc.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/math.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/stat.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_timespec.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_s_ifmt.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_filesec_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/unistd.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/unistd.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_posix_vdisable.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_seek_set.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/select.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_select.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uuid_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/gethostuuid.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/time.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_timeval64.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/time.h + +../../../../shared/common/src/incs/abi_clib.h: + +../../../../config.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/stdio.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include/stdarg.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_stdio.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_symbol_aliasing.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_posix_availability.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/Availability.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/AvailabilityInternal.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_va_list.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int8_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int16_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int32_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int64_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int8_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int16_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int32_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int64_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_intptr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uintptr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_size_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_null.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/stdio.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_off_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ssize_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_stdio.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_common.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdlib.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/wait.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_pid_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_id_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/signal.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/appleapiopts.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/signal.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/signal.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_mcontext.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/_mcontext.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/machine/_structs.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/i386/_structs.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_attr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_sigaltstack.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ucontext.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_sigset_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uid_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/resource.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include/stdint.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/stdint.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint8_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint16_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint32_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint64_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_intmax_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uintmax_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_timeval.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/endian.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/endian.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_endian.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/_OSByteOrder.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/i386/_OSByteOrder.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/alloca.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ct_rune_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_rune_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_wchar_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/malloc/_malloc.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_dev_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_mode_t.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include/stddef.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_char.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_short.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_caddr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_blkcnt_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_blksize_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_gid_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_in_addr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_in_port_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ino_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ino64_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_key_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_nlink_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_clock_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_time_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_useconds_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_suseconds_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_rsize_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_errno_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_def.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_setsize.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_set.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_clr.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_zero.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_isset.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_copy.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_cond_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_condattr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_mutex_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_mutexattr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_once_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_rwlock_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_rwlockattr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_key_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fsblkcnt_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fsfilcnt_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/inttypes.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/string.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/strings.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_strings.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_string.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/errno.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/errno.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/malloc.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/math.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/stat.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_timespec.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_s_ifmt.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_filesec_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/unistd.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/unistd.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_posix_vdisable.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_seek_set.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/select.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_select.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uuid_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/gethostuuid.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/time.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_timeval64.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/time.h: diff --git a/GX-PAW/common/src/02_clib/.deps/fsi_posix.Po b/GX-PAW/common/src/02_clib/.deps/fsi_posix.Po new file mode 100644 index 00000000..06ba2d32 --- /dev/null +++ b/GX-PAW/common/src/02_clib/.deps/fsi_posix.Po @@ -0,0 +1,405 @@ +fsi_posix.o: fsi_posix.c \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/stat.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_symbol_aliasing.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_posix_availability.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/Availability.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/AvailabilityInternal.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_timespec.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int8_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int16_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int32_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int64_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int8_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int16_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int32_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int64_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_intptr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uintptr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_blkcnt_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_blksize_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_dev_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ino_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ino64_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_mode_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_nlink_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uid_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_gid_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_off_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_time_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_s_ifmt.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_filesec_t.h \ + ../../../../shared/common/src/incs/abi_clib.h ../../../../config.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/stdio.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include/stdarg.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_stdio.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_va_list.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_size_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_null.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/stdio.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ssize_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_stdio.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_common.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdlib.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/wait.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_pid_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_id_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/signal.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/appleapiopts.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/signal.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/signal.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_mcontext.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/_mcontext.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/machine/_structs.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/i386/_structs.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_attr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_sigaltstack.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ucontext.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_sigset_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/resource.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include/stdint.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/stdint.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint8_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint16_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint32_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint64_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_intmax_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uintmax_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_timeval.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/endian.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/endian.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_endian.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/_OSByteOrder.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/i386/_OSByteOrder.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/alloca.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ct_rune_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_rune_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_wchar_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/malloc/_malloc.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include/stddef.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_char.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_short.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_caddr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_in_addr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_in_port_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_key_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_clock_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_useconds_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_suseconds_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_rsize_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_errno_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_def.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_setsize.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_set.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_clr.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_zero.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_isset.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_copy.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_cond_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_condattr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_mutex_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_mutexattr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_once_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_rwlock_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_rwlockattr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_key_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fsblkcnt_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fsfilcnt_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/inttypes.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/string.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/strings.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_strings.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_string.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/errno.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/errno.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/malloc.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/math.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/unistd.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/unistd.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_posix_vdisable.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_seek_set.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/select.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_select.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uuid_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/gethostuuid.h \ + xmalloc.h + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/stat.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_symbol_aliasing.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_posix_availability.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/Availability.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/AvailabilityInternal.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_timespec.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int8_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int16_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int32_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int64_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int8_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int16_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int32_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int64_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_intptr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uintptr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_blkcnt_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_blksize_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_dev_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ino_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ino64_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_mode_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_nlink_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uid_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_gid_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_off_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_time_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_s_ifmt.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_filesec_t.h: + +../../../../shared/common/src/incs/abi_clib.h: + +../../../../config.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/stdio.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include/stdarg.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_stdio.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_va_list.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_size_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_null.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/stdio.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ssize_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_stdio.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_common.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdlib.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/wait.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_pid_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_id_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/signal.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/appleapiopts.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/signal.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/signal.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_mcontext.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/_mcontext.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/machine/_structs.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/i386/_structs.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_attr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_sigaltstack.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ucontext.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_sigset_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/resource.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include/stdint.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/stdint.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint8_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint16_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint32_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint64_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_intmax_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uintmax_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_timeval.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/endian.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/endian.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_endian.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/_OSByteOrder.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/i386/_OSByteOrder.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/alloca.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ct_rune_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_rune_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_wchar_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/malloc/_malloc.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include/stddef.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_char.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_short.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_caddr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_in_addr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_in_port_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_key_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_clock_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_useconds_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_suseconds_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_rsize_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_errno_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_def.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_setsize.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_set.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_clr.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_zero.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_isset.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_copy.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_cond_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_condattr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_mutex_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_mutexattr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_once_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_rwlock_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_rwlockattr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_key_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fsblkcnt_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fsfilcnt_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/inttypes.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/string.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/strings.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_strings.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_string.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/errno.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/errno.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/malloc.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/math.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/unistd.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/unistd.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_posix_vdisable.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_seek_set.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/select.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_select.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uuid_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/gethostuuid.h: + +xmalloc.h: diff --git a/GX-PAW/common/src/02_clib/.deps/gnu_tools.Po b/GX-PAW/common/src/02_clib/.deps/gnu_tools.Po new file mode 100644 index 00000000..e8a8b53c --- /dev/null +++ b/GX-PAW/common/src/02_clib/.deps/gnu_tools.Po @@ -0,0 +1,402 @@ +gnu_tools.o: gnu_tools.c ../../../../shared/common/src/incs/abi_clib.h \ + ../../../../config.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/stdio.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include/stdarg.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_stdio.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_symbol_aliasing.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_posix_availability.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/Availability.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/AvailabilityInternal.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_va_list.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int8_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int16_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int32_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int64_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int8_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int16_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int32_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int64_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_intptr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uintptr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_size_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_null.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/stdio.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_off_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ssize_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_stdio.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_common.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdlib.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/wait.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_pid_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_id_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/signal.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/appleapiopts.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/signal.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/signal.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_mcontext.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/_mcontext.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/machine/_structs.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/i386/_structs.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_attr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_sigaltstack.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ucontext.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_sigset_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uid_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/resource.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include/stdint.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/stdint.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint8_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint16_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint32_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint64_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_intmax_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uintmax_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_timeval.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/endian.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/endian.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_endian.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/_OSByteOrder.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/i386/_OSByteOrder.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/alloca.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ct_rune_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_rune_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_wchar_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/malloc/_malloc.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_dev_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_mode_t.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include/stddef.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_char.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_short.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_caddr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_blkcnt_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_blksize_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_gid_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_in_addr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_in_port_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ino_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ino64_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_key_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_nlink_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_clock_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_time_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_useconds_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_suseconds_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_rsize_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_errno_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_def.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_setsize.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_set.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_clr.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_zero.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_isset.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_copy.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_cond_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_condattr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_mutex_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_mutexattr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_once_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_rwlock_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_rwlockattr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_key_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fsblkcnt_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fsfilcnt_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/inttypes.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/string.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/strings.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_strings.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_string.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/errno.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/errno.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/malloc.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/math.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/stat.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_timespec.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_s_ifmt.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_filesec_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/unistd.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/unistd.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_posix_vdisable.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_seek_set.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/select.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_select.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uuid_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/gethostuuid.h + +../../../../shared/common/src/incs/abi_clib.h: + +../../../../config.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/stdio.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include/stdarg.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_stdio.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_symbol_aliasing.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_posix_availability.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/Availability.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/AvailabilityInternal.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_va_list.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int8_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int16_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int32_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int64_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int8_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int16_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int32_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int64_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_intptr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uintptr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_size_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_null.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/stdio.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_off_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ssize_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_stdio.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_common.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdlib.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/wait.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_pid_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_id_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/signal.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/appleapiopts.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/signal.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/signal.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_mcontext.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/_mcontext.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/machine/_structs.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/i386/_structs.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_attr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_sigaltstack.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ucontext.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_sigset_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uid_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/resource.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include/stdint.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/stdint.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint8_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint16_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint32_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint64_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_intmax_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uintmax_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_timeval.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/endian.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/endian.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_endian.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/_OSByteOrder.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/i386/_OSByteOrder.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/alloca.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ct_rune_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_rune_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_wchar_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/malloc/_malloc.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_dev_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_mode_t.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include/stddef.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_char.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_short.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_caddr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_blkcnt_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_blksize_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_gid_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_in_addr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_in_port_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ino_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ino64_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_key_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_nlink_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_clock_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_time_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_useconds_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_suseconds_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_rsize_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_errno_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_def.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_setsize.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_set.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_clr.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_zero.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_isset.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_copy.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_cond_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_condattr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_mutex_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_mutexattr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_once_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_rwlock_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_rwlockattr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_key_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fsblkcnt_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fsfilcnt_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/inttypes.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/string.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/strings.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_strings.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_string.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/errno.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/errno.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/malloc.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/math.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/stat.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_timespec.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_s_ifmt.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_filesec_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/unistd.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/unistd.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_posix_vdisable.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_seek_set.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/select.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_select.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uuid_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/gethostuuid.h: diff --git a/GX-PAW/common/src/02_clib/.deps/mallinfo.Po b/GX-PAW/common/src/02_clib/.deps/mallinfo.Po new file mode 100644 index 00000000..e6aba17b --- /dev/null +++ b/GX-PAW/common/src/02_clib/.deps/mallinfo.Po @@ -0,0 +1,402 @@ +mallinfo.o: mallinfo.c ../../../../shared/common/src/incs/abi_clib.h \ + ../../../../config.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/stdio.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include/stdarg.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_stdio.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_symbol_aliasing.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_posix_availability.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/Availability.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/AvailabilityInternal.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_va_list.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int8_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int16_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int32_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int64_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int8_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int16_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int32_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int64_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_intptr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uintptr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_size_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_null.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/stdio.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_off_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ssize_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_stdio.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_common.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdlib.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/wait.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_pid_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_id_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/signal.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/appleapiopts.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/signal.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/signal.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_mcontext.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/_mcontext.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/machine/_structs.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/i386/_structs.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_attr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_sigaltstack.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ucontext.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_sigset_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uid_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/resource.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include/stdint.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/stdint.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint8_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint16_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint32_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint64_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_intmax_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uintmax_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_timeval.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/endian.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/endian.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_endian.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/_OSByteOrder.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/i386/_OSByteOrder.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/alloca.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ct_rune_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_rune_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_wchar_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/malloc/_malloc.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_dev_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_mode_t.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include/stddef.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_char.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_short.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_caddr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_blkcnt_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_blksize_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_gid_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_in_addr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_in_port_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ino_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ino64_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_key_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_nlink_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_clock_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_time_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_useconds_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_suseconds_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_rsize_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_errno_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_def.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_setsize.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_set.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_clr.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_zero.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_isset.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_copy.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_cond_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_condattr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_mutex_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_mutexattr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_once_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_rwlock_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_rwlockattr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_key_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fsblkcnt_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fsfilcnt_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/inttypes.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/string.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/strings.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_strings.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_string.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/errno.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/errno.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/malloc.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/math.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/stat.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_timespec.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_s_ifmt.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_filesec_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/unistd.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/unistd.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_posix_vdisable.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_seek_set.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/select.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_select.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uuid_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/gethostuuid.h + +../../../../shared/common/src/incs/abi_clib.h: + +../../../../config.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/stdio.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include/stdarg.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_stdio.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_symbol_aliasing.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_posix_availability.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/Availability.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/AvailabilityInternal.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_va_list.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int8_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int16_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int32_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int64_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int8_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int16_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int32_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int64_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_intptr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uintptr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_size_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_null.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/stdio.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_off_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ssize_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_stdio.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_common.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdlib.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/wait.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_pid_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_id_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/signal.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/appleapiopts.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/signal.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/signal.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_mcontext.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/_mcontext.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/machine/_structs.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/i386/_structs.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_attr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_sigaltstack.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ucontext.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_sigset_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uid_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/resource.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include/stdint.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/stdint.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint8_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint16_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint32_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint64_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_intmax_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uintmax_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_timeval.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/endian.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/endian.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_endian.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/_OSByteOrder.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/i386/_OSByteOrder.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/alloca.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ct_rune_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_rune_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_wchar_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/malloc/_malloc.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_dev_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_mode_t.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include/stddef.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_char.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_short.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_caddr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_blkcnt_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_blksize_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_gid_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_in_addr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_in_port_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ino_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ino64_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_key_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_nlink_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_clock_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_time_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_useconds_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_suseconds_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_rsize_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_errno_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_def.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_setsize.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_set.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_clr.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_zero.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_isset.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_copy.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_cond_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_condattr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_mutex_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_mutexattr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_once_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_rwlock_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_rwlockattr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_key_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fsblkcnt_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fsfilcnt_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/inttypes.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/string.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/strings.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_strings.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_string.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/errno.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/errno.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/malloc.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/math.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/stat.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_timespec.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_s_ifmt.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_filesec_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/unistd.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/unistd.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_posix_vdisable.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_seek_set.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/select.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_select.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uuid_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/gethostuuid.h: diff --git a/GX-PAW/common/src/02_clib/.deps/md5.Po b/GX-PAW/common/src/02_clib/.deps/md5.Po new file mode 100644 index 00000000..ae92058e --- /dev/null +++ b/GX-PAW/common/src/02_clib/.deps/md5.Po @@ -0,0 +1,420 @@ +md5.o: md5.c ../../../../config.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdlib.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/Availability.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/AvailabilityInternal.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_symbol_aliasing.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_posix_availability.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/wait.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_pid_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_id_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/signal.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/appleapiopts.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/signal.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/signal.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_mcontext.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/_mcontext.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/machine/_structs.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/i386/_structs.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int8_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int16_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int32_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int64_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int8_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int16_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int32_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int64_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_intptr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uintptr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_attr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_sigaltstack.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ucontext.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_sigset_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_size_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uid_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/resource.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include/stdint.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/stdint.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint8_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint16_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint32_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint64_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_intmax_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uintmax_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_timeval.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/endian.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/endian.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_endian.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/_OSByteOrder.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/i386/_OSByteOrder.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/alloca.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ct_rune_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_rune_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_wchar_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_null.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/malloc/_malloc.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_dev_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_mode_t.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/stdio.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include/stdarg.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_stdio.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_va_list.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/stdio.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_off_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ssize_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_stdio.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_common.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/string.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_rsize_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_errno_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/strings.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_strings.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_string.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/malloc/malloc.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include/stddef.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/mach_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/host_info.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/message.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/port.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/boolean.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/machine/boolean.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/i386/boolean.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/machine/vm_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/i386/vm_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/i386/vm_param.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_mach_port_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/kern_return.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/machine/kern_return.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/i386/kern_return.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/vm_statistics.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/machine.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/time_value.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/host_notify.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/host_special_ports.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/memory_object_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/vm_prot.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/vm_sync.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/vm_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/exception_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/machine/exception.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/i386/exception.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/thread_status.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/machine/thread_status.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/i386/thread_status.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/i386/fp_reg.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/i386/thread_state.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/eflags.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/machine/thread_state.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/mach_voucher_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/std_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uuid_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/processor_info.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/machine/processor_info.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/i386/processor_info.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/task_info.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/policy.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/task_inspect.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/task_policy.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/task_special_ports.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/thread_info.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/thread_policy.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/thread_special_ports.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/clock_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/vm_attributes.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/vm_inherit.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/vm_purgable.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/vm_behavior.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/vm_region.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/machine/vm_param.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/kmod.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/dyld_kernel.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fsid_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fsobj_id_t.h \ + md5.h + +../../../../config.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdlib.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/Availability.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/AvailabilityInternal.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_symbol_aliasing.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_posix_availability.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/wait.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_pid_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_id_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/signal.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/appleapiopts.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/signal.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/signal.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_mcontext.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/_mcontext.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/machine/_structs.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/i386/_structs.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int8_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int16_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int32_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int64_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int8_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int16_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int32_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int64_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_intptr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uintptr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_attr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_sigaltstack.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ucontext.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_sigset_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_size_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uid_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/resource.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include/stdint.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/stdint.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint8_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint16_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint32_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint64_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_intmax_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uintmax_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_timeval.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/endian.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/endian.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_endian.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/_OSByteOrder.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/i386/_OSByteOrder.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/alloca.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ct_rune_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_rune_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_wchar_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_null.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/malloc/_malloc.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_dev_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_mode_t.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/stdio.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include/stdarg.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_stdio.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_va_list.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/stdio.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_off_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ssize_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_stdio.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_common.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/string.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_rsize_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_errno_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/strings.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_strings.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_string.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/malloc/malloc.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include/stddef.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/mach_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/host_info.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/message.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/port.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/boolean.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/machine/boolean.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/i386/boolean.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/machine/vm_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/i386/vm_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/i386/vm_param.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_mach_port_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/kern_return.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/machine/kern_return.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/i386/kern_return.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/vm_statistics.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/machine.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/time_value.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/host_notify.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/host_special_ports.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/memory_object_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/vm_prot.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/vm_sync.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/vm_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/exception_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/machine/exception.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/i386/exception.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/thread_status.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/machine/thread_status.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/i386/thread_status.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/i386/fp_reg.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/i386/thread_state.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/eflags.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/machine/thread_state.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/mach_voucher_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/std_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uuid_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/processor_info.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/machine/processor_info.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/i386/processor_info.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/task_info.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/policy.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/task_inspect.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/task_policy.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/task_special_ports.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/thread_info.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/thread_policy.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/thread_special_ports.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/clock_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/vm_attributes.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/vm_inherit.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/vm_purgable.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/vm_behavior.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/vm_region.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/machine/vm_param.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/kmod.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/dyld_kernel.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fsid_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fsobj_id_t.h: + +md5.h: diff --git a/GX-PAW/common/src/02_clib/.deps/rlimit.Po b/GX-PAW/common/src/02_clib/.deps/rlimit.Po new file mode 100644 index 00000000..34f264c3 --- /dev/null +++ b/GX-PAW/common/src/02_clib/.deps/rlimit.Po @@ -0,0 +1,217 @@ +rlimit.o: rlimit.c \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/stdio.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include/stdarg.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_stdio.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_symbol_aliasing.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_posix_availability.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/Availability.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/AvailabilityInternal.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_va_list.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int8_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int16_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int32_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int64_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int8_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int16_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int32_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int64_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_intptr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uintptr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_size_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_null.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/stdio.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_off_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ssize_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_stdio.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_common.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdlib.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/wait.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_pid_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_id_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/signal.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/appleapiopts.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/signal.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/signal.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_mcontext.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/_mcontext.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/machine/_structs.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/i386/_structs.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_attr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_sigaltstack.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ucontext.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_sigset_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uid_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/resource.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include/stdint.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/stdint.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint8_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint16_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint32_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint64_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_intmax_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uintmax_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_timeval.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/endian.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/endian.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_endian.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/_OSByteOrder.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/i386/_OSByteOrder.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/alloca.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ct_rune_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_rune_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_wchar_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/malloc/_malloc.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_dev_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_mode_t.h + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/stdio.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include/stdarg.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_stdio.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_symbol_aliasing.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_posix_availability.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/Availability.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/AvailabilityInternal.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_va_list.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int8_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int16_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int32_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int64_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int8_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int16_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int32_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int64_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_intptr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uintptr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_size_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_null.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/stdio.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_off_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ssize_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_stdio.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_common.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdlib.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/wait.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_pid_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_id_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/signal.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/appleapiopts.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/signal.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/signal.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_mcontext.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/_mcontext.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/machine/_structs.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/i386/_structs.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_attr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_sigaltstack.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ucontext.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_sigset_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uid_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/resource.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include/stdint.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/stdint.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint8_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint16_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint32_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint64_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_intmax_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uintmax_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_timeval.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/endian.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/endian.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_endian.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/_OSByteOrder.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/i386/_OSByteOrder.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/alloca.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ct_rune_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_rune_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_wchar_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/malloc/_malloc.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_dev_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_mode_t.h: diff --git a/GX-PAW/common/src/02_clib/.deps/sockets.Po b/GX-PAW/common/src/02_clib/.deps/sockets.Po new file mode 100644 index 00000000..0820d435 --- /dev/null +++ b/GX-PAW/common/src/02_clib/.deps/sockets.Po @@ -0,0 +1,406 @@ +sockets.o: sockets.c \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/stdio.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include/stdarg.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_stdio.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_symbol_aliasing.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_posix_availability.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/Availability.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/AvailabilityInternal.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_va_list.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int8_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int16_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int32_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int64_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int8_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int16_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int32_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int64_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_intptr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uintptr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_size_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_null.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/stdio.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_off_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ssize_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_stdio.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_common.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdlib.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/wait.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_pid_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_id_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/signal.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/appleapiopts.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/signal.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/signal.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_mcontext.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/_mcontext.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/machine/_structs.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/i386/_structs.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_attr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_sigaltstack.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ucontext.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_sigset_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uid_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/resource.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include/stdint.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/stdint.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint8_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint16_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint32_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint64_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_intmax_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uintmax_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_timeval.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/endian.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/endian.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_endian.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/_OSByteOrder.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/i386/_OSByteOrder.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/alloca.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ct_rune_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_rune_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_wchar_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/malloc/_malloc.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_dev_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_mode_t.h \ + ../../../../config.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/unistd.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/unistd.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_posix_vdisable.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_seek_set.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_gid_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_useconds_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/select.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_def.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_timespec.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_time_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_suseconds_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_setsize.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_set.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_clr.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_isset.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_zero.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_copy.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_select.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uuid_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/gethostuuid.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/string.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_rsize_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_errno_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/strings.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_strings.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_string.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_char.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_short.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_caddr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_blkcnt_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_blksize_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_in_addr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_in_port_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ino_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ino64_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_key_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_nlink_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_clock_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_cond_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_condattr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_mutex_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_mutexattr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_once_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_rwlock_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_rwlockattr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_key_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fsblkcnt_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fsfilcnt_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/socket.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_param.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/_param.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/net/net_kev.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_sa_family_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_socklen_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_iovec_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/netinet/in.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/netinet6/in6.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/un.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/netdb.h + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/stdio.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include/stdarg.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_stdio.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_symbol_aliasing.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_posix_availability.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/Availability.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/AvailabilityInternal.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_va_list.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int8_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int16_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int32_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int64_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int8_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int16_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int32_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int64_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_intptr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uintptr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_size_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_null.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/stdio.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_off_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ssize_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_stdio.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_common.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdlib.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/wait.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_pid_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_id_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/signal.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/appleapiopts.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/signal.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/signal.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_mcontext.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/_mcontext.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/machine/_structs.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/i386/_structs.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_attr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_sigaltstack.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ucontext.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_sigset_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uid_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/resource.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include/stdint.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/stdint.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint8_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint16_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint32_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint64_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_intmax_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uintmax_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_timeval.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/endian.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/endian.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_endian.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/_OSByteOrder.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/i386/_OSByteOrder.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/alloca.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ct_rune_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_rune_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_wchar_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/malloc/_malloc.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_dev_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_mode_t.h: + +../../../../config.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/unistd.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/unistd.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_posix_vdisable.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_seek_set.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_gid_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_useconds_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/select.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_def.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_timespec.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_time_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_suseconds_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_setsize.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_set.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_clr.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_isset.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_zero.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_copy.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_select.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uuid_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/gethostuuid.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/string.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_rsize_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_errno_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/strings.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_strings.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_string.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_char.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_short.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_caddr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_blkcnt_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_blksize_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_in_addr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_in_port_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ino_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ino64_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_key_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_nlink_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_clock_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_cond_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_condattr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_mutex_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_mutexattr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_once_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_rwlock_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_rwlockattr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_key_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fsblkcnt_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fsfilcnt_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/socket.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_param.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/_param.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/net/net_kev.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_sa_family_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_socklen_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_iovec_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/netinet/in.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/netinet6/in6.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/un.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/netdb.h: diff --git a/GX-PAW/common/src/02_clib/.deps/xexit.Po b/GX-PAW/common/src/02_clib/.deps/xexit.Po new file mode 100644 index 00000000..5c3d0f1d --- /dev/null +++ b/GX-PAW/common/src/02_clib/.deps/xexit.Po @@ -0,0 +1,402 @@ +xexit.o: xexit.c ../../../../shared/common/src/incs/abi_clib.h \ + ../../../../config.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/stdio.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include/stdarg.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_stdio.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_symbol_aliasing.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_posix_availability.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/Availability.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/AvailabilityInternal.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_va_list.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int8_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int16_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int32_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int64_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int8_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int16_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int32_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int64_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_intptr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uintptr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_size_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_null.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/stdio.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_off_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ssize_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_stdio.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_common.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdlib.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/wait.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_pid_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_id_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/signal.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/appleapiopts.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/signal.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/signal.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_mcontext.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/_mcontext.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/machine/_structs.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/i386/_structs.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_attr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_sigaltstack.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ucontext.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_sigset_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uid_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/resource.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include/stdint.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/stdint.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint8_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint16_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint32_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint64_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_intmax_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uintmax_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_timeval.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/endian.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/endian.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_endian.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/_OSByteOrder.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/i386/_OSByteOrder.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/alloca.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ct_rune_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_rune_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_wchar_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/malloc/_malloc.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_dev_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_mode_t.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include/stddef.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_char.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_short.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_caddr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_blkcnt_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_blksize_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_gid_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_in_addr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_in_port_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ino_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ino64_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_key_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_nlink_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_clock_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_time_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_useconds_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_suseconds_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_rsize_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_errno_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_def.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_setsize.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_set.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_clr.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_zero.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_isset.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_copy.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_cond_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_condattr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_mutex_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_mutexattr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_once_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_rwlock_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_rwlockattr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_key_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fsblkcnt_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fsfilcnt_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/inttypes.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/string.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/strings.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_strings.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_string.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/errno.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/errno.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/malloc.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/math.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/stat.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_timespec.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_s_ifmt.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_filesec_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/unistd.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/unistd.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_posix_vdisable.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_seek_set.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/select.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_select.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uuid_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/gethostuuid.h + +../../../../shared/common/src/incs/abi_clib.h: + +../../../../config.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/stdio.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include/stdarg.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_stdio.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_symbol_aliasing.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_posix_availability.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/Availability.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/AvailabilityInternal.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_va_list.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int8_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int16_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int32_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int64_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int8_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int16_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int32_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int64_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_intptr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uintptr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_size_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_null.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/stdio.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_off_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ssize_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_stdio.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_common.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdlib.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/wait.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_pid_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_id_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/signal.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/appleapiopts.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/signal.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/signal.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_mcontext.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/_mcontext.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/machine/_structs.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/i386/_structs.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_attr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_sigaltstack.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ucontext.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_sigset_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uid_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/resource.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include/stdint.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/stdint.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint8_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint16_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint32_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint64_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_intmax_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uintmax_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_timeval.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/endian.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/endian.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_endian.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/_OSByteOrder.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/i386/_OSByteOrder.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/alloca.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ct_rune_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_rune_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_wchar_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/malloc/_malloc.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_dev_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_mode_t.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include/stddef.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_char.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_short.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_caddr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_blkcnt_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_blksize_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_gid_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_in_addr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_in_port_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ino_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ino64_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_key_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_nlink_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_clock_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_time_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_useconds_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_suseconds_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_rsize_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_errno_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_def.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_setsize.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_set.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_clr.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_zero.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_isset.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_copy.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_cond_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_condattr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_mutex_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_mutexattr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_once_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_rwlock_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_rwlockattr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_key_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fsblkcnt_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fsfilcnt_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/inttypes.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/string.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/strings.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_strings.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_string.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/errno.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/errno.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/malloc.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/math.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/stat.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_timespec.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_s_ifmt.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_filesec_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/unistd.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/unistd.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_posix_vdisable.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_seek_set.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/select.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_select.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uuid_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/gethostuuid.h: diff --git a/GX-PAW/common/src/02_clib/.deps/xmalloc.Po b/GX-PAW/common/src/02_clib/.deps/xmalloc.Po new file mode 100644 index 00000000..c5a05ece --- /dev/null +++ b/GX-PAW/common/src/02_clib/.deps/xmalloc.Po @@ -0,0 +1,405 @@ +xmalloc.o: xmalloc.c ../../../../shared/common/src/incs/abi_clib.h \ + ../../../../config.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/stdio.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include/stdarg.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_stdio.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_symbol_aliasing.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_posix_availability.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/Availability.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/AvailabilityInternal.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_va_list.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int8_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int16_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int32_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int64_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int8_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int16_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int32_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int64_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_intptr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uintptr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_size_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_null.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/stdio.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_off_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ssize_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_stdio.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_common.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdlib.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/wait.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_pid_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_id_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/signal.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/appleapiopts.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/signal.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/signal.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_mcontext.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/_mcontext.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/machine/_structs.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/i386/_structs.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_attr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_sigaltstack.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ucontext.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_sigset_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uid_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/resource.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include/stdint.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/stdint.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint8_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint16_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint32_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint64_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_intmax_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uintmax_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_timeval.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/endian.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/endian.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_endian.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/_OSByteOrder.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/i386/_OSByteOrder.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/alloca.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ct_rune_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_rune_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_wchar_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/malloc/_malloc.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_dev_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_mode_t.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include/stddef.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_char.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_short.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_caddr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_blkcnt_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_blksize_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_gid_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_in_addr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_in_port_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ino_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ino64_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_key_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_nlink_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_clock_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_time_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_useconds_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_suseconds_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_rsize_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_errno_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_def.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_setsize.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_set.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_clr.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_zero.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_isset.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_copy.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_cond_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_condattr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_mutex_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_mutexattr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_once_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_rwlock_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_rwlockattr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_key_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fsblkcnt_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fsfilcnt_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/inttypes.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/string.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/strings.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_strings.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_string.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/errno.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/errno.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/malloc.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/math.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/stat.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_timespec.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_s_ifmt.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_filesec_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/unistd.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/unistd.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_posix_vdisable.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_seek_set.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/select.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_select.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uuid_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/gethostuuid.h \ + xmalloc.h + +../../../../shared/common/src/incs/abi_clib.h: + +../../../../config.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/stdio.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include/stdarg.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_stdio.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_symbol_aliasing.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_posix_availability.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/Availability.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/AvailabilityInternal.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_va_list.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int8_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int16_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int32_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int64_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int8_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int16_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int32_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int64_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_intptr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uintptr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_size_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_null.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/stdio.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_off_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ssize_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_stdio.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_common.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdlib.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/wait.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_pid_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_id_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/signal.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/appleapiopts.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/signal.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/signal.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_mcontext.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/_mcontext.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/machine/_structs.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/i386/_structs.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_attr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_sigaltstack.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ucontext.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_sigset_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uid_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/resource.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include/stdint.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/stdint.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint8_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint16_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint32_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint64_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_intmax_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uintmax_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_timeval.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/endian.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/endian.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_endian.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/_OSByteOrder.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/i386/_OSByteOrder.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/alloca.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ct_rune_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_rune_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_wchar_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/malloc/_malloc.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_dev_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_mode_t.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include/stddef.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_char.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_short.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_caddr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_blkcnt_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_blksize_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_gid_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_in_addr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_in_port_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ino_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ino64_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_key_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_nlink_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_clock_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_time_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_useconds_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_suseconds_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_rsize_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_errno_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_def.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_setsize.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_set.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_clr.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_zero.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_isset.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_copy.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_cond_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_condattr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_mutex_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_mutexattr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_once_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_rwlock_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_rwlockattr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_key_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fsblkcnt_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fsfilcnt_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/inttypes.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/string.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/strings.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_strings.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_string.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/errno.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/errno.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/malloc.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/math.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/stat.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_timespec.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_s_ifmt.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_filesec_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/unistd.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/unistd.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_posix_vdisable.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_seek_set.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/select.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_select.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uuid_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/gethostuuid.h: + +xmalloc.h: diff --git a/GX-PAW/common/src/02_clib/Makefile b/GX-PAW/common/src/02_clib/Makefile new file mode 100644 index 00000000..c6c7ba9d --- /dev/null +++ b/GX-PAW/common/src/02_clib/Makefile @@ -0,0 +1,1548 @@ +# Makefile.in generated by automake 1.16.3 from Makefile.am. +# shared/common/src/02_clib/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994-2020 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-corelibs on 2024/03/16 21:07:38 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-corelibs script or its config file instead. +# + + +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/abinit +pkgincludedir = $(includedir)/abinit +pkglibdir = $(libdir)/abinit +pkglibexecdir = $(libexecdir)/abinit +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = x86_64-apple-darwin18.7.0 +host_triplet = x86_64-apple-darwin18.7.0 +target_triplet = x86_64-apple-darwin18.7.0 +subdir = shared/common/src/02_clib +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/m4/arch-gpu.m4 \ + $(top_srcdir)/config/m4/arch-mpi.m4 \ + $(top_srcdir)/config/m4/auto-autotools.m4 \ + $(top_srcdir)/config/m4/auto-corelibs.m4 \ + $(top_srcdir)/config/m4/auto-debug.m4 \ + $(top_srcdir)/config/m4/auto-dirflags.m4 \ + $(top_srcdir)/config/m4/auto-env.m4 \ + $(top_srcdir)/config/m4/auto-hints.m4 \ + $(top_srcdir)/config/m4/auto-optim.m4 \ + $(top_srcdir)/config/m4/auto-options.m4 \ + $(top_srcdir)/config/m4/auto-output.m4 \ + $(top_srcdir)/config/m4/auto-triggers.m4 \ + $(top_srcdir)/config/m4/conf-atompaw.m4 \ + $(top_srcdir)/config/m4/conf-debug.m4 \ + $(top_srcdir)/config/m4/conf-fallbacks.m4 \ + $(top_srcdir)/config/m4/conf-files.m4 \ + $(top_srcdir)/config/m4/conf-init.m4 \ + $(top_srcdir)/config/m4/conf-openmp.m4 \ + $(top_srcdir)/config/m4/conf-optim.m4 \ + $(top_srcdir)/config/m4/lang-c++.m4 \ + $(top_srcdir)/config/m4/lang-c.m4 \ + $(top_srcdir)/config/m4/lang-fortran-import.m4 \ + $(top_srcdir)/config/m4/lang-fortran.m4 \ + $(top_srcdir)/config/m4/lang-python.m4 \ + $(top_srcdir)/config/m4/libxml2.m4 \ + $(top_srcdir)/config/m4/misc-display.m4 \ + $(top_srcdir)/config/m4/sd_abinit_common.m4 \ + $(top_srcdir)/config/m4/sd_arch_gpu.m4 \ + $(top_srcdir)/config/m4/sd_arch_mpi.m4 \ + $(top_srcdir)/config/m4/sd_bigdft.m4 \ + $(top_srcdir)/config/m4/sd_core.m4 \ + $(top_srcdir)/config/m4/sd_esl.m4 \ + $(top_srcdir)/config/m4/sd_fftw3.m4 \ + $(top_srcdir)/config/m4/sd_gpu_kokkos.m4 \ + $(top_srcdir)/config/m4/sd_gpu_yakl.m4 \ + $(top_srcdir)/config/m4/sd_io_hdf5.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf_fortran.m4 \ + $(top_srcdir)/config/m4/sd_levmar.m4 \ + $(top_srcdir)/config/m4/sd_libpaw.m4 \ + $(top_srcdir)/config/m4/sd_libpsml.m4 \ + $(top_srcdir)/config/m4/sd_libxc.m4 \ + $(top_srcdir)/config/m4/sd_math_fft.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_core.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_util.m4 \ + $(top_srcdir)/config/m4/sd_papi.m4 \ + $(top_srcdir)/config/m4/sd_pfft.m4 \ + $(top_srcdir)/config/m4/sd_triqs.m4 \ + $(top_srcdir)/config/m4/sd_wannier90.m4 \ + $(top_srcdir)/config/m4/sd_xmlf90.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +AM_V_AR = $(am__v_AR_$(V)) +am__v_AR_ = $(am__v_AR_$(AM_DEFAULT_VERBOSITY)) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = +lib02_clib_a_AR = $(AR) $(ARFLAGS) +lib02_clib_a_LIBADD = +am__objects_1 = calling_levmar.$(OBJEXT) cclock.$(OBJEXT) \ + etime.$(OBJEXT) sockets.$(OBJEXT) m_fsockets.$(OBJEXT) \ + fsi_posix.$(OBJEXT) gnu_tools.$(OBJEXT) mallinfo.$(OBJEXT) \ + md5.$(OBJEXT) rlimit.$(OBJEXT) xexit.$(OBJEXT) \ + xmalloc.$(OBJEXT) m_clib.$(OBJEXT) +am_lib02_clib_a_OBJECTS = $(am__objects_1) +lib02_clib_a_OBJECTS = $(am_lib02_clib_a_OBJECTS) +AM_V_P = $(am__v_P_$(V)) +am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY)) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I. -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/config/gnu/depcomp +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/calling_levmar.Po \ + ./$(DEPDIR)/cclock.Po ./$(DEPDIR)/etime.Po \ + ./$(DEPDIR)/fsi_posix.Po ./$(DEPDIR)/gnu_tools.Po \ + ./$(DEPDIR)/mallinfo.Po ./$(DEPDIR)/md5.Po \ + ./$(DEPDIR)/rlimit.Po ./$(DEPDIR)/sockets.Po \ + ./$(DEPDIR)/xexit.Po ./$(DEPDIR)/xmalloc.Po +am__mv = mv -f +PPFCCOMPILE = $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) +AM_V_PPFC = $(am__v_PPFC_$(V)) +am__v_PPFC_ = $(am__v_PPFC_$(AM_DEFAULT_VERBOSITY)) +am__v_PPFC_0 = @echo " PPFC " $@; +am__v_PPFC_1 = +FCLD = $(FC) +FCLINK = $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \ + $@ +AM_V_FCLD = $(am__v_FCLD_$(V)) +am__v_FCLD_ = $(am__v_FCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_FCLD_0 = @echo " FCLD " $@; +am__v_FCLD_1 = +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(lib02_clib_a_SOURCES) +DIST_SOURCES = $(lib02_clib_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in \ + $(top_srcdir)/config/gnu/depcomp +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ABINIT_BINARY_PACKAGE = abinit-10.0.0.83-58be4d_x86_64_darwin18.7.0_gnu9.4 +ABINIT_COMMON_CPPFLAGS = +ABINIT_COMMON_FCFLAGS = +ABINIT_COMMON_LDFLAGS = +ABINIT_COMMON_LIBS = +ABINIT_TARGET = x86_64_darwin18.7.0_gnu9.4 +ABINIT_VERSION = 10.0.0.83-58be4d +ABINIT_VERSION_BASE = 10.0 +ABINIT_VERSION_BUILD = 20240316 +ABINIT_VERSION_MAJOR = 10 +ABINIT_VERSION_MICRO = 0 +ABINIT_VERSION_MINOR = 0 +ABI_CPPFLAGS = -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include +ACLOCAL = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' aclocal-1.16 +AMTAR = $${TAR-tar} +AM_DEFAULT_VERBOSITY = 1 +AR = ar +ARFLAGS = rc +ARFLAGS_CMD = rc +ARFLAGS_DEBUG = +ARFLAGS_EXTRA = +ARFLAGS_HINTS = +ARFLAGS_OPTIM = +ATOMPAW_BIN = +AUTOCONF = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' autoconf +AUTOHEADER = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' autoheader +AUTOMAKE = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' automake-1.16 +AWK = awk +BIGDFT_CPPFLAGS = +BIGDFT_FCFLAGS = +BIGDFT_LDFLAGS = +BIGDFT_LIBS = +BOURNE_SHELL = /bin/sh +CC = /opt/local/bin/mpicc +CCDEPMODE = depmode=gcc3 +CC_LDFLAGS = +CC_LDFLAGS_DEBUG = +CC_LDFLAGS_EXTRA = +CC_LDFLAGS_GPU = +CC_LDFLAGS_HINTS = +CC_LDFLAGS_OPTIM = +CC_LIBS = +CC_LIBS_DEBUG = +CC_LIBS_EXTRA = +CC_LIBS_GPU = +CC_LIBS_HINTS = +CC_LIBS_OPTIM = +CFLAGS = -O2 -g +CFLAGS_DEBUG = +CFLAGS_EXTRA = +CFLAGS_GPU = +CFLAGS_HINTS = +CFLAGS_OPTIM = +CPP = /opt/local/bin/mpicc -E +CPPFLAGS = +CPPFLAGS_DEBUG = +CPPFLAGS_EXTRA = +CPPFLAGS_GPU = +CPPFLAGS_HINTS = +CPPFLAGS_HINTS_EXT = -P -std=c99 +CPPFLAGS_OPTIM = +CXX = /opt/local/bin/mpicxx +CXXDEPMODE = depmode=gcc3 +CXXFLAGS = -O2 -g +CXXFLAGS_DEBUG = +CXXFLAGS_EXTRA = +CXXFLAGS_GPU = +CXXFLAGS_HINTS = +CXXFLAGS_OPTIM = +CXX_LDFLAGS = +CXX_LDFLAGS_DEBUG = +CXX_LDFLAGS_EXTRA = +CXX_LDFLAGS_GPU = +CXX_LDFLAGS_HINTS = +CXX_LDFLAGS_OPTIM = +CXX_LIBS = +CXX_LIBS_DEBUG = +CXX_LIBS_EXTRA = +CXX_LIBS_GPU = +CXX_LIBS_HINTS = +CXX_LIBS_OPTIM = +CYGPATH_W = echo +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +ECHO_C = \c +ECHO_N = +ECHO_T = +EGREP = /usr/bin/grep -E +EXEEXT = +F77 = /opt/local/bin/mpif90 +FC = /opt/local/bin/mpif90 +FCFLAGS = -O2 -g -ffree-line-length-none -I/opt/local/include -I/opt/local/include -I/opt/local/include +FCFLAGS_DEBUG = +FCFLAGS_EXTRA = +FCFLAGS_F90 = +FCFLAGS_FIXEDFORM = -ffixed-form +FCFLAGS_FREEFORM = -ffree-form +FCFLAGS_HINTS = -ffree-line-length-none +FCFLAGS_MODDIR = -J../mods +FCFLAGS_OPENMP = +FCFLAGS_OPENMP_OFFLOAD = +FCFLAGS_OPTIM = +FCLIBS = -L/opt/local/lib -L/opt/local/lib/openmpi-gcc9 -L/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0 -L/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/../../.. -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi -lgfortran -lquadmath -lm +FC_LDFLAGS = +FC_LDFLAGS_DEBUG = +FC_LDFLAGS_EXTRA = +FC_LDFLAGS_HINTS = +FC_LDFLAGS_OPTIM = +FC_LIBS = +FC_LIBS_DEBUG = +FC_LIBS_EXTRA = +FC_LIBS_HINTS = +FC_LIBS_OPTIM = +FC_NOWRAP = /opt/local/bin/mpif90 +FFLAGS = -O2 -g -ffree-line-length-none -I/opt/local/include -I/opt/local/include -I/opt/local/include +FFTW3_CFLAGS = +FFTW3_CPPFLAGS = -I/opt/local/include +FFTW3_FCFLAGS = -I/opt/local/include +FFTW3_LDFLAGS = +FFTW3_LIBS = -L/opt/local/lib -lfftw3 -lfftw3f +FFT_CFLAGS = +FFT_FCFLAGS = +FPP = +FPPFLAGS = +FPPFLAGS_DEBUG = +FPPFLAGS_EXTRA = +FPPFLAGS_HINTS = +FPPFLAGS_OPTIM = +GPU_ARCH = +GPU_CFLAGS = +GPU_CPPFLAGS = +GPU_CXXFLAGS = +GPU_FCFLAGS = +GPU_LDFLAGS = +GPU_LIBS = +GRAPHATOM_BIN = +GREP = /usr/bin/grep +H5CC = +HDF5_CFLAGS = +HDF5_CPPFLAGS = +HDF5_CXXFLAGS = +HDF5_FCFLAGS = +HDF5_LDFLAGS = +HDF5_LIBS = +INSTALL = /opt/local/libexec/gnubin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +KOKKOS_CPPFLAGS = +KOKKOS_CXXFLAGS = +KOKKOS_LDFLAGS = +KOKKOS_LIBS = +LDFLAGS = +LEVMAR_CFLAGS = +LEVMAR_CPPFLAGS = +LEVMAR_LDFLAGS = +LEVMAR_LIBS = +LIBOBJS = +LIBPAW_CPPFLAGS = +LIBPAW_FCFLAGS = +LIBPAW_LDFLAGS = +LIBPAW_LIBS = +LIBPSML_CPPFLAGS = +LIBPSML_FCFLAGS = +LIBPSML_LDFLAGS = +LIBPSML_LIBS = +LIBS = -L/opt/local/lib -lwannier -L/opt/local/lib -lxc -L/opt/local/lib -lnetcdff -L/opt/local/lib -lnetcdf -L/opt/local/lib -L/opt/local/lib -lhdf5_hl -L/opt/local/lib -lhdf5 -lz -ldl -lm -L/opt/local/lib -lfftw3 -lfftw3f +LIBXC_CFLAGS = +LIBXC_CPPFLAGS = +LIBXC_FCFLAGS = +LIBXC_LDFLAGS = +LIBXC_LIBS = +LIBXML2_CPPFLAGS = +LIBXML2_FCFLAGS = +LIBXML2_LIBS = +LINALG_CFLAGS = +LINALG_CPPFLAGS = +LINALG_CXXFLAGS = +LINALG_FCFLAGS = -I/opt/local/include +LINALG_LDFLAGS = +LINALG_LIBS = -L/opt/local/lib -lopenblas +LN_S = ln -s +LTLIBOBJS = +MAKEINFO = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' makeinfo +MKDIR_P = /opt/local/libexec/gnubin/mkdir -p +MODEXT = mod +MPI_CFLAGS = +MPI_CPPFLAGS = +MPI_CXXFLAGS = +MPI_FCFLAGS = +MPI_LDFLAGS = +MPI_LIBS = +MV = /opt/local/libexec/gnubin/mv +NETCDF_CFLAGS = +NETCDF_CPPFLAGS = +NETCDF_CXXFLAGS = +NETCDF_FCFLAGS = +NETCDF_FORTRAN_CFLAGS = +NETCDF_FORTRAN_CPPFLAGS = +NETCDF_FORTRAN_CXXFLAGS = +NETCDF_FORTRAN_FCFLAGS = +NETCDF_FORTRAN_LDFLAGS = +NETCDF_FORTRAN_LIBS = +NETCDF_LDFLAGS = +NETCDF_LIBS = +NVCC = +NVCC_CFLAGS = +NVCC_CPPFLAGS = +NVCC_LDFLAGS = +NVCC_LIBS = +OBJEXT = o +PACKAGE = abinit +PACKAGE_BUGREPORT = https://bugs.launchpad.net/abinit/ +PACKAGE_NAME = ABINIT +PACKAGE_STRING = ABINIT 10.0.0.83-58be4d +PACKAGE_TARNAME = abinit +PACKAGE_URL = +PACKAGE_VERSION = 10.0.0.83-58be4d +PAPI_CFLAGS = +PAPI_CPPFLAGS = +PAPI_LDFLAGS = +PAPI_LIBS = +PATCH = patch +PATH_SEPARATOR = : +PERL = /usr/bin/perl +PFFT_CFLAGS = +PFFT_CPPFLAGS = +PFFT_LDFLAGS = +PFFT_LIBS = +PYFLAGS = +PYTHON = python3.9 +PYTHON_CONFIG = python3.9-config +PYTHON_CPPFLAGS = -I/opt/local/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -I/opt/local/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 +RANLIB = ranlib +REALPATH = realpath +RM = /opt/local/libexec/gnubin/rm +SED = /usr/bin/sed +SET_MAKE = +SHELL = /bin/sh +STRIP = +TAR = tar +TRIQS_CFLAGS = +TRIQS_CPPFLAGS = +TRIQS_CXXFLAGS = +TRIQS_LDFLAGS = +TRIQS_LIBS = +TRUE_CPP = cpp +VERSION = 10.0.0.83-58be4d +WANNIER90_CPPFLAGS = +WANNIER90_FCFLAGS = -I/opt/local/include +WANNIER90_LDFLAGS = +WANNIER90_LIBS = -L/opt/local/lib -lwannier +XML2_CONFIG = +XMLF90_CPPFLAGS = +XMLF90_FCFLAGS = +XMLF90_LDFLAGS = +XMLF90_LIBS = +XML_CPPFLAGS = +XML_LIBS = +XPP = +XPPFLAGS = +XPPFLAGS_DEBUG = +XPPFLAGS_EXTRA = +XPPFLAGS_OPTIM = +YAKL_CPPFLAGS = +YAKL_FCFLAGS = +YAKL_LDFLAGS = +YAKL_LIBS = +abi_ac_distcheck = --with-config-file="/Users/gonze/_Research/ABINIT_git/gonze/mac-1P0-225.ac9" +abi_ac_version = 027100 +abi_am_version = 011603 +abi_avx_safe_mode_enable = no +abi_bse_unpacked_enable = no +abi_cc_path = +abi_cc_vendor = gnu +abi_cc_version = 9.4 +abi_cclock_enable = no +abi_cpp_path = +abi_cpu_64bits = yes +abi_cpu_bits = 64 +abi_cpu_model = unknown +abi_cpu_platform = apple +abi_cpu_spec = unknown_unknown +abi_cpu_vendor = unknown +abi_crpa_optim_enable = no +abi_cxx_path = +abi_cxx_vendor = gnu +abi_cxx_version = 9.4 +abi_debug_flavor = basic +abi_exports_enable = no +abi_fbk_abinit_common_ok = no +abi_fbk_bigdft_ok = disabled +abi_fbk_config = +abi_fbk_enable = no +abi_fbk_fft_ok = no +abi_fbk_fftw3_ok = no +abi_fbk_gpu_ok = no +abi_fbk_hdf5_ok = disabled +abi_fbk_init = def +abi_fbk_kokkos_ok = no +abi_fbk_levmar_ok = no +abi_fbk_libpaw_ok = no +abi_fbk_libpsml_ok = disabled +abi_fbk_libxc_ok = disabled +abi_fbk_libxml2_ok = no +abi_fbk_linalg_ok = disabled +abi_fbk_list = +abi_fbk_mpi_ok = no +abi_fbk_netcdf_fortran_ok = disabled +abi_fbk_netcdf_ok = disabled +abi_fbk_papi_ok = no +abi_fbk_pfft_ok = no +abi_fbk_prefix = +abi_fbk_required = +abi_fbk_triqs_ok = no +abi_fbk_wannier90_ok = disabled +abi_fbk_xmlf90_ok = disabled +abi_fbk_yakl_ok = no +abi_fc_path = +abi_fc_vendor = gnu +abi_fc_version = 9.4 +abi_fc_wrap = no +abi_fc_wrapper_enable = no +abi_fpp_path = +abi_gpu_arch = +abi_gpu_fcflags = +abi_gpu_flavor = none +abi_gpu_hip_libdir = +abi_gpu_incs = +abi_gpu_ldflags = +abi_gpu_libs = +abi_gpu_nvtx_v3 = +abi_gpu_roctx = +abi_gw_dpc_enable = yes +abi_hints_enable = yes +abi_libtetra_enable = yes +abi_libxml2_cppflags = +abi_libxml2_enable = no +abi_libxml2_fcflags = +abi_libxml2_init = def +abi_libxml2_ldflags = +abi_libxml2_libs = +abi_libxml2_ok = unknown +abi_libxml2_prefix = +abi_lotf_enable = no +abi_lt_version = 020406 +abi_m4_version = 010419 +abi_memory_profiling_enable = no +abi_mpi_cflags = +abi_mpi_cppflags = +abi_mpi_cxxflags = +abi_mpi_enable = yes +abi_mpi_fcflags = +abi_mpi_flavor = auto +abi_mpi_gpu_aware_enable = no +abi_mpi_incs = +abi_mpi_inplace_enable = yes +abi_mpi_interfaces_bugfix_enable = no +abi_mpi_io_default_enable = no +abi_mpi_io_enable = yes +abi_mpi_ldflags = +abi_mpi_level = 2 +abi_mpi_libs = +abi_netcdf_default_enable = no +abi_openmp_enable = no +abi_openmp_offload_enable = no +abi_optim_flavor = standard +abi_python_invocation_enable = no +abi_source_debug_enable = no +abi_stdin_enable = yes +abi_sys_spec = darwin-x86_64 +abi_timer_enable = yes +abi_triqs_v1_4_enable = no +abi_triqs_v2_0_enable = no +abi_zdot_bugfix_enable = no +abinit_bindir = /usr/local/bin +abinit_builddir = /Users/gonze/_Research/ABINIT_git/gonze +abinit_chkdir = /usr/local/share/abinit/tests +abinit_datdir = /usr/local/share/abinit +abinit_docdir = /usr/local/doc/abinit +abinit_incdir = /usr/local/include +abinit_libdir = /usr/local/lib +abinit_mandir = /usr/local/share/man +abinit_prefix = /usr/local +abinit_srcdir = /Users/gonze/_Research/ABINIT_git/gonze +abs_builddir = /Users/gonze/_Research/ABINIT_git/gonze/shared/common/src/02_clib +abs_srcdir = /Users/gonze/_Research/ABINIT_git/gonze/shared/common/src/02_clib +abs_top_builddir = /Users/gonze/_Research/ABINIT_git/gonze +abs_top_srcdir = /Users/gonze/_Research/ABINIT_git/gonze +ac_ct_CC = +ac_ct_CXX = +ac_ct_FC = +am__include = include +am__leading_dot = . +am__quote = +am__tar = tar --format=ustar -chf - "$$tardir" +am__untar = tar -xf - +bindir = ${exec_prefix}/bin +build = x86_64-apple-darwin18.7.0 +build_alias = +build_cpu = x86_64 +build_os = darwin18.7.0 +build_vendor = apple +builddir = . +cc_info_string = gcc-mp-9 (MacPorts gcc9 9.4.0_0) 9.4.0 +cxx_info_string = g++-mp-9 (MacPorts gcc9 9.4.0_0) 9.4.0 +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +enable_avx_safe_mode = +enable_bse_unpacked = +enable_cclock = +enable_crpa_optim = +enable_exports = +enable_fc_wrapper = +enable_gw_dpc = yes +enable_hints = +enable_libtetra = +enable_lotf = +enable_memory_profiling = +enable_mpi_gpu_aware = +enable_mpi_inplace = +enable_mpi_interfaces_bugfix = +enable_mpi_io = yes +enable_mpi_io_default = +enable_netcdf_default = +enable_openmp = +enable_openmp_offload = +enable_python_invocation = +enable_shared = +enable_source_debug = +enable_static = +enable_stdin = +enable_timer = +enable_triqs_v1_4 = +enable_triqs_v2_0 = +enable_zdot_bugfix = +exec_prefix = ${prefix} +fc_info_string = GNU Fortran (MacPorts gcc9 9.4.0_0) 9.4.0 +fc_mod_fcflags = +fc_timing = standard +fcflags_opt_02_clib = +fcflags_opt_10_defs = +fcflags_opt_11_memory_mpi = +fcflags_opt_12_hide_mpi = +fcflags_opt_14_hidewrite = +fcflags_opt_16_hideleave = +fcflags_opt_16_kokkos_toolbox = +fcflags_opt_17_gpu_toolbox = +fcflags_opt_17_libtetra_ext = +fcflags_opt_17_minimax = +fcflags_opt_17_yaml_out = +fcflags_opt_18_timing = +fcflags_opt_21_hashfuncs = +fcflags_opt_27_toolbox_oop = +fcflags_opt_28_numeric_noabirule = +fcflags_opt_29_kpoints = +fcflags_opt_32_util = +fcflags_opt_33_xc_lowlevel = +fcflags_opt_39_libpaw = +fcflags_opt_41_geometry = +fcflags_opt_42_nlstrain = +fcflags_opt_42_parser = +fcflags_opt_43_ptgroups = -O0 +fcflags_opt_43_wvl_wrappers = +fcflags_opt_44_abitools = +fcflags_opt_44_abitypes_defs = +fcflags_opt_44_manage_kokkos = +fcflags_opt_45_geomoptim = +fcflags_opt_45_xgTools = +fcflags_opt_46_ghc_omp = +fcflags_opt_46_manage_cuda = +fcflags_opt_48_diago = +fcflags_opt_49_gw_toolbox_oop = +fcflags_opt_51_manage_mpi = +fcflags_opt_52_fft_mpi_noabirule = +fcflags_opt_53_ffts = +fcflags_opt_54_spacepar = +fcflags_opt_55_abiutil = +fcflags_opt_56_io_mpi = +fcflags_opt_56_mixing = +fcflags_opt_56_recipspace = +fcflags_opt_56_xc = +fcflags_opt_57_iopsp_parser = +fcflags_opt_57_iovars = +fcflags_opt_61_occeig = +fcflags_opt_62_cg_noabirule = +fcflags_opt_62_ctqmc = +fcflags_opt_62_iowfdenpot = +fcflags_opt_62_poisson = +fcflags_opt_62_wvl_wfs = +fcflags_opt_64_psp = +fcflags_opt_65_lotf_base = +fcflags_opt_65_paw = +fcflags_opt_66_nonlocal = +fcflags_opt_66_vdwxc = +fcflags_opt_66_wfs = +fcflags_opt_67_common = +fcflags_opt_67_python_invocation_ext = +fcflags_opt_67_triqs_ext = +fcflags_opt_68_dmft = +fcflags_opt_68_lotf = +fcflags_opt_68_recursion = +fcflags_opt_68_rsprc = +fcflags_opt_69_wfdesc = +fcflags_opt_70_gw = +fcflags_opt_71_bse = +fcflags_opt_71_wannier = +fcflags_opt_72_response = +fcflags_opt_77_ddb = +fcflags_opt_77_suscep = +fcflags_opt_78_effpot = +fcflags_opt_78_eph = +fcflags_opt_79_seqpar_mpi = +fcflags_opt_80_rttddft = +fcflags_opt_80_tdep = +fcflags_opt_94_scfcv = +fcflags_opt_95_drive = +fcflags_opt_98_main = +fcflags_opt_bigdft = +fcflags_opt_default = +fcflags_opt_hdf5 = +fcflags_opt_levmar = +fcflags_opt_libpsml = +fcflags_opt_libxc = +fcflags_opt_libxml2 = +fcflags_opt_linalg = +fcflags_opt_netcdf = +fcflags_opt_netcdf_fortran = +fcflags_opt_papi = +fcflags_opt_triqs = +fcflags_opt_wannier90 = +fcflags_opt_xmlf90 = +host = x86_64-apple-darwin18.7.0 +host_alias = +host_cpu = x86_64 +host_os = darwin18.7.0 +host_vendor = apple +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = ${SHELL} /Users/gonze/_Research/ABINIT_git/gonze/config/gnu/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = ${datarootdir}/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = $(MKDIR_P) +oldincludedir = /usr/include +pdfdir = ${docdir} +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +runstatedir = ${localstatedir}/run +sbindir = ${exec_prefix}/sbin +sd_abinit_common_cppflags = +sd_abinit_common_enable = no +sd_abinit_common_enable_def = no +sd_abinit_common_fcflags = +sd_abinit_common_init = def +sd_abinit_common_ldflags = +sd_abinit_common_libs = +sd_abinit_common_ok = unknown +sd_abinit_common_options = optional skip +sd_abinit_common_policy = skip +sd_abinit_common_status = optional +sd_bigdft_cppflags = +sd_bigdft_enable = no +sd_bigdft_enable_def = no +sd_bigdft_fcflags = +sd_bigdft_init = def +sd_bigdft_ldflags = +sd_bigdft_libs = +sd_bigdft_ok = unknown +sd_bigdft_options = optional warn +sd_bigdft_policy = warn +sd_bigdft_status = optional +sd_fft_cflags = +sd_fft_choices = +sd_fft_cppflags = -I/opt/local/include +sd_fft_cxxflags = +sd_fft_enable = yes +sd_fft_fcflags = -I/opt/local/include +sd_fft_flavor = fftw3 +sd_fft_init = kwd +sd_fft_ldflags = +sd_fft_libs = -L/opt/local/lib -lfftw3 -lfftw3f +sd_fft_ok = yes +sd_fftw3_cflags = +sd_fftw3_cppflags = -I/opt/local/include +sd_fftw3_enable = yes +sd_fftw3_enable_def = no +sd_fftw3_fcflags = -I/opt/local/include +sd_fftw3_init = env +sd_fftw3_ldflags = +sd_fftw3_libs = -L/opt/local/lib -lfftw3 -lfftw3f +sd_fftw3_ok = yes +sd_fftw3_options = optional skip +sd_fftw3_policy = skip +sd_fftw3_status = optional +sd_gpu_cflags = +sd_gpu_cppflags = +sd_gpu_cxxflags = +sd_gpu_enable = no +sd_gpu_enable_def = no +sd_gpu_fcflags = +sd_gpu_init = def +sd_gpu_ldflags = +sd_gpu_libs = +sd_gpu_ok = no +sd_gpu_options = optional warn +sd_gpu_policy = warn +sd_gpu_prefix = +sd_gpu_status = optional +sd_hdf5_cflags = +sd_hdf5_cppflags = -I/opt/local/include -I/opt/local/include +sd_hdf5_cxxflags = +sd_hdf5_enable = yes +sd_hdf5_enable_def = yes +sd_hdf5_enable_fc = no +sd_hdf5_fcflags = +sd_hdf5_h5cc = /opt/local/bin/h5cc +sd_hdf5_h5fc = +sd_hdf5_init = dir +sd_hdf5_ldflags = +sd_hdf5_libs = -L/opt/local/lib -L/opt/local/lib -lhdf5_hl -L/opt/local/lib -lhdf5 -lz -ldl -lm +sd_hdf5_ok = yes +sd_hdf5_options = required no-fortran warn +sd_hdf5_policy = warn +sd_hdf5_status = required +sd_kokkos_cppflags = +sd_kokkos_cxxflags = +sd_kokkos_enable = no +sd_kokkos_enable_def = no +sd_kokkos_init = def +sd_kokkos_ldflags = +sd_kokkos_libs = +sd_kokkos_ok = unknown +sd_kokkos_options = optional fail +sd_kokkos_policy = fail +sd_kokkos_status = optional +sd_levmar_cflags = +sd_levmar_cppflags = +sd_levmar_enable = no +sd_levmar_enable_def = no +sd_levmar_init = def +sd_levmar_ldflags = +sd_levmar_libs = +sd_levmar_ok = unknown +sd_levmar_options = optional fail +sd_levmar_policy = fail +sd_levmar_status = optional +sd_libpaw_cppflags = +sd_libpaw_enable = no +sd_libpaw_enable_def = no +sd_libpaw_fcflags = +sd_libpaw_init = def +sd_libpaw_ldflags = +sd_libpaw_libs = +sd_libpaw_ok = unknown +sd_libpaw_options = optional skip +sd_libpaw_policy = skip +sd_libpaw_status = optional +sd_libpsml_cppflags = +sd_libpsml_enable = no +sd_libpsml_enable_def = no +sd_libpsml_fcflags = +sd_libpsml_init = def +sd_libpsml_ldflags = +sd_libpsml_libs = +sd_libpsml_ok = unknown +sd_libpsml_options = optional warn +sd_libpsml_policy = warn +sd_libpsml_status = optional +sd_libxc_cflags = +sd_libxc_cppflags = -I/opt/local/include +sd_libxc_enable = yes +sd_libxc_enable_def = yes +sd_libxc_enable_fc = no +sd_libxc_fcflags = +sd_libxc_init = dir +sd_libxc_ldflags = +sd_libxc_libs = -L/opt/local/lib -lxc +sd_libxc_ok = yes +sd_libxc_options = required no-fortran warn +sd_libxc_policy = warn +sd_libxc_status = required +sd_linalg_cflags = +sd_linalg_choices = +sd_linalg_cppflags = +sd_linalg_cxxflags = +sd_linalg_enable = yes +sd_linalg_fcflags = -I/opt/local/include +sd_linalg_flavor = openblas +sd_linalg_has_elpa = no +sd_linalg_has_scalapack = no +sd_linalg_init = env +sd_linalg_ldflags = +sd_linalg_libs = -L/opt/local/lib -lopenblas +sd_linalg_ok = yes +sd_mpi_cc = /opt/local/bin/mpicc +sd_mpi_cflags = +sd_mpi_cppflags = -I/opt/local/include +sd_mpi_cxx = /opt/local/bin/mpicxx +sd_mpi_enable = yes +sd_mpi_enable_cxx = yes +sd_mpi_enable_def = auto +sd_mpi_enable_fc = yes +sd_mpi_fc = /opt/local/bin/mpif90 +sd_mpi_fcflags = -I/opt/local/include +sd_mpi_init = dir +sd_mpi_ldflags = +sd_mpi_libs = +sd_mpi_ok = yes +sd_mpi_options = auto optional fail +sd_mpi_policy = fail +sd_mpi_status = optional +sd_netcdf_cflags = +sd_netcdf_cppflags = -I/opt/local/include +sd_netcdf_enable = yes +sd_netcdf_enable_def = yes +sd_netcdf_fcflags = -I/opt/local/include +sd_netcdf_fortran_cflags = +sd_netcdf_fortran_cppflags = -I/opt/local/include +sd_netcdf_fortran_enable = yes +sd_netcdf_fortran_enable_def = yes +sd_netcdf_fortran_fcflags = -I/opt/local/include +sd_netcdf_fortran_init = dir +sd_netcdf_fortran_ldflags = +sd_netcdf_fortran_libs = -L/opt/local/lib -lnetcdff +sd_netcdf_fortran_ok = yes +sd_netcdf_fortran_options = required warn +sd_netcdf_fortran_policy = warn +sd_netcdf_fortran_status = required +sd_netcdf_init = dir +sd_netcdf_ldflags = +sd_netcdf_libs = -L/opt/local/lib -lnetcdf +sd_netcdf_ok = yes +sd_netcdf_options = required warn +sd_netcdf_policy = warn +sd_netcdf_status = required +sd_papi_cflags = +sd_papi_cppflags = +sd_papi_enable = no +sd_papi_enable_def = no +sd_papi_init = def +sd_papi_ldflags = +sd_papi_libs = +sd_papi_ok = unknown +sd_papi_options = optional fail +sd_papi_policy = fail +sd_papi_sd_papi_fcflags = +sd_papi_status = optional +sd_pfft_cflags = +sd_pfft_cppflags = +sd_pfft_enable = no +sd_pfft_enable_def = no +sd_pfft_init = def +sd_pfft_ldflags = +sd_pfft_libs = +sd_pfft_ok = unknown +sd_pfft_options = optional skip +sd_pfft_policy = skip +sd_pfft_status = optional +sd_sys_fcflags = +sd_triqs_cflags = +sd_triqs_cppflags = +sd_triqs_cxxflags = +sd_triqs_enable = no +sd_triqs_enable_def = no +sd_triqs_fcflags = +sd_triqs_init = def +sd_triqs_ldflags = +sd_triqs_libs = +sd_triqs_ok = unknown +sd_triqs_options = optional fail +sd_triqs_policy = fail +sd_triqs_status = optional +sd_wannier90_cppflags = +sd_wannier90_enable = yes +sd_wannier90_enable_def = no +sd_wannier90_fcflags = -I/opt/local/include +sd_wannier90_init = env +sd_wannier90_ldflags = +sd_wannier90_libs = -L/opt/local/lib -lwannier +sd_wannier90_ok = yes +sd_wannier90_options = optional warn +sd_wannier90_policy = warn +sd_wannier90_status = optional +sd_xmlf90_cppflags = +sd_xmlf90_enable = no +sd_xmlf90_enable_def = no +sd_xmlf90_fcflags = +sd_xmlf90_init = def +sd_xmlf90_ldflags = +sd_xmlf90_libs = +sd_xmlf90_ok = unknown +sd_xmlf90_options = optional warn +sd_xmlf90_policy = warn +sd_xmlf90_status = optional +sd_yakl_cppflags = +sd_yakl_enable = no +sd_yakl_enable_def = no +sd_yakl_fcflags = +sd_yakl_init = def +sd_yakl_ldflags = +sd_yakl_libs = +sd_yakl_ok = unknown +sd_yakl_options = optional fail +sd_yakl_policy = fail +sd_yakl_status = optional +sharedstatedir = ${prefix}/com +src_02_clib_fcflags = -I$(top_builddir)/shared/common/src/02_clib -I$(top_srcdir)/shared/common/src/02_clib +src_10_defs_fcflags = -I$(top_builddir)/shared/common/src/10_defs -I$(top_srcdir)/shared/common/src/10_defs +src_11_memory_mpi_fcflags = -I$(top_builddir)/shared/common/src/11_memory_mpi -I$(top_srcdir)/shared/common/src/11_memory_mpi +src_12_hide_mpi_fcflags = -I$(top_builddir)/shared/common/src/12_hide_mpi -I$(top_srcdir)/shared/common/src/12_hide_mpi +src_14_hidewrite_fcflags = -I$(top_builddir)/shared/common/src/14_hidewrite -I$(top_srcdir)/shared/common/src/14_hidewrite +src_16_hideleave_fcflags = -I$(top_builddir)/shared/common/src/16_hideleave -I$(top_srcdir)/shared/common/src/16_hideleave +src_16_kokkos_toolbox_fcflags = -I$(top_builddir)/shared/common/src/16_kokkos_toolbox -I$(top_srcdir)/shared/common/src/16_kokkos_toolbox +src_17_gpu_toolbox_fcflags = -I$(top_builddir)/shared/common/src/17_gpu_toolbox -I$(top_srcdir)/shared/common/src/17_gpu_toolbox +src_17_libtetra_ext_fcflags = -I$(top_builddir)/shared/common/src/17_libtetra_ext -I$(top_srcdir)/shared/common/src/17_libtetra_ext +src_17_minimax_fcflags = -I$(top_builddir)/shared/common/src/17_minimax -I$(top_srcdir)/shared/common/src/17_minimax +src_17_yaml_out_fcflags = -I$(top_builddir)/shared/common/src/17_yaml_out -I$(top_srcdir)/shared/common/src/17_yaml_out +src_18_timing_fcflags = -I$(top_builddir)/shared/common/src/18_timing -I$(top_srcdir)/shared/common/src/18_timing +src_21_hashfuncs_fcflags = -I$(top_builddir)/shared/common/src/21_hashfuncs -I$(top_srcdir)/shared/common/src/21_hashfuncs +src_27_toolbox_oop_fcflags = -I$(top_builddir)/shared/common/src/27_toolbox_oop -I$(top_srcdir)/shared/common/src/27_toolbox_oop +src_28_numeric_noabirule_fcflags = -I$(top_builddir)/shared/common/src/28_numeric_noabirule -I$(top_srcdir)/shared/common/src/28_numeric_noabirule +src_29_kpoints_fcflags = -I$(top_builddir)/shared/common/src/29_kpoints -I$(top_srcdir)/shared/common/src/29_kpoints +src_32_util_fcflags = -I$(top_builddir)/shared/common/src/32_util -I$(top_srcdir)/shared/common/src/32_util +src_33_xc_lowlevel_fcflags = -I$(top_builddir)/shared/common/src/33_xc_lowlevel -I$(top_srcdir)/shared/common/src/33_xc_lowlevel +src_39_libpaw_fcflags = -I$(top_builddir)/shared/libpaw/src -I$(top_srcdir)/shared/libpaw/src +src_41_geometry_fcflags = -I$(top_builddir)/src/41_geometry -I$(top_srcdir)/src/41_geometry +src_42_nlstrain_fcflags = -I$(top_builddir)/src/42_nlstrain -I$(top_srcdir)/src/42_nlstrain +src_42_parser_fcflags = -I$(top_builddir)/src/42_parser -I$(top_srcdir)/src/42_parser +src_43_ptgroups_fcflags = -I$(top_builddir)/src/43_ptgroups -I$(top_srcdir)/src/43_ptgroups +src_43_wvl_wrappers_fcflags = -I$(top_builddir)/src/43_wvl_wrappers -I$(top_srcdir)/src/43_wvl_wrappers +src_44_abitools_fcflags = -I$(top_builddir)/src/44_abitools -I$(top_srcdir)/src/44_abitools +src_44_abitypes_defs_fcflags = -I$(top_builddir)/src/44_abitypes_defs -I$(top_srcdir)/src/44_abitypes_defs +src_44_manage_kokkos_fcflags = -I$(top_builddir)/src/44_manage_kokkos -I$(top_srcdir)/src/44_manage_kokkos +src_45_geomoptim_fcflags = -I$(top_builddir)/src/45_geomoptim -I$(top_srcdir)/src/45_geomoptim +src_45_xgTools_fcflags = -I$(top_builddir)/src/45_xgTools -I$(top_srcdir)/src/45_xgTools +src_46_ghc_omp_fcflags = -I$(top_builddir)/src/46_ghc_omp -I$(top_srcdir)/src/46_ghc_omp +src_46_manage_cuda_fcflags = -I$(top_builddir)/src/46_manage_cuda -I$(top_srcdir)/src/46_manage_cuda +src_48_diago_fcflags = -I$(top_builddir)/src/48_diago -I$(top_srcdir)/src/48_diago +src_49_gw_toolbox_oop_fcflags = -I$(top_builddir)/src/49_gw_toolbox_oop -I$(top_srcdir)/src/49_gw_toolbox_oop +src_51_manage_mpi_fcflags = -I$(top_builddir)/src/51_manage_mpi -I$(top_srcdir)/src/51_manage_mpi +src_52_fft_mpi_noabirule_fcflags = -I$(top_builddir)/src/52_fft_mpi_noabirule -I$(top_srcdir)/src/52_fft_mpi_noabirule +src_53_ffts_fcflags = -I$(top_builddir)/src/53_ffts -I$(top_srcdir)/src/53_ffts +src_54_spacepar_fcflags = -I$(top_builddir)/src/54_spacepar -I$(top_srcdir)/src/54_spacepar +src_55_abiutil_fcflags = -I$(top_builddir)/src/55_abiutil -I$(top_srcdir)/src/55_abiutil +src_56_io_mpi_fcflags = -I$(top_builddir)/src/56_io_mpi -I$(top_srcdir)/src/56_io_mpi +src_56_mixing_fcflags = -I$(top_builddir)/src/56_mixing -I$(top_srcdir)/src/56_mixing +src_56_recipspace_fcflags = -I$(top_builddir)/src/56_recipspace -I$(top_srcdir)/src/56_recipspace +src_56_xc_fcflags = -I$(top_builddir)/src/56_xc -I$(top_srcdir)/src/56_xc +src_57_iopsp_parser_fcflags = -I$(top_builddir)/src/57_iopsp_parser -I$(top_srcdir)/src/57_iopsp_parser +src_57_iovars_fcflags = -I$(top_builddir)/src/57_iovars -I$(top_srcdir)/src/57_iovars +src_61_occeig_fcflags = -I$(top_builddir)/src/61_occeig -I$(top_srcdir)/src/61_occeig +src_62_cg_noabirule_fcflags = -I$(top_builddir)/src/62_cg_noabirule -I$(top_srcdir)/src/62_cg_noabirule +src_62_ctqmc_fcflags = -I$(top_builddir)/src/62_ctqmc -I$(top_srcdir)/src/62_ctqmc +src_62_iowfdenpot_fcflags = -I$(top_builddir)/src/62_iowfdenpot -I$(top_srcdir)/src/62_iowfdenpot +src_62_poisson_fcflags = -I$(top_builddir)/src/62_poisson -I$(top_srcdir)/src/62_poisson +src_62_wvl_wfs_fcflags = -I$(top_builddir)/src/62_wvl_wfs -I$(top_srcdir)/src/62_wvl_wfs +src_64_psp_fcflags = -I$(top_builddir)/src/64_psp -I$(top_srcdir)/src/64_psp +src_65_lotf_base_fcflags = -I$(top_builddir)/src/65_lotf_base -I$(top_srcdir)/src/65_lotf_base +src_65_paw_fcflags = -I$(top_builddir)/src/65_paw -I$(top_srcdir)/src/65_paw +src_66_nonlocal_fcflags = -I$(top_builddir)/src/66_nonlocal -I$(top_srcdir)/src/66_nonlocal +src_66_vdwxc_fcflags = -I$(top_builddir)/src/66_vdwxc -I$(top_srcdir)/src/66_vdwxc +src_66_wfs_fcflags = -I$(top_builddir)/src/66_wfs -I$(top_srcdir)/src/66_wfs +src_67_common_fcflags = -I$(top_builddir)/src/67_common -I$(top_srcdir)/src/67_common +src_67_python_invocation_ext_fcflags = -I$(top_builddir)/src/67_python_invocation_ext -I$(top_srcdir)/src/67_python_invocation_ext +src_67_triqs_ext_fcflags = -I$(top_builddir)/src/67_triqs_ext -I$(top_srcdir)/src/67_triqs_ext +src_68_dmft_fcflags = -I$(top_builddir)/src/68_dmft -I$(top_srcdir)/src/68_dmft +src_68_lotf_fcflags = -I$(top_builddir)/src/68_lotf -I$(top_srcdir)/src/68_lotf +src_68_recursion_fcflags = -I$(top_builddir)/src/68_recursion -I$(top_srcdir)/src/68_recursion +src_68_rsprc_fcflags = -I$(top_builddir)/src/68_rsprc -I$(top_srcdir)/src/68_rsprc +src_69_wfdesc_fcflags = -I$(top_builddir)/src/69_wfdesc -I$(top_srcdir)/src/69_wfdesc +src_70_gw_fcflags = -I$(top_builddir)/src/70_gw -I$(top_srcdir)/src/70_gw +src_71_bse_fcflags = -I$(top_builddir)/src/71_bse -I$(top_srcdir)/src/71_bse +src_71_wannier_fcflags = -I$(top_builddir)/src/71_wannier -I$(top_srcdir)/src/71_wannier +src_72_response_fcflags = -I$(top_builddir)/src/72_response -I$(top_srcdir)/src/72_response +src_77_ddb_fcflags = -I$(top_builddir)/src/77_ddb -I$(top_srcdir)/src/77_ddb +src_77_suscep_fcflags = -I$(top_builddir)/src/77_suscep -I$(top_srcdir)/src/77_suscep +src_78_effpot_fcflags = -I$(top_builddir)/src/78_effpot -I$(top_srcdir)/src/78_effpot +src_78_eph_fcflags = -I$(top_builddir)/src/78_eph -I$(top_srcdir)/src/78_eph +src_79_seqpar_mpi_fcflags = -I$(top_builddir)/src/79_seqpar_mpi -I$(top_srcdir)/src/79_seqpar_mpi +src_80_rttddft_fcflags = -I$(top_builddir)/src/80_rttddft -I$(top_srcdir)/src/80_rttddft +src_80_tdep_fcflags = -I$(top_builddir)/src/80_tdep -I$(top_srcdir)/src/80_tdep +src_94_scfcv_fcflags = -I$(top_builddir)/src/94_scfcv -I$(top_srcdir)/src/94_scfcv +src_95_drive_fcflags = -I$(top_builddir)/src/95_drive -I$(top_srcdir)/src/95_drive +src_common_fcflags = -I$(top_builddir)/shared/common/src/incs -I$(top_srcdir)/shared/common/src/incs -I$(top_builddir)/shared/common/src/mods -I$(top_srcdir)/shared/common/src/mods +src_core_fcflags = -I$(top_builddir)/src/incs -I$(top_srcdir)/src/incs -I$(top_builddir)/src/mods -I$(top_srcdir)/src/mods +src_libpaw_fcflags = -I$(top_builddir)/shared/libpaw/incs -I$(top_srcdir)/shared/libpaw/incs -I$(top_builddir)/shared/libpaw/mods -I$(top_srcdir)/shared/libpaw/mods +srcdir = . +sysconfdir = ${prefix}/etc +target = x86_64-apple-darwin18.7.0 +target_alias = +target_cpu = x86_64 +target_os = darwin18.7.0 +target_vendor = apple +top_build_prefix = ../../../../ +top_builddir = ../../../.. +top_srcdir = ../../../.. +with_abinit_common = +with_bigdft = +with_config_file = +with_debug_flavor = +with_fallbacks = +with_fc_vendor = +with_fc_version = +with_fft_flavor = fftw3 +with_fftw3 = +with_gnu_ld = +with_gpu = +with_hdf5 = /opt/local +with_kokkos = +with_levmar = +with_libpaw = +with_libpsml = +with_libxc = /opt/local +with_libxml2 = +with_linalg_flavor = openblas +with_mpi = /opt/local +with_mpi_level = +with_netcdf = /opt/local +with_optim_flavor = +with_papi = +with_pfft = +with_triqs = +with_wannier90 = +with_xmlf90 = +with_yakl = +AM_CFLAGS = -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include +AM_CXXFLAGS = $(sd_triqs_cxxflags) +AM_FCFLAGS = -ffree-form -J../mods +AM_CPPFLAGS = \ + -I$(top_builddir)/shared/common/src/incs -I$(top_srcdir)/shared/common/src/incs -I$(top_builddir)/shared/common/src/mods -I$(top_srcdir)/shared/common/src/mods \ + -I$(top_builddir)/src/incs -I$(top_srcdir)/src/incs -I$(top_builddir)/src/mods -I$(top_srcdir)/src/mods \ + -I$(top_builddir)/shared/libpaw/incs -I$(top_srcdir)/shared/libpaw/incs -I$(top_builddir)/shared/libpaw/mods -I$(top_srcdir)/shared/libpaw/mods \ + \ + + + +# Regular source files +lib02_clib_srcs = \ + calling_levmar.c \ + cclock.c \ + etime.c \ + sockets.c \ + m_fsockets.F90 \ + fsi_posix.c \ + gnu_tools.c \ + mallinfo.c \ + md5.c \ + rlimit.c \ + xexit.c \ + xmalloc.c \ + m_clib.F90 + + +# Source files depending on conditionals + +# Library description +noinst_LIBRARIES = lib02_clib.a +lib02_clib_a_SOURCES = $(lib02_clib_srcs) + +# Dependencies (inside the directory) of directory 02_clib +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. +CLEANFILES = calling_levmar_cpp.c cclock_cpp.c etime_cpp.c \ + sockets_cpp.c m_fsockets_cpp.f90 fsi_posix_cpp.c \ + gnu_tools_cpp.c mallinfo_cpp.c md5_cpp.c rlimit_cpp.c \ + xexit_cpp.c xmalloc_cpp.c m_clib_cpp.f90 m_clib.$(MODEXT) \ + m_fsockets.$(MODEXT) +EXTRA_DIST = abinit.src abinit.dep abinit.amf md5.h xmalloc.h \ + _02_clib_ +all: all-am + +.SUFFIXES: +.SUFFIXES: .F90 .c .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu shared/common/src/02_clib/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu shared/common/src/02_clib/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) + +lib02_clib.a: $(lib02_clib_a_OBJECTS) $(lib02_clib_a_DEPENDENCIES) $(EXTRA_lib02_clib_a_DEPENDENCIES) + $(AM_V_at)-rm -f lib02_clib.a + $(AM_V_AR)$(lib02_clib_a_AR) lib02_clib.a $(lib02_clib_a_OBJECTS) $(lib02_clib_a_LIBADD) + $(AM_V_at)$(RANLIB) lib02_clib.a + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +include ./$(DEPDIR)/calling_levmar.Po # am--include-marker +include ./$(DEPDIR)/cclock.Po # am--include-marker +include ./$(DEPDIR)/etime.Po # am--include-marker +include ./$(DEPDIR)/fsi_posix.Po # am--include-marker +include ./$(DEPDIR)/gnu_tools.Po # am--include-marker +include ./$(DEPDIR)/mallinfo.Po # am--include-marker +include ./$(DEPDIR)/md5.Po # am--include-marker +include ./$(DEPDIR)/rlimit.Po # am--include-marker +include ./$(DEPDIR)/sockets.Po # am--include-marker +include ./$(DEPDIR)/xexit.Po # am--include-marker +include ./$(DEPDIR)/xmalloc.Po # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) + +.F90.o: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ $< + +.F90.obj: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.c.o: + $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< + $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# $(AM_V_CC)source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(COMPILE) -c -o $@ $< + +.c.obj: + $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` + $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# $(AM_V_CC)source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -f ./$(DEPDIR)/calling_levmar.Po + -rm -f ./$(DEPDIR)/cclock.Po + -rm -f ./$(DEPDIR)/etime.Po + -rm -f ./$(DEPDIR)/fsi_posix.Po + -rm -f ./$(DEPDIR)/gnu_tools.Po + -rm -f ./$(DEPDIR)/mallinfo.Po + -rm -f ./$(DEPDIR)/md5.Po + -rm -f ./$(DEPDIR)/rlimit.Po + -rm -f ./$(DEPDIR)/sockets.Po + -rm -f ./$(DEPDIR)/xexit.Po + -rm -f ./$(DEPDIR)/xmalloc.Po + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f ./$(DEPDIR)/calling_levmar.Po + -rm -f ./$(DEPDIR)/cclock.Po + -rm -f ./$(DEPDIR)/etime.Po + -rm -f ./$(DEPDIR)/fsi_posix.Po + -rm -f ./$(DEPDIR)/gnu_tools.Po + -rm -f ./$(DEPDIR)/mallinfo.Po + -rm -f ./$(DEPDIR)/md5.Po + -rm -f ./$(DEPDIR)/rlimit.Po + -rm -f ./$(DEPDIR)/sockets.Po + -rm -f ./$(DEPDIR)/xexit.Po + -rm -f ./$(DEPDIR)/xmalloc.Po + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ + clean-generic clean-noinstLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am + +.PRECIOUS: Makefile + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/GX-PAW/common/src/02_clib/Makefile.am b/GX-PAW/common/src/02_clib/Makefile.am new file mode 100644 index 00000000..ca92f39e --- /dev/null +++ b/GX-PAW/common/src/02_clib/Makefile.am @@ -0,0 +1,83 @@ +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-corelibs on 2024/03/16 21:07:38 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-corelibs script or its config file instead. +# + +AM_CFLAGS = @ABI_CPPFLAGS@ +AM_CXXFLAGS = $(sd_triqs_cxxflags) +AM_FCFLAGS = @FPPFLAGS@ @FCFLAGS_FREEFORM@ @FCFLAGS_MODDIR@ @sd_sys_fcflags@ @fcflags_opt_02_clib@ + +AM_CPPFLAGS = \ + @src_common_fcflags@ \ + @src_core_fcflags@ \ + @src_libpaw_fcflags@ \ + @sd_levmar_cppflags@ \ + @fc_mod_fcflags@ + +# Regular source files +lib02_clib_srcs = \ + calling_levmar.c \ + cclock.c \ + etime.c \ + sockets.c \ + m_fsockets.F90 \ + fsi_posix.c \ + gnu_tools.c \ + mallinfo.c \ + md5.c \ + rlimit.c \ + xexit.c \ + xmalloc.c \ + m_clib.F90 + +# Source files depending on conditionals + + +# Library description +noinst_LIBRARIES = lib02_clib.a + +lib02_clib_a_SOURCES= $(lib02_clib_srcs) + +CLEANFILES = \ + calling_levmar_cpp.c \ + cclock_cpp.c \ + etime_cpp.c \ + sockets_cpp.c \ + m_fsockets_cpp.f90 \ + fsi_posix_cpp.c \ + gnu_tools_cpp.c \ + mallinfo_cpp.c \ + md5_cpp.c \ + rlimit_cpp.c \ + xexit_cpp.c \ + xmalloc_cpp.c \ + m_clib_cpp.f90 + +EXTRA_DIST = abinit.src + +EXTRA_DIST += abinit.dep + +# Dependencies (inside the directory) of directory 02_clib +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. + +CLEANFILES += \ + m_clib.$(MODEXT) \ + m_fsockets.$(MODEXT) + + +EXTRA_DIST += abinit.amf + +EXTRA_DIST += \ + md5.h \ + xmalloc.h + +EXTRA_DIST += _02_clib_ diff --git a/GX-PAW/common/src/02_clib/Makefile.in b/GX-PAW/common/src/02_clib/Makefile.in new file mode 100644 index 00000000..c4fe1d1b --- /dev/null +++ b/GX-PAW/common/src/02_clib/Makefile.in @@ -0,0 +1,1548 @@ +# Makefile.in generated by automake 1.16.3 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2020 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-corelibs on 2024/03/16 21:07:38 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-corelibs script or its config file instead. +# + +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = shared/common/src/02_clib +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/m4/arch-gpu.m4 \ + $(top_srcdir)/config/m4/arch-mpi.m4 \ + $(top_srcdir)/config/m4/auto-autotools.m4 \ + $(top_srcdir)/config/m4/auto-corelibs.m4 \ + $(top_srcdir)/config/m4/auto-debug.m4 \ + $(top_srcdir)/config/m4/auto-dirflags.m4 \ + $(top_srcdir)/config/m4/auto-env.m4 \ + $(top_srcdir)/config/m4/auto-hints.m4 \ + $(top_srcdir)/config/m4/auto-optim.m4 \ + $(top_srcdir)/config/m4/auto-options.m4 \ + $(top_srcdir)/config/m4/auto-output.m4 \ + $(top_srcdir)/config/m4/auto-triggers.m4 \ + $(top_srcdir)/config/m4/conf-atompaw.m4 \ + $(top_srcdir)/config/m4/conf-debug.m4 \ + $(top_srcdir)/config/m4/conf-fallbacks.m4 \ + $(top_srcdir)/config/m4/conf-files.m4 \ + $(top_srcdir)/config/m4/conf-init.m4 \ + $(top_srcdir)/config/m4/conf-openmp.m4 \ + $(top_srcdir)/config/m4/conf-optim.m4 \ + $(top_srcdir)/config/m4/lang-c++.m4 \ + $(top_srcdir)/config/m4/lang-c.m4 \ + $(top_srcdir)/config/m4/lang-fortran-import.m4 \ + $(top_srcdir)/config/m4/lang-fortran.m4 \ + $(top_srcdir)/config/m4/lang-python.m4 \ + $(top_srcdir)/config/m4/libxml2.m4 \ + $(top_srcdir)/config/m4/misc-display.m4 \ + $(top_srcdir)/config/m4/sd_abinit_common.m4 \ + $(top_srcdir)/config/m4/sd_arch_gpu.m4 \ + $(top_srcdir)/config/m4/sd_arch_mpi.m4 \ + $(top_srcdir)/config/m4/sd_bigdft.m4 \ + $(top_srcdir)/config/m4/sd_core.m4 \ + $(top_srcdir)/config/m4/sd_esl.m4 \ + $(top_srcdir)/config/m4/sd_fftw3.m4 \ + $(top_srcdir)/config/m4/sd_gpu_kokkos.m4 \ + $(top_srcdir)/config/m4/sd_gpu_yakl.m4 \ + $(top_srcdir)/config/m4/sd_io_hdf5.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf_fortran.m4 \ + $(top_srcdir)/config/m4/sd_levmar.m4 \ + $(top_srcdir)/config/m4/sd_libpaw.m4 \ + $(top_srcdir)/config/m4/sd_libpsml.m4 \ + $(top_srcdir)/config/m4/sd_libxc.m4 \ + $(top_srcdir)/config/m4/sd_math_fft.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_core.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_util.m4 \ + $(top_srcdir)/config/m4/sd_papi.m4 \ + $(top_srcdir)/config/m4/sd_pfft.m4 \ + $(top_srcdir)/config/m4/sd_triqs.m4 \ + $(top_srcdir)/config/m4/sd_wannier90.m4 \ + $(top_srcdir)/config/m4/sd_xmlf90.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = +lib02_clib_a_AR = $(AR) $(ARFLAGS) +lib02_clib_a_LIBADD = +am__objects_1 = calling_levmar.$(OBJEXT) cclock.$(OBJEXT) \ + etime.$(OBJEXT) sockets.$(OBJEXT) m_fsockets.$(OBJEXT) \ + fsi_posix.$(OBJEXT) gnu_tools.$(OBJEXT) mallinfo.$(OBJEXT) \ + md5.$(OBJEXT) rlimit.$(OBJEXT) xexit.$(OBJEXT) \ + xmalloc.$(OBJEXT) m_clib.$(OBJEXT) +am_lib02_clib_a_OBJECTS = $(am__objects_1) +lib02_clib_a_OBJECTS = $(am_lib02_clib_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/config/gnu/depcomp +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/calling_levmar.Po \ + ./$(DEPDIR)/cclock.Po ./$(DEPDIR)/etime.Po \ + ./$(DEPDIR)/fsi_posix.Po ./$(DEPDIR)/gnu_tools.Po \ + ./$(DEPDIR)/mallinfo.Po ./$(DEPDIR)/md5.Po \ + ./$(DEPDIR)/rlimit.Po ./$(DEPDIR)/sockets.Po \ + ./$(DEPDIR)/xexit.Po ./$(DEPDIR)/xmalloc.Po +am__mv = mv -f +PPFCCOMPILE = $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) +AM_V_PPFC = $(am__v_PPFC_@AM_V@) +am__v_PPFC_ = $(am__v_PPFC_@AM_DEFAULT_V@) +am__v_PPFC_0 = @echo " PPFC " $@; +am__v_PPFC_1 = +FCLD = $(FC) +FCLINK = $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \ + $@ +AM_V_FCLD = $(am__v_FCLD_@AM_V@) +am__v_FCLD_ = $(am__v_FCLD_@AM_DEFAULT_V@) +am__v_FCLD_0 = @echo " FCLD " $@; +am__v_FCLD_1 = +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(lib02_clib_a_SOURCES) +DIST_SOURCES = $(lib02_clib_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in \ + $(top_srcdir)/config/gnu/depcomp +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ABINIT_BINARY_PACKAGE = @ABINIT_BINARY_PACKAGE@ +ABINIT_COMMON_CPPFLAGS = @ABINIT_COMMON_CPPFLAGS@ +ABINIT_COMMON_FCFLAGS = @ABINIT_COMMON_FCFLAGS@ +ABINIT_COMMON_LDFLAGS = @ABINIT_COMMON_LDFLAGS@ +ABINIT_COMMON_LIBS = @ABINIT_COMMON_LIBS@ +ABINIT_TARGET = @ABINIT_TARGET@ +ABINIT_VERSION = @ABINIT_VERSION@ +ABINIT_VERSION_BASE = @ABINIT_VERSION_BASE@ +ABINIT_VERSION_BUILD = @ABINIT_VERSION_BUILD@ +ABINIT_VERSION_MAJOR = @ABINIT_VERSION_MAJOR@ +ABINIT_VERSION_MICRO = @ABINIT_VERSION_MICRO@ +ABINIT_VERSION_MINOR = @ABINIT_VERSION_MINOR@ +ABI_CPPFLAGS = @ABI_CPPFLAGS@ +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +ARFLAGS = @ARFLAGS@ +ARFLAGS_CMD = @ARFLAGS_CMD@ +ARFLAGS_DEBUG = @ARFLAGS_DEBUG@ +ARFLAGS_EXTRA = @ARFLAGS_EXTRA@ +ARFLAGS_HINTS = @ARFLAGS_HINTS@ +ARFLAGS_OPTIM = @ARFLAGS_OPTIM@ +ATOMPAW_BIN = @ATOMPAW_BIN@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BIGDFT_CPPFLAGS = @BIGDFT_CPPFLAGS@ +BIGDFT_FCFLAGS = @BIGDFT_FCFLAGS@ +BIGDFT_LDFLAGS = @BIGDFT_LDFLAGS@ +BIGDFT_LIBS = @BIGDFT_LIBS@ +BOURNE_SHELL = @BOURNE_SHELL@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CC_LDFLAGS = @CC_LDFLAGS@ +CC_LDFLAGS_DEBUG = @CC_LDFLAGS_DEBUG@ +CC_LDFLAGS_EXTRA = @CC_LDFLAGS_EXTRA@ +CC_LDFLAGS_GPU = @CC_LDFLAGS_GPU@ +CC_LDFLAGS_HINTS = @CC_LDFLAGS_HINTS@ +CC_LDFLAGS_OPTIM = @CC_LDFLAGS_OPTIM@ +CC_LIBS = @CC_LIBS@ +CC_LIBS_DEBUG = @CC_LIBS_DEBUG@ +CC_LIBS_EXTRA = @CC_LIBS_EXTRA@ +CC_LIBS_GPU = @CC_LIBS_GPU@ +CC_LIBS_HINTS = @CC_LIBS_HINTS@ +CC_LIBS_OPTIM = @CC_LIBS_OPTIM@ +CFLAGS = @CFLAGS@ +CFLAGS_DEBUG = @CFLAGS_DEBUG@ +CFLAGS_EXTRA = @CFLAGS_EXTRA@ +CFLAGS_GPU = @CFLAGS_GPU@ +CFLAGS_HINTS = @CFLAGS_HINTS@ +CFLAGS_OPTIM = @CFLAGS_OPTIM@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CPPFLAGS_DEBUG = @CPPFLAGS_DEBUG@ +CPPFLAGS_EXTRA = @CPPFLAGS_EXTRA@ +CPPFLAGS_GPU = @CPPFLAGS_GPU@ +CPPFLAGS_HINTS = @CPPFLAGS_HINTS@ +CPPFLAGS_HINTS_EXT = @CPPFLAGS_HINTS_EXT@ +CPPFLAGS_OPTIM = @CPPFLAGS_OPTIM@ +CXX = @CXX@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CXXFLAGS_DEBUG = @CXXFLAGS_DEBUG@ +CXXFLAGS_EXTRA = @CXXFLAGS_EXTRA@ +CXXFLAGS_GPU = @CXXFLAGS_GPU@ +CXXFLAGS_HINTS = @CXXFLAGS_HINTS@ +CXXFLAGS_OPTIM = @CXXFLAGS_OPTIM@ +CXX_LDFLAGS = @CXX_LDFLAGS@ +CXX_LDFLAGS_DEBUG = @CXX_LDFLAGS_DEBUG@ +CXX_LDFLAGS_EXTRA = @CXX_LDFLAGS_EXTRA@ +CXX_LDFLAGS_GPU = @CXX_LDFLAGS_GPU@ +CXX_LDFLAGS_HINTS = @CXX_LDFLAGS_HINTS@ +CXX_LDFLAGS_OPTIM = @CXX_LDFLAGS_OPTIM@ +CXX_LIBS = @CXX_LIBS@ +CXX_LIBS_DEBUG = @CXX_LIBS_DEBUG@ +CXX_LIBS_EXTRA = @CXX_LIBS_EXTRA@ +CXX_LIBS_GPU = @CXX_LIBS_GPU@ +CXX_LIBS_HINTS = @CXX_LIBS_HINTS@ +CXX_LIBS_OPTIM = @CXX_LIBS_OPTIM@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ +FCFLAGS = @FCFLAGS@ +FCFLAGS_DEBUG = @FCFLAGS_DEBUG@ +FCFLAGS_EXTRA = @FCFLAGS_EXTRA@ +FCFLAGS_F90 = @FCFLAGS_F90@ +FCFLAGS_FIXEDFORM = @FCFLAGS_FIXEDFORM@ +FCFLAGS_FREEFORM = @FCFLAGS_FREEFORM@ +FCFLAGS_HINTS = @FCFLAGS_HINTS@ +FCFLAGS_MODDIR = @FCFLAGS_MODDIR@ +FCFLAGS_OPENMP = @FCFLAGS_OPENMP@ +FCFLAGS_OPENMP_OFFLOAD = @FCFLAGS_OPENMP_OFFLOAD@ +FCFLAGS_OPTIM = @FCFLAGS_OPTIM@ +FCLIBS = @FCLIBS@ +FC_LDFLAGS = @FC_LDFLAGS@ +FC_LDFLAGS_DEBUG = @FC_LDFLAGS_DEBUG@ +FC_LDFLAGS_EXTRA = @FC_LDFLAGS_EXTRA@ +FC_LDFLAGS_HINTS = @FC_LDFLAGS_HINTS@ +FC_LDFLAGS_OPTIM = @FC_LDFLAGS_OPTIM@ +FC_LIBS = @FC_LIBS@ +FC_LIBS_DEBUG = @FC_LIBS_DEBUG@ +FC_LIBS_EXTRA = @FC_LIBS_EXTRA@ +FC_LIBS_HINTS = @FC_LIBS_HINTS@ +FC_LIBS_OPTIM = @FC_LIBS_OPTIM@ +FC_NOWRAP = @FC_NOWRAP@ +FFLAGS = @FFLAGS@ +FFTW3_CFLAGS = @FFTW3_CFLAGS@ +FFTW3_CPPFLAGS = @FFTW3_CPPFLAGS@ +FFTW3_FCFLAGS = @FFTW3_FCFLAGS@ +FFTW3_LDFLAGS = @FFTW3_LDFLAGS@ +FFTW3_LIBS = @FFTW3_LIBS@ +FFT_CFLAGS = @FFT_CFLAGS@ +FFT_FCFLAGS = @FFT_FCFLAGS@ +FPP = @FPP@ +FPPFLAGS = @FPPFLAGS@ +FPPFLAGS_DEBUG = @FPPFLAGS_DEBUG@ +FPPFLAGS_EXTRA = @FPPFLAGS_EXTRA@ +FPPFLAGS_HINTS = @FPPFLAGS_HINTS@ +FPPFLAGS_OPTIM = @FPPFLAGS_OPTIM@ +GPU_ARCH = @GPU_ARCH@ +GPU_CFLAGS = @GPU_CFLAGS@ +GPU_CPPFLAGS = @GPU_CPPFLAGS@ +GPU_CXXFLAGS = @GPU_CXXFLAGS@ +GPU_FCFLAGS = @GPU_FCFLAGS@ +GPU_LDFLAGS = @GPU_LDFLAGS@ +GPU_LIBS = @GPU_LIBS@ +GRAPHATOM_BIN = @GRAPHATOM_BIN@ +GREP = @GREP@ +H5CC = @H5CC@ +HDF5_CFLAGS = @HDF5_CFLAGS@ +HDF5_CPPFLAGS = @HDF5_CPPFLAGS@ +HDF5_CXXFLAGS = @HDF5_CXXFLAGS@ +HDF5_FCFLAGS = @HDF5_FCFLAGS@ +HDF5_LDFLAGS = @HDF5_LDFLAGS@ +HDF5_LIBS = @HDF5_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +LDFLAGS = @LDFLAGS@ +LEVMAR_CFLAGS = @LEVMAR_CFLAGS@ +LEVMAR_CPPFLAGS = @LEVMAR_CPPFLAGS@ +LEVMAR_LDFLAGS = @LEVMAR_LDFLAGS@ +LEVMAR_LIBS = @LEVMAR_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPAW_CPPFLAGS = @LIBPAW_CPPFLAGS@ +LIBPAW_FCFLAGS = @LIBPAW_FCFLAGS@ +LIBPAW_LDFLAGS = @LIBPAW_LDFLAGS@ +LIBPAW_LIBS = @LIBPAW_LIBS@ +LIBPSML_CPPFLAGS = @LIBPSML_CPPFLAGS@ +LIBPSML_FCFLAGS = @LIBPSML_FCFLAGS@ +LIBPSML_LDFLAGS = @LIBPSML_LDFLAGS@ +LIBPSML_LIBS = @LIBPSML_LIBS@ +LIBS = @LIBS@ +LIBXC_CFLAGS = @LIBXC_CFLAGS@ +LIBXC_CPPFLAGS = @LIBXC_CPPFLAGS@ +LIBXC_FCFLAGS = @LIBXC_FCFLAGS@ +LIBXC_LDFLAGS = @LIBXC_LDFLAGS@ +LIBXC_LIBS = @LIBXC_LIBS@ +LIBXML2_CPPFLAGS = @LIBXML2_CPPFLAGS@ +LIBXML2_FCFLAGS = @LIBXML2_FCFLAGS@ +LIBXML2_LIBS = @LIBXML2_LIBS@ +LINALG_CFLAGS = @LINALG_CFLAGS@ +LINALG_CPPFLAGS = @LINALG_CPPFLAGS@ +LINALG_CXXFLAGS = @LINALG_CXXFLAGS@ +LINALG_FCFLAGS = @LINALG_FCFLAGS@ +LINALG_LDFLAGS = @LINALG_LDFLAGS@ +LINALG_LIBS = @LINALG_LIBS@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODEXT = @MODEXT@ +MPI_CFLAGS = @MPI_CFLAGS@ +MPI_CPPFLAGS = @MPI_CPPFLAGS@ +MPI_CXXFLAGS = @MPI_CXXFLAGS@ +MPI_FCFLAGS = @MPI_FCFLAGS@ +MPI_LDFLAGS = @MPI_LDFLAGS@ +MPI_LIBS = @MPI_LIBS@ +MV = @MV@ +NETCDF_CFLAGS = @NETCDF_CFLAGS@ +NETCDF_CPPFLAGS = @NETCDF_CPPFLAGS@ +NETCDF_CXXFLAGS = @NETCDF_CXXFLAGS@ +NETCDF_FCFLAGS = @NETCDF_FCFLAGS@ +NETCDF_FORTRAN_CFLAGS = @NETCDF_FORTRAN_CFLAGS@ +NETCDF_FORTRAN_CPPFLAGS = @NETCDF_FORTRAN_CPPFLAGS@ +NETCDF_FORTRAN_CXXFLAGS = @NETCDF_FORTRAN_CXXFLAGS@ +NETCDF_FORTRAN_FCFLAGS = @NETCDF_FORTRAN_FCFLAGS@ +NETCDF_FORTRAN_LDFLAGS = @NETCDF_FORTRAN_LDFLAGS@ +NETCDF_FORTRAN_LIBS = @NETCDF_FORTRAN_LIBS@ +NETCDF_LDFLAGS = @NETCDF_LDFLAGS@ +NETCDF_LIBS = @NETCDF_LIBS@ +NVCC = @NVCC@ +NVCC_CFLAGS = @NVCC_CFLAGS@ +NVCC_CPPFLAGS = @NVCC_CPPFLAGS@ +NVCC_LDFLAGS = @NVCC_LDFLAGS@ +NVCC_LIBS = @NVCC_LIBS@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PAPI_CFLAGS = @PAPI_CFLAGS@ +PAPI_CPPFLAGS = @PAPI_CPPFLAGS@ +PAPI_LDFLAGS = @PAPI_LDFLAGS@ +PAPI_LIBS = @PAPI_LIBS@ +PATCH = @PATCH@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PFFT_CFLAGS = @PFFT_CFLAGS@ +PFFT_CPPFLAGS = @PFFT_CPPFLAGS@ +PFFT_LDFLAGS = @PFFT_LDFLAGS@ +PFFT_LIBS = @PFFT_LIBS@ +PYFLAGS = @PYFLAGS@ +PYTHON = @PYTHON@ +PYTHON_CONFIG = @PYTHON_CONFIG@ +PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ +RANLIB = @RANLIB@ +REALPATH = @REALPATH@ +RM = @RM@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +TAR = @TAR@ +TRIQS_CFLAGS = @TRIQS_CFLAGS@ +TRIQS_CPPFLAGS = @TRIQS_CPPFLAGS@ +TRIQS_CXXFLAGS = @TRIQS_CXXFLAGS@ +TRIQS_LDFLAGS = @TRIQS_LDFLAGS@ +TRIQS_LIBS = @TRIQS_LIBS@ +TRUE_CPP = @TRUE_CPP@ +VERSION = @VERSION@ +WANNIER90_CPPFLAGS = @WANNIER90_CPPFLAGS@ +WANNIER90_FCFLAGS = @WANNIER90_FCFLAGS@ +WANNIER90_LDFLAGS = @WANNIER90_LDFLAGS@ +WANNIER90_LIBS = @WANNIER90_LIBS@ +XML2_CONFIG = @XML2_CONFIG@ +XMLF90_CPPFLAGS = @XMLF90_CPPFLAGS@ +XMLF90_FCFLAGS = @XMLF90_FCFLAGS@ +XMLF90_LDFLAGS = @XMLF90_LDFLAGS@ +XMLF90_LIBS = @XMLF90_LIBS@ +XML_CPPFLAGS = @XML_CPPFLAGS@ +XML_LIBS = @XML_LIBS@ +XPP = @XPP@ +XPPFLAGS = @XPPFLAGS@ +XPPFLAGS_DEBUG = @XPPFLAGS_DEBUG@ +XPPFLAGS_EXTRA = @XPPFLAGS_EXTRA@ +XPPFLAGS_OPTIM = @XPPFLAGS_OPTIM@ +YAKL_CPPFLAGS = @YAKL_CPPFLAGS@ +YAKL_FCFLAGS = @YAKL_FCFLAGS@ +YAKL_LDFLAGS = @YAKL_LDFLAGS@ +YAKL_LIBS = @YAKL_LIBS@ +abi_ac_distcheck = @abi_ac_distcheck@ +abi_ac_version = @abi_ac_version@ +abi_am_version = @abi_am_version@ +abi_avx_safe_mode_enable = @abi_avx_safe_mode_enable@ +abi_bse_unpacked_enable = @abi_bse_unpacked_enable@ +abi_cc_path = @abi_cc_path@ +abi_cc_vendor = @abi_cc_vendor@ +abi_cc_version = @abi_cc_version@ +abi_cclock_enable = @abi_cclock_enable@ +abi_cpp_path = @abi_cpp_path@ +abi_cpu_64bits = @abi_cpu_64bits@ +abi_cpu_bits = @abi_cpu_bits@ +abi_cpu_model = @abi_cpu_model@ +abi_cpu_platform = @abi_cpu_platform@ +abi_cpu_spec = @abi_cpu_spec@ +abi_cpu_vendor = @abi_cpu_vendor@ +abi_crpa_optim_enable = @abi_crpa_optim_enable@ +abi_cxx_path = @abi_cxx_path@ +abi_cxx_vendor = @abi_cxx_vendor@ +abi_cxx_version = @abi_cxx_version@ +abi_debug_flavor = @abi_debug_flavor@ +abi_exports_enable = @abi_exports_enable@ +abi_fbk_abinit_common_ok = @abi_fbk_abinit_common_ok@ +abi_fbk_bigdft_ok = @abi_fbk_bigdft_ok@ +abi_fbk_config = @abi_fbk_config@ +abi_fbk_enable = @abi_fbk_enable@ +abi_fbk_fft_ok = @abi_fbk_fft_ok@ +abi_fbk_fftw3_ok = @abi_fbk_fftw3_ok@ +abi_fbk_gpu_ok = @abi_fbk_gpu_ok@ +abi_fbk_hdf5_ok = @abi_fbk_hdf5_ok@ +abi_fbk_init = @abi_fbk_init@ +abi_fbk_kokkos_ok = @abi_fbk_kokkos_ok@ +abi_fbk_levmar_ok = @abi_fbk_levmar_ok@ +abi_fbk_libpaw_ok = @abi_fbk_libpaw_ok@ +abi_fbk_libpsml_ok = @abi_fbk_libpsml_ok@ +abi_fbk_libxc_ok = @abi_fbk_libxc_ok@ +abi_fbk_libxml2_ok = @abi_fbk_libxml2_ok@ +abi_fbk_linalg_ok = @abi_fbk_linalg_ok@ +abi_fbk_list = @abi_fbk_list@ +abi_fbk_mpi_ok = @abi_fbk_mpi_ok@ +abi_fbk_netcdf_fortran_ok = @abi_fbk_netcdf_fortran_ok@ +abi_fbk_netcdf_ok = @abi_fbk_netcdf_ok@ +abi_fbk_papi_ok = @abi_fbk_papi_ok@ +abi_fbk_pfft_ok = @abi_fbk_pfft_ok@ +abi_fbk_prefix = @abi_fbk_prefix@ +abi_fbk_required = @abi_fbk_required@ +abi_fbk_triqs_ok = @abi_fbk_triqs_ok@ +abi_fbk_wannier90_ok = @abi_fbk_wannier90_ok@ +abi_fbk_xmlf90_ok = @abi_fbk_xmlf90_ok@ +abi_fbk_yakl_ok = @abi_fbk_yakl_ok@ +abi_fc_path = @abi_fc_path@ +abi_fc_vendor = @abi_fc_vendor@ +abi_fc_version = @abi_fc_version@ +abi_fc_wrap = @abi_fc_wrap@ +abi_fc_wrapper_enable = @abi_fc_wrapper_enable@ +abi_fpp_path = @abi_fpp_path@ +abi_gpu_arch = @abi_gpu_arch@ +abi_gpu_fcflags = @abi_gpu_fcflags@ +abi_gpu_flavor = @abi_gpu_flavor@ +abi_gpu_hip_libdir = @abi_gpu_hip_libdir@ +abi_gpu_incs = @abi_gpu_incs@ +abi_gpu_ldflags = @abi_gpu_ldflags@ +abi_gpu_libs = @abi_gpu_libs@ +abi_gpu_nvtx_v3 = @abi_gpu_nvtx_v3@ +abi_gpu_roctx = @abi_gpu_roctx@ +abi_gw_dpc_enable = @abi_gw_dpc_enable@ +abi_hints_enable = @abi_hints_enable@ +abi_libtetra_enable = @abi_libtetra_enable@ +abi_libxml2_cppflags = @abi_libxml2_cppflags@ +abi_libxml2_enable = @abi_libxml2_enable@ +abi_libxml2_fcflags = @abi_libxml2_fcflags@ +abi_libxml2_init = @abi_libxml2_init@ +abi_libxml2_ldflags = @abi_libxml2_ldflags@ +abi_libxml2_libs = @abi_libxml2_libs@ +abi_libxml2_ok = @abi_libxml2_ok@ +abi_libxml2_prefix = @abi_libxml2_prefix@ +abi_lotf_enable = @abi_lotf_enable@ +abi_lt_version = @abi_lt_version@ +abi_m4_version = @abi_m4_version@ +abi_memory_profiling_enable = @abi_memory_profiling_enable@ +abi_mpi_cflags = @abi_mpi_cflags@ +abi_mpi_cppflags = @abi_mpi_cppflags@ +abi_mpi_cxxflags = @abi_mpi_cxxflags@ +abi_mpi_enable = @abi_mpi_enable@ +abi_mpi_fcflags = @abi_mpi_fcflags@ +abi_mpi_flavor = @abi_mpi_flavor@ +abi_mpi_gpu_aware_enable = @abi_mpi_gpu_aware_enable@ +abi_mpi_incs = @abi_mpi_incs@ +abi_mpi_inplace_enable = @abi_mpi_inplace_enable@ +abi_mpi_interfaces_bugfix_enable = @abi_mpi_interfaces_bugfix_enable@ +abi_mpi_io_default_enable = @abi_mpi_io_default_enable@ +abi_mpi_io_enable = @abi_mpi_io_enable@ +abi_mpi_ldflags = @abi_mpi_ldflags@ +abi_mpi_level = @abi_mpi_level@ +abi_mpi_libs = @abi_mpi_libs@ +abi_netcdf_default_enable = @abi_netcdf_default_enable@ +abi_openmp_enable = @abi_openmp_enable@ +abi_openmp_offload_enable = @abi_openmp_offload_enable@ +abi_optim_flavor = @abi_optim_flavor@ +abi_python_invocation_enable = @abi_python_invocation_enable@ +abi_source_debug_enable = @abi_source_debug_enable@ +abi_stdin_enable = @abi_stdin_enable@ +abi_sys_spec = @abi_sys_spec@ +abi_timer_enable = @abi_timer_enable@ +abi_triqs_v1_4_enable = @abi_triqs_v1_4_enable@ +abi_triqs_v2_0_enable = @abi_triqs_v2_0_enable@ +abi_zdot_bugfix_enable = @abi_zdot_bugfix_enable@ +abinit_bindir = @abinit_bindir@ +abinit_builddir = @abinit_builddir@ +abinit_chkdir = @abinit_chkdir@ +abinit_datdir = @abinit_datdir@ +abinit_docdir = @abinit_docdir@ +abinit_incdir = @abinit_incdir@ +abinit_libdir = @abinit_libdir@ +abinit_mandir = @abinit_mandir@ +abinit_prefix = @abinit_prefix@ +abinit_srcdir = @abinit_srcdir@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_FC = @ac_ct_FC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cc_info_string = @cc_info_string@ +cxx_info_string = @cxx_info_string@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +enable_avx_safe_mode = @enable_avx_safe_mode@ +enable_bse_unpacked = @enable_bse_unpacked@ +enable_cclock = @enable_cclock@ +enable_crpa_optim = @enable_crpa_optim@ +enable_exports = @enable_exports@ +enable_fc_wrapper = @enable_fc_wrapper@ +enable_gw_dpc = @enable_gw_dpc@ +enable_hints = @enable_hints@ +enable_libtetra = @enable_libtetra@ +enable_lotf = @enable_lotf@ +enable_memory_profiling = @enable_memory_profiling@ +enable_mpi_gpu_aware = @enable_mpi_gpu_aware@ +enable_mpi_inplace = @enable_mpi_inplace@ +enable_mpi_interfaces_bugfix = @enable_mpi_interfaces_bugfix@ +enable_mpi_io = @enable_mpi_io@ +enable_mpi_io_default = @enable_mpi_io_default@ +enable_netcdf_default = @enable_netcdf_default@ +enable_openmp = @enable_openmp@ +enable_openmp_offload = @enable_openmp_offload@ +enable_python_invocation = @enable_python_invocation@ +enable_shared = @enable_shared@ +enable_source_debug = @enable_source_debug@ +enable_static = @enable_static@ +enable_stdin = @enable_stdin@ +enable_timer = @enable_timer@ +enable_triqs_v1_4 = @enable_triqs_v1_4@ +enable_triqs_v2_0 = @enable_triqs_v2_0@ +enable_zdot_bugfix = @enable_zdot_bugfix@ +exec_prefix = @exec_prefix@ +fc_info_string = @fc_info_string@ +fc_mod_fcflags = @fc_mod_fcflags@ +fc_timing = @fc_timing@ +fcflags_opt_02_clib = @fcflags_opt_02_clib@ +fcflags_opt_10_defs = @fcflags_opt_10_defs@ +fcflags_opt_11_memory_mpi = @fcflags_opt_11_memory_mpi@ +fcflags_opt_12_hide_mpi = @fcflags_opt_12_hide_mpi@ +fcflags_opt_14_hidewrite = @fcflags_opt_14_hidewrite@ +fcflags_opt_16_hideleave = @fcflags_opt_16_hideleave@ +fcflags_opt_16_kokkos_toolbox = @fcflags_opt_16_kokkos_toolbox@ +fcflags_opt_17_gpu_toolbox = @fcflags_opt_17_gpu_toolbox@ +fcflags_opt_17_libtetra_ext = @fcflags_opt_17_libtetra_ext@ +fcflags_opt_17_minimax = @fcflags_opt_17_minimax@ +fcflags_opt_17_yaml_out = @fcflags_opt_17_yaml_out@ +fcflags_opt_18_timing = @fcflags_opt_18_timing@ +fcflags_opt_21_hashfuncs = @fcflags_opt_21_hashfuncs@ +fcflags_opt_27_toolbox_oop = @fcflags_opt_27_toolbox_oop@ +fcflags_opt_28_numeric_noabirule = @fcflags_opt_28_numeric_noabirule@ +fcflags_opt_29_kpoints = @fcflags_opt_29_kpoints@ +fcflags_opt_32_util = @fcflags_opt_32_util@ +fcflags_opt_33_xc_lowlevel = @fcflags_opt_33_xc_lowlevel@ +fcflags_opt_39_libpaw = @fcflags_opt_39_libpaw@ +fcflags_opt_41_geometry = @fcflags_opt_41_geometry@ +fcflags_opt_42_nlstrain = @fcflags_opt_42_nlstrain@ +fcflags_opt_42_parser = @fcflags_opt_42_parser@ +fcflags_opt_43_ptgroups = @fcflags_opt_43_ptgroups@ +fcflags_opt_43_wvl_wrappers = @fcflags_opt_43_wvl_wrappers@ +fcflags_opt_44_abitools = @fcflags_opt_44_abitools@ +fcflags_opt_44_abitypes_defs = @fcflags_opt_44_abitypes_defs@ +fcflags_opt_44_manage_kokkos = @fcflags_opt_44_manage_kokkos@ +fcflags_opt_45_geomoptim = @fcflags_opt_45_geomoptim@ +fcflags_opt_45_xgTools = @fcflags_opt_45_xgTools@ +fcflags_opt_46_ghc_omp = @fcflags_opt_46_ghc_omp@ +fcflags_opt_46_manage_cuda = @fcflags_opt_46_manage_cuda@ +fcflags_opt_48_diago = @fcflags_opt_48_diago@ +fcflags_opt_49_gw_toolbox_oop = @fcflags_opt_49_gw_toolbox_oop@ +fcflags_opt_51_manage_mpi = @fcflags_opt_51_manage_mpi@ +fcflags_opt_52_fft_mpi_noabirule = @fcflags_opt_52_fft_mpi_noabirule@ +fcflags_opt_53_ffts = @fcflags_opt_53_ffts@ +fcflags_opt_54_spacepar = @fcflags_opt_54_spacepar@ +fcflags_opt_55_abiutil = @fcflags_opt_55_abiutil@ +fcflags_opt_56_io_mpi = @fcflags_opt_56_io_mpi@ +fcflags_opt_56_mixing = @fcflags_opt_56_mixing@ +fcflags_opt_56_recipspace = @fcflags_opt_56_recipspace@ +fcflags_opt_56_xc = @fcflags_opt_56_xc@ +fcflags_opt_57_iopsp_parser = @fcflags_opt_57_iopsp_parser@ +fcflags_opt_57_iovars = @fcflags_opt_57_iovars@ +fcflags_opt_61_occeig = @fcflags_opt_61_occeig@ +fcflags_opt_62_cg_noabirule = @fcflags_opt_62_cg_noabirule@ +fcflags_opt_62_ctqmc = @fcflags_opt_62_ctqmc@ +fcflags_opt_62_iowfdenpot = @fcflags_opt_62_iowfdenpot@ +fcflags_opt_62_poisson = @fcflags_opt_62_poisson@ +fcflags_opt_62_wvl_wfs = @fcflags_opt_62_wvl_wfs@ +fcflags_opt_64_psp = @fcflags_opt_64_psp@ +fcflags_opt_65_lotf_base = @fcflags_opt_65_lotf_base@ +fcflags_opt_65_paw = @fcflags_opt_65_paw@ +fcflags_opt_66_nonlocal = @fcflags_opt_66_nonlocal@ +fcflags_opt_66_vdwxc = @fcflags_opt_66_vdwxc@ +fcflags_opt_66_wfs = @fcflags_opt_66_wfs@ +fcflags_opt_67_common = @fcflags_opt_67_common@ +fcflags_opt_67_python_invocation_ext = @fcflags_opt_67_python_invocation_ext@ +fcflags_opt_67_triqs_ext = @fcflags_opt_67_triqs_ext@ +fcflags_opt_68_dmft = @fcflags_opt_68_dmft@ +fcflags_opt_68_lotf = @fcflags_opt_68_lotf@ +fcflags_opt_68_recursion = @fcflags_opt_68_recursion@ +fcflags_opt_68_rsprc = @fcflags_opt_68_rsprc@ +fcflags_opt_69_wfdesc = @fcflags_opt_69_wfdesc@ +fcflags_opt_70_gw = @fcflags_opt_70_gw@ +fcflags_opt_71_bse = @fcflags_opt_71_bse@ +fcflags_opt_71_wannier = @fcflags_opt_71_wannier@ +fcflags_opt_72_response = @fcflags_opt_72_response@ +fcflags_opt_77_ddb = @fcflags_opt_77_ddb@ +fcflags_opt_77_suscep = @fcflags_opt_77_suscep@ +fcflags_opt_78_effpot = @fcflags_opt_78_effpot@ +fcflags_opt_78_eph = @fcflags_opt_78_eph@ +fcflags_opt_79_seqpar_mpi = @fcflags_opt_79_seqpar_mpi@ +fcflags_opt_80_rttddft = @fcflags_opt_80_rttddft@ +fcflags_opt_80_tdep = @fcflags_opt_80_tdep@ +fcflags_opt_94_scfcv = @fcflags_opt_94_scfcv@ +fcflags_opt_95_drive = @fcflags_opt_95_drive@ +fcflags_opt_98_main = @fcflags_opt_98_main@ +fcflags_opt_bigdft = @fcflags_opt_bigdft@ +fcflags_opt_default = @fcflags_opt_default@ +fcflags_opt_hdf5 = @fcflags_opt_hdf5@ +fcflags_opt_levmar = @fcflags_opt_levmar@ +fcflags_opt_libpsml = @fcflags_opt_libpsml@ +fcflags_opt_libxc = @fcflags_opt_libxc@ +fcflags_opt_libxml2 = @fcflags_opt_libxml2@ +fcflags_opt_linalg = @fcflags_opt_linalg@ +fcflags_opt_netcdf = @fcflags_opt_netcdf@ +fcflags_opt_netcdf_fortran = @fcflags_opt_netcdf_fortran@ +fcflags_opt_papi = @fcflags_opt_papi@ +fcflags_opt_triqs = @fcflags_opt_triqs@ +fcflags_opt_wannier90 = @fcflags_opt_wannier90@ +fcflags_opt_xmlf90 = @fcflags_opt_xmlf90@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sd_abinit_common_cppflags = @sd_abinit_common_cppflags@ +sd_abinit_common_enable = @sd_abinit_common_enable@ +sd_abinit_common_enable_def = @sd_abinit_common_enable_def@ +sd_abinit_common_fcflags = @sd_abinit_common_fcflags@ +sd_abinit_common_init = @sd_abinit_common_init@ +sd_abinit_common_ldflags = @sd_abinit_common_ldflags@ +sd_abinit_common_libs = @sd_abinit_common_libs@ +sd_abinit_common_ok = @sd_abinit_common_ok@ +sd_abinit_common_options = @sd_abinit_common_options@ +sd_abinit_common_policy = @sd_abinit_common_policy@ +sd_abinit_common_status = @sd_abinit_common_status@ +sd_bigdft_cppflags = @sd_bigdft_cppflags@ +sd_bigdft_enable = @sd_bigdft_enable@ +sd_bigdft_enable_def = @sd_bigdft_enable_def@ +sd_bigdft_fcflags = @sd_bigdft_fcflags@ +sd_bigdft_init = @sd_bigdft_init@ +sd_bigdft_ldflags = @sd_bigdft_ldflags@ +sd_bigdft_libs = @sd_bigdft_libs@ +sd_bigdft_ok = @sd_bigdft_ok@ +sd_bigdft_options = @sd_bigdft_options@ +sd_bigdft_policy = @sd_bigdft_policy@ +sd_bigdft_status = @sd_bigdft_status@ +sd_fft_cflags = @sd_fft_cflags@ +sd_fft_choices = @sd_fft_choices@ +sd_fft_cppflags = @sd_fft_cppflags@ +sd_fft_cxxflags = @sd_fft_cxxflags@ +sd_fft_enable = @sd_fft_enable@ +sd_fft_fcflags = @sd_fft_fcflags@ +sd_fft_flavor = @sd_fft_flavor@ +sd_fft_init = @sd_fft_init@ +sd_fft_ldflags = @sd_fft_ldflags@ +sd_fft_libs = @sd_fft_libs@ +sd_fft_ok = @sd_fft_ok@ +sd_fftw3_cflags = @sd_fftw3_cflags@ +sd_fftw3_cppflags = @sd_fftw3_cppflags@ +sd_fftw3_enable = @sd_fftw3_enable@ +sd_fftw3_enable_def = @sd_fftw3_enable_def@ +sd_fftw3_fcflags = @sd_fftw3_fcflags@ +sd_fftw3_init = @sd_fftw3_init@ +sd_fftw3_ldflags = @sd_fftw3_ldflags@ +sd_fftw3_libs = @sd_fftw3_libs@ +sd_fftw3_ok = @sd_fftw3_ok@ +sd_fftw3_options = @sd_fftw3_options@ +sd_fftw3_policy = @sd_fftw3_policy@ +sd_fftw3_status = @sd_fftw3_status@ +sd_gpu_cflags = @sd_gpu_cflags@ +sd_gpu_cppflags = @sd_gpu_cppflags@ +sd_gpu_cxxflags = @sd_gpu_cxxflags@ +sd_gpu_enable = @sd_gpu_enable@ +sd_gpu_enable_def = @sd_gpu_enable_def@ +sd_gpu_fcflags = @sd_gpu_fcflags@ +sd_gpu_init = @sd_gpu_init@ +sd_gpu_ldflags = @sd_gpu_ldflags@ +sd_gpu_libs = @sd_gpu_libs@ +sd_gpu_ok = @sd_gpu_ok@ +sd_gpu_options = @sd_gpu_options@ +sd_gpu_policy = @sd_gpu_policy@ +sd_gpu_prefix = @sd_gpu_prefix@ +sd_gpu_status = @sd_gpu_status@ +sd_hdf5_cflags = @sd_hdf5_cflags@ +sd_hdf5_cppflags = @sd_hdf5_cppflags@ +sd_hdf5_cxxflags = @sd_hdf5_cxxflags@ +sd_hdf5_enable = @sd_hdf5_enable@ +sd_hdf5_enable_def = @sd_hdf5_enable_def@ +sd_hdf5_enable_fc = @sd_hdf5_enable_fc@ +sd_hdf5_fcflags = @sd_hdf5_fcflags@ +sd_hdf5_h5cc = @sd_hdf5_h5cc@ +sd_hdf5_h5fc = @sd_hdf5_h5fc@ +sd_hdf5_init = @sd_hdf5_init@ +sd_hdf5_ldflags = @sd_hdf5_ldflags@ +sd_hdf5_libs = @sd_hdf5_libs@ +sd_hdf5_ok = @sd_hdf5_ok@ +sd_hdf5_options = @sd_hdf5_options@ +sd_hdf5_policy = @sd_hdf5_policy@ +sd_hdf5_status = @sd_hdf5_status@ +sd_kokkos_cppflags = @sd_kokkos_cppflags@ +sd_kokkos_cxxflags = @sd_kokkos_cxxflags@ +sd_kokkos_enable = @sd_kokkos_enable@ +sd_kokkos_enable_def = @sd_kokkos_enable_def@ +sd_kokkos_init = @sd_kokkos_init@ +sd_kokkos_ldflags = @sd_kokkos_ldflags@ +sd_kokkos_libs = @sd_kokkos_libs@ +sd_kokkos_ok = @sd_kokkos_ok@ +sd_kokkos_options = @sd_kokkos_options@ +sd_kokkos_policy = @sd_kokkos_policy@ +sd_kokkos_status = @sd_kokkos_status@ +sd_levmar_cflags = @sd_levmar_cflags@ +sd_levmar_cppflags = @sd_levmar_cppflags@ +sd_levmar_enable = @sd_levmar_enable@ +sd_levmar_enable_def = @sd_levmar_enable_def@ +sd_levmar_init = @sd_levmar_init@ +sd_levmar_ldflags = @sd_levmar_ldflags@ +sd_levmar_libs = @sd_levmar_libs@ +sd_levmar_ok = @sd_levmar_ok@ +sd_levmar_options = @sd_levmar_options@ +sd_levmar_policy = @sd_levmar_policy@ +sd_levmar_status = @sd_levmar_status@ +sd_libpaw_cppflags = @sd_libpaw_cppflags@ +sd_libpaw_enable = @sd_libpaw_enable@ +sd_libpaw_enable_def = @sd_libpaw_enable_def@ +sd_libpaw_fcflags = @sd_libpaw_fcflags@ +sd_libpaw_init = @sd_libpaw_init@ +sd_libpaw_ldflags = @sd_libpaw_ldflags@ +sd_libpaw_libs = @sd_libpaw_libs@ +sd_libpaw_ok = @sd_libpaw_ok@ +sd_libpaw_options = @sd_libpaw_options@ +sd_libpaw_policy = @sd_libpaw_policy@ +sd_libpaw_status = @sd_libpaw_status@ +sd_libpsml_cppflags = @sd_libpsml_cppflags@ +sd_libpsml_enable = @sd_libpsml_enable@ +sd_libpsml_enable_def = @sd_libpsml_enable_def@ +sd_libpsml_fcflags = @sd_libpsml_fcflags@ +sd_libpsml_init = @sd_libpsml_init@ +sd_libpsml_ldflags = @sd_libpsml_ldflags@ +sd_libpsml_libs = @sd_libpsml_libs@ +sd_libpsml_ok = @sd_libpsml_ok@ +sd_libpsml_options = @sd_libpsml_options@ +sd_libpsml_policy = @sd_libpsml_policy@ +sd_libpsml_status = @sd_libpsml_status@ +sd_libxc_cflags = @sd_libxc_cflags@ +sd_libxc_cppflags = @sd_libxc_cppflags@ +sd_libxc_enable = @sd_libxc_enable@ +sd_libxc_enable_def = @sd_libxc_enable_def@ +sd_libxc_enable_fc = @sd_libxc_enable_fc@ +sd_libxc_fcflags = @sd_libxc_fcflags@ +sd_libxc_init = @sd_libxc_init@ +sd_libxc_ldflags = @sd_libxc_ldflags@ +sd_libxc_libs = @sd_libxc_libs@ +sd_libxc_ok = @sd_libxc_ok@ +sd_libxc_options = @sd_libxc_options@ +sd_libxc_policy = @sd_libxc_policy@ +sd_libxc_status = @sd_libxc_status@ +sd_linalg_cflags = @sd_linalg_cflags@ +sd_linalg_choices = @sd_linalg_choices@ +sd_linalg_cppflags = @sd_linalg_cppflags@ +sd_linalg_cxxflags = @sd_linalg_cxxflags@ +sd_linalg_enable = @sd_linalg_enable@ +sd_linalg_fcflags = @sd_linalg_fcflags@ +sd_linalg_flavor = @sd_linalg_flavor@ +sd_linalg_has_elpa = @sd_linalg_has_elpa@ +sd_linalg_has_scalapack = @sd_linalg_has_scalapack@ +sd_linalg_init = @sd_linalg_init@ +sd_linalg_ldflags = @sd_linalg_ldflags@ +sd_linalg_libs = @sd_linalg_libs@ +sd_linalg_ok = @sd_linalg_ok@ +sd_mpi_cc = @sd_mpi_cc@ +sd_mpi_cflags = @sd_mpi_cflags@ +sd_mpi_cppflags = @sd_mpi_cppflags@ +sd_mpi_cxx = @sd_mpi_cxx@ +sd_mpi_enable = @sd_mpi_enable@ +sd_mpi_enable_cxx = @sd_mpi_enable_cxx@ +sd_mpi_enable_def = @sd_mpi_enable_def@ +sd_mpi_enable_fc = @sd_mpi_enable_fc@ +sd_mpi_fc = @sd_mpi_fc@ +sd_mpi_fcflags = @sd_mpi_fcflags@ +sd_mpi_init = @sd_mpi_init@ +sd_mpi_ldflags = @sd_mpi_ldflags@ +sd_mpi_libs = @sd_mpi_libs@ +sd_mpi_ok = @sd_mpi_ok@ +sd_mpi_options = @sd_mpi_options@ +sd_mpi_policy = @sd_mpi_policy@ +sd_mpi_status = @sd_mpi_status@ +sd_netcdf_cflags = @sd_netcdf_cflags@ +sd_netcdf_cppflags = @sd_netcdf_cppflags@ +sd_netcdf_enable = @sd_netcdf_enable@ +sd_netcdf_enable_def = @sd_netcdf_enable_def@ +sd_netcdf_fcflags = @sd_netcdf_fcflags@ +sd_netcdf_fortran_cflags = @sd_netcdf_fortran_cflags@ +sd_netcdf_fortran_cppflags = @sd_netcdf_fortran_cppflags@ +sd_netcdf_fortran_enable = @sd_netcdf_fortran_enable@ +sd_netcdf_fortran_enable_def = @sd_netcdf_fortran_enable_def@ +sd_netcdf_fortran_fcflags = @sd_netcdf_fortran_fcflags@ +sd_netcdf_fortran_init = @sd_netcdf_fortran_init@ +sd_netcdf_fortran_ldflags = @sd_netcdf_fortran_ldflags@ +sd_netcdf_fortran_libs = @sd_netcdf_fortran_libs@ +sd_netcdf_fortran_ok = @sd_netcdf_fortran_ok@ +sd_netcdf_fortran_options = @sd_netcdf_fortran_options@ +sd_netcdf_fortran_policy = @sd_netcdf_fortran_policy@ +sd_netcdf_fortran_status = @sd_netcdf_fortran_status@ +sd_netcdf_init = @sd_netcdf_init@ +sd_netcdf_ldflags = @sd_netcdf_ldflags@ +sd_netcdf_libs = @sd_netcdf_libs@ +sd_netcdf_ok = @sd_netcdf_ok@ +sd_netcdf_options = @sd_netcdf_options@ +sd_netcdf_policy = @sd_netcdf_policy@ +sd_netcdf_status = @sd_netcdf_status@ +sd_papi_cflags = @sd_papi_cflags@ +sd_papi_cppflags = @sd_papi_cppflags@ +sd_papi_enable = @sd_papi_enable@ +sd_papi_enable_def = @sd_papi_enable_def@ +sd_papi_init = @sd_papi_init@ +sd_papi_ldflags = @sd_papi_ldflags@ +sd_papi_libs = @sd_papi_libs@ +sd_papi_ok = @sd_papi_ok@ +sd_papi_options = @sd_papi_options@ +sd_papi_policy = @sd_papi_policy@ +sd_papi_sd_papi_fcflags = @sd_papi_sd_papi_fcflags@ +sd_papi_status = @sd_papi_status@ +sd_pfft_cflags = @sd_pfft_cflags@ +sd_pfft_cppflags = @sd_pfft_cppflags@ +sd_pfft_enable = @sd_pfft_enable@ +sd_pfft_enable_def = @sd_pfft_enable_def@ +sd_pfft_init = @sd_pfft_init@ +sd_pfft_ldflags = @sd_pfft_ldflags@ +sd_pfft_libs = @sd_pfft_libs@ +sd_pfft_ok = @sd_pfft_ok@ +sd_pfft_options = @sd_pfft_options@ +sd_pfft_policy = @sd_pfft_policy@ +sd_pfft_status = @sd_pfft_status@ +sd_sys_fcflags = @sd_sys_fcflags@ +sd_triqs_cflags = @sd_triqs_cflags@ +sd_triqs_cppflags = @sd_triqs_cppflags@ +sd_triqs_cxxflags = @sd_triqs_cxxflags@ +sd_triqs_enable = @sd_triqs_enable@ +sd_triqs_enable_def = @sd_triqs_enable_def@ +sd_triqs_fcflags = @sd_triqs_fcflags@ +sd_triqs_init = @sd_triqs_init@ +sd_triqs_ldflags = @sd_triqs_ldflags@ +sd_triqs_libs = @sd_triqs_libs@ +sd_triqs_ok = @sd_triqs_ok@ +sd_triqs_options = @sd_triqs_options@ +sd_triqs_policy = @sd_triqs_policy@ +sd_triqs_status = @sd_triqs_status@ +sd_wannier90_cppflags = @sd_wannier90_cppflags@ +sd_wannier90_enable = @sd_wannier90_enable@ +sd_wannier90_enable_def = @sd_wannier90_enable_def@ +sd_wannier90_fcflags = @sd_wannier90_fcflags@ +sd_wannier90_init = @sd_wannier90_init@ +sd_wannier90_ldflags = @sd_wannier90_ldflags@ +sd_wannier90_libs = @sd_wannier90_libs@ +sd_wannier90_ok = @sd_wannier90_ok@ +sd_wannier90_options = @sd_wannier90_options@ +sd_wannier90_policy = @sd_wannier90_policy@ +sd_wannier90_status = @sd_wannier90_status@ +sd_xmlf90_cppflags = @sd_xmlf90_cppflags@ +sd_xmlf90_enable = @sd_xmlf90_enable@ +sd_xmlf90_enable_def = @sd_xmlf90_enable_def@ +sd_xmlf90_fcflags = @sd_xmlf90_fcflags@ +sd_xmlf90_init = @sd_xmlf90_init@ +sd_xmlf90_ldflags = @sd_xmlf90_ldflags@ +sd_xmlf90_libs = @sd_xmlf90_libs@ +sd_xmlf90_ok = @sd_xmlf90_ok@ +sd_xmlf90_options = @sd_xmlf90_options@ +sd_xmlf90_policy = @sd_xmlf90_policy@ +sd_xmlf90_status = @sd_xmlf90_status@ +sd_yakl_cppflags = @sd_yakl_cppflags@ +sd_yakl_enable = @sd_yakl_enable@ +sd_yakl_enable_def = @sd_yakl_enable_def@ +sd_yakl_fcflags = @sd_yakl_fcflags@ +sd_yakl_init = @sd_yakl_init@ +sd_yakl_ldflags = @sd_yakl_ldflags@ +sd_yakl_libs = @sd_yakl_libs@ +sd_yakl_ok = @sd_yakl_ok@ +sd_yakl_options = @sd_yakl_options@ +sd_yakl_policy = @sd_yakl_policy@ +sd_yakl_status = @sd_yakl_status@ +sharedstatedir = @sharedstatedir@ +src_02_clib_fcflags = @src_02_clib_fcflags@ +src_10_defs_fcflags = @src_10_defs_fcflags@ +src_11_memory_mpi_fcflags = @src_11_memory_mpi_fcflags@ +src_12_hide_mpi_fcflags = @src_12_hide_mpi_fcflags@ +src_14_hidewrite_fcflags = @src_14_hidewrite_fcflags@ +src_16_hideleave_fcflags = @src_16_hideleave_fcflags@ +src_16_kokkos_toolbox_fcflags = @src_16_kokkos_toolbox_fcflags@ +src_17_gpu_toolbox_fcflags = @src_17_gpu_toolbox_fcflags@ +src_17_libtetra_ext_fcflags = @src_17_libtetra_ext_fcflags@ +src_17_minimax_fcflags = @src_17_minimax_fcflags@ +src_17_yaml_out_fcflags = @src_17_yaml_out_fcflags@ +src_18_timing_fcflags = @src_18_timing_fcflags@ +src_21_hashfuncs_fcflags = @src_21_hashfuncs_fcflags@ +src_27_toolbox_oop_fcflags = @src_27_toolbox_oop_fcflags@ +src_28_numeric_noabirule_fcflags = @src_28_numeric_noabirule_fcflags@ +src_29_kpoints_fcflags = @src_29_kpoints_fcflags@ +src_32_util_fcflags = @src_32_util_fcflags@ +src_33_xc_lowlevel_fcflags = @src_33_xc_lowlevel_fcflags@ +src_39_libpaw_fcflags = @src_39_libpaw_fcflags@ +src_41_geometry_fcflags = @src_41_geometry_fcflags@ +src_42_nlstrain_fcflags = @src_42_nlstrain_fcflags@ +src_42_parser_fcflags = @src_42_parser_fcflags@ +src_43_ptgroups_fcflags = @src_43_ptgroups_fcflags@ +src_43_wvl_wrappers_fcflags = @src_43_wvl_wrappers_fcflags@ +src_44_abitools_fcflags = @src_44_abitools_fcflags@ +src_44_abitypes_defs_fcflags = @src_44_abitypes_defs_fcflags@ +src_44_manage_kokkos_fcflags = @src_44_manage_kokkos_fcflags@ +src_45_geomoptim_fcflags = @src_45_geomoptim_fcflags@ +src_45_xgTools_fcflags = @src_45_xgTools_fcflags@ +src_46_ghc_omp_fcflags = @src_46_ghc_omp_fcflags@ +src_46_manage_cuda_fcflags = @src_46_manage_cuda_fcflags@ +src_48_diago_fcflags = @src_48_diago_fcflags@ +src_49_gw_toolbox_oop_fcflags = @src_49_gw_toolbox_oop_fcflags@ +src_51_manage_mpi_fcflags = @src_51_manage_mpi_fcflags@ +src_52_fft_mpi_noabirule_fcflags = @src_52_fft_mpi_noabirule_fcflags@ +src_53_ffts_fcflags = @src_53_ffts_fcflags@ +src_54_spacepar_fcflags = @src_54_spacepar_fcflags@ +src_55_abiutil_fcflags = @src_55_abiutil_fcflags@ +src_56_io_mpi_fcflags = @src_56_io_mpi_fcflags@ +src_56_mixing_fcflags = @src_56_mixing_fcflags@ +src_56_recipspace_fcflags = @src_56_recipspace_fcflags@ +src_56_xc_fcflags = @src_56_xc_fcflags@ +src_57_iopsp_parser_fcflags = @src_57_iopsp_parser_fcflags@ +src_57_iovars_fcflags = @src_57_iovars_fcflags@ +src_61_occeig_fcflags = @src_61_occeig_fcflags@ +src_62_cg_noabirule_fcflags = @src_62_cg_noabirule_fcflags@ +src_62_ctqmc_fcflags = @src_62_ctqmc_fcflags@ +src_62_iowfdenpot_fcflags = @src_62_iowfdenpot_fcflags@ +src_62_poisson_fcflags = @src_62_poisson_fcflags@ +src_62_wvl_wfs_fcflags = @src_62_wvl_wfs_fcflags@ +src_64_psp_fcflags = @src_64_psp_fcflags@ +src_65_lotf_base_fcflags = @src_65_lotf_base_fcflags@ +src_65_paw_fcflags = @src_65_paw_fcflags@ +src_66_nonlocal_fcflags = @src_66_nonlocal_fcflags@ +src_66_vdwxc_fcflags = @src_66_vdwxc_fcflags@ +src_66_wfs_fcflags = @src_66_wfs_fcflags@ +src_67_common_fcflags = @src_67_common_fcflags@ +src_67_python_invocation_ext_fcflags = @src_67_python_invocation_ext_fcflags@ +src_67_triqs_ext_fcflags = @src_67_triqs_ext_fcflags@ +src_68_dmft_fcflags = @src_68_dmft_fcflags@ +src_68_lotf_fcflags = @src_68_lotf_fcflags@ +src_68_recursion_fcflags = @src_68_recursion_fcflags@ +src_68_rsprc_fcflags = @src_68_rsprc_fcflags@ +src_69_wfdesc_fcflags = @src_69_wfdesc_fcflags@ +src_70_gw_fcflags = @src_70_gw_fcflags@ +src_71_bse_fcflags = @src_71_bse_fcflags@ +src_71_wannier_fcflags = @src_71_wannier_fcflags@ +src_72_response_fcflags = @src_72_response_fcflags@ +src_77_ddb_fcflags = @src_77_ddb_fcflags@ +src_77_suscep_fcflags = @src_77_suscep_fcflags@ +src_78_effpot_fcflags = @src_78_effpot_fcflags@ +src_78_eph_fcflags = @src_78_eph_fcflags@ +src_79_seqpar_mpi_fcflags = @src_79_seqpar_mpi_fcflags@ +src_80_rttddft_fcflags = @src_80_rttddft_fcflags@ +src_80_tdep_fcflags = @src_80_tdep_fcflags@ +src_94_scfcv_fcflags = @src_94_scfcv_fcflags@ +src_95_drive_fcflags = @src_95_drive_fcflags@ +src_common_fcflags = @src_common_fcflags@ +src_core_fcflags = @src_core_fcflags@ +src_libpaw_fcflags = @src_libpaw_fcflags@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +with_abinit_common = @with_abinit_common@ +with_bigdft = @with_bigdft@ +with_config_file = @with_config_file@ +with_debug_flavor = @with_debug_flavor@ +with_fallbacks = @with_fallbacks@ +with_fc_vendor = @with_fc_vendor@ +with_fc_version = @with_fc_version@ +with_fft_flavor = @with_fft_flavor@ +with_fftw3 = @with_fftw3@ +with_gnu_ld = @with_gnu_ld@ +with_gpu = @with_gpu@ +with_hdf5 = @with_hdf5@ +with_kokkos = @with_kokkos@ +with_levmar = @with_levmar@ +with_libpaw = @with_libpaw@ +with_libpsml = @with_libpsml@ +with_libxc = @with_libxc@ +with_libxml2 = @with_libxml2@ +with_linalg_flavor = @with_linalg_flavor@ +with_mpi = @with_mpi@ +with_mpi_level = @with_mpi_level@ +with_netcdf = @with_netcdf@ +with_optim_flavor = @with_optim_flavor@ +with_papi = @with_papi@ +with_pfft = @with_pfft@ +with_triqs = @with_triqs@ +with_wannier90 = @with_wannier90@ +with_xmlf90 = @with_xmlf90@ +with_yakl = @with_yakl@ +AM_CFLAGS = @ABI_CPPFLAGS@ +AM_CXXFLAGS = $(sd_triqs_cxxflags) +AM_FCFLAGS = @FPPFLAGS@ @FCFLAGS_FREEFORM@ @FCFLAGS_MODDIR@ @sd_sys_fcflags@ @fcflags_opt_02_clib@ +AM_CPPFLAGS = \ + @src_common_fcflags@ \ + @src_core_fcflags@ \ + @src_libpaw_fcflags@ \ + @sd_levmar_cppflags@ \ + @fc_mod_fcflags@ + + +# Regular source files +lib02_clib_srcs = \ + calling_levmar.c \ + cclock.c \ + etime.c \ + sockets.c \ + m_fsockets.F90 \ + fsi_posix.c \ + gnu_tools.c \ + mallinfo.c \ + md5.c \ + rlimit.c \ + xexit.c \ + xmalloc.c \ + m_clib.F90 + + +# Source files depending on conditionals + +# Library description +noinst_LIBRARIES = lib02_clib.a +lib02_clib_a_SOURCES = $(lib02_clib_srcs) + +# Dependencies (inside the directory) of directory 02_clib +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. +CLEANFILES = calling_levmar_cpp.c cclock_cpp.c etime_cpp.c \ + sockets_cpp.c m_fsockets_cpp.f90 fsi_posix_cpp.c \ + gnu_tools_cpp.c mallinfo_cpp.c md5_cpp.c rlimit_cpp.c \ + xexit_cpp.c xmalloc_cpp.c m_clib_cpp.f90 m_clib.$(MODEXT) \ + m_fsockets.$(MODEXT) +EXTRA_DIST = abinit.src abinit.dep abinit.amf md5.h xmalloc.h \ + _02_clib_ +all: all-am + +.SUFFIXES: +.SUFFIXES: .F90 .c .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu shared/common/src/02_clib/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu shared/common/src/02_clib/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) + +lib02_clib.a: $(lib02_clib_a_OBJECTS) $(lib02_clib_a_DEPENDENCIES) $(EXTRA_lib02_clib_a_DEPENDENCIES) + $(AM_V_at)-rm -f lib02_clib.a + $(AM_V_AR)$(lib02_clib_a_AR) lib02_clib.a $(lib02_clib_a_OBJECTS) $(lib02_clib_a_LIBADD) + $(AM_V_at)$(RANLIB) lib02_clib.a + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/calling_levmar.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cclock.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/etime.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fsi_posix.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gnu_tools.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mallinfo.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/md5.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rlimit.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sockets.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xexit.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmalloc.Po@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) + +.F90.o: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ $< + +.F90.obj: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -f ./$(DEPDIR)/calling_levmar.Po + -rm -f ./$(DEPDIR)/cclock.Po + -rm -f ./$(DEPDIR)/etime.Po + -rm -f ./$(DEPDIR)/fsi_posix.Po + -rm -f ./$(DEPDIR)/gnu_tools.Po + -rm -f ./$(DEPDIR)/mallinfo.Po + -rm -f ./$(DEPDIR)/md5.Po + -rm -f ./$(DEPDIR)/rlimit.Po + -rm -f ./$(DEPDIR)/sockets.Po + -rm -f ./$(DEPDIR)/xexit.Po + -rm -f ./$(DEPDIR)/xmalloc.Po + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f ./$(DEPDIR)/calling_levmar.Po + -rm -f ./$(DEPDIR)/cclock.Po + -rm -f ./$(DEPDIR)/etime.Po + -rm -f ./$(DEPDIR)/fsi_posix.Po + -rm -f ./$(DEPDIR)/gnu_tools.Po + -rm -f ./$(DEPDIR)/mallinfo.Po + -rm -f ./$(DEPDIR)/md5.Po + -rm -f ./$(DEPDIR)/rlimit.Po + -rm -f ./$(DEPDIR)/sockets.Po + -rm -f ./$(DEPDIR)/xexit.Po + -rm -f ./$(DEPDIR)/xmalloc.Po + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ + clean-generic clean-noinstLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am + +.PRECIOUS: Makefile + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/GX-PAW/common/src/02_clib/_02_clib_ b/GX-PAW/common/src/02_clib/_02_clib_ new file mode 100644 index 00000000..b1f880f7 --- /dev/null +++ b/GX-PAW/common/src/02_clib/_02_clib_ @@ -0,0 +1,19 @@ +!!****d* ABINIT/_02_clib_ +!! +!! NAME +!! _02_clib_ +!! +!! DESCRIPTION +!! This directory contains Fortran-callable C functions. +!! +!! COPYRIGHT +!! Copyright (C) 2008-2024 ABINIT group (MG) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! CHILDREN +!! interfaces_02_clib.F90 +!! m_clib.F90 +!! +!!*** diff --git a/GX-PAW/common/src/02_clib/__pycache__/abinit.cpython-36.pyc b/GX-PAW/common/src/02_clib/__pycache__/abinit.cpython-36.pyc new file mode 100644 index 00000000..56ff6477 Binary files /dev/null and b/GX-PAW/common/src/02_clib/__pycache__/abinit.cpython-36.pyc differ diff --git a/GX-PAW/common/src/02_clib/abinit.amf b/GX-PAW/common/src/02_clib/abinit.amf new file mode 100644 index 00000000..7d6947ad --- /dev/null +++ b/GX-PAW/common/src/02_clib/abinit.amf @@ -0,0 +1,3 @@ +EXTRA_DIST += \ + md5.h \ + xmalloc.h diff --git a/GX-PAW/common/src/02_clib/abinit.dep b/GX-PAW/common/src/02_clib/abinit.dep new file mode 100644 index 00000000..f81f3a3b --- /dev/null +++ b/GX-PAW/common/src/02_clib/abinit.dep @@ -0,0 +1,10 @@ +# Dependencies (inside the directory) of directory 02_clib +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. + +CLEANFILES += \ + m_clib.$(MODEXT) \ + m_fsockets.$(MODEXT) + diff --git a/GX-PAW/common/src/02_clib/abinit.dir b/GX-PAW/common/src/02_clib/abinit.dir new file mode 100644 index 00000000..360bf7f5 --- /dev/null +++ b/GX-PAW/common/src/02_clib/abinit.dir @@ -0,0 +1,8 @@ +# Dependencies (outside the directory) of directory 02_clib +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. + +include_dirs = \ +[] \ No newline at end of file diff --git a/GX-PAW/common/src/02_clib/abinit.src b/GX-PAW/common/src/02_clib/abinit.src new file mode 100644 index 00000000..99a50022 --- /dev/null +++ b/GX-PAW/common/src/02_clib/abinit.src @@ -0,0 +1,37 @@ +# -*- Python -*- +# +# Copyright (C) 2005-2024 ABINIT Group (Yann Pouillon) +# +# This file is part of the ABINIT software package. For license information, +# please see the COPYING file in the top-level directory of the ABINIT source +# distribution. +# + +# +# Source files making up the 01_clib library +# + +# Source file attributes +ABI_SRC_NIL = 0 # No attribute +ABI_SRC_BLT = 1 # The file is built by a script +ABI_SRC_DEP = 2 # The file depends on other files + +# Source files +sources = [ + "calling_levmar.c", + "cclock.c", + "etime.c", + "sockets.c", + "m_fsockets.F90", + #"filelock.c", + "fsi_posix.c", + "gnu_tools.c", + "mallinfo.c", + "md5.c", + "rlimit.c", + "xexit.c", + "xmalloc.c", + "m_clib.F90", + ] +# IMPORTANT : please use the alphabetic order in the previous list. Do NOT add the new routine names at the end of the list. +# This is important to avoid numerous conflicts at merge time. Thank you very much. Xavier. diff --git a/GX-PAW/common/src/02_clib/calling_levmar.c b/GX-PAW/common/src/02_clib/calling_levmar.c new file mode 100644 index 00000000..84a1f118 --- /dev/null +++ b/GX-PAW/common/src/02_clib/calling_levmar.c @@ -0,0 +1,240 @@ +////////////////////////////////////////////// +// Routines that are callable from Fortran90 +// and use the levmar Levenberg-Marquardt +// optimisation library +////////////////////////////////////////////// + +#include +#ifdef HAVE_CONFIG_H +#include +#endif +#ifdef HAVE_LEVMAR +#include +#include + +void dim_screening(double *p, double *y, int m, int n, void *adata) +{ + /* The function to be fitted evaluated at the values x + * p[m] are the parameters + * y[n] is the measurement vector (containing the y-values) + * adata[n] is the optional data supplied (fixed) this will contain + * the z-values with adata[0],adata[2],...,adata[2*i] containing the + * real coordinate and adata[1],adata[3],...,adata[2*i+1] containing + * the imaginary coordinate (0<=i1) { /* if there are more poles, add the rest*/ + for(in=0; in1) { /* if there are more poles, add the rest*/ + for(in=0; in-1E-16){ + /* invoke the optimisation function with box boundaries*/ + ret=dlevmar_bc_dif(dim_screening, coeffs, yvals, c_ncoeffs, c_nvals, \ + lower_bounds, upper_bounds, 3000, opts, info, NULL, NULL, \ + (void *)&adata); // Box boundary conditions without Jacobian + //} + //} + + + if(c_prtvol>9){ + printf("\n From C - Levenberg-Marquardt returned in %g iter, reason %g, sumsq %g [%g]\n", info[5], info[6], info[1], info[0]); + printf("\n From C - Returned parameters:\n"); + for(i=0; i-1E-16){ + /* invoke the optimisation function with box boundaries*/ + ret=dlevmar_bc_dif(dre_and_im_screening, coeffs, yvals, c_ncoeffs, c_nvals, \ + lower_bounds, upper_bounds, 1000, opts, info, NULL, NULL, \ + (void *)&adata); // Box boundary conditions without Jacobian + //} + //} + + + if(c_prtvol>9){ + printf("\n From C - Levenberg-Marquardt returned in %g iter, reason %g, sumsq %g [%g]\n", info[5], info[6], info[1], info[0]); + printf("\n From C - Returned parameters:\n"); + for(i=0; i + +void cclock (double* cpu) + +{ + *cpu = ((double) clock()) / CLOCKS_PER_SEC; +} diff --git a/GX-PAW/common/src/02_clib/cclock.o b/GX-PAW/common/src/02_clib/cclock.o new file mode 100644 index 00000000..114126b6 Binary files /dev/null and b/GX-PAW/common/src/02_clib/cclock.o differ diff --git a/GX-PAW/common/src/02_clib/etime.c b/GX-PAW/common/src/02_clib/etime.c new file mode 100644 index 00000000..7b8b8476 --- /dev/null +++ b/GX-PAW/common/src/02_clib/etime.c @@ -0,0 +1,24 @@ +#include "abi_clib.h" + +#if defined HAVE_SYS_TIME_H && defined HAVE_SYS_RESOURCE_H +#include +#include +#endif + +double etime(tt) +float tt[2]; +{ +#if defined HAVE_SYS_TIME_H && defined HAVE_SYS_RESOURCE_H + int who; + struct rusage used; + who = 0; + getrusage(who,&used); + tt[0] = used.ru_utime.tv_sec+((used.ru_utime.tv_usec)/1000000.); + tt[1] = used.ru_stime.tv_sec+((used.ru_stime.tv_usec)/1000000.); + return(tt[0]+tt[1]); +#else + tt[0]=-1; + tt[1]=-1; + return(tt[0]+tt[1]); +#endif +} diff --git a/GX-PAW/common/src/02_clib/etime.o b/GX-PAW/common/src/02_clib/etime.o new file mode 100644 index 00000000..89b5b1e3 Binary files /dev/null and b/GX-PAW/common/src/02_clib/etime.o differ diff --git a/GX-PAW/common/src/02_clib/fsi_posix.c b/GX-PAW/common/src/02_clib/fsi_posix.c new file mode 100644 index 00000000..40409614 --- /dev/null +++ b/GX-PAW/common/src/02_clib/fsi_posix.c @@ -0,0 +1,32 @@ +/* Fortran callable procedures compliant to the File System Interface defined in POSIX version? */ +/* + Copyright (C) 2002 M. Marques, A. Castro, A. Rubio, G. Bertsch + + 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 2, 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, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. +*/ + +#include +#include "abi_clib.h" +#include "xmalloc.h" + + +void c_mkdir(char *path, int *ierr) +{ + /* S_IRWXU read, write, execute/search by owner + http://pubs.opengroup.org/onlinepubs/7908799/xsh/sysstat.h.html + */ + *ierr = mkdir(path, S_IRWXU); +} diff --git a/GX-PAW/common/src/02_clib/fsi_posix.o b/GX-PAW/common/src/02_clib/fsi_posix.o new file mode 100644 index 00000000..875bf9ff Binary files /dev/null and b/GX-PAW/common/src/02_clib/fsi_posix.o differ diff --git a/GX-PAW/common/src/02_clib/gnu_tools.c b/GX-PAW/common/src/02_clib/gnu_tools.c new file mode 100644 index 00000000..1c50ad9c --- /dev/null +++ b/GX-PAW/common/src/02_clib/gnu_tools.c @@ -0,0 +1,93 @@ +/* + * Copyright (C) 2009-2024 ABINIT group (MG) + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#include "abi_clib.h" + +#ifdef HAVE_MCHECK_H +#include +#endif + +/* - Function: void mtrace (void) + * When the mtrace function is called it looks for an environment variable named MALLOC_TRACE. + * This variable is supposed to contain a valid file name. The user must have write access. + * If the file already exists it is truncated. If the environment variable is not set or it does + * not name a valid file which can be opened for writing nothing is done. The behavior of malloc etc. is not changed. + * If the named file is successfully opened, mtrace installs special handlers for the functions malloc, realloc, and free + * (see Hooks for Malloc). From then on, all uses of these functions are traced and protocolled into the file. + * There is now of course a speed penalty for all calls to the traced functions so tracing should not be enabled during + * normal use. + * This function is a GNU extension and generally not available on other systems. The prototype can be found in mcheck.h. + */ +void clib_mtrace (int *ierr) +{ +#ifdef HAVE_MCHECK_H + mtrace(); + *ierr=0; +#else + *ierr=1; +#endif +} + +/* - Function: void muntrace (void) + * The muntrace function can be called after mtrace was used to enable tracing the malloc calls. + * If no (successful) call of mtrace was made muntrace does nothing. + * Otherwise it deinstalls the handlers for malloc, realloc, and free and then closes the protocol file. + * No calls are protocolled anymore and the program runs again at full speed. + * Please note that not only the application uses the traced functions, also libraries (including the C library itself) + * use these functions. + * + * It is no good idea to call muntrace before the program terminated. The libraries are informed about + * the termination of the program only after the program returns from main or calls exit and so cannot + * free the memory they use before this time. + * + * So the best thing one can do is to call mtrace as the very first function in the program and never call muntrace. + * So the program traces almost all uses of the malloc functions (except those calls which are executed by + * constructors of the program or used libraries). + * + * This function is a GNU extension and generally not available on other systems. The prototype can be found in mcheck.h. + */ +void clib_muntrace (int* ierr) +{ +#ifdef HAVE_MCHECK_H + muntrace(); + *ierr=0; +#else + *ierr=1; +#endif +} + +/* + * You can ask malloc to check the consistency of dynamic memory by using the mcheck function. + * This function is a GNU extension, declared in mcheck.h. + * Calling mcheck tells malloc to perform occasional consistency checks. These will catch things such as + * writing past the end of a block that was allocated with malloc. + * It is too late to begin allocation checking once you have allocated anything with malloc. + * So mcheck does nothing in that case. The function returns -1 if you call it too late, + * and 0 otherwise (when it is successful). + * function prototype: mcheck (void (*abortfn) (enum mcheck_status status)) + */ +void clib_mcheck (int* ierr) +{ +#ifdef HAVE_MCHECK_H + *ierr = mcheck (NULL); +#else + *ierr = 2; +#endif +} + diff --git a/GX-PAW/common/src/02_clib/gnu_tools.o b/GX-PAW/common/src/02_clib/gnu_tools.o new file mode 100644 index 00000000..22d84fb6 Binary files /dev/null and b/GX-PAW/common/src/02_clib/gnu_tools.o differ diff --git a/GX-PAW/common/src/02_clib/lib02_clib.a b/GX-PAW/common/src/02_clib/lib02_clib.a new file mode 100644 index 00000000..ad5cb69b Binary files /dev/null and b/GX-PAW/common/src/02_clib/lib02_clib.a differ diff --git a/GX-PAW/common/src/02_clib/m_clib.F90 b/GX-PAW/common/src/02_clib/m_clib.F90 new file mode 100644 index 00000000..a89387ac --- /dev/null +++ b/GX-PAW/common/src/02_clib/m_clib.F90 @@ -0,0 +1,237 @@ +!!****m* ABINIT/m_clib +!! NAME +!! m_clib +!! +!! FUNCTION +!! +!! COPYRIGHT +!! Copyright (C) 2009-2024 ABINIT group (MG) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" + +MODULE m_clib + + use, intrinsic :: iso_c_binding + + implicit none + + private + + public :: clib_rename ! Rename a file with a new name using the rename function from C stdlib + public :: clib_cclock + public :: clib_etime + public :: clib_mtrace + public :: clib_print_mallinfo + public :: clib_ulimit_stack ! Set stack size limit to maximum allowed value. + public :: clib_getpid + !public :: clib_usleep ! Suspend calling thread for microseconds of clock time + + +!FIXME the interfaces below have been commented out since abilint +! JB : because interface must have a name in abilint + +! =================================================== +! ==== Fortran-bindings declared in fsi_posix.c ==== +! =================================================== +! interface +! subroutine clib_mkdir(path, ierr) +! import +! character(len=*),intent(in) :: path +! integer(c_int),intent(out) :: ierr +! end subroutine clib_mkdir +! end interface +! + + interface + integer(c_int) function c_rename(oldname, newname) bind(C, name='rename') + import + character(kind=c_char),intent(in) :: oldname(*) + character(kind=c_char),intent(in) :: newname(*) + end function c_rename + end interface + + interface + subroutine clib_cclock(cpu) bind(C, name="cclock") + import + real(c_double),intent(out) :: cpu + end subroutine clib_cclock + end interface + + interface + real(c_double) function clib_etime(tt) bind(C, name="etime") result(res) + import + real(c_float),intent(out) :: tt(2) + end function clib_etime + end interface + + interface + ! pid_t getpid(). + ! The type of pid_t data is a signed integer type (signed int or we can say int). + function clib_getpid() bind(C, name='getpid') + import + integer(c_int) :: clib_getpid + end function clib_getpid + end interface + +! ================================================= +! ==== Fortran-bindings declared in mallinfo.c ==== +! ================================================= + interface + subroutine clib_mallinfo(arena, hblkhd, usmblks, fsmblks, uordblks, fordblks) bind(C, name="clib_mallinfo") + import + integer(c_long),intent(out) :: arena, hblkhd, usmblks, fsmblks, uordblks, fordblks + end subroutine clib_mallinfo + end interface + +! ================================================== +! ==== Fortran-bindings declared in gnu_tools.c ==== +! ================================================== + + interface + subroutine clib_mtrace(ierr) bind(C, name="clib_mtrace") + import + integer(c_int),intent(out) :: ierr + end subroutine + end interface + + interface + subroutine clib_muntrace(ierr) bind(C, name="clib_muntrace") + import + integer(c_int),intent(out) :: ierr + end subroutine + end interface + + interface + subroutine clib_mcheck(ierr) bind(C, name="clib_mcheck") + import + integer(c_int),intent(out) :: ierr + end subroutine + end interface + + interface + ! Set stack size limit to maximum allowed value. Return soft and hard limit and exit status. + subroutine clib_ulimit_stack(rlim_cur, rlim_max, ierr) bind(C, name="ulimit_stack") + import + integer(c_long),intent(out) :: rlim_cur, rlim_max + integer(c_int),intent(out) :: ierr + end subroutine + end interface + + !interface + ! ! suspend calling thread for microseconds of clock time + ! ! uses unistd.h for Fortran standard compliant sleep. + ! ! sleep() is a GNU extension, not standard Fortran + ! subroutine usleep(us) bind(C) + ! import + ! integer(c_int), value :: us + ! end subroutine usleep + !end interface + + !interface + ! ! int usleep(useconds_t useconds) + ! function clib_usleep(useconds) bind(c, name='usleep') + ! import + ! integer(kind=c_int32_t), value :: useconds + ! integer(kind=c_int) :: c_usleep + ! end function clib_usleep + !end interface + +! ========================================== +! ==== Fortran-bindings for file_lock.c ==== +! ========================================== + + !interface + ! function lock_file(path) bind(C) + ! import + ! implicit none + ! character(kind=c_char),intent(in) :: path(*) + ! integer(c_int) :: lock_file + ! end function lock_file + !end interface + + !interface + ! function unlock_fd(fd) bind(C) + ! import + ! implicit none + ! integer(c_int),value,intent(in) :: fd + ! integer(c_int) unlock_fd + ! end function unlock_fd + !end interface + + +contains +!!*** + +!!****f* m_clib/clib_print_fmallinfo +!! NAME +!! clib_print_fmallinfo +!! +!! FUNCTION +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +subroutine clib_print_mallinfo(unit) + +!Arguments ------------------------------------ + integer,intent(in) :: unit + +!Local variables------------------------------- + integer(c_long) :: arena,hblkhd,usmblks,fsmblks,uordblks,fordblks +! ********************************************************************* + + call clib_mallinfo(arena, hblkhd, usmblks, fsmblks, uordblks, fordblks) + + write(unit,*)"" + write(unit,*)"--- !Mallinfo" + write(unit,*)' Total space in arena: ',arena + write(unit,*)' Space in holding block headers: ',hblkhd + write(unit,*)' Space in small blocks in use: ',usmblks + write(unit,*)' Space in free small blocks: ',fsmblks + write(unit,*)' Space in ordinary blocks in use: ',uordblks + write(unit,*)' Space in free ordinary blocks: ',fordblks + write(unit,*)"..." + write(unit,*)"" + +end subroutine clib_print_mallinfo +!!*** + +!!****f* m_clib/clib_rename +!! NAME +!! clib_rename +!! +!! FUNCTION +!! Rename a file with a new name using the rename function from C stdlib +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +integer function clib_rename(old_fname, new_fname) result(ierr) + +!Arguments ------------------------------------ + character(len=*),intent(in) :: old_fname, new_fname + +! ********************************************************************* + + ierr = c_rename(trim(old_fname)//c_null_char, trim(new_fname)//c_null_char) + +end function clib_rename +!!*** + +END MODULE m_clib +!!*** diff --git a/GX-PAW/common/src/02_clib/m_clib.o b/GX-PAW/common/src/02_clib/m_clib.o new file mode 100644 index 00000000..a8bdb55f Binary files /dev/null and b/GX-PAW/common/src/02_clib/m_clib.o differ diff --git a/GX-PAW/common/src/02_clib/m_fsockets.F90 b/GX-PAW/common/src/02_clib/m_fsockets.F90 new file mode 100644 index 00000000..5ac2de6b --- /dev/null +++ b/GX-PAW/common/src/02_clib/m_fsockets.F90 @@ -0,0 +1,218 @@ +!F90 ISO_C_BINDING wrapper for socket communication. +!MG got it from https://github.com/i-pi/i-pi/tree/master/drivers + +!Copyright (C) 2013, Michele Ceriotti + +!Permission is hereby granted, free of charge, to any person obtaining +!a copy of this software and associated documentation files (the +!"Software"), to deal in the Software without restriction, including +!without limitation the rights to use, copy, modify, merge, publish, +!distribute, sublicense, and/or sell copies of the Software, and to +!permit persons to whom the Software is furnished to do so, subject to +!the following conditions: + +!The above copyright notice and this permission notice shall be included +!in all copies or substantial portions of the Software. + +!THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +!EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +!MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +!IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +!CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +!TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +!SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +!Contains both the functions that transmit data to the socket and read the data +!back out again once finished, and the function which opens the socket initially. + +!Functions: +! open_socket: Opens a socket with the required host server, socket type and port number. +! write_buffer: Writes a string to the socket. +! read_buffer: Reads data from the socket. + +MODULE m_fsockets + + use, intrinsic :: iso_c_binding + + IMPLICIT NONE + + INTERFACE writebuffer + MODULE PROCEDURE writebuffer_s, writebuffer_d, writebuffer_dv, writebuffer_i + END INTERFACE writebuffer + + INTERFACE readbuffer + MODULE PROCEDURE readbuffer_s, readbuffer_dv, readbuffer_d, readbuffer_i + END INTERFACE readbuffer + + INTERFACE + SUBROUTINE open_csocket(psockfd, inet, port, host) BIND(C, name="open_socket") + use, intrinsic :: iso_c_binding + INTEGER(KIND=C_INT) :: psockfd, inet, port + CHARACTER(KIND=C_CHAR), DIMENSION(*) :: host + END SUBROUTINE open_csocket + + SUBROUTINE writebuffer_csocket(psockfd, pdata, plen) BIND(C, name="writebuffer") + use, intrinsic :: iso_c_binding + INTEGER(KIND=C_INT) :: psockfd + TYPE(C_PTR), VALUE :: pdata + INTEGER(KIND=C_INT) :: plen + END SUBROUTINE writebuffer_csocket + + SUBROUTINE readbuffer_csocket(psockfd, pdata, plen) BIND(C, name="readbuffer") + use, intrinsic :: iso_c_binding + INTEGER(KIND=C_INT) :: psockfd + TYPE(C_PTR), VALUE :: pdata + INTEGER(KIND=C_INT) :: plen + END SUBROUTINE readbuffer_csocket + END INTERFACE + +CONTAINS + + SUBROUTINE open_socket(psockfd, inet, port, host) + INTEGER, INTENT(IN) :: inet, port + INTEGER, INTENT(OUT) :: psockfd + CHARACTER(LEN=1024), INTENT(IN) :: host + CHARACTER(LEN=1,KIND=C_CHAR) :: chost(1024) + + CALL fstr2cstr(host, chost) + CALL open_csocket(psockfd, inet, port, host) + END SUBROUTINE open_socket + + SUBROUTINE fstr2cstr(fstr, cstr, plen) + CHARACTER(LEN=*), INTENT(IN) :: fstr + CHARACTER(LEN=1,KIND=C_CHAR), INTENT(OUT) :: cstr(:) + INTEGER, INTENT(IN), OPTIONAL :: plen + + INTEGER i,n + IF (PRESENT(plen)) THEN + n = plen + DO i=1,n + cstr(i) = fstr(i:i) + ENDDO + ELSE + n = LEN_TRIM(fstr) + DO i=1,n + cstr(i) = fstr(i:i) + ENDDO + cstr(n+1) = C_NULL_CHAR + END IF + END SUBROUTINE fstr2cstr + + SUBROUTINE writebuffer_d (psockfd, fdata) + use, intrinsic :: iso_c_binding + INTEGER, INTENT(IN) :: psockfd + REAL(KIND=8), INTENT(IN) :: fdata + + REAL(KIND=C_DOUBLE), TARGET :: cdata + + cdata = fdata + CALL writebuffer_csocket(psockfd, c_loc(cdata), 8) + END SUBROUTINE writebuffer_d + + SUBROUTINE writebuffer_i (psockfd, fdata) + use, intrinsic :: iso_c_binding + INTEGER, INTENT(IN) :: psockfd, fdata + + INTEGER(KIND=C_INT), TARGET :: cdata + + cdata = fdata + CALL writebuffer_csocket(psockfd, c_loc(cdata), 4) + END SUBROUTINE writebuffer_i + + SUBROUTINE writebuffer_s (psockfd, fstring, plen) + use, intrinsic :: iso_c_binding + INTEGER, INTENT(IN) :: psockfd + CHARACTER(LEN=*), INTENT(IN) :: fstring + INTEGER, INTENT(IN) :: plen + + INTEGER :: i + CHARACTER(LEN=1, KIND=C_CHAR), TARGET :: cstring(plen) + + DO i = 1,plen + cstring(i) = fstring(i:i) + ENDDO + CALL writebuffer_csocket(psockfd, c_loc(cstring(1)), plen) + END SUBROUTINE writebuffer_s + + SUBROUTINE writebuffer_dv(psockfd, fdata, plen) + use, intrinsic :: iso_c_binding + INTEGER, INTENT(IN) :: psockfd, plen + REAL(KIND=8), INTENT(IN), TARGET :: fdata(plen) + + CALL writebuffer_csocket(psockfd, c_loc(fdata(1)), 8*plen) + END SUBROUTINE writebuffer_dv + + SUBROUTINE readbuffer_d (psockfd, fdata) + use, intrinsic :: iso_c_binding + INTEGER, INTENT(IN) :: psockfd + REAL(KIND=8), INTENT(OUT) :: fdata + + REAL(KIND=C_DOUBLE), TARGET :: cdata + + CALL readbuffer_csocket(psockfd, c_loc(cdata), 8) + fdata=cdata + END SUBROUTINE readbuffer_d + + SUBROUTINE readbuffer_i (psockfd, fdata) + use, intrinsic :: iso_c_binding + INTEGER, INTENT(IN) :: psockfd + INTEGER, INTENT(OUT) :: fdata + + INTEGER(KIND=C_INT), TARGET :: cdata + + CALL readbuffer_csocket(psockfd, c_loc(cdata), 4) + fdata = cdata + END SUBROUTINE readbuffer_i + + SUBROUTINE readbuffer_s (psockfd, fstring, plen) + use, intrinsic :: iso_c_binding + INTEGER, INTENT(IN) :: psockfd + CHARACTER(LEN=*), INTENT(OUT) :: fstring + INTEGER, INTENT(IN) :: plen + + INTEGER :: i + CHARACTER(LEN=1, KIND=C_CHAR), TARGET :: cstring(plen) + + CALL readbuffer_csocket(psockfd, c_loc(cstring(1)), plen) + fstring="" + DO i = 1,plen + fstring(i:i) = cstring(i) + ENDDO + END SUBROUTINE readbuffer_s + + SUBROUTINE readbuffer_dv(psockfd, fdata, plen) + use, intrinsic :: iso_c_binding + INTEGER, INTENT(IN) :: psockfd, plen + REAL(KIND=8), INTENT(OUT), TARGET :: fdata(plen) + + CALL readbuffer_csocket(psockfd, c_loc(fdata(1)), 8*plen) + END SUBROUTINE readbuffer_dv + + SUBROUTINE socket_from_string (srvaddress, socket) + CHARACTER(len=*), INTENT(IN) :: srvaddress + integer, INTENT(out) :: socket + CHARACTER(len=len_trim(srvaddress)) :: address + INTEGER :: port, inet, field_sep_pos + + ! Parses host name, port and socket type + field_sep_pos = INDEX(srvaddress, ':', back=.true.) + address = srvaddress(1:field_sep_pos-1) + + ! Check if UNIX type socket + IF (trim(srvaddress(field_sep_pos+1 :)) == 'UNIX') then + port = 1234 ! just a place-holder + inet = 0 + !write(*,*) " Connecting to `", trim(address), "` using UNIX socket" + ELSE + read ( srvaddress ( field_sep_pos+1 : ), * ) port + inet = 1 + !write(*,*) " Connecting to `", trim(address), ":", srvaddress (field_sep_pos+1:), " using INET socket" + END IF + + ! Create the socket + CALL open_socket (socket, inet, port, trim(address)//achar(0)) + + END SUBROUTINE socket_from_string + +END MODULE m_fsockets diff --git a/GX-PAW/common/src/02_clib/m_fsockets.o b/GX-PAW/common/src/02_clib/m_fsockets.o new file mode 100644 index 00000000..aad38c24 Binary files /dev/null and b/GX-PAW/common/src/02_clib/m_fsockets.o differ diff --git a/GX-PAW/common/src/02_clib/mallinfo.c b/GX-PAW/common/src/02_clib/mallinfo.c new file mode 100644 index 00000000..e5c0cef2 --- /dev/null +++ b/GX-PAW/common/src/02_clib/mallinfo.c @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2009-2024 ABINIT group (MG) + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#include "abi_clib.h" + +void clib_mallinfo + (long int *arena, long int *hblkhd, long int *usmblks, long int *fsmblks, long int *uordblks, long int *fordblks) +{ +#ifdef HAVE_MALLINFO + struct mallinfo info = mallinfo(); + *arena = info.arena; + *hblkhd = info.hblkhd; + *usmblks = info.usmblks; + *fsmblks = info.fsmblks; + *uordblks = info.uordblks; + *fordblks = info.fordblks; +#else + *arena = -1.0; + *hblkhd = -1.0; + *usmblks = -1.0; + *fsmblks = -1.0; + *uordblks = -1.0; + *fordblks = -1.0; +#endif +} + + +/* SVID2/XPG mallinfo structure */ +#if 0 +struct mallinfo { + int arena; /* non-mmapped space allocated from system */ + int ordblks; /* number of free chunks */ + int smblks; /* number of fastbin blocks */ + int hblks; /* number of mmapped regions */ + int hblkhd; /* space in mmapped regions */ + int usmblks; /* maximum total allocated space */ + int fsmblks; /* space available in freed fastbin blocks */ + int uordblks; /* total allocated space */ + int fordblks; /* total free space */ + int keepcost; /* top-most, releasable (via malloc_trim) space */ +}; +#endif diff --git a/GX-PAW/common/src/02_clib/mallinfo.o b/GX-PAW/common/src/02_clib/mallinfo.o new file mode 100644 index 00000000..3e8b0371 Binary files /dev/null and b/GX-PAW/common/src/02_clib/mallinfo.o differ diff --git a/GX-PAW/common/src/02_clib/md5.c b/GX-PAW/common/src/02_clib/md5.c new file mode 100644 index 00000000..62cbe3c3 --- /dev/null +++ b/GX-PAW/common/src/02_clib/md5.c @@ -0,0 +1,354 @@ +/* + * This is an OpenSSL-compatible implementation of the RSA Data Security, Inc. + * MD5 Message-Digest Algorithm (RFC 1321). + * + * Homepage: + * http://openwall.info/wiki/people/solar/software/public-domain-source-code/md5 + * + * Author: + * Alexander Peslyak, better known as Solar Designer + * + * This software was written by Alexander Peslyak in 2001. No copyright is + * claimed, and the software is hereby placed in the public domain. + * In case this attempt to disclaim copyright and place the software in the + * public domain is deemed null and void, then the software is + * Copyright (C) 2001 Alexander Peslyak and it is hereby released to the + * general public under the following terms: + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted. + * + * There's ABSOLUTELY NO WARRANTY, express or implied. + * + * (This is a heavily cut-down "BSD license".) + * + * This differs from Colin Plumb's older public domain implementation in that + * no exactly 32-bit integer data type is required (any 32-bit or wider + * unsigned integer data type will do), there's no compile-time endianness + * configuration, and the function prototypes match OpenSSL's. No code from + * Colin Plumb's implementation has been reused; this comment merely compares + * the properties of the two independent implementations. + * + * The primary goals of this implementation are portability and ease of use. + * It is meant to be fast, but not as fast as possible. Some known + * optimizations are not included to reduce source code size and avoid + * compile-time configuration. + * + * This file has been adapted to Abinit by Yann Pouillon. + */ + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include +#include +#ifdef HAVE_MALLOC_MALLOC_H +# include +#elif HAVE_MALLOC_H +# include +#endif + +#include "md5.h" + +/* + * The basic MD5 functions. + * + * F and G are optimized compared to their RFC 1321 definitions for + * architectures that lack an AND-NOT instruction, just like in Colin Plumb's + * implementation. + */ +#define F(x, y, z) ((z) ^ ((x) & ((y) ^ (z)))) +#define G(x, y, z) ((y) ^ ((z) & ((x) ^ (y)))) +#define H(x, y, z) (((x) ^ (y)) ^ (z)) +#define H2(x, y, z) ((x) ^ ((y) ^ (z))) +#define I(x, y, z) ((y) ^ ((x) | ~(z))) + +/* + * The MD5 transformation for all four rounds. + */ +#define STEP(f, a, b, c, d, x, t, s) \ + (a) += f((b), (c), (d)) + (x) + (t); \ + (a) = (((a) << (s)) | (((a) & 0xffffffff) >> (32 - (s)))); \ + (a) += (b); + +/* + * SET reads 4 input bytes in little-endian byte order and stores them + * in a properly aligned word in host byte order. + * + * The check for little-endian architectures that tolerate unaligned + * memory accesses is just an optimization. Nothing will break if it + * doesn't work. + */ +#if defined(__i386__) || defined(__x86_64__) || defined(__vax__) +#define SET(n) \ + (*(MD5_u32plus *)&ptr[(n) * 4]) +#define GET(n) \ + SET(n) +#else +#define SET(n) \ + (ctx->block[(n)] = \ + (MD5_u32plus)ptr[(n) * 4] | \ + ((MD5_u32plus)ptr[(n) * 4 + 1] << 8) | \ + ((MD5_u32plus)ptr[(n) * 4 + 2] << 16) | \ + ((MD5_u32plus)ptr[(n) * 4 + 3] << 24)) +#define GET(n) \ + (ctx->block[(n)]) +#endif + +/* + * This processes one or more 64-byte data blocks, but does NOT update + * the bit counters. There are no alignment requirements. + */ +static const void *body(MD5_CTX *ctx, const void *data, unsigned long size) +{ + const unsigned char *ptr; + MD5_u32plus a, b, c, d; + MD5_u32plus saved_a, saved_b, saved_c, saved_d; + + ptr = (const unsigned char *)data; + + a = ctx->a; + b = ctx->b; + c = ctx->c; + d = ctx->d; + + do { + saved_a = a; + saved_b = b; + saved_c = c; + saved_d = d; + + /* Round 1 */ + STEP(F, a, b, c, d, SET(0), 0xd76aa478, 7) + STEP(F, d, a, b, c, SET(1), 0xe8c7b756, 12) + STEP(F, c, d, a, b, SET(2), 0x242070db, 17) + STEP(F, b, c, d, a, SET(3), 0xc1bdceee, 22) + STEP(F, a, b, c, d, SET(4), 0xf57c0faf, 7) + STEP(F, d, a, b, c, SET(5), 0x4787c62a, 12) + STEP(F, c, d, a, b, SET(6), 0xa8304613, 17) + STEP(F, b, c, d, a, SET(7), 0xfd469501, 22) + STEP(F, a, b, c, d, SET(8), 0x698098d8, 7) + STEP(F, d, a, b, c, SET(9), 0x8b44f7af, 12) + STEP(F, c, d, a, b, SET(10), 0xffff5bb1, 17) + STEP(F, b, c, d, a, SET(11), 0x895cd7be, 22) + STEP(F, a, b, c, d, SET(12), 0x6b901122, 7) + STEP(F, d, a, b, c, SET(13), 0xfd987193, 12) + STEP(F, c, d, a, b, SET(14), 0xa679438e, 17) + STEP(F, b, c, d, a, SET(15), 0x49b40821, 22) + + /* Round 2 */ + STEP(G, a, b, c, d, GET(1), 0xf61e2562, 5) + STEP(G, d, a, b, c, GET(6), 0xc040b340, 9) + STEP(G, c, d, a, b, GET(11), 0x265e5a51, 14) + STEP(G, b, c, d, a, GET(0), 0xe9b6c7aa, 20) + STEP(G, a, b, c, d, GET(5), 0xd62f105d, 5) + STEP(G, d, a, b, c, GET(10), 0x02441453, 9) + STEP(G, c, d, a, b, GET(15), 0xd8a1e681, 14) + STEP(G, b, c, d, a, GET(4), 0xe7d3fbc8, 20) + STEP(G, a, b, c, d, GET(9), 0x21e1cde6, 5) + STEP(G, d, a, b, c, GET(14), 0xc33707d6, 9) + STEP(G, c, d, a, b, GET(3), 0xf4d50d87, 14) + STEP(G, b, c, d, a, GET(8), 0x455a14ed, 20) + STEP(G, a, b, c, d, GET(13), 0xa9e3e905, 5) + STEP(G, d, a, b, c, GET(2), 0xfcefa3f8, 9) + STEP(G, c, d, a, b, GET(7), 0x676f02d9, 14) + STEP(G, b, c, d, a, GET(12), 0x8d2a4c8a, 20) + + /* Round 3 */ + STEP(H, a, b, c, d, GET(5), 0xfffa3942, 4) + STEP(H2, d, a, b, c, GET(8), 0x8771f681, 11) + STEP(H, c, d, a, b, GET(11), 0x6d9d6122, 16) + STEP(H2, b, c, d, a, GET(14), 0xfde5380c, 23) + STEP(H, a, b, c, d, GET(1), 0xa4beea44, 4) + STEP(H2, d, a, b, c, GET(4), 0x4bdecfa9, 11) + STEP(H, c, d, a, b, GET(7), 0xf6bb4b60, 16) + STEP(H2, b, c, d, a, GET(10), 0xbebfbc70, 23) + STEP(H, a, b, c, d, GET(13), 0x289b7ec6, 4) + STEP(H2, d, a, b, c, GET(0), 0xeaa127fa, 11) + STEP(H, c, d, a, b, GET(3), 0xd4ef3085, 16) + STEP(H2, b, c, d, a, GET(6), 0x04881d05, 23) + STEP(H, a, b, c, d, GET(9), 0xd9d4d039, 4) + STEP(H2, d, a, b, c, GET(12), 0xe6db99e5, 11) + STEP(H, c, d, a, b, GET(15), 0x1fa27cf8, 16) + STEP(H2, b, c, d, a, GET(2), 0xc4ac5665, 23) + + /* Round 4 */ + STEP(I, a, b, c, d, GET(0), 0xf4292244, 6) + STEP(I, d, a, b, c, GET(7), 0x432aff97, 10) + STEP(I, c, d, a, b, GET(14), 0xab9423a7, 15) + STEP(I, b, c, d, a, GET(5), 0xfc93a039, 21) + STEP(I, a, b, c, d, GET(12), 0x655b59c3, 6) + STEP(I, d, a, b, c, GET(3), 0x8f0ccc92, 10) + STEP(I, c, d, a, b, GET(10), 0xffeff47d, 15) + STEP(I, b, c, d, a, GET(1), 0x85845dd1, 21) + STEP(I, a, b, c, d, GET(8), 0x6fa87e4f, 6) + STEP(I, d, a, b, c, GET(15), 0xfe2ce6e0, 10) + STEP(I, c, d, a, b, GET(6), 0xa3014314, 15) + STEP(I, b, c, d, a, GET(13), 0x4e0811a1, 21) + STEP(I, a, b, c, d, GET(4), 0xf7537e82, 6) + STEP(I, d, a, b, c, GET(11), 0xbd3af235, 10) + STEP(I, c, d, a, b, GET(2), 0x2ad7d2bb, 15) + STEP(I, b, c, d, a, GET(9), 0xeb86d391, 21) + + a += saved_a; + b += saved_b; + c += saved_c; + d += saved_d; + + ptr += 64; + } while (size -= 64); + + ctx->a = a; + ctx->b = b; + ctx->c = c; + ctx->d = d; + + return ptr; +} + +/* + * This allocates memory for a MD5 context, in order to be easily usable + * from Fortran. + */ +MD5_CTX *MD5_Context_New() { + MD5_CTX *ctx; + + ctx = (MD5_CTX *) malloc(sizeof(MD5_CTX)); + + return ctx; +} + +/* + * This is a convenience routine to read the file directly from C, + * because Fortran messes up everything. + */ +#define BUFSIZE 1024*16 +#if !defined(_OSD_POSIX) && !defined(__DJGPP__) +int read(int, void *, unsigned int); +#endif +void MD5_Digest_File(const char *path, char *result) { + unsigned char buffer[BUFSIZE]; + int fd; + unsigned long bytes; + FILE *fc; + MD5_CTX ctx; + + result[0] = '\0'; + + fc = fopen(path, "r"); + if ( fc != NULL ) { + MD5_Init(&ctx); + fd=fileno(fc); + for (;;) { + bytes = read(fd, (void *)buffer, BUFSIZE); + if ( bytes <= 0 ) break; + MD5_Update(&ctx, buffer, bytes); + } + MD5_Final(result, &ctx); + } +} + +void MD5_Final(char *result, MD5_CTX *ctx) +{ + unsigned char buffer[17]; + unsigned long used, available; + int i; + + used = ctx->lo & 0x3f; + + ctx->buffer[used++] = 0x80; + + available = 64 - used; + + if (available < 8) { + memset(&ctx->buffer[used], 0, available); + body(ctx, ctx->buffer, 64); + used = 0; + available = 64; + } + + memset(&ctx->buffer[used], 0, available - 8); + + ctx->lo <<= 3; + ctx->buffer[56] = ctx->lo; + ctx->buffer[57] = ctx->lo >> 8; + ctx->buffer[58] = ctx->lo >> 16; + ctx->buffer[59] = ctx->lo >> 24; + ctx->buffer[60] = ctx->hi; + ctx->buffer[61] = ctx->hi >> 8; + ctx->buffer[62] = ctx->hi >> 16; + ctx->buffer[63] = ctx->hi >> 24; + + body(ctx, ctx->buffer, 64); + + buffer[0] = ctx->a; + buffer[1] = ctx->a >> 8; + buffer[2] = ctx->a >> 16; + buffer[3] = ctx->a >> 24; + buffer[4] = ctx->b; + buffer[5] = ctx->b >> 8; + buffer[6] = ctx->b >> 16; + buffer[7] = ctx->b >> 24; + buffer[8] = ctx->c; + buffer[9] = ctx->c >> 8; + buffer[10] = ctx->c >> 16; + buffer[11] = ctx->c >> 24; + buffer[12] = ctx->d; + buffer[13] = ctx->d >> 8; + buffer[14] = ctx->d >> 16; + buffer[15] = ctx->d >> 24; + + memset(ctx, 0, sizeof(*ctx)); + + for (i = 0; i < 16; i++) { + sprintf(result+i*2, "%2.2x", buffer[i]); + } + result[32] = '\0'; +} + +void MD5_Init(MD5_CTX *ctx) +{ + ctx->a = 0x67452301; + ctx->b = 0xefcdab89; + ctx->c = 0x98badcfe; + ctx->d = 0x10325476; + + ctx->lo = 0; + ctx->hi = 0; +} + +void MD5_Update(MD5_CTX *ctx, const void *data, unsigned long size) +{ + MD5_u32plus saved_lo; + unsigned long used, available; + + saved_lo = ctx->lo; + if ((ctx->lo = (saved_lo + size) & 0x1fffffff) < saved_lo) + ctx->hi++; + ctx->hi += size >> 29; + + used = saved_lo & 0x3f; + + if (used) { + available = 64 - used; + + if (size < available) { + memcpy(&ctx->buffer[used], data, size); + return; + } + + memcpy(&ctx->buffer[used], data, available); + data = (const unsigned char *)data + available; + size -= available; + body(ctx, ctx->buffer, 64); + } + + if (size >= 64) { + data = body(ctx, data, size & ~(unsigned long)0x3f); + size &= 0x3f; + } + + memcpy(ctx->buffer, data, size); +} diff --git a/GX-PAW/common/src/02_clib/md5.h b/GX-PAW/common/src/02_clib/md5.h new file mode 100644 index 00000000..9ce729f8 --- /dev/null +++ b/GX-PAW/common/src/02_clib/md5.h @@ -0,0 +1,47 @@ +/* + * This is an OpenSSL-compatible implementation of the RSA Data Security, Inc. + * MD5 Message-Digest Algorithm (RFC 1321). + * + * Homepage: + * http://openwall.info/wiki/people/solar/software/public-domain-source-code/md5 + * + * Author: + * Alexander Peslyak, better known as Solar Designer + * + * This software was written by Alexander Peslyak in 2001. No copyright is + * claimed, and the software is hereby placed in the public domain. + * In case this attempt to disclaim copyright and place the software in the + * public domain is deemed null and void, then the software is + * Copyright (C) 2001 Alexander Peslyak and it is hereby released to the + * general public under the following terms: + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted. + * + * There's ABSOLUTELY NO WARRANTY, express or implied. + * + * See md5.c for more information. + * + * This file has been adapted to Abinit by Yann Pouillon. + */ + +#if !defined(_MD5_H) +#define _MD5_H + +/* Any 32-bit or wider unsigned integer data type will do */ +typedef unsigned int MD5_u32plus; + +typedef struct { + MD5_u32plus lo, hi; + MD5_u32plus a, b, c, d; + unsigned char buffer[64]; + MD5_u32plus block[16]; +} MD5_CTX; + +extern MD5_CTX *MD5_Context_New(void); +extern void MD5_Digest_File(const char *path, char *result); +extern void MD5_Final(char *result, MD5_CTX *ctx); +extern void MD5_Init(MD5_CTX *ctx); +extern void MD5_Update(MD5_CTX *ctx, const void *data, unsigned long size); + +#endif diff --git a/GX-PAW/common/src/02_clib/md5.o b/GX-PAW/common/src/02_clib/md5.o new file mode 100644 index 00000000..f9e19a62 Binary files /dev/null and b/GX-PAW/common/src/02_clib/md5.o differ diff --git a/GX-PAW/common/src/02_clib/rlimit.c b/GX-PAW/common/src/02_clib/rlimit.c new file mode 100644 index 00000000..66062187 --- /dev/null +++ b/GX-PAW/common/src/02_clib/rlimit.c @@ -0,0 +1,37 @@ +#include +#include +#include + +/* + * Set stack size limit to maximum allowed value. Return soft and hard limit and exit status. + * */ + +void ulimit_stack(long int *rlim_cur, long int *rlim_max, int *ierr) { + + int result; + struct rlimit rlim = {RLIM_INFINITY, RLIM_INFINITY}; + /* From https://linux.die.net/man/2/getrlimit + struct rlimit { + rlim_t rlim_cur; Soft limit + rlim_t rlim_max; Hard limit (ceiling for rlim_cur) + }; */ + + /* Try to set both soft and hard limits to INFINITY */ + result = setrlimit(RLIMIT_STACK, &rlim); + if (result == -1) { + /* Try to set soft == sys hard */ + if (getrlimit(RLIMIT_STACK, &rlim) == 0) { + rlim.rlim_cur = rlim.rlim_max; + result = setrlimit(RLIMIT_STACK, &rlim); + } + } + + *ierr = result; + *rlim_cur = -1; + *rlim_max = -1; + if (getrlimit(RLIMIT_STACK, &rlim) == 0) { + *rlim_cur = rlim.rlim_cur; + *rlim_max = rlim.rlim_max; + } + +} diff --git a/GX-PAW/common/src/02_clib/rlimit.o b/GX-PAW/common/src/02_clib/rlimit.o new file mode 100644 index 00000000..1b2f7b7f Binary files /dev/null and b/GX-PAW/common/src/02_clib/rlimit.o differ diff --git a/GX-PAW/common/src/02_clib/sockets.c b/GX-PAW/common/src/02_clib/sockets.c new file mode 100644 index 00000000..46f82aa4 --- /dev/null +++ b/GX-PAW/common/src/02_clib/sockets.c @@ -0,0 +1,175 @@ +/* A minimal wrapper for socket communication. + +MG got it from https://github.com/i-pi/i-pi/tree/master/drivers + +Copyright (C) 2013, Joshua More and Michele Ceriotti + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +Contains both the functions that transmit data to the socket and read the data +back out again once finished, and the function which opens the socket initially. +Can be linked to a FORTRAN code that does not support sockets natively. + +Functions: + error: Prints an error message and then exits. + open_socket_: Opens a socket with the required host server, socket type and + port number. + write_buffer_: Writes a string to the socket. + read_buffer_: Reads data from the socket. +*/ + +#include +#include + +#ifdef HAVE_CONFIG_H +#include +#endif + +#define HAVE_SOCKETS +/* +#undef HAVE_SOCKETS +*/ + +#ifdef HAVE_SOCKETS + +#include +#include +#include +#include +#include +#include +#include + +void open_socket(int *psockfd, int* inet, int* port, const char* host) +/* Opens a socket. + +Note that fortran passes an extra argument for the string length, but this is +ignored here for C compatibility. + +Args: + psockfd: The id of the socket that will be created. + inet: An integer that determines whether the socket will be an inet or unix + domain socket. Gives unix if 0, inet otherwise. + port: The port number for the socket to be created. Low numbers are often + reserved for important channels, so use of numbers of 4 or more digits is + recommended. + host: The name of the host server. +*/ + +{ + int sockfd, ai_err; + + if (*inet>0) + { // creates an internet socket + + // fetches information on the host + struct addrinfo hints, *res; + char service[256]; + + memset(&hints, 0, sizeof(hints)); + hints.ai_socktype = SOCK_STREAM; + hints.ai_family = AF_INET; + hints.ai_flags = AI_PASSIVE; + + sprintf(service,"%d",*port); // convert the port number to a string + ai_err = getaddrinfo(host, service, &hints, &res); + if (ai_err!=0) { perror("Error fetching host data. Wrong host name?"); exit(-1); } + + // creates socket + sockfd = socket(res->ai_family, res->ai_socktype, res->ai_protocol); + if (sockfd < 0) { perror("Error opening socket"); exit(-1); } + + // makes connection + if (connect(sockfd, res->ai_addr, res->ai_addrlen) < 0) + { perror("Error opening INET socket: wrong port or server unreachable"); exit(-1); } + freeaddrinfo(res); + } + else + { + struct sockaddr_un serv_addr; + + // fills up details of the socket addres + memset(&serv_addr, 0, sizeof(serv_addr)); + serv_addr.sun_family = AF_UNIX; + strcpy(serv_addr.sun_path, "/tmp/ipi_"); + strcpy(serv_addr.sun_path+9, host); + // creates a unix socket + + // creates the socket + sockfd = socket(AF_UNIX, SOCK_STREAM, 0); + + // connects + if (connect(sockfd, (struct sockaddr *) &serv_addr, sizeof(serv_addr)) < 0) + { perror("Error opening UNIX socket: path unavailable, or already existing"); exit(-1); } + } + + + *psockfd=sockfd; +} + +void writebuffer(int *psockfd, const char *data, int* plen) +/* Writes to a socket. + +Args: + psockfd: The id of the socket that will be written to. + data: The data to be written to the socket. + plen: The length of the data in bytes. +*/ + +{ + int n; + int sockfd=*psockfd; + int len=*plen; + + n = write(sockfd,data,len); + if (n < 0) { perror("Error writing to socket: server has quit or connection broke"); exit(-1); } +} + + +void readbuffer(int *psockfd, char *data, int* plen) +/* Reads from a socket. + +Args: + psockfd: The id of the socket that will be read from. + data: The storage array for data read from the socket. + plen: The length of the data in bytes. +*/ + +{ + int n, nr; + int sockfd=*psockfd; + int len=*plen; + + n = nr = read(sockfd,data,len); + + while (nr>0 && n&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/abinit +pkgincludedir = $(includedir)/abinit +pkglibdir = $(libdir)/abinit +pkglibexecdir = $(libexecdir)/abinit +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = x86_64-apple-darwin18.7.0 +host_triplet = x86_64-apple-darwin18.7.0 +target_triplet = x86_64-apple-darwin18.7.0 +subdir = shared/common/src/10_defs +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/m4/arch-gpu.m4 \ + $(top_srcdir)/config/m4/arch-mpi.m4 \ + $(top_srcdir)/config/m4/auto-autotools.m4 \ + $(top_srcdir)/config/m4/auto-corelibs.m4 \ + $(top_srcdir)/config/m4/auto-debug.m4 \ + $(top_srcdir)/config/m4/auto-dirflags.m4 \ + $(top_srcdir)/config/m4/auto-env.m4 \ + $(top_srcdir)/config/m4/auto-hints.m4 \ + $(top_srcdir)/config/m4/auto-optim.m4 \ + $(top_srcdir)/config/m4/auto-options.m4 \ + $(top_srcdir)/config/m4/auto-output.m4 \ + $(top_srcdir)/config/m4/auto-triggers.m4 \ + $(top_srcdir)/config/m4/conf-atompaw.m4 \ + $(top_srcdir)/config/m4/conf-debug.m4 \ + $(top_srcdir)/config/m4/conf-fallbacks.m4 \ + $(top_srcdir)/config/m4/conf-files.m4 \ + $(top_srcdir)/config/m4/conf-init.m4 \ + $(top_srcdir)/config/m4/conf-openmp.m4 \ + $(top_srcdir)/config/m4/conf-optim.m4 \ + $(top_srcdir)/config/m4/lang-c++.m4 \ + $(top_srcdir)/config/m4/lang-c.m4 \ + $(top_srcdir)/config/m4/lang-fortran-import.m4 \ + $(top_srcdir)/config/m4/lang-fortran.m4 \ + $(top_srcdir)/config/m4/lang-python.m4 \ + $(top_srcdir)/config/m4/libxml2.m4 \ + $(top_srcdir)/config/m4/misc-display.m4 \ + $(top_srcdir)/config/m4/sd_abinit_common.m4 \ + $(top_srcdir)/config/m4/sd_arch_gpu.m4 \ + $(top_srcdir)/config/m4/sd_arch_mpi.m4 \ + $(top_srcdir)/config/m4/sd_bigdft.m4 \ + $(top_srcdir)/config/m4/sd_core.m4 \ + $(top_srcdir)/config/m4/sd_esl.m4 \ + $(top_srcdir)/config/m4/sd_fftw3.m4 \ + $(top_srcdir)/config/m4/sd_gpu_kokkos.m4 \ + $(top_srcdir)/config/m4/sd_gpu_yakl.m4 \ + $(top_srcdir)/config/m4/sd_io_hdf5.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf_fortran.m4 \ + $(top_srcdir)/config/m4/sd_levmar.m4 \ + $(top_srcdir)/config/m4/sd_libpaw.m4 \ + $(top_srcdir)/config/m4/sd_libpsml.m4 \ + $(top_srcdir)/config/m4/sd_libxc.m4 \ + $(top_srcdir)/config/m4/sd_math_fft.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_core.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_util.m4 \ + $(top_srcdir)/config/m4/sd_papi.m4 \ + $(top_srcdir)/config/m4/sd_pfft.m4 \ + $(top_srcdir)/config/m4/sd_triqs.m4 \ + $(top_srcdir)/config/m4/sd_wannier90.m4 \ + $(top_srcdir)/config/m4/sd_xmlf90.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +AM_V_AR = $(am__v_AR_$(V)) +am__v_AR_ = $(am__v_AR_$(AM_DEFAULT_VERBOSITY)) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = +lib10_defs_a_AR = $(AR) $(ARFLAGS) +lib10_defs_a_LIBADD = +am__objects_1 = defs_basis.$(OBJEXT) defs_datatypes.$(OBJEXT) +am_lib10_defs_a_OBJECTS = $(am__objects_1) +lib10_defs_a_OBJECTS = $(am_lib10_defs_a_OBJECTS) +AM_V_P = $(am__v_P_$(V)) +am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY)) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I. -I$(top_builddir) +PPFCCOMPILE = $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) +AM_V_PPFC = $(am__v_PPFC_$(V)) +am__v_PPFC_ = $(am__v_PPFC_$(AM_DEFAULT_VERBOSITY)) +am__v_PPFC_0 = @echo " PPFC " $@; +am__v_PPFC_1 = +FCLD = $(FC) +FCLINK = $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \ + $@ +AM_V_FCLD = $(am__v_FCLD_$(V)) +am__v_FCLD_ = $(am__v_FCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_FCLD_0 = @echo " FCLD " $@; +am__v_FCLD_1 = +SOURCES = $(lib10_defs_a_SOURCES) +DIST_SOURCES = $(lib10_defs_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in README +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ABINIT_BINARY_PACKAGE = abinit-10.0.0.83-58be4d_x86_64_darwin18.7.0_gnu9.4 +ABINIT_COMMON_CPPFLAGS = +ABINIT_COMMON_FCFLAGS = +ABINIT_COMMON_LDFLAGS = +ABINIT_COMMON_LIBS = +ABINIT_TARGET = x86_64_darwin18.7.0_gnu9.4 +ABINIT_VERSION = 10.0.0.83-58be4d +ABINIT_VERSION_BASE = 10.0 +ABINIT_VERSION_BUILD = 20240316 +ABINIT_VERSION_MAJOR = 10 +ABINIT_VERSION_MICRO = 0 +ABINIT_VERSION_MINOR = 0 +ABI_CPPFLAGS = -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include +ACLOCAL = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' aclocal-1.16 +AMTAR = $${TAR-tar} +AM_DEFAULT_VERBOSITY = 1 +AR = ar +ARFLAGS = rc +ARFLAGS_CMD = rc +ARFLAGS_DEBUG = +ARFLAGS_EXTRA = +ARFLAGS_HINTS = +ARFLAGS_OPTIM = +ATOMPAW_BIN = +AUTOCONF = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' autoconf +AUTOHEADER = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' autoheader +AUTOMAKE = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' automake-1.16 +AWK = awk +BIGDFT_CPPFLAGS = +BIGDFT_FCFLAGS = +BIGDFT_LDFLAGS = +BIGDFT_LIBS = +BOURNE_SHELL = /bin/sh +CC = /opt/local/bin/mpicc +CCDEPMODE = depmode=gcc3 +CC_LDFLAGS = +CC_LDFLAGS_DEBUG = +CC_LDFLAGS_EXTRA = +CC_LDFLAGS_GPU = +CC_LDFLAGS_HINTS = +CC_LDFLAGS_OPTIM = +CC_LIBS = +CC_LIBS_DEBUG = +CC_LIBS_EXTRA = +CC_LIBS_GPU = +CC_LIBS_HINTS = +CC_LIBS_OPTIM = +CFLAGS = -O2 -g +CFLAGS_DEBUG = +CFLAGS_EXTRA = +CFLAGS_GPU = +CFLAGS_HINTS = +CFLAGS_OPTIM = +CPP = /opt/local/bin/mpicc -E +CPPFLAGS = +CPPFLAGS_DEBUG = +CPPFLAGS_EXTRA = +CPPFLAGS_GPU = +CPPFLAGS_HINTS = +CPPFLAGS_HINTS_EXT = -P -std=c99 +CPPFLAGS_OPTIM = +CXX = /opt/local/bin/mpicxx +CXXDEPMODE = depmode=gcc3 +CXXFLAGS = -O2 -g +CXXFLAGS_DEBUG = +CXXFLAGS_EXTRA = +CXXFLAGS_GPU = +CXXFLAGS_HINTS = +CXXFLAGS_OPTIM = +CXX_LDFLAGS = +CXX_LDFLAGS_DEBUG = +CXX_LDFLAGS_EXTRA = +CXX_LDFLAGS_GPU = +CXX_LDFLAGS_HINTS = +CXX_LDFLAGS_OPTIM = +CXX_LIBS = +CXX_LIBS_DEBUG = +CXX_LIBS_EXTRA = +CXX_LIBS_GPU = +CXX_LIBS_HINTS = +CXX_LIBS_OPTIM = +CYGPATH_W = echo +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +ECHO_C = \c +ECHO_N = +ECHO_T = +EGREP = /usr/bin/grep -E +EXEEXT = +F77 = /opt/local/bin/mpif90 +FC = /opt/local/bin/mpif90 +FCFLAGS = -O2 -g -ffree-line-length-none -I/opt/local/include -I/opt/local/include -I/opt/local/include +FCFLAGS_DEBUG = +FCFLAGS_EXTRA = +FCFLAGS_F90 = +FCFLAGS_FIXEDFORM = -ffixed-form +FCFLAGS_FREEFORM = -ffree-form +FCFLAGS_HINTS = -ffree-line-length-none +FCFLAGS_MODDIR = -J../mods +FCFLAGS_OPENMP = +FCFLAGS_OPENMP_OFFLOAD = +FCFLAGS_OPTIM = +FCLIBS = -L/opt/local/lib -L/opt/local/lib/openmpi-gcc9 -L/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0 -L/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/../../.. -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi -lgfortran -lquadmath -lm +FC_LDFLAGS = +FC_LDFLAGS_DEBUG = +FC_LDFLAGS_EXTRA = +FC_LDFLAGS_HINTS = +FC_LDFLAGS_OPTIM = +FC_LIBS = +FC_LIBS_DEBUG = +FC_LIBS_EXTRA = +FC_LIBS_HINTS = +FC_LIBS_OPTIM = +FC_NOWRAP = /opt/local/bin/mpif90 +FFLAGS = -O2 -g -ffree-line-length-none -I/opt/local/include -I/opt/local/include -I/opt/local/include +FFTW3_CFLAGS = +FFTW3_CPPFLAGS = -I/opt/local/include +FFTW3_FCFLAGS = -I/opt/local/include +FFTW3_LDFLAGS = +FFTW3_LIBS = -L/opt/local/lib -lfftw3 -lfftw3f +FFT_CFLAGS = +FFT_FCFLAGS = +FPP = +FPPFLAGS = +FPPFLAGS_DEBUG = +FPPFLAGS_EXTRA = +FPPFLAGS_HINTS = +FPPFLAGS_OPTIM = +GPU_ARCH = +GPU_CFLAGS = +GPU_CPPFLAGS = +GPU_CXXFLAGS = +GPU_FCFLAGS = +GPU_LDFLAGS = +GPU_LIBS = +GRAPHATOM_BIN = +GREP = /usr/bin/grep +H5CC = +HDF5_CFLAGS = +HDF5_CPPFLAGS = +HDF5_CXXFLAGS = +HDF5_FCFLAGS = +HDF5_LDFLAGS = +HDF5_LIBS = +INSTALL = /opt/local/libexec/gnubin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +KOKKOS_CPPFLAGS = +KOKKOS_CXXFLAGS = +KOKKOS_LDFLAGS = +KOKKOS_LIBS = +LDFLAGS = +LEVMAR_CFLAGS = +LEVMAR_CPPFLAGS = +LEVMAR_LDFLAGS = +LEVMAR_LIBS = +LIBOBJS = +LIBPAW_CPPFLAGS = +LIBPAW_FCFLAGS = +LIBPAW_LDFLAGS = +LIBPAW_LIBS = +LIBPSML_CPPFLAGS = +LIBPSML_FCFLAGS = +LIBPSML_LDFLAGS = +LIBPSML_LIBS = +LIBS = -L/opt/local/lib -lwannier -L/opt/local/lib -lxc -L/opt/local/lib -lnetcdff -L/opt/local/lib -lnetcdf -L/opt/local/lib -L/opt/local/lib -lhdf5_hl -L/opt/local/lib -lhdf5 -lz -ldl -lm -L/opt/local/lib -lfftw3 -lfftw3f +LIBXC_CFLAGS = +LIBXC_CPPFLAGS = +LIBXC_FCFLAGS = +LIBXC_LDFLAGS = +LIBXC_LIBS = +LIBXML2_CPPFLAGS = +LIBXML2_FCFLAGS = +LIBXML2_LIBS = +LINALG_CFLAGS = +LINALG_CPPFLAGS = +LINALG_CXXFLAGS = +LINALG_FCFLAGS = -I/opt/local/include +LINALG_LDFLAGS = +LINALG_LIBS = -L/opt/local/lib -lopenblas +LN_S = ln -s +LTLIBOBJS = +MAKEINFO = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' makeinfo +MKDIR_P = /opt/local/libexec/gnubin/mkdir -p +MODEXT = mod +MPI_CFLAGS = +MPI_CPPFLAGS = +MPI_CXXFLAGS = +MPI_FCFLAGS = +MPI_LDFLAGS = +MPI_LIBS = +MV = /opt/local/libexec/gnubin/mv +NETCDF_CFLAGS = +NETCDF_CPPFLAGS = +NETCDF_CXXFLAGS = +NETCDF_FCFLAGS = +NETCDF_FORTRAN_CFLAGS = +NETCDF_FORTRAN_CPPFLAGS = +NETCDF_FORTRAN_CXXFLAGS = +NETCDF_FORTRAN_FCFLAGS = +NETCDF_FORTRAN_LDFLAGS = +NETCDF_FORTRAN_LIBS = +NETCDF_LDFLAGS = +NETCDF_LIBS = +NVCC = +NVCC_CFLAGS = +NVCC_CPPFLAGS = +NVCC_LDFLAGS = +NVCC_LIBS = +OBJEXT = o +PACKAGE = abinit +PACKAGE_BUGREPORT = https://bugs.launchpad.net/abinit/ +PACKAGE_NAME = ABINIT +PACKAGE_STRING = ABINIT 10.0.0.83-58be4d +PACKAGE_TARNAME = abinit +PACKAGE_URL = +PACKAGE_VERSION = 10.0.0.83-58be4d +PAPI_CFLAGS = +PAPI_CPPFLAGS = +PAPI_LDFLAGS = +PAPI_LIBS = +PATCH = patch +PATH_SEPARATOR = : +PERL = /usr/bin/perl +PFFT_CFLAGS = +PFFT_CPPFLAGS = +PFFT_LDFLAGS = +PFFT_LIBS = +PYFLAGS = +PYTHON = python3.9 +PYTHON_CONFIG = python3.9-config +PYTHON_CPPFLAGS = -I/opt/local/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -I/opt/local/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 +RANLIB = ranlib +REALPATH = realpath +RM = /opt/local/libexec/gnubin/rm +SED = /usr/bin/sed +SET_MAKE = +SHELL = /bin/sh +STRIP = +TAR = tar +TRIQS_CFLAGS = +TRIQS_CPPFLAGS = +TRIQS_CXXFLAGS = +TRIQS_LDFLAGS = +TRIQS_LIBS = +TRUE_CPP = cpp +VERSION = 10.0.0.83-58be4d +WANNIER90_CPPFLAGS = +WANNIER90_FCFLAGS = -I/opt/local/include +WANNIER90_LDFLAGS = +WANNIER90_LIBS = -L/opt/local/lib -lwannier +XML2_CONFIG = +XMLF90_CPPFLAGS = +XMLF90_FCFLAGS = +XMLF90_LDFLAGS = +XMLF90_LIBS = +XML_CPPFLAGS = +XML_LIBS = +XPP = +XPPFLAGS = +XPPFLAGS_DEBUG = +XPPFLAGS_EXTRA = +XPPFLAGS_OPTIM = +YAKL_CPPFLAGS = +YAKL_FCFLAGS = +YAKL_LDFLAGS = +YAKL_LIBS = +abi_ac_distcheck = --with-config-file="/Users/gonze/_Research/ABINIT_git/gonze/mac-1P0-225.ac9" +abi_ac_version = 027100 +abi_am_version = 011603 +abi_avx_safe_mode_enable = no +abi_bse_unpacked_enable = no +abi_cc_path = +abi_cc_vendor = gnu +abi_cc_version = 9.4 +abi_cclock_enable = no +abi_cpp_path = +abi_cpu_64bits = yes +abi_cpu_bits = 64 +abi_cpu_model = unknown +abi_cpu_platform = apple +abi_cpu_spec = unknown_unknown +abi_cpu_vendor = unknown +abi_crpa_optim_enable = no +abi_cxx_path = +abi_cxx_vendor = gnu +abi_cxx_version = 9.4 +abi_debug_flavor = basic +abi_exports_enable = no +abi_fbk_abinit_common_ok = no +abi_fbk_bigdft_ok = disabled +abi_fbk_config = +abi_fbk_enable = no +abi_fbk_fft_ok = no +abi_fbk_fftw3_ok = no +abi_fbk_gpu_ok = no +abi_fbk_hdf5_ok = disabled +abi_fbk_init = def +abi_fbk_kokkos_ok = no +abi_fbk_levmar_ok = no +abi_fbk_libpaw_ok = no +abi_fbk_libpsml_ok = disabled +abi_fbk_libxc_ok = disabled +abi_fbk_libxml2_ok = no +abi_fbk_linalg_ok = disabled +abi_fbk_list = +abi_fbk_mpi_ok = no +abi_fbk_netcdf_fortran_ok = disabled +abi_fbk_netcdf_ok = disabled +abi_fbk_papi_ok = no +abi_fbk_pfft_ok = no +abi_fbk_prefix = +abi_fbk_required = +abi_fbk_triqs_ok = no +abi_fbk_wannier90_ok = disabled +abi_fbk_xmlf90_ok = disabled +abi_fbk_yakl_ok = no +abi_fc_path = +abi_fc_vendor = gnu +abi_fc_version = 9.4 +abi_fc_wrap = no +abi_fc_wrapper_enable = no +abi_fpp_path = +abi_gpu_arch = +abi_gpu_fcflags = +abi_gpu_flavor = none +abi_gpu_hip_libdir = +abi_gpu_incs = +abi_gpu_ldflags = +abi_gpu_libs = +abi_gpu_nvtx_v3 = +abi_gpu_roctx = +abi_gw_dpc_enable = yes +abi_hints_enable = yes +abi_libtetra_enable = yes +abi_libxml2_cppflags = +abi_libxml2_enable = no +abi_libxml2_fcflags = +abi_libxml2_init = def +abi_libxml2_ldflags = +abi_libxml2_libs = +abi_libxml2_ok = unknown +abi_libxml2_prefix = +abi_lotf_enable = no +abi_lt_version = 020406 +abi_m4_version = 010419 +abi_memory_profiling_enable = no +abi_mpi_cflags = +abi_mpi_cppflags = +abi_mpi_cxxflags = +abi_mpi_enable = yes +abi_mpi_fcflags = +abi_mpi_flavor = auto +abi_mpi_gpu_aware_enable = no +abi_mpi_incs = +abi_mpi_inplace_enable = yes +abi_mpi_interfaces_bugfix_enable = no +abi_mpi_io_default_enable = no +abi_mpi_io_enable = yes +abi_mpi_ldflags = +abi_mpi_level = 2 +abi_mpi_libs = +abi_netcdf_default_enable = no +abi_openmp_enable = no +abi_openmp_offload_enable = no +abi_optim_flavor = standard +abi_python_invocation_enable = no +abi_source_debug_enable = no +abi_stdin_enable = yes +abi_sys_spec = darwin-x86_64 +abi_timer_enable = yes +abi_triqs_v1_4_enable = no +abi_triqs_v2_0_enable = no +abi_zdot_bugfix_enable = no +abinit_bindir = /usr/local/bin +abinit_builddir = /Users/gonze/_Research/ABINIT_git/gonze +abinit_chkdir = /usr/local/share/abinit/tests +abinit_datdir = /usr/local/share/abinit +abinit_docdir = /usr/local/doc/abinit +abinit_incdir = /usr/local/include +abinit_libdir = /usr/local/lib +abinit_mandir = /usr/local/share/man +abinit_prefix = /usr/local +abinit_srcdir = /Users/gonze/_Research/ABINIT_git/gonze +abs_builddir = /Users/gonze/_Research/ABINIT_git/gonze/shared/common/src/10_defs +abs_srcdir = /Users/gonze/_Research/ABINIT_git/gonze/shared/common/src/10_defs +abs_top_builddir = /Users/gonze/_Research/ABINIT_git/gonze +abs_top_srcdir = /Users/gonze/_Research/ABINIT_git/gonze +ac_ct_CC = +ac_ct_CXX = +ac_ct_FC = +am__include = include +am__leading_dot = . +am__quote = +am__tar = tar --format=ustar -chf - "$$tardir" +am__untar = tar -xf - +bindir = ${exec_prefix}/bin +build = x86_64-apple-darwin18.7.0 +build_alias = +build_cpu = x86_64 +build_os = darwin18.7.0 +build_vendor = apple +builddir = . +cc_info_string = gcc-mp-9 (MacPorts gcc9 9.4.0_0) 9.4.0 +cxx_info_string = g++-mp-9 (MacPorts gcc9 9.4.0_0) 9.4.0 +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +enable_avx_safe_mode = +enable_bse_unpacked = +enable_cclock = +enable_crpa_optim = +enable_exports = +enable_fc_wrapper = +enable_gw_dpc = yes +enable_hints = +enable_libtetra = +enable_lotf = +enable_memory_profiling = +enable_mpi_gpu_aware = +enable_mpi_inplace = +enable_mpi_interfaces_bugfix = +enable_mpi_io = yes +enable_mpi_io_default = +enable_netcdf_default = +enable_openmp = +enable_openmp_offload = +enable_python_invocation = +enable_shared = +enable_source_debug = +enable_static = +enable_stdin = +enable_timer = +enable_triqs_v1_4 = +enable_triqs_v2_0 = +enable_zdot_bugfix = +exec_prefix = ${prefix} +fc_info_string = GNU Fortran (MacPorts gcc9 9.4.0_0) 9.4.0 +fc_mod_fcflags = +fc_timing = standard +fcflags_opt_02_clib = +fcflags_opt_10_defs = +fcflags_opt_11_memory_mpi = +fcflags_opt_12_hide_mpi = +fcflags_opt_14_hidewrite = +fcflags_opt_16_hideleave = +fcflags_opt_16_kokkos_toolbox = +fcflags_opt_17_gpu_toolbox = +fcflags_opt_17_libtetra_ext = +fcflags_opt_17_minimax = +fcflags_opt_17_yaml_out = +fcflags_opt_18_timing = +fcflags_opt_21_hashfuncs = +fcflags_opt_27_toolbox_oop = +fcflags_opt_28_numeric_noabirule = +fcflags_opt_29_kpoints = +fcflags_opt_32_util = +fcflags_opt_33_xc_lowlevel = +fcflags_opt_39_libpaw = +fcflags_opt_41_geometry = +fcflags_opt_42_nlstrain = +fcflags_opt_42_parser = +fcflags_opt_43_ptgroups = -O0 +fcflags_opt_43_wvl_wrappers = +fcflags_opt_44_abitools = +fcflags_opt_44_abitypes_defs = +fcflags_opt_44_manage_kokkos = +fcflags_opt_45_geomoptim = +fcflags_opt_45_xgTools = +fcflags_opt_46_ghc_omp = +fcflags_opt_46_manage_cuda = +fcflags_opt_48_diago = +fcflags_opt_49_gw_toolbox_oop = +fcflags_opt_51_manage_mpi = +fcflags_opt_52_fft_mpi_noabirule = +fcflags_opt_53_ffts = +fcflags_opt_54_spacepar = +fcflags_opt_55_abiutil = +fcflags_opt_56_io_mpi = +fcflags_opt_56_mixing = +fcflags_opt_56_recipspace = +fcflags_opt_56_xc = +fcflags_opt_57_iopsp_parser = +fcflags_opt_57_iovars = +fcflags_opt_61_occeig = +fcflags_opt_62_cg_noabirule = +fcflags_opt_62_ctqmc = +fcflags_opt_62_iowfdenpot = +fcflags_opt_62_poisson = +fcflags_opt_62_wvl_wfs = +fcflags_opt_64_psp = +fcflags_opt_65_lotf_base = +fcflags_opt_65_paw = +fcflags_opt_66_nonlocal = +fcflags_opt_66_vdwxc = +fcflags_opt_66_wfs = +fcflags_opt_67_common = +fcflags_opt_67_python_invocation_ext = +fcflags_opt_67_triqs_ext = +fcflags_opt_68_dmft = +fcflags_opt_68_lotf = +fcflags_opt_68_recursion = +fcflags_opt_68_rsprc = +fcflags_opt_69_wfdesc = +fcflags_opt_70_gw = +fcflags_opt_71_bse = +fcflags_opt_71_wannier = +fcflags_opt_72_response = +fcflags_opt_77_ddb = +fcflags_opt_77_suscep = +fcflags_opt_78_effpot = +fcflags_opt_78_eph = +fcflags_opt_79_seqpar_mpi = +fcflags_opt_80_rttddft = +fcflags_opt_80_tdep = +fcflags_opt_94_scfcv = +fcflags_opt_95_drive = +fcflags_opt_98_main = +fcflags_opt_bigdft = +fcflags_opt_default = +fcflags_opt_hdf5 = +fcflags_opt_levmar = +fcflags_opt_libpsml = +fcflags_opt_libxc = +fcflags_opt_libxml2 = +fcflags_opt_linalg = +fcflags_opt_netcdf = +fcflags_opt_netcdf_fortran = +fcflags_opt_papi = +fcflags_opt_triqs = +fcflags_opt_wannier90 = +fcflags_opt_xmlf90 = +host = x86_64-apple-darwin18.7.0 +host_alias = +host_cpu = x86_64 +host_os = darwin18.7.0 +host_vendor = apple +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = ${SHELL} /Users/gonze/_Research/ABINIT_git/gonze/config/gnu/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = ${datarootdir}/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = $(MKDIR_P) +oldincludedir = /usr/include +pdfdir = ${docdir} +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +runstatedir = ${localstatedir}/run +sbindir = ${exec_prefix}/sbin +sd_abinit_common_cppflags = +sd_abinit_common_enable = no +sd_abinit_common_enable_def = no +sd_abinit_common_fcflags = +sd_abinit_common_init = def +sd_abinit_common_ldflags = +sd_abinit_common_libs = +sd_abinit_common_ok = unknown +sd_abinit_common_options = optional skip +sd_abinit_common_policy = skip +sd_abinit_common_status = optional +sd_bigdft_cppflags = +sd_bigdft_enable = no +sd_bigdft_enable_def = no +sd_bigdft_fcflags = +sd_bigdft_init = def +sd_bigdft_ldflags = +sd_bigdft_libs = +sd_bigdft_ok = unknown +sd_bigdft_options = optional warn +sd_bigdft_policy = warn +sd_bigdft_status = optional +sd_fft_cflags = +sd_fft_choices = +sd_fft_cppflags = -I/opt/local/include +sd_fft_cxxflags = +sd_fft_enable = yes +sd_fft_fcflags = -I/opt/local/include +sd_fft_flavor = fftw3 +sd_fft_init = kwd +sd_fft_ldflags = +sd_fft_libs = -L/opt/local/lib -lfftw3 -lfftw3f +sd_fft_ok = yes +sd_fftw3_cflags = +sd_fftw3_cppflags = -I/opt/local/include +sd_fftw3_enable = yes +sd_fftw3_enable_def = no +sd_fftw3_fcflags = -I/opt/local/include +sd_fftw3_init = env +sd_fftw3_ldflags = +sd_fftw3_libs = -L/opt/local/lib -lfftw3 -lfftw3f +sd_fftw3_ok = yes +sd_fftw3_options = optional skip +sd_fftw3_policy = skip +sd_fftw3_status = optional +sd_gpu_cflags = +sd_gpu_cppflags = +sd_gpu_cxxflags = +sd_gpu_enable = no +sd_gpu_enable_def = no +sd_gpu_fcflags = +sd_gpu_init = def +sd_gpu_ldflags = +sd_gpu_libs = +sd_gpu_ok = no +sd_gpu_options = optional warn +sd_gpu_policy = warn +sd_gpu_prefix = +sd_gpu_status = optional +sd_hdf5_cflags = +sd_hdf5_cppflags = -I/opt/local/include -I/opt/local/include +sd_hdf5_cxxflags = +sd_hdf5_enable = yes +sd_hdf5_enable_def = yes +sd_hdf5_enable_fc = no +sd_hdf5_fcflags = +sd_hdf5_h5cc = /opt/local/bin/h5cc +sd_hdf5_h5fc = +sd_hdf5_init = dir +sd_hdf5_ldflags = +sd_hdf5_libs = -L/opt/local/lib -L/opt/local/lib -lhdf5_hl -L/opt/local/lib -lhdf5 -lz -ldl -lm +sd_hdf5_ok = yes +sd_hdf5_options = required no-fortran warn +sd_hdf5_policy = warn +sd_hdf5_status = required +sd_kokkos_cppflags = +sd_kokkos_cxxflags = +sd_kokkos_enable = no +sd_kokkos_enable_def = no +sd_kokkos_init = def +sd_kokkos_ldflags = +sd_kokkos_libs = +sd_kokkos_ok = unknown +sd_kokkos_options = optional fail +sd_kokkos_policy = fail +sd_kokkos_status = optional +sd_levmar_cflags = +sd_levmar_cppflags = +sd_levmar_enable = no +sd_levmar_enable_def = no +sd_levmar_init = def +sd_levmar_ldflags = +sd_levmar_libs = +sd_levmar_ok = unknown +sd_levmar_options = optional fail +sd_levmar_policy = fail +sd_levmar_status = optional +sd_libpaw_cppflags = +sd_libpaw_enable = no +sd_libpaw_enable_def = no +sd_libpaw_fcflags = +sd_libpaw_init = def +sd_libpaw_ldflags = +sd_libpaw_libs = +sd_libpaw_ok = unknown +sd_libpaw_options = optional skip +sd_libpaw_policy = skip +sd_libpaw_status = optional +sd_libpsml_cppflags = +sd_libpsml_enable = no +sd_libpsml_enable_def = no +sd_libpsml_fcflags = +sd_libpsml_init = def +sd_libpsml_ldflags = +sd_libpsml_libs = +sd_libpsml_ok = unknown +sd_libpsml_options = optional warn +sd_libpsml_policy = warn +sd_libpsml_status = optional +sd_libxc_cflags = +sd_libxc_cppflags = -I/opt/local/include +sd_libxc_enable = yes +sd_libxc_enable_def = yes +sd_libxc_enable_fc = no +sd_libxc_fcflags = +sd_libxc_init = dir +sd_libxc_ldflags = +sd_libxc_libs = -L/opt/local/lib -lxc +sd_libxc_ok = yes +sd_libxc_options = required no-fortran warn +sd_libxc_policy = warn +sd_libxc_status = required +sd_linalg_cflags = +sd_linalg_choices = +sd_linalg_cppflags = +sd_linalg_cxxflags = +sd_linalg_enable = yes +sd_linalg_fcflags = -I/opt/local/include +sd_linalg_flavor = openblas +sd_linalg_has_elpa = no +sd_linalg_has_scalapack = no +sd_linalg_init = env +sd_linalg_ldflags = +sd_linalg_libs = -L/opt/local/lib -lopenblas +sd_linalg_ok = yes +sd_mpi_cc = /opt/local/bin/mpicc +sd_mpi_cflags = +sd_mpi_cppflags = -I/opt/local/include +sd_mpi_cxx = /opt/local/bin/mpicxx +sd_mpi_enable = yes +sd_mpi_enable_cxx = yes +sd_mpi_enable_def = auto +sd_mpi_enable_fc = yes +sd_mpi_fc = /opt/local/bin/mpif90 +sd_mpi_fcflags = -I/opt/local/include +sd_mpi_init = dir +sd_mpi_ldflags = +sd_mpi_libs = +sd_mpi_ok = yes +sd_mpi_options = auto optional fail +sd_mpi_policy = fail +sd_mpi_status = optional +sd_netcdf_cflags = +sd_netcdf_cppflags = -I/opt/local/include +sd_netcdf_enable = yes +sd_netcdf_enable_def = yes +sd_netcdf_fcflags = -I/opt/local/include +sd_netcdf_fortran_cflags = +sd_netcdf_fortran_cppflags = -I/opt/local/include +sd_netcdf_fortran_enable = yes +sd_netcdf_fortran_enable_def = yes +sd_netcdf_fortran_fcflags = -I/opt/local/include +sd_netcdf_fortran_init = dir +sd_netcdf_fortran_ldflags = +sd_netcdf_fortran_libs = -L/opt/local/lib -lnetcdff +sd_netcdf_fortran_ok = yes +sd_netcdf_fortran_options = required warn +sd_netcdf_fortran_policy = warn +sd_netcdf_fortran_status = required +sd_netcdf_init = dir +sd_netcdf_ldflags = +sd_netcdf_libs = -L/opt/local/lib -lnetcdf +sd_netcdf_ok = yes +sd_netcdf_options = required warn +sd_netcdf_policy = warn +sd_netcdf_status = required +sd_papi_cflags = +sd_papi_cppflags = +sd_papi_enable = no +sd_papi_enable_def = no +sd_papi_init = def +sd_papi_ldflags = +sd_papi_libs = +sd_papi_ok = unknown +sd_papi_options = optional fail +sd_papi_policy = fail +sd_papi_sd_papi_fcflags = +sd_papi_status = optional +sd_pfft_cflags = +sd_pfft_cppflags = +sd_pfft_enable = no +sd_pfft_enable_def = no +sd_pfft_init = def +sd_pfft_ldflags = +sd_pfft_libs = +sd_pfft_ok = unknown +sd_pfft_options = optional skip +sd_pfft_policy = skip +sd_pfft_status = optional +sd_sys_fcflags = +sd_triqs_cflags = +sd_triqs_cppflags = +sd_triqs_cxxflags = +sd_triqs_enable = no +sd_triqs_enable_def = no +sd_triqs_fcflags = +sd_triqs_init = def +sd_triqs_ldflags = +sd_triqs_libs = +sd_triqs_ok = unknown +sd_triqs_options = optional fail +sd_triqs_policy = fail +sd_triqs_status = optional +sd_wannier90_cppflags = +sd_wannier90_enable = yes +sd_wannier90_enable_def = no +sd_wannier90_fcflags = -I/opt/local/include +sd_wannier90_init = env +sd_wannier90_ldflags = +sd_wannier90_libs = -L/opt/local/lib -lwannier +sd_wannier90_ok = yes +sd_wannier90_options = optional warn +sd_wannier90_policy = warn +sd_wannier90_status = optional +sd_xmlf90_cppflags = +sd_xmlf90_enable = no +sd_xmlf90_enable_def = no +sd_xmlf90_fcflags = +sd_xmlf90_init = def +sd_xmlf90_ldflags = +sd_xmlf90_libs = +sd_xmlf90_ok = unknown +sd_xmlf90_options = optional warn +sd_xmlf90_policy = warn +sd_xmlf90_status = optional +sd_yakl_cppflags = +sd_yakl_enable = no +sd_yakl_enable_def = no +sd_yakl_fcflags = +sd_yakl_init = def +sd_yakl_ldflags = +sd_yakl_libs = +sd_yakl_ok = unknown +sd_yakl_options = optional fail +sd_yakl_policy = fail +sd_yakl_status = optional +sharedstatedir = ${prefix}/com +src_02_clib_fcflags = -I$(top_builddir)/shared/common/src/02_clib -I$(top_srcdir)/shared/common/src/02_clib +src_10_defs_fcflags = -I$(top_builddir)/shared/common/src/10_defs -I$(top_srcdir)/shared/common/src/10_defs +src_11_memory_mpi_fcflags = -I$(top_builddir)/shared/common/src/11_memory_mpi -I$(top_srcdir)/shared/common/src/11_memory_mpi +src_12_hide_mpi_fcflags = -I$(top_builddir)/shared/common/src/12_hide_mpi -I$(top_srcdir)/shared/common/src/12_hide_mpi +src_14_hidewrite_fcflags = -I$(top_builddir)/shared/common/src/14_hidewrite -I$(top_srcdir)/shared/common/src/14_hidewrite +src_16_hideleave_fcflags = -I$(top_builddir)/shared/common/src/16_hideleave -I$(top_srcdir)/shared/common/src/16_hideleave +src_16_kokkos_toolbox_fcflags = -I$(top_builddir)/shared/common/src/16_kokkos_toolbox -I$(top_srcdir)/shared/common/src/16_kokkos_toolbox +src_17_gpu_toolbox_fcflags = -I$(top_builddir)/shared/common/src/17_gpu_toolbox -I$(top_srcdir)/shared/common/src/17_gpu_toolbox +src_17_libtetra_ext_fcflags = -I$(top_builddir)/shared/common/src/17_libtetra_ext -I$(top_srcdir)/shared/common/src/17_libtetra_ext +src_17_minimax_fcflags = -I$(top_builddir)/shared/common/src/17_minimax -I$(top_srcdir)/shared/common/src/17_minimax +src_17_yaml_out_fcflags = -I$(top_builddir)/shared/common/src/17_yaml_out -I$(top_srcdir)/shared/common/src/17_yaml_out +src_18_timing_fcflags = -I$(top_builddir)/shared/common/src/18_timing -I$(top_srcdir)/shared/common/src/18_timing +src_21_hashfuncs_fcflags = -I$(top_builddir)/shared/common/src/21_hashfuncs -I$(top_srcdir)/shared/common/src/21_hashfuncs +src_27_toolbox_oop_fcflags = -I$(top_builddir)/shared/common/src/27_toolbox_oop -I$(top_srcdir)/shared/common/src/27_toolbox_oop +src_28_numeric_noabirule_fcflags = -I$(top_builddir)/shared/common/src/28_numeric_noabirule -I$(top_srcdir)/shared/common/src/28_numeric_noabirule +src_29_kpoints_fcflags = -I$(top_builddir)/shared/common/src/29_kpoints -I$(top_srcdir)/shared/common/src/29_kpoints +src_32_util_fcflags = -I$(top_builddir)/shared/common/src/32_util -I$(top_srcdir)/shared/common/src/32_util +src_33_xc_lowlevel_fcflags = -I$(top_builddir)/shared/common/src/33_xc_lowlevel -I$(top_srcdir)/shared/common/src/33_xc_lowlevel +src_39_libpaw_fcflags = -I$(top_builddir)/shared/libpaw/src -I$(top_srcdir)/shared/libpaw/src +src_41_geometry_fcflags = -I$(top_builddir)/src/41_geometry -I$(top_srcdir)/src/41_geometry +src_42_nlstrain_fcflags = -I$(top_builddir)/src/42_nlstrain -I$(top_srcdir)/src/42_nlstrain +src_42_parser_fcflags = -I$(top_builddir)/src/42_parser -I$(top_srcdir)/src/42_parser +src_43_ptgroups_fcflags = -I$(top_builddir)/src/43_ptgroups -I$(top_srcdir)/src/43_ptgroups +src_43_wvl_wrappers_fcflags = -I$(top_builddir)/src/43_wvl_wrappers -I$(top_srcdir)/src/43_wvl_wrappers +src_44_abitools_fcflags = -I$(top_builddir)/src/44_abitools -I$(top_srcdir)/src/44_abitools +src_44_abitypes_defs_fcflags = -I$(top_builddir)/src/44_abitypes_defs -I$(top_srcdir)/src/44_abitypes_defs +src_44_manage_kokkos_fcflags = -I$(top_builddir)/src/44_manage_kokkos -I$(top_srcdir)/src/44_manage_kokkos +src_45_geomoptim_fcflags = -I$(top_builddir)/src/45_geomoptim -I$(top_srcdir)/src/45_geomoptim +src_45_xgTools_fcflags = -I$(top_builddir)/src/45_xgTools -I$(top_srcdir)/src/45_xgTools +src_46_ghc_omp_fcflags = -I$(top_builddir)/src/46_ghc_omp -I$(top_srcdir)/src/46_ghc_omp +src_46_manage_cuda_fcflags = -I$(top_builddir)/src/46_manage_cuda -I$(top_srcdir)/src/46_manage_cuda +src_48_diago_fcflags = -I$(top_builddir)/src/48_diago -I$(top_srcdir)/src/48_diago +src_49_gw_toolbox_oop_fcflags = -I$(top_builddir)/src/49_gw_toolbox_oop -I$(top_srcdir)/src/49_gw_toolbox_oop +src_51_manage_mpi_fcflags = -I$(top_builddir)/src/51_manage_mpi -I$(top_srcdir)/src/51_manage_mpi +src_52_fft_mpi_noabirule_fcflags = -I$(top_builddir)/src/52_fft_mpi_noabirule -I$(top_srcdir)/src/52_fft_mpi_noabirule +src_53_ffts_fcflags = -I$(top_builddir)/src/53_ffts -I$(top_srcdir)/src/53_ffts +src_54_spacepar_fcflags = -I$(top_builddir)/src/54_spacepar -I$(top_srcdir)/src/54_spacepar +src_55_abiutil_fcflags = -I$(top_builddir)/src/55_abiutil -I$(top_srcdir)/src/55_abiutil +src_56_io_mpi_fcflags = -I$(top_builddir)/src/56_io_mpi -I$(top_srcdir)/src/56_io_mpi +src_56_mixing_fcflags = -I$(top_builddir)/src/56_mixing -I$(top_srcdir)/src/56_mixing +src_56_recipspace_fcflags = -I$(top_builddir)/src/56_recipspace -I$(top_srcdir)/src/56_recipspace +src_56_xc_fcflags = -I$(top_builddir)/src/56_xc -I$(top_srcdir)/src/56_xc +src_57_iopsp_parser_fcflags = -I$(top_builddir)/src/57_iopsp_parser -I$(top_srcdir)/src/57_iopsp_parser +src_57_iovars_fcflags = -I$(top_builddir)/src/57_iovars -I$(top_srcdir)/src/57_iovars +src_61_occeig_fcflags = -I$(top_builddir)/src/61_occeig -I$(top_srcdir)/src/61_occeig +src_62_cg_noabirule_fcflags = -I$(top_builddir)/src/62_cg_noabirule -I$(top_srcdir)/src/62_cg_noabirule +src_62_ctqmc_fcflags = -I$(top_builddir)/src/62_ctqmc -I$(top_srcdir)/src/62_ctqmc +src_62_iowfdenpot_fcflags = -I$(top_builddir)/src/62_iowfdenpot -I$(top_srcdir)/src/62_iowfdenpot +src_62_poisson_fcflags = -I$(top_builddir)/src/62_poisson -I$(top_srcdir)/src/62_poisson +src_62_wvl_wfs_fcflags = -I$(top_builddir)/src/62_wvl_wfs -I$(top_srcdir)/src/62_wvl_wfs +src_64_psp_fcflags = -I$(top_builddir)/src/64_psp -I$(top_srcdir)/src/64_psp +src_65_lotf_base_fcflags = -I$(top_builddir)/src/65_lotf_base -I$(top_srcdir)/src/65_lotf_base +src_65_paw_fcflags = -I$(top_builddir)/src/65_paw -I$(top_srcdir)/src/65_paw +src_66_nonlocal_fcflags = -I$(top_builddir)/src/66_nonlocal -I$(top_srcdir)/src/66_nonlocal +src_66_vdwxc_fcflags = -I$(top_builddir)/src/66_vdwxc -I$(top_srcdir)/src/66_vdwxc +src_66_wfs_fcflags = -I$(top_builddir)/src/66_wfs -I$(top_srcdir)/src/66_wfs +src_67_common_fcflags = -I$(top_builddir)/src/67_common -I$(top_srcdir)/src/67_common +src_67_python_invocation_ext_fcflags = -I$(top_builddir)/src/67_python_invocation_ext -I$(top_srcdir)/src/67_python_invocation_ext +src_67_triqs_ext_fcflags = -I$(top_builddir)/src/67_triqs_ext -I$(top_srcdir)/src/67_triqs_ext +src_68_dmft_fcflags = -I$(top_builddir)/src/68_dmft -I$(top_srcdir)/src/68_dmft +src_68_lotf_fcflags = -I$(top_builddir)/src/68_lotf -I$(top_srcdir)/src/68_lotf +src_68_recursion_fcflags = -I$(top_builddir)/src/68_recursion -I$(top_srcdir)/src/68_recursion +src_68_rsprc_fcflags = -I$(top_builddir)/src/68_rsprc -I$(top_srcdir)/src/68_rsprc +src_69_wfdesc_fcflags = -I$(top_builddir)/src/69_wfdesc -I$(top_srcdir)/src/69_wfdesc +src_70_gw_fcflags = -I$(top_builddir)/src/70_gw -I$(top_srcdir)/src/70_gw +src_71_bse_fcflags = -I$(top_builddir)/src/71_bse -I$(top_srcdir)/src/71_bse +src_71_wannier_fcflags = -I$(top_builddir)/src/71_wannier -I$(top_srcdir)/src/71_wannier +src_72_response_fcflags = -I$(top_builddir)/src/72_response -I$(top_srcdir)/src/72_response +src_77_ddb_fcflags = -I$(top_builddir)/src/77_ddb -I$(top_srcdir)/src/77_ddb +src_77_suscep_fcflags = -I$(top_builddir)/src/77_suscep -I$(top_srcdir)/src/77_suscep +src_78_effpot_fcflags = -I$(top_builddir)/src/78_effpot -I$(top_srcdir)/src/78_effpot +src_78_eph_fcflags = -I$(top_builddir)/src/78_eph -I$(top_srcdir)/src/78_eph +src_79_seqpar_mpi_fcflags = -I$(top_builddir)/src/79_seqpar_mpi -I$(top_srcdir)/src/79_seqpar_mpi +src_80_rttddft_fcflags = -I$(top_builddir)/src/80_rttddft -I$(top_srcdir)/src/80_rttddft +src_80_tdep_fcflags = -I$(top_builddir)/src/80_tdep -I$(top_srcdir)/src/80_tdep +src_94_scfcv_fcflags = -I$(top_builddir)/src/94_scfcv -I$(top_srcdir)/src/94_scfcv +src_95_drive_fcflags = -I$(top_builddir)/src/95_drive -I$(top_srcdir)/src/95_drive +src_common_fcflags = -I$(top_builddir)/shared/common/src/incs -I$(top_srcdir)/shared/common/src/incs -I$(top_builddir)/shared/common/src/mods -I$(top_srcdir)/shared/common/src/mods +src_core_fcflags = -I$(top_builddir)/src/incs -I$(top_srcdir)/src/incs -I$(top_builddir)/src/mods -I$(top_srcdir)/src/mods +src_libpaw_fcflags = -I$(top_builddir)/shared/libpaw/incs -I$(top_srcdir)/shared/libpaw/incs -I$(top_builddir)/shared/libpaw/mods -I$(top_srcdir)/shared/libpaw/mods +srcdir = . +sysconfdir = ${prefix}/etc +target = x86_64-apple-darwin18.7.0 +target_alias = +target_cpu = x86_64 +target_os = darwin18.7.0 +target_vendor = apple +top_build_prefix = ../../../../ +top_builddir = ../../../.. +top_srcdir = ../../../.. +with_abinit_common = +with_bigdft = +with_config_file = +with_debug_flavor = +with_fallbacks = +with_fc_vendor = +with_fc_version = +with_fft_flavor = fftw3 +with_fftw3 = +with_gnu_ld = +with_gpu = +with_hdf5 = /opt/local +with_kokkos = +with_levmar = +with_libpaw = +with_libpsml = +with_libxc = /opt/local +with_libxml2 = +with_linalg_flavor = openblas +with_mpi = /opt/local +with_mpi_level = +with_netcdf = /opt/local +with_optim_flavor = +with_papi = +with_pfft = +with_triqs = +with_wannier90 = +with_xmlf90 = +with_yakl = +AM_CFLAGS = -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include +AM_CXXFLAGS = $(sd_triqs_cxxflags) +AM_FCFLAGS = -ffree-form -J../mods +AM_CPPFLAGS = \ + -I$(top_builddir)/shared/common/src/10_defs -I$(top_srcdir)/shared/common/src/10_defs \ + -I$(top_builddir)/shared/common/src/incs -I$(top_srcdir)/shared/common/src/incs -I$(top_builddir)/shared/common/src/mods -I$(top_srcdir)/shared/common/src/mods \ + -I$(top_builddir)/src/incs -I$(top_srcdir)/src/incs -I$(top_builddir)/src/mods -I$(top_srcdir)/src/mods \ + -I$(top_builddir)/shared/libpaw/incs -I$(top_srcdir)/shared/libpaw/incs -I$(top_builddir)/shared/libpaw/mods -I$(top_srcdir)/shared/libpaw/mods \ + \ + + + +# Regular source files +lib10_defs_srcs = \ + defs_basis.F90 \ + defs_datatypes.F90 + + +# Source files depending on conditionals + +# Library description +noinst_LIBRARIES = lib10_defs.a +lib10_defs_a_SOURCES = $(lib10_defs_srcs) + +# Dependencies (inside the directory) of directory 10_defs +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. +CLEANFILES = defs_basis_cpp.f90 defs_datatypes_cpp.f90 \ + defs_basis.$(MODEXT) defs_datatypes.$(MODEXT) +EXTRA_DIST = abinit.src abinit.dep _10_defs_ +all: all-am + +.SUFFIXES: +.SUFFIXES: .F90 .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu shared/common/src/10_defs/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu shared/common/src/10_defs/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) + +lib10_defs.a: $(lib10_defs_a_OBJECTS) $(lib10_defs_a_DEPENDENCIES) $(EXTRA_lib10_defs_a_DEPENDENCIES) + $(AM_V_at)-rm -f lib10_defs.a + $(AM_V_AR)$(lib10_defs_a_AR) lib10_defs.a $(lib10_defs_a_OBJECTS) $(lib10_defs_a_LIBADD) + $(AM_V_at)$(RANLIB) lib10_defs.a + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +.F90.o: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ $< + +.F90.obj: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-noinstLIBRARIES cscopelist-am ctags ctags-am distclean \ + distclean-compile distclean-generic distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am + +.PRECIOUS: Makefile + + +defs_datatypes.$(OBJEXT): defs_basis.$(OBJEXT) + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/GX-PAW/common/src/10_defs/Makefile.am b/GX-PAW/common/src/10_defs/Makefile.am new file mode 100644 index 00000000..3ff694ae --- /dev/null +++ b/GX-PAW/common/src/10_defs/Makefile.am @@ -0,0 +1,56 @@ +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-corelibs on 2024/03/16 21:07:38 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-corelibs script or its config file instead. +# + +AM_CFLAGS = @ABI_CPPFLAGS@ +AM_CXXFLAGS = $(sd_triqs_cxxflags) +AM_FCFLAGS = @FPPFLAGS@ @FCFLAGS_FREEFORM@ @FCFLAGS_MODDIR@ @sd_sys_fcflags@ @fcflags_opt_10_defs@ + +AM_CPPFLAGS = \ + @src_10_defs_fcflags@ \ + @src_common_fcflags@ \ + @src_core_fcflags@ \ + @src_libpaw_fcflags@ \ + @sd_bigdft_fcflags@ \ + @fc_mod_fcflags@ + +# Regular source files +lib10_defs_srcs = \ + defs_basis.F90 \ + defs_datatypes.F90 + +# Source files depending on conditionals + + +# Library description +noinst_LIBRARIES = lib10_defs.a + +lib10_defs_a_SOURCES= $(lib10_defs_srcs) + +CLEANFILES = \ + defs_basis_cpp.f90 \ + defs_datatypes_cpp.f90 + +EXTRA_DIST = abinit.src + +EXTRA_DIST += abinit.dep + +# Dependencies (inside the directory) of directory 10_defs +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. + +CLEANFILES += \ + defs_basis.$(MODEXT) \ + defs_datatypes.$(MODEXT) + +defs_datatypes.$(OBJEXT): defs_basis.$(OBJEXT) +EXTRA_DIST += _10_defs_ diff --git a/GX-PAW/common/src/10_defs/Makefile.in b/GX-PAW/common/src/10_defs/Makefile.in new file mode 100644 index 00000000..da0ae359 --- /dev/null +++ b/GX-PAW/common/src/10_defs/Makefile.in @@ -0,0 +1,1456 @@ +# Makefile.in generated by automake 1.16.3 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2020 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-corelibs on 2024/03/16 21:07:38 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-corelibs script or its config file instead. +# + +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = shared/common/src/10_defs +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/m4/arch-gpu.m4 \ + $(top_srcdir)/config/m4/arch-mpi.m4 \ + $(top_srcdir)/config/m4/auto-autotools.m4 \ + $(top_srcdir)/config/m4/auto-corelibs.m4 \ + $(top_srcdir)/config/m4/auto-debug.m4 \ + $(top_srcdir)/config/m4/auto-dirflags.m4 \ + $(top_srcdir)/config/m4/auto-env.m4 \ + $(top_srcdir)/config/m4/auto-hints.m4 \ + $(top_srcdir)/config/m4/auto-optim.m4 \ + $(top_srcdir)/config/m4/auto-options.m4 \ + $(top_srcdir)/config/m4/auto-output.m4 \ + $(top_srcdir)/config/m4/auto-triggers.m4 \ + $(top_srcdir)/config/m4/conf-atompaw.m4 \ + $(top_srcdir)/config/m4/conf-debug.m4 \ + $(top_srcdir)/config/m4/conf-fallbacks.m4 \ + $(top_srcdir)/config/m4/conf-files.m4 \ + $(top_srcdir)/config/m4/conf-init.m4 \ + $(top_srcdir)/config/m4/conf-openmp.m4 \ + $(top_srcdir)/config/m4/conf-optim.m4 \ + $(top_srcdir)/config/m4/lang-c++.m4 \ + $(top_srcdir)/config/m4/lang-c.m4 \ + $(top_srcdir)/config/m4/lang-fortran-import.m4 \ + $(top_srcdir)/config/m4/lang-fortran.m4 \ + $(top_srcdir)/config/m4/lang-python.m4 \ + $(top_srcdir)/config/m4/libxml2.m4 \ + $(top_srcdir)/config/m4/misc-display.m4 \ + $(top_srcdir)/config/m4/sd_abinit_common.m4 \ + $(top_srcdir)/config/m4/sd_arch_gpu.m4 \ + $(top_srcdir)/config/m4/sd_arch_mpi.m4 \ + $(top_srcdir)/config/m4/sd_bigdft.m4 \ + $(top_srcdir)/config/m4/sd_core.m4 \ + $(top_srcdir)/config/m4/sd_esl.m4 \ + $(top_srcdir)/config/m4/sd_fftw3.m4 \ + $(top_srcdir)/config/m4/sd_gpu_kokkos.m4 \ + $(top_srcdir)/config/m4/sd_gpu_yakl.m4 \ + $(top_srcdir)/config/m4/sd_io_hdf5.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf_fortran.m4 \ + $(top_srcdir)/config/m4/sd_levmar.m4 \ + $(top_srcdir)/config/m4/sd_libpaw.m4 \ + $(top_srcdir)/config/m4/sd_libpsml.m4 \ + $(top_srcdir)/config/m4/sd_libxc.m4 \ + $(top_srcdir)/config/m4/sd_math_fft.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_core.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_util.m4 \ + $(top_srcdir)/config/m4/sd_papi.m4 \ + $(top_srcdir)/config/m4/sd_pfft.m4 \ + $(top_srcdir)/config/m4/sd_triqs.m4 \ + $(top_srcdir)/config/m4/sd_wannier90.m4 \ + $(top_srcdir)/config/m4/sd_xmlf90.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = +lib10_defs_a_AR = $(AR) $(ARFLAGS) +lib10_defs_a_LIBADD = +am__objects_1 = defs_basis.$(OBJEXT) defs_datatypes.$(OBJEXT) +am_lib10_defs_a_OBJECTS = $(am__objects_1) +lib10_defs_a_OBJECTS = $(am_lib10_defs_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +PPFCCOMPILE = $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) +AM_V_PPFC = $(am__v_PPFC_@AM_V@) +am__v_PPFC_ = $(am__v_PPFC_@AM_DEFAULT_V@) +am__v_PPFC_0 = @echo " PPFC " $@; +am__v_PPFC_1 = +FCLD = $(FC) +FCLINK = $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \ + $@ +AM_V_FCLD = $(am__v_FCLD_@AM_V@) +am__v_FCLD_ = $(am__v_FCLD_@AM_DEFAULT_V@) +am__v_FCLD_0 = @echo " FCLD " $@; +am__v_FCLD_1 = +SOURCES = $(lib10_defs_a_SOURCES) +DIST_SOURCES = $(lib10_defs_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in README +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ABINIT_BINARY_PACKAGE = @ABINIT_BINARY_PACKAGE@ +ABINIT_COMMON_CPPFLAGS = @ABINIT_COMMON_CPPFLAGS@ +ABINIT_COMMON_FCFLAGS = @ABINIT_COMMON_FCFLAGS@ +ABINIT_COMMON_LDFLAGS = @ABINIT_COMMON_LDFLAGS@ +ABINIT_COMMON_LIBS = @ABINIT_COMMON_LIBS@ +ABINIT_TARGET = @ABINIT_TARGET@ +ABINIT_VERSION = @ABINIT_VERSION@ +ABINIT_VERSION_BASE = @ABINIT_VERSION_BASE@ +ABINIT_VERSION_BUILD = @ABINIT_VERSION_BUILD@ +ABINIT_VERSION_MAJOR = @ABINIT_VERSION_MAJOR@ +ABINIT_VERSION_MICRO = @ABINIT_VERSION_MICRO@ +ABINIT_VERSION_MINOR = @ABINIT_VERSION_MINOR@ +ABI_CPPFLAGS = @ABI_CPPFLAGS@ +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +ARFLAGS = @ARFLAGS@ +ARFLAGS_CMD = @ARFLAGS_CMD@ +ARFLAGS_DEBUG = @ARFLAGS_DEBUG@ +ARFLAGS_EXTRA = @ARFLAGS_EXTRA@ +ARFLAGS_HINTS = @ARFLAGS_HINTS@ +ARFLAGS_OPTIM = @ARFLAGS_OPTIM@ +ATOMPAW_BIN = @ATOMPAW_BIN@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BIGDFT_CPPFLAGS = @BIGDFT_CPPFLAGS@ +BIGDFT_FCFLAGS = @BIGDFT_FCFLAGS@ +BIGDFT_LDFLAGS = @BIGDFT_LDFLAGS@ +BIGDFT_LIBS = @BIGDFT_LIBS@ +BOURNE_SHELL = @BOURNE_SHELL@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CC_LDFLAGS = @CC_LDFLAGS@ +CC_LDFLAGS_DEBUG = @CC_LDFLAGS_DEBUG@ +CC_LDFLAGS_EXTRA = @CC_LDFLAGS_EXTRA@ +CC_LDFLAGS_GPU = @CC_LDFLAGS_GPU@ +CC_LDFLAGS_HINTS = @CC_LDFLAGS_HINTS@ +CC_LDFLAGS_OPTIM = @CC_LDFLAGS_OPTIM@ +CC_LIBS = @CC_LIBS@ +CC_LIBS_DEBUG = @CC_LIBS_DEBUG@ +CC_LIBS_EXTRA = @CC_LIBS_EXTRA@ +CC_LIBS_GPU = @CC_LIBS_GPU@ +CC_LIBS_HINTS = @CC_LIBS_HINTS@ +CC_LIBS_OPTIM = @CC_LIBS_OPTIM@ +CFLAGS = @CFLAGS@ +CFLAGS_DEBUG = @CFLAGS_DEBUG@ +CFLAGS_EXTRA = @CFLAGS_EXTRA@ +CFLAGS_GPU = @CFLAGS_GPU@ +CFLAGS_HINTS = @CFLAGS_HINTS@ +CFLAGS_OPTIM = @CFLAGS_OPTIM@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CPPFLAGS_DEBUG = @CPPFLAGS_DEBUG@ +CPPFLAGS_EXTRA = @CPPFLAGS_EXTRA@ +CPPFLAGS_GPU = @CPPFLAGS_GPU@ +CPPFLAGS_HINTS = @CPPFLAGS_HINTS@ +CPPFLAGS_HINTS_EXT = @CPPFLAGS_HINTS_EXT@ +CPPFLAGS_OPTIM = @CPPFLAGS_OPTIM@ +CXX = @CXX@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CXXFLAGS_DEBUG = @CXXFLAGS_DEBUG@ +CXXFLAGS_EXTRA = @CXXFLAGS_EXTRA@ +CXXFLAGS_GPU = @CXXFLAGS_GPU@ +CXXFLAGS_HINTS = @CXXFLAGS_HINTS@ +CXXFLAGS_OPTIM = @CXXFLAGS_OPTIM@ +CXX_LDFLAGS = @CXX_LDFLAGS@ +CXX_LDFLAGS_DEBUG = @CXX_LDFLAGS_DEBUG@ +CXX_LDFLAGS_EXTRA = @CXX_LDFLAGS_EXTRA@ +CXX_LDFLAGS_GPU = @CXX_LDFLAGS_GPU@ +CXX_LDFLAGS_HINTS = @CXX_LDFLAGS_HINTS@ +CXX_LDFLAGS_OPTIM = @CXX_LDFLAGS_OPTIM@ +CXX_LIBS = @CXX_LIBS@ +CXX_LIBS_DEBUG = @CXX_LIBS_DEBUG@ +CXX_LIBS_EXTRA = @CXX_LIBS_EXTRA@ +CXX_LIBS_GPU = @CXX_LIBS_GPU@ +CXX_LIBS_HINTS = @CXX_LIBS_HINTS@ +CXX_LIBS_OPTIM = @CXX_LIBS_OPTIM@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ +FCFLAGS = @FCFLAGS@ +FCFLAGS_DEBUG = @FCFLAGS_DEBUG@ +FCFLAGS_EXTRA = @FCFLAGS_EXTRA@ +FCFLAGS_F90 = @FCFLAGS_F90@ +FCFLAGS_FIXEDFORM = @FCFLAGS_FIXEDFORM@ +FCFLAGS_FREEFORM = @FCFLAGS_FREEFORM@ +FCFLAGS_HINTS = @FCFLAGS_HINTS@ +FCFLAGS_MODDIR = @FCFLAGS_MODDIR@ +FCFLAGS_OPENMP = @FCFLAGS_OPENMP@ +FCFLAGS_OPENMP_OFFLOAD = @FCFLAGS_OPENMP_OFFLOAD@ +FCFLAGS_OPTIM = @FCFLAGS_OPTIM@ +FCLIBS = @FCLIBS@ +FC_LDFLAGS = @FC_LDFLAGS@ +FC_LDFLAGS_DEBUG = @FC_LDFLAGS_DEBUG@ +FC_LDFLAGS_EXTRA = @FC_LDFLAGS_EXTRA@ +FC_LDFLAGS_HINTS = @FC_LDFLAGS_HINTS@ +FC_LDFLAGS_OPTIM = @FC_LDFLAGS_OPTIM@ +FC_LIBS = @FC_LIBS@ +FC_LIBS_DEBUG = @FC_LIBS_DEBUG@ +FC_LIBS_EXTRA = @FC_LIBS_EXTRA@ +FC_LIBS_HINTS = @FC_LIBS_HINTS@ +FC_LIBS_OPTIM = @FC_LIBS_OPTIM@ +FC_NOWRAP = @FC_NOWRAP@ +FFLAGS = @FFLAGS@ +FFTW3_CFLAGS = @FFTW3_CFLAGS@ +FFTW3_CPPFLAGS = @FFTW3_CPPFLAGS@ +FFTW3_FCFLAGS = @FFTW3_FCFLAGS@ +FFTW3_LDFLAGS = @FFTW3_LDFLAGS@ +FFTW3_LIBS = @FFTW3_LIBS@ +FFT_CFLAGS = @FFT_CFLAGS@ +FFT_FCFLAGS = @FFT_FCFLAGS@ +FPP = @FPP@ +FPPFLAGS = @FPPFLAGS@ +FPPFLAGS_DEBUG = @FPPFLAGS_DEBUG@ +FPPFLAGS_EXTRA = @FPPFLAGS_EXTRA@ +FPPFLAGS_HINTS = @FPPFLAGS_HINTS@ +FPPFLAGS_OPTIM = @FPPFLAGS_OPTIM@ +GPU_ARCH = @GPU_ARCH@ +GPU_CFLAGS = @GPU_CFLAGS@ +GPU_CPPFLAGS = @GPU_CPPFLAGS@ +GPU_CXXFLAGS = @GPU_CXXFLAGS@ +GPU_FCFLAGS = @GPU_FCFLAGS@ +GPU_LDFLAGS = @GPU_LDFLAGS@ +GPU_LIBS = @GPU_LIBS@ +GRAPHATOM_BIN = @GRAPHATOM_BIN@ +GREP = @GREP@ +H5CC = @H5CC@ +HDF5_CFLAGS = @HDF5_CFLAGS@ +HDF5_CPPFLAGS = @HDF5_CPPFLAGS@ +HDF5_CXXFLAGS = @HDF5_CXXFLAGS@ +HDF5_FCFLAGS = @HDF5_FCFLAGS@ +HDF5_LDFLAGS = @HDF5_LDFLAGS@ +HDF5_LIBS = @HDF5_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +LDFLAGS = @LDFLAGS@ +LEVMAR_CFLAGS = @LEVMAR_CFLAGS@ +LEVMAR_CPPFLAGS = @LEVMAR_CPPFLAGS@ +LEVMAR_LDFLAGS = @LEVMAR_LDFLAGS@ +LEVMAR_LIBS = @LEVMAR_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPAW_CPPFLAGS = @LIBPAW_CPPFLAGS@ +LIBPAW_FCFLAGS = @LIBPAW_FCFLAGS@ +LIBPAW_LDFLAGS = @LIBPAW_LDFLAGS@ +LIBPAW_LIBS = @LIBPAW_LIBS@ +LIBPSML_CPPFLAGS = @LIBPSML_CPPFLAGS@ +LIBPSML_FCFLAGS = @LIBPSML_FCFLAGS@ +LIBPSML_LDFLAGS = @LIBPSML_LDFLAGS@ +LIBPSML_LIBS = @LIBPSML_LIBS@ +LIBS = @LIBS@ +LIBXC_CFLAGS = @LIBXC_CFLAGS@ +LIBXC_CPPFLAGS = @LIBXC_CPPFLAGS@ +LIBXC_FCFLAGS = @LIBXC_FCFLAGS@ +LIBXC_LDFLAGS = @LIBXC_LDFLAGS@ +LIBXC_LIBS = @LIBXC_LIBS@ +LIBXML2_CPPFLAGS = @LIBXML2_CPPFLAGS@ +LIBXML2_FCFLAGS = @LIBXML2_FCFLAGS@ +LIBXML2_LIBS = @LIBXML2_LIBS@ +LINALG_CFLAGS = @LINALG_CFLAGS@ +LINALG_CPPFLAGS = @LINALG_CPPFLAGS@ +LINALG_CXXFLAGS = @LINALG_CXXFLAGS@ +LINALG_FCFLAGS = @LINALG_FCFLAGS@ +LINALG_LDFLAGS = @LINALG_LDFLAGS@ +LINALG_LIBS = @LINALG_LIBS@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODEXT = @MODEXT@ +MPI_CFLAGS = @MPI_CFLAGS@ +MPI_CPPFLAGS = @MPI_CPPFLAGS@ +MPI_CXXFLAGS = @MPI_CXXFLAGS@ +MPI_FCFLAGS = @MPI_FCFLAGS@ +MPI_LDFLAGS = @MPI_LDFLAGS@ +MPI_LIBS = @MPI_LIBS@ +MV = @MV@ +NETCDF_CFLAGS = @NETCDF_CFLAGS@ +NETCDF_CPPFLAGS = @NETCDF_CPPFLAGS@ +NETCDF_CXXFLAGS = @NETCDF_CXXFLAGS@ +NETCDF_FCFLAGS = @NETCDF_FCFLAGS@ +NETCDF_FORTRAN_CFLAGS = @NETCDF_FORTRAN_CFLAGS@ +NETCDF_FORTRAN_CPPFLAGS = @NETCDF_FORTRAN_CPPFLAGS@ +NETCDF_FORTRAN_CXXFLAGS = @NETCDF_FORTRAN_CXXFLAGS@ +NETCDF_FORTRAN_FCFLAGS = @NETCDF_FORTRAN_FCFLAGS@ +NETCDF_FORTRAN_LDFLAGS = @NETCDF_FORTRAN_LDFLAGS@ +NETCDF_FORTRAN_LIBS = @NETCDF_FORTRAN_LIBS@ +NETCDF_LDFLAGS = @NETCDF_LDFLAGS@ +NETCDF_LIBS = @NETCDF_LIBS@ +NVCC = @NVCC@ +NVCC_CFLAGS = @NVCC_CFLAGS@ +NVCC_CPPFLAGS = @NVCC_CPPFLAGS@ +NVCC_LDFLAGS = @NVCC_LDFLAGS@ +NVCC_LIBS = @NVCC_LIBS@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PAPI_CFLAGS = @PAPI_CFLAGS@ +PAPI_CPPFLAGS = @PAPI_CPPFLAGS@ +PAPI_LDFLAGS = @PAPI_LDFLAGS@ +PAPI_LIBS = @PAPI_LIBS@ +PATCH = @PATCH@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PFFT_CFLAGS = @PFFT_CFLAGS@ +PFFT_CPPFLAGS = @PFFT_CPPFLAGS@ +PFFT_LDFLAGS = @PFFT_LDFLAGS@ +PFFT_LIBS = @PFFT_LIBS@ +PYFLAGS = @PYFLAGS@ +PYTHON = @PYTHON@ +PYTHON_CONFIG = @PYTHON_CONFIG@ +PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ +RANLIB = @RANLIB@ +REALPATH = @REALPATH@ +RM = @RM@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +TAR = @TAR@ +TRIQS_CFLAGS = @TRIQS_CFLAGS@ +TRIQS_CPPFLAGS = @TRIQS_CPPFLAGS@ +TRIQS_CXXFLAGS = @TRIQS_CXXFLAGS@ +TRIQS_LDFLAGS = @TRIQS_LDFLAGS@ +TRIQS_LIBS = @TRIQS_LIBS@ +TRUE_CPP = @TRUE_CPP@ +VERSION = @VERSION@ +WANNIER90_CPPFLAGS = @WANNIER90_CPPFLAGS@ +WANNIER90_FCFLAGS = @WANNIER90_FCFLAGS@ +WANNIER90_LDFLAGS = @WANNIER90_LDFLAGS@ +WANNIER90_LIBS = @WANNIER90_LIBS@ +XML2_CONFIG = @XML2_CONFIG@ +XMLF90_CPPFLAGS = @XMLF90_CPPFLAGS@ +XMLF90_FCFLAGS = @XMLF90_FCFLAGS@ +XMLF90_LDFLAGS = @XMLF90_LDFLAGS@ +XMLF90_LIBS = @XMLF90_LIBS@ +XML_CPPFLAGS = @XML_CPPFLAGS@ +XML_LIBS = @XML_LIBS@ +XPP = @XPP@ +XPPFLAGS = @XPPFLAGS@ +XPPFLAGS_DEBUG = @XPPFLAGS_DEBUG@ +XPPFLAGS_EXTRA = @XPPFLAGS_EXTRA@ +XPPFLAGS_OPTIM = @XPPFLAGS_OPTIM@ +YAKL_CPPFLAGS = @YAKL_CPPFLAGS@ +YAKL_FCFLAGS = @YAKL_FCFLAGS@ +YAKL_LDFLAGS = @YAKL_LDFLAGS@ +YAKL_LIBS = @YAKL_LIBS@ +abi_ac_distcheck = @abi_ac_distcheck@ +abi_ac_version = @abi_ac_version@ +abi_am_version = @abi_am_version@ +abi_avx_safe_mode_enable = @abi_avx_safe_mode_enable@ +abi_bse_unpacked_enable = @abi_bse_unpacked_enable@ +abi_cc_path = @abi_cc_path@ +abi_cc_vendor = @abi_cc_vendor@ +abi_cc_version = @abi_cc_version@ +abi_cclock_enable = @abi_cclock_enable@ +abi_cpp_path = @abi_cpp_path@ +abi_cpu_64bits = @abi_cpu_64bits@ +abi_cpu_bits = @abi_cpu_bits@ +abi_cpu_model = @abi_cpu_model@ +abi_cpu_platform = @abi_cpu_platform@ +abi_cpu_spec = @abi_cpu_spec@ +abi_cpu_vendor = @abi_cpu_vendor@ +abi_crpa_optim_enable = @abi_crpa_optim_enable@ +abi_cxx_path = @abi_cxx_path@ +abi_cxx_vendor = @abi_cxx_vendor@ +abi_cxx_version = @abi_cxx_version@ +abi_debug_flavor = @abi_debug_flavor@ +abi_exports_enable = @abi_exports_enable@ +abi_fbk_abinit_common_ok = @abi_fbk_abinit_common_ok@ +abi_fbk_bigdft_ok = @abi_fbk_bigdft_ok@ +abi_fbk_config = @abi_fbk_config@ +abi_fbk_enable = @abi_fbk_enable@ +abi_fbk_fft_ok = @abi_fbk_fft_ok@ +abi_fbk_fftw3_ok = @abi_fbk_fftw3_ok@ +abi_fbk_gpu_ok = @abi_fbk_gpu_ok@ +abi_fbk_hdf5_ok = @abi_fbk_hdf5_ok@ +abi_fbk_init = @abi_fbk_init@ +abi_fbk_kokkos_ok = @abi_fbk_kokkos_ok@ +abi_fbk_levmar_ok = @abi_fbk_levmar_ok@ +abi_fbk_libpaw_ok = @abi_fbk_libpaw_ok@ +abi_fbk_libpsml_ok = @abi_fbk_libpsml_ok@ +abi_fbk_libxc_ok = @abi_fbk_libxc_ok@ +abi_fbk_libxml2_ok = @abi_fbk_libxml2_ok@ +abi_fbk_linalg_ok = @abi_fbk_linalg_ok@ +abi_fbk_list = @abi_fbk_list@ +abi_fbk_mpi_ok = @abi_fbk_mpi_ok@ +abi_fbk_netcdf_fortran_ok = @abi_fbk_netcdf_fortran_ok@ +abi_fbk_netcdf_ok = @abi_fbk_netcdf_ok@ +abi_fbk_papi_ok = @abi_fbk_papi_ok@ +abi_fbk_pfft_ok = @abi_fbk_pfft_ok@ +abi_fbk_prefix = @abi_fbk_prefix@ +abi_fbk_required = @abi_fbk_required@ +abi_fbk_triqs_ok = @abi_fbk_triqs_ok@ +abi_fbk_wannier90_ok = @abi_fbk_wannier90_ok@ +abi_fbk_xmlf90_ok = @abi_fbk_xmlf90_ok@ +abi_fbk_yakl_ok = @abi_fbk_yakl_ok@ +abi_fc_path = @abi_fc_path@ +abi_fc_vendor = @abi_fc_vendor@ +abi_fc_version = @abi_fc_version@ +abi_fc_wrap = @abi_fc_wrap@ +abi_fc_wrapper_enable = @abi_fc_wrapper_enable@ +abi_fpp_path = @abi_fpp_path@ +abi_gpu_arch = @abi_gpu_arch@ +abi_gpu_fcflags = @abi_gpu_fcflags@ +abi_gpu_flavor = @abi_gpu_flavor@ +abi_gpu_hip_libdir = @abi_gpu_hip_libdir@ +abi_gpu_incs = @abi_gpu_incs@ +abi_gpu_ldflags = @abi_gpu_ldflags@ +abi_gpu_libs = @abi_gpu_libs@ +abi_gpu_nvtx_v3 = @abi_gpu_nvtx_v3@ +abi_gpu_roctx = @abi_gpu_roctx@ +abi_gw_dpc_enable = @abi_gw_dpc_enable@ +abi_hints_enable = @abi_hints_enable@ +abi_libtetra_enable = @abi_libtetra_enable@ +abi_libxml2_cppflags = @abi_libxml2_cppflags@ +abi_libxml2_enable = @abi_libxml2_enable@ +abi_libxml2_fcflags = @abi_libxml2_fcflags@ +abi_libxml2_init = @abi_libxml2_init@ +abi_libxml2_ldflags = @abi_libxml2_ldflags@ +abi_libxml2_libs = @abi_libxml2_libs@ +abi_libxml2_ok = @abi_libxml2_ok@ +abi_libxml2_prefix = @abi_libxml2_prefix@ +abi_lotf_enable = @abi_lotf_enable@ +abi_lt_version = @abi_lt_version@ +abi_m4_version = @abi_m4_version@ +abi_memory_profiling_enable = @abi_memory_profiling_enable@ +abi_mpi_cflags = @abi_mpi_cflags@ +abi_mpi_cppflags = @abi_mpi_cppflags@ +abi_mpi_cxxflags = @abi_mpi_cxxflags@ +abi_mpi_enable = @abi_mpi_enable@ +abi_mpi_fcflags = @abi_mpi_fcflags@ +abi_mpi_flavor = @abi_mpi_flavor@ +abi_mpi_gpu_aware_enable = @abi_mpi_gpu_aware_enable@ +abi_mpi_incs = @abi_mpi_incs@ +abi_mpi_inplace_enable = @abi_mpi_inplace_enable@ +abi_mpi_interfaces_bugfix_enable = @abi_mpi_interfaces_bugfix_enable@ +abi_mpi_io_default_enable = @abi_mpi_io_default_enable@ +abi_mpi_io_enable = @abi_mpi_io_enable@ +abi_mpi_ldflags = @abi_mpi_ldflags@ +abi_mpi_level = @abi_mpi_level@ +abi_mpi_libs = @abi_mpi_libs@ +abi_netcdf_default_enable = @abi_netcdf_default_enable@ +abi_openmp_enable = @abi_openmp_enable@ +abi_openmp_offload_enable = @abi_openmp_offload_enable@ +abi_optim_flavor = @abi_optim_flavor@ +abi_python_invocation_enable = @abi_python_invocation_enable@ +abi_source_debug_enable = @abi_source_debug_enable@ +abi_stdin_enable = @abi_stdin_enable@ +abi_sys_spec = @abi_sys_spec@ +abi_timer_enable = @abi_timer_enable@ +abi_triqs_v1_4_enable = @abi_triqs_v1_4_enable@ +abi_triqs_v2_0_enable = @abi_triqs_v2_0_enable@ +abi_zdot_bugfix_enable = @abi_zdot_bugfix_enable@ +abinit_bindir = @abinit_bindir@ +abinit_builddir = @abinit_builddir@ +abinit_chkdir = @abinit_chkdir@ +abinit_datdir = @abinit_datdir@ +abinit_docdir = @abinit_docdir@ +abinit_incdir = @abinit_incdir@ +abinit_libdir = @abinit_libdir@ +abinit_mandir = @abinit_mandir@ +abinit_prefix = @abinit_prefix@ +abinit_srcdir = @abinit_srcdir@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_FC = @ac_ct_FC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cc_info_string = @cc_info_string@ +cxx_info_string = @cxx_info_string@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +enable_avx_safe_mode = @enable_avx_safe_mode@ +enable_bse_unpacked = @enable_bse_unpacked@ +enable_cclock = @enable_cclock@ +enable_crpa_optim = @enable_crpa_optim@ +enable_exports = @enable_exports@ +enable_fc_wrapper = @enable_fc_wrapper@ +enable_gw_dpc = @enable_gw_dpc@ +enable_hints = @enable_hints@ +enable_libtetra = @enable_libtetra@ +enable_lotf = @enable_lotf@ +enable_memory_profiling = @enable_memory_profiling@ +enable_mpi_gpu_aware = @enable_mpi_gpu_aware@ +enable_mpi_inplace = @enable_mpi_inplace@ +enable_mpi_interfaces_bugfix = @enable_mpi_interfaces_bugfix@ +enable_mpi_io = @enable_mpi_io@ +enable_mpi_io_default = @enable_mpi_io_default@ +enable_netcdf_default = @enable_netcdf_default@ +enable_openmp = @enable_openmp@ +enable_openmp_offload = @enable_openmp_offload@ +enable_python_invocation = @enable_python_invocation@ +enable_shared = @enable_shared@ +enable_source_debug = @enable_source_debug@ +enable_static = @enable_static@ +enable_stdin = @enable_stdin@ +enable_timer = @enable_timer@ +enable_triqs_v1_4 = @enable_triqs_v1_4@ +enable_triqs_v2_0 = @enable_triqs_v2_0@ +enable_zdot_bugfix = @enable_zdot_bugfix@ +exec_prefix = @exec_prefix@ +fc_info_string = @fc_info_string@ +fc_mod_fcflags = @fc_mod_fcflags@ +fc_timing = @fc_timing@ +fcflags_opt_02_clib = @fcflags_opt_02_clib@ +fcflags_opt_10_defs = @fcflags_opt_10_defs@ +fcflags_opt_11_memory_mpi = @fcflags_opt_11_memory_mpi@ +fcflags_opt_12_hide_mpi = @fcflags_opt_12_hide_mpi@ +fcflags_opt_14_hidewrite = @fcflags_opt_14_hidewrite@ +fcflags_opt_16_hideleave = @fcflags_opt_16_hideleave@ +fcflags_opt_16_kokkos_toolbox = @fcflags_opt_16_kokkos_toolbox@ +fcflags_opt_17_gpu_toolbox = @fcflags_opt_17_gpu_toolbox@ +fcflags_opt_17_libtetra_ext = @fcflags_opt_17_libtetra_ext@ +fcflags_opt_17_minimax = @fcflags_opt_17_minimax@ +fcflags_opt_17_yaml_out = @fcflags_opt_17_yaml_out@ +fcflags_opt_18_timing = @fcflags_opt_18_timing@ +fcflags_opt_21_hashfuncs = @fcflags_opt_21_hashfuncs@ +fcflags_opt_27_toolbox_oop = @fcflags_opt_27_toolbox_oop@ +fcflags_opt_28_numeric_noabirule = @fcflags_opt_28_numeric_noabirule@ +fcflags_opt_29_kpoints = @fcflags_opt_29_kpoints@ +fcflags_opt_32_util = @fcflags_opt_32_util@ +fcflags_opt_33_xc_lowlevel = @fcflags_opt_33_xc_lowlevel@ +fcflags_opt_39_libpaw = @fcflags_opt_39_libpaw@ +fcflags_opt_41_geometry = @fcflags_opt_41_geometry@ +fcflags_opt_42_nlstrain = @fcflags_opt_42_nlstrain@ +fcflags_opt_42_parser = @fcflags_opt_42_parser@ +fcflags_opt_43_ptgroups = @fcflags_opt_43_ptgroups@ +fcflags_opt_43_wvl_wrappers = @fcflags_opt_43_wvl_wrappers@ +fcflags_opt_44_abitools = @fcflags_opt_44_abitools@ +fcflags_opt_44_abitypes_defs = @fcflags_opt_44_abitypes_defs@ +fcflags_opt_44_manage_kokkos = @fcflags_opt_44_manage_kokkos@ +fcflags_opt_45_geomoptim = @fcflags_opt_45_geomoptim@ +fcflags_opt_45_xgTools = @fcflags_opt_45_xgTools@ +fcflags_opt_46_ghc_omp = @fcflags_opt_46_ghc_omp@ +fcflags_opt_46_manage_cuda = @fcflags_opt_46_manage_cuda@ +fcflags_opt_48_diago = @fcflags_opt_48_diago@ +fcflags_opt_49_gw_toolbox_oop = @fcflags_opt_49_gw_toolbox_oop@ +fcflags_opt_51_manage_mpi = @fcflags_opt_51_manage_mpi@ +fcflags_opt_52_fft_mpi_noabirule = @fcflags_opt_52_fft_mpi_noabirule@ +fcflags_opt_53_ffts = @fcflags_opt_53_ffts@ +fcflags_opt_54_spacepar = @fcflags_opt_54_spacepar@ +fcflags_opt_55_abiutil = @fcflags_opt_55_abiutil@ +fcflags_opt_56_io_mpi = @fcflags_opt_56_io_mpi@ +fcflags_opt_56_mixing = @fcflags_opt_56_mixing@ +fcflags_opt_56_recipspace = @fcflags_opt_56_recipspace@ +fcflags_opt_56_xc = @fcflags_opt_56_xc@ +fcflags_opt_57_iopsp_parser = @fcflags_opt_57_iopsp_parser@ +fcflags_opt_57_iovars = @fcflags_opt_57_iovars@ +fcflags_opt_61_occeig = @fcflags_opt_61_occeig@ +fcflags_opt_62_cg_noabirule = @fcflags_opt_62_cg_noabirule@ +fcflags_opt_62_ctqmc = @fcflags_opt_62_ctqmc@ +fcflags_opt_62_iowfdenpot = @fcflags_opt_62_iowfdenpot@ +fcflags_opt_62_poisson = @fcflags_opt_62_poisson@ +fcflags_opt_62_wvl_wfs = @fcflags_opt_62_wvl_wfs@ +fcflags_opt_64_psp = @fcflags_opt_64_psp@ +fcflags_opt_65_lotf_base = @fcflags_opt_65_lotf_base@ +fcflags_opt_65_paw = @fcflags_opt_65_paw@ +fcflags_opt_66_nonlocal = @fcflags_opt_66_nonlocal@ +fcflags_opt_66_vdwxc = @fcflags_opt_66_vdwxc@ +fcflags_opt_66_wfs = @fcflags_opt_66_wfs@ +fcflags_opt_67_common = @fcflags_opt_67_common@ +fcflags_opt_67_python_invocation_ext = @fcflags_opt_67_python_invocation_ext@ +fcflags_opt_67_triqs_ext = @fcflags_opt_67_triqs_ext@ +fcflags_opt_68_dmft = @fcflags_opt_68_dmft@ +fcflags_opt_68_lotf = @fcflags_opt_68_lotf@ +fcflags_opt_68_recursion = @fcflags_opt_68_recursion@ +fcflags_opt_68_rsprc = @fcflags_opt_68_rsprc@ +fcflags_opt_69_wfdesc = @fcflags_opt_69_wfdesc@ +fcflags_opt_70_gw = @fcflags_opt_70_gw@ +fcflags_opt_71_bse = @fcflags_opt_71_bse@ +fcflags_opt_71_wannier = @fcflags_opt_71_wannier@ +fcflags_opt_72_response = @fcflags_opt_72_response@ +fcflags_opt_77_ddb = @fcflags_opt_77_ddb@ +fcflags_opt_77_suscep = @fcflags_opt_77_suscep@ +fcflags_opt_78_effpot = @fcflags_opt_78_effpot@ +fcflags_opt_78_eph = @fcflags_opt_78_eph@ +fcflags_opt_79_seqpar_mpi = @fcflags_opt_79_seqpar_mpi@ +fcflags_opt_80_rttddft = @fcflags_opt_80_rttddft@ +fcflags_opt_80_tdep = @fcflags_opt_80_tdep@ +fcflags_opt_94_scfcv = @fcflags_opt_94_scfcv@ +fcflags_opt_95_drive = @fcflags_opt_95_drive@ +fcflags_opt_98_main = @fcflags_opt_98_main@ +fcflags_opt_bigdft = @fcflags_opt_bigdft@ +fcflags_opt_default = @fcflags_opt_default@ +fcflags_opt_hdf5 = @fcflags_opt_hdf5@ +fcflags_opt_levmar = @fcflags_opt_levmar@ +fcflags_opt_libpsml = @fcflags_opt_libpsml@ +fcflags_opt_libxc = @fcflags_opt_libxc@ +fcflags_opt_libxml2 = @fcflags_opt_libxml2@ +fcflags_opt_linalg = @fcflags_opt_linalg@ +fcflags_opt_netcdf = @fcflags_opt_netcdf@ +fcflags_opt_netcdf_fortran = @fcflags_opt_netcdf_fortran@ +fcflags_opt_papi = @fcflags_opt_papi@ +fcflags_opt_triqs = @fcflags_opt_triqs@ +fcflags_opt_wannier90 = @fcflags_opt_wannier90@ +fcflags_opt_xmlf90 = @fcflags_opt_xmlf90@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sd_abinit_common_cppflags = @sd_abinit_common_cppflags@ +sd_abinit_common_enable = @sd_abinit_common_enable@ +sd_abinit_common_enable_def = @sd_abinit_common_enable_def@ +sd_abinit_common_fcflags = @sd_abinit_common_fcflags@ +sd_abinit_common_init = @sd_abinit_common_init@ +sd_abinit_common_ldflags = @sd_abinit_common_ldflags@ +sd_abinit_common_libs = @sd_abinit_common_libs@ +sd_abinit_common_ok = @sd_abinit_common_ok@ +sd_abinit_common_options = @sd_abinit_common_options@ +sd_abinit_common_policy = @sd_abinit_common_policy@ +sd_abinit_common_status = @sd_abinit_common_status@ +sd_bigdft_cppflags = @sd_bigdft_cppflags@ +sd_bigdft_enable = @sd_bigdft_enable@ +sd_bigdft_enable_def = @sd_bigdft_enable_def@ +sd_bigdft_fcflags = @sd_bigdft_fcflags@ +sd_bigdft_init = @sd_bigdft_init@ +sd_bigdft_ldflags = @sd_bigdft_ldflags@ +sd_bigdft_libs = @sd_bigdft_libs@ +sd_bigdft_ok = @sd_bigdft_ok@ +sd_bigdft_options = @sd_bigdft_options@ +sd_bigdft_policy = @sd_bigdft_policy@ +sd_bigdft_status = @sd_bigdft_status@ +sd_fft_cflags = @sd_fft_cflags@ +sd_fft_choices = @sd_fft_choices@ +sd_fft_cppflags = @sd_fft_cppflags@ +sd_fft_cxxflags = @sd_fft_cxxflags@ +sd_fft_enable = @sd_fft_enable@ +sd_fft_fcflags = @sd_fft_fcflags@ +sd_fft_flavor = @sd_fft_flavor@ +sd_fft_init = @sd_fft_init@ +sd_fft_ldflags = @sd_fft_ldflags@ +sd_fft_libs = @sd_fft_libs@ +sd_fft_ok = @sd_fft_ok@ +sd_fftw3_cflags = @sd_fftw3_cflags@ +sd_fftw3_cppflags = @sd_fftw3_cppflags@ +sd_fftw3_enable = @sd_fftw3_enable@ +sd_fftw3_enable_def = @sd_fftw3_enable_def@ +sd_fftw3_fcflags = @sd_fftw3_fcflags@ +sd_fftw3_init = @sd_fftw3_init@ +sd_fftw3_ldflags = @sd_fftw3_ldflags@ +sd_fftw3_libs = @sd_fftw3_libs@ +sd_fftw3_ok = @sd_fftw3_ok@ +sd_fftw3_options = @sd_fftw3_options@ +sd_fftw3_policy = @sd_fftw3_policy@ +sd_fftw3_status = @sd_fftw3_status@ +sd_gpu_cflags = @sd_gpu_cflags@ +sd_gpu_cppflags = @sd_gpu_cppflags@ +sd_gpu_cxxflags = @sd_gpu_cxxflags@ +sd_gpu_enable = @sd_gpu_enable@ +sd_gpu_enable_def = @sd_gpu_enable_def@ +sd_gpu_fcflags = @sd_gpu_fcflags@ +sd_gpu_init = @sd_gpu_init@ +sd_gpu_ldflags = @sd_gpu_ldflags@ +sd_gpu_libs = @sd_gpu_libs@ +sd_gpu_ok = @sd_gpu_ok@ +sd_gpu_options = @sd_gpu_options@ +sd_gpu_policy = @sd_gpu_policy@ +sd_gpu_prefix = @sd_gpu_prefix@ +sd_gpu_status = @sd_gpu_status@ +sd_hdf5_cflags = @sd_hdf5_cflags@ +sd_hdf5_cppflags = @sd_hdf5_cppflags@ +sd_hdf5_cxxflags = @sd_hdf5_cxxflags@ +sd_hdf5_enable = @sd_hdf5_enable@ +sd_hdf5_enable_def = @sd_hdf5_enable_def@ +sd_hdf5_enable_fc = @sd_hdf5_enable_fc@ +sd_hdf5_fcflags = @sd_hdf5_fcflags@ +sd_hdf5_h5cc = @sd_hdf5_h5cc@ +sd_hdf5_h5fc = @sd_hdf5_h5fc@ +sd_hdf5_init = @sd_hdf5_init@ +sd_hdf5_ldflags = @sd_hdf5_ldflags@ +sd_hdf5_libs = @sd_hdf5_libs@ +sd_hdf5_ok = @sd_hdf5_ok@ +sd_hdf5_options = @sd_hdf5_options@ +sd_hdf5_policy = @sd_hdf5_policy@ +sd_hdf5_status = @sd_hdf5_status@ +sd_kokkos_cppflags = @sd_kokkos_cppflags@ +sd_kokkos_cxxflags = @sd_kokkos_cxxflags@ +sd_kokkos_enable = @sd_kokkos_enable@ +sd_kokkos_enable_def = @sd_kokkos_enable_def@ +sd_kokkos_init = @sd_kokkos_init@ +sd_kokkos_ldflags = @sd_kokkos_ldflags@ +sd_kokkos_libs = @sd_kokkos_libs@ +sd_kokkos_ok = @sd_kokkos_ok@ +sd_kokkos_options = @sd_kokkos_options@ +sd_kokkos_policy = @sd_kokkos_policy@ +sd_kokkos_status = @sd_kokkos_status@ +sd_levmar_cflags = @sd_levmar_cflags@ +sd_levmar_cppflags = @sd_levmar_cppflags@ +sd_levmar_enable = @sd_levmar_enable@ +sd_levmar_enable_def = @sd_levmar_enable_def@ +sd_levmar_init = @sd_levmar_init@ +sd_levmar_ldflags = @sd_levmar_ldflags@ +sd_levmar_libs = @sd_levmar_libs@ +sd_levmar_ok = @sd_levmar_ok@ +sd_levmar_options = @sd_levmar_options@ +sd_levmar_policy = @sd_levmar_policy@ +sd_levmar_status = @sd_levmar_status@ +sd_libpaw_cppflags = @sd_libpaw_cppflags@ +sd_libpaw_enable = @sd_libpaw_enable@ +sd_libpaw_enable_def = @sd_libpaw_enable_def@ +sd_libpaw_fcflags = @sd_libpaw_fcflags@ +sd_libpaw_init = @sd_libpaw_init@ +sd_libpaw_ldflags = @sd_libpaw_ldflags@ +sd_libpaw_libs = @sd_libpaw_libs@ +sd_libpaw_ok = @sd_libpaw_ok@ +sd_libpaw_options = @sd_libpaw_options@ +sd_libpaw_policy = @sd_libpaw_policy@ +sd_libpaw_status = @sd_libpaw_status@ +sd_libpsml_cppflags = @sd_libpsml_cppflags@ +sd_libpsml_enable = @sd_libpsml_enable@ +sd_libpsml_enable_def = @sd_libpsml_enable_def@ +sd_libpsml_fcflags = @sd_libpsml_fcflags@ +sd_libpsml_init = @sd_libpsml_init@ +sd_libpsml_ldflags = @sd_libpsml_ldflags@ +sd_libpsml_libs = @sd_libpsml_libs@ +sd_libpsml_ok = @sd_libpsml_ok@ +sd_libpsml_options = @sd_libpsml_options@ +sd_libpsml_policy = @sd_libpsml_policy@ +sd_libpsml_status = @sd_libpsml_status@ +sd_libxc_cflags = @sd_libxc_cflags@ +sd_libxc_cppflags = @sd_libxc_cppflags@ +sd_libxc_enable = @sd_libxc_enable@ +sd_libxc_enable_def = @sd_libxc_enable_def@ +sd_libxc_enable_fc = @sd_libxc_enable_fc@ +sd_libxc_fcflags = @sd_libxc_fcflags@ +sd_libxc_init = @sd_libxc_init@ +sd_libxc_ldflags = @sd_libxc_ldflags@ +sd_libxc_libs = @sd_libxc_libs@ +sd_libxc_ok = @sd_libxc_ok@ +sd_libxc_options = @sd_libxc_options@ +sd_libxc_policy = @sd_libxc_policy@ +sd_libxc_status = @sd_libxc_status@ +sd_linalg_cflags = @sd_linalg_cflags@ +sd_linalg_choices = @sd_linalg_choices@ +sd_linalg_cppflags = @sd_linalg_cppflags@ +sd_linalg_cxxflags = @sd_linalg_cxxflags@ +sd_linalg_enable = @sd_linalg_enable@ +sd_linalg_fcflags = @sd_linalg_fcflags@ +sd_linalg_flavor = @sd_linalg_flavor@ +sd_linalg_has_elpa = @sd_linalg_has_elpa@ +sd_linalg_has_scalapack = @sd_linalg_has_scalapack@ +sd_linalg_init = @sd_linalg_init@ +sd_linalg_ldflags = @sd_linalg_ldflags@ +sd_linalg_libs = @sd_linalg_libs@ +sd_linalg_ok = @sd_linalg_ok@ +sd_mpi_cc = @sd_mpi_cc@ +sd_mpi_cflags = @sd_mpi_cflags@ +sd_mpi_cppflags = @sd_mpi_cppflags@ +sd_mpi_cxx = @sd_mpi_cxx@ +sd_mpi_enable = @sd_mpi_enable@ +sd_mpi_enable_cxx = @sd_mpi_enable_cxx@ +sd_mpi_enable_def = @sd_mpi_enable_def@ +sd_mpi_enable_fc = @sd_mpi_enable_fc@ +sd_mpi_fc = @sd_mpi_fc@ +sd_mpi_fcflags = @sd_mpi_fcflags@ +sd_mpi_init = @sd_mpi_init@ +sd_mpi_ldflags = @sd_mpi_ldflags@ +sd_mpi_libs = @sd_mpi_libs@ +sd_mpi_ok = @sd_mpi_ok@ +sd_mpi_options = @sd_mpi_options@ +sd_mpi_policy = @sd_mpi_policy@ +sd_mpi_status = @sd_mpi_status@ +sd_netcdf_cflags = @sd_netcdf_cflags@ +sd_netcdf_cppflags = @sd_netcdf_cppflags@ +sd_netcdf_enable = @sd_netcdf_enable@ +sd_netcdf_enable_def = @sd_netcdf_enable_def@ +sd_netcdf_fcflags = @sd_netcdf_fcflags@ +sd_netcdf_fortran_cflags = @sd_netcdf_fortran_cflags@ +sd_netcdf_fortran_cppflags = @sd_netcdf_fortran_cppflags@ +sd_netcdf_fortran_enable = @sd_netcdf_fortran_enable@ +sd_netcdf_fortran_enable_def = @sd_netcdf_fortran_enable_def@ +sd_netcdf_fortran_fcflags = @sd_netcdf_fortran_fcflags@ +sd_netcdf_fortran_init = @sd_netcdf_fortran_init@ +sd_netcdf_fortran_ldflags = @sd_netcdf_fortran_ldflags@ +sd_netcdf_fortran_libs = @sd_netcdf_fortran_libs@ +sd_netcdf_fortran_ok = @sd_netcdf_fortran_ok@ +sd_netcdf_fortran_options = @sd_netcdf_fortran_options@ +sd_netcdf_fortran_policy = @sd_netcdf_fortran_policy@ +sd_netcdf_fortran_status = @sd_netcdf_fortran_status@ +sd_netcdf_init = @sd_netcdf_init@ +sd_netcdf_ldflags = @sd_netcdf_ldflags@ +sd_netcdf_libs = @sd_netcdf_libs@ +sd_netcdf_ok = @sd_netcdf_ok@ +sd_netcdf_options = @sd_netcdf_options@ +sd_netcdf_policy = @sd_netcdf_policy@ +sd_netcdf_status = @sd_netcdf_status@ +sd_papi_cflags = @sd_papi_cflags@ +sd_papi_cppflags = @sd_papi_cppflags@ +sd_papi_enable = @sd_papi_enable@ +sd_papi_enable_def = @sd_papi_enable_def@ +sd_papi_init = @sd_papi_init@ +sd_papi_ldflags = @sd_papi_ldflags@ +sd_papi_libs = @sd_papi_libs@ +sd_papi_ok = @sd_papi_ok@ +sd_papi_options = @sd_papi_options@ +sd_papi_policy = @sd_papi_policy@ +sd_papi_sd_papi_fcflags = @sd_papi_sd_papi_fcflags@ +sd_papi_status = @sd_papi_status@ +sd_pfft_cflags = @sd_pfft_cflags@ +sd_pfft_cppflags = @sd_pfft_cppflags@ +sd_pfft_enable = @sd_pfft_enable@ +sd_pfft_enable_def = @sd_pfft_enable_def@ +sd_pfft_init = @sd_pfft_init@ +sd_pfft_ldflags = @sd_pfft_ldflags@ +sd_pfft_libs = @sd_pfft_libs@ +sd_pfft_ok = @sd_pfft_ok@ +sd_pfft_options = @sd_pfft_options@ +sd_pfft_policy = @sd_pfft_policy@ +sd_pfft_status = @sd_pfft_status@ +sd_sys_fcflags = @sd_sys_fcflags@ +sd_triqs_cflags = @sd_triqs_cflags@ +sd_triqs_cppflags = @sd_triqs_cppflags@ +sd_triqs_cxxflags = @sd_triqs_cxxflags@ +sd_triqs_enable = @sd_triqs_enable@ +sd_triqs_enable_def = @sd_triqs_enable_def@ +sd_triqs_fcflags = @sd_triqs_fcflags@ +sd_triqs_init = @sd_triqs_init@ +sd_triqs_ldflags = @sd_triqs_ldflags@ +sd_triqs_libs = @sd_triqs_libs@ +sd_triqs_ok = @sd_triqs_ok@ +sd_triqs_options = @sd_triqs_options@ +sd_triqs_policy = @sd_triqs_policy@ +sd_triqs_status = @sd_triqs_status@ +sd_wannier90_cppflags = @sd_wannier90_cppflags@ +sd_wannier90_enable = @sd_wannier90_enable@ +sd_wannier90_enable_def = @sd_wannier90_enable_def@ +sd_wannier90_fcflags = @sd_wannier90_fcflags@ +sd_wannier90_init = @sd_wannier90_init@ +sd_wannier90_ldflags = @sd_wannier90_ldflags@ +sd_wannier90_libs = @sd_wannier90_libs@ +sd_wannier90_ok = @sd_wannier90_ok@ +sd_wannier90_options = @sd_wannier90_options@ +sd_wannier90_policy = @sd_wannier90_policy@ +sd_wannier90_status = @sd_wannier90_status@ +sd_xmlf90_cppflags = @sd_xmlf90_cppflags@ +sd_xmlf90_enable = @sd_xmlf90_enable@ +sd_xmlf90_enable_def = @sd_xmlf90_enable_def@ +sd_xmlf90_fcflags = @sd_xmlf90_fcflags@ +sd_xmlf90_init = @sd_xmlf90_init@ +sd_xmlf90_ldflags = @sd_xmlf90_ldflags@ +sd_xmlf90_libs = @sd_xmlf90_libs@ +sd_xmlf90_ok = @sd_xmlf90_ok@ +sd_xmlf90_options = @sd_xmlf90_options@ +sd_xmlf90_policy = @sd_xmlf90_policy@ +sd_xmlf90_status = @sd_xmlf90_status@ +sd_yakl_cppflags = @sd_yakl_cppflags@ +sd_yakl_enable = @sd_yakl_enable@ +sd_yakl_enable_def = @sd_yakl_enable_def@ +sd_yakl_fcflags = @sd_yakl_fcflags@ +sd_yakl_init = @sd_yakl_init@ +sd_yakl_ldflags = @sd_yakl_ldflags@ +sd_yakl_libs = @sd_yakl_libs@ +sd_yakl_ok = @sd_yakl_ok@ +sd_yakl_options = @sd_yakl_options@ +sd_yakl_policy = @sd_yakl_policy@ +sd_yakl_status = @sd_yakl_status@ +sharedstatedir = @sharedstatedir@ +src_02_clib_fcflags = @src_02_clib_fcflags@ +src_10_defs_fcflags = @src_10_defs_fcflags@ +src_11_memory_mpi_fcflags = @src_11_memory_mpi_fcflags@ +src_12_hide_mpi_fcflags = @src_12_hide_mpi_fcflags@ +src_14_hidewrite_fcflags = @src_14_hidewrite_fcflags@ +src_16_hideleave_fcflags = @src_16_hideleave_fcflags@ +src_16_kokkos_toolbox_fcflags = @src_16_kokkos_toolbox_fcflags@ +src_17_gpu_toolbox_fcflags = @src_17_gpu_toolbox_fcflags@ +src_17_libtetra_ext_fcflags = @src_17_libtetra_ext_fcflags@ +src_17_minimax_fcflags = @src_17_minimax_fcflags@ +src_17_yaml_out_fcflags = @src_17_yaml_out_fcflags@ +src_18_timing_fcflags = @src_18_timing_fcflags@ +src_21_hashfuncs_fcflags = @src_21_hashfuncs_fcflags@ +src_27_toolbox_oop_fcflags = @src_27_toolbox_oop_fcflags@ +src_28_numeric_noabirule_fcflags = @src_28_numeric_noabirule_fcflags@ +src_29_kpoints_fcflags = @src_29_kpoints_fcflags@ +src_32_util_fcflags = @src_32_util_fcflags@ +src_33_xc_lowlevel_fcflags = @src_33_xc_lowlevel_fcflags@ +src_39_libpaw_fcflags = @src_39_libpaw_fcflags@ +src_41_geometry_fcflags = @src_41_geometry_fcflags@ +src_42_nlstrain_fcflags = @src_42_nlstrain_fcflags@ +src_42_parser_fcflags = @src_42_parser_fcflags@ +src_43_ptgroups_fcflags = @src_43_ptgroups_fcflags@ +src_43_wvl_wrappers_fcflags = @src_43_wvl_wrappers_fcflags@ +src_44_abitools_fcflags = @src_44_abitools_fcflags@ +src_44_abitypes_defs_fcflags = @src_44_abitypes_defs_fcflags@ +src_44_manage_kokkos_fcflags = @src_44_manage_kokkos_fcflags@ +src_45_geomoptim_fcflags = @src_45_geomoptim_fcflags@ +src_45_xgTools_fcflags = @src_45_xgTools_fcflags@ +src_46_ghc_omp_fcflags = @src_46_ghc_omp_fcflags@ +src_46_manage_cuda_fcflags = @src_46_manage_cuda_fcflags@ +src_48_diago_fcflags = @src_48_diago_fcflags@ +src_49_gw_toolbox_oop_fcflags = @src_49_gw_toolbox_oop_fcflags@ +src_51_manage_mpi_fcflags = @src_51_manage_mpi_fcflags@ +src_52_fft_mpi_noabirule_fcflags = @src_52_fft_mpi_noabirule_fcflags@ +src_53_ffts_fcflags = @src_53_ffts_fcflags@ +src_54_spacepar_fcflags = @src_54_spacepar_fcflags@ +src_55_abiutil_fcflags = @src_55_abiutil_fcflags@ +src_56_io_mpi_fcflags = @src_56_io_mpi_fcflags@ +src_56_mixing_fcflags = @src_56_mixing_fcflags@ +src_56_recipspace_fcflags = @src_56_recipspace_fcflags@ +src_56_xc_fcflags = @src_56_xc_fcflags@ +src_57_iopsp_parser_fcflags = @src_57_iopsp_parser_fcflags@ +src_57_iovars_fcflags = @src_57_iovars_fcflags@ +src_61_occeig_fcflags = @src_61_occeig_fcflags@ +src_62_cg_noabirule_fcflags = @src_62_cg_noabirule_fcflags@ +src_62_ctqmc_fcflags = @src_62_ctqmc_fcflags@ +src_62_iowfdenpot_fcflags = @src_62_iowfdenpot_fcflags@ +src_62_poisson_fcflags = @src_62_poisson_fcflags@ +src_62_wvl_wfs_fcflags = @src_62_wvl_wfs_fcflags@ +src_64_psp_fcflags = @src_64_psp_fcflags@ +src_65_lotf_base_fcflags = @src_65_lotf_base_fcflags@ +src_65_paw_fcflags = @src_65_paw_fcflags@ +src_66_nonlocal_fcflags = @src_66_nonlocal_fcflags@ +src_66_vdwxc_fcflags = @src_66_vdwxc_fcflags@ +src_66_wfs_fcflags = @src_66_wfs_fcflags@ +src_67_common_fcflags = @src_67_common_fcflags@ +src_67_python_invocation_ext_fcflags = @src_67_python_invocation_ext_fcflags@ +src_67_triqs_ext_fcflags = @src_67_triqs_ext_fcflags@ +src_68_dmft_fcflags = @src_68_dmft_fcflags@ +src_68_lotf_fcflags = @src_68_lotf_fcflags@ +src_68_recursion_fcflags = @src_68_recursion_fcflags@ +src_68_rsprc_fcflags = @src_68_rsprc_fcflags@ +src_69_wfdesc_fcflags = @src_69_wfdesc_fcflags@ +src_70_gw_fcflags = @src_70_gw_fcflags@ +src_71_bse_fcflags = @src_71_bse_fcflags@ +src_71_wannier_fcflags = @src_71_wannier_fcflags@ +src_72_response_fcflags = @src_72_response_fcflags@ +src_77_ddb_fcflags = @src_77_ddb_fcflags@ +src_77_suscep_fcflags = @src_77_suscep_fcflags@ +src_78_effpot_fcflags = @src_78_effpot_fcflags@ +src_78_eph_fcflags = @src_78_eph_fcflags@ +src_79_seqpar_mpi_fcflags = @src_79_seqpar_mpi_fcflags@ +src_80_rttddft_fcflags = @src_80_rttddft_fcflags@ +src_80_tdep_fcflags = @src_80_tdep_fcflags@ +src_94_scfcv_fcflags = @src_94_scfcv_fcflags@ +src_95_drive_fcflags = @src_95_drive_fcflags@ +src_common_fcflags = @src_common_fcflags@ +src_core_fcflags = @src_core_fcflags@ +src_libpaw_fcflags = @src_libpaw_fcflags@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +with_abinit_common = @with_abinit_common@ +with_bigdft = @with_bigdft@ +with_config_file = @with_config_file@ +with_debug_flavor = @with_debug_flavor@ +with_fallbacks = @with_fallbacks@ +with_fc_vendor = @with_fc_vendor@ +with_fc_version = @with_fc_version@ +with_fft_flavor = @with_fft_flavor@ +with_fftw3 = @with_fftw3@ +with_gnu_ld = @with_gnu_ld@ +with_gpu = @with_gpu@ +with_hdf5 = @with_hdf5@ +with_kokkos = @with_kokkos@ +with_levmar = @with_levmar@ +with_libpaw = @with_libpaw@ +with_libpsml = @with_libpsml@ +with_libxc = @with_libxc@ +with_libxml2 = @with_libxml2@ +with_linalg_flavor = @with_linalg_flavor@ +with_mpi = @with_mpi@ +with_mpi_level = @with_mpi_level@ +with_netcdf = @with_netcdf@ +with_optim_flavor = @with_optim_flavor@ +with_papi = @with_papi@ +with_pfft = @with_pfft@ +with_triqs = @with_triqs@ +with_wannier90 = @with_wannier90@ +with_xmlf90 = @with_xmlf90@ +with_yakl = @with_yakl@ +AM_CFLAGS = @ABI_CPPFLAGS@ +AM_CXXFLAGS = $(sd_triqs_cxxflags) +AM_FCFLAGS = @FPPFLAGS@ @FCFLAGS_FREEFORM@ @FCFLAGS_MODDIR@ @sd_sys_fcflags@ @fcflags_opt_10_defs@ +AM_CPPFLAGS = \ + @src_10_defs_fcflags@ \ + @src_common_fcflags@ \ + @src_core_fcflags@ \ + @src_libpaw_fcflags@ \ + @sd_bigdft_fcflags@ \ + @fc_mod_fcflags@ + + +# Regular source files +lib10_defs_srcs = \ + defs_basis.F90 \ + defs_datatypes.F90 + + +# Source files depending on conditionals + +# Library description +noinst_LIBRARIES = lib10_defs.a +lib10_defs_a_SOURCES = $(lib10_defs_srcs) + +# Dependencies (inside the directory) of directory 10_defs +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. +CLEANFILES = defs_basis_cpp.f90 defs_datatypes_cpp.f90 \ + defs_basis.$(MODEXT) defs_datatypes.$(MODEXT) +EXTRA_DIST = abinit.src abinit.dep _10_defs_ +all: all-am + +.SUFFIXES: +.SUFFIXES: .F90 .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu shared/common/src/10_defs/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu shared/common/src/10_defs/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) + +lib10_defs.a: $(lib10_defs_a_OBJECTS) $(lib10_defs_a_DEPENDENCIES) $(EXTRA_lib10_defs_a_DEPENDENCIES) + $(AM_V_at)-rm -f lib10_defs.a + $(AM_V_AR)$(lib10_defs_a_AR) lib10_defs.a $(lib10_defs_a_OBJECTS) $(lib10_defs_a_LIBADD) + $(AM_V_at)$(RANLIB) lib10_defs.a + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +.F90.o: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ $< + +.F90.obj: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-noinstLIBRARIES cscopelist-am ctags ctags-am distclean \ + distclean-compile distclean-generic distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am + +.PRECIOUS: Makefile + + +defs_datatypes.$(OBJEXT): defs_basis.$(OBJEXT) + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/GX-PAW/common/src/10_defs/README b/GX-PAW/common/src/10_defs/README new file mode 100644 index 00000000..35cec49b --- /dev/null +++ b/GX-PAW/common/src/10_defs/README @@ -0,0 +1,15 @@ +Adding a new source file inside a directory "dirname" +===================================================== + +In order to be treated properly by the ABINIT build system, +a new source file should be declared in the file abinit.src +of the same directory (just one line to be added +per new file, rather self-explanatory). + +Then, in order for the make to work : +(1) if the developer has the autotools working on his computer, he should + issue */*/makemake, then configure and make +(2) otherwise, the developer should modify by hand the Makefile.am file + of the directory in which the file is placed (just one line to be added also), + then issue make. + diff --git a/GX-PAW/common/src/10_defs/_10_defs_ b/GX-PAW/common/src/10_defs/_10_defs_ new file mode 100644 index 00000000..f3133c68 --- /dev/null +++ b/GX-PAW/common/src/10_defs/_10_defs_ @@ -0,0 +1,30 @@ +!!****d* ABINIT/defs +!! NAME +!! defs +!! +!! DESCRIPTION +!! This directory contains +!! - the defs_basis module, with +!! the definitions of global parameters of the ABINIT package +!! - other defs_* modules +!! - interfaces_* of all directories included used libraries +!! By definitions, one means : +!! - constants that define data types +!! (e.g.: dp , is used in real(dp) ) +!! - numerical constants (e.g.: zero , one , half , pi , ...) +!! - physical constants (e.g.: Ha_eV=27.2113961_dp ! 1 Hartree, in eV) +!! The other defs_* modules presently contain definition +!! of derived datatypes. + +!! COPYRIGHT +!! Copyright (C) 1998-2024 ABINIT group (TD) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! For the initials of contributors, see ~abinit/doc/developers/contributors.txt . +!! +!! CHILDREN +!! defs_basis.F90 +!! defs_datatypes.F90 +!! +!!*** diff --git a/GX-PAW/common/src/10_defs/__pycache__/abinit.cpython-36.pyc b/GX-PAW/common/src/10_defs/__pycache__/abinit.cpython-36.pyc new file mode 100644 index 00000000..6747edc2 Binary files /dev/null and b/GX-PAW/common/src/10_defs/__pycache__/abinit.cpython-36.pyc differ diff --git a/GX-PAW/common/src/10_defs/abinit.dep b/GX-PAW/common/src/10_defs/abinit.dep new file mode 100644 index 00000000..31d9d70a --- /dev/null +++ b/GX-PAW/common/src/10_defs/abinit.dep @@ -0,0 +1,11 @@ +# Dependencies (inside the directory) of directory 10_defs +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. + +CLEANFILES += \ + defs_basis.$(MODEXT) \ + defs_datatypes.$(MODEXT) + +defs_datatypes.$(OBJEXT): defs_basis.$(OBJEXT) \ No newline at end of file diff --git a/GX-PAW/common/src/10_defs/abinit.dir b/GX-PAW/common/src/10_defs/abinit.dir new file mode 100644 index 00000000..122a4360 --- /dev/null +++ b/GX-PAW/common/src/10_defs/abinit.dir @@ -0,0 +1,8 @@ +# Dependencies (outside the directory) of directory 10_defs +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. + +include_dirs = \ +['10_defs'] \ No newline at end of file diff --git a/GX-PAW/common/src/10_defs/abinit.src b/GX-PAW/common/src/10_defs/abinit.src new file mode 100644 index 00000000..7b028440 --- /dev/null +++ b/GX-PAW/common/src/10_defs/abinit.src @@ -0,0 +1,25 @@ +# -*- Python -*- +# +# Copyright (C) 2005-2024 ABINIT Group (Yann Pouillon) +# +# This file is part of the ABINIT software package. For license information, +# please see the COPYING file in the top-level directory of the ABINIT source +# distribution. +# + +# +# Source files making up the 10_defs library +# + +# Source file attributes +ABI_SRC_NIL = 0 # No attribute +ABI_SRC_BLT = 1 # The file is built by a script +ABI_SRC_DEP = 2 # The file depends on other files + +# Source files +sources = [ + "defs_basis.F90", + "defs_datatypes.F90", +] +# IMPORTANT : please use the alphabetic order in the previous list. Do NOT add the new routine names at the end of the list. +# This is important to avoid numerous conflicts at merge time. Thank you very much. Xavier. diff --git a/GX-PAW/common/src/10_defs/defs_basis.F90 b/GX-PAW/common/src/10_defs/defs_basis.F90 new file mode 100644 index 00000000..42c49814 --- /dev/null +++ b/GX-PAW/common/src/10_defs/defs_basis.F90 @@ -0,0 +1,619 @@ +!!****m* ABINIT/defs_basis +!! NAME +!! defs_basis +!! +!! FUNCTION +!! This module contains definitions for a number of named constants and +!! physical constants, as well as associated datatypes and methods. +!! +!! COPYRIGHT +!! Copyright (C) 2000-2024 ABINIT group (HM, XG,XW, EB) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! NOTES +!! Of the named constants, +!! by far the most important are those that define the 'kind' types of +!! virtually all the variables used in a (well-written) FORTRAN 90 code +!! the content of this file is derived from 'Numerical Recipes in Fortran 90' +!! W.H. Press et al., volume 2 of 'Fortran Numerical Recipes', Cambridge +!! University Press, Second Edition (1996), p. 937 and 1361 +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +module defs_basis + +!#ifdef HAVE_FC_ISO_FORTRAN_2008 +! use ISO_FORTRAN_ENV, only : input_unit, output_unit, error_unit +!#endif + + implicit none + +!Keyword 'integer' stands for default integer type +!and may be used whenever integer are presumed to be small + +!nb of bytes related to an integer subtype n such as -10^(argument) < n < 10^(argument) (this is standard F90) + integer, parameter :: i1b=selected_int_kind(2) + integer, parameter :: i2b=selected_int_kind(4) + integer, parameter :: i4b=selected_int_kind(9) + integer, parameter :: i8b=selected_int_kind(18) + +!nb of bytes related to default simple-precision real/complex subtypes +!(= 4 for many machine architectures, = 8 for e.g. Cray) + integer, parameter :: sp=kind(1.0) ! Single precision should not be used + integer, parameter :: spc=kind((1.0,1.0)) + +!nb of bytes related to default double-precision real/complex subtypes +!(= 8 for many machine architectures) + integer, parameter :: dp=kind(1.0d0) + integer, parameter :: dpc=kind((1.0_dp,1.0_dp)) ! Complex should not be used presently + ! except for use of libraries + +!nb of bytes related to GW arrays, that can be tuned from sp to dp independently +!of other variables in ABINIT. Presently single-precision is the default (see config/specs/options.conf).. +#if defined HAVE_GW_DPC + integer, parameter :: gwp=kind(1.0d0) + integer, parameter :: gwpc=kind((1.0_dp,1.0_dp)) + +#else + integer, parameter :: gwp=kind(1.0) + integer, parameter :: gwpc=kind((1.0,1.0)) +#endif + +!Example: +! integer, parameter :: urp=selected_real_kind((p=)12,(r=)50) +! real((kind=)urp) :: d +! d=5.04876_urp ! for a real d with 12 significative digits +! and such as 10^-50 < |d| < 10^50 + +!To modify sp/spc and / or dp/dpc, insert instructions such as 'dp=' +! but do not modify the other declarations in this module + +!The default lengths +! TODO: We should increase fnlen to be able to handle multiple pseudos paths in the input file +! but it seems that increasing this value triggers bugs in the rest of code because people +! do not trim input strings and use character(len=500) :: msg + + integer, parameter :: fnlen=264 ! maximum length of file name variables + integer, parameter :: strlen=2000000 ! maximum length of input string + + ! The input file used to run the code, set by parsefile. + ! It will be added to the netcdf files in ntck_open_create + character(len=strlen), save :: INPUT_STRING = "" + + integer, parameter :: md5_slen = 32 ! lenght of strings storing the pseudos' md5 checksum. + character(len=md5_slen),parameter :: md5_none = "None" + +!Some constants: + +! UNIX unit numbers: standard input, standard output, ab_out, and a number for temporary access to a file. +! Please, use these named constants instead of write(*,*), +! it makes the code more readable and easier to change. + +!Default values + !integer, parameter :: std_in = input_unit + !integer, parameter :: ab_in = input_unit + !integer, parameter :: std_out_default = output_unit + !integer, parameter :: ab_out_default=7 + !integer, parameter :: std_err = error_unit + integer, parameter :: std_in=5 + integer, parameter :: ab_in=5 + integer, parameter :: std_out_default=6 + integer, parameter :: ab_out_default=7 ! TODO: This should be initialized at run-time. + integer, parameter :: std_err=0 + + integer, parameter :: dev_null=-1 ! Fake unit number used to skip the printing in wrtout. + integer, parameter :: ab_xml_out = 50 ! this unit is used to print output into an XML file + integer, parameter :: tmp_unit=9,tmp_unit2=10 + +!These vars should be private and only modifiable via an appropriate method (see below) + integer, public, save :: ab_out = ab_out_default + integer, public, save :: std_out = std_out_default +!It should be put to xmpi_world (but it is not possible for the moment - v6.9) + integer, public, save :: abinit_comm_output = -1 !This default value has to be changed at start !!! + +! the maximum length of a record in a file connected for sequential access. + integer,public,parameter :: ABI_RECL=524288 ! 2**19 + + integer,public,parameter :: MAX_NSHIFTK = 210 + ! Maximun number of shifts in input k-mesh. + +!Real dp constants + real(dp), parameter :: zero=0._dp + real(dp), parameter :: one=1._dp + real(dp), parameter :: two=2._dp + real(dp), parameter :: three=3._dp + real(dp), parameter :: four=4._dp + real(dp), parameter :: five=5._dp + real(dp), parameter :: six=6._dp + real(dp), parameter :: seven=7._dp + real(dp), parameter :: eight=8._dp + real(dp), parameter :: nine=9._dp + real(dp), parameter :: ten=10._dp + +!Real sp constants + real(sp), parameter :: zero_sp=0._sp + real(sp), parameter :: one_sp=1._sp + +!Fractionary real constants + real(dp), parameter :: half=0.50_dp + real(dp), parameter :: onehalf=1.50_dp + real(dp), parameter :: third=one/three + real(dp), parameter :: quarter=0.25_dp + real(dp), parameter :: fifth=0.20_dp + real(dp), parameter :: sixth=one/six + real(dp), parameter :: seventh=one/seven + real(dp), parameter :: eighth=0.125_dp + real(dp), parameter :: ninth=one/nine + real(dp), parameter :: two_thirds=two*third + real(dp), parameter :: four_thirds=four*third + real(dp), parameter :: five_thirds=five*third + real(dp), parameter :: three_quarters=0.75_dp + real(dp), parameter :: three_fifth=three/five + +!Real constants related to the golden number + real(dp), parameter :: gold=1.618033988749894848204586834365638117720309179_dp + real(dp), parameter :: goldenratio=two-gold + +!Real constants derived from pi + real(dp), parameter :: pi=3.141592653589793238462643383279502884197_dp + real(dp), parameter :: two_pi=two*pi + real(dp), parameter :: four_pi=four*pi + real(dp), parameter :: piinv=one/pi +!The following are not used +!real(dp), parameter :: rad_to_deg=180._dp/pi +!real(dp), parameter :: deg_to_rad=one/rad_to_deg +!real(dp), parameter :: half_pi=pi*half +!real(dp), parameter :: third_pi=pi*third +!real(dp), parameter :: quarter_pi=pi*quarter +!real(dp), parameter :: two_thirds_pi=two_thirds*pi + +!Real precision + real(dp), parameter :: greatest_real = huge(one) + real(dp), parameter :: smallest_real = -greatest_real + real(dp), parameter :: tol1= 0.1_dp + real(dp), parameter :: tol2= 0.01_dp + real(dp), parameter :: tol3= 0.001_dp + real(dp), parameter :: tol4= 0.0001_dp + real(dp), parameter :: tol5= 0.00001_dp + real(dp), parameter :: tol6= 0.000001_dp + real(dp), parameter :: tol7= 0.0000001_dp + real(dp), parameter :: tol8= 0.00000001_dp + real(dp), parameter :: tol9= 0.000000001_dp + real(dp), parameter :: tol10=0.0000000001_dp + real(dp), parameter :: tol11=0.00000000001_dp + real(dp), parameter :: tol12=0.000000000001_dp + real(dp), parameter :: tol13=0.0000000000001_dp + real(dp), parameter :: tol14=0.00000000000001_dp + real(dp), parameter :: tol15=0.000000000000001_dp + real(dp), parameter :: tol16=0.0000000000000001_dp + real(dp), parameter :: tol17=0.00000000000000010_dp + real(dp), parameter :: tol18=0.000000000000000001_dp + real(dp), parameter :: tol19=0.0000000000000000001_dp + real(dp), parameter :: tol20=0.00000000000000000001_dp + real(dp), parameter :: tol30=1.0e-30_dp + +!real constants derived from sqrt(n.) + real(dp), parameter :: sqrt2=1.4142135623730950488016887242096939_dp + real(dp), parameter :: half_sqrt2=0.70710678118654752440084436210484697_dp + real(dp), parameter :: sqrt3=1.7320508075688772935274463415058739_dp + real(dp), parameter :: half_sqrt3=0.86602540378443864676372317075293693_dp + real(dp), parameter :: sqrthalf=0.70710678118654752440084436210484697_dp + +!Conversion factors of common use, not directly related to physical quantities. + real(dp), parameter :: b2Mb=one/1024.0_dp**2 ! conversion factor bytes --> Mbytes + real(dp), parameter :: b2Gb=b2Mb/1024.0_dp ! conversion factor bytes --> Gbytes + + ! This value is used as sentinel to initialize real values that are "undefined" i.e. + ! values that cannot be computed or values that do not make any sense in a particular context + ! e.g. stress tensor in NSCF calculations. The sentinel is used the yaml routines to print "undef" instead of the + ! numerical value. + real(dp),parameter :: MAGIC_UNDEF = 9.9999999999D+99 + + ! Max Memory in Mb available for a MPI processor + ! This quantity might be used at runtime to determine how to distribute memory. + ! The default value (2Gb) can be changed at runtime via the command line interface. + real(dp), protected :: mem_per_cpu_mb = two * 1024_dp + +!Real physical constants +!Revised fundamental constants from http://physics.nist.gov/cuu/Constants/index.html +!(from 2006 least squares adjustment) + real(dp), parameter :: Bohr_Ang=0.52917720859_dp ! 1 Bohr, in Angstrom + real(dp), parameter :: Ang_Bohr = one / Bohr_Ang ! 1 Angstrom in Bohr + real(dp), parameter :: Bohr_meter=Bohr_Ang * 1.d-10 ! 1 Bohr in meter + real(dp), parameter :: Bohr_cm=Bohr_meter * 100_dp ! 1 Bohr in cm + real(dp), parameter :: Ha_cmm1=219474.6313705_dp ! 1 Hartree in cm^-1 + real(dp), parameter :: Ha_eV=27.21138386_dp ! 1 Hartree in eV + real(dp), parameter :: eV_Ha=one/Ha_eV ! 1 eV in Hartree + real(dp), parameter :: Ha_meV=Ha_eV*1000_dp ! 1 Hartree in meV + real(dp), parameter :: Ha_K=315774.65_dp ! 1Hartree in Kelvin + real(dp), parameter :: Ha_THz=6579.683920722_dp ! 1 Hartree in THz + real(dp), parameter :: Ha_s=Ha_THz*1e12*two_pi ! 1 Hartree in s + real(dp), parameter :: Ha_J=4.35974394d-18 !1 Hartree in J + real(dp), parameter :: e_Cb=1.602176487d-19 ! minus the electron charge in Coulomb + real(dp), parameter :: kb_HaK=8.617343d-5/Ha_eV ! Boltzmann constant in Ha/K + real(dp), parameter :: kb_SI=1.380649d-23 ! Boltzmann constant in Joule/K (CODATA 2017 value.) + real(dp), parameter :: kb_THzK=kb_HaK*Ha_THz ! Boltzmann constant in THz/K + real(dp), parameter :: amu_emass=1.660538782d-27/9.10938215d-31 ! 1 atomic mass unit in electronic mass + real(dp), parameter :: HaBohr3_GPa=Ha_eV/Bohr_Ang**3*e_Cb*1.0d+21 ! 1 Ha/Bohr^3 in GPa + real(dp), parameter :: Avogadro=6.02214179d23 ! per mole + real(dp), parameter :: Ohmcm=two*pi*Ha_THz*ninth*ten ! 1 Ohm.cm in atomic units +!real(dp), parameter :: eps0=8.854187817d-12 ! permittivity of free space in F/m + real(dp), parameter :: eps0=one/(four_pi*0.0000001_dp*299792458.0_dp**2) + real(dp), parameter :: AmuBohr2_Cm2=e_Cb*1.0d20/(Bohr_Ang*Bohr_Ang) + real(dp), parameter :: InvFineStruct=137.035999679_dp ! Inverse of fine structure constant + real(dp), parameter :: FineStructureConstant=0.0072973525664_dp ! 2014 CODATA value + real(dp), parameter :: FineStructureConstant2=0.000053251354478_dp ! Square of fine structure constant + real(dp), parameter :: Sp_Lt_SI=2.99792458d8 ! speed of light in SI + real(dp), parameter :: Sp_Lt=Sp_lt_SI/2.1876912633d6 ! speed of light in atomic units + real(dp), parameter :: Time_Sec=2.418884326505D-17 ! Atomic unit of time in seconds + real(dp), parameter :: BField_Tesla=4.254383d-6 ! Tesla in a.u. + real(dp), parameter :: dipole_moment_debye=0.393430307_dp ! Debye unit in a.u. + real(dp), parameter :: siemens_SI=e_Cb**2 / Ha_J / Time_Sec ! Siemens in SI: A/V = C^2 / (J * s) + real(dp), parameter :: volt_SI=Ha_J/e_Cb ! Volt in SI: J/C +!EB suppress *0.5_dp ! Atomic unit of induction field (in Tesla) * mu_B (in atomic units). + real(dp), parameter :: mu_B_SI=9.274009994D-24 ! Bohr magneton in SI + real(dp), parameter :: mu_B = 0.5_dp ! Bohr magneton in atomic units + +!Complex constants + !double precision + complex(dpc), parameter :: czero = (0._dp,0._dp) + complex(dpc), parameter :: cone = (1._dp,0._dp) + complex(dpc), parameter :: ctwo = (2._dp,0._dp) + complex(dpc), parameter :: j_dpc = (0._dp,1.0_dp) + + ! single-precision + complex(spc), parameter :: czero_sp = (0._sp,0._sp) + complex(spc), parameter :: cone_sp = (1._sp,0._sp) + complex(spc), parameter :: ctwo_sp = (2._sp,0._sp) + complex(spc), parameter :: j_sp = (0._sp,1.0_sp) + +!Pauli matrix + complex(dpc), parameter :: pauli_mat(2,2,0:3) = reshape([cone,czero,czero,cone, & + czero,cone,cone,czero,& + czero,j_dpc,-j_dpc,czero,& + cone,czero,czero,-cone], [2,2,4]) + +!Character constants + character(len=1), parameter :: ch10 = char(10) + character(len=fnlen),parameter :: ABI_NOFILE="__None__" + + ! File used to dump the error message in m_error. + ! Extremely useful when we run on many CPUs since logging, in this case, is automatically disabled + ! As a consequence, we get error messages in the main log only if the problem is encoutered by the master node! + ! Note that the file is removed in xmpi_init (if present). + character(len=fnlen),parameter :: ABI_MPIABORTFILE="__ABI_MPIABORTFILE__" + + ! Error codes used by the bindings. + integer, parameter, public :: AB7_NO_ERROR = 0 + integer, parameter, public :: AB7_ERROR_OBJ = 1 + integer, parameter, public :: AB7_ERROR_ARG = 2 + integer, parameter, public :: AB7_ERROR_INVARS_ATT = 3 + integer, parameter, public :: AB7_ERROR_INVARS_ID = 4 + integer, parameter, public :: AB7_ERROR_INVARS_SIZE = 5 + integer, parameter, public :: AB7_ERROR_SYM_NOT_PRIMITIVE = 6 + integer, parameter, public :: AB7_ERROR_SYM_BRAVAIS_XRED = 7 + integer, parameter, public :: AB7_ERROR_MIXING_ARG = 8 + integer, parameter, public :: AB7_ERROR_MIXING_CONVERGENCE = 9 + integer, parameter, public :: AB7_ERROR_MIXING_INTERNAL = 10 + integer, parameter, public :: AB7_ERROR_MIXING_INC_NNSLOOP = 11 + +! Values of optdriver corresponding to the different run-levels. + integer, parameter, public :: RUNL_GSTATE = 0 + integer, parameter, public :: RUNL_RESPFN = 1 + integer, parameter, public :: RUNL_SCREENING = 3 + integer, parameter, public :: RUNL_SIGMA = 4 + integer, parameter, public :: RUNL_NONLINEAR = 5 + integer, parameter, public :: RUNL_GWR = 6 + integer, parameter, public :: RUNL_EPH = 7 + integer, parameter, public :: RUNL_WFK = 8 + integer, parameter, public :: RUNL_RTTDDFT = 9 + integer, parameter, public :: RUNL_GWLS = 66 + integer, parameter, public :: RUNL_BSE = 99 + integer, parameter, public :: RUNL_LONGWAVE = 10 + + ! Integer flags defining the task to be performed in wfk_analyze + integer,public,parameter :: WFK_TASK_NONE = 0 + integer,public,parameter :: WFK_TASK_FULLBZ = 1 + integer,public,parameter :: WFK_TASK_CLASSIFY = 2 + integer,public,parameter :: WFK_TASK_PAW_AEPSI = 3 + integer,public,parameter :: WFK_TASK_EINTERP = 4 + integer,public,parameter :: WFK_TASK_DDK = 5 + integer,public,parameter :: WFK_TASK_DDK_DIAGO = 6 + integer,public,parameter :: WFK_TASK_OPTICS_FULLBZ = 7 + integer,public,parameter :: WFK_TASK_KPTS_ERANGE= 8 + integer,public,parameter :: WFK_TASK_CHECK_SYMTAB = 9 + +! Flags defining the method used for performing IO (input variable iomode) + integer, parameter, public :: IO_MODE_FORTRAN_MASTER = -1 + integer, parameter, public :: IO_MODE_FORTRAN = 0 + integer, parameter, public :: IO_MODE_MPI = 1 + integer, parameter, public :: IO_MODE_NETCDF = 2 ! Only for legacy code, should not be used for new implementations. + integer, parameter, public :: IO_MODE_ETSF = 3 + +! FFT libraries (correspond to fftalga = ngfft(7)/100) + integer,parameter,public :: FFT_SG = 1 + integer,parameter,public :: FFT_FFTW3 = 3 + integer,parameter,public :: FFT_SG2002 = 4 + integer,parameter,public :: FFT_DFTI = 5 + +! Parameters for non-local algorithm (were previously stored in nloalg(3) and nloalg(4) + integer,parameter,public :: NLO_MBLKPW = 199 + integer,parameter,public :: NLO_MINCAT = 10 + +! This is used to compute the maximum index of the perturbation as natom + MPERT_MAX +! GA: But this is not actually the maximum perturbation, +! see m_dfpt_loopert + integer,parameter,public :: MPERT_MAX = 8 + +! Parameters for the GPU implementation(s) + ! GPU implementation undetermined + integer,parameter,public :: ABI_GPU_UNKNOWN =-1 + ! Not using any GPU implementation, implies running on CPU + integer,parameter,public :: ABI_GPU_DISABLED = 0 + ! Legacy GPU implementation relying on NVIDIA CUDA kernels, not prefered + integer,parameter,public :: ABI_GPU_LEGACY = 1 + ! GPU implementation relying on OpenMP v5 "TARGET" construct + integer,parameter,public :: ABI_GPU_OPENMP = 2 + ! GPU implementation relying on Kokkos + cuda framework + integer,parameter,public :: ABI_GPU_KOKKOS = 3 + ! Please note that a GPU linalg library supported in gpu_toolbox (ie: CUDA) backs up OpenMP and Kokkos variants. + +!Parameters for LOG/STATUS files treatment +!This variables tell the code if some lines have to be written in a LOG/STATUS file + logical, public, save :: do_write_log =.true. + logical, public, save :: do_write_status=.true. +! Max. numbers of CPU core for the writing of LOG/STATUS file for each CPU +! (if more than NPROC_NO_EXTRA_LOG cpu core are used, no *_LOG_Pxxx is written; +! the same for the *_STATUS_Pxxx file) + integer, parameter, public :: NPROC_NO_EXTRA_LOG = 2 !@WC + integer, parameter, public :: NPROC_NO_EXTRA_STATUS = 2 !@WC +!Name of the file that (if present in current directory) +!will avoid creation of LOG/STATUS files + character(len=fnlen),parameter :: ABI_NO_LOG_FILE="_NOLOG" +!Name of the file that (if present in current directory) +!will enforce creation of LOG/STATUS files + character(len=fnlen),parameter :: ABI_ENFORCE_LOG_FILE="_LOG" +!Name of the file that (if present in current directory) +!will enforce creation of LOG file only for master proc + character(len=fnlen),parameter :: ABI_MAIN_LOG_FILE="_MAINLOG" + +! Arrays + integer,parameter :: identity_3d(3,3) = reshape([1,0,0,0,1,0,0,0,1], [3,3]) + integer,parameter :: inversion_3d(3,3) = reshape([-1,0,0,0,-1,0,0,0,-1], [3,3]) + +!A collection of small datatypes for ragged arrays +!A small datatype for ragged real 1D-arrays + type coeff1_type + real(dp), allocatable :: value(:) + end type coeff1_type +!A small datatype for ragged integer 1D-arrays + type coeffi1_type + !integer :: size + integer, allocatable :: value(:) + end type coeffi1_type +!A small datatype for ragged integer 2D-arrays + type coeffi2_type + integer :: size + integer, allocatable :: value(:,:) + end type coeffi2_type +!A small datatype for ragged real 2D-arrays + type coeff2_type + real(dp), allocatable :: value(:,:) + end type coeff2_type +!A small datatype for ragged complex 2D-arrays + type coeff2c_type + complex(dpc), allocatable :: value(:,:) + end type coeff2c_type +!A small datatype for ragged real 3D-arrays + type coeff3_type + real(dp), allocatable :: value(:,:,:) + end type coeff3_type +!A small datatype for ragged real 4D-arrays + type coeff4_type + real(dp), allocatable :: value(:,:,:,:) + end type coeff4_type +!A small datatype for ragged real 5D-arrays + type coeff5_type + real(dp), allocatable :: value(:,:,:,:,:) + end type coeff5_type +!A small datatype for ragged real 6D-arrays + type coeff6_type + real(dp), allocatable :: value(:,:,:,:,:,:) + end type coeff6_type +!A small datatype for ragged real 7D-arrays. + type coeff7_type + real(dp), allocatable :: value(:,:,:,:,:,:,:) + end type coeff7_type + +CONTAINS !============================================================================== +!!*** + +!!****f* defs_basis/abi_log_status_state +!! NAME +!! abi_log_status_state +!! +!! FUNCTION +!! Change values of do_write_log and do_write_status flags. +!! These flags tell the code to write (or not) a LOG/STATUS file. +!! +!! INPUTS +!! new_do_write_log=new value for do_write_log +!! new_do_write_status=new value for do_write_status +!! +!! SOURCE + +subroutine abi_log_status_state(new_do_write_log,new_do_write_status) + +!Arguments ------------------------------------ + logical,optional,intent(in) :: new_do_write_log,new_do_write_status + +!************************************************************************ + + if (PRESENT(new_do_write_log)) do_write_log =new_do_write_log + if (PRESENT(new_do_write_status)) do_write_status=new_do_write_status + +end subroutine abi_log_status_state +!!*** + +!---------------------------------------------------------------------- + +!!****f* defs_basis/abi_io_redirect +!! NAME +!! abi_io_redirect +!! +!! FUNCTION +!! Redirect unit numbers (and|or) change the MPI communicator for the IO (output and log file). +!! This routine can be used in client code (e.g. bigdft) +!! that wants to call the abinit routines packed in an external library. +!! +!! INPUTS +!! new_ab_out=new value for output file unit +!! new_std_out=new value for standard output unit +!! new_io_comm=new value for IO MPI communicator +!! +!! SOURCE + +subroutine abi_io_redirect(new_ab_out,new_std_out,new_io_comm) + +!Arguments ------------------------------------ + integer,optional,intent(in) :: new_std_out,new_ab_out,new_io_comm + +!************************************************************************ + + if (PRESENT(new_ab_out)) ab_out = new_ab_out + if (PRESENT(new_std_out)) std_out = new_std_out + if (PRESENT(new_io_comm)) abinit_comm_output = new_io_comm + +end subroutine abi_io_redirect +!!*** + +!---------------------------------------------------------------------- + +!!****f* defs_basis/print_kinds +!! NAME +!! print_kinds +!! +!! FUNCTION +!! Prints info on the basic data types, e.g. kind, precision... +!! +!! INPUTS +!! unit = Unit number for output file. +!! +!! SOURCE + +subroutine print_kinds(unit) + +!Arguments------------------------------------- + integer,optional,intent(in) :: unit + +!Local variables------------------------------- + integer :: my_unt + +! ********************************************************************* + + my_unt=std_out; if (PRESENT(unit)) my_unt = unit + + write(my_unt,'(a)')' DATA TYPE INFORMATION: ' + + write(my_unt,'(a,/,2(a,i6,/),2(a,e16.8e3,/),a,e16.8e3)')& + ' REAL: Data type name: REAL(DP) ',& + ' Kind value: ',KIND(0.0_dp),& + ' Precision: ',PRECISION(0.0_dp),& + ' Smallest nonnegligible quantity relative to 1: ',EPSILON(0.0_dp),& + ' Smallest positive number: ',TINY(0.0_dp),& + ' Largest representable number: ',HUGE(0.0_dp) + + write(my_unt,'(a,/,2(a,i0,/),a,i0)')& + ' INTEGER: Data type name: INTEGER(default) ', & + ' Kind value: ',KIND(0), & + ' Bit size: ',BIT_SIZE(0), & + ' Largest representable number: ',HUGE(0) + + write(my_unt,'(a,/,a,i0)')& + ' LOGICAL: Data type name: LOGICAL ',& + ' Kind value: ',KIND(.TRUE.) + + write(my_unt,'(2a,i0)')& + ' CHARACTER: Data type name: CHARACTER ',& + ' Kind value: ',KIND('C') + +end subroutine print_kinds +!!*** + +!!****f* defs_basis/str2wfktask +!! NAME +!! str2wfktask +!! +!! FUNCTION +!! Convert a string into one of the integer flags WFK_TASK_* +!! Return WFK_TASK_NONE if string is invalid. +!! +!! SOURCE + +integer pure function str2wfktask(str) result(wfk_task) + +!Arguments ------------------------------------ + character(len=*),intent(in) :: str + +!************************************************************************ + + select case (str) + case ("wfk_fullbz") + wfk_task = WFK_TASK_FULLBZ + case ("classify") + wfk_task = WFK_TASK_CLASSIFY + case ("paw_aepsi") + wfk_task = WFK_TASK_PAW_AEPSI + case ("wfk_einterp") + wfk_task = WFK_TASK_EINTERP + case ("wfk_ddk") + wfk_task = WFK_TASK_DDK + case ("wfk_ddk_diago") + wfk_task = WFK_TASK_DDK_DIAGO + case ("wfk_kpts_erange") + wfk_task = WFK_TASK_KPTS_ERANGE + case ("optics_fullbz", "wfk_optics_fullbz") + wfk_task = WFK_TASK_OPTICS_FULLBZ + case ("check_symtab") + wfk_task = WFK_TASK_CHECK_SYMTAB + case default + wfk_task = WFK_TASK_NONE + end select + +end function str2wfktask +!!*** + +!---------------------------------------------------------------------- + +!!****f* defs_basis/set_mem_per_cpu_mb +!! NAME +!! set_mem_per_cpu_mb +!! +!! FUNCTION +!! Set the value of global variable `mem_per_cpu_mb` +!! +!! SOURCE + +subroutine set_mem_per_cpu_mb(mem_mb) + +!Arguments------------------------------------- + real(dp),intent(in) :: mem_mb + +! ********************************************************************* + + !print *, "Setting mem_per_cpu_mb to", mem_mb + mem_per_cpu_mb = mem_mb + +end subroutine set_mem_per_cpu_mb +!!*** + +!---------------------------------------------------------------------- + +end module defs_basis +!!*** diff --git a/GX-PAW/common/src/10_defs/defs_basis.o b/GX-PAW/common/src/10_defs/defs_basis.o new file mode 100644 index 00000000..72058761 Binary files /dev/null and b/GX-PAW/common/src/10_defs/defs_basis.o differ diff --git a/GX-PAW/common/src/10_defs/defs_datatypes.F90 b/GX-PAW/common/src/10_defs/defs_datatypes.F90 new file mode 100644 index 00000000..03c0ac79 --- /dev/null +++ b/GX-PAW/common/src/10_defs/defs_datatypes.F90 @@ -0,0 +1,637 @@ +!!****m* ABINIT/defs_datatypes +!! NAME +!! defs_datatypes +!! +!! FUNCTION +!! This module contains definitions important structured datatypes for the ABINIT package. +!! If you want to add one new datatype, please, examine first whether +!! another datatype might meet your need (e.g. adding some records to it). +!! Then, if you are sure your new structured datatype is needed, +!! write it here, and DOCUMENT it properly (not all datastructure here are +!! well documented, it is a shame ...). +!! Do not forget: you will likely be the major winner if you document properly. +!! Proper documentation of a structured datatype means: +!! +!! (1) Mention it in the list just below +!! (2) Describe it in the NOTES section +!! (3) Put it in alphabetical order in the the main section of this module +!! (4) Document each of its records, except if they are described elsewhere +!! (this exception is typically the case of the dataset associated with +!! input variables, for which there is a help file) +!! +!! List of datatypes: +!! * ebands_t: different information about the band structure +!! * pseudopotential_type: for norm-conserving pseudopotential, all the information +!! * pspheader_type: for norm-conserving pseudopotentials, the header of the file +!! +!! COPYRIGHT +!! Copyright (C) 2001-2024 ABINIT group (XG) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" + +module defs_datatypes + + use defs_basis + + implicit none +!!*** + +!---------------------------------------------------------------------- + +!!****t* defs_datatypes/ebands_t +!! NAME +!! ebands_t +!! +!! FUNCTION +!! It contains different information about the band structure: eigenenergies, residuals, derivative of occupation +!! numbers vs energy in case of metallic occupations and Brillouin zone according to the context: k points, +!! occupation numbers, storage mode of wavefunctions, weights ... +!! For example, the initial Brillouin zone, set up in the dataset, will be treated in the response function part of +!! the code, to give a reduced Brillouin zone different from the original one, due to the breaking of the symmetries +!! related to the existence of a wavevector, or the lack of time-reversal invariance. +!! +!! SOURCE + + type ebands_t + + integer :: bantot ! Total number of bands (sum(nband(:)) + integer :: ivalence ! Highest valence band index (useful when occopt=9 only) + integer :: mband ! Max number of bands i.e MAXVAL(nband) (to dimension arrays) + integer :: nkpt ! Number of k points + integer :: nspinor ! 1 for collinear, 2 for noncollinear. + integer :: nsppol ! Number of spin-polarizations + integer :: ntemp ! Number of temperatures + integer :: occopt ! Occupation option, see input variable. + + real(dp) :: entropy ! Entropy associated with the smearing (adimensional) + real(dp) :: fermie ! Fermi energy ! CP: when occopt = 9, fermi energy of the quasi-FD distribution of excited +! electrons in the conduction bands above ivalence + real(dp) :: fermih ! Fermi energy of the excited holes in the valence bands <= ivalence (occopt = 9 only) + real(dp) :: nelect ! Number of electrons. + real(dp) :: ne_qFD ! Number of electrons excited in the bands > ivalence (occopt = 9 only) + real(dp) :: nh_qFD ! Number of holes excited in the bands <=ivalence (occopt = 9 only) + real(dp) :: tphysel ! Physical temperature of electrons. + real(dp) :: tsmear ! Temperature of smearing. + !real(dp) :: max_occ ! Spin degeneracy factor: max_occ = two / (self%nspinor * self%nsppol) + + !real(dp) :: spinmagntarget + ! TODO This should be set via dtset%spinmagntarget to simplify the API. + + integer,allocatable :: istwfk(:) + ! istwfk(nkpt) + ! Storage mode at each k point. + + integer,allocatable :: nband(:) + ! nband(nkpt*nsppol) + ! Number of bands at each k point and spin-polarisation. + + integer,allocatable :: npwarr(:) + ! npwarr(nkpt) + ! Number of plane waves at each k point. + + real(dp),allocatable :: kptns(:,:) + ! kptns(3,nkpt) + ! k-point vectors. + + real(dp),allocatable :: eig(:,:,:) + ! eig(mband,nkpt,nsppol) + ! Eigenvalues of each band. + + real(dp),allocatable :: linewidth(:,:,:,:) + ! linewidth(itemp,mband,nkpt,nsppol) + ! Linewidth of each band + ! MG: TODO: This array should be removed (I think Yannick introduced it, see also Ktmesh) + + real(dp),allocatable :: occ(:,:,:) + ! occ(mband, nkpt, nsppol) + ! occupation of each band. + + real(dp),allocatable :: doccde(:,:,:) + ! doccde(mband, nkpt, nsppol) + ! derivative of the occupation of each band wrt energy (needed for RF). + + real(dp),allocatable :: wtk(:) + ! wtk(nkpt) + ! weight of each k point, normalized to one. + + integer :: kptopt + ! Option used for k-point generation. + + integer :: nshiftk_orig, nshiftk + ! original number of shifts given in input and the actual value (changed in inkpts) + + real(dp) :: cellcharge + ! nelect = zion - cellcharge + ! Extra charge added to the unit cell when performing GS calculations + ! To treat a system missing one electron per unit cell, charge is set to +1. + ! When reading the band structure from an external file, + ! charge is mainly used as metadata describing the GS calculation that procuded the ebands_t object. + ! To simulate doping in a post-processing tool, use ebands_set_extrael that defines the value of %extra_el. + ! and changes %nelect, accordingly. + + real(dp) :: extrael = zero + ! Extra number of electrons. + ! This variable is mainly used to simulate doping in the rigid band approximation. + ! Set by ebands_set_extrael method. + + integer :: kptrlatt_orig(3,3), kptrlatt(3,3) + ! Original value of kptrlatt and value after the call to inkpts + + real(dp),allocatable :: shiftk_orig(:,:) + ! shiftk_orig(3, nshiftk_orig) + ! original shifts given in input (changed in inkpts). + + real(dp),allocatable :: shiftk(:,:) + ! shiftk(3, nshiftk) + + end type ebands_t +!!*** + +!---------------------------------------------------------------------- + +!!****t* defs_datatypes/pseudopotential_gth_type +!! NAME +!! pseudopotential_gth_type +!! +!! FUNCTION +!! This structure is a sub-structure of pseudopotential_type used to +!! store parameters from the GTH pseudo-potentials. All arrays have +!! indices running on 1:npsp for each read pseudo-file. The 'set' array +!! is a check array, since several different pseudo can be used in a simulation +!! it set a flag for each npsp if params have been set or not. This is +!! redundant with psps%pspcod in the way that when psps%pspcod(i) is 2, +!! then gth_params%set(i) is .true.. GTH pseudo previous to wavelets introduction +!! doesn't have geometric information. These have been added on the last line. +!! It is three radius information, the %hasGeometry flag is there to know +!! which kind of pseudo has been read. +!! +!! SOURCE + + type pseudopotential_gth_type + +! WARNING: if you modify this datatype, please check whether there might be creation/destruction/copy routines, +! declared in another part of ABINIT, that might need to take into account your modification. + + real(dp), allocatable :: psppar(:, :, :) + ! These are {rloc, C(1...4)} coefficients for psppar(0, :, :) indices, + ! Followed by the h coefficients for psppar(1:2, :, :) indices. + ! size (0:2, 0:4, npsp) + + real(dp), allocatable :: radii_cf(:, :) + ! Cut-off radii for core part and long-range part. + ! radii_cf(:, 1) is for the long-range cut-off and + ! radii_cf(:, 2) is for the core cut-off. size (npsp, 2) + + real(dp), allocatable :: psp_k_par(:, :, :) + ! Spin orbit coefficients in HGH/GTH formats: k11p etc... see psp3ini.F90 + ! dimension = num l channels, 3 coeffs, num psp = (1:lmax+1,1:3,npsp) + + logical, allocatable :: hasGeometry(:) + ! Flag for geometric information in the pseudo. size (npsp) + + logical, allocatable :: set(:) + ! Consistency array, used for checking size (npsp) + + end type pseudopotential_gth_type +!!*** + +!---------------------------------------------------------------------- + +!!****t* defs_datatypes/nctab_t +!! NAME +!! nctab_type +!! +!! FUNCTION +!! This object contains TABulated data for NC pseudopotentials +!! It follows the conventions used in pawtab so that we can reuse +!! the PAW routines for the treatment of model core change as well +!! as the code in the atm2fft routines used to build approximated densities +!! from atomic quantities. Methods are defined in m_psps. +!! +!! SOURCE + + type,public :: nctab_t + + integer :: mqgrid_vl = 0 + ! Number of points in the reciprocal space grid on which + ! the radial functions are specified (same grid as the one used for the local part). + + ! TODO + !integer :: mqgrid_ff = 0 + + logical :: has_tvale = .False. + ! True if the norm-conserving pseudopotential provides the atomic pseudized valence density. + ! If alchemy, has_tvale is True only if all the mixed pseudos + ! have the valence charge in the pseudopotential file. + + logical :: has_tcore = .False. + ! True if the norm-conserving pseudopotential has the model core-charge for NLCC. + ! If alchemy, has_tcore is True if at least one of the mixed pseudos has NLCC. + ! See also tcorespl + + real(dp) :: dncdq0 = zero + ! Gives 1/q d(tNcore(q))/dq for q=0 + ! (tNcore(q) = FT of pseudo core density) + + real(dp) :: d2ncdq0 = zero + ! Gives contribution of d2(tNcore(q))/d2q for q=0 + ! \int{(16/15)*pi^5*n(r)*r^6* dr} + ! (tNcore(q) = FT of pseudo core density) + + real(dp) :: dnvdq0 = zero + ! Gives 1/q d(tNvale(q))/dq for q=0 + ! (tNvale(q) = FT of pseudo valence density) + + real(dp), allocatable :: tvalespl(:,:) + ! tvalespl(mqgrid_vl,2) + ! Gives the pseudo valence density in reciprocal space on a regular grid + ! Initialized only if has_nctvale(itypat) + + real(dp), allocatable :: tcorespl(:,:) + ! tcorespl(mqgrid_vl,2) + ! Gives the pseudo core density in reciprocal space on a regular grid. + ! tcorespl is **always** allocated and initialized with zeros if not has_tcore + ! A similar approach is used in PAW. + + integer :: num_tphi = 0 + ! Number of pseudo atomic orbitals. 0 if pseudo does not provide them + + logical :: has_jtot = .False. + ! True if tpsi are given in terms of j (relativistic pseudo with SOC) + + real(dp), allocatable :: tphi_qspl(:,:,:) + ! (mqgrid_ff, 2, num_tphi) + ! Form factors for the pseudo wavefunctions. + + integer,allocatable :: tphi_n(:), tphi_l(:) + ! (num_tphi) arrays giving n, l + + real(dp),allocatable :: tphi_jtot(:) + ! (num_tphi) array with jtot. + + real(dp),allocatable :: tphi_occ(:) + ! (num_tphi) array with atomic occupancies taken from pseudo. + + end type nctab_t +!!*** + +!---------------------------------------------------------------------- + +!!****t* defs_datatypes/pseudopotential_type +!! NAME +!! pseudopotential_type +!! +!! FUNCTION +!! This structured datatype contains all the information about one +!! norm-conserving pseudopotential, including the description of the local +!! and non-local parts, the different projectors, the non-linear core correction ... +!! +!! SOURCE + + type pseudopotential_type + +! WARNING: if you modify this datatype, please check whether there might be creation/destruction/copy routines, +! declared in another part of ABINIT, that might need to take into account your modification. + +! Integer scalars + integer :: dimekb + ! Dimension of Ekb + ! ->Norm conserving : Max. number of Kleinman-Bylander energies for each atom type + ! dimekb=lnmax (lnmax: see this file) + ! ->PAW : Max. number of Dij coefficients connecting projectors for each atom type + ! dimekb=lmnmax*(lmnmax+1)/2 (lmnmax: see this file) + + integer :: lmnmax + ! If useylm=0, max number of (l,n) comp. over all type of psps (lnproj) + ! If useylm=1, max number of (l,m,n) comp. over all type of psps (lmnproj) + ! If mpspso is 2, lmnmax takes into account the spin-orbit projectors, + ! so, it is equal to the max of lmnprojso or lnprojso, see pspheader_type + + integer :: lnmax + ! Max. number of (l,n) components over all type of psps + ! If mpspso is 2, lmnmax takes into account the spin-orbit projectors, + ! so, it is equal to the max of lnprojso, see pspheader_type + + integer :: mproj + ! Maximum number of non-local projectors over all angular momenta and type of psps + ! 0 only if all psps are local + + integer :: mpsang + ! Highest angular momentum of non-local projectors over all type of psps. + ! shifted by 1: for all local psps, mpsang=0; for largest s, mpsang=1, + ! for largest p, mpsang=2; for largest d, mpsang=3; for largest f, mpsang=4 + ! This gives also the number of non-local "channels" + + integer :: mpspso + ! mpspso is set to 1 if none of the psps is used with a spin-orbit part (that + ! is, if the user input variable so_psp is not equal to 1 in at least one case + ! otherwise, it is set to 2 + + integer :: mpssoang + ! Maximum number of channels, including those for treating the spin-orbit coupling + ! when mpspso=1, mpssoang=mpsang + ! when mpspso=2, mpssoang=2*mpsang-1 + + integer :: mqgrid_ff + ! Number of points in the reciprocal space grid on which + ! the radial functions ffspl are specified + + integer :: mqgrid_vl + ! Number of points in the reciprocal space grid on which + ! the radial functions vlspl are specified + + integer :: mtypalch + ! Maximum number of alchemical pseudo atoms. If non-zero, + ! the mechanism to generate mixing of pseudopotentials is activated + + integer :: npsp + ! Number of types of pseudopotentials + + integer :: npspalch + ! Number of types of pseudopotentials used for alchemical purposes + + integer :: ntypat + ! Number of types of atoms (might be alchemy wrt pseudopotentials) + + integer :: ntypalch + ! Number of types of alchemical pseudoatoms + + integer :: ntyppure + ! Number of types of pure pseudoatoms + + integer :: n1xccc + ! Number of radial points for the description of the pseudo-core charge + ! (in the framework of the non-linear XC core correction) + + integer :: optnlxccc + ! Option for the choice of non-linear XC core correction treatment (see the input variable) + ! Used only for FHI pseudos. + + integer :: positron + ! Option for the choice of type of GS calculation (electron or positron) + + integer :: usepaw + ! if usepaw=0 , use norm-conserving psps part of the code + ! is usepaw=1 , use paw part of the code + + integer :: usewvl + ! if usewvl=0 , plane waves + ! is usewvl=1 , wavelets + + integer :: useylm + ! governs the way the nonlocal operator is to be applied: + ! 1=using Ylm, 0=using Legendre polynomials + +! Logical scalars + logical :: vlspl_recipSpace + ! governs if vlspl is compute in reciprocal space or in real + ! space (when available). + +! Integer arrays + integer, allocatable :: algalch(:) + ! algalch(ntypalch) + ! For each type of pseudo atom, the algorithm to mix the pseudopotentials + + integer, allocatable :: indlmn(:,:,:) + ! indlmn(6,lmnmax,ntypat) + ! For each type of psp, + ! array giving l,m,n,lm,ln,spin for i=ln (if useylm=0) + ! or i=lmn (if useylm=1) + ! NB: spin is used for NC pseudos with SOC term: 1 if scalar term (spin diagonal), 2 if SOC term. + + integer, allocatable :: pspdat(:) + ! pspdat(ntypat) + ! For each type of psp, the date of psp generation, as given by the psp file + + integer, allocatable :: pspcod(:) + ! pspcod(npsp) + ! For each type of psp, the format -or code- of psp generation, + ! as given by the psp file + + integer, allocatable :: pspso(:) + ! pspso(npsps) + ! For each type of psp, + ! 1 if no spin-orbit component is taken into account + ! 2 if a spin-orbit component is used + + integer, allocatable :: pspxc(:) + ! pspxc(npsps) + ! For each type of psp, the XC functional that was used to generate it, + ! as given by the psp file + +! Real (real(dp)) arrays + + real(dp), allocatable :: ekb(:,:) + ! ekb(dimekb,ntypat*(1-usepaw)) + ! NORM-CONSERVING PSPS ONLY: + ! (Real) Kleinman-Bylander energies (hartree) + ! for number of basis functions (l,n) (lnmax) + ! and number of atom types (ntypat) + ! NOTE (MT): + ! ekb (norm-conserving) is now diagonal (one dimension lnmax); + ! it would be easy to give it a second (symmetric) dimension by putting + ! dimekb=lnmax*(lnmax+1)/2 in the place of dimekb=lmnmax. + + real(dp), allocatable :: ffspl(:,:,:,:) + ! ffspl(mqgrid_ff,2,lnmax,ntypat) + ! Gives, on the radial grid, the different non-local projectors, + ! in both the norm-conserving case, and the PAW case + + real(dp), allocatable :: mixalch(:,:) + ! mixalch(npspalch,ntypalch) + ! Mixing coefficients to generate alchemical pseudo atoms + + real(dp), allocatable :: qgrid_ff(:) + ! qgrid_ff(mqgrid_ff) + ! The coordinates of all the points of the radial grid for the nl form factors + + real(dp), allocatable :: qgrid_vl(:) + ! qgrid_vl(mqgrid_vl) + ! The coordinates of all the points of the radial grid for the local part of psp + + real(dp), allocatable :: vlspl(:,:,:) + ! vlspl(mqgrid_vl,2,ntypat) + ! Gives, on the radial grid, the local part of each type of psp. + + real(dp), allocatable :: dvlspl(:,:,:) + ! dvlspl(mqgrid_vl,2,ntypat) + ! Gives, on the radial grid, the first derivative of the local + ! part of each type of psp (computed when the flag 'vlspl_recipSpace' is true). + + real(dp), allocatable :: xcccrc(:) + ! xcccrc(ntypat) + ! Gives the maximum radius of the pseudo-core charge, for each type of psp. + + real(dp), allocatable :: xccc1d(:,:,:) + ! xccc1d(n1xccc*(1-usepaw),6,ntypat) + ! Norm-conserving psps only + ! The component xccc1d(n1xccc,1,ntypat) is the pseudo-core charge + ! for each type of atom, on the radial grid. The components + ! xccc1d(n1xccc,ideriv,ntypat) give the ideriv-th derivative of the + ! pseudo-core charge with respect to the radial distance. + + real(dp), allocatable :: zionpsp(:) + ! zionpsp(npsp) + ! For each pseudopotential, the ionic pseudo-charge + ! (giving raise to a long-range coulomb potential) + + real(dp), allocatable :: ziontypat(:) + ! ziontypat(ntypat) + ! For each type of atom (might be alchemy wrt psps), the ionic pseudo-charge + ! (giving raise to a long-range coulomb potential) + + real(dp), allocatable :: znuclpsp(:) + ! znuclpsp(npsp) + ! The atomic number of each pseudopotential + + real(dp), allocatable :: znucltypat(:) + ! znucltypat(ntypat) + ! The atomic number of each type of atom (might be alchemy wrt psps) + +! Character arrays + character(len=fnlen), allocatable :: filpsp(:) + ! filpsp(npsps) + ! The filename of the pseudopotential + + character(len=fnlen), allocatable :: title(:) + ! title(npsp) + ! The content of first line read from the psp file + + character(len=md5_slen), allocatable :: md5_pseudos(:) + ! md5pseudos(npsp) + ! md5 checksums associated to pseudos (read from file) + + type(pseudopotential_gth_type) :: gth_params + ! Types for pseudo-potentials that are based on parameters. Currently, only + ! GTH are supported (see pseudopotential_gth_type). To add one, one should + ! create an initialisation method and a destruction method in 02psp (see + ! psp2params.F90). These methods are called in driver(). + + type(nctab_t),allocatable :: nctab(:) + ! nctab(ntypat) + ! Tables storing additional data for NC pseudopotentials that are not always avaiable if every psp format. + ! We try to mimim pawtab as much as possible so that we can reuse PAW routines in the NC context. + + integer :: nc_xccc_gspace = 0 + ! NC pseudos only. Set to 1 if the non-linear core correction should + ! be treated in G-space similarly to the approach used for PAW. + + end type pseudopotential_type +!!*** + +!---------------------------------------------------------------------- + +!!****t* defs_datatypes/pspheader_paw_type +!! NAME +!! pspheader_paw_type +!! +!! FUNCTION +!! The pspheader_paw_type structured datatype gather additional information +!! about a PAW pseudopotential file, from its header. +!! +!! SOURCE + + type pspheader_paw_type + +! WARNING: if you modify this datatype, please check whether there might be creation/destruction/copy routines, +! declared in another part of ABINIT, that might need to take into account your modification. + +! WARNING: Also pay attention to subroutine pspheads_comm, which broadcasts this datatype. + + integer :: basis_size ! Number of elements of the wf basis ((l,n) quantum numbers) + integer :: l_size ! Maximum value of l+1 leading to a non zero Gaunt coefficient + integer :: lmn_size ! Number of elements of the paw basis + integer :: mesh_size ! Dimension of (main) radial mesh + integer :: pawver ! Version number of paw psp format + integer :: shape_type ! Type of shape function + real(dp) :: rpaw ! Radius for paw spheres + real(dp) :: rshp ! Cut-off radius of shape function + + end type pspheader_paw_type +!!*** + +!---------------------------------------------------------------------- + +!!****t* defs_datatypes/pspheader_type +!! NAME +!! pspheader_type +!! +!! FUNCTION +!! The pspheader_type structured datatype gather different information +!! about a pseudopotential file, from its header. +!! +!! SOURCE + + type pspheader_type + +! WARNING: if you modify this datatype, please check whether there might be creation/destruction/copy routines, +! declared in another part of ABINIT, that might need to take into account your modification. +! WARNING: Also pay attention to subroutine pspheads_comm, which broadcasts this datatype. + + integer :: nproj(0:3) ! number of scalar projectors for each angular momentum + + integer :: nprojso(3) ! number of spin-orbit projectors for each angular momentum + + integer :: lmax ! maximum l quantum number (-1 if only local) + ! Example : s only -> lmax=0 + ! s and p -> lmax=1 + ! s,p,d -> lmax=2 + + integer :: pspcod + ! code number of the pseudopotential + + integer :: pspdat + ! date of generation of the pseudopotential + + integer :: pspxc + ! exchange-correlation functional + + integer :: pspso + ! spin-orbit characteristics + ! 0 if pseudo does not support SOC, 1 or 2 if SOC terms are available in the pp file. + ! Note that one could have a pseudo with SOC terms but ignore the SOC contribution + ! For example, it's possible to use nspinor=2 and set so_psp to 0 in the input file + ! or perform a run with nspinor=1 with pseudos containing SOC terms. + + integer :: usewvl + ! if usewvl=0 , plane waves + ! is usewvl=1 , wavelets + + integer :: xccc + ! =0 if no XC core correction, non-zero if XC core correction + + real(dp) :: zionpsp + ! charge of the ion made of core electrons only + + real(dp) :: znuclpsp + ! atomic number of the nuclei + + real(dp) :: GTHradii(0:4) + ! Radii values for GTH (and HGH) family potentials + + character(len=fnlen) :: filpsp + ! name of the psp file + + character(len=fnlen) :: title + ! content of first line read from the psp file + + character(len=md5_slen) :: md5_checksum = md5_none + ! md5 checksum read from file. + + type(pspheader_paw_type) :: pawheader + ! only for PAW psps ; see m_pawpsp. + + end type pspheader_type +!!*** + +end module defs_datatypes +!!*** diff --git a/GX-PAW/common/src/10_defs/defs_datatypes.o b/GX-PAW/common/src/10_defs/defs_datatypes.o new file mode 100644 index 00000000..b1b21209 Binary files /dev/null and b/GX-PAW/common/src/10_defs/defs_datatypes.o differ diff --git a/GX-PAW/common/src/10_defs/lib10_defs.a b/GX-PAW/common/src/10_defs/lib10_defs.a new file mode 100644 index 00000000..11346e3a Binary files /dev/null and b/GX-PAW/common/src/10_defs/lib10_defs.a differ diff --git a/GX-PAW/common/src/11_memory_mpi/Makefile b/GX-PAW/common/src/11_memory_mpi/Makefile new file mode 100644 index 00000000..c08ebcab --- /dev/null +++ b/GX-PAW/common/src/11_memory_mpi/Makefile @@ -0,0 +1,1454 @@ +# Makefile.in generated by automake 1.16.3 from Makefile.am. +# shared/common/src/11_memory_mpi/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994-2020 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-corelibs on 2024/03/16 21:07:38 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-corelibs script or its config file instead. +# + + +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/abinit +pkgincludedir = $(includedir)/abinit +pkglibdir = $(libdir)/abinit +pkglibexecdir = $(libexecdir)/abinit +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = x86_64-apple-darwin18.7.0 +host_triplet = x86_64-apple-darwin18.7.0 +target_triplet = x86_64-apple-darwin18.7.0 +subdir = shared/common/src/11_memory_mpi +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/m4/arch-gpu.m4 \ + $(top_srcdir)/config/m4/arch-mpi.m4 \ + $(top_srcdir)/config/m4/auto-autotools.m4 \ + $(top_srcdir)/config/m4/auto-corelibs.m4 \ + $(top_srcdir)/config/m4/auto-debug.m4 \ + $(top_srcdir)/config/m4/auto-dirflags.m4 \ + $(top_srcdir)/config/m4/auto-env.m4 \ + $(top_srcdir)/config/m4/auto-hints.m4 \ + $(top_srcdir)/config/m4/auto-optim.m4 \ + $(top_srcdir)/config/m4/auto-options.m4 \ + $(top_srcdir)/config/m4/auto-output.m4 \ + $(top_srcdir)/config/m4/auto-triggers.m4 \ + $(top_srcdir)/config/m4/conf-atompaw.m4 \ + $(top_srcdir)/config/m4/conf-debug.m4 \ + $(top_srcdir)/config/m4/conf-fallbacks.m4 \ + $(top_srcdir)/config/m4/conf-files.m4 \ + $(top_srcdir)/config/m4/conf-init.m4 \ + $(top_srcdir)/config/m4/conf-openmp.m4 \ + $(top_srcdir)/config/m4/conf-optim.m4 \ + $(top_srcdir)/config/m4/lang-c++.m4 \ + $(top_srcdir)/config/m4/lang-c.m4 \ + $(top_srcdir)/config/m4/lang-fortran-import.m4 \ + $(top_srcdir)/config/m4/lang-fortran.m4 \ + $(top_srcdir)/config/m4/lang-python.m4 \ + $(top_srcdir)/config/m4/libxml2.m4 \ + $(top_srcdir)/config/m4/misc-display.m4 \ + $(top_srcdir)/config/m4/sd_abinit_common.m4 \ + $(top_srcdir)/config/m4/sd_arch_gpu.m4 \ + $(top_srcdir)/config/m4/sd_arch_mpi.m4 \ + $(top_srcdir)/config/m4/sd_bigdft.m4 \ + $(top_srcdir)/config/m4/sd_core.m4 \ + $(top_srcdir)/config/m4/sd_esl.m4 \ + $(top_srcdir)/config/m4/sd_fftw3.m4 \ + $(top_srcdir)/config/m4/sd_gpu_kokkos.m4 \ + $(top_srcdir)/config/m4/sd_gpu_yakl.m4 \ + $(top_srcdir)/config/m4/sd_io_hdf5.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf_fortran.m4 \ + $(top_srcdir)/config/m4/sd_levmar.m4 \ + $(top_srcdir)/config/m4/sd_libpaw.m4 \ + $(top_srcdir)/config/m4/sd_libpsml.m4 \ + $(top_srcdir)/config/m4/sd_libxc.m4 \ + $(top_srcdir)/config/m4/sd_math_fft.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_core.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_util.m4 \ + $(top_srcdir)/config/m4/sd_papi.m4 \ + $(top_srcdir)/config/m4/sd_pfft.m4 \ + $(top_srcdir)/config/m4/sd_triqs.m4 \ + $(top_srcdir)/config/m4/sd_wannier90.m4 \ + $(top_srcdir)/config/m4/sd_xmlf90.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +AM_V_AR = $(am__v_AR_$(V)) +am__v_AR_ = $(am__v_AR_$(AM_DEFAULT_VERBOSITY)) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = +lib11_memory_mpi_a_AR = $(AR) $(ARFLAGS) +lib11_memory_mpi_a_LIBADD = +am__objects_1 = m_profiling_abi.$(OBJEXT) +am_lib11_memory_mpi_a_OBJECTS = $(am__objects_1) +lib11_memory_mpi_a_OBJECTS = $(am_lib11_memory_mpi_a_OBJECTS) +AM_V_P = $(am__v_P_$(V)) +am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY)) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I. -I$(top_builddir) +PPFCCOMPILE = $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) +AM_V_PPFC = $(am__v_PPFC_$(V)) +am__v_PPFC_ = $(am__v_PPFC_$(AM_DEFAULT_VERBOSITY)) +am__v_PPFC_0 = @echo " PPFC " $@; +am__v_PPFC_1 = +FCLD = $(FC) +FCLINK = $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \ + $@ +AM_V_FCLD = $(am__v_FCLD_$(V)) +am__v_FCLD_ = $(am__v_FCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_FCLD_0 = @echo " FCLD " $@; +am__v_FCLD_1 = +SOURCES = $(lib11_memory_mpi_a_SOURCES) +DIST_SOURCES = $(lib11_memory_mpi_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ABINIT_BINARY_PACKAGE = abinit-10.0.0.83-58be4d_x86_64_darwin18.7.0_gnu9.4 +ABINIT_COMMON_CPPFLAGS = +ABINIT_COMMON_FCFLAGS = +ABINIT_COMMON_LDFLAGS = +ABINIT_COMMON_LIBS = +ABINIT_TARGET = x86_64_darwin18.7.0_gnu9.4 +ABINIT_VERSION = 10.0.0.83-58be4d +ABINIT_VERSION_BASE = 10.0 +ABINIT_VERSION_BUILD = 20240316 +ABINIT_VERSION_MAJOR = 10 +ABINIT_VERSION_MICRO = 0 +ABINIT_VERSION_MINOR = 0 +ABI_CPPFLAGS = -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include +ACLOCAL = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' aclocal-1.16 +AMTAR = $${TAR-tar} +AM_DEFAULT_VERBOSITY = 1 +AR = ar +ARFLAGS = rc +ARFLAGS_CMD = rc +ARFLAGS_DEBUG = +ARFLAGS_EXTRA = +ARFLAGS_HINTS = +ARFLAGS_OPTIM = +ATOMPAW_BIN = +AUTOCONF = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' autoconf +AUTOHEADER = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' autoheader +AUTOMAKE = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' automake-1.16 +AWK = awk +BIGDFT_CPPFLAGS = +BIGDFT_FCFLAGS = +BIGDFT_LDFLAGS = +BIGDFT_LIBS = +BOURNE_SHELL = /bin/sh +CC = /opt/local/bin/mpicc +CCDEPMODE = depmode=gcc3 +CC_LDFLAGS = +CC_LDFLAGS_DEBUG = +CC_LDFLAGS_EXTRA = +CC_LDFLAGS_GPU = +CC_LDFLAGS_HINTS = +CC_LDFLAGS_OPTIM = +CC_LIBS = +CC_LIBS_DEBUG = +CC_LIBS_EXTRA = +CC_LIBS_GPU = +CC_LIBS_HINTS = +CC_LIBS_OPTIM = +CFLAGS = -O2 -g +CFLAGS_DEBUG = +CFLAGS_EXTRA = +CFLAGS_GPU = +CFLAGS_HINTS = +CFLAGS_OPTIM = +CPP = /opt/local/bin/mpicc -E +CPPFLAGS = +CPPFLAGS_DEBUG = +CPPFLAGS_EXTRA = +CPPFLAGS_GPU = +CPPFLAGS_HINTS = +CPPFLAGS_HINTS_EXT = -P -std=c99 +CPPFLAGS_OPTIM = +CXX = /opt/local/bin/mpicxx +CXXDEPMODE = depmode=gcc3 +CXXFLAGS = -O2 -g +CXXFLAGS_DEBUG = +CXXFLAGS_EXTRA = +CXXFLAGS_GPU = +CXXFLAGS_HINTS = +CXXFLAGS_OPTIM = +CXX_LDFLAGS = +CXX_LDFLAGS_DEBUG = +CXX_LDFLAGS_EXTRA = +CXX_LDFLAGS_GPU = +CXX_LDFLAGS_HINTS = +CXX_LDFLAGS_OPTIM = +CXX_LIBS = +CXX_LIBS_DEBUG = +CXX_LIBS_EXTRA = +CXX_LIBS_GPU = +CXX_LIBS_HINTS = +CXX_LIBS_OPTIM = +CYGPATH_W = echo +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +ECHO_C = \c +ECHO_N = +ECHO_T = +EGREP = /usr/bin/grep -E +EXEEXT = +F77 = /opt/local/bin/mpif90 +FC = /opt/local/bin/mpif90 +FCFLAGS = -O2 -g -ffree-line-length-none -I/opt/local/include -I/opt/local/include -I/opt/local/include +FCFLAGS_DEBUG = +FCFLAGS_EXTRA = +FCFLAGS_F90 = +FCFLAGS_FIXEDFORM = -ffixed-form +FCFLAGS_FREEFORM = -ffree-form +FCFLAGS_HINTS = -ffree-line-length-none +FCFLAGS_MODDIR = -J../mods +FCFLAGS_OPENMP = +FCFLAGS_OPENMP_OFFLOAD = +FCFLAGS_OPTIM = +FCLIBS = -L/opt/local/lib -L/opt/local/lib/openmpi-gcc9 -L/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0 -L/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/../../.. -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi -lgfortran -lquadmath -lm +FC_LDFLAGS = +FC_LDFLAGS_DEBUG = +FC_LDFLAGS_EXTRA = +FC_LDFLAGS_HINTS = +FC_LDFLAGS_OPTIM = +FC_LIBS = +FC_LIBS_DEBUG = +FC_LIBS_EXTRA = +FC_LIBS_HINTS = +FC_LIBS_OPTIM = +FC_NOWRAP = /opt/local/bin/mpif90 +FFLAGS = -O2 -g -ffree-line-length-none -I/opt/local/include -I/opt/local/include -I/opt/local/include +FFTW3_CFLAGS = +FFTW3_CPPFLAGS = -I/opt/local/include +FFTW3_FCFLAGS = -I/opt/local/include +FFTW3_LDFLAGS = +FFTW3_LIBS = -L/opt/local/lib -lfftw3 -lfftw3f +FFT_CFLAGS = +FFT_FCFLAGS = +FPP = +FPPFLAGS = +FPPFLAGS_DEBUG = +FPPFLAGS_EXTRA = +FPPFLAGS_HINTS = +FPPFLAGS_OPTIM = +GPU_ARCH = +GPU_CFLAGS = +GPU_CPPFLAGS = +GPU_CXXFLAGS = +GPU_FCFLAGS = +GPU_LDFLAGS = +GPU_LIBS = +GRAPHATOM_BIN = +GREP = /usr/bin/grep +H5CC = +HDF5_CFLAGS = +HDF5_CPPFLAGS = +HDF5_CXXFLAGS = +HDF5_FCFLAGS = +HDF5_LDFLAGS = +HDF5_LIBS = +INSTALL = /opt/local/libexec/gnubin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +KOKKOS_CPPFLAGS = +KOKKOS_CXXFLAGS = +KOKKOS_LDFLAGS = +KOKKOS_LIBS = +LDFLAGS = +LEVMAR_CFLAGS = +LEVMAR_CPPFLAGS = +LEVMAR_LDFLAGS = +LEVMAR_LIBS = +LIBOBJS = +LIBPAW_CPPFLAGS = +LIBPAW_FCFLAGS = +LIBPAW_LDFLAGS = +LIBPAW_LIBS = +LIBPSML_CPPFLAGS = +LIBPSML_FCFLAGS = +LIBPSML_LDFLAGS = +LIBPSML_LIBS = +LIBS = -L/opt/local/lib -lwannier -L/opt/local/lib -lxc -L/opt/local/lib -lnetcdff -L/opt/local/lib -lnetcdf -L/opt/local/lib -L/opt/local/lib -lhdf5_hl -L/opt/local/lib -lhdf5 -lz -ldl -lm -L/opt/local/lib -lfftw3 -lfftw3f +LIBXC_CFLAGS = +LIBXC_CPPFLAGS = +LIBXC_FCFLAGS = +LIBXC_LDFLAGS = +LIBXC_LIBS = +LIBXML2_CPPFLAGS = +LIBXML2_FCFLAGS = +LIBXML2_LIBS = +LINALG_CFLAGS = +LINALG_CPPFLAGS = +LINALG_CXXFLAGS = +LINALG_FCFLAGS = -I/opt/local/include +LINALG_LDFLAGS = +LINALG_LIBS = -L/opt/local/lib -lopenblas +LN_S = ln -s +LTLIBOBJS = +MAKEINFO = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' makeinfo +MKDIR_P = /opt/local/libexec/gnubin/mkdir -p +MODEXT = mod +MPI_CFLAGS = +MPI_CPPFLAGS = +MPI_CXXFLAGS = +MPI_FCFLAGS = +MPI_LDFLAGS = +MPI_LIBS = +MV = /opt/local/libexec/gnubin/mv +NETCDF_CFLAGS = +NETCDF_CPPFLAGS = +NETCDF_CXXFLAGS = +NETCDF_FCFLAGS = +NETCDF_FORTRAN_CFLAGS = +NETCDF_FORTRAN_CPPFLAGS = +NETCDF_FORTRAN_CXXFLAGS = +NETCDF_FORTRAN_FCFLAGS = +NETCDF_FORTRAN_LDFLAGS = +NETCDF_FORTRAN_LIBS = +NETCDF_LDFLAGS = +NETCDF_LIBS = +NVCC = +NVCC_CFLAGS = +NVCC_CPPFLAGS = +NVCC_LDFLAGS = +NVCC_LIBS = +OBJEXT = o +PACKAGE = abinit +PACKAGE_BUGREPORT = https://bugs.launchpad.net/abinit/ +PACKAGE_NAME = ABINIT +PACKAGE_STRING = ABINIT 10.0.0.83-58be4d +PACKAGE_TARNAME = abinit +PACKAGE_URL = +PACKAGE_VERSION = 10.0.0.83-58be4d +PAPI_CFLAGS = +PAPI_CPPFLAGS = +PAPI_LDFLAGS = +PAPI_LIBS = +PATCH = patch +PATH_SEPARATOR = : +PERL = /usr/bin/perl +PFFT_CFLAGS = +PFFT_CPPFLAGS = +PFFT_LDFLAGS = +PFFT_LIBS = +PYFLAGS = +PYTHON = python3.9 +PYTHON_CONFIG = python3.9-config +PYTHON_CPPFLAGS = -I/opt/local/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -I/opt/local/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 +RANLIB = ranlib +REALPATH = realpath +RM = /opt/local/libexec/gnubin/rm +SED = /usr/bin/sed +SET_MAKE = +SHELL = /bin/sh +STRIP = +TAR = tar +TRIQS_CFLAGS = +TRIQS_CPPFLAGS = +TRIQS_CXXFLAGS = +TRIQS_LDFLAGS = +TRIQS_LIBS = +TRUE_CPP = cpp +VERSION = 10.0.0.83-58be4d +WANNIER90_CPPFLAGS = +WANNIER90_FCFLAGS = -I/opt/local/include +WANNIER90_LDFLAGS = +WANNIER90_LIBS = -L/opt/local/lib -lwannier +XML2_CONFIG = +XMLF90_CPPFLAGS = +XMLF90_FCFLAGS = +XMLF90_LDFLAGS = +XMLF90_LIBS = +XML_CPPFLAGS = +XML_LIBS = +XPP = +XPPFLAGS = +XPPFLAGS_DEBUG = +XPPFLAGS_EXTRA = +XPPFLAGS_OPTIM = +YAKL_CPPFLAGS = +YAKL_FCFLAGS = +YAKL_LDFLAGS = +YAKL_LIBS = +abi_ac_distcheck = --with-config-file="/Users/gonze/_Research/ABINIT_git/gonze/mac-1P0-225.ac9" +abi_ac_version = 027100 +abi_am_version = 011603 +abi_avx_safe_mode_enable = no +abi_bse_unpacked_enable = no +abi_cc_path = +abi_cc_vendor = gnu +abi_cc_version = 9.4 +abi_cclock_enable = no +abi_cpp_path = +abi_cpu_64bits = yes +abi_cpu_bits = 64 +abi_cpu_model = unknown +abi_cpu_platform = apple +abi_cpu_spec = unknown_unknown +abi_cpu_vendor = unknown +abi_crpa_optim_enable = no +abi_cxx_path = +abi_cxx_vendor = gnu +abi_cxx_version = 9.4 +abi_debug_flavor = basic +abi_exports_enable = no +abi_fbk_abinit_common_ok = no +abi_fbk_bigdft_ok = disabled +abi_fbk_config = +abi_fbk_enable = no +abi_fbk_fft_ok = no +abi_fbk_fftw3_ok = no +abi_fbk_gpu_ok = no +abi_fbk_hdf5_ok = disabled +abi_fbk_init = def +abi_fbk_kokkos_ok = no +abi_fbk_levmar_ok = no +abi_fbk_libpaw_ok = no +abi_fbk_libpsml_ok = disabled +abi_fbk_libxc_ok = disabled +abi_fbk_libxml2_ok = no +abi_fbk_linalg_ok = disabled +abi_fbk_list = +abi_fbk_mpi_ok = no +abi_fbk_netcdf_fortran_ok = disabled +abi_fbk_netcdf_ok = disabled +abi_fbk_papi_ok = no +abi_fbk_pfft_ok = no +abi_fbk_prefix = +abi_fbk_required = +abi_fbk_triqs_ok = no +abi_fbk_wannier90_ok = disabled +abi_fbk_xmlf90_ok = disabled +abi_fbk_yakl_ok = no +abi_fc_path = +abi_fc_vendor = gnu +abi_fc_version = 9.4 +abi_fc_wrap = no +abi_fc_wrapper_enable = no +abi_fpp_path = +abi_gpu_arch = +abi_gpu_fcflags = +abi_gpu_flavor = none +abi_gpu_hip_libdir = +abi_gpu_incs = +abi_gpu_ldflags = +abi_gpu_libs = +abi_gpu_nvtx_v3 = +abi_gpu_roctx = +abi_gw_dpc_enable = yes +abi_hints_enable = yes +abi_libtetra_enable = yes +abi_libxml2_cppflags = +abi_libxml2_enable = no +abi_libxml2_fcflags = +abi_libxml2_init = def +abi_libxml2_ldflags = +abi_libxml2_libs = +abi_libxml2_ok = unknown +abi_libxml2_prefix = +abi_lotf_enable = no +abi_lt_version = 020406 +abi_m4_version = 010419 +abi_memory_profiling_enable = no +abi_mpi_cflags = +abi_mpi_cppflags = +abi_mpi_cxxflags = +abi_mpi_enable = yes +abi_mpi_fcflags = +abi_mpi_flavor = auto +abi_mpi_gpu_aware_enable = no +abi_mpi_incs = +abi_mpi_inplace_enable = yes +abi_mpi_interfaces_bugfix_enable = no +abi_mpi_io_default_enable = no +abi_mpi_io_enable = yes +abi_mpi_ldflags = +abi_mpi_level = 2 +abi_mpi_libs = +abi_netcdf_default_enable = no +abi_openmp_enable = no +abi_openmp_offload_enable = no +abi_optim_flavor = standard +abi_python_invocation_enable = no +abi_source_debug_enable = no +abi_stdin_enable = yes +abi_sys_spec = darwin-x86_64 +abi_timer_enable = yes +abi_triqs_v1_4_enable = no +abi_triqs_v2_0_enable = no +abi_zdot_bugfix_enable = no +abinit_bindir = /usr/local/bin +abinit_builddir = /Users/gonze/_Research/ABINIT_git/gonze +abinit_chkdir = /usr/local/share/abinit/tests +abinit_datdir = /usr/local/share/abinit +abinit_docdir = /usr/local/doc/abinit +abinit_incdir = /usr/local/include +abinit_libdir = /usr/local/lib +abinit_mandir = /usr/local/share/man +abinit_prefix = /usr/local +abinit_srcdir = /Users/gonze/_Research/ABINIT_git/gonze +abs_builddir = /Users/gonze/_Research/ABINIT_git/gonze/shared/common/src/11_memory_mpi +abs_srcdir = /Users/gonze/_Research/ABINIT_git/gonze/shared/common/src/11_memory_mpi +abs_top_builddir = /Users/gonze/_Research/ABINIT_git/gonze +abs_top_srcdir = /Users/gonze/_Research/ABINIT_git/gonze +ac_ct_CC = +ac_ct_CXX = +ac_ct_FC = +am__include = include +am__leading_dot = . +am__quote = +am__tar = tar --format=ustar -chf - "$$tardir" +am__untar = tar -xf - +bindir = ${exec_prefix}/bin +build = x86_64-apple-darwin18.7.0 +build_alias = +build_cpu = x86_64 +build_os = darwin18.7.0 +build_vendor = apple +builddir = . +cc_info_string = gcc-mp-9 (MacPorts gcc9 9.4.0_0) 9.4.0 +cxx_info_string = g++-mp-9 (MacPorts gcc9 9.4.0_0) 9.4.0 +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +enable_avx_safe_mode = +enable_bse_unpacked = +enable_cclock = +enable_crpa_optim = +enable_exports = +enable_fc_wrapper = +enable_gw_dpc = yes +enable_hints = +enable_libtetra = +enable_lotf = +enable_memory_profiling = +enable_mpi_gpu_aware = +enable_mpi_inplace = +enable_mpi_interfaces_bugfix = +enable_mpi_io = yes +enable_mpi_io_default = +enable_netcdf_default = +enable_openmp = +enable_openmp_offload = +enable_python_invocation = +enable_shared = +enable_source_debug = +enable_static = +enable_stdin = +enable_timer = +enable_triqs_v1_4 = +enable_triqs_v2_0 = +enable_zdot_bugfix = +exec_prefix = ${prefix} +fc_info_string = GNU Fortran (MacPorts gcc9 9.4.0_0) 9.4.0 +fc_mod_fcflags = +fc_timing = standard +fcflags_opt_02_clib = +fcflags_opt_10_defs = +fcflags_opt_11_memory_mpi = +fcflags_opt_12_hide_mpi = +fcflags_opt_14_hidewrite = +fcflags_opt_16_hideleave = +fcflags_opt_16_kokkos_toolbox = +fcflags_opt_17_gpu_toolbox = +fcflags_opt_17_libtetra_ext = +fcflags_opt_17_minimax = +fcflags_opt_17_yaml_out = +fcflags_opt_18_timing = +fcflags_opt_21_hashfuncs = +fcflags_opt_27_toolbox_oop = +fcflags_opt_28_numeric_noabirule = +fcflags_opt_29_kpoints = +fcflags_opt_32_util = +fcflags_opt_33_xc_lowlevel = +fcflags_opt_39_libpaw = +fcflags_opt_41_geometry = +fcflags_opt_42_nlstrain = +fcflags_opt_42_parser = +fcflags_opt_43_ptgroups = -O0 +fcflags_opt_43_wvl_wrappers = +fcflags_opt_44_abitools = +fcflags_opt_44_abitypes_defs = +fcflags_opt_44_manage_kokkos = +fcflags_opt_45_geomoptim = +fcflags_opt_45_xgTools = +fcflags_opt_46_ghc_omp = +fcflags_opt_46_manage_cuda = +fcflags_opt_48_diago = +fcflags_opt_49_gw_toolbox_oop = +fcflags_opt_51_manage_mpi = +fcflags_opt_52_fft_mpi_noabirule = +fcflags_opt_53_ffts = +fcflags_opt_54_spacepar = +fcflags_opt_55_abiutil = +fcflags_opt_56_io_mpi = +fcflags_opt_56_mixing = +fcflags_opt_56_recipspace = +fcflags_opt_56_xc = +fcflags_opt_57_iopsp_parser = +fcflags_opt_57_iovars = +fcflags_opt_61_occeig = +fcflags_opt_62_cg_noabirule = +fcflags_opt_62_ctqmc = +fcflags_opt_62_iowfdenpot = +fcflags_opt_62_poisson = +fcflags_opt_62_wvl_wfs = +fcflags_opt_64_psp = +fcflags_opt_65_lotf_base = +fcflags_opt_65_paw = +fcflags_opt_66_nonlocal = +fcflags_opt_66_vdwxc = +fcflags_opt_66_wfs = +fcflags_opt_67_common = +fcflags_opt_67_python_invocation_ext = +fcflags_opt_67_triqs_ext = +fcflags_opt_68_dmft = +fcflags_opt_68_lotf = +fcflags_opt_68_recursion = +fcflags_opt_68_rsprc = +fcflags_opt_69_wfdesc = +fcflags_opt_70_gw = +fcflags_opt_71_bse = +fcflags_opt_71_wannier = +fcflags_opt_72_response = +fcflags_opt_77_ddb = +fcflags_opt_77_suscep = +fcflags_opt_78_effpot = +fcflags_opt_78_eph = +fcflags_opt_79_seqpar_mpi = +fcflags_opt_80_rttddft = +fcflags_opt_80_tdep = +fcflags_opt_94_scfcv = +fcflags_opt_95_drive = +fcflags_opt_98_main = +fcflags_opt_bigdft = +fcflags_opt_default = +fcflags_opt_hdf5 = +fcflags_opt_levmar = +fcflags_opt_libpsml = +fcflags_opt_libxc = +fcflags_opt_libxml2 = +fcflags_opt_linalg = +fcflags_opt_netcdf = +fcflags_opt_netcdf_fortran = +fcflags_opt_papi = +fcflags_opt_triqs = +fcflags_opt_wannier90 = +fcflags_opt_xmlf90 = +host = x86_64-apple-darwin18.7.0 +host_alias = +host_cpu = x86_64 +host_os = darwin18.7.0 +host_vendor = apple +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = ${SHELL} /Users/gonze/_Research/ABINIT_git/gonze/config/gnu/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = ${datarootdir}/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = $(MKDIR_P) +oldincludedir = /usr/include +pdfdir = ${docdir} +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +runstatedir = ${localstatedir}/run +sbindir = ${exec_prefix}/sbin +sd_abinit_common_cppflags = +sd_abinit_common_enable = no +sd_abinit_common_enable_def = no +sd_abinit_common_fcflags = +sd_abinit_common_init = def +sd_abinit_common_ldflags = +sd_abinit_common_libs = +sd_abinit_common_ok = unknown +sd_abinit_common_options = optional skip +sd_abinit_common_policy = skip +sd_abinit_common_status = optional +sd_bigdft_cppflags = +sd_bigdft_enable = no +sd_bigdft_enable_def = no +sd_bigdft_fcflags = +sd_bigdft_init = def +sd_bigdft_ldflags = +sd_bigdft_libs = +sd_bigdft_ok = unknown +sd_bigdft_options = optional warn +sd_bigdft_policy = warn +sd_bigdft_status = optional +sd_fft_cflags = +sd_fft_choices = +sd_fft_cppflags = -I/opt/local/include +sd_fft_cxxflags = +sd_fft_enable = yes +sd_fft_fcflags = -I/opt/local/include +sd_fft_flavor = fftw3 +sd_fft_init = kwd +sd_fft_ldflags = +sd_fft_libs = -L/opt/local/lib -lfftw3 -lfftw3f +sd_fft_ok = yes +sd_fftw3_cflags = +sd_fftw3_cppflags = -I/opt/local/include +sd_fftw3_enable = yes +sd_fftw3_enable_def = no +sd_fftw3_fcflags = -I/opt/local/include +sd_fftw3_init = env +sd_fftw3_ldflags = +sd_fftw3_libs = -L/opt/local/lib -lfftw3 -lfftw3f +sd_fftw3_ok = yes +sd_fftw3_options = optional skip +sd_fftw3_policy = skip +sd_fftw3_status = optional +sd_gpu_cflags = +sd_gpu_cppflags = +sd_gpu_cxxflags = +sd_gpu_enable = no +sd_gpu_enable_def = no +sd_gpu_fcflags = +sd_gpu_init = def +sd_gpu_ldflags = +sd_gpu_libs = +sd_gpu_ok = no +sd_gpu_options = optional warn +sd_gpu_policy = warn +sd_gpu_prefix = +sd_gpu_status = optional +sd_hdf5_cflags = +sd_hdf5_cppflags = -I/opt/local/include -I/opt/local/include +sd_hdf5_cxxflags = +sd_hdf5_enable = yes +sd_hdf5_enable_def = yes +sd_hdf5_enable_fc = no +sd_hdf5_fcflags = +sd_hdf5_h5cc = /opt/local/bin/h5cc +sd_hdf5_h5fc = +sd_hdf5_init = dir +sd_hdf5_ldflags = +sd_hdf5_libs = -L/opt/local/lib -L/opt/local/lib -lhdf5_hl -L/opt/local/lib -lhdf5 -lz -ldl -lm +sd_hdf5_ok = yes +sd_hdf5_options = required no-fortran warn +sd_hdf5_policy = warn +sd_hdf5_status = required +sd_kokkos_cppflags = +sd_kokkos_cxxflags = +sd_kokkos_enable = no +sd_kokkos_enable_def = no +sd_kokkos_init = def +sd_kokkos_ldflags = +sd_kokkos_libs = +sd_kokkos_ok = unknown +sd_kokkos_options = optional fail +sd_kokkos_policy = fail +sd_kokkos_status = optional +sd_levmar_cflags = +sd_levmar_cppflags = +sd_levmar_enable = no +sd_levmar_enable_def = no +sd_levmar_init = def +sd_levmar_ldflags = +sd_levmar_libs = +sd_levmar_ok = unknown +sd_levmar_options = optional fail +sd_levmar_policy = fail +sd_levmar_status = optional +sd_libpaw_cppflags = +sd_libpaw_enable = no +sd_libpaw_enable_def = no +sd_libpaw_fcflags = +sd_libpaw_init = def +sd_libpaw_ldflags = +sd_libpaw_libs = +sd_libpaw_ok = unknown +sd_libpaw_options = optional skip +sd_libpaw_policy = skip +sd_libpaw_status = optional +sd_libpsml_cppflags = +sd_libpsml_enable = no +sd_libpsml_enable_def = no +sd_libpsml_fcflags = +sd_libpsml_init = def +sd_libpsml_ldflags = +sd_libpsml_libs = +sd_libpsml_ok = unknown +sd_libpsml_options = optional warn +sd_libpsml_policy = warn +sd_libpsml_status = optional +sd_libxc_cflags = +sd_libxc_cppflags = -I/opt/local/include +sd_libxc_enable = yes +sd_libxc_enable_def = yes +sd_libxc_enable_fc = no +sd_libxc_fcflags = +sd_libxc_init = dir +sd_libxc_ldflags = +sd_libxc_libs = -L/opt/local/lib -lxc +sd_libxc_ok = yes +sd_libxc_options = required no-fortran warn +sd_libxc_policy = warn +sd_libxc_status = required +sd_linalg_cflags = +sd_linalg_choices = +sd_linalg_cppflags = +sd_linalg_cxxflags = +sd_linalg_enable = yes +sd_linalg_fcflags = -I/opt/local/include +sd_linalg_flavor = openblas +sd_linalg_has_elpa = no +sd_linalg_has_scalapack = no +sd_linalg_init = env +sd_linalg_ldflags = +sd_linalg_libs = -L/opt/local/lib -lopenblas +sd_linalg_ok = yes +sd_mpi_cc = /opt/local/bin/mpicc +sd_mpi_cflags = +sd_mpi_cppflags = -I/opt/local/include +sd_mpi_cxx = /opt/local/bin/mpicxx +sd_mpi_enable = yes +sd_mpi_enable_cxx = yes +sd_mpi_enable_def = auto +sd_mpi_enable_fc = yes +sd_mpi_fc = /opt/local/bin/mpif90 +sd_mpi_fcflags = -I/opt/local/include +sd_mpi_init = dir +sd_mpi_ldflags = +sd_mpi_libs = +sd_mpi_ok = yes +sd_mpi_options = auto optional fail +sd_mpi_policy = fail +sd_mpi_status = optional +sd_netcdf_cflags = +sd_netcdf_cppflags = -I/opt/local/include +sd_netcdf_enable = yes +sd_netcdf_enable_def = yes +sd_netcdf_fcflags = -I/opt/local/include +sd_netcdf_fortran_cflags = +sd_netcdf_fortran_cppflags = -I/opt/local/include +sd_netcdf_fortran_enable = yes +sd_netcdf_fortran_enable_def = yes +sd_netcdf_fortran_fcflags = -I/opt/local/include +sd_netcdf_fortran_init = dir +sd_netcdf_fortran_ldflags = +sd_netcdf_fortran_libs = -L/opt/local/lib -lnetcdff +sd_netcdf_fortran_ok = yes +sd_netcdf_fortran_options = required warn +sd_netcdf_fortran_policy = warn +sd_netcdf_fortran_status = required +sd_netcdf_init = dir +sd_netcdf_ldflags = +sd_netcdf_libs = -L/opt/local/lib -lnetcdf +sd_netcdf_ok = yes +sd_netcdf_options = required warn +sd_netcdf_policy = warn +sd_netcdf_status = required +sd_papi_cflags = +sd_papi_cppflags = +sd_papi_enable = no +sd_papi_enable_def = no +sd_papi_init = def +sd_papi_ldflags = +sd_papi_libs = +sd_papi_ok = unknown +sd_papi_options = optional fail +sd_papi_policy = fail +sd_papi_sd_papi_fcflags = +sd_papi_status = optional +sd_pfft_cflags = +sd_pfft_cppflags = +sd_pfft_enable = no +sd_pfft_enable_def = no +sd_pfft_init = def +sd_pfft_ldflags = +sd_pfft_libs = +sd_pfft_ok = unknown +sd_pfft_options = optional skip +sd_pfft_policy = skip +sd_pfft_status = optional +sd_sys_fcflags = +sd_triqs_cflags = +sd_triqs_cppflags = +sd_triqs_cxxflags = +sd_triqs_enable = no +sd_triqs_enable_def = no +sd_triqs_fcflags = +sd_triqs_init = def +sd_triqs_ldflags = +sd_triqs_libs = +sd_triqs_ok = unknown +sd_triqs_options = optional fail +sd_triqs_policy = fail +sd_triqs_status = optional +sd_wannier90_cppflags = +sd_wannier90_enable = yes +sd_wannier90_enable_def = no +sd_wannier90_fcflags = -I/opt/local/include +sd_wannier90_init = env +sd_wannier90_ldflags = +sd_wannier90_libs = -L/opt/local/lib -lwannier +sd_wannier90_ok = yes +sd_wannier90_options = optional warn +sd_wannier90_policy = warn +sd_wannier90_status = optional +sd_xmlf90_cppflags = +sd_xmlf90_enable = no +sd_xmlf90_enable_def = no +sd_xmlf90_fcflags = +sd_xmlf90_init = def +sd_xmlf90_ldflags = +sd_xmlf90_libs = +sd_xmlf90_ok = unknown +sd_xmlf90_options = optional warn +sd_xmlf90_policy = warn +sd_xmlf90_status = optional +sd_yakl_cppflags = +sd_yakl_enable = no +sd_yakl_enable_def = no +sd_yakl_fcflags = +sd_yakl_init = def +sd_yakl_ldflags = +sd_yakl_libs = +sd_yakl_ok = unknown +sd_yakl_options = optional fail +sd_yakl_policy = fail +sd_yakl_status = optional +sharedstatedir = ${prefix}/com +src_02_clib_fcflags = -I$(top_builddir)/shared/common/src/02_clib -I$(top_srcdir)/shared/common/src/02_clib +src_10_defs_fcflags = -I$(top_builddir)/shared/common/src/10_defs -I$(top_srcdir)/shared/common/src/10_defs +src_11_memory_mpi_fcflags = -I$(top_builddir)/shared/common/src/11_memory_mpi -I$(top_srcdir)/shared/common/src/11_memory_mpi +src_12_hide_mpi_fcflags = -I$(top_builddir)/shared/common/src/12_hide_mpi -I$(top_srcdir)/shared/common/src/12_hide_mpi +src_14_hidewrite_fcflags = -I$(top_builddir)/shared/common/src/14_hidewrite -I$(top_srcdir)/shared/common/src/14_hidewrite +src_16_hideleave_fcflags = -I$(top_builddir)/shared/common/src/16_hideleave -I$(top_srcdir)/shared/common/src/16_hideleave +src_16_kokkos_toolbox_fcflags = -I$(top_builddir)/shared/common/src/16_kokkos_toolbox -I$(top_srcdir)/shared/common/src/16_kokkos_toolbox +src_17_gpu_toolbox_fcflags = -I$(top_builddir)/shared/common/src/17_gpu_toolbox -I$(top_srcdir)/shared/common/src/17_gpu_toolbox +src_17_libtetra_ext_fcflags = -I$(top_builddir)/shared/common/src/17_libtetra_ext -I$(top_srcdir)/shared/common/src/17_libtetra_ext +src_17_minimax_fcflags = -I$(top_builddir)/shared/common/src/17_minimax -I$(top_srcdir)/shared/common/src/17_minimax +src_17_yaml_out_fcflags = -I$(top_builddir)/shared/common/src/17_yaml_out -I$(top_srcdir)/shared/common/src/17_yaml_out +src_18_timing_fcflags = -I$(top_builddir)/shared/common/src/18_timing -I$(top_srcdir)/shared/common/src/18_timing +src_21_hashfuncs_fcflags = -I$(top_builddir)/shared/common/src/21_hashfuncs -I$(top_srcdir)/shared/common/src/21_hashfuncs +src_27_toolbox_oop_fcflags = -I$(top_builddir)/shared/common/src/27_toolbox_oop -I$(top_srcdir)/shared/common/src/27_toolbox_oop +src_28_numeric_noabirule_fcflags = -I$(top_builddir)/shared/common/src/28_numeric_noabirule -I$(top_srcdir)/shared/common/src/28_numeric_noabirule +src_29_kpoints_fcflags = -I$(top_builddir)/shared/common/src/29_kpoints -I$(top_srcdir)/shared/common/src/29_kpoints +src_32_util_fcflags = -I$(top_builddir)/shared/common/src/32_util -I$(top_srcdir)/shared/common/src/32_util +src_33_xc_lowlevel_fcflags = -I$(top_builddir)/shared/common/src/33_xc_lowlevel -I$(top_srcdir)/shared/common/src/33_xc_lowlevel +src_39_libpaw_fcflags = -I$(top_builddir)/shared/libpaw/src -I$(top_srcdir)/shared/libpaw/src +src_41_geometry_fcflags = -I$(top_builddir)/src/41_geometry -I$(top_srcdir)/src/41_geometry +src_42_nlstrain_fcflags = -I$(top_builddir)/src/42_nlstrain -I$(top_srcdir)/src/42_nlstrain +src_42_parser_fcflags = -I$(top_builddir)/src/42_parser -I$(top_srcdir)/src/42_parser +src_43_ptgroups_fcflags = -I$(top_builddir)/src/43_ptgroups -I$(top_srcdir)/src/43_ptgroups +src_43_wvl_wrappers_fcflags = -I$(top_builddir)/src/43_wvl_wrappers -I$(top_srcdir)/src/43_wvl_wrappers +src_44_abitools_fcflags = -I$(top_builddir)/src/44_abitools -I$(top_srcdir)/src/44_abitools +src_44_abitypes_defs_fcflags = -I$(top_builddir)/src/44_abitypes_defs -I$(top_srcdir)/src/44_abitypes_defs +src_44_manage_kokkos_fcflags = -I$(top_builddir)/src/44_manage_kokkos -I$(top_srcdir)/src/44_manage_kokkos +src_45_geomoptim_fcflags = -I$(top_builddir)/src/45_geomoptim -I$(top_srcdir)/src/45_geomoptim +src_45_xgTools_fcflags = -I$(top_builddir)/src/45_xgTools -I$(top_srcdir)/src/45_xgTools +src_46_ghc_omp_fcflags = -I$(top_builddir)/src/46_ghc_omp -I$(top_srcdir)/src/46_ghc_omp +src_46_manage_cuda_fcflags = -I$(top_builddir)/src/46_manage_cuda -I$(top_srcdir)/src/46_manage_cuda +src_48_diago_fcflags = -I$(top_builddir)/src/48_diago -I$(top_srcdir)/src/48_diago +src_49_gw_toolbox_oop_fcflags = -I$(top_builddir)/src/49_gw_toolbox_oop -I$(top_srcdir)/src/49_gw_toolbox_oop +src_51_manage_mpi_fcflags = -I$(top_builddir)/src/51_manage_mpi -I$(top_srcdir)/src/51_manage_mpi +src_52_fft_mpi_noabirule_fcflags = -I$(top_builddir)/src/52_fft_mpi_noabirule -I$(top_srcdir)/src/52_fft_mpi_noabirule +src_53_ffts_fcflags = -I$(top_builddir)/src/53_ffts -I$(top_srcdir)/src/53_ffts +src_54_spacepar_fcflags = -I$(top_builddir)/src/54_spacepar -I$(top_srcdir)/src/54_spacepar +src_55_abiutil_fcflags = -I$(top_builddir)/src/55_abiutil -I$(top_srcdir)/src/55_abiutil +src_56_io_mpi_fcflags = -I$(top_builddir)/src/56_io_mpi -I$(top_srcdir)/src/56_io_mpi +src_56_mixing_fcflags = -I$(top_builddir)/src/56_mixing -I$(top_srcdir)/src/56_mixing +src_56_recipspace_fcflags = -I$(top_builddir)/src/56_recipspace -I$(top_srcdir)/src/56_recipspace +src_56_xc_fcflags = -I$(top_builddir)/src/56_xc -I$(top_srcdir)/src/56_xc +src_57_iopsp_parser_fcflags = -I$(top_builddir)/src/57_iopsp_parser -I$(top_srcdir)/src/57_iopsp_parser +src_57_iovars_fcflags = -I$(top_builddir)/src/57_iovars -I$(top_srcdir)/src/57_iovars +src_61_occeig_fcflags = -I$(top_builddir)/src/61_occeig -I$(top_srcdir)/src/61_occeig +src_62_cg_noabirule_fcflags = -I$(top_builddir)/src/62_cg_noabirule -I$(top_srcdir)/src/62_cg_noabirule +src_62_ctqmc_fcflags = -I$(top_builddir)/src/62_ctqmc -I$(top_srcdir)/src/62_ctqmc +src_62_iowfdenpot_fcflags = -I$(top_builddir)/src/62_iowfdenpot -I$(top_srcdir)/src/62_iowfdenpot +src_62_poisson_fcflags = -I$(top_builddir)/src/62_poisson -I$(top_srcdir)/src/62_poisson +src_62_wvl_wfs_fcflags = -I$(top_builddir)/src/62_wvl_wfs -I$(top_srcdir)/src/62_wvl_wfs +src_64_psp_fcflags = -I$(top_builddir)/src/64_psp -I$(top_srcdir)/src/64_psp +src_65_lotf_base_fcflags = -I$(top_builddir)/src/65_lotf_base -I$(top_srcdir)/src/65_lotf_base +src_65_paw_fcflags = -I$(top_builddir)/src/65_paw -I$(top_srcdir)/src/65_paw +src_66_nonlocal_fcflags = -I$(top_builddir)/src/66_nonlocal -I$(top_srcdir)/src/66_nonlocal +src_66_vdwxc_fcflags = -I$(top_builddir)/src/66_vdwxc -I$(top_srcdir)/src/66_vdwxc +src_66_wfs_fcflags = -I$(top_builddir)/src/66_wfs -I$(top_srcdir)/src/66_wfs +src_67_common_fcflags = -I$(top_builddir)/src/67_common -I$(top_srcdir)/src/67_common +src_67_python_invocation_ext_fcflags = -I$(top_builddir)/src/67_python_invocation_ext -I$(top_srcdir)/src/67_python_invocation_ext +src_67_triqs_ext_fcflags = -I$(top_builddir)/src/67_triqs_ext -I$(top_srcdir)/src/67_triqs_ext +src_68_dmft_fcflags = -I$(top_builddir)/src/68_dmft -I$(top_srcdir)/src/68_dmft +src_68_lotf_fcflags = -I$(top_builddir)/src/68_lotf -I$(top_srcdir)/src/68_lotf +src_68_recursion_fcflags = -I$(top_builddir)/src/68_recursion -I$(top_srcdir)/src/68_recursion +src_68_rsprc_fcflags = -I$(top_builddir)/src/68_rsprc -I$(top_srcdir)/src/68_rsprc +src_69_wfdesc_fcflags = -I$(top_builddir)/src/69_wfdesc -I$(top_srcdir)/src/69_wfdesc +src_70_gw_fcflags = -I$(top_builddir)/src/70_gw -I$(top_srcdir)/src/70_gw +src_71_bse_fcflags = -I$(top_builddir)/src/71_bse -I$(top_srcdir)/src/71_bse +src_71_wannier_fcflags = -I$(top_builddir)/src/71_wannier -I$(top_srcdir)/src/71_wannier +src_72_response_fcflags = -I$(top_builddir)/src/72_response -I$(top_srcdir)/src/72_response +src_77_ddb_fcflags = -I$(top_builddir)/src/77_ddb -I$(top_srcdir)/src/77_ddb +src_77_suscep_fcflags = -I$(top_builddir)/src/77_suscep -I$(top_srcdir)/src/77_suscep +src_78_effpot_fcflags = -I$(top_builddir)/src/78_effpot -I$(top_srcdir)/src/78_effpot +src_78_eph_fcflags = -I$(top_builddir)/src/78_eph -I$(top_srcdir)/src/78_eph +src_79_seqpar_mpi_fcflags = -I$(top_builddir)/src/79_seqpar_mpi -I$(top_srcdir)/src/79_seqpar_mpi +src_80_rttddft_fcflags = -I$(top_builddir)/src/80_rttddft -I$(top_srcdir)/src/80_rttddft +src_80_tdep_fcflags = -I$(top_builddir)/src/80_tdep -I$(top_srcdir)/src/80_tdep +src_94_scfcv_fcflags = -I$(top_builddir)/src/94_scfcv -I$(top_srcdir)/src/94_scfcv +src_95_drive_fcflags = -I$(top_builddir)/src/95_drive -I$(top_srcdir)/src/95_drive +src_common_fcflags = -I$(top_builddir)/shared/common/src/incs -I$(top_srcdir)/shared/common/src/incs -I$(top_builddir)/shared/common/src/mods -I$(top_srcdir)/shared/common/src/mods +src_core_fcflags = -I$(top_builddir)/src/incs -I$(top_srcdir)/src/incs -I$(top_builddir)/src/mods -I$(top_srcdir)/src/mods +src_libpaw_fcflags = -I$(top_builddir)/shared/libpaw/incs -I$(top_srcdir)/shared/libpaw/incs -I$(top_builddir)/shared/libpaw/mods -I$(top_srcdir)/shared/libpaw/mods +srcdir = . +sysconfdir = ${prefix}/etc +target = x86_64-apple-darwin18.7.0 +target_alias = +target_cpu = x86_64 +target_os = darwin18.7.0 +target_vendor = apple +top_build_prefix = ../../../../ +top_builddir = ../../../.. +top_srcdir = ../../../.. +with_abinit_common = +with_bigdft = +with_config_file = +with_debug_flavor = +with_fallbacks = +with_fc_vendor = +with_fc_version = +with_fft_flavor = fftw3 +with_fftw3 = +with_gnu_ld = +with_gpu = +with_hdf5 = /opt/local +with_kokkos = +with_levmar = +with_libpaw = +with_libpsml = +with_libxc = /opt/local +with_libxml2 = +with_linalg_flavor = openblas +with_mpi = /opt/local +with_mpi_level = +with_netcdf = /opt/local +with_optim_flavor = +with_papi = +with_pfft = +with_triqs = +with_wannier90 = +with_xmlf90 = +with_yakl = +AM_CFLAGS = -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include +AM_CXXFLAGS = $(sd_triqs_cxxflags) +AM_FCFLAGS = -ffree-form -J../mods +AM_CPPFLAGS = \ + -I$(top_builddir)/shared/common/src/02_clib -I$(top_srcdir)/shared/common/src/02_clib \ + -I$(top_builddir)/shared/common/src/10_defs -I$(top_srcdir)/shared/common/src/10_defs \ + -I$(top_builddir)/shared/common/src/incs -I$(top_srcdir)/shared/common/src/incs -I$(top_builddir)/shared/common/src/mods -I$(top_srcdir)/shared/common/src/mods \ + -I$(top_builddir)/src/incs -I$(top_srcdir)/src/incs -I$(top_builddir)/src/mods -I$(top_srcdir)/src/mods \ + -I$(top_builddir)/shared/libpaw/incs -I$(top_srcdir)/shared/libpaw/incs -I$(top_builddir)/shared/libpaw/mods -I$(top_srcdir)/shared/libpaw/mods \ + -I/opt/local/include \ + -I/opt/local/include \ + + + +# Regular source files +lib11_memory_mpi_srcs = \ + m_profiling_abi.F90 + + +# Source files depending on conditionals + +# Library description +noinst_LIBRARIES = lib11_memory_mpi.a +lib11_memory_mpi_a_SOURCES = $(lib11_memory_mpi_srcs) + +# Dependencies (inside the directory) of directory 11_memory_mpi +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. +CLEANFILES = m_profiling_abi_cpp.f90 m_profiling_abi.$(MODEXT) +EXTRA_DIST = abinit.src abinit.dep _11_memory_mpi_ +all: all-am + +.SUFFIXES: +.SUFFIXES: .F90 .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu shared/common/src/11_memory_mpi/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu shared/common/src/11_memory_mpi/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) + +lib11_memory_mpi.a: $(lib11_memory_mpi_a_OBJECTS) $(lib11_memory_mpi_a_DEPENDENCIES) $(EXTRA_lib11_memory_mpi_a_DEPENDENCIES) + $(AM_V_at)-rm -f lib11_memory_mpi.a + $(AM_V_AR)$(lib11_memory_mpi_a_AR) lib11_memory_mpi.a $(lib11_memory_mpi_a_OBJECTS) $(lib11_memory_mpi_a_LIBADD) + $(AM_V_at)$(RANLIB) lib11_memory_mpi.a + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +.F90.o: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ $< + +.F90.obj: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-noinstLIBRARIES cscopelist-am ctags ctags-am distclean \ + distclean-compile distclean-generic distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am + +.PRECIOUS: Makefile + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/GX-PAW/common/src/11_memory_mpi/Makefile.am b/GX-PAW/common/src/11_memory_mpi/Makefile.am new file mode 100644 index 00000000..5b554a30 --- /dev/null +++ b/GX-PAW/common/src/11_memory_mpi/Makefile.am @@ -0,0 +1,55 @@ +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-corelibs on 2024/03/16 21:07:38 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-corelibs script or its config file instead. +# + +AM_CFLAGS = @ABI_CPPFLAGS@ +AM_CXXFLAGS = $(sd_triqs_cxxflags) +AM_FCFLAGS = @FPPFLAGS@ @FCFLAGS_FREEFORM@ @FCFLAGS_MODDIR@ @sd_sys_fcflags@ @fcflags_opt_11_memory_mpi@ + +AM_CPPFLAGS = \ + @src_02_clib_fcflags@ \ + @src_10_defs_fcflags@ \ + @src_common_fcflags@ \ + @src_core_fcflags@ \ + @src_libpaw_fcflags@ \ + @sd_mpi_cppflags@ \ + @sd_mpi_fcflags@ \ + @fc_mod_fcflags@ + +# Regular source files +lib11_memory_mpi_srcs = \ + m_profiling_abi.F90 + +# Source files depending on conditionals + + +# Library description +noinst_LIBRARIES = lib11_memory_mpi.a + +lib11_memory_mpi_a_SOURCES= $(lib11_memory_mpi_srcs) + +CLEANFILES = \ + m_profiling_abi_cpp.f90 + +EXTRA_DIST = abinit.src + +EXTRA_DIST += abinit.dep + +# Dependencies (inside the directory) of directory 11_memory_mpi +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. + +CLEANFILES += \ + m_profiling_abi.$(MODEXT) + + +EXTRA_DIST += _11_memory_mpi_ diff --git a/GX-PAW/common/src/11_memory_mpi/Makefile.in b/GX-PAW/common/src/11_memory_mpi/Makefile.in new file mode 100644 index 00000000..098d8bc3 --- /dev/null +++ b/GX-PAW/common/src/11_memory_mpi/Makefile.in @@ -0,0 +1,1454 @@ +# Makefile.in generated by automake 1.16.3 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2020 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-corelibs on 2024/03/16 21:07:38 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-corelibs script or its config file instead. +# + +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = shared/common/src/11_memory_mpi +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/m4/arch-gpu.m4 \ + $(top_srcdir)/config/m4/arch-mpi.m4 \ + $(top_srcdir)/config/m4/auto-autotools.m4 \ + $(top_srcdir)/config/m4/auto-corelibs.m4 \ + $(top_srcdir)/config/m4/auto-debug.m4 \ + $(top_srcdir)/config/m4/auto-dirflags.m4 \ + $(top_srcdir)/config/m4/auto-env.m4 \ + $(top_srcdir)/config/m4/auto-hints.m4 \ + $(top_srcdir)/config/m4/auto-optim.m4 \ + $(top_srcdir)/config/m4/auto-options.m4 \ + $(top_srcdir)/config/m4/auto-output.m4 \ + $(top_srcdir)/config/m4/auto-triggers.m4 \ + $(top_srcdir)/config/m4/conf-atompaw.m4 \ + $(top_srcdir)/config/m4/conf-debug.m4 \ + $(top_srcdir)/config/m4/conf-fallbacks.m4 \ + $(top_srcdir)/config/m4/conf-files.m4 \ + $(top_srcdir)/config/m4/conf-init.m4 \ + $(top_srcdir)/config/m4/conf-openmp.m4 \ + $(top_srcdir)/config/m4/conf-optim.m4 \ + $(top_srcdir)/config/m4/lang-c++.m4 \ + $(top_srcdir)/config/m4/lang-c.m4 \ + $(top_srcdir)/config/m4/lang-fortran-import.m4 \ + $(top_srcdir)/config/m4/lang-fortran.m4 \ + $(top_srcdir)/config/m4/lang-python.m4 \ + $(top_srcdir)/config/m4/libxml2.m4 \ + $(top_srcdir)/config/m4/misc-display.m4 \ + $(top_srcdir)/config/m4/sd_abinit_common.m4 \ + $(top_srcdir)/config/m4/sd_arch_gpu.m4 \ + $(top_srcdir)/config/m4/sd_arch_mpi.m4 \ + $(top_srcdir)/config/m4/sd_bigdft.m4 \ + $(top_srcdir)/config/m4/sd_core.m4 \ + $(top_srcdir)/config/m4/sd_esl.m4 \ + $(top_srcdir)/config/m4/sd_fftw3.m4 \ + $(top_srcdir)/config/m4/sd_gpu_kokkos.m4 \ + $(top_srcdir)/config/m4/sd_gpu_yakl.m4 \ + $(top_srcdir)/config/m4/sd_io_hdf5.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf_fortran.m4 \ + $(top_srcdir)/config/m4/sd_levmar.m4 \ + $(top_srcdir)/config/m4/sd_libpaw.m4 \ + $(top_srcdir)/config/m4/sd_libpsml.m4 \ + $(top_srcdir)/config/m4/sd_libxc.m4 \ + $(top_srcdir)/config/m4/sd_math_fft.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_core.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_util.m4 \ + $(top_srcdir)/config/m4/sd_papi.m4 \ + $(top_srcdir)/config/m4/sd_pfft.m4 \ + $(top_srcdir)/config/m4/sd_triqs.m4 \ + $(top_srcdir)/config/m4/sd_wannier90.m4 \ + $(top_srcdir)/config/m4/sd_xmlf90.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = +lib11_memory_mpi_a_AR = $(AR) $(ARFLAGS) +lib11_memory_mpi_a_LIBADD = +am__objects_1 = m_profiling_abi.$(OBJEXT) +am_lib11_memory_mpi_a_OBJECTS = $(am__objects_1) +lib11_memory_mpi_a_OBJECTS = $(am_lib11_memory_mpi_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +PPFCCOMPILE = $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) +AM_V_PPFC = $(am__v_PPFC_@AM_V@) +am__v_PPFC_ = $(am__v_PPFC_@AM_DEFAULT_V@) +am__v_PPFC_0 = @echo " PPFC " $@; +am__v_PPFC_1 = +FCLD = $(FC) +FCLINK = $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \ + $@ +AM_V_FCLD = $(am__v_FCLD_@AM_V@) +am__v_FCLD_ = $(am__v_FCLD_@AM_DEFAULT_V@) +am__v_FCLD_0 = @echo " FCLD " $@; +am__v_FCLD_1 = +SOURCES = $(lib11_memory_mpi_a_SOURCES) +DIST_SOURCES = $(lib11_memory_mpi_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ABINIT_BINARY_PACKAGE = @ABINIT_BINARY_PACKAGE@ +ABINIT_COMMON_CPPFLAGS = @ABINIT_COMMON_CPPFLAGS@ +ABINIT_COMMON_FCFLAGS = @ABINIT_COMMON_FCFLAGS@ +ABINIT_COMMON_LDFLAGS = @ABINIT_COMMON_LDFLAGS@ +ABINIT_COMMON_LIBS = @ABINIT_COMMON_LIBS@ +ABINIT_TARGET = @ABINIT_TARGET@ +ABINIT_VERSION = @ABINIT_VERSION@ +ABINIT_VERSION_BASE = @ABINIT_VERSION_BASE@ +ABINIT_VERSION_BUILD = @ABINIT_VERSION_BUILD@ +ABINIT_VERSION_MAJOR = @ABINIT_VERSION_MAJOR@ +ABINIT_VERSION_MICRO = @ABINIT_VERSION_MICRO@ +ABINIT_VERSION_MINOR = @ABINIT_VERSION_MINOR@ +ABI_CPPFLAGS = @ABI_CPPFLAGS@ +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +ARFLAGS = @ARFLAGS@ +ARFLAGS_CMD = @ARFLAGS_CMD@ +ARFLAGS_DEBUG = @ARFLAGS_DEBUG@ +ARFLAGS_EXTRA = @ARFLAGS_EXTRA@ +ARFLAGS_HINTS = @ARFLAGS_HINTS@ +ARFLAGS_OPTIM = @ARFLAGS_OPTIM@ +ATOMPAW_BIN = @ATOMPAW_BIN@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BIGDFT_CPPFLAGS = @BIGDFT_CPPFLAGS@ +BIGDFT_FCFLAGS = @BIGDFT_FCFLAGS@ +BIGDFT_LDFLAGS = @BIGDFT_LDFLAGS@ +BIGDFT_LIBS = @BIGDFT_LIBS@ +BOURNE_SHELL = @BOURNE_SHELL@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CC_LDFLAGS = @CC_LDFLAGS@ +CC_LDFLAGS_DEBUG = @CC_LDFLAGS_DEBUG@ +CC_LDFLAGS_EXTRA = @CC_LDFLAGS_EXTRA@ +CC_LDFLAGS_GPU = @CC_LDFLAGS_GPU@ +CC_LDFLAGS_HINTS = @CC_LDFLAGS_HINTS@ +CC_LDFLAGS_OPTIM = @CC_LDFLAGS_OPTIM@ +CC_LIBS = @CC_LIBS@ +CC_LIBS_DEBUG = @CC_LIBS_DEBUG@ +CC_LIBS_EXTRA = @CC_LIBS_EXTRA@ +CC_LIBS_GPU = @CC_LIBS_GPU@ +CC_LIBS_HINTS = @CC_LIBS_HINTS@ +CC_LIBS_OPTIM = @CC_LIBS_OPTIM@ +CFLAGS = @CFLAGS@ +CFLAGS_DEBUG = @CFLAGS_DEBUG@ +CFLAGS_EXTRA = @CFLAGS_EXTRA@ +CFLAGS_GPU = @CFLAGS_GPU@ +CFLAGS_HINTS = @CFLAGS_HINTS@ +CFLAGS_OPTIM = @CFLAGS_OPTIM@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CPPFLAGS_DEBUG = @CPPFLAGS_DEBUG@ +CPPFLAGS_EXTRA = @CPPFLAGS_EXTRA@ +CPPFLAGS_GPU = @CPPFLAGS_GPU@ +CPPFLAGS_HINTS = @CPPFLAGS_HINTS@ +CPPFLAGS_HINTS_EXT = @CPPFLAGS_HINTS_EXT@ +CPPFLAGS_OPTIM = @CPPFLAGS_OPTIM@ +CXX = @CXX@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CXXFLAGS_DEBUG = @CXXFLAGS_DEBUG@ +CXXFLAGS_EXTRA = @CXXFLAGS_EXTRA@ +CXXFLAGS_GPU = @CXXFLAGS_GPU@ +CXXFLAGS_HINTS = @CXXFLAGS_HINTS@ +CXXFLAGS_OPTIM = @CXXFLAGS_OPTIM@ +CXX_LDFLAGS = @CXX_LDFLAGS@ +CXX_LDFLAGS_DEBUG = @CXX_LDFLAGS_DEBUG@ +CXX_LDFLAGS_EXTRA = @CXX_LDFLAGS_EXTRA@ +CXX_LDFLAGS_GPU = @CXX_LDFLAGS_GPU@ +CXX_LDFLAGS_HINTS = @CXX_LDFLAGS_HINTS@ +CXX_LDFLAGS_OPTIM = @CXX_LDFLAGS_OPTIM@ +CXX_LIBS = @CXX_LIBS@ +CXX_LIBS_DEBUG = @CXX_LIBS_DEBUG@ +CXX_LIBS_EXTRA = @CXX_LIBS_EXTRA@ +CXX_LIBS_GPU = @CXX_LIBS_GPU@ +CXX_LIBS_HINTS = @CXX_LIBS_HINTS@ +CXX_LIBS_OPTIM = @CXX_LIBS_OPTIM@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ +FCFLAGS = @FCFLAGS@ +FCFLAGS_DEBUG = @FCFLAGS_DEBUG@ +FCFLAGS_EXTRA = @FCFLAGS_EXTRA@ +FCFLAGS_F90 = @FCFLAGS_F90@ +FCFLAGS_FIXEDFORM = @FCFLAGS_FIXEDFORM@ +FCFLAGS_FREEFORM = @FCFLAGS_FREEFORM@ +FCFLAGS_HINTS = @FCFLAGS_HINTS@ +FCFLAGS_MODDIR = @FCFLAGS_MODDIR@ +FCFLAGS_OPENMP = @FCFLAGS_OPENMP@ +FCFLAGS_OPENMP_OFFLOAD = @FCFLAGS_OPENMP_OFFLOAD@ +FCFLAGS_OPTIM = @FCFLAGS_OPTIM@ +FCLIBS = @FCLIBS@ +FC_LDFLAGS = @FC_LDFLAGS@ +FC_LDFLAGS_DEBUG = @FC_LDFLAGS_DEBUG@ +FC_LDFLAGS_EXTRA = @FC_LDFLAGS_EXTRA@ +FC_LDFLAGS_HINTS = @FC_LDFLAGS_HINTS@ +FC_LDFLAGS_OPTIM = @FC_LDFLAGS_OPTIM@ +FC_LIBS = @FC_LIBS@ +FC_LIBS_DEBUG = @FC_LIBS_DEBUG@ +FC_LIBS_EXTRA = @FC_LIBS_EXTRA@ +FC_LIBS_HINTS = @FC_LIBS_HINTS@ +FC_LIBS_OPTIM = @FC_LIBS_OPTIM@ +FC_NOWRAP = @FC_NOWRAP@ +FFLAGS = @FFLAGS@ +FFTW3_CFLAGS = @FFTW3_CFLAGS@ +FFTW3_CPPFLAGS = @FFTW3_CPPFLAGS@ +FFTW3_FCFLAGS = @FFTW3_FCFLAGS@ +FFTW3_LDFLAGS = @FFTW3_LDFLAGS@ +FFTW3_LIBS = @FFTW3_LIBS@ +FFT_CFLAGS = @FFT_CFLAGS@ +FFT_FCFLAGS = @FFT_FCFLAGS@ +FPP = @FPP@ +FPPFLAGS = @FPPFLAGS@ +FPPFLAGS_DEBUG = @FPPFLAGS_DEBUG@ +FPPFLAGS_EXTRA = @FPPFLAGS_EXTRA@ +FPPFLAGS_HINTS = @FPPFLAGS_HINTS@ +FPPFLAGS_OPTIM = @FPPFLAGS_OPTIM@ +GPU_ARCH = @GPU_ARCH@ +GPU_CFLAGS = @GPU_CFLAGS@ +GPU_CPPFLAGS = @GPU_CPPFLAGS@ +GPU_CXXFLAGS = @GPU_CXXFLAGS@ +GPU_FCFLAGS = @GPU_FCFLAGS@ +GPU_LDFLAGS = @GPU_LDFLAGS@ +GPU_LIBS = @GPU_LIBS@ +GRAPHATOM_BIN = @GRAPHATOM_BIN@ +GREP = @GREP@ +H5CC = @H5CC@ +HDF5_CFLAGS = @HDF5_CFLAGS@ +HDF5_CPPFLAGS = @HDF5_CPPFLAGS@ +HDF5_CXXFLAGS = @HDF5_CXXFLAGS@ +HDF5_FCFLAGS = @HDF5_FCFLAGS@ +HDF5_LDFLAGS = @HDF5_LDFLAGS@ +HDF5_LIBS = @HDF5_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +LDFLAGS = @LDFLAGS@ +LEVMAR_CFLAGS = @LEVMAR_CFLAGS@ +LEVMAR_CPPFLAGS = @LEVMAR_CPPFLAGS@ +LEVMAR_LDFLAGS = @LEVMAR_LDFLAGS@ +LEVMAR_LIBS = @LEVMAR_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPAW_CPPFLAGS = @LIBPAW_CPPFLAGS@ +LIBPAW_FCFLAGS = @LIBPAW_FCFLAGS@ +LIBPAW_LDFLAGS = @LIBPAW_LDFLAGS@ +LIBPAW_LIBS = @LIBPAW_LIBS@ +LIBPSML_CPPFLAGS = @LIBPSML_CPPFLAGS@ +LIBPSML_FCFLAGS = @LIBPSML_FCFLAGS@ +LIBPSML_LDFLAGS = @LIBPSML_LDFLAGS@ +LIBPSML_LIBS = @LIBPSML_LIBS@ +LIBS = @LIBS@ +LIBXC_CFLAGS = @LIBXC_CFLAGS@ +LIBXC_CPPFLAGS = @LIBXC_CPPFLAGS@ +LIBXC_FCFLAGS = @LIBXC_FCFLAGS@ +LIBXC_LDFLAGS = @LIBXC_LDFLAGS@ +LIBXC_LIBS = @LIBXC_LIBS@ +LIBXML2_CPPFLAGS = @LIBXML2_CPPFLAGS@ +LIBXML2_FCFLAGS = @LIBXML2_FCFLAGS@ +LIBXML2_LIBS = @LIBXML2_LIBS@ +LINALG_CFLAGS = @LINALG_CFLAGS@ +LINALG_CPPFLAGS = @LINALG_CPPFLAGS@ +LINALG_CXXFLAGS = @LINALG_CXXFLAGS@ +LINALG_FCFLAGS = @LINALG_FCFLAGS@ +LINALG_LDFLAGS = @LINALG_LDFLAGS@ +LINALG_LIBS = @LINALG_LIBS@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODEXT = @MODEXT@ +MPI_CFLAGS = @MPI_CFLAGS@ +MPI_CPPFLAGS = @MPI_CPPFLAGS@ +MPI_CXXFLAGS = @MPI_CXXFLAGS@ +MPI_FCFLAGS = @MPI_FCFLAGS@ +MPI_LDFLAGS = @MPI_LDFLAGS@ +MPI_LIBS = @MPI_LIBS@ +MV = @MV@ +NETCDF_CFLAGS = @NETCDF_CFLAGS@ +NETCDF_CPPFLAGS = @NETCDF_CPPFLAGS@ +NETCDF_CXXFLAGS = @NETCDF_CXXFLAGS@ +NETCDF_FCFLAGS = @NETCDF_FCFLAGS@ +NETCDF_FORTRAN_CFLAGS = @NETCDF_FORTRAN_CFLAGS@ +NETCDF_FORTRAN_CPPFLAGS = @NETCDF_FORTRAN_CPPFLAGS@ +NETCDF_FORTRAN_CXXFLAGS = @NETCDF_FORTRAN_CXXFLAGS@ +NETCDF_FORTRAN_FCFLAGS = @NETCDF_FORTRAN_FCFLAGS@ +NETCDF_FORTRAN_LDFLAGS = @NETCDF_FORTRAN_LDFLAGS@ +NETCDF_FORTRAN_LIBS = @NETCDF_FORTRAN_LIBS@ +NETCDF_LDFLAGS = @NETCDF_LDFLAGS@ +NETCDF_LIBS = @NETCDF_LIBS@ +NVCC = @NVCC@ +NVCC_CFLAGS = @NVCC_CFLAGS@ +NVCC_CPPFLAGS = @NVCC_CPPFLAGS@ +NVCC_LDFLAGS = @NVCC_LDFLAGS@ +NVCC_LIBS = @NVCC_LIBS@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PAPI_CFLAGS = @PAPI_CFLAGS@ +PAPI_CPPFLAGS = @PAPI_CPPFLAGS@ +PAPI_LDFLAGS = @PAPI_LDFLAGS@ +PAPI_LIBS = @PAPI_LIBS@ +PATCH = @PATCH@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PFFT_CFLAGS = @PFFT_CFLAGS@ +PFFT_CPPFLAGS = @PFFT_CPPFLAGS@ +PFFT_LDFLAGS = @PFFT_LDFLAGS@ +PFFT_LIBS = @PFFT_LIBS@ +PYFLAGS = @PYFLAGS@ +PYTHON = @PYTHON@ +PYTHON_CONFIG = @PYTHON_CONFIG@ +PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ +RANLIB = @RANLIB@ +REALPATH = @REALPATH@ +RM = @RM@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +TAR = @TAR@ +TRIQS_CFLAGS = @TRIQS_CFLAGS@ +TRIQS_CPPFLAGS = @TRIQS_CPPFLAGS@ +TRIQS_CXXFLAGS = @TRIQS_CXXFLAGS@ +TRIQS_LDFLAGS = @TRIQS_LDFLAGS@ +TRIQS_LIBS = @TRIQS_LIBS@ +TRUE_CPP = @TRUE_CPP@ +VERSION = @VERSION@ +WANNIER90_CPPFLAGS = @WANNIER90_CPPFLAGS@ +WANNIER90_FCFLAGS = @WANNIER90_FCFLAGS@ +WANNIER90_LDFLAGS = @WANNIER90_LDFLAGS@ +WANNIER90_LIBS = @WANNIER90_LIBS@ +XML2_CONFIG = @XML2_CONFIG@ +XMLF90_CPPFLAGS = @XMLF90_CPPFLAGS@ +XMLF90_FCFLAGS = @XMLF90_FCFLAGS@ +XMLF90_LDFLAGS = @XMLF90_LDFLAGS@ +XMLF90_LIBS = @XMLF90_LIBS@ +XML_CPPFLAGS = @XML_CPPFLAGS@ +XML_LIBS = @XML_LIBS@ +XPP = @XPP@ +XPPFLAGS = @XPPFLAGS@ +XPPFLAGS_DEBUG = @XPPFLAGS_DEBUG@ +XPPFLAGS_EXTRA = @XPPFLAGS_EXTRA@ +XPPFLAGS_OPTIM = @XPPFLAGS_OPTIM@ +YAKL_CPPFLAGS = @YAKL_CPPFLAGS@ +YAKL_FCFLAGS = @YAKL_FCFLAGS@ +YAKL_LDFLAGS = @YAKL_LDFLAGS@ +YAKL_LIBS = @YAKL_LIBS@ +abi_ac_distcheck = @abi_ac_distcheck@ +abi_ac_version = @abi_ac_version@ +abi_am_version = @abi_am_version@ +abi_avx_safe_mode_enable = @abi_avx_safe_mode_enable@ +abi_bse_unpacked_enable = @abi_bse_unpacked_enable@ +abi_cc_path = @abi_cc_path@ +abi_cc_vendor = @abi_cc_vendor@ +abi_cc_version = @abi_cc_version@ +abi_cclock_enable = @abi_cclock_enable@ +abi_cpp_path = @abi_cpp_path@ +abi_cpu_64bits = @abi_cpu_64bits@ +abi_cpu_bits = @abi_cpu_bits@ +abi_cpu_model = @abi_cpu_model@ +abi_cpu_platform = @abi_cpu_platform@ +abi_cpu_spec = @abi_cpu_spec@ +abi_cpu_vendor = @abi_cpu_vendor@ +abi_crpa_optim_enable = @abi_crpa_optim_enable@ +abi_cxx_path = @abi_cxx_path@ +abi_cxx_vendor = @abi_cxx_vendor@ +abi_cxx_version = @abi_cxx_version@ +abi_debug_flavor = @abi_debug_flavor@ +abi_exports_enable = @abi_exports_enable@ +abi_fbk_abinit_common_ok = @abi_fbk_abinit_common_ok@ +abi_fbk_bigdft_ok = @abi_fbk_bigdft_ok@ +abi_fbk_config = @abi_fbk_config@ +abi_fbk_enable = @abi_fbk_enable@ +abi_fbk_fft_ok = @abi_fbk_fft_ok@ +abi_fbk_fftw3_ok = @abi_fbk_fftw3_ok@ +abi_fbk_gpu_ok = @abi_fbk_gpu_ok@ +abi_fbk_hdf5_ok = @abi_fbk_hdf5_ok@ +abi_fbk_init = @abi_fbk_init@ +abi_fbk_kokkos_ok = @abi_fbk_kokkos_ok@ +abi_fbk_levmar_ok = @abi_fbk_levmar_ok@ +abi_fbk_libpaw_ok = @abi_fbk_libpaw_ok@ +abi_fbk_libpsml_ok = @abi_fbk_libpsml_ok@ +abi_fbk_libxc_ok = @abi_fbk_libxc_ok@ +abi_fbk_libxml2_ok = @abi_fbk_libxml2_ok@ +abi_fbk_linalg_ok = @abi_fbk_linalg_ok@ +abi_fbk_list = @abi_fbk_list@ +abi_fbk_mpi_ok = @abi_fbk_mpi_ok@ +abi_fbk_netcdf_fortran_ok = @abi_fbk_netcdf_fortran_ok@ +abi_fbk_netcdf_ok = @abi_fbk_netcdf_ok@ +abi_fbk_papi_ok = @abi_fbk_papi_ok@ +abi_fbk_pfft_ok = @abi_fbk_pfft_ok@ +abi_fbk_prefix = @abi_fbk_prefix@ +abi_fbk_required = @abi_fbk_required@ +abi_fbk_triqs_ok = @abi_fbk_triqs_ok@ +abi_fbk_wannier90_ok = @abi_fbk_wannier90_ok@ +abi_fbk_xmlf90_ok = @abi_fbk_xmlf90_ok@ +abi_fbk_yakl_ok = @abi_fbk_yakl_ok@ +abi_fc_path = @abi_fc_path@ +abi_fc_vendor = @abi_fc_vendor@ +abi_fc_version = @abi_fc_version@ +abi_fc_wrap = @abi_fc_wrap@ +abi_fc_wrapper_enable = @abi_fc_wrapper_enable@ +abi_fpp_path = @abi_fpp_path@ +abi_gpu_arch = @abi_gpu_arch@ +abi_gpu_fcflags = @abi_gpu_fcflags@ +abi_gpu_flavor = @abi_gpu_flavor@ +abi_gpu_hip_libdir = @abi_gpu_hip_libdir@ +abi_gpu_incs = @abi_gpu_incs@ +abi_gpu_ldflags = @abi_gpu_ldflags@ +abi_gpu_libs = @abi_gpu_libs@ +abi_gpu_nvtx_v3 = @abi_gpu_nvtx_v3@ +abi_gpu_roctx = @abi_gpu_roctx@ +abi_gw_dpc_enable = @abi_gw_dpc_enable@ +abi_hints_enable = @abi_hints_enable@ +abi_libtetra_enable = @abi_libtetra_enable@ +abi_libxml2_cppflags = @abi_libxml2_cppflags@ +abi_libxml2_enable = @abi_libxml2_enable@ +abi_libxml2_fcflags = @abi_libxml2_fcflags@ +abi_libxml2_init = @abi_libxml2_init@ +abi_libxml2_ldflags = @abi_libxml2_ldflags@ +abi_libxml2_libs = @abi_libxml2_libs@ +abi_libxml2_ok = @abi_libxml2_ok@ +abi_libxml2_prefix = @abi_libxml2_prefix@ +abi_lotf_enable = @abi_lotf_enable@ +abi_lt_version = @abi_lt_version@ +abi_m4_version = @abi_m4_version@ +abi_memory_profiling_enable = @abi_memory_profiling_enable@ +abi_mpi_cflags = @abi_mpi_cflags@ +abi_mpi_cppflags = @abi_mpi_cppflags@ +abi_mpi_cxxflags = @abi_mpi_cxxflags@ +abi_mpi_enable = @abi_mpi_enable@ +abi_mpi_fcflags = @abi_mpi_fcflags@ +abi_mpi_flavor = @abi_mpi_flavor@ +abi_mpi_gpu_aware_enable = @abi_mpi_gpu_aware_enable@ +abi_mpi_incs = @abi_mpi_incs@ +abi_mpi_inplace_enable = @abi_mpi_inplace_enable@ +abi_mpi_interfaces_bugfix_enable = @abi_mpi_interfaces_bugfix_enable@ +abi_mpi_io_default_enable = @abi_mpi_io_default_enable@ +abi_mpi_io_enable = @abi_mpi_io_enable@ +abi_mpi_ldflags = @abi_mpi_ldflags@ +abi_mpi_level = @abi_mpi_level@ +abi_mpi_libs = @abi_mpi_libs@ +abi_netcdf_default_enable = @abi_netcdf_default_enable@ +abi_openmp_enable = @abi_openmp_enable@ +abi_openmp_offload_enable = @abi_openmp_offload_enable@ +abi_optim_flavor = @abi_optim_flavor@ +abi_python_invocation_enable = @abi_python_invocation_enable@ +abi_source_debug_enable = @abi_source_debug_enable@ +abi_stdin_enable = @abi_stdin_enable@ +abi_sys_spec = @abi_sys_spec@ +abi_timer_enable = @abi_timer_enable@ +abi_triqs_v1_4_enable = @abi_triqs_v1_4_enable@ +abi_triqs_v2_0_enable = @abi_triqs_v2_0_enable@ +abi_zdot_bugfix_enable = @abi_zdot_bugfix_enable@ +abinit_bindir = @abinit_bindir@ +abinit_builddir = @abinit_builddir@ +abinit_chkdir = @abinit_chkdir@ +abinit_datdir = @abinit_datdir@ +abinit_docdir = @abinit_docdir@ +abinit_incdir = @abinit_incdir@ +abinit_libdir = @abinit_libdir@ +abinit_mandir = @abinit_mandir@ +abinit_prefix = @abinit_prefix@ +abinit_srcdir = @abinit_srcdir@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_FC = @ac_ct_FC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cc_info_string = @cc_info_string@ +cxx_info_string = @cxx_info_string@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +enable_avx_safe_mode = @enable_avx_safe_mode@ +enable_bse_unpacked = @enable_bse_unpacked@ +enable_cclock = @enable_cclock@ +enable_crpa_optim = @enable_crpa_optim@ +enable_exports = @enable_exports@ +enable_fc_wrapper = @enable_fc_wrapper@ +enable_gw_dpc = @enable_gw_dpc@ +enable_hints = @enable_hints@ +enable_libtetra = @enable_libtetra@ +enable_lotf = @enable_lotf@ +enable_memory_profiling = @enable_memory_profiling@ +enable_mpi_gpu_aware = @enable_mpi_gpu_aware@ +enable_mpi_inplace = @enable_mpi_inplace@ +enable_mpi_interfaces_bugfix = @enable_mpi_interfaces_bugfix@ +enable_mpi_io = @enable_mpi_io@ +enable_mpi_io_default = @enable_mpi_io_default@ +enable_netcdf_default = @enable_netcdf_default@ +enable_openmp = @enable_openmp@ +enable_openmp_offload = @enable_openmp_offload@ +enable_python_invocation = @enable_python_invocation@ +enable_shared = @enable_shared@ +enable_source_debug = @enable_source_debug@ +enable_static = @enable_static@ +enable_stdin = @enable_stdin@ +enable_timer = @enable_timer@ +enable_triqs_v1_4 = @enable_triqs_v1_4@ +enable_triqs_v2_0 = @enable_triqs_v2_0@ +enable_zdot_bugfix = @enable_zdot_bugfix@ +exec_prefix = @exec_prefix@ +fc_info_string = @fc_info_string@ +fc_mod_fcflags = @fc_mod_fcflags@ +fc_timing = @fc_timing@ +fcflags_opt_02_clib = @fcflags_opt_02_clib@ +fcflags_opt_10_defs = @fcflags_opt_10_defs@ +fcflags_opt_11_memory_mpi = @fcflags_opt_11_memory_mpi@ +fcflags_opt_12_hide_mpi = @fcflags_opt_12_hide_mpi@ +fcflags_opt_14_hidewrite = @fcflags_opt_14_hidewrite@ +fcflags_opt_16_hideleave = @fcflags_opt_16_hideleave@ +fcflags_opt_16_kokkos_toolbox = @fcflags_opt_16_kokkos_toolbox@ +fcflags_opt_17_gpu_toolbox = @fcflags_opt_17_gpu_toolbox@ +fcflags_opt_17_libtetra_ext = @fcflags_opt_17_libtetra_ext@ +fcflags_opt_17_minimax = @fcflags_opt_17_minimax@ +fcflags_opt_17_yaml_out = @fcflags_opt_17_yaml_out@ +fcflags_opt_18_timing = @fcflags_opt_18_timing@ +fcflags_opt_21_hashfuncs = @fcflags_opt_21_hashfuncs@ +fcflags_opt_27_toolbox_oop = @fcflags_opt_27_toolbox_oop@ +fcflags_opt_28_numeric_noabirule = @fcflags_opt_28_numeric_noabirule@ +fcflags_opt_29_kpoints = @fcflags_opt_29_kpoints@ +fcflags_opt_32_util = @fcflags_opt_32_util@ +fcflags_opt_33_xc_lowlevel = @fcflags_opt_33_xc_lowlevel@ +fcflags_opt_39_libpaw = @fcflags_opt_39_libpaw@ +fcflags_opt_41_geometry = @fcflags_opt_41_geometry@ +fcflags_opt_42_nlstrain = @fcflags_opt_42_nlstrain@ +fcflags_opt_42_parser = @fcflags_opt_42_parser@ +fcflags_opt_43_ptgroups = @fcflags_opt_43_ptgroups@ +fcflags_opt_43_wvl_wrappers = @fcflags_opt_43_wvl_wrappers@ +fcflags_opt_44_abitools = @fcflags_opt_44_abitools@ +fcflags_opt_44_abitypes_defs = @fcflags_opt_44_abitypes_defs@ +fcflags_opt_44_manage_kokkos = @fcflags_opt_44_manage_kokkos@ +fcflags_opt_45_geomoptim = @fcflags_opt_45_geomoptim@ +fcflags_opt_45_xgTools = @fcflags_opt_45_xgTools@ +fcflags_opt_46_ghc_omp = @fcflags_opt_46_ghc_omp@ +fcflags_opt_46_manage_cuda = @fcflags_opt_46_manage_cuda@ +fcflags_opt_48_diago = @fcflags_opt_48_diago@ +fcflags_opt_49_gw_toolbox_oop = @fcflags_opt_49_gw_toolbox_oop@ +fcflags_opt_51_manage_mpi = @fcflags_opt_51_manage_mpi@ +fcflags_opt_52_fft_mpi_noabirule = @fcflags_opt_52_fft_mpi_noabirule@ +fcflags_opt_53_ffts = @fcflags_opt_53_ffts@ +fcflags_opt_54_spacepar = @fcflags_opt_54_spacepar@ +fcflags_opt_55_abiutil = @fcflags_opt_55_abiutil@ +fcflags_opt_56_io_mpi = @fcflags_opt_56_io_mpi@ +fcflags_opt_56_mixing = @fcflags_opt_56_mixing@ +fcflags_opt_56_recipspace = @fcflags_opt_56_recipspace@ +fcflags_opt_56_xc = @fcflags_opt_56_xc@ +fcflags_opt_57_iopsp_parser = @fcflags_opt_57_iopsp_parser@ +fcflags_opt_57_iovars = @fcflags_opt_57_iovars@ +fcflags_opt_61_occeig = @fcflags_opt_61_occeig@ +fcflags_opt_62_cg_noabirule = @fcflags_opt_62_cg_noabirule@ +fcflags_opt_62_ctqmc = @fcflags_opt_62_ctqmc@ +fcflags_opt_62_iowfdenpot = @fcflags_opt_62_iowfdenpot@ +fcflags_opt_62_poisson = @fcflags_opt_62_poisson@ +fcflags_opt_62_wvl_wfs = @fcflags_opt_62_wvl_wfs@ +fcflags_opt_64_psp = @fcflags_opt_64_psp@ +fcflags_opt_65_lotf_base = @fcflags_opt_65_lotf_base@ +fcflags_opt_65_paw = @fcflags_opt_65_paw@ +fcflags_opt_66_nonlocal = @fcflags_opt_66_nonlocal@ +fcflags_opt_66_vdwxc = @fcflags_opt_66_vdwxc@ +fcflags_opt_66_wfs = @fcflags_opt_66_wfs@ +fcflags_opt_67_common = @fcflags_opt_67_common@ +fcflags_opt_67_python_invocation_ext = @fcflags_opt_67_python_invocation_ext@ +fcflags_opt_67_triqs_ext = @fcflags_opt_67_triqs_ext@ +fcflags_opt_68_dmft = @fcflags_opt_68_dmft@ +fcflags_opt_68_lotf = @fcflags_opt_68_lotf@ +fcflags_opt_68_recursion = @fcflags_opt_68_recursion@ +fcflags_opt_68_rsprc = @fcflags_opt_68_rsprc@ +fcflags_opt_69_wfdesc = @fcflags_opt_69_wfdesc@ +fcflags_opt_70_gw = @fcflags_opt_70_gw@ +fcflags_opt_71_bse = @fcflags_opt_71_bse@ +fcflags_opt_71_wannier = @fcflags_opt_71_wannier@ +fcflags_opt_72_response = @fcflags_opt_72_response@ +fcflags_opt_77_ddb = @fcflags_opt_77_ddb@ +fcflags_opt_77_suscep = @fcflags_opt_77_suscep@ +fcflags_opt_78_effpot = @fcflags_opt_78_effpot@ +fcflags_opt_78_eph = @fcflags_opt_78_eph@ +fcflags_opt_79_seqpar_mpi = @fcflags_opt_79_seqpar_mpi@ +fcflags_opt_80_rttddft = @fcflags_opt_80_rttddft@ +fcflags_opt_80_tdep = @fcflags_opt_80_tdep@ +fcflags_opt_94_scfcv = @fcflags_opt_94_scfcv@ +fcflags_opt_95_drive = @fcflags_opt_95_drive@ +fcflags_opt_98_main = @fcflags_opt_98_main@ +fcflags_opt_bigdft = @fcflags_opt_bigdft@ +fcflags_opt_default = @fcflags_opt_default@ +fcflags_opt_hdf5 = @fcflags_opt_hdf5@ +fcflags_opt_levmar = @fcflags_opt_levmar@ +fcflags_opt_libpsml = @fcflags_opt_libpsml@ +fcflags_opt_libxc = @fcflags_opt_libxc@ +fcflags_opt_libxml2 = @fcflags_opt_libxml2@ +fcflags_opt_linalg = @fcflags_opt_linalg@ +fcflags_opt_netcdf = @fcflags_opt_netcdf@ +fcflags_opt_netcdf_fortran = @fcflags_opt_netcdf_fortran@ +fcflags_opt_papi = @fcflags_opt_papi@ +fcflags_opt_triqs = @fcflags_opt_triqs@ +fcflags_opt_wannier90 = @fcflags_opt_wannier90@ +fcflags_opt_xmlf90 = @fcflags_opt_xmlf90@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sd_abinit_common_cppflags = @sd_abinit_common_cppflags@ +sd_abinit_common_enable = @sd_abinit_common_enable@ +sd_abinit_common_enable_def = @sd_abinit_common_enable_def@ +sd_abinit_common_fcflags = @sd_abinit_common_fcflags@ +sd_abinit_common_init = @sd_abinit_common_init@ +sd_abinit_common_ldflags = @sd_abinit_common_ldflags@ +sd_abinit_common_libs = @sd_abinit_common_libs@ +sd_abinit_common_ok = @sd_abinit_common_ok@ +sd_abinit_common_options = @sd_abinit_common_options@ +sd_abinit_common_policy = @sd_abinit_common_policy@ +sd_abinit_common_status = @sd_abinit_common_status@ +sd_bigdft_cppflags = @sd_bigdft_cppflags@ +sd_bigdft_enable = @sd_bigdft_enable@ +sd_bigdft_enable_def = @sd_bigdft_enable_def@ +sd_bigdft_fcflags = @sd_bigdft_fcflags@ +sd_bigdft_init = @sd_bigdft_init@ +sd_bigdft_ldflags = @sd_bigdft_ldflags@ +sd_bigdft_libs = @sd_bigdft_libs@ +sd_bigdft_ok = @sd_bigdft_ok@ +sd_bigdft_options = @sd_bigdft_options@ +sd_bigdft_policy = @sd_bigdft_policy@ +sd_bigdft_status = @sd_bigdft_status@ +sd_fft_cflags = @sd_fft_cflags@ +sd_fft_choices = @sd_fft_choices@ +sd_fft_cppflags = @sd_fft_cppflags@ +sd_fft_cxxflags = @sd_fft_cxxflags@ +sd_fft_enable = @sd_fft_enable@ +sd_fft_fcflags = @sd_fft_fcflags@ +sd_fft_flavor = @sd_fft_flavor@ +sd_fft_init = @sd_fft_init@ +sd_fft_ldflags = @sd_fft_ldflags@ +sd_fft_libs = @sd_fft_libs@ +sd_fft_ok = @sd_fft_ok@ +sd_fftw3_cflags = @sd_fftw3_cflags@ +sd_fftw3_cppflags = @sd_fftw3_cppflags@ +sd_fftw3_enable = @sd_fftw3_enable@ +sd_fftw3_enable_def = @sd_fftw3_enable_def@ +sd_fftw3_fcflags = @sd_fftw3_fcflags@ +sd_fftw3_init = @sd_fftw3_init@ +sd_fftw3_ldflags = @sd_fftw3_ldflags@ +sd_fftw3_libs = @sd_fftw3_libs@ +sd_fftw3_ok = @sd_fftw3_ok@ +sd_fftw3_options = @sd_fftw3_options@ +sd_fftw3_policy = @sd_fftw3_policy@ +sd_fftw3_status = @sd_fftw3_status@ +sd_gpu_cflags = @sd_gpu_cflags@ +sd_gpu_cppflags = @sd_gpu_cppflags@ +sd_gpu_cxxflags = @sd_gpu_cxxflags@ +sd_gpu_enable = @sd_gpu_enable@ +sd_gpu_enable_def = @sd_gpu_enable_def@ +sd_gpu_fcflags = @sd_gpu_fcflags@ +sd_gpu_init = @sd_gpu_init@ +sd_gpu_ldflags = @sd_gpu_ldflags@ +sd_gpu_libs = @sd_gpu_libs@ +sd_gpu_ok = @sd_gpu_ok@ +sd_gpu_options = @sd_gpu_options@ +sd_gpu_policy = @sd_gpu_policy@ +sd_gpu_prefix = @sd_gpu_prefix@ +sd_gpu_status = @sd_gpu_status@ +sd_hdf5_cflags = @sd_hdf5_cflags@ +sd_hdf5_cppflags = @sd_hdf5_cppflags@ +sd_hdf5_cxxflags = @sd_hdf5_cxxflags@ +sd_hdf5_enable = @sd_hdf5_enable@ +sd_hdf5_enable_def = @sd_hdf5_enable_def@ +sd_hdf5_enable_fc = @sd_hdf5_enable_fc@ +sd_hdf5_fcflags = @sd_hdf5_fcflags@ +sd_hdf5_h5cc = @sd_hdf5_h5cc@ +sd_hdf5_h5fc = @sd_hdf5_h5fc@ +sd_hdf5_init = @sd_hdf5_init@ +sd_hdf5_ldflags = @sd_hdf5_ldflags@ +sd_hdf5_libs = @sd_hdf5_libs@ +sd_hdf5_ok = @sd_hdf5_ok@ +sd_hdf5_options = @sd_hdf5_options@ +sd_hdf5_policy = @sd_hdf5_policy@ +sd_hdf5_status = @sd_hdf5_status@ +sd_kokkos_cppflags = @sd_kokkos_cppflags@ +sd_kokkos_cxxflags = @sd_kokkos_cxxflags@ +sd_kokkos_enable = @sd_kokkos_enable@ +sd_kokkos_enable_def = @sd_kokkos_enable_def@ +sd_kokkos_init = @sd_kokkos_init@ +sd_kokkos_ldflags = @sd_kokkos_ldflags@ +sd_kokkos_libs = @sd_kokkos_libs@ +sd_kokkos_ok = @sd_kokkos_ok@ +sd_kokkos_options = @sd_kokkos_options@ +sd_kokkos_policy = @sd_kokkos_policy@ +sd_kokkos_status = @sd_kokkos_status@ +sd_levmar_cflags = @sd_levmar_cflags@ +sd_levmar_cppflags = @sd_levmar_cppflags@ +sd_levmar_enable = @sd_levmar_enable@ +sd_levmar_enable_def = @sd_levmar_enable_def@ +sd_levmar_init = @sd_levmar_init@ +sd_levmar_ldflags = @sd_levmar_ldflags@ +sd_levmar_libs = @sd_levmar_libs@ +sd_levmar_ok = @sd_levmar_ok@ +sd_levmar_options = @sd_levmar_options@ +sd_levmar_policy = @sd_levmar_policy@ +sd_levmar_status = @sd_levmar_status@ +sd_libpaw_cppflags = @sd_libpaw_cppflags@ +sd_libpaw_enable = @sd_libpaw_enable@ +sd_libpaw_enable_def = @sd_libpaw_enable_def@ +sd_libpaw_fcflags = @sd_libpaw_fcflags@ +sd_libpaw_init = @sd_libpaw_init@ +sd_libpaw_ldflags = @sd_libpaw_ldflags@ +sd_libpaw_libs = @sd_libpaw_libs@ +sd_libpaw_ok = @sd_libpaw_ok@ +sd_libpaw_options = @sd_libpaw_options@ +sd_libpaw_policy = @sd_libpaw_policy@ +sd_libpaw_status = @sd_libpaw_status@ +sd_libpsml_cppflags = @sd_libpsml_cppflags@ +sd_libpsml_enable = @sd_libpsml_enable@ +sd_libpsml_enable_def = @sd_libpsml_enable_def@ +sd_libpsml_fcflags = @sd_libpsml_fcflags@ +sd_libpsml_init = @sd_libpsml_init@ +sd_libpsml_ldflags = @sd_libpsml_ldflags@ +sd_libpsml_libs = @sd_libpsml_libs@ +sd_libpsml_ok = @sd_libpsml_ok@ +sd_libpsml_options = @sd_libpsml_options@ +sd_libpsml_policy = @sd_libpsml_policy@ +sd_libpsml_status = @sd_libpsml_status@ +sd_libxc_cflags = @sd_libxc_cflags@ +sd_libxc_cppflags = @sd_libxc_cppflags@ +sd_libxc_enable = @sd_libxc_enable@ +sd_libxc_enable_def = @sd_libxc_enable_def@ +sd_libxc_enable_fc = @sd_libxc_enable_fc@ +sd_libxc_fcflags = @sd_libxc_fcflags@ +sd_libxc_init = @sd_libxc_init@ +sd_libxc_ldflags = @sd_libxc_ldflags@ +sd_libxc_libs = @sd_libxc_libs@ +sd_libxc_ok = @sd_libxc_ok@ +sd_libxc_options = @sd_libxc_options@ +sd_libxc_policy = @sd_libxc_policy@ +sd_libxc_status = @sd_libxc_status@ +sd_linalg_cflags = @sd_linalg_cflags@ +sd_linalg_choices = @sd_linalg_choices@ +sd_linalg_cppflags = @sd_linalg_cppflags@ +sd_linalg_cxxflags = @sd_linalg_cxxflags@ +sd_linalg_enable = @sd_linalg_enable@ +sd_linalg_fcflags = @sd_linalg_fcflags@ +sd_linalg_flavor = @sd_linalg_flavor@ +sd_linalg_has_elpa = @sd_linalg_has_elpa@ +sd_linalg_has_scalapack = @sd_linalg_has_scalapack@ +sd_linalg_init = @sd_linalg_init@ +sd_linalg_ldflags = @sd_linalg_ldflags@ +sd_linalg_libs = @sd_linalg_libs@ +sd_linalg_ok = @sd_linalg_ok@ +sd_mpi_cc = @sd_mpi_cc@ +sd_mpi_cflags = @sd_mpi_cflags@ +sd_mpi_cppflags = @sd_mpi_cppflags@ +sd_mpi_cxx = @sd_mpi_cxx@ +sd_mpi_enable = @sd_mpi_enable@ +sd_mpi_enable_cxx = @sd_mpi_enable_cxx@ +sd_mpi_enable_def = @sd_mpi_enable_def@ +sd_mpi_enable_fc = @sd_mpi_enable_fc@ +sd_mpi_fc = @sd_mpi_fc@ +sd_mpi_fcflags = @sd_mpi_fcflags@ +sd_mpi_init = @sd_mpi_init@ +sd_mpi_ldflags = @sd_mpi_ldflags@ +sd_mpi_libs = @sd_mpi_libs@ +sd_mpi_ok = @sd_mpi_ok@ +sd_mpi_options = @sd_mpi_options@ +sd_mpi_policy = @sd_mpi_policy@ +sd_mpi_status = @sd_mpi_status@ +sd_netcdf_cflags = @sd_netcdf_cflags@ +sd_netcdf_cppflags = @sd_netcdf_cppflags@ +sd_netcdf_enable = @sd_netcdf_enable@ +sd_netcdf_enable_def = @sd_netcdf_enable_def@ +sd_netcdf_fcflags = @sd_netcdf_fcflags@ +sd_netcdf_fortran_cflags = @sd_netcdf_fortran_cflags@ +sd_netcdf_fortran_cppflags = @sd_netcdf_fortran_cppflags@ +sd_netcdf_fortran_enable = @sd_netcdf_fortran_enable@ +sd_netcdf_fortran_enable_def = @sd_netcdf_fortran_enable_def@ +sd_netcdf_fortran_fcflags = @sd_netcdf_fortran_fcflags@ +sd_netcdf_fortran_init = @sd_netcdf_fortran_init@ +sd_netcdf_fortran_ldflags = @sd_netcdf_fortran_ldflags@ +sd_netcdf_fortran_libs = @sd_netcdf_fortran_libs@ +sd_netcdf_fortran_ok = @sd_netcdf_fortran_ok@ +sd_netcdf_fortran_options = @sd_netcdf_fortran_options@ +sd_netcdf_fortran_policy = @sd_netcdf_fortran_policy@ +sd_netcdf_fortran_status = @sd_netcdf_fortran_status@ +sd_netcdf_init = @sd_netcdf_init@ +sd_netcdf_ldflags = @sd_netcdf_ldflags@ +sd_netcdf_libs = @sd_netcdf_libs@ +sd_netcdf_ok = @sd_netcdf_ok@ +sd_netcdf_options = @sd_netcdf_options@ +sd_netcdf_policy = @sd_netcdf_policy@ +sd_netcdf_status = @sd_netcdf_status@ +sd_papi_cflags = @sd_papi_cflags@ +sd_papi_cppflags = @sd_papi_cppflags@ +sd_papi_enable = @sd_papi_enable@ +sd_papi_enable_def = @sd_papi_enable_def@ +sd_papi_init = @sd_papi_init@ +sd_papi_ldflags = @sd_papi_ldflags@ +sd_papi_libs = @sd_papi_libs@ +sd_papi_ok = @sd_papi_ok@ +sd_papi_options = @sd_papi_options@ +sd_papi_policy = @sd_papi_policy@ +sd_papi_sd_papi_fcflags = @sd_papi_sd_papi_fcflags@ +sd_papi_status = @sd_papi_status@ +sd_pfft_cflags = @sd_pfft_cflags@ +sd_pfft_cppflags = @sd_pfft_cppflags@ +sd_pfft_enable = @sd_pfft_enable@ +sd_pfft_enable_def = @sd_pfft_enable_def@ +sd_pfft_init = @sd_pfft_init@ +sd_pfft_ldflags = @sd_pfft_ldflags@ +sd_pfft_libs = @sd_pfft_libs@ +sd_pfft_ok = @sd_pfft_ok@ +sd_pfft_options = @sd_pfft_options@ +sd_pfft_policy = @sd_pfft_policy@ +sd_pfft_status = @sd_pfft_status@ +sd_sys_fcflags = @sd_sys_fcflags@ +sd_triqs_cflags = @sd_triqs_cflags@ +sd_triqs_cppflags = @sd_triqs_cppflags@ +sd_triqs_cxxflags = @sd_triqs_cxxflags@ +sd_triqs_enable = @sd_triqs_enable@ +sd_triqs_enable_def = @sd_triqs_enable_def@ +sd_triqs_fcflags = @sd_triqs_fcflags@ +sd_triqs_init = @sd_triqs_init@ +sd_triqs_ldflags = @sd_triqs_ldflags@ +sd_triqs_libs = @sd_triqs_libs@ +sd_triqs_ok = @sd_triqs_ok@ +sd_triqs_options = @sd_triqs_options@ +sd_triqs_policy = @sd_triqs_policy@ +sd_triqs_status = @sd_triqs_status@ +sd_wannier90_cppflags = @sd_wannier90_cppflags@ +sd_wannier90_enable = @sd_wannier90_enable@ +sd_wannier90_enable_def = @sd_wannier90_enable_def@ +sd_wannier90_fcflags = @sd_wannier90_fcflags@ +sd_wannier90_init = @sd_wannier90_init@ +sd_wannier90_ldflags = @sd_wannier90_ldflags@ +sd_wannier90_libs = @sd_wannier90_libs@ +sd_wannier90_ok = @sd_wannier90_ok@ +sd_wannier90_options = @sd_wannier90_options@ +sd_wannier90_policy = @sd_wannier90_policy@ +sd_wannier90_status = @sd_wannier90_status@ +sd_xmlf90_cppflags = @sd_xmlf90_cppflags@ +sd_xmlf90_enable = @sd_xmlf90_enable@ +sd_xmlf90_enable_def = @sd_xmlf90_enable_def@ +sd_xmlf90_fcflags = @sd_xmlf90_fcflags@ +sd_xmlf90_init = @sd_xmlf90_init@ +sd_xmlf90_ldflags = @sd_xmlf90_ldflags@ +sd_xmlf90_libs = @sd_xmlf90_libs@ +sd_xmlf90_ok = @sd_xmlf90_ok@ +sd_xmlf90_options = @sd_xmlf90_options@ +sd_xmlf90_policy = @sd_xmlf90_policy@ +sd_xmlf90_status = @sd_xmlf90_status@ +sd_yakl_cppflags = @sd_yakl_cppflags@ +sd_yakl_enable = @sd_yakl_enable@ +sd_yakl_enable_def = @sd_yakl_enable_def@ +sd_yakl_fcflags = @sd_yakl_fcflags@ +sd_yakl_init = @sd_yakl_init@ +sd_yakl_ldflags = @sd_yakl_ldflags@ +sd_yakl_libs = @sd_yakl_libs@ +sd_yakl_ok = @sd_yakl_ok@ +sd_yakl_options = @sd_yakl_options@ +sd_yakl_policy = @sd_yakl_policy@ +sd_yakl_status = @sd_yakl_status@ +sharedstatedir = @sharedstatedir@ +src_02_clib_fcflags = @src_02_clib_fcflags@ +src_10_defs_fcflags = @src_10_defs_fcflags@ +src_11_memory_mpi_fcflags = @src_11_memory_mpi_fcflags@ +src_12_hide_mpi_fcflags = @src_12_hide_mpi_fcflags@ +src_14_hidewrite_fcflags = @src_14_hidewrite_fcflags@ +src_16_hideleave_fcflags = @src_16_hideleave_fcflags@ +src_16_kokkos_toolbox_fcflags = @src_16_kokkos_toolbox_fcflags@ +src_17_gpu_toolbox_fcflags = @src_17_gpu_toolbox_fcflags@ +src_17_libtetra_ext_fcflags = @src_17_libtetra_ext_fcflags@ +src_17_minimax_fcflags = @src_17_minimax_fcflags@ +src_17_yaml_out_fcflags = @src_17_yaml_out_fcflags@ +src_18_timing_fcflags = @src_18_timing_fcflags@ +src_21_hashfuncs_fcflags = @src_21_hashfuncs_fcflags@ +src_27_toolbox_oop_fcflags = @src_27_toolbox_oop_fcflags@ +src_28_numeric_noabirule_fcflags = @src_28_numeric_noabirule_fcflags@ +src_29_kpoints_fcflags = @src_29_kpoints_fcflags@ +src_32_util_fcflags = @src_32_util_fcflags@ +src_33_xc_lowlevel_fcflags = @src_33_xc_lowlevel_fcflags@ +src_39_libpaw_fcflags = @src_39_libpaw_fcflags@ +src_41_geometry_fcflags = @src_41_geometry_fcflags@ +src_42_nlstrain_fcflags = @src_42_nlstrain_fcflags@ +src_42_parser_fcflags = @src_42_parser_fcflags@ +src_43_ptgroups_fcflags = @src_43_ptgroups_fcflags@ +src_43_wvl_wrappers_fcflags = @src_43_wvl_wrappers_fcflags@ +src_44_abitools_fcflags = @src_44_abitools_fcflags@ +src_44_abitypes_defs_fcflags = @src_44_abitypes_defs_fcflags@ +src_44_manage_kokkos_fcflags = @src_44_manage_kokkos_fcflags@ +src_45_geomoptim_fcflags = @src_45_geomoptim_fcflags@ +src_45_xgTools_fcflags = @src_45_xgTools_fcflags@ +src_46_ghc_omp_fcflags = @src_46_ghc_omp_fcflags@ +src_46_manage_cuda_fcflags = @src_46_manage_cuda_fcflags@ +src_48_diago_fcflags = @src_48_diago_fcflags@ +src_49_gw_toolbox_oop_fcflags = @src_49_gw_toolbox_oop_fcflags@ +src_51_manage_mpi_fcflags = @src_51_manage_mpi_fcflags@ +src_52_fft_mpi_noabirule_fcflags = @src_52_fft_mpi_noabirule_fcflags@ +src_53_ffts_fcflags = @src_53_ffts_fcflags@ +src_54_spacepar_fcflags = @src_54_spacepar_fcflags@ +src_55_abiutil_fcflags = @src_55_abiutil_fcflags@ +src_56_io_mpi_fcflags = @src_56_io_mpi_fcflags@ +src_56_mixing_fcflags = @src_56_mixing_fcflags@ +src_56_recipspace_fcflags = @src_56_recipspace_fcflags@ +src_56_xc_fcflags = @src_56_xc_fcflags@ +src_57_iopsp_parser_fcflags = @src_57_iopsp_parser_fcflags@ +src_57_iovars_fcflags = @src_57_iovars_fcflags@ +src_61_occeig_fcflags = @src_61_occeig_fcflags@ +src_62_cg_noabirule_fcflags = @src_62_cg_noabirule_fcflags@ +src_62_ctqmc_fcflags = @src_62_ctqmc_fcflags@ +src_62_iowfdenpot_fcflags = @src_62_iowfdenpot_fcflags@ +src_62_poisson_fcflags = @src_62_poisson_fcflags@ +src_62_wvl_wfs_fcflags = @src_62_wvl_wfs_fcflags@ +src_64_psp_fcflags = @src_64_psp_fcflags@ +src_65_lotf_base_fcflags = @src_65_lotf_base_fcflags@ +src_65_paw_fcflags = @src_65_paw_fcflags@ +src_66_nonlocal_fcflags = @src_66_nonlocal_fcflags@ +src_66_vdwxc_fcflags = @src_66_vdwxc_fcflags@ +src_66_wfs_fcflags = @src_66_wfs_fcflags@ +src_67_common_fcflags = @src_67_common_fcflags@ +src_67_python_invocation_ext_fcflags = @src_67_python_invocation_ext_fcflags@ +src_67_triqs_ext_fcflags = @src_67_triqs_ext_fcflags@ +src_68_dmft_fcflags = @src_68_dmft_fcflags@ +src_68_lotf_fcflags = @src_68_lotf_fcflags@ +src_68_recursion_fcflags = @src_68_recursion_fcflags@ +src_68_rsprc_fcflags = @src_68_rsprc_fcflags@ +src_69_wfdesc_fcflags = @src_69_wfdesc_fcflags@ +src_70_gw_fcflags = @src_70_gw_fcflags@ +src_71_bse_fcflags = @src_71_bse_fcflags@ +src_71_wannier_fcflags = @src_71_wannier_fcflags@ +src_72_response_fcflags = @src_72_response_fcflags@ +src_77_ddb_fcflags = @src_77_ddb_fcflags@ +src_77_suscep_fcflags = @src_77_suscep_fcflags@ +src_78_effpot_fcflags = @src_78_effpot_fcflags@ +src_78_eph_fcflags = @src_78_eph_fcflags@ +src_79_seqpar_mpi_fcflags = @src_79_seqpar_mpi_fcflags@ +src_80_rttddft_fcflags = @src_80_rttddft_fcflags@ +src_80_tdep_fcflags = @src_80_tdep_fcflags@ +src_94_scfcv_fcflags = @src_94_scfcv_fcflags@ +src_95_drive_fcflags = @src_95_drive_fcflags@ +src_common_fcflags = @src_common_fcflags@ +src_core_fcflags = @src_core_fcflags@ +src_libpaw_fcflags = @src_libpaw_fcflags@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +with_abinit_common = @with_abinit_common@ +with_bigdft = @with_bigdft@ +with_config_file = @with_config_file@ +with_debug_flavor = @with_debug_flavor@ +with_fallbacks = @with_fallbacks@ +with_fc_vendor = @with_fc_vendor@ +with_fc_version = @with_fc_version@ +with_fft_flavor = @with_fft_flavor@ +with_fftw3 = @with_fftw3@ +with_gnu_ld = @with_gnu_ld@ +with_gpu = @with_gpu@ +with_hdf5 = @with_hdf5@ +with_kokkos = @with_kokkos@ +with_levmar = @with_levmar@ +with_libpaw = @with_libpaw@ +with_libpsml = @with_libpsml@ +with_libxc = @with_libxc@ +with_libxml2 = @with_libxml2@ +with_linalg_flavor = @with_linalg_flavor@ +with_mpi = @with_mpi@ +with_mpi_level = @with_mpi_level@ +with_netcdf = @with_netcdf@ +with_optim_flavor = @with_optim_flavor@ +with_papi = @with_papi@ +with_pfft = @with_pfft@ +with_triqs = @with_triqs@ +with_wannier90 = @with_wannier90@ +with_xmlf90 = @with_xmlf90@ +with_yakl = @with_yakl@ +AM_CFLAGS = @ABI_CPPFLAGS@ +AM_CXXFLAGS = $(sd_triqs_cxxflags) +AM_FCFLAGS = @FPPFLAGS@ @FCFLAGS_FREEFORM@ @FCFLAGS_MODDIR@ @sd_sys_fcflags@ @fcflags_opt_11_memory_mpi@ +AM_CPPFLAGS = \ + @src_02_clib_fcflags@ \ + @src_10_defs_fcflags@ \ + @src_common_fcflags@ \ + @src_core_fcflags@ \ + @src_libpaw_fcflags@ \ + @sd_mpi_cppflags@ \ + @sd_mpi_fcflags@ \ + @fc_mod_fcflags@ + + +# Regular source files +lib11_memory_mpi_srcs = \ + m_profiling_abi.F90 + + +# Source files depending on conditionals + +# Library description +noinst_LIBRARIES = lib11_memory_mpi.a +lib11_memory_mpi_a_SOURCES = $(lib11_memory_mpi_srcs) + +# Dependencies (inside the directory) of directory 11_memory_mpi +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. +CLEANFILES = m_profiling_abi_cpp.f90 m_profiling_abi.$(MODEXT) +EXTRA_DIST = abinit.src abinit.dep _11_memory_mpi_ +all: all-am + +.SUFFIXES: +.SUFFIXES: .F90 .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu shared/common/src/11_memory_mpi/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu shared/common/src/11_memory_mpi/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) + +lib11_memory_mpi.a: $(lib11_memory_mpi_a_OBJECTS) $(lib11_memory_mpi_a_DEPENDENCIES) $(EXTRA_lib11_memory_mpi_a_DEPENDENCIES) + $(AM_V_at)-rm -f lib11_memory_mpi.a + $(AM_V_AR)$(lib11_memory_mpi_a_AR) lib11_memory_mpi.a $(lib11_memory_mpi_a_OBJECTS) $(lib11_memory_mpi_a_LIBADD) + $(AM_V_at)$(RANLIB) lib11_memory_mpi.a + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +.F90.o: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ $< + +.F90.obj: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-noinstLIBRARIES cscopelist-am ctags ctags-am distclean \ + distclean-compile distclean-generic distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am + +.PRECIOUS: Makefile + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/GX-PAW/common/src/11_memory_mpi/_11_memory_mpi_ b/GX-PAW/common/src/11_memory_mpi/_11_memory_mpi_ new file mode 100644 index 00000000..63b36800 --- /dev/null +++ b/GX-PAW/common/src/11_memory_mpi/_11_memory_mpi_ @@ -0,0 +1,19 @@ +!!****d* ABINIT/11_memory_mpi +!! NAME +!! 11_memory_mpi +!! +!! DESCRIPTION +!! FIXME: Description is missing +!! +!! COPYRIGHT +!! Copyright (C) 1998-2024 ABINIT group +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! For the initials of contributors, see ~abinit/doc/developers/contributors.txt . +!! +!! CHILDREN +!! interfaces_11_memory_mpi.F90 +!! m_profiling_abi.F90 +!! +!!*** diff --git a/GX-PAW/common/src/11_memory_mpi/__pycache__/abinit.cpython-36.pyc b/GX-PAW/common/src/11_memory_mpi/__pycache__/abinit.cpython-36.pyc new file mode 100644 index 00000000..c8cd5dee Binary files /dev/null and b/GX-PAW/common/src/11_memory_mpi/__pycache__/abinit.cpython-36.pyc differ diff --git a/GX-PAW/common/src/11_memory_mpi/abinit.dep b/GX-PAW/common/src/11_memory_mpi/abinit.dep new file mode 100644 index 00000000..b00b3de2 --- /dev/null +++ b/GX-PAW/common/src/11_memory_mpi/abinit.dep @@ -0,0 +1,9 @@ +# Dependencies (inside the directory) of directory 11_memory_mpi +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. + +CLEANFILES += \ + m_profiling_abi.$(MODEXT) + diff --git a/GX-PAW/common/src/11_memory_mpi/abinit.dir b/GX-PAW/common/src/11_memory_mpi/abinit.dir new file mode 100644 index 00000000..0567e292 --- /dev/null +++ b/GX-PAW/common/src/11_memory_mpi/abinit.dir @@ -0,0 +1,8 @@ +# Dependencies (outside the directory) of directory 11_memory_mpi +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. + +include_dirs = \ +['02_clib', '10_defs'] \ No newline at end of file diff --git a/GX-PAW/common/src/11_memory_mpi/abinit.src b/GX-PAW/common/src/11_memory_mpi/abinit.src new file mode 100644 index 00000000..79953e84 --- /dev/null +++ b/GX-PAW/common/src/11_memory_mpi/abinit.src @@ -0,0 +1,24 @@ +# -*- Python -*- +# +# Copyright (C) 2005-2024 ABINIT Group (Yann Pouillon) +# +# This file is part of the ABINIT software package. For license information, +# please see the COPYING file in the top-level directory of the ABINIT source +# distribution. +# + +# +# Source files making up the 56_mixing library +# + +# Source file attributes +ABI_SRC_NIL = 0 # No attribute +ABI_SRC_BLT = 1 # The file is built by a script +ABI_SRC_DEP = 2 # The file depends on other files + +# Source files +sources = [ + "m_profiling_abi.F90", + ] +# IMPORTANT : please use the alphabetic order in the previous list. Do NOT add the new routine names at the end of the list. +# This is important to avoid numerous conflicts at merge time. Thank you very much. Xavier. diff --git a/GX-PAW/common/src/11_memory_mpi/lib11_memory_mpi.a b/GX-PAW/common/src/11_memory_mpi/lib11_memory_mpi.a new file mode 100644 index 00000000..dde90431 Binary files /dev/null and b/GX-PAW/common/src/11_memory_mpi/lib11_memory_mpi.a differ diff --git a/GX-PAW/common/src/11_memory_mpi/m_profiling_abi.F90 b/GX-PAW/common/src/11_memory_mpi/m_profiling_abi.F90 new file mode 100644 index 00000000..18bff820 --- /dev/null +++ b/GX-PAW/common/src/11_memory_mpi/m_profiling_abi.F90 @@ -0,0 +1,681 @@ +!!****m* ABINIT/m_profiling_abi +!! NAME +!! m_profiling_abi +!! +!! FUNCTION +!! This module is used for tracing memory allocations/deallocations +!! when we compile the code with --enable-memory-profiling="yes" that, +!! in turn, defines the CPP macro HAVE_MEM_PROFILE in abi_common.h +!! The main entry point is abimem_init. abimem_record is interfaced via CPP macros +!! defined in abi_common +!! +!! COPYRIGHT +!! Copyright (C) 2010-2024 ABINIT group (MG) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! NOTES +!! This module is not thread-safe. However, this should not represent +!! a significant limitation since memory-tracing is only enabled in debug mode. + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" + +module m_profiling_abi + + use defs_basis + use, intrinsic :: iso_c_binding + use m_clib +#ifdef HAVE_MPI2 + use mpi +#endif + + implicit none + + private +!!*** + +#if defined HAVE_MPI1 + include 'mpif.h' +#endif + +#define _ABORT(msg) call abimem_abort(msg, __FILE__, __LINE__) + + public :: abimem_get_info + public :: abimem_init ! Initialize memory profiling. + public :: abimem_set_snapshot_time ! Set time interface for snapshots. + public :: abimem_shutdown ! Final cleanup. + public :: abimem_report ! Print allocation status. + public :: abimem_record ! Central routine to be used for allocation/deallocation. + ! Interfaced via CPP macros defined in abi_common.h + + integer,private,parameter :: slen = 500 + character(fnlen),parameter :: NONE_STRING = "__NONE_STRING__" + +!!****t* m_profiling_abi/abimem_t +!! NAME +!! minfo_t +!! +!! FUNCTION +!! Internal datastructure storing information on the memory allocated at run-time +!! +!! SOURCE + + type :: abimem_t + + integer :: level = huge(1) + ! Integer selecting the operation mode + ! The initial value is set to huge so that main executables that don't call abimem_init will + ! produce an Error when the first alocation is performed and abimem_record is invoked. + + integer(i8b) :: memory = 0 + ! Total memory allocated so far in bytes. + + integer(i8b) :: peak = 0 + ! Memory peak in bytes. + + integer :: peak_fileline = -1 + ! Line in peak_file + + integer(i8b) :: num_alloc = 0 + ! Total numer of allocations performed so far. + + integer(i8b) :: num_free = 0 + ! Total numer of deallocations performed so far. + + integer :: logunt = 99 + ! Unit number of logfile (hardcoded) + + integer :: my_rank = 0 + ! Rank of this processor. + + logical :: iwrite = .False. + ! True if this MPI rank should write to file. + + !real(dp),private,save :: start_time + ! Origin of time in seconds. + + real(dp) :: last_snapshot = -one + ! time of the last snapshot in seconds. + + real(dp) :: dt_snapshot = -one + ! time between two consecutive snapshots in seconds. + + real(dp) :: limit_mb = 20_dp + ! Optional memory limit in Mb. used when level == 3 + + character(len=slen) :: peak_vname = "_vname" + ! Name of the last variable for which the memory peak occurred. + + character(len=slen) :: peak_file = NONE_STRING + ! Name of the file in which peak occurred. + + ! Selective memory tracing + character(fnlen) :: select_file = NONE_STRING + + character(len=fnlen) :: logfile + ! File used for logging allocations/deallocations. + + end type abimem_t +!!*** + + type(abimem_t),private,save :: minfo + ! Internal datastructure storing memory profiling data. + + interface + subroutine clib_get_meminfo(nalloc_c, nfree_c) bind(C, name="clib_get_meminfo") + import + integer(c_long),intent(out) :: nalloc_c, nfree_c + end subroutine clib_get_meminfo + end interface + +contains + +!!****f* m_profiling_abi/abimem_init +!! NAME +!! abimem_init +!! +!! FUNCTION +!! Initialize memory profiling module. +!! +!! INPUT +!! level = Integer selecting the operation mode: +!! 0 -> no file abimem.mocc is created, only memory allocation counters running +!! 1 -> light version. Only memory peaks are written. +!! 2 -> file abimem.mocc is created with full information inside. +!! 3 -> Write info only if allocation/deallocation is larger or smaller than limit_mb +!! depending on of the sign of limit_mb +!! NOTE: By default, only master node writes, use negative values to make all MPI procs write info to disk. +!! [delta_time]=Interval in second for snapshots. Will write report to std_out every delta_time seconds. +!! [filename] = If present, activate memory logging only inside filename (basename). +!! [limit_mb]= Set memory limit in Mb if level == 3. Print allocation/deallocation only above this limit. +!! Positive value to print above the threshold. +!! Negative value to print below the threshold. + +subroutine abimem_init(level, delta_time, filename, limit_mb) + +!Arguments ------------------------------------ + integer, intent(in) :: level + real(dp),optional,intent(in) :: delta_time + real(dp),optional,intent(in) :: limit_mb + character(len=*),optional,intent(in) :: filename + +!Local variables------------------------------- + integer :: ierr + logical :: file_exists + character(len=500) :: msg +! ************************************************************************* + + !write(std_out, "(a,i0)")"Initializing abimem profiling with level: ", level + + minfo%level = level + !start_time = abimem_wtime() + + ! Optionally, selects functions or files to be profiled. + if (present(filename)) then + if (len_trim(filename) > 0) minfo%select_file = filename + end if + + ! Optionally, set max limit in Mb used if level == 2 + if (present(limit_mb)) minfo%limit_mb = limit_mb + + ! Build name of file used for logging. + minfo%my_rank = 0 +#if defined HAVE_MPI + call MPI_COMM_RANK(MPI_COMM_WORLD, minfo%my_rank, ierr) +#endif + write(minfo%logfile,"(a,i0,a)")"abimem_rank",minfo%my_rank,".mocc" + + ! Clean the file if it already exists. + inquire(file=minfo%logfile, exist=file_exists) + if (file_exists) then + open(unit=minfo%logunt, file=minfo%logfile, status="old", iostat=ierr) + if (ierr==0) close(unit=minfo%logunt, status="delete", iostat=ierr) + end if + + ! Activate snapshots. + if (present(delta_time)) then + minfo%dt_snapshot = delta_time + minfo%last_snapshot = zero + if (delta_time < 1.0e-6) then + _ABORT("delta_time is too small") + end if + end if + + select case (abs(minfo%level)) + case (0) + ! No action required + + case (1, 2, 3) + minfo%iwrite = .False. + if (minfo%my_rank == 0) minfo%iwrite = .True. + if (minfo%level < 0) minfo%iwrite = .False. + if (minfo%iwrite) then + open(unit=minfo%logunt, file=minfo%logfile, status='unknown', action='write', iostat=ierr) + if (ierr /= 0) then + _ABORT("Opening abimem file") + end if + if (minfo%level == 1) call write_header("# Write memory allocations larger than previous peak") + if (minfo%level == 2) call write_header("# To be used for inspecting a variable which is not deallocated") + if (minfo%level == 3) then + if (minfo%limit_mb > zero) then + write(msg, "(a,f9.1,a)")"# Write memory allocations/deallocations larger than ", minfo%limit_mb, "(MB)" + else + write(msg, "(a,f9.1,a)")"# Write memory allocations/deallocations below than ", abs(minfo%limit_mb), "(MB)" + end if + call write_header(msg) + end if + end if + + case default + write(msg, "(a,i0,2a)") & + "Invalid value for abimem_level:", minfo%level, ch10, & + "Make sure you are calling abimem_init and abinit_doctor in main!" + _ABORT(msg) + end select + + contains + + subroutine write_header(info) + character(len=*),intent(in) :: info + write(minfo%logunt, "(a, i0)")"# memocc file generated by Abinit compiled with HAVE_MEM_PROFILE." + write(minfo%logunt, "(a)") trim(info) + write(minfo%logunt, "(2(a,i0),a)")"# {level: ", level, ", rank: ", minfo%my_rank, "}" + write(minfo%logunt,'(a,t60,a)')'# Variable name', 'Action Address Size[b] File Line Total Memory [bits]' + end subroutine write_header + +end subroutine abimem_init +!!*** + +!!****f* m_profiling_abi/abimem_set_snapshot_time +!! NAME +!! abimem_set_snapshot_time +!! +!! FUNCTION +!! Set time interface for snapshots. +!! +!! INPUT +!! delta_time=Interval in second for snapshots. +!! +!! INPUT + +subroutine abimem_set_snapshot_time(delta_time) + +!Arguments ------------------------------------ + real(dp),optional,intent(in) :: delta_time +! ************************************************************************* + + minfo%dt_snapshot = delta_time + minfo%last_snapshot = zero + if (delta_time < 1.0e-6) then + _ABORT("delta_time is too small") + end if + +end subroutine abimem_set_snapshot_time +!!*** + +!!****f* m_profiling_abi/abimem_shutdown +!! NAME +!! abimem_shutdown +!! +!! FUNCTION +!! Perform final cleanup of the module and close files. +!! +!! INPUT + +subroutine abimem_shutdown() + +!Local variables------------------------------- + integer :: unt_found + logical :: isopen +! ************************************************************************* + + minfo%level = 0 + + ! Close the file if it's connected + inquire(file=minfo%logfile, number=unt_found, opened=isopen) + if (isopen .and. unt_found == minfo%logunt) close(minfo%logunt) + +end subroutine abimem_shutdown +!!*** + +!!****f* m_profiling_abi/abimem_report +!! NAME +!! abimem_report +!! +!! FUNCTION +!! Print info about memory usage to unit `unt`. +!! Add mallinfo values if `with_mallinfo` (default: True) +!! +!! INPUT + +subroutine abimem_report(tag, unt, with_mallinfo) + +!Arguments ------------------------------------ + character(len=*),intent(in) :: tag + integer,intent(in) :: unt + logical,optional,intent(in) :: with_mallinfo + +!Local variables------------------------------- + integer,save :: icall = 0 + integer(i8b),save :: prev_memory + real(dp) :: diff_mb + real(dp), parameter :: byte2Mb = b2Mb / 8.0_dp + logical :: with_minfo + +! ************************************************************************* + + with_minfo = .True. + if (present(with_mallinfo)) with_minfo = with_mallinfo + if (with_minfo) call clib_print_mallinfo(unit=unt) + !call wrtout(std_out, sjoin("xmpi_count_requests", itoa(xmpi_count_requests))) + + if (minfo%level == huge(one)) return + + icall = icall + 1 + write(unt,"(a)")"------------------------- MEMORY CONSUMPTION REPORT -----------------------------" + write(unt,"(2a)")"tag: ", trim(tag) + write(unt,"(3(a,i0))")" Malloc: ",minfo%num_alloc,", Free: ", minfo%num_free, ", M-F: ", minfo%num_alloc - minfo%num_free + write(unt,"(a,f8.1,a)")" Memory allocated so far: ", minfo%memory * byte2Mb, " (Mb)" + write(unt,"(a,f8.1,5a,i0)")" Peak: ", minfo%peak * byte2Mb," (MB) for variable: ", trim(minfo%peak_vname), & + "at:", trim(abimem_basename(minfo%peak_file)),":",minfo%peak_fileline + diff_mb = zero; if (icall > 1) diff_mb = (minfo%memory - prev_memory) * byte2Mb + write(unt,"(a,f8.1,a)")" Memory allocated wrt previous call: ", diff_mb, " (Mb)" + prev_memory = minfo%memory + +end subroutine abimem_report +!!*** + +!!****f* m_profiling_abi/abimem_get_info +!! NAME +!! abimem_get_info +!! +!! FUNCTION +!! Function that returns the number of allocations and deallocations that have +!! been performed in Fortran and the memory currently used +!! +!! OUTPUT +!! nalloc: number of allocations that have been performed in Fortran +!! nfree: number of deallocations that have been performed in Fortran +!! allocmemory: total memory used (Fortran) +!! nalloc_c, nfree_c: Similar to nalloc and nfree but for the C code. + +subroutine abimem_get_info(nalloc, nfree, allocmemory, nalloc_c, nfree_c) + +!Arguments ------------------------------------ + integer(i8b),intent(out) :: nalloc, nfree, allocmemory, nalloc_c, nfree_c + +!Local variables------------------------------- + integer(c_long) :: long_nalloc_c, long_nfree_c +! ************************************************************************* + + nalloc = minfo%num_alloc; nfree = minfo%num_free; allocmemory = minfo%memory + + call clib_get_meminfo(long_nalloc_c, long_nfree_c) + nalloc_c = long_nalloc_c; nfree_c = long_nfree_c + +end subroutine abimem_get_info +!!*** + +!!****f* m_profiling_abi/abimem_record +!! NAME +!! abimem_record +!! +!! FUNCTION +!! Control the memory occupation by calculating the overall size of the allocated arrays +!! At the end of the calculation a short report is printed on the screen, +!! some information can be also written on disk following the needs +!! +!! SOURCE + +subroutine abimem_record(istat, vname, addr, act, isize, file, line) + +!Arguments ------------------------------------ + integer,intent(in) :: istat,line + integer(i8b), intent(in) :: isize,addr + character(len=*), intent(in) :: vname,act,file + +!Local variables------------------------------- + !integer :: ierr + !real(dp) :: now + logical :: do_log, new_peak + character(len=500) :: msg +! ************************************************************************* + + ! Handle possible allocate/deallocate failures. + if (istat /= 0) then + if (isize >= 0) then + write(msg,*)" Problem of allocation of variable: ",trim(vname),', error code= ',istat + _ABORT(msg) + else if (isize<0) then + write(msg,*)" Problem of deallocation of variable ",trim(vname),', error code= ',istat + _ABORT(msg) + end if + end if + + ! Increase total counter + minfo%memory = minfo%memory + isize + new_peak = .False. + if (isize > minfo%peak) then + ! New peak + new_peak = .True. + minfo%peak = isize + minfo%peak_vname = vname + minfo%peak_file = file + minfo%peak_fileline = line + end if + + if (isize > 0) then + minfo%num_alloc = minfo%num_alloc + 1 + else if (isize < 0) then + minfo%num_free = minfo%num_free + 1 + else + ! This is the correct check but tests fail! + !if (act == "A") then + ! minfo%num_alloc = minfo%num_alloc + 1 + !else if (act == "D") then + ! minfo%num_free = minfo%num_free + 1 + !else + ! _ABORT("Wrong action: "//trim(act)) + !end if + end if + + ! Selective memory tracing + do_log = .True. + if (minfo%select_file /= NONE_STRING) do_log = (minfo%select_file == file) + do_log = do_log .and. minfo%iwrite + + ! Snapshot (write to std_out) + !if (do_log .and. minfo%last_snapshot >= zero) then + ! now = abimem_wtime() + ! if (now - minfo%last_snapshot >= minfo%dt_snapshot) then + ! call abimem_report("", std_out) + ! minfo%last_snapshot = now + ! end if + !end if + + ! IMPORTANT: + ! Remember to change the pyton code in ~abinit/tests/pymods/memprof.py to account for changes in the format + if (do_log) then + select case (minfo%level) + case (0) + ! No action required + + case (1) + ! Write only if we have a new peak + if (new_peak) then + write(minfo%logunt,'(a,t60,a,1x,2(i0,1x),a,1x,2(i0,1x))') & + trim(vname), trim(act), addr, isize, trim(abimem_basename(file)), line, minfo%memory + end if + + case (2) + ! To be used for inspecting a variable which is not deallocated + write(minfo%logunt,'(a,t60,a,1x,2(i0,1x),a,1x,2(i0,1x))') & + trim(vname), trim(act), addr, isize, trim(abimem_basename(file)), line, minfo%memory + + case (3) + ! Write memory allocations larger than limit_mb + if ((abs(isize * b2Mb) > minfo%limit_mb .and. minfo%limit_mb > zero) .or. & + (abs(isize * b2Mb) < minfo%limit_mb .and. minfo%limit_mb < zero)) then + write(minfo%logunt,'(a,t60,a,1x,2(i0,1x),a,1x,2(i0,1x))') & + trim(vname), trim(act), addr, isize, trim(abimem_basename(file)), line, minfo%memory + end if + + case default + _ABORT("Invalid abimem_level") + end select + end if + +end subroutine abimem_record +!!*** + + +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! Private routine providing services already implemented in other higher level modules. +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +!!****f* m_abimem/abimem_abort +!! NAME +!! abimem_abort +!! +!! FUNCTION +!! Stop the code if an error occurs. +!! +!! INPUT +!! msg=Error message +!! file=File name +!! line=Line number +!! +!! SOURCE + +subroutine abimem_abort(msg, file, line) + +!Arguments ------------------------------------ + integer,intent(in) :: line + character(len=*),intent(in) :: msg,file + +!Local variables------------------------------- + integer :: ierr + +!Local variables------------------------------- + integer :: unt_found + logical :: isopen +! ************************************************************************* + + write(std_out,*)trim(msg),", file: ", trim(file), ", line: ", line + + ! Close logfile if it's connected to flush io buffers and avoid file corruption + inquire(file=minfo%logfile, number=unt_found, opened=isopen) + if (isopen .and. (unt_found == minfo%logunt)) close(unit=minfo%logunt) + + ierr = 0 +#ifdef HAVE_MPI + call MPI_ABORT(MPI_COMM_WORLD, MPI_ERR_UNKNOWN, ierr) +#endif + stop + +end subroutine abimem_abort +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_profiling_abi/abimem_basename +!! NAME +!! abimem_basename +!! +!! FUNCTION +!! Returns the final component of a pathname. +!! +!! INPUTS +!! string=The input string +!! +!! NOTES +!! * If the input string in not a valid path to a file (i.e not in the form foo/name) +!! a blank strink is returned +!! * We do a backward search becase we want to optimize the algorithm for Fortran strings. +!! +!! SOURCE + +pure function abimem_basename(string) result(basename) + + character(len=*),intent(in) :: string + character(len=LEN_TRIM(string)) :: basename + +!Local variables------------------------------- + integer :: ic,nch_trim,nch + character(len=1),parameter :: DIR_SEPARATOR = '/' + character(len=1),parameter :: BLANK=' ' +!************************************************************************ + + nch =LEN (string) + nch_trim=LEN_TRIM(string) + + ic = INDEX (TRIM(string), DIR_SEPARATOR, back=.TRUE.) + !write(*,*)'DEBUG ',TRIM(string),ic + + if (ic >= 1 .and. ic <= nch_trim-1) then ! there is stuff after the separator. + basename = string(ic+1:nch_trim) + return + else if (ic==0 .or. ic == nch_trim+1) then ! no separator in string or zero length string, + basename = TRIM(string) ! return trimmed string. + return + else ! (ic == nch_trim) separator is the last char. + basename= BLANK ! This is not a valid path to a file, return blank. + return + end if + +end function abimem_basename +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_time/abimem_wtime +!! NAME +!! abimem_wtime +!! +!! FUNCTION +!! Return wall clock time in seconds since some arbitrary start. +!! Call the F90 intrinsic date_and_time . +!! +!! INPUTS +!! (no inputs) +!! +!! OUTPUT +!! wall= wall clock time in seconds +!! +!! SOURCE + +function abimem_wtime() result(wall) + +!Arguments ------------------------------------ +!scalars + real(dp) :: wall + +!Local variables------------------------------- +!scalars +#ifndef HAVE_MPI + integer,parameter :: nday(24)=(/31,28,31,30,31,30,31,31,30,31,30,31,& +& 31,28,31,30,31,30,31,31,30,31,30,31/) + integer,save :: month_init,month_now,start=1,year_init + integer :: months + character(len=8) :: date + character(len=10) :: time + character(len=5) :: zone +!arrays + integer :: values(8) +#endif + +! ************************************************************************* + +#ifndef HAVE_MPI + +!The following section of code is standard F90, but it is useful only if the intrinsics +!date_and_time is accurate at the 0.01 sec level, which is not the case for a P6 with the pghpf compiler ... +!Year and month initialisation + if(start==1)then + start=0 + call date_and_time(date,time,zone,values) + year_init=values(1) + month_init=values(2) + end if + +!Uses intrinsic F90 subroutine Date_and_time for +!wall clock (not correct when a change of year happen) + call date_and_time(date,time,zone,values) + +!Compute first the number of seconds from the beginning of the month + wall=(values(3)*24.0d0+values(5))*3600.0d0+values(6)*60.0d0+values(7)+values(8)*0.001d0 + +!If the month has changed, compute the number of seconds +!to be added. This fails if the program ran one year !! + month_now=values(2) + if(month_now/=month_init)then + if(year_init+1==values(1))then + month_now=month_now+12 + end if + if(month_now<=month_init)then + _ABORT('Problem with month and year numbers.') + end if + do months=month_init,month_now-1 + wall=wall+86400.0d0*nday(months) + end do + end if + +!Now take into account bissextile years (I think 2000 is bissextile, but I am not sure ...) + if(mod(year_init,4)==0 .and. month_init<=2 .and. month_now>2) wall=wall+3600.0d0 + if(mod(values(1),4)==0 .and. month_init<=14 .and. month_now>14) wall=wall+3600.0d0 + +#else +!Use the timer provided by MPI1. + wall = MPI_WTIME() +#endif + +end function abimem_wtime +!!*** + +end module m_profiling_abi +!!*** diff --git a/GX-PAW/common/src/11_memory_mpi/m_profiling_abi.o b/GX-PAW/common/src/11_memory_mpi/m_profiling_abi.o new file mode 100644 index 00000000..38582aee Binary files /dev/null and b/GX-PAW/common/src/11_memory_mpi/m_profiling_abi.o differ diff --git a/GX-PAW/common/src/12_hide_mpi/Makefile b/GX-PAW/common/src/12_hide_mpi/Makefile new file mode 100644 index 00000000..44025645 --- /dev/null +++ b/GX-PAW/common/src/12_hide_mpi/Makefile @@ -0,0 +1,1488 @@ +# Makefile.in generated by automake 1.16.3 from Makefile.am. +# shared/common/src/12_hide_mpi/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994-2020 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-corelibs on 2024/03/16 21:07:38 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-corelibs script or its config file instead. +# + + +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/abinit +pkgincludedir = $(includedir)/abinit +pkglibdir = $(libdir)/abinit +pkglibexecdir = $(libexecdir)/abinit +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = x86_64-apple-darwin18.7.0 +host_triplet = x86_64-apple-darwin18.7.0 +target_triplet = x86_64-apple-darwin18.7.0 +subdir = shared/common/src/12_hide_mpi +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/m4/arch-gpu.m4 \ + $(top_srcdir)/config/m4/arch-mpi.m4 \ + $(top_srcdir)/config/m4/auto-autotools.m4 \ + $(top_srcdir)/config/m4/auto-corelibs.m4 \ + $(top_srcdir)/config/m4/auto-debug.m4 \ + $(top_srcdir)/config/m4/auto-dirflags.m4 \ + $(top_srcdir)/config/m4/auto-env.m4 \ + $(top_srcdir)/config/m4/auto-hints.m4 \ + $(top_srcdir)/config/m4/auto-optim.m4 \ + $(top_srcdir)/config/m4/auto-options.m4 \ + $(top_srcdir)/config/m4/auto-output.m4 \ + $(top_srcdir)/config/m4/auto-triggers.m4 \ + $(top_srcdir)/config/m4/conf-atompaw.m4 \ + $(top_srcdir)/config/m4/conf-debug.m4 \ + $(top_srcdir)/config/m4/conf-fallbacks.m4 \ + $(top_srcdir)/config/m4/conf-files.m4 \ + $(top_srcdir)/config/m4/conf-init.m4 \ + $(top_srcdir)/config/m4/conf-openmp.m4 \ + $(top_srcdir)/config/m4/conf-optim.m4 \ + $(top_srcdir)/config/m4/lang-c++.m4 \ + $(top_srcdir)/config/m4/lang-c.m4 \ + $(top_srcdir)/config/m4/lang-fortran-import.m4 \ + $(top_srcdir)/config/m4/lang-fortran.m4 \ + $(top_srcdir)/config/m4/lang-python.m4 \ + $(top_srcdir)/config/m4/libxml2.m4 \ + $(top_srcdir)/config/m4/misc-display.m4 \ + $(top_srcdir)/config/m4/sd_abinit_common.m4 \ + $(top_srcdir)/config/m4/sd_arch_gpu.m4 \ + $(top_srcdir)/config/m4/sd_arch_mpi.m4 \ + $(top_srcdir)/config/m4/sd_bigdft.m4 \ + $(top_srcdir)/config/m4/sd_core.m4 \ + $(top_srcdir)/config/m4/sd_esl.m4 \ + $(top_srcdir)/config/m4/sd_fftw3.m4 \ + $(top_srcdir)/config/m4/sd_gpu_kokkos.m4 \ + $(top_srcdir)/config/m4/sd_gpu_yakl.m4 \ + $(top_srcdir)/config/m4/sd_io_hdf5.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf_fortran.m4 \ + $(top_srcdir)/config/m4/sd_levmar.m4 \ + $(top_srcdir)/config/m4/sd_libpaw.m4 \ + $(top_srcdir)/config/m4/sd_libpsml.m4 \ + $(top_srcdir)/config/m4/sd_libxc.m4 \ + $(top_srcdir)/config/m4/sd_math_fft.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_core.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_util.m4 \ + $(top_srcdir)/config/m4/sd_papi.m4 \ + $(top_srcdir)/config/m4/sd_pfft.m4 \ + $(top_srcdir)/config/m4/sd_triqs.m4 \ + $(top_srcdir)/config/m4/sd_wannier90.m4 \ + $(top_srcdir)/config/m4/sd_xmlf90.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +AM_V_AR = $(am__v_AR_$(V)) +am__v_AR_ = $(am__v_AR_$(AM_DEFAULT_VERBOSITY)) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = +lib12_hide_mpi_a_AR = $(AR) $(ARFLAGS) +lib12_hide_mpi_a_LIBADD = +am__objects_1 = m_xmpi.$(OBJEXT) m_xomp.$(OBJEXT) +am_lib12_hide_mpi_a_OBJECTS = $(am__objects_1) +lib12_hide_mpi_a_OBJECTS = $(am_lib12_hide_mpi_a_OBJECTS) +AM_V_P = $(am__v_P_$(V)) +am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY)) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I. -I$(top_builddir) +PPFCCOMPILE = $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) +AM_V_PPFC = $(am__v_PPFC_$(V)) +am__v_PPFC_ = $(am__v_PPFC_$(AM_DEFAULT_VERBOSITY)) +am__v_PPFC_0 = @echo " PPFC " $@; +am__v_PPFC_1 = +FCLD = $(FC) +FCLINK = $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \ + $@ +AM_V_FCLD = $(am__v_FCLD_$(V)) +am__v_FCLD_ = $(am__v_FCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_FCLD_0 = @echo " FCLD " $@; +am__v_FCLD_1 = +SOURCES = $(lib12_hide_mpi_a_SOURCES) +DIST_SOURCES = $(lib12_hide_mpi_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in README +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ABINIT_BINARY_PACKAGE = abinit-10.0.0.83-58be4d_x86_64_darwin18.7.0_gnu9.4 +ABINIT_COMMON_CPPFLAGS = +ABINIT_COMMON_FCFLAGS = +ABINIT_COMMON_LDFLAGS = +ABINIT_COMMON_LIBS = +ABINIT_TARGET = x86_64_darwin18.7.0_gnu9.4 +ABINIT_VERSION = 10.0.0.83-58be4d +ABINIT_VERSION_BASE = 10.0 +ABINIT_VERSION_BUILD = 20240316 +ABINIT_VERSION_MAJOR = 10 +ABINIT_VERSION_MICRO = 0 +ABINIT_VERSION_MINOR = 0 +ABI_CPPFLAGS = -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include +ACLOCAL = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' aclocal-1.16 +AMTAR = $${TAR-tar} +AM_DEFAULT_VERBOSITY = 1 +AR = ar +ARFLAGS = rc +ARFLAGS_CMD = rc +ARFLAGS_DEBUG = +ARFLAGS_EXTRA = +ARFLAGS_HINTS = +ARFLAGS_OPTIM = +ATOMPAW_BIN = +AUTOCONF = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' autoconf +AUTOHEADER = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' autoheader +AUTOMAKE = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' automake-1.16 +AWK = awk +BIGDFT_CPPFLAGS = +BIGDFT_FCFLAGS = +BIGDFT_LDFLAGS = +BIGDFT_LIBS = +BOURNE_SHELL = /bin/sh +CC = /opt/local/bin/mpicc +CCDEPMODE = depmode=gcc3 +CC_LDFLAGS = +CC_LDFLAGS_DEBUG = +CC_LDFLAGS_EXTRA = +CC_LDFLAGS_GPU = +CC_LDFLAGS_HINTS = +CC_LDFLAGS_OPTIM = +CC_LIBS = +CC_LIBS_DEBUG = +CC_LIBS_EXTRA = +CC_LIBS_GPU = +CC_LIBS_HINTS = +CC_LIBS_OPTIM = +CFLAGS = -O2 -g +CFLAGS_DEBUG = +CFLAGS_EXTRA = +CFLAGS_GPU = +CFLAGS_HINTS = +CFLAGS_OPTIM = +CPP = /opt/local/bin/mpicc -E +CPPFLAGS = +CPPFLAGS_DEBUG = +CPPFLAGS_EXTRA = +CPPFLAGS_GPU = +CPPFLAGS_HINTS = +CPPFLAGS_HINTS_EXT = -P -std=c99 +CPPFLAGS_OPTIM = +CXX = /opt/local/bin/mpicxx +CXXDEPMODE = depmode=gcc3 +CXXFLAGS = -O2 -g +CXXFLAGS_DEBUG = +CXXFLAGS_EXTRA = +CXXFLAGS_GPU = +CXXFLAGS_HINTS = +CXXFLAGS_OPTIM = +CXX_LDFLAGS = +CXX_LDFLAGS_DEBUG = +CXX_LDFLAGS_EXTRA = +CXX_LDFLAGS_GPU = +CXX_LDFLAGS_HINTS = +CXX_LDFLAGS_OPTIM = +CXX_LIBS = +CXX_LIBS_DEBUG = +CXX_LIBS_EXTRA = +CXX_LIBS_GPU = +CXX_LIBS_HINTS = +CXX_LIBS_OPTIM = +CYGPATH_W = echo +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +ECHO_C = \c +ECHO_N = +ECHO_T = +EGREP = /usr/bin/grep -E +EXEEXT = +F77 = /opt/local/bin/mpif90 +FC = /opt/local/bin/mpif90 +FCFLAGS = -O2 -g -ffree-line-length-none -I/opt/local/include -I/opt/local/include -I/opt/local/include +FCFLAGS_DEBUG = +FCFLAGS_EXTRA = +FCFLAGS_F90 = +FCFLAGS_FIXEDFORM = -ffixed-form +FCFLAGS_FREEFORM = -ffree-form +FCFLAGS_HINTS = -ffree-line-length-none +FCFLAGS_MODDIR = -J../mods +FCFLAGS_OPENMP = +FCFLAGS_OPENMP_OFFLOAD = +FCFLAGS_OPTIM = +FCLIBS = -L/opt/local/lib -L/opt/local/lib/openmpi-gcc9 -L/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0 -L/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/../../.. -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi -lgfortran -lquadmath -lm +FC_LDFLAGS = +FC_LDFLAGS_DEBUG = +FC_LDFLAGS_EXTRA = +FC_LDFLAGS_HINTS = +FC_LDFLAGS_OPTIM = +FC_LIBS = +FC_LIBS_DEBUG = +FC_LIBS_EXTRA = +FC_LIBS_HINTS = +FC_LIBS_OPTIM = +FC_NOWRAP = /opt/local/bin/mpif90 +FFLAGS = -O2 -g -ffree-line-length-none -I/opt/local/include -I/opt/local/include -I/opt/local/include +FFTW3_CFLAGS = +FFTW3_CPPFLAGS = -I/opt/local/include +FFTW3_FCFLAGS = -I/opt/local/include +FFTW3_LDFLAGS = +FFTW3_LIBS = -L/opt/local/lib -lfftw3 -lfftw3f +FFT_CFLAGS = +FFT_FCFLAGS = +FPP = +FPPFLAGS = +FPPFLAGS_DEBUG = +FPPFLAGS_EXTRA = +FPPFLAGS_HINTS = +FPPFLAGS_OPTIM = +GPU_ARCH = +GPU_CFLAGS = +GPU_CPPFLAGS = +GPU_CXXFLAGS = +GPU_FCFLAGS = +GPU_LDFLAGS = +GPU_LIBS = +GRAPHATOM_BIN = +GREP = /usr/bin/grep +H5CC = +HDF5_CFLAGS = +HDF5_CPPFLAGS = +HDF5_CXXFLAGS = +HDF5_FCFLAGS = +HDF5_LDFLAGS = +HDF5_LIBS = +INSTALL = /opt/local/libexec/gnubin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +KOKKOS_CPPFLAGS = +KOKKOS_CXXFLAGS = +KOKKOS_LDFLAGS = +KOKKOS_LIBS = +LDFLAGS = +LEVMAR_CFLAGS = +LEVMAR_CPPFLAGS = +LEVMAR_LDFLAGS = +LEVMAR_LIBS = +LIBOBJS = +LIBPAW_CPPFLAGS = +LIBPAW_FCFLAGS = +LIBPAW_LDFLAGS = +LIBPAW_LIBS = +LIBPSML_CPPFLAGS = +LIBPSML_FCFLAGS = +LIBPSML_LDFLAGS = +LIBPSML_LIBS = +LIBS = -L/opt/local/lib -lwannier -L/opt/local/lib -lxc -L/opt/local/lib -lnetcdff -L/opt/local/lib -lnetcdf -L/opt/local/lib -L/opt/local/lib -lhdf5_hl -L/opt/local/lib -lhdf5 -lz -ldl -lm -L/opt/local/lib -lfftw3 -lfftw3f +LIBXC_CFLAGS = +LIBXC_CPPFLAGS = +LIBXC_FCFLAGS = +LIBXC_LDFLAGS = +LIBXC_LIBS = +LIBXML2_CPPFLAGS = +LIBXML2_FCFLAGS = +LIBXML2_LIBS = +LINALG_CFLAGS = +LINALG_CPPFLAGS = +LINALG_CXXFLAGS = +LINALG_FCFLAGS = -I/opt/local/include +LINALG_LDFLAGS = +LINALG_LIBS = -L/opt/local/lib -lopenblas +LN_S = ln -s +LTLIBOBJS = +MAKEINFO = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' makeinfo +MKDIR_P = /opt/local/libexec/gnubin/mkdir -p +MODEXT = mod +MPI_CFLAGS = +MPI_CPPFLAGS = +MPI_CXXFLAGS = +MPI_FCFLAGS = +MPI_LDFLAGS = +MPI_LIBS = +MV = /opt/local/libexec/gnubin/mv +NETCDF_CFLAGS = +NETCDF_CPPFLAGS = +NETCDF_CXXFLAGS = +NETCDF_FCFLAGS = +NETCDF_FORTRAN_CFLAGS = +NETCDF_FORTRAN_CPPFLAGS = +NETCDF_FORTRAN_CXXFLAGS = +NETCDF_FORTRAN_FCFLAGS = +NETCDF_FORTRAN_LDFLAGS = +NETCDF_FORTRAN_LIBS = +NETCDF_LDFLAGS = +NETCDF_LIBS = +NVCC = +NVCC_CFLAGS = +NVCC_CPPFLAGS = +NVCC_LDFLAGS = +NVCC_LIBS = +OBJEXT = o +PACKAGE = abinit +PACKAGE_BUGREPORT = https://bugs.launchpad.net/abinit/ +PACKAGE_NAME = ABINIT +PACKAGE_STRING = ABINIT 10.0.0.83-58be4d +PACKAGE_TARNAME = abinit +PACKAGE_URL = +PACKAGE_VERSION = 10.0.0.83-58be4d +PAPI_CFLAGS = +PAPI_CPPFLAGS = +PAPI_LDFLAGS = +PAPI_LIBS = +PATCH = patch +PATH_SEPARATOR = : +PERL = /usr/bin/perl +PFFT_CFLAGS = +PFFT_CPPFLAGS = +PFFT_LDFLAGS = +PFFT_LIBS = +PYFLAGS = +PYTHON = python3.9 +PYTHON_CONFIG = python3.9-config +PYTHON_CPPFLAGS = -I/opt/local/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -I/opt/local/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 +RANLIB = ranlib +REALPATH = realpath +RM = /opt/local/libexec/gnubin/rm +SED = /usr/bin/sed +SET_MAKE = +SHELL = /bin/sh +STRIP = +TAR = tar +TRIQS_CFLAGS = +TRIQS_CPPFLAGS = +TRIQS_CXXFLAGS = +TRIQS_LDFLAGS = +TRIQS_LIBS = +TRUE_CPP = cpp +VERSION = 10.0.0.83-58be4d +WANNIER90_CPPFLAGS = +WANNIER90_FCFLAGS = -I/opt/local/include +WANNIER90_LDFLAGS = +WANNIER90_LIBS = -L/opt/local/lib -lwannier +XML2_CONFIG = +XMLF90_CPPFLAGS = +XMLF90_FCFLAGS = +XMLF90_LDFLAGS = +XMLF90_LIBS = +XML_CPPFLAGS = +XML_LIBS = +XPP = +XPPFLAGS = +XPPFLAGS_DEBUG = +XPPFLAGS_EXTRA = +XPPFLAGS_OPTIM = +YAKL_CPPFLAGS = +YAKL_FCFLAGS = +YAKL_LDFLAGS = +YAKL_LIBS = +abi_ac_distcheck = --with-config-file="/Users/gonze/_Research/ABINIT_git/gonze/mac-1P0-225.ac9" +abi_ac_version = 027100 +abi_am_version = 011603 +abi_avx_safe_mode_enable = no +abi_bse_unpacked_enable = no +abi_cc_path = +abi_cc_vendor = gnu +abi_cc_version = 9.4 +abi_cclock_enable = no +abi_cpp_path = +abi_cpu_64bits = yes +abi_cpu_bits = 64 +abi_cpu_model = unknown +abi_cpu_platform = apple +abi_cpu_spec = unknown_unknown +abi_cpu_vendor = unknown +abi_crpa_optim_enable = no +abi_cxx_path = +abi_cxx_vendor = gnu +abi_cxx_version = 9.4 +abi_debug_flavor = basic +abi_exports_enable = no +abi_fbk_abinit_common_ok = no +abi_fbk_bigdft_ok = disabled +abi_fbk_config = +abi_fbk_enable = no +abi_fbk_fft_ok = no +abi_fbk_fftw3_ok = no +abi_fbk_gpu_ok = no +abi_fbk_hdf5_ok = disabled +abi_fbk_init = def +abi_fbk_kokkos_ok = no +abi_fbk_levmar_ok = no +abi_fbk_libpaw_ok = no +abi_fbk_libpsml_ok = disabled +abi_fbk_libxc_ok = disabled +abi_fbk_libxml2_ok = no +abi_fbk_linalg_ok = disabled +abi_fbk_list = +abi_fbk_mpi_ok = no +abi_fbk_netcdf_fortran_ok = disabled +abi_fbk_netcdf_ok = disabled +abi_fbk_papi_ok = no +abi_fbk_pfft_ok = no +abi_fbk_prefix = +abi_fbk_required = +abi_fbk_triqs_ok = no +abi_fbk_wannier90_ok = disabled +abi_fbk_xmlf90_ok = disabled +abi_fbk_yakl_ok = no +abi_fc_path = +abi_fc_vendor = gnu +abi_fc_version = 9.4 +abi_fc_wrap = no +abi_fc_wrapper_enable = no +abi_fpp_path = +abi_gpu_arch = +abi_gpu_fcflags = +abi_gpu_flavor = none +abi_gpu_hip_libdir = +abi_gpu_incs = +abi_gpu_ldflags = +abi_gpu_libs = +abi_gpu_nvtx_v3 = +abi_gpu_roctx = +abi_gw_dpc_enable = yes +abi_hints_enable = yes +abi_libtetra_enable = yes +abi_libxml2_cppflags = +abi_libxml2_enable = no +abi_libxml2_fcflags = +abi_libxml2_init = def +abi_libxml2_ldflags = +abi_libxml2_libs = +abi_libxml2_ok = unknown +abi_libxml2_prefix = +abi_lotf_enable = no +abi_lt_version = 020406 +abi_m4_version = 010419 +abi_memory_profiling_enable = no +abi_mpi_cflags = +abi_mpi_cppflags = +abi_mpi_cxxflags = +abi_mpi_enable = yes +abi_mpi_fcflags = +abi_mpi_flavor = auto +abi_mpi_gpu_aware_enable = no +abi_mpi_incs = +abi_mpi_inplace_enable = yes +abi_mpi_interfaces_bugfix_enable = no +abi_mpi_io_default_enable = no +abi_mpi_io_enable = yes +abi_mpi_ldflags = +abi_mpi_level = 2 +abi_mpi_libs = +abi_netcdf_default_enable = no +abi_openmp_enable = no +abi_openmp_offload_enable = no +abi_optim_flavor = standard +abi_python_invocation_enable = no +abi_source_debug_enable = no +abi_stdin_enable = yes +abi_sys_spec = darwin-x86_64 +abi_timer_enable = yes +abi_triqs_v1_4_enable = no +abi_triqs_v2_0_enable = no +abi_zdot_bugfix_enable = no +abinit_bindir = /usr/local/bin +abinit_builddir = /Users/gonze/_Research/ABINIT_git/gonze +abinit_chkdir = /usr/local/share/abinit/tests +abinit_datdir = /usr/local/share/abinit +abinit_docdir = /usr/local/doc/abinit +abinit_incdir = /usr/local/include +abinit_libdir = /usr/local/lib +abinit_mandir = /usr/local/share/man +abinit_prefix = /usr/local +abinit_srcdir = /Users/gonze/_Research/ABINIT_git/gonze +abs_builddir = /Users/gonze/_Research/ABINIT_git/gonze/shared/common/src/12_hide_mpi +abs_srcdir = /Users/gonze/_Research/ABINIT_git/gonze/shared/common/src/12_hide_mpi +abs_top_builddir = /Users/gonze/_Research/ABINIT_git/gonze +abs_top_srcdir = /Users/gonze/_Research/ABINIT_git/gonze +ac_ct_CC = +ac_ct_CXX = +ac_ct_FC = +am__include = include +am__leading_dot = . +am__quote = +am__tar = tar --format=ustar -chf - "$$tardir" +am__untar = tar -xf - +bindir = ${exec_prefix}/bin +build = x86_64-apple-darwin18.7.0 +build_alias = +build_cpu = x86_64 +build_os = darwin18.7.0 +build_vendor = apple +builddir = . +cc_info_string = gcc-mp-9 (MacPorts gcc9 9.4.0_0) 9.4.0 +cxx_info_string = g++-mp-9 (MacPorts gcc9 9.4.0_0) 9.4.0 +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +enable_avx_safe_mode = +enable_bse_unpacked = +enable_cclock = +enable_crpa_optim = +enable_exports = +enable_fc_wrapper = +enable_gw_dpc = yes +enable_hints = +enable_libtetra = +enable_lotf = +enable_memory_profiling = +enable_mpi_gpu_aware = +enable_mpi_inplace = +enable_mpi_interfaces_bugfix = +enable_mpi_io = yes +enable_mpi_io_default = +enable_netcdf_default = +enable_openmp = +enable_openmp_offload = +enable_python_invocation = +enable_shared = +enable_source_debug = +enable_static = +enable_stdin = +enable_timer = +enable_triqs_v1_4 = +enable_triqs_v2_0 = +enable_zdot_bugfix = +exec_prefix = ${prefix} +fc_info_string = GNU Fortran (MacPorts gcc9 9.4.0_0) 9.4.0 +fc_mod_fcflags = +fc_timing = standard +fcflags_opt_02_clib = +fcflags_opt_10_defs = +fcflags_opt_11_memory_mpi = +fcflags_opt_12_hide_mpi = +fcflags_opt_14_hidewrite = +fcflags_opt_16_hideleave = +fcflags_opt_16_kokkos_toolbox = +fcflags_opt_17_gpu_toolbox = +fcflags_opt_17_libtetra_ext = +fcflags_opt_17_minimax = +fcflags_opt_17_yaml_out = +fcflags_opt_18_timing = +fcflags_opt_21_hashfuncs = +fcflags_opt_27_toolbox_oop = +fcflags_opt_28_numeric_noabirule = +fcflags_opt_29_kpoints = +fcflags_opt_32_util = +fcflags_opt_33_xc_lowlevel = +fcflags_opt_39_libpaw = +fcflags_opt_41_geometry = +fcflags_opt_42_nlstrain = +fcflags_opt_42_parser = +fcflags_opt_43_ptgroups = -O0 +fcflags_opt_43_wvl_wrappers = +fcflags_opt_44_abitools = +fcflags_opt_44_abitypes_defs = +fcflags_opt_44_manage_kokkos = +fcflags_opt_45_geomoptim = +fcflags_opt_45_xgTools = +fcflags_opt_46_ghc_omp = +fcflags_opt_46_manage_cuda = +fcflags_opt_48_diago = +fcflags_opt_49_gw_toolbox_oop = +fcflags_opt_51_manage_mpi = +fcflags_opt_52_fft_mpi_noabirule = +fcflags_opt_53_ffts = +fcflags_opt_54_spacepar = +fcflags_opt_55_abiutil = +fcflags_opt_56_io_mpi = +fcflags_opt_56_mixing = +fcflags_opt_56_recipspace = +fcflags_opt_56_xc = +fcflags_opt_57_iopsp_parser = +fcflags_opt_57_iovars = +fcflags_opt_61_occeig = +fcflags_opt_62_cg_noabirule = +fcflags_opt_62_ctqmc = +fcflags_opt_62_iowfdenpot = +fcflags_opt_62_poisson = +fcflags_opt_62_wvl_wfs = +fcflags_opt_64_psp = +fcflags_opt_65_lotf_base = +fcflags_opt_65_paw = +fcflags_opt_66_nonlocal = +fcflags_opt_66_vdwxc = +fcflags_opt_66_wfs = +fcflags_opt_67_common = +fcflags_opt_67_python_invocation_ext = +fcflags_opt_67_triqs_ext = +fcflags_opt_68_dmft = +fcflags_opt_68_lotf = +fcflags_opt_68_recursion = +fcflags_opt_68_rsprc = +fcflags_opt_69_wfdesc = +fcflags_opt_70_gw = +fcflags_opt_71_bse = +fcflags_opt_71_wannier = +fcflags_opt_72_response = +fcflags_opt_77_ddb = +fcflags_opt_77_suscep = +fcflags_opt_78_effpot = +fcflags_opt_78_eph = +fcflags_opt_79_seqpar_mpi = +fcflags_opt_80_rttddft = +fcflags_opt_80_tdep = +fcflags_opt_94_scfcv = +fcflags_opt_95_drive = +fcflags_opt_98_main = +fcflags_opt_bigdft = +fcflags_opt_default = +fcflags_opt_hdf5 = +fcflags_opt_levmar = +fcflags_opt_libpsml = +fcflags_opt_libxc = +fcflags_opt_libxml2 = +fcflags_opt_linalg = +fcflags_opt_netcdf = +fcflags_opt_netcdf_fortran = +fcflags_opt_papi = +fcflags_opt_triqs = +fcflags_opt_wannier90 = +fcflags_opt_xmlf90 = +host = x86_64-apple-darwin18.7.0 +host_alias = +host_cpu = x86_64 +host_os = darwin18.7.0 +host_vendor = apple +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = ${SHELL} /Users/gonze/_Research/ABINIT_git/gonze/config/gnu/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = ${datarootdir}/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = $(MKDIR_P) +oldincludedir = /usr/include +pdfdir = ${docdir} +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +runstatedir = ${localstatedir}/run +sbindir = ${exec_prefix}/sbin +sd_abinit_common_cppflags = +sd_abinit_common_enable = no +sd_abinit_common_enable_def = no +sd_abinit_common_fcflags = +sd_abinit_common_init = def +sd_abinit_common_ldflags = +sd_abinit_common_libs = +sd_abinit_common_ok = unknown +sd_abinit_common_options = optional skip +sd_abinit_common_policy = skip +sd_abinit_common_status = optional +sd_bigdft_cppflags = +sd_bigdft_enable = no +sd_bigdft_enable_def = no +sd_bigdft_fcflags = +sd_bigdft_init = def +sd_bigdft_ldflags = +sd_bigdft_libs = +sd_bigdft_ok = unknown +sd_bigdft_options = optional warn +sd_bigdft_policy = warn +sd_bigdft_status = optional +sd_fft_cflags = +sd_fft_choices = +sd_fft_cppflags = -I/opt/local/include +sd_fft_cxxflags = +sd_fft_enable = yes +sd_fft_fcflags = -I/opt/local/include +sd_fft_flavor = fftw3 +sd_fft_init = kwd +sd_fft_ldflags = +sd_fft_libs = -L/opt/local/lib -lfftw3 -lfftw3f +sd_fft_ok = yes +sd_fftw3_cflags = +sd_fftw3_cppflags = -I/opt/local/include +sd_fftw3_enable = yes +sd_fftw3_enable_def = no +sd_fftw3_fcflags = -I/opt/local/include +sd_fftw3_init = env +sd_fftw3_ldflags = +sd_fftw3_libs = -L/opt/local/lib -lfftw3 -lfftw3f +sd_fftw3_ok = yes +sd_fftw3_options = optional skip +sd_fftw3_policy = skip +sd_fftw3_status = optional +sd_gpu_cflags = +sd_gpu_cppflags = +sd_gpu_cxxflags = +sd_gpu_enable = no +sd_gpu_enable_def = no +sd_gpu_fcflags = +sd_gpu_init = def +sd_gpu_ldflags = +sd_gpu_libs = +sd_gpu_ok = no +sd_gpu_options = optional warn +sd_gpu_policy = warn +sd_gpu_prefix = +sd_gpu_status = optional +sd_hdf5_cflags = +sd_hdf5_cppflags = -I/opt/local/include -I/opt/local/include +sd_hdf5_cxxflags = +sd_hdf5_enable = yes +sd_hdf5_enable_def = yes +sd_hdf5_enable_fc = no +sd_hdf5_fcflags = +sd_hdf5_h5cc = /opt/local/bin/h5cc +sd_hdf5_h5fc = +sd_hdf5_init = dir +sd_hdf5_ldflags = +sd_hdf5_libs = -L/opt/local/lib -L/opt/local/lib -lhdf5_hl -L/opt/local/lib -lhdf5 -lz -ldl -lm +sd_hdf5_ok = yes +sd_hdf5_options = required no-fortran warn +sd_hdf5_policy = warn +sd_hdf5_status = required +sd_kokkos_cppflags = +sd_kokkos_cxxflags = +sd_kokkos_enable = no +sd_kokkos_enable_def = no +sd_kokkos_init = def +sd_kokkos_ldflags = +sd_kokkos_libs = +sd_kokkos_ok = unknown +sd_kokkos_options = optional fail +sd_kokkos_policy = fail +sd_kokkos_status = optional +sd_levmar_cflags = +sd_levmar_cppflags = +sd_levmar_enable = no +sd_levmar_enable_def = no +sd_levmar_init = def +sd_levmar_ldflags = +sd_levmar_libs = +sd_levmar_ok = unknown +sd_levmar_options = optional fail +sd_levmar_policy = fail +sd_levmar_status = optional +sd_libpaw_cppflags = +sd_libpaw_enable = no +sd_libpaw_enable_def = no +sd_libpaw_fcflags = +sd_libpaw_init = def +sd_libpaw_ldflags = +sd_libpaw_libs = +sd_libpaw_ok = unknown +sd_libpaw_options = optional skip +sd_libpaw_policy = skip +sd_libpaw_status = optional +sd_libpsml_cppflags = +sd_libpsml_enable = no +sd_libpsml_enable_def = no +sd_libpsml_fcflags = +sd_libpsml_init = def +sd_libpsml_ldflags = +sd_libpsml_libs = +sd_libpsml_ok = unknown +sd_libpsml_options = optional warn +sd_libpsml_policy = warn +sd_libpsml_status = optional +sd_libxc_cflags = +sd_libxc_cppflags = -I/opt/local/include +sd_libxc_enable = yes +sd_libxc_enable_def = yes +sd_libxc_enable_fc = no +sd_libxc_fcflags = +sd_libxc_init = dir +sd_libxc_ldflags = +sd_libxc_libs = -L/opt/local/lib -lxc +sd_libxc_ok = yes +sd_libxc_options = required no-fortran warn +sd_libxc_policy = warn +sd_libxc_status = required +sd_linalg_cflags = +sd_linalg_choices = +sd_linalg_cppflags = +sd_linalg_cxxflags = +sd_linalg_enable = yes +sd_linalg_fcflags = -I/opt/local/include +sd_linalg_flavor = openblas +sd_linalg_has_elpa = no +sd_linalg_has_scalapack = no +sd_linalg_init = env +sd_linalg_ldflags = +sd_linalg_libs = -L/opt/local/lib -lopenblas +sd_linalg_ok = yes +sd_mpi_cc = /opt/local/bin/mpicc +sd_mpi_cflags = +sd_mpi_cppflags = -I/opt/local/include +sd_mpi_cxx = /opt/local/bin/mpicxx +sd_mpi_enable = yes +sd_mpi_enable_cxx = yes +sd_mpi_enable_def = auto +sd_mpi_enable_fc = yes +sd_mpi_fc = /opt/local/bin/mpif90 +sd_mpi_fcflags = -I/opt/local/include +sd_mpi_init = dir +sd_mpi_ldflags = +sd_mpi_libs = +sd_mpi_ok = yes +sd_mpi_options = auto optional fail +sd_mpi_policy = fail +sd_mpi_status = optional +sd_netcdf_cflags = +sd_netcdf_cppflags = -I/opt/local/include +sd_netcdf_enable = yes +sd_netcdf_enable_def = yes +sd_netcdf_fcflags = -I/opt/local/include +sd_netcdf_fortran_cflags = +sd_netcdf_fortran_cppflags = -I/opt/local/include +sd_netcdf_fortran_enable = yes +sd_netcdf_fortran_enable_def = yes +sd_netcdf_fortran_fcflags = -I/opt/local/include +sd_netcdf_fortran_init = dir +sd_netcdf_fortran_ldflags = +sd_netcdf_fortran_libs = -L/opt/local/lib -lnetcdff +sd_netcdf_fortran_ok = yes +sd_netcdf_fortran_options = required warn +sd_netcdf_fortran_policy = warn +sd_netcdf_fortran_status = required +sd_netcdf_init = dir +sd_netcdf_ldflags = +sd_netcdf_libs = -L/opt/local/lib -lnetcdf +sd_netcdf_ok = yes +sd_netcdf_options = required warn +sd_netcdf_policy = warn +sd_netcdf_status = required +sd_papi_cflags = +sd_papi_cppflags = +sd_papi_enable = no +sd_papi_enable_def = no +sd_papi_init = def +sd_papi_ldflags = +sd_papi_libs = +sd_papi_ok = unknown +sd_papi_options = optional fail +sd_papi_policy = fail +sd_papi_sd_papi_fcflags = +sd_papi_status = optional +sd_pfft_cflags = +sd_pfft_cppflags = +sd_pfft_enable = no +sd_pfft_enable_def = no +sd_pfft_init = def +sd_pfft_ldflags = +sd_pfft_libs = +sd_pfft_ok = unknown +sd_pfft_options = optional skip +sd_pfft_policy = skip +sd_pfft_status = optional +sd_sys_fcflags = +sd_triqs_cflags = +sd_triqs_cppflags = +sd_triqs_cxxflags = +sd_triqs_enable = no +sd_triqs_enable_def = no +sd_triqs_fcflags = +sd_triqs_init = def +sd_triqs_ldflags = +sd_triqs_libs = +sd_triqs_ok = unknown +sd_triqs_options = optional fail +sd_triqs_policy = fail +sd_triqs_status = optional +sd_wannier90_cppflags = +sd_wannier90_enable = yes +sd_wannier90_enable_def = no +sd_wannier90_fcflags = -I/opt/local/include +sd_wannier90_init = env +sd_wannier90_ldflags = +sd_wannier90_libs = -L/opt/local/lib -lwannier +sd_wannier90_ok = yes +sd_wannier90_options = optional warn +sd_wannier90_policy = warn +sd_wannier90_status = optional +sd_xmlf90_cppflags = +sd_xmlf90_enable = no +sd_xmlf90_enable_def = no +sd_xmlf90_fcflags = +sd_xmlf90_init = def +sd_xmlf90_ldflags = +sd_xmlf90_libs = +sd_xmlf90_ok = unknown +sd_xmlf90_options = optional warn +sd_xmlf90_policy = warn +sd_xmlf90_status = optional +sd_yakl_cppflags = +sd_yakl_enable = no +sd_yakl_enable_def = no +sd_yakl_fcflags = +sd_yakl_init = def +sd_yakl_ldflags = +sd_yakl_libs = +sd_yakl_ok = unknown +sd_yakl_options = optional fail +sd_yakl_policy = fail +sd_yakl_status = optional +sharedstatedir = ${prefix}/com +src_02_clib_fcflags = -I$(top_builddir)/shared/common/src/02_clib -I$(top_srcdir)/shared/common/src/02_clib +src_10_defs_fcflags = -I$(top_builddir)/shared/common/src/10_defs -I$(top_srcdir)/shared/common/src/10_defs +src_11_memory_mpi_fcflags = -I$(top_builddir)/shared/common/src/11_memory_mpi -I$(top_srcdir)/shared/common/src/11_memory_mpi +src_12_hide_mpi_fcflags = -I$(top_builddir)/shared/common/src/12_hide_mpi -I$(top_srcdir)/shared/common/src/12_hide_mpi +src_14_hidewrite_fcflags = -I$(top_builddir)/shared/common/src/14_hidewrite -I$(top_srcdir)/shared/common/src/14_hidewrite +src_16_hideleave_fcflags = -I$(top_builddir)/shared/common/src/16_hideleave -I$(top_srcdir)/shared/common/src/16_hideleave +src_16_kokkos_toolbox_fcflags = -I$(top_builddir)/shared/common/src/16_kokkos_toolbox -I$(top_srcdir)/shared/common/src/16_kokkos_toolbox +src_17_gpu_toolbox_fcflags = -I$(top_builddir)/shared/common/src/17_gpu_toolbox -I$(top_srcdir)/shared/common/src/17_gpu_toolbox +src_17_libtetra_ext_fcflags = -I$(top_builddir)/shared/common/src/17_libtetra_ext -I$(top_srcdir)/shared/common/src/17_libtetra_ext +src_17_minimax_fcflags = -I$(top_builddir)/shared/common/src/17_minimax -I$(top_srcdir)/shared/common/src/17_minimax +src_17_yaml_out_fcflags = -I$(top_builddir)/shared/common/src/17_yaml_out -I$(top_srcdir)/shared/common/src/17_yaml_out +src_18_timing_fcflags = -I$(top_builddir)/shared/common/src/18_timing -I$(top_srcdir)/shared/common/src/18_timing +src_21_hashfuncs_fcflags = -I$(top_builddir)/shared/common/src/21_hashfuncs -I$(top_srcdir)/shared/common/src/21_hashfuncs +src_27_toolbox_oop_fcflags = -I$(top_builddir)/shared/common/src/27_toolbox_oop -I$(top_srcdir)/shared/common/src/27_toolbox_oop +src_28_numeric_noabirule_fcflags = -I$(top_builddir)/shared/common/src/28_numeric_noabirule -I$(top_srcdir)/shared/common/src/28_numeric_noabirule +src_29_kpoints_fcflags = -I$(top_builddir)/shared/common/src/29_kpoints -I$(top_srcdir)/shared/common/src/29_kpoints +src_32_util_fcflags = -I$(top_builddir)/shared/common/src/32_util -I$(top_srcdir)/shared/common/src/32_util +src_33_xc_lowlevel_fcflags = -I$(top_builddir)/shared/common/src/33_xc_lowlevel -I$(top_srcdir)/shared/common/src/33_xc_lowlevel +src_39_libpaw_fcflags = -I$(top_builddir)/shared/libpaw/src -I$(top_srcdir)/shared/libpaw/src +src_41_geometry_fcflags = -I$(top_builddir)/src/41_geometry -I$(top_srcdir)/src/41_geometry +src_42_nlstrain_fcflags = -I$(top_builddir)/src/42_nlstrain -I$(top_srcdir)/src/42_nlstrain +src_42_parser_fcflags = -I$(top_builddir)/src/42_parser -I$(top_srcdir)/src/42_parser +src_43_ptgroups_fcflags = -I$(top_builddir)/src/43_ptgroups -I$(top_srcdir)/src/43_ptgroups +src_43_wvl_wrappers_fcflags = -I$(top_builddir)/src/43_wvl_wrappers -I$(top_srcdir)/src/43_wvl_wrappers +src_44_abitools_fcflags = -I$(top_builddir)/src/44_abitools -I$(top_srcdir)/src/44_abitools +src_44_abitypes_defs_fcflags = -I$(top_builddir)/src/44_abitypes_defs -I$(top_srcdir)/src/44_abitypes_defs +src_44_manage_kokkos_fcflags = -I$(top_builddir)/src/44_manage_kokkos -I$(top_srcdir)/src/44_manage_kokkos +src_45_geomoptim_fcflags = -I$(top_builddir)/src/45_geomoptim -I$(top_srcdir)/src/45_geomoptim +src_45_xgTools_fcflags = -I$(top_builddir)/src/45_xgTools -I$(top_srcdir)/src/45_xgTools +src_46_ghc_omp_fcflags = -I$(top_builddir)/src/46_ghc_omp -I$(top_srcdir)/src/46_ghc_omp +src_46_manage_cuda_fcflags = -I$(top_builddir)/src/46_manage_cuda -I$(top_srcdir)/src/46_manage_cuda +src_48_diago_fcflags = -I$(top_builddir)/src/48_diago -I$(top_srcdir)/src/48_diago +src_49_gw_toolbox_oop_fcflags = -I$(top_builddir)/src/49_gw_toolbox_oop -I$(top_srcdir)/src/49_gw_toolbox_oop +src_51_manage_mpi_fcflags = -I$(top_builddir)/src/51_manage_mpi -I$(top_srcdir)/src/51_manage_mpi +src_52_fft_mpi_noabirule_fcflags = -I$(top_builddir)/src/52_fft_mpi_noabirule -I$(top_srcdir)/src/52_fft_mpi_noabirule +src_53_ffts_fcflags = -I$(top_builddir)/src/53_ffts -I$(top_srcdir)/src/53_ffts +src_54_spacepar_fcflags = -I$(top_builddir)/src/54_spacepar -I$(top_srcdir)/src/54_spacepar +src_55_abiutil_fcflags = -I$(top_builddir)/src/55_abiutil -I$(top_srcdir)/src/55_abiutil +src_56_io_mpi_fcflags = -I$(top_builddir)/src/56_io_mpi -I$(top_srcdir)/src/56_io_mpi +src_56_mixing_fcflags = -I$(top_builddir)/src/56_mixing -I$(top_srcdir)/src/56_mixing +src_56_recipspace_fcflags = -I$(top_builddir)/src/56_recipspace -I$(top_srcdir)/src/56_recipspace +src_56_xc_fcflags = -I$(top_builddir)/src/56_xc -I$(top_srcdir)/src/56_xc +src_57_iopsp_parser_fcflags = -I$(top_builddir)/src/57_iopsp_parser -I$(top_srcdir)/src/57_iopsp_parser +src_57_iovars_fcflags = -I$(top_builddir)/src/57_iovars -I$(top_srcdir)/src/57_iovars +src_61_occeig_fcflags = -I$(top_builddir)/src/61_occeig -I$(top_srcdir)/src/61_occeig +src_62_cg_noabirule_fcflags = -I$(top_builddir)/src/62_cg_noabirule -I$(top_srcdir)/src/62_cg_noabirule +src_62_ctqmc_fcflags = -I$(top_builddir)/src/62_ctqmc -I$(top_srcdir)/src/62_ctqmc +src_62_iowfdenpot_fcflags = -I$(top_builddir)/src/62_iowfdenpot -I$(top_srcdir)/src/62_iowfdenpot +src_62_poisson_fcflags = -I$(top_builddir)/src/62_poisson -I$(top_srcdir)/src/62_poisson +src_62_wvl_wfs_fcflags = -I$(top_builddir)/src/62_wvl_wfs -I$(top_srcdir)/src/62_wvl_wfs +src_64_psp_fcflags = -I$(top_builddir)/src/64_psp -I$(top_srcdir)/src/64_psp +src_65_lotf_base_fcflags = -I$(top_builddir)/src/65_lotf_base -I$(top_srcdir)/src/65_lotf_base +src_65_paw_fcflags = -I$(top_builddir)/src/65_paw -I$(top_srcdir)/src/65_paw +src_66_nonlocal_fcflags = -I$(top_builddir)/src/66_nonlocal -I$(top_srcdir)/src/66_nonlocal +src_66_vdwxc_fcflags = -I$(top_builddir)/src/66_vdwxc -I$(top_srcdir)/src/66_vdwxc +src_66_wfs_fcflags = -I$(top_builddir)/src/66_wfs -I$(top_srcdir)/src/66_wfs +src_67_common_fcflags = -I$(top_builddir)/src/67_common -I$(top_srcdir)/src/67_common +src_67_python_invocation_ext_fcflags = -I$(top_builddir)/src/67_python_invocation_ext -I$(top_srcdir)/src/67_python_invocation_ext +src_67_triqs_ext_fcflags = -I$(top_builddir)/src/67_triqs_ext -I$(top_srcdir)/src/67_triqs_ext +src_68_dmft_fcflags = -I$(top_builddir)/src/68_dmft -I$(top_srcdir)/src/68_dmft +src_68_lotf_fcflags = -I$(top_builddir)/src/68_lotf -I$(top_srcdir)/src/68_lotf +src_68_recursion_fcflags = -I$(top_builddir)/src/68_recursion -I$(top_srcdir)/src/68_recursion +src_68_rsprc_fcflags = -I$(top_builddir)/src/68_rsprc -I$(top_srcdir)/src/68_rsprc +src_69_wfdesc_fcflags = -I$(top_builddir)/src/69_wfdesc -I$(top_srcdir)/src/69_wfdesc +src_70_gw_fcflags = -I$(top_builddir)/src/70_gw -I$(top_srcdir)/src/70_gw +src_71_bse_fcflags = -I$(top_builddir)/src/71_bse -I$(top_srcdir)/src/71_bse +src_71_wannier_fcflags = -I$(top_builddir)/src/71_wannier -I$(top_srcdir)/src/71_wannier +src_72_response_fcflags = -I$(top_builddir)/src/72_response -I$(top_srcdir)/src/72_response +src_77_ddb_fcflags = -I$(top_builddir)/src/77_ddb -I$(top_srcdir)/src/77_ddb +src_77_suscep_fcflags = -I$(top_builddir)/src/77_suscep -I$(top_srcdir)/src/77_suscep +src_78_effpot_fcflags = -I$(top_builddir)/src/78_effpot -I$(top_srcdir)/src/78_effpot +src_78_eph_fcflags = -I$(top_builddir)/src/78_eph -I$(top_srcdir)/src/78_eph +src_79_seqpar_mpi_fcflags = -I$(top_builddir)/src/79_seqpar_mpi -I$(top_srcdir)/src/79_seqpar_mpi +src_80_rttddft_fcflags = -I$(top_builddir)/src/80_rttddft -I$(top_srcdir)/src/80_rttddft +src_80_tdep_fcflags = -I$(top_builddir)/src/80_tdep -I$(top_srcdir)/src/80_tdep +src_94_scfcv_fcflags = -I$(top_builddir)/src/94_scfcv -I$(top_srcdir)/src/94_scfcv +src_95_drive_fcflags = -I$(top_builddir)/src/95_drive -I$(top_srcdir)/src/95_drive +src_common_fcflags = -I$(top_builddir)/shared/common/src/incs -I$(top_srcdir)/shared/common/src/incs -I$(top_builddir)/shared/common/src/mods -I$(top_srcdir)/shared/common/src/mods +src_core_fcflags = -I$(top_builddir)/src/incs -I$(top_srcdir)/src/incs -I$(top_builddir)/src/mods -I$(top_srcdir)/src/mods +src_libpaw_fcflags = -I$(top_builddir)/shared/libpaw/incs -I$(top_srcdir)/shared/libpaw/incs -I$(top_builddir)/shared/libpaw/mods -I$(top_srcdir)/shared/libpaw/mods +srcdir = . +sysconfdir = ${prefix}/etc +target = x86_64-apple-darwin18.7.0 +target_alias = +target_cpu = x86_64 +target_os = darwin18.7.0 +target_vendor = apple +top_build_prefix = ../../../../ +top_builddir = ../../../.. +top_srcdir = ../../../.. +with_abinit_common = +with_bigdft = +with_config_file = +with_debug_flavor = +with_fallbacks = +with_fc_vendor = +with_fc_version = +with_fft_flavor = fftw3 +with_fftw3 = +with_gnu_ld = +with_gpu = +with_hdf5 = /opt/local +with_kokkos = +with_levmar = +with_libpaw = +with_libpsml = +with_libxc = /opt/local +with_libxml2 = +with_linalg_flavor = openblas +with_mpi = /opt/local +with_mpi_level = +with_netcdf = /opt/local +with_optim_flavor = +with_papi = +with_pfft = +with_triqs = +with_wannier90 = +with_xmlf90 = +with_yakl = +AM_CFLAGS = -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include +AM_CXXFLAGS = $(sd_triqs_cxxflags) +AM_FCFLAGS = -ffree-form -J../mods +AM_CPPFLAGS = \ + -I$(top_builddir)/shared/common/src/02_clib -I$(top_srcdir)/shared/common/src/02_clib \ + -I$(top_builddir)/shared/common/src/10_defs -I$(top_srcdir)/shared/common/src/10_defs \ + -I$(top_builddir)/shared/common/src/11_memory_mpi -I$(top_srcdir)/shared/common/src/11_memory_mpi \ + -I$(top_builddir)/shared/common/src/incs -I$(top_srcdir)/shared/common/src/incs -I$(top_builddir)/shared/common/src/mods -I$(top_srcdir)/shared/common/src/mods \ + -I$(top_builddir)/src/incs -I$(top_srcdir)/src/incs -I$(top_builddir)/src/mods -I$(top_srcdir)/src/mods \ + -I$(top_builddir)/shared/libpaw/incs -I$(top_srcdir)/shared/libpaw/incs -I$(top_builddir)/shared/libpaw/mods -I$(top_srcdir)/shared/libpaw/mods \ + -I/opt/local/include \ + -I/opt/local/include \ + + + +# Regular source files +lib12_hide_mpi_srcs = \ + m_xmpi.F90 \ + m_xomp.F90 + + +# Source files depending on conditionals + +# Library description +noinst_LIBRARIES = lib12_hide_mpi.a +lib12_hide_mpi_a_SOURCES = $(lib12_hide_mpi_srcs) + +# Dependencies (inside the directory) of directory 12_hide_mpi +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. +CLEANFILES = m_xmpi_cpp.f90 m_xomp_cpp.f90 m_xmpi.$(MODEXT) \ + m_xomp.$(MODEXT) + +#EXTRA_DIST_TMP = $(foreach ffile,$(finc_list),$(ffile)) +EXTRA_DIST = abinit.src abinit.dep abinit.amf $(finc_list) \ + _12_hide_mpi_ +finc_list = \ + xmpi_allgather.finc \ + xmpi_iallgather.finc \ + xmpi_allgatherv.finc \ + xmpi_gather.finc \ + xmpi_gatherv.finc \ + xmpi_bcast.finc \ + xmpi_min.finc \ + xmpi_sum_master.finc \ + xmpi_exch.finc \ + xmpi_recv.finc \ + xmpi_irecv.finc \ + xmpi_sum.finc \ + xmpi_ibcast.finc \ + xmpi_isum.finc \ + xmpi_alltoall.finc \ + xmpi_ialltoall.finc \ + xmpi_alltoallv.finc \ + xmpi_ialltoallv.finc \ + xmpi_max.finc \ + xmpi_send.finc \ + xmpi_isend.finc \ + xmpi_scatterv.finc \ + xmpi_land_lor.finc + + +# make sure lib12_hide_mpi is recompiled if any file from finc_list is modified +lib12_hide_mpi_a_DEPENDENCIES = $(finc_list) +all: all-am + +.SUFFIXES: +.SUFFIXES: .F90 .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu shared/common/src/12_hide_mpi/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu shared/common/src/12_hide_mpi/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) + +lib12_hide_mpi.a: $(lib12_hide_mpi_a_OBJECTS) $(lib12_hide_mpi_a_DEPENDENCIES) $(EXTRA_lib12_hide_mpi_a_DEPENDENCIES) + $(AM_V_at)-rm -f lib12_hide_mpi.a + $(AM_V_AR)$(lib12_hide_mpi_a_AR) lib12_hide_mpi.a $(lib12_hide_mpi_a_OBJECTS) $(lib12_hide_mpi_a_LIBADD) + $(AM_V_at)$(RANLIB) lib12_hide_mpi.a + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +.F90.o: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ $< + +.F90.obj: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-noinstLIBRARIES cscopelist-am ctags ctags-am distclean \ + distclean-compile distclean-generic distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am + +.PRECIOUS: Makefile + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/GX-PAW/common/src/12_hide_mpi/Makefile.am b/GX-PAW/common/src/12_hide_mpi/Makefile.am new file mode 100644 index 00000000..b3eb5230 --- /dev/null +++ b/GX-PAW/common/src/12_hide_mpi/Makefile.am @@ -0,0 +1,92 @@ +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-corelibs on 2024/03/16 21:07:38 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-corelibs script or its config file instead. +# + +AM_CFLAGS = @ABI_CPPFLAGS@ +AM_CXXFLAGS = $(sd_triqs_cxxflags) +AM_FCFLAGS = @FPPFLAGS@ @FCFLAGS_FREEFORM@ @FCFLAGS_MODDIR@ @sd_sys_fcflags@ @fcflags_opt_12_hide_mpi@ + +AM_CPPFLAGS = \ + @src_02_clib_fcflags@ \ + @src_10_defs_fcflags@ \ + @src_11_memory_mpi_fcflags@ \ + @src_common_fcflags@ \ + @src_core_fcflags@ \ + @src_libpaw_fcflags@ \ + @sd_mpi_cppflags@ \ + @sd_mpi_fcflags@ \ + @fc_mod_fcflags@ + +# Regular source files +lib12_hide_mpi_srcs = \ + m_xmpi.F90 \ + m_xomp.F90 + +# Source files depending on conditionals + + +# Library description +noinst_LIBRARIES = lib12_hide_mpi.a + +lib12_hide_mpi_a_SOURCES= $(lib12_hide_mpi_srcs) + +CLEANFILES = \ + m_xmpi_cpp.f90 \ + m_xomp_cpp.f90 + +EXTRA_DIST = abinit.src + +EXTRA_DIST += abinit.dep + +# Dependencies (inside the directory) of directory 12_hide_mpi +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. + +CLEANFILES += \ + m_xmpi.$(MODEXT) \ + m_xomp.$(MODEXT) + + +EXTRA_DIST += abinit.amf + +finc_list = \ + xmpi_allgather.finc \ + xmpi_iallgather.finc \ + xmpi_allgatherv.finc \ + xmpi_gather.finc \ + xmpi_gatherv.finc \ + xmpi_bcast.finc \ + xmpi_min.finc \ + xmpi_sum_master.finc \ + xmpi_exch.finc \ + xmpi_recv.finc \ + xmpi_irecv.finc \ + xmpi_sum.finc \ + xmpi_ibcast.finc \ + xmpi_isum.finc \ + xmpi_alltoall.finc \ + xmpi_ialltoall.finc \ + xmpi_alltoallv.finc \ + xmpi_ialltoallv.finc \ + xmpi_max.finc \ + xmpi_send.finc \ + xmpi_isend.finc \ + xmpi_scatterv.finc \ + xmpi_land_lor.finc + +#EXTRA_DIST_TMP = $(foreach ffile,$(finc_list),$(ffile)) +EXTRA_DIST += $(finc_list) + +# make sure lib12_hide_mpi is recompiled if any file from finc_list is modified +lib12_hide_mpi_a_DEPENDENCIES = $(finc_list) + +EXTRA_DIST += _12_hide_mpi_ diff --git a/GX-PAW/common/src/12_hide_mpi/Makefile.in b/GX-PAW/common/src/12_hide_mpi/Makefile.in new file mode 100644 index 00000000..604fea6f --- /dev/null +++ b/GX-PAW/common/src/12_hide_mpi/Makefile.in @@ -0,0 +1,1488 @@ +# Makefile.in generated by automake 1.16.3 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2020 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-corelibs on 2024/03/16 21:07:38 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-corelibs script or its config file instead. +# + +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = shared/common/src/12_hide_mpi +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/m4/arch-gpu.m4 \ + $(top_srcdir)/config/m4/arch-mpi.m4 \ + $(top_srcdir)/config/m4/auto-autotools.m4 \ + $(top_srcdir)/config/m4/auto-corelibs.m4 \ + $(top_srcdir)/config/m4/auto-debug.m4 \ + $(top_srcdir)/config/m4/auto-dirflags.m4 \ + $(top_srcdir)/config/m4/auto-env.m4 \ + $(top_srcdir)/config/m4/auto-hints.m4 \ + $(top_srcdir)/config/m4/auto-optim.m4 \ + $(top_srcdir)/config/m4/auto-options.m4 \ + $(top_srcdir)/config/m4/auto-output.m4 \ + $(top_srcdir)/config/m4/auto-triggers.m4 \ + $(top_srcdir)/config/m4/conf-atompaw.m4 \ + $(top_srcdir)/config/m4/conf-debug.m4 \ + $(top_srcdir)/config/m4/conf-fallbacks.m4 \ + $(top_srcdir)/config/m4/conf-files.m4 \ + $(top_srcdir)/config/m4/conf-init.m4 \ + $(top_srcdir)/config/m4/conf-openmp.m4 \ + $(top_srcdir)/config/m4/conf-optim.m4 \ + $(top_srcdir)/config/m4/lang-c++.m4 \ + $(top_srcdir)/config/m4/lang-c.m4 \ + $(top_srcdir)/config/m4/lang-fortran-import.m4 \ + $(top_srcdir)/config/m4/lang-fortran.m4 \ + $(top_srcdir)/config/m4/lang-python.m4 \ + $(top_srcdir)/config/m4/libxml2.m4 \ + $(top_srcdir)/config/m4/misc-display.m4 \ + $(top_srcdir)/config/m4/sd_abinit_common.m4 \ + $(top_srcdir)/config/m4/sd_arch_gpu.m4 \ + $(top_srcdir)/config/m4/sd_arch_mpi.m4 \ + $(top_srcdir)/config/m4/sd_bigdft.m4 \ + $(top_srcdir)/config/m4/sd_core.m4 \ + $(top_srcdir)/config/m4/sd_esl.m4 \ + $(top_srcdir)/config/m4/sd_fftw3.m4 \ + $(top_srcdir)/config/m4/sd_gpu_kokkos.m4 \ + $(top_srcdir)/config/m4/sd_gpu_yakl.m4 \ + $(top_srcdir)/config/m4/sd_io_hdf5.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf_fortran.m4 \ + $(top_srcdir)/config/m4/sd_levmar.m4 \ + $(top_srcdir)/config/m4/sd_libpaw.m4 \ + $(top_srcdir)/config/m4/sd_libpsml.m4 \ + $(top_srcdir)/config/m4/sd_libxc.m4 \ + $(top_srcdir)/config/m4/sd_math_fft.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_core.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_util.m4 \ + $(top_srcdir)/config/m4/sd_papi.m4 \ + $(top_srcdir)/config/m4/sd_pfft.m4 \ + $(top_srcdir)/config/m4/sd_triqs.m4 \ + $(top_srcdir)/config/m4/sd_wannier90.m4 \ + $(top_srcdir)/config/m4/sd_xmlf90.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = +lib12_hide_mpi_a_AR = $(AR) $(ARFLAGS) +lib12_hide_mpi_a_LIBADD = +am__objects_1 = m_xmpi.$(OBJEXT) m_xomp.$(OBJEXT) +am_lib12_hide_mpi_a_OBJECTS = $(am__objects_1) +lib12_hide_mpi_a_OBJECTS = $(am_lib12_hide_mpi_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +PPFCCOMPILE = $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) +AM_V_PPFC = $(am__v_PPFC_@AM_V@) +am__v_PPFC_ = $(am__v_PPFC_@AM_DEFAULT_V@) +am__v_PPFC_0 = @echo " PPFC " $@; +am__v_PPFC_1 = +FCLD = $(FC) +FCLINK = $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \ + $@ +AM_V_FCLD = $(am__v_FCLD_@AM_V@) +am__v_FCLD_ = $(am__v_FCLD_@AM_DEFAULT_V@) +am__v_FCLD_0 = @echo " FCLD " $@; +am__v_FCLD_1 = +SOURCES = $(lib12_hide_mpi_a_SOURCES) +DIST_SOURCES = $(lib12_hide_mpi_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in README +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ABINIT_BINARY_PACKAGE = @ABINIT_BINARY_PACKAGE@ +ABINIT_COMMON_CPPFLAGS = @ABINIT_COMMON_CPPFLAGS@ +ABINIT_COMMON_FCFLAGS = @ABINIT_COMMON_FCFLAGS@ +ABINIT_COMMON_LDFLAGS = @ABINIT_COMMON_LDFLAGS@ +ABINIT_COMMON_LIBS = @ABINIT_COMMON_LIBS@ +ABINIT_TARGET = @ABINIT_TARGET@ +ABINIT_VERSION = @ABINIT_VERSION@ +ABINIT_VERSION_BASE = @ABINIT_VERSION_BASE@ +ABINIT_VERSION_BUILD = @ABINIT_VERSION_BUILD@ +ABINIT_VERSION_MAJOR = @ABINIT_VERSION_MAJOR@ +ABINIT_VERSION_MICRO = @ABINIT_VERSION_MICRO@ +ABINIT_VERSION_MINOR = @ABINIT_VERSION_MINOR@ +ABI_CPPFLAGS = @ABI_CPPFLAGS@ +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +ARFLAGS = @ARFLAGS@ +ARFLAGS_CMD = @ARFLAGS_CMD@ +ARFLAGS_DEBUG = @ARFLAGS_DEBUG@ +ARFLAGS_EXTRA = @ARFLAGS_EXTRA@ +ARFLAGS_HINTS = @ARFLAGS_HINTS@ +ARFLAGS_OPTIM = @ARFLAGS_OPTIM@ +ATOMPAW_BIN = @ATOMPAW_BIN@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BIGDFT_CPPFLAGS = @BIGDFT_CPPFLAGS@ +BIGDFT_FCFLAGS = @BIGDFT_FCFLAGS@ +BIGDFT_LDFLAGS = @BIGDFT_LDFLAGS@ +BIGDFT_LIBS = @BIGDFT_LIBS@ +BOURNE_SHELL = @BOURNE_SHELL@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CC_LDFLAGS = @CC_LDFLAGS@ +CC_LDFLAGS_DEBUG = @CC_LDFLAGS_DEBUG@ +CC_LDFLAGS_EXTRA = @CC_LDFLAGS_EXTRA@ +CC_LDFLAGS_GPU = @CC_LDFLAGS_GPU@ +CC_LDFLAGS_HINTS = @CC_LDFLAGS_HINTS@ +CC_LDFLAGS_OPTIM = @CC_LDFLAGS_OPTIM@ +CC_LIBS = @CC_LIBS@ +CC_LIBS_DEBUG = @CC_LIBS_DEBUG@ +CC_LIBS_EXTRA = @CC_LIBS_EXTRA@ +CC_LIBS_GPU = @CC_LIBS_GPU@ +CC_LIBS_HINTS = @CC_LIBS_HINTS@ +CC_LIBS_OPTIM = @CC_LIBS_OPTIM@ +CFLAGS = @CFLAGS@ +CFLAGS_DEBUG = @CFLAGS_DEBUG@ +CFLAGS_EXTRA = @CFLAGS_EXTRA@ +CFLAGS_GPU = @CFLAGS_GPU@ +CFLAGS_HINTS = @CFLAGS_HINTS@ +CFLAGS_OPTIM = @CFLAGS_OPTIM@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CPPFLAGS_DEBUG = @CPPFLAGS_DEBUG@ +CPPFLAGS_EXTRA = @CPPFLAGS_EXTRA@ +CPPFLAGS_GPU = @CPPFLAGS_GPU@ +CPPFLAGS_HINTS = @CPPFLAGS_HINTS@ +CPPFLAGS_HINTS_EXT = @CPPFLAGS_HINTS_EXT@ +CPPFLAGS_OPTIM = @CPPFLAGS_OPTIM@ +CXX = @CXX@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CXXFLAGS_DEBUG = @CXXFLAGS_DEBUG@ +CXXFLAGS_EXTRA = @CXXFLAGS_EXTRA@ +CXXFLAGS_GPU = @CXXFLAGS_GPU@ +CXXFLAGS_HINTS = @CXXFLAGS_HINTS@ +CXXFLAGS_OPTIM = @CXXFLAGS_OPTIM@ +CXX_LDFLAGS = @CXX_LDFLAGS@ +CXX_LDFLAGS_DEBUG = @CXX_LDFLAGS_DEBUG@ +CXX_LDFLAGS_EXTRA = @CXX_LDFLAGS_EXTRA@ +CXX_LDFLAGS_GPU = @CXX_LDFLAGS_GPU@ +CXX_LDFLAGS_HINTS = @CXX_LDFLAGS_HINTS@ +CXX_LDFLAGS_OPTIM = @CXX_LDFLAGS_OPTIM@ +CXX_LIBS = @CXX_LIBS@ +CXX_LIBS_DEBUG = @CXX_LIBS_DEBUG@ +CXX_LIBS_EXTRA = @CXX_LIBS_EXTRA@ +CXX_LIBS_GPU = @CXX_LIBS_GPU@ +CXX_LIBS_HINTS = @CXX_LIBS_HINTS@ +CXX_LIBS_OPTIM = @CXX_LIBS_OPTIM@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ +FCFLAGS = @FCFLAGS@ +FCFLAGS_DEBUG = @FCFLAGS_DEBUG@ +FCFLAGS_EXTRA = @FCFLAGS_EXTRA@ +FCFLAGS_F90 = @FCFLAGS_F90@ +FCFLAGS_FIXEDFORM = @FCFLAGS_FIXEDFORM@ +FCFLAGS_FREEFORM = @FCFLAGS_FREEFORM@ +FCFLAGS_HINTS = @FCFLAGS_HINTS@ +FCFLAGS_MODDIR = @FCFLAGS_MODDIR@ +FCFLAGS_OPENMP = @FCFLAGS_OPENMP@ +FCFLAGS_OPENMP_OFFLOAD = @FCFLAGS_OPENMP_OFFLOAD@ +FCFLAGS_OPTIM = @FCFLAGS_OPTIM@ +FCLIBS = @FCLIBS@ +FC_LDFLAGS = @FC_LDFLAGS@ +FC_LDFLAGS_DEBUG = @FC_LDFLAGS_DEBUG@ +FC_LDFLAGS_EXTRA = @FC_LDFLAGS_EXTRA@ +FC_LDFLAGS_HINTS = @FC_LDFLAGS_HINTS@ +FC_LDFLAGS_OPTIM = @FC_LDFLAGS_OPTIM@ +FC_LIBS = @FC_LIBS@ +FC_LIBS_DEBUG = @FC_LIBS_DEBUG@ +FC_LIBS_EXTRA = @FC_LIBS_EXTRA@ +FC_LIBS_HINTS = @FC_LIBS_HINTS@ +FC_LIBS_OPTIM = @FC_LIBS_OPTIM@ +FC_NOWRAP = @FC_NOWRAP@ +FFLAGS = @FFLAGS@ +FFTW3_CFLAGS = @FFTW3_CFLAGS@ +FFTW3_CPPFLAGS = @FFTW3_CPPFLAGS@ +FFTW3_FCFLAGS = @FFTW3_FCFLAGS@ +FFTW3_LDFLAGS = @FFTW3_LDFLAGS@ +FFTW3_LIBS = @FFTW3_LIBS@ +FFT_CFLAGS = @FFT_CFLAGS@ +FFT_FCFLAGS = @FFT_FCFLAGS@ +FPP = @FPP@ +FPPFLAGS = @FPPFLAGS@ +FPPFLAGS_DEBUG = @FPPFLAGS_DEBUG@ +FPPFLAGS_EXTRA = @FPPFLAGS_EXTRA@ +FPPFLAGS_HINTS = @FPPFLAGS_HINTS@ +FPPFLAGS_OPTIM = @FPPFLAGS_OPTIM@ +GPU_ARCH = @GPU_ARCH@ +GPU_CFLAGS = @GPU_CFLAGS@ +GPU_CPPFLAGS = @GPU_CPPFLAGS@ +GPU_CXXFLAGS = @GPU_CXXFLAGS@ +GPU_FCFLAGS = @GPU_FCFLAGS@ +GPU_LDFLAGS = @GPU_LDFLAGS@ +GPU_LIBS = @GPU_LIBS@ +GRAPHATOM_BIN = @GRAPHATOM_BIN@ +GREP = @GREP@ +H5CC = @H5CC@ +HDF5_CFLAGS = @HDF5_CFLAGS@ +HDF5_CPPFLAGS = @HDF5_CPPFLAGS@ +HDF5_CXXFLAGS = @HDF5_CXXFLAGS@ +HDF5_FCFLAGS = @HDF5_FCFLAGS@ +HDF5_LDFLAGS = @HDF5_LDFLAGS@ +HDF5_LIBS = @HDF5_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +LDFLAGS = @LDFLAGS@ +LEVMAR_CFLAGS = @LEVMAR_CFLAGS@ +LEVMAR_CPPFLAGS = @LEVMAR_CPPFLAGS@ +LEVMAR_LDFLAGS = @LEVMAR_LDFLAGS@ +LEVMAR_LIBS = @LEVMAR_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPAW_CPPFLAGS = @LIBPAW_CPPFLAGS@ +LIBPAW_FCFLAGS = @LIBPAW_FCFLAGS@ +LIBPAW_LDFLAGS = @LIBPAW_LDFLAGS@ +LIBPAW_LIBS = @LIBPAW_LIBS@ +LIBPSML_CPPFLAGS = @LIBPSML_CPPFLAGS@ +LIBPSML_FCFLAGS = @LIBPSML_FCFLAGS@ +LIBPSML_LDFLAGS = @LIBPSML_LDFLAGS@ +LIBPSML_LIBS = @LIBPSML_LIBS@ +LIBS = @LIBS@ +LIBXC_CFLAGS = @LIBXC_CFLAGS@ +LIBXC_CPPFLAGS = @LIBXC_CPPFLAGS@ +LIBXC_FCFLAGS = @LIBXC_FCFLAGS@ +LIBXC_LDFLAGS = @LIBXC_LDFLAGS@ +LIBXC_LIBS = @LIBXC_LIBS@ +LIBXML2_CPPFLAGS = @LIBXML2_CPPFLAGS@ +LIBXML2_FCFLAGS = @LIBXML2_FCFLAGS@ +LIBXML2_LIBS = @LIBXML2_LIBS@ +LINALG_CFLAGS = @LINALG_CFLAGS@ +LINALG_CPPFLAGS = @LINALG_CPPFLAGS@ +LINALG_CXXFLAGS = @LINALG_CXXFLAGS@ +LINALG_FCFLAGS = @LINALG_FCFLAGS@ +LINALG_LDFLAGS = @LINALG_LDFLAGS@ +LINALG_LIBS = @LINALG_LIBS@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODEXT = @MODEXT@ +MPI_CFLAGS = @MPI_CFLAGS@ +MPI_CPPFLAGS = @MPI_CPPFLAGS@ +MPI_CXXFLAGS = @MPI_CXXFLAGS@ +MPI_FCFLAGS = @MPI_FCFLAGS@ +MPI_LDFLAGS = @MPI_LDFLAGS@ +MPI_LIBS = @MPI_LIBS@ +MV = @MV@ +NETCDF_CFLAGS = @NETCDF_CFLAGS@ +NETCDF_CPPFLAGS = @NETCDF_CPPFLAGS@ +NETCDF_CXXFLAGS = @NETCDF_CXXFLAGS@ +NETCDF_FCFLAGS = @NETCDF_FCFLAGS@ +NETCDF_FORTRAN_CFLAGS = @NETCDF_FORTRAN_CFLAGS@ +NETCDF_FORTRAN_CPPFLAGS = @NETCDF_FORTRAN_CPPFLAGS@ +NETCDF_FORTRAN_CXXFLAGS = @NETCDF_FORTRAN_CXXFLAGS@ +NETCDF_FORTRAN_FCFLAGS = @NETCDF_FORTRAN_FCFLAGS@ +NETCDF_FORTRAN_LDFLAGS = @NETCDF_FORTRAN_LDFLAGS@ +NETCDF_FORTRAN_LIBS = @NETCDF_FORTRAN_LIBS@ +NETCDF_LDFLAGS = @NETCDF_LDFLAGS@ +NETCDF_LIBS = @NETCDF_LIBS@ +NVCC = @NVCC@ +NVCC_CFLAGS = @NVCC_CFLAGS@ +NVCC_CPPFLAGS = @NVCC_CPPFLAGS@ +NVCC_LDFLAGS = @NVCC_LDFLAGS@ +NVCC_LIBS = @NVCC_LIBS@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PAPI_CFLAGS = @PAPI_CFLAGS@ +PAPI_CPPFLAGS = @PAPI_CPPFLAGS@ +PAPI_LDFLAGS = @PAPI_LDFLAGS@ +PAPI_LIBS = @PAPI_LIBS@ +PATCH = @PATCH@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PFFT_CFLAGS = @PFFT_CFLAGS@ +PFFT_CPPFLAGS = @PFFT_CPPFLAGS@ +PFFT_LDFLAGS = @PFFT_LDFLAGS@ +PFFT_LIBS = @PFFT_LIBS@ +PYFLAGS = @PYFLAGS@ +PYTHON = @PYTHON@ +PYTHON_CONFIG = @PYTHON_CONFIG@ +PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ +RANLIB = @RANLIB@ +REALPATH = @REALPATH@ +RM = @RM@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +TAR = @TAR@ +TRIQS_CFLAGS = @TRIQS_CFLAGS@ +TRIQS_CPPFLAGS = @TRIQS_CPPFLAGS@ +TRIQS_CXXFLAGS = @TRIQS_CXXFLAGS@ +TRIQS_LDFLAGS = @TRIQS_LDFLAGS@ +TRIQS_LIBS = @TRIQS_LIBS@ +TRUE_CPP = @TRUE_CPP@ +VERSION = @VERSION@ +WANNIER90_CPPFLAGS = @WANNIER90_CPPFLAGS@ +WANNIER90_FCFLAGS = @WANNIER90_FCFLAGS@ +WANNIER90_LDFLAGS = @WANNIER90_LDFLAGS@ +WANNIER90_LIBS = @WANNIER90_LIBS@ +XML2_CONFIG = @XML2_CONFIG@ +XMLF90_CPPFLAGS = @XMLF90_CPPFLAGS@ +XMLF90_FCFLAGS = @XMLF90_FCFLAGS@ +XMLF90_LDFLAGS = @XMLF90_LDFLAGS@ +XMLF90_LIBS = @XMLF90_LIBS@ +XML_CPPFLAGS = @XML_CPPFLAGS@ +XML_LIBS = @XML_LIBS@ +XPP = @XPP@ +XPPFLAGS = @XPPFLAGS@ +XPPFLAGS_DEBUG = @XPPFLAGS_DEBUG@ +XPPFLAGS_EXTRA = @XPPFLAGS_EXTRA@ +XPPFLAGS_OPTIM = @XPPFLAGS_OPTIM@ +YAKL_CPPFLAGS = @YAKL_CPPFLAGS@ +YAKL_FCFLAGS = @YAKL_FCFLAGS@ +YAKL_LDFLAGS = @YAKL_LDFLAGS@ +YAKL_LIBS = @YAKL_LIBS@ +abi_ac_distcheck = @abi_ac_distcheck@ +abi_ac_version = @abi_ac_version@ +abi_am_version = @abi_am_version@ +abi_avx_safe_mode_enable = @abi_avx_safe_mode_enable@ +abi_bse_unpacked_enable = @abi_bse_unpacked_enable@ +abi_cc_path = @abi_cc_path@ +abi_cc_vendor = @abi_cc_vendor@ +abi_cc_version = @abi_cc_version@ +abi_cclock_enable = @abi_cclock_enable@ +abi_cpp_path = @abi_cpp_path@ +abi_cpu_64bits = @abi_cpu_64bits@ +abi_cpu_bits = @abi_cpu_bits@ +abi_cpu_model = @abi_cpu_model@ +abi_cpu_platform = @abi_cpu_platform@ +abi_cpu_spec = @abi_cpu_spec@ +abi_cpu_vendor = @abi_cpu_vendor@ +abi_crpa_optim_enable = @abi_crpa_optim_enable@ +abi_cxx_path = @abi_cxx_path@ +abi_cxx_vendor = @abi_cxx_vendor@ +abi_cxx_version = @abi_cxx_version@ +abi_debug_flavor = @abi_debug_flavor@ +abi_exports_enable = @abi_exports_enable@ +abi_fbk_abinit_common_ok = @abi_fbk_abinit_common_ok@ +abi_fbk_bigdft_ok = @abi_fbk_bigdft_ok@ +abi_fbk_config = @abi_fbk_config@ +abi_fbk_enable = @abi_fbk_enable@ +abi_fbk_fft_ok = @abi_fbk_fft_ok@ +abi_fbk_fftw3_ok = @abi_fbk_fftw3_ok@ +abi_fbk_gpu_ok = @abi_fbk_gpu_ok@ +abi_fbk_hdf5_ok = @abi_fbk_hdf5_ok@ +abi_fbk_init = @abi_fbk_init@ +abi_fbk_kokkos_ok = @abi_fbk_kokkos_ok@ +abi_fbk_levmar_ok = @abi_fbk_levmar_ok@ +abi_fbk_libpaw_ok = @abi_fbk_libpaw_ok@ +abi_fbk_libpsml_ok = @abi_fbk_libpsml_ok@ +abi_fbk_libxc_ok = @abi_fbk_libxc_ok@ +abi_fbk_libxml2_ok = @abi_fbk_libxml2_ok@ +abi_fbk_linalg_ok = @abi_fbk_linalg_ok@ +abi_fbk_list = @abi_fbk_list@ +abi_fbk_mpi_ok = @abi_fbk_mpi_ok@ +abi_fbk_netcdf_fortran_ok = @abi_fbk_netcdf_fortran_ok@ +abi_fbk_netcdf_ok = @abi_fbk_netcdf_ok@ +abi_fbk_papi_ok = @abi_fbk_papi_ok@ +abi_fbk_pfft_ok = @abi_fbk_pfft_ok@ +abi_fbk_prefix = @abi_fbk_prefix@ +abi_fbk_required = @abi_fbk_required@ +abi_fbk_triqs_ok = @abi_fbk_triqs_ok@ +abi_fbk_wannier90_ok = @abi_fbk_wannier90_ok@ +abi_fbk_xmlf90_ok = @abi_fbk_xmlf90_ok@ +abi_fbk_yakl_ok = @abi_fbk_yakl_ok@ +abi_fc_path = @abi_fc_path@ +abi_fc_vendor = @abi_fc_vendor@ +abi_fc_version = @abi_fc_version@ +abi_fc_wrap = @abi_fc_wrap@ +abi_fc_wrapper_enable = @abi_fc_wrapper_enable@ +abi_fpp_path = @abi_fpp_path@ +abi_gpu_arch = @abi_gpu_arch@ +abi_gpu_fcflags = @abi_gpu_fcflags@ +abi_gpu_flavor = @abi_gpu_flavor@ +abi_gpu_hip_libdir = @abi_gpu_hip_libdir@ +abi_gpu_incs = @abi_gpu_incs@ +abi_gpu_ldflags = @abi_gpu_ldflags@ +abi_gpu_libs = @abi_gpu_libs@ +abi_gpu_nvtx_v3 = @abi_gpu_nvtx_v3@ +abi_gpu_roctx = @abi_gpu_roctx@ +abi_gw_dpc_enable = @abi_gw_dpc_enable@ +abi_hints_enable = @abi_hints_enable@ +abi_libtetra_enable = @abi_libtetra_enable@ +abi_libxml2_cppflags = @abi_libxml2_cppflags@ +abi_libxml2_enable = @abi_libxml2_enable@ +abi_libxml2_fcflags = @abi_libxml2_fcflags@ +abi_libxml2_init = @abi_libxml2_init@ +abi_libxml2_ldflags = @abi_libxml2_ldflags@ +abi_libxml2_libs = @abi_libxml2_libs@ +abi_libxml2_ok = @abi_libxml2_ok@ +abi_libxml2_prefix = @abi_libxml2_prefix@ +abi_lotf_enable = @abi_lotf_enable@ +abi_lt_version = @abi_lt_version@ +abi_m4_version = @abi_m4_version@ +abi_memory_profiling_enable = @abi_memory_profiling_enable@ +abi_mpi_cflags = @abi_mpi_cflags@ +abi_mpi_cppflags = @abi_mpi_cppflags@ +abi_mpi_cxxflags = @abi_mpi_cxxflags@ +abi_mpi_enable = @abi_mpi_enable@ +abi_mpi_fcflags = @abi_mpi_fcflags@ +abi_mpi_flavor = @abi_mpi_flavor@ +abi_mpi_gpu_aware_enable = @abi_mpi_gpu_aware_enable@ +abi_mpi_incs = @abi_mpi_incs@ +abi_mpi_inplace_enable = @abi_mpi_inplace_enable@ +abi_mpi_interfaces_bugfix_enable = @abi_mpi_interfaces_bugfix_enable@ +abi_mpi_io_default_enable = @abi_mpi_io_default_enable@ +abi_mpi_io_enable = @abi_mpi_io_enable@ +abi_mpi_ldflags = @abi_mpi_ldflags@ +abi_mpi_level = @abi_mpi_level@ +abi_mpi_libs = @abi_mpi_libs@ +abi_netcdf_default_enable = @abi_netcdf_default_enable@ +abi_openmp_enable = @abi_openmp_enable@ +abi_openmp_offload_enable = @abi_openmp_offload_enable@ +abi_optim_flavor = @abi_optim_flavor@ +abi_python_invocation_enable = @abi_python_invocation_enable@ +abi_source_debug_enable = @abi_source_debug_enable@ +abi_stdin_enable = @abi_stdin_enable@ +abi_sys_spec = @abi_sys_spec@ +abi_timer_enable = @abi_timer_enable@ +abi_triqs_v1_4_enable = @abi_triqs_v1_4_enable@ +abi_triqs_v2_0_enable = @abi_triqs_v2_0_enable@ +abi_zdot_bugfix_enable = @abi_zdot_bugfix_enable@ +abinit_bindir = @abinit_bindir@ +abinit_builddir = @abinit_builddir@ +abinit_chkdir = @abinit_chkdir@ +abinit_datdir = @abinit_datdir@ +abinit_docdir = @abinit_docdir@ +abinit_incdir = @abinit_incdir@ +abinit_libdir = @abinit_libdir@ +abinit_mandir = @abinit_mandir@ +abinit_prefix = @abinit_prefix@ +abinit_srcdir = @abinit_srcdir@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_FC = @ac_ct_FC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cc_info_string = @cc_info_string@ +cxx_info_string = @cxx_info_string@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +enable_avx_safe_mode = @enable_avx_safe_mode@ +enable_bse_unpacked = @enable_bse_unpacked@ +enable_cclock = @enable_cclock@ +enable_crpa_optim = @enable_crpa_optim@ +enable_exports = @enable_exports@ +enable_fc_wrapper = @enable_fc_wrapper@ +enable_gw_dpc = @enable_gw_dpc@ +enable_hints = @enable_hints@ +enable_libtetra = @enable_libtetra@ +enable_lotf = @enable_lotf@ +enable_memory_profiling = @enable_memory_profiling@ +enable_mpi_gpu_aware = @enable_mpi_gpu_aware@ +enable_mpi_inplace = @enable_mpi_inplace@ +enable_mpi_interfaces_bugfix = @enable_mpi_interfaces_bugfix@ +enable_mpi_io = @enable_mpi_io@ +enable_mpi_io_default = @enable_mpi_io_default@ +enable_netcdf_default = @enable_netcdf_default@ +enable_openmp = @enable_openmp@ +enable_openmp_offload = @enable_openmp_offload@ +enable_python_invocation = @enable_python_invocation@ +enable_shared = @enable_shared@ +enable_source_debug = @enable_source_debug@ +enable_static = @enable_static@ +enable_stdin = @enable_stdin@ +enable_timer = @enable_timer@ +enable_triqs_v1_4 = @enable_triqs_v1_4@ +enable_triqs_v2_0 = @enable_triqs_v2_0@ +enable_zdot_bugfix = @enable_zdot_bugfix@ +exec_prefix = @exec_prefix@ +fc_info_string = @fc_info_string@ +fc_mod_fcflags = @fc_mod_fcflags@ +fc_timing = @fc_timing@ +fcflags_opt_02_clib = @fcflags_opt_02_clib@ +fcflags_opt_10_defs = @fcflags_opt_10_defs@ +fcflags_opt_11_memory_mpi = @fcflags_opt_11_memory_mpi@ +fcflags_opt_12_hide_mpi = @fcflags_opt_12_hide_mpi@ +fcflags_opt_14_hidewrite = @fcflags_opt_14_hidewrite@ +fcflags_opt_16_hideleave = @fcflags_opt_16_hideleave@ +fcflags_opt_16_kokkos_toolbox = @fcflags_opt_16_kokkos_toolbox@ +fcflags_opt_17_gpu_toolbox = @fcflags_opt_17_gpu_toolbox@ +fcflags_opt_17_libtetra_ext = @fcflags_opt_17_libtetra_ext@ +fcflags_opt_17_minimax = @fcflags_opt_17_minimax@ +fcflags_opt_17_yaml_out = @fcflags_opt_17_yaml_out@ +fcflags_opt_18_timing = @fcflags_opt_18_timing@ +fcflags_opt_21_hashfuncs = @fcflags_opt_21_hashfuncs@ +fcflags_opt_27_toolbox_oop = @fcflags_opt_27_toolbox_oop@ +fcflags_opt_28_numeric_noabirule = @fcflags_opt_28_numeric_noabirule@ +fcflags_opt_29_kpoints = @fcflags_opt_29_kpoints@ +fcflags_opt_32_util = @fcflags_opt_32_util@ +fcflags_opt_33_xc_lowlevel = @fcflags_opt_33_xc_lowlevel@ +fcflags_opt_39_libpaw = @fcflags_opt_39_libpaw@ +fcflags_opt_41_geometry = @fcflags_opt_41_geometry@ +fcflags_opt_42_nlstrain = @fcflags_opt_42_nlstrain@ +fcflags_opt_42_parser = @fcflags_opt_42_parser@ +fcflags_opt_43_ptgroups = @fcflags_opt_43_ptgroups@ +fcflags_opt_43_wvl_wrappers = @fcflags_opt_43_wvl_wrappers@ +fcflags_opt_44_abitools = @fcflags_opt_44_abitools@ +fcflags_opt_44_abitypes_defs = @fcflags_opt_44_abitypes_defs@ +fcflags_opt_44_manage_kokkos = @fcflags_opt_44_manage_kokkos@ +fcflags_opt_45_geomoptim = @fcflags_opt_45_geomoptim@ +fcflags_opt_45_xgTools = @fcflags_opt_45_xgTools@ +fcflags_opt_46_ghc_omp = @fcflags_opt_46_ghc_omp@ +fcflags_opt_46_manage_cuda = @fcflags_opt_46_manage_cuda@ +fcflags_opt_48_diago = @fcflags_opt_48_diago@ +fcflags_opt_49_gw_toolbox_oop = @fcflags_opt_49_gw_toolbox_oop@ +fcflags_opt_51_manage_mpi = @fcflags_opt_51_manage_mpi@ +fcflags_opt_52_fft_mpi_noabirule = @fcflags_opt_52_fft_mpi_noabirule@ +fcflags_opt_53_ffts = @fcflags_opt_53_ffts@ +fcflags_opt_54_spacepar = @fcflags_opt_54_spacepar@ +fcflags_opt_55_abiutil = @fcflags_opt_55_abiutil@ +fcflags_opt_56_io_mpi = @fcflags_opt_56_io_mpi@ +fcflags_opt_56_mixing = @fcflags_opt_56_mixing@ +fcflags_opt_56_recipspace = @fcflags_opt_56_recipspace@ +fcflags_opt_56_xc = @fcflags_opt_56_xc@ +fcflags_opt_57_iopsp_parser = @fcflags_opt_57_iopsp_parser@ +fcflags_opt_57_iovars = @fcflags_opt_57_iovars@ +fcflags_opt_61_occeig = @fcflags_opt_61_occeig@ +fcflags_opt_62_cg_noabirule = @fcflags_opt_62_cg_noabirule@ +fcflags_opt_62_ctqmc = @fcflags_opt_62_ctqmc@ +fcflags_opt_62_iowfdenpot = @fcflags_opt_62_iowfdenpot@ +fcflags_opt_62_poisson = @fcflags_opt_62_poisson@ +fcflags_opt_62_wvl_wfs = @fcflags_opt_62_wvl_wfs@ +fcflags_opt_64_psp = @fcflags_opt_64_psp@ +fcflags_opt_65_lotf_base = @fcflags_opt_65_lotf_base@ +fcflags_opt_65_paw = @fcflags_opt_65_paw@ +fcflags_opt_66_nonlocal = @fcflags_opt_66_nonlocal@ +fcflags_opt_66_vdwxc = @fcflags_opt_66_vdwxc@ +fcflags_opt_66_wfs = @fcflags_opt_66_wfs@ +fcflags_opt_67_common = @fcflags_opt_67_common@ +fcflags_opt_67_python_invocation_ext = @fcflags_opt_67_python_invocation_ext@ +fcflags_opt_67_triqs_ext = @fcflags_opt_67_triqs_ext@ +fcflags_opt_68_dmft = @fcflags_opt_68_dmft@ +fcflags_opt_68_lotf = @fcflags_opt_68_lotf@ +fcflags_opt_68_recursion = @fcflags_opt_68_recursion@ +fcflags_opt_68_rsprc = @fcflags_opt_68_rsprc@ +fcflags_opt_69_wfdesc = @fcflags_opt_69_wfdesc@ +fcflags_opt_70_gw = @fcflags_opt_70_gw@ +fcflags_opt_71_bse = @fcflags_opt_71_bse@ +fcflags_opt_71_wannier = @fcflags_opt_71_wannier@ +fcflags_opt_72_response = @fcflags_opt_72_response@ +fcflags_opt_77_ddb = @fcflags_opt_77_ddb@ +fcflags_opt_77_suscep = @fcflags_opt_77_suscep@ +fcflags_opt_78_effpot = @fcflags_opt_78_effpot@ +fcflags_opt_78_eph = @fcflags_opt_78_eph@ +fcflags_opt_79_seqpar_mpi = @fcflags_opt_79_seqpar_mpi@ +fcflags_opt_80_rttddft = @fcflags_opt_80_rttddft@ +fcflags_opt_80_tdep = @fcflags_opt_80_tdep@ +fcflags_opt_94_scfcv = @fcflags_opt_94_scfcv@ +fcflags_opt_95_drive = @fcflags_opt_95_drive@ +fcflags_opt_98_main = @fcflags_opt_98_main@ +fcflags_opt_bigdft = @fcflags_opt_bigdft@ +fcflags_opt_default = @fcflags_opt_default@ +fcflags_opt_hdf5 = @fcflags_opt_hdf5@ +fcflags_opt_levmar = @fcflags_opt_levmar@ +fcflags_opt_libpsml = @fcflags_opt_libpsml@ +fcflags_opt_libxc = @fcflags_opt_libxc@ +fcflags_opt_libxml2 = @fcflags_opt_libxml2@ +fcflags_opt_linalg = @fcflags_opt_linalg@ +fcflags_opt_netcdf = @fcflags_opt_netcdf@ +fcflags_opt_netcdf_fortran = @fcflags_opt_netcdf_fortran@ +fcflags_opt_papi = @fcflags_opt_papi@ +fcflags_opt_triqs = @fcflags_opt_triqs@ +fcflags_opt_wannier90 = @fcflags_opt_wannier90@ +fcflags_opt_xmlf90 = @fcflags_opt_xmlf90@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sd_abinit_common_cppflags = @sd_abinit_common_cppflags@ +sd_abinit_common_enable = @sd_abinit_common_enable@ +sd_abinit_common_enable_def = @sd_abinit_common_enable_def@ +sd_abinit_common_fcflags = @sd_abinit_common_fcflags@ +sd_abinit_common_init = @sd_abinit_common_init@ +sd_abinit_common_ldflags = @sd_abinit_common_ldflags@ +sd_abinit_common_libs = @sd_abinit_common_libs@ +sd_abinit_common_ok = @sd_abinit_common_ok@ +sd_abinit_common_options = @sd_abinit_common_options@ +sd_abinit_common_policy = @sd_abinit_common_policy@ +sd_abinit_common_status = @sd_abinit_common_status@ +sd_bigdft_cppflags = @sd_bigdft_cppflags@ +sd_bigdft_enable = @sd_bigdft_enable@ +sd_bigdft_enable_def = @sd_bigdft_enable_def@ +sd_bigdft_fcflags = @sd_bigdft_fcflags@ +sd_bigdft_init = @sd_bigdft_init@ +sd_bigdft_ldflags = @sd_bigdft_ldflags@ +sd_bigdft_libs = @sd_bigdft_libs@ +sd_bigdft_ok = @sd_bigdft_ok@ +sd_bigdft_options = @sd_bigdft_options@ +sd_bigdft_policy = @sd_bigdft_policy@ +sd_bigdft_status = @sd_bigdft_status@ +sd_fft_cflags = @sd_fft_cflags@ +sd_fft_choices = @sd_fft_choices@ +sd_fft_cppflags = @sd_fft_cppflags@ +sd_fft_cxxflags = @sd_fft_cxxflags@ +sd_fft_enable = @sd_fft_enable@ +sd_fft_fcflags = @sd_fft_fcflags@ +sd_fft_flavor = @sd_fft_flavor@ +sd_fft_init = @sd_fft_init@ +sd_fft_ldflags = @sd_fft_ldflags@ +sd_fft_libs = @sd_fft_libs@ +sd_fft_ok = @sd_fft_ok@ +sd_fftw3_cflags = @sd_fftw3_cflags@ +sd_fftw3_cppflags = @sd_fftw3_cppflags@ +sd_fftw3_enable = @sd_fftw3_enable@ +sd_fftw3_enable_def = @sd_fftw3_enable_def@ +sd_fftw3_fcflags = @sd_fftw3_fcflags@ +sd_fftw3_init = @sd_fftw3_init@ +sd_fftw3_ldflags = @sd_fftw3_ldflags@ +sd_fftw3_libs = @sd_fftw3_libs@ +sd_fftw3_ok = @sd_fftw3_ok@ +sd_fftw3_options = @sd_fftw3_options@ +sd_fftw3_policy = @sd_fftw3_policy@ +sd_fftw3_status = @sd_fftw3_status@ +sd_gpu_cflags = @sd_gpu_cflags@ +sd_gpu_cppflags = @sd_gpu_cppflags@ +sd_gpu_cxxflags = @sd_gpu_cxxflags@ +sd_gpu_enable = @sd_gpu_enable@ +sd_gpu_enable_def = @sd_gpu_enable_def@ +sd_gpu_fcflags = @sd_gpu_fcflags@ +sd_gpu_init = @sd_gpu_init@ +sd_gpu_ldflags = @sd_gpu_ldflags@ +sd_gpu_libs = @sd_gpu_libs@ +sd_gpu_ok = @sd_gpu_ok@ +sd_gpu_options = @sd_gpu_options@ +sd_gpu_policy = @sd_gpu_policy@ +sd_gpu_prefix = @sd_gpu_prefix@ +sd_gpu_status = @sd_gpu_status@ +sd_hdf5_cflags = @sd_hdf5_cflags@ +sd_hdf5_cppflags = @sd_hdf5_cppflags@ +sd_hdf5_cxxflags = @sd_hdf5_cxxflags@ +sd_hdf5_enable = @sd_hdf5_enable@ +sd_hdf5_enable_def = @sd_hdf5_enable_def@ +sd_hdf5_enable_fc = @sd_hdf5_enable_fc@ +sd_hdf5_fcflags = @sd_hdf5_fcflags@ +sd_hdf5_h5cc = @sd_hdf5_h5cc@ +sd_hdf5_h5fc = @sd_hdf5_h5fc@ +sd_hdf5_init = @sd_hdf5_init@ +sd_hdf5_ldflags = @sd_hdf5_ldflags@ +sd_hdf5_libs = @sd_hdf5_libs@ +sd_hdf5_ok = @sd_hdf5_ok@ +sd_hdf5_options = @sd_hdf5_options@ +sd_hdf5_policy = @sd_hdf5_policy@ +sd_hdf5_status = @sd_hdf5_status@ +sd_kokkos_cppflags = @sd_kokkos_cppflags@ +sd_kokkos_cxxflags = @sd_kokkos_cxxflags@ +sd_kokkos_enable = @sd_kokkos_enable@ +sd_kokkos_enable_def = @sd_kokkos_enable_def@ +sd_kokkos_init = @sd_kokkos_init@ +sd_kokkos_ldflags = @sd_kokkos_ldflags@ +sd_kokkos_libs = @sd_kokkos_libs@ +sd_kokkos_ok = @sd_kokkos_ok@ +sd_kokkos_options = @sd_kokkos_options@ +sd_kokkos_policy = @sd_kokkos_policy@ +sd_kokkos_status = @sd_kokkos_status@ +sd_levmar_cflags = @sd_levmar_cflags@ +sd_levmar_cppflags = @sd_levmar_cppflags@ +sd_levmar_enable = @sd_levmar_enable@ +sd_levmar_enable_def = @sd_levmar_enable_def@ +sd_levmar_init = @sd_levmar_init@ +sd_levmar_ldflags = @sd_levmar_ldflags@ +sd_levmar_libs = @sd_levmar_libs@ +sd_levmar_ok = @sd_levmar_ok@ +sd_levmar_options = @sd_levmar_options@ +sd_levmar_policy = @sd_levmar_policy@ +sd_levmar_status = @sd_levmar_status@ +sd_libpaw_cppflags = @sd_libpaw_cppflags@ +sd_libpaw_enable = @sd_libpaw_enable@ +sd_libpaw_enable_def = @sd_libpaw_enable_def@ +sd_libpaw_fcflags = @sd_libpaw_fcflags@ +sd_libpaw_init = @sd_libpaw_init@ +sd_libpaw_ldflags = @sd_libpaw_ldflags@ +sd_libpaw_libs = @sd_libpaw_libs@ +sd_libpaw_ok = @sd_libpaw_ok@ +sd_libpaw_options = @sd_libpaw_options@ +sd_libpaw_policy = @sd_libpaw_policy@ +sd_libpaw_status = @sd_libpaw_status@ +sd_libpsml_cppflags = @sd_libpsml_cppflags@ +sd_libpsml_enable = @sd_libpsml_enable@ +sd_libpsml_enable_def = @sd_libpsml_enable_def@ +sd_libpsml_fcflags = @sd_libpsml_fcflags@ +sd_libpsml_init = @sd_libpsml_init@ +sd_libpsml_ldflags = @sd_libpsml_ldflags@ +sd_libpsml_libs = @sd_libpsml_libs@ +sd_libpsml_ok = @sd_libpsml_ok@ +sd_libpsml_options = @sd_libpsml_options@ +sd_libpsml_policy = @sd_libpsml_policy@ +sd_libpsml_status = @sd_libpsml_status@ +sd_libxc_cflags = @sd_libxc_cflags@ +sd_libxc_cppflags = @sd_libxc_cppflags@ +sd_libxc_enable = @sd_libxc_enable@ +sd_libxc_enable_def = @sd_libxc_enable_def@ +sd_libxc_enable_fc = @sd_libxc_enable_fc@ +sd_libxc_fcflags = @sd_libxc_fcflags@ +sd_libxc_init = @sd_libxc_init@ +sd_libxc_ldflags = @sd_libxc_ldflags@ +sd_libxc_libs = @sd_libxc_libs@ +sd_libxc_ok = @sd_libxc_ok@ +sd_libxc_options = @sd_libxc_options@ +sd_libxc_policy = @sd_libxc_policy@ +sd_libxc_status = @sd_libxc_status@ +sd_linalg_cflags = @sd_linalg_cflags@ +sd_linalg_choices = @sd_linalg_choices@ +sd_linalg_cppflags = @sd_linalg_cppflags@ +sd_linalg_cxxflags = @sd_linalg_cxxflags@ +sd_linalg_enable = @sd_linalg_enable@ +sd_linalg_fcflags = @sd_linalg_fcflags@ +sd_linalg_flavor = @sd_linalg_flavor@ +sd_linalg_has_elpa = @sd_linalg_has_elpa@ +sd_linalg_has_scalapack = @sd_linalg_has_scalapack@ +sd_linalg_init = @sd_linalg_init@ +sd_linalg_ldflags = @sd_linalg_ldflags@ +sd_linalg_libs = @sd_linalg_libs@ +sd_linalg_ok = @sd_linalg_ok@ +sd_mpi_cc = @sd_mpi_cc@ +sd_mpi_cflags = @sd_mpi_cflags@ +sd_mpi_cppflags = @sd_mpi_cppflags@ +sd_mpi_cxx = @sd_mpi_cxx@ +sd_mpi_enable = @sd_mpi_enable@ +sd_mpi_enable_cxx = @sd_mpi_enable_cxx@ +sd_mpi_enable_def = @sd_mpi_enable_def@ +sd_mpi_enable_fc = @sd_mpi_enable_fc@ +sd_mpi_fc = @sd_mpi_fc@ +sd_mpi_fcflags = @sd_mpi_fcflags@ +sd_mpi_init = @sd_mpi_init@ +sd_mpi_ldflags = @sd_mpi_ldflags@ +sd_mpi_libs = @sd_mpi_libs@ +sd_mpi_ok = @sd_mpi_ok@ +sd_mpi_options = @sd_mpi_options@ +sd_mpi_policy = @sd_mpi_policy@ +sd_mpi_status = @sd_mpi_status@ +sd_netcdf_cflags = @sd_netcdf_cflags@ +sd_netcdf_cppflags = @sd_netcdf_cppflags@ +sd_netcdf_enable = @sd_netcdf_enable@ +sd_netcdf_enable_def = @sd_netcdf_enable_def@ +sd_netcdf_fcflags = @sd_netcdf_fcflags@ +sd_netcdf_fortran_cflags = @sd_netcdf_fortran_cflags@ +sd_netcdf_fortran_cppflags = @sd_netcdf_fortran_cppflags@ +sd_netcdf_fortran_enable = @sd_netcdf_fortran_enable@ +sd_netcdf_fortran_enable_def = @sd_netcdf_fortran_enable_def@ +sd_netcdf_fortran_fcflags = @sd_netcdf_fortran_fcflags@ +sd_netcdf_fortran_init = @sd_netcdf_fortran_init@ +sd_netcdf_fortran_ldflags = @sd_netcdf_fortran_ldflags@ +sd_netcdf_fortran_libs = @sd_netcdf_fortran_libs@ +sd_netcdf_fortran_ok = @sd_netcdf_fortran_ok@ +sd_netcdf_fortran_options = @sd_netcdf_fortran_options@ +sd_netcdf_fortran_policy = @sd_netcdf_fortran_policy@ +sd_netcdf_fortran_status = @sd_netcdf_fortran_status@ +sd_netcdf_init = @sd_netcdf_init@ +sd_netcdf_ldflags = @sd_netcdf_ldflags@ +sd_netcdf_libs = @sd_netcdf_libs@ +sd_netcdf_ok = @sd_netcdf_ok@ +sd_netcdf_options = @sd_netcdf_options@ +sd_netcdf_policy = @sd_netcdf_policy@ +sd_netcdf_status = @sd_netcdf_status@ +sd_papi_cflags = @sd_papi_cflags@ +sd_papi_cppflags = @sd_papi_cppflags@ +sd_papi_enable = @sd_papi_enable@ +sd_papi_enable_def = @sd_papi_enable_def@ +sd_papi_init = @sd_papi_init@ +sd_papi_ldflags = @sd_papi_ldflags@ +sd_papi_libs = @sd_papi_libs@ +sd_papi_ok = @sd_papi_ok@ +sd_papi_options = @sd_papi_options@ +sd_papi_policy = @sd_papi_policy@ +sd_papi_sd_papi_fcflags = @sd_papi_sd_papi_fcflags@ +sd_papi_status = @sd_papi_status@ +sd_pfft_cflags = @sd_pfft_cflags@ +sd_pfft_cppflags = @sd_pfft_cppflags@ +sd_pfft_enable = @sd_pfft_enable@ +sd_pfft_enable_def = @sd_pfft_enable_def@ +sd_pfft_init = @sd_pfft_init@ +sd_pfft_ldflags = @sd_pfft_ldflags@ +sd_pfft_libs = @sd_pfft_libs@ +sd_pfft_ok = @sd_pfft_ok@ +sd_pfft_options = @sd_pfft_options@ +sd_pfft_policy = @sd_pfft_policy@ +sd_pfft_status = @sd_pfft_status@ +sd_sys_fcflags = @sd_sys_fcflags@ +sd_triqs_cflags = @sd_triqs_cflags@ +sd_triqs_cppflags = @sd_triqs_cppflags@ +sd_triqs_cxxflags = @sd_triqs_cxxflags@ +sd_triqs_enable = @sd_triqs_enable@ +sd_triqs_enable_def = @sd_triqs_enable_def@ +sd_triqs_fcflags = @sd_triqs_fcflags@ +sd_triqs_init = @sd_triqs_init@ +sd_triqs_ldflags = @sd_triqs_ldflags@ +sd_triqs_libs = @sd_triqs_libs@ +sd_triqs_ok = @sd_triqs_ok@ +sd_triqs_options = @sd_triqs_options@ +sd_triqs_policy = @sd_triqs_policy@ +sd_triqs_status = @sd_triqs_status@ +sd_wannier90_cppflags = @sd_wannier90_cppflags@ +sd_wannier90_enable = @sd_wannier90_enable@ +sd_wannier90_enable_def = @sd_wannier90_enable_def@ +sd_wannier90_fcflags = @sd_wannier90_fcflags@ +sd_wannier90_init = @sd_wannier90_init@ +sd_wannier90_ldflags = @sd_wannier90_ldflags@ +sd_wannier90_libs = @sd_wannier90_libs@ +sd_wannier90_ok = @sd_wannier90_ok@ +sd_wannier90_options = @sd_wannier90_options@ +sd_wannier90_policy = @sd_wannier90_policy@ +sd_wannier90_status = @sd_wannier90_status@ +sd_xmlf90_cppflags = @sd_xmlf90_cppflags@ +sd_xmlf90_enable = @sd_xmlf90_enable@ +sd_xmlf90_enable_def = @sd_xmlf90_enable_def@ +sd_xmlf90_fcflags = @sd_xmlf90_fcflags@ +sd_xmlf90_init = @sd_xmlf90_init@ +sd_xmlf90_ldflags = @sd_xmlf90_ldflags@ +sd_xmlf90_libs = @sd_xmlf90_libs@ +sd_xmlf90_ok = @sd_xmlf90_ok@ +sd_xmlf90_options = @sd_xmlf90_options@ +sd_xmlf90_policy = @sd_xmlf90_policy@ +sd_xmlf90_status = @sd_xmlf90_status@ +sd_yakl_cppflags = @sd_yakl_cppflags@ +sd_yakl_enable = @sd_yakl_enable@ +sd_yakl_enable_def = @sd_yakl_enable_def@ +sd_yakl_fcflags = @sd_yakl_fcflags@ +sd_yakl_init = @sd_yakl_init@ +sd_yakl_ldflags = @sd_yakl_ldflags@ +sd_yakl_libs = @sd_yakl_libs@ +sd_yakl_ok = @sd_yakl_ok@ +sd_yakl_options = @sd_yakl_options@ +sd_yakl_policy = @sd_yakl_policy@ +sd_yakl_status = @sd_yakl_status@ +sharedstatedir = @sharedstatedir@ +src_02_clib_fcflags = @src_02_clib_fcflags@ +src_10_defs_fcflags = @src_10_defs_fcflags@ +src_11_memory_mpi_fcflags = @src_11_memory_mpi_fcflags@ +src_12_hide_mpi_fcflags = @src_12_hide_mpi_fcflags@ +src_14_hidewrite_fcflags = @src_14_hidewrite_fcflags@ +src_16_hideleave_fcflags = @src_16_hideleave_fcflags@ +src_16_kokkos_toolbox_fcflags = @src_16_kokkos_toolbox_fcflags@ +src_17_gpu_toolbox_fcflags = @src_17_gpu_toolbox_fcflags@ +src_17_libtetra_ext_fcflags = @src_17_libtetra_ext_fcflags@ +src_17_minimax_fcflags = @src_17_minimax_fcflags@ +src_17_yaml_out_fcflags = @src_17_yaml_out_fcflags@ +src_18_timing_fcflags = @src_18_timing_fcflags@ +src_21_hashfuncs_fcflags = @src_21_hashfuncs_fcflags@ +src_27_toolbox_oop_fcflags = @src_27_toolbox_oop_fcflags@ +src_28_numeric_noabirule_fcflags = @src_28_numeric_noabirule_fcflags@ +src_29_kpoints_fcflags = @src_29_kpoints_fcflags@ +src_32_util_fcflags = @src_32_util_fcflags@ +src_33_xc_lowlevel_fcflags = @src_33_xc_lowlevel_fcflags@ +src_39_libpaw_fcflags = @src_39_libpaw_fcflags@ +src_41_geometry_fcflags = @src_41_geometry_fcflags@ +src_42_nlstrain_fcflags = @src_42_nlstrain_fcflags@ +src_42_parser_fcflags = @src_42_parser_fcflags@ +src_43_ptgroups_fcflags = @src_43_ptgroups_fcflags@ +src_43_wvl_wrappers_fcflags = @src_43_wvl_wrappers_fcflags@ +src_44_abitools_fcflags = @src_44_abitools_fcflags@ +src_44_abitypes_defs_fcflags = @src_44_abitypes_defs_fcflags@ +src_44_manage_kokkos_fcflags = @src_44_manage_kokkos_fcflags@ +src_45_geomoptim_fcflags = @src_45_geomoptim_fcflags@ +src_45_xgTools_fcflags = @src_45_xgTools_fcflags@ +src_46_ghc_omp_fcflags = @src_46_ghc_omp_fcflags@ +src_46_manage_cuda_fcflags = @src_46_manage_cuda_fcflags@ +src_48_diago_fcflags = @src_48_diago_fcflags@ +src_49_gw_toolbox_oop_fcflags = @src_49_gw_toolbox_oop_fcflags@ +src_51_manage_mpi_fcflags = @src_51_manage_mpi_fcflags@ +src_52_fft_mpi_noabirule_fcflags = @src_52_fft_mpi_noabirule_fcflags@ +src_53_ffts_fcflags = @src_53_ffts_fcflags@ +src_54_spacepar_fcflags = @src_54_spacepar_fcflags@ +src_55_abiutil_fcflags = @src_55_abiutil_fcflags@ +src_56_io_mpi_fcflags = @src_56_io_mpi_fcflags@ +src_56_mixing_fcflags = @src_56_mixing_fcflags@ +src_56_recipspace_fcflags = @src_56_recipspace_fcflags@ +src_56_xc_fcflags = @src_56_xc_fcflags@ +src_57_iopsp_parser_fcflags = @src_57_iopsp_parser_fcflags@ +src_57_iovars_fcflags = @src_57_iovars_fcflags@ +src_61_occeig_fcflags = @src_61_occeig_fcflags@ +src_62_cg_noabirule_fcflags = @src_62_cg_noabirule_fcflags@ +src_62_ctqmc_fcflags = @src_62_ctqmc_fcflags@ +src_62_iowfdenpot_fcflags = @src_62_iowfdenpot_fcflags@ +src_62_poisson_fcflags = @src_62_poisson_fcflags@ +src_62_wvl_wfs_fcflags = @src_62_wvl_wfs_fcflags@ +src_64_psp_fcflags = @src_64_psp_fcflags@ +src_65_lotf_base_fcflags = @src_65_lotf_base_fcflags@ +src_65_paw_fcflags = @src_65_paw_fcflags@ +src_66_nonlocal_fcflags = @src_66_nonlocal_fcflags@ +src_66_vdwxc_fcflags = @src_66_vdwxc_fcflags@ +src_66_wfs_fcflags = @src_66_wfs_fcflags@ +src_67_common_fcflags = @src_67_common_fcflags@ +src_67_python_invocation_ext_fcflags = @src_67_python_invocation_ext_fcflags@ +src_67_triqs_ext_fcflags = @src_67_triqs_ext_fcflags@ +src_68_dmft_fcflags = @src_68_dmft_fcflags@ +src_68_lotf_fcflags = @src_68_lotf_fcflags@ +src_68_recursion_fcflags = @src_68_recursion_fcflags@ +src_68_rsprc_fcflags = @src_68_rsprc_fcflags@ +src_69_wfdesc_fcflags = @src_69_wfdesc_fcflags@ +src_70_gw_fcflags = @src_70_gw_fcflags@ +src_71_bse_fcflags = @src_71_bse_fcflags@ +src_71_wannier_fcflags = @src_71_wannier_fcflags@ +src_72_response_fcflags = @src_72_response_fcflags@ +src_77_ddb_fcflags = @src_77_ddb_fcflags@ +src_77_suscep_fcflags = @src_77_suscep_fcflags@ +src_78_effpot_fcflags = @src_78_effpot_fcflags@ +src_78_eph_fcflags = @src_78_eph_fcflags@ +src_79_seqpar_mpi_fcflags = @src_79_seqpar_mpi_fcflags@ +src_80_rttddft_fcflags = @src_80_rttddft_fcflags@ +src_80_tdep_fcflags = @src_80_tdep_fcflags@ +src_94_scfcv_fcflags = @src_94_scfcv_fcflags@ +src_95_drive_fcflags = @src_95_drive_fcflags@ +src_common_fcflags = @src_common_fcflags@ +src_core_fcflags = @src_core_fcflags@ +src_libpaw_fcflags = @src_libpaw_fcflags@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +with_abinit_common = @with_abinit_common@ +with_bigdft = @with_bigdft@ +with_config_file = @with_config_file@ +with_debug_flavor = @with_debug_flavor@ +with_fallbacks = @with_fallbacks@ +with_fc_vendor = @with_fc_vendor@ +with_fc_version = @with_fc_version@ +with_fft_flavor = @with_fft_flavor@ +with_fftw3 = @with_fftw3@ +with_gnu_ld = @with_gnu_ld@ +with_gpu = @with_gpu@ +with_hdf5 = @with_hdf5@ +with_kokkos = @with_kokkos@ +with_levmar = @with_levmar@ +with_libpaw = @with_libpaw@ +with_libpsml = @with_libpsml@ +with_libxc = @with_libxc@ +with_libxml2 = @with_libxml2@ +with_linalg_flavor = @with_linalg_flavor@ +with_mpi = @with_mpi@ +with_mpi_level = @with_mpi_level@ +with_netcdf = @with_netcdf@ +with_optim_flavor = @with_optim_flavor@ +with_papi = @with_papi@ +with_pfft = @with_pfft@ +with_triqs = @with_triqs@ +with_wannier90 = @with_wannier90@ +with_xmlf90 = @with_xmlf90@ +with_yakl = @with_yakl@ +AM_CFLAGS = @ABI_CPPFLAGS@ +AM_CXXFLAGS = $(sd_triqs_cxxflags) +AM_FCFLAGS = @FPPFLAGS@ @FCFLAGS_FREEFORM@ @FCFLAGS_MODDIR@ @sd_sys_fcflags@ @fcflags_opt_12_hide_mpi@ +AM_CPPFLAGS = \ + @src_02_clib_fcflags@ \ + @src_10_defs_fcflags@ \ + @src_11_memory_mpi_fcflags@ \ + @src_common_fcflags@ \ + @src_core_fcflags@ \ + @src_libpaw_fcflags@ \ + @sd_mpi_cppflags@ \ + @sd_mpi_fcflags@ \ + @fc_mod_fcflags@ + + +# Regular source files +lib12_hide_mpi_srcs = \ + m_xmpi.F90 \ + m_xomp.F90 + + +# Source files depending on conditionals + +# Library description +noinst_LIBRARIES = lib12_hide_mpi.a +lib12_hide_mpi_a_SOURCES = $(lib12_hide_mpi_srcs) + +# Dependencies (inside the directory) of directory 12_hide_mpi +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. +CLEANFILES = m_xmpi_cpp.f90 m_xomp_cpp.f90 m_xmpi.$(MODEXT) \ + m_xomp.$(MODEXT) + +#EXTRA_DIST_TMP = $(foreach ffile,$(finc_list),$(ffile)) +EXTRA_DIST = abinit.src abinit.dep abinit.amf $(finc_list) \ + _12_hide_mpi_ +finc_list = \ + xmpi_allgather.finc \ + xmpi_iallgather.finc \ + xmpi_allgatherv.finc \ + xmpi_gather.finc \ + xmpi_gatherv.finc \ + xmpi_bcast.finc \ + xmpi_min.finc \ + xmpi_sum_master.finc \ + xmpi_exch.finc \ + xmpi_recv.finc \ + xmpi_irecv.finc \ + xmpi_sum.finc \ + xmpi_ibcast.finc \ + xmpi_isum.finc \ + xmpi_alltoall.finc \ + xmpi_ialltoall.finc \ + xmpi_alltoallv.finc \ + xmpi_ialltoallv.finc \ + xmpi_max.finc \ + xmpi_send.finc \ + xmpi_isend.finc \ + xmpi_scatterv.finc \ + xmpi_land_lor.finc + + +# make sure lib12_hide_mpi is recompiled if any file from finc_list is modified +lib12_hide_mpi_a_DEPENDENCIES = $(finc_list) +all: all-am + +.SUFFIXES: +.SUFFIXES: .F90 .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu shared/common/src/12_hide_mpi/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu shared/common/src/12_hide_mpi/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) + +lib12_hide_mpi.a: $(lib12_hide_mpi_a_OBJECTS) $(lib12_hide_mpi_a_DEPENDENCIES) $(EXTRA_lib12_hide_mpi_a_DEPENDENCIES) + $(AM_V_at)-rm -f lib12_hide_mpi.a + $(AM_V_AR)$(lib12_hide_mpi_a_AR) lib12_hide_mpi.a $(lib12_hide_mpi_a_OBJECTS) $(lib12_hide_mpi_a_LIBADD) + $(AM_V_at)$(RANLIB) lib12_hide_mpi.a + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +.F90.o: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ $< + +.F90.obj: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-noinstLIBRARIES cscopelist-am ctags ctags-am distclean \ + distclean-compile distclean-generic distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am + +.PRECIOUS: Makefile + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/GX-PAW/common/src/12_hide_mpi/README b/GX-PAW/common/src/12_hide_mpi/README new file mode 100644 index 00000000..35cec49b --- /dev/null +++ b/GX-PAW/common/src/12_hide_mpi/README @@ -0,0 +1,15 @@ +Adding a new source file inside a directory "dirname" +===================================================== + +In order to be treated properly by the ABINIT build system, +a new source file should be declared in the file abinit.src +of the same directory (just one line to be added +per new file, rather self-explanatory). + +Then, in order for the make to work : +(1) if the developer has the autotools working on his computer, he should + issue */*/makemake, then configure and make +(2) otherwise, the developer should modify by hand the Makefile.am file + of the directory in which the file is placed (just one line to be added also), + then issue make. + diff --git a/GX-PAW/common/src/12_hide_mpi/_12_hide_mpi_ b/GX-PAW/common/src/12_hide_mpi/_12_hide_mpi_ new file mode 100644 index 00000000..e4195817 --- /dev/null +++ b/GX-PAW/common/src/12_hide_mpi/_12_hide_mpi_ @@ -0,0 +1,46 @@ +!!****d* ABINIT/12_hide_mpi +!! NAME +!! 12_hide_mpi +!! +!! DESCRIPTION +!! This directory contains small routines that are +!! used to hide MPI calls in the ABINIT package. +!! Outside MPI calls, They do not call routines in other ABINIT directories, +!! hence these routines constitutes a stand-alone library. +!! Some of these routines have two versions : one sequential, and +!! one MPI-parallel. +!! +!! COPYRIGHT +!! Copyright (C) 1998-2024 ABINIT group (TD) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! For the initials of contributors, see ~abinit/doc/developers/contributors.txt . +!! +!! CHILDREN +!! interfaces_12_hide_mpi.F90 +!! m_xmpi.F90 +!! m_xomp.F90 +!! xmpi_allgather.finc +!! xmpi_allgatherv.finc +!! xmpi_alltoall.finc +!! xmpi_alltoallv.finc +!! xmpi_bcast.finc +!! xmpi_exch.finc +!! xmpi_gather.finc +!! xmpi_gatherv.finc +!! xmpi_ialltoall.finc +!! xmpi_ialltoallv.finc +!! xmpi_irecv.finc +!! xmpi_isend.finc +!! xmpi_isum.finc +!! xmpi_land_lor.finc +!! xmpi_max.finc +!! xmpi_min.finc +!! xmpi_recv.finc +!! xmpi_scatterv.finc +!! xmpi_send.finc +!! xmpi_sum.finc +!! xmpi_sum_master.finc +!! +!!*** diff --git a/GX-PAW/common/src/12_hide_mpi/__pycache__/abinit.cpython-36.pyc b/GX-PAW/common/src/12_hide_mpi/__pycache__/abinit.cpython-36.pyc new file mode 100644 index 00000000..b0a0fb74 Binary files /dev/null and b/GX-PAW/common/src/12_hide_mpi/__pycache__/abinit.cpython-36.pyc differ diff --git a/GX-PAW/common/src/12_hide_mpi/abinit.amf b/GX-PAW/common/src/12_hide_mpi/abinit.amf new file mode 100644 index 00000000..e0500415 --- /dev/null +++ b/GX-PAW/common/src/12_hide_mpi/abinit.amf @@ -0,0 +1,30 @@ +finc_list = \ + xmpi_allgather.finc \ + xmpi_iallgather.finc \ + xmpi_allgatherv.finc \ + xmpi_gather.finc \ + xmpi_gatherv.finc \ + xmpi_bcast.finc \ + xmpi_min.finc \ + xmpi_sum_master.finc \ + xmpi_exch.finc \ + xmpi_recv.finc \ + xmpi_irecv.finc \ + xmpi_sum.finc \ + xmpi_ibcast.finc \ + xmpi_isum.finc \ + xmpi_alltoall.finc \ + xmpi_ialltoall.finc \ + xmpi_alltoallv.finc \ + xmpi_ialltoallv.finc \ + xmpi_max.finc \ + xmpi_send.finc \ + xmpi_isend.finc \ + xmpi_scatterv.finc \ + xmpi_land_lor.finc + +#EXTRA_DIST_TMP = $(foreach ffile,$(finc_list),$(ffile)) +EXTRA_DIST += $(finc_list) + +# make sure lib12_hide_mpi is recompiled if any file from finc_list is modified +lib12_hide_mpi_a_DEPENDENCIES = $(finc_list) diff --git a/GX-PAW/common/src/12_hide_mpi/abinit.dep b/GX-PAW/common/src/12_hide_mpi/abinit.dep new file mode 100644 index 00000000..70a12ad6 --- /dev/null +++ b/GX-PAW/common/src/12_hide_mpi/abinit.dep @@ -0,0 +1,10 @@ +# Dependencies (inside the directory) of directory 12_hide_mpi +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. + +CLEANFILES += \ + m_xmpi.$(MODEXT) \ + m_xomp.$(MODEXT) + diff --git a/GX-PAW/common/src/12_hide_mpi/abinit.dir b/GX-PAW/common/src/12_hide_mpi/abinit.dir new file mode 100644 index 00000000..df8a750c --- /dev/null +++ b/GX-PAW/common/src/12_hide_mpi/abinit.dir @@ -0,0 +1,8 @@ +# Dependencies (outside the directory) of directory 12_hide_mpi +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. + +include_dirs = \ +['02_clib', '10_defs', '11_memory_mpi'] \ No newline at end of file diff --git a/GX-PAW/common/src/12_hide_mpi/abinit.src b/GX-PAW/common/src/12_hide_mpi/abinit.src new file mode 100644 index 00000000..624fb474 --- /dev/null +++ b/GX-PAW/common/src/12_hide_mpi/abinit.src @@ -0,0 +1,25 @@ +# -*- Python -*- +# +# Copyright (C) 2005-2024 ABINIT Group (Yann Pouillon) +# +# This file is part of the ABINIT software package. For license information, +# please see the COPYING file in the top-level directory of the ABINIT source +# distribution. +# + +# +# Source files making up the 1managempi library +# + +# Source file attributes +ABI_SRC_NIL = 0 # No attribute +ABI_SRC_BLT = 1 # The file is built by a script +ABI_SRC_DEP = 2 # The file depends on other files + +# Source files +sources = [ + "m_xmpi.F90", + "m_xomp.F90", + ] +# IMPORTANT : please use the alphabetic order in the previous list. Do NOT add the new routine names at the end of the list. +# This is important to avoid numerous conflicts at merge time. Thank you very much. Xavier. diff --git a/GX-PAW/common/src/12_hide_mpi/lib12_hide_mpi.a b/GX-PAW/common/src/12_hide_mpi/lib12_hide_mpi.a new file mode 100644 index 00000000..6c0afcf1 Binary files /dev/null and b/GX-PAW/common/src/12_hide_mpi/lib12_hide_mpi.a differ diff --git a/GX-PAW/common/src/12_hide_mpi/m_xmpi.F90 b/GX-PAW/common/src/12_hide_mpi/m_xmpi.F90 new file mode 100644 index 00000000..38d6c440 --- /dev/null +++ b/GX-PAW/common/src/12_hide_mpi/m_xmpi.F90 @@ -0,0 +1,5436 @@ +!!****m* ABINIT/m_xmpi +!! NAME +!! m_xmpi +!! +!! FUNCTION +!! This module provides MPI named constants, tools for inquiring the MPI environment +!! and a set of generic interfaces wrapping the most commonly used MPI primitives. +!! +!! COPYRIGHT +!! Copyright (C) 2009-2024 ABINIT group (MG, MB, XG, YP, MT) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! TODO +!! Get rid of xmpi_paral. Sequential code is the **exception**. Developers should code parallel +!! code or code that is compatible both with MPI and seq (thanks to the wrappers provided by this module) +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" + +module m_xmpi + + use defs_basis + use m_profiling_abi + use, intrinsic :: iso_c_binding +#ifdef HAVE_FC_ISO_FORTRAN_2008 + use ISO_FORTRAN_ENV, only : int16, int32, int64 +#endif +#ifdef HAVE_MPI2 + use mpi +#endif +#ifdef FC_NAG + use f90_unix_proc +#endif + use m_clib, only : clib_ulimit_stack !, clib_getpid !, clib_usleep + + implicit none + + private +!!*** + +#ifdef HAVE_MPI1 + include 'mpif.h' +#endif +#ifndef HAVE_FC_ISO_FORTRAN_2008 + integer,parameter :: int16=2,int32=4,int64=8 +#endif + +#ifdef HAVE_MPI + ! MPI constants used in abinit. Make sure that a corresponding fake value is provided for the sequential version. + integer,public,parameter :: xmpi_paral = 1 + integer,public,parameter :: xmpi_world = MPI_COMM_WORLD + integer,public,parameter :: xmpi_comm_self = MPI_COMM_SELF + integer,public,parameter :: xmpi_undefined = MPI_UNDEFINED + integer,public,parameter :: xmpi_undefined_rank = MPI_UNDEFINED ! MPI_UNDEFINED_RANK is not portable. + integer,public,parameter :: xmpi_comm_null = MPI_COMM_NULL + integer,public,parameter :: xmpi_group_null = MPI_GROUP_NULL + integer,public,parameter :: xmpi_any_source = MPI_ANY_SOURCE + integer,public,parameter :: xmpi_request_null = MPI_REQUEST_NULL + integer,public,parameter :: xmpi_msg_len = MPI_MAX_ERROR_STRING ! Length of fortran string used to store MPI error strings. + integer,public,parameter :: xmpi_info_null = MPI_INFO_NULL + integer,public,parameter :: xmpi_success = MPI_SUCCESS + +#else + ! Fake replacements for the sequential version. Values are taken from + ! http://www.mit.edu/course/13/13.715/sun-hpc-ct-8.2.1/Linux/sun/include/mpif-common.h + ! Please use these conventions when adding new replacements in order to avoid collisions between values. + integer,public,parameter :: xmpi_paral = 0 + integer,public,parameter :: xmpi_world = 0 + integer,public,parameter :: xmpi_comm_self = 1 + integer,public,parameter :: xmpi_undefined =-32766 + integer,public,parameter :: xmpi_undefined_rank =-32766 + integer,public,parameter :: xmpi_comm_null = 2 + integer,public,parameter :: xmpi_group_null = 0 + integer,public,parameter :: xmpi_any_source = -1 + integer,public,parameter :: xmpi_request_null = 0 + integer,public,parameter :: xmpi_msg_len = 1000 + integer,public,parameter :: xmpi_info_null = 0 + integer,public,parameter :: xmpi_success = 0 +#endif + +#ifdef HAVE_MPI + integer,save,private :: xmpi_tag_ub=32767 + ! The tag upper bound value must be at least 32767. An MPI implementation is free to make + ! the value of MPI_TAG_UB larger than this hence xmpi_tag_ub is redefined when MPI is init in xmpi_init. +#endif + + ! Size in bytes of the entries used in MPI datatypes. + integer,save, public ABI_PROTECTED:: xmpi_bsize_ch = 0 + integer,save, public ABI_PROTECTED:: xmpi_bsize_int = 0 + integer,save, public ABI_PROTECTED:: xmpi_bsize_sp = 0 + integer,save, public ABI_PROTECTED:: xmpi_bsize_dp = 0 + integer,save, public ABI_PROTECTED:: xmpi_bsize_spc = 0 + integer,save, public ABI_PROTECTED:: xmpi_bsize_dpc = 0 + + ! kind of the offset used for MPI-IO. +#ifdef HAVE_MPI_IO + integer,public,parameter :: xmpi_offset_kind = MPI_OFFSET_KIND + integer,public,parameter :: xmpi_address_kind = MPI_ADDRESS_KIND + integer,public,parameter :: xmpi_mpiio = 1 +#else + integer,public,parameter :: xmpi_offset_kind = i8b + integer,public,parameter :: xmpi_address_kind = i8b + integer,public,parameter :: xmpi_mpiio = 0 +#endif + + ! The byte size and the MPI type of the Fortran record marker. + ! These quantities are compiler-dependent and are initalized here + ! for selected compilers or in xmpio_get_info_frm that is called by xmpi_init (only if MPI-IO is on). +#if defined HAVE_MPI && (defined FC_INTEL || defined FC_GNU || defined FC_IBM) + integer,save,public ABI_PROTECTED :: xmpio_bsize_frm = 4 + integer,save,public ABI_PROTECTED :: xmpio_mpi_type_frm= MPI_INTEGER4 +#else + integer,save,public ABI_PROTECTED :: xmpio_bsize_frm = 0 + integer,save,public ABI_PROTECTED :: xmpio_mpi_type_frm = 0 +#endif + + integer,save, public ABI_PROTECTED :: xmpio_info = xmpi_info_null + ! Global variable used to pass hints to the MPI-IO routines. + + integer(XMPI_OFFSET_KIND),public,parameter :: xmpio_chunk_bsize = 2000 * (1024.0_dp**2) + ! Defines the chunk size (in bytes) used to (read|write) data in a single MPI-IO call. + ! MPI-IO, indeed, crashes if we try to do the IO of a large array with a single call. + ! We use a value <= 2 Gb to avoid wraparound errors with standard integers. + + ! Options used for the MPI-IO wrappers used in abinit. + integer,public,parameter :: xmpio_single = 1 ! Individual IO. + integer,public,parameter :: xmpio_collective = 2 ! Collective IO. + + integer,save, public ABI_PROTECTED :: xmpi_count_requests = 0 + ! Count number of requests (+1 for each call to non-blocking API, -1 for each call to xmpi_wait) + ! This counter should be zero at the end of the run if all requests have been released. + + logical,save, private :: xmpi_use_inplace_operations = .False. + ! Enable/disable usage of MPI_IN_PLACE in e.g. xmpi_sum + + ! For MPI unitialized, 0 if ranks do not belong to a shared memory region else 1 + + contains + procedure :: skip => xcomm_skip ! Skip iteration according to rank + procedure :: set_to_null => xcomm_set_to_null + procedure :: set_to_self => xcomm_set_to_self + procedure :: free => xcomm_free + procedure :: from_cart_sub => xcomm_from_cart_sub ! Build sub-communicators in a Cartesian grid. + procedure :: prep_gatherv => xcomm_prep_gatherv ! Prepare a typical gatherv operation. + procedure :: print_names => xcomm_print_names + procedure :: can_use_shmem => xcomm_can_use_shmem + procedure :: allocate_shared_master => xcomm_allocate_shared_master + end type xcomm_t + + public :: xcomm_from_mpi_int +!!*** + +!---------------------------------------------------------------------- + +!!****t* m_xmpi/xmpi_pool2d_t +!! NAME +!! xmpi_pool2d_t +!! +!! FUNCTION +!! Pool of MPI processors operating a 2D problem of shape (n1, n2). +!! Each item in the (n1, n2) matrix is assigned to a single pool. +!! Note that differerent pools do not necessarily have the same number of procs, +!! thus a pool is more flexibile than a Cartesian grid although inter-pool communication becomes more complex. +!! +!! SOURCE + + type, public :: xmpi_pool2d_t + + integer :: n1 = -1, n2 = -1 + ! Dimensions of the 2d problem + + type(xcomm_t) :: comm + ! MPI communicator + + logical,allocatable :: treats(:,:) + ! (n1, n2) + ! True if this pool treats (i1, i2) + + contains + procedure :: from_dims => pool2d_from_dims ! Init pool from problem dims. + procedure :: free => pool2d_free ! Free memory. + end type xmpi_pool2d_t +!!*** + +! Public procedures. + public :: xmpi_init ! Initialize the MPI environment. + public :: xmpi_set_inplace_operations! Set internal flag to use MPI_IN_PLACE whenever possible. + public :: xmpi_end ! Terminate the MPI environment. + public :: xmpi_abort ! Hides MPI_ABORT from MPI library. + public :: xmpi_show_info ! Printout of the basic variables stored in this module (useful for debugging). + public :: xmpi_group_free ! Hides MPI_GROUP_FREE from MPI library. + public :: xmpi_group_incl ! Hides MPI_GROUP_INCL from MPI library. + public :: xmpi_group_translate_ranks ! Hides MPI_GROUP_TRANSLATE_RANKS from MPI library. + public :: xmpi_comm_create ! Hides MPI_COMM_CREATE from MPI library. + public :: xmpi_comm_rank ! Hides MPI_COMM_RANK from MPI library. + public :: xmpi_comm_size ! Hides MPI_COMM_SIZE from MPI library. + public :: xmpi_comm_free ! Hides MPI_COMM_FREE from MPI library. + public :: xmpi_comm_group ! Hides MPI_COMM_GROUP from MPI library. + public :: xmpi_comm_translate_ranks ! Hides MPI_GROUP_TRANSLATE_RANKS from MPI library. + public :: xmpi_comm_translate_rank ! Translate one rank + public :: xmpi_comm_split ! Hides MPI_COMM_SPLIT from MPI library. + public :: xmpi_subcomm ! Creates a sub-communicator from an input communicator. + public :: xmpi_comm_multiple_of ! Creates sub-communicator with number of procs multiple of a certain number. + public :: xmpi_barrier ! Hides MPI_BARRIER from MPI library. + public :: xmpi_name ! Hides MPI_NAME from MPI library. + public :: xmpi_iprobe ! Hides MPI_IPROBE from MPI library. + public :: xmpi_wait ! Hides MPI_WAIT from MPI library. + public :: xmpi_waitall ! Hides MPI_WAITALL from MPI library. + public :: xmpi_request_free ! Hides MPI_REQUEST_FREE from MPI library. + public :: xmpi_requests_add ! Increase/decrement xmpi_count_requests internal counter + public :: xmpi_comm_set_errhandler ! Hides MPI_COMM_SET_ERRHANDLER from MPI library. + public :: xmpi_error_string ! Return a string describing the error from ierr. + public :: xmpi_split_work ! Splits tasks inside communicator using blocks + public :: xmpi_split_block ! Splits tasks inside communicator using block distribution. + public :: xmpi_split_cyclic ! Splits tasks inside communicator using cyclic distribution. + public :: xmpi_split_list ! Splits list of indices inside communicator using block distribution. + public :: xmpi_distab ! Fill table defining the distribution of the tasks according to the # of processors + public :: xmpi_distrib_with_replicas ! Distribute tasks among MPI ranks (replicas are allowed) + public :: xmpi_distrib_2d ! Try to optimally distribute nprocs in a 2d grid of shape (n1, n2) + +! Private procedures. + private :: xmpi_largetype_create ! Build a large-count contiguous datatype (to handle a very large # of data) + private :: xmpi_largetype_free ! Release a large-count contiguous datatype + + interface xmpi_comm_free + module procedure xmpi_comm_free_0D + module procedure xmpi_comm_free_1D + module procedure xmpi_comm_free_2D + module procedure xmpi_comm_free_3D + end interface xmpi_comm_free + + interface xmpi_waitall + module procedure xmpi_waitall_1d + module procedure xmpi_waitall_2d + end interface xmpi_waitall + + interface xmpi_split_work + module procedure xmpi_split_work_i4b + end interface xmpi_split_work + + public :: xmpi_split_work2_i4b + public :: xmpi_split_work2_i8b + !public :: xmpi_split_work2 + ! + ! g95@green v0.93 is not able to resolve the interface. + ! For the time being, this generic interface has been disabled. + !interface xmpi_split_work2 + ! module procedure xmpi_split_work2_i4b + ! module procedure xmpi_split_work2_i8b + !end interface xmpi_split_work2 + + interface xmpi_distab + module procedure xmpi_distab_4D + end interface xmpi_distab + + ! MPI generic interfaces. + public :: xmpi_allgather + public :: xmpi_iallgather + public :: xmpi_allgatherv + public :: xmpi_alltoall + public :: xmpi_ialltoall + public :: xmpi_alltoallv + public :: xmpi_ialltoallv + public :: xmpi_bcast + public :: xmpi_ibcast + public :: xmpi_exch + public :: xmpi_gather + public :: xmpi_gatherv + public :: xmpi_max + public :: xmpi_max_ip + public :: xmpi_min ! Out-of-place version + public :: xmpi_min_ip ! In-place version + public :: xmpi_recv + public :: xmpi_irecv + public :: xmpi_scatterv + public :: xmpi_send + public :: xmpi_isend + public :: xmpi_sum_master + public :: xmpi_sum + public :: xmpi_isum + public :: xmpi_isum_ip + public :: xmpi_land ! allreduce with MPI_LAND + public :: xmpi_lor ! allreduce with MPI_LOR + + public :: xmpi_win_fence + public :: xmpi_win_free + +#ifdef HAVE_MPI_IO + public :: xmpio_max_address ! Returns .TRUE. if offset cannot be stored in integer(kind=XMPI_ADDRESS_KIND). + public :: xmpio_type_struct + public :: xmpio_get_info_frm + public :: xmpio_check_frmarkers + public :: xmpio_read_frm + public :: xmpio_read_int + public :: xmpio_read_dp + public :: xmpio_write_frm + public :: xmpio_write_frmarkers + + public :: xmpio_create_fstripes + public :: xmpio_create_fsubarray_2D + public :: xmpio_create_fsubarray_3D + public :: xmpio_create_fsubarray_4D + public :: xmpio_create_fherm_packed + public :: xmpio_create_coldistr_from_fpacked + public :: xmpio_create_coldistr_from_fp3blocks +#endif + +!---------------------------------------------------------------------- + +interface xmpi_allgather + module procedure xmpi_allgather_int + module procedure xmpi_allgather_char + module procedure xmpi_allgather_int1d_1b + module procedure xmpi_allgather_int1d + module procedure xmpi_allgather_int2d + module procedure xmpi_allgather_dp1d + module procedure xmpi_allgather_dp2d + module procedure xmpi_allgather_dp3d + module procedure xmpi_allgather_dp4d +end interface xmpi_allgather + +!---------------------------------------------------------------------- + +! non-blocking version (requires MPI3) +! Prototype: +! +! call xmpi_iallgather(SENDBUF, SENDCOUNT, SENDTYPE, RECVBUF, RECVCOUNT, RECVTYPE, COMM, REQUEST, IERROR) +! +! If the MPI library does not provide ialltoall, we call the blocking version and +! we return xmpi_request_null (see xmpi_iallgather.finc) +! Client code should always test/wait the request so that code semantics is preserved. + +interface xmpi_iallgather + module procedure xmpi_iallgather_dp4d +end interface xmpi_iallgather + +interface xmpi_allgatherv + module procedure xmpi_allgatherv_int2d + module procedure xmpi_allgatherv_int + module procedure xmpi_allgatherv_int1_dp1 + module procedure xmpi_allgatherv_dp + module procedure xmpi_allgatherv_dp2d + module procedure xmpi_allgatherv_dp3d + module procedure xmpi_allgatherv_dp4d + module procedure xmpi_allgatherv_dp5d + module procedure xmpi_allgatherv_dp6d + module procedure xmpi_allgatherv_coeff2d + module procedure xmpi_allgatherv_coeff2d_indx +end interface xmpi_allgatherv + +!---------------------------------------------------------------------- + +! blocking +interface xmpi_alltoall + module procedure xmpi_alltoall_int + module procedure xmpi_alltoall_dp2d + module procedure xmpi_alltoall_dp4d +end interface xmpi_alltoall + +! non-blocking version (requires MPI3) +! Prototype: +! +! call xmpi_ialltoall(xval, sendsize, recvbuf, recvsize, comm, request) +! +! If the MPI library does not provide ialltoall, we call the blocking version and +! we return xmpi_request_null (see xmpi_ialltoall.finc) +! Client code should always test/wait the request so that code semantics is preserved. + +interface xmpi_ialltoall + module procedure xmpi_ialltoall_dp4d +end interface xmpi_ialltoall + +!---------------------------------------------------------------------- + +interface xmpi_alltoallv + module procedure xmpi_alltoallv_dp2d + module procedure xmpi_alltoallv_int2d + module procedure xmpi_alltoallv_dp1d + module procedure xmpi_alltoallv_dp1d2 +end interface xmpi_alltoallv + +!---------------------------------------------------------------------- + +! non-blocking version (requires MPI3) +! Prototype: +! +! call xmpi_ialltoallv(xval, sendcnts, sdispls, recvbuf, recvcnts, rdispls, comm, request) +! +! If the MPI library does not provide ialltoallv, we call the blocking version and +! we return xmpi_request_null (see xmpi_ialltoallv.finc) +! Client code should always test/wait the request so that code semantics is preserved. + +interface xmpi_ialltoallv + module procedure xmpi_ialltoallv_dp2d + module procedure xmpi_ialltoallv_int2d + module procedure xmpi_ialltoallv_dp1d2 +end interface xmpi_ialltoallv + +!---------------------------------------------------------------------- + +interface xmpi_bcast + module procedure xmpi_bcast_intv + module procedure xmpi_bcast_int1d + module procedure xmpi_bcast_int2d + module procedure xmpi_bcast_int3d + module procedure xmpi_bcast_int4d + module procedure xmpi_bcast_dpv + module procedure xmpi_bcast_dp1d + module procedure xmpi_bcast_dp2d + module procedure xmpi_bcast_dp3d + module procedure xmpi_bcast_dp4d + module procedure xmpi_bcast_dp5d + module procedure xmpi_bcast_dp6d + module procedure xmpi_bcast_spv + module procedure xmpi_bcast_sp1d + module procedure xmpi_bcast_sp2d + module procedure xmpi_bcast_sp3d + module procedure xmpi_bcast_sp4d + module procedure xmpi_bcast_cplxv + module procedure xmpi_bcast_cplx1d + module procedure xmpi_bcast_cplx2d + module procedure xmpi_bcast_cplx3d + module procedure xmpi_bcast_cplx4d + module procedure xmpi_bcast_dcv + module procedure xmpi_bcast_dc1d + module procedure xmpi_bcast_dc2d + module procedure xmpi_bcast_dc3d + module procedure xmpi_bcast_dc4d + module procedure xmpi_bcast_ch0d + module procedure xmpi_bcast_ch1d + module procedure xmpi_bcast_log0d + module procedure xmpi_bcast_coeffi2_1d + module procedure xmpi_bcast_coeff2_1d +end interface xmpi_bcast + +!---------------------------------------------------------------------- + +interface xmpi_ibcast + module procedure xmpi_ibcast_int1d + module procedure xmpi_ibcast_int4d + module procedure xmpi_ibcast_dp1d + module procedure xmpi_ibcast_dp2d + module procedure xmpi_ibcast_dp3d + module procedure xmpi_ibcast_dp4d + module procedure xmpi_ibcast_dpc2d + module procedure xmpi_ibcast_spc2d +end interface xmpi_ibcast + +!---------------------------------------------------------------------- + +interface xmpi_exch + module procedure xmpi_exch_int1d + module procedure xmpi_exch_int2d + module procedure xmpi_exch_dp1d + module procedure xmpi_exch_dp2d + module procedure xmpi_exch_dp3d + module procedure xmpi_exch_dp4d + module procedure xmpi_exch_dp5d + module procedure xmpi_exch_spc1d + module procedure xmpi_exch_dpc1d + module procedure xmpi_exch_dpc2d +end interface xmpi_exch + +!---------------------------------------------------------------------- + +interface xmpi_gather + module procedure xmpi_gather_int + module procedure xmpi_gather_int2d + module procedure xmpi_gather_dp + module procedure xmpi_gather_dp2d + module procedure xmpi_gather_dp3d + module procedure xmpi_gather_dp4d +end interface xmpi_gather + +!---------------------------------------------------------------------- + +interface xmpi_gatherv + module procedure xmpi_gatherv_int + module procedure xmpi_gatherv_int1_dp1 + module procedure xmpi_gatherv_int2d + module procedure xmpi_gatherv_dp + module procedure xmpi_gatherv_dp2d + module procedure xmpi_gatherv_dp3d + module procedure xmpi_gatherv_dp4d + module procedure xmpi_gatherv_dp5d + module procedure xmpi_gatherv_dp6d +end interface xmpi_gatherv + +!---------------------------------------------------------------------- + +interface xmpi_max + module procedure xmpi_max_int0d_i4b + module procedure xmpi_max_int0d_i8b + module procedure xmpi_max_int + module procedure xmpi_max_dpv + module procedure xmpi_max_dp0d_ip +end interface xmpi_max + +interface xmpi_max_ip + module procedure xmpi_max_int0d_ip + module procedure xmpi_max_dp0d_ip + module procedure xmpi_max_int1d_ip +end interface xmpi_max_ip + +!---------------------------------------------------------------------- + +interface xmpi_min + module procedure xmpi_min_intv + module procedure xmpi_min_dpv + module procedure xmpi_min_dp +end interface xmpi_min + +! In-place version of xmpi_min +interface xmpi_min_ip + module procedure xmpi_min_int1d + module procedure xmpi_min_dp +end interface xmpi_min_ip + +!---------------------------------------------------------------------- + +!interface xmpi_min_max +! module procedure xmpi_min_max_int0d_i4b +!end interface xmpi_min_max + +!---------------------------------------------------------------------- + +interface xmpi_recv + module procedure xmpi_recv_char + module procedure xmpi_recv_intv + module procedure xmpi_recv_int1d + module procedure xmpi_recv_int2d + module procedure xmpi_recv_int3d + module procedure xmpi_recv_dp + module procedure xmpi_recv_dp1d + module procedure xmpi_recv_dp2d + module procedure xmpi_recv_dp3d + module procedure xmpi_recv_dp4d +end interface xmpi_recv + +!---------------------------------------------------------------------- + +interface xmpi_irecv + module procedure xmpi_irecv_intv + module procedure xmpi_irecv_int1d + module procedure xmpi_irecv_dp1d + module procedure xmpi_irecv_dp2d + module procedure xmpi_irecv_dp3d +end interface xmpi_irecv + +!---------------------------------------------------------------------- + +interface xmpi_scatterv + module procedure xmpi_scatterv_int + module procedure xmpi_scatterv_int2d + module procedure xmpi_scatterv_dp + module procedure xmpi_scatterv_dp2d + module procedure xmpi_scatterv_dp3d + module procedure xmpi_scatterv_dp4d +end interface xmpi_scatterv + +!---------------------------------------------------------------------- + +interface xmpi_isend + module procedure xmpi_isend_int1d + module procedure xmpi_isend_dp1d + module procedure xmpi_isend_dp2d + module procedure xmpi_isend_dp3d +end interface xmpi_isend + +!---------------------------------------------------------------------- + +interface xmpi_send + module procedure xmpi_send_char + module procedure xmpi_send_intv + module procedure xmpi_send_int1d + module procedure xmpi_send_int2d + module procedure xmpi_send_int3d + module procedure xmpi_send_dp + module procedure xmpi_send_dp1d + module procedure xmpi_send_dp2d + module procedure xmpi_send_dp3d + module procedure xmpi_send_dp4d +end interface xmpi_send + +!---------------------------------------------------------------------- + +interface xmpi_sum_master + module procedure xmpi_sum_master_int + module procedure xmpi_sum_master_int2d + module procedure xmpi_sum_master_int4d + module procedure xmpi_sum_master_dp + module procedure xmpi_sum_master_dp1d + module procedure xmpi_sum_master_dp2d + module procedure xmpi_sum_master_dp3d + module procedure xmpi_sum_master_dp4d + module procedure xmpi_sum_master_dp5d + module procedure xmpi_sum_master_dp6d + module procedure xmpi_sum_master_dp7d + module procedure xmpi_sum_master_c1cplx + module procedure xmpi_sum_master_c2cplx + module procedure xmpi_sum_master_c3cplx + module procedure xmpi_sum_master_c4cplx + module procedure xmpi_sum_master_c5cplx + module procedure xmpi_sum_master_c1dpc + module procedure xmpi_sum_master_c2dpc + module procedure xmpi_sum_master_c3dpc + module procedure xmpi_sum_master_c4dpc + module procedure xmpi_sum_master_c5dpc +end interface xmpi_sum_master + +!---------------------------------------------------------------------- + +!MG:TODO procedure marked with !? are considered obsolete. +! and will be removed in future versions. +! Please use interfaces where array dimensions are not passed explicitly. +! Rationale: The array descriptor is already passed to the routine +! so it does not make sense to pass the dimension explicitly. + +interface xmpi_sum + module procedure xmpi_sum_int + module procedure xmpi_sum_intv + module procedure xmpi_sum_intv2 + module procedure xmpi_sum_intn !? + module procedure xmpi_sum_int2t !? + module procedure xmpi_sum_int2d + module procedure xmpi_sum_int3d + module procedure xmpi_sum_int4d + module procedure xmpi_sum_dp + module procedure xmpi_sum_dpvt + module procedure xmpi_sum_dpv + module procedure xmpi_sum_dpn !? + module procedure xmpi_sum_sp2d + module procedure xmpi_sum_sp3d + module procedure xmpi_sum_sp4d + module procedure xmpi_sum_sp5d + module procedure xmpi_sum_sp6d + module procedure xmpi_sum_sp7d + module procedure xmpi_sum_dp2d + module procedure xmpi_sum_dp3d + module procedure xmpi_sum_dp4d + module procedure xmpi_sum_dp5d + module procedure xmpi_sum_dp6d + module procedure xmpi_sum_dp7d + module procedure xmpi_sum_dp2t !? + module procedure xmpi_sum_dp2d2t + module procedure xmpi_sum_dp3d2t !? + module procedure xmpi_sum_dp4d2t !? + module procedure xmpi_sum_c0dc + module procedure xmpi_sum_c0sc + module procedure xmpi_sum_c1dc + module procedure xmpi_sum_c2dc + module procedure xmpi_sum_c3dc + module procedure xmpi_sum_c4dc + module procedure xmpi_sum_c5dc + module procedure xmpi_sum_c6dc + module procedure xmpi_sum_c7dc + module procedure xmpi_sum_c1cplx + module procedure xmpi_sum_c2cplx + module procedure xmpi_sum_c3cplx + module procedure xmpi_sum_c4cplx + module procedure xmpi_sum_c5cplx + module procedure xmpi_sum_c6cplx + module procedure xmpi_sum_coeff5d1 + end interface xmpi_sum +!!*** + +! Non-blocking version +interface xmpi_isum + module procedure xmpi_isum_int0d +end interface xmpi_isum +!!*** + +! Non-blocking in-place version +interface xmpi_isum_ip + module procedure xmpi_isum_ip_dp2d + module procedure xmpi_isum_ip_dp3d + module procedure xmpi_isum_ip_dp4d + module procedure xmpi_isum_ip_spc1d + module procedure xmpi_isum_ip_dpc1d + module procedure xmpi_isum_ip_spc2d + module procedure xmpi_isum_ip_dpc2d + module procedure xmpi_isum_ip_spc3d + module procedure xmpi_isum_ip_dpc3d +end interface xmpi_isum_ip +!!*** + +interface xmpi_land + module procedure xmpi_land_log0d +end interface xmpi_land +!!*** + +interface xmpi_lor + module procedure xmpi_lor_log1d + module procedure xmpi_lor_log2d + module procedure xmpi_lor_log3d +end interface xmpi_lor +!!!*** + +! This to bypass missing interface for MPI_WIN_ALLOCATE etc +! See https://github.com/pmodels/mpich/issues/2659 +!INTERFACE MPI_WIN_ALLOCATE_SHARED +!SUBROUTINE MPI_WIN_ALLOCATE_SHARED_CPTR(SIZE, DISP_UNIT, INFO, COMM, & +!BASEPTR, WIN, IERROR) +!USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR +!INTEGER :: DISP_UNIT, INFO, COMM, WIN, IERROR +!INTEGER(KIND=XMPI_ADDRESS_KIND) :: SIZE +!TYPE(C_PTR) :: BASEPTR +!END SUBROUTINE +!END INTERFACE MPI_WIN_ALLOCATE_SHARED + + +!---------------------------------------------------------------------- + +CONTAINS !=========================================================== +!!*** + +!!****f* m_xmpi/xmpi_init +!! NAME +!! xmpi_init +!! +!! FUNCTION +!! Hides MPI_INIT from MPI library. Perform the initialization of some basic variables +!! used by the MPI routines employed in abinit. +!! +!! INPUTS +!! None +!! +!! SOURCE + +subroutine xmpi_init() + +!Local variables------------------- + integer :: mpierr, ierr, unt + integer(c_long) :: rlim_cur, rlim_max + logical :: exists +#ifdef HAVE_MPI + integer :: attribute_val + logical :: lflag +#ifdef HAVE_OPENMP + integer :: required,provided +#endif +#endif + +! ************************************************************************* + + mpierr=0 +#ifdef HAVE_MPI + +#ifndef HAVE_OPENMP + call MPI_INIT(mpierr) +#else + required = MPI_THREAD_SINGLE + !required = MPI_THREAD_FUNNELED + !required = MPI_THREAD_SERIALIZED + !required = MPI_THREAD_MULTIPLE + call MPI_INIT_THREAD(required,provided,mpierr) + if (provided /= required) call xmpi_abort(msg="MPI_INIT_THREADS: provided /= required") +#endif + + !%comm_world = xmpi_world ! Needed to bypass a bug in some OMPI implementations (intent(inout)) + !%call xmpi_comm_set_errhandler(comm_world, MPI_ERRORS_RETURN, err_handler_sav, mpierr) + + ! Deprecated in MPI2 but not all MPI2 implementations provide MPI_Comm_get_attr ! + call MPI_ATTR_GET(xmpi_world, MPI_TAG_UB, attribute_val, lflag, mpierr) + !call MPI_Comm_get_attr(xmpi_world, MPI_TAG_UB, attribute_val, lflag, mpierr) + + if (lflag) xmpi_tag_ub = attribute_val + +! Define type values. + call MPI_TYPE_SIZE(MPI_CHARACTER, xmpi_bsize_ch, mpierr) + call MPI_TYPE_SIZE(MPI_INTEGER, xmpi_bsize_int, mpierr) + call MPI_TYPE_SIZE(MPI_REAL, xmpi_bsize_sp, mpierr) + call MPI_TYPE_SIZE(MPI_DOUBLE_PRECISION, xmpi_bsize_dp, mpierr) + call MPI_TYPE_SIZE(MPI_COMPLEX, xmpi_bsize_spc, mpierr) + call MPI_TYPE_SIZE(MPI_DOUBLE_COMPLEX, xmpi_bsize_dpc, mpierr) + + ! Find the byte size of Fortran record marker used in MPI-IO routines. + if (xmpio_bsize_frm == 0) then + call xmpio_get_info_frm(xmpio_bsize_frm, xmpio_mpi_type_frm, xmpi_world) + end if +#endif + + ! Try to increase stack size. + call clib_ulimit_stack(rlim_cur, rlim_max, ierr) + + if (xmpi_comm_rank(xmpi_world) == 0) then + + if (ierr /= 0) then + write(std_out, "(a)")" WARNING: cannot increase stack size limit. " + !write(std_out, *)"rlim_cur, rlim_max, ierr", rlim_cur, rlim_max, ierr + end if + + ! Master Removes the ABI_MPIABORTFILE if present so that we start with a clean environment + inquire(file=ABI_MPIABORTFILE, exist=exists) + if (exists) then + ! Get free unit (emulate F2008 newunit for portability reasons) + unt = xmpi_get_unit() + if (unt == -1) call xmpi_abort(msg="Cannot find free unit!!") + open(unit=unt, file=trim(ABI_MPIABORTFILE), status="old", iostat=ierr) + if (ierr == 0) close(unit=unt, status="delete", iostat=ierr) + if (ierr /= 0) call xmpi_abort(msg="Cannot remove ABI_MPIABORTFILE") + end if + + ! If MPI interfaces are buggy, MPI_IN_PLACE is not allowed +#if defined HAVE_MPI2_INPLACE && defined HAVE_MPI_BUGGY_INTERFACES + write(std_out, "(a)")"ERROR: Cannot use MPI_IN_PLACE with this buggy MPI version!" + write(ab_out , "(a)")"ERROR: Cannot use MPI_IN_PLACE with this buggy MPI version!" + call xmpi_abort(msg="Stopping here!") +#endif + + end if + +end subroutine xmpi_init +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_xmpi/xmpi_set_inplace_operations +!! NAME +!! xmpi_set_inplace_operations +!! +!! FUNCTION +!! Set internal flag to use MPI_IN_PLACE whenever possible. +!! +!! SOURCE + +subroutine xmpi_set_inplace_operations(bool) + +!Local variables------------------- + logical :: bool + +! ************************************************************************* + + xmpi_use_inplace_operations = bool + +end subroutine xmpi_set_inplace_operations +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_xmpi/xmpi_get_unit +!! NAME +!! xmpi_get_unit +!! +!! FUNCTION +!! Get free unit (emulate F2008 newunit for portability reasons) +!! Return -1 if no unit is found. +!! +!! SOURCE + +integer function xmpi_get_unit() result(unt) + +!Local variables------------------- + logical :: isopen + +! ************************************************************************* + + do unt=1024,-1,-1 + inquire(unit=unt, opened=isopen) + if (.not.isopen) exit + end do + +end function xmpi_get_unit +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_xmpi/xmpi_end +!! NAME +!! xmpi_end +!! +!! FUNCTION +!! Hides MPI_FINALIZE from MPI library. +!! +!! INPUTS +!! None +!! +!! SOURCE + +subroutine xmpi_end() + +!Local variables------------------- + integer :: mpierr + +! ************************************************************************* + + mpierr=0 +#ifdef HAVE_MPI + call MPI_BARRIER(MPI_COMM_WORLD,mpierr) ! Needed by some HPC architectures (MT, 20110315) + call MPI_FINALIZE(mpierr) +#endif + +#ifndef FC_IBM + ! IBM8 returns 260. 320 ... + call sys_exit(0) +#endif + +end subroutine xmpi_end +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_xmpi/xmpi_abort +!! NAME +!! xmpi_abort +!! +!! FUNCTION +!! Hides MPI_ABORT from MPI library. +!! +!! INPUTS +!! [comm]=communicator of tasks to abort. +!! [mpierr]=Error code to return to invoking environment. +!! [msg]=User message +!! [exit_status]=optional, shell return code, default 1 +!! +!! SOURCE + +subroutine xmpi_abort(comm, mpierr, msg, exit_status) + +!Arguments------------------------- + integer,optional,intent(in) :: comm,mpierr,exit_status + character(len=*),optional,intent(in) :: msg + +!Local variables------------------- + integer :: ierr,my_comm,my_errorcode,ilen,ierr2 + logical :: testopen + character(len=xmpi_msg_len) :: mpi_msg_error + +! ************************************************************************* + + ierr=0 + my_comm = xmpi_world; if (PRESENT(comm)) my_comm = comm + + if (PRESENT(msg)) then + write(std_out,'(2a)')"User message: ",TRIM(msg) + end if + + ! Close std_out and ab_out and flush units. + ! Note that flush does not guarantee that the data is committed to disk. + ! This is rather annoying because we may end up with incomplete log files + ! that cannot be parsed by Abinit. + ! For a possible approach based on fsync, see + ! https://gcc.gnu.org/onlinedocs/gcc-4.7.4/gfortran/FLUSH.html + + inquire(std_out, opened=testopen) + if (testopen) then +#if defined HAVE_FC_FLUSH + call flush(std_out) +#endif + close(std_out) + end if + + inquire(ab_out,opened=testopen) + if (testopen) then +#if defined HAVE_FC_FLUSH + call flush(ab_out) +#endif + close(ab_out) + end if + +#ifdef HAVE_MPI + my_errorcode=MPI_ERR_UNKNOWN; if (PRESENT(mpierr)) my_errorcode=mpierr + + call MPI_ERROR_STRING(my_errorcode, mpi_msg_error, ilen, ierr2) + + !if (ilen>xmpi_msg_len) write(std_out,*)" WARNING: MPI message has been truncated!" + !if (ierr2/=MPI_SUCCESS) then + ! write(std_out,'(a,i0)')" WARNING: MPI_ERROR_STRING returned ierr2= ",ierr2 + !else + ! write(std_out,'(2a)')" MPI_ERROR_STRING: ",TRIM(mpi_msg_error) + !end if + + !ierr = clib_usleep(300000_c_int32_t) + call MPI_ABORT(my_comm, my_errorcode, ierr) +#endif + + if (present(exit_status)) then + call sys_exit(exit_status) + else + call sys_exit(1) + end if + +end subroutine xmpi_abort +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_xmpi/sys_exit +!! NAME +!! sys_exit +!! +!! FUNCTION +!! Routine for clean exit of f90 code by one processor +!! +!! INPUTS +!! exit_status: +!! return code. +!! +!! NOTES +!! By default, it uses "call exit(1)", that is not completely portable. +!! +!! SOURCE + +subroutine sys_exit(exit_status) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: exit_status + +! ********************************************************************** + +#if defined FC_NAG + call exit(exit_status) +#elif defined HAVE_FC_EXIT + call exit(exit_status) +#else + ! stop with exit_status + ! MT 06-2013:stop function only accept parameters ! + if (exit_status== 0) stop "0" + if (exit_status== 1) stop "1" + if (exit_status==-1) stop "-1" +#endif + stop 1 + +end subroutine sys_exit +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_xmpi/xmpi_show_info +!! NAME +!! xmpi_show_info +!! +!! FUNCTION +!! Printout of the most important variables stored in this module (useful for debugging). +!! +!! INPUTS +!! unt=Unit number for formatted output. +!! +!! SOURCE + +subroutine xmpi_show_info(unit) + +!Arguments------------------------- + integer,optional,intent(in) :: unit + +!Local variables------------------- + integer :: my_unt + +! ************************************************************************* + + !@m_xmpi + my_unt = std_out; if (PRESENT(unit)) my_unt=unit + +#ifdef HAVE_MPI1 + write(my_unt,*)" ==== Using MPI-1 specifications ==== " +#endif +#ifdef HAVE_MPI2 + write(my_unt,*)" ==== Using MPI-2 specifications ==== " +#endif + +#ifdef HAVE_MPI_IO + write(my_unt,*)" MPI-IO support is ON" +#else + write(my_unt,*)" MPI-IO support is OFF" +#endif + +#ifdef HAVE_MPI + write(my_unt,*)" xmpi_tag_ub ................ ",xmpi_tag_ub + write(my_unt,*)" xmpi_bsize_ch .............. ",xmpi_bsize_ch + write(my_unt,*)" xmpi_bsize_int ............. ",xmpi_bsize_int + write(my_unt,*)" xmpi_bsize_sp .............. ",xmpi_bsize_sp + write(my_unt,*)" xmpi_bsize_dp .............. ",xmpi_bsize_dp + write(my_unt,*)" xmpi_bsize_spc ............. ",xmpi_bsize_spc + write(my_unt,*)" xmpi_bsize_dpc ............. ",xmpi_bsize_dpc + write(my_unt,*)" xmpio_bsize_frm ............ ",xmpio_bsize_frm + write(my_unt,*)" xmpi_address_kind .......... ",xmpi_address_kind + write(my_unt,*)" xmpi_offset_kind ........... ",xmpi_offset_kind + write(my_unt,*)" MPI_WTICK .................. ",MPI_WTICK() +#endif + +end subroutine xmpi_show_info +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_xmpi/xmpi_comm_rank +!! NAME +!! xmpi_comm_rank +!! +!! FUNCTION +!! Hides MPI_COMM_RANK from MPI library. +!! +!! INPUTS +!! comm=MPI communicator. +!! +!! OUTPUT +!! xmpi_comm_rank=The rank of the node inside comm +!! +!! SOURCE + +function xmpi_comm_rank(comm) + +!Arguments------------------------- + integer,intent(in) :: comm + integer :: xmpi_comm_rank + +!Local variables------------------- + integer :: mpierr + +! ************************************************************************* + + mpierr=0 +#ifdef HAVE_MPI + xmpi_comm_rank=-1 ! Return non-sense value if the proc does not belong to the comm + if (comm/=xmpi_comm_null) then + call MPI_COMM_RANK(comm,xmpi_comm_rank,mpierr) + end if +#else + xmpi_comm_rank=0 +#endif + +end function xmpi_comm_rank +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_xmpi/xmpi_comm_size +!! NAME +!! xmpi_comm_size +!! +!! FUNCTION +!! Hides MPI_COMM_SIZE from MPI library. +!! +!! INPUTS +!! comm=MPI communicator. +!! +!! OUTPUT +!! xmpi_comm_size=The number of processors inside comm. Return 0 if comm = xmpi_comm_null +!! +!! SOURCE + +function xmpi_comm_size(comm) + +!Arguments------------------------- + integer,intent(in) :: comm + integer :: xmpi_comm_size + +!Local variables------------------------------- +!scalars + integer :: mpierr + +! ************************************************************************* + + mpierr=0; xmpi_comm_size=1 +#ifdef HAVE_MPI + xmpi_comm_size = 0 + if (comm /= xmpi_comm_null) call MPI_COMM_SIZE(comm,xmpi_comm_size,mpierr) +#endif + +end function xmpi_comm_size +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_xmpi/xmpi_comm_free_0D +!! NAME +!! xmpi_comm_free_0D +!! +!! FUNCTION +!! Hides MPI_COMM_FREE from MPI library. +!! Does not abort MPI in case of an invalid communicator +!! +!! INPUTS +!! comm=MPI communicator. +!! +!! SOURCE + +subroutine xmpi_comm_free_0D(comm) + +!Arguments------------------------- + integer,intent(inout) :: comm + +!Local variables------------------------------- +!scalars +#ifdef HAVE_MPI + integer :: comm_world,err_handler_dum,err_handler_sav,ierr,mpierr,mpierr_class + +! ************************************************************************* + + if (comm/=xmpi_comm_null.and.comm/=xmpi_world.and.comm/=xmpi_comm_self) then + + comm_world=xmpi_world ! Needed to bypass a bug in some OMPI implementations (intent(inout)) + call xmpi_comm_set_errhandler(comm_world,MPI_ERRORS_RETURN,err_handler_sav,ierr) + call MPI_COMM_FREE(comm,mpierr) + call xmpi_comm_set_errhandler(comm_world,err_handler_sav,err_handler_dum,ierr) + + if (mpierr/=MPI_SUCCESS) then + call MPI_ERROR_CLASS(mpierr,mpierr_class,ierr) + if (mpierr_class/=MPI_ERR_COMM) then + write(std_out,*)" WARNING: MPI_COMM_FREE returned ierr= ",mpierr + end if + end if + + end if + +#else + if (.false.) write(std_out,*) comm +#endif + +end subroutine xmpi_comm_free_0D +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_xmpi/xmpi_comm_free_1D +!! NAME +!! xmpi_comm_free_1D +!! +!! FUNCTION +!! Hides MPI_COMM_FREE from MPI library. Target 1D arrays +!! Does not abort MPI in case of an invalid communicator +!! +!! INPUTS +!! comms(:)=MPI communicators +!! +!! SOURCE + +subroutine xmpi_comm_free_1D(comms) + +!Arguments------------------------- + integer,intent(inout) :: comms(:) + +!Local variables------------------------------- +!scalars +#ifdef HAVE_MPI + integer :: comm_world,err_handler_dum,err_handler_sav,ii,mpierr + +! ************************************************************************* + + comm_world=xmpi_world ! Needed to bypass a bug in some OMPI implementations (intent(inout)) + call xmpi_comm_set_errhandler(comm_world,MPI_ERRORS_RETURN,err_handler_sav,mpierr) + + do ii=LBOUND(comms,DIM=1),UBOUND(comms,DIM=1) + if (comms(ii)/=xmpi_comm_null.and.comms(ii)/=xmpi_world.and.comms(ii)/=xmpi_comm_self) then + call MPI_COMM_FREE(comms(ii),mpierr) + end if + end do + + call xmpi_comm_set_errhandler(comm_world,err_handler_sav,err_handler_dum,mpierr) + +#else + if (.false.) write(std_out,*) comms(1) +#endif + +end subroutine xmpi_comm_free_1D +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_xmpi/xmpi_comm_free_2D +!! NAME +!! xmpi_comm_free_2D +!! +!! FUNCTION +!! Hides MPI_COMM_FREE from MPI library. Target 2D arrays +!! Does not abort MPI in case of an invalid communicator +!! +!! INPUTS +!! comms=MPI communicator. +!! +!! SOURCE + +subroutine xmpi_comm_free_2D(comms) + +!Arguments------------------------- + integer,intent(inout) :: comms(:,:) + +!Local variables------------------------------- +!scalars +#ifdef HAVE_MPI + integer :: comm_world,err_handler_dum,err_handler_sav,ii,jj,mpierr + +! ************************************************************************* + + comm_world=xmpi_world ! Needed to bypass a bug in some OMPI implementations (intent(inout)) + call xmpi_comm_set_errhandler(comm_world,MPI_ERRORS_RETURN,err_handler_sav,mpierr) + + do jj=LBOUND(comms,DIM=2),UBOUND(comms,DIM=2) + do ii=LBOUND(comms,DIM=1),UBOUND(comms,DIM=1) + if (comms(ii,jj)/=xmpi_comm_null.and.comms(ii,jj)/=xmpi_world.and. & +& comms(ii,jj)/=xmpi_comm_self) then + call MPI_COMM_FREE(comms(ii,jj),mpierr) + end if + end do + end do + + call xmpi_comm_set_errhandler(comm_world,err_handler_sav,err_handler_dum,mpierr) + +#else + if (.false.) write(std_out,*) comms(1,1) +#endif + +end subroutine xmpi_comm_free_2D +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_xmpi/xmpi_comm_free_3D +!! NAME +!! xmpi_comm_free_3D +!! +!! FUNCTION +!! Hides MPI_COMM_FREE from MPI library. Target 3D arrays +!! Does not abort MPI in case of an invalid communicator +!! +!! INPUTS +!! comms=MPI communicator. +!! +!! SOURCE + +subroutine xmpi_comm_free_3D(comms) + +!Arguments------------------------- + integer,intent(inout) :: comms(:,:,:) + +!Local variables------------------------------- +!scalars +#ifdef HAVE_MPI + integer :: comm_world,err_handler_dum,err_handler_sav,ii,jj,kk,mpierr + +! ************************************************************************* + + comm_world=xmpi_world ! Needed to bypass a bug in some OMPI implementations (intent(inout)) + call xmpi_comm_set_errhandler(comm_world,MPI_ERRORS_RETURN,err_handler_sav,mpierr) + + do kk=LBOUND(comms,DIM=3),UBOUND(comms,DIM=3) + do jj=LBOUND(comms,DIM=2),UBOUND(comms,DIM=2) + do ii=LBOUND(comms,DIM=1),UBOUND(comms,DIM=1) + if (comms(ii,jj,kk)/=xmpi_comm_null.and.comms(ii,jj,kk)/=xmpi_world.and. & +& comms(ii,jj,kk)/=xmpi_comm_self) then + call MPI_COMM_FREE(comms(ii,jj,kk),mpierr) + end if + end do + end do + end do + + call xmpi_comm_set_errhandler(comm_world,err_handler_sav,err_handler_dum,mpierr) + +#else + if (.false.) write(std_out,*) comms(1,1,1) +#endif + +end subroutine xmpi_comm_free_3D +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_xmpi/xmpi_group_free +!! NAME +!! xmpi_group_free +!! +!! FUNCTION +!! Hides MPI_GROUP_FREE from MPI library. +!! Does not abort MPI in case of an invalid group +!! +!! INPUTS +!! spaceGroup=MPI group +!! +!! SOURCE + +subroutine xmpi_group_free(spaceGroup) + +!Arguments------------------------- + integer,intent(inout) :: spaceGroup + +!Local variables------------------------------- +!scalars +#ifdef HAVE_MPI + integer :: comm_world,err_handler_dum,err_handler_sav,ierr,mpierr,mpierr_class + +! ************************************************************************* + + if (spaceGroup/=xmpi_group_null) then + + comm_world=xmpi_world ! Needed to bypass a bug in some OMPI implementations (intent(inout)) + call xmpi_comm_set_errhandler(comm_world,MPI_ERRORS_RETURN,err_handler_sav,ierr) + call MPI_GROUP_FREE(spaceGroup,mpierr) + call xmpi_comm_set_errhandler(comm_world,err_handler_sav,err_handler_dum,ierr) + + if (mpierr/=MPI_SUCCESS) then + call MPI_ERROR_CLASS(mpierr,mpierr_class,ierr) + if (mpierr_class/=MPI_ERR_GROUP) write(std_out,*)" WARNING: MPI_GROUP_FREE returned ierr= ",mpierr + end if + + end if + +#else + if (.false.) write(std_out,*) spaceGroup +#endif + +end subroutine xmpi_group_free +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_xmpi/xmpi_group_incl +!! NAME +!! xmpi_group_incl +!! +!! FUNCTION +!! Hides MPI_GROUP_INCL from MPI library. +!! +!! INPUTS +!! group=input group +!! nrank=number of elements in array ranks (size of newgroup) +!! ranks=ranks of processes in group to appear in newgroup +!! +!! OUTPUT +!! newgroup= new group derived from above, in the order defined by ranks +!! +!! SOURCE + +subroutine xmpi_group_incl(group,nranks,ranks,newgroup,mpierr) + +!Arguments------------------------- +!scalars + integer,intent(in) :: group,nranks + integer,intent(out) :: mpierr + integer,intent(inout) :: newgroup +!arrays + integer,intent(in) :: ranks(nranks) + +! ************************************************************************* + + mpierr=0 ; newgroup=xmpi_group_null +#ifdef HAVE_MPI + if (group/=xmpi_group_null) then + call MPI_GROUP_INCL(group,nranks,ranks,newgroup,mpierr) + end if +#endif + +end subroutine xmpi_group_incl +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_xmpi/xmpi_comm_create +!! NAME +!! xmpi_comm_create +!! +!! FUNCTION +!! Hides MPI_COMM_CREATE from MPI library. +!! +!! INPUTS +!! comm=communicator +!! group=group, which is a subset of the group of comm +!! +!! OUTPUT +!! newcomm=new communicator +!! +!! SOURCE + +subroutine xmpi_comm_create(comm,group,newcomm,mpierr) + +!Arguments------------------------- +!scalars + integer,intent(in) :: comm,group + integer,intent(out) :: mpierr + integer,intent(inout) :: newcomm + +! ************************************************************************* + + mpierr=0 +#ifdef HAVE_MPI + if (group/=xmpi_group_null) then + call MPI_comm_create(comm,group,newcomm,mpierr) + else + newcomm=xmpi_comm_null + end if +#else + newcomm=xmpi_comm_self +#endif + +end subroutine xmpi_comm_create +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_xmpi/xmpi_subcomm +!! NAME +!! xmpi_subcomm +!! +!! FUNCTION +!! Return a sub-communicator from an input communicator and a given proc. ranks set. +!! (hides subgroup creation/destruction) +!! +!! INPUTS +!! comm=input communicator +!! nrank=number of elements in array ranks (size of subcomm) +!! ranks=ranks of processes in group to appear in subcomm +!! +!! OUTPUT +!! [my_rank_in_group]=optional: my rank in the group of new sub-communicator +!! xmpi_subcomm=new (sub-)communicator +!! +!! SOURCE + +function xmpi_subcomm(comm,nranks,ranks,my_rank_in_group) + +!Arguments------------------------- +!scalars + integer,intent(in) :: comm,nranks + integer,intent(out),optional :: my_rank_in_group + integer :: xmpi_subcomm +!arrays + integer,intent(in) :: ranks(nranks) + +!Local variables------------------------------- +#ifdef HAVE_MPI + integer :: group,ierr,subgroup +#endif + +! ************************************************************************* + + xmpi_subcomm=xmpi_comm_null + if (present(my_rank_in_group)) my_rank_in_group=xmpi_undefined + +#ifdef HAVE_MPI + if (comm/=xmpi_comm_null.and.nranks>=0) then + call MPI_COMM_GROUP(comm,group,ierr) + call MPI_GROUP_INCL(group,nranks,ranks,subgroup,ierr) + call MPI_COMM_CREATE(comm,subgroup,xmpi_subcomm,ierr) + if ( nranks == 0 )xmpi_subcomm=xmpi_comm_self + if (present(my_rank_in_group)) then + call MPI_Group_rank(subgroup,my_rank_in_group,ierr) + end if + call MPI_GROUP_FREE(subgroup,ierr) + call MPI_GROUP_FREE(group,ierr) + end if +#else + if (nranks>0) then + if (ranks(1)==0) then + xmpi_subcomm=xmpi_comm_self + if (present(my_rank_in_group)) my_rank_in_group=0 + end if + end if +#endif + +end function xmpi_subcomm +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_xmpi/xmpi_comm_multiple +!! NAME +!! xmpi_comm_multiple +!! +!! FUNCTION +!! Given an input communicator `input_comm`, create a new communicator +!! with number of procs multiple of a certain number `ntasks`. +!! Use all procs if ntasks >= input_nprocs. +!! +!! INPUTS +!! ntasks=Number of tasks. +!! comm=input communicator +!! +!! OUTPUT +!! idle_proc=True if this proc is idle. In this case, output_comm contains all the idle procs. +!! output_comm=Output communicator +!! +!! SOURCE + +subroutine xmpi_comm_multiple_of(ntasks, input_comm, idle_proc, output_comm) + +!Arguments------------------------- +!scalars + integer,intent(in) :: ntasks, input_comm + integer,intent(out) :: output_comm + logical,intent(out) :: idle_proc + +!Local variables------------------------------- + integer :: color, my_rank, ierr, input_nproc + +! ************************************************************************* + + my_rank = xmpi_comm_rank(input_comm) + input_nproc = xmpi_comm_size(input_comm) + + if (input_nproc <= ntasks) then + ! Use all procs in input comm. + idle_proc = .False.; output_comm = input_comm +#ifdef HAVE_MPI + call MPI_Comm_dup(input_comm, output_comm, ierr) +#endif + else + color = merge(0, 1, my_rank + 1 <= (ntasks / input_nproc) * input_nproc) + idle_proc = color == 1 + call xmpi_comm_split(input_comm, color, my_rank, output_comm, ierr) + end if + +end subroutine xmpi_comm_multiple_of +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_xmpi/xmpi_comm_group +!! NAME +!! xmpi_comm_group +!! +!! FUNCTION +!! Hides MPI_COMM_GROUP from MPI library. +!! +!! INPUTS +!! comm=MPI communicator. +!! +!! OUTPUT +!! spaceGroup=The group associated to comm. +!! mpierr=error code returned +!! +!! SOURCE + +subroutine xmpi_comm_group(comm,spaceGroup,mpierr) + +!Arguments------------------------- + integer,intent(in) :: comm + integer,intent(out) :: mpierr,spaceGroup + +! ************************************************************************* + + mpierr=0; spaceGroup=xmpi_group_null +#ifdef HAVE_MPI + if (comm/=xmpi_comm_null) then + call MPI_COMM_GROUP(comm,spaceGroup,mpierr) + end if +#endif + +end subroutine xmpi_comm_group +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_xmpi/xmpi_comm_split +!! NAME +!! xmpi_comm_split +!! +!! FUNCTION +!! Hides MPI_COMM_SPLIT from MPI library. +!! +!! INPUTS +!! input_comm=Input MPI communicator (to be splitted) +!! color=Control of subset assignment (nonnegative integer). +!! Processes with the same color are in the same new communicator +!! key=Control of rank assigment (integer) +!! +!! OUTPUT +!! mpierr=error code returned +!! output_comm=new splitted communicator +!! +!! SOURCE + +subroutine xmpi_comm_split(input_comm, color, key, output_comm, mpierr) + +!Arguments------------------------- + integer,intent(in) :: color,input_comm,key + integer,intent(out) :: mpierr,output_comm + +! ************************************************************************* + + mpierr=0; output_comm=input_comm +#ifdef HAVE_MPI + if (input_comm/=xmpi_comm_null.and.input_comm/=xmpi_comm_self) then + call MPI_COMM_SPLIT(input_comm,color,key,output_comm,mpierr) + end if +#endif + +end subroutine xmpi_comm_split +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_xmpi/xmpi_group_translate_ranks +!! NAME +!! xmpi_group_translate_ranks +!! +!! FUNCTION +!! Hides MPI_GROUP_TRANSLATE_RANKS from MPI library. +!! +!! INPUTS +!! nrank=number of ranks in ranks1 and ranks2 arrays +!! ranks1(nrank)=array of zero or more valid ranks in group1 +!! spaceGroup1=group1 +!! spaceGroup2=group2 +!! +!! OUTPUT +!! mpierr=error code returned +!! ranks2(nrank)=array of corresponding ranks in group2, +!! xmpi_undefined when no correspondence exists +!! +!! SOURCE + +subroutine xmpi_group_translate_ranks(spaceGroup1,nrank,ranks1,& +& spaceGroup2,ranks2,mpierr) + +!Arguments------------------------- +!scalars + integer,intent(in) :: nrank,spaceGroup1,spaceGroup2 + integer,intent(out) :: mpierr +!arrays + integer,intent(in) :: ranks1(nrank) + integer,intent(out) :: ranks2(nrank) + +! ************************************************************************* + + mpierr=0; ranks2(:)=xmpi_undefined +#ifdef HAVE_MPI + if (spaceGroup1/=xmpi_group_null.and.spaceGroup2/=xmpi_group_null) then + call MPI_GROUP_TRANSLATE_RANKS(spaceGroup1,nrank,ranks1, spaceGroup2,ranks2,mpierr) + end if +#else + ranks2(1)=0 +#endif + +end subroutine xmpi_group_translate_ranks +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_xmpi/xmpi_comm_translate_ranks +!! NAME +!! xmpi_comm_translate_ranks +!! +!! FUNCTION +!! Helper function that translate the ranks from a communicator to another one. +!! Wraps xmpi_group_translate_ranks but provides a more user-friendly interface +!! +!! INPUTS +!! from_comm=MPI communicator where from_ranks are defined. +!! nrank=number of ranks in from_ranks and to_ranks arrays +!! from_ranks(nrank)=array of zero or more valid ranks in from_comm +!! +!! OUTPUT +!! to_ranks(nrank)=array of corresponding ranks in to_comm +!! xmpi_undefined when no correspondence exists +!! +!! SOURCE + +subroutine xmpi_comm_translate_ranks(from_comm, nrank, from_ranks, to_comm, to_ranks) + +!Arguments------------------------- +!scalars + integer,intent(in) :: nrank,from_comm,to_comm +!arrays + integer,intent(in) :: from_ranks(nrank) + integer,intent(out) :: to_ranks(nrank) + +!Local variables------------------------------- +!scalars + integer :: ierr,from_group,to_group + +! ************************************************************************* + + ! Get the groups + call xmpi_comm_group(from_comm,from_group,ierr) + call xmpi_comm_group(to_comm,to_group,ierr) + + call xmpi_group_translate_ranks(from_group,nrank,from_ranks,to_group,to_ranks,ierr) + + ! Release the groups + call xmpi_group_free(from_group) + call xmpi_group_free(to_group) + +end subroutine xmpi_comm_translate_ranks +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_xmpi/xmpi_comm_translate_rank +!! NAME +!! xmpi_comm_translate_rank +!! +!! FUNCTION +!! Helper function to translate a single rank `from_rank` in communicator `from_rank` to +!! the rank in communicator `to_comm`. + +integer function xmpi_comm_translate_rank(from_comm, from_rank, to_comm) result(to_rank) + +!Arguments ------------------------------------ + integer,intent(in) :: from_comm, from_rank, to_comm + +!Local variables------------------------------- + integer :: from_ranks(1), to_ranks(1) +! ************************************************************************* + + from_ranks(1) = from_rank + call xmpi_comm_translate_ranks(from_comm, 1, from_ranks, to_comm, to_ranks) + to_rank = to_ranks(1) + +end function xmpi_comm_translate_rank +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_xmpi/xmpi_barrier +!! NAME +!! xmpi_barrier +!! +!! FUNCTION +!! Hides MPI_BARRIER from MPI library. +!! +!! INPUTS +!! comm=MPI communicator +!! +!! SOURCE + +subroutine xmpi_barrier(comm) + +!Arguments------------------------- + integer,intent(in) :: comm + +!Local variables------------------- + integer :: ier +#ifdef HAVE_MPI + integer :: nprocs +#endif + +! ************************************************************************* + + ier = 0 +#ifdef HAVE_MPI + if (comm/=xmpi_comm_null) then + call MPI_COMM_SIZE(comm,nprocs,ier) + if(nprocs>1) call MPI_BARRIER(comm,ier) + end if +#endif + +end subroutine xmpi_barrier +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_xmpi/xmpi_name +!! NAME +!! xmpi_name +!! +!! FUNCTION +!! Returns the name of the processor +!! Hides MPI_GET_PROCESSOR_NAME from MPI library. +!! +!! For the MPI standard: +!! The name returned should identify a particular piece of hardware; the exact format is implementation defined. +!! This name may or may not be the same as might be returned by gethostname, uname, or sysinfo. +!! +!! SOURCE + +subroutine xmpi_name(name_ch, ierr) + +!Arguments------------------------- + character(20),intent(out) :: name_ch + integer,intent(out) :: ierr + +!Local variables------------------- + integer :: len +! character(len=MPI_MAX_PROCESSOR_NAME) :: name_ch + +! ************************************************************************* +!Get the name of this processor (usually the hostname) + + ierr = 0 + +#ifdef HAVE_MPI + call MPI_GET_PROCESSOR_NAME(name_ch, len, ierr) + name_ch = trim(name_ch) + +#else + name_ch ='0' +#endif + +end subroutine xmpi_name +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_xmpi/xmpi_iprobe +!! NAME +!! xmpi_iprobe +!! +!! FUNCTION +!! Hides MPI_IPROBE from MPI library. +!! Nonblocking test for a message. +!! +!! INPUTS +!! source= source processes +!! tag= tag value +!! mpicomm= communicator +!! +!! OUTPUT +!! flag= True if a message with the specified source, tag, and communicator is available +!! mpierr= status error +!! +!! SOURCE + +subroutine xmpi_iprobe(source,tag,mpicomm,flag,mpierr) + +!Arguments------------------------- + integer,intent(in) :: mpicomm,source,tag + integer,intent(out) :: mpierr + logical,intent(out) :: flag + +!Local variables------------------- +#ifdef HAVE_MPI + integer :: ier,status(MPI_STATUS_SIZE) +#endif + +! ************************************************************************* + + mpierr = 0 +#ifdef HAVE_MPI + call MPI_IPROBE(source,tag,mpicomm,flag,status,ier) + mpierr=ier +#endif + +end subroutine xmpi_iprobe +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_xmpi/xmpi_wait +!! NAME +!! xmpi_wait +!! +!! FUNCTION +!! Hides MPI_WAIT from MPI library. +!! Waits for an MPI request to complete. +!! +!! INPUTS +!! request= MPI request handle to wait for +!! +!! OUTPUT +!! mpierr= status error +!! +!! SOURCE + +subroutine xmpi_wait(request, mpierr) + +!Arguments------------------------- + integer,intent(inout) :: request + integer,intent(out) :: mpierr + +!Local variables------------------- +#ifdef HAVE_MPI + integer :: ier,status(MPI_STATUS_SIZE) +#endif + +! ************************************************************************* + + mpierr = 0 +#ifdef HAVE_MPI + if (request /= xmpi_request_null) xmpi_count_requests = xmpi_count_requests - 1 + call MPI_WAIT(request,status,ier) + mpierr=ier +#endif + +end subroutine xmpi_wait +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_xmpi/xmpi_waitall_1d +!! NAME +!! xmpi_waitall_1d +!! +!! FUNCTION +!! Hides MPI_WAITALL from MPI library. +!! Waits for all given MPI Requests to complete. +!! +!! INPUTS +!! array_of_requests= array of request handles +!! +!! OUTPUT +!! mpierr= status error +!! +!! SOURCE + +subroutine xmpi_waitall_1d(array_of_requests, mpierr) + +!Arguments------------------------- + integer,intent(inout) :: array_of_requests(:) + integer,intent(out) :: mpierr + +!Local variables------------------- +#ifdef HAVE_MPI + integer :: ier,status(MPI_STATUS_SIZE,size(array_of_requests)) +#endif + +! ************************************************************************* + + mpierr = 0 +#ifdef HAVE_MPI + xmpi_count_requests = xmpi_count_requests - count(array_of_requests /= xmpi_request_null) + call MPI_WAITALL(size(array_of_requests), array_of_requests, status, ier) + mpierr=ier +#endif + +end subroutine xmpi_waitall_1d +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_xmpi/xmpi_waitall_2d +!! NAME +!! xmpi_waitall_2d +!! +!! FUNCTION +!! Hides MPI_WAITALL from MPI library. +!! Waits for all given MPI Requests to complete. +!! +!! INPUTS +!! array_of_requests= array of request handles +!! +!! OUTPUT +!! mpierr= status error +!! +!! SOURCE + +subroutine xmpi_waitall_2d(array_of_requests, mpierr) + +!Arguments------------------------- + integer,intent(inout) :: array_of_requests(:,:) + integer,intent(out) :: mpierr + +!Local variables------------------- + integer :: flat_requests(product(shape(array_of_requests))) + +! ************************************************************************* + + ! MPI_WAITALL is a Fortran interface so cannot pass count and base address a la C + ! so flat 2d array and copy in-out. See https://github.com/open-mpi/ompi/issues/587 + flat_requests = pack(array_of_requests, mask=.True.) + call xmpi_waitall_1d(flat_requests, mpierr) + array_of_requests = reshape(flat_requests, shape(array_of_requests)) + +end subroutine xmpi_waitall_2d +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_xmpi/xmpi_request_free +!! NAME +!! xmpi_request_free +!! +!! FUNCTION +!! Hides MPI_REQUEST_FREE from MPI library. +!! Frees an array of communication request objects. +!! +!! INPUTS +!! requests(:)= communication request array (array of handles) +!! +!! OUTPUT +!! mpierr= status error +!! +!! SOURCE + +subroutine xmpi_request_free(requests,mpierr) + +!Arguments------------------------- + integer,intent(inout) :: requests(:) + integer,intent(out) :: mpierr + +!Local variables------------------- +#ifdef HAVE_MPI + integer :: ier,ii +#endif + +! ************************************************************************* + + mpierr = 0 +#ifdef HAVE_MPI + do ii=1,size(requests) + if (requests(ii) /= xmpi_request_null) xmpi_count_requests = xmpi_count_requests - 1 + call MPI_REQUEST_FREE(requests(ii),ier) + end do + mpierr=ier +#endif + +end subroutine xmpi_request_free +!!*** + +!!****f* m_xmpi/xmpi_requests_add +!! NAME +!! xmpi_requests_add +!! +!! FUNCTION +!! Increase/decrement xmpi_count_requests internal counter +!! +!! SOURCE + +subroutine xmpi_requests_add(count) + +!Arguments------------------------- + integer,intent(in) :: count +! ************************************************************************* + + xmpi_count_requests = xmpi_count_requests + count + +end subroutine xmpi_requests_add +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_xmpi/xmpi_error_string +!! NAME +!! xmpi_error_string +!! +!! FUNCTION +!! Hides MPI_ERROR_STRING from MPI library. +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +subroutine xmpi_error_string(mpierr,err_string,ilen,ierror) + +!Arguments------------------------- + integer,intent(in) :: mpierr + integer,intent(out) :: ilen,ierror + character(len=*),intent(out) :: err_string + +! ************************************************************************* + + ilen=0 +#ifdef HAVE_MPI + call MPI_Error_string(mpierr,err_string,ilen,ierror) +#else + ierror=1 + err_string="Sorry, no MPI_Error_string routine is available to interpret the error message" +#endif + +end subroutine xmpi_error_string +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_xmpi/xmpi_comm_set_errhandler +!! NAME +!! xmpi_set_errhandler +!! +!! FUNCTION +!! Hides MPI_COMM_SET_ERRHANDLER from MPI library. +!! +!! INPUTS +!! new_err_handler= new error handler +!! +!! OUTPUT +!! ierror=error code +!! old_err_handler= old error handler +!! +!! SIZE EFFECTS +!! comm= communicator (should be intent(in) but is intent(inout) in some +!! OMPI implementation ; known as a bug) +!! +!! SOURCE + +subroutine xmpi_comm_set_errhandler(comm,new_err_handler,old_err_handler,ierror) + +!Arguments------------------------- + integer,intent(in) :: new_err_handler + integer,intent(in) :: comm + integer,intent(out) :: ierror,old_err_handler + +!Local variables------------------------- + integer :: mpierr1,mpierr2,my_comm + +! ************************************************************************* + + ierror=0 + my_comm = comm !should be intent(in) but is intent(inout) in some OMPI implementation ; known as a bug) + +#if defined HAVE_MPI + + mpierr1=MPI_SUCCESS; mpierr2=MPI_SUCCESS + +#if defined HAVE_MPI1 + call MPI_Errhandler_get(my_comm,old_err_handler,mpierr1) + call MPI_Errhandler_set(my_comm,new_err_handler,mpierr2) +#endif +#if defined HAVE_MPI2 + call MPI_comm_get_Errhandler(my_comm,old_err_handler,mpierr1) + call MPI_comm_set_Errhandler(my_comm,new_err_handler,mpierr2) +#endif + + ierror=MPI_SUCCESS + if (mpierr1/=MPI_SUCCESS) then + ierror=mpierr1 + else if (mpierr2/=MPI_SUCCESS) then + ierror=mpierr2 + end if +#endif + +end subroutine xmpi_comm_set_errhandler +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_xmpi/xmpi_split_work_i4b +!! NAME +!! xmpi_split_work_i4b +!! +!! FUNCTION +!! Splits the number of tasks, ntasks, among nprocs processors. +!! Used for the MPI parallelization of simple loops. +!! +!! INPUTS +!! ntasks=number of tasks +!! comm=MPI communicator. +!! +!! OUTPUT +!! my_start,my_stop= indices defining the initial and final task for this processor +!! +!! NOTES +!! If nprocs > ntasks then: +!! +!! my_start = ntasks + 1 +!! my_stop = ntask +!! +!! In this particular case, loops of the form +!! +!! do ii=my_start,my_stop +!! ... +!! end do +!! +!! are not executed. Moreover allocation such as foo(my_start:my_stop) will generate a zero-sized array. +!! +!! SOURCE + +subroutine xmpi_split_work_i4b(ntasks, comm, my_start, my_stop) + +!Arguments ------------------------------------ + integer,intent(in) :: ntasks,comm + integer,intent(out) :: my_start, my_stop + +!Local variables------------------------------- + integer :: res,nprocs,my_rank,block_p1,block + +! ************************************************************************* + + nprocs = xmpi_comm_size(comm); my_rank = xmpi_comm_rank(comm) + + block = ntasks / nprocs + res = MOD(ntasks, nprocs) + block_p1= block + 1 + + if (my_rank < res) then + my_start = my_rank *block_p1+1 + my_stop = (my_rank+1)*block_p1 + else + my_start = res*block_p1 + (my_rank-res )*block + 1 + my_stop = res*block_p1 + (my_rank-res+1)*block + end if + +end subroutine xmpi_split_work_i4b +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_xmpi/xmpi_split_block +!! NAME +!! xmpi_split_block +!! +!! FUNCTION +!! Splits tasks inside communicator using block distribution. +!! Used for the MPI parallelization of simple loops. +!! +!! INPUTS +!! ntasks: number of tasks +!! comm: MPI communicator. +!! +!! OUTPUT +!! my_ntasks: Number of tasks received by this rank. May be zero if ntasks > nprocs. +!! my_inds(my_ntasks): List of tasks treated by this rank. Allocated by the routine. May be zero-sized. +!! +!! SOURCE + +subroutine xmpi_split_block(ntasks, comm, my_ntasks, my_inds) + +!Arguments ------------------------------------ + integer,intent(in) :: ntasks, comm + integer,intent(out) :: my_ntasks + integer,allocatable,intent(out) :: my_inds(:) + +!Local variables------------------------------- + integer :: ii, istart, istop + +! ************************************************************************* + + call xmpi_split_work(ntasks, comm, istart, istop) + my_ntasks = istop - istart + 1 + ABI_MALLOC(my_inds, (my_ntasks)) + if (my_ntasks > 0) my_inds = [(istart + (ii - 1), ii=1, my_ntasks)] + +end subroutine xmpi_split_block +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_xmpi/xmpi_split_cyclic +!! NAME +!! xmpi_split_cyclic +!! +!! FUNCTION +!! Splits tasks inside communicator using cyclic distribution. +!! Used for the MPI parallelization of simple loops. +!! +!! INPUTS +!! ntasks: number of tasks +!! comm: MPI communicator. +!! +!! OUTPUT +!! my_ntasks: Number of tasks received by this rank. May be zero if ntasks > nprocs. +!! my_inds(my_ntasks): List of tasks treated by this rank. Allocated by the routine. May be zero-sized. +!! +!! SOURCE + +subroutine xmpi_split_cyclic(ntasks, comm, my_ntasks, my_inds) + +!Arguments ------------------------------------ + integer,intent(in) :: ntasks, comm + integer,intent(out) :: my_ntasks + integer,allocatable,intent(out) :: my_inds(:) + +!Local variables------------------------------- + integer :: ii, cnt, itask, my_rank, nprocs + +! ************************************************************************* + + nprocs = xmpi_comm_size(comm); my_rank = xmpi_comm_rank(comm) + + do ii=1,2 + if (ii == 2) then + ABI_MALLOC(my_inds, (my_ntasks)) + end if + cnt = 0 + do itask=1,ntasks + if (mod(itask, nprocs) == my_rank) then + cnt = cnt + 1 + if (ii == 2) my_inds(cnt) = itask + end if + end do + if (ii == 1) my_ntasks = cnt + end do + +end subroutine xmpi_split_cyclic +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_xmpi/xmpi_split_list +!! NAME +!! xmpi_split_list +!! +!! FUNCTION +!! Splits list of items inside communicator using block distribution. +!! Used for the MPI parallelization of simple loops. +!! +!! INPUTS +!! ntasks:Number of items in list (global) +!! list(ntasks): List of indices +!! comm: MPI communicator. +!! +!! OUTPUT +!! my_ntasks: Number of tasks received by this rank. May be zero if ntasks > nprocs. +!! my_inds(my_ntasks): List of tasks treated by this rank. Allocated by the routine. May be zero-sized. +!! +!! SOURCE + +subroutine xmpi_split_list(ntasks, list, comm, my_ntasks, my_inds) + +!Arguments ------------------------------------ + integer,intent(in) :: ntasks, comm + integer,intent(out) :: my_ntasks + integer,intent(in) :: list(ntasks) + integer,allocatable,intent(out) :: my_inds(:) + +!Local variables------------------------------- + integer :: my_start, my_stop + +! ************************************************************************* + + call xmpi_split_work(ntasks, comm, my_start, my_stop) + + my_ntasks = my_stop - my_start + 1 + + if (my_stop >= my_start) then + ABI_MALLOC(my_inds, (my_ntasks)) + my_inds = list(my_start:my_stop) + else + my_ntasks = 0 + ABI_MALLOC(my_inds, (0)) + end if + +end subroutine xmpi_split_list +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_xmpi/xmpi_split_work2_i4b +!! NAME +!! xmpi_split_work2_i4b +!! +!! FUNCTION +!! Splits a number of tasks, ntasks, among nprocs processors. +!! The output arrays istart(1:nprocs) and istop(1:nprocs) +!! report the starting and final task index for each CPU. +!! Namely CPU with rank ii has to perform all the tasks between +!! istart(ii+1) and istop(ii+1). Note the Fortran convention of using 1 as first index of the array. +!! Note, moreover, that if a proc has rank > ntasks then: +!! +!! istart(rank+1)=ntasks+1 +!! istop(rank+1)=ntask +!! +!! In this particular case, loops of the form +!! +!! do ii=istart(rank),istop(rank) +!! ... +!! end do +!! +!! are not executed. Moreover allocation such as foo(istart(rank):istop(rank)) +!! will generate a zero-sized array +!! +!! INPUTS +!! ntasks= number of tasks +!! nprocs=Number of processors. +!! +!! OUTPUT +!! istart(nprocs),istop(nprocs)= indices defining the initial and final task for each processor +!! +!! SOURCE + +subroutine xmpi_split_work2_i4b(ntasks, nprocs, istart, istop) + +!Arguments ------------------------------------ + integer,intent(in) :: ntasks,nprocs + integer,intent(inout) :: istart(nprocs), istop(nprocs) + +!Local variables------------------------------- + integer :: res,irank,block,block_tmp + +! ************************************************************************* + + block_tmp = ntasks/nprocs + res = MOD(ntasks,nprocs) + block = block_tmp+1 + + do irank=0,nprocs-1 + if (irank ntasks + do ii=1,ntasks + list(ii) = ii-1 + end do + else + ii=1 + do irank=nprocs-1,0,-1 ! If remainder/=0, master will get less tasks. + jj = ii+ntpblock-1 + if (remainder>0) then + jj=jj+1 + remainder = remainder-1 + end if + list(ii:jj)=irank + ii=jj+1 + end do + end if + + task_distrib = RESHAPE(list, [n1,n2,n3,n4]) + + if (ANY(task_distrib==-999)) call xmpi_abort(msg="task_distrib == -999") + + ABI_FREE(list) + +end subroutine xmpi_distab_4D +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_xmpi/xmpi_distrib_with_replicas +!! NAME +!! xmpi_distrib_with_replicas +!! +!! FUNCTION +!! This function distributes the i-th task `itask` among `nprocs` inside a MPI communicator. +!! If nprocs > ntasks, multiple MPI ranks will be assigned to a given task. +!! +!! INPUTS +!! itask=Index of the task (must be <= ntasks) +!! ntasks= number of tasks +!! rank=MPI Rank of this processor in the MPI communicator. +!! nprocs=Number of processors in the MPI communicator. +!! +!! OUTPUT +!! True if this node will treat itask (replicas are possible if nprocs > ntasks) +!! +!! SOURCE + +pure logical function xmpi_distrib_with_replicas(itask, ntasks, rank, nprocs) result(bool) + +!Arguments ------------------------------------ + integer,intent(in) :: itask,rank,nprocs,ntasks + +!Local variables------------------------------- + integer :: ii,mnp_pool,rk_base + +! ************************************************************************* + + ! If the number of processors is less than ntasks, we have max one processor per task + ! else we replicate the tasks inside a pool of max size mnp_pool + if (nprocs <= ntasks) then + bool = modulo(itask - 1, nprocs) == rank + else + mnp_pool = (nprocs / ntasks) + !write(std_out,*)"Will duplicate itask, mnp_pool", mnp_pool, "nprocs, ntasks", nprocs, ntasks + + rk_base = modulo(itask - 1, nprocs) + bool = .False. + do ii=1,mnp_pool+1 + if (rank == rk_base + (ii - 1) * ntasks) then + bool = .True.; exit + end if + end do + end if + +end function xmpi_distrib_with_replicas +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_xmpi/xmpi_largetype_create +!! NAME +!! xmpi_largetype_create +!! +!! FUNCTION +!! This function builds a large-count contiguous datatype made of "small" adjacent +!! chunks (of same original type). The new type can then be used in MPI +!! routines when the number of elements to communicate exceeds a 32bit integer. +!! +!! INPUTS +!! largecount= total number of elements expressed as a 64bit integer +!! inputtype= (INTEGER) input type (typically INTEGER, REAL(dp), ...) +!! op_type= type of operation that will be applied during collective comms +!! At present, MPI_SUM, MPI_LOR, MPI_LAND are implemented +!! +!! OUTPUT +!! largetype= (INTEGER) new MPI type made of a serie of adjacent chunks +!! largetype_op= (INTEGER) MPI user-defined operation associated to largetype type +!! +!! NOTE +!! This routine is partially inspired by https://github.com/jeffhammond/BigMPI +!! See: J.R. Hammond. A. Schafer, R. Latham, +!! "ToINT_MAX. . . and beyond. Exploring large-count support in MPI", +!! 2014 Workshop on Exascale MPI at Supercomputing Conference +!! MIT License (MIT) +!! Permission is hereby granted, free of charge, to any person obtaining a copy +!! of this software and associated documentation files (the "Software"), to deal +!! in the Software without restriction, including without limitation the rights +!! to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +!! copies of the Software, and to permit persons to whom the Software is +!! furnished to do so. +!! +!! From MPI4 specification, this routine is useless as large-count MPI communications +!! can be called with the use of the MPI_count datatype (instead of INTEGER). +!! +!! SOURCE + +subroutine xmpi_largetype_create(largecount,inputtype,largetype,largetype_op,op_type) + +!Arguments ------------------------------------ +!scalars + integer(KIND=int64),intent(in) :: largecount + integer,intent(in) :: inputtype,op_type + integer,intent(out) :: largetype,largetype_op + +!Local variables------------------------------- +#ifdef HAVE_MPI +!scalars + integer,parameter :: INT_MAX=max(1,xmpi_maxint32/2) + integer(KIND=int32) :: cc,rr,ierr + integer(KIND=XMPI_ADDRESS_KIND) :: extent,lb,remdisp + integer :: chunks,remainder +!arrays + integer(KIND=int32) :: blklens(2) + integer(KIND=XMPI_ADDRESS_KIND) :: disps(2) + integer :: types(2) +#endif + +! ************************************************************************* + +#ifdef HAVE_MPI + if (XMPI_ADDRESS_KIND HUGE(tmp_displ(1)) ))then + call xmpi_abort(msg=" byte displacement cannot be represented with a default integer") + end if + + call MPI_TYPE_STRUCT(ncount,block_length,block_displ,block_type,new_type,mpierr) + ABI_FREE(tmp_displ) +#endif + +end subroutine xmpio_type_struct +!!*** + +#endif + +!---------------------------------------------------------------------- + +!!****f* m_xmpi/xmpio_get_info_frm +!! NAME +!! xmpio_marker_info +!! +!! FUNCTION +!! Return the byte size of the Fortran record and its corresponding MPI_type (compiler-dependent). +!! These two values are needed to access sequential binary Fortran files with MPI/IO routines where +!! C-streams are used. +!! +!! INPUTS +!! comm=MPI communicator. Only master will find the values for the record marker. The results +!! are then broadcast to all the other nodes in comm. +!! +!! OUTPUT +!! bsize_frm=Byte size of the Fortran record marker. +!! mpi_type_frm=MPI type of the marker. +!! +!! SOURCE + +subroutine xmpio_get_info_frm(bsize_frm, mpi_type_frm, comm) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: comm + integer,intent(out) :: mpi_type_frm,bsize_frm + +!Local variables------------------------------- + integer :: my_rank +#ifdef HAVE_MPI_IO +!scalars + integer,parameter :: master=0 + integer :: spt,ept,ii + integer :: f90_unt,iimax,mpio_fh,bsize_int,mpierr + integer(XMPI_OFFSET_KIND) :: offset,rml + character(len=fnlen) :: fname + character(len=500) :: errmsg + logical :: file_exists +!arrays + integer :: xvals(2),ivals(100),read_5ivals(5),ref_5ivals(5) + integer :: rm_lengths(4)=(/4,8,2,16/) + integer :: statux(MPI_STATUS_SIZE) + real(dp) :: xrand(fnlen) +#endif + +!************************************************************************ + + bsize_frm=0; mpi_type_frm=0 + + my_rank = xmpi_comm_rank(comm) !; RETURN + +#ifdef HAVE_MPI_IO + if ( my_rank == master ) then + ! Fortran scratch files cannot have a name so have to generate a random one. + ! cannot use pick_aname since it is higher level. + fname = "__MPI_IO_FRM__" + spt=LEN(trim(fname))+1; ept=spt + + inquire(file=trim(fname),exist=file_exists) + + do while (file_exists) + call RANDOM_NUMBER(xrand(spt:ept)) + xrand(spt:ept) = 64+xrand(spt:ept)*26 + do ii=spt,ept + fname(ii:ii) = ACHAR(NINT(xrand(ii))) + end do + ept = MIN(ept+1,fnlen) + inquire(file=trim(fname),exist=file_exists) + end do + ! + ! Write five integers on the binary file open in Fortran mode, then try + ! to reread the values with MPI-IO using different offsets for the record marker. + ! + f90_unt = xmpi_get_unit() + if (f90_unt == -1) call xmpi_abort(msg="Cannot find free unit!!") + ! MT dec 2013: suppress the new attribute: often cause unwanted errors + ! and theoretically useless because of the previous inquire + open(unit=f90_unt,file=trim(fname),form="unformatted",err=10, iomsg=errmsg) + + ref_5ivals = (/(ii, ii=5,9)/) + ivals = HUGE(1); ivals(5:9)=ref_5ivals + write(f90_unt, err=10, iomsg=errmsg) ivals + close(f90_unt, err=10, iomsg=errmsg) + + call MPI_FILE_OPEN(xmpi_comm_self, trim(fname), MPI_MODE_RDONLY, MPI_INFO_NULL, mpio_fh,mpierr) + + iimax=3 ! Define number of INTEGER types to be tested +#ifdef HAVE_FC_INT_QUAD + iimax=4 +#endif + ! + ! Try to read ivals(5:9) from file. + ii=0; bsize_frm=-1 + call MPI_TYPE_SIZE(MPI_INTEGER,bsize_int,mpierr) + + do while (bsize_frm<=0 .and. ii for reading by current proc. +!! xmpio_collective ==> for collective reading. +!! offset=MPI/IO file pointer +!! [advance]=By default the routine will move the file pointer to the next record. +!! advance=.FALSE. can be used so that the next read will continue picking information +!! off of the currect record. +!! +!! OUTPUT +!! fmarker=Content of the Fortran record marker. +!! mpierr= MPI error code +!! +!! SIDE EFFECTS +!! offset= +!! input: file pointer used to access the Fortran marker. +!! output: new offset updated after the reading, depending on advance. +!! +!! SOURCE + +#ifdef HAVE_MPI_IO + +subroutine xmpio_read_frm(fh, offset, sc_mode, fmarker, mpierr, advance) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: fh,sc_mode + integer(XMPI_OFFSET_KIND),intent(inout) :: offset + integer(XMPI_OFFSET_KIND),intent(out) :: fmarker + integer,intent(out) :: mpierr + logical,optional,intent(in) :: advance + +!Local variables------------------------------- +!scalars + integer :: bsize_frm,mpi_type_frm,myfh + integer(kind=int16) :: delim_record2(1) + integer(kind=int32) :: delim_record4(1) + integer(kind=int64) :: delim_record8(1) +#if defined HAVE_FC_INT_QUAD + integer*16 :: delim_record16(1) +#endif + character(len=500) :: msg +!arrays + integer :: statux(MPI_STATUS_SIZE) + +!************************************************************************ + + !Workaround for XLF. + myfh = fh + + bsize_frm = xmpio_bsize_frm ! Byte size of the Fortran record marker. + mpi_type_frm = xmpio_mpi_type_frm ! MPI type of the record marker. + + SELECT CASE (sc_mode) + + CASE (xmpio_single) + + if (bsize_frm==4) then + call MPI_FILE_READ_AT(myfh,offset,delim_record4,1,mpi_type_frm,statux,mpierr) + fmarker = delim_record4(1) + else if (bsize_frm==8) then + call MPI_FILE_READ_AT(myfh,offset,delim_record8,1,mpi_type_frm,statux,mpierr) + fmarker = delim_record8(1) +#if defined HAVE_FC_INT_QUAD + else if (bsize_frm==16) then + call MPI_FILE_READ_AT(myfh,offset,delim_record16,1,mpi_type_frm,statux,mpierr) + fmarker = delim_record16(1) +#endif + else if (bsize_frm==2) then + call MPI_FILE_READ_AT(myfh,offset,delim_record2,1,mpi_type_frm,statux,mpierr) + fmarker = delim_record2(1) + else + call xmpi_abort(msg='Wrong record marker length!') + end if + + CASE (xmpio_collective) + + if (bsize_frm==4) then + call MPI_FILE_READ_AT_ALL(myfh,offset,delim_record4,1,mpi_type_frm,statux,mpierr) + fmarker = delim_record4(1) + else if (bsize_frm==8) then + call MPI_FILE_READ_AT_ALL(myfh,offset,delim_record8,1,mpi_type_frm,statux,mpierr) + fmarker = delim_record8(1) +#if defined HAVE_FC_INT_QUAD + else if (bsize_frm==16) then + call MPI_FILE_READ_AT_ALL(myfh,offset,delim_record16,1,mpi_type_frm,statux,mpierr) + fmarker = delim_record16(1) +#endif + else if (bsize_frm==2) then + call MPI_FILE_READ_AT_ALL(myfh,offset,delim_record2,1,mpi_type_frm,statux,mpierr) + fmarker = delim_record2(1) + else + call xmpi_abort(msg='Wrong record marker length!') + end if + + CASE DEFAULT + write(msg,"(a,i0)")" Wrong value for sc_mode: ",sc_mode + call xmpi_abort(msg=msg) + END SELECT + + if (PRESENT(advance)) then + if (advance) then + offset = offset + fmarker + 2*bsize_frm ! Move the file pointer to the next record. + else + offset = offset + bsize_frm ! Move the pointer after the marker. + end if + else + offset = offset + fmarker + 2*bsize_frm + end if + +end subroutine xmpio_read_frm +!!*** + +#endif + +!------------------------------------------------------------------------------------ + +!!****f* m_wffile/xmpio_write_frm +!! NAME +!! xmpio_write_frm +!! +!! FUNCTION +!! Write a single record marker in a FORTRAN file at a given offset using MPI-IO. +!! The file pointer is modified according to the value of advance. +!! +!! INPUTS +!! fh=MPI-IO file handler. +!! sc_mode= +!! xmpio_single ==> for reading by current proc. +!! xmpio_collective ==> for collective reading. +!! fmarker=The content of the Fortran marker i.e. the size of the record in bytes. +!! [advance]=By default the routine will move the file pointer to the next record. +!! advance=.FALSE. can be used so that the next write will continue writing data +!! on the currect record. +!! +!! OUTPUT +!! mpierr= error code +!! +!! SIDE EFFECTS +!! offset= +!! input: offset of the Fortran marker. +!! output: new offset updated after the writing, depending on advance. +!! +!! SOURCE + +#ifdef HAVE_MPI_IO + +subroutine xmpio_write_frm(fh, offset, sc_mode, fmarker, mpierr, advance) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: fh,sc_mode + integer(XMPI_OFFSET_KIND),intent(in) :: fmarker + integer(XMPI_OFFSET_KIND),intent(inout) :: offset + integer,intent(out) :: mpierr + logical,optional,intent(in) :: advance + +!Local variables------------------------------- +!scalars + integer :: myfh,bsize_frm,mpi_type_frm + integer(XMPI_OFFSET_KIND) :: last + integer(kind=int16) :: delim_record2 + integer(kind=int32) :: delim_record4 + integer(kind=int64) :: delim_record8 +#if defined HAVE_FC_INT_QUAD + integer*16 :: delim_record16 +#endif + character(len=500) :: msg +!arrays + integer :: statux(MPI_STATUS_SIZE) + +!************************************************************************ + + ! Workaround for XLF + myfh = fh + + bsize_frm = xmpio_bsize_frm ! Byte size of the Fortran record marker. + mpi_type_frm = xmpio_mpi_type_frm ! MPI type of the record marker. + last = offset + bsize_frm + fmarker ! position of the end marker + + SELECT CASE (sc_mode) + + CASE (xmpio_single) + if (bsize_frm==4) then + delim_record4 = fmarker + call MPI_FILE_WRITE_AT(myfh,offset,[delim_record4],1,mpi_type_frm,statux,mpierr) + call MPI_FILE_WRITE_AT(myfh,last,[delim_record4],1,mpi_type_frm,statux,mpierr) + + else if (bsize_frm==8) then + delim_record8 = fmarker + call MPI_FILE_WRITE_AT(myfh,offset,[delim_record8],1,mpi_type_frm,statux,mpierr) + call MPI_FILE_WRITE_AT(myfh,last,[delim_record8],1,mpi_type_frm,statux,mpierr) +#if defined HAVE_FC_INT_QUAD + else if (bsize_frm==16) then + delim_record16 = fmarker + call MPI_FILE_WRITE_AT(myfh,offset,[delim_record16],1,mpi_type_frm,statux,mpierr) + call MPI_FILE_WRITE_AT(myfh,last,[delim_record16],1,mpi_type_frm,statux,mpierr) +#endif + else if (bsize_frm==2) then + delim_record2 = fmarker + call MPI_FILE_WRITE_AT(myfh,offset,[delim_record2], 1,mpi_type_frm,statux,mpierr) + call MPI_FILE_WRITE_AT(myfh,last,[delim_record2],1,mpi_type_frm,statux,mpierr) + else + call xmpi_abort(msg='Wrong record marker length!') + end if + + CASE (xmpio_collective) + if (bsize_frm==4) then + delim_record4 = fmarker + call MPI_FILE_WRITE_AT_ALL(myfh,offset,[delim_record4],1,mpi_type_frm,statux,mpierr) + call MPI_FILE_WRITE_AT_ALL(myfh,last,[delim_record4],1,mpi_type_frm,statux,mpierr) + else if (bsize_frm==8) then + delim_record8 = fmarker + call MPI_FILE_WRITE_AT_ALL(myfh,offset,[delim_record8],1,mpi_type_frm,statux,mpierr) + call MPI_FILE_WRITE_AT_ALL(myfh,last,[delim_record8],1,mpi_type_frm,statux,mpierr) +#if defined HAVE_FC_INT_QUAD + else if (bsize_frm==16) then + delim_record16 = fmarker + call MPI_FILE_WRITE_AT_ALL(myfh,offset,[delim_record16],1,mpi_type_frm,statux,mpierr) + call MPI_FILE_WRITE_AT_ALL(myfh,last,[delim_record16],1,mpi_type_frm,statux,mpierr) +#endif + else if (bsize_frm==2) then + delim_record2 = fmarker + call MPI_FILE_WRITE_AT_ALL(myfh,offset,[delim_record2],1,mpi_type_frm,statux,mpierr) + call MPI_FILE_WRITE_AT_ALL(myfh,last,[delim_record2],1,mpi_type_frm,statux,mpierr) + else + call xmpi_abort(msg='Wrong record marker length!') + end if + + CASE DEFAULT + write(msg,"(a,i0)")" Wrong value for sc_mode: ",sc_mode + call xmpi_abort(msg=msg) + END SELECT + + if (PRESENT(advance)) then + if (advance) then + offset = offset + fmarker + 2*bsize_frm ! Move the file pointer to the next record. + else + offset = offset + bsize_frm ! Move the pointer after the marker. + end if + else + offset = offset + fmarker + 2*bsize_frm + end if + +end subroutine xmpio_write_frm +!!*** +#endif + +!------------------------------------------------------------------------------------ + +!!****f* m_xmpi/xmpio_create_fstripes +!! NAME +!! xmpio_create_fstripes +!! +!! FUNCTION +!! Return a MPI type that can be used to (read|write) a set of interleaved Fortran records. +!! +!! type(1), type(1), ... ! size(1) elements +!! type(2), type(2), ... ! size(2) elements +!! type(1), type(1), ... ! size(1) elements +!! .... +!! +!! INPUTS +!! ncount = Number of records with elements of type types(1) to (read|write) +!! sizes(1:2) = Number of elements of each type in the two sets of record +!! type(1:2) = MPI Type of the elements in the first and in the second record. +!! +!! OUTPUT +!! my_offpad=Offset to be added to the file pointer giving the position of the first Fortran record +!! marker individuating the beginning of the matrix. (lets call it "base"). +!! Each node should (read|write) using my_offset = base + my_offpad. +!! my_offpad is used so that one can safely change the way the fileview is generated (for example +!! to make it more efficient) without having to change the client code. +!! new_type=New MPI type. +!! mpierr= MPI error code +!! +!! SOURCE + +#ifdef HAVE_MPI_IO + +subroutine xmpio_create_fstripes(ncount, sizes, types, new_type, my_offpad, mpierr) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: ncount + integer(XMPI_OFFSET_KIND),intent(out) :: my_offpad + integer,intent(out) :: new_type,mpierr +!arrays + integer,intent(in) :: types(2),sizes(2) + +!Local variables------------------------------- +!scalars + integer :: type_x,type_y,bsize_frm,bsize_x,bsize_y,nx,ny,column_type + integer(MPI_ADDRESS_KIND) :: stride + +!************************************************************************ + + ! Byte size of the Fortran record marker. + bsize_frm = xmpio_bsize_frm + + ! Number of elements in the two stripes. + nx = sizes(1) + ny = sizes(2) + + type_x = types(1) + type_y = types(2) + + ! Byte size of type_x and type_y + call MPI_TYPE_SIZE(type_x,bsize_x,mpierr) + ABI_HANDLE_MPIERR(mpierr) + + call MPI_TYPE_SIZE(type_y,bsize_y,mpierr) + ABI_HANDLE_MPIERR(mpierr) + + ! The view starts at the first element of the first stripe. + my_offpad = xmpio_bsize_frm + + call MPI_Type_contiguous(nx,type_x,column_type,mpierr) + ABI_HANDLE_MPIERR(mpierr) + + ! Byte size of the Fortran record + the two markers. + stride = nx*bsize_x + 2*bsize_frm + ny*bsize_y + 2*bsize_frm + + ! ncount colum_type separated by stride bytes + if (ncount>0) then + call MPI_Type_create_hvector(ncount,1,stride,column_type,new_type,mpierr) + else + call MPI_Type_create_hvector(1,1,stride,column_type,new_type,mpierr) + end if + ABI_HANDLE_MPIERR(mpierr) + + call MPI_TYPE_COMMIT(new_type,mpierr) + ABI_HANDLE_MPIERR(mpierr) + + call MPI_TYPE_FREE(column_type,mpierr) + ABI_HANDLE_MPIERR(mpierr) + +end subroutine xmpio_create_fstripes +!!*** +#endif + +!------------------------------------------------------------------------------------ + +!!****f* m_xmpi/xmpio_create_fsubarray_2D +!! NAME +!! xmpio_create_fsubarray_2D +!! +!! FUNCTION +!! Return a MPI type that can be used to (read|write) a 2D matrix of elements of type old_type stored in a Fortran file. +!! +!! INPUTS +!! sizes(2)=number of elements of type old_type in each dimension of the full array (array of positive integers) +!! subsizes(2)=number of elements of type old_type in each dimension of the subarray (array of positive integers) +!! array_of_starts(2)=starting coordinates of the subarray in each dimension (array of nonnegative integers >=1, <=sizes) +!! old_type=Old MPI type. +!! +!! OUTPUT +!! my_offpad=Offset to be added to the file pointer giving the position of the first Fortran record +!! marker individuating the beginning of the matrix. (lets call it "base"). +!! Each node should (read|write) using my_offset = base + my_offpad. +!! my_offpad is used so that one can safely change the way the fileview is generated (for example +!! to make it more efficient) without having to change the client code. +!! new_type=New MPI type. +!! mpierr= MPI error code +!! +!! SOURCE + +#ifdef HAVE_MPI_IO + +subroutine xmpio_create_fsubarray_2D(sizes, subsizes, array_of_starts, old_type, new_type, my_offpad, mpierr) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: old_type + integer(XMPI_OFFSET_KIND),intent(out) :: my_offpad + integer,intent(out) :: mpierr,new_type +!arrays + integer,intent(in) :: sizes(2),subsizes(2),array_of_starts(2) +!Local variables------------------------------- +!scalars + integer :: bsize_frm,bsize_old,nx,ny,column_type,ldx + integer(XMPI_OFFSET_KIND) :: st_x,st_y + integer(MPI_ADDRESS_KIND) :: stride_x + !character(len=500) :: msg + +!************************************************************************ + + ! Byte size of the Fortran record marker. + bsize_frm = xmpio_bsize_frm + + ! Byte size of old_type. + call MPI_TYPE_SIZE(old_type,bsize_old,mpierr) + ABI_HANDLE_MPIERR(mpierr) + ! + ! Number of columns and rows of the submatrix. + nx = subsizes(1) + ny = subsizes(2) + + ldx = sizes(1) + st_x = array_of_starts(1) + st_y = array_of_starts(2) + + ! The view starts at the first element of the submatrix. + my_offpad = (st_x-1)*bsize_old + (st_y-1)*(ldx*bsize_old+2*xmpio_bsize_frm) + xmpio_bsize_frm + + ! Byte size of the Fortran record + the two markers. + stride_x = ldx*bsize_old + 2*bsize_frm + + call MPI_Type_contiguous(nx,old_type,column_type,mpierr) + ABI_HANDLE_MPIERR(mpierr) + + call MPI_Type_create_hvector(ny,1,stride_x,column_type,new_type,mpierr) + ABI_HANDLE_MPIERR(mpierr) + + call MPI_TYPE_COMMIT(new_type,mpierr) + ABI_HANDLE_MPIERR(mpierr) + + call MPI_TYPE_FREE(column_type, mpierr) + ABI_HANDLE_MPIERR(mpierr) + +end subroutine xmpio_create_fsubarray_2D +!!*** +#endif + +!------------------------------------------------------------------------------------ + +!!****f* m_xmpi/xmpio_create_fsubarray_3D +!! NAME +!! xmpio_create_fsubarray_3D +!! +!! FUNCTION +!! Return a MPI type that can be used to (read|write) a 3D matrix of elements of type old_type stored in a Fortran file. +!! +!! INPUTS +!! sizes(3)=number of elements of type old_type in each dimension of the full array (array of positive integers) +!! subsizes(3)=number of elements of type old_type in each dimension of the subarray (array of positive integers) +!! array_of_starts(3)=starting coordinates of the subarray in each dimension (array of nonnegative integers >=1, <=sizes) +!! old_type=Old MPI type. +!! +!! OUTPUT +!! my_offpad=Offset to be added to the file pointer giving the position of the first Fortran record +!! marker individuating the beginning of the matrix. (lets call it "base"). +!! Each node should (read|write) using my_offset = base + my_offpad. +!! my_offpad is used so that one can safely change the way the fileview is generated (for example +!! to make it more efficient) without having to change the client code. +!! new_type=New MPI type. +!! mpierr= MPI error code +!! +!! SOURCE + +#ifdef HAVE_MPI_IO + +subroutine xmpio_create_fsubarray_3D(sizes, subsizes, array_of_starts, old_type, new_type, my_offpad, mpierr) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: old_type + integer,intent(out) :: mpierr,new_type + integer(XMPI_OFFSET_KIND),intent(out) :: my_offpad +!arrays + integer,intent(in) :: sizes(3),subsizes(3),array_of_starts(3) +!Local variables------------------------------- +!scalars + integer :: bsize_frm,bsize_old,nx,ny,nz + integer :: column_type,plane_type,ldx,ldy,ldz + integer(XMPI_OFFSET_KIND) :: st_x,st_y,st_z + integer(MPI_ADDRESS_KIND) :: stride_x + !character(len=500) :: msg + +!************************************************************************ + + bsize_frm = xmpio_bsize_frm ! Byte size of the Fortran record marker. + + ! Byte size of old_type. + call MPI_TYPE_SIZE(old_type,bsize_old,mpierr) + ABI_HANDLE_MPIERR(mpierr) + ! + ! Number of columns and rows of the submatrix. + nx = subsizes(1) + ny = subsizes(2) + nz = subsizes(3) + + ldx = sizes(1) + ldy = sizes(2) + ldz = sizes(3) + + st_x = array_of_starts(1) + st_y = array_of_starts(2) + st_z = array_of_starts(3) + + ! The view starts at the first element of the submatrix. + my_offpad = (st_x-1)*bsize_old + & + (st_y-1)* (ldx*bsize_old+2*xmpio_bsize_frm) + & + (st_z-1)*ldy*(ldx*bsize_old+2*xmpio_bsize_frm) + & + xmpio_bsize_frm + + ! Byte size of the Fortran record + the two markers. + stride_x = ldx*bsize_old + 2*bsize_frm + + call MPI_Type_contiguous(nx,old_type,column_type,mpierr) + ABI_HANDLE_MPIERR(mpierr) + + call MPI_Type_create_hvector(ny,1,stride_x,column_type,plane_type,mpierr) + ABI_HANDLE_MPIERR(mpierr) + + call MPI_Type_create_hvector(nz,1,ldy*stride_x,plane_type,new_type,mpierr) + ABI_HANDLE_MPIERR(mpierr) + + ! Commit the datatype + call MPI_TYPE_COMMIT(new_type,mpierr) + ABI_HANDLE_MPIERR(mpierr) + + ! Free memory + call MPI_TYPE_FREE(plane_type, mpierr) + ABI_HANDLE_MPIERR(mpierr) + +end subroutine xmpio_create_fsubarray_3D +!!*** +#endif + +!------------------------------------------------------------------------------------ + +!!****f* m_xmpi/xmpio_create_fsubarray_4D +!! NAME +!! xmpio_create_fsubarray_4D +!! +!! FUNCTION +!! Return a MPI type that can be used to (read|write) a 2D matrix of elements of type old_type stored in a Fortran file. +!! +!! INPUTS +!! sizes(4)=number of elements of type old_type in each dimension of the full array (array of positive integers) +!! subsizes(4)=number of elements of type old_type in each dimension of the subarray (array of positive integers) +!! array_of_starts(4)=starting coordinates of the subarray in each dimension (array of nonnegative integers >=1, <=sizes) +!! old_type=Old MPI type. +!! +!! OUTPUT +!! my_offpad=Offset to be added to the file pointer giving the position of the first Fortran record +!! marker individuating the beginning of the matrix. (lets call it "base"). +!! Each node should (read|write) using my_offset = base + my_offpad. +!! my_offpad is used so that one can safely change the way the fileview is generated (for example +!! to make it more efficient) without having to change the client code. +!! new_type=New MPI type. +!! mpierr= MPI error code +!! +!! SOURCE + +#ifdef HAVE_MPI_IO + +subroutine xmpio_create_fsubarray_4D(sizes, subsizes, array_of_starts, old_type, new_type, my_offpad, mpierr) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: old_type + integer,intent(out) :: mpierr,new_type + integer(XMPI_OFFSET_KIND),intent(out) :: my_offpad +!arrays + integer,intent(in) :: sizes(4),subsizes(4),array_of_starts(4) + +!Local variables------------------------------- +!scalars + integer :: bsize_frm,bsize_old,nx,ny,nz,na + integer :: column_type,plane_type,ldx,ldy,ldz,lda,vol_type + integer(XMPI_OFFSET_KIND) :: st_x,st_y,st_z,st_a + integer(MPI_ADDRESS_KIND) :: stride_x + +!************************************************************************ + + bsize_frm = xmpio_bsize_frm ! Byte size of the Fortran record marker. + + ! Byte size of old_type. + call MPI_TYPE_SIZE(old_type,bsize_old,mpierr) + ABI_HANDLE_MPIERR(mpierr) + ! + ! Number of columns and rows of the submatrix. + nx = subsizes(1) + ny = subsizes(2) + nz = subsizes(3) + na = subsizes(4) + + ldx = sizes(1) + ldy = sizes(2) + ldz = sizes(3) + lda = sizes(4) + + st_x = array_of_starts(1) + st_y = array_of_starts(2) + st_z = array_of_starts(3) + st_a = array_of_starts(4) + + ! The view starts at the first element of the submatrix. + my_offpad = (st_x-1)*bsize_old + & + (st_y-1)* (ldx*bsize_old+2*xmpio_bsize_frm) + & + (st_z-1)*ldy* (ldx*bsize_old+2*xmpio_bsize_frm) + & + (st_a-1)*lda*ldy*(ldx*bsize_old+2*xmpio_bsize_frm) + & + xmpio_bsize_frm + + ! Byte size of the Fortran record + the two markers. + stride_x = ldx*bsize_old + 2*bsize_frm + + call MPI_Type_contiguous(nx,old_type,column_type,mpierr) + ABI_HANDLE_MPIERR(mpierr) + + call MPI_Type_create_hvector(ny,1,stride_x,column_type,plane_type,mpierr) + ABI_HANDLE_MPIERR(mpierr) + + call MPI_Type_create_hvector(nz,1,ldy*stride_x,plane_type,vol_type,mpierr) + ABI_HANDLE_MPIERR(mpierr) + + call MPI_Type_create_hvector(na,1,ldz*ldy*stride_x,vol_type,new_type,mpierr) + ABI_HANDLE_MPIERR(mpierr) + + ! Commit the datatype + call MPI_TYPE_COMMIT(new_type,mpierr) + ABI_HANDLE_MPIERR(mpierr) + + ! Free memory + call MPI_TYPE_FREE(column_type, mpierr) + ABI_HANDLE_MPIERR(mpierr) + + call MPI_TYPE_FREE(plane_type, mpierr) + ABI_HANDLE_MPIERR(mpierr) + + call MPI_TYPE_FREE(vol_type, mpierr) + ABI_HANDLE_MPIERR(mpierr) + +end subroutine xmpio_create_fsubarray_4D +!!*** +#endif + +!------------------------------------------------------------------------------------ + +!!****f* m_xmpi/xmpio_check_frmarkers +!! NAME +!! xmpio_check_frmarkers +!! +!! FUNCTION +!! Check a set of Fortran record markers starting at a given offset using MPI-IO. +!! +!! INPUTS +!! fh=MPI-IO file handler. +!! offset=MPI-IO file pointer +!! sc_mode=Option for individual or collective reading. +!! nfrec=Number of Fortran records to be checked. +!! bsize_frecord(nfrec)=Byte size of the Fortran records (markers are NOT included) +!! These values will be compared with the markers reported in the file. +!! +!! OUTPUT +!! ierr=A non-zero error code signals failure. +!! +!! SOURCE + +#ifdef HAVE_MPI_IO + +subroutine xmpio_check_frmarkers(fh, offset, sc_mode, nfrec, bsize_frecord, ierr) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: fh,nfrec,sc_mode + integer(XMPI_OFFSET_KIND),intent(in) :: offset + integer,intent(out) :: ierr +!arrays + integer(XMPI_OFFSET_KIND),intent(in) :: bsize_frecord(nfrec) + +!Local variables------------------------------- +!scalars + integer :: nb,irec,frmarkers_type,jj,bsize_frm,mpi_type_frm,mpierr,myfh + integer(XMPI_OFFSET_KIND) :: displ +!arrays + integer(kind=int16),allocatable :: bufdelim2(:) + integer(kind=int32),allocatable :: bufdelim4(:) + integer(kind=int64),allocatable :: bufdelim8(:) +#ifdef HAVE_FC_INT_QUAD + integer*16,allocatable :: bufdelim16(:) +#endif +!integer :: statux(MPI_STATUS_SIZE) + integer,allocatable :: block_length(:),block_type(:) + integer(XMPI_ADDRESS_KIND),allocatable :: block_displ(:) + integer(XMPI_OFFSET_KIND),allocatable :: delim_record(:) + +!************************************************************************ + + ! Workaround for XLF + myfh = fh + ierr=0 + + bsize_frm = xmpio_bsize_frm ! Byte size of the Fortran record marker. + mpi_type_frm = xmpio_mpi_type_frm ! MPI type of the record marker. + + ! Define the view for the file. + nb=2*nfrec + ABI_MALLOC(block_length,(nb+2)) + ABI_MALLOC(block_displ,(nb+2)) + ABI_MALLOC(block_type,(nb+2)) + block_length(1)=1 + block_displ (1)=0 + block_type (1)=MPI_LB + + jj=2; displ=0 + do irec=1,nfrec + block_type (jj:jj+1) =mpi_type_frm + block_length(jj:jj+1)=1 + block_displ(jj ) = displ + block_displ(jj+1) = bsize_frm + displ + bsize_frecord(irec) + jj=jj+2 + displ = displ + bsize_frecord(irec) + 2*bsize_frm ! Move to the beginning of the next column. + if (xmpio_max_address(displ)) ierr=-1 ! Check for wraparound. + end do + + block_length(nb+2)=1 + block_displ (nb+2)=displ + block_type (nb+2)=MPI_UB + + call xmpio_type_struct(nb+2,block_length,block_displ,block_type,frmarkers_type,mpierr) + ABI_FREE(block_length) + ABI_FREE(block_displ) + ABI_FREE(block_type) + + call MPI_TYPE_COMMIT(frmarkers_type,mpierr) + call MPI_FILE_SET_VIEW(myfh,offset,MPI_BYTE,frmarkers_type,"native",MPI_INFO_NULL,mpierr) + + jj=1 + ABI_MALLOC(delim_record,(nb)) + do irec=1,nfrec + delim_record(jj:jj+1)=bsize_frecord(irec) + jj=jj+2 + end do + + ! Read markers according to the MPI type of the Fortran marker. + SELECT CASE (bsize_frm) + + CASE (4) + ABI_MALLOC(bufdelim4,(nb)) + if (sc_mode==xmpio_single) then + call MPI_FILE_READ (myfh,bufdelim4,2*nfrec,mpi_type_frm,MPI_STATUS_IGNORE,mpierr) + else if (sc_mode==xmpio_collective) then + call MPI_FILE_READ_ALL(myfh,bufdelim4,2*nfrec,mpi_type_frm,MPI_STATUS_IGNORE,mpierr) + else + ierr=2 + end if + if (ANY(bufdelim4/=delim_record)) ierr=1 + if (ierr==1) then + do irec=1,2*nfrec + write(std_out,*)"irec, bufdelim4, delim_record: ",irec,bufdelim4(irec),delim_record(irec) + end do + end if + ABI_FREE(bufdelim4) + + CASE (8) + ABI_MALLOC(bufdelim8,(nb)) + if (sc_mode==xmpio_single) then + call MPI_FILE_READ (myfh,bufdelim8,2*nfrec,mpi_type_frm,MPI_STATUS_IGNORE,mpierr) + else if (sc_mode==xmpio_collective) then + call MPI_FILE_READ_ALL(myfh,bufdelim8,2*nfrec,mpi_type_frm,MPI_STATUS_IGNORE,mpierr) + else + ierr=2 + end if + if (ANY(bufdelim8/=delim_record)) ierr=1 + ABI_FREE(bufdelim8) + +#ifdef HAVE_FC_INT_QUAD + CASE (16) + ABI_MALLOC(bufdelim16,(nb)) + if (sc_mode==xmpio_single) then + call MPI_FILE_READ (myfh,bufdelim16,2*nfrec,mpi_type_frm,MPI_STATUS_IGNORE,mpierr) + else if (sc_mode==xmpio_collective) then + call MPI_FILE_READ_ALL(myfh,bufdelim16,2*nfrec,mpi_type_frm,MPI_STATUS_IGNORE,mpierr) + else + ierr=2 + end if + if (ANY(bufdelim16/=delim_record)) ierr=1 + ABI_FREE(bufdelim16) +#endif + + CASE (2) + ABI_MALLOC(bufdelim2,(nb)) + if (sc_mode==xmpio_single) then + call MPI_FILE_READ (myfh,bufdelim2,2*nfrec,mpi_type_frm,MPI_STATUS_IGNORE,mpierr) + else if (sc_mode==xmpio_collective) then + call MPI_FILE_READ_ALL(myfh,bufdelim2,2*nfrec,mpi_type_frm,MPI_STATUS_IGNORE,mpierr) + else + ierr=2 + end if + if (ANY(bufdelim2/=delim_record)) ierr=1 + ABI_FREE(bufdelim2) + + CASE DEFAULT + ierr=-2 + END SELECT + + ! Free memory + call MPI_TYPE_FREE(frmarkers_type,mpierr) + ABI_FREE(delim_record) + +end subroutine xmpio_check_frmarkers +!!*** +#endif + +!---------------------------------------------------------------------- + +!!****f* m_xmpi/xmpio_read_int +!! NAME +!! xmpio_read_int +!! +!! FUNCTION +!! Read the content of a single record marker in a FORTRAN file at a given offset using MPI-IO. +!! the file pointer is modified according to the value of advance. +!! target: integer array +!! +!! INPUTS +!! fh=MPI-IO file handler. +!! offset=MPI-IO file pointer +!! sc_mode= +!! xmpio_single ==> for reading by current proc. +!! xmpio_collective ==> for collective reading. +!! ncount=Number of elements in the buffer +!! [advance]=By default the routine will move the file pointer to the next record. +!! advance=.FALSE. can be used so that the next read will continue picking information +!! off of the currect record. +!! +!! OUTPUT +!! buf(ncount)=array with the values read from file +!! fmarker=Content of the Fortran record marker. +!! mpierr= MPI error code +!! +!! SIDE EFFECTS +!! offset= +!! input: file pointer used to access the Fortran marker. +!! output: new offset updated after the reading, depending on advance. +!! +!! SOURCE + +#ifdef HAVE_MPI_IO + +subroutine xmpio_read_int(fh, offset, sc_mode, ncount, buf, fmarker, mpierr, advance) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: fh,sc_mode,ncount + integer(XMPI_OFFSET_KIND),intent(inout) :: offset + integer(XMPI_OFFSET_KIND),intent(out) :: fmarker + integer,intent(out) :: mpierr + logical,optional,intent(in) :: advance +!arrays + integer,intent(out) :: buf(ncount) + +!Local variables------------------------------- +!scalars + integer :: myfh,bsize_frm + integer(XMPI_OFFSET_KIND) :: my_offset + character(len=500) :: msg +!arrays + integer :: statux(MPI_STATUS_SIZE) + +!************************************************************************ + + ! Workaround for XLF + myfh = fh + + my_offset = offset + bsize_frm = xmpio_bsize_frm ! Byte size of the Fortran record marker. + + call xmpio_read_frm(myfh,my_offset,sc_mode,fmarker,mpierr,advance=.FALSE.) + + SELECT CASE (sc_mode) + CASE (xmpio_single) + call MPI_FILE_READ_AT(myfh, my_offset, buf, ncount, MPI_INTEGER, statux, mpierr) + + CASE (xmpio_collective) + call MPI_FILE_READ_AT_ALL(myfh, my_offset, buf, ncount, MPI_INTEGER, statux, mpierr) + + CASE DEFAULT + write(msg,"(a,i0)")" Wrong value for sc_mode: ",sc_mode + call xmpi_abort(msg=msg) + END SELECT + + if (PRESENT(advance)) then + if (advance) then + offset = offset + fmarker + 2*bsize_frm ! Move the file pointer to the next record. + else + offset = offset + bsize_frm ! Move the pointer after the marker. + end if + else + offset = offset + fmarker + 2*bsize_frm + end if + +end subroutine xmpio_read_int +!!*** +#endif + +!---------------------------------------------------------------------- + +!!****f* m_xmpi/xmpio_read_dp +!! NAME +!! xmpio_read_dp +!! +!! FUNCTION +!! Read the content of a single record marker in a FORTRAN file at a given offset using MPI-IO. +!! the file pointer is modified according to the value of advance. +!! targer: double precision real array +!! +!! INPUTS +!! fh=MPI-IO file handler. +!! offset=MPI-IO file pointer +!! sc_mode= +!! xmpio_single ==> for reading by current proc. +!! xmpio_collective ==> for collective reading. +!! ncount=Number of elements in the buffer +!! [advance]=By default the routine will move the file pointer to the next record. +!! advance=.FALSE. can be used so that the next read will continue picking information +!! off of the currect record. +!! +!! OUTPUT +!! buf(ncount)=array with the values read from file +!! fmarker=Content of the Fortran record marker. +!! mpierr= MPI error code +!! +!! SIDE EFFECTS +!! offset= +!! input: file pointer used to access the Fortran marker. +!! output: new offset updated after the reading, depending on advance. +!! +!! SOURCE + +#ifdef HAVE_MPI_IO + +subroutine xmpio_read_dp(fh, offset, sc_mode, ncount, buf, fmarker, mpierr, advance) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: fh,sc_mode,ncount + integer(XMPI_OFFSET_KIND),intent(inout) :: offset + integer(XMPI_OFFSET_KIND),intent(out) :: fmarker + integer,intent(out) :: mpierr + logical,optional,intent(in) :: advance +!arrays + real(dp),intent(out) :: buf(ncount) + +!Local variables------------------------------- +!scalars + integer :: bsize_frm,myfh + integer(XMPI_OFFSET_KIND) :: my_offset + character(len=500) :: msg +!arrays + integer :: statux(MPI_STATUS_SIZE) + +!************************************************************************ + + ! Workaround for XLF + myfh = fh + + my_offset = offset + bsize_frm = xmpio_bsize_frm ! Byte size of the Fortran record marker. + + call xmpio_read_frm(myfh,my_offset,sc_mode,fmarker,mpierr,advance=.FALSE.) + + SELECT CASE (sc_mode) + CASE (xmpio_single) + call MPI_FILE_READ_AT(myfh, my_offset, buf, ncount, MPI_DOUBLE_PRECISION, statux, mpierr) + + CASE (xmpio_collective) + call MPI_FILE_READ_AT_ALL(myfh, my_offset, buf, ncount, MPI_DOUBLE_PRECISION, statux, mpierr) + + CASE DEFAULT + write(msg,"(a,i0)")" Wrong value for sc_mode: ",sc_mode + call xmpi_abort(msg=msg) + END SELECT + + if (PRESENT(advance)) then + if (advance) then + offset = offset + fmarker + 2*bsize_frm ! Move the file pointer to the next record. + else + offset = offset + bsize_frm ! Move the pointer after the marker. + end if + else + offset = offset + fmarker + 2*bsize_frm + end if + +end subroutine xmpio_read_dp +!!*** +#endif + +!------------------------------------------------------------------------------------ + +!!****f* m_xmpi/xmpio_max_address +!! NAME +!! xmpio_max_address +!! +!! FUNCTION +!! Returns .TRUE. if offset cannot be stored in a Fortran integer of kind XMPI_ADDRESS_KIND. +!! +!! SOURCE + +#ifdef HAVE_MPI_IO + +function xmpio_max_address(offset) + +!Arguments ------------------------------------ +!scalars + logical :: xmpio_max_address + integer(XMPI_OFFSET_KIND),intent(in) :: offset +!arrays + +!Local variables------------------------------- +!scalars + integer(XMPI_ADDRESS_KIND) :: address + integer(XMPI_OFFSET_KIND),parameter :: max_address=HUGE(address)-100 + +!************************************************************************ + + xmpio_max_address = (offset >= max_address) + +end function xmpio_max_address +!!*** +#endif + +!------------------------------------------------------------------------------------ + +!!****f* m_xmpi/xmpio_write_frmarkers +!! NAME +!! xmpio_write_frmarkers +!! +!! FUNCTION +!! Write a set of Fortran record markers starting at a given offset using MPI-IO. +!! +!! INPUTS +!! fh=MPI-IO file handler. +!! offset=MPI-IO file pointer +!! sc_mode=Option for individual or collective reading. +!! nfrec=Number of Fortran records to be written. +!! bsize_frecord(nfrec)=Byte size of the Fortran records to be written (markers are NOT included in the size) +!! +!! OUTPUT +!! ierr=A non-zero error code signals failure. +!! +!! SOURCE + +#ifdef HAVE_MPI_IO + +subroutine xmpio_write_frmarkers(fh, offset, sc_mode, nfrec, bsize_frecord, ierr) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: fh,nfrec,sc_mode + integer(XMPI_OFFSET_KIND),intent(in) :: offset + integer,intent(out) :: ierr +!arrays + integer(XMPI_OFFSET_KIND),intent(in) :: bsize_frecord(nfrec) + +!Local variables------------------------------- +!scalars + integer :: nb,irec,frmarkers_type,jj,bsize_frm,mpi_type_frm,mpierr,myfh + integer(XMPI_OFFSET_KIND) :: displ +!integer(XMPI_OFFSET_KIND) :: my_offset +!character(len=500) :: msg +!arrays + integer(kind=int16),allocatable :: bufdelim2(:) + integer(kind=int32),allocatable :: bufdelim4(:) + integer(kind=int64),allocatable :: bufdelim8(:) +#ifdef HAVE_FC_INT_QUAD + integer*16,allocatable :: bufdelim16(:) +#endif +!integer :: statux(MPI_STATUS_SIZE) + integer,allocatable :: block_length(:),block_type(:) + integer(XMPI_ADDRESS_KIND),allocatable :: block_displ(:) + integer(XMPI_OFFSET_KIND),allocatable :: delim_record(:) + +!************************************************************************ + + ! Workaround for XLF + myfh = fh; ierr=0 + + !my_offset = offset + !do irec=1,nfrec + ! call xmpio_write_frm(myfh,my_offset,sc_mode,bsize_frecord(irec),mpierr) + !end do + !return + + ! FIXME: This is buggy + bsize_frm = xmpio_bsize_frm ! Byte size of the Fortran record marker. + mpi_type_frm = xmpio_mpi_type_frm ! MPI type of the record marker. + + ! Define the view for the file + nb=2*nfrec + ABI_MALLOC(block_length,(nb+2)) + ABI_MALLOC(block_displ,(nb+2)) + ABI_MALLOC(block_type,(nb+2)) + block_length(1)=1 + block_displ (1)=0 + block_type (1)=MPI_LB + + jj=2; displ=0 + do irec=1,nfrec + block_type (jj:jj+1) = mpi_type_frm + block_length(jj:jj+1) = 1 + block_displ(jj ) = displ + block_displ(jj+1) = displ + bsize_frm + bsize_frecord(irec) + jj=jj+2 + displ = displ + bsize_frecord(irec) + 2*bsize_frm ! Move to the beginning of the next column. + if (xmpio_max_address(displ)) then ! Check for wraparound. + ierr = -1; return + end if + end do + + block_length(nb+2) = 1 + block_displ (nb+2) = displ + block_type (nb+2) = MPI_UB + + call xmpio_type_struct(nb+2,block_length,block_displ,block_type,frmarkers_type,mpierr) + + ABI_FREE(block_length) + ABI_FREE(block_displ) + ABI_FREE(block_type) + + call MPI_TYPE_COMMIT(frmarkers_type,mpierr) + call MPI_FILE_SET_VIEW(myfh,offset,MPI_BYTE,frmarkers_type,"native",MPI_INFO_NULL,mpierr) + + jj=1 + ABI_MALLOC(delim_record,(nb)) + do irec=1,nfrec + delim_record(jj:jj+1)=bsize_frecord(irec) + jj=jj+2 + end do + + ! Write all markers according to the MPI type of the Fortran marker. + SELECT CASE (bsize_frm) + + CASE (4) + ABI_MALLOC(bufdelim4,(nb)) + bufdelim4=delim_record + if (sc_mode==xmpio_single) then + call MPI_FILE_WRITE (myfh,bufdelim4,2*nfrec,mpi_type_frm,MPI_STATUS_IGNORE,mpierr) + else if (sc_mode==xmpio_collective) then + call MPI_FILE_WRITE_ALL(myfh,bufdelim4,2*nfrec,mpi_type_frm,MPI_STATUS_IGNORE,mpierr) + else + ierr=2 + end if + ABI_FREE(bufdelim4) + + CASE (8) + ABI_MALLOC(bufdelim8,(nb)) + bufdelim8=delim_record + if (sc_mode==xmpio_single) then + call MPI_FILE_WRITE (myfh,bufdelim8,2*nfrec,mpi_type_frm,MPI_STATUS_IGNORE,mpierr) + else if (sc_mode==xmpio_collective) then + call MPI_FILE_WRITE_ALL(myfh,bufdelim8,2*nfrec,mpi_type_frm,MPI_STATUS_IGNORE,mpierr) + else + ierr=2 + end if + ABI_FREE(bufdelim8) + +#ifdef HAVE_FC_INT_QUAD + CASE (16) + ABI_MALLOC(bufdelim16,(nb)) + bufdelim16=delim_record + if (sc_mode==xmpio_single) then + call MPI_FILE_WRITE (myfh,bufdelim16,2*nfrec,mpi_type_frm,MPI_STATUS_IGNORE,mpierr) + else if (sc_mode==xmpio_collective) then + call MPI_FILE_WRITE_ALL(myfh,bufdelim16,2*nfrec,mpi_type_frm,MPI_STATUS_IGNORE,mpierr) + else + ierr=2 + end if + ABI_FREE(bufdelim16) +#endif + + CASE (2) + ABI_MALLOC(bufdelim2,(nb)) + bufdelim2=delim_record + if (sc_mode==xmpio_single) then + call MPI_FILE_WRITE (myfh,bufdelim2,2*nfrec,mpi_type_frm,MPI_STATUS_IGNORE,mpierr) + else if (sc_mode==xmpio_collective) then + call MPI_FILE_WRITE_ALL(myfh,bufdelim2,2*nfrec,mpi_type_frm,MPI_STATUS_IGNORE,mpierr) + else + ierr=2 + end if + ABI_FREE(bufdelim2) + + CASE DEFAULT + ierr=-2 + END SELECT + + ! Free memory + call MPI_TYPE_FREE(frmarkers_type,mpierr) + ABI_FREE(delim_record) + +end subroutine xmpio_write_frmarkers +#endif +!!*** + +!------------------------------------------------------------------------------------ + +!!****f* m_xmpi/xmpio_create_fherm_packed +!! NAME +!! xmpio_create_fherm_packed +!! +!! FUNCTION +!! Returns an MPI datatype that can be used to (read|write) with MPI-IO the columns of an +!! Hermitian matrix whose upper triangle is written on a Fortran binary file. +!! Note that the view assumes that the file pointer used to create the MPI-IO view +!! points to the first element of the first column. In other words,the first Fortran record marker +!! (if any) is not taken into account in the calculation of the displacements. +!! +!! INPUTS +!! array_of_starts(2)=starting coordinates in the global Hermitian matrix +!! (array of positive integers with jj>=ii, Fortran convention) +!! array_of_ends(2)=final coordinates in the global Hermitian matrix +!! (array of positive integers, jj>=ii, Fortran convention) +!! is_fortran_file=.FALSE. is C stream is used. .TRUE. for writing Fortran binary files. +!! old_type=MPI datatype of the elements of the matrix. +!! +!! OUTPUT +!! my_offset=Offset relative to the beginning of the matrix in the file. +!! hmat_type=New MPI type. +!! offset_err= error code +!! +!! NOTES +!! The matrix on file is written in the following FORTRAN format (let us assume a 3x3 matrix for simplicity) +!! +!! m (1,1) m +!! m (1,2) (2,2) m +!! m (1,3) (2,3) (3,3) m +!! +!! each Fortran record stores a column of the packed Hermitian matrix, "m" denotes the Fortran +!! record marker that introduces holes in the MPI-IO file view. +!! To read the columns from (1,2) up to (2,2) one should use array_of_starts=(1,2) and array_of_ends=(2,2). +!! The MPI-IO file view should be created by moving the file pointer so that it points to the elements (1,2). +!! +!! File views for C-streams is not optimal since one can use a single slice of contigous data. +!! +!! SOURCE + +#ifdef HAVE_MPI_IO + +subroutine xmpio_create_fherm_packed(array_of_starts,array_of_ends,is_fortran_file,my_offset,old_type,hmat_type,offset_err) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: old_type + integer,intent(out) :: offset_err,hmat_type + integer(XMPI_OFFSET_KIND),intent(out) :: my_offset + logical,intent(in) :: is_fortran_file +!arrays + integer,intent(in) :: array_of_starts(2),array_of_ends(2) + +!Local variables------------------------------- +!scalars + integer :: nrow,my_ncol,ii,bsize_old,col,jj_glob,bsize_frm,prev_col,mpierr + integer(XMPI_OFFSET_KIND) :: col_displ +!arrays + integer,allocatable :: col_type(:),block_length(:),block_type(:) + integer(XMPI_ADDRESS_KIND),allocatable :: block_displ(:) + +!************************************************************************ + + offset_err=0 + + ! Byte size of old_type. + call MPI_TYPE_SIZE(old_type,bsize_old,mpierr) + + bsize_frm=0; if (is_fortran_file) bsize_frm = xmpio_bsize_frm + + my_ncol = array_of_ends(2) - array_of_starts(2) + 1 + ! + ! Calculate my offset relative to the beginning of the matrix in the file. + prev_col = array_of_starts(2)-1 + my_offset = (prev_col*(prev_col+1)/2)*bsize_old + (array_of_starts(1)-1)*bsize_old + 2*prev_col*bsize_frm + bsize_frm + ! + ! col_type(col) describes the col-th column of the packed matrix. + ! block_displ(col+1) stores its displacement taking into account the Fortran marker. + ABI_MALLOC(col_type,(my_ncol)) + ABI_MALLOC(block_displ,(my_ncol+2)) + + if (my_ncol>1) then + col_displ=0 + do col=1,my_ncol + jj_glob = (col-1) + array_of_starts(2) + nrow = jj_glob + if (jj_glob==array_of_starts(2)) nrow = jj_glob - array_of_starts(1) + 1 ! First column treated by me. + if (jj_glob==array_of_ends(2)) nrow = array_of_ends(1) ! Last column treated by me. + call MPI_Type_contiguous(nrow,old_type,col_type(col),mpierr) + ! + if (xmpio_max_address(col_displ)) offset_err=1 ! Test for wraparounds + block_displ(col+1) = col_displ + col_displ = col_displ + nrow * bsize_old + 2 * bsize_frm ! Move to the next column. + end do + + else if (my_ncol==1) then ! The case of a single column is treated separately. + block_displ(2) = 0 + nrow = array_of_ends(1) - array_of_starts(1) + 1 + call MPI_Type_contiguous(nrow,old_type,col_type(2),mpierr) + col_displ= nrow*bsize_old + if (xmpio_max_address(col_displ)) offset_err=1 ! Test for wraparounds + else + call xmpi_abort(msg="my_ncol cannot be negative!") + end if + + ABI_MALLOC(block_length,(my_ncol+2)) + ABI_MALLOC(block_type,(my_ncol+2)) + + block_length(1)=1 + block_displ (1)=0 + block_type (1)=MPI_LB + + do ii=2,my_ncol+1 + block_length(ii)=1 + block_type(ii) =col_type(ii-1) + !write(std_out,*)" ii-1, depl, length, type: ",ii-1,block_displ(ii),block_length(ii),block_type(ii) + end do + + block_length(my_ncol+2)= 1 + block_displ (my_ncol+2)= col_displ + block_type (my_ncol+2)= MPI_UB + + call xmpio_type_struct(my_ncol+2,block_length,block_displ,block_type,hmat_type,mpierr) + + call MPI_TYPE_COMMIT(hmat_type,mpierr) + + ABI_FREE(block_length) + ABI_FREE(block_displ) + ABI_FREE(block_type) + + do col=1,my_ncol + call MPI_TYPE_FREE(col_type(col),mpierr) + end do + + ABI_FREE(col_type) + +end subroutine xmpio_create_fherm_packed +!!*** +#endif + +!------------------------------------------------------------------------------------ + +!!****f* m_xmpi/xmpio_create_coldistr_from_fpacked +!! NAME +!! xmpio_create_coldistr_from_fpacked +!! +!! FUNCTION +!! Returns an MPI datatype that can be used to MPI-IO (read|write) the columns of an +!! (Hermitian|Symmetric) matrix whose upper triangle is written on a Fortran binary file. +!! Note that the view assumes that the file pointer used to instanciate the MPI-IO view +!! points to the first element of the first column. In other words,the first Fortran record marker +!! (if any) is not taken into account in the calculation of the displacements. +!! +!! INPUTS +!! sizes(2)=Number of elements of type old_type in each dimension of the full array (array of positive integers) +!! my_cols(2)=initial and final column to (read|write). Array of positive integers, Fortran convention. +!! old_type=MPI datatype of the elements of the matrix. +!! +!! OUTPUT +!! new_type=New MPI type that can be used to instanciate the MPI-IO view for the Fortran file. +!! my_offpad=Offset to be added to the file pointer giving the position of the first Fortran record +!! marker (lets call it "base"). Each node should (read|write) using my_offset = base + my_offpad. +!! my_offpad is used so that one can safely change the way the fileview is generated (for example +!! to make it more efficient) without having to change the client code. +!! offset_err=Error code. A non-zero returned value signals that the global matrix is tool large +!! for a single MPI-IO access (see notes below). +!! +!! NOTES +!! 1) The matrix on file is written in the following FORTRAN format (let us assume a 3x3 matrix for simplicity) +!! +!! m (1,1) m +!! m (1,2) (2,2) m +!! m (1,3) (2,3) (3,3) m +!! +!! each Fortran record stores a column of the packed matrix, "m" denotes the Fortran +!! record marker that introduces holes in the file view. +!! +!! 2) With (signed) Fortran integers, the maximum size of the file that +!! that can be read in one-shot is around 2Gb when etype is set to byte. +!! Using a larger etype might create portability problems (real data on machines using +!! integer*16 for the marker) since etype must be a multiple of the Fortran record marker +!! Due to the above reason, block_displ is given in bytes but it has to be defined as Fortran +!! integer. If the displacement cannot be stored in a Fortran integer, the routine returns +!! offset_err=1 so that the caller will know that several MPI-IO reads are nedded to +!! read the file. +!! +!! SOURCE + +#ifdef HAVE_MPI_IO + +subroutine xmpio_create_coldistr_from_fpacked(sizes,my_cols,old_type,new_type,my_offpad,offset_err) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: old_type + integer,intent(out) :: new_type,offset_err + integer(XMPI_OFFSET_KIND),intent(out) :: my_offpad +!arrays + integer,intent(in) :: sizes(2),my_cols(2) + +!Local variables------------------------------- +!scalars + integer :: my_ncol,bsize_old,my_col + integer :: my_nels,my_el,row_glob,ii_hpk,jj_hpk,col_glob,bsize_frm,mpierr + integer(XMPI_OFFSET_KIND) :: my_offset,ijp_glob + !character(len=500) :: msg +!arrays + integer,allocatable :: block_length(:),block_type(:) + integer(XMPI_ADDRESS_KIND),allocatable :: block_displ(:) + +!************************************************************************ + + ! Byte size of the Fortran record marker. + bsize_frm = xmpio_bsize_frm + + ! Byte size of old_type. + call MPI_TYPE_SIZE(old_type,bsize_old,mpierr) + + ! my number of columns and total numer of elements to be read. + my_ncol = my_cols(2) - my_cols(1) + 1 + my_nels = my_ncol*sizes(1) + ! + ! block_displ(el+1) stores the displacement of the local element el taking into account the Fortran marker. + ABI_MALLOC(block_displ,(my_nels+2)) + ABI_MALLOC(block_length,(my_nels+2)) + ABI_MALLOC(block_type,(my_nels+2)) + + block_length(1)=1 + block_displ (1)=0 + block_type (1)=MPI_LB + ! + ! * the view assumes that the file pointer used to instanciate the MPI-IO view + ! points to the first element of the first column. In other words,the first Fortran record marker + ! is not taken into account in the calculation of the displacements. + my_offpad=xmpio_bsize_frm + + ! * Some matrix elements are read twice. This part has to be tested. + offset_err=0; my_el=0 + do my_col=1,my_ncol + col_glob = (my_col-1) + my_cols(1) + do row_glob=1,sizes(1) + if (col_glob>=row_glob) then + ii_hpk = row_glob + jj_hpk = col_glob + ijp_glob = row_glob + col_glob*(col_glob-1)/2 ! Index for packed form + else ! Exchange the indices as (jj,ii) will be read. + ii_hpk = col_glob + jj_hpk = row_glob + ijp_glob = col_glob + row_glob*(row_glob-1)/2 ! Index for packed form + end if + my_el = my_el+1 + my_offset = (ijp_glob-1)* bsize_old + (jj_hpk-1)*2*bsize_frm + if (xmpio_max_address(my_offset)) offset_err=1 ! Check for wraparounds. + block_displ (my_el+1)=my_offset + block_length(my_el+1)=1 + block_type (my_el+1)=old_type + !write(std_out,*)" my_el, displ: ",my_el,block_displ(my_el+1) + end do + end do + + block_length(my_nels+2)=1 + block_displ (my_nels+2)=my_offset + block_type (my_nels+2)=MPI_UB + + call xmpio_type_struct(my_nels+2,block_length,block_displ,block_type,new_type,mpierr) + + call MPI_TYPE_COMMIT(new_type,mpierr) + + ABI_FREE(block_length) + ABI_FREE(block_displ) + ABI_FREE(block_type) + +end subroutine xmpio_create_coldistr_from_fpacked +!!*** +#endif + +!------------------------------------------------------------------------------------ + +!!****f* m_xmpi/xmpio_create_coldistr_from_fp3blocks +!! NAME +!! xmpio_create_coldistr_from_fp3blocks +!! +!! FUNCTION +!! Returns an MPI datatype that can be used to MPI-IO (read|write) the columns of a +!! matrix of the form M = (S1 F3) +!! (F3^H S2) +!! where S1 and S2 are square (symmetric|Hermitian) matrices whose upper triangle is stored on file +!! while F3 is a generic matrix (not necessarily square) stored in full mode. +!! The Fortran file contains the blocks in the following order. +!! upper(S1) +!! upper(S2) +!! F3 +!! INPUTS +!! sizes(2)=Number of elements of type old_type in each dimension of the full array M (array of positive integers) +!! my_cols(2)=initial and final column to (read|write). Array of positive integers, Fortran convention. +!! block_sizes(2,3)=The sizes of S1, S2, F. +!! old_type=MPI datatype of the elements of the matrix. +!! +!! OUTPUT +!! new_type=New MPI type that can be used to instanciate the MPI-IO view for the Fortran file. +!! my_offpad=Offset to be added to the file pointer giving the position of the first Fortran record +!! marker (lets call it "base"). Each node should (read|write) using my_offset = base + my_offpad. +!! my_offpad is used so that one can safely change the way the fileview is generated (for example +!! to make it more efficient) without having to change the client code. +!! offset_err=Error code. A non-zero returned value signals that the global matrix is tool large +!! for a single MPI-IO access (see notes below). +!! +!! NOTES +!! 1) block_displ is given in bytes due to the presence of the marker. +!! If the displacement of an element is too large, the routine returns +!! offset_err=1 so that the caller knows that several MPI-IO reads are required to (read| write) the file. +!! +!! SOURCE + +#ifdef HAVE_MPI_IO + +subroutine xmpio_create_coldistr_from_fp3blocks(sizes,block_sizes,my_cols,old_type,new_type,my_offpad,offset_err) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: old_type + integer,intent(out) :: new_type,offset_err + integer(XMPI_OFFSET_KIND),intent(out) :: my_offpad +!arrays + integer,intent(in) :: sizes(2),my_cols(2),block_sizes(2,3) + +!Local variables------------------------------- +!scalars + integer :: my_ncol,bsize_old,my_col,which_block,uplo,swap + integer :: my_nels,my_el,row_glob,ii_hpk,jj_hpk,ii,jj + integer :: col_glob,bsize_frm,mpierr,row_shift,col_shift,n1,n2 + integer(XMPI_OFFSET_KIND) :: my_offset,ijp,bsize_tot,max_displ,min_displ + integer(XMPI_ADDRESS_KIND) :: address +!arrays + integer,allocatable :: block_length(:),block_type(:) + integer(XMPI_ADDRESS_KIND),allocatable :: block_displ(:) + integer(XMPI_OFFSET_KIND) :: bsize_mat(2) + +!************************************************************************ + + if (sizes(1) /= SUM(block_sizes(1,1:2)) .or. & + sizes(2) /= SUM(block_sizes(2,1:2)) ) then + write(std_out,*)" xmpio_create_coldistr_from_fp3blocks: Inconsistency between block_sizes ans sizes " + call xmpi_abort() + end if + + if (block_sizes(1,1) /= block_sizes(2,1) .or.& + block_sizes(1,2) /= block_sizes(2,2) ) then + write(std_out,*)" xmpio_create_coldistr_from_fp3blocks: first two blocks must be square" + call xmpi_abort() + end if + + if (block_sizes(2,3) /= block_sizes(2,2) .or.& + block_sizes(1,3) /= block_sizes(1,1) ) then + write(std_out,*)" xmpio_create_coldistr_from_fp3blocks: Full matrix must be square" + call xmpi_abort() + end if + + write(std_out,*)" xmpio_create_coldistr_from_fp3blocks is still under testing" + !call xmpi_abort() + + ! Byte size of the Fortran record marker. + bsize_frm = xmpio_bsize_frm + + ! Byte size of old_type. + call MPI_TYPE_SIZE(old_type,bsize_old,mpierr) + + ! my number of columns and total numer of elements to be read. + my_ncol = my_cols(2) - my_cols(1) + 1 + my_nels = sizes(1)*my_ncol + ! + ! block_displ(el+1) stores the displacement of the local element el taking into account the Fortran marker. + ABI_MALLOC(block_displ,(my_nels+2)) + ABI_MALLOC(block_length,(my_nels+2)) + ABI_MALLOC(block_type,(my_nels+2)) + ! + ! * the view assumes that the file pointer used to instanciate the MPI-IO view + ! points to the first element of the first column. In other words,the first Fortran record marker + ! is not taken into account in the calculation of the displacements. + my_offpad=xmpio_bsize_frm + ! + ! Byte size of the first two blocks including the markers. + n1=block_sizes(1,1) + bsize_mat(1) = (n1*(n1+1)/2)*bsize_old + 2*n1*bsize_frm + + n2=block_sizes(1,2) + bsize_mat(2) = (n2*(n2+1)/2)*bsize_old + 2*n2*bsize_frm + + bsize_tot=SUM(bsize_mat) + PRODUCT(block_sizes(:,3))*bsize_old + block_sizes(2,3)*2*bsize_frm - bsize_frm + write(std_out,*)"bsize_mat",bsize_mat,"bsize_tot",bsize_tot + ! + ! * Some matrix elements are read twice. This part has to be tested. + offset_err=0; my_el=0; max_displ=0; min_displ=HUGE(address) + do my_col=1,my_ncol + col_glob = (my_col-1) + my_cols(1) + do row_glob=1,sizes(1) + ! + which_block=3 + if (row_glob<=block_sizes(1,1).and.col_glob<=block_sizes(2,1)) which_block=1 + if (row_glob >block_sizes(1,1).and.col_glob >block_sizes(2,1)) which_block=2 + + if ( ANY(which_block == (/1,2/)) ) then ! S1 or S2 + ! + row_shift=(which_block-1)*block_sizes(1,1) + col_shift=(which_block-1)*block_sizes(2,1) + + ii_hpk = row_glob - row_shift + jj_hpk = col_glob - col_shift + if (jj_hpkblock_sizes(1,1)) uplo=2 + + if (uplo==1) then + row_shift=0 + col_shift=block_sizes(2,1) + else + row_shift=block_sizes(1,1) + col_shift=0 + end if + ii = row_glob - row_shift + jj = col_glob - col_shift + + if (uplo==2) then ! Exchange the indices since the symmetric element will be read. + swap=jj + jj =ii + ii =swap + end if + + my_offset = (ii-1)*bsize_old + (jj-1)*block_sizes(1,3)*bsize_old + (jj-1)*2*bsize_frm + my_offset = my_offset + SUM(bsize_mat) + !if (uplo==1) my_offset=my_offset + bsize_mat(1) + !my_offset=0 + !if (ii==1.and.jj==1) write(std_out,*)" (1,1) offset = ",my_offset + !if (ii==block_sizes(1,3).and.jj==block_sizes(2,3)) write(std_out,*)" (n,n) offset =", my_offset + if (my_offset>=bsize_tot-1*bsize_old) then + write(std_out,*)"WARNING (my_offset>bsize_tot-bsize_old),",ii,jj,my_offset,bsize_tot + end if + end if + + if (xmpio_max_address(my_offset)) offset_err=1 ! Check for wraparounds. + my_el = my_el+1 + block_displ (my_el+1)=my_offset + block_length(my_el+1)=1 + block_type (my_el+1)=old_type + max_displ = MAX(max_displ,my_offset) + min_displ = MIN(min_displ,my_offset) + !if (which_block==3) write(std_out,*)" my_el, which, displ: ",my_el,which_block,block_displ(my_el+1) + end do + end do + + write(std_out,*)" MAX displ = ",max_displ," my_nels = ",my_nels + write(std_out,*)" MIN displ = ",MINVAL(block_displ(2:my_nels+1)) + + !block_displ (1)=max_displ ! Do not change this value. + !if (min_displ>0) block_displ (1)=min_displ ! Do not change this value. + + block_displ (1)=min_displ + block_displ (1)=0 + block_length(1)=0 + block_type (1)=MPI_LB + + block_length(my_nels+2)=0 + !block_displ (my_nels+2)=bsize_tot + block_displ (my_nels+2)=max_displ + block_type (my_nels+2)=MPI_UB + + call xmpio_type_struct(my_nels+2,block_length,block_displ,block_type,new_type,mpierr) + !call xmpio_type_struct(my_nels,block_length(2:),block_displ(2:),block_type(2:),new_type,mpierr) + + !call MPI_TYPE_CREATE_INDEXED_BLOCK(my_nels, block_length(2:), block_displ(2:), old_type, new_type, mpierr) + + call MPI_TYPE_COMMIT(new_type,mpierr) + + ABI_FREE(block_length) + ABI_FREE(block_displ) + ABI_FREE(block_type) + +end subroutine xmpio_create_coldistr_from_fp3blocks +!!*** +#endif + +!!****f* m_xmpi/xmpi_distrib_2d +!! NAME +!! xmpi_distrib_2d +!! +!! FUNCTION +!! Try to optimally distribute nprocs in a 2d grid of shape (n1, n2) given a problem of dimension (n1, n2). +!! Use order string to define priorities: +!! "12" or "21" if both dimensions should be optimized (if not possibile the first one gets optimized) +!! "1" or "2" to optimize only one dimension. +!! Return: exit status in ierr. +!! +!! SOURCE + +subroutine xmpi_distrib_2d(nprocs, order, size1, size2, n1, n2, ierr) + +!Arguments ------------------------------------ + integer,intent(in) :: nprocs, size1, size2 + character(len=*),intent(in) :: order + integer,intent(out) :: n1, n2, ierr + +!Local variables------------------------------- + integer :: ii + +!---------------------------------------------------------------------- + + ierr = 1; n1 = -1; n2 = -1 + + select case (order) + case ("12") + call balance_12() + if (ierr /= 0) call balance_1() + case ("21") + call balance_21() + if (ierr /= 0) call balance_2() + case ("1") + call balance_1() + case ("2") + call balance_2() + case default + ! Wrong order + ierr = -1 + end select + +contains + +subroutine balance_12() + ! Try to find n1 x n2 = nprocs so that (size1, size2) are multiple of (n1, n2) + do ii=nprocs,1,-1 + if (mod(size1, ii) == 0 .and. mod(nprocs, ii) == 0 .and. mod(size2, nprocs / ii) == 0) then + n1 = ii; n2 = nprocs / ii; ierr = 0; exit + end if + end do + +end subroutine balance_12 + +subroutine balance_21() + ! Try to find n1 x n2 = nprocs so that (size1, size2) are multiple of (n1, n2) + do ii=nprocs,1,-1 + if (mod(size2, ii) == 0 .and. mod(nprocs, ii) == 0 .and. mod(size1, nprocs / ii) == 0) then + n2 = ii; n1 = nprocs / ii; ierr = 0; exit + end if + end do +end subroutine balance_21 + +subroutine balance_1() + integer :: imod1 + ! Try to find n1 x n2 = nprocs so that only size1 is multiple of n1. Allow for some load imbalance. + do ii=nprocs,1,-1 + imod1 = mod(size1, ii) + if ((imod1 == 0 .or. imod1 >= nprocs / 2) .and. mod(nprocs, ii) == 0) then + n1 = ii; n2 = nprocs / ii; ierr = 0; exit + end if + end do + + if (ierr /= 0 .and. nprocs <= size1) then + n1 = nprocs; n2 = 1; ierr = 0; return + end if +end subroutine balance_1 + +subroutine balance_2() + integer :: imod2 + ! Try to find n1 x n2 = nprocs so that only size2 is multiple of n2. Allow for some load imbalance. + do ii=nprocs,1,-1 + imod2 = mod(size2, ii) + if ((imod2 == 0 .or. imod2 >= nprocs / 2) .and. mod(nprocs, ii) == 0) then + n2 = ii; n1 = nprocs / ii; ierr = 0; exit + end if + end do + + if (ierr /= 0 .and. nprocs <= size2) then + n2 = nprocs; n1 = 1; ierr = 0; return + end if +end subroutine balance_2 + +end subroutine xmpi_distrib_2d +!!*** + +type(xcomm_t) function xcomm_from_mpi_int(comm_int) result(new) + integer,intent(in) :: comm_int + integer :: new_comm, ierr + new%value = comm_int; new%me = 0; new%nproc = 1 +#ifdef HAVE_MPI + call MPI_Comm_dup(comm_int, new_comm, ierr) + new%value = new_comm + new%nproc = xmpi_comm_size(new_comm) + new%me = xmpi_comm_rank(new_comm) +#endif +end function xcomm_from_mpi_int + +! Skip iteration `iter` according to rank in xcomm. +! [root]: Rank of the proc treating iteration `iter` + +logical function xcomm_skip(xcomm, iter, root) + class(xcomm_t),intent(in) :: xcomm + integer,intent(in) :: iter + integer,optional,intent(out) :: root + + integer :: root__ + + root__ = mod(iter, xcomm%nproc) + xcomm_skip = root__ /= xcomm%me + if (present(root)) root = root__ +end function xcomm_skip + +subroutine xcomm_set_to_self(xcomm) + class(xcomm_t),intent(inout) :: xcomm + call xcomm%free() + xcomm%value = xmpi_comm_self; xcomm%me = 0; xcomm%nproc = 1 +end subroutine xcomm_set_to_self + +subroutine xcomm_set_to_null(xcomm) + class(xcomm_t),intent(inout) :: xcomm + call xcomm%free() + xcomm%value = xmpi_comm_null +end subroutine xcomm_set_to_null + +subroutine xcomm_free(xcomm) + class(xcomm_t),intent(inout) :: xcomm + call xmpi_comm_free(xcomm%value) + xcomm%me = -1; xcomm%nproc = 0 +end subroutine xcomm_free + +! Build sub-communicators in a Cartesian grid. +subroutine xcomm_from_cart_sub(xcomm, comm_cart, keepdim) + class(xcomm_t),intent(out) :: xcomm + integer,intent(in) :: comm_cart + logical,intent(in) :: keepdim(:) + integer :: ierr + +#ifdef HAVE_MPI + call MPI_CART_SUB(comm_cart, keepdim, xcomm%value, ierr) +#endif + xcomm%me = xmpi_comm_rank(xcomm%value) + xcomm%nproc = xmpi_comm_size(xcomm%value) + +end subroutine xcomm_from_cart_sub + +! Prepare a typical gatherv operation in which each MPI rank sends +! `nitems_per_rank(rank+1)` items and each item has length `nelem_per_item`. +! Final results are packed according to the rank of the processor. + +subroutine xcomm_prep_gatherv(xcomm, nelem_per_item, nitems_per_rank, sendcount, recvcounts, displs) + class(xcomm_t),intent(in) :: xcomm + integer,intent(in) :: nelem_per_item, nitems_per_rank(xcomm%nproc) + integer,intent(out) :: sendcount + integer, allocatable, intent(out) :: recvcounts(:), displs(:) + +!Local variables------------------- + integer :: ii +!---------------------------------------------------------------------- + + ABI_MALLOC(recvcounts, (xcomm%nproc)) + ABI_MALLOC(displs, (xcomm%nproc)) + sendcount = nelem_per_item * nitems_per_rank(xcomm%me + 1) + + recvcounts(:) = nelem_per_item * nitems_per_rank + displs(1) = 0 + do ii=2,xcomm%nproc + displs(ii) = nelem_per_item * sum(nitems_per_rank(1:ii-1)) + end do +end subroutine xcomm_prep_gatherv +!!*** + +! Debugging tool to print the hostname of the procs in the communicator +subroutine xcomm_print_names(xcomm) + class(xcomm_t),intent(in) :: xcomm + +!Local variables------------------- + integer :: ip, ierr + character(20) :: my_name, names(xcomm%nproc) +!---------------------------------------------------------------------- + + call xmpi_name(my_name, ierr) + call xmpi_allgather(my_name, names, xcomm%value, ierr) + + if (xcomm%me == 0) then + write(std_out, "(a5,2x,a20)")"rank", "hostname" + do ip=0,xcomm%nproc-1 + write(std_out, "(i5,2x,a20)")ip, trim(names(ip+1)) + end do + end if + +end subroutine xcomm_print_names +!!*** + +! Return True if all procs in xcomm can create a shared memory region. Cache the result. +logical function xcomm_can_use_shmem(xcomm) result(ok) + class(xcomm_t),intent(inout) :: xcomm + +!Local variables------------------- + integer :: ierr, new_comm +!---------------------------------------------------------------------- + + ok = .False. +#ifdef HAVE_MPI + if (xcomm%can_use_shmem__ == - 1) then + ! First call --> cache result + call MPI_COMM_SPLIT_TYPE(xcomm%value, MPI_COMM_TYPE_SHARED, xcomm%me, MPI_INFO_NULL, new_comm, ierr) + xcomm%can_use_shmem__ = merge(1, 0, xmpi_comm_size(new_comm) == xcomm%nproc) + call xmpi_comm_free(new_comm) + end if + ok = xcomm%can_use_shmem__ == 1 +#endif + +end function xcomm_can_use_shmem +!!*** + +subroutine xcomm_allocate_shared_master(xcomm, count, kind, info, baseptr, win) + + class(xcomm_t),intent(inout) :: xcomm + integer(kind=XMPI_ADDRESS_KIND), intent(in) :: count + integer,intent(in) :: kind, info + type(c_ptr),intent(out) :: baseptr + !INTEGER(KIND=XMPI_ADDRESS_KIND) :: baseptr + integer,intent(out) :: win + +!Local variables------------------- + integer :: disp_unit +#ifdef HAVE_MPI +#if 0 + integer :: ierr + integer(kind=XMPI_ADDRESS_KIND) :: my_size +#endif +#endif +!---------------------------------------------------------------------- + + if (.not. xcomm%can_use_shmem()) call xmpi_abort(msg="MPI communicator does not support shared memory allocation!") + + select case (kind) + case (sp) + disp_unit = xmpi_bsize_sp + case (dp) + disp_unit = xmpi_bsize_dp + case default + call xmpi_abort(msg="MPI communicator does not support shared memory allocation!") + end select + + ! FIXME This is problematic as the API with type(c_ptr) requires mpi_f08 + ! else the gcc with mpicc complains with + ! Error: Type mismatch in argument 'baseptr' at (1); passed TYPE(c_ptr) to INTEGER(8) + ! See https://github.com/pmodels/mpich/issues/2659 + +#ifdef HAVE_MPI +#if 0 + my_size = 0; if (xcomm%me == 0) my_size = count * disp_unit + call MPI_WIN_ALLOCATE_SHARED(my_size, disp_unit, info, xcomm%value, baseptr, win, ierr) + !INTEGER(KIND=MPI_ADDRESS_KIND) SIZE, BASEPTR + !INTEGER DISP_UNIT, INFO, COMM, WIN, ierr) + + if (xcomm%me /= 0) call MPI_WIN_SHARED_QUERY(win, 0, my_size, disp_unit, baseptr, ierr) + if (ierr /= MPI_SUCCESS) call xmpi_abort(msg="allocated_shared returned ierr /= 0") + !MPI_WIN_SHARED_QUERY(WIN, RANK, SIZE, DISP_UNIT, BASEPTR, IERROR) + ! INTEGER WIN, RANK, DISP_UNIT, IERROR + ! INTEGER(KIND=MPI_ADDRESS_KIND) SIZE, BASEPTR + + ! No local operations prior to this epoch, so give an assertion + call MPI_Win_fence(MPI_MODE_NOPRECEDE, win, ierr) +#else + ABI_UNUSED(count) + ABI_UNUSED(info) +#endif +#endif + +end subroutine xcomm_allocate_shared_master +!!*** + +!!****f* m_xmpi/pool2d_from_dims +!! NAME +!! pool2d_from_dims +!! +!! FUNCTION +!! Build pool of MPI procs to distribute (n1 x n2) tasks. +!! +!! INPUTS +!! n1, n2: dimensions of the problem +!! input_comm: Initial MPI communicator +!! [rectangular]: If True, change the number of procs in each pool so that it's possible to +!! create a rectangular grid. Useful for Scalapack algorithms in which 1d grid are not efficient. +!! Default: False. +!! +!! SOURCE + +subroutine pool2d_from_dims(pool, n1, n2, input_comm, rectangular) + +!Arguments------------------------- + class(xmpi_pool2d_t),intent(out) :: pool + integer,intent(in) :: n1, n2, input_comm + logical,optional,intent(in) :: rectangular + +!Local variables------------------- + integer :: itask, ntasks, my_rank, nprocs, color, mpierr, jj, i1, i2, my_ntasks, new_comm + integer :: grid_dims(2) ! , check(n1, n2) + integer,allocatable :: my_inds(:) +!---------------------------------------------------------------------- + + my_rank = xmpi_comm_rank(input_comm); nprocs = xmpi_comm_size(input_comm) + + pool%n1 = n1; pool%n2 = n2 + ABI_MALLOC(pool%treats, (n1, n2)) + pool%treats = .False. + + ntasks = n1 * n2; color = ntasks + 1 + + if (nprocs <= ntasks) then + color = my_rank + call xmpi_split_block(ntasks, input_comm, my_ntasks, my_inds) + do jj=1,size(my_inds) + itask = my_inds(jj) ! = i1 + (i2 - 1) * n1 + i1 = mod(itask - 1, n1) + 1 + i2 = 1 + (itask - i1) / n1 + pool%treats(i1, i2) = .True. + end do + ABI_FREE(my_inds) + else + i2_loop: do i2=1,n2 + do i1=1,n1 + itask = i1 + (i2 - 1) * n1 + if (xmpi_distrib_with_replicas(itask, ntasks, my_rank, nprocs)) then + pool%treats(i1, i2) = .True.; color = itask; exit i2_loop + end if + end do + end do i2_loop + end if + +!DEBUG +! where (pool%treats) +! check = 1 +! else where +! check = 0 +! end where +! call xmpi_sum(check, input_comm, mpierr) +! if (any(check == 0)) then +! write(std_out, *) check +! call xmpi_abort(msg="Wrong distribution in pool2d_from_dims") +! end if +!END_DEBUG + + call xmpi_comm_split(input_comm, color, my_rank, new_comm, mpierr) + pool%comm = xcomm_from_mpi_int(new_comm) + call xmpi_comm_free(new_comm) + + if (present(rectangular)) then + if (rectangular) then + if (pool%comm%nproc == 1 .or. is_rectangular_grid(pool%comm%nproc, grid_dims)) return + + do jj=pool%comm%nproc-1,1,-1 + if (is_rectangular_grid(jj, grid_dims)) then + color = merge(1, 0, pool%comm%me < jj) + call xmpi_comm_split(pool%comm%value, color, pool%comm%me, new_comm, mpierr) + call pool%comm%free() + pool%comm = xcomm_from_mpi_int(new_comm) + call xmpi_comm_free(new_comm) + if (color == 0) pool%treats = .False. + exit + end if + end do + end if + end if + +contains + +logical function is_rectangular_grid(nproc, grid_dims) result (ans) + integer,intent(in) :: nproc + integer,intent(out) :: grid_dims(2) +!---------------------------------------------------------------------- + integer :: i + ! Search for a rectangular grid of processors + i = INT(SQRT(float(nproc))) + do while (MOD(nproc,i) /= 0) + i = i - 1 + end do + i = max(i, 1) + + grid_dims(1) = i + grid_dims(2) = int(nproc / i) + ans = grid_dims(1) > 1 .and. grid_dims(2) > 1 + +end function is_rectangular_grid + +end subroutine pool2d_from_dims +!!*** + +!!****f* m_xmpi/pool2d_free +!! NAME +!! pool2d_free +!! +!! FUNCTION +!! Free memory + +subroutine pool2d_free(pool) +!Arguments------------------------- + class(xmpi_pool2d_t),intent(inout) :: pool +!---------------------------------------------------------------------- + + ABI_SFREE(pool%treats) + call pool%comm%free() + +end subroutine pool2d_free +!!*** + +subroutine xmpi_win_fence(win, assert) + integer,intent(in) :: win + integer,optional,intent(in) :: assert + integer :: assert__, ierr + assert__ = 0; if (present(assert)) assert__ = assert +#ifdef HAVE_MPI + call MPI_WIN_FENCE(assert__, win, ierr) + if (ierr /= MPI_SUCCESS) call xmpi_abort(msg="MPI_WIN_FENCE return ierr /= 0") +#endif +end subroutine xmpi_win_fence + +subroutine xmpi_win_free(win) + integer,intent(inout) :: win +#ifdef HAVE_MPI + integer :: ierr + call MPI_WIN_FREE(win, ierr) +#endif +end subroutine xmpi_win_free +!!*** + +! Return the number of nodes `num_nodes` in the `in_comm` communicator. + +subroutine xmpi_get_nodes_in_comm(in_comm, num_nodes, nprocs_per_node) + +!Arguments------------------------- + integer,intent(in) :: in_comm + integer,intent(out) :: num_nodes + integer,optional,allocatable,intent(out) :: nprocs_per_node(:) + +!Local variables------------------- + integer :: ierr, in_rank, node_comm, node_rank !, masters_comm, color, np +!---------------------------------------------------------------------- + +#ifndef HAVE_MPI + num_nodes = 1 + if (present(nprocs_per_node)) then + ABI_MALLOC(nprocs_per_node, (num_nodes)) + nprocs_per_node = 1 + end if + +#else + in_rank = xmpi_comm_rank(in_comm) + call MPI_COMM_SPLIT_TYPE(in_comm, MPI_COMM_TYPE_SHARED, in_rank, MPI_INFO_NULL, node_comm, ierr) + node_rank = xmpi_comm_rank(node_comm) + num_nodes = merge(1, 0, node_rank == 0) + call xmpi_sum(num_nodes, in_comm, ierr) + + if (present(nprocs_per_node)) then + !ABI_MALLOC(nprocs_per_node, (num_nodes)) + !color = merge(0, 1, node_rank == 0) + !call xmpi_comm_split(in_comm, color, in_rank, masters_comm, ierr) + !if (color == 0) then + ! np = xmpi_comm_size(node_comm) + ! call MPI_GATHER(np, 1, MPI_INT, nprocs_per_node, 1, MPI_INT, 0, masters_comm, ierr) + !end if + !call xmpi_comm_free(masters_comm) + end if + + call xmpi_comm_free(node_comm) + +#endif + +end subroutine xmpi_get_nodes_in_comm +!!*** + +end module m_xmpi +!!*** diff --git a/GX-PAW/common/src/12_hide_mpi/m_xmpi.o b/GX-PAW/common/src/12_hide_mpi/m_xmpi.o new file mode 100644 index 00000000..44832f70 Binary files /dev/null and b/GX-PAW/common/src/12_hide_mpi/m_xmpi.o differ diff --git a/GX-PAW/common/src/12_hide_mpi/m_xomp.F90 b/GX-PAW/common/src/12_hide_mpi/m_xomp.F90 new file mode 100644 index 00000000..7e26ed40 --- /dev/null +++ b/GX-PAW/common/src/12_hide_mpi/m_xomp.F90 @@ -0,0 +1,576 @@ +!!****m* ABINIT/m_xomp +!! NAME +!! m_xomp +!! +!! FUNCTION +!! Thin wrappers and tools for OpenMP parallelization. +!! +!! COPYRIGHT +!! Copyright (C) 2008-2024 ABINIT group (MG) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" + +MODULE m_xomp + + use defs_basis, only : std_out + use, intrinsic :: iso_c_binding, only : c_ptr, c_size_t, c_int, c_null_ptr +#ifdef HAVE_OPENMP + use omp_lib +#endif + + implicit none + + private + + public :: xomp_show_info + public :: xomp_get_max_threads + public :: xomp_get_thread_num + public :: xomp_get_num_threads + public :: xomp_set_num_threads + public :: xomp_in_parallel + public :: xomp_get_num_cores_node + ! OpenMP 5.0 GPU device routines + public :: xomp_set_default_device + public :: xomp_get_default_device + public :: xomp_get_initial_device + public :: xomp_get_num_devices + public :: xomp_is_initial_device + public :: xomp_target_is_present + ! OpenMP 5.1 GPU device routine + public :: xomp_get_mapped_ptr + + +!---------------------------------------------------------------------- + +CONTAINS !========================================================================================================================= + +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_xomp/xomp_show_info +!! NAME +!! xomp_show_info +!! +!! FUNCTION +!! Printout of the most important OMP environment variables. +!! +!! INPUTS +!! unit=unit number for writing. The named constant dev_null defined in defs_basis can be used to avoid any printing. +!! +!! OUTPUT +!! (only writing) +!! +!! SOURCE + +subroutine xomp_show_info(unit) + +!Arguments------------------------- + integer,optional,intent(in) :: unit + +!Local variables------------------- + integer :: my_unt + +! ************************************************************************* + + my_unt = std_out; if (PRESENT(unit)) my_unt=unit + +#ifdef HAVE_OPENMP + write(my_unt,'(/,a)') " ==== OpenMP parallelism is ON ====" + write(my_unt,'(a,i0)') "- Max_threads: ",xomp_get_max_threads() + write(my_unt,'(a,i0)') "- Num_threads: ",xomp_get_num_threads(open_parallel=.True.) + write(my_unt,'(a,i0)') "- Num_procs: ",omp_get_num_procs() + write(my_unt,'(a,l1)') "- Dynamic: ",omp_get_dynamic() + !write(my_unt,'(a,l1)') "- Nested: ",omp_get_nested() + !write(my_unt,'(a,i0)')"- Thread_limit: ",omp_get_thread_limit() + !write(my_unt,'(a,i0)')"- Max_active_levels: ",omp_get_max_active_levels() +#else + write(my_unt,'(/,a)') " ==== OpenMP parallelism is OFF ====" +#endif + + write(my_unt,*)"" + +end subroutine xomp_show_info +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_xomp/xomp_get_max_threads +!! NAME +!! xomp_get_max_threads +!! +!! FUNCTION +!! Wrapper for omp_get_max_threads. +!! +!! OUTPUT +!! Return the maximum number of threads used for the current parallel region that +!! does not use the clause num_threads. Return 1 if OMP is disabled. +!! +!! SOURCE + +function xomp_get_max_threads() + +!Arguments ------------------------------------ + integer :: xomp_get_max_threads + +! ************************************************************************* + +#ifdef HAVE_OPENMP + xomp_get_max_threads = omp_get_max_threads() +#else + xomp_get_max_threads = 1 +#endif + +end function xomp_get_max_threads +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_xomp/xomp_get_thread_num +!! NAME +!! xomp_get_thread_num +!! +!! FUNCTION +!! Wrapper for omp_get_thread_num +!! Returns a unique thread identification number within the current team. +!! In a sequential parts of the program, omp_get_thread_num always returns 0. +!! In parallel regions the return value varies from 0 to omp_get_num_threads-1 inclusive. +!! The return value of the master thread of a team is always 0. +!! +!! SOURCE + +function xomp_get_thread_num() + +!Arguments ------------------------------------ +!scalars + integer :: xomp_get_thread_num + +! ************************************************************************* + +#ifdef HAVE_OPENMP + xomp_get_thread_num = omp_get_thread_num() +#else + xomp_get_thread_num = 0 +#endif + +end function xomp_get_thread_num +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_xomp/xomp_get_num_threads +!! NAME +!! xomp_get_num_threads +!! +!! FUNCTION +!! Wrapper for omp_get_num_threads. +!! The omp_get_num_threads function returns the number of threads in the team currently executing +!! the parallel region from which it is called. The function binds to the closest enclosing PARALLEL directive. +!! The omp_set_num_threads subroutine and the OMP_NUM_THREADS environment variable control the number of threads in a team. +!! If you do not explicitly set the number of threads, the run-time environment will use the number of online processors +!! on the machine by default. If you call omp_get_num_threads from a serial portion of your program or from a +!! nested parallel region that is serialized, the function returns 1. +!! +!! INPUTS +!! [open_parallel]= If .TRUE., a temporary OMP parallel region will be open and omp_get_num_threads +!! will be called inside this region. +!! Default to .FALSE. so that we have consistent with the OMP API. +!! +!! SOURCE + +function xomp_get_num_threads(open_parallel) result(nthreads) + +!Arguments ------------------------------------ +!scalars + logical,optional,intent(in) :: open_parallel + integer :: nthreads + +!Local variables------------------------------- +!scalars + logical :: do_open + +! ************************************************************************* + + do_open = .FALSE.; if (PRESENT(open_parallel)) do_open = open_parallel + +#ifdef HAVE_OPENMP + if (do_open .and. .not.xomp_in_parallel()) then +!$OMP PARALLEL +!$OMP SINGLE + nthreads = omp_get_num_threads() +!$OMP END SINGLE +!$OMP END PARALLEL + else + nthreads = omp_get_num_threads() + end if + +#else + nthreads = 1 +#endif + +end function xomp_get_num_threads +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_xomp/xomp_set_num_threads +!! NAME +!! xomp_set_num_threads +!! +!! FUNCTION +!! Specifies the number of threads used by default in subsequent parallel sections, +!! if those do not specify a num_threads clause. The argument of xomp_set_num_threads shall be a positive integer. +!! +!! INPUTS +!! nthreads = number of threads +!! +!! SIDE EFFECTS +!! See description. +!! +!! SOURCE + +subroutine xomp_set_num_threads(nthreads) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: nthreads + +! ************************************************************************* + +#ifdef HAVE_OPENMP + call omp_set_num_threads(nthreads) +#else + if (.FALSE.) write(std_out,*) nthreads +#endif + +end subroutine xomp_set_num_threads +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_xomp/xomp_in_parallel +!! NAME +!! xomp_in_parallel +!! +!! FUNCTION +!! This function returns true if are currently running in parallel, false otherwise +!! +!! SOURCE + +function xomp_in_parallel() result(ans) + +!Arguments------------------------- + logical :: ans + +! ************************************************************************* + +#ifdef HAVE_OPENMP + ans = omp_in_parallel() +#else + ans = .FALSE. +#endif + +end function xomp_in_parallel +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_xomp/xomp_get_num_cores_node +!! NAME +!! xomp_get_num_cores_node +!! +!! FUNCTION +!! Wrapper for omp_get_num_procs +!! +!! OUTPUT +!! Return the maximum number of cores in one shared memory system +!! Return 0 if OMP is disabled. +!! +!! SOURCE + +function xomp_get_num_cores_node() + +!Arguments ------------------------------------ +!scalars + integer :: xomp_get_num_cores_node + +! ************************************************************************* + +#ifdef HAVE_OPENMP + xomp_get_num_cores_node=omp_get_thread_limit() + !We test if thread_limit has been set (if not it should be a large value) + ! In 2012, 4096 cores is the biggest known shared memory system + if(xomp_get_num_cores_node > 4096) then + !so if not set, we used system 'num procs' values which should be the default case + xomp_get_num_cores_node=omp_get_num_procs() + end if +#else + xomp_get_num_cores_node=0 +#endif + +end function xomp_get_num_cores_node +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_xomp/xomp_set_default_device +!! NAME +!! xomp_set_default_device +!! +!! FUNCTION +!! Wrapper for omp_set_default_device +!! +!! INPUTS +!! device_id = id of offload device (ie: GPU, accelerator) to be used +!! +!! SOURCE + +subroutine xomp_set_default_device(device_id) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: device_id + +! ************************************************************************* + +#ifdef HAVE_OPENMP_OFFLOAD + call omp_set_default_device(device_id) +#else + ABI_UNUSED(device_id) +#endif + +end subroutine xomp_set_default_device +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_xomp/xomp_get_default_device +!! NAME +!! xomp_get_default_device +!! +!! FUNCTION +!! Wrapper for omp_get_default_device +!! +!! OUTPUT +!! (integer) id of default offload device (ie: GPU, accelerator) on which +!! "target" regions will be run on. +!! -1 if no offload device is used. +!! +!! SOURCE + +function xomp_get_default_device() + +!Arguments ------------------------------------ +!scalars + integer :: xomp_get_default_device + +! ************************************************************************* + +#ifdef HAVE_OPENMP_OFFLOAD + xomp_get_default_device = omp_get_default_device() +#else + xomp_get_default_device = -1 +#endif + +end function xomp_get_default_device +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_xomp/xomp_get_initial_device +!! NAME +!! xomp_get_initial_device +!! +!! FUNCTION +!! Wrapper for omp_get_initial_device +!! +!! OUTPUT +!! (integer) id of OpenMP device which targets host rather than +!! acclerator devices. +!! +!! SOURCE + +function xomp_get_initial_device() + +!Arguments ------------------------------------ +!scalars + integer :: xomp_get_initial_device + +! ************************************************************************* + +#ifdef HAVE_OPENMP_OFFLOAD + xomp_get_initial_device = omp_get_initial_device() +#else + xomp_get_initial_device = -1 +#endif + +end function xomp_get_initial_device +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_xomp/xomp_get_num_devices +!! NAME +!! xomp_get_num_devices +!! +!! FUNCTION +!! Wrapper for omp_get_num_devices +!! +!! OUTPUT +!! (integer) id of OpenMP device which targets host rather than +!! acclerator devices. +!! +!! SOURCE + +function xomp_get_num_devices() + +!Arguments ------------------------------------ +!scalars + integer :: xomp_get_num_devices + +! ************************************************************************* + +#ifdef HAVE_OPENMP_OFFLOAD + xomp_get_num_devices = omp_get_num_devices() +#else + xomp_get_num_devices = 0 +#endif + +end function xomp_get_num_devices +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_xomp/xomp_is_initial_device +!! NAME +!! xomp_is_initial_device +!! +!! FUNCTION +!! Wrapper for omp_is_initial_device +!! +!! OUTPUT +!! (integer) id of OpenMP device which targets host rather than +!! acclerator devices. +!! +!! SOURCE + +function xomp_is_initial_device() + +!Arguments ------------------------------------ +!scalars + logical :: xomp_is_initial_device + +! ************************************************************************* + +#ifdef HAVE_OPENMP_OFFLOAD + xomp_is_initial_device = omp_is_initial_device() +#else + xomp_is_initial_device = .true. +#endif + +end function xomp_is_initial_device +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_xomp/xomp_target_is_present +!! NAME +!! xomp_target_is_present +!! +!! FUNCTION +!! Wrapper for omp_target_is_present +!! +!! INPUTS +!! ptr = C pointer, likely matching a Fortran array wrapped in c_loc +!! +!! OUTPUT +!! (logical) .true. if given ptr has an associate pointer in device +!! memory, .false. otherwise +!! +!! SOURCE + +function xomp_target_is_present(ptr) + +!Arguments ------------------------------------ + type(c_ptr),intent(in) :: ptr + + logical :: xomp_target_is_present + integer(kind=c_int) :: device_id, rc + +! ************************************************************************* + +#ifdef HAVE_OPENMP_OFFLOAD + device_id = xomp_get_default_device() + rc = omp_target_is_present(ptr, device_id) + xomp_target_is_present = .true. + if(rc==0) xomp_target_is_present = .false. +#else + xomp_target_is_present = .false. + ABI_UNUSED(device_id) + ABI_UNUSED(rc) + ABI_UNUSED_A(ptr) +#endif + +end function xomp_target_is_present +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_xomp/xomp_get_mapped_ptr +!! NAME +!! xomp_get_mapped_ptr +!! +!! FUNCTION +!! Wrapper for omp_get_mapped_ptr +!! +!! INPUTS +!! ptr = C pointer, likely matching a Fortran array wrapped in c_loc +!! +!! OUTPUT +!! (c_ptr) Pointer to device memory matching given input ptr +!! +!! SOURCE + +function xomp_get_mapped_ptr(ptr) result(gpu_ptr) + +!Arguments ------------------------------------ + type(c_ptr),intent(in) :: ptr + integer :: device_id, rc + type(c_ptr) :: gpu_ptr + +! ************************************************************************* + +#ifdef HAVE_OPENMP_OFFLOAD + device_id = xomp_get_default_device() + if(xomp_target_is_present(ptr)) then +#ifdef HAVE_OPENMP_GET_MAPPED_PTR + gpu_ptr = omp_get_mapped_ptr(ptr, device_id) +#else + gpu_ptr = c_null_ptr +#endif + else + gpu_ptr = c_null_ptr + end if +#else + gpu_ptr = c_null_ptr + ABI_UNUSED(device_id) + ABI_UNUSED(rc) + ABI_UNUSED_A(ptr) +#endif + +end function xomp_get_mapped_ptr +!!*** + +!---------------------------------------------------------------------- + +END MODULE m_xomp +!!*** diff --git a/GX-PAW/common/src/12_hide_mpi/m_xomp.o b/GX-PAW/common/src/12_hide_mpi/m_xomp.o new file mode 100644 index 00000000..d42f0d1e Binary files /dev/null and b/GX-PAW/common/src/12_hide_mpi/m_xomp.o differ diff --git a/GX-PAW/common/src/12_hide_mpi/xmpi_allgather.finc b/GX-PAW/common/src/12_hide_mpi/xmpi_allgather.finc new file mode 100644 index 00000000..46d0351b --- /dev/null +++ b/GX-PAW/common/src/12_hide_mpi/xmpi_allgather.finc @@ -0,0 +1,468 @@ +!{\src2tex{textfont=tt}} +!!****f* ABINIT/xmpi_allgather +!! NAME +!! xmpi_allgather +!! +!! FUNCTION +!! This module contains functions that calls MPI routine, +!! if we compile the code using the MPI CPP flags. +!! xmpi_allgather is the generic function. +!! +!! COPYRIGHT +!! Copyright (C) 2001-2024 ABINIT group (AR,XG) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~ABINIT/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! SOURCE + +!!*** + +!!****f* ABINIT/xmpi_allgather_int +!! NAME +!! xmpi_allgather_int +!! +!! FUNCTION +!! Gathers data from all tasks and distributes it to all. +!! Target: one-dimensional integer arrays. +!! +!! INPUTS +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! recvbuf= received elements +!! +!! PARENTS +!! +!! CHILDREN +!! mpi_allgather +!! +!! SOURCE + +subroutine xmpi_allgather_int(xval,recvbuf,comm,ier) + +!Arguments------------------------- + integer,intent(inout) :: xval + integer, DEV_CONTARRD intent(inout) :: recvbuf(:) + integer, intent(in) :: comm + integer,intent(out) :: ier + +! ************************************************************************* + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then +! allgather xval on all proc. in comm + call MPI_ALLGATHER([xval],1,MPI_INTEGER,recvbuf,1,MPI_INTEGER,comm,ier) + else if (comm == MPI_COMM_SELF) then + recvbuf(1)=xval + end if +#else + recvbuf(1)=xval +#endif +end subroutine xmpi_allgather_int +!!*** + + +!!****f* ABINIT/xmpi_allgather_char +!! NAME +!! xmpi_allgather_char +!! +!! FUNCTION +!! Gathers data from all tasks and distributes it to all. +!! Target: one-dimensional character(20) arrays. +!! +!! INPUTS +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! charval= buffer array +!! recvbuf= received elements +!! +!! PARENTS +!! +!! CHILDREN +!! mpi_allgather +!! +!! SOURCE + +subroutine xmpi_allgather_char(charval,recvbuf,comm,ier) + +!Arguments------------------------- + integer,intent(in) :: comm + integer,intent(out) :: ier + character(len=20),intent(inout) :: charval + character(len=20), DEV_CONTARRD intent(inout) :: recvbuf(:) + +!Local variables------------------- +#if defined HAVE_MPI + integer :: ii + character :: arr_charval(20) +#endif + +! ************************************************************************* + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then +! allgather xval on all proc. in comm + do ii=1,20;arr_charval(ii)=charval(ii:ii);enddo + call MPI_ALLGATHER(arr_charval,20,MPI_CHARACTER,recvbuf,20,MPI_CHARACTER,comm,ier) + else if (comm == MPI_COMM_SELF) then + recvbuf=charval + end if +#else + recvbuf=charval +#endif + +end subroutine xmpi_allgather_char +!!*** + +!!****f* ABINIT/xmpi_allgather_int1d_1b +!! NAME +!! xmpi_allgather_int1d_1b +!! +!! FUNCTION +!! Gathers data from all tasks and distributes it to all. +!! Target: one-dimensional integer arrays. +!! +!! INPUTS +!! xval= buffer array +!! nelem= number of elements +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! recvbuf= received elements +!! +!! PARENTS +!! +!! CHILDREN +!! mpi_allgather +!! +!! SOURCE + +subroutine xmpi_allgather_int1d_1b(xval, nelem, recvbuf, comm, ier) + +!Arguments------------------------- + integer(c_int8_t), DEV_CONTARRD intent(in) :: xval(:) + integer(c_int8_t), DEV_CONTARRD intent(inout) :: recvbuf(:) + integer ,intent(in) :: nelem,comm + integer ,intent(out) :: ier + +! ************************************************************************* + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then +! allgather xval on all proc. in comm + call MPI_ALLGATHER(xval,nelem,MPI_INTEGER1,recvbuf,nelem,MPI_INTEGER1,comm,ier) + else if (comm == MPI_COMM_SELF) then + recvbuf(1:nelem)=xval(1:nelem) + end if +#else + recvbuf(1:nelem)=xval(1:nelem) +#endif +end subroutine xmpi_allgather_int1d_1b +!!*** + +!!****f* ABINIT/xmpi_allgather_int1d +!! NAME +!! xmpi_allgather_int1d +!! +!! FUNCTION +!! Gathers data from all tasks and distributes it to all. +!! Target: one-dimensional integer arrays. +!! +!! INPUTS +!! xval= buffer array +!! nelem= number of elements +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! recvbuf= received elements +!! +!! PARENTS +!! +!! CHILDREN +!! mpi_allgather +!! +!! SOURCE + +subroutine xmpi_allgather_int1d(xval,nelem,recvbuf,comm,ier) + +!Arguments------------------------- + integer, DEV_CONTARRD intent(in) :: xval(:) + integer, DEV_CONTARRD intent(inout) :: recvbuf(:) + integer ,intent(in) :: nelem,comm + integer ,intent(out) :: ier + +! ************************************************************************* + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then +! allgather xval on all proc. in comm + call MPI_ALLGATHER(xval,nelem,MPI_INTEGER,recvbuf,nelem,MPI_INTEGER,comm,ier) + else if (comm == MPI_COMM_SELF) then + recvbuf(1:nelem)=xval(1:nelem) + end if +#else + recvbuf(1:nelem)=xval(1:nelem) +#endif +end subroutine xmpi_allgather_int1d +!!*** + +!!****f* ABINIT/xmpi_allgather_int2d +!! NAME +!! xmpi_allgather_int2d +!! +!! FUNCTION +!! Gathers data from all tasks and distributes it to all. +!! Target: two-dimensional integer arrays. +!! +!! INPUTS +!! xval= buffer array +!! nelem= number of elements +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! recvbuf= received elements +!! +!! PARENTS +!! +!! CHILDREN +!! mpi_allgather +!! +!! SOURCE + +subroutine xmpi_allgather_int2d(xval,nelem,recvbuf,comm,ier) + +!Arguments------------------------- + integer, DEV_CONTARRD intent(in) :: xval(:,:) + integer, DEV_CONTARRD intent(inout) :: recvbuf(:,:) + integer ,intent(in) :: nelem,comm + integer ,intent(out) :: ier + +! ************************************************************************* + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then +! allgather xval on all proc. in comm + call MPI_ALLGATHER(xval,nelem,MPI_INTEGER,recvbuf,nelem,MPI_INTEGER,comm,ier) + else if (comm == MPI_COMM_SELF) then + recvbuf(:,:)=xval(:,:) + end if +#else + recvbuf(:,:)=xval(:,:) +#endif +end subroutine xmpi_allgather_int2d +!!*** + + +!!****f* ABINIT/xmpi_allgather_dp1d +!! NAME +!! xmpi_allgather_dp1d +!! +!! FUNCTION +!! Gathers data from all tasks and distributes it to all. +!! Target: double precision one-dimensional arrays. +!! +!! INPUTS +!! xval= buffer array +!! nelem= number of elements +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! recvbuf= received elements +!! +!! PARENTS +!! +!! CHILDREN +!! mpi_allgather +!! +!! SOURCE + +subroutine xmpi_allgather_dp1d(xval,nelem,recvbuf,comm,ier) + +!Arguments------------------------- + real(dp), DEV_CONTARRD intent(in) :: xval(:) + real(dp), DEV_CONTARRD intent(inout) :: recvbuf(:) + integer ,intent(in) :: nelem,comm + integer ,intent(out) :: ier + +! ************************************************************************* + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then +! allgather xval on all proc. in comm + call MPI_ALLGATHER(xval,nelem,MPI_DOUBLE_PRECISION,recvbuf,nelem,MPI_DOUBLE_PRECISION,comm,ier) + else if (comm == MPI_COMM_SELF) then + recvbuf(1:nelem)=xval(1:nelem) + end if +#else + recvbuf(1:nelem)=xval(1:nelem) +#endif +end subroutine xmpi_allgather_dp1d +!!*** + +!!****f* ABINIT/xmpi_allgather_dp2d +!! NAME +!! xmpi_allgather_dp2d +!! +!! FUNCTION +!! Gathers data from all tasks and distributes it to all. +!! Target: double precision two-dimensional arrays. +!! +!! INPUTS +!! xval= buffer array +!! nelem= number of elements +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! recvbuf= received elements +!! +!! PARENTS +!! +!! CHILDREN +!! mpi_allgather +!! +!! SOURCE + +subroutine xmpi_allgather_dp2d(xval,nelem,recvbuf,comm,ier) + +!Arguments------------------------- + real(dp), DEV_CONTARRD intent(in) :: xval(:,:) + real(dp), DEV_CONTARRD intent(inout) :: recvbuf(:,:) + integer ,intent(in) :: nelem,comm + integer ,intent(out) :: ier + +! ************************************************************************* + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then +! allgather xval on all proc. in comm + call MPI_ALLGATHER(xval,nelem,MPI_DOUBLE_PRECISION,recvbuf,nelem,MPI_DOUBLE_PRECISION,comm,ier) + else if (comm == MPI_COMM_SELF) then + recvbuf(:,:)=xval(:,:) + end if +#else + recvbuf(:,:)=xval(:,:) +#endif +end subroutine xmpi_allgather_dp2d +!!*** + +!!****f* ABINIT/xmpi_allgather_dp3d +!! NAME +!! xmpi_allgather_dp3d +!! +!! FUNCTION +!! Gathers data from all tasks and distributes it to all. +!! Target: double precision three-dimensional arrays. +!! +!! INPUTS +!! xval= buffer array +!! nelem= number of elements +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! recvbuf= received elements +!! +!! PARENTS +!! +!! CHILDREN +!! mpi_allgather +!! +!! SOURCE + +subroutine xmpi_allgather_dp3d(xval,nelem,recvbuf,comm,ier) + +!Arguments------------------------- + real(dp), DEV_CONTARRD intent(in) :: xval(:,:,:) + real(dp), DEV_CONTARRD intent(inout) :: recvbuf(:,:,:) + integer ,intent(in) :: nelem,comm + integer ,intent(out) :: ier + +! ************************************************************************* + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then +! allgather xval on all proc. in comm + call MPI_ALLGATHER(xval,nelem,MPI_DOUBLE_PRECISION,recvbuf,nelem,MPI_DOUBLE_PRECISION,comm,ier) + else if (comm == MPI_COMM_SELF) then + recvbuf(:,:,:)=xval(:,:,:) + end if +#else + recvbuf(:,:,:)=xval(:,:,:) +#endif +end subroutine xmpi_allgather_dp3d +!!*** + +!!****f* ABINIT/xmpi_allgather_dp4d +!! NAME +!! xmpi_allgather_dp4d +!! +!! FUNCTION +!! Gathers data from all tasks and distributes it to all. +!! Target: double precision four-dimensional arrays. +!! +!! INPUTS +!! xval= buffer array +!! nelem= number of elements +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! recvbuf= received elements +!! +!! PARENTS +!! +!! CHILDREN +!! mpi_allgather +!! +!! SOURCE + +subroutine xmpi_allgather_dp4d(xval,nelem,recvbuf,comm,ier) + +!Arguments------------------------- + real(dp), DEV_CONTARRD intent(in) :: xval(:,:,:,:) + real(dp), DEV_CONTARRD intent(inout) :: recvbuf(:,:,:,:) + integer ,intent(in) :: nelem,comm + integer ,intent(out) :: ier + +! ************************************************************************* + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then +! allgather xval on all proc. in comm + call MPI_ALLGATHER(xval,nelem,MPI_DOUBLE_PRECISION,recvbuf,nelem,MPI_DOUBLE_PRECISION,comm,ier) + else if (comm == MPI_COMM_SELF) then + recvbuf(:,:,:,:)=xval(:,:,:,:) + end if +#else + recvbuf(:,:,:,:)=xval(:,:,:,:) +#endif +end subroutine xmpi_allgather_dp4d +!!*** diff --git a/GX-PAW/common/src/12_hide_mpi/xmpi_allgatherv.finc b/GX-PAW/common/src/12_hide_mpi/xmpi_allgatherv.finc new file mode 100644 index 00000000..e42bc113 --- /dev/null +++ b/GX-PAW/common/src/12_hide_mpi/xmpi_allgatherv.finc @@ -0,0 +1,955 @@ +!{\src2tex{textfont=tt}} +!!****f* ABINIT/xmpi_allgatherv_int2d +!! NAME +!! xmpi_allgatherv_int2d +!! +!! FUNCTION +!! This module contains functions that calls MPI routine, +!! if we compile the code using the MPI CPP flags. +!! xmpi_allgatherv is the generic function. +!! +!! COPYRIGHT +!! Copyright (C) 2001-2024 ABINIT group (AR,XG) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~ABINIT/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! PARENTS +!! +!! CHILDREN +!! xmpi_allgatherv +!! +!! SOURCE + +subroutine xmpi_allgatherv_int2d(xval,nelem,recvbuf,recvcounts,displs,comm,ier) + +!Arguments------------------------- + integer, DEV_CONTARRD intent(in) :: xval(:,:) + integer, DEV_CONTARRD intent(inout) :: recvbuf(:,:) + integer, DEV_CONTARRD intent(in) :: recvcounts(:),displs(:) + integer,intent(in) :: nelem,comm + integer,intent(out) :: ier + +!Local variables-------------- + integer :: cc,dd,sz1 + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_ALLGATHERV(xval,nelem,MPI_INTEGER,recvbuf,recvcounts,displs,& +& MPI_INTEGER,comm,ier) + else if (comm == MPI_COMM_SELF) then +#endif + sz1=size(xval,1) + dd=0;if (size(displs)>0) dd=displs(1)/sz1 + cc=size(xval,2);if (size(recvcounts)>0) cc=recvcounts(1)/sz1 + recvbuf(:,dd+1:dd+cc)=xval(:,1:cc) +#if defined HAVE_MPI + end if +#endif +end subroutine xmpi_allgatherv_int2d +!!*** + +!!****f* ABINIT/xmpi_allgatherv_int +!! NAME +!! xmpi_allgatherv_int +!! +!! FUNCTION +!! Gathers data from all tasks and delivers it to all. +!! Target: one-dimensional integer arrays. +!! +!! INPUTS +!! xval= buffer array +!! recvcounts= number of received elements +!! displs= relative offsets for incoming data +!! nelem= number of elements +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! recvbuf= received buffer +!! +!! PARENTS +!! +!! CHILDREN +!! xmpi_allgatherv +!! +!! SOURCE + +subroutine xmpi_allgatherv_int(xval,nelem,recvbuf,recvcounts,displs,comm,ier) + +!Arguments------------------------- + integer, DEV_CONTARRD intent(in) :: xval(:) + integer, DEV_CONTARRD intent(inout) :: recvbuf(:) + integer, DEV_CONTARRD intent(in) :: recvcounts(:),displs(:) + integer,intent(in) :: nelem,comm + integer,intent(out) :: ier + +!Local variables------------------- + integer :: cc,dd + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_ALLGATHERV(xval,nelem,MPI_INTEGER,recvbuf,recvcounts,displs,& +& MPI_INTEGER,comm,ier) + else if (comm == MPI_COMM_SELF) then +#endif + dd=0;if (size(displs)>0) dd=displs(1) + cc=size(xval);if (size(recvcounts)>0) cc=recvcounts(1) + recvbuf(dd+1:dd+cc)=xval(1:cc) +#if defined HAVE_MPI + end if +#endif +end subroutine xmpi_allgatherv_int +!!*** + +!!****f* ABINIT/xmpi_allgatherv_int1_dp1 +!! NAME +!! xmpi_allgatherv_int1_dp1 +!! +!! FUNCTION +!! Gathers data from all tasks and delivers it to all. +!! Target : one-dimensional integer arrray and one-dimensionnal dp array +!! +!! INPUTS +!! buf_int=buffer integer array that is going to be gathered +!! buf_int_size=size of buf_int array +!! buf_dp=buffer dp array that is going to be gathered +!! buf_dp_size=size of buf_dp array +!! comm=MPI communicator +!! +!! OUTPUT +!! buf_int_all=buffer integer array gathered +!! buf_int_size_all=size of buffer integer array gathered +!! buf_dp_all=buffer dp array gathered +!! buf_dp_size_all=size of buffer dp array gathered +!! ier=exit status, a non-zero value meaning there is an error +!! +!! PARENTS +!! +!! CHILDREN +!! xmpi_allgatherv +!! +!! SOURCE + +subroutine xmpi_allgatherv_int1_dp1(buf_int,buf_int_size,buf_dp,buf_dp_size,& +& buf_int_all,buf_int_size_all,buf_dp_all,buf_dp_size_all,comm,ier) + +!Arguments------------------------- +!scalars + integer,intent(in) :: buf_dp_size,buf_int_size,comm + integer,intent(out) :: buf_dp_size_all,buf_int_size_all,ier +!arrays + integer, intent(in) :: buf_int(:) + integer,allocatable,target,intent(out) :: buf_int_all(:) + real(dp),intent(in) :: buf_dp(:) + real(dp),allocatable,target,intent(out) :: buf_dp_all(:) + +!Local variables-------------- +!scalars + integer :: buf_pack_size,ierr,ii,iproc,istart_dp,istart_int,lg,lg1,lg2,lg_dp,lg_int + integer :: nproc,position,totalbufcount + logical,parameter :: use_pack=.false. +!arrays + integer :: buf_size(2),pos(3) + integer ,allocatable :: buf_int_size1(:),buf_dp_size1(:) + integer,allocatable :: count_dp(:),count_int(:),count_size(:),counts(:) + integer,allocatable :: disp_dp(:),disp_int(:),displ(:),displ_dp(:),displ_int(:) + integer,allocatable :: pos_all(:) + integer,pointer :: outbuf_int(:) + real(dp),pointer:: outbuf_dp(:) + character,allocatable :: buf_pack(:),buf_pack_tot(:) + +! ************************************************************************* + + ier=0 + +#if defined HAVE_MPI + if (comm/=MPI_COMM_SELF.and.comm/=MPI_COMM_NULL) then + + nproc=xmpi_comm_size(comm) + +!First version: using 2 allgather (one for ints, another for reals) +!------------------------------------------------------------------ + if (.not.use_pack) then + +! Prepare communications + ABI_MALLOC(count_int,(nproc)) + ABI_MALLOC(disp_int,(nproc)) + ABI_MALLOC(count_dp,(nproc)) + ABI_MALLOC(disp_dp,(nproc)) + ABI_MALLOC(count_size,(2*nproc)) + buf_size(1)=buf_int_size; buf_size(2)=buf_dp_size + call xmpi_allgather(buf_size,2,count_size,comm,ier) + do iproc=1,nproc + count_int(iproc)=count_size(2*iproc-1) + count_dp(iproc)=count_size(2*iproc) + end do + disp_int(1)=0;disp_dp(1)=0 + do ii=2,nproc + disp_int(ii)=disp_int(ii-1)+count_int(ii-1) + disp_dp (ii)=disp_dp (ii-1)+count_dp (ii-1) + end do + buf_int_size_all=sum(count_int) + buf_dp_size_all =sum(count_dp) + + ABI_STAT_MALLOC(buf_int_all,(buf_int_size_all), ier) + if (ier/=0) call xmpi_abort(msg='error allocating buf_int_all in xmpi_allgatherv') + ABI_STAT_MALLOC(buf_dp_all ,(buf_dp_size_all), ierr) + if (ier/=0) call xmpi_abort(msg='error allocating buf_dp_all in xmpi_allgatherv') + +! Communicate (one call for integers, one call for reals) + call xmpi_allgatherv(buf_int,buf_int_size,buf_int_all,count_int,disp_int,comm,ierr) + call xmpi_allgatherv(buf_dp,buf_dp_size,buf_dp_all,count_dp,disp_dp,comm,ierr) + +! Release the memory + ABI_FREE(count_int) + ABI_FREE(disp_int) + ABI_FREE(count_dp) + ABI_FREE(disp_dp) + ABI_FREE(count_size) + +!2nd version: using 1 allgather (with MPI_PACK) +!----------------------------------------------------------------- + else + +! Compute size of message + call MPI_PACK_SIZE(buf_int_size,MPI_INTEGER,comm,lg1,ier) + call MPI_PACK_SIZE(buf_dp_size,MPI_DOUBLE_PRECISION,comm,lg2,ier) + lg=lg1+lg2 + +! Pack data to be sent + position=0 ; buf_pack_size=lg1+lg2 + ABI_MALLOC(buf_pack,(buf_pack_size)) + call MPI_PACK(buf_int,buf_int_size,MPI_INTEGER,buf_pack,buf_pack_size,position,comm,ier) + call MPI_PACK(buf_dp,buf_dp_size,MPI_DOUBLE_PRECISION,buf_pack,buf_pack_size,position,comm,ier) + +! Gather size of all packed messages + ABI_MALLOC(pos_all,(nproc*3)) + ABI_MALLOC(counts,(nproc)) + ABI_MALLOC(buf_int_size1,(nproc)) + ABI_MALLOC(buf_dp_size1,(nproc)) + ABI_MALLOC(displ,(nproc)) + ABI_MALLOC(displ_int,(nproc)) + ABI_MALLOC(displ_dp,(nproc)) + pos(1)=position;pos(2)=buf_int_size;pos(3)=buf_dp_size + call MPI_ALLGATHER(pos,3,MPI_INTEGER,pos_all,3,MPI_INTEGER,comm,ier) + ii=1 + do iproc=1,nproc + counts(iproc)=pos_all(ii);ii=ii+1 + buf_int_size1(iproc)=pos_all(ii);ii=ii+1 + buf_dp_size1(iproc)=pos_all(ii);ii=ii+1 + end do + + displ(1)=0 ; displ_int(1)=0 ; displ_dp(1)=0 + do iproc=2,nproc + displ(iproc)=displ(iproc-1)+counts(iproc-1) + displ_int(iproc)=displ_int(iproc-1)+buf_int_size1(iproc-1) + displ_dp(iproc)=displ_dp(iproc-1)+buf_dp_size1(iproc-1) + end do + + totalbufcount=displ(nproc)+counts(nproc) + ABI_STAT_MALLOC(buf_pack_tot,(totalbufcount), ier) + if (ier/= 0) call xmpi_abort(msg='error allocating totalbufcount in xmpi_allgatherv') + buf_int_size_all=sum(buf_int_size1) + buf_dp_size_all=sum(buf_dp_size1) + ABI_STAT_MALLOC(buf_int_all,(buf_int_size_all), ier) + if (ier/=0) call xmpi_abort(msg='error allocating buf_int_all in xmpi_allgatherv') + ABI_STAT_MALLOC(buf_dp_all,(buf_dp_size_all), ier) + if (ier/=0) call xmpi_abort(msg='error allocating buf_dp_size_all in xmpi_allgatherv') + +! Gather all packed messages + call MPI_ALLGATHERV(buf_pack,position,MPI_PACKED,buf_pack_tot,counts,displ,MPI_PACKED,comm,ier) + position=0 + do iproc=1,nproc + lg_int=buf_int_size1(iproc); lg_dp=buf_dp_size1(iproc) + istart_int=displ_int(iproc); istart_dp=displ_dp(iproc) + outbuf_int=>buf_int_all(istart_int+1:istart_int+lg_int) + call MPI_UNPACK(buf_pack_tot,totalbufcount,position, outbuf_int,& +& lg_int,MPI_INTEGER,comm,ier) + outbuf_dp=>buf_dp_all(istart_dp+1:istart_dp+lg_dp) + call MPI_UNPACK(buf_pack_tot,totalbufcount,position,outbuf_dp,& +& lg_dp,MPI_DOUBLE_PRECISION,comm,ier) + end do + +! Release the memory + ABI_FREE(pos_all) + ABI_FREE(counts) + ABI_FREE(buf_int_size1) + ABI_FREE(buf_dp_size1) + ABI_FREE(displ) + ABI_FREE(displ_int) + ABI_FREE(displ_dp) + ABI_FREE(buf_pack_tot) + ABI_FREE(buf_pack) + + end if + else if (comm==MPI_COMM_SELF) then +#endif + +!Sequential version + ABI_STAT_MALLOC(buf_int_all,(buf_int_size), ier) + if (ier/=0) call xmpi_abort(msg='error allocating buf_int_all in xmpi_allgatherv') + ABI_STAT_MALLOC(buf_dp_all,(buf_dp_size), ier) + if (ier/=0) call xmpi_abort(msg='error allocating buf_dp_all in xmpi_allgatherv') + + buf_int_all(:)=buf_int(:) + buf_dp_all(:)=buf_dp(:) + buf_int_size_all=buf_int_size + buf_dp_size_all=buf_dp_size + +#if defined HAVE_MPI + end if +#endif + +end subroutine xmpi_allgatherv_int1_dp1 +!!*** + +!!****f* ABINIT/xmpi_allgatherv_dp +!! NAME +!! xmpi_allgatherv_dp +!! +!! FUNCTION +!! Gathers data from all tasks and delivers it to all. +!! Target: one-dimensional double precision arrays. +!! +!! INPUTS +!! xval= buffer array +!! recvcounts= number of received elements +!! displs= relative offsets for incoming data +!! nelem= number of elements +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! recvbuf= received buffer +!! +!! PARENTS +!! +!! CHILDREN +!! xmpi_allgatherv +!! +!! SOURCE + +subroutine xmpi_allgatherv_dp(xval,nelem,recvbuf,recvcounts,displs,comm,ier) + +!Arguments------------------------- + real(dp), DEV_CONTARRD intent(in) :: xval(:) + real(dp), DEV_CONTARRD intent(inout) :: recvbuf(:) + integer,intent(in) :: recvcounts(:),displs(:) + integer,intent(in) :: nelem,comm + integer,intent(out) :: ier + +!Local variables-------------- + integer :: cc,dd + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_ALLGATHERV(xval,nelem,MPI_DOUBLE_PRECISION,recvbuf,recvcounts,displs,& +& MPI_DOUBLE_PRECISION,comm,ier) + else if (comm == MPI_COMM_SELF) then +#endif + dd=0;if (size(displs)>0) dd=displs(1) + cc=size(xval);if (size(recvcounts)>0) cc=recvcounts(1) + recvbuf(dd+1:dd+cc)=xval(1:cc) +#if defined HAVE_MPI + end if +#endif +end subroutine xmpi_allgatherv_dp +!!*** + +!!****f* ABINIT/xmpi_allgatherv_dp2d +!! NAME +!! xmpi_allgatherv_dp2d +!! +!! FUNCTION +!! Gathers data from all tasks and delivers it to all. +!! Target: double precision two-dimensional arrays. +!! +!! INPUTS +!! xval= buffer array +!! recvcounts= number of received elements +!! displs= relative offsets for incoming data +!! nelem= number of elements +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! recvbuf= received buffer +!! +!! PARENTS +!! +!! CHILDREN +!! xmpi_allgatherv +!! +!! SOURCE + +subroutine xmpi_allgatherv_dp2d(xval,nelem,recvbuf,recvcounts,displs,comm,ier) + +!Arguments------------------------- + real(dp), DEV_CONTARRD intent(in) :: xval(:,:) + real(dp), DEV_CONTARRD intent(inout) :: recvbuf(:,:) + integer, DEV_CONTARRD intent(in) :: recvcounts(:),displs(:) + integer,intent(in) :: nelem,comm + integer,intent(out) :: ier + +!Local variables-------------- + integer :: cc,dd,sz1 + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_ALLGATHERV(xval,nelem,MPI_DOUBLE_PRECISION,recvbuf,recvcounts,displs,& +& MPI_DOUBLE_PRECISION,comm,ier) + else if (comm == MPI_COMM_SELF) then +#endif + sz1=size(xval,1) + dd=0;if (size(displs)>0) dd=displs(1)/sz1 + cc=size(xval,2);if (size(recvcounts)>0) cc=recvcounts(1)/sz1 + recvbuf(:,dd+1:dd+cc)=xval(:,1:cc) +#if defined HAVE_MPI + end if +#endif +end subroutine xmpi_allgatherv_dp2d +!!*** + +!!****f* ABINIT/xmpi_allgatherv_dp3d +!! NAME +!! xmpi_allgatherv_dp3d +!! +!! FUNCTION +!! Gathers data from all tasks and delivers it to all. +!! Target: double precision three-dimensional arrays. +!! +!! INPUTS +!! xval= buffer array +!! recvcounts= number of received elements +!! displs= relative offsets for incoming data +!! nelem= number of elements +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! recvbuf= received buffer +!! +!! PARENTS +!! +!! CHILDREN +!! xmpi_allgatherv +!! +!! SOURCE + +subroutine xmpi_allgatherv_dp3d(xval,nelem,recvbuf,recvcounts,displs,comm,ier) + +!Arguments------------------------- + real(dp), DEV_CONTARRD intent(in) :: xval(:,:,:) + real(dp), DEV_CONTARRD intent(inout) :: recvbuf(:,:,:) + integer, DEV_CONTARRD intent(in) :: recvcounts(:),displs(:) + integer,intent(in) :: nelem,comm + integer,intent(out) :: ier + +!Local variables-------------- + integer :: cc,dd,sz12 + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_ALLGATHERV(xval,nelem,MPI_DOUBLE_PRECISION,recvbuf,recvcounts,displs,& +& MPI_DOUBLE_PRECISION,comm,ier) + else if (comm == MPI_COMM_SELF) then +#endif + sz12=size(xval,1)*size(xval,2) + dd=0;if (size(displs)>0) dd=displs(1)/sz12 + cc=size(xval,3);if (size(recvcounts)>0) cc=recvcounts(1)/sz12 + recvbuf(:,:,dd+1:dd+cc)=xval(:,:,1:cc) +#if defined HAVE_MPI + end if +#endif +end subroutine xmpi_allgatherv_dp3d +!!*** + +!!****f* ABINIT/xmpi_allgatherv_dp4d +!! NAME +!! xmpi_allgatherv_dp4d +!! +!! FUNCTION +!! Gathers data from all tasks and delivers it to all. +!! Target: double precision four-dimensional arrays. +!! +!! INPUTS +!! xval= buffer array +!! recvcounts= number of received elements +!! displs= relative offsets for incoming data +!! nelem= number of elements +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! recvbuf= received buffer +!! +!! PARENTS +!! +!! CHILDREN +!! xmpi_allgatherv +!! +!! SOURCE + +subroutine xmpi_allgatherv_dp4d(xval,nelem,recvbuf,recvcounts,displs,comm,ier) + +!Arguments------------------------- + real(dp), DEV_CONTARRD intent(in) :: xval(:,:,:,:) + real(dp), DEV_CONTARRD intent(inout) :: recvbuf(:,:,:,:) + integer, DEV_CONTARRD intent(in) :: recvcounts(:),displs(:) + integer,intent(in) :: nelem,comm + integer,intent(out) :: ier + +!Local variables------------------- + integer :: cc,dd,sz123 + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_ALLGATHERV(xval,nelem,MPI_DOUBLE_PRECISION,recvbuf,recvcounts,displs,& +& MPI_DOUBLE_PRECISION,comm,ier) + else if (comm == MPI_COMM_SELF) then +#endif + sz123=size(xval,1)*size(xval,2)*size(xval,3) + dd=0;if (size(displs)>0) dd=displs(1)/sz123 + cc=size(xval,4);if (size(recvcounts)>0) cc=recvcounts(1)/sz123 + recvbuf(:,:,:,dd+1:dd+cc)=xval(:,:,:,1:cc) +#if defined HAVE_MPI + end if +#endif +end subroutine xmpi_allgatherv_dp4d +!!*** + +!!****f* ABINIT/xmpi_allgatherv_dp5d +!! NAME +!! xmpi_allgatherv_dp5d +!! +!! FUNCTION +!! Gathers data from all tasks and delivers it to all. +!! Target: double precision six-dimensional arrays. +!! +!! INPUTS +!! xval= buffer array +!! recvcounts= number of received elements +!! displs= relative offsets for incoming data +!! nelem= number of elements +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! recvbuf= received buffer +!! +!! PARENTS +!! +!! CHILDREN +!! xmpi_allgatherv +!! +!! SOURCE + +subroutine xmpi_allgatherv_dp5d(xval,nelem,recvbuf,recvcounts,displs,comm,ier) + +!Arguments------------------------- + real(dp), DEV_CONTARRD intent(in) :: xval(:,:,:,:,:) + real(dp), DEV_CONTARRD intent(inout) :: recvbuf(:,:,:,:,:) + integer, DEV_CONTARRD intent(in) :: recvcounts(:),displs(:) + integer,intent(in) :: nelem,comm + integer,intent(out) :: ier + +!Local variables------------------- + integer :: cc,dd,sz1234 + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_ALLGATHERV(xval,nelem,MPI_DOUBLE_PRECISION,recvbuf,recvcounts,displs,& +& MPI_DOUBLE_PRECISION,comm,ier) + else if (comm == MPI_COMM_SELF) then +#endif + sz1234=size(xval,1)*size(xval,2)*size(xval,3)*size(xval,4) + dd=0;if (size(displs)>0) dd=displs(1)/sz1234 + cc=size(xval,5);if (size(recvcounts)>0) cc=recvcounts(1)/sz1234 + recvbuf(:,:,:,:,dd+1:dd+cc)=xval(:,:,:,:,1:cc) +#if defined HAVE_MPI + end if +#endif +end subroutine xmpi_allgatherv_dp5d +!!*** + + +!!****f* ABINIT/xmpi_allgatherv_dp6d +!! NAME +!! xmpi_allgatherv_dp6d +!! +!! FUNCTION +!! Gathers data from all tasks and delivers it to all. +!! Target: double precision six-dimensional arrays. +!! +!! INPUTS +!! xval= buffer array +!! recvcounts= number of received elements +!! displs= relative offsets for incoming data +!! nelem= number of elements +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! recvbuf= received buffer +!! +!! PARENTS +!! +!! CHILDREN +!! xmpi_allgatherv +!! +!! SOURCE + +subroutine xmpi_allgatherv_dp6d(xval,nelem,recvbuf,recvcounts,displs,comm,ier) + +!Arguments------------------------- + real(dp), DEV_CONTARRD intent(in) :: xval(:,:,:,:,:,:) + real(dp), DEV_CONTARRD intent(inout) :: recvbuf(:,:,:,:,:,:) + integer, DEV_CONTARRD intent(in) :: recvcounts(:),displs(:) + integer,intent(in) :: nelem,comm + integer,intent(out) :: ier + +!Local variables------------------- + integer :: cc,dd,sz12345 + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_ALLGATHERV(xval,nelem,MPI_DOUBLE_PRECISION,recvbuf,recvcounts,displs,& +& MPI_DOUBLE_PRECISION,comm,ier) + else if (comm == MPI_COMM_SELF) then +#endif + sz12345=size(xval,1)*size(xval,2)*size(xval,3)*size(xval,4)*size(xval,5) + dd=0;if (size(displs)>0) dd=displs(1)/sz12345 + cc=size(xval,6);if (size(recvcounts)>0) cc=recvcounts(1)/sz12345 + recvbuf(:,:,:,:,:,dd+1:dd+cc)=xval(:,:,:,:,:,1:cc) +#if defined HAVE_MPI + end if +#endif +end subroutine xmpi_allgatherv_dp6d +!!*** + +!!****f* ABINIT/xmpi_allgatherv_coeff2d +!! NAME +!! xmpi_allgatherv_coeff2d +!! +!! FUNCTION +!! Gathers data from all tasks and delivers it to all. +!! Target: coeff2_type 1D-structure +!! +!! INPUTS +!! xval_in = coeff2d_type array structure +!! comm= MPI communicator +!! +!! OUTPUT +!! xval_out = coeff2d_type array structure +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! +!! PARENTS +!! +!! CHILDREN +!! xmpi_allgatherv +!! +!! SOURCE + +subroutine xmpi_allgatherv_coeff2d(xval_in,xval_out,comm,ierr) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: comm + integer,intent(out) :: ierr +!arrays + type(coeff2_type),intent(in) :: xval_in(:) + type(coeff2_type),intent(out) :: xval_out(:) + +!Local variables------------------------------- +!scalars + integer :: ii,n1,n2 +#if defined HAVE_MPI + integer :: buf_int_size,buf_int_size_all,buf_dp_size,buf_dp_size_all + integer :: i2,indx_int,indx_dp,nb,nb_out,nproc +#endif +!arrays +#if defined HAVE_MPI + integer, allocatable :: buf_int(:),buf_int_all(:) + integer, allocatable :: dimxval(:,:) + real(dp),allocatable :: buf_dp(:),buf_dp_all(:) +#endif + +! ************************************************************************* + + ierr=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_NULL) then + + nproc=xmpi_comm_size(comm) + nb = size(xval_in,1) + + if (comm==MPI_COMM_SELF.or.nproc==1) then + do ii=1,nb + n1=size(xval_in(ii)%value,1) + n2=size(xval_in(ii)%value,2) + if (allocated(xval_out(ii)%value)) then + ABI_FREE(xval_out(ii)%value) + end if + ABI_STAT_MALLOC(xval_out(ii)%value,(n1,n2), ierr) + if (ierr/= 0) call xmpi_abort(msg='error allocating xval_out%value in xmpi_allgatherv') + xval_out(ii)%value=xval_in(ii)%value + end do + return + end if + + buf_dp_size=0 + ABI_MALLOC(dimxval,(nb,2)) + do ii=1,nb + dimxval(ii,1)=size(xval_in(ii)%value,dim=1) + dimxval(ii,2)=size(xval_in(ii)%value,dim=2) + buf_dp_size=buf_dp_size+dimxval(ii,1)*dimxval(ii,2) + end do + + buf_int_size=2*nb; + ABI_STAT_MALLOC(buf_int,(buf_int_size), ierr) + if (ierr/= 0) call xmpi_abort(msg='error allocating buf_int in xmpi_allgatherv') + indx_int=1 + do ii=1,nb + buf_int(indx_int )=dimxval(ii,1) + buf_int(indx_int+1)=dimxval(ii,2) + indx_int=indx_int+2 + end do + + ABI_STAT_MALLOC(buf_dp,(buf_dp_size) ,ierr) + if (ierr/= 0) call xmpi_abort(msg='error allocating buf_dp_size in xmpi_allgatherv') + indx_dp=1 + do ii=1,nb + n1=dimxval(ii,1); n2=dimxval(ii,2) + do i2=1,n2 + buf_dp(indx_dp:indx_dp+n1-1)=xval_in(ii)%value(1:n1,i2) + indx_dp=indx_dp+n1 + end do + end do + + call xmpi_allgatherv(buf_int,buf_int_size,buf_dp,buf_dp_size,buf_int_all, & +& buf_int_size_all,buf_dp_all,buf_dp_size_all,comm,ierr) + + + nb_out=buf_int_size_all/2 + + indx_int=1;indx_dp=1 + do ii=1,nb_out + n1=buf_int_all(indx_int) + n2=buf_int_all(indx_int+1) + indx_int=indx_int+2 + if (allocated(xval_out(ii)%value)) then + ABI_FREE(xval_out(ii)%value) + end if + ABI_STAT_MALLOC(xval_out(ii)%value,(n1,n2), ierr) + if (ierr/= 0) call xmpi_abort(msg='error allocating xval_out%value in xmpi_allgatherv') + do i2=1,n2 + xval_out(ii)%value(1:n1,i2)=buf_dp_all(indx_dp:indx_dp+n1-1) + indx_dp=indx_dp+n1 + end do + end do + + + ABI_FREE(buf_dp_all) + ABI_FREE(buf_int_all) + ABI_FREE(buf_int) + ABI_FREE(buf_dp) + ABI_FREE(dimxval) + + end if + +#else + do ii=1,size(xval_in,1) + n1=size(xval_in(ii)%value,1) + n2=size(xval_in(ii)%value,2) + if (allocated(xval_out(ii)%value)) then + ABI_FREE(xval_out(ii)%value) + end if + ABI_STAT_MALLOC(xval_out(ii)%value,(n1,n2), ierr) + if (ierr/= 0) call xmpi_abort(msg='error allocating xval_out%value in xmpi_allgatherv') + xval_out(ii)%value=xval_in(ii)%value + end do +#endif + +end subroutine xmpi_allgatherv_coeff2d +!!*** + +!!****f* ABINIT/xmpi_allgatherv_coeff2d_indx +!! NAME +!! xmpi_allgatherv_coeff2d_indx +!! +!! FUNCTION +!! Gathers data from all tasks and delivers it to all. +!! Target: coeff2_type 1D-structure +!! use of an indirect index to sort data +!! +!! INPUTS +!! xval_in = coeff2d_type array structure +!! comm= MPI communicator +!! indx= gives the indexes of xval_in in xval_out. +!! xval_in(i) will be transfered in xval_out(indx(i)) +!! +!! OUTPUT +!! xval_out = coeff2d_type array structure +!! ierr= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! +!! PARENTS +!! +!! CHILDREN +!! xmpi_allgatherv +!! +!! SOURCE + +subroutine xmpi_allgatherv_coeff2d_indx(xval_in,xval_out,comm,indx,ierr) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: comm + integer,intent(out) :: ierr +!arrays + integer,intent(in) :: indx(:) + type(coeff2_type),intent(in) :: xval_in(:) + type(coeff2_type),intent(out) :: xval_out(:) + +!Local variables------------------------------- +!scalars + integer :: ii,ival,n1,n2,nb +#if defined HAVE_MPI + integer :: buf_int_size,buf_int_size_all,buf_dp_size,buf_dp_size_all + integer :: i2,indx_int,indx_dp,nb_out,nproc +#endif +!arrays +#if defined HAVE_MPI + integer, allocatable :: buf_int(:),buf_int_all(:) + integer, allocatable :: dimxval(:,:) + real(dp),allocatable :: buf_dp(:),buf_dp_all(:) +#endif + +! ************************************************************************* + + ierr=0 ; nb = size(xval_in,1) + +#if defined HAVE_MPI + if (comm == MPI_COMM_NULL) return + nproc=xmpi_comm_size(comm) + if (comm==MPI_COMM_SELF.or.nproc==1) then +#endif + do ii=1,nb + n1=size(xval_in(ii)%value,1) + n2=size(xval_in(ii)%value,2) + ival=indx(ii) + if (allocated(xval_out(ival)%value)) then + ABI_FREE(xval_out(ival)%value) + end if + ABI_STAT_MALLOC(xval_out(ival)%value,(n1,n2), ierr) + if (ierr/= 0) call xmpi_abort(msg='error allocating xval_out%value in xmpi_allgatherv') + xval_out(ii)%value=xval_in(ival)%value + end do + return + +#if defined HAVE_MPI + end if + + buf_dp_size=0 + ABI_STAT_MALLOC(dimxval,(nb,2), ierr) + if (ierr/= 0) call xmpi_abort(msg='error allocating dimxval in xmpi_allgatherv') + do ii=1,nb + dimxval(ii,1)=size(xval_in(ii)%value,dim=1) + dimxval(ii,2)=size(xval_in(ii)%value,dim=2) + buf_dp_size=buf_dp_size+dimxval(ii,1)*dimxval(ii,2) + end do + + buf_int_size=3*nb + ABI_STAT_MALLOC(buf_int,(buf_int_size), ierr) + if (ierr/= 0) call xmpi_abort(msg='error allocating buf_int in xmpi_allgatherv') + indx_int=1 + do ii=1,nb + buf_int(indx_int )=dimxval(ii,1) + buf_int(indx_int+1)=dimxval(ii,2) + buf_int(indx_int+2)=indx(ii) + indx_int=indx_int+3 + end do + + ABI_STAT_MALLOC(buf_dp,(buf_dp_size), ierr) + if (ierr/= 0) call xmpi_abort(msg='error allocating buf_dp in xmpi_allgatherv') + indx_dp=1 + do ii=1,nb + n1=dimxval(ii,1); n2=dimxval(ii,2) + do i2=1,n2 + buf_dp(indx_dp:indx_dp+n1-1)=xval_in(ii)%value(1:n1,i2) + indx_dp=indx_dp+n1 + end do + end do + + call xmpi_allgatherv(buf_int,buf_int_size,buf_dp,buf_dp_size,buf_int_all, & +& buf_int_size_all,buf_dp_all,buf_dp_size_all,comm,ierr) + + nb_out=buf_int_size_all/3 + indx_int=1;indx_dp=1 + do ii=1,nb_out + n1=buf_int_all(indx_int) + n2=buf_int_all(indx_int+1) + ival=buf_int_all(indx_int+2) + indx_int=indx_int+3 + if (allocated(xval_out(ival)%value)) then + ABI_FREE(xval_out(ival)%value) + end if + ABI_STAT_MALLOC(xval_out(ival)%value,(n1,n2), ierr) + if (ierr/= 0) call xmpi_abort(msg='error allocating xval_out%value in xmpi_allgatherv') + do i2=1,n2 + xval_out(ival)%value(1:n1,i2)=buf_dp_all(indx_dp:indx_dp+n1-1) + indx_dp=indx_dp+n1 + end do + end do + + ABI_FREE(buf_dp_all) + ABI_FREE(buf_int_all) + ABI_FREE(buf_int) + ABI_FREE(buf_dp) + ABI_FREE(dimxval) +#endif + +end subroutine xmpi_allgatherv_coeff2d_indx +!!*** diff --git a/GX-PAW/common/src/12_hide_mpi/xmpi_alltoall.finc b/GX-PAW/common/src/12_hide_mpi/xmpi_alltoall.finc new file mode 100644 index 00000000..2dc48ebd --- /dev/null +++ b/GX-PAW/common/src/12_hide_mpi/xmpi_alltoall.finc @@ -0,0 +1,132 @@ +!{\src2tex{textfont=tt}} +!!****f* ABINIT/xmpi_alltoall +!! NAME +!! xmpi_alltoall +!! +!! FUNCTION +!! This module contains functions that calls MPI routine, +!! if we compile the code using the MPI CPP flags. +!! xmpi_alltoall is the generic function. +!! +!! COPYRIGHT +!! Copyright (C) 2001-2024 ABINIT group (AR,XG) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~ABINIT/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! SOURCE + +!!*** + +!!****f* ABINIT/xmpi_alltoall_int +!! NAME +!! xmpi_alltoall_int +!! +!! FUNCTION +!! Sends data from all to all processes. +!! Target: integer mono dimensional arrays. +!! +!! SOURCE + +subroutine xmpi_alltoall_int(xval, sendsize, recvbuf, recvsize, comm, ier) + +!Arguments------------------------- + integer, DEV_CONTARRD intent(in) :: xval(:) + integer, DEV_CONTARRD intent(inout) :: recvbuf(:) + integer ,intent(in) :: sendsize, recvsize + integer ,intent(in) :: comm + integer ,intent(out) :: ier + +!Local variables------------------- + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then +! allgather xval on all proc. in comm + call MPI_ALLTOALL(xval, sendsize, MPI_INTEGER, recvbuf, & +& recvsize, MPI_INTEGER, comm, ier) + else if (comm == MPI_COMM_SELF) then + recvbuf=xval + end if +#else + recvbuf=xval +#endif + +end subroutine xmpi_alltoall_int +!!*** + +!!****f* ABINIT/xmpi_alltoall_dp2d +!! NAME +!! xmpi_alltoall_dp2d +!! +!! FUNCTION +!! Sends data from all to all processes. +!! Target: double precision two-dimensional arrays. +!! +!! SOURCE + +subroutine xmpi_alltoall_dp2d(xval, sendsize, recvbuf, recvsize, comm, ier) + +!Arguments------------------------- + real(dp), DEV_CONTARRD intent(in) :: xval(:,:) + real(dp), DEV_CONTARRD intent(inout) :: recvbuf(:,:) + integer ,intent(in) :: sendsize, recvsize + integer ,intent(in) :: comm + integer ,intent(out) :: ier + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then +! allgather xval on all proc. in comm + call MPI_ALLTOALL(xval, sendsize, MPI_DOUBLE_PRECISION, recvbuf, & +& recvsize, MPI_DOUBLE_PRECISION, comm, ier) + else if (comm == MPI_COMM_SELF) then + recvbuf=xval + end if +#else + recvbuf=xval +#endif + +end subroutine xmpi_alltoall_dp2d +!!*** + +!!****f* ABINIT/xmpi_alltoall_dp4d +!! NAME +!! xmpi_alltoall_dp4d +!! +!! FUNCTION +!! Sends data from all to all processes. +!! Target: double precision four-dimensional arrays. +!! +!! SOURCE + +subroutine xmpi_alltoall_dp4d(xval, sendsize, recvbuf, recvsize, comm, ier) + +!Arguments------------------------- + real(dp), DEV_CONTARRD intent(in) :: xval(:,:,:,:) + real(dp), DEV_CONTARRD intent(inout) :: recvbuf(:,:,:,:) + integer ,intent(in) :: sendsize, recvsize + integer ,intent(in) :: comm + integer ,intent(out) :: ier + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then +! allgather xval on all proc. in comm + call MPI_ALLTOALL(xval, sendsize, MPI_DOUBLE_PRECISION, recvbuf, & +& recvsize, MPI_DOUBLE_PRECISION, comm, ier) + else if (comm == MPI_COMM_SELF) then + recvbuf=xval + end if +#else + recvbuf=xval +#endif + +end subroutine xmpi_alltoall_dp4d +!!*** diff --git a/GX-PAW/common/src/12_hide_mpi/xmpi_alltoallv.finc b/GX-PAW/common/src/12_hide_mpi/xmpi_alltoallv.finc new file mode 100644 index 00000000..7fd4e5f2 --- /dev/null +++ b/GX-PAW/common/src/12_hide_mpi/xmpi_alltoallv.finc @@ -0,0 +1,211 @@ +!{\src2tex{textfont=tt}} +!!****f* ABINIT/xmpi_alltoallv_dp2d +!! NAME +!! xmpi_alltoallv_dp2d +!! +!! FUNCTION +!! This module contains functions calling the MPI routine ALLTOALLV +!! xmpi_alltoallv is the generic function. +!! +!! COPYRIGHT +!! Copyright (C) 2001-2024 ABINIT group (AR,XG) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~ABINIT/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! INPUTS +!! xval= buffer array +!! sendcnts= number of sent elements +!! sdispls= postions of values sent by the processor +!! rdispls= positions of values received by the processor +!! recvcnts= number of received elements +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! recvbuf= received buffer +!! +!! PARENTS +!! +!! CHILDREN +!! mpi_alltoallv +!! +!! SOURCE + +subroutine xmpi_alltoallv_dp2d(xval,sendcnts,sdispls,recvbuf,recvcnts,rdispls,comm,ier) + +!Arguments------------------------- + real(dp), DEV_CONTARRD intent(in) :: xval(:,:) + real(dp), DEV_CONTARRD intent(inout) :: recvbuf(:,:) + integer , DEV_CONTARRD intent(in) :: sendcnts(:),sdispls(:),rdispls(:),recvcnts(:) + integer ,intent(in) :: comm + integer ,intent(out) :: ier + +!Local variables------------------- + integer :: sc,sds,sdr,sz1 + integer :: i + +! ********************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then +! allgather xval on all proc. in comm + call MPI_ALLTOALLV(xval,sendcnts,sdispls,MPI_DOUBLE_PRECISION,recvbuf,& +& recvcnts,rdispls,MPI_DOUBLE_PRECISION,comm,ier) + else if (comm == MPI_COMM_SELF) then +#endif + sz1=size(xval,1) + sds=0;if (size(sdispls)>0) sds=sdispls(1)/sz1 + sdr=0;if (size(rdispls)>0) sdr=rdispls(1)/sz1 + sc=size(xval,2);if (size(sendcnts)>0) sc=sendcnts(1)/sz1 +!$OMP parallel do + do i=1,sc + recvbuf(:,sdr+i)=xval(:,sds+i) + end do + +#if defined HAVE_MPI + end if +#endif + +end subroutine xmpi_alltoallv_dp2d +!!*** + +!!****f* ABINIT/xmpi_alltoallv_int2d +!! NAME +!! xmpi_alltoallv_int2d +!! +!! FUNCTION +!! Sends data from all to all processes. +!! Target: two-dimensional integer arrays. +!! +!! SOURCE + +subroutine xmpi_alltoallv_int2d(xval,sendcnts,sdispls,recvbuf,recvcnts,rdispls,comm,ier) + +!Arguments------------------------- + integer, DEV_CONTARRD intent(in) :: xval(:,:) + integer, DEV_CONTARRD intent(inout) :: recvbuf(:,:) + integer, DEV_CONTARRD intent(in) :: sendcnts(:),sdispls(:),rdispls(:),recvcnts(:) + integer,intent(in) :: comm + integer,intent(out) :: ier + +!Local variables------------------- + integer :: sc,sds,sdr,sz1 + +! ********************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_ALLTOALLV(xval,sendcnts,sdispls,MPI_INTEGER,recvbuf,& +& recvcnts,rdispls,MPI_INTEGER,comm,ier) + else if (comm == MPI_COMM_SELF) then +#endif + sz1=size(xval,1) + sds=0;if (size(sdispls)>0) sds=sdispls(1)/sz1 + sdr=0;if (size(rdispls)>0) sdr=rdispls(1)/sz1 + sc=size(xval,2);if (size(sendcnts)>0) sc=sendcnts(1)/sz1 + recvbuf(:,sdr+1:sdr+sc)=xval(:,sds+1:sds+sc) +#if defined HAVE_MPI + end if +#endif + +end subroutine xmpi_alltoallv_int2d +!!*** + +!!****f* ABINIT/xmpi_alltoallv_dp1d +!! NAME +!! xmpi_alltoallv_dp1d +!! +!! FUNCTION +!! Sends data from all to all processes. +!! Target: double precision one-dimensional arrays. +!! +!! SOURCE + +subroutine xmpi_alltoallv_dp1d(xval,sendcnts,sdispls,recvbuf,recvcnts,rdispls,comm,ier) + +!Arguments------------------------- + real(dp), DEV_CONTARRD intent(in) :: xval(:) + real(dp), DEV_CONTARRD intent(inout) :: recvbuf(:) + integer, DEV_CONTARRD intent(in) :: sendcnts(:),sdispls(:),recvcnts(:) + integer,intent(in) :: comm, rdispls + integer,intent(out) :: ier + +!Local variables------------------- + integer :: sc,sds,sdr + integer :: i +#if defined HAVE_MPI + integer, allocatable :: rdispls_on(:) +#endif + +! ********************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + ABI_STAT_MALLOC(rdispls_on,(size(sendcnts)), ier) + if (ier/= 0) call xmpi_abort(msg='error allocating rdispls_on in xmpi_alltoallv') + rdispls_on = 0 + call MPI_ALLTOALLV(xval,sendcnts,sdispls,MPI_DOUBLE_PRECISION,recvbuf,& +& recvcnts,rdispls_on,MPI_DOUBLE_PRECISION,comm,ier) + ABI_FREE(rdispls_on) + else if (comm == MPI_COMM_SELF) then +#endif + sdr=rdispls;sds=0;if (size(sdispls)>0) sds=sdispls(1) + sc=size(xval);if (size(sendcnts)>0) sc=sendcnts(1) +!$OMP parallel do + do i = 1, sc + recvbuf(i)=xval(sds+i) + end do +#if defined HAVE_MPI + end if +#endif + +end subroutine xmpi_alltoallv_dp1d +!!*** + +!!****f* ABINIT/xmpi_alltoallv_dp1d2 +!! NAME +!! xmpi_alltoallv_dp1d2 +!! +!! FUNCTION +!! Sends data from all to all processes. +!! Target: double precision one-dimensional arrays. +!! +!! SOURCE + +subroutine xmpi_alltoallv_dp1d2(xval,sendcnts,sdispls,recvbuf,recvcnts,rdispls,comm,ier) + +!Arguments------------------------- + real(dp), DEV_CONTARRD intent(in) :: xval(:) + real(dp), DEV_CONTARRD intent(inout) :: recvbuf(:) + integer, DEV_CONTARRD intent(in) :: sendcnts(:),sdispls(:),recvcnts(:),rdispls(:) + integer,intent(in) :: comm + integer,intent(out) :: ier + +!Local variables------------------- + integer :: sc,sds,sdr + +! ********************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_ALLTOALLV(xval,sendcnts,sdispls,MPI_DOUBLE_PRECISION,recvbuf,& +& recvcnts,rdispls,MPI_DOUBLE_PRECISION,comm,ier) + else if (comm == MPI_COMM_SELF) then +#endif + sds=0;if (size(sdispls)>0) sds=sdispls(1) + sdr=0;if (size(rdispls)>0) sdr=rdispls(1) + sc=size(xval);if (size(sendcnts)>0) sc=sendcnts(1) + recvbuf(sdr+1:sdr+sc)=xval(sds+1:sds+sc) +#if defined HAVE_MPI + end if +#endif + +end subroutine xmpi_alltoallv_dp1d2 +!!*** diff --git a/GX-PAW/common/src/12_hide_mpi/xmpi_bcast.finc b/GX-PAW/common/src/12_hide_mpi/xmpi_bcast.finc new file mode 100644 index 00000000..776c06eb --- /dev/null +++ b/GX-PAW/common/src/12_hide_mpi/xmpi_bcast.finc @@ -0,0 +1,1878 @@ +!{\src2tex{textfont=tt}} +!!****f* ABINIT/xmpi_bcast_intv +!! NAME +!! xmpi_bcast_intv +!! +!! FUNCTION +!! This module contains functions that calls MPI routine, +!! if we compile the code using the MPI CPP flags. +!! xmpi_bcast is the generic function. +!! +!! COPYRIGHT +!! Copyright (C) 2001-2024 ABINIT group (Rshaltaf,AR,XG) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~ABINIT/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! SOURCE + +subroutine xmpi_bcast_intv(xval,master,comm,ier) + +!Arguments------------------------- + integer,intent(inout) :: xval + integer,intent(in) :: comm,master + integer,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: arr_xval(1) +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + arr_xval(1)=xval + call MPI_BCAST(arr_xval,1,MPI_INTEGER,master,comm,ier) + xval=arr_xval(1) + end if +#endif + +end subroutine xmpi_bcast_intv +!!*** + +!!****f* ABINIT/xmpi_bcast_int1d +!! NAME +!! xmpi_bcast_int1d +!! +!! FUNCTION +!! Broadcasts data from master to slaves. +!! Target: one-dimensional integer arrays. +!! +!! INPUTS +!! comm= MPI communicator +!! master= master MPI node +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! PARENTS +!! +!! CHILDREN +!! mpi_bcast +!! +!! SOURCE + +subroutine xmpi_bcast_int1d(xval,master,comm,ier) + +!Arguments ------------------------------------ + integer, DEV_CONTARRD intent(inout) :: xval(:) + integer,intent(in) :: comm,master + integer,intent(out) :: ier + +!Local variables------------------------------- + integer :: n + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + n=size(xval) + call MPI_BCAST(xval,n,MPI_INTEGER,master,comm,ier) + end if +#endif +end subroutine xmpi_bcast_int1d +!!*** + +!!****f* ABINIT/xmpi_bcast_int2d +!! NAME +!! xmpi_bcast_int2d +!! +!! FUNCTION +!! Broadcasts data from master to slaves. +!! Target: two-dimensional integer arrays. +!! +!! INPUTS +!! comm= MPI communicator +!! master= master MPI node +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! PARENTS +!! +!! CHILDREN +!! mpi_bcast +!! +!! SOURCE + +subroutine xmpi_bcast_int2d(xval,master,comm,ier) + +!Arguments------------------------- + integer, DEV_CONTARRD intent(inout) :: xval(:,:) + integer,intent(in) :: comm,master + integer,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2 + integer(kind=int64) :: ntot +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + n1=size(xval,dim=1) + n2=size(xval,dim=2) + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2,kind=int64) + + if (ntot<=xmpi_maxint32_64) then + call MPI_BCAST(xval,n1*n2,MPI_INTEGER,master,comm,ier) + else + call xmpi_largetype_create(ntot,MPI_INTEGER,my_dt,my_op,MPI_OP_NULL) + call MPI_BCAST(xval,1,my_dt,master,comm,ier) + call xmpi_largetype_free(my_dt,my_op) + end if + + end if +#endif + +end subroutine xmpi_bcast_int2d +!!*** + +!!****f* ABINIT/xmpi_bcast_int3d +!! NAME +!! xmpi_bcast_int3d +!! +!! FUNCTION +!! Broadcasts data from master to slaves. +!! Target: three-dimensional integer arrays. +!! +!! INPUTS +!! comm= MPI communicator +!! master= master MPI node +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! PARENTS +!! +!! CHILDREN +!! mpi_bcast +!! +!! SOURCE + +subroutine xmpi_bcast_int3d(xval,master,comm,ier) + +!Arguments------------------------- + integer, DEV_CONTARRD intent(inout) :: xval(:,:,:) + integer,intent(in) :: comm,master + integer,intent(out) :: ier + +!Local variables------------------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2,n3 + integer(kind=int64) :: nn,ntot +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + n1=size(xval,dim=1) + n2=size(xval,dim=2) + n3=size(xval,dim=3) + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2*n3,kind=int64) + + if (ntot<=xmpi_maxint32_64) then + call MPI_BCAST(xval,n1*n2*n3,MPI_INTEGER,master,comm,ier) + else + nn=int(n1*n2,kind=int64);if (nn>huge(0_int32)) nn=int(n1,kind=int64) + call xmpi_largetype_create(ntot/nn,MPI_INTEGER,my_dt,my_op,MPI_OP_NULL) + call MPI_BCAST(xval,int(nn,kind=int32),my_dt,master,comm,ier) + call xmpi_largetype_free(my_dt,my_op) + end if + end if +#endif + +end subroutine xmpi_bcast_int3d +!!*** + +!!****f* ABINIT/xmpi_bcast_int4d +!! NAME +!! xmpi_bcast_int4d +!! +!! FUNCTION +!! Broadcasts data from master to slaves. +!! Target: three-dimensional integer arrays. +!! +!! INPUTS +!! comm= MPI communicator +!! master= master MPI node +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! PARENTS +!! +!! CHILDREN +!! mpi_bcast +!! +!! SOURCE + +subroutine xmpi_bcast_int4d(xval,master,comm,ier) + +!Arguments------------------------- + integer, DEV_CONTARRD intent(inout) :: xval(:,:,:,:) + integer,intent(in) :: comm,master + integer,intent(out) :: ier + +!Local variables------------------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2,n3,n4 + integer(kind=int64) :: nn,ntot +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + n1=size(xval,dim=1) + n2=size(xval,dim=2) + n3=size(xval,dim=3) + n4=size(xval,dim=4) + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2*n3*n4,kind=int64) + + if (ntot<=xmpi_maxint32_64) then + call MPI_BCAST(xval,n1*n2*n3*n4,MPI_INTEGER,master,comm,ier) + else + nn=int(n1*n2*n3,kind=int64) + if (nn>huge(0_int32)) nn=int(n1*n2,kind=int64) + if (nn>huge(0_int32)) nn=int(n1,kind=int64) + call xmpi_largetype_create(ntot/nn,MPI_INTEGER,my_dt,my_op,MPI_OP_NULL) + call MPI_BCAST(xval,int(nn,kind=int32),my_dt,master,comm,ier) + call xmpi_largetype_free(my_dt,my_op) + end if + end if +#endif + +end subroutine xmpi_bcast_int4d +!!*** + +!!****f* ABINIT/xmpi_bcast_dpv +!! NAME +!! xmpi_bcast_dpv +!! +!! FUNCTION +!! Broadcasts data from master to slaves. +!! Target: scalar double precisions. +!! +!! INPUTS +!! comm= MPI communicator +!! master= master MPI node +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! PARENTS +!! +!! CHILDREN +!! mpi_bcast +!! +!! SOURCE + +subroutine xmpi_bcast_dpv(xval,master,comm,ier) + +!Arguments ------------------------------------ + real(dp),intent(inout) :: xval + integer ,intent(in) :: comm,master + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + real(dp) :: arr_xval(1) +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + arr_xval(1)=xval + call MPI_BCAST(arr_xval,1,MPI_DOUBLE_PRECISION,master,comm,ier) + xval=arr_xval(1) + end if +#endif + +end subroutine xmpi_bcast_dpv +!!*** + +!!****f* ABINIT/xmpi_bcast_dp1d +!! NAME +!! xmpi_bcast_dp1d +!! +!! FUNCTION +!! Broadcasts data from master to slaves. +!! Target: double precision one-dimensional arrays. +!! +!! INPUTS +!! comm= MPI communicator +!! master= master MPI node +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! PARENTS +!! +!! CHILDREN +!! mpi_bcast +!! +!! SOURCE + +subroutine xmpi_bcast_dp1d(xval,master,comm,ier) + +!Arguments------------------------- + real(dp), DEV_CONTARRD intent(inout) :: xval(:) + integer ,intent(in) :: comm,master + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: n +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + n=size(xval,dim=1) + call MPI_BCAST(xval,n,MPI_DOUBLE_PRECISION,master,comm,ier) + end if +#endif + +end subroutine xmpi_bcast_dp1d +!!*** + +!!****f* ABINIT/xmpi_bcast_dp2d +!! NAME +!! xmpi_bcast_dp2d +!! +!! FUNCTION +!! Broadcasts data from master to slaves. +!! Target: double precision two-dimensional arrays. +!! +!! INPUTS +!! comm= MPI communicator +!! master= master MPI node +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_bcast_dp2d(xval,master,comm,ier) + +!Arguments------------------------- + real(dp), DEV_CONTARRD intent(inout) :: xval(:,:) + integer ,intent(in) :: comm,master + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2 + integer(kind=int64) :: ntot +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + n1=size(xval,dim=1) + n2=size(xval,dim=2) + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2,kind=int64) + + if (ntot<=xmpi_maxint32_64) then + call MPI_BCAST(xval,n1*n2,MPI_DOUBLE_PRECISION,master,comm,ier) + else + call xmpi_largetype_create(ntot,MPI_DOUBLE_PRECISION,my_dt,my_op,MPI_OP_NULL) + call MPI_BCAST(xval,1,my_dt,master,comm,ier) + call xmpi_largetype_free(my_dt,my_op) + end if + end if +#endif + +end subroutine xmpi_bcast_dp2d +!!*** + +!!****f* ABINIT/xmpi_bcast_dp3d +!! NAME +!! xmpi_bcast_dp3d +!! +!! FUNCTION +!! Broadcasts data from master to slaves. +!! Target: double precision three-dimensional arrays. +!! +!! INPUTS +!! comm= MPI communicator +!! master= master MPI node +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_bcast_dp3d(xval,master,comm,ier) + +!Arguments------------------------- + real(dp), DEV_CONTARRD intent(inout) :: xval(:,:,:) + integer ,intent(in) :: comm,master + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2,n3 + integer(kind=int64) :: nn,ntot +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + n1=size(xval,dim=1) + n2=size(xval,dim=2) + n3=size(xval,dim=3) + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2*n3,kind=int64) + + if (ntot<=xmpi_maxint32_64) then + call MPI_BCAST(xval,n1*n2*n3,MPI_DOUBLE_PRECISION,master,comm,ier) + else + nn=int(n1*n2,kind=int64);if (nn>huge(0_int32)) nn=int(n1,kind=int64) + call xmpi_largetype_create(ntot/nn,MPI_DOUBLE_PRECISION,my_dt,my_op,MPI_OP_NULL) + call MPI_BCAST(xval,int(nn,kind=int32),my_dt,master,comm,ier) + call xmpi_largetype_free(my_dt,my_op) + end if + end if +#endif + +end subroutine xmpi_bcast_dp3d +!!*** + +!!****f* ABINIT/xmpi_bcast_dp4d +!! NAME +!! xmpi_bcast_dp4d +!! +!! FUNCTION +!! Broadcasts data from master to slaves. +!! Target: double precision four-dimensional arrays. +!! +!! INPUTS +!! comm= MPI communicator +!! master= master MPI node +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_bcast_dp4d(xval,master,comm,ier) + +!Arguments------------------------- + real(dp), DEV_CONTARRD intent(inout) :: xval(:,:,:,:) + integer ,intent(in) :: comm,master + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2,n3,n4 + integer(kind=int64) :: nn,ntot +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + n1=size(xval,dim=1) + n2=size(xval,dim=2) + n3=size(xval,dim=3) + n4=size(xval,dim=4) + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2*n3*n4,kind=int64) + + if (ntot<=xmpi_maxint32_64) then + call MPI_BCAST(xval,n1*n2*n3*n4,MPI_DOUBLE_PRECISION,master,comm,ier) + else + nn=int(n1*n2*n3,kind=int64) + if (nn>huge(0_int32)) nn=int(n1*n2,kind=int64) + if (nn>huge(0_int32)) nn=int(n1,kind=int64) + call xmpi_largetype_create(ntot/nn,MPI_DOUBLE_PRECISION,my_dt,my_op,MPI_OP_NULL) + call MPI_BCAST(xval,int(nn,kind=int32),my_dt,master,comm,ier) + call xmpi_largetype_free(my_dt,my_op) + end if + end if +#endif + +end subroutine xmpi_bcast_dp4d +!!*** + +!!****f* ABINIT/xmpi_bcast_dp5d +!! NAME +!! xmpi_bcast_dp5d +!! +!! FUNCTION +!! Broadcasts data from master to slaves. +!! Target: double precision five-dimensional arrays. +!! +!! INPUTS +!! comm= MPI communicator +!! master= master MPI node +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_bcast_dp5d(xval,master,comm,ier) + +!Arguments------------------------- + real(dp), DEV_CONTARRD intent(inout) :: xval(:,:,:,:,:) + integer ,intent(in) :: comm,master + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2,n3,n4,n5 + integer(kind=int64) :: nn,ntot +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + n1=size(xval,dim=1) + n2=size(xval,dim=2) + n3=size(xval,dim=3) + n4=size(xval,dim=4) + n5=size(xval,dim=5) + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2*n3*n4*n5,kind=int64) + + if (ntot<=xmpi_maxint32_64) then + call MPI_BCAST(xval,n1*n2*n3*n4*n5,MPI_DOUBLE_PRECISION,master,comm,ier) + else + nn=int(n1*n2*n3*n4,kind=int64) + if (nn>huge(0_int32)) nn=int(n1*n2*n3,kind=int64) + if (nn>huge(0_int32)) nn=int(n1*n2,kind=int64) + if (nn>huge(0_int32)) nn=int(n1,kind=int64) + call xmpi_largetype_create(ntot/nn,MPI_DOUBLE_PRECISION,my_dt,my_op,MPI_OP_NULL) + call MPI_BCAST(xval,int(nn,kind=int32),my_dt,master,comm,ier) + call xmpi_largetype_free(my_dt,my_op) + end if + end if +#endif + +end subroutine xmpi_bcast_dp5d +!!*** + +!!****f* ABINIT/xmpi_bcast_dp6d +!! NAME +!! xmpi_bcast_dp6d +!! +!! FUNCTION +!! Broadcasts data from master to slaves. +!! Target: double precision six-dimensional arrays. +!! +!! INPUTS +!! comm= MPI communicator +!! master= master MPI node +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_bcast_dp6d(xval,master,comm,ier) + +!Arguments------------------------- + real(dp), DEV_CONTARRD intent(inout) :: xval(:,:,:,:,:,:) + integer ,intent(in) :: comm,master + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2,n3,n4,n5,n6 + integer(kind=int64) :: nn,ntot +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + n1=size(xval,dim=1) + n2=size(xval,dim=2) + n3=size(xval,dim=3) + n4=size(xval,dim=4) + n5=size(xval,dim=5) + n6=size(xval,dim=6) + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2*n3*n4*n5*n6,kind=int64) + + if (ntot<=xmpi_maxint32_64) then + call MPI_BCAST(xval,n1*n2*n3*n4*n5*n6,MPI_DOUBLE_PRECISION,master,comm,ier) + else + nn=int(n1*n2*n3*n4*n5,kind=int64) + if (nn>huge(0_int32)) nn=int(n1*n2*n3*n4,kind=int64) + if (nn>huge(0_int32)) nn=int(n1*n2*n3,kind=int64) + if (nn>huge(0_int32)) nn=int(n1*n2,kind=int64) + if (nn>huge(0_int32)) nn=int(n1,kind=int64) + call xmpi_largetype_create(ntot/nn,MPI_DOUBLE_PRECISION,my_dt,my_op,MPI_OP_NULL) + call MPI_BCAST(xval,int(nn,kind=int32),my_dt,master,comm,ier) + call xmpi_largetype_free(my_dt,my_op) + end if + end if +#endif + +end subroutine xmpi_bcast_dp6d +!!*** + +!!****f* ABINIT/xmpi_bcast_spv +!! NAME +!! xmpi_bcast_spv +!! +!! FUNCTION +!! Broadcasts data from master to slaves. +!! Target: scalar single precisions. +!! +!! INPUTS +!! comm= MPI communicator +!! master= master MPI node +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_bcast_spv(xval,master,comm,ier) + +!Arguments------------------------- + real(sp),intent(inout) :: xval + integer,intent(in) :: comm,master + integer,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + real(sp) :: arr_xval(1) +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + arr_xval(1)=xval + call MPI_BCAST(arr_xval,1,MPI_REAL,master,comm,ier) + xval=arr_xval(1) + end if +#endif + +end subroutine xmpi_bcast_spv +!!*** + +!!****f* ABINIT/xmpi_bcast_sp1d +!! NAME +!! xmpi_bcast_sp1d +!! +!! FUNCTION +!! Broadcasts data from master to slaves. +!! Target: one-dimensional single precision arrays. +!! +!! INPUTS +!! comm= MPI communicator +!! master= master MPI node +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_bcast_sp1d(xval,master,comm,ier) + +!Arguments------------------------- + real(sp), DEV_CONTARRD intent(inout) :: xval(:) + integer ,intent(in) :: comm,master + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: n +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + n=size(xval,dim=1) + call MPI_BCAST(xval,n,MPI_REAL,master,comm,ier) + end if +#endif + +end subroutine xmpi_bcast_sp1d +!!*** + +!!****f* ABINIT/xmpi_bcast_sp2d +!! NAME +!! xmpi_bcast_sp2d +!! +!! FUNCTION +!! Broadcasts data from master to slaves. +!! Target: two-dimensional single precision arrays. +!! +!! INPUTS +!! comm= MPI communicator +!! master= master MPI node +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_bcast_sp2d(xval,master,comm,ier) + +!Arguments------------------------- + real(sp), DEV_CONTARRD intent(inout) :: xval(:,:) + integer ,intent(in) :: comm,master + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2 + integer(kind=int64) :: ntot +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + n1=size(xval,dim=1) + n2=size(xval,dim=2) + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2,kind=int64) + + if (ntot<=xmpi_maxint32_64) then + call MPI_BCAST(xval,n1*n2,MPI_REAL,master,comm,ier) + else + call xmpi_largetype_create(ntot,MPI_REAL,my_dt,my_op,MPI_OP_NULL) + call MPI_BCAST(xval,1,my_dt,master,comm,ier) + call xmpi_largetype_free(my_dt,my_op) + end if + end if +#endif + +end subroutine xmpi_bcast_sp2d +!!*** + +!!****f* ABINIT/xmpi_bcast_sp3d +!! NAME +!! xmpi_bcast_sp3d +!! +!! FUNCTION +!! Broadcasts data from master to slaves. +!! Target: three-dimensional single precision arrays. +!! +!! INPUTS +!! comm= MPI communicator +!! master= master MPI node +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_bcast_sp3d(xval,master,comm,ier) + +!Arguments------------------------- + real(sp), DEV_CONTARRD intent(inout) :: xval(:,:,:) + integer ,intent(in) :: comm,master + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2,n3 + integer(kind=int64) :: nn,ntot +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + n1=size(xval,dim=1) + n2=size(xval,dim=2) + n3=size(xval,dim=3) + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2*n3,kind=int64) + + if (ntot<=xmpi_maxint32_64) then + else + nn=int(n1*n2,kind=int64);if (nn>huge(0_int32)) nn=int(n1,kind=int64) + call xmpi_largetype_create(ntot/nn,MPI_REAL,my_dt,my_op,MPI_OP_NULL) + call MPI_BCAST(xval,int(nn,kind=int32),my_dt,master,comm,ier) + call xmpi_largetype_free(my_dt,my_op) + end if + end if +#endif + +end subroutine xmpi_bcast_sp3d +!!*** + +!!****f* ABINIT/xmpi_bcast_sp4d +!! NAME +!! xmpi_bcast_sp4d +!! +!! FUNCTION +!! Broadcasts data from master to slaves. +!! Target: four-dimensional single precision arrays. +!! +!! INPUTS +!! comm= MPI communicator +!! master= master MPI node +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_bcast_sp4d(xval,master,comm,ier) + +!Arguments------------------------- + real(sp), DEV_CONTARRD intent(inout) :: xval(:,:,:,:) + integer ,intent(in) :: comm,master + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2,n3,n4 + integer(kind=int64) :: nn,ntot +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + n1=size(xval,dim=1) + n2=size(xval,dim=2) + n3=size(xval,dim=3) + n4=size(xval,dim=4) + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2*n3*n4,kind=int64) + + if (ntot<=xmpi_maxint32_64) then + else + nn=int(n1*n2*n3,kind=int64) + if (nn>huge(0_int32)) nn=int(n1*n2,kind=int64) + if (nn>huge(0_int32)) nn=int(n1,kind=int64) + call xmpi_largetype_create(ntot/nn,MPI_REAL,my_dt,my_op,MPI_OP_NULL) + call MPI_BCAST(xval,int(nn,kind=int32),my_dt,master,comm,ier) + call xmpi_largetype_free(my_dt,my_op) + end if + end if +#endif + +end subroutine xmpi_bcast_sp4d +!!*** + +!!****f* ABINIT/xmpi_bcast_cplxv +!! NAME +!! xmpi_bcast_cplxv +!! +!! FUNCTION +!! Broadcasts data from master to slaves. +!! Target: scalar complexs. +!! +!! INPUTS +!! comm= MPI communicator +!! master= master MPI node +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! PARENTS +!! +!! CHILDREN +!! mpi_bcast +!! +!! SOURCE + +subroutine xmpi_bcast_cplxv(xval,master,comm,ier) + +!Arguments------------------------- + complex(spc),intent(inout) :: xval + integer ,intent(in) :: comm,master + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + complex(spc) :: arr_xval(1) +#endif + + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + arr_xval(1)=xval + call MPI_BCAST(arr_xval,1,MPI_COMPLEX,master,comm,ier) + xval=arr_xval(1) + end if +#endif + +end subroutine xmpi_bcast_cplxv +!!*** + +!!****f* ABINIT/xmpi_bcast_cplx1d +!! NAME +!! xmpi_bcast_cplx1d +!! +!! FUNCTION +!! Broadcasts data from master to slaves. +!! Target: one-dimensional complex arrays. +!! +!! INPUTS +!! comm= MPI communicator +!! master= master MPI node +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! PARENTS +!! +!! CHILDREN +!! mpi_bcast +!! +!! SOURCE + +subroutine xmpi_bcast_cplx1d(xval,master,comm,ier) + +!Arguments------------------------- + complex(spc), DEV_CONTARRD intent(inout) :: xval(:) + integer ,intent(in) :: comm,master + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: n +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + n=size(xval(:)) + call MPI_BCAST(xval,n,MPI_COMPLEX,master,comm,ier) + end if +#endif + +end subroutine xmpi_bcast_cplx1d +!!*** + +!!****f* ABINIT/xmpi_bcast_cplx2d +!! NAME +!! xmpi_bcast_cplx2d +!! +!! FUNCTION +!! Broadcasts data from master to slaves. +!! Target: two-dimensional complex arrays. +!! +!! INPUTS +!! comm= MPI communicator +!! master= master MPI node +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_bcast_cplx2d(xval,master,comm,ier) + +!Arguments------------------------- + complex(spc), DEV_CONTARRD intent(inout) :: xval(:,:) + integer ,intent(in) :: comm,master + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2 + integer(kind=int64) :: ntot +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + n1=size(xval,dim=1) + n2=size(xval,dim=2) + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2,kind=int64) + + if (ntot<=xmpi_maxint32_64) then + call MPI_BCAST(xval,n1*n2,MPI_COMPLEX,master,comm,ier) + else + call xmpi_largetype_create(ntot,MPI_COMPLEX,my_dt,my_op,MPI_OP_NULL) + call MPI_BCAST(xval,1,my_dt,master,comm,ier) + call xmpi_largetype_free(my_dt,my_op) + end if + end if +#endif + +end subroutine xmpi_bcast_cplx2d +!!*** + +!!****f* ABINIT/xmpi_bcast_cplx3d +!! NAME +!! xmpi_bcast_cplx3d +!! +!! FUNCTION +!! Broadcasts data from master to slaves. +!! Target: three-dimensional complex arrays. +!! +!! INPUTS +!! comm= MPI communicator +!! master= master MPI node +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_bcast_cplx3d(xval,master,comm,ier) + +!Arguments------------------------- + complex(spc), DEV_CONTARRD intent(inout) :: xval(:,:,:) + integer ,intent(in) :: comm,master + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2,n3 + integer(kind=int64) :: nn,ntot +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + n1=size(xval,dim=1) + n2=size(xval,dim=2) + n3=size(xval,dim=3) + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2*n3,kind=int64) + + if (ntot<=xmpi_maxint32_64) then + else + nn=int(n1*n2,kind=int64);if (nn>huge(0_int32)) nn=int(n1,kind=int64) + call xmpi_largetype_create(ntot/nn,MPI_COMPLEX,my_dt,my_op,MPI_OP_NULL) + call MPI_BCAST(xval,int(nn,kind=int32),my_dt,master,comm,ier) + call xmpi_largetype_free(my_dt,my_op) + end if + end if +#endif + +end subroutine xmpi_bcast_cplx3d +!!*** + +!!****f* ABINIT/xmpi_bcast_cplx4d +!! NAME +!! xmpi_bcast_cplx4d +!! +!! FUNCTION +!! Broadcasts data from master to slaves. +!! Target: four-dimensional complex arrays. +!! +!! INPUTS +!! comm= MPI communicator +!! master= master MPI node +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_bcast_cplx4d(xval,master,comm,ier) + +!Arguments------------------------- + complex(spc), DEV_CONTARRD intent(inout) :: xval(:,:,:,:) + integer ,intent(in) :: comm,master + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2,n3,n4 + integer(kind=int64) :: nn,ntot +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + n1=size(xval,dim=1) + n2=size(xval,dim=2) + n3=size(xval,dim=3) + n4=size(xval,dim=4) + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2*n3*n4,kind=int64) + + if (ntot<=xmpi_maxint32_64) then + call MPI_BCAST(xval,n1*n2*n3*n4,MPI_COMPLEX,master,comm,ier) + else + nn=int(n1*n2*n3,kind=int64) + if (nn>huge(0_int32)) nn=int(n1*n2,kind=int64) + if (nn>huge(0_int32)) nn=int(n1,kind=int64) + call xmpi_largetype_create(ntot/nn,MPI_COMPLEX,my_dt,my_op,MPI_OP_NULL) + call MPI_BCAST(xval,int(nn,kind=int32),my_dt,master,comm,ier) + call xmpi_largetype_free(my_dt,my_op) + end if + end if +#endif + +end subroutine xmpi_bcast_cplx4d +!!*** + +!!****f* ABINIT/xmpi_bcast_dcv +!! NAME +!! xmpi_bcast_dcv +!! +!! FUNCTION +!! Broadcasts data from master to slaves. +!! Target: scalar double complexs. +!! +!! INPUTS +!! comm= MPI communicator +!! master= master MPI node +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_bcast_dcv(xval,master,comm,ier) + +!Arguments------------------------- + complex(dpc),intent(inout) :: xval + integer ,intent(in) :: comm,master + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + complex(dpc) :: arr_xval(1) +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + arr_xval(1)=xval + call MPI_BCAST(arr_xval,1,MPI_DOUBLE_COMPLEX,master,comm,ier) + xval=arr_xval(1) + end if +#endif + +end subroutine xmpi_bcast_dcv +!!*** + +!!****f* ABINIT/xmpi_bcast_dc1d +!! NAME +!! xmpi_bcast_dc1d +!! +!! FUNCTION +!! Broadcasts data from master to slaves. +!! Target: one-dimensional double complex arrays. +!! +!! INPUTS +!! comm= MPI communicator +!! master= master MPI node +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_bcast_dc1d(xval,master,comm,ier) + +!Arguments------------------------- + complex(dpc), DEV_CONTARRD intent(inout):: xval(:) + integer ,intent(in) :: comm,master + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: n +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + n=size(xval(:)) + call MPI_BCAST(xval,n,MPI_DOUBLE_COMPLEX,master,comm,ier) + end if +#endif + +end subroutine xmpi_bcast_dc1d +!!*** + +!!****f* ABINIT/xmpi_bcast_dc2d +!! NAME +!! xmpi_bcast_dc2d +!! +!! FUNCTION +!! Broadcasts data from master to slaves. +!! Target: two-dimensional double complex arrays. +!! +!! INPUTS +!! comm= MPI communicator +!! master= master MPI node +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! +!! SOURCE + +subroutine xmpi_bcast_dc2d(xval,master,comm,ier) + +!Arguments------------------------- + complex(dpc), DEV_CONTARRD intent(inout):: xval(:,:) + integer ,intent(in) :: comm,master + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2 + integer(kind=int64) :: ntot +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + n1=size(xval,dim=1) + n2=size(xval,dim=2) + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2,kind=int64) + + if (ntot<=xmpi_maxint32_64) then + call MPI_BCAST(xval,n1*n2,MPI_DOUBLE_COMPLEX,master,comm,ier) + else + call xmpi_largetype_create(ntot,MPI_DOUBLE_COMPLEX,my_dt,my_op,MPI_OP_NULL) + call MPI_BCAST(xval,1,my_dt,master,comm,ier) + call xmpi_largetype_free(my_dt,my_op) + end if + end if +#endif + +end subroutine xmpi_bcast_dc2d +!!*** + +!!****f* ABINIT/xmpi_bcast_dc3d +!! NAME +!! xmpi_bcast_dc3d +!! +!! FUNCTION +!! Broadcasts data from master to slaves. +!! Target: three-dimensional double complex arrays. +!! +!! INPUTS +!! comm= MPI communicator +!! master= master MPI node +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_bcast_dc3d(xval,master,comm,ier) + +!Arguments------------------------- + complex(dpc), DEV_CONTARRD intent(inout):: xval(:,:,:) + integer ,intent(in) :: comm,master + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2,n3 + integer(kind=int64) :: nn,ntot +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + n1=size(xval,dim=1) + n2=size(xval,dim=2) + n3=size(xval,dim=3) + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2*n3,kind=int64) + + if (ntot<=xmpi_maxint32_64) then + call MPI_BCAST(xval,n1*n2*n3,MPI_DOUBLE_COMPLEX,master,comm,ier) + else + nn=int(n1*n2,kind=int64);if (nn>huge(0_int32)) nn=int(n1,kind=int64) + call xmpi_largetype_create(ntot/nn,MPI_DOUBLE_COMPLEX,my_dt,my_op,MPI_OP_NULL) + call MPI_BCAST(xval,int(nn,kind=int32),my_dt,master,comm,ier) + call xmpi_largetype_free(my_dt,my_op) + end if + end if +#endif + +end subroutine xmpi_bcast_dc3d +!!*** + +!!****f* ABINIT/xmpi_bcast_dc4d +!! NAME +!! xmpi_bcast_dc4d +!! +!! FUNCTION +!! Broadcasts data from master to slaves. +!! Target: four-dimensional complex arrays in double precision. +!! +!! INPUTS +!! comm= MPI communicator +!! master= master MPI node +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_bcast_dc4d(xval,master,comm,ier) + +!Arguments------------------------- + complex(dpc), DEV_CONTARRD intent(inout) :: xval(:,:,:,:) + integer,intent(in) :: comm,master + integer,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2,n3,n4 + integer(kind=int64) :: nn,ntot +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + n1=size(xval,dim=1) + n2=size(xval,dim=2) + n3=size(xval,dim=3) + n4=size(xval,dim=4) + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2*n3*n4,kind=int64) + + if (ntot<=xmpi_maxint32_64) then + call MPI_BCAST(xval,n1*n2*n3*n4,MPI_DOUBLE_COMPLEX,master,comm,ier) + else + nn=int(n1*n2*n3,kind=int64) + if (nn>huge(0_int32)) nn=int(n1*n2,kind=int64) + if (nn>huge(0_int32)) nn=int(n1,kind=int64) + call xmpi_largetype_create(ntot/nn,MPI_DOUBLE_COMPLEX,my_dt,my_op,MPI_OP_NULL) + call MPI_BCAST(xval,int(nn,kind=int32),my_dt,master,comm,ier) + call xmpi_largetype_free(my_dt,my_op) + end if + end if +#endif + +end subroutine xmpi_bcast_dc4d +!!*** + +!!****f* ABINIT/xmpi_bcast_ch0d +!! NAME +!! xmpi_bcast_ch0d +!! +!! FUNCTION +!! Broadcasts data from master to slaves. +!! Target: character strings. +!! +!! INPUTS +!! comm= MPI communicator +!! master= master MPI node +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_bcast_ch0d(xval, master, comm, ier) + +!Arguments------------------------- + character(len=*),intent(inout),target :: xval + integer,intent(in) :: comm,master + integer,intent(out) :: ier + +!Local variables------------------------------- +#if defined HAVE_MPI + integer :: nch(1),rank + character,pointer :: arr_xval(:) + type(c_ptr) :: cptr +#endif + +!************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_COMM_RANK(comm,rank,ier) + if (rank==master) nch(1)=len_trim(xval) + call MPI_BCAST(nch,1,MPI_INTEGER,master,comm,ier) + cptr=c_loc(xval) ; call c_f_pointer(cptr,arr_xval,[nch(1)]) + call MPI_BCAST(arr_xval,nch(1),MPI_CHARACTER,master,comm,ier) + if (rank/=master) xval(nch(1)+1:)='' + end if +#endif + +end subroutine xmpi_bcast_ch0d +!!*** + +!!****f* ABINIT/xmpi_bcast_ch1d +!! NAME +!! xmpi_bcast_ch1d +!! +!! FUNCTION +!! Broadcasts data from master to slaves. +!! Target: one-dimensional array of character stringss. +!! +!! INPUTS +!! comm= MPI communicator +!! master= master MPI node +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_bcast_ch1d(xval,master,comm,ier) + +!Arguments------------------------- + Character(len=*), DEV_CONTARRD intent(inout) :: xval(:) + integer,intent(in) :: comm,master + integer,intent(out) :: ier + +!Local variables------------------------------- +#if defined HAVE_MPI + integer :: ii,nch +#endif + +!************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + nch=0 + do ii=1,size(xval) + nch=nch+len(xval(ii)) + end do + call MPI_BCAST(xval,nch,MPI_CHARACTER,master,comm,ier) + end if +#endif + +end subroutine xmpi_bcast_ch1d +!!*** + + +!!****f* ABINIT/xmpi_bcast_log0d +!! NAME +!! xmpi_bcast_log0d +!! +!! FUNCTION +!! Broadcasts data from master to slaves. +!! Target: logical scalar +!! +!! INPUTS +!! comm= MPI communicator +!! master= master MPI node +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SOURCE + +subroutine xmpi_bcast_log0d(xval,master,comm,ier) + +!Arguments------------------------- + logical,intent(inout) :: xval + integer,intent(in) :: comm,master + integer,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + logical :: arr_xval(1) +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + arr_xval(1)=xval + call MPI_BCAST(arr_xval,1,MPI_LOGICAL,master,comm,ier) + xval=arr_xval(1) + end if +#endif + +end subroutine xmpi_bcast_log0d +!!*** + +!!****f* ABINIT/xmpi_bcast_coeffi2_1d +!! NAME +!! xmpi_bcast_coeffi2_1d +!! +!! FUNCTION +!! Broadcasts data from master to slaves. +!! Target: type(coeffi2) 1D-arrays. +!! +!! INPUTS +!! comm= MPI communicator +!! master= master MPI node +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_bcast_coeffi2_1d(xval,master,comm,ier) + +!Arguments------------------------- + type(coeffi2_type), intent(inout) :: xval(:) + integer ,intent(in) :: comm,master + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: ii,jj,kk,me,n0,n1,n2,siztot + integer,allocatable :: mpibuf(:),siz(:,:) +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + me=xmpi_comm_rank(comm) + +! Broadcast xval%value sizes + n0=size(xval) + ABI_STAT_MALLOC(siz,(2,n0), ier) + if (ier/= 0) call xmpi_abort(msg='error allocating siz in xmpi_bcast') + if (me==master) then + do ii=1,n0 + siz(1,ii)=size(xval(ii)%value,1) + siz(2,ii)=size(xval(ii)%value,2) + end do + end if + call MPI_BCAST(siz,2*n0,MPI_INTEGER,master,comm,ier) + siztot=0 + do ii=1,n0 + siztot=siztot+siz(1,ii)*siz(2,ii) + end do + +! Fill in the buffer + ABI_STAT_MALLOC(mpibuf,(siztot), ier) + if (ier/= 0) call xmpi_abort(msg='error allocating mpibuf in xmpi_bcast') + if (me==master) then + jj=0 + do ii=1,n0 + n1=siz(1,ii);n2=siz(2,ii) + do kk=1,n2 + mpibuf(jj+1:jj+n1)=xval(ii)%value(1:n1,kk) + jj=jj+n1 + end do + end do + end if + +! Broadcast the data + call MPI_BCAST(mpibuf,siztot,MPI_INTEGER,master,comm,ier) + +! Retrieve the buffer + jj=0 + do ii=1,n0 + n1=siz(1,ii);n2=siz(2,ii) + if (.not.allocated(xval(ii)%value)) then + ABI_STAT_MALLOC(xval(ii)%value,(n1,n2), ier) + if (ier/= 0) call xmpi_abort(msg='error allocating xval%value in xmpi_bcast') + end if + do kk=1,n2 + xval(ii)%value(1:n1,kk)=mpibuf(jj+1:jj+n1) + jj=jj+n1 + end do + end do + ABI_FREE(siz) + ABI_FREE(mpibuf) + + end if +#endif + +end subroutine xmpi_bcast_coeffi2_1d +!!*** + +!!****f* ABINIT/xmpi_bcast_coeff2_1d +!! NAME +!! xmpi_bcast_coeff2_1d +!! +!! FUNCTION +!! Broadcasts data from master to slaves. +!! Target: type(coeff2) 1D-arrays. +!! +!! INPUTS +!! comm= MPI communicator +!! master= master MPI node +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_bcast_coeff2_1d(xval,master,comm,ier) + +!Arguments------------------------- + type(coeff2_type), intent(inout) :: xval(:) + integer ,intent(in) :: comm,master + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: ii,jj,kk,me,n0,n1,n2,siztot + integer,allocatable :: siz(:,:) + real(dp),allocatable :: mpibuf(:) +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + me=xmpi_comm_rank(comm) + +! Broadcast xval%value sizes + n0=size(xval) + ABI_STAT_MALLOC(siz,(2,n0), ier) + if (ier/= 0) call xmpi_abort(msg='error allocating siz in xmpi_bcast') + if (me==master) then + do ii=1,n0 + siz(1,ii)=size(xval(ii)%value,1) + siz(2,ii)=size(xval(ii)%value,2) + end do + end if + call MPI_BCAST(siz,2*n0,MPI_INTEGER,master,comm,ier) + siztot=0 + do ii=1,n0 + siztot=siztot+siz(1,ii)*siz(2,ii) + end do + +! Fill in the buffer + ABI_STAT_MALLOC(mpibuf,(siztot), ier) + if (ier/= 0) call xmpi_abort(msg='error allocating mpibuf in xmpi_bcast') + if (me==master) then + jj=0 + do ii=1,n0 + n1=siz(1,ii);n2=siz(2,ii) + do kk=1,n2 + mpibuf(jj+1:jj+n1)=xval(ii)%value(1:n1,kk) + jj=jj+n1 + end do + end do + end if + +! Broadcast the data + call MPI_BCAST(mpibuf,siztot,MPI_DOUBLE_PRECISION,master,comm,ier) + +! Retrieve the buffer + jj=0 + do ii=1,n0 + n1=siz(1,ii);n2=siz(2,ii) + if (.not.allocated(xval(ii)%value)) then + ABI_STAT_MALLOC(xval(ii)%value,(n1,n2), ier) + if (ier/= 0) call xmpi_abort(msg='error allocating xval%value in xmpi_bcast') + end if + do kk=1,n2 + xval(ii)%value(1:n1,kk)=mpibuf(jj+1:jj+n1) + jj=jj+n1 + end do + end do + ABI_FREE(siz) + ABI_FREE(mpibuf) + + end if +#endif + +end subroutine xmpi_bcast_coeff2_1d +!!*** + diff --git a/GX-PAW/common/src/12_hide_mpi/xmpi_exch.finc b/GX-PAW/common/src/12_hide_mpi/xmpi_exch.finc new file mode 100644 index 00000000..3b6ea579 --- /dev/null +++ b/GX-PAW/common/src/12_hide_mpi/xmpi_exch.finc @@ -0,0 +1,644 @@ +!{\src2tex{textfont=tt}} +!!****f* ABINIT/xmpi_exch_int1d +!! NAME +!! xmpi_exch_int1d +!! +!! FUNCTION +!! This module contains functions that calls MPI routine, +!! if we compile the code using the MPI CPP flags. +!! xmpi_exch is the generic function. +!! +!! COPYRIGHT +!! Copyright (C) 2001-2024 ABINIT group (MB,MT) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~ABINIT/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! NOTE +!! The tag conforms to the MPI request that the tag is lower than 32768, +!! by using a modulo call. +!! +!! SOURCE + +!-------------------------------------------------------------------- + +subroutine xmpi_exch_int1d(vsend,n1,sender,vrecv,recever,comm,mtag,ier) + +!Arguments---------------- + integer,intent(in) :: mtag,n1 + integer, DEV_CONTARRD intent(in) :: vsend(:) + integer, DEV_CONTARRD intent(inout) :: vrecv(:) + integer,intent(in) :: sender,recever,comm + integer,intent(out) :: ier + +!Local variables-------------- +#if defined HAVE_MPI + integer :: statux(MPI_STATUS_SIZE) + integer :: tag,me +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (sender==recever.or.comm==MPI_COMM_NULL.or.n1==0) return + call MPI_COMM_RANK(comm,me,ier) + tag = MOD(mtag,xmpi_tag_ub) + + if (recever==me) then + call MPI_RECV(vrecv,n1,MPI_INTEGER,sender,tag,comm,statux,ier) + end if + if (sender==me) then + call MPI_SEND(vsend,n1,MPI_INTEGER,recever,tag,comm,ier) + end if +#endif + +end subroutine xmpi_exch_int1d +!!*** + +!-------------------------------------------------------------------- + +!!****f* ABINIT/xmpi_exch_int2d +!! NAME +!! xmpi_exch_int2d +!! +!! FUNCTION +!! Sends and receives data. +!! Target: two-dimensional integer arrays. +!! +!! INPUTS +!! mtag= message tag +!! nt= vector length +!! vsend= send buffer +!! sender= node sending the data +!! recever= node receiving the data +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! vrecv= receive buffer +!! +!! SOURCE + +subroutine xmpi_exch_int2d(vsend,nt,sender,vrecv,recever,comm,mtag,ier) + +!Arguments---------------- + integer,intent(in) :: mtag,nt + integer, DEV_CONTARRD intent(in) :: vsend(:,:) + integer, DEV_CONTARRD intent(inout) :: vrecv(:,:) + integer,intent(in) :: sender,recever,comm + integer,intent(out) :: ier + +!Local variables-------------- +#if defined HAVE_MPI + integer :: statux(MPI_STATUS_SIZE) + integer :: tag,me +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (sender==recever.or.comm==MPI_COMM_NULL.or.nt==0) return + call MPI_COMM_RANK(comm,me,ier) + tag = MOD(mtag, xmpi_tag_ub) + + if (recever==me) then + call MPI_RECV(vrecv,nt,MPI_INTEGER,sender,tag,comm,statux,ier) + end if + if (sender==me) then + call MPI_SEND(vsend,nt,MPI_INTEGER,recever,tag,comm,ier) + end if +#endif + +end subroutine xmpi_exch_int2d +!!*** + +!-------------------------------------------------------------------- + +!!****f* ABINIT/xmpi_exch_dp1d +!! NAME +!! xmpi_exch_dp1d +!! +!! FUNCTION +!! Sends and receives data. +!! Target: double precision one-dimensional arrays. +!! +!! INPUTS +!! mtag= message tag +!! nt= vector length +!! vsend= send buffer +!! sender= node sending the data +!! recever= node receiving the data +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! vrecv= receive buffer +!! +!! SOURCE + +subroutine xmpi_exch_dp1d(vsend,nt,sender,vrecv,recever,comm,mtag,ier) + +!Arguments---------------- + integer,intent(in) :: mtag,nt + real(dp), DEV_CONTARRD intent(in) :: vsend(:) + real(dp), DEV_CONTARRD intent(inout) :: vrecv(:) + integer,intent(in) :: sender,recever,comm + integer,intent(out) :: ier + +!Local variables-------------- +#if defined HAVE_MPI + integer :: statux(MPI_STATUS_SIZE) + integer :: me,my_dt,my_op,tag + integer(kind=int64) :: ntot +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (sender==recever.or.comm==MPI_COMM_NULL.or.nt==0) return + call MPI_COMM_RANK(comm,me,ier) + tag = MOD(mtag, xmpi_tag_ub) + + !The dimension can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(nt,kind=int64) + + if (recever==me) then + if (ntot<=xmpi_maxint32_64) then + call MPI_RECV(vrecv,nt,MPI_DOUBLE_PRECISION,sender,tag,comm,statux,ier) + else + call xmpi_largetype_create(ntot,MPI_DOUBLE_PRECISION,my_dt,my_op,MPI_OP_NULL) + call MPI_RECV(vrecv,1,my_dt,sender,tag,comm,statux,ier) + call xmpi_largetype_free(my_dt,my_op) + end if + end if + if (sender==me) then + if (ntot<=xmpi_maxint32_64) then + call MPI_SEND(vsend,nt,MPI_DOUBLE_PRECISION,recever,tag,comm,ier) + else + call xmpi_largetype_create(ntot,MPI_DOUBLE_PRECISION,my_dt,my_op,MPI_OP_NULL) + call MPI_SEND(vsend,1,my_dt,recever,tag,comm,ier) + call xmpi_largetype_free(my_dt,my_op) + end if + end if +#endif + +end subroutine xmpi_exch_dp1d +!!*** + +!-------------------------------------------------------------------- + +!!****f* ABINIT/xmpi_exch_dp2d +!! NAME +!! xmpi_exch_dp2d +!! +!! FUNCTION +!! Sends and receives data. +!! Target: double precision two-dimensional arrays. +!! +!! INPUTS +!! mtag= message tag +!! nt= vector length +!! vsend= send buffer +!! sender= node sending the data +!! recever= node receiving the data +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! vrecv= receive buffer +!! +!! SOURCE + +subroutine xmpi_exch_dp2d(vsend,nt,sender,vrecv,recever,comm,mtag,ier) + +!Arguments---------------- + integer,intent(in) :: mtag,nt + real(dp), DEV_CONTARRD intent(in) :: vsend(:,:) + real(dp), DEV_CONTARRD intent(inout) :: vrecv(:,:) + integer,intent(in) :: sender,recever,comm + integer,intent(out) :: ier + +!Local variables-------------- +#if defined HAVE_MPI + integer :: statux(MPI_STATUS_SIZE) + integer :: me,my_dt,my_op,tag + integer(kind=int64) :: ntot +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (sender==recever.or.comm==MPI_COMM_NULL.or.nt==0) return + call MPI_COMM_RANK(comm,me,ier) + tag = MOD(mtag, xmpi_tag_ub) + + !The dimension can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(nt,kind=int64) + + if (recever==me) then + if (ntot<=xmpi_maxint32_64) then + call MPI_RECV(vrecv,nt,MPI_DOUBLE_PRECISION,sender,tag,comm,statux,ier) + else + call xmpi_largetype_create(ntot,MPI_DOUBLE_PRECISION,my_dt,my_op,MPI_OP_NULL) + call MPI_RECV(vrecv,1,my_dt,sender,tag,comm,statux,ier) + call xmpi_largetype_free(my_dt,my_op) + end if + end if + if (sender==me) then + if (ntot<=xmpi_maxint32_64) then + call MPI_SEND(vsend,nt,MPI_DOUBLE_PRECISION,recever,tag,comm,ier) + else + call xmpi_largetype_create(ntot,MPI_DOUBLE_PRECISION,my_dt,my_op,MPI_OP_NULL) + call MPI_SEND(vsend,1,my_dt,recever,tag,comm,ier) + call xmpi_largetype_free(my_dt,my_op) + end if + end if +#endif + +end subroutine xmpi_exch_dp2d +!!*** + +!-------------------------------------------------------------------- + +!!****f* ABINIT/xmpi_exch_dp3d +!! NAME +!! xmpi_exch_dp3d +!! +!! FUNCTION +!! Sends and receives data. +!! Target: double precision three-dimensional arrays. +!! +!! INPUTS +!! mtag= message tag +!! nt= vector length +!! vsend= send buffer +!! sender= node sending the data +!! recever= node receiving the data +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! vrecv= receive buffer +!! +!! SOURCE + +subroutine xmpi_exch_dp3d(vsend,nt,sender,vrecv,recever,comm,mtag,ier) + +!Arguments---------------- + integer,intent(in) :: mtag,nt + real(dp), DEV_CONTARRD intent(in) :: vsend(:,:,:) + real(dp), DEV_CONTARRD intent(inout) :: vrecv(:,:,:) + integer,intent(in) :: sender,recever,comm + integer,intent(out) :: ier + +!Local variables-------------- +#if defined HAVE_MPI + integer :: statux(MPI_STATUS_SIZE) + integer :: me,my_dt,my_op,tag + integer(kind=int64) :: ntot +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (sender==recever.or.comm==MPI_COMM_NULL.or.nt==0) return + call MPI_COMM_RANK(comm,me,ier) + tag = MOD(mtag, xmpi_tag_ub) + + !The dimension can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(nt,kind=int64) + + if (recever==me) then + if (ntot<=xmpi_maxint32_64) then + call MPI_RECV(vrecv,nt,MPI_DOUBLE_PRECISION,sender,tag,comm,statux,ier) + else + call xmpi_largetype_create(ntot,MPI_DOUBLE_PRECISION,my_dt,my_op,MPI_OP_NULL) + call MPI_RECV(vrecv,1,my_dt,sender,tag,comm,statux,ier) + call xmpi_largetype_free(my_dt,my_op) + end if + end if + if (sender==me) then + if (ntot<=xmpi_maxint32_64) then + call MPI_SEND(vsend,nt,MPI_DOUBLE_PRECISION,recever,tag,comm,ier) + else + call xmpi_largetype_create(ntot,MPI_DOUBLE_PRECISION,my_dt,my_op,MPI_OP_NULL) + call MPI_SEND(vsend,1,my_dt,recever,tag,comm,ier) + call xmpi_largetype_free(my_dt,my_op) + end if + end if +#endif + +end subroutine xmpi_exch_dp3d +!!*** + +!-------------------------------------------------------------------- + +!!****f* ABINIT/xmpi_exch_dp4d_tag +!! NAME +!! xmpi_exch_dp4d_tag +!! +!! FUNCTION +!! Sends and receives data. +!! Target: double precision four-dimensional arrays. +!! +!! INPUTS +!! mtag= message tag +!! nt= vector length +!! vsend= send buffer +!! sender= node sending the data +!! recever= node receiving the data +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! vrecv= receive buffer +!! +!! SOURCE + +subroutine xmpi_exch_dp4d(vsend,nt,sender,vrecv,recever,comm,mtag,ier) + +!Arguments---------------- + integer,intent(in) :: mtag,nt + real(dp), DEV_CONTARRD intent(in) :: vsend(:,:,:,:) + real(dp), DEV_CONTARRD intent(inout) :: vrecv(:,:,:,:) + integer,intent(in) :: sender,recever,comm + integer,intent(out) :: ier + +!Local variables-------------- +#if defined HAVE_MPI + integer :: statux(MPI_STATUS_SIZE) + integer :: me,my_dt,my_op,tag + integer(kind=int64) :: ntot +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (sender==recever.or.comm==MPI_COMM_NULL.or.nt==0) return + call MPI_COMM_RANK(comm,me,ier) + tag = MOD(mtag, xmpi_tag_ub) + + !The dimension can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(nt,kind=int64) + + if (recever==me) then + if (ntot<=xmpi_maxint32_64) then + call MPI_RECV(vrecv,nt,MPI_DOUBLE_PRECISION,sender,tag,comm,statux,ier) + else + call xmpi_largetype_create(ntot,MPI_DOUBLE_PRECISION,my_dt,my_op,MPI_OP_NULL) + call MPI_RECV(vrecv,1,my_dt,sender,tag,comm,statux,ier) + call xmpi_largetype_free(my_dt,my_op) + end if + end if + if (sender==me) then + if (ntot<=xmpi_maxint32_64) then + call MPI_SEND(vsend,nt,MPI_DOUBLE_PRECISION,recever,tag,comm,ier) + else + call xmpi_largetype_create(ntot,MPI_DOUBLE_PRECISION,my_dt,my_op,MPI_OP_NULL) + call MPI_SEND(vsend,1,my_dt,recever,tag,comm,ier) + call xmpi_largetype_free(my_dt,my_op) + end if + end if +#endif + +end subroutine xmpi_exch_dp4d +!!*** + +!-------------------------------------------------------------------- + +!!****f* ABINIT/xmpi_exch_dp5d_tag +!! NAME +!! xmpi_exch_dp5d_tag +!! +!! FUNCTION +!! Sends and receives data. +!! Target: double precision five-dimensional arrays. +!! +!! INPUTS +!! mtag= message tag +!! nt= vector length +!! vsend= send buffer +!! sender= node sending the data +!! recever= node receiving the data +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! vrecv= receive buffer +!! +!! SOURCE + +subroutine xmpi_exch_dp5d(vsend,nt,sender,vrecv,recever,comm,mtag,ier) + +!Arguments---------------- + integer,intent(in) :: mtag,nt + real(dp), DEV_CONTARRD intent(in) :: vsend(:,:,:,:,:) + real(dp), DEV_CONTARRD intent(inout) :: vrecv(:,:,:,:,:) + integer,intent(in) :: sender,recever,comm + integer,intent(out) :: ier + +!Local variables-------------- +#if defined HAVE_MPI + integer :: statux(MPI_STATUS_SIZE) + integer :: me,my_dt,my_op,tag + integer(kind=int64) :: ntot +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (sender==recever.or.comm==MPI_COMM_NULL.or.nt==0) return + call MPI_COMM_RANK(comm,me,ier) + tag = MOD(mtag,xmpi_tag_ub) + + !The dimension can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(nt,kind=int64) + + if (recever==me) then + if (ntot<=xmpi_maxint32_64) then + call MPI_RECV(vrecv,nt,MPI_DOUBLE_PRECISION,sender,tag,comm,statux,ier) + else + call xmpi_largetype_create(ntot,MPI_DOUBLE_PRECISION,my_dt,my_op,MPI_OP_NULL) + call MPI_RECV(vrecv,1,my_dt,sender,tag,comm,statux,ier) + call xmpi_largetype_free(my_dt,my_op) + end if + end if + if (sender==me) then + if (ntot<=xmpi_maxint32_64) then + call MPI_SEND(vsend,nt,MPI_DOUBLE_PRECISION,recever,tag,comm,ier) + else + call xmpi_largetype_create(ntot,MPI_DOUBLE_PRECISION,my_dt,my_op,MPI_OP_NULL) + call MPI_SEND(vsend,1,my_dt,recever,tag,comm,ier) + call xmpi_largetype_free(my_dt,my_op) + end if + end if +#endif + +end subroutine xmpi_exch_dp5d +!!*** + +!-------------------------------------------------------------------- + +!!****f* ABINIT/xmpi_exch_spc1d +!! NAME +!! xmpi_exch_spc1d +!! +!! FUNCTION +!! Sends and receives data. +!! Target: one-dimensional single precision complex arrays. +!! +!! SOURCE + +subroutine xmpi_exch_spc1d(vsend,n1,sender,vrecv,recever,comm,mtag,ier) + +!Arguments---------------- + integer,intent(in) :: mtag,n1 + complex(spc), DEV_CONTARRD intent(in) :: vsend(:) + complex(spc), DEV_CONTARRD intent(inout) :: vrecv(:) + integer,intent(in) :: sender,recever,comm + integer,intent(out) :: ier + +!Local variables-------------- +#if defined HAVE_MPI + integer :: statux(MPI_STATUS_SIZE) + integer :: tag,me +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (sender==recever.or.comm==MPI_COMM_NULL.or.(n1==0)) return + call MPI_COMM_RANK(comm,me,ier) + tag = MOD(mtag, xmpi_tag_ub) + + if (recever==me) then + call MPI_RECV(vrecv,n1,MPI_COMPLEX,sender, tag,comm,statux,ier) + end if + if (sender==me) then + call MPI_SEND(vsend,n1,MPI_COMPLEX,recever,tag,comm,ier) + end if +#endif + +end subroutine xmpi_exch_spc1d +!!*** + +!-------------------------------------------------------------------- + +!!****f* ABINIT/xmpi_exch_dpc1d +!! NAME +!! xmpi_exch_dpc1d +!! +!! FUNCTION +!! Sends and receives data. +!! Target: one-dimensional double precision complex arrays. +!! +!! SOURCE + +subroutine xmpi_exch_dpc1d(vsend,n1,sender,vrecv,recever,comm,mtag,ier) + +!Arguments---------------- + integer,intent(in) :: mtag,n1 + complex(dpc), DEV_CONTARRD intent(in) :: vsend(:) + complex(dpc), DEV_CONTARRD intent(inout) :: vrecv(:) + integer,intent(in) :: sender,recever,comm + integer,intent(out) :: ier + +!Local variables-------------- +#if defined HAVE_MPI + integer :: statux(MPI_STATUS_SIZE) + integer :: tag,me +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (sender==recever.or.comm==MPI_COMM_NULL.or.n1==0) return + call MPI_COMM_RANK(comm,me,ier) + tag = MOD(mtag, xmpi_tag_ub) + + if (recever==me) then + call MPI_RECV(vrecv,n1,MPI_DOUBLE_COMPLEX,sender, tag,comm,statux,ier) + end if + if (sender==me) then + call MPI_SEND(vsend,n1,MPI_DOUBLE_COMPLEX,recever,tag,comm,ier) + end if +#endif + +end subroutine xmpi_exch_dpc1d +!!*** + +!-------------------------------------------------------------------- + +!!****f* ABINIT/xmpi_exch_dpc2d +!! NAME +!! xmpi_exch_dpc2d +!! +!! FUNCTION +!! Sends and receives data. +!! Target: two-dimensional double precision complex arrays. +!! +!! SOURCE + +subroutine xmpi_exch_dpc2d(vsend,nt,sender,vrecv,recever,comm,mtag,ier) + +!Arguments---------------- + integer,intent(in) :: mtag,nt + complex(dpc), DEV_CONTARRD intent(in) :: vsend(:,:) + complex(dpc), DEV_CONTARRD intent(inout) :: vrecv(:,:) + integer,intent(in) :: sender,recever,comm + integer,intent(out) :: ier + +!Local variables-------------- +#if defined HAVE_MPI + integer :: statux(MPI_STATUS_SIZE) + integer :: tag,me +#endif +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (sender==recever.or.comm==MPI_COMM_NULL.or.(nt==0)) return + call MPI_COMM_RANK(comm,me,ier) + tag = MOD(mtag, xmpi_tag_ub) + + if (recever==me) then + call MPI_RECV(vrecv,nt,MPI_DOUBLE_COMPLEX,sender, tag,comm,statux,ier) + end if + if (sender==me) then + call MPI_SEND(vsend,nt,MPI_DOUBLE_COMPLEX,recever,tag,comm,ier) + end if +#endif + +end subroutine xmpi_exch_dpc2d +!!*** diff --git a/GX-PAW/common/src/12_hide_mpi/xmpi_gather.finc b/GX-PAW/common/src/12_hide_mpi/xmpi_gather.finc new file mode 100644 index 00000000..d10aac24 --- /dev/null +++ b/GX-PAW/common/src/12_hide_mpi/xmpi_gather.finc @@ -0,0 +1,307 @@ +!{\src2tex{textfont=tt}} +!!****f* ABINIT/xmpi_gather +!! NAME +!! xmpi_gather +!! +!! FUNCTION +!! This module contains functions that calls MPI routine, +!! if we compile the code using the MPI CPP flags. +!! xmpi_gather is the generic function. +!! +!! COPYRIGHT +!! Copyright (C) 2001-2024 ABINIT group (MT) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~ABINIT/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! SOURCE + +!!*** + +!!****f* ABINIT/xmpi_gather_int +!! NAME +!! xmpi_gather_int +!! +!! FUNCTION +!! Gathers data from all tasks and delivers it to all. +!! Target: one-dimensional integer arrays. +!! +!! INPUTS +!! xval= buffer array +!! sendcont= number of sent elements +!! recvcount= number of received elements +!! root= rank of receiving process +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! recvbuf= received buffer +!! +!! SOURCE + +subroutine xmpi_gather_int(xval,sendcount,recvbuf,recvcount,root,comm,ier) + +!Arguments------------------------- + integer,intent(in) :: sendcount,recvcount + integer, DEV_CONTARRD intent(in) :: xval(:) + integer, DEV_CONTARRD intent(inout) :: recvbuf(:) + integer,intent(in) :: root,comm + integer,intent(out) :: ier + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_gather(xval,sendcount,MPI_INTEGER,recvbuf,recvcount,MPI_INTEGER,root,comm,ier) + else if (comm == MPI_COMM_SELF) then + recvbuf=xval + end if +#else + recvbuf=xval +#endif +end subroutine xmpi_gather_int +!!*** + +!!****f* ABINIT/xmpi_gather_int2d +!! NAME +!! xmpi_gather_int2d +!! +!! FUNCTION +!! Gathers data from all tasks and delivers it to all. +!! Target: two-dimensional integer arrays. +!! +!! INPUTS +!! xval= buffer array +!! sendcont= number of sent elements +!! recvcount= number of received elements +!! root= rank of receiving process +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! recvbuf= received buffer +!! +!! SOURCE + +subroutine xmpi_gather_int2d(xval,sendcount,recvbuf,recvcount,root,comm,ier) + +!Arguments------------------------- + integer,intent(in) :: sendcount,recvcount + integer, DEV_CONTARRD intent(in) :: xval(:,:) + integer, DEV_CONTARRD intent(inout) :: recvbuf(:,:) + integer,intent(in) :: root,comm + integer,intent(out) :: ier + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_gather(xval,sendcount,MPI_INTEGER,recvbuf,recvcount,MPI_INTEGER,root,comm,ier) + else if (comm == MPI_COMM_SELF) then + recvbuf=xval + end if +#else + recvbuf=xval +#endif +end subroutine xmpi_gather_int2d +!!*** + +!!****f* ABINIT/xmpi_gather_dp +!! NAME +!! xmpi_gather_dp +!! +!! FUNCTION +!! Gathers data from all tasks and delivers it to all. +!! Target: one-dimensional real arrays. +!! +!! INPUTS +!! xval= buffer array +!! sendcont= number of sent elements +!! recvcount= number of received elements +!! root= rank of receiving process +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! recvbuf= received buffer +!! +!! SOURCE + +subroutine xmpi_gather_dp(xval,sendcount,recvbuf,recvcount,root,comm,ier) + +!Arguments------------------------- + integer,intent(in) :: sendcount,recvcount + real(dp), DEV_CONTARRD intent(in) :: xval(:) + real(dp), DEV_CONTARRD intent(inout) :: recvbuf(:) + integer,intent(in) :: root,comm + integer,intent(out) :: ier + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_gather(xval,sendcount,MPI_DOUBLE_PRECISION,recvbuf,recvcount,MPI_DOUBLE_PRECISION,& +& root,comm,ier) + else if (comm == MPI_COMM_SELF) then + recvbuf=xval + end if +#else + recvbuf=xval +#endif +end subroutine xmpi_gather_dp +!!*** + +!!****f* ABINIT/xmpi_gather_dp2d +!! NAME +!! xmpi_gather_dp2d +!! +!! FUNCTION +!! Gathers data from all tasks and delivers it to all. +!! Target: two-dimensional real arrays. +!! +!! INPUTS +!! xval= buffer array +!! sendcont= number of sent elements +!! recvcount= number of received elements +!! root= rank of receiving process +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! recvbuf= received buffer +!! +!! SOURCE + +subroutine xmpi_gather_dp2d(xval,sendcount,recvbuf,recvcount,root,comm,ier) + +!Arguments------------------------- + integer,intent(in) :: sendcount,recvcount + real(dp), DEV_CONTARRD intent(in) :: xval(:,:) + real(dp), DEV_CONTARRD intent(inout) :: recvbuf(:,:) + integer,intent(in) :: root,comm + integer,intent(out) :: ier + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_gather(xval,sendcount,MPI_DOUBLE_PRECISION,recvbuf,recvcount,MPI_DOUBLE_PRECISION,& +& root,comm,ier) + else if (comm == MPI_COMM_SELF) then + recvbuf=xval + end if +#else + recvbuf=xval +#endif +end subroutine xmpi_gather_dp2d +!!*** + +!!****f* ABINIT/xmpi_gather_dp3d +!! NAME +!! xmpi_gather_dp3d +!! +!! FUNCTION +!! Gathers data from all tasks and delivers it to all. +!! Target: three-dimensional real arrays. +!! +!! INPUTS +!! xval= buffer array +!! sendcont= number of sent elements +!! recvcount= number of received elements +!! root= rank of receiving process +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! recvbuf= received buffer +!! +!! SOURCE + +subroutine xmpi_gather_dp3d(xval,sendcount,recvbuf,recvcount,root,comm,ier) + +!Arguments------------------------- + integer,intent(in) :: sendcount,recvcount + real(dp), DEV_CONTARRD intent(in) :: xval(:,:,:) + real(dp), DEV_CONTARRD intent(inout) :: recvbuf(:,:,:) + integer,intent(in) :: root,comm + integer,intent(out) :: ier + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_gather(xval,sendcount,MPI_DOUBLE_PRECISION,recvbuf,recvcount,MPI_DOUBLE_PRECISION,& +& root,comm,ier) + else if (comm == MPI_COMM_SELF) then + recvbuf=xval + end if +#else + recvbuf=xval +#endif + +end subroutine xmpi_gather_dp3d +!!*** + +!!****f* ABINIT/xmpi_gather_dp4d +!! NAME +!! xmpi_gather_dp4d +!! +!! FUNCTION +!! Gathers data from all tasks and delivers it to all. +!! Target: four-dimensional real arrays. +!! +!! INPUTS +!! xval= buffer array +!! sendcont= number of sent elements +!! recvcount= number of received elements +!! root= rank of receiving process +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! recvbuf= received buffer +!! +!! SOURCE + +subroutine xmpi_gather_dp4d(xval,sendcount,recvbuf,recvcount,root,comm,ier) + +!Arguments------------------------- + integer,intent(in) :: sendcount,recvcount + real(dp), DEV_CONTARRD intent(in) :: xval(:,:,:,:) + real(dp), DEV_CONTARRD intent(inout) :: recvbuf(:,:,:,:) + integer,intent(in) :: root,comm + integer,intent(out) :: ier + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_gather(xval,sendcount,MPI_DOUBLE_PRECISION,recvbuf,recvcount,MPI_DOUBLE_PRECISION,& +& root,comm,ier) + else if (comm == MPI_COMM_SELF) then + recvbuf=xval + end if +#else + recvbuf=xval +#endif + +end subroutine xmpi_gather_dp4d +!!*** diff --git a/GX-PAW/common/src/12_hide_mpi/xmpi_gatherv.finc b/GX-PAW/common/src/12_hide_mpi/xmpi_gatherv.finc new file mode 100644 index 00000000..0b9e004b --- /dev/null +++ b/GX-PAW/common/src/12_hide_mpi/xmpi_gatherv.finc @@ -0,0 +1,678 @@ +!{\src2tex{textfont=tt}} +!!****f* ABINIT/xmpi_gatherv +!! NAME +!! xmpi_gatherv +!! +!! FUNCTION +!! This module contains functions that calls MPI routine, +!! if we compile the code using the MPI CPP flags. +!! xmpi_gatherv is the generic function. +!! +!! COPYRIGHT +!! Copyright (C) 2001-2024 ABINIT group (MT,GG) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~ABINIT/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! SOURCE + +!!*** + +!!****f* ABINIT/xmpi_gatherv_int +!! NAME +!! xmpi_gatherv_int +!! +!! FUNCTION +!! Gathers data from all tasks and delivers it to all. +!! Target: one-dimensional integer arrays. +!! +!! INPUTS +!! xval= buffer array +!! recvcounts= number of received elements +!! displs= relative offsets for incoming data +!! nelem= number of elements +!! root= rank of receiving process +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! recvbuf= received buffer +!! +!! SOURCE + +subroutine xmpi_gatherv_int(xval,nelem,recvbuf,recvcounts,displs,root,comm,ier) + +!Arguments------------------------- + integer, DEV_CONTARRD intent(in) :: xval(:) + integer, DEV_CONTARRD intent(inout) :: recvbuf(:) + integer, DEV_CONTARRD intent(in) :: recvcounts(:),displs(:) + integer,intent(in) :: nelem,root,comm + integer,intent(out) :: ier + +!Local variables------------------- + integer :: cc,dd + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_gatherV(xval,nelem,MPI_INTEGER,recvbuf,recvcounts,displs,& +& MPI_INTEGER,root,comm,ier) + else if (comm == MPI_COMM_SELF) then +#endif + dd=0;if (size(displs)>0) dd=displs(1) + cc=size(xval);if (size(recvcounts)>0) cc=recvcounts(1) + recvbuf(dd+1:dd+cc)=xval(1:cc) +#if defined HAVE_MPI + end if +#endif + +end subroutine xmpi_gatherv_int +!!*** + +!!****f* ABINIT/xmpi_gatherv_int1_dp1 +!! NAME +!! xmpi_gatherv_int1_dp1 +!! +!! FUNCTION +!! Gathers data from all tasks and delivers it to all. +!! Target : one-dimensional integer arrray and one-dimensionnal dp array +!! +!! INPUTS +!! buf_int=buffer integer array that is going to be gathered +!! buf_int_size=size of buf_int array +!! buf_dp=buffer dp array that is going to be gathered +!! buf_dp_size=size of buf_dp array +!! comm=MPI communicator to be gathered on it +!! root=rank of receiving process +!! comm=MPI communicator +!! +!! OUTPUT +!! buf_int_all=buffer integer array gathered +!! buf_int_size_all=size of buffer integer array gathered +!! buf_dp_all=buffer dp array gathered +!! buf_dp_size_all=size of buffer dp array gathered +!! ier=exit status, a non-zero value meaning there is an error +!! +!! SOURCE + +subroutine xmpi_gatherv_int1_dp1(buf_int,buf_int_size,buf_dp,buf_dp_size, & +& buf_int_all,buf_int_size_all,buf_dp_all,buf_dp_size_all,root,& +& comm,ier) + +!Arguments------------------------- +!scalars + integer,intent(in) :: buf_int_size,buf_dp_size,root,comm + integer,intent(out) :: buf_int_size_all,buf_dp_size_all,ier +!arrays + integer,intent(in) :: buf_int(:) + integer,allocatable,target,intent(out) :: buf_int_all(:) + real(dp),intent(in) :: buf_dp(:) + real(dp),allocatable,target, intent(out) :: buf_dp_all(:) + +!Local variables-------------- +!scalars + integer :: buf_pack_size,ierr,ii,iproc,istart_dp,istart_int + integer :: lg,lg1,lg2,lg_int,lg_dp,me,nproc,position + integer :: totalbufcount + logical,parameter :: use_pack=.false. +!arrays + integer :: buf_size(2),pos(3) + integer,allocatable :: buf_dp_size1(:),buf_int_size1(:) + integer,allocatable :: count_dp(:),count_int(:),count_size(:),counts(:) + integer,allocatable :: disp_dp(:),disp_int(:),displ(:),displ_dp(:),displ_int(:) + integer,allocatable :: pos_all(:) + integer,pointer:: outbuf_int(:) + real(dp),pointer :: outbuf_dp(:) + character,allocatable :: buf_pack(:),buf_pack_tot(:) + +! ************************************************************************* + + ier=0 + +#if defined HAVE_MPI + if (comm/=MPI_COMM_SELF.and.comm/=MPI_COMM_NULL) then + + nproc=xmpi_comm_size(comm) + +!First version: using 2 allgather (one for ints, another for reals) +!------------------------------------------------------------------ + if (.not.use_pack) then + +! Prepare communications + ABI_MALLOC(count_int,(nproc)) + ABI_MALLOC(disp_int,(nproc)) + ABI_MALLOC(count_dp,(nproc)) + ABI_MALLOC(disp_dp,(nproc)) + ABI_MALLOC(count_size,(2*nproc)) + buf_size(1)=buf_int_size;buf_size(2)=buf_dp_size + call xmpi_allgather(buf_size,2, count_size,comm,ier) + do iproc=1,nproc + count_int(iproc)=count_size(2*iproc-1) + count_dp(iproc)=count_size(2*iproc) + end do + disp_int(1)=0;disp_dp(1)=0 + do ii=2,nproc + disp_int(ii)=disp_int(ii-1)+count_int(ii-1) + disp_dp (ii)=disp_dp (ii-1)+count_dp (ii-1) + end do + buf_int_size_all=sum(count_int) + buf_dp_size_all =sum(count_dp) + ABI_STAT_MALLOC(buf_int_all,(buf_int_size_all), ier) + if (ier/= 0) call xmpi_abort(msg='error allocating buf_int_all in xmpi_gatherv') + ABI_STAT_MALLOC(buf_dp_all ,(buf_dp_size_all), ier) + if (ier/= 0) call xmpi_abort(msg='error allocating buf_dp_all in xmpi_gatherv') + +! Communicate (one call for integers, one call for reals) + call xmpi_gatherv(buf_int,buf_int_size,buf_int_all,count_int,disp_int,root,comm,ierr) + call xmpi_gatherv(buf_dp,buf_dp_size,buf_dp_all,count_dp,disp_dp,root,comm,ierr) + +! Release the memory + ABI_FREE(count_int) + ABI_FREE(disp_int) + ABI_FREE(count_dp) + ABI_FREE(disp_dp) + ABI_FREE(count_size) + +!2nd version: using 1 allgather (with MPI_PACK) +!----------------------------------------------------------------- + else + + me=xmpi_comm_rank(comm) + +! Compute size of message + call MPI_PACK_SIZE(buf_int_size,MPI_INTEGER,comm,lg1,ier) + call MPI_PACK_SIZE(buf_dp_size,MPI_DOUBLE_PRECISION,comm,lg2,ier) + lg=lg1+lg2 + +! Pack data to be sent + position=0;buf_pack_size=lg1+lg2 + ABI_STAT_MALLOC(buf_pack,(buf_pack_size), ier) + if (ier/= 0) call xmpi_abort(msg='error allocating buf_pack xmpi_gatherv') + call MPI_PACK(buf_int,buf_int_size,MPI_INTEGER,buf_pack,buf_pack_size,position,comm,ier) + call MPI_PACK(buf_dp,buf_dp_size,MPI_DOUBLE_PRECISION,buf_pack,buf_pack_size,position,comm,ier) + +! Gather size of all packed messages + ABI_MALLOC(pos_all,(nproc*3)) + ABI_MALLOC(counts,(nproc)) + ABI_MALLOC(buf_int_size1,(nproc)) + ABI_MALLOC(buf_dp_size1,(nproc)) + ABI_MALLOC(displ,(nproc)) + ABI_MALLOC(displ_int,(nproc)) + ABI_MALLOC(displ_dp,(nproc)) + pos(1)=position;pos(2)=buf_int_size;pos(3)=buf_dp_size + call MPI_ALLGATHER(pos,3,MPI_INTEGER,pos_all,3,MPI_INTEGER,comm,ier) + ii=1 + do iproc=1,nproc + counts(iproc)=pos_all(ii);ii=ii+1 + buf_int_size1(iproc)=pos_all(ii);ii=ii+1 + buf_dp_size1(iproc)=pos_all(ii);ii=ii+1 + end do + + displ(1)=0 ; displ_int(1)=0 ; displ_dp(1)=0 + do iproc=2,nproc + displ(iproc)=displ(iproc-1)+counts(iproc-1) + displ_int(iproc)=displ_int(iproc-1)+buf_int_size1(iproc-1) + displ_dp(iproc)=displ_dp(iproc-1)+buf_dp_size1(iproc-1) + end do + + totalbufcount=displ(nproc)+counts(nproc) + ABI_STAT_MALLOC(buf_pack_tot,(totalbufcount), ier) + if (ier/= 0) call xmpi_abort(msg='error allocating buf_pack_tot in xmpi_gatherv') + buf_int_size_all=sum(buf_int_size1) + buf_dp_size_all=sum(buf_dp_size1) + + if (me==root) then + ABI_STAT_MALLOC(buf_int_all,(buf_int_size_all), ier) + if (ier/= 0) call xmpi_abort(msg='error allocating buf_int_all in xmpi_gatherv') + ABI_STAT_MALLOC(buf_dp_all,(buf_dp_size_all), ier) + if (ier/= 0) call xmpi_abort(msg='error allocating buf_int_all in xmpi_gatherv') + else + ABI_STAT_MALLOC(buf_int_all,(1), ier) + if (ier/= 0) call xmpi_abort(msg='error allocating buf_int_all in xmpi_gatherv') + ABI_STAT_MALLOC(buf_dp_all,(1), ier) + if (ier/= 0) call xmpi_abort(msg='error allocating buf_int_all in xmpi_gatherv') + end if + +! Gather all packed messages + call MPI_GATHERV(buf_pack,position,MPI_PACKED,buf_pack_tot,counts,displ,MPI_PACKED,root,comm,ier) + if (me==root) then + position=0 + do iproc=1,nproc + lg_int=buf_int_size1(iproc); lg_dp=buf_dp_size1(iproc) + istart_int=displ_int(iproc); istart_dp=displ_dp(iproc) + outbuf_int=>buf_int_all(istart_int+1:istart_int+lg_int) + call MPI_UNPACK(buf_pack_tot,totalbufcount,position, outbuf_int, & +& lg_int, MPI_INTEGER,comm,ier) + outbuf_dp=>buf_dp_all(istart_dp+1:istart_dp+lg_dp) + call MPI_UNPACK(buf_pack_tot,totalbufcount,position,outbuf_dp, & +& lg_dp, MPI_DOUBLE_PRECISION,comm,ier) + end do + end if + +! Release the memory + ABI_FREE(pos_all) + ABI_FREE(counts) + ABI_FREE(buf_int_size1) + ABI_FREE(buf_dp_size1) + ABI_FREE(displ) + ABI_FREE(displ_int) + ABI_FREE(displ_dp) + ABI_FREE(buf_pack_tot) + ABI_FREE(buf_pack) + + end if + else if (comm == MPI_COMM_SELF) then +#endif + +!Sequential version + ABI_STAT_MALLOC(buf_int_all,(buf_int_size), ier) + if (ier/= 0) call xmpi_abort(msg='error allocating buf_int_all in xmpi_gatherv') + ABI_STAT_MALLOC(buf_dp_all,(buf_dp_size), ier) + if (ier/= 0) call xmpi_abort(msg='error allocating buf_dp_all in xmpi_gatherv') + buf_int_all(:)=buf_int(:) + buf_dp_all(:)=buf_dp(:) + buf_int_size_all=buf_int_size + buf_dp_size_all=buf_dp_size + +#if defined HAVE_MPI + end if +#endif + +end subroutine xmpi_gatherv_int1_dp1 +!!*** + +!!****f* ABINIT/xmpi_gatherv_int2d +!! NAME +!! xmpi_gatherv_int2d +!! +!! FUNCTION +!! This module contains functions that calls MPI routine, +!! if we compile the code using the MPI CPP flags. +!! xmpi_gatherv is the generic function. +!! +!! INPUTS +!! xval= buffer array +!! recvcounts= number of received elements +!! displs= relative offsets for incoming data +!! nelem= number of elements +!! root= rank of receiving process +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! recvbuf= received buffer +!! +!! SOURCE + +subroutine xmpi_gatherv_int2d(xval,nelem,recvbuf,recvcounts,displs,root,comm,ier) + +!Arguments------------------------- + integer, DEV_CONTARRD intent(in) :: xval(:,:) + integer, DEV_CONTARRD intent(inout) :: recvbuf(:,:) + integer, DEV_CONTARRD intent(in) :: recvcounts(:),displs(:) + integer,intent(in) :: nelem,root,comm + integer,intent(out) :: ier + +!Local variables-------------- + integer :: cc,dd,sz1 + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_gatherV(xval,nelem,MPI_INTEGER,recvbuf,recvcounts,displs,& +& MPI_INTEGER,root,comm,ier) + else if (comm == MPI_COMM_SELF) then +#endif + sz1=size(xval,1) + dd=0;if (size(displs)>0) dd=displs(1)/sz1 + cc=size(xval,2);if (size(recvcounts)>0) cc=recvcounts(1)/sz1 + recvbuf(:,dd+1:dd+cc)=xval(:,1:cc) +#if defined HAVE_MPI + end if +#endif + +end subroutine xmpi_gatherv_int2d +!!*** + +!!****f* ABINIT/xmpi_gatherv_dp +!! NAME +!! xmpi_gatherv_dp +!! +!! FUNCTION +!! Gathers data from all tasks and delivers it to all. +!! Target: one-dimensional double precision arrays. +!! +!! INPUTS +!! xval= buffer array +!! recvcounts= number of received elements +!! displs= relative offsets for incoming data +!! nelem= number of elements +!! root= rank of receiving process +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! recvbuf= received buffer +!! +!! SOURCE + +subroutine xmpi_gatherv_dp(xval,nelem,recvbuf,recvcounts,displs,root,comm,ier) + +!Arguments------------------------- + real(dp), DEV_CONTARRD intent(in) :: xval(:) + real(dp), DEV_CONTARRD intent(inout) :: recvbuf(:) + integer, DEV_CONTARRD intent(in) :: recvcounts(:),displs(:) + integer,intent(in) :: nelem,root,comm + integer,intent(out) :: ier + +!Local variables-------------- + integer :: cc,dd + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_gatherV(xval,nelem,MPI_DOUBLE_PRECISION,recvbuf,recvcounts,displs,& +& MPI_DOUBLE_PRECISION,root,comm,ier) + else if (comm == MPI_COMM_SELF) then +#endif + dd=0;if (size(displs)>0) dd=displs(1) + cc=size(xval);if (size(recvcounts)>0) cc=recvcounts(1) + recvbuf(dd+1:dd+cc)=xval(1:cc) +#if defined HAVE_MPI + end if +#endif + +end subroutine xmpi_gatherv_dp +!!*** + +!!****f* ABINIT/xmpi_gatherv_dp2d +!! NAME +!! xmpi_gatherv_dp2d +!! +!! FUNCTION +!! Gathers data from all tasks and delivers it to all. +!! Target: double precision two-dimensional arrays. +!! +!! INPUTS +!! xval= buffer array +!! recvcounts= number of received elements +!! displs= relative offsets for incoming data +!! nelem= number of elements +!! root= rank of receiving process +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! recvbuf= received buffer +!! +!! SOURCE + +subroutine xmpi_gatherv_dp2d(xval,nelem,recvbuf,recvcounts,displs,root,comm,ier) + +!Arguments------------------------- + real(dp), DEV_CONTARRD intent(in) :: xval(:,:) + real(dp), DEV_CONTARRD intent(inout) :: recvbuf(:,:) + integer, DEV_CONTARRD intent(in) :: recvcounts(:),displs(:) + integer,intent(in) :: nelem,root,comm + integer,intent(out) :: ier + +!Local variables-------------- + integer :: cc,dd,sz1 + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_gatherV(xval,nelem,MPI_DOUBLE_PRECISION,recvbuf,recvcounts,displs,& +& MPI_DOUBLE_PRECISION,root,comm,ier) + else if (comm == MPI_COMM_SELF) then +#endif + sz1=size(xval,1) + dd=0;if (size(displs)>0) dd=displs(1)/sz1 + cc=size(xval,2);if (size(recvcounts)>0) cc=recvcounts(1)/sz1 + recvbuf(:,dd+1:dd+cc)=xval(:,1:cc) +#if defined HAVE_MPI + end if +#endif + +end subroutine xmpi_gatherv_dp2d +!!*** + +!!****f* ABINIT/xmpi_gatherv_dp3d +!! NAME +!! xmpi_gatherv_dp3d +!! +!! FUNCTION +!! Gathers data from all tasks and delivers it to all. +!! Target: double precision three-dimensional arrays. +!! +!! INPUTS +!! xval= buffer array +!! recvcounts= number of received elements +!! displs= relative offsets for incoming data +!! nelem= number of elements +!! root= rank of receiving process +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! recvbuf= received buffer +!! +!! SOURCE + +subroutine xmpi_gatherv_dp3d(xval,nelem,recvbuf,recvcounts,displs,root,comm,ier) + +!Arguments------------------------- + real(dp), DEV_CONTARRD intent(in) :: xval(:,:,:) + real(dp), DEV_CONTARRD intent(inout) :: recvbuf(:,:,:) + integer, DEV_CONTARRD intent(in) :: recvcounts(:),displs(:) + integer,intent(in) :: nelem,root,comm + integer,intent(out) :: ier + +!Local variables-------------- + integer :: cc,dd,sz12 + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_gatherV(xval,nelem,MPI_DOUBLE_PRECISION,recvbuf,recvcounts,displs,& +& MPI_DOUBLE_PRECISION,root,comm,ier) + else if (comm == MPI_COMM_SELF) then +#endif + sz12=size(xval,1)*size(xval,2) + dd=0;if (size(displs)>0) dd=displs(1)/sz12 + cc=size(xval,3);if (size(recvcounts)>0) cc=recvcounts(1)/sz12 + recvbuf(:,:,dd+1:dd+cc)=xval(:,:,1:cc) +#if defined HAVE_MPI + end if +#endif + +end subroutine xmpi_gatherv_dp3d +!!*** + +!!****f* ABINIT/xmpi_gatherv_dp4d +!! NAME +!! xmpi_gatherv_dp4d +!! +!! FUNCTION +!! Gathers data from all tasks and delivers it to all. +!! Target: double precision four-dimensional arrays. +!! +!! INPUTS +!! xval= buffer array +!! recvcounts= number of received elements +!! displs= relative offsets for incoming data +!! nelem= number of elements +!! root= rank of receiving process +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! recvbuf= received buffer +!! +!! SOURCE + +subroutine xmpi_gatherv_dp4d(xval,nelem,recvbuf,recvcounts,displs,root,comm,ier) + +!Arguments------------------------- + real(dp), DEV_CONTARRD intent(in) :: xval(:,:,:,:) + real(dp), DEV_CONTARRD intent(inout) :: recvbuf(:,:,:,:) + integer, DEV_CONTARRD intent(in) :: recvcounts(:),displs(:) + integer,intent(in) :: nelem,root,comm + integer,intent(out) :: ier + +!Local variables------------------- + integer :: cc,dd,sz123 + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_gatherV(xval,nelem,MPI_DOUBLE_PRECISION,recvbuf,recvcounts,displs,& +& MPI_DOUBLE_PRECISION,root,comm,ier) + else if (comm == MPI_COMM_SELF) then +#endif + sz123=size(xval,1)*size(xval,2)*size(xval,3) + dd=0;if (size(displs)>0) dd=displs(1)/sz123 + cc=size(xval,4);if (size(recvcounts)>0) cc=recvcounts(1)/sz123 + recvbuf(:,:,:,dd+1:dd+cc)=xval(:,:,:,1:cc) +#if defined HAVE_MPI + end if +#endif + +end subroutine xmpi_gatherv_dp4d +!!*** + +!!****f* ABINIT/xmpi_gatherv_dp5d +!! NAME +!! xmpi_gatherv_dp5d +!! +!! FUNCTION +!! Gathers data from all tasks and delivers it to all. +!! Target: double precision four-dimensional arrays. +!! +!! INPUTS +!! xval= buffer array +!! recvcounts= number of received elements +!! displs= relative offsets for incoming data +!! nelem= number of elements +!! root= rank of receiving process +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! recvbuf= received buffer +!! +!! SOURCE + +subroutine xmpi_gatherv_dp5d(xval,nelem,recvbuf,recvcounts,displs,root,comm,ier) + +!Arguments------------------------- + real(dp), DEV_CONTARRD intent(in) :: xval(:,:,:,:,:) + real(dp), DEV_CONTARRD intent(inout) :: recvbuf(:,:,:,:,:) + integer, DEV_CONTARRD intent(in) :: recvcounts(:),displs(:) + integer,intent(in) :: nelem,root,comm + integer,intent(out) :: ier + +!Local variables------------------- + integer :: cc,dd,sz1234 + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_gatherV(xval,nelem,MPI_DOUBLE_PRECISION,recvbuf,recvcounts,displs,& +& MPI_DOUBLE_PRECISION,root,comm,ier) + else if (comm == MPI_COMM_SELF) then +#endif + sz1234=size(xval,1)*size(xval,2)*size(xval,3)*size(xval,4) + dd=0;if (size(displs)>0) dd=displs(1)/sz1234 + cc=size(xval,5);if (size(recvcounts)>0) cc=recvcounts(1)/sz1234 + recvbuf(:,:,:,:,dd+1:dd+cc)=xval(:,:,:,:,1:cc) +#if defined HAVE_MPI + end if +#endif +!!*** + +end subroutine xmpi_gatherv_dp5d + +!!****f* ABINIT/xmpi_gatherv_dp6d +!! NAME +!! xmpi_gatherv_dp6d +!! +!! FUNCTION +!! Gathers data from all tasks and delivers it to all. +!! Target: double precision four-dimensional arrays. +!! +!! INPUTS +!! xval= buffer array +!! recvcounts= number of received elements +!! displs= relative offsets for incoming data +!! nelem= number of elements +!! root= rank of receiving process +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! recvbuf= received buffer +!! +!! SOURCE + +subroutine xmpi_gatherv_dp6d(xval,nelem,recvbuf,recvcounts,displs,root,comm,ier) + +!Arguments------------------------- + real(dp), DEV_CONTARRD intent(in) :: xval(:,:,:,:,:,:) + real(dp), DEV_CONTARRD intent(inout) :: recvbuf(:,:,:,:,:,:) + integer, DEV_CONTARRD intent(in) :: recvcounts(:),displs(:) + integer,intent(in) :: nelem,root,comm + integer,intent(out) :: ier + +!Local variables------------------- + integer :: cc,dd,sz12345 + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_gatherV(xval,nelem,MPI_DOUBLE_PRECISION,recvbuf,recvcounts,displs,& +& MPI_DOUBLE_PRECISION,root,comm,ier) + else if (comm == MPI_COMM_SELF) then +#endif + sz12345=size(xval,1)*size(xval,2)*size(xval,3)*size(xval,4)*size(xval,5) + dd=0;if (size(displs)>0) dd=displs(1)/sz12345 + cc=size(xval,6);if (size(recvcounts)>0) cc=recvcounts(1)/sz12345 + recvbuf(:,:,:,:,:,dd+1:dd+cc)=xval(:,:,:,:,:,1:cc) +#if defined HAVE_MPI + end if +#endif + +end subroutine xmpi_gatherv_dp6d +!!*** diff --git a/GX-PAW/common/src/12_hide_mpi/xmpi_iallgather.finc b/GX-PAW/common/src/12_hide_mpi/xmpi_iallgather.finc new file mode 100644 index 00000000..ef5c4f4d --- /dev/null +++ b/GX-PAW/common/src/12_hide_mpi/xmpi_iallgather.finc @@ -0,0 +1,80 @@ +!{\src2tex{textfont=tt}} +!!****f* ABINIT/xmpi_iallgather +!! NAME +!! xmpi_iallgather +!! +!! FUNCTION +!! This module contains functions that calls MPI routine, +!! if we compile the code using the MPI CPP flags. +!! xmpi_iallgather is the generic function. +!! +!! COPYRIGHT +!! Copyright (C) 2001-2024 ABINIT group (MG) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~ABINIT/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! SOURCE + +!!*** + +!!****f* ABINIT/xmpi_iallgather_dp4d +!! NAME +!! xmpi_iallgather_dp4d +!! +!! FUNCTION +!! Gathers data from all tasks and distributes it to all. Non-blocking version +!! Target: double precision four-dimensional arrays. +!! +!! INPUTS +!! xval= buffer array +!! nelem= number of elements +!! comm= MPI communicator +!! +!! OUTPUT +!! ierr= exit status, a non-zero value meaning there is an error +!! request: MPI request +!! +!! SIDE EFFECTS +!! recvbuf= received elements +!! +!! PARENTS +!! +!! CHILDREN +!! mpi_allgather +!! +!! SOURCE + +subroutine xmpi_iallgather_dp4d(xval, nelem, recvbuf, comm, request) + +!Arguments------------------------- + real(dp) ABI_ASYNC, intent(in) :: xval(:,:,:,:) + real(dp) ABI_ASYNC, intent(inout) :: recvbuf(:,:,:,:) + integer ,intent(in) :: nelem,comm + integer,intent(out) :: request + +!Local variables------------------- + integer :: ierr + +! ************************************************************************* + ierr = 0 + +#ifdef HAVE_MPI_IALLGATHER + ! Requires MPI3 + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_IALLGATHER(xval, nelem, MPI_DOUBLE_PRECISION, recvbuf, nelem, MPI_DOUBLE_PRECISION, comm, request, ierr) + xmpi_count_requests = xmpi_count_requests + 1 + else if (comm == MPI_COMM_SELF) then + recvbuf = xval + request = xmpi_request_null + end if + return +#endif + + ! Call the blocking version and return null request. + ! write(*,*)"will block here and return fake request" + call xmpi_allgather(xval, nelem, recvbuf, comm, ierr) + request = xmpi_request_null + +end subroutine xmpi_iallgather_dp4d +!!*** diff --git a/GX-PAW/common/src/12_hide_mpi/xmpi_ialltoall.finc b/GX-PAW/common/src/12_hide_mpi/xmpi_ialltoall.finc new file mode 100644 index 00000000..eecdf2c0 --- /dev/null +++ b/GX-PAW/common/src/12_hide_mpi/xmpi_ialltoall.finc @@ -0,0 +1,72 @@ +!{\src2tex{textfont=tt}} +!!****f* ABINIT/xmpi_ialltoall +!! NAME +!! xmpi_ialltoall +!! +!! FUNCTION +!! This module contains functions that calls MPI routine, +!! if we compile the code using the MPI CPP flags. +!! xmpi_ialltoall is the generic function. +!! +!! COPYRIGHT +!! Copyright (C) 2001-2024 ABINIT group (MG) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~ABINIT/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! SOURCE + +!!*** + +!!****f* ABINIT/xmpi_ialltoall_dp4d +!! NAME +!! xmpi_ialltoall_dp4d +!! +!! FUNCTION +!! Sends data from all to all processes. +!! Target: double precision four-dimensional arrays. +!! Non-blocking version. +!! +!! INPUTS +!! +!! OUTPUT +!! +!! PARENTS +!! +!! CHILDREN +!! mpi_alltoall +!! +!! SOURCE + +subroutine xmpi_ialltoall_dp4d(xval, sendsize, recvbuf, recvsize, comm, request) + +!Arguments------------------------- + real(dp) ABI_ASYNC, intent(in) :: xval(:,:,:,:) + real(dp) ABI_ASYNC, intent(inout) :: recvbuf(:,:,:,:) + integer,intent(in) :: sendsize,recvsize,comm + integer,intent(out) :: request + +!Local variables------------------- + integer :: ierr + +! ************************************************************************* + +#ifdef HAVE_MPI_IALLTOALL + ! Requires MPI3 + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_IALLTOALL(& + xval, sendsize, MPI_DOUBLE_PRECISION,& + recvbuf,recvsize, MPI_DOUBLE_PRECISION, comm, request, ierr) + xmpi_count_requests = xmpi_count_requests + 1 + return + end if + return +#endif + + ! Call the blocking version and return null request. + ! write(*,*)"will block here and return fake request" + call xmpi_alltoall(xval, sendsize, recvbuf, recvsize, comm, ierr) + request = xmpi_request_null + +end subroutine xmpi_ialltoall_dp4d +!!*** diff --git a/GX-PAW/common/src/12_hide_mpi/xmpi_ialltoallv.finc b/GX-PAW/common/src/12_hide_mpi/xmpi_ialltoallv.finc new file mode 100644 index 00000000..656da98a --- /dev/null +++ b/GX-PAW/common/src/12_hide_mpi/xmpi_ialltoallv.finc @@ -0,0 +1,155 @@ +!{\src2tex{textfont=tt}} +!!****f* ABINIT/xmpi_ialltoallv_dp2d +!! NAME +!! xmpi_ialltoallv_dp2d +!! +!! FUNCTION +!! This module contains functions calling the non-blocking MPI routine IALLTOALLV +!! xmpi_ialltoallv is the generic function. +!! +!! COPYRIGHT +!! Copyright (C) 2001-2024 ABINIT group (MG) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~ABINIT/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! INPUTS +!! xval= buffer array +!! sendcnts= number of sent elements +!! sdispls= postions of values sent by the processor +!! rdispls= positions of values received by the processor +!! recvcnts= number of received elements +!! comm= MPI communicator +!! +!! OUTPUT +!! request= MPI request +!! +!! SIDE EFFECTS +!! recvbuf= received buffer +!! +!! PARENTS +!! +!! CHILDREN +!! mpi_ialltoallv +!! +!! SOURCE + +subroutine xmpi_ialltoallv_dp2d(xval,sendcnts,sdispls,recvbuf,recvcnts,rdispls,comm,request) + +!Arguments------------------------- + real(dp) ABI_ASYNC, intent(in) :: xval(:,:) + real(dp) ABI_ASYNC, intent(inout) :: recvbuf(:,:) + integer ABI_ASYNC, intent(in) :: sendcnts(:),sdispls(:),rdispls(:),recvcnts(:) + integer ,intent(in) :: comm + integer ,intent(out) :: request + +!Local variables------------------- + integer :: ierr + +! ********************************************************************* + +#ifdef HAVE_MPI_IALLTOALLV + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_IALLTOALLV(xval,sendcnts,sdispls,MPI_DOUBLE_PRECISION,recvbuf,& + recvcnts,rdispls,MPI_DOUBLE_PRECISION,comm,request,ierr) + xmpi_count_requests = xmpi_count_requests + 1 + return + end if +#endif + + ! Call the blocking version and return null request. + call xmpi_alltoallv(xval,sendcnts,sdispls,recvbuf,recvcnts,rdispls,comm,ierr) + request = xmpi_request_null + +end subroutine xmpi_ialltoallv_dp2d +!!*** + +!!****f* ABINIT/xmpi_ialltoallv_int2d +!! NAME +!! xmpi_ialltoallv_int2d +!! +!! FUNCTION +!! Sends data from all to all processes. +!! Target: two-dimensional integer arrays. +!! +!! PARENTS +!! +!! CHILDREN +!! mpi_ialltoallv +!! +!! SOURCE + +subroutine xmpi_ialltoallv_int2d(xval,sendcnts,sdispls,recvbuf,recvcnts,rdispls,comm,request) + +!Arguments------------------------- + integer ABI_ASYNC, intent(in) :: xval(:,:) + integer ABI_ASYNC, intent(inout) :: recvbuf(:,:) + integer ABI_ASYNC, intent(in) :: sendcnts(:),sdispls(:),rdispls(:),recvcnts(:) + integer,intent(in) :: comm + integer,intent(out) :: request + +!Local variables------------------- + integer :: ierr + +! ********************************************************************* + +#ifdef HAVE_MPI_IALLTOALLV + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_IALLTOALLV(xval,sendcnts,sdispls,MPI_INTEGER,recvbuf,& + recvcnts,rdispls,MPI_INTEGER,comm,request,ierr) + xmpi_count_requests = xmpi_count_requests + 1 + return + end if +#endif + + ! Call the blocking version and return null request. + call xmpi_alltoallv(xval,sendcnts,sdispls,recvbuf,recvcnts,rdispls,comm,ierr) + request = xmpi_request_null + +end subroutine xmpi_ialltoallv_int2d +!!*** + +!!****f* ABINIT/xmpi_ialltoallv_dp1d2 +!! NAME +!! xmpi_ialltoallv_dp1d2 +!! +!! FUNCTION +!! Sends data from all to all processes. +!! Target: double precision one-dimensional arrays. +!! +!! PARENTS +!! +!! CHILDREN +!! mpi_ialltoallv +!! +!! SOURCE + +subroutine xmpi_ialltoallv_dp1d2(xval,sendcnts,sdispls,recvbuf,recvcnts,rdispls,comm,request) + +!Arguments------------------------- + real(dp) ABI_ASYNC, intent(in) :: xval(:) + real(dp) ABI_ASYNC, intent(inout) :: recvbuf(:) + integer ABI_ASYNC, intent(in) :: sendcnts(:),sdispls(:),recvcnts(:),rdispls(:) + integer,intent(in) :: comm + integer,intent(out) :: request + +!Local variables------------------- + integer :: ierr + +! ********************************************************************* + +#ifdef HAVE_MPI_IALLTOALLV + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_IALLTOALLV(xval,sendcnts,sdispls,MPI_DOUBLE_PRECISION,recvbuf,& + recvcnts,rdispls,MPI_DOUBLE_PRECISION,comm,request,ierr) + xmpi_count_requests = xmpi_count_requests + 1 + return + end if +#endif + + ! Call the blocking version and return null request. + call xmpi_alltoallv(xval,sendcnts,sdispls,recvbuf,recvcnts,rdispls,comm,ierr) + request = xmpi_request_null + +end subroutine xmpi_ialltoallv_dp1d2 +!!*** diff --git a/GX-PAW/common/src/12_hide_mpi/xmpi_ibcast.finc b/GX-PAW/common/src/12_hide_mpi/xmpi_ibcast.finc new file mode 100644 index 00000000..88d8c955 --- /dev/null +++ b/GX-PAW/common/src/12_hide_mpi/xmpi_ibcast.finc @@ -0,0 +1,379 @@ +!{\src2tex{textfont=tt}} +!!****f* ABINIT/xmpi_ibcast +!! NAME +!! xmpi_ibcast +!! +!! FUNCTION +!! This module contains functions that calls MPI routine MPI_IBCAST, +!! to broadcast data from one processor to other procs inside a communicator, +!! if we compile the code using the MPI CPP flags. +!! xmpi_ibcast is the generic function. +!! +!! COPYRIGHT +!! Copyright (C) 2001-2024 ABINIT group (MG) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~ABINIT/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! SOURCE +!!*** + +!!****f* ABINIT/xmpi_ibcast_int1d +!! NAME +!! xmpi_ibcast_int1d +!! +!! FUNCTION +!! Sends data from one processor to others inside comm without blocking +!! Target: integer one-dimensional arrays. +!! +!! INPUTS +!! root: rank of broadcast root (integer) +!! comm: MPI communicator +!! +!! OUTPUT +!! ierr= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_ibcast_int1d(xval, root, comm, request, ierr) + +!Arguments------------------------- + integer ABI_ASYNC, intent(inout) :: xval(:) + integer, intent(in) :: root, comm + integer, intent(out) :: request, ierr + +! ************************************************************************* + + ierr=0 +#ifdef HAVE_MPI_IBCAST + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_IBCAST(xval, product(shape(xval)), MPI_INTEGER, root, comm, request, ierr) + xmpi_count_requests = xmpi_count_requests + 1 + return + end if +#endif + + ! Call the blocking version and return null request. + call xmpi_bcast(xval, root, comm, ierr) + request = xmpi_request_null + +end subroutine xmpi_ibcast_int1d +!!*** + +!!****f* ABINIT/xmpi_ibcast_int4d +!! NAME +!! xmpi_ibcast_int4d +!! +!! FUNCTION +!! Sends data from one processor to others inside comm without blocking +!! Target: integer one-dimensional arrays. +!! +!! INPUTS +!! root: rank of broadcast root (integer) +!! comm: MPI communicator +!! +!! OUTPUT +!! ierr= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_ibcast_int4d(xval, root, comm, request, ierr) + +!Arguments------------------------- + integer ABI_ASYNC, intent(inout) :: xval(:,:,:,:) + integer, intent(in) :: root, comm + integer, intent(out) :: request, ierr + +! ************************************************************************* + + ierr=0 +#ifdef HAVE_MPI_IBCAST + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_IBCAST(xval, product(shape(xval)), MPI_INTEGER, root, comm, request, ierr) + xmpi_count_requests = xmpi_count_requests + 1 + return + end if +#endif + + ! Call the blocking version and return null request. + call xmpi_bcast(xval, root, comm, ierr) + request = xmpi_request_null + +end subroutine xmpi_ibcast_int4d +!!*** + +!!****f* ABINIT/xmpi_ibcast_dp1d +!! NAME +!! xmpi_ibcast_int1d +!! +!! FUNCTION +!! Sends data from one processor to others inside comm without blocking +!! Target: double one-dimensional dp arrays. +!! +!! INPUTS +!! root: rank of broadcast root (integer) +!! comm: MPI communicator +!! +!! OUTPUT +!! ierr= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_ibcast_dp1d(xval, root, comm, request, ierr) + +!Arguments------------------------- + real(dp) ABI_ASYNC, intent(inout) :: xval(:) + integer, intent(in) :: root, comm + integer, intent(out) :: request, ierr + +! ************************************************************************* + + ierr=0 +#ifdef HAVE_MPI_IBCAST + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_IBCAST(xval, product(shape(xval)), MPI_DOUBLE_PRECISION, root, comm, request, ierr) + xmpi_count_requests = xmpi_count_requests + 1 + return + end if +#endif + + ! Call the blocking version and return null request. + call xmpi_bcast(xval, root, comm, ierr) + request = xmpi_request_null + +end subroutine xmpi_ibcast_dp1d +!!*** + +!!****f* ABINIT/xmpi_ibcast_dp2d +!! NAME +!! xmpi_ibcast_dp2d +!! +!! FUNCTION +!! Sends data from one processor to others inside comm without blocking +!! Target: double two-dimensional dp arrays. +!! +!! INPUTS +!! root: rank of broadcast root (integer) +!! comm: MPI communicator +!! +!! OUTPUT +!! ierr= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_ibcast_dp2d(xval, root, comm, request, ierr) + +!Arguments------------------------- + real(dp) ABI_ASYNC, intent(inout) :: xval(:, :) + integer, intent(in) :: root, comm + integer, intent(out) :: request, ierr + +! ************************************************************************* + + ierr=0 +#ifdef HAVE_MPI_IBCAST + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_IBCAST(xval, product(shape(xval)), MPI_DOUBLE_PRECISION, root, comm, request, ierr) + xmpi_count_requests = xmpi_count_requests + 1 + return + end if +#endif + + ! Call the blocking version and return null request. + call xmpi_bcast(xval, root, comm, ierr) + request = xmpi_request_null + +end subroutine xmpi_ibcast_dp2d +!!*** + +!!****f* ABINIT/xmpi_ibcast_dp3d +!! NAME +!! xmpi_ibcast_dp3d +!! +!! FUNCTION +!! Sends data from one processor to others inside comm without blocking +!! Target: double three-dimensional dp arrays. +!! +!! INPUTS +!! root: rank of broadcast root (integer) +!! comm: MPI communicator +!! +!! OUTPUT +!! ierr= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_ibcast_dp3d(xval, root, comm, request, ierr) + +!Arguments------------------------- + real(dp) ABI_ASYNC, intent(inout) :: xval(:, :, :) + integer, intent(in) :: root, comm + integer, intent(out) :: request, ierr + +! ************************************************************************* + + ierr=0 +#ifdef HAVE_MPI_IBCAST + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_IBCAST(xval, product(shape(xval)), MPI_DOUBLE_PRECISION, root, comm, request, ierr) + xmpi_count_requests = xmpi_count_requests + 1 + return + end if +#endif + + ! Call the blocking version and return null request. + call xmpi_bcast(xval, root, comm, ierr) + request = xmpi_request_null + +end subroutine xmpi_ibcast_dp3d +!!*** + +!!****f* ABINIT/xmpi_ibcast_dp4d +!! NAME +!! xmpi_ibcast_dp4d +!! +!! FUNCTION +!! Sends data from one processor to others inside comm without blocking +!! Target: double three-dimensional dp arrays. +!! +!! INPUTS +!! root: rank of broadcast root (integer) +!! comm: MPI communicator +!! +!! OUTPUT +!! ierr= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_ibcast_dp4d(xval, root, comm, request, ierr) + +!Arguments------------------------- + real(dp) ABI_ASYNC, intent(inout) :: xval(:, :, :, :) + integer, intent(in) :: root, comm + integer, intent(out) :: request, ierr + +! ************************************************************************* + + ierr=0 +#ifdef HAVE_MPI_IBCAST + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_IBCAST(xval, product(shape(xval)), MPI_DOUBLE_PRECISION, root, comm, request, ierr) + xmpi_count_requests = xmpi_count_requests + 1 + return + end if +#endif + + ! Call the blocking version and return null request. + call xmpi_bcast(xval, root, comm, ierr) + request = xmpi_request_null + +end subroutine xmpi_ibcast_dp4d +!!*** + +!!****f* ABINIT/xmpi_ibcast_dpc2d +!! NAME +!! xmpi_ibcast_dpc2d +!! +!! FUNCTION +!! Sends data from one processor to others inside comm without blocking +!! Target: double precision two-dimensional complex arrays. +!! +!! INPUTS +!! root: rank of broadcast root (integer) +!! comm: MPI communicator +!! +!! OUTPUT +!! ierr= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_ibcast_dpc2d(xval, root, comm, request, ierr) + +!Arguments------------------------- + complex(dp) ABI_ASYNC, intent(inout) :: xval(:, :) + integer, intent(in) :: root, comm + integer, intent(out) :: request, ierr + +! ************************************************************************* + + ierr=0 +#ifdef HAVE_MPI_IBCAST + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_IBCAST(xval, product(shape(xval)), MPI_DOUBLE_COMPLEX, root, comm, request, ierr) + xmpi_count_requests = xmpi_count_requests + 1 + return + end if +#endif + + ! Call the blocking version and return null request. + call xmpi_bcast(xval, root, comm, ierr) + request = xmpi_request_null + +end subroutine xmpi_ibcast_dpc2d +!!*** + +!!****f* ABINIT/xmpi_ibcast_spc2d +!! NAME +!! xmpi_ibcast_spc2d +!! +!! FUNCTION +!! Sends data from one processor to others inside comm without blocking +!! Target: single precision two-dimensional complex arrays. +!! +!! INPUTS +!! root: rank of broadcast root (integer) +!! comm: MPI communicator +!! +!! OUTPUT +!! ierr= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_ibcast_spc2d(xval, root, comm, request, ierr) + +!Arguments------------------------- + complex(sp) ABI_ASYNC, intent(inout) :: xval(:, :) + integer, intent(in) :: root, comm + integer, intent(out) :: request, ierr + +! ************************************************************************* + + ierr=0 +#ifdef HAVE_MPI_IBCAST + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_IBCAST(xval, product(shape(xval)), MPI_COMPLEX, root, comm, request, ierr) + xmpi_count_requests = xmpi_count_requests + 1 + return + end if +#endif + + ! Call the blocking version and return null request. + call xmpi_bcast(xval, root, comm, ierr) + request = xmpi_request_null + +end subroutine xmpi_ibcast_spc2d +!!*** diff --git a/GX-PAW/common/src/12_hide_mpi/xmpi_irecv.finc b/GX-PAW/common/src/12_hide_mpi/xmpi_irecv.finc new file mode 100644 index 00000000..55b92362 --- /dev/null +++ b/GX-PAW/common/src/12_hide_mpi/xmpi_irecv.finc @@ -0,0 +1,337 @@ +!{\src2tex{textfont=tt}} +!!****f* ABINIT/xmpi_irecv +!! NAME +!! xmpi_irecv +!! +!! FUNCTION +!! This module contains functions that call MPI routine MPI_IRECV, +!! to receive data on one processor sent by another, +!! if we compile the code using the MPI CPP flags. +!! xmpi_irecv is the generic function. +!! +!! COPYRIGHT +!! Copyright (C) 2001-2024 ABINIT group +!! This file is distributed under the terms of the +!! GNU General Public License, see ~ABINIT/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! TODO +!! +!! SOURCE +!!*** + +!!****f* ABINIT/xmpi_irecv_intv +!! NAME +!! xmpi_irecv_intv +!! +!! FUNCTION +!! Receives data from one processor sent by another. +!! Target: single integer. +!! +!! INPUTS +!! source :: rank of source process +!! tag :: integer message tag +!! comm :: MPI communicator +!! +!! OUTPUT +!! ierr= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! NOTES +!! status of MPI_IRECV is explicitly ignored +!! +!! PARENTS +!! +!! CHILDREN +!! mpi_irecv +!! +!! SOURCE + +subroutine xmpi_irecv_intv(xval,source,tag,comm,request,ierr) + +!Arguments------------------------- + integer ABI_ASYNC, intent(inout), target :: xval + integer,intent(in) :: source,tag,comm + integer,intent(out) :: ierr + integer, intent(out) :: request + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_tag + integer, pointer :: arr_xval(:) + type(c_ptr) :: cptr +#endif + +! ************************************************************************* + + ierr=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + my_tag=MOD(tag,xmpi_tag_ub) + cptr=c_loc(xval) ; call c_f_pointer(cptr,arr_xval,[1]) + call MPI_IRECV(arr_xval,1,MPI_INTEGER,source,my_tag,comm,request,ierr) + xmpi_count_requests = xmpi_count_requests + 1 + end if +#endif + + end subroutine xmpi_irecv_intv +!!*** + +!!****f* ABINIT/xmpi_irecv_int1d +!! NAME +!! xmpi_irecv_int1d +!! +!! FUNCTION +!! Sends data from one processor to another. +!! Target: integer one-dimensional arrays. +!! +!! INPUTS +!! dest :: rank of destination process +!! tag :: integer message tag +!! comm :: MPI communicator +!! +!! OUTPUT +!! ierr= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! PARENTS +!! +!! CHILDREN +!! mpi_irecv +!! +!! SOURCE + +subroutine xmpi_irecv_int1d(xval,source,tag,comm,request,ierr) + +!Arguments------------------------- + integer ABI_ASYNC, intent(inout) :: xval(:) + integer,intent(in) :: source,tag,comm + integer, intent(out) :: request + integer,intent(out) :: ierr +!Local variables------------------- + +#if defined HAVE_MPI + integer :: n1,my_tag +#endif + +! ************************************************************************* + + ierr=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + my_tag=MOD(tag,xmpi_tag_ub) + n1=size(xval) + call MPI_IRECV(xval,n1,MPI_INTEGER,source,my_tag,comm,request,ierr) + xmpi_count_requests = xmpi_count_requests + 1 + end if +#endif + + end subroutine xmpi_irecv_int1d +!!*** + +!!****f* ABINIT/xmpi_irecv_dp1d +!! NAME +!! xmpi_irecv_dp1d +!! +!! FUNCTION +!! Receives data from one proc sent by another. +!! Target: double precision one-dimensional arrays. +!! +!! INPUTS +!! source :: rank of source process +!! tag :: integer message tag +!! comm :: MPI communicator +!! +!! OUTPUT +!! ierr= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! NOTES +!! status of MPI_IRECV is explicitly ignored +!! +!! PARENTS +!! +!! CHILDREN +!! mpi_irecv +!! +!! SOURCE + +subroutine xmpi_irecv_dp1d(xval,source,tag,comm,request,ierr) + +!Arguments------------------------- + real(dp) ABI_ASYNC, intent(inout) :: xval(:) + integer, intent(in) :: source,tag,comm + integer, intent(out) :: ierr + integer, intent(out) :: request + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_tag,n1 +#endif + +! ************************************************************************* + + ierr=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + n1=size(xval,dim=1) + my_tag=MOD(tag,xmpi_tag_ub) + call MPI_IRECV(xval,n1,MPI_DOUBLE_PRECISION,source,my_tag,comm,request,ierr) + xmpi_count_requests = xmpi_count_requests + 1 + end if +#endif + +end subroutine xmpi_irecv_dp1d +!!*** + +!!****f* ABINIT/xmpi_irecv_dp2d +!! NAME +!! xmpi_irecv_dp2d +!! +!! FUNCTION +!! Receives data from one proc sent by another. +!! Target: double precision one-dimensional arrays. +!! +!! INPUTS +!! source :: rank of source process +!! tag :: integer message tag +!! comm :: MPI communicator +!! +!! OUTPUT +!! ierr= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! NOTES +!! status of MPI_IRECV is explicitly ignored +!! +!! PARENTS +!! +!! CHILDREN +!! mpi_irecv +!! +!! SOURCE + +subroutine xmpi_irecv_dp2d(xval,source,tag,comm,request,ierr) + +!Arguments------------------------- + real(dp) ABI_ASYNC, intent(inout) :: xval(:,:) + integer, intent(in) :: source,tag,comm + integer, intent(out) :: ierr + integer, intent(out) :: request + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,my_tag,n1,n2 + integer(kind=int64) :: ntot +#endif + +! ************************************************************************* + + ierr=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + n1=size(xval,dim=1) + n2=size(xval,dim=2) + my_tag=MOD(tag,xmpi_tag_ub) + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2,kind=int64) + + if (ntot<=xmpi_maxint32_64) then + call MPI_IRECV(xval,n1*n2,MPI_DOUBLE_PRECISION,source,my_tag,comm,request,ierr) + else + call xmpi_largetype_create(ntot,MPI_DOUBLE_PRECISION,my_dt,my_op,MPI_OP_NULL) + call MPI_IRECV(xval,1,my_dt,source,my_tag,comm,request,ierr) + call xmpi_largetype_free(my_dt,my_op) + end if + + xmpi_count_requests = xmpi_count_requests + 1 + end if +#endif + +end subroutine xmpi_irecv_dp2d +!!*** + +!!****f* ABINIT/xmpi_irecv_dp3d +!! NAME +!! xmpi_irecv_dp3d +!! +!! FUNCTION +!! Receives data from one proc sent by another. +!! Target: double precision one-dimensional arrays. +!! +!! INPUTS +!! source :: rank of source process +!! tag :: integer message tag +!! comm :: MPI communicator +!! +!! OUTPUT +!! ierr= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! NOTES +!! status of MPI_IRECV is explicitly ignored +!! +!! PARENTS +!! +!! CHILDREN +!! mpi_irecv +!! +!! SOURCE + +subroutine xmpi_irecv_dp3d(xval,source,tag,comm,request,ierr) + +!Arguments------------------------- + real(dp) ABI_ASYNC, intent(inout) :: xval(:,:,:) + integer, intent(in) :: source,tag,comm + integer, intent(out) :: ierr + integer, intent(out) :: request + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,my_tag,n1,n2,n3 + integer(kind=int64) :: ntot +#endif + +! ************************************************************************* + + ierr=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + n1=size(xval,dim=1) + n2=size(xval,dim=2) + n3=size(xval,dim=3) + my_tag=MOD(tag,xmpi_tag_ub) + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2*n3,kind=int64) + + if (ntot<=xmpi_maxint32_64) then + call MPI_IRECV(xval,n1*n2*n3,MPI_DOUBLE_PRECISION,source,my_tag,comm,request,ierr) + else + call xmpi_largetype_create(ntot,MPI_DOUBLE_PRECISION,my_dt,my_op,MPI_OP_NULL) + call MPI_IRECV(xval,1,my_dt,source,my_tag,comm,request,ierr) + call xmpi_largetype_free(my_dt,my_op) + end if + + xmpi_count_requests = xmpi_count_requests + 1 + end if +#endif + +end subroutine xmpi_irecv_dp3d +!!*** + diff --git a/GX-PAW/common/src/12_hide_mpi/xmpi_isend.finc b/GX-PAW/common/src/12_hide_mpi/xmpi_isend.finc new file mode 100644 index 00000000..f26f6dc7 --- /dev/null +++ b/GX-PAW/common/src/12_hide_mpi/xmpi_isend.finc @@ -0,0 +1,252 @@ +!{\src2tex{textfont=tt}} +!!****f* ABINIT/xmpi_isend +!! NAME +!! xmpi_isend +!! +!! FUNCTION +!! This module contains functions that calls MPI routine MPI_ISEND, +!! to send data from one processor to another, +!! if we compile the code using the MPI CPP flags. +!! xmpi_isend is the generic function. +!! +!! COPYRIGHT +!! Copyright (C) 2001-2024 ABINIT group +!! This file is distributed under the terms of the +!! GNU General Public License, see ~ABINIT/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! TODO +!! +!! SOURCE +!!*** + +!!****f* ABINIT/xmpi_isend_int1d +!! NAME +!! xmpi_isend_int1d +!! +!! FUNCTION +!! Sends data from one processor to another. +!! Target: integer one-dimensional arrays. +!! +!! INPUTS +!! dest :: rank of destination process +!! tag :: integer message tag +!! comm :: MPI communicator +!! +!! OUTPUT +!! ierr= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_isend_int1d(xval,dest,tag,comm,request,ierr) + +!Arguments------------------------- + integer ABI_ASYNC, intent(inout) :: xval(:) + integer, intent(in) :: dest,tag,comm + integer, intent(out) :: ierr + integer, intent(out) :: request + +!Local variables------------------- +#if defined HAVE_MPI + integer :: ier,my_tag,n1 +#endif + +! ************************************************************************* + + ierr=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + n1=size(xval,dim=1) + my_tag = MOD(tag,xmpi_tag_ub) + call MPI_ISEND(xval,n1,MPI_INTEGER,dest,my_tag,comm,request,ier) + xmpi_count_requests = xmpi_count_requests + 1 + ierr=ier + end if +#endif + + end subroutine xmpi_isend_int1d +!!*** + +!!****f* ABINIT/xmpi_isend_dp1d +!! NAME +!! xmpi_isend_dp1d +!! +!! FUNCTION +!! Sends data from one proc to another. +!! Target: double precision two-dimensional arrays. +!! +!! INPUTS +!! dest :: rank of destination process +!! tag :: integer message tag +!! comm :: MPI communicator +!! +!! OUTPUT +!! ierr= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_isend_dp1d(xval,dest,tag,comm,request,ierr) + +!Arguments------------------------- + real(dp) ABI_ASYNC, intent(inout) :: xval(:) + integer, intent(in) :: dest,tag,comm + integer, intent(out) :: ierr + integer, intent(out) :: request + +!Local variables------------------- +#if defined HAVE_MPI + integer :: ier,my_tag,n1 +#endif + +! ************************************************************************* + + ierr=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + n1=size(xval) + my_tag = MOD(tag,xmpi_tag_ub) + call MPI_ISEND(xval,n1,MPI_DOUBLE_PRECISION,dest,my_tag,comm,request,ier) + xmpi_count_requests = xmpi_count_requests + 1 + ierr=ier + end if +#endif + +end subroutine xmpi_isend_dp1d +!!*** + +!!****f* ABINIT/xmpi_isend_dp2d +!! NAME +!! xmpi_isend_dp2d +!! +!! FUNCTION +!! Sends data from one proc to another. +!! Target: double precision two-dimensional arrays. +!! +!! INPUTS +!! dest :: rank of destination process +!! tag :: integer message tag +!! comm :: MPI communicator +!! +!! OUTPUT +!! ierr= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_isend_dp2d(xval,dest,tag,comm,request,ierr) + +!Arguments------------------------- + real(dp) ABI_ASYNC, intent(inout) :: xval(:,:) + integer, intent(in) :: dest,tag,comm + integer, intent(out) :: ierr + integer, intent(out) :: request + +!Local variables------------------- +#if defined HAVE_MPI + integer :: ier,my_dt,my_op,my_tag,n1,n2 + integer(kind=int64) :: ntot +#endif + +! ************************************************************************* + + ierr=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + n1=size(xval,dim=1) + n2=size(xval,dim=2) + my_tag = MOD(tag,xmpi_tag_ub) + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2,kind=int64) + + if (ntot<=xmpi_maxint32_64) then + call MPI_ISEND(xval,n1*n2,MPI_DOUBLE_PRECISION,dest,my_tag,comm,request,ier) + else + call xmpi_largetype_create(ntot,MPI_DOUBLE_PRECISION,my_dt,my_op,MPI_OP_NULL) + call MPI_ISEND(xval,1,my_dt,dest,my_tag,comm,request,ier) + call xmpi_largetype_free(my_dt,my_op) + end if + + xmpi_count_requests = xmpi_count_requests + 1 + ierr=ier + end if +#endif + +end subroutine xmpi_isend_dp2d +!!*** + +!!****f* ABINIT/xmpi_isend_dp3d +!! NAME +!! xmpi_isend_dp3d +!! +!! FUNCTION +!! Sends data from one proc to another. +!! Target: double precision two-dimensional arrays. +!! +!! INPUTS +!! dest :: rank of destination process +!! tag :: integer message tag +!! comm :: MPI communicator +!! +!! OUTPUT +!! ierr= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_isend_dp3d(xval,dest,tag,comm,request,ierr) + +!Arguments------------------------- + real(dp) ABI_ASYNC, intent(inout) :: xval(:,:,:) + integer, intent(in) :: dest,tag,comm + integer, intent(out) :: ierr + integer, intent(out) :: request + +!Local variables------------------- +#if defined HAVE_MPI + integer :: ier,my_dt,my_op,my_tag,n1,n2,n3 + integer(kind=int64) :: ntot +#endif + +! ************************************************************************* + + ierr=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + n1=size(xval,dim=1) + n2=size(xval,dim=2) + n3=size(xval,dim=3) + my_tag = MOD(tag,xmpi_tag_ub) + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2*n3,kind=int64) + + if (ntot<=xmpi_maxint32_64) then + call MPI_ISEND(xval,n1*n2*n3,MPI_DOUBLE_PRECISION,dest,my_tag,comm,request,ier) + else + call xmpi_largetype_create(ntot,MPI_DOUBLE_PRECISION,my_dt,my_op,MPI_OP_NULL) + call MPI_ISEND(xval,1,my_dt,dest,my_tag,comm,request,ier) + call xmpi_largetype_free(my_dt,my_op) + end if + + xmpi_count_requests = xmpi_count_requests + 1 + ierr=ier + end if +#endif + +end subroutine xmpi_isend_dp3d +!!*** diff --git a/GX-PAW/common/src/12_hide_mpi/xmpi_isum.finc b/GX-PAW/common/src/12_hide_mpi/xmpi_isum.finc new file mode 100644 index 00000000..9ff9d1ad --- /dev/null +++ b/GX-PAW/common/src/12_hide_mpi/xmpi_isum.finc @@ -0,0 +1,553 @@ +!{\src2tex{textfont=tt}} +!!****f* ABINIT/xmpi_isum +!! NAME +!! xmpi_isum +!! +!! FUNCTION +!! This module contains functions that calls MPI routine, +!! if we compile the code using the MPI CPP flags. +!! xmpi_isum is the generic function. +!! +!! COPYRIGHT +!! Copyright (C) 2001-2024 ABINIT group (MG) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~ABINIT/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! NOTES +!! MPI_IALLREDUCE(SENDBUF, RECVBUF, COUNT, DATATYPE, OP, COMM, REQUEST, IERROR) +!! SENDBUF(*), RECVBUF(*) +!! INTEGER COUNT, DATATYPE, OP, COMM, REQUEST, IERROR +!! +!! SOURCE + +!!*** + +!!****f* ABINIT/xmpi_isum_int0d +!! NAME +!! xmpi_isum_int0d +!! +!! FUNCTION +!! Combines values from all processes and distribute the result back to all processes. +!! Target: scalar integers. Non-blocking version. +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +subroutine xmpi_isum_int0d(xval, xsum, comm, request, ierr) + +!Arguments------------------------- + integer ABI_ASYNC, intent(in), target :: xval + integer ABI_ASYNC, intent(out), target :: xsum + integer,intent(in) :: comm + integer,intent(out) :: ierr, request + +!Local variables------------------- + integer :: itmp +#ifdef HAVE_MPI_IALLREDUCE + integer, pointer :: arr_xval(:),arr_xsum(:) + type(c_ptr) :: cptr +#endif + +! ************************************************************************* + +#ifdef HAVE_MPI_IALLREDUCE + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + cptr=c_loc(xval) ; call c_f_pointer(cptr,arr_xval,[1]) + cptr=c_loc(xsum) ; call c_f_pointer(cptr,arr_xsum,[1]) + call MPI_IALLREDUCE(arr_xval, arr_xsum, 1, MPI_INTEGER, MPI_SUM, comm, request, ierr) + xmpi_count_requests = xmpi_count_requests + 1 + return + end if + xsum = xval; request = xmpi_request_null + return +#endif + + ! Call the blocking version and return null request. + !write(std_out,*)"will block here and return fake request" + itmp = xval + call xmpi_sum(itmp, comm, ierr) + xsum = itmp; request = xmpi_request_null + +end subroutine xmpi_isum_int0d +!!*** + +!!****f* ABINIT/xmpi_isum_ip_dp2d +!! NAME +!! xmpi_isum_ip_dp2d +!! +!! FUNCTION +!! Combines values from all processes and distribute the result back to all processes. +!! Target: scalar integers. Non-blocking INPLACE version. +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +subroutine xmpi_isum_ip_dp2d(xval, comm, request, ierr) + +!Arguments------------------------- + real(dp) ABI_ASYNC, intent(inout) :: xval(:,:) + integer,intent(in) :: comm + integer,intent(out) :: ierr, request +#if !defined HAVE_MPI2_INPLACE + integer :: n1,n2 + real(dp) ABI_ASYNC, allocatable :: xsum(:,:) +#endif + +! ************************************************************************* + +#ifdef HAVE_MPI_IALLREDUCE + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then +#if defined HAVE_MPI2_INPLACE + call MPI_IALLREDUCE(MPI_IN_PLACE, xval, product(shape(xval)), MPI_DOUBLE_PRECISION, MPI_SUM, comm, request, ierr) +#else + n1 = size(xval,1) ; n2 = size(xval,2) + ABI_STAT_MALLOC(xsum,(n1,n2), ierr) + if (ierr/= 0) call xmpi_abort(msg='error allocating xsum in xmpi_isum_ip_dp2d') + call MPI_IALLREDUCE(xsum, xval, product(shape(xval)), MPI_DOUBLE_PRECISION, MPI_SUM, comm, request, ierr) + xval (:,:) = xsum(:,:) + ABI_FREE(xsum) +#endif + xmpi_count_requests = xmpi_count_requests + 1 + return + end if + request = xmpi_request_null + return +#endif + + ! Call the blocking version and return null request. + call xmpi_sum(xval, comm, ierr) + request = xmpi_request_null + +end subroutine xmpi_isum_ip_dp2d +!!*** + +!!****f* ABINIT/xmpi_isum_ip_dp3d +!! NAME +!! xmpi_isum_ip_dp3d +!! +!! FUNCTION +!! Combines values from all processes and distribute the result back to all processes. +!! Target: scalar integers. Non-blocking INPLACE version. +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +subroutine xmpi_isum_ip_dp3d(xval, comm, request, ierr) + +!Arguments------------------------- + real(dp) ABI_ASYNC, intent(inout) :: xval(:,:,:) + integer,intent(in) :: comm + integer,intent(out) :: ierr, request +#if !defined HAVE_MPI2_INPLACE + integer :: n1,n2,n3 + real(dp) ABI_ASYNC, allocatable :: xsum(:,:,:) +#endif + +! ************************************************************************* + +#ifdef HAVE_MPI_IALLREDUCE + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then +#if defined HAVE_MPI2_INPLACE + call MPI_IALLREDUCE(MPI_IN_PLACE, xval, product(shape(xval)), MPI_DOUBLE_PRECISION, MPI_SUM, comm, request, ierr) +#else + n1 = size(xval,1) ; n2 = size(xval,2) ; n3 = size(xval,3) + ABI_STAT_MALLOC(xsum,(n1,n2,n3), ierr) + if (ierr/= 0) call xmpi_abort(msg='error allocating xsum in xmpi_isum_ip_dp3d') + call MPI_IALLREDUCE(xsum, xval, product(shape(xval)), MPI_DOUBLE_PRECISION, MPI_SUM, comm, request, ierr) + xval (:,:,:) = xsum(:,:,:) + ABI_FREE(xsum) +#endif + xmpi_count_requests = xmpi_count_requests + 1 + return + end if + request = xmpi_request_null + return +#endif + + ! Call the blocking version and return null request. + call xmpi_sum(xval, comm, ierr) + request = xmpi_request_null + +end subroutine xmpi_isum_ip_dp3d +!!*** + +!!****f* ABINIT/xmpi_isum_ip_dp4d +!! NAME +!! xmpi_isum_ip_dp4d +!! +!! FUNCTION +!! Combines values from all processes and distribute the result back to all processes. +!! Target: scalar integers. Non-blocking INPLACE version. +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +subroutine xmpi_isum_ip_dp4d(xval, comm, request, ierr) + +!Arguments------------------------- + real(dp) ABI_ASYNC, intent(inout) :: xval(:,:,:,:) + integer,intent(in) :: comm + integer,intent(out) :: ierr, request +#if !defined HAVE_MPI2_INPLACE + integer :: n1,n2,n3,n4 + real(dp) ABI_ASYNC, allocatable :: xsum(:,:,:,:) +#endif + +! ************************************************************************* + +#ifdef HAVE_MPI_IALLREDUCE + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then +#if defined HAVE_MPI2_INPLACE + call MPI_IALLREDUCE(MPI_IN_PLACE, xval, product(shape(xval)), MPI_DOUBLE_PRECISION, MPI_SUM, comm, request, ierr) +#else + n1 = size(xval,1) ; n2 = size(xval,2) ; n3 = size(xval,3) ; n4 = size(xval,4) + ABI_STAT_MALLOC(xsum,(n1,n2,n3,n4), ierr) + if (ierr/= 0) call xmpi_abort(msg='error allocating xsum in xmpi_isum_ip_dp4d') + call MPI_IALLREDUCE(xsum, xval, product(shape(xval)), MPI_DOUBLE_PRECISION, MPI_SUM, comm, request, ierr) + xval (:,:,:,:) = xsum(:,:,:,:) + ABI_FREE(xsum) +#endif + xmpi_count_requests = xmpi_count_requests + 1 + return + end if + request = xmpi_request_null + return +#endif + + ! Call the blocking version and return null request. + call xmpi_sum(xval, comm, ierr) + request = xmpi_request_null + +end subroutine xmpi_isum_ip_dp4d +!!*** + +!!****f* ABINIT/xmpi_isum_ip_spc1d +!! NAME +!! xmpi_isum_ip_spc1d +!! +!! FUNCTION +!! Combines values from all processes and distribute the result back to all processes. +!! Target: 1d single precision complex arrays. Non-blocking INPLACE version. +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +subroutine xmpi_isum_ip_spc1d(xval, comm, request, ierr) + +!Arguments------------------------- + complex(sp) ABI_ASYNC, intent(inout) :: xval(:) + integer,intent(in) :: comm + integer,intent(out) :: ierr, request +#if !defined HAVE_MPI2_INPLACE + integer :: n1 + complex(sp) ABI_ASYNC, allocatable :: xsum(:) +#endif + +! ************************************************************************* + +#ifdef HAVE_MPI_IALLREDUCE + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then +#if defined HAVE_MPI2_INPLACE + call MPI_IALLREDUCE(MPI_IN_PLACE, xval, product(shape(xval)), MPI_COMPLEX, MPI_SUM, comm, request, ierr) +#else + n1 = size(xval,1) + ABI_STAT_MALLOC(xsum,(n1), ierr) + if (ierr/= 0) call xmpi_abort(msg='error allocating xsum in xmpi_isum_ip_spc1d') + call MPI_IALLREDUCE(xsum, xval, product(shape(xval)), MPI_COMPLEX, MPI_SUM, comm, request, ierr) + xval (:) = xsum(:) + ABI_FREE(xsum) +#endif + xmpi_count_requests = xmpi_count_requests + 1 + return + end if + request = xmpi_request_null + return +#endif + + ! Call the blocking version and return null request. + call xmpi_sum(xval, comm, ierr) + request = xmpi_request_null + +end subroutine xmpi_isum_ip_spc1d +!!*** + +!!****f* ABINIT/xmpi_isum_ip_dpc1d +!! NAME +!! xmpi_isum_ip_dpc1d +!! +!! FUNCTION +!! Combines values from all processes and distribute the result back to all processes. +!! Target: 1d double precision complex arrays. Non-blocking INPLACE version. +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +subroutine xmpi_isum_ip_dpc1d(xval, comm, request, ierr) + +!Arguments------------------------- + complex(dp) ABI_ASYNC, intent(inout) :: xval(:) + integer,intent(in) :: comm + integer,intent(out) :: ierr, request +#if !defined HAVE_MPI2_INPLACE + integer :: n1 + complex(dp) ABI_ASYNC, allocatable :: xsum(:) +#endif + +! ************************************************************************* + +#ifdef HAVE_MPI_IALLREDUCE + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then +#if defined HAVE_MPI2_INPLACE + call MPI_IALLREDUCE(MPI_IN_PLACE, xval, product(shape(xval)), MPI_DOUBLE_COMPLEX, MPI_SUM, comm, request, ierr) +#else + n1 = size(xval,1) + ABI_STAT_MALLOC(xsum,(n1), ierr) + if (ierr/= 0) call xmpi_abort(msg='error allocating xsum in xmpi_isum_ip_dpc1d') + call MPI_IALLREDUCE(xsum, xval, product(shape(xval)), MPI_DOUBLE_COMPLEX, MPI_SUM, comm, request, ierr) + xval (:) = xsum(:) + ABI_FREE(xsum) +#endif + xmpi_count_requests = xmpi_count_requests + 1 + return + end if + request = xmpi_request_null + return +#endif + + ! Call the blocking version and return null request. + call xmpi_sum(xval, comm, ierr) + request = xmpi_request_null + +end subroutine xmpi_isum_ip_dpc1d +!!*** + +!!****f* ABINIT/xmpi_isum_ip_spc2d +!! NAME +!! xmpi_isum_ip_spc2d +!! +!! FUNCTION +!! Combines values from all processes and distribute the result back to all processes. +!! Target: 2d single precision complex arrays. Non-blocking INPLACE version. +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +subroutine xmpi_isum_ip_spc2d(xval, comm, request, ierr) + +!Arguments------------------------- + complex(sp) ABI_ASYNC, intent(inout) :: xval(:,:) + integer,intent(in) :: comm + integer,intent(out) :: ierr, request +#if !defined HAVE_MPI2_INPLACE + integer :: n1,n2 + complex(sp) ABI_ASYNC, allocatable :: xsum(:,:) +#endif + +! ************************************************************************* + +#ifdef HAVE_MPI_IALLREDUCE + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then +#if defined HAVE_MPI2_INPLACE + call MPI_IALLREDUCE(MPI_IN_PLACE, xval, product(shape(xval)), MPI_COMPLEX, MPI_SUM, comm, request, ierr) +#else + n1 = size(xval,1) ; n2 = size(xval,2) + ABI_STAT_MALLOC(xsum,(n1,n2), ierr) + if (ierr/= 0) call xmpi_abort(msg='error allocating xsum in xmpi_isum_ip_spc2d') + call MPI_IALLREDUCE(xsum, xval, product(shape(xval)), MPI_DOUBLE_COMPLEX, MPI_SUM, comm, request, ierr) + xval (:,:) = xsum(:,:) + ABI_FREE(xsum) +#endif + xmpi_count_requests = xmpi_count_requests + 1 + return + end if + request = xmpi_request_null + return +#endif + + ! Call the blocking version and return null request. + call xmpi_sum(xval, comm, ierr) + request = xmpi_request_null + +end subroutine xmpi_isum_ip_spc2d +!!*** + +!!****f* ABINIT/xmpi_isum_ip_dpc2d +!! NAME +!! xmpi_isum_ip_dpc2d +!! +!! FUNCTION +!! Combines values from all processes and distribute the result back to all processes. +!! Target: 2d double precision complex arrays. Non-blocking INPLACE version. +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +subroutine xmpi_isum_ip_dpc2d(xval, comm, request, ierr) + +!Arguments------------------------- + complex(dp) ABI_ASYNC, intent(inout) :: xval(:,:) + integer,intent(in) :: comm + integer,intent(out) :: ierr, request +#if !defined HAVE_MPI2_INPLACE + integer :: n1,n2 + complex(dp) ABI_ASYNC, allocatable :: xsum(:,:) +#endif + +! ************************************************************************* + +#ifdef HAVE_MPI_IALLREDUCE + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then +#if defined HAVE_MPI2_INPLACE + call MPI_IALLREDUCE(MPI_IN_PLACE, xval, product(shape(xval)), MPI_DOUBLE_COMPLEX, MPI_SUM, comm, request, ierr) +#else + n1 = size(xval,1) ; n2 = size(xval,2) + ABI_STAT_MALLOC(xsum,(n1,n2), ierr) + if (ierr/= 0) call xmpi_abort(msg='error allocating xsum in xmpi_isum_ip_spc2d') + call MPI_IALLREDUCE(xsum, xval, product(shape(xval)), MPI_DOUBLE_COMPLEX, MPI_SUM, comm, request, ierr) + xval (:,:) = xsum(:,:) + ABI_FREE(xsum) +#endif + xmpi_count_requests = xmpi_count_requests + 1 + return + end if + request = xmpi_request_null + return +#endif + + ! Call the blocking version and return null request. + call xmpi_sum(xval, comm, ierr) + request = xmpi_request_null + +end subroutine xmpi_isum_ip_dpc2d +!!*** + +!!****f* ABINIT/xmpi_isum_ip_spc3d +!! NAME +!! xmpi_isum_ip_spc3d +!! +!! FUNCTION +!! Combines values from all processes and distribute the result back to all processes. +!! Target: 3d single precision complex arrays. Non-blocking INPLACE version. +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +subroutine xmpi_isum_ip_spc3d(xval, comm, request, ierr) + +!Arguments------------------------- + complex(sp) ABI_ASYNC, intent(inout) :: xval(:,:,:) + integer,intent(in) :: comm + integer,intent(out) :: ierr, request +#if !defined HAVE_MPI2_INPLACE + integer :: n1,n2,n3 + complex(sp) ABI_ASYNC, allocatable :: xsum(:,:,:) +#endif + +! ************************************************************************* + +#ifdef HAVE_MPI_IALLREDUCE + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then +#if defined HAVE_MPI2_INPLACE + call MPI_IALLREDUCE(MPI_IN_PLACE, xval, product(shape(xval)), MPI_COMPLEX, MPI_SUM, comm, request, ierr) +#else + n1 = size(xval,1) ; n2 = size(xval,2) ; n3 = size(xval,3) + ABI_STAT_MALLOC(xsum,(n1,n2,3), ierr) + if (ierr/= 0) call xmpi_abort(msg='error allocating xsum in xmpi_isum_ip_spc3d') + call MPI_IALLREDUCE(xsum, xval, product(shape(xval)), MPI_DOUBLE_COMPLEX, MPI_SUM, comm, request, ierr) + xval (:,:,:) = xsum(:,:,:) + ABI_FREE(xsum) +#endif + xmpi_count_requests = xmpi_count_requests + 1 + return + end if + request = xmpi_request_null + return +#endif + + ! Call the blocking version and return null request. + call xmpi_sum(xval, comm, ierr) + request = xmpi_request_null + +end subroutine xmpi_isum_ip_spc3d +!!*** + +!!****f* ABINIT/xmpi_isum_ip_dpc3d +!! NAME +!! xmpi_isum_ip_dpc3d +!! +!! FUNCTION +!! Combines values from all processes and distribute the result back to all processes. +!! Target: 3d double precision complex arrays. Non-blocking INPLACE version. +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +subroutine xmpi_isum_ip_dpc3d(xval, comm, request, ierr) + +!Arguments------------------------- + complex(dp) ABI_ASYNC, intent(inout) :: xval(:,:,:) + integer,intent(in) :: comm + integer,intent(out) :: ierr, request +#if !defined HAVE_MPI2_INPLACE + integer :: n1,n2,n3 + complex(sp) ABI_ASYNC, allocatable :: xsum(:,:,:) +#endif + +! ************************************************************************* + +#ifdef HAVE_MPI_IALLREDUCE + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then +#if defined HAVE_MPI2_INPLACE + call MPI_IALLREDUCE(MPI_IN_PLACE, xval, product(shape(xval)), MPI_DOUBLE_COMPLEX, MPI_SUM, comm, request, ierr) +#else + n1 = size(xval,1) ; n2 = size(xval,2) ; n3 = size(xval,3) + ABI_STAT_MALLOC(xsum,(n1,n2,3), ierr) + if (ierr/= 0) call xmpi_abort(msg='error allocating xsum in xmpi_isum_ip_dpc3d') + call MPI_IALLREDUCE(xsum, xval, product(shape(xval)), MPI_DOUBLE_COMPLEX, MPI_SUM, comm, request, ierr) + xval (:,:,:) = xsum(:,:,:) + ABI_FREE(xsum) +#endif + xmpi_count_requests = xmpi_count_requests + 1 + return + end if + request = xmpi_request_null + return +#endif + + ! Call the blocking version and return null request. + call xmpi_sum(xval, comm, ierr) + request = xmpi_request_null + +end subroutine xmpi_isum_ip_dpc3d +!!*** diff --git a/GX-PAW/common/src/12_hide_mpi/xmpi_land_lor.finc b/GX-PAW/common/src/12_hide_mpi/xmpi_land_lor.finc new file mode 100644 index 00000000..e4cacbb4 --- /dev/null +++ b/GX-PAW/common/src/12_hide_mpi/xmpi_land_lor.finc @@ -0,0 +1,217 @@ +!{\src2tex{textfont=tt}} +!!****f* ABINIT/xmpi_land_log0d +!! NAME +!! xmpi_land_log0d +!! +!! FUNCTION +!! Logical AND accross the nodes. +!! Combines value from all processes and distribute the result back to all processes. +!! Target: logical scalar +!! +!! SOURCE + +subroutine xmpi_land_log0d(xval, comm) + +!Arguments ------------------------------------ + logical,intent(inout) :: xval + integer,intent(in) :: comm + +!Local variables------------------------------- + integer :: ierr +#if defined HAVE_MPI + logical :: out_val(1) +#endif + +! ************************************************************************* + + ierr=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_ALLREDUCE([xval], out_val, 1, MPI_LOGICAL, MPI_LAND, comm, ierr) + xval = out_val(1) + end if +#endif + +end subroutine xmpi_land_log0d +!!*** + +!---------------------------------------------------------------------- + +!!****f* ABINIT/xmpi_lor_log1d +!! NAME +!! xmpi_lor_log1d +!! +!! FUNCTION +!! Combines values from all processes and distribute +!! the result back to all processes. +!! Target: one-dimensional logical arrays. +!! +!! INPUTS +!! comm= MPI communicator +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_lor_log1d(xval,comm) + +!Arguments ------------------------------------ + integer,intent(in) :: comm + logical, DEV_CONTARRD intent(inout) :: xval(:) + +!Local variables------------------------------- +#if defined HAVE_MPI + integer :: ierr,n1 + logical,allocatable :: xsum(:) +#endif + +! ************************************************************************* + +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then +! Accumulate xval on all proc. in comm + n1 = size(xval) + ABI_STAT_MALLOC(xsum,(n1), ierr) + if (ierr/= 0) call xmpi_abort(msg='error allocating xsum in xmpi_lor_log1d') + call MPI_ALLREDUCE(xval,xsum,n1,MPI_LOGICAL,MPI_LOR,comm,ierr) + xval (:) = xsum(:) + ABI_FREE(xsum) + end if +#endif + +end subroutine xmpi_lor_log1d +!!*** + +!---------------------------------------------------------------------- + +!!****f* ABINIT/xmpi_lor_log2d +!! NAME +!! xmpi_lor_log2d +!! +!! FUNCTION +!! Combines values from all processes and distribute +!! the result back to all processes. +!! Target: two-dimensional logical arrays. +!! +!! INPUTS +!! comm= MPI communicator +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_lor_log2d(xval,comm) + +!Arguments ------------------------------------ + integer,intent(in) :: comm + logical, DEV_CONTARRD intent(inout) :: xval(:,:) + +!Local variables------------------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2,ierr + integer(kind=int64) :: ntot + logical,allocatable :: xsum(:,:) +#endif + +! ************************************************************************* + +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then +! Accumulate xval on all proc. in comm + n1 = size(xval,1) + n2 = size(xval,2) + + ABI_STAT_MALLOC(xsum,(n1,n2), ierr) + if (ierr/= 0) call xmpi_abort(msg='error allocating xsum in xmpi_lor_log2d') + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2,kind=int64) + + if (ntot<=xmpi_maxint32_64) then + call MPI_ALLREDUCE(xval,xsum,n1*n2,MPI_LOGICAL,MPI_LOR,comm,ierr) + else + call xmpi_largetype_create(ntot,MPI_LOGICAL,my_dt,my_op,MPI_LOR) + call MPI_ALLREDUCE(xval,xsum,1,my_dt,my_op,comm,ierr) + call xmpi_largetype_free(my_dt,my_op) + end if + + xval (:,:) = xsum(:,:) + ABI_FREE(xsum) + end if +#endif + +end subroutine xmpi_lor_log2d +!!*** + +!---------------------------------------------------------------------- + +!!****f* ABINIT/xmpi_lor_log3d +!! NAME +!! xmpi_lor_log3d +!! +!! FUNCTION +!! Combines values from all processes and distribute +!! the result back to all processes. +!! Target: three-dimensional logical arrays. +!! +!! INPUTS +!! comm= MPI communicator +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_lor_log3d(xval,comm) + +!Arguments ------------------------------------ + integer,intent(in) :: comm + logical, DEV_CONTARRD intent(inout) :: xval(:,:,:) + +!Local variables------------------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2,n3,ierr + integer(kind=int64) :: ntot + logical,allocatable :: xsum(:,:,:) +#endif + +! ************************************************************************* + +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then +! Accumulate xval on all proc. in comm + n1 = size(xval,1) + n2 = size(xval,2) + n3 = size(xval,3) + +! #if defined HAVE_MPI2_INPLACE +! call MPI_ALLREDUCE(MPI_IN_PLACE,xval,n1*n2*n3,MPI_LOGICAL,MPI_LOR,comm,ierr) +! #else + ABI_STAT_MALLOC(xsum,(n1,n2,n3), ierr) + if (ierr/= 0) call xmpi_abort(msg='error allocating xsum in xmpi_lor_log3d') + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2*n3,kind=int64) + + if (ntot<=xmpi_maxint32_64) then + call MPI_ALLREDUCE(xval,xsum,n1*n2*n3,MPI_LOGICAL,MPI_LOR,comm,ierr) + else + call xmpi_largetype_create(ntot,MPI_LOGICAL,my_dt,my_op,MPI_LOR) + call MPI_ALLREDUCE(xval,xsum,1,my_dt,my_op,comm,ierr) + call xmpi_largetype_free(my_dt,my_op) + end if + + xval (:,:,:) = xsum(:,:,:) + ABI_FREE(xsum) +! #endif + end if +#endif + +end subroutine xmpi_lor_log3d +!!*** diff --git a/GX-PAW/common/src/12_hide_mpi/xmpi_max.finc b/GX-PAW/common/src/12_hide_mpi/xmpi_max.finc new file mode 100644 index 00000000..704bd022 --- /dev/null +++ b/GX-PAW/common/src/12_hide_mpi/xmpi_max.finc @@ -0,0 +1,316 @@ +!{\src2tex{textfont=tt}} +!!****f* ABINIT/xmpi_max_int0d_i4b +!! NAME +!! xmpi_max_int0d_i4b +!! +!! FUNCTION +!! This module contains functions that calls MPI routine, +!! if we compile the code using the MPI CPP flags. +!! xmpi_max is the generic function. +!! +!! COPYRIGHT +!! Copyright (C) 2001-2024 ABINIT group (AR,XG,MB) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~ABINIT/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! CHILDREN +!! mpi_allreduce +!! +!! SOURCE + +subroutine xmpi_max_int0d_i4b(xval,xmax,comm,ier) + +!Arguments------------------------- + integer ,intent(in) :: xval + integer, intent(out) :: xmax + integer ,intent(in) :: comm + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: arr_xmax(1) +#endif + +! ************************************************************************* + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_ALLREDUCE([xval],arr_xmax,1,MPI_INTEGER,MPI_MAX,comm,ier) + xmax=arr_xmax(1) + else +#endif + xmax=xval +#if defined HAVE_MPI + end if +#endif + +end subroutine xmpi_max_int0d_i4b +!!*** + + +!!****f* ABINIT/xmpi_max_int0d_i8b +!! NAME +!! xmpi_max_int0d_i8b +!! +!! FUNCTION +!! +!! CHILDREN +!! mpi_allreduce +!! +!! SOURCE + +subroutine xmpi_max_int0d_i8b(xval,xmax,comm,ier) + +!Arguments------------------------- + integer(i8b) ,intent(in) :: xval + integer(i8b), intent(out) :: xmax + integer ,intent(in) :: comm + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: arr_xmax(1) +#endif + +! ************************************************************************* + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_ALLREDUCE([xval],arr_xmax,1,MPI_INTEGER8,MPI_MAX,comm,ier) + xmax=arr_xmax(1) + else +#endif + xmax=xval +#if defined HAVE_MPI + end if +#endif + +end subroutine xmpi_max_int0d_i8b +!!*** + +!!****f* ABINIT/xmpi_max_int +!! NAME +!! xmpi_max_int +!! +!! SOURCE + +subroutine xmpi_max_int(xval,xmax,comm,ier) + +!Arguments------------------------- + integer, DEV_CONTARRD intent(in) :: xval(:) + integer, DEV_CONTARRD intent(out):: xmax(:) + integer ,intent(in) :: comm + integer ,intent(out) :: ier + +!Local variables------------------- + integer :: s1 + +! ************************************************************************* + ier=0 + s1 =SIZE(xval) +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_ALLREDUCE(xval,xmax,s1,MPI_INTEGER,MPI_MAX,comm,ier) + else +#endif + xmax=xval +#if defined HAVE_MPI + end if +#endif + +end subroutine xmpi_max_int +!!*** + + +!!****f* ABINIT/xmpi_max_dpv +!! NAME +!! xmpi_max_dpv +!! +!! FUNCTION +!! Combines values from all processes and distribute +!! the result back to all processes. +!! Target: scalar double precisions. +!! +!! INPUTS +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! xmax= number of elements in send buffer +!! +!! SOURCE + +subroutine xmpi_max_dpv(xval,xmax,comm,ier) + +!Arguments------------------------- + real(dp),intent(in) :: xval + real(dp),intent(out) :: xmax + integer ,intent(in) :: comm + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + real(dp) :: arr_xmax(1) +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_ALLREDUCE([xval],arr_xmax,1,MPI_DOUBLE_PRECISION,MPI_MAX,comm,ier) + xmax=arr_xmax(1) + else +#endif + xmax=xval +#if defined HAVE_MPI + end if +#endif + +end subroutine xmpi_max_dpv +!!*** + +!!****f* ABINIT/xmpi_max_int0d_ip +!! NAME +!! xmpi_max_int0d_ip +!! +!! FUNCTION +!! Combines values from all processes and distribute +!! the result back to all processes. +!! Target: scalar integer. In place operation +!! +!! INPUTS +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= +!! in input: the value on the local processor +!! in output: the maximum inside the given communicator. +!! +!! SOURCE + +subroutine xmpi_max_int0d_ip(ioval,comm,ier) + +!Arguments------------------------- + integer ,intent(inout) :: ioval + integer ,intent(in) :: comm + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: arr_xmax(1) +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_ALLREDUCE([ioval],arr_xmax,1,MPI_INTEGER,MPI_MAX,comm,ier) + ioval = arr_xmax(1) + end if +#endif + +end subroutine xmpi_max_int0d_ip +!!*** + +!!****f* ABINIT/xmpi_max_dp0d_ip +!! NAME +!! xmpi_max_dp0d_ip +!! +!! FUNCTION +!! Combines values from all processes and distribute +!! the result back to all processes. +!! Target: scalar double precisions. In place operation +!! +!! INPUTS +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= +!! in input: the value on the local processor +!! in output: the maximum inside the given communicator. +!! +!! SOURCE + +subroutine xmpi_max_dp0d_ip(ioval,comm,ier) + +!Arguments------------------------- + real(dp),intent(inout) :: ioval + integer ,intent(in) :: comm + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + real(dp) :: arr_xmax(1) +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_ALLREDUCE([ioval],arr_xmax,1,MPI_DOUBLE_PRECISION,MPI_MAX,comm,ier) + ioval = arr_xmax(1) + end if +#endif + +end subroutine xmpi_max_dp0d_ip +!!*** + +!!****f* ABINIT/xmpi_max_int1d_ip +!! NAME +!! xmpi_max_int1d_ip +!! +!! FUNCTION +!! Combines values from all processes and distribute +!! the result back to all processes. +!! Target: 1d integer vector. In place operation +!! +!! INPUTS +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= +!! in input: the value on the local processor +!! in output: the maximum inside the given communicator. +!! +!! SOURCE + +subroutine xmpi_max_int1d_ip(ioval, comm, ier) + +!Arguments------------------------- + integer, intent(inout) :: ioval(:) + integer ,intent(in) :: comm + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: xmax(size(ioval)) +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_ALLREDUCE(ioval,xmax,size(ioval),MPI_INTEGER,MPI_MAX,comm,ier) + ioval = xmax + end if +#endif + +end subroutine xmpi_max_int1d_ip +!!*** diff --git a/GX-PAW/common/src/12_hide_mpi/xmpi_min.finc b/GX-PAW/common/src/12_hide_mpi/xmpi_min.finc new file mode 100644 index 00000000..1d10ad2d --- /dev/null +++ b/GX-PAW/common/src/12_hide_mpi/xmpi_min.finc @@ -0,0 +1,203 @@ +!{\src2tex{textfont=tt}} +!!****f* ABINIT/xmpi_min_intv +!! NAME +!! xmpi_min_intv +!! +!! FUNCTION +!! This module contains functions that calls MPI routine, +!! if we compile the code using the MPI CPP flags. +!! xmpi_min is the generic function. +!! +!! COPYRIGHT +!! Copyright (C) 2001-2024 ABINIT group (AR,XG,MB) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~ABINIT/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! PARENTS +!! +!! CHILDREN +!! mpi_allreduce +!! +!! SOURCE + +subroutine xmpi_min_intv(xval,xmin,comm,ier) + +!Arguments------------------------- + integer ,intent(in) :: xval + integer ,intent(out) :: xmin + integer ,intent(in) :: comm + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: arr_xval(1),arr_xmin(1) +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + arr_xval(1) = xval + call MPI_ALLREDUCE(arr_xval,arr_xmin,1,MPI_INTEGER,MPI_MIN,comm,ier) + xmin = arr_xmin(1) + else +#endif + xmin=xval +#if defined HAVE_MPI + end if +#endif + +end subroutine xmpi_min_intv +!!*** + +!!****f* ABINIT/xmpi_min_dpv +!! NAME +!! xmpi_min_dpv +!! +!! FUNCTION +!! Combines values from all processes and distribute +!! the result back to all processes. +!! Target: scalar double precisions. +!! +!! INPUTS +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! xmin= number of elements in send buffer +!! +!! PARENTS +!! +!! CHILDREN +!! mpi_allreduce +!! +!! SOURCE + +subroutine xmpi_min_dpv(xval,xmin,comm,ier) + +!Arguments------------------------- + real(dp),intent(in) :: xval + real(dp),intent(out) :: xmin + integer ,intent(in) :: comm + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + real(dp) :: arr_xval(1),arr_xmin(1) +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + arr_xval(1) = xval + call MPI_ALLREDUCE(arr_xval,arr_xmin,1,MPI_DOUBLE_PRECISION,MPI_MIN,comm,ier) + xmin = arr_xmin(1) + else +#endif + xmin=xval +#if defined HAVE_MPI + end if +#endif + +end subroutine xmpi_min_dpv +!!*** + +!---------------------------------------------------------------------- + +!!****f* ABINIT/xmpi_min_int1d +!! NAME +!! xmpi_min_int1d +!! +!! FUNCTION +!! Combines values from all processes and distribute the result back to all processes. +!! Target: 1d int array, in-place version +!! +!! INPUTS +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_min_int1d(xval, comm, ier) + +!Arguments------------------------- + integer,intent(inout) :: xval(:) + integer,intent(in) :: comm + integer,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: arr_xmin(size(xval)) +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_ALLREDUCE(xval, arr_xmin, size(xval), MPI_INTEGER, MPI_MIN, comm, ier) + xval = arr_xmin + end if +#endif + +end subroutine xmpi_min_int1d +!!*** + +!---------------------------------------------------------------------- + +!!****f* ABINIT/xmpi_min_dp +!! NAME +!! xmpi_min_dp +!! +!! FUNCTION +!! Combines values from all processes and distribute the result back to all processes. +!! Target: scalar double precisions, in-place version +!! +!! INPUTS +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_min_dp(xval, comm, ier) + +!Arguments------------------------- + real(dp),intent(inout) :: xval + integer ,intent(in) :: comm + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + real(dp) :: arr_xval(1), arr_xmin(1) +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + arr_xval(1) = xval + call MPI_ALLREDUCE(arr_xval,arr_xmin,1,MPI_DOUBLE_PRECISION,MPI_MIN,comm,ier) + xval = arr_xmin(1) + end if +#endif + +end subroutine xmpi_min_dp +!!*** diff --git a/GX-PAW/common/src/12_hide_mpi/xmpi_recv.finc b/GX-PAW/common/src/12_hide_mpi/xmpi_recv.finc new file mode 100644 index 00000000..58d05bf5 --- /dev/null +++ b/GX-PAW/common/src/12_hide_mpi/xmpi_recv.finc @@ -0,0 +1,631 @@ +!{\src2tex{textfont=tt}} +!!****f* ABINIT/xmpi_recv +!! NAME +!! xmpi_recv +!! +!! FUNCTION +!! This module contains functions that call MPI routine MPI_RECV, +!! to receive data on one processor sent by another, +!! if we compile the code using the MPI CPP flags. +!! xmpi_recv is the generic function. +!! +!! COPYRIGHT +!! Copyright (C) 2001-2024 ABINIT group +!! This file is distributed under the terms of the +!! GNU General Public License, see ~ABINIT/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! TODO +!! +!! SOURCE +!!*** + +!!****f* ABINIT/xmpi_recv_char +!! NAME +!! xmpi_recv_char +!! +!! FUNCTION +!! Receives data from one proc sent by another. +!! Target: character. +!! +!! INPUTS +!! source :: rank of source process +!! tag :: integer message tag +!! comm :: MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! NOTES +!! status of MPI_RECV is explicitly ignored +!! +!! SOURCE + +subroutine xmpi_recv_char(xval,source,tag,comm,ier) + +!Arguments------------------------- + character(len=*), intent(inout),target :: xval + integer ,intent(in) :: source,tag,comm + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_tag + character,pointer :: arr_xval(:) + type(c_ptr) :: cptr +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + my_tag = MOD(tag,xmpi_tag_ub) + cptr=c_loc(xval) ; call c_f_pointer(cptr,arr_xval,[len(xval)]) + call MPI_RECV(arr_xval,len(xval),MPI_CHARACTER,source,my_tag,comm,MPI_STATUS_IGNORE,ier) + end if +#endif + +end subroutine xmpi_recv_char +!!*** + +!!****f* ABINIT/xmpi_recv_intv +!! NAME +!! xmpi_recv_intv +!! +!! FUNCTION +!! Receives data from one processor sent by another. +!! Target: single integer. +!! +!! INPUTS +!! source :: rank of source process +!! tag :: integer message tag +!! comm :: MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! NOTES +!! status of MPI_RECV is explicitly ignored +!! +!! SOURCE + +subroutine xmpi_recv_intv(xval,source,tag,comm,ier) + +!Arguments------------------------- + integer,intent(inout) :: xval + integer,intent(in) :: source,tag,comm + integer,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_tag + integer :: arr_xval(1) +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + my_tag=MOD(tag,xmpi_tag_ub) + call MPI_RECV(arr_xval,1,MPI_INTEGER,source,my_tag,comm,MPI_STATUS_IGNORE,ier) + xval=arr_xval(1) + end if +#endif + + end subroutine xmpi_recv_intv +!!*** + +!!****f* ABINIT/xmpi_recv_int1d +!! NAME +!! xmpi_recv_int1d +!! +!! FUNCTION +!! Receives data from one proc sent by another. +!! Target: integer one-dimensional arrays. +!! +!! INPUTS +!! source :: rank of source process +!! tag :: integer message tag +!! comm :: MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! NOTES +!! status of MPI_RECV is explicitly ignored +!! +!! +!! INPUTS +!! source :: rank of source process +!! tag :: integer message tag +!! comm :: MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! NOTES +!! status of MPI_RECV is explicitly ignored +!! +!! SOURCE + +subroutine xmpi_recv_int1d(xval,source,tag,comm,ier) + +!Arguments------------------------- + integer, DEV_CONTARRD intent(inout) :: xval(:) + integer,intent(in) :: source,tag,comm + integer,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_tag, n1 +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + n1=size(xval,dim=1) + my_tag = MOD(tag,xmpi_tag_ub) + call MPI_RECV(xval,n1,MPI_INTEGER,source,my_tag,comm,MPI_STATUS_IGNORE,ier) + end if +#endif + + end subroutine xmpi_recv_int1d +!!*** + +!!****f* ABINIT/xmpi_recv_int2d +!! NAME +!! xmpi_recv_int2d +!! +!! FUNCTION +!! Receives data from one proc sent by another. +!! Target: integer two-dimensional arrays. +!! +!! INPUTS +!! source :: rank of source process +!! tag :: integer message tag +!! comm :: MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! NOTES +!! status of MPI_RECV is explicitly ignored +!! +!! PARENTS +!! +!! CHILDREN +!! mpi_recv +!! +!! SOURCE +subroutine xmpi_recv_int2d(xval,source,tag,comm,ier) + +!Arguments------------------------- + integer,intent(inout) :: xval(:,:) + integer ,intent(in) :: source,tag,comm + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2,my_tag + integer(kind=int64) :: ntot +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + n1=size(xval,dim=1) + n2=size(xval,dim=2) + my_tag=MOD(tag,xmpi_tag_ub) + + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2,kind=int64) + + if (ntot<=xmpi_maxint32_64) then + call MPI_RECV(xval,n1*n2,MPI_INTEGER,source,my_tag,comm,MPI_STATUS_IGNORE,ier) + else + call xmpi_largetype_create(ntot,MPI_INTEGER,my_dt,my_op,MPI_OP_NULL) + call MPI_RECV(xval,1,my_dt,source,my_tag,comm,MPI_STATUS_IGNORE,ier) + call xmpi_largetype_free(my_dt,my_op) + end if + + end if +#endif + +end subroutine xmpi_recv_int2d +!!*** + +!!****f* ABINIT/xmpi_recv_int3d +!! NAME +!! xmpi_recv_int3d +!! +!! FUNCTION +!! Receives data from one proc sent by another. +!! Target: integer three-dimensional arrays. +!! +!! INPUTS +!! source :: rank of source process +!! tag :: integer message tag +!! comm :: MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! NOTES +!! status of MPI_RECV is explicitly ignored +!! +!! PARENTS +!! +!! CHILDREN +!! mpi_recv +!! +!! SOURCE +subroutine xmpi_recv_int3d(xval,source,tag,comm,ier) + +!Arguments------------------------- + integer,intent(inout) :: xval(:,:,:) + integer ,intent(in) :: source,tag,comm + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2,n3,my_tag + integer(kind=int64) :: ntot +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + n1=size(xval,dim=1) + n2=size(xval,dim=2) + n3=size(xval,dim=3) + my_tag=MOD(tag,xmpi_tag_ub) + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2*n3,kind=int64) + + if (ntot<=xmpi_maxint32_64) then + call MPI_RECV(xval,n1*n2*n3,MPI_INTEGER,source,my_tag,comm,MPI_STATUS_IGNORE,ier) + else + call xmpi_largetype_create(ntot,MPI_INTEGER,my_dt,my_op,MPI_OP_NULL) + call MPI_RECV(xval,1,my_dt,source,my_tag,comm,MPI_STATUS_IGNORE,ier) + call xmpi_largetype_free(my_dt,my_op) + end if + + end if +#endif + +end subroutine xmpi_recv_int3d +!!*** + +!!****f* ABINIT/xmpi_recv_dp +!! NAME +!! xmpi_recv_dp +!! +!! FUNCTION +!! Receives data from one proc sent by another. +!! Target: double precision value. +!! +!! INPUTS +!! source :: rank of source process +!! tag :: integer message tag +!! comm :: MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! NOTES +!! status of MPI_RECV is explicitly ignored +!! +!! SOURCE + +subroutine xmpi_recv_dp(xval,source,tag,comm,ier) + +!Arguments------------------------- + real(dp), DEV_CONTARRD intent(inout) :: xval + integer ,intent(in) :: source,tag,comm + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_tag + real(dp) :: arr_xval(1) +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + my_tag = MOD(tag,xmpi_tag_ub) + call MPI_RECV(arr_xval,1,MPI_DOUBLE_PRECISION,source,my_tag,comm,MPI_STATUS_IGNORE,ier) + xval=arr_xval(1) + end if +#endif + +end subroutine xmpi_recv_dp +!!*** + +!!****f* ABINIT/xmpi_recv_dp1d +!! NAME +!! xmpi_recv_dp1d +!! +!! FUNCTION +!! Receives data from one proc sent by another. +!! Target: double precision one-dimensional arrays. +!! +!! INPUTS +!! source :: rank of source process +!! tag :: integer message tag +!! comm :: MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! NOTES +!! status of MPI_RECV is explicitly ignored +!! +!! SOURCE + +subroutine xmpi_recv_dp1d(xval,source,tag,comm,ier) + +!Arguments------------------------- + real(dp), DEV_CONTARRD intent(inout) :: xval(:) + integer ,intent(in) :: source,tag,comm + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: n1,my_tag +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + n1=size(xval,dim=1) + my_tag = MOD(tag,xmpi_tag_ub) + call MPI_RECV(xval,n1,MPI_DOUBLE_PRECISION,source,my_tag,comm,MPI_STATUS_IGNORE,ier) + end if +#endif + +end subroutine xmpi_recv_dp1d +!!*** + +!!****f* ABINIT/xmpi_recv_dp2d +!! NAME +!! xmpi_recv_dp2d +!! +!! FUNCTION +!! Receives data from one proc sent by another. +!! Target: double precision two-dimensional arrays. +!! +!! INPUTS +!! source :: rank of source process +!! tag :: integer message tag +!! comm :: MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! NOTES +!! status of MPI_RECV is explicitly ignored +!! +!! SOURCE + +subroutine xmpi_recv_dp2d(xval,source,tag,comm,ier) + +!Arguments------------------------- + real(dp), DEV_CONTARRD intent(inout) :: xval(:,:) + integer ,intent(in) :: source,tag,comm + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2,my_tag + integer(kind=int64) :: ntot +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + n1=size(xval,dim=1) + n2=size(xval,dim=2) + my_tag=MOD(tag,xmpi_tag_ub) + + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2,kind=int64) + + if (ntot<=xmpi_maxint32_64) then + call MPI_RECV(xval,n1*n2,MPI_DOUBLE_PRECISION,source,my_tag,comm,MPI_STATUS_IGNORE,ier) + else + call xmpi_largetype_create(ntot,MPI_DOUBLE_PRECISION,my_dt,my_op,MPI_OP_NULL) + call MPI_RECV(xval,1,my_dt,source,my_tag,comm,MPI_STATUS_IGNORE,ier) + call xmpi_largetype_free(my_dt,my_op) + end if + + end if +#endif + +end subroutine xmpi_recv_dp2d +!!*** + +!!****f* ABINIT/xmpi_recv_dp3d +!! NAME +!! xmpi_recv_dp3d +!! +!! FUNCTION +!! Receives data from one proc sent by another. +!! Target: double precision three-dimensional arrays. +!! +!! INPUTS +!! source :: rank of source process +!! tag :: integer message tag +!! comm :: MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! NOTES +!! status of MPI_RECV is explicitly ignored +!! +!! SOURCE + +subroutine xmpi_recv_dp3d(xval,source,tag,comm,ier) + +!Arguments------------------------- + real(dp), DEV_CONTARRD intent(inout) :: xval(:,:,:) + integer ,intent(in) :: source,tag,comm + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2,n3,my_tag + integer(kind=int64) :: ntot +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + n1=size(xval,dim=1) + n2=size(xval,dim=2) + n3=size(xval,dim=3) + my_tag=MOD(tag,xmpi_tag_ub) + + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2*n3,kind=int64) + + if (ntot<=xmpi_maxint32_64) then + call MPI_RECV(xval,n1*n2*n3,MPI_DOUBLE_PRECISION,source,my_tag,comm,MPI_STATUS_IGNORE,ier) + else + call xmpi_largetype_create(ntot,MPI_DOUBLE_PRECISION,my_dt,my_op,MPI_OP_NULL) + call MPI_RECV(xval,1,my_dt,source,my_tag,comm,MPI_STATUS_IGNORE,ier) + call xmpi_largetype_free(my_dt,my_op) + end if + + end if +#endif + +end subroutine xmpi_recv_dp3d +!!*** + +!!****f* ABINIT/xmpi_recv_dp4d +!! NAME +!! xmpi_recv_dp4d +!! +!! FUNCTION +!! Receives data from one proc sent by another. +!! Target: double precision fourd-dimensional arrays. +!! +!! INPUTS +!! source :: rank of source process +!! tag :: integer message tag +!! comm :: MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! NOTES +!! status of MPI_RECV is explicitly ignored +!! +!! SOURCE + +subroutine xmpi_recv_dp4d(xval,source,tag,comm,ier) + +!Arguments------------------------- + real(dp), DEV_CONTARRD intent(inout) :: xval(:,:,:,:) + integer ,intent(in) :: source,tag,comm + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2,n3,n4,my_tag + integer(kind=int64) :: ntot +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + n1=size(xval,dim=1) + n2=size(xval,dim=2) + n3=size(xval,dim=3) + n4=size(xval,dim=4) + my_tag=MOD(tag,xmpi_tag_ub) + + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2*n3*n4,kind=int64) + + if (ntot<=xmpi_maxint32_64) then + call MPI_RECV(xval,n1*n2*n3*n4,MPI_DOUBLE_PRECISION,source,my_tag,comm,MPI_STATUS_IGNORE,ier) + else + call xmpi_largetype_create(ntot,MPI_DOUBLE_PRECISION,my_dt,my_op,MPI_OP_NULL) + call MPI_RECV(xval,1,my_dt,source,my_tag,comm,MPI_STATUS_IGNORE,ier) + call xmpi_largetype_free(my_dt,my_op) + end if + + end if +#endif + +end subroutine xmpi_recv_dp4d +!!*** diff --git a/GX-PAW/common/src/12_hide_mpi/xmpi_scatterv.finc b/GX-PAW/common/src/12_hide_mpi/xmpi_scatterv.finc new file mode 100644 index 00000000..7754cdb8 --- /dev/null +++ b/GX-PAW/common/src/12_hide_mpi/xmpi_scatterv.finc @@ -0,0 +1,347 @@ +!{\src2tex{textfont=tt}} +!!****f* ABINIT/xmpi_scatterv +!! NAME +!! xmpi_scatterv +!! +!! FUNCTION +!! This module contains functions that calls MPI routine, +!! if we compile the code using the MPI CPP flags. +!! xmpi_scatterv is the generic function. +!! +!! COPYRIGHT +!! Copyright (C) 2001-2024 ABINIT group (MT) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~ABINIT/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! SOURCE + +!!*** + +!!****f* ABINIT/xmpi_scatterv_int +!! NAME +!! xmpi_scatterv_int +!! +!! FUNCTION +!! Gathers data from all tasks and delivers it to all. +!! Target: one-dimensional integer arrays. +!! +!! INPUTS +!! xval= buffer array +!! recvcount= number of received elements +!! displs= relative offsets for incoming data (array) +!! sendcounts= number of sent elements (array) +!! root= rank of receiving process +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! recvbuf= received buffer +!! +!! +!! SOURCE +subroutine xmpi_scatterv_int(xval,sendcounts,displs,recvbuf,recvcount,root,comm,ier) + +!Arguments------------------------- + integer, DEV_CONTARRD intent(in) :: xval(:) + integer, DEV_CONTARRD intent(inout) :: recvbuf(:) + integer, DEV_CONTARRD intent(in) :: sendcounts(:),displs(:) + integer,intent(in) :: recvcount,root,comm + integer,intent(out) :: ier + +!Local variables------------------- + integer :: dd + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_SCATTERV(xval,sendcounts,displs,MPI_INTEGER,recvbuf,recvcount,& +& MPI_INTEGER,root,comm,ier) + else if (comm == MPI_COMM_SELF) then +#endif + dd=0;if (size(displs)>0) dd=displs(1) + recvbuf(1:recvcount)=xval(dd+1:dd+recvcount) +#if defined HAVE_MPI + end if +#endif + +end subroutine xmpi_scatterv_int +!!*** + +!!****f* ABINIT/xmpi_scatterv_int2d +!! NAME +!! xmpi_scatterv_int2d +!! +!! FUNCTION +!! Gathers data from all tasks and delivers it to all. +!! Target: two-dimensional integer arrays. +!! +!! INPUTS +!! xval= buffer array +!! recvcount= number of received elements +!! displs= relative offsets for incoming data (array) +!! sendcounts= number of sent elements (array) +!! root= rank of receiving process +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! recvbuf= received buffer +!! +!! SOURCE + +subroutine xmpi_scatterv_int2d(xval,sendcounts,displs,recvbuf,recvcount,root,comm,ier) + +!Arguments------------------------- + integer, DEV_CONTARRD intent(in) :: xval(:,:) + integer, DEV_CONTARRD intent(inout) :: recvbuf(:,:) + integer, DEV_CONTARRD intent(in) :: sendcounts(:),displs(:) + integer,intent(in) :: recvcount,root,comm + integer,intent(out) :: ier + +!Local variables------------------- + integer :: cc,dd,sz1 + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_SCATTERV(xval,sendcounts,displs,MPI_INTEGER,recvbuf,recvcount,& +& MPI_INTEGER,root,comm,ier) + else if (comm == MPI_COMM_SELF) then +#endif + sz1=size(recvbuf,1);cc=recvcount/sz1 + dd=0;if (size(displs)>0) dd=displs(1)/sz1 + recvbuf(:,1:cc)=xval(:,dd+1:dd+cc) +#if defined HAVE_MPI + end if +#endif + +end subroutine xmpi_scatterv_int2d +!!*** + +!!****f* ABINIT/xmpi_scatterv_dp +!! NAME +!! xmpi_scatterv_dp +!! +!! FUNCTION +!! Gathers data from all tasks and delivers it to all. +!! Target: one-dimensional real arrays. +!! +!! INPUTS +!! xval= buffer array +!! recvcount= number of received elements +!! displs= relative offsets for incoming data (array) +!! sendcounts= number of sent elements (array) +!! root= rank of receiving process +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! recvbuf= received buffer +!! +!! SOURCE + +subroutine xmpi_scatterv_dp(xval,sendcounts,displs,recvbuf,recvcount,root,comm,ier) + +!Arguments------------------------- + real(dp), DEV_CONTARRD intent(in) :: xval(:) + real(dp), DEV_CONTARRD intent(inout) :: recvbuf(:) + integer, DEV_CONTARRD intent(in) :: sendcounts(:),displs(:) + integer,intent(in) :: recvcount,root,comm + integer,intent(out) :: ier + +!Local variables------------------- + integer :: dd + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_SCATTERV(xval,sendcounts,displs,MPI_DOUBLE_PRECISION,recvbuf,recvcount,& +& MPI_DOUBLE_PRECISION,root,comm,ier) + else if (comm == MPI_COMM_SELF) then +#endif + dd=0;if (size(displs)>0) dd=displs(1) + recvbuf(1:recvcount)=xval(dd+1:dd+recvcount) +#if defined HAVE_MPI + end if +#endif + +end subroutine xmpi_scatterv_dp +!!*** + +!!****f* ABINIT/xmpi_scatterv_dp2d +!! NAME +!! xmpi_scatterv_dp2d +!! +!! FUNCTION +!! Gathers data from all tasks and delivers it to all. +!! Target: two-dimensional real arrays. +!! +!! INPUTS +!! xval= buffer array +!! recvcount= number of received elements +!! displs= relative offsets for incoming data (array) +!! sendcounts= number of sent elements (array) +!! root= rank of receiving process +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! recvbuf= received buffer +!! +!! SOURCE + +subroutine xmpi_scatterv_dp2d(xval,sendcounts,displs,recvbuf,recvcount,root,comm,ier) + +!Arguments------------------------- + real(dp), DEV_CONTARRD intent(in) :: xval(:,:) + real(dp), DEV_CONTARRD intent(inout) :: recvbuf(:,:) + integer, DEV_CONTARRD intent(in) :: sendcounts(:),displs(:) + integer,intent(in) :: recvcount,root,comm + integer,intent(out) :: ier + +!Local variables------------------- + integer :: cc,dd,sz1 + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_SCATTERV(xval,sendcounts,displs,MPI_DOUBLE_PRECISION,recvbuf,recvcount,& +& MPI_DOUBLE_PRECISION,root,comm,ier) + else if (comm == MPI_COMM_SELF) then +#endif + sz1=size(recvbuf,1);cc=recvcount/sz1 + dd=0;if (size(displs)>0) dd=displs(1)/sz1 + recvbuf(:,1:cc)=xval(:,dd+1:dd+cc) +#if defined HAVE_MPI + end if +#endif + +end subroutine xmpi_scatterv_dp2d +!!*** + +!!****f* ABINIT/xmpi_scatterv_dp3d +!! NAME +!! xmpi_scatterv_dp3d +!! +!! FUNCTION +!! Gathers data from all tasks and delivers it to all. +!! Target: three-dimensional real arrays. +!! +!! INPUTS +!! xval= buffer array +!! recvcount= number of received elements +!! displs= relative offsets for incoming data (array) +!! sendcounts= number of sent elements (array) +!! root= rank of receiving process +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! recvbuf= received buffer +!! +!! SOURCE + +subroutine xmpi_scatterv_dp3d(xval,sendcounts,displs,recvbuf,recvcount,root,comm,ier) + +!Arguments------------------------- + real(dp), DEV_CONTARRD intent(in) :: xval(:,:,:) + real(dp), DEV_CONTARRD intent(inout) :: recvbuf(:,:,:) + integer, DEV_CONTARRD intent(in) :: sendcounts(:),displs(:) + integer,intent(in) :: recvcount,root,comm + integer,intent(out) :: ier + +!Local variables------------------- + integer :: cc,dd,sz12 + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_SCATTERV(xval,sendcounts,displs,MPI_DOUBLE_PRECISION,recvbuf,recvcount,& +& MPI_DOUBLE_PRECISION,root,comm,ier) + else if (comm == MPI_COMM_SELF) then +#endif + sz12=size(recvbuf,1)*size(recvbuf,2);cc=recvcount/sz12 + dd=0;if (size(displs)>0) dd=displs(1)/sz12 + recvbuf(:,:,1:cc)=xval(:,:,dd+1:dd+cc) +#if defined HAVE_MPI + end if +#endif + +end subroutine xmpi_scatterv_dp3d +!!*** + +!!****f* ABINIT/xmpi_scatterv_dp4d +!! NAME +!! xmpi_scatterv_dp4d +!! +!! FUNCTION +!! Gathers data from all tasks and delivers it to all. +!! Target: four-dimensional real arrays. +!! +!! INPUTS +!! xval= buffer array +!! recvcount= number of received elements +!! displs= relative offsets for incoming data (array) +!! sendcounts= number of sent elements (array) +!! root= rank of receiving process +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! recvbuf= received buffer +!! +!! SOURCE + +subroutine xmpi_scatterv_dp4d(xval,sendcounts,displs,recvbuf,recvcount,root,comm,ier) + +!Arguments------------------------- + real(dp), DEV_CONTARRD intent(in) :: xval(:,:,:,:) + real(dp), DEV_CONTARRD intent(inout) :: recvbuf(:,:,:,:) + integer, DEV_CONTARRD intent(in) :: sendcounts(:),displs(:) + integer,intent(in) :: recvcount,root,comm + integer,intent(out) :: ier + +!Local variables------------------- + integer :: cc,dd,sz123 + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_SCATTERV(xval,sendcounts,displs,MPI_DOUBLE_PRECISION,recvbuf,recvcount,& +& MPI_DOUBLE_PRECISION,root,comm,ier) + else if (comm == MPI_COMM_SELF) then +#endif + sz123=size(recvbuf,1)*size(recvbuf,2)*size(recvbuf,2);cc=recvcount/sz123 + dd=0;if (size(displs)>0) dd=displs(1)/sz123 + recvbuf(:,:,:,1:cc)=xval(:,:,:,dd+1:dd+cc) +#if defined HAVE_MPI + end if +#endif + +end subroutine xmpi_scatterv_dp4d +!!*** diff --git a/GX-PAW/common/src/12_hide_mpi/xmpi_send.finc b/GX-PAW/common/src/12_hide_mpi/xmpi_send.finc new file mode 100644 index 00000000..fb6ec8fc --- /dev/null +++ b/GX-PAW/common/src/12_hide_mpi/xmpi_send.finc @@ -0,0 +1,580 @@ +!{\src2tex{textfont=tt}} +!!****f* ABINIT/xmpi_send +!! NAME +!! xmpi_send +!! +!! FUNCTION +!! This module contains functions that calls MPI routine MPI_SEND, +!! to send data from one processor to another, +!! if we compile the code using the MPI CPP flags. +!! xmpi_send is the generic function. +!! +!! COPYRIGHT +!! Copyright (C) 2001-2024 ABINIT group +!! This file is distributed under the terms of the +!! GNU General Public License, see ~ABINIT/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! SOURCE +!!*** + +!!****f* ABINIT/xmpi_send_char +!! NAME +!! xmpi_send_char +!! +!! FUNCTION +!! Sends data from one proc to another. +!! Target: character. +!! +!! INPUTS +!! dest :: rank of destination process +!! tag :: integer message tag +!! comm :: MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_send_char(xval,dest,tag,comm,ier) + +!Arguments------------------------- + character(len=*),intent(inout),target :: xval + integer ,intent(in) :: dest,tag,comm + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_tag + character,pointer :: arr_xval(:) + type(c_ptr) :: cptr +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + my_tag = MOD(tag,xmpi_tag_ub) + cptr=c_loc(xval) ; call c_f_pointer(cptr,arr_xval,[len(xval)]) + call MPI_SEND(arr_xval,len(xval),MPI_CHARACTER,dest,my_tag,comm,ier) + end if +#endif + +end subroutine xmpi_send_char +!!*** + +!!****f* ABINIT/xmpi_send_intv +!! NAME +!! xmpi_send_intv +!! +!! FUNCTION +!! Sends data from one processor to another. +!! Target: single integer. +!! +!! INPUTS +!! dest :: rank of destination process +!! tag :: integer message tag +!! comm :: MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_send_intv(xval,dest,tag,comm,ier) + +!Arguments------------------------- + integer,intent(inout) :: xval + integer,intent(in) :: dest,tag,comm + integer,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_tag +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + my_tag = MOD(tag,xmpi_tag_ub) + call MPI_SEND([xval],1,MPI_INTEGER,dest,my_tag,comm,ier) + end if +#endif + + end subroutine xmpi_send_intv + +!!*** + +!!****f* ABINIT/xmpi_send_int1d +!! NAME +!! xmpi_send_int1d +!! +!! FUNCTION +!! Sends data from one processor to another. +!! Target: integer one-dimensional arrays. +!! +!! INPUTS +!! dest :: rank of destination process +!! tag :: integer message tag +!! comm :: MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_send_int1d(xval,dest,tag,comm,ier) + +!Arguments------------------------- + integer, DEV_CONTARRD intent(inout) :: xval(:) + integer,intent(in) :: dest,tag,comm + integer,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_tag, n1 +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + n1=size(xval,dim=1) + my_tag = MOD(tag,xmpi_tag_ub) + call MPI_SEND(xval,n1,MPI_INTEGER,dest,my_tag,comm,ier) + end if +#endif + + end subroutine xmpi_send_int1d +!!*** + +!!****f* ABINIT/xmpi_send_int2d +!! NAME +!! xmpi_send_int2d +!! +!! FUNCTION +!! Sends data from one proc to another. +!! Target: integer two-dimensional arrays. +!! +!! INPUTS +!! dest :: rank of destination process +!! tag :: integer message tag +!! comm :: MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! PARENTS +!! +!! CHILDREN +!! mpi_send +!! +!! SOURCE +subroutine xmpi_send_int2d(xval,dest,tag,comm,ier) + +!Arguments------------------------- + integer,intent(inout) :: xval(:,:) + integer ,intent(in) :: dest,tag,comm + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2,my_tag + integer(kind=int64) :: ntot +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + n1=size(xval,dim=1) + n2=size(xval,dim=2) + my_tag = MOD(tag,xmpi_tag_ub) + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2,kind=int64) + + if (ntot<=xmpi_maxint32_64) then + call MPI_SEND(xval,n1*n2,MPI_INTEGER,dest,my_tag,comm,ier) + else + call xmpi_largetype_create(ntot,MPI_INTEGER,my_dt,my_op,MPI_OP_NULL) + call MPI_SEND(xval,1,my_dt,dest,my_tag,comm,ier) + call xmpi_largetype_free(my_dt,my_op) + end if + + end if +#endif + +end subroutine xmpi_send_int2d +!!*** + +!!****f* ABINIT/xmpi_send_int3d +!! NAME +!! xmpi_send_int3d +!! +!! FUNCTION +!! Sends data from one proc to another. +!! Target: integer three-dimensional arrays. +!! +!! INPUTS +!! dest :: rank of destination process +!! tag :: integer message tag +!! comm :: MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! PARENTS +!! +!! CHILDREN +!! mpi_send +!! +!! SOURCE + +subroutine xmpi_send_int3d(xval,dest,tag,comm,ier) + +!Arguments------------------------- + integer,intent(inout) :: xval(:,:,:) + integer ,intent(in) :: dest,tag,comm + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2,n3,my_tag + integer(kind=int64) :: ntot +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + n1=size(xval,dim=1) + n2=size(xval,dim=2) + n3=size(xval,dim=3) + my_tag = MOD(tag,xmpi_tag_ub) + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2*n3,kind=int64) + + if (ntot<=xmpi_maxint32_64) then + call MPI_SEND(xval,n1*n2*n3,MPI_INTEGER,dest,my_tag,comm,ier) + else + call xmpi_largetype_create(ntot,MPI_INTEGER,my_dt,my_op,MPI_OP_NULL) + call MPI_SEND(xval,1,my_dt,dest,my_tag,comm,ier) + call xmpi_largetype_free(my_dt,my_op) + end if + + end if +#endif + +end subroutine xmpi_send_int3d +!!*** + +!!****f* ABINIT/xmpi_send_dp +!! NAME +!! xmpi_send_dp +!! +!! FUNCTION +!! Sends data from one proc to another. +!! Target: double precision value. +!! +!! INPUTS +!! dest :: rank of destination process +!! tag :: integer message tag +!! comm :: MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_send_dp(xval,dest,tag,comm,ier) + +!Arguments------------------------- + real(dp), DEV_CONTARRD intent(inout) :: xval + integer ,intent(in) :: dest,tag,comm + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_tag +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + my_tag = MOD(tag,xmpi_tag_ub) + call MPI_SEND([xval],1,MPI_DOUBLE_PRECISION,dest,my_tag,comm,ier) + end if +#endif + +end subroutine xmpi_send_dp +!!*** + +!!****f* ABINIT/xmpi_send_dp1d +!! NAME +!! xmpi_send_dp1d +!! +!! FUNCTION +!! Sends data from one proc to another. +!! Target: double precision one-dimensional arrays. +!! +!! INPUTS +!! dest :: rank of destination process +!! tag :: integer message tag +!! comm :: MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_send_dp1d(xval,dest,tag,comm,ier) + +!Arguments------------------------- + real(dp), DEV_CONTARRD intent(inout) :: xval(:) + integer ,intent(in) :: dest,tag,comm + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: n1,my_tag +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + n1=size(xval,dim=1) + my_tag = MOD(tag,xmpi_tag_ub) + call MPI_SEND(xval,n1,MPI_DOUBLE_PRECISION,dest,my_tag,comm,ier) + end if +#endif + +end subroutine xmpi_send_dp1d +!!*** + +!!****f* ABINIT/xmpi_send_dp2d +!! NAME +!! xmpi_send_dp2d +!! +!! FUNCTION +!! Sends data from one proc to another. +!! Target: double precision two-dimensional arrays. +!! +!! INPUTS +!! dest :: rank of destination process +!! tag :: integer message tag +!! comm :: MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_send_dp2d(xval,dest,tag,comm,ier) + +!Arguments------------------------- + real(dp), DEV_CONTARRD intent(inout) :: xval(:,:) + integer ,intent(in) :: dest,tag,comm + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2,my_tag + integer(kind=int64) :: ntot +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + n1=size(xval,dim=1) + n2=size(xval,dim=2) + my_tag = MOD(tag,xmpi_tag_ub) + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2,kind=int64) + + if (ntot<=xmpi_maxint32_64) then + call MPI_SEND(xval,n1*n2,MPI_DOUBLE_PRECISION,dest,my_tag,comm,ier) + else + call xmpi_largetype_create(ntot,MPI_DOUBLE_PRECISION,my_dt,my_op,MPI_OP_NULL) + call MPI_SEND(xval,1,my_dt,dest,my_tag,comm,ier) + call xmpi_largetype_free(my_dt,my_op) + end if + + end if +#endif + +end subroutine xmpi_send_dp2d +!!*** + +!!****f* ABINIT/xmpi_send_dp3d +!! NAME +!! xmpi_send_dp3d +!! +!! FUNCTION +!! Sends data from one proc to another. +!! Target: double precision three-dimensional arrays. +!! +!! INPUTS +!! dest :: rank of destination process +!! tag :: integer message tag +!! comm :: MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_send_dp3d(xval,dest,tag,comm,ier) + +!Arguments------------------------- + real(dp), DEV_CONTARRD intent(inout) :: xval(:,:,:) + integer ,intent(in) :: dest,tag,comm + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2,n3,my_tag + integer(kind=int64) :: ntot +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + n1=size(xval,dim=1) + n2=size(xval,dim=2) + n3=size(xval,dim=3) + my_tag = MOD(tag,xmpi_tag_ub) + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2*n3,kind=int64) + + if (ntot<=xmpi_maxint32_64) then + call MPI_SEND(xval,n1*n2*n3,MPI_DOUBLE_PRECISION,dest,my_tag,comm,ier) + else + call xmpi_largetype_create(ntot,MPI_DOUBLE_PRECISION,my_dt,my_op,MPI_OP_NULL) + call MPI_SEND(xval,1,my_dt,dest,my_tag,comm,ier) + call xmpi_largetype_free(my_dt,my_op) + end if + + end if +#endif + +end subroutine xmpi_send_dp3d +!!*** +! + +!!****f* ABINIT/xmpi_send_dp4d +!! NAME +!! xmpi_send_dp4d +!! +!! FUNCTION +!! Sends data from one proc to another. +!! Target: double precision four-dimensional arrays. +!! +!! INPUTS +!! dest :: rank of destination process +!! tag :: integer message tag +!! comm :: MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_send_dp4d(xval,dest,tag,comm,ier) + +!Arguments------------------------- + real(dp), DEV_CONTARRD intent(inout) :: xval(:,:,:,:) + integer ,intent(in) :: dest,tag,comm + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2,n3,n4,my_tag + integer(kind=int64) :: ntot +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + n1=size(xval,dim=1) + n2=size(xval,dim=2) + n3=size(xval,dim=3) + n4=size(xval,dim=4) + my_tag = MOD(tag,xmpi_tag_ub) + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2*n3*n4,kind=int64) + + if (ntot<=xmpi_maxint32_64) then + call MPI_SEND(xval,n1*n2*n3*n4,MPI_DOUBLE_PRECISION,dest,my_tag,comm,ier) + else + call xmpi_largetype_create(ntot,MPI_DOUBLE_PRECISION,my_dt,my_op,MPI_OP_NULL) + call MPI_SEND(xval,1,my_dt,dest,my_tag,comm,ier) + call xmpi_largetype_free(my_dt,my_op) + end if + + end if +#endif + +end subroutine xmpi_send_dp4d +!!*** +! diff --git a/GX-PAW/common/src/12_hide_mpi/xmpi_sum.finc b/GX-PAW/common/src/12_hide_mpi/xmpi_sum.finc new file mode 100644 index 00000000..93645d01 --- /dev/null +++ b/GX-PAW/common/src/12_hide_mpi/xmpi_sum.finc @@ -0,0 +1,3725 @@ +!{\src2tex{textfont=tt}} +!!****f* ABINIT/xmpi_sum_int +!! NAME +!! xmpi_sum_int +!! +!! FUNCTION +!! This module contains functions that calls MPI routine, +!! if we compile the code using the MPI CPP flags. +!! xmpi_sum is the generic function. +!! +!! COPYRIGHT +!! Copyright (C) 2001-2024 ABINIT group (AR,XG,MB) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~ABINIT/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! NOTES +!! MPI2 defines an option MPI_IN_PLACE to do the SUM in-place in the case of intra-communicators. +!! The additional array xsum is therefore not needed if MPI_INPLACE is defined. +!! +!! PARENTS +!! +!! CHILDREN +!! mpi_allreduce,xmpi_abort +!! +!! SOURCE + +subroutine xmpi_sum_int(xval,comm,ier) + +!Arguments ------------------------------------ + integer, DEV_CONTARRD intent(inout) :: xval(:) + integer,intent(in) :: comm + integer,intent(out) :: ier + +!Local variables------------------------------- +#if defined HAVE_MPI + integer :: n1 + integer,allocatable :: xsum(:) +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + n1 = size(xval) + + ! Accumulate xval on all proc. in comm +#if defined HAVE_MPI2_INPLACE + if (xmpi_use_inplace_operations) then + call MPI_ALLREDUCE(MPI_IN_PLACE,xval,n1,MPI_INTEGER,MPI_SUM,comm,ier) + else +#endif + ABI_STAT_MALLOC(xsum,(n1), ier) + if (ier/= 0) call xmpi_abort(msg='error allocating xsum in xmpi_sum_int') + call MPI_ALLREDUCE(xval,xsum,n1,MPI_INTEGER,MPI_SUM,comm,ier) + xval (:) = xsum(:) + ABI_FREE(xsum) +#if defined HAVE_MPI2_INPLACE + end if +#endif + + end if +#endif + +end subroutine xmpi_sum_int +!!*** + +!> wrapper arround xmpi_sum_int than can be called in C/CUDA +subroutine xmpi_sum_int_c(xval_ptr,xval_size,comm,ier) bind(c, name="xmpi_sum_int_c") + + use, intrinsic :: iso_c_binding, only: c_associated,c_loc,c_ptr,c_f_pointer,c_int32_t + implicit none + + ! dummy args + type(c_ptr), intent(inout) :: xval_ptr + integer(kind=c_int32_t), value, intent(in) :: xval_size + integer(kind=c_int32_t), intent(in) :: comm + integer(kind=c_int32_t), intent(out) :: ier + + ! local vars + integer, pointer :: xval(:) => null() + + ! convert the c pointer into a fortran array + call c_f_pointer(xval_ptr, xval, [xval_size]) + + call xmpi_sum_int(xval, comm, ier) + +end subroutine xmpi_sum_int_c + +!---------------------------------------------------------------------- + +!!****f* ABINIT/xmpi_sum_intv +!! NAME +!! xmpi_sum_intv +!! +!! FUNCTION +!! Combines values from all processes and distribute +!! the result back to all processes. +!! Target: scalar integers. +!! +!! INPUTS +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_sum_intv(xval,comm,ier) + +!Arguments---------------------- + integer,intent(inout) :: xval + integer,intent(in) :: comm + integer,intent(out) :: ier + +!Local variables---------------- +#if defined HAVE_MPI + integer :: arr_xsum(1) +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then +! Accumulate xval on all proc. in comm + call MPI_ALLREDUCE([xval],arr_xsum,1,MPI_INTEGER,MPI_SUM,comm,ier) + xval = arr_xsum(1) + end if +#endif +end subroutine xmpi_sum_intv +!!*** + +!> wrapper arround xmpi_sum_intv than can be called in C/CUDA +subroutine xmpi_sum_intv_c(xval_ptr,comm,ier) bind(c, name="xmpi_sum_intv_c") + + use, intrinsic :: iso_c_binding, only: c_associated,c_loc,c_ptr,c_f_pointer,c_int32_t + implicit none + + ! dummy args + type(c_ptr), intent(inout) :: xval_ptr + integer(kind=c_int32_t), intent(in) :: comm + integer(kind=c_int32_t), intent(out) :: ier + + ! local vars + integer, pointer :: xval => null() + + ! convert the c pointer into a fortran variable + call c_f_pointer(xval_ptr, xval) + + call xmpi_sum_intv(xval, comm, ier) + +end subroutine xmpi_sum_intv_c + + +!---------------------------------------------------------------------- + +!!****f* ABINIT/xmpi_sum_intv2 +!! NAME +!! xmpi_sum_intv2 +!! +!! FUNCTION +!! Combines values from all processes and distribute +!! the result back to all processes. +!! Target: scalar integer without transfers. +!! +!! INPUTS +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! xsum= receive buffer +!! +!! SOURCE + +subroutine xmpi_sum_intv2(xval,xsum,comm,ier) + +!Arguments--------------------- + integer,intent(inout) :: xval,xsum + integer,intent(in) :: comm + integer,intent(out) :: ier + +!Local variables---------------- +#if defined HAVE_MPI + integer :: arr_xsum(1) +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_ALLREDUCE([xval],arr_xsum,1,MPI_INTEGER,MPI_SUM,comm,ier) + xsum=arr_xsum(1) + else +#endif + xsum=xval +#if defined HAVE_MPI + end if +#endif + +end subroutine xmpi_sum_intv2 +!!*** + +!> wrapper arround xmpi_sum_intv2 than can be called in C/CUDA +subroutine xmpi_sum_intv2_c(xval_ptr,xsum_ptr,comm,ier) bind(c, name="xmpi_sum_intv2_c") + + use, intrinsic :: iso_c_binding, only: c_associated,c_loc,c_ptr,c_f_pointer,c_int32_t + implicit none + + ! dummy args + type(c_ptr), intent(inout) :: xval_ptr + type(c_ptr), intent(inout) :: xsum_ptr + integer(kind=c_int32_t), intent(in) :: comm + integer(kind=c_int32_t), intent(out) :: ier + + ! local vars + integer, pointer :: xval => null() + integer, pointer :: xsum => null() + + ! convert the c pointer into a fortran variable + call c_f_pointer(xval_ptr, xval) + call c_f_pointer(xsum_ptr, xsum) + + call xmpi_sum_intv2(xval, xsum, comm, ier) + +end subroutine xmpi_sum_intv2_c + +!!****f* ABINIT/xmpi_sum_intn +!! NAME +!! xmpi_sum_intn +!! +!! FUNCTION +!! Combines values from all processes and distribute +!! the result back to all processes. +!! Target: one-dimensional integer arrays. +!! +!! INPUTS +!! n1= first dimension of the array +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_sum_intn(xval,n1,comm,ier) + +!Arguments------------------------- + integer, DEV_CONTARRD intent(inout) :: xval(:) + integer,intent(in) :: n1 + integer,intent(in) :: comm + integer,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: nproc_space_comm + integer , allocatable :: xsum(:) +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_COMM_SIZE(comm,nproc_space_comm,ier) + if (nproc_space_comm /= 1) then + +! Accumulate xval on all proc. in comm +#if defined HAVE_MPI2_INPLACE + if (xmpi_use_inplace_operations) then + call MPI_ALLREDUCE(MPI_IN_PLACE,xval,n1,MPI_INTEGER,MPI_SUM,comm,ier) + else +#endif + ABI_STAT_MALLOC(xsum,(n1), ier) + if (ier/= 0) call xmpi_abort(msg='error allocating xsum in xmpi_sum_intn') + call MPI_ALLREDUCE(xval,xsum,n1,MPI_INTEGER,MPI_SUM,comm,ier) + xval (:) = xsum(:) + ABI_FREE(xsum) +#if defined HAVE_MPI2_INPLACE + endif +#endif + + end if + end if +#endif + +end subroutine xmpi_sum_intn +!!*** + +!> wrapper arround xmpi_sum_intn than can be called in C/CUDA +subroutine xmpi_sum_intn_c(xval_ptr,xval_size,n1,comm,ier) bind(c, name="xmpi_sum_intn_c") + + use, intrinsic :: iso_c_binding, only: c_associated,c_loc,c_ptr,c_f_pointer,c_int32_t + implicit none + + ! dummy args + type(c_ptr), intent(inout) :: xval_ptr + integer(kind=c_int32_t), value, intent(in) :: xval_size + integer(kind=c_int32_t), intent(in) :: n1 + integer(kind=c_int32_t), intent(in) :: comm + integer(kind=c_int32_t), intent(out) :: ier + + ! local vars + integer, pointer :: xval(:) => null() + + ! convert the c pointer into a fortran array + call c_f_pointer(xval_ptr, xval, [xval_size]) + + call xmpi_sum_intn(xval, n1, comm, ier) + +end subroutine xmpi_sum_intn_c + +!---------------------------------------------------------------------- + +!!****f* ABINIT/xmpi_sum_int2t +!! NAME +!! xmpi_sum_int2t +!! +!! FUNCTION +!! Combines values from all processes and distribute +!! the result back to all processes. +!! Target: one-dimensional integer array without transfers. +!! +!! INPUTS +!! n1= first dimension of the array +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! xsum= receive buffer +!! +!! SOURCE + +subroutine xmpi_sum_int2t(xval,xsum,n1,comm,ier) + +!Arguments------------------------- + integer, DEV_CONTARRD intent(inout) :: xval(:),xsum(:) + integer,intent(in) :: n1 + integer,intent(in) :: comm + integer,intent(out) :: ier + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then +! Accumulate xval on all proc. in comm + call MPI_ALLREDUCE(xval,xsum,n1,MPI_INTEGER,MPI_SUM,comm,ier) + else +#endif + xsum=xval +#if defined HAVE_MPI + end if +#endif + +end subroutine xmpi_sum_int2t +!!*** + +!---------------------------------------------------------------------- + +!!****f* ABINIT/xmpi_sum_int2d +!! NAME +!! xmpi_sum_int2d +!! +!! FUNCTION +!! Combines values from all processes and distribute +!! the result back to all processes. +!! Target: two-dimensional integer arrays. +!! +!! INPUTS +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_sum_int2d(xval,comm,ier) + +!Arguments------------------------- + integer, DEV_CONTARRD intent(inout) :: xval(:,:) + integer,intent(in) :: comm + integer,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2,nn,nproc_space_comm + integer(kind=int64) :: ntot + integer,allocatable :: xsum(:,:) +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_COMM_SIZE(comm,nproc_space_comm,ier) + if (nproc_space_comm /= 1) then + n1 =size(xval,dim=1) + n2 =size(xval,dim=2) + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2,kind=int64) + if (ntot<=xmpi_maxint32_64) then + nn=n1*n2 ; my_dt=MPI_INTEGER ; my_op=MPI_SUM + else + nn=1 ; call xmpi_largetype_create(ntot,MPI_INTEGER,my_dt,my_op,MPI_SUM) + end if + +! Accumulate xval on all proc. in comm +#if defined HAVE_MPI2_INPLACE + if (xmpi_use_inplace_operations .and. my_op == MPI_SUM) then + if (my_op/=MPI_SUM) call xmpi_abort(msg="Too many data for in-place reductions!") + call MPI_ALLREDUCE(MPI_IN_PLACE,xval,nn,my_dt,my_op,comm,ier) + else +#endif + ABI_STAT_MALLOC(xsum,(n1,n2), ier) + if (ier/=0) call xmpi_abort(msg='error allocating xsum in xmpi_sum_int2d') + call MPI_ALLREDUCE(xval,xsum,nn,my_dt,my_op,comm,ier) + xval (:,:) = xsum(:,:) + ABI_FREE(xsum) +#if defined HAVE_MPI2_INPLACE + end if +#endif + + if (ntot>xmpi_maxint32_64) call xmpi_largetype_free(my_dt,my_op) + end if + end if +#endif + +end subroutine xmpi_sum_int2d +!!*** + +!> wrapper arround xmpi_sum_int2d than can be called in C/CUDA +subroutine xmpi_sum_int2d_c(xval_ptr,xval_size,comm,ier) bind(c, name="xmpi_sum_int2d_c") + + use, intrinsic :: iso_c_binding, only: c_associated,c_loc,c_ptr,c_f_pointer,c_int32_t + implicit none + + ! dummy args + type(c_ptr), intent(inout) :: xval_ptr + integer(kind=c_int32_t), intent(in) :: xval_size(2) + integer(kind=c_int32_t), intent(in) :: comm + integer(kind=c_int32_t), intent(out) :: ier + + ! local vars + integer, pointer :: xval(:,:) => null() + + ! convert the c pointer into a fortran array + call c_f_pointer(xval_ptr, xval, xval_size) + + call xmpi_sum_int2d(xval, comm, ier) + +end subroutine xmpi_sum_int2d_c + +!---------------------------------------------------------------------- + +!!****f* ABINIT/xmpi_sum_int3d +!! NAME +!! xmpi_sum_int3d +!! +!! FUNCTION +!! Combines values from all processes and distribute +!! the result back to all processes. +!! Target: three-dimensional integer arrays. +!! +!! INPUTS +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_sum_int3d(xval,comm,ier) + +!Arguments------------------------- + integer, DEV_CONTARRD intent(inout) :: xval(:,:,:) + integer,intent(in) :: comm + integer,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2,n3,nn,nproc_space_comm + integer(kind=int64) :: ntot + integer,allocatable :: xsum(:,:,:) +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_COMM_SIZE(comm,nproc_space_comm,ier) + if (nproc_space_comm /= 1) then + n1 =size(xval,dim=1) + n2 =size(xval,dim=2) + n3 =size(xval,dim=3) + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2*n3,kind=int64) + if (ntot<=xmpi_maxint32_64) then + nn=n1*n2*n3 ; my_dt=MPI_INTEGER ; my_op=MPI_SUM + else + nn=1 ; call xmpi_largetype_create(ntot,MPI_INTEGER,my_dt,my_op,MPI_SUM) + end if + +! Accumulate xval on all proc. in comm +#if defined HAVE_MPI2_INPLACE + if (xmpi_use_inplace_operations .and. my_op == MPI_SUM) then + if (my_op/=MPI_SUM) call xmpi_abort(msg="Too many data for in-place reductions!") + call MPI_ALLREDUCE(MPI_IN_PLACE,xval,nn,my_dt,my_op,comm,ier) +#endif + else + ABI_STAT_MALLOC(xsum,(n1,n2,n3), ier) + if (ier/= 0) call xmpi_abort(msg='error allocating xsum in xmpi_sum_int3d') + call MPI_ALLREDUCE(xval,xsum,nn,my_dt,my_op,comm,ier) + xval (:,:,:) = xsum(:,:,:) + ABI_FREE(xsum) +#if defined HAVE_MPI2_INPLACE + end if +#endif + + if (ntot>xmpi_maxint32_64) call xmpi_largetype_free(my_dt,my_op) + end if + end if +#endif + +end subroutine xmpi_sum_int3d +!!*** + +!> wrapper arround xmpi_sum_int3d than can be called in C/CUDA +subroutine xmpi_sum_int3d_c(xval_ptr,xval_size,comm,ier) bind(c, name="xmpi_sum_int3d_c") + + use, intrinsic :: iso_c_binding, only: c_associated,c_loc,c_ptr,c_f_pointer,c_int32_t + implicit none + + ! dummy args + type(c_ptr), intent(inout) :: xval_ptr + integer(kind=c_int32_t), intent(in) :: xval_size(3) + integer(kind=c_int32_t), intent(in) :: comm + integer(kind=c_int32_t), intent(out) :: ier + + ! local vars + integer, pointer :: xval(:,:,:) => null() + + ! convert the c pointer into a fortran array + call c_f_pointer(xval_ptr, xval, xval_size) + + call xmpi_sum_int3d(xval, comm, ier) + +end subroutine xmpi_sum_int3d_c + +!---------------------------------------------------------------------- + +!!****f* ABINIT/xmpi_sum_int4d +!! NAME +!! xmpi_sum_int4d +!! +!! FUNCTION +!! Combines values from all processes and distribute +!! the result back to all processes. +!! Target: four-dimensional integer arrays. +!! +!! INPUTS +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_sum_int4d(xval,comm,ier) + +!Arguments------------------------- + integer, DEV_CONTARRD intent(inout) :: xval(:,:,:,:) + integer,intent(in) :: comm + integer,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2,n3,n4,nn,nproc_space_comm + integer(kind=int64) :: ntot + integer,allocatable :: xsum(:,:,:,:) +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_COMM_SIZE(comm,nproc_space_comm,ier) + if (nproc_space_comm /= 1) then + n1 =size(xval,dim=1) + n2 =size(xval,dim=2) + n3 =size(xval,dim=3) + n4 =size(xval,dim=4) + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2*n3*n4,kind=int64) + if (ntot<=xmpi_maxint32_64) then + nn=n1*n2*n3*n4 ; my_dt=MPI_INTEGER ; my_op=MPI_SUM + else + nn=1 ; call xmpi_largetype_create(ntot,MPI_INTEGER,my_dt,my_op,MPI_SUM) + end if + +! Accumulate xval on all proc. in comm +#if defined HAVE_MPI2_INPLACE + if (xmpi_use_inplace_operations .and. my_op == MPI_SUM) then + if (my_op/=MPI_SUM) call xmpi_abort(msg="Too many data for in-place reductions!") + call MPI_ALLREDUCE(MPI_IN_PLACE,xval,nn,my_dt,my_op,comm,ier) + else +#endif + ABI_STAT_MALLOC(xsum,(n1,n2,n3,n4), ier) + if (ier/= 0) call xmpi_abort(msg='error allocating xsum in xmpi_sum_int4d') + call MPI_ALLREDUCE(xval,xsum,nn,my_dt,my_op,comm,ier) + xval (:,:,:,:) = xsum(:,:,:,:) + ABI_FREE(xsum) +#if defined HAVE_MPI2_INPLACE + end if +#endif + + if (ntot>xmpi_maxint32_64) call xmpi_largetype_free(my_dt,my_op) + end if + end if +#endif + +end subroutine xmpi_sum_int4d +!!*** + +!> wrapper arround xmpi_sum_int4d than can be called in C/CUDA +subroutine xmpi_sum_int4d_c(xval_ptr,xval_size,comm,ier) bind(c, name="xmpi_sum_int4d_c") + + use, intrinsic :: iso_c_binding, only: c_associated,c_loc,c_ptr,c_f_pointer,c_int32_t + implicit none + + ! dummy args + type(c_ptr), intent(inout) :: xval_ptr + integer(kind=c_int32_t), intent(in) :: xval_size(4) + integer(kind=c_int32_t), intent(in) :: comm + integer(kind=c_int32_t), intent(out) :: ier + + ! local vars + integer, pointer :: xval(:,:,:,:) => null() + + ! convert the c pointer into a fortran array + call c_f_pointer(xval_ptr, xval, xval_size) + + call xmpi_sum_int4d(xval, comm, ier) + +end subroutine xmpi_sum_int4d_c + +!---------------------------------------------------------------------- + +!!****f* ABINIT/xmpi_sum_dp +!! NAME +!! xmpi_sum_dp +!! +!! FUNCTION +!! Combines values from all processes and distribute +!! the result back to all processes. +!! Target: one-dimensional double precision arrays. +!! +!! INPUTS +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_sum_dp(xval,comm,ier) + +!Arguments------------------------- + real(dp), DEV_CONTARRD intent(inout) :: xval(:) + integer,intent(in) :: comm + integer,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: n1,nproc_space_comm + real(dp),allocatable :: xsum(:) +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_COMM_SIZE(comm,nproc_space_comm,ier) + if (nproc_space_comm /= 1) then + n1 = size(xval) + +! Accumulate xval on all proc. in comm +#if defined HAVE_MPI2_INPLACE + if (xmpi_use_inplace_operations) then + call MPI_ALLREDUCE(MPI_IN_PLACE,xval,n1,MPI_DOUBLE_PRECISION,MPI_SUM,comm,ier) + else +#endif + ABI_STAT_MALLOC(xsum,(n1), ier) + if (ier/= 0) call xmpi_abort(msg='error allocating xsum in xmpi_sum_dp') + call MPI_ALLREDUCE(xval,xsum,n1,MPI_DOUBLE_PRECISION,MPI_SUM,comm,ier) + xval (:) = xsum(:) + ABI_FREE(xsum) +#if defined HAVE_MPI2_INPLACE + end if +#endif + + end if + end if +#endif + +end subroutine xmpi_sum_dp +!!*** + +!> wrapper arround xmpi_sum_dp than can be called in C/CUDA +subroutine xmpi_sum_dp_c(xval_ptr,xval_size,comm,ier) bind(c, name="xmpi_sum_dp_c") + + use, intrinsic :: iso_c_binding, only: c_associated,c_loc,c_ptr,c_f_pointer,c_int32_t + implicit none + + ! dummy args + type(c_ptr), intent(inout) :: xval_ptr + integer(kind=c_int32_t), value, intent(in) :: xval_size + integer(kind=c_int32_t), intent(in) :: comm + integer(kind=c_int32_t), intent(out) :: ier + + ! local vars + real(dp), pointer :: xval(:) => null() + + ! convert the c pointer into a fortran array + call c_f_pointer(xval_ptr, xval, [xval_size]) + + call xmpi_sum_dp(xval, comm, ier) + +end subroutine xmpi_sum_dp_c + +!---------------------------------------------------------------------- + +!!****f* ABINIT/xmpi_sum_dpvt +!! NAME +!! xmpi_sum_dpvt +!! +!! FUNCTION +!! Combines values from all processes and distribute +!! the result back to all processes. +!! Target: scalar double precisions. +!! +!! INPUTS +!! xval= buffer array +!! comm= MPI communicator +!! +!! OUTPUT +!! xsum= receive buffer +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! None +!! +!! SOURCE + +subroutine xmpi_sum_dpvt(xval,xsum,comm,ier) + +!Arguments------------------------- + real(dp),intent(in) :: xval + real(dp),intent(out) :: xsum + integer ,intent(in) :: comm + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: nproc_space_comm + real(dp) :: arr_xsum(1) +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_COMM_SIZE(comm,nproc_space_comm,ier) + if (nproc_space_comm /= 1) then +! Accumulate xval on all proc. in comm + call MPI_ALLREDUCE([xval],arr_xsum,1,MPI_DOUBLE_PRECISION,MPI_SUM,comm,ier) + xsum=arr_xsum(1) + else + xsum=xval + end if + else +#endif + xsum=xval +#if defined HAVE_MPI + end if +#endif + +end subroutine xmpi_sum_dpvt +!!*** + +!> wrapper arround xmpi_sum_dpvt than can be called in C/CUDA +subroutine xmpi_sum_dpvt_c(xval_ptr,xsum_ptr,comm,ier) bind(c, name="xmpi_sum_dpvt_c") + + use, intrinsic :: iso_c_binding, only: c_associated,c_loc,c_ptr,c_f_pointer,c_int32_t + implicit none + + ! dummy args + type(c_ptr), intent(inout) :: xval_ptr + type(c_ptr), intent(inout) :: xsum_ptr + integer(kind=c_int32_t), intent(in) :: comm + integer(kind=c_int32_t), intent(out) :: ier + + ! local vars + real(dp), pointer :: xval => null() + real(dp), pointer :: xsum => null() + + ! convert the c pointer into a fortran array + call c_f_pointer(xval_ptr, xval) + call c_f_pointer(xsum_ptr, xsum) + + call xmpi_sum_dpvt(xval, xsum, comm, ier) + +end subroutine xmpi_sum_dpvt_c + +!---------------------------------------------------------------------- + +!!****f* ABINIT/xmpi_sum_dpv +!! NAME +!! xmpi_sum_dpv +!! +!! FUNCTION +!! Combines values from all processes and distribute +!! the result back to all processes. +!! Target: scalar double precisions. +!! +!! INPUTS +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE +subroutine xmpi_sum_dpv(xval,comm,ier) + +!Arguments------------------------- + real(dp),intent(inout) :: xval + integer ,intent(in) :: comm + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: nproc_space_comm + real(dp) :: arr_xsum(1) +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then +! Accumulate xval on all proc. in comm + call MPI_COMM_SIZE(comm,nproc_space_comm,ier) + if (nproc_space_comm /= 1) then + call MPI_ALLREDUCE([xval],arr_xsum,1,MPI_DOUBLE_PRECISION,MPI_SUM,comm,ier) + xval = arr_xsum(1) + end if + end if +#endif + +end subroutine xmpi_sum_dpv +!!*** + +!> wrapper arround xmpi_sum_dpv than can be called in C/CUDA +subroutine xmpi_sum_dpv_c(xval_ptr,comm,ier) bind(c, name="xmpi_sum_dpv_c") + + use, intrinsic :: iso_c_binding, only: c_associated,c_loc,c_ptr,c_f_pointer,c_int32_t + implicit none + + ! dummy args + type(c_ptr), intent(inout) :: xval_ptr + integer(kind=c_int32_t), intent(in) :: comm + integer(kind=c_int32_t), intent(out) :: ier + + ! local vars + real(dp), pointer :: xval => null() + + ! convert the c pointer into a fortran array + call c_f_pointer(xval_ptr, xval) + + call xmpi_sum_dpv(xval, comm, ier) + +end subroutine xmpi_sum_dpv_c + +!---------------------------------------------------------------------- + +!!****f* ABINIT/xmpi_sum_dpn +!! NAME +!! xmpi_sum_dpn +!! +!! FUNCTION +!! Combines values from all processes and distribute +!! the result back to all processes. +!! Target: one-dimensional double precision arrays. +!! +!! INPUTS +!! n1= first dimension of the array +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_sum_dpn(xval,n1,comm,ier) + +!Arguments------------------------- + real(dp), DEV_CONTARRD intent(inout) :: xval(:) + integer ,intent(in) :: n1 + integer ,intent(in) :: comm + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: nproc_space_comm + real(dp) , allocatable :: xsum(:) +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_COMM_SIZE(comm,nproc_space_comm,ier) + if (nproc_space_comm /= 1) then + +! Accumulate xval on all proc. in comm +#if defined HAVE_MPI2_INPLACE + if (xmpi_use_inplace_operations) then + call MPI_ALLREDUCE(MPI_IN_PLACE,xval,n1,MPI_DOUBLE_PRECISION,MPI_SUM,comm,ier) + else +#endif + ABI_STAT_MALLOC(xsum,(n1), ier) + if (ier/= 0) call xmpi_abort(msg='error allocating xsum in xmpi_sum_dpn') + call MPI_ALLREDUCE(xval,xsum,n1,MPI_DOUBLE_PRECISION,MPI_SUM,comm,ier) + xval (:) = xsum(:) + ABI_FREE(xsum) +#if defined HAVE_MPI2_INPLACE + end if +#endif + + end if + end if +#endif + +end subroutine xmpi_sum_dpn +!!*** + +!> wrapper arround xmpi_sum_dpn than can be called in C/CUDA +subroutine xmpi_sum_dpn_c(xval_ptr,xval_size,n1,comm,ier) bind(c, name="xmpi_sum_dpn_c") + + use, intrinsic :: iso_c_binding, only: c_associated,c_loc,c_ptr,c_f_pointer,c_int32_t + implicit none + + ! dummy args + type(c_ptr), intent(inout) :: xval_ptr + integer(kind=c_int32_t), value, intent(in) :: xval_size + integer(kind=c_int32_t), intent(in) :: n1 + integer(kind=c_int32_t), intent(in) :: comm + integer(kind=c_int32_t), intent(out) :: ier + + ! local vars + real(dp), pointer :: xval(:) => null() + + ! convert the c pointer into a fortran array + call c_f_pointer(xval_ptr, xval, [xval_size]) + + call xmpi_sum_dpn(xval, n1, comm, ier) + +end subroutine xmpi_sum_dpn_c + +!---------------------------------------------------------------------- + +!!****f* ABINIT/xmpi_sum_sp2d +!! NAME +!! xmpi_sum_sp2d +!! +!! FUNCTION +!! Combines values from all processes and distribute +!! the result back to all processes. +!! Target: double precision two-dimensional arrays. +!! +!! INPUTS +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_sum_sp2d(xval,comm,ier) + +!Arguments------------------------- + real(sp), DEV_CONTARRD intent(inout) :: xval(:,:) + integer ,intent(in) :: comm + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2,nn,nproc_space_comm + integer(kind=int64) :: ntot + real(sp),allocatable :: xsum(:,:) +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_COMM_SIZE(comm,nproc_space_comm,ier) + if (nproc_space_comm /= 1) then + n1 = size(xval,dim=1) + n2 = size(xval,dim=2) + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2,kind=int64) + if (ntot<=xmpi_maxint32_64) then + nn=n1*n2 ; my_dt=MPI_REAL ; my_op=MPI_SUM + else + nn=1 ; call xmpi_largetype_create(ntot,MPI_REAL,my_dt,my_op,MPI_SUM) + end if + +! Accumulate xval on all proc. in comm +#if defined HAVE_MPI2_INPLACE + if (xmpi_use_inplace_operations .and. my_op == MPI_SUM) then + if (my_op/=MPI_SUM) call xmpi_abort(msg="Too many data for in-place reductions!") + call MPI_ALLREDUCE(MPI_IN_PLACE,xval,nn,my_dt,my_op,comm,ier) + else +#endif + ABI_STAT_MALLOC(xsum,(n1,n2), ier) + if (ier/= 0) call xmpi_abort(msg='error allocating xsum in xmpi_sum_sp2d') + call MPI_ALLREDUCE(xval,xsum,nn,my_dt,my_op,comm,ier) + xval (:,:) = xsum(:,:) + ABI_FREE(xsum) +#if defined HAVE_MPI2_INPLACE + end if +#endif + + if (ntot>xmpi_maxint32_64) call xmpi_largetype_free(my_dt,my_op) + end if + end if +#endif + +end subroutine xmpi_sum_sp2d +!!*** + +!> wrapper arround xmpi_sum_sp2d than can be called in C/CUDA +subroutine xmpi_sum_sp2d_c(xval_ptr,xval_size,comm,ier) bind(c, name="xmpi_sum_sp2d_c") + + use, intrinsic :: iso_c_binding, only: c_associated,c_loc,c_ptr,c_f_pointer,c_int32_t + implicit none + + ! dummy args + type(c_ptr), intent(inout) :: xval_ptr + integer(kind=c_int32_t), intent(in) :: xval_size(2) + integer(kind=c_int32_t), intent(in) :: comm + integer(kind=c_int32_t), intent(out) :: ier + + ! local vars + real(sp), pointer :: xval(:,:) => null() + + ! convert the c pointer into a fortran array + call c_f_pointer(xval_ptr, xval, xval_size) + + call xmpi_sum_sp2d(xval, comm, ier) + +end subroutine xmpi_sum_sp2d_c + +!---------------------------------------------------------------------- + +!!****f* ABINIT/xmpi_sum_sp3d +!! NAME +!! xmpi_sum_sp3d +!! +!! FUNCTION +!! Combines values from all processes and distribute +!! the result back to all processes. +!! Target: double precision three-dimensional arrays. +!! +!! INPUTS +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_sum_sp3d(xval,comm,ier) + +!Arguments------------------------- + real(sp), DEV_CONTARRD intent(inout) :: xval(:,:,:) + integer ,intent(in) :: comm + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2,n3,nn,nproc_space_comm + integer(kind=int64) :: ntot + real(sp),allocatable :: xsum(:,:,:) +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_COMM_SIZE(comm,nproc_space_comm,ier) + if (nproc_space_comm /= 1) then + n1 = size(xval,dim=1) + n2 = size(xval,dim=2) + n3 = size(xval,dim=3) + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2*n3,kind=int64) + if (ntot<=xmpi_maxint32_64) then + nn=n1*n2*n3 ; my_dt=MPI_REAL ; my_op=MPI_SUM + else + nn=1 ; call xmpi_largetype_create(ntot,MPI_REAL,my_dt,my_op,MPI_SUM) + end if + +! Accumulate xval on all proc. in comm +#if defined HAVE_MPI2_INPLACE + if (xmpi_use_inplace_operations .and. my_op == MPI_SUM) then + if (my_op/=MPI_SUM) call xmpi_abort(msg="Too many data for in-place reductions!") + call MPI_ALLREDUCE(MPI_IN_PLACE,xval,nn,my_dt,my_op,comm,ier) + else +#endif + ABI_STAT_MALLOC(xsum,(n1,n2,n3), ier) + if (ier/= 0) call xmpi_abort(msg='error allocating xsum in xmpi_sum_sp3d') + call MPI_ALLREDUCE(xval,xsum,nn,my_dt,my_op,comm,ier) + xval (:,:,:) = xsum(:,:,:) + ABI_FREE(xsum) +#if defined HAVE_MPI2_INPLACE + end if +#endif + + if (ntot>xmpi_maxint32_64) call xmpi_largetype_free(my_dt,my_op) + end if + end if +#endif + +end subroutine xmpi_sum_sp3d +!!*** + +!> wrapper arround xmpi_sum_sp3d than can be called in C/CUDA +subroutine xmpi_sum_sp3d_c(xval_ptr,xval_size,comm,ier) bind(c, name="xmpi_sum_sp3d_c") + + use, intrinsic :: iso_c_binding, only: c_associated,c_loc,c_ptr,c_f_pointer,c_int32_t + implicit none + + ! dummy args + type(c_ptr), intent(inout) :: xval_ptr + integer(kind=c_int32_t), intent(in) :: xval_size(3) + integer(kind=c_int32_t), intent(in) :: comm + integer(kind=c_int32_t), intent(out) :: ier + + ! local vars + real(sp), pointer :: xval(:,:,:) => null() + + ! convert the c pointer into a fortran array + call c_f_pointer(xval_ptr, xval, xval_size) + + call xmpi_sum_sp3d(xval, comm, ier) + +end subroutine xmpi_sum_sp3d_c + +!---------------------------------------------------------------------- + +!!****f* ABINIT/xmpi_sum_sp4d +!! NAME +!! xmpi_sum_sp4d +!! +!! FUNCTION +!! Combines values from all processes and distribute +!! the result back to all processes. +!! Target: double precision four-dimensional arrays. +!! +!! INPUTS +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE +subroutine xmpi_sum_sp4d(xval,comm,ier) + +!Arguments------------------------- + real(sp),DEV_CONTARRD intent(inout) :: xval(:,:,:,:) + integer ,intent(in) :: comm + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2,n3,n4,nn,nproc_space_comm + integer(kind=int64) :: ntot + real(sp),allocatable :: xsum(:,:,:,:) +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_COMM_SIZE(comm,nproc_space_comm,ier) + if (nproc_space_comm /= 1) then + n1 = size(xval,dim=1) + n2 = size(xval,dim=2) + n3 = size(xval,dim=3) + n4 = size(xval,dim=4) + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2*n3*n4,kind=int64) + if (ntot<=xmpi_maxint32_64) then + nn=n1*n2*n3*n4 ; my_dt=MPI_REAL ; my_op=MPI_SUM + else + nn=1 ; call xmpi_largetype_create(ntot,MPI_REAL,my_dt,my_op,MPI_SUM) + end if + +! Accumulate xval on all proc. in comm +#if defined HAVE_MPI2_INPLACE + if (xmpi_use_inplace_operations .and. my_op == MPI_SUM) then + if (my_op/=MPI_SUM) call xmpi_abort(msg="Too many data for in-place reductions!") + call MPI_ALLREDUCE(MPI_IN_PLACE,xval,nn,my_dt,my_op,comm,ier) + else +#endif + ABI_STAT_MALLOC(xsum,(n1,n2,n3,n4), ier) + if (ier/= 0) call xmpi_abort(msg='error allocating xsum in xmpi_sum_sp4d') + call MPI_ALLREDUCE(xval,xsum,nn,my_dt,my_op,comm,ier) + xval (:,:,:,:) = xsum(:,:,:,:) + ABI_FREE(xsum) +#if defined HAVE_MPI2_INPLACE + endif +#endif + + if (ntot>xmpi_maxint32_64) call xmpi_largetype_free(my_dt,my_op) + end if + end if +#endif + +end subroutine xmpi_sum_sp4d +!!*** + +!> wrapper arround xmpi_sum_sp4d than can be called in C/CUDA +subroutine xmpi_sum_sp4d_c(xval_ptr,xval_size,comm,ier) bind(c, name="xmpi_sum_sp4d_c") + + use, intrinsic :: iso_c_binding, only: c_associated,c_loc,c_ptr,c_f_pointer,c_int32_t + implicit none + + ! dummy args + type(c_ptr), intent(inout) :: xval_ptr + integer(kind=c_int32_t), intent(in) :: xval_size(4) + integer(kind=c_int32_t), intent(in) :: comm + integer(kind=c_int32_t), intent(out) :: ier + + ! local vars + real(sp), pointer :: xval(:,:,:,:) => null() + + ! convert the c pointer into a fortran array + call c_f_pointer(xval_ptr, xval, xval_size) + + call xmpi_sum_sp4d(xval, comm, ier) + +end subroutine xmpi_sum_sp4d_c + +!---------------------------------------------------------------------- + +!!****f* ABINIT/xmpi_sum_sp5d +!! NAME +!! xmpi_sum_sp5d +!! +!! FUNCTION +!! Combines values from all processes and distribute +!! the result back to all processes. +!! Target: double precision five-dimensional arrays. +!! +!! INPUTS +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE +subroutine xmpi_sum_sp5d(xval,comm,ier) + +!Arguments------------------------- + real(sp), DEV_CONTARRD intent(inout) :: xval(:,:,:,:,:) + integer ,intent(in) :: comm + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2,n3,n4,n5,nn,nproc_space_comm + integer(kind=int64) :: ntot + real(sp),allocatable :: xsum(:,:,:,:,:) +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_COMM_SIZE(comm,nproc_space_comm,ier) + if (nproc_space_comm /= 1) then + n1 = size(xval,dim=1) + n2 = size(xval,dim=2) + n3 = size(xval,dim=3) + n4 = size(xval,dim=4) + n5 = size(xval,dim=5) + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2*n3*n4*n5,kind=int64) + if (ntot<=xmpi_maxint32_64) then + nn=n1*n2*n3*n4*n5 ; my_dt=MPI_REAL ; my_op=MPI_SUM + else + nn=1 ; call xmpi_largetype_create(ntot,MPI_REAL,my_dt,my_op,MPI_SUM) + end if + +! Accumulate xval on all proc. in comm +#if defined HAVE_MPI2_INPLACE + if (xmpi_use_inplace_operations .and. my_op == MPI_SUM) then + if (my_op/=MPI_SUM) call xmpi_abort(msg="Too many data for in-place reductions!") + call MPI_ALLREDUCE(MPI_IN_PLACE,xval,nn,my_dt,my_op,comm,ier) + else +#endif + ABI_STAT_MALLOC(xsum,(n1,n2,n3,n4,n5), ier) + if (ier/= 0) call xmpi_abort(msg='error allocating xsum in xmpi_sum_sp5d') + call MPI_ALLREDUCE(xval,xsum,nn,my_dt,my_op,comm,ier) + xval (:,:,:,:,:) = xsum(:,:,:,:,:) + ABI_FREE(xsum) +#if defined HAVE_MPI2_INPLACE + endif +#endif + + if (ntot>xmpi_maxint32_64) call xmpi_largetype_free(my_dt,my_op) + end if + end if +#endif + +end subroutine xmpi_sum_sp5d +!!*** + +!> wrapper arround xmpi_sum_sp5d than can be called in C/CUDA +subroutine xmpi_sum_sp5d_c(xval_ptr,xval_size,comm,ier) bind(c, name="xmpi_sum_sp5d_c") + + use, intrinsic :: iso_c_binding, only: c_associated,c_loc,c_ptr,c_f_pointer,c_int32_t + implicit none + + ! dummy args + type(c_ptr), intent(inout) :: xval_ptr + integer(kind=c_int32_t), intent(in) :: xval_size(5) + integer(kind=c_int32_t), intent(in) :: comm + integer(kind=c_int32_t), intent(out) :: ier + + ! local vars + real(sp), pointer :: xval(:,:,:,:,:) => null() + + ! convert the c pointer into a fortran array + call c_f_pointer(xval_ptr, xval, xval_size) + + call xmpi_sum_sp5d(xval, comm, ier) + +end subroutine xmpi_sum_sp5d_c + +!---------------------------------------------------------------------- + +!!****f* ABINIT/xmpi_sum_sp6d +!! NAME +!! xmpi_sum_sp6d +!! +!! FUNCTION +!! Combines values from all processes and distribute +!! the result back to all processes. +!! Target: double precision six-dimensional arrays. +!! +!! INPUTS +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE +subroutine xmpi_sum_sp6d(xval,comm,ier) + +!Arguments------------------------- + real(sp), DEV_CONTARRD intent(inout) :: xval(:,:,:,:,:,:) + integer ,intent(in) :: comm + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2,n3,n4,n5,n6,nn,nproc_space_comm + integer(kind=int64) :: ntot + real(sp), allocatable :: xsum(:,:,:,:,:,:) +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_COMM_SIZE(comm,nproc_space_comm,ier) + if (nproc_space_comm /= 1) then + n1 = size(xval,dim=1) + n2 = size(xval,dim=2) + n3 = size(xval,dim=3) + n4 = size(xval,dim=4) + n5 = size(xval,dim=5) + n6 = size(xval,dim=6) + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2*n3*n4*n5*n6,kind=int64) + if (ntot<=xmpi_maxint32_64) then + nn=n1*n2*n3*n4*n5*n6 ; my_dt=MPI_REAL ; my_op=MPI_SUM + else + nn=1 ; call xmpi_largetype_create(ntot,MPI_REAL,my_dt,my_op,MPI_SUM) + end if + +! Accumulate xval on all proc. in comm +#if defined HAVE_MPI2_INPLACE + if (xmpi_use_inplace_operations .and. my_op == MPI_SUM) then + if (my_op/=MPI_SUM) call xmpi_abort(msg="Too many data for in-place reductions!") + call MPI_ALLREDUCE(MPI_IN_PLACE,xval,nn,my_dt,my_op,comm,ier) + else +#endif + ABI_STAT_MALLOC(xsum,(n1,n2,n3,n4,n5,n6), ier) + if (ier/=0) call xmpi_abort(msg='error allocating xsum in xmpi_sum_sp6d') + call MPI_ALLREDUCE(xval,xsum,nn,my_dt,my_op,comm,ier) + xval (:,:,:,:,:,:) = xsum(:,:,:,:,:,:) + ABI_FREE(xsum) +#if defined HAVE_MPI2_INPLACE + end if +#endif + + if (ntot>xmpi_maxint32_64) call xmpi_largetype_free(my_dt,my_op) + end if + end if +#endif + +end subroutine xmpi_sum_sp6d +!!*** + +!> wrapper arround xmpi_sum_sp6d than can be called in C/CUDA +subroutine xmpi_sum_sp6d_c(xval_ptr,xval_size,comm,ier) bind(c, name="xmpi_sum_sp6d_c") + + use, intrinsic :: iso_c_binding, only: c_associated,c_loc,c_ptr,c_f_pointer,c_int32_t + implicit none + + ! dummy args + type(c_ptr), intent(inout) :: xval_ptr + integer(kind=c_int32_t), intent(in) :: xval_size(6) + integer(kind=c_int32_t), intent(in) :: comm + integer(kind=c_int32_t), intent(out) :: ier + + ! local vars + real(sp), pointer :: xval(:,:,:,:,:,:) => null() + + ! convert the c pointer into a fortran array + call c_f_pointer(xval_ptr, xval, xval_size) + + call xmpi_sum_sp6d(xval, comm, ier) + +end subroutine xmpi_sum_sp6d_c + +!---------------------------------------------------------------------- + +!!****f* ABINIT/xmpi_sum_sp7d +!! NAME +!! xmpi_sum_sp7d +!! +!! FUNCTION +!! Combines values from all processes and distribute +!! the result back to all processes. +!! Target: double precision six-dimensional arrays. +!! +!! INPUTS +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE +subroutine xmpi_sum_sp7d(xval,comm,ier) + +!Arguments------------------------- + real(sp), DEV_CONTARRD intent(inout) :: xval(:,:,:,:,:,:,:) + integer ,intent(in) :: comm + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2,n3,n4,n5,n6,n7,nn,nproc_space_comm + integer(kind=int64) :: ntot + real(sp),allocatable :: xsum(:,:,:,:,:,:,:) +#endif + +! ************************************************************************* + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_COMM_SIZE(comm,nproc_space_comm,ier) + if (nproc_space_comm /= 1) then + n1 = size(xval,dim=1) + n2 = size(xval,dim=2) + n3 = size(xval,dim=3) + n4 = size(xval,dim=4) + n5 = size(xval,dim=5) + n6 = size(xval,dim=6) + n7 = size(xval,dim=7) + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2*n3*n4*n5*n6*n7,kind=int64) + if (ntot<=xmpi_maxint32_64) then + nn=n1*n2*n3*n4*n5*n6*n7 ; my_dt=MPI_REAL ; my_op=MPI_SUM + else + nn=1 ; call xmpi_largetype_create(ntot,MPI_REAL,my_dt,my_op,MPI_SUM) + end if + +! Accumulate xval on all proc. in comm +#if defined HAVE_MPI2_INPLACE + if (xmpi_use_inplace_operations .and. my_op == MPI_SUM) then + if (my_op/=MPI_SUM) call xmpi_abort(msg="Too many data for in-place reductions!") + call MPI_ALLREDUCE(MPI_IN_PLACE,xval,nn,my_dt,my_op,comm,ier) + else +#endif + ABI_STAT_MALLOC(xsum,(n1,n2,n3,n4,n5,n6,n7), ier) + if (ier/= 0) call xmpi_abort(msg='error allocating xsum in xmpi_sum_sp7d') + call MPI_ALLREDUCE(xval,xsum,nn,my_dt,my_op,comm,ier) + xval (:,:,:,:,:,:,:) = xsum(:,:,:,:,:,:,:) + ABI_FREE(xsum) +#if defined HAVE_MPI2_INPLACE + endif +#endif + + if (ntot>xmpi_maxint32_64) call xmpi_largetype_free(my_dt,my_op) + end if + end if +#endif + +end subroutine xmpi_sum_sp7d +!!*** + +!> wrapper arround xmpi_sum_sp7d than can be called in C/CUDA +subroutine xmpi_sum_sp7d_c(xval_ptr,xval_size,comm,ier) bind(c, name="xmpi_sum_sp7d_c") + + use, intrinsic :: iso_c_binding, only: c_associated,c_loc,c_ptr,c_f_pointer,c_int32_t + implicit none + + ! dummy args + type(c_ptr), intent(inout) :: xval_ptr + integer(kind=c_int32_t), intent(in) :: xval_size(7) + integer(kind=c_int32_t), intent(in) :: comm + integer(kind=c_int32_t), intent(out) :: ier + + ! local vars + real(sp), pointer :: xval(:,:,:,:,:,:,:) => null() + + ! convert the c pointer into a fortran array + call c_f_pointer(xval_ptr, xval, xval_size) + + call xmpi_sum_sp7d(xval, comm, ier) + +end subroutine xmpi_sum_sp7d_c + + +!---------------------------------------------------------------------- + +!!****f* ABINIT/xmpi_sum_dp2d +!! NAME +!! xmpi_sum_dp2d +!! +!! FUNCTION +!! Combines values from all processes and distribute +!! the result back to all processes. +!! Target: double precision two-dimensional arrays. +!! +!! INPUTS +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_sum_dp2d(xval,comm,ier) + +!Arguments------------------------- + real(dp), DEV_CONTARRD intent(inout) :: xval(:,:) + integer ,intent(in) :: comm + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2,nn,nproc_space_comm + integer(kind=int64) :: ntot + real(dp),allocatable :: xsum(:,:) +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_COMM_SIZE(comm,nproc_space_comm,ier) + if (nproc_space_comm /= 1) then + n1 = size(xval,dim=1) + n2 = size(xval,dim=2) + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2,kind=int64) + if (ntot<=xmpi_maxint32_64) then + nn=n1*n2 ; my_dt=MPI_DOUBLE_PRECISION ; my_op=MPI_SUM + else + nn=1 ; call xmpi_largetype_create(ntot,MPI_DOUBLE_PRECISION,my_dt,my_op,MPI_SUM) + end if + +! Accumulate xval on all proc. in comm +#if defined HAVE_MPI2_INPLACE + if (xmpi_use_inplace_operations .and. my_op == MPI_SUM) then + if (my_op/=MPI_SUM) call xmpi_abort(msg="Too many data for in-place reductions!") + call MPI_ALLREDUCE(MPI_IN_PLACE,xval,nn,my_dt,my_op,comm,ier) + else +#endif + ABI_STAT_MALLOC(xsum,(n1,n2), ier) + if (ier/= 0) call xmpi_abort(msg='error allocating xsum in xmpi_sum_dp2d') + call MPI_ALLREDUCE(xval,xsum,nn,my_dt,my_op,comm,ier) + xval (:,:) = xsum(:,:) + ABI_FREE(xsum) +#if defined HAVE_MPI2_INPLACE + endif +#endif + + if (ntot>xmpi_maxint32_64) call xmpi_largetype_free(my_dt,my_op) + end if + end if +#endif + +end subroutine xmpi_sum_dp2d +!!*** + +!> wrapper arround xmpi_sum_dp2d than can be called in C/CUDA +subroutine xmpi_sum_dp2d_c(xval_ptr,xval_size,comm,ier) bind(c, name="xmpi_sum_dp2d_c") + + use, intrinsic :: iso_c_binding, only: c_associated,c_loc,c_ptr,c_f_pointer,c_int32_t + implicit none + + ! dummy args + type(c_ptr), intent(inout) :: xval_ptr + integer(kind=c_int32_t), intent(in) :: xval_size(2) + integer(kind=c_int32_t), intent(in) :: comm + integer(kind=c_int32_t), intent(out) :: ier + + ! local vars + real(dp), pointer :: xval(:,:) => null() + + ! convert the c pointer into a fortran array + call c_f_pointer(xval_ptr, xval, xval_size) + + call xmpi_sum_dp2d(xval, comm, ier) + +end subroutine xmpi_sum_dp2d_c + +!---------------------------------------------------------------------- + +!!****f* ABINIT/xmpi_sum_dp3d +!! NAME +!! xmpi_sum_dp3d +!! +!! FUNCTION +!! Combines values from all processes and distribute +!! the result back to all processes. +!! Target: double precision three-dimensional arrays. +!! +!! INPUTS +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_sum_dp3d(xval,comm,ier) + +!Arguments------------------------- + real(dp), DEV_CONTARRD intent(inout) :: xval(:,:,:) + integer ,intent(in) :: comm + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2,n3,nn,nproc_space_comm + integer(kind=int64) :: ntot + real(dp),allocatable :: xsum(:,:,:) +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_COMM_SIZE(comm,nproc_space_comm,ier) + if (nproc_space_comm /= 1) then + n1 = size(xval,dim=1) + n2 = size(xval,dim=2) + n3 = size(xval,dim=3) + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2*n3,kind=int64) + if (ntot<=xmpi_maxint32_64) then + nn=n1*n2*n3 ; my_dt=MPI_DOUBLE_PRECISION ; my_op=MPI_SUM + else + nn=1 ; call xmpi_largetype_create(ntot,MPI_DOUBLE_PRECISION,my_dt,my_op,MPI_SUM) + end if + +! Accumulate xval on all proc. in comm +#if defined HAVE_MPI2_INPLACE + if (xmpi_use_inplace_operations .and. my_op == MPI_SUM) then + if (my_op/=MPI_SUM) call xmpi_abort(msg="Too many data for in-place reductions!") + call MPI_ALLREDUCE(MPI_IN_PLACE,xval,nn,my_dt,my_op,comm,ier) + else +#endif + ABI_STAT_MALLOC(xsum,(n1,n2,n3), ier) + if (ier/= 0) call xmpi_abort(msg='error allocating xsum in xmpi_sum_dp3d') + call MPI_ALLREDUCE(xval,xsum,nn,my_dt,my_op,comm,ier) + xval (:,:,:) = xsum(:,:,:) + ABI_FREE(xsum) +#if defined HAVE_MPI2_INPLACE + endif +#endif + + if (ntot>xmpi_maxint32_64) call xmpi_largetype_free(my_dt,my_op) + end if + end if +#endif + +end subroutine xmpi_sum_dp3d +!!*** + +!> wrapper arround xmpi_sum_dp3d than can be called in C/CUDA +subroutine xmpi_sum_dp3d_c(xval_ptr,xval_size,comm,ier) bind(c, name="xmpi_sum_dp3d_c") + + use, intrinsic :: iso_c_binding, only: c_associated,c_loc,c_ptr,c_f_pointer,c_int32_t + implicit none + + ! dummy args + type(c_ptr), intent(inout) :: xval_ptr + integer(kind=c_int32_t), intent(in) :: xval_size(3) + integer(kind=c_int32_t), intent(in) :: comm + integer(kind=c_int32_t), intent(out) :: ier + + ! local vars + real(dp), pointer :: xval(:,:,:) => null() + + ! convert the c pointer into a fortran array + call c_f_pointer(xval_ptr, xval, xval_size) + + call xmpi_sum_dp3d(xval, comm, ier) + +end subroutine xmpi_sum_dp3d_c + +!---------------------------------------------------------------------- + +!!****f* ABINIT/xmpi_sum_dp4d +!! NAME +!! xmpi_sum_dp4d +!! +!! FUNCTION +!! Combines values from all processes and distribute +!! the result back to all processes. +!! Target: double precision four-dimensional arrays. +!! +!! INPUTS +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_sum_dp4d(xval,comm,ier) + +!Arguments------------------------- + real(dp),DEV_CONTARRD intent(inout) :: xval(:,:,:,:) + integer ,intent(in) :: comm + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2,n3,n4,nn,nproc_space_comm + integer(kind=int64) :: ntot + real(dp),allocatable :: xsum(:,:,:,:) +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_COMM_SIZE(comm,nproc_space_comm,ier) + if (nproc_space_comm /= 1) then + n1 = size(xval,dim=1) + n2 = size(xval,dim=2) + n3 = size(xval,dim=3) + n4 = size(xval,dim=4) + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2*n3*n4,kind=int64) + if (ntot<=xmpi_maxint32_64) then + nn=n1*n2*n3*n4 ; my_dt=MPI_DOUBLE_PRECISION ; my_op=MPI_SUM + else + nn=1 ; call xmpi_largetype_create(ntot,MPI_DOUBLE_PRECISION,my_dt,my_op,MPI_SUM) + end if + +! Accumulate xval on all proc. in comm +#if defined HAVE_MPI2_INPLACE + if (xmpi_use_inplace_operations .and. my_op == MPI_SUM) then + if (my_op/=MPI_SUM) call xmpi_abort(msg="Too many data for in-place reductions!") + call MPI_ALLREDUCE(MPI_IN_PLACE,xval,nn,my_dt,my_op,comm,ier) + else +#endif + ABI_STAT_MALLOC(xsum,(n1,n2,n3,n4), ier) + if (ier/= 0) call xmpi_abort(msg='error allocating xsum in xmpi_sum_dp4d') + call MPI_ALLREDUCE(xval,xsum,nn,my_dt,my_op,comm,ier) + xval (:,:,:,:) = xsum(:,:,:,:) + ABI_FREE(xsum) +#if defined HAVE_MPI2_INPLACE + endif +#endif + + if (ntot>xmpi_maxint32_64) call xmpi_largetype_free(my_dt,my_op) + end if + end if +#endif + +end subroutine xmpi_sum_dp4d +!!*** + +!> wrapper arround xmpi_sum_dp4d than can be called in C/CUDA +subroutine xmpi_sum_dp4d_c(xval_ptr,xval_size,comm,ier) bind(c, name="xmpi_sum_dp4d_c") + + use, intrinsic :: iso_c_binding, only: c_associated,c_loc,c_ptr,c_f_pointer,c_int32_t + implicit none + + ! dummy args + type(c_ptr), intent(inout) :: xval_ptr + integer(kind=c_int32_t), intent(in) :: xval_size(4) + integer(kind=c_int32_t), intent(in) :: comm + integer(kind=c_int32_t), intent(out) :: ier + + ! local vars + real(dp), pointer :: xval(:,:,:,:) => null() + + ! convert the c pointer into a fortran array + call c_f_pointer(xval_ptr, xval, xval_size) + + call xmpi_sum_dp4d(xval, comm, ier) + +end subroutine xmpi_sum_dp4d_c + +!---------------------------------------------------------------------- + +!!****f* ABINIT/xmpi_sum_dp5d +!! NAME +!! xmpi_sum_dp5d +!! +!! FUNCTION +!! Combines values from all processes and distribute +!! the result back to all processes. +!! Target: double precision five-dimensional arrays. +!! +!! INPUTS +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_sum_dp5d(xval,comm,ier) + +!Arguments------------------------- + real(dp), DEV_CONTARRD intent(inout) :: xval(:,:,:,:,:) + integer ,intent(in) :: comm + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2,n3,n4,n5,nn,nproc_space_comm + integer(kind=int64) :: ntot + real(dp),allocatable :: xsum(:,:,:,:,:) +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_COMM_SIZE(comm,nproc_space_comm,ier) + if (nproc_space_comm /= 1) then + n1 = size(xval,dim=1) + n2 = size(xval,dim=2) + n3 = size(xval,dim=3) + n4 = size(xval,dim=4) + n5 = size(xval,dim=5) + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2*n3*n4*n5,kind=int64) + if (ntot<=xmpi_maxint32_64) then + nn=n1*n2*n3*n4*n5 ; my_dt=MPI_DOUBLE_PRECISION ; my_op=MPI_SUM + else + nn=1 ; call xmpi_largetype_create(ntot,MPI_DOUBLE_PRECISION,my_dt,my_op,MPI_SUM) + end if + +! Accumulate xval on all proc. in comm +#if defined HAVE_MPI2_INPLACE + if (xmpi_use_inplace_operations .and. my_op == MPI_SUM) then + if (my_op/=MPI_SUM) call xmpi_abort(msg="Too many data for in-place reductions!") + call MPI_ALLREDUCE(MPI_IN_PLACE,xval,nn,my_dt,my_op,comm,ier) + else +#endif + ABI_STAT_MALLOC(xsum,(n1,n2,n3,n4,n5), ier) + if (ier/= 0) call xmpi_abort(msg='error allocating xsum in xmpi_sum_dp5d') + call MPI_ALLREDUCE(xval,xsum,nn,my_dt,my_op,comm,ier) + xval (:,:,:,:,:) = xsum(:,:,:,:,:) + ABI_FREE(xsum) +#if defined HAVE_MPI2_INPLACE + endif +#endif + + if (ntot>xmpi_maxint32_64) call xmpi_largetype_free(my_dt,my_op) + end if + end if +#endif + +end subroutine xmpi_sum_dp5d +!!*** + +!> wrapper arround xmpi_sum_dp5d than can be called in C/CUDA +subroutine xmpi_sum_dp5d_c(xval_ptr,xval_size,comm,ier) bind(c, name="xmpi_sum_dp5d_c") + + use, intrinsic :: iso_c_binding, only: c_associated,c_loc,c_ptr,c_f_pointer,c_int32_t + implicit none + + ! dummy args + type(c_ptr), intent(inout) :: xval_ptr + integer(kind=c_int32_t), intent(in) :: xval_size(5) + integer(kind=c_int32_t), intent(in) :: comm + integer(kind=c_int32_t), intent(out) :: ier + + ! local vars + real(dp), pointer :: xval(:,:,:,:,:) => null() + + ! convert the c pointer into a fortran array + call c_f_pointer(xval_ptr, xval, xval_size) + + call xmpi_sum_dp5d(xval, comm, ier) + +end subroutine xmpi_sum_dp5d_c + +!---------------------------------------------------------------------- + +!!****f* ABINIT/xmpi_sum_dp6d +!! NAME +!! xmpi_sum_dp6d +!! +!! FUNCTION +!! Combines values from all processes and distribute +!! the result back to all processes. +!! Target: double precision six-dimensional arrays. +!! +!! INPUTS +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE +subroutine xmpi_sum_dp6d(xval,comm,ier) + +!Arguments------------------------- + real(dp), DEV_CONTARRD intent(inout) :: xval(:,:,:,:,:,:) + integer ,intent(in) :: comm + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2,n3,n4,n5,n6,nn,nproc_space_comm + integer(kind=int64) :: ntot + real(dp), allocatable :: xsum(:,:,:,:,:,:) +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_COMM_SIZE(comm,nproc_space_comm,ier) + if (nproc_space_comm /= 1) then + n1 = size(xval,dim=1) + n2 = size(xval,dim=2) + n3 = size(xval,dim=3) + n4 = size(xval,dim=4) + n5 = size(xval,dim=5) + n6 = size(xval,dim=6) + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2*n3*n4*n5*n6,kind=int64) + if (ntot<=xmpi_maxint32_64) then + nn=n1*n2*n3*n4*n5*n6 ; my_dt=MPI_DOUBLE_PRECISION ; my_op=MPI_SUM + else + nn=1 ; call xmpi_largetype_create(ntot,MPI_DOUBLE_PRECISION,my_dt,my_op,MPI_SUM) + end if + +! Accumulate xval on all proc. in comm +#if defined HAVE_MPI2_INPLACE + if (xmpi_use_inplace_operations .and. my_op == MPI_SUM) then + if (my_op/=MPI_SUM) call xmpi_abort(msg="Too many data for in-place reductions!") + call MPI_ALLREDUCE(MPI_IN_PLACE,xval,nn,my_dt,my_op,comm,ier) + else +#endif + ABI_STAT_MALLOC(xsum,(n1,n2,n3,n4,n5,n6), ier) + if (ier/=0) call xmpi_abort(msg='error allocating xsum in xmpi_sum_dp6d') + call MPI_ALLREDUCE(xval,xsum,nn,my_dt,my_op,comm,ier) + xval (:,:,:,:,:,:) = xsum(:,:,:,:,:,:) + ABI_FREE(xsum) +#if defined HAVE_MPI2_INPLACE + endif +#endif + + if (ntot>xmpi_maxint32_64) call xmpi_largetype_free(my_dt,my_op) + end if + end if +#endif + +end subroutine xmpi_sum_dp6d +!!*** + +!> wrapper arround xmpi_sum_dp6d than can be called in C/CUDA +subroutine xmpi_sum_dp6d_c(xval_ptr,xval_size,comm,ier) bind(c, name="xmpi_sum_dp6d_c") + + use, intrinsic :: iso_c_binding, only: c_associated,c_loc,c_ptr,c_f_pointer,c_int32_t + implicit none + + ! dummy args + type(c_ptr), intent(inout) :: xval_ptr + integer(kind=c_int32_t), intent(in) :: xval_size(6) + integer(kind=c_int32_t), intent(in) :: comm + integer(kind=c_int32_t), intent(out) :: ier + + ! local vars + real(dp), pointer :: xval(:,:,:,:,:,:) => null() + + ! convert the c pointer into a fortran array + call c_f_pointer(xval_ptr, xval, xval_size) + + call xmpi_sum_dp6d(xval, comm, ier) + +end subroutine xmpi_sum_dp6d_c + +!---------------------------------------------------------------------- + +!!****f* ABINIT/xmpi_sum_dp7d +!! NAME +!! xmpi_sum_dp7d +!! +!! FUNCTION +!! Combines values from all processes and distribute +!! the result back to all processes. +!! Target: double precision six-dimensional arrays. +!! +!! INPUTS +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_sum_dp7d(xval,comm,ier) + +!Arguments------------------------- + real(dp), DEV_CONTARRD intent(inout) :: xval(:,:,:,:,:,:,:) + integer ,intent(in) :: comm + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2,n3,n4,n5,n6,n7,nn,nproc_space_comm + integer(kind=int64) :: ntot + real(dp),allocatable :: xsum(:,:,:,:,:,:,:) +#endif + +! ************************************************************************* + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_COMM_SIZE(comm,nproc_space_comm,ier) + if (nproc_space_comm /= 1) then + n1 = size(xval,dim=1) + n2 = size(xval,dim=2) + n3 = size(xval,dim=3) + n4 = size(xval,dim=4) + n5 = size(xval,dim=5) + n6 = size(xval,dim=6) + n7 = size(xval,dim=7) + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2*n3*n4*n5*n6*n7,kind=int64) + if (ntot<=xmpi_maxint32_64) then + nn=n1*n2*n3*n4*n5*n6*n7 ; my_dt=MPI_DOUBLE_PRECISION ; my_op=MPI_SUM + else + nn=1 ; call xmpi_largetype_create(ntot,MPI_DOUBLE_PRECISION,my_dt,my_op,MPI_SUM) + end if + +! Accumulate xval on all proc. in comm +#if defined HAVE_MPI2_INPLACE + if (xmpi_use_inplace_operations .and. my_op == MPI_SUM) then + if (my_op/=MPI_SUM) call xmpi_abort(msg="Too many data for in-place reductions!") + call MPI_ALLREDUCE(MPI_IN_PLACE,xval,nn,my_dt,my_op,comm,ier) + else +#endif + ABI_STAT_MALLOC(xsum,(n1,n2,n3,n4,n5,n6,n7), ier) + if (ier/= 0) call xmpi_abort(msg='error allocating xsum in xmpi_sum_dp7d') + call MPI_ALLREDUCE(xval,xsum,nn,my_dt,my_op,comm,ier) + xval (:,:,:,:,:,:,:) = xsum(:,:,:,:,:,:,:) + ABI_FREE(xsum) +#if defined HAVE_MPI2_INPLACE + endif +#endif + + if (ntot>xmpi_maxint32_64) call xmpi_largetype_free(my_dt,my_op) + end if + end if +#endif + +end subroutine xmpi_sum_dp7d +!!*** + +!> wrapper arround xmpi_sum_dp7d than can be called in C/CUDA +subroutine xmpi_sum_dp7d_c(xval_ptr,xval_size,comm,ier) bind(c, name="xmpi_sum_dp7d_c") + + use, intrinsic :: iso_c_binding, only: c_associated,c_loc,c_ptr,c_f_pointer,c_int32_t + implicit none + + ! dummy args + type(c_ptr), intent(inout) :: xval_ptr + integer(kind=c_int32_t), intent(in) :: xval_size(7) + integer(kind=c_int32_t), intent(in) :: comm + integer(kind=c_int32_t), intent(out) :: ier + + ! local vars + real(dp), pointer :: xval(:,:,:,:,:,:,:) => null() + + ! convert the c pointer into a fortran array + call c_f_pointer(xval_ptr, xval, xval_size) + + call xmpi_sum_dp7d(xval, comm, ier) + +end subroutine xmpi_sum_dp7d_c + +!---------------------------------------------------------------------- + +!!****f* ABINIT/xmpi_sum_dp2t +!! NAME +!! xmpi_sum_dp2t +!! +!! FUNCTION +!! Combines values from all processes and distribute +!! the result back to all processes. +!! Target: double precision one-dimensional array without transfers. +!! +!! INPUTS +!! n1= first dimension of the array +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! xsum= receive buffer +!! +!! SOURCE + +subroutine xmpi_sum_dp2t(xval,xsum,n1,comm,ier) + +!Arguments------------------------- + real(dp), DEV_CONTARRD intent(inout) :: xval(:),xsum(:) + integer ,intent(in) :: n1 + integer ,intent(in) :: comm + integer ,intent(out) :: ier + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then +! Accumulate xval on all proc. in comm + call MPI_ALLREDUCE(xval,xsum,n1,MPI_DOUBLE_PRECISION,MPI_SUM,comm,ier) + else +#endif + xsum=xval +#if defined HAVE_MPI + end if +#endif + +end subroutine xmpi_sum_dp2t +!!*** + +!---------------------------------------------------------------------- + +!!****f* ABINIT/xmpi_sum_dp2d2t +!! NAME +!! xmpi_sum_dp2d2t +!! +!! FUNCTION +!! Combines values from all processes and distribute +!! the result back to all processes. +!! Target: double precisions bi-dimensional array +!! +!! INPUTS +!! n = total send size +!! xval= buffer array +!! comm= MPI communicator +!! +!! OUTPUT +!! xsum= receive buffer +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SOURCE + +subroutine xmpi_sum_dp2d2t(xval,xsum,n,comm,ier) + +!Arguments------------------------- + real(dp), DEV_CONTARRD intent(in) :: xval(:,:) + real(dp), DEV_CONTARRD intent(out) :: xsum(:,:) + integer ,intent(in) :: n + integer ,intent(in) :: comm + integer ,intent(out) :: ier + +!Local variables------------------- + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then +! Accumulate xval on all proc. in comm + call MPI_ALLREDUCE(xval,xsum,n,MPI_DOUBLE_PRECISION,MPI_SUM,comm,ier) + else +#endif + xsum=xval +#if defined HAVE_MPI + end if +#endif + +end subroutine xmpi_sum_dp2d2t +!!*** + +!---------------------------------------------------------------------- + +!!****f* ABINIT/xmpi_sum_dp3d2t +!! NAME +!! xmpi_sum_dp3d2t +!! +!! FUNCTION +!! Combines values from all processes and distribute +!! the result back to all processes. +!! Target: double precision three-dimensional array without transfers. +!! +!! INPUTS +!! n1= first dimension of the array +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! xsum= receive buffer +!! +!! SOURCE + +subroutine xmpi_sum_dp3d2t(xval,xsum,n1,comm,ier) + +!Arguments------------------------- + real(dp), DEV_CONTARRD intent(inout) :: xval(:,:,:),xsum(:,:,:) + integer ,intent(in) :: n1 + integer ,intent(in) :: comm + integer ,intent(out) :: ier + +! ************************************************************************* + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then +! Accumulate xval on all proc. in comm + call MPI_ALLREDUCE(xval,xsum,n1,MPI_DOUBLE_PRECISION,MPI_SUM,comm,ier) + else +#endif + xsum=xval +#if defined HAVE_MPI + end if +#endif + +end subroutine xmpi_sum_dp3d2t +!!*** + +!---------------------------------------------------------------------- + +!!****f* ABINIT/xmpi_sum_dp4d2t +!! NAME +!! xmpi_sum_dp4d2t +!! +!! FUNCTION +!! Combines values from all processes and distribute +!! the result back to all processes. +!! Target: double precision four-dimensional array without transfers. +!! +!! INPUTS +!! n1= first dimension of the array +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! xsum= receive buffer +!! +!! SOURCE + +subroutine xmpi_sum_dp4d2t(xval,xsum,n1,comm,ier) + +!Arguments------------------------- + real(dp), DEV_CONTARRD intent(inout) :: xval(:,:,:,:),xsum(:,:,:,:) + integer ,intent(in) :: n1 + integer ,intent(in) :: comm + integer ,intent(out) :: ier + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then +! Accumulate xval on all proc. in comm + call MPI_ALLREDUCE(xval,xsum,n1,MPI_DOUBLE_PRECISION,MPI_SUM,comm,ier) + else +#endif + xsum=xval +#if defined HAVE_MPI + end if +#endif + +end subroutine xmpi_sum_dp4d2t +!!*** + +!---------------------------------------------------------------------- + +!!****f* ABINIT/xmpi_sum_c0dc +!! NAME +!! xmpi_sum_c0dc +!! +!! FUNCTION +!! Combines values from all processes and distribute the result back to all processes. +!! Target: double complex scalar +!! +!! INPUTS +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= scalar to be summed. +!! +!! SOURCE + +subroutine xmpi_sum_c0dc(xval,comm,ier) + +!Arguments------------------------- + complex(dpc),intent(inout) :: xval + integer,intent(in) :: comm + integer,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: nproc_space_comm + complex(dpc) :: arr_xsum(1) +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_COMM_SIZE(comm,nproc_space_comm,ier) + if (nproc_space_comm /= 1) then +! Accumulate xval on all proc. in comm + call MPI_ALLREDUCE([xval],arr_xsum,1,MPI_DOUBLE_COMPLEX,MPI_SUM,comm,ier) + xval = arr_xsum(1) + end if + end if +#endif + +end subroutine xmpi_sum_c0dc +!!*** + +!---------------------------------------------------------------------- + +!!****f* ABINIT/xmpi_sum_c0sc +!! NAME +!! xmpi_sum_c0sc +!! +!! FUNCTION +!! Combines values from all processes and distribute the result back to all processes. +!! Target: single-precision complex scalar +!! +!! INPUTS +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= scalar to be summed. +!! +!! SOURCE + +subroutine xmpi_sum_c0sc(xval,comm,ier) + +!Arguments------------------------- + complex(sp),intent(inout) :: xval + integer,intent(in) :: comm + integer,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: nproc_space_comm + complex(sp) :: arr_xsum(1) +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_COMM_SIZE(comm,nproc_space_comm,ier) + if (nproc_space_comm /= 1) then + ! Accumulate xval on all proc. in comm + call MPI_ALLREDUCE([xval],arr_xsum,1,MPI_COMPLEX,MPI_SUM,comm,ier) + xval = arr_xsum(1) + end if + end if +#endif + +end subroutine xmpi_sum_c0sc +!!*** + +!---------------------------------------------------------------------- + +!!****f* ABINIT/xmpi_sum_c1dc +!! NAME +!! xmpi_sum_c1dc +!! +!! FUNCTION +!! Combines values from all processes and distribute +!! the result back to all processes. +!! Target: one-dimensional double complex arrays. +!! +!! INPUTS +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_sum_c1dc(xval,comm,ier) + +!Arguments------------------------- + complex(dpc), DEV_CONTARRD intent(inout) :: xval(:) + integer,intent(in) :: comm + integer,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: n1,nproc_space_comm + complex(dpc) , allocatable :: xsum(:) +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_COMM_SIZE(comm,nproc_space_comm,ier) + if (nproc_space_comm /= 1) then + n1 =size(xval,dim=1) + +! Accumulate xval on all proc. in comm +#if defined HAVE_MPI2_INPLACE + if (xmpi_use_inplace_operations) then + call MPI_ALLREDUCE(MPI_IN_PLACE,xval,n1,MPI_DOUBLE_COMPLEX,MPI_SUM,comm,ier) + else +#endif + ABI_STAT_MALLOC(xsum,(n1), ier) + if (ier/= 0) call xmpi_abort(msg='error allocating xsum in xmpi_sum_c1dc') + call MPI_ALLREDUCE(xval,xsum,n1,MPI_DOUBLE_COMPLEX,MPI_SUM,comm,ier) + xval (:) = xsum(:) + ABI_FREE(xsum) +#if defined HAVE_MPI2_INPLACE + endif +#endif + + end if + end if +#endif + +end subroutine xmpi_sum_c1dc +!!*** + +!---------------------------------------------------------------------- + +!!****f* ABINIT/xmpi_sum_c2dc +!! NAME +!! xmpi_sum_c2dc +!! +!! FUNCTION +!! Combines values from all processes and distribute +!! the result back to all processes. +!! Target: two-dimensional double complex arrays. +!! +!! INPUTS +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_sum_c2dc(xval,comm,ier) + +!Arguments------------------------- + complex(dpc), DEV_CONTARRD intent(inout) :: xval(:,:) + integer,intent(in) :: comm + integer,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2,nn,nproc_space_comm + integer(kind=int64) :: ntot + complex(dpc),allocatable :: xsum(:,:) +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_COMM_SIZE(comm,nproc_space_comm,ier) + if (nproc_space_comm /= 1) then + n1 =size(xval,dim=1) + n2 =size(xval,dim=2) + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2,kind=int64) + if (ntot<=xmpi_maxint32_64) then + nn=n1*n2 ; my_dt=MPI_DOUBLE_COMPLEX ; my_op=MPI_SUM + else + nn=1 ; call xmpi_largetype_create(ntot,MPI_DOUBLE_COMPLEX,my_dt,my_op,MPI_SUM) + end if + +! Accumulate xval on all proc. in comm +#if defined HAVE_MPI2_INPLACE + if (xmpi_use_inplace_operations .and. my_op == MPI_SUM) then + if (my_op/=MPI_SUM) call xmpi_abort(msg="Too many data for in-place reductions!") + call MPI_ALLREDUCE(MPI_IN_PLACE,xval,nn,my_dt,my_op,comm,ier) + else +#endif + ABI_STAT_MALLOC(xsum,(n1,n2), ier) + if (ier/= 0) call xmpi_abort(msg='error allocating xsum in xmpi_sum_c2dc') + call MPI_ALLREDUCE(xval,xsum,nn,my_dt,my_op,comm,ier) + xval (:,:) = xsum(:,:) + ABI_FREE(xsum) +#if defined HAVE_MPI2_INPLACE + end if +#endif + + if (ntot>xmpi_maxint32_64) call xmpi_largetype_free(my_dt,my_op) + end if + end if +#endif + +end subroutine xmpi_sum_c2dc +!!*** + +!---------------------------------------------------------------------- + +!!****f* ABINIT/xmpi_sum_c3dc +!! NAME +!! xmpi_sum_c3dc +!! +!! FUNCTION +!! Combines values from all processes and distribute +!! the result back to all processes. +!! Target: three-dimensional double complex arrays. +!! +!! INPUTS +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_sum_c3dc(xval,comm,ier) + +!Arguments------------------------- + complex(dpc), DEV_CONTARRD intent(inout) :: xval(:,:,:) + integer,intent(in) :: comm + integer,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2,n3,nn,nproc_space_comm + integer(kind=int64) :: ntot + complex(dpc),allocatable :: xsum(:,:,:) +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_COMM_SIZE(comm,nproc_space_comm,ier) + if (nproc_space_comm /= 1) then + n1 =size(xval,dim=1) + n2 =size(xval,dim=2) + n3 =size(xval,dim=3) + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2*n3,kind=int64) + if (ntot<=xmpi_maxint32_64) then + nn=n1*n2*n3 ; my_dt=MPI_DOUBLE_COMPLEX ; my_op=MPI_SUM + else + nn=1 ; call xmpi_largetype_create(ntot,MPI_DOUBLE_COMPLEX,my_dt,my_op,MPI_SUM) + end if + +! Accumulate xval on all proc. in comm +#if defined HAVE_MPI2_INPLACE + if (xmpi_use_inplace_operations .and. my_op == MPI_SUM) then + if (my_op/=MPI_SUM) call xmpi_abort(msg="Too many data for in-place reductions!") + call MPI_ALLREDUCE(MPI_IN_PLACE,xval,nn,my_dt,my_op,comm,ier) + else +#endif + ABI_STAT_MALLOC(xsum,(n1,n2,n3), ier) + if (ier/= 0) call xmpi_abort(msg='error allocating xsum in xmpi_sum_c3dc') + call MPI_ALLREDUCE(xval,xsum,nn,my_dt,my_op,comm,ier) + xval (:,:,:) = xsum(:,:,:) + ABI_FREE(xsum) +#if defined HAVE_MPI2_INPLACE + end if +#endif + + if (ntot>xmpi_maxint32_64) call xmpi_largetype_free(my_dt,my_op) + end if + end if +#endif + +end subroutine xmpi_sum_c3dc +!!*** + +!---------------------------------------------------------------------- + +!!****f* ABINIT/xmpi_sum_c4dc +!! NAME +!! xmpi_sum_c4dc +!! +!! FUNCTION +!! Combines values from all processes and distribute +!! the result back to all processes. +!! Target: four-dimensional double complex arrays. +!! +!! INPUTS +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_sum_c4dc(xval,comm,ier) + +!Arguments------------------------- + complex(dpc), DEV_CONTARRD intent(inout) :: xval(:,:,:,:) + integer,intent(in) :: comm + integer,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2,n3,n4,nn,nproc_space_comm + integer(kind=int64) :: ntot + complex(dpc),allocatable :: xsum(:,:,:,:) +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_COMM_SIZE(comm,nproc_space_comm,ier) + if (nproc_space_comm /= 1) then + n1 =size(xval,dim=1) + n2 =size(xval,dim=2) + n3 =size(xval,dim=3) + n4 =size(xval,dim=4) + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2*n3*n4,kind=int64) + if (ntot<=xmpi_maxint32_64) then + nn=n1*n2*n3*n4 ; my_dt=MPI_DOUBLE_COMPLEX ; my_op=MPI_SUM + else + nn=1 ; call xmpi_largetype_create(ntot,MPI_DOUBLE_COMPLEX,my_dt,my_op,MPI_SUM) + end if + +! Accumulate xval on all proc. in comm +#if defined HAVE_MPI2_INPLACE + if (xmpi_use_inplace_operations .and. my_op == MPI_SUM) then + if (my_op/=MPI_SUM) call xmpi_abort(msg="Too many data for in-place reductions!") + call MPI_ALLREDUCE(MPI_IN_PLACE,xval,nn,my_dt,my_op,comm,ier) + else +#endif + ABI_STAT_MALLOC(xsum,(n1,n2,n3,n4), ier) + if (ier/= 0) call xmpi_abort(msg='error allocating xsum in xmpi_sum_c4dc') + call MPI_ALLREDUCE(xval,xsum,nn,my_dt,my_op,comm,ier) + xval (:,:,:,:) = xsum(:,:,:,:) + ABI_FREE(xsum) +#if defined HAVE_MPI2_INPLACE + endif +#endif + + if (ntot>xmpi_maxint32_64) call xmpi_largetype_free(my_dt,my_op) + end if + end if +#endif + +end subroutine xmpi_sum_c4dc +!!*** + +!---------------------------------------------------------------------- + +!!****f* ABINIT/xmpi_sum_c5dc +!! NAME +!! xmpi_sum_c5dc +!! +!! FUNCTION +!! Combines values from all processes and distribute the result back to all processes. +!! Target: five-dimensional double precision complex arrays. +!! +!! INPUTS +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_sum_c5dc(xval,comm,ier) + +!Arguments------------------------- + complex(dpc), DEV_CONTARRD intent(inout) :: xval(:,:,:,:,:) + integer,intent(in) :: comm + integer,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2,n3,n4,n5,nn,nproc_space_comm + integer(kind=int64) :: ntot + complex(dpc),allocatable :: xsum(:,:,:,:,:) +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_COMM_SIZE(comm,nproc_space_comm,ier) + if (nproc_space_comm /= 1) then + n1 =size(xval,dim=1) + n2 =size(xval,dim=2) + n3 =size(xval,dim=3) + n4 =size(xval,dim=4) + n5 =size(xval,dim=5) + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2*n3*n4*n5,kind=int64) + if (ntot<=xmpi_maxint32_64) then + nn=n1*n2*n3*n4*n5 ; my_dt=MPI_DOUBLE_COMPLEX ; my_op=MPI_SUM + else + nn=1 ; call xmpi_largetype_create(ntot,MPI_DOUBLE_COMPLEX,my_dt,my_op,MPI_SUM) + end if + +! Accumulate xval on all proc. in comm +#if defined HAVE_MPI2_INPLACE + if (xmpi_use_inplace_operations .and. my_op == MPI_SUM) then + if (my_op/=MPI_SUM) call xmpi_abort(msg="Too many data for in-place reductions!") + call MPI_ALLREDUCE(MPI_IN_PLACE,xval,nn,my_dt,my_op,comm,ier) + else +#endif + ABI_STAT_MALLOC(xsum,(n1,n2,n3,n4,n5), ier) + if (ier/=0) call xmpi_abort(comm,msg='error allocating xsum in xmpi_sum_c5dc') + call MPI_ALLREDUCE(xval,xsum,nn,my_dt,my_op,comm,ier) + xval (:,:,:,:,:) = xsum(:,:,:,:,:) + ABI_FREE(xsum) +#if defined HAVE_MPI2_INPLACE + endif +#endif + + if (ntot>xmpi_maxint32_64) call xmpi_largetype_free(my_dt,my_op) + end if + end if +#endif + +end subroutine xmpi_sum_c5dc +!!*** + +!---------------------------------------------------------------------- + +!!****f* ABINIT/xmpi_sum_c6dc +!! NAME +!! xmpi_sum_c6dc +!! +!! FUNCTION +!! Combines values from all processes and distribute the result back to all processes. +!! Target: six-dimensional double precision complex arrays. +!! +!! INPUTS +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_sum_c6dc(xval,comm,ier) + +!Arguments------------------------- + complex(dpc), DEV_CONTARRD intent(inout) :: xval(:,:,:,:,:,:) + integer,intent(in) :: comm + integer,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2,n3,n4,n5,n6,nn,nproc_space_comm + integer(kind=int64) :: ntot + complex(dpc),allocatable :: xsum(:,:,:,:,:,:) +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_COMM_SIZE(comm,nproc_space_comm,ier) + if (nproc_space_comm /= 1) then + n1 =size(xval,dim=1) + n2 =size(xval,dim=2) + n3 =size(xval,dim=3) + n4 =size(xval,dim=4) + n5 =size(xval,dim=5) + n6 =size(xval,dim=6) + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2*n3*n4*n5*n6,kind=int64) + if (ntot<=xmpi_maxint32_64) then + nn=n1*n2*n3*n4*n5*n6 ; my_dt=MPI_DOUBLE_COMPLEX ; my_op=MPI_SUM + else + nn=1 ; call xmpi_largetype_create(ntot,MPI_DOUBLE_COMPLEX,my_dt,my_op,MPI_SUM) + end if + +! Accumulate xval on all proc. in comm +#if defined HAVE_MPI2_INPLACE + if (xmpi_use_inplace_operations .and. my_op == MPI_SUM) then + if (my_op/=MPI_SUM) call xmpi_abort(msg="Too many data for in-place reductions!") + call MPI_ALLREDUCE(MPI_IN_PLACE,xval,nn,my_dt,my_op,comm,ier) + else +#endif + ABI_STAT_MALLOC(xsum,(n1,n2,n3,n4,n5,n6), ier) + if (ier/=0) call xmpi_abort(msg='error allocating xsum in xmpi_sum_c6dc') + call MPI_ALLREDUCE(xval,xsum,nn,my_dt,my_op,comm,ier) + xval = xsum + ABI_FREE(xsum) +#if defined HAVE_MPI2_INPLACE + endif +#endif + + if (ntot>xmpi_maxint32_64) call xmpi_largetype_free(my_dt,my_op) + end if + end if +#endif + +end subroutine xmpi_sum_c6dc +!!*** + +!---------------------------------------------------------------------- + +!!****f* ABINIT/xmpi_sum_c7dc +!! NAME +!! xmpi_sum_c7dc +!! +!! FUNCTION +!! Combines values from all processes and distribute the result back to all processes. +!! Target: six-dimensional double precision complex arrays. +!! +!! INPUTS +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_sum_c7dc(xval,comm,ier) + +!Arguments------------------------- + complex(dpc), DEV_CONTARRD intent(inout) :: xval(:,:,:,:,:,:,:) + integer,intent(in) :: comm + integer,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2,n3,n4,n5,n6,n7,nn,nproc_space_comm + integer(kind=int64) :: ntot + complex(dpc),allocatable :: xsum(:,:,:,:,:,:,:) +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_COMM_SIZE(comm,nproc_space_comm,ier) + if (nproc_space_comm /= 1) then + n1 =size(xval,dim=1) + n2 =size(xval,dim=2) + n3 =size(xval,dim=3) + n4 =size(xval,dim=4) + n5 =size(xval,dim=5) + n6 =size(xval,dim=6) + n7 =size(xval,dim=7) + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2*n3*n4*n5*n6*n7,kind=int64) + if (ntot<=xmpi_maxint32_64) then + nn=n1*n2*n3*n4*n5*n6*n7 ; my_dt=MPI_DOUBLE_COMPLEX ; my_op=MPI_SUM + else + nn=1 ; call xmpi_largetype_create(ntot,MPI_DOUBLE_COMPLEX,my_dt,my_op,MPI_SUM) + end if + +! Accumulate xval on all proc. in comm +#if defined HAVE_MPI2_INPLACE + if (xmpi_use_inplace_operations .and. my_op == MPI_SUM) then + if (my_op/=MPI_SUM) call xmpi_abort(msg="Too many data for in-place reductions!") + call MPI_ALLREDUCE(MPI_IN_PLACE,xval,nn,my_dt,my_op,comm,ier) + else +#endif + ABI_STAT_MALLOC(xsum,(n1,n2,n3,n4,n5,n6,n7),ier) + if (ier/=0) then + call xmpi_abort(comm=comm,msg='error allocating xsum in xmpi_sum_c7dc') + end if + call MPI_ALLREDUCE(xval,xsum,nn,my_dt,my_op,comm,ier) + xval = xsum + ABI_FREE(xsum) +#if defined HAVE_MPI2_INPLACE + endif +#endif + + if (ntot>xmpi_maxint32_64) call xmpi_largetype_free(my_dt,my_op) + end if + end if +#endif + +end subroutine xmpi_sum_c7dc +!!*** + +!---------------------------------------------------------------------- + +!!****f* ABINIT/xmpi_sum_c1cplx +!! NAME +!! xmpi_sum_c1cplx +!! +!! FUNCTION +!! Combines values from all processes and distribute +!! the result back to all processes. +!! Target: one-dimensional complex arrays. +!! +!! INPUTS +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_sum_c1cplx(xval,comm,ier) + +!Arguments---------------- + complex(spc), DEV_CONTARRD intent(inout) :: xval(:) + integer,intent(in) :: comm + integer,intent(out) :: ier + +!Local variables-------------- +#if defined HAVE_MPI + integer :: n1,nproc_space_comm + complex(spc),allocatable :: xsum(:) +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_COMM_SIZE(comm,nproc_space_comm,ier) + if (nproc_space_comm /= 1) then + n1 =size(xval,dim=1) + +! Accumulate xval on all proc. in comm +#if defined HAVE_MPI2_INPLACE + if (xmpi_use_inplace_operations) then + call MPI_ALLREDUCE(MPI_IN_PLACE,xval,n1,MPI_COMPLEX,MPI_SUM,comm,ier) + else +#endif + ABI_STAT_MALLOC(xsum,(n1), ier) + if (ier/= 0) call xmpi_abort(msg='error allocating xsum in xmpi_sum_c1cplx') + call MPI_ALLREDUCE(xval,xsum,n1,MPI_COMPLEX,MPI_SUM,comm,ier) + xval (:) = xsum(:) + ABI_FREE(xsum) +#if defined HAVE_MPI2_INPLACE + endif +#endif + + end if + end if +#endif + +end subroutine xmpi_sum_c1cplx +!!*** + +!---------------------------------------------------------------------- + +!!****f* ABINIT/xmpi_sum_c2cplx +!! NAME +!! xmpi_sum_c2cplx +!! +!! FUNCTION +!! Combines values from all processes and distribute +!! the result back to all processes. +!! Target: two-dimensional complex arrays. +!! +!! INPUTS +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_sum_c2cplx(xval,comm,ier) + +!Arguments---------------- + complex(spc), DEV_CONTARRD intent(inout) :: xval(:,:) + integer,intent(in) :: comm + integer,intent(out) :: ier + +!Local variables-------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2,nn,nproc_space_comm + integer(kind=int64) :: ntot + complex(spc), allocatable :: xsum(:,:) +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_COMM_SIZE(comm,nproc_space_comm,ier) + if (nproc_space_comm /= 1) then + n1 =size(xval,dim=1) + n2 =size(xval,dim=2) + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2,kind=int64) + if (ntot<=xmpi_maxint32_64) then + nn=n1*n2 ; my_dt=MPI_COMPLEX ; my_op=MPI_SUM + else + nn=1 ; call xmpi_largetype_create(ntot,MPI_COMPLEX,my_dt,my_op,MPI_SUM) + end if + +! Accumulate xval on all proc. in comm +#if defined HAVE_MPI2_INPLACE + if (xmpi_use_inplace_operations .and. my_op == MPI_SUM) then + if (my_op/=MPI_SUM) call xmpi_abort(msg="Too many data for in-place reductions!") + call MPI_ALLREDUCE(MPI_IN_PLACE,xval,nn,my_dt,my_op,comm,ier) + else +#endif + ABI_STAT_MALLOC(xsum,(n1,n2), ier) + if (ier/= 0) call xmpi_abort(msg='error allocating xsum in xmpi_sum_c2cplx') + call MPI_ALLREDUCE(xval,xsum,nn,my_dt,my_op,comm,ier) + xval (:,:) = xsum(:,:) + ABI_FREE(xsum) +#if defined HAVE_MPI2_INPLACE + endif +#endif + + if (ntot>xmpi_maxint32_64) call xmpi_largetype_free(my_dt,my_op) + end if + end if +#endif + +end subroutine xmpi_sum_c2cplx +!!*** + +!---------------------------------------------------------------------- + +!!****f* ABINIT/xmpi_sum_c3cplx +!! NAME +!! xmpi_sum_c3cplx +!! +!! FUNCTION +!! Combines values from all processes and distribute +!! the result back to all processes. +!! Target: three-dimensional complex arrays. +!! +!! INPUTS +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! PARENTS +!! +!! CHILDREN +!! mpi_allreduce,xmpi_abort +!! +!! SOURCE + +subroutine xmpi_sum_c3cplx(xval,comm,ier) + +!Arguments---------------- + complex(spc), DEV_CONTARRD intent(inout) :: xval(:,:,:) + integer,intent(in) :: comm + integer,intent(out) :: ier + +!Local variables-------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2,n3,nn,nproc_space_comm + integer(kind=int64) :: ntot + complex(spc), allocatable :: xsum(:,:,:) +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_COMM_SIZE(comm,nproc_space_comm,ier) + if (nproc_space_comm /= 1) then + n1 =size(xval,dim=1) + n2 =size(xval,dim=2) + n3 =size(xval,dim=3) + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2*n3,kind=int64) + if (ntot<=xmpi_maxint32_64) then + nn=n1*n2*n3 ; my_dt=MPI_COMPLEX ; my_op=MPI_SUM + else + nn=1 ; call xmpi_largetype_create(ntot,MPI_COMPLEX,my_dt,my_op,MPI_SUM) + end if + +! Accumulate xval on all proc. in comm +#if defined HAVE_MPI2_INPLACE + if (xmpi_use_inplace_operations .and. my_op == MPI_SUM) then + if (my_op/=MPI_SUM) call xmpi_abort(msg="Too many data for in-place reductions!") + call MPI_ALLREDUCE(MPI_IN_PLACE,xval,nn,my_dt,my_op,comm,ier) + else +#endif + ABI_STAT_MALLOC(xsum,(n1,n2,n3), ier) + if (ier/= 0) call xmpi_abort(msg='error allocating xsum in xmpi_sum_c3cplx') + call MPI_ALLREDUCE(xval,xsum,nn,my_dt,my_op,comm,ier) + xval (:,:,:) = xsum(:,:,:) + ABI_FREE(xsum) +#if defined HAVE_MPI2_INPLACE + endif +#endif + + if (ntot>xmpi_maxint32_64) call xmpi_largetype_free(my_dt,my_op) + end if + end if +#endif + +end subroutine xmpi_sum_c3cplx +!!*** + +!---------------------------------------------------------------------- + +!!****f* ABINIT/xmpi_sum_c4cplx +!! NAME +!! xmpi_sum_c4cplx +!! +!! FUNCTION +!! Combines values from all processes and distribute +!! the result back to all processes. +!! Target: four-dimensional complex arrays. +!! +!! INPUTS +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! PARENTS +!! +!! CHILDREN +!! mpi_allreduce,xmpi_abort +!! +!! SOURCE + +subroutine xmpi_sum_c4cplx(xval,comm,ier) + +!Arguments---------------- + complex(spc), DEV_CONTARRD intent(inout) :: xval(:,:,:,:) + integer,intent(in) :: comm + integer,intent(out) :: ier + +!Local variables-------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2,n3,n4,nn,nproc_space_comm + integer(kind=int64) :: ntot + complex(spc),allocatable :: xsum(:,:,:,:) +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_COMM_SIZE(comm,nproc_space_comm,ier) + if (nproc_space_comm /= 1) then + n1 =size(xval,dim=1) + n2 =size(xval,dim=2) + n3 =size(xval,dim=3) + n4 =size(xval,dim=4) + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2*n3*n4,kind=int64) + if (ntot<=xmpi_maxint32_64) then + nn=n1*n2*n3*n4 ; my_dt=MPI_COMPLEX ; my_op=MPI_SUM + else + nn=1 ; call xmpi_largetype_create(ntot,MPI_COMPLEX,my_dt,my_op,MPI_SUM) + end if + +! Accumulate xval on all proc. in comm +#if defined HAVE_MPI2_INPLACE + if (xmpi_use_inplace_operations .and. my_op == MPI_SUM) then + if (my_op/=MPI_SUM) call xmpi_abort(msg="Too many data for in-place reductions!") + call MPI_ALLREDUCE(MPI_IN_PLACE,xval,nn,my_dt,my_op,comm,ier) + else +#endif + ABI_STAT_MALLOC(xsum,(n1,n2,n3,n4), ier) + if (ier/= 0) call xmpi_abort(msg='error allocating xsum in xmpi_sum_c4cplx') + call MPI_ALLREDUCE(xval,xsum,nn,my_dt,my_op,comm,ier) + xval (:,:,:,:) = xsum(:,:,:,:) + ABI_FREE(xsum) +#if defined HAVE_MPI2_INPLACE + endif +#endif + + if (ntot>xmpi_maxint32_64) call xmpi_largetype_free(my_dt,my_op) + end if + end if +#endif + +end subroutine xmpi_sum_c4cplx +!!*** + +!---------------------------------------------------------------------- + +!!****f* ABINIT/xmpi_sum_c5cplx +!! NAME +!! xmpi_sum_c5cplx +!! +!! FUNCTION +!! Combines values from all processes and distribute +!! the result back to all processes. +!! Target: five-dimensional complex arrays. +!! +!! INPUTS +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_sum_c5cplx(xval,comm,ier) + +!Arguments---------------- + complex(spc), DEV_CONTARRD intent(inout) :: xval(:,:,:,:,:) + integer,intent(in) :: comm + integer,intent(out) :: ier + +!Local variables-------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2,n3,n4,n5,nn,nproc_space_comm + integer(kind=int64) :: ntot + complex(spc),allocatable :: xsum(:,:,:,:,:) +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_COMM_SIZE(comm,nproc_space_comm,ier) + if (nproc_space_comm /= 1) then + n1 =size(xval,dim=1) + n2 =size(xval,dim=2) + n3 =size(xval,dim=3) + n4 =size(xval,dim=4) + n5 =size(xval,dim=5) + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2*n3*n4*n5,kind=int64) + if (ntot<=xmpi_maxint32_64) then + nn=n1*n2*n3*n4*n5 ; my_dt=MPI_COMPLEX ; my_op=MPI_SUM + else + nn=1 ; call xmpi_largetype_create(ntot,MPI_COMPLEX,my_dt,my_op,MPI_SUM) + end if + +! Accumulate xval on all proc. in comm +#if defined HAVE_MPI2_INPLACE + if (xmpi_use_inplace_operations .and. my_op == MPI_SUM) then + if (my_op/=MPI_SUM) call xmpi_abort(msg="Too many data for in-place reductions!") + call MPI_ALLREDUCE(MPI_IN_PLACE,xval,nn,my_dt,my_op,comm,ier) + else +#endif + ABI_STAT_MALLOC(xsum,(n1,n2,n3,n4,n5), ier) + if (ier/= 0) call xmpi_abort(msg='error allocating xsum in xmpi_sum_c5cplx') + call MPI_ALLREDUCE(xval,xsum,nn,my_dt,my_op,comm,ier) + xval (:,:,:,:,:) = xsum(:,:,:,:,:) + ABI_FREE(xsum) +#if defined HAVE_MPI2_INPLACE + endif +#endif + + if (ntot>xmpi_maxint32_64) call xmpi_largetype_free(my_dt,my_op) + end if + end if +#endif + +end subroutine xmpi_sum_c5cplx +!!*** + +!---------------------------------------------------------------------- + +!!****f* ABINIT/xmpi_sum_c6cplx +!! NAME +!! xmpi_sum_c6cplx +!! +!! FUNCTION +!! Combines values from all processes and distribute the result back to all processes. +!! Target: six-dimensional complex arrays. +!! +!! INPUTS +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_sum_c6cplx(xval,comm,ier) + +!Arguments---------------- + complex(spc), DEV_CONTARRD intent(inout) :: xval(:,:,:,:,:,:) + integer,intent(in) :: comm + integer,intent(out) :: ier + +!Local variables-------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2,n3,n4,n5,n6,nn,nproc_space_comm + integer(kind=int64) :: ntot + complex(spc),allocatable :: xsum(:,:,:,:,:,:) +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_COMM_SIZE(comm,nproc_space_comm,ier) + if (nproc_space_comm /= 1) then + n1 =size(xval,dim=1) + n2 =size(xval,dim=2) + n3 =size(xval,dim=3) + n4 =size(xval,dim=4) + n5 =size(xval,dim=5) + n6 =size(xval,dim=6) + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2*n3*n4*n5*n6,kind=int64) + if (ntot<=xmpi_maxint32_64) then + nn=n1*n2*n3*n4*n5*n6 ; my_dt=MPI_COMPLEX ; my_op=MPI_SUM + else + nn=1 ; call xmpi_largetype_create(ntot,MPI_COMPLEX,my_dt,my_op,MPI_SUM) + end if + +! Accumulate xval on all proc. in comm +#if defined HAVE_MPI2_INPLACE + if (xmpi_use_inplace_operations .and. my_op == MPI_SUM) then + if (my_op/=MPI_SUM) call xmpi_abort(msg="Too many data for in-place reductions!") + call MPI_ALLREDUCE(MPI_IN_PLACE,xval,nn,my_dt,my_op,comm,ier) + else +#endif + ABI_STAT_MALLOC(xsum,(n1,n2,n3,n4,n5,n6), ier) + if (ier/= 0) call xmpi_abort(msg='error allocating xsum in xmpi_sum_c6cplx') + call MPI_ALLREDUCE(xval,xsum,nn,my_dt,my_op,comm,ier) + xval = xsum + ABI_FREE(xsum) +#if defined HAVE_MPI2_INPLACE + endif +#endif + + if (ntot>xmpi_maxint32_64) call xmpi_largetype_free(my_dt,my_op) + end if + end if +#endif + +end subroutine xmpi_sum_c6cplx +!!*** + +!---------------------------------------------------------------------- + +!!****f* ABINIT/xmpi_sum_coeff5d1 +!! NAME +!! xmpi_sum_coeff5d1 +!! +!! FUNCTION +!! Combines values from all processes and distribute the result back to all processes. +!! Target: coeff5_type 1D-structure +!! +!! INPUTS +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval = coeff5d_type array structure (input and output) +!! +!! SOURCE + +subroutine xmpi_sum_coeff5d1(xval,comm,ier) + +!Arguments ------------------------------------ + type(coeff5_type),intent(inout) :: xval(:) + integer,intent(in) :: comm + integer,intent(out) :: ier + +!Local variables------------------------------- +#if defined HAVE_MPI + integer :: buf_size,i2,i3,i4,i5,ii,indx_buf,n1,n2,n3,n4,n5,nb,nproc_space_comm + integer, allocatable :: dims(:,:) + real(dp),allocatable :: buf(:),xsum(:) +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_SELF .and. comm /= MPI_COMM_NULL) then + call MPI_COMM_SIZE(comm,nproc_space_comm,ier) + if (nproc_space_comm /= 1) then + nb = size(xval,1) + +! Retrieve sizes of 'value' fields + ABI_MALLOC(dims,(5,nb)) + buf_size=0 + do ii=1,nb + if (.not.allocated(xval(ii)%value)) & +& call xmpi_abort(msg='bug in xmpi_sum(coeff5): xval should be allocated!') + dims(1,ii)=size(xval(ii)%value,dim=1) + dims(2,ii)=size(xval(ii)%value,dim=2) + dims(3,ii)=size(xval(ii)%value,dim=3) + dims(4,ii)=size(xval(ii)%value,dim=4) + dims(5,ii)=size(xval(ii)%value,dim=5) + buf_size=buf_size+dims(1,ii)*dims(2,ii)*dims(3,ii)*dims(4,ii)*dims(5,ii) + end do + +! Fill in buffer + ABI_STAT_MALLOC(buf,(buf_size) ,ier) + if (ier/= 0) call xmpi_abort(msg='error allocating buf in xmpi_sum(coeff5)!') + indx_buf=1 + do ii=1,nb + n1=dims(1,ii); n2=dims(2,ii) + n3=dims(3,ii); n4=dims(4,ii); n5=dims(5,ii) + do i5=1,n5 + do i4=1,n4 + do i3=1,n3 + do i2=1,n2 + buf(indx_buf:indx_buf+n1-1)=xval(ii)%value(1:n1,i2,i3,i4,i5) + indx_buf=indx_buf+n1 + end do + end do + end do + end do + end do + +! Accumulate xval%value on all proc. in comm +#if defined HAVE_MPI2_INPLACE + if (xmpi_use_inplace_operations) then + call MPI_ALLREDUCE(MPI_IN_PLACE,buf,buf_size,MPI_DOUBLE_PRECISION,MPI_SUM,comm,ier) + else +#endif + ABI_STAT_MALLOC(xsum,(buf_size), ier) + if (ier/= 0) call xmpi_abort(msg='error allocating xsum in xmpi_sum(coeff5)!') + call MPI_ALLREDUCE(buf,xsum,buf_size,MPI_DOUBLE_PRECISION,MPI_SUM,comm,ier) + buf = xsum + ABI_FREE(xsum) +#if defined HAVE_MPI2_INPLACE + endif +#endif + +! Transfer buffer into output datastructure + indx_buf=1 + do ii=1,nb + n1=dims(1,ii); n2=dims(2,ii) + n3=dims(3,ii); n4=dims(4,ii); n5=dims(5,ii) + do i5=1,n5 + do i4=1,n4 + do i3=1,n3 + do i2=1,n2 + xval(ii)%value(1:n1,i2,i3,i4,i5)=buf(indx_buf:indx_buf+n1-1) + indx_buf=indx_buf+n1 + end do + end do + end do + end do + end do + + ABI_FREE(dims) + ABI_FREE(buf) + + end if + end if +#endif + +end subroutine xmpi_sum_coeff5d1 +!!*** diff --git a/GX-PAW/common/src/12_hide_mpi/xmpi_sum_master.finc b/GX-PAW/common/src/12_hide_mpi/xmpi_sum_master.finc new file mode 100644 index 00000000..f487ac90 --- /dev/null +++ b/GX-PAW/common/src/12_hide_mpi/xmpi_sum_master.finc @@ -0,0 +1,1485 @@ +!{\src2tex{textfont=tt}} +!!****f* ABINIT/xmpi_sum_master +!! NAME +!! xmpi_sum_master +!! +!! FUNCTION +!! This module contains functions that calls MPI routine, +!! if we compile the code using the MPI CPP flags. +!! xmpi_sum_master is the generic function. +!! +!! COPYRIGHT +!! Copyright (C) 2001-2024 ABINIT group (AR,XG,MB) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~ABINIT/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! NOTES +!! The workspace array xsum is filled to zeros to avoid SIFPE in [mpiio][t28_MPI4][np=4] on tikal_gnu_4.9_mpich +!! On this bot, the code is compiled with -ffpe-trap and the illegal operation in the MPI library +!! make tests using xmpi_sum_master abort. +!! Strictly speaking the initialization is not needed because xsum has intent(out) --> bug in mpich3-3.1.3 (gcc492) +!! +!! SOURCE + +!!*** + +!!****f* ABINIT/xmpi_sum_master_int +!! NAME +!! xmpi_sum_master_int +!! +!! FUNCTION +!! Reduces values on all processes to a single value. +!! Target: integer scalars. +!! +!! INPUTS +!! master= master MPI node +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_sum_master_int(xval,master,comm,ier) + +!Arguments------------------------- + integer,intent(inout) :: xval + integer ,intent(in) :: master + integer ,intent(in) :: comm + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: nproc_space_comm + integer :: arr_xsum(1) +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_NULL) then + call MPI_COMM_SIZE(comm,nproc_space_comm,ier) + if (nproc_space_comm /= 1) then +! Accumulate xval on all proc. in comm + call MPI_REDUCE([xval],arr_xsum,1,MPI_INTEGER,MPI_SUM,master,comm,ier) + xval = arr_xsum(1) + end if + end if +#endif +end subroutine xmpi_sum_master_int +!!*** + +!!****f* ABINIT/xmpi_sum_master_dp +!! NAME +!! xmpi_sum_master_p +!! +!! FUNCTION +!! Reduces values on all processes to a single value. +!! Target: integer scalars. +!! +!! INPUTS +!! master= master MPI node +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_sum_master_dp(xval,master,comm,ier) + +!Arguments------------------------- + real(dp),intent(inout) :: xval + integer ,intent(in) :: master + integer ,intent(in) :: comm + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: nproc_space_comm + real(dp) :: arr_xsum(1) +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_NULL) then + call MPI_COMM_SIZE(comm,nproc_space_comm,ier) + if (nproc_space_comm /= 1) then +! Accumulate xval on all proc. in comm + call MPI_REDUCE([xval],arr_xsum,1,MPI_DOUBLE_PRECISION,MPI_SUM,master,comm,ier) + xval = arr_xsum(1) + end if + end if +#endif +end subroutine xmpi_sum_master_dp +!!*** + +!!****f* ABINIT/xmpi_sum_master_int2d +!! NAME +!! xmpi_sum_master_int2d +!! +!! FUNCTION +!! Reduces values on all processes to a single value. +!! Target: two-dimensional integer arrays. +!! +!! INPUTS +!! master= master MPI node +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_sum_master_int2d(xval,master,comm,ier) + +!Arguments ------------------------------------ + integer, DEV_CONTARRD intent(inout) :: xval(:,:) + integer,intent(in) :: master,comm + integer,intent(out) :: ier + +!Local variables------------------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2 + integer(kind=int64) :: ntot + integer, allocatable :: xsum(:,:) + integer :: nproc_space_comm +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_NULL) then + call MPI_COMM_SIZE(comm,nproc_space_comm,ier) + if (nproc_space_comm /= 1) then + n1 = size(xval,dim=1) + n2 = size(xval,dim=2) + + ABI_STAT_MALLOC(xsum,(n1,n2), ier) + if (ier /= 0) call xmpi_abort(msg='error allocating xsum') + xsum = 0 ! See notes + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2,kind=int64) + +! Accumulate xval on all proc. in comm + if (ntot<=xmpi_maxint32_64) then + call MPI_reduce(xval,xsum,n1*n2,MPI_INTEGER,MPI_SUM,master,comm,ier) + else + call xmpi_largetype_create(ntot,MPI_INTEGER,my_dt,my_op,MPI_SUM) + call MPI_reduce(xval,xsum,1,my_dt,my_op,master,comm,ier) + call xmpi_largetype_free(my_dt,my_op) + end if + + xval = xsum + ABI_FREE(xsum) + end if + end if +#endif + +end subroutine xmpi_sum_master_int2d +!!*** + +!!****f* ABINIT/xmpi_sum_master_dp1d +!! NAME +!! xmpi_sum_master_dp1d +!! +!! FUNCTION +!! Reduces values on all processes to a single value. +!! Target: double precision one-dimensional arrays. +!! +!! INPUTS +!! master= master MPI node +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_sum_master_dp1d(xval,master,comm,ier) + +!Arguments------------------------- + real(dp), DEV_CONTARRD intent(inout) :: xval(:) + integer ,intent(in) :: master + integer ,intent(in) :: comm + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: n1 + real(dp) , allocatable :: xsum(:) + integer :: nproc_space_comm +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_NULL) then + call MPI_COMM_SIZE(comm,nproc_space_comm,ier) + if (nproc_space_comm /= 1) then + n1 = size(xval,dim=1) +! Accumulate xval on all proc. in comm + ABI_STAT_MALLOC(xsum,(n1), ier) + if (ier /= 0) call xmpi_abort(msg='error allocating xsum') + xsum = zero ! See notes + call MPI_REDUCE(xval,xsum,n1,MPI_DOUBLE_PRECISION,MPI_SUM,master,comm,ier) + xval (:) = xsum(:) + ABI_FREE(xsum) + end if + end if +#endif +end subroutine xmpi_sum_master_dp1d +!!*** + +!!****f* ABINIT/xmpi_sum_master_dp2d +!! NAME +!! xmpi_sum_master_dp2d +!! +!! FUNCTION +!! Reduces values on all processes to a single value. +!! Target: double precision two-dimensional arrays. +!! +!! INPUTS +!! master= master MPI node +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_sum_master_dp2d(xval,master,comm,ier) + +!Arguments------------------------- + real(dp), DEV_CONTARRD intent(inout) :: xval(:,:) + integer ,intent(in) :: master + integer ,intent(in) :: comm + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2 + integer(kind=int64) :: ntot + real(dp) , allocatable :: xsum(:,:) + integer :: nproc_space_comm +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_NULL) then + call MPI_COMM_SIZE(comm,nproc_space_comm,ier) + if (nproc_space_comm /= 1) then + n1 = size(xval,dim=1) + n2 = size(xval,dim=2) + + ABI_STAT_MALLOC(xsum,(n1,n2), ier) + if (ier /= 0) call xmpi_abort(msg='error allocating xsum') + xsum = zero ! See notes + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2,kind=int64) + +! Accumulate xval on all proc. in comm + if (ntot<=xmpi_maxint32_64) then + call MPI_reduce(xval,xsum,n1*n2,MPI_DOUBLE_PRECISION,MPI_SUM,master,comm,ier) + else + call xmpi_largetype_create(ntot,MPI_DOUBLE_PRECISION,my_dt,my_op,MPI_SUM) + call MPI_reduce(xval,xsum,1,my_dt,my_op,master,comm,ier) + call xmpi_largetype_free(my_dt,my_op) + end if + + xval (:,:) = xsum(:,:) + ABI_FREE(xsum) + end if + end if +#endif +end subroutine xmpi_sum_master_dp2d +!!*** + +!!****f* ABINIT/xmpi_sum_master_dp3d +!! NAME +!! xmpi_sum_master_dp3d +!! +!! FUNCTION +!! Reduces values on all processes to a single value. +!! Target: double precision three-dimensional arrays. +!! +!! INPUTS +!! master= master MPI node +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_sum_master_dp3d(xval,master,comm,ier) + +!Arguments------------------------- + real(dp), DEV_CONTARRD intent(inout) :: xval(:,:,:) + integer ,intent(in) :: master + integer ,intent(in) :: comm + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2,n3 + integer(kind=int64) :: ntot + real(dp) , allocatable :: xsum(:,:,:) + integer :: nproc_space_comm +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_NULL) then + call MPI_COMM_SIZE(comm,nproc_space_comm,ier) + if (nproc_space_comm /= 1) then + n1 = size(xval,dim=1) + n2 = size(xval,dim=2) + n3 = size(xval,dim=3) + ABI_STAT_MALLOC(xsum,(n1,n2,n3), ier) + if (ier /= 0) call xmpi_abort(msg='error allocating xsum') + xsum = zero ! See notes + + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2*n3,kind=int64) + +! Accumulate xval on all proc. in comm + if (ntot<=xmpi_maxint32_64) then + call MPI_reduce(xval,xsum,n1*n2*n3,MPI_DOUBLE_PRECISION,MPI_SUM,master,comm,ier) + else + call xmpi_largetype_create(ntot,MPI_DOUBLE_PRECISION,my_dt,my_op,MPI_SUM) + call MPI_reduce(xval,xsum,1,my_dt,my_op,master,comm,ier) + call xmpi_largetype_free(my_dt,my_op) + end if + + xval (:,:,:) = xsum(:,:,:) + ABI_FREE(xsum) + end if + end if +#endif + +end subroutine xmpi_sum_master_dp3d +!!*** + +!!****f* ABINIT/xmpi_sum_master_dp4d +!! NAME +!! xmpi_sum_master_dp4d +!! +!! FUNCTION +!! Reduces values on all processes to a single value. +!! Target: double precision four-dimensional arrays. +!! +!! INPUTS +!! master= master MPI node +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_sum_master_dp4d(xval,master,comm,ier) + +!Arguments------------------------- + real(dp), DEV_CONTARRD intent(inout) :: xval(:,:,:,:) + integer ,intent(in) :: master + integer ,intent(in) :: comm + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2,n3,n4 + integer(kind=int64) :: ntot + real(dp) , allocatable :: xsum(:,:,:,:) + integer :: nproc_space_comm +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_NULL) then + call MPI_COMM_SIZE(comm,nproc_space_comm,ier) + if (nproc_space_comm /= 1) then + n1 = size(xval,dim=1) + n2 = size(xval,dim=2) + n3 = size(xval,dim=3) + n4 = size(xval,dim=4) + ABI_STAT_MALLOC(xsum,(n1,n2,n3,n4), ier) + if (ier /= 0) call xmpi_abort(msg='error allocating xsum') + xsum = zero ! See notes + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2*n3*n4,kind=int64) + +! Accumulate xval on all proc. in comm + if (ntot<=xmpi_maxint32_64) then + call MPI_reduce(xval,xsum,n1*n2*n3*n4,MPI_DOUBLE_PRECISION,MPI_SUM,master,comm,ier) + else + call xmpi_largetype_create(ntot,MPI_DOUBLE_PRECISION,my_dt,my_op,MPI_SUM) + call MPI_reduce(xval,xsum,1,my_dt,my_op,master,comm,ier) + call xmpi_largetype_free(my_dt,my_op) + end if + + xval (:,:,:,:) = xsum(:,:,:,:) + ABI_FREE(xsum) + end if + end if +#endif + +end subroutine xmpi_sum_master_dp4d +!!*** + +!!****f* ABINIT/xmpi_sum_master_dp5d +!! NAME +!! xmpi_sum_master_dp5d +!! +!! FUNCTION +!! Reduces values on all processes to a single value. +!! Target: double precision five-dimensional arrays. +!! +!! INPUTS +!! master= master MPI node +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_sum_master_dp5d(xval,master,comm,ier) + +!Arguments ------------------------------------ + real(dp), DEV_CONTARRD intent(inout) :: xval(:,:,:,:,:) + integer ,intent(in) :: master + integer ,intent(in) :: comm + integer ,intent(out) :: ier + +!Local variables------------------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2,n3,n4,n5 + integer(kind=int64) :: ntot + real(dp), allocatable :: xsum(:,:,:,:,:) + integer :: nproc_space_comm +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_NULL) then + call MPI_COMM_SIZE(comm,nproc_space_comm,ier) + if (nproc_space_comm /= 1) then + n1 = size(xval,dim=1) + n2 = size(xval,dim=2) + n3 = size(xval,dim=3) + n4 = size(xval,dim=4) + n5 = size(xval,dim=5) + + ABI_STAT_MALLOC(xsum,(n1,n2,n3,n4,n5), ier) + if (ier /= 0) call xmpi_abort(msg='error allocating xsum') + xsum = zero ! See notes + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2*n3*n4*n5,kind=int64) + +! Accumulate xval on all proc. in comm + if (ntot<=xmpi_maxint32_64) then + call MPI_reduce(xval,xsum,n1*n2*n3*n4*n5,MPI_DOUBLE_PRECISION,MPI_SUM,master,comm,ier) + else + call xmpi_largetype_create(ntot,MPI_DOUBLE_PRECISION,my_dt,my_op,MPI_SUM) + call MPI_reduce(xval,xsum,1,my_dt,my_op,master,comm,ier) + call xmpi_largetype_free(my_dt,my_op) + end if + + xval (:,:,:,:,:) = xsum(:,:,:,:,:) + ABI_FREE(xsum) + end if + end if +#endif + +end subroutine xmpi_sum_master_dp5d +!!*** + +!!****f* ABINIT/xmpi_sum_master_dp6d +!! NAME +!! xmpi_sum_master_dp6d +!! +!! FUNCTION +!! Reduces values on all processes to a single value. +!! Target: double precision six-dimensional arrays. +!! +!! INPUTS +!! master= master MPI node +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_sum_master_dp6d(xval,master,comm,ier) + +!Arguments ------------------------------------ + real(dp), DEV_CONTARRD intent(inout) :: xval(:,:,:,:,:,:) + integer ,intent(in) :: master + integer ,intent(in) :: comm + integer ,intent(out) :: ier + +!Local variables------------------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2,n3,n4,n5,n6 + integer(kind=int64) :: ntot + real(dp), allocatable :: xsum(:,:,:,:,:,:) + integer :: nproc_space_comm +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_NULL) then + call MPI_COMM_SIZE(comm,nproc_space_comm,ier) + if (nproc_space_comm /= 1) then + n1 = size(xval,dim=1) + n2 = size(xval,dim=2) + n3 = size(xval,dim=3) + n4 = size(xval,dim=4) + n5 = size(xval,dim=5) + n6 = size(xval,dim=6) + + ABI_STAT_MALLOC(xsum,(n1,n2,n3,n4,n5,n6), ier) + if (ier /= 0) call xmpi_abort(msg='error allocating xsum') + xsum = zero ! See notes + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2*n3*n4*n5*n6,kind=int64) + +! Accumulate xval on all proc. in comm + if (ntot<=xmpi_maxint32_64) then + call MPI_reduce(xval,xsum,n1*n2*n3*n4*n5*n6,MPI_DOUBLE_PRECISION,MPI_SUM,master,comm,ier) + else + call xmpi_largetype_create(ntot,MPI_DOUBLE_PRECISION,my_dt,my_op,MPI_SUM) + call MPI_reduce(xval,xsum,1,my_dt,my_op,master,comm,ier) + call xmpi_largetype_free(my_dt,my_op) + end if + + xval (:,:,:,:,:,:) = xsum(:,:,:,:,:,:) + ABI_FREE(xsum) + end if + end if +#endif + +end subroutine xmpi_sum_master_dp6d +!!*** + +!!****f* ABINIT/xmpi_sum_master_dp7d +!! NAME +!! xmpi_sum_master_dp7d +!! +!! FUNCTION +!! Reduces values on all processes to a single value. +!! Target: double precision seven-dimensional arrays. +!! +!! INPUTS +!! master= master MPI node +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_sum_master_dp7d(xval,master,comm,ier) + +!Arguments ------------------------------------ + real(dp), DEV_CONTARRD intent(inout) :: xval(:,:,:,:,:,:,:) + integer ,intent(in) :: master + integer ,intent(in) :: comm + integer ,intent(out) :: ier + +!Local variables------------------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2,n3,n4,n5,n6,n7 + integer(kind=int64) :: ntot + real(dp), allocatable :: xsum(:,:,:,:,:,:,:) + integer :: nproc_space_comm +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_NULL) then + call MPI_COMM_SIZE(comm,nproc_space_comm,ier) + if (nproc_space_comm /= 1) then + n1 = size(xval,dim=1) + n2 = size(xval,dim=2) + n3 = size(xval,dim=3) + n4 = size(xval,dim=4) + n5 = size(xval,dim=5) + n6 = size(xval,dim=6) + n7 = size(xval,dim=7) + + ABI_STAT_MALLOC(xsum,(n1,n2,n3,n4,n5,n6,n7), ier) + if (ier /= 0) call xmpi_abort(msg='error allocating xsum') + xsum = zero ! See notes + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2*n3*n4*n5*n6*n7,kind=int64) + +! Accumulate xval on all proc. in comm + if (ntot<=xmpi_maxint32_64) then + call MPI_reduce(xval,xsum,n1*n2*n3*n4*n5*n6*n7,MPI_DOUBLE_PRECISION,MPI_SUM,master,comm,ier) + else + call xmpi_largetype_create(ntot,MPI_DOUBLE_PRECISION,my_dt,my_op,MPI_SUM) + call MPI_reduce(xval,xsum,1,my_dt,my_op,master,comm,ier) + call xmpi_largetype_free(my_dt,my_op) + end if + + xval (:,:,:,:,:,:,:) = xsum(:,:,:,:,:,:,:) + ABI_FREE(xsum) + end if + end if +#endif + +end subroutine xmpi_sum_master_dp7d +!!*** + +!!****f* ABINIT/xmpi_sum_master_int4d +!! NAME +!! xmpi_sum_master_int4d +!! +!! FUNCTION +!! Reduces values on all processes to a single value. +!! Target: four-diemnsional integer arrays. +!! +!! INPUTS +!! master= master MPI node +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_sum_master_int4d(xval,master,comm,ier) + +!Arguments ------------------------------------ + integer, DEV_CONTARRD intent(inout) :: xval(:,:,:,:) + integer,intent(in) :: master + integer,intent(in) :: comm + integer,intent(out) :: ier + +!Local variables------------------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2,n3,n4 + integer(kind=int64) :: ntot + integer, allocatable :: xsum(:,:,:,:) + integer :: nproc_space_comm +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_NULL) then + call MPI_COMM_SIZE(comm,nproc_space_comm,ier) + if (nproc_space_comm /= 1) then + n1 = size(xval,dim=1) + n2 = size(xval,dim=2) + n3 = size(xval,dim=3) + n4 = size(xval,dim=4) + + ABI_STAT_MALLOC(xsum,(n1,n2,n3,n4), ier) + if (ier /= 0) call xmpi_abort(msg='error allocating xsum') + xsum = 0 ! See notes + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2*n3*n4,kind=int64) + +! Accumulate xval on all proc. in comm + if (ntot<=xmpi_maxint32_64) then + call MPI_reduce(xval,xsum,n1*n2*n3*n4,MPI_INTEGER,MPI_SUM,master,comm,ier) + else + call xmpi_largetype_create(ntot,MPI_INTEGER,my_dt,my_op,MPI_SUM) + call MPI_reduce(xval,xsum,1,my_dt,my_op,master,comm,ier) + call xmpi_largetype_free(my_dt,my_op) + end if + + xval (:,:,:,:) = xsum(:,:,:,:) + ABI_FREE(xsum) + end if + end if +#endif + +end subroutine xmpi_sum_master_int4d +!!*** + +!!****f* ABINIT/xmpi_sum_master_c1cplx +!! NAME +!! xmpi_sum_master_c1cplx +!! +!! FUNCTION +!! Reduces values on all processes to a single value. +!! Target: one-dimensional complex arrays. +!! +!! INPUTS +!! master= master MPI node +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_sum_master_c1cplx(xval,master,comm,ier) + +!Arguments------------------------- + complex(spc), DEV_CONTARRD intent(inout) :: xval(:) + integer ,intent(in) :: master + integer ,intent(in) :: comm + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: n1,nproc_space_comm + complex(spc),allocatable :: xsum(:) +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_NULL) then + call MPI_COMM_SIZE(comm,nproc_space_comm,ier) + if (nproc_space_comm /= 1) then + n1 = size(xval,dim=1) + ABI_STAT_MALLOC(xsum,(n1), ier) + if (ier /= 0) call xmpi_abort(msg='error allocating xsum') + xsum = (0_sp,0_sp) ! See notes +! Collect xval from processors on master in comm + call MPI_REDUCE(xval,xsum,n1,MPI_COMPLEX,MPI_SUM,master,comm,ier) + xval = xsum + ABI_FREE(xsum) + end if + end if +#endif + +end subroutine xmpi_sum_master_c1cplx +!!*** + +!!****f* ABINIT/xmpi_sum_master_c2cplx +!! NAME +!! xmpi_sum_master_c2cplx +!! +!! FUNCTION +!! Reduces values on all processes to a single value. +!! Target: two-dimensional complex arrays. +!! +!! INPUTS +!! master= master MPI node +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_sum_master_c2cplx(xval,master,comm,ier) + +!Arguments------------------------- + complex(spc), DEV_CONTARRD intent(inout) :: xval(:,:) + integer,intent(in) :: master + integer,intent(in) :: comm + integer,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2 + integer(kind=int64) :: ntot + integer :: nproc_space_comm + complex(spc),allocatable :: xsum(:,:) +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_NULL) then + call MPI_COMM_SIZE(comm,nproc_space_comm,ier) + if (nproc_space_comm /= 1) then + n1 = size(xval,dim=1) + n2 = size(xval,dim=2) + + ABI_STAT_MALLOC(xsum,(n1,n2), ier) + if (ier /= 0) call xmpi_abort(msg='error allocating xsum') + xsum = (0_sp,0_sp) ! See notes + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2,kind=int64) + +! Accumulate xval on all proc. in comm + if (ntot<=xmpi_maxint32_64) then + call MPI_reduce(xval,xsum,n1*n2,MPI_COMPLEX,MPI_SUM,master,comm,ier) + else + call xmpi_largetype_create(ntot,MPI_COMPLEX,my_dt,my_op,MPI_SUM) + call MPI_reduce(xval,xsum,1,my_dt,my_op,master,comm,ier) + call xmpi_largetype_free(my_dt,my_op) + end if + + xval (:,:) = xsum(:,:) + ABI_FREE(xsum) + end if + end if +#endif + +end subroutine xmpi_sum_master_c2cplx +!!*** + +!!****f* ABINIT/xmpi_sum_master_c3cplx +!! NAME +!! xmpi_sum_master_c3cplx +!! +!! FUNCTION +!! Reduces values on all processes to a single value. +!! Target: three-dimensional complex arrays. +!! +!! INPUTS +!! master= master MPI node +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_sum_master_c3cplx(xval,master,comm,ier) + +!Arguments------------------------- + complex(spc), DEV_CONTARRD intent(inout) :: xval(:,:,:) + integer,intent(in) :: master + integer,intent(in) :: comm + integer,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2,n3 + integer(kind=int64) :: ntot + complex(spc), allocatable :: xsum(:,:,:) + integer :: nproc_space_comm +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_NULL) then + call MPI_COMM_SIZE(comm,nproc_space_comm,ier) + if (nproc_space_comm /= 1) then + n1 = size(xval,dim=1) + n2 = size(xval,dim=2) + n3 = size(xval,dim=3) + + ABI_STAT_MALLOC(xsum,(n1,n2,n3), ier) + if (ier /= 0) call xmpi_abort(msg='error allocating xsum') + xsum = (0_sp,0_sp) ! See notes + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2*n3,kind=int64) + +! Accumulate xval on all proc. in comm + if (ntot<=xmpi_maxint32_64) then + call MPI_reduce(xval,xsum,n1*n2*n3,MPI_COMPLEX,MPI_SUM,master,comm,ier) + else + call xmpi_largetype_create(ntot,MPI_COMPLEX,my_dt,my_op,MPI_SUM) + call MPI_reduce(xval,xsum,1,my_dt,my_op,master,comm,ier) + call xmpi_largetype_free(my_dt,my_op) + end if + + xval (:,:,:) = xsum(:,:,:) + ABI_FREE(xsum) + end if + end if +#endif + +end subroutine xmpi_sum_master_c3cplx +!!*** + +!!****f* ABINIT/xmpi_sum_master_c4cplx +!! NAME +!! xmpi_sum_master_c4cplx +!! +!! FUNCTION +!! Reduces values on all processes to a single value. +!! Target: four-dimensional complex arrays. +!! +!! INPUTS +!! master= master MPI node +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_sum_master_c4cplx(xval,master,comm,ier) + +!Arguments------------------------- + complex(spc), DEV_CONTARRD intent(inout) :: xval(:,:,:,:) + integer,intent(in) :: master + integer,intent(in) :: comm + integer,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2,n3,n4 + integer(kind=int64) :: ntot + integer :: nproc_space_comm + complex(spc), allocatable :: xsum(:,:,:,:) +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_NULL) then + call MPI_COMM_SIZE(comm,nproc_space_comm,ier) + if (nproc_space_comm /= 1) then + n1 = size(xval,dim=1) + n2 = size(xval,dim=2) + n3 = size(xval,dim=3) + n4 = size(xval,dim=4) + + ABI_STAT_MALLOC(xsum,(n1,n2,n3,n4), ier) + if (ier /= 0) call xmpi_abort(msg='error allocating xsum') + xsum = (0_sp,0_sp) ! See notes + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2*n3*n4,kind=int64) + +! Accumulate xval on all proc. in comm + if (ntot<=xmpi_maxint32_64) then + call MPI_reduce(xval,xsum,n1*n2*n3*n4,MPI_COMPLEX,MPI_SUM,master,comm,ier) + else + call xmpi_largetype_create(ntot,MPI_COMPLEX,my_dt,my_op,MPI_SUM) + call MPI_reduce(xval,xsum,1,my_dt,my_op,master,comm,ier) + call xmpi_largetype_free(my_dt,my_op) + end if + + xval (:,:,:,:) = xsum(:,:,:,:) + ABI_FREE(xsum) + end if + end if +#endif +end subroutine xmpi_sum_master_c4cplx +!!*** + +!---------------------------------------------------------------------- + +!!****f* ABINIT/xmpi_sum_master_c5cplx +!! NAME +!! xmpi_sum_master_c5cplx +!! +!! FUNCTION +!! Reduces values on all processes to a single value. +!! Target: five-dimensional single precision complex arrays. +!! +!! INPUTS +!! master= master MPI node +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_sum_master_c5cplx(xval,master,comm,ier) + +!Arguments------------------------- + complex(spc), DEV_CONTARRD intent(inout) :: xval(:,:,:,:,:) + integer,intent(in) :: master + integer,intent(in) :: comm + integer,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2,n3,n4,n5 + integer(kind=int64) :: ntot + complex(spc),allocatable :: xsum(:,:,:,:,:) + integer :: nproc_space_comm +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_NULL) then + call MPI_COMM_SIZE(comm,nproc_space_comm,ier) + if (nproc_space_comm /= 1) then + n1 = size(xval,dim=1) + n2 = size(xval,dim=2) + n3 = size(xval,dim=3) + n4 = size(xval,dim=4) + n5 = size(xval,dim=5) + + ABI_STAT_MALLOC(xsum,(n1,n2,n3,n4,n5), ier) + if (ier /= 0) call xmpi_abort(msg='error allocating xsum') + xsum = (0_sp,0_sp) ! See notes + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2*n3*n4*n5,kind=int64) + +! Accumulate xval on all proc. in comm + if (ntot<=xmpi_maxint32_64) then + call MPI_reduce(xval,xsum,n1*n2*n3*n4*n5,MPI_COMPLEX,MPI_SUM,master,comm,ier) + else + call xmpi_largetype_create(ntot,MPI_COMPLEX,my_dt,my_op,MPI_SUM) + call MPI_reduce(xval,xsum,1,my_dt,my_op,master,comm,ier) + call xmpi_largetype_free(my_dt,my_op) + end if + + xval = xsum + ABI_FREE(xsum) + end if + end if +#endif +end subroutine xmpi_sum_master_c5cplx +!!*** + +!!****f* ABINIT/xmpi_sum_master_c1dpc +!! NAME +!! xmpi_sum_master_c1dpc +!! +!! FUNCTION +!! Reduces values on all processes to a single value. +!! Target: one-dimensional double complex arrays. +!! +!! INPUTS +!! master= master MPI node +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_sum_master_c1dpc(xval,master,comm,ier) + +!Arguments------------------------- + complex(dpc), DEV_CONTARRD intent(inout) :: xval(:) + integer,intent(in) :: master + integer,intent(in) :: comm + integer,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: n1 + integer :: nproc_space_comm + complex(dpc),allocatable :: xsum(:) +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_NULL) then + call MPI_COMM_SIZE(comm,nproc_space_comm,ier) + if (nproc_space_comm /= 1) then + n1 = size(xval,dim=1) +! Collect xval from processors on master in comm + ABI_STAT_MALLOC(xsum,(n1), ier) + if (ier /= 0) call xmpi_abort(msg='error allocating xsum') + xsum = (0_dp,0_dp) ! See notes + call MPI_REDUCE(xval,xsum,n1,MPI_DOUBLE_COMPLEX,MPI_SUM,master,comm,ier) + xval (:) = xsum(:) + ABI_FREE(xsum) + end if + end if +#endif + +end subroutine xmpi_sum_master_c1dpc +!!*** + +!!****f* ABINIT/xmpi_sum_master_c2dpc +!! NAME +!! xmpi_sum_master_c2dpc +!! +!! FUNCTION +!! Reduces values on all processes to a single value. +!! Target: two-dimensional double complex arrays. +!! +!! INPUTS +!! master= master MPI node +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_sum_master_c2dpc(xval,master,comm,ier) + +!Arguments------------------------- + complex(dpc), DEV_CONTARRD intent(inout) :: xval(:,:) + integer ,intent(in) :: master + integer ,intent(in) :: comm + integer ,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2 + integer(kind=int64) :: ntot + complex(dpc) , allocatable :: xsum(:,:) + integer :: nproc_space_comm +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_NULL) then + call MPI_COMM_SIZE(comm,nproc_space_comm,ier) + if (nproc_space_comm /= 1) then + n1 = size(xval,dim=1) + n2 = size(xval,dim=2) + + ABI_STAT_MALLOC(xsum,(n1,n2), ier) + if (ier /= 0) call xmpi_abort(msg='error allocating xsum') + xsum = (0_dp,0_dp) ! See notes + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2,kind=int64) + +! Accumulate xval on all proc. in comm + if (ntot<=xmpi_maxint32_64) then + call MPI_reduce(xval,xsum,n1*n2,MPI_DOUBLE_COMPLEX,MPI_SUM,master,comm,ier) + else + call xmpi_largetype_create(ntot,MPI_DOUBLE_COMPLEX,my_dt,my_op,MPI_SUM) + call MPI_reduce(xval,xsum,1,my_dt,my_op,master,comm,ier) + call xmpi_largetype_free(my_dt,my_op) + end if + + xval (:,:) = xsum(:,:) + ABI_FREE(xsum) + end if + end if +#endif + +end subroutine xmpi_sum_master_c2dpc +!!*** + +!!****f* ABINIT/xmpi_sum_master_c3dpc +!! NAME +!! xmpi_sum_master_c3dpc +!! +!! FUNCTION +!! Reduces values on all processes to a single value. +!! Target: three-dimensional double complex arrays. +!! +!! INPUTS +!! master= master MPI node +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_sum_master_c3dpc(xval,master,comm,ier) + +!Arguments------------------------- + complex(dpc), DEV_CONTARRD intent(inout) :: xval(:,:,:) + integer,intent(in) :: master + integer,intent(in) :: comm + integer,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2,n3 + integer(kind=int64) :: ntot + complex(dpc) , allocatable :: xsum(:,:,:) + integer :: nproc_space_comm +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_NULL) then + call MPI_COMM_SIZE(comm,nproc_space_comm,ier) + if (nproc_space_comm /= 1) then + n1 = size(xval,dim=1) + n2 = size(xval,dim=2) + n3 = size(xval,dim=3) + + ABI_STAT_MALLOC(xsum,(n1,n2,n3), ier) + if (ier /= 0) call xmpi_abort(msg='error allocating xsum') + xsum = (0_dp,0_dp) ! See notes + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2*n3,kind=int64) + +! Accumulate xval on all proc. in comm + if (ntot<=xmpi_maxint32_64) then + call MPI_reduce(xval,xsum,n1*n2*n3,MPI_DOUBLE_COMPLEX,MPI_SUM,master,comm,ier) + else + call xmpi_largetype_create(ntot,MPI_DOUBLE_COMPLEX,my_dt,my_op,MPI_SUM) + call MPI_reduce(xval,xsum,1,my_dt,my_op,master,comm,ier) + call xmpi_largetype_free(my_dt,my_op) + end if + + xval (:,:,:) = xsum(:,:,:) + ABI_FREE(xsum) + end if + end if +#endif +end subroutine xmpi_sum_master_c3dpc +!!*** + +!!****f* ABINIT/xmpi_sum_master_c4dpc +!! NAME +!! xmpi_sum_master_c4dpc +!! +!! FUNCTION +!! Reduces values on all processes to a single value. +!! Target: four-dimensional double complex arrays. +!! +!! INPUTS +!! master= master MPI node +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_sum_master_c4dpc(xval,master,comm,ier) + +!Arguments------------------------- + complex(dpc), DEV_CONTARRD intent(inout) :: xval(:,:,:,:) + integer,intent(in) :: master + integer,intent(in) :: comm + integer,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2,n3,n4 + integer(kind=int64) :: ntot + complex(dpc) , allocatable :: xsum(:,:,:,:) + integer :: nproc_space_comm +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_NULL) then + call MPI_COMM_SIZE(comm,nproc_space_comm,ier) + if (nproc_space_comm /= 1) then + n1 = size(xval,dim=1) + n2 = size(xval,dim=2) + n3 = size(xval,dim=3) + n4 = size(xval,dim=4) + + ABI_STAT_MALLOC(xsum,(n1,n2,n3,n4), ier) + if (ier /= 0) call xmpi_abort(msg='error allocating xsum') + xsum = (0_dp,0_dp) ! See notes + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2*n3*n4,kind=int64) + +! Accumulate xval on all proc. in comm + if (ntot<=xmpi_maxint32_64) then + call MPI_reduce(xval,xsum,n1*n2*n3*n4,MPI_DOUBLE_COMPLEX,MPI_SUM,master,comm,ier) + else + call xmpi_largetype_create(ntot,MPI_DOUBLE_COMPLEX,my_dt,my_op,MPI_SUM) + call MPI_reduce(xval,xsum,1,my_dt,my_op,master,comm,ier) + call xmpi_largetype_free(my_dt,my_op) + end if + + xval (:,:,:,:) = xsum(:,:,:,:) + ABI_FREE(xsum) + end if + end if +#endif +end subroutine xmpi_sum_master_c4dpc +!!*** + +!!****f* ABINIT/xmpi_sum_master_c5dpc +!! NAME +!! xmpi_sum_master_c5dpc +!! +!! FUNCTION +!! Reduces values on all processes to a single value. +!! Target: five-dimensional double complex arrays. +!! +!! INPUTS +!! master= master MPI node +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xmpi_sum_master_c5dpc(xval,master,comm,ier) + +!Arguments------------------------- + complex(dpc), DEV_CONTARRD intent(inout) :: xval(:,:,:,:,:) + integer,intent(in) :: master + integer,intent(in) :: comm + integer,intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_dt,my_op,n1,n2,n3,n4,n5 + integer(kind=int64) :: ntot + complex(dpc),allocatable :: xsum(:,:,:,:,:) + integer :: nproc_space_comm +#endif + +! ************************************************************************* + + ier=0 +#if defined HAVE_MPI + if (comm /= MPI_COMM_NULL) then + call MPI_COMM_SIZE(comm,nproc_space_comm,ier) + if (nproc_space_comm /= 1) then + n1 = size(xval,dim=1) + n2 = size(xval,dim=2) + n3 = size(xval,dim=3) + n4 = size(xval,dim=4) + n5 = size(xval,dim=5) + + ABI_STAT_MALLOC(xsum,(n1,n2,n3,n4,n5), ier) + if (ier /= 0) call xmpi_abort(msg='error allocating xsum') + xsum = (0_dp,0_dp) ! See notes + + !This product of dimensions can be greater than a 32bit integer + !We use a INT64 to store it. If it is too large, we switch to an + !alternate routine because MPI<4 doesnt handle 64 bit counts. + ntot=int(n1*n2*n3*n4*n5,kind=int64) + +! Accumulate xval on all proc. in comm + if (ntot<=xmpi_maxint32_64) then + call MPI_reduce(xval,xsum,n1*n2*n3*n4*n5,MPI_DOUBLE_COMPLEX,MPI_SUM,master,comm,ier) + else + call xmpi_largetype_create(ntot,MPI_DOUBLE_COMPLEX,my_dt,my_op,MPI_SUM) + call MPI_reduce(xval,xsum,1,my_dt,my_op,master,comm,ier) + call xmpi_largetype_free(my_dt,my_op) + end if + + xval (:,:,:,:,:) = xsum(:,:,:,:,:) + ABI_FREE(xsum) + end if + end if +#endif +end subroutine xmpi_sum_master_c5dpc +!!*** diff --git a/GX-PAW/common/src/14_hidewrite/Makefile b/GX-PAW/common/src/14_hidewrite/Makefile new file mode 100644 index 00000000..3a7c27d6 --- /dev/null +++ b/GX-PAW/common/src/14_hidewrite/Makefile @@ -0,0 +1,1493 @@ +# Makefile.in generated by automake 1.16.3 from Makefile.am. +# shared/common/src/14_hidewrite/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994-2020 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-corelibs on 2024/03/16 21:07:38 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-corelibs script or its config file instead. +# + + +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/abinit +pkgincludedir = $(includedir)/abinit +pkglibdir = $(libdir)/abinit +pkglibexecdir = $(libexecdir)/abinit +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = x86_64-apple-darwin18.7.0 +host_triplet = x86_64-apple-darwin18.7.0 +target_triplet = x86_64-apple-darwin18.7.0 +subdir = shared/common/src/14_hidewrite +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/m4/arch-gpu.m4 \ + $(top_srcdir)/config/m4/arch-mpi.m4 \ + $(top_srcdir)/config/m4/auto-autotools.m4 \ + $(top_srcdir)/config/m4/auto-corelibs.m4 \ + $(top_srcdir)/config/m4/auto-debug.m4 \ + $(top_srcdir)/config/m4/auto-dirflags.m4 \ + $(top_srcdir)/config/m4/auto-env.m4 \ + $(top_srcdir)/config/m4/auto-hints.m4 \ + $(top_srcdir)/config/m4/auto-optim.m4 \ + $(top_srcdir)/config/m4/auto-options.m4 \ + $(top_srcdir)/config/m4/auto-output.m4 \ + $(top_srcdir)/config/m4/auto-triggers.m4 \ + $(top_srcdir)/config/m4/conf-atompaw.m4 \ + $(top_srcdir)/config/m4/conf-debug.m4 \ + $(top_srcdir)/config/m4/conf-fallbacks.m4 \ + $(top_srcdir)/config/m4/conf-files.m4 \ + $(top_srcdir)/config/m4/conf-init.m4 \ + $(top_srcdir)/config/m4/conf-openmp.m4 \ + $(top_srcdir)/config/m4/conf-optim.m4 \ + $(top_srcdir)/config/m4/lang-c++.m4 \ + $(top_srcdir)/config/m4/lang-c.m4 \ + $(top_srcdir)/config/m4/lang-fortran-import.m4 \ + $(top_srcdir)/config/m4/lang-fortran.m4 \ + $(top_srcdir)/config/m4/lang-python.m4 \ + $(top_srcdir)/config/m4/libxml2.m4 \ + $(top_srcdir)/config/m4/misc-display.m4 \ + $(top_srcdir)/config/m4/sd_abinit_common.m4 \ + $(top_srcdir)/config/m4/sd_arch_gpu.m4 \ + $(top_srcdir)/config/m4/sd_arch_mpi.m4 \ + $(top_srcdir)/config/m4/sd_bigdft.m4 \ + $(top_srcdir)/config/m4/sd_core.m4 \ + $(top_srcdir)/config/m4/sd_esl.m4 \ + $(top_srcdir)/config/m4/sd_fftw3.m4 \ + $(top_srcdir)/config/m4/sd_gpu_kokkos.m4 \ + $(top_srcdir)/config/m4/sd_gpu_yakl.m4 \ + $(top_srcdir)/config/m4/sd_io_hdf5.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf_fortran.m4 \ + $(top_srcdir)/config/m4/sd_levmar.m4 \ + $(top_srcdir)/config/m4/sd_libpaw.m4 \ + $(top_srcdir)/config/m4/sd_libpsml.m4 \ + $(top_srcdir)/config/m4/sd_libxc.m4 \ + $(top_srcdir)/config/m4/sd_math_fft.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_core.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_util.m4 \ + $(top_srcdir)/config/m4/sd_papi.m4 \ + $(top_srcdir)/config/m4/sd_pfft.m4 \ + $(top_srcdir)/config/m4/sd_triqs.m4 \ + $(top_srcdir)/config/m4/sd_wannier90.m4 \ + $(top_srcdir)/config/m4/sd_xmlf90.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = m_build_info.F90 +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +AM_V_AR = $(am__v_AR_$(V)) +am__v_AR_ = $(am__v_AR_$(AM_DEFAULT_VERBOSITY)) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = +lib14_hidewrite_a_AR = $(AR) $(ARFLAGS) +lib14_hidewrite_a_LIBADD = +am__objects_1 = m_abicore.$(OBJEXT) m_cppopts_dumper.$(OBJEXT) \ + m_fstrings.$(OBJEXT) m_io_tools.$(OBJEXT) \ + m_specialmsg.$(OBJEXT) +am_lib14_hidewrite_a_OBJECTS = $(am__objects_1) +am__objects_2 = m_build_info.$(OBJEXT) m_optim_dumper.$(OBJEXT) +nodist_lib14_hidewrite_a_OBJECTS = $(am__objects_2) +lib14_hidewrite_a_OBJECTS = $(am_lib14_hidewrite_a_OBJECTS) \ + $(nodist_lib14_hidewrite_a_OBJECTS) +AM_V_P = $(am__v_P_$(V)) +am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY)) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I. -I$(top_builddir) +PPFCCOMPILE = $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) +AM_V_PPFC = $(am__v_PPFC_$(V)) +am__v_PPFC_ = $(am__v_PPFC_$(AM_DEFAULT_VERBOSITY)) +am__v_PPFC_0 = @echo " PPFC " $@; +am__v_PPFC_1 = +FCLD = $(FC) +FCLINK = $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \ + $@ +AM_V_FCLD = $(am__v_FCLD_$(V)) +am__v_FCLD_ = $(am__v_FCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_FCLD_0 = @echo " FCLD " $@; +am__v_FCLD_1 = +SOURCES = $(lib14_hidewrite_a_SOURCES) \ + $(nodist_lib14_hidewrite_a_SOURCES) +DIST_SOURCES = $(lib14_hidewrite_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/m_build_info.F90.in +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ABINIT_BINARY_PACKAGE = abinit-10.0.0.83-58be4d_x86_64_darwin18.7.0_gnu9.4 +ABINIT_COMMON_CPPFLAGS = +ABINIT_COMMON_FCFLAGS = +ABINIT_COMMON_LDFLAGS = +ABINIT_COMMON_LIBS = +ABINIT_TARGET = x86_64_darwin18.7.0_gnu9.4 +ABINIT_VERSION = 10.0.0.83-58be4d +ABINIT_VERSION_BASE = 10.0 +ABINIT_VERSION_BUILD = 20240316 +ABINIT_VERSION_MAJOR = 10 +ABINIT_VERSION_MICRO = 0 +ABINIT_VERSION_MINOR = 0 +ABI_CPPFLAGS = -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include +ACLOCAL = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' aclocal-1.16 +AMTAR = $${TAR-tar} +AM_DEFAULT_VERBOSITY = 1 +AR = ar +ARFLAGS = rc +ARFLAGS_CMD = rc +ARFLAGS_DEBUG = +ARFLAGS_EXTRA = +ARFLAGS_HINTS = +ARFLAGS_OPTIM = +ATOMPAW_BIN = +AUTOCONF = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' autoconf +AUTOHEADER = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' autoheader +AUTOMAKE = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' automake-1.16 +AWK = awk +BIGDFT_CPPFLAGS = +BIGDFT_FCFLAGS = +BIGDFT_LDFLAGS = +BIGDFT_LIBS = +BOURNE_SHELL = /bin/sh +CC = /opt/local/bin/mpicc +CCDEPMODE = depmode=gcc3 +CC_LDFLAGS = +CC_LDFLAGS_DEBUG = +CC_LDFLAGS_EXTRA = +CC_LDFLAGS_GPU = +CC_LDFLAGS_HINTS = +CC_LDFLAGS_OPTIM = +CC_LIBS = +CC_LIBS_DEBUG = +CC_LIBS_EXTRA = +CC_LIBS_GPU = +CC_LIBS_HINTS = +CC_LIBS_OPTIM = +CFLAGS = -O2 -g +CFLAGS_DEBUG = +CFLAGS_EXTRA = +CFLAGS_GPU = +CFLAGS_HINTS = +CFLAGS_OPTIM = +CPP = /opt/local/bin/mpicc -E +CPPFLAGS = +CPPFLAGS_DEBUG = +CPPFLAGS_EXTRA = +CPPFLAGS_GPU = +CPPFLAGS_HINTS = +CPPFLAGS_HINTS_EXT = -P -std=c99 +CPPFLAGS_OPTIM = +CXX = /opt/local/bin/mpicxx +CXXDEPMODE = depmode=gcc3 +CXXFLAGS = -O2 -g +CXXFLAGS_DEBUG = +CXXFLAGS_EXTRA = +CXXFLAGS_GPU = +CXXFLAGS_HINTS = +CXXFLAGS_OPTIM = +CXX_LDFLAGS = +CXX_LDFLAGS_DEBUG = +CXX_LDFLAGS_EXTRA = +CXX_LDFLAGS_GPU = +CXX_LDFLAGS_HINTS = +CXX_LDFLAGS_OPTIM = +CXX_LIBS = +CXX_LIBS_DEBUG = +CXX_LIBS_EXTRA = +CXX_LIBS_GPU = +CXX_LIBS_HINTS = +CXX_LIBS_OPTIM = +CYGPATH_W = echo +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +ECHO_C = \c +ECHO_N = +ECHO_T = +EGREP = /usr/bin/grep -E +EXEEXT = +F77 = /opt/local/bin/mpif90 +FC = /opt/local/bin/mpif90 +FCFLAGS = -O2 -g -ffree-line-length-none -I/opt/local/include -I/opt/local/include -I/opt/local/include +FCFLAGS_DEBUG = +FCFLAGS_EXTRA = +FCFLAGS_F90 = +FCFLAGS_FIXEDFORM = -ffixed-form +FCFLAGS_FREEFORM = -ffree-form +FCFLAGS_HINTS = -ffree-line-length-none +FCFLAGS_MODDIR = -J../mods +FCFLAGS_OPENMP = +FCFLAGS_OPENMP_OFFLOAD = +FCFLAGS_OPTIM = +FCLIBS = -L/opt/local/lib -L/opt/local/lib/openmpi-gcc9 -L/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0 -L/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/../../.. -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi -lgfortran -lquadmath -lm +FC_LDFLAGS = +FC_LDFLAGS_DEBUG = +FC_LDFLAGS_EXTRA = +FC_LDFLAGS_HINTS = +FC_LDFLAGS_OPTIM = +FC_LIBS = +FC_LIBS_DEBUG = +FC_LIBS_EXTRA = +FC_LIBS_HINTS = +FC_LIBS_OPTIM = +FC_NOWRAP = /opt/local/bin/mpif90 +FFLAGS = -O2 -g -ffree-line-length-none -I/opt/local/include -I/opt/local/include -I/opt/local/include +FFTW3_CFLAGS = +FFTW3_CPPFLAGS = -I/opt/local/include +FFTW3_FCFLAGS = -I/opt/local/include +FFTW3_LDFLAGS = +FFTW3_LIBS = -L/opt/local/lib -lfftw3 -lfftw3f +FFT_CFLAGS = +FFT_FCFLAGS = +FPP = +FPPFLAGS = +FPPFLAGS_DEBUG = +FPPFLAGS_EXTRA = +FPPFLAGS_HINTS = +FPPFLAGS_OPTIM = +GPU_ARCH = +GPU_CFLAGS = +GPU_CPPFLAGS = +GPU_CXXFLAGS = +GPU_FCFLAGS = +GPU_LDFLAGS = +GPU_LIBS = +GRAPHATOM_BIN = +GREP = /usr/bin/grep +H5CC = +HDF5_CFLAGS = +HDF5_CPPFLAGS = +HDF5_CXXFLAGS = +HDF5_FCFLAGS = +HDF5_LDFLAGS = +HDF5_LIBS = +INSTALL = /opt/local/libexec/gnubin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +KOKKOS_CPPFLAGS = +KOKKOS_CXXFLAGS = +KOKKOS_LDFLAGS = +KOKKOS_LIBS = +LDFLAGS = +LEVMAR_CFLAGS = +LEVMAR_CPPFLAGS = +LEVMAR_LDFLAGS = +LEVMAR_LIBS = +LIBOBJS = +LIBPAW_CPPFLAGS = +LIBPAW_FCFLAGS = +LIBPAW_LDFLAGS = +LIBPAW_LIBS = +LIBPSML_CPPFLAGS = +LIBPSML_FCFLAGS = +LIBPSML_LDFLAGS = +LIBPSML_LIBS = +LIBS = -L/opt/local/lib -lwannier -L/opt/local/lib -lxc -L/opt/local/lib -lnetcdff -L/opt/local/lib -lnetcdf -L/opt/local/lib -L/opt/local/lib -lhdf5_hl -L/opt/local/lib -lhdf5 -lz -ldl -lm -L/opt/local/lib -lfftw3 -lfftw3f +LIBXC_CFLAGS = +LIBXC_CPPFLAGS = +LIBXC_FCFLAGS = +LIBXC_LDFLAGS = +LIBXC_LIBS = +LIBXML2_CPPFLAGS = +LIBXML2_FCFLAGS = +LIBXML2_LIBS = +LINALG_CFLAGS = +LINALG_CPPFLAGS = +LINALG_CXXFLAGS = +LINALG_FCFLAGS = -I/opt/local/include +LINALG_LDFLAGS = +LINALG_LIBS = -L/opt/local/lib -lopenblas +LN_S = ln -s +LTLIBOBJS = +MAKEINFO = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' makeinfo +MKDIR_P = /opt/local/libexec/gnubin/mkdir -p +MODEXT = mod +MPI_CFLAGS = +MPI_CPPFLAGS = +MPI_CXXFLAGS = +MPI_FCFLAGS = +MPI_LDFLAGS = +MPI_LIBS = +MV = /opt/local/libexec/gnubin/mv +NETCDF_CFLAGS = +NETCDF_CPPFLAGS = +NETCDF_CXXFLAGS = +NETCDF_FCFLAGS = +NETCDF_FORTRAN_CFLAGS = +NETCDF_FORTRAN_CPPFLAGS = +NETCDF_FORTRAN_CXXFLAGS = +NETCDF_FORTRAN_FCFLAGS = +NETCDF_FORTRAN_LDFLAGS = +NETCDF_FORTRAN_LIBS = +NETCDF_LDFLAGS = +NETCDF_LIBS = +NVCC = +NVCC_CFLAGS = +NVCC_CPPFLAGS = +NVCC_LDFLAGS = +NVCC_LIBS = +OBJEXT = o +PACKAGE = abinit +PACKAGE_BUGREPORT = https://bugs.launchpad.net/abinit/ +PACKAGE_NAME = ABINIT +PACKAGE_STRING = ABINIT 10.0.0.83-58be4d +PACKAGE_TARNAME = abinit +PACKAGE_URL = +PACKAGE_VERSION = 10.0.0.83-58be4d +PAPI_CFLAGS = +PAPI_CPPFLAGS = +PAPI_LDFLAGS = +PAPI_LIBS = +PATCH = patch +PATH_SEPARATOR = : +PERL = /usr/bin/perl +PFFT_CFLAGS = +PFFT_CPPFLAGS = +PFFT_LDFLAGS = +PFFT_LIBS = +PYFLAGS = +PYTHON = python3.9 +PYTHON_CONFIG = python3.9-config +PYTHON_CPPFLAGS = -I/opt/local/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -I/opt/local/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 +RANLIB = ranlib +REALPATH = realpath +RM = /opt/local/libexec/gnubin/rm +SED = /usr/bin/sed +SET_MAKE = +SHELL = /bin/sh +STRIP = +TAR = tar +TRIQS_CFLAGS = +TRIQS_CPPFLAGS = +TRIQS_CXXFLAGS = +TRIQS_LDFLAGS = +TRIQS_LIBS = +TRUE_CPP = cpp +VERSION = 10.0.0.83-58be4d +WANNIER90_CPPFLAGS = +WANNIER90_FCFLAGS = -I/opt/local/include +WANNIER90_LDFLAGS = +WANNIER90_LIBS = -L/opt/local/lib -lwannier +XML2_CONFIG = +XMLF90_CPPFLAGS = +XMLF90_FCFLAGS = +XMLF90_LDFLAGS = +XMLF90_LIBS = +XML_CPPFLAGS = +XML_LIBS = +XPP = +XPPFLAGS = +XPPFLAGS_DEBUG = +XPPFLAGS_EXTRA = +XPPFLAGS_OPTIM = +YAKL_CPPFLAGS = +YAKL_FCFLAGS = +YAKL_LDFLAGS = +YAKL_LIBS = +abi_ac_distcheck = --with-config-file="/Users/gonze/_Research/ABINIT_git/gonze/mac-1P0-225.ac9" +abi_ac_version = 027100 +abi_am_version = 011603 +abi_avx_safe_mode_enable = no +abi_bse_unpacked_enable = no +abi_cc_path = +abi_cc_vendor = gnu +abi_cc_version = 9.4 +abi_cclock_enable = no +abi_cpp_path = +abi_cpu_64bits = yes +abi_cpu_bits = 64 +abi_cpu_model = unknown +abi_cpu_platform = apple +abi_cpu_spec = unknown_unknown +abi_cpu_vendor = unknown +abi_crpa_optim_enable = no +abi_cxx_path = +abi_cxx_vendor = gnu +abi_cxx_version = 9.4 +abi_debug_flavor = basic +abi_exports_enable = no +abi_fbk_abinit_common_ok = no +abi_fbk_bigdft_ok = disabled +abi_fbk_config = +abi_fbk_enable = no +abi_fbk_fft_ok = no +abi_fbk_fftw3_ok = no +abi_fbk_gpu_ok = no +abi_fbk_hdf5_ok = disabled +abi_fbk_init = def +abi_fbk_kokkos_ok = no +abi_fbk_levmar_ok = no +abi_fbk_libpaw_ok = no +abi_fbk_libpsml_ok = disabled +abi_fbk_libxc_ok = disabled +abi_fbk_libxml2_ok = no +abi_fbk_linalg_ok = disabled +abi_fbk_list = +abi_fbk_mpi_ok = no +abi_fbk_netcdf_fortran_ok = disabled +abi_fbk_netcdf_ok = disabled +abi_fbk_papi_ok = no +abi_fbk_pfft_ok = no +abi_fbk_prefix = +abi_fbk_required = +abi_fbk_triqs_ok = no +abi_fbk_wannier90_ok = disabled +abi_fbk_xmlf90_ok = disabled +abi_fbk_yakl_ok = no +abi_fc_path = +abi_fc_vendor = gnu +abi_fc_version = 9.4 +abi_fc_wrap = no +abi_fc_wrapper_enable = no +abi_fpp_path = +abi_gpu_arch = +abi_gpu_fcflags = +abi_gpu_flavor = none +abi_gpu_hip_libdir = +abi_gpu_incs = +abi_gpu_ldflags = +abi_gpu_libs = +abi_gpu_nvtx_v3 = +abi_gpu_roctx = +abi_gw_dpc_enable = yes +abi_hints_enable = yes +abi_libtetra_enable = yes +abi_libxml2_cppflags = +abi_libxml2_enable = no +abi_libxml2_fcflags = +abi_libxml2_init = def +abi_libxml2_ldflags = +abi_libxml2_libs = +abi_libxml2_ok = unknown +abi_libxml2_prefix = +abi_lotf_enable = no +abi_lt_version = 020406 +abi_m4_version = 010419 +abi_memory_profiling_enable = no +abi_mpi_cflags = +abi_mpi_cppflags = +abi_mpi_cxxflags = +abi_mpi_enable = yes +abi_mpi_fcflags = +abi_mpi_flavor = auto +abi_mpi_gpu_aware_enable = no +abi_mpi_incs = +abi_mpi_inplace_enable = yes +abi_mpi_interfaces_bugfix_enable = no +abi_mpi_io_default_enable = no +abi_mpi_io_enable = yes +abi_mpi_ldflags = +abi_mpi_level = 2 +abi_mpi_libs = +abi_netcdf_default_enable = no +abi_openmp_enable = no +abi_openmp_offload_enable = no +abi_optim_flavor = standard +abi_python_invocation_enable = no +abi_source_debug_enable = no +abi_stdin_enable = yes +abi_sys_spec = darwin-x86_64 +abi_timer_enable = yes +abi_triqs_v1_4_enable = no +abi_triqs_v2_0_enable = no +abi_zdot_bugfix_enable = no +abinit_bindir = /usr/local/bin +abinit_builddir = /Users/gonze/_Research/ABINIT_git/gonze +abinit_chkdir = /usr/local/share/abinit/tests +abinit_datdir = /usr/local/share/abinit +abinit_docdir = /usr/local/doc/abinit +abinit_incdir = /usr/local/include +abinit_libdir = /usr/local/lib +abinit_mandir = /usr/local/share/man +abinit_prefix = /usr/local +abinit_srcdir = /Users/gonze/_Research/ABINIT_git/gonze +abs_builddir = /Users/gonze/_Research/ABINIT_git/gonze/shared/common/src/14_hidewrite +abs_srcdir = /Users/gonze/_Research/ABINIT_git/gonze/shared/common/src/14_hidewrite +abs_top_builddir = /Users/gonze/_Research/ABINIT_git/gonze +abs_top_srcdir = /Users/gonze/_Research/ABINIT_git/gonze +ac_ct_CC = +ac_ct_CXX = +ac_ct_FC = +am__include = include +am__leading_dot = . +am__quote = +am__tar = tar --format=ustar -chf - "$$tardir" +am__untar = tar -xf - +bindir = ${exec_prefix}/bin +build = x86_64-apple-darwin18.7.0 +build_alias = +build_cpu = x86_64 +build_os = darwin18.7.0 +build_vendor = apple +builddir = . +cc_info_string = gcc-mp-9 (MacPorts gcc9 9.4.0_0) 9.4.0 +cxx_info_string = g++-mp-9 (MacPorts gcc9 9.4.0_0) 9.4.0 +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +enable_avx_safe_mode = +enable_bse_unpacked = +enable_cclock = +enable_crpa_optim = +enable_exports = +enable_fc_wrapper = +enable_gw_dpc = yes +enable_hints = +enable_libtetra = +enable_lotf = +enable_memory_profiling = +enable_mpi_gpu_aware = +enable_mpi_inplace = +enable_mpi_interfaces_bugfix = +enable_mpi_io = yes +enable_mpi_io_default = +enable_netcdf_default = +enable_openmp = +enable_openmp_offload = +enable_python_invocation = +enable_shared = +enable_source_debug = +enable_static = +enable_stdin = +enable_timer = +enable_triqs_v1_4 = +enable_triqs_v2_0 = +enable_zdot_bugfix = +exec_prefix = ${prefix} +fc_info_string = GNU Fortran (MacPorts gcc9 9.4.0_0) 9.4.0 +fc_mod_fcflags = +fc_timing = standard +fcflags_opt_02_clib = +fcflags_opt_10_defs = +fcflags_opt_11_memory_mpi = +fcflags_opt_12_hide_mpi = +fcflags_opt_14_hidewrite = +fcflags_opt_16_hideleave = +fcflags_opt_16_kokkos_toolbox = +fcflags_opt_17_gpu_toolbox = +fcflags_opt_17_libtetra_ext = +fcflags_opt_17_minimax = +fcflags_opt_17_yaml_out = +fcflags_opt_18_timing = +fcflags_opt_21_hashfuncs = +fcflags_opt_27_toolbox_oop = +fcflags_opt_28_numeric_noabirule = +fcflags_opt_29_kpoints = +fcflags_opt_32_util = +fcflags_opt_33_xc_lowlevel = +fcflags_opt_39_libpaw = +fcflags_opt_41_geometry = +fcflags_opt_42_nlstrain = +fcflags_opt_42_parser = +fcflags_opt_43_ptgroups = -O0 +fcflags_opt_43_wvl_wrappers = +fcflags_opt_44_abitools = +fcflags_opt_44_abitypes_defs = +fcflags_opt_44_manage_kokkos = +fcflags_opt_45_geomoptim = +fcflags_opt_45_xgTools = +fcflags_opt_46_ghc_omp = +fcflags_opt_46_manage_cuda = +fcflags_opt_48_diago = +fcflags_opt_49_gw_toolbox_oop = +fcflags_opt_51_manage_mpi = +fcflags_opt_52_fft_mpi_noabirule = +fcflags_opt_53_ffts = +fcflags_opt_54_spacepar = +fcflags_opt_55_abiutil = +fcflags_opt_56_io_mpi = +fcflags_opt_56_mixing = +fcflags_opt_56_recipspace = +fcflags_opt_56_xc = +fcflags_opt_57_iopsp_parser = +fcflags_opt_57_iovars = +fcflags_opt_61_occeig = +fcflags_opt_62_cg_noabirule = +fcflags_opt_62_ctqmc = +fcflags_opt_62_iowfdenpot = +fcflags_opt_62_poisson = +fcflags_opt_62_wvl_wfs = +fcflags_opt_64_psp = +fcflags_opt_65_lotf_base = +fcflags_opt_65_paw = +fcflags_opt_66_nonlocal = +fcflags_opt_66_vdwxc = +fcflags_opt_66_wfs = +fcflags_opt_67_common = +fcflags_opt_67_python_invocation_ext = +fcflags_opt_67_triqs_ext = +fcflags_opt_68_dmft = +fcflags_opt_68_lotf = +fcflags_opt_68_recursion = +fcflags_opt_68_rsprc = +fcflags_opt_69_wfdesc = +fcflags_opt_70_gw = +fcflags_opt_71_bse = +fcflags_opt_71_wannier = +fcflags_opt_72_response = +fcflags_opt_77_ddb = +fcflags_opt_77_suscep = +fcflags_opt_78_effpot = +fcflags_opt_78_eph = +fcflags_opt_79_seqpar_mpi = +fcflags_opt_80_rttddft = +fcflags_opt_80_tdep = +fcflags_opt_94_scfcv = +fcflags_opt_95_drive = +fcflags_opt_98_main = +fcflags_opt_bigdft = +fcflags_opt_default = +fcflags_opt_hdf5 = +fcflags_opt_levmar = +fcflags_opt_libpsml = +fcflags_opt_libxc = +fcflags_opt_libxml2 = +fcflags_opt_linalg = +fcflags_opt_netcdf = +fcflags_opt_netcdf_fortran = +fcflags_opt_papi = +fcflags_opt_triqs = +fcflags_opt_wannier90 = +fcflags_opt_xmlf90 = +host = x86_64-apple-darwin18.7.0 +host_alias = +host_cpu = x86_64 +host_os = darwin18.7.0 +host_vendor = apple +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = ${SHELL} /Users/gonze/_Research/ABINIT_git/gonze/config/gnu/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = ${datarootdir}/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = $(MKDIR_P) +oldincludedir = /usr/include +pdfdir = ${docdir} +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +runstatedir = ${localstatedir}/run +sbindir = ${exec_prefix}/sbin +sd_abinit_common_cppflags = +sd_abinit_common_enable = no +sd_abinit_common_enable_def = no +sd_abinit_common_fcflags = +sd_abinit_common_init = def +sd_abinit_common_ldflags = +sd_abinit_common_libs = +sd_abinit_common_ok = unknown +sd_abinit_common_options = optional skip +sd_abinit_common_policy = skip +sd_abinit_common_status = optional +sd_bigdft_cppflags = +sd_bigdft_enable = no +sd_bigdft_enable_def = no +sd_bigdft_fcflags = +sd_bigdft_init = def +sd_bigdft_ldflags = +sd_bigdft_libs = +sd_bigdft_ok = unknown +sd_bigdft_options = optional warn +sd_bigdft_policy = warn +sd_bigdft_status = optional +sd_fft_cflags = +sd_fft_choices = +sd_fft_cppflags = -I/opt/local/include +sd_fft_cxxflags = +sd_fft_enable = yes +sd_fft_fcflags = -I/opt/local/include +sd_fft_flavor = fftw3 +sd_fft_init = kwd +sd_fft_ldflags = +sd_fft_libs = -L/opt/local/lib -lfftw3 -lfftw3f +sd_fft_ok = yes +sd_fftw3_cflags = +sd_fftw3_cppflags = -I/opt/local/include +sd_fftw3_enable = yes +sd_fftw3_enable_def = no +sd_fftw3_fcflags = -I/opt/local/include +sd_fftw3_init = env +sd_fftw3_ldflags = +sd_fftw3_libs = -L/opt/local/lib -lfftw3 -lfftw3f +sd_fftw3_ok = yes +sd_fftw3_options = optional skip +sd_fftw3_policy = skip +sd_fftw3_status = optional +sd_gpu_cflags = +sd_gpu_cppflags = +sd_gpu_cxxflags = +sd_gpu_enable = no +sd_gpu_enable_def = no +sd_gpu_fcflags = +sd_gpu_init = def +sd_gpu_ldflags = +sd_gpu_libs = +sd_gpu_ok = no +sd_gpu_options = optional warn +sd_gpu_policy = warn +sd_gpu_prefix = +sd_gpu_status = optional +sd_hdf5_cflags = +sd_hdf5_cppflags = -I/opt/local/include -I/opt/local/include +sd_hdf5_cxxflags = +sd_hdf5_enable = yes +sd_hdf5_enable_def = yes +sd_hdf5_enable_fc = no +sd_hdf5_fcflags = +sd_hdf5_h5cc = /opt/local/bin/h5cc +sd_hdf5_h5fc = +sd_hdf5_init = dir +sd_hdf5_ldflags = +sd_hdf5_libs = -L/opt/local/lib -L/opt/local/lib -lhdf5_hl -L/opt/local/lib -lhdf5 -lz -ldl -lm +sd_hdf5_ok = yes +sd_hdf5_options = required no-fortran warn +sd_hdf5_policy = warn +sd_hdf5_status = required +sd_kokkos_cppflags = +sd_kokkos_cxxflags = +sd_kokkos_enable = no +sd_kokkos_enable_def = no +sd_kokkos_init = def +sd_kokkos_ldflags = +sd_kokkos_libs = +sd_kokkos_ok = unknown +sd_kokkos_options = optional fail +sd_kokkos_policy = fail +sd_kokkos_status = optional +sd_levmar_cflags = +sd_levmar_cppflags = +sd_levmar_enable = no +sd_levmar_enable_def = no +sd_levmar_init = def +sd_levmar_ldflags = +sd_levmar_libs = +sd_levmar_ok = unknown +sd_levmar_options = optional fail +sd_levmar_policy = fail +sd_levmar_status = optional +sd_libpaw_cppflags = +sd_libpaw_enable = no +sd_libpaw_enable_def = no +sd_libpaw_fcflags = +sd_libpaw_init = def +sd_libpaw_ldflags = +sd_libpaw_libs = +sd_libpaw_ok = unknown +sd_libpaw_options = optional skip +sd_libpaw_policy = skip +sd_libpaw_status = optional +sd_libpsml_cppflags = +sd_libpsml_enable = no +sd_libpsml_enable_def = no +sd_libpsml_fcflags = +sd_libpsml_init = def +sd_libpsml_ldflags = +sd_libpsml_libs = +sd_libpsml_ok = unknown +sd_libpsml_options = optional warn +sd_libpsml_policy = warn +sd_libpsml_status = optional +sd_libxc_cflags = +sd_libxc_cppflags = -I/opt/local/include +sd_libxc_enable = yes +sd_libxc_enable_def = yes +sd_libxc_enable_fc = no +sd_libxc_fcflags = +sd_libxc_init = dir +sd_libxc_ldflags = +sd_libxc_libs = -L/opt/local/lib -lxc +sd_libxc_ok = yes +sd_libxc_options = required no-fortran warn +sd_libxc_policy = warn +sd_libxc_status = required +sd_linalg_cflags = +sd_linalg_choices = +sd_linalg_cppflags = +sd_linalg_cxxflags = +sd_linalg_enable = yes +sd_linalg_fcflags = -I/opt/local/include +sd_linalg_flavor = openblas +sd_linalg_has_elpa = no +sd_linalg_has_scalapack = no +sd_linalg_init = env +sd_linalg_ldflags = +sd_linalg_libs = -L/opt/local/lib -lopenblas +sd_linalg_ok = yes +sd_mpi_cc = /opt/local/bin/mpicc +sd_mpi_cflags = +sd_mpi_cppflags = -I/opt/local/include +sd_mpi_cxx = /opt/local/bin/mpicxx +sd_mpi_enable = yes +sd_mpi_enable_cxx = yes +sd_mpi_enable_def = auto +sd_mpi_enable_fc = yes +sd_mpi_fc = /opt/local/bin/mpif90 +sd_mpi_fcflags = -I/opt/local/include +sd_mpi_init = dir +sd_mpi_ldflags = +sd_mpi_libs = +sd_mpi_ok = yes +sd_mpi_options = auto optional fail +sd_mpi_policy = fail +sd_mpi_status = optional +sd_netcdf_cflags = +sd_netcdf_cppflags = -I/opt/local/include +sd_netcdf_enable = yes +sd_netcdf_enable_def = yes +sd_netcdf_fcflags = -I/opt/local/include +sd_netcdf_fortran_cflags = +sd_netcdf_fortran_cppflags = -I/opt/local/include +sd_netcdf_fortran_enable = yes +sd_netcdf_fortran_enable_def = yes +sd_netcdf_fortran_fcflags = -I/opt/local/include +sd_netcdf_fortran_init = dir +sd_netcdf_fortran_ldflags = +sd_netcdf_fortran_libs = -L/opt/local/lib -lnetcdff +sd_netcdf_fortran_ok = yes +sd_netcdf_fortran_options = required warn +sd_netcdf_fortran_policy = warn +sd_netcdf_fortran_status = required +sd_netcdf_init = dir +sd_netcdf_ldflags = +sd_netcdf_libs = -L/opt/local/lib -lnetcdf +sd_netcdf_ok = yes +sd_netcdf_options = required warn +sd_netcdf_policy = warn +sd_netcdf_status = required +sd_papi_cflags = +sd_papi_cppflags = +sd_papi_enable = no +sd_papi_enable_def = no +sd_papi_init = def +sd_papi_ldflags = +sd_papi_libs = +sd_papi_ok = unknown +sd_papi_options = optional fail +sd_papi_policy = fail +sd_papi_sd_papi_fcflags = +sd_papi_status = optional +sd_pfft_cflags = +sd_pfft_cppflags = +sd_pfft_enable = no +sd_pfft_enable_def = no +sd_pfft_init = def +sd_pfft_ldflags = +sd_pfft_libs = +sd_pfft_ok = unknown +sd_pfft_options = optional skip +sd_pfft_policy = skip +sd_pfft_status = optional +sd_sys_fcflags = +sd_triqs_cflags = +sd_triqs_cppflags = +sd_triqs_cxxflags = +sd_triqs_enable = no +sd_triqs_enable_def = no +sd_triqs_fcflags = +sd_triqs_init = def +sd_triqs_ldflags = +sd_triqs_libs = +sd_triqs_ok = unknown +sd_triqs_options = optional fail +sd_triqs_policy = fail +sd_triqs_status = optional +sd_wannier90_cppflags = +sd_wannier90_enable = yes +sd_wannier90_enable_def = no +sd_wannier90_fcflags = -I/opt/local/include +sd_wannier90_init = env +sd_wannier90_ldflags = +sd_wannier90_libs = -L/opt/local/lib -lwannier +sd_wannier90_ok = yes +sd_wannier90_options = optional warn +sd_wannier90_policy = warn +sd_wannier90_status = optional +sd_xmlf90_cppflags = +sd_xmlf90_enable = no +sd_xmlf90_enable_def = no +sd_xmlf90_fcflags = +sd_xmlf90_init = def +sd_xmlf90_ldflags = +sd_xmlf90_libs = +sd_xmlf90_ok = unknown +sd_xmlf90_options = optional warn +sd_xmlf90_policy = warn +sd_xmlf90_status = optional +sd_yakl_cppflags = +sd_yakl_enable = no +sd_yakl_enable_def = no +sd_yakl_fcflags = +sd_yakl_init = def +sd_yakl_ldflags = +sd_yakl_libs = +sd_yakl_ok = unknown +sd_yakl_options = optional fail +sd_yakl_policy = fail +sd_yakl_status = optional +sharedstatedir = ${prefix}/com +src_02_clib_fcflags = -I$(top_builddir)/shared/common/src/02_clib -I$(top_srcdir)/shared/common/src/02_clib +src_10_defs_fcflags = -I$(top_builddir)/shared/common/src/10_defs -I$(top_srcdir)/shared/common/src/10_defs +src_11_memory_mpi_fcflags = -I$(top_builddir)/shared/common/src/11_memory_mpi -I$(top_srcdir)/shared/common/src/11_memory_mpi +src_12_hide_mpi_fcflags = -I$(top_builddir)/shared/common/src/12_hide_mpi -I$(top_srcdir)/shared/common/src/12_hide_mpi +src_14_hidewrite_fcflags = -I$(top_builddir)/shared/common/src/14_hidewrite -I$(top_srcdir)/shared/common/src/14_hidewrite +src_16_hideleave_fcflags = -I$(top_builddir)/shared/common/src/16_hideleave -I$(top_srcdir)/shared/common/src/16_hideleave +src_16_kokkos_toolbox_fcflags = -I$(top_builddir)/shared/common/src/16_kokkos_toolbox -I$(top_srcdir)/shared/common/src/16_kokkos_toolbox +src_17_gpu_toolbox_fcflags = -I$(top_builddir)/shared/common/src/17_gpu_toolbox -I$(top_srcdir)/shared/common/src/17_gpu_toolbox +src_17_libtetra_ext_fcflags = -I$(top_builddir)/shared/common/src/17_libtetra_ext -I$(top_srcdir)/shared/common/src/17_libtetra_ext +src_17_minimax_fcflags = -I$(top_builddir)/shared/common/src/17_minimax -I$(top_srcdir)/shared/common/src/17_minimax +src_17_yaml_out_fcflags = -I$(top_builddir)/shared/common/src/17_yaml_out -I$(top_srcdir)/shared/common/src/17_yaml_out +src_18_timing_fcflags = -I$(top_builddir)/shared/common/src/18_timing -I$(top_srcdir)/shared/common/src/18_timing +src_21_hashfuncs_fcflags = -I$(top_builddir)/shared/common/src/21_hashfuncs -I$(top_srcdir)/shared/common/src/21_hashfuncs +src_27_toolbox_oop_fcflags = -I$(top_builddir)/shared/common/src/27_toolbox_oop -I$(top_srcdir)/shared/common/src/27_toolbox_oop +src_28_numeric_noabirule_fcflags = -I$(top_builddir)/shared/common/src/28_numeric_noabirule -I$(top_srcdir)/shared/common/src/28_numeric_noabirule +src_29_kpoints_fcflags = -I$(top_builddir)/shared/common/src/29_kpoints -I$(top_srcdir)/shared/common/src/29_kpoints +src_32_util_fcflags = -I$(top_builddir)/shared/common/src/32_util -I$(top_srcdir)/shared/common/src/32_util +src_33_xc_lowlevel_fcflags = -I$(top_builddir)/shared/common/src/33_xc_lowlevel -I$(top_srcdir)/shared/common/src/33_xc_lowlevel +src_39_libpaw_fcflags = -I$(top_builddir)/shared/libpaw/src -I$(top_srcdir)/shared/libpaw/src +src_41_geometry_fcflags = -I$(top_builddir)/src/41_geometry -I$(top_srcdir)/src/41_geometry +src_42_nlstrain_fcflags = -I$(top_builddir)/src/42_nlstrain -I$(top_srcdir)/src/42_nlstrain +src_42_parser_fcflags = -I$(top_builddir)/src/42_parser -I$(top_srcdir)/src/42_parser +src_43_ptgroups_fcflags = -I$(top_builddir)/src/43_ptgroups -I$(top_srcdir)/src/43_ptgroups +src_43_wvl_wrappers_fcflags = -I$(top_builddir)/src/43_wvl_wrappers -I$(top_srcdir)/src/43_wvl_wrappers +src_44_abitools_fcflags = -I$(top_builddir)/src/44_abitools -I$(top_srcdir)/src/44_abitools +src_44_abitypes_defs_fcflags = -I$(top_builddir)/src/44_abitypes_defs -I$(top_srcdir)/src/44_abitypes_defs +src_44_manage_kokkos_fcflags = -I$(top_builddir)/src/44_manage_kokkos -I$(top_srcdir)/src/44_manage_kokkos +src_45_geomoptim_fcflags = -I$(top_builddir)/src/45_geomoptim -I$(top_srcdir)/src/45_geomoptim +src_45_xgTools_fcflags = -I$(top_builddir)/src/45_xgTools -I$(top_srcdir)/src/45_xgTools +src_46_ghc_omp_fcflags = -I$(top_builddir)/src/46_ghc_omp -I$(top_srcdir)/src/46_ghc_omp +src_46_manage_cuda_fcflags = -I$(top_builddir)/src/46_manage_cuda -I$(top_srcdir)/src/46_manage_cuda +src_48_diago_fcflags = -I$(top_builddir)/src/48_diago -I$(top_srcdir)/src/48_diago +src_49_gw_toolbox_oop_fcflags = -I$(top_builddir)/src/49_gw_toolbox_oop -I$(top_srcdir)/src/49_gw_toolbox_oop +src_51_manage_mpi_fcflags = -I$(top_builddir)/src/51_manage_mpi -I$(top_srcdir)/src/51_manage_mpi +src_52_fft_mpi_noabirule_fcflags = -I$(top_builddir)/src/52_fft_mpi_noabirule -I$(top_srcdir)/src/52_fft_mpi_noabirule +src_53_ffts_fcflags = -I$(top_builddir)/src/53_ffts -I$(top_srcdir)/src/53_ffts +src_54_spacepar_fcflags = -I$(top_builddir)/src/54_spacepar -I$(top_srcdir)/src/54_spacepar +src_55_abiutil_fcflags = -I$(top_builddir)/src/55_abiutil -I$(top_srcdir)/src/55_abiutil +src_56_io_mpi_fcflags = -I$(top_builddir)/src/56_io_mpi -I$(top_srcdir)/src/56_io_mpi +src_56_mixing_fcflags = -I$(top_builddir)/src/56_mixing -I$(top_srcdir)/src/56_mixing +src_56_recipspace_fcflags = -I$(top_builddir)/src/56_recipspace -I$(top_srcdir)/src/56_recipspace +src_56_xc_fcflags = -I$(top_builddir)/src/56_xc -I$(top_srcdir)/src/56_xc +src_57_iopsp_parser_fcflags = -I$(top_builddir)/src/57_iopsp_parser -I$(top_srcdir)/src/57_iopsp_parser +src_57_iovars_fcflags = -I$(top_builddir)/src/57_iovars -I$(top_srcdir)/src/57_iovars +src_61_occeig_fcflags = -I$(top_builddir)/src/61_occeig -I$(top_srcdir)/src/61_occeig +src_62_cg_noabirule_fcflags = -I$(top_builddir)/src/62_cg_noabirule -I$(top_srcdir)/src/62_cg_noabirule +src_62_ctqmc_fcflags = -I$(top_builddir)/src/62_ctqmc -I$(top_srcdir)/src/62_ctqmc +src_62_iowfdenpot_fcflags = -I$(top_builddir)/src/62_iowfdenpot -I$(top_srcdir)/src/62_iowfdenpot +src_62_poisson_fcflags = -I$(top_builddir)/src/62_poisson -I$(top_srcdir)/src/62_poisson +src_62_wvl_wfs_fcflags = -I$(top_builddir)/src/62_wvl_wfs -I$(top_srcdir)/src/62_wvl_wfs +src_64_psp_fcflags = -I$(top_builddir)/src/64_psp -I$(top_srcdir)/src/64_psp +src_65_lotf_base_fcflags = -I$(top_builddir)/src/65_lotf_base -I$(top_srcdir)/src/65_lotf_base +src_65_paw_fcflags = -I$(top_builddir)/src/65_paw -I$(top_srcdir)/src/65_paw +src_66_nonlocal_fcflags = -I$(top_builddir)/src/66_nonlocal -I$(top_srcdir)/src/66_nonlocal +src_66_vdwxc_fcflags = -I$(top_builddir)/src/66_vdwxc -I$(top_srcdir)/src/66_vdwxc +src_66_wfs_fcflags = -I$(top_builddir)/src/66_wfs -I$(top_srcdir)/src/66_wfs +src_67_common_fcflags = -I$(top_builddir)/src/67_common -I$(top_srcdir)/src/67_common +src_67_python_invocation_ext_fcflags = -I$(top_builddir)/src/67_python_invocation_ext -I$(top_srcdir)/src/67_python_invocation_ext +src_67_triqs_ext_fcflags = -I$(top_builddir)/src/67_triqs_ext -I$(top_srcdir)/src/67_triqs_ext +src_68_dmft_fcflags = -I$(top_builddir)/src/68_dmft -I$(top_srcdir)/src/68_dmft +src_68_lotf_fcflags = -I$(top_builddir)/src/68_lotf -I$(top_srcdir)/src/68_lotf +src_68_recursion_fcflags = -I$(top_builddir)/src/68_recursion -I$(top_srcdir)/src/68_recursion +src_68_rsprc_fcflags = -I$(top_builddir)/src/68_rsprc -I$(top_srcdir)/src/68_rsprc +src_69_wfdesc_fcflags = -I$(top_builddir)/src/69_wfdesc -I$(top_srcdir)/src/69_wfdesc +src_70_gw_fcflags = -I$(top_builddir)/src/70_gw -I$(top_srcdir)/src/70_gw +src_71_bse_fcflags = -I$(top_builddir)/src/71_bse -I$(top_srcdir)/src/71_bse +src_71_wannier_fcflags = -I$(top_builddir)/src/71_wannier -I$(top_srcdir)/src/71_wannier +src_72_response_fcflags = -I$(top_builddir)/src/72_response -I$(top_srcdir)/src/72_response +src_77_ddb_fcflags = -I$(top_builddir)/src/77_ddb -I$(top_srcdir)/src/77_ddb +src_77_suscep_fcflags = -I$(top_builddir)/src/77_suscep -I$(top_srcdir)/src/77_suscep +src_78_effpot_fcflags = -I$(top_builddir)/src/78_effpot -I$(top_srcdir)/src/78_effpot +src_78_eph_fcflags = -I$(top_builddir)/src/78_eph -I$(top_srcdir)/src/78_eph +src_79_seqpar_mpi_fcflags = -I$(top_builddir)/src/79_seqpar_mpi -I$(top_srcdir)/src/79_seqpar_mpi +src_80_rttddft_fcflags = -I$(top_builddir)/src/80_rttddft -I$(top_srcdir)/src/80_rttddft +src_80_tdep_fcflags = -I$(top_builddir)/src/80_tdep -I$(top_srcdir)/src/80_tdep +src_94_scfcv_fcflags = -I$(top_builddir)/src/94_scfcv -I$(top_srcdir)/src/94_scfcv +src_95_drive_fcflags = -I$(top_builddir)/src/95_drive -I$(top_srcdir)/src/95_drive +src_common_fcflags = -I$(top_builddir)/shared/common/src/incs -I$(top_srcdir)/shared/common/src/incs -I$(top_builddir)/shared/common/src/mods -I$(top_srcdir)/shared/common/src/mods +src_core_fcflags = -I$(top_builddir)/src/incs -I$(top_srcdir)/src/incs -I$(top_builddir)/src/mods -I$(top_srcdir)/src/mods +src_libpaw_fcflags = -I$(top_builddir)/shared/libpaw/incs -I$(top_srcdir)/shared/libpaw/incs -I$(top_builddir)/shared/libpaw/mods -I$(top_srcdir)/shared/libpaw/mods +srcdir = . +sysconfdir = ${prefix}/etc +target = x86_64-apple-darwin18.7.0 +target_alias = +target_cpu = x86_64 +target_os = darwin18.7.0 +target_vendor = apple +top_build_prefix = ../../../../ +top_builddir = ../../../.. +top_srcdir = ../../../.. +with_abinit_common = +with_bigdft = +with_config_file = +with_debug_flavor = +with_fallbacks = +with_fc_vendor = +with_fc_version = +with_fft_flavor = fftw3 +with_fftw3 = +with_gnu_ld = +with_gpu = +with_hdf5 = /opt/local +with_kokkos = +with_levmar = +with_libpaw = +with_libpsml = +with_libxc = /opt/local +with_libxml2 = +with_linalg_flavor = openblas +with_mpi = /opt/local +with_mpi_level = +with_netcdf = /opt/local +with_optim_flavor = +with_papi = +with_pfft = +with_triqs = +with_wannier90 = +with_xmlf90 = +with_yakl = +AM_CFLAGS = -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include +AM_CXXFLAGS = $(sd_triqs_cxxflags) +AM_FCFLAGS = -ffree-form -J../mods +AM_CPPFLAGS = \ + -I$(top_builddir)/shared/common/src/10_defs -I$(top_srcdir)/shared/common/src/10_defs \ + -I$(top_builddir)/shared/common/src/11_memory_mpi -I$(top_srcdir)/shared/common/src/11_memory_mpi \ + -I$(top_builddir)/shared/common/src/12_hide_mpi -I$(top_srcdir)/shared/common/src/12_hide_mpi \ + -I$(top_builddir)/shared/common/src/14_hidewrite -I$(top_srcdir)/shared/common/src/14_hidewrite \ + -I$(top_builddir)/shared/common/src/incs -I$(top_srcdir)/shared/common/src/incs -I$(top_builddir)/shared/common/src/mods -I$(top_srcdir)/shared/common/src/mods \ + -I$(top_builddir)/src/incs -I$(top_srcdir)/src/incs -I$(top_builddir)/src/mods -I$(top_srcdir)/src/mods \ + -I$(top_builddir)/shared/libpaw/incs -I$(top_srcdir)/shared/libpaw/incs -I$(top_builddir)/shared/libpaw/mods -I$(top_srcdir)/shared/libpaw/mods \ + -I/opt/local/include \ + -I/opt/local/include \ + + + +# Regular source files +lib14_hidewrite_srcs = \ + m_abicore.F90 \ + m_cppopts_dumper.F90 \ + m_fstrings.F90 \ + m_io_tools.F90 \ + m_specialmsg.F90 + + +# Source files depending on conditionals + +# Source files built by scripts +lib14_hidewrite_srcs_built = \ + m_build_info.F90 \ + m_optim_dumper.F90 + + +# Library description +noinst_LIBRARIES = lib14_hidewrite.a +lib14_hidewrite_a_SOURCES = $(lib14_hidewrite_srcs) +nodist_lib14_hidewrite_a_SOURCES = $(lib14_hidewrite_srcs_built) + +# Dependencies (inside the directory) of directory 14_hidewrite +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. +CLEANFILES = m_abicore_cpp.f90 m_build_info_cpp.f90 \ + m_cppopts_dumper_cpp.f90 m_fstrings_cpp.f90 m_io_tools_cpp.f90 \ + m_optim_dumper_cpp.f90 m_specialmsg_cpp.f90 \ + m_abicore.$(MODEXT) m_build_info.in.$(MODEXT) \ + m_cppopts_dumper.$(MODEXT) m_fstrings.$(MODEXT) \ + m_io_tools.$(MODEXT) m_optim_dumper.in.$(MODEXT) \ + m_specialmsg.$(MODEXT) m_build_info.$(MODEXT) +DISTCLEANFILES = \ + m_build_info.F90 \ + m_optim_dumper.F90 + +EXTRA_DIST = abinit.src abinit.dep m_build_info.F90.in \ + m_optim_dumper.F90.in abinit.amf _14_hidewrite_ +all: all-am + +.SUFFIXES: +.SUFFIXES: .F90 .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu shared/common/src/14_hidewrite/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu shared/common/src/14_hidewrite/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +m_build_info.F90: $(top_builddir)/config.status $(srcdir)/m_build_info.F90.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) + +lib14_hidewrite.a: $(lib14_hidewrite_a_OBJECTS) $(lib14_hidewrite_a_DEPENDENCIES) $(EXTRA_lib14_hidewrite_a_DEPENDENCIES) + $(AM_V_at)-rm -f lib14_hidewrite.a + $(AM_V_AR)$(lib14_hidewrite_a_AR) lib14_hidewrite.a $(lib14_hidewrite_a_OBJECTS) $(lib14_hidewrite_a_LIBADD) + $(AM_V_at)$(RANLIB) lib14_hidewrite.a + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +.F90.o: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ $< + +.F90.obj: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-noinstLIBRARIES cscopelist-am ctags ctags-am distclean \ + distclean-compile distclean-generic distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am + +.PRECIOUS: Makefile + + +m_abicore.$(OBJEXT): m_specialmsg.$(OBJEXT) + +m_specialmsg.$(OBJEXT): m_build_info.$(OBJEXT) m_io_tools.$(OBJEXT) + +m_abicore.$(OBJEXT) m_specialmsg.$(OBJEXT): m_build_info.$(OBJEXT) + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/GX-PAW/common/src/14_hidewrite/Makefile.am b/GX-PAW/common/src/14_hidewrite/Makefile.am new file mode 100644 index 00000000..53510c58 --- /dev/null +++ b/GX-PAW/common/src/14_hidewrite/Makefile.am @@ -0,0 +1,96 @@ +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-corelibs on 2024/03/16 21:07:38 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-corelibs script or its config file instead. +# + +AM_CFLAGS = @ABI_CPPFLAGS@ +AM_CXXFLAGS = $(sd_triqs_cxxflags) +AM_FCFLAGS = @FPPFLAGS@ @FCFLAGS_FREEFORM@ @FCFLAGS_MODDIR@ @sd_sys_fcflags@ @fcflags_opt_14_hidewrite@ + +AM_CPPFLAGS = \ + @src_10_defs_fcflags@ \ + @src_11_memory_mpi_fcflags@ \ + @src_12_hide_mpi_fcflags@ \ + @src_14_hidewrite_fcflags@ \ + @src_common_fcflags@ \ + @src_core_fcflags@ \ + @src_libpaw_fcflags@ \ + @sd_mpi_cppflags@ \ + @sd_mpi_fcflags@ \ + @fc_mod_fcflags@ + +# Regular source files +lib14_hidewrite_srcs = \ + m_abicore.F90 \ + m_cppopts_dumper.F90 \ + m_fstrings.F90 \ + m_io_tools.F90 \ + m_specialmsg.F90 + +# Source files depending on conditionals + + +# Source files built by scripts +lib14_hidewrite_srcs_built = \ + m_build_info.F90 \ + m_optim_dumper.F90 + +# Library description +noinst_LIBRARIES = lib14_hidewrite.a + +lib14_hidewrite_a_SOURCES= $(lib14_hidewrite_srcs) +nodist_lib14_hidewrite_a_SOURCES = $(lib14_hidewrite_srcs_built) + +CLEANFILES = \ + m_abicore_cpp.f90 \ + m_build_info_cpp.f90 \ + m_cppopts_dumper_cpp.f90 \ + m_fstrings_cpp.f90 \ + m_io_tools_cpp.f90 \ + m_optim_dumper_cpp.f90 \ + m_specialmsg_cpp.f90 + +DISTCLEANFILES = \ + m_build_info.F90 \ + m_optim_dumper.F90 + +EXTRA_DIST = abinit.src + +EXTRA_DIST += abinit.dep + +# Dependencies (inside the directory) of directory 14_hidewrite +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. + +CLEANFILES += \ + m_abicore.$(MODEXT) \ + m_build_info.in.$(MODEXT) \ + m_cppopts_dumper.$(MODEXT) \ + m_fstrings.$(MODEXT) \ + m_io_tools.$(MODEXT) \ + m_optim_dumper.in.$(MODEXT) \ + m_specialmsg.$(MODEXT) + +m_abicore.$(OBJEXT): m_specialmsg.$(OBJEXT) + +m_specialmsg.$(OBJEXT): m_build_info.$(OBJEXT) m_io_tools.$(OBJEXT) + +EXTRA_DIST += \ + m_build_info.F90.in \ + m_optim_dumper.F90.in + +EXTRA_DIST += abinit.amf + +CLEANFILES += m_build_info.$(MODEXT) + +m_abicore.$(OBJEXT) m_specialmsg.$(OBJEXT): m_build_info.$(OBJEXT) + +EXTRA_DIST += _14_hidewrite_ diff --git a/GX-PAW/common/src/14_hidewrite/Makefile.in b/GX-PAW/common/src/14_hidewrite/Makefile.in new file mode 100644 index 00000000..c3e32f7f --- /dev/null +++ b/GX-PAW/common/src/14_hidewrite/Makefile.in @@ -0,0 +1,1493 @@ +# Makefile.in generated by automake 1.16.3 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2020 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-corelibs on 2024/03/16 21:07:38 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-corelibs script or its config file instead. +# + +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = shared/common/src/14_hidewrite +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/m4/arch-gpu.m4 \ + $(top_srcdir)/config/m4/arch-mpi.m4 \ + $(top_srcdir)/config/m4/auto-autotools.m4 \ + $(top_srcdir)/config/m4/auto-corelibs.m4 \ + $(top_srcdir)/config/m4/auto-debug.m4 \ + $(top_srcdir)/config/m4/auto-dirflags.m4 \ + $(top_srcdir)/config/m4/auto-env.m4 \ + $(top_srcdir)/config/m4/auto-hints.m4 \ + $(top_srcdir)/config/m4/auto-optim.m4 \ + $(top_srcdir)/config/m4/auto-options.m4 \ + $(top_srcdir)/config/m4/auto-output.m4 \ + $(top_srcdir)/config/m4/auto-triggers.m4 \ + $(top_srcdir)/config/m4/conf-atompaw.m4 \ + $(top_srcdir)/config/m4/conf-debug.m4 \ + $(top_srcdir)/config/m4/conf-fallbacks.m4 \ + $(top_srcdir)/config/m4/conf-files.m4 \ + $(top_srcdir)/config/m4/conf-init.m4 \ + $(top_srcdir)/config/m4/conf-openmp.m4 \ + $(top_srcdir)/config/m4/conf-optim.m4 \ + $(top_srcdir)/config/m4/lang-c++.m4 \ + $(top_srcdir)/config/m4/lang-c.m4 \ + $(top_srcdir)/config/m4/lang-fortran-import.m4 \ + $(top_srcdir)/config/m4/lang-fortran.m4 \ + $(top_srcdir)/config/m4/lang-python.m4 \ + $(top_srcdir)/config/m4/libxml2.m4 \ + $(top_srcdir)/config/m4/misc-display.m4 \ + $(top_srcdir)/config/m4/sd_abinit_common.m4 \ + $(top_srcdir)/config/m4/sd_arch_gpu.m4 \ + $(top_srcdir)/config/m4/sd_arch_mpi.m4 \ + $(top_srcdir)/config/m4/sd_bigdft.m4 \ + $(top_srcdir)/config/m4/sd_core.m4 \ + $(top_srcdir)/config/m4/sd_esl.m4 \ + $(top_srcdir)/config/m4/sd_fftw3.m4 \ + $(top_srcdir)/config/m4/sd_gpu_kokkos.m4 \ + $(top_srcdir)/config/m4/sd_gpu_yakl.m4 \ + $(top_srcdir)/config/m4/sd_io_hdf5.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf_fortran.m4 \ + $(top_srcdir)/config/m4/sd_levmar.m4 \ + $(top_srcdir)/config/m4/sd_libpaw.m4 \ + $(top_srcdir)/config/m4/sd_libpsml.m4 \ + $(top_srcdir)/config/m4/sd_libxc.m4 \ + $(top_srcdir)/config/m4/sd_math_fft.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_core.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_util.m4 \ + $(top_srcdir)/config/m4/sd_papi.m4 \ + $(top_srcdir)/config/m4/sd_pfft.m4 \ + $(top_srcdir)/config/m4/sd_triqs.m4 \ + $(top_srcdir)/config/m4/sd_wannier90.m4 \ + $(top_srcdir)/config/m4/sd_xmlf90.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = m_build_info.F90 +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = +lib14_hidewrite_a_AR = $(AR) $(ARFLAGS) +lib14_hidewrite_a_LIBADD = +am__objects_1 = m_abicore.$(OBJEXT) m_cppopts_dumper.$(OBJEXT) \ + m_fstrings.$(OBJEXT) m_io_tools.$(OBJEXT) \ + m_specialmsg.$(OBJEXT) +am_lib14_hidewrite_a_OBJECTS = $(am__objects_1) +am__objects_2 = m_build_info.$(OBJEXT) m_optim_dumper.$(OBJEXT) +nodist_lib14_hidewrite_a_OBJECTS = $(am__objects_2) +lib14_hidewrite_a_OBJECTS = $(am_lib14_hidewrite_a_OBJECTS) \ + $(nodist_lib14_hidewrite_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +PPFCCOMPILE = $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) +AM_V_PPFC = $(am__v_PPFC_@AM_V@) +am__v_PPFC_ = $(am__v_PPFC_@AM_DEFAULT_V@) +am__v_PPFC_0 = @echo " PPFC " $@; +am__v_PPFC_1 = +FCLD = $(FC) +FCLINK = $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \ + $@ +AM_V_FCLD = $(am__v_FCLD_@AM_V@) +am__v_FCLD_ = $(am__v_FCLD_@AM_DEFAULT_V@) +am__v_FCLD_0 = @echo " FCLD " $@; +am__v_FCLD_1 = +SOURCES = $(lib14_hidewrite_a_SOURCES) \ + $(nodist_lib14_hidewrite_a_SOURCES) +DIST_SOURCES = $(lib14_hidewrite_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/m_build_info.F90.in +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ABINIT_BINARY_PACKAGE = @ABINIT_BINARY_PACKAGE@ +ABINIT_COMMON_CPPFLAGS = @ABINIT_COMMON_CPPFLAGS@ +ABINIT_COMMON_FCFLAGS = @ABINIT_COMMON_FCFLAGS@ +ABINIT_COMMON_LDFLAGS = @ABINIT_COMMON_LDFLAGS@ +ABINIT_COMMON_LIBS = @ABINIT_COMMON_LIBS@ +ABINIT_TARGET = @ABINIT_TARGET@ +ABINIT_VERSION = @ABINIT_VERSION@ +ABINIT_VERSION_BASE = @ABINIT_VERSION_BASE@ +ABINIT_VERSION_BUILD = @ABINIT_VERSION_BUILD@ +ABINIT_VERSION_MAJOR = @ABINIT_VERSION_MAJOR@ +ABINIT_VERSION_MICRO = @ABINIT_VERSION_MICRO@ +ABINIT_VERSION_MINOR = @ABINIT_VERSION_MINOR@ +ABI_CPPFLAGS = @ABI_CPPFLAGS@ +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +ARFLAGS = @ARFLAGS@ +ARFLAGS_CMD = @ARFLAGS_CMD@ +ARFLAGS_DEBUG = @ARFLAGS_DEBUG@ +ARFLAGS_EXTRA = @ARFLAGS_EXTRA@ +ARFLAGS_HINTS = @ARFLAGS_HINTS@ +ARFLAGS_OPTIM = @ARFLAGS_OPTIM@ +ATOMPAW_BIN = @ATOMPAW_BIN@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BIGDFT_CPPFLAGS = @BIGDFT_CPPFLAGS@ +BIGDFT_FCFLAGS = @BIGDFT_FCFLAGS@ +BIGDFT_LDFLAGS = @BIGDFT_LDFLAGS@ +BIGDFT_LIBS = @BIGDFT_LIBS@ +BOURNE_SHELL = @BOURNE_SHELL@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CC_LDFLAGS = @CC_LDFLAGS@ +CC_LDFLAGS_DEBUG = @CC_LDFLAGS_DEBUG@ +CC_LDFLAGS_EXTRA = @CC_LDFLAGS_EXTRA@ +CC_LDFLAGS_GPU = @CC_LDFLAGS_GPU@ +CC_LDFLAGS_HINTS = @CC_LDFLAGS_HINTS@ +CC_LDFLAGS_OPTIM = @CC_LDFLAGS_OPTIM@ +CC_LIBS = @CC_LIBS@ +CC_LIBS_DEBUG = @CC_LIBS_DEBUG@ +CC_LIBS_EXTRA = @CC_LIBS_EXTRA@ +CC_LIBS_GPU = @CC_LIBS_GPU@ +CC_LIBS_HINTS = @CC_LIBS_HINTS@ +CC_LIBS_OPTIM = @CC_LIBS_OPTIM@ +CFLAGS = @CFLAGS@ +CFLAGS_DEBUG = @CFLAGS_DEBUG@ +CFLAGS_EXTRA = @CFLAGS_EXTRA@ +CFLAGS_GPU = @CFLAGS_GPU@ +CFLAGS_HINTS = @CFLAGS_HINTS@ +CFLAGS_OPTIM = @CFLAGS_OPTIM@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CPPFLAGS_DEBUG = @CPPFLAGS_DEBUG@ +CPPFLAGS_EXTRA = @CPPFLAGS_EXTRA@ +CPPFLAGS_GPU = @CPPFLAGS_GPU@ +CPPFLAGS_HINTS = @CPPFLAGS_HINTS@ +CPPFLAGS_HINTS_EXT = @CPPFLAGS_HINTS_EXT@ +CPPFLAGS_OPTIM = @CPPFLAGS_OPTIM@ +CXX = @CXX@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CXXFLAGS_DEBUG = @CXXFLAGS_DEBUG@ +CXXFLAGS_EXTRA = @CXXFLAGS_EXTRA@ +CXXFLAGS_GPU = @CXXFLAGS_GPU@ +CXXFLAGS_HINTS = @CXXFLAGS_HINTS@ +CXXFLAGS_OPTIM = @CXXFLAGS_OPTIM@ +CXX_LDFLAGS = @CXX_LDFLAGS@ +CXX_LDFLAGS_DEBUG = @CXX_LDFLAGS_DEBUG@ +CXX_LDFLAGS_EXTRA = @CXX_LDFLAGS_EXTRA@ +CXX_LDFLAGS_GPU = @CXX_LDFLAGS_GPU@ +CXX_LDFLAGS_HINTS = @CXX_LDFLAGS_HINTS@ +CXX_LDFLAGS_OPTIM = @CXX_LDFLAGS_OPTIM@ +CXX_LIBS = @CXX_LIBS@ +CXX_LIBS_DEBUG = @CXX_LIBS_DEBUG@ +CXX_LIBS_EXTRA = @CXX_LIBS_EXTRA@ +CXX_LIBS_GPU = @CXX_LIBS_GPU@ +CXX_LIBS_HINTS = @CXX_LIBS_HINTS@ +CXX_LIBS_OPTIM = @CXX_LIBS_OPTIM@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ +FCFLAGS = @FCFLAGS@ +FCFLAGS_DEBUG = @FCFLAGS_DEBUG@ +FCFLAGS_EXTRA = @FCFLAGS_EXTRA@ +FCFLAGS_F90 = @FCFLAGS_F90@ +FCFLAGS_FIXEDFORM = @FCFLAGS_FIXEDFORM@ +FCFLAGS_FREEFORM = @FCFLAGS_FREEFORM@ +FCFLAGS_HINTS = @FCFLAGS_HINTS@ +FCFLAGS_MODDIR = @FCFLAGS_MODDIR@ +FCFLAGS_OPENMP = @FCFLAGS_OPENMP@ +FCFLAGS_OPENMP_OFFLOAD = @FCFLAGS_OPENMP_OFFLOAD@ +FCFLAGS_OPTIM = @FCFLAGS_OPTIM@ +FCLIBS = @FCLIBS@ +FC_LDFLAGS = @FC_LDFLAGS@ +FC_LDFLAGS_DEBUG = @FC_LDFLAGS_DEBUG@ +FC_LDFLAGS_EXTRA = @FC_LDFLAGS_EXTRA@ +FC_LDFLAGS_HINTS = @FC_LDFLAGS_HINTS@ +FC_LDFLAGS_OPTIM = @FC_LDFLAGS_OPTIM@ +FC_LIBS = @FC_LIBS@ +FC_LIBS_DEBUG = @FC_LIBS_DEBUG@ +FC_LIBS_EXTRA = @FC_LIBS_EXTRA@ +FC_LIBS_HINTS = @FC_LIBS_HINTS@ +FC_LIBS_OPTIM = @FC_LIBS_OPTIM@ +FC_NOWRAP = @FC_NOWRAP@ +FFLAGS = @FFLAGS@ +FFTW3_CFLAGS = @FFTW3_CFLAGS@ +FFTW3_CPPFLAGS = @FFTW3_CPPFLAGS@ +FFTW3_FCFLAGS = @FFTW3_FCFLAGS@ +FFTW3_LDFLAGS = @FFTW3_LDFLAGS@ +FFTW3_LIBS = @FFTW3_LIBS@ +FFT_CFLAGS = @FFT_CFLAGS@ +FFT_FCFLAGS = @FFT_FCFLAGS@ +FPP = @FPP@ +FPPFLAGS = @FPPFLAGS@ +FPPFLAGS_DEBUG = @FPPFLAGS_DEBUG@ +FPPFLAGS_EXTRA = @FPPFLAGS_EXTRA@ +FPPFLAGS_HINTS = @FPPFLAGS_HINTS@ +FPPFLAGS_OPTIM = @FPPFLAGS_OPTIM@ +GPU_ARCH = @GPU_ARCH@ +GPU_CFLAGS = @GPU_CFLAGS@ +GPU_CPPFLAGS = @GPU_CPPFLAGS@ +GPU_CXXFLAGS = @GPU_CXXFLAGS@ +GPU_FCFLAGS = @GPU_FCFLAGS@ +GPU_LDFLAGS = @GPU_LDFLAGS@ +GPU_LIBS = @GPU_LIBS@ +GRAPHATOM_BIN = @GRAPHATOM_BIN@ +GREP = @GREP@ +H5CC = @H5CC@ +HDF5_CFLAGS = @HDF5_CFLAGS@ +HDF5_CPPFLAGS = @HDF5_CPPFLAGS@ +HDF5_CXXFLAGS = @HDF5_CXXFLAGS@ +HDF5_FCFLAGS = @HDF5_FCFLAGS@ +HDF5_LDFLAGS = @HDF5_LDFLAGS@ +HDF5_LIBS = @HDF5_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +LDFLAGS = @LDFLAGS@ +LEVMAR_CFLAGS = @LEVMAR_CFLAGS@ +LEVMAR_CPPFLAGS = @LEVMAR_CPPFLAGS@ +LEVMAR_LDFLAGS = @LEVMAR_LDFLAGS@ +LEVMAR_LIBS = @LEVMAR_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPAW_CPPFLAGS = @LIBPAW_CPPFLAGS@ +LIBPAW_FCFLAGS = @LIBPAW_FCFLAGS@ +LIBPAW_LDFLAGS = @LIBPAW_LDFLAGS@ +LIBPAW_LIBS = @LIBPAW_LIBS@ +LIBPSML_CPPFLAGS = @LIBPSML_CPPFLAGS@ +LIBPSML_FCFLAGS = @LIBPSML_FCFLAGS@ +LIBPSML_LDFLAGS = @LIBPSML_LDFLAGS@ +LIBPSML_LIBS = @LIBPSML_LIBS@ +LIBS = @LIBS@ +LIBXC_CFLAGS = @LIBXC_CFLAGS@ +LIBXC_CPPFLAGS = @LIBXC_CPPFLAGS@ +LIBXC_FCFLAGS = @LIBXC_FCFLAGS@ +LIBXC_LDFLAGS = @LIBXC_LDFLAGS@ +LIBXC_LIBS = @LIBXC_LIBS@ +LIBXML2_CPPFLAGS = @LIBXML2_CPPFLAGS@ +LIBXML2_FCFLAGS = @LIBXML2_FCFLAGS@ +LIBXML2_LIBS = @LIBXML2_LIBS@ +LINALG_CFLAGS = @LINALG_CFLAGS@ +LINALG_CPPFLAGS = @LINALG_CPPFLAGS@ +LINALG_CXXFLAGS = @LINALG_CXXFLAGS@ +LINALG_FCFLAGS = @LINALG_FCFLAGS@ +LINALG_LDFLAGS = @LINALG_LDFLAGS@ +LINALG_LIBS = @LINALG_LIBS@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODEXT = @MODEXT@ +MPI_CFLAGS = @MPI_CFLAGS@ +MPI_CPPFLAGS = @MPI_CPPFLAGS@ +MPI_CXXFLAGS = @MPI_CXXFLAGS@ +MPI_FCFLAGS = @MPI_FCFLAGS@ +MPI_LDFLAGS = @MPI_LDFLAGS@ +MPI_LIBS = @MPI_LIBS@ +MV = @MV@ +NETCDF_CFLAGS = @NETCDF_CFLAGS@ +NETCDF_CPPFLAGS = @NETCDF_CPPFLAGS@ +NETCDF_CXXFLAGS = @NETCDF_CXXFLAGS@ +NETCDF_FCFLAGS = @NETCDF_FCFLAGS@ +NETCDF_FORTRAN_CFLAGS = @NETCDF_FORTRAN_CFLAGS@ +NETCDF_FORTRAN_CPPFLAGS = @NETCDF_FORTRAN_CPPFLAGS@ +NETCDF_FORTRAN_CXXFLAGS = @NETCDF_FORTRAN_CXXFLAGS@ +NETCDF_FORTRAN_FCFLAGS = @NETCDF_FORTRAN_FCFLAGS@ +NETCDF_FORTRAN_LDFLAGS = @NETCDF_FORTRAN_LDFLAGS@ +NETCDF_FORTRAN_LIBS = @NETCDF_FORTRAN_LIBS@ +NETCDF_LDFLAGS = @NETCDF_LDFLAGS@ +NETCDF_LIBS = @NETCDF_LIBS@ +NVCC = @NVCC@ +NVCC_CFLAGS = @NVCC_CFLAGS@ +NVCC_CPPFLAGS = @NVCC_CPPFLAGS@ +NVCC_LDFLAGS = @NVCC_LDFLAGS@ +NVCC_LIBS = @NVCC_LIBS@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PAPI_CFLAGS = @PAPI_CFLAGS@ +PAPI_CPPFLAGS = @PAPI_CPPFLAGS@ +PAPI_LDFLAGS = @PAPI_LDFLAGS@ +PAPI_LIBS = @PAPI_LIBS@ +PATCH = @PATCH@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PFFT_CFLAGS = @PFFT_CFLAGS@ +PFFT_CPPFLAGS = @PFFT_CPPFLAGS@ +PFFT_LDFLAGS = @PFFT_LDFLAGS@ +PFFT_LIBS = @PFFT_LIBS@ +PYFLAGS = @PYFLAGS@ +PYTHON = @PYTHON@ +PYTHON_CONFIG = @PYTHON_CONFIG@ +PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ +RANLIB = @RANLIB@ +REALPATH = @REALPATH@ +RM = @RM@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +TAR = @TAR@ +TRIQS_CFLAGS = @TRIQS_CFLAGS@ +TRIQS_CPPFLAGS = @TRIQS_CPPFLAGS@ +TRIQS_CXXFLAGS = @TRIQS_CXXFLAGS@ +TRIQS_LDFLAGS = @TRIQS_LDFLAGS@ +TRIQS_LIBS = @TRIQS_LIBS@ +TRUE_CPP = @TRUE_CPP@ +VERSION = @VERSION@ +WANNIER90_CPPFLAGS = @WANNIER90_CPPFLAGS@ +WANNIER90_FCFLAGS = @WANNIER90_FCFLAGS@ +WANNIER90_LDFLAGS = @WANNIER90_LDFLAGS@ +WANNIER90_LIBS = @WANNIER90_LIBS@ +XML2_CONFIG = @XML2_CONFIG@ +XMLF90_CPPFLAGS = @XMLF90_CPPFLAGS@ +XMLF90_FCFLAGS = @XMLF90_FCFLAGS@ +XMLF90_LDFLAGS = @XMLF90_LDFLAGS@ +XMLF90_LIBS = @XMLF90_LIBS@ +XML_CPPFLAGS = @XML_CPPFLAGS@ +XML_LIBS = @XML_LIBS@ +XPP = @XPP@ +XPPFLAGS = @XPPFLAGS@ +XPPFLAGS_DEBUG = @XPPFLAGS_DEBUG@ +XPPFLAGS_EXTRA = @XPPFLAGS_EXTRA@ +XPPFLAGS_OPTIM = @XPPFLAGS_OPTIM@ +YAKL_CPPFLAGS = @YAKL_CPPFLAGS@ +YAKL_FCFLAGS = @YAKL_FCFLAGS@ +YAKL_LDFLAGS = @YAKL_LDFLAGS@ +YAKL_LIBS = @YAKL_LIBS@ +abi_ac_distcheck = @abi_ac_distcheck@ +abi_ac_version = @abi_ac_version@ +abi_am_version = @abi_am_version@ +abi_avx_safe_mode_enable = @abi_avx_safe_mode_enable@ +abi_bse_unpacked_enable = @abi_bse_unpacked_enable@ +abi_cc_path = @abi_cc_path@ +abi_cc_vendor = @abi_cc_vendor@ +abi_cc_version = @abi_cc_version@ +abi_cclock_enable = @abi_cclock_enable@ +abi_cpp_path = @abi_cpp_path@ +abi_cpu_64bits = @abi_cpu_64bits@ +abi_cpu_bits = @abi_cpu_bits@ +abi_cpu_model = @abi_cpu_model@ +abi_cpu_platform = @abi_cpu_platform@ +abi_cpu_spec = @abi_cpu_spec@ +abi_cpu_vendor = @abi_cpu_vendor@ +abi_crpa_optim_enable = @abi_crpa_optim_enable@ +abi_cxx_path = @abi_cxx_path@ +abi_cxx_vendor = @abi_cxx_vendor@ +abi_cxx_version = @abi_cxx_version@ +abi_debug_flavor = @abi_debug_flavor@ +abi_exports_enable = @abi_exports_enable@ +abi_fbk_abinit_common_ok = @abi_fbk_abinit_common_ok@ +abi_fbk_bigdft_ok = @abi_fbk_bigdft_ok@ +abi_fbk_config = @abi_fbk_config@ +abi_fbk_enable = @abi_fbk_enable@ +abi_fbk_fft_ok = @abi_fbk_fft_ok@ +abi_fbk_fftw3_ok = @abi_fbk_fftw3_ok@ +abi_fbk_gpu_ok = @abi_fbk_gpu_ok@ +abi_fbk_hdf5_ok = @abi_fbk_hdf5_ok@ +abi_fbk_init = @abi_fbk_init@ +abi_fbk_kokkos_ok = @abi_fbk_kokkos_ok@ +abi_fbk_levmar_ok = @abi_fbk_levmar_ok@ +abi_fbk_libpaw_ok = @abi_fbk_libpaw_ok@ +abi_fbk_libpsml_ok = @abi_fbk_libpsml_ok@ +abi_fbk_libxc_ok = @abi_fbk_libxc_ok@ +abi_fbk_libxml2_ok = @abi_fbk_libxml2_ok@ +abi_fbk_linalg_ok = @abi_fbk_linalg_ok@ +abi_fbk_list = @abi_fbk_list@ +abi_fbk_mpi_ok = @abi_fbk_mpi_ok@ +abi_fbk_netcdf_fortran_ok = @abi_fbk_netcdf_fortran_ok@ +abi_fbk_netcdf_ok = @abi_fbk_netcdf_ok@ +abi_fbk_papi_ok = @abi_fbk_papi_ok@ +abi_fbk_pfft_ok = @abi_fbk_pfft_ok@ +abi_fbk_prefix = @abi_fbk_prefix@ +abi_fbk_required = @abi_fbk_required@ +abi_fbk_triqs_ok = @abi_fbk_triqs_ok@ +abi_fbk_wannier90_ok = @abi_fbk_wannier90_ok@ +abi_fbk_xmlf90_ok = @abi_fbk_xmlf90_ok@ +abi_fbk_yakl_ok = @abi_fbk_yakl_ok@ +abi_fc_path = @abi_fc_path@ +abi_fc_vendor = @abi_fc_vendor@ +abi_fc_version = @abi_fc_version@ +abi_fc_wrap = @abi_fc_wrap@ +abi_fc_wrapper_enable = @abi_fc_wrapper_enable@ +abi_fpp_path = @abi_fpp_path@ +abi_gpu_arch = @abi_gpu_arch@ +abi_gpu_fcflags = @abi_gpu_fcflags@ +abi_gpu_flavor = @abi_gpu_flavor@ +abi_gpu_hip_libdir = @abi_gpu_hip_libdir@ +abi_gpu_incs = @abi_gpu_incs@ +abi_gpu_ldflags = @abi_gpu_ldflags@ +abi_gpu_libs = @abi_gpu_libs@ +abi_gpu_nvtx_v3 = @abi_gpu_nvtx_v3@ +abi_gpu_roctx = @abi_gpu_roctx@ +abi_gw_dpc_enable = @abi_gw_dpc_enable@ +abi_hints_enable = @abi_hints_enable@ +abi_libtetra_enable = @abi_libtetra_enable@ +abi_libxml2_cppflags = @abi_libxml2_cppflags@ +abi_libxml2_enable = @abi_libxml2_enable@ +abi_libxml2_fcflags = @abi_libxml2_fcflags@ +abi_libxml2_init = @abi_libxml2_init@ +abi_libxml2_ldflags = @abi_libxml2_ldflags@ +abi_libxml2_libs = @abi_libxml2_libs@ +abi_libxml2_ok = @abi_libxml2_ok@ +abi_libxml2_prefix = @abi_libxml2_prefix@ +abi_lotf_enable = @abi_lotf_enable@ +abi_lt_version = @abi_lt_version@ +abi_m4_version = @abi_m4_version@ +abi_memory_profiling_enable = @abi_memory_profiling_enable@ +abi_mpi_cflags = @abi_mpi_cflags@ +abi_mpi_cppflags = @abi_mpi_cppflags@ +abi_mpi_cxxflags = @abi_mpi_cxxflags@ +abi_mpi_enable = @abi_mpi_enable@ +abi_mpi_fcflags = @abi_mpi_fcflags@ +abi_mpi_flavor = @abi_mpi_flavor@ +abi_mpi_gpu_aware_enable = @abi_mpi_gpu_aware_enable@ +abi_mpi_incs = @abi_mpi_incs@ +abi_mpi_inplace_enable = @abi_mpi_inplace_enable@ +abi_mpi_interfaces_bugfix_enable = @abi_mpi_interfaces_bugfix_enable@ +abi_mpi_io_default_enable = @abi_mpi_io_default_enable@ +abi_mpi_io_enable = @abi_mpi_io_enable@ +abi_mpi_ldflags = @abi_mpi_ldflags@ +abi_mpi_level = @abi_mpi_level@ +abi_mpi_libs = @abi_mpi_libs@ +abi_netcdf_default_enable = @abi_netcdf_default_enable@ +abi_openmp_enable = @abi_openmp_enable@ +abi_openmp_offload_enable = @abi_openmp_offload_enable@ +abi_optim_flavor = @abi_optim_flavor@ +abi_python_invocation_enable = @abi_python_invocation_enable@ +abi_source_debug_enable = @abi_source_debug_enable@ +abi_stdin_enable = @abi_stdin_enable@ +abi_sys_spec = @abi_sys_spec@ +abi_timer_enable = @abi_timer_enable@ +abi_triqs_v1_4_enable = @abi_triqs_v1_4_enable@ +abi_triqs_v2_0_enable = @abi_triqs_v2_0_enable@ +abi_zdot_bugfix_enable = @abi_zdot_bugfix_enable@ +abinit_bindir = @abinit_bindir@ +abinit_builddir = @abinit_builddir@ +abinit_chkdir = @abinit_chkdir@ +abinit_datdir = @abinit_datdir@ +abinit_docdir = @abinit_docdir@ +abinit_incdir = @abinit_incdir@ +abinit_libdir = @abinit_libdir@ +abinit_mandir = @abinit_mandir@ +abinit_prefix = @abinit_prefix@ +abinit_srcdir = @abinit_srcdir@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_FC = @ac_ct_FC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cc_info_string = @cc_info_string@ +cxx_info_string = @cxx_info_string@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +enable_avx_safe_mode = @enable_avx_safe_mode@ +enable_bse_unpacked = @enable_bse_unpacked@ +enable_cclock = @enable_cclock@ +enable_crpa_optim = @enable_crpa_optim@ +enable_exports = @enable_exports@ +enable_fc_wrapper = @enable_fc_wrapper@ +enable_gw_dpc = @enable_gw_dpc@ +enable_hints = @enable_hints@ +enable_libtetra = @enable_libtetra@ +enable_lotf = @enable_lotf@ +enable_memory_profiling = @enable_memory_profiling@ +enable_mpi_gpu_aware = @enable_mpi_gpu_aware@ +enable_mpi_inplace = @enable_mpi_inplace@ +enable_mpi_interfaces_bugfix = @enable_mpi_interfaces_bugfix@ +enable_mpi_io = @enable_mpi_io@ +enable_mpi_io_default = @enable_mpi_io_default@ +enable_netcdf_default = @enable_netcdf_default@ +enable_openmp = @enable_openmp@ +enable_openmp_offload = @enable_openmp_offload@ +enable_python_invocation = @enable_python_invocation@ +enable_shared = @enable_shared@ +enable_source_debug = @enable_source_debug@ +enable_static = @enable_static@ +enable_stdin = @enable_stdin@ +enable_timer = @enable_timer@ +enable_triqs_v1_4 = @enable_triqs_v1_4@ +enable_triqs_v2_0 = @enable_triqs_v2_0@ +enable_zdot_bugfix = @enable_zdot_bugfix@ +exec_prefix = @exec_prefix@ +fc_info_string = @fc_info_string@ +fc_mod_fcflags = @fc_mod_fcflags@ +fc_timing = @fc_timing@ +fcflags_opt_02_clib = @fcflags_opt_02_clib@ +fcflags_opt_10_defs = @fcflags_opt_10_defs@ +fcflags_opt_11_memory_mpi = @fcflags_opt_11_memory_mpi@ +fcflags_opt_12_hide_mpi = @fcflags_opt_12_hide_mpi@ +fcflags_opt_14_hidewrite = @fcflags_opt_14_hidewrite@ +fcflags_opt_16_hideleave = @fcflags_opt_16_hideleave@ +fcflags_opt_16_kokkos_toolbox = @fcflags_opt_16_kokkos_toolbox@ +fcflags_opt_17_gpu_toolbox = @fcflags_opt_17_gpu_toolbox@ +fcflags_opt_17_libtetra_ext = @fcflags_opt_17_libtetra_ext@ +fcflags_opt_17_minimax = @fcflags_opt_17_minimax@ +fcflags_opt_17_yaml_out = @fcflags_opt_17_yaml_out@ +fcflags_opt_18_timing = @fcflags_opt_18_timing@ +fcflags_opt_21_hashfuncs = @fcflags_opt_21_hashfuncs@ +fcflags_opt_27_toolbox_oop = @fcflags_opt_27_toolbox_oop@ +fcflags_opt_28_numeric_noabirule = @fcflags_opt_28_numeric_noabirule@ +fcflags_opt_29_kpoints = @fcflags_opt_29_kpoints@ +fcflags_opt_32_util = @fcflags_opt_32_util@ +fcflags_opt_33_xc_lowlevel = @fcflags_opt_33_xc_lowlevel@ +fcflags_opt_39_libpaw = @fcflags_opt_39_libpaw@ +fcflags_opt_41_geometry = @fcflags_opt_41_geometry@ +fcflags_opt_42_nlstrain = @fcflags_opt_42_nlstrain@ +fcflags_opt_42_parser = @fcflags_opt_42_parser@ +fcflags_opt_43_ptgroups = @fcflags_opt_43_ptgroups@ +fcflags_opt_43_wvl_wrappers = @fcflags_opt_43_wvl_wrappers@ +fcflags_opt_44_abitools = @fcflags_opt_44_abitools@ +fcflags_opt_44_abitypes_defs = @fcflags_opt_44_abitypes_defs@ +fcflags_opt_44_manage_kokkos = @fcflags_opt_44_manage_kokkos@ +fcflags_opt_45_geomoptim = @fcflags_opt_45_geomoptim@ +fcflags_opt_45_xgTools = @fcflags_opt_45_xgTools@ +fcflags_opt_46_ghc_omp = @fcflags_opt_46_ghc_omp@ +fcflags_opt_46_manage_cuda = @fcflags_opt_46_manage_cuda@ +fcflags_opt_48_diago = @fcflags_opt_48_diago@ +fcflags_opt_49_gw_toolbox_oop = @fcflags_opt_49_gw_toolbox_oop@ +fcflags_opt_51_manage_mpi = @fcflags_opt_51_manage_mpi@ +fcflags_opt_52_fft_mpi_noabirule = @fcflags_opt_52_fft_mpi_noabirule@ +fcflags_opt_53_ffts = @fcflags_opt_53_ffts@ +fcflags_opt_54_spacepar = @fcflags_opt_54_spacepar@ +fcflags_opt_55_abiutil = @fcflags_opt_55_abiutil@ +fcflags_opt_56_io_mpi = @fcflags_opt_56_io_mpi@ +fcflags_opt_56_mixing = @fcflags_opt_56_mixing@ +fcflags_opt_56_recipspace = @fcflags_opt_56_recipspace@ +fcflags_opt_56_xc = @fcflags_opt_56_xc@ +fcflags_opt_57_iopsp_parser = @fcflags_opt_57_iopsp_parser@ +fcflags_opt_57_iovars = @fcflags_opt_57_iovars@ +fcflags_opt_61_occeig = @fcflags_opt_61_occeig@ +fcflags_opt_62_cg_noabirule = @fcflags_opt_62_cg_noabirule@ +fcflags_opt_62_ctqmc = @fcflags_opt_62_ctqmc@ +fcflags_opt_62_iowfdenpot = @fcflags_opt_62_iowfdenpot@ +fcflags_opt_62_poisson = @fcflags_opt_62_poisson@ +fcflags_opt_62_wvl_wfs = @fcflags_opt_62_wvl_wfs@ +fcflags_opt_64_psp = @fcflags_opt_64_psp@ +fcflags_opt_65_lotf_base = @fcflags_opt_65_lotf_base@ +fcflags_opt_65_paw = @fcflags_opt_65_paw@ +fcflags_opt_66_nonlocal = @fcflags_opt_66_nonlocal@ +fcflags_opt_66_vdwxc = @fcflags_opt_66_vdwxc@ +fcflags_opt_66_wfs = @fcflags_opt_66_wfs@ +fcflags_opt_67_common = @fcflags_opt_67_common@ +fcflags_opt_67_python_invocation_ext = @fcflags_opt_67_python_invocation_ext@ +fcflags_opt_67_triqs_ext = @fcflags_opt_67_triqs_ext@ +fcflags_opt_68_dmft = @fcflags_opt_68_dmft@ +fcflags_opt_68_lotf = @fcflags_opt_68_lotf@ +fcflags_opt_68_recursion = @fcflags_opt_68_recursion@ +fcflags_opt_68_rsprc = @fcflags_opt_68_rsprc@ +fcflags_opt_69_wfdesc = @fcflags_opt_69_wfdesc@ +fcflags_opt_70_gw = @fcflags_opt_70_gw@ +fcflags_opt_71_bse = @fcflags_opt_71_bse@ +fcflags_opt_71_wannier = @fcflags_opt_71_wannier@ +fcflags_opt_72_response = @fcflags_opt_72_response@ +fcflags_opt_77_ddb = @fcflags_opt_77_ddb@ +fcflags_opt_77_suscep = @fcflags_opt_77_suscep@ +fcflags_opt_78_effpot = @fcflags_opt_78_effpot@ +fcflags_opt_78_eph = @fcflags_opt_78_eph@ +fcflags_opt_79_seqpar_mpi = @fcflags_opt_79_seqpar_mpi@ +fcflags_opt_80_rttddft = @fcflags_opt_80_rttddft@ +fcflags_opt_80_tdep = @fcflags_opt_80_tdep@ +fcflags_opt_94_scfcv = @fcflags_opt_94_scfcv@ +fcflags_opt_95_drive = @fcflags_opt_95_drive@ +fcflags_opt_98_main = @fcflags_opt_98_main@ +fcflags_opt_bigdft = @fcflags_opt_bigdft@ +fcflags_opt_default = @fcflags_opt_default@ +fcflags_opt_hdf5 = @fcflags_opt_hdf5@ +fcflags_opt_levmar = @fcflags_opt_levmar@ +fcflags_opt_libpsml = @fcflags_opt_libpsml@ +fcflags_opt_libxc = @fcflags_opt_libxc@ +fcflags_opt_libxml2 = @fcflags_opt_libxml2@ +fcflags_opt_linalg = @fcflags_opt_linalg@ +fcflags_opt_netcdf = @fcflags_opt_netcdf@ +fcflags_opt_netcdf_fortran = @fcflags_opt_netcdf_fortran@ +fcflags_opt_papi = @fcflags_opt_papi@ +fcflags_opt_triqs = @fcflags_opt_triqs@ +fcflags_opt_wannier90 = @fcflags_opt_wannier90@ +fcflags_opt_xmlf90 = @fcflags_opt_xmlf90@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sd_abinit_common_cppflags = @sd_abinit_common_cppflags@ +sd_abinit_common_enable = @sd_abinit_common_enable@ +sd_abinit_common_enable_def = @sd_abinit_common_enable_def@ +sd_abinit_common_fcflags = @sd_abinit_common_fcflags@ +sd_abinit_common_init = @sd_abinit_common_init@ +sd_abinit_common_ldflags = @sd_abinit_common_ldflags@ +sd_abinit_common_libs = @sd_abinit_common_libs@ +sd_abinit_common_ok = @sd_abinit_common_ok@ +sd_abinit_common_options = @sd_abinit_common_options@ +sd_abinit_common_policy = @sd_abinit_common_policy@ +sd_abinit_common_status = @sd_abinit_common_status@ +sd_bigdft_cppflags = @sd_bigdft_cppflags@ +sd_bigdft_enable = @sd_bigdft_enable@ +sd_bigdft_enable_def = @sd_bigdft_enable_def@ +sd_bigdft_fcflags = @sd_bigdft_fcflags@ +sd_bigdft_init = @sd_bigdft_init@ +sd_bigdft_ldflags = @sd_bigdft_ldflags@ +sd_bigdft_libs = @sd_bigdft_libs@ +sd_bigdft_ok = @sd_bigdft_ok@ +sd_bigdft_options = @sd_bigdft_options@ +sd_bigdft_policy = @sd_bigdft_policy@ +sd_bigdft_status = @sd_bigdft_status@ +sd_fft_cflags = @sd_fft_cflags@ +sd_fft_choices = @sd_fft_choices@ +sd_fft_cppflags = @sd_fft_cppflags@ +sd_fft_cxxflags = @sd_fft_cxxflags@ +sd_fft_enable = @sd_fft_enable@ +sd_fft_fcflags = @sd_fft_fcflags@ +sd_fft_flavor = @sd_fft_flavor@ +sd_fft_init = @sd_fft_init@ +sd_fft_ldflags = @sd_fft_ldflags@ +sd_fft_libs = @sd_fft_libs@ +sd_fft_ok = @sd_fft_ok@ +sd_fftw3_cflags = @sd_fftw3_cflags@ +sd_fftw3_cppflags = @sd_fftw3_cppflags@ +sd_fftw3_enable = @sd_fftw3_enable@ +sd_fftw3_enable_def = @sd_fftw3_enable_def@ +sd_fftw3_fcflags = @sd_fftw3_fcflags@ +sd_fftw3_init = @sd_fftw3_init@ +sd_fftw3_ldflags = @sd_fftw3_ldflags@ +sd_fftw3_libs = @sd_fftw3_libs@ +sd_fftw3_ok = @sd_fftw3_ok@ +sd_fftw3_options = @sd_fftw3_options@ +sd_fftw3_policy = @sd_fftw3_policy@ +sd_fftw3_status = @sd_fftw3_status@ +sd_gpu_cflags = @sd_gpu_cflags@ +sd_gpu_cppflags = @sd_gpu_cppflags@ +sd_gpu_cxxflags = @sd_gpu_cxxflags@ +sd_gpu_enable = @sd_gpu_enable@ +sd_gpu_enable_def = @sd_gpu_enable_def@ +sd_gpu_fcflags = @sd_gpu_fcflags@ +sd_gpu_init = @sd_gpu_init@ +sd_gpu_ldflags = @sd_gpu_ldflags@ +sd_gpu_libs = @sd_gpu_libs@ +sd_gpu_ok = @sd_gpu_ok@ +sd_gpu_options = @sd_gpu_options@ +sd_gpu_policy = @sd_gpu_policy@ +sd_gpu_prefix = @sd_gpu_prefix@ +sd_gpu_status = @sd_gpu_status@ +sd_hdf5_cflags = @sd_hdf5_cflags@ +sd_hdf5_cppflags = @sd_hdf5_cppflags@ +sd_hdf5_cxxflags = @sd_hdf5_cxxflags@ +sd_hdf5_enable = @sd_hdf5_enable@ +sd_hdf5_enable_def = @sd_hdf5_enable_def@ +sd_hdf5_enable_fc = @sd_hdf5_enable_fc@ +sd_hdf5_fcflags = @sd_hdf5_fcflags@ +sd_hdf5_h5cc = @sd_hdf5_h5cc@ +sd_hdf5_h5fc = @sd_hdf5_h5fc@ +sd_hdf5_init = @sd_hdf5_init@ +sd_hdf5_ldflags = @sd_hdf5_ldflags@ +sd_hdf5_libs = @sd_hdf5_libs@ +sd_hdf5_ok = @sd_hdf5_ok@ +sd_hdf5_options = @sd_hdf5_options@ +sd_hdf5_policy = @sd_hdf5_policy@ +sd_hdf5_status = @sd_hdf5_status@ +sd_kokkos_cppflags = @sd_kokkos_cppflags@ +sd_kokkos_cxxflags = @sd_kokkos_cxxflags@ +sd_kokkos_enable = @sd_kokkos_enable@ +sd_kokkos_enable_def = @sd_kokkos_enable_def@ +sd_kokkos_init = @sd_kokkos_init@ +sd_kokkos_ldflags = @sd_kokkos_ldflags@ +sd_kokkos_libs = @sd_kokkos_libs@ +sd_kokkos_ok = @sd_kokkos_ok@ +sd_kokkos_options = @sd_kokkos_options@ +sd_kokkos_policy = @sd_kokkos_policy@ +sd_kokkos_status = @sd_kokkos_status@ +sd_levmar_cflags = @sd_levmar_cflags@ +sd_levmar_cppflags = @sd_levmar_cppflags@ +sd_levmar_enable = @sd_levmar_enable@ +sd_levmar_enable_def = @sd_levmar_enable_def@ +sd_levmar_init = @sd_levmar_init@ +sd_levmar_ldflags = @sd_levmar_ldflags@ +sd_levmar_libs = @sd_levmar_libs@ +sd_levmar_ok = @sd_levmar_ok@ +sd_levmar_options = @sd_levmar_options@ +sd_levmar_policy = @sd_levmar_policy@ +sd_levmar_status = @sd_levmar_status@ +sd_libpaw_cppflags = @sd_libpaw_cppflags@ +sd_libpaw_enable = @sd_libpaw_enable@ +sd_libpaw_enable_def = @sd_libpaw_enable_def@ +sd_libpaw_fcflags = @sd_libpaw_fcflags@ +sd_libpaw_init = @sd_libpaw_init@ +sd_libpaw_ldflags = @sd_libpaw_ldflags@ +sd_libpaw_libs = @sd_libpaw_libs@ +sd_libpaw_ok = @sd_libpaw_ok@ +sd_libpaw_options = @sd_libpaw_options@ +sd_libpaw_policy = @sd_libpaw_policy@ +sd_libpaw_status = @sd_libpaw_status@ +sd_libpsml_cppflags = @sd_libpsml_cppflags@ +sd_libpsml_enable = @sd_libpsml_enable@ +sd_libpsml_enable_def = @sd_libpsml_enable_def@ +sd_libpsml_fcflags = @sd_libpsml_fcflags@ +sd_libpsml_init = @sd_libpsml_init@ +sd_libpsml_ldflags = @sd_libpsml_ldflags@ +sd_libpsml_libs = @sd_libpsml_libs@ +sd_libpsml_ok = @sd_libpsml_ok@ +sd_libpsml_options = @sd_libpsml_options@ +sd_libpsml_policy = @sd_libpsml_policy@ +sd_libpsml_status = @sd_libpsml_status@ +sd_libxc_cflags = @sd_libxc_cflags@ +sd_libxc_cppflags = @sd_libxc_cppflags@ +sd_libxc_enable = @sd_libxc_enable@ +sd_libxc_enable_def = @sd_libxc_enable_def@ +sd_libxc_enable_fc = @sd_libxc_enable_fc@ +sd_libxc_fcflags = @sd_libxc_fcflags@ +sd_libxc_init = @sd_libxc_init@ +sd_libxc_ldflags = @sd_libxc_ldflags@ +sd_libxc_libs = @sd_libxc_libs@ +sd_libxc_ok = @sd_libxc_ok@ +sd_libxc_options = @sd_libxc_options@ +sd_libxc_policy = @sd_libxc_policy@ +sd_libxc_status = @sd_libxc_status@ +sd_linalg_cflags = @sd_linalg_cflags@ +sd_linalg_choices = @sd_linalg_choices@ +sd_linalg_cppflags = @sd_linalg_cppflags@ +sd_linalg_cxxflags = @sd_linalg_cxxflags@ +sd_linalg_enable = @sd_linalg_enable@ +sd_linalg_fcflags = @sd_linalg_fcflags@ +sd_linalg_flavor = @sd_linalg_flavor@ +sd_linalg_has_elpa = @sd_linalg_has_elpa@ +sd_linalg_has_scalapack = @sd_linalg_has_scalapack@ +sd_linalg_init = @sd_linalg_init@ +sd_linalg_ldflags = @sd_linalg_ldflags@ +sd_linalg_libs = @sd_linalg_libs@ +sd_linalg_ok = @sd_linalg_ok@ +sd_mpi_cc = @sd_mpi_cc@ +sd_mpi_cflags = @sd_mpi_cflags@ +sd_mpi_cppflags = @sd_mpi_cppflags@ +sd_mpi_cxx = @sd_mpi_cxx@ +sd_mpi_enable = @sd_mpi_enable@ +sd_mpi_enable_cxx = @sd_mpi_enable_cxx@ +sd_mpi_enable_def = @sd_mpi_enable_def@ +sd_mpi_enable_fc = @sd_mpi_enable_fc@ +sd_mpi_fc = @sd_mpi_fc@ +sd_mpi_fcflags = @sd_mpi_fcflags@ +sd_mpi_init = @sd_mpi_init@ +sd_mpi_ldflags = @sd_mpi_ldflags@ +sd_mpi_libs = @sd_mpi_libs@ +sd_mpi_ok = @sd_mpi_ok@ +sd_mpi_options = @sd_mpi_options@ +sd_mpi_policy = @sd_mpi_policy@ +sd_mpi_status = @sd_mpi_status@ +sd_netcdf_cflags = @sd_netcdf_cflags@ +sd_netcdf_cppflags = @sd_netcdf_cppflags@ +sd_netcdf_enable = @sd_netcdf_enable@ +sd_netcdf_enable_def = @sd_netcdf_enable_def@ +sd_netcdf_fcflags = @sd_netcdf_fcflags@ +sd_netcdf_fortran_cflags = @sd_netcdf_fortran_cflags@ +sd_netcdf_fortran_cppflags = @sd_netcdf_fortran_cppflags@ +sd_netcdf_fortran_enable = @sd_netcdf_fortran_enable@ +sd_netcdf_fortran_enable_def = @sd_netcdf_fortran_enable_def@ +sd_netcdf_fortran_fcflags = @sd_netcdf_fortran_fcflags@ +sd_netcdf_fortran_init = @sd_netcdf_fortran_init@ +sd_netcdf_fortran_ldflags = @sd_netcdf_fortran_ldflags@ +sd_netcdf_fortran_libs = @sd_netcdf_fortran_libs@ +sd_netcdf_fortran_ok = @sd_netcdf_fortran_ok@ +sd_netcdf_fortran_options = @sd_netcdf_fortran_options@ +sd_netcdf_fortran_policy = @sd_netcdf_fortran_policy@ +sd_netcdf_fortran_status = @sd_netcdf_fortran_status@ +sd_netcdf_init = @sd_netcdf_init@ +sd_netcdf_ldflags = @sd_netcdf_ldflags@ +sd_netcdf_libs = @sd_netcdf_libs@ +sd_netcdf_ok = @sd_netcdf_ok@ +sd_netcdf_options = @sd_netcdf_options@ +sd_netcdf_policy = @sd_netcdf_policy@ +sd_netcdf_status = @sd_netcdf_status@ +sd_papi_cflags = @sd_papi_cflags@ +sd_papi_cppflags = @sd_papi_cppflags@ +sd_papi_enable = @sd_papi_enable@ +sd_papi_enable_def = @sd_papi_enable_def@ +sd_papi_init = @sd_papi_init@ +sd_papi_ldflags = @sd_papi_ldflags@ +sd_papi_libs = @sd_papi_libs@ +sd_papi_ok = @sd_papi_ok@ +sd_papi_options = @sd_papi_options@ +sd_papi_policy = @sd_papi_policy@ +sd_papi_sd_papi_fcflags = @sd_papi_sd_papi_fcflags@ +sd_papi_status = @sd_papi_status@ +sd_pfft_cflags = @sd_pfft_cflags@ +sd_pfft_cppflags = @sd_pfft_cppflags@ +sd_pfft_enable = @sd_pfft_enable@ +sd_pfft_enable_def = @sd_pfft_enable_def@ +sd_pfft_init = @sd_pfft_init@ +sd_pfft_ldflags = @sd_pfft_ldflags@ +sd_pfft_libs = @sd_pfft_libs@ +sd_pfft_ok = @sd_pfft_ok@ +sd_pfft_options = @sd_pfft_options@ +sd_pfft_policy = @sd_pfft_policy@ +sd_pfft_status = @sd_pfft_status@ +sd_sys_fcflags = @sd_sys_fcflags@ +sd_triqs_cflags = @sd_triqs_cflags@ +sd_triqs_cppflags = @sd_triqs_cppflags@ +sd_triqs_cxxflags = @sd_triqs_cxxflags@ +sd_triqs_enable = @sd_triqs_enable@ +sd_triqs_enable_def = @sd_triqs_enable_def@ +sd_triqs_fcflags = @sd_triqs_fcflags@ +sd_triqs_init = @sd_triqs_init@ +sd_triqs_ldflags = @sd_triqs_ldflags@ +sd_triqs_libs = @sd_triqs_libs@ +sd_triqs_ok = @sd_triqs_ok@ +sd_triqs_options = @sd_triqs_options@ +sd_triqs_policy = @sd_triqs_policy@ +sd_triqs_status = @sd_triqs_status@ +sd_wannier90_cppflags = @sd_wannier90_cppflags@ +sd_wannier90_enable = @sd_wannier90_enable@ +sd_wannier90_enable_def = @sd_wannier90_enable_def@ +sd_wannier90_fcflags = @sd_wannier90_fcflags@ +sd_wannier90_init = @sd_wannier90_init@ +sd_wannier90_ldflags = @sd_wannier90_ldflags@ +sd_wannier90_libs = @sd_wannier90_libs@ +sd_wannier90_ok = @sd_wannier90_ok@ +sd_wannier90_options = @sd_wannier90_options@ +sd_wannier90_policy = @sd_wannier90_policy@ +sd_wannier90_status = @sd_wannier90_status@ +sd_xmlf90_cppflags = @sd_xmlf90_cppflags@ +sd_xmlf90_enable = @sd_xmlf90_enable@ +sd_xmlf90_enable_def = @sd_xmlf90_enable_def@ +sd_xmlf90_fcflags = @sd_xmlf90_fcflags@ +sd_xmlf90_init = @sd_xmlf90_init@ +sd_xmlf90_ldflags = @sd_xmlf90_ldflags@ +sd_xmlf90_libs = @sd_xmlf90_libs@ +sd_xmlf90_ok = @sd_xmlf90_ok@ +sd_xmlf90_options = @sd_xmlf90_options@ +sd_xmlf90_policy = @sd_xmlf90_policy@ +sd_xmlf90_status = @sd_xmlf90_status@ +sd_yakl_cppflags = @sd_yakl_cppflags@ +sd_yakl_enable = @sd_yakl_enable@ +sd_yakl_enable_def = @sd_yakl_enable_def@ +sd_yakl_fcflags = @sd_yakl_fcflags@ +sd_yakl_init = @sd_yakl_init@ +sd_yakl_ldflags = @sd_yakl_ldflags@ +sd_yakl_libs = @sd_yakl_libs@ +sd_yakl_ok = @sd_yakl_ok@ +sd_yakl_options = @sd_yakl_options@ +sd_yakl_policy = @sd_yakl_policy@ +sd_yakl_status = @sd_yakl_status@ +sharedstatedir = @sharedstatedir@ +src_02_clib_fcflags = @src_02_clib_fcflags@ +src_10_defs_fcflags = @src_10_defs_fcflags@ +src_11_memory_mpi_fcflags = @src_11_memory_mpi_fcflags@ +src_12_hide_mpi_fcflags = @src_12_hide_mpi_fcflags@ +src_14_hidewrite_fcflags = @src_14_hidewrite_fcflags@ +src_16_hideleave_fcflags = @src_16_hideleave_fcflags@ +src_16_kokkos_toolbox_fcflags = @src_16_kokkos_toolbox_fcflags@ +src_17_gpu_toolbox_fcflags = @src_17_gpu_toolbox_fcflags@ +src_17_libtetra_ext_fcflags = @src_17_libtetra_ext_fcflags@ +src_17_minimax_fcflags = @src_17_minimax_fcflags@ +src_17_yaml_out_fcflags = @src_17_yaml_out_fcflags@ +src_18_timing_fcflags = @src_18_timing_fcflags@ +src_21_hashfuncs_fcflags = @src_21_hashfuncs_fcflags@ +src_27_toolbox_oop_fcflags = @src_27_toolbox_oop_fcflags@ +src_28_numeric_noabirule_fcflags = @src_28_numeric_noabirule_fcflags@ +src_29_kpoints_fcflags = @src_29_kpoints_fcflags@ +src_32_util_fcflags = @src_32_util_fcflags@ +src_33_xc_lowlevel_fcflags = @src_33_xc_lowlevel_fcflags@ +src_39_libpaw_fcflags = @src_39_libpaw_fcflags@ +src_41_geometry_fcflags = @src_41_geometry_fcflags@ +src_42_nlstrain_fcflags = @src_42_nlstrain_fcflags@ +src_42_parser_fcflags = @src_42_parser_fcflags@ +src_43_ptgroups_fcflags = @src_43_ptgroups_fcflags@ +src_43_wvl_wrappers_fcflags = @src_43_wvl_wrappers_fcflags@ +src_44_abitools_fcflags = @src_44_abitools_fcflags@ +src_44_abitypes_defs_fcflags = @src_44_abitypes_defs_fcflags@ +src_44_manage_kokkos_fcflags = @src_44_manage_kokkos_fcflags@ +src_45_geomoptim_fcflags = @src_45_geomoptim_fcflags@ +src_45_xgTools_fcflags = @src_45_xgTools_fcflags@ +src_46_ghc_omp_fcflags = @src_46_ghc_omp_fcflags@ +src_46_manage_cuda_fcflags = @src_46_manage_cuda_fcflags@ +src_48_diago_fcflags = @src_48_diago_fcflags@ +src_49_gw_toolbox_oop_fcflags = @src_49_gw_toolbox_oop_fcflags@ +src_51_manage_mpi_fcflags = @src_51_manage_mpi_fcflags@ +src_52_fft_mpi_noabirule_fcflags = @src_52_fft_mpi_noabirule_fcflags@ +src_53_ffts_fcflags = @src_53_ffts_fcflags@ +src_54_spacepar_fcflags = @src_54_spacepar_fcflags@ +src_55_abiutil_fcflags = @src_55_abiutil_fcflags@ +src_56_io_mpi_fcflags = @src_56_io_mpi_fcflags@ +src_56_mixing_fcflags = @src_56_mixing_fcflags@ +src_56_recipspace_fcflags = @src_56_recipspace_fcflags@ +src_56_xc_fcflags = @src_56_xc_fcflags@ +src_57_iopsp_parser_fcflags = @src_57_iopsp_parser_fcflags@ +src_57_iovars_fcflags = @src_57_iovars_fcflags@ +src_61_occeig_fcflags = @src_61_occeig_fcflags@ +src_62_cg_noabirule_fcflags = @src_62_cg_noabirule_fcflags@ +src_62_ctqmc_fcflags = @src_62_ctqmc_fcflags@ +src_62_iowfdenpot_fcflags = @src_62_iowfdenpot_fcflags@ +src_62_poisson_fcflags = @src_62_poisson_fcflags@ +src_62_wvl_wfs_fcflags = @src_62_wvl_wfs_fcflags@ +src_64_psp_fcflags = @src_64_psp_fcflags@ +src_65_lotf_base_fcflags = @src_65_lotf_base_fcflags@ +src_65_paw_fcflags = @src_65_paw_fcflags@ +src_66_nonlocal_fcflags = @src_66_nonlocal_fcflags@ +src_66_vdwxc_fcflags = @src_66_vdwxc_fcflags@ +src_66_wfs_fcflags = @src_66_wfs_fcflags@ +src_67_common_fcflags = @src_67_common_fcflags@ +src_67_python_invocation_ext_fcflags = @src_67_python_invocation_ext_fcflags@ +src_67_triqs_ext_fcflags = @src_67_triqs_ext_fcflags@ +src_68_dmft_fcflags = @src_68_dmft_fcflags@ +src_68_lotf_fcflags = @src_68_lotf_fcflags@ +src_68_recursion_fcflags = @src_68_recursion_fcflags@ +src_68_rsprc_fcflags = @src_68_rsprc_fcflags@ +src_69_wfdesc_fcflags = @src_69_wfdesc_fcflags@ +src_70_gw_fcflags = @src_70_gw_fcflags@ +src_71_bse_fcflags = @src_71_bse_fcflags@ +src_71_wannier_fcflags = @src_71_wannier_fcflags@ +src_72_response_fcflags = @src_72_response_fcflags@ +src_77_ddb_fcflags = @src_77_ddb_fcflags@ +src_77_suscep_fcflags = @src_77_suscep_fcflags@ +src_78_effpot_fcflags = @src_78_effpot_fcflags@ +src_78_eph_fcflags = @src_78_eph_fcflags@ +src_79_seqpar_mpi_fcflags = @src_79_seqpar_mpi_fcflags@ +src_80_rttddft_fcflags = @src_80_rttddft_fcflags@ +src_80_tdep_fcflags = @src_80_tdep_fcflags@ +src_94_scfcv_fcflags = @src_94_scfcv_fcflags@ +src_95_drive_fcflags = @src_95_drive_fcflags@ +src_common_fcflags = @src_common_fcflags@ +src_core_fcflags = @src_core_fcflags@ +src_libpaw_fcflags = @src_libpaw_fcflags@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +with_abinit_common = @with_abinit_common@ +with_bigdft = @with_bigdft@ +with_config_file = @with_config_file@ +with_debug_flavor = @with_debug_flavor@ +with_fallbacks = @with_fallbacks@ +with_fc_vendor = @with_fc_vendor@ +with_fc_version = @with_fc_version@ +with_fft_flavor = @with_fft_flavor@ +with_fftw3 = @with_fftw3@ +with_gnu_ld = @with_gnu_ld@ +with_gpu = @with_gpu@ +with_hdf5 = @with_hdf5@ +with_kokkos = @with_kokkos@ +with_levmar = @with_levmar@ +with_libpaw = @with_libpaw@ +with_libpsml = @with_libpsml@ +with_libxc = @with_libxc@ +with_libxml2 = @with_libxml2@ +with_linalg_flavor = @with_linalg_flavor@ +with_mpi = @with_mpi@ +with_mpi_level = @with_mpi_level@ +with_netcdf = @with_netcdf@ +with_optim_flavor = @with_optim_flavor@ +with_papi = @with_papi@ +with_pfft = @with_pfft@ +with_triqs = @with_triqs@ +with_wannier90 = @with_wannier90@ +with_xmlf90 = @with_xmlf90@ +with_yakl = @with_yakl@ +AM_CFLAGS = @ABI_CPPFLAGS@ +AM_CXXFLAGS = $(sd_triqs_cxxflags) +AM_FCFLAGS = @FPPFLAGS@ @FCFLAGS_FREEFORM@ @FCFLAGS_MODDIR@ @sd_sys_fcflags@ @fcflags_opt_14_hidewrite@ +AM_CPPFLAGS = \ + @src_10_defs_fcflags@ \ + @src_11_memory_mpi_fcflags@ \ + @src_12_hide_mpi_fcflags@ \ + @src_14_hidewrite_fcflags@ \ + @src_common_fcflags@ \ + @src_core_fcflags@ \ + @src_libpaw_fcflags@ \ + @sd_mpi_cppflags@ \ + @sd_mpi_fcflags@ \ + @fc_mod_fcflags@ + + +# Regular source files +lib14_hidewrite_srcs = \ + m_abicore.F90 \ + m_cppopts_dumper.F90 \ + m_fstrings.F90 \ + m_io_tools.F90 \ + m_specialmsg.F90 + + +# Source files depending on conditionals + +# Source files built by scripts +lib14_hidewrite_srcs_built = \ + m_build_info.F90 \ + m_optim_dumper.F90 + + +# Library description +noinst_LIBRARIES = lib14_hidewrite.a +lib14_hidewrite_a_SOURCES = $(lib14_hidewrite_srcs) +nodist_lib14_hidewrite_a_SOURCES = $(lib14_hidewrite_srcs_built) + +# Dependencies (inside the directory) of directory 14_hidewrite +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. +CLEANFILES = m_abicore_cpp.f90 m_build_info_cpp.f90 \ + m_cppopts_dumper_cpp.f90 m_fstrings_cpp.f90 m_io_tools_cpp.f90 \ + m_optim_dumper_cpp.f90 m_specialmsg_cpp.f90 \ + m_abicore.$(MODEXT) m_build_info.in.$(MODEXT) \ + m_cppopts_dumper.$(MODEXT) m_fstrings.$(MODEXT) \ + m_io_tools.$(MODEXT) m_optim_dumper.in.$(MODEXT) \ + m_specialmsg.$(MODEXT) m_build_info.$(MODEXT) +DISTCLEANFILES = \ + m_build_info.F90 \ + m_optim_dumper.F90 + +EXTRA_DIST = abinit.src abinit.dep m_build_info.F90.in \ + m_optim_dumper.F90.in abinit.amf _14_hidewrite_ +all: all-am + +.SUFFIXES: +.SUFFIXES: .F90 .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu shared/common/src/14_hidewrite/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu shared/common/src/14_hidewrite/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +m_build_info.F90: $(top_builddir)/config.status $(srcdir)/m_build_info.F90.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) + +lib14_hidewrite.a: $(lib14_hidewrite_a_OBJECTS) $(lib14_hidewrite_a_DEPENDENCIES) $(EXTRA_lib14_hidewrite_a_DEPENDENCIES) + $(AM_V_at)-rm -f lib14_hidewrite.a + $(AM_V_AR)$(lib14_hidewrite_a_AR) lib14_hidewrite.a $(lib14_hidewrite_a_OBJECTS) $(lib14_hidewrite_a_LIBADD) + $(AM_V_at)$(RANLIB) lib14_hidewrite.a + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +.F90.o: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ $< + +.F90.obj: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-noinstLIBRARIES cscopelist-am ctags ctags-am distclean \ + distclean-compile distclean-generic distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am + +.PRECIOUS: Makefile + + +m_abicore.$(OBJEXT): m_specialmsg.$(OBJEXT) + +m_specialmsg.$(OBJEXT): m_build_info.$(OBJEXT) m_io_tools.$(OBJEXT) + +m_abicore.$(OBJEXT) m_specialmsg.$(OBJEXT): m_build_info.$(OBJEXT) + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/GX-PAW/common/src/14_hidewrite/_14_hidewrite_ b/GX-PAW/common/src/14_hidewrite/_14_hidewrite_ new file mode 100644 index 00000000..62a5082a --- /dev/null +++ b/GX-PAW/common/src/14_hidewrite/_14_hidewrite_ @@ -0,0 +1,22 @@ +!!****d* ABINIT/14_hidewrite +!! NAME +!! 14_hidewrite +!! +!! DESCRIPTION +!! FIXME: Description is missing +!! +!! COPYRIGHT +!! Copyright (C) 1998-2024 ABINIT group +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! For the initials of contributors, see ~abinit/doc/developers/contributors.txt . +!! +!! CHILDREN +!! interfaces_14_hidewrite.F90 +!! m_abicore.F90 +!! m_fstrings.F90 +!! m_io_tools.F90 +!! m_specialmsg.F90 +!! +!!*** diff --git a/GX-PAW/common/src/14_hidewrite/__pycache__/abinit.cpython-36.pyc b/GX-PAW/common/src/14_hidewrite/__pycache__/abinit.cpython-36.pyc new file mode 100644 index 00000000..c791f17c Binary files /dev/null and b/GX-PAW/common/src/14_hidewrite/__pycache__/abinit.cpython-36.pyc differ diff --git a/GX-PAW/common/src/14_hidewrite/abinit.amf b/GX-PAW/common/src/14_hidewrite/abinit.amf new file mode 100644 index 00000000..54f153fd --- /dev/null +++ b/GX-PAW/common/src/14_hidewrite/abinit.amf @@ -0,0 +1,4 @@ +EXTRA_DIST += generate_build_info.cmake +CLEANFILES += m_build_info.$(MODEXT) + +m_abicore.$(OBJEXT) m_specialmsg.$(OBJEXT): m_build_info.$(OBJEXT) diff --git a/GX-PAW/common/src/14_hidewrite/abinit.dep b/GX-PAW/common/src/14_hidewrite/abinit.dep new file mode 100644 index 00000000..2e0b4aff --- /dev/null +++ b/GX-PAW/common/src/14_hidewrite/abinit.dep @@ -0,0 +1,18 @@ +# Dependencies (inside the directory) of directory 14_hidewrite +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. + +CLEANFILES += \ + m_abicore.$(MODEXT) \ + m_build_info.in.$(MODEXT) \ + m_cppopts_dumper.$(MODEXT) \ + m_fstrings.$(MODEXT) \ + m_io_tools.$(MODEXT) \ + m_optim_dumper.in.$(MODEXT) \ + m_specialmsg.$(MODEXT) + +m_abicore.$(OBJEXT): m_specialmsg.$(OBJEXT) + +m_specialmsg.$(OBJEXT): m_build_info.$(OBJEXT) m_io_tools.$(OBJEXT) \ No newline at end of file diff --git a/GX-PAW/common/src/14_hidewrite/abinit.dir b/GX-PAW/common/src/14_hidewrite/abinit.dir new file mode 100644 index 00000000..8c87ba6d --- /dev/null +++ b/GX-PAW/common/src/14_hidewrite/abinit.dir @@ -0,0 +1,8 @@ +# Dependencies (outside the directory) of directory 14_hidewrite +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. + +include_dirs = \ +['10_defs', '11_memory_mpi', '12_hide_mpi', '14_hidewrite'] \ No newline at end of file diff --git a/GX-PAW/common/src/14_hidewrite/abinit.src b/GX-PAW/common/src/14_hidewrite/abinit.src new file mode 100644 index 00000000..0b791908 --- /dev/null +++ b/GX-PAW/common/src/14_hidewrite/abinit.src @@ -0,0 +1,39 @@ +# -*- Python -*- +# +# Copyright (C) 2005-2024 ABINIT Group (Yann Pouillon) +# +# This file is part of the ABINIT software package. For license information, +# please see the COPYING file in the top-level directory of the ABINIT source +# distribution. +# + +# +# Source files making up the 1managempi library +# + +# Source file attributes +ABI_SRC_NIL = 0 # No attribute +ABI_SRC_BLT = 1 # The file is built by a script +ABI_SRC_DEP = 2 # The file depends on other files + +# Source files +sources = [ + "m_abicore.F90", + "m_build_info.F90", + "m_build_info.F90.cmake", + "m_cppopts_dumper.F90", + "m_fstrings.F90", + "m_io_tools.F90", + "m_optim_dumper.F90", + "m_optim_dumper.F90.cmake", + "m_specialmsg.F90", +] +# IMPORTANT : please use the alphabetic order in the previous list. Do NOT add the new routine names at the end of the list. +# This is important to avoid numerous conflicts at merge time. Thank you very much. Xavier. +sources_specs = { + "m_build_info.F90":ABI_SRC_BLT, + "m_optim_dumper.F90":ABI_SRC_BLT, + "m_build_info.F90.cmake":ABI_SRC_BLT, + "m_optim_dumper.F90.cmake":ABI_SRC_BLT, +} + diff --git a/GX-PAW/common/src/14_hidewrite/generate_build_info.cmake b/GX-PAW/common/src/14_hidewrite/generate_build_info.cmake new file mode 100644 index 00000000..486d8de7 --- /dev/null +++ b/GX-PAW/common/src/14_hidewrite/generate_build_info.cmake @@ -0,0 +1,20 @@ +macro(generate_build_info) + + set(TARGET_CPU ${CMAKE_HOST_SYSTEM_PROCESSOR}) + cmake_host_system_information(RESULT TARGET_CPU_LONG QUERY PROCESSOR_DESCRIPTION) + cmake_host_system_information(RESULT OS_NAME QUERY OS_NAME) + + set(abi_target_os ${OS_NAME}) + set(abi_cc_vendor ${CMAKE_C_COMPILER_ID}) + set(abi_cc_version ${CMAKE_C_COMPILER_VERSION}) + set(abi_cxx_vendor ${CMAKE_CXX_COMPILER_ID}) + set(abi_cxx_version ${CMAKE_CXX_COMPILER_VERSION}) + set(abi_fc_vendor ${CMAKE_Fortran_COMPILER_ID}) + set(abi_fc_version ${CMAKE_Fortran_COMPILER_VERSION}) + + set(ABINIT_TARGET ${TARGET_CPU}_${abi_target_os}_${abi_fc_vendor}_${abi_fc_version}) + + message(STATUS "Generating m_build_info.F90...") + configure_file(m_build_info.F90.cmake.in m_build_info.F90 @ONLY) + +endmacro() diff --git a/GX-PAW/common/src/14_hidewrite/lib14_hidewrite.a b/GX-PAW/common/src/14_hidewrite/lib14_hidewrite.a new file mode 100644 index 00000000..3fe5d0b9 Binary files /dev/null and b/GX-PAW/common/src/14_hidewrite/lib14_hidewrite.a differ diff --git a/GX-PAW/common/src/14_hidewrite/m_abicore.F90 b/GX-PAW/common/src/14_hidewrite/m_abicore.F90 new file mode 100644 index 00000000..936bfe65 --- /dev/null +++ b/GX-PAW/common/src/14_hidewrite/m_abicore.F90 @@ -0,0 +1,112 @@ +!!****m* ABINIT/m_abicore +!! NAME +!! m_abicore +!! +!! FUNCTION +!! +!! COPYRIGHT +!! Copyright (C) 2008-2024 ABINIT group +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" + +module m_abicore + + !use defs_basis + !use m_build_info + use m_profiling_abi + use m_specialmsg !, only : herald, specialmsg_setcount, specialmsg_getcount, specialmsg_mpisum, wrtout + !use m_errors + + + implicit none + + public + +contains !===================================================== +!!*** + +! TODO: Replace with F90 i0 + +!!****f* ABINIT/appdig +!! NAME +!! appdig +!! +!! FUNCTION +!! Using input string "string" and integer "integ", make a string +!! named 'strinn' by concatenating digits of "integ" with characters +!! of "string"; return final string in "strinn". +!! Can also treat initial empty string, then simply returns the integer in the form of a string +!! +!! INPUTS +!! integ=nonnegative integer whose digits will be appended to string +!! string=string to which digits will be appended +!! +!! OUTPUT +!! strinn=string//nn +!! +!! SOURCE + +subroutine appdig(integ,string,strinn) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: integ + character(len=*),intent(in) :: string + character(len=*),intent(out) :: strinn + +!Local variables------------------------------- +!scalars + integer :: i,length,ndig + character(len=2) :: ncha + character(len=8) :: form + !character(len=500) :: msg + +! ************************************************************************* + + ! Check that integer is nonnegative + !if (integ<0) then + ! write(msg,'(a,i0,a)') & + ! 'Input integer =',integ,' must not be <0. Argument integ was input as negative.' + ! ABI_BUG(msg) + !end if + + ! Fill output string initially with blanks to end of dimensioned length + length=len(strinn) + do i=1,length + strinn(i:i)=' ' + end do + +!Find nonwhitespace length of string + length=len_trim(string) +!Copy input character string into first part of output string + if(length>0)then + strinn(1:length)=string(1:length) + end if + +!Find how many digits "integ" has + ndig=int(log10(real(integ)+0.50))+1 + +!Create a format for exact number of digits using internal write + write(unit=ncha,fmt='(i2)') ndig + form='(i'//ncha//')' +!Do internal write to get digits of integer into character string, +!placing digits into appropriate end of string. + write(unit=strinn(1+length:length+ndig),fmt=form) integ +!(Note that present version writes "1" or "2" for single digit, +!not "01" or "02". Latter may be preferable. Can be amended.) +! + +end subroutine appdig +!!*** + +end module m_abicore +!!*** diff --git a/GX-PAW/common/src/14_hidewrite/m_abicore.o b/GX-PAW/common/src/14_hidewrite/m_abicore.o new file mode 100644 index 00000000..c3cf7a9d Binary files /dev/null and b/GX-PAW/common/src/14_hidewrite/m_abicore.o differ diff --git a/GX-PAW/common/src/14_hidewrite/m_build_info.F90 b/GX-PAW/common/src/14_hidewrite/m_build_info.F90 new file mode 100644 index 00000000..7d482d0d --- /dev/null +++ b/GX-PAW/common/src/14_hidewrite/m_build_info.F90 @@ -0,0 +1,194 @@ +!{src2tex{textfont=tt}} +!!****m* ABINIT/m_build_info +!! NAME +!! m_build_info +!! +!! FUNCTION +!! This module contains information about this particular version of ABINIT +!! and its build parameters (useful for debugging). +!! +!! COPYRIGHT +!! Copyright (C) 2005-2024 ABINIT group (Yann Pouillon, Matteo Giantomassi) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +module m_build_info + +implicit none + +! Try to prevent problems with the length of the argument +! (should not exceed the line length of 132 character). +! So, always start the string to be replaced at the beginning of a line. + +! Parameters set-up by Autoconf +character(len=8),parameter :: abinit_version = & +& "10.0.0.83-58be4d" +character(len=*),parameter :: build_target = & +& "x86_64_darwin18.7.0_gnu9.4" + +! More info on current version +character(len=*),parameter :: version_major = & +& "10" +character(len=*),parameter :: version_minor = & +& "0" +character(len=*),parameter :: version_micro = & +& "0" +character(len=*),parameter :: version_build = & +& "20240316" + +! Info on compilers. Try to prevent problems with the length of the argument +! (should not exceed the line length of 132 character). +character(len=*),parameter :: cc_info = & +& "gnu9.4" +character(len=*),parameter :: cxx_info = & +& "gnu9.4" +character(len=*),parameter :: fc_info = & +& "gnu9.4" +character(len=*),parameter :: cc_flags = & +& "-O2 -g " +character(len=*),parameter :: cxx_flags = & +& "-O2 -g " +character(len=*),parameter :: fc_flags = & +& "-O2 -g -ffree-line-length-none -I/opt/local/include -I/opt/local/include -I/opt/local/include" +character(len=*),parameter :: fc_ldflags = & +& " " + +! Info on optimizations +character(len=*),parameter :: with_debug_flavor = & +& "basic" +character(len=*),parameter :: with_optim_flavor = & +& "standard" +character(len=*),parameter :: cpu_info = & +& "unknown_unknown" + +! Info on MPI +character(len=*),parameter :: with_mpi = & +& "/opt/local" +character(len=*),parameter :: enable_mpi_io = & +& "yes" + +! Info on openMP +character(len=*),parameter :: enable_openmp = & +& "" + +! Info on GPU +character(len=*),parameter :: with_gpu = & +& "" + +! Info on external dependencies +character(len=*),parameter :: linalg_flavor = & +& "openblas" +character(len=*),parameter :: fft_flavor = & +& "fftw3" +character(len=*),parameter :: with_hdf5 = & +& "yes" +character(len=*),parameter :: with_netcdf = & +& "yes" +character(len=*),parameter :: with_netcdf_fortran = & +& "yes" +character(len=*),parameter :: with_libxc = & +& "yes" +character(len=*),parameter :: with_wannier90 = & +& "yes" + +! Info on experimental features +character(len=*),parameter :: enable_exports = & +& "" +character(len=*),parameter :: enable_gw_dpc = & +& "yes" + +contains !=========================================================== +!!*** + +!!****f* ABINIT/m_build_info/dump_config +!! NAME +!! dump_config +!! +!! FUNCTION +!! Reports a printout of the information stored in m_build_info, +!! useful for error messages and debugging. +!! +!! INPUTS +!! my_unit= Fortran unit number +!! +!! OUTPUT +!! Only printing +!! +!! PARENTS +!! Will be filled automatically by the parent script +!! +!! CHILDREN +!! Will be filled automatically by the parent script +!! +!! SOURCE + +subroutine dump_config(my_unit) + +implicit none + +!Arguments ------------------------------------ +integer,intent(in) :: my_unit + +!Local variables------------------------------- + +! ********************************************************************* + +! TODO: things that might be added through preprocessing options, e.g. +! date and time of compilation + +write(my_unit,*) +write(my_unit,'(1x,a)') repeat('+',78) +write(my_unit,*) +write(my_unit,'(a)' )' === Build Information === ' +write(my_unit,'(2a)')' Version : ',trim(abinit_version) +write(my_unit,'(2a)')' Build target : ',trim(build_target) +write(my_unit,'(2a)')' Build date : ',trim(version_build) +write(my_unit,*) +write(my_unit,'(a)' )' === Compiler Suite === ' +write(my_unit,'(2a)')' C compiler : ',trim(cc_info) +write(my_unit,'(2a)')' C++ compiler : ',trim(cxx_info) +write(my_unit,'(2a)')' Fortran compiler : ',trim(fc_info) +write(my_unit,'(2a)')' CFLAGS : ',trim(cc_flags) +write(my_unit,'(2a)')' CXXFLAGS : ',trim(cxx_flags) +write(my_unit,'(2a)')' FCFLAGS : ',trim(fc_flags) +write(my_unit,'(2a)')' FC_LDFLAGS : ',trim(fc_ldflags) +write(my_unit,*) +write(my_unit,'(a) ')' === Optimizations === ' +write(my_unit,'(2a)')' Debug level : ',trim(with_debug_flavor) +write(my_unit,'(2a)')' Optimization level : ',trim(with_optim_flavor) +write(my_unit,'(2a)')' Architecture : ',trim(cpu_info) +write(my_unit,*) +write(my_unit,'(a) ')' === Multicore === ' +write(my_unit,'(2a)')' Parallel build : ',trim(with_mpi) +write(my_unit,'(2a)')' Parallel I/O : ',trim(enable_mpi_io) +write(my_unit,'(2a)')' openMP support : ',trim(enable_openmp) +write(my_unit,'(2a)')' GPU support : ',trim(with_gpu) +write(my_unit,*) +write(my_unit,'(a) ')' === Connectors / Fallbacks === ' +write(my_unit,'(2a)')' LINALG flavor : ',trim(linalg_flavor) +write(my_unit,'(2a)')' FFT flavor : ',trim(fft_flavor) +write(my_unit,'(2a)')' HDF5 : ',trim(with_hdf5) +write(my_unit,'(2a)')' NetCDF : ',trim(with_netcdf) +write(my_unit,'(2a)')' NetCDF Fortran : ',trim(with_netcdf_fortran) +write(my_unit,'(2a)')' LibXC : ',trim(with_libxc) +write(my_unit,'(2a)')' Wannier90 : ',trim(with_wannier90) +write(my_unit,*) +write(my_unit,'(a)' )' === Experimental features === ' +write(my_unit,'(2a)')' Exports : ',trim(enable_exports) +write(my_unit,'(2a)')' GW double-precision : ',trim(enable_gw_dpc) +write(my_unit,*) +write(my_unit,'(1x,a)') repeat('+',78) +write(my_unit,*) + +end subroutine dump_config +!!*** + +end module m_build_info +!!*** diff --git a/GX-PAW/common/src/14_hidewrite/m_build_info.F90.cmake.in b/GX-PAW/common/src/14_hidewrite/m_build_info.F90.cmake.in new file mode 100644 index 00000000..cc143aab --- /dev/null +++ b/GX-PAW/common/src/14_hidewrite/m_build_info.F90.cmake.in @@ -0,0 +1,202 @@ +!{\src2tex{textfont=tt}} +!!****m* ABINIT/m_build_info +!! NAME +!! m_build_info +!! +!! FUNCTION +!! This module contains information about this particular version of ABINIT +!! and its build parameters (useful for debugging). +!! +!! COPYRIGHT +!! Copyright (C) 2005-2024 ABINIT group (Yann Pouillon, Matteo Giantomassi) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +module m_build_info + + implicit none + +! Try to prevent problems with the length of the argument +! (should not exceed the line length of 132 character). +! So, always start the string to be replaced at the beginning of a line. + +! Parameters set-up by Autoconf + character(len=8),parameter :: abinit_version = & +& "@CMAKE_PROJECT_VERSION@" + character(len=*),parameter :: build_target = & +& "@ABINIT_TARGET@" + +! More info on current version + character(len=*),parameter :: version_major = & +& "@CMAKE_PROJECT_VERSION_MAJOR@" + character(len=*),parameter :: version_minor = & +& "@CMAKE_PROJECT_VERSION_MINOR@" + character(len=*),parameter :: version_micro = & +& "@CMAKE_PROJECT_VERSION_PATCH@" + character(len=*),parameter :: version_build = & +& "@ABINIT_VERSION_BUILD@" + +! Info on compilers. Try to prevent problems with the length of the argument +! (should not exceed the line length of 132 character). + character(len=*),parameter :: cc_info = & +& "@abi_cc_vendor@@abi_cc_version@" + character(len=*),parameter :: cxx_info = & +& "@abi_cxx_vendor@@abi_cxx_version@" + character(len=*),parameter :: fc_info = & +& "@abi_fc_vendor@@abi_fc_version@" + character(len=*),parameter :: cc_flags = & +& "@CMAKE_C_FLAGS@" + character(len=*),parameter :: cxx_flags = & +& "@CMAKE_CXX_FLAGS@" +!! TODO : would be much better to use get_target_property on abinit exe +!! to retrieve the relevant info + character(len=*),parameter :: fc_flags = & +& "TODO@CMAKE_Fortran_FLAGS@" + character(len=*),parameter :: fc_ldflags = & +& "TODO@CMAKE_Fortran_FLAGS@" + +! Info on optimizations + character(len=*),parameter :: with_debug_flavor = & +& "@ABI_DEBUG_FLAVOR@" + character(len=*),parameter :: with_optim_flavor = & +& "@ABI_OPTIM_FLAVOR@" + character(len=*),parameter :: cpu_info = & +& "@TARGET_CPU_LONG@" + +! Info on MPI + character(len=*),parameter :: with_mpi = & +& "@HAVE_MPI@" + character(len=*),parameter :: enable_mpi_io = & +& "@HAVE_MPI_IO@" + +! Info on openMP + character(len=*),parameter :: enable_openmp = & +& "@HAVE_OPENMP@" + +! Info on GPU + character(len=*),parameter :: with_gpu = & +& "@HAVE_GPU@" + +! Info on external dependencies + character(len=*),parameter :: linalg_flavor = & +& "TODO" + character(len=*),parameter :: scalapack_enabled = & +& "@ABINIT_SCALAPACK_ENABLED@" + character(len=*),parameter :: scalapack_flavor = & +& "@ABINIT_SCALAPACK_FLAVOR@" + character(len=*),parameter :: fft_flavor = & +& "@ABINIT_FFT_FLAVOR@" + character(len=*),parameter :: with_hdf5 = & +& "@HAVE_HDF5@" + character(len=*),parameter :: with_netcdf = & +& "@HAVE_NETCDF@" + character(len=*),parameter :: with_netcdf_fortran = & +& "@HAVE_NETCDF_FORTRAN@" + character(len=*),parameter :: with_libxc = & +& "@HAVE_LIBXC@" + character(len=*),parameter :: with_wannier90 = & +& "@HAVE_WANNIER90@" + +! Info on experimental features + character(len=*),parameter :: enable_exports = & +& "TODO@enable_exports@" + character(len=*),parameter :: enable_gw_dpc = & +& "@HAVE_GW_DPC@" + +contains !=========================================================== +!!*** + +!!****f* ABINIT/m_build_info/dump_config +!! NAME +!! dump_config +!! +!! FUNCTION +!! Reports a printout of the information stored in m_build_info, +!! useful for error messages and debugging. +!! +!! INPUTS +!! my_unit= Fortran unit number +!! +!! OUTPUT +!! Only printing +!! +!! PARENTS +!! Will be filled automatically by the parent script +!! +!! CHILDREN +!! Will be filled automatically by the parent script +!! +!! SOURCE + +subroutine dump_config(my_unit) + + implicit none + +!Arguments ------------------------------------ + integer,intent(in) :: my_unit + +!Local variables------------------------------- + +! ********************************************************************* + +! TODO: things that might be added through preprocessing options, e.g. +! date and time of compilation + + write(my_unit,*) + write(my_unit,'(1x,a)') repeat('+',78) + write(my_unit,*) + write(my_unit,'(a)' )' === Build Information === ' + write(my_unit,'(2a)')' Version : ',trim(abinit_version) + write(my_unit,'(2a)')' Build target : ',trim(build_target) + write(my_unit,'(2a)')' Build date : ',trim(version_build) + write(my_unit,*) + write(my_unit,'(a)' )' === Compiler Suite === ' + write(my_unit,'(2a)')' C compiler : ',trim(cc_info) + write(my_unit,'(2a)')' C++ compiler : ',trim(cxx_info) + write(my_unit,'(2a)')' Fortran compiler : ',trim(fc_info) + write(my_unit,'(2a)')' CFLAGS : ',trim(cc_flags) + write(my_unit,'(2a)')' CXXFLAGS : ',trim(cxx_flags) + write(my_unit,'(2a)')' FCFLAGS : ',trim(fc_flags) + write(my_unit,'(2a)')' FC_LDFLAGS : ',trim(fc_ldflags) + write(my_unit,*) + write(my_unit,'(a) ')' === Optimizations === ' + write(my_unit,'(2a)')' Debug level : ',trim(with_debug_flavor) + write(my_unit,'(2a)')' Optimization level : ',trim(with_optim_flavor) + write(my_unit,'(2a)')' Architecture : ',trim(cpu_info) + write(my_unit,*) + write(my_unit,'(a) ')' === Multicore === ' + write(my_unit,'(2a)')' Parallel build : ',trim(with_mpi) + write(my_unit,'(2a)')' Parallel I/O : ',trim(enable_mpi_io) + write(my_unit,'(2a)')' openMP support : ',trim(enable_openmp) + write(my_unit,'(2a)')' GPU support : ',trim(with_gpu) + write(my_unit,*) + write(my_unit,'(a) ')' === Connectors / Fallbacks === ' + write(my_unit,'(2a)')' LINALG flavor : ',trim(linalg_flavor) + write(my_unit,'(2a)')' SCALAPACK enabled : ',trim(scalapack_enabled) + write(my_unit,'(2a)')' SCALAPACK flavor : ',trim(scalapack_flavor) + write(my_unit,'(2a)')' FFT flavor : ',trim(fft_flavor) + write(my_unit,'(2a)')' HDF5 : ',trim(with_hdf5) + write(my_unit,'(2a)')' NetCDF : ',trim(with_netcdf) + write(my_unit,'(2a)')' NetCDF Fortran : ',trim(with_netcdf_fortran) + write(my_unit,'(2a)')' LibXC : ',trim(with_libxc) + write(my_unit,'(2a)')' Wannier90 : ',trim(with_wannier90) + write(my_unit,*) + write(my_unit,'(a)' )' === Experimental features === ' + write(my_unit,'(2a)')' Exports : ',trim(enable_exports) + write(my_unit,'(2a)')' GW double-precision : ',trim(enable_gw_dpc) + write(my_unit,*) + write(my_unit,'(1x,a)') repeat('+',78) + write(my_unit,*) + +end subroutine dump_config +!!*** + +end module m_build_info +!!*** diff --git a/GX-PAW/common/src/14_hidewrite/m_build_info.F90.in b/GX-PAW/common/src/14_hidewrite/m_build_info.F90.in new file mode 100644 index 00000000..2d4046f3 --- /dev/null +++ b/GX-PAW/common/src/14_hidewrite/m_build_info.F90.in @@ -0,0 +1,194 @@ +!{\src2tex{textfont=tt}} +!!****m* ABINIT/m_build_info +!! NAME +!! m_build_info +!! +!! FUNCTION +!! This module contains information about this particular version of ABINIT +!! and its build parameters (useful for debugging). +!! +!! COPYRIGHT +!! Copyright (C) 2005-2024 ABINIT group (Yann Pouillon, Matteo Giantomassi) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +module m_build_info + + implicit none + +! Try to prevent problems with the length of the argument +! (should not exceed the line length of 132 character). +! So, always start the string to be replaced at the beginning of a line. + +! Parameters set-up by Autoconf + character(len=8),parameter :: abinit_version = & +& "@VERSION@" + character(len=*),parameter :: build_target = & +& "@ABINIT_TARGET@" + +! More info on current version + character(len=*),parameter :: version_major = & +& "@ABINIT_VERSION_MAJOR@" + character(len=*),parameter :: version_minor = & +& "@ABINIT_VERSION_MINOR@" + character(len=*),parameter :: version_micro = & +& "@ABINIT_VERSION_MICRO@" + character(len=*),parameter :: version_build = & +& "@ABINIT_VERSION_BUILD@" + +! Info on compilers. Try to prevent problems with the length of the argument +! (should not exceed the line length of 132 character). + character(len=*),parameter :: cc_info = & +& "@abi_cc_vendor@@abi_cc_version@" + character(len=*),parameter :: cxx_info = & +& "@abi_cxx_vendor@@abi_cxx_version@" + character(len=*),parameter :: fc_info = & +& "@abi_fc_vendor@@abi_fc_version@" + character(len=*),parameter :: cc_flags = & +& "@CFLAGS@" + character(len=*),parameter :: cxx_flags = & +& "@CXXFLAGS@" + character(len=*),parameter :: fc_flags = & +& "@FCFLAGS@" + character(len=*),parameter :: fc_ldflags = & +& "@FC_LDFLAGS@" + +! Info on optimizations + character(len=*),parameter :: with_debug_flavor = & +& "@abi_debug_flavor@" + character(len=*),parameter :: with_optim_flavor = & +& "@abi_optim_flavor@" + character(len=*),parameter :: cpu_info = & +& "@abi_cpu_vendor@_@abi_cpu_model@" + +! Info on MPI + character(len=*),parameter :: with_mpi = & +& "@with_mpi@" + character(len=*),parameter :: enable_mpi_io = & +& "@enable_mpi_io@" + +! Info on openMP + character(len=*),parameter :: enable_openmp = & +& "@enable_openmp@" + +! Info on GPU + character(len=*),parameter :: with_gpu = & +& "@with_gpu@" + +! Info on external dependencies + character(len=*),parameter :: linalg_flavor = & +& "@sd_linalg_flavor@" + character(len=*),parameter :: fft_flavor = & +& "@sd_fft_flavor@" + character(len=*),parameter :: with_hdf5 = & +& "@sd_hdf5_enable@" + character(len=*),parameter :: with_netcdf = & +& "@sd_netcdf_enable@" + character(len=*),parameter :: with_netcdf_fortran = & +& "@sd_netcdf_fortran_enable@" + character(len=*),parameter :: with_libxc = & +& "@sd_libxc_enable@" + character(len=*),parameter :: with_wannier90 = & +& "@sd_wannier90_enable@" + +! Info on experimental features + character(len=*),parameter :: enable_exports = & +& "@enable_exports@" + character(len=*),parameter :: enable_gw_dpc = & +& "@enable_gw_dpc@" + +contains !=========================================================== +!!*** + +!!****f* ABINIT/m_build_info/dump_config +!! NAME +!! dump_config +!! +!! FUNCTION +!! Reports a printout of the information stored in m_build_info, +!! useful for error messages and debugging. +!! +!! INPUTS +!! my_unit= Fortran unit number +!! +!! OUTPUT +!! Only printing +!! +!! PARENTS +!! Will be filled automatically by the parent script +!! +!! CHILDREN +!! Will be filled automatically by the parent script +!! +!! SOURCE + +subroutine dump_config(my_unit) + + implicit none + +!Arguments ------------------------------------ + integer,intent(in) :: my_unit + +!Local variables------------------------------- + +! ********************************************************************* + +! TODO: things that might be added through preprocessing options, e.g. +! date and time of compilation + + write(my_unit,*) + write(my_unit,'(1x,a)') repeat('+',78) + write(my_unit,*) + write(my_unit,'(a)' )' === Build Information === ' + write(my_unit,'(2a)')' Version : ',trim(abinit_version) + write(my_unit,'(2a)')' Build target : ',trim(build_target) + write(my_unit,'(2a)')' Build date : ',trim(version_build) + write(my_unit,*) + write(my_unit,'(a)' )' === Compiler Suite === ' + write(my_unit,'(2a)')' C compiler : ',trim(cc_info) + write(my_unit,'(2a)')' C++ compiler : ',trim(cxx_info) + write(my_unit,'(2a)')' Fortran compiler : ',trim(fc_info) + write(my_unit,'(2a)')' CFLAGS : ',trim(cc_flags) + write(my_unit,'(2a)')' CXXFLAGS : ',trim(cxx_flags) + write(my_unit,'(2a)')' FCFLAGS : ',trim(fc_flags) + write(my_unit,'(2a)')' FC_LDFLAGS : ',trim(fc_ldflags) + write(my_unit,*) + write(my_unit,'(a) ')' === Optimizations === ' + write(my_unit,'(2a)')' Debug level : ',trim(with_debug_flavor) + write(my_unit,'(2a)')' Optimization level : ',trim(with_optim_flavor) + write(my_unit,'(2a)')' Architecture : ',trim(cpu_info) + write(my_unit,*) + write(my_unit,'(a) ')' === Multicore === ' + write(my_unit,'(2a)')' Parallel build : ',trim(with_mpi) + write(my_unit,'(2a)')' Parallel I/O : ',trim(enable_mpi_io) + write(my_unit,'(2a)')' openMP support : ',trim(enable_openmp) + write(my_unit,'(2a)')' GPU support : ',trim(with_gpu) + write(my_unit,*) + write(my_unit,'(a) ')' === Connectors / Fallbacks === ' + write(my_unit,'(2a)')' LINALG flavor : ',trim(linalg_flavor) + write(my_unit,'(2a)')' FFT flavor : ',trim(fft_flavor) + write(my_unit,'(2a)')' HDF5 : ',trim(with_hdf5) + write(my_unit,'(2a)')' NetCDF : ',trim(with_netcdf) + write(my_unit,'(2a)')' NetCDF Fortran : ',trim(with_netcdf_fortran) + write(my_unit,'(2a)')' LibXC : ',trim(with_libxc) + write(my_unit,'(2a)')' Wannier90 : ',trim(with_wannier90) + write(my_unit,*) + write(my_unit,'(a)' )' === Experimental features === ' + write(my_unit,'(2a)')' Exports : ',trim(enable_exports) + write(my_unit,'(2a)')' GW double-precision : ',trim(enable_gw_dpc) + write(my_unit,*) + write(my_unit,'(1x,a)') repeat('+',78) + write(my_unit,*) + +end subroutine dump_config +!!*** + +end module m_build_info +!!*** diff --git a/GX-PAW/common/src/14_hidewrite/m_build_info.o b/GX-PAW/common/src/14_hidewrite/m_build_info.o new file mode 100644 index 00000000..76d1ae55 Binary files /dev/null and b/GX-PAW/common/src/14_hidewrite/m_build_info.o differ diff --git a/GX-PAW/common/src/14_hidewrite/m_cppopts_dumper.F90 b/GX-PAW/common/src/14_hidewrite/m_cppopts_dumper.F90 new file mode 100644 index 00000000..aa57f932 --- /dev/null +++ b/GX-PAW/common/src/14_hidewrite/m_cppopts_dumper.F90 @@ -0,0 +1,1730 @@ + +!{\src2tex{textfont=tt}} +!!****m* ABINIT/m_cppopts_dumper +!! NAME +!! m_cppopts_dumper +!! +!! FUNCTION +!! Displays preprocessing options activated at compile-time. +!! +!! COPYRIGHT +!! Copyright (C) 2010-2024 ABINIT group (Yann Pouillon) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt. +!! +!! NOTES +!! This file was generated by make-cppopts-dumper, +!! on 2024/03/16 21:07:30 +0000. +!! Any modification will be lost. +!! +!! PARENTS +!! +!! CHILDREN +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +module m_cppopts_dumper + + implicit none + + public :: dump_cpp_options + +contains +!!*** + +!!****f* ABINIT/m_cppopts_dumper/dump_cpp_options +!! NAME +!! dump_cpp_options +!! +!! FUNCTION +!! Reports a printout of the CPP options used at compile-time, +!! useful for error messages and debugging. +!! +!! INPUTS +!! my_unit= Fortran unit number (optional, default is std_out) +!! +!! OUTPUT +!! Only printing. +!! +!! PARENTS +!! +!! CHILDREN +!! +!! SOURCE + +subroutine dump_cpp_options(my_unit) + + use defs_basis + + implicit none + +!Arguments ------------------------------------- + integer,intent(in) :: my_unit + +!Local variables ------------------------------- + character(len=26) :: tmp + character(len=80) :: msg + integer :: msg_index + +! ********************************************************************** + + write(my_unit,"(a,1x,a)") ch10,repeat("+",78) + write(my_unit,"(1x,a,a)") "CPP options activated during the build:",ch10 + + msg_index = 0 + msg = "" + +#if defined CC_ARM + write(tmp,"(1x,a25)") "CC_ARM" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined CC_CRAY + write(tmp,"(1x,a25)") "CC_CRAY" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined CC_GNU + write(tmp,"(1x,a25)") "CC_GNU" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined CC_IBM + write(tmp,"(1x,a25)") "CC_IBM" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined CC_INTEL + write(tmp,"(1x,a25)") "CC_INTEL" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined CC_LLVM + write(tmp,"(1x,a25)") "CC_LLVM" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined CC_NVHPC + write(tmp,"(1x,a25)") "CC_NVHPC" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined CC_PGI + write(tmp,"(1x,a25)") "CC_PGI" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined CXX_ARM + write(tmp,"(1x,a25)") "CXX_ARM" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined CXX_CRAY + write(tmp,"(1x,a25)") "CXX_CRAY" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined CXX_GNU + write(tmp,"(1x,a25)") "CXX_GNU" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined CXX_IBM + write(tmp,"(1x,a25)") "CXX_IBM" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined CXX_INTEL + write(tmp,"(1x,a25)") "CXX_INTEL" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined CXX_LLVM + write(tmp,"(1x,a25)") "CXX_LLVM" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined CXX_NVHPC + write(tmp,"(1x,a25)") "CXX_NVHPC" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined CXX_PGI + write(tmp,"(1x,a25)") "CXX_PGI" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined DEBUG_CONTRACT + write(tmp,"(1x,a25)") "DEB*G_CONTRACT" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined DEBUG_MODE + write(tmp,"(1x,a25)") "DEB*G_MODE" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined DEBUG_VERBOSE + write(tmp,"(1x,a25)") "DEB*G_VERBOSE" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined FC_ABSOFT + write(tmp,"(1x,a25)") "FC_ABSOFT" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined FC_AOCC + write(tmp,"(1x,a25)") "FC_AOCC" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined FC_ARM + write(tmp,"(1x,a25)") "FC_ARM" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined FC_CRAY + write(tmp,"(1x,a25)") "FC_CRAY" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined FC_GNU + write(tmp,"(1x,a25)") "FC_GNU" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined FC_IBM + write(tmp,"(1x,a25)") "FC_IBM" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined FC_INTEL + write(tmp,"(1x,a25)") "FC_INTEL" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined FC_LLVM + write(tmp,"(1x,a25)") "FC_LLVM" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined FC_NAG + write(tmp,"(1x,a25)") "FC_NAG" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined FC_NVHPC + write(tmp,"(1x,a25)") "FC_NVHPC" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined FC_PGI + write(tmp,"(1x,a25)") "FC_PGI" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_ABINIT_COMMON + write(tmp,"(1x,a25)") "HAVE_ABINIT_COMMON" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_ATOMPAW + write(tmp,"(1x,a25)") "HAVE_ATOMPAW" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_AVX_SAFE_MODE + write(tmp,"(1x,a25)") "HAVE_AVX_SAFE_MODE" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_BIGDFT + write(tmp,"(1x,a25)") "HAVE_BIGDFT" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_BSE_UNPACKED + write(tmp,"(1x,a25)") "HAVE_BSE_UNPACKED" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_CCLOCK + write(tmp,"(1x,a25)") "HAVE_CCLOCK" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_CRPA_OPTIM + write(tmp,"(1x,a25)") "HAVE_CRPA_OPTIM" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_DFTI + write(tmp,"(1x,a25)") "HAVE_DFTI" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_FC_ALLOCATABLE_DTARRAYS + write(tmp,"(1x,a25)") "HAVE_FC_ALLOCATABLE_DT..." + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_FC_ASYNC + write(tmp,"(1x,a25)") "HAVE_FC_ASYNC" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_FC_BACKTRACE + write(tmp,"(1x,a25)") "HAVE_FC_BACKTRACE" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_FC_COMMAND_ARGUMENT + write(tmp,"(1x,a25)") "HAVE_FC_COMMAND_ARGUMENT" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_FC_COMMAND_LINE + write(tmp,"(1x,a25)") "HAVE_FC_COMMAND_LINE" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_FC_CONTIGUOUS + write(tmp,"(1x,a25)") "HAVE_FC_CONTIGUOUS" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_FC_CPUTIME + write(tmp,"(1x,a25)") "HAVE_FC_CPUTIME" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_FC_ETIME + write(tmp,"(1x,a25)") "HAVE_FC_ETIME" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_FC_EXIT + write(tmp,"(1x,a25)") "HAVE_FC_EXIT" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_FC_FLUSH + write(tmp,"(1x,a25)") "HAVE_FC_FLUSH" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_FC_FLUSH_ + write(tmp,"(1x,a25)") "HAVE_FC_FLUSH_" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_FC_GAMMA + write(tmp,"(1x,a25)") "HAVE_FC_GAMMA" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_FC_GETENV + write(tmp,"(1x,a25)") "HAVE_FC_GETENV" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_FC_GETPID + write(tmp,"(1x,a25)") "HAVE_FC_GETPID" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_FC_IEEE_ARITHMETIC + write(tmp,"(1x,a25)") "HAVE_FC_IEEE_ARITHMETIC" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_FC_IEEE_EXCEPTIONS + write(tmp,"(1x,a25)") "HAVE_FC_IEEE_EXCEPTIONS" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_FC_INT_QUAD + write(tmp,"(1x,a25)") "HAVE_FC_INT_QUAD" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_FC_IOMSG + write(tmp,"(1x,a25)") "HAVE_FC_IOMSG" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_FC_ISO_C_BINDING + write(tmp,"(1x,a25)") "HAVE_FC_ISO_C_BINDING" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_FC_ISO_FORTRAN_2008 + write(tmp,"(1x,a25)") "HAVE_FC_ISO_FORTRAN_2008" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_FC_LONG_LINES + write(tmp,"(1x,a25)") "HAVE_FC_LONG_LINES" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_FC_MACRO_NEWLINE + write(tmp,"(1x,a25)") "HAVE_FC_MACRO_NEWLINE" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_FC_MOVE_ALLOC + write(tmp,"(1x,a25)") "HAVE_FC_MOVE_ALLOC" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_FC_ON_THE_FLY_SHAPE + write(tmp,"(1x,a25)") "HAVE_FC_ON_THE_FLY_SHAPE" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_FC_PRIVATE + write(tmp,"(1x,a25)") "HAVE_FC_PRIVATE" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_FC_PROTECTED + write(tmp,"(1x,a25)") "HAVE_FC_PROTECTED" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_FC_SHIFTLR + write(tmp,"(1x,a25)") "HAVE_FC_SHIFTLR" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_FC_STREAM_IO + write(tmp,"(1x,a25)") "HAVE_FC_STREAM_IO" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_FC_SYSTEM + write(tmp,"(1x,a25)") "HAVE_FC_SYSTEM" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_FFTW3 + write(tmp,"(1x,a25)") "HAVE_FFTW3" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_FFTW3_MPI + write(tmp,"(1x,a25)") "HAVE_FFTW3_MPI" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_FFTW3_THREADS + write(tmp,"(1x,a25)") "HAVE_FFTW3_THREADS" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_FORTRAN2003 + write(tmp,"(1x,a25)") "HAVE_FORTRAN2003" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_GPU + write(tmp,"(1x,a25)") "HAVE_GPU" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_GPU_CUDA + write(tmp,"(1x,a25)") "HAVE_GPU_CUDA" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_GPU_CUDA10 + write(tmp,"(1x,a25)") "HAVE_GPU_CUDA10" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_GPU_CUDA3 + write(tmp,"(1x,a25)") "HAVE_GPU_CUDA3" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_GPU_CUDA_DP + write(tmp,"(1x,a25)") "HAVE_GPU_CUDA_DP" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_GPU_CUDA_SP + write(tmp,"(1x,a25)") "HAVE_GPU_CUDA_SP" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_GPU_HIP + write(tmp,"(1x,a25)") "HAVE_GPU_HIP" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_GPU_MARKERS + write(tmp,"(1x,a25)") "HAVE_GPU_MARKERS" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_GPU_MPI + write(tmp,"(1x,a25)") "HAVE_GPU_MPI" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_GPU_SERIAL + write(tmp,"(1x,a25)") "HAVE_GPU_SERIAL" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_GW_DPC + write(tmp,"(1x,a25)") "HAVE_GW_DPC" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_HDF5 + write(tmp,"(1x,a25)") "HAVE_HDF5" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_HDF5_MPI + write(tmp,"(1x,a25)") "HAVE_HDF5_MPI" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_KOKKOS + write(tmp,"(1x,a25)") "HAVE_KOKKOS" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_LEVMAR + write(tmp,"(1x,a25)") "HAVE_LEVMAR" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_LIBPAW + write(tmp,"(1x,a25)") "HAVE_LIBPAW" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_LIBPAW_ABINIT + write(tmp,"(1x,a25)") "HAVE_LIBPAW_ABINIT" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_LIBPSML + write(tmp,"(1x,a25)") "HAVE_LIBPSML" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_LIBTETRA_ABINIT + write(tmp,"(1x,a25)") "HAVE_LIBTETRA_ABINIT" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_LIBXC + write(tmp,"(1x,a25)") "HAVE_LIBXC" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_LINALG_ASL + write(tmp,"(1x,a25)") "HAVE_LINALG_ASL" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_LINALG_AXPBY + write(tmp,"(1x,a25)") "HAVE_LINALG_AXPBY" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_LINALG_ELPA + write(tmp,"(1x,a25)") "HAVE_LINALG_ELPA" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_LINALG_ELPA_2013 + write(tmp,"(1x,a25)") "HAVE_LINALG_ELPA_2013" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_LINALG_ELPA_2014 + write(tmp,"(1x,a25)") "HAVE_LINALG_ELPA_2014" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_LINALG_ELPA_2015_02 + write(tmp,"(1x,a25)") "HAVE_LINALG_ELPA_2015_02" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_LINALG_ELPA_2015_11 + write(tmp,"(1x,a25)") "HAVE_LINALG_ELPA_2015_11" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_LINALG_ELPA_2016 + write(tmp,"(1x,a25)") "HAVE_LINALG_ELPA_2016" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_LINALG_ELPA_2017 + write(tmp,"(1x,a25)") "HAVE_LINALG_ELPA_2017" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_LINALG_ELPA_FORTRAN2008 + write(tmp,"(1x,a25)") "HAVE_LINALG_ELPA_FORTR..." + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_LINALG_ESSL + write(tmp,"(1x,a25)") "HAVE_LINALG_ESSL" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_LINALG_GEMM3M + write(tmp,"(1x,a25)") "HAVE_LINALG_GEMM3M" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_LINALG_GEMMT + write(tmp,"(1x,a25)") "HAVE_LINALG_GEMMT" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_LINALG_MAGMA + write(tmp,"(1x,a25)") "HAVE_LINALG_MAGMA" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_LINALG_MAGMA_15 + write(tmp,"(1x,a25)") "HAVE_LINALG_MAGMA_15" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_LINALG_MKL_IMATCOPY + write(tmp,"(1x,a25)") "HAVE_LINALG_MKL_IMATCOPY" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_LINALG_MKL_OMATADD + write(tmp,"(1x,a25)") "HAVE_LINALG_MKL_OMATADD" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_LINALG_MKL_OMATCOPY + write(tmp,"(1x,a25)") "HAVE_LINALG_MKL_OMATCOPY" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_LINALG_MKL_THREADS + write(tmp,"(1x,a25)") "HAVE_LINALG_MKL_THREADS" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_LINALG_OPENBLAS_THREADS + write(tmp,"(1x,a25)") "HAVE_LINALG_OPENBLAS_T..." + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_LINALG_PLASMA + write(tmp,"(1x,a25)") "HAVE_LINALG_PLASMA" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_LINALG_SCALAPACK + write(tmp,"(1x,a25)") "HAVE_LINALG_SCALAPACK" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_LINALG_ZDOTC_BUG + write(tmp,"(1x,a25)") "HAVE_LINALG_ZDOTC_B*G" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_LINALG_ZDOTU_BUG + write(tmp,"(1x,a25)") "HAVE_LINALG_ZDOTU_B*G" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_LOTF + write(tmp,"(1x,a25)") "HAVE_LOTF" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_MEM_PROFILING + write(tmp,"(1x,a25)") "HAVE_MEM_PROFILING" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_MPI + write(tmp,"(1x,a25)") "HAVE_MPI" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_MPI1 + write(tmp,"(1x,a25)") "HAVE_MPI1" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_MPI2 + write(tmp,"(1x,a25)") "HAVE_MPI2" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_MPI2_INPLACE + write(tmp,"(1x,a25)") "HAVE_MPI2_INPLACE" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_MPI3 + write(tmp,"(1x,a25)") "HAVE_MPI3" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_MPI_BUGGY_INTERFACES + write(tmp,"(1x,a25)") "HAVE_MPI_B*GGY_INTERFACES" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_MPI_GET_LIBRARY_VERSION + write(tmp,"(1x,a25)") "HAVE_MPI_GET_LIBRARY_V..." + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_MPI_IALLGATHER + write(tmp,"(1x,a25)") "HAVE_MPI_IALLGATHER" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_MPI_IALLREDUCE + write(tmp,"(1x,a25)") "HAVE_MPI_IALLREDUCE" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_MPI_IALLTOALL + write(tmp,"(1x,a25)") "HAVE_MPI_IALLTOALL" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_MPI_IALLTOALLV + write(tmp,"(1x,a25)") "HAVE_MPI_IALLTOALLV" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_MPI_IBCAST + write(tmp,"(1x,a25)") "HAVE_MPI_IBCAST" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_MPI_IGATHERV + write(tmp,"(1x,a25)") "HAVE_MPI_IGATHERV" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_MPI_INCLUDED_ONCE + write(tmp,"(1x,a25)") "HAVE_MPI_INCLUDED_ONCE" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_MPI_INTEGER16 + write(tmp,"(1x,a25)") "HAVE_MPI_INTEGER16" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_MPI_IO + write(tmp,"(1x,a25)") "HAVE_MPI_IO" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_MPI_IO_DEFAULT + write(tmp,"(1x,a25)") "HAVE_MPI_IO_DEFAULT" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_MPI_TYPE_CREATE_STRUCT + write(tmp,"(1x,a25)") "HAVE_MPI_TYPE_CREATE_S..." + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_NETCDF + write(tmp,"(1x,a25)") "HAVE_NETCDF" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_NETCDF_CXX + write(tmp,"(1x,a25)") "HAVE_NETCDF_CXX" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_NETCDF_CXX_MPI + write(tmp,"(1x,a25)") "HAVE_NETCDF_CXX_MPI" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_NETCDF_DEFAULT + write(tmp,"(1x,a25)") "HAVE_NETCDF_DEFAULT" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_NETCDF_FORTRAN + write(tmp,"(1x,a25)") "HAVE_NETCDF_FORTRAN" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_NETCDF_FORTRAN_MPI + write(tmp,"(1x,a25)") "HAVE_NETCDF_FORTRAN_MPI" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_NETCDF_MPI + write(tmp,"(1x,a25)") "HAVE_NETCDF_MPI" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_NUMPY + write(tmp,"(1x,a25)") "HAVE_NUMPY" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_OMP_COLLAPSE + write(tmp,"(1x,a25)") "HAVE_OMP_COLLAPSE" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_OPENMP + write(tmp,"(1x,a25)") "HAVE_OPENMP" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_OPENMP_GET_MAPPED_PTR + write(tmp,"(1x,a25)") "HAVE_OPENMP_GET_MAPPED..." + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_OPENMP_OFFLOAD + write(tmp,"(1x,a25)") "HAVE_OPENMP_OFFLOAD" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_OPENMP_OFFLOAD_DATASTRUCTURE + write(tmp,"(1x,a25)") "HAVE_OPENMP_OFFLOAD_DA..." + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_OS_LINUX + write(tmp,"(1x,a25)") "HAVE_OS_LINUX" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_OS_MACOSX + write(tmp,"(1x,a25)") "HAVE_OS_MACOSX" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_OS_WINDOWS + write(tmp,"(1x,a25)") "HAVE_OS_WINDOWS" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_PAPI + write(tmp,"(1x,a25)") "HAVE_PAPI" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_PFFT + write(tmp,"(1x,a25)") "HAVE_PFFT" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_PYTHON_INVOCATION + write(tmp,"(1x,a25)") "HAVE_PYTHON_INVOCATION" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_TIMER_ABINIT + write(tmp,"(1x,a25)") "HAVE_TIMER_ABINIT" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_TRIQS + write(tmp,"(1x,a25)") "HAVE_TRIQS" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_TRIQS_v1_4 + write(tmp,"(1x,a25)") "HAVE_TRIQS_v1_4" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_TRIQS_v2_0 + write(tmp,"(1x,a25)") "HAVE_TRIQS_v2_0" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_WANNIER90 + write(tmp,"(1x,a25)") "HAVE_WANNIER90" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_WANNIER90_V1 + write(tmp,"(1x,a25)") "HAVE_WANNIER90_V1" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_XML + write(tmp,"(1x,a25)") "HAVE_XML" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_XMLF90 + write(tmp,"(1x,a25)") "HAVE_XMLF90" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined HAVE_YAKL + write(tmp,"(1x,a25)") "HAVE_YAKL" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif +#if defined READ_FROM_FILE + write(tmp,"(1x,a25)") "READ_FROM_FILE" + msg = trim(msg)//trim(tmp) + msg_index = msg_index + 1 + if ( mod(msg_index,3) == 0 ) then + msg = trim(msg)//ch10 + write(my_unit,'(a)') msg + msg = "" + end if +#endif + + if ( mod(msg_index,3) /= 0 ) write(my_unit,'(a)') msg + + write(my_unit,"(1x,a,a)") repeat("+",78),ch10 + +end subroutine dump_cpp_options + +end module m_cppopts_dumper +!!*** diff --git a/GX-PAW/common/src/14_hidewrite/m_cppopts_dumper.o b/GX-PAW/common/src/14_hidewrite/m_cppopts_dumper.o new file mode 100644 index 00000000..7737dbf7 Binary files /dev/null and b/GX-PAW/common/src/14_hidewrite/m_cppopts_dumper.o differ diff --git a/GX-PAW/common/src/14_hidewrite/m_fstrings.F90 b/GX-PAW/common/src/14_hidewrite/m_fstrings.F90 new file mode 100644 index 00000000..cf749984 --- /dev/null +++ b/GX-PAW/common/src/14_hidewrite/m_fstrings.F90 @@ -0,0 +1,2076 @@ +!!****m* ABINIT/m_fstrings +!! NAME +!! m_fstrings +!! +!! FUNCTION +!! This module contains basic tools to operate on Fortran strings. +!! +!! COPYRIGHT +!! Copyright (C) 2008-2024 ABINIT group (MG, XG, MT, DC) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" + +MODULE m_fstrings + + use, intrinsic :: iso_c_binding + + use defs_basis, only : dp, std_out, ch10 + + implicit none + + private + + public :: is_letter ! Returns .TRUE. if ch is a letter and .FALSE. otherwise + public :: is_digit ! Returns .TRUE. if ch is a digit (0,1,...,9) and .FALSE. otherwise + public :: find_digit ! Returns the position of the first digit in string. 0 if not found. + public :: upper ! Convert lower case letters to UPPER CASE + public :: toupper ! Convert lower case letters to UPPER CASE (function version) + public :: lower ! Convert UPPER CASE letters to lower case + public :: tolower ! Convert UPPER CASE letters to lower case (function version) + public :: removesp ! Removes spaces, tabs, and control characters in string str + public :: replace_ch0 ! Replace final '\0' with whitespaces + public :: lstrip ! Remove leading spaces from string + public :: replace ! Replace chars in string. + public :: ljust ! Return a left-justified string of length width. + public :: lpad ! Pad a string adding repeat characters fillchar on the left side. + public :: round_brackets ! Return a new string enclosed in parentheses if not already present. + public :: quote ! Return a new string enclosed by quotation marks. + public :: rmquotes ! Remove quotation marks from a string. Return new string + public :: write_num ! Writes a number to a string using format fmt + public :: trimzero ! Deletes nonsignificant trailing zeroes from a number string. + public :: writeq ! Writes a string of the form = value to unit + public :: strcat ! Concatenate strings (function version) + public :: sjoin ! Joins strings with a space separator. + public :: yesno ! Convert boolean to "yes", "no" + public :: itoa ! Convert an integer into a string + public :: ftoa ! Convert a float into a string + public :: ktoa ! Convert a k-point into a string. + public :: stoa ! Convert a spin index into a string + public :: ltoa ! Convert a list into a string. + public :: atoi ! Convert a string into a integer + public :: atof ! Convert a string into a floating-point number. + public :: basename ! Returns the final component of a pathname. + public :: firstchar ! Returns .TRUE. is the first character in a string belongs to a gives set. + public :: startswith ! Returns .TRUE. is the string starts with the specified prefix. + public :: endswith ! Returns .True if the string ends with the specified suffix. + public :: indent ! Indent text + public :: string_in ! Compare input str with a list of comma-separated strings + public :: prep_char ! Prepend `char` to each line in a string. + public :: int2char4 ! Convert a positive integer number (zero included) to a character(len=*) + ! with trailing zeros if the number is <=9999 + public :: int2char10 ! Convert a positive integer number (zero included) to a character(len=10) + ! with trailing blanks + public :: char_count ! Count the occurrences of a character in a string. + public :: next_token ! Tokenize a string made of whitespace-separated tokens. + public :: inupper ! Maps all characters in string to uppercase except for tokens between quotation marks. + public :: find_and_select ! Find substring and select value in list depending on substring + + !TODO method to center a string + interface itoa + module procedure itoa_1b + module procedure itoa_4b + end interface itoa + + interface write_num + module procedure write_rdp_0D + module procedure write_int_0D + end interface write_num + + interface writeq + module procedure writeq_rdp_0D + module procedure writeq_int_0D + end interface writeq + + interface is_digit + module procedure is_digit_0D + end interface is_digit + + interface firstchar + module procedure firstchar_0d + module procedure firstchar_1d + end interface firstchar + + interface sjoin + module procedure sjoin_2 + module procedure sjoin_3 + module procedure sjoin_4 + module procedure sjoin_5 + module procedure sjoin_6 + module procedure sjoin_7 + end interface sjoin + + interface strcat + module procedure strcat_2 + module procedure strcat_3 + module procedure strcat_4 + module procedure strcat_5 + end interface strcat + + interface ltoa + module procedure ltoa_int + module procedure ltoa_dp + end interface ltoa + + character(len=1),parameter :: BLANK=' ' + character(len=1),parameter :: NCHAR = char(10) + character(len=1),parameter :: DIR_SEPARATOR = '/' + + integer,parameter :: ASCII_A=ICHAR('A') + integer,parameter :: ASCII_Z=ICHAR('Z') + integer,parameter :: ASCII_aa=ICHAR('a') + integer,parameter :: ASCII_zz=ICHAR('z') + integer,parameter :: SHIFT=ASCII_aa-ASCII_A ! Capital letters have smaller Dec value in the ASCII table. + integer,parameter :: ASCII_0=ICHAR('0') + integer,parameter :: ASCII_9=ICHAR('9') + + integer,parameter :: MAX_SLEN = 500 + + +CONTAINS !=========================================================== +!!*** + +!!****f* m_fstrings/is_letter +!! NAME +!! is_letter +!! +!! FUNCTION +!! Returns .TRUE. if ch is a letter and .FALSE. otherwise. +!! +!! SOURCE + +pure function is_letter(ch) result(ans) + + character(len=1),intent(in) :: ch + logical :: ans +! ********************************************************************* + + select case (ICHAR(ch)) + case (ASCII_A:ASCII_Z,ASCII_aa:ASCII_zz) + ans=.TRUE. + case DEFAULT + ans=.FALSE. + end select + +end function is_letter +!!*** + +!!****f* m_fstrings/is_digit_0D +!! NAME +!! is_digit_0D +!! +!! FUNCTION +!! Returns .TRUE. if ch is a digit (0,1,...,9) and .FALSE. otherwise. +!! +!! SOURCE + +pure function is_digit_0D(ch) result(ans) + +!Arguments ------------------------------------ + character(len=1),intent(in) :: ch + logical :: ans +! ********************************************************************* + + select case (ICHAR(ch)) + case(ASCII_0:ASCII_9) + ans=.TRUE. + case default + ans=.FALSE. + end select + +end function is_digit_0D +!!*** + +!!****f* m_fstrings/find_digit +!! NAME +!! find_digit +!! +!! FUNCTION +!! Returns the position of the first digit in string. 0 if not found. +!! +!! SOURCE + +integer pure function find_digit(string) result(ii) + +!Arguments ------------------------------------ + character(len=*),intent(in) :: string + +! ********************************************************************* + + do ii=1,len_trim(string) + if (is_digit(string(ii:ii))) return + end do + ii = 0 + +end function find_digit +!!*** + +!!****f* m_fstrings/upper +!! NAME +!! upper +!! +!! FUNCTION +!! Convert lower case letters to UPPER CASE. +!! +!! SOURCE + +pure subroutine upper(str) + + character(len=*),intent(inout) :: str + +!Local variables------------------------------- + integer :: ic,iasc +! ********************************************************************* + + do ic=1,LEN_TRIM(str) + iasc=IACHAR(str(ic:ic)) + if (iasc>=ASCII_aa.and.iasc<=ASCII_zz) str(ic:ic)=ACHAR(iasc-SHIFT) + end do + +end subroutine upper +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_fstrings/toupper +!! NAME +!! toupper +!! +!! FUNCTION +!! Convert lower case letters to UPPER CASE (function version). +!! +!! SOURCE + +pure function toupper(str_in) result(str_out) + + character(len=*),intent(in) :: str_in + character(len=LEN_TRIM(str_in)) :: str_out + +!Local variables------------------------------- + integer :: ic,iasc +! ********************************************************************* + + do ic=1,LEN_TRIM(str_in) + iasc=IACHAR(str_in(ic:ic)) + if (iasc>=ASCII_aa.and.iasc<=ASCII_zz) then + str_out(ic:ic)=ACHAR(iasc-SHIFT) + else + str_out(ic:ic)=str_in(ic:ic) + end if + end do + +end function toupper +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_fstrings/lower +!! NAME +!! lower +!! +!! FUNCTION +!! Convert UPPER CASE letters to lower case. +!! +!! SOURCE + +pure subroutine lower(str) + + character(len=*),intent(inout) :: str + +!Local variables------------------------------- + integer :: ic,iasc +! ********************************************************************* + + do ic=1,LEN_TRIM(str) + iasc=IACHAR(str(ic:ic)) + if (iasc>=ASCII_A.and.iasc<=ASCII_Z) str(ic:ic)=ACHAR(iasc+SHIFT) + end do + +end subroutine lower +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_fstrings/tolower +!! NAME +!! tolower +!! +!! FUNCTION +!! Convert UPPER CASE letters to lower case (function version). +!! +!! SOURCE + +pure function tolower(str_in) result(str_out) + + character(len=*),intent(in) :: str_in + character(len=LEN_TRIM(str_in)) :: str_out + +!Local variables------------------------------- + integer :: ic,iasc +! ********************************************************************* + + do ic=1,LEN_TRIM(str_in) + iasc=IACHAR(str_in(ic:ic)) + if (iasc>=ASCII_A.and.iasc<=ASCII_Z) then + str_out(ic:ic)=ACHAR(iasc+SHIFT) + else + str_out(ic:ic)=str_in(ic:ic) + end if + end do + +end function tolower +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_fstrings/removesp +!! NAME +!! removesp +!! +!! FUNCTION +!! Removes spaces, tabs, and control characters in string str. +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +subroutine removesp(str) + + character(len=*),intent(inout) :: str + +!Local variables------------------------------- + integer :: i,k,lenstr,ich + character(len=1):: ch + character(len=LEN_TRIM(str)):: outstr +! ********************************************************************* + + str=ADJUSTL(str) ; lenstr=LEN_TRIM(str) + + outstr=BLANK ; k=0 + do i=1,lenstr + ch=str(i:i) + ich=IACHAR(ch) + select case(ich) + case(0:32) ! space, tab, or control character + CYCLE + case(33:) + k=k+1 + outstr(k:k)=ch + end select + end do + + str=ADJUSTL(outstr) + +end subroutine removesp +!!*** + +!!****m* m_fstrings/replace_ch0 +!! NAME +!! replace_ch0 +!! +!! FUNCTION +!! Little tool to change all final '\0' (end of string in C) characters to ' ' (space). +!! +!! SIDE EFFECTS +!! * string = the string to convert. It is done in-place. +!! +!! SOURCE + +elemental subroutine replace_ch0(string) + + character(len=*), intent(inout) :: string + + integer :: i, l + + i = index(string, char(0)) + if (i > 0) then + l = len(string) + string(i:l) = repeat(" ", l - i + 1) + end if + +end subroutine replace_ch0 +!!*** + +!!****m* m_fstrings/replace +!! NAME +!! replace +!! +!! FUNCTION +!! Replace `text` with `rep` in string `s`. Return new string. +!! +!! NOTES: +!! The length of the output string is increased by 500 but this could not be enough +!! if len_trim(text) > len_trim(re) and there are several occurrences of `text` in s. +!! +!! SOURCE + +function replace(s, text, rep) result(outs) + + character(len=*),intent(in) :: s, text, rep + character(len(s)+500) :: outs ! provide outs with extra 500 char len + +!Local variables------------------------------- + integer :: i, j, nt, nr, last +! ********************************************************************* + + outs = s; nt = len_trim(text); nr = len_trim(rep); last = 1 + do + i = index(outs(last:), text(1:nt)); if (i == 0) exit + j = last + i - 1; last = j + nr + if (j - 1 < 1) then + outs = rep(:nr) // outs(j+nt:) + else + outs = outs(:j-1) // rep(:nr) // outs(j+nt:) + end if + end do + +end function replace +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_fstrings/lstrip +!! NAME +!! lstrip +!! +!! FUNCTION +!! Removes leading spaces from the input string. +!! +!! SOURCE + +pure function lstrip(istr) result(ostr) + + character(len=*),intent(in) :: istr + character(len=len(istr)) :: ostr + +!Local variables------------------------------- + integer :: ii,jj,lg +! ********************************************************************* + + lg=LEN(istr) + do ii=1,lg + if (istr(ii:ii)/=BLANK) EXIT + end do + + ostr = " " + do jj=1,lg-ii+1 + ostr(jj:jj) = istr(ii:ii) + ii=ii+1 + end do + +end function lstrip +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_fstrings/ljust +!! NAME +!! ljust +!! +!! FUNCTION +!! Return S left-justified in a string of length width. Padding is +!! done using the specified fill character (default is a space). +!! +!! SOURCE + +pure function ljust(istr, width, fillchar) result(ostr) + + character(len=*),intent(in) :: istr + integer,intent(in) :: width + character(len=width) :: ostr + character(len=1),optional,intent(in) :: fillchar + +!Local variables------------------------------- + integer :: ii +! ********************************************************************* + + ostr = ADJUSTL(istr) + + if (PRESENT(fillchar)) then + do ii=LEN_TRIM(ostr)+1,width + ostr(ii:ii) = fillchar + end do + end if + +end function ljust +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_fstrings/lpad +!! NAME +!! lpad +!! +!! FUNCTION +!! Pad a string adding repeat characters fillchar on the left side. +!! Padding is done using the specified fill character (default is a blanck character). +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +pure function lpad(istr, repeat, fillchar) result(ostr) + + character(len=*),intent(in) :: istr + integer,intent(in) :: repeat + character(len=LEN_TRIM(istr) + repeat) :: ostr + character(len=1),optional,intent(in) :: fillchar + +!Local variables------------------------------- + integer :: ii + character(len=1) :: ch +! ********************************************************************* + + ostr(repeat+1:) = TRIM(istr) + + ch = " "; if (PRESENT(fillchar)) ch = fillchar + do ii=1,repeat + ostr(ii:ii) = ch + end do + +end function lpad +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_fstrings/round_brackets +!! NAME +!! round_brackets +!! +!! FUNCTION +!! Return a new string enclosed in parentheses if not already present. +!! +!! SOURCE + +pure function round_brackets(istr) result(ostr) + + character(len=*),intent(in) :: istr + character(len=LEN_TRIM(istr)+2) :: ostr + +!Local variables------------------------------- + integer :: ii + character(len=1) :: qq + character(len=LEN(istr)+2) :: tmp + +! ********************************************************************* + + do ii=1,LEN(istr) + if (istr(ii:ii)/=BLANK) EXIT + end do + + qq = istr(ii:ii) + + if (qq == "(") then + ! Don't add quotation marks if they already present. + tmp = istr + ii = LEN_TRIM(tmp) + ! If the string is not closed, fix it. + if (tmp(ii:ii) /= ")") tmp(ii+1:ii+1) = ")" + ostr = TRIM(tmp) + + else + qq = '(' + ostr(1:1) = qq + ostr(2:) = TRIM(istr) + ii = LEN_TRIM(ostr)+1 + ostr(ii:ii) = ")" + end if + +end function round_brackets +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_fstrings/quote +!! NAME +!! quote +!! +!! FUNCTION +!! Return a new string enclosed by quotation marks. +!! +!! SOURCE + +pure function quote(istr) result(ostr) + + character(len=*),intent(in) :: istr + character(len=LEN_TRIM(istr)+2) :: ostr + +!Local variables------------------------------- + integer :: ii + character(len=1) :: qq + character(len=LEN(istr)+2) :: tmp + +! ********************************************************************* + + do ii=1,LEN(istr) + if (istr(ii:ii)/=BLANK) EXIT + end do + + qq = istr(ii:ii) + + if (qq == "'" .or. qq == '"') then + ! Don't add quotation marks if they already present. + tmp = istr + ii = LEN_TRIM(tmp) + ! If the string is not closed, fix it. + if (tmp(ii:ii) /= qq) tmp(ii+1:ii+1) = qq + ostr = TRIM(tmp) + + else + qq = '"' + ostr(1:1) = qq + ostr(2:) = TRIM(istr) + ii = LEN_TRIM(ostr)+1 + ostr(ii:ii) = qq + end if + +end function quote +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_fstrings/rmquotes +!! NAME +!! rmquotes +!! +!! FUNCTION +!! Remove quotation marks from a string. Return new string +!! +!! SOURCE + +pure function rmquotes(istr) result(ostr) + + character(len=*),intent(in) :: istr + character(len=len(istr)) :: ostr + +!Local variables------------------------------- + integer :: ii,cnt + +! ********************************************************************* + + ostr = ""; cnt = 0 + do ii=1,len_trim(istr) + if (any(istr(ii:ii) == ["'", '"'])) cycle + cnt = cnt + 1 + ostr(cnt:cnt) = istr(ii:ii) + end do + +end function rmquotes +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_fstrings/write_rdp_0d +!! NAME +!! write_rdp_0d +!! +!! FUNCTION +!! Writes a number to a string using format fmt. +!! +!! SOURCE + +subroutine write_rdp_0d(rnum,str,fmt) + +!Arguments ------------------------------------ + real(dp),intent(in) :: rnum + character(len=*),intent(in) :: fmt + character(len=*),intent(out) :: str + +!Local variables------------------------------- + character(len=LEN(fmt)+2) :: formt +! ********************************************************************* + + formt='('//TRIM(fmt)//')' + write(str,formt)rnum + str=ADJUSTL(str) + +end subroutine write_rdp_0D +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_fstrings/write_int_0d +!! NAME +!! write_int_0d +!! +!! FUNCTION +!! Writes a number to a string using format fmt. +!! +!! SOURCE + +subroutine write_int_0D(inum,str,fmt) + +!Arguments ------------------------------------ + integer,intent(in) :: inum + character(len=*),intent(in) :: fmt + character(len=*),intent(out) :: str + +!Local variables------------------------------- + character(len=LEN(fmt)+2) :: formt +! ********************************************************************* + + formt='('//TRIM(fmt)//')' + write(str,formt) inum + str=ADJUSTL(str) + +end subroutine write_int_0D +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_fstrings/trimzero +!! NAME +!! trimzero +!! +!! FUNCTION +!! Deletes nonsignificant trailing zeroes from number string str. If number +!! string ends in a decimal point, one trailing zero is added. +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE +! NOT sure it will work + +subroutine trimzero(str) + + character(len=*),intent(inout) :: str + +!Local variables------------------------------- + integer :: i,ipos,lstr + character :: ch + character(len=10) :: sexp +! ********************************************************************* + + ipos=SCAN(str,'eE') + if (ipos>0) then + sexp=str(ipos:) + str=str(1:ipos-1) + end if + lstr=LEN_TRIM(str) + do i=lstr,1,-1 + ch=str(i:i) + if (ch=='0') CYCLE + if (ch=='.') then + str=str(1:i)//'0' + if (ipos>0) str=TRIM(str)//TRIM(sexp) + EXIT + end if + str=str(1:i) + EXIT + end do + + if (ipos>0) str=TRIM(str)//TRIM(sexp) + +end subroutine trimzero +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_fstrings/writeq_rdp_0D +!! NAME +!! writeq_rdp_0D +!! +!! FUNCTION +!! Writes a string of the form = value to unit. +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE +subroutine writeq_rdp_0D(unit,namestr,value,fmt) + + real(dp),intent(in) :: value + integer,intent(in) :: unit + character(len=*),intent(in) :: fmt + character(len=*),intent(in) :: namestr + +!Local variables------------------------------- + character(len=32) :: tempstr +! ********************************************************************* + + call write_num(value,tempstr,fmt) + call trimzero(tempstr) + write(unit,*)TRIM(namestr)//' = '//TRIM(tempstr) + +end subroutine writeq_rdp_0D +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_fstrings/writeq_int_0D +!! NAME +!! writeq_int_0D +!! +!! FUNCTION +!! Writes a string of the form = value to unit. +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +subroutine writeq_int_0D(unit,namestr,ivalue,fmt) + + integer,intent(in) :: ivalue + integer,intent(in) :: unit + character(len=*),intent(in) :: namestr + character(len=*),intent(in) :: fmt + +!Local variables------------------------------- + character(len=32) :: tempstr +! ********************************************************************* + + call write_num(ivalue,tempstr,fmt) + call trimzero(tempstr) + write(unit,*)TRIM(namestr)//' = '//TRIM(tempstr) + +end subroutine writeq_int_0D +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_fstrings/sjoin_2 +!! NAME +!! sjoin_2 +!! +!! FUNCTION +!! Joins two strings with a space separator except if first string is empty. +!! + +pure function sjoin_2(str1,str2) result(ostr) + + character(len=*),intent(in) :: str1,str2 + character(len=LEN_TRIM(str1)+LEN_TRIM(str2)+1) :: ostr + +! ********************************************************************* + + if (len_trim(str1) > 0) then + ostr=TRIM(str1)//" "//TRIM(str2) + else + ostr=TRIM(str2) + end if + +end function sjoin_2 +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_fstrings/sjoin_3 +!! NAME +!! sjoin_3 +!! +!! FUNCTION +!! Joins three strings with a space separator. +!! + +pure function sjoin_3(str1,str2,str3) result(ostr) + + character(len=*),intent(in) :: str1,str2,str3 + character(len=LEN_TRIM(str1)+LEN_TRIM(str2)+LEN_TRIM(str3)+2) :: ostr + +! ********************************************************************* + + ostr = sjoin_2(sjoin_2(str1, str2), str3) + +end function sjoin_3 +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_fstrings/sjoin_4 +!! NAME +!! sjoin_4 +!! +!! FUNCTION +!! Joins four strings with a space separator. +!! + +pure function sjoin_4(str1,str2,str3,str4) result(ostr) + + character(len=*),intent(in) :: str1,str2,str3,str4 + character(len=LEN_TRIM(str1)+LEN_TRIM(str2)+LEN_TRIM(str3)+len_trim(str4)+3) :: ostr + +! ********************************************************************* + + ostr = sjoin_2(str1, sjoin_3(str2, str3, str4)) + +end function sjoin_4 +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_fstrings/sjoin_5 +!! NAME +!! sjoin_5 +!! +!! FUNCTION +!! Joins five strings with a space separator. +!! + +pure function sjoin_5(str1,str2,str3,str4,str5) result(ostr) + + character(len=*),intent(in) :: str1,str2,str3,str4,str5 + character(len=LEN_TRIM(str1)+LEN_TRIM(str2)+LEN_TRIM(str3)+len_trim(str4)+len_trim(str5)+4) :: ostr + +! ********************************************************************* + + ostr = sjoin_2(str1, sjoin_4(str2, str3, str4, str5)) + +end function sjoin_5 +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_fstrings/sjoin_6 +!! NAME +!! sjoin_6 +!! +!! FUNCTION +!! Joins six strings with a space separator. +!! + +pure function sjoin_6(str1,str2,str3,str4,str5,str6) result(ostr) + + character(len=*),intent(in) :: str1,str2,str3,str4,str5,str6 + character(len=LEN_TRIM(str1)+LEN_TRIM(str2)+LEN_TRIM(str3)+len_trim(str4)+len_trim(str5)+len_trim(str6)+5) :: ostr + +! ********************************************************************* + + ostr = sjoin_2(str1, sjoin_5(str2, str3, str4, str5, str6)) + +end function sjoin_6 +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_fstrings/sjoin_7 +!! NAME +!! sjoin_7 +!! +!! FUNCTION +!! Joins six strings with a space separator. +!! + +pure function sjoin_7(str1,str2,str3,str4,str5,str6,str7) result(ostr) + + character(len=*),intent(in) :: str1,str2,str3,str4,str5,str6,str7 + character(len=LEN_TRIM(str1)+LEN_TRIM(str2)+LEN_TRIM(str3)+len_trim(str4)+len_trim(str5)+len_trim(str6)+len(str7)+6) & +& :: ostr + +! ********************************************************************* + + ostr = sjoin_2(str1, sjoin_6(str2, str3, str4, str5, str6, str7)) + +end function sjoin_7 +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_fstrings/strcat_2 +!! NAME +!! strcat_2 +!! +!! FUNCTION +!! Returns two concatenated strings. +!! + +pure function strcat_2(str1,str2) result(ostr) + + character(len=*),intent(in) :: str1,str2 + character(len=LEN_TRIM(str1)+LEN_TRIM(str2)) :: ostr + +! ********************************************************************* + + ostr=TRIM(str1)//TRIM(str2) + +end function strcat_2 +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_fstrings/strcat_3 +!! NAME +!! strcat_3 +!! +!! FUNCTION +!! Concatenate 3 strings +!! + +pure function strcat_3(str1, str2, str3) result(ostr) + + character(len=*),intent(in) :: str1,str2,str3 + character(len=LEN_TRIM(str1)+LEN_TRIM(str2)+LEN_TRIM(str3)) :: ostr + +! ********************************************************************* + + ostr = TRIM(str1)//TRIM(str2)//TRIM(str3) + +end function strcat_3 +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_fstrings/strcat_4 +!! NAME +!! strcat_3 +!! +!! FUNCTION +!! Concatenate 4 strings +!! + +pure function strcat_4(str1, str2, str3, str4) result(ostr) + + character(len=*),intent(in) :: str1,str2,str3,str4 + character(len=LEN_TRIM(str1)+LEN_TRIM(str2)+LEN_TRIM(str3)+LEN_TRIM(str4)) :: ostr + +! ********************************************************************* + + ostr = TRIM(str1)//TRIM(str2)//TRIM(str3)//TRIM(str4) + +end function strcat_4 +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_fstrings/strcat_5 +!! NAME +!! strcat_5 +!! +!! FUNCTION +!! Concatenate 5 strings +!! + +pure function strcat_5(str1, str2, str3, str4, str5) result(ostr) + + character(len=*),intent(in) :: str1,str2,str3,str4,str5 + character(len=LEN_TRIM(str1)+LEN_TRIM(str2)+LEN_TRIM(str3)+LEN_TRIM(str4)+LEN_TRIM(str5)) :: ostr + +! ********************************************************************* + + ostr = TRIM(str1)//TRIM(str2)//TRIM(str3)//TRIM(str4)//trim(str5) + +end function strcat_5 +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_fstrings/yesno +!! NAME +!! yesno +!! +!! FUNCTION +!! Convert boolean into "yes" or "no" +!! + +character(len=3) pure function yesno(bool) + +!Arguments ------------------------------------ + logical,intent(in) :: bool + +! ********************************************************************* + + if (bool) then + yesno = "yes" + else + yesno = "no" + end if + +end function yesno +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_fstrings/atoi +!! NAME +!! atoi +!! +!! FUNCTION +!! Convert a string into a integer +!! + +integer function atoi(string) + +!Arguments ------------------------------------ + character(len=*),intent(in) :: string + +! ********************************************************************* + + read(string,*,err=10)atoi + return + 10 write(std_out,*)"Error while trying to convert string to integer. string: ",trim(string) + +end function atoi +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_fstrings/atof +!! NAME +!! atof +!! +!! FUNCTION +!! Convert a string into a floating-point number +!! + +real(dp) function atof(string) + +!Arguments ------------------------------------ + character(len=*),intent(in) :: string + +! ********************************************************************* + + read(string,*,err=10)atof + return + 10 write(std_out,*)"Error while trying to convert string to floating-point. string: ",trim(string) + +end function atof +!!*** + +!!****f* m_fstrings/itoa_1b +!! NAME +!! itoa_1b +!! +!! FUNCTION +!! Convert an integer into a string +!! + +pure function itoa_1b(value) + + integer(c_int8_t),intent(in) :: value + character(len=22) :: itoa_1b + +! ********************************************************************* + + ! len=22 is large enough to contain integer*8 + write(itoa_1b,"(i0)")value + itoa_1b = ADJUSTL(itoa_1b) + +end function itoa_1b +!!*** + +!!****f* m_fstrings/itoa_4b +!! NAME +!! itoa_4b +!! +!! FUNCTION +!! Convert an integer into a string +!! +pure function itoa_4b(value) + + integer,intent(in) :: value + character(len=22) :: itoa_4b + +! ********************************************************************* + + ! len=22 is large enough to contain integer*8 + write(itoa_4b,"(i0)")value + itoa_4b = ADJUSTL(itoa_4b) + +end function itoa_4b +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_fstrings/ftoa +!! NAME +!! ftoa +!! +!! FUNCTION +!! Convert an float into a string using format fmt (es16.6 if fmt is not given). +!! + +pure function ftoa(value, fmt) + + real(dp),intent(in) :: value + character(len=*),optional,intent(in) :: fmt + character(len=MAX_SLEN) :: ftoa + +! ********************************************************************* + + if (present(fmt)) then + write(ftoa,round_brackets(fmt))value + else + write(ftoa,"(es16.6)")value + end if + ftoa = ADJUSTL(ftoa) + +end function ftoa +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_fstrings/ktoa +!! NAME +!! ktoa +!! +!! FUNCTION +!! Convert an k-point into a string using format fmt (es.16.6 if fmt is not given). +!! + +pure function ktoa(kpt, fmt) + + real(dp),intent(in) :: kpt(3) + character(len=*),optional,intent(in) :: fmt + character(len=MAX_SLEN) :: ktoa + +! ********************************************************************* + + if (present(fmt)) then + write(ktoa,fmt)kpt + else + write(ktoa,"(a,3(es11.4,a))")"[",kpt(1),", ",kpt(2),", ",kpt(3),"]" + end if + ktoa = ADJUSTL(ktoa) + +end function ktoa +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_fstrings/stoa +!! NAME +!! stoa +!! +!! FUNCTION +!! Convert a spin index into a string +!! + +character(len=4) pure function stoa(spin) + + integer,intent(in) :: spin + +! ********************************************************************* + + select case (spin) + case (1) + stoa = "UP" + case (2) + stoa = "DOWN" + case default + stoa = "????" + end select + +end function stoa +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_fstrings/ltoa_int +!! NAME +!! ltoa_int +!! +!! FUNCTION +!! Convert a list of integers into a string. +!! +!! CHILDREN + +pure function ltoa_int(list) result(str) + + integer,intent(in) :: list(:) + character(len=MAX_SLEN) :: str + +!Local variables------------------------------- + integer :: ii,base,sz + character(len=MAX_SLEN) :: temp + +! ********************************************************************* + + sz = size(list) + + if (any(sz == [0, 1])) then + if (sz == 0) str = "[]" + if (sz == 1) write(str, "(a,i0,a)")"[",list(1),"]" + return + end if + + str = ""; base = 1 + do ii=1,sz + + ! Write to temp string and copy it to str if we have enough chars. + ! Return if MAX_SLEN is too short. + if (ii == 1) then + write(temp, "(a,i0,a)")"[",list(1),", " + else if (ii == sz) then + write(temp, "(i0,a)")list(ii),"]" + else + write(temp, "(i0,a)")list(ii),", " + end if + + if (base + len_trim(temp) <= MAX_SLEN) then + str(base:) = trim(temp)//" " + base = len_trim(str) + 2 + else + return + end if + end do + +end function ltoa_int +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_fstrings/ltoa_dp +!! NAME +!! ltoa_dp +!! +!! FUNCTION +!! Convert a list of double precision numbers into a string. +!! fmt specifies the format to be used ("es13.4" by default) +!! +!! CHILDREN + +pure function ltoa_dp(list, fmt) result(str) + + real(dp),intent(in) :: list(:) + character(len=*),optional,intent(in) :: fmt + character(len=MAX_SLEN) :: str + +!Local variables------------------------------- + integer :: ii,base,sz + character(len=MAX_SLEN) :: temp,myfmt,fa + +! ********************************************************************* + + myfmt = "es13.4"; if (present(fmt)) myfmt = fmt + sz = size(list) + + if (any(sz == [0, 1])) then + if (sz == 0) str = "[]" + if (sz == 1) write(str, sjoin("(a,",myfmt,",a)")) "[",list(1),"]" + return + end if + + str = ""; base = 1; fa = sjoin("(",myfmt,",a)") + do ii=1,sz + + ! Write to temp string and copy it to str if we have enough chars. + ! Return if MAX_SLEN is too short. + if (ii == 1) then + write(temp, sjoin("(a,",myfmt,",a)")) "[",list(1),"," + else if (ii == sz) then + write(temp, fa)list(ii),"]" + else + write(temp, fa) list(ii),"," + end if + + if (base + len_trim(temp) <= MAX_SLEN) then + str(base:) = trim(temp)// " " + base = len_trim(str) + 2 + else + return + end if + end do + +end function ltoa_dp +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_fstring/basename +!! NAME +!! basename +!! +!! FUNCTION +!! Returns the final component of a pathname. +!! +!! INPUTS +!! string=The input string +!! +!! NOTES +!! * If the input string in not a valid path to a file (i.e not in the form foo/name) +!! a blank strink is returned +!! * We do a backward search becase we want to optimize the algorithm for Fortran strings. +!! +!! SOURCE + +pure function basename(string) + + character(len=*),intent(in) :: string + character(len=LEN_TRIM(string)) :: basename + +!Local variables------------------------------- + integer :: ic,nch_trim,nch +!************************************************************************ + + nch =LEN (string) + nch_trim=LEN_TRIM(string) + + ic = INDEX (TRIM(string), DIR_SEPARATOR, back=.TRUE.) + !write(*,*)'DEBUG ',TRIM(string),ic + + if (ic >= 1 .and. ic <= nch_trim-1) then ! there is stuff after the separator. + basename = string(ic+1:nch_trim) + return + else if (ic==0 .or. ic == nch_trim+1) then ! no separator in string or zero length string, + basename = TRIM(string) ! return trimmed string. + return + else ! (ic == nch_trim) separator is the last char. + basename= BLANK ! This is not a valid path to a file, return blank. + return + end if + +end function basename +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_fstring/firstchar_0d +!! NAME +!! firstchar_0d +!! +!! FUNCTION +!! Return True if string starts with the specified character +!! +!! INPUTS +!! string=The string whose first character has to be cheched +!! ch=Character +!! [csens]=.TRUE. if comparison is done regardless of case. Defaults to .FALSE. +!! +!! +!! SOURCE + +pure function firstchar_0d(string,ch,csens) result(ans) + + logical :: ans + logical,optional,intent(in) :: csens + character(len=*),intent(in) :: string + character(len=1),intent(in) :: ch + +!Local variables------------------------------- + logical :: my_csens +!************************************************************************ + + my_csens=.FALSE.; if (PRESENT(csens)) my_csens = csens + + if (.not.my_csens) then + ans = ( string(1:1) == ch) + else + ans = ( toupper(string(1:1)) == toupper(ch)) + end if + +end function firstchar_0d +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_fstring/firstchar_1d +!! NAME +!! firstchar_1d +!! +!! FUNCTION +!! Returns .TRUE. is the first character of the string belongs to a given list. +!! +!! INPUTS +!! string=The string whose first character has to be cheched +!! char_list=The list of characters. +!! [csens]=.TRUE. if comparison is done regardless of case. Defaults to .FALSE. +!! +!! +!! SOURCE + +pure function firstchar_1d(string,char_list,csens) result(ans) + + logical :: ans + logical,optional,intent(in) :: csens + character(len=*),intent(in) :: string + character(len=1),intent(in) :: char_list(:) + +!Local variables------------------------------- + integer :: ii + logical :: my_csens + character(len=1) :: first_ch +!************************************************************************ + + my_csens=.FALSE.; if (PRESENT(csens)) my_csens = csens + + first_ch = string(1:1) + + ans=.FALSE. + + if (.not.my_csens) then + do ii=1,SIZE(char_list) + ans = ( first_ch == char_list(ii) ); if (ans) EXIT + end do + else + do ii=1,SIZE(char_list) + ans = ( toupper(first_ch) == toupper(char_list(ii)) ); if (ans) EXIT + end do + end if + +end function firstchar_1d +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_fstring/startswith +!! NAME +!! startswith +!! +!! FUNCTION +!! Returns .TRUE. is the string starts with the specified prefix. +!! +!! SOURCE + +pure logical function startswith(string, prefix) result(ans) + + character(len=*),intent(in) :: string + character(len=*),intent(in) :: prefix + +!Local variables------------------------------- + integer :: ii,lenstr,lenpre +!************************************************************************ + + ans = .False. + lenstr = len_trim(string); lenpre = len_trim(prefix) + if (lenpre > lenstr) return + + do ii=1,lenpre + if (prefix(ii:ii) /= string(ii:ii)) return + end do + ans = .True. + +end function startswith +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_fstring/endswith +!! NAME +!! endswith +!! +!! FUNCTION +!! Returns .TRUE. is the string ends with the specified suffix +!! +!! SOURCE + +pure function endswith(string, suffix) result(ans) + + logical :: ans + character(len=*),intent(in) :: string + character(len=*),intent(in) :: suffix + +!Local variables------------------------------- + integer :: ii,p,lenstr,lensuf +!************************************************************************ + + ans = .False. + lenstr = len_trim(string); lensuf = len_trim(suffix) + if (lensuf > lenstr) return + + do ii=1,lensuf + p = lenstr - lensuf + ii + if (suffix(ii:ii) /= string(p:p)) return + end do + ans = .True. + +end function endswith +!!*** + +!!****f* m_fstrings/indent +!! NAME +!! indent +!! +!! FUNCTION +!! Indent text +!! +!! INPUTS +!! istr=Input string +!! +!! PARENTS +!! +!! CHILDREN +!! +!! SOURCE + +pure function indent(istr) result(ostr) + + character(len=*),intent(in) :: istr + character(len=len(istr)*4+4) :: ostr + +!Local variables------------------------------- + integer,parameter :: n=4 ! ostr is large enough to allocate all the possible indentations. + integer :: ii,jj,kk + character(len=1) :: ch + +! ********************************************************************* + + ostr = " " + jj = n + do ii=1,LEN_TRIM(istr) + ch = istr(ii:ii) + jj = jj + 1 + if (ch == NCHAR) then + ostr(jj:jj) = NCHAR + do kk=jj+1,jj+n + ostr(kk:kk) = " " + end do + jj = jj+n + else + ostr(jj:jj) = ch + end if + end do + !ostr(jj+1:) = "H" + +end function indent +!!*** + +!!****f* m_fstrings/string_in +!! NAME +!! string_in +!! +!! FUNCTION +!! Compare input str with a list of comma-separated strings +!! Example: string_in("foo", "foo, bar") --> True +!! +!! INPUTS +!! string=Input string +!! +!! SOURCE + +pure logical function string_in(string, tokens) result(ans) + + character(len=*),intent(in) :: string, tokens + +!Local variables------------------------------- + integer :: ii, prev, cnt + +! ********************************************************************* + + ans = .False. + prev = 0; cnt = 0 + do ii=1,len_trim(tokens) + if (tokens(ii:ii) == ",") then + cnt = cnt + 1 + if (trim(lstrip(string)) == lstrip(tokens(prev+1:ii-1))) then + ans = .True.; return + end if + prev = ii + end if + end do + + if (cnt == 0) then + ans = trim(lstrip(string)) == trim(lstrip(tokens)); return + end if + + ! Handle last item if "foo, bar" + ans = trim(lstrip(string)) == lstrip(tokens(prev+1:ii-1)) + +end function string_in +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_fstrings/prep_char +!! NAME +!! prep_char +!! +!! FUNCTION +!! Prepend `char` to each line in a string. +!! +!! INPUTS +!! istr=Input string +!! +!! SOURCE + +pure function prep_char(istr, one_char) result(ostr) + + character(len=*),intent(in) :: istr + character(len=2*len(istr)) :: ostr + character(len=1),intent(in) :: one_char + +!Local variables------------------------------- + integer :: ii,jj + character(len=1) :: ch + +! ********************************************************************* + ostr = "" + jj = 1; ostr(jj:jj) = one_char + !jj = 0 + + do ii=1,LEN_TRIM(istr) + ch = istr(ii:ii) + jj = jj + 1 + if (ch == ch10) then + ostr(jj:jj) = ch10 + ostr(jj+1:jj+1) = one_char + jj = jj+1 + else + ostr(jj:jj) = ch + end if + end do + !ostr(jj+1:) = "H" + +end function prep_char +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_fstrings/int2char4 +!! NAME +!! int2char4 +!! +!! FUNCTION +!! Convert an integer number to ("2") a character(len=*) +!! with trailing zeros if the number is <=9999. +!! Exemple : 123 will be mapped to "0123" ; 12345 will be mapped to "12345" +!! Makes sure that the integer fits the string length +!! (ex.: between 0 and 99999 if the string is a character(len=5)). +!! +!! INPUTS +!! iint=integer to be converted +!! +!! OUTPUT +!! string=character string ('####...' if error) +!! +!! SOURCE + +pure subroutine int2char4(iint,string) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: iint + character(len=*),intent(out) :: string + +!Local variables------------------------------- + integer :: lenstr + +! ************************************************************************* + + lenstr=min(len(string),25) + if(iint<0 .or. iint>10._dp**(lenstr-1))then + string=repeat('#',lenstr) + return + end if + if(iint<10)then + write(string,'("000",i1)')iint + else if(iint<100)then + write(string,'("00",i2)')iint + else if(iint<1000)then + write(string,'("0",i3)')iint + else if(iint<10000)then + write(string,'(i4)')iint + else if(iint<1.0d5)then + write(string,'(i5)')iint + else if(iint<1.0d6)then + write(string,'(i6)')iint + else if(iint<1.0d7)then + write(string,'(i7)')iint + else if(iint<1.0d8)then + write(string,'(i8)')iint + else if(iint<1.0d9)then + write(string,'(i9)')iint + else if(iint<1.0d9)then + write(string,'(i10)')iint + else + string=repeat('#',lenstr) + end if + +end subroutine int2char4 +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_fstrings/int2char10 +!! NAME +!! int2char10 +!! +!! FUNCTION +!! Convert a positive integer number (zero included) to a character(len=10), +!! with blanks to COMPLETE the string. +!! Exemple : 1234 will be mapped to "1234 " +!! Makes sure that the integer is between 0 and 9 999 999 999 +!! Should be enough for integer*4 +!! +!! INPUTS +!! iint=integer to be converted +!! +!! OUTPUT +!! string=character string ('##########' if error) +!! +!! SOURCE + +pure subroutine int2char10(iint,string) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: iint + character(len=10),intent(out) :: string + +! ************************************************************************* + +!Note the use of floating numbers instead of large integers, for portability + if(iint<0 .or. iint>=1.d10)then + string='####' + return + end if + if(iint<10)then + write(string,'(i1,9x)')iint + else if(iint<100)then + write(string,'(i2,8x)')iint + else if(iint<1.0d3)then + write(string,'(i3,7x)')iint + else if(iint<1.0d4)then + write(string,'(i4,6x)')iint + else if(iint<1.0d5)then + write(string,'(i5,5x)')iint + else if(iint<1.0d6)then + write(string,'(i6,4x)')iint + else if(iint<1.0d7)then + write(string,'(i7,3x)')iint + else if(iint<1.0d8)then + write(string,'(i8,2x)')iint + else if(iint<1.0d9)then + write(string,'(i9,1x)')iint + else + write(string,'(i10)')iint + end if + +end subroutine int2char10 +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_fstrings/char_count +!! NAME +!! chcount +!! +!! FUNCTION +!! Count the occurrences of a character in a string. +!! +!! SOURCE + +integer pure function char_count(string, char) + +!Arguments ------------------------------------ +!scalars + character(len=*),intent(in) :: string + character(len=1),intent(in) :: char + integer :: i + +! ************************************************************************* + + char_count = 0 + do i=1,len(string) + if (string(i:i) == char) char_count = char_count + 1 + end do + +end function char_count +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_fstrings/next_token +!! NAME +!! next_token +!! +!! FUNCTION +!! Assume a string with whitespace-separated tokens. +!! Find the next token starting from `start`, return it in `ostr` and update `start` +!! so that one can call the function inside a loop. +!! Return exit status. +!! +!! SOURCE + +integer function next_token(string, start, ostr) result(ierr) + +!Arguments ------------------------------------ +!scalars + character(len=*),intent(in) :: string + character(len=*),intent(out) :: ostr + integer,intent(inout) :: start + +!Local variables------------------------------- + integer :: ii,beg + +! ************************************************************************* + !print *, "string:", trim(string(start:)), ", start:", start + + ierr = 1; beg = 0 + ! Find first non-empty char. + do ii=start,len_trim(string) + if (string(ii:ii) /= " ") then + beg = ii; exit + end if + end do + if (beg == 0) return + + ! Find end of token. + start = 0 + do ii=beg,len_trim(string) + if (string(ii:ii) == " ") then + start = ii; exit + end if + end do + ! Handle end of string. + if (start == 0) start = len_trim(string) + 1 + + ierr = 0 + !print *, "string(beg:):", trim(string(beg:)) + ostr = string(beg:start-1) + +end function next_token +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_fstrings/inupper +!! NAME +!! inupper +!! +!! FUNCTION +!! Maps all characters in string to uppercase except for tokens between quotation marks. +!! Uses fortran90 character string manipulation but should work +!! independent of EBCDIC or ASCII assumptions--only relies on +!! 'index' intrinsic character string matching function. +!! Makes sure that the string 'lolett' remains defined as the lower +!! case 26-character alphabet string and 'uplett' remains upper case. +!! +!! INPUTS +!! string= character string with arbitrary case +!! +!! OUTPUT +!! string= same character string mapped to upper case +!! +!! SIDE EFFECTS +!! string= (input) character string with arbitrary case +!! (output) same character string mapped to upper case +!! +!! SOURCE + +subroutine inupper(string) + +!Arguments ------------------------------------ +!scalars + character(len=*),intent(inout) :: string + +!Local variables------------------------------- +!scalars + integer :: ii,indx,inquotes + logical,save :: first=.true. + character(len=1) :: cc + !character(len=500) :: message + character(len=26), parameter :: uplett='ABCDEFGHIJKLMNOPQRSTUVWXYZ' + character(len=26), parameter :: lolett='abcdefghijklmnopqrstuvwxyz' + +! ************************************************************************* +! +!On first entry make sure lower case letters stayed +!lower case and upper case letters stayed upper case + if (first) then + do ii=1,26 + ! Look for occurrence of each upper case character + ! anywhere in string of all lower case letters + indx=index(lolett,uplett(ii:ii)) + ! If found then print error message and quit + if (indx>0) then + write(std_out, '(a,a,a,a,a,a,a,a,a)' )& + 'Upper case string = ',uplett,ch10,& + 'Lower case string = ',lolett,ch10,& + 'Upper case character ',uplett(ii:ii),'found in supposedly lower case string.' + stop + end if + end do + first=.false. + end if + + inquotes = 0 + do ii=1,len_trim(string) + ! Pick off single character of string (one byte): + cc=string(ii:ii) + + ! Ignore tokens between quotation marks. + if (cc == "'" .or. cc == '"') inquotes = inquotes + 1 + if (inquotes == 1) cycle + if (inquotes == 2) then + inquotes = 0; cycle + end if + ! determine whether a lowercase letter: + indx=index(lolett,cc) + ! Map to uppercase: + if (indx>0) string(ii:ii)=uplett(indx:indx) + end do + +end subroutine inupper +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_fstrings/find_and_select +!! NAME +!! find_and_select +!! +!! FUNCTION +!! Find substring and select value in list depending on substring. +!! +!! Usage example: +!! +!! istop = find_and_select(arg, & +!! ["K", "M", "G", "T"], & +!! [one/1024._dp, one, 1024._dp, 1024._dp ** 2], fact, err_msg, default=one) +!! +!! ABI_CHECK(istop /= -1, err_msg) +!! +!! SOURCE + +integer function find_and_select(string, choices, values, out_val, err_msg, default, back) result(iend) + +!Arguments ------------------------------------ + character(len=*),intent(in) :: string + character(len=*),intent(in) :: choices(:) + real(dp),intent(in) :: values(:) + real(dp),optional,intent(in) :: default + real(dp),intent(out) :: out_val + character(len=*),intent(out) :: err_msg + logical,optional,intent(in) :: back + +!Local variables------------------------------- + integer :: ic + logical :: back__ +! ************************************************************************* + + if (size(values) /= size(choices)) then + err_msg = "BUG in API call: size(values) /= size(choices))" + iend = -1; return + end if + + back__ = .True.; if (present(back)) back__ = back + do ic=1,size(choices) + iend = index(string, trim(choices(ic)), back=back__) + if (iend /= 0) then + if (trim(string(iend:)) /= choices(ic)) then + err_msg = sjoin("Invalid token:", trim(string(iend:))) + iend = -1; return + end if + out_val = values(ic); return + end if + end do + + if (present(default)) then + iend = 0 + out_val = default + else + iend = -1 + err_msg = "Cannot find `choices` in string and `default` optional argument is not set!" + end if + +end function find_and_select +!!*** + +end module m_fstrings +!!*** diff --git a/GX-PAW/common/src/14_hidewrite/m_fstrings.o b/GX-PAW/common/src/14_hidewrite/m_fstrings.o new file mode 100644 index 00000000..b12ffd61 Binary files /dev/null and b/GX-PAW/common/src/14_hidewrite/m_fstrings.o differ diff --git a/GX-PAW/common/src/14_hidewrite/m_io_tools.F90 b/GX-PAW/common/src/14_hidewrite/m_io_tools.F90 new file mode 100644 index 00000000..fc8f4917 --- /dev/null +++ b/GX-PAW/common/src/14_hidewrite/m_io_tools.F90 @@ -0,0 +1,1360 @@ +!!****m* ABINIT/m_io_tools +!! NAME +!! m_io_tools +!! +!! FUNCTION +!! This module contains basic tools to deal with Fortran IO +!! +!! COPYRIGHT +!! Copyright (C) 2008-2024 ABINIT group (MG) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" + +MODULE m_io_tools + + use defs_basis + + implicit none + + private + + public :: get_unit ! Get a free unit if no argument is specified or report the unit associated to a file name + public :: file_exists ! Return .TRUE. if file exists. + public :: delete_file ! Delete a file if present. + public :: is_open ! .TRUE. if file is open + public :: is_connected ! .TRUE. if file is connected to a logical unit number + public :: prompt ! Simple prompt + public :: read_string ! Read string from unit ignoring blank lines and deleting comments beginning with ! or # + public :: flush_unit ! Wrapper to the intrinsic flush routine, not implemented by every compiler + public :: pick_aname ! Returns the name of a non-existent file to be used for temporary storage. + public :: isncfile ! .TRUE. if we have a NETCDF file. + public :: iomode_from_fname ! Automatic selection of the IO mode based on the file extension. + public :: iomode2str ! Convert iomode to string + public :: enforce_fortran_io ! Set the value of enforce_fortran_io__ + public :: mvrecord ! Moves forward or backward in a Fortran binary file by nn records. + public :: open_file ! Helper function to open a file in sequential mode with improved error handling. + public :: close_unit ! Helper function to close a Fortran unit with improved error handling. + public :: write_lines ! split a string in lines and output the text to the specified unit + public :: lock_and_write ! Write a string to a file with locking mechanism. + public :: num_opened_units ! Return the number of opened units. + public :: show_units ! Print info on the logical units. + public :: write_units ! Write `string` to a list of Fortran `units`. + + interface get_unit + module procedure get_free_unit + module procedure get_unit_from_fname + end interface + + interface is_open + module procedure is_open_unit + module procedure is_open_fname + end interface + + interface prompt + module procedure prompt_int0D + module procedure prompt_rdp0D + module procedure prompt_string + module procedure prompt_int1D + module procedure prompt_int2D + module procedure prompt_rdp1D + module procedure prompt_rdp2D + end interface + + integer,parameter :: MIN_UNIT_NUMBER=10 ! Fortran does not define the range for logical unit numbers (they not be negative) +#ifdef FC_NAG + integer,parameter :: MAX_UNIT_NUMBER=64 ! There's a serious problem in Nag6.0. In principle + ! Maximum unit number: 2147483647 +#else + integer,parameter :: MAX_UNIT_NUMBER=1024 ! The following values should be safe +#endif + integer,parameter :: IO_MAX_LEN=500 + character(len=1),parameter :: BLANK=' ' + + ! For interactive sessions + integer,parameter :: IO_EOT=-1 ! End of transmission i.e CTRL+D + !character(len=4),parameter :: PS1='>>> ' + ! Prepend prompt with `-` to bypass bug in intel18-19 so that flddiff.py will ignore the line + character(len=4),parameter :: PS1='->> ' + character(len=4),parameter :: PS2='??? ' + + integer,parameter :: IO_NO_AVAILABLE_UNIT =-1 ! No units are available for Fortran I/O + integer,parameter :: IO_FILE_NOT_ASSOCIATED=-2 ! File is not associated with any unit + + ! Enforce IO_MODE_FORTRAN in iomode_from_fname + logical,save,protected :: enforce_fortran_io__ = .False. + +CONTAINS !=========================================================== +!!*** + +!!****f* m_io_tools/get_unit +!! NAME +!! get_unit +!! +!! FUNCTION +!! Obtain a logical Fortran unit. +!! A free unit is reported if no argument is specified. +!! If the file name is supplied, the function reports the unit number +!! associated to the file +!! Note that GET_UNIT assumes that units 0, 5, 6 (stderr, stdin, std_out) +!! are special, and will never return those values. +!! +!! TODO +!! One should define an abinit-specific function with a list of reserved units! +!! +!! OUTPUT +!! The unit number (free unit or unit associated to the file) +!! Raises: +!! IO_NO_AVAILABLE_UNIT if no logical unit is free (!) +!! IO_FILE_NOT_ASSOCIATED if the file is not linked to a logical unit +!! +!! SOURCE + +integer function get_free_unit() + +!Local variables------------------------------- + integer :: iunt + logical :: isopen +! ********************************************************************* + + do iunt=MAX_UNIT_NUMBER,MIN_UNIT_NUMBER,-1 + if (any(iunt == [std_err, std_in, std_out])) cycle + inquire(unit=iunt, opened=isopen) + if (.not.isopen) then + get_free_unit = iunt; return + end if + end do + get_free_unit = IO_NO_AVAILABLE_UNIT + +end function get_free_unit +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_io_tools/get_unit_from_fname +!! NAME +!! get_unit_from_fname +!! +!! FUNCTION +!! Returns the unit number associated to an open file whose name is fname. +!! If the file is not connected to an unit number, returns IO_FILE_NOT_ASSOCIATED +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +integer function get_unit_from_fname(fname) + +!Arguments ------------------------------------ + character(len=*),intent(in) :: fname + +!Local variables------------------------------- + integer :: unit +! ********************************************************************* + + inquire(file=fname,number=unit) + + get_unit_from_fname=unit + if (unit==-1) get_unit_from_fname=IO_FILE_NOT_ASSOCIATED + +end function get_unit_from_fname +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_io_tools/file_exists +!! NAME +!! file_exists +!! +!! FUNCTION +!! Return .TRUE. if file `filepath` exists (function version of inquire). +!! +!! SOURCE + +logical function file_exists(filepath) + + character(len=*),intent(in) :: filepath +! ********************************************************************* + + inquire(file=filepath, exist=file_exists) + +end function file_exists +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_io_tools/delete_file +!! NAME +!! delete_file +!! +!! FUNCTION +!! Delete a file if present. +!! +!! INPUTS +!! fname=The name of the file. +!! +!! OUTPUT +!! ierr=Non-zero value indicates that a problem occured. +!! 111 = To signal that the file does not exist. +!! 112 = File exist, is open but no associated unit is found! +!! Other values are system-dependent as the value is returned by a open or close +!! instruction. +!! +!! SIDE EFFECTS +!! The specified file is deleted. +!! +!! SOURCE + +subroutine delete_file(fname, ierr) + + integer,intent(out) :: ierr + character(len=*),intent(in) :: fname + +!Local variables------------------------------- + integer :: tmp_unt + logical :: exists +! ********************************************************************* + + ierr = 0 + + inquire(file=fname, exist=exists) + + if (.not.exists) then + ierr = 111 + !write(std_out,*)" Asked to delete non existent file: ",TRIM(fname) + return + end if + + if (is_open_fname(fname)) then + tmp_unt = get_unit_from_fname(fname) + if (tmp_unt == IO_FILE_NOT_ASSOCIATED) then + !write(std_out,*) "File is opened but no associated unit found!" + ierr = 112; return + end if + close(tmp_unt) + else + tmp_unt = get_unit() + end if + + ! Now close the file. + open(unit=tmp_unt, file=trim(fname), status="OLD", iostat=ierr) + if (ierr==0) close(unit=tmp_unt, status="DELETE", iostat=ierr) + +end subroutine delete_file +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_io_tools/is_connected +!! NAME +!! is_connected +!! +!! FUNCTION +!! Returns .TRUE. if unit is connected to fname. +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +logical function is_connected(unit, fname) + + integer,intent(in) :: unit + character(len=*),intent(in) :: fname + +!Local variables------------------------------- + integer :: unt_found + logical :: isopen +! ********************************************************************* + + inquire(file=fname, number=unt_found, opened=isopen) + is_connected=(isopen .and. (unt_found == unit)) + +end function is_connected +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_io_tools/is_open +!! NAME +!! is_open +!! +!! FUNCTION +!! Returns .TRUE. if unit is associated to an open file. +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +logical function is_open_unit(unit) + + integer,intent(in) :: unit +! ********************************************************************* + + inquire(unit=unit, opened=is_open_unit) + +end function is_open_unit +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_io_tools/is_open_fname +!! NAME +!! is_open_fname +!! +!! FUNCTION +!! Returns .TRUE. if the file name fname is open. +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +logical function is_open_fname(fname) + + character(len=*),intent(in) :: fname +! ********************************************************************* + + inquire(file=fname,opened=is_open_fname) + +end function is_open_fname +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_io_tools/prompt_int0D +!! NAME +!! prompt_int0D +!! +!! FUNCTION +!! A primitive prompt. Writes msg on std_out and reads the value entered by the user. +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +subroutine prompt_int0D(msg,ivalue) + + character(len=*),intent(in) :: msg + integer,intent(out) :: ivalue + +!Local variables------------------------------- + integer :: ios + character(len=4) :: PS +! ********************************************************************* + + ios=-1 ; PS=PS1 + do while (ios/=0) + write(std_out,'(a)',ADVANCE='NO')PS//TRIM(msg)//BLANK + call flush_unit(std_out) + read(std_in,*,IOSTAT=ios)ivalue + if (ios==IO_EOT) call prompt_exit() + PS=PS2 + end do + write(std_out,*) + +end subroutine prompt_int0D +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_io_tools/prompt_rdp0d +!! NAME +!! prompt_rdp0d +!! +!! FUNCTION +!! A primitive prompt. Writes msg on std_out and reads the value entered by the user. +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +subroutine prompt_rdp0D(msg,rvalue) + + character(len=*),intent(in) :: msg + real(dp),intent(out) :: rvalue + +!Local variables------------------------------- + integer :: ios + character(len=4) :: PS +! ********************************************************************* + + ios=-1 ; PS=PS1 + do while (ios/=0) + write(std_out,'(a)',ADVANCE='NO')PS//TRIM(msg)//BLANK + call flush_unit(std_out) + read(std_in,*,IOSTAT=ios)rvalue + if (ios==IO_EOT) call prompt_exit() + PS=PS2 + end do + write(std_out,*) + +end subroutine prompt_rdp0D +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_io_tools/prompt_string +!! NAME +!! prompt_string +!! +!! FUNCTION +!! A primitive prompt. Writes msg on std_out and reads the value entered by the user. +!! If strip_comment is True (default), all the characters after "#" or "!" are ignored. +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +subroutine prompt_string(msg,string,strip_comment) + + character(len=*),intent(in) :: msg + logical,optional,intent(in) :: strip_comment + character(len=*),intent(out) :: string + +!Local variables------------------------------- + integer :: ios,ic + logical :: do_strip + character(len=4) :: PS + !character(len=len(string)) :: tmps +! ********************************************************************* + + do_strip = .True.; if (present(strip_comment)) do_strip = strip_comment + + ios=-1 ; PS=PS1 + do while (ios/=0) + write(std_out,'(a)',ADVANCE='NO')PS//TRIM(msg)//BLANK + call flush_unit(std_out) + read(std_in,'(a)',IOSTAT=ios)string + if (ios==IO_EOT) call prompt_exit() + PS=PS2 + end do + write(std_out,*) + + if (do_strip) then + ic = INDEX(string, "#"); if (ic /= 0) string(:) = string(:ic-1) + ic = INDEX(string, "!"); if (ic /= 0) string(:) = string(:ic-1) + end if + +end subroutine prompt_string +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_io_tools/prompt_int1D +!! NAME +!! prompt_int1D +!! +!! FUNCTION +!! A primitive prompt. Writes msg on std_out and reads the value entered by the user. +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +subroutine prompt_int1D(msg,ivect) + +!Arguments ------------------------------------ + character(len=*),intent(in) :: msg + integer,intent(out) :: ivect(:) + +!Local variables------------------------------- + integer :: ios + character(len=4) :: PS +! ********************************************************************* + + ios=-1 ; PS=PS1 + do while (ios/=0) + write(std_out,'(a)',ADVANCE='NO')PS//TRIM(msg)//BLANK + call flush_unit(std_out) + read(std_in,*,IOSTAT=ios)ivect(:) + if (ios==IO_EOT) call prompt_exit() + PS=PS2 + end do + write(std_out,*) + +end subroutine prompt_int1D +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_io_tools/prompt_int2D +!! NAME +!! prompt_int2d +!! +!! FUNCTION +!! A primitive prompt. Writes msg on std_out and reads the value entered by the user. +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +subroutine prompt_int2D(msg,iarr) + + character(len=*),intent(in) :: msg + integer,intent(out) :: iarr(:,:) + +!Local variables------------------------------- + integer :: ios + character(len=4) :: PS +! ********************************************************************* + + ios=-1 ; PS=PS1 + do while (ios/=0) + write(std_out,'(a)',ADVANCE='NO')PS//TRIM(msg)//BLANK + call flush_unit(std_out) + read(std_in,*,IOSTAT=ios)iarr(:,:) + if (ios==IO_EOT) call prompt_exit() + PS=PS2 + end do + write(std_out,*) + +end subroutine prompt_int2D +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_io_tools/prompt_rdp1D +!! NAME +!! prompt_rdp1D +!! +!! FUNCTION +!! A primitive prompt. Writes msg on std_out and reads the value entered by the user. +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +subroutine prompt_rdp1D(msg,rvect) + +!Arguments ------------------------------------ + character(len=*),intent(in) :: msg + real(dp),intent(out) :: rvect(:) + character(len=4) :: PS +!Local variables------------------------------- + integer :: ios +! ********************************************************************* + + ios=-1 ; PS=PS1 + do while (ios/=0) + write(std_out,'(a)',ADVANCE='NO')PS//TRIM(msg)//BLANK + call flush_unit(std_out) + read(std_in,*,IOSTAT=ios)rvect(:) + if (ios==IO_EOT) call prompt_exit() + PS=PS2 + end do + write(std_out,*) + +end subroutine prompt_rdp1D +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_io_tools/prompt_rdp2D +!! NAME +!! prompt_rdp2D +!! +!! FUNCTION +!! A primitive prompt. Writes msg on std_out and reads the value entered by the user. +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +subroutine prompt_rdp2D(msg,rarr) + + character(len=*),intent(in) :: msg + real(dp),intent(out) :: rarr(:,:) + +!Local variables------------------------------- + integer :: ios + character(len=4) :: PS +! ********************************************************************* + + ios=-1 ; PS=PS1 + do while (ios/=0) + write(std_out,'(a)',ADVANCE='NO')PS//TRIM(msg)//BLANK + call flush_unit(std_out) + read(std_in,*,IOSTAT=ios)rarr(:,:) + if (ios==IO_EOT) call prompt_exit() + PS=PS2 + end do + write(std_out,*) + +end subroutine prompt_rdp2D +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_io_tools/prompt_exit +!! NAME +!! prompt_exit +!! +!! FUNCTION +!! A primitive prompt. Writes msg on std_out and reads the value entered by the user. +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +subroutine prompt_exit() + + integer,parameter :: NASK=5 + integer :: ios,iask + character(len=IO_MAX_LEN) :: ans +! ********************************************************************* + + write(std_out,*) + ios=-1 ; iask=0 + do while (ios/=0.or.(ans/='y'.or.ans/='n')) + iask=iask+1 + write(std_out,'(a)')' Do you really want to exit (y/n)? ' + call flush_unit(std_out) + read(std_in,*,IOSTAT=ios)ans + if (ans=='y'.or.iask>NASK) STOP + if (ans=='n') RETURN + end do + +end subroutine prompt_exit +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_io_tools/read_string +!! NAME +!! read_string +!! +!! FUNCTION +!! Reads string from unit=std_in_ or unit if specified, ignoring blank lines +!! and deleting comments beginning with `!`. Return exit code. +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +integer function read_string(string, unit) result(ios) + + character(len=*),intent(out):: string + integer,optional,intent(in) :: unit + +!Local variables------------------------------- + integer :: ipos,unt +! ********************************************************************* + + unt=std_in; if (present(unit)) unt=unit + + read(unt,'(a)', iostat=ios) string ! read input line + if (ios/=0) return + string = ADJUSTL(string) + + ! Ignore portion after comments + ipos = INDEX(string, "!") + if (ipos /= 0) string=string(:ipos-1) + ipos = INDEX(string, "#") + if (ipos /= 0) string=string(:ipos-1) + +end function read_string +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_io_tools/flush_unit +!! NAME +!! flush_unit +!! +!! FUNCTION +!! Wrapper for the standard flush_unit routine +!! +!! INPUTS +!! unit=Fortran logical Unit number +!! +!! OUTPUT +!! +!! NOTES +!! Available only if the compiler implements this intrinsic procedure. +!! +!! SOURCE + +subroutine flush_unit(unit) + + integer,intent(in) :: unit + +!Local variables------------------------------- + logical :: isopen + +!************************************************************************ + + if (unit == dev_null) return + + inquire(unit=unit,opened=isopen) + +!FLUSH on unconnected unit is illegal: F95 std., 9.3.5. +#if defined HAVE_FC_FLUSH + if (isopen) call flush(unit) +#elif defined HAVE_FC_FLUSH_ + if (isopen) call flush_(unit) +#endif + +end subroutine flush_unit +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_io_tools/pick_aname +!! NAME +!! pick_aname +!! +!! FUNCTION +!! Returns the name of a non-existent file to be used for temporary storage. +!! +!! SOURCE + +function pick_aname() result(aname) + + character(len=fnlen) :: aname + +!Local variables------------------------------- + integer :: ii,spt,ept + real(dp) :: xrand(fnlen) +!************************************************************************ + + aname="__TMP_FILE__" + + spt=LEN(aname); ept=spt + + do while (file_exists(aname)) + call RANDOM_NUMBER(xrand(spt:ept)) + xrand(spt:ept) = 64+xrand(spt:ept)*26 + do ii=spt,ept + aname(ii:ii) = ACHAR(NINT(xrand(ii))) + end do + ept = MIN(ept+1,fnlen) + end do + +end function pick_aname +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_io_tools/isncfile +!! NAME +!! isncfile +!! +!! FUNCTION +!! Return .TRUE. if fname is a NETCDF file. +!! +!! INPUTS +!! fname(len=*)=The name of the file to be tested. +!! +!! NOTES +!! The idea is extremely simple: a NETCDF file terminates with ".nc". +!! Obviously this approach is not bulletproof but it will work +!! provided that we continue to append the ".nc" string to any NETCDF +!! file produced by abinit. +!! +!! SOURCE + +pure logical function isncfile(fname) + +!Arguments ------------------------------------ +!scalars + character(len=*),intent(in) :: fname + +!Local variables------------------------------- +!scalars + integer :: ic,nch_trim + +! ************************************************************************* + + nch_trim=LEN_TRIM(fname) + ic = INDEX (TRIM(fname), ".", back=.TRUE.) + + isncfile=.FALSE. + if (ic >= 1 .and. ic <= nch_trim-1) then ! there is stuff after the . + isncfile = (fname(ic+1:nch_trim)=="nc") + end if + +end function isncfile +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_io_tools/iomode_from_fname +!! NAME +!! iomode_from_fname +!! +!! FUNCTION +!! Automatic selection of the IO mode based on the file extension. +!! +!! INPUTS +!! fname = Name of the file. +!! +!! NOTES +!! if fname has extension '.nc', IO_MODE_ETSF is used +!! else: +!! IO_MODE_MPI if available +!! IO_MODE_FORTRAN if HAVE_MPI_IO is not defined. +!! +!! SOURCE + +pure integer function iomode_from_fname(fname) result(iomode) + +!Arguments ------------------------------------ +!scalars + character(len=*),intent(in) :: fname + +! ************************************************************************* + + if (isncfile(fname)) then + iomode = IO_MODE_ETSF + else +#ifdef HAVE_MPI_IO + iomode = IO_MODE_MPI +#else + iomode = IO_MODE_FORTRAN +#endif + + if (enforce_fortran_io__) iomode = IO_MODE_FORTRAN + end if + +end function iomode_from_fname +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_io_tools/enforce_fortran_io +!! NAME +!! enforce_fortran_io +!! +!! FUNCTION +!! Set the value of the enforce_fortran__ global variable. +!! +!! SOURCE + +subroutine enforce_fortran_io(bool) + +!Arguments ------------------------------------ +!scalars + logical,intent(in) :: bool + +! ************************************************************************* + + enforce_fortran_io__ = bool + +end subroutine enforce_fortran_io +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_io_tools/iomode2str +!! NAME +!! iomode2str +!! +!! FUNCTION +!! Convert iomode to string +!! +!! SOURCE + +pure function iomode2str(iomode) + +!Arguments ------------------------------------ +!scalars + character(len=48) :: iomode2str + integer,intent(in) :: iomode + +! ************************************************************************* + + select case (iomode) + case (IO_MODE_FORTRAN_MASTER) + iomode2str = "IO_MODE_FORTRAN_MASTER" + case (IO_MODE_FORTRAN) + iomode2str = "IO_MODE_FORTRAN" + case (IO_MODE_MPI) + iomode2str = "IO_MODE_MPI" + case (IO_MODE_NETCDF) + iomode2str = "IO_MODE_NETCDF" + case (IO_MODE_ETSF) + iomode2str = "IO_MODE_ETSF" + case default + iomode2str = "Unknown!" + end select + +end function iomode2str +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_io_tools/mvrecord +!! NAME +!! mvrecord +!! +!! FUNCTION +!! This subroutine moves forward or backward in a Fortran binary file by nn records. +!! +!! INPUTS +!! funt= Fortran file unit number +!! nrec=number of records +!! +!! OUTPUT +!! ierr=error code +!! +!! TODO +!! One should treat the possible errors of backspace +!! +!! SOURCE + +subroutine mvrecord(funt,nrec,ierr) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: funt,nrec + integer,intent(out) :: ierr + +!Local variables------------------------------- +!scalars + integer :: irec + +! ************************************************************************* + + ierr = 0 + if (nrec > 0) then ! Move forward nrec records + do irec=1,nrec + read(funt,iostat=ierr) + if (ierr /= 0) EXIT + end do + else if (nrec < 0) then ! Move backward nrec records + do irec=1,-nrec + backspace (unit=funt,iostat=ierr) + if (ierr /= 0) EXIT + end do + end if + +end subroutine mvrecord +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_io_tools/open_file +!! NAME +!! open_file +!! +!! FUNCTION +!! Open a file in sequential mode and associate it to the unit number number. +!! The main differences wrt the intrinsic open: +!! +!! * Function statement that returns the value of iostat +!! * Emulate iomsg (F2003) +!! * Accepts either unit (user-specified unit number, input) or +!! newunit (free unit not associated to any file, output). +!! The two options are mutually exclusive. +!! +!! See Fortran intrinsic for a more detailed description of the variables +!! +!! OUTPUT +!! iostat=Exit status +!! iomsg=Error message +!! +!! SOURCE + +function open_file(file, iomsg, unit, newunit, access, form, status, action, recl) result(iostat) + +!Arguments ------------------------------------ +!scalars + character(len=*),intent(in) :: file + character(len=*),optional,intent(in) :: access,form,status,action + character(len=*),intent(out) :: iomsg + integer,optional,intent(in) :: recl,unit + integer,optional,intent(out) :: newunit + integer :: iostat + +!Local variables------------------------------- +!scalars + character(len=500) :: my_access,my_form,my_status,my_action,msg + +! ************************************************************************* + + my_access = "sequential"; if (present(access)) my_access = access + my_form = "formatted"; if (present(form)) my_form = form + my_status = "unknown"; if (present(status)) my_status = status + my_action = "readwrite"; if (present(action)) my_action = action ! default is system dependent. Enforce RW mode + + iomsg = "" ! iomsg is not changed if open succeeds + + if (present(unit)) then + if (present(recl)) then + open(file=trim(file),unit=unit,form=my_form,status=my_status,access=my_access,iostat=iostat,recl=recl, iomsg=iomsg) + else + open(file=trim(file),unit=unit,form=my_form,status=my_status,access=my_access,iostat=iostat, iomsg=iomsg) + end if + if (present(newunit)) iostat = -666 ! wrong call + + else if (present(newunit)) then + ! Get free unit (emulate newunit of F2008) + newunit = get_unit() + if (present(recl)) then + open(file=trim(file),unit=newunit,form=my_form,status=my_status,access=my_access,iostat=iostat,recl=recl, iomsg=iomsg) + else + open(file=trim(file),unit=newunit,form=my_form,status=my_status,access=my_access,iostat=iostat, iomsg=iomsg) + end if + if (present(unit)) iostat = -666 ! wrong call + + else + iomsg = "Either unit or newunit must be specified" + iostat = -1 + end if + + if (iostat /= 0) then + write(msg, "(a,i0,2a)")"Fortran open returned iostat: ",iostat," while opening file: "//trim(file) + iomsg = trim(msg)//ch10//"Runtime error message: "//trim(iomsg) + end if + +end function open_file +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_io_tools/close_unit +!! NAME +!! close_unit +!! +!! FUNCTION +!! close a Fortran unit +!! The main differences wrt the intrinsic close: +!! +!! * Function statement that returns the value of iostat +!! * Emulate iomsg (F2003) +!! +!! See Fortran intrinsic for a more detailed description of the variables +!! +!! OUTPUT +!! iostat=Exit status +!! iomsg=Error message +!! +!! SOURCE + +function close_unit(unit,iomsg,status) result(iostat) + +!Arguments ------------------------------------ +!scalars + integer,intent(inout) :: unit + character(len=*),optional,intent(in) :: status + character(len=*),intent(out) :: iomsg + integer :: iostat + +!Local variables------------------------------- + character(len=500) :: msg + +! ************************************************************************* + + iomsg = "" ! iomsg is not changed if close succeeds + + if (.not.present(status)) then ! Use Fortran default e.g delete for scratch files. +#ifdef HAVE_FC_IOMSG + close(unit=unit,iostat=iostat,iomsg=iomsg) +#else + close(unit=unit,iostat=iostat) +#endif + else +#ifdef HAVE_FC_IOMSG + close(unit=unit,iostat=iostat,status=status,iomsg=iomsg) +#else + close(unit=unit,iostat=iostat,status=status) +#endif + end if + + ! TODO: Add more info for example the filename. + if (iostat /= 0) then + write(msg,'(2(a,i0),a)')"Fortran close returned iostat ",iostat," while closing unit: ",unit,ch10 + iomsg = trim(msg)//ch10//"IOMSG: "//trim(msg) + end if + +end function close_unit +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_io_tools/write_lines +!! NAME +!! write_lines +!! +!! FUNCTION +!! This routine receives a string, split the message in lines according to the +!! ch10 character and output the text to the specified unit +!! +!! INPUTS +!! unit=unit number for writing +!! message=(character(len=*)) message to be written +!! [toflush]=flag to activate immediate flush of the I/O buffer (default=FALSE) +!! +!! OUTPUT +!! Only writing. +!! +!! SOURCE + +subroutine write_lines(unit,message,toflush) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: unit + logical,intent(in),optional :: toflush + character(len=*),intent(in) :: message + +!Local variables------------------------------- +!scalars + integer :: msg_size,ii,jj,rtnpos + logical :: toflush_ + +!****************************************************************** + + msg_size = len_trim(message) + toflush_=.false.;if (present(toflush)) toflush_=toflush + + if (msg_size == 0) then + write(unit,*) + return + end if + + ! Here, split the message, according to the char(10) characters (carriage return). + ! This technique is portable accross different OS. + rtnpos = index(message,ch10) + + if (rtnpos == 0) then + write(unit,"(a)")message(1:msg_size) + if (toflush_) call flush_unit(unit) + return + end if + + ii = 1; jj = rtnpos + do + if (ii == jj) then + write(unit,*) + if (toflush_) call flush_unit(unit) + else + write(unit, '(a)' ) message(ii:jj-1) + if (toflush_) call flush_unit(unit) + end if + ii = jj + 1 + if (ii > msg_size) exit + jj = index(message(ii:msg_size),ch10) + if (jj == 0) then + ! Will write the last line at the next iteration and exit . + jj = msg_size + 1 + else + jj = jj + ii - 1 + end if + !write(*,*)"ii, jj, msg_size",ii, jj, msg_size + end do + + ! This is needed to preserve the od behaviour: a ch10 at the + ! end of the string was causing an extra newline! + if (message(msg_size:msg_size) == ch10) write(unit,*) + +end subroutine write_lines +!!*** + +!!****f* m_io_tools/lock_and_write +!! NAME +!! lock_and_write +!! +!! FUNCTION +!! Writes a string to filename with locking mechanism. +!! +!! INPUTS +!! filename: Name of the file. +!! string: Input string. +!! ierr: Exit status, 0 is string has been written to filename. +!! +!! SOURCE + +subroutine lock_and_write(filename, string, ierr) + + integer,intent(out) :: ierr + character(len=*),intent(in) :: filename,string + +!Local variables------------------------------- + integer :: lock_unit,file_unit + character(len=len(filename) + 5) :: lock + !character(len=500) :: msg + +! ********************************************************************* + + ierr = 0 + + ! Try to acquire the lock. + lock = trim(filename)//".lock" + lock_unit = get_unit() + open(unit=lock_unit, file=trim(lock), status='new', err=99) + + file_unit = get_unit() + open(unit=file_unit, file=trim(filename), form="formatted") + call write_lines(file_unit, string, toflush=.true.) + close(lock_unit, status="delete") + close(file_unit) + return + +99 ierr = 1 + +end subroutine lock_and_write +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_io_tools/num_opened_units +!! NAME +!! num_opened_units +!! +!! FUNCTION +!! Return the number of opened units. +!! Unit numbers listed in the optional argument `ignore` are not considered. +!! +!! SOURCE + +integer function num_opened_units(ignore) result(nn) + +!Arguments ------------------------------------ +!scalars + integer,optional,intent(in) :: ignore(:) + +!Local variables------------------------------- + integer :: ii,iostat + logical :: opened + +! ********************************************************************* + + nn = 0 + do ii=0, max_unit_number + if (present(ignore)) then + if (any(ii == ignore)) cycle + end if + inquire(ii, opened=opened, iostat=iostat) + if (iostat == 0 .and. opened) nn = nn + 1 + end do + +end function num_opened_units +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_io_tools/show_units +!! NAME +!! show_units +!! +!! FUNCTION +!! Print info on the logical units +!! +!! SOURCE + +subroutine show_units(ount) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: ount + +!Local variables------------------------------- + integer :: ii,iostat + logical :: named, opened + character(len=fnlen) :: filename,form + +! ********************************************************************* + + write(ount,'(a)') '******** Fortran Logical Units ********' + + do ii=0,max_unit_number + inquire(ii, opened=opened, named=named, name=filename, form=form, iostat=iostat) + if (iostat == 0) then + if (opened) then + if (named) then + write(ount,*)"unit: ", ii, "form: ", trim(form), ", filename: ", trim(filename) + else + write(ount,*)"unit: ", ii, "form: ",form, ', No name available' + endif + else + !write(ount,*)"unit: ", ii, " is not opened" + endif + else + write(ount,*)" unit: ", ii, ' Iostat error' + endif + end do + +end subroutine show_units +!!*** + +!!****f* m_io_tools/write_units +!! NAME +!! write_units +!! +!! FUNCTION +!! Write `string` to a list of Fortran `units`. +!! This function is supposed to be faster than wrtout as there's no check on the MPI rank. +!! This also means that this procedure should be called by a single MPI proc. +!! +!! INPUTS +!! [newlines]: Number of newlines added after string. Default 0 +!! [pre_newlines]: Number of newlines added before string. Default 0 +!! +!! SOURCE + +subroutine write_units(units, string, newlines, pre_newlines) + +!Arguments ------------------------------------ + character(len=*),intent(in) :: string + integer,intent(in) :: units(:) + integer,optional,intent(in) :: newlines, pre_newlines + +!Local variables------------------------------- + integer :: ii, unt +! ************************************************************************* + + do unt=1,size(units) + if (present(pre_newlines)) then + do ii=1,pre_newlines + write(units(unt), "(a)") " " + end do + end if + write(units(unt), "(a)") trim(string) + if (present(newlines)) then + do ii=1,newlines + write(units(unt), "(a)") " " + end do + end if + end do + +end subroutine write_units +!!*** + +!---------------------------------------------------------------------- + +END MODULE m_io_tools +!!*** diff --git a/GX-PAW/common/src/14_hidewrite/m_io_tools.o b/GX-PAW/common/src/14_hidewrite/m_io_tools.o new file mode 100644 index 00000000..bdfc63a8 Binary files /dev/null and b/GX-PAW/common/src/14_hidewrite/m_io_tools.o differ diff --git a/GX-PAW/common/src/14_hidewrite/m_optim_dumper.F90 b/GX-PAW/common/src/14_hidewrite/m_optim_dumper.F90 new file mode 100644 index 00000000..2a41a195 --- /dev/null +++ b/GX-PAW/common/src/14_hidewrite/m_optim_dumper.F90 @@ -0,0 +1,81 @@ +!{\src2tex{textfont=tt}} +!!****m* ABINIT/m_optim_dumper +!! NAME +!! m_optim_dumper +!! +!! FUNCTION +!! This module contains information about the optimizations set at +!! configure-time when building ABINIT (useful for debugging). +!! +!! COPYRIGHT +!! Copyright (C) 2010-2024 ABINIT group (Yann Pouillon) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +module m_optim_dumper + + implicit none + + public :: dump_optim + +contains !=========================================================== +!!*** + +!!****f* ABINIT/m_optim_dumper/dump_optim +!! NAME +!! dump_optim +!! +!! FUNCTION +!! Reports a printout of the optimizations set at configure-time, +!! useful for error messages and debugging. +!! +!! COPYRIGHT +!! Copyright (C) 2010-2024 ABINIT group (Yann Pouillon) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! INPUTS +!! my_unit= Fortran unit number (optional, default is std_out) +!! +!! OUTPUT +!! Only printing +!! +!! PARENTS +!! Will be filled automatically by the parent script +!! +!! CHILDREN +!! Will be filled automatically by the parent script +!! +!! SOURCE + +subroutine dump_optim(my_unit) + + use defs_basis + + implicit none + +!Arguments ------------------------------------ + integer,intent(in) :: my_unit + +!Local variables------------------------------- + +! ************************************************************************* + + write(my_unit,"(a,1x,a)") ch10,repeat("+",78) + write(my_unit,"(1x,a,a,3x,a,a,a)") "Default optimizations:",ch10, & +& "--- None ---",ch10,ch10 + + write(my_unit,"(1x,a,a)") repeat("+",78),ch10 + +end subroutine dump_optim + +end module m_optim_dumper +!!*** diff --git a/GX-PAW/common/src/14_hidewrite/m_optim_dumper.F90.cmake.in b/GX-PAW/common/src/14_hidewrite/m_optim_dumper.F90.cmake.in new file mode 100644 index 00000000..0d7556e4 --- /dev/null +++ b/GX-PAW/common/src/14_hidewrite/m_optim_dumper.F90.cmake.in @@ -0,0 +1,83 @@ +!{\src2tex{textfont=tt}} +!!****m* ABINIT/m_optim_dumper +!! NAME +!! m_optim_dumper +!! +!! FUNCTION +!! This module contains information about the optimizations set at +!! configure-time when building ABINIT (useful for debugging). +!! +!! COPYRIGHT +!! Copyright (C) 2010-2024 ABINIT group (Yann Pouillon) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +module m_optim_dumper + + implicit none + + public :: dump_optim + +contains !=========================================================== +!!*** + +!!****f* ABINIT/m_optim_dumper/dump_optim +!! NAME +!! dump_optim +!! +!! FUNCTION +!! Reports a printout of the optimizations set at configure-time, +!! useful for error messages and debugging. +!! +!! COPYRIGHT +!! Copyright (C) 2010-2024 ABINIT group (Yann Pouillon) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! INPUTS +!! my_unit= Fortran unit number (optional, default is std_out) +!! +!! OUTPUT +!! Only printing +!! +!! PARENTS +!! Will be filled automatically by the parent script +!! +!! CHILDREN +!! Will be filled automatically by the parent script +!! +!! SOURCE + +subroutine dump_optim(my_unit) + + use defs_basis + + implicit none + +!Arguments ------------------------------------ + integer,intent(in) :: my_unit + +!Local variables------------------------------- + +! ************************************************************************* + + write(my_unit,"(a,1x,a)") ch10,repeat("+",78) +! write(my_unit,"(1x,a,a,3x,a,a,a)") "Default optimizations:",ch10, & +!& "@fcflags_opt_default@",ch10,ch10@config.optim@ + write(my_unit,"(1x,a,a,3x,a,a,a)") "Default optimizations:",ch10, & +& "@CMAKE_Fortran_FLAGS@",ch10,ch10 + + write(my_unit,"(1x,a,a)") repeat("+",78),ch10 + +end subroutine dump_optim + +end module m_optim_dumper +!!*** diff --git a/GX-PAW/common/src/14_hidewrite/m_optim_dumper.F90.in b/GX-PAW/common/src/14_hidewrite/m_optim_dumper.F90.in new file mode 100644 index 00000000..06421168 --- /dev/null +++ b/GX-PAW/common/src/14_hidewrite/m_optim_dumper.F90.in @@ -0,0 +1,81 @@ +!{\src2tex{textfont=tt}} +!!****m* ABINIT/m_optim_dumper +!! NAME +!! m_optim_dumper +!! +!! FUNCTION +!! This module contains information about the optimizations set at +!! configure-time when building ABINIT (useful for debugging). +!! +!! COPYRIGHT +!! Copyright (C) 2010-2024 ABINIT group (Yann Pouillon) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +module m_optim_dumper + + implicit none + + public :: dump_optim + +contains !=========================================================== +!!*** + +!!****f* ABINIT/m_optim_dumper/dump_optim +!! NAME +!! dump_optim +!! +!! FUNCTION +!! Reports a printout of the optimizations set at configure-time, +!! useful for error messages and debugging. +!! +!! COPYRIGHT +!! Copyright (C) 2010-2024 ABINIT group (Yann Pouillon) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! INPUTS +!! my_unit= Fortran unit number (optional, default is std_out) +!! +!! OUTPUT +!! Only printing +!! +!! PARENTS +!! Will be filled automatically by the parent script +!! +!! CHILDREN +!! Will be filled automatically by the parent script +!! +!! SOURCE + +subroutine dump_optim(my_unit) + + use defs_basis + + implicit none + +!Arguments ------------------------------------ + integer,intent(in) :: my_unit + +!Local variables------------------------------- + +! ************************************************************************* + + write(my_unit,"(a,1x,a)") ch10,repeat("+",78) + write(my_unit,"(1x,a,a,3x,a,a,a)") "Default optimizations:",ch10, & +& "@fcflags_opt_default@",ch10,ch10@config.optim@ + + write(my_unit,"(1x,a,a)") repeat("+",78),ch10 + +end subroutine dump_optim + +end module m_optim_dumper +!!*** diff --git a/GX-PAW/common/src/14_hidewrite/m_optim_dumper.o b/GX-PAW/common/src/14_hidewrite/m_optim_dumper.o new file mode 100644 index 00000000..7cc3a936 Binary files /dev/null and b/GX-PAW/common/src/14_hidewrite/m_optim_dumper.o differ diff --git a/GX-PAW/common/src/14_hidewrite/m_specialmsg.F90 b/GX-PAW/common/src/14_hidewrite/m_specialmsg.F90 new file mode 100644 index 00000000..9c57604f --- /dev/null +++ b/GX-PAW/common/src/14_hidewrite/m_specialmsg.F90 @@ -0,0 +1,525 @@ +!!****m* ABINIT/m_specialmsg +!! NAME +!! m_specialmsg +!! +!! FUNCTION +!! This module contains tools to deal with special messages counters. +!! Special messages= WARNING, COMMENT, EXIT +!! +!! COPYRIGHT +!! Copyright (C) 2008-2024 ABINIT group (MT,XG) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" + +module m_specialmsg + + use defs_basis + use m_build_info + use m_xmpi + + use m_io_tools, only : flush_unit, write_lines, is_open + + implicit none + + private +!!*** + + public :: herald ! Prints message to unit iout giving info about current + ! code, version of code, platform, and starting date. + +!Number of WARNINGS/COMMENTS printed in log file + integer,save :: COMMENT_COUNT = 0 + integer,save :: WARNING_COUNT = 0 + integer,save :: EXIT_FLAG = 0 + +!Public procedures + public :: specialmsg_setcount ! Update number of special messages (WARNING/COMMENT) present in log file + public :: specialmsg_getcount ! Get number of special messages (WARNING/COMMENT) present in log file + public :: specialmsg_mpisum ! Reduce number of special messages (WARNING/COMMENT) over MPI comm + + public :: wrtout + + interface wrtout + module procedure wrtout_unit + module procedure wrtout_units + end interface wrtout + +CONTAINS !=========================================================== +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_specialmsg/specialmsg_setcount +!! NAME +!! specialmsg_setcount +!! +!! FUNCTION +!! Update the counters of special messages (WARNING, COMMENTS, EXIT) printed in log file +!! +!! INPUTS +!! [n_add_comment]= (optional) number of comments to add to the counter +!! [n_add_exit] = (optional) number of exit messages to add to the counter +!! [n_add_warning]= (optional) number of warnings to add to the counter +!! +!! OUTPUT +!! (only counters updated) +!! +!! SOURCE + +subroutine specialmsg_setcount(n_add_comment,n_add_warning,n_add_exit) + +!Arguments ------------------------------------ + integer,optional,intent(in) :: n_add_comment,n_add_warning,n_add_exit + +! ********************************************************************* + + if (PRESENT(n_add_comment)) COMMENT_COUNT=COMMENT_COUNT+n_add_comment + if (PRESENT(n_add_warning)) WARNING_COUNT=WARNING_COUNT+n_add_warning + if (PRESENT(n_add_exit)) then + EXIT_FLAG=EXIT_FLAG+n_add_exit + if (EXIT_FLAG>1) EXIT_FLAG=1 + end if + +end subroutine specialmsg_setcount +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_specialmsg/specialmsg_getcount +!! NAME +!! specialmsg_getcount +!! +!! FUNCTION +!! Get the values of the counters of special messages (WARNING, COMMENT) +!! +!! INPUTS +!! +!! OUTPUT +!! ncomment= number of COMMENTs in log file +!! nwarning= number of WARNINGs in log file +!! nexit= 1 if exit requested +!! +!! SOURCE + +subroutine specialmsg_getcount(ncomment,nwarning,nexit) + +!Arguments ------------------------------------ + integer,intent(out) :: ncomment,nexit,nwarning + +! ********************************************************************* + + ncomment=COMMENT_COUNT + nwarning=WARNING_COUNT + nexit =EXIT_FLAG + +end subroutine specialmsg_getcount +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_specialmsg/specialmsg_mpisum +!! NAME +!! specialmsg_mpisum +!! +!! FUNCTION +!! Reduce the counters of special messages (WARNING, COMMENTS, EXIT) over a MPI communicator +!! +!! INPUTS +!! mpicomm= MPI communicator +!! +!! OUTPUT +!! (only counters updated) +!! +!! SOURCE + +subroutine specialmsg_mpisum(mpicomm) + +!Arguments ------------------------------------ + integer,intent(in) :: mpicomm + +!Local variables------------------------------- + integer :: ierr + integer :: buf(3) + +! ********************************************************************* + + buf(1)=COMMENT_COUNT;buf(2)=WARNING_COUNT;buf(3)=EXIT_FLAG + + call xmpi_sum(buf,mpicomm,ierr) + + COMMENT_COUNT=buf(1) + WARNING_COUNT=buf(2) + EXIT_FLAG=buf(3) ; if (EXIT_FLAG/=0) EXIT_FLAG=1 + +end subroutine specialmsg_mpisum +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_specialmsg/herald +!! NAME +!! herald +!! +!! FUNCTION +!! Prints out a message to unit iout giving info about current +!! code, version of code, platform, and starting date. +!! +!! INPUTS +!! code_name= code name +!! code_version= code version +!! iout=unit number for output +!! +!! OUTPUT +!! (only writing) +!! +!! SOURCE + +subroutine herald(code_name,code_version,iout) + +!Arguments ------------------------------------ + integer,intent(in) :: iout + character(len=*),intent(in) :: code_name + character(len=*),intent(in) :: code_version + +!Local variables------------------------------- + integer :: day,dd,ja,jy,jm,jdn,mm,mm_rel,year,year_rel + integer :: values(8) + character(len=5) :: strzone + character(len=8) :: strdat + character(len=10) :: strtime + character(len=500) :: msg + character(len=3),parameter :: day_names(7)=(/'Mon','Tue','Wed','Thu','Fri','Sat','Sun'/) + character(len=3),parameter :: month_names(12)=(/'Jan','Feb','Mar','Apr','May','Jun',& + 'Jul','Aug','Sep','Oct','Nov','Dec'/) + +! ************************************************************************* + +!RELEASE TIME FROM ABIRULES + year_rel=2024 + mm_rel=03 +!END OF RELEASE TIME + +!The technique used hereafter is the only one that we have found to obtain +!perfect transferability across platforms and OS. + write(iout, '(/,a,a,a,a,a,a,a,i4,a)' ) '.Version ',trim(code_version),' of ',trim(code_name),', released ',month_names(mm_rel),' ',year_rel,'.' +#if defined HAVE_MPI + write(iout, '(a,a,a,/)' ) '.(MPI version, prepared for a ',build_target,' computer) ' +#else + write(iout, '(a,a,a,/)' ) '.(sequential version, prepared for a ',build_target,' computer) ' +#endif + +!GNU GPL license + write(iout, '(a,/,a,a,a,/,a,/,a,/,a,/)' ) & + '.Copyright (C) 1998-2024 ABINIT group . ',& + ' ',trim(code_name),' comes with ABSOLUTELY NO WARRANTY.',& + ' It is free software, and you are welcome to redistribute it',& + ' under certain conditions (GNU General Public License,',& + ' see ~abinit/COPYING or http://www.gnu.org/copyleft/gpl.txt).' + + if(trim(code_name)=='OPTIC')then + write(iout, '(a,a,a,/,a,/,a,/,a,/,a,/,a,/,a,/)' ) & + ' ',trim(code_name),' has originally been developed by',& + ' Sangeeta Sharma and incorporated in ABINIT with the help of M. Verstraete.',& + ' Please refer to : ',& + ' S. Sharma, J. K. Dewhurst and C. Ambrosch-Draxl, Phys. Rev. B 67, 165332 (2003), and',& + ' S. Sharma and C. Ambrosch-Draxl, Physica Scripta T 109 (2004).',& + '- URLs and DOI at https://docs.abinit.org/theory/bibliography/#sharma2003',& + '- and https://docs.abinit.org/theory/bibliography/#sharma2004' + end if + + write(iout, '(a,/,a,/,a,/,a,/,a)' ) & + ' ABINIT is a project of the Universite Catholique de Louvain,',& + ' Corning Inc. and other collaborators, see ~abinit/doc/developers/contributors.txt .',& + ' Please read https://docs.abinit.org/theory/acknowledgments for suggested',& + ' acknowledgments of the ABINIT effort.',& + ' For more information, see https://www.abinit.org .' + +!Get year, month and day + call date_and_time(strdat,strtime,strzone,values) + year=values(1) + mm=values(2) + dd=values(3) + +!Get day of the week + if (mm.gt.2) then + jy=year + jm=mm+1 + else + jy=year-1 + jm=mm+13 + end if + jdn=int(365.25d0*jy)+int(30.6001d0*jm)+dd+1720995 + ja=int(0.01d0*jy) + jdn=jdn+2-ja+int(quarter*ja) + day=mod(jdn,7)+1 + +!Print date in nice format (* new format *) + write(iout, '(/,a,a,1x,i2,1x,a,1x,i4,a,/,a,i2.2,a,i2.2,a)' ) & + '.Starting date : ',day_names(day),dd,month_names(mm),year,'.','- ( at ',values(5),'h',values(6),' )' + write(iout,*)' ' + +!Impose a maximal life cycle of 3 years + if(year>year_rel+3 .or. (year==year_rel+3 .and. mm>mm_rel) ) then + write(msg, '(5a,i4,5a)' )& + '- The starting date is more than 3 years after the initial release',ch10,& + '- of this version of ABINIT, namely ',month_names(mm_rel),' ',year_rel,'.',ch10,& + '- This version of ABINIT is not supported anymore.',ch10,& + '- Action: please, switch to a more recent version of ABINIT.' + call wrtout(iout,msg,'COLL') + +! Gives a warning beyond 2 years + else if(year>year_rel+2 .or. (year==year_rel+2 .and. mm>mm_rel) ) then + write(msg, '(5a,i4,6a)' )& + '- The starting date is more than 2 years after the initial release',ch10,& + '- of this version of ABINIT, namely ',month_names(mm_rel),' ',year_rel,'.',ch10,& + '- Note that the use beyond 3 years after the release will not be supported.',ch10,& + '- Action: please, switch to a more recent version of ABINIT.',ch10 + call wrtout(iout,msg,'COLL') + end if + +end subroutine herald +!!*** + +!!****f* m_specialmsg/wrtout_unit +!! NAME +!! wrtout_unit +!! +!! FUNCTION +!! Organizes the sequential or parallel version of the write intrinsic +!! Also allows to treat correctly the write operations for Unix (+DOS) and MacOS. +!! +!! INPUTS +!! msg=(character(len=*)) message to be written +!! unit=unit number for writing. The named constant dev_null defined in defs_basis can be used to avoid any printing. +!! [mode_paral]= --optional argument-- +!! 'COLL' if all procs are calling the routine with the same message to be written once only. Default. +!! 'PERS' if the procs are calling the routine with different messages each to be written, +!! or if one proc is calling the routine +!! "INIT" to change the rank of the master node that prints the message if "COLL" is used. +!! [do_flush]=True to flush the unit. Defaults to .False. +!! [newlines]: Number of new lines added after message. Default 0 +!! [pre_newlines]: Number of new lines added vefore message. Default 0 +!! +!! OUTPUT +!! (only writing) +!! +!! SOURCE + +subroutine wrtout_unit(unit, msg, mode_paral, do_flush, newlines, pre_newlines) + +!Arguments ------------------------------------ + integer,intent(in) :: unit + character(len=*),intent(in) :: msg + character(len=*),optional,intent(in) :: mode_paral + logical,optional,intent(in) :: do_flush + integer,optional,intent(in) :: newlines, pre_newlines + +!Local variables------------------------------- + integer,save :: master=0 + integer :: comm, me, nproc, my_newlines, ii, my_pre_newlines + logical :: my_flush + character(len=len(msg)+50) :: string + character(len=500) :: my_mode_paral + +!****************************************************************** + + if (unit == std_out .and. .not. do_write_log) return + if (unit == dev_null) return + !if (.not. is_open(unit)) return + + my_mode_paral = "COLL"; if (present(mode_paral)) my_mode_paral = trim(mode_paral) + my_flush = .false.; if (present(do_flush)) my_flush = do_flush + my_newlines = 0; if (present(newlines)) my_newlines = newlines + my_pre_newlines = 0; if (present(pre_newlines)) my_pre_newlines = pre_newlines + + ! Communicator is xmpi_world by default, except for the parallelization over images + if (abinit_comm_output /= -1) then + comm = abinit_comm_output + else + comm = xmpi_world + end if + + ! Determine who I am in COMM_WORLD + me = xmpi_comm_rank(comm); nproc = xmpi_comm_size(comm) + + if (my_mode_paral == 'COLL' .or. nproc == 1) then + if (me == master) then + if (my_pre_newlines /= 0) then + do ii=1,my_pre_newlines; write(unit, "(a)")""; end do + end if + call wrtout_myproc(unit, msg, do_flush=my_flush) + if (my_newlines /= 0) then + do ii=1,my_newlines; write(unit, "(a)")""; end do + end if + end if + + else if (my_mode_paral == 'PERS') then + if (my_pre_newlines /= 0) then + do ii=1,my_pre_newlines; write(unit, "(a)")""; end do + end if + call write_lines(unit,msg) + if (my_newlines /= 0) then + do ii=1,my_newlines; write(unit, "(a)")""; end do + end if + ! Flush unit + if (my_flush) call flush_unit(unit) + + else if (my_mode_paral == 'INIT') then + master = unit + + else + !print *, trim(my_mode_paral) + write(string,'(7a)')ch10,& + 'wrtout_unit: ERROR -',ch10,& + ' Unknown write mode: ',trim(my_mode_paral),ch10,& + ' Continuing anyway ...' + write(unit, '(A)' ) trim(string) + end if + +end subroutine wrtout_unit +!!*** + +!!****f* m_specialmsg/wrtout_units +!! NAME +!! wrtout_units +!! +!! FUNCTION +!! Write string to multiple units. Wraps wrtout_unit +!! +!! INPUTS +!! msg=(character(len=*)) message to be written +!! units=unit number for writing. The named constant dev_null defined in defs_basis can be used to avoid any printing. +!! [mode_paral]= --optional argument-- +!! 'COLL' if all procs are calling the routine with the same message to be written once only. Default. +!! 'PERS' if the procs are calling the routine with different messages each to be written, +!! or if one proc is calling the routine +!! "INIT" to change the rank of the master node that prints the message if "COLL" is used. +!! [do_flush]=True to flush the unit. Defaults to .False. +!! [newlines]: Number of new lines added after message. Default 0 +!! [pre_newlines]: Number of new lines added vefore message. Default 0 +!! +!! OUTPUT +!! (only writing) +!! +!! SOURCE + +subroutine wrtout_units(units, msg, mode_paral, do_flush, newlines, pre_newlines) + +!Arguments ------------------------------------ + integer,intent(in) :: units(:) + character(len=*),intent(in) :: msg + character(len=*),optional,intent(in) :: mode_paral + logical,optional,intent(in) :: do_flush + integer,optional,intent(in) :: newlines, pre_newlines + +!Local variables------------------------------- +!scalars + integer :: ii, cnt, my_newlines, my_pre_newlines + logical :: my_flush + character(len=500) :: my_mode_paral +!arrays + integer :: my_units(size(units)) + +!****************************************************************** + + my_mode_paral = "COLL"; if (present(mode_paral)) my_mode_paral = mode_paral + my_flush = .false.; if (present(do_flush)) my_flush = do_flush + my_newlines = 0; if (present(newlines)) my_newlines = newlines + my_pre_newlines = 0; if (present(pre_newlines)) my_pre_newlines = pre_newlines + + ! Remove duplicated units (if any) + my_units(1) = units(1); cnt = 1 + do ii=2,size(units) + if (any(units(ii) == my_units(1:cnt))) cycle + cnt = cnt + 1 + my_units(cnt) = units(ii) + end do + + do ii=1,cnt + call wrtout_unit(my_units(ii), msg, mode_paral=my_mode_paral, & + do_flush=my_flush, newlines=my_newlines, pre_newlines=my_pre_newlines) + end do + +end subroutine wrtout_units +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_specialmsg/wrtout_myproc +!! NAME +!! wrtout_myproc +!! +!! FUNCTION +!! Do the output for one proc. For parallel or sequential output use wrtout() +!! instead. Also allows to treat correctly the write operations for Unix (+DOS) and MacOS. +!! +!! INPUTS +!! unit=unit number for writing +!! msg=(character(len=*)) message to be written +!! [do_flush]=True to flush the unit. Defaults to .False. +!! +!! OUTPUT +!! (only writing) +!! +!! SOURCE + +subroutine wrtout_myproc(unit, msg, do_flush) ! optional argument + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: unit + character(len=*),intent(in) :: msg + logical,optional,intent(in) :: do_flush + +!Local variables------------------------------- +!scalars + logical :: print_std_err + +!****************************************************************** + + print_std_err = (unit == std_out .and. std_out /= std_err .and. & + (index(trim(msg), 'BUG') /= 0 .or. index(trim(msg), 'ERROR') /= 0)) + + ! Print message + call write_lines(unit, msg) + if (print_std_err) call write_lines(std_err, msg) + + ! Append "Contact Abinit group" to BUG messages + if (index(trim(msg), 'BUG') /= 0 )then + write(unit, '(a)' ) ' Action: contact ABINIT group (please attach the output of `abinit -b`)' + write(unit,*) + if (print_std_err) then + write(std_err, '(a)' ) ' Action: contact ABINIT group (please attach the output of `abinit -b`)' + write(std_err,*) + end if + end if + + ! Count the number of warnings and comments. Only take into + ! account unit std_out, in order not to duplicate these numbers. + if (index(trim(msg), 'WARNING') /= 0 .and. unit==std_out) call specialmsg_setcount(n_add_warning=1) + if (index(trim(msg), 'COMMENT') /= 0 .and. unit==std_out) call specialmsg_setcount(n_add_comment=1) + if (index(trim(msg), 'Exit') /= 0 ) call specialmsg_setcount(n_add_exit=1) + + ! Flush unit + if (present(do_flush)) then + if (do_flush) call flush_unit(unit) + end if +#ifdef DEBUG_MODE + call flush_unit(unit) + if (print_std_err) call flush_unit(std_err) +#endif + +end subroutine wrtout_myproc +!!*** + +end module m_specialmsg +!!*** diff --git a/GX-PAW/common/src/14_hidewrite/m_specialmsg.o b/GX-PAW/common/src/14_hidewrite/m_specialmsg.o new file mode 100644 index 00000000..f999a9ec Binary files /dev/null and b/GX-PAW/common/src/14_hidewrite/m_specialmsg.o differ diff --git a/GX-PAW/common/src/16_hideleave/Makefile b/GX-PAW/common/src/16_hideleave/Makefile new file mode 100644 index 00000000..2c5d1379 --- /dev/null +++ b/GX-PAW/common/src/16_hideleave/Makefile @@ -0,0 +1,1463 @@ +# Makefile.in generated by automake 1.16.3 from Makefile.am. +# shared/common/src/16_hideleave/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994-2020 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-corelibs on 2024/03/16 21:07:38 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-corelibs script or its config file instead. +# + + +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/abinit +pkgincludedir = $(includedir)/abinit +pkglibdir = $(libdir)/abinit +pkglibexecdir = $(libexecdir)/abinit +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = x86_64-apple-darwin18.7.0 +host_triplet = x86_64-apple-darwin18.7.0 +target_triplet = x86_64-apple-darwin18.7.0 +subdir = shared/common/src/16_hideleave +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/m4/arch-gpu.m4 \ + $(top_srcdir)/config/m4/arch-mpi.m4 \ + $(top_srcdir)/config/m4/auto-autotools.m4 \ + $(top_srcdir)/config/m4/auto-corelibs.m4 \ + $(top_srcdir)/config/m4/auto-debug.m4 \ + $(top_srcdir)/config/m4/auto-dirflags.m4 \ + $(top_srcdir)/config/m4/auto-env.m4 \ + $(top_srcdir)/config/m4/auto-hints.m4 \ + $(top_srcdir)/config/m4/auto-optim.m4 \ + $(top_srcdir)/config/m4/auto-options.m4 \ + $(top_srcdir)/config/m4/auto-output.m4 \ + $(top_srcdir)/config/m4/auto-triggers.m4 \ + $(top_srcdir)/config/m4/conf-atompaw.m4 \ + $(top_srcdir)/config/m4/conf-debug.m4 \ + $(top_srcdir)/config/m4/conf-fallbacks.m4 \ + $(top_srcdir)/config/m4/conf-files.m4 \ + $(top_srcdir)/config/m4/conf-init.m4 \ + $(top_srcdir)/config/m4/conf-openmp.m4 \ + $(top_srcdir)/config/m4/conf-optim.m4 \ + $(top_srcdir)/config/m4/lang-c++.m4 \ + $(top_srcdir)/config/m4/lang-c.m4 \ + $(top_srcdir)/config/m4/lang-fortran-import.m4 \ + $(top_srcdir)/config/m4/lang-fortran.m4 \ + $(top_srcdir)/config/m4/lang-python.m4 \ + $(top_srcdir)/config/m4/libxml2.m4 \ + $(top_srcdir)/config/m4/misc-display.m4 \ + $(top_srcdir)/config/m4/sd_abinit_common.m4 \ + $(top_srcdir)/config/m4/sd_arch_gpu.m4 \ + $(top_srcdir)/config/m4/sd_arch_mpi.m4 \ + $(top_srcdir)/config/m4/sd_bigdft.m4 \ + $(top_srcdir)/config/m4/sd_core.m4 \ + $(top_srcdir)/config/m4/sd_esl.m4 \ + $(top_srcdir)/config/m4/sd_fftw3.m4 \ + $(top_srcdir)/config/m4/sd_gpu_kokkos.m4 \ + $(top_srcdir)/config/m4/sd_gpu_yakl.m4 \ + $(top_srcdir)/config/m4/sd_io_hdf5.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf_fortran.m4 \ + $(top_srcdir)/config/m4/sd_levmar.m4 \ + $(top_srcdir)/config/m4/sd_libpaw.m4 \ + $(top_srcdir)/config/m4/sd_libpsml.m4 \ + $(top_srcdir)/config/m4/sd_libxc.m4 \ + $(top_srcdir)/config/m4/sd_math_fft.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_core.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_util.m4 \ + $(top_srcdir)/config/m4/sd_papi.m4 \ + $(top_srcdir)/config/m4/sd_pfft.m4 \ + $(top_srcdir)/config/m4/sd_triqs.m4 \ + $(top_srcdir)/config/m4/sd_wannier90.m4 \ + $(top_srcdir)/config/m4/sd_xmlf90.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +AM_V_AR = $(am__v_AR_$(V)) +am__v_AR_ = $(am__v_AR_$(AM_DEFAULT_VERBOSITY)) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = +lib16_hideleave_a_AR = $(AR) $(ARFLAGS) +lib16_hideleave_a_LIBADD = +am__objects_1 = m_xieee.$(OBJEXT) m_errors.$(OBJEXT) +am_lib16_hideleave_a_OBJECTS = $(am__objects_1) +lib16_hideleave_a_OBJECTS = $(am_lib16_hideleave_a_OBJECTS) +AM_V_P = $(am__v_P_$(V)) +am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY)) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I. -I$(top_builddir) +PPFCCOMPILE = $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) +AM_V_PPFC = $(am__v_PPFC_$(V)) +am__v_PPFC_ = $(am__v_PPFC_$(AM_DEFAULT_VERBOSITY)) +am__v_PPFC_0 = @echo " PPFC " $@; +am__v_PPFC_1 = +FCLD = $(FC) +FCLINK = $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \ + $@ +AM_V_FCLD = $(am__v_FCLD_$(V)) +am__v_FCLD_ = $(am__v_FCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_FCLD_0 = @echo " FCLD " $@; +am__v_FCLD_1 = +SOURCES = $(lib16_hideleave_a_SOURCES) +DIST_SOURCES = $(lib16_hideleave_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ABINIT_BINARY_PACKAGE = abinit-10.0.0.83-58be4d_x86_64_darwin18.7.0_gnu9.4 +ABINIT_COMMON_CPPFLAGS = +ABINIT_COMMON_FCFLAGS = +ABINIT_COMMON_LDFLAGS = +ABINIT_COMMON_LIBS = +ABINIT_TARGET = x86_64_darwin18.7.0_gnu9.4 +ABINIT_VERSION = 10.0.0.83-58be4d +ABINIT_VERSION_BASE = 10.0 +ABINIT_VERSION_BUILD = 20240316 +ABINIT_VERSION_MAJOR = 10 +ABINIT_VERSION_MICRO = 0 +ABINIT_VERSION_MINOR = 0 +ABI_CPPFLAGS = -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include +ACLOCAL = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' aclocal-1.16 +AMTAR = $${TAR-tar} +AM_DEFAULT_VERBOSITY = 1 +AR = ar +ARFLAGS = rc +ARFLAGS_CMD = rc +ARFLAGS_DEBUG = +ARFLAGS_EXTRA = +ARFLAGS_HINTS = +ARFLAGS_OPTIM = +ATOMPAW_BIN = +AUTOCONF = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' autoconf +AUTOHEADER = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' autoheader +AUTOMAKE = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' automake-1.16 +AWK = awk +BIGDFT_CPPFLAGS = +BIGDFT_FCFLAGS = +BIGDFT_LDFLAGS = +BIGDFT_LIBS = +BOURNE_SHELL = /bin/sh +CC = /opt/local/bin/mpicc +CCDEPMODE = depmode=gcc3 +CC_LDFLAGS = +CC_LDFLAGS_DEBUG = +CC_LDFLAGS_EXTRA = +CC_LDFLAGS_GPU = +CC_LDFLAGS_HINTS = +CC_LDFLAGS_OPTIM = +CC_LIBS = +CC_LIBS_DEBUG = +CC_LIBS_EXTRA = +CC_LIBS_GPU = +CC_LIBS_HINTS = +CC_LIBS_OPTIM = +CFLAGS = -O2 -g +CFLAGS_DEBUG = +CFLAGS_EXTRA = +CFLAGS_GPU = +CFLAGS_HINTS = +CFLAGS_OPTIM = +CPP = /opt/local/bin/mpicc -E +CPPFLAGS = +CPPFLAGS_DEBUG = +CPPFLAGS_EXTRA = +CPPFLAGS_GPU = +CPPFLAGS_HINTS = +CPPFLAGS_HINTS_EXT = -P -std=c99 +CPPFLAGS_OPTIM = +CXX = /opt/local/bin/mpicxx +CXXDEPMODE = depmode=gcc3 +CXXFLAGS = -O2 -g +CXXFLAGS_DEBUG = +CXXFLAGS_EXTRA = +CXXFLAGS_GPU = +CXXFLAGS_HINTS = +CXXFLAGS_OPTIM = +CXX_LDFLAGS = +CXX_LDFLAGS_DEBUG = +CXX_LDFLAGS_EXTRA = +CXX_LDFLAGS_GPU = +CXX_LDFLAGS_HINTS = +CXX_LDFLAGS_OPTIM = +CXX_LIBS = +CXX_LIBS_DEBUG = +CXX_LIBS_EXTRA = +CXX_LIBS_GPU = +CXX_LIBS_HINTS = +CXX_LIBS_OPTIM = +CYGPATH_W = echo +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +ECHO_C = \c +ECHO_N = +ECHO_T = +EGREP = /usr/bin/grep -E +EXEEXT = +F77 = /opt/local/bin/mpif90 +FC = /opt/local/bin/mpif90 +FCFLAGS = -O2 -g -ffree-line-length-none -I/opt/local/include -I/opt/local/include -I/opt/local/include +FCFLAGS_DEBUG = +FCFLAGS_EXTRA = +FCFLAGS_F90 = +FCFLAGS_FIXEDFORM = -ffixed-form +FCFLAGS_FREEFORM = -ffree-form +FCFLAGS_HINTS = -ffree-line-length-none +FCFLAGS_MODDIR = -J../mods +FCFLAGS_OPENMP = +FCFLAGS_OPENMP_OFFLOAD = +FCFLAGS_OPTIM = +FCLIBS = -L/opt/local/lib -L/opt/local/lib/openmpi-gcc9 -L/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0 -L/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/../../.. -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi -lgfortran -lquadmath -lm +FC_LDFLAGS = +FC_LDFLAGS_DEBUG = +FC_LDFLAGS_EXTRA = +FC_LDFLAGS_HINTS = +FC_LDFLAGS_OPTIM = +FC_LIBS = +FC_LIBS_DEBUG = +FC_LIBS_EXTRA = +FC_LIBS_HINTS = +FC_LIBS_OPTIM = +FC_NOWRAP = /opt/local/bin/mpif90 +FFLAGS = -O2 -g -ffree-line-length-none -I/opt/local/include -I/opt/local/include -I/opt/local/include +FFTW3_CFLAGS = +FFTW3_CPPFLAGS = -I/opt/local/include +FFTW3_FCFLAGS = -I/opt/local/include +FFTW3_LDFLAGS = +FFTW3_LIBS = -L/opt/local/lib -lfftw3 -lfftw3f +FFT_CFLAGS = +FFT_FCFLAGS = +FPP = +FPPFLAGS = +FPPFLAGS_DEBUG = +FPPFLAGS_EXTRA = +FPPFLAGS_HINTS = +FPPFLAGS_OPTIM = +GPU_ARCH = +GPU_CFLAGS = +GPU_CPPFLAGS = +GPU_CXXFLAGS = +GPU_FCFLAGS = +GPU_LDFLAGS = +GPU_LIBS = +GRAPHATOM_BIN = +GREP = /usr/bin/grep +H5CC = +HDF5_CFLAGS = +HDF5_CPPFLAGS = +HDF5_CXXFLAGS = +HDF5_FCFLAGS = +HDF5_LDFLAGS = +HDF5_LIBS = +INSTALL = /opt/local/libexec/gnubin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +KOKKOS_CPPFLAGS = +KOKKOS_CXXFLAGS = +KOKKOS_LDFLAGS = +KOKKOS_LIBS = +LDFLAGS = +LEVMAR_CFLAGS = +LEVMAR_CPPFLAGS = +LEVMAR_LDFLAGS = +LEVMAR_LIBS = +LIBOBJS = +LIBPAW_CPPFLAGS = +LIBPAW_FCFLAGS = +LIBPAW_LDFLAGS = +LIBPAW_LIBS = +LIBPSML_CPPFLAGS = +LIBPSML_FCFLAGS = +LIBPSML_LDFLAGS = +LIBPSML_LIBS = +LIBS = -L/opt/local/lib -lwannier -L/opt/local/lib -lxc -L/opt/local/lib -lnetcdff -L/opt/local/lib -lnetcdf -L/opt/local/lib -L/opt/local/lib -lhdf5_hl -L/opt/local/lib -lhdf5 -lz -ldl -lm -L/opt/local/lib -lfftw3 -lfftw3f +LIBXC_CFLAGS = +LIBXC_CPPFLAGS = +LIBXC_FCFLAGS = +LIBXC_LDFLAGS = +LIBXC_LIBS = +LIBXML2_CPPFLAGS = +LIBXML2_FCFLAGS = +LIBXML2_LIBS = +LINALG_CFLAGS = +LINALG_CPPFLAGS = +LINALG_CXXFLAGS = +LINALG_FCFLAGS = -I/opt/local/include +LINALG_LDFLAGS = +LINALG_LIBS = -L/opt/local/lib -lopenblas +LN_S = ln -s +LTLIBOBJS = +MAKEINFO = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' makeinfo +MKDIR_P = /opt/local/libexec/gnubin/mkdir -p +MODEXT = mod +MPI_CFLAGS = +MPI_CPPFLAGS = +MPI_CXXFLAGS = +MPI_FCFLAGS = +MPI_LDFLAGS = +MPI_LIBS = +MV = /opt/local/libexec/gnubin/mv +NETCDF_CFLAGS = +NETCDF_CPPFLAGS = +NETCDF_CXXFLAGS = +NETCDF_FCFLAGS = +NETCDF_FORTRAN_CFLAGS = +NETCDF_FORTRAN_CPPFLAGS = +NETCDF_FORTRAN_CXXFLAGS = +NETCDF_FORTRAN_FCFLAGS = +NETCDF_FORTRAN_LDFLAGS = +NETCDF_FORTRAN_LIBS = +NETCDF_LDFLAGS = +NETCDF_LIBS = +NVCC = +NVCC_CFLAGS = +NVCC_CPPFLAGS = +NVCC_LDFLAGS = +NVCC_LIBS = +OBJEXT = o +PACKAGE = abinit +PACKAGE_BUGREPORT = https://bugs.launchpad.net/abinit/ +PACKAGE_NAME = ABINIT +PACKAGE_STRING = ABINIT 10.0.0.83-58be4d +PACKAGE_TARNAME = abinit +PACKAGE_URL = +PACKAGE_VERSION = 10.0.0.83-58be4d +PAPI_CFLAGS = +PAPI_CPPFLAGS = +PAPI_LDFLAGS = +PAPI_LIBS = +PATCH = patch +PATH_SEPARATOR = : +PERL = /usr/bin/perl +PFFT_CFLAGS = +PFFT_CPPFLAGS = +PFFT_LDFLAGS = +PFFT_LIBS = +PYFLAGS = +PYTHON = python3.9 +PYTHON_CONFIG = python3.9-config +PYTHON_CPPFLAGS = -I/opt/local/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -I/opt/local/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 +RANLIB = ranlib +REALPATH = realpath +RM = /opt/local/libexec/gnubin/rm +SED = /usr/bin/sed +SET_MAKE = +SHELL = /bin/sh +STRIP = +TAR = tar +TRIQS_CFLAGS = +TRIQS_CPPFLAGS = +TRIQS_CXXFLAGS = +TRIQS_LDFLAGS = +TRIQS_LIBS = +TRUE_CPP = cpp +VERSION = 10.0.0.83-58be4d +WANNIER90_CPPFLAGS = +WANNIER90_FCFLAGS = -I/opt/local/include +WANNIER90_LDFLAGS = +WANNIER90_LIBS = -L/opt/local/lib -lwannier +XML2_CONFIG = +XMLF90_CPPFLAGS = +XMLF90_FCFLAGS = +XMLF90_LDFLAGS = +XMLF90_LIBS = +XML_CPPFLAGS = +XML_LIBS = +XPP = +XPPFLAGS = +XPPFLAGS_DEBUG = +XPPFLAGS_EXTRA = +XPPFLAGS_OPTIM = +YAKL_CPPFLAGS = +YAKL_FCFLAGS = +YAKL_LDFLAGS = +YAKL_LIBS = +abi_ac_distcheck = --with-config-file="/Users/gonze/_Research/ABINIT_git/gonze/mac-1P0-225.ac9" +abi_ac_version = 027100 +abi_am_version = 011603 +abi_avx_safe_mode_enable = no +abi_bse_unpacked_enable = no +abi_cc_path = +abi_cc_vendor = gnu +abi_cc_version = 9.4 +abi_cclock_enable = no +abi_cpp_path = +abi_cpu_64bits = yes +abi_cpu_bits = 64 +abi_cpu_model = unknown +abi_cpu_platform = apple +abi_cpu_spec = unknown_unknown +abi_cpu_vendor = unknown +abi_crpa_optim_enable = no +abi_cxx_path = +abi_cxx_vendor = gnu +abi_cxx_version = 9.4 +abi_debug_flavor = basic +abi_exports_enable = no +abi_fbk_abinit_common_ok = no +abi_fbk_bigdft_ok = disabled +abi_fbk_config = +abi_fbk_enable = no +abi_fbk_fft_ok = no +abi_fbk_fftw3_ok = no +abi_fbk_gpu_ok = no +abi_fbk_hdf5_ok = disabled +abi_fbk_init = def +abi_fbk_kokkos_ok = no +abi_fbk_levmar_ok = no +abi_fbk_libpaw_ok = no +abi_fbk_libpsml_ok = disabled +abi_fbk_libxc_ok = disabled +abi_fbk_libxml2_ok = no +abi_fbk_linalg_ok = disabled +abi_fbk_list = +abi_fbk_mpi_ok = no +abi_fbk_netcdf_fortran_ok = disabled +abi_fbk_netcdf_ok = disabled +abi_fbk_papi_ok = no +abi_fbk_pfft_ok = no +abi_fbk_prefix = +abi_fbk_required = +abi_fbk_triqs_ok = no +abi_fbk_wannier90_ok = disabled +abi_fbk_xmlf90_ok = disabled +abi_fbk_yakl_ok = no +abi_fc_path = +abi_fc_vendor = gnu +abi_fc_version = 9.4 +abi_fc_wrap = no +abi_fc_wrapper_enable = no +abi_fpp_path = +abi_gpu_arch = +abi_gpu_fcflags = +abi_gpu_flavor = none +abi_gpu_hip_libdir = +abi_gpu_incs = +abi_gpu_ldflags = +abi_gpu_libs = +abi_gpu_nvtx_v3 = +abi_gpu_roctx = +abi_gw_dpc_enable = yes +abi_hints_enable = yes +abi_libtetra_enable = yes +abi_libxml2_cppflags = +abi_libxml2_enable = no +abi_libxml2_fcflags = +abi_libxml2_init = def +abi_libxml2_ldflags = +abi_libxml2_libs = +abi_libxml2_ok = unknown +abi_libxml2_prefix = +abi_lotf_enable = no +abi_lt_version = 020406 +abi_m4_version = 010419 +abi_memory_profiling_enable = no +abi_mpi_cflags = +abi_mpi_cppflags = +abi_mpi_cxxflags = +abi_mpi_enable = yes +abi_mpi_fcflags = +abi_mpi_flavor = auto +abi_mpi_gpu_aware_enable = no +abi_mpi_incs = +abi_mpi_inplace_enable = yes +abi_mpi_interfaces_bugfix_enable = no +abi_mpi_io_default_enable = no +abi_mpi_io_enable = yes +abi_mpi_ldflags = +abi_mpi_level = 2 +abi_mpi_libs = +abi_netcdf_default_enable = no +abi_openmp_enable = no +abi_openmp_offload_enable = no +abi_optim_flavor = standard +abi_python_invocation_enable = no +abi_source_debug_enable = no +abi_stdin_enable = yes +abi_sys_spec = darwin-x86_64 +abi_timer_enable = yes +abi_triqs_v1_4_enable = no +abi_triqs_v2_0_enable = no +abi_zdot_bugfix_enable = no +abinit_bindir = /usr/local/bin +abinit_builddir = /Users/gonze/_Research/ABINIT_git/gonze +abinit_chkdir = /usr/local/share/abinit/tests +abinit_datdir = /usr/local/share/abinit +abinit_docdir = /usr/local/doc/abinit +abinit_incdir = /usr/local/include +abinit_libdir = /usr/local/lib +abinit_mandir = /usr/local/share/man +abinit_prefix = /usr/local +abinit_srcdir = /Users/gonze/_Research/ABINIT_git/gonze +abs_builddir = /Users/gonze/_Research/ABINIT_git/gonze/shared/common/src/16_hideleave +abs_srcdir = /Users/gonze/_Research/ABINIT_git/gonze/shared/common/src/16_hideleave +abs_top_builddir = /Users/gonze/_Research/ABINIT_git/gonze +abs_top_srcdir = /Users/gonze/_Research/ABINIT_git/gonze +ac_ct_CC = +ac_ct_CXX = +ac_ct_FC = +am__include = include +am__leading_dot = . +am__quote = +am__tar = tar --format=ustar -chf - "$$tardir" +am__untar = tar -xf - +bindir = ${exec_prefix}/bin +build = x86_64-apple-darwin18.7.0 +build_alias = +build_cpu = x86_64 +build_os = darwin18.7.0 +build_vendor = apple +builddir = . +cc_info_string = gcc-mp-9 (MacPorts gcc9 9.4.0_0) 9.4.0 +cxx_info_string = g++-mp-9 (MacPorts gcc9 9.4.0_0) 9.4.0 +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +enable_avx_safe_mode = +enable_bse_unpacked = +enable_cclock = +enable_crpa_optim = +enable_exports = +enable_fc_wrapper = +enable_gw_dpc = yes +enable_hints = +enable_libtetra = +enable_lotf = +enable_memory_profiling = +enable_mpi_gpu_aware = +enable_mpi_inplace = +enable_mpi_interfaces_bugfix = +enable_mpi_io = yes +enable_mpi_io_default = +enable_netcdf_default = +enable_openmp = +enable_openmp_offload = +enable_python_invocation = +enable_shared = +enable_source_debug = +enable_static = +enable_stdin = +enable_timer = +enable_triqs_v1_4 = +enable_triqs_v2_0 = +enable_zdot_bugfix = +exec_prefix = ${prefix} +fc_info_string = GNU Fortran (MacPorts gcc9 9.4.0_0) 9.4.0 +fc_mod_fcflags = +fc_timing = standard +fcflags_opt_02_clib = +fcflags_opt_10_defs = +fcflags_opt_11_memory_mpi = +fcflags_opt_12_hide_mpi = +fcflags_opt_14_hidewrite = +fcflags_opt_16_hideleave = +fcflags_opt_16_kokkos_toolbox = +fcflags_opt_17_gpu_toolbox = +fcflags_opt_17_libtetra_ext = +fcflags_opt_17_minimax = +fcflags_opt_17_yaml_out = +fcflags_opt_18_timing = +fcflags_opt_21_hashfuncs = +fcflags_opt_27_toolbox_oop = +fcflags_opt_28_numeric_noabirule = +fcflags_opt_29_kpoints = +fcflags_opt_32_util = +fcflags_opt_33_xc_lowlevel = +fcflags_opt_39_libpaw = +fcflags_opt_41_geometry = +fcflags_opt_42_nlstrain = +fcflags_opt_42_parser = +fcflags_opt_43_ptgroups = -O0 +fcflags_opt_43_wvl_wrappers = +fcflags_opt_44_abitools = +fcflags_opt_44_abitypes_defs = +fcflags_opt_44_manage_kokkos = +fcflags_opt_45_geomoptim = +fcflags_opt_45_xgTools = +fcflags_opt_46_ghc_omp = +fcflags_opt_46_manage_cuda = +fcflags_opt_48_diago = +fcflags_opt_49_gw_toolbox_oop = +fcflags_opt_51_manage_mpi = +fcflags_opt_52_fft_mpi_noabirule = +fcflags_opt_53_ffts = +fcflags_opt_54_spacepar = +fcflags_opt_55_abiutil = +fcflags_opt_56_io_mpi = +fcflags_opt_56_mixing = +fcflags_opt_56_recipspace = +fcflags_opt_56_xc = +fcflags_opt_57_iopsp_parser = +fcflags_opt_57_iovars = +fcflags_opt_61_occeig = +fcflags_opt_62_cg_noabirule = +fcflags_opt_62_ctqmc = +fcflags_opt_62_iowfdenpot = +fcflags_opt_62_poisson = +fcflags_opt_62_wvl_wfs = +fcflags_opt_64_psp = +fcflags_opt_65_lotf_base = +fcflags_opt_65_paw = +fcflags_opt_66_nonlocal = +fcflags_opt_66_vdwxc = +fcflags_opt_66_wfs = +fcflags_opt_67_common = +fcflags_opt_67_python_invocation_ext = +fcflags_opt_67_triqs_ext = +fcflags_opt_68_dmft = +fcflags_opt_68_lotf = +fcflags_opt_68_recursion = +fcflags_opt_68_rsprc = +fcflags_opt_69_wfdesc = +fcflags_opt_70_gw = +fcflags_opt_71_bse = +fcflags_opt_71_wannier = +fcflags_opt_72_response = +fcflags_opt_77_ddb = +fcflags_opt_77_suscep = +fcflags_opt_78_effpot = +fcflags_opt_78_eph = +fcflags_opt_79_seqpar_mpi = +fcflags_opt_80_rttddft = +fcflags_opt_80_tdep = +fcflags_opt_94_scfcv = +fcflags_opt_95_drive = +fcflags_opt_98_main = +fcflags_opt_bigdft = +fcflags_opt_default = +fcflags_opt_hdf5 = +fcflags_opt_levmar = +fcflags_opt_libpsml = +fcflags_opt_libxc = +fcflags_opt_libxml2 = +fcflags_opt_linalg = +fcflags_opt_netcdf = +fcflags_opt_netcdf_fortran = +fcflags_opt_papi = +fcflags_opt_triqs = +fcflags_opt_wannier90 = +fcflags_opt_xmlf90 = +host = x86_64-apple-darwin18.7.0 +host_alias = +host_cpu = x86_64 +host_os = darwin18.7.0 +host_vendor = apple +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = ${SHELL} /Users/gonze/_Research/ABINIT_git/gonze/config/gnu/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = ${datarootdir}/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = $(MKDIR_P) +oldincludedir = /usr/include +pdfdir = ${docdir} +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +runstatedir = ${localstatedir}/run +sbindir = ${exec_prefix}/sbin +sd_abinit_common_cppflags = +sd_abinit_common_enable = no +sd_abinit_common_enable_def = no +sd_abinit_common_fcflags = +sd_abinit_common_init = def +sd_abinit_common_ldflags = +sd_abinit_common_libs = +sd_abinit_common_ok = unknown +sd_abinit_common_options = optional skip +sd_abinit_common_policy = skip +sd_abinit_common_status = optional +sd_bigdft_cppflags = +sd_bigdft_enable = no +sd_bigdft_enable_def = no +sd_bigdft_fcflags = +sd_bigdft_init = def +sd_bigdft_ldflags = +sd_bigdft_libs = +sd_bigdft_ok = unknown +sd_bigdft_options = optional warn +sd_bigdft_policy = warn +sd_bigdft_status = optional +sd_fft_cflags = +sd_fft_choices = +sd_fft_cppflags = -I/opt/local/include +sd_fft_cxxflags = +sd_fft_enable = yes +sd_fft_fcflags = -I/opt/local/include +sd_fft_flavor = fftw3 +sd_fft_init = kwd +sd_fft_ldflags = +sd_fft_libs = -L/opt/local/lib -lfftw3 -lfftw3f +sd_fft_ok = yes +sd_fftw3_cflags = +sd_fftw3_cppflags = -I/opt/local/include +sd_fftw3_enable = yes +sd_fftw3_enable_def = no +sd_fftw3_fcflags = -I/opt/local/include +sd_fftw3_init = env +sd_fftw3_ldflags = +sd_fftw3_libs = -L/opt/local/lib -lfftw3 -lfftw3f +sd_fftw3_ok = yes +sd_fftw3_options = optional skip +sd_fftw3_policy = skip +sd_fftw3_status = optional +sd_gpu_cflags = +sd_gpu_cppflags = +sd_gpu_cxxflags = +sd_gpu_enable = no +sd_gpu_enable_def = no +sd_gpu_fcflags = +sd_gpu_init = def +sd_gpu_ldflags = +sd_gpu_libs = +sd_gpu_ok = no +sd_gpu_options = optional warn +sd_gpu_policy = warn +sd_gpu_prefix = +sd_gpu_status = optional +sd_hdf5_cflags = +sd_hdf5_cppflags = -I/opt/local/include -I/opt/local/include +sd_hdf5_cxxflags = +sd_hdf5_enable = yes +sd_hdf5_enable_def = yes +sd_hdf5_enable_fc = no +sd_hdf5_fcflags = +sd_hdf5_h5cc = /opt/local/bin/h5cc +sd_hdf5_h5fc = +sd_hdf5_init = dir +sd_hdf5_ldflags = +sd_hdf5_libs = -L/opt/local/lib -L/opt/local/lib -lhdf5_hl -L/opt/local/lib -lhdf5 -lz -ldl -lm +sd_hdf5_ok = yes +sd_hdf5_options = required no-fortran warn +sd_hdf5_policy = warn +sd_hdf5_status = required +sd_kokkos_cppflags = +sd_kokkos_cxxflags = +sd_kokkos_enable = no +sd_kokkos_enable_def = no +sd_kokkos_init = def +sd_kokkos_ldflags = +sd_kokkos_libs = +sd_kokkos_ok = unknown +sd_kokkos_options = optional fail +sd_kokkos_policy = fail +sd_kokkos_status = optional +sd_levmar_cflags = +sd_levmar_cppflags = +sd_levmar_enable = no +sd_levmar_enable_def = no +sd_levmar_init = def +sd_levmar_ldflags = +sd_levmar_libs = +sd_levmar_ok = unknown +sd_levmar_options = optional fail +sd_levmar_policy = fail +sd_levmar_status = optional +sd_libpaw_cppflags = +sd_libpaw_enable = no +sd_libpaw_enable_def = no +sd_libpaw_fcflags = +sd_libpaw_init = def +sd_libpaw_ldflags = +sd_libpaw_libs = +sd_libpaw_ok = unknown +sd_libpaw_options = optional skip +sd_libpaw_policy = skip +sd_libpaw_status = optional +sd_libpsml_cppflags = +sd_libpsml_enable = no +sd_libpsml_enable_def = no +sd_libpsml_fcflags = +sd_libpsml_init = def +sd_libpsml_ldflags = +sd_libpsml_libs = +sd_libpsml_ok = unknown +sd_libpsml_options = optional warn +sd_libpsml_policy = warn +sd_libpsml_status = optional +sd_libxc_cflags = +sd_libxc_cppflags = -I/opt/local/include +sd_libxc_enable = yes +sd_libxc_enable_def = yes +sd_libxc_enable_fc = no +sd_libxc_fcflags = +sd_libxc_init = dir +sd_libxc_ldflags = +sd_libxc_libs = -L/opt/local/lib -lxc +sd_libxc_ok = yes +sd_libxc_options = required no-fortran warn +sd_libxc_policy = warn +sd_libxc_status = required +sd_linalg_cflags = +sd_linalg_choices = +sd_linalg_cppflags = +sd_linalg_cxxflags = +sd_linalg_enable = yes +sd_linalg_fcflags = -I/opt/local/include +sd_linalg_flavor = openblas +sd_linalg_has_elpa = no +sd_linalg_has_scalapack = no +sd_linalg_init = env +sd_linalg_ldflags = +sd_linalg_libs = -L/opt/local/lib -lopenblas +sd_linalg_ok = yes +sd_mpi_cc = /opt/local/bin/mpicc +sd_mpi_cflags = +sd_mpi_cppflags = -I/opt/local/include +sd_mpi_cxx = /opt/local/bin/mpicxx +sd_mpi_enable = yes +sd_mpi_enable_cxx = yes +sd_mpi_enable_def = auto +sd_mpi_enable_fc = yes +sd_mpi_fc = /opt/local/bin/mpif90 +sd_mpi_fcflags = -I/opt/local/include +sd_mpi_init = dir +sd_mpi_ldflags = +sd_mpi_libs = +sd_mpi_ok = yes +sd_mpi_options = auto optional fail +sd_mpi_policy = fail +sd_mpi_status = optional +sd_netcdf_cflags = +sd_netcdf_cppflags = -I/opt/local/include +sd_netcdf_enable = yes +sd_netcdf_enable_def = yes +sd_netcdf_fcflags = -I/opt/local/include +sd_netcdf_fortran_cflags = +sd_netcdf_fortran_cppflags = -I/opt/local/include +sd_netcdf_fortran_enable = yes +sd_netcdf_fortran_enable_def = yes +sd_netcdf_fortran_fcflags = -I/opt/local/include +sd_netcdf_fortran_init = dir +sd_netcdf_fortran_ldflags = +sd_netcdf_fortran_libs = -L/opt/local/lib -lnetcdff +sd_netcdf_fortran_ok = yes +sd_netcdf_fortran_options = required warn +sd_netcdf_fortran_policy = warn +sd_netcdf_fortran_status = required +sd_netcdf_init = dir +sd_netcdf_ldflags = +sd_netcdf_libs = -L/opt/local/lib -lnetcdf +sd_netcdf_ok = yes +sd_netcdf_options = required warn +sd_netcdf_policy = warn +sd_netcdf_status = required +sd_papi_cflags = +sd_papi_cppflags = +sd_papi_enable = no +sd_papi_enable_def = no +sd_papi_init = def +sd_papi_ldflags = +sd_papi_libs = +sd_papi_ok = unknown +sd_papi_options = optional fail +sd_papi_policy = fail +sd_papi_sd_papi_fcflags = +sd_papi_status = optional +sd_pfft_cflags = +sd_pfft_cppflags = +sd_pfft_enable = no +sd_pfft_enable_def = no +sd_pfft_init = def +sd_pfft_ldflags = +sd_pfft_libs = +sd_pfft_ok = unknown +sd_pfft_options = optional skip +sd_pfft_policy = skip +sd_pfft_status = optional +sd_sys_fcflags = +sd_triqs_cflags = +sd_triqs_cppflags = +sd_triqs_cxxflags = +sd_triqs_enable = no +sd_triqs_enable_def = no +sd_triqs_fcflags = +sd_triqs_init = def +sd_triqs_ldflags = +sd_triqs_libs = +sd_triqs_ok = unknown +sd_triqs_options = optional fail +sd_triqs_policy = fail +sd_triqs_status = optional +sd_wannier90_cppflags = +sd_wannier90_enable = yes +sd_wannier90_enable_def = no +sd_wannier90_fcflags = -I/opt/local/include +sd_wannier90_init = env +sd_wannier90_ldflags = +sd_wannier90_libs = -L/opt/local/lib -lwannier +sd_wannier90_ok = yes +sd_wannier90_options = optional warn +sd_wannier90_policy = warn +sd_wannier90_status = optional +sd_xmlf90_cppflags = +sd_xmlf90_enable = no +sd_xmlf90_enable_def = no +sd_xmlf90_fcflags = +sd_xmlf90_init = def +sd_xmlf90_ldflags = +sd_xmlf90_libs = +sd_xmlf90_ok = unknown +sd_xmlf90_options = optional warn +sd_xmlf90_policy = warn +sd_xmlf90_status = optional +sd_yakl_cppflags = +sd_yakl_enable = no +sd_yakl_enable_def = no +sd_yakl_fcflags = +sd_yakl_init = def +sd_yakl_ldflags = +sd_yakl_libs = +sd_yakl_ok = unknown +sd_yakl_options = optional fail +sd_yakl_policy = fail +sd_yakl_status = optional +sharedstatedir = ${prefix}/com +src_02_clib_fcflags = -I$(top_builddir)/shared/common/src/02_clib -I$(top_srcdir)/shared/common/src/02_clib +src_10_defs_fcflags = -I$(top_builddir)/shared/common/src/10_defs -I$(top_srcdir)/shared/common/src/10_defs +src_11_memory_mpi_fcflags = -I$(top_builddir)/shared/common/src/11_memory_mpi -I$(top_srcdir)/shared/common/src/11_memory_mpi +src_12_hide_mpi_fcflags = -I$(top_builddir)/shared/common/src/12_hide_mpi -I$(top_srcdir)/shared/common/src/12_hide_mpi +src_14_hidewrite_fcflags = -I$(top_builddir)/shared/common/src/14_hidewrite -I$(top_srcdir)/shared/common/src/14_hidewrite +src_16_hideleave_fcflags = -I$(top_builddir)/shared/common/src/16_hideleave -I$(top_srcdir)/shared/common/src/16_hideleave +src_16_kokkos_toolbox_fcflags = -I$(top_builddir)/shared/common/src/16_kokkos_toolbox -I$(top_srcdir)/shared/common/src/16_kokkos_toolbox +src_17_gpu_toolbox_fcflags = -I$(top_builddir)/shared/common/src/17_gpu_toolbox -I$(top_srcdir)/shared/common/src/17_gpu_toolbox +src_17_libtetra_ext_fcflags = -I$(top_builddir)/shared/common/src/17_libtetra_ext -I$(top_srcdir)/shared/common/src/17_libtetra_ext +src_17_minimax_fcflags = -I$(top_builddir)/shared/common/src/17_minimax -I$(top_srcdir)/shared/common/src/17_minimax +src_17_yaml_out_fcflags = -I$(top_builddir)/shared/common/src/17_yaml_out -I$(top_srcdir)/shared/common/src/17_yaml_out +src_18_timing_fcflags = -I$(top_builddir)/shared/common/src/18_timing -I$(top_srcdir)/shared/common/src/18_timing +src_21_hashfuncs_fcflags = -I$(top_builddir)/shared/common/src/21_hashfuncs -I$(top_srcdir)/shared/common/src/21_hashfuncs +src_27_toolbox_oop_fcflags = -I$(top_builddir)/shared/common/src/27_toolbox_oop -I$(top_srcdir)/shared/common/src/27_toolbox_oop +src_28_numeric_noabirule_fcflags = -I$(top_builddir)/shared/common/src/28_numeric_noabirule -I$(top_srcdir)/shared/common/src/28_numeric_noabirule +src_29_kpoints_fcflags = -I$(top_builddir)/shared/common/src/29_kpoints -I$(top_srcdir)/shared/common/src/29_kpoints +src_32_util_fcflags = -I$(top_builddir)/shared/common/src/32_util -I$(top_srcdir)/shared/common/src/32_util +src_33_xc_lowlevel_fcflags = -I$(top_builddir)/shared/common/src/33_xc_lowlevel -I$(top_srcdir)/shared/common/src/33_xc_lowlevel +src_39_libpaw_fcflags = -I$(top_builddir)/shared/libpaw/src -I$(top_srcdir)/shared/libpaw/src +src_41_geometry_fcflags = -I$(top_builddir)/src/41_geometry -I$(top_srcdir)/src/41_geometry +src_42_nlstrain_fcflags = -I$(top_builddir)/src/42_nlstrain -I$(top_srcdir)/src/42_nlstrain +src_42_parser_fcflags = -I$(top_builddir)/src/42_parser -I$(top_srcdir)/src/42_parser +src_43_ptgroups_fcflags = -I$(top_builddir)/src/43_ptgroups -I$(top_srcdir)/src/43_ptgroups +src_43_wvl_wrappers_fcflags = -I$(top_builddir)/src/43_wvl_wrappers -I$(top_srcdir)/src/43_wvl_wrappers +src_44_abitools_fcflags = -I$(top_builddir)/src/44_abitools -I$(top_srcdir)/src/44_abitools +src_44_abitypes_defs_fcflags = -I$(top_builddir)/src/44_abitypes_defs -I$(top_srcdir)/src/44_abitypes_defs +src_44_manage_kokkos_fcflags = -I$(top_builddir)/src/44_manage_kokkos -I$(top_srcdir)/src/44_manage_kokkos +src_45_geomoptim_fcflags = -I$(top_builddir)/src/45_geomoptim -I$(top_srcdir)/src/45_geomoptim +src_45_xgTools_fcflags = -I$(top_builddir)/src/45_xgTools -I$(top_srcdir)/src/45_xgTools +src_46_ghc_omp_fcflags = -I$(top_builddir)/src/46_ghc_omp -I$(top_srcdir)/src/46_ghc_omp +src_46_manage_cuda_fcflags = -I$(top_builddir)/src/46_manage_cuda -I$(top_srcdir)/src/46_manage_cuda +src_48_diago_fcflags = -I$(top_builddir)/src/48_diago -I$(top_srcdir)/src/48_diago +src_49_gw_toolbox_oop_fcflags = -I$(top_builddir)/src/49_gw_toolbox_oop -I$(top_srcdir)/src/49_gw_toolbox_oop +src_51_manage_mpi_fcflags = -I$(top_builddir)/src/51_manage_mpi -I$(top_srcdir)/src/51_manage_mpi +src_52_fft_mpi_noabirule_fcflags = -I$(top_builddir)/src/52_fft_mpi_noabirule -I$(top_srcdir)/src/52_fft_mpi_noabirule +src_53_ffts_fcflags = -I$(top_builddir)/src/53_ffts -I$(top_srcdir)/src/53_ffts +src_54_spacepar_fcflags = -I$(top_builddir)/src/54_spacepar -I$(top_srcdir)/src/54_spacepar +src_55_abiutil_fcflags = -I$(top_builddir)/src/55_abiutil -I$(top_srcdir)/src/55_abiutil +src_56_io_mpi_fcflags = -I$(top_builddir)/src/56_io_mpi -I$(top_srcdir)/src/56_io_mpi +src_56_mixing_fcflags = -I$(top_builddir)/src/56_mixing -I$(top_srcdir)/src/56_mixing +src_56_recipspace_fcflags = -I$(top_builddir)/src/56_recipspace -I$(top_srcdir)/src/56_recipspace +src_56_xc_fcflags = -I$(top_builddir)/src/56_xc -I$(top_srcdir)/src/56_xc +src_57_iopsp_parser_fcflags = -I$(top_builddir)/src/57_iopsp_parser -I$(top_srcdir)/src/57_iopsp_parser +src_57_iovars_fcflags = -I$(top_builddir)/src/57_iovars -I$(top_srcdir)/src/57_iovars +src_61_occeig_fcflags = -I$(top_builddir)/src/61_occeig -I$(top_srcdir)/src/61_occeig +src_62_cg_noabirule_fcflags = -I$(top_builddir)/src/62_cg_noabirule -I$(top_srcdir)/src/62_cg_noabirule +src_62_ctqmc_fcflags = -I$(top_builddir)/src/62_ctqmc -I$(top_srcdir)/src/62_ctqmc +src_62_iowfdenpot_fcflags = -I$(top_builddir)/src/62_iowfdenpot -I$(top_srcdir)/src/62_iowfdenpot +src_62_poisson_fcflags = -I$(top_builddir)/src/62_poisson -I$(top_srcdir)/src/62_poisson +src_62_wvl_wfs_fcflags = -I$(top_builddir)/src/62_wvl_wfs -I$(top_srcdir)/src/62_wvl_wfs +src_64_psp_fcflags = -I$(top_builddir)/src/64_psp -I$(top_srcdir)/src/64_psp +src_65_lotf_base_fcflags = -I$(top_builddir)/src/65_lotf_base -I$(top_srcdir)/src/65_lotf_base +src_65_paw_fcflags = -I$(top_builddir)/src/65_paw -I$(top_srcdir)/src/65_paw +src_66_nonlocal_fcflags = -I$(top_builddir)/src/66_nonlocal -I$(top_srcdir)/src/66_nonlocal +src_66_vdwxc_fcflags = -I$(top_builddir)/src/66_vdwxc -I$(top_srcdir)/src/66_vdwxc +src_66_wfs_fcflags = -I$(top_builddir)/src/66_wfs -I$(top_srcdir)/src/66_wfs +src_67_common_fcflags = -I$(top_builddir)/src/67_common -I$(top_srcdir)/src/67_common +src_67_python_invocation_ext_fcflags = -I$(top_builddir)/src/67_python_invocation_ext -I$(top_srcdir)/src/67_python_invocation_ext +src_67_triqs_ext_fcflags = -I$(top_builddir)/src/67_triqs_ext -I$(top_srcdir)/src/67_triqs_ext +src_68_dmft_fcflags = -I$(top_builddir)/src/68_dmft -I$(top_srcdir)/src/68_dmft +src_68_lotf_fcflags = -I$(top_builddir)/src/68_lotf -I$(top_srcdir)/src/68_lotf +src_68_recursion_fcflags = -I$(top_builddir)/src/68_recursion -I$(top_srcdir)/src/68_recursion +src_68_rsprc_fcflags = -I$(top_builddir)/src/68_rsprc -I$(top_srcdir)/src/68_rsprc +src_69_wfdesc_fcflags = -I$(top_builddir)/src/69_wfdesc -I$(top_srcdir)/src/69_wfdesc +src_70_gw_fcflags = -I$(top_builddir)/src/70_gw -I$(top_srcdir)/src/70_gw +src_71_bse_fcflags = -I$(top_builddir)/src/71_bse -I$(top_srcdir)/src/71_bse +src_71_wannier_fcflags = -I$(top_builddir)/src/71_wannier -I$(top_srcdir)/src/71_wannier +src_72_response_fcflags = -I$(top_builddir)/src/72_response -I$(top_srcdir)/src/72_response +src_77_ddb_fcflags = -I$(top_builddir)/src/77_ddb -I$(top_srcdir)/src/77_ddb +src_77_suscep_fcflags = -I$(top_builddir)/src/77_suscep -I$(top_srcdir)/src/77_suscep +src_78_effpot_fcflags = -I$(top_builddir)/src/78_effpot -I$(top_srcdir)/src/78_effpot +src_78_eph_fcflags = -I$(top_builddir)/src/78_eph -I$(top_srcdir)/src/78_eph +src_79_seqpar_mpi_fcflags = -I$(top_builddir)/src/79_seqpar_mpi -I$(top_srcdir)/src/79_seqpar_mpi +src_80_rttddft_fcflags = -I$(top_builddir)/src/80_rttddft -I$(top_srcdir)/src/80_rttddft +src_80_tdep_fcflags = -I$(top_builddir)/src/80_tdep -I$(top_srcdir)/src/80_tdep +src_94_scfcv_fcflags = -I$(top_builddir)/src/94_scfcv -I$(top_srcdir)/src/94_scfcv +src_95_drive_fcflags = -I$(top_builddir)/src/95_drive -I$(top_srcdir)/src/95_drive +src_common_fcflags = -I$(top_builddir)/shared/common/src/incs -I$(top_srcdir)/shared/common/src/incs -I$(top_builddir)/shared/common/src/mods -I$(top_srcdir)/shared/common/src/mods +src_core_fcflags = -I$(top_builddir)/src/incs -I$(top_srcdir)/src/incs -I$(top_builddir)/src/mods -I$(top_srcdir)/src/mods +src_libpaw_fcflags = -I$(top_builddir)/shared/libpaw/incs -I$(top_srcdir)/shared/libpaw/incs -I$(top_builddir)/shared/libpaw/mods -I$(top_srcdir)/shared/libpaw/mods +srcdir = . +sysconfdir = ${prefix}/etc +target = x86_64-apple-darwin18.7.0 +target_alias = +target_cpu = x86_64 +target_os = darwin18.7.0 +target_vendor = apple +top_build_prefix = ../../../../ +top_builddir = ../../../.. +top_srcdir = ../../../.. +with_abinit_common = +with_bigdft = +with_config_file = +with_debug_flavor = +with_fallbacks = +with_fc_vendor = +with_fc_version = +with_fft_flavor = fftw3 +with_fftw3 = +with_gnu_ld = +with_gpu = +with_hdf5 = /opt/local +with_kokkos = +with_levmar = +with_libpaw = +with_libpsml = +with_libxc = /opt/local +with_libxml2 = +with_linalg_flavor = openblas +with_mpi = /opt/local +with_mpi_level = +with_netcdf = /opt/local +with_optim_flavor = +with_papi = +with_pfft = +with_triqs = +with_wannier90 = +with_xmlf90 = +with_yakl = +AM_CFLAGS = -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include +AM_CXXFLAGS = $(sd_triqs_cxxflags) +AM_FCFLAGS = -ffree-form -J../mods +AM_CPPFLAGS = \ + -I$(top_builddir)/shared/common/src/10_defs -I$(top_srcdir)/shared/common/src/10_defs \ + -I$(top_builddir)/shared/common/src/11_memory_mpi -I$(top_srcdir)/shared/common/src/11_memory_mpi \ + -I$(top_builddir)/shared/common/src/12_hide_mpi -I$(top_srcdir)/shared/common/src/12_hide_mpi \ + -I$(top_builddir)/shared/common/src/14_hidewrite -I$(top_srcdir)/shared/common/src/14_hidewrite \ + -I$(top_builddir)/shared/common/src/incs -I$(top_srcdir)/shared/common/src/incs -I$(top_builddir)/shared/common/src/mods -I$(top_srcdir)/shared/common/src/mods \ + -I$(top_builddir)/src/incs -I$(top_srcdir)/src/incs -I$(top_builddir)/src/mods -I$(top_srcdir)/src/mods \ + -I$(top_builddir)/shared/libpaw/incs -I$(top_srcdir)/shared/libpaw/incs -I$(top_builddir)/shared/libpaw/mods -I$(top_srcdir)/shared/libpaw/mods \ + -I/opt/local/include \ + -I/opt/local/include \ + -I/opt/local/include -I/opt/local/include \ + -I/opt/local/include \ + -I/opt/local/include \ + -I/opt/local/include \ + -I/opt/local/include \ + + + +# Regular source files +lib16_hideleave_srcs = \ + m_xieee.F90 \ + m_errors.F90 + + +# Source files depending on conditionals + +# Library description +noinst_LIBRARIES = lib16_hideleave.a +lib16_hideleave_a_SOURCES = $(lib16_hideleave_srcs) + +# Dependencies (inside the directory) of directory 16_hideleave +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. +CLEANFILES = m_xieee_cpp.f90 m_errors_cpp.f90 m_errors.$(MODEXT) \ + m_xieee.$(MODEXT) +EXTRA_DIST = abinit.src abinit.dep _16_hideleave_ +all: all-am + +.SUFFIXES: +.SUFFIXES: .F90 .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu shared/common/src/16_hideleave/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu shared/common/src/16_hideleave/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) + +lib16_hideleave.a: $(lib16_hideleave_a_OBJECTS) $(lib16_hideleave_a_DEPENDENCIES) $(EXTRA_lib16_hideleave_a_DEPENDENCIES) + $(AM_V_at)-rm -f lib16_hideleave.a + $(AM_V_AR)$(lib16_hideleave_a_AR) lib16_hideleave.a $(lib16_hideleave_a_OBJECTS) $(lib16_hideleave_a_LIBADD) + $(AM_V_at)$(RANLIB) lib16_hideleave.a + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +.F90.o: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ $< + +.F90.obj: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-noinstLIBRARIES cscopelist-am ctags ctags-am distclean \ + distclean-compile distclean-generic distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am + +.PRECIOUS: Makefile + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/GX-PAW/common/src/16_hideleave/Makefile.am b/GX-PAW/common/src/16_hideleave/Makefile.am new file mode 100644 index 00000000..6b95ddc4 --- /dev/null +++ b/GX-PAW/common/src/16_hideleave/Makefile.am @@ -0,0 +1,65 @@ +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-corelibs on 2024/03/16 21:07:38 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-corelibs script or its config file instead. +# + +AM_CFLAGS = @ABI_CPPFLAGS@ +AM_CXXFLAGS = $(sd_triqs_cxxflags) +AM_FCFLAGS = @FPPFLAGS@ @FCFLAGS_FREEFORM@ @FCFLAGS_MODDIR@ @sd_sys_fcflags@ @fcflags_opt_16_hideleave@ + +AM_CPPFLAGS = \ + @src_10_defs_fcflags@ \ + @src_11_memory_mpi_fcflags@ \ + @src_12_hide_mpi_fcflags@ \ + @src_14_hidewrite_fcflags@ \ + @src_common_fcflags@ \ + @src_core_fcflags@ \ + @src_libpaw_fcflags@ \ + @sd_mpi_cppflags@ \ + @sd_mpi_fcflags@ \ + @sd_hdf5_cppflags@ \ + @sd_netcdf_cppflags@ \ + @sd_netcdf_fcflags@ \ + @sd_netcdf_fortran_cppflags@ \ + @sd_netcdf_fortran_fcflags@ \ + @fc_mod_fcflags@ + +# Regular source files +lib16_hideleave_srcs = \ + m_xieee.F90 \ + m_errors.F90 + +# Source files depending on conditionals + + +# Library description +noinst_LIBRARIES = lib16_hideleave.a + +lib16_hideleave_a_SOURCES= $(lib16_hideleave_srcs) + +CLEANFILES = \ + m_xieee_cpp.f90 \ + m_errors_cpp.f90 + +EXTRA_DIST = abinit.src + +EXTRA_DIST += abinit.dep + +# Dependencies (inside the directory) of directory 16_hideleave +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. + +CLEANFILES += \ + m_errors.$(MODEXT) \ + m_xieee.$(MODEXT) + + +EXTRA_DIST += _16_hideleave_ diff --git a/GX-PAW/common/src/16_hideleave/Makefile.in b/GX-PAW/common/src/16_hideleave/Makefile.in new file mode 100644 index 00000000..a6b346c1 --- /dev/null +++ b/GX-PAW/common/src/16_hideleave/Makefile.in @@ -0,0 +1,1463 @@ +# Makefile.in generated by automake 1.16.3 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2020 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-corelibs on 2024/03/16 21:07:38 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-corelibs script or its config file instead. +# + +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = shared/common/src/16_hideleave +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/m4/arch-gpu.m4 \ + $(top_srcdir)/config/m4/arch-mpi.m4 \ + $(top_srcdir)/config/m4/auto-autotools.m4 \ + $(top_srcdir)/config/m4/auto-corelibs.m4 \ + $(top_srcdir)/config/m4/auto-debug.m4 \ + $(top_srcdir)/config/m4/auto-dirflags.m4 \ + $(top_srcdir)/config/m4/auto-env.m4 \ + $(top_srcdir)/config/m4/auto-hints.m4 \ + $(top_srcdir)/config/m4/auto-optim.m4 \ + $(top_srcdir)/config/m4/auto-options.m4 \ + $(top_srcdir)/config/m4/auto-output.m4 \ + $(top_srcdir)/config/m4/auto-triggers.m4 \ + $(top_srcdir)/config/m4/conf-atompaw.m4 \ + $(top_srcdir)/config/m4/conf-debug.m4 \ + $(top_srcdir)/config/m4/conf-fallbacks.m4 \ + $(top_srcdir)/config/m4/conf-files.m4 \ + $(top_srcdir)/config/m4/conf-init.m4 \ + $(top_srcdir)/config/m4/conf-openmp.m4 \ + $(top_srcdir)/config/m4/conf-optim.m4 \ + $(top_srcdir)/config/m4/lang-c++.m4 \ + $(top_srcdir)/config/m4/lang-c.m4 \ + $(top_srcdir)/config/m4/lang-fortran-import.m4 \ + $(top_srcdir)/config/m4/lang-fortran.m4 \ + $(top_srcdir)/config/m4/lang-python.m4 \ + $(top_srcdir)/config/m4/libxml2.m4 \ + $(top_srcdir)/config/m4/misc-display.m4 \ + $(top_srcdir)/config/m4/sd_abinit_common.m4 \ + $(top_srcdir)/config/m4/sd_arch_gpu.m4 \ + $(top_srcdir)/config/m4/sd_arch_mpi.m4 \ + $(top_srcdir)/config/m4/sd_bigdft.m4 \ + $(top_srcdir)/config/m4/sd_core.m4 \ + $(top_srcdir)/config/m4/sd_esl.m4 \ + $(top_srcdir)/config/m4/sd_fftw3.m4 \ + $(top_srcdir)/config/m4/sd_gpu_kokkos.m4 \ + $(top_srcdir)/config/m4/sd_gpu_yakl.m4 \ + $(top_srcdir)/config/m4/sd_io_hdf5.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf_fortran.m4 \ + $(top_srcdir)/config/m4/sd_levmar.m4 \ + $(top_srcdir)/config/m4/sd_libpaw.m4 \ + $(top_srcdir)/config/m4/sd_libpsml.m4 \ + $(top_srcdir)/config/m4/sd_libxc.m4 \ + $(top_srcdir)/config/m4/sd_math_fft.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_core.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_util.m4 \ + $(top_srcdir)/config/m4/sd_papi.m4 \ + $(top_srcdir)/config/m4/sd_pfft.m4 \ + $(top_srcdir)/config/m4/sd_triqs.m4 \ + $(top_srcdir)/config/m4/sd_wannier90.m4 \ + $(top_srcdir)/config/m4/sd_xmlf90.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = +lib16_hideleave_a_AR = $(AR) $(ARFLAGS) +lib16_hideleave_a_LIBADD = +am__objects_1 = m_xieee.$(OBJEXT) m_errors.$(OBJEXT) +am_lib16_hideleave_a_OBJECTS = $(am__objects_1) +lib16_hideleave_a_OBJECTS = $(am_lib16_hideleave_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +PPFCCOMPILE = $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) +AM_V_PPFC = $(am__v_PPFC_@AM_V@) +am__v_PPFC_ = $(am__v_PPFC_@AM_DEFAULT_V@) +am__v_PPFC_0 = @echo " PPFC " $@; +am__v_PPFC_1 = +FCLD = $(FC) +FCLINK = $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \ + $@ +AM_V_FCLD = $(am__v_FCLD_@AM_V@) +am__v_FCLD_ = $(am__v_FCLD_@AM_DEFAULT_V@) +am__v_FCLD_0 = @echo " FCLD " $@; +am__v_FCLD_1 = +SOURCES = $(lib16_hideleave_a_SOURCES) +DIST_SOURCES = $(lib16_hideleave_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ABINIT_BINARY_PACKAGE = @ABINIT_BINARY_PACKAGE@ +ABINIT_COMMON_CPPFLAGS = @ABINIT_COMMON_CPPFLAGS@ +ABINIT_COMMON_FCFLAGS = @ABINIT_COMMON_FCFLAGS@ +ABINIT_COMMON_LDFLAGS = @ABINIT_COMMON_LDFLAGS@ +ABINIT_COMMON_LIBS = @ABINIT_COMMON_LIBS@ +ABINIT_TARGET = @ABINIT_TARGET@ +ABINIT_VERSION = @ABINIT_VERSION@ +ABINIT_VERSION_BASE = @ABINIT_VERSION_BASE@ +ABINIT_VERSION_BUILD = @ABINIT_VERSION_BUILD@ +ABINIT_VERSION_MAJOR = @ABINIT_VERSION_MAJOR@ +ABINIT_VERSION_MICRO = @ABINIT_VERSION_MICRO@ +ABINIT_VERSION_MINOR = @ABINIT_VERSION_MINOR@ +ABI_CPPFLAGS = @ABI_CPPFLAGS@ +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +ARFLAGS = @ARFLAGS@ +ARFLAGS_CMD = @ARFLAGS_CMD@ +ARFLAGS_DEBUG = @ARFLAGS_DEBUG@ +ARFLAGS_EXTRA = @ARFLAGS_EXTRA@ +ARFLAGS_HINTS = @ARFLAGS_HINTS@ +ARFLAGS_OPTIM = @ARFLAGS_OPTIM@ +ATOMPAW_BIN = @ATOMPAW_BIN@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BIGDFT_CPPFLAGS = @BIGDFT_CPPFLAGS@ +BIGDFT_FCFLAGS = @BIGDFT_FCFLAGS@ +BIGDFT_LDFLAGS = @BIGDFT_LDFLAGS@ +BIGDFT_LIBS = @BIGDFT_LIBS@ +BOURNE_SHELL = @BOURNE_SHELL@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CC_LDFLAGS = @CC_LDFLAGS@ +CC_LDFLAGS_DEBUG = @CC_LDFLAGS_DEBUG@ +CC_LDFLAGS_EXTRA = @CC_LDFLAGS_EXTRA@ +CC_LDFLAGS_GPU = @CC_LDFLAGS_GPU@ +CC_LDFLAGS_HINTS = @CC_LDFLAGS_HINTS@ +CC_LDFLAGS_OPTIM = @CC_LDFLAGS_OPTIM@ +CC_LIBS = @CC_LIBS@ +CC_LIBS_DEBUG = @CC_LIBS_DEBUG@ +CC_LIBS_EXTRA = @CC_LIBS_EXTRA@ +CC_LIBS_GPU = @CC_LIBS_GPU@ +CC_LIBS_HINTS = @CC_LIBS_HINTS@ +CC_LIBS_OPTIM = @CC_LIBS_OPTIM@ +CFLAGS = @CFLAGS@ +CFLAGS_DEBUG = @CFLAGS_DEBUG@ +CFLAGS_EXTRA = @CFLAGS_EXTRA@ +CFLAGS_GPU = @CFLAGS_GPU@ +CFLAGS_HINTS = @CFLAGS_HINTS@ +CFLAGS_OPTIM = @CFLAGS_OPTIM@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CPPFLAGS_DEBUG = @CPPFLAGS_DEBUG@ +CPPFLAGS_EXTRA = @CPPFLAGS_EXTRA@ +CPPFLAGS_GPU = @CPPFLAGS_GPU@ +CPPFLAGS_HINTS = @CPPFLAGS_HINTS@ +CPPFLAGS_HINTS_EXT = @CPPFLAGS_HINTS_EXT@ +CPPFLAGS_OPTIM = @CPPFLAGS_OPTIM@ +CXX = @CXX@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CXXFLAGS_DEBUG = @CXXFLAGS_DEBUG@ +CXXFLAGS_EXTRA = @CXXFLAGS_EXTRA@ +CXXFLAGS_GPU = @CXXFLAGS_GPU@ +CXXFLAGS_HINTS = @CXXFLAGS_HINTS@ +CXXFLAGS_OPTIM = @CXXFLAGS_OPTIM@ +CXX_LDFLAGS = @CXX_LDFLAGS@ +CXX_LDFLAGS_DEBUG = @CXX_LDFLAGS_DEBUG@ +CXX_LDFLAGS_EXTRA = @CXX_LDFLAGS_EXTRA@ +CXX_LDFLAGS_GPU = @CXX_LDFLAGS_GPU@ +CXX_LDFLAGS_HINTS = @CXX_LDFLAGS_HINTS@ +CXX_LDFLAGS_OPTIM = @CXX_LDFLAGS_OPTIM@ +CXX_LIBS = @CXX_LIBS@ +CXX_LIBS_DEBUG = @CXX_LIBS_DEBUG@ +CXX_LIBS_EXTRA = @CXX_LIBS_EXTRA@ +CXX_LIBS_GPU = @CXX_LIBS_GPU@ +CXX_LIBS_HINTS = @CXX_LIBS_HINTS@ +CXX_LIBS_OPTIM = @CXX_LIBS_OPTIM@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ +FCFLAGS = @FCFLAGS@ +FCFLAGS_DEBUG = @FCFLAGS_DEBUG@ +FCFLAGS_EXTRA = @FCFLAGS_EXTRA@ +FCFLAGS_F90 = @FCFLAGS_F90@ +FCFLAGS_FIXEDFORM = @FCFLAGS_FIXEDFORM@ +FCFLAGS_FREEFORM = @FCFLAGS_FREEFORM@ +FCFLAGS_HINTS = @FCFLAGS_HINTS@ +FCFLAGS_MODDIR = @FCFLAGS_MODDIR@ +FCFLAGS_OPENMP = @FCFLAGS_OPENMP@ +FCFLAGS_OPENMP_OFFLOAD = @FCFLAGS_OPENMP_OFFLOAD@ +FCFLAGS_OPTIM = @FCFLAGS_OPTIM@ +FCLIBS = @FCLIBS@ +FC_LDFLAGS = @FC_LDFLAGS@ +FC_LDFLAGS_DEBUG = @FC_LDFLAGS_DEBUG@ +FC_LDFLAGS_EXTRA = @FC_LDFLAGS_EXTRA@ +FC_LDFLAGS_HINTS = @FC_LDFLAGS_HINTS@ +FC_LDFLAGS_OPTIM = @FC_LDFLAGS_OPTIM@ +FC_LIBS = @FC_LIBS@ +FC_LIBS_DEBUG = @FC_LIBS_DEBUG@ +FC_LIBS_EXTRA = @FC_LIBS_EXTRA@ +FC_LIBS_HINTS = @FC_LIBS_HINTS@ +FC_LIBS_OPTIM = @FC_LIBS_OPTIM@ +FC_NOWRAP = @FC_NOWRAP@ +FFLAGS = @FFLAGS@ +FFTW3_CFLAGS = @FFTW3_CFLAGS@ +FFTW3_CPPFLAGS = @FFTW3_CPPFLAGS@ +FFTW3_FCFLAGS = @FFTW3_FCFLAGS@ +FFTW3_LDFLAGS = @FFTW3_LDFLAGS@ +FFTW3_LIBS = @FFTW3_LIBS@ +FFT_CFLAGS = @FFT_CFLAGS@ +FFT_FCFLAGS = @FFT_FCFLAGS@ +FPP = @FPP@ +FPPFLAGS = @FPPFLAGS@ +FPPFLAGS_DEBUG = @FPPFLAGS_DEBUG@ +FPPFLAGS_EXTRA = @FPPFLAGS_EXTRA@ +FPPFLAGS_HINTS = @FPPFLAGS_HINTS@ +FPPFLAGS_OPTIM = @FPPFLAGS_OPTIM@ +GPU_ARCH = @GPU_ARCH@ +GPU_CFLAGS = @GPU_CFLAGS@ +GPU_CPPFLAGS = @GPU_CPPFLAGS@ +GPU_CXXFLAGS = @GPU_CXXFLAGS@ +GPU_FCFLAGS = @GPU_FCFLAGS@ +GPU_LDFLAGS = @GPU_LDFLAGS@ +GPU_LIBS = @GPU_LIBS@ +GRAPHATOM_BIN = @GRAPHATOM_BIN@ +GREP = @GREP@ +H5CC = @H5CC@ +HDF5_CFLAGS = @HDF5_CFLAGS@ +HDF5_CPPFLAGS = @HDF5_CPPFLAGS@ +HDF5_CXXFLAGS = @HDF5_CXXFLAGS@ +HDF5_FCFLAGS = @HDF5_FCFLAGS@ +HDF5_LDFLAGS = @HDF5_LDFLAGS@ +HDF5_LIBS = @HDF5_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +LDFLAGS = @LDFLAGS@ +LEVMAR_CFLAGS = @LEVMAR_CFLAGS@ +LEVMAR_CPPFLAGS = @LEVMAR_CPPFLAGS@ +LEVMAR_LDFLAGS = @LEVMAR_LDFLAGS@ +LEVMAR_LIBS = @LEVMAR_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPAW_CPPFLAGS = @LIBPAW_CPPFLAGS@ +LIBPAW_FCFLAGS = @LIBPAW_FCFLAGS@ +LIBPAW_LDFLAGS = @LIBPAW_LDFLAGS@ +LIBPAW_LIBS = @LIBPAW_LIBS@ +LIBPSML_CPPFLAGS = @LIBPSML_CPPFLAGS@ +LIBPSML_FCFLAGS = @LIBPSML_FCFLAGS@ +LIBPSML_LDFLAGS = @LIBPSML_LDFLAGS@ +LIBPSML_LIBS = @LIBPSML_LIBS@ +LIBS = @LIBS@ +LIBXC_CFLAGS = @LIBXC_CFLAGS@ +LIBXC_CPPFLAGS = @LIBXC_CPPFLAGS@ +LIBXC_FCFLAGS = @LIBXC_FCFLAGS@ +LIBXC_LDFLAGS = @LIBXC_LDFLAGS@ +LIBXC_LIBS = @LIBXC_LIBS@ +LIBXML2_CPPFLAGS = @LIBXML2_CPPFLAGS@ +LIBXML2_FCFLAGS = @LIBXML2_FCFLAGS@ +LIBXML2_LIBS = @LIBXML2_LIBS@ +LINALG_CFLAGS = @LINALG_CFLAGS@ +LINALG_CPPFLAGS = @LINALG_CPPFLAGS@ +LINALG_CXXFLAGS = @LINALG_CXXFLAGS@ +LINALG_FCFLAGS = @LINALG_FCFLAGS@ +LINALG_LDFLAGS = @LINALG_LDFLAGS@ +LINALG_LIBS = @LINALG_LIBS@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODEXT = @MODEXT@ +MPI_CFLAGS = @MPI_CFLAGS@ +MPI_CPPFLAGS = @MPI_CPPFLAGS@ +MPI_CXXFLAGS = @MPI_CXXFLAGS@ +MPI_FCFLAGS = @MPI_FCFLAGS@ +MPI_LDFLAGS = @MPI_LDFLAGS@ +MPI_LIBS = @MPI_LIBS@ +MV = @MV@ +NETCDF_CFLAGS = @NETCDF_CFLAGS@ +NETCDF_CPPFLAGS = @NETCDF_CPPFLAGS@ +NETCDF_CXXFLAGS = @NETCDF_CXXFLAGS@ +NETCDF_FCFLAGS = @NETCDF_FCFLAGS@ +NETCDF_FORTRAN_CFLAGS = @NETCDF_FORTRAN_CFLAGS@ +NETCDF_FORTRAN_CPPFLAGS = @NETCDF_FORTRAN_CPPFLAGS@ +NETCDF_FORTRAN_CXXFLAGS = @NETCDF_FORTRAN_CXXFLAGS@ +NETCDF_FORTRAN_FCFLAGS = @NETCDF_FORTRAN_FCFLAGS@ +NETCDF_FORTRAN_LDFLAGS = @NETCDF_FORTRAN_LDFLAGS@ +NETCDF_FORTRAN_LIBS = @NETCDF_FORTRAN_LIBS@ +NETCDF_LDFLAGS = @NETCDF_LDFLAGS@ +NETCDF_LIBS = @NETCDF_LIBS@ +NVCC = @NVCC@ +NVCC_CFLAGS = @NVCC_CFLAGS@ +NVCC_CPPFLAGS = @NVCC_CPPFLAGS@ +NVCC_LDFLAGS = @NVCC_LDFLAGS@ +NVCC_LIBS = @NVCC_LIBS@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PAPI_CFLAGS = @PAPI_CFLAGS@ +PAPI_CPPFLAGS = @PAPI_CPPFLAGS@ +PAPI_LDFLAGS = @PAPI_LDFLAGS@ +PAPI_LIBS = @PAPI_LIBS@ +PATCH = @PATCH@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PFFT_CFLAGS = @PFFT_CFLAGS@ +PFFT_CPPFLAGS = @PFFT_CPPFLAGS@ +PFFT_LDFLAGS = @PFFT_LDFLAGS@ +PFFT_LIBS = @PFFT_LIBS@ +PYFLAGS = @PYFLAGS@ +PYTHON = @PYTHON@ +PYTHON_CONFIG = @PYTHON_CONFIG@ +PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ +RANLIB = @RANLIB@ +REALPATH = @REALPATH@ +RM = @RM@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +TAR = @TAR@ +TRIQS_CFLAGS = @TRIQS_CFLAGS@ +TRIQS_CPPFLAGS = @TRIQS_CPPFLAGS@ +TRIQS_CXXFLAGS = @TRIQS_CXXFLAGS@ +TRIQS_LDFLAGS = @TRIQS_LDFLAGS@ +TRIQS_LIBS = @TRIQS_LIBS@ +TRUE_CPP = @TRUE_CPP@ +VERSION = @VERSION@ +WANNIER90_CPPFLAGS = @WANNIER90_CPPFLAGS@ +WANNIER90_FCFLAGS = @WANNIER90_FCFLAGS@ +WANNIER90_LDFLAGS = @WANNIER90_LDFLAGS@ +WANNIER90_LIBS = @WANNIER90_LIBS@ +XML2_CONFIG = @XML2_CONFIG@ +XMLF90_CPPFLAGS = @XMLF90_CPPFLAGS@ +XMLF90_FCFLAGS = @XMLF90_FCFLAGS@ +XMLF90_LDFLAGS = @XMLF90_LDFLAGS@ +XMLF90_LIBS = @XMLF90_LIBS@ +XML_CPPFLAGS = @XML_CPPFLAGS@ +XML_LIBS = @XML_LIBS@ +XPP = @XPP@ +XPPFLAGS = @XPPFLAGS@ +XPPFLAGS_DEBUG = @XPPFLAGS_DEBUG@ +XPPFLAGS_EXTRA = @XPPFLAGS_EXTRA@ +XPPFLAGS_OPTIM = @XPPFLAGS_OPTIM@ +YAKL_CPPFLAGS = @YAKL_CPPFLAGS@ +YAKL_FCFLAGS = @YAKL_FCFLAGS@ +YAKL_LDFLAGS = @YAKL_LDFLAGS@ +YAKL_LIBS = @YAKL_LIBS@ +abi_ac_distcheck = @abi_ac_distcheck@ +abi_ac_version = @abi_ac_version@ +abi_am_version = @abi_am_version@ +abi_avx_safe_mode_enable = @abi_avx_safe_mode_enable@ +abi_bse_unpacked_enable = @abi_bse_unpacked_enable@ +abi_cc_path = @abi_cc_path@ +abi_cc_vendor = @abi_cc_vendor@ +abi_cc_version = @abi_cc_version@ +abi_cclock_enable = @abi_cclock_enable@ +abi_cpp_path = @abi_cpp_path@ +abi_cpu_64bits = @abi_cpu_64bits@ +abi_cpu_bits = @abi_cpu_bits@ +abi_cpu_model = @abi_cpu_model@ +abi_cpu_platform = @abi_cpu_platform@ +abi_cpu_spec = @abi_cpu_spec@ +abi_cpu_vendor = @abi_cpu_vendor@ +abi_crpa_optim_enable = @abi_crpa_optim_enable@ +abi_cxx_path = @abi_cxx_path@ +abi_cxx_vendor = @abi_cxx_vendor@ +abi_cxx_version = @abi_cxx_version@ +abi_debug_flavor = @abi_debug_flavor@ +abi_exports_enable = @abi_exports_enable@ +abi_fbk_abinit_common_ok = @abi_fbk_abinit_common_ok@ +abi_fbk_bigdft_ok = @abi_fbk_bigdft_ok@ +abi_fbk_config = @abi_fbk_config@ +abi_fbk_enable = @abi_fbk_enable@ +abi_fbk_fft_ok = @abi_fbk_fft_ok@ +abi_fbk_fftw3_ok = @abi_fbk_fftw3_ok@ +abi_fbk_gpu_ok = @abi_fbk_gpu_ok@ +abi_fbk_hdf5_ok = @abi_fbk_hdf5_ok@ +abi_fbk_init = @abi_fbk_init@ +abi_fbk_kokkos_ok = @abi_fbk_kokkos_ok@ +abi_fbk_levmar_ok = @abi_fbk_levmar_ok@ +abi_fbk_libpaw_ok = @abi_fbk_libpaw_ok@ +abi_fbk_libpsml_ok = @abi_fbk_libpsml_ok@ +abi_fbk_libxc_ok = @abi_fbk_libxc_ok@ +abi_fbk_libxml2_ok = @abi_fbk_libxml2_ok@ +abi_fbk_linalg_ok = @abi_fbk_linalg_ok@ +abi_fbk_list = @abi_fbk_list@ +abi_fbk_mpi_ok = @abi_fbk_mpi_ok@ +abi_fbk_netcdf_fortran_ok = @abi_fbk_netcdf_fortran_ok@ +abi_fbk_netcdf_ok = @abi_fbk_netcdf_ok@ +abi_fbk_papi_ok = @abi_fbk_papi_ok@ +abi_fbk_pfft_ok = @abi_fbk_pfft_ok@ +abi_fbk_prefix = @abi_fbk_prefix@ +abi_fbk_required = @abi_fbk_required@ +abi_fbk_triqs_ok = @abi_fbk_triqs_ok@ +abi_fbk_wannier90_ok = @abi_fbk_wannier90_ok@ +abi_fbk_xmlf90_ok = @abi_fbk_xmlf90_ok@ +abi_fbk_yakl_ok = @abi_fbk_yakl_ok@ +abi_fc_path = @abi_fc_path@ +abi_fc_vendor = @abi_fc_vendor@ +abi_fc_version = @abi_fc_version@ +abi_fc_wrap = @abi_fc_wrap@ +abi_fc_wrapper_enable = @abi_fc_wrapper_enable@ +abi_fpp_path = @abi_fpp_path@ +abi_gpu_arch = @abi_gpu_arch@ +abi_gpu_fcflags = @abi_gpu_fcflags@ +abi_gpu_flavor = @abi_gpu_flavor@ +abi_gpu_hip_libdir = @abi_gpu_hip_libdir@ +abi_gpu_incs = @abi_gpu_incs@ +abi_gpu_ldflags = @abi_gpu_ldflags@ +abi_gpu_libs = @abi_gpu_libs@ +abi_gpu_nvtx_v3 = @abi_gpu_nvtx_v3@ +abi_gpu_roctx = @abi_gpu_roctx@ +abi_gw_dpc_enable = @abi_gw_dpc_enable@ +abi_hints_enable = @abi_hints_enable@ +abi_libtetra_enable = @abi_libtetra_enable@ +abi_libxml2_cppflags = @abi_libxml2_cppflags@ +abi_libxml2_enable = @abi_libxml2_enable@ +abi_libxml2_fcflags = @abi_libxml2_fcflags@ +abi_libxml2_init = @abi_libxml2_init@ +abi_libxml2_ldflags = @abi_libxml2_ldflags@ +abi_libxml2_libs = @abi_libxml2_libs@ +abi_libxml2_ok = @abi_libxml2_ok@ +abi_libxml2_prefix = @abi_libxml2_prefix@ +abi_lotf_enable = @abi_lotf_enable@ +abi_lt_version = @abi_lt_version@ +abi_m4_version = @abi_m4_version@ +abi_memory_profiling_enable = @abi_memory_profiling_enable@ +abi_mpi_cflags = @abi_mpi_cflags@ +abi_mpi_cppflags = @abi_mpi_cppflags@ +abi_mpi_cxxflags = @abi_mpi_cxxflags@ +abi_mpi_enable = @abi_mpi_enable@ +abi_mpi_fcflags = @abi_mpi_fcflags@ +abi_mpi_flavor = @abi_mpi_flavor@ +abi_mpi_gpu_aware_enable = @abi_mpi_gpu_aware_enable@ +abi_mpi_incs = @abi_mpi_incs@ +abi_mpi_inplace_enable = @abi_mpi_inplace_enable@ +abi_mpi_interfaces_bugfix_enable = @abi_mpi_interfaces_bugfix_enable@ +abi_mpi_io_default_enable = @abi_mpi_io_default_enable@ +abi_mpi_io_enable = @abi_mpi_io_enable@ +abi_mpi_ldflags = @abi_mpi_ldflags@ +abi_mpi_level = @abi_mpi_level@ +abi_mpi_libs = @abi_mpi_libs@ +abi_netcdf_default_enable = @abi_netcdf_default_enable@ +abi_openmp_enable = @abi_openmp_enable@ +abi_openmp_offload_enable = @abi_openmp_offload_enable@ +abi_optim_flavor = @abi_optim_flavor@ +abi_python_invocation_enable = @abi_python_invocation_enable@ +abi_source_debug_enable = @abi_source_debug_enable@ +abi_stdin_enable = @abi_stdin_enable@ +abi_sys_spec = @abi_sys_spec@ +abi_timer_enable = @abi_timer_enable@ +abi_triqs_v1_4_enable = @abi_triqs_v1_4_enable@ +abi_triqs_v2_0_enable = @abi_triqs_v2_0_enable@ +abi_zdot_bugfix_enable = @abi_zdot_bugfix_enable@ +abinit_bindir = @abinit_bindir@ +abinit_builddir = @abinit_builddir@ +abinit_chkdir = @abinit_chkdir@ +abinit_datdir = @abinit_datdir@ +abinit_docdir = @abinit_docdir@ +abinit_incdir = @abinit_incdir@ +abinit_libdir = @abinit_libdir@ +abinit_mandir = @abinit_mandir@ +abinit_prefix = @abinit_prefix@ +abinit_srcdir = @abinit_srcdir@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_FC = @ac_ct_FC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cc_info_string = @cc_info_string@ +cxx_info_string = @cxx_info_string@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +enable_avx_safe_mode = @enable_avx_safe_mode@ +enable_bse_unpacked = @enable_bse_unpacked@ +enable_cclock = @enable_cclock@ +enable_crpa_optim = @enable_crpa_optim@ +enable_exports = @enable_exports@ +enable_fc_wrapper = @enable_fc_wrapper@ +enable_gw_dpc = @enable_gw_dpc@ +enable_hints = @enable_hints@ +enable_libtetra = @enable_libtetra@ +enable_lotf = @enable_lotf@ +enable_memory_profiling = @enable_memory_profiling@ +enable_mpi_gpu_aware = @enable_mpi_gpu_aware@ +enable_mpi_inplace = @enable_mpi_inplace@ +enable_mpi_interfaces_bugfix = @enable_mpi_interfaces_bugfix@ +enable_mpi_io = @enable_mpi_io@ +enable_mpi_io_default = @enable_mpi_io_default@ +enable_netcdf_default = @enable_netcdf_default@ +enable_openmp = @enable_openmp@ +enable_openmp_offload = @enable_openmp_offload@ +enable_python_invocation = @enable_python_invocation@ +enable_shared = @enable_shared@ +enable_source_debug = @enable_source_debug@ +enable_static = @enable_static@ +enable_stdin = @enable_stdin@ +enable_timer = @enable_timer@ +enable_triqs_v1_4 = @enable_triqs_v1_4@ +enable_triqs_v2_0 = @enable_triqs_v2_0@ +enable_zdot_bugfix = @enable_zdot_bugfix@ +exec_prefix = @exec_prefix@ +fc_info_string = @fc_info_string@ +fc_mod_fcflags = @fc_mod_fcflags@ +fc_timing = @fc_timing@ +fcflags_opt_02_clib = @fcflags_opt_02_clib@ +fcflags_opt_10_defs = @fcflags_opt_10_defs@ +fcflags_opt_11_memory_mpi = @fcflags_opt_11_memory_mpi@ +fcflags_opt_12_hide_mpi = @fcflags_opt_12_hide_mpi@ +fcflags_opt_14_hidewrite = @fcflags_opt_14_hidewrite@ +fcflags_opt_16_hideleave = @fcflags_opt_16_hideleave@ +fcflags_opt_16_kokkos_toolbox = @fcflags_opt_16_kokkos_toolbox@ +fcflags_opt_17_gpu_toolbox = @fcflags_opt_17_gpu_toolbox@ +fcflags_opt_17_libtetra_ext = @fcflags_opt_17_libtetra_ext@ +fcflags_opt_17_minimax = @fcflags_opt_17_minimax@ +fcflags_opt_17_yaml_out = @fcflags_opt_17_yaml_out@ +fcflags_opt_18_timing = @fcflags_opt_18_timing@ +fcflags_opt_21_hashfuncs = @fcflags_opt_21_hashfuncs@ +fcflags_opt_27_toolbox_oop = @fcflags_opt_27_toolbox_oop@ +fcflags_opt_28_numeric_noabirule = @fcflags_opt_28_numeric_noabirule@ +fcflags_opt_29_kpoints = @fcflags_opt_29_kpoints@ +fcflags_opt_32_util = @fcflags_opt_32_util@ +fcflags_opt_33_xc_lowlevel = @fcflags_opt_33_xc_lowlevel@ +fcflags_opt_39_libpaw = @fcflags_opt_39_libpaw@ +fcflags_opt_41_geometry = @fcflags_opt_41_geometry@ +fcflags_opt_42_nlstrain = @fcflags_opt_42_nlstrain@ +fcflags_opt_42_parser = @fcflags_opt_42_parser@ +fcflags_opt_43_ptgroups = @fcflags_opt_43_ptgroups@ +fcflags_opt_43_wvl_wrappers = @fcflags_opt_43_wvl_wrappers@ +fcflags_opt_44_abitools = @fcflags_opt_44_abitools@ +fcflags_opt_44_abitypes_defs = @fcflags_opt_44_abitypes_defs@ +fcflags_opt_44_manage_kokkos = @fcflags_opt_44_manage_kokkos@ +fcflags_opt_45_geomoptim = @fcflags_opt_45_geomoptim@ +fcflags_opt_45_xgTools = @fcflags_opt_45_xgTools@ +fcflags_opt_46_ghc_omp = @fcflags_opt_46_ghc_omp@ +fcflags_opt_46_manage_cuda = @fcflags_opt_46_manage_cuda@ +fcflags_opt_48_diago = @fcflags_opt_48_diago@ +fcflags_opt_49_gw_toolbox_oop = @fcflags_opt_49_gw_toolbox_oop@ +fcflags_opt_51_manage_mpi = @fcflags_opt_51_manage_mpi@ +fcflags_opt_52_fft_mpi_noabirule = @fcflags_opt_52_fft_mpi_noabirule@ +fcflags_opt_53_ffts = @fcflags_opt_53_ffts@ +fcflags_opt_54_spacepar = @fcflags_opt_54_spacepar@ +fcflags_opt_55_abiutil = @fcflags_opt_55_abiutil@ +fcflags_opt_56_io_mpi = @fcflags_opt_56_io_mpi@ +fcflags_opt_56_mixing = @fcflags_opt_56_mixing@ +fcflags_opt_56_recipspace = @fcflags_opt_56_recipspace@ +fcflags_opt_56_xc = @fcflags_opt_56_xc@ +fcflags_opt_57_iopsp_parser = @fcflags_opt_57_iopsp_parser@ +fcflags_opt_57_iovars = @fcflags_opt_57_iovars@ +fcflags_opt_61_occeig = @fcflags_opt_61_occeig@ +fcflags_opt_62_cg_noabirule = @fcflags_opt_62_cg_noabirule@ +fcflags_opt_62_ctqmc = @fcflags_opt_62_ctqmc@ +fcflags_opt_62_iowfdenpot = @fcflags_opt_62_iowfdenpot@ +fcflags_opt_62_poisson = @fcflags_opt_62_poisson@ +fcflags_opt_62_wvl_wfs = @fcflags_opt_62_wvl_wfs@ +fcflags_opt_64_psp = @fcflags_opt_64_psp@ +fcflags_opt_65_lotf_base = @fcflags_opt_65_lotf_base@ +fcflags_opt_65_paw = @fcflags_opt_65_paw@ +fcflags_opt_66_nonlocal = @fcflags_opt_66_nonlocal@ +fcflags_opt_66_vdwxc = @fcflags_opt_66_vdwxc@ +fcflags_opt_66_wfs = @fcflags_opt_66_wfs@ +fcflags_opt_67_common = @fcflags_opt_67_common@ +fcflags_opt_67_python_invocation_ext = @fcflags_opt_67_python_invocation_ext@ +fcflags_opt_67_triqs_ext = @fcflags_opt_67_triqs_ext@ +fcflags_opt_68_dmft = @fcflags_opt_68_dmft@ +fcflags_opt_68_lotf = @fcflags_opt_68_lotf@ +fcflags_opt_68_recursion = @fcflags_opt_68_recursion@ +fcflags_opt_68_rsprc = @fcflags_opt_68_rsprc@ +fcflags_opt_69_wfdesc = @fcflags_opt_69_wfdesc@ +fcflags_opt_70_gw = @fcflags_opt_70_gw@ +fcflags_opt_71_bse = @fcflags_opt_71_bse@ +fcflags_opt_71_wannier = @fcflags_opt_71_wannier@ +fcflags_opt_72_response = @fcflags_opt_72_response@ +fcflags_opt_77_ddb = @fcflags_opt_77_ddb@ +fcflags_opt_77_suscep = @fcflags_opt_77_suscep@ +fcflags_opt_78_effpot = @fcflags_opt_78_effpot@ +fcflags_opt_78_eph = @fcflags_opt_78_eph@ +fcflags_opt_79_seqpar_mpi = @fcflags_opt_79_seqpar_mpi@ +fcflags_opt_80_rttddft = @fcflags_opt_80_rttddft@ +fcflags_opt_80_tdep = @fcflags_opt_80_tdep@ +fcflags_opt_94_scfcv = @fcflags_opt_94_scfcv@ +fcflags_opt_95_drive = @fcflags_opt_95_drive@ +fcflags_opt_98_main = @fcflags_opt_98_main@ +fcflags_opt_bigdft = @fcflags_opt_bigdft@ +fcflags_opt_default = @fcflags_opt_default@ +fcflags_opt_hdf5 = @fcflags_opt_hdf5@ +fcflags_opt_levmar = @fcflags_opt_levmar@ +fcflags_opt_libpsml = @fcflags_opt_libpsml@ +fcflags_opt_libxc = @fcflags_opt_libxc@ +fcflags_opt_libxml2 = @fcflags_opt_libxml2@ +fcflags_opt_linalg = @fcflags_opt_linalg@ +fcflags_opt_netcdf = @fcflags_opt_netcdf@ +fcflags_opt_netcdf_fortran = @fcflags_opt_netcdf_fortran@ +fcflags_opt_papi = @fcflags_opt_papi@ +fcflags_opt_triqs = @fcflags_opt_triqs@ +fcflags_opt_wannier90 = @fcflags_opt_wannier90@ +fcflags_opt_xmlf90 = @fcflags_opt_xmlf90@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sd_abinit_common_cppflags = @sd_abinit_common_cppflags@ +sd_abinit_common_enable = @sd_abinit_common_enable@ +sd_abinit_common_enable_def = @sd_abinit_common_enable_def@ +sd_abinit_common_fcflags = @sd_abinit_common_fcflags@ +sd_abinit_common_init = @sd_abinit_common_init@ +sd_abinit_common_ldflags = @sd_abinit_common_ldflags@ +sd_abinit_common_libs = @sd_abinit_common_libs@ +sd_abinit_common_ok = @sd_abinit_common_ok@ +sd_abinit_common_options = @sd_abinit_common_options@ +sd_abinit_common_policy = @sd_abinit_common_policy@ +sd_abinit_common_status = @sd_abinit_common_status@ +sd_bigdft_cppflags = @sd_bigdft_cppflags@ +sd_bigdft_enable = @sd_bigdft_enable@ +sd_bigdft_enable_def = @sd_bigdft_enable_def@ +sd_bigdft_fcflags = @sd_bigdft_fcflags@ +sd_bigdft_init = @sd_bigdft_init@ +sd_bigdft_ldflags = @sd_bigdft_ldflags@ +sd_bigdft_libs = @sd_bigdft_libs@ +sd_bigdft_ok = @sd_bigdft_ok@ +sd_bigdft_options = @sd_bigdft_options@ +sd_bigdft_policy = @sd_bigdft_policy@ +sd_bigdft_status = @sd_bigdft_status@ +sd_fft_cflags = @sd_fft_cflags@ +sd_fft_choices = @sd_fft_choices@ +sd_fft_cppflags = @sd_fft_cppflags@ +sd_fft_cxxflags = @sd_fft_cxxflags@ +sd_fft_enable = @sd_fft_enable@ +sd_fft_fcflags = @sd_fft_fcflags@ +sd_fft_flavor = @sd_fft_flavor@ +sd_fft_init = @sd_fft_init@ +sd_fft_ldflags = @sd_fft_ldflags@ +sd_fft_libs = @sd_fft_libs@ +sd_fft_ok = @sd_fft_ok@ +sd_fftw3_cflags = @sd_fftw3_cflags@ +sd_fftw3_cppflags = @sd_fftw3_cppflags@ +sd_fftw3_enable = @sd_fftw3_enable@ +sd_fftw3_enable_def = @sd_fftw3_enable_def@ +sd_fftw3_fcflags = @sd_fftw3_fcflags@ +sd_fftw3_init = @sd_fftw3_init@ +sd_fftw3_ldflags = @sd_fftw3_ldflags@ +sd_fftw3_libs = @sd_fftw3_libs@ +sd_fftw3_ok = @sd_fftw3_ok@ +sd_fftw3_options = @sd_fftw3_options@ +sd_fftw3_policy = @sd_fftw3_policy@ +sd_fftw3_status = @sd_fftw3_status@ +sd_gpu_cflags = @sd_gpu_cflags@ +sd_gpu_cppflags = @sd_gpu_cppflags@ +sd_gpu_cxxflags = @sd_gpu_cxxflags@ +sd_gpu_enable = @sd_gpu_enable@ +sd_gpu_enable_def = @sd_gpu_enable_def@ +sd_gpu_fcflags = @sd_gpu_fcflags@ +sd_gpu_init = @sd_gpu_init@ +sd_gpu_ldflags = @sd_gpu_ldflags@ +sd_gpu_libs = @sd_gpu_libs@ +sd_gpu_ok = @sd_gpu_ok@ +sd_gpu_options = @sd_gpu_options@ +sd_gpu_policy = @sd_gpu_policy@ +sd_gpu_prefix = @sd_gpu_prefix@ +sd_gpu_status = @sd_gpu_status@ +sd_hdf5_cflags = @sd_hdf5_cflags@ +sd_hdf5_cppflags = @sd_hdf5_cppflags@ +sd_hdf5_cxxflags = @sd_hdf5_cxxflags@ +sd_hdf5_enable = @sd_hdf5_enable@ +sd_hdf5_enable_def = @sd_hdf5_enable_def@ +sd_hdf5_enable_fc = @sd_hdf5_enable_fc@ +sd_hdf5_fcflags = @sd_hdf5_fcflags@ +sd_hdf5_h5cc = @sd_hdf5_h5cc@ +sd_hdf5_h5fc = @sd_hdf5_h5fc@ +sd_hdf5_init = @sd_hdf5_init@ +sd_hdf5_ldflags = @sd_hdf5_ldflags@ +sd_hdf5_libs = @sd_hdf5_libs@ +sd_hdf5_ok = @sd_hdf5_ok@ +sd_hdf5_options = @sd_hdf5_options@ +sd_hdf5_policy = @sd_hdf5_policy@ +sd_hdf5_status = @sd_hdf5_status@ +sd_kokkos_cppflags = @sd_kokkos_cppflags@ +sd_kokkos_cxxflags = @sd_kokkos_cxxflags@ +sd_kokkos_enable = @sd_kokkos_enable@ +sd_kokkos_enable_def = @sd_kokkos_enable_def@ +sd_kokkos_init = @sd_kokkos_init@ +sd_kokkos_ldflags = @sd_kokkos_ldflags@ +sd_kokkos_libs = @sd_kokkos_libs@ +sd_kokkos_ok = @sd_kokkos_ok@ +sd_kokkos_options = @sd_kokkos_options@ +sd_kokkos_policy = @sd_kokkos_policy@ +sd_kokkos_status = @sd_kokkos_status@ +sd_levmar_cflags = @sd_levmar_cflags@ +sd_levmar_cppflags = @sd_levmar_cppflags@ +sd_levmar_enable = @sd_levmar_enable@ +sd_levmar_enable_def = @sd_levmar_enable_def@ +sd_levmar_init = @sd_levmar_init@ +sd_levmar_ldflags = @sd_levmar_ldflags@ +sd_levmar_libs = @sd_levmar_libs@ +sd_levmar_ok = @sd_levmar_ok@ +sd_levmar_options = @sd_levmar_options@ +sd_levmar_policy = @sd_levmar_policy@ +sd_levmar_status = @sd_levmar_status@ +sd_libpaw_cppflags = @sd_libpaw_cppflags@ +sd_libpaw_enable = @sd_libpaw_enable@ +sd_libpaw_enable_def = @sd_libpaw_enable_def@ +sd_libpaw_fcflags = @sd_libpaw_fcflags@ +sd_libpaw_init = @sd_libpaw_init@ +sd_libpaw_ldflags = @sd_libpaw_ldflags@ +sd_libpaw_libs = @sd_libpaw_libs@ +sd_libpaw_ok = @sd_libpaw_ok@ +sd_libpaw_options = @sd_libpaw_options@ +sd_libpaw_policy = @sd_libpaw_policy@ +sd_libpaw_status = @sd_libpaw_status@ +sd_libpsml_cppflags = @sd_libpsml_cppflags@ +sd_libpsml_enable = @sd_libpsml_enable@ +sd_libpsml_enable_def = @sd_libpsml_enable_def@ +sd_libpsml_fcflags = @sd_libpsml_fcflags@ +sd_libpsml_init = @sd_libpsml_init@ +sd_libpsml_ldflags = @sd_libpsml_ldflags@ +sd_libpsml_libs = @sd_libpsml_libs@ +sd_libpsml_ok = @sd_libpsml_ok@ +sd_libpsml_options = @sd_libpsml_options@ +sd_libpsml_policy = @sd_libpsml_policy@ +sd_libpsml_status = @sd_libpsml_status@ +sd_libxc_cflags = @sd_libxc_cflags@ +sd_libxc_cppflags = @sd_libxc_cppflags@ +sd_libxc_enable = @sd_libxc_enable@ +sd_libxc_enable_def = @sd_libxc_enable_def@ +sd_libxc_enable_fc = @sd_libxc_enable_fc@ +sd_libxc_fcflags = @sd_libxc_fcflags@ +sd_libxc_init = @sd_libxc_init@ +sd_libxc_ldflags = @sd_libxc_ldflags@ +sd_libxc_libs = @sd_libxc_libs@ +sd_libxc_ok = @sd_libxc_ok@ +sd_libxc_options = @sd_libxc_options@ +sd_libxc_policy = @sd_libxc_policy@ +sd_libxc_status = @sd_libxc_status@ +sd_linalg_cflags = @sd_linalg_cflags@ +sd_linalg_choices = @sd_linalg_choices@ +sd_linalg_cppflags = @sd_linalg_cppflags@ +sd_linalg_cxxflags = @sd_linalg_cxxflags@ +sd_linalg_enable = @sd_linalg_enable@ +sd_linalg_fcflags = @sd_linalg_fcflags@ +sd_linalg_flavor = @sd_linalg_flavor@ +sd_linalg_has_elpa = @sd_linalg_has_elpa@ +sd_linalg_has_scalapack = @sd_linalg_has_scalapack@ +sd_linalg_init = @sd_linalg_init@ +sd_linalg_ldflags = @sd_linalg_ldflags@ +sd_linalg_libs = @sd_linalg_libs@ +sd_linalg_ok = @sd_linalg_ok@ +sd_mpi_cc = @sd_mpi_cc@ +sd_mpi_cflags = @sd_mpi_cflags@ +sd_mpi_cppflags = @sd_mpi_cppflags@ +sd_mpi_cxx = @sd_mpi_cxx@ +sd_mpi_enable = @sd_mpi_enable@ +sd_mpi_enable_cxx = @sd_mpi_enable_cxx@ +sd_mpi_enable_def = @sd_mpi_enable_def@ +sd_mpi_enable_fc = @sd_mpi_enable_fc@ +sd_mpi_fc = @sd_mpi_fc@ +sd_mpi_fcflags = @sd_mpi_fcflags@ +sd_mpi_init = @sd_mpi_init@ +sd_mpi_ldflags = @sd_mpi_ldflags@ +sd_mpi_libs = @sd_mpi_libs@ +sd_mpi_ok = @sd_mpi_ok@ +sd_mpi_options = @sd_mpi_options@ +sd_mpi_policy = @sd_mpi_policy@ +sd_mpi_status = @sd_mpi_status@ +sd_netcdf_cflags = @sd_netcdf_cflags@ +sd_netcdf_cppflags = @sd_netcdf_cppflags@ +sd_netcdf_enable = @sd_netcdf_enable@ +sd_netcdf_enable_def = @sd_netcdf_enable_def@ +sd_netcdf_fcflags = @sd_netcdf_fcflags@ +sd_netcdf_fortran_cflags = @sd_netcdf_fortran_cflags@ +sd_netcdf_fortran_cppflags = @sd_netcdf_fortran_cppflags@ +sd_netcdf_fortran_enable = @sd_netcdf_fortran_enable@ +sd_netcdf_fortran_enable_def = @sd_netcdf_fortran_enable_def@ +sd_netcdf_fortran_fcflags = @sd_netcdf_fortran_fcflags@ +sd_netcdf_fortran_init = @sd_netcdf_fortran_init@ +sd_netcdf_fortran_ldflags = @sd_netcdf_fortran_ldflags@ +sd_netcdf_fortran_libs = @sd_netcdf_fortran_libs@ +sd_netcdf_fortran_ok = @sd_netcdf_fortran_ok@ +sd_netcdf_fortran_options = @sd_netcdf_fortran_options@ +sd_netcdf_fortran_policy = @sd_netcdf_fortran_policy@ +sd_netcdf_fortran_status = @sd_netcdf_fortran_status@ +sd_netcdf_init = @sd_netcdf_init@ +sd_netcdf_ldflags = @sd_netcdf_ldflags@ +sd_netcdf_libs = @sd_netcdf_libs@ +sd_netcdf_ok = @sd_netcdf_ok@ +sd_netcdf_options = @sd_netcdf_options@ +sd_netcdf_policy = @sd_netcdf_policy@ +sd_netcdf_status = @sd_netcdf_status@ +sd_papi_cflags = @sd_papi_cflags@ +sd_papi_cppflags = @sd_papi_cppflags@ +sd_papi_enable = @sd_papi_enable@ +sd_papi_enable_def = @sd_papi_enable_def@ +sd_papi_init = @sd_papi_init@ +sd_papi_ldflags = @sd_papi_ldflags@ +sd_papi_libs = @sd_papi_libs@ +sd_papi_ok = @sd_papi_ok@ +sd_papi_options = @sd_papi_options@ +sd_papi_policy = @sd_papi_policy@ +sd_papi_sd_papi_fcflags = @sd_papi_sd_papi_fcflags@ +sd_papi_status = @sd_papi_status@ +sd_pfft_cflags = @sd_pfft_cflags@ +sd_pfft_cppflags = @sd_pfft_cppflags@ +sd_pfft_enable = @sd_pfft_enable@ +sd_pfft_enable_def = @sd_pfft_enable_def@ +sd_pfft_init = @sd_pfft_init@ +sd_pfft_ldflags = @sd_pfft_ldflags@ +sd_pfft_libs = @sd_pfft_libs@ +sd_pfft_ok = @sd_pfft_ok@ +sd_pfft_options = @sd_pfft_options@ +sd_pfft_policy = @sd_pfft_policy@ +sd_pfft_status = @sd_pfft_status@ +sd_sys_fcflags = @sd_sys_fcflags@ +sd_triqs_cflags = @sd_triqs_cflags@ +sd_triqs_cppflags = @sd_triqs_cppflags@ +sd_triqs_cxxflags = @sd_triqs_cxxflags@ +sd_triqs_enable = @sd_triqs_enable@ +sd_triqs_enable_def = @sd_triqs_enable_def@ +sd_triqs_fcflags = @sd_triqs_fcflags@ +sd_triqs_init = @sd_triqs_init@ +sd_triqs_ldflags = @sd_triqs_ldflags@ +sd_triqs_libs = @sd_triqs_libs@ +sd_triqs_ok = @sd_triqs_ok@ +sd_triqs_options = @sd_triqs_options@ +sd_triqs_policy = @sd_triqs_policy@ +sd_triqs_status = @sd_triqs_status@ +sd_wannier90_cppflags = @sd_wannier90_cppflags@ +sd_wannier90_enable = @sd_wannier90_enable@ +sd_wannier90_enable_def = @sd_wannier90_enable_def@ +sd_wannier90_fcflags = @sd_wannier90_fcflags@ +sd_wannier90_init = @sd_wannier90_init@ +sd_wannier90_ldflags = @sd_wannier90_ldflags@ +sd_wannier90_libs = @sd_wannier90_libs@ +sd_wannier90_ok = @sd_wannier90_ok@ +sd_wannier90_options = @sd_wannier90_options@ +sd_wannier90_policy = @sd_wannier90_policy@ +sd_wannier90_status = @sd_wannier90_status@ +sd_xmlf90_cppflags = @sd_xmlf90_cppflags@ +sd_xmlf90_enable = @sd_xmlf90_enable@ +sd_xmlf90_enable_def = @sd_xmlf90_enable_def@ +sd_xmlf90_fcflags = @sd_xmlf90_fcflags@ +sd_xmlf90_init = @sd_xmlf90_init@ +sd_xmlf90_ldflags = @sd_xmlf90_ldflags@ +sd_xmlf90_libs = @sd_xmlf90_libs@ +sd_xmlf90_ok = @sd_xmlf90_ok@ +sd_xmlf90_options = @sd_xmlf90_options@ +sd_xmlf90_policy = @sd_xmlf90_policy@ +sd_xmlf90_status = @sd_xmlf90_status@ +sd_yakl_cppflags = @sd_yakl_cppflags@ +sd_yakl_enable = @sd_yakl_enable@ +sd_yakl_enable_def = @sd_yakl_enable_def@ +sd_yakl_fcflags = @sd_yakl_fcflags@ +sd_yakl_init = @sd_yakl_init@ +sd_yakl_ldflags = @sd_yakl_ldflags@ +sd_yakl_libs = @sd_yakl_libs@ +sd_yakl_ok = @sd_yakl_ok@ +sd_yakl_options = @sd_yakl_options@ +sd_yakl_policy = @sd_yakl_policy@ +sd_yakl_status = @sd_yakl_status@ +sharedstatedir = @sharedstatedir@ +src_02_clib_fcflags = @src_02_clib_fcflags@ +src_10_defs_fcflags = @src_10_defs_fcflags@ +src_11_memory_mpi_fcflags = @src_11_memory_mpi_fcflags@ +src_12_hide_mpi_fcflags = @src_12_hide_mpi_fcflags@ +src_14_hidewrite_fcflags = @src_14_hidewrite_fcflags@ +src_16_hideleave_fcflags = @src_16_hideleave_fcflags@ +src_16_kokkos_toolbox_fcflags = @src_16_kokkos_toolbox_fcflags@ +src_17_gpu_toolbox_fcflags = @src_17_gpu_toolbox_fcflags@ +src_17_libtetra_ext_fcflags = @src_17_libtetra_ext_fcflags@ +src_17_minimax_fcflags = @src_17_minimax_fcflags@ +src_17_yaml_out_fcflags = @src_17_yaml_out_fcflags@ +src_18_timing_fcflags = @src_18_timing_fcflags@ +src_21_hashfuncs_fcflags = @src_21_hashfuncs_fcflags@ +src_27_toolbox_oop_fcflags = @src_27_toolbox_oop_fcflags@ +src_28_numeric_noabirule_fcflags = @src_28_numeric_noabirule_fcflags@ +src_29_kpoints_fcflags = @src_29_kpoints_fcflags@ +src_32_util_fcflags = @src_32_util_fcflags@ +src_33_xc_lowlevel_fcflags = @src_33_xc_lowlevel_fcflags@ +src_39_libpaw_fcflags = @src_39_libpaw_fcflags@ +src_41_geometry_fcflags = @src_41_geometry_fcflags@ +src_42_nlstrain_fcflags = @src_42_nlstrain_fcflags@ +src_42_parser_fcflags = @src_42_parser_fcflags@ +src_43_ptgroups_fcflags = @src_43_ptgroups_fcflags@ +src_43_wvl_wrappers_fcflags = @src_43_wvl_wrappers_fcflags@ +src_44_abitools_fcflags = @src_44_abitools_fcflags@ +src_44_abitypes_defs_fcflags = @src_44_abitypes_defs_fcflags@ +src_44_manage_kokkos_fcflags = @src_44_manage_kokkos_fcflags@ +src_45_geomoptim_fcflags = @src_45_geomoptim_fcflags@ +src_45_xgTools_fcflags = @src_45_xgTools_fcflags@ +src_46_ghc_omp_fcflags = @src_46_ghc_omp_fcflags@ +src_46_manage_cuda_fcflags = @src_46_manage_cuda_fcflags@ +src_48_diago_fcflags = @src_48_diago_fcflags@ +src_49_gw_toolbox_oop_fcflags = @src_49_gw_toolbox_oop_fcflags@ +src_51_manage_mpi_fcflags = @src_51_manage_mpi_fcflags@ +src_52_fft_mpi_noabirule_fcflags = @src_52_fft_mpi_noabirule_fcflags@ +src_53_ffts_fcflags = @src_53_ffts_fcflags@ +src_54_spacepar_fcflags = @src_54_spacepar_fcflags@ +src_55_abiutil_fcflags = @src_55_abiutil_fcflags@ +src_56_io_mpi_fcflags = @src_56_io_mpi_fcflags@ +src_56_mixing_fcflags = @src_56_mixing_fcflags@ +src_56_recipspace_fcflags = @src_56_recipspace_fcflags@ +src_56_xc_fcflags = @src_56_xc_fcflags@ +src_57_iopsp_parser_fcflags = @src_57_iopsp_parser_fcflags@ +src_57_iovars_fcflags = @src_57_iovars_fcflags@ +src_61_occeig_fcflags = @src_61_occeig_fcflags@ +src_62_cg_noabirule_fcflags = @src_62_cg_noabirule_fcflags@ +src_62_ctqmc_fcflags = @src_62_ctqmc_fcflags@ +src_62_iowfdenpot_fcflags = @src_62_iowfdenpot_fcflags@ +src_62_poisson_fcflags = @src_62_poisson_fcflags@ +src_62_wvl_wfs_fcflags = @src_62_wvl_wfs_fcflags@ +src_64_psp_fcflags = @src_64_psp_fcflags@ +src_65_lotf_base_fcflags = @src_65_lotf_base_fcflags@ +src_65_paw_fcflags = @src_65_paw_fcflags@ +src_66_nonlocal_fcflags = @src_66_nonlocal_fcflags@ +src_66_vdwxc_fcflags = @src_66_vdwxc_fcflags@ +src_66_wfs_fcflags = @src_66_wfs_fcflags@ +src_67_common_fcflags = @src_67_common_fcflags@ +src_67_python_invocation_ext_fcflags = @src_67_python_invocation_ext_fcflags@ +src_67_triqs_ext_fcflags = @src_67_triqs_ext_fcflags@ +src_68_dmft_fcflags = @src_68_dmft_fcflags@ +src_68_lotf_fcflags = @src_68_lotf_fcflags@ +src_68_recursion_fcflags = @src_68_recursion_fcflags@ +src_68_rsprc_fcflags = @src_68_rsprc_fcflags@ +src_69_wfdesc_fcflags = @src_69_wfdesc_fcflags@ +src_70_gw_fcflags = @src_70_gw_fcflags@ +src_71_bse_fcflags = @src_71_bse_fcflags@ +src_71_wannier_fcflags = @src_71_wannier_fcflags@ +src_72_response_fcflags = @src_72_response_fcflags@ +src_77_ddb_fcflags = @src_77_ddb_fcflags@ +src_77_suscep_fcflags = @src_77_suscep_fcflags@ +src_78_effpot_fcflags = @src_78_effpot_fcflags@ +src_78_eph_fcflags = @src_78_eph_fcflags@ +src_79_seqpar_mpi_fcflags = @src_79_seqpar_mpi_fcflags@ +src_80_rttddft_fcflags = @src_80_rttddft_fcflags@ +src_80_tdep_fcflags = @src_80_tdep_fcflags@ +src_94_scfcv_fcflags = @src_94_scfcv_fcflags@ +src_95_drive_fcflags = @src_95_drive_fcflags@ +src_common_fcflags = @src_common_fcflags@ +src_core_fcflags = @src_core_fcflags@ +src_libpaw_fcflags = @src_libpaw_fcflags@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +with_abinit_common = @with_abinit_common@ +with_bigdft = @with_bigdft@ +with_config_file = @with_config_file@ +with_debug_flavor = @with_debug_flavor@ +with_fallbacks = @with_fallbacks@ +with_fc_vendor = @with_fc_vendor@ +with_fc_version = @with_fc_version@ +with_fft_flavor = @with_fft_flavor@ +with_fftw3 = @with_fftw3@ +with_gnu_ld = @with_gnu_ld@ +with_gpu = @with_gpu@ +with_hdf5 = @with_hdf5@ +with_kokkos = @with_kokkos@ +with_levmar = @with_levmar@ +with_libpaw = @with_libpaw@ +with_libpsml = @with_libpsml@ +with_libxc = @with_libxc@ +with_libxml2 = @with_libxml2@ +with_linalg_flavor = @with_linalg_flavor@ +with_mpi = @with_mpi@ +with_mpi_level = @with_mpi_level@ +with_netcdf = @with_netcdf@ +with_optim_flavor = @with_optim_flavor@ +with_papi = @with_papi@ +with_pfft = @with_pfft@ +with_triqs = @with_triqs@ +with_wannier90 = @with_wannier90@ +with_xmlf90 = @with_xmlf90@ +with_yakl = @with_yakl@ +AM_CFLAGS = @ABI_CPPFLAGS@ +AM_CXXFLAGS = $(sd_triqs_cxxflags) +AM_FCFLAGS = @FPPFLAGS@ @FCFLAGS_FREEFORM@ @FCFLAGS_MODDIR@ @sd_sys_fcflags@ @fcflags_opt_16_hideleave@ +AM_CPPFLAGS = \ + @src_10_defs_fcflags@ \ + @src_11_memory_mpi_fcflags@ \ + @src_12_hide_mpi_fcflags@ \ + @src_14_hidewrite_fcflags@ \ + @src_common_fcflags@ \ + @src_core_fcflags@ \ + @src_libpaw_fcflags@ \ + @sd_mpi_cppflags@ \ + @sd_mpi_fcflags@ \ + @sd_hdf5_cppflags@ \ + @sd_netcdf_cppflags@ \ + @sd_netcdf_fcflags@ \ + @sd_netcdf_fortran_cppflags@ \ + @sd_netcdf_fortran_fcflags@ \ + @fc_mod_fcflags@ + + +# Regular source files +lib16_hideleave_srcs = \ + m_xieee.F90 \ + m_errors.F90 + + +# Source files depending on conditionals + +# Library description +noinst_LIBRARIES = lib16_hideleave.a +lib16_hideleave_a_SOURCES = $(lib16_hideleave_srcs) + +# Dependencies (inside the directory) of directory 16_hideleave +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. +CLEANFILES = m_xieee_cpp.f90 m_errors_cpp.f90 m_errors.$(MODEXT) \ + m_xieee.$(MODEXT) +EXTRA_DIST = abinit.src abinit.dep _16_hideleave_ +all: all-am + +.SUFFIXES: +.SUFFIXES: .F90 .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu shared/common/src/16_hideleave/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu shared/common/src/16_hideleave/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) + +lib16_hideleave.a: $(lib16_hideleave_a_OBJECTS) $(lib16_hideleave_a_DEPENDENCIES) $(EXTRA_lib16_hideleave_a_DEPENDENCIES) + $(AM_V_at)-rm -f lib16_hideleave.a + $(AM_V_AR)$(lib16_hideleave_a_AR) lib16_hideleave.a $(lib16_hideleave_a_OBJECTS) $(lib16_hideleave_a_LIBADD) + $(AM_V_at)$(RANLIB) lib16_hideleave.a + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +.F90.o: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ $< + +.F90.obj: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-noinstLIBRARIES cscopelist-am ctags ctags-am distclean \ + distclean-compile distclean-generic distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am + +.PRECIOUS: Makefile + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/GX-PAW/common/src/16_hideleave/_16_hideleave_ b/GX-PAW/common/src/16_hideleave/_16_hideleave_ new file mode 100644 index 00000000..8211ead0 --- /dev/null +++ b/GX-PAW/common/src/16_hideleave/_16_hideleave_ @@ -0,0 +1,20 @@ +!!****d* ABINIT/16_hideleave +!! NAME +!! 16_hideleave +!! +!! DESCRIPTION +!! FIXME: Description is missing +!! +!! COPYRIGHT +!! Copyright (C) 1998-2024 ABINIT group +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! For the initials of contributors, see ~abinit/doc/developers/contributors.txt . +!! +!! CHILDREN +!! interfaces_16_hideleave.F90 +!! m_errors.F90 +!! m_xieee.F90 +!! +!!*** diff --git a/GX-PAW/common/src/16_hideleave/__pycache__/abinit.cpython-36.pyc b/GX-PAW/common/src/16_hideleave/__pycache__/abinit.cpython-36.pyc new file mode 100644 index 00000000..54b889a6 Binary files /dev/null and b/GX-PAW/common/src/16_hideleave/__pycache__/abinit.cpython-36.pyc differ diff --git a/GX-PAW/common/src/16_hideleave/abinit.dep b/GX-PAW/common/src/16_hideleave/abinit.dep new file mode 100644 index 00000000..d1d9e788 --- /dev/null +++ b/GX-PAW/common/src/16_hideleave/abinit.dep @@ -0,0 +1,10 @@ +# Dependencies (inside the directory) of directory 16_hideleave +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. + +CLEANFILES += \ + m_errors.$(MODEXT) \ + m_xieee.$(MODEXT) + diff --git a/GX-PAW/common/src/16_hideleave/abinit.dir b/GX-PAW/common/src/16_hideleave/abinit.dir new file mode 100644 index 00000000..950576bb --- /dev/null +++ b/GX-PAW/common/src/16_hideleave/abinit.dir @@ -0,0 +1,8 @@ +# Dependencies (outside the directory) of directory 16_hideleave +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. + +include_dirs = \ +['10_defs', '11_memory_mpi', '12_hide_mpi', '14_hidewrite'] \ No newline at end of file diff --git a/GX-PAW/common/src/16_hideleave/abinit.src b/GX-PAW/common/src/16_hideleave/abinit.src new file mode 100644 index 00000000..dbaf6800 --- /dev/null +++ b/GX-PAW/common/src/16_hideleave/abinit.src @@ -0,0 +1,23 @@ +# -*- Python -*- +# +# Copyright (C) 2005-2024 ABINIT Group (Yann Pouillon) +# +# This file is part of the ABINIT software package. For license information, +# please see the COPYING file in the top-level directory of the ABINIT source +# distribution. +# + +# +# Source files making up the 1managempi library +# + +# Source file attributes +ABI_SRC_NIL = 0 # No attribute +ABI_SRC_BLT = 1 # The file is built by a script +ABI_SRC_DEP = 2 # The file depends on other files + +# Source files +sources = [ + "m_xieee.F90", + "m_errors.F90" + ] diff --git a/GX-PAW/common/src/16_hideleave/lib16_hideleave.a b/GX-PAW/common/src/16_hideleave/lib16_hideleave.a new file mode 100644 index 00000000..8162bf85 Binary files /dev/null and b/GX-PAW/common/src/16_hideleave/lib16_hideleave.a differ diff --git a/GX-PAW/common/src/16_hideleave/m_errors.F90 b/GX-PAW/common/src/16_hideleave/m_errors.F90 new file mode 100644 index 00000000..d4f4cb0f --- /dev/null +++ b/GX-PAW/common/src/16_hideleave/m_errors.F90 @@ -0,0 +1,1497 @@ +!!****m* ABINIT/m_errors +!! NAME +!! m_errors +!! +!! FUNCTION +!! This module contains low-level procedures to check assertions and handle errors. +!! +!! COPYRIGHT +!! Copyright (C) 2008-2024 ABINIT group (MG,YP,NCJ,MT) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" + +MODULE m_errors + + use defs_basis + use m_profiling_abi + use m_xmpi + use m_specialmsg, only : wrtout +#ifdef HAVE_NETCDF + use netcdf +#endif +#ifdef HAVE_MPI2 + use mpi +#endif +#ifdef FC_NAG + use f90_unix_proc +#endif +#ifdef FC_INTEL + use ifcore +#endif + + use iso_c_binding, only : c_ptr, c_size_t, c_associated + + use m_io_tools, only : flush_unit, lock_and_write, file_exists, num_opened_units, show_units, open_file + use m_fstrings, only : toupper, basename, indent, lstrip, atoi, strcat, itoa + use m_build_info, only : dump_config, abinit_version + use m_cppopts_dumper, only : dump_cpp_options + use m_optim_dumper, only : dump_optim + + implicit none + +#if defined HAVE_MPI1 +include 'mpif.h' +#endif + +#ifdef FC_IBM +include "fexcp.h" +#endif + + private +!!*** + +!Public procedures + public :: assert_eq ! Report and die gracefully if integers not all equal (used for size checking). + public :: assert ! Report and die if any logical is false (used for argument range checking). + public :: sentinel ! Announce the entering or the exiting from a procedure. + public :: die ! Stop execution in case of unexpected events. + public :: msg_hndl ! Basic Error handlers. + public :: netcdf_check ! Stop execution after a NetCDF I/O error + public :: check_mpi_ierr ! Error handler for MPI routines. + public :: set_backtrace_onerr ! Activate show_backtrace call in msg_hndl. 0 to disable it. + !public :: show_backtrace ! Shows a backtrace at an arbitrary place in user code. (Gfortran/Ifort extension) + public :: unused_var ! Helper function used to silence compiler warnings due to unused variables. + public :: bigdft_lib_error + public :: xlf_set_sighandler + public :: abinit_doctor ! Perform checks on memory leaks and leaking file descriptors + ! at the end of the run. + public :: abi_abort ! Abort the code + public :: abi_cabort ! C-interoperable version. + + ! This flag activate the output of the backtrace in msg_hndl + ! Unfortunately, gcc4.9 seems to crash inside this routine + ! hence, for the time being, this optional feature has been disabled + integer, save, private :: m_errors_show_backtrace = 0 + + interface assert_eq + module procedure assert_eq2 + module procedure assert_eq3 + module procedure assert_eq4 + module procedure assert_eqn + end interface assert_eq + + interface assert + module procedure assert1 + module procedure assert2 + module procedure assert3 + module procedure assert4 + module procedure assert_v + end interface assert + + interface unused_var + module procedure unused_int + module procedure unused_real_dp + module procedure unused_real_sp + module procedure unused_cplx_dpc + module procedure unused_cplx_spc + module procedure unused_logical + module procedure unused_logical1B + module procedure unused_ch + module procedure unused_c_ptr + module procedure unused_c_size_t + end interface unused_var + +CONTAINS !=========================================================== +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_errors/assert_eq2 +!! NAME +!! assert_eq2 +!! +!! FUNCTION +!! Report and die gracefully if integers not all equal (used for size checking). +!! +!! INPUTS +!! l1,l2,.. Integers to be checked (array version is also provided) +!! message(len=*)=tag with additional information +!! +!! SOURCE + +function assert_eq2(l1,l2,message,file,line) + +!Arguments ------------------------------------ + integer,intent(in) :: l1,l2 + integer,optional,intent(in) :: line + integer :: assert_eq2 + character(len=*),intent(in) :: message + character(len=*),optional,intent(in) :: file + +!Local variables------------------------------- + integer :: f90line=0 + character(len=500) :: f90name='Subroutine Unknown' + +! ************************************************************************* + + if (l1==l2) then + assert_eq2=l1 + else + if (PRESENT(line)) f90line=line + if (PRESENT(file)) f90name= basename(file) + call msg_hndl(message,'ERROR','PERS',f90name,line) + end if + +end function assert_eq2 +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_errors/assert_eq3 +!! NAME +!! assert_eq3 +!! +!! FUNCTION +!! Report and die gracefully if integers not all equal (used for size checking). +!! +!! INPUTS +!! l1,l2,.. Integers to be checked (array version is also provided) +!! message(len=*)=tag with additional information +!! +!! SOURCE + +function assert_eq3(l1,l2,l3,message,file,line) + +!Arguments ------------------------------------ + integer,intent(in) :: l1,l2,l3 + integer,optional,intent(in) :: line + integer :: assert_eq3 + character(len=*),intent(in) :: message + character(len=*),optional,intent(in) :: file + +!Local variables------------------------------- + integer :: f90line=0 + character(len=500) :: f90name='Subroutine Unknown' +! ************************************************************************* + + if (l1==l2.and.l2==l3) then + assert_eq3=l1 + else + if (PRESENT(line)) f90line=line + if (PRESENT(file)) f90name= basename(file) + call msg_hndl(message,'ERROR','PERS',f90name,line) + end if + +end function assert_eq3 +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_errors/assert_eq4 +!! NAME +!! assert_eq4 +!! +!! FUNCTION +!! Report and die gracefully if integers not all equal (used for size checking). +!! +!! INPUTS +!! l1,l2,.. Integers to be checked (array version is also provided) +!! message(len=*)=tag with additional information +!! +!! SOURCE + +function assert_eq4(l1,l2,l3,l4,message,file,line) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: l1,l2,l3,l4 + integer,optional,intent(in) :: line + integer :: assert_eq4 + character(len=*),intent(in) :: message + character(len=*),optional,intent(in) :: file + +!Local variables------------------------------- + integer :: f90line=0 + character(len=500) :: f90name='Subroutine Unknown' +! ************************************************************************* + + if (l1==l2.and.l2==l3.and.l3==l4) then + assert_eq4=l1 + else + if (PRESENT(line)) f90line=line + if (PRESENT(file)) f90name= basename(file) + call msg_hndl(message,'ERROR','PERS',f90name,line) + end if + +end function assert_eq4 +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_errors/assert_eqn +!! NAME +!! assert_eqn +!! +!! FUNCTION +!! Report and die gracefully if integers not all equal (used for size checking). +!! +!! SOURCE + +function assert_eqn(nn,message,file,line) + +!Arguments ------------------------------------ +!scalars + integer,optional,intent(in) :: line + integer :: assert_eqn + character(len=*),intent(in) :: message + character(len=*),optional,intent(in) :: file +!arrays + integer,intent(in) :: nn(:) + +!Local variables------------------------------- + integer :: f90line=0 + character(len=500) :: f90name='Subroutine Unknown' +! ************************************************************************* + + if (ALL(nn(2:)==nn(1))) then + assert_eqn=nn(1) + else + if (PRESENT(line)) f90line=line + if (PRESENT(file)) f90name= basename(file) + call msg_hndl(message,'ERROR','PERS',f90name,line) + end if + +end function assert_eqn +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_errors/assert1 +!! NAME +!! assert1 +!! +!! FUNCTION +!! Routines for argument checking and error handling. Report and die if +!! any logical is false (used for arg range checking). +!! +!! INPUTS +!! l1,l2,.. logical values to be checked (array version is also provided) +!! message(len=*)=tag with additiona information +!! +!! SOURCE + +subroutine assert1(l1,message,file,line) + +!Arguments ------------------------------------ + integer,optional,intent(in) :: line + character(len=*),intent(in) :: message + character(len=*),optional,intent(in) :: file + logical,intent(in) :: l1 + +!Local variables------------------------------- + integer :: f90line=0 + character(len=500) :: f90name='Subroutine Unknown' +! ************************************************************************* + + if (.not.l1) then + if (PRESENT(line)) f90line=line + if (PRESENT(file)) f90name= basename(file) + call msg_hndl(message,'ERROR','PERS',f90name,f90line) + end if + +end subroutine assert1 +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_errors/assert2 +!! NAME +!! assert2 +!! +!! FUNCTION +!! Routines for argument checking and error handling. Report and die if +! any logical is false (used for arg range checking). +!! +!! INPUTS +!! l1,l2,.. logical values to be checked (array version is also provided) +!! message(len=*)=tag with additional information +!! +!! SOURCE + +subroutine assert2(l1,l2,message,file,line) + +!Arguments ------------------------------------ + integer,optional,intent(in) :: line + character(len=*),intent(in) :: message + character(len=*),optional,intent(in) :: file + logical,intent(in) :: l1,l2 + +!Local variables------------------------------- + integer :: f90line=0 + character(len=500) :: f90name='Subroutine Unknown' +! ************************************************************************* + + if (.not.(l1.and.l2)) then + if (PRESENT(line)) f90line=line + if (PRESENT(file)) f90name= basename(file) + call msg_hndl(message,'ERROR','PERS',f90name,f90line) + end if + +end subroutine assert2 +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_errors/assert3 +!! NAME +!! assert3 +!! +!! FUNCTION +!! Routines for argument checking and error handling. Report and die if +!! any logical is false (used for arg range checking). +!! +!! INPUTS +!! l1,l2,.. logical values to be checked (array version is also provided) +!! message(len=*)=tag with additional information +!! +!! SOURCE + +subroutine assert3(l1,l2,l3,message,file,line) + +!Arguments ------------------------------------ + integer,optional,intent(in) :: line + character(len=*),intent(in) :: message + character(len=*),optional,intent(in) :: file + logical,intent(in) :: l1,l2,l3 + +!Local variables------------------------------- + integer :: f90line=0 + character(len=500) :: f90name='Subroutine Unknown' +! ************************************************************************* + + if (.not.(l1.and.l2.and.l3)) then + if (PRESENT(line)) f90line=line + if (PRESENT(file)) f90name= basename(file) + call msg_hndl(message,'ERROR','PERS',f90name,f90line) + end if + +end subroutine assert3 +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_errors/assert4 +!! NAME +!! assert4 +!! +!! FUNCTION +!! Routines for argument checking and error handling. Report and die if +!! any logical is false (used for arg range checking). +!! +!! INPUTS +!! l1,l2,.. logical values to be checked (array version is also provided) +!! message(len=*)=tag with additional information +!! +!! SOURCE + +subroutine assert4(l1,l2,l3,l4,message,file,line) + +!Arguments ------------------------------------ + integer,optional,intent(in) :: line + character(len=*),intent(in) :: message + character(len=*),optional,intent(in) :: file + logical,intent(in) :: l1,l2,l3,l4 + +!Local variables------------------------------- + integer :: f90line=0 + character(len=500) :: f90name='Subroutine Unknown' +! ************************************************************************* + + if (.not.(l1.and.l2.and.l3.and.l4)) then + if (PRESENT(line)) f90line=line + if (PRESENT(file)) f90name= basename(file) + call msg_hndl(message,'ERROR','PERS',f90name,f90line) + end if + +end subroutine assert4 +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_errors/assert_v +!! NAME +!! assert_v +!! +!! FUNCTION +!! Routines for argument checking and error handling. Report and die if +!! any logical is false (used for arg range checking). +!! +!! SOURCE + +subroutine assert_v(n,message,file,line) + +!Arguments ------------------------------------ + integer,optional,intent(in) :: line + character(len=*),intent(in) :: message + character(len=*),optional,intent(in) :: file + logical,intent(in) :: n(:) + +!Local variables------------------------------- + integer :: f90line=0 + character(len=500) :: f90name='Subroutine Unknown' +! ************************************************************************* + + if (.not.ALL(n)) then + if (PRESENT(line)) f90line=line + if (PRESENT(file)) f90name= basename(file) + call msg_hndl(message,'ERROR','PERS',f90name,f90line) + end if + +end subroutine assert_v +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_errors/netcdf_check +!! NAME +!! netcdf_check +!! +!! FUNCTION +!! Error handler for Netcdf calls. +!! +!! INPUTS +!! ncerr=Status error returned by the Netcdf library. +!! msg=User-defined string with info on the action that was performed +!! file= name of the file. +!! line= line number. +!! +!! NOTES +!! This routine is usually interfaced with the macros defined in abi_common.h +!! +!! SOURCE + +subroutine netcdf_check(ncerr, msg, file, line) + +!Arguments ------------------------------------ + integer,intent(in) :: ncerr + character(len=*),intent(in) :: msg + character(len=*),optional,intent(in) :: file + integer,optional,intent(in) :: line + +!Local variables------------------------------- + integer :: f90line + character(len=500) :: f90name + character(len=1024) :: nc_msg + character(len=2048) :: my_msg + +! ************************************************************************* + +#ifdef HAVE_NETCDF + if (ncerr /= NF90_NOERR) then + + f90line = 0; if (present(line)) f90line = line + f90name = 'Subroutine Unknown'; if (present(file)) f90name = basename(file) + + ! Append netcdf string to user-defined message. + write(nc_msg,'(3a)')' - NetCDF library returned: `', trim(nf90_strerror(ncerr)),"`" + my_msg = trim(msg) // trim(nc_msg) + + call msg_hndl(my_msg, "ERROR", "PERS", f90name, f90line) + end if +#endif + +end subroutine netcdf_check +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_errors/sentinel +!! NAME +!! sentinel +!! +!! FUNCTION +!! Announce the entering and the exiting from a function. Useful for poor-man debugging. +!! +!! INPUTS +!! level=1 when entering, 2 for exit. +!! mode_paral= ['COLL'|'PERS'|'COLL_SILENT|PERS_SILENT'] +!! 'COLL' and 'PERS' refer to the output mode used in wrtout to report the message. +!! 'COLL_SILENT' and 'PERS_SILENT' can be used if the procedure is called several times inside a loop. +!! In this case sentinel will report only the first entry and the first exit using either 'COLL' or 'PERS' mode. +!! file=File name +!! func=Name of the procedure to be tested (passed through ABI_FUNC macro) +!! [line]=Line number. Defaults to 0. +!! +!! NOTES +!! This routine is usually interfaced with the macros defined in abi_common.h +!! +!! SOURCE + +subroutine sentinel(level,mode_paral,file,func,line) + +!Arguments ------------------------------------ + integer,intent(in) :: level + integer,optional,intent(in) :: line + character(len=*),intent(in) :: mode_paral + character(len=*),optional,intent(in) :: func + character(len=*),optional,intent(in) :: file + +!Local variables------------------------------- + integer,save :: level_save=0 + integer :: ii + integer :: f90line + character(len=500),save :: func_save + character(len=4) :: my_mode + character(len=10) :: lnum + character(len=500) :: my_func, my_file + character(len=500) :: msg + +! ********************************************************************* + + ! initialize the variable + my_func = 'Function Unknown'; if (PRESENT(func)) my_func = basename(func) + my_file = "File Unknown"; if (PRESENT(file)) my_file = basename(file) + + level_save=level; func_save=my_func + + f90line=0; if (PRESENT(line)) f90line=line + + if (toupper(mode_paral)=='COLL_SILENT'.or.toupper(mode_paral)=='PERS_SILENT') then + ! * Silent mode, check if we are inside a loop. + if (level==level_save .and. my_func==func_save) RETURN + ii = index( toupper(mode_paral), '_SILENT') + my_mode=toupper(mode_paral(1:ii-1)) + else ! * Normal mode. + my_mode=mode_paral + end if + + if (my_mode/='COLL'.or.my_mode/='PERS') my_mode='COLL' + + write(lnum,"(i0)")f90line + my_func= TRIM(my_func)//"@"//TRIM(my_file)//":"//TRIM(lnum) + + if (level==1) then + msg = ' '//TRIM(my_func)//' >>>>> ENTER'//ch10 + else if (level==2) then + msg = ' '//TRIM(my_func)//' >>>>> EXIT '//ch10 + else + call die('Wrong level', & +& __FILE__,& +& __LINE__) + end if + + call wrtout(std_out,msg,my_mode) + call flush_unit(std_out) + +end subroutine sentinel +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_errors/die +!! NAME +!! die +!! +!! FUNCTION +!! Stop smoothly the execution in case of unexpected events reporting the +!! line number and the file name where the error occurred as well as the +!! MPI rank of the processor. This routine is usually interfaced through +!! some macro defined in abi_common.h +!! +!! INPUTS +!! message=String containing additional information on the nature of the problem +!! line=Line number of the file where problem occurred +!! f90name=Name of the f90 file containing the caller +!! +!! SOURCE + +subroutine die(message,file,line) + +!Arguments ------------------------------------ + integer,optional,intent(in) :: line + character(len=*),intent(in) :: message + character(len=*),optional,intent(in) :: file + +!Local variables------------------------------- + integer :: rank + integer :: f90line=0 + character(len=10) :: lnum,strank + character(len=500) :: f90name='Subroutine Unknown' + character(len=500) :: msg + +! ********************************************************************* + + if (PRESENT(line)) f90line=line + write(lnum,"(i0)")f90line + + ! === Determine my rank inside MPI_COMM_WORLD === + rank = xmpi_comm_rank(xmpi_world) + write(strank,"(i0)")rank + + if (PRESENT(file)) f90name= basename(file) + msg=TRIM(f90name)//':'//TRIM(lnum)//' P'//TRIM(strank) + + write(msg,'(a,2x,2a,2x,a)')ch10,TRIM(msg),ch10,TRIM(message) + + call wrtout(std_out,msg,'PERS') + !if is_connected(ab_out)) call wrtout(ab_out,msg,'PERS') + call abi_abort('PERS') + +end subroutine die +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_errors/msg_hndl +!! NAME +!! msg_hndl +!! +!! FUNCTION +!! Basic error handler for abinit. This routine is usually interfaced through some macro defined in abi_common.h +!! +!! INPUTS +!! message=string containing additional information on the nature of the problem +!! level=string defining the type of problem. Possible values are +!! COMMENT +!! WARNING +!! ERROR +!! STOP +!! BUG +!! mode_paral=Either "COLL" or "PERS". +!! [line] = line number of the file where problem occurred +!! [file] = name of the f90 file containing the caller +!! [NODUMP]= if present dump config before stopping +!! [NOSTOP]= if present don't stop even in the case of an error or a bug +!! [unit]= Unit number (defaults to std_out) +!! +!! OUTPUT +!! +!! SOURCE + +subroutine msg_hndl(message, level, mode_paral, file, line, NODUMP, NOSTOP, unit) + +!Arguments ------------------------------------ + integer,optional,intent(in) :: line, unit + logical,optional,intent(in) :: NODUMP,NOSTOP + character(len=*),intent(in) :: level,message + character(len=*),optional,intent(in) :: file + character(len=*),intent(in) :: mode_paral + +!Local variables------------------------------- + integer :: f90line,ierr,unit_ + logical :: is_open_unit + character(len=10) :: lnum + character(len=500) :: f90name + character(len=LEN(message)) :: my_msg + character(len=MAX(4*LEN(message),2000)) :: sbuf ! Increase size and keep fingers crossed! + +! ********************************************************************* + unit_ = std_out; if (present(unit)) unit_ = unit + + if (PRESENT(line)) then + f90line=line + else + f90line=0 + end if + ! TODO: fldiff.py should ignore f90line when comparing files (we don't want to + ! update ref files if a new line is added to F90 source file! + if (unit_ == ab_out) f90line = 0 + write(lnum,"(i0)")f90line + + if (PRESENT(file)) then + f90name = basename(file) + else + f90name='Subroutine Unknown' + end if + + my_msg = lstrip(message) + + select case (toupper(level)) + + case ('COMMENT', 'WARNING') + + write(sbuf,'(8a,i0,7a)')ch10,& + "--- !",TRIM(level),ch10,& + "src_file: ",TRIM(f90name),ch10,& + "src_line: ",f90line,ch10,& + "message: |",ch10,TRIM(indent(my_msg)),ch10,& + "...",ch10 + call wrtout(unit_, sbuf, mode_paral) + + case ('STOP') + + write(sbuf,'(9a)')ch10,& + "--- !",TRIM(level),ch10,& + "message: |",ch10,TRIM(indent(my_msg)),ch10,"..." + call wrtout(unit_, sbuf, mode_paral, do_flush=.True.) + if (.not.present(NOSTOP)) call abi_abort(mode_paral, print_config=.FALSE.) + + case default + ! ERROR' or 'BUG' + if ((.not.present(NOSTOP)).and.(.not.present(NODUMP))) then + ! Dump the backtrace if the compiler supports it. + if (m_errors_show_backtrace == 1) call show_backtrace() + end if + + write(sbuf,'(8a,i0,2a,i0,7a)')ch10,& + "--- !",TRIM(level),ch10,& + "src_file: ",TRIM(f90name),ch10,& + "src_line: ",f90line,ch10,& + "mpi_rank: ",xmpi_comm_rank(xmpi_world),ch10,& + "message: |",ch10,TRIM(indent(my_msg)),ch10,& + "...",ch10 + call wrtout(unit_, sbuf, mode_paral) + + ! Write error message to ab_out is unit is connected. + inquire(unit=ab_out, opened=is_open_unit) + if (is_open_unit) call wrtout(ab_out, sbuf) !, mode_paral="PERS") + + if (.not.present(NOSTOP)) then + ! The first MPI proc that gets here, writes the ABI_MPIABORTFILE with the message! + ! The file is written only if nprocs > 1. Do not change this behaviour! + if (.not. file_exists(ABI_MPIABORTFILE) .and. xmpi_comm_size(xmpi_world) > 1) then + call lock_and_write(ABI_MPIABORTFILE, sbuf, ierr) + end if + ! And now we die! + call abi_abort(mode_paral, print_config=.FALSE.) + end if + + end select + +end subroutine msg_hndl +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_errors/set_backtrace_onerr +!! NAME +!! set_backtrace_onerr +!! +!! FUNCTION +!! 1 to activate show_backtrace call in msg_hndl. 0 to disable it +!! +!! SOURCE + +subroutine set_backtrace_onerr(iflag) + +!Arguments ------------------------------------ + integer,intent(in) :: iflag +! ********************************************************************* + + m_errors_show_backtrace = iflag + +end subroutine set_backtrace_onerr +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_errors/show_backtrace +!! NAME +!! show_backtrace +!! +!! FUNCTION +!! shows a backtrace at an arbitrary place in user code. +!! Program execution continues normally afterwards. +!! The backtrace information is printed to the unit corresponding to ERROR_UNIT in ISO_FORTRAN_ENV. +!! This is a (Gfortran extension| Ifort Extension) +!! +!! SOURCE + +subroutine show_backtrace() + +#if defined FC_GNU && defined HAVE_FC_BACKTRACE + call backtrace() ! Gfortran extension + +#elif defined FC_INTEL + call TRACEBACKQQ(USER_EXIT_CODE=-1) ! Ifort extension +#endif + +end subroutine show_backtrace +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_errors/check_mpi_ierr +!! NAME +!! check_mpi_ierr +!! +!! FUNCTION +!! Basic error handler for MPI calls. This routine is usually interfaced through some macro defined in abi_common.h +!! +!! INPUTS +!! ierr=Exit status reported by an MPI call. +!! line=line number of the file where problem occurred +!! file=name of the f90 file containing the caller +!! +!! OUTPUT +!! Write error message thep stop execution. +!! +!! SOURCE + +subroutine check_mpi_ierr(ierr, msg, file, line) + +!Arguments ------------------------------------ + integer,intent(in) :: ierr + integer,optional,intent(in) :: line + character(len=*),intent(in) :: msg + character(len=*),optional,intent(in) :: file + +!Local variables------------------------------- + integer,parameter :: mpi_msg_len=1000 + integer :: f90line,ilen,ierr2 + character(len=500) :: f90name='Subroutine Unknown' + character(len=mpi_msg_len) :: mpi_msg_error + character(len=mpi_msg_len+500) :: my_msg +! ********************************************************************* + +#ifdef HAVE_MPI + if (ierr==MPI_SUCCESS) RETURN + call MPI_ERROR_STRING(ierr, mpi_msg_error, ilen, ierr2) +#else + ilen=0; ierr2=0 + mpi_msg_error = " Check_mpi_ierr should not be called in non-MPI mode!" + if (ierr==0) RETURN +#endif + + if (ilen>mpi_msg_len) write(std_out,*)" Warning_ MPI message has been truncated!" + if (ierr2/=0) write(std_out,*)" Warning: MPI_ERROR_STRING returned ierr2= ",ierr2 + + f90line=0; if (PRESENT(line)) f90line=line + if (PRESENT(file)) f90name = basename(file) + my_msg = TRIM(msg)//ch10//TRIM(mpi_msg_error) + + call msg_hndl(my_msg,"ERROR","PERS",file=f90name,line=f90line) + +end subroutine check_mpi_ierr +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_errors/unused_int +!! NAME +!! unused_int +!! +!! FUNCTION +!! Helper function used to silence compiler warnings due to unused variables. +!! Interfaced via the ABI_UNUSED macro. +!! +!! INPUTS +!! var=Scalar integer value +!! +!! OUTPUT +!! None +!! +!! SOURCE + +elemental subroutine unused_int(var) + +!Arguments ------------------------------------ + integer,intent(in) :: var + +!Local variables------------------------------- + integer :: dummy +! ********************************************************************* + + dummy = var + +end subroutine unused_int +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_errors/unused_real_dp +!! NAME +!! unused_real_dp +!! +!! FUNCTION +!! Helper function used to silence warning messages due to unused variables. +!! Interfaced via the ABI_UNUSED macro. +!! +!! INPUTS +!! var=Scalar real value. +!! +!! OUTPUT +!! None +!! +!! SOURCE + +elemental subroutine unused_real_dp(var) + +!Arguments ------------------------------------ + real(dp),intent(in) :: var + +!Local variables------------------------------- + real(dp) :: dummy +! ********************************************************************* + + dummy = var + +end subroutine unused_real_dp +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_errors/unused_real_sp +!! NAME +!! unused_real_sp +!! +!! FUNCTION +!! Helper function used to silence compiler warnings due to unused variables. +!! Interfaced via the ABI_UNUSED macro. Target: one-dimensional real(dp) vector. +!! +!! SOURCE + +elemental subroutine unused_real_sp(var) + +!Arguments ------------------------------------ + real(sp),intent(in) :: var + +!Local variables------------------------------- + real(sp) :: dummy +! ********************************************************************* + + dummy = var + +end subroutine unused_real_sp +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_errors/unused_cplx_spc +!! NAME +!! unused_cplx_spc +!! +!! FUNCTION +!! Helper function used to silence compiler warnings due to unused variables. +!! Interfaced via the ABI_UNUSED macro. +!! +!! INPUTS +!! var=Scalar complex value +!! +!! OUTPUT +!! None +!! +!! SOURCE + +elemental subroutine unused_cplx_spc(var) + +!Arguments ------------------------------------ + complex(spc),intent(in) :: var + +!Local variables------------------------------- + complex(spc) :: dummy +! ********************************************************************* + + dummy = var + +end subroutine unused_cplx_spc +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_errors/unused_cplx_dpc +!! NAME +!! unused_cplx_dpc +!! +!! FUNCTION +!! Helper function used to silence compiler warnings due to unused variables. +!! Interfaced via the ABI_UNUSED macro. +!! +!! INPUTS +!! var=Scalar complex value +!! +!! OUTPUT +!! None +!! +!! SOURCE + +elemental subroutine unused_cplx_dpc(var) + +!Arguments ------------------------------------ + complex(dpc),intent(in) :: var + +!Local variables------------------------------- + complex(dpc) :: dummy +! ********************************************************************* + + dummy = var + +end subroutine unused_cplx_dpc +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_errors/unused_logical +!! NAME +!! unused_logical +!! +!! FUNCTION +!! Helper function used to silence compiler warnings due to unused variables. +!! Interfaced via the ABI_UNUSED macro. +!! +!! INPUTS +!! var=Scalar logical value +!! +!! OUTPUT +!! None +!! +!! SOURCE + +elemental subroutine unused_logical(var) + +!Arguments ------------------------------------ + logical,intent(in) :: var + +!Local variables------------------------------- + logical :: dummy +! ********************************************************************* + + dummy = var + +end subroutine unused_logical +!!*** + +!!****f* m_errors/unused_logical1B +!! NAME +!! unused_logical1B +!! +!! FUNCTION +!! Helper function used to silence compiler warnings due to unused variables. +!! Interfaced via the ABI_UNUSED macro. +!! +!! INPUTS +!! var= 1 Byte Scalar logical value +!! +!! OUTPUT +!! None +!! +!! SOURCE + +elemental subroutine unused_logical1B(var) + +!Arguments ------------------------------------ + logical*1,intent(in) :: var + +!Local variables------------------------------- + logical :: dummy +! ********************************************************************* + + dummy = var + +end subroutine unused_logical1B +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_errors/unused_ch +!! NAME +!! unused_ch +!! +!! FUNCTION +!! Helper function used to silence compiler warnings due to unused variables. +!! Interfaced via the ABI_UNUSED macro. +!! +!! INPUTS +!! var=Scalar character value +!! +!! OUTPUT +!! None +!! +!! SOURCE + +elemental subroutine unused_ch(var) + +!Arguments ------------------------------------ + character(len=*),intent(in) :: var + +!Local variables------------------------------- + character(len=LEN(var)) :: dummy +! ********************************************************************* + + dummy = var + +end subroutine unused_ch +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_errors/unused_c_ptr +!! NAME +!! unused_c_ptr +!! +!! FUNCTION +!! Helper function used to silence compiler warnings due to unused variables. +!! Interfaced via the ABI_UNUSED macro. +!! +!! INPUTS +!! var=type(c_ptr) value +!! +!! OUTPUT +!! None +!! +!! SOURCE + +elemental subroutine unused_c_ptr(var) + +!Arguments ------------------------------------ +type(c_ptr), intent(IN) :: var + +!Local variables------------------------------- +#ifdef FC_NAG +logical :: dummy +#else +type(c_ptr) :: dummy +#endif +! ********************************************************************* + +#ifdef FC_NAG +if (.false.) dummy = c_associated(var) +#else +dummy = var +#endif + +end subroutine unused_c_ptr +!!*** + + +!---------------------------------------------------------------------- + +!!****f* m_errors/unused_c_size_t +!! NAME +!! unused_c_size_t +!! +!! FUNCTION +!! Helper function used to silence compiler warnings due to unused variables. +!! Interfaced via the ABI_UNUSED macro. +!! +!! INPUTS +!! var=type(c_size_t) value +!! +!! OUTPUT +!! None +!! +!! SOURCE + +elemental subroutine unused_c_size_t(var) + +!Arguments ------------------------------------ +integer(kind=c_size_t), intent(IN) :: var + +!Local variables------------------------------- +integer(kind=c_size_t) :: dummy +! ********************************************************************* + + dummy = var + +end subroutine unused_c_size_t +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_errors/bigdft_lib_error +!! NAME +!! bigdft_lib_error +!! +!! FUNCTION +!! Stop the code if bigdft library has not been enabled. +!! Interfaced with the CPP macro BIGDFT_NOTENABLED_ERROR +!! +!! INPUTS +!! line=line number of the file where problem occurred +!! file=name of the f90 file containing the caller +!! +!! SOURCE + +subroutine bigdft_lib_error(file,line) + +!Arguments ------------------------------------ + integer,optional,intent(in) :: line + character(len=*),optional,intent(in) :: file + +!Local variables------------------------------- + character(len=500) :: message + +! ********************************************************************* + + write(message,'(4a)') ch10,& +& ' BigDFT support has not been enabled.', ch10, & +& ' Action, used the flag --enable-bigdft when configuring.' + + if (PRESENT(file) .and. PRESENT(line)) then + call msg_hndl(message,"ERROR","PERS",file=file,line=line) + else + call msg_hndl(message,"ERROR", "PERS") + end if + +end subroutine bigdft_lib_error +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_errors/xlf_set_sighandler +!! NAME +!! xlf_set_sighandler +!! +!! FUNCTION +!! Set the signal handler for IBM XLF +!! +!! NOTES +!! See http://publib.boulder.ibm.com/infocenter/compbgpl/v9v111/index.jsp?topic=/com.ibm.xlf111.bg.doc/xlfopg/fptrap.htm +!! The XL Fortran exception handlers and related routines are: +!! xl__ieee +!! Produces a traceback and an explanation of the signal and continues execution by supplying the default IEEE result +!! for the failed computation. This handler allows the program to produce the same results as if exception detection was not turned on. +!! xl__trce +!! Produces a traceback and stops the program. +!! xl__trcedump +!! Produces a traceback and a core file and stops the program. +!! xl__sigdump +!! Provides a traceback that starts from the point at which it is called and provides information about the signal. +!! You can only call it from inside a user-written signal handler. +!! It does not stop the program. To successfully continue, the signal handler must perform some cleanup after calling this subprogram. +!! xl__trbk +!! Provides a traceback that starts from the point at which it is called. +!! You call it as a subroutine from your code, rather than specifying it with the -qsigtrap option. It requires no parameters. It does not stop the program. +!! +!! SOURCE + +subroutine xlf_set_sighandler() + +! ************************************************************************* + +#ifdef FC_IBM + call SIGNAL(SIGTRAP, xl__trcedump) + call SIGNAL(SIGFPE, xl__trcedump) +#endif + +end subroutine xlf_set_sighandler +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_errors/abinit_doctor +!! NAME +!! abinit_doctor +!! +!! FUNCTION +!! Perform checks on memory leaks and leaking file descriptors at the end of the run. +!! +!! INPUTS +!! prefix=Prefix for output file (usually "__nameofprogram" e.g. __cut3d) +!! [print_mem_report]=0 to disable the test on memory leaks (used in Abinit if bigdft is activated). +!! Default: 1, i.e. memory check is always activated. +!! +!! SOURCE + +subroutine abinit_doctor(prefix, print_mem_report) + +!Arguments ------------------------------------ + integer,optional,intent(in) :: print_mem_report + character(len=*),intent(in) :: prefix + +!Local variables------------------------------- +!scalars + integer,parameter :: master=0 + integer :: do_mem_report, my_rank + character(len=5000) :: msg +#ifdef HAVE_MEM_PROFILING + integer :: ii,ierr,unt + integer(i8b) :: memtot, nalloc, nfree, nalloc_c, nfree_c + character(len=fnlen) :: path + character(len=5000) :: errmsg +#endif + +! ************************************************************************* + + do_mem_report = 1; if (present(print_mem_report)) do_mem_report = print_mem_report + my_rank = xmpi_comm_rank(xmpi_world) + +#ifdef HAVE_MEM_PROFILING + errmsg = ""; ierr = 0 + + ! Test on memory leaks. + call abimem_get_info(nalloc, nfree, memtot, nalloc_c, nfree_c) + call abimem_shutdown() + + if (do_mem_report == 1) then + + ! Check memory allocated in C. + if (nalloc_c == nfree_c) then + write(msg,'(2a, 2(a,i0), a)') & + '- [ALL OK] MEMORY CONSUMPTION REPORT FOR C CODE:',ch10, & + '- There were ',nalloc_c,' allocations and ',nfree_c,' deallocations in C code' + else + ! This msg will make the test fail if the memory leak occurs on master (no dash in the first column) + write(msg,'(2a,2(a,i0),3a)') & + 'MEMORY CONSUMPTION REPORT FOR C CODE:',ch10, & + ' There were ',nalloc_c,' allocations and ',nfree_c,' deallocations in C code',ch10, & + " Check your C code for memory leaks. Note that the abimem.py script does not support allocations in C" + ! And this will make the code call mpi_abort if the leak occurs on my_rank != master + ierr = ierr + 1 + errmsg = strcat(errmsg, ch10, msg) + end if + if (my_rank == master) call wrtout(ab_out, msg) + call wrtout(std_out, msg) + + ! Check memory allocated in Fortran. + if (nalloc == nfree .and. memtot == 0) then + write(msg,'(3a,i0,a,i0,3a,i0)') & + '- [ALL OK] MEMORY CONSUMPTION REPORT FOR FORTRAN CODE:',ch10, & + '- There were ',nalloc,' allocations and ',nfree,' deallocations in Fortran',ch10, & + '- Remaining memory at the end of the calculation is ',memtot + else + ! This msg will make the test fail if the memory leak occurs on master (no dash in the first column) + write(msg,'(2a,2(a,i0),3a,f12.4,1x,11a)') & + 'MEMORY CONSUMPTION REPORT FOR FORTRAN CODE:',ch10, & + ' There were ',nalloc,' allocations and ',nfree,' deallocations in Fortran',ch10, & + ' Remaining memory at the end of the calculation: ',memtot * b2Mb, " (Mb)", ch10, & + ' As a help for debugging, you might set call abimem_init(2) in the main program,', ch10, & + ' or use the command line option `abinit run.abi --abimem-level 2`', ch10, & + ' then use tests/Scripts/abimem.py to analyse the file abimem_rank[num].mocc that has been created,',ch10, & + ' e.g. from tests/Scripts issue the command: ./abimem.py leaks ..///abimem_rank0.mocc',ch10, & + ' Note that abimem files can easily be multiple GB in size so do not use this option normally!' + ! And this will make the code call mpi_abort if the leak occurs on my_rank != master + ierr = ierr + 1 + errmsg = strcat(errmsg, ch10, msg) + end if + + else + write(msg,'(3a)') & + '- MEMORY CONSUMPTION REPORT:',ch10, & + '- Memory profiling is activated but not yet usable when bigdft is used' + end if + if (my_rank == master) call wrtout(ab_out, msg) + call wrtout(std_out, msg) + + ! Test whether all logical units have been closed. + ! If you wonder why I'm doing this, remember that there's a per-user + ! limit on the maximum number of open file descriptors. Hence descriptors + ! represent a precious resource and we should close them as soon as possible. + ii = num_opened_units(ignore=[std_err, std_in, std_out, ab_out]) + if (ii > 0) then + path = strcat(prefix, "_lunits_rank", itoa(my_rank), ".flun") + if (open_file(path, msg, newunit=unt) /= 0) then + ABI_ERROR(msg) + end if + call show_units(unt) + close(unt) + write(msg, "(a,i0,2a)")"Leaking ",ii," Fortran logical units. See: ",trim(path) + errmsg = strcat(errmsg, ch10, msg) + ierr = ierr + 1 + if (my_rank == master) call wrtout(ab_out, msg) + call wrtout(std_out, msg) + end if + + call xmpi_barrier(xmpi_world) + if (ierr /= 0) then + ABI_ERROR(errmsg) + end if + +#else + ABI_UNUSED(prefix) +#endif + + ! Check for pending requests. + if (xmpi_count_requests /= 0) then + write(msg, "(a,i0,a)")"Leaking ", xmpi_count_requests, " MPI requests at the end of the run" + ABI_WARNING(msg) +#ifdef HAVE_MEM_PROFILING + ABI_ERROR(msg) +#endif + end if + +end subroutine abinit_doctor +!!*** + +!!****f* m_errors/abi_abort +!! NAME +!! abi_abort +!! +!! FUNCTION +!! Routine for clean exit of f90 code, taking into account possible parallelization. +!! +!! Note the this routine is private and should never be called explicitly. +!! Please, use the macros: +!! MSG_ERROR, MSG_BUG +!! defined in abi_common.h to abort the execution. +!! XG : this is not true, in very rare cases, ABINIT has to exit without giving an error (e.g. for non-zero prtkpt ) +!! +!! INPUTS +!! exit_status=(optional, default=1 or -1, see below) the return code of the routine +!! mode_paral= +!! 'COLL' if all procs are calling the routine with the same message to be +!! written once only or +!! 'PERS' if the procs are calling the routine with different mesgs +!! each to be written, or if one proc is calling the routine +!! print_config=(optional, default=true) +!! if true print out several information before leaving +!! +!! OUTPUT +!! (only writing, then stop) +!! +!! NOTES +!! By default, it uses "call exit(1)", that is not completely portable. +!! +!! SOURCE + +subroutine abi_abort(mode_paral,exit_status,print_config) + +!Arguments ------------------------------------ + character(len=4),intent(in) :: mode_paral + integer,intent(in),optional :: exit_status + logical,intent(in),optional :: print_config + +!Local variables------------------------------- + logical :: print_config_ + +! ********************************************************************** + + call wrtout(std_out, ch10//' abinit_abort: decision taken to exit. Check above messages for more info', 'PERS') + + ! Caveat: Do not use MPI collective calls! + if (mode_paral == "COLL") then + call wrtout(std_out,"Why are you using COLL? Are you sure that ALL the processors are calling abi_abort?") + end if + + ! Dump configuration before exiting + print_config_=.False.; if (present(print_config)) print_config_=print_config + if (print_config_) then + call print_kinds() + call xmpi_show_info() + call dump_config(std_out) + end if + + if (present(exit_status)) then + call xmpi_abort(exit_status=exit_status) + else + call xmpi_abort() + end if + +end subroutine abi_abort +!!*** + +!!****f* m_errors/abi_cabort +!! NAME +!! abi_cabort +!! +!! FUNCTION +!! C-interoperable version of abi_abort + +subroutine abi_cabort() bind(C, name='abi_cabort') + + call abi_abort("COLL", exit_status=1, print_config=.False.) + +end subroutine abi_cabort +!!*** + +END MODULE m_errors +!!*** diff --git a/GX-PAW/common/src/16_hideleave/m_errors.o b/GX-PAW/common/src/16_hideleave/m_errors.o new file mode 100644 index 00000000..498e1b67 Binary files /dev/null and b/GX-PAW/common/src/16_hideleave/m_errors.o differ diff --git a/GX-PAW/common/src/16_hideleave/m_xieee.F90 b/GX-PAW/common/src/16_hideleave/m_xieee.F90 new file mode 100644 index 00000000..e822a3cf --- /dev/null +++ b/GX-PAW/common/src/16_hideleave/m_xieee.F90 @@ -0,0 +1,123 @@ +!!****m* ABINIT/m_xieee +!! NAME +!! m_xieee +!! +!! FUNCTION +!! Debugging tools and helper functions providing access to IEEE exceptions +!! +!! COPYRIGHT +!! Copyright (C) 2014-2024 ABINIT group (MG) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! NOTES +!! See F2003 standard and http://www.nag.com/nagware/np/r51_doc/ieee_exceptions.html +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" + +module m_xieee + +#ifdef HAVE_FC_IEEE_EXCEPTIONS + !use, intrinsic :: ieee_exceptions + use ieee_exceptions +#endif + + implicit none + + private + + public :: xieee_halt_ifexc ! Halt the code if one of the *usual* IEEE exceptions is raised. + public :: xieee_signal_ifexc ! Signal if any IEEE exception is raised. + + integer,private,parameter :: std_out = 6 + +contains +!!*** + +!!****f* m_xieee/xieee_halt_ifexc +!! NAME +!! xieee_halt_ifexc +!! +!! FUNCTION +!! Halt the code if one of the *usual* IEEE exceptions is raised. +!! +!! INPUTS +!! halt= If the value is true, the exceptions will cause halting; otherwise, execution will continue after this exception. +!! +!! SOURCE + +subroutine xieee_halt_ifexc(halt) + +!Arguments ------------------------------------ +!scalars + logical,intent(in) :: halt +! ************************************************************************* + +#ifdef HAVE_FC_IEEE_EXCEPTIONS + ! Possible Flags: ieee_invalid, ieee_overflow, ieee_divide_by_zero, ieee_inexact, and ieee_underflow + if (ieee_support_halting(ieee_invalid)) then + call ieee_set_halting_mode(ieee_invalid, halt) + end if + if (ieee_support_halting(ieee_overflow)) then + call ieee_set_halting_mode(ieee_overflow, halt) + end if + if (ieee_support_halting(ieee_divide_by_zero)) then + call ieee_set_halting_mode(ieee_divide_by_zero, halt) + end if + !if (ieee_support_halting(ieee_inexact)) then + ! call ieee_set_halting_mode(ieee_inexact, halt) + !end if + !if (ieee_support_halting(ieee_underflow)) then + ! call ieee_set_halting_mode(ieee_underflow, halt) + !end if +#else + write(std_out,*)"Cannot set halting mode to: ",halt +#endif + +end subroutine xieee_halt_ifexc +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_xieee/xieee_signal_ifexc +!! NAME +!! xieee_signal_ifexc +!! +!! FUNCTION +!! Signal if one of the *usual* IEEE exceptions is raised. + +!! INPUTS +!! flag= If the value is true, the exceptions will be signalled +!! +!! SOURCE + +subroutine xieee_signal_ifexc(flag) + +!Arguments ------------------------------------ +!scalars + logical,intent(in) :: flag +! ************************************************************************* + +#ifdef HAVE_FC_IEEE_EXCEPTIONS + ! Possible Flags: ieee_invalid, ieee_overflow, ieee_divide_by_zero, ieee_inexact, and ieee_underflow + call ieee_set_flag(ieee_invalid, flag) + call ieee_set_flag(ieee_overflow, flag) + call ieee_set_flag(ieee_divide_by_zero, flag) + call ieee_set_flag(ieee_inexact, flag) + call ieee_set_flag(ieee_underflow, flag) +#else + write(std_out,*)"Cannot set signal flag to: ",flag +#endif + +end subroutine xieee_signal_ifexc +!!*** + +end module m_xieee +!!*** diff --git a/GX-PAW/common/src/16_hideleave/m_xieee.o b/GX-PAW/common/src/16_hideleave/m_xieee.o new file mode 100644 index 00000000..a09f0ebb Binary files /dev/null and b/GX-PAW/common/src/16_hideleave/m_xieee.o differ diff --git a/GX-PAW/common/src/16_kokkos_toolbox/.deps/kokkos_utils.Po b/GX-PAW/common/src/16_kokkos_toolbox/.deps/kokkos_utils.Po new file mode 100644 index 00000000..9ce06a81 --- /dev/null +++ b/GX-PAW/common/src/16_kokkos_toolbox/.deps/kokkos_utils.Po @@ -0,0 +1 @@ +# dummy diff --git a/GX-PAW/common/src/16_kokkos_toolbox/Makefile b/GX-PAW/common/src/16_kokkos_toolbox/Makefile new file mode 100644 index 00000000..7575e1ee --- /dev/null +++ b/GX-PAW/common/src/16_kokkos_toolbox/Makefile @@ -0,0 +1,1507 @@ +# Makefile.in generated by automake 1.16.3 from Makefile.am. +# shared/common/src/16_kokkos_toolbox/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994-2020 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-corelibs on 2024/03/16 21:07:38 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-corelibs script or its config file instead. +# + + +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/abinit +pkgincludedir = $(includedir)/abinit +pkglibdir = $(libdir)/abinit +pkglibexecdir = $(libexecdir)/abinit +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = x86_64-apple-darwin18.7.0 +host_triplet = x86_64-apple-darwin18.7.0 +target_triplet = x86_64-apple-darwin18.7.0 +subdir = shared/common/src/16_kokkos_toolbox +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/m4/arch-gpu.m4 \ + $(top_srcdir)/config/m4/arch-mpi.m4 \ + $(top_srcdir)/config/m4/auto-autotools.m4 \ + $(top_srcdir)/config/m4/auto-corelibs.m4 \ + $(top_srcdir)/config/m4/auto-debug.m4 \ + $(top_srcdir)/config/m4/auto-dirflags.m4 \ + $(top_srcdir)/config/m4/auto-env.m4 \ + $(top_srcdir)/config/m4/auto-hints.m4 \ + $(top_srcdir)/config/m4/auto-optim.m4 \ + $(top_srcdir)/config/m4/auto-options.m4 \ + $(top_srcdir)/config/m4/auto-output.m4 \ + $(top_srcdir)/config/m4/auto-triggers.m4 \ + $(top_srcdir)/config/m4/conf-atompaw.m4 \ + $(top_srcdir)/config/m4/conf-debug.m4 \ + $(top_srcdir)/config/m4/conf-fallbacks.m4 \ + $(top_srcdir)/config/m4/conf-files.m4 \ + $(top_srcdir)/config/m4/conf-init.m4 \ + $(top_srcdir)/config/m4/conf-openmp.m4 \ + $(top_srcdir)/config/m4/conf-optim.m4 \ + $(top_srcdir)/config/m4/lang-c++.m4 \ + $(top_srcdir)/config/m4/lang-c.m4 \ + $(top_srcdir)/config/m4/lang-fortran-import.m4 \ + $(top_srcdir)/config/m4/lang-fortran.m4 \ + $(top_srcdir)/config/m4/lang-python.m4 \ + $(top_srcdir)/config/m4/libxml2.m4 \ + $(top_srcdir)/config/m4/misc-display.m4 \ + $(top_srcdir)/config/m4/sd_abinit_common.m4 \ + $(top_srcdir)/config/m4/sd_arch_gpu.m4 \ + $(top_srcdir)/config/m4/sd_arch_mpi.m4 \ + $(top_srcdir)/config/m4/sd_bigdft.m4 \ + $(top_srcdir)/config/m4/sd_core.m4 \ + $(top_srcdir)/config/m4/sd_esl.m4 \ + $(top_srcdir)/config/m4/sd_fftw3.m4 \ + $(top_srcdir)/config/m4/sd_gpu_kokkos.m4 \ + $(top_srcdir)/config/m4/sd_gpu_yakl.m4 \ + $(top_srcdir)/config/m4/sd_io_hdf5.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf_fortran.m4 \ + $(top_srcdir)/config/m4/sd_levmar.m4 \ + $(top_srcdir)/config/m4/sd_libpaw.m4 \ + $(top_srcdir)/config/m4/sd_libpsml.m4 \ + $(top_srcdir)/config/m4/sd_libxc.m4 \ + $(top_srcdir)/config/m4/sd_math_fft.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_core.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_util.m4 \ + $(top_srcdir)/config/m4/sd_papi.m4 \ + $(top_srcdir)/config/m4/sd_pfft.m4 \ + $(top_srcdir)/config/m4/sd_triqs.m4 \ + $(top_srcdir)/config/m4/sd_wannier90.m4 \ + $(top_srcdir)/config/m4/sd_xmlf90.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +AM_V_AR = $(am__v_AR_$(V)) +am__v_AR_ = $(am__v_AR_$(AM_DEFAULT_VERBOSITY)) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = +lib16_kokkos_toolbox_a_AR = $(AR) $(ARFLAGS) +lib16_kokkos_toolbox_a_LIBADD = +am__objects_1 = kokkos_utils.$(OBJEXT) m_kokkos_utils.$(OBJEXT) +am_lib16_kokkos_toolbox_a_OBJECTS = $(am__objects_1) +lib16_kokkos_toolbox_a_OBJECTS = $(am_lib16_kokkos_toolbox_a_OBJECTS) +AM_V_P = $(am__v_P_$(V)) +am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY)) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I. -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/config/gnu/depcomp +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/kokkos_utils.Po +am__mv = mv -f +PPFCCOMPILE = $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) +AM_V_PPFC = $(am__v_PPFC_$(V)) +am__v_PPFC_ = $(am__v_PPFC_$(AM_DEFAULT_VERBOSITY)) +am__v_PPFC_0 = @echo " PPFC " $@; +am__v_PPFC_1 = +FCLD = $(FC) +FCLINK = $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \ + $@ +AM_V_FCLD = $(am__v_FCLD_$(V)) +am__v_FCLD_ = $(am__v_FCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_FCLD_0 = @echo " FCLD " $@; +am__v_FCLD_1 = +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_$(V)) +am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY)) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = +CXXLD = $(CXX) +CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ + -o $@ +AM_V_CXXLD = $(am__v_CXXLD_$(V)) +am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(lib16_kokkos_toolbox_a_SOURCES) +DIST_SOURCES = $(lib16_kokkos_toolbox_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in \ + $(top_srcdir)/config/gnu/depcomp +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ABINIT_BINARY_PACKAGE = abinit-10.0.0.83-58be4d_x86_64_darwin18.7.0_gnu9.4 +ABINIT_COMMON_CPPFLAGS = +ABINIT_COMMON_FCFLAGS = +ABINIT_COMMON_LDFLAGS = +ABINIT_COMMON_LIBS = +ABINIT_TARGET = x86_64_darwin18.7.0_gnu9.4 +ABINIT_VERSION = 10.0.0.83-58be4d +ABINIT_VERSION_BASE = 10.0 +ABINIT_VERSION_BUILD = 20240316 +ABINIT_VERSION_MAJOR = 10 +ABINIT_VERSION_MICRO = 0 +ABINIT_VERSION_MINOR = 0 +ABI_CPPFLAGS = -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include +ACLOCAL = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' aclocal-1.16 +AMTAR = $${TAR-tar} +AM_DEFAULT_VERBOSITY = 1 +AR = ar +ARFLAGS = rc +ARFLAGS_CMD = rc +ARFLAGS_DEBUG = +ARFLAGS_EXTRA = +ARFLAGS_HINTS = +ARFLAGS_OPTIM = +ATOMPAW_BIN = +AUTOCONF = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' autoconf +AUTOHEADER = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' autoheader +AUTOMAKE = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' automake-1.16 +AWK = awk +BIGDFT_CPPFLAGS = +BIGDFT_FCFLAGS = +BIGDFT_LDFLAGS = +BIGDFT_LIBS = +BOURNE_SHELL = /bin/sh +CC = /opt/local/bin/mpicc +CCDEPMODE = depmode=gcc3 +CC_LDFLAGS = +CC_LDFLAGS_DEBUG = +CC_LDFLAGS_EXTRA = +CC_LDFLAGS_GPU = +CC_LDFLAGS_HINTS = +CC_LDFLAGS_OPTIM = +CC_LIBS = +CC_LIBS_DEBUG = +CC_LIBS_EXTRA = +CC_LIBS_GPU = +CC_LIBS_HINTS = +CC_LIBS_OPTIM = +CFLAGS = -O2 -g +CFLAGS_DEBUG = +CFLAGS_EXTRA = +CFLAGS_GPU = +CFLAGS_HINTS = +CFLAGS_OPTIM = +CPP = /opt/local/bin/mpicc -E +CPPFLAGS = +CPPFLAGS_DEBUG = +CPPFLAGS_EXTRA = +CPPFLAGS_GPU = +CPPFLAGS_HINTS = +CPPFLAGS_HINTS_EXT = -P -std=c99 +CPPFLAGS_OPTIM = +CXX = /opt/local/bin/mpicxx +CXXDEPMODE = depmode=gcc3 +CXXFLAGS = -O2 -g +CXXFLAGS_DEBUG = +CXXFLAGS_EXTRA = +CXXFLAGS_GPU = +CXXFLAGS_HINTS = +CXXFLAGS_OPTIM = +CXX_LDFLAGS = +CXX_LDFLAGS_DEBUG = +CXX_LDFLAGS_EXTRA = +CXX_LDFLAGS_GPU = +CXX_LDFLAGS_HINTS = +CXX_LDFLAGS_OPTIM = +CXX_LIBS = +CXX_LIBS_DEBUG = +CXX_LIBS_EXTRA = +CXX_LIBS_GPU = +CXX_LIBS_HINTS = +CXX_LIBS_OPTIM = +CYGPATH_W = echo +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +ECHO_C = \c +ECHO_N = +ECHO_T = +EGREP = /usr/bin/grep -E +EXEEXT = +F77 = /opt/local/bin/mpif90 +FC = /opt/local/bin/mpif90 +FCFLAGS = -O2 -g -ffree-line-length-none -I/opt/local/include -I/opt/local/include -I/opt/local/include +FCFLAGS_DEBUG = +FCFLAGS_EXTRA = +FCFLAGS_F90 = +FCFLAGS_FIXEDFORM = -ffixed-form +FCFLAGS_FREEFORM = -ffree-form +FCFLAGS_HINTS = -ffree-line-length-none +FCFLAGS_MODDIR = -J../mods +FCFLAGS_OPENMP = +FCFLAGS_OPENMP_OFFLOAD = +FCFLAGS_OPTIM = +FCLIBS = -L/opt/local/lib -L/opt/local/lib/openmpi-gcc9 -L/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0 -L/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/../../.. -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi -lgfortran -lquadmath -lm +FC_LDFLAGS = +FC_LDFLAGS_DEBUG = +FC_LDFLAGS_EXTRA = +FC_LDFLAGS_HINTS = +FC_LDFLAGS_OPTIM = +FC_LIBS = +FC_LIBS_DEBUG = +FC_LIBS_EXTRA = +FC_LIBS_HINTS = +FC_LIBS_OPTIM = +FC_NOWRAP = /opt/local/bin/mpif90 +FFLAGS = -O2 -g -ffree-line-length-none -I/opt/local/include -I/opt/local/include -I/opt/local/include +FFTW3_CFLAGS = +FFTW3_CPPFLAGS = -I/opt/local/include +FFTW3_FCFLAGS = -I/opt/local/include +FFTW3_LDFLAGS = +FFTW3_LIBS = -L/opt/local/lib -lfftw3 -lfftw3f +FFT_CFLAGS = +FFT_FCFLAGS = +FPP = +FPPFLAGS = +FPPFLAGS_DEBUG = +FPPFLAGS_EXTRA = +FPPFLAGS_HINTS = +FPPFLAGS_OPTIM = +GPU_ARCH = +GPU_CFLAGS = +GPU_CPPFLAGS = +GPU_CXXFLAGS = +GPU_FCFLAGS = +GPU_LDFLAGS = +GPU_LIBS = +GRAPHATOM_BIN = +GREP = /usr/bin/grep +H5CC = +HDF5_CFLAGS = +HDF5_CPPFLAGS = +HDF5_CXXFLAGS = +HDF5_FCFLAGS = +HDF5_LDFLAGS = +HDF5_LIBS = +INSTALL = /opt/local/libexec/gnubin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +KOKKOS_CPPFLAGS = +KOKKOS_CXXFLAGS = +KOKKOS_LDFLAGS = +KOKKOS_LIBS = +LDFLAGS = +LEVMAR_CFLAGS = +LEVMAR_CPPFLAGS = +LEVMAR_LDFLAGS = +LEVMAR_LIBS = +LIBOBJS = +LIBPAW_CPPFLAGS = +LIBPAW_FCFLAGS = +LIBPAW_LDFLAGS = +LIBPAW_LIBS = +LIBPSML_CPPFLAGS = +LIBPSML_FCFLAGS = +LIBPSML_LDFLAGS = +LIBPSML_LIBS = +LIBS = -L/opt/local/lib -lwannier -L/opt/local/lib -lxc -L/opt/local/lib -lnetcdff -L/opt/local/lib -lnetcdf -L/opt/local/lib -L/opt/local/lib -lhdf5_hl -L/opt/local/lib -lhdf5 -lz -ldl -lm -L/opt/local/lib -lfftw3 -lfftw3f +LIBXC_CFLAGS = +LIBXC_CPPFLAGS = +LIBXC_FCFLAGS = +LIBXC_LDFLAGS = +LIBXC_LIBS = +LIBXML2_CPPFLAGS = +LIBXML2_FCFLAGS = +LIBXML2_LIBS = +LINALG_CFLAGS = +LINALG_CPPFLAGS = +LINALG_CXXFLAGS = +LINALG_FCFLAGS = -I/opt/local/include +LINALG_LDFLAGS = +LINALG_LIBS = -L/opt/local/lib -lopenblas +LN_S = ln -s +LTLIBOBJS = +MAKEINFO = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' makeinfo +MKDIR_P = /opt/local/libexec/gnubin/mkdir -p +MODEXT = mod +MPI_CFLAGS = +MPI_CPPFLAGS = +MPI_CXXFLAGS = +MPI_FCFLAGS = +MPI_LDFLAGS = +MPI_LIBS = +MV = /opt/local/libexec/gnubin/mv +NETCDF_CFLAGS = +NETCDF_CPPFLAGS = +NETCDF_CXXFLAGS = +NETCDF_FCFLAGS = +NETCDF_FORTRAN_CFLAGS = +NETCDF_FORTRAN_CPPFLAGS = +NETCDF_FORTRAN_CXXFLAGS = +NETCDF_FORTRAN_FCFLAGS = +NETCDF_FORTRAN_LDFLAGS = +NETCDF_FORTRAN_LIBS = +NETCDF_LDFLAGS = +NETCDF_LIBS = +NVCC = +NVCC_CFLAGS = +NVCC_CPPFLAGS = +NVCC_LDFLAGS = +NVCC_LIBS = +OBJEXT = o +PACKAGE = abinit +PACKAGE_BUGREPORT = https://bugs.launchpad.net/abinit/ +PACKAGE_NAME = ABINIT +PACKAGE_STRING = ABINIT 10.0.0.83-58be4d +PACKAGE_TARNAME = abinit +PACKAGE_URL = +PACKAGE_VERSION = 10.0.0.83-58be4d +PAPI_CFLAGS = +PAPI_CPPFLAGS = +PAPI_LDFLAGS = +PAPI_LIBS = +PATCH = patch +PATH_SEPARATOR = : +PERL = /usr/bin/perl +PFFT_CFLAGS = +PFFT_CPPFLAGS = +PFFT_LDFLAGS = +PFFT_LIBS = +PYFLAGS = +PYTHON = python3.9 +PYTHON_CONFIG = python3.9-config +PYTHON_CPPFLAGS = -I/opt/local/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -I/opt/local/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 +RANLIB = ranlib +REALPATH = realpath +RM = /opt/local/libexec/gnubin/rm +SED = /usr/bin/sed +SET_MAKE = +SHELL = /bin/sh +STRIP = +TAR = tar +TRIQS_CFLAGS = +TRIQS_CPPFLAGS = +TRIQS_CXXFLAGS = +TRIQS_LDFLAGS = +TRIQS_LIBS = +TRUE_CPP = cpp +VERSION = 10.0.0.83-58be4d +WANNIER90_CPPFLAGS = +WANNIER90_FCFLAGS = -I/opt/local/include +WANNIER90_LDFLAGS = +WANNIER90_LIBS = -L/opt/local/lib -lwannier +XML2_CONFIG = +XMLF90_CPPFLAGS = +XMLF90_FCFLAGS = +XMLF90_LDFLAGS = +XMLF90_LIBS = +XML_CPPFLAGS = +XML_LIBS = +XPP = +XPPFLAGS = +XPPFLAGS_DEBUG = +XPPFLAGS_EXTRA = +XPPFLAGS_OPTIM = +YAKL_CPPFLAGS = +YAKL_FCFLAGS = +YAKL_LDFLAGS = +YAKL_LIBS = +abi_ac_distcheck = --with-config-file="/Users/gonze/_Research/ABINIT_git/gonze/mac-1P0-225.ac9" +abi_ac_version = 027100 +abi_am_version = 011603 +abi_avx_safe_mode_enable = no +abi_bse_unpacked_enable = no +abi_cc_path = +abi_cc_vendor = gnu +abi_cc_version = 9.4 +abi_cclock_enable = no +abi_cpp_path = +abi_cpu_64bits = yes +abi_cpu_bits = 64 +abi_cpu_model = unknown +abi_cpu_platform = apple +abi_cpu_spec = unknown_unknown +abi_cpu_vendor = unknown +abi_crpa_optim_enable = no +abi_cxx_path = +abi_cxx_vendor = gnu +abi_cxx_version = 9.4 +abi_debug_flavor = basic +abi_exports_enable = no +abi_fbk_abinit_common_ok = no +abi_fbk_bigdft_ok = disabled +abi_fbk_config = +abi_fbk_enable = no +abi_fbk_fft_ok = no +abi_fbk_fftw3_ok = no +abi_fbk_gpu_ok = no +abi_fbk_hdf5_ok = disabled +abi_fbk_init = def +abi_fbk_kokkos_ok = no +abi_fbk_levmar_ok = no +abi_fbk_libpaw_ok = no +abi_fbk_libpsml_ok = disabled +abi_fbk_libxc_ok = disabled +abi_fbk_libxml2_ok = no +abi_fbk_linalg_ok = disabled +abi_fbk_list = +abi_fbk_mpi_ok = no +abi_fbk_netcdf_fortran_ok = disabled +abi_fbk_netcdf_ok = disabled +abi_fbk_papi_ok = no +abi_fbk_pfft_ok = no +abi_fbk_prefix = +abi_fbk_required = +abi_fbk_triqs_ok = no +abi_fbk_wannier90_ok = disabled +abi_fbk_xmlf90_ok = disabled +abi_fbk_yakl_ok = no +abi_fc_path = +abi_fc_vendor = gnu +abi_fc_version = 9.4 +abi_fc_wrap = no +abi_fc_wrapper_enable = no +abi_fpp_path = +abi_gpu_arch = +abi_gpu_fcflags = +abi_gpu_flavor = none +abi_gpu_hip_libdir = +abi_gpu_incs = +abi_gpu_ldflags = +abi_gpu_libs = +abi_gpu_nvtx_v3 = +abi_gpu_roctx = +abi_gw_dpc_enable = yes +abi_hints_enable = yes +abi_libtetra_enable = yes +abi_libxml2_cppflags = +abi_libxml2_enable = no +abi_libxml2_fcflags = +abi_libxml2_init = def +abi_libxml2_ldflags = +abi_libxml2_libs = +abi_libxml2_ok = unknown +abi_libxml2_prefix = +abi_lotf_enable = no +abi_lt_version = 020406 +abi_m4_version = 010419 +abi_memory_profiling_enable = no +abi_mpi_cflags = +abi_mpi_cppflags = +abi_mpi_cxxflags = +abi_mpi_enable = yes +abi_mpi_fcflags = +abi_mpi_flavor = auto +abi_mpi_gpu_aware_enable = no +abi_mpi_incs = +abi_mpi_inplace_enable = yes +abi_mpi_interfaces_bugfix_enable = no +abi_mpi_io_default_enable = no +abi_mpi_io_enable = yes +abi_mpi_ldflags = +abi_mpi_level = 2 +abi_mpi_libs = +abi_netcdf_default_enable = no +abi_openmp_enable = no +abi_openmp_offload_enable = no +abi_optim_flavor = standard +abi_python_invocation_enable = no +abi_source_debug_enable = no +abi_stdin_enable = yes +abi_sys_spec = darwin-x86_64 +abi_timer_enable = yes +abi_triqs_v1_4_enable = no +abi_triqs_v2_0_enable = no +abi_zdot_bugfix_enable = no +abinit_bindir = /usr/local/bin +abinit_builddir = /Users/gonze/_Research/ABINIT_git/gonze +abinit_chkdir = /usr/local/share/abinit/tests +abinit_datdir = /usr/local/share/abinit +abinit_docdir = /usr/local/doc/abinit +abinit_incdir = /usr/local/include +abinit_libdir = /usr/local/lib +abinit_mandir = /usr/local/share/man +abinit_prefix = /usr/local +abinit_srcdir = /Users/gonze/_Research/ABINIT_git/gonze +abs_builddir = /Users/gonze/_Research/ABINIT_git/gonze/shared/common/src/16_kokkos_toolbox +abs_srcdir = /Users/gonze/_Research/ABINIT_git/gonze/shared/common/src/16_kokkos_toolbox +abs_top_builddir = /Users/gonze/_Research/ABINIT_git/gonze +abs_top_srcdir = /Users/gonze/_Research/ABINIT_git/gonze +ac_ct_CC = +ac_ct_CXX = +ac_ct_FC = +am__include = include +am__leading_dot = . +am__quote = +am__tar = tar --format=ustar -chf - "$$tardir" +am__untar = tar -xf - +bindir = ${exec_prefix}/bin +build = x86_64-apple-darwin18.7.0 +build_alias = +build_cpu = x86_64 +build_os = darwin18.7.0 +build_vendor = apple +builddir = . +cc_info_string = gcc-mp-9 (MacPorts gcc9 9.4.0_0) 9.4.0 +cxx_info_string = g++-mp-9 (MacPorts gcc9 9.4.0_0) 9.4.0 +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +enable_avx_safe_mode = +enable_bse_unpacked = +enable_cclock = +enable_crpa_optim = +enable_exports = +enable_fc_wrapper = +enable_gw_dpc = yes +enable_hints = +enable_libtetra = +enable_lotf = +enable_memory_profiling = +enable_mpi_gpu_aware = +enable_mpi_inplace = +enable_mpi_interfaces_bugfix = +enable_mpi_io = yes +enable_mpi_io_default = +enable_netcdf_default = +enable_openmp = +enable_openmp_offload = +enable_python_invocation = +enable_shared = +enable_source_debug = +enable_static = +enable_stdin = +enable_timer = +enable_triqs_v1_4 = +enable_triqs_v2_0 = +enable_zdot_bugfix = +exec_prefix = ${prefix} +fc_info_string = GNU Fortran (MacPorts gcc9 9.4.0_0) 9.4.0 +fc_mod_fcflags = +fc_timing = standard +fcflags_opt_02_clib = +fcflags_opt_10_defs = +fcflags_opt_11_memory_mpi = +fcflags_opt_12_hide_mpi = +fcflags_opt_14_hidewrite = +fcflags_opt_16_hideleave = +fcflags_opt_16_kokkos_toolbox = +fcflags_opt_17_gpu_toolbox = +fcflags_opt_17_libtetra_ext = +fcflags_opt_17_minimax = +fcflags_opt_17_yaml_out = +fcflags_opt_18_timing = +fcflags_opt_21_hashfuncs = +fcflags_opt_27_toolbox_oop = +fcflags_opt_28_numeric_noabirule = +fcflags_opt_29_kpoints = +fcflags_opt_32_util = +fcflags_opt_33_xc_lowlevel = +fcflags_opt_39_libpaw = +fcflags_opt_41_geometry = +fcflags_opt_42_nlstrain = +fcflags_opt_42_parser = +fcflags_opt_43_ptgroups = -O0 +fcflags_opt_43_wvl_wrappers = +fcflags_opt_44_abitools = +fcflags_opt_44_abitypes_defs = +fcflags_opt_44_manage_kokkos = +fcflags_opt_45_geomoptim = +fcflags_opt_45_xgTools = +fcflags_opt_46_ghc_omp = +fcflags_opt_46_manage_cuda = +fcflags_opt_48_diago = +fcflags_opt_49_gw_toolbox_oop = +fcflags_opt_51_manage_mpi = +fcflags_opt_52_fft_mpi_noabirule = +fcflags_opt_53_ffts = +fcflags_opt_54_spacepar = +fcflags_opt_55_abiutil = +fcflags_opt_56_io_mpi = +fcflags_opt_56_mixing = +fcflags_opt_56_recipspace = +fcflags_opt_56_xc = +fcflags_opt_57_iopsp_parser = +fcflags_opt_57_iovars = +fcflags_opt_61_occeig = +fcflags_opt_62_cg_noabirule = +fcflags_opt_62_ctqmc = +fcflags_opt_62_iowfdenpot = +fcflags_opt_62_poisson = +fcflags_opt_62_wvl_wfs = +fcflags_opt_64_psp = +fcflags_opt_65_lotf_base = +fcflags_opt_65_paw = +fcflags_opt_66_nonlocal = +fcflags_opt_66_vdwxc = +fcflags_opt_66_wfs = +fcflags_opt_67_common = +fcflags_opt_67_python_invocation_ext = +fcflags_opt_67_triqs_ext = +fcflags_opt_68_dmft = +fcflags_opt_68_lotf = +fcflags_opt_68_recursion = +fcflags_opt_68_rsprc = +fcflags_opt_69_wfdesc = +fcflags_opt_70_gw = +fcflags_opt_71_bse = +fcflags_opt_71_wannier = +fcflags_opt_72_response = +fcflags_opt_77_ddb = +fcflags_opt_77_suscep = +fcflags_opt_78_effpot = +fcflags_opt_78_eph = +fcflags_opt_79_seqpar_mpi = +fcflags_opt_80_rttddft = +fcflags_opt_80_tdep = +fcflags_opt_94_scfcv = +fcflags_opt_95_drive = +fcflags_opt_98_main = +fcflags_opt_bigdft = +fcflags_opt_default = +fcflags_opt_hdf5 = +fcflags_opt_levmar = +fcflags_opt_libpsml = +fcflags_opt_libxc = +fcflags_opt_libxml2 = +fcflags_opt_linalg = +fcflags_opt_netcdf = +fcflags_opt_netcdf_fortran = +fcflags_opt_papi = +fcflags_opt_triqs = +fcflags_opt_wannier90 = +fcflags_opt_xmlf90 = +host = x86_64-apple-darwin18.7.0 +host_alias = +host_cpu = x86_64 +host_os = darwin18.7.0 +host_vendor = apple +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = ${SHELL} /Users/gonze/_Research/ABINIT_git/gonze/config/gnu/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = ${datarootdir}/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = $(MKDIR_P) +oldincludedir = /usr/include +pdfdir = ${docdir} +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +runstatedir = ${localstatedir}/run +sbindir = ${exec_prefix}/sbin +sd_abinit_common_cppflags = +sd_abinit_common_enable = no +sd_abinit_common_enable_def = no +sd_abinit_common_fcflags = +sd_abinit_common_init = def +sd_abinit_common_ldflags = +sd_abinit_common_libs = +sd_abinit_common_ok = unknown +sd_abinit_common_options = optional skip +sd_abinit_common_policy = skip +sd_abinit_common_status = optional +sd_bigdft_cppflags = +sd_bigdft_enable = no +sd_bigdft_enable_def = no +sd_bigdft_fcflags = +sd_bigdft_init = def +sd_bigdft_ldflags = +sd_bigdft_libs = +sd_bigdft_ok = unknown +sd_bigdft_options = optional warn +sd_bigdft_policy = warn +sd_bigdft_status = optional +sd_fft_cflags = +sd_fft_choices = +sd_fft_cppflags = -I/opt/local/include +sd_fft_cxxflags = +sd_fft_enable = yes +sd_fft_fcflags = -I/opt/local/include +sd_fft_flavor = fftw3 +sd_fft_init = kwd +sd_fft_ldflags = +sd_fft_libs = -L/opt/local/lib -lfftw3 -lfftw3f +sd_fft_ok = yes +sd_fftw3_cflags = +sd_fftw3_cppflags = -I/opt/local/include +sd_fftw3_enable = yes +sd_fftw3_enable_def = no +sd_fftw3_fcflags = -I/opt/local/include +sd_fftw3_init = env +sd_fftw3_ldflags = +sd_fftw3_libs = -L/opt/local/lib -lfftw3 -lfftw3f +sd_fftw3_ok = yes +sd_fftw3_options = optional skip +sd_fftw3_policy = skip +sd_fftw3_status = optional +sd_gpu_cflags = +sd_gpu_cppflags = +sd_gpu_cxxflags = +sd_gpu_enable = no +sd_gpu_enable_def = no +sd_gpu_fcflags = +sd_gpu_init = def +sd_gpu_ldflags = +sd_gpu_libs = +sd_gpu_ok = no +sd_gpu_options = optional warn +sd_gpu_policy = warn +sd_gpu_prefix = +sd_gpu_status = optional +sd_hdf5_cflags = +sd_hdf5_cppflags = -I/opt/local/include -I/opt/local/include +sd_hdf5_cxxflags = +sd_hdf5_enable = yes +sd_hdf5_enable_def = yes +sd_hdf5_enable_fc = no +sd_hdf5_fcflags = +sd_hdf5_h5cc = /opt/local/bin/h5cc +sd_hdf5_h5fc = +sd_hdf5_init = dir +sd_hdf5_ldflags = +sd_hdf5_libs = -L/opt/local/lib -L/opt/local/lib -lhdf5_hl -L/opt/local/lib -lhdf5 -lz -ldl -lm +sd_hdf5_ok = yes +sd_hdf5_options = required no-fortran warn +sd_hdf5_policy = warn +sd_hdf5_status = required +sd_kokkos_cppflags = +sd_kokkos_cxxflags = +sd_kokkos_enable = no +sd_kokkos_enable_def = no +sd_kokkos_init = def +sd_kokkos_ldflags = +sd_kokkos_libs = +sd_kokkos_ok = unknown +sd_kokkos_options = optional fail +sd_kokkos_policy = fail +sd_kokkos_status = optional +sd_levmar_cflags = +sd_levmar_cppflags = +sd_levmar_enable = no +sd_levmar_enable_def = no +sd_levmar_init = def +sd_levmar_ldflags = +sd_levmar_libs = +sd_levmar_ok = unknown +sd_levmar_options = optional fail +sd_levmar_policy = fail +sd_levmar_status = optional +sd_libpaw_cppflags = +sd_libpaw_enable = no +sd_libpaw_enable_def = no +sd_libpaw_fcflags = +sd_libpaw_init = def +sd_libpaw_ldflags = +sd_libpaw_libs = +sd_libpaw_ok = unknown +sd_libpaw_options = optional skip +sd_libpaw_policy = skip +sd_libpaw_status = optional +sd_libpsml_cppflags = +sd_libpsml_enable = no +sd_libpsml_enable_def = no +sd_libpsml_fcflags = +sd_libpsml_init = def +sd_libpsml_ldflags = +sd_libpsml_libs = +sd_libpsml_ok = unknown +sd_libpsml_options = optional warn +sd_libpsml_policy = warn +sd_libpsml_status = optional +sd_libxc_cflags = +sd_libxc_cppflags = -I/opt/local/include +sd_libxc_enable = yes +sd_libxc_enable_def = yes +sd_libxc_enable_fc = no +sd_libxc_fcflags = +sd_libxc_init = dir +sd_libxc_ldflags = +sd_libxc_libs = -L/opt/local/lib -lxc +sd_libxc_ok = yes +sd_libxc_options = required no-fortran warn +sd_libxc_policy = warn +sd_libxc_status = required +sd_linalg_cflags = +sd_linalg_choices = +sd_linalg_cppflags = +sd_linalg_cxxflags = +sd_linalg_enable = yes +sd_linalg_fcflags = -I/opt/local/include +sd_linalg_flavor = openblas +sd_linalg_has_elpa = no +sd_linalg_has_scalapack = no +sd_linalg_init = env +sd_linalg_ldflags = +sd_linalg_libs = -L/opt/local/lib -lopenblas +sd_linalg_ok = yes +sd_mpi_cc = /opt/local/bin/mpicc +sd_mpi_cflags = +sd_mpi_cppflags = -I/opt/local/include +sd_mpi_cxx = /opt/local/bin/mpicxx +sd_mpi_enable = yes +sd_mpi_enable_cxx = yes +sd_mpi_enable_def = auto +sd_mpi_enable_fc = yes +sd_mpi_fc = /opt/local/bin/mpif90 +sd_mpi_fcflags = -I/opt/local/include +sd_mpi_init = dir +sd_mpi_ldflags = +sd_mpi_libs = +sd_mpi_ok = yes +sd_mpi_options = auto optional fail +sd_mpi_policy = fail +sd_mpi_status = optional +sd_netcdf_cflags = +sd_netcdf_cppflags = -I/opt/local/include +sd_netcdf_enable = yes +sd_netcdf_enable_def = yes +sd_netcdf_fcflags = -I/opt/local/include +sd_netcdf_fortran_cflags = +sd_netcdf_fortran_cppflags = -I/opt/local/include +sd_netcdf_fortran_enable = yes +sd_netcdf_fortran_enable_def = yes +sd_netcdf_fortran_fcflags = -I/opt/local/include +sd_netcdf_fortran_init = dir +sd_netcdf_fortran_ldflags = +sd_netcdf_fortran_libs = -L/opt/local/lib -lnetcdff +sd_netcdf_fortran_ok = yes +sd_netcdf_fortran_options = required warn +sd_netcdf_fortran_policy = warn +sd_netcdf_fortran_status = required +sd_netcdf_init = dir +sd_netcdf_ldflags = +sd_netcdf_libs = -L/opt/local/lib -lnetcdf +sd_netcdf_ok = yes +sd_netcdf_options = required warn +sd_netcdf_policy = warn +sd_netcdf_status = required +sd_papi_cflags = +sd_papi_cppflags = +sd_papi_enable = no +sd_papi_enable_def = no +sd_papi_init = def +sd_papi_ldflags = +sd_papi_libs = +sd_papi_ok = unknown +sd_papi_options = optional fail +sd_papi_policy = fail +sd_papi_sd_papi_fcflags = +sd_papi_status = optional +sd_pfft_cflags = +sd_pfft_cppflags = +sd_pfft_enable = no +sd_pfft_enable_def = no +sd_pfft_init = def +sd_pfft_ldflags = +sd_pfft_libs = +sd_pfft_ok = unknown +sd_pfft_options = optional skip +sd_pfft_policy = skip +sd_pfft_status = optional +sd_sys_fcflags = +sd_triqs_cflags = +sd_triqs_cppflags = +sd_triqs_cxxflags = +sd_triqs_enable = no +sd_triqs_enable_def = no +sd_triqs_fcflags = +sd_triqs_init = def +sd_triqs_ldflags = +sd_triqs_libs = +sd_triqs_ok = unknown +sd_triqs_options = optional fail +sd_triqs_policy = fail +sd_triqs_status = optional +sd_wannier90_cppflags = +sd_wannier90_enable = yes +sd_wannier90_enable_def = no +sd_wannier90_fcflags = -I/opt/local/include +sd_wannier90_init = env +sd_wannier90_ldflags = +sd_wannier90_libs = -L/opt/local/lib -lwannier +sd_wannier90_ok = yes +sd_wannier90_options = optional warn +sd_wannier90_policy = warn +sd_wannier90_status = optional +sd_xmlf90_cppflags = +sd_xmlf90_enable = no +sd_xmlf90_enable_def = no +sd_xmlf90_fcflags = +sd_xmlf90_init = def +sd_xmlf90_ldflags = +sd_xmlf90_libs = +sd_xmlf90_ok = unknown +sd_xmlf90_options = optional warn +sd_xmlf90_policy = warn +sd_xmlf90_status = optional +sd_yakl_cppflags = +sd_yakl_enable = no +sd_yakl_enable_def = no +sd_yakl_fcflags = +sd_yakl_init = def +sd_yakl_ldflags = +sd_yakl_libs = +sd_yakl_ok = unknown +sd_yakl_options = optional fail +sd_yakl_policy = fail +sd_yakl_status = optional +sharedstatedir = ${prefix}/com +src_02_clib_fcflags = -I$(top_builddir)/shared/common/src/02_clib -I$(top_srcdir)/shared/common/src/02_clib +src_10_defs_fcflags = -I$(top_builddir)/shared/common/src/10_defs -I$(top_srcdir)/shared/common/src/10_defs +src_11_memory_mpi_fcflags = -I$(top_builddir)/shared/common/src/11_memory_mpi -I$(top_srcdir)/shared/common/src/11_memory_mpi +src_12_hide_mpi_fcflags = -I$(top_builddir)/shared/common/src/12_hide_mpi -I$(top_srcdir)/shared/common/src/12_hide_mpi +src_14_hidewrite_fcflags = -I$(top_builddir)/shared/common/src/14_hidewrite -I$(top_srcdir)/shared/common/src/14_hidewrite +src_16_hideleave_fcflags = -I$(top_builddir)/shared/common/src/16_hideleave -I$(top_srcdir)/shared/common/src/16_hideleave +src_16_kokkos_toolbox_fcflags = -I$(top_builddir)/shared/common/src/16_kokkos_toolbox -I$(top_srcdir)/shared/common/src/16_kokkos_toolbox +src_17_gpu_toolbox_fcflags = -I$(top_builddir)/shared/common/src/17_gpu_toolbox -I$(top_srcdir)/shared/common/src/17_gpu_toolbox +src_17_libtetra_ext_fcflags = -I$(top_builddir)/shared/common/src/17_libtetra_ext -I$(top_srcdir)/shared/common/src/17_libtetra_ext +src_17_minimax_fcflags = -I$(top_builddir)/shared/common/src/17_minimax -I$(top_srcdir)/shared/common/src/17_minimax +src_17_yaml_out_fcflags = -I$(top_builddir)/shared/common/src/17_yaml_out -I$(top_srcdir)/shared/common/src/17_yaml_out +src_18_timing_fcflags = -I$(top_builddir)/shared/common/src/18_timing -I$(top_srcdir)/shared/common/src/18_timing +src_21_hashfuncs_fcflags = -I$(top_builddir)/shared/common/src/21_hashfuncs -I$(top_srcdir)/shared/common/src/21_hashfuncs +src_27_toolbox_oop_fcflags = -I$(top_builddir)/shared/common/src/27_toolbox_oop -I$(top_srcdir)/shared/common/src/27_toolbox_oop +src_28_numeric_noabirule_fcflags = -I$(top_builddir)/shared/common/src/28_numeric_noabirule -I$(top_srcdir)/shared/common/src/28_numeric_noabirule +src_29_kpoints_fcflags = -I$(top_builddir)/shared/common/src/29_kpoints -I$(top_srcdir)/shared/common/src/29_kpoints +src_32_util_fcflags = -I$(top_builddir)/shared/common/src/32_util -I$(top_srcdir)/shared/common/src/32_util +src_33_xc_lowlevel_fcflags = -I$(top_builddir)/shared/common/src/33_xc_lowlevel -I$(top_srcdir)/shared/common/src/33_xc_lowlevel +src_39_libpaw_fcflags = -I$(top_builddir)/shared/libpaw/src -I$(top_srcdir)/shared/libpaw/src +src_41_geometry_fcflags = -I$(top_builddir)/src/41_geometry -I$(top_srcdir)/src/41_geometry +src_42_nlstrain_fcflags = -I$(top_builddir)/src/42_nlstrain -I$(top_srcdir)/src/42_nlstrain +src_42_parser_fcflags = -I$(top_builddir)/src/42_parser -I$(top_srcdir)/src/42_parser +src_43_ptgroups_fcflags = -I$(top_builddir)/src/43_ptgroups -I$(top_srcdir)/src/43_ptgroups +src_43_wvl_wrappers_fcflags = -I$(top_builddir)/src/43_wvl_wrappers -I$(top_srcdir)/src/43_wvl_wrappers +src_44_abitools_fcflags = -I$(top_builddir)/src/44_abitools -I$(top_srcdir)/src/44_abitools +src_44_abitypes_defs_fcflags = -I$(top_builddir)/src/44_abitypes_defs -I$(top_srcdir)/src/44_abitypes_defs +src_44_manage_kokkos_fcflags = -I$(top_builddir)/src/44_manage_kokkos -I$(top_srcdir)/src/44_manage_kokkos +src_45_geomoptim_fcflags = -I$(top_builddir)/src/45_geomoptim -I$(top_srcdir)/src/45_geomoptim +src_45_xgTools_fcflags = -I$(top_builddir)/src/45_xgTools -I$(top_srcdir)/src/45_xgTools +src_46_ghc_omp_fcflags = -I$(top_builddir)/src/46_ghc_omp -I$(top_srcdir)/src/46_ghc_omp +src_46_manage_cuda_fcflags = -I$(top_builddir)/src/46_manage_cuda -I$(top_srcdir)/src/46_manage_cuda +src_48_diago_fcflags = -I$(top_builddir)/src/48_diago -I$(top_srcdir)/src/48_diago +src_49_gw_toolbox_oop_fcflags = -I$(top_builddir)/src/49_gw_toolbox_oop -I$(top_srcdir)/src/49_gw_toolbox_oop +src_51_manage_mpi_fcflags = -I$(top_builddir)/src/51_manage_mpi -I$(top_srcdir)/src/51_manage_mpi +src_52_fft_mpi_noabirule_fcflags = -I$(top_builddir)/src/52_fft_mpi_noabirule -I$(top_srcdir)/src/52_fft_mpi_noabirule +src_53_ffts_fcflags = -I$(top_builddir)/src/53_ffts -I$(top_srcdir)/src/53_ffts +src_54_spacepar_fcflags = -I$(top_builddir)/src/54_spacepar -I$(top_srcdir)/src/54_spacepar +src_55_abiutil_fcflags = -I$(top_builddir)/src/55_abiutil -I$(top_srcdir)/src/55_abiutil +src_56_io_mpi_fcflags = -I$(top_builddir)/src/56_io_mpi -I$(top_srcdir)/src/56_io_mpi +src_56_mixing_fcflags = -I$(top_builddir)/src/56_mixing -I$(top_srcdir)/src/56_mixing +src_56_recipspace_fcflags = -I$(top_builddir)/src/56_recipspace -I$(top_srcdir)/src/56_recipspace +src_56_xc_fcflags = -I$(top_builddir)/src/56_xc -I$(top_srcdir)/src/56_xc +src_57_iopsp_parser_fcflags = -I$(top_builddir)/src/57_iopsp_parser -I$(top_srcdir)/src/57_iopsp_parser +src_57_iovars_fcflags = -I$(top_builddir)/src/57_iovars -I$(top_srcdir)/src/57_iovars +src_61_occeig_fcflags = -I$(top_builddir)/src/61_occeig -I$(top_srcdir)/src/61_occeig +src_62_cg_noabirule_fcflags = -I$(top_builddir)/src/62_cg_noabirule -I$(top_srcdir)/src/62_cg_noabirule +src_62_ctqmc_fcflags = -I$(top_builddir)/src/62_ctqmc -I$(top_srcdir)/src/62_ctqmc +src_62_iowfdenpot_fcflags = -I$(top_builddir)/src/62_iowfdenpot -I$(top_srcdir)/src/62_iowfdenpot +src_62_poisson_fcflags = -I$(top_builddir)/src/62_poisson -I$(top_srcdir)/src/62_poisson +src_62_wvl_wfs_fcflags = -I$(top_builddir)/src/62_wvl_wfs -I$(top_srcdir)/src/62_wvl_wfs +src_64_psp_fcflags = -I$(top_builddir)/src/64_psp -I$(top_srcdir)/src/64_psp +src_65_lotf_base_fcflags = -I$(top_builddir)/src/65_lotf_base -I$(top_srcdir)/src/65_lotf_base +src_65_paw_fcflags = -I$(top_builddir)/src/65_paw -I$(top_srcdir)/src/65_paw +src_66_nonlocal_fcflags = -I$(top_builddir)/src/66_nonlocal -I$(top_srcdir)/src/66_nonlocal +src_66_vdwxc_fcflags = -I$(top_builddir)/src/66_vdwxc -I$(top_srcdir)/src/66_vdwxc +src_66_wfs_fcflags = -I$(top_builddir)/src/66_wfs -I$(top_srcdir)/src/66_wfs +src_67_common_fcflags = -I$(top_builddir)/src/67_common -I$(top_srcdir)/src/67_common +src_67_python_invocation_ext_fcflags = -I$(top_builddir)/src/67_python_invocation_ext -I$(top_srcdir)/src/67_python_invocation_ext +src_67_triqs_ext_fcflags = -I$(top_builddir)/src/67_triqs_ext -I$(top_srcdir)/src/67_triqs_ext +src_68_dmft_fcflags = -I$(top_builddir)/src/68_dmft -I$(top_srcdir)/src/68_dmft +src_68_lotf_fcflags = -I$(top_builddir)/src/68_lotf -I$(top_srcdir)/src/68_lotf +src_68_recursion_fcflags = -I$(top_builddir)/src/68_recursion -I$(top_srcdir)/src/68_recursion +src_68_rsprc_fcflags = -I$(top_builddir)/src/68_rsprc -I$(top_srcdir)/src/68_rsprc +src_69_wfdesc_fcflags = -I$(top_builddir)/src/69_wfdesc -I$(top_srcdir)/src/69_wfdesc +src_70_gw_fcflags = -I$(top_builddir)/src/70_gw -I$(top_srcdir)/src/70_gw +src_71_bse_fcflags = -I$(top_builddir)/src/71_bse -I$(top_srcdir)/src/71_bse +src_71_wannier_fcflags = -I$(top_builddir)/src/71_wannier -I$(top_srcdir)/src/71_wannier +src_72_response_fcflags = -I$(top_builddir)/src/72_response -I$(top_srcdir)/src/72_response +src_77_ddb_fcflags = -I$(top_builddir)/src/77_ddb -I$(top_srcdir)/src/77_ddb +src_77_suscep_fcflags = -I$(top_builddir)/src/77_suscep -I$(top_srcdir)/src/77_suscep +src_78_effpot_fcflags = -I$(top_builddir)/src/78_effpot -I$(top_srcdir)/src/78_effpot +src_78_eph_fcflags = -I$(top_builddir)/src/78_eph -I$(top_srcdir)/src/78_eph +src_79_seqpar_mpi_fcflags = -I$(top_builddir)/src/79_seqpar_mpi -I$(top_srcdir)/src/79_seqpar_mpi +src_80_rttddft_fcflags = -I$(top_builddir)/src/80_rttddft -I$(top_srcdir)/src/80_rttddft +src_80_tdep_fcflags = -I$(top_builddir)/src/80_tdep -I$(top_srcdir)/src/80_tdep +src_94_scfcv_fcflags = -I$(top_builddir)/src/94_scfcv -I$(top_srcdir)/src/94_scfcv +src_95_drive_fcflags = -I$(top_builddir)/src/95_drive -I$(top_srcdir)/src/95_drive +src_common_fcflags = -I$(top_builddir)/shared/common/src/incs -I$(top_srcdir)/shared/common/src/incs -I$(top_builddir)/shared/common/src/mods -I$(top_srcdir)/shared/common/src/mods +src_core_fcflags = -I$(top_builddir)/src/incs -I$(top_srcdir)/src/incs -I$(top_builddir)/src/mods -I$(top_srcdir)/src/mods +src_libpaw_fcflags = -I$(top_builddir)/shared/libpaw/incs -I$(top_srcdir)/shared/libpaw/incs -I$(top_builddir)/shared/libpaw/mods -I$(top_srcdir)/shared/libpaw/mods +srcdir = . +sysconfdir = ${prefix}/etc +target = x86_64-apple-darwin18.7.0 +target_alias = +target_cpu = x86_64 +target_os = darwin18.7.0 +target_vendor = apple +top_build_prefix = ../../../../ +top_builddir = ../../../.. +top_srcdir = ../../../.. +with_abinit_common = +with_bigdft = +with_config_file = +with_debug_flavor = +with_fallbacks = +with_fc_vendor = +with_fc_version = +with_fft_flavor = fftw3 +with_fftw3 = +with_gnu_ld = +with_gpu = +with_hdf5 = /opt/local +with_kokkos = +with_levmar = +with_libpaw = +with_libpsml = +with_libxc = /opt/local +with_libxml2 = +with_linalg_flavor = openblas +with_mpi = /opt/local +with_mpi_level = +with_netcdf = /opt/local +with_optim_flavor = +with_papi = +with_pfft = +with_triqs = +with_wannier90 = +with_xmlf90 = +with_yakl = +AM_CFLAGS = -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include +AM_CXXFLAGS = $(sd_triqs_cxxflags) +AM_FCFLAGS = -ffree-form -J../mods +AM_CPPFLAGS = \ + -I$(top_builddir)/shared/common/src/incs -I$(top_srcdir)/shared/common/src/incs -I$(top_builddir)/shared/common/src/mods -I$(top_srcdir)/shared/common/src/mods \ + -I$(top_builddir)/src/incs -I$(top_srcdir)/src/incs -I$(top_builddir)/src/mods -I$(top_srcdir)/src/mods \ + -I$(top_builddir)/shared/libpaw/incs -I$(top_srcdir)/shared/libpaw/incs -I$(top_builddir)/shared/libpaw/mods -I$(top_srcdir)/shared/libpaw/mods \ + \ + \ + + + +# Regular source files +lib16_kokkos_toolbox_srcs = \ + kokkos_utils.cpp \ + m_kokkos_utils.F90 + + +# Source files depending on conditionals + +# Library description +noinst_LIBRARIES = lib16_kokkos_toolbox.a +lib16_kokkos_toolbox_a_SOURCES = $(lib16_kokkos_toolbox_srcs) + +# Dependencies (inside the directory) of directory 16_kokkos_toolbox +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. +CLEANFILES = m_kokkos_utils_cpp.f90 m_kokkos_utils.$(MODEXT) +EXTRA_DIST = abinit.src abinit.dep +all: all-am + +.SUFFIXES: +.SUFFIXES: .F90 .cpp .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu shared/common/src/16_kokkos_toolbox/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu shared/common/src/16_kokkos_toolbox/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) + +lib16_kokkos_toolbox.a: $(lib16_kokkos_toolbox_a_OBJECTS) $(lib16_kokkos_toolbox_a_DEPENDENCIES) $(EXTRA_lib16_kokkos_toolbox_a_DEPENDENCIES) + $(AM_V_at)-rm -f lib16_kokkos_toolbox.a + $(AM_V_AR)$(lib16_kokkos_toolbox_a_AR) lib16_kokkos_toolbox.a $(lib16_kokkos_toolbox_a_OBJECTS) $(lib16_kokkos_toolbox_a_LIBADD) + $(AM_V_at)$(RANLIB) lib16_kokkos_toolbox.a + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +include ./$(DEPDIR)/kokkos_utils.Po # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) + +.F90.o: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ $< + +.F90.obj: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.o: + $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< + $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# $(AM_V_CXX)source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \ +# $(AM_V_CXX_no)$(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: + $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` + $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# $(AM_V_CXX)source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \ +# $(AM_V_CXX_no)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -f ./$(DEPDIR)/kokkos_utils.Po + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f ./$(DEPDIR)/kokkos_utils.Po + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ + clean-generic clean-noinstLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am + +.PRECIOUS: Makefile + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/GX-PAW/common/src/16_kokkos_toolbox/Makefile.am b/GX-PAW/common/src/16_kokkos_toolbox/Makefile.am new file mode 100644 index 00000000..742a9694 --- /dev/null +++ b/GX-PAW/common/src/16_kokkos_toolbox/Makefile.am @@ -0,0 +1,52 @@ +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-corelibs on 2024/03/16 21:07:38 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-corelibs script or its config file instead. +# + +AM_CFLAGS = @ABI_CPPFLAGS@ +AM_CXXFLAGS = $(sd_triqs_cxxflags) +AM_FCFLAGS = @FPPFLAGS@ @FCFLAGS_FREEFORM@ @FCFLAGS_MODDIR@ @sd_sys_fcflags@ @fcflags_opt_16_kokkos_toolbox@ + +AM_CPPFLAGS = \ + @src_common_fcflags@ \ + @src_core_fcflags@ \ + @src_libpaw_fcflags@ \ + @sd_gpu_cppflags@ \ + @sd_gpu_fcflags@ \ + @fc_mod_fcflags@ + +# Regular source files +lib16_kokkos_toolbox_srcs = \ + kokkos_utils.cpp \ + m_kokkos_utils.F90 + +# Source files depending on conditionals + + +# Library description +noinst_LIBRARIES = lib16_kokkos_toolbox.a + +lib16_kokkos_toolbox_a_SOURCES= $(lib16_kokkos_toolbox_srcs) + +CLEANFILES = \ + m_kokkos_utils_cpp.f90 + +EXTRA_DIST = abinit.src + +EXTRA_DIST += abinit.dep + +# Dependencies (inside the directory) of directory 16_kokkos_toolbox +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. + +CLEANFILES += \ + m_kokkos_utils.$(MODEXT) + diff --git a/GX-PAW/common/src/16_kokkos_toolbox/Makefile.in b/GX-PAW/common/src/16_kokkos_toolbox/Makefile.in new file mode 100644 index 00000000..7b3270d1 --- /dev/null +++ b/GX-PAW/common/src/16_kokkos_toolbox/Makefile.in @@ -0,0 +1,1507 @@ +# Makefile.in generated by automake 1.16.3 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2020 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-corelibs on 2024/03/16 21:07:38 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-corelibs script or its config file instead. +# + +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = shared/common/src/16_kokkos_toolbox +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/m4/arch-gpu.m4 \ + $(top_srcdir)/config/m4/arch-mpi.m4 \ + $(top_srcdir)/config/m4/auto-autotools.m4 \ + $(top_srcdir)/config/m4/auto-corelibs.m4 \ + $(top_srcdir)/config/m4/auto-debug.m4 \ + $(top_srcdir)/config/m4/auto-dirflags.m4 \ + $(top_srcdir)/config/m4/auto-env.m4 \ + $(top_srcdir)/config/m4/auto-hints.m4 \ + $(top_srcdir)/config/m4/auto-optim.m4 \ + $(top_srcdir)/config/m4/auto-options.m4 \ + $(top_srcdir)/config/m4/auto-output.m4 \ + $(top_srcdir)/config/m4/auto-triggers.m4 \ + $(top_srcdir)/config/m4/conf-atompaw.m4 \ + $(top_srcdir)/config/m4/conf-debug.m4 \ + $(top_srcdir)/config/m4/conf-fallbacks.m4 \ + $(top_srcdir)/config/m4/conf-files.m4 \ + $(top_srcdir)/config/m4/conf-init.m4 \ + $(top_srcdir)/config/m4/conf-openmp.m4 \ + $(top_srcdir)/config/m4/conf-optim.m4 \ + $(top_srcdir)/config/m4/lang-c++.m4 \ + $(top_srcdir)/config/m4/lang-c.m4 \ + $(top_srcdir)/config/m4/lang-fortran-import.m4 \ + $(top_srcdir)/config/m4/lang-fortran.m4 \ + $(top_srcdir)/config/m4/lang-python.m4 \ + $(top_srcdir)/config/m4/libxml2.m4 \ + $(top_srcdir)/config/m4/misc-display.m4 \ + $(top_srcdir)/config/m4/sd_abinit_common.m4 \ + $(top_srcdir)/config/m4/sd_arch_gpu.m4 \ + $(top_srcdir)/config/m4/sd_arch_mpi.m4 \ + $(top_srcdir)/config/m4/sd_bigdft.m4 \ + $(top_srcdir)/config/m4/sd_core.m4 \ + $(top_srcdir)/config/m4/sd_esl.m4 \ + $(top_srcdir)/config/m4/sd_fftw3.m4 \ + $(top_srcdir)/config/m4/sd_gpu_kokkos.m4 \ + $(top_srcdir)/config/m4/sd_gpu_yakl.m4 \ + $(top_srcdir)/config/m4/sd_io_hdf5.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf_fortran.m4 \ + $(top_srcdir)/config/m4/sd_levmar.m4 \ + $(top_srcdir)/config/m4/sd_libpaw.m4 \ + $(top_srcdir)/config/m4/sd_libpsml.m4 \ + $(top_srcdir)/config/m4/sd_libxc.m4 \ + $(top_srcdir)/config/m4/sd_math_fft.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_core.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_util.m4 \ + $(top_srcdir)/config/m4/sd_papi.m4 \ + $(top_srcdir)/config/m4/sd_pfft.m4 \ + $(top_srcdir)/config/m4/sd_triqs.m4 \ + $(top_srcdir)/config/m4/sd_wannier90.m4 \ + $(top_srcdir)/config/m4/sd_xmlf90.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = +lib16_kokkos_toolbox_a_AR = $(AR) $(ARFLAGS) +lib16_kokkos_toolbox_a_LIBADD = +am__objects_1 = kokkos_utils.$(OBJEXT) m_kokkos_utils.$(OBJEXT) +am_lib16_kokkos_toolbox_a_OBJECTS = $(am__objects_1) +lib16_kokkos_toolbox_a_OBJECTS = $(am_lib16_kokkos_toolbox_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/config/gnu/depcomp +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/kokkos_utils.Po +am__mv = mv -f +PPFCCOMPILE = $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) +AM_V_PPFC = $(am__v_PPFC_@AM_V@) +am__v_PPFC_ = $(am__v_PPFC_@AM_DEFAULT_V@) +am__v_PPFC_0 = @echo " PPFC " $@; +am__v_PPFC_1 = +FCLD = $(FC) +FCLINK = $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \ + $@ +AM_V_FCLD = $(am__v_FCLD_@AM_V@) +am__v_FCLD_ = $(am__v_FCLD_@AM_DEFAULT_V@) +am__v_FCLD_0 = @echo " FCLD " $@; +am__v_FCLD_1 = +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = +CXXLD = $(CXX) +CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ + -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(lib16_kokkos_toolbox_a_SOURCES) +DIST_SOURCES = $(lib16_kokkos_toolbox_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in \ + $(top_srcdir)/config/gnu/depcomp +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ABINIT_BINARY_PACKAGE = @ABINIT_BINARY_PACKAGE@ +ABINIT_COMMON_CPPFLAGS = @ABINIT_COMMON_CPPFLAGS@ +ABINIT_COMMON_FCFLAGS = @ABINIT_COMMON_FCFLAGS@ +ABINIT_COMMON_LDFLAGS = @ABINIT_COMMON_LDFLAGS@ +ABINIT_COMMON_LIBS = @ABINIT_COMMON_LIBS@ +ABINIT_TARGET = @ABINIT_TARGET@ +ABINIT_VERSION = @ABINIT_VERSION@ +ABINIT_VERSION_BASE = @ABINIT_VERSION_BASE@ +ABINIT_VERSION_BUILD = @ABINIT_VERSION_BUILD@ +ABINIT_VERSION_MAJOR = @ABINIT_VERSION_MAJOR@ +ABINIT_VERSION_MICRO = @ABINIT_VERSION_MICRO@ +ABINIT_VERSION_MINOR = @ABINIT_VERSION_MINOR@ +ABI_CPPFLAGS = @ABI_CPPFLAGS@ +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +ARFLAGS = @ARFLAGS@ +ARFLAGS_CMD = @ARFLAGS_CMD@ +ARFLAGS_DEBUG = @ARFLAGS_DEBUG@ +ARFLAGS_EXTRA = @ARFLAGS_EXTRA@ +ARFLAGS_HINTS = @ARFLAGS_HINTS@ +ARFLAGS_OPTIM = @ARFLAGS_OPTIM@ +ATOMPAW_BIN = @ATOMPAW_BIN@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BIGDFT_CPPFLAGS = @BIGDFT_CPPFLAGS@ +BIGDFT_FCFLAGS = @BIGDFT_FCFLAGS@ +BIGDFT_LDFLAGS = @BIGDFT_LDFLAGS@ +BIGDFT_LIBS = @BIGDFT_LIBS@ +BOURNE_SHELL = @BOURNE_SHELL@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CC_LDFLAGS = @CC_LDFLAGS@ +CC_LDFLAGS_DEBUG = @CC_LDFLAGS_DEBUG@ +CC_LDFLAGS_EXTRA = @CC_LDFLAGS_EXTRA@ +CC_LDFLAGS_GPU = @CC_LDFLAGS_GPU@ +CC_LDFLAGS_HINTS = @CC_LDFLAGS_HINTS@ +CC_LDFLAGS_OPTIM = @CC_LDFLAGS_OPTIM@ +CC_LIBS = @CC_LIBS@ +CC_LIBS_DEBUG = @CC_LIBS_DEBUG@ +CC_LIBS_EXTRA = @CC_LIBS_EXTRA@ +CC_LIBS_GPU = @CC_LIBS_GPU@ +CC_LIBS_HINTS = @CC_LIBS_HINTS@ +CC_LIBS_OPTIM = @CC_LIBS_OPTIM@ +CFLAGS = @CFLAGS@ +CFLAGS_DEBUG = @CFLAGS_DEBUG@ +CFLAGS_EXTRA = @CFLAGS_EXTRA@ +CFLAGS_GPU = @CFLAGS_GPU@ +CFLAGS_HINTS = @CFLAGS_HINTS@ +CFLAGS_OPTIM = @CFLAGS_OPTIM@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CPPFLAGS_DEBUG = @CPPFLAGS_DEBUG@ +CPPFLAGS_EXTRA = @CPPFLAGS_EXTRA@ +CPPFLAGS_GPU = @CPPFLAGS_GPU@ +CPPFLAGS_HINTS = @CPPFLAGS_HINTS@ +CPPFLAGS_HINTS_EXT = @CPPFLAGS_HINTS_EXT@ +CPPFLAGS_OPTIM = @CPPFLAGS_OPTIM@ +CXX = @CXX@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CXXFLAGS_DEBUG = @CXXFLAGS_DEBUG@ +CXXFLAGS_EXTRA = @CXXFLAGS_EXTRA@ +CXXFLAGS_GPU = @CXXFLAGS_GPU@ +CXXFLAGS_HINTS = @CXXFLAGS_HINTS@ +CXXFLAGS_OPTIM = @CXXFLAGS_OPTIM@ +CXX_LDFLAGS = @CXX_LDFLAGS@ +CXX_LDFLAGS_DEBUG = @CXX_LDFLAGS_DEBUG@ +CXX_LDFLAGS_EXTRA = @CXX_LDFLAGS_EXTRA@ +CXX_LDFLAGS_GPU = @CXX_LDFLAGS_GPU@ +CXX_LDFLAGS_HINTS = @CXX_LDFLAGS_HINTS@ +CXX_LDFLAGS_OPTIM = @CXX_LDFLAGS_OPTIM@ +CXX_LIBS = @CXX_LIBS@ +CXX_LIBS_DEBUG = @CXX_LIBS_DEBUG@ +CXX_LIBS_EXTRA = @CXX_LIBS_EXTRA@ +CXX_LIBS_GPU = @CXX_LIBS_GPU@ +CXX_LIBS_HINTS = @CXX_LIBS_HINTS@ +CXX_LIBS_OPTIM = @CXX_LIBS_OPTIM@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ +FCFLAGS = @FCFLAGS@ +FCFLAGS_DEBUG = @FCFLAGS_DEBUG@ +FCFLAGS_EXTRA = @FCFLAGS_EXTRA@ +FCFLAGS_F90 = @FCFLAGS_F90@ +FCFLAGS_FIXEDFORM = @FCFLAGS_FIXEDFORM@ +FCFLAGS_FREEFORM = @FCFLAGS_FREEFORM@ +FCFLAGS_HINTS = @FCFLAGS_HINTS@ +FCFLAGS_MODDIR = @FCFLAGS_MODDIR@ +FCFLAGS_OPENMP = @FCFLAGS_OPENMP@ +FCFLAGS_OPENMP_OFFLOAD = @FCFLAGS_OPENMP_OFFLOAD@ +FCFLAGS_OPTIM = @FCFLAGS_OPTIM@ +FCLIBS = @FCLIBS@ +FC_LDFLAGS = @FC_LDFLAGS@ +FC_LDFLAGS_DEBUG = @FC_LDFLAGS_DEBUG@ +FC_LDFLAGS_EXTRA = @FC_LDFLAGS_EXTRA@ +FC_LDFLAGS_HINTS = @FC_LDFLAGS_HINTS@ +FC_LDFLAGS_OPTIM = @FC_LDFLAGS_OPTIM@ +FC_LIBS = @FC_LIBS@ +FC_LIBS_DEBUG = @FC_LIBS_DEBUG@ +FC_LIBS_EXTRA = @FC_LIBS_EXTRA@ +FC_LIBS_HINTS = @FC_LIBS_HINTS@ +FC_LIBS_OPTIM = @FC_LIBS_OPTIM@ +FC_NOWRAP = @FC_NOWRAP@ +FFLAGS = @FFLAGS@ +FFTW3_CFLAGS = @FFTW3_CFLAGS@ +FFTW3_CPPFLAGS = @FFTW3_CPPFLAGS@ +FFTW3_FCFLAGS = @FFTW3_FCFLAGS@ +FFTW3_LDFLAGS = @FFTW3_LDFLAGS@ +FFTW3_LIBS = @FFTW3_LIBS@ +FFT_CFLAGS = @FFT_CFLAGS@ +FFT_FCFLAGS = @FFT_FCFLAGS@ +FPP = @FPP@ +FPPFLAGS = @FPPFLAGS@ +FPPFLAGS_DEBUG = @FPPFLAGS_DEBUG@ +FPPFLAGS_EXTRA = @FPPFLAGS_EXTRA@ +FPPFLAGS_HINTS = @FPPFLAGS_HINTS@ +FPPFLAGS_OPTIM = @FPPFLAGS_OPTIM@ +GPU_ARCH = @GPU_ARCH@ +GPU_CFLAGS = @GPU_CFLAGS@ +GPU_CPPFLAGS = @GPU_CPPFLAGS@ +GPU_CXXFLAGS = @GPU_CXXFLAGS@ +GPU_FCFLAGS = @GPU_FCFLAGS@ +GPU_LDFLAGS = @GPU_LDFLAGS@ +GPU_LIBS = @GPU_LIBS@ +GRAPHATOM_BIN = @GRAPHATOM_BIN@ +GREP = @GREP@ +H5CC = @H5CC@ +HDF5_CFLAGS = @HDF5_CFLAGS@ +HDF5_CPPFLAGS = @HDF5_CPPFLAGS@ +HDF5_CXXFLAGS = @HDF5_CXXFLAGS@ +HDF5_FCFLAGS = @HDF5_FCFLAGS@ +HDF5_LDFLAGS = @HDF5_LDFLAGS@ +HDF5_LIBS = @HDF5_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +LDFLAGS = @LDFLAGS@ +LEVMAR_CFLAGS = @LEVMAR_CFLAGS@ +LEVMAR_CPPFLAGS = @LEVMAR_CPPFLAGS@ +LEVMAR_LDFLAGS = @LEVMAR_LDFLAGS@ +LEVMAR_LIBS = @LEVMAR_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPAW_CPPFLAGS = @LIBPAW_CPPFLAGS@ +LIBPAW_FCFLAGS = @LIBPAW_FCFLAGS@ +LIBPAW_LDFLAGS = @LIBPAW_LDFLAGS@ +LIBPAW_LIBS = @LIBPAW_LIBS@ +LIBPSML_CPPFLAGS = @LIBPSML_CPPFLAGS@ +LIBPSML_FCFLAGS = @LIBPSML_FCFLAGS@ +LIBPSML_LDFLAGS = @LIBPSML_LDFLAGS@ +LIBPSML_LIBS = @LIBPSML_LIBS@ +LIBS = @LIBS@ +LIBXC_CFLAGS = @LIBXC_CFLAGS@ +LIBXC_CPPFLAGS = @LIBXC_CPPFLAGS@ +LIBXC_FCFLAGS = @LIBXC_FCFLAGS@ +LIBXC_LDFLAGS = @LIBXC_LDFLAGS@ +LIBXC_LIBS = @LIBXC_LIBS@ +LIBXML2_CPPFLAGS = @LIBXML2_CPPFLAGS@ +LIBXML2_FCFLAGS = @LIBXML2_FCFLAGS@ +LIBXML2_LIBS = @LIBXML2_LIBS@ +LINALG_CFLAGS = @LINALG_CFLAGS@ +LINALG_CPPFLAGS = @LINALG_CPPFLAGS@ +LINALG_CXXFLAGS = @LINALG_CXXFLAGS@ +LINALG_FCFLAGS = @LINALG_FCFLAGS@ +LINALG_LDFLAGS = @LINALG_LDFLAGS@ +LINALG_LIBS = @LINALG_LIBS@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODEXT = @MODEXT@ +MPI_CFLAGS = @MPI_CFLAGS@ +MPI_CPPFLAGS = @MPI_CPPFLAGS@ +MPI_CXXFLAGS = @MPI_CXXFLAGS@ +MPI_FCFLAGS = @MPI_FCFLAGS@ +MPI_LDFLAGS = @MPI_LDFLAGS@ +MPI_LIBS = @MPI_LIBS@ +MV = @MV@ +NETCDF_CFLAGS = @NETCDF_CFLAGS@ +NETCDF_CPPFLAGS = @NETCDF_CPPFLAGS@ +NETCDF_CXXFLAGS = @NETCDF_CXXFLAGS@ +NETCDF_FCFLAGS = @NETCDF_FCFLAGS@ +NETCDF_FORTRAN_CFLAGS = @NETCDF_FORTRAN_CFLAGS@ +NETCDF_FORTRAN_CPPFLAGS = @NETCDF_FORTRAN_CPPFLAGS@ +NETCDF_FORTRAN_CXXFLAGS = @NETCDF_FORTRAN_CXXFLAGS@ +NETCDF_FORTRAN_FCFLAGS = @NETCDF_FORTRAN_FCFLAGS@ +NETCDF_FORTRAN_LDFLAGS = @NETCDF_FORTRAN_LDFLAGS@ +NETCDF_FORTRAN_LIBS = @NETCDF_FORTRAN_LIBS@ +NETCDF_LDFLAGS = @NETCDF_LDFLAGS@ +NETCDF_LIBS = @NETCDF_LIBS@ +NVCC = @NVCC@ +NVCC_CFLAGS = @NVCC_CFLAGS@ +NVCC_CPPFLAGS = @NVCC_CPPFLAGS@ +NVCC_LDFLAGS = @NVCC_LDFLAGS@ +NVCC_LIBS = @NVCC_LIBS@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PAPI_CFLAGS = @PAPI_CFLAGS@ +PAPI_CPPFLAGS = @PAPI_CPPFLAGS@ +PAPI_LDFLAGS = @PAPI_LDFLAGS@ +PAPI_LIBS = @PAPI_LIBS@ +PATCH = @PATCH@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PFFT_CFLAGS = @PFFT_CFLAGS@ +PFFT_CPPFLAGS = @PFFT_CPPFLAGS@ +PFFT_LDFLAGS = @PFFT_LDFLAGS@ +PFFT_LIBS = @PFFT_LIBS@ +PYFLAGS = @PYFLAGS@ +PYTHON = @PYTHON@ +PYTHON_CONFIG = @PYTHON_CONFIG@ +PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ +RANLIB = @RANLIB@ +REALPATH = @REALPATH@ +RM = @RM@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +TAR = @TAR@ +TRIQS_CFLAGS = @TRIQS_CFLAGS@ +TRIQS_CPPFLAGS = @TRIQS_CPPFLAGS@ +TRIQS_CXXFLAGS = @TRIQS_CXXFLAGS@ +TRIQS_LDFLAGS = @TRIQS_LDFLAGS@ +TRIQS_LIBS = @TRIQS_LIBS@ +TRUE_CPP = @TRUE_CPP@ +VERSION = @VERSION@ +WANNIER90_CPPFLAGS = @WANNIER90_CPPFLAGS@ +WANNIER90_FCFLAGS = @WANNIER90_FCFLAGS@ +WANNIER90_LDFLAGS = @WANNIER90_LDFLAGS@ +WANNIER90_LIBS = @WANNIER90_LIBS@ +XML2_CONFIG = @XML2_CONFIG@ +XMLF90_CPPFLAGS = @XMLF90_CPPFLAGS@ +XMLF90_FCFLAGS = @XMLF90_FCFLAGS@ +XMLF90_LDFLAGS = @XMLF90_LDFLAGS@ +XMLF90_LIBS = @XMLF90_LIBS@ +XML_CPPFLAGS = @XML_CPPFLAGS@ +XML_LIBS = @XML_LIBS@ +XPP = @XPP@ +XPPFLAGS = @XPPFLAGS@ +XPPFLAGS_DEBUG = @XPPFLAGS_DEBUG@ +XPPFLAGS_EXTRA = @XPPFLAGS_EXTRA@ +XPPFLAGS_OPTIM = @XPPFLAGS_OPTIM@ +YAKL_CPPFLAGS = @YAKL_CPPFLAGS@ +YAKL_FCFLAGS = @YAKL_FCFLAGS@ +YAKL_LDFLAGS = @YAKL_LDFLAGS@ +YAKL_LIBS = @YAKL_LIBS@ +abi_ac_distcheck = @abi_ac_distcheck@ +abi_ac_version = @abi_ac_version@ +abi_am_version = @abi_am_version@ +abi_avx_safe_mode_enable = @abi_avx_safe_mode_enable@ +abi_bse_unpacked_enable = @abi_bse_unpacked_enable@ +abi_cc_path = @abi_cc_path@ +abi_cc_vendor = @abi_cc_vendor@ +abi_cc_version = @abi_cc_version@ +abi_cclock_enable = @abi_cclock_enable@ +abi_cpp_path = @abi_cpp_path@ +abi_cpu_64bits = @abi_cpu_64bits@ +abi_cpu_bits = @abi_cpu_bits@ +abi_cpu_model = @abi_cpu_model@ +abi_cpu_platform = @abi_cpu_platform@ +abi_cpu_spec = @abi_cpu_spec@ +abi_cpu_vendor = @abi_cpu_vendor@ +abi_crpa_optim_enable = @abi_crpa_optim_enable@ +abi_cxx_path = @abi_cxx_path@ +abi_cxx_vendor = @abi_cxx_vendor@ +abi_cxx_version = @abi_cxx_version@ +abi_debug_flavor = @abi_debug_flavor@ +abi_exports_enable = @abi_exports_enable@ +abi_fbk_abinit_common_ok = @abi_fbk_abinit_common_ok@ +abi_fbk_bigdft_ok = @abi_fbk_bigdft_ok@ +abi_fbk_config = @abi_fbk_config@ +abi_fbk_enable = @abi_fbk_enable@ +abi_fbk_fft_ok = @abi_fbk_fft_ok@ +abi_fbk_fftw3_ok = @abi_fbk_fftw3_ok@ +abi_fbk_gpu_ok = @abi_fbk_gpu_ok@ +abi_fbk_hdf5_ok = @abi_fbk_hdf5_ok@ +abi_fbk_init = @abi_fbk_init@ +abi_fbk_kokkos_ok = @abi_fbk_kokkos_ok@ +abi_fbk_levmar_ok = @abi_fbk_levmar_ok@ +abi_fbk_libpaw_ok = @abi_fbk_libpaw_ok@ +abi_fbk_libpsml_ok = @abi_fbk_libpsml_ok@ +abi_fbk_libxc_ok = @abi_fbk_libxc_ok@ +abi_fbk_libxml2_ok = @abi_fbk_libxml2_ok@ +abi_fbk_linalg_ok = @abi_fbk_linalg_ok@ +abi_fbk_list = @abi_fbk_list@ +abi_fbk_mpi_ok = @abi_fbk_mpi_ok@ +abi_fbk_netcdf_fortran_ok = @abi_fbk_netcdf_fortran_ok@ +abi_fbk_netcdf_ok = @abi_fbk_netcdf_ok@ +abi_fbk_papi_ok = @abi_fbk_papi_ok@ +abi_fbk_pfft_ok = @abi_fbk_pfft_ok@ +abi_fbk_prefix = @abi_fbk_prefix@ +abi_fbk_required = @abi_fbk_required@ +abi_fbk_triqs_ok = @abi_fbk_triqs_ok@ +abi_fbk_wannier90_ok = @abi_fbk_wannier90_ok@ +abi_fbk_xmlf90_ok = @abi_fbk_xmlf90_ok@ +abi_fbk_yakl_ok = @abi_fbk_yakl_ok@ +abi_fc_path = @abi_fc_path@ +abi_fc_vendor = @abi_fc_vendor@ +abi_fc_version = @abi_fc_version@ +abi_fc_wrap = @abi_fc_wrap@ +abi_fc_wrapper_enable = @abi_fc_wrapper_enable@ +abi_fpp_path = @abi_fpp_path@ +abi_gpu_arch = @abi_gpu_arch@ +abi_gpu_fcflags = @abi_gpu_fcflags@ +abi_gpu_flavor = @abi_gpu_flavor@ +abi_gpu_hip_libdir = @abi_gpu_hip_libdir@ +abi_gpu_incs = @abi_gpu_incs@ +abi_gpu_ldflags = @abi_gpu_ldflags@ +abi_gpu_libs = @abi_gpu_libs@ +abi_gpu_nvtx_v3 = @abi_gpu_nvtx_v3@ +abi_gpu_roctx = @abi_gpu_roctx@ +abi_gw_dpc_enable = @abi_gw_dpc_enable@ +abi_hints_enable = @abi_hints_enable@ +abi_libtetra_enable = @abi_libtetra_enable@ +abi_libxml2_cppflags = @abi_libxml2_cppflags@ +abi_libxml2_enable = @abi_libxml2_enable@ +abi_libxml2_fcflags = @abi_libxml2_fcflags@ +abi_libxml2_init = @abi_libxml2_init@ +abi_libxml2_ldflags = @abi_libxml2_ldflags@ +abi_libxml2_libs = @abi_libxml2_libs@ +abi_libxml2_ok = @abi_libxml2_ok@ +abi_libxml2_prefix = @abi_libxml2_prefix@ +abi_lotf_enable = @abi_lotf_enable@ +abi_lt_version = @abi_lt_version@ +abi_m4_version = @abi_m4_version@ +abi_memory_profiling_enable = @abi_memory_profiling_enable@ +abi_mpi_cflags = @abi_mpi_cflags@ +abi_mpi_cppflags = @abi_mpi_cppflags@ +abi_mpi_cxxflags = @abi_mpi_cxxflags@ +abi_mpi_enable = @abi_mpi_enable@ +abi_mpi_fcflags = @abi_mpi_fcflags@ +abi_mpi_flavor = @abi_mpi_flavor@ +abi_mpi_gpu_aware_enable = @abi_mpi_gpu_aware_enable@ +abi_mpi_incs = @abi_mpi_incs@ +abi_mpi_inplace_enable = @abi_mpi_inplace_enable@ +abi_mpi_interfaces_bugfix_enable = @abi_mpi_interfaces_bugfix_enable@ +abi_mpi_io_default_enable = @abi_mpi_io_default_enable@ +abi_mpi_io_enable = @abi_mpi_io_enable@ +abi_mpi_ldflags = @abi_mpi_ldflags@ +abi_mpi_level = @abi_mpi_level@ +abi_mpi_libs = @abi_mpi_libs@ +abi_netcdf_default_enable = @abi_netcdf_default_enable@ +abi_openmp_enable = @abi_openmp_enable@ +abi_openmp_offload_enable = @abi_openmp_offload_enable@ +abi_optim_flavor = @abi_optim_flavor@ +abi_python_invocation_enable = @abi_python_invocation_enable@ +abi_source_debug_enable = @abi_source_debug_enable@ +abi_stdin_enable = @abi_stdin_enable@ +abi_sys_spec = @abi_sys_spec@ +abi_timer_enable = @abi_timer_enable@ +abi_triqs_v1_4_enable = @abi_triqs_v1_4_enable@ +abi_triqs_v2_0_enable = @abi_triqs_v2_0_enable@ +abi_zdot_bugfix_enable = @abi_zdot_bugfix_enable@ +abinit_bindir = @abinit_bindir@ +abinit_builddir = @abinit_builddir@ +abinit_chkdir = @abinit_chkdir@ +abinit_datdir = @abinit_datdir@ +abinit_docdir = @abinit_docdir@ +abinit_incdir = @abinit_incdir@ +abinit_libdir = @abinit_libdir@ +abinit_mandir = @abinit_mandir@ +abinit_prefix = @abinit_prefix@ +abinit_srcdir = @abinit_srcdir@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_FC = @ac_ct_FC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cc_info_string = @cc_info_string@ +cxx_info_string = @cxx_info_string@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +enable_avx_safe_mode = @enable_avx_safe_mode@ +enable_bse_unpacked = @enable_bse_unpacked@ +enable_cclock = @enable_cclock@ +enable_crpa_optim = @enable_crpa_optim@ +enable_exports = @enable_exports@ +enable_fc_wrapper = @enable_fc_wrapper@ +enable_gw_dpc = @enable_gw_dpc@ +enable_hints = @enable_hints@ +enable_libtetra = @enable_libtetra@ +enable_lotf = @enable_lotf@ +enable_memory_profiling = @enable_memory_profiling@ +enable_mpi_gpu_aware = @enable_mpi_gpu_aware@ +enable_mpi_inplace = @enable_mpi_inplace@ +enable_mpi_interfaces_bugfix = @enable_mpi_interfaces_bugfix@ +enable_mpi_io = @enable_mpi_io@ +enable_mpi_io_default = @enable_mpi_io_default@ +enable_netcdf_default = @enable_netcdf_default@ +enable_openmp = @enable_openmp@ +enable_openmp_offload = @enable_openmp_offload@ +enable_python_invocation = @enable_python_invocation@ +enable_shared = @enable_shared@ +enable_source_debug = @enable_source_debug@ +enable_static = @enable_static@ +enable_stdin = @enable_stdin@ +enable_timer = @enable_timer@ +enable_triqs_v1_4 = @enable_triqs_v1_4@ +enable_triqs_v2_0 = @enable_triqs_v2_0@ +enable_zdot_bugfix = @enable_zdot_bugfix@ +exec_prefix = @exec_prefix@ +fc_info_string = @fc_info_string@ +fc_mod_fcflags = @fc_mod_fcflags@ +fc_timing = @fc_timing@ +fcflags_opt_02_clib = @fcflags_opt_02_clib@ +fcflags_opt_10_defs = @fcflags_opt_10_defs@ +fcflags_opt_11_memory_mpi = @fcflags_opt_11_memory_mpi@ +fcflags_opt_12_hide_mpi = @fcflags_opt_12_hide_mpi@ +fcflags_opt_14_hidewrite = @fcflags_opt_14_hidewrite@ +fcflags_opt_16_hideleave = @fcflags_opt_16_hideleave@ +fcflags_opt_16_kokkos_toolbox = @fcflags_opt_16_kokkos_toolbox@ +fcflags_opt_17_gpu_toolbox = @fcflags_opt_17_gpu_toolbox@ +fcflags_opt_17_libtetra_ext = @fcflags_opt_17_libtetra_ext@ +fcflags_opt_17_minimax = @fcflags_opt_17_minimax@ +fcflags_opt_17_yaml_out = @fcflags_opt_17_yaml_out@ +fcflags_opt_18_timing = @fcflags_opt_18_timing@ +fcflags_opt_21_hashfuncs = @fcflags_opt_21_hashfuncs@ +fcflags_opt_27_toolbox_oop = @fcflags_opt_27_toolbox_oop@ +fcflags_opt_28_numeric_noabirule = @fcflags_opt_28_numeric_noabirule@ +fcflags_opt_29_kpoints = @fcflags_opt_29_kpoints@ +fcflags_opt_32_util = @fcflags_opt_32_util@ +fcflags_opt_33_xc_lowlevel = @fcflags_opt_33_xc_lowlevel@ +fcflags_opt_39_libpaw = @fcflags_opt_39_libpaw@ +fcflags_opt_41_geometry = @fcflags_opt_41_geometry@ +fcflags_opt_42_nlstrain = @fcflags_opt_42_nlstrain@ +fcflags_opt_42_parser = @fcflags_opt_42_parser@ +fcflags_opt_43_ptgroups = @fcflags_opt_43_ptgroups@ +fcflags_opt_43_wvl_wrappers = @fcflags_opt_43_wvl_wrappers@ +fcflags_opt_44_abitools = @fcflags_opt_44_abitools@ +fcflags_opt_44_abitypes_defs = @fcflags_opt_44_abitypes_defs@ +fcflags_opt_44_manage_kokkos = @fcflags_opt_44_manage_kokkos@ +fcflags_opt_45_geomoptim = @fcflags_opt_45_geomoptim@ +fcflags_opt_45_xgTools = @fcflags_opt_45_xgTools@ +fcflags_opt_46_ghc_omp = @fcflags_opt_46_ghc_omp@ +fcflags_opt_46_manage_cuda = @fcflags_opt_46_manage_cuda@ +fcflags_opt_48_diago = @fcflags_opt_48_diago@ +fcflags_opt_49_gw_toolbox_oop = @fcflags_opt_49_gw_toolbox_oop@ +fcflags_opt_51_manage_mpi = @fcflags_opt_51_manage_mpi@ +fcflags_opt_52_fft_mpi_noabirule = @fcflags_opt_52_fft_mpi_noabirule@ +fcflags_opt_53_ffts = @fcflags_opt_53_ffts@ +fcflags_opt_54_spacepar = @fcflags_opt_54_spacepar@ +fcflags_opt_55_abiutil = @fcflags_opt_55_abiutil@ +fcflags_opt_56_io_mpi = @fcflags_opt_56_io_mpi@ +fcflags_opt_56_mixing = @fcflags_opt_56_mixing@ +fcflags_opt_56_recipspace = @fcflags_opt_56_recipspace@ +fcflags_opt_56_xc = @fcflags_opt_56_xc@ +fcflags_opt_57_iopsp_parser = @fcflags_opt_57_iopsp_parser@ +fcflags_opt_57_iovars = @fcflags_opt_57_iovars@ +fcflags_opt_61_occeig = @fcflags_opt_61_occeig@ +fcflags_opt_62_cg_noabirule = @fcflags_opt_62_cg_noabirule@ +fcflags_opt_62_ctqmc = @fcflags_opt_62_ctqmc@ +fcflags_opt_62_iowfdenpot = @fcflags_opt_62_iowfdenpot@ +fcflags_opt_62_poisson = @fcflags_opt_62_poisson@ +fcflags_opt_62_wvl_wfs = @fcflags_opt_62_wvl_wfs@ +fcflags_opt_64_psp = @fcflags_opt_64_psp@ +fcflags_opt_65_lotf_base = @fcflags_opt_65_lotf_base@ +fcflags_opt_65_paw = @fcflags_opt_65_paw@ +fcflags_opt_66_nonlocal = @fcflags_opt_66_nonlocal@ +fcflags_opt_66_vdwxc = @fcflags_opt_66_vdwxc@ +fcflags_opt_66_wfs = @fcflags_opt_66_wfs@ +fcflags_opt_67_common = @fcflags_opt_67_common@ +fcflags_opt_67_python_invocation_ext = @fcflags_opt_67_python_invocation_ext@ +fcflags_opt_67_triqs_ext = @fcflags_opt_67_triqs_ext@ +fcflags_opt_68_dmft = @fcflags_opt_68_dmft@ +fcflags_opt_68_lotf = @fcflags_opt_68_lotf@ +fcflags_opt_68_recursion = @fcflags_opt_68_recursion@ +fcflags_opt_68_rsprc = @fcflags_opt_68_rsprc@ +fcflags_opt_69_wfdesc = @fcflags_opt_69_wfdesc@ +fcflags_opt_70_gw = @fcflags_opt_70_gw@ +fcflags_opt_71_bse = @fcflags_opt_71_bse@ +fcflags_opt_71_wannier = @fcflags_opt_71_wannier@ +fcflags_opt_72_response = @fcflags_opt_72_response@ +fcflags_opt_77_ddb = @fcflags_opt_77_ddb@ +fcflags_opt_77_suscep = @fcflags_opt_77_suscep@ +fcflags_opt_78_effpot = @fcflags_opt_78_effpot@ +fcflags_opt_78_eph = @fcflags_opt_78_eph@ +fcflags_opt_79_seqpar_mpi = @fcflags_opt_79_seqpar_mpi@ +fcflags_opt_80_rttddft = @fcflags_opt_80_rttddft@ +fcflags_opt_80_tdep = @fcflags_opt_80_tdep@ +fcflags_opt_94_scfcv = @fcflags_opt_94_scfcv@ +fcflags_opt_95_drive = @fcflags_opt_95_drive@ +fcflags_opt_98_main = @fcflags_opt_98_main@ +fcflags_opt_bigdft = @fcflags_opt_bigdft@ +fcflags_opt_default = @fcflags_opt_default@ +fcflags_opt_hdf5 = @fcflags_opt_hdf5@ +fcflags_opt_levmar = @fcflags_opt_levmar@ +fcflags_opt_libpsml = @fcflags_opt_libpsml@ +fcflags_opt_libxc = @fcflags_opt_libxc@ +fcflags_opt_libxml2 = @fcflags_opt_libxml2@ +fcflags_opt_linalg = @fcflags_opt_linalg@ +fcflags_opt_netcdf = @fcflags_opt_netcdf@ +fcflags_opt_netcdf_fortran = @fcflags_opt_netcdf_fortran@ +fcflags_opt_papi = @fcflags_opt_papi@ +fcflags_opt_triqs = @fcflags_opt_triqs@ +fcflags_opt_wannier90 = @fcflags_opt_wannier90@ +fcflags_opt_xmlf90 = @fcflags_opt_xmlf90@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sd_abinit_common_cppflags = @sd_abinit_common_cppflags@ +sd_abinit_common_enable = @sd_abinit_common_enable@ +sd_abinit_common_enable_def = @sd_abinit_common_enable_def@ +sd_abinit_common_fcflags = @sd_abinit_common_fcflags@ +sd_abinit_common_init = @sd_abinit_common_init@ +sd_abinit_common_ldflags = @sd_abinit_common_ldflags@ +sd_abinit_common_libs = @sd_abinit_common_libs@ +sd_abinit_common_ok = @sd_abinit_common_ok@ +sd_abinit_common_options = @sd_abinit_common_options@ +sd_abinit_common_policy = @sd_abinit_common_policy@ +sd_abinit_common_status = @sd_abinit_common_status@ +sd_bigdft_cppflags = @sd_bigdft_cppflags@ +sd_bigdft_enable = @sd_bigdft_enable@ +sd_bigdft_enable_def = @sd_bigdft_enable_def@ +sd_bigdft_fcflags = @sd_bigdft_fcflags@ +sd_bigdft_init = @sd_bigdft_init@ +sd_bigdft_ldflags = @sd_bigdft_ldflags@ +sd_bigdft_libs = @sd_bigdft_libs@ +sd_bigdft_ok = @sd_bigdft_ok@ +sd_bigdft_options = @sd_bigdft_options@ +sd_bigdft_policy = @sd_bigdft_policy@ +sd_bigdft_status = @sd_bigdft_status@ +sd_fft_cflags = @sd_fft_cflags@ +sd_fft_choices = @sd_fft_choices@ +sd_fft_cppflags = @sd_fft_cppflags@ +sd_fft_cxxflags = @sd_fft_cxxflags@ +sd_fft_enable = @sd_fft_enable@ +sd_fft_fcflags = @sd_fft_fcflags@ +sd_fft_flavor = @sd_fft_flavor@ +sd_fft_init = @sd_fft_init@ +sd_fft_ldflags = @sd_fft_ldflags@ +sd_fft_libs = @sd_fft_libs@ +sd_fft_ok = @sd_fft_ok@ +sd_fftw3_cflags = @sd_fftw3_cflags@ +sd_fftw3_cppflags = @sd_fftw3_cppflags@ +sd_fftw3_enable = @sd_fftw3_enable@ +sd_fftw3_enable_def = @sd_fftw3_enable_def@ +sd_fftw3_fcflags = @sd_fftw3_fcflags@ +sd_fftw3_init = @sd_fftw3_init@ +sd_fftw3_ldflags = @sd_fftw3_ldflags@ +sd_fftw3_libs = @sd_fftw3_libs@ +sd_fftw3_ok = @sd_fftw3_ok@ +sd_fftw3_options = @sd_fftw3_options@ +sd_fftw3_policy = @sd_fftw3_policy@ +sd_fftw3_status = @sd_fftw3_status@ +sd_gpu_cflags = @sd_gpu_cflags@ +sd_gpu_cppflags = @sd_gpu_cppflags@ +sd_gpu_cxxflags = @sd_gpu_cxxflags@ +sd_gpu_enable = @sd_gpu_enable@ +sd_gpu_enable_def = @sd_gpu_enable_def@ +sd_gpu_fcflags = @sd_gpu_fcflags@ +sd_gpu_init = @sd_gpu_init@ +sd_gpu_ldflags = @sd_gpu_ldflags@ +sd_gpu_libs = @sd_gpu_libs@ +sd_gpu_ok = @sd_gpu_ok@ +sd_gpu_options = @sd_gpu_options@ +sd_gpu_policy = @sd_gpu_policy@ +sd_gpu_prefix = @sd_gpu_prefix@ +sd_gpu_status = @sd_gpu_status@ +sd_hdf5_cflags = @sd_hdf5_cflags@ +sd_hdf5_cppflags = @sd_hdf5_cppflags@ +sd_hdf5_cxxflags = @sd_hdf5_cxxflags@ +sd_hdf5_enable = @sd_hdf5_enable@ +sd_hdf5_enable_def = @sd_hdf5_enable_def@ +sd_hdf5_enable_fc = @sd_hdf5_enable_fc@ +sd_hdf5_fcflags = @sd_hdf5_fcflags@ +sd_hdf5_h5cc = @sd_hdf5_h5cc@ +sd_hdf5_h5fc = @sd_hdf5_h5fc@ +sd_hdf5_init = @sd_hdf5_init@ +sd_hdf5_ldflags = @sd_hdf5_ldflags@ +sd_hdf5_libs = @sd_hdf5_libs@ +sd_hdf5_ok = @sd_hdf5_ok@ +sd_hdf5_options = @sd_hdf5_options@ +sd_hdf5_policy = @sd_hdf5_policy@ +sd_hdf5_status = @sd_hdf5_status@ +sd_kokkos_cppflags = @sd_kokkos_cppflags@ +sd_kokkos_cxxflags = @sd_kokkos_cxxflags@ +sd_kokkos_enable = @sd_kokkos_enable@ +sd_kokkos_enable_def = @sd_kokkos_enable_def@ +sd_kokkos_init = @sd_kokkos_init@ +sd_kokkos_ldflags = @sd_kokkos_ldflags@ +sd_kokkos_libs = @sd_kokkos_libs@ +sd_kokkos_ok = @sd_kokkos_ok@ +sd_kokkos_options = @sd_kokkos_options@ +sd_kokkos_policy = @sd_kokkos_policy@ +sd_kokkos_status = @sd_kokkos_status@ +sd_levmar_cflags = @sd_levmar_cflags@ +sd_levmar_cppflags = @sd_levmar_cppflags@ +sd_levmar_enable = @sd_levmar_enable@ +sd_levmar_enable_def = @sd_levmar_enable_def@ +sd_levmar_init = @sd_levmar_init@ +sd_levmar_ldflags = @sd_levmar_ldflags@ +sd_levmar_libs = @sd_levmar_libs@ +sd_levmar_ok = @sd_levmar_ok@ +sd_levmar_options = @sd_levmar_options@ +sd_levmar_policy = @sd_levmar_policy@ +sd_levmar_status = @sd_levmar_status@ +sd_libpaw_cppflags = @sd_libpaw_cppflags@ +sd_libpaw_enable = @sd_libpaw_enable@ +sd_libpaw_enable_def = @sd_libpaw_enable_def@ +sd_libpaw_fcflags = @sd_libpaw_fcflags@ +sd_libpaw_init = @sd_libpaw_init@ +sd_libpaw_ldflags = @sd_libpaw_ldflags@ +sd_libpaw_libs = @sd_libpaw_libs@ +sd_libpaw_ok = @sd_libpaw_ok@ +sd_libpaw_options = @sd_libpaw_options@ +sd_libpaw_policy = @sd_libpaw_policy@ +sd_libpaw_status = @sd_libpaw_status@ +sd_libpsml_cppflags = @sd_libpsml_cppflags@ +sd_libpsml_enable = @sd_libpsml_enable@ +sd_libpsml_enable_def = @sd_libpsml_enable_def@ +sd_libpsml_fcflags = @sd_libpsml_fcflags@ +sd_libpsml_init = @sd_libpsml_init@ +sd_libpsml_ldflags = @sd_libpsml_ldflags@ +sd_libpsml_libs = @sd_libpsml_libs@ +sd_libpsml_ok = @sd_libpsml_ok@ +sd_libpsml_options = @sd_libpsml_options@ +sd_libpsml_policy = @sd_libpsml_policy@ +sd_libpsml_status = @sd_libpsml_status@ +sd_libxc_cflags = @sd_libxc_cflags@ +sd_libxc_cppflags = @sd_libxc_cppflags@ +sd_libxc_enable = @sd_libxc_enable@ +sd_libxc_enable_def = @sd_libxc_enable_def@ +sd_libxc_enable_fc = @sd_libxc_enable_fc@ +sd_libxc_fcflags = @sd_libxc_fcflags@ +sd_libxc_init = @sd_libxc_init@ +sd_libxc_ldflags = @sd_libxc_ldflags@ +sd_libxc_libs = @sd_libxc_libs@ +sd_libxc_ok = @sd_libxc_ok@ +sd_libxc_options = @sd_libxc_options@ +sd_libxc_policy = @sd_libxc_policy@ +sd_libxc_status = @sd_libxc_status@ +sd_linalg_cflags = @sd_linalg_cflags@ +sd_linalg_choices = @sd_linalg_choices@ +sd_linalg_cppflags = @sd_linalg_cppflags@ +sd_linalg_cxxflags = @sd_linalg_cxxflags@ +sd_linalg_enable = @sd_linalg_enable@ +sd_linalg_fcflags = @sd_linalg_fcflags@ +sd_linalg_flavor = @sd_linalg_flavor@ +sd_linalg_has_elpa = @sd_linalg_has_elpa@ +sd_linalg_has_scalapack = @sd_linalg_has_scalapack@ +sd_linalg_init = @sd_linalg_init@ +sd_linalg_ldflags = @sd_linalg_ldflags@ +sd_linalg_libs = @sd_linalg_libs@ +sd_linalg_ok = @sd_linalg_ok@ +sd_mpi_cc = @sd_mpi_cc@ +sd_mpi_cflags = @sd_mpi_cflags@ +sd_mpi_cppflags = @sd_mpi_cppflags@ +sd_mpi_cxx = @sd_mpi_cxx@ +sd_mpi_enable = @sd_mpi_enable@ +sd_mpi_enable_cxx = @sd_mpi_enable_cxx@ +sd_mpi_enable_def = @sd_mpi_enable_def@ +sd_mpi_enable_fc = @sd_mpi_enable_fc@ +sd_mpi_fc = @sd_mpi_fc@ +sd_mpi_fcflags = @sd_mpi_fcflags@ +sd_mpi_init = @sd_mpi_init@ +sd_mpi_ldflags = @sd_mpi_ldflags@ +sd_mpi_libs = @sd_mpi_libs@ +sd_mpi_ok = @sd_mpi_ok@ +sd_mpi_options = @sd_mpi_options@ +sd_mpi_policy = @sd_mpi_policy@ +sd_mpi_status = @sd_mpi_status@ +sd_netcdf_cflags = @sd_netcdf_cflags@ +sd_netcdf_cppflags = @sd_netcdf_cppflags@ +sd_netcdf_enable = @sd_netcdf_enable@ +sd_netcdf_enable_def = @sd_netcdf_enable_def@ +sd_netcdf_fcflags = @sd_netcdf_fcflags@ +sd_netcdf_fortran_cflags = @sd_netcdf_fortran_cflags@ +sd_netcdf_fortran_cppflags = @sd_netcdf_fortran_cppflags@ +sd_netcdf_fortran_enable = @sd_netcdf_fortran_enable@ +sd_netcdf_fortran_enable_def = @sd_netcdf_fortran_enable_def@ +sd_netcdf_fortran_fcflags = @sd_netcdf_fortran_fcflags@ +sd_netcdf_fortran_init = @sd_netcdf_fortran_init@ +sd_netcdf_fortran_ldflags = @sd_netcdf_fortran_ldflags@ +sd_netcdf_fortran_libs = @sd_netcdf_fortran_libs@ +sd_netcdf_fortran_ok = @sd_netcdf_fortran_ok@ +sd_netcdf_fortran_options = @sd_netcdf_fortran_options@ +sd_netcdf_fortran_policy = @sd_netcdf_fortran_policy@ +sd_netcdf_fortran_status = @sd_netcdf_fortran_status@ +sd_netcdf_init = @sd_netcdf_init@ +sd_netcdf_ldflags = @sd_netcdf_ldflags@ +sd_netcdf_libs = @sd_netcdf_libs@ +sd_netcdf_ok = @sd_netcdf_ok@ +sd_netcdf_options = @sd_netcdf_options@ +sd_netcdf_policy = @sd_netcdf_policy@ +sd_netcdf_status = @sd_netcdf_status@ +sd_papi_cflags = @sd_papi_cflags@ +sd_papi_cppflags = @sd_papi_cppflags@ +sd_papi_enable = @sd_papi_enable@ +sd_papi_enable_def = @sd_papi_enable_def@ +sd_papi_init = @sd_papi_init@ +sd_papi_ldflags = @sd_papi_ldflags@ +sd_papi_libs = @sd_papi_libs@ +sd_papi_ok = @sd_papi_ok@ +sd_papi_options = @sd_papi_options@ +sd_papi_policy = @sd_papi_policy@ +sd_papi_sd_papi_fcflags = @sd_papi_sd_papi_fcflags@ +sd_papi_status = @sd_papi_status@ +sd_pfft_cflags = @sd_pfft_cflags@ +sd_pfft_cppflags = @sd_pfft_cppflags@ +sd_pfft_enable = @sd_pfft_enable@ +sd_pfft_enable_def = @sd_pfft_enable_def@ +sd_pfft_init = @sd_pfft_init@ +sd_pfft_ldflags = @sd_pfft_ldflags@ +sd_pfft_libs = @sd_pfft_libs@ +sd_pfft_ok = @sd_pfft_ok@ +sd_pfft_options = @sd_pfft_options@ +sd_pfft_policy = @sd_pfft_policy@ +sd_pfft_status = @sd_pfft_status@ +sd_sys_fcflags = @sd_sys_fcflags@ +sd_triqs_cflags = @sd_triqs_cflags@ +sd_triqs_cppflags = @sd_triqs_cppflags@ +sd_triqs_cxxflags = @sd_triqs_cxxflags@ +sd_triqs_enable = @sd_triqs_enable@ +sd_triqs_enable_def = @sd_triqs_enable_def@ +sd_triqs_fcflags = @sd_triqs_fcflags@ +sd_triqs_init = @sd_triqs_init@ +sd_triqs_ldflags = @sd_triqs_ldflags@ +sd_triqs_libs = @sd_triqs_libs@ +sd_triqs_ok = @sd_triqs_ok@ +sd_triqs_options = @sd_triqs_options@ +sd_triqs_policy = @sd_triqs_policy@ +sd_triqs_status = @sd_triqs_status@ +sd_wannier90_cppflags = @sd_wannier90_cppflags@ +sd_wannier90_enable = @sd_wannier90_enable@ +sd_wannier90_enable_def = @sd_wannier90_enable_def@ +sd_wannier90_fcflags = @sd_wannier90_fcflags@ +sd_wannier90_init = @sd_wannier90_init@ +sd_wannier90_ldflags = @sd_wannier90_ldflags@ +sd_wannier90_libs = @sd_wannier90_libs@ +sd_wannier90_ok = @sd_wannier90_ok@ +sd_wannier90_options = @sd_wannier90_options@ +sd_wannier90_policy = @sd_wannier90_policy@ +sd_wannier90_status = @sd_wannier90_status@ +sd_xmlf90_cppflags = @sd_xmlf90_cppflags@ +sd_xmlf90_enable = @sd_xmlf90_enable@ +sd_xmlf90_enable_def = @sd_xmlf90_enable_def@ +sd_xmlf90_fcflags = @sd_xmlf90_fcflags@ +sd_xmlf90_init = @sd_xmlf90_init@ +sd_xmlf90_ldflags = @sd_xmlf90_ldflags@ +sd_xmlf90_libs = @sd_xmlf90_libs@ +sd_xmlf90_ok = @sd_xmlf90_ok@ +sd_xmlf90_options = @sd_xmlf90_options@ +sd_xmlf90_policy = @sd_xmlf90_policy@ +sd_xmlf90_status = @sd_xmlf90_status@ +sd_yakl_cppflags = @sd_yakl_cppflags@ +sd_yakl_enable = @sd_yakl_enable@ +sd_yakl_enable_def = @sd_yakl_enable_def@ +sd_yakl_fcflags = @sd_yakl_fcflags@ +sd_yakl_init = @sd_yakl_init@ +sd_yakl_ldflags = @sd_yakl_ldflags@ +sd_yakl_libs = @sd_yakl_libs@ +sd_yakl_ok = @sd_yakl_ok@ +sd_yakl_options = @sd_yakl_options@ +sd_yakl_policy = @sd_yakl_policy@ +sd_yakl_status = @sd_yakl_status@ +sharedstatedir = @sharedstatedir@ +src_02_clib_fcflags = @src_02_clib_fcflags@ +src_10_defs_fcflags = @src_10_defs_fcflags@ +src_11_memory_mpi_fcflags = @src_11_memory_mpi_fcflags@ +src_12_hide_mpi_fcflags = @src_12_hide_mpi_fcflags@ +src_14_hidewrite_fcflags = @src_14_hidewrite_fcflags@ +src_16_hideleave_fcflags = @src_16_hideleave_fcflags@ +src_16_kokkos_toolbox_fcflags = @src_16_kokkos_toolbox_fcflags@ +src_17_gpu_toolbox_fcflags = @src_17_gpu_toolbox_fcflags@ +src_17_libtetra_ext_fcflags = @src_17_libtetra_ext_fcflags@ +src_17_minimax_fcflags = @src_17_minimax_fcflags@ +src_17_yaml_out_fcflags = @src_17_yaml_out_fcflags@ +src_18_timing_fcflags = @src_18_timing_fcflags@ +src_21_hashfuncs_fcflags = @src_21_hashfuncs_fcflags@ +src_27_toolbox_oop_fcflags = @src_27_toolbox_oop_fcflags@ +src_28_numeric_noabirule_fcflags = @src_28_numeric_noabirule_fcflags@ +src_29_kpoints_fcflags = @src_29_kpoints_fcflags@ +src_32_util_fcflags = @src_32_util_fcflags@ +src_33_xc_lowlevel_fcflags = @src_33_xc_lowlevel_fcflags@ +src_39_libpaw_fcflags = @src_39_libpaw_fcflags@ +src_41_geometry_fcflags = @src_41_geometry_fcflags@ +src_42_nlstrain_fcflags = @src_42_nlstrain_fcflags@ +src_42_parser_fcflags = @src_42_parser_fcflags@ +src_43_ptgroups_fcflags = @src_43_ptgroups_fcflags@ +src_43_wvl_wrappers_fcflags = @src_43_wvl_wrappers_fcflags@ +src_44_abitools_fcflags = @src_44_abitools_fcflags@ +src_44_abitypes_defs_fcflags = @src_44_abitypes_defs_fcflags@ +src_44_manage_kokkos_fcflags = @src_44_manage_kokkos_fcflags@ +src_45_geomoptim_fcflags = @src_45_geomoptim_fcflags@ +src_45_xgTools_fcflags = @src_45_xgTools_fcflags@ +src_46_ghc_omp_fcflags = @src_46_ghc_omp_fcflags@ +src_46_manage_cuda_fcflags = @src_46_manage_cuda_fcflags@ +src_48_diago_fcflags = @src_48_diago_fcflags@ +src_49_gw_toolbox_oop_fcflags = @src_49_gw_toolbox_oop_fcflags@ +src_51_manage_mpi_fcflags = @src_51_manage_mpi_fcflags@ +src_52_fft_mpi_noabirule_fcflags = @src_52_fft_mpi_noabirule_fcflags@ +src_53_ffts_fcflags = @src_53_ffts_fcflags@ +src_54_spacepar_fcflags = @src_54_spacepar_fcflags@ +src_55_abiutil_fcflags = @src_55_abiutil_fcflags@ +src_56_io_mpi_fcflags = @src_56_io_mpi_fcflags@ +src_56_mixing_fcflags = @src_56_mixing_fcflags@ +src_56_recipspace_fcflags = @src_56_recipspace_fcflags@ +src_56_xc_fcflags = @src_56_xc_fcflags@ +src_57_iopsp_parser_fcflags = @src_57_iopsp_parser_fcflags@ +src_57_iovars_fcflags = @src_57_iovars_fcflags@ +src_61_occeig_fcflags = @src_61_occeig_fcflags@ +src_62_cg_noabirule_fcflags = @src_62_cg_noabirule_fcflags@ +src_62_ctqmc_fcflags = @src_62_ctqmc_fcflags@ +src_62_iowfdenpot_fcflags = @src_62_iowfdenpot_fcflags@ +src_62_poisson_fcflags = @src_62_poisson_fcflags@ +src_62_wvl_wfs_fcflags = @src_62_wvl_wfs_fcflags@ +src_64_psp_fcflags = @src_64_psp_fcflags@ +src_65_lotf_base_fcflags = @src_65_lotf_base_fcflags@ +src_65_paw_fcflags = @src_65_paw_fcflags@ +src_66_nonlocal_fcflags = @src_66_nonlocal_fcflags@ +src_66_vdwxc_fcflags = @src_66_vdwxc_fcflags@ +src_66_wfs_fcflags = @src_66_wfs_fcflags@ +src_67_common_fcflags = @src_67_common_fcflags@ +src_67_python_invocation_ext_fcflags = @src_67_python_invocation_ext_fcflags@ +src_67_triqs_ext_fcflags = @src_67_triqs_ext_fcflags@ +src_68_dmft_fcflags = @src_68_dmft_fcflags@ +src_68_lotf_fcflags = @src_68_lotf_fcflags@ +src_68_recursion_fcflags = @src_68_recursion_fcflags@ +src_68_rsprc_fcflags = @src_68_rsprc_fcflags@ +src_69_wfdesc_fcflags = @src_69_wfdesc_fcflags@ +src_70_gw_fcflags = @src_70_gw_fcflags@ +src_71_bse_fcflags = @src_71_bse_fcflags@ +src_71_wannier_fcflags = @src_71_wannier_fcflags@ +src_72_response_fcflags = @src_72_response_fcflags@ +src_77_ddb_fcflags = @src_77_ddb_fcflags@ +src_77_suscep_fcflags = @src_77_suscep_fcflags@ +src_78_effpot_fcflags = @src_78_effpot_fcflags@ +src_78_eph_fcflags = @src_78_eph_fcflags@ +src_79_seqpar_mpi_fcflags = @src_79_seqpar_mpi_fcflags@ +src_80_rttddft_fcflags = @src_80_rttddft_fcflags@ +src_80_tdep_fcflags = @src_80_tdep_fcflags@ +src_94_scfcv_fcflags = @src_94_scfcv_fcflags@ +src_95_drive_fcflags = @src_95_drive_fcflags@ +src_common_fcflags = @src_common_fcflags@ +src_core_fcflags = @src_core_fcflags@ +src_libpaw_fcflags = @src_libpaw_fcflags@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +with_abinit_common = @with_abinit_common@ +with_bigdft = @with_bigdft@ +with_config_file = @with_config_file@ +with_debug_flavor = @with_debug_flavor@ +with_fallbacks = @with_fallbacks@ +with_fc_vendor = @with_fc_vendor@ +with_fc_version = @with_fc_version@ +with_fft_flavor = @with_fft_flavor@ +with_fftw3 = @with_fftw3@ +with_gnu_ld = @with_gnu_ld@ +with_gpu = @with_gpu@ +with_hdf5 = @with_hdf5@ +with_kokkos = @with_kokkos@ +with_levmar = @with_levmar@ +with_libpaw = @with_libpaw@ +with_libpsml = @with_libpsml@ +with_libxc = @with_libxc@ +with_libxml2 = @with_libxml2@ +with_linalg_flavor = @with_linalg_flavor@ +with_mpi = @with_mpi@ +with_mpi_level = @with_mpi_level@ +with_netcdf = @with_netcdf@ +with_optim_flavor = @with_optim_flavor@ +with_papi = @with_papi@ +with_pfft = @with_pfft@ +with_triqs = @with_triqs@ +with_wannier90 = @with_wannier90@ +with_xmlf90 = @with_xmlf90@ +with_yakl = @with_yakl@ +AM_CFLAGS = @ABI_CPPFLAGS@ +AM_CXXFLAGS = $(sd_triqs_cxxflags) +AM_FCFLAGS = @FPPFLAGS@ @FCFLAGS_FREEFORM@ @FCFLAGS_MODDIR@ @sd_sys_fcflags@ @fcflags_opt_16_kokkos_toolbox@ +AM_CPPFLAGS = \ + @src_common_fcflags@ \ + @src_core_fcflags@ \ + @src_libpaw_fcflags@ \ + @sd_gpu_cppflags@ \ + @sd_gpu_fcflags@ \ + @fc_mod_fcflags@ + + +# Regular source files +lib16_kokkos_toolbox_srcs = \ + kokkos_utils.cpp \ + m_kokkos_utils.F90 + + +# Source files depending on conditionals + +# Library description +noinst_LIBRARIES = lib16_kokkos_toolbox.a +lib16_kokkos_toolbox_a_SOURCES = $(lib16_kokkos_toolbox_srcs) + +# Dependencies (inside the directory) of directory 16_kokkos_toolbox +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. +CLEANFILES = m_kokkos_utils_cpp.f90 m_kokkos_utils.$(MODEXT) +EXTRA_DIST = abinit.src abinit.dep +all: all-am + +.SUFFIXES: +.SUFFIXES: .F90 .cpp .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu shared/common/src/16_kokkos_toolbox/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu shared/common/src/16_kokkos_toolbox/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) + +lib16_kokkos_toolbox.a: $(lib16_kokkos_toolbox_a_OBJECTS) $(lib16_kokkos_toolbox_a_DEPENDENCIES) $(EXTRA_lib16_kokkos_toolbox_a_DEPENDENCIES) + $(AM_V_at)-rm -f lib16_kokkos_toolbox.a + $(AM_V_AR)$(lib16_kokkos_toolbox_a_AR) lib16_kokkos_toolbox.a $(lib16_kokkos_toolbox_a_OBJECTS) $(lib16_kokkos_toolbox_a_LIBADD) + $(AM_V_at)$(RANLIB) lib16_kokkos_toolbox.a + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kokkos_utils.Po@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) + +.F90.o: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ $< + +.F90.obj: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.o: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -f ./$(DEPDIR)/kokkos_utils.Po + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f ./$(DEPDIR)/kokkos_utils.Po + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ + clean-generic clean-noinstLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am + +.PRECIOUS: Makefile + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/GX-PAW/common/src/16_kokkos_toolbox/__pycache__/abinit.cpython-36.pyc b/GX-PAW/common/src/16_kokkos_toolbox/__pycache__/abinit.cpython-36.pyc new file mode 100644 index 00000000..f7f69177 Binary files /dev/null and b/GX-PAW/common/src/16_kokkos_toolbox/__pycache__/abinit.cpython-36.pyc differ diff --git a/GX-PAW/common/src/16_kokkos_toolbox/abinit.dep b/GX-PAW/common/src/16_kokkos_toolbox/abinit.dep new file mode 100644 index 00000000..092146f9 --- /dev/null +++ b/GX-PAW/common/src/16_kokkos_toolbox/abinit.dep @@ -0,0 +1,9 @@ +# Dependencies (inside the directory) of directory 16_kokkos_toolbox +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. + +CLEANFILES += \ + m_kokkos_utils.$(MODEXT) + diff --git a/GX-PAW/common/src/16_kokkos_toolbox/abinit.dir b/GX-PAW/common/src/16_kokkos_toolbox/abinit.dir new file mode 100644 index 00000000..77e9205a --- /dev/null +++ b/GX-PAW/common/src/16_kokkos_toolbox/abinit.dir @@ -0,0 +1,8 @@ +# Dependencies (outside the directory) of directory 16_kokkos_toolbox +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. + +include_dirs = \ +[] \ No newline at end of file diff --git a/GX-PAW/common/src/16_kokkos_toolbox/abinit.src b/GX-PAW/common/src/16_kokkos_toolbox/abinit.src new file mode 100644 index 00000000..e33e66ed --- /dev/null +++ b/GX-PAW/common/src/16_kokkos_toolbox/abinit.src @@ -0,0 +1,25 @@ +# -*- Python -*- +# +# Copyright (C) 2005-2024 ABINIT Group (Yann Pouillon) +# +# This file is part of the ABINIT software package. For license information, +# please see the COPYING file in the top-level directory of the ABINIT source +# distribution. +# + +# +# Source files making up the manage_kokkos library +# + +# Source file attributes +ABI_SRC_NIL = 0 # No attribute +ABI_SRC_BLT = 1 # The file is built by a script +ABI_SRC_DEP = 2 # The file depends on other files + +# Source files +sources = [ + "kokkos_utils.cpp", + "m_kokkos_utils.F90", +] +# IMPORTANT : please use the alphabetic order in the previous list. Do NOT add the new routine names at the end of the list. +# This is important to avoid numerous conflicts at merge time. Thank you very much. Xavier. diff --git a/GX-PAW/common/src/16_kokkos_toolbox/kokkos_utils.cpp b/GX-PAW/common/src/16_kokkos_toolbox/kokkos_utils.cpp new file mode 100644 index 00000000..8ca48896 --- /dev/null +++ b/GX-PAW/common/src/16_kokkos_toolbox/kokkos_utils.cpp @@ -0,0 +1,50 @@ +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include +#include +#include +#include + +extern "C" { + + void c_abinit_kokkos_print_config() + { + + std::cout << "##########################\n"; + std::cout << "KOKKOS CONFIG \n"; + std::cout << "##########################\n"; + + std::ostringstream msg; + std::cout << "Kokkos configuration" << std::endl; + if ( Kokkos::hwloc::available() ) { + msg << "hwloc( NUMA[" << Kokkos::hwloc::get_available_numa_count() + << "] x CORE[" << Kokkos::hwloc::get_available_cores_per_numa() + << "] x HT[" << Kokkos::hwloc::get_available_threads_per_core() + << "] )" + << std::endl ; + } + //Kokkos::print_configuration( msg ); + std::cout << msg.str() << "##########################\n" << std::flush; + + } // c_abinit_kokkos_print_config + + void c_kokkos_initialize(int *argc, char **argv) { + Kokkos::initialize(*argc, argv); + } + + void c_kokkos_initialize_without_args() { + Kokkos::initialize(); + } + + void c_kokkos_finalize() { + Kokkos::finalize(); + } + + bool c_kokkos_is_initialized() { + return Kokkos::is_initialized(); + } + +} // extern "C" diff --git a/GX-PAW/common/src/16_kokkos_toolbox/m_kokkos_utils.F90 b/GX-PAW/common/src/16_kokkos_toolbox/m_kokkos_utils.F90 new file mode 100644 index 00000000..046463a1 --- /dev/null +++ b/GX-PAW/common/src/16_kokkos_toolbox/m_kokkos_utils.F90 @@ -0,0 +1,148 @@ +! +! +! +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" + +#ifdef HAVE_KOKKOS + +module m_kokkos_utils + + use, intrinsic :: iso_c_binding + use, intrinsic :: iso_fortran_env + + implicit none + + private + + public :: & + & abinit_kokkos_print_config, & + & kokkos_initialize, & + & kokkos_initialize_without_args, & + & kokkos_finalize + +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! Kokkos interface +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + interface + subroutine f_kokkos_print_config() & + & bind(c, name="c_abinit_kokkos_print_config") + use, intrinsic :: iso_c_binding + implicit none + end subroutine f_kokkos_print_config + end interface + + interface + subroutine f_kokkos_initialize(argc, argv) & + & bind(c, name="c_kokkos_initialize") + use, intrinsic :: iso_c_binding, only : c_int, c_ptr + integer(c_int), intent(inout) :: argc + type(c_ptr), value :: argv + end subroutine f_kokkos_initialize + end interface + + interface + subroutine f_kokkos_initialize_without_args() & + bind(c, name='c_kokkos_initialize_without_args') + use, intrinsic :: iso_c_binding + implicit none + end subroutine f_kokkos_initialize_without_args + end interface + + interface + subroutine f_kokkos_finalize() & + & bind(c, name="c_kokkos_finalize") + end subroutine f_kokkos_finalize + end interface + + interface + function f_kokkos_is_initialized() result(is_init) & + & bind(c, name='c_kokkos_is_initialized') + use, intrinsic :: iso_c_binding + implicit none + logical(c_bool) :: is_init + end function f_kokkos_is_initialized + end interface + +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +contains +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + subroutine abinit_kokkos_print_config() + use, intrinsic :: iso_c_binding + implicit none + call f_kokkos_print_config() + end subroutine abinit_kokkos_print_config + +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + subroutine kokkos_initialize() + use, intrinsic :: iso_c_binding + implicit none + integer :: arg_count, max_length = 0, str_length, n, cli_count + character(kind=c_char, len=:), allocatable :: str + character(kind=c_char), allocatable, target :: strs_array(:,:) + type(c_ptr), allocatable, target :: c_strs(:) + + arg_count = command_argument_count() + ! include command name + do n = 0, arg_count + call get_command_argument(n, length=str_length) + max_length = max(max_length, str_length) + end do + + ABI_MALLOC(strs_array, (1:max_length + 1, 0:arg_count)) + ABI_MALLOC(c_strs, (0:arg_count)) + ABI_MALLOC_TYPE_SCALAR(character(max_length),str) + + do n = 0, arg_count + call get_command_argument(n, value=str, length=str_length) + strs_array(1:str_length, n) = transfer(str, ' ', size=str_length) + strs_array(str_length+1, n) = c_null_char + c_strs(n) = c_loc(strs_array(:,n)) + end do + + cli_count = arg_count + 1 + if( cli_count .le. 0 ) then + ! must call the without_args variant or get array-oob error + call f_kokkos_initialize_without_args() + else + call f_kokkos_initialize(cli_count, c_loc(c_strs(0))) + endif + + ABI_FREE(strs_array) + ABI_FREE(c_strs) + ABI_FREE(str) + + end subroutine kokkos_initialize + +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + subroutine kokkos_initialize_without_args() + use, intrinsic :: iso_c_binding + implicit none + call f_kokkos_initialize_without_args() + end subroutine kokkos_initialize_without_args + +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + subroutine kokkos_finalize() + use, intrinsic :: iso_c_binding + implicit none + call f_kokkos_finalize + end subroutine kokkos_finalize + +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + function kokkos_is_initialized() result(is_init) + use, intrinsic :: iso_c_binding + implicit none + logical :: is_init + logical(c_bool) :: c_is_init + c_is_init = f_kokkos_is_initialized() + is_init = logical(c_is_init) + end function kokkos_is_initialized + +end module m_kokkos_utils + +#endif diff --git a/GX-PAW/common/src/17_gpu_toolbox/.deps/dev_spec.Po b/GX-PAW/common/src/17_gpu_toolbox/.deps/dev_spec.Po new file mode 100644 index 00000000..9ce06a81 --- /dev/null +++ b/GX-PAW/common/src/17_gpu_toolbox/.deps/dev_spec.Po @@ -0,0 +1 @@ +# dummy diff --git a/GX-PAW/common/src/17_gpu_toolbox/.deps/gpu_fft.Po b/GX-PAW/common/src/17_gpu_toolbox/.deps/gpu_fft.Po new file mode 100644 index 00000000..9ce06a81 --- /dev/null +++ b/GX-PAW/common/src/17_gpu_toolbox/.deps/gpu_fft.Po @@ -0,0 +1 @@ +# dummy diff --git a/GX-PAW/common/src/17_gpu_toolbox/.deps/gpu_linalg.Po b/GX-PAW/common/src/17_gpu_toolbox/.deps/gpu_linalg.Po new file mode 100644 index 00000000..9ce06a81 --- /dev/null +++ b/GX-PAW/common/src/17_gpu_toolbox/.deps/gpu_linalg.Po @@ -0,0 +1 @@ +# dummy diff --git a/GX-PAW/common/src/17_gpu_toolbox/.deps/timing.Po b/GX-PAW/common/src/17_gpu_toolbox/.deps/timing.Po new file mode 100644 index 00000000..9ce06a81 --- /dev/null +++ b/GX-PAW/common/src/17_gpu_toolbox/.deps/timing.Po @@ -0,0 +1 @@ +# dummy diff --git a/GX-PAW/common/src/17_gpu_toolbox/Makefile b/GX-PAW/common/src/17_gpu_toolbox/Makefile new file mode 100644 index 00000000..27628b9f --- /dev/null +++ b/GX-PAW/common/src/17_gpu_toolbox/Makefile @@ -0,0 +1,1565 @@ +# Makefile.in generated by automake 1.16.3 from Makefile.am. +# shared/common/src/17_gpu_toolbox/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994-2020 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-corelibs on 2024/03/16 21:07:38 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-corelibs script or its config file instead. +# + + +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/abinit +pkgincludedir = $(includedir)/abinit +pkglibdir = $(libdir)/abinit +pkglibexecdir = $(libexecdir)/abinit +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = x86_64-apple-darwin18.7.0 +host_triplet = x86_64-apple-darwin18.7.0 +target_triplet = x86_64-apple-darwin18.7.0 +subdir = shared/common/src/17_gpu_toolbox +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/m4/arch-gpu.m4 \ + $(top_srcdir)/config/m4/arch-mpi.m4 \ + $(top_srcdir)/config/m4/auto-autotools.m4 \ + $(top_srcdir)/config/m4/auto-corelibs.m4 \ + $(top_srcdir)/config/m4/auto-debug.m4 \ + $(top_srcdir)/config/m4/auto-dirflags.m4 \ + $(top_srcdir)/config/m4/auto-env.m4 \ + $(top_srcdir)/config/m4/auto-hints.m4 \ + $(top_srcdir)/config/m4/auto-optim.m4 \ + $(top_srcdir)/config/m4/auto-options.m4 \ + $(top_srcdir)/config/m4/auto-output.m4 \ + $(top_srcdir)/config/m4/auto-triggers.m4 \ + $(top_srcdir)/config/m4/conf-atompaw.m4 \ + $(top_srcdir)/config/m4/conf-debug.m4 \ + $(top_srcdir)/config/m4/conf-fallbacks.m4 \ + $(top_srcdir)/config/m4/conf-files.m4 \ + $(top_srcdir)/config/m4/conf-init.m4 \ + $(top_srcdir)/config/m4/conf-openmp.m4 \ + $(top_srcdir)/config/m4/conf-optim.m4 \ + $(top_srcdir)/config/m4/lang-c++.m4 \ + $(top_srcdir)/config/m4/lang-c.m4 \ + $(top_srcdir)/config/m4/lang-fortran-import.m4 \ + $(top_srcdir)/config/m4/lang-fortran.m4 \ + $(top_srcdir)/config/m4/lang-python.m4 \ + $(top_srcdir)/config/m4/libxml2.m4 \ + $(top_srcdir)/config/m4/misc-display.m4 \ + $(top_srcdir)/config/m4/sd_abinit_common.m4 \ + $(top_srcdir)/config/m4/sd_arch_gpu.m4 \ + $(top_srcdir)/config/m4/sd_arch_mpi.m4 \ + $(top_srcdir)/config/m4/sd_bigdft.m4 \ + $(top_srcdir)/config/m4/sd_core.m4 \ + $(top_srcdir)/config/m4/sd_esl.m4 \ + $(top_srcdir)/config/m4/sd_fftw3.m4 \ + $(top_srcdir)/config/m4/sd_gpu_kokkos.m4 \ + $(top_srcdir)/config/m4/sd_gpu_yakl.m4 \ + $(top_srcdir)/config/m4/sd_io_hdf5.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf_fortran.m4 \ + $(top_srcdir)/config/m4/sd_levmar.m4 \ + $(top_srcdir)/config/m4/sd_libpaw.m4 \ + $(top_srcdir)/config/m4/sd_libpsml.m4 \ + $(top_srcdir)/config/m4/sd_libxc.m4 \ + $(top_srcdir)/config/m4/sd_math_fft.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_core.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_util.m4 \ + $(top_srcdir)/config/m4/sd_papi.m4 \ + $(top_srcdir)/config/m4/sd_pfft.m4 \ + $(top_srcdir)/config/m4/sd_triqs.m4 \ + $(top_srcdir)/config/m4/sd_wannier90.m4 \ + $(top_srcdir)/config/m4/sd_xmlf90.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +AM_V_AR = $(am__v_AR_$(V)) +am__v_AR_ = $(am__v_AR_$(AM_DEFAULT_VERBOSITY)) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = +lib17_gpu_toolbox_a_AR = $(AR) $(ARFLAGS) +lib17_gpu_toolbox_a_LIBADD = +am__objects_1 = dev_spec.$(OBJEXT) gpu_fft.$(OBJEXT) \ + gpu_linalg.$(OBJEXT) m_gpu_detect.$(OBJEXT) \ + m_gpu_toolbox.$(OBJEXT) m_initcuda.$(OBJEXT) m_nvtx.$(OBJEXT) \ + timing.$(OBJEXT) +am_lib17_gpu_toolbox_a_OBJECTS = $(am__objects_1) +lib17_gpu_toolbox_a_OBJECTS = $(am_lib17_gpu_toolbox_a_OBJECTS) +AM_V_P = $(am__v_P_$(V)) +am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY)) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I. -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/config/gnu/depcomp +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/dev_spec.Po ./$(DEPDIR)/gpu_fft.Po \ + ./$(DEPDIR)/gpu_linalg.Po ./$(DEPDIR)/timing.Po +am__mv = mv -f +PPFCCOMPILE = $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) +AM_V_PPFC = $(am__v_PPFC_$(V)) +am__v_PPFC_ = $(am__v_PPFC_$(AM_DEFAULT_VERBOSITY)) +am__v_PPFC_0 = @echo " PPFC " $@; +am__v_PPFC_1 = +FCLD = $(FC) +FCLINK = $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \ + $@ +AM_V_FCLD = $(am__v_FCLD_$(V)) +am__v_FCLD_ = $(am__v_FCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_FCLD_0 = @echo " FCLD " $@; +am__v_FCLD_1 = +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_$(V)) +am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY)) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = +CXXLD = $(CXX) +CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ + -o $@ +AM_V_CXXLD = $(am__v_CXXLD_$(V)) +am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(lib17_gpu_toolbox_a_SOURCES) +DIST_SOURCES = $(lib17_gpu_toolbox_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in \ + $(top_srcdir)/config/gnu/depcomp +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ABINIT_BINARY_PACKAGE = abinit-10.0.0.83-58be4d_x86_64_darwin18.7.0_gnu9.4 +ABINIT_COMMON_CPPFLAGS = +ABINIT_COMMON_FCFLAGS = +ABINIT_COMMON_LDFLAGS = +ABINIT_COMMON_LIBS = +ABINIT_TARGET = x86_64_darwin18.7.0_gnu9.4 +ABINIT_VERSION = 10.0.0.83-58be4d +ABINIT_VERSION_BASE = 10.0 +ABINIT_VERSION_BUILD = 20240316 +ABINIT_VERSION_MAJOR = 10 +ABINIT_VERSION_MICRO = 0 +ABINIT_VERSION_MINOR = 0 +ABI_CPPFLAGS = -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include +ACLOCAL = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' aclocal-1.16 +AMTAR = $${TAR-tar} +AM_DEFAULT_VERBOSITY = 1 +AR = ar +ARFLAGS = rc +ARFLAGS_CMD = rc +ARFLAGS_DEBUG = +ARFLAGS_EXTRA = +ARFLAGS_HINTS = +ARFLAGS_OPTIM = +ATOMPAW_BIN = +AUTOCONF = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' autoconf +AUTOHEADER = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' autoheader +AUTOMAKE = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' automake-1.16 +AWK = awk +BIGDFT_CPPFLAGS = +BIGDFT_FCFLAGS = +BIGDFT_LDFLAGS = +BIGDFT_LIBS = +BOURNE_SHELL = /bin/sh +CC = /opt/local/bin/mpicc +CCDEPMODE = depmode=gcc3 +CC_LDFLAGS = +CC_LDFLAGS_DEBUG = +CC_LDFLAGS_EXTRA = +CC_LDFLAGS_GPU = +CC_LDFLAGS_HINTS = +CC_LDFLAGS_OPTIM = +CC_LIBS = +CC_LIBS_DEBUG = +CC_LIBS_EXTRA = +CC_LIBS_GPU = +CC_LIBS_HINTS = +CC_LIBS_OPTIM = +CFLAGS = -O2 -g +CFLAGS_DEBUG = +CFLAGS_EXTRA = +CFLAGS_GPU = +CFLAGS_HINTS = +CFLAGS_OPTIM = +CPP = /opt/local/bin/mpicc -E +CPPFLAGS = +CPPFLAGS_DEBUG = +CPPFLAGS_EXTRA = +CPPFLAGS_GPU = +CPPFLAGS_HINTS = +CPPFLAGS_HINTS_EXT = -P -std=c99 +CPPFLAGS_OPTIM = +CXX = /opt/local/bin/mpicxx +CXXDEPMODE = depmode=gcc3 +CXXFLAGS = -O2 -g +CXXFLAGS_DEBUG = +CXXFLAGS_EXTRA = +CXXFLAGS_GPU = +CXXFLAGS_HINTS = +CXXFLAGS_OPTIM = +CXX_LDFLAGS = +CXX_LDFLAGS_DEBUG = +CXX_LDFLAGS_EXTRA = +CXX_LDFLAGS_GPU = +CXX_LDFLAGS_HINTS = +CXX_LDFLAGS_OPTIM = +CXX_LIBS = +CXX_LIBS_DEBUG = +CXX_LIBS_EXTRA = +CXX_LIBS_GPU = +CXX_LIBS_HINTS = +CXX_LIBS_OPTIM = +CYGPATH_W = echo +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +ECHO_C = \c +ECHO_N = +ECHO_T = +EGREP = /usr/bin/grep -E +EXEEXT = +F77 = /opt/local/bin/mpif90 +FC = /opt/local/bin/mpif90 +FCFLAGS = -O2 -g -ffree-line-length-none -I/opt/local/include -I/opt/local/include -I/opt/local/include +FCFLAGS_DEBUG = +FCFLAGS_EXTRA = +FCFLAGS_F90 = +FCFLAGS_FIXEDFORM = -ffixed-form +FCFLAGS_FREEFORM = -ffree-form +FCFLAGS_HINTS = -ffree-line-length-none +FCFLAGS_MODDIR = -J../mods +FCFLAGS_OPENMP = +FCFLAGS_OPENMP_OFFLOAD = +FCFLAGS_OPTIM = +FCLIBS = -L/opt/local/lib -L/opt/local/lib/openmpi-gcc9 -L/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0 -L/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/../../.. -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi -lgfortran -lquadmath -lm +FC_LDFLAGS = +FC_LDFLAGS_DEBUG = +FC_LDFLAGS_EXTRA = +FC_LDFLAGS_HINTS = +FC_LDFLAGS_OPTIM = +FC_LIBS = +FC_LIBS_DEBUG = +FC_LIBS_EXTRA = +FC_LIBS_HINTS = +FC_LIBS_OPTIM = +FC_NOWRAP = /opt/local/bin/mpif90 +FFLAGS = -O2 -g -ffree-line-length-none -I/opt/local/include -I/opt/local/include -I/opt/local/include +FFTW3_CFLAGS = +FFTW3_CPPFLAGS = -I/opt/local/include +FFTW3_FCFLAGS = -I/opt/local/include +FFTW3_LDFLAGS = +FFTW3_LIBS = -L/opt/local/lib -lfftw3 -lfftw3f +FFT_CFLAGS = +FFT_FCFLAGS = +FPP = +FPPFLAGS = +FPPFLAGS_DEBUG = +FPPFLAGS_EXTRA = +FPPFLAGS_HINTS = +FPPFLAGS_OPTIM = +GPU_ARCH = +GPU_CFLAGS = +GPU_CPPFLAGS = +GPU_CXXFLAGS = +GPU_FCFLAGS = +GPU_LDFLAGS = +GPU_LIBS = +GRAPHATOM_BIN = +GREP = /usr/bin/grep +H5CC = +HDF5_CFLAGS = +HDF5_CPPFLAGS = +HDF5_CXXFLAGS = +HDF5_FCFLAGS = +HDF5_LDFLAGS = +HDF5_LIBS = +INSTALL = /opt/local/libexec/gnubin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +KOKKOS_CPPFLAGS = +KOKKOS_CXXFLAGS = +KOKKOS_LDFLAGS = +KOKKOS_LIBS = +LDFLAGS = +LEVMAR_CFLAGS = +LEVMAR_CPPFLAGS = +LEVMAR_LDFLAGS = +LEVMAR_LIBS = +LIBOBJS = +LIBPAW_CPPFLAGS = +LIBPAW_FCFLAGS = +LIBPAW_LDFLAGS = +LIBPAW_LIBS = +LIBPSML_CPPFLAGS = +LIBPSML_FCFLAGS = +LIBPSML_LDFLAGS = +LIBPSML_LIBS = +LIBS = -L/opt/local/lib -lwannier -L/opt/local/lib -lxc -L/opt/local/lib -lnetcdff -L/opt/local/lib -lnetcdf -L/opt/local/lib -L/opt/local/lib -lhdf5_hl -L/opt/local/lib -lhdf5 -lz -ldl -lm -L/opt/local/lib -lfftw3 -lfftw3f +LIBXC_CFLAGS = +LIBXC_CPPFLAGS = +LIBXC_FCFLAGS = +LIBXC_LDFLAGS = +LIBXC_LIBS = +LIBXML2_CPPFLAGS = +LIBXML2_FCFLAGS = +LIBXML2_LIBS = +LINALG_CFLAGS = +LINALG_CPPFLAGS = +LINALG_CXXFLAGS = +LINALG_FCFLAGS = -I/opt/local/include +LINALG_LDFLAGS = +LINALG_LIBS = -L/opt/local/lib -lopenblas +LN_S = ln -s +LTLIBOBJS = +MAKEINFO = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' makeinfo +MKDIR_P = /opt/local/libexec/gnubin/mkdir -p +MODEXT = mod +MPI_CFLAGS = +MPI_CPPFLAGS = +MPI_CXXFLAGS = +MPI_FCFLAGS = +MPI_LDFLAGS = +MPI_LIBS = +MV = /opt/local/libexec/gnubin/mv +NETCDF_CFLAGS = +NETCDF_CPPFLAGS = +NETCDF_CXXFLAGS = +NETCDF_FCFLAGS = +NETCDF_FORTRAN_CFLAGS = +NETCDF_FORTRAN_CPPFLAGS = +NETCDF_FORTRAN_CXXFLAGS = +NETCDF_FORTRAN_FCFLAGS = +NETCDF_FORTRAN_LDFLAGS = +NETCDF_FORTRAN_LIBS = +NETCDF_LDFLAGS = +NETCDF_LIBS = +NVCC = +NVCC_CFLAGS = +NVCC_CPPFLAGS = +NVCC_LDFLAGS = +NVCC_LIBS = +OBJEXT = o +PACKAGE = abinit +PACKAGE_BUGREPORT = https://bugs.launchpad.net/abinit/ +PACKAGE_NAME = ABINIT +PACKAGE_STRING = ABINIT 10.0.0.83-58be4d +PACKAGE_TARNAME = abinit +PACKAGE_URL = +PACKAGE_VERSION = 10.0.0.83-58be4d +PAPI_CFLAGS = +PAPI_CPPFLAGS = +PAPI_LDFLAGS = +PAPI_LIBS = +PATCH = patch +PATH_SEPARATOR = : +PERL = /usr/bin/perl +PFFT_CFLAGS = +PFFT_CPPFLAGS = +PFFT_LDFLAGS = +PFFT_LIBS = +PYFLAGS = +PYTHON = python3.9 +PYTHON_CONFIG = python3.9-config +PYTHON_CPPFLAGS = -I/opt/local/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -I/opt/local/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 +RANLIB = ranlib +REALPATH = realpath +RM = /opt/local/libexec/gnubin/rm +SED = /usr/bin/sed +SET_MAKE = +SHELL = /bin/sh +STRIP = +TAR = tar +TRIQS_CFLAGS = +TRIQS_CPPFLAGS = +TRIQS_CXXFLAGS = +TRIQS_LDFLAGS = +TRIQS_LIBS = +TRUE_CPP = cpp +VERSION = 10.0.0.83-58be4d +WANNIER90_CPPFLAGS = +WANNIER90_FCFLAGS = -I/opt/local/include +WANNIER90_LDFLAGS = +WANNIER90_LIBS = -L/opt/local/lib -lwannier +XML2_CONFIG = +XMLF90_CPPFLAGS = +XMLF90_FCFLAGS = +XMLF90_LDFLAGS = +XMLF90_LIBS = +XML_CPPFLAGS = +XML_LIBS = +XPP = +XPPFLAGS = +XPPFLAGS_DEBUG = +XPPFLAGS_EXTRA = +XPPFLAGS_OPTIM = +YAKL_CPPFLAGS = +YAKL_FCFLAGS = +YAKL_LDFLAGS = +YAKL_LIBS = +abi_ac_distcheck = --with-config-file="/Users/gonze/_Research/ABINIT_git/gonze/mac-1P0-225.ac9" +abi_ac_version = 027100 +abi_am_version = 011603 +abi_avx_safe_mode_enable = no +abi_bse_unpacked_enable = no +abi_cc_path = +abi_cc_vendor = gnu +abi_cc_version = 9.4 +abi_cclock_enable = no +abi_cpp_path = +abi_cpu_64bits = yes +abi_cpu_bits = 64 +abi_cpu_model = unknown +abi_cpu_platform = apple +abi_cpu_spec = unknown_unknown +abi_cpu_vendor = unknown +abi_crpa_optim_enable = no +abi_cxx_path = +abi_cxx_vendor = gnu +abi_cxx_version = 9.4 +abi_debug_flavor = basic +abi_exports_enable = no +abi_fbk_abinit_common_ok = no +abi_fbk_bigdft_ok = disabled +abi_fbk_config = +abi_fbk_enable = no +abi_fbk_fft_ok = no +abi_fbk_fftw3_ok = no +abi_fbk_gpu_ok = no +abi_fbk_hdf5_ok = disabled +abi_fbk_init = def +abi_fbk_kokkos_ok = no +abi_fbk_levmar_ok = no +abi_fbk_libpaw_ok = no +abi_fbk_libpsml_ok = disabled +abi_fbk_libxc_ok = disabled +abi_fbk_libxml2_ok = no +abi_fbk_linalg_ok = disabled +abi_fbk_list = +abi_fbk_mpi_ok = no +abi_fbk_netcdf_fortran_ok = disabled +abi_fbk_netcdf_ok = disabled +abi_fbk_papi_ok = no +abi_fbk_pfft_ok = no +abi_fbk_prefix = +abi_fbk_required = +abi_fbk_triqs_ok = no +abi_fbk_wannier90_ok = disabled +abi_fbk_xmlf90_ok = disabled +abi_fbk_yakl_ok = no +abi_fc_path = +abi_fc_vendor = gnu +abi_fc_version = 9.4 +abi_fc_wrap = no +abi_fc_wrapper_enable = no +abi_fpp_path = +abi_gpu_arch = +abi_gpu_fcflags = +abi_gpu_flavor = none +abi_gpu_hip_libdir = +abi_gpu_incs = +abi_gpu_ldflags = +abi_gpu_libs = +abi_gpu_nvtx_v3 = +abi_gpu_roctx = +abi_gw_dpc_enable = yes +abi_hints_enable = yes +abi_libtetra_enable = yes +abi_libxml2_cppflags = +abi_libxml2_enable = no +abi_libxml2_fcflags = +abi_libxml2_init = def +abi_libxml2_ldflags = +abi_libxml2_libs = +abi_libxml2_ok = unknown +abi_libxml2_prefix = +abi_lotf_enable = no +abi_lt_version = 020406 +abi_m4_version = 010419 +abi_memory_profiling_enable = no +abi_mpi_cflags = +abi_mpi_cppflags = +abi_mpi_cxxflags = +abi_mpi_enable = yes +abi_mpi_fcflags = +abi_mpi_flavor = auto +abi_mpi_gpu_aware_enable = no +abi_mpi_incs = +abi_mpi_inplace_enable = yes +abi_mpi_interfaces_bugfix_enable = no +abi_mpi_io_default_enable = no +abi_mpi_io_enable = yes +abi_mpi_ldflags = +abi_mpi_level = 2 +abi_mpi_libs = +abi_netcdf_default_enable = no +abi_openmp_enable = no +abi_openmp_offload_enable = no +abi_optim_flavor = standard +abi_python_invocation_enable = no +abi_source_debug_enable = no +abi_stdin_enable = yes +abi_sys_spec = darwin-x86_64 +abi_timer_enable = yes +abi_triqs_v1_4_enable = no +abi_triqs_v2_0_enable = no +abi_zdot_bugfix_enable = no +abinit_bindir = /usr/local/bin +abinit_builddir = /Users/gonze/_Research/ABINIT_git/gonze +abinit_chkdir = /usr/local/share/abinit/tests +abinit_datdir = /usr/local/share/abinit +abinit_docdir = /usr/local/doc/abinit +abinit_incdir = /usr/local/include +abinit_libdir = /usr/local/lib +abinit_mandir = /usr/local/share/man +abinit_prefix = /usr/local +abinit_srcdir = /Users/gonze/_Research/ABINIT_git/gonze +abs_builddir = /Users/gonze/_Research/ABINIT_git/gonze/shared/common/src/17_gpu_toolbox +abs_srcdir = /Users/gonze/_Research/ABINIT_git/gonze/shared/common/src/17_gpu_toolbox +abs_top_builddir = /Users/gonze/_Research/ABINIT_git/gonze +abs_top_srcdir = /Users/gonze/_Research/ABINIT_git/gonze +ac_ct_CC = +ac_ct_CXX = +ac_ct_FC = +am__include = include +am__leading_dot = . +am__quote = +am__tar = tar --format=ustar -chf - "$$tardir" +am__untar = tar -xf - +bindir = ${exec_prefix}/bin +build = x86_64-apple-darwin18.7.0 +build_alias = +build_cpu = x86_64 +build_os = darwin18.7.0 +build_vendor = apple +builddir = . +cc_info_string = gcc-mp-9 (MacPorts gcc9 9.4.0_0) 9.4.0 +cxx_info_string = g++-mp-9 (MacPorts gcc9 9.4.0_0) 9.4.0 +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +enable_avx_safe_mode = +enable_bse_unpacked = +enable_cclock = +enable_crpa_optim = +enable_exports = +enable_fc_wrapper = +enable_gw_dpc = yes +enable_hints = +enable_libtetra = +enable_lotf = +enable_memory_profiling = +enable_mpi_gpu_aware = +enable_mpi_inplace = +enable_mpi_interfaces_bugfix = +enable_mpi_io = yes +enable_mpi_io_default = +enable_netcdf_default = +enable_openmp = +enable_openmp_offload = +enable_python_invocation = +enable_shared = +enable_source_debug = +enable_static = +enable_stdin = +enable_timer = +enable_triqs_v1_4 = +enable_triqs_v2_0 = +enable_zdot_bugfix = +exec_prefix = ${prefix} +fc_info_string = GNU Fortran (MacPorts gcc9 9.4.0_0) 9.4.0 +fc_mod_fcflags = +fc_timing = standard +fcflags_opt_02_clib = +fcflags_opt_10_defs = +fcflags_opt_11_memory_mpi = +fcflags_opt_12_hide_mpi = +fcflags_opt_14_hidewrite = +fcflags_opt_16_hideleave = +fcflags_opt_16_kokkos_toolbox = +fcflags_opt_17_gpu_toolbox = +fcflags_opt_17_libtetra_ext = +fcflags_opt_17_minimax = +fcflags_opt_17_yaml_out = +fcflags_opt_18_timing = +fcflags_opt_21_hashfuncs = +fcflags_opt_27_toolbox_oop = +fcflags_opt_28_numeric_noabirule = +fcflags_opt_29_kpoints = +fcflags_opt_32_util = +fcflags_opt_33_xc_lowlevel = +fcflags_opt_39_libpaw = +fcflags_opt_41_geometry = +fcflags_opt_42_nlstrain = +fcflags_opt_42_parser = +fcflags_opt_43_ptgroups = -O0 +fcflags_opt_43_wvl_wrappers = +fcflags_opt_44_abitools = +fcflags_opt_44_abitypes_defs = +fcflags_opt_44_manage_kokkos = +fcflags_opt_45_geomoptim = +fcflags_opt_45_xgTools = +fcflags_opt_46_ghc_omp = +fcflags_opt_46_manage_cuda = +fcflags_opt_48_diago = +fcflags_opt_49_gw_toolbox_oop = +fcflags_opt_51_manage_mpi = +fcflags_opt_52_fft_mpi_noabirule = +fcflags_opt_53_ffts = +fcflags_opt_54_spacepar = +fcflags_opt_55_abiutil = +fcflags_opt_56_io_mpi = +fcflags_opt_56_mixing = +fcflags_opt_56_recipspace = +fcflags_opt_56_xc = +fcflags_opt_57_iopsp_parser = +fcflags_opt_57_iovars = +fcflags_opt_61_occeig = +fcflags_opt_62_cg_noabirule = +fcflags_opt_62_ctqmc = +fcflags_opt_62_iowfdenpot = +fcflags_opt_62_poisson = +fcflags_opt_62_wvl_wfs = +fcflags_opt_64_psp = +fcflags_opt_65_lotf_base = +fcflags_opt_65_paw = +fcflags_opt_66_nonlocal = +fcflags_opt_66_vdwxc = +fcflags_opt_66_wfs = +fcflags_opt_67_common = +fcflags_opt_67_python_invocation_ext = +fcflags_opt_67_triqs_ext = +fcflags_opt_68_dmft = +fcflags_opt_68_lotf = +fcflags_opt_68_recursion = +fcflags_opt_68_rsprc = +fcflags_opt_69_wfdesc = +fcflags_opt_70_gw = +fcflags_opt_71_bse = +fcflags_opt_71_wannier = +fcflags_opt_72_response = +fcflags_opt_77_ddb = +fcflags_opt_77_suscep = +fcflags_opt_78_effpot = +fcflags_opt_78_eph = +fcflags_opt_79_seqpar_mpi = +fcflags_opt_80_rttddft = +fcflags_opt_80_tdep = +fcflags_opt_94_scfcv = +fcflags_opt_95_drive = +fcflags_opt_98_main = +fcflags_opt_bigdft = +fcflags_opt_default = +fcflags_opt_hdf5 = +fcflags_opt_levmar = +fcflags_opt_libpsml = +fcflags_opt_libxc = +fcflags_opt_libxml2 = +fcflags_opt_linalg = +fcflags_opt_netcdf = +fcflags_opt_netcdf_fortran = +fcflags_opt_papi = +fcflags_opt_triqs = +fcflags_opt_wannier90 = +fcflags_opt_xmlf90 = +host = x86_64-apple-darwin18.7.0 +host_alias = +host_cpu = x86_64 +host_os = darwin18.7.0 +host_vendor = apple +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = ${SHELL} /Users/gonze/_Research/ABINIT_git/gonze/config/gnu/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = ${datarootdir}/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = $(MKDIR_P) +oldincludedir = /usr/include +pdfdir = ${docdir} +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +runstatedir = ${localstatedir}/run +sbindir = ${exec_prefix}/sbin +sd_abinit_common_cppflags = +sd_abinit_common_enable = no +sd_abinit_common_enable_def = no +sd_abinit_common_fcflags = +sd_abinit_common_init = def +sd_abinit_common_ldflags = +sd_abinit_common_libs = +sd_abinit_common_ok = unknown +sd_abinit_common_options = optional skip +sd_abinit_common_policy = skip +sd_abinit_common_status = optional +sd_bigdft_cppflags = +sd_bigdft_enable = no +sd_bigdft_enable_def = no +sd_bigdft_fcflags = +sd_bigdft_init = def +sd_bigdft_ldflags = +sd_bigdft_libs = +sd_bigdft_ok = unknown +sd_bigdft_options = optional warn +sd_bigdft_policy = warn +sd_bigdft_status = optional +sd_fft_cflags = +sd_fft_choices = +sd_fft_cppflags = -I/opt/local/include +sd_fft_cxxflags = +sd_fft_enable = yes +sd_fft_fcflags = -I/opt/local/include +sd_fft_flavor = fftw3 +sd_fft_init = kwd +sd_fft_ldflags = +sd_fft_libs = -L/opt/local/lib -lfftw3 -lfftw3f +sd_fft_ok = yes +sd_fftw3_cflags = +sd_fftw3_cppflags = -I/opt/local/include +sd_fftw3_enable = yes +sd_fftw3_enable_def = no +sd_fftw3_fcflags = -I/opt/local/include +sd_fftw3_init = env +sd_fftw3_ldflags = +sd_fftw3_libs = -L/opt/local/lib -lfftw3 -lfftw3f +sd_fftw3_ok = yes +sd_fftw3_options = optional skip +sd_fftw3_policy = skip +sd_fftw3_status = optional +sd_gpu_cflags = +sd_gpu_cppflags = +sd_gpu_cxxflags = +sd_gpu_enable = no +sd_gpu_enable_def = no +sd_gpu_fcflags = +sd_gpu_init = def +sd_gpu_ldflags = +sd_gpu_libs = +sd_gpu_ok = no +sd_gpu_options = optional warn +sd_gpu_policy = warn +sd_gpu_prefix = +sd_gpu_status = optional +sd_hdf5_cflags = +sd_hdf5_cppflags = -I/opt/local/include -I/opt/local/include +sd_hdf5_cxxflags = +sd_hdf5_enable = yes +sd_hdf5_enable_def = yes +sd_hdf5_enable_fc = no +sd_hdf5_fcflags = +sd_hdf5_h5cc = /opt/local/bin/h5cc +sd_hdf5_h5fc = +sd_hdf5_init = dir +sd_hdf5_ldflags = +sd_hdf5_libs = -L/opt/local/lib -L/opt/local/lib -lhdf5_hl -L/opt/local/lib -lhdf5 -lz -ldl -lm +sd_hdf5_ok = yes +sd_hdf5_options = required no-fortran warn +sd_hdf5_policy = warn +sd_hdf5_status = required +sd_kokkos_cppflags = +sd_kokkos_cxxflags = +sd_kokkos_enable = no +sd_kokkos_enable_def = no +sd_kokkos_init = def +sd_kokkos_ldflags = +sd_kokkos_libs = +sd_kokkos_ok = unknown +sd_kokkos_options = optional fail +sd_kokkos_policy = fail +sd_kokkos_status = optional +sd_levmar_cflags = +sd_levmar_cppflags = +sd_levmar_enable = no +sd_levmar_enable_def = no +sd_levmar_init = def +sd_levmar_ldflags = +sd_levmar_libs = +sd_levmar_ok = unknown +sd_levmar_options = optional fail +sd_levmar_policy = fail +sd_levmar_status = optional +sd_libpaw_cppflags = +sd_libpaw_enable = no +sd_libpaw_enable_def = no +sd_libpaw_fcflags = +sd_libpaw_init = def +sd_libpaw_ldflags = +sd_libpaw_libs = +sd_libpaw_ok = unknown +sd_libpaw_options = optional skip +sd_libpaw_policy = skip +sd_libpaw_status = optional +sd_libpsml_cppflags = +sd_libpsml_enable = no +sd_libpsml_enable_def = no +sd_libpsml_fcflags = +sd_libpsml_init = def +sd_libpsml_ldflags = +sd_libpsml_libs = +sd_libpsml_ok = unknown +sd_libpsml_options = optional warn +sd_libpsml_policy = warn +sd_libpsml_status = optional +sd_libxc_cflags = +sd_libxc_cppflags = -I/opt/local/include +sd_libxc_enable = yes +sd_libxc_enable_def = yes +sd_libxc_enable_fc = no +sd_libxc_fcflags = +sd_libxc_init = dir +sd_libxc_ldflags = +sd_libxc_libs = -L/opt/local/lib -lxc +sd_libxc_ok = yes +sd_libxc_options = required no-fortran warn +sd_libxc_policy = warn +sd_libxc_status = required +sd_linalg_cflags = +sd_linalg_choices = +sd_linalg_cppflags = +sd_linalg_cxxflags = +sd_linalg_enable = yes +sd_linalg_fcflags = -I/opt/local/include +sd_linalg_flavor = openblas +sd_linalg_has_elpa = no +sd_linalg_has_scalapack = no +sd_linalg_init = env +sd_linalg_ldflags = +sd_linalg_libs = -L/opt/local/lib -lopenblas +sd_linalg_ok = yes +sd_mpi_cc = /opt/local/bin/mpicc +sd_mpi_cflags = +sd_mpi_cppflags = -I/opt/local/include +sd_mpi_cxx = /opt/local/bin/mpicxx +sd_mpi_enable = yes +sd_mpi_enable_cxx = yes +sd_mpi_enable_def = auto +sd_mpi_enable_fc = yes +sd_mpi_fc = /opt/local/bin/mpif90 +sd_mpi_fcflags = -I/opt/local/include +sd_mpi_init = dir +sd_mpi_ldflags = +sd_mpi_libs = +sd_mpi_ok = yes +sd_mpi_options = auto optional fail +sd_mpi_policy = fail +sd_mpi_status = optional +sd_netcdf_cflags = +sd_netcdf_cppflags = -I/opt/local/include +sd_netcdf_enable = yes +sd_netcdf_enable_def = yes +sd_netcdf_fcflags = -I/opt/local/include +sd_netcdf_fortran_cflags = +sd_netcdf_fortran_cppflags = -I/opt/local/include +sd_netcdf_fortran_enable = yes +sd_netcdf_fortran_enable_def = yes +sd_netcdf_fortran_fcflags = -I/opt/local/include +sd_netcdf_fortran_init = dir +sd_netcdf_fortran_ldflags = +sd_netcdf_fortran_libs = -L/opt/local/lib -lnetcdff +sd_netcdf_fortran_ok = yes +sd_netcdf_fortran_options = required warn +sd_netcdf_fortran_policy = warn +sd_netcdf_fortran_status = required +sd_netcdf_init = dir +sd_netcdf_ldflags = +sd_netcdf_libs = -L/opt/local/lib -lnetcdf +sd_netcdf_ok = yes +sd_netcdf_options = required warn +sd_netcdf_policy = warn +sd_netcdf_status = required +sd_papi_cflags = +sd_papi_cppflags = +sd_papi_enable = no +sd_papi_enable_def = no +sd_papi_init = def +sd_papi_ldflags = +sd_papi_libs = +sd_papi_ok = unknown +sd_papi_options = optional fail +sd_papi_policy = fail +sd_papi_sd_papi_fcflags = +sd_papi_status = optional +sd_pfft_cflags = +sd_pfft_cppflags = +sd_pfft_enable = no +sd_pfft_enable_def = no +sd_pfft_init = def +sd_pfft_ldflags = +sd_pfft_libs = +sd_pfft_ok = unknown +sd_pfft_options = optional skip +sd_pfft_policy = skip +sd_pfft_status = optional +sd_sys_fcflags = +sd_triqs_cflags = +sd_triqs_cppflags = +sd_triqs_cxxflags = +sd_triqs_enable = no +sd_triqs_enable_def = no +sd_triqs_fcflags = +sd_triqs_init = def +sd_triqs_ldflags = +sd_triqs_libs = +sd_triqs_ok = unknown +sd_triqs_options = optional fail +sd_triqs_policy = fail +sd_triqs_status = optional +sd_wannier90_cppflags = +sd_wannier90_enable = yes +sd_wannier90_enable_def = no +sd_wannier90_fcflags = -I/opt/local/include +sd_wannier90_init = env +sd_wannier90_ldflags = +sd_wannier90_libs = -L/opt/local/lib -lwannier +sd_wannier90_ok = yes +sd_wannier90_options = optional warn +sd_wannier90_policy = warn +sd_wannier90_status = optional +sd_xmlf90_cppflags = +sd_xmlf90_enable = no +sd_xmlf90_enable_def = no +sd_xmlf90_fcflags = +sd_xmlf90_init = def +sd_xmlf90_ldflags = +sd_xmlf90_libs = +sd_xmlf90_ok = unknown +sd_xmlf90_options = optional warn +sd_xmlf90_policy = warn +sd_xmlf90_status = optional +sd_yakl_cppflags = +sd_yakl_enable = no +sd_yakl_enable_def = no +sd_yakl_fcflags = +sd_yakl_init = def +sd_yakl_ldflags = +sd_yakl_libs = +sd_yakl_ok = unknown +sd_yakl_options = optional fail +sd_yakl_policy = fail +sd_yakl_status = optional +sharedstatedir = ${prefix}/com +src_02_clib_fcflags = -I$(top_builddir)/shared/common/src/02_clib -I$(top_srcdir)/shared/common/src/02_clib +src_10_defs_fcflags = -I$(top_builddir)/shared/common/src/10_defs -I$(top_srcdir)/shared/common/src/10_defs +src_11_memory_mpi_fcflags = -I$(top_builddir)/shared/common/src/11_memory_mpi -I$(top_srcdir)/shared/common/src/11_memory_mpi +src_12_hide_mpi_fcflags = -I$(top_builddir)/shared/common/src/12_hide_mpi -I$(top_srcdir)/shared/common/src/12_hide_mpi +src_14_hidewrite_fcflags = -I$(top_builddir)/shared/common/src/14_hidewrite -I$(top_srcdir)/shared/common/src/14_hidewrite +src_16_hideleave_fcflags = -I$(top_builddir)/shared/common/src/16_hideleave -I$(top_srcdir)/shared/common/src/16_hideleave +src_16_kokkos_toolbox_fcflags = -I$(top_builddir)/shared/common/src/16_kokkos_toolbox -I$(top_srcdir)/shared/common/src/16_kokkos_toolbox +src_17_gpu_toolbox_fcflags = -I$(top_builddir)/shared/common/src/17_gpu_toolbox -I$(top_srcdir)/shared/common/src/17_gpu_toolbox +src_17_libtetra_ext_fcflags = -I$(top_builddir)/shared/common/src/17_libtetra_ext -I$(top_srcdir)/shared/common/src/17_libtetra_ext +src_17_minimax_fcflags = -I$(top_builddir)/shared/common/src/17_minimax -I$(top_srcdir)/shared/common/src/17_minimax +src_17_yaml_out_fcflags = -I$(top_builddir)/shared/common/src/17_yaml_out -I$(top_srcdir)/shared/common/src/17_yaml_out +src_18_timing_fcflags = -I$(top_builddir)/shared/common/src/18_timing -I$(top_srcdir)/shared/common/src/18_timing +src_21_hashfuncs_fcflags = -I$(top_builddir)/shared/common/src/21_hashfuncs -I$(top_srcdir)/shared/common/src/21_hashfuncs +src_27_toolbox_oop_fcflags = -I$(top_builddir)/shared/common/src/27_toolbox_oop -I$(top_srcdir)/shared/common/src/27_toolbox_oop +src_28_numeric_noabirule_fcflags = -I$(top_builddir)/shared/common/src/28_numeric_noabirule -I$(top_srcdir)/shared/common/src/28_numeric_noabirule +src_29_kpoints_fcflags = -I$(top_builddir)/shared/common/src/29_kpoints -I$(top_srcdir)/shared/common/src/29_kpoints +src_32_util_fcflags = -I$(top_builddir)/shared/common/src/32_util -I$(top_srcdir)/shared/common/src/32_util +src_33_xc_lowlevel_fcflags = -I$(top_builddir)/shared/common/src/33_xc_lowlevel -I$(top_srcdir)/shared/common/src/33_xc_lowlevel +src_39_libpaw_fcflags = -I$(top_builddir)/shared/libpaw/src -I$(top_srcdir)/shared/libpaw/src +src_41_geometry_fcflags = -I$(top_builddir)/src/41_geometry -I$(top_srcdir)/src/41_geometry +src_42_nlstrain_fcflags = -I$(top_builddir)/src/42_nlstrain -I$(top_srcdir)/src/42_nlstrain +src_42_parser_fcflags = -I$(top_builddir)/src/42_parser -I$(top_srcdir)/src/42_parser +src_43_ptgroups_fcflags = -I$(top_builddir)/src/43_ptgroups -I$(top_srcdir)/src/43_ptgroups +src_43_wvl_wrappers_fcflags = -I$(top_builddir)/src/43_wvl_wrappers -I$(top_srcdir)/src/43_wvl_wrappers +src_44_abitools_fcflags = -I$(top_builddir)/src/44_abitools -I$(top_srcdir)/src/44_abitools +src_44_abitypes_defs_fcflags = -I$(top_builddir)/src/44_abitypes_defs -I$(top_srcdir)/src/44_abitypes_defs +src_44_manage_kokkos_fcflags = -I$(top_builddir)/src/44_manage_kokkos -I$(top_srcdir)/src/44_manage_kokkos +src_45_geomoptim_fcflags = -I$(top_builddir)/src/45_geomoptim -I$(top_srcdir)/src/45_geomoptim +src_45_xgTools_fcflags = -I$(top_builddir)/src/45_xgTools -I$(top_srcdir)/src/45_xgTools +src_46_ghc_omp_fcflags = -I$(top_builddir)/src/46_ghc_omp -I$(top_srcdir)/src/46_ghc_omp +src_46_manage_cuda_fcflags = -I$(top_builddir)/src/46_manage_cuda -I$(top_srcdir)/src/46_manage_cuda +src_48_diago_fcflags = -I$(top_builddir)/src/48_diago -I$(top_srcdir)/src/48_diago +src_49_gw_toolbox_oop_fcflags = -I$(top_builddir)/src/49_gw_toolbox_oop -I$(top_srcdir)/src/49_gw_toolbox_oop +src_51_manage_mpi_fcflags = -I$(top_builddir)/src/51_manage_mpi -I$(top_srcdir)/src/51_manage_mpi +src_52_fft_mpi_noabirule_fcflags = -I$(top_builddir)/src/52_fft_mpi_noabirule -I$(top_srcdir)/src/52_fft_mpi_noabirule +src_53_ffts_fcflags = -I$(top_builddir)/src/53_ffts -I$(top_srcdir)/src/53_ffts +src_54_spacepar_fcflags = -I$(top_builddir)/src/54_spacepar -I$(top_srcdir)/src/54_spacepar +src_55_abiutil_fcflags = -I$(top_builddir)/src/55_abiutil -I$(top_srcdir)/src/55_abiutil +src_56_io_mpi_fcflags = -I$(top_builddir)/src/56_io_mpi -I$(top_srcdir)/src/56_io_mpi +src_56_mixing_fcflags = -I$(top_builddir)/src/56_mixing -I$(top_srcdir)/src/56_mixing +src_56_recipspace_fcflags = -I$(top_builddir)/src/56_recipspace -I$(top_srcdir)/src/56_recipspace +src_56_xc_fcflags = -I$(top_builddir)/src/56_xc -I$(top_srcdir)/src/56_xc +src_57_iopsp_parser_fcflags = -I$(top_builddir)/src/57_iopsp_parser -I$(top_srcdir)/src/57_iopsp_parser +src_57_iovars_fcflags = -I$(top_builddir)/src/57_iovars -I$(top_srcdir)/src/57_iovars +src_61_occeig_fcflags = -I$(top_builddir)/src/61_occeig -I$(top_srcdir)/src/61_occeig +src_62_cg_noabirule_fcflags = -I$(top_builddir)/src/62_cg_noabirule -I$(top_srcdir)/src/62_cg_noabirule +src_62_ctqmc_fcflags = -I$(top_builddir)/src/62_ctqmc -I$(top_srcdir)/src/62_ctqmc +src_62_iowfdenpot_fcflags = -I$(top_builddir)/src/62_iowfdenpot -I$(top_srcdir)/src/62_iowfdenpot +src_62_poisson_fcflags = -I$(top_builddir)/src/62_poisson -I$(top_srcdir)/src/62_poisson +src_62_wvl_wfs_fcflags = -I$(top_builddir)/src/62_wvl_wfs -I$(top_srcdir)/src/62_wvl_wfs +src_64_psp_fcflags = -I$(top_builddir)/src/64_psp -I$(top_srcdir)/src/64_psp +src_65_lotf_base_fcflags = -I$(top_builddir)/src/65_lotf_base -I$(top_srcdir)/src/65_lotf_base +src_65_paw_fcflags = -I$(top_builddir)/src/65_paw -I$(top_srcdir)/src/65_paw +src_66_nonlocal_fcflags = -I$(top_builddir)/src/66_nonlocal -I$(top_srcdir)/src/66_nonlocal +src_66_vdwxc_fcflags = -I$(top_builddir)/src/66_vdwxc -I$(top_srcdir)/src/66_vdwxc +src_66_wfs_fcflags = -I$(top_builddir)/src/66_wfs -I$(top_srcdir)/src/66_wfs +src_67_common_fcflags = -I$(top_builddir)/src/67_common -I$(top_srcdir)/src/67_common +src_67_python_invocation_ext_fcflags = -I$(top_builddir)/src/67_python_invocation_ext -I$(top_srcdir)/src/67_python_invocation_ext +src_67_triqs_ext_fcflags = -I$(top_builddir)/src/67_triqs_ext -I$(top_srcdir)/src/67_triqs_ext +src_68_dmft_fcflags = -I$(top_builddir)/src/68_dmft -I$(top_srcdir)/src/68_dmft +src_68_lotf_fcflags = -I$(top_builddir)/src/68_lotf -I$(top_srcdir)/src/68_lotf +src_68_recursion_fcflags = -I$(top_builddir)/src/68_recursion -I$(top_srcdir)/src/68_recursion +src_68_rsprc_fcflags = -I$(top_builddir)/src/68_rsprc -I$(top_srcdir)/src/68_rsprc +src_69_wfdesc_fcflags = -I$(top_builddir)/src/69_wfdesc -I$(top_srcdir)/src/69_wfdesc +src_70_gw_fcflags = -I$(top_builddir)/src/70_gw -I$(top_srcdir)/src/70_gw +src_71_bse_fcflags = -I$(top_builddir)/src/71_bse -I$(top_srcdir)/src/71_bse +src_71_wannier_fcflags = -I$(top_builddir)/src/71_wannier -I$(top_srcdir)/src/71_wannier +src_72_response_fcflags = -I$(top_builddir)/src/72_response -I$(top_srcdir)/src/72_response +src_77_ddb_fcflags = -I$(top_builddir)/src/77_ddb -I$(top_srcdir)/src/77_ddb +src_77_suscep_fcflags = -I$(top_builddir)/src/77_suscep -I$(top_srcdir)/src/77_suscep +src_78_effpot_fcflags = -I$(top_builddir)/src/78_effpot -I$(top_srcdir)/src/78_effpot +src_78_eph_fcflags = -I$(top_builddir)/src/78_eph -I$(top_srcdir)/src/78_eph +src_79_seqpar_mpi_fcflags = -I$(top_builddir)/src/79_seqpar_mpi -I$(top_srcdir)/src/79_seqpar_mpi +src_80_rttddft_fcflags = -I$(top_builddir)/src/80_rttddft -I$(top_srcdir)/src/80_rttddft +src_80_tdep_fcflags = -I$(top_builddir)/src/80_tdep -I$(top_srcdir)/src/80_tdep +src_94_scfcv_fcflags = -I$(top_builddir)/src/94_scfcv -I$(top_srcdir)/src/94_scfcv +src_95_drive_fcflags = -I$(top_builddir)/src/95_drive -I$(top_srcdir)/src/95_drive +src_common_fcflags = -I$(top_builddir)/shared/common/src/incs -I$(top_srcdir)/shared/common/src/incs -I$(top_builddir)/shared/common/src/mods -I$(top_srcdir)/shared/common/src/mods +src_core_fcflags = -I$(top_builddir)/src/incs -I$(top_srcdir)/src/incs -I$(top_builddir)/src/mods -I$(top_srcdir)/src/mods +src_libpaw_fcflags = -I$(top_builddir)/shared/libpaw/incs -I$(top_srcdir)/shared/libpaw/incs -I$(top_builddir)/shared/libpaw/mods -I$(top_srcdir)/shared/libpaw/mods +srcdir = . +sysconfdir = ${prefix}/etc +target = x86_64-apple-darwin18.7.0 +target_alias = +target_cpu = x86_64 +target_os = darwin18.7.0 +target_vendor = apple +top_build_prefix = ../../../../ +top_builddir = ../../../.. +top_srcdir = ../../../.. +with_abinit_common = +with_bigdft = +with_config_file = +with_debug_flavor = +with_fallbacks = +with_fc_vendor = +with_fc_version = +with_fft_flavor = fftw3 +with_fftw3 = +with_gnu_ld = +with_gpu = +with_hdf5 = /opt/local +with_kokkos = +with_levmar = +with_libpaw = +with_libpsml = +with_libxc = /opt/local +with_libxml2 = +with_linalg_flavor = openblas +with_mpi = /opt/local +with_mpi_level = +with_netcdf = /opt/local +with_optim_flavor = +with_papi = +with_pfft = +with_triqs = +with_wannier90 = +with_xmlf90 = +with_yakl = +AM_CFLAGS = -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include +AM_CXXFLAGS = $(sd_triqs_cxxflags) +AM_FCFLAGS = -ffree-form -J../mods +AM_CPPFLAGS = \ + -I$(top_builddir)/shared/common/src/10_defs -I$(top_srcdir)/shared/common/src/10_defs \ + -I$(top_builddir)/shared/common/src/12_hide_mpi -I$(top_srcdir)/shared/common/src/12_hide_mpi \ + -I$(top_builddir)/shared/common/src/14_hidewrite -I$(top_srcdir)/shared/common/src/14_hidewrite \ + -I$(top_builddir)/shared/common/src/16_kokkos_toolbox -I$(top_srcdir)/shared/common/src/16_kokkos_toolbox \ + -I$(top_builddir)/shared/common/src/17_gpu_toolbox -I$(top_srcdir)/shared/common/src/17_gpu_toolbox \ + -I$(top_builddir)/shared/common/src/incs -I$(top_srcdir)/shared/common/src/incs -I$(top_builddir)/shared/common/src/mods -I$(top_srcdir)/shared/common/src/mods \ + -I$(top_builddir)/src/incs -I$(top_srcdir)/src/incs -I$(top_builddir)/src/mods -I$(top_srcdir)/src/mods \ + -I$(top_builddir)/shared/libpaw/incs -I$(top_srcdir)/shared/libpaw/incs -I$(top_builddir)/shared/libpaw/mods -I$(top_srcdir)/shared/libpaw/mods \ + \ + \ + \ + -I/opt/local/include \ + + + +# Regular source files +lib17_gpu_toolbox_srcs = \ + dev_spec.cpp \ + gpu_fft.cpp \ + gpu_linalg.cpp \ + m_gpu_detect.F90 \ + m_gpu_toolbox.F90 \ + m_initcuda.F90 \ + m_nvtx.F90 \ + timing.cpp + + +# Source files depending on conditionals + +# Library description +noinst_LIBRARIES = lib17_gpu_toolbox.a +lib17_gpu_toolbox_a_SOURCES = $(lib17_gpu_toolbox_srcs) + +# Dependencies (inside the directory) of directory 17_gpu_toolbox +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. +CLEANFILES = m_gpu_detect_cpp.f90 m_gpu_toolbox_cpp.f90 \ + m_initcuda_cpp.f90 m_nvtx_cpp.f90 m_gpu_detect.$(MODEXT) \ + m_gpu_toolbox.$(MODEXT) m_initcuda.$(MODEXT) m_nvtx.$(MODEXT) +EXTRA_DIST = abinit.src abinit.dep abinit.amf $(h_list) $(cpp_list) \ + _17_gpu_toolbox_ +h_list = \ + abi_gpu_header_common.h \ + cuda_api_error_check.h \ + hip_api_error_check.h \ + gpu_fft.h \ + gpu_linalg.h + +cpp_list = \ + dev_spec_cuda.cpp \ + dev_spec_hip.cpp \ + gpu_fft_cuda.cpp \ + gpu_fft_hip.cpp \ + gpu_linalg_cuda.cpp \ + gpu_linalg_hip.cpp \ + timing_cuda.cpp \ + timing_hip.cpp + + +# make sure lib12_hide_mpi is recompiled if any file from finc_list is modified +lib17_gpu_toolbox_a_DEPENDENCIES = $(h_list) $(cpp_list) +all: all-am + +.SUFFIXES: +.SUFFIXES: .F90 .cpp .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu shared/common/src/17_gpu_toolbox/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu shared/common/src/17_gpu_toolbox/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) + +lib17_gpu_toolbox.a: $(lib17_gpu_toolbox_a_OBJECTS) $(lib17_gpu_toolbox_a_DEPENDENCIES) $(EXTRA_lib17_gpu_toolbox_a_DEPENDENCIES) + $(AM_V_at)-rm -f lib17_gpu_toolbox.a + $(AM_V_AR)$(lib17_gpu_toolbox_a_AR) lib17_gpu_toolbox.a $(lib17_gpu_toolbox_a_OBJECTS) $(lib17_gpu_toolbox_a_LIBADD) + $(AM_V_at)$(RANLIB) lib17_gpu_toolbox.a + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +include ./$(DEPDIR)/dev_spec.Po # am--include-marker +include ./$(DEPDIR)/gpu_fft.Po # am--include-marker +include ./$(DEPDIR)/gpu_linalg.Po # am--include-marker +include ./$(DEPDIR)/timing.Po # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) + +.F90.o: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ $< + +.F90.obj: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.o: + $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< + $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# $(AM_V_CXX)source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \ +# $(AM_V_CXX_no)$(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: + $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` + $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# $(AM_V_CXX)source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \ +# $(AM_V_CXX_no)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -f ./$(DEPDIR)/dev_spec.Po + -rm -f ./$(DEPDIR)/gpu_fft.Po + -rm -f ./$(DEPDIR)/gpu_linalg.Po + -rm -f ./$(DEPDIR)/timing.Po + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f ./$(DEPDIR)/dev_spec.Po + -rm -f ./$(DEPDIR)/gpu_fft.Po + -rm -f ./$(DEPDIR)/gpu_linalg.Po + -rm -f ./$(DEPDIR)/timing.Po + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ + clean-generic clean-noinstLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am + +.PRECIOUS: Makefile + + +m_gpu_detect.$(OBJEXT): m_initcuda.$(OBJEXT) + +m_gpu_toolbox.$(OBJEXT): m_gpu_detect.$(OBJEXT) m_initcuda.$(OBJEXT) + +dev_spec.$(OBJEXT): dev_spec.cpp +gpu_fft.$(OBJEXT): gpu_fft.cpp +gpu_linalg.$(OBJEXT): gpu_linalg.cpp +timing.$(OBJEXT): timing.cpp + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/GX-PAW/common/src/17_gpu_toolbox/Makefile.am b/GX-PAW/common/src/17_gpu_toolbox/Makefile.am new file mode 100644 index 00000000..adbba87e --- /dev/null +++ b/GX-PAW/common/src/17_gpu_toolbox/Makefile.am @@ -0,0 +1,104 @@ +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-corelibs on 2024/03/16 21:07:38 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-corelibs script or its config file instead. +# + +AM_CFLAGS = @ABI_CPPFLAGS@ +AM_CXXFLAGS = $(sd_triqs_cxxflags) +AM_FCFLAGS = @FPPFLAGS@ @FCFLAGS_FREEFORM@ @FCFLAGS_MODDIR@ @sd_sys_fcflags@ @fcflags_opt_17_gpu_toolbox@ + +AM_CPPFLAGS = \ + @src_10_defs_fcflags@ \ + @src_12_hide_mpi_fcflags@ \ + @src_14_hidewrite_fcflags@ \ + @src_16_kokkos_toolbox_fcflags@ \ + @src_17_gpu_toolbox_fcflags@ \ + @src_common_fcflags@ \ + @src_core_fcflags@ \ + @src_libpaw_fcflags@ \ + @sd_gpu_cppflags@ \ + @sd_gpu_fcflags@ \ + @sd_linalg_cppflags@ \ + @sd_linalg_fcflags@ \ + @fc_mod_fcflags@ + +# Regular source files +lib17_gpu_toolbox_srcs = \ + dev_spec.cpp \ + gpu_fft.cpp \ + gpu_linalg.cpp \ + m_gpu_detect.F90 \ + m_gpu_toolbox.F90 \ + m_initcuda.F90 \ + m_nvtx.F90 \ + timing.cpp + +# Source files depending on conditionals + + +# Library description +noinst_LIBRARIES = lib17_gpu_toolbox.a + +lib17_gpu_toolbox_a_SOURCES= $(lib17_gpu_toolbox_srcs) + +CLEANFILES = \ + m_gpu_detect_cpp.f90 \ + m_gpu_toolbox_cpp.f90 \ + m_initcuda_cpp.f90 \ + m_nvtx_cpp.f90 + +EXTRA_DIST = abinit.src + +EXTRA_DIST += abinit.dep + +# Dependencies (inside the directory) of directory 17_gpu_toolbox +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. + +CLEANFILES += \ + m_gpu_detect.$(MODEXT) \ + m_gpu_toolbox.$(MODEXT) \ + m_initcuda.$(MODEXT) \ + m_nvtx.$(MODEXT) + +m_gpu_detect.$(OBJEXT): m_initcuda.$(OBJEXT) + +m_gpu_toolbox.$(OBJEXT): m_gpu_detect.$(OBJEXT) m_initcuda.$(OBJEXT) +EXTRA_DIST += abinit.amf + +h_list = \ + abi_gpu_header_common.h \ + cuda_api_error_check.h \ + hip_api_error_check.h \ + gpu_fft.h \ + gpu_linalg.h + +cpp_list = \ + dev_spec_cuda.cpp \ + dev_spec_hip.cpp \ + gpu_fft_cuda.cpp \ + gpu_fft_hip.cpp \ + gpu_linalg_cuda.cpp \ + gpu_linalg_hip.cpp \ + timing_cuda.cpp \ + timing_hip.cpp + +EXTRA_DIST += $(h_list) $(cpp_list) + +dev_spec.$(OBJEXT): dev_spec.cpp +gpu_fft.$(OBJEXT): gpu_fft.cpp +gpu_linalg.$(OBJEXT): gpu_linalg.cpp +timing.$(OBJEXT): timing.cpp + +# make sure lib12_hide_mpi is recompiled if any file from finc_list is modified +lib17_gpu_toolbox_a_DEPENDENCIES = $(h_list) $(cpp_list) + +EXTRA_DIST += _17_gpu_toolbox_ diff --git a/GX-PAW/common/src/17_gpu_toolbox/Makefile.in b/GX-PAW/common/src/17_gpu_toolbox/Makefile.in new file mode 100644 index 00000000..e827e784 --- /dev/null +++ b/GX-PAW/common/src/17_gpu_toolbox/Makefile.in @@ -0,0 +1,1565 @@ +# Makefile.in generated by automake 1.16.3 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2020 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-corelibs on 2024/03/16 21:07:38 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-corelibs script or its config file instead. +# + +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = shared/common/src/17_gpu_toolbox +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/m4/arch-gpu.m4 \ + $(top_srcdir)/config/m4/arch-mpi.m4 \ + $(top_srcdir)/config/m4/auto-autotools.m4 \ + $(top_srcdir)/config/m4/auto-corelibs.m4 \ + $(top_srcdir)/config/m4/auto-debug.m4 \ + $(top_srcdir)/config/m4/auto-dirflags.m4 \ + $(top_srcdir)/config/m4/auto-env.m4 \ + $(top_srcdir)/config/m4/auto-hints.m4 \ + $(top_srcdir)/config/m4/auto-optim.m4 \ + $(top_srcdir)/config/m4/auto-options.m4 \ + $(top_srcdir)/config/m4/auto-output.m4 \ + $(top_srcdir)/config/m4/auto-triggers.m4 \ + $(top_srcdir)/config/m4/conf-atompaw.m4 \ + $(top_srcdir)/config/m4/conf-debug.m4 \ + $(top_srcdir)/config/m4/conf-fallbacks.m4 \ + $(top_srcdir)/config/m4/conf-files.m4 \ + $(top_srcdir)/config/m4/conf-init.m4 \ + $(top_srcdir)/config/m4/conf-openmp.m4 \ + $(top_srcdir)/config/m4/conf-optim.m4 \ + $(top_srcdir)/config/m4/lang-c++.m4 \ + $(top_srcdir)/config/m4/lang-c.m4 \ + $(top_srcdir)/config/m4/lang-fortran-import.m4 \ + $(top_srcdir)/config/m4/lang-fortran.m4 \ + $(top_srcdir)/config/m4/lang-python.m4 \ + $(top_srcdir)/config/m4/libxml2.m4 \ + $(top_srcdir)/config/m4/misc-display.m4 \ + $(top_srcdir)/config/m4/sd_abinit_common.m4 \ + $(top_srcdir)/config/m4/sd_arch_gpu.m4 \ + $(top_srcdir)/config/m4/sd_arch_mpi.m4 \ + $(top_srcdir)/config/m4/sd_bigdft.m4 \ + $(top_srcdir)/config/m4/sd_core.m4 \ + $(top_srcdir)/config/m4/sd_esl.m4 \ + $(top_srcdir)/config/m4/sd_fftw3.m4 \ + $(top_srcdir)/config/m4/sd_gpu_kokkos.m4 \ + $(top_srcdir)/config/m4/sd_gpu_yakl.m4 \ + $(top_srcdir)/config/m4/sd_io_hdf5.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf_fortran.m4 \ + $(top_srcdir)/config/m4/sd_levmar.m4 \ + $(top_srcdir)/config/m4/sd_libpaw.m4 \ + $(top_srcdir)/config/m4/sd_libpsml.m4 \ + $(top_srcdir)/config/m4/sd_libxc.m4 \ + $(top_srcdir)/config/m4/sd_math_fft.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_core.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_util.m4 \ + $(top_srcdir)/config/m4/sd_papi.m4 \ + $(top_srcdir)/config/m4/sd_pfft.m4 \ + $(top_srcdir)/config/m4/sd_triqs.m4 \ + $(top_srcdir)/config/m4/sd_wannier90.m4 \ + $(top_srcdir)/config/m4/sd_xmlf90.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = +lib17_gpu_toolbox_a_AR = $(AR) $(ARFLAGS) +lib17_gpu_toolbox_a_LIBADD = +am__objects_1 = dev_spec.$(OBJEXT) gpu_fft.$(OBJEXT) \ + gpu_linalg.$(OBJEXT) m_gpu_detect.$(OBJEXT) \ + m_gpu_toolbox.$(OBJEXT) m_initcuda.$(OBJEXT) m_nvtx.$(OBJEXT) \ + timing.$(OBJEXT) +am_lib17_gpu_toolbox_a_OBJECTS = $(am__objects_1) +lib17_gpu_toolbox_a_OBJECTS = $(am_lib17_gpu_toolbox_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/config/gnu/depcomp +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/dev_spec.Po ./$(DEPDIR)/gpu_fft.Po \ + ./$(DEPDIR)/gpu_linalg.Po ./$(DEPDIR)/timing.Po +am__mv = mv -f +PPFCCOMPILE = $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) +AM_V_PPFC = $(am__v_PPFC_@AM_V@) +am__v_PPFC_ = $(am__v_PPFC_@AM_DEFAULT_V@) +am__v_PPFC_0 = @echo " PPFC " $@; +am__v_PPFC_1 = +FCLD = $(FC) +FCLINK = $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \ + $@ +AM_V_FCLD = $(am__v_FCLD_@AM_V@) +am__v_FCLD_ = $(am__v_FCLD_@AM_DEFAULT_V@) +am__v_FCLD_0 = @echo " FCLD " $@; +am__v_FCLD_1 = +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = +CXXLD = $(CXX) +CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ + -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(lib17_gpu_toolbox_a_SOURCES) +DIST_SOURCES = $(lib17_gpu_toolbox_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in \ + $(top_srcdir)/config/gnu/depcomp +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ABINIT_BINARY_PACKAGE = @ABINIT_BINARY_PACKAGE@ +ABINIT_COMMON_CPPFLAGS = @ABINIT_COMMON_CPPFLAGS@ +ABINIT_COMMON_FCFLAGS = @ABINIT_COMMON_FCFLAGS@ +ABINIT_COMMON_LDFLAGS = @ABINIT_COMMON_LDFLAGS@ +ABINIT_COMMON_LIBS = @ABINIT_COMMON_LIBS@ +ABINIT_TARGET = @ABINIT_TARGET@ +ABINIT_VERSION = @ABINIT_VERSION@ +ABINIT_VERSION_BASE = @ABINIT_VERSION_BASE@ +ABINIT_VERSION_BUILD = @ABINIT_VERSION_BUILD@ +ABINIT_VERSION_MAJOR = @ABINIT_VERSION_MAJOR@ +ABINIT_VERSION_MICRO = @ABINIT_VERSION_MICRO@ +ABINIT_VERSION_MINOR = @ABINIT_VERSION_MINOR@ +ABI_CPPFLAGS = @ABI_CPPFLAGS@ +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +ARFLAGS = @ARFLAGS@ +ARFLAGS_CMD = @ARFLAGS_CMD@ +ARFLAGS_DEBUG = @ARFLAGS_DEBUG@ +ARFLAGS_EXTRA = @ARFLAGS_EXTRA@ +ARFLAGS_HINTS = @ARFLAGS_HINTS@ +ARFLAGS_OPTIM = @ARFLAGS_OPTIM@ +ATOMPAW_BIN = @ATOMPAW_BIN@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BIGDFT_CPPFLAGS = @BIGDFT_CPPFLAGS@ +BIGDFT_FCFLAGS = @BIGDFT_FCFLAGS@ +BIGDFT_LDFLAGS = @BIGDFT_LDFLAGS@ +BIGDFT_LIBS = @BIGDFT_LIBS@ +BOURNE_SHELL = @BOURNE_SHELL@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CC_LDFLAGS = @CC_LDFLAGS@ +CC_LDFLAGS_DEBUG = @CC_LDFLAGS_DEBUG@ +CC_LDFLAGS_EXTRA = @CC_LDFLAGS_EXTRA@ +CC_LDFLAGS_GPU = @CC_LDFLAGS_GPU@ +CC_LDFLAGS_HINTS = @CC_LDFLAGS_HINTS@ +CC_LDFLAGS_OPTIM = @CC_LDFLAGS_OPTIM@ +CC_LIBS = @CC_LIBS@ +CC_LIBS_DEBUG = @CC_LIBS_DEBUG@ +CC_LIBS_EXTRA = @CC_LIBS_EXTRA@ +CC_LIBS_GPU = @CC_LIBS_GPU@ +CC_LIBS_HINTS = @CC_LIBS_HINTS@ +CC_LIBS_OPTIM = @CC_LIBS_OPTIM@ +CFLAGS = @CFLAGS@ +CFLAGS_DEBUG = @CFLAGS_DEBUG@ +CFLAGS_EXTRA = @CFLAGS_EXTRA@ +CFLAGS_GPU = @CFLAGS_GPU@ +CFLAGS_HINTS = @CFLAGS_HINTS@ +CFLAGS_OPTIM = @CFLAGS_OPTIM@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CPPFLAGS_DEBUG = @CPPFLAGS_DEBUG@ +CPPFLAGS_EXTRA = @CPPFLAGS_EXTRA@ +CPPFLAGS_GPU = @CPPFLAGS_GPU@ +CPPFLAGS_HINTS = @CPPFLAGS_HINTS@ +CPPFLAGS_HINTS_EXT = @CPPFLAGS_HINTS_EXT@ +CPPFLAGS_OPTIM = @CPPFLAGS_OPTIM@ +CXX = @CXX@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CXXFLAGS_DEBUG = @CXXFLAGS_DEBUG@ +CXXFLAGS_EXTRA = @CXXFLAGS_EXTRA@ +CXXFLAGS_GPU = @CXXFLAGS_GPU@ +CXXFLAGS_HINTS = @CXXFLAGS_HINTS@ +CXXFLAGS_OPTIM = @CXXFLAGS_OPTIM@ +CXX_LDFLAGS = @CXX_LDFLAGS@ +CXX_LDFLAGS_DEBUG = @CXX_LDFLAGS_DEBUG@ +CXX_LDFLAGS_EXTRA = @CXX_LDFLAGS_EXTRA@ +CXX_LDFLAGS_GPU = @CXX_LDFLAGS_GPU@ +CXX_LDFLAGS_HINTS = @CXX_LDFLAGS_HINTS@ +CXX_LDFLAGS_OPTIM = @CXX_LDFLAGS_OPTIM@ +CXX_LIBS = @CXX_LIBS@ +CXX_LIBS_DEBUG = @CXX_LIBS_DEBUG@ +CXX_LIBS_EXTRA = @CXX_LIBS_EXTRA@ +CXX_LIBS_GPU = @CXX_LIBS_GPU@ +CXX_LIBS_HINTS = @CXX_LIBS_HINTS@ +CXX_LIBS_OPTIM = @CXX_LIBS_OPTIM@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ +FCFLAGS = @FCFLAGS@ +FCFLAGS_DEBUG = @FCFLAGS_DEBUG@ +FCFLAGS_EXTRA = @FCFLAGS_EXTRA@ +FCFLAGS_F90 = @FCFLAGS_F90@ +FCFLAGS_FIXEDFORM = @FCFLAGS_FIXEDFORM@ +FCFLAGS_FREEFORM = @FCFLAGS_FREEFORM@ +FCFLAGS_HINTS = @FCFLAGS_HINTS@ +FCFLAGS_MODDIR = @FCFLAGS_MODDIR@ +FCFLAGS_OPENMP = @FCFLAGS_OPENMP@ +FCFLAGS_OPENMP_OFFLOAD = @FCFLAGS_OPENMP_OFFLOAD@ +FCFLAGS_OPTIM = @FCFLAGS_OPTIM@ +FCLIBS = @FCLIBS@ +FC_LDFLAGS = @FC_LDFLAGS@ +FC_LDFLAGS_DEBUG = @FC_LDFLAGS_DEBUG@ +FC_LDFLAGS_EXTRA = @FC_LDFLAGS_EXTRA@ +FC_LDFLAGS_HINTS = @FC_LDFLAGS_HINTS@ +FC_LDFLAGS_OPTIM = @FC_LDFLAGS_OPTIM@ +FC_LIBS = @FC_LIBS@ +FC_LIBS_DEBUG = @FC_LIBS_DEBUG@ +FC_LIBS_EXTRA = @FC_LIBS_EXTRA@ +FC_LIBS_HINTS = @FC_LIBS_HINTS@ +FC_LIBS_OPTIM = @FC_LIBS_OPTIM@ +FC_NOWRAP = @FC_NOWRAP@ +FFLAGS = @FFLAGS@ +FFTW3_CFLAGS = @FFTW3_CFLAGS@ +FFTW3_CPPFLAGS = @FFTW3_CPPFLAGS@ +FFTW3_FCFLAGS = @FFTW3_FCFLAGS@ +FFTW3_LDFLAGS = @FFTW3_LDFLAGS@ +FFTW3_LIBS = @FFTW3_LIBS@ +FFT_CFLAGS = @FFT_CFLAGS@ +FFT_FCFLAGS = @FFT_FCFLAGS@ +FPP = @FPP@ +FPPFLAGS = @FPPFLAGS@ +FPPFLAGS_DEBUG = @FPPFLAGS_DEBUG@ +FPPFLAGS_EXTRA = @FPPFLAGS_EXTRA@ +FPPFLAGS_HINTS = @FPPFLAGS_HINTS@ +FPPFLAGS_OPTIM = @FPPFLAGS_OPTIM@ +GPU_ARCH = @GPU_ARCH@ +GPU_CFLAGS = @GPU_CFLAGS@ +GPU_CPPFLAGS = @GPU_CPPFLAGS@ +GPU_CXXFLAGS = @GPU_CXXFLAGS@ +GPU_FCFLAGS = @GPU_FCFLAGS@ +GPU_LDFLAGS = @GPU_LDFLAGS@ +GPU_LIBS = @GPU_LIBS@ +GRAPHATOM_BIN = @GRAPHATOM_BIN@ +GREP = @GREP@ +H5CC = @H5CC@ +HDF5_CFLAGS = @HDF5_CFLAGS@ +HDF5_CPPFLAGS = @HDF5_CPPFLAGS@ +HDF5_CXXFLAGS = @HDF5_CXXFLAGS@ +HDF5_FCFLAGS = @HDF5_FCFLAGS@ +HDF5_LDFLAGS = @HDF5_LDFLAGS@ +HDF5_LIBS = @HDF5_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +LDFLAGS = @LDFLAGS@ +LEVMAR_CFLAGS = @LEVMAR_CFLAGS@ +LEVMAR_CPPFLAGS = @LEVMAR_CPPFLAGS@ +LEVMAR_LDFLAGS = @LEVMAR_LDFLAGS@ +LEVMAR_LIBS = @LEVMAR_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPAW_CPPFLAGS = @LIBPAW_CPPFLAGS@ +LIBPAW_FCFLAGS = @LIBPAW_FCFLAGS@ +LIBPAW_LDFLAGS = @LIBPAW_LDFLAGS@ +LIBPAW_LIBS = @LIBPAW_LIBS@ +LIBPSML_CPPFLAGS = @LIBPSML_CPPFLAGS@ +LIBPSML_FCFLAGS = @LIBPSML_FCFLAGS@ +LIBPSML_LDFLAGS = @LIBPSML_LDFLAGS@ +LIBPSML_LIBS = @LIBPSML_LIBS@ +LIBS = @LIBS@ +LIBXC_CFLAGS = @LIBXC_CFLAGS@ +LIBXC_CPPFLAGS = @LIBXC_CPPFLAGS@ +LIBXC_FCFLAGS = @LIBXC_FCFLAGS@ +LIBXC_LDFLAGS = @LIBXC_LDFLAGS@ +LIBXC_LIBS = @LIBXC_LIBS@ +LIBXML2_CPPFLAGS = @LIBXML2_CPPFLAGS@ +LIBXML2_FCFLAGS = @LIBXML2_FCFLAGS@ +LIBXML2_LIBS = @LIBXML2_LIBS@ +LINALG_CFLAGS = @LINALG_CFLAGS@ +LINALG_CPPFLAGS = @LINALG_CPPFLAGS@ +LINALG_CXXFLAGS = @LINALG_CXXFLAGS@ +LINALG_FCFLAGS = @LINALG_FCFLAGS@ +LINALG_LDFLAGS = @LINALG_LDFLAGS@ +LINALG_LIBS = @LINALG_LIBS@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODEXT = @MODEXT@ +MPI_CFLAGS = @MPI_CFLAGS@ +MPI_CPPFLAGS = @MPI_CPPFLAGS@ +MPI_CXXFLAGS = @MPI_CXXFLAGS@ +MPI_FCFLAGS = @MPI_FCFLAGS@ +MPI_LDFLAGS = @MPI_LDFLAGS@ +MPI_LIBS = @MPI_LIBS@ +MV = @MV@ +NETCDF_CFLAGS = @NETCDF_CFLAGS@ +NETCDF_CPPFLAGS = @NETCDF_CPPFLAGS@ +NETCDF_CXXFLAGS = @NETCDF_CXXFLAGS@ +NETCDF_FCFLAGS = @NETCDF_FCFLAGS@ +NETCDF_FORTRAN_CFLAGS = @NETCDF_FORTRAN_CFLAGS@ +NETCDF_FORTRAN_CPPFLAGS = @NETCDF_FORTRAN_CPPFLAGS@ +NETCDF_FORTRAN_CXXFLAGS = @NETCDF_FORTRAN_CXXFLAGS@ +NETCDF_FORTRAN_FCFLAGS = @NETCDF_FORTRAN_FCFLAGS@ +NETCDF_FORTRAN_LDFLAGS = @NETCDF_FORTRAN_LDFLAGS@ +NETCDF_FORTRAN_LIBS = @NETCDF_FORTRAN_LIBS@ +NETCDF_LDFLAGS = @NETCDF_LDFLAGS@ +NETCDF_LIBS = @NETCDF_LIBS@ +NVCC = @NVCC@ +NVCC_CFLAGS = @NVCC_CFLAGS@ +NVCC_CPPFLAGS = @NVCC_CPPFLAGS@ +NVCC_LDFLAGS = @NVCC_LDFLAGS@ +NVCC_LIBS = @NVCC_LIBS@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PAPI_CFLAGS = @PAPI_CFLAGS@ +PAPI_CPPFLAGS = @PAPI_CPPFLAGS@ +PAPI_LDFLAGS = @PAPI_LDFLAGS@ +PAPI_LIBS = @PAPI_LIBS@ +PATCH = @PATCH@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PFFT_CFLAGS = @PFFT_CFLAGS@ +PFFT_CPPFLAGS = @PFFT_CPPFLAGS@ +PFFT_LDFLAGS = @PFFT_LDFLAGS@ +PFFT_LIBS = @PFFT_LIBS@ +PYFLAGS = @PYFLAGS@ +PYTHON = @PYTHON@ +PYTHON_CONFIG = @PYTHON_CONFIG@ +PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ +RANLIB = @RANLIB@ +REALPATH = @REALPATH@ +RM = @RM@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +TAR = @TAR@ +TRIQS_CFLAGS = @TRIQS_CFLAGS@ +TRIQS_CPPFLAGS = @TRIQS_CPPFLAGS@ +TRIQS_CXXFLAGS = @TRIQS_CXXFLAGS@ +TRIQS_LDFLAGS = @TRIQS_LDFLAGS@ +TRIQS_LIBS = @TRIQS_LIBS@ +TRUE_CPP = @TRUE_CPP@ +VERSION = @VERSION@ +WANNIER90_CPPFLAGS = @WANNIER90_CPPFLAGS@ +WANNIER90_FCFLAGS = @WANNIER90_FCFLAGS@ +WANNIER90_LDFLAGS = @WANNIER90_LDFLAGS@ +WANNIER90_LIBS = @WANNIER90_LIBS@ +XML2_CONFIG = @XML2_CONFIG@ +XMLF90_CPPFLAGS = @XMLF90_CPPFLAGS@ +XMLF90_FCFLAGS = @XMLF90_FCFLAGS@ +XMLF90_LDFLAGS = @XMLF90_LDFLAGS@ +XMLF90_LIBS = @XMLF90_LIBS@ +XML_CPPFLAGS = @XML_CPPFLAGS@ +XML_LIBS = @XML_LIBS@ +XPP = @XPP@ +XPPFLAGS = @XPPFLAGS@ +XPPFLAGS_DEBUG = @XPPFLAGS_DEBUG@ +XPPFLAGS_EXTRA = @XPPFLAGS_EXTRA@ +XPPFLAGS_OPTIM = @XPPFLAGS_OPTIM@ +YAKL_CPPFLAGS = @YAKL_CPPFLAGS@ +YAKL_FCFLAGS = @YAKL_FCFLAGS@ +YAKL_LDFLAGS = @YAKL_LDFLAGS@ +YAKL_LIBS = @YAKL_LIBS@ +abi_ac_distcheck = @abi_ac_distcheck@ +abi_ac_version = @abi_ac_version@ +abi_am_version = @abi_am_version@ +abi_avx_safe_mode_enable = @abi_avx_safe_mode_enable@ +abi_bse_unpacked_enable = @abi_bse_unpacked_enable@ +abi_cc_path = @abi_cc_path@ +abi_cc_vendor = @abi_cc_vendor@ +abi_cc_version = @abi_cc_version@ +abi_cclock_enable = @abi_cclock_enable@ +abi_cpp_path = @abi_cpp_path@ +abi_cpu_64bits = @abi_cpu_64bits@ +abi_cpu_bits = @abi_cpu_bits@ +abi_cpu_model = @abi_cpu_model@ +abi_cpu_platform = @abi_cpu_platform@ +abi_cpu_spec = @abi_cpu_spec@ +abi_cpu_vendor = @abi_cpu_vendor@ +abi_crpa_optim_enable = @abi_crpa_optim_enable@ +abi_cxx_path = @abi_cxx_path@ +abi_cxx_vendor = @abi_cxx_vendor@ +abi_cxx_version = @abi_cxx_version@ +abi_debug_flavor = @abi_debug_flavor@ +abi_exports_enable = @abi_exports_enable@ +abi_fbk_abinit_common_ok = @abi_fbk_abinit_common_ok@ +abi_fbk_bigdft_ok = @abi_fbk_bigdft_ok@ +abi_fbk_config = @abi_fbk_config@ +abi_fbk_enable = @abi_fbk_enable@ +abi_fbk_fft_ok = @abi_fbk_fft_ok@ +abi_fbk_fftw3_ok = @abi_fbk_fftw3_ok@ +abi_fbk_gpu_ok = @abi_fbk_gpu_ok@ +abi_fbk_hdf5_ok = @abi_fbk_hdf5_ok@ +abi_fbk_init = @abi_fbk_init@ +abi_fbk_kokkos_ok = @abi_fbk_kokkos_ok@ +abi_fbk_levmar_ok = @abi_fbk_levmar_ok@ +abi_fbk_libpaw_ok = @abi_fbk_libpaw_ok@ +abi_fbk_libpsml_ok = @abi_fbk_libpsml_ok@ +abi_fbk_libxc_ok = @abi_fbk_libxc_ok@ +abi_fbk_libxml2_ok = @abi_fbk_libxml2_ok@ +abi_fbk_linalg_ok = @abi_fbk_linalg_ok@ +abi_fbk_list = @abi_fbk_list@ +abi_fbk_mpi_ok = @abi_fbk_mpi_ok@ +abi_fbk_netcdf_fortran_ok = @abi_fbk_netcdf_fortran_ok@ +abi_fbk_netcdf_ok = @abi_fbk_netcdf_ok@ +abi_fbk_papi_ok = @abi_fbk_papi_ok@ +abi_fbk_pfft_ok = @abi_fbk_pfft_ok@ +abi_fbk_prefix = @abi_fbk_prefix@ +abi_fbk_required = @abi_fbk_required@ +abi_fbk_triqs_ok = @abi_fbk_triqs_ok@ +abi_fbk_wannier90_ok = @abi_fbk_wannier90_ok@ +abi_fbk_xmlf90_ok = @abi_fbk_xmlf90_ok@ +abi_fbk_yakl_ok = @abi_fbk_yakl_ok@ +abi_fc_path = @abi_fc_path@ +abi_fc_vendor = @abi_fc_vendor@ +abi_fc_version = @abi_fc_version@ +abi_fc_wrap = @abi_fc_wrap@ +abi_fc_wrapper_enable = @abi_fc_wrapper_enable@ +abi_fpp_path = @abi_fpp_path@ +abi_gpu_arch = @abi_gpu_arch@ +abi_gpu_fcflags = @abi_gpu_fcflags@ +abi_gpu_flavor = @abi_gpu_flavor@ +abi_gpu_hip_libdir = @abi_gpu_hip_libdir@ +abi_gpu_incs = @abi_gpu_incs@ +abi_gpu_ldflags = @abi_gpu_ldflags@ +abi_gpu_libs = @abi_gpu_libs@ +abi_gpu_nvtx_v3 = @abi_gpu_nvtx_v3@ +abi_gpu_roctx = @abi_gpu_roctx@ +abi_gw_dpc_enable = @abi_gw_dpc_enable@ +abi_hints_enable = @abi_hints_enable@ +abi_libtetra_enable = @abi_libtetra_enable@ +abi_libxml2_cppflags = @abi_libxml2_cppflags@ +abi_libxml2_enable = @abi_libxml2_enable@ +abi_libxml2_fcflags = @abi_libxml2_fcflags@ +abi_libxml2_init = @abi_libxml2_init@ +abi_libxml2_ldflags = @abi_libxml2_ldflags@ +abi_libxml2_libs = @abi_libxml2_libs@ +abi_libxml2_ok = @abi_libxml2_ok@ +abi_libxml2_prefix = @abi_libxml2_prefix@ +abi_lotf_enable = @abi_lotf_enable@ +abi_lt_version = @abi_lt_version@ +abi_m4_version = @abi_m4_version@ +abi_memory_profiling_enable = @abi_memory_profiling_enable@ +abi_mpi_cflags = @abi_mpi_cflags@ +abi_mpi_cppflags = @abi_mpi_cppflags@ +abi_mpi_cxxflags = @abi_mpi_cxxflags@ +abi_mpi_enable = @abi_mpi_enable@ +abi_mpi_fcflags = @abi_mpi_fcflags@ +abi_mpi_flavor = @abi_mpi_flavor@ +abi_mpi_gpu_aware_enable = @abi_mpi_gpu_aware_enable@ +abi_mpi_incs = @abi_mpi_incs@ +abi_mpi_inplace_enable = @abi_mpi_inplace_enable@ +abi_mpi_interfaces_bugfix_enable = @abi_mpi_interfaces_bugfix_enable@ +abi_mpi_io_default_enable = @abi_mpi_io_default_enable@ +abi_mpi_io_enable = @abi_mpi_io_enable@ +abi_mpi_ldflags = @abi_mpi_ldflags@ +abi_mpi_level = @abi_mpi_level@ +abi_mpi_libs = @abi_mpi_libs@ +abi_netcdf_default_enable = @abi_netcdf_default_enable@ +abi_openmp_enable = @abi_openmp_enable@ +abi_openmp_offload_enable = @abi_openmp_offload_enable@ +abi_optim_flavor = @abi_optim_flavor@ +abi_python_invocation_enable = @abi_python_invocation_enable@ +abi_source_debug_enable = @abi_source_debug_enable@ +abi_stdin_enable = @abi_stdin_enable@ +abi_sys_spec = @abi_sys_spec@ +abi_timer_enable = @abi_timer_enable@ +abi_triqs_v1_4_enable = @abi_triqs_v1_4_enable@ +abi_triqs_v2_0_enable = @abi_triqs_v2_0_enable@ +abi_zdot_bugfix_enable = @abi_zdot_bugfix_enable@ +abinit_bindir = @abinit_bindir@ +abinit_builddir = @abinit_builddir@ +abinit_chkdir = @abinit_chkdir@ +abinit_datdir = @abinit_datdir@ +abinit_docdir = @abinit_docdir@ +abinit_incdir = @abinit_incdir@ +abinit_libdir = @abinit_libdir@ +abinit_mandir = @abinit_mandir@ +abinit_prefix = @abinit_prefix@ +abinit_srcdir = @abinit_srcdir@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_FC = @ac_ct_FC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cc_info_string = @cc_info_string@ +cxx_info_string = @cxx_info_string@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +enable_avx_safe_mode = @enable_avx_safe_mode@ +enable_bse_unpacked = @enable_bse_unpacked@ +enable_cclock = @enable_cclock@ +enable_crpa_optim = @enable_crpa_optim@ +enable_exports = @enable_exports@ +enable_fc_wrapper = @enable_fc_wrapper@ +enable_gw_dpc = @enable_gw_dpc@ +enable_hints = @enable_hints@ +enable_libtetra = @enable_libtetra@ +enable_lotf = @enable_lotf@ +enable_memory_profiling = @enable_memory_profiling@ +enable_mpi_gpu_aware = @enable_mpi_gpu_aware@ +enable_mpi_inplace = @enable_mpi_inplace@ +enable_mpi_interfaces_bugfix = @enable_mpi_interfaces_bugfix@ +enable_mpi_io = @enable_mpi_io@ +enable_mpi_io_default = @enable_mpi_io_default@ +enable_netcdf_default = @enable_netcdf_default@ +enable_openmp = @enable_openmp@ +enable_openmp_offload = @enable_openmp_offload@ +enable_python_invocation = @enable_python_invocation@ +enable_shared = @enable_shared@ +enable_source_debug = @enable_source_debug@ +enable_static = @enable_static@ +enable_stdin = @enable_stdin@ +enable_timer = @enable_timer@ +enable_triqs_v1_4 = @enable_triqs_v1_4@ +enable_triqs_v2_0 = @enable_triqs_v2_0@ +enable_zdot_bugfix = @enable_zdot_bugfix@ +exec_prefix = @exec_prefix@ +fc_info_string = @fc_info_string@ +fc_mod_fcflags = @fc_mod_fcflags@ +fc_timing = @fc_timing@ +fcflags_opt_02_clib = @fcflags_opt_02_clib@ +fcflags_opt_10_defs = @fcflags_opt_10_defs@ +fcflags_opt_11_memory_mpi = @fcflags_opt_11_memory_mpi@ +fcflags_opt_12_hide_mpi = @fcflags_opt_12_hide_mpi@ +fcflags_opt_14_hidewrite = @fcflags_opt_14_hidewrite@ +fcflags_opt_16_hideleave = @fcflags_opt_16_hideleave@ +fcflags_opt_16_kokkos_toolbox = @fcflags_opt_16_kokkos_toolbox@ +fcflags_opt_17_gpu_toolbox = @fcflags_opt_17_gpu_toolbox@ +fcflags_opt_17_libtetra_ext = @fcflags_opt_17_libtetra_ext@ +fcflags_opt_17_minimax = @fcflags_opt_17_minimax@ +fcflags_opt_17_yaml_out = @fcflags_opt_17_yaml_out@ +fcflags_opt_18_timing = @fcflags_opt_18_timing@ +fcflags_opt_21_hashfuncs = @fcflags_opt_21_hashfuncs@ +fcflags_opt_27_toolbox_oop = @fcflags_opt_27_toolbox_oop@ +fcflags_opt_28_numeric_noabirule = @fcflags_opt_28_numeric_noabirule@ +fcflags_opt_29_kpoints = @fcflags_opt_29_kpoints@ +fcflags_opt_32_util = @fcflags_opt_32_util@ +fcflags_opt_33_xc_lowlevel = @fcflags_opt_33_xc_lowlevel@ +fcflags_opt_39_libpaw = @fcflags_opt_39_libpaw@ +fcflags_opt_41_geometry = @fcflags_opt_41_geometry@ +fcflags_opt_42_nlstrain = @fcflags_opt_42_nlstrain@ +fcflags_opt_42_parser = @fcflags_opt_42_parser@ +fcflags_opt_43_ptgroups = @fcflags_opt_43_ptgroups@ +fcflags_opt_43_wvl_wrappers = @fcflags_opt_43_wvl_wrappers@ +fcflags_opt_44_abitools = @fcflags_opt_44_abitools@ +fcflags_opt_44_abitypes_defs = @fcflags_opt_44_abitypes_defs@ +fcflags_opt_44_manage_kokkos = @fcflags_opt_44_manage_kokkos@ +fcflags_opt_45_geomoptim = @fcflags_opt_45_geomoptim@ +fcflags_opt_45_xgTools = @fcflags_opt_45_xgTools@ +fcflags_opt_46_ghc_omp = @fcflags_opt_46_ghc_omp@ +fcflags_opt_46_manage_cuda = @fcflags_opt_46_manage_cuda@ +fcflags_opt_48_diago = @fcflags_opt_48_diago@ +fcflags_opt_49_gw_toolbox_oop = @fcflags_opt_49_gw_toolbox_oop@ +fcflags_opt_51_manage_mpi = @fcflags_opt_51_manage_mpi@ +fcflags_opt_52_fft_mpi_noabirule = @fcflags_opt_52_fft_mpi_noabirule@ +fcflags_opt_53_ffts = @fcflags_opt_53_ffts@ +fcflags_opt_54_spacepar = @fcflags_opt_54_spacepar@ +fcflags_opt_55_abiutil = @fcflags_opt_55_abiutil@ +fcflags_opt_56_io_mpi = @fcflags_opt_56_io_mpi@ +fcflags_opt_56_mixing = @fcflags_opt_56_mixing@ +fcflags_opt_56_recipspace = @fcflags_opt_56_recipspace@ +fcflags_opt_56_xc = @fcflags_opt_56_xc@ +fcflags_opt_57_iopsp_parser = @fcflags_opt_57_iopsp_parser@ +fcflags_opt_57_iovars = @fcflags_opt_57_iovars@ +fcflags_opt_61_occeig = @fcflags_opt_61_occeig@ +fcflags_opt_62_cg_noabirule = @fcflags_opt_62_cg_noabirule@ +fcflags_opt_62_ctqmc = @fcflags_opt_62_ctqmc@ +fcflags_opt_62_iowfdenpot = @fcflags_opt_62_iowfdenpot@ +fcflags_opt_62_poisson = @fcflags_opt_62_poisson@ +fcflags_opt_62_wvl_wfs = @fcflags_opt_62_wvl_wfs@ +fcflags_opt_64_psp = @fcflags_opt_64_psp@ +fcflags_opt_65_lotf_base = @fcflags_opt_65_lotf_base@ +fcflags_opt_65_paw = @fcflags_opt_65_paw@ +fcflags_opt_66_nonlocal = @fcflags_opt_66_nonlocal@ +fcflags_opt_66_vdwxc = @fcflags_opt_66_vdwxc@ +fcflags_opt_66_wfs = @fcflags_opt_66_wfs@ +fcflags_opt_67_common = @fcflags_opt_67_common@ +fcflags_opt_67_python_invocation_ext = @fcflags_opt_67_python_invocation_ext@ +fcflags_opt_67_triqs_ext = @fcflags_opt_67_triqs_ext@ +fcflags_opt_68_dmft = @fcflags_opt_68_dmft@ +fcflags_opt_68_lotf = @fcflags_opt_68_lotf@ +fcflags_opt_68_recursion = @fcflags_opt_68_recursion@ +fcflags_opt_68_rsprc = @fcflags_opt_68_rsprc@ +fcflags_opt_69_wfdesc = @fcflags_opt_69_wfdesc@ +fcflags_opt_70_gw = @fcflags_opt_70_gw@ +fcflags_opt_71_bse = @fcflags_opt_71_bse@ +fcflags_opt_71_wannier = @fcflags_opt_71_wannier@ +fcflags_opt_72_response = @fcflags_opt_72_response@ +fcflags_opt_77_ddb = @fcflags_opt_77_ddb@ +fcflags_opt_77_suscep = @fcflags_opt_77_suscep@ +fcflags_opt_78_effpot = @fcflags_opt_78_effpot@ +fcflags_opt_78_eph = @fcflags_opt_78_eph@ +fcflags_opt_79_seqpar_mpi = @fcflags_opt_79_seqpar_mpi@ +fcflags_opt_80_rttddft = @fcflags_opt_80_rttddft@ +fcflags_opt_80_tdep = @fcflags_opt_80_tdep@ +fcflags_opt_94_scfcv = @fcflags_opt_94_scfcv@ +fcflags_opt_95_drive = @fcflags_opt_95_drive@ +fcflags_opt_98_main = @fcflags_opt_98_main@ +fcflags_opt_bigdft = @fcflags_opt_bigdft@ +fcflags_opt_default = @fcflags_opt_default@ +fcflags_opt_hdf5 = @fcflags_opt_hdf5@ +fcflags_opt_levmar = @fcflags_opt_levmar@ +fcflags_opt_libpsml = @fcflags_opt_libpsml@ +fcflags_opt_libxc = @fcflags_opt_libxc@ +fcflags_opt_libxml2 = @fcflags_opt_libxml2@ +fcflags_opt_linalg = @fcflags_opt_linalg@ +fcflags_opt_netcdf = @fcflags_opt_netcdf@ +fcflags_opt_netcdf_fortran = @fcflags_opt_netcdf_fortran@ +fcflags_opt_papi = @fcflags_opt_papi@ +fcflags_opt_triqs = @fcflags_opt_triqs@ +fcflags_opt_wannier90 = @fcflags_opt_wannier90@ +fcflags_opt_xmlf90 = @fcflags_opt_xmlf90@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sd_abinit_common_cppflags = @sd_abinit_common_cppflags@ +sd_abinit_common_enable = @sd_abinit_common_enable@ +sd_abinit_common_enable_def = @sd_abinit_common_enable_def@ +sd_abinit_common_fcflags = @sd_abinit_common_fcflags@ +sd_abinit_common_init = @sd_abinit_common_init@ +sd_abinit_common_ldflags = @sd_abinit_common_ldflags@ +sd_abinit_common_libs = @sd_abinit_common_libs@ +sd_abinit_common_ok = @sd_abinit_common_ok@ +sd_abinit_common_options = @sd_abinit_common_options@ +sd_abinit_common_policy = @sd_abinit_common_policy@ +sd_abinit_common_status = @sd_abinit_common_status@ +sd_bigdft_cppflags = @sd_bigdft_cppflags@ +sd_bigdft_enable = @sd_bigdft_enable@ +sd_bigdft_enable_def = @sd_bigdft_enable_def@ +sd_bigdft_fcflags = @sd_bigdft_fcflags@ +sd_bigdft_init = @sd_bigdft_init@ +sd_bigdft_ldflags = @sd_bigdft_ldflags@ +sd_bigdft_libs = @sd_bigdft_libs@ +sd_bigdft_ok = @sd_bigdft_ok@ +sd_bigdft_options = @sd_bigdft_options@ +sd_bigdft_policy = @sd_bigdft_policy@ +sd_bigdft_status = @sd_bigdft_status@ +sd_fft_cflags = @sd_fft_cflags@ +sd_fft_choices = @sd_fft_choices@ +sd_fft_cppflags = @sd_fft_cppflags@ +sd_fft_cxxflags = @sd_fft_cxxflags@ +sd_fft_enable = @sd_fft_enable@ +sd_fft_fcflags = @sd_fft_fcflags@ +sd_fft_flavor = @sd_fft_flavor@ +sd_fft_init = @sd_fft_init@ +sd_fft_ldflags = @sd_fft_ldflags@ +sd_fft_libs = @sd_fft_libs@ +sd_fft_ok = @sd_fft_ok@ +sd_fftw3_cflags = @sd_fftw3_cflags@ +sd_fftw3_cppflags = @sd_fftw3_cppflags@ +sd_fftw3_enable = @sd_fftw3_enable@ +sd_fftw3_enable_def = @sd_fftw3_enable_def@ +sd_fftw3_fcflags = @sd_fftw3_fcflags@ +sd_fftw3_init = @sd_fftw3_init@ +sd_fftw3_ldflags = @sd_fftw3_ldflags@ +sd_fftw3_libs = @sd_fftw3_libs@ +sd_fftw3_ok = @sd_fftw3_ok@ +sd_fftw3_options = @sd_fftw3_options@ +sd_fftw3_policy = @sd_fftw3_policy@ +sd_fftw3_status = @sd_fftw3_status@ +sd_gpu_cflags = @sd_gpu_cflags@ +sd_gpu_cppflags = @sd_gpu_cppflags@ +sd_gpu_cxxflags = @sd_gpu_cxxflags@ +sd_gpu_enable = @sd_gpu_enable@ +sd_gpu_enable_def = @sd_gpu_enable_def@ +sd_gpu_fcflags = @sd_gpu_fcflags@ +sd_gpu_init = @sd_gpu_init@ +sd_gpu_ldflags = @sd_gpu_ldflags@ +sd_gpu_libs = @sd_gpu_libs@ +sd_gpu_ok = @sd_gpu_ok@ +sd_gpu_options = @sd_gpu_options@ +sd_gpu_policy = @sd_gpu_policy@ +sd_gpu_prefix = @sd_gpu_prefix@ +sd_gpu_status = @sd_gpu_status@ +sd_hdf5_cflags = @sd_hdf5_cflags@ +sd_hdf5_cppflags = @sd_hdf5_cppflags@ +sd_hdf5_cxxflags = @sd_hdf5_cxxflags@ +sd_hdf5_enable = @sd_hdf5_enable@ +sd_hdf5_enable_def = @sd_hdf5_enable_def@ +sd_hdf5_enable_fc = @sd_hdf5_enable_fc@ +sd_hdf5_fcflags = @sd_hdf5_fcflags@ +sd_hdf5_h5cc = @sd_hdf5_h5cc@ +sd_hdf5_h5fc = @sd_hdf5_h5fc@ +sd_hdf5_init = @sd_hdf5_init@ +sd_hdf5_ldflags = @sd_hdf5_ldflags@ +sd_hdf5_libs = @sd_hdf5_libs@ +sd_hdf5_ok = @sd_hdf5_ok@ +sd_hdf5_options = @sd_hdf5_options@ +sd_hdf5_policy = @sd_hdf5_policy@ +sd_hdf5_status = @sd_hdf5_status@ +sd_kokkos_cppflags = @sd_kokkos_cppflags@ +sd_kokkos_cxxflags = @sd_kokkos_cxxflags@ +sd_kokkos_enable = @sd_kokkos_enable@ +sd_kokkos_enable_def = @sd_kokkos_enable_def@ +sd_kokkos_init = @sd_kokkos_init@ +sd_kokkos_ldflags = @sd_kokkos_ldflags@ +sd_kokkos_libs = @sd_kokkos_libs@ +sd_kokkos_ok = @sd_kokkos_ok@ +sd_kokkos_options = @sd_kokkos_options@ +sd_kokkos_policy = @sd_kokkos_policy@ +sd_kokkos_status = @sd_kokkos_status@ +sd_levmar_cflags = @sd_levmar_cflags@ +sd_levmar_cppflags = @sd_levmar_cppflags@ +sd_levmar_enable = @sd_levmar_enable@ +sd_levmar_enable_def = @sd_levmar_enable_def@ +sd_levmar_init = @sd_levmar_init@ +sd_levmar_ldflags = @sd_levmar_ldflags@ +sd_levmar_libs = @sd_levmar_libs@ +sd_levmar_ok = @sd_levmar_ok@ +sd_levmar_options = @sd_levmar_options@ +sd_levmar_policy = @sd_levmar_policy@ +sd_levmar_status = @sd_levmar_status@ +sd_libpaw_cppflags = @sd_libpaw_cppflags@ +sd_libpaw_enable = @sd_libpaw_enable@ +sd_libpaw_enable_def = @sd_libpaw_enable_def@ +sd_libpaw_fcflags = @sd_libpaw_fcflags@ +sd_libpaw_init = @sd_libpaw_init@ +sd_libpaw_ldflags = @sd_libpaw_ldflags@ +sd_libpaw_libs = @sd_libpaw_libs@ +sd_libpaw_ok = @sd_libpaw_ok@ +sd_libpaw_options = @sd_libpaw_options@ +sd_libpaw_policy = @sd_libpaw_policy@ +sd_libpaw_status = @sd_libpaw_status@ +sd_libpsml_cppflags = @sd_libpsml_cppflags@ +sd_libpsml_enable = @sd_libpsml_enable@ +sd_libpsml_enable_def = @sd_libpsml_enable_def@ +sd_libpsml_fcflags = @sd_libpsml_fcflags@ +sd_libpsml_init = @sd_libpsml_init@ +sd_libpsml_ldflags = @sd_libpsml_ldflags@ +sd_libpsml_libs = @sd_libpsml_libs@ +sd_libpsml_ok = @sd_libpsml_ok@ +sd_libpsml_options = @sd_libpsml_options@ +sd_libpsml_policy = @sd_libpsml_policy@ +sd_libpsml_status = @sd_libpsml_status@ +sd_libxc_cflags = @sd_libxc_cflags@ +sd_libxc_cppflags = @sd_libxc_cppflags@ +sd_libxc_enable = @sd_libxc_enable@ +sd_libxc_enable_def = @sd_libxc_enable_def@ +sd_libxc_enable_fc = @sd_libxc_enable_fc@ +sd_libxc_fcflags = @sd_libxc_fcflags@ +sd_libxc_init = @sd_libxc_init@ +sd_libxc_ldflags = @sd_libxc_ldflags@ +sd_libxc_libs = @sd_libxc_libs@ +sd_libxc_ok = @sd_libxc_ok@ +sd_libxc_options = @sd_libxc_options@ +sd_libxc_policy = @sd_libxc_policy@ +sd_libxc_status = @sd_libxc_status@ +sd_linalg_cflags = @sd_linalg_cflags@ +sd_linalg_choices = @sd_linalg_choices@ +sd_linalg_cppflags = @sd_linalg_cppflags@ +sd_linalg_cxxflags = @sd_linalg_cxxflags@ +sd_linalg_enable = @sd_linalg_enable@ +sd_linalg_fcflags = @sd_linalg_fcflags@ +sd_linalg_flavor = @sd_linalg_flavor@ +sd_linalg_has_elpa = @sd_linalg_has_elpa@ +sd_linalg_has_scalapack = @sd_linalg_has_scalapack@ +sd_linalg_init = @sd_linalg_init@ +sd_linalg_ldflags = @sd_linalg_ldflags@ +sd_linalg_libs = @sd_linalg_libs@ +sd_linalg_ok = @sd_linalg_ok@ +sd_mpi_cc = @sd_mpi_cc@ +sd_mpi_cflags = @sd_mpi_cflags@ +sd_mpi_cppflags = @sd_mpi_cppflags@ +sd_mpi_cxx = @sd_mpi_cxx@ +sd_mpi_enable = @sd_mpi_enable@ +sd_mpi_enable_cxx = @sd_mpi_enable_cxx@ +sd_mpi_enable_def = @sd_mpi_enable_def@ +sd_mpi_enable_fc = @sd_mpi_enable_fc@ +sd_mpi_fc = @sd_mpi_fc@ +sd_mpi_fcflags = @sd_mpi_fcflags@ +sd_mpi_init = @sd_mpi_init@ +sd_mpi_ldflags = @sd_mpi_ldflags@ +sd_mpi_libs = @sd_mpi_libs@ +sd_mpi_ok = @sd_mpi_ok@ +sd_mpi_options = @sd_mpi_options@ +sd_mpi_policy = @sd_mpi_policy@ +sd_mpi_status = @sd_mpi_status@ +sd_netcdf_cflags = @sd_netcdf_cflags@ +sd_netcdf_cppflags = @sd_netcdf_cppflags@ +sd_netcdf_enable = @sd_netcdf_enable@ +sd_netcdf_enable_def = @sd_netcdf_enable_def@ +sd_netcdf_fcflags = @sd_netcdf_fcflags@ +sd_netcdf_fortran_cflags = @sd_netcdf_fortran_cflags@ +sd_netcdf_fortran_cppflags = @sd_netcdf_fortran_cppflags@ +sd_netcdf_fortran_enable = @sd_netcdf_fortran_enable@ +sd_netcdf_fortran_enable_def = @sd_netcdf_fortran_enable_def@ +sd_netcdf_fortran_fcflags = @sd_netcdf_fortran_fcflags@ +sd_netcdf_fortran_init = @sd_netcdf_fortran_init@ +sd_netcdf_fortran_ldflags = @sd_netcdf_fortran_ldflags@ +sd_netcdf_fortran_libs = @sd_netcdf_fortran_libs@ +sd_netcdf_fortran_ok = @sd_netcdf_fortran_ok@ +sd_netcdf_fortran_options = @sd_netcdf_fortran_options@ +sd_netcdf_fortran_policy = @sd_netcdf_fortran_policy@ +sd_netcdf_fortran_status = @sd_netcdf_fortran_status@ +sd_netcdf_init = @sd_netcdf_init@ +sd_netcdf_ldflags = @sd_netcdf_ldflags@ +sd_netcdf_libs = @sd_netcdf_libs@ +sd_netcdf_ok = @sd_netcdf_ok@ +sd_netcdf_options = @sd_netcdf_options@ +sd_netcdf_policy = @sd_netcdf_policy@ +sd_netcdf_status = @sd_netcdf_status@ +sd_papi_cflags = @sd_papi_cflags@ +sd_papi_cppflags = @sd_papi_cppflags@ +sd_papi_enable = @sd_papi_enable@ +sd_papi_enable_def = @sd_papi_enable_def@ +sd_papi_init = @sd_papi_init@ +sd_papi_ldflags = @sd_papi_ldflags@ +sd_papi_libs = @sd_papi_libs@ +sd_papi_ok = @sd_papi_ok@ +sd_papi_options = @sd_papi_options@ +sd_papi_policy = @sd_papi_policy@ +sd_papi_sd_papi_fcflags = @sd_papi_sd_papi_fcflags@ +sd_papi_status = @sd_papi_status@ +sd_pfft_cflags = @sd_pfft_cflags@ +sd_pfft_cppflags = @sd_pfft_cppflags@ +sd_pfft_enable = @sd_pfft_enable@ +sd_pfft_enable_def = @sd_pfft_enable_def@ +sd_pfft_init = @sd_pfft_init@ +sd_pfft_ldflags = @sd_pfft_ldflags@ +sd_pfft_libs = @sd_pfft_libs@ +sd_pfft_ok = @sd_pfft_ok@ +sd_pfft_options = @sd_pfft_options@ +sd_pfft_policy = @sd_pfft_policy@ +sd_pfft_status = @sd_pfft_status@ +sd_sys_fcflags = @sd_sys_fcflags@ +sd_triqs_cflags = @sd_triqs_cflags@ +sd_triqs_cppflags = @sd_triqs_cppflags@ +sd_triqs_cxxflags = @sd_triqs_cxxflags@ +sd_triqs_enable = @sd_triqs_enable@ +sd_triqs_enable_def = @sd_triqs_enable_def@ +sd_triqs_fcflags = @sd_triqs_fcflags@ +sd_triqs_init = @sd_triqs_init@ +sd_triqs_ldflags = @sd_triqs_ldflags@ +sd_triqs_libs = @sd_triqs_libs@ +sd_triqs_ok = @sd_triqs_ok@ +sd_triqs_options = @sd_triqs_options@ +sd_triqs_policy = @sd_triqs_policy@ +sd_triqs_status = @sd_triqs_status@ +sd_wannier90_cppflags = @sd_wannier90_cppflags@ +sd_wannier90_enable = @sd_wannier90_enable@ +sd_wannier90_enable_def = @sd_wannier90_enable_def@ +sd_wannier90_fcflags = @sd_wannier90_fcflags@ +sd_wannier90_init = @sd_wannier90_init@ +sd_wannier90_ldflags = @sd_wannier90_ldflags@ +sd_wannier90_libs = @sd_wannier90_libs@ +sd_wannier90_ok = @sd_wannier90_ok@ +sd_wannier90_options = @sd_wannier90_options@ +sd_wannier90_policy = @sd_wannier90_policy@ +sd_wannier90_status = @sd_wannier90_status@ +sd_xmlf90_cppflags = @sd_xmlf90_cppflags@ +sd_xmlf90_enable = @sd_xmlf90_enable@ +sd_xmlf90_enable_def = @sd_xmlf90_enable_def@ +sd_xmlf90_fcflags = @sd_xmlf90_fcflags@ +sd_xmlf90_init = @sd_xmlf90_init@ +sd_xmlf90_ldflags = @sd_xmlf90_ldflags@ +sd_xmlf90_libs = @sd_xmlf90_libs@ +sd_xmlf90_ok = @sd_xmlf90_ok@ +sd_xmlf90_options = @sd_xmlf90_options@ +sd_xmlf90_policy = @sd_xmlf90_policy@ +sd_xmlf90_status = @sd_xmlf90_status@ +sd_yakl_cppflags = @sd_yakl_cppflags@ +sd_yakl_enable = @sd_yakl_enable@ +sd_yakl_enable_def = @sd_yakl_enable_def@ +sd_yakl_fcflags = @sd_yakl_fcflags@ +sd_yakl_init = @sd_yakl_init@ +sd_yakl_ldflags = @sd_yakl_ldflags@ +sd_yakl_libs = @sd_yakl_libs@ +sd_yakl_ok = @sd_yakl_ok@ +sd_yakl_options = @sd_yakl_options@ +sd_yakl_policy = @sd_yakl_policy@ +sd_yakl_status = @sd_yakl_status@ +sharedstatedir = @sharedstatedir@ +src_02_clib_fcflags = @src_02_clib_fcflags@ +src_10_defs_fcflags = @src_10_defs_fcflags@ +src_11_memory_mpi_fcflags = @src_11_memory_mpi_fcflags@ +src_12_hide_mpi_fcflags = @src_12_hide_mpi_fcflags@ +src_14_hidewrite_fcflags = @src_14_hidewrite_fcflags@ +src_16_hideleave_fcflags = @src_16_hideleave_fcflags@ +src_16_kokkos_toolbox_fcflags = @src_16_kokkos_toolbox_fcflags@ +src_17_gpu_toolbox_fcflags = @src_17_gpu_toolbox_fcflags@ +src_17_libtetra_ext_fcflags = @src_17_libtetra_ext_fcflags@ +src_17_minimax_fcflags = @src_17_minimax_fcflags@ +src_17_yaml_out_fcflags = @src_17_yaml_out_fcflags@ +src_18_timing_fcflags = @src_18_timing_fcflags@ +src_21_hashfuncs_fcflags = @src_21_hashfuncs_fcflags@ +src_27_toolbox_oop_fcflags = @src_27_toolbox_oop_fcflags@ +src_28_numeric_noabirule_fcflags = @src_28_numeric_noabirule_fcflags@ +src_29_kpoints_fcflags = @src_29_kpoints_fcflags@ +src_32_util_fcflags = @src_32_util_fcflags@ +src_33_xc_lowlevel_fcflags = @src_33_xc_lowlevel_fcflags@ +src_39_libpaw_fcflags = @src_39_libpaw_fcflags@ +src_41_geometry_fcflags = @src_41_geometry_fcflags@ +src_42_nlstrain_fcflags = @src_42_nlstrain_fcflags@ +src_42_parser_fcflags = @src_42_parser_fcflags@ +src_43_ptgroups_fcflags = @src_43_ptgroups_fcflags@ +src_43_wvl_wrappers_fcflags = @src_43_wvl_wrappers_fcflags@ +src_44_abitools_fcflags = @src_44_abitools_fcflags@ +src_44_abitypes_defs_fcflags = @src_44_abitypes_defs_fcflags@ +src_44_manage_kokkos_fcflags = @src_44_manage_kokkos_fcflags@ +src_45_geomoptim_fcflags = @src_45_geomoptim_fcflags@ +src_45_xgTools_fcflags = @src_45_xgTools_fcflags@ +src_46_ghc_omp_fcflags = @src_46_ghc_omp_fcflags@ +src_46_manage_cuda_fcflags = @src_46_manage_cuda_fcflags@ +src_48_diago_fcflags = @src_48_diago_fcflags@ +src_49_gw_toolbox_oop_fcflags = @src_49_gw_toolbox_oop_fcflags@ +src_51_manage_mpi_fcflags = @src_51_manage_mpi_fcflags@ +src_52_fft_mpi_noabirule_fcflags = @src_52_fft_mpi_noabirule_fcflags@ +src_53_ffts_fcflags = @src_53_ffts_fcflags@ +src_54_spacepar_fcflags = @src_54_spacepar_fcflags@ +src_55_abiutil_fcflags = @src_55_abiutil_fcflags@ +src_56_io_mpi_fcflags = @src_56_io_mpi_fcflags@ +src_56_mixing_fcflags = @src_56_mixing_fcflags@ +src_56_recipspace_fcflags = @src_56_recipspace_fcflags@ +src_56_xc_fcflags = @src_56_xc_fcflags@ +src_57_iopsp_parser_fcflags = @src_57_iopsp_parser_fcflags@ +src_57_iovars_fcflags = @src_57_iovars_fcflags@ +src_61_occeig_fcflags = @src_61_occeig_fcflags@ +src_62_cg_noabirule_fcflags = @src_62_cg_noabirule_fcflags@ +src_62_ctqmc_fcflags = @src_62_ctqmc_fcflags@ +src_62_iowfdenpot_fcflags = @src_62_iowfdenpot_fcflags@ +src_62_poisson_fcflags = @src_62_poisson_fcflags@ +src_62_wvl_wfs_fcflags = @src_62_wvl_wfs_fcflags@ +src_64_psp_fcflags = @src_64_psp_fcflags@ +src_65_lotf_base_fcflags = @src_65_lotf_base_fcflags@ +src_65_paw_fcflags = @src_65_paw_fcflags@ +src_66_nonlocal_fcflags = @src_66_nonlocal_fcflags@ +src_66_vdwxc_fcflags = @src_66_vdwxc_fcflags@ +src_66_wfs_fcflags = @src_66_wfs_fcflags@ +src_67_common_fcflags = @src_67_common_fcflags@ +src_67_python_invocation_ext_fcflags = @src_67_python_invocation_ext_fcflags@ +src_67_triqs_ext_fcflags = @src_67_triqs_ext_fcflags@ +src_68_dmft_fcflags = @src_68_dmft_fcflags@ +src_68_lotf_fcflags = @src_68_lotf_fcflags@ +src_68_recursion_fcflags = @src_68_recursion_fcflags@ +src_68_rsprc_fcflags = @src_68_rsprc_fcflags@ +src_69_wfdesc_fcflags = @src_69_wfdesc_fcflags@ +src_70_gw_fcflags = @src_70_gw_fcflags@ +src_71_bse_fcflags = @src_71_bse_fcflags@ +src_71_wannier_fcflags = @src_71_wannier_fcflags@ +src_72_response_fcflags = @src_72_response_fcflags@ +src_77_ddb_fcflags = @src_77_ddb_fcflags@ +src_77_suscep_fcflags = @src_77_suscep_fcflags@ +src_78_effpot_fcflags = @src_78_effpot_fcflags@ +src_78_eph_fcflags = @src_78_eph_fcflags@ +src_79_seqpar_mpi_fcflags = @src_79_seqpar_mpi_fcflags@ +src_80_rttddft_fcflags = @src_80_rttddft_fcflags@ +src_80_tdep_fcflags = @src_80_tdep_fcflags@ +src_94_scfcv_fcflags = @src_94_scfcv_fcflags@ +src_95_drive_fcflags = @src_95_drive_fcflags@ +src_common_fcflags = @src_common_fcflags@ +src_core_fcflags = @src_core_fcflags@ +src_libpaw_fcflags = @src_libpaw_fcflags@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +with_abinit_common = @with_abinit_common@ +with_bigdft = @with_bigdft@ +with_config_file = @with_config_file@ +with_debug_flavor = @with_debug_flavor@ +with_fallbacks = @with_fallbacks@ +with_fc_vendor = @with_fc_vendor@ +with_fc_version = @with_fc_version@ +with_fft_flavor = @with_fft_flavor@ +with_fftw3 = @with_fftw3@ +with_gnu_ld = @with_gnu_ld@ +with_gpu = @with_gpu@ +with_hdf5 = @with_hdf5@ +with_kokkos = @with_kokkos@ +with_levmar = @with_levmar@ +with_libpaw = @with_libpaw@ +with_libpsml = @with_libpsml@ +with_libxc = @with_libxc@ +with_libxml2 = @with_libxml2@ +with_linalg_flavor = @with_linalg_flavor@ +with_mpi = @with_mpi@ +with_mpi_level = @with_mpi_level@ +with_netcdf = @with_netcdf@ +with_optim_flavor = @with_optim_flavor@ +with_papi = @with_papi@ +with_pfft = @with_pfft@ +with_triqs = @with_triqs@ +with_wannier90 = @with_wannier90@ +with_xmlf90 = @with_xmlf90@ +with_yakl = @with_yakl@ +AM_CFLAGS = @ABI_CPPFLAGS@ +AM_CXXFLAGS = $(sd_triqs_cxxflags) +AM_FCFLAGS = @FPPFLAGS@ @FCFLAGS_FREEFORM@ @FCFLAGS_MODDIR@ @sd_sys_fcflags@ @fcflags_opt_17_gpu_toolbox@ +AM_CPPFLAGS = \ + @src_10_defs_fcflags@ \ + @src_12_hide_mpi_fcflags@ \ + @src_14_hidewrite_fcflags@ \ + @src_16_kokkos_toolbox_fcflags@ \ + @src_17_gpu_toolbox_fcflags@ \ + @src_common_fcflags@ \ + @src_core_fcflags@ \ + @src_libpaw_fcflags@ \ + @sd_gpu_cppflags@ \ + @sd_gpu_fcflags@ \ + @sd_linalg_cppflags@ \ + @sd_linalg_fcflags@ \ + @fc_mod_fcflags@ + + +# Regular source files +lib17_gpu_toolbox_srcs = \ + dev_spec.cpp \ + gpu_fft.cpp \ + gpu_linalg.cpp \ + m_gpu_detect.F90 \ + m_gpu_toolbox.F90 \ + m_initcuda.F90 \ + m_nvtx.F90 \ + timing.cpp + + +# Source files depending on conditionals + +# Library description +noinst_LIBRARIES = lib17_gpu_toolbox.a +lib17_gpu_toolbox_a_SOURCES = $(lib17_gpu_toolbox_srcs) + +# Dependencies (inside the directory) of directory 17_gpu_toolbox +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. +CLEANFILES = m_gpu_detect_cpp.f90 m_gpu_toolbox_cpp.f90 \ + m_initcuda_cpp.f90 m_nvtx_cpp.f90 m_gpu_detect.$(MODEXT) \ + m_gpu_toolbox.$(MODEXT) m_initcuda.$(MODEXT) m_nvtx.$(MODEXT) +EXTRA_DIST = abinit.src abinit.dep abinit.amf $(h_list) $(cpp_list) \ + _17_gpu_toolbox_ +h_list = \ + abi_gpu_header_common.h \ + cuda_api_error_check.h \ + hip_api_error_check.h \ + gpu_fft.h \ + gpu_linalg.h + +cpp_list = \ + dev_spec_cuda.cpp \ + dev_spec_hip.cpp \ + gpu_fft_cuda.cpp \ + gpu_fft_hip.cpp \ + gpu_linalg_cuda.cpp \ + gpu_linalg_hip.cpp \ + timing_cuda.cpp \ + timing_hip.cpp + + +# make sure lib12_hide_mpi is recompiled if any file from finc_list is modified +lib17_gpu_toolbox_a_DEPENDENCIES = $(h_list) $(cpp_list) +all: all-am + +.SUFFIXES: +.SUFFIXES: .F90 .cpp .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu shared/common/src/17_gpu_toolbox/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu shared/common/src/17_gpu_toolbox/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) + +lib17_gpu_toolbox.a: $(lib17_gpu_toolbox_a_OBJECTS) $(lib17_gpu_toolbox_a_DEPENDENCIES) $(EXTRA_lib17_gpu_toolbox_a_DEPENDENCIES) + $(AM_V_at)-rm -f lib17_gpu_toolbox.a + $(AM_V_AR)$(lib17_gpu_toolbox_a_AR) lib17_gpu_toolbox.a $(lib17_gpu_toolbox_a_OBJECTS) $(lib17_gpu_toolbox_a_LIBADD) + $(AM_V_at)$(RANLIB) lib17_gpu_toolbox.a + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dev_spec.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gpu_fft.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gpu_linalg.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timing.Po@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) + +.F90.o: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ $< + +.F90.obj: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.o: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -f ./$(DEPDIR)/dev_spec.Po + -rm -f ./$(DEPDIR)/gpu_fft.Po + -rm -f ./$(DEPDIR)/gpu_linalg.Po + -rm -f ./$(DEPDIR)/timing.Po + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f ./$(DEPDIR)/dev_spec.Po + -rm -f ./$(DEPDIR)/gpu_fft.Po + -rm -f ./$(DEPDIR)/gpu_linalg.Po + -rm -f ./$(DEPDIR)/timing.Po + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ + clean-generic clean-noinstLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am + +.PRECIOUS: Makefile + + +m_gpu_detect.$(OBJEXT): m_initcuda.$(OBJEXT) + +m_gpu_toolbox.$(OBJEXT): m_gpu_detect.$(OBJEXT) m_initcuda.$(OBJEXT) + +dev_spec.$(OBJEXT): dev_spec.cpp +gpu_fft.$(OBJEXT): gpu_fft.cpp +gpu_linalg.$(OBJEXT): gpu_linalg.cpp +timing.$(OBJEXT): timing.cpp + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/GX-PAW/common/src/17_gpu_toolbox/_17_gpu_toolbox_ b/GX-PAW/common/src/17_gpu_toolbox/_17_gpu_toolbox_ new file mode 100644 index 00000000..8103f90b --- /dev/null +++ b/GX-PAW/common/src/17_gpu_toolbox/_17_gpu_toolbox_ @@ -0,0 +1,21 @@ +!!****d* ABINIT/17_gpu_toolbox +!! NAME +!! 17_gpu_toolbox +!! +!! DESCRIPTION +!! FIXME: Description is missing +!! +!! COPYRIGHT +!! Copyright (C) 1998-2024 ABINIT group +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! For the initials of contributors, see ~abinit/doc/developers/contributors.txt . +!! +!! CHILDREN +!! m_gpu_toolbox.F90 +!! m_gpu_detect.F90 +!! m_initcuda.F90 +!! m_nvtx.F90 +!! +!!*** diff --git a/GX-PAW/common/src/17_gpu_toolbox/__pycache__/abinit.cpython-36.pyc b/GX-PAW/common/src/17_gpu_toolbox/__pycache__/abinit.cpython-36.pyc new file mode 100644 index 00000000..a61b72b2 Binary files /dev/null and b/GX-PAW/common/src/17_gpu_toolbox/__pycache__/abinit.cpython-36.pyc differ diff --git a/GX-PAW/common/src/17_gpu_toolbox/abi_gpu_header_common.h b/GX-PAW/common/src/17_gpu_toolbox/abi_gpu_header_common.h new file mode 100644 index 00000000..54a7fe1b --- /dev/null +++ b/GX-PAW/common/src/17_gpu_toolbox/abi_gpu_header_common.h @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2008-2024 ABINIT Group + * + * This file is part of the ABINIT software package. For license information, + * please see the COPYING file in the top-level directory of the ABINIT source + * distribution. + * + */ + +#ifndef ABI_GPU_HEADER_COMMON_H +#define ABI_GPU_HEADER_COMMON_H + +//Interfaces +#ifdef __cplusplus +extern "C" { +#endif + + void abi_cabort(); + void check_gpu_mem_(const char* str); + +#ifdef __cplusplus +} +#endif + +#endif /* ABI_GPU_HEADER_COMMON_H */ diff --git a/GX-PAW/common/src/17_gpu_toolbox/abinit.amf b/GX-PAW/common/src/17_gpu_toolbox/abinit.amf new file mode 100644 index 00000000..3575b6ef --- /dev/null +++ b/GX-PAW/common/src/17_gpu_toolbox/abinit.amf @@ -0,0 +1,26 @@ +h_list = \ + abi_gpu_header_common.h \ + cuda_api_error_check.h \ + hip_api_error_check.h \ + gpu_fft.h \ + gpu_linalg.h + +cpp_list = \ + dev_spec_cuda.cpp \ + dev_spec_hip.cpp \ + gpu_fft_cuda.cpp \ + gpu_fft_hip.cpp \ + gpu_linalg_cuda.cpp \ + gpu_linalg_hip.cpp \ + timing_cuda.cpp \ + timing_hip.cpp + +EXTRA_DIST += $(h_list) $(cpp_list) + +dev_spec.$(OBJEXT): dev_spec.cpp +gpu_fft.$(OBJEXT): gpu_fft.cpp +gpu_linalg.$(OBJEXT): gpu_linalg.cpp +timing.$(OBJEXT): timing.cpp + +# make sure lib12_hide_mpi is recompiled if any file from finc_list is modified +lib17_gpu_toolbox_a_DEPENDENCIES = $(h_list) $(cpp_list) diff --git a/GX-PAW/common/src/17_gpu_toolbox/abinit.dep b/GX-PAW/common/src/17_gpu_toolbox/abinit.dep new file mode 100644 index 00000000..29f9fe72 --- /dev/null +++ b/GX-PAW/common/src/17_gpu_toolbox/abinit.dep @@ -0,0 +1,15 @@ +# Dependencies (inside the directory) of directory 17_gpu_toolbox +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. + +CLEANFILES += \ + m_gpu_detect.$(MODEXT) \ + m_gpu_toolbox.$(MODEXT) \ + m_initcuda.$(MODEXT) \ + m_nvtx.$(MODEXT) + +m_gpu_detect.$(OBJEXT): m_initcuda.$(OBJEXT) + +m_gpu_toolbox.$(OBJEXT): m_gpu_detect.$(OBJEXT) m_initcuda.$(OBJEXT) \ No newline at end of file diff --git a/GX-PAW/common/src/17_gpu_toolbox/abinit.dir b/GX-PAW/common/src/17_gpu_toolbox/abinit.dir new file mode 100644 index 00000000..3990cdc0 --- /dev/null +++ b/GX-PAW/common/src/17_gpu_toolbox/abinit.dir @@ -0,0 +1,12 @@ +# Dependencies (outside the directory) of directory 17_gpu_toolbox +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. + +include_dirs = \ +['10_defs', + '12_hide_mpi', + '14_hidewrite', + '16_kokkos_toolbox', + '17_gpu_toolbox'] \ No newline at end of file diff --git a/GX-PAW/common/src/17_gpu_toolbox/abinit.src b/GX-PAW/common/src/17_gpu_toolbox/abinit.src new file mode 100644 index 00000000..c41381d5 --- /dev/null +++ b/GX-PAW/common/src/17_gpu_toolbox/abinit.src @@ -0,0 +1,34 @@ +# -*- Python -*- +# +# Copyright (C) 2005-2024 ABINIT Group (Yann Pouillon) +# +# This file is part of the ABINIT software package. For license information, +# please see the COPYING file in the top-level directory of the ABINIT source +# distribution. +# + +# +# Source files making up the 67_recursion library +# + +# Source file attributes +ABI_SRC_NIL = 0 # No attribute +ABI_SRC_BLT = 1 # The file is built by a script +ABI_SRC_DEP = 2 # The file depends on other files + +# Source files +sources = [ + "dev_spec.cpp", + "gpu_fft.cpp", + "gpu_linalg.cpp", + "m_gpu_detect.F90", + "m_gpu_toolbox.F90", + "m_initcuda.F90", + "m_nvtx.F90", + "timing.cpp" +] + + + +# IMPORTANT : please use the alphabetic order in the previous list. Do NOT add the new routine names at the end of the list. +# This is important to avoid numerous conflicts at merge time. Thank you very much. Xavier. diff --git a/GX-PAW/common/src/17_gpu_toolbox/cuda_api_error_check.h b/GX-PAW/common/src/17_gpu_toolbox/cuda_api_error_check.h new file mode 100644 index 00000000..756b6899 --- /dev/null +++ b/GX-PAW/common/src/17_gpu_toolbox/cuda_api_error_check.h @@ -0,0 +1,557 @@ +/** + * CUDA API error checking utilities. + * + * This header is slightly adapted from cuda samples + * https://github.com/Nvidia/cuda-samples + * + * Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NVIDIA CORPORATION nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#ifndef CUDA_API_ERROR_CHECK_H_ +#define CUDA_API_ERROR_CHECK_H_ + +#pragma once + +#include +#include +#include +#include // for fflush +#include + +#ifndef assertm +#define assertm(exp, msg) assert(((void)msg, exp)) +#endif + +#ifdef __cplusplus +extern "C" { +#endif + + // this is defined in shared/common/src/16_hideleave/m_errors.F90 + void abi_cabort(); + +#ifdef __cplusplus +} +#endif + +#ifndef CUDA_UNUSED +#define CUDA_UNUSED(x) ((void)(x)) +#endif + +// when this header is used inside abinit, call abi_cabort when an error happens +// otherwise, do a regular exit +// we assume here that if config.h (from abinit is included first, then ABINIT_VERSION will be defined) +#ifdef ABINIT_VERSION +#define ABORT() abi_cabort() +#else +#define ABORT() { \ + exit(EXIT_FAILURE); \ + } +#endif + + +/* + * If symbol ALWAYS_SYNC_GPU is defined in your build system + * then we will always call cudaDeviceSynchronize, before checking + * last error from a cuda kernel call. + * + * It may help in case of debugging to define ALWAYS_SYNC_GPU, but for a + * regular run, it should remains to 0. + * + * Note: you can also enforce syncing CPU/GPU by set environment variable CUDA_LAUNCH_BLOCKING to 1 + * + * See also: https://www.olcf.ornl.gov/wp-content/uploads/2021/06/cuda_training_series_cuda_debugging.pdf + */ +#ifdef ALWAYS_SYNC_GPU +#define FORCE_SYNC_GPU 1 +#else +#define FORCE_SYNC_GPU 0 +#endif + + +// CUDA Runtime error messages +#ifdef __DRIVER_TYPES_H__ +static const char *_cudaGetErrorEnum(cudaError_t error) { + return cudaGetErrorName(error); +} +#endif + +#ifdef CUDA_DRIVER_API +// CUDA Driver API errors +static const char *_cudaGetErrorEnum(CUresult error) { + static char unknown[] = ""; + const char *ret = NULL; + cuGetErrorName(error, &ret); + return ret ? ret : unknown; +} +#endif + +#ifdef CUBLAS_API_H_ +// cuBLAS API errors +static const char *_cudaGetErrorEnum(cublasStatus_t error) { + switch (error) { + case CUBLAS_STATUS_SUCCESS: + return "CUBLAS_STATUS_SUCCESS"; + + case CUBLAS_STATUS_NOT_INITIALIZED: + return "CUBLAS_STATUS_NOT_INITIALIZED"; + + case CUBLAS_STATUS_ALLOC_FAILED: + return "CUBLAS_STATUS_ALLOC_FAILED"; + + case CUBLAS_STATUS_INVALID_VALUE: + return "CUBLAS_STATUS_INVALID_VALUE"; + + case CUBLAS_STATUS_ARCH_MISMATCH: + return "CUBLAS_STATUS_ARCH_MISMATCH"; + + case CUBLAS_STATUS_MAPPING_ERROR: + return "CUBLAS_STATUS_MAPPING_ERROR"; + + case CUBLAS_STATUS_EXECUTION_FAILED: + return "CUBLAS_STATUS_EXECUTION_FAILED"; + + case CUBLAS_STATUS_INTERNAL_ERROR: + return "CUBLAS_STATUS_INTERNAL_ERROR"; + + case CUBLAS_STATUS_NOT_SUPPORTED: + return "CUBLAS_STATUS_NOT_SUPPORTED"; + + case CUBLAS_STATUS_LICENSE_ERROR: + return "CUBLAS_STATUS_LICENSE_ERROR"; + } + + return ""; +} +#endif + +#ifdef _CUFFT_H_ +// cuFFT API errors +static const char *_cudaGetErrorEnum(cufftResult error) { + switch (error) { + case CUFFT_SUCCESS: + return "CUFFT_SUCCESS"; + + case CUFFT_INVALID_PLAN: + return "CUFFT_INVALID_PLAN"; + + case CUFFT_ALLOC_FAILED: + return "CUFFT_ALLOC_FAILED"; + + case CUFFT_INVALID_TYPE: + return "CUFFT_INVALID_TYPE"; + + case CUFFT_INVALID_VALUE: + return "CUFFT_INVALID_VALUE"; + + case CUFFT_INTERNAL_ERROR: + return "CUFFT_INTERNAL_ERROR"; + + case CUFFT_EXEC_FAILED: + return "CUFFT_EXEC_FAILED"; + + case CUFFT_SETUP_FAILED: + return "CUFFT_SETUP_FAILED"; + + case CUFFT_INVALID_SIZE: + return "CUFFT_INVALID_SIZE"; + + case CUFFT_UNALIGNED_DATA: + return "CUFFT_UNALIGNED_DATA"; + + case CUFFT_INCOMPLETE_PARAMETER_LIST: + return "CUFFT_INCOMPLETE_PARAMETER_LIST"; + + case CUFFT_INVALID_DEVICE: + return "CUFFT_INVALID_DEVICE"; + + case CUFFT_PARSE_ERROR: + return "CUFFT_PARSE_ERROR"; + + case CUFFT_NO_WORKSPACE: + return "CUFFT_NO_WORKSPACE"; + + case CUFFT_NOT_IMPLEMENTED: + return "CUFFT_NOT_IMPLEMENTED"; + + case CUFFT_LICENSE_ERROR: + return "CUFFT_LICENSE_ERROR"; + + case CUFFT_NOT_SUPPORTED: + return "CUFFT_NOT_SUPPORTED"; + } + + return ""; +} +#endif + +#ifdef CUSPARSEAPI +// cuSPARSE API errors +static const char *_cudaGetErrorEnum(cusparseStatus_t error) { + switch (error) { + case CUSPARSE_STATUS_SUCCESS: + return "CUSPARSE_STATUS_SUCCESS"; + + case CUSPARSE_STATUS_NOT_INITIALIZED: + return "CUSPARSE_STATUS_NOT_INITIALIZED"; + + case CUSPARSE_STATUS_ALLOC_FAILED: + return "CUSPARSE_STATUS_ALLOC_FAILED"; + + case CUSPARSE_STATUS_INVALID_VALUE: + return "CUSPARSE_STATUS_INVALID_VALUE"; + + case CUSPARSE_STATUS_ARCH_MISMATCH: + return "CUSPARSE_STATUS_ARCH_MISMATCH"; + + case CUSPARSE_STATUS_MAPPING_ERROR: + return "CUSPARSE_STATUS_MAPPING_ERROR"; + + case CUSPARSE_STATUS_EXECUTION_FAILED: + return "CUSPARSE_STATUS_EXECUTION_FAILED"; + + case CUSPARSE_STATUS_INTERNAL_ERROR: + return "CUSPARSE_STATUS_INTERNAL_ERROR"; + + case CUSPARSE_STATUS_MATRIX_TYPE_NOT_SUPPORTED: + return "CUSPARSE_STATUS_MATRIX_TYPE_NOT_SUPPORTED"; + } + + return ""; +} +#endif + +#ifdef CUSOLVER_COMMON_H_ +// cuSOLVER API errors +static const char *_cudaGetErrorEnum(cusolverStatus_t error) { + switch (error) { + case CUSOLVER_STATUS_SUCCESS: + return "CUSOLVER_STATUS_SUCCESS"; + case CUSOLVER_STATUS_NOT_INITIALIZED: + return "CUSOLVER_STATUS_NOT_INITIALIZED"; + case CUSOLVER_STATUS_ALLOC_FAILED: + return "CUSOLVER_STATUS_ALLOC_FAILED"; + case CUSOLVER_STATUS_INVALID_VALUE: + return "CUSOLVER_STATUS_INVALID_VALUE"; + case CUSOLVER_STATUS_ARCH_MISMATCH: + return "CUSOLVER_STATUS_ARCH_MISMATCH"; + case CUSOLVER_STATUS_MAPPING_ERROR: + return "CUSOLVER_STATUS_MAPPING_ERROR"; + case CUSOLVER_STATUS_EXECUTION_FAILED: + return "CUSOLVER_STATUS_EXECUTION_FAILED"; + case CUSOLVER_STATUS_INTERNAL_ERROR: + return "CUSOLVER_STATUS_INTERNAL_ERROR"; + case CUSOLVER_STATUS_MATRIX_TYPE_NOT_SUPPORTED: + return "CUSOLVER_STATUS_MATRIX_TYPE_NOT_SUPPORTED"; + case CUSOLVER_STATUS_NOT_SUPPORTED: + return "CUSOLVER_STATUS_NOT_SUPPORTED "; + case CUSOLVER_STATUS_ZERO_PIVOT: + return "CUSOLVER_STATUS_ZERO_PIVOT"; + case CUSOLVER_STATUS_INVALID_LICENSE: + return "CUSOLVER_STATUS_INVALID_LICENSE"; + } + + return ""; +} +#endif + +#ifdef CURAND_H_ +// cuRAND API errors +static const char *_cudaGetErrorEnum(curandStatus_t error) { + switch (error) { + case CURAND_STATUS_SUCCESS: + return "CURAND_STATUS_SUCCESS"; + + case CURAND_STATUS_VERSION_MISMATCH: + return "CURAND_STATUS_VERSION_MISMATCH"; + + case CURAND_STATUS_NOT_INITIALIZED: + return "CURAND_STATUS_NOT_INITIALIZED"; + + case CURAND_STATUS_ALLOCATION_FAILED: + return "CURAND_STATUS_ALLOCATION_FAILED"; + + case CURAND_STATUS_TYPE_ERROR: + return "CURAND_STATUS_TYPE_ERROR"; + + case CURAND_STATUS_OUT_OF_RANGE: + return "CURAND_STATUS_OUT_OF_RANGE"; + + case CURAND_STATUS_LENGTH_NOT_MULTIPLE: + return "CURAND_STATUS_LENGTH_NOT_MULTIPLE"; + + case CURAND_STATUS_DOUBLE_PRECISION_REQUIRED: + return "CURAND_STATUS_DOUBLE_PRECISION_REQUIRED"; + + case CURAND_STATUS_LAUNCH_FAILURE: + return "CURAND_STATUS_LAUNCH_FAILURE"; + + case CURAND_STATUS_PREEXISTING_FAILURE: + return "CURAND_STATUS_PREEXISTING_FAILURE"; + + case CURAND_STATUS_INITIALIZATION_FAILED: + return "CURAND_STATUS_INITIALIZATION_FAILED"; + + case CURAND_STATUS_ARCH_MISMATCH: + return "CURAND_STATUS_ARCH_MISMATCH"; + + case CURAND_STATUS_INTERNAL_ERROR: + return "CURAND_STATUS_INTERNAL_ERROR"; + } + + return ""; +} +#endif + +template +void check_cuda_error(T result, char const *const func, const char *const file, + int const line) { + if (result) { + fprintf(stderr, "CUDA error at %s:%d code=%d(%s) \"%s\" \n", file, line, + static_cast(result), _cudaGetErrorEnum(result), func); + ABORT(); + } +} + +#ifdef __DRIVER_TYPES_H__ +// This will output the proper CUDA error strings in the event +// that a CUDA host call returns an error +#define CHECK_CUDA_ERROR(value) check_cuda_error((value), #value, __FILE__, __LINE__) +#define CUDA_API_CHECK(value) CHECK_CUDA_ERROR(value) + + +// This will output the proper error string when calling cudaGetLastError +#define getLastCudaError(msg) __getLastCudaError(msg, __FILE__, __LINE__) +#define GET_LAST_CUDA_ERROR(msg) getLastCudaError(msg) + +inline void __getLastCudaError(const char *errorMessage, const char *file, + const int line) { + cudaError_t err = cudaGetLastError(); + + if (cudaSuccess != err) { + fprintf(stderr, + "%s(%i) : getLastCudaError() CUDA error :" + " %s : (%d) %s.\n", + file, line, errorMessage, static_cast(err), + cudaGetErrorString(err)); + + // Make sure we call CUDA Device Reset before exiting + cudaDeviceReset(); + + ABORT(); + } +} + +// This will only print the proper error string when calling cudaGetLastError +// but not exit program incase error detected. +#define printLastCudaError(msg) __printLastCudaError(msg, __FILE__, __LINE__) +#define PRINT_LAST_CUDA_ERROR(msg) printLastCudaError(msg) + +inline void __printLastCudaError(const char *errorMessage, const char *file, + const int line) { + cudaError_t err = cudaGetLastError(); + + if (cudaSuccess != err) { + fprintf(stderr, + "%s(%i) : getLastCudaError() CUDA error :" + " %s : (%d) %s.\n", + file, line, errorMessage, static_cast(err), + cudaGetErrorString(err)); + } +} +#endif /* __DRIVER_TYPES_H__ */ + + +/** + * enum used below; can be used as the second argument of macro + * CUDA_KERNEL_CHECK + */ +enum device_sync_t { + DEVICE_NO_SYNC = 0, + DEVICE_SYNC = 1 +}; + + +/** + * a simple macro helper: + * GET_KERNEL_CHECK_MACRO always picks the 3rd arg + * + * see https://stackoverflow.com/questions/11761703/overloading-macro-on-number-of-arguments + */ +#define GET_KERNEL_CHECK_MACRO(_1,_2,NAME,...) NAME + +/** + * another simple macro helper : + * - if CUDA_KERNEL_CHECK is called with only 1 argument, then CUDA_KERNEL_CHECK1 is chosen + * - if CUDA_KERNEL_CHECK is called with 2 arguments, then CUDA_KERNEL_CHECK2 is chosen + * + * + * this is the macro we want to call + */ +#define CUDA_KERNEL_CHECK(...) GET_KERNEL_CHECK_MACRO(__VA_ARGS__, CUDA_KERNEL_CHECK2, CUDA_KERNEL_CHECK1)(__VA_ARGS__) + +/** + * Preprocessor macro helping to retrieve the exact code + * location where the error was emitted. + * + * Default behavior, don't synchronize device + */ +#define CUDA_KERNEL_CHECK1(msg) cuda_kernel_check((msg), __FILE__, __LINE__, DEVICE_NO_SYNC) + +/** + * Same as above, but let the user chose if we want to synchronize device. + */ +#define CUDA_KERNEL_CHECK2(msg,sync) cuda_kernel_check((msg), __FILE__, __LINE__, sync) + +/** + * Check last CUDA kernel call status. + * If it was not successfull then print error message. + * + * \param[in] errstr error message to print + * \param[in] file source filename where error occured + * \param[in] line line number where error occured + * \param[in] sync integer, 0 means no device synchronization + */ +static void cuda_kernel_check(const char* errstr, + const char* file, + const int line, + const int sync) +{ + + auto status = cudaGetLastError(); + + if (sync or FORCE_SYNC_GPU) { + //fprintf(stderr, "syncing device\n"); + cudaDeviceSynchronize(); + } + + if (status != cudaSuccess) { + fprintf(stderr, + "%s(%i) : getLastCudaError() CUDA error :" + " %s : (%d) %s.\n", + file, line, errstr, static_cast(status), + cudaGetErrorString(status)); + + //cudaDeviceReset(); + //exit(EXIT_FAILURE); + } + +} // cuda_kernel_check + +inline const char* _ConvertSMVer2ArchName(int major, int minor) { + // Defines for GPU Architecture types (using the SM version to determine + // the GPU Arch name) + typedef struct { + int SM; // 0xMm (hexidecimal notation), M = SM Major version, + // and m = SM minor version + const char* name; + } sSMtoArchName; + + sSMtoArchName nGpuArchNameSM[] = { + {0x30, "Kepler"}, + {0x32, "Kepler"}, + {0x35, "Kepler"}, + {0x37, "Kepler"}, + {0x50, "Maxwell"}, + {0x52, "Maxwell"}, + {0x53, "Maxwell"}, + {0x60, "Pascal"}, + {0x61, "Pascal"}, + {0x62, "Pascal"}, + {0x70, "Volta"}, + {0x72, "Xavier"}, + {0x75, "Turing"}, + {0x80, "Ampere"}, + {0x86, "Ampere"}, + {0x89, "AdaLovelace"}, + {0x90, "Hopper"}, + {-1, "Graphics Device"}}; + + int index = 0; + + while (nGpuArchNameSM[index].SM != -1) { + if (nGpuArchNameSM[index].SM == ((major << 4) + minor)) { + return nGpuArchNameSM[index].name; + } + + index++; + } + + // If we don't find the values, we default use the previous one + // to run properly + printf( + "MapSMtoArchName for SM %d.%d is undefined." + " Default to use %s\n", + major, minor, nGpuArchNameSM[index - 1].name); + return nGpuArchNameSM[index - 1].name; +} + + +#ifdef __CUDA_RUNTIME_H__ + +// General check for CUDA GPU SM Capabilities +inline bool checkCudaCapabilities(int major_version, int minor_version) { + int dev; + int major = 0, minor = 0; + + CHECK_CUDA_ERROR(cudaGetDevice(&dev)); + CHECK_CUDA_ERROR(cudaDeviceGetAttribute(&major, cudaDevAttrComputeCapabilityMajor, dev)); + CHECK_CUDA_ERROR(cudaDeviceGetAttribute(&minor, cudaDevAttrComputeCapabilityMinor, dev)); + + if ((major > major_version) || + (major == major_version && + minor >= minor_version)) { + printf(" Device %d: <%16s >, Compute SM %d.%d detected\n", dev, + _ConvertSMVer2ArchName(major, minor), major, minor); + return true; + } else { + printf( + " No GPU device was found that can support " + "CUDA compute capability %d.%d.\n", + major_version, minor_version); + return false; + } +} +#endif /* __CUDA_RUNTIME_H__ */ + +#ifdef __CUDA_RUNTIME_API_H__ +// cuBLAS API errors +static const char *cudaMemoryTypeToString(enum cudaMemoryType type) { + switch (type) { + case cudaMemoryTypeUnregistered: + return "cudaMemoryTypeUnregistered"; + case cudaMemoryTypeHost: + return "cudaMemoryTypeHost"; + case cudaMemoryTypeDevice: + return "cudaMemoryTypeDevice"; + case cudaMemoryTypeManaged: + return "cudaMemoryTypeManaged"; + } + + return ""; +} +#endif /* __CUDA_RUNTIME_API_H__ */ + +#endif /* CUDA_API_ERROR_CHECK_H_ */ diff --git a/GX-PAW/common/src/17_gpu_toolbox/dev_spec.cpp b/GX-PAW/common/src/17_gpu_toolbox/dev_spec.cpp new file mode 100644 index 00000000..46c0325d --- /dev/null +++ b/GX-PAW/common/src/17_gpu_toolbox/dev_spec.cpp @@ -0,0 +1,22 @@ +/* dev_spec.cpp*/ + +/* + * Copyright (C) 2008-2024 ABINIT Group (MMancini,FDahm) + * this file is distributed under the terms of the + * gnu general public license, see ~abinit/COPYING + * or http://www.gnu.org/copyleft/gpl.txt. + * + */ + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#ifdef HAVE_GPU_CUDA +#include "dev_spec_cuda.cpp" +#endif +#ifdef HAVE_GPU_HIP +#include "dev_spec_hip.cpp" +#endif + + diff --git a/GX-PAW/common/src/17_gpu_toolbox/dev_spec_cuda.cpp b/GX-PAW/common/src/17_gpu_toolbox/dev_spec_cuda.cpp new file mode 100644 index 00000000..abe20648 --- /dev/null +++ b/GX-PAW/common/src/17_gpu_toolbox/dev_spec_cuda.cpp @@ -0,0 +1,509 @@ +/* dev_spec_cuda.cpp*/ + +/* + * Copyright (C) 2008-2024 ABINIT Group (MMancini,FDahm) + * this file is distributed under the terms of the + * gnu general public license, see ~abinit/COPYING + * or http://www.gnu.org/copyleft/gpl.txt. + * + */ + +#include +#include +#include +#include +#include +#include "cuda_api_error_check.h" + +static int version_2_cores(int major, int minor); + +/*=========================================================================*/ +/*________________________ GPU_function called by HOST_____________________*/ +/*=========================================================================*/ +// display CUDA device info +static void prt_dev_info() +{ + int deviceCount; + cudaGetDeviceCount(&deviceCount); + for (int dev = 0; dev < deviceCount; ++dev) + { + cudaDeviceProp deviceProp; + cudaGetDeviceProperties(&deviceProp, dev); + int NProcs=deviceProp.multiProcessorCount; + int NCores=version_2_cores(deviceProp.major, deviceProp.minor); + printf("\n___________________________________________________________________\n"); + printf( "__________ Graphic Card Properties ______________________________\n"); + printf("\n Device %d: \"%s\"\n", dev, deviceProp.name); + printf(" Revision number: %d.%d\n", deviceProp.major,deviceProp.minor); + printf(" Total amount of global memory: %3.1f Mbytes\n", deviceProp.totalGlobalMem/1048576.); + printf(" Clock rate: %3.1f GHz\n", deviceProp.clockRate/1000000.); + printf(" Number of processors/cores: %d/%d\n", NProcs,NCores); + if (NCores<0) { + printf(" Max GFLOPS: undefined (add new def. in version_2_cores function)\n"); + } else { + printf(" Max GFLOPS: %d GFP\n", NCores*deviceProp.multiProcessorCount * deviceProp.clockRate/1000000); + } + printf(" Total amount of constant memory: %d bytes\n",(int) deviceProp.totalConstMem); + printf(" Total amount of shared memory per block: %d bytes\n",(int) deviceProp.sharedMemPerBlock); + printf(" Total number of registers available per block: %d\n", deviceProp.regsPerBlock); + printf("___________________________________________________________________\n"); + fflush(stdout); + if( (int) deviceProp.totalConstMem<0) break; + //if(deviceProp.major==9999){printf("EXIT: PROBLEM WITH AVAILABLE DEVICES \n");exit(0);} + } +} + + +// Explicit Cuda Error --------------------- +void check_err(int line ) +{ + /* cuda check errors */ + cudaError_t cudaError; + cudaError = cudaGetLastError(); + if(cudaError != cudaSuccess) + { + fprintf(stderr, "CUDA Runtime API Error reported : %s %d\n", cudaGetErrorString(cudaError),line); + exit(EXIT_FAILURE); + } + return; +} + + +// Gives the number of GPU devices --------- +extern "C" +void get_gpu_ndev_(int* ndevice) +{ + int deviceCount; + cudaGetDeviceCount(&deviceCount); + *ndevice = deviceCount; + + return; +} + +// Gives the max memory available for a GPU device --------- +extern "C" +void get_gpu_max_mem_(int* device, float* max_mem) +{ + cudaDeviceProp deviceProp; + cudaGetDeviceProperties(&deviceProp, *device); + *max_mem = (float) deviceProp.totalGlobalMem; + return; +} + +// Gives currently free memory available for current GPU device --------- +extern "C" +void gpu_get_free_mem_cpp(size_t* free_mem) +{ + size_t max_mem; + cudaMemGetInfo(&max_mem, free_mem); + return; +} + +// Set the device if it exists ----------------- +extern "C" +void set_dev_(int* gpudevice) +{ + if(*gpudevice >-1){ + cudaError_t cudaError; + int deviceCount; + cudaGetDeviceCount(&deviceCount); + if(deviceCount>*gpudevice){ + cudaSetDevice(*gpudevice); + cudaError = cudaGetLastError(); + if(cudaError != cudaSuccess){ + fprintf(stderr, "CUDA Runtime API Error reported : %s\n", cudaGetErrorString(cudaError)); + fflush(stderr); + exit(1); + } + } + else *gpudevice=-1; + } + return; +} + + +// Unset the devices ----------------- +extern "C" +void unset_dev_() +{ +#if defined HAVE_GPU_CUDA3 + cudaThreadExit(); +#else + cudaDeviceReset(); +#endif + return; +} + +// Synchronize device (makes the CPU waits the GPU to finish all running kernels) +// this is required when using mamanged memory in order to reuse safely on CPU data +// that were processed / modified by the GPU +extern "C" +void gpu_device_synchronize_cpp() +{ + cudaError_t cudaError = cudaDeviceSynchronize(); + if(cudaError != cudaSuccess) + { + fprintf(stderr, "CUDA Runtime API Error reported : %s when trying to call cudaDeviceSynchronize\n", cudaGetErrorString(cudaError)); + fflush(stderr); + } + return; +} + +// +extern "C" +void gpu_get_device_cpp(int *deviceId) +{ + CHECK_CUDA_ERROR( cudaGetDevice(deviceId) ); + + return; +} + +// +extern "C" +void gpu_data_prefetch_async_cpp(const void* devPtr, size_t count, int deviceId) +{ + + CHECK_CUDA_ERROR( cudaMemPrefetchAsync(devPtr, count, deviceId) ); + + return; +} + +// +extern "C" +void gpu_memory_advise_cpp(const void* devPtr, size_t count, cudaMemoryAdvise advice, int deviceId) +{ + + CHECK_CUDA_ERROR( cudaMemAdvise(devPtr, count, advice, deviceId) ); + + return; +} + +// Get context ----------------------- +extern "C" +void check_context_(int *res,char *message) +{ + *res=1; + cudaError_t state=cudaFree(0); + if (state!=cudaSuccess){ + sprintf(message,"Unable to initialize a Cuda context: %s \n",cudaGetErrorString(state)); + *res=0; + unset_dev_(); + } +} + + +// Get info from device -------------- +extern "C" +void get_dev_info_(int* device, + char* name, + int* lenname, + int vers[2], + float* globalmem, + float* clockrate, + int* gflops, + int* constmem, + int* sharemem, + int* regist, + int* nprocs, + int* ncores + ) +{ + cudaDeviceProp deviceProp; + cudaGetDeviceProperties(&deviceProp, *device); + strcpy(name,deviceProp.name); + *lenname = strlen( name ); + vers[0] = deviceProp.major; + vers[1] = deviceProp.minor; + *globalmem = deviceProp.totalGlobalMem/1048576.; + *clockrate = deviceProp.clockRate/1000000.; + *nprocs = deviceProp.multiProcessorCount; + *ncores = version_2_cores(deviceProp.major,deviceProp.minor); + *gflops = int(deviceProp.multiProcessorCount*version_2_cores(deviceProp.major,deviceProp.minor)*(deviceProp.clockRate/1000000.)); + *constmem = deviceProp.totalConstMem; + *sharemem = deviceProp.sharedMemPerBlock; + *regist = deviceProp.regsPerBlock; +} + + +// Get number of devices -------------- +extern "C" +void c_get_ndevice_(int* ndev) +{ + *ndev=0; + int deviceCount; + cudaGetDeviceCount(&deviceCount); + for (int idev = 0; idev < deviceCount; ++idev) + { + cudaDeviceProp deviceProp; + cudaGetDeviceProperties(&deviceProp, idev); + //We check that no device is in "emu" mode + if( deviceProp.major != 9999 ) { +#if defined HAVE_GPU_CUDA_DP + //We check that double precision is available, c.c. >= 1.3 ) + if( (deviceProp.major>1)||(deviceProp.minor>2) ) +#endif + *ndev+=1; + } + } +} + + +// Get number of cores of device -------------- +//This function is present in cuda SDK: see ${CUDAROOT}/common/inc/helper_cuda_drvapi.h +//To be completed for new card versions +static +int version_2_cores(int major, int minor) +{ + // Defines for GPU Architecture types (using the SM version to determine the # of cores per SM + typedef struct + { + int SM; // 0xMm (hexidecimal notation), M = SM Major version, and m = SM minor version + int Cores; + } sSMtoCores; + sSMtoCores nGpuArchCoresPerSM[] = + { + { 0x10, 8 }, // Tesla Generation (SM 1.0) G80 class + { 0x11, 8 }, // Tesla Generation (SM 1.1) G8x class + { 0x12, 8 }, // Tesla Generation (SM 1.2) G9x class + { 0x13, 8 }, // Tesla Generation (SM 1.3) GT200 class + { 0x20, 32 }, // Fermi Generation (SM 2.0) GF100 class + { 0x21, 48 }, // Fermi Generation (SM 2.1) GF10x class + { 0x30, 192}, // Kepler Generation (SM 3.0) GK10x class + { 0x32, 192}, // Kepler Generation (SM 3.2) GK10x class + { 0x35, 192}, // Kepler Generation (SM 3.5) GK11x class + { 0x50, 128}, // Maxwell Generation (SM 5.0) GM10x class + { 0x60, 64 }, // Pascal Generation (SM 6.0) GP100 class + { 0x61, 128}, // Pascal Generation (SM 6.1) GP10x class + { 0x62, 128}, // Pascal Generation (SM 6.2) GP10x class + { 0x70, 64 }, // Volta Generation (SM 7.0) GV100 class + { 0x72, 64 }, // Volta Generation (SM 7.2) AGX class + { 0x75, 64 }, // Turing Generation (SM 7.5) RTX class + { 0x80, 64 }, // Ampere Generation (SM 8.0) A100 class + { 0x86, 128}, // Ampere Generation (SM 8.6) RTX class + { 0x87, 128}, // Ampere Generation (SM 8.7) AGX class + { 0x89, 128}, // Ada Lovelace Generation (SM 8.9) RTX class + { 0x90, 128}, // Hooper Generation (SM 9.0) H100 class + { -1, -1 } + }; + int index = 0; + while (nGpuArchCoresPerSM[index].SM != -1) + { + if (nGpuArchCoresPerSM[index].SM == ((major << 4) + minor)) + { + return nGpuArchCoresPerSM[index].Cores; + } + index++; + } + +// printf("MapSMtoCores for SM %d.%d is undefined. Default to use %d Cores/SM\n", major, minor, nGpuArchCoresPerSM[7].Cores); + return nGpuArchCoresPerSM[10].Cores; +} + + +/***************************************************************/ +/******* ********/ +/******* GPU MEMORY MANAGEMENT ROUTINES ********/ +/******* ********/ +/***************************************************************/ + +/*============================================================================*/ +/* Print memory information (total amount and free available) */ +/*============================================================================*/ + +extern "C" void check_gpu_mem_(const char* str) +{ + size_t free,total; + cudaMemGetInfo(&free,&total); + printf("[%s] *** GPU memory : Occupied => %4.2fMo | Free => %4.2fMo | Total => %4.2fMo ***\n", + str, (total-free)*1e-6, free*1e-6, total*1e-6); + fflush(stdout); +} + +/*============================================================================*/ +/* Allocate size byte in gpu memory and returns in gpu_ptr this location */ +/* INPUTS size= size in byte to allocate */ +/* OUTPUT gpu_ptr= C_PTR on gpu memory location that has been allocated */ +/*============================================================================*/ + +extern "C" void alloc_on_gpu_(void **gpu_ptr, const size_t* size) +{ + + //check_gpu_mem_("alloc_on_gpu_"); + + if (cudaMalloc(gpu_ptr,*size) != cudaSuccess) + { + fprintf(stderr, "ERROR: alloc_on_gpu failed allocating %ld bytes :%s\n", *size, cudaGetErrorString(cudaGetLastError())); + fflush(stderr); + abi_cabort(); + } +} + +/*============================================================================*/ +/* Free memory location pointed by gpu_ptr */ +/* OUTPUT gpu_ptr= C_PTR on gpu memory location that has been allocated */ +/* WARNING! : this routine is a dummy one when HAVE_GPU_CUDA is not enabled */ +/* the correct one is in xx_gpu_toolbox/dev_spec.cu */ +/*============================================================================*/ + +extern "C" void dealloc_on_gpu_(void **gpu_ptr) +{ + if(*gpu_ptr==NULL) + return; + + if (cudaFree(*gpu_ptr) != cudaSuccess) + { + fprintf(stderr, "ERROR: dealloc_on_gpu failed :%s\n",cudaGetErrorString(cudaGetLastError())); + fflush(stderr); + abi_cabort(); + } + *gpu_ptr=NULL; +} + +/*============================================================================*/ +/* Copy size byte from cpu pointer to gpu pointer. */ +/* INPUTS */ +/* size = size in byte to copy */ +/* cpu_ptr = host memory location (LOC) */ +/* OUTPUT */ +/* gpu_ptr = C_PTR : gpu memory location */ +/* WARNING! : this routine is a dummy one when HAVE_GPU_CUDA is not enabled */ +/* the correct one is in xx_gpu_toolbox/dev_spec.cu */ +/*============================================================================*/ + +extern "C" void copy_on_gpu_(void *cpu_ptr, void **gpu_ptr, const size_t* size) +{ + if (cudaMemcpy(*gpu_ptr, cpu_ptr, *size, cudaMemcpyHostToDevice) != cudaSuccess) + { + fprintf(stderr, "ERROR: copy_on_gpu failed : %s\n",cudaGetErrorString(cudaGetLastError())); + fflush(stderr); + abi_cabort(); + } +} + +/*============================================================================*/ +/* Copy size byte from gpu pointer to cpu pointer. */ +/* INPUTS */ +/* size = size in byte to copy */ +/* gpu_ptr = C_PTR : gpu memory location */ +/* OUTPUT */ +/* cpu_ptr = host memory location (LOC of an allocated array) */ +/*============================================================================*/ + +extern "C" void copy_from_gpu_(void *cpu_ptr, void **gpu_ptr, const size_t* size) +{ + if (cudaMemcpy(cpu_ptr, *gpu_ptr, *size, cudaMemcpyDeviceToHost) != cudaSuccess) + { + fprintf(stderr, "ERROR: copy_from_gpu failed : %s\n",cudaGetErrorString(cudaGetLastError())); + fflush(stderr); + abi_cabort(); + } +} + +/*============================================================================*/ +/* Copy size byte from gpu to gpu memory. */ +/* INPUTS */ +/* size = size in byte to copy */ +/* src_gpu_ptr */ +/* OUTPUT */ +/* dest_gpu_ptr = C_PTR on gpu memory location */ +/* WARNING! : this routine is a dummy one when HAVE_GPU_CUDA is not enabled */ +/* the correct one is in xx_gpu_toolbox/dev_spec.cu */ +/*============================================================================*/ + +extern "C" void copy_gpu_to_gpu_cpp_(void **dest_gpu_ptr, void **src_gpu_ptr, const size_t* size) +{ + if (cudaMemcpy(*dest_gpu_ptr, *src_gpu_ptr, *size, cudaMemcpyDeviceToDevice) != cudaSuccess) + { + fprintf(stderr, "ERROR: copy_gpu_to_gpu failed (dest=%p, src=%p, size=%ld): %s\n", + *dest_gpu_ptr, *src_gpu_ptr, *size, cudaGetErrorString(cudaGetLastError())); + fflush(stderr); + abi_cabort(); + } +} + +/*============================================================================*/ +/* Reset array (just wrapping cudaMemset) */ +/* */ +/* INPUTS */ +/* gpu_ptr = C_PTR on gpu memory location */ +/* value = integer used to initialize each bytes (should be in range [0,255])*/ +/* size = size in bytes of the region to be set */ +/* */ +/* OUTPUT */ +/* None */ +/*============================================================================*/ + +extern "C" void gpu_memset_cpp_(void **gpu_ptr, const int32_t* value, const size_t* size_in_bytes) +{ + if(cudaMemset(*gpu_ptr, *value, *size_in_bytes)!=cudaSuccess){ + fprintf(stderr, "ERROR: gpu_memset at address %p failed : %s\n",*gpu_ptr,cudaGetErrorString(cudaGetLastError())); + fflush(stderr); + abi_cabort(); + } +} + +/*============================================================================*/ +/* Kind of equivalent of fortran "allocated". Check if a gpu pointer */ +/* actually points to device allocated memory. */ +/* */ +/* This is void function because I can't manage to bind it via iso_c_binding */ +/* as a fortran function; binding as a subroutine is ok though (?!) */ +/* */ +/* INPUTS */ +/* gpu_ptr = C_PTR on gpu memory location */ +/* */ +/* OUTPUT */ +/* boolean/logical (false = not allocated, true = allocated) */ +/*============================================================================*/ + +extern "C" void gpu_allocated_impl_(void **gpu_ptr, bool* is_allocated) +{ + + *is_allocated = false; + + cudaPointerAttributes attributes; + + CHECK_CUDA_ERROR(cudaPointerGetAttributes(&attributes, *gpu_ptr)); + + if(attributes.devicePointer != NULL) + { + *is_allocated = true; + } + +} // gpu_allocated_impl_ + +/*============================================================================*/ +/* Utility routine to print memory location of a cuda managed pointer. */ +/* */ +/* We check that the pointer has actually been allocated with */ +/* cudaMallocManaged and then prints device and host addresses. */ +/* */ +/* INPUTS */ +/* gpu_ptr = C_PTR on gpu memory location */ +/* */ +/* OUTPUT */ +/* None. */ +/*============================================================================*/ + +extern "C" void gpu_managed_ptr_status_(void **gpu_ptr, const char* str) +{ + + cudaPointerAttributes attributes; + + CHECK_CUDA_ERROR(cudaPointerGetAttributes(&attributes, *gpu_ptr)); + + if(attributes.type == cudaMemoryTypeManaged) + { + printf("[%s] ptr %p is memory managed, host addr=%p, device addr=%p\n", str, *gpu_ptr, + attributes.hostPointer, + attributes.devicePointer); + fflush(stdout); + } else if(attributes.type == cudaMemoryTypeDevice) { + printf("[%s] ptr %p is a device ptr.\n", str, *gpu_ptr); + fflush(stdout); + } else { + printf("[%s] ptr %p is neither a memory managed pointer nor a device pointer.\n", str, *gpu_ptr); + fflush(stdout); + } + +} // gpu_managed_ptr_status_ diff --git a/GX-PAW/common/src/17_gpu_toolbox/dev_spec_hip.cpp b/GX-PAW/common/src/17_gpu_toolbox/dev_spec_hip.cpp new file mode 100644 index 00000000..fbebeda6 --- /dev/null +++ b/GX-PAW/common/src/17_gpu_toolbox/dev_spec_hip.cpp @@ -0,0 +1,498 @@ +/* dev_spec_hip.cpp*/ + +/* + * Copyright (C) 2008-2024 ABINIT Group (MMancini,FDahm) + * this file is distributed under the terms of the + * gnu general public license, see ~abinit/COPYING + * or http://www.gnu.org/copyleft/gpl.txt. + * + */ + +#include +#include +#include +#include "hip_api_error_check.h" + +static int version_2_cores(int major, int minor); + +/*=========================================================================*/ +/*________________________ GPU_function called by HOST_____________________*/ +/*=========================================================================*/ +// display HIP device info +static void prt_dev_info() +{ + int deviceCount; + HIP_API_CHECK(hipGetDeviceCount(&deviceCount)); + for (int dev = 0; dev < deviceCount; ++dev) + { + hipDeviceProp_t deviceProp; + HIP_API_CHECK(hipGetDeviceProperties(&deviceProp, dev)); + int NProcs=deviceProp.multiProcessorCount; + int NCores=version_2_cores(deviceProp.major, deviceProp.minor); + printf("\n___________________________________________________________________\n"); + printf( "__________ Graphic Card Properties ______________________________\n"); + printf("\n Device %d: \"%s\"\n", dev, deviceProp.name); + printf(" Revision number: %d.%d\n", deviceProp.major,deviceProp.minor); + printf(" Total amount of global memory: %3.1f Mbytes\n", deviceProp.totalGlobalMem/1048576.); + printf(" Clock rate: %3.1f GHz\n", deviceProp.clockRate/1000000.); + printf(" Number of processors/cores: %d/%d\n", NProcs,NCores); + if (NCores<0) { + printf(" Max GFLOPS: undefined (add new def. in version_2_cores function)\n"); + } else { + printf(" Max GFLOPS: %d GFP\n", NCores*deviceProp.multiProcessorCount * deviceProp.clockRate/1000000); + } + printf(" Total amount of constant memory: %d bytes\n",(int) deviceProp.totalConstMem); + printf(" Total amount of shared memory per block: %d bytes\n",(int) deviceProp.sharedMemPerBlock); + printf(" Total number of registers available per block: %d\n", deviceProp.regsPerBlock); + printf("___________________________________________________________________\n"); + fflush(stdout); + if( (int) deviceProp.totalConstMem<0) break; + //if(deviceProp.major==9999){printf("EXIT: PROBLEM WITH AVAILABLE DEVICES \n");exit(0);} + } +} + + +// Explicit Cuda Error --------------------- +void check_err(int line ) +{ + /* hip check errors */ + hipError_t hipError; + hipError = hipGetLastError(); + if(hipError != hipSuccess) + { fprintf(stderr, "HIP Runtime API Error reported : %s %d\n", hipGetErrorString(hipError),line); + exit(EXIT_FAILURE); + } + return; +} + + +// Gives the number of GPU devices --------- +extern "C" +void get_gpu_ndev_(int* ndevice) +{ + int deviceCount; + HIP_API_CHECK(hipGetDeviceCount(&deviceCount)); + *ndevice = deviceCount; + + return; +} + +// Gives the max memory available for a GPU device --------- +extern "C" +void get_gpu_max_mem_(int* device, float* max_mem) +{ + hipDeviceProp_t deviceProp; + HIP_API_CHECK(hipGetDeviceProperties(&deviceProp, *device)); + *max_mem = (float) deviceProp.totalGlobalMem; + return; +} + +// Gives currently free memory available for current GPU device --------- +extern "C" +void gpu_get_free_mem_cpp(size_t* free_mem) +{ + size_t max_mem; + HIP_API_CHECK(hipMemGetInfo(&max_mem, free_mem)); + return; +} + +// Set the device if it exists ----------------- +extern "C" +void set_dev_(int* gpudevice) +{ + if(*gpudevice >-1){ + hipError_t hipError; + int deviceCount; + HIP_API_CHECK(hipGetDeviceCount(&deviceCount)); + if(deviceCount>*gpudevice){ + HIP_API_CHECK(hipSetDevice(*gpudevice)); + hipError = hipGetLastError(); + if(hipError != hipSuccess){ + fprintf(stderr, "HIP Runtime API Error reported : %s\n", hipGetErrorString(hipError)); + fflush(stderr); + exit(1); + } + } + else *gpudevice=-1; + } + return; +} + + +// Unset the devices ----------------- +extern "C" +void unset_dev_() +{ + HIP_API_CHECK(hipDeviceReset()); + return; +} + +// Synchronize device (makes the CPU waits the GPU to finish all running kernels) +// this is required when using mamanged memory in order to reuse safely on CPU data +// that were processed / modified by the GPU +extern "C" +void gpu_device_synchronize_cpp() +{ + hipError_t hipError = hipDeviceSynchronize(); + if(hipError != hipSuccess) + { + fprintf(stderr, "HIP Runtime API Error reported : %s when trying to call hipDeviceSynchronize\n", hipGetErrorString(hipError)); + fflush(stderr); + } + return; +} + +// +extern "C" +void gpu_get_device_cpp(int *deviceId) +{ + CHECK_HIP_ERROR( hipGetDevice(deviceId) ); + + return; +} + +// +extern "C" +void gpu_data_prefetch_async_cpp(const void* devPtr, size_t count, int deviceId) +{ + + CHECK_HIP_ERROR( hipMemPrefetchAsync(devPtr, count, deviceId) ); + + return; +} + +// +extern "C" +void gpu_memory_advise_cpp(const void* devPtr, size_t count, hipMemoryAdvise advice, int deviceId) +{ + + CHECK_HIP_ERROR( hipMemAdvise(devPtr, count, advice, deviceId) ); + + return; +} + +// Get context ----------------------- +extern "C" +void check_context_(int *res,char *message) +{ + *res=1; + hipError_t state=hipFree(0); + if (state!=hipSuccess){ + sprintf(message,"Unable to initialize a Cuda context: %s \n",hipGetErrorString(state)); + *res=0; + unset_dev_(); + } +} + + +// Get info from device -------------- +extern "C" +void get_dev_info_(int* device, + char* name, + int* lenname, + int vers[2], + float* globalmem, + float* clockrate, + int* gflops, + int* constmem, + int* sharemem, + int* regist, + int* nprocs, + int* ncores + ) +{ + hipDeviceProp_t deviceProp; + HIP_API_CHECK(hipGetDeviceProperties(&deviceProp, *device)); + strcpy(name,deviceProp.name); + *lenname = strlen( name ); + vers[0] = deviceProp.major; + vers[1] = deviceProp.minor; + *globalmem = deviceProp.totalGlobalMem/1048576.; + *clockrate = deviceProp.clockRate/1000000.; + *nprocs = deviceProp.multiProcessorCount; + *ncores = version_2_cores(deviceProp.major,deviceProp.minor); + *gflops = int(deviceProp.multiProcessorCount*version_2_cores(deviceProp.major,deviceProp.minor)*(deviceProp.clockRate/1000000.)); + *constmem = deviceProp.totalConstMem; + *sharemem = deviceProp.sharedMemPerBlock; + *regist = deviceProp.regsPerBlock; +} + + +// Get number of devices -------------- +extern "C" +void c_get_ndevice_(int* ndev) +{ + *ndev=0; + int deviceCount; + HIP_API_CHECK(hipGetDeviceCount(&deviceCount)); + for (int idev = 0; idev < deviceCount; ++idev) + { + hipDeviceProp_t deviceProp; + HIP_API_CHECK(hipGetDeviceProperties(&deviceProp, idev)); + //We check that no device is in "emu" mode + if( deviceProp.major != 9999 ) { +#if defined HAVE_GPU_HIP_DP + //We check that double precision is available, c.c. >= 1.3 ) + if( (deviceProp.major>1)||(deviceProp.minor>2) ) +#endif + *ndev+=1; + } + } +} + + +// Get number of cores of device -------------- +//This function is present in hip SDK: see ${HIPROOT}/common/inc/helper_hip_drvapi.h +//To be completed for new card versions +static +int version_2_cores(int major, int minor) +{ + // Defines for GPU Architecture types (using the SM version to determine the # of cores per SM + typedef struct + { + int SM; // 0xMm (hexidecimal notation), M = SM Major version, and m = SM minor version + int Cores; + } sSMtoCores; + sSMtoCores nGpuArchCoresPerSM[] = + { + { 0x10, 8 }, // Tesla Generation (SM 1.0) G80 class + { 0x11, 8 }, // Tesla Generation (SM 1.1) G8x class + { 0x12, 8 }, // Tesla Generation (SM 1.2) G9x class + { 0x13, 8 }, // Tesla Generation (SM 1.3) GT200 class + { 0x20, 32 }, // Fermi Generation (SM 2.0) GF100 class + { 0x21, 48 }, // Fermi Generation (SM 2.1) GF10x class + { 0x30, 192}, // Kepler Generation (SM 3.0) GK10x class + { 0x32, 192}, // Kepler Generation (SM 3.2) GK10x class + { 0x35, 192}, // Kepler Generation (SM 3.5) GK11x class + { 0x50, 128}, // Maxwell Generation (SM 5.0) GM10x class + { 0x60, 64 }, // Pascal Generation (SM 6.0) GP100 class + { 0x61, 128}, // Pascal Generation (SM 6.1) GP10x class + { 0x62, 128}, // Pascal Generation (SM 6.2) GP10x class + { 0x70, 64 }, // Volta Generation (SM 7.0) GV100 class + { 0x72, 64 }, // Volta Generation (SM 7.2) AGX class + { 0x75, 64 }, // Turing Generation (SM 7.5) RTX class + { 0x80, 64 }, // Ampere Generation (SM 8.0) A100 class + { 0x86, 128}, // Ampere Generation (SM 8.6) + { 0x87, 128}, // Ampere Generation (SM 8.7) + { -1, -1 } + }; + int index = 0; + while (nGpuArchCoresPerSM[index].SM != -1) + { + if (nGpuArchCoresPerSM[index].SM == ((major << 4) + minor)) + { + return nGpuArchCoresPerSM[index].Cores; + } + index++; + } + +// printf("MapSMtoCores for SM %d.%d is undefined. Default to use %d Cores/SM\n", major, minor, nGpuArchCoresPerSM[7].Cores); + return nGpuArchCoresPerSM[10].Cores; +} + + +/***************************************************************/ +/******* ********/ +/******* GPU MEMORY MANAGEMENT ROUTINES ********/ +/******* ********/ +/***************************************************************/ + +/*============================================================================*/ +/* Print memory information (total amount and free available) */ +/*============================================================================*/ + +extern "C" void check_gpu_mem_(const char* str) +{ + size_t free,total; + HIP_API_CHECK(hipMemGetInfo(&free,&total)); + printf("[%s] *** GPU memory : Occupied => %4.2fMo | Free => %4.2fMo | Total => %4.2fMo ***\n", + str, (total-free)*1e-6, free*1e-6, total*1e-6); + fflush(stdout); +} + +/*============================================================================*/ +/* Allocate size byte in gpu memory and returns in gpu_ptr this location */ +/* INPUTS size= size in byte to allocate */ +/* OUTPUT gpu_ptr= C_PTR on gpu memory location that has been allocated */ +/*============================================================================*/ + +extern "C" void alloc_on_gpu_(void **gpu_ptr, const size_t* size) +{ + + if (hipMalloc(gpu_ptr,*size) != hipSuccess) + { + fprintf(stderr, "ERROR: alloc_on_gpu failed allocating %ld bytes :%s\n", *size, hipGetErrorString(hipGetLastError())); + fflush(stderr); + abi_cabort(); + } +} + +/*============================================================================*/ +/* Free memory location pointed by gpu_ptr */ +/* OUTPUT gpu_ptr= C_PTR on gpu memory location that has been allocated */ +/* WARNING! : this routine is a dummy one when HAVE_GPU_HIP is not enabled */ +/* the correct one is in xx_gpu_toolbox/dev_spec.cu */ +/*============================================================================*/ + +extern "C" void dealloc_on_gpu_(void **gpu_ptr) +{ + if(*gpu_ptr==NULL) + return; + + if (hipFree(*gpu_ptr) != hipSuccess) + { + fprintf(stderr, "ERROR: dealloc_on_gpu failed :%s\n",hipGetErrorString(hipGetLastError())); + fflush(stderr); + abi_cabort(); + } + *gpu_ptr=NULL; +} + +/*============================================================================*/ +/* Copy size byte from cpu pointer to gpu pointer. */ +/* INPUTS */ +/* size = size in byte to copy */ +/* cpu_ptr = host memory location (LOC) */ +/* OUTPUT */ +/* gpu_ptr = C_PTR : gpu memory location */ +/* WARNING! : this routine is a dummy one when HAVE_GPU_HIP is not enabled */ +/* the correct one is in xx_gpu_toolbox/dev_spec.cu */ +/*============================================================================*/ + +extern "C" void copy_on_gpu_(void *cpu_ptr, void **gpu_ptr, const size_t* size) +{ + if (hipMemcpy(*gpu_ptr, cpu_ptr, *size, hipMemcpyHostToDevice) != hipSuccess) + { + fprintf(stderr, "ERROR: copy_on_gpu failed : %s\n",hipGetErrorString(hipGetLastError())); + fflush(stderr); + abi_cabort(); + } +} + +/*============================================================================*/ +/* Copy size byte from gpu pointer to cpu pointer. */ +/* INPUTS */ +/* size = size in byte to copy */ +/* gpu_ptr = C_PTR : gpu memory location */ +/* OUTPUT */ +/* cpu_ptr = host memory location (LOC of an allocated array) */ +/*============================================================================*/ + +extern "C" void copy_from_gpu_(void *cpu_ptr,void **gpu_ptr, const size_t* size) +{ + if (hipMemcpy(cpu_ptr, *gpu_ptr, *size, hipMemcpyDeviceToHost) != hipSuccess) + { + fprintf(stderr, "ERROR: copy_from_gpu failed : %s\n",hipGetErrorString(hipGetLastError())); + fflush(stderr); + abi_cabort(); + } +} + +/*============================================================================*/ +/* Copy size byte from gpu to gpu memory. */ +/* INPUTS */ +/* size = size in byte to copy */ +/* src_gpu_ptr */ +/* OUTPUT */ +/* dest_gpu_ptr = C_PTR on gpu memory location */ +/* WARNING! : this routine is a dummy one when HAVE_GPU_HIP is not enabled */ +/* the correct one is in xx_gpu_toolbox/dev_spec.cu */ +/*============================================================================*/ + +extern "C" void copy_gpu_to_gpu_cpp_(void **dest_gpu_ptr, void **src_gpu_ptr, const size_t* size) +{ + if (hipMemcpy(*dest_gpu_ptr, *src_gpu_ptr, *size, hipMemcpyDeviceToDevice) != hipSuccess) + { + fprintf(stderr, "ERROR: copy_gpu_to_gpu failed (dest=%p, src=%p, size=%ld): %s\n", + *dest_gpu_ptr, *src_gpu_ptr, *size, hipGetErrorString(hipGetLastError())); + fflush(stderr); + abi_cabort(); + } +} + +/*============================================================================*/ +/* Reset array (just wrapping hipMemset) */ +/* */ +/* INPUTS */ +/* gpu_ptr = C_PTR on gpu memory location */ +/* value = integer used to initialize each bytes (should be in range [0,255])*/ +/* size = size in bytes of the region to be set */ +/* */ +/* OUTPUT */ +/* None */ +/*============================================================================*/ + +extern "C" void gpu_memset_cpp_(void **gpu_ptr, const int32_t* value, const size_t* size_in_bytes) +{ + if(hipMemset(*gpu_ptr, *value, *size_in_bytes)!=hipSuccess){ + fprintf(stderr, "ERROR: gpu_memset at address %p failed : %s\n",*gpu_ptr,hipGetErrorString(hipGetLastError())); + fflush(stderr); + abi_cabort(); + } +} + +/*============================================================================*/ +/* Kind of equivalent of fortran "allocated". Check if a gpu pointer */ +/* actually points to device allocated memory. */ +/* */ +/* This is void function because I can't manage to bind it via iso_c_binding */ +/* as a fortran function; binding as a subroutine is ok though (?!) */ +/* */ +/* INPUTS */ +/* gpu_ptr = C_PTR on gpu memory location */ +/* */ +/* OUTPUT */ +/* boolean/logical (false = not allocated, true = allocated) */ +/*============================================================================*/ + +extern "C" void gpu_allocated_impl_(void **gpu_ptr, bool* is_allocated) +{ + + *is_allocated = false; + + hipPointerAttribute_t attributes; + + CHECK_HIP_ERROR(hipPointerGetAttributes(&attributes, *gpu_ptr)); + + if(attributes.devicePointer != NULL) + { + *is_allocated = true; + } + +} // gpu_allocated_impl_ + +/*============================================================================*/ +/* Utility routine to print memory location of a hip managed pointer. */ +/* */ +/* We check that the pointer has actually been allocated with */ +/* hipMallocManaged and then prints device and host addresses. */ +/* */ +/* INPUTS */ +/* gpu_ptr = C_PTR on gpu memory location */ +/* */ +/* OUTPUT */ +/* None. */ +/*============================================================================*/ + +extern "C" void gpu_managed_ptr_status_(void **gpu_ptr, const char* str) +{ + + hipPointerAttribute_t attributes; + + CHECK_HIP_ERROR(hipPointerGetAttributes(&attributes, *gpu_ptr)); + + if(attributes.type == hipMemoryTypeUnified) + { + printf("[%s] ptr %p is unified memory, host addr=%p, device addr=%p\n", str, *gpu_ptr, + attributes.hostPointer, + attributes.devicePointer); + fflush(stdout); + } else if(attributes.type == hipMemoryTypeDevice) { + printf("[%s] ptr %p is a device ptr.\n", str, *gpu_ptr); + fflush(stdout); + } else { + printf("[%s] ptr %p is neither a unified memory pointer nor a device pointer.\n", str, *gpu_ptr); + fflush(stdout); + } + +} // gpu_managed_ptr_status_ diff --git a/GX-PAW/common/src/17_gpu_toolbox/gpu_fft.cpp b/GX-PAW/common/src/17_gpu_toolbox/gpu_fft.cpp new file mode 100644 index 00000000..2f1710ed --- /dev/null +++ b/GX-PAW/common/src/17_gpu_toolbox/gpu_fft.cpp @@ -0,0 +1,23 @@ +/* gpu_fft.cpp */ + +/* + * Copyright (C) 2008-2024 ABINIT Group (MSarraute) + * this file is distributed under the terms of the + * gnu general public license, see ~abinit/COPYING + * or http://www.gnu.org/copyleft/gpl.txt . + * for the initials of contributors, see ~abinit/doc/developers/contributors.txt. + * + * The main goal of this file is to contain GPU linear algebra encapsulation routines, + * that will be callable from fortran routines, by pointing to the relevant + * GPU runtime libraries (CUDA for NVIDIA targets, HIP for AMD targets). + * + */ + +#include + +#ifdef HAVE_GPU_CUDA +#include "gpu_fft_cuda.cpp" +#endif +#ifdef HAVE_GPU_HIP +#include "gpu_fft_hip.cpp" +#endif diff --git a/GX-PAW/common/src/17_gpu_toolbox/gpu_fft.cu b/GX-PAW/common/src/17_gpu_toolbox/gpu_fft.cu new file mode 100644 index 00000000..7128395e --- /dev/null +++ b/GX-PAW/common/src/17_gpu_toolbox/gpu_fft.cu @@ -0,0 +1,176 @@ +/* gpu_fft.cu */ + +/* + * Copyright (C) 2008-2024 ABINIT Group + * this file is distributed under the terms of the + * gnu general public license, see ~abinit/COPYING + * or http://www.gnu.org/copyleft/gpl.txt . + * for the initials of contributors, see ~abinit/doc/developers/contributors.txt. + * + * The main goal of this file is to contain cublas and magma encapsulation routines, + * that will be callable from fortran routines + * + */ + +#include +#include + +cufftHandle plan_fft; +static cudaStream_t stream_compute; + +//! utility function to select eigen type +static cufftType select_cufft_type(const int fftType_int) +{ + switch(fftType_int){ + case(CUFFT_R2C): return CUFFT_R2C; + case(CUFFT_C2R): return CUFFT_C2R; + case(CUFFT_C2C): return CUFFT_C2C; + case(CUFFT_D2Z): return CUFFT_D2Z; + case(CUFFT_Z2D): return CUFFT_Z2D; + case(CUFFT_Z2Z): return CUFFT_Z2Z; + default: + fprintf(stderr, "Provided wrong enum value for FFT type: %d\n",fftType_int); + fflush(stderr); + abi_cabort(); + return CUFFT_R2C; + } +} + + +/*=========================================================================*/ +/* NAME + * gpu_fft_plan_many + * + * FUNCTION + * Initialize a FFT plan with custom dimension, strided and batch size. + * + * INPUTS + * rank Dimensionality of the transform (1, 2, or 3). + * n Array of size rank, describing the size of each dimension, + * n[0] being the size of the outermost and n[rank-1] innermost + * (contiguous) dimension of a transform. + * inembed Pointer of size rank that indicates the storage dimensions + * of the input data in memory. + * If set to NULL all other advanced data layout parameters are ignored. + * istride Indicates the distance between two successive input elements + * in the least significant (i.e., innermost) dimension + * idist Indicates the distance between the first element of two + * consecutive signals in a batch of the input data + * onembed Pointer of size rank that indicates the storage dimensions of + * the output data in memory. + * If set to NULL all other advanced data layout parameters are ignored. + * ostride Indicates the distance between two successive output elements in + * the output array in the least significant (i.e., innermost) dimension + * odist Indicates the distance between the first element of two + * consecutive signals in a batch of the output data + * type The transform data type + * (e.g., FFT_R2C for single precision real to complex) + * batch Batch size for this transform + */ +/*=========================================================================*/ + +extern "C" +void gpu_fft_plan_many_cpp(int *rank, int **n, int **inembed, + int *istride, int *idist, int **onembed, int *ostride, + int *odist, int *fft_type, int *batch){ + + assert(CUFFT_Z2Z==0x69 && "cuFFT_Type enum value mismatch !(CUDA update?)"); + assert(CUFFT_FORWARD==-1 && "cuFFT direction enum value mismatch (CUDA update?)"); + assert(CUFFT_INVERSE== 1 && "cuFFT direction enum value mismatch (CUDA update?)"); + + cufftType type = select_cufft_type(*fft_type); + CUDA_API_CHECK(cufftPlanMany( + &plan_fft, + *rank, + *n, + *inembed, + *istride, + *idist, + *onembed, + *ostride, + *odist, + type, + *batch)); + CUDA_API_CHECK( cudaStreamCreate(&stream_compute) ); + CUDA_API_CHECK( cufftSetStream(plan_fft,stream_compute) ); +} + + +/*=========================================================================*/ +/* NAME + * gpu_fft_stream_synchronize + * + * FUNCTION + * Wait for any FFT operations still running on stream + */ +/*=========================================================================*/ + +extern "C" void gpu_fft_stream_synchronize_cpp() +{ + CUDA_API_CHECK( cudaStreamSynchronize(stream_compute) ); +} + + +/*=========================================================================*/ +// NAME +// gpu_fft_plan_destroy +// +// FUNCTION +// Destroy FFT plan +// +/*=========================================================================*/ + +extern "C" +void gpu_fft_plan_destroy_cpp(void){ + CUDA_API_CHECK(cufftDestroy(plan_fft)); +} + + +/*=========================================================================*/ +/* NAME + * gpu_fft_exec_z2z + * + * FUNCTION + * Run a Fast Fourrier Transform on double-complex input and output + * + * INPUTS + * idata Pointer to the complex input data (in GPU memory) to transform + * odata Pointer to the complex output data (in GPU memory) + * direction The transform direction: FFT_FORWARD or FFT_INVERSE + * + * OUTPUT + * odata Contains the complex Fourier coefficients + */ +/*=========================================================================*/ + +extern "C" +void gpu_fft_exec_z2z_cpp(void **idata, void **odata, int *direction){ + + CUDA_API_CHECK(cufftExecZ2Z(plan_fft, (cufftDoubleComplex*) (*idata), + (cufftDoubleComplex*) (*odata), *direction)); +} + + +/*=========================================================================*/ +/* NAME + * gpu_fft_exec_c2c + * + * FUNCTION + * Run a Fast Fourrier Transform on float complex input and output + * + * INPUTS + * idata Pointer to the complex input data (in GPU memory) to transform + * odata Pointer to the complex output data (in GPU memory) + * direction The transform direction: FFT_FORWARD or FFT_INVERSE + * + * OUTPUT + * odata Contains the complex Fourier coefficients + */ +/*=========================================================================*/ + +extern "C" +void gpu_fft_exec_c2c_cpp(void **idata, void **odata, int *direction){ + CUDA_API_CHECK(cufftExecC2C(plan_fft, (cufftComplex*) *idata, + (cufftComplex*) *odata, *direction)); +} + diff --git a/GX-PAW/common/src/17_gpu_toolbox/gpu_fft.h b/GX-PAW/common/src/17_gpu_toolbox/gpu_fft.h new file mode 100644 index 00000000..de35e740 --- /dev/null +++ b/GX-PAW/common/src/17_gpu_toolbox/gpu_fft.h @@ -0,0 +1,21 @@ +#ifndef ABINIT_SHARED_COMMON_SRC_17_GPU_FFT_H +#define ABINIT_SHARED_COMMON_SRC_17_GPU_FFT_H + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#ifdef HAVE_GPU_CUDA +#include +#include +extern cufftHandle plan_fft; +#endif + +#ifdef HAVE_GPU_HIP +#include +#include +extern hipfftHandle plan_fft; +#endif + +#endif // ABINIT_SHARED_COMMON_SRC_17_GPU_FFT_H + diff --git a/GX-PAW/common/src/17_gpu_toolbox/gpu_fft_cuda.cpp b/GX-PAW/common/src/17_gpu_toolbox/gpu_fft_cuda.cpp new file mode 100644 index 00000000..7128395e --- /dev/null +++ b/GX-PAW/common/src/17_gpu_toolbox/gpu_fft_cuda.cpp @@ -0,0 +1,176 @@ +/* gpu_fft.cu */ + +/* + * Copyright (C) 2008-2024 ABINIT Group + * this file is distributed under the terms of the + * gnu general public license, see ~abinit/COPYING + * or http://www.gnu.org/copyleft/gpl.txt . + * for the initials of contributors, see ~abinit/doc/developers/contributors.txt. + * + * The main goal of this file is to contain cublas and magma encapsulation routines, + * that will be callable from fortran routines + * + */ + +#include +#include + +cufftHandle plan_fft; +static cudaStream_t stream_compute; + +//! utility function to select eigen type +static cufftType select_cufft_type(const int fftType_int) +{ + switch(fftType_int){ + case(CUFFT_R2C): return CUFFT_R2C; + case(CUFFT_C2R): return CUFFT_C2R; + case(CUFFT_C2C): return CUFFT_C2C; + case(CUFFT_D2Z): return CUFFT_D2Z; + case(CUFFT_Z2D): return CUFFT_Z2D; + case(CUFFT_Z2Z): return CUFFT_Z2Z; + default: + fprintf(stderr, "Provided wrong enum value for FFT type: %d\n",fftType_int); + fflush(stderr); + abi_cabort(); + return CUFFT_R2C; + } +} + + +/*=========================================================================*/ +/* NAME + * gpu_fft_plan_many + * + * FUNCTION + * Initialize a FFT plan with custom dimension, strided and batch size. + * + * INPUTS + * rank Dimensionality of the transform (1, 2, or 3). + * n Array of size rank, describing the size of each dimension, + * n[0] being the size of the outermost and n[rank-1] innermost + * (contiguous) dimension of a transform. + * inembed Pointer of size rank that indicates the storage dimensions + * of the input data in memory. + * If set to NULL all other advanced data layout parameters are ignored. + * istride Indicates the distance between two successive input elements + * in the least significant (i.e., innermost) dimension + * idist Indicates the distance between the first element of two + * consecutive signals in a batch of the input data + * onembed Pointer of size rank that indicates the storage dimensions of + * the output data in memory. + * If set to NULL all other advanced data layout parameters are ignored. + * ostride Indicates the distance between two successive output elements in + * the output array in the least significant (i.e., innermost) dimension + * odist Indicates the distance between the first element of two + * consecutive signals in a batch of the output data + * type The transform data type + * (e.g., FFT_R2C for single precision real to complex) + * batch Batch size for this transform + */ +/*=========================================================================*/ + +extern "C" +void gpu_fft_plan_many_cpp(int *rank, int **n, int **inembed, + int *istride, int *idist, int **onembed, int *ostride, + int *odist, int *fft_type, int *batch){ + + assert(CUFFT_Z2Z==0x69 && "cuFFT_Type enum value mismatch !(CUDA update?)"); + assert(CUFFT_FORWARD==-1 && "cuFFT direction enum value mismatch (CUDA update?)"); + assert(CUFFT_INVERSE== 1 && "cuFFT direction enum value mismatch (CUDA update?)"); + + cufftType type = select_cufft_type(*fft_type); + CUDA_API_CHECK(cufftPlanMany( + &plan_fft, + *rank, + *n, + *inembed, + *istride, + *idist, + *onembed, + *ostride, + *odist, + type, + *batch)); + CUDA_API_CHECK( cudaStreamCreate(&stream_compute) ); + CUDA_API_CHECK( cufftSetStream(plan_fft,stream_compute) ); +} + + +/*=========================================================================*/ +/* NAME + * gpu_fft_stream_synchronize + * + * FUNCTION + * Wait for any FFT operations still running on stream + */ +/*=========================================================================*/ + +extern "C" void gpu_fft_stream_synchronize_cpp() +{ + CUDA_API_CHECK( cudaStreamSynchronize(stream_compute) ); +} + + +/*=========================================================================*/ +// NAME +// gpu_fft_plan_destroy +// +// FUNCTION +// Destroy FFT plan +// +/*=========================================================================*/ + +extern "C" +void gpu_fft_plan_destroy_cpp(void){ + CUDA_API_CHECK(cufftDestroy(plan_fft)); +} + + +/*=========================================================================*/ +/* NAME + * gpu_fft_exec_z2z + * + * FUNCTION + * Run a Fast Fourrier Transform on double-complex input and output + * + * INPUTS + * idata Pointer to the complex input data (in GPU memory) to transform + * odata Pointer to the complex output data (in GPU memory) + * direction The transform direction: FFT_FORWARD or FFT_INVERSE + * + * OUTPUT + * odata Contains the complex Fourier coefficients + */ +/*=========================================================================*/ + +extern "C" +void gpu_fft_exec_z2z_cpp(void **idata, void **odata, int *direction){ + + CUDA_API_CHECK(cufftExecZ2Z(plan_fft, (cufftDoubleComplex*) (*idata), + (cufftDoubleComplex*) (*odata), *direction)); +} + + +/*=========================================================================*/ +/* NAME + * gpu_fft_exec_c2c + * + * FUNCTION + * Run a Fast Fourrier Transform on float complex input and output + * + * INPUTS + * idata Pointer to the complex input data (in GPU memory) to transform + * odata Pointer to the complex output data (in GPU memory) + * direction The transform direction: FFT_FORWARD or FFT_INVERSE + * + * OUTPUT + * odata Contains the complex Fourier coefficients + */ +/*=========================================================================*/ + +extern "C" +void gpu_fft_exec_c2c_cpp(void **idata, void **odata, int *direction){ + CUDA_API_CHECK(cufftExecC2C(plan_fft, (cufftComplex*) *idata, + (cufftComplex*) *odata, *direction)); +} + diff --git a/GX-PAW/common/src/17_gpu_toolbox/gpu_fft_hip.cpp b/GX-PAW/common/src/17_gpu_toolbox/gpu_fft_hip.cpp new file mode 100644 index 00000000..b5b32878 --- /dev/null +++ b/GX-PAW/common/src/17_gpu_toolbox/gpu_fft_hip.cpp @@ -0,0 +1,176 @@ +/* gpu_fft.cu */ + +/* + * Copyright (C) 2008-2024 ABINIT Group + * this file is distributed under the terms of the + * gnu general public license, see ~abinit/COPYING + * or http://www.gnu.org/copyleft/gpl.txt . + * for the initials of contributors, see ~abinit/doc/developers/contributors.txt. + * + * The main goal of this file is to contain cublas and magma encapsulation routines, + * that will be callable from fortran routines + * + */ + +#include +#include + +hipfftHandle plan_fft; +static hipStream_t stream_compute; + +//! utility function to select eigen type +static hipfftType select_hipfft_type(const int fftType_int) +{ + switch(fftType_int){ + case(HIPFFT_R2C): return HIPFFT_R2C; + case(HIPFFT_C2R): return HIPFFT_C2R; + case(HIPFFT_C2C): return HIPFFT_C2C; + case(HIPFFT_D2Z): return HIPFFT_D2Z; + case(HIPFFT_Z2D): return HIPFFT_Z2D; + case(HIPFFT_Z2Z): return HIPFFT_Z2Z; + default: + fprintf(stderr, "Provided wrong enum value for FFT type: %d\n",fftType_int); + fflush(stderr); + abi_cabort(); + return HIPFFT_R2C; + } +} + + +/*=========================================================================*/ +/* NAME + * gpu_fft_plan_many + * + * FUNCTION + * Initialize a FFT plan with custom dimension, strided and batch size. + * + * INPUTS + * rank Dimensionality of the transform (1, 2, or 3). + * n Array of size rank, describing the size of each dimension, + * n[0] being the size of the outermost and n[rank-1] innermost + * (contiguous) dimension of a transform. + * inembed Pointer of size rank that indicates the storage dimensions + * of the input data in memory. + * If set to NULL all other advanced data layout parameters are ignored. + * istride Indicates the distance between two successive input elements + * in the least significant (i.e., innermost) dimension + * idist Indicates the distance between the first element of two + * consecutive signals in a batch of the input data + * onembed Pointer of size rank that indicates the storage dimensions of + * the output data in memory. + * If set to NULL all other advanced data layout parameters are ignored. + * ostride Indicates the distance between two successive output elements in + * the output array in the least significant (i.e., innermost) dimension + * odist Indicates the distance between the first element of two + * consecutive signals in a batch of the output data + * type The transform data type + * (e.g., FFT_R2C for single precision real to complex) + * batch Batch size for this transform + */ +/*=========================================================================*/ + +extern "C" +void gpu_fft_plan_many_cpp(int *rank, int **n, int **inembed, + int *istride, int *idist, int **onembed, int *ostride, + int *odist, int *fft_type, int *batch){ + + assert(HIPFFT_Z2Z==0x69 && "hipFFT_Type enum value mismatch !(HIP update?)"); + assert(HIPFFT_FORWARD==-1 && "hipFFT direction enum value mismatch (HIP update?)"); + assert(HIPFFT_BACKWARD == 1 && "hipFFT direction enum value mismatch (HIP update?)"); + + hipfftType type = select_hipfft_type(*fft_type); + HIP_API_CHECK(hipfftPlanMany( + &plan_fft, + *rank, + *n, + *inembed, + *istride, + *idist, + *onembed, + *ostride, + *odist, + type, + *batch)); + HIP_API_CHECK( hipStreamCreate(&stream_compute) ); + HIP_API_CHECK( hipfftSetStream(plan_fft,stream_compute) ); +} + + +/*=========================================================================*/ +/* NAME + * gpu_fft_stream_synchronize + * + * FUNCTION + * Wait for any FFT operations still running on stream + */ +/*=========================================================================*/ + +extern "C" void gpu_fft_stream_synchronize_cpp() +{ + HIP_API_CHECK( hipStreamSynchronize(stream_compute) ); +} + + +/*=========================================================================*/ +// NAME +// gpu_fft_plan_destroy +// +// FUNCTION +// Destroy FFT plan +// +/*=========================================================================*/ + +extern "C" +void gpu_fft_plan_destroy_cpp(void){ + HIP_API_CHECK(hipfftDestroy(plan_fft)); +} + + +/*=========================================================================*/ +/* NAME + * gpu_fft_exec_z2z + * + * FUNCTION + * Run a Fast Fourrier Transform on double-complex input and output + * + * INPUTS + * idata Pointer to the complex input data (in GPU memory) to transform + * odata Pointer to the complex output data (in GPU memory) + * direction The transform direction: FFT_FORWARD or FFT_INVERSE + * + * OUTPUT + * odata Contains the complex Fourier coefficients + */ +/*=========================================================================*/ + +extern "C" +void gpu_fft_exec_z2z_cpp(void **idata, void **odata, int *direction){ + + HIP_API_CHECK(hipfftExecZ2Z(plan_fft, (hipfftDoubleComplex*) (*idata), + (hipfftDoubleComplex*) (*odata), *direction)); +} + + +/*=========================================================================*/ +/* NAME + * gpu_fft_exec_c2c + * + * FUNCTION + * Run a Fast Fourrier Transform on float complex input and output + * + * INPUTS + * idata Pointer to the complex input data (in GPU memory) to transform + * odata Pointer to the complex output data (in GPU memory) + * direction The transform direction: FFT_FORWARD or FFT_INVERSE + * + * OUTPUT + * odata Contains the complex Fourier coefficients + */ +/*=========================================================================*/ + +extern "C" +void gpu_fft_exec_c2c_cpp(void **idata, void **odata, int *direction){ + HIP_API_CHECK(hipfftExecC2C(plan_fft, (hipfftComplex*) *idata, + (hipfftComplex*) *odata, *direction)); +} + diff --git a/GX-PAW/common/src/17_gpu_toolbox/gpu_linalg.cpp b/GX-PAW/common/src/17_gpu_toolbox/gpu_linalg.cpp new file mode 100644 index 00000000..fc9c77aa --- /dev/null +++ b/GX-PAW/common/src/17_gpu_toolbox/gpu_linalg.cpp @@ -0,0 +1,23 @@ +/* gpu_linalg.cpp */ + +/* + * Copyright (C) 2008-2024 ABINIT Group (MSarraute) + * this file is distributed under the terms of the + * gnu general public license, see ~abinit/COPYING + * or http://www.gnu.org/copyleft/gpl.txt . + * for the initials of contributors, see ~abinit/doc/developers/contributors.txt. + * + * The main goal of this file is to contain GPU linear algebra encapsulation routines, + * that will be callable from fortran routines, by pointing to the relevant + * GPU runtime libraries (CUDA for NVIDIA targets, HIP for AMD targets). + * + */ + +#include + +#ifdef HAVE_GPU_CUDA +#include "gpu_linalg_cuda.cpp" +#endif +#ifdef HAVE_GPU_HIP +#include "gpu_linalg_hip.cpp" +#endif diff --git a/GX-PAW/common/src/17_gpu_toolbox/gpu_linalg.h b/GX-PAW/common/src/17_gpu_toolbox/gpu_linalg.h new file mode 100644 index 00000000..d3629845 --- /dev/null +++ b/GX-PAW/common/src/17_gpu_toolbox/gpu_linalg.h @@ -0,0 +1,27 @@ +#ifndef ABINIT_SHARED_COMMON_SRC_17_GPU_LINALG_H +#define ABINIT_SHARED_COMMON_SRC_17_GPU_LINALG_H + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#ifdef HAVE_GPU_CUDA +#include +#include +#include + +extern cublasHandle_t cublas_handle; +extern cusolverDnHandle_t cusolverDn_handle; +#endif + +#ifdef HAVE_GPU_HIP +#include +#include +#include +#include + +extern hipblasHandle_t hip_handle; +extern hipsolverDnHandle_t hipsolverDn_handle; +#endif + +#endif // ABINIT_SHARED_COMMON_SRC_17_GPU_LINALG_H diff --git a/GX-PAW/common/src/17_gpu_toolbox/gpu_linalg_cuda.cpp b/GX-PAW/common/src/17_gpu_toolbox/gpu_linalg_cuda.cpp new file mode 100644 index 00000000..37f11b6a --- /dev/null +++ b/GX-PAW/common/src/17_gpu_toolbox/gpu_linalg_cuda.cpp @@ -0,0 +1,856 @@ +/* gpu_linalg.cu */ + +/* + * Copyright (C) 2008-2024 ABINIT Group (MMancini,FDahm) + * this file is distributed under the terms of the + * gnu general public license, see ~abinit/COPYING + * or http://www.gnu.org/copyleft/gpl.txt . + * for the initials of contributors, see ~abinit/doc/developers/contributors.txt. + * + * The main goal of this file is to contain cublas and magma encapsulation routines, + * that will be callable from fortran routines + * + */ + +#include + +cublasHandle_t cublas_handle; +cusolverDnHandle_t cusolverDn_handle; +static cudaStream_t stream_compute; + +//! utility function for compatiblity between cublas v1/v2 API +cublasOperation_t select_cublas_op(const char *c) +{ + cublasOperation_t op; + + if (*c == 'n' or *c == 'N') + op = CUBLAS_OP_N; + else if (*c == 't' or *c == 'T') + op = CUBLAS_OP_T; + else if (*c == 'c' or *c == 'C') + op = CUBLAS_OP_C; + else + printf("CUBLAS API error, character can't be converted to a valid cublas operation !\n"); + + return op; +} + +//! utility function for compatiblity between cublas v1/v2 API +cublasSideMode_t select_cublas_side(const char *c) +{ + cublasSideMode_t mode; + + if (*c == 'l' or *c == 'L') + mode = CUBLAS_SIDE_LEFT; + else if (*c == 'r' or *c == 'R') + mode = CUBLAS_SIDE_RIGHT; + else + printf("CUBLAS API error, character can't be converted to a valid cublas side mode !\n"); + + return mode; +} + +//! utility function for compatiblity between cublas v1/v2 API +cublasFillMode_t select_cublas_fill_mode(const char *c) +{ + cublasFillMode_t mode; + + if (*c == 'u' or *c == 'U') + mode = CUBLAS_FILL_MODE_UPPER; + else if (*c == 'l' or *c == 'L') + mode = CUBLAS_FILL_MODE_LOWER; + else + printf("CUBLAS API error, character can't be converted to a valid cublas fill mode !\n"); + + return mode; +} + +//! utility function for compatiblity between cublas v1/v2 API +cublasDiagType_t select_cublas_diag_type(const char *c) +{ + cublasDiagType_t diag; + + if (*c == 'n' or *c == 'N') + diag = CUBLAS_DIAG_NON_UNIT; + else if (*c == 'u' or *c == 'U') + diag = CUBLAS_DIAG_UNIT; + else + printf("CUBLAS API error, character can't be converted to a valid cublas diag type !\n"); + + return diag; +} + +//! utility function to select eigen type +cusolverEigType_t select_eigen_type(const int eigType_int) +{ + cusolverEigType_t eigType = CUSOLVER_EIG_TYPE_1; + + if (eigType_int < 1 or eigType_int > 3) + printf("CUSOLVER API error, input can't be converted to a valid cusolver eigen type !\n"); + else + eigType = static_cast(eigType_int); + + return eigType; +} + +//! utility function to select eigen mode +cusolverEigMode_t select_eigen_mode(const char* c) +{ + + cusolverEigMode_t eigMode = CUSOLVER_EIG_MODE_NOVECTOR; + + if (*c =='n' or *c=='N') + eigMode = CUSOLVER_EIG_MODE_NOVECTOR; + else if (*c =='v' or *c=='V') + eigMode = CUSOLVER_EIG_MODE_VECTOR; + else + printf("CUSOLVER API error, character can't be converted to a valid eigen mode !\n"); + + return eigMode; +} + + + +/*=========================================================================*/ +// NAME +// gpu_linalg_init +// +// FUNCTION +// Initialisation of linalg environnement on GPU +// +/*=========================================================================*/ + +extern "C" void gpu_linalg_init_() +{ + CUDA_API_CHECK( cublasCreate(&cublas_handle) ); + CUDA_API_CHECK( cusolverDnCreate(&cusolverDn_handle) ); + CUDA_API_CHECK( cudaStreamCreate(&stream_compute) ); + CUDA_API_CHECK( cusolverDnSetStream(cusolverDn_handle,stream_compute) ); + CUDA_API_CHECK( cublasSetStream(cublas_handle,stream_compute) ); +} + +/*=========================================================================*/ +// NAME +// gpu_linalg_shutdown +// +// FUNCTION +// Close linalg environnement on GPU +// +/*=========================================================================*/ + +extern "C" void gpu_linalg_shutdown_() +{ + CUDA_API_CHECK( cublasDestroy(cublas_handle) ); + CUDA_API_CHECK( cusolverDnDestroy(cusolverDn_handle) ); + CUDA_API_CHECK( cudaStreamDestroy(stream_compute) ); +} + +/*=========================================================================*/ +// NAME +// gpu_linalg_stream_synchronize +// +// FUNCTION +// Wait for any linalg operations still running on stream +// +/*=========================================================================*/ + +extern "C" void gpu_linalg_stream_synchronize_() +{ + CUDA_API_CHECK( cudaStreamSynchronize(stream_compute) ); +} + +/*=========================================================================*/ +// NAME +// gpu_xgemm +// +// FUNCTION +// Compute a scalar-matrix-matrix product and return a scalar-matrix product on GPU +// c = alpha * op(a) * op(b) + beta * c +// +// INPUTS +// cplx = 1 if real 2 if complex +// transa= from of op(a) to be used in the matrix multiplication +// transb= from of op(b) to be used in the matrix multiplication +// m = number of rows of the matrix op(a) and of the matrix c +// n = number of rows of the matrix op(b) and the number of columns of the matrix c +// k = number of columns of the matrix op(a) and the number of rows of the matrix op(b) +// alpha = alpha scalar coefficient for matrix op(a) +// a_gpu = pointer to gpu memory location of matrix a +// lda = first dimension of a +// b_gpu = pointer to gpu memory location of matrix b +// ldb = first dimension of b +// beta = beta scalar coefficient for matrix c +// c_gpu = pointer to gpu memory location of matrix c +// ldc = first dimension of c +// +// OUTPUT +// c_gpu = c_gpu matrix +// +/*=========================================================================*/ + +extern "C" void gpu_xgemm_(int* cplx, char *transA, char *transB, int *N, int *M, int *K, + cuDoubleComplex *alpha, + void **A_ptr, int *lda, void** B_ptr, int *ldb, + cuDoubleComplex *beta, void** C_ptr, int *ldc) +{ + + cublasOperation_t opA = select_cublas_op(transA); + cublasOperation_t opB = select_cublas_op(transB); + + (*cplx==1)? + CUDA_API_CHECK( cublasDgemm(cublas_handle, opA, opB, *N, *M, *K, &((*alpha).x), + (double *)(*A_ptr), *lda, + (double *)(*B_ptr), *ldb, + &((*beta).x), + (double *)(*C_ptr), *ldc)) : + CUDA_API_CHECK( cublasZgemm(cublas_handle, opA, opB, *N, *M, *K, alpha, + (cuDoubleComplex *)(*A_ptr), *lda, + (cuDoubleComplex *)(*B_ptr), *ldb, + beta, + (cuDoubleComplex *)(*C_ptr), *ldc)); + +} // gpu_xgemm + +/*=========================================================================*/ +// NAME +// gpu_xgemm_strided_batched +// +// FUNCTION +// Compute a batched scalar-matrix-matrix product and return a scalar-matrix product on GPU. +// Meant to be used on non-contiguous matrixes with data is uniformly split in the same number of batches in each matrix. +// c = alpha * op(a) * op(b) + beta * c +// +// INPUTS +// cplx = 1 if real 2 if complex +// transa = from of op(a) to be used in the matrix multiplication +// transb = from of op(b) to be used in the matrix multiplication +// m = number of rows of the matrix op(a) and of the matrix c +// n = number of rows of the matrix op(b) and the number of columns of the matrix c +// k = number of columns of the matrix op(a) and the number of rows of the matrix op(b) +// alpha = alpha scalar coefficient for matrix op(a) +// a_gpu = pointer to gpu memory location of matrix a +// lda = first dimension of a +// strideC = stride between each batch in matrix a +// b_gpu = pointer to gpu memory location of matrix b +// ldb = first dimension of b +// strideC = stride between each batch in matrix b +// beta = beta scalar coefficient for matrix c +// c_gpu = pointer to gpu memory location of matrix c +// ldc = first dimension of c +// strideC = stride between each batch in matrix c +// batchCount = number of batches in any matrix +// +// OUTPUT +// c_gpu = c_gpu matrix +// +/*=========================================================================*/ + +extern "C" void gpu_xgemm_strided_batched_(int* cplx, char *transA, char *transB, + int *N, int *M, int *K, + cuDoubleComplex *alpha, + void **A_ptr, int *lda, int *strideA, + void** B_ptr, int *ldb, int *strideB, + cuDoubleComplex *beta, + void** C_ptr, int *ldc, int *strideC, int *batchCount) +{ + + cublasOperation_t opA = select_cublas_op(transA); + cublasOperation_t opB = select_cublas_op(transB); + + (*cplx==1)? + CUDA_API_CHECK( cublasDgemmStridedBatched(cublas_handle, opA, opB, + *N, *M, *K, &((*alpha).x), + (double *)(*A_ptr), *lda, *strideA, + (double *)(*B_ptr), *ldb, *strideB, + &((*beta).x), + (double *)(*C_ptr), *ldc, *strideC, *batchCount)) : + CUDA_API_CHECK( cublasZgemmStridedBatched(cublas_handle, opA, opB, + *N, *M, *K, alpha, + (cuDoubleComplex *)(*A_ptr), *lda, *strideA, + (cuDoubleComplex *)(*B_ptr), *ldb, *strideB, + beta, + (cuDoubleComplex *)(*C_ptr), *ldc, *strideC, *batchCount)); +} // gpu_xgemm_strided_batched + +/*=========================================================================*/ +// NAME +// gpu_xsymm +// +// FUNCTION +// Compute a symmetric scalar-matrix-matrix product and return a scalar-matrix product on GPU +// c = alpha * op(a) * op(b) + beta * c , if side == L +// c = alpha * op(b) * op(a) + beta * c , if side == R +// +// INPUTS +// cplx = 1 if real 2 if complex +// side = Specifies whether op(a) appears on the left or right of x for +// the operation to be performed as follows: +// L or l op(a)*x = alpha*b +// R or r x*op(a) = alpha*b +// uplo = Specifies whether the matrix a is an upper or lower triangular +// matrix as follows: +// U or u Matrix a is an upper triangular matrix. +// L or l Matrix a is a lower triangular matrix +// m = number of rows of the matrix op(a) and of the matrix c +// n = number of rows of the matrix op(b) and the number of columns of the matrix c +// k = number of columns of the matrix op(a) and the number of rows of the matrix op(b) +// alpha = alpha scalar coefficient for matrix op(a) +// a_gpu = pointer to gpu memory location of matrix a +// lda = first dimension of a +// b_gpu = pointer to gpu memory location of matrix b +// ldb = first dimension of b +// beta = beta scalar coefficient for matrix c +// c_gpu = pointer to gpu memory location of matrix c +// ldc = first dimension of c +// +// OUTPUT +// c_gpu = c_gpu matrix +// +/*=========================================================================*/ + +extern "C" void gpu_xsymm_(int* cplx, char *side, char *uplo, int *N, int *M, + cuDoubleComplex *alpha, + void **A_ptr, int *lda, void** B_ptr, int *ldb, + cuDoubleComplex *beta, void** C_ptr, int *ldc) +{ + + cublasSideMode_t sideMode = select_cublas_side(side); + cublasFillMode_t fillMode = select_cublas_fill_mode(uplo); + + (*cplx==1)? + CUDA_API_CHECK( cublasDsymm(cublas_handle, sideMode, fillMode, *N, *M, &((*alpha).x), + (double *)(*A_ptr), *lda, + (double *)(*B_ptr), *ldb, + &((*beta).x), + (double *)(*C_ptr), *ldc)) : + CUDA_API_CHECK( cublasZsymm(cublas_handle, sideMode, fillMode, *N, *M, alpha, + (cuDoubleComplex *)(*A_ptr), *lda, + (cuDoubleComplex *)(*B_ptr), *ldb, + beta, + (cuDoubleComplex *)(*C_ptr), *ldc)); +} // gpu_xsymm_omp + +/*=========================================================================*/ +// NAME +// gpu_xhemm +// +// FUNCTION +// Compute a Hermitian scalar-matrix-matrix product and return a scalar-matrix product on GPU +// c = alpha * op(a) * op(b) + beta * c , if side == L +// c = alpha * op(b) * op(a) + beta * c , if side == R +// +// INPUTS +// cplx = 1 if real 2 if complex +// side = Specifies whether op(a) appears on the left or right of x for +// the operation to be performed as follows: +// L or l op(a)*x = alpha*b +// R or r x*op(a) = alpha*b +// uplo = Specifies whether the matrix a is an upper or lower triangular +// matrix as follows: +// U or u Matrix a is an upper triangular matrix. +// L or l Matrix a is a lower triangular matrix +// m = number of rows of the matrix op(a) and of the matrix c +// n = number of rows of the matrix op(b) and the number of columns of the matrix c +// k = number of columns of the matrix op(a) and the number of rows of the matrix op(b) +// alpha = alpha scalar coefficient for matrix op(a) +// a_gpu = pointer to gpu memory location of matrix a +// lda = first dimension of a +// b_gpu = pointer to gpu memory location of matrix b +// ldb = first dimension of b +// beta = beta scalar coefficient for matrix c +// c_gpu = pointer to gpu memory location of matrix c +// ldc = first dimension of c +// +// OUTPUT +// c_gpu = c_gpu matrix +// +/*=========================================================================*/ + +extern "C" void gpu_zhemm_(char *side, char *uplo, int *N, int *M, + cuDoubleComplex *alpha, + void **A_ptr, int *lda, void** B_ptr, int *ldb, + cuDoubleComplex *beta, void** C_ptr, int *ldc) +{ + + cublasSideMode_t sideMode = select_cublas_side(side); + cublasFillMode_t fillMode = select_cublas_fill_mode(uplo); + + CUDA_API_CHECK( cublasZhemm(cublas_handle, sideMode, fillMode, *N, *M, alpha, + (cuDoubleComplex *)(*A_ptr), *lda, + (cuDoubleComplex *)(*B_ptr), *ldb, + beta, + (cuDoubleComplex *)(*C_ptr), *ldc)); +} // gpu_zhemm_omp + +/*=========================================================================*/ +// NAME +// gpu_xtrsm +// +// FUNCTION +// Solves a matrix equation (one matrix operand is triangular) on GPU. +// The xtrsm routines solve one of the following matrix equations +// op(a)*x = alpha*b +// or +// x*op(a) = alpha*b, +// +// INPUTS +// cplx= 1 if real 2 if complex +// side= Specifies whether op(a) appears on the left or right of x for +// the operation to be performed as follows: +// L or l op(a)*x = alpha*b +// R or r x*op(a) = alpha*b +// uplo= Specifies whether the matrix a is an upper or lower triangular +// matrix as follows: +// U or u Matrix a is an upper triangular matrix. +// L or l Matrix a is a lower triangular matrix +// transa= Specifies the form of op(a) to be used in the matrix +// multiplication as follows: +// N or n op(a) = a +// T or t op(a) = a' +// C or c op(a) = conjg(a') +// diag= Specifies whether or not a is unit triangular as follows: +// U or u Matrix a is assumed to be unit triangular. +// N or n Matrix a is not assumed to be unit triangular. +// m= Specifies the number of rows of b. The value of m must be at least zero +// n= Specifies the number of columns of b. The value of n must be at least zero +// alpha= Specifies the scalar alpha. When alpha is zero, then a is not referenced and b +// need not be set before entry. +// a_gpu = pointer to gpu memory location of array a, DIMENSION (lda, k), where k is m when side = 'L' or 'l' and is n +// when side = 'R' or 'r'. +// lda= Specifies the first dimension of a as declared in the calling +// (sub)program. When side = 'L' or 'l', then lda must be at least max(1, +// m), when side = 'R' or 'r', then lda must be at least max(1, n). +// b_gpu = pointer to gpu memory location of b Array, DIMENSION (ldb,n). Before entry, the leading m-by-n part of the array +// b must contain the right-hand side matrix b. +// ldb= Specifies the first dimension of b as declared in the calling +// (sub)program. The value of ldb must be at least max(1, m). +// +// OUTPUT +// b_gpu +/*=========================================================================*/ + +extern "C" void gpu_xtrsm_(int* cplx, char *side, char *uplo, char *transA, char *diag, + int *N, int *M, cuDoubleComplex *alpha, + void **A_ptr, int *ldA, + void** B_ptr, int *ldB) +{ + + cublasSideMode_t sideMode = select_cublas_side(side); + cublasFillMode_t fillMode = select_cublas_fill_mode(uplo); + cublasDiagType_t diagType = select_cublas_diag_type(diag); + cublasOperation_t opA = select_cublas_op(transA); + + (*cplx==1) ? + cublasDtrsm(cublas_handle, sideMode, fillMode, opA, diagType, + *N, *M, &((*alpha).x), + (double *)(*A_ptr), *ldA, + (double *)(*B_ptr), *ldB): + cublasZtrsm(cublas_handle, sideMode, fillMode, opA, diagType, + *N, *M, alpha, + (cuDoubleComplex *)(*A_ptr), *ldA, + (cuDoubleComplex *)(*B_ptr), *ldB); +} // gpu_xtrsm_ + +/*=========================================================================*/ +// NAME +// gpu_xaxpy +// +// FUNCTION +// Compute blas-1 AXPY on GPU +// y = alpha * x + y +// +// INPUTS +// cplx = 1 if real 2 if complex +// alpha = scalar complex value (when doing computation with real value, only the real part is used) +// x = input vector +// incrx = increment between two consecutive values of x +// y = in/out vector +// incry = increment between two consecutive values of y +// +// OUTPUT +// y +/*=========================================================================*/ + +extern "C" void gpu_xaxpy_(int* cplx, int *N, + cuDoubleComplex *alpha, + void **X_ptr, int *incrx, void** Y_ptr, int *incry) +{ + + CUDA_API_CHECK( (*cplx==1) ? + cublasDaxpy(cublas_handle,*N, + &((*alpha).x), + (double *)(*X_ptr), *incrx, + (double *)(*Y_ptr), *incry) : + cublasZaxpy(cublas_handle, *N, + alpha, + (cuDoubleComplex *)(*X_ptr), *incrx, + (cuDoubleComplex *)(*Y_ptr), *incry) ); +} // gpu_xaxpy_ + +/*=========================================================================*/ +// NAME +// gpu_xcopy +// +// FUNCTION +// Compute blas-1 COPY on GPU +// y = x (copy x into y) +// +// INPUTS / OUTPUTS +// cplx = 1 if real 2 if complex +// N = input vector size +// x = input vector +// incrx = increment between two consecutive values of x +// y = output vector +// incry = increment between two consecutive values of y +// +/*=========================================================================*/ + +extern "C" void gpu_xcopy_(int* cplx, int *N, + void **X_ptr, int *incrx, + void **Y_ptr, int *incry) +{ + + CUDA_API_CHECK( (*cplx==1) ? + cublasDcopy(cublas_handle,*N, + (const double *)(*X_ptr), *incrx, + ( double *)(*Y_ptr), *incry) : + cublasZcopy(cublas_handle, *N, + (const cuDoubleComplex *)(*X_ptr), *incrx, + ( cuDoubleComplex *)(*Y_ptr), *incry) ); +} // gpu_xcopy_ + +/*=========================================================================*/ +// NAME +// gpu_xscal +// +// FUNCTION +// Compute blas-1 SCAL on GPU +// x = alpha * x +// +// INPUTS +// cplx = 1 if real 2 if complex +// N = vector size +// alpha = scalar complex value (when doing computation with real value, only the real part is used) +// x = input/output vector +// incrx = increment between two consecutive values of x +// +// OUTPUT +// x +/*=========================================================================*/ + +extern "C" void gpu_xscal_(int* cplx, int *N, + cuDoubleComplex *alpha, + void **X_ptr, int *incrx) +{ + + CUDA_API_CHECK( (*cplx==1) ? + cublasDscal(cublas_handle,*N, + &((*alpha).x), + (double *)(*X_ptr), *incrx) : + cublasZscal(cublas_handle, *N, + alpha, + (cuDoubleComplex *)(*X_ptr), *incrx) ); +} // gpu_xscal_ + +/*=========================================================================*/ +// NAME +// gpu_xpotrf +// +// FUNCTION +// Compute a LAPACK SYGVD operation on GPU +// computes the Cholesky factorization of a Hermitian positive-definite matrix +// +// See LAPACK doc in reference implementation: +// https://github.com/Reference-LAPACK/lapack/blob/master/SRC/dpotrf.f +// +// INPUTS +// uplo = character, 'u' or 'l' +// n = matrix size +// A_ptr = pointer to gpu memory location of matrix A +// lda = leading dimension of matrix A +// work_ptr = +// lwork = +// devInfo = +// +/*=========================================================================*/ + +extern "C" void gpu_xpotrf_(const int* cplx, + const char* uplo, + const int* n, + void **A_ptr, + const int *lda, + void** work_ptr, + int* lwork, + int* info) +{ + + const cublasFillMode_t fillMode = select_cublas_fill_mode(uplo); + + int* devInfo; + CUDA_API_CHECK( cudaMalloc( (void**) &devInfo, 1*sizeof(int)) ); + + if (*cplx == 1) + { + CUDA_API_CHECK( cusolverDnDpotrf(cusolverDn_handle, + fillMode, *n, + (double*)(*A_ptr), *lda, + (double*)(*work_ptr), + *lwork, devInfo) ); + } + else + { + CUDA_API_CHECK( cusolverDnZpotrf(cusolverDn_handle, + fillMode, *n, + (cuDoubleComplex*)(*A_ptr), *lda, + (cuDoubleComplex*)(*work_ptr), + *lwork, devInfo) ); + } + + CUDA_API_CHECK( cudaMemcpy(info, devInfo, 1*sizeof(int), cudaMemcpyDefault) ); + + CUDA_API_CHECK( cudaFree(devInfo) ); + +} // gpu_xpotrf_ + +extern "C" void gpu_xpotrf_buffersize_(const int* cplx, + const char* uplo, + const int* n, + void **A_ptr, + const int *lda, + int* lwork) +{ + + const cublasFillMode_t fillMode = select_cublas_fill_mode(uplo); + + if (*cplx == 1) + { + CUDA_API_CHECK( cusolverDnDpotrf_bufferSize(cusolverDn_handle, + fillMode, *n, + (double*)(*A_ptr), *lda, + lwork) ); + } + else + { + CUDA_API_CHECK( cusolverDnZpotrf_bufferSize(cusolverDn_handle, + fillMode, *n, + (cuDoubleComplex*)(*A_ptr), *lda, + lwork) ); + } + +} // gpu_xpotrf_bufferSize_ + +/*=========================================================================*/ +// NAME +// gpu_xsygvd +// +// FUNCTION +// Compute a LAPACK SYGVD operation on GPU +// compute eigen values/vectors of a real generalized +// symmetric-definite eigenproblem +// +// See LAPACK doc in reference implementation: +// https://github.com/Reference-LAPACK/lapack/blob/master/SRC/dsygvd.f +// +// INPUTS +// itype = integer, type of problem +// jobz = character, 'n'(eigenvalues only) or 'v' (eigenvalues + eigenvectors) +// uplo = character, 'u' or 'l' +// A_nrows = matrix size +// A_ptr = pointer to gpu memory location of matrix A +// lda = leading dimension of matrix A +// B_ptr = pointer to gpu memory location of matrix B +// ldb = leading dimension of matrix B +// W_ptr = pointer to gpu memory location of matrix W (output eigen values) +// work_ptr = +// lwork = +// devInfo = +// +/*=========================================================================*/ + +extern "C" void gpu_xsygvd_(const int* cplx, + const int* itype, + const char* jobz, + const char* uplo, + const int* A_nrows, + void **A_ptr, + const int *lda, + void** B_ptr, + const int* ldb, + void** W_ptr, + void** work_ptr, + int* lwork, + int* info) +{ + + const cusolverEigType_t itype_cu = select_eigen_type(*itype); + const cusolverEigMode_t jobz_cu = select_eigen_mode(jobz); + const cublasFillMode_t fillMode = select_cublas_fill_mode(uplo); + + int* devInfo; + CUDA_API_CHECK( cudaMalloc( (void**) &devInfo, 1*sizeof(int)) ); + + if (*cplx == 1) + { + CUDA_API_CHECK( cusolverDnDsygvd(cusolverDn_handle, itype_cu, + jobz_cu, fillMode, *A_nrows, + (double*)(*A_ptr), *lda, + (double*)(*B_ptr), *ldb, + (double*)(*W_ptr), + (double*)(*work_ptr), + *lwork, devInfo) ); + } + else + { + CUDA_API_CHECK( cusolverDnZhegvd(cusolverDn_handle, itype_cu, + jobz_cu, fillMode, *A_nrows, + (cuDoubleComplex*)(*A_ptr), *lda, + (cuDoubleComplex*)(*B_ptr), *ldb, + (double*)(*W_ptr), + (cuDoubleComplex*)(*work_ptr), + *lwork, devInfo) ); + } + + CUDA_API_CHECK( cudaMemcpy(info, devInfo, 1*sizeof(int), cudaMemcpyDefault) ); + + CUDA_API_CHECK( cudaFree(devInfo) ); + +} // gpu_xsygvd_ + + +extern "C" void gpu_xsygvd_buffersize_(const int* cplx, + const int* itype, + const char* jobz, + const char* uplo, + const int* A_nrows, + void **A_ptr, + const int *lda, + void** B_ptr, + const int* ldb, + void** W_ptr, + int* lwork) +{ + + const cusolverEigType_t itype_cu = select_eigen_type(*itype); + const cusolverEigMode_t jobz_cu = select_eigen_mode(jobz); + const cublasFillMode_t fillMode = select_cublas_fill_mode(uplo); + + if (*cplx == 1) + { + CUDA_API_CHECK( cusolverDnDsygvd_bufferSize(cusolverDn_handle, itype_cu, + jobz_cu, fillMode, *A_nrows, + (const double*)(*A_ptr), *lda, + (const double*)(*B_ptr), *ldb, + (const double*)(*W_ptr), lwork) ); + } + else + { + CUDA_API_CHECK( cusolverDnZhegvd_bufferSize(cusolverDn_handle, itype_cu, + jobz_cu, fillMode, *A_nrows, + (const cuDoubleComplex*)(*A_ptr), *lda, + (const cuDoubleComplex*)(*B_ptr), *ldb, + (const double*)(*W_ptr), lwork) ); + } + +} // gpu_xsygvd_bufferSize_ + + +/*=========================================================================*/ +// NAME +// gpu_xsyevd +// +// FUNCTION +// Compute a LAPACK SYGVD operation on GPU +// compute eigen values/vectors of a real generalized +// symmetric-definite eigenproblem +// +// See LAPACK doc in reference implementation: +// https://github.com/Reference-LAPACK/lapack/blob/master/SRC/dsyevd.f +// +// INPUTS +// itype = integer, type of problem +// jobz = character, 'n'(eigenvalues only) or 'v' (eigenvalues + eigenvectors) +// uplo = character, 'u' or 'l' +// A_nrows = matrix size +// A_ptr = pointer to gpu memory location of matrix A +// lda = leading dimension of matrix A +// B_ptr = pointer to gpu memory location of matrix B +// ldb = leading dimension of matrix B +// W_ptr = pointer to gpu memory location of matrix W (output eigen values) +// work_ptr = +// lwork = +// devInfo = +// +/*=========================================================================*/ + +extern "C" void gpu_xsyevd_(const int* cplx, + const char* jobz, + const char* uplo, + const int* A_nrows, + void **A_ptr, + const int *lda, + void** W_ptr, + void** work_ptr, + int* lwork, + int* info) +{ + + const cusolverEigMode_t jobz_cu = select_eigen_mode(jobz); + const cublasFillMode_t fillMode = select_cublas_fill_mode(uplo); + + int* devInfo; + CUDA_API_CHECK( cudaMalloc( (void**) &devInfo, 1*sizeof(int)) ); + + if (*cplx == 1) + { + CUDA_API_CHECK( cusolverDnDsyevd(cusolverDn_handle, + jobz_cu, fillMode, *A_nrows, + (double*)(*A_ptr), *lda, + (double*)(*W_ptr), + (double*)(*work_ptr), + *lwork, devInfo) ); + } + else + { + CUDA_API_CHECK( cusolverDnZheevd(cusolverDn_handle, + jobz_cu, fillMode, *A_nrows, + (cuDoubleComplex*)(*A_ptr), *lda, + (double*)(*W_ptr), + (cuDoubleComplex*)(*work_ptr), + *lwork, devInfo) ); + } + + CUDA_API_CHECK( cudaMemcpy(info, devInfo, 1*sizeof(int), cudaMemcpyDefault) ); + + CUDA_API_CHECK( cudaFree(devInfo) ); + +} // gpu_xsyevd_ + +extern "C" void gpu_xsyevd_buffersize_(const int* cplx, + const char* jobz, + const char* uplo, + const int* A_nrows, + void **A_ptr, + const int *lda, + void** W_ptr, + int* lwork) +{ + + const cusolverEigMode_t jobz_cu = select_eigen_mode(jobz); + const cublasFillMode_t fillMode = select_cublas_fill_mode(uplo); + + if (*cplx == 1) + { + CUDA_API_CHECK( cusolverDnDsyevd_bufferSize(cusolverDn_handle, + jobz_cu, fillMode, *A_nrows, + (const double*)(*A_ptr), *lda, + (const double*)(*W_ptr), lwork) ); + } + else + { + CUDA_API_CHECK( cusolverDnZheevd_bufferSize(cusolverDn_handle, + jobz_cu, fillMode, *A_nrows, + (const cuDoubleComplex*)(*A_ptr), *lda, + (const double*)(*W_ptr), lwork) ); + } + +} // gpu_xsyevd_bufferSize_ diff --git a/GX-PAW/common/src/17_gpu_toolbox/gpu_linalg_hip.cpp b/GX-PAW/common/src/17_gpu_toolbox/gpu_linalg_hip.cpp new file mode 100644 index 00000000..f0d4d3c9 --- /dev/null +++ b/GX-PAW/common/src/17_gpu_toolbox/gpu_linalg_hip.cpp @@ -0,0 +1,894 @@ +/* gpu_linalg.cu */ + +/* + * Copyright (C) 2008-2024 ABINIT Group (MMancini,FDahm) + * this file is distributed under the terms of the + * gnu general public license, see ~abinit/COPYING + * or http://www.gnu.org/copyleft/gpl.txt . + * for the initials of contributors, see ~abinit/doc/developers/contributors.txt. + * + * The main goal of this file is to contain hipblas and magma encapsulation routines, + * that will be callable from fortran routines + * + */ + +#include +#include +#include + +// SYEVG/SYGVD are too slow when using HIP (on CRAY) +// We choose instead SYEVJ/SYGVJ (Jacobi) instead +// with a ridiculous number of iterations +// This has to be tested forward... +hipblasHandle_t hipblas_handle; +hipsolverDnHandle_t hipsolverDn_handle; +static hipStream_t stream_compute; + +// Parameters to HIP SYEVJ and SYGVJ (Jacobi-based eigensolver) +hipsolverSyevjInfo_t syevj_params = nullptr; +const int MAX_SWEEPS = 1; +const double TOLERANCE = 1.e-5; + +//! utility function for compatiblity between hipblas v1/v2 API +hipblasOperation_t select_hipblas_op(char *c) +{ + hipblasOperation_t op; + + if (*c == 'n' or *c == 'N') + op = HIPBLAS_OP_N; + else if (*c == 't' or *c == 'T') + op = HIPBLAS_OP_T; + else if (*c == 'c' or *c == 'C') + op = HIPBLAS_OP_C; + else + printf("HIPBLAS API error, character can't be converted to a valid hipblas operation !\n"); + + return op; +} + +//! utility function for compatiblity between hipblas v1/v2 API +hipblasSideMode_t select_hipblas_side(char *c) +{ + hipblasSideMode_t mode; + + if (*c == 'l' or *c == 'L') + mode = HIPBLAS_SIDE_LEFT; + else if (*c == 'r' or *c == 'R') + mode = HIPBLAS_SIDE_RIGHT; + else + printf("HIPBLAS API error, character can't be converted to a valid hipblas side mode !\n"); + + return mode; +} + +//! utility function for compatiblity between hipblas v1/v2 API +hipblasFillMode_t select_hipblas_fill_mode(const char *c) +{ + hipblasFillMode_t mode; + + if (*c == 'u' or *c == 'U') + mode = HIPBLAS_FILL_MODE_UPPER; + else if (*c == 'l' or *c == 'L') + mode = HIPBLAS_FILL_MODE_LOWER; + else + printf("HIPBLAS API error, character can't be converted to a valid hipblas fill mode !\n"); + + return mode; +} + +//! utility function for compatiblity between hipblas v1/v2 API +hipblasDiagType_t select_hipblas_diag_type(char *c) +{ + hipblasDiagType_t diag; + + if (*c == 'n' or *c == 'N') + diag = HIPBLAS_DIAG_NON_UNIT; + else if (*c == 'u' or *c == 'U') + diag = HIPBLAS_DIAG_UNIT; + else + printf("HIPBLAS API error, character can't be converted to a valid hipblas diag type !\n"); + + return diag; +} + +//! utility function to select eigen type +hipsolverEigType_t select_eigen_type(const int eigType_int) +{ + hipsolverEigType_t eigType = HIPSOLVER_EIG_TYPE_1; + + if (eigType_int < 1 or eigType_int > 3) + printf("HIPSOLVER API error, input can't be converted to a valid hipsolver eigen type !\n"); + else if(eigType_int == 1) + eigType = HIPSOLVER_EIG_TYPE_1; + else if(eigType_int == 2) + eigType = HIPSOLVER_EIG_TYPE_2; + else if(eigType_int == 3) + eigType = HIPSOLVER_EIG_TYPE_3; + + return eigType; +} + +//! utility function to select eigen mode +hipsolverEigMode_t select_eigen_mode(const char* c) +{ + + hipsolverEigMode_t eigMode = HIPSOLVER_EIG_MODE_NOVECTOR; + + if (*c =='n' or *c=='N') + eigMode = HIPSOLVER_EIG_MODE_NOVECTOR; + else if (*c =='v' or *c=='V') + eigMode = HIPSOLVER_EIG_MODE_VECTOR; + else + printf("HIPSOLVER API error, character can't be converted to a valid eigen mode !\n"); + + return eigMode; +} + +hipsolverFillMode_t select_hipsolver_fill_mode(const char *c) +{ + hipsolverFillMode_t mode; + + if (*c == 'u' or *c == 'U') + mode = HIPSOLVER_FILL_MODE_UPPER; + else if (*c == 'l' or *c == 'L') + mode = HIPSOLVER_FILL_MODE_LOWER; + else + printf("HIPBLAS API error, character can't be converted to a valid hipsolver fill mode !\n"); + + return mode; +} + + + +/*=========================================================================*/ +// NAME +// gpu_linalg_init +// +// FUNCTION +// Initialisation of linalg environnement on GPU +// +/*=========================================================================*/ + +extern "C" void gpu_linalg_init_() +{ + HIP_API_CHECK( hipblasCreate(&hipblas_handle) ); + HIP_API_CHECK( hipsolverDnCreate(&hipsolverDn_handle) ); + HIP_API_CHECK( hipStreamCreate(&stream_compute) ); + HIP_API_CHECK( hipsolverDnSetStream(hipsolverDn_handle,stream_compute) ); + HIP_API_CHECK( hipblasSetStream(hipblas_handle,stream_compute) ); + + HIP_API_CHECK(hipsolverCreateSyevjInfo(&syevj_params)); + HIP_API_CHECK(hipsolverXsyevjSetTolerance(syevj_params, TOLERANCE)); + HIP_API_CHECK(hipsolverXsyevjSetMaxSweeps(syevj_params, MAX_SWEEPS)); + //fprintf(stdout, "Initializing hipBLAS, this may take 10 seconds...\n"); + //fflush(stdout); + rocblas_initialize(); + rocfft_setup(); +} + +/*=========================================================================*/ +// NAME +// gpu_linalg_shutdown +// +// FUNCTION +// Close linalg environnement on GPU +// +/*=========================================================================*/ + +extern "C" void gpu_linalg_shutdown_() +{ + //FIXME + //HIP_API_CHECK( hipblasDestroy(hipblas_handle) ); + hipblasDestroy(hipblas_handle); + HIP_API_CHECK( hipsolverDestroySyevjInfo(syevj_params) ); + HIP_API_CHECK( hipsolverDnDestroy(hipsolverDn_handle) ); + HIP_API_CHECK( hipStreamDestroy(stream_compute) ); +} + +/*=========================================================================*/ +// NAME +// gpu_linalg_stream_synchronize +// +// FUNCTION +// Wait for any linalg operations still running on stream +// +/*=========================================================================*/ + +extern "C" void gpu_linalg_stream_synchronize_() +{ + HIP_API_CHECK( hipStreamSynchronize(stream_compute) ); +} + +/*=========================================================================*/ +// NAME +// gpu_xgemm +// +// FUNCTION +// Compute a scalar-matrix-matrix product and return a scalar-matrix product on GPU +// c = alpha * op(a) * op(b) + beta * c +// +// INPUTS +// cplx = 1 if real 2 if complex +// transa= from of op(a) to be used in the matrix multiplication +// transb= from of op(b) to be used in the matrix multiplication +// m = number of rows of the matrix op(a) and of the matrix c +// n = number of rows of the matrix op(b) and the number of columns of the matrix c +// k = number of columns of the matrix op(a) and the number of rows of the matrix op(b) +// alpha = alpha scalar coefficient for matrix op(a) +// a_gpu = pointer to gpu memory location of matrix a +// lda = first dimension of a +// b_gpu = pointer to gpu memory location of matrix b +// ldb = first dimension of b +// beta = beta scalar coefficient for matrix c +// c_gpu = pointer to gpu memory location of matrix c +// ldc = first dimension of c +// +// OUTPUT +// c_gpu = c_gpu matrix +// +/*=========================================================================*/ + +extern "C" void gpu_xgemm_(int* cplx, char *transA, char *transB, int *N, int *M, int *K, + hipDoubleComplex *alpha, + void **A_ptr, int *lda, void** B_ptr, int *ldb, + hipDoubleComplex *beta, void** C_ptr, int *ldc) +{ + + hipblasOperation_t opA = select_hipblas_op(transA); + hipblasOperation_t opB = select_hipblas_op(transB); + + (*cplx==1)? + hipblasDgemm(hipblas_handle, opA, opB, *N, *M, *K, &((*alpha).x), + (double *)(*A_ptr), *lda, + (double *)(*B_ptr), *ldb, + &((*beta).x), + (double *)(*C_ptr), *ldc) : + hipblasZgemm(hipblas_handle, opA, opB, *N, *M, *K, (hipblasDoubleComplex *) alpha, + (hipblasDoubleComplex *)(*A_ptr), *lda, + (hipblasDoubleComplex *)(*B_ptr), *ldb, + (hipblasDoubleComplex *) beta, + (hipblasDoubleComplex *)(*C_ptr), *ldc); + +} // gpu_xgemm + +/*=========================================================================*/ +// NAME +// gpu_xgemm_strided_batched +// +// FUNCTION +// Compute a batched scalar-matrix-matrix product and return a scalar-matrix product on GPU. +// Meant to be used on non-contiguous matrixes with data is uniformly split in the same number of batches in each matrix. +// c = alpha * op(a) * op(b) + beta * c +// +// INPUTS +// cplx = 1 if real 2 if complex +// transa = from of op(a) to be used in the matrix multiplication +// transb = from of op(b) to be used in the matrix multiplication +// m = number of rows of the matrix op(a) and of the matrix c +// n = number of rows of the matrix op(b) and the number of columns of the matrix c +// k = number of columns of the matrix op(a) and the number of rows of the matrix op(b) +// alpha = alpha scalar coefficient for matrix op(a) +// a_gpu = pointer to gpu memory location of matrix a +// lda = first dimension of a +// strideC = stride between each batch in matrix a +// b_gpu = pointer to gpu memory location of matrix b +// ldb = first dimension of b +// strideC = stride between each batch in matrix b +// beta = beta scalar coefficient for matrix c +// c_gpu = pointer to gpu memory location of matrix c +// ldc = first dimension of c +// strideC = stride between each batch in matrix c +// batchCount = number of batches in any matrix +// +// OUTPUT +// c_gpu = c_gpu matrix +// +/*=========================================================================*/ + +extern "C" void gpu_xgemm_strided_batched_(int* cplx, char *transA, char *transB, + int *N, int *M, int *K, + hipDoubleComplex *alpha, + void **A_ptr, int *lda, int *strideA, + void** B_ptr, int *ldb, int *strideB, + hipDoubleComplex *beta, + void** C_ptr, int *ldc, int *strideC, int *batchCount) +{ + + hipblasOperation_t opA = select_hipblas_op(transA); + hipblasOperation_t opB = select_hipblas_op(transB); + + (*cplx==1)? + HIP_API_CHECK( hipblasDgemmStridedBatched(hipblas_handle, opA, opB, + *N, *M, *K, &((*alpha).x), + (double *)(*A_ptr), *lda, *strideA, + (double *)(*B_ptr), *ldb, *strideB, + &((*beta).x), + (double *)(*C_ptr), *ldc, *strideC, *batchCount)) : + HIP_API_CHECK( hipblasZgemmStridedBatched(hipblas_handle, opA, opB, + *N, *M, *K, (hipblasDoubleComplex *) alpha, + (hipblasDoubleComplex *)(*A_ptr), *lda, *strideA, + (hipblasDoubleComplex *)(*B_ptr), *ldb, *strideB, + (hipblasDoubleComplex *) beta, + (hipblasDoubleComplex *)(*C_ptr), *ldc, *strideC, *batchCount)); +} // gpu_xgemm_strided_batched + +/*=========================================================================*/ +// NAME +// gpu_xsymm +// +// FUNCTION +// Compute a symmetric scalar-matrix-matrix product and return a scalar-matrix product on GPU +// c = alpha * op(a) * op(b) + beta * c , if side == L +// c = alpha * op(b) * op(a) + beta * c , if side == R +// +// INPUTS +// cplx = 1 if real 2 if complex +// side = Specifies whether op(a) appears on the left or right of x for +// the operation to be performed as follows: +// L or l op(a)*x = alpha*b +// R or r x*op(a) = alpha*b +// uplo = Specifies whether the matrix a is an upper or lower triangular +// matrix as follows: +// U or u Matrix a is an upper triangular matrix. +// L or l Matrix a is a lower triangular matrix +// m = number of rows of the matrix op(a) and of the matrix c +// n = number of rows of the matrix op(b) and the number of columns of the matrix c +// k = number of columns of the matrix op(a) and the number of rows of the matrix op(b) +// alpha = alpha scalar coefficient for matrix op(a) +// a_gpu = pointer to gpu memory location of matrix a +// lda = first dimension of a +// b_gpu = pointer to gpu memory location of matrix b +// ldb = first dimension of b +// beta = beta scalar coefficient for matrix c +// c_gpu = pointer to gpu memory location of matrix c +// ldc = first dimension of c +// +// OUTPUT +// c_gpu = c_gpu matrix +// +/*=========================================================================*/ + +extern "C" void gpu_xsymm_(int* cplx, char *side, char *uplo, int *N, int *M, + hipDoubleComplex *alpha, + void **A_ptr, int *lda, void** B_ptr, int *ldb, + hipDoubleComplex *beta, void** C_ptr, int *ldc) +{ + + hipblasSideMode_t sideMode = select_hipblas_side(side); + hipblasFillMode_t fillMode = select_hipblas_fill_mode(uplo); + + (*cplx==1)? + HIP_API_CHECK( hipblasDsymm(hipblas_handle, sideMode, fillMode, *N, *M, &((*alpha).x), + (double *)(*A_ptr), *lda, + (double *)(*B_ptr), *ldb, + &((*beta).x), + (double *)(*C_ptr), *ldc)) : + HIP_API_CHECK( hipblasZsymm(hipblas_handle, sideMode, fillMode, *N, *M, (hipblasDoubleComplex *) alpha, + (hipblasDoubleComplex *)(*A_ptr), *lda, + (hipblasDoubleComplex *)(*B_ptr), *ldb, + (hipblasDoubleComplex *) beta, + (hipblasDoubleComplex *)(*C_ptr), *ldc)); +} // gpu_xsymm_omp + +/*=========================================================================*/ +// NAME +// gpu_xhemm +// +// FUNCTION +// Compute a Hermitian scalar-matrix-matrix product and return a scalar-matrix product on GPU +// c = alpha * op(a) * op(b) + beta * c , if side == L +// c = alpha * op(b) * op(a) + beta * c , if side == R +// +// INPUTS +// cplx = 1 if real 2 if complex +// side = Specifies whether op(a) appears on the left or right of x for +// the operation to be performed as follows: +// L or l op(a)*x = alpha*b +// R or r x*op(a) = alpha*b +// uplo = Specifies whether the matrix a is an upper or lower triangular +// matrix as follows: +// U or u Matrix a is an upper triangular matrix. +// L or l Matrix a is a lower triangular matrix +// m = number of rows of the matrix op(a) and of the matrix c +// n = number of rows of the matrix op(b) and the number of columns of the matrix c +// k = number of columns of the matrix op(a) and the number of rows of the matrix op(b) +// alpha = alpha scalar coefficient for matrix op(a) +// a_gpu = pointer to gpu memory location of matrix a +// lda = first dimension of a +// b_gpu = pointer to gpu memory location of matrix b +// ldb = first dimension of b +// beta = beta scalar coefficient for matrix c +// c_gpu = pointer to gpu memory location of matrix c +// ldc = first dimension of c +// +// OUTPUT +// c_gpu = c_gpu matrix +// +/*=========================================================================*/ + +extern "C" void gpu_zhemm_(char *side, char *uplo, int *N, int *M, + hipDoubleComplex *alpha, + void **A_ptr, int *lda, void** B_ptr, int *ldb, + hipDoubleComplex *beta, void** C_ptr, int *ldc) +{ + + hipblasSideMode_t sideMode = select_hipblas_side(side); + hipblasFillMode_t fillMode = select_hipblas_fill_mode(uplo); + + HIP_API_CHECK( hipblasZhemm(hipblas_handle, sideMode, fillMode, *N, *M, (hipblasDoubleComplex *) alpha, + (hipblasDoubleComplex *)(*A_ptr), *lda, + (hipblasDoubleComplex *)(*B_ptr), *ldb, + (hipblasDoubleComplex *) beta, + (hipblasDoubleComplex *)(*C_ptr), *ldc)); +} // gpu_zhemm_omp + +/*=========================================================================*/ +// NAME +// gpu_xtrsm +// +// FUNCTION +// Solves a matrix equation (one matrix operand is triangular) on GPU. +// The xtrsm routines solve one of the following matrix equations +// op(a)*x = alpha*b +// or +// x*op(a) = alpha*b, +// +// INPUTS +// cplx= 1 if real 2 if complex +// side= Specifies whether op(a) appears on the left or right of x for +// the operation to be performed as follows: +// L or l op(a)*x = alpha*b +// R or r x*op(a) = alpha*b +// uplo= Specifies whether the matrix a is an upper or lower triangular +// matrix as follows: +// U or u Matrix a is an upper triangular matrix. +// L or l Matrix a is a lower triangular matrix +// transa= Specifies the form of op(a) to be used in the matrix +// multiplication as follows: +// N or n op(a) = a +// T or t op(a) = a' +// C or c op(a) = conjg(a') +// diag= Specifies whether or not a is unit triangular as follows: +// U or u Matrix a is assumed to be unit triangular. +// N or n Matrix a is not assumed to be unit triangular. +// m= Specifies the number of rows of b. The value of m must be at least zero +// n= Specifies the number of columns of b. The value of n must be at least zero +// alpha= Specifies the scalar alpha. When alpha is zero, then a is not referenced and b +// need not be set before entry. +// a_gpu = pointer to gpu memory location of array a, DIMENSION (lda, k), where k is m when side = 'L' or 'l' and is n +// when side = 'R' or 'r'. +// lda= Specifies the first dimension of a as declared in the calling +// (sub)program. When side = 'L' or 'l', then lda must be at least max(1, +// m), when side = 'R' or 'r', then lda must be at least max(1, n). +// b_gpu = pointer to gpu memory location of b Array, DIMENSION (ldb,n). Before entry, the leading m-by-n part of the array +// b must contain the right-hand side matrix b. +// ldb= Specifies the first dimension of b as declared in the calling +// (sub)program. The value of ldb must be at least max(1, m). +// +// OUTPUT +// b_gpu +/*=========================================================================*/ + +extern "C" void gpu_xtrsm_(int* cplx, char *side, char *uplo, char *transA, char *diag, + int *N, int *M, hipDoubleComplex *alpha, + void **A_ptr, int *ldA, + void** B_ptr, int *ldB) +{ + + hipblasSideMode_t sideMode = select_hipblas_side(side); + hipblasFillMode_t fillMode = select_hipblas_fill_mode(uplo); + hipblasDiagType_t diagType = select_hipblas_diag_type(diag); + hipblasOperation_t opA = select_hipblas_op(transA); + + (*cplx==1) ? + hipblasDtrsm(hipblas_handle, sideMode, fillMode, opA, diagType, + *N, *M, &((*alpha).x), + (double *)(*A_ptr), *ldA, + (double *)(*B_ptr), *ldB): + hipblasZtrsm(hipblas_handle, sideMode, fillMode, opA, diagType, + *N, *M, (hipblasDoubleComplex *) alpha, + (hipblasDoubleComplex *)(*A_ptr), *ldA, + (hipblasDoubleComplex *)(*B_ptr), *ldB); +} // gpu_xtrsm_ + +/*=========================================================================*/ +// NAME +// gpu_xaxpy +// +// FUNCTION +// Compute blas-1 AXPY on GPU +// y = alpha * x + y +// +// INPUTS +// cplx = 1 if real 2 if complex +// alpha = scalar complex value (when doing computation with real value, only the real part is used) +// x = input vector +// incrx = increment between two consecutive values of x +// y = in/out vector +// incry = increment between two consecutive values of y +// +// OUTPUT +// y +/*=========================================================================*/ + +extern "C" void gpu_xaxpy_(int* cplx, int *N, + hipDoubleComplex *alpha, + void **X_ptr, int *incrx, void** Y_ptr, int *incry) +{ + HIP_API_CHECK( (*cplx==1) ? + hipblasDaxpy(hipblas_handle,*N, + &((*alpha).x), + (double *)(*X_ptr), *incrx, + (double *)(*Y_ptr), *incry) : + hipblasZaxpy(hipblas_handle, *N, + (hipblasDoubleComplex *) alpha, + (hipblasDoubleComplex *)(*X_ptr), *incrx, + (hipblasDoubleComplex *)(*Y_ptr), *incry) ); +} // gpu_xaxpy_ + +/*=========================================================================*/ +// NAME +// gpu_xcopy +// +// FUNCTION +// Compute blas-1 COPY on GPU +// y = x (copy x into y) +// +// INPUTS / OUTPUTS +// cplx = 1 if real 2 if complex +// N = input vector size +// x = input vector +// incrx = increment between two consecutive values of x +// y = output vector +// incry = increment between two consecutive values of y +// +/*=========================================================================*/ + +extern "C" void gpu_xcopy_(int* cplx, int *N, + void **X_ptr, int *incrx, + void **Y_ptr, int *incry) +{ + + HIP_API_CHECK( (*cplx==1) ? + hipblasDcopy(hipblas_handle,*N, + (const double *)(*X_ptr), *incrx, + ( double *)(*Y_ptr), *incry) : + hipblasZcopy(hipblas_handle, *N, + (const hipblasDoubleComplex *)(*X_ptr), *incrx, + ( hipblasDoubleComplex *)(*Y_ptr), *incry) ); +} // gpu_xcopy_ + +/*=========================================================================*/ +// NAME +// gpu_xscal +// +// FUNCTION +// Compute blas-1 SCAL on GPU +// x = alpha * x +// +// INPUTS +// cplx = 1 if real 2 if complex +// N = vector size +// alpha = scalar complex value (when doing computation with real value, only the real part is used) +// x = input/output vector +// incrx = increment between two consecutive values of x +// +// OUTPUT +// x +/*=========================================================================*/ + +extern "C" void gpu_xscal_(int* cplx, int *N, + hipDoubleComplex *alpha, + void **X_ptr, int *incrx) +{ + HIP_API_CHECK( (*cplx==1) ? + hipblasDscal(hipblas_handle,*N, + &((*alpha).x), + (double *)(*X_ptr), *incrx) : + hipblasZscal(hipblas_handle, *N, + (hipblasDoubleComplex *) alpha, + (hipblasDoubleComplex *)(*X_ptr), *incrx) ); +} // gpu_xscal_ + +/*=========================================================================*/ +// NAME +// gpu_xpotrf +// +// FUNCTION +// Compute a LAPACK SYGVD operation on GPU +// computes the Cholesky factorization of a Hermitian positive-definite matrix +// +// See LAPACK doc in reference implementation: +// https://github.com/Reference-LAPACK/lapack/blob/master/SRC/dpotrf.f +// +// INPUTS +// uplo = character, 'u' or 'l' +// n = matrix size +// A_ptr = pointer to gpu memory location of matrix A +// lda = leading dimension of matrix A +// work_ptr = +// lwork = +// devInfo = +// +/*=========================================================================*/ + +extern "C" void gpu_xpotrf_(const int* cplx, + const char* uplo, + const int* n, + void **A_ptr, + const int *lda, + void** work_ptr, + int* lwork, + int* info) +{ + + const hipsolverFillMode_t fillMode = select_hipsolver_fill_mode(uplo); + + int* devInfo; + HIP_API_CHECK( hipMalloc( (void**) &devInfo, 1*sizeof(int)) ); + + if (*cplx == 1) + { + HIP_API_CHECK( hipsolverDnDpotrf(hipsolverDn_handle, + fillMode, *n, + (double*)(*A_ptr), *lda, + (double*)(*work_ptr), + *lwork, devInfo) ); + } + else + { + HIP_API_CHECK( hipsolverDnZpotrf(hipsolverDn_handle, + fillMode, *n, + (hipDoubleComplex*)(*A_ptr), *lda, + (hipDoubleComplex*)(*work_ptr), + *lwork, devInfo) ); + } + + HIP_API_CHECK( hipMemcpy(info, devInfo, 1*sizeof(int), hipMemcpyDefault) ); + + HIP_API_CHECK( hipFree(devInfo) ); + +} // gpu_xpotrf_ + +extern "C" void gpu_xpotrf_buffersize_(const int* cplx, + const char* uplo, + const int* n, + void **A_ptr, + const int *lda, + int* lwork) +{ + + const hipsolverFillMode_t fillMode = select_hipsolver_fill_mode(uplo); + + if (*cplx == 1) + { + HIP_API_CHECK( hipsolverDnDpotrf_bufferSize(hipsolverDn_handle, + fillMode, *n, + (double*)(*A_ptr), *lda, + lwork) ); + } + else + { + HIP_API_CHECK( hipsolverDnZpotrf_bufferSize(hipsolverDn_handle, + fillMode, *n, + (hipDoubleComplex*)(*A_ptr), *lda, + lwork) ); + } + +} // gpu_xpotrf_bufferSize_ + +/*=========================================================================*/ +// NAME +// gpu_xsygvd +// +// FUNCTION +// Compute a LAPACK SYGVD operation on GPU +// compute eigen values/vectors of a real generalized +// symmetric-definite eigenproblem +// +// See LAPACK doc in reference implementation: +// https://github.com/Reference-LAPACK/lapack/blob/master/SRC/dsygvd.f +// +// INPUTS +// itype = integer, type of problem +// jobz = character, 'n'(eigenvalues only) or 'v' (eigenvalues + eigenvectors) +// uplo = character, 'u' or 'l' +// A_nrows = matrix size +// A_ptr = pointer to gpu memory location of matrix A +// lda = leading dimension of matrix A +// B_ptr = pointer to gpu memory location of matrix B +// ldb = leading dimension of matrix B +// W_ptr = pointer to gpu memory location of matrix W (output eigen values) +// work_ptr = +// lwork = +// devInfo = +// +/*=========================================================================*/ + +extern "C" void gpu_xsygvd_(const int* cplx, + const int* itype, + const char* jobz, + const char* uplo, + const int* A_nrows, + void **A_ptr, + const int *lda, + void** B_ptr, + const int* ldb, + void** W_ptr, + void** work_ptr, + int* lwork, + int* info) +{ + + const hipsolverEigType_t itype_cu = select_eigen_type(*itype); + const hipsolverEigMode_t jobz_cu = select_eigen_mode(jobz); + const hipsolverFillMode_t fillMode = select_hipsolver_fill_mode(uplo); + + int* devInfo; + HIP_API_CHECK( hipMalloc( (void**) &devInfo, 1*sizeof(int)) ); + + if (*cplx == 1) + { + HIP_API_CHECK( hipsolverDnDsygvd(hipsolverDn_handle, itype_cu, + jobz_cu, fillMode, *A_nrows, + (double*)(*A_ptr), *lda, + (double*)(*B_ptr), *ldb, + (double*)(*W_ptr), + (double*)(*work_ptr), + *lwork, devInfo) ); + } + else + { + HIP_API_CHECK( hipsolverDnZhegvj(hipsolverDn_handle, itype_cu, + jobz_cu, fillMode, *A_nrows, + (hipDoubleComplex*)(*A_ptr), *lda, + (hipDoubleComplex*)(*B_ptr), *ldb, + (double*)(*W_ptr), + (hipDoubleComplex*)(*work_ptr), + *lwork, devInfo, syevj_params) ); + } + + HIP_API_CHECK( hipMemcpy(info, devInfo, 1*sizeof(int), hipMemcpyDefault) ); + + HIP_API_CHECK( hipFree(devInfo) ); + +} // gpu_xsygvd_ + + +extern "C" void gpu_xsygvd_buffersize_(const int* cplx, + const int* itype, + const char* jobz, + const char* uplo, + const int* A_nrows, + void **A_ptr, + const int *lda, + void** B_ptr, + const int* ldb, + void** W_ptr, + int* lwork) +{ + + const hipsolverEigType_t itype_cu = select_eigen_type(*itype); + const hipsolverEigMode_t jobz_cu = select_eigen_mode(jobz); + const hipsolverFillMode_t fillMode = select_hipsolver_fill_mode(uplo); + + if (*cplx == 1) + { + HIP_API_CHECK( hipsolverDnDsygvd_bufferSize(hipsolverDn_handle, itype_cu, + jobz_cu, fillMode, *A_nrows, + (double*)(*A_ptr), *lda, + (double*)(*B_ptr), *ldb, + (double*)(*W_ptr), lwork) ); + } + else + { + HIP_API_CHECK( hipsolverDnZhegvj_bufferSize(hipsolverDn_handle, itype_cu, + jobz_cu, fillMode, *A_nrows, + (hipDoubleComplex*)(*A_ptr), *lda, + (hipDoubleComplex*)(*B_ptr), *ldb, + (double*)(*W_ptr), lwork, syevj_params) ); + } + +} // gpu_xsygvd_bufferSize_ + + +/*=========================================================================*/ +// NAME +// gpu_xsyevd +// +// FUNCTION +// Compute a LAPACK SYGVD operation on GPU +// compute eigen values/vectors of a real generalized +// symmetric-definite eigenproblem +// +// See LAPACK doc in reference implementation: +// https://github.com/Reference-LAPACK/lapack/blob/master/SRC/dsyevd.f +// +// INPUTS +// itype = integer, type of problem +// jobz = character, 'n'(eigenvalues only) or 'v' (eigenvalues + eigenvectors) +// uplo = character, 'u' or 'l' +// A_nrows = matrix size +// A_ptr = pointer to gpu memory location of matrix A +// lda = leading dimension of matrix A +// B_ptr = pointer to gpu memory location of matrix B +// ldb = leading dimension of matrix B +// W_ptr = pointer to gpu memory location of matrix W (output eigen values) +// work_ptr = +// lwork = +// devInfo = +// +/*=========================================================================*/ + +extern "C" void gpu_xsyevd_(const int* cplx, + const char* jobz, + const char* uplo, + const int* A_nrows, + void **A_ptr, + const int *lda, + void** W_ptr, + void** work_ptr, + int* lwork, + int* info) +{ + + const hipsolverEigMode_t jobz_cu = select_eigen_mode(jobz); + const hipsolverFillMode_t fillMode = select_hipsolver_fill_mode(uplo); + + int* devInfo; + HIP_API_CHECK( hipMalloc( (void**) &devInfo, 1*sizeof(int)) ); + + if (*cplx == 1) + { + HIP_API_CHECK( hipsolverDnDsyevd(hipsolverDn_handle, + jobz_cu, fillMode, *A_nrows, + (double*)(*A_ptr), *lda, + (double*)(*W_ptr), + (double*)(*work_ptr), + *lwork, devInfo) ); + } + else + { + HIP_API_CHECK( hipsolverDnZheevd(hipsolverDn_handle, + jobz_cu, fillMode, *A_nrows, + (hipDoubleComplex*)(*A_ptr), *lda, + (double*)(*W_ptr), + (hipDoubleComplex*)(*work_ptr), + *lwork, devInfo) ); + } + + HIP_API_CHECK( hipMemcpy(info, devInfo, 1*sizeof(int), hipMemcpyDefault) ); + + HIP_API_CHECK( hipFree(devInfo) ); + +} // gpu_xsyevd_ + +extern "C" void gpu_xsyevd_buffersize_(const int* cplx, + const char* jobz, + const char* uplo, + const int* A_nrows, + void **A_ptr, + const int *lda, + void** W_ptr, + int* lwork) +{ + + const hipsolverEigMode_t jobz_cu = select_eigen_mode(jobz); + const hipsolverFillMode_t fillMode = select_hipsolver_fill_mode(uplo); + + if (*cplx == 1) + { + HIP_API_CHECK( hipsolverDnDsyevd_bufferSize(hipsolverDn_handle, + jobz_cu, fillMode, *A_nrows, + (double*)(*A_ptr), *lda, + (double*)(*W_ptr), lwork) ); + } + else + { + HIP_API_CHECK( hipsolverDnZheevd_bufferSize(hipsolverDn_handle, + jobz_cu, fillMode, *A_nrows, + (hipDoubleComplex*)(*A_ptr), *lda, + (double*)(*W_ptr), lwork) ); + } + +} // gpu_xsyevd_bufferSize_ diff --git a/GX-PAW/common/src/17_gpu_toolbox/hip_api_error_check.h b/GX-PAW/common/src/17_gpu_toolbox/hip_api_error_check.h new file mode 100644 index 00000000..1cb69168 --- /dev/null +++ b/GX-PAW/common/src/17_gpu_toolbox/hip_api_error_check.h @@ -0,0 +1,554 @@ +/** + * HIP API error checking utilities. + * + * This header is loosely translated from its CUDA counterpart, + * which itself is slightly adapted from cuda samples + * https://github.com/Nvidia/cuda-samples + * + * Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NVIDIA CORPORATION nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#ifndef HIP_API_ERROR_CHECK_H_ +#define HIP_API_ERROR_CHECK_H_ + +#pragma once + +#include +#include +#include +#include +#include +//#include +#include +#include // for fflush +#include + +#ifndef assertm +#define assertm(exp, msg) assert(((void)msg, exp)) +#endif + +#ifdef __cplusplus +extern "C" { +#endif + + // this is defined in shared/common/src/16_hideleave/m_errors.F90 + void abi_cabort(); + +#ifdef __cplusplus +} +#endif + +// when this header is used inside abinit, call abi_cabort when an error happens +// otherwise, do a regular exit +// we assume here that if config.h (from abinit is included first, then ABINIT_VERSION will be defined) +#ifdef ABINIT_VERSION +#define ABORT() abi_cabort() +#else +#define ABORT() { \ + exit(EXIT_FAILURE); \ + } +#endif + + +/* + * If symbol ALWAYS_SYNC_GPU is defined in your build system + * then we will always call hipDeviceSynchronize, before checking + * last error from a hip kernel call. + * + * It may help in case of debugging to define ALWAYS_SYNC_GPU, but for a + * regular run, it should remains to 0. + * + * Note: you can also enforce syncing CPU/GPU by set environment variable HIP_LAUNCH_BLOCKING to 1 + * + * See also: https://www.olcf.ornl.gov/wp-content/uploads/2021/06/hip_training_series_hip_debugging.pdf + */ +#ifdef ALWAYS_SYNC_GPU +#define FORCE_SYNC_GPU 1 +#else +#define FORCE_SYNC_GPU 0 +#endif + + +// HIP Runtime error messages +static const char *_hipGetErrorEnum(hipError_t error) { + return hipGetErrorName(error); +} + +// cuBLAS API errors +static const char *_hipGetErrorEnum(hipblasStatus_t error) { + return hipblasStatusToString(error); +} + +#ifdef HIP_DRIVER_API +// HIP Driver API errors +static const char *_hipGetErrorEnum(CUresult error) { + static char unknown[] = ""; + const char *ret = NULL; + cuGetErrorName(error, &ret); + return ret ? ret : unknown; +} +#endif + +#ifdef HIPBLAS_API_H_ +// cuBLAS API errors +static const char *_hipGetErrorEnum(cublasStatus_t error) { + switch (error) { + case HIPBLAS_STATUS_SUCCESS: + return "HIPBLAS_STATUS_SUCCESS"; + + case HIPBLAS_STATUS_NOT_INITIALIZED: + return "HIPBLAS_STATUS_NOT_INITIALIZED"; + + case HIPBLAS_STATUS_ALLOC_FAILED: + return "HIPBLAS_STATUS_ALLOC_FAILED"; + + case HIPBLAS_STATUS_INVALID_VALUE: + return "HIPBLAS_STATUS_INVALID_VALUE"; + + case HIPBLAS_STATUS_ARCH_MISMATCH: + return "HIPBLAS_STATUS_ARCH_MISMATCH"; + + case HIPBLAS_STATUS_MAPPING_ERROR: + return "HIPBLAS_STATUS_MAPPING_ERROR"; + + case HIPBLAS_STATUS_EXEHIPTION_FAILED: + return "HIPBLAS_STATUS_EXEHIPTION_FAILED"; + + case HIPBLAS_STATUS_INTERNAL_ERROR: + return "HIPBLAS_STATUS_INTERNAL_ERROR"; + + case HIPBLAS_STATUS_NOT_SUPPORTED: + return "HIPBLAS_STATUS_NOT_SUPPORTED"; + + case HIPBLAS_STATUS_LICENSE_ERROR: + return "HIPBLAS_STATUS_LICENSE_ERROR"; + } + + return ""; +} +#endif + +#ifdef HIPFFT_H_ +// hipFFT API errors +static const char *_hipGetErrorEnum(hipfftResult error) { + switch (error) { + case HIPFFT_SUCCESS: + return "HIPFFT_SUCCESS"; + + case HIPFFT_INVALID_PLAN: + return "HIPFFT_INVALID_PLAN"; + + case HIPFFT_ALLOC_FAILED: + return "HIPFFT_ALLOC_FAILED"; + + case HIPFFT_INVALID_TYPE: + return "HIPFFT_INVALID_TYPE"; + + case HIPFFT_INVALID_VALUE: + return "HIPFFT_INVALID_VALUE"; + + case HIPFFT_INTERNAL_ERROR: + return "HIPFFT_INTERNAL_ERROR"; + + case HIPFFT_EXEC_FAILED: + return "HIPFFT_EXEC_FAILED"; + + case HIPFFT_SETUP_FAILED: + return "HIPFFT_SETUP_FAILED"; + + case HIPFFT_INVALID_SIZE: + return "HIPFFT_INVALID_SIZE"; + + case HIPFFT_UNALIGNED_DATA: + return "HIPFFT_UNALIGNED_DATA"; + + case HIPFFT_INCOMPLETE_PARAMETER_LIST: + return "HIPFFT_INCOMPLETE_PARAMETER_LIST"; + + case HIPFFT_INVALID_DEVICE: + return "HIPFFT_INVALID_DEVICE"; + + case HIPFFT_PARSE_ERROR: + return "HIPFFT_PARSE_ERROR"; + + case HIPFFT_NO_WORKSPACE: + return "HIPFFT_NO_WORKSPACE"; + + case HIPFFT_NOT_IMPLEMENTED: + return "HIPFFT_NOT_IMPLEMENTED"; + + case HIPFFT_NOT_SUPPORTED: + return "HIPFFT_NOT_SUPPORTED"; + } + + return ""; +} +#endif + +#ifdef _HIPSPARSE_H_ +// cuSPARSE API errors +static const char *_hipGetErrorEnum(hipsparseStatus_t error) { + switch (error) { + case HIPSPARSE_STATUS_SUCCESS: + return "HIPSPARSE_STATUS_SUCCESS"; + + case HIPSPARSE_STATUS_NOT_INITIALIZED: + return "HIPSPARSE_STATUS_NOT_INITIALIZED"; + + case HIPSPARSE_STATUS_ALLOC_FAILED: + return "HIPSPARSE_STATUS_ALLOC_FAILED"; + + case HIPSPARSE_STATUS_INVALID_VALUE: + return "HIPSPARSE_STATUS_INVALID_VALUE"; + + case HIPSPARSE_STATUS_ARCH_MISMATCH: + return "HIPSPARSE_STATUS_ARCH_MISMATCH"; + + case HIPSPARSE_STATUS_MAPPING_ERROR: + return "HIPSPARSE_STATUS_MAPPING_ERROR"; + + case HIPSPARSE_STATUS_EXECUTION_FAILED: + return "HIPSPARSE_STATUS_EXECUTION_FAILED"; + + case HIPSPARSE_STATUS_INTERNAL_ERROR: + return "HIPSPARSE_STATUS_INTERNAL_ERROR"; + + case HIPSPARSE_STATUS_MATRIX_TYPE_NOT_SUPPORTED: + return "HIPSPARSE_STATUS_MATRIX_TYPE_NOT_SUPPORTED"; + + case HIPSPARSE_STATUS_ZERO_PIVOT: + return "HIPSPARSE_STATUS_ZERO_PIVOT"; + + case HIPSPARSE_STATUS_NOT_SUPPORTED: + return "HIPSPARSE_STATUS_NOT_SUPPORTED"; + + case HIPSPARSE_STATUS_INSUFFICIENT_RESOURCES: + return "HIPSPARSE_STATUS_INSUFFICIENT_RESOURCES"; + } + + return ""; +} +#endif + +#ifdef HIPSOLVER_H +// cuSOLVER API errors +static const char *_hipGetErrorEnum(hipsolverStatus_t error) { + switch (error) { + case HIPSOLVER_STATUS_SUCCESS: + return "HIPSOLVER_STATUS_SUCCESS"; + case HIPSOLVER_STATUS_NOT_INITIALIZED: + return "HIPSOLVER_STATUS_NOT_INITIALIZED"; + case HIPSOLVER_STATUS_ALLOC_FAILED: + return "HIPSOLVER_STATUS_ALLOC_FAILED"; + case HIPSOLVER_STATUS_INVALID_VALUE: + return "HIPSOLVER_STATUS_INVALID_VALUE"; + case HIPSOLVER_STATUS_ARCH_MISMATCH: + return "HIPSOLVER_STATUS_ARCH_MISMATCH"; + case HIPSOLVER_STATUS_MAPPING_ERROR: + return "HIPSOLVER_STATUS_MAPPING_ERROR"; + case HIPSOLVER_STATUS_EXECUTION_FAILED: + return "HIPSOLVER_STATUS_EXECUTION_FAILED"; + case HIPSOLVER_STATUS_INTERNAL_ERROR: + return "HIPSOLVER_STATUS_INTERNAL_ERROR"; + case HIPSOLVER_STATUS_HANDLE_IS_NULLPTR: + return "HIPSOLVER_STATUS_HANDLE_IS_NULLPTR"; + case HIPSOLVER_STATUS_INVALID_ENUM: + return "HIPSOLVER_STATUS_INVALID_ENUM"; + case HIPSOLVER_STATUS_UNKNOWN: + return "HIPSOLVER_STATUS_UNKNOWN"; + case HIPSOLVER_STATUS_NOT_SUPPORTED: + return "HIPSOLVER_STATUS_NOT_SUPPORTED "; + } + + return ""; +} +#endif + + +#ifdef HIPRAND_H_ +// hipRAND API errors +static const char *_hipGetErrorEnum(hiprandStatus_t error) { + switch (error) { + case HIPRAND_STATUS_SUCCESS: + return "HIPRAND_STATUS_SUCCESS"; + + case HIPRAND_STATUS_VERSION_MISMATCH: + return "HIPRAND_STATUS_VERSION_MISMATCH"; + + case HIPRAND_STATUS_NOT_INITIALIZED: + return "HIPRAND_STATUS_NOT_INITIALIZED"; + + case HIPRAND_STATUS_ALLOCATION_FAILED: + return "HIPRAND_STATUS_ALLOCATION_FAILED"; + + case HIPRAND_STATUS_TYPE_ERROR: + return "HIPRAND_STATUS_TYPE_ERROR"; + + case HIPRAND_STATUS_OUT_OF_RANGE: + return "HIPRAND_STATUS_OUT_OF_RANGE"; + + case HIPRAND_STATUS_LENGTH_NOT_MULTIPLE: + return "HIPRAND_STATUS_LENGTH_NOT_MULTIPLE"; + + case HIPRAND_STATUS_DOUBLE_PRECISION_REQUIRED: + return "HIPRAND_STATUS_DOUBLE_PRECISION_REQUIRED"; + + case HIPRAND_STATUS_LAUNCH_FAILURE: + return "HIPRAND_STATUS_LAUNCH_FAILURE"; + + case HIPRAND_STATUS_PREEXISTING_FAILURE: + return "HIPRAND_STATUS_PREEXISTING_FAILURE"; + + case HIPRAND_STATUS_INITIALIZATION_FAILED: + return "HIPRAND_STATUS_INITIALIZATION_FAILED"; + + case HIPRAND_STATUS_ARCH_MISMATCH: + return "HIPRAND_STATUS_ARCH_MISMATCH"; + + case HIPRAND_STATUS_NOT_IMPLEMENTED: + return "HIPRAND_STATUS_NOT_IMPLEMENTED"; + + case HIPRAND_STATUS_INTERNAL_ERROR: + return "HIPRAND_STATUS_INTERNAL_ERROR"; + } + + return ""; +} +#endif + +template +void check_hip_error(T result, char const *const func, const char *const file, + int const line) { + if (result) { + fprintf(stderr, "HIP error at :\n\t%s:%d \n\treturn code = %d (%s)\n\t\"%s\" \n\n", + file, line, + static_cast(result), _hipGetErrorEnum(result), func); + fflush(stderr); + ABORT(); + } +} + +// This will output the proper HIP error strings in the event +// that a HIP host call returns an error +#define CHECK_HIP_ERROR(value) check_hip_error((value), #value, __FILE__, __LINE__) +#define HIP_API_CHECK(value) CHECK_HIP_ERROR(value) + + +// This will output the proper error string when calling hipGetLastError +#define getLastHipError(msg) __getLastHipError(msg, __FILE__, __LINE__) +#define GET_LAST_HIP_ERROR(msg) getLastHipError(msg) + +inline void __getLastHipError(const char *errorMessage, const char *file, + const int line) { + hipError_t err = hipGetLastError(); + + if (hipSuccess != err) { + fprintf(stderr, + "%s(%i) : getLastHipError() HIP error :" + " %s : (%d) %s.\n", + file, line, errorMessage, static_cast(err), + hipGetErrorString(err)); + + // Make sure we call HIP Device Reset before exiting + err = hipDeviceReset(); + + ABORT(); + } +} + +// This will only print the proper error string when calling hipGetLastError +// but not exit program incase error detected. +#define printLastHipError(msg) __printLastHipError(msg, __FILE__, __LINE__) +#define PRINT_LAST_HIP_ERROR(msg) printLastHipError(msg) + +inline void __printLastHipError(const char *errorMessage, const char *file, + const int line) { + hipError_t err = hipGetLastError(); + + if (hipSuccess != err) { + fprintf(stderr, + "%s(%i) : getLastHipError() HIP error :" + " %s : (%d) %s.\n", + file, line, errorMessage, static_cast(err), + hipGetErrorString(err)); + } +} + + +/** + * enum used below; can be used as the second argument of macro + * HIP_KERNEL_CHECK + */ +enum device_sync_t { + DEVICE_NO_SYNC = 0, + DEVICE_SYNC = 1 +}; + + +/** + * a simple macro helper: + * GET_KERNEL_CHECK_MACRO always picks the 3rd arg + * + * see https://stackoverflow.com/questions/11761703/overloading-macro-on-number-of-arguments + */ +#define GET_KERNEL_CHECK_MACRO(_1,_2,NAME,...) NAME + +/** + * another simple macro helper : + * - if HIP_KERNEL_CHECK is called with only 1 argument, then HIP_KERNEL_CHECK1 is chosen + * - if HIP_KERNEL_CHECK is called with 2 arguments, then HIP_KERNEL_CHECK2 is chosen + * + * + * this is the macro we want to call + */ +#define HIP_KERNEL_CHECK(...) GET_KERNEL_CHECK_MACRO(__VA_ARGS__, HIP_KERNEL_CHECK2, HIP_KERNEL_CHECK1)(__VA_ARGS__) + +/** + * Preprocessor macro helping to retrieve the exact code + * location where the error was emitted. + * + * Default behavior, don't synchronize device + */ +#define HIP_KERNEL_CHECK1(msg) hip_kernel_check((msg), __FILE__, __LINE__, DEVICE_NO_SYNC) + +/** + * Same as above, but let the user chose if we want to synchronize device. + */ +#define HIP_KERNEL_CHECK2(msg,sync) hip_kernel_check((msg), __FILE__, __LINE__, sync) + +/** + * Check last HIP kernel call status. + * If it was not successfull then print error message. + * + * \param[in] errstr error message to print + * \param[in] file source filename where error occured + * \param[in] line line number where error occured + * \param[in] sync integer, 0 means no device synchronization + */ +static void hip_kernel_check(const char* errstr, + const char* file, + const int line, + const int sync) +{ + + auto status = hipGetLastError(); + + if (sync or FORCE_SYNC_GPU) { + //fprintf(stderr, "syncing device\n"); + hipDeviceSynchronize(); + } + + if (status != hipSuccess) { + fprintf(stderr, + "%s(%i) : getLastHipError() HIP error :" + " %s : (%d) %s.\n", + file, line, errstr, static_cast(status), + hipGetErrorString(status)); + + //hipDeviceReset(); + //exit(EXIT_FAILURE); + } + +} // hip_kernel_check + +inline const char* _ConvertSMVer2ArchName(int major, int minor) { + // Defines for GPU Architecture types (using the SM version to determine + // the GPU Arch name) + typedef struct { + int SM; // 0xMm (hexidecimal notation), M = SM Major version, + // and m = SM minor version + const char* name; + } sSMtoArchName; + + sSMtoArchName nGpuArchNameSM[] = { + {0x30, "Kepler"}, + {0x32, "Kepler"}, + {0x35, "Kepler"}, + {0x37, "Kepler"}, + {0x50, "Maxwell"}, + {0x52, "Maxwell"}, + {0x53, "Maxwell"}, + {0x60, "Pascal"}, + {0x61, "Pascal"}, + {0x62, "Pascal"}, + {0x70, "Volta"}, + {0x72, "Xavier"}, + {0x75, "Turing"}, + {0x80, "Ampere"}, + {0x86, "Ampere"}, + {0x89, "AdaLovelace"}, + {0x90, "Hopper"}, + {-1, "Graphics Device"}}; + + int index = 0; + + while (nGpuArchNameSM[index].SM != -1) { + if (nGpuArchNameSM[index].SM == ((major << 4) + minor)) { + return nGpuArchNameSM[index].name; + } + + index++; + } + + // If we don't find the values, we default use the previous one + // to run properly + printf( + "MapSMtoArchName for SM %d.%d is undefined." + " Default to use %s\n", + major, minor, nGpuArchNameSM[index - 1].name); + return nGpuArchNameSM[index - 1].name; +} + + +#ifdef __HIP_RUNTIME_H__ + +// General check for HIP GPU SM Capabilities +inline bool checkHipCapabilities(int major_version, int minor_version) { + int dev; + int major = 0, minor = 0; + + CHECK_HIP_ERROR(hipGetDevice(&dev)); + CHECK_HIP_ERROR(hipDeviceGetAttribute(&major, hipDevAttrComputeCapabilityMajor, dev)); + CHECK_HIP_ERROR(hipDeviceGetAttribute(&minor, hipDevAttrComputeCapabilityMinor, dev)); + + if ((major > major_version) || + (major == major_version && + minor >= minor_version)) { + printf(" Device %d: <%16s >, Compute SM %d.%d detected\n", dev, + _ConvertSMVer2ArchName(major, minor), major, minor); + return true; + } else { + printf( + " No GPU device was found that can support " + "HIP compute capability %d.%d.\n", + major_version, minor_version); + return false; + } +} +#endif /* __HIP_RUNTIME_H__ */ + + +#endif /* HIP_API_ERROR_CHECK_H_ */ diff --git a/GX-PAW/common/src/17_gpu_toolbox/m_gpu_detect.F90 b/GX-PAW/common/src/17_gpu_toolbox/m_gpu_detect.F90 new file mode 100644 index 00000000..75e57faa --- /dev/null +++ b/GX-PAW/common/src/17_gpu_toolbox/m_gpu_detect.F90 @@ -0,0 +1,196 @@ +!!****m* ABINIT/m_gpu_detect +!! NAME +!! m_gpu_detect +!! +!! FUNCTION +!! Detects the GPU associated to any cpu and associates a GPU, if +!! possible, to any proc +!! +!! COPYRIGHT +!! Copyright (C) 2010-2024 ABINIT group (MMancini) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" + + +module m_gpu_detect + + use m_abicore + + use defs_basis + use m_xmpi + +#if defined HAVE_GPU_CUDA + use m_initcuda, only : Get_ndevice +#endif + + + implicit none + + private + + public :: & + find_set_gpu, & !Calc. the number of point,GPU,for any proc + get_topo !Put the topology of machine in an integer +CONTAINS !=========================================================== +!!*** + + +!!****f* m_gpu_detect/find_set_gpu +!! NAME +!! find_set_gpu +!! +!! FUNCTION +!! Calculate the number of point,GPU,for any proc +!! +!! INPUTS +!! nproc= number of processor +!! commcart= mpi communicator +!! +!! OUTPUT +!! ngpu=total number of gpu distributed on all node <=nproc +!! gpu_map(0,nproc-1)=contains for any proc the associated device +!! number. -1 if no gpu is associated +!! +!! SOURCE + + subroutine find_set_gpu(nproc,commcart,gpu_map,ngpu) + + implicit none + + +!Arguments ------------------------------------ + integer,intent(in) :: nproc,commcart + integer,intent(out) :: ngpu + integer,intent(out) :: gpu_map(0:nproc-1) +!Local --------------------------- + integer :: ierr,ndev,avail_gpu + integer :: me,icpu,cpu_map_me + character(20) :: name_ch + character(20) :: nodes(0:nproc-1) + character(500) :: msg +! ********************************************************************* + + ngpu = 0 + gpu_map = -1 + ndev = 0 + me = 0 + +#if defined HAVE_GPU_CUDA + me = xmpi_comm_rank(commcart) + + !--Get the number of compatible device on this CPU + call Get_ndevice(ndev) + + if(nproc == 1) then + if(ndev /= 0) gpu_map(0) = 0 + ngpu = count(gpu_map>-1) + return + end if + + !--Get the name of the node + call xmpi_name(name_ch,ierr) + + !--Array containing the number of gpu seen by any cpu + call xmpi_allgather(ndev,gpu_map,commcart,ierr) + ! write(std_out,*)' me,nedevice ',gpu_map + + !--Array containing the name of the cpu + call xmpi_allgather(name_ch,nodes,commcart,ierr) + + !--Printing Nodes name + write(msg,'(3a)')& + & ' -Node names---------------',ch10,& + & ' me name ' + call wrtout(std_out,msg,'COLL') + do icpu=0,nproc-1 + write(msg,'(i5,a22)') icpu,trim(nodes(icpu)) + call wrtout(std_out,msg,'COLL') + end do + + !--research of the cpu on the same node of this cpu + ! write(std_out,*)'ndev ',ndev + icpu = 0 + avail_gpu = ndev + cpu_map_me = -1 + do while(avail_gpu /= 0 .and. icpu <= me ) + if( trim(nodes(icpu)) == trim(name_ch)) then + !--yes on the same node + if(me == icpu) cpu_map_me = ndev-avail_gpu + avail_gpu = avail_gpu -1 + endif + icpu = icpu +1 + end do + + !--All cpu know the cpu with associated gpu (and which gpu on the node) + !--Now gpu_map contains the number of the device which is associated + ! with any cpu (-1 if not) + call xmpi_allgather(cpu_map_me,gpu_map,commcart,ierr) + + !--Count the total number of gpu + ngpu = count(gpu_map>-1) + !write(std_out,*)'total gpu',ngpu + +#endif + +end subroutine find_set_gpu +!!*** + +!!****f* m_gpu_detect/get_topo +!! NAME +!! get_topo +!! +!! FUNCTION +!! Put the topology of machine in an integer +!! +!! INPUTS +!! nproc= number of processor +!! ngpu = mpi communicator +!! +!! OUTPUT +!! topo= 0: 1 cpu; +!! 1: n cpu; +!! 2: 1 cpu 1 gpu; +!! 3: n cpu n gpu +!! 4: n cpu > m gpu; +!! 5: n cpu < m gpu +!! +!! SOURCE + + subroutine get_topo(nproc,ngpu,topo) + + implicit none + +!Arguments ------------------------------------ + integer,intent(in) :: nproc,ngpu + integer,intent(out) :: topo +!Local --------------------------- + integer :: ierr,ndev,avail_gpu +! ********************************************************************* + topo = 0 + if(nproc>1) topo = 1 !ncpu>1 + if(ngpu==0) return !no gpu + + if(ngpu==nproc)then + topo = 2 !1cpu,1gpu + if (nproc>1)topo = 3 !ncpu,ngpu + return + else + topo = 4 !ncpu>ngpu + if(nproc=0) + ! device can be CPU deviceId = -1) + subroutine gpu_data_prefetch_async(dev_ptr, count, deviceId) + use, intrinsic :: iso_c_binding + implicit none + type(c_ptr), value :: dev_ptr + integer(kind=C_SIZE_T), value :: count + integer(kind=C_INT32_T), value,optional :: deviceId + + integer(kind=C_INT32_T) :: currentDevId + + ! if a device id is provided, use it + ! if not, just probe driver to get current device id + if (present(deviceId)) then + + if ( deviceId >= CPU_DEVICE_ID ) then + call gpu_data_prefetch_async_f(dev_ptr, count, deviceId) + end if + + else + + call gpu_get_device(currentDevId) + call gpu_data_prefetch_async_f(dev_ptr, count, currentDevId) + + end if + + end subroutine gpu_data_prefetch_async + +#endif +#endif + +end module m_gpu_toolbox +!!*** diff --git a/GX-PAW/common/src/17_gpu_toolbox/m_initcuda.F90 b/GX-PAW/common/src/17_gpu_toolbox/m_initcuda.F90 new file mode 100644 index 00000000..48de0809 --- /dev/null +++ b/GX-PAW/common/src/17_gpu_toolbox/m_initcuda.F90 @@ -0,0 +1,584 @@ +!!****m* ABINIT/m_initcuda +!! NAME +!! m_initcuda +!! +!! FUNCTION +!! Module containing all variables concerning GPU device +!! and the functions needed to extract them +!! +!! COPYRIGHT +!! Copyright (C) 2009-2024 ABINIT group (MMancini, MT, FDahm) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! NOTES +!! Is an experimental development +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#if defined HAVE_GPU_CUDA +#include "cuda_common.h" +#endif + +#include "abi_common.h" + +module m_initcuda + + use defs_basis + use m_abicore + use m_xomp + use m_xmpi, only: xmpi_world,xmpi_comm_rank,xmpi_comm_size,xmpi_abort + +#ifdef HAVE_KOKKOS + use m_kokkos_utils +#endif + +#ifdef HAVE_YAKL + use gator_mod +#endif + + implicit none + +#if defined HAVE_GPU_CUDA + integer,parameter,public :: cudap=kind(CUDA_KIND) +#endif + +!Structures +!!*** + +!!****t* m_initcuda/devGPU_type +!! NAME +!! devGPU_type +!! +!! FUNCTION +!! This structured datatype used to contains GPU properties +!! +!! +!! SOURCE + type,public :: devGPU_type + integer :: ndevice !--number of available devices + real(dp),allocatable :: maxmemdev(:) !--max global memory on any device + end type devGPU_type +!!*** + + private + + private :: & + prt_device_info !, & ! To print information about GPU + ! get_fastest_devices ! Get fastest GPU devices + + public :: & + InitGPU, & ! Initialise GPU + Get_Mem_Dev, & ! To obtain the max memory available on GPU device + Get_ndevice, & ! Number of devices of Capability>1.2 + CleanGPU, & ! Clean devGPU_type variables + setdevice_cuda, & ! Set device, print info, ... + unsetdevice_cuda ! Unset device + + +CONTAINS !=========================================================== +!!*** + + +!!****f* m_initcuda/prt_device_info +!! NAME +!! prt_device_info +!! +!! FUNCTION +!! Print information about GPU device +!! +!! SOURCE + + subroutine prt_device_info(device) + + implicit none +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: device +!Local variables ------------------------------ +!scalars + integer :: gflops,constmem,sharemem + integer :: ii,regist,lenname,ncores,nprocs + real(sp) :: globalmem,clockRate + character(20) :: name + character(20) :: formatdev + character(60) :: gflops_stg + character(500) :: msg +!arrays + integer :: vers(0:1) +! ********************************************************************* +#if defined HAVE_GPU + write(msg,'(a,80a)')' ',('_',ii=1,80) + call wrtout(std_out,msg,'PERS') + write(msg,'(a25,a25,a31,a)') '________________________',& +& ' Graphic Card Properties ','_______________________________' ,ch10 + call wrtout(std_out,msg,'PERS') + + call get_dev_info(device,name,lenname,vers,globalmem,clockRate,gflops,constmem,sharemem,regist,nprocs,ncores) + if (gflops<0) then + gflops_stg="undefined (add new def. in version_2_cores function)" + else + write(gflops_stg,'(i7,a)') gflops,' GFP' + end if + + write(formatdev,'(a12,i4,a)') '(a23,i4,a3,a',lenname,')' + write (msg,formatdev)& + & ' Device ',device,' : ',name(1:lenname) + call wrtout(std_out,msg,'PERS') + write (msg,'(a,2(i1,a),a,i9,a,a,a,f7.1,a,a,a,i9,a,i9,4a,2(a,i9,2a),a,i9,a)')& + & ' Revision number: ',vers(0),'.',vers(1),ch10, & + & ' Total amount of global memory: ',nint(globalmem),' Mbytes',ch10, & + & ' Clock rate: ',clockRate,' GHz',ch10, & + & ' Number of processors/cores: ',nprocs,'/',ncores,ch10, & + & ' Max GFLOPS: ',trim(gflops_stg),ch10, & + & ' Total constant memory: ',constmem,' bytes',ch10, & + & ' Shared memory per block: ',sharemem,' bytes',ch10, & + & ' Number of registers per block: ',regist,ch10 + call wrtout(std_out,msg,'PERS') + if(device == -1)then + write(msg,'(a)')' no cuda-GPU devices found' + call wrtout(std_out,msg,'PERS') + end if + write(msg,'(a,80a)')' ',('_',ii=1,80) + call wrtout(std_out,msg,'PERS') +#endif + end subroutine prt_device_info +!!*** + + +!!****f* m_initcuda/InitGPU +!! NAME +!! InitGPU +!! +!! FUNCTION +!! Print information about GPU device +!! +!! SOURCE + + subroutine InitGPU(gpuinfo,device) + + implicit none + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: device + type(devGPU_type),intent(inout) :: gpuinfo +!Local variables ------------------------------ +!scalars + real(sp) :: locmax +! ********************************************************************* + gpuinfo%ndevice = 0 +#if defined HAVE_GPU +!--Initialization + if(device>-1)then + !--Get the number of device for this proc + gpuinfo%ndevice = 1 + ABI_MALLOC(gpuinfo%maxmemdev,(0:1)) + call get_GPU_max_mem(device,locmax) + gpuinfo%maxmemdev(0:1) = locmax + call prt_device_info(device) + endif +#endif + end subroutine InitGPU +!!*** + + +!****f* m_initcuda/Get_ndevice +!! NAME +!! Get_ndevice +!! +!! FUNCTION +!! Give the number of device with capability>=1.2 +!! +!! SOURCE + + subroutine Get_ndevice(ndevice) + + implicit none +!Arguments ------------------------------------ +!scalars + integer,intent(out) :: ndevice +! ********************************************************************* +#if defined HAVE_GPU +!--Get the number of device for this proc + call c_get_ndevice(ndevice) +#endif + end subroutine Get_ndevice +!!*** + + + +!!****f* m_initcuda/Get_Mem_Dev +!! NAME +!! Get_Mem_Dev +!! +!! FUNCTION +!! Get the max memory availeble on device +!! +!! INPUTS +!! device device number +!! +!! OUTPUT +!! max_mem_dev +!! +!! SOURCE + +subroutine Get_Mem_Dev(device,max_mem_dev) + + implicit none + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: device + real(sp),intent(out) :: max_mem_dev +!Local variables ------------------------------ +! ********************************************************************* +#if defined HAVE_GPU + call get_GPU_max_mem(device,max_mem_dev) +#endif +end subroutine Get_Mem_Dev +!!*** + + +!!****f* m_initcuda/CleanGPU +!! NAME +!! CleanGPU +!! +!! FUNCTION +!! Print information about GPU device +!! +!! SOURCE + + subroutine CleanGPU(gpuinfo) + + implicit none + +!Arguments ------------------------------------ +!scalars + type(devGPU_type),intent(inout) :: gpuinfo +! ********************************************************************* +#if defined HAVE_GPU + if (allocated(gpuinfo%maxmemdev)) then + ABI_FREE(gpuinfo%maxmemdev) + end if +#endif + + end subroutine CleanGPU +!!*** + + +!!****f* m_initcuda/setdevice_cuda +!! NAME +!! setdevice_cuda +!! +!! FUNCTION +!! Detect and activate a GPU device from current CPU core +!! +!! INPUTS +!! gpu_devices(12)= list of GPU devices to choose on one node (in case of multiple devices); +!! if set to 20*-1, will choose the devices by order of performances. +!! +!! SIDE EFFECTS +!! gpu_option= which GPU implementation is used (None, CUDA, OpenMP, Kokkos) +!! +!! SOURCE + + subroutine setdevice_cuda(gpu_devices_node,gpu_option) + +#ifdef FC_NAG + use f90_unix_proc +#endif + implicit none + +!Arguments ------------------------------------ +!scalars + integer,intent(inout) :: gpu_option +!arrays + integer, intent(in) :: gpu_devices_node(12) +!Local variables ------------------------------ +!scalars + integer :: device,ii,jj,me,nb_devices,nproc + logical :: testopen + character(len=500) :: msg + type(devGPU_type) :: gpuinfo +!arrays + integer,allocatable :: fastest_devices(:) +! ********************************************************************* + + if (gpu_option==ABI_GPU_DISABLED) return + + nproc=xmpi_comm_size(xmpi_world) + me=xmpi_comm_rank(xmpi_world) + +#if defined HAVE_GPU + device=-1 + call c_get_ndevice(nb_devices) + !nb_devices=min(nb_devices,20) + if(nb_devices>0) then + if(nb_devices==1) then + device=0 + else if(all(gpu_devices_node(1:nb_devices)==-1)) then + ABI_MALLOC(fastest_devices,(0:nproc-1)) + call get_fastest_devices(fastest_devices,nb_devices) + device=fastest_devices(me) + ABI_FREE(fastest_devices) + else + jj=nb_devices + do ii=jj,2,-1 + if(gpu_devices_node(ii)==-1) nb_devices=ii-1 + end do + device=gpu_devices_node(1+mod(me,nb_devices)) + end if + + ! Initialize Kokkos and YAKL if requested + if(gpu_option==ABI_GPU_KOKKOS .or. gpu_option==ABI_GPU_LEGACY) then +#ifdef HAVE_KOKKOS + ! initialize kokkos + if (xmpi_comm_rank(xmpi_world) == 0) then + write(std_out,*)'initializinging kokkos in MPI process ', xmpi_comm_rank(xmpi_world) + end if + call kokkos_initialize() + + ! only master MPI process print kokkos config + if (xmpi_comm_rank(xmpi_world) == 0) then + call abinit_kokkos_print_config() + endif +#endif + +#ifdef HAVE_YAKL + call gator_init() +#endif + end if + + call set_dev(device) + call check_context(nb_devices,msg) + if(gpu_option==ABI_GPU_OPENMP) then + call xomp_set_default_device(device) + end if + if(nb_devices==1) then !allocation succeed + write(msg, '(4a,i1,2a)' ) ch10,& +& ' setdevice_cuda : COMMENT -',ch10,& +& ' GPU ',device,' has been properly initialized, continuing...',ch10 + call wrtout(std_out,msg,'PERS') + else !gpu allocation failed we print error message returned and exit + device=-1 + call wrtout(std_out,msg,'COLL') + call xmpi_abort() + inquire(std_out,OPENED=testopen) + if (testopen) close(std_out) +#if defined FC_NAG + call exit(-1) +#elif defined HAVE_FC_EXIT + call exit(1) +#else + stop 1 +#endif + end if + call InitGPU(gpuinfo,device) + call CleanGPU(gpuinfo) + else + gpu_option=ABI_GPU_DISABLED + end if +#endif + end subroutine setdevice_cuda +!!*** + + +!!****f* m_initcuda/unsetdevice_cuda +!! NAME +!! unsetdevice_cuda +!! +!! FUNCTION +!! Deactivate a GPU device from current CPU core +!! +!! INPUTS +!! gpu_option= which GPU implementation is used (None, CUDA, OpenMP, Kokkos) +!! +!! SOURCE + + subroutine unsetdevice_cuda(gpu_option) + + implicit none + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: gpu_option +!Local variables ------------------------------ +!scalars + character(len=500) :: msg +! ********************************************************************* + + if (gpu_option==ABI_GPU_DISABLED) return + +#if defined HAVE_GPU + + ! Closing YAKL and Kokkos if opened + if (gpu_option==ABI_GPU_KOKKOS) then +#ifdef HAVE_YAKL + call gator_finalize() + write(std_out,*)'yakl gator finalized' +#endif +#ifdef HAVE_KOKKOS + ! finalize kokkos + call kokkos_finalize() + write(std_out,*)'kokkos finalized' +#endif + !kokkos_finalize already reset GPU context + !if (gpu_option/=ABI_GPU_KOKKOS) call unset_dev() + end if + + if (gpu_option==ABI_GPU_LEGACY) then + call unset_dev() + end if + +#endif + end subroutine unsetdevice_cuda +!!*** + + +!!****f* m_initcuda/get_fastest_devices +!! NAME +!! get_fastest_devices +!! +!! FUNCTION +!! In case of multiple devices, sort them by performances +!! and output the resulting list of devices. +!! +!! SOURCE + + subroutine get_fastest_devices(devices,nb_devices) + + implicit none + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: nb_devices + integer,intent(out) :: devices(:) +!Local variables ------------------------------ +!scalars + integer :: ii,nproc + character(len=500) :: msg +#if defined HAVE_GPU + integer :: constmem,gflops,jj,lenname,nprocs,ncores,regist,sharemem + real(sp) :: clockRate,globalmem + character(len=20) :: name +#endif +!arrays +#if defined HAVE_GPU + integer :: vers(0:1) + integer,allocatable :: isort(:) + real(dp),allocatable :: flops(:),mem(:) +#endif + +! ********************************************************************* + + nproc=xmpi_comm_size(xmpi_world) + if (size(devices)/=nproc) stop 'wrong size for devices array!' + +!Default + do ii=0,nproc-1 + devices(ii+1) = MOD(ii,nb_devices) + end do + if (nb_devices==1) return + + write(msg,'(a,i2,a)') ch10,nb_devices,' GPU device(s) have been detected on the current node:' + call wrtout(std_out,msg,'PERS') + +#if defined HAVE_GPU +!Check device(s) properties + ABI_MALLOC(flops,(nb_devices)) + ABI_MALLOC(mem, (nb_devices)) + do ii=0,nb_devices-1 + call set_dev(ii) + call get_dev_info(ii,name,lenname,vers,globalmem,clockRate,gflops,constmem,& +& sharemem,regist,nprocs,ncores) + flops(ii+1)=dble(gflops) ; mem(ii+1)=dble(globalmem) + call unset_dev() + write(msg,'(a,i2,3a,i1,a,i1,a,i6,a,f7.1,a,i7,a,i4,a,i4,a)') & +& ' Device ',ii,': ',trim(name(1:lenname)),', v',vers(0),'.',vers(1),', Mem=',nint(globalmem),& +& ' Mbytes, Clock=',clockrate,' GHz, ',gflops,' GFLOPS, ',nprocs,' processors, ',ncores,' cores' + call wrtout(std_out,msg,'PERS') + end do + +!Sort devices (first by flops, then by memory) + ABI_MALLOC(isort,(nb_devices)) + isort(:)=(/(ii,ii=1,nb_devices)/) + call my_sort(flops,mem,isort) + +!Distribute cards among procs + do ii=0,nproc-1 + jj=MOD(ii,nb_devices) + devices(ii+1) = isort(jj+1)-1 + end do + + ABI_FREE(isort) + ABI_FREE(flops) + ABI_FREE(mem) +#endif + +contains +!!*** + +!!****f* m_initcuda/my_sort +!! NAME +!! my_sort +!! +!! FUNCTION +!! Small sorting routine: change iperm array +!! according to list1 values then list2 values +!! +!! SOURCE + + subroutine my_sort(list1,list2,iperm) + + implicit none + +!Arguments ------------------------------------ +!scalars + integer,intent(inout) :: iperm(:) + real(dp),intent(in) :: list1(:),list2(:) +!Local variables ------------------------------ +!scalars + integer :: ll,mm,nn,pp + real(dp) :: xx +!arrays + real(dp),allocatable :: llist(:) + +! ********************************************************************* + + nn=size(iperm) + ABI_MALLOC(llist,(nn)) + llist(:)=list1(:) + do ll=1,nn-1 + do mm=ll+1,nn + if (llist(mm)>llist(ll)) then + xx=llist(ll);llist(ll)=llist(mm);llist(mm)=xx + pp=iperm(ll);iperm(ll)=iperm(mm);iperm(mm)=pp + end if + end do + end do + do ll=1,nn-1 + do mm=ll+1,nn + if (abs(llist(mm)-llist(ll))list2(iperm(ll))) then + xx=llist(ll);llist(ll)=llist(mm);llist(mm)=xx + pp=iperm(ll);iperm(ll)=iperm(mm);iperm(mm)=pp + end if + end if + end do + end do + ABI_FREE(llist) + + end subroutine my_sort +!!*** + + end subroutine get_fastest_devices +!!*** + +end module m_initcuda +!!*** diff --git a/GX-PAW/common/src/17_gpu_toolbox/m_nvtx.F90 b/GX-PAW/common/src/17_gpu_toolbox/m_nvtx.F90 new file mode 100644 index 00000000..9545cea3 --- /dev/null +++ b/GX-PAW/common/src/17_gpu_toolbox/m_nvtx.F90 @@ -0,0 +1,145 @@ +!!****m* ABINIT/m_nvtx +!! NAME +!! m_nvtx +!! +!! FUNCTION +!! Provide profiling helper routine to annotate execution ranges on both CPU and GPU +!! The code below is just a wrapper around the Nvidia NVTX (version 3) library. +!! It is borrowed from https://developer.nvidia.com/blog/customize-cuda-fortran-profiling-nvtx/ +!! This module should (TBC) only be activated when GPU execution is enabled. +!! +!! COPYRIGHT +!! Copyright (C) 2010-2024 ABINIT group +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + + +module m_nvtx + use, intrinsic :: iso_c_binding + implicit none + + integer,private,parameter :: nbcol=19 + integer(kind=C_INT32_T),private :: col(nbcol) = [ & + & int(Z'0000ff00',kind=C_INT32_T), & ! GREEN + & int(Z'000000ff',kind=C_INT32_T), & ! BLUE + & int(Z'00ffff00',kind=C_INT32_T), & ! YELLOW + & int(Z'00ff00ff',kind=C_INT32_T), & ! PURPLE + & int(Z'0000ffff',kind=C_INT32_T), & ! CYAN + & int(Z'00ff0000',kind=C_INT32_T), & ! READ + & int(Z'00ff8000',kind=C_INT32_T), & ! ORANGE + & int(Z'000080ff',kind=C_INT32_T), & ! LIGHT BLUE + & int(Z'00ff80ff',kind=C_INT32_T), & ! PINK + & int(Z'0080ff80',kind=C_INT32_T), & ! LIGHT GREEN + & int(Z'00b832ff',kind=C_INT32_T), & + & int(Z'00f9fa7d',kind=C_INT32_T), & ! LIGHT YELLOW + & int(Z'00f96c56',kind=C_INT32_T), & + & int(Z'0094b5dc',kind=C_INT32_T), & + & int(Z'00cc99ff',kind=C_INT32_T), & ! LIGHT PURPLE + & int(Z'00a50201',kind=C_INT32_T), & ! DARK RED + & int(Z'0001a4a5',kind=C_INT32_T), & ! KIND OF CYAN + & int(Z'00d8fb08',kind=C_INT32_T), & ! FLASHY YELLOW + & int(Z'0090aacc',kind=C_INT32_T) ] + character,private,target :: tempName(256) + + type, bind(C):: nvtxEventAttributes + integer(C_INT16_T):: version=1 + integer(C_INT16_T):: size=48 ! + integer(C_INT):: category=0 + integer(C_INT):: colorType=1 ! NVTX_COLOR_ARGB = 1 + integer(C_INT):: color + integer(C_INT):: payloadType=0 ! NVTX_PAYLOAD_UNKNOWN = 0 + integer(C_INT):: reserved0 + integer(C_INT64_T):: payload ! union uint,int,double + integer(C_INT):: messageType=1 ! NVTX_MESSAGE_TYPE_ASCII = 1 + type(C_PTR):: message ! ascii char + end type nvtxEventAttributes + +#ifdef HAVE_GPU_MARKERS + + interface nvtxRangePush + ! push range with custom label and standard color +#if defined HAVE_GPU_CUDA + subroutine nvtxRangePushA(name) bind(C, name='nvtxRangePushA') +#elif defined HAVE_GPU_HIP + subroutine nvtxRangePushA(name) bind(C, name='roctxRangePushA') +#endif + use, intrinsic :: iso_c_binding + character(kind=C_CHAR) :: name(256) + end subroutine nvtxRangePushA +#ifdef HAVE_GPU_CUDA + ! push range with custom label and custom color + subroutine nvtxRangePushEx(event) bind(C, name='nvtxRangePushEx') + use, intrinsic :: iso_c_binding + import:: nvtxEventAttributes + type(nvtxEventAttributes):: event + end subroutine nvtxRangePushEx +#endif + end interface nvtxRangePush + + interface nvtxRangePop +#if defined HAVE_GPU_CUDA + subroutine nvtxRangePop() bind(C, name='nvtxRangePop') +#elif defined HAVE_GPU_HIP + subroutine nvtxRangePop() bind(C, name='roctxRangePop') +#endif + end subroutine nvtxRangePop + end interface nvtxRangePop + + interface + ! start profiling + subroutine nvtxProfilerStart() bind(C, name='cudaProfilerStart') + end subroutine nvtxProfilerStart + ! stop profiling + subroutine nvtxProfilerStop() bind(C, name='cudaProfilerStop') + end subroutine nvtxProfilerStop + + end interface + +contains + + subroutine nvtxStartRange(name,id) + + implicit none + + character(kind=c_char,len=*) :: name + integer, optional:: id + type(nvtxEventAttributes):: event + character(kind=c_char,len=256) :: trimmed_name + integer:: i + + trimmed_name=trim(name)//c_null_char + + ! move scalar trimmed_name into character array tempName + do i=1,LEN(trim(name)) + 1 + tempName(i) = trimmed_name(i:i) + enddo + +#if defined HAVE_GPU_CUDA + if ( .not. present(id)) then + call nvtxRangePush(tempName) + else + event%color=col(mod(id,nbcol)+1) + event%message=c_loc(tempName) + call nvtxRangePushEx(event) + end if +#elif defined HAVE_GPU_HIP + call nvtxRangePush(tempName) +#endif + + end subroutine nvtxStartRange + + subroutine nvtxEndRange + call nvtxRangePop + end subroutine nvtxEndRange + +#endif + +end module m_nvtx +!!*** diff --git a/GX-PAW/common/src/17_gpu_toolbox/timing.cpp b/GX-PAW/common/src/17_gpu_toolbox/timing.cpp new file mode 100644 index 00000000..cdb15b0c --- /dev/null +++ b/GX-PAW/common/src/17_gpu_toolbox/timing.cpp @@ -0,0 +1,21 @@ +/* timing_cuda.cpp */ + +/* + * Copyright (C) 2008-2024 ABINIT Group (MMancini) + * + * This file is part of the ABINIT software package. For license information, + * please see the COPYING file in the top-level directory of the ABINIT source + * distribution. + * + */ + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#ifdef HAVE_GPU_CUDA +#include "timing_cuda.cpp" +#endif +#ifdef HAVE_GPU_HIP +#include "timing_hip.cpp" +#endif diff --git a/GX-PAW/common/src/17_gpu_toolbox/timing_cuda.cpp b/GX-PAW/common/src/17_gpu_toolbox/timing_cuda.cpp new file mode 100644 index 00000000..01e37ee8 --- /dev/null +++ b/GX-PAW/common/src/17_gpu_toolbox/timing_cuda.cpp @@ -0,0 +1,63 @@ +/* timing_cuda.cpp */ + +/* + * Copyright (C) 2008-2024 ABINIT Group (MMancini) + * + * This file is part of the ABINIT software package. For license information, + * please see the COPYING file in the top-level directory of the ABINIT source + * distribution. + * + */ + +#include +#include +#include + +/*=========================================================================*/ +/*_________________________TIMING IN CUDA ROUTINES_________________________*/ +/*=========================================================================*/ +/* This file contains some basic utils from the time measuration in + * cuda subroutines. A more particular version is contained in + * prt_utils_rec.cu (to put together) +*/ + + +/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +/*~~~~~~~~~~~~~~~~~~~~~~~~ INTERFACE WITH FORTRAN ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +extern "C" +void start_cuda_tm_(cudaEvent_t* start,cudaEvent_t* stop) +{ + cudaEventCreate(start); + cudaEventCreate(stop); + cudaEventRecord(*start,0); + return; +}; + +extern "C" +void stop_cuda_tm_(cudaEvent_t* stop) +{ + cudaEventRecord(*stop,0); + cudaEventSynchronize(*stop); + printf("stop %d\n",*stop); + return; +} + +extern "C" +void calc_cuda_time_(cudaEvent_t* stop,cudaEvent_t* start,float* time_ms) +{ +#if defined HAVE_GPU_CUDA3 + cudaThreadSynchronize(); +#else + cudaDeviceSynchronize(); +#endif + *time_ms = 0.; + stop_cuda_tm_(stop); + cudaEventElapsedTime(time_ms,*start,*stop); + printf("stop %d\n",*start); + printf("stop %d\n",*stop); + printf("stop %f\n",time_ms); + cudaEventDestroy(*start); + cudaEventDestroy(*stop); + return ; +} diff --git a/GX-PAW/common/src/17_gpu_toolbox/timing_hip.cpp b/GX-PAW/common/src/17_gpu_toolbox/timing_hip.cpp new file mode 100644 index 00000000..27c36b66 --- /dev/null +++ b/GX-PAW/common/src/17_gpu_toolbox/timing_hip.cpp @@ -0,0 +1,58 @@ +/* timing_hip.cpp */ + +/* + * Copyright (C) 2008-2024 ABINIT Group (MMancini) + * + * This file is part of the ABINIT software package. For license information, + * please see the COPYING file in the top-level directory of the ABINIT source + * distribution. + * + */ + +#include "stdio.h" +#include + +/*=========================================================================*/ +/*_________________________TIMING IN HIP ROUTINES__________________________*/ +/*=========================================================================*/ +/* This file contains some basic utils from the time measuration in + * hip subroutines. A more particular version is contained in + * prt_utils_rec.cu (to put together) +*/ + + +/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +/*~~~~~~~~~~~~~~~~~~~~~~~~ INTERFACE WITH FORTRAN ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ +extern "C" +void start_cuda_tm_(hipEvent_t* start,hipEvent_t* stop) +{ + hipEventCreate(start); + hipEventCreate(stop); + hipEventRecord(*start,0); + return; +}; + +extern "C" +void stop_cuda_tm_(hipEvent_t* stop) +{ + hipEventRecord(*stop,0); + hipEventSynchronize(*stop); + printf("stop %d\n",*stop); + return; +} + +extern "C" +void calc_cuda_time_(hipEvent_t* stop,hipEvent_t* start,float* time_ms) +{ + hipDeviceSynchronize(); + *time_ms = 0.; + stop_cuda_tm_(stop); + hipEventElapsedTime(time_ms,*start,*stop); + printf("stop %d\n",*start); + printf("stop %d\n",*stop); + printf("stop %f\n",time_ms); + hipEventDestroy(*start); + hipEventDestroy(*stop); + return ; +} diff --git a/GX-PAW/common/src/17_libtetra_ext/Makefile b/GX-PAW/common/src/17_libtetra_ext/Makefile new file mode 100644 index 00000000..08809bfd --- /dev/null +++ b/GX-PAW/common/src/17_libtetra_ext/Makefile @@ -0,0 +1,1503 @@ +# Makefile.in generated by automake 1.16.3 from Makefile.am. +# shared/common/src/17_libtetra_ext/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994-2020 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-corelibs on 2024/03/16 21:07:38 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-corelibs script or its config file instead. +# + + +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/abinit +pkgincludedir = $(includedir)/abinit +pkglibdir = $(libdir)/abinit +pkglibexecdir = $(libexecdir)/abinit +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = x86_64-apple-darwin18.7.0 +host_triplet = x86_64-apple-darwin18.7.0 +target_triplet = x86_64-apple-darwin18.7.0 +subdir = shared/common/src/17_libtetra_ext +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/m4/arch-gpu.m4 \ + $(top_srcdir)/config/m4/arch-mpi.m4 \ + $(top_srcdir)/config/m4/auto-autotools.m4 \ + $(top_srcdir)/config/m4/auto-corelibs.m4 \ + $(top_srcdir)/config/m4/auto-debug.m4 \ + $(top_srcdir)/config/m4/auto-dirflags.m4 \ + $(top_srcdir)/config/m4/auto-env.m4 \ + $(top_srcdir)/config/m4/auto-hints.m4 \ + $(top_srcdir)/config/m4/auto-optim.m4 \ + $(top_srcdir)/config/m4/auto-options.m4 \ + $(top_srcdir)/config/m4/auto-output.m4 \ + $(top_srcdir)/config/m4/auto-triggers.m4 \ + $(top_srcdir)/config/m4/conf-atompaw.m4 \ + $(top_srcdir)/config/m4/conf-debug.m4 \ + $(top_srcdir)/config/m4/conf-fallbacks.m4 \ + $(top_srcdir)/config/m4/conf-files.m4 \ + $(top_srcdir)/config/m4/conf-init.m4 \ + $(top_srcdir)/config/m4/conf-openmp.m4 \ + $(top_srcdir)/config/m4/conf-optim.m4 \ + $(top_srcdir)/config/m4/lang-c++.m4 \ + $(top_srcdir)/config/m4/lang-c.m4 \ + $(top_srcdir)/config/m4/lang-fortran-import.m4 \ + $(top_srcdir)/config/m4/lang-fortran.m4 \ + $(top_srcdir)/config/m4/lang-python.m4 \ + $(top_srcdir)/config/m4/libxml2.m4 \ + $(top_srcdir)/config/m4/misc-display.m4 \ + $(top_srcdir)/config/m4/sd_abinit_common.m4 \ + $(top_srcdir)/config/m4/sd_arch_gpu.m4 \ + $(top_srcdir)/config/m4/sd_arch_mpi.m4 \ + $(top_srcdir)/config/m4/sd_bigdft.m4 \ + $(top_srcdir)/config/m4/sd_core.m4 \ + $(top_srcdir)/config/m4/sd_esl.m4 \ + $(top_srcdir)/config/m4/sd_fftw3.m4 \ + $(top_srcdir)/config/m4/sd_gpu_kokkos.m4 \ + $(top_srcdir)/config/m4/sd_gpu_yakl.m4 \ + $(top_srcdir)/config/m4/sd_io_hdf5.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf_fortran.m4 \ + $(top_srcdir)/config/m4/sd_levmar.m4 \ + $(top_srcdir)/config/m4/sd_libpaw.m4 \ + $(top_srcdir)/config/m4/sd_libpsml.m4 \ + $(top_srcdir)/config/m4/sd_libxc.m4 \ + $(top_srcdir)/config/m4/sd_math_fft.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_core.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_util.m4 \ + $(top_srcdir)/config/m4/sd_papi.m4 \ + $(top_srcdir)/config/m4/sd_pfft.m4 \ + $(top_srcdir)/config/m4/sd_triqs.m4 \ + $(top_srcdir)/config/m4/sd_wannier90.m4 \ + $(top_srcdir)/config/m4/sd_xmlf90.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +AM_V_AR = $(am__v_AR_$(V)) +am__v_AR_ = $(am__v_AR_$(AM_DEFAULT_VERBOSITY)) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = +lib17_libtetra_ext_a_AR = $(AR) $(ARFLAGS) +lib17_libtetra_ext_a_LIBADD = +am__objects_1 = libtetrabz.$(OBJEXT) libtetrabz_common.$(OBJEXT) \ + libtetrabz_dbldelta_mod.$(OBJEXT) \ + libtetrabz_dblstep_mod.$(OBJEXT) libtetrabz_dos_mod.$(OBJEXT) \ + libtetrabz_fermigr_mod.$(OBJEXT) libtetrabz_occ_mod.$(OBJEXT) \ + libtetrabz_polcmplx_mod.$(OBJEXT) \ + libtetrabz_polstat_mod.$(OBJEXT) m_simtet.$(OBJEXT) \ + m_krank.$(OBJEXT) m_tetrahedron.$(OBJEXT) +am_lib17_libtetra_ext_a_OBJECTS = $(am__objects_1) +lib17_libtetra_ext_a_OBJECTS = $(am_lib17_libtetra_ext_a_OBJECTS) +AM_V_P = $(am__v_P_$(V)) +am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY)) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I. -I$(top_builddir) +PPFCCOMPILE = $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) +AM_V_PPFC = $(am__v_PPFC_$(V)) +am__v_PPFC_ = $(am__v_PPFC_$(AM_DEFAULT_VERBOSITY)) +am__v_PPFC_0 = @echo " PPFC " $@; +am__v_PPFC_1 = +FCLD = $(FC) +FCLINK = $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \ + $@ +AM_V_FCLD = $(am__v_FCLD_$(V)) +am__v_FCLD_ = $(am__v_FCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_FCLD_0 = @echo " FCLD " $@; +am__v_FCLD_1 = +SOURCES = $(lib17_libtetra_ext_a_SOURCES) +DIST_SOURCES = $(lib17_libtetra_ext_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ABINIT_BINARY_PACKAGE = abinit-10.0.0.83-58be4d_x86_64_darwin18.7.0_gnu9.4 +ABINIT_COMMON_CPPFLAGS = +ABINIT_COMMON_FCFLAGS = +ABINIT_COMMON_LDFLAGS = +ABINIT_COMMON_LIBS = +ABINIT_TARGET = x86_64_darwin18.7.0_gnu9.4 +ABINIT_VERSION = 10.0.0.83-58be4d +ABINIT_VERSION_BASE = 10.0 +ABINIT_VERSION_BUILD = 20240316 +ABINIT_VERSION_MAJOR = 10 +ABINIT_VERSION_MICRO = 0 +ABINIT_VERSION_MINOR = 0 +ABI_CPPFLAGS = -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include +ACLOCAL = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' aclocal-1.16 +AMTAR = $${TAR-tar} +AM_DEFAULT_VERBOSITY = 1 +AR = ar +ARFLAGS = rc +ARFLAGS_CMD = rc +ARFLAGS_DEBUG = +ARFLAGS_EXTRA = +ARFLAGS_HINTS = +ARFLAGS_OPTIM = +ATOMPAW_BIN = +AUTOCONF = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' autoconf +AUTOHEADER = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' autoheader +AUTOMAKE = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' automake-1.16 +AWK = awk +BIGDFT_CPPFLAGS = +BIGDFT_FCFLAGS = +BIGDFT_LDFLAGS = +BIGDFT_LIBS = +BOURNE_SHELL = /bin/sh +CC = /opt/local/bin/mpicc +CCDEPMODE = depmode=gcc3 +CC_LDFLAGS = +CC_LDFLAGS_DEBUG = +CC_LDFLAGS_EXTRA = +CC_LDFLAGS_GPU = +CC_LDFLAGS_HINTS = +CC_LDFLAGS_OPTIM = +CC_LIBS = +CC_LIBS_DEBUG = +CC_LIBS_EXTRA = +CC_LIBS_GPU = +CC_LIBS_HINTS = +CC_LIBS_OPTIM = +CFLAGS = -O2 -g +CFLAGS_DEBUG = +CFLAGS_EXTRA = +CFLAGS_GPU = +CFLAGS_HINTS = +CFLAGS_OPTIM = +CPP = /opt/local/bin/mpicc -E +CPPFLAGS = +CPPFLAGS_DEBUG = +CPPFLAGS_EXTRA = +CPPFLAGS_GPU = +CPPFLAGS_HINTS = +CPPFLAGS_HINTS_EXT = -P -std=c99 +CPPFLAGS_OPTIM = +CXX = /opt/local/bin/mpicxx +CXXDEPMODE = depmode=gcc3 +CXXFLAGS = -O2 -g +CXXFLAGS_DEBUG = +CXXFLAGS_EXTRA = +CXXFLAGS_GPU = +CXXFLAGS_HINTS = +CXXFLAGS_OPTIM = +CXX_LDFLAGS = +CXX_LDFLAGS_DEBUG = +CXX_LDFLAGS_EXTRA = +CXX_LDFLAGS_GPU = +CXX_LDFLAGS_HINTS = +CXX_LDFLAGS_OPTIM = +CXX_LIBS = +CXX_LIBS_DEBUG = +CXX_LIBS_EXTRA = +CXX_LIBS_GPU = +CXX_LIBS_HINTS = +CXX_LIBS_OPTIM = +CYGPATH_W = echo +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +ECHO_C = \c +ECHO_N = +ECHO_T = +EGREP = /usr/bin/grep -E +EXEEXT = +F77 = /opt/local/bin/mpif90 +FC = /opt/local/bin/mpif90 +FCFLAGS = -O2 -g -ffree-line-length-none -I/opt/local/include -I/opt/local/include -I/opt/local/include +FCFLAGS_DEBUG = +FCFLAGS_EXTRA = +FCFLAGS_F90 = +FCFLAGS_FIXEDFORM = -ffixed-form +FCFLAGS_FREEFORM = -ffree-form +FCFLAGS_HINTS = -ffree-line-length-none +FCFLAGS_MODDIR = -J../mods +FCFLAGS_OPENMP = +FCFLAGS_OPENMP_OFFLOAD = +FCFLAGS_OPTIM = +FCLIBS = -L/opt/local/lib -L/opt/local/lib/openmpi-gcc9 -L/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0 -L/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/../../.. -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi -lgfortran -lquadmath -lm +FC_LDFLAGS = +FC_LDFLAGS_DEBUG = +FC_LDFLAGS_EXTRA = +FC_LDFLAGS_HINTS = +FC_LDFLAGS_OPTIM = +FC_LIBS = +FC_LIBS_DEBUG = +FC_LIBS_EXTRA = +FC_LIBS_HINTS = +FC_LIBS_OPTIM = +FC_NOWRAP = /opt/local/bin/mpif90 +FFLAGS = -O2 -g -ffree-line-length-none -I/opt/local/include -I/opt/local/include -I/opt/local/include +FFTW3_CFLAGS = +FFTW3_CPPFLAGS = -I/opt/local/include +FFTW3_FCFLAGS = -I/opt/local/include +FFTW3_LDFLAGS = +FFTW3_LIBS = -L/opt/local/lib -lfftw3 -lfftw3f +FFT_CFLAGS = +FFT_FCFLAGS = +FPP = +FPPFLAGS = +FPPFLAGS_DEBUG = +FPPFLAGS_EXTRA = +FPPFLAGS_HINTS = +FPPFLAGS_OPTIM = +GPU_ARCH = +GPU_CFLAGS = +GPU_CPPFLAGS = +GPU_CXXFLAGS = +GPU_FCFLAGS = +GPU_LDFLAGS = +GPU_LIBS = +GRAPHATOM_BIN = +GREP = /usr/bin/grep +H5CC = +HDF5_CFLAGS = +HDF5_CPPFLAGS = +HDF5_CXXFLAGS = +HDF5_FCFLAGS = +HDF5_LDFLAGS = +HDF5_LIBS = +INSTALL = /opt/local/libexec/gnubin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +KOKKOS_CPPFLAGS = +KOKKOS_CXXFLAGS = +KOKKOS_LDFLAGS = +KOKKOS_LIBS = +LDFLAGS = +LEVMAR_CFLAGS = +LEVMAR_CPPFLAGS = +LEVMAR_LDFLAGS = +LEVMAR_LIBS = +LIBOBJS = +LIBPAW_CPPFLAGS = +LIBPAW_FCFLAGS = +LIBPAW_LDFLAGS = +LIBPAW_LIBS = +LIBPSML_CPPFLAGS = +LIBPSML_FCFLAGS = +LIBPSML_LDFLAGS = +LIBPSML_LIBS = +LIBS = -L/opt/local/lib -lwannier -L/opt/local/lib -lxc -L/opt/local/lib -lnetcdff -L/opt/local/lib -lnetcdf -L/opt/local/lib -L/opt/local/lib -lhdf5_hl -L/opt/local/lib -lhdf5 -lz -ldl -lm -L/opt/local/lib -lfftw3 -lfftw3f +LIBXC_CFLAGS = +LIBXC_CPPFLAGS = +LIBXC_FCFLAGS = +LIBXC_LDFLAGS = +LIBXC_LIBS = +LIBXML2_CPPFLAGS = +LIBXML2_FCFLAGS = +LIBXML2_LIBS = +LINALG_CFLAGS = +LINALG_CPPFLAGS = +LINALG_CXXFLAGS = +LINALG_FCFLAGS = -I/opt/local/include +LINALG_LDFLAGS = +LINALG_LIBS = -L/opt/local/lib -lopenblas +LN_S = ln -s +LTLIBOBJS = +MAKEINFO = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' makeinfo +MKDIR_P = /opt/local/libexec/gnubin/mkdir -p +MODEXT = mod +MPI_CFLAGS = +MPI_CPPFLAGS = +MPI_CXXFLAGS = +MPI_FCFLAGS = +MPI_LDFLAGS = +MPI_LIBS = +MV = /opt/local/libexec/gnubin/mv +NETCDF_CFLAGS = +NETCDF_CPPFLAGS = +NETCDF_CXXFLAGS = +NETCDF_FCFLAGS = +NETCDF_FORTRAN_CFLAGS = +NETCDF_FORTRAN_CPPFLAGS = +NETCDF_FORTRAN_CXXFLAGS = +NETCDF_FORTRAN_FCFLAGS = +NETCDF_FORTRAN_LDFLAGS = +NETCDF_FORTRAN_LIBS = +NETCDF_LDFLAGS = +NETCDF_LIBS = +NVCC = +NVCC_CFLAGS = +NVCC_CPPFLAGS = +NVCC_LDFLAGS = +NVCC_LIBS = +OBJEXT = o +PACKAGE = abinit +PACKAGE_BUGREPORT = https://bugs.launchpad.net/abinit/ +PACKAGE_NAME = ABINIT +PACKAGE_STRING = ABINIT 10.0.0.83-58be4d +PACKAGE_TARNAME = abinit +PACKAGE_URL = +PACKAGE_VERSION = 10.0.0.83-58be4d +PAPI_CFLAGS = +PAPI_CPPFLAGS = +PAPI_LDFLAGS = +PAPI_LIBS = +PATCH = patch +PATH_SEPARATOR = : +PERL = /usr/bin/perl +PFFT_CFLAGS = +PFFT_CPPFLAGS = +PFFT_LDFLAGS = +PFFT_LIBS = +PYFLAGS = +PYTHON = python3.9 +PYTHON_CONFIG = python3.9-config +PYTHON_CPPFLAGS = -I/opt/local/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -I/opt/local/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 +RANLIB = ranlib +REALPATH = realpath +RM = /opt/local/libexec/gnubin/rm +SED = /usr/bin/sed +SET_MAKE = +SHELL = /bin/sh +STRIP = +TAR = tar +TRIQS_CFLAGS = +TRIQS_CPPFLAGS = +TRIQS_CXXFLAGS = +TRIQS_LDFLAGS = +TRIQS_LIBS = +TRUE_CPP = cpp +VERSION = 10.0.0.83-58be4d +WANNIER90_CPPFLAGS = +WANNIER90_FCFLAGS = -I/opt/local/include +WANNIER90_LDFLAGS = +WANNIER90_LIBS = -L/opt/local/lib -lwannier +XML2_CONFIG = +XMLF90_CPPFLAGS = +XMLF90_FCFLAGS = +XMLF90_LDFLAGS = +XMLF90_LIBS = +XML_CPPFLAGS = +XML_LIBS = +XPP = +XPPFLAGS = +XPPFLAGS_DEBUG = +XPPFLAGS_EXTRA = +XPPFLAGS_OPTIM = +YAKL_CPPFLAGS = +YAKL_FCFLAGS = +YAKL_LDFLAGS = +YAKL_LIBS = +abi_ac_distcheck = --with-config-file="/Users/gonze/_Research/ABINIT_git/gonze/mac-1P0-225.ac9" +abi_ac_version = 027100 +abi_am_version = 011603 +abi_avx_safe_mode_enable = no +abi_bse_unpacked_enable = no +abi_cc_path = +abi_cc_vendor = gnu +abi_cc_version = 9.4 +abi_cclock_enable = no +abi_cpp_path = +abi_cpu_64bits = yes +abi_cpu_bits = 64 +abi_cpu_model = unknown +abi_cpu_platform = apple +abi_cpu_spec = unknown_unknown +abi_cpu_vendor = unknown +abi_crpa_optim_enable = no +abi_cxx_path = +abi_cxx_vendor = gnu +abi_cxx_version = 9.4 +abi_debug_flavor = basic +abi_exports_enable = no +abi_fbk_abinit_common_ok = no +abi_fbk_bigdft_ok = disabled +abi_fbk_config = +abi_fbk_enable = no +abi_fbk_fft_ok = no +abi_fbk_fftw3_ok = no +abi_fbk_gpu_ok = no +abi_fbk_hdf5_ok = disabled +abi_fbk_init = def +abi_fbk_kokkos_ok = no +abi_fbk_levmar_ok = no +abi_fbk_libpaw_ok = no +abi_fbk_libpsml_ok = disabled +abi_fbk_libxc_ok = disabled +abi_fbk_libxml2_ok = no +abi_fbk_linalg_ok = disabled +abi_fbk_list = +abi_fbk_mpi_ok = no +abi_fbk_netcdf_fortran_ok = disabled +abi_fbk_netcdf_ok = disabled +abi_fbk_papi_ok = no +abi_fbk_pfft_ok = no +abi_fbk_prefix = +abi_fbk_required = +abi_fbk_triqs_ok = no +abi_fbk_wannier90_ok = disabled +abi_fbk_xmlf90_ok = disabled +abi_fbk_yakl_ok = no +abi_fc_path = +abi_fc_vendor = gnu +abi_fc_version = 9.4 +abi_fc_wrap = no +abi_fc_wrapper_enable = no +abi_fpp_path = +abi_gpu_arch = +abi_gpu_fcflags = +abi_gpu_flavor = none +abi_gpu_hip_libdir = +abi_gpu_incs = +abi_gpu_ldflags = +abi_gpu_libs = +abi_gpu_nvtx_v3 = +abi_gpu_roctx = +abi_gw_dpc_enable = yes +abi_hints_enable = yes +abi_libtetra_enable = yes +abi_libxml2_cppflags = +abi_libxml2_enable = no +abi_libxml2_fcflags = +abi_libxml2_init = def +abi_libxml2_ldflags = +abi_libxml2_libs = +abi_libxml2_ok = unknown +abi_libxml2_prefix = +abi_lotf_enable = no +abi_lt_version = 020406 +abi_m4_version = 010419 +abi_memory_profiling_enable = no +abi_mpi_cflags = +abi_mpi_cppflags = +abi_mpi_cxxflags = +abi_mpi_enable = yes +abi_mpi_fcflags = +abi_mpi_flavor = auto +abi_mpi_gpu_aware_enable = no +abi_mpi_incs = +abi_mpi_inplace_enable = yes +abi_mpi_interfaces_bugfix_enable = no +abi_mpi_io_default_enable = no +abi_mpi_io_enable = yes +abi_mpi_ldflags = +abi_mpi_level = 2 +abi_mpi_libs = +abi_netcdf_default_enable = no +abi_openmp_enable = no +abi_openmp_offload_enable = no +abi_optim_flavor = standard +abi_python_invocation_enable = no +abi_source_debug_enable = no +abi_stdin_enable = yes +abi_sys_spec = darwin-x86_64 +abi_timer_enable = yes +abi_triqs_v1_4_enable = no +abi_triqs_v2_0_enable = no +abi_zdot_bugfix_enable = no +abinit_bindir = /usr/local/bin +abinit_builddir = /Users/gonze/_Research/ABINIT_git/gonze +abinit_chkdir = /usr/local/share/abinit/tests +abinit_datdir = /usr/local/share/abinit +abinit_docdir = /usr/local/doc/abinit +abinit_incdir = /usr/local/include +abinit_libdir = /usr/local/lib +abinit_mandir = /usr/local/share/man +abinit_prefix = /usr/local +abinit_srcdir = /Users/gonze/_Research/ABINIT_git/gonze +abs_builddir = /Users/gonze/_Research/ABINIT_git/gonze/shared/common/src/17_libtetra_ext +abs_srcdir = /Users/gonze/_Research/ABINIT_git/gonze/shared/common/src/17_libtetra_ext +abs_top_builddir = /Users/gonze/_Research/ABINIT_git/gonze +abs_top_srcdir = /Users/gonze/_Research/ABINIT_git/gonze +ac_ct_CC = +ac_ct_CXX = +ac_ct_FC = +am__include = include +am__leading_dot = . +am__quote = +am__tar = tar --format=ustar -chf - "$$tardir" +am__untar = tar -xf - +bindir = ${exec_prefix}/bin +build = x86_64-apple-darwin18.7.0 +build_alias = +build_cpu = x86_64 +build_os = darwin18.7.0 +build_vendor = apple +builddir = . +cc_info_string = gcc-mp-9 (MacPorts gcc9 9.4.0_0) 9.4.0 +cxx_info_string = g++-mp-9 (MacPorts gcc9 9.4.0_0) 9.4.0 +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +enable_avx_safe_mode = +enable_bse_unpacked = +enable_cclock = +enable_crpa_optim = +enable_exports = +enable_fc_wrapper = +enable_gw_dpc = yes +enable_hints = +enable_libtetra = +enable_lotf = +enable_memory_profiling = +enable_mpi_gpu_aware = +enable_mpi_inplace = +enable_mpi_interfaces_bugfix = +enable_mpi_io = yes +enable_mpi_io_default = +enable_netcdf_default = +enable_openmp = +enable_openmp_offload = +enable_python_invocation = +enable_shared = +enable_source_debug = +enable_static = +enable_stdin = +enable_timer = +enable_triqs_v1_4 = +enable_triqs_v2_0 = +enable_zdot_bugfix = +exec_prefix = ${prefix} +fc_info_string = GNU Fortran (MacPorts gcc9 9.4.0_0) 9.4.0 +fc_mod_fcflags = +fc_timing = standard +fcflags_opt_02_clib = +fcflags_opt_10_defs = +fcflags_opt_11_memory_mpi = +fcflags_opt_12_hide_mpi = +fcflags_opt_14_hidewrite = +fcflags_opt_16_hideleave = +fcflags_opt_16_kokkos_toolbox = +fcflags_opt_17_gpu_toolbox = +fcflags_opt_17_libtetra_ext = +fcflags_opt_17_minimax = +fcflags_opt_17_yaml_out = +fcflags_opt_18_timing = +fcflags_opt_21_hashfuncs = +fcflags_opt_27_toolbox_oop = +fcflags_opt_28_numeric_noabirule = +fcflags_opt_29_kpoints = +fcflags_opt_32_util = +fcflags_opt_33_xc_lowlevel = +fcflags_opt_39_libpaw = +fcflags_opt_41_geometry = +fcflags_opt_42_nlstrain = +fcflags_opt_42_parser = +fcflags_opt_43_ptgroups = -O0 +fcflags_opt_43_wvl_wrappers = +fcflags_opt_44_abitools = +fcflags_opt_44_abitypes_defs = +fcflags_opt_44_manage_kokkos = +fcflags_opt_45_geomoptim = +fcflags_opt_45_xgTools = +fcflags_opt_46_ghc_omp = +fcflags_opt_46_manage_cuda = +fcflags_opt_48_diago = +fcflags_opt_49_gw_toolbox_oop = +fcflags_opt_51_manage_mpi = +fcflags_opt_52_fft_mpi_noabirule = +fcflags_opt_53_ffts = +fcflags_opt_54_spacepar = +fcflags_opt_55_abiutil = +fcflags_opt_56_io_mpi = +fcflags_opt_56_mixing = +fcflags_opt_56_recipspace = +fcflags_opt_56_xc = +fcflags_opt_57_iopsp_parser = +fcflags_opt_57_iovars = +fcflags_opt_61_occeig = +fcflags_opt_62_cg_noabirule = +fcflags_opt_62_ctqmc = +fcflags_opt_62_iowfdenpot = +fcflags_opt_62_poisson = +fcflags_opt_62_wvl_wfs = +fcflags_opt_64_psp = +fcflags_opt_65_lotf_base = +fcflags_opt_65_paw = +fcflags_opt_66_nonlocal = +fcflags_opt_66_vdwxc = +fcflags_opt_66_wfs = +fcflags_opt_67_common = +fcflags_opt_67_python_invocation_ext = +fcflags_opt_67_triqs_ext = +fcflags_opt_68_dmft = +fcflags_opt_68_lotf = +fcflags_opt_68_recursion = +fcflags_opt_68_rsprc = +fcflags_opt_69_wfdesc = +fcflags_opt_70_gw = +fcflags_opt_71_bse = +fcflags_opt_71_wannier = +fcflags_opt_72_response = +fcflags_opt_77_ddb = +fcflags_opt_77_suscep = +fcflags_opt_78_effpot = +fcflags_opt_78_eph = +fcflags_opt_79_seqpar_mpi = +fcflags_opt_80_rttddft = +fcflags_opt_80_tdep = +fcflags_opt_94_scfcv = +fcflags_opt_95_drive = +fcflags_opt_98_main = +fcflags_opt_bigdft = +fcflags_opt_default = +fcflags_opt_hdf5 = +fcflags_opt_levmar = +fcflags_opt_libpsml = +fcflags_opt_libxc = +fcflags_opt_libxml2 = +fcflags_opt_linalg = +fcflags_opt_netcdf = +fcflags_opt_netcdf_fortran = +fcflags_opt_papi = +fcflags_opt_triqs = +fcflags_opt_wannier90 = +fcflags_opt_xmlf90 = +host = x86_64-apple-darwin18.7.0 +host_alias = +host_cpu = x86_64 +host_os = darwin18.7.0 +host_vendor = apple +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = ${SHELL} /Users/gonze/_Research/ABINIT_git/gonze/config/gnu/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = ${datarootdir}/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = $(MKDIR_P) +oldincludedir = /usr/include +pdfdir = ${docdir} +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +runstatedir = ${localstatedir}/run +sbindir = ${exec_prefix}/sbin +sd_abinit_common_cppflags = +sd_abinit_common_enable = no +sd_abinit_common_enable_def = no +sd_abinit_common_fcflags = +sd_abinit_common_init = def +sd_abinit_common_ldflags = +sd_abinit_common_libs = +sd_abinit_common_ok = unknown +sd_abinit_common_options = optional skip +sd_abinit_common_policy = skip +sd_abinit_common_status = optional +sd_bigdft_cppflags = +sd_bigdft_enable = no +sd_bigdft_enable_def = no +sd_bigdft_fcflags = +sd_bigdft_init = def +sd_bigdft_ldflags = +sd_bigdft_libs = +sd_bigdft_ok = unknown +sd_bigdft_options = optional warn +sd_bigdft_policy = warn +sd_bigdft_status = optional +sd_fft_cflags = +sd_fft_choices = +sd_fft_cppflags = -I/opt/local/include +sd_fft_cxxflags = +sd_fft_enable = yes +sd_fft_fcflags = -I/opt/local/include +sd_fft_flavor = fftw3 +sd_fft_init = kwd +sd_fft_ldflags = +sd_fft_libs = -L/opt/local/lib -lfftw3 -lfftw3f +sd_fft_ok = yes +sd_fftw3_cflags = +sd_fftw3_cppflags = -I/opt/local/include +sd_fftw3_enable = yes +sd_fftw3_enable_def = no +sd_fftw3_fcflags = -I/opt/local/include +sd_fftw3_init = env +sd_fftw3_ldflags = +sd_fftw3_libs = -L/opt/local/lib -lfftw3 -lfftw3f +sd_fftw3_ok = yes +sd_fftw3_options = optional skip +sd_fftw3_policy = skip +sd_fftw3_status = optional +sd_gpu_cflags = +sd_gpu_cppflags = +sd_gpu_cxxflags = +sd_gpu_enable = no +sd_gpu_enable_def = no +sd_gpu_fcflags = +sd_gpu_init = def +sd_gpu_ldflags = +sd_gpu_libs = +sd_gpu_ok = no +sd_gpu_options = optional warn +sd_gpu_policy = warn +sd_gpu_prefix = +sd_gpu_status = optional +sd_hdf5_cflags = +sd_hdf5_cppflags = -I/opt/local/include -I/opt/local/include +sd_hdf5_cxxflags = +sd_hdf5_enable = yes +sd_hdf5_enable_def = yes +sd_hdf5_enable_fc = no +sd_hdf5_fcflags = +sd_hdf5_h5cc = /opt/local/bin/h5cc +sd_hdf5_h5fc = +sd_hdf5_init = dir +sd_hdf5_ldflags = +sd_hdf5_libs = -L/opt/local/lib -L/opt/local/lib -lhdf5_hl -L/opt/local/lib -lhdf5 -lz -ldl -lm +sd_hdf5_ok = yes +sd_hdf5_options = required no-fortran warn +sd_hdf5_policy = warn +sd_hdf5_status = required +sd_kokkos_cppflags = +sd_kokkos_cxxflags = +sd_kokkos_enable = no +sd_kokkos_enable_def = no +sd_kokkos_init = def +sd_kokkos_ldflags = +sd_kokkos_libs = +sd_kokkos_ok = unknown +sd_kokkos_options = optional fail +sd_kokkos_policy = fail +sd_kokkos_status = optional +sd_levmar_cflags = +sd_levmar_cppflags = +sd_levmar_enable = no +sd_levmar_enable_def = no +sd_levmar_init = def +sd_levmar_ldflags = +sd_levmar_libs = +sd_levmar_ok = unknown +sd_levmar_options = optional fail +sd_levmar_policy = fail +sd_levmar_status = optional +sd_libpaw_cppflags = +sd_libpaw_enable = no +sd_libpaw_enable_def = no +sd_libpaw_fcflags = +sd_libpaw_init = def +sd_libpaw_ldflags = +sd_libpaw_libs = +sd_libpaw_ok = unknown +sd_libpaw_options = optional skip +sd_libpaw_policy = skip +sd_libpaw_status = optional +sd_libpsml_cppflags = +sd_libpsml_enable = no +sd_libpsml_enable_def = no +sd_libpsml_fcflags = +sd_libpsml_init = def +sd_libpsml_ldflags = +sd_libpsml_libs = +sd_libpsml_ok = unknown +sd_libpsml_options = optional warn +sd_libpsml_policy = warn +sd_libpsml_status = optional +sd_libxc_cflags = +sd_libxc_cppflags = -I/opt/local/include +sd_libxc_enable = yes +sd_libxc_enable_def = yes +sd_libxc_enable_fc = no +sd_libxc_fcflags = +sd_libxc_init = dir +sd_libxc_ldflags = +sd_libxc_libs = -L/opt/local/lib -lxc +sd_libxc_ok = yes +sd_libxc_options = required no-fortran warn +sd_libxc_policy = warn +sd_libxc_status = required +sd_linalg_cflags = +sd_linalg_choices = +sd_linalg_cppflags = +sd_linalg_cxxflags = +sd_linalg_enable = yes +sd_linalg_fcflags = -I/opt/local/include +sd_linalg_flavor = openblas +sd_linalg_has_elpa = no +sd_linalg_has_scalapack = no +sd_linalg_init = env +sd_linalg_ldflags = +sd_linalg_libs = -L/opt/local/lib -lopenblas +sd_linalg_ok = yes +sd_mpi_cc = /opt/local/bin/mpicc +sd_mpi_cflags = +sd_mpi_cppflags = -I/opt/local/include +sd_mpi_cxx = /opt/local/bin/mpicxx +sd_mpi_enable = yes +sd_mpi_enable_cxx = yes +sd_mpi_enable_def = auto +sd_mpi_enable_fc = yes +sd_mpi_fc = /opt/local/bin/mpif90 +sd_mpi_fcflags = -I/opt/local/include +sd_mpi_init = dir +sd_mpi_ldflags = +sd_mpi_libs = +sd_mpi_ok = yes +sd_mpi_options = auto optional fail +sd_mpi_policy = fail +sd_mpi_status = optional +sd_netcdf_cflags = +sd_netcdf_cppflags = -I/opt/local/include +sd_netcdf_enable = yes +sd_netcdf_enable_def = yes +sd_netcdf_fcflags = -I/opt/local/include +sd_netcdf_fortran_cflags = +sd_netcdf_fortran_cppflags = -I/opt/local/include +sd_netcdf_fortran_enable = yes +sd_netcdf_fortran_enable_def = yes +sd_netcdf_fortran_fcflags = -I/opt/local/include +sd_netcdf_fortran_init = dir +sd_netcdf_fortran_ldflags = +sd_netcdf_fortran_libs = -L/opt/local/lib -lnetcdff +sd_netcdf_fortran_ok = yes +sd_netcdf_fortran_options = required warn +sd_netcdf_fortran_policy = warn +sd_netcdf_fortran_status = required +sd_netcdf_init = dir +sd_netcdf_ldflags = +sd_netcdf_libs = -L/opt/local/lib -lnetcdf +sd_netcdf_ok = yes +sd_netcdf_options = required warn +sd_netcdf_policy = warn +sd_netcdf_status = required +sd_papi_cflags = +sd_papi_cppflags = +sd_papi_enable = no +sd_papi_enable_def = no +sd_papi_init = def +sd_papi_ldflags = +sd_papi_libs = +sd_papi_ok = unknown +sd_papi_options = optional fail +sd_papi_policy = fail +sd_papi_sd_papi_fcflags = +sd_papi_status = optional +sd_pfft_cflags = +sd_pfft_cppflags = +sd_pfft_enable = no +sd_pfft_enable_def = no +sd_pfft_init = def +sd_pfft_ldflags = +sd_pfft_libs = +sd_pfft_ok = unknown +sd_pfft_options = optional skip +sd_pfft_policy = skip +sd_pfft_status = optional +sd_sys_fcflags = +sd_triqs_cflags = +sd_triqs_cppflags = +sd_triqs_cxxflags = +sd_triqs_enable = no +sd_triqs_enable_def = no +sd_triqs_fcflags = +sd_triqs_init = def +sd_triqs_ldflags = +sd_triqs_libs = +sd_triqs_ok = unknown +sd_triqs_options = optional fail +sd_triqs_policy = fail +sd_triqs_status = optional +sd_wannier90_cppflags = +sd_wannier90_enable = yes +sd_wannier90_enable_def = no +sd_wannier90_fcflags = -I/opt/local/include +sd_wannier90_init = env +sd_wannier90_ldflags = +sd_wannier90_libs = -L/opt/local/lib -lwannier +sd_wannier90_ok = yes +sd_wannier90_options = optional warn +sd_wannier90_policy = warn +sd_wannier90_status = optional +sd_xmlf90_cppflags = +sd_xmlf90_enable = no +sd_xmlf90_enable_def = no +sd_xmlf90_fcflags = +sd_xmlf90_init = def +sd_xmlf90_ldflags = +sd_xmlf90_libs = +sd_xmlf90_ok = unknown +sd_xmlf90_options = optional warn +sd_xmlf90_policy = warn +sd_xmlf90_status = optional +sd_yakl_cppflags = +sd_yakl_enable = no +sd_yakl_enable_def = no +sd_yakl_fcflags = +sd_yakl_init = def +sd_yakl_ldflags = +sd_yakl_libs = +sd_yakl_ok = unknown +sd_yakl_options = optional fail +sd_yakl_policy = fail +sd_yakl_status = optional +sharedstatedir = ${prefix}/com +src_02_clib_fcflags = -I$(top_builddir)/shared/common/src/02_clib -I$(top_srcdir)/shared/common/src/02_clib +src_10_defs_fcflags = -I$(top_builddir)/shared/common/src/10_defs -I$(top_srcdir)/shared/common/src/10_defs +src_11_memory_mpi_fcflags = -I$(top_builddir)/shared/common/src/11_memory_mpi -I$(top_srcdir)/shared/common/src/11_memory_mpi +src_12_hide_mpi_fcflags = -I$(top_builddir)/shared/common/src/12_hide_mpi -I$(top_srcdir)/shared/common/src/12_hide_mpi +src_14_hidewrite_fcflags = -I$(top_builddir)/shared/common/src/14_hidewrite -I$(top_srcdir)/shared/common/src/14_hidewrite +src_16_hideleave_fcflags = -I$(top_builddir)/shared/common/src/16_hideleave -I$(top_srcdir)/shared/common/src/16_hideleave +src_16_kokkos_toolbox_fcflags = -I$(top_builddir)/shared/common/src/16_kokkos_toolbox -I$(top_srcdir)/shared/common/src/16_kokkos_toolbox +src_17_gpu_toolbox_fcflags = -I$(top_builddir)/shared/common/src/17_gpu_toolbox -I$(top_srcdir)/shared/common/src/17_gpu_toolbox +src_17_libtetra_ext_fcflags = -I$(top_builddir)/shared/common/src/17_libtetra_ext -I$(top_srcdir)/shared/common/src/17_libtetra_ext +src_17_minimax_fcflags = -I$(top_builddir)/shared/common/src/17_minimax -I$(top_srcdir)/shared/common/src/17_minimax +src_17_yaml_out_fcflags = -I$(top_builddir)/shared/common/src/17_yaml_out -I$(top_srcdir)/shared/common/src/17_yaml_out +src_18_timing_fcflags = -I$(top_builddir)/shared/common/src/18_timing -I$(top_srcdir)/shared/common/src/18_timing +src_21_hashfuncs_fcflags = -I$(top_builddir)/shared/common/src/21_hashfuncs -I$(top_srcdir)/shared/common/src/21_hashfuncs +src_27_toolbox_oop_fcflags = -I$(top_builddir)/shared/common/src/27_toolbox_oop -I$(top_srcdir)/shared/common/src/27_toolbox_oop +src_28_numeric_noabirule_fcflags = -I$(top_builddir)/shared/common/src/28_numeric_noabirule -I$(top_srcdir)/shared/common/src/28_numeric_noabirule +src_29_kpoints_fcflags = -I$(top_builddir)/shared/common/src/29_kpoints -I$(top_srcdir)/shared/common/src/29_kpoints +src_32_util_fcflags = -I$(top_builddir)/shared/common/src/32_util -I$(top_srcdir)/shared/common/src/32_util +src_33_xc_lowlevel_fcflags = -I$(top_builddir)/shared/common/src/33_xc_lowlevel -I$(top_srcdir)/shared/common/src/33_xc_lowlevel +src_39_libpaw_fcflags = -I$(top_builddir)/shared/libpaw/src -I$(top_srcdir)/shared/libpaw/src +src_41_geometry_fcflags = -I$(top_builddir)/src/41_geometry -I$(top_srcdir)/src/41_geometry +src_42_nlstrain_fcflags = -I$(top_builddir)/src/42_nlstrain -I$(top_srcdir)/src/42_nlstrain +src_42_parser_fcflags = -I$(top_builddir)/src/42_parser -I$(top_srcdir)/src/42_parser +src_43_ptgroups_fcflags = -I$(top_builddir)/src/43_ptgroups -I$(top_srcdir)/src/43_ptgroups +src_43_wvl_wrappers_fcflags = -I$(top_builddir)/src/43_wvl_wrappers -I$(top_srcdir)/src/43_wvl_wrappers +src_44_abitools_fcflags = -I$(top_builddir)/src/44_abitools -I$(top_srcdir)/src/44_abitools +src_44_abitypes_defs_fcflags = -I$(top_builddir)/src/44_abitypes_defs -I$(top_srcdir)/src/44_abitypes_defs +src_44_manage_kokkos_fcflags = -I$(top_builddir)/src/44_manage_kokkos -I$(top_srcdir)/src/44_manage_kokkos +src_45_geomoptim_fcflags = -I$(top_builddir)/src/45_geomoptim -I$(top_srcdir)/src/45_geomoptim +src_45_xgTools_fcflags = -I$(top_builddir)/src/45_xgTools -I$(top_srcdir)/src/45_xgTools +src_46_ghc_omp_fcflags = -I$(top_builddir)/src/46_ghc_omp -I$(top_srcdir)/src/46_ghc_omp +src_46_manage_cuda_fcflags = -I$(top_builddir)/src/46_manage_cuda -I$(top_srcdir)/src/46_manage_cuda +src_48_diago_fcflags = -I$(top_builddir)/src/48_diago -I$(top_srcdir)/src/48_diago +src_49_gw_toolbox_oop_fcflags = -I$(top_builddir)/src/49_gw_toolbox_oop -I$(top_srcdir)/src/49_gw_toolbox_oop +src_51_manage_mpi_fcflags = -I$(top_builddir)/src/51_manage_mpi -I$(top_srcdir)/src/51_manage_mpi +src_52_fft_mpi_noabirule_fcflags = -I$(top_builddir)/src/52_fft_mpi_noabirule -I$(top_srcdir)/src/52_fft_mpi_noabirule +src_53_ffts_fcflags = -I$(top_builddir)/src/53_ffts -I$(top_srcdir)/src/53_ffts +src_54_spacepar_fcflags = -I$(top_builddir)/src/54_spacepar -I$(top_srcdir)/src/54_spacepar +src_55_abiutil_fcflags = -I$(top_builddir)/src/55_abiutil -I$(top_srcdir)/src/55_abiutil +src_56_io_mpi_fcflags = -I$(top_builddir)/src/56_io_mpi -I$(top_srcdir)/src/56_io_mpi +src_56_mixing_fcflags = -I$(top_builddir)/src/56_mixing -I$(top_srcdir)/src/56_mixing +src_56_recipspace_fcflags = -I$(top_builddir)/src/56_recipspace -I$(top_srcdir)/src/56_recipspace +src_56_xc_fcflags = -I$(top_builddir)/src/56_xc -I$(top_srcdir)/src/56_xc +src_57_iopsp_parser_fcflags = -I$(top_builddir)/src/57_iopsp_parser -I$(top_srcdir)/src/57_iopsp_parser +src_57_iovars_fcflags = -I$(top_builddir)/src/57_iovars -I$(top_srcdir)/src/57_iovars +src_61_occeig_fcflags = -I$(top_builddir)/src/61_occeig -I$(top_srcdir)/src/61_occeig +src_62_cg_noabirule_fcflags = -I$(top_builddir)/src/62_cg_noabirule -I$(top_srcdir)/src/62_cg_noabirule +src_62_ctqmc_fcflags = -I$(top_builddir)/src/62_ctqmc -I$(top_srcdir)/src/62_ctqmc +src_62_iowfdenpot_fcflags = -I$(top_builddir)/src/62_iowfdenpot -I$(top_srcdir)/src/62_iowfdenpot +src_62_poisson_fcflags = -I$(top_builddir)/src/62_poisson -I$(top_srcdir)/src/62_poisson +src_62_wvl_wfs_fcflags = -I$(top_builddir)/src/62_wvl_wfs -I$(top_srcdir)/src/62_wvl_wfs +src_64_psp_fcflags = -I$(top_builddir)/src/64_psp -I$(top_srcdir)/src/64_psp +src_65_lotf_base_fcflags = -I$(top_builddir)/src/65_lotf_base -I$(top_srcdir)/src/65_lotf_base +src_65_paw_fcflags = -I$(top_builddir)/src/65_paw -I$(top_srcdir)/src/65_paw +src_66_nonlocal_fcflags = -I$(top_builddir)/src/66_nonlocal -I$(top_srcdir)/src/66_nonlocal +src_66_vdwxc_fcflags = -I$(top_builddir)/src/66_vdwxc -I$(top_srcdir)/src/66_vdwxc +src_66_wfs_fcflags = -I$(top_builddir)/src/66_wfs -I$(top_srcdir)/src/66_wfs +src_67_common_fcflags = -I$(top_builddir)/src/67_common -I$(top_srcdir)/src/67_common +src_67_python_invocation_ext_fcflags = -I$(top_builddir)/src/67_python_invocation_ext -I$(top_srcdir)/src/67_python_invocation_ext +src_67_triqs_ext_fcflags = -I$(top_builddir)/src/67_triqs_ext -I$(top_srcdir)/src/67_triqs_ext +src_68_dmft_fcflags = -I$(top_builddir)/src/68_dmft -I$(top_srcdir)/src/68_dmft +src_68_lotf_fcflags = -I$(top_builddir)/src/68_lotf -I$(top_srcdir)/src/68_lotf +src_68_recursion_fcflags = -I$(top_builddir)/src/68_recursion -I$(top_srcdir)/src/68_recursion +src_68_rsprc_fcflags = -I$(top_builddir)/src/68_rsprc -I$(top_srcdir)/src/68_rsprc +src_69_wfdesc_fcflags = -I$(top_builddir)/src/69_wfdesc -I$(top_srcdir)/src/69_wfdesc +src_70_gw_fcflags = -I$(top_builddir)/src/70_gw -I$(top_srcdir)/src/70_gw +src_71_bse_fcflags = -I$(top_builddir)/src/71_bse -I$(top_srcdir)/src/71_bse +src_71_wannier_fcflags = -I$(top_builddir)/src/71_wannier -I$(top_srcdir)/src/71_wannier +src_72_response_fcflags = -I$(top_builddir)/src/72_response -I$(top_srcdir)/src/72_response +src_77_ddb_fcflags = -I$(top_builddir)/src/77_ddb -I$(top_srcdir)/src/77_ddb +src_77_suscep_fcflags = -I$(top_builddir)/src/77_suscep -I$(top_srcdir)/src/77_suscep +src_78_effpot_fcflags = -I$(top_builddir)/src/78_effpot -I$(top_srcdir)/src/78_effpot +src_78_eph_fcflags = -I$(top_builddir)/src/78_eph -I$(top_srcdir)/src/78_eph +src_79_seqpar_mpi_fcflags = -I$(top_builddir)/src/79_seqpar_mpi -I$(top_srcdir)/src/79_seqpar_mpi +src_80_rttddft_fcflags = -I$(top_builddir)/src/80_rttddft -I$(top_srcdir)/src/80_rttddft +src_80_tdep_fcflags = -I$(top_builddir)/src/80_tdep -I$(top_srcdir)/src/80_tdep +src_94_scfcv_fcflags = -I$(top_builddir)/src/94_scfcv -I$(top_srcdir)/src/94_scfcv +src_95_drive_fcflags = -I$(top_builddir)/src/95_drive -I$(top_srcdir)/src/95_drive +src_common_fcflags = -I$(top_builddir)/shared/common/src/incs -I$(top_srcdir)/shared/common/src/incs -I$(top_builddir)/shared/common/src/mods -I$(top_srcdir)/shared/common/src/mods +src_core_fcflags = -I$(top_builddir)/src/incs -I$(top_srcdir)/src/incs -I$(top_builddir)/src/mods -I$(top_srcdir)/src/mods +src_libpaw_fcflags = -I$(top_builddir)/shared/libpaw/incs -I$(top_srcdir)/shared/libpaw/incs -I$(top_builddir)/shared/libpaw/mods -I$(top_srcdir)/shared/libpaw/mods +srcdir = . +sysconfdir = ${prefix}/etc +target = x86_64-apple-darwin18.7.0 +target_alias = +target_cpu = x86_64 +target_os = darwin18.7.0 +target_vendor = apple +top_build_prefix = ../../../../ +top_builddir = ../../../.. +top_srcdir = ../../../.. +with_abinit_common = +with_bigdft = +with_config_file = +with_debug_flavor = +with_fallbacks = +with_fc_vendor = +with_fc_version = +with_fft_flavor = fftw3 +with_fftw3 = +with_gnu_ld = +with_gpu = +with_hdf5 = /opt/local +with_kokkos = +with_levmar = +with_libpaw = +with_libpsml = +with_libxc = /opt/local +with_libxml2 = +with_linalg_flavor = openblas +with_mpi = /opt/local +with_mpi_level = +with_netcdf = /opt/local +with_optim_flavor = +with_papi = +with_pfft = +with_triqs = +with_wannier90 = +with_xmlf90 = +with_yakl = +AM_CFLAGS = -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include +AM_CXXFLAGS = $(sd_triqs_cxxflags) +AM_FCFLAGS = -ffree-form -J../mods +AM_CPPFLAGS = \ + -I$(top_builddir)/shared/common/src/10_defs -I$(top_srcdir)/shared/common/src/10_defs \ + -I$(top_builddir)/shared/common/src/11_memory_mpi -I$(top_srcdir)/shared/common/src/11_memory_mpi \ + -I$(top_builddir)/shared/common/src/12_hide_mpi -I$(top_srcdir)/shared/common/src/12_hide_mpi \ + -I$(top_builddir)/shared/common/src/14_hidewrite -I$(top_srcdir)/shared/common/src/14_hidewrite \ + -I$(top_builddir)/shared/common/src/16_hideleave -I$(top_srcdir)/shared/common/src/16_hideleave \ + -I$(top_builddir)/shared/common/src/17_libtetra_ext -I$(top_srcdir)/shared/common/src/17_libtetra_ext \ + -I$(top_builddir)/shared/common/src/incs -I$(top_srcdir)/shared/common/src/incs -I$(top_builddir)/shared/common/src/mods -I$(top_srcdir)/shared/common/src/mods \ + -I$(top_builddir)/src/incs -I$(top_srcdir)/src/incs -I$(top_builddir)/src/mods -I$(top_srcdir)/src/mods \ + -I$(top_builddir)/shared/libpaw/incs -I$(top_srcdir)/shared/libpaw/incs -I$(top_builddir)/shared/libpaw/mods -I$(top_srcdir)/shared/libpaw/mods \ + + + +# Regular source files +lib17_libtetra_ext_srcs = \ + libtetrabz.F90 \ + libtetrabz_common.F90 \ + libtetrabz_dbldelta_mod.F90 \ + libtetrabz_dblstep_mod.F90 \ + libtetrabz_dos_mod.F90 \ + libtetrabz_fermigr_mod.F90 \ + libtetrabz_occ_mod.F90 \ + libtetrabz_polcmplx_mod.F90 \ + libtetrabz_polstat_mod.F90 \ + m_simtet.F90 \ + m_krank.F90 \ + m_tetrahedron.F90 + + +# Source files depending on conditionals + +# Library description +noinst_LIBRARIES = lib17_libtetra_ext.a +lib17_libtetra_ext_a_SOURCES = $(lib17_libtetra_ext_srcs) + +# Dependencies (inside the directory) of directory 17_libtetra_ext +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. +CLEANFILES = libtetrabz_cpp.f90 libtetrabz_common_cpp.f90 \ + libtetrabz_dbldelta_mod_cpp.f90 libtetrabz_dblstep_mod_cpp.f90 \ + libtetrabz_dos_mod_cpp.f90 libtetrabz_fermigr_mod_cpp.f90 \ + libtetrabz_occ_mod_cpp.f90 libtetrabz_polcmplx_mod_cpp.f90 \ + libtetrabz_polstat_mod_cpp.f90 m_simtet_cpp.f90 \ + m_krank_cpp.f90 m_tetrahedron_cpp.f90 libtetrabz.$(MODEXT) \ + libtetrabz_common.$(MODEXT) libtetrabz_dbldelta_mod.$(MODEXT) \ + libtetrabz_dblstep_mod.$(MODEXT) libtetrabz_dos_mod.$(MODEXT) \ + libtetrabz_fermigr_mod.$(MODEXT) libtetrabz_occ_mod.$(MODEXT) \ + libtetrabz_polcmplx_mod.$(MODEXT) \ + libtetrabz_polstat_mod.$(MODEXT) m_krank.$(MODEXT) \ + m_simtet.$(MODEXT) m_tetrahedron.$(MODEXT) +EXTRA_DIST = abinit.src abinit.dep abinit.amf libtetra.h \ + _17_libtetra_ext_ +all: all-am + +.SUFFIXES: +.SUFFIXES: .F90 .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu shared/common/src/17_libtetra_ext/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu shared/common/src/17_libtetra_ext/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) + +lib17_libtetra_ext.a: $(lib17_libtetra_ext_a_OBJECTS) $(lib17_libtetra_ext_a_DEPENDENCIES) $(EXTRA_lib17_libtetra_ext_a_DEPENDENCIES) + $(AM_V_at)-rm -f lib17_libtetra_ext.a + $(AM_V_AR)$(lib17_libtetra_ext_a_AR) lib17_libtetra_ext.a $(lib17_libtetra_ext_a_OBJECTS) $(lib17_libtetra_ext_a_LIBADD) + $(AM_V_at)$(RANLIB) lib17_libtetra_ext.a + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +.F90.o: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ $< + +.F90.obj: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-noinstLIBRARIES cscopelist-am ctags ctags-am distclean \ + distclean-compile distclean-generic distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am + +.PRECIOUS: Makefile + + +libtetrabz.$(OBJEXT): libtetrabz_dbldelta_mod.$(OBJEXT) libtetrabz_dblstep_mod.$(OBJEXT) libtetrabz_dos_mod.$(OBJEXT) libtetrabz_fermigr_mod.$(OBJEXT) libtetrabz_occ_mod.$(OBJEXT) libtetrabz_polcmplx_mod.$(OBJEXT) libtetrabz_polstat_mod.$(OBJEXT) + +libtetrabz_dbldelta_mod.$(OBJEXT): libtetrabz_common.$(OBJEXT) + +libtetrabz_dblstep_mod.$(OBJEXT): libtetrabz_common.$(OBJEXT) + +libtetrabz_dos_mod.$(OBJEXT): libtetrabz_common.$(OBJEXT) + +libtetrabz_fermigr_mod.$(OBJEXT): libtetrabz_common.$(OBJEXT) + +libtetrabz_occ_mod.$(OBJEXT): libtetrabz_common.$(OBJEXT) + +libtetrabz_polcmplx_mod.$(OBJEXT): libtetrabz_common.$(OBJEXT) + +libtetrabz_polstat_mod.$(OBJEXT): libtetrabz_common.$(OBJEXT) + +m_tetrahedron.$(OBJEXT): m_krank.$(OBJEXT) + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/GX-PAW/common/src/17_libtetra_ext/Makefile.am b/GX-PAW/common/src/17_libtetra_ext/Makefile.am new file mode 100644 index 00000000..b0105bc3 --- /dev/null +++ b/GX-PAW/common/src/17_libtetra_ext/Makefile.am @@ -0,0 +1,111 @@ +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-corelibs on 2024/03/16 21:07:38 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-corelibs script or its config file instead. +# + +AM_CFLAGS = @ABI_CPPFLAGS@ +AM_CXXFLAGS = $(sd_triqs_cxxflags) +AM_FCFLAGS = @FPPFLAGS@ @FCFLAGS_FREEFORM@ @FCFLAGS_MODDIR@ @sd_sys_fcflags@ @fcflags_opt_17_libtetra_ext@ + +AM_CPPFLAGS = \ + @src_10_defs_fcflags@ \ + @src_11_memory_mpi_fcflags@ \ + @src_12_hide_mpi_fcflags@ \ + @src_14_hidewrite_fcflags@ \ + @src_16_hideleave_fcflags@ \ + @src_17_libtetra_ext_fcflags@ \ + @src_common_fcflags@ \ + @src_core_fcflags@ \ + @src_libpaw_fcflags@ \ + @fc_mod_fcflags@ + +# Regular source files +lib17_libtetra_ext_srcs = \ + libtetrabz.F90 \ + libtetrabz_common.F90 \ + libtetrabz_dbldelta_mod.F90 \ + libtetrabz_dblstep_mod.F90 \ + libtetrabz_dos_mod.F90 \ + libtetrabz_fermigr_mod.F90 \ + libtetrabz_occ_mod.F90 \ + libtetrabz_polcmplx_mod.F90 \ + libtetrabz_polstat_mod.F90 \ + m_simtet.F90 \ + m_krank.F90 \ + m_tetrahedron.F90 + +# Source files depending on conditionals + + +# Library description +noinst_LIBRARIES = lib17_libtetra_ext.a + +lib17_libtetra_ext_a_SOURCES= $(lib17_libtetra_ext_srcs) + +CLEANFILES = \ + libtetrabz_cpp.f90 \ + libtetrabz_common_cpp.f90 \ + libtetrabz_dbldelta_mod_cpp.f90 \ + libtetrabz_dblstep_mod_cpp.f90 \ + libtetrabz_dos_mod_cpp.f90 \ + libtetrabz_fermigr_mod_cpp.f90 \ + libtetrabz_occ_mod_cpp.f90 \ + libtetrabz_polcmplx_mod_cpp.f90 \ + libtetrabz_polstat_mod_cpp.f90 \ + m_simtet_cpp.f90 \ + m_krank_cpp.f90 \ + m_tetrahedron_cpp.f90 + +EXTRA_DIST = abinit.src + +EXTRA_DIST += abinit.dep + +# Dependencies (inside the directory) of directory 17_libtetra_ext +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. + +CLEANFILES += \ + libtetrabz.$(MODEXT) \ + libtetrabz_common.$(MODEXT) \ + libtetrabz_dbldelta_mod.$(MODEXT) \ + libtetrabz_dblstep_mod.$(MODEXT) \ + libtetrabz_dos_mod.$(MODEXT) \ + libtetrabz_fermigr_mod.$(MODEXT) \ + libtetrabz_occ_mod.$(MODEXT) \ + libtetrabz_polcmplx_mod.$(MODEXT) \ + libtetrabz_polstat_mod.$(MODEXT) \ + m_krank.$(MODEXT) \ + m_simtet.$(MODEXT) \ + m_tetrahedron.$(MODEXT) + +libtetrabz.$(OBJEXT): libtetrabz_dbldelta_mod.$(OBJEXT) libtetrabz_dblstep_mod.$(OBJEXT) libtetrabz_dos_mod.$(OBJEXT) libtetrabz_fermigr_mod.$(OBJEXT) libtetrabz_occ_mod.$(OBJEXT) libtetrabz_polcmplx_mod.$(OBJEXT) libtetrabz_polstat_mod.$(OBJEXT) + +libtetrabz_dbldelta_mod.$(OBJEXT): libtetrabz_common.$(OBJEXT) + +libtetrabz_dblstep_mod.$(OBJEXT): libtetrabz_common.$(OBJEXT) + +libtetrabz_dos_mod.$(OBJEXT): libtetrabz_common.$(OBJEXT) + +libtetrabz_fermigr_mod.$(OBJEXT): libtetrabz_common.$(OBJEXT) + +libtetrabz_occ_mod.$(OBJEXT): libtetrabz_common.$(OBJEXT) + +libtetrabz_polcmplx_mod.$(OBJEXT): libtetrabz_common.$(OBJEXT) + +libtetrabz_polstat_mod.$(OBJEXT): libtetrabz_common.$(OBJEXT) + +m_tetrahedron.$(OBJEXT): m_krank.$(OBJEXT) +EXTRA_DIST += abinit.amf + +EXTRA_DIST += \ + libtetra.h + +EXTRA_DIST += _17_libtetra_ext_ diff --git a/GX-PAW/common/src/17_libtetra_ext/Makefile.in b/GX-PAW/common/src/17_libtetra_ext/Makefile.in new file mode 100644 index 00000000..8fc28198 --- /dev/null +++ b/GX-PAW/common/src/17_libtetra_ext/Makefile.in @@ -0,0 +1,1503 @@ +# Makefile.in generated by automake 1.16.3 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2020 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-corelibs on 2024/03/16 21:07:38 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-corelibs script or its config file instead. +# + +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = shared/common/src/17_libtetra_ext +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/m4/arch-gpu.m4 \ + $(top_srcdir)/config/m4/arch-mpi.m4 \ + $(top_srcdir)/config/m4/auto-autotools.m4 \ + $(top_srcdir)/config/m4/auto-corelibs.m4 \ + $(top_srcdir)/config/m4/auto-debug.m4 \ + $(top_srcdir)/config/m4/auto-dirflags.m4 \ + $(top_srcdir)/config/m4/auto-env.m4 \ + $(top_srcdir)/config/m4/auto-hints.m4 \ + $(top_srcdir)/config/m4/auto-optim.m4 \ + $(top_srcdir)/config/m4/auto-options.m4 \ + $(top_srcdir)/config/m4/auto-output.m4 \ + $(top_srcdir)/config/m4/auto-triggers.m4 \ + $(top_srcdir)/config/m4/conf-atompaw.m4 \ + $(top_srcdir)/config/m4/conf-debug.m4 \ + $(top_srcdir)/config/m4/conf-fallbacks.m4 \ + $(top_srcdir)/config/m4/conf-files.m4 \ + $(top_srcdir)/config/m4/conf-init.m4 \ + $(top_srcdir)/config/m4/conf-openmp.m4 \ + $(top_srcdir)/config/m4/conf-optim.m4 \ + $(top_srcdir)/config/m4/lang-c++.m4 \ + $(top_srcdir)/config/m4/lang-c.m4 \ + $(top_srcdir)/config/m4/lang-fortran-import.m4 \ + $(top_srcdir)/config/m4/lang-fortran.m4 \ + $(top_srcdir)/config/m4/lang-python.m4 \ + $(top_srcdir)/config/m4/libxml2.m4 \ + $(top_srcdir)/config/m4/misc-display.m4 \ + $(top_srcdir)/config/m4/sd_abinit_common.m4 \ + $(top_srcdir)/config/m4/sd_arch_gpu.m4 \ + $(top_srcdir)/config/m4/sd_arch_mpi.m4 \ + $(top_srcdir)/config/m4/sd_bigdft.m4 \ + $(top_srcdir)/config/m4/sd_core.m4 \ + $(top_srcdir)/config/m4/sd_esl.m4 \ + $(top_srcdir)/config/m4/sd_fftw3.m4 \ + $(top_srcdir)/config/m4/sd_gpu_kokkos.m4 \ + $(top_srcdir)/config/m4/sd_gpu_yakl.m4 \ + $(top_srcdir)/config/m4/sd_io_hdf5.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf_fortran.m4 \ + $(top_srcdir)/config/m4/sd_levmar.m4 \ + $(top_srcdir)/config/m4/sd_libpaw.m4 \ + $(top_srcdir)/config/m4/sd_libpsml.m4 \ + $(top_srcdir)/config/m4/sd_libxc.m4 \ + $(top_srcdir)/config/m4/sd_math_fft.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_core.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_util.m4 \ + $(top_srcdir)/config/m4/sd_papi.m4 \ + $(top_srcdir)/config/m4/sd_pfft.m4 \ + $(top_srcdir)/config/m4/sd_triqs.m4 \ + $(top_srcdir)/config/m4/sd_wannier90.m4 \ + $(top_srcdir)/config/m4/sd_xmlf90.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = +lib17_libtetra_ext_a_AR = $(AR) $(ARFLAGS) +lib17_libtetra_ext_a_LIBADD = +am__objects_1 = libtetrabz.$(OBJEXT) libtetrabz_common.$(OBJEXT) \ + libtetrabz_dbldelta_mod.$(OBJEXT) \ + libtetrabz_dblstep_mod.$(OBJEXT) libtetrabz_dos_mod.$(OBJEXT) \ + libtetrabz_fermigr_mod.$(OBJEXT) libtetrabz_occ_mod.$(OBJEXT) \ + libtetrabz_polcmplx_mod.$(OBJEXT) \ + libtetrabz_polstat_mod.$(OBJEXT) m_simtet.$(OBJEXT) \ + m_krank.$(OBJEXT) m_tetrahedron.$(OBJEXT) +am_lib17_libtetra_ext_a_OBJECTS = $(am__objects_1) +lib17_libtetra_ext_a_OBJECTS = $(am_lib17_libtetra_ext_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +PPFCCOMPILE = $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) +AM_V_PPFC = $(am__v_PPFC_@AM_V@) +am__v_PPFC_ = $(am__v_PPFC_@AM_DEFAULT_V@) +am__v_PPFC_0 = @echo " PPFC " $@; +am__v_PPFC_1 = +FCLD = $(FC) +FCLINK = $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \ + $@ +AM_V_FCLD = $(am__v_FCLD_@AM_V@) +am__v_FCLD_ = $(am__v_FCLD_@AM_DEFAULT_V@) +am__v_FCLD_0 = @echo " FCLD " $@; +am__v_FCLD_1 = +SOURCES = $(lib17_libtetra_ext_a_SOURCES) +DIST_SOURCES = $(lib17_libtetra_ext_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ABINIT_BINARY_PACKAGE = @ABINIT_BINARY_PACKAGE@ +ABINIT_COMMON_CPPFLAGS = @ABINIT_COMMON_CPPFLAGS@ +ABINIT_COMMON_FCFLAGS = @ABINIT_COMMON_FCFLAGS@ +ABINIT_COMMON_LDFLAGS = @ABINIT_COMMON_LDFLAGS@ +ABINIT_COMMON_LIBS = @ABINIT_COMMON_LIBS@ +ABINIT_TARGET = @ABINIT_TARGET@ +ABINIT_VERSION = @ABINIT_VERSION@ +ABINIT_VERSION_BASE = @ABINIT_VERSION_BASE@ +ABINIT_VERSION_BUILD = @ABINIT_VERSION_BUILD@ +ABINIT_VERSION_MAJOR = @ABINIT_VERSION_MAJOR@ +ABINIT_VERSION_MICRO = @ABINIT_VERSION_MICRO@ +ABINIT_VERSION_MINOR = @ABINIT_VERSION_MINOR@ +ABI_CPPFLAGS = @ABI_CPPFLAGS@ +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +ARFLAGS = @ARFLAGS@ +ARFLAGS_CMD = @ARFLAGS_CMD@ +ARFLAGS_DEBUG = @ARFLAGS_DEBUG@ +ARFLAGS_EXTRA = @ARFLAGS_EXTRA@ +ARFLAGS_HINTS = @ARFLAGS_HINTS@ +ARFLAGS_OPTIM = @ARFLAGS_OPTIM@ +ATOMPAW_BIN = @ATOMPAW_BIN@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BIGDFT_CPPFLAGS = @BIGDFT_CPPFLAGS@ +BIGDFT_FCFLAGS = @BIGDFT_FCFLAGS@ +BIGDFT_LDFLAGS = @BIGDFT_LDFLAGS@ +BIGDFT_LIBS = @BIGDFT_LIBS@ +BOURNE_SHELL = @BOURNE_SHELL@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CC_LDFLAGS = @CC_LDFLAGS@ +CC_LDFLAGS_DEBUG = @CC_LDFLAGS_DEBUG@ +CC_LDFLAGS_EXTRA = @CC_LDFLAGS_EXTRA@ +CC_LDFLAGS_GPU = @CC_LDFLAGS_GPU@ +CC_LDFLAGS_HINTS = @CC_LDFLAGS_HINTS@ +CC_LDFLAGS_OPTIM = @CC_LDFLAGS_OPTIM@ +CC_LIBS = @CC_LIBS@ +CC_LIBS_DEBUG = @CC_LIBS_DEBUG@ +CC_LIBS_EXTRA = @CC_LIBS_EXTRA@ +CC_LIBS_GPU = @CC_LIBS_GPU@ +CC_LIBS_HINTS = @CC_LIBS_HINTS@ +CC_LIBS_OPTIM = @CC_LIBS_OPTIM@ +CFLAGS = @CFLAGS@ +CFLAGS_DEBUG = @CFLAGS_DEBUG@ +CFLAGS_EXTRA = @CFLAGS_EXTRA@ +CFLAGS_GPU = @CFLAGS_GPU@ +CFLAGS_HINTS = @CFLAGS_HINTS@ +CFLAGS_OPTIM = @CFLAGS_OPTIM@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CPPFLAGS_DEBUG = @CPPFLAGS_DEBUG@ +CPPFLAGS_EXTRA = @CPPFLAGS_EXTRA@ +CPPFLAGS_GPU = @CPPFLAGS_GPU@ +CPPFLAGS_HINTS = @CPPFLAGS_HINTS@ +CPPFLAGS_HINTS_EXT = @CPPFLAGS_HINTS_EXT@ +CPPFLAGS_OPTIM = @CPPFLAGS_OPTIM@ +CXX = @CXX@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CXXFLAGS_DEBUG = @CXXFLAGS_DEBUG@ +CXXFLAGS_EXTRA = @CXXFLAGS_EXTRA@ +CXXFLAGS_GPU = @CXXFLAGS_GPU@ +CXXFLAGS_HINTS = @CXXFLAGS_HINTS@ +CXXFLAGS_OPTIM = @CXXFLAGS_OPTIM@ +CXX_LDFLAGS = @CXX_LDFLAGS@ +CXX_LDFLAGS_DEBUG = @CXX_LDFLAGS_DEBUG@ +CXX_LDFLAGS_EXTRA = @CXX_LDFLAGS_EXTRA@ +CXX_LDFLAGS_GPU = @CXX_LDFLAGS_GPU@ +CXX_LDFLAGS_HINTS = @CXX_LDFLAGS_HINTS@ +CXX_LDFLAGS_OPTIM = @CXX_LDFLAGS_OPTIM@ +CXX_LIBS = @CXX_LIBS@ +CXX_LIBS_DEBUG = @CXX_LIBS_DEBUG@ +CXX_LIBS_EXTRA = @CXX_LIBS_EXTRA@ +CXX_LIBS_GPU = @CXX_LIBS_GPU@ +CXX_LIBS_HINTS = @CXX_LIBS_HINTS@ +CXX_LIBS_OPTIM = @CXX_LIBS_OPTIM@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ +FCFLAGS = @FCFLAGS@ +FCFLAGS_DEBUG = @FCFLAGS_DEBUG@ +FCFLAGS_EXTRA = @FCFLAGS_EXTRA@ +FCFLAGS_F90 = @FCFLAGS_F90@ +FCFLAGS_FIXEDFORM = @FCFLAGS_FIXEDFORM@ +FCFLAGS_FREEFORM = @FCFLAGS_FREEFORM@ +FCFLAGS_HINTS = @FCFLAGS_HINTS@ +FCFLAGS_MODDIR = @FCFLAGS_MODDIR@ +FCFLAGS_OPENMP = @FCFLAGS_OPENMP@ +FCFLAGS_OPENMP_OFFLOAD = @FCFLAGS_OPENMP_OFFLOAD@ +FCFLAGS_OPTIM = @FCFLAGS_OPTIM@ +FCLIBS = @FCLIBS@ +FC_LDFLAGS = @FC_LDFLAGS@ +FC_LDFLAGS_DEBUG = @FC_LDFLAGS_DEBUG@ +FC_LDFLAGS_EXTRA = @FC_LDFLAGS_EXTRA@ +FC_LDFLAGS_HINTS = @FC_LDFLAGS_HINTS@ +FC_LDFLAGS_OPTIM = @FC_LDFLAGS_OPTIM@ +FC_LIBS = @FC_LIBS@ +FC_LIBS_DEBUG = @FC_LIBS_DEBUG@ +FC_LIBS_EXTRA = @FC_LIBS_EXTRA@ +FC_LIBS_HINTS = @FC_LIBS_HINTS@ +FC_LIBS_OPTIM = @FC_LIBS_OPTIM@ +FC_NOWRAP = @FC_NOWRAP@ +FFLAGS = @FFLAGS@ +FFTW3_CFLAGS = @FFTW3_CFLAGS@ +FFTW3_CPPFLAGS = @FFTW3_CPPFLAGS@ +FFTW3_FCFLAGS = @FFTW3_FCFLAGS@ +FFTW3_LDFLAGS = @FFTW3_LDFLAGS@ +FFTW3_LIBS = @FFTW3_LIBS@ +FFT_CFLAGS = @FFT_CFLAGS@ +FFT_FCFLAGS = @FFT_FCFLAGS@ +FPP = @FPP@ +FPPFLAGS = @FPPFLAGS@ +FPPFLAGS_DEBUG = @FPPFLAGS_DEBUG@ +FPPFLAGS_EXTRA = @FPPFLAGS_EXTRA@ +FPPFLAGS_HINTS = @FPPFLAGS_HINTS@ +FPPFLAGS_OPTIM = @FPPFLAGS_OPTIM@ +GPU_ARCH = @GPU_ARCH@ +GPU_CFLAGS = @GPU_CFLAGS@ +GPU_CPPFLAGS = @GPU_CPPFLAGS@ +GPU_CXXFLAGS = @GPU_CXXFLAGS@ +GPU_FCFLAGS = @GPU_FCFLAGS@ +GPU_LDFLAGS = @GPU_LDFLAGS@ +GPU_LIBS = @GPU_LIBS@ +GRAPHATOM_BIN = @GRAPHATOM_BIN@ +GREP = @GREP@ +H5CC = @H5CC@ +HDF5_CFLAGS = @HDF5_CFLAGS@ +HDF5_CPPFLAGS = @HDF5_CPPFLAGS@ +HDF5_CXXFLAGS = @HDF5_CXXFLAGS@ +HDF5_FCFLAGS = @HDF5_FCFLAGS@ +HDF5_LDFLAGS = @HDF5_LDFLAGS@ +HDF5_LIBS = @HDF5_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +LDFLAGS = @LDFLAGS@ +LEVMAR_CFLAGS = @LEVMAR_CFLAGS@ +LEVMAR_CPPFLAGS = @LEVMAR_CPPFLAGS@ +LEVMAR_LDFLAGS = @LEVMAR_LDFLAGS@ +LEVMAR_LIBS = @LEVMAR_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPAW_CPPFLAGS = @LIBPAW_CPPFLAGS@ +LIBPAW_FCFLAGS = @LIBPAW_FCFLAGS@ +LIBPAW_LDFLAGS = @LIBPAW_LDFLAGS@ +LIBPAW_LIBS = @LIBPAW_LIBS@ +LIBPSML_CPPFLAGS = @LIBPSML_CPPFLAGS@ +LIBPSML_FCFLAGS = @LIBPSML_FCFLAGS@ +LIBPSML_LDFLAGS = @LIBPSML_LDFLAGS@ +LIBPSML_LIBS = @LIBPSML_LIBS@ +LIBS = @LIBS@ +LIBXC_CFLAGS = @LIBXC_CFLAGS@ +LIBXC_CPPFLAGS = @LIBXC_CPPFLAGS@ +LIBXC_FCFLAGS = @LIBXC_FCFLAGS@ +LIBXC_LDFLAGS = @LIBXC_LDFLAGS@ +LIBXC_LIBS = @LIBXC_LIBS@ +LIBXML2_CPPFLAGS = @LIBXML2_CPPFLAGS@ +LIBXML2_FCFLAGS = @LIBXML2_FCFLAGS@ +LIBXML2_LIBS = @LIBXML2_LIBS@ +LINALG_CFLAGS = @LINALG_CFLAGS@ +LINALG_CPPFLAGS = @LINALG_CPPFLAGS@ +LINALG_CXXFLAGS = @LINALG_CXXFLAGS@ +LINALG_FCFLAGS = @LINALG_FCFLAGS@ +LINALG_LDFLAGS = @LINALG_LDFLAGS@ +LINALG_LIBS = @LINALG_LIBS@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODEXT = @MODEXT@ +MPI_CFLAGS = @MPI_CFLAGS@ +MPI_CPPFLAGS = @MPI_CPPFLAGS@ +MPI_CXXFLAGS = @MPI_CXXFLAGS@ +MPI_FCFLAGS = @MPI_FCFLAGS@ +MPI_LDFLAGS = @MPI_LDFLAGS@ +MPI_LIBS = @MPI_LIBS@ +MV = @MV@ +NETCDF_CFLAGS = @NETCDF_CFLAGS@ +NETCDF_CPPFLAGS = @NETCDF_CPPFLAGS@ +NETCDF_CXXFLAGS = @NETCDF_CXXFLAGS@ +NETCDF_FCFLAGS = @NETCDF_FCFLAGS@ +NETCDF_FORTRAN_CFLAGS = @NETCDF_FORTRAN_CFLAGS@ +NETCDF_FORTRAN_CPPFLAGS = @NETCDF_FORTRAN_CPPFLAGS@ +NETCDF_FORTRAN_CXXFLAGS = @NETCDF_FORTRAN_CXXFLAGS@ +NETCDF_FORTRAN_FCFLAGS = @NETCDF_FORTRAN_FCFLAGS@ +NETCDF_FORTRAN_LDFLAGS = @NETCDF_FORTRAN_LDFLAGS@ +NETCDF_FORTRAN_LIBS = @NETCDF_FORTRAN_LIBS@ +NETCDF_LDFLAGS = @NETCDF_LDFLAGS@ +NETCDF_LIBS = @NETCDF_LIBS@ +NVCC = @NVCC@ +NVCC_CFLAGS = @NVCC_CFLAGS@ +NVCC_CPPFLAGS = @NVCC_CPPFLAGS@ +NVCC_LDFLAGS = @NVCC_LDFLAGS@ +NVCC_LIBS = @NVCC_LIBS@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PAPI_CFLAGS = @PAPI_CFLAGS@ +PAPI_CPPFLAGS = @PAPI_CPPFLAGS@ +PAPI_LDFLAGS = @PAPI_LDFLAGS@ +PAPI_LIBS = @PAPI_LIBS@ +PATCH = @PATCH@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PFFT_CFLAGS = @PFFT_CFLAGS@ +PFFT_CPPFLAGS = @PFFT_CPPFLAGS@ +PFFT_LDFLAGS = @PFFT_LDFLAGS@ +PFFT_LIBS = @PFFT_LIBS@ +PYFLAGS = @PYFLAGS@ +PYTHON = @PYTHON@ +PYTHON_CONFIG = @PYTHON_CONFIG@ +PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ +RANLIB = @RANLIB@ +REALPATH = @REALPATH@ +RM = @RM@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +TAR = @TAR@ +TRIQS_CFLAGS = @TRIQS_CFLAGS@ +TRIQS_CPPFLAGS = @TRIQS_CPPFLAGS@ +TRIQS_CXXFLAGS = @TRIQS_CXXFLAGS@ +TRIQS_LDFLAGS = @TRIQS_LDFLAGS@ +TRIQS_LIBS = @TRIQS_LIBS@ +TRUE_CPP = @TRUE_CPP@ +VERSION = @VERSION@ +WANNIER90_CPPFLAGS = @WANNIER90_CPPFLAGS@ +WANNIER90_FCFLAGS = @WANNIER90_FCFLAGS@ +WANNIER90_LDFLAGS = @WANNIER90_LDFLAGS@ +WANNIER90_LIBS = @WANNIER90_LIBS@ +XML2_CONFIG = @XML2_CONFIG@ +XMLF90_CPPFLAGS = @XMLF90_CPPFLAGS@ +XMLF90_FCFLAGS = @XMLF90_FCFLAGS@ +XMLF90_LDFLAGS = @XMLF90_LDFLAGS@ +XMLF90_LIBS = @XMLF90_LIBS@ +XML_CPPFLAGS = @XML_CPPFLAGS@ +XML_LIBS = @XML_LIBS@ +XPP = @XPP@ +XPPFLAGS = @XPPFLAGS@ +XPPFLAGS_DEBUG = @XPPFLAGS_DEBUG@ +XPPFLAGS_EXTRA = @XPPFLAGS_EXTRA@ +XPPFLAGS_OPTIM = @XPPFLAGS_OPTIM@ +YAKL_CPPFLAGS = @YAKL_CPPFLAGS@ +YAKL_FCFLAGS = @YAKL_FCFLAGS@ +YAKL_LDFLAGS = @YAKL_LDFLAGS@ +YAKL_LIBS = @YAKL_LIBS@ +abi_ac_distcheck = @abi_ac_distcheck@ +abi_ac_version = @abi_ac_version@ +abi_am_version = @abi_am_version@ +abi_avx_safe_mode_enable = @abi_avx_safe_mode_enable@ +abi_bse_unpacked_enable = @abi_bse_unpacked_enable@ +abi_cc_path = @abi_cc_path@ +abi_cc_vendor = @abi_cc_vendor@ +abi_cc_version = @abi_cc_version@ +abi_cclock_enable = @abi_cclock_enable@ +abi_cpp_path = @abi_cpp_path@ +abi_cpu_64bits = @abi_cpu_64bits@ +abi_cpu_bits = @abi_cpu_bits@ +abi_cpu_model = @abi_cpu_model@ +abi_cpu_platform = @abi_cpu_platform@ +abi_cpu_spec = @abi_cpu_spec@ +abi_cpu_vendor = @abi_cpu_vendor@ +abi_crpa_optim_enable = @abi_crpa_optim_enable@ +abi_cxx_path = @abi_cxx_path@ +abi_cxx_vendor = @abi_cxx_vendor@ +abi_cxx_version = @abi_cxx_version@ +abi_debug_flavor = @abi_debug_flavor@ +abi_exports_enable = @abi_exports_enable@ +abi_fbk_abinit_common_ok = @abi_fbk_abinit_common_ok@ +abi_fbk_bigdft_ok = @abi_fbk_bigdft_ok@ +abi_fbk_config = @abi_fbk_config@ +abi_fbk_enable = @abi_fbk_enable@ +abi_fbk_fft_ok = @abi_fbk_fft_ok@ +abi_fbk_fftw3_ok = @abi_fbk_fftw3_ok@ +abi_fbk_gpu_ok = @abi_fbk_gpu_ok@ +abi_fbk_hdf5_ok = @abi_fbk_hdf5_ok@ +abi_fbk_init = @abi_fbk_init@ +abi_fbk_kokkos_ok = @abi_fbk_kokkos_ok@ +abi_fbk_levmar_ok = @abi_fbk_levmar_ok@ +abi_fbk_libpaw_ok = @abi_fbk_libpaw_ok@ +abi_fbk_libpsml_ok = @abi_fbk_libpsml_ok@ +abi_fbk_libxc_ok = @abi_fbk_libxc_ok@ +abi_fbk_libxml2_ok = @abi_fbk_libxml2_ok@ +abi_fbk_linalg_ok = @abi_fbk_linalg_ok@ +abi_fbk_list = @abi_fbk_list@ +abi_fbk_mpi_ok = @abi_fbk_mpi_ok@ +abi_fbk_netcdf_fortran_ok = @abi_fbk_netcdf_fortran_ok@ +abi_fbk_netcdf_ok = @abi_fbk_netcdf_ok@ +abi_fbk_papi_ok = @abi_fbk_papi_ok@ +abi_fbk_pfft_ok = @abi_fbk_pfft_ok@ +abi_fbk_prefix = @abi_fbk_prefix@ +abi_fbk_required = @abi_fbk_required@ +abi_fbk_triqs_ok = @abi_fbk_triqs_ok@ +abi_fbk_wannier90_ok = @abi_fbk_wannier90_ok@ +abi_fbk_xmlf90_ok = @abi_fbk_xmlf90_ok@ +abi_fbk_yakl_ok = @abi_fbk_yakl_ok@ +abi_fc_path = @abi_fc_path@ +abi_fc_vendor = @abi_fc_vendor@ +abi_fc_version = @abi_fc_version@ +abi_fc_wrap = @abi_fc_wrap@ +abi_fc_wrapper_enable = @abi_fc_wrapper_enable@ +abi_fpp_path = @abi_fpp_path@ +abi_gpu_arch = @abi_gpu_arch@ +abi_gpu_fcflags = @abi_gpu_fcflags@ +abi_gpu_flavor = @abi_gpu_flavor@ +abi_gpu_hip_libdir = @abi_gpu_hip_libdir@ +abi_gpu_incs = @abi_gpu_incs@ +abi_gpu_ldflags = @abi_gpu_ldflags@ +abi_gpu_libs = @abi_gpu_libs@ +abi_gpu_nvtx_v3 = @abi_gpu_nvtx_v3@ +abi_gpu_roctx = @abi_gpu_roctx@ +abi_gw_dpc_enable = @abi_gw_dpc_enable@ +abi_hints_enable = @abi_hints_enable@ +abi_libtetra_enable = @abi_libtetra_enable@ +abi_libxml2_cppflags = @abi_libxml2_cppflags@ +abi_libxml2_enable = @abi_libxml2_enable@ +abi_libxml2_fcflags = @abi_libxml2_fcflags@ +abi_libxml2_init = @abi_libxml2_init@ +abi_libxml2_ldflags = @abi_libxml2_ldflags@ +abi_libxml2_libs = @abi_libxml2_libs@ +abi_libxml2_ok = @abi_libxml2_ok@ +abi_libxml2_prefix = @abi_libxml2_prefix@ +abi_lotf_enable = @abi_lotf_enable@ +abi_lt_version = @abi_lt_version@ +abi_m4_version = @abi_m4_version@ +abi_memory_profiling_enable = @abi_memory_profiling_enable@ +abi_mpi_cflags = @abi_mpi_cflags@ +abi_mpi_cppflags = @abi_mpi_cppflags@ +abi_mpi_cxxflags = @abi_mpi_cxxflags@ +abi_mpi_enable = @abi_mpi_enable@ +abi_mpi_fcflags = @abi_mpi_fcflags@ +abi_mpi_flavor = @abi_mpi_flavor@ +abi_mpi_gpu_aware_enable = @abi_mpi_gpu_aware_enable@ +abi_mpi_incs = @abi_mpi_incs@ +abi_mpi_inplace_enable = @abi_mpi_inplace_enable@ +abi_mpi_interfaces_bugfix_enable = @abi_mpi_interfaces_bugfix_enable@ +abi_mpi_io_default_enable = @abi_mpi_io_default_enable@ +abi_mpi_io_enable = @abi_mpi_io_enable@ +abi_mpi_ldflags = @abi_mpi_ldflags@ +abi_mpi_level = @abi_mpi_level@ +abi_mpi_libs = @abi_mpi_libs@ +abi_netcdf_default_enable = @abi_netcdf_default_enable@ +abi_openmp_enable = @abi_openmp_enable@ +abi_openmp_offload_enable = @abi_openmp_offload_enable@ +abi_optim_flavor = @abi_optim_flavor@ +abi_python_invocation_enable = @abi_python_invocation_enable@ +abi_source_debug_enable = @abi_source_debug_enable@ +abi_stdin_enable = @abi_stdin_enable@ +abi_sys_spec = @abi_sys_spec@ +abi_timer_enable = @abi_timer_enable@ +abi_triqs_v1_4_enable = @abi_triqs_v1_4_enable@ +abi_triqs_v2_0_enable = @abi_triqs_v2_0_enable@ +abi_zdot_bugfix_enable = @abi_zdot_bugfix_enable@ +abinit_bindir = @abinit_bindir@ +abinit_builddir = @abinit_builddir@ +abinit_chkdir = @abinit_chkdir@ +abinit_datdir = @abinit_datdir@ +abinit_docdir = @abinit_docdir@ +abinit_incdir = @abinit_incdir@ +abinit_libdir = @abinit_libdir@ +abinit_mandir = @abinit_mandir@ +abinit_prefix = @abinit_prefix@ +abinit_srcdir = @abinit_srcdir@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_FC = @ac_ct_FC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cc_info_string = @cc_info_string@ +cxx_info_string = @cxx_info_string@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +enable_avx_safe_mode = @enable_avx_safe_mode@ +enable_bse_unpacked = @enable_bse_unpacked@ +enable_cclock = @enable_cclock@ +enable_crpa_optim = @enable_crpa_optim@ +enable_exports = @enable_exports@ +enable_fc_wrapper = @enable_fc_wrapper@ +enable_gw_dpc = @enable_gw_dpc@ +enable_hints = @enable_hints@ +enable_libtetra = @enable_libtetra@ +enable_lotf = @enable_lotf@ +enable_memory_profiling = @enable_memory_profiling@ +enable_mpi_gpu_aware = @enable_mpi_gpu_aware@ +enable_mpi_inplace = @enable_mpi_inplace@ +enable_mpi_interfaces_bugfix = @enable_mpi_interfaces_bugfix@ +enable_mpi_io = @enable_mpi_io@ +enable_mpi_io_default = @enable_mpi_io_default@ +enable_netcdf_default = @enable_netcdf_default@ +enable_openmp = @enable_openmp@ +enable_openmp_offload = @enable_openmp_offload@ +enable_python_invocation = @enable_python_invocation@ +enable_shared = @enable_shared@ +enable_source_debug = @enable_source_debug@ +enable_static = @enable_static@ +enable_stdin = @enable_stdin@ +enable_timer = @enable_timer@ +enable_triqs_v1_4 = @enable_triqs_v1_4@ +enable_triqs_v2_0 = @enable_triqs_v2_0@ +enable_zdot_bugfix = @enable_zdot_bugfix@ +exec_prefix = @exec_prefix@ +fc_info_string = @fc_info_string@ +fc_mod_fcflags = @fc_mod_fcflags@ +fc_timing = @fc_timing@ +fcflags_opt_02_clib = @fcflags_opt_02_clib@ +fcflags_opt_10_defs = @fcflags_opt_10_defs@ +fcflags_opt_11_memory_mpi = @fcflags_opt_11_memory_mpi@ +fcflags_opt_12_hide_mpi = @fcflags_opt_12_hide_mpi@ +fcflags_opt_14_hidewrite = @fcflags_opt_14_hidewrite@ +fcflags_opt_16_hideleave = @fcflags_opt_16_hideleave@ +fcflags_opt_16_kokkos_toolbox = @fcflags_opt_16_kokkos_toolbox@ +fcflags_opt_17_gpu_toolbox = @fcflags_opt_17_gpu_toolbox@ +fcflags_opt_17_libtetra_ext = @fcflags_opt_17_libtetra_ext@ +fcflags_opt_17_minimax = @fcflags_opt_17_minimax@ +fcflags_opt_17_yaml_out = @fcflags_opt_17_yaml_out@ +fcflags_opt_18_timing = @fcflags_opt_18_timing@ +fcflags_opt_21_hashfuncs = @fcflags_opt_21_hashfuncs@ +fcflags_opt_27_toolbox_oop = @fcflags_opt_27_toolbox_oop@ +fcflags_opt_28_numeric_noabirule = @fcflags_opt_28_numeric_noabirule@ +fcflags_opt_29_kpoints = @fcflags_opt_29_kpoints@ +fcflags_opt_32_util = @fcflags_opt_32_util@ +fcflags_opt_33_xc_lowlevel = @fcflags_opt_33_xc_lowlevel@ +fcflags_opt_39_libpaw = @fcflags_opt_39_libpaw@ +fcflags_opt_41_geometry = @fcflags_opt_41_geometry@ +fcflags_opt_42_nlstrain = @fcflags_opt_42_nlstrain@ +fcflags_opt_42_parser = @fcflags_opt_42_parser@ +fcflags_opt_43_ptgroups = @fcflags_opt_43_ptgroups@ +fcflags_opt_43_wvl_wrappers = @fcflags_opt_43_wvl_wrappers@ +fcflags_opt_44_abitools = @fcflags_opt_44_abitools@ +fcflags_opt_44_abitypes_defs = @fcflags_opt_44_abitypes_defs@ +fcflags_opt_44_manage_kokkos = @fcflags_opt_44_manage_kokkos@ +fcflags_opt_45_geomoptim = @fcflags_opt_45_geomoptim@ +fcflags_opt_45_xgTools = @fcflags_opt_45_xgTools@ +fcflags_opt_46_ghc_omp = @fcflags_opt_46_ghc_omp@ +fcflags_opt_46_manage_cuda = @fcflags_opt_46_manage_cuda@ +fcflags_opt_48_diago = @fcflags_opt_48_diago@ +fcflags_opt_49_gw_toolbox_oop = @fcflags_opt_49_gw_toolbox_oop@ +fcflags_opt_51_manage_mpi = @fcflags_opt_51_manage_mpi@ +fcflags_opt_52_fft_mpi_noabirule = @fcflags_opt_52_fft_mpi_noabirule@ +fcflags_opt_53_ffts = @fcflags_opt_53_ffts@ +fcflags_opt_54_spacepar = @fcflags_opt_54_spacepar@ +fcflags_opt_55_abiutil = @fcflags_opt_55_abiutil@ +fcflags_opt_56_io_mpi = @fcflags_opt_56_io_mpi@ +fcflags_opt_56_mixing = @fcflags_opt_56_mixing@ +fcflags_opt_56_recipspace = @fcflags_opt_56_recipspace@ +fcflags_opt_56_xc = @fcflags_opt_56_xc@ +fcflags_opt_57_iopsp_parser = @fcflags_opt_57_iopsp_parser@ +fcflags_opt_57_iovars = @fcflags_opt_57_iovars@ +fcflags_opt_61_occeig = @fcflags_opt_61_occeig@ +fcflags_opt_62_cg_noabirule = @fcflags_opt_62_cg_noabirule@ +fcflags_opt_62_ctqmc = @fcflags_opt_62_ctqmc@ +fcflags_opt_62_iowfdenpot = @fcflags_opt_62_iowfdenpot@ +fcflags_opt_62_poisson = @fcflags_opt_62_poisson@ +fcflags_opt_62_wvl_wfs = @fcflags_opt_62_wvl_wfs@ +fcflags_opt_64_psp = @fcflags_opt_64_psp@ +fcflags_opt_65_lotf_base = @fcflags_opt_65_lotf_base@ +fcflags_opt_65_paw = @fcflags_opt_65_paw@ +fcflags_opt_66_nonlocal = @fcflags_opt_66_nonlocal@ +fcflags_opt_66_vdwxc = @fcflags_opt_66_vdwxc@ +fcflags_opt_66_wfs = @fcflags_opt_66_wfs@ +fcflags_opt_67_common = @fcflags_opt_67_common@ +fcflags_opt_67_python_invocation_ext = @fcflags_opt_67_python_invocation_ext@ +fcflags_opt_67_triqs_ext = @fcflags_opt_67_triqs_ext@ +fcflags_opt_68_dmft = @fcflags_opt_68_dmft@ +fcflags_opt_68_lotf = @fcflags_opt_68_lotf@ +fcflags_opt_68_recursion = @fcflags_opt_68_recursion@ +fcflags_opt_68_rsprc = @fcflags_opt_68_rsprc@ +fcflags_opt_69_wfdesc = @fcflags_opt_69_wfdesc@ +fcflags_opt_70_gw = @fcflags_opt_70_gw@ +fcflags_opt_71_bse = @fcflags_opt_71_bse@ +fcflags_opt_71_wannier = @fcflags_opt_71_wannier@ +fcflags_opt_72_response = @fcflags_opt_72_response@ +fcflags_opt_77_ddb = @fcflags_opt_77_ddb@ +fcflags_opt_77_suscep = @fcflags_opt_77_suscep@ +fcflags_opt_78_effpot = @fcflags_opt_78_effpot@ +fcflags_opt_78_eph = @fcflags_opt_78_eph@ +fcflags_opt_79_seqpar_mpi = @fcflags_opt_79_seqpar_mpi@ +fcflags_opt_80_rttddft = @fcflags_opt_80_rttddft@ +fcflags_opt_80_tdep = @fcflags_opt_80_tdep@ +fcflags_opt_94_scfcv = @fcflags_opt_94_scfcv@ +fcflags_opt_95_drive = @fcflags_opt_95_drive@ +fcflags_opt_98_main = @fcflags_opt_98_main@ +fcflags_opt_bigdft = @fcflags_opt_bigdft@ +fcflags_opt_default = @fcflags_opt_default@ +fcflags_opt_hdf5 = @fcflags_opt_hdf5@ +fcflags_opt_levmar = @fcflags_opt_levmar@ +fcflags_opt_libpsml = @fcflags_opt_libpsml@ +fcflags_opt_libxc = @fcflags_opt_libxc@ +fcflags_opt_libxml2 = @fcflags_opt_libxml2@ +fcflags_opt_linalg = @fcflags_opt_linalg@ +fcflags_opt_netcdf = @fcflags_opt_netcdf@ +fcflags_opt_netcdf_fortran = @fcflags_opt_netcdf_fortran@ +fcflags_opt_papi = @fcflags_opt_papi@ +fcflags_opt_triqs = @fcflags_opt_triqs@ +fcflags_opt_wannier90 = @fcflags_opt_wannier90@ +fcflags_opt_xmlf90 = @fcflags_opt_xmlf90@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sd_abinit_common_cppflags = @sd_abinit_common_cppflags@ +sd_abinit_common_enable = @sd_abinit_common_enable@ +sd_abinit_common_enable_def = @sd_abinit_common_enable_def@ +sd_abinit_common_fcflags = @sd_abinit_common_fcflags@ +sd_abinit_common_init = @sd_abinit_common_init@ +sd_abinit_common_ldflags = @sd_abinit_common_ldflags@ +sd_abinit_common_libs = @sd_abinit_common_libs@ +sd_abinit_common_ok = @sd_abinit_common_ok@ +sd_abinit_common_options = @sd_abinit_common_options@ +sd_abinit_common_policy = @sd_abinit_common_policy@ +sd_abinit_common_status = @sd_abinit_common_status@ +sd_bigdft_cppflags = @sd_bigdft_cppflags@ +sd_bigdft_enable = @sd_bigdft_enable@ +sd_bigdft_enable_def = @sd_bigdft_enable_def@ +sd_bigdft_fcflags = @sd_bigdft_fcflags@ +sd_bigdft_init = @sd_bigdft_init@ +sd_bigdft_ldflags = @sd_bigdft_ldflags@ +sd_bigdft_libs = @sd_bigdft_libs@ +sd_bigdft_ok = @sd_bigdft_ok@ +sd_bigdft_options = @sd_bigdft_options@ +sd_bigdft_policy = @sd_bigdft_policy@ +sd_bigdft_status = @sd_bigdft_status@ +sd_fft_cflags = @sd_fft_cflags@ +sd_fft_choices = @sd_fft_choices@ +sd_fft_cppflags = @sd_fft_cppflags@ +sd_fft_cxxflags = @sd_fft_cxxflags@ +sd_fft_enable = @sd_fft_enable@ +sd_fft_fcflags = @sd_fft_fcflags@ +sd_fft_flavor = @sd_fft_flavor@ +sd_fft_init = @sd_fft_init@ +sd_fft_ldflags = @sd_fft_ldflags@ +sd_fft_libs = @sd_fft_libs@ +sd_fft_ok = @sd_fft_ok@ +sd_fftw3_cflags = @sd_fftw3_cflags@ +sd_fftw3_cppflags = @sd_fftw3_cppflags@ +sd_fftw3_enable = @sd_fftw3_enable@ +sd_fftw3_enable_def = @sd_fftw3_enable_def@ +sd_fftw3_fcflags = @sd_fftw3_fcflags@ +sd_fftw3_init = @sd_fftw3_init@ +sd_fftw3_ldflags = @sd_fftw3_ldflags@ +sd_fftw3_libs = @sd_fftw3_libs@ +sd_fftw3_ok = @sd_fftw3_ok@ +sd_fftw3_options = @sd_fftw3_options@ +sd_fftw3_policy = @sd_fftw3_policy@ +sd_fftw3_status = @sd_fftw3_status@ +sd_gpu_cflags = @sd_gpu_cflags@ +sd_gpu_cppflags = @sd_gpu_cppflags@ +sd_gpu_cxxflags = @sd_gpu_cxxflags@ +sd_gpu_enable = @sd_gpu_enable@ +sd_gpu_enable_def = @sd_gpu_enable_def@ +sd_gpu_fcflags = @sd_gpu_fcflags@ +sd_gpu_init = @sd_gpu_init@ +sd_gpu_ldflags = @sd_gpu_ldflags@ +sd_gpu_libs = @sd_gpu_libs@ +sd_gpu_ok = @sd_gpu_ok@ +sd_gpu_options = @sd_gpu_options@ +sd_gpu_policy = @sd_gpu_policy@ +sd_gpu_prefix = @sd_gpu_prefix@ +sd_gpu_status = @sd_gpu_status@ +sd_hdf5_cflags = @sd_hdf5_cflags@ +sd_hdf5_cppflags = @sd_hdf5_cppflags@ +sd_hdf5_cxxflags = @sd_hdf5_cxxflags@ +sd_hdf5_enable = @sd_hdf5_enable@ +sd_hdf5_enable_def = @sd_hdf5_enable_def@ +sd_hdf5_enable_fc = @sd_hdf5_enable_fc@ +sd_hdf5_fcflags = @sd_hdf5_fcflags@ +sd_hdf5_h5cc = @sd_hdf5_h5cc@ +sd_hdf5_h5fc = @sd_hdf5_h5fc@ +sd_hdf5_init = @sd_hdf5_init@ +sd_hdf5_ldflags = @sd_hdf5_ldflags@ +sd_hdf5_libs = @sd_hdf5_libs@ +sd_hdf5_ok = @sd_hdf5_ok@ +sd_hdf5_options = @sd_hdf5_options@ +sd_hdf5_policy = @sd_hdf5_policy@ +sd_hdf5_status = @sd_hdf5_status@ +sd_kokkos_cppflags = @sd_kokkos_cppflags@ +sd_kokkos_cxxflags = @sd_kokkos_cxxflags@ +sd_kokkos_enable = @sd_kokkos_enable@ +sd_kokkos_enable_def = @sd_kokkos_enable_def@ +sd_kokkos_init = @sd_kokkos_init@ +sd_kokkos_ldflags = @sd_kokkos_ldflags@ +sd_kokkos_libs = @sd_kokkos_libs@ +sd_kokkos_ok = @sd_kokkos_ok@ +sd_kokkos_options = @sd_kokkos_options@ +sd_kokkos_policy = @sd_kokkos_policy@ +sd_kokkos_status = @sd_kokkos_status@ +sd_levmar_cflags = @sd_levmar_cflags@ +sd_levmar_cppflags = @sd_levmar_cppflags@ +sd_levmar_enable = @sd_levmar_enable@ +sd_levmar_enable_def = @sd_levmar_enable_def@ +sd_levmar_init = @sd_levmar_init@ +sd_levmar_ldflags = @sd_levmar_ldflags@ +sd_levmar_libs = @sd_levmar_libs@ +sd_levmar_ok = @sd_levmar_ok@ +sd_levmar_options = @sd_levmar_options@ +sd_levmar_policy = @sd_levmar_policy@ +sd_levmar_status = @sd_levmar_status@ +sd_libpaw_cppflags = @sd_libpaw_cppflags@ +sd_libpaw_enable = @sd_libpaw_enable@ +sd_libpaw_enable_def = @sd_libpaw_enable_def@ +sd_libpaw_fcflags = @sd_libpaw_fcflags@ +sd_libpaw_init = @sd_libpaw_init@ +sd_libpaw_ldflags = @sd_libpaw_ldflags@ +sd_libpaw_libs = @sd_libpaw_libs@ +sd_libpaw_ok = @sd_libpaw_ok@ +sd_libpaw_options = @sd_libpaw_options@ +sd_libpaw_policy = @sd_libpaw_policy@ +sd_libpaw_status = @sd_libpaw_status@ +sd_libpsml_cppflags = @sd_libpsml_cppflags@ +sd_libpsml_enable = @sd_libpsml_enable@ +sd_libpsml_enable_def = @sd_libpsml_enable_def@ +sd_libpsml_fcflags = @sd_libpsml_fcflags@ +sd_libpsml_init = @sd_libpsml_init@ +sd_libpsml_ldflags = @sd_libpsml_ldflags@ +sd_libpsml_libs = @sd_libpsml_libs@ +sd_libpsml_ok = @sd_libpsml_ok@ +sd_libpsml_options = @sd_libpsml_options@ +sd_libpsml_policy = @sd_libpsml_policy@ +sd_libpsml_status = @sd_libpsml_status@ +sd_libxc_cflags = @sd_libxc_cflags@ +sd_libxc_cppflags = @sd_libxc_cppflags@ +sd_libxc_enable = @sd_libxc_enable@ +sd_libxc_enable_def = @sd_libxc_enable_def@ +sd_libxc_enable_fc = @sd_libxc_enable_fc@ +sd_libxc_fcflags = @sd_libxc_fcflags@ +sd_libxc_init = @sd_libxc_init@ +sd_libxc_ldflags = @sd_libxc_ldflags@ +sd_libxc_libs = @sd_libxc_libs@ +sd_libxc_ok = @sd_libxc_ok@ +sd_libxc_options = @sd_libxc_options@ +sd_libxc_policy = @sd_libxc_policy@ +sd_libxc_status = @sd_libxc_status@ +sd_linalg_cflags = @sd_linalg_cflags@ +sd_linalg_choices = @sd_linalg_choices@ +sd_linalg_cppflags = @sd_linalg_cppflags@ +sd_linalg_cxxflags = @sd_linalg_cxxflags@ +sd_linalg_enable = @sd_linalg_enable@ +sd_linalg_fcflags = @sd_linalg_fcflags@ +sd_linalg_flavor = @sd_linalg_flavor@ +sd_linalg_has_elpa = @sd_linalg_has_elpa@ +sd_linalg_has_scalapack = @sd_linalg_has_scalapack@ +sd_linalg_init = @sd_linalg_init@ +sd_linalg_ldflags = @sd_linalg_ldflags@ +sd_linalg_libs = @sd_linalg_libs@ +sd_linalg_ok = @sd_linalg_ok@ +sd_mpi_cc = @sd_mpi_cc@ +sd_mpi_cflags = @sd_mpi_cflags@ +sd_mpi_cppflags = @sd_mpi_cppflags@ +sd_mpi_cxx = @sd_mpi_cxx@ +sd_mpi_enable = @sd_mpi_enable@ +sd_mpi_enable_cxx = @sd_mpi_enable_cxx@ +sd_mpi_enable_def = @sd_mpi_enable_def@ +sd_mpi_enable_fc = @sd_mpi_enable_fc@ +sd_mpi_fc = @sd_mpi_fc@ +sd_mpi_fcflags = @sd_mpi_fcflags@ +sd_mpi_init = @sd_mpi_init@ +sd_mpi_ldflags = @sd_mpi_ldflags@ +sd_mpi_libs = @sd_mpi_libs@ +sd_mpi_ok = @sd_mpi_ok@ +sd_mpi_options = @sd_mpi_options@ +sd_mpi_policy = @sd_mpi_policy@ +sd_mpi_status = @sd_mpi_status@ +sd_netcdf_cflags = @sd_netcdf_cflags@ +sd_netcdf_cppflags = @sd_netcdf_cppflags@ +sd_netcdf_enable = @sd_netcdf_enable@ +sd_netcdf_enable_def = @sd_netcdf_enable_def@ +sd_netcdf_fcflags = @sd_netcdf_fcflags@ +sd_netcdf_fortran_cflags = @sd_netcdf_fortran_cflags@ +sd_netcdf_fortran_cppflags = @sd_netcdf_fortran_cppflags@ +sd_netcdf_fortran_enable = @sd_netcdf_fortran_enable@ +sd_netcdf_fortran_enable_def = @sd_netcdf_fortran_enable_def@ +sd_netcdf_fortran_fcflags = @sd_netcdf_fortran_fcflags@ +sd_netcdf_fortran_init = @sd_netcdf_fortran_init@ +sd_netcdf_fortran_ldflags = @sd_netcdf_fortran_ldflags@ +sd_netcdf_fortran_libs = @sd_netcdf_fortran_libs@ +sd_netcdf_fortran_ok = @sd_netcdf_fortran_ok@ +sd_netcdf_fortran_options = @sd_netcdf_fortran_options@ +sd_netcdf_fortran_policy = @sd_netcdf_fortran_policy@ +sd_netcdf_fortran_status = @sd_netcdf_fortran_status@ +sd_netcdf_init = @sd_netcdf_init@ +sd_netcdf_ldflags = @sd_netcdf_ldflags@ +sd_netcdf_libs = @sd_netcdf_libs@ +sd_netcdf_ok = @sd_netcdf_ok@ +sd_netcdf_options = @sd_netcdf_options@ +sd_netcdf_policy = @sd_netcdf_policy@ +sd_netcdf_status = @sd_netcdf_status@ +sd_papi_cflags = @sd_papi_cflags@ +sd_papi_cppflags = @sd_papi_cppflags@ +sd_papi_enable = @sd_papi_enable@ +sd_papi_enable_def = @sd_papi_enable_def@ +sd_papi_init = @sd_papi_init@ +sd_papi_ldflags = @sd_papi_ldflags@ +sd_papi_libs = @sd_papi_libs@ +sd_papi_ok = @sd_papi_ok@ +sd_papi_options = @sd_papi_options@ +sd_papi_policy = @sd_papi_policy@ +sd_papi_sd_papi_fcflags = @sd_papi_sd_papi_fcflags@ +sd_papi_status = @sd_papi_status@ +sd_pfft_cflags = @sd_pfft_cflags@ +sd_pfft_cppflags = @sd_pfft_cppflags@ +sd_pfft_enable = @sd_pfft_enable@ +sd_pfft_enable_def = @sd_pfft_enable_def@ +sd_pfft_init = @sd_pfft_init@ +sd_pfft_ldflags = @sd_pfft_ldflags@ +sd_pfft_libs = @sd_pfft_libs@ +sd_pfft_ok = @sd_pfft_ok@ +sd_pfft_options = @sd_pfft_options@ +sd_pfft_policy = @sd_pfft_policy@ +sd_pfft_status = @sd_pfft_status@ +sd_sys_fcflags = @sd_sys_fcflags@ +sd_triqs_cflags = @sd_triqs_cflags@ +sd_triqs_cppflags = @sd_triqs_cppflags@ +sd_triqs_cxxflags = @sd_triqs_cxxflags@ +sd_triqs_enable = @sd_triqs_enable@ +sd_triqs_enable_def = @sd_triqs_enable_def@ +sd_triqs_fcflags = @sd_triqs_fcflags@ +sd_triqs_init = @sd_triqs_init@ +sd_triqs_ldflags = @sd_triqs_ldflags@ +sd_triqs_libs = @sd_triqs_libs@ +sd_triqs_ok = @sd_triqs_ok@ +sd_triqs_options = @sd_triqs_options@ +sd_triqs_policy = @sd_triqs_policy@ +sd_triqs_status = @sd_triqs_status@ +sd_wannier90_cppflags = @sd_wannier90_cppflags@ +sd_wannier90_enable = @sd_wannier90_enable@ +sd_wannier90_enable_def = @sd_wannier90_enable_def@ +sd_wannier90_fcflags = @sd_wannier90_fcflags@ +sd_wannier90_init = @sd_wannier90_init@ +sd_wannier90_ldflags = @sd_wannier90_ldflags@ +sd_wannier90_libs = @sd_wannier90_libs@ +sd_wannier90_ok = @sd_wannier90_ok@ +sd_wannier90_options = @sd_wannier90_options@ +sd_wannier90_policy = @sd_wannier90_policy@ +sd_wannier90_status = @sd_wannier90_status@ +sd_xmlf90_cppflags = @sd_xmlf90_cppflags@ +sd_xmlf90_enable = @sd_xmlf90_enable@ +sd_xmlf90_enable_def = @sd_xmlf90_enable_def@ +sd_xmlf90_fcflags = @sd_xmlf90_fcflags@ +sd_xmlf90_init = @sd_xmlf90_init@ +sd_xmlf90_ldflags = @sd_xmlf90_ldflags@ +sd_xmlf90_libs = @sd_xmlf90_libs@ +sd_xmlf90_ok = @sd_xmlf90_ok@ +sd_xmlf90_options = @sd_xmlf90_options@ +sd_xmlf90_policy = @sd_xmlf90_policy@ +sd_xmlf90_status = @sd_xmlf90_status@ +sd_yakl_cppflags = @sd_yakl_cppflags@ +sd_yakl_enable = @sd_yakl_enable@ +sd_yakl_enable_def = @sd_yakl_enable_def@ +sd_yakl_fcflags = @sd_yakl_fcflags@ +sd_yakl_init = @sd_yakl_init@ +sd_yakl_ldflags = @sd_yakl_ldflags@ +sd_yakl_libs = @sd_yakl_libs@ +sd_yakl_ok = @sd_yakl_ok@ +sd_yakl_options = @sd_yakl_options@ +sd_yakl_policy = @sd_yakl_policy@ +sd_yakl_status = @sd_yakl_status@ +sharedstatedir = @sharedstatedir@ +src_02_clib_fcflags = @src_02_clib_fcflags@ +src_10_defs_fcflags = @src_10_defs_fcflags@ +src_11_memory_mpi_fcflags = @src_11_memory_mpi_fcflags@ +src_12_hide_mpi_fcflags = @src_12_hide_mpi_fcflags@ +src_14_hidewrite_fcflags = @src_14_hidewrite_fcflags@ +src_16_hideleave_fcflags = @src_16_hideleave_fcflags@ +src_16_kokkos_toolbox_fcflags = @src_16_kokkos_toolbox_fcflags@ +src_17_gpu_toolbox_fcflags = @src_17_gpu_toolbox_fcflags@ +src_17_libtetra_ext_fcflags = @src_17_libtetra_ext_fcflags@ +src_17_minimax_fcflags = @src_17_minimax_fcflags@ +src_17_yaml_out_fcflags = @src_17_yaml_out_fcflags@ +src_18_timing_fcflags = @src_18_timing_fcflags@ +src_21_hashfuncs_fcflags = @src_21_hashfuncs_fcflags@ +src_27_toolbox_oop_fcflags = @src_27_toolbox_oop_fcflags@ +src_28_numeric_noabirule_fcflags = @src_28_numeric_noabirule_fcflags@ +src_29_kpoints_fcflags = @src_29_kpoints_fcflags@ +src_32_util_fcflags = @src_32_util_fcflags@ +src_33_xc_lowlevel_fcflags = @src_33_xc_lowlevel_fcflags@ +src_39_libpaw_fcflags = @src_39_libpaw_fcflags@ +src_41_geometry_fcflags = @src_41_geometry_fcflags@ +src_42_nlstrain_fcflags = @src_42_nlstrain_fcflags@ +src_42_parser_fcflags = @src_42_parser_fcflags@ +src_43_ptgroups_fcflags = @src_43_ptgroups_fcflags@ +src_43_wvl_wrappers_fcflags = @src_43_wvl_wrappers_fcflags@ +src_44_abitools_fcflags = @src_44_abitools_fcflags@ +src_44_abitypes_defs_fcflags = @src_44_abitypes_defs_fcflags@ +src_44_manage_kokkos_fcflags = @src_44_manage_kokkos_fcflags@ +src_45_geomoptim_fcflags = @src_45_geomoptim_fcflags@ +src_45_xgTools_fcflags = @src_45_xgTools_fcflags@ +src_46_ghc_omp_fcflags = @src_46_ghc_omp_fcflags@ +src_46_manage_cuda_fcflags = @src_46_manage_cuda_fcflags@ +src_48_diago_fcflags = @src_48_diago_fcflags@ +src_49_gw_toolbox_oop_fcflags = @src_49_gw_toolbox_oop_fcflags@ +src_51_manage_mpi_fcflags = @src_51_manage_mpi_fcflags@ +src_52_fft_mpi_noabirule_fcflags = @src_52_fft_mpi_noabirule_fcflags@ +src_53_ffts_fcflags = @src_53_ffts_fcflags@ +src_54_spacepar_fcflags = @src_54_spacepar_fcflags@ +src_55_abiutil_fcflags = @src_55_abiutil_fcflags@ +src_56_io_mpi_fcflags = @src_56_io_mpi_fcflags@ +src_56_mixing_fcflags = @src_56_mixing_fcflags@ +src_56_recipspace_fcflags = @src_56_recipspace_fcflags@ +src_56_xc_fcflags = @src_56_xc_fcflags@ +src_57_iopsp_parser_fcflags = @src_57_iopsp_parser_fcflags@ +src_57_iovars_fcflags = @src_57_iovars_fcflags@ +src_61_occeig_fcflags = @src_61_occeig_fcflags@ +src_62_cg_noabirule_fcflags = @src_62_cg_noabirule_fcflags@ +src_62_ctqmc_fcflags = @src_62_ctqmc_fcflags@ +src_62_iowfdenpot_fcflags = @src_62_iowfdenpot_fcflags@ +src_62_poisson_fcflags = @src_62_poisson_fcflags@ +src_62_wvl_wfs_fcflags = @src_62_wvl_wfs_fcflags@ +src_64_psp_fcflags = @src_64_psp_fcflags@ +src_65_lotf_base_fcflags = @src_65_lotf_base_fcflags@ +src_65_paw_fcflags = @src_65_paw_fcflags@ +src_66_nonlocal_fcflags = @src_66_nonlocal_fcflags@ +src_66_vdwxc_fcflags = @src_66_vdwxc_fcflags@ +src_66_wfs_fcflags = @src_66_wfs_fcflags@ +src_67_common_fcflags = @src_67_common_fcflags@ +src_67_python_invocation_ext_fcflags = @src_67_python_invocation_ext_fcflags@ +src_67_triqs_ext_fcflags = @src_67_triqs_ext_fcflags@ +src_68_dmft_fcflags = @src_68_dmft_fcflags@ +src_68_lotf_fcflags = @src_68_lotf_fcflags@ +src_68_recursion_fcflags = @src_68_recursion_fcflags@ +src_68_rsprc_fcflags = @src_68_rsprc_fcflags@ +src_69_wfdesc_fcflags = @src_69_wfdesc_fcflags@ +src_70_gw_fcflags = @src_70_gw_fcflags@ +src_71_bse_fcflags = @src_71_bse_fcflags@ +src_71_wannier_fcflags = @src_71_wannier_fcflags@ +src_72_response_fcflags = @src_72_response_fcflags@ +src_77_ddb_fcflags = @src_77_ddb_fcflags@ +src_77_suscep_fcflags = @src_77_suscep_fcflags@ +src_78_effpot_fcflags = @src_78_effpot_fcflags@ +src_78_eph_fcflags = @src_78_eph_fcflags@ +src_79_seqpar_mpi_fcflags = @src_79_seqpar_mpi_fcflags@ +src_80_rttddft_fcflags = @src_80_rttddft_fcflags@ +src_80_tdep_fcflags = @src_80_tdep_fcflags@ +src_94_scfcv_fcflags = @src_94_scfcv_fcflags@ +src_95_drive_fcflags = @src_95_drive_fcflags@ +src_common_fcflags = @src_common_fcflags@ +src_core_fcflags = @src_core_fcflags@ +src_libpaw_fcflags = @src_libpaw_fcflags@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +with_abinit_common = @with_abinit_common@ +with_bigdft = @with_bigdft@ +with_config_file = @with_config_file@ +with_debug_flavor = @with_debug_flavor@ +with_fallbacks = @with_fallbacks@ +with_fc_vendor = @with_fc_vendor@ +with_fc_version = @with_fc_version@ +with_fft_flavor = @with_fft_flavor@ +with_fftw3 = @with_fftw3@ +with_gnu_ld = @with_gnu_ld@ +with_gpu = @with_gpu@ +with_hdf5 = @with_hdf5@ +with_kokkos = @with_kokkos@ +with_levmar = @with_levmar@ +with_libpaw = @with_libpaw@ +with_libpsml = @with_libpsml@ +with_libxc = @with_libxc@ +with_libxml2 = @with_libxml2@ +with_linalg_flavor = @with_linalg_flavor@ +with_mpi = @with_mpi@ +with_mpi_level = @with_mpi_level@ +with_netcdf = @with_netcdf@ +with_optim_flavor = @with_optim_flavor@ +with_papi = @with_papi@ +with_pfft = @with_pfft@ +with_triqs = @with_triqs@ +with_wannier90 = @with_wannier90@ +with_xmlf90 = @with_xmlf90@ +with_yakl = @with_yakl@ +AM_CFLAGS = @ABI_CPPFLAGS@ +AM_CXXFLAGS = $(sd_triqs_cxxflags) +AM_FCFLAGS = @FPPFLAGS@ @FCFLAGS_FREEFORM@ @FCFLAGS_MODDIR@ @sd_sys_fcflags@ @fcflags_opt_17_libtetra_ext@ +AM_CPPFLAGS = \ + @src_10_defs_fcflags@ \ + @src_11_memory_mpi_fcflags@ \ + @src_12_hide_mpi_fcflags@ \ + @src_14_hidewrite_fcflags@ \ + @src_16_hideleave_fcflags@ \ + @src_17_libtetra_ext_fcflags@ \ + @src_common_fcflags@ \ + @src_core_fcflags@ \ + @src_libpaw_fcflags@ \ + @fc_mod_fcflags@ + + +# Regular source files +lib17_libtetra_ext_srcs = \ + libtetrabz.F90 \ + libtetrabz_common.F90 \ + libtetrabz_dbldelta_mod.F90 \ + libtetrabz_dblstep_mod.F90 \ + libtetrabz_dos_mod.F90 \ + libtetrabz_fermigr_mod.F90 \ + libtetrabz_occ_mod.F90 \ + libtetrabz_polcmplx_mod.F90 \ + libtetrabz_polstat_mod.F90 \ + m_simtet.F90 \ + m_krank.F90 \ + m_tetrahedron.F90 + + +# Source files depending on conditionals + +# Library description +noinst_LIBRARIES = lib17_libtetra_ext.a +lib17_libtetra_ext_a_SOURCES = $(lib17_libtetra_ext_srcs) + +# Dependencies (inside the directory) of directory 17_libtetra_ext +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. +CLEANFILES = libtetrabz_cpp.f90 libtetrabz_common_cpp.f90 \ + libtetrabz_dbldelta_mod_cpp.f90 libtetrabz_dblstep_mod_cpp.f90 \ + libtetrabz_dos_mod_cpp.f90 libtetrabz_fermigr_mod_cpp.f90 \ + libtetrabz_occ_mod_cpp.f90 libtetrabz_polcmplx_mod_cpp.f90 \ + libtetrabz_polstat_mod_cpp.f90 m_simtet_cpp.f90 \ + m_krank_cpp.f90 m_tetrahedron_cpp.f90 libtetrabz.$(MODEXT) \ + libtetrabz_common.$(MODEXT) libtetrabz_dbldelta_mod.$(MODEXT) \ + libtetrabz_dblstep_mod.$(MODEXT) libtetrabz_dos_mod.$(MODEXT) \ + libtetrabz_fermigr_mod.$(MODEXT) libtetrabz_occ_mod.$(MODEXT) \ + libtetrabz_polcmplx_mod.$(MODEXT) \ + libtetrabz_polstat_mod.$(MODEXT) m_krank.$(MODEXT) \ + m_simtet.$(MODEXT) m_tetrahedron.$(MODEXT) +EXTRA_DIST = abinit.src abinit.dep abinit.amf libtetra.h \ + _17_libtetra_ext_ +all: all-am + +.SUFFIXES: +.SUFFIXES: .F90 .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu shared/common/src/17_libtetra_ext/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu shared/common/src/17_libtetra_ext/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) + +lib17_libtetra_ext.a: $(lib17_libtetra_ext_a_OBJECTS) $(lib17_libtetra_ext_a_DEPENDENCIES) $(EXTRA_lib17_libtetra_ext_a_DEPENDENCIES) + $(AM_V_at)-rm -f lib17_libtetra_ext.a + $(AM_V_AR)$(lib17_libtetra_ext_a_AR) lib17_libtetra_ext.a $(lib17_libtetra_ext_a_OBJECTS) $(lib17_libtetra_ext_a_LIBADD) + $(AM_V_at)$(RANLIB) lib17_libtetra_ext.a + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +.F90.o: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ $< + +.F90.obj: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-noinstLIBRARIES cscopelist-am ctags ctags-am distclean \ + distclean-compile distclean-generic distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am + +.PRECIOUS: Makefile + + +libtetrabz.$(OBJEXT): libtetrabz_dbldelta_mod.$(OBJEXT) libtetrabz_dblstep_mod.$(OBJEXT) libtetrabz_dos_mod.$(OBJEXT) libtetrabz_fermigr_mod.$(OBJEXT) libtetrabz_occ_mod.$(OBJEXT) libtetrabz_polcmplx_mod.$(OBJEXT) libtetrabz_polstat_mod.$(OBJEXT) + +libtetrabz_dbldelta_mod.$(OBJEXT): libtetrabz_common.$(OBJEXT) + +libtetrabz_dblstep_mod.$(OBJEXT): libtetrabz_common.$(OBJEXT) + +libtetrabz_dos_mod.$(OBJEXT): libtetrabz_common.$(OBJEXT) + +libtetrabz_fermigr_mod.$(OBJEXT): libtetrabz_common.$(OBJEXT) + +libtetrabz_occ_mod.$(OBJEXT): libtetrabz_common.$(OBJEXT) + +libtetrabz_polcmplx_mod.$(OBJEXT): libtetrabz_common.$(OBJEXT) + +libtetrabz_polstat_mod.$(OBJEXT): libtetrabz_common.$(OBJEXT) + +m_tetrahedron.$(OBJEXT): m_krank.$(OBJEXT) + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/GX-PAW/common/src/17_libtetra_ext/_17_libtetra_ext_ b/GX-PAW/common/src/17_libtetra_ext/_17_libtetra_ext_ new file mode 100644 index 00000000..49d769b6 --- /dev/null +++ b/GX-PAW/common/src/17_libtetra_ext/_17_libtetra_ext_ @@ -0,0 +1,29 @@ +!!****d* ABINIT/17_libtetra_ext +!! NAME +!! 17_libtetra_ext +!! +!! DESCRIPTION +!! Library for tetrahedron integration. +!! +!! COPYRIGHT +!! Copyright (C) 1998-2024 ABINIT group +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! For the initials of contributors, see ~abinit/doc/developers/contributors.txt . +!! +!! CHILDREN +!! interfaces_17_libtetra_ext.F90 +!! libtetrabz.F90 +!! libtetrabz_common.F90 +!! libtetrabz_dbldelta_mod.F90 +!! libtetrabz_dblstep_mod.F90 +!! libtetrabz_dos_mod.F90 +!! libtetrabz_fermigr_mod.F90 +!! libtetrabz_occ_mod.F90 +!! libtetrabz_polcmplx_mod.F90 +!! libtetrabz_polstat_mod.F90 +!! m_kptrank.F90 +!! m_tetrahedron.F90 +!! +!!*** diff --git a/GX-PAW/common/src/17_libtetra_ext/__pycache__/abinit.cpython-36.pyc b/GX-PAW/common/src/17_libtetra_ext/__pycache__/abinit.cpython-36.pyc new file mode 100644 index 00000000..529bfb79 Binary files /dev/null and b/GX-PAW/common/src/17_libtetra_ext/__pycache__/abinit.cpython-36.pyc differ diff --git a/GX-PAW/common/src/17_libtetra_ext/abinit.amf b/GX-PAW/common/src/17_libtetra_ext/abinit.amf new file mode 100644 index 00000000..d4d5a543 --- /dev/null +++ b/GX-PAW/common/src/17_libtetra_ext/abinit.amf @@ -0,0 +1,2 @@ +EXTRA_DIST += \ + libtetra.h diff --git a/GX-PAW/common/src/17_libtetra_ext/abinit.dep b/GX-PAW/common/src/17_libtetra_ext/abinit.dep new file mode 100644 index 00000000..f8c40186 --- /dev/null +++ b/GX-PAW/common/src/17_libtetra_ext/abinit.dep @@ -0,0 +1,37 @@ +# Dependencies (inside the directory) of directory 17_libtetra_ext +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. + +CLEANFILES += \ + libtetrabz.$(MODEXT) \ + libtetrabz_common.$(MODEXT) \ + libtetrabz_dbldelta_mod.$(MODEXT) \ + libtetrabz_dblstep_mod.$(MODEXT) \ + libtetrabz_dos_mod.$(MODEXT) \ + libtetrabz_fermigr_mod.$(MODEXT) \ + libtetrabz_occ_mod.$(MODEXT) \ + libtetrabz_polcmplx_mod.$(MODEXT) \ + libtetrabz_polstat_mod.$(MODEXT) \ + m_krank.$(MODEXT) \ + m_simtet.$(MODEXT) \ + m_tetrahedron.$(MODEXT) + +libtetrabz.$(OBJEXT): libtetrabz_dbldelta_mod.$(OBJEXT) libtetrabz_dblstep_mod.$(OBJEXT) libtetrabz_dos_mod.$(OBJEXT) libtetrabz_fermigr_mod.$(OBJEXT) libtetrabz_occ_mod.$(OBJEXT) libtetrabz_polcmplx_mod.$(OBJEXT) libtetrabz_polstat_mod.$(OBJEXT) + +libtetrabz_dbldelta_mod.$(OBJEXT): libtetrabz_common.$(OBJEXT) + +libtetrabz_dblstep_mod.$(OBJEXT): libtetrabz_common.$(OBJEXT) + +libtetrabz_dos_mod.$(OBJEXT): libtetrabz_common.$(OBJEXT) + +libtetrabz_fermigr_mod.$(OBJEXT): libtetrabz_common.$(OBJEXT) + +libtetrabz_occ_mod.$(OBJEXT): libtetrabz_common.$(OBJEXT) + +libtetrabz_polcmplx_mod.$(OBJEXT): libtetrabz_common.$(OBJEXT) + +libtetrabz_polstat_mod.$(OBJEXT): libtetrabz_common.$(OBJEXT) + +m_tetrahedron.$(OBJEXT): m_krank.$(OBJEXT) \ No newline at end of file diff --git a/GX-PAW/common/src/17_libtetra_ext/abinit.dir b/GX-PAW/common/src/17_libtetra_ext/abinit.dir new file mode 100644 index 00000000..1c079d51 --- /dev/null +++ b/GX-PAW/common/src/17_libtetra_ext/abinit.dir @@ -0,0 +1,13 @@ +# Dependencies (outside the directory) of directory 17_libtetra_ext +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. + +include_dirs = \ +['10_defs', + '11_memory_mpi', + '12_hide_mpi', + '14_hidewrite', + '16_hideleave', + '17_libtetra_ext'] \ No newline at end of file diff --git a/GX-PAW/common/src/17_libtetra_ext/abinit.src b/GX-PAW/common/src/17_libtetra_ext/abinit.src new file mode 100644 index 00000000..dd79c5b9 --- /dev/null +++ b/GX-PAW/common/src/17_libtetra_ext/abinit.src @@ -0,0 +1,36 @@ +# -*- Python -*- +# +# Copyright (C) 2005-2024 ABINIT Group (Yann Pouillon) +# +# This file is part of the ABINIT software package. For license information, +# please see the COPYING file in the top-level directory of the ABINIT source +# distribution. +# + +# +# Source files making up the numeric library +# + +# Source file attributes +ABI_SRC_NIL = 0 # No attribute +ABI_SRC_BLT = 1 # The file is built by a script +ABI_SRC_DEP = 2 # The file depends on other files + +# Source files +sources = [ + # source files from libtetrabz http://libtetrabz.osdn.jp/en/_build/html/index.html + "libtetrabz.F90", + "libtetrabz_common.F90", + "libtetrabz_dbldelta_mod.F90", + "libtetrabz_dblstep_mod.F90", + "libtetrabz_dos_mod.F90", + "libtetrabz_fermigr_mod.F90", + "libtetrabz_occ_mod.F90", + "libtetrabz_polcmplx_mod.F90", + "libtetrabz_polstat_mod.F90", + "m_simtet.F90", + "m_krank.F90", + "m_tetrahedron.F90", + ] +# IMPORTANT : please use the alphabetic order in the previous list. Do NOT add the new routine names at the end of the list. +# This is important to avoid numerous conflicts at merge time. Thank you very much. Xavier. diff --git a/GX-PAW/common/src/17_libtetra_ext/lib17_libtetra_ext.a b/GX-PAW/common/src/17_libtetra_ext/lib17_libtetra_ext.a new file mode 100644 index 00000000..799f1a0a Binary files /dev/null and b/GX-PAW/common/src/17_libtetra_ext/lib17_libtetra_ext.a differ diff --git a/GX-PAW/common/src/17_libtetra_ext/libtetra.h b/GX-PAW/common/src/17_libtetra_ext/libtetra.h new file mode 100644 index 00000000..ee4757f4 --- /dev/null +++ b/GX-PAW/common/src/17_libtetra_ext/libtetra.h @@ -0,0 +1,20 @@ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#ifdef HAVE_LIBTETRA_ABINIT +#include "abi_common.h" +# define TETRA_ALLOCATE(ARR,SIZE) ABI_MALLOC(ARR,SIZE) +# define TETRA_DEALLOCATE(ARR) ABI_FREE(ARR) +# define TETRA_ERROR(MSG) ABI_ERROR(MSG) +# define USE_MEMORY_PROFILING use m_profiling_abi +# define USE_MSG_HANDLING use m_errors, only : msg_hndl + +#else +# define TETRA_ALLOCATE(ARR,SIZE) allocate(ARR SIZE) +# define TETRA_DEALLOCATE(ARR) deallocate(ARR) +# define TETRA_ERROR(MSG) write (stdout,'(a)') MSG ; stop "ERROR" +# define USE_MEMORY_PROFILING +# define USE_MSG_HANDLING +#endif diff --git a/GX-PAW/common/src/17_libtetra_ext/libtetrabz.F90 b/GX-PAW/common/src/17_libtetra_ext/libtetrabz.F90 new file mode 100644 index 00000000..bd49f9ca --- /dev/null +++ b/GX-PAW/common/src/17_libtetra_ext/libtetrabz.F90 @@ -0,0 +1,41 @@ + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" +! +! Copyright (C) 2014 Mitsuaki Kawamura +! +! Permission is hereby granted, free of charge, to any person obtaining a +! copy of this software and associated documentation files (the +! "Software"), to deal in the Software without restriction, including +! without limitation the rights to use, copy, modify, merge, publish, +! distribute, sublicense, and/or sell copies of the Software, and to +! permit persons to whom the Software is furnished to do so, subject to +! the following conditions: +! +! The above copyright notice and this permission notice shall be included +! in all copies or substantial portions of the Software. +! +! THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +! OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +! MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +! IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +! CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +! TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +! SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +! +MODULE libtetrabz + ! + USE libtetrabz_occ_mod, ONLY : libtetrabz_occ + USE libtetrabz_occ_mod, ONLY : libtetrabz_fermieng + USE libtetrabz_dos_mod, ONLY : libtetrabz_dos + USE libtetrabz_dos_mod, ONLY : libtetrabz_intdos + USE libtetrabz_dblstep_mod, ONLY : libtetrabz_dblstep + USE libtetrabz_dbldelta_mod, ONLY : libtetrabz_dbldelta + USE libtetrabz_polstat_mod, ONLY : libtetrabz_polstat + USE libtetrabz_fermigr_mod, ONLY : libtetrabz_fermigr + USE libtetrabz_polcmplx_mod, ONLY : libtetrabz_polcmplx + ! +END MODULE libtetrabz diff --git a/GX-PAW/common/src/17_libtetra_ext/libtetrabz.o b/GX-PAW/common/src/17_libtetra_ext/libtetrabz.o new file mode 100644 index 00000000..21795e99 Binary files /dev/null and b/GX-PAW/common/src/17_libtetra_ext/libtetrabz.o differ diff --git a/GX-PAW/common/src/17_libtetra_ext/libtetrabz2abi.py b/GX-PAW/common/src/17_libtetra_ext/libtetrabz2abi.py new file mode 100755 index 00000000..28ed44f1 --- /dev/null +++ b/GX-PAW/common/src/17_libtetra_ext/libtetrabz2abi.py @@ -0,0 +1,36 @@ +#!/usr/bin/env python +""" +Change libtetrabz source file so that they are compatible with the Abinit build system. +""" +from __future__ import unicode_literals, division, print_function, absolute_import + +import os + +here = os.path.dirname(__file__) +f90_files = [f for f in os.listdir(here) if f.startswith("libtetrabz") and f.endswith(".F90")] +paths = [os.path.join(here, f) for f in f90_files] + +def abi_sanitize(line): + line = line.replace("__MPI", "HAVE_MPI") + # Bind(C) with optional args requires F2015 + line = line.replace("BIND(C)", "") + return line + +print("Replacing __MPI with HAVE_MPI in the following routines:") +for path in paths: + print("\t", path) + lines = [""" +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" +"""] + lines = [] + + with open(path, "rt") as fh: + lines += [abi_sanitize(l) for l in fh] + + print(lines) + with open(path, "wt") as fh: + fh.writelines(lines) diff --git a/GX-PAW/common/src/17_libtetra_ext/libtetrabz_common.F90 b/GX-PAW/common/src/17_libtetra_ext/libtetrabz_common.F90 new file mode 100644 index 00000000..3d8b7f71 --- /dev/null +++ b/GX-PAW/common/src/17_libtetra_ext/libtetrabz_common.F90 @@ -0,0 +1,849 @@ + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" +! +! Copyright (C) 2014 Mitsuaki Kawamura +! +! Permission is hereby granted, free of charge, to any person obtaining a +! copy of this software and associated documentation files (the +! "Software"), to deal in the Software without restriction, including +! without limitation the rights to use, copy, modify, merge, publish, +! distribute, sublicense, and/or sell copies of the Software, and to +! permit persons to whom the Software is furnished to do so, subject to +! the following conditions: +! +! The above copyright notice and this permission notice shall be included +! in all copies or substantial portions of the Software. +! +! THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +! OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +! MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +! IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +! CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +! TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +! SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +! +MODULE libtetrabz_common + ! + use m_abicore + use m_errors +#if defined HAVE_MPI2 + use mpi, ONLY : MPI_DOUBLE_PRECISION, MPI_DOUBLE_COMPLEX, MPI_SUM, MPI_IN_PLACE +#endif + + IMPLICIT NONE + +#if defined HAVE_MPI1 + include 'mpif.h' +#endif + ! + PRIVATE + + PUBLIC :: libtetrabz_initialize, libtetrabz_sort, libtetrabz_interpol_indx, & + & libtetrabz_tsmall_a1, libtetrabz_tsmall_b1, libtetrabz_tsmall_b2, libtetrabz_tsmall_b3, & + & libtetrabz_tsmall_c1, libtetrabz_tsmall_c2, libtetrabz_tsmall_c3, & + & libtetrabz_triangle_a1, libtetrabz_triangle_b1, & + & libtetrabz_triangle_b2, libtetrabz_triangle_c1, & + & libtetrabz_mpisum_d, libtetrabz_mpisum_dv, libtetrabz_mpisum_zv + ! + +CONTAINS +! +! define shortest diagonal line & define type of tetragonal +! +SUBROUTINE libtetrabz_initialize(ltetra,nge,ngw,bvec,linterpol,wlsm,nk_local,nt_local,nkBZ,ik_global,ik_local,kvec,comm) + ! + IMPLICIT NONE + ! + INTEGER,INTENT(IN) :: ltetra, nge(3), ngw(3) + REAL(8),INTENT(IN) :: bvec(3,3) + LOGICAL,INTENT(OUT) :: linterpol + REAL(8),INTENT(OUT) :: wlsm(4,20) + INTEGER,INTENT(OUT) :: nk_local, nt_local, nkBZ + INTEGER,INTENT(OUT),ALLOCATABLE :: ik_global(:,:), ik_local(:,:) + REAL(8),INTENT(OUT),ALLOCATABLE :: kvec(:,:) + INTEGER,INTENT(IN),OPTIONAL :: comm + ! + INTEGER :: itype, i1, i2, i3, it, divvec(4,4), ivvec0(4), ivvec(3,20,6) + REAL(8) :: l(4), bvec2(3,3), bvec3(3,4) + ! + nkBZ = PRODUCT(nge(1:3)) + linterpol = .NOT. ALL(nge(1:3) == ngw(1:3)) + ! + DO i1 = 1, 3 + bvec2(1:3,i1) = bvec(1:3,i1) / DBLE(nge(i1)) + END DO + ! + bvec3(1:3,1) = -bvec2(1:3,1) + bvec2(1:3,2) + bvec2(1:3,3) + bvec3(1:3,2) = bvec2(1:3,1) - bvec2(1:3,2) + bvec2(1:3,3) + bvec3(1:3,3) = bvec2(1:3,1) + bvec2(1:3,2) - bvec2(1:3,3) + bvec3(1:3,4) = bvec2(1:3,1) + bvec2(1:3,2) + bvec2(1:3,3) + ! + ! length of delta bvec + ! + DO i1 = 1, 4 + l(i1) = DOT_PRODUCT(bvec3(1:3,i1),bvec3(1:3,i1)) + END DO + ! + itype = MINLOC(l(1:4),1) + ! + ! start & last + ! + ivvec0(1:4) = (/ 0, 0, 0, 0 /) + ! + divvec(1:4,1) = (/ 1, 0, 0, 0 /) + divvec(1:4,2) = (/ 0, 1, 0, 0 /) + divvec(1:4,3) = (/ 0, 0, 1, 0 /) + divvec(1:4,4) = (/ 0, 0, 0, 1 /) + ! + ivvec0(itype) = 1 + divvec(itype, itype) = - 1 + ! + ! Corners of tetrahedra + ! + it = 0 + DO i1 = 1, 3 + DO i2 = 1, 3 + IF(i2 == i1) CYCLE + DO i3 = 1, 3 + IF(i3 == i1 .OR. i3 == i2) CYCLE + ! + it = it + 1 + ! + ivvec(1:3,1,it) = ivvec0(1:3) + ivvec(1:3,2,it) = ivvec(1:3,1,it) + divvec(1:3,i1) + ivvec(1:3,3,it) = ivvec(1:3,2,it) + divvec(1:3,i2) + ivvec(1:3,4,it) = ivvec(1:3,3,it) + divvec(1:3,i3) + ! + END DO + END DO + END DO + ! + ! Additional points + ! + ivvec(1:3, 5,1:6) = 2 * ivvec(1:3,1,1:6) - ivvec(1:3,2,1:6) + ivvec(1:3, 6,1:6) = 2 * ivvec(1:3,2,1:6) - ivvec(1:3,3,1:6) + ivvec(1:3, 7,1:6) = 2 * ivvec(1:3,3,1:6) - ivvec(1:3,4,1:6) + ivvec(1:3, 8,1:6) = 2 * ivvec(1:3,4,1:6) - ivvec(1:3,1,1:6) + ! + ivvec(1:3, 9,1:6) = 2 * ivvec(1:3,1,1:6) - ivvec(1:3,3,1:6) + ivvec(1:3,10,1:6) = 2 * ivvec(1:3,2,1:6) - ivvec(1:3,4,1:6) + ivvec(1:3,11,1:6) = 2 * ivvec(1:3,3,1:6) - ivvec(1:3,1,1:6) + ivvec(1:3,12,1:6) = 2 * ivvec(1:3,4,1:6) - ivvec(1:3,2,1:6) + ! + ivvec(1:3,13,1:6) = 2 * ivvec(1:3,1,1:6) - ivvec(1:3,4,1:6) + ivvec(1:3,14,1:6) = 2 * ivvec(1:3,2,1:6) - ivvec(1:3,1,1:6) + ivvec(1:3,15,1:6) = 2 * ivvec(1:3,3,1:6) - ivvec(1:3,2,1:6) + ivvec(1:3,16,1:6) = 2 * ivvec(1:3,4,1:6) - ivvec(1:3,3,1:6) + ! + ivvec(1:3,17,1:6) = ivvec(1:3,4,1:6) - ivvec(1:3,1,1:6) + ivvec(1:3,2,1:6) + ivvec(1:3,18,1:6) = ivvec(1:3,1,1:6) - ivvec(1:3,2,1:6) + ivvec(1:3,3,1:6) + ivvec(1:3,19,1:6) = ivvec(1:3,2,1:6) - ivvec(1:3,3,1:6) + ivvec(1:3,4,1:6) + ivvec(1:3,20,1:6) = ivvec(1:3,3,1:6) - ivvec(1:3,4,1:6) + ivvec(1:3,1,1:6) + ! + IF(ltetra == 1) THEN + ! + !WRITE(*,*) "[libtetrabz] Linear tetrahedron method is used." + ! + wlsm(1:4,1:20) = 0.0d0 + wlsm(1,1) = 1.0d0 + wlsm(2,2) = 1.0d0 + wlsm(3,3) = 1.0d0 + wlsm(4,4) = 1.0d0 + ! + ELSE IF(ltetra == 2) THEN + ! + !WRITE(*,*) "[libtetrabz] Improved tetrahedron method is used." + ! + wlsm(1, 1: 4) = DBLE((/1440, 0, 30, 0/)) + wlsm(2, 1: 4) = DBLE((/ 0, 1440, 0, 30/)) + wlsm(3, 1: 4) = DBLE((/ 30, 0, 1440, 0/)) + wlsm(4, 1: 4) = DBLE((/ 0, 30, 0, 1440/)) + ! + wlsm(1, 5: 8) = DBLE((/ -38, 7, 17, -28/)) + wlsm(2, 5: 8) = DBLE((/ -28, -38, 7, 17/)) + wlsm(3, 5: 8) = DBLE((/ 17, -28, -38, 7/)) + wlsm(4, 5: 8) = DBLE((/ 7, 17, -28, -38/)) + ! + wlsm(1, 9:12) = DBLE((/ -56, 9, -46, 9/)) + wlsm(2, 9:12) = DBLE((/ 9, -56, 9, -46/)) + wlsm(3, 9:12) = DBLE((/ -46, 9, -56, 9/)) + wlsm(4, 9:12) = DBLE((/ 9, -46, 9, -56/)) + ! + wlsm(1,13:16) = DBLE((/ -38, -28, 17, 7/)) + wlsm(2,13:16) = DBLE((/ 7, -38, -28, 17/)) + wlsm(3,13:16) = DBLE((/ 17, 7, -38, -28/)) + wlsm(4,13:16) = DBLE((/ -28, 17, 7, -38/)) + ! + wlsm(1,17:20) = DBLE((/ -18, -18, 12, -18/)) + wlsm(2,17:20) = DBLE((/ -18, -18, -18, 12/)) + wlsm(3,17:20) = DBLE((/ 12, -18, -18, -18/)) + wlsm(4,17:20) = DBLE((/ -18, 12, -18, -18/)) + ! + wlsm(1:4,1:20) = wlsm(1:4,1:20) / 1260d0 + ! + ELSE + ! + ABI_ERROR("[libtetrabz] STOP! ltetrta is invalid.") + ! + END IF + ! + IF (PRESENT(comm)) THEN + CALL libtetrabz_kgrid(linterpol,ivvec,nge,nkBZ,nk_local,nt_local,ik_global,ik_local,kvec,comm) + ELSE + CALL libtetrabz_kgrid(linterpol,ivvec,nge,nkBZ,nk_local,nt_local,ik_global,ik_local,kvec) + END IF + ! +END SUBROUTINE libtetrabz_initialize +! +! Initialize grid +! +SUBROUTINE libtetrabz_kgrid(linterpol,ivvec,ng,nkBZ,nk_local,nt_local,ik_global,ik_local,kvec,comm) + ! + IMPLICIT NONE + ! + LOGICAL,INTENT(INOUT) :: linterpol + INTEGER,INTENT(IN) :: ivvec(3,20,6), ng(3), nkBZ + INTEGER,INTENT(OUT) :: nk_local, nt_local + INTEGER,INTENT(OUT),ALLOCATABLE :: ik_global(:,:), ik_local(:,:) + REAL(8),INTENT(OUT),ALLOCATABLE :: kvec(:,:) + INTEGER,INTENT(IN),OPTIONAL :: comm + ! + INTEGER :: it, i1, i2, i3, ii, ikv(3), nt, ik, nt_front, loc2glob(nkBZ), glob2loc(nkBZ) + ! + IF(PRESENT(comm)) THEN + CALL libtetrabz_divideMPI(comm,6 * nkBZ,nt_front,nt_local) + linterpol = linterpol .OR. (6*nkBZ /= nt_local) + ELSE + nt_front = 0 + nt_local = 6 * nkBZ + END IF + ABI_MALLOC(ik_global, (20, nt_local)) + ABI_MALLOC(ik_local, (20, nt_local)) + ! + ! k-index for energy (Global index) + ! + nt = 0 + DO i3 = 1, ng(3) + DO i2 = 1, ng(2) + DO i1 = 1, ng(1) + ! + DO it = 1, 6 + ! + nt = nt + 1 + IF(nt <= nt_front .OR. nt_front + nt_local < nt) CYCLE + ! + DO ii = 1, 20 + ! + ikv(1:3) = (/i1, i2, i3/) + ivvec(1:3,ii,it) - 1 + ikv(1:3) = MODULO(ikv(1:3), ng(1:3)) + ! + ik_global(ii,nt - nt_front) = 1 + ikv(1) + ng(1) * ikv(2) + ng(1) * ng(2) * ikv(3) + ! + END DO + ! + END DO + ! + END DO + END DO + END DO + ! + ! k-index for weight (Local index) + ! + IF(.NOT. linterpol) THEN + nk_local = nkBZ + ik_local(1:20,1:nt_local) = ik_global(1:20,1:nt_local) + RETURN + END IF + ! + glob2loc(1:nkBZ) = 0 + nk_local = 0 + DO nt = 1, nt_local + DO ii = 1, 20 + ! + IF(glob2loc(ik_global(ii,nt)) /= 0) THEN + ik_local(ii,nt) = glob2loc(ik_global(ii,nt)) + ELSE + ! + nk_local = nk_local + 1 + loc2glob(nk_local) = ik_global(ii,nt) + glob2loc(ik_global(ii,nt)) = nk_local + ik_local(ii,nt) = nk_local + ! + END IF + ! + END DO + END DO + ! + ! k-vector in the fractional coordinate + ! + ABI_MALLOC(kvec, (3,nk_local)) + DO ik = 1, nk_local + ! loc2glob(ik) - 1 = i1 + ng(1) * i2 + ng(1) * ng(2) * i3 + i1 = MOD(loc2glob(ik) - 1, ng(1)) + i2 = MOD((loc2glob(ik) - 1) / ng(1), ng(2)) + i3 = (loc2glob(ik) - 1) / (ng(1) * ng(2)) + kvec(1:3,ik) = DBLE((/i1, i2, i3/)) / DBLE(ng(1:3)) + END DO + ! +END SUBROUTINE libtetrabz_kgrid +! +! Compute cnt and dsp +! +SUBROUTINE libtetrabz_divideMPI(comm,nt,nt_front,nt_local) + ! +#if defined HAVE_MPI2 + USE mpi, ONLY : MPI_COMM_SIZE, MPI_COMM_RANK +#endif + IMPLICIT NONE + ! + INTEGER,INTENT(IN) :: comm, nt + INTEGER,INTENT(OUT) :: nt_front, nt_local + ! + INTEGER :: petot = 1, my_rank = 0 +#if defined(HAVE_MPI) + INTEGER :: ierr + CALL MPI_COMM_SIZE(comm, petot, ierr) + CALL MPI_COMM_RANK(comm, my_rank, ierr) +#endif + ! + IF(my_rank < MOD(nt, petot)) THEN + nt_local = nt / petot + 1 + nt_front = my_rank * nt_local + ELSE + nt_local = nt / petot + nt_front = my_rank * nt_local + MOD(nt, petot) + END IF + ! +END SUBROUTINE libtetrabz_divideMPI +! +! Simple sort +! +pure SUBROUTINE libtetrabz_sort(n,key,indx) + ! + IMPLICIT NONE + ! + integer,INTENT(IN) :: n + REAL(8),INTENT(inout) :: key(n) + INTEGER,INTENT(OUT) :: indx(n) + ! + INTEGER :: i, i0, indx0 + REAL(8) :: key0 + ! + DO i = 1, n + indx(i) = i + END DO + ! + DO i = 1, n - 1 + key0 = MINVAL(key(i+1:n)) + i0 = MINLOC(key(i+1:n),1) + i + IF(key(i) > key0) THEN + key(i0) = key(i) + key(i) = key0 + ! + indx0 = indx(i0) + indx(i0) = indx(i) + indx(i) = indx0 + END IF + END DO + ! +END SUBROUTINE libtetrabz_sort +! +! Linear interpolation +! +pure SUBROUTINE libtetrabz_interpol_indx(nintp,ng,kvec,kintp,wintp) + ! + IMPLICIT NONE + ! + INTEGER,INTENT(in) :: nintp, ng(3) + REAL(8),INTENT(in) :: kvec(3) + INTEGER,INTENT(out) :: kintp(nintp) + REAL(8),INTENT(out) :: wintp(nintp) + ! + INTEGER :: ikv(3,20), dikv(3,3), ii + REAL(8) :: x, y, z, xv(3) + ! + ! Search nearest neighbor grid points. + ! + xv(1:3) = kvec(1:3) * DBLE(ng(1:3)) + ikv(1:3,1) = NINT(xv(1:3)) + dikv(1:3,1:3) = 0 + DO ii = 1, 3 + dikv(ii,ii) = ikv(ii,1) - FLOOR(xv(ii)) + dikv(ii,ii) = 1 - 2 * dikv(ii,ii) + END DO + xv(1:3) = ABS(xv(1:3) - DBLE(ikv(1:3,1))) + x = xv(1) + y = xv(2) + z = xv(3) + ! + ikv(1:3, 2) = ikv(1:3,1) + dikv(1:3,1) + ikv(1:3, 3) = ikv(1:3,1) + dikv(1:3,2) + ikv(1:3, 4) = ikv(1:3,1) + dikv(1:3,3) + ! + IF(nintp == 4) THEN + ! + wintp(1) = 1d0 - x - y - z + wintp(2) = x + wintp(3) = y + wintp(4) = z + ! + ELSE + ! + ikv(1:3, 5) = ikv(1:3,1) + SUM(dikv(1:3,1:3), 2) + ! + ikv(1:3, 6) = ikv(1:3,1) - dikv(1:3,1) + ikv(1:3, 7) = ikv(1:3,1) - dikv(1:3,2) + ikv(1:3, 8) = ikv(1:3,1) - dikv(1:3,3) + ! + ikv(1:3, 9) = ikv(1:3,1) + 2*dikv(1:3,1) + ikv(1:3,10) = ikv(1:3,1) + 2*dikv(1:3,2) + ikv(1:3,11) = ikv(1:3,1) + 2*dikv(1:3,3) + ! + ikv(1:3,12) = ikv(1:3,1) + dikv(1:3,2) + dikv(1:3,3) + ikv(1:3,13) = ikv(1:3,1) + dikv(1:3,3) + dikv(1:3,1) + ikv(1:3,14) = ikv(1:3,1) + dikv(1:3,1) + dikv(1:3,2) + ! + ikv(1:3,15) = ikv(1:3,1) - dikv(1:3,1) + dikv(1:3,3) + ikv(1:3,16) = ikv(1:3,1) - dikv(1:3,2) + dikv(1:3,1) + ikv(1:3,17) = ikv(1:3,1) - dikv(1:3,3) + dikv(1:3,2) + ! + ikv(1:3,18) = ikv(1:3,1) + dikv(1:3,1) - dikv(1:3,3) + ikv(1:3,19) = ikv(1:3,1) + dikv(1:3,2) - dikv(1:3,1) + ikv(1:3,20) = ikv(1:3,1) + dikv(1:3,3) - dikv(1:3,2) + ! + wintp( 1) = ( (x - 2d0)*(x - 1d0)*(1d0 + x) & + & + (y - 2d0)*(y - 1d0)*(1d0 + y) & + & + (z - 2d0)*(z - 1d0)*(1d0 + z) & + & + 2d0*(x*y + y*z + z*x)*(x + y + z - 1d0) & + & - 8d0*x*y*z - 4d0) * 0.5d0 + wintp( 2) = x * ( 2d0 + x*(1d0 - x - y - z) & + & + y*(1d0 - 2d0*y + z) & + & + z*(1d0 - 2d0*z + y)) * 0.5d0 + wintp( 3) = y * ( 2d0 + y*(1d0 - x - y - z) & + & + x*(1d0 - 2d0*x + z) & + & + z*(1d0 - 2d0*z + x)) * 0.5d0 + wintp( 4) = z * ( 2d0 + z*(1d0 - x - y - z) & + & + y*(1d0 - 2d0*y + x) & + & + x*(1d0 - 2d0*x + y)) * 0.5d0 + wintp( 5) = x * y * z + wintp( 6) = x * (1d0 - x) * ( x + 3d0*y + 3d0*z - 2d0) / 6d0 + wintp( 7) = y * (1d0 - y) * (3d0*x + y + 3d0*z - 2d0) / 6d0 + wintp( 8) = z * (1d0 - z) * (3d0*x + 3d0*y + z - 2d0) / 6d0 + wintp( 9) = x * (x - 1d0) * (x + 1d0) / 6d0 + wintp(10) = y * (y - 1d0) * (y + 1d0) / 6d0 + wintp(11) = z * (z - 1d0) * (z + 1d0) / 6d0 + wintp(12) = y * z * (y + z - 2d0 * x) * 0.5d0 + wintp(13) = z * x * (z + x - 2d0 * y) * 0.5d0 + wintp(14) = x * y * (x + y - 2d0 * z) * 0.5d0 + wintp(15) = x * z * (x - 1d0) * 0.5d0 + wintp(16) = x * y * (y - 1d0) * 0.5d0 + wintp(17) = y * z * (z - 1d0) * 0.5d0 + wintp(18) = x * z * (z - 1d0) * 0.5d0 + wintp(19) = x * y * (x - 1d0) * 0.5d0 + wintp(20) = y * z * (y - 1d0) * 0.5d0 + ! + END IF + ! + DO ii = 1, nintp + ikv(1:3,ii) = MODULO(ikv(1:3,ii), ng(1:3)) + kintp(ii) = 1 + ikv(1,ii) + ng(1) * ikv(2,ii) + ng(1) * ng(2) * ikv(3,ii) + END DO + ! +END SUBROUTINE libtetrabz_interpol_indx + +pure function a_from_e(e) result(a) + + IMPLICIT NONE + REAL(8),INTENT(IN) :: e(4) + REAL(8) :: a(4,4) + + INTEGER :: ii + REAL(8) :: ediff(4) + + DO ii = 1, 4 + ediff = e(1:4) - e(ii) + where (abs(ediff) < 1.e-10) + ediff = 1.e-10 + end where + a(1:4,ii) = (0d0 - e(ii)) / ediff + END DO + +end function a_from_e + +! +! Cut small tetrahedron A1 +! +pure SUBROUTINE libtetrabz_tsmall_a1(e,V,tsmall) + ! + IMPLICIT NONE + ! + REAL(8),INTENT(IN) :: e(4) + REAL(8),INTENT(OUT) :: V + REAL(8),INTENT(OUT) :: tsmall(4,4) + ! + !INTEGER :: ii + REAL(8) :: a(4,4) + ! + a = a_from_e(e) + !DO ii = 1, 4 + ! a(1:4,ii) = (0d0 - e(ii)) / (e(1:4) - e(ii)) + !END DO + ! + V = a(2,1) * a(3,1) * a(4,1) + ! + tsmall(1, 1:4) = (/ 1d0, 0d0, 0d0, 0d0/) + tsmall(2, 1:4) = (/a(1,2), a(2,1), 0d0, 0d0/) + tsmall(3, 1:4) = (/a(1,3), 0d0, a(3,1), 0d0/) + tsmall(4, 1:4) = (/a(1,4), 0d0, 0d0, a(4,1)/) + ! +END SUBROUTINE libtetrabz_tsmall_a1 +! +! Cut small tetrahedron B1 +! +pure SUBROUTINE libtetrabz_tsmall_b1(e,V,tsmall) + ! + IMPLICIT NONE + ! + REAL(8),INTENT(IN) :: e(4) + REAL(8),INTENT(OUT) :: V + REAL(8),INTENT(OUT) :: tsmall(4,4) + ! + !INTEGER :: ii + REAL(8) :: a(4,4) + ! + a = a_from_e(e) + !DO ii = 1, 4 + ! a(1:4,ii) = (0d0 - e(ii)) / (e(1:4) - e(ii)) + !END DO + ! + V = a(3,1) * a(4,1) * a(2,4) + ! + tsmall(1, 1:4) = (/ 1d0, 0d0, 0d0, 0d0/) + tsmall(2, 1:4) = (/a(1,3), 0d0, a(3,1), 0d0/) + tsmall(3, 1:4) = (/a(1,4), 0d0, 0d0, a(4,1)/) + tsmall(4, 1:4) = (/ 0d0, a(2,4), 0d0, a(4,2)/) + ! +END SUBROUTINE libtetrabz_tsmall_b1 +! +! Cut small tetrahedron B2 +! +pure SUBROUTINE libtetrabz_tsmall_b2(e,V,tsmall) + ! + IMPLICIT NONE + ! + REAL(8),INTENT(IN) :: e(4) + REAL(8),INTENT(OUT) :: V + REAL(8),INTENT(OUT) :: tsmall(4,4) + ! + !INTEGER :: ii + REAL(8) :: a(4,4) + ! + a = a_from_e(e) + !DO ii = 1, 4 + ! a(1:4,ii) = (0d0 - e(ii)) / (e(1:4) - e(ii)) + !END DO + ! + V = a(3,2) * a(4,2) + ! + tsmall(1, 1:4) = (/1d0, 0d0, 0d0, 0d0/) + tsmall(2, 1:4) = (/0d0, 1d0, 0d0, 0d0/) + tsmall(3, 1:4) = (/0d0, a(2,3), a(3,2), 0d0/) + tsmall(4, 1:4) = (/0d0, a(2,4), 0d0, a(4,2)/) + ! +END SUBROUTINE libtetrabz_tsmall_b2 +! +! Cut small tetrahedron B3 +! +pure SUBROUTINE libtetrabz_tsmall_b3(e,V,tsmall) + ! + IMPLICIT NONE + ! + REAL(8),INTENT(IN) :: e(4) + REAL(8),INTENT(OUT) :: V + REAL(8),INTENT(OUT) :: tsmall(4,4) + ! + !INTEGER :: ii + REAL(8) :: a(4,4) + ! + a = a_from_e(e) + !DO ii = 1, 4 + ! a(1:4,ii) = (0d0 - e(ii)) / (e(1:4) - e(ii)) + !END DO + ! + V = a(2,3) * a(3,1) * a(4,2) + ! + tsmall(1, 1:4) = (/ 1d0, 0d0, 0d0, 0d0/) + tsmall(2, 1:4) = (/a(1,3), 0d0, a(3,1), 0d0/) + tsmall(3, 1:4) = (/ 0d0, a(2,3), a(3,2), 0d0/) + tsmall(4, 1:4) = (/ 0d0, a(2,4), 0d0, a(4,2)/) + ! +END SUBROUTINE libtetrabz_tsmall_b3 +! +! Cut small tetrahedron C1 +! +pure SUBROUTINE libtetrabz_tsmall_c1(e,V,tsmall) + ! + IMPLICIT NONE + ! + REAL(8),INTENT(IN) :: e(4) + REAL(8),INTENT(OUT) :: V + REAL(8),INTENT(OUT) :: tsmall(4,4) + ! + !INTEGER :: ii + REAL(8) :: a(4,4) + ! + a = a_from_e(e) + !DO ii = 1, 4 + ! a(1:4,ii) = (0d0 - e(ii)) / (e(1:4) - e(ii)) + !END DO + ! + V = a(4,3) + ! + tsmall(1, 1:4) = (/1d0, 0d0, 0d0, 0d0/) + tsmall(2, 1:4) = (/0d0, 1d0, 0d0, 0d0/) + tsmall(3, 1:4) = (/0d0, 0d0, 1d0, 0d0/) + tsmall(4, 1:4) = (/0d0, 0d0, a(3,4), a(4,3)/) + ! +END SUBROUTINE libtetrabz_tsmall_c1 +! +! Cut small tetrahedron C2 +! +pure SUBROUTINE libtetrabz_tsmall_c2(e,V,tsmall) + ! + IMPLICIT NONE + ! + REAL(8),INTENT(IN) :: e(4) + REAL(8),INTENT(OUT) :: V + REAL(8),INTENT(OUT) :: tsmall(4,4) + ! + !INTEGER :: ii + REAL(8) :: a(4,4) + ! + a = a_from_e(e) + !DO ii = 1, 4 + ! a(1:4,ii) = (0d0 - e(ii)) / (e(1:4) - e(ii)) + !END DO + ! + V = a(3,4) * a(4,2) + ! + tsmall(1, 1:4) = (/1d0, 0d0, 0d0, 0d0/) + tsmall(2, 1:4) = (/0d0, 1d0, 0d0, 0d0/) + tsmall(3, 1:4) = (/0d0, a(2,4), 0d0, a(4,2)/) + tsmall(4, 1:4) = (/0d0, 0d0, a(3,4), a(4,3)/) + ! +END SUBROUTINE libtetrabz_tsmall_c2 +! +! Cut small tetrahedron C3 +! +pure SUBROUTINE libtetrabz_tsmall_c3(e,V,tsmall) + ! + IMPLICIT NONE + ! + REAL(8),INTENT(IN) :: e(4) + REAL(8),INTENT(OUT) :: V + REAL(8),INTENT(OUT) :: tsmall(4,4) + ! + !INTEGER :: ii + REAL(8) :: a(4,4) + ! + a = a_from_e(e) + !DO ii = 1, 4 + ! a(1:4,ii) = (0d0 - e(ii)) / (e(1:4) - e(ii)) + !END DO + ! + V = a(3,4) * a(2,4) * a(4,1) + ! + tsmall(1, 1:4) = (/ 1d0, 0d0, 0d0, 0d0/) + tsmall(2, 1:4) = (/a(1,4), 0d0, 0d0, a(4,1)/) + tsmall(3, 1:4) = (/ 0d0, a(2,4), 0d0, a(4,2)/) + tsmall(4, 1:4) = (/ 0d0, 0d0, a(3,4), a(4,3)/) + ! +END SUBROUTINE libtetrabz_tsmall_c3 +! +! Cut triangle A1 +! +pure SUBROUTINE libtetrabz_triangle_a1(e,V,tsmall) + ! + IMPLICIT NONE + ! + REAL(8),INTENT(IN) :: e(4) + REAL(8),INTENT(OUT) :: V + REAL(8),INTENT(OUT) :: tsmall(3,4) + ! + !INTEGER :: ii + REAL(8) :: a(4,4) + ! + a = a_from_e(e) + !DO ii = 1, 4 + ! a(1:4,ii) = (0d0 - e(ii)) / (e(1:4) - e(ii)) + !END DO + ! + !V = 3d0 * a(2,1) * a(3,1) * a(4,1) / (0d0 - e(1)) + V = 3d0 * a(2,1) * a(3,1) / (e(4) - e(1)) + ! + tsmall(1,1:4) = (/a(1,2), a(2,1), 0d0, 0d0/) + tsmall(2,1:4) = (/a(1,3), 0d0, a(3,1), 0d0/) + tsmall(3,1:4) = (/a(1,4), 0d0, 0d0, a(4,1)/) + ! +END SUBROUTINE libtetrabz_triangle_a1 +! +! Cut triangle B1 +! +pure SUBROUTINE libtetrabz_triangle_b1(e,V,tsmall) + ! + IMPLICIT NONE + ! + REAL(8),INTENT(IN) :: e(4) + REAL(8),INTENT(OUT) :: V + REAL(8),INTENT(OUT) :: tsmall(3,4) + ! + !INTEGER :: ii + REAL(8) :: a(4,4) + ! + a = a_from_e(e) + !DO ii = 1, 4 + ! a(1:4,ii) = (0d0 - e(ii)) / (e(1:4) - e(ii)) + !END DO + ! + !V = 3d0 * a(3,1) * a(4,1) * a(2,4) / (0d0 - e(1)) + V = 3d0 * a(4,1) * a(2,4) / (e(3) - e(1)) + ! + tsmall(1,1:4) = (/a(1,3), 0d0, a(3,1), 0d0/) + tsmall(2,1:4) = (/a(1,4), 0d0, 0d0, a(4,1)/) + tsmall(3,1:4) = (/ 0d0, a(2,4), 0d0, a(4,2)/) + ! +END SUBROUTINE libtetrabz_triangle_b1 +! +! Cut triangle B2 +! +pure SUBROUTINE libtetrabz_triangle_b2(e,V,tsmall) + ! + IMPLICIT NONE + ! + REAL(8),INTENT(IN) :: e(4) + REAL(8),INTENT(OUT) :: V + REAL(8),INTENT(OUT) :: tsmall(3,4) + ! + !INTEGER :: ii + REAL(8) :: a(4,4) + ! + a = a_from_e(e) + !DO ii = 1, 4 + ! a(1:4,ii) = (0d0 - e(ii)) / (e(1:4) - e(ii)) + !END DO + ! + !V = 3d0 * a(2,3) * a(3,1) * a(4,2) / (0d0 - e(1)) + V = 3d0 * a(2,3) * a(4,2) / (e(3) - e(1)) + ! + tsmall(1,1:4) = (/a(1,3), 0d0, a(3,1), 0d0/) + tsmall(2,1:4) = (/ 0d0, a(2,3), a(3,2), 0d0/) + tsmall(3,1:4) = (/ 0d0, a(2,4), 0d0, a(4,2)/) + ! +END SUBROUTINE libtetrabz_triangle_b2 +! +! Cut triangle C1 +! +pure SUBROUTINE libtetrabz_triangle_c1(e,V,tsmall) + ! + IMPLICIT NONE + ! + REAL(8),INTENT(IN) :: e(4) + REAL(8),INTENT(OUT) :: V + REAL(8),INTENT(OUT) :: tsmall(3,4) + ! + !INTEGER :: ii + REAL(8) :: a(4,4) + ! + a = a_from_e(e) + !DO ii = 1, 4 + ! a(1:4,ii) = (0d0 - e(ii)) / (e(1:4) - e(ii)) + !END DO + ! + !V = 3d0 * a(1,4) * a(2,4) * a(3,4) / (e(4) - 0d0) + V = 3d0 * a(1,4) * a(2,4) / (e(4) - e(3)) + ! + tsmall(1,1:4) = (/a(1,4), 0d0, 0d0, a(4,1)/) + tsmall(2,1:4) = (/ 0d0, a(2,4), 0d0, a(4,2)/) + tsmall(3,1:4) = (/ 0d0, 0d0, a(3,4), a(4,3)/) + ! +END SUBROUTINE libtetrabz_triangle_c1 +! +! MPI_Allreduce for double scaler +! +SUBROUTINE libtetrabz_mpisum_d(comm,scaler) + ! + IMPLICIT NONE + ! + INTEGER :: comm + REAL(8) :: scaler + ! +#if defined(HAVE_MPI) + INTEGER :: ierr + REAL(8) :: arr_scaler(1) + ! + CALL MPI_allREDUCE([scaler], arr_scaler, 1, & + & MPI_DOUBLE_PRECISION, MPI_SUM, comm, ierr) + scaler=arr_scaler(1) +#endif + ! +END SUBROUTINE libtetrabz_mpisum_d +! +! MPI_Allreduce for double vector +! +SUBROUTINE libtetrabz_mpisum_dv(comm,ndim,vector) + ! + IMPLICIT NONE + ! + INTEGER :: comm, ndim + REAL(8) :: vector(ndim) + ! +#if defined(HAVE_MPI) + INTEGER :: ierr +#ifndef HAVE_MPI2_INPLACE + REAL(8) :: vector_out(ndim) +#endif + ! +#ifdef HAVE_MPI2_INPLACE + CALL MPI_allREDUCE(MPI_IN_PLACE, vector, ndim, & + & MPI_DOUBLE_PRECISION, MPI_SUM, comm, ierr) +#else + CALL MPI_allREDUCE(vector, vector_out, ndim, & + & MPI_DOUBLE_PRECISION, MPI_SUM, comm, ierr) + vector(1:ndim)=vector_out(1:ndim) +#endif +#endif + ! +END SUBROUTINE libtetrabz_mpisum_dv +! +! MPI_Allreduce for double complex vector +! +SUBROUTINE libtetrabz_mpisum_zv(comm,ndim,vector) + ! + IMPLICIT NONE + ! + INTEGER :: comm, ndim + COMPLEX(8) :: vector(ndim) + ! +#if defined(HAVE_MPI) + INTEGER :: ierr +#ifndef HAVE_MPI2_INPLACE + COMPLEX(8) :: vector_out(ndim) +#endif + ! +#ifdef HAVE_MPI2_INPLACE + CALL MPI_allREDUCE(MPI_IN_PLACE, vector, ndim, & + & MPI_DOUBLE_COMPLEX, MPI_SUM, comm, ierr) +#else + CALL MPI_allREDUCE(vector, vector_out, ndim, & + & MPI_DOUBLE_COMPLEX, MPI_SUM, comm, ierr) + vector(1:ndim)=vector_out(1:ndim) +#endif +#endif + ! +END SUBROUTINE libtetrabz_mpisum_zv +! +END MODULE libtetrabz_common diff --git a/GX-PAW/common/src/17_libtetra_ext/libtetrabz_common.o b/GX-PAW/common/src/17_libtetra_ext/libtetrabz_common.o new file mode 100644 index 00000000..85cfaa60 Binary files /dev/null and b/GX-PAW/common/src/17_libtetra_ext/libtetrabz_common.o differ diff --git a/GX-PAW/common/src/17_libtetra_ext/libtetrabz_dbldelta_mod.F90 b/GX-PAW/common/src/17_libtetra_ext/libtetrabz_dbldelta_mod.F90 new file mode 100644 index 00000000..c710ae25 --- /dev/null +++ b/GX-PAW/common/src/17_libtetra_ext/libtetrabz_dbldelta_mod.F90 @@ -0,0 +1,269 @@ + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" +! +! Copyright (C) 2014 Mitsuaki Kawamura +! +! Permission is hereby granted, free of charge, to any person obtaining a +! copy of this software and associated documentation files (the +! "Software"), to deal in the Software without restriction, including +! without limitation the rights to use, copy, modify, merge, publish, +! distribute, sublicense, and/or sell copies of the Software, and to +! permit persons to whom the Software is furnished to do so, subject to +! the following conditions: +! +! The above copyright notice and this permission notice shall be included +! in all copies or substantial portions of the Software. +! +! THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +! OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +! MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +! IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +! CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +! TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +! SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +! +MODULE libtetrabz_dbldelta_mod + ! + + use m_abicore + use m_errors + + IMPLICIT NONE + ! + PRIVATE + PUBLIC :: libtetrabz_dbldelta + ! +CONTAINS +! +! Compute doubledelta +! +SUBROUTINE libtetrabz_dbldelta(ltetra,bvec,nb,nge,eig1,eig2,ngw,wght,comm) + ! + use, intrinsic :: iso_c_binding + USE libtetrabz_common, ONLY : libtetrabz_initialize, libtetrabz_interpol_indx, libtetrabz_mpisum_dv + IMPLICIT NONE + ! + INTEGER(C_INT),INTENT(IN) :: ltetra, nb, nge(3), ngw(3) + REAL(C_DOUBLE),INTENT(IN) :: bvec(9), eig1(nb,PRODUCT(nge(1:3))), eig2(nb,PRODUCT(nge(1:3))) + REAL(C_DOUBLE),INTENT(OUT) :: wght(nb*nb,PRODUCT(ngw(1:3))) + INTEGER(C_INT),INTENT(IN),OPTIONAL :: comm + ! + LOGICAL :: linterpol + INTEGER :: nt_local, nk_local, nkBZ, ik, kintp(20), nintp + INTEGER,ALLOCATABLE :: ik_global(:,:), ik_local(:,:) + REAL(8) :: wlsm(4,20), wintp(1,20) + REAL(8),ALLOCATABLE :: wghtd(:,:,:), kvec(:,:) + ! + nintp = 16 * ltetra - 12 + ! + IF(PRESENT(comm)) THEN + CALL libtetrabz_initialize(ltetra,nge,ngw,bvec,linterpol,wlsm,nk_local,& + & nt_local,nkBZ,ik_global,ik_local,kvec,comm) + ELSE + CALL libtetrabz_initialize(ltetra,nge,ngw,bvec,linterpol,wlsm,nk_local,& + & nt_local,nkBZ,ik_global,ik_local,kvec) + END IF + ! + IF(linterpol) THEN + ! + ABI_MALLOC(wghtd, (nb*nb,1,nk_local)) + CALL libtetrabz_dbldelta_main(wlsm,nt_local,ik_global,ik_local,nb,nkBZ,eig1,eig2,nk_local,wghtd) + ! + ! Interpolation + ! + wght(1:nb*nb,1:PRODUCT(ngw(1:3))) = 0d0 + DO ik = 1, nk_local + CALL libtetrabz_interpol_indx(nintp,ngw,kvec(1:3,ik),kintp,wintp) + wght(1:nb*nb,kintp(1:nintp)) = wght(1:nb*nb, kintp(1:nintp)) & + & + MATMUL(wghtd(1:nb*nb,1:1,ik), wintp(1:1,1:nintp)) + END DO ! ik = 1, nk_local + ABI_FREE(wghtd) + ABI_FREE(kvec) + ! + IF(PRESENT(comm)) CALL libtetrabz_mpisum_dv(comm, nb*nb*PRODUCT(ngw(1:3)), wght) + ! + ELSE + CALL libtetrabz_dbldelta_main(wlsm,nt_local,ik_global,ik_local,nb,nkBZ,eig1,eig2,nk_local,wght) + END IF + ! + ABI_FREE(ik_global) + ABI_FREE(ik_local) + ! +END SUBROUTINE libtetrabz_dbldelta +! +! Main SUBROUTINE for Delta(E1) * Delta(E2) +! +SUBROUTINE libtetrabz_dbldelta_main(wlsm,nt_local,ik_global,ik_local,nb,nkBZ,eig1,eig2,nk_local,dbldelta) + ! + USE libtetrabz_common, ONLY : libtetrabz_sort, & + & libtetrabz_triangle_a1, libtetrabz_triangle_b1, & + & libtetrabz_triangle_b2, libtetrabz_triangle_c1 + IMPLICIT NONE + ! + INTEGER,INTENT(IN) :: nt_local, nb, nkBZ, nk_local, & + & ik_global(20,nt_local), ik_local(20,nt_local) + REAL(8),INTENT(IN) :: wlsm(4,20), eig1(nb,nkBZ), eig2(nb,nkBZ) + REAL(8),INTENT(OUT) :: dbldelta(nb,nb,nk_local) + ! + INTEGER :: ib, indx(4), it + REAL(8) :: e(4), ei1(4,nb), ej1(4,nb), ej2(3,nb), V, thr = 1d-10, & + & tsmall(3,4), w1(nb,4), w2(nb,3) + ! + dbldelta(1:nb,1:nb,1:nk_local) = 0d0 + ! + !$OMP PARALLEL DEFAULT(NONE) & + !$OMP & SHARED(dbldelta,eig1,eig2,ik_global,ik_local,nb,nt_local,thr,wlsm) & + !$OMP & PRIVATE(e,ei1,ej1,ej2,ib,indx,it,tsmall,V,w1,w2) + ! + DO it = 1, nt_local + ! + DO ib = 1, nb + ei1(1:4,ib) = MATMUL(wlsm(1:4,1:20), eig1(ib, ik_global(1:20,it))) + ej1(1:4,ib) = MATMUL(wlsm(1:4,1:20), eig2(ib, ik_global(1:20,it))) + END DO + ! + !$OMP DO + DO ib = 1, nb + ! + w1(1:nb,1:4) = 0d0 + e(1:4) = ei1(1:4, ib) + CALL libtetrabz_sort(4,e,indx) + ! + IF(e(1) < 0d0 .AND. 0d0 <= e(2)) THEN + ! + CALL libtetrabz_triangle_a1(e,V,tsmall) + ! + IF(V > thr) THEN + ! + ej2(1:3,1:nb) = MATMUL(tsmall(1:3,1:4), ej1(indx(1:4),1:nb)) + CALL libtetrabz_dbldelta2(nb,ej2,w2) + w1(1:nb,indx(1:4)) = w1(1:nb, indx(1:4)) & + & + V * MATMUL(w2(1:nb,1:3), tsmall(1:3,1:4)) + ! + END IF + ! + ELSE IF( e(2) < 0d0 .AND. 0d0 <= e(3)) THEN + ! + CALL libtetrabz_triangle_b1(e,V,tsmall) + ! + IF(V > thr) THEN + ! + ej2(1:3,1:nb) = MATMUL(tsmall(1:3,1:4), ej1(indx(1:4),1:nb)) + CALL libtetrabz_dbldelta2(nb,ej2,w2) + w1(1:nb,indx(1:4)) = w1(1:nb, indx(1:4)) & + & + V * MATMUL(w2(1:nb,1:3), tsmall(1:3,1:4)) + ! + END IF + ! + CALL libtetrabz_triangle_b2(e,V,tsmall) + ! + IF(V > thr) THEN + ! + ej2(1:3,1:nb) = MATMUL(tsmall(1:3,1:4), ej1(indx(1:4),1:nb)) + CALL libtetrabz_dbldelta2(nb,ej2,w2) + w1(1:nb,indx(1:4)) = w1(1:nb, indx(1:4)) & + & + V * MATMUL(w2(1:nb,1:3), tsmall(1:3,1:4)) + ! + END IF + ! + ELSE IF(e(3) < 0d0 .AND. 0d0 < e(4)) THEN + ! + CALL libtetrabz_triangle_c1(e,V,tsmall) + ! + IF(V > thr) THEN + ! + ej2(1:3,1:nb) = MATMUL(tsmall(1:3,1:4), ej1(indx(1:4),1:nb)) + CALL libtetrabz_dbldelta2(nb,ej2,w2) + w1(1:nb,indx(1:4)) = w1(1:nb, indx(1:4)) & + & + V * MATMUL(w2(1:nb,1:3), tsmall(1:3,1:4)) + ! + END IF + ! + END IF + ! + dbldelta(1:nb,ib,ik_local(1:20,it)) = dbldelta(1:nb,ib, ik_local(1:20,it)) & + & + MATMUL(w1(1:nb,1:4), wlsm(1:4,1:20)) + ! + END DO ! ib + !$OMP END DO NOWAIT + ! + END DO ! it + ! + !$OMP END PARALLEL + ! + dbldelta(1:nb,1:nb,1:nk_local) = dbldelta(1:nb,1:nb,1:nk_local) / DBLE(6 * nkBZ) + ! +END SUBROUTINE libtetrabz_dbldelta_main +! +! 2nd step of tetrahedra method. +! +SUBROUTINE libtetrabz_dbldelta2(nb,ej,w) + ! + USE libtetrabz_common, ONLY : libtetrabz_sort + IMPLICIT NONE + ! + INTEGER,INTENT(IN) :: nb + REAL(8),INTENT(IN) :: ej(3,nb) + REAL(8),INTENT(INOUT) :: w(nb,3) + ! + INTEGER :: ib, ii, indx(3) + REAL(8) :: a(3,3), e(3), V + REAL(8) :: ediff(3) + !character(len=500) :: msg + ! + DO ib = 1, nb + ! + IF(maxval(ABS(ej(1:3,ib))) < 1d-10) then + ! MG reduce tolerance wrt original version. + !IF(maxval(ABS(ej(1:3,ib))) < 1d-22) then + !write(std_out, ej(1:3,ib)) + !write(msg, *)"Nesting for band index:", ib, "ej:", ej(1:3,ib) + !ABI_WARNING(msg) + !ABI_ERROR(msg) + !ABI_ERROR("STOP Nesting !!") + w(ib,1:3) = 0d0 + cycle + end if + ! + w(ib,1:3) = 0d0 + e(1:3) = ej(1:3, ib) + CALL libtetrabz_sort(3,e,indx) + ! + DO ii = 1, 3 + ediff = e(1:3) - e(ii) + where (abs(ediff) < 1.e-10) + ediff = 1.e-10 + end where + a(1:3,ii) = (0d0 - e(ii)) / ediff + !a(1:3,ii) = (0d0 - e(ii)) / (e(1:3) - e(ii)) + END DO + ! + IF((e(1) < 0d0 .AND. 0d0 <= e(2)) .OR. (e(1) <= 0d0 .AND. 0d0 < e(2))) THEN + ! + !V = a(2,1) * a(3,1) / (0d0 - e(1)) + V = a(2,1) / (e(3) - e(1)) + ! + w(ib,indx(1)) = V * (a(1,2) + a(1,3)) + w(ib,indx(2)) = V * a(2,1) + w(ib,indx(3)) = V * a(3,1) + ! + ELSE IF((e(2) <= 0d0 .AND. 0d0 < e(3)) .OR. (e(2) < 0d0 .AND. 0d0 <= e(3))) THEN + ! + !V = a(1,3) * a(2,3) / (e(3) - 0d0) + V = a(2,3) / (e(3) - e(1)) + ! + w(ib,indx(1)) = V * a(1,3) + w(ib,indx(2)) = V * a(2,3) + w(ib,indx(3)) = V * (a(3,1) + a(3,2)) + ! + END IF + ! + END DO ! ib + ! +END SUBROUTINE libtetrabz_dbldelta2 +! +END MODULE libtetrabz_dbldelta_mod diff --git a/GX-PAW/common/src/17_libtetra_ext/libtetrabz_dbldelta_mod.o b/GX-PAW/common/src/17_libtetra_ext/libtetrabz_dbldelta_mod.o new file mode 100644 index 00000000..eb85bfd4 Binary files /dev/null and b/GX-PAW/common/src/17_libtetra_ext/libtetrabz_dbldelta_mod.o differ diff --git a/GX-PAW/common/src/17_libtetra_ext/libtetrabz_dblstep_mod.F90 b/GX-PAW/common/src/17_libtetra_ext/libtetrabz_dblstep_mod.F90 new file mode 100644 index 00000000..ae8a1804 --- /dev/null +++ b/GX-PAW/common/src/17_libtetra_ext/libtetrabz_dblstep_mod.F90 @@ -0,0 +1,319 @@ + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" +! +! Copyright (C) 2014 Mitsuaki Kawamura +! +! Permission is hereby granted, free of charge, to any person obtaining a +! copy of this software and associated documentation files (the +! "Software"), to deal in the Software without restriction, including +! without limitation the rights to use, copy, modify, merge, publish, +! distribute, sublicense, and/or sell copies of the Software, and to +! permit persons to whom the Software is furnished to do so, subject to +! the following conditions: +! +! The above copyright notice and this permission notice shall be included +! in all copies or substantial portions of the Software. +! +! THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +! OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +! MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +! IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +! CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +! TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +! SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +! +MODULE libtetrabz_dblstep_mod + ! + IMPLICIT NONE + ! + PRIVATE + PUBLIC :: libtetrabz_dblstep + ! +CONTAINS +! +! Compute Occ * Step +! +SUBROUTINE libtetrabz_dblstep(ltetra,bvec,nb,nge,eig1,eig2,ngw,wght,comm) + ! + use, intrinsic :: iso_c_binding + USE libtetrabz_common, ONLY : libtetrabz_initialize, libtetrabz_interpol_indx, libtetrabz_mpisum_dv + IMPLICIT NONE + ! + INTEGER(C_INT),INTENT(IN) :: ltetra, nb, nge(3), ngw(3) + REAL(C_DOUBLE),INTENT(IN) :: bvec(9), eig1(nb,PRODUCT(nge(1:3))), eig2(nb,PRODUCT(nge(1:3))) + REAL(C_DOUBLE),INTENT(OUT) :: wght(nb*nb,PRODUCT(ngw(1:3))) + INTEGER(C_INT),INTENT(IN),OPTIONAL :: comm + ! + LOGICAL :: linterpol + INTEGER :: nt_local, nk_local, nkBZ, ik, kintp(20), nintp + INTEGER,ALLOCATABLE :: ik_global(:,:), ik_local(:,:) + REAL(8) :: wlsm(4,20), wintp(1,20) + REAL(8),ALLOCATABLE :: wghtd(:,:,:), kvec(:,:) + ! + nintp = 16 * ltetra - 12 + ! + IF(PRESENT(comm)) THEN + CALL libtetrabz_initialize(ltetra,nge,ngw,bvec,linterpol,wlsm,nk_local,& + & nt_local,nkBZ,ik_global,ik_local,kvec,comm) + ELSE + CALL libtetrabz_initialize(ltetra,nge,ngw,bvec,linterpol,wlsm,nk_local,& + & nt_local,nkBZ,ik_global,ik_local,kvec) + END IF + ! + IF(linterpol) THEN + ! + ABI_MALLOC(wghtd, (nb*nb,1,nk_local)) + CALL libtetrabz_dblstep_main(wlsm,nt_local,ik_global,ik_local,nb,nkBZ,eig1,eig2,nk_local,wghtd) + ! + ! Interpolation + ! + wght(1:nb*nb,1:PRODUCT(ngw(1:3))) = 0d0 + DO ik = 1, nk_local + CALL libtetrabz_interpol_indx(nintp,ngw,kvec(1:3,ik),kintp,wintp) + wght(1:nb*nb,kintp(1:nintp)) = wght(1:nb*nb, kintp(1:nintp)) & + & + MATMUL(wghtd(1:nb*nb,1:1,ik), wintp(1:1,1:nintp)) + END DO ! ik = 1, nk_local + ABI_FREE(wghtd) + ABI_FREE(kvec) + ! + IF(PRESENT(comm)) CALL libtetrabz_mpisum_dv(comm, nb*nb*PRODUCT(ngw(1:3)), wght) + ! + ELSE + CALL libtetrabz_dblstep_main(wlsm,nt_local,ik_global,ik_local,nb,nkBZ,eig1,eig2,nk_local,wght) + END IF + ! + ABI_FREE(ik_global) + ABI_FREE(ik_local) + ! +END SUBROUTINE libtetrabz_dblstep +! +! Main SUBROUTINE for Theta(- E1) * Theta(E1 - E2) +! +SUBROUTINE libtetrabz_dblstep_main(wlsm,nt_local,ik_global,ik_local,nb,nkBZ,eig1,eig2,nk_local,dblstep) + ! + USE libtetrabz_common, ONLY : libtetrabz_sort, & + & libtetrabz_tsmall_a1, libtetrabz_tsmall_b1, & + & libtetrabz_tsmall_b2, libtetrabz_tsmall_b3, & + & libtetrabz_tsmall_c1, libtetrabz_tsmall_c2, & + & libtetrabz_tsmall_c3 + IMPLICIT NONE + ! + INTEGER,INTENT(IN) :: nt_local, nb, nkBZ, nk_local, & + & ik_global(20,nt_local), ik_local(20,nt_local) + REAL(8),INTENT(IN) :: wlsm(4,20), eig1(nb,nkBZ), eig2(nb,nkBZ) + REAL(8),INTENT(OUT) :: dblstep(nb,nb,nk_local) + ! + INTEGER :: ib, indx(4), it + REAL(8) :: e(4), ei1(4,nb), ei2(4), ej1(4,nb), ej2(4,nb), thr = 1d-10, & + & tsmall(4,4), V, w1(nb,4), w2(nb,4) + ! + dblstep(1:nb,1:nb,1:nk_local) = 0d0 + ! + !$OMP PARALLEL DEFAULT(NONE) & + !$OMP & SHARED(dblstep,eig1,eig2,ik_global,ik_local,nb,nt_local,thr,wlsm) & + !$OMP & PRIVATE(e,ei1,ei2,ej1,ej2,ib,indx,it,tsmall,V,w1,w2) + ! + DO it = 1, nt_local + ! + DO ib = 1, nb + ei1(1:4, ib) = MATMUL(wlsm(1:4,1:20), eig1(ib, ik_global(1:20,it))) + ej1(1:4, ib) = MATMUL(wlsm(1:4,1:20), eig2(ib, ik_global(1:20,it))) + END DO + ! + !$OMP DO + DO ib = 1, nb + ! + w1(1:nb,1:4) = 0d0 + e(1:4) = ei1(1:4, ib) + CALL libtetrabz_sort(4,e,indx) + ! + IF(e(1) <= 0d0 .AND. 0d0 < e(2) ) THEN + ! + CALL libtetrabz_tsmall_a1(e,V,tsmall) + ! + IF(V > thr) THEN + ! + ei2(1:4 ) = MATMUL(tsmall(1:4,1:4), ei1(indx(1:4), ib)) + ej2(1:4,1:nb) = MATMUL(tsmall(1:4,1:4), ej1(indx(1:4),1:nb)) + CALL libtetrabz_dblstep2(nb,ei2,ej2,w2) + w1(1:nb,indx(1:4)) = w1(1:nb, indx(1:4)) & + & + V * MATMUL(w2(1:nb, 1:4 ), tsmall(1:4,1:4)) + ! + END IF + ! + ELSE IF(e(2) <= 0d0 .AND. 0d0 < e(3)) THEN + ! + CALL libtetrabz_tsmall_b1(e,V,tsmall) + ! + IF(V > thr) THEN + ! + ei2(1:4 ) = MATMUL(tsmall(1:4,1:4), ei1(indx(1:4), ib)) + ej2(1:4,1:nb) = MATMUL(tsmall(1:4,1:4), ej1(indx(1:4),1:nb)) + CALL libtetrabz_dblstep2(nb,ei2,ej2,w2) + w1(1:nb,indx(1:4)) = w1(1:nb, indx(1:4)) & + & + V * MATMUL(w2(1:nb,1:4), tsmall(1:4,1:4)) + ! + END IF + ! + CALL libtetrabz_tsmall_b2(e,V,tsmall) + ! + IF(V > thr) THEN + ! + ei2(1:4 ) = MATMUL(tsmall(1:4,1:4), ei1(indx(1:4), ib)) + ej2(1:4,1:nb) = MATMUL(tsmall(1:4,1:4), ej1(indx(1:4),1:nb)) + CALL libtetrabz_dblstep2(nb,ei2,ej2,w2) + w1(1:nb,indx(1:4)) = w1(1:nb, indx(1:4)) & + & + V * MATMUL(w2(1:nb,1:4), tsmall(1:4,1:4)) + ! + END IF + ! + CALL libtetrabz_tsmall_b3(e,V,tsmall) + ! + IF(V > thr) THEN + ! + ei2(1:4 ) = MATMUL(tsmall(1:4,1:4), ei1(indx(1:4), ib)) + ej2(1:4,1:nb) = MATMUL(tsmall(1:4,1:4), ej1(indx(1:4),1:nb)) + CALL libtetrabz_dblstep2(nb,ei2,ej2,w2) + w1(1:nb,indx(1:4)) = w1(1:nb, indx(1:4)) & + & + V * MATMUL(w2(1:nb,1:4), tsmall(1:4,1:4)) + ! + END IF + ! + ELSE IF( e(3) <= 0d0 .AND. 0d0 < e(4)) THEN + ! + CALL libtetrabz_tsmall_c1(e,V,tsmall) + ! + IF(V > thr) THEN + ! + ei2(1:4 ) = MATMUL(tsmall(1:4,1:4), ei1(indx(1:4), ib)) + ej2(1:4,1:nb) = MATMUL(tsmall(1:4,1:4), ej1(indx(1:4),1:nb)) + CALL libtetrabz_dblstep2(nb,ei2,ej2,w2) + w1(1:nb,indx(1:4)) = w1(1:nb, indx(1:4)) & + & + V * MATMUL(w2(1:nb,1:4), tsmall(1:4,1:4)) + ! + END IF + ! + CALL libtetrabz_tsmall_c2(e,V,tsmall) + ! + IF(V > thr) THEN + ! + ei2(1:4 ) = MATMUL(tsmall(1:4,1:4), ei1(indx(1:4), ib)) + ej2(1:4,1:nb) = MATMUL(tsmall(1:4,1:4), ej1(indx(1:4),1:nb)) + CALL libtetrabz_dblstep2(nb,ei2,ej2,w2) + w1(1:nb,indx(1:4)) = w1(1:nb, indx(1:4)) & + & + V * MATMUL(w2(1:nb,1:4), tsmall(1:4,1:4)) + ! + END IF + ! + CALL libtetrabz_tsmall_c3(e,V,tsmall) + ! + IF(V > thr) THEN + ! + ei2(1:4 ) = MATMUL(tsmall(1:4,1:4), ei1(indx(1:4), ib)) + ej2(1:4,1:nb) = MATMUL(tsmall(1:4,1:4), ej1(indx(1:4),1:nb)) + CALL libtetrabz_dblstep2(nb,ei2,ej2,w2) + w1(1:nb,indx(1:4)) = w1(1:nb, indx(1:4)) & + & + V * MATMUL(w2(1:nb,1:4), tsmall(1:4,1:4)) + ! + END IF + ! + ELSE IF(e(4) <= 0d0) THEN + ! + ei2(1:4 ) = ei1(1:4, ib) + ej2(1:4,1:nb) = ej1(1:4,1:nb) + CALL libtetrabz_dblstep2(nb,ei2,ej2,w2) + w1(1:nb,1:4) = w1(1:nb,1:4) + w2(1:nb,1:4) + ! + ELSE + ! + CYCLE + ! + END IF + ! + dblstep(1:nb,ib,ik_local(1:20,it)) = dblstep(1:nb,ib, ik_local(1:20,it)) & + & + MATMUL(w1(1:nb, 1:4), wlsm(1:4,1:20)) + ! + END DO ! ib + !$OMP END DO NOWAIT + ! + END DO ! it + ! + !$OMP END PARALLEL + ! + dblstep(1:nb,1:nb,1:nk_local) = dblstep(1:nb,1:nb,1:nk_local) / DBLE(6 * nkBZ) + ! +END SUBROUTINE libtetrabz_dblstep_main +! +! Tetrahedra method for theta( - de) +! +SUBROUTINE libtetrabz_dblstep2(nb,ei1,ej1,w1) + ! + USE libtetrabz_common, ONLY : libtetrabz_sort, & + & libtetrabz_tsmall_a1, libtetrabz_tsmall_b1, & + & libtetrabz_tsmall_b2, libtetrabz_tsmall_b3, & + & libtetrabz_tsmall_c1, libtetrabz_tsmall_c2, & + & libtetrabz_tsmall_c3 + IMPLICIT NONE + ! + INTEGER,INTENT(IN) :: nb + REAL(8),INTENT(IN) :: ei1(4), ej1(4,nb) + REAL(8),INTENT(OUT) :: w1(nb,4) + ! + INTEGER :: ib, indx(4) + REAL(8) :: e(4), thr = 1d-8, tsmall(4,4), V + ! + DO ib = 1, nb + ! + w1(ib,1:4) = 0d0 + e(1:4) = - ei1(1:4) + ej1(1:4,ib) + CALL libtetrabz_sort(4,e,indx) + ! + IF(ABS(e(1)) < thr .AND. ABS(e(4)) < thr) THEN + ! + ! Theta(0) = 0.5 + ! + V = 0.5d0 + w1(ib,1:4) = w1(ib,1:4) + V * 0.25d0 + ! + ELSE IF((e(1) <= 0d0 .AND. 0d0 < e(2)) .OR. (e(1) < 0d0 .AND. 0d0 <= e(2))) THEN + ! + CALL libtetrabz_tsmall_a1(e,V,tsmall) + w1(ib,indx(1:4)) = w1(ib,indx(1:4)) + V * SUM(tsmall(1:4,1:4), 1) * 0.25d0 + ! + ELSE IF((e(2) <= 0d0 .AND. 0d0 < e(3)) .OR. (e(2) < 0d0 .AND. 0d0 <= e(3))) THEN + ! + CALL libtetrabz_tsmall_b1(e,V,tsmall) + w1(ib,indx(1:4)) = w1(ib,indx(1:4)) + V * SUM(tsmall(1:4,1:4), 1) * 0.25d0 + ! + CALL libtetrabz_tsmall_b2(e,V,tsmall) + w1(ib,indx(1:4)) = w1(ib,indx(1:4)) + V * SUM(tsmall(1:4,1:4), 1) * 0.25d0 + ! + CALL libtetrabz_tsmall_b3(e,V,tsmall) + w1(ib,indx(1:4)) = w1(ib,indx(1:4)) + V * SUM(tsmall(1:4,1:4), 1) * 0.25d0 + ! + ELSE IF((e(3) <= 0d0 .AND. 0d0 < e(4)) .OR. (e(3) < 0d0 .AND. 0d0 <= e(4))) THEN + ! + CALL libtetrabz_tsmall_c1(e,V,tsmall) + w1(ib,indx(1:4)) = w1(ib,indx(1:4)) + V * SUM(tsmall(1:4,1:4), 1) * 0.25d0 + ! + CALL libtetrabz_tsmall_c2(e,V,tsmall) + w1(ib,indx(1:4)) = w1(ib,indx(1:4)) + V * SUM(tsmall(1:4,1:4), 1) * 0.25d0 + ! + CALL libtetrabz_tsmall_c3(e,V,tsmall) + w1(ib,indx(1:4)) = w1(ib,indx(1:4)) + V * SUM(tsmall(1:4,1:4), 1) * 0.25d0 + ! + ELSE IF(e(4) <= 0d0) THEN + ! + w1(ib,1:4) = w1(ib,1:4) + 0.25d0 + ! + END IF + ! + END DO ! ib = 1, nb + ! +END SUBROUTINE libtetrabz_dblstep2 +! +END MODULE libtetrabz_dblstep_mod diff --git a/GX-PAW/common/src/17_libtetra_ext/libtetrabz_dblstep_mod.o b/GX-PAW/common/src/17_libtetra_ext/libtetrabz_dblstep_mod.o new file mode 100644 index 00000000..459495b2 Binary files /dev/null and b/GX-PAW/common/src/17_libtetra_ext/libtetrabz_dblstep_mod.o differ diff --git a/GX-PAW/common/src/17_libtetra_ext/libtetrabz_dos_mod.F90 b/GX-PAW/common/src/17_libtetra_ext/libtetrabz_dos_mod.F90 new file mode 100644 index 00000000..548c3cf2 --- /dev/null +++ b/GX-PAW/common/src/17_libtetra_ext/libtetrabz_dos_mod.F90 @@ -0,0 +1,332 @@ + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" +! +! Copyright (C) 2014 Mitsuaki Kawamura +! +! Permission is hereby granted, free of charge, to any person obtaining a +! copy of this software and associated documentation files (the +! "Software"), to deal in the Software without restriction, including +! without limitation the rights to use, copy, modify, merge, publish, +! distribute, sublicense, and/or sell copies of the Software, and to +! permit persons to whom the Software is furnished to do so, subject to +! the following conditions: +! +! The above copyright notice and this permission notice shall be included +! in all copies or substantial portions of the Software. +! +! THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +! OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +! MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +! IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +! CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +! TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +! SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +! +MODULE libtetrabz_dos_mod + ! + IMPLICIT NONE + ! + PRIVATE + PUBLIC :: libtetrabz_dos, libtetrabz_intdos + ! +CONTAINS +! +! Compute DOS +! +SUBROUTINE libtetrabz_dos(ltetra,bvec,nb,nge,eig,ngw,wght,ne,e0,comm) + ! + use, intrinsic :: iso_c_binding + USE libtetrabz_common, ONLY : libtetrabz_initialize, libtetrabz_interpol_indx, libtetrabz_mpisum_dv + IMPLICIT NONE + ! + INTEGER(C_INT),INTENT(IN) :: ltetra, nb, nge(3), ngw(3), ne + REAL(C_DOUBLE),INTENT(IN) :: bvec(9), eig(nb,PRODUCT(nge(1:3))), e0(ne) + REAL(C_DOUBLE),INTENT(OUT) :: wght(ne*nb,PRODUCT(ngw(1:3))) + INTEGER(C_INT),INTENT(IN),OPTIONAL :: comm + ! + LOGICAL :: linterpol + INTEGER :: nt_local, nk_local, nkBZ, ik, kintp(20), nintp + INTEGER,ALLOCATABLE :: ik_global(:,:), ik_local(:,:) + REAL(8) :: wlsm(4,20), wintp(1,20) + REAL(8),ALLOCATABLE :: wghtd(:,:,:), kvec(:,:) + ! + nintp = 16 * ltetra - 12 + ! + IF(PRESENT(comm)) THEN + CALL libtetrabz_initialize(ltetra,nge,ngw,bvec,linterpol,wlsm,nk_local,& + & nt_local,nkBZ,ik_global,ik_local,kvec,comm) + ELSE + CALL libtetrabz_initialize(ltetra,nge,ngw,bvec,linterpol,wlsm,nk_local,& + & nt_local,nkBZ,ik_global,ik_local,kvec) + END IF + ! + IF(linterpol) THEN + ! + ABI_MALLOC(wghtd, (ne*nb,1,nk_local)) + CALL libtetrabz_dos_main(wlsm,nt_local,ik_global,ik_local,nb,nkBZ,eig,ne,e0,nk_local,wghtd) + ! + ! Interpolation + ! + wght(1:ne*nb,1:PRODUCT(ngw(1:3))) = 0d0 + DO ik = 1, nk_local + CALL libtetrabz_interpol_indx(nintp,ngw,kvec(1:3,ik),kintp,wintp) + wght(1:ne*nb,kintp(1:nintp)) = wght(1:ne*nb, kintp(1:nintp)) & + & + MATMUL(wghtd(1:ne*nb,1:1,ik), wintp(1:1,1:nintp)) + END DO ! ik = 1, nk_local + ABI_FREE(wghtd) + ABI_FREE(kvec) + ! + IF(PRESENT(comm)) CALL libtetrabz_mpisum_dv(comm, ne*nb*PRODUCT(ngw(1:3)), wght) + ! + ELSE + CALL libtetrabz_dos_main(wlsm,nt_local,ik_global,ik_local,nb,nkBZ,eig,ne,e0,nk_local,wght) + END IF + ! + ABI_FREE(ik_global) + ABI_FREE(ik_local) + ! +END SUBROUTINE libtetrabz_dos +! +! Compute Integrated DOS +! +SUBROUTINE libtetrabz_intdos(ltetra,bvec,nb,nge,eig,ngw,wght,ne,e0,comm) + ! + use, intrinsic :: iso_c_binding + USE libtetrabz_common, ONLY : libtetrabz_initialize, libtetrabz_interpol_indx, libtetrabz_mpisum_dv + IMPLICIT NONE + ! + INTEGER(C_INT),INTENT(IN) :: ltetra, nb, nge(3), ngw(3), ne + REAL(C_DOUBLE),INTENT(IN) :: bvec(9), eig(nb,PRODUCT(nge(1:3))), e0(ne) + REAL(C_DOUBLE),INTENT(OUT) :: wght(ne*nb,PRODUCT(ngw(1:3))) + INTEGER(C_INT),INTENT(IN),OPTIONAL :: comm + ! + LOGICAL :: linterpol + INTEGER :: nt_local, nk_local, nkBZ, ik, kintp(20), nintp + INTEGER,ALLOCATABLE :: ik_global(:,:), ik_local(:,:) + REAL(8) :: wlsm(4,20), wintp(1,20) + REAL(8),ALLOCATABLE :: wghtd(:,:,:), kvec(:,:) + ! + nintp = 16 * ltetra - 12 + ! + IF(PRESENT(comm)) THEN + CALL libtetrabz_initialize(ltetra,nge,ngw,bvec,linterpol,wlsm,nk_local,& + & nt_local,nkBZ,ik_global,ik_local,kvec,comm) + ELSE + CALL libtetrabz_initialize(ltetra,nge,ngw,bvec,linterpol,wlsm,nk_local,& + & nt_local,nkBZ,ik_global,ik_local,kvec) + END IF + ! + IF(linterpol) THEN + ! + ABI_MALLOC(wghtd, (ne*nb,1,nk_local)) + CALL libtetrabz_intdos_main(wlsm,nt_local,ik_global,ik_local,nb,nkBZ,eig,ne,e0,nk_local,wghtd) + ! + ! Interpolation + ! + wght(1:ne*nb,1:PRODUCT(ngw(1:3))) = 0d0 + DO ik = 1, nk_local + CALL libtetrabz_interpol_indx(nintp,ngw,kvec(1:3,ik),kintp,wintp) + wght(1:ne*nb,kintp(1:nintp)) = wght(1:ne*nb, kintp(1:nintp)) & + & + MATMUL(wghtd(1:ne*nb,1:1,ik), wintp(1:1,1:nintp)) + END DO ! ik = 1, nk_local + ABI_FREE(wghtd) + ABI_FREE(kvec) + ! + IF(PRESENT(comm)) CALL libtetrabz_mpisum_dv(comm, ne*nb*PRODUCT(ngw(1:3)), wght) + ! + ELSE + CALL libtetrabz_intdos_main(wlsm,nt_local,ik_global,ik_local,nb,nkBZ,eig,ne,e0,nk_local,wght) + END IF + ! + ABI_FREE(ik_global) + ABI_FREE(ik_local) + ! +END SUBROUTINE libtetrabz_intdos +! +! Main SUBROUTINE for Dos : Delta(E - E1) +! +SUBROUTINE libtetrabz_dos_main(wlsm,nt_local,ik_global,ik_local,nb,nkBZ,eig,ne,e0,nk_local,dos) + ! + USE libtetrabz_common, ONLY : libtetrabz_sort, & + & libtetrabz_triangle_a1, libtetrabz_triangle_b1, & + & libtetrabz_triangle_b2, libtetrabz_triangle_c1 + IMPLICIT NONE + ! + INTEGER,INTENT(IN) :: nt_local, nb, nkBZ, nk_local, ne, & + & ik_global(20,nt_local), ik_local(20,nt_local) + REAL(8),INTENT(IN) :: wlsm(4,20), eig(nb,nkBZ), e0(ne) + REAL(8),INTENT(OUT) :: dos(ne,nb,nk_local) + ! + INTEGER :: ib, it, ie, indx(4) !, ii + REAL(8) :: e(4), ei1(4,nb), tsmall(3,4), V, w1(ne,4) !, wmul(ne,20) + ! + dos(1:ne, 1:nb, 1:nk_local) = 0d0 + ! + !$OMP PARALLEL DEFAULT(NONE) & + !$OMP & SHARED(dos,eig,e0,ik_global,ik_local,nb,ne,nt_local,wlsm) & + !$OMP & PRIVATE(e,ei1,ib,ie,indx,it,tsmall,V,w1) + ! + DO it = 1, nt_local + ! + DO ib = 1, nb + ei1(1:4,ib) = MATMUL(wlsm(1:4,1:20), eig(ib,ik_global(1:20,it))) + END DO + ! + !$OMP DO + DO ib = 1, nb + ! + w1(1:ne,1:4) = 0d0 + e(1:4) = ei1(1:4, ib) + CALL libtetrabz_sort(4,e,indx) + ! + DO ie = 1, ne + ! + IF((e(1) < e0(ie) .AND. e0(ie) <= e(2)) .OR. & + & (e(1) <= e0(ie) .AND. e0(ie) < e(2))) THEN + ! + CALL libtetrabz_triangle_a1(e(1:4) - e0(ie),V,tsmall) + w1(ie,indx(1:4)) = w1(ie,indx(1:4)) + V * SUM(tsmall(1:3,1:4), 1) / 3d0 + ! + ELSE IF((e(2) < e0(ie) .AND. e0(ie) <= e(3)) .OR. & + & (e(2) <= e0(ie) .AND. e0(ie) < e(3))) THEN + ! + CALL libtetrabz_triangle_b1(e(1:4) - e0(ie),V,tsmall) + w1(ie,indx(1:4)) = w1(ie,indx(1:4)) + V * SUM(tsmall(1:3,1:4), 1) / 3d0 + ! + CALL libtetrabz_triangle_b2(e(1:4) - e0(ie),V,tsmall) + w1(ie,indx(1:4)) = w1(ie,indx(1:4)) + V * SUM(tsmall(1:3,1:4), 1) / 3d0 + ! + ELSE IF((e(3) < e0(ie) .AND. e0(ie) <= e(4)) .OR. & + & (e(3) <= e0(ie) .AND. e0(ie) < e(4))) THEN + ! + CALL libtetrabz_triangle_c1(e(1:4) - e0(ie),V,tsmall) + w1(ie,indx(1:4)) = w1(ie,indx(1:4)) + V * SUM(tsmall(1:3,1:4), 1) / 3d0 + ! + END IF + ! + END DO ! ie + ! + + !call DGEMM("N", "N", ne, 20, 4, 1d0, w1, ne, wlsm, 4, 0d0, wmul, ne) + !wmul(:, 1:4) = MATMUL(w1, wlsm(:, 1:4)) + !do ii=1,4 + ! ie = ik_local(ii,it) + ! dos(:,ib, ie) = dos(:,ib, ie) + wmul(:, ii) + !end do + + ! This call is expensive and 1:20 can be reduced to 1:4 if Blochl + dos(1:ne,ib,ik_local(1:20,it)) = dos(1:ne,ib, ik_local(1:20,it)) & + & + MATMUL(w1(1:ne, 1:4), wlsm(1:4,1:20)) + ! + END DO ! ib + !$OMP END DO NOWAIT + ! + END DO ! it + ! + !$OMP END PARALLEL + ! + dos(1:ne,1:nb,1:nk_local) = dos(1:ne,1:nb,1:nk_local) / DBLE(6 * nkBZ) + ! +END SUBROUTINE libtetrabz_dos_main +! +! Main SUBROUTINE for integrated Dos : theta(E - E1) +! +SUBROUTINE libtetrabz_intdos_main(wlsm,nt_local,ik_global,ik_local,nb,nkBZ,eig,ne,e0,nk_local,intdos) + ! + USE libtetrabz_common, ONLY : libtetrabz_sort, & + & libtetrabz_tsmall_a1, libtetrabz_tsmall_b1, & + & libtetrabz_tsmall_b2, libtetrabz_tsmall_b3, & + & libtetrabz_tsmall_c1, libtetrabz_tsmall_c2, & + & libtetrabz_tsmall_c3 + IMPLICIT NONE + ! + INTEGER,INTENT(IN) :: nt_local, nb, nkBZ, nk_local, ne, & + & ik_global(20,nt_local), ik_local(20,nt_local) + REAL(8),INTENT(IN) :: wlsm(4,20), eig(nb,nkBZ), e0(ne) + REAL(8),INTENT(OUT) :: intdos(ne,nb,nk_local) + ! + INTEGER :: ib, it, ie, indx(4) + REAL(8) :: e(4), ei1(4,nb), tsmall(4,4), V, w1(ne,4) + ! + intdos(1:ne, 1:nb, 1:nk_local) = 0d0 + ! + !$OMP PARALLEL DEFAULT(NONE) & + !$OMP & SHARED(eig,e0,ik_global,ik_local,intdos,nb,ne,nt_local,wlsm) & + !$OMP & PRIVATE(e,ei1,ib,ie,indx,it,tsmall,V,w1) + ! + DO it = 1, nt_local + ! + DO ib = 1, nb + ei1(1:4,ib) = MATMUL(wlsm(1:4,1:20), eig(ib,ik_global(1:20,it))) + END DO + ! + !$OMP DO + DO ib = 1, nb + ! + w1(1:ne,1:4) = 0d0 + e(1:4) = ei1(1:4, ib) + CALL libtetrabz_sort(4,e,indx) + ! + DO ie = 1, ne + ! + IF((e(1) <= e0(ie) .AND. e0(ie) < e(2)) .OR. & + & (e(1) < e0(ie) .AND. e0(ie) <= e(2))) THEN + ! + CALL libtetrabz_tsmall_a1(e - e0(ie),V,tsmall) + w1(ie,indx(1:4)) = w1(ie,indx(1:4)) + V * SUM(tsmall(1:4,1:4), 1) * 0.25d0 + ! + ELSE IF((e(2) <= e0(ie) .AND. e0(ie) < e(3)) .OR. & + & (e(2) < e0(ie) .AND. e0(ie) <= e(3))) THEN + ! + CALL libtetrabz_tsmall_b1(e - e0(ie),V,tsmall) + w1(ie,indx(1:4)) = w1(ie,indx(1:4)) + V * SUM(tsmall(1:4,1:4), 1) * 0.25d0 + ! + CALL libtetrabz_tsmall_b2(e - e0(ie),V,tsmall) + w1(ie,indx(1:4)) = w1(ie,indx(1:4)) + V * SUM(tsmall(1:4,1:4), 1) * 0.25d0 + ! + CALL libtetrabz_tsmall_b3(e - e0(ie),V,tsmall) + w1(ie,indx(1:4)) = w1(ie,indx(1:4)) + V * SUM(tsmall(1:4,1:4), 1) * 0.25d0 + ! + ELSE IF((e(3) <= e0(ie) .AND. e0(ie) < e(4)) .OR. & + & (e(3) < e0(ie) .AND. e0(ie) <= e(4))) THEN + ! + CALL libtetrabz_tsmall_c1(e - e0(ie),V,tsmall) + w1(ie,indx(1:4)) = w1(ie,indx(1:4)) + V * SUM(tsmall(1:4,1:4), 1) * 0.25d0 + ! + CALL libtetrabz_tsmall_c2(e - e0(ie),V,tsmall) + w1(ie,indx(1:4)) = w1(ie,indx(1:4)) + V * SUM(tsmall(1:4,1:4), 1) * 0.25d0 + ! + CALL libtetrabz_tsmall_c3(e - e0(ie),V,tsmall) + w1(ie,indx(1:4)) = w1(ie,indx(1:4)) + V * SUM(tsmall(1:4,1:4), 1) * 0.25d0 + ! + ELSE IF(e(4) <= e0(ie)) THEN + ! + w1(ie,1:4) = 0.25d0 + ! + ELSE + ! + CYCLE + ! + END IF + ! + END DO ! ie + ! + intdos(1:ne,ib,ik_local(1:20,it)) = intdos(1:ne,ib, ik_local(1:20,it)) & + & + MATMUL(w1(1:ne, 1:4), wlsm(1:4,1:20)) + ! + END DO ! ib + !$OMP END DO NOWAIT + ! + END DO ! it + ! + !$OMP END PARALLEL + ! + intdos(1:ne,1:nb,1:nk_local) = intdos(1:ne,1:nb,1:nk_local) / DBLE(6 * nkBZ) + ! +END SUBROUTINE libtetrabz_intdos_main +! +END MODULE libtetrabz_dos_mod diff --git a/GX-PAW/common/src/17_libtetra_ext/libtetrabz_dos_mod.o b/GX-PAW/common/src/17_libtetra_ext/libtetrabz_dos_mod.o new file mode 100644 index 00000000..9df22a58 Binary files /dev/null and b/GX-PAW/common/src/17_libtetra_ext/libtetrabz_dos_mod.o differ diff --git a/GX-PAW/common/src/17_libtetra_ext/libtetrabz_fermigr_mod.F90 b/GX-PAW/common/src/17_libtetra_ext/libtetrabz_fermigr_mod.F90 new file mode 100644 index 00000000..ea7ea2b0 --- /dev/null +++ b/GX-PAW/common/src/17_libtetra_ext/libtetrabz_fermigr_mod.F90 @@ -0,0 +1,413 @@ + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" +! +! Copyright (C) 2014 Mitsuaki Kawamura +! +! Permission is hereby granted, free of charge, to any person obtaining a +! copy of this software and associated documentation files (the +! "Software"), to deal in the Software without restriction, including +! without limitation the rights to use, copy, modify, merge, publish, +! distribute, sublicense, and/or sell copies of the Software, and to +! permit persons to whom the Software is furnished to do so, subject to +! the following conditions: +! +! The above copyright notice and this permission notice shall be included +! in all copies or substantial portions of the Software. +! +! THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +! OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +! MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +! IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +! CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +! TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +! SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +! +MODULE libtetrabz_fermigr_mod + ! + IMPLICIT NONE + ! + PRIVATE + PUBLIC :: libtetrabz_fermigr + ! +CONTAINS +! +! Compute Fermi's golden rule +! +SUBROUTINE libtetrabz_fermigr(ltetra,bvec,nb,nge,eig1,eig2,ngw,wght,ne,e0,comm) + ! + use, intrinsic :: iso_c_binding + USE libtetrabz_common, ONLY : libtetrabz_initialize, libtetrabz_interpol_indx, libtetrabz_mpisum_dv + IMPLICIT NONE + ! + INTEGER(C_INT),INTENT(IN) :: ltetra, nb, nge(3), ngw(3), ne + REAL(C_DOUBLE),INTENT(IN) :: bvec(9), e0(ne), eig1(nb,PRODUCT(nge(1:3))), eig2(nb,PRODUCT(nge(1:3))) + REAL(C_DOUBLE),INTENT(OUT) :: wght(ne*nb*nb,PRODUCT(ngw(1:3))) + INTEGER(C_INT),INTENT(IN),OPTIONAL :: comm + ! + LOGICAL :: linterpol + INTEGER :: nt_local, nk_local, nkBZ, ik, kintp(20), nintp + INTEGER,ALLOCATABLE :: ik_global(:,:), ik_local(:,:) + REAL(8) :: wlsm(4,20), wintp(1,20) + REAL(8),ALLOCATABLE :: wghtd(:,:,:), kvec(:,:) + ! + nintp = 16 * ltetra - 12 + ! + IF(PRESENT(comm)) THEN + CALL libtetrabz_initialize(ltetra,nge,ngw,bvec,linterpol,wlsm,nk_local,& + & nt_local,nkBZ,ik_global,ik_local,kvec,comm) + ELSE + CALL libtetrabz_initialize(ltetra,nge,ngw,bvec,linterpol,wlsm,nk_local,& + & nt_local,nkBZ,ik_global,ik_local,kvec) + END IF + ! + IF(linterpol) THEN + ! + ABI_MALLOC(wghtd, (ne*nb*nb,1,nk_local)) + CALL libtetrabz_fermigr_main(wlsm,nt_local,ik_global,ik_local,nb,nkBZ,eig1,eig2,ne,e0,nk_local,wghtd) + ! + ! Interpolation + ! + wght(1:ne*nb*nb,1:PRODUCT(ngw(1:3))) = 0d0 + DO ik = 1, nk_local + CALL libtetrabz_interpol_indx(nintp,ngw,kvec(1:3,ik),kintp,wintp) + wght(1:ne*nb*nb,kintp(1:nintp)) = wght(1:ne*nb*nb, kintp(1:nintp)) & + & + MATMUL(wghtd(1:ne*nb*nb,1:1,ik), wintp(1:1,1:nintp)) + END DO ! ik = 1, nk_local + ABI_FREE(wghtd) + ABI_FREE(kvec) + ! + IF(PRESENT(comm)) CALL libtetrabz_mpisum_dv(comm, ne*nb*nb*PRODUCT(ngw(1:3)), wght) + ! + ELSE + CALL libtetrabz_fermigr_main(wlsm,nt_local,ik_global,ik_local,nb,nkBZ,eig1,eig2,ne,e0,nk_local,wght) + END IF + ! + ABI_FREE(ik_global) + ABI_FREE(ik_local) + ! +END SUBROUTINE libtetrabz_fermigr +! +! Main SUBROUTINE for Fermi's Gorlden rule : Theta(- E1) * Theta(E2) * Delta(E2 - E1 - w) +! +SUBROUTINE libtetrabz_fermigr_main(wlsm,nt_local,ik_global,ik_local,nb,nkBZ,eig1,eig2,ne,e0,nk_local,fermigr) + ! + USE libtetrabz_common, ONLY : libtetrabz_sort, & + & libtetrabz_tsmall_a1, libtetrabz_tsmall_b1, & + & libtetrabz_tsmall_b2, libtetrabz_tsmall_b3, & + & libtetrabz_tsmall_c1, libtetrabz_tsmall_c2, & + & libtetrabz_tsmall_c3 + IMPLICIT NONE + ! + INTEGER,INTENT(IN) :: nt_local, nb, nkBZ, nk_local, ne, & + & ik_global(20,nt_local), ik_local(20,nt_local) + REAL(8),INTENT(IN) :: wlsm(4,20), eig1(nb,nkBZ), eig2(nb,nkBZ), e0(ne) + REAL(8),INTENT(OUT) :: fermigr(ne*nb,nb,nk_local) + ! + INTEGER :: it, ib, indx(4) + REAL(8) :: e(4), ei1(4,nb), ei2(4), ej1(4,nb), ej2(4,nb), thr = 1d-10, tsmall(4,4), V, w1(ne*nb,4), w2(ne*nb,4) + ! + fermigr(1:ne*nb,1:nb,1:nk_local) = 0d0 + ! + !$OMP PARALLEL DEFAULT(NONE) & + !$OMP & SHARED(eig1,eig2,e0,fermigr,ik_global,ik_local,nb,ne,nt_local,thr,wlsm) & + !$OMP & PRIVATE(e,ei1,ei2,ej1,ej2,ib,indx,it,tsmall,V,w1,w2) + ! + DO it = 1, nt_local + ! + DO ib = 1, nb + ei1(1:4, ib) = MATMUL(wlsm(1:4,1:20), eig1(ib, ik_global(1:20,it))) + ej1(1:4, ib) = MATMUL(wlsm(1:4,1:20), eig2(ib, ik_global(1:20,it))) + END DO + ! + !$OMP DO + DO ib = 1, nb + ! + w1(1:ne*nb,1:4) = 0d0 + e(1:4) = ei1(1:4, ib) + CALL libtetrabz_sort(4,e,indx) + ! + IF(e(1) <= 0d0 .AND. 0d0 < e(2)) THEN + ! + CALL libtetrabz_tsmall_a1(e,V,tsmall) + ! + IF(V > thr) THEN + ! + ei2(1:4 ) = MATMUL(tsmall(1:4,1:4), ei1(indx(1:4), ib)) + ej2(1:4,1:nb) = MATMUL(tsmall(1:4,1:4), ej1(indx(1:4),1:nb)) + CALL libtetrabz_fermigr2(nb,ne,e0,ei2,ej2,w2) + w1(1:ne*nb,indx(1:4)) = w1(1:ne*nb,indx(1:4)) & + & + V * MATMUL(w2(1:ne*nb, 1:4 ), tsmall(1:4,1:4)) + ! + END IF + ! + ELSE IF( e(2) <= 0d0 .AND. 0d0 < e(3)) THEN + ! + CALL libtetrabz_tsmall_b1(e,V,tsmall) + ! + IF(V > thr) THEN + ! + ei2(1:4 ) = MATMUL(tsmall(1:4,1:4), ei1(indx(1:4), ib)) + ej2(1:4,1:nb) = MATMUL(tsmall(1:4,1:4), ej1(indx(1:4),1:nb)) + CALL libtetrabz_fermigr2(nb,ne,e0,ei2,ej2,w2) + w1(1:ne*nb,indx(1:4)) = w1(1:ne*nb,indx(1:4)) & + & + V * MATMUL(w2(1:ne*nb, 1:4 ), tsmall(1:4,1:4)) + ! + END IF + ! + CALL libtetrabz_tsmall_b2(e,V,tsmall) + ! + IF(V > thr) THEN + ! + ei2(1:4 ) = MATMUL(tsmall(1:4,1:4), ei1(indx(1:4), ib)) + ej2(1:4,1:nb) = MATMUL(tsmall(1:4,1:4), ej1(indx(1:4),1:nb)) + CALL libtetrabz_fermigr2(nb,ne,e0,ei2,ej2,w2) + w1(1:ne*nb,indx(1:4)) = w1(1:ne*nb,indx(1:4)) & + & + V * MATMUL(w2(1:ne*nb, 1:4 ), tsmall(1:4,1:4)) + ! + END IF + ! + CALL libtetrabz_tsmall_b3(e,V,tsmall) + ! + IF(V > thr) THEN + ! + ei2(1:4 ) = MATMUL(tsmall(1:4,1:4), ei1(indx(1:4), ib)) + ej2(1:4,1:nb) = MATMUL(tsmall(1:4,1:4), ej1(indx(1:4),1:nb)) + CALL libtetrabz_fermigr2(nb,ne,e0,ei2,ej2,w2) + w1(1:ne*nb,indx(1:4)) = w1(1:ne*nb,indx(1:4)) & + & + V * MATMUL(w2(1:ne*nb, 1:4 ), tsmall(1:4,1:4)) + ! + END IF + ! + ELSE IF( e(3) <= 0d0 .AND. 0d0 < e(4)) THEN + ! + CALL libtetrabz_tsmall_c1(e,V,tsmall) + ! + IF(V > thr) THEN + ! + ei2(1:4 ) = MATMUL(tsmall(1:4,1:4), ei1(indx(1:4), ib)) + ej2(1:4,1:nb) = MATMUL(tsmall(1:4,1:4), ej1(indx(1:4),1:nb)) + CALL libtetrabz_fermigr2(nb,ne,e0,ei2,ej2,w2) + w1(1:ne*nb,indx(1:4)) = w1(1:ne*nb,indx(1:4)) & + & + V * MATMUL(w2(1:ne*nb, 1:4 ), tsmall(1:4,1:4)) + ! + END IF + ! + CALL libtetrabz_tsmall_c2(e,V,tsmall) + ! + IF(V > thr) THEN + ! + ei2(1:4 ) = MATMUL(tsmall(1:4,1:4), ei1(indx(1:4), ib)) + ej2(1:4,1:nb) = MATMUL(tsmall(1:4,1:4), ej1(indx(1:4),1:nb)) + CALL libtetrabz_fermigr2(nb,ne,e0,ei2,ej2,w2) + w1(1:ne*nb,indx(1:4)) = w1(1:ne*nb,indx(1:4)) & + & + V * MATMUL(w2(1:ne*nb, 1:4 ), tsmall(1:4,1:4)) + ! + END IF + ! + CALL libtetrabz_tsmall_c3(e,V,tsmall) + ! + IF(V > thr) THEN + ! + ei2(1:4 ) = MATMUL(tsmall(1:4,1:4), ei1(indx(1:4), ib)) + ej2(1:4,1:nb) = MATMUL(tsmall(1:4,1:4), ej1(indx(1:4),1:nb)) + CALL libtetrabz_fermigr2(nb,ne,e0,ei2,ej2,w2) + w1(1:ne*nb,indx(1:4)) = w1(1:ne*nb,indx(1:4)) & + & + V * MATMUL(w2(1:ne*nb, 1:4 ), tsmall(1:4,1:4)) + ! + END IF + ! + ELSE IF(e(4) <= 0d0) THEN + ! + ei2(1:4 ) = ei1(1:4, ib) + ej2(1:4,1:nb) = ej1(1:4,1:nb) + CALL libtetrabz_fermigr2(nb,ne,e0,ei2,ej2,w2) + w1(1:ne*nb,1:4) = w1(1:ne*nb,1:4) + w2(1:ne*nb,1:4) + ! + END IF + ! + fermigr(1:ne*nb,ib,ik_local(1:20,it)) = fermigr(1:ne*nb,ib, ik_local(1:20,it)) & + & + MATMUL(w1(1:ne*nb,1:4), wlsm(1:4,1:20)) + ! + END DO ! ib = 1, nb + !$OMP END DO NOWAIT + ! + END DO ! it + ! + !$OMP END PARALLEL + ! + fermigr(1:ne*nb,1:nb,1:nk_local) = fermigr(1:ne*nb,1:nb,1:nk_local) / DBLE(6 * nkBZ) + ! +END SUBROUTINE libtetrabz_fermigr_main +! +! Tetrahedra method for theta( - E2) +! +SUBROUTINE libtetrabz_fermigr2(nb,ne,e0,ei1,ej1,w1) + ! + USE libtetrabz_common, ONLY : libtetrabz_sort, & + & libtetrabz_tsmall_a1, libtetrabz_tsmall_b1, & + & libtetrabz_tsmall_b2, libtetrabz_tsmall_b3, & + & libtetrabz_tsmall_c1, libtetrabz_tsmall_c2, & + & libtetrabz_tsmall_c3 + IMPLICIT NONE + ! + INTEGER,INTENT(IN) :: nb, ne + REAL(8),INTENT(IN) :: e0(ne), ei1(4), ej1(4,nb) + REAL(8),INTENT(OUT) :: w1(ne,nb,4) + ! + INTEGER :: ib, indx(4) + REAL(8) :: de(4), e(4), thr = 1d-8, tsmall(4,4), V, w2(ne,4) + ! + DO ib = 1, nb + ! + w1(1:ne,ib,1:4) = 0d0 + e(1:4) = - ej1(1:4, ib) + CALL libtetrabz_sort(4,e,indx) + ! + IF((e(1) <= 0d0 .AND. 0d0 < e(2)) .OR. (e(1) < 0d0 .AND. 0d0 <= e(2))) THEN + ! + CALL libtetrabz_tsmall_a1(e,V,tsmall) + ! + IF(V > thr) THEN + ! + de(1:4) = MATMUL(tsmall(1:4,1:4), ej1(indx(1:4),ib) - ei1(indx(1:4))) + CALL libtetrabz_fermigr3(ne,e0,de,w2) + w1(1:ne,ib,indx(1:4)) = w1(1:ne,ib,indx(1:4)) & + & + V * MATMUL(w2(1:ne, 1:4 ), tsmall(1:4,1:4)) + ! + END IF + ! + ELSE IF((e(2) <= 0d0 .AND. 0d0 < e(3)) .OR. (e(2) < 0d0 .AND. 0d0 <= e(3))) THEN + ! + CALL libtetrabz_tsmall_b1(e,V,tsmall) + ! + IF(V > thr) THEN + ! + de(1:4) = MATMUL(tsmall(1:4,1:4), ej1(indx(1:4),ib) - ei1(indx(1:4))) + CALL libtetrabz_fermigr3(ne,e0,de,w2) + w1(1:ne,ib,indx(1:4)) = w1(1:ne,ib,indx(1:4)) & + & + V * MATMUL(w2(1:ne, 1:4 ), tsmall(1:4,1:4)) + ! + END IF + ! + CALL libtetrabz_tsmall_b2(e,V,tsmall) + ! + IF(V > thr) THEN + ! + de(1:4) = MATMUL(tsmall(1:4,1:4), ej1(indx(1:4),ib) - ei1(indx(1:4))) + CALL libtetrabz_fermigr3(ne,e0,de,w2) + w1(1:ne,ib,indx(1:4)) = w1(1:ne,ib,indx(1:4)) & + & + V * MATMUL(w2(1:ne, 1:4 ), tsmall(1:4,1:4)) + ! + END IF + ! + CALL libtetrabz_tsmall_b3(e,V,tsmall) + ! + IF(V > thr) THEN + ! + de(1:4) = MATMUL(tsmall(1:4,1:4), ej1(indx(1:4),ib) - ei1(indx(1:4))) + CALL libtetrabz_fermigr3(ne,e0,de,w2) + w1(1:ne,ib,indx(1:4)) = w1(1:ne,ib,indx(1:4)) & + & + V * MATMUL(w2(1:ne, 1:4 ), tsmall(1:4,1:4)) + ! + END IF + ! + ELSE IF((e(3) <= 0d0 .AND. 0d0 < e(4)) .OR. (e(3) < 0d0 .AND. 0d0 <= e(4))) THEN + ! + CALL libtetrabz_tsmall_c1(e,V,tsmall) + ! + IF(V > thr) THEN + ! + de(1:4) = MATMUL(tsmall(1:4,1:4), ej1(indx(1:4),ib) - ei1(indx(1:4))) + CALL libtetrabz_fermigr3(ne,e0,de,w2) + w1(1:ne,ib,indx(1:4)) = w1(1:ne,ib,indx(1:4)) & + & + V * MATMUL(w2(1:ne, 1:4 ), tsmall(1:4,1:4)) + ! + END IF + ! + CALL libtetrabz_tsmall_c2(e,V,tsmall) + ! + IF(V > thr) THEN + ! + de(1:4) = MATMUL(tsmall(1:4,1:4), ej1(indx(1:4),ib) - ei1(indx(1:4))) + CALL libtetrabz_fermigr3(ne,e0,de,w2) + w1(1:ne,ib,indx(1:4)) = w1(1:ne,ib,indx(1:4)) & + & + V * MATMUL(w2(1:ne, 1:4 ), tsmall(1:4,1:4)) + ! + END IF + ! + CALL libtetrabz_tsmall_c3(e,V,tsmall) + ! + IF(V > thr) THEN + ! + de(1:4) = MATMUL(tsmall(1:4,1:4), ej1(indx(1:4),ib) - ei1(indx(1:4))) + CALL libtetrabz_fermigr3(ne,e0,de,w2) + w1(1:ne,ib,indx(1:4)) = w1(1:ne,ib,indx(1:4)) & + & + V * MATMUL(w2(1:ne, 1:4 ), tsmall(1:4,1:4)) + ! + END IF + ! + ELSE IF(e(4) <= 0d0) THEN + ! + de(1:4) = ej1(1:4,ib) - ei1(1:4) + CALL libtetrabz_fermigr3(ne,e0,de,w2) + w1(1:ne,ib,1:4) = w1(1:ne,ib,1:4) + w2(1:ne,1:4) + ! + END IF + ! + END DO ! ib = 1, nb + ! +END SUBROUTINE libtetrabz_fermigr2 +! +! +! +SUBROUTINE libtetrabz_fermigr3(ne,e0,de,w1) + ! + USE libtetrabz_common, ONLY : libtetrabz_sort, & + & libtetrabz_triangle_a1, libtetrabz_triangle_b1, & + & libtetrabz_triangle_b2, libtetrabz_triangle_c1 + IMPLICIT NONE + ! + INTEGER,INTENT(IN) :: ne + REAL(8),INTENT(IN) :: e0(ne), de(4) + REAL(8),INTENT(OUT) :: w1(ne,4) + ! + INTEGER :: ie, indx(4) + REAL(8) :: e(4), tsmall(3,4), V, w2(3) + ! + w2(1:3) = 1d0 / 3d0 + ! + w1(1:ne,1:4) = 0d0 + e(1:4) = de(1:4) + CALL libtetrabz_sort(4,e,indx) + ! + DO ie = 1, ne + ! + IF(e(1) < e0(ie) .AND. e0(ie) <= e(2)) THEN + ! + CALL libtetrabz_triangle_a1(e(1:4) - e0(ie),V,tsmall) + w1(ie,indx(1:4)) = w1(ie,indx(1:4)) + V * SUM(tsmall(1:3,1:4), 1) / 3d0 + ! + ELSE IF(e(2) < e0(ie) .AND. e0(ie) <= e(3)) THEN + ! + CALL libtetrabz_triangle_b1(e(1:4) - e0(ie),V,tsmall) + w1(ie,indx(1:4)) = w1(ie,indx(1:4)) + V * SUM(tsmall(1:3,1:4), 1) / 3d0 + ! + CALL libtetrabz_triangle_b2(e(1:4) - e0(ie),V,tsmall) + w1(ie,indx(1:4)) = w1(ie,indx(1:4)) + V * SUM(tsmall(1:3,1:4), 1) / 3d0 + ! + ELSE IF(e(3) < e0(ie) .AND. e0(ie) < e(4)) THEN + ! + CALL libtetrabz_triangle_c1(e(1:4) - e0(ie),V,tsmall) + w1(ie,indx(1:4)) = w1(ie,indx(1:4)) + V * SUM(tsmall(1:3,1:4), 1) / 3d0 + ! + END IF + ! + END DO ! ie + ! +END SUBROUTINE libtetrabz_fermigr3 +! +END MODULE libtetrabz_fermigr_mod diff --git a/GX-PAW/common/src/17_libtetra_ext/libtetrabz_fermigr_mod.o b/GX-PAW/common/src/17_libtetra_ext/libtetrabz_fermigr_mod.o new file mode 100644 index 00000000..25fe07c7 Binary files /dev/null and b/GX-PAW/common/src/17_libtetra_ext/libtetrabz_fermigr_mod.o differ diff --git a/GX-PAW/common/src/17_libtetra_ext/libtetrabz_occ_mod.F90 b/GX-PAW/common/src/17_libtetra_ext/libtetrabz_occ_mod.F90 new file mode 100644 index 00000000..6c36e0a9 --- /dev/null +++ b/GX-PAW/common/src/17_libtetra_ext/libtetrabz_occ_mod.F90 @@ -0,0 +1,279 @@ + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" +! +! Copyright (C) 2014 Mitsuaki Kawamura +! +! Permission is hereby granted, free of charge, to any person obtaining a +! copy of this software and associated documentation files (the +! "Software"), to deal in the Software without restriction, including +! without limitation the rights to use, copy, modify, merge, publish, +! distribute, sublicense, and/or sell copies of the Software, and to +! permit persons to whom the Software is furnished to do so, subject to +! the following conditions: +! +! The above copyright notice and this permission notice shall be included +! in all copies or substantial portions of the Software. +! +! THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +! OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +! MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +! IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +! CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +! TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +! SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +! +MODULE libtetrabz_occ_mod + ! + IMPLICIT NONE + ! + PRIVATE + PUBLIC :: libtetrabz_occ, libtetrabz_fermieng + ! +CONTAINS +! +! Compute occupation +! +SUBROUTINE libtetrabz_occ(ltetra,bvec,nb,nge,eig,ngw,wght,comm) + ! + use, intrinsic :: iso_c_binding + USE libtetrabz_common, ONLY : libtetrabz_initialize, libtetrabz_interpol_indx, libtetrabz_mpisum_dv + IMPLICIT NONE + ! + INTEGER(C_INT),INTENT(IN) :: ltetra, nb, nge(3), ngw(3) + REAL(C_DOUBLE),INTENT(IN) :: bvec(9), eig(nb,PRODUCT(nge(1:3))) + REAL(C_DOUBLE),INTENT(OUT) :: wght(nb,PRODUCT(ngw(1:3))) + INTEGER(C_INT),INTENT(IN),OPTIONAL :: comm + ! + LOGICAL :: linterpol + INTEGER :: nt_local, nk_local, nkBZ, ik, kintp(20), nintp + INTEGER,ALLOCATABLE :: ik_global(:,:), ik_local(:,:) + REAL(8) :: wlsm(4,20), wintp(1,20) + REAL(8),ALLOCATABLE :: wghtd(:,:,:), kvec(:,:) + ! + nintp = 16 * ltetra - 12 + ! + IF(PRESENT(comm)) THEN + CALL libtetrabz_initialize(ltetra,nge,ngw,bvec,linterpol,wlsm,nk_local,& + & nt_local,nkBZ,ik_global,ik_local,kvec,comm) + ELSE + CALL libtetrabz_initialize(ltetra,nge,ngw,bvec,linterpol,wlsm,nk_local,& + & nt_local,nkBZ,ik_global,ik_local,kvec) + END IF + ! + IF(linterpol) THEN + ! + ABI_MALLOC(wghtd, (nb,1,nk_local)) + CALL libtetrabz_occ_main(wlsm,nt_local,ik_global,ik_local,nb,nkBZ,eig,nk_local,wghtd,0d0) + ! + ! Interpolation + ! + wght(1:nb,1:PRODUCT(ngw(1:3))) = 0d0 + DO ik = 1, nk_local + CALL libtetrabz_interpol_indx(nintp,ngw,kvec(1:3,ik),kintp,wintp) + wght(1:nb,kintp(1:nintp)) = wght(1:nb, kintp(1:nintp)) & + & + MATMUL(wghtd(1:nb,1:1,ik), wintp(1:1,1:nintp)) + END DO ! ik = 1, nk_local + ABI_FREE(wghtd) + ABI_FREE(kvec) + ! + IF(PRESENT(comm)) CALL libtetrabz_mpisum_dv(comm, nb * PRODUCT(ngw(1:3)), wght) + ! + ELSE + CALL libtetrabz_occ_main(wlsm,nt_local,ik_global,ik_local,nb,nkBZ,eig,nk_local,wght,0d0) + END IF + ! + ABI_FREE(ik_global) + ABI_FREE(ik_local) + ! +END SUBROUTINE libtetrabz_occ +! +! Calculate Fermi energy +! +SUBROUTINE libtetrabz_fermieng(ltetra,bvec,nb,nge,eig,ngw,wght,ef,nelec,comm) + ! + use, intrinsic :: iso_c_binding + USE libtetrabz_common, ONLY : libtetrabz_initialize, libtetrabz_interpol_indx, & + & libtetrabz_mpisum_d, libtetrabz_mpisum_dv + IMPLICIT NONE + ! + INTEGER(C_INT),INTENT(IN) :: ltetra, nb, nge(3), ngw(3) + REAL(C_DOUBLE),INTENT(IN) :: bvec(9), nelec, eig(nb,PRODUCT(nge(1:3))) + REAL(C_DOUBLE),INTENT(OUT) :: ef + REAL(C_DOUBLE),INTENT(OUT) :: wght(nb,PRODUCT(ngw(1:3))) + INTEGER(C_INT),INTENT(IN),OPTIONAL :: comm + ! + LOGICAL :: linterpol + INTEGER :: nt_local, nk_local, nkBZ, ik, kintp(20), nintp + INTEGER,ALLOCATABLE :: ik_global(:,:), ik_local(:,:) + REAL(8) :: wlsm(4,20), wintp(1,20) + REAL(8),ALLOCATABLE :: wghtd(:,:,:), kvec(:,:) + ! + INTEGER :: iter, maxiter = 300 + REAL(8) :: elw, eup, eps= 1d-10, sumkmid + ! + nintp = 16 * ltetra - 12 + ! + IF(PRESENT(comm)) THEN + CALL libtetrabz_initialize(ltetra,nge,ngw,bvec,linterpol,wlsm,nk_local,& + & nt_local,nkBZ,ik_global,ik_local,kvec,comm) + ELSE + CALL libtetrabz_initialize(ltetra,nge,ngw,bvec,linterpol,wlsm,nk_local,& + & nt_local,nkBZ,ik_global,ik_local,kvec) + END IF + ! + IF(linterpol) then + ABI_MALLOC(wghtd, (nb,1,nk_local)) + end if + ! + elw = MINVAL(eig(1:nb,1:PRODUCT(nge(1:3)))) + eup = MAXVAL(eig(1:nb,1:PRODUCT(nge(1:3)))) + ! + ! Bisection method + ! + DO iter = 1, maxiter + ! + ef = (eup + elw) / 2.d0 + ! + ! Calc. # of electrons + ! + IF(linterpol) THEN + CALL libtetrabz_occ_main(wlsm,nt_local,ik_global,ik_local,nb,nkBZ,eig,nk_local,wghtd,ef) + sumkmid = SUM(wghtd(1:nb,1,1:nk_local)) + ! + IF(PRESENT(comm)) CALL libtetrabz_mpisum_d(comm,sumkmid) + ! + ELSE + CALL libtetrabz_occ_main(wlsm,nt_local,ik_global,ik_local,nb,nkBZ,eig,nk_local,wght,ef) + sumkmid = SUM(wght(1:nb,1:nk_local)) + END IF + ! + ! convergence check + ! + IF(ABS(sumkmid - nelec) < eps) THEN + EXIT + ELSE IF(sumkmid < nelec) THEN + elw = ef + ELSE + eup = ef + ENDIF + ! + END DO ! iter + ! + IF(iter >= maxiter) STOP "libtetrabz_fermieng" + ! + IF(linterpol) THEN + ! + ! Interpolation + ! + wght(1:nb,1:PRODUCT(ngw(1:3))) = 0d0 + DO ik = 1, nk_local + CALL libtetrabz_interpol_indx(nintp,ngw,kvec(1:3,ik),kintp,wintp) + wght(1:nb,kintp(1:nintp)) = wght(1:nb, kintp(1:nintp)) & + & + MATMUL(wghtd(1:nb,1:1,ik), wintp(1:1,1:nintp)) + END DO ! ik = 1, nk_local + ABI_FREE(wghtd) + ABI_FREE(kvec) + ! + IF(PRESENT(comm)) CALL libtetrabz_mpisum_dv(comm, nb * PRODUCT(ngw(1:3)), wght) + ! + END IF ! (linterpol) + ! + ABI_FREE(ik_global) + ABI_FREE(ik_local) + ! +END SUBROUTINE libtetrabz_fermieng +! +! Main SUBROUTINE for occupation : Theta(EF - E1) +! +SUBROUTINE libtetrabz_occ_main(wlsm,nt_local,ik_global,ik_local,nb,nkBZ,eig,nk_local,occ,ef) + ! + USE libtetrabz_common, ONLY : libtetrabz_sort, & + & libtetrabz_tsmall_a1, libtetrabz_tsmall_b1, & + & libtetrabz_tsmall_b2, libtetrabz_tsmall_b3, & + & libtetrabz_tsmall_c1, libtetrabz_tsmall_c2, & + & libtetrabz_tsmall_c3 + IMPLICIT NONE + ! + INTEGER,INTENT(IN) :: nt_local, nb, nkBZ, nk_local, & + & ik_global(20,nt_local), ik_local(20,nt_local) + REAL(8),INTENT(IN) :: wlsm(4,20), ef, eig(nb,nkBZ) + REAL(8),INTENT(OUT) :: occ(nb,nk_local) + ! + INTEGER :: ib, indx(4), it + REAL(8) :: e(4), ei1(4,nb), tsmall(4,4), V, w1(4) + ! + occ(1:nb,1:nk_local) = 0d0 + ! + !$OMP PARALLEL DEFAULT(NONE) & + !$OMP & SHARED(ef,eig,ik_global,ik_local,nb,nt_local,occ,wlsm) & + !$OMP & PRIVATE(e,ei1,ib,indx,it,tsmall,V,w1) + ! + DO it = 1, nt_local + ! + DO ib = 1, nb + ei1(1:4,ib) = MATMUL(wlsm(1:4,1:20), eig(ib,ik_global(1:20,it))) + END DO + ! + !$OMP DO + DO ib = 1, nb + ! + w1(1:4) = 0d0 + e(1:4) = ei1(1:4, ib) - ef + CALL libtetrabz_sort(4,e,indx) + ! + IF(e(1) <= 0d0 .AND. 0d0 < e(2)) THEN + ! + CALL libtetrabz_tsmall_a1(e,V,tsmall) + w1(indx(1:4)) = w1(indx(1:4)) + V * SUM(tsmall(1:4,1:4), 1) * 0.25d0 + ! + ELSE IF(e(2) <= 0d0 .AND. 0d0 < e(3)) THEN + ! + CALL libtetrabz_tsmall_b1(e,V,tsmall) + w1(indx(1:4)) = w1(indx(1:4)) + V * SUM(tsmall(1:4,1:4), 1) * 0.25d0 + ! + CALL libtetrabz_tsmall_b2(e,V,tsmall) + w1(indx(1:4)) = w1(indx(1:4)) + V * SUM(tsmall(1:4,1:4), 1) * 0.25d0 + ! + CALL libtetrabz_tsmall_b3(e,V,tsmall) + w1(indx(1:4)) = w1(indx(1:4)) + V * SUM(tsmall(1:4,1:4), 1) * 0.25d0 + ! + ELSE IF(e(3) <= 0d0 .AND. 0d0 < e(4)) THEN + ! + CALL libtetrabz_tsmall_c1(e,V,tsmall) + w1(indx(1:4)) = w1(indx(1:4)) + V * SUM(tsmall(1:4,1:4), 1) * 0.25d0 + ! + CALL libtetrabz_tsmall_c2(e,V,tsmall) + w1(indx(1:4)) = w1(indx(1:4)) + V * SUM(tsmall(1:4,1:4), 1) * 0.25d0 + ! + CALL libtetrabz_tsmall_c3(e,V,tsmall) + w1(indx(1:4)) = w1(indx(1:4)) + V * SUM(tsmall(1:4,1:4), 1) * 0.25d0 + ! + ELSE IF(e(4) <= 0d0) THEN + ! + w1(1:4) = 0.25d0 + ! + ELSE + ! + CYCLE + ! + END IF + ! + occ(ib,ik_local(1:20,it)) = occ(ib,ik_local(1:20,it)) & + & + MATMUL(w1(1:4), wlsm(1:4,1:20)) + ! + END DO ! ib + !$OMP END DO NOWAIT + ! + END DO ! it + ! + !$OMP END PARALLEL + ! + occ(1:nb,1:nk_local) = occ(1:nb,1:nk_local) / DBLE(6 * nkBZ) + ! +END SUBROUTINE libtetrabz_occ_main +! +END MODULE libtetrabz_occ_mod diff --git a/GX-PAW/common/src/17_libtetra_ext/libtetrabz_occ_mod.o b/GX-PAW/common/src/17_libtetra_ext/libtetrabz_occ_mod.o new file mode 100644 index 00000000..af39b581 Binary files /dev/null and b/GX-PAW/common/src/17_libtetra_ext/libtetrabz_occ_mod.o differ diff --git a/GX-PAW/common/src/17_libtetra_ext/libtetrabz_polcmplx_mod.F90 b/GX-PAW/common/src/17_libtetra_ext/libtetrabz_polcmplx_mod.F90 new file mode 100644 index 00000000..4c2e5ab6 --- /dev/null +++ b/GX-PAW/common/src/17_libtetra_ext/libtetrabz_polcmplx_mod.F90 @@ -0,0 +1,790 @@ + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" +! +! Copyright (C) 2014 Mitsuaki Kawamura +! +! Permission is hereby granted, free of charge, to any person obtaining a +! copy of this software and associated documentation files (the +! "Software"), to deal in the Software without restriction, including +! without limitation the rights to use, copy, modify, merge, publish, +! distribute, sublicense, and/or sell copies of the Software, and to +! permit persons to whom the Software is furnished to do so, subject to +! the following conditions: +! +! The above copyright notice and this permission notice shall be included +! in all copies or substantial portions of the Software. +! +! THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +! OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +! MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +! IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +! CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +! TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +! SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +! +MODULE libtetrabz_polcmplx_mod + ! + IMPLICIT NONE + ! + PRIVATE + PUBLIC :: libtetrabz_polcmplx + ! +CONTAINS +! +! Compute Polarization of imaginary frequency +! +SUBROUTINE libtetrabz_polcmplx(ltetra,bvec,nb,nge,eig1,eig2,ngw,wght,ne,e0,comm) + ! + use, intrinsic :: iso_c_binding + USE libtetrabz_common, ONLY : libtetrabz_initialize, libtetrabz_interpol_indx, libtetrabz_mpisum_zv + IMPLICIT NONE + ! + INTEGER(C_INT),INTENT(IN) :: ltetra, nb, nge(3), ngw(3), ne + REAL(C_DOUBLE),INTENT(IN) :: bvec(9), eig1(nb,PRODUCT(nge(1:3))), eig2(nb,PRODUCT(nge(1:3))) + COMPLEX(C_DOUBLE_COMPLEX),INTENT(IN) :: e0(ne) + COMPLEX(C_DOUBLE_COMPLEX),INTENT(OUT) :: wght(ne*nb*nb,PRODUCT(ngw(1:3))) + INTEGER(C_INT),INTENT(IN),OPTIONAL :: comm + ! + LOGICAL :: linterpol + INTEGER :: nt_local, nk_local, nkBZ, ik, kintp(20), nintp + INTEGER,ALLOCATABLE :: ik_global(:,:), ik_local(:,:) + REAL(8) :: wlsm(4,20), wintp(1,20) + REAL(8),ALLOCATABLE :: kvec(:,:) + COMPLEX(8),ALLOCATABLE :: wghtd(:,:,:) + ! + nintp = 16 * ltetra - 12 + ! + IF(PRESENT(comm)) THEN + CALL libtetrabz_initialize(ltetra,nge,ngw,bvec,linterpol,wlsm,nk_local,& + & nt_local,nkBZ,ik_global,ik_local,kvec,comm) + ELSE + CALL libtetrabz_initialize(ltetra,nge,ngw,bvec,linterpol,wlsm,nk_local,& + & nt_local,nkBZ,ik_global,ik_local,kvec) + END IF + ! + IF(linterpol) THEN + ! + ABI_MALLOC(wghtd, (ne*nb*nb,1,nk_local)) + CALL libtetrabz_polcmplx_main(wlsm,nt_local,ik_global,ik_local,nb,nkBZ,eig1,eig2,ne,e0,nk_local,wghtd) + ! + ! Interpolation + ! + wght(1:ne*nb*nb,1:PRODUCT(ngw(1:3))) = 0d0 + DO ik = 1, nk_local + CALL libtetrabz_interpol_indx(nintp,ngw,kvec(1:3,ik),kintp,wintp) + wght(1:ne*nb*nb,kintp(1:nintp)) = wght(1:ne*nb*nb, kintp(1:nintp)) & + & + MATMUL(wghtd(1:ne*nb*nb,1:1,ik), wintp(1:1,1:nintp)) + END DO ! ik = 1, nk_local + ABI_FREE(wghtd) + ABI_FREE(kvec) + ! + IF(PRESENT(comm)) CALL libtetrabz_mpisum_zv(comm, ne*nb*nb*PRODUCT(ngw(1:3)), wght) + ! + ELSE + CALL libtetrabz_polcmplx_main(wlsm,nt_local,ik_global,ik_local,nb,nkBZ,eig1,eig2,ne,e0,nk_local,wght) + END IF + ! + ABI_FREE(ik_global) + ABI_FREE(ik_local) + ! +END SUBROUTINE libtetrabz_polcmplx +! +! Main SUBROUTINE for Polaization (Imaginaly axis) : Theta(- E1) * Theta(E2) / (E2 - E1 - iw) +! +SUBROUTINE libtetrabz_polcmplx_main(wlsm,nt_local,ik_global,ik_local,nb,nkBZ,eig1,eig2,ne,e0,nk_local,polcmplx) + ! + USE libtetrabz_common, ONLY : libtetrabz_sort, & + & libtetrabz_tsmall_a1, libtetrabz_tsmall_b1, & + & libtetrabz_tsmall_b2, libtetrabz_tsmall_b3, & + & libtetrabz_tsmall_c1, libtetrabz_tsmall_c2, & + & libtetrabz_tsmall_c3 + IMPLICIT NONE + ! + INTEGER,INTENT(IN) :: nt_local, nb, nkBZ, nk_local, ne, & + & ik_global(20,nt_local), ik_local(20,nt_local) + REAL(8),INTENT(IN) :: wlsm(4,20), eig1(nb,nkBZ), eig2(nb,nkBZ) + COMPLEX(8),INTENT(IN) :: e0(ne) + COMPLEX(8),INTENT(OUT) :: polcmplx(ne*nb,nb,nk_local) + ! + INTEGER :: ib, indx(4), it + REAL(8) :: e(4), ei1(4,nb), ej1(4,nb), ei2(4), ej2(4,nb), thr = 1d-8, tsmall(4,4), V + COMPLEX(8) :: w1(ne*nb,4), w2(ne*nb,4) + ! + polcmplx(1:ne*nb,1:nb,1:nk_local) = 0d0 + ! + !$OMP PARALLEL DEFAULT(NONE) & + !$OMP & SHARED(eig1,eig2,e0,ik_global,ik_local,nb,ne,nt_local,polcmplx,thr,wlsm) & + !$OMP & PRIVATE(e,ei1,ei2,ej1,ej2,ib,indx,it,tsmall,V,w1,w2) + ! + DO it = 1, nt_local + ! + DO ib = 1, nb + ei1(1:4, ib) = MATMUL(wlsm(1:4,1:20), eig1(ib, ik_global(1:20,it))) + ej1(1:4, ib) = MATMUL(wlsm(1:4,1:20), eig2(ib, ik_global(1:20,it))) + END DO + ! + !$OMP DO + DO ib = 1, nb + ! + w1(1:ne*nb,1:4) = 0d0 + e(1:4) = ei1(1:4, ib) + CALL libtetrabz_sort(4,e,indx) + ! + IF(e(1) <= 0d0 .AND. 0d0 < e(2)) THEN + ! + CALL libtetrabz_tsmall_a1(e,V,tsmall) + ! + IF(V > thr) THEN + ! + ei2(1:4 ) = MATMUL(tsmall(1:4,1:4), ei1(indx(1:4), ib)) + ej2(1:4,1:nb) = MATMUL(tsmall(1:4,1:4), ej1(indx(1:4),1:nb)) + CALL libtetrabz_polcmplx2(nb,ne,e0,ei2,ej2,w2) + w1(1:ne*nb,indx(1:4)) = w1(1:ne*nb, indx(1:4)) & + & + V * MATMUL(w2(1:ne*nb,1:4), tsmall(1:4,1:4)) + ! + END IF + ! + ELSE IF(e(2) <= 0d0 .AND. 0d0 < e(3)) THEN + ! + CALL libtetrabz_tsmall_b1(e,V,tsmall) + ! + IF(V > thr) THEN + ! + ei2(1:4 ) = MATMUL(tsmall(1:4,1:4), ei1(indx(1:4), ib)) + ej2(1:4,1:nb) = MATMUL(tsmall(1:4,1:4), ej1(indx(1:4),1:nb)) + CALL libtetrabz_polcmplx2(nb,ne,e0,ei2,ej2,w2) + w1(1:ne*nb,indx(1:4)) = w1(1:ne*nb, indx(1:4)) & + & + V * MATMUL(w2(1:ne*nb,1:4), tsmall(1:4,1:4)) + ! + END IF + ! + CALL libtetrabz_tsmall_b2(e,V,tsmall) + ! + IF(V > thr) THEN + ! + ei2(1:4 ) = MATMUL(tsmall(1:4,1:4), ei1(indx(1:4), ib)) + ej2(1:4,1:nb) = MATMUL(tsmall(1:4,1:4), ej1(indx(1:4),1:nb)) + CALL libtetrabz_polcmplx2(nb,ne,e0,ei2,ej2,w2) + w1(1:ne*nb,indx(1:4)) = w1(1:ne*nb, indx(1:4)) & + & + V * MATMUL(w2(1:ne*nb,1:4), tsmall(1:4,1:4)) + ! + END IF + ! + CALL libtetrabz_tsmall_b3(e,V,tsmall) + ! + IF(V > thr) THEN + ! + ei2(1:4 ) = MATMUL(tsmall(1:4,1:4), ei1(indx(1:4), ib)) + ej2(1:4,1:nb) = MATMUL(tsmall(1:4,1:4), ej1(indx(1:4),1:nb)) + CALL libtetrabz_polcmplx2(nb,ne,e0,ei2,ej2,w2) + w1(1:ne*nb,indx(1:4)) = w1(1:ne*nb, indx(1:4)) & + & + V * MATMUL(w2(1:ne*nb,1:4), tsmall(1:4,1:4)) + ! + END IF + ! + ELSE IF(e(3) <= 0d0 .AND. 0d0 < e(4)) THEN + ! + CALL libtetrabz_tsmall_c1(e,V,tsmall) + ! + IF(V > thr) THEN + ! + ei2(1:4 ) = MATMUL(tsmall(1:4,1:4), ei1(indx(1:4), ib)) + ej2(1:4,1:nb) = MATMUL(tsmall(1:4,1:4), ej1(indx(1:4),1:nb)) + CALL libtetrabz_polcmplx2(nb,ne,e0,ei2,ej2,w2) + w1(1:ne*nb,indx(1:4)) = w1(1:ne*nb, indx(1:4)) & + & + V * MATMUL(w2(1:ne*nb,1:4), tsmall(1:4,1:4)) + ! + END IF + ! + CALL libtetrabz_tsmall_c2(e,V,tsmall) + ! + IF(V > thr) THEN + ! + ei2(1:4 ) = MATMUL(tsmall(1:4,1:4), ei1(indx(1:4), ib)) + ej2(1:4,1:nb) = MATMUL(tsmall(1:4,1:4), ej1(indx(1:4),1:nb)) + CALL libtetrabz_polcmplx2(nb,ne,e0,ei2,ej2,w2) + w1(1:ne*nb,indx(1:4)) = w1(1:ne*nb, indx(1:4)) & + & + V * MATMUL(w2(1:ne*nb,1:4), tsmall(1:4,1:4)) + ! + END IF + ! + CALL libtetrabz_tsmall_c3(e,V,tsmall) + ! + IF(V > thr) THEN + ! + ei2(1:4 ) = MATMUL(tsmall(1:4,1:4), ei1(indx(1:4), ib)) + ej2(1:4,1:nb) = MATMUL(tsmall(1:4,1:4), ej1(indx(1:4),1:nb)) + CALL libtetrabz_polcmplx2(nb,ne,e0,ei2,ej2,w2) + w1(1:ne*nb,indx(1:4)) = w1(1:ne*nb, indx(1:4)) & + & + V * MATMUL(w2(1:ne*nb,1:4), tsmall(1:4,1:4)) + ! + END IF + ! + ELSE IF( e(4) <= 0d0 ) THEN + ! + ei2(1:4 ) = ei1(1:4, ib) + ej2(1:4,1:nb) = ej1(1:4,1:nb) + CALL libtetrabz_polcmplx2(nb,ne,e0,ei2,ej2,w2) + w1(1:ne*nb,1:4) = w1(1:ne*nb,1:4) + w2(1:ne*nb,1:4) + ! + ELSE + ! + CYCLE + ! + END IF + ! + polcmplx(1:ne*nb,ib,ik_local(1:20,it)) = polcmplx(1:ne*nb,ib, ik_local(1:20,it)) & + & + MATMUL(w1(1:ne*nb,1:4), wlsm(1:4,1:20)) + ! + END DO ! ib = 1, nb + !$OMP END DO NOWAIT + ! + END DO ! it + ! + !$OMP END PARALLEL + ! + polcmplx(1:ne*nb,1:nb,1:nk_local) = polcmplx(1:ne*nb,1:nb,1:nk_local) / DBLE(6 * nkBZ) + ! +END SUBROUTINE libtetrabz_polcmplx_main +! +! Tetrahedra method for theta( - E2) +! +SUBROUTINE libtetrabz_polcmplx2(nb,ne,e0,ei1,ej1,w1) + ! + USE libtetrabz_common, ONLY : libtetrabz_sort, & + & libtetrabz_tsmall_a1, libtetrabz_tsmall_b1, & + & libtetrabz_tsmall_b2, libtetrabz_tsmall_b3, & + & libtetrabz_tsmall_c1, libtetrabz_tsmall_c2, & + & libtetrabz_tsmall_c3 + IMPLICIT NONE + ! + INTEGER,INTENT(IN) :: nb, ne + COMPLEX(8),INTENT(IN) :: e0(ne) + REAL(8),INTENT(IN) :: ei1(4), ej1(4,nb) + COMPLEX(8),INTENT(OUT) :: w1(ne,nb,4) + ! + INTEGER :: ib, indx(4) + REAL(8) :: de(4), e(4), thr = 1d-8, tsmall(4,4), V + COMPLEX(8) :: w2(ne,4) + ! + DO ib = 1, nb + ! + w1(1:ne,ib,1:4) = 0d0 + e(1:4) = - ej1(1:4, ib) + CALL libtetrabz_sort(4,e,indx) + ! + IF((e(1) <= 0d0 .AND. 0d0 < e(2)) .OR. (e(1) < 0d0 .AND. 0d0 <= e(2))) THEN + ! + CALL libtetrabz_tsmall_a1(e,V,tsmall) + ! + IF(V > thr) THEN + ! + de(1:4) = MATMUL(tsmall(1:4,1:4), ej1(indx(1:4),ib) - ei1(indx(1:4))) + CALL libtetrabz_polcmplx3(ne,e0,de,w2) + w1(1:ne,ib,indx(1:4)) = w1(1:ne,ib, indx(1:4)) & + & + V * MATMUL(w2(1:ne,1:4), tsmall(1:4,1:4)) + ! + END IF + ! + ELSE IF((e(2) <= 0d0 .AND. 0d0 < e(3)) .OR. (e(2) < 0d0 .AND. 0d0 <= e(3))) THEN + ! + CALL libtetrabz_tsmall_b1(e,V,tsmall) + ! + IF(V > thr) THEN + ! + de(1:4) = MATMUL(tsmall(1:4,1:4), ej1(indx(1:4),ib) - ei1(indx(1:4))) + CALL libtetrabz_polcmplx3(ne,e0,de,w2) + w1(1:ne,ib,indx(1:4)) = w1(1:ne,ib, indx(1:4)) & + & + V * MATMUL(w2(1:ne,1:4), tsmall(1:4,1:4)) + ! + END IF + ! + CALL libtetrabz_tsmall_b2(e,V,tsmall) + ! + IF(V > thr) THEN + ! + de(1:4) = MATMUL(tsmall(1:4,1:4), ej1(indx(1:4),ib) - ei1(indx(1:4))) + CALL libtetrabz_polcmplx3(ne,e0,de,w2) + w1(1:ne,ib,indx(1:4)) = w1(1:ne,ib, indx(1:4)) & + & + V * MATMUL(w2(1:ne,1:4), tsmall(1:4,1:4)) + ! + END IF + ! + CALL libtetrabz_tsmall_b3(e,V,tsmall) + ! + IF(V > thr) THEN + ! + de(1:4) = MATMUL(tsmall(1:4,1:4), ej1(indx(1:4),ib) - ei1(indx(1:4))) + CALL libtetrabz_polcmplx3(ne,e0,de,w2) + w1(1:ne,ib,indx(1:4)) = w1(1:ne,ib, indx(1:4)) & + & + V * MATMUL(w2(1:ne,1:4), tsmall(1:4,1:4)) + ! + END IF + ! + ELSE IF((e(3) <= 0d0 .AND. 0d0 < e(4)) .OR. (e(3) < 0d0 .AND. 0d0 <= e(4))) THEN + ! + CALL libtetrabz_tsmall_c1(e,V,tsmall) + ! + IF(V > thr) THEN + ! + de(1:4) = MATMUL(tsmall(1:4,1:4), ej1(indx(1:4),ib) - ei1(indx(1:4))) + CALL libtetrabz_polcmplx3(ne,e0,de,w2) + w1(1:ne,ib,indx(1:4)) = w1(1:ne,ib, indx(1:4)) & + & + V * MATMUL(w2(1:ne,1:4), tsmall(1:4,1:4)) + ! + END IF + ! + CALL libtetrabz_tsmall_c2(e,V,tsmall) + ! + IF(V > thr) THEN + ! + de(1:4) = MATMUL(tsmall(1:4,1:4), ej1(indx(1:4),ib) - ei1(indx(1:4))) + CALL libtetrabz_polcmplx3(ne,e0,de,w2) + w1(1:ne,ib,indx(1:4)) = w1(1:ne,ib, indx(1:4)) & + & + V * MATMUL(w2(1:ne,1:4), tsmall(1:4,1:4)) + ! + END IF + ! + CALL libtetrabz_tsmall_c3(e,V,tsmall) + ! + IF(V > thr) THEN + ! + de(1:4) = MATMUL(tsmall(1:4,1:4), ej1(indx(1:4),ib) - ei1(indx(1:4))) + CALL libtetrabz_polcmplx3(ne,e0,de,w2) + w1(1:ne,ib,indx(1:4)) = w1(1:ne,ib, indx(1:4)) & + & + V * MATMUL(w2(1:ne,1:4), tsmall(1:4,1:4)) + ! + END IF + ! + ELSE IF(e(4) <= 0d0) THEN + ! + de(1:4) = ej1(1:4,ib) - ei1(1:4) + CALL libtetrabz_polcmplx3(ne,e0,de,w2) + w1(1:ne,ib,1:4) = w1(1:ne,ib,1:4) + w2(1:ne,1:4) + ! + END IF + ! + END DO + ! +END SUBROUTINE libtetrabz_polcmplx2 +! +! Tetarahedra method for delta(om - ep + e) +! +SUBROUTINE libtetrabz_polcmplx3(ne,e0,de,w1) + ! + USE libtetrabz_common, ONLY : libtetrabz_sort + IMPLICIT NONE + ! + INTEGER,INTENT(IN) :: ne + COMPLEX(8),INTENT(IN) :: e0(ne) + REAL(8),INTENT(IN) :: de(4) + COMPLEX(8),INTENT(OUT) :: w1(ne,4) + ! + INTEGER :: ie, indx(4) + REAL(8) :: e(4), thr, w2(2,4), x(4) + ! + e(1:4) = de(1:4) + CALL libtetrabz_sort(4,e,indx) + ! + DO ie = 1, ne + ! + ! I don't know which one is better. + ! The former is more stable. + ! The latter is more accurate ? + ! + w1(ie,1:4) = 0.25d0 / (de(1:4) + e0(ie)) + ! + CYCLE + ! + x(1:4) = (e(1:4) + DBLE(e0(ie))) / AIMAG(e0(ie)) + !thr = maxval(de(1:4)) * 1d-3 + thr = max(1d-3, MAXVAL(x(1:4)) * 1d-2) + ! + IF(ABS(x(4) - x(3)) < thr) THEN + IF(ABS(x(4) - x(2)) < thr) THEN + IF(ABS(x(4) - x(1)) < thr) THEN + ! + ! e(4) = e(3) = e(2) = e(1) + ! + w2(1,4) = 0.25d0 * x(4) / ((1d0 + x(4)**2)) + w2(2,4) = 0.25d0 / ((1d0 + x(4)**2)) + w2(1:2,3) = w2(1:2,4) + w2(1:2,2) = w2(1:2,4) + w2(1:2,1) = w2(1:2,4) + ! + ELSE + ! + ! e(4) = e(3) = e(2) + ! + w2(1:2,4) = libtetrabz_polcmplx_1211(x(4),x(1)) + w2(1:2,3) = w2(1:2,4) + w2(1:2,2) = w2(1:2,4) + w2(1:2,1) = libtetrabz_polcmplx_1222(x(1),x(4)) + ! + !IF(ANY(w2(1:2,1:4) < 0d0)) THEN + ! WRITE(*,*) ie + ! WRITE(*,'(100e15.5)') x(1:4) + ! WRITE(*,'(2e15.5)') w2(1:2,1:4) + ! STOP "weighting 4=3=2" + !END IF + ! + END IF + ELSE IF(ABS(x(2) - x(1)) < thr ) THEN + ! + ! e(4) = e(3), e(2) = e(1) + ! + w2(1:2,4) = libtetrabz_polcmplx_1221(x(4),x(2)) + w2(1:2,3) = w2(1:2,4) + w2(1:2,2) = libtetrabz_polcmplx_1221(x(2),x(4)) + w2(1:2,1) = w2(1:2,2) + ! + !IF(ANY(w2(1:2,1:4) < 0d0)) THEN + ! WRITE(*,*) ie + ! WRITE(*,'(100e15.5)') x(1:4) + ! WRITE(*,'(2e15.5)') w2(1:2,1:4) + ! STOP "weighting 4=3 2=1" + !END IF + ! + ELSE + ! + ! e(4) = e(3) + ! + w2(1:2,4) = libtetrabz_polcmplx_1231(x(4),x(1),x(2)) + w2(1:2,3) = w2(1:2,4) + w2(1:2,2) = libtetrabz_polcmplx_1233(x(2),x(1),x(4)) + w2(1:2,1) = libtetrabz_polcmplx_1233(x(1),x(2),x(4)) + ! + !IF(ANY(w2(1:2,1:4) < 0d0)) THEN + ! WRITE(*,*) ie + ! WRITE(*,'(100e15.5)') x(1:4) + ! WRITE(*,'(2e15.5)') w2(1:2,1:4) + ! STOP "weighting 4=3" + !END IF + ! + END IF + ELSE IF(ABS(x(3) - x(2)) < thr) THEN + IF(ABS(x(3) - x(1)) < thr) THEN + ! + ! e(3) = e(2) = e(1) + ! + w2(1:2,4) = libtetrabz_polcmplx_1222(x(4),x(3)) + w2(1:2,3) = libtetrabz_polcmplx_1211(x(3),x(4)) + w2(1:2,2) = w2(1:2,3) + w2(1:2,1) = w2(1:2,3) + ! + !IF(ANY(w2(1:2,1:4) < 0d0)) THEN + ! WRITE(*,*) ie + ! WRITE(*,'(100e15.5)') x(1:4) + ! WRITE(*,'(2e15.5)') w2(1:2,1:4) + ! STOP "weighting 3=2=1" + !END IF + ! + ELSE + ! + ! e(3) = e(2) + ! + w2(1:2,4) = libtetrabz_polcmplx_1233(x(4),x(1),x(3)) + w2(1:2,3) = libtetrabz_polcmplx_1231(x(3),x(1),x(4)) + w2(1:2,2) = w2(1:2,3) + w2(1:2,1) = libtetrabz_polcmplx_1233(x(1),x(4),x(3)) + ! + !IF(ANY(w2(1:2,1:4) < 0d0)) THEN + ! WRITE(*,*) ie + ! WRITE(*,'(100e15.5)') x(1:4) + ! WRITE(*,'(2e15.5)') w2(1:2,1:4) + ! STOP "weighting 3=2" + !END IF + ! + END IF + ELSE IF(ABS(x(2) - x(1)) < thr) THEN + ! + ! e(2) = e(1) + ! + w2(1:2,4) = libtetrabz_polcmplx_1233(x(4),x(3),x(2)) + w2(1:2,3) = libtetrabz_polcmplx_1233(x(3),x(4),x(2)) + w2(1:2,2) = libtetrabz_polcmplx_1231(x(2),x(3),x(4)) + w2(1:2,1) = w2(1:2,2) + ! + !IF(ANY(w2(1:2,1:4) < 0d0)) THEN + ! WRITE(*,*) ie + ! WRITE(*,'(100e15.5)') x(1:4) + ! WRITE(*,'(2e15.5)') w2(1:2,1:4) + ! STOP "weighting 2=1" + !END IF + ! + ELSE + ! + ! Different each other. + ! + w2(1:2,4) = libtetrabz_polcmplx_1234(x(4),x(1),x(2),x(3)) + w2(1:2,3) = libtetrabz_polcmplx_1234(x(3),x(1),x(2),x(4)) + w2(1:2,2) = libtetrabz_polcmplx_1234(x(2),x(1),x(3),x(4)) + w2(1:2,1) = libtetrabz_polcmplx_1234(x(1),x(2),x(3),x(4)) + ! + !IF(ANY(w2(1:2,1:4) < 0d0)) THEN + ! WRITE(*,*) ie + ! WRITE(*,'(100e15.5)') x(1:4) + ! WRITE(*,'(2e15.5)') w2(1:2,1:4) + ! STOP "weighting" + !END IF + ! + END IF + ! + w1(ie,indx(1:4)) = CMPLX(w2(1,1:4) / AIMAG(e0(ie)), & + & w2(2,1:4) / (- AIMAG(e0(ie))), KIND(0d0)) + ! + END DO ! ie + ! +END SUBROUTINE libtetrabz_polcmplx3 +! +! Results of Integration (1-x-y-z)/(g0+(g1-g0)x+(g2-g0)y+(g3-g0)) +! for 0 thr) THEN + ! + ei2(1:4 ) = MATMUL(tsmall(1:4,1:4), ei1(indx(1:4), ib)) + ej2(1:4,1:nb) = MATMUL(tsmall(1:4,1:4), ej1(indx(1:4),1:nb)) + CALL libtetrabz_polstat2(nb,ei2,ej2,w2) + w1(1:nb,indx(1:4)) = w1(1:nb, indx(1:4)) & + & + V * MATMUL(w2(1:nb,1:4), tsmall(1:4,1:4)) + ! + END IF + ! + ELSE IF(e(2) <= 0d0 .AND. 0d0 < e(3)) THEN + ! + CALL libtetrabz_tsmall_b1(e,V,tsmall) + ! + IF(V > thr) THEN + ! + ei2(1:4 ) = MATMUL(tsmall(1:4,1:4), ei1(indx(1:4), ib)) + ej2(1:4,1:nb) = MATMUL(tsmall(1:4,1:4), ej1(indx(1:4),1:nb)) + CALL libtetrabz_polstat2(nb,ei2,ej2,w2) + w1(1:nb,indx(1:4)) = w1(1:nb, indx(1:4)) & + & + V * MATMUL(w2(1:nb,1:4), tsmall(1:4,1:4)) + ! + END IF + ! + CALL libtetrabz_tsmall_b2(e,V,tsmall) + ! + IF(V > thr) THEN + ! + ei2(1:4 ) = MATMUL(tsmall(1:4,1:4), ei1(indx(1:4), ib)) + ej2(1:4,1:nb) = MATMUL(tsmall(1:4,1:4), ej1(indx(1:4),1:nb)) + CALL libtetrabz_polstat2(nb,ei2,ej2,w2) + w1(1:nb,indx(1:4)) = w1(1:nb, indx(1:4)) & + & + V * MATMUL(w2(1:nb,1:4), tsmall(1:4,1:4)) + ! + END IF + ! + CALL libtetrabz_tsmall_b3(e,V,tsmall) + ! + IF(V > thr) THEN + ! + ei2(1:4 ) = MATMUL(tsmall(1:4,1:4), ei1(indx(1:4), ib)) + ej2(1:4,1:nb) = MATMUL(tsmall(1:4,1:4), ej1(indx(1:4),1:nb)) + CALL libtetrabz_polstat2(nb,ei2,ej2,w2) + w1(1:nb,indx(1:4)) = w1(1:nb, indx(1:4)) & + & + V * MATMUL(w2(1:nb,1:4), tsmall(1:4,1:4)) + ! + END IF + ! + ELSE IF(e(3) <= 0d0 .AND. 0d0 < e(4)) THEN + ! + CALL libtetrabz_tsmall_c1(e,V,tsmall) + ! + IF(V > thr) THEN + ! + ei2(1:4 ) = MATMUL(tsmall(1:4,1:4), ei1(indx(1:4), ib)) + ej2(1:4,1:nb) = MATMUL(tsmall(1:4,1:4), ej1(indx(1:4),1:nb)) + CALL libtetrabz_polstat2(nb,ei2,ej2,w2) + w1(1:nb,indx(1:4)) = w1(1:nb, indx(1:4)) & + & + V * MATMUL(w2(1:nb,1:4), tsmall(1:4,1:4)) + ! + END IF + ! + CALL libtetrabz_tsmall_c2(e,V,tsmall) + ! + IF(V > thr) THEN + ! + ei2(1:4 ) = MATMUL(tsmall(1:4,1:4), ei1(indx(1:4), ib)) + ej2(1:4,1:nb) = MATMUL(tsmall(1:4,1:4), ej1(indx(1:4),1:nb)) + CALL libtetrabz_polstat2(nb,ei2,ej2,w2) + w1(1:nb,indx(1:4)) = w1(1:nb, indx(1:4)) & + & + V * MATMUL(w2(1:nb,1:4), tsmall(1:4,1:4)) + ! + END IF + ! + CALL libtetrabz_tsmall_c3(e,V,tsmall) + ! + IF(V > thr) THEN + ! + ei2(1:4 ) = MATMUL(tsmall(1:4,1:4), ei1(indx(1:4), ib)) + ej2(1:4,1:nb) = MATMUL(tsmall(1:4,1:4), ej1(indx(1:4),1:nb)) + CALL libtetrabz_polstat2(nb,ei2,ej2,w2) + w1(1:nb,indx(1:4)) = w1(1:nb, indx(1:4)) & + & + V * MATMUL(w2(1:nb,1:4), tsmall(1:4,1:4)) + ! + END IF + ! + ELSE IF(e(4) <= 0d0) THEN + ! + ei2(1:4 ) = ei1(1:4, ib) + ej2(1:4,1:nb) = ej1(1:4,1:nb) + CALL libtetrabz_polstat2(nb,ei2,ej2,w2) + w1(1:nb,1:4) = w1(1:nb,1:4) + w2(1:nb,1:4) + ! + ELSE + ! + CYCLE + ! + END IF + ! + polstat(1:nb,ib,ik_local(1:20,it)) = polstat(1:nb,ib, ik_local(1:20,it)) & + & + MATMUL(w1(1:nb,1:4), wlsm(1:4,1:20)) + ! + END DO ! ib + !$OMP END DO NOWAIT + ! + END DO ! it + ! + !$OMP END PARALLEL + ! + polstat(1:nb,1:nb,1:nk_local) = polstat(1:nb,1:nb,1:nk_local) / DBLE(6 * nkBZ) + ! +END SUBROUTINE libtetrabz_polstat_main +! +! Tetrahedra method for theta( - E2) +! +SUBROUTINE libtetrabz_polstat2(nb,ei1,ej1,w1) + ! + USE libtetrabz_common, ONLY : libtetrabz_sort, & + & libtetrabz_tsmall_a1, libtetrabz_tsmall_b1, & + & libtetrabz_tsmall_b2, libtetrabz_tsmall_b3, & + & libtetrabz_tsmall_c1, libtetrabz_tsmall_c2, & + & libtetrabz_tsmall_c3 + IMPLICIT NONE + ! + INTEGER,INTENT(IN) :: nb + REAL(8),INTENT(IN) :: ei1(4), ej1(4,nb) + REAL(8),INTENT(INOUT) :: w1(nb,4) + ! + INTEGER :: ib, indx(4) + REAL(8) :: de(4), e(4), thr = 1d-8, tsmall(4,4), V, w2(4) + ! + DO ib = 1, nb + ! + w1(ib,1:4) = 0d0 + e(1:4) = - ej1(1:4, ib) + CALL libtetrabz_sort(4,e,indx) + ! + IF((e(1) <= 0d0 .AND. 0d0 < e(2)) .OR. (e(1) < 0d0 .AND. 0d0 <= e(2))) THEN + ! + CALL libtetrabz_tsmall_a1(e,V,tsmall) + ! + IF(V > thr) THEN + ! + de(1:4) = MATMUL(tsmall(1:4,1:4), ej1(indx(1:4),ib) - ei1(indx(1:4))) + CALL libtetrabz_polstat3(de,w2) + w1(ib,indx(1:4)) = w1(ib, indx(1:4)) & + & + V * MATMUL(w2(1:4), tsmall(1:4,1:4)) + ! + END IF + ! + ELSE IF((e(2) <= 0d0 .AND. 0d0 < e(3)) .OR. (e(2) < 0d0 .AND. 0d0 <= e(3))) THEN + ! + CALL libtetrabz_tsmall_b1(e,V,tsmall) + ! + IF(V > thr) THEN + ! + de(1:4) = MATMUL(tsmall(1:4,1:4), ej1(indx(1:4),ib) - ei1(indx(1:4))) + CALL libtetrabz_polstat3(de,w2) + w1(ib,indx(1:4)) = w1(ib,indx(1:4)) & + & + V * MATMUL(w2( 1:4 ), tsmall(1:4,1:4)) + ! + END IF + ! + CALL libtetrabz_tsmall_b2(e,V,tsmall) + ! + IF(V > thr) THEN + ! + de(1:4) = MATMUL(tsmall(1:4,1:4), ej1(indx(1:4),ib) - ei1(indx(1:4))) + CALL libtetrabz_polstat3(de,w2) + w1(ib,indx(1:4)) = w1(ib, indx(1:4)) & + & + V * MATMUL(w2(1:4), tsmall(1:4,1:4)) + ! + END IF + ! + CALL libtetrabz_tsmall_b3(e,V,tsmall) + ! + IF(V > thr) THEN + ! + de(1:4) = MATMUL(tsmall(1:4,1:4), ej1(indx(1:4),ib) - ei1(indx(1:4))) + CALL libtetrabz_polstat3(de,w2) + w1(ib,indx(1:4)) = w1(ib, indx(1:4)) & + & + V * MATMUL(w2(1:4), tsmall(1:4,1:4)) + ! + END IF + ! + ELSE IF((e(3) <= 0d0 .AND. 0d0 < e(4)) .OR. (e(3) < 0d0 .AND. 0d0 <= e(4))) THEN + ! + CALL libtetrabz_tsmall_c1(e,V,tsmall) + ! + IF(V > thr) THEN + ! + de(1:4) = MATMUL(tsmall(1:4,1:4), ej1(indx(1:4),ib) - ei1(indx(1:4))) + CALL libtetrabz_polstat3(de,w2) + w1(ib,indx(1:4)) = w1(ib, indx(1:4)) & + & + V * MATMUL(w2(1:4), tsmall(1:4,1:4)) + ! + END IF + ! + CALL libtetrabz_tsmall_c2(e,V,tsmall) + ! + IF(V > thr) THEN + ! + de(1:4) = MATMUL(tsmall(1:4,1:4), ej1(indx(1:4),ib) - ei1(indx(1:4))) + CALL libtetrabz_polstat3(de,w2) + w1(ib,indx(1:4)) = w1(ib, indx(1:4)) & + & + V * MATMUL(w2(1:4), tsmall(1:4,1:4)) + ! + END IF + ! + CALL libtetrabz_tsmall_c3(e,V,tsmall) + ! + IF(V > thr) THEN + ! + de(1:4) = MATMUL(tsmall(1:4,1:4), ej1(indx(1:4),ib) - ei1(indx(1:4))) + CALL libtetrabz_polstat3(de,w2) + w1(ib,indx(1:4)) = w1(ib, indx(1:4)) & + & + V * MATMUL(w2(1:4), tsmall(1:4,1:4)) + ! + END IF + ! + ELSE IF( e(4) <= 0d0 ) THEN + ! + de(1:4) = ej1(1:4,ib) - ei1(1:4) + CALL libtetrabz_polstat3(de,w2) + w1(ib,1:4) = w1(ib,1:4) + w2(1:4) + ! + END IF + ! + END DO ! ib = 1, nb + ! +END SUBROUTINE libtetrabz_polstat2 +! +! Tetarahedra method for delta(om - ep + e) +! +SUBROUTINE libtetrabz_polstat3(de,w1) + ! + USE libtetrabz_common, ONLY : libtetrabz_sort + IMPLICIT NONE + ! + REAL(8),INTENT(IN) :: de(4) + REAL(8),INTENT(INOUT) :: w1(4) + ! + INTEGER :: ii, indx(4) + REAL(8) :: e(4), ln(4), thr, thr2 + ! + e(1:4) = de(1:4) + CALL libtetrabz_sort(4,e,indx) + ! + thr = MAXVAL(e(1:4)) * 1d-3 + thr2 = 1d-8 + ! + DO ii = 1, 4 + IF(e(ii) < thr2) THEN + IF(ii == 3) THEN + STOP " Nesting ! " + END IF + ln(ii) = 0d0 + e(ii) = 0d0 + ELSE + ln(ii) = LOG(e(ii)) + END IF + END DO + ! + IF(ABS(e(4) - e(3)) < thr ) THEN + IF(ABS(e(4) - e(2)) < thr ) THEN + IF(ABS(e(4) - e(1)) < thr ) THEN + ! + ! e(4) = e(3) = e(2) = e(1) + ! + w1(indx(4)) = 0.25d0 / e(4) + w1(indx(3)) = w1(indx(4)) + w1(indx(2)) = w1(indx(4)) + w1(indx(1)) = w1(indx(4)) + ! + ELSE + ! + ! e(4) = e(3) = e(2) + ! + w1(indx(4)) = libtetrabz_polstat_1211(e(4),e(1),ln(4),ln(1)) + w1(indx(3)) = w1(indx(4)) + w1(indx(2)) = w1(indx(4)) + w1(indx(1)) = libtetrabz_polstat_1222(e(1),e(4),ln(1),ln(4)) + ! + IF(ANY(w1(1:4) < 0d0)) THEN + WRITE(std_out,'(100e15.5)') e(1:4) + WRITE(std_out,'(100e15.5)') w1(indx(1:4)) + ABI_ERROR("weighting 4=3=2") + END IF + ! + END IF + ELSE IF(ABS(e(2) - e(1)) < thr) THEN + ! + ! e(4) = e(3), e(2) = e(1) + ! + w1(indx(4)) = libtetrabz_polstat_1221(e(4),e(2), ln(4),ln(2)) + w1(indx(3)) = w1(indx(4)) + w1(indx(2)) = libtetrabz_polstat_1221(e(2),e(4), ln(2),ln(4)) + w1(indx(1)) = w1(indx(2)) + ! + IF(ANY(w1(1:4) < 0d0)) THEN + WRITE(std_out,'(100e15.5)') e(1:4) + WRITE(std_out,'(100e15.5)') w1(indx(1:4)) + ABI_ERROR("weighting 4=3 2=1") + END IF + ! + ELSE + ! + ! e(4) = e(3) + ! + w1(indx(4)) = libtetrabz_polstat_1231(e(4),e(1),e(2),ln(4),ln(1),ln(2)) + w1(indx(3)) = w1(indx(4)) + w1(indx(2)) = libtetrabz_polstat_1233(e(2),e(1),e(4),ln(2),ln(1),ln(4)) + w1(indx(1)) = libtetrabz_polstat_1233(e(1),e(2),e(4),ln(1),ln(2),ln(4)) + ! + IF(ANY(w1(1:4) < 0d0)) THEN + WRITE(std_out,'(100e15.5)') e(1:4) + WRITE(std_out,'(100e15.5)') w1(indx(1:4)) + ABI_ERROR("weighting 4=3") + END IF + ! + END IF + ELSE IF(ABS(e(3) - e(2)) < thr) THEN + IF(ABS(e(3) - e(1)) < thr) THEN + ! + ! e(3) = e(2) = e(1) + ! + w1(indx(4)) = libtetrabz_polstat_1222(e(4),e(3), ln(4),ln(3)) + w1(indx(3)) = libtetrabz_polstat_1211(e(3),e(4), ln(3),ln(4)) + w1(indx(2)) = w1(indx(3)) + w1(indx(1)) = w1(indx(3)) + ! + IF(ANY(w1(1:4) < 0d0)) THEN + WRITE(std_out,'(100e15.5)') e(1:4) + WRITE(std_out,'(100e15.5)') w1(indx(1:4)) + ABI_ERROR("weighting 3=2=1") + END IF + ! + ELSE + ! + ! e(3) = e(2) + ! + w1(indx(4)) = libtetrabz_polstat_1233(e(4),e(1),e(3),ln(4),ln(1),ln(3)) + w1(indx(3)) = libtetrabz_polstat_1231(e(3),e(1),e(4),ln(3),ln(1),ln(4)) + w1(indx(2)) = w1(indx(3)) + w1(indx(1)) = libtetrabz_polstat_1233(e(1),e(4),e(3),ln(1),ln(4),ln(3)) + ! + IF(ANY(w1(1:4) < 0d0)) THEN + WRITE(std_out,'(100e15.5)') e(1:4) + WRITE(std_out,'(100e15.5)') w1(indx(1:4)) + ABI_ERROR("weighting 3=2") + END IF + ! + END IF + ELSE IF(ABS(e(2) - e(1)) < thr) THEN + ! + ! e(2) = e(1) + ! + w1(indx(4)) = libtetrabz_polstat_1233(e(4),e(3),e(2),ln(4),ln(3),ln(2)) + w1(indx(3)) = libtetrabz_polstat_1233(e(3),e(4),e(2),ln(3),ln(4),ln(2)) + w1(indx(2)) = libtetrabz_polstat_1231(e(2),e(3),e(4),ln(2),ln(3),ln(4)) + w1(indx(1)) = w1(indx(2)) + ! + IF(ANY(w1(1:4) < 0d0)) THEN + WRITE(std_out,'(100e15.5)') e(1:4) + WRITE(std_out,'(100e15.5)') w1(indx(1:4)) + ABI_ERROR("weighting 2=1") + END IF + ! + ELSE + ! + ! Different each other. + ! + w1(indx(4)) = libtetrabz_polstat_1234(e(4),e(1),e(2),e(3),ln(4),ln(1),ln(2),ln(3)) + w1(indx(3)) = libtetrabz_polstat_1234(e(3),e(1),e(2),e(4),ln(3),ln(1),ln(2),ln(4)) + w1(indx(2)) = libtetrabz_polstat_1234(e(2),e(1),e(3),e(4),ln(2),ln(1),ln(3),ln(4)) + w1(indx(1)) = libtetrabz_polstat_1234(e(1),e(2),e(3),e(4),ln(1),ln(2),ln(3),ln(4)) + ! + IF(ANY(w1(1:4) < 0d0)) THEN + WRITE(std_out,'(100e15.5)') e(1:4) + WRITE(std_out,'(100e15.5)') w1(indx(1:4)) + ABI_ERROR("weighting") + END IF + ! + END IF + ! +END SUBROUTINE libtetrabz_polstat3 +! +! Results of Integration (1-x-y-z)/(g0+(g1-g0)x+(g2-g0)y+(g3-g0)) +! for 0 krank_get_index + ! Return the index of the k-point `kpt` in the initial set. -1 if not found. + + procedure :: copy => krank_copy + ! Deep copy of the object + + procedure :: free => krank_free + ! Free memory + + procedure :: print => krank_print + ! Prints the arrays and dimensions of a krank_t structure + + procedure :: get_mapping => krank_get_mapping + ! Use symmetries to map input kptn2 to the list of k-points used to generate krank_t. + ! Similar to listkk but, unlike listkk, this algo does not try to minimize the distance. + ! Must faster than listkk for dense meshes + + end type krank_t + + public :: krank_from_kptrlatt ! Initialize object from kptrlatt + public :: krank_new ! Sets up the kpt ranks for comparing kpts + + public :: get_ibz2bz ! Return array with the index of the IBZ wave vectors in the BZ. + public :: star_from_ibz_idx ! Return array with the indices of the star of the ik_ibz wavevector in the IBZ. +!!*** + +contains + + +!!****f* m_krank/krank_from_kptrlatt +!! NAME +!! krank_from_kptrlatt +!! +!! FUNCTION +!! This routine sets up the kpt ranks for comparing kpts +!! +!! INPUTS +!! npt = number of kpoints (eventually irreducible) +!! kpt = coordinates of kpoints +!! +!! OUTPUT +!! krank = object containing ranking and inverse ranking +!! +!! NOTES +!! By default, the object holds a reference to kpts so do not change/deallocate this array +!! while using krank. +!! +!! SOURCE + +type(krank_t) function krank_from_kptrlatt(nkpt, kpts, kptrlatt, compute_invrank) result(new) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: nkpt + logical,optional,intent(in) :: compute_invrank +!arrays + integer,intent(in) :: kptrlatt(3,3) + real(dp),target,intent(in) :: kpts(3,nkpt) + +!Local variables ------------------------- +!scalars + integer :: ii, jj, max_linear_density + logical :: compute_invrank_ + +! ********************************************************************* + + do jj=1,3 + do ii=1,3 + if (ii == jj .and. kptrlatt(ii, ii) == 0) then + ABI_ERROR("kptrlatt with zero matrix element on the diagonal!") + end if + if (ii /= jj .and. kptrlatt(ii, jj) /= 0) then + ABI_ERROR("kptrlatt with non-zero off-diagonal matrix elements is not supported") + end if + end do + end do + + compute_invrank_ = .True.; if (present(compute_invrank)) compute_invrank_ = compute_invrank + + max_linear_density = maxval([kptrlatt(1,1), kptrlatt(2,2), kptrlatt(3,3)]) + new = krank_new(nkpt, kpts, max_linear_density=max_linear_density, compute_invrank=compute_invrank_) + +end function krank_from_kptrlatt +!!*** + +!!****f* m_krank/krank_new +!! NAME +!! krank_new +!! +!! FUNCTION +!! This routine sets up the kpt ranks for comparing kpts +!! +!! INPUTS +!! npt = number of kpoints (eventually irreducible) +!! kpt = coordinates of kpoints +!! time_reversal = true or false to use time reversal symmetry. +!! Default is true, but only important if nsym and symrec are present +!! +!! SOURCE + +type(krank_t) function krank_new(nkpt, kpts, nsym, symrec, time_reversal, max_linear_density, compute_invrank) result(new) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: nkpt + integer,intent(in), optional :: nsym + logical,intent(in), optional :: time_reversal + integer,optional,intent(in) :: max_linear_density + logical,optional,intent(in) :: compute_invrank +!arrays + real(dp),target,intent(in) :: kpts(3,nkpt) + integer,intent(in), optional :: symrec(3,3, *) + +!Local variables ------------------------- +!scalars + integer :: ikpt, isym, symkptrank, irank, timrev, itim + logical :: compute_invrank_ + real(dp) :: smallestlen + character(len=500) :: msg +!arrays + real(dp) :: symkpt(3) + +! ********************************************************************* + + compute_invrank_ = .True.; if (present(compute_invrank)) compute_invrank_ = compute_invrank + + new%kpts => kpts + new%kpts_owns_memory = .False. + + if (.not. present(max_linear_density)) then + ! Find smallest linear length from input kpts + smallestlen = one + do ikpt=1, nkpt + if (abs(kpts(1,ikpt)) > tol10) smallestlen = min(smallestlen, abs(kpts(1,ikpt))) + if (abs(kpts(2,ikpt)) > tol10) smallestlen = min(smallestlen, abs(kpts(2,ikpt))) + if (abs(kpts(3,ikpt)) > tol10) smallestlen = min(smallestlen, abs(kpts(3,ikpt))) + end do + new%max_linear_density = nint(one/smallestlen) + else + ! Get it from input + new%max_linear_density = max_linear_density + end if + + new%npoints = nkpt + new%min_rank = nint(real(new%max_linear_density)*(half+tol8 +& + real(new%max_linear_density)*(half+tol8 +& + real(new%max_linear_density)*(half+tol8)))) + + new%max_rank = nint(real(new%max_linear_density)*(1+half+tol8 +& + real(new%max_linear_density)*(1+half+tol8 +& + real(new%max_linear_density)*(1+half+tol8)))) + + timrev = 2 + new%time_reversal = .true. + if (present(time_reversal)) then + if (.not. time_reversal) timrev = 1 + new%time_reversal = .false. + end if + + ! Ensure kpt(i)+one is positive, and the smallest difference between kpts should be larger than 1/100 ie ngkpt < 100. + ! the following fills invrank for the k-points in the list provided (may be only the irred kpts) + if (compute_invrank_) then + ABI_MALLOC(new%invrank, (new%min_rank:new%max_rank)) + new%invrank(:) = -1 + + do ikpt=1,nkpt + irank = new%get_rank(kpts(:,ikpt)) + + if (irank > new%max_rank .or. irank < new%min_rank) then + write(msg,'(a,2i0)')" rank above max_rank or below min_rank, ikpt, rank ", ikpt, irank + ABI_ERROR(msg) + end if + new%invrank(irank) = ikpt + end do + end if + + ! if symrec is provided, fill invrank with appropriate irred kpt indices + ! for symmetry completion: kptrank_t%invrank points to the irred k-point + ! equivalent to the k-point whose rank is provided + if (present(symrec)) then + if(.not. present(nsym)) then + ABI_ERROR("need both symrec and nsym arguments together") + end if + do ikpt=1,nkpt + ! itim == 1 for positive, and itim==2 gives Kramers opposite of k-point + ! favor the former by looping it last + do itim = timrev, 1, -1 + do isym = 1, nsym + symkpt = (-1)**(itim+1) * matmul(symrec(:,:,isym), kpts(:, ikpt)) + symkptrank = new%get_rank(symkpt(:)) + new%invrank(symkptrank) = ikpt + end do + end do + end do + end if + +end function krank_new +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_krank/get_rank +!! NAME +!! get_rank +!! +!! FUNCTION +!! This routine calculates the rank for one kpt +!! +!! INPUTS +!! kpt = coordinates of kpoints +!! krank = rank object for the k-grid we are using +!! +!! OUTPUT +!! rank = rank of the kpoint +!! +!! SOURCE + +integer function get_rank(krank, kpt) result(rank) + +!Arguments ------------------------------------ +!scalars + class(krank_t), intent(in) :: krank +!arrays + real(dp),intent(in) :: kpt(3) + +!Local variables------------------------------- +!scalars + character(len=500) :: msg +!arrays + real(dp) :: redkpt(3) + +! ************************************************************************* + + ! wrap to [0, 1[ -> replaced call to wrap2_zero2one inline, to encapsulate this module + if (kpt(1)>zero) then + redkpt(1)=mod((kpt(1)+tol12),one)-tol12 + else + redkpt(1)=-mod(-(kpt(1)-one+tol12),one)+one-tol12 + end if + if(abs(redkpt(1))zero) then + redkpt(2)=mod((kpt(2)+tol12),one)-tol12 + else + redkpt(2)=-mod(-(kpt(2)-one+tol12),one)+one-tol12 + end if + if(abs(redkpt(2))zero) then + redkpt(3)=mod((kpt(3)+tol12),one)-tol12 + else + redkpt(3)=-mod(-(kpt(3)-one+tol12),one)+one-tol12 + end if + if(abs(redkpt(3)) krank%max_rank) then + write(msg,'(2(a,i0))') ' Rank should be <= max_rank: ', krank%max_rank, ' but got: ', rank + ABI_ERROR(msg) + end if + if (rank < krank%min_rank) then + !print *, "redkpt", redkpt + write(msg,'(2(a,i0))') ' Rank should be >= min_rank ', krank%min_rank, ' but got: ', rank + ABI_ERROR(msg) + end if + +end function get_rank +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_krank/krank_get_index +!! NAME +!! krank_get_index +!! +!! FUNCTION +!! Return the index of the k-point `kpt` in the initial set. -1 if not found. +!! +!! INPUTS +!! krank = rank object for the k-grid we are using +!! kpt = coordinates of kpoints +!! +!! OUTPUT +!! +!! SOURCE + +integer function krank_get_index(krank, kpt) result(ikpt) + +!Arguments ------------------------------------ +!scalars + class(krank_t), intent(in) :: krank +!arrays + real(dp),intent(in) :: kpt(3) + +!Local variables------------------------------- +!scalars + integer :: kpt_rank + +! ************************************************************************* + + kpt_rank = krank%get_rank(kpt) + ikpt = -1 + if (kpt_rank < krank%max_rank) ikpt = krank%invrank(kpt_rank) + +end function krank_get_index +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_krank/krank_copy +!! +!! NAME +!! krank_copy +!! +!! FUNCTION +!! Deep copy of the object +!! +!! INPUTS +!! +!! OUTPUT +!! krank = object containing ranking and inverse ranking, to be deallocated +!! +!! SOURCE + +type(krank_t) function krank_copy(krank_in) result(krank_out) + +!Arguments ------------------------------------ +!scalars + class(krank_t), intent(in) :: krank_in + +! ********************************************************************* + + krank_out%max_linear_density = krank_in%max_linear_density + krank_out%min_rank = krank_in%min_rank + krank_out%max_rank = krank_in%max_rank + krank_out%npoints = krank_in%npoints + + ABI_MALLOC(krank_out%invrank, (krank_out%min_rank:krank_out%max_rank)) + krank_out%invrank = krank_in%invrank + + ! This is why I call it deep copy! + ABI_MALLOC(krank_out%kpts, (3, size(krank_in%kpts, dim=2))) + krank_out%kpts = krank_in%kpts + krank_out%kpts_owns_memory = .True. + +end function krank_copy +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_krank/krank_free +!! NAME +!! krank_free +!! +!! FUNCTION +!! This routine deallocates the arrays in a krank_t structure +!! +!! INPUTS +!! krank = object containing ranking and inverse ranking, to be deallocated +!! +!! SOURCE + +subroutine krank_free(krank) + +!Arguments ------------------------------------ + class(krank_t), intent(inout) :: krank + +! ********************************************************************* + + ABI_SFREE(krank%invrank) + ABI_SFREE(krank%rank2ikpt_) + ABI_SFREE(krank%rank2symtime_) + + if (krank%kpts_owns_memory) then + ABI_SFREE_PTR(krank%kpts) + krank%kpts_owns_memory = .False. + krank%kpts => null() + else + krank%kpts => null() + end if + +end subroutine krank_free +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_krank/krank_print +!! +!! NAME +!! krank_print +!! +!! FUNCTION +!! This routine prints the arrays and dimensions of a krank_t structure +!! +!! INPUTS +!! krank = object containing ranking and inverse ranking +!! unout = unit for open file to print to +!! +!! SOURCE + +subroutine krank_print(krank, unout) + +!Arguments ------------------------------------ +!scalars + integer, intent(in) :: unout +!arrays + class(krank_t), intent(in) :: krank + +! ********************************************************************* + + write(unout, *) + write(unout, '(a)') ' Dump of the contents of a krank_t structure with k-point rank information' + write(unout, '(a,i0)') ' max linear density of points in 3 directions: max_linear_density = ', krank%max_linear_density + write(unout, '(a,i0)') ' maximum rank for any point in grid: max_rank = ', krank%max_rank + write(unout, '(a,i0)') ' number of points in input grid: npoints = ', krank%npoints + write(unout, *) + write(unout, '(a)') ' invrank array = ' + write(unout, '(i0)') krank%invrank(:) + write(unout, *) + +end subroutine krank_print +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_krank/krank_get_mapping +!! NAME +!! krank_get_mapping +!! +!! FUNCTION +!! Use symmetries to map input kptn2 to the list of k-points used to generate krank_t. +!! Similar to listkk but, unlike listkk, this algo does not try to minimize the distance +!! Mainly used to map two set of k-points associated to the same grid (e.g. BZ --> IBZ, IBZ(q) --> IBZ etc. +!! Must faster than listkk for dense meshes +!! although this routine requires the allocation of temporary array of shape (2, self%min_rank:self%max_rank) +!! Returns indirect indexing list indkk. +!! +!! INPUTS +!! kptns2(3,nkpt2)=list of final k points +!! nkpt2=number of final k points +!! gmet(3,3)=reciprocal space metric (bohr^-2) +!! nsym=number of symmetry elements +!! symafm(nsym)=(anti)ferromagnetic part of symmetry operations +!! symmat(3,3,nsym)=symmetry operations (symrel or symrec, depending on value of use_symrec) +!! timrev=1 if the use of time-reversal is allowed; 0 otherwise +!! [use_symrec]: if present and true, symmat assumed to be symrec, otherwise assumed to be symrel (default) +!! [qpt]: q-point to be added to kptns2. 0 if not specified. +!! +!! OUTPUT +!! dksqmax=maximal value of the norm**2 of the difference between +!! a kpt2 vector and the closest k-point found from the kptns1 set, using symmetries. +!! indkk(6, nkpt2)= +!! indkk(:,1)=k point index of kptns1 +!! indkk(:,2)=symmetry operation to be applied to kpt1, to give kpt1a +!! indkk(:,3:5)=shift in reciprocal space to be given to kpt1a, +!! to give kpt1b, that is the closest to kpt2. +!! indkk(:,6)=1 if time-reversal was used to generate kpt1a from kpt1, 0 otherwise +!! +!! SOURCE + +subroutine krank_get_mapping(self, nkpt2, kptns2, dksqmax, gmet, indkk, nsym, symafm, symmat, timrev, & + use_symrec, qpt) ! optional + +!Arguments ------------------------------------ +!scalars + class(krank_t),intent(inout) :: self + integer,intent(in) :: nkpt2, nsym, timrev + real(dp),intent(out) :: dksqmax + logical,optional,intent(in) :: use_symrec +!arrays + integer,intent(in) :: symafm(nsym), symmat(3,3,nsym) + integer,intent(out) :: indkk(6, nkpt2) + real(dp),intent(in) :: gmet(3,3), kptns2(3,nkpt2) + real(dp),optional,intent(in) :: qpt(3) + +!Local variables------------------------------- +!scalars + integer :: irank, ikpt1, ikpt2, itimrev, isym, ii + logical :: my_use_symrec +!arrays + integer :: dkint(3), my_symmat(3, 3, nsym) + !integer,allocatable :: rank2ikpt(:), rank2symtime(:) + real(dp) :: kpt1a(3), dk(3), my_qpt(3) + +! ************************************************************************* + + my_use_symrec = .False.; if (present(use_symrec)) my_use_symrec = use_symrec + my_qpt = zero; if (present(qpt)) my_qpt = qpt + + if (my_use_symrec) then + ! Symrec k + my_symmat = symmat + else + ! Symrel^T k + do isym=1,nsym + my_symmat(:,:,isym) = transpose(symmat(:,:,isym)) + end do + end if + + ABI_MALLOC_IFNOT(self%rank2symtime_, (self%min_rank:self%max_rank)) + ABI_MALLOC_IFNOT(self%rank2ikpt_, (self%min_rank:self%max_rank)) + self%rank2ikpt_ = -1 !; self%rank2symtime_ = -1 + + do ikpt1=1,self%npoints + + do itimrev=0,timrev + do isym=1,nsym + ! Do not use magnetic symmetries. + if (symafm(isym) == -1) cycle + + kpt1a = (1 - 2*itimrev) * matmul(my_symmat(:, :, isym), self%kpts(:, ikpt1)) + irank = self%get_rank(kpt1a) + if (self%rank2ikpt_(irank) == -1) then + self%rank2ikpt_(irank) = ikpt1 + self%rank2symtime_(irank) = isym + itimrev * nsym + end if + end do + end do + + end do + + dksqmax = zero + do ikpt2=1,nkpt2 + irank = self%get_rank(kptns2(:, ikpt2) + my_qpt) + ikpt1 = self%rank2ikpt_(irank) + ii = self%rank2symtime_(irank) + isym = 1 + mod(ii - 1, nsym) + itimrev = (ii - 1) / nsym + kpt1a = (1 - 2 * itimrev) * matmul(my_symmat(:, :, isym), self%kpts(:, ikpt1)) + dk(:) = kptns2(:,ikpt2) + my_qpt - kpt1a(:) + dkint(:) = nint(dk(:) + tol12) + + indkk(1, ikpt2) = ikpt1 + indkk(2, ikpt2) = isym + indkk(3:5, ikpt2) = dkint(:) + indkk(6, ikpt2) = itimrev + + ! Compute norm of the difference vector. + dk(:) = dk(:) - dkint(:) + + dksqmax = max(dksqmax, & + gmet(1,1)*dk(1)**2 + gmet(2,2)*dk(2)**2 + gmet(3,3)*dk(3)**2 + & + two * (gmet(2,1)*dk(2)*dk(1) + gmet(3,2)*dk(3)*dk(2)+gmet(3,1)*dk(3)*dk(1))) + + !if (dksqmax > tol8) then + ! print *, "kbase:", self%kpts(:, ikpt1) + ! print *, "k", kptns2(:, ikpt2) + ! print *, "k + q", kptns2(:, ikpt2) + my_qpt + ! print *, "dk", dk, "dksqmax", dksqmax + !end if + end do + + !ABI_FREE(self%rank2ikpt_) + !ABI_FREE(self%rank2symtime_) + +end subroutine krank_get_mapping +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_krank/get_ibz2bz +!! NAME +!! get_ibz2bz +!! +!! FUNCTION +!! Return array with the index of the IBZ wave vectors in the BZ. +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +subroutine get_ibz2bz(nibz, nbz, bz2ibz, ibz2bz, ierr) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: nibz, nbz + integer,intent(in) :: bz2ibz(6, nbz) + integer,intent(out) :: ierr +!arrays + integer,allocatable,intent(out) :: ibz2bz(:) + +!Local variables------------------------------- +!scalars + integer :: iq_bz, iq_ibz, isym_q, trev_q, cnt, g0_q(3) + logical :: isirr_q + +!---------------------------------------------------------------------- + + ABI_MALLOC(ibz2bz, (nibz)) + + cnt = 0 + do iq_bz=1,nbz + iq_ibz = bz2ibz(1, iq_bz); isym_q = bz2ibz(2, iq_bz) + trev_q = bz2ibz(6, iq_bz); g0_q = bz2ibz(3:5,iq_bz) + isirr_q = (isym_q == 1 .and. trev_q == 0 .and. all(g0_q == 0)) + if (isirr_q) then + cnt = cnt + 1 + ibz2bz(iq_ibz) = iq_bz + end if + end do + + ierr = merge(0, 1, cnt == nibz) + +end subroutine get_ibz2bz +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_krank/star_from_ibz_idx +!! NAME +!! star_from_ibz_idx +!! +!! FUNCTION +!! Return array with the indices of the star of the ik_ibz wavevector in the IBZ. +!! Return number of points in the star, allocate array with the indices of the +!! star points in the BZ. +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +subroutine star_from_ibz_idx(ik_ibz, nkbz, bz2ibz, nk_in_star, kstar_bz_inds) + +!Arguments ------------------------------------ + integer,intent(in) :: ik_ibz, nkbz + integer,intent(out) :: nk_in_star + integer,intent(in) :: bz2ibz(6, nkbz) + integer,allocatable,intent(out) :: kstar_bz_inds(:) + +!Local variables------------------------------- +!scalars + integer :: iq_bz + +!---------------------------------------------------------------------- + + nk_in_star = count(bz2ibz(1, :) == ik_ibz) + ABI_MALLOC(kstar_bz_inds, (nk_in_star)) + + nk_in_star = 0 + do iq_bz=1,nkbz + if (bz2ibz(1, iq_bz) /= ik_ibz) cycle + nk_in_star = nk_in_star + 1 + kstar_bz_inds(nk_in_star) = iq_bz + end do + +end subroutine star_from_ibz_idx +!!*** + +!---------------------------------------------------------------------- + +end module m_krank +!!*** diff --git a/GX-PAW/common/src/17_libtetra_ext/m_krank.o b/GX-PAW/common/src/17_libtetra_ext/m_krank.o new file mode 100644 index 00000000..b5a1c9c6 Binary files /dev/null and b/GX-PAW/common/src/17_libtetra_ext/m_krank.o differ diff --git a/GX-PAW/common/src/17_libtetra_ext/m_simtet.F90 b/GX-PAW/common/src/17_libtetra_ext/m_simtet.F90 new file mode 100644 index 00000000..99c8328c --- /dev/null +++ b/GX-PAW/common/src/17_libtetra_ext/m_simtet.F90 @@ -0,0 +1,2385 @@ +!!****m* ABINIT/m_simtet +!! NAME +!! m_simtet +!! +!! FUNCTION +!! +!! COPYRIGHT +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" + +module m_simtet + + use defs_basis + use m_errors, only: unused_var + + implicit none + + private + + public :: sim0onei + public :: sim0twoi +!!*** + + contains + +!C file: sim0onei.f +!C date: 2011-04-01 +!C who: S.Kaprzyk +!C what: Complex linear form integral over standard terahedron +!C ------------------------------------------------------------ +!C - * - +!C - * 1 - +!C - SIM0=6 * dt1*dt2*dt3 ---------------------------------- - +!C - * verm(4)+(verm(1)-verm(4))*t1+ ..... - +!C - * - +!C - 0e]; [|w1-w2|e,|w3-w2|e]; [|w1-w2|e,|w3-w2|e]; +!C [|w1-w2|e,|w3-w2|e]; +!C [|w1-w2|e,|w3-w2|e]; +!C [|w1-w2|e,|w3-w2|e]; +!C [|w1-w2|e,|w3-w2|e]; +!C [|w1-w2|e,|w3-w2|e]; +!C [|w1-w2|e,|w3-w2|e]; +!C [|w1-w2|e,|w3-w2|e]; +!C [|w1-w2|e,|w3-w2|e]; +!C [|w1-w2|e,|w3-w2| tetra_list to avoid cycling inside big loop over ntetra +!! 4) Add options to get only delta and/or theta ? +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "libtetra.h" + +module m_tetrahedron + + ! make sure stdout is defined, as libtetra.h needs it + use, intrinsic :: iso_fortran_env, only : stdin=>input_unit, & + stdout=>output_unit, & + stderr=>error_unit + USE_MEMORY_PROFILING + USE_MSG_HANDLING + use m_krank +#ifdef HAVE_MPI2 + use mpi +#endif +#ifdef HAVE_LIBTETRA_ABINIT + use m_io_tools, only : open_file + use m_xmpi +#endif + +implicit none + +#if defined HAVE_MPI1 + include 'mpif.h' +#endif + +private +!!*** + +integer, parameter :: dp = kind(1.0d0) + +real(dp),parameter :: tol6 = 1.d-14, tol14 = 1.d-14, zero = 0.d0, one = 1.d0 + +real(dp), parameter :: sqrtpi = 1.7724538509055159d0 + + +!!****t* m_tetrahedron/t_tetrahedron +!! NAME +!! t_tetrahedron +!! +!! FUNCTION +!! tetrahedron geometry object +!! +!! SOURCE + +type, public :: t_tetrahedron + + integer :: ntetra = 0 + ! Number of tetrahedra + + real(dp) :: vv + ! volume of the tetrahedra + + real(dp) :: klatt(3, 3) + ! reciprocal of lattice vectors for full kpoint grid + + integer,allocatable :: tetra_full(:,:,:) + !(4,2,ntetra) + ! For each tetra + ! (:,1,itetra) indices of the vertex in IBZ (symmetrical image) + ! (:,2,itetra) indices of the vertexes in the BZ + + integer,allocatable :: tetra_mult(:) + !(ntetra) + ! multiplicity of each irred tetrahedron + + integer,allocatable :: tetra_wrap(:,:,:) + !(3,4,ntetra) + ! flag to wrap tetrahedron summit into IBZ + + integer,allocatable :: ibz_tetra_count(:) + ! ibz_tetra_mapping(nkpt_ibz) + ! Number of tetrahedra associated to a point in the IBZ. + + integer,allocatable :: ibz_tetra_mapping(:,:) + ! ibz_tetra_mapping(nkpt_ibz, maxval(tetra%ibz_tetra_count))) + ! map ikbz to tetra index. + +end type t_tetrahedron + +public :: init_tetra ! Initialize the object + ! See also the high-level interface tetra_from_kptrlatt provided by m_kpts. +public :: get_tetra_weight ! Calculate integration weights and their derivatives. shape (nkpt, nene). +public :: tetra_blochl_weights ! Same as in get_tetra_weight but weights have shape (nene, nkpt). +public :: get_dbl_tetra_weight ! Calculate integration weights for double tetrahedron integration of delta functions. + ! (NB these correspond to the derivative terms in normal tetrahedron). +public :: destroy_tetra ! Free memory. +public :: tetra_write ! Write text file (XML format) with tetra info. +public :: tetralib_has_mpi ! Return True if the library has been compiled with MPI support. +public :: tetra_get_onewk ! Calculate integration weights and their derivatives for a single k-point in the IBZ. +public :: tetra_get_onewk_wvals ! Similar to tetra_get_onewk_wvalsa but receives arbitrary list of frequency points. +public :: tetra_get_onetetra_wvals ! Get weights for one tetrahedra with arbitrary list of frequency points +!!*** + +contains +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_tetrahedron/destroy_tetra +!! NAME +!! destroy_tetra +!! +!! FUNCTION +!! deallocate tetrahedra pointers if needed +!! +!! SOURCE + +subroutine destroy_tetra (tetra) + + type(t_tetrahedron), intent(inout) :: tetra + + if (allocated(tetra%tetra_full)) then + TETRA_DEALLOCATE(tetra%tetra_full) + end if + if (allocated(tetra%tetra_mult)) then + TETRA_DEALLOCATE(tetra%tetra_mult) + end if + if (allocated(tetra%tetra_wrap)) then + TETRA_DEALLOCATE(tetra%tetra_wrap) + end if + if (allocated(tetra%ibz_tetra_count)) then + TETRA_DEALLOCATE(tetra%ibz_tetra_count) + end if + if (allocated(tetra%ibz_tetra_mapping)) then + TETRA_DEALLOCATE(tetra%ibz_tetra_mapping) + end if + +end subroutine destroy_tetra +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_tetrahedron/init_tetra +!! NAME +!! init_tetra +!! +!! FUNCTION +!! get tetrahedra characterized by apexes +!! +!! INPUTS +!! indkpt(nkpt_fullbz)=indexes of irred kpoints equivalent to kpt_fullbz +!! gprimd(3,3) = reciprocal space vectors +!! klatt(3,3)=reciprocal of lattice vectors for full kpoint grid +!! kpt_fullbz(3,nkpt_fullbz)=kpoints in full brillouin zone +!! nkpt_fullbz=number of kpoints in full brillouin zone +!! comm= MPI communicator +!! +!! OUTPUT +!! tetra%tetra_full(4,2,ntetra)=for each tetrahedron, +!! the different instances of the tetrahedron (fullbz kpoints) +!! tetra%tetra_mult(ntetra) = store multiplicity of each irred tetrahedron +!! tetra%tetra_wrap(3,4,ntetra) = store flag to wrap tetrahedron summit into IBZ +!! tetra%ntetra = final number of irred tetra (dimensions of tetra_* remain larger) +!! tetra%vv = tetrahedron volume divided by full BZ volume +!! +!! SOURCE + +subroutine init_tetra(indkpt, gprimd, klatt, kpt_fullbz, nkpt_fullbz, tetra, ierr, errorstring, comm) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: nkpt_fullbz, comm + integer, intent(out) :: ierr + character(len=80), intent(out) :: errorstring + type(t_tetrahedron),intent(out) :: tetra +!arrays + integer,intent(in) :: indkpt(nkpt_fullbz) + real(dp) ,intent(in) :: gprimd(3,3),klatt(3,3),kpt_fullbz(3,nkpt_fullbz) + +!Local variables------------------------------- +!scalars + integer :: ialltetra,ikpt2,ikpt_full,isummit,itetra,jalltetra,jsummit + integer :: ii,jj,ikibz,nkpt_ibz, my_rank, nprocs + integer :: symrankkpt,mtetra,itmp,ntetra_irred + real(dp) :: shift1,shift2,shift3, rcvol,hashfactor + !real :: cpu_start, cpu_stop + type(krank_t) :: krank +!arrays + integer :: ind_ibz(4), tetra_shifts(3,4,6) ! 3 dimensions, 4 summits, and 6 tetrahedra / kpoint box + real(dp) :: k1(3),k2(3),k3(3) + integer,allocatable :: tetra_full_(:,:,:) + integer,allocatable :: tetra_mult_(:) + integer,allocatable :: tetra_wrap_(:,:,:) + integer, allocatable :: reforder(:) + integer, allocatable :: irred_itetra(:) + real(dp), allocatable :: tetra_hash(:) + +! ********************************************************************* + + !call cpu_time(cpu_start) + + my_rank = 0; nprocs = 1 +#ifdef HAVE_LIBTETRA_ABINIT + my_rank = xmpi_comm_rank(comm); nprocs = xmpi_comm_size(comm) +#endif + + ierr = 0 + errorstring = "" +!jmb + shift1 = zero + shift2 = zero + shift3 = zero + + tetra%klatt = klatt + + mtetra = 6 * nkpt_fullbz + TETRA_ALLOCATE(tetra_full_, (4,2,mtetra)) + TETRA_ALLOCATE(tetra_mult_, (mtetra)) + TETRA_ALLOCATE(tetra_wrap_, (3,4,mtetra)) + + tetra_mult_ = 1 + tetra_full_ = 0 + tetra_wrap_ = 0 + +! tetra_shifts(:,1,1) = (/0,0,0/) +! tetra_shifts(:,2,1) = (/0,1,0/) +! tetra_shifts(:,3,1) = (/0,1,1/) +! tetra_shifts(:,4,1) = (/1,1,0/) +! tetra_shifts(:,1,2) = (/0,0,0/) +! tetra_shifts(:,2,2) = (/0,1,1/) +! tetra_shifts(:,3,2) = (/1,1,0/) +! tetra_shifts(:,4,2) = (/1,1,1/) +! tetra_shifts(:,1,3) = (/0,0,0/) +! tetra_shifts(:,2,3) = (/1,0,0/) +! tetra_shifts(:,3,3) = (/1,1,0/) +! tetra_shifts(:,4,3) = (/1,1,1/) +! tetra_shifts(:,1,4) = (/0,0,0/) +! tetra_shifts(:,2,4) = (/0,0,1/) +! tetra_shifts(:,3,4) = (/1,0,0/) +! tetra_shifts(:,4,4) = (/1,1,1/) +! tetra_shifts(:,1,5) = (/0,0,1/) +! tetra_shifts(:,2,5) = (/1,0,0/) +! tetra_shifts(:,3,5) = (/1,0,1/) +! tetra_shifts(:,4,5) = (/1,1,1/) +! tetra_shifts(:,1,6) = (/0,0,0/) +! tetra_shifts(:,2,6) = (/0,0,1/) +! tetra_shifts(:,3,6) = (/0,1,1/) +! tetra_shifts(:,4,6) = (/1,1,1/) + + ! bxu, the following division scheme is according to Bloechl's paper + tetra_shifts(:,1,1) = (/0,0,0/) + tetra_shifts(:,2,1) = (/1,0,0/) + tetra_shifts(:,3,1) = (/0,1,0/) + tetra_shifts(:,4,1) = (/1,0,1/) + tetra_shifts(:,1,2) = (/1,0,0/) + tetra_shifts(:,2,2) = (/1,1,0/) + tetra_shifts(:,3,2) = (/0,1,0/) + tetra_shifts(:,4,2) = (/1,0,1/) + tetra_shifts(:,1,3) = (/0,1,0/) + tetra_shifts(:,2,3) = (/1,1,0/) + tetra_shifts(:,3,3) = (/1,0,1/) + tetra_shifts(:,4,3) = (/1,1,1/) + tetra_shifts(:,1,4) = (/0,0,0/) + tetra_shifts(:,2,4) = (/0,1,0/) + tetra_shifts(:,3,4) = (/0,0,1/) + tetra_shifts(:,4,4) = (/1,0,1/) + tetra_shifts(:,1,5) = (/0,0,1/) + tetra_shifts(:,2,5) = (/1,0,1/) + tetra_shifts(:,3,5) = (/0,1,0/) + tetra_shifts(:,4,5) = (/0,1,1/) + tetra_shifts(:,1,6) = (/0,1,0/) + tetra_shifts(:,2,6) = (/1,0,1/) + tetra_shifts(:,3,6) = (/0,1,1/) + tetra_shifts(:,4,6) = (/1,1,1/) + + ! Make full k-point rank arrays + ! TODO: Lot of memory allocated here if dense mesh e.g ~ 300 ** 3 + krank = krank_new(nkpt_fullbz, kpt_fullbz) + + ialltetra = 1 + do ikpt_full=1,nkpt_fullbz + do itetra=1,6 + !ialltetra = itetra + (ikpt_full -1) * 6 + !if (mod(ialltetra, nprocs) /= my_rank) cycle ! MPI parallelism. + do isummit=1,4 + k1(:) = kpt_fullbz(:,ikpt_full) & + + tetra_shifts(1,isummit,itetra)*klatt(:,1) & + + tetra_shifts(2,isummit,itetra)*klatt(:,2) & + + tetra_shifts(3,isummit,itetra)*klatt(:,3) + + ! Find full kpoint which is summit isummit of tetrahedron itetra around full kpt ikpt_full ! + symrankkpt = krank%get_rank(k1) + ikpt2 = krank%invrank(symrankkpt) + if (ikpt2 < 1) then + errorstring='Error in ranking k-points - exiting with un-initialized tetrahedra.' + ierr = 2 + call krank%free() + TETRA_ALLOCATE(tetra%tetra_full, (4,2,1)) + TETRA_ALLOCATE(tetra%tetra_mult, (1)) + TETRA_ALLOCATE(tetra%tetra_wrap, (3,4,1)) + TETRA_DEALLOCATE(tetra_full_) + TETRA_DEALLOCATE(tetra_mult_) + TETRA_DEALLOCATE(tetra_wrap_) + return + end if + + ! Store irreducible kpoint equivalent to kpt_fullbz(:,ikpt2) + tetra_full_(isummit,1,ialltetra) = indkpt(ikpt2) + tetra_full_(isummit,2,ialltetra) = ikpt2 + shift1 = k1(1)-kpt_fullbz(1,ikpt2) + shift2 = k1(2)-kpt_fullbz(2,ikpt2) + shift3 = k1(3)-kpt_fullbz(3,ikpt2) + if (shift1>0.5d0) then + tetra_wrap_(1,isummit,ialltetra) = 1 + else if (shift1<-0.5d0) then + tetra_wrap_(1,isummit,ialltetra) = -1 + end if + if (shift2>0.5d0) then + tetra_wrap_(2,isummit,ialltetra) = 1 + else if (shift2<-0.5d0) then + tetra_wrap_(2,isummit,ialltetra) = -1 + end if + if (shift3>0.5d0) then + tetra_wrap_(3,isummit,ialltetra) = 1 + else if (shift3<-0.5d0) then + tetra_wrap_(3,isummit,ialltetra) = -1 + end if + + ! sort itetra summits + ! TODO: replace with sort_int + do jsummit=isummit,2,-1 + if ( tetra_full_(jsummit,1,ialltetra) < tetra_full_(jsummit-1,1,ialltetra) ) then + itmp = tetra_full_(jsummit,1,ialltetra) + tetra_full_(jsummit,1,ialltetra) = tetra_full_(jsummit-1,1,ialltetra) + tetra_full_(jsummit-1,1,ialltetra) = itmp + itmp = tetra_full_(jsummit,2,ialltetra) + tetra_full_(jsummit,2,ialltetra) = tetra_full_(jsummit-1,2,ialltetra) + tetra_full_(jsummit-1,2,ialltetra) = itmp + ! keep fullbz_kpt tetrahedra points in same order + itmp = tetra_wrap_(1,jsummit,ialltetra) + tetra_wrap_(1,jsummit,ialltetra) = tetra_wrap_(1,jsummit-1,ialltetra) + tetra_wrap_(1,jsummit-1,ialltetra) = itmp + itmp = tetra_wrap_(2,jsummit,ialltetra) + tetra_wrap_(2,jsummit,ialltetra) = tetra_wrap_(2,jsummit-1,ialltetra) + tetra_wrap_(2,jsummit-1,ialltetra) = itmp + itmp = tetra_wrap_(1,jsummit,ialltetra) + tetra_wrap_(3,jsummit,ialltetra) = tetra_wrap_(3,jsummit-1,ialltetra) + tetra_wrap_(3,jsummit-1,ialltetra) = itmp + end if + end do ! jsummit + + end do ! isummit + + if (ialltetra > mtetra) then + write (errorstring, '(3a,i0,a,i0)' ) & + 'init_tetra: BUG - ',& + ' ialltetra > mtetra ',& + ' ialltetra= ',ialltetra,', mtetra= ',mtetra + ierr = 1 + return + end if + ialltetra = ialltetra+1 + end do ! itetra + end do ! ikpt_full + + !call cpu_time(cpu_stop) + !write(*,*)"tetra_init ikpt_loop:", cpu_stop - cpu_start + !cpu_start = cpu_stop + + call krank%free() + + rcvol = abs (gprimd(1,1)*(gprimd(2,2)*gprimd(3,3)-gprimd(3,2)*gprimd(2,3)) & +& -gprimd(2,1)*(gprimd(1,2)*gprimd(3,3)-gprimd(3,2)*gprimd(1,3)) & +& +gprimd(3,1)*(gprimd(1,2)*gprimd(2,3)-gprimd(2,2)*gprimd(1,3))) + + ! Volume of all tetrahedra should be the same as that of tetra 1 + ! this is the volume of 1 tetrahedron, should be coherent with notation in Lehmann & Taut + k1(:) = gprimd(:,1)*klatt(1,1) + gprimd(:,2)*klatt(2,1) + gprimd(:,3)*klatt(3,1) + k2(:) = gprimd(:,1)*klatt(1,2) + gprimd(:,2)*klatt(2,2) + gprimd(:,3)*klatt(3,2) + k3(:) = gprimd(:,1)*klatt(1,3) + gprimd(:,2)*klatt(2,3) + gprimd(:,3)*klatt(3,3) + tetra%vv = abs (k1(1)*(k2(2)*k3(3)-k2(3)*k3(2)) & +& -k1(2)*(k2(1)*k3(3)-k2(3)*k3(1)) & +& +k1(3)*(k2(1)*k3(2)-k2(2)*k3(1))) / 6.d0 / rcvol + + ! eliminate equivalent tetrahedra by symmetry and account for them in multiplicity tetra_mult + tetra%ntetra = mtetra + + ! FIXME: could we replace this with a ranking algorithm to avoid the O(tetra%ntetra^2) step? For example: + ! get tetrahedron rank - problem too many combinations in principle = nkpt_irred^4 - only a few used in practice + ! sort ranks and keep indices + + ! make hash table = tetra_full_(1)*nkptirred**3+tetra_full_(2)*nkptirred**2+tetra_full_(3)*nkptirred**1+tetra_full_(4) + + hashfactor = 100.d0 ! *acos(-1.d0) ! 100 pi should be far from an integer... + TETRA_ALLOCATE(tetra_hash, (tetra%ntetra)) + TETRA_ALLOCATE(reforder, (tetra%ntetra)) + + !MG: In principle the order of the indices should not matter. + do ialltetra=1, tetra%ntetra + tetra_hash(ialltetra) = tetra_full_(1,1,ialltetra)*hashfactor**3+& +& tetra_full_(2,1,ialltetra)*hashfactor**2+& +& tetra_full_(3,1,ialltetra)*hashfactor**1+& +& tetra_full_(4,1,ialltetra) + reforder(ialltetra) = ialltetra + end do + + call sort_tetra(tetra%ntetra, tetra_hash, reforder, tol6) + ! Most of the wall-time is spent in the preamble of this routine (up to this point). + ! sort_tetra is not easy to parallelize... + + ! determine number of tetra after reduction + TETRA_ALLOCATE(irred_itetra, (tetra%ntetra)) + jalltetra = 1 + irred_itetra(1) = 1 + do ialltetra=2, tetra%ntetra + if (abs(tetra_hash(ialltetra)-tetra_hash(ialltetra-1)) > tol6) then + ! found a new series + jalltetra = jalltetra + 1 + end if + irred_itetra(ialltetra) = jalltetra + end do + + ! reset number of tetra + ntetra_irred = jalltetra + + ! allocate definitive tetra arrays and transfer to new arrays + TETRA_ALLOCATE(tetra%tetra_full, (4,2,ntetra_irred)) + TETRA_ALLOCATE(tetra%tetra_mult, (ntetra_irred)) + TETRA_ALLOCATE(tetra%tetra_wrap, (3,4,ntetra_irred)) + + ! eliminate equal rank tetrahedra and accumulate multiplicity into first one + tetra%tetra_full = 0 + tetra%tetra_mult = 0 + tetra%tetra_wrap = 0 + jalltetra = 1 + tetra%tetra_full(:,:,1) = tetra_full_(:,:,reforder(1)) + tetra%tetra_mult(1) = 1 + tetra%tetra_wrap(:,:,1) = tetra_wrap_(:,:,reforder(1)) + do ialltetra=2, tetra%ntetra + ! TODO: check if tolerance is adapted + if (abs(tetra_hash(ialltetra)-tetra_hash(ialltetra-1)) > tol6) then + ! found a new series + jalltetra = jalltetra + 1 + tetra%tetra_full(:,:,jalltetra) = tetra_full_(:,:,reforder(ialltetra)) + tetra%tetra_wrap(:,:,jalltetra) = tetra_wrap_(:,:,reforder(ialltetra)) + tetra%tetra_mult(jalltetra) = 1 + else + ! TODO: add real check that the tetra are equivalent... + ! otherwise increment jalltetra here as well, generate new series? + tetra%tetra_mult(jalltetra) = tetra%tetra_mult(jalltetra) + tetra_mult_(reforder(ialltetra)) + !tetra_mult_(reforder(ialltetra)) = 0 + end if + end do + + ! reset of ntetra for final version after checks and debu + tetra%ntetra = ntetra_irred + + TETRA_DEALLOCATE(tetra_hash) + TETRA_DEALLOCATE(reforder) + TETRA_DEALLOCATE(irred_itetra) + TETRA_DEALLOCATE(tetra_full_) + TETRA_DEALLOCATE(tetra_mult_) + TETRA_DEALLOCATE(tetra_wrap_) + + ! Create mapping between the irreducible k-points + ! and all the tetrahedron contributing with some weight + nkpt_ibz = maxval(indkpt) + + ! 1. First we count what is the maximum number of distinct tetrahedra that each k-point contains + TETRA_ALLOCATE(tetra%ibz_tetra_count,(nkpt_ibz)) + tetra%ibz_tetra_count(:) = 0 + + ! Count max tetra contributing + do ii=1,tetra%ntetra + ! Here we need the original ordering to reference the correct irred kpoints + ind_ibz(:) = tetra%tetra_full(:,1,ii) + ! count max tetra contributing + do jj=1,4 + ikibz = ind_ibz(jj) + if (ikibz > nkpt_ibz) cycle + tetra%ibz_tetra_count(ikibz) = tetra%ibz_tetra_count(ikibz) + 1 + end do + end do + + ! 2. Then we build mapping of ikbz to tetra + TETRA_ALLOCATE(tetra%ibz_tetra_mapping,(nkpt_ibz,maxval(tetra%ibz_tetra_count))) + tetra%ibz_tetra_count(:) = 0 + do ii=1,tetra%ntetra + ! Here we need the original ordering to reference the correct irred kpoints + ind_ibz(:) = tetra%tetra_full(:,1,ii) + ! Use the counter to move pointer and then fill index + do jj=1,4 + ikibz = ind_ibz(jj) + if (ikibz > nkpt_ibz) cycle + ! avoid putting the same index twice + if (tetra%ibz_tetra_count(ikibz) > 0) then + if (tetra%ibz_tetra_mapping(ikibz,tetra%ibz_tetra_count(ikibz)) == ii) cycle + end if + tetra%ibz_tetra_count(ikibz) = tetra%ibz_tetra_count(ikibz) + 1 + tetra%ibz_tetra_mapping(ikibz,tetra%ibz_tetra_count(ikibz)) = ii + end do + end do + + !call cpu_time(cpu_stop) + !write(*,*)"tetra_init 2nd part:", cpu_stop - cpu_start + !cpu_start = cpu_stop + +end subroutine init_tetra +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_tetrahedron/tetra_write +!! NAME +!! tetra_write +!! +!! FUNCTION +!! Write text file with tetra info. +!! +!! INPUTS +!! tetra=tetrahedron geometry object +!! nkibz=Number of k-points in the IBZ used to generate tetra +!! kibz(3,nkibz)=Reduced coordinates of the IBZ +!! path=Name of output file +!! +!! OUTPUT +!! Output is written to file. +!! +!! SOURCE + +subroutine tetra_write(tetra, nkibz, kibz, path) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: nkibz + character(len=*),intent(in) :: path + type(t_tetrahedron),intent(in) :: tetra +!arrays + real(dp),intent(in) :: kibz(3,nkibz) + +!Local variables------------------------------- + integer,parameter :: version=1 + integer :: ik,it,unt +#ifdef HAVE_LIBTETRA_ABINIT + character(len=500) :: msg +#endif + +! ********************************************************************* + +#ifdef HAVE_LIBTETRA_ABINIT + if (open_file(file=trim(path),iomsg=msg,newunit=unt,form="formatted",status="unknown",action="write")/=0) then + TETRA_ERROR(msg) + end if +#else + open(file=trim(path),newunit=unt,form="formatted",status="unknown",action="write") +#endif + + write(unt,*)version, " # version number" + + ! Write IBZ + write(unt,*)nkibz, " # number of k-points in the IBZ" + write(unt,"(a)")"" + do ik=1,nkibz + write(unt,"(3es22.12)") kibz(:,ik) + end do + write(unt,"(a)")"" + + ! Write tetra info + write(unt,"(i0,a)")tetra%ntetra, " # number of tetrahedra" + write(unt,"(es22.12,a)")tetra%vv, " # tetrahedron volume" + + write(unt,"(a)")"" + do it=1,tetra%ntetra + write(unt,"(8(i0,1x))")tetra%tetra_full(:,:,it) + end do + write(unt,"(a)")"" + + write(unt,"(a)")"" + do it=1,tetra%ntetra + write(unt,"(i0)")tetra%tetra_mult(it) + end do + write(unt,"(a)")"" + + write(unt,"(a)")"" + do it=1,tetra%ntetra + write(unt,"(12(i0,1x))")tetra%tetra_wrap(:,:,it) + end do + write(unt,"(a)")"" + + close(unt) + +end subroutine tetra_write +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_tetrahedron/get_tetra_weight +!! NAME +!! get_tetra_weight +!! +!! FUNCTION +!! calculate integration weights and their derivatives from Blochl et al PRB 49 16223 [[cite:Bloechl1994a]] +!! +!! INPUTS +!! eigen_in(nkpt)=eigenenergies for each k point +!! enemin=minimal energy for DOS +!! enemax=maximal energy for DOS +!! max_occ=maximal occupation number (2 for nsppol=1, 1 for nsppol=2) +!! nene=number of energies for DOS +!! nkpt=number of irreducible kpoints +!! tetra +!! %ntetra=number of tetrahedra +!! %tetra_full(4,2,ntetra)=for each irred tetrahedron, the list of k point vertices +!! 1 -> irred kpoint 2 -> fullkpt +!! %tetra_mult(ntetra)=for each irred tetrahedron, its multiplicity +!! %vv = ratio of volume of one tetrahedron in reciprocal space to full BZ volume +!! bcorr=1 to include Blochl correction else 0. +!! comm=MPI communicator +!! +!! OUTPUT +!! tweight(nkpt,nene) = integration weights for each irred kpoint from all adjacent tetrahedra +!! dtweightde(nkpt,nene) = derivative of tweight wrt energy +!! +!! SOURCE + +! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +! THIS FUNCTION IS DEPRECATED, USE tetra_blochl_weights +! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +subroutine get_tetra_weight(eigen_in,enemin,enemax,max_occ,nene,nkpt,tetra,& + bcorr,tweight,dtweightde,comm) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: nene,nkpt,bcorr,comm + type(t_tetrahedron), intent(in) :: tetra + real(dp) ,intent(in) :: enemax,enemin,max_occ +!arrays + real(dp) ,intent(in) :: eigen_in(nkpt) + real(dp) ,intent(out) :: dtweightde(nkpt,nene),tweight(nkpt,nene) + +!Local variables------------------------------- + real(dp), allocatable :: dtweightde_ek(:, :), tweight_ek(:, :) + +! ********************************************************************* + + TETRA_ALLOCATE(dtweightde_ek, (nene, nkpt)) + TETRA_ALLOCATE(tweight_ek, (nene, nkpt)) + + call tetra_blochl_weights(tetra,eigen_in,enemin,enemax,max_occ,nene,nkpt,bcorr,tweight_ek,dtweightde_ek,comm) + + ! transpose: otherwise the data access is crap and the code slows by an order of magnitude + tweight = transpose(tweight_ek) + dtweightde = transpose(dtweightde_ek) + + TETRA_DEALLOCATE(dtweightde_ek) + TETRA_DEALLOCATE(tweight_ek) + +end subroutine get_tetra_weight +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_tetrahedron/tetra_blochl_weights +!! NAME +!! tetra_blochl_weights +!! +!! FUNCTION +!! calculate integration weights and their derivatives from Blochl et al PRB 49 16223 [[cite:Bloechl1994a]] +!! Same API as get_tetra_weight but output weights here have shape (nene, nkpt) +!! +!! SOURCE + +subroutine tetra_blochl_weights(tetra,eigen_in,enemin,enemax,max_occ,nene,nkpt,& + bcorr,tweight_t,dtweightde_t,comm) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: nene,nkpt,bcorr,comm + type(t_tetrahedron), intent(in) :: tetra + real(dp) ,intent(in) :: enemax,enemin,max_occ +!arrays + real(dp) ,intent(in) :: eigen_in(nkpt) + real(dp) ,intent(out) :: dtweightde_t(nene,nkpt),tweight_t(nene,nkpt) + +!Local variables------------------------------- +!scalars + integer :: itetra,nprocs,my_start,my_stop,ierr,ii +!arrays + integer :: ind_ibz(4) + real(dp) :: eigen_1tetra(4) + real(dp), allocatable :: tweight_tmp(:,:),dtweightde_tmp(:,:),buffer(:,:) + +! ********************************************************************* + + TETRA_ALLOCATE(tweight_tmp, (nene, 4)) + TETRA_ALLOCATE(dtweightde_tmp, (nene, 4)) + tweight_t = zero; dtweightde_t = zero + + call split_work(tetra%ntetra, comm, nprocs, my_start, my_stop, ierr) + if (ierr /= 0) TETRA_ERROR("Error in MPI layer") + + ! for each tetrahedron + do itetra=my_start,my_stop + tweight_tmp = zero + dtweightde_tmp = zero + + ! Here we need the original ordering to reference the correct irred kpoints + ind_ibz(:) = tetra%tetra_full(:,1,itetra) + + ! Sort energies before calling get_onetetra_ + eigen_1tetra(:) = eigen_in(ind_ibz(:)) + call sort_tetra(4, eigen_1tetra, ind_ibz, tol14) + + call get_onetetra_(tetra,itetra,eigen_1tetra,enemin,enemax,max_occ,nene,bcorr,tweight_tmp,dtweightde_tmp) + + ! NOTE: the following blas calls are not working systematically, or do not give speed ups, strange... + !if (nene > 100) then + ! do ii=1,4 + ! call daxpy (nene, 1.d0, tweight_tmp(:,ii), 1, tweight_t(:,ind_ibz(ii)), 1) + ! end do + ! do ii=1,4 + ! call daxpy (nene, 1.d0, dtweightde_tmp(:,ii), 1, dtweightde_t(:,ind_ibz(ii)), 1) + ! end do + !else + do ii=1,4 + tweight_t(:,ind_ibz(ii)) = tweight_t(:,ind_ibz(ii)) + tweight_tmp(:,ii) + end do + do ii=1,4 + dtweightde_t(:,ind_ibz(ii)) = dtweightde_t(:,ind_ibz(ii)) + dtweightde_tmp(:,ii) + end do + !end if + end do ! itetra + + TETRA_DEALLOCATE(tweight_tmp) + TETRA_DEALLOCATE(dtweightde_tmp) + + if (nprocs > 1) then +#ifdef HAVE_MPI + TETRA_ALLOCATE(buffer, (nene, nkpt)) + call MPI_ALLREDUCE(tweight_t,buffer,nene*nkpt,MPI_DOUBLE_PRECISION,MPI_SUM,comm,ierr) + tweight_t = buffer + + call MPI_ALLREDUCE(dtweightde_t,buffer,nene*nkpt,MPI_DOUBLE_PRECISION,MPI_SUM,comm,ierr) + dtweightde_t = buffer + TETRA_DEALLOCATE(buffer) +#endif + end if + +end subroutine tetra_blochl_weights +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_tetrahedron/get_dbl_tetra_weight +!! NAME +!! get_dbl_tetra_weight +!! +!! FUNCTION +!! calculate integration weights and their derivatives +!! for double tetrahedron method from Allen Phys Stat Sol B 120 529 (1983) [[cite:Allen1983b]] +!! the k-points and tetrahedra must be the same for both grids, of course, +!! but the range of energies is arbitrary +!! +!! Omega is called eigen1 here +!! E is called eigen2 here +!! indexing goes from 1 to 4 for the tetrahedron corners, in order of increasing eigen1 +!! in Allen, from 0 to 3... +!! +!! INPUTS +!! eigen1_in(nkpt)=eigenenergies for each k point +!! eigen2_in(nkpt)=eigenenergies for each k point +!! enemin1=minimal energy for DOS in energy 1 +!! enemax1=maximal energy for DOS +!! enemin2=minimal energy for DOS in energy 2 +!! enemax2=maximal energy for DOS +!! max_occ=maximal occupation number (2 for nsppol=1, 1 for nsppol=2) +!! nene1=number of energies for DOS in energy 1 +!! nene2=number of energies for DOS in energy 2 +!! nkpt=number of irreducible kpoints +!! tetra%ntetra=number of tetra +!! tetra%tetra_full(4,2,ntetra)=for each irred tetrahedron, the list of k point vertices +!! 1 -> irred kpoint 2 -> fullkpt +!! tetra%tetra_mult(ntetra)=for each irred tetrahedron, its multiplicity +!! tetra%vv = ratio of volume of one tetrahedron in reciprocal space to full BZ volume +!! ierr = error code on exit +!! +!! OUTPUT +!! tweight(nkpt,nene1,nene2) = integration weights for each irred kpoint from all adjacent tetrahedra +!! dtweightde(nkpt,nene1,nene2) = derivative of tweight wrt energy +!! +!! SOURCE + +subroutine get_dbl_tetra_weight(eigen1_in,eigen2_in,enemin1,enemax1,enemin2,enemax2,& +& max_occ,nene1,nene2,nkpt,tetra,tweight,dtweightde, ierr) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: nene1,nene2,nkpt + integer,intent(out) :: ierr + type(t_tetrahedron), intent(in) :: tetra + real(dp),intent(in) :: enemax1,enemin1 + real(dp),intent(in) :: enemax2,enemin2 + real(dp),intent(in) :: max_occ +!arrays + real(dp),intent(in) :: eigen1_in(nkpt) + real(dp),intent(in) :: eigen2_in(nkpt) + real(dp),intent(out) :: dtweightde(nkpt,nene1,nene2),tweight(nkpt,nene1,nene2) + +!Local variables------------------------------- +! needed for gaussian replacement of Dirac functions +! the three coefficients of the DOS as quadratic form, +! in the interval [eig(ikpt-1), eig(ikpt)] +! for ikpt = 1 we add a point below eigen(1) which doesnt +! contribute to the DOS in any tetrahedron +!scalars + integer :: ieps1,ieps2,itetra + integer :: nn1_1,nn1_2,nn1_3,nn1_4 + integer :: nn2_1,nn2_2,nn2_3 + integer :: ind_a(3), ind_b(3), ind_c(3) + real(dp) :: deltaene1,eps1 + real(dp) :: deltaene2,eps2 +! real(dp) :: gau_prefactor,gau_width,gau_width2 + real(dp) :: epsilon1(4,4) + real(dp) :: epsilon2(4,4) + real(dp) :: inv_epsilon1(4,4) + real(dp) :: aa(3),bb(3),cc(3) + real(dp) :: delaa(3),delbb(3),delcc(3) + real(dp) :: delaa0,delbb0,delcc0 + real(dp) :: inv_delaa(3),inv_delbb(3),inv_delcc(3) + real(dp) :: deleps1, deleps2 + real(dp) :: inv_deleps1 + real(dp) :: dccde1, dccde1_pre + real(dp) :: volconst,volconst_mult + real(dp) :: ii0, ii1, ii3 +!arrays + integer :: ind_k(4) + real(dp), allocatable :: tweight_tmp(:,:,:) + real(dp), allocatable :: dtweightde_tmp(:,:,:) + real(dp) :: eigen1_1tetra(4) + real(dp) :: eigen2_1tetra(4) + +! ********************************************************************* + + ierr = 0 + if (nene1 <= 1 .or. nene2 <= 1) then + !'get_dbl_tetra_weight: nene must be at least 2' + ierr = 1 + return + else + deltaene1 = (enemax1-enemin1) / (nene1-1) + deltaene2 = (enemax2-enemin2) / (nene2-1) + end if + + TETRA_ALLOCATE(tweight_tmp, (4, nene2, nene1)) + TETRA_ALLOCATE(dtweightde_tmp, (4, nene2, nene1)) + +!print *, "warning: for the moment, heaviside weights are 0. The delta function / DOS weights are the only ones calculated " + + volconst = tetra%vv/4.d0 + + ! for each tetrahedron + do itetra=1,tetra%ntetra + ! these are for 1 tetrahedron only. + tweight_tmp = zero + dtweightde_tmp = zero + + volconst_mult = max_occ*volconst*dble(tetra%tetra_mult(itetra)) + + ! Here we need the original ordering to reference the correct irred kpoints + ! ind_k refers to the index in the full k list of the summits of the present tetrahedra + ! we can forget the order of the summits within the tetrahedron, because eigen1 fixes that + ! order with its increasing value + ind_k(1) = tetra%tetra_full(1,1,itetra) + ind_k(2) = tetra%tetra_full(2,1,itetra) + ind_k(3) = tetra%tetra_full(3,1,itetra) + ind_k(4) = tetra%tetra_full(4,1,itetra) + eigen1_1tetra(1) = eigen1_in(ind_k(1)) + eigen1_1tetra(2) = eigen1_in(ind_k(2)) + eigen1_1tetra(3) = eigen1_in(ind_k(3)) + eigen1_1tetra(4) = eigen1_in(ind_k(4)) + call sort_tetra(4,eigen1_1tetra,ind_k,tol14) + + ! re-sort eigen2 values according to order chosen for eigen1. Eigen2 are _not_ in increasing order! + eigen2_1tetra(1) = eigen2_in(ind_k(1)) + eigen2_1tetra(2) = eigen2_in(ind_k(2)) + eigen2_1tetra(3) = eigen2_in(ind_k(3)) + eigen2_1tetra(4) = eigen2_in(ind_k(4)) + + ! the epsilons are energy differences for the two eigenvalue sets + epsilon1 = zero + epsilon2 = zero + do ieps1 = 1, 4 + do ieps2 = ieps1+1, 4 + epsilon1(ieps1,ieps2) = eigen1_1tetra(ieps1)-eigen1_1tetra(ieps2) + epsilon1(ieps2,ieps1) = -epsilon1(ieps1,ieps2) + epsilon2(ieps1,ieps2) = eigen2_1tetra(ieps1)-eigen2_1tetra(ieps2) + epsilon2(ieps2,ieps1) = -epsilon2(ieps1,ieps2) + end do + end do + + ! we precalculate the inverses to avoid doing tons of divisions in the energy loops below + ! Allen formulae only require the inverses of the differences of eigen1 + the a b c below + inv_epsilon1 = zero + do ieps1 = 1, 4 + do ieps2 = ieps1+1, 4 + if (abs(epsilon1(ieps1,ieps2)) > tol6) then + inv_epsilon1(ieps1,ieps2) = 1.d0 / epsilon1(ieps1,ieps2) + inv_epsilon1(ieps2,ieps1) = -inv_epsilon1(ieps1,ieps2) + end if + end do + end do + + ! these bounds determine the intervals for Omega in Allen paper, and cases A, B, C + nn1_1 = int((eigen1_1tetra(1)-enemin1)/deltaene1)+1 + nn1_2 = int((eigen1_1tetra(2)-enemin1)/deltaene1)+1 + nn1_3 = int((eigen1_1tetra(3)-enemin1)/deltaene1)+1 + nn1_4 = int((eigen1_1tetra(4)-enemin1)/deltaene1)+1 + + nn1_1 = max(1,nn1_1) + nn1_1 = min(nn1_1,nene1) + nn1_2 = max(1,nn1_2) + nn1_2 = min(nn1_2,nene1) + nn1_3 = max(1,nn1_3) + nn1_3 = min(nn1_3,nene1) + nn1_4 = max(1,nn1_4) + nn1_4 = min(nn1_4,nene1) + + ! calculate Allen a_i b_i and c_i parameters + ! sort the a_i b_i c_i + ! + ! NOTE: indices here go from 1 to 4 instead of 0 to 3 as in Allen... + aa(1) = epsilon2(2,1) * inv_epsilon1(2,1) + aa(2) = epsilon2(3,1) * inv_epsilon1(3,1) + aa(3) = epsilon2(4,1) * inv_epsilon1(4,1) + ind_a = (/2,3,4/) + call sort_tetra(3,aa,ind_a,tol14) + ! aa are now in order a_s a_m a_l !!! Preserve the hash function ind_a to order the positions of k below + delaa(1) = aa(2)-aa(1) + delaa(2) = aa(3)-aa(1) + delaa(3) = aa(3)-aa(2) + inv_delaa = zero + if(delaa(1)> tol6) inv_delaa(1)= 1.0d0 / delaa(1) + if(delaa(2)> tol6) inv_delaa(2)= 1.0d0 / delaa(2) + if(delaa(3)> tol6) inv_delaa(3)= 1.0d0 / delaa(3) + + bb(1) = epsilon2(1,2) * inv_epsilon1(1,2) + bb(2) = epsilon2(3,2) * inv_epsilon1(3,2) + bb(3) = epsilon2(4,2) * inv_epsilon1(4,2) + ind_b = (/1,3,4/) + call sort_tetra(3,bb,ind_b,tol14) + delbb(1) = bb(2)-bb(1) + delbb(2) = bb(3)-bb(1) + delbb(3) = bb(3)-bb(2) + inv_delbb = zero + if(delbb(1)> tol6) inv_delbb(1)= 1.0d0 / delbb(1) + if(delbb(2)> tol6) inv_delbb(2)= 1.0d0 / delbb(2) + if(delbb(3)> tol6) inv_delbb(3)= 1.0d0 / delbb(3) + + cc(1) = epsilon2(1,4) * inv_epsilon1(1,4) + cc(2) = epsilon2(2,4) * inv_epsilon1(2,4) + cc(3) = epsilon2(3,4) * inv_epsilon1(3,4) + ind_c = (/1,2,3/) + call sort_tetra(3,cc,ind_c,tol14) + delcc(1) = cc(2)-cc(1) + delcc(2) = cc(3)-cc(1) + delcc(3) = cc(3)-cc(2) + inv_delcc = zero + if(delcc(1)> tol6) inv_delcc(1)= 1.0d0 / delcc(1) + if(delcc(2)> tol6) inv_delcc(2)= 1.0d0 / delcc(2) + if(delcc(3)> tol6) inv_delcc(3)= 1.0d0 / delcc(3) + + !---------------------------------------------------------------------- + ! start main loop A B C over eps1 + !---------------------------------------------------------------------- + + ! + ! interval enemin1 < eps1 < e1 nothing to do + ! + ! + ! interval e1 < eps1 < e3 CASE A in Allen + first term in B + ! + ! NB: eps1 is not updated inside the loop, only between the loops + eps1 = enemin1+nn1_1*deltaene1 + deleps1 = eps1-eigen1_1tetra(1) ! this is Omega - omega_0 + dccde1_pre = 6.d0*volconst_mult*inv_epsilon1(2,1)*inv_epsilon1(3,1)*inv_epsilon1(4,1) + + ! note we go to nn1_3 + do ieps1=nn1_1+1,nn1_3 + + dccde1 = dccde1_pre * deleps1 ! this is f_0(Omega)*6*v + + ! at fixed ieps1 we can find the pivot indices for the ieps2 loop + nn2_1 = int((eigen2_1tetra(1)+deleps1*aa(1) -enemin2)/deltaene2)+1 + nn2_2 = int((eigen2_1tetra(1)+deleps1*aa(2) -enemin2)/deltaene2)+1 + nn2_3 = int((eigen2_1tetra(1)+deleps1*aa(3) -enemin2)/deltaene2)+1 + + nn2_1 = max(1,nn2_1) + nn2_1 = min(nn2_1,nene2) + nn2_2 = max(1,nn2_2) + nn2_2 = min(nn2_2,nene2) + nn2_3 = max(1,nn2_3) + nn2_3 = min(nn2_3,nene2) + + inv_deleps1 = 1.0d0 / deleps1 + + eps2 = enemin2+nn2_1*deltaene2 ! this is E + deleps2 = eps2 - eigen2_1tetra(1) ! this is E-epsilon_0 + + !----------------------------------------------------------------------- + ! This is case AI + !----------------------------------------------------------------------- + do ieps2 = nn2_1+1, nn2_2 + ! calculate running value of del "a" = a-a_s: first term should really mix eps1 and eps2 + delaa0 = deleps2*inv_deleps1 - aa(1) ! a - a_s + + ii0 = dccde1*delaa0*inv_delaa(1)*inv_delaa(2) ! this is I_0(Omega E) + + dtweightde_tmp(1,ieps2,ieps1) = dtweightde_tmp(1,ieps2,ieps1) + & +& ii0*(1.d0 + 0.5d0*deleps1*inv_epsilon1(ind_a(1),1)* & +& (-2.0d0 + delaa0*inv_delaa(1)*epsilon1(ind_a(2),ind_a(1))*inv_epsilon1(ind_a(2),1) & +& + delaa0*inv_delaa(2)*epsilon1(ind_a(3),ind_a(1))*inv_epsilon1(ind_a(3),1))) + dtweightde_tmp(ind_a(1),ieps2,ieps1) = dtweightde_tmp(ind_a(1),ieps2,ieps1) + & +& ii0*0.5d0*deleps1*inv_epsilon1(ind_a(1),1)*(2.0d0 - delaa0*inv_delaa(1) - delaa0*inv_delaa(2)) + dtweightde_tmp(ind_a(2),ieps2,ieps1) = dtweightde_tmp(ind_a(2),ieps2,ieps1) + & +& ii0*0.5d0*delaa0*inv_delaa(1)*deleps1*inv_epsilon1(ind_a(2),1) + dtweightde_tmp(ind_a(3),ieps2,ieps1) = dtweightde_tmp(ind_a(3),ieps2,ieps1) + & +& ii0*0.5d0*delaa0*inv_delaa(2)*deleps1*inv_epsilon1(ind_a(3),1) + deleps2 = deleps2 + deltaene2 + end do + + + eps2 = enemin2+nn2_2*deltaene2 ! this is E + deleps2 = eps2 - eigen2_1tetra(1) ! E-E_0 + + !----------------------------------------------------------------------- + ! This is case AII + !----------------------------------------------------------------------- + do ieps2 = nn2_2+1, nn2_3 + ! calculate running value of del "a" = a_l-a: first term should really mix eps1 and eps2 + delaa0 = aa(3) - deleps2*inv_deleps1 ! a_l - a + + ii0 = dccde1*delaa0*inv_delaa(3)*inv_delaa(2) ! this is I_0(Omega E) + + dtweightde_tmp(1,ieps2,ieps1) = dtweightde_tmp(1,ieps2,ieps1) + & +& ii0*(1.d0 + 0.5d0*deleps1*inv_epsilon1(ind_a(3),1)* & +& (-2.0d0 + delaa0*inv_delaa(3)*epsilon1(ind_a(2),ind_a(3))*inv_epsilon1(ind_a(2),1) & +& + delaa0*inv_delaa(2)*epsilon1(ind_a(1),ind_a(3))*inv_epsilon1(ind_a(1),1))) + dtweightde_tmp(ind_a(3),ieps2,ieps1) = dtweightde_tmp(ind_a(3),ieps2,ieps1) + & +& ii0*0.5d0*deleps1*inv_epsilon1(ind_a(3),1)*(2.0d0 - delaa0*inv_delaa(3) - delaa0*inv_delaa(2)) + dtweightde_tmp(ind_a(2),ieps2,ieps1) = dtweightde_tmp(ind_a(2),ieps2,ieps1) + & +& ii0*0.5d0*delaa0*inv_delaa(3)*deleps1*inv_epsilon1(ind_a(2),1) + dtweightde_tmp(ind_a(1),ieps2,ieps1) = dtweightde_tmp(ind_a(1),ieps2,ieps1) + & +& ii0*0.5d0*delaa0*inv_delaa(2)*deleps1*inv_epsilon1(ind_a(1),1) + + deleps2 = deleps2 + deltaene2 + end do + deleps1 = deleps1 + deltaene1 + end do + ! + ! interval e2 < eps < e3 + ! + eps1 = eps1 + (nn1_2-nn1_1)*deltaene1 + + deleps1 = eps1-eigen1_1tetra(2) ! Omega - omega_1 + + dccde1_pre = 6.d0*volconst_mult*inv_epsilon1(2,1)*inv_epsilon1(3,2)*inv_epsilon1(4,2) ! f1 function + do ieps1=nn1_2+1,nn1_3 + + dccde1 = dccde1_pre * deleps1 ! f2(Omega) * 6 * v + + ! at fixed ieps1 we can find the pivot indices for the ieps2 loop + nn2_1 = int((eigen2_1tetra(2)+deleps1*bb(1) -enemin2)/deltaene2)+1 + nn2_2 = int((eigen2_1tetra(2)+deleps1*bb(2) -enemin2)/deltaene2)+1 + nn2_3 = int((eigen2_1tetra(2)+deleps1*bb(3) -enemin2)/deltaene2)+1 + + nn2_1 = max(1,nn2_1) + nn2_1 = min(nn2_1,nene2) + nn2_2 = max(1,nn2_2) + nn2_2 = min(nn2_2,nene2) + nn2_3 = max(1,nn2_3) + nn2_3 = min(nn2_3,nene2) + + inv_deleps1 = 1.0d0 / deleps1 + + eps2 = enemin2+nn2_1*deltaene2 ! starting value for E + deleps2 = eps2 - eigen2_1tetra(2) ! E - epsilon_1 + + !----------------------------------------------------------------------- + ! This is case BI + !----------------------------------------------------------------------- + do ieps2 = nn2_1+1, nn2_2 + ! calculate running value of del "b" = b-b_s: first term should really mix eps1 and eps2 + delbb0 = deleps2*inv_deleps1 - bb(1) + + ii1 = dccde1*delbb0*inv_delbb(1)*inv_delbb(2) ! this is I_1(Omega E) + + ! note negative sign here - we are correcting the I0 a0 term already calculated above + dtweightde_tmp(2,ieps2,ieps1) = dtweightde_tmp(2,ieps2,ieps1) - & +& ii1*(1.d0 + 0.5d0*deleps1*inv_epsilon1(ind_b(1),2)* & +& (-2.0d0 + delbb0*inv_delbb(1)*epsilon1(ind_b(2),ind_b(1))*inv_epsilon1(ind_b(2),2) & +& + delbb0*inv_delbb(2)*epsilon1(ind_b(3),ind_b(1))*inv_epsilon1(ind_b(3),2))) + dtweightde_tmp(ind_b(1),ieps2,ieps1) = dtweightde_tmp(ind_b(1),ieps2,ieps1) - & +& ii1*0.5d0*deleps1*inv_epsilon1(ind_b(1),2)*(2.0d0 - delbb0*inv_delbb(1) - delbb0*inv_delbb(2)) + dtweightde_tmp(ind_b(2),ieps2,ieps1) = dtweightde_tmp(ind_b(2),ieps2,ieps1) - & +& ii1*0.5d0*delbb0*inv_delbb(1)*deleps1*inv_epsilon1(ind_b(2),2) + dtweightde_tmp(ind_b(3),ieps2,ieps1) = dtweightde_tmp(ind_b(3),ieps2,ieps1) - & +& ii1*0.5d0*delbb0*inv_delbb(2)*deleps1*inv_epsilon1(ind_b(3),2) + deleps2 = deleps2 + deltaene2 + end do + + eps2 = enemin2+nn2_2*deltaene2 + deleps2 = eps2 - eigen2_1tetra(2) + + !----------------------------------------------------------------------- + ! This is case BII + !----------------------------------------------------------------------- + do ieps2 = nn2_2+1, nn2_3 + ! calculate running value of del "b" = b_l-b: first term should really mix eps1 and eps2 + delbb0 = bb(3) - deleps2*inv_deleps1 + + ii1 = dccde1*delbb0*inv_delbb(3)*inv_delbb(2) ! this is I_1(Omega E) + + ! note negative sign here - we are correcting the I0 a0 term already calculated above + dtweightde_tmp(2,ieps2,ieps1) = dtweightde_tmp(2,ieps2,ieps1) - & +& ii1*(1.d0 + 0.5d0*deleps1*inv_epsilon1(ind_b(3),2)* & +& (-2.0d0 + delbb0*inv_delbb(3)*epsilon1(ind_b(2),ind_b(3))*inv_epsilon1(ind_b(2),2) & +& + delbb0*inv_delbb(2)*epsilon1(ind_b(1),ind_b(3))*inv_epsilon1(ind_b(1),2))) + dtweightde_tmp(ind_b(3),ieps2,ieps1) = dtweightde_tmp(ind_b(3),ieps2,ieps1) - & +& ii1*0.5d0*deleps1*inv_epsilon1(ind_b(3),2)*(2.0d0 - delbb0*inv_delbb(3) - delbb0*inv_delbb(2)) + dtweightde_tmp(ind_b(2),ieps2,ieps1) = dtweightde_tmp(ind_b(2),ieps2,ieps1) - & +& ii1*0.5d0*delbb0*inv_delbb(3)*deleps1*inv_epsilon1(ind_b(2),2) + dtweightde_tmp(ind_b(1),ieps2,ieps1) = dtweightde_tmp(ind_b(1),ieps2,ieps1) - & +& ii1*0.5d0*delbb0*inv_delbb(2)*deleps1*inv_epsilon1(ind_b(1),2) + + deleps2 = deleps2 + deltaene2 + end do + + deleps1 = deleps1 + deltaene1 + end do + + ! + ! interval e3 < eps < e4 + ! + eps1 = eps1 + (nn1_3-nn1_2)*deltaene1 + deleps1 = eps1-eigen1_1tetra(4) + dccde1_pre = 6.d0*volconst_mult*inv_epsilon1(4,1)*inv_epsilon1(4,2)*inv_epsilon1(4,3) + do ieps1=nn1_3+1,nn1_4 + ! note - sign from definition of f3 + dccde1 = -dccde1_pre * deleps1 ! f3(Omega) * 6 * v + + ! at fixed ieps1 we can find the pivot indices for the ieps2 loop + ! NB: order is inverted for cc because deleps1 is defined negative (Omega is always less than omega_3) + nn2_1 = int((eigen2_1tetra(4)+deleps1*cc(3) -enemin2)/deltaene2)+1 + nn2_2 = int((eigen2_1tetra(4)+deleps1*cc(2) -enemin2)/deltaene2)+1 + nn2_3 = int((eigen2_1tetra(4)+deleps1*cc(1) -enemin2)/deltaene2)+1 + + nn2_1 = max(1,nn2_1) + nn2_1 = min(nn2_1,nene2) + nn2_2 = max(1,nn2_2) + nn2_2 = min(nn2_2,nene2) + nn2_3 = max(1,nn2_3) + nn2_3 = min(nn2_3,nene2) + inv_deleps1 = 1.0d0 / deleps1 + + eps2 = enemin2+nn2_1*deltaene2 ! starting value for E + deleps2 = eps2 - eigen2_1tetra(4) ! E - epsilon_3 + + !----------------------------------------------------------------------- + ! This is case CII + !----------------------------------------------------------------------- + do ieps2 = nn2_1+1, nn2_2 + ! calculate running value of del "c" = c_l-c: first term should really mix eps1 and eps2 + delcc0 = cc(3) - deleps2*inv_deleps1 + + ii3 = dccde1*delcc0*inv_delcc(3)*inv_delcc(2) ! this is I_3(Omega E) + + dtweightde_tmp(4,ieps2,ieps1) = dtweightde_tmp(4,ieps2,ieps1) + & +& ii3*(1.d0 + 0.5d0*deleps1*inv_epsilon1(ind_c(3),4)* & +& (-2.0d0 + delcc0*inv_delcc(3)*epsilon1(ind_c(2),ind_c(3))*inv_epsilon1(ind_c(2),4) & +& + delcc0*inv_delcc(2)*epsilon1(ind_c(1),ind_c(3))*inv_epsilon1(ind_c(1),4))) + dtweightde_tmp(ind_c(3),ieps2,ieps1) = dtweightde_tmp(ind_c(3),ieps2,ieps1) + & +& ii3*0.5d0*deleps1*inv_epsilon1(ind_c(3),4)*(2.0d0 - delcc0*inv_delcc(3) - delcc0*inv_delcc(2)) + dtweightde_tmp(ind_c(2),ieps2,ieps1) = dtweightde_tmp(ind_c(2),ieps2,ieps1) + & +& ii3*0.5d0*delcc0*inv_delcc(3)*deleps1*inv_epsilon1(ind_c(2),4) + dtweightde_tmp(ind_c(1),ieps2,ieps1) = dtweightde_tmp(ind_c(1),ieps2,ieps1) + & +& ii3*0.5d0*delcc0*inv_delcc(2)*deleps1*inv_epsilon1(ind_c(1),4) + + deleps2 = deleps2 + deltaene2 + end do + + + eps2 = enemin2+nn2_2*deltaene2 + deleps2 = eps2 - eigen2_1tetra(4) + + !----------------------------------------------------------------------- + ! This is case CI + !----------------------------------------------------------------------- + do ieps2 = nn2_2+1, nn2_3 + ! calculate running value of del "c" = c-c_s: first term should really mix eps1 and eps2 + delcc0 = deleps2*inv_deleps1 - cc(1) ! c - c_s + + ii3 = dccde1*delcc0*inv_delcc(1)*inv_delcc(2) ! this is I_3(Omega E) + + dtweightde_tmp(4,ieps2,ieps1) = dtweightde_tmp(4,ieps2,ieps1) + & +& ii3*(1.d0 + 0.5d0*deleps1*inv_epsilon1(ind_c(1),4)* & +& (-2.0d0 + delcc0*inv_delcc(1)*epsilon1(ind_c(2),ind_c(1))*inv_epsilon1(ind_c(2),4) & +& + delcc0*inv_delcc(2)*epsilon1(ind_c(3),ind_c(1))*inv_epsilon1(ind_c(3),4))) + dtweightde_tmp(ind_c(1),ieps2,ieps1) = dtweightde_tmp(ind_c(1),ieps2,ieps1) + & +& ii3*0.5d0*deleps1*inv_epsilon1(ind_c(1),4)*(2.0d0 - delcc0*inv_delcc(1) - delcc0*inv_delcc(2)) + dtweightde_tmp(ind_c(2),ieps2,ieps1) = dtweightde_tmp(ind_c(2),ieps2,ieps1) + & +& ii3*0.5d0*delcc0*inv_delcc(1)*deleps1*inv_epsilon1(ind_c(2),4) + dtweightde_tmp(ind_c(3),ieps2,ieps1) = dtweightde_tmp(ind_c(3),ieps2,ieps1) + & +& ii3*0.5d0*delcc0*inv_delcc(2)*deleps1*inv_epsilon1(ind_c(3),4) + deleps2 = deleps2 + deltaene2 + end do + + deleps1 = deleps1 + deltaene1 + end do + + eps1 = eps1 + (nn1_4-nn1_3)*deltaene1 + ! + ! + ! interval e4 < eps < enemax + ! + do ieps1=nn1_4+1,nene1 + ! dtweightde unchanged by this tetrahedron + end do + + ! if we have a fully degenerate tetrahedron, + ! 1) the tweight is a Heaviside (step) function, which is correct above, but + ! 2) the dtweightde should contain a Dirac function: add a Gaussian here + + ! TODO: add treatment in double tetra case + ! end degenerate tetrahedron if + + ! the following blas calls are not working systematically, or do not give speed ups, strange... + !call daxpy (nene, 1.d0, dtweightde_tmp(:,1), 1, dtweightde_t(:,ind_ibz(1)), 1) + !call daxpy (nene, 1.d0, dtweightde_tmp(:,2), 1, dtweightde_t(:,ind_ibz(2)), 1) + !call daxpy (nene, 1.d0, dtweightde_tmp(:,3), 1, dtweightde_t(:,ind_ibz(3)), 1) + !call daxpy (nene, 1.d0, dtweightde_tmp(:,4), 1, dtweightde_t(:,ind_ibz(4)), 1) + + do ieps2 = 1, nene2 + dtweightde(ind_k(1),:,ieps2) = dtweightde(ind_k(1),:,ieps2) + dtweightde_tmp(1,ieps2,:) + dtweightde(ind_k(2),:,ieps2) = dtweightde(ind_k(2),:,ieps2) + dtweightde_tmp(2,ieps2,:) + dtweightde(ind_k(3),:,ieps2) = dtweightde(ind_k(3),:,ieps2) + dtweightde_tmp(3,ieps2,:) + dtweightde(ind_k(4),:,ieps2) = dtweightde(ind_k(4),:,ieps2) + dtweightde_tmp(4,ieps2,:) + !tweight(nkpt,nene1,nene2) + end do + + end do ! itetra + + ! transpose: otherwise the data access is crap and the code slows by an order of magnitude + TETRA_DEALLOCATE(tweight_tmp) + TETRA_DEALLOCATE(dtweightde_tmp) + +end subroutine get_dbl_tetra_weight +!!*** + +!!****f* m_tetrahedron/sort_tetra +!! NAME +!! sort_tetra +!! +!! FUNCTION +!! Sort double precision array list(n) into ascending numerical order using Heapsort +!! algorithm, while making corresponding rearrangement of the integer +!! array iperm. Consider that two double precision numbers +!! within tolerance tol are equal. +!! +!! INPUTS +!! n intent(in) dimension of the list +!! tol intent(in) numbers within tolerance are equal +!! list(n) intent(inout) list of double precision numbers to be sorted +!! iperm(n) intent(inout) iperm(i)=i (very important) +!! +!! OUTPUT +!! list(n) sorted list +!! iperm(n) index of permutation given the right ascending order +!! +!! SOURCE + + +subroutine sort_tetra(n,list,iperm,tol) + + integer, intent(in) :: n + integer, intent(inout) :: iperm(n) + real(dp), intent(inout) :: list(n) + real(dp), intent(in) :: tol + + integer :: l,ir,iap,i,j + real(dp) :: ap + character(len=500) :: msg + + if (n==1) then + ! Accomodate case of array of length 1: already sorted! + return + else if (n<1) then + ! Should not call with n<1 + write(msg,1000) n + 1000 format(/,' sort_tetra has been called with array length n=',i12,/, & +& ' having a value less than 1. This is not allowed.') + TETRA_ERROR(msg) + + else ! n>1 + + ! Conduct the usual sort + l=n/2+1 + ir=n + + do ! Infinite do-loop + if (l>1) then + l=l-1 + ap=list(l) + iap=iperm(l) + + else ! l<=1 + ap=list(ir) + iap=iperm(ir) + list(ir)=list(1) + iperm(ir)=iperm(1) + ir=ir-1 + + if (ir==1) then + list(1)=ap + iperm(1)=iap + exit ! This is the end of this algorithm + end if + end if ! l>1 + + i=l + j=l+l + + do while (j<=ir) + if (j1 + +end subroutine sort_tetra +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_tetrahedron/tetralib_has_mpi +!! NAME +!! tetralib_has_mpi +!! +!! FUNCTION +!! Return True if library has been compiled with MPI support +!! +!! SOURCE + +logical function tetralib_has_mpi() result(ans) + + ans = .False. +#ifdef HAVE_MPI + ans = .True. +#endif + +end function tetralib_has_mpi +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_tetrahedron/split_work +!! NAME +!! split_work +!! +!! FUNCTION +!! Splits the number of tasks, ntasks, among nprocs processors. Used for the MPI parallelization of simple loops. +!! +!! INPUTS +!! ntasks=number of tasks +!! comm=MPI communicator. +!! +!! OUTPUT +!! nprocs=Number of MPI processes in the communicator. +!! my_start,my_stop= indices defining the initial and final task for this processor +!! ierr=Exit status. +!! +!! NOTES +!! If nprocs>ntasks then : +!! my_start=ntasks+1 +!! my_stop=ntask +!! +!! In this particular case, loops of the form +!! +!! do ii=my_start,my_stop +!! ... +!! end do +!! +!! are not executed. Moreover allocation such as foo(my_start:my_stop) will generate a zero-sized array. +!! +!! SOURCE + +subroutine split_work(ntasks,comm,nprocs,my_start,my_stop,ierr) + +!Arguments ------------------------------------ + integer,intent(in) :: ntasks,comm + integer,intent(out) :: nprocs,my_start,my_stop,ierr + +!Local variables------------------------------- + integer :: res,my_rank,block_p1,block,mpierr + +! ************************************************************************* + + nprocs = 1; my_start = 1; my_stop = ntasks; ierr = 1 +#ifdef HAVE_MPI + call MPI_COMM_SIZE(comm,nprocs,mpierr); if (mpierr /= MPI_SUCCESS) return + call MPI_COMM_RANK(comm,my_rank,mpierr); if (mpierr /= MPI_SUCCESS) return + + block = ntasks/nprocs + res = MOD(ntasks,nprocs) + block_p1= block+1 + + if (my_rank tol6) inv_epsilon21 = 1.d0 / epsilon21 + inv_epsilon31 = zero; if (epsilon31 > tol6) inv_epsilon31 = 1.d0 / epsilon31 + inv_epsilon41 = zero; if (epsilon41 > tol6) inv_epsilon41 = 1.d0 / epsilon41 + inv_epsilon32 = zero; if (epsilon32 > tol6) inv_epsilon32 = 1.d0 / epsilon32 + inv_epsilon42 = zero; if (epsilon42 > tol6) inv_epsilon42 = 1.d0 / epsilon42 + inv_epsilon43 = zero; if (epsilon43 > tol6) inv_epsilon43 = 1.d0 / epsilon43 + + nn1 = int((eigen_1tetra(1)-enemin)/deltaene)+1 + nn2 = int((eigen_1tetra(2)-enemin)/deltaene)+1 + nn3 = int((eigen_1tetra(3)-enemin)/deltaene)+1 + nn4 = int((eigen_1tetra(4)-enemin)/deltaene)+1 + + nn1 = max(1,nn1) + nn1 = min(nn1,nene) + nn2 = max(1,nn2) + nn2 = min(nn2,nene) + nn3 = max(1,nn3) + nn3 = min(nn3,nene) + nn4 = max(1,nn4) + nn4 = min(nn4,nene) + + eps = enemin+nn1*deltaene + ! + !interval enemin < eps < e1 nothing to do + ! + ! + !interval e1 < eps < e2 + ! + deleps1 = eps-eigen_1tetra(1) + cc_pre = volconst_mult*inv_epsilon21*inv_epsilon31*inv_epsilon41 + invepsum = inv_epsilon21+inv_epsilon31+inv_epsilon41 + dccde_pre = 3.d0*volconst_mult*inv_epsilon21*inv_epsilon31*inv_epsilon41 + do ieps=nn1+1,nn2 + cc = cc_pre * deleps1*deleps1*deleps1 + tweight_tmp(ieps,1) = tweight_tmp(ieps,1) + cc*(4.d0-deleps1*invepsum) + tweight_tmp(ieps,2) = tweight_tmp(ieps,2) + cc*deleps1*inv_epsilon21 + tweight_tmp(ieps,3) = tweight_tmp(ieps,3) + cc*deleps1*inv_epsilon31 + tweight_tmp(ieps,4) = tweight_tmp(ieps,4) + cc*deleps1*inv_epsilon41 + + dccde = dccde_pre * deleps1*deleps1 + dtweightde_tmp(ieps,1) = dtweightde_tmp(ieps,1) + dccde*(4.d0 - deleps1*invepsum) -cc*invepsum + dtweightde_tmp(ieps,2) = dtweightde_tmp(ieps,2) + (dccde*deleps1 + cc) * inv_epsilon21 + dtweightde_tmp(ieps,3) = dtweightde_tmp(ieps,3) + (dccde*deleps1 + cc) * inv_epsilon31 + dtweightde_tmp(ieps,4) = dtweightde_tmp(ieps,4) + (dccde*deleps1 + cc) * inv_epsilon41 + + if (bcorr == 1) then + ! bxu, correction terms based on Bloechl's paper + tweight_tmp(ieps,1) = tweight_tmp(ieps,1) + & +& 4.d0*dccde_pre*deleps1*deleps1*(epsilon21+epsilon31+epsilon41)/40.d0 + tweight_tmp(ieps,2) = tweight_tmp(ieps,2) + & +& 4.d0*dccde_pre*deleps1*deleps1*(-epsilon21+epsilon32+epsilon42)/40.d0 + tweight_tmp(ieps,3) = tweight_tmp(ieps,3) + & +& 4.d0*dccde_pre*deleps1*deleps1*(-epsilon31-epsilon32+epsilon43)/40.d0 + tweight_tmp(ieps,4) = tweight_tmp(ieps,4) + & +& 4.d0*dccde_pre*deleps1*deleps1*(-epsilon41-epsilon42-epsilon43)/40.d0 + + dtweightde_tmp(ieps,1) = dtweightde_tmp(ieps,1) + & +& 8.d0*dccde_pre*deleps1*(epsilon21+epsilon31+epsilon41)/40.d0 + dtweightde_tmp(ieps,2) = dtweightde_tmp(ieps,2) + & +& 8.d0*dccde_pre*deleps1*(-epsilon21+epsilon32+epsilon42)/40.d0 + dtweightde_tmp(ieps,3) = dtweightde_tmp(ieps,3) + & +& 8.d0*dccde_pre*deleps1*(-epsilon31-epsilon32+epsilon43)/40.d0 + dtweightde_tmp(ieps,4) = dtweightde_tmp(ieps,4) + & +& 8.d0*dccde_pre*deleps1*(-epsilon41-epsilon42-epsilon43)/40.d0 + end if + + deleps1 = deleps1 + deltaene + end do + + eps = eps + (nn2-nn1)*deltaene + ! + ! interval e2 < eps < e3 + ! + deleps1 = eps-eigen_1tetra(1) + deleps2 = eps-eigen_1tetra(2) + deleps3 = eigen_1tetra(3)-eps + deleps4 = eigen_1tetra(4)-eps + + cc1_pre = volconst_mult*inv_epsilon31*inv_epsilon41 + cc2_pre = volconst_mult*inv_epsilon41*inv_epsilon32*inv_epsilon31 + cc3_pre = volconst_mult*inv_epsilon42*inv_epsilon32*inv_epsilon41 + + dcc1de_pre = 2.d0*cc1_pre + dcc2de_pre = cc2_pre + dcc3de_pre = cc3_pre + do ieps=nn2+1,nn3 + cc1 = cc1_pre * deleps1*deleps1 + cc2 = cc2_pre * deleps1*deleps2*deleps3 + cc3 = cc3_pre * deleps2*deleps2*deleps4 + + tweight_tmp(ieps,1) = tweight_tmp(ieps,1) + & +& cc1 + (cc1+cc2)*deleps3*inv_epsilon31 + (cc1+cc2+cc3)*deleps4*inv_epsilon41 + tweight_tmp(ieps,2) = tweight_tmp(ieps,2) + & +& cc1+cc2+cc3+(cc2+cc3)*deleps3*inv_epsilon32 + cc3*deleps4*inv_epsilon42 + tweight_tmp(ieps,3) = tweight_tmp(ieps,3) + & +& (cc1+cc2)*deleps1*inv_epsilon31 + (cc2+cc3)*deleps2*inv_epsilon32 + tweight_tmp(ieps,4) = tweight_tmp(ieps,4) + & +& (cc1+cc2+cc3)*deleps1*inv_epsilon41 + cc3*deleps2*inv_epsilon42 + + + dcc1de = dcc1de_pre * deleps1 + dcc2de = dcc2de_pre * (-deleps1*deleps2 +deleps1*deleps3 +deleps2*deleps3) + dcc3de = dcc3de_pre * (2.d0*deleps2*deleps4 -deleps2*deleps2) + + dtweightde_tmp(ieps,1) = dtweightde_tmp(ieps,1) & +& + dcc1de & +& + ((dcc1de+dcc2de)*deleps3 -(cc1+cc2)) * inv_epsilon31 & +& + ((dcc1de+dcc2de+dcc3de)*deleps4 -(cc1+cc2+cc3)) * inv_epsilon41 + dtweightde_tmp(ieps,2) = dtweightde_tmp(ieps,2) & +& + dcc1de+dcc2de+dcc3de & +& + ((dcc2de+dcc3de)*deleps3 -(cc2+cc3) ) * inv_epsilon32 & +& + (dcc3de*deleps4 -cc3 ) * inv_epsilon42 + dtweightde_tmp(ieps,3) = dtweightde_tmp(ieps,3) & +& + ((dcc1de+dcc2de)*deleps1 + (cc1+cc2) ) * inv_epsilon31 & +& + ((dcc2de+dcc3de)*deleps2 + (cc2+cc3) ) * inv_epsilon32 + dtweightde_tmp(ieps,4) = dtweightde_tmp(ieps,4) & +& + ((dcc1de+dcc2de+dcc3de)*deleps1 + (cc1+cc2+cc3) ) * inv_epsilon41 & +& + (dcc3de*deleps2 + cc3) * inv_epsilon42 + + if (bcorr == 1) then + ! bxu, correction terms based on Bloechl's paper + ! The correction terms may cause the dtweightde become negative + tweight_tmp(ieps,1) = tweight_tmp(ieps,1) + & +& 4.d0*cc1_pre* & +& (3.d0*epsilon21+6.d0*deleps2-3.d0*(epsilon31+epsilon42)*deleps2**2.d0*inv_epsilon32*inv_epsilon42)* & +& (epsilon21+epsilon31+epsilon41)/40.d0 + tweight_tmp(ieps,2) = tweight_tmp(ieps,2) + & +& 4.d0*cc1_pre* & +& (3.d0*epsilon21+6.d0*deleps2-3.d0*(epsilon31+epsilon42)*deleps2**2.d0*inv_epsilon32*inv_epsilon42)* & +& (-epsilon21+epsilon32+epsilon42)/40.d0 + tweight_tmp(ieps,3) = tweight_tmp(ieps,3) + & +& 4.d0*cc1_pre* & +& (3.d0*epsilon21+6.d0*deleps2-3.d0*(epsilon31+epsilon42)*deleps2**2.d0*inv_epsilon32*inv_epsilon42)* & +& (-epsilon31-epsilon32+epsilon43)/40.d0 + tweight_tmp(ieps,4) = tweight_tmp(ieps,4) + & +& 4.d0*cc1_pre* & +& (3.d0*epsilon21+6.d0*deleps2-3.d0*(epsilon31+epsilon42)*deleps2**2.d0*inv_epsilon32*inv_epsilon42)* & +& (-epsilon41-epsilon42-epsilon43)/40.d0 + + dtweightde_tmp(ieps,1) = dtweightde_tmp(ieps,1) + & +& 4.d0*cc1_pre* & +& (6.d0-6.d0*(epsilon31+epsilon42)*deleps2*inv_epsilon32*inv_epsilon42)* & +& (epsilon21+epsilon31+epsilon41)/40.d0 + dtweightde_tmp(ieps,2) = dtweightde_tmp(ieps,2) + & +& 4.d0*cc1_pre* & +& (6.d0-6.d0*(epsilon31+epsilon42)*deleps2*inv_epsilon32*inv_epsilon42)* & +& (-epsilon21+epsilon32+epsilon42)/40.d0 + dtweightde_tmp(ieps,3) = dtweightde_tmp(ieps,3) + & +& 4.d0*cc1_pre* & +& (6.d0-6.d0*(epsilon31+epsilon42)*deleps2*inv_epsilon32*inv_epsilon42)* & +& (-epsilon31-epsilon32+epsilon43)/40.d0 + dtweightde_tmp(ieps,4) = dtweightde_tmp(ieps,4) + & +& 4.d0*cc1_pre* & +& (6.d0-6.d0*(epsilon31+epsilon42)*deleps2*inv_epsilon32*inv_epsilon42)* & +& (-epsilon41-epsilon42-epsilon43)/40.d0 + end if + + deleps1 = deleps1 + deltaene + deleps2 = deleps2 + deltaene + deleps3 = deleps3 - deltaene + deleps4 = deleps4 - deltaene + end do + + eps = eps + (nn3-nn2)*deltaene + ! + ! interval e3 < eps < e4 + ! + deleps4 = eigen_1tetra(4)-eps + cc_pre = volconst_mult*inv_epsilon41*inv_epsilon42*inv_epsilon43 + invepsum = inv_epsilon41+inv_epsilon42+inv_epsilon43 + dccde_pre = -3.d0*cc_pre + do ieps=nn3+1,nn4 + cc = cc_pre * deleps4*deleps4*deleps4 + cc_tmp = cc * deleps4 + tweight_tmp(ieps,1) = tweight_tmp(ieps,1) + volconst_mult - cc_tmp*inv_epsilon41 + tweight_tmp(ieps,2) = tweight_tmp(ieps,2) + volconst_mult - cc_tmp*inv_epsilon42 + tweight_tmp(ieps,3) = tweight_tmp(ieps,3) + volconst_mult - cc_tmp*inv_epsilon43 + tweight_tmp(ieps,4) = tweight_tmp(ieps,4) + volconst_mult - cc*4.d0 + cc_tmp*invepsum + + dccde = dccde_pre * deleps4*deleps4 + dccde_tmp = -dccde*deleps4 + cc + dtweightde_tmp(ieps,1) = dtweightde_tmp(ieps,1) + dccde_tmp * inv_epsilon41 + dtweightde_tmp(ieps,2) = dtweightde_tmp(ieps,2) + dccde_tmp * inv_epsilon42 + dtweightde_tmp(ieps,3) = dtweightde_tmp(ieps,3) + dccde_tmp * inv_epsilon43 + dtweightde_tmp(ieps,4) = dtweightde_tmp(ieps,4) - dccde*4.d0 - dccde_tmp*invepsum + + if (bcorr == 1) then + ! bxu, correction terms based on Bloechl's paper + ! The correction terms may cause the dtweightde become negative + tweight_tmp(ieps,1) = tweight_tmp(ieps,1) + & +& 12.d0*cc_pre*deleps4*deleps4*(epsilon21+epsilon31+epsilon41)/40.d0 + tweight_tmp(ieps,2) = tweight_tmp(ieps,2) + & +& 12.d0*cc_pre*deleps4*deleps4*(-epsilon21+epsilon32+epsilon42)/40.d0 + tweight_tmp(ieps,3) = tweight_tmp(ieps,3) + & +& 12.d0*cc_pre*deleps4*deleps4*(-epsilon31-epsilon32+epsilon43)/40.d0 + tweight_tmp(ieps,4) = tweight_tmp(ieps,4) + & +& 12.d0*cc_pre*deleps4*deleps4*(-epsilon41-epsilon42-epsilon43)/40.d0 + + dtweightde_tmp(ieps,1) = dtweightde_tmp(ieps,1) - & +& 24.d0*cc_pre*deleps4*(epsilon21+epsilon31+epsilon41)/40.d0 + dtweightde_tmp(ieps,2) = dtweightde_tmp(ieps,2) - & +& 24.d0*cc_pre*deleps4*(-epsilon21+epsilon32+epsilon42)/40.d0 + dtweightde_tmp(ieps,3) = dtweightde_tmp(ieps,3) - & +& 24.d0*cc_pre*deleps4*(-epsilon31-epsilon32+epsilon43)/40.d0 + dtweightde_tmp(ieps,4) = dtweightde_tmp(ieps,4) - & +& 24.d0*cc_pre*deleps4*(-epsilon41-epsilon42-epsilon43)/40.d0 + end if + + deleps4 = deleps4 - deltaene + end do + eps = eps + (nn4-nn3)*deltaene + ! + ! + ! interval e4 < eps < enemax + ! + do ieps=nn4+1,nene + tweight_tmp(ieps,1) = tweight_tmp(ieps,1) + volconst_mult + tweight_tmp(ieps,2) = tweight_tmp(ieps,2) + volconst_mult + tweight_tmp(ieps,3) = tweight_tmp(ieps,3) + volconst_mult + tweight_tmp(ieps,4) = tweight_tmp(ieps,4) + volconst_mult + ! dtweightde unchanged by this tetrahedron + end do + + ! + ! if we have a fully degenerate tetrahedron, + ! 1) the tweight is a Heaviside (step) function, which is correct above, but + ! 2) the dtweightde should contain a Dirac function: add a Gaussian here + ! + if (epsilon41 < tol6) then + + ! to ensure the gaussian will integrate properly: + ! WARNING: this smearing could be problematic if too large + ! and doesnt integrate well if its too small + gau_width = 10.0d0*deltaene + gau_width2 = 1.0 / gau_width / gau_width + gau_prefactor = volconst_mult / gau_width / sqrtpi + ! + ! average position since bracket for epsilon41 is relatively large + cc = (eigen_1tetra(1)+eigen_1tetra(2)+eigen_1tetra(3)+eigen_1tetra(4))/4.d0 + eps = enemin + do ieps=1,nene + tmp = eps - cc + gval = gau_prefactor*exp(-tmp*tmp*gau_width2) + ! MG TODO: I think this is not correct, because we have divided by 4 so + ! the other points should be accumulated as well. + ! There are however changes in the unit tests if I activate these lines... + !dtweightde_tmp(ieps,1) = dtweightde_tmp(ieps,1) + gval + !dtweightde_tmp(ieps,2) = dtweightde_tmp(ieps,2) + gval + !dtweightde_tmp(ieps,3) = dtweightde_tmp(ieps,3) + gval + dtweightde_tmp(ieps,4) = dtweightde_tmp(ieps,4) + gval + eps = eps + deltaene + end do + end if ! end degenerate tetrahedron if + +end subroutine get_onetetra_ +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_tetrahedron/tetra_get_onewk +!! NAME +!! tetra_get_onewk +!! +!! FUNCTION +!! Calculate integration weights and their derivatives for a single k-point in the IBZ. +!! +!! INPUTS +!! tetra=Object with tables for tetrahedron method. +!! ik_ibz=Index of the k-point in the IBZ array +!! bcorr=1 to include Blochl correction else 0. +!! nene=number of energies for DOS +!! nibz=number of irreducible kpoints +!! eigen_ibz(nkibz)=eigenenergies for each k point +!! enemin=minimal energy for DOS +!! enemax=maximal energy for DOS +!! max_occ=maximal occupation number (2 for nsppol=1, 1 for nsppol=2) +!! +!! OUTPUT +!! weights(nene,2) = integration weights for +!! Dirac delta (derivative of theta wrt energy) and Theta (Heaviside function) +!! for a given (band, k-point, spin). +!! +!! SOURCE + +subroutine tetra_get_onewk(tetra,ik_ibz,bcorr,nene,nkibz,eig_ibz,enemin,enemax,max_occ,weights) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: ik_ibz,nene,nkibz,bcorr + type(t_tetrahedron), intent(in) :: tetra + real(dp) ,intent(in) :: enemin,enemax,max_occ +!arrays + real(dp),intent(in) :: eig_ibz(nkibz) + real(dp),intent(out) :: weights(nene,2) + +!Local variables------------------------------- +!scalars + integer :: itetra,ii +!arrays + integer :: ind_ibz(4) + real(dp) :: tweight_tmp(nene,4),dtweightde_tmp(nene,4),eigen_1tetra(4) + +! ********************************************************************* + + weights = zero + + ! For each tetrahedron + do itetra=1,tetra%ntetra + + ! Here we need the original ordering to reference the correct irred kpoints + ind_ibz(:) = tetra%tetra_full(:,1,itetra) + ! Cycle if this tetra does not contribute to this k-point. + if (all(ind_ibz /= ik_ibz)) cycle + + ! Sort energies before calling get_onetetra_ + eigen_1tetra(:) = eig_ibz(ind_ibz(:)) + call sort_tetra(4, eigen_1tetra, ind_ibz, tol14) + + call get_onetetra_(tetra, itetra, eigen_1tetra, enemin, enemax, max_occ, nene, bcorr, & + tweight_tmp, dtweightde_tmp) + + ! Accumulate contributions to ik_ibz (there might be multiple vertexes that map onto ik_ibz) + do ii=1,4 + if (ind_ibz(ii) == ik_ibz) then + weights(:,1) = weights(:,1) + dtweightde_tmp(:,ii) + weights(:,2) = weights(:,2) + tweight_tmp(:,ii) + end if + end do + end do ! itetra + +end subroutine tetra_get_onewk +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_tetrahedron/tetra_get_onewk_wvals +!! NAME +!! tetra_get_onewk_wvals +!! +!! FUNCTION +!! Calculate integration weights and their derivatives for a single k-point in the IBZ. +!! +!! INPUTS +!! tetra=Object with tables for tetrahedron method. +!! ik_ibz=Index of the k-point in the IBZ array +!! bcorr=1 to include Blochl correction else 0. +!! nw=number of energies in wvals +!! nibz=number of irreducible kpoints +!! wvals(nw)=Frequency points. +!! eigen_ibz(nkibz)=eigenenergies for each k point +!! [wtol]: If present, frequency points that differ by less that wtol are treated as equivalent. +!! and the tetrahedron integration is performed only once per frequency point. +!! +!! OUTPUT +!! weights(nw,2) = integration weights for +!! Dirac delta (derivative of theta wrt energy) and Theta (Heaviside function) +!! for a given (band, k-point, spin). +!! +!! SOURCE + +subroutine tetra_get_onewk_wvals(tetra, ik_ibz, bcorr, nw, wvals, nkibz, eig_ibz, weights, wtol) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: ik_ibz,nw,nkibz,bcorr + real(dp), optional, intent(in) :: wtol + type(t_tetrahedron), intent(in) :: tetra +!arrays + real(dp),intent(in) :: wvals(nw) + real(dp),intent(in) :: eig_ibz(nkibz) + real(dp),intent(out) :: weights(nw, 2) + +!Local variables------------------------------- +!scalars + !integer,save :: done = 0 + integer,parameter :: nene=3 + integer :: itetra,ii,jj,iw,ie + logical :: samew + real(dp),parameter :: max_occ1 = one + real(dp) :: enemin, enemax +!arrays + integer :: ind_ibz(4) + real(dp) :: theta_tmp(nene,4), delta_tmp(nene,4), eigen_1tetra(4) + +! ********************************************************************* + + weights = zero + + ! For each tetrahedron + do jj=1,tetra%ibz_tetra_count(ik_ibz) + itetra = tetra%ibz_tetra_mapping(ik_ibz,jj) + + ! Here we need the original ordering to reference the correct irred kpoints + ind_ibz(:) = tetra%tetra_full(:,1,itetra) + + ! Sort energies before calling get_onetetra_ + eigen_1tetra(:) = eig_ibz(ind_ibz(:)) + call sort_tetra(4, eigen_1tetra, ind_ibz, tol14) + + do iw=1,nw + samew = .False. + if (present(wtol)) then + if (iw > 1) samew = abs(wvals(iw) - wvals(iw - 1)) < wtol + end if + if (.not. samew) then + enemin = wvals(iw) - 0.01; enemax = wvals(iw) + 0.01 + ie = nene / 2 + 1 + call get_onetetra_(tetra, itetra, eigen_1tetra, enemin, enemax, max_occ1, nene, bcorr, & + theta_tmp, delta_tmp) + end if + + ! Accumulate contributions to ik_ibz (there might be multiple vertexes that map onto ik_ibz) + do ii=1,4 + if (ind_ibz(ii) == ik_ibz) then + weights(iw, 1) = weights(iw, 1) + delta_tmp(ie, ii) + weights(iw, 2) = weights(iw, 2) + theta_tmp(ie, ii) + end if + end do + end do ! iw + end do ! itetra + +end subroutine tetra_get_onewk_wvals +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_tetrahedron/tetra_get_onetetra_wvals +!! NAME +!! tetra_get_onetetra_wvals +!! +!! FUNCTION +!! Calculate integration weights and their derivatives for a single k-point in the IBZ. +!! +!! INPUTS +!! tetra=Object with tables for tetrahedron method. +!! ik_ibz=Index of the k-point in the IBZ array +!! bcorr=1 to include Blochl correction else 0. +!! nw=number of energies in wvals +!! nibz=number of irreducible kpoints +!! wvals(nw)=Frequency points. +!! eigen_ibz(nkibz)=eigenenergies for each k point +!! [wtol]: If present, frequency points that differ by less that wtol are treated as equivalent. +!! and the tetrahedron integration is performed only once per frequency point. +!! +!! OUTPUT +!! weights(nw,2) = integration weights for +!! Dirac delta (derivative of theta wrt energy) and Theta (Heaviside function) +!! for a given (band, k-point, spin). +!! +!! SOURCE + +subroutine tetra_get_onetetra_wvals(tetra, itetra, eigen_1tetra, bcorr, nw, wvals, weights, wtol) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: nw,bcorr + real(dp), optional, intent(in) :: wtol + type(t_tetrahedron), intent(in) :: tetra +!arrays + real(dp),intent(in) :: wvals(nw) + real(dp),intent(out) :: weights(nw, 2, 4) + +!Local variables------------------------------- +!scalars + !integer,save :: done = 0 + integer,parameter :: nene3=3 + integer :: itetra,ii,idx,iw,ie + integer :: ind(4) + logical :: samew + real(dp),parameter :: max_occ1 = one + real(dp) :: enemin, enemax +!arrays + real(dp) :: theta_tmp(nene3,4), delta_tmp(nene3,4), eigen_1tetra(4) + +! ********************************************************************* + + ind = [1,2,3,4] + call sort_tetra(4, eigen_1tetra, ind, tol14) + weights = 0 + + !for all the frequencies + do iw=1,nw + samew = .False. + if (present(wtol)) then + if (iw > 1) samew = abs(wvals(iw) - wvals(iw - 1)) < wtol + end if + if (.not. samew) then + enemin = wvals(iw) - 0.01 + enemax = wvals(iw) + 0.01 + ie = nene3 / 2 + 1 + call get_onetetra_(tetra, itetra, eigen_1tetra, enemin, enemax, max_occ1, nene3, bcorr, & + theta_tmp, delta_tmp) + end if + + ! Accumulate contributions to ik_ibz (there might be multiple vertexes that map onto ik_ibz) + do ii=1,4 + idx = ind(ii) + weights(iw, 1, idx) = weights(iw, 1, idx) + delta_tmp(ie, ii) + weights(iw, 2, idx) = weights(iw, 2, idx) + theta_tmp(ie, ii) + end do + end do !iw + +end subroutine tetra_get_onetetra_wvals +!!*** + +end module m_tetrahedron +!!*** diff --git a/GX-PAW/common/src/17_libtetra_ext/m_tetrahedron.o b/GX-PAW/common/src/17_libtetra_ext/m_tetrahedron.o new file mode 100644 index 00000000..2c61db84 Binary files /dev/null and b/GX-PAW/common/src/17_libtetra_ext/m_tetrahedron.o differ diff --git a/GX-PAW/common/src/17_minimax/Makefile b/GX-PAW/common/src/17_minimax/Makefile new file mode 100644 index 00000000..3e44ce97 --- /dev/null +++ b/GX-PAW/common/src/17_minimax/Makefile @@ -0,0 +1,1481 @@ +# Makefile.in generated by automake 1.16.3 from Makefile.am. +# shared/common/src/17_minimax/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994-2020 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-corelibs on 2024/03/16 21:07:38 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-corelibs script or its config file instead. +# + + +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/abinit +pkgincludedir = $(includedir)/abinit +pkglibdir = $(libdir)/abinit +pkglibexecdir = $(libexecdir)/abinit +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = x86_64-apple-darwin18.7.0 +host_triplet = x86_64-apple-darwin18.7.0 +target_triplet = x86_64-apple-darwin18.7.0 +subdir = shared/common/src/17_minimax +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/m4/arch-gpu.m4 \ + $(top_srcdir)/config/m4/arch-mpi.m4 \ + $(top_srcdir)/config/m4/auto-autotools.m4 \ + $(top_srcdir)/config/m4/auto-corelibs.m4 \ + $(top_srcdir)/config/m4/auto-debug.m4 \ + $(top_srcdir)/config/m4/auto-dirflags.m4 \ + $(top_srcdir)/config/m4/auto-env.m4 \ + $(top_srcdir)/config/m4/auto-hints.m4 \ + $(top_srcdir)/config/m4/auto-optim.m4 \ + $(top_srcdir)/config/m4/auto-options.m4 \ + $(top_srcdir)/config/m4/auto-output.m4 \ + $(top_srcdir)/config/m4/auto-triggers.m4 \ + $(top_srcdir)/config/m4/conf-atompaw.m4 \ + $(top_srcdir)/config/m4/conf-debug.m4 \ + $(top_srcdir)/config/m4/conf-fallbacks.m4 \ + $(top_srcdir)/config/m4/conf-files.m4 \ + $(top_srcdir)/config/m4/conf-init.m4 \ + $(top_srcdir)/config/m4/conf-openmp.m4 \ + $(top_srcdir)/config/m4/conf-optim.m4 \ + $(top_srcdir)/config/m4/lang-c++.m4 \ + $(top_srcdir)/config/m4/lang-c.m4 \ + $(top_srcdir)/config/m4/lang-fortran-import.m4 \ + $(top_srcdir)/config/m4/lang-fortran.m4 \ + $(top_srcdir)/config/m4/lang-python.m4 \ + $(top_srcdir)/config/m4/libxml2.m4 \ + $(top_srcdir)/config/m4/misc-display.m4 \ + $(top_srcdir)/config/m4/sd_abinit_common.m4 \ + $(top_srcdir)/config/m4/sd_arch_gpu.m4 \ + $(top_srcdir)/config/m4/sd_arch_mpi.m4 \ + $(top_srcdir)/config/m4/sd_bigdft.m4 \ + $(top_srcdir)/config/m4/sd_core.m4 \ + $(top_srcdir)/config/m4/sd_esl.m4 \ + $(top_srcdir)/config/m4/sd_fftw3.m4 \ + $(top_srcdir)/config/m4/sd_gpu_kokkos.m4 \ + $(top_srcdir)/config/m4/sd_gpu_yakl.m4 \ + $(top_srcdir)/config/m4/sd_io_hdf5.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf_fortran.m4 \ + $(top_srcdir)/config/m4/sd_levmar.m4 \ + $(top_srcdir)/config/m4/sd_libpaw.m4 \ + $(top_srcdir)/config/m4/sd_libpsml.m4 \ + $(top_srcdir)/config/m4/sd_libxc.m4 \ + $(top_srcdir)/config/m4/sd_math_fft.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_core.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_util.m4 \ + $(top_srcdir)/config/m4/sd_papi.m4 \ + $(top_srcdir)/config/m4/sd_pfft.m4 \ + $(top_srcdir)/config/m4/sd_triqs.m4 \ + $(top_srcdir)/config/m4/sd_wannier90.m4 \ + $(top_srcdir)/config/m4/sd_xmlf90.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +AM_V_AR = $(am__v_AR_$(V)) +am__v_AR_ = $(am__v_AR_$(AM_DEFAULT_VERBOSITY)) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = +lib17_minimax_a_AR = $(AR) $(ARFLAGS) +lib17_minimax_a_LIBADD = +am__objects_1 = minimax_grids.$(OBJEXT) minimax_omega.$(OBJEXT) \ + minimax_tau.$(OBJEXT) minimax_utils.$(OBJEXT) +am_lib17_minimax_a_OBJECTS = $(am__objects_1) +lib17_minimax_a_OBJECTS = $(am_lib17_minimax_a_OBJECTS) +AM_V_P = $(am__v_P_$(V)) +am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY)) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I. -I$(top_builddir) +PPFCCOMPILE = $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) +AM_V_PPFC = $(am__v_PPFC_$(V)) +am__v_PPFC_ = $(am__v_PPFC_$(AM_DEFAULT_VERBOSITY)) +am__v_PPFC_0 = @echo " PPFC " $@; +am__v_PPFC_1 = +FCLD = $(FC) +FCLINK = $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \ + $@ +AM_V_FCLD = $(am__v_FCLD_$(V)) +am__v_FCLD_ = $(am__v_FCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_FCLD_0 = @echo " FCLD " $@; +am__v_FCLD_1 = +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(lib17_minimax_a_SOURCES) +DIST_SOURCES = $(lib17_minimax_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ABINIT_BINARY_PACKAGE = abinit-10.0.0.83-58be4d_x86_64_darwin18.7.0_gnu9.4 +ABINIT_COMMON_CPPFLAGS = +ABINIT_COMMON_FCFLAGS = +ABINIT_COMMON_LDFLAGS = +ABINIT_COMMON_LIBS = +ABINIT_TARGET = x86_64_darwin18.7.0_gnu9.4 +ABINIT_VERSION = 10.0.0.83-58be4d +ABINIT_VERSION_BASE = 10.0 +ABINIT_VERSION_BUILD = 20240316 +ABINIT_VERSION_MAJOR = 10 +ABINIT_VERSION_MICRO = 0 +ABINIT_VERSION_MINOR = 0 +ABI_CPPFLAGS = -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include +ACLOCAL = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' aclocal-1.16 +AMTAR = $${TAR-tar} +AM_DEFAULT_VERBOSITY = 1 +AR = ar +ARFLAGS = rc +ARFLAGS_CMD = rc +ARFLAGS_DEBUG = +ARFLAGS_EXTRA = +ARFLAGS_HINTS = +ARFLAGS_OPTIM = +ATOMPAW_BIN = +AUTOCONF = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' autoconf +AUTOHEADER = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' autoheader +AUTOMAKE = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' automake-1.16 +AWK = awk +BIGDFT_CPPFLAGS = +BIGDFT_FCFLAGS = +BIGDFT_LDFLAGS = +BIGDFT_LIBS = +BOURNE_SHELL = /bin/sh +CC = /opt/local/bin/mpicc +CCDEPMODE = depmode=gcc3 +CC_LDFLAGS = +CC_LDFLAGS_DEBUG = +CC_LDFLAGS_EXTRA = +CC_LDFLAGS_GPU = +CC_LDFLAGS_HINTS = +CC_LDFLAGS_OPTIM = +CC_LIBS = +CC_LIBS_DEBUG = +CC_LIBS_EXTRA = +CC_LIBS_GPU = +CC_LIBS_HINTS = +CC_LIBS_OPTIM = +CFLAGS = -O2 -g +CFLAGS_DEBUG = +CFLAGS_EXTRA = +CFLAGS_GPU = +CFLAGS_HINTS = +CFLAGS_OPTIM = +CPP = /opt/local/bin/mpicc -E +CPPFLAGS = +CPPFLAGS_DEBUG = +CPPFLAGS_EXTRA = +CPPFLAGS_GPU = +CPPFLAGS_HINTS = +CPPFLAGS_HINTS_EXT = -P -std=c99 +CPPFLAGS_OPTIM = +CXX = /opt/local/bin/mpicxx +CXXDEPMODE = depmode=gcc3 +CXXFLAGS = -O2 -g +CXXFLAGS_DEBUG = +CXXFLAGS_EXTRA = +CXXFLAGS_GPU = +CXXFLAGS_HINTS = +CXXFLAGS_OPTIM = +CXX_LDFLAGS = +CXX_LDFLAGS_DEBUG = +CXX_LDFLAGS_EXTRA = +CXX_LDFLAGS_GPU = +CXX_LDFLAGS_HINTS = +CXX_LDFLAGS_OPTIM = +CXX_LIBS = +CXX_LIBS_DEBUG = +CXX_LIBS_EXTRA = +CXX_LIBS_GPU = +CXX_LIBS_HINTS = +CXX_LIBS_OPTIM = +CYGPATH_W = echo +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +ECHO_C = \c +ECHO_N = +ECHO_T = +EGREP = /usr/bin/grep -E +EXEEXT = +F77 = /opt/local/bin/mpif90 +FC = /opt/local/bin/mpif90 +FCFLAGS = -O2 -g -ffree-line-length-none -I/opt/local/include -I/opt/local/include -I/opt/local/include +FCFLAGS_DEBUG = +FCFLAGS_EXTRA = +FCFLAGS_F90 = +FCFLAGS_FIXEDFORM = -ffixed-form +FCFLAGS_FREEFORM = -ffree-form +FCFLAGS_HINTS = -ffree-line-length-none +FCFLAGS_MODDIR = -J../mods +FCFLAGS_OPENMP = +FCFLAGS_OPENMP_OFFLOAD = +FCFLAGS_OPTIM = +FCLIBS = -L/opt/local/lib -L/opt/local/lib/openmpi-gcc9 -L/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0 -L/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/../../.. -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi -lgfortran -lquadmath -lm +FC_LDFLAGS = +FC_LDFLAGS_DEBUG = +FC_LDFLAGS_EXTRA = +FC_LDFLAGS_HINTS = +FC_LDFLAGS_OPTIM = +FC_LIBS = +FC_LIBS_DEBUG = +FC_LIBS_EXTRA = +FC_LIBS_HINTS = +FC_LIBS_OPTIM = +FC_NOWRAP = /opt/local/bin/mpif90 +FFLAGS = -O2 -g -ffree-line-length-none -I/opt/local/include -I/opt/local/include -I/opt/local/include +FFTW3_CFLAGS = +FFTW3_CPPFLAGS = -I/opt/local/include +FFTW3_FCFLAGS = -I/opt/local/include +FFTW3_LDFLAGS = +FFTW3_LIBS = -L/opt/local/lib -lfftw3 -lfftw3f +FFT_CFLAGS = +FFT_FCFLAGS = +FPP = +FPPFLAGS = +FPPFLAGS_DEBUG = +FPPFLAGS_EXTRA = +FPPFLAGS_HINTS = +FPPFLAGS_OPTIM = +GPU_ARCH = +GPU_CFLAGS = +GPU_CPPFLAGS = +GPU_CXXFLAGS = +GPU_FCFLAGS = +GPU_LDFLAGS = +GPU_LIBS = +GRAPHATOM_BIN = +GREP = /usr/bin/grep +H5CC = +HDF5_CFLAGS = +HDF5_CPPFLAGS = +HDF5_CXXFLAGS = +HDF5_FCFLAGS = +HDF5_LDFLAGS = +HDF5_LIBS = +INSTALL = /opt/local/libexec/gnubin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +KOKKOS_CPPFLAGS = +KOKKOS_CXXFLAGS = +KOKKOS_LDFLAGS = +KOKKOS_LIBS = +LDFLAGS = +LEVMAR_CFLAGS = +LEVMAR_CPPFLAGS = +LEVMAR_LDFLAGS = +LEVMAR_LIBS = +LIBOBJS = +LIBPAW_CPPFLAGS = +LIBPAW_FCFLAGS = +LIBPAW_LDFLAGS = +LIBPAW_LIBS = +LIBPSML_CPPFLAGS = +LIBPSML_FCFLAGS = +LIBPSML_LDFLAGS = +LIBPSML_LIBS = +LIBS = -L/opt/local/lib -lwannier -L/opt/local/lib -lxc -L/opt/local/lib -lnetcdff -L/opt/local/lib -lnetcdf -L/opt/local/lib -L/opt/local/lib -lhdf5_hl -L/opt/local/lib -lhdf5 -lz -ldl -lm -L/opt/local/lib -lfftw3 -lfftw3f +LIBXC_CFLAGS = +LIBXC_CPPFLAGS = +LIBXC_FCFLAGS = +LIBXC_LDFLAGS = +LIBXC_LIBS = +LIBXML2_CPPFLAGS = +LIBXML2_FCFLAGS = +LIBXML2_LIBS = +LINALG_CFLAGS = +LINALG_CPPFLAGS = +LINALG_CXXFLAGS = +LINALG_FCFLAGS = -I/opt/local/include +LINALG_LDFLAGS = +LINALG_LIBS = -L/opt/local/lib -lopenblas +LN_S = ln -s +LTLIBOBJS = +MAKEINFO = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' makeinfo +MKDIR_P = /opt/local/libexec/gnubin/mkdir -p +MODEXT = mod +MPI_CFLAGS = +MPI_CPPFLAGS = +MPI_CXXFLAGS = +MPI_FCFLAGS = +MPI_LDFLAGS = +MPI_LIBS = +MV = /opt/local/libexec/gnubin/mv +NETCDF_CFLAGS = +NETCDF_CPPFLAGS = +NETCDF_CXXFLAGS = +NETCDF_FCFLAGS = +NETCDF_FORTRAN_CFLAGS = +NETCDF_FORTRAN_CPPFLAGS = +NETCDF_FORTRAN_CXXFLAGS = +NETCDF_FORTRAN_FCFLAGS = +NETCDF_FORTRAN_LDFLAGS = +NETCDF_FORTRAN_LIBS = +NETCDF_LDFLAGS = +NETCDF_LIBS = +NVCC = +NVCC_CFLAGS = +NVCC_CPPFLAGS = +NVCC_LDFLAGS = +NVCC_LIBS = +OBJEXT = o +PACKAGE = abinit +PACKAGE_BUGREPORT = https://bugs.launchpad.net/abinit/ +PACKAGE_NAME = ABINIT +PACKAGE_STRING = ABINIT 10.0.0.83-58be4d +PACKAGE_TARNAME = abinit +PACKAGE_URL = +PACKAGE_VERSION = 10.0.0.83-58be4d +PAPI_CFLAGS = +PAPI_CPPFLAGS = +PAPI_LDFLAGS = +PAPI_LIBS = +PATCH = patch +PATH_SEPARATOR = : +PERL = /usr/bin/perl +PFFT_CFLAGS = +PFFT_CPPFLAGS = +PFFT_LDFLAGS = +PFFT_LIBS = +PYFLAGS = +PYTHON = python3.9 +PYTHON_CONFIG = python3.9-config +PYTHON_CPPFLAGS = -I/opt/local/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -I/opt/local/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 +RANLIB = ranlib +REALPATH = realpath +RM = /opt/local/libexec/gnubin/rm +SED = /usr/bin/sed +SET_MAKE = +SHELL = /bin/sh +STRIP = +TAR = tar +TRIQS_CFLAGS = +TRIQS_CPPFLAGS = +TRIQS_CXXFLAGS = +TRIQS_LDFLAGS = +TRIQS_LIBS = +TRUE_CPP = cpp +VERSION = 10.0.0.83-58be4d +WANNIER90_CPPFLAGS = +WANNIER90_FCFLAGS = -I/opt/local/include +WANNIER90_LDFLAGS = +WANNIER90_LIBS = -L/opt/local/lib -lwannier +XML2_CONFIG = +XMLF90_CPPFLAGS = +XMLF90_FCFLAGS = +XMLF90_LDFLAGS = +XMLF90_LIBS = +XML_CPPFLAGS = +XML_LIBS = +XPP = +XPPFLAGS = +XPPFLAGS_DEBUG = +XPPFLAGS_EXTRA = +XPPFLAGS_OPTIM = +YAKL_CPPFLAGS = +YAKL_FCFLAGS = +YAKL_LDFLAGS = +YAKL_LIBS = +abi_ac_distcheck = --with-config-file="/Users/gonze/_Research/ABINIT_git/gonze/mac-1P0-225.ac9" +abi_ac_version = 027100 +abi_am_version = 011603 +abi_avx_safe_mode_enable = no +abi_bse_unpacked_enable = no +abi_cc_path = +abi_cc_vendor = gnu +abi_cc_version = 9.4 +abi_cclock_enable = no +abi_cpp_path = +abi_cpu_64bits = yes +abi_cpu_bits = 64 +abi_cpu_model = unknown +abi_cpu_platform = apple +abi_cpu_spec = unknown_unknown +abi_cpu_vendor = unknown +abi_crpa_optim_enable = no +abi_cxx_path = +abi_cxx_vendor = gnu +abi_cxx_version = 9.4 +abi_debug_flavor = basic +abi_exports_enable = no +abi_fbk_abinit_common_ok = no +abi_fbk_bigdft_ok = disabled +abi_fbk_config = +abi_fbk_enable = no +abi_fbk_fft_ok = no +abi_fbk_fftw3_ok = no +abi_fbk_gpu_ok = no +abi_fbk_hdf5_ok = disabled +abi_fbk_init = def +abi_fbk_kokkos_ok = no +abi_fbk_levmar_ok = no +abi_fbk_libpaw_ok = no +abi_fbk_libpsml_ok = disabled +abi_fbk_libxc_ok = disabled +abi_fbk_libxml2_ok = no +abi_fbk_linalg_ok = disabled +abi_fbk_list = +abi_fbk_mpi_ok = no +abi_fbk_netcdf_fortran_ok = disabled +abi_fbk_netcdf_ok = disabled +abi_fbk_papi_ok = no +abi_fbk_pfft_ok = no +abi_fbk_prefix = +abi_fbk_required = +abi_fbk_triqs_ok = no +abi_fbk_wannier90_ok = disabled +abi_fbk_xmlf90_ok = disabled +abi_fbk_yakl_ok = no +abi_fc_path = +abi_fc_vendor = gnu +abi_fc_version = 9.4 +abi_fc_wrap = no +abi_fc_wrapper_enable = no +abi_fpp_path = +abi_gpu_arch = +abi_gpu_fcflags = +abi_gpu_flavor = none +abi_gpu_hip_libdir = +abi_gpu_incs = +abi_gpu_ldflags = +abi_gpu_libs = +abi_gpu_nvtx_v3 = +abi_gpu_roctx = +abi_gw_dpc_enable = yes +abi_hints_enable = yes +abi_libtetra_enable = yes +abi_libxml2_cppflags = +abi_libxml2_enable = no +abi_libxml2_fcflags = +abi_libxml2_init = def +abi_libxml2_ldflags = +abi_libxml2_libs = +abi_libxml2_ok = unknown +abi_libxml2_prefix = +abi_lotf_enable = no +abi_lt_version = 020406 +abi_m4_version = 010419 +abi_memory_profiling_enable = no +abi_mpi_cflags = +abi_mpi_cppflags = +abi_mpi_cxxflags = +abi_mpi_enable = yes +abi_mpi_fcflags = +abi_mpi_flavor = auto +abi_mpi_gpu_aware_enable = no +abi_mpi_incs = +abi_mpi_inplace_enable = yes +abi_mpi_interfaces_bugfix_enable = no +abi_mpi_io_default_enable = no +abi_mpi_io_enable = yes +abi_mpi_ldflags = +abi_mpi_level = 2 +abi_mpi_libs = +abi_netcdf_default_enable = no +abi_openmp_enable = no +abi_openmp_offload_enable = no +abi_optim_flavor = standard +abi_python_invocation_enable = no +abi_source_debug_enable = no +abi_stdin_enable = yes +abi_sys_spec = darwin-x86_64 +abi_timer_enable = yes +abi_triqs_v1_4_enable = no +abi_triqs_v2_0_enable = no +abi_zdot_bugfix_enable = no +abinit_bindir = /usr/local/bin +abinit_builddir = /Users/gonze/_Research/ABINIT_git/gonze +abinit_chkdir = /usr/local/share/abinit/tests +abinit_datdir = /usr/local/share/abinit +abinit_docdir = /usr/local/doc/abinit +abinit_incdir = /usr/local/include +abinit_libdir = /usr/local/lib +abinit_mandir = /usr/local/share/man +abinit_prefix = /usr/local +abinit_srcdir = /Users/gonze/_Research/ABINIT_git/gonze +abs_builddir = /Users/gonze/_Research/ABINIT_git/gonze/shared/common/src/17_minimax +abs_srcdir = /Users/gonze/_Research/ABINIT_git/gonze/shared/common/src/17_minimax +abs_top_builddir = /Users/gonze/_Research/ABINIT_git/gonze +abs_top_srcdir = /Users/gonze/_Research/ABINIT_git/gonze +ac_ct_CC = +ac_ct_CXX = +ac_ct_FC = +am__include = include +am__leading_dot = . +am__quote = +am__tar = tar --format=ustar -chf - "$$tardir" +am__untar = tar -xf - +bindir = ${exec_prefix}/bin +build = x86_64-apple-darwin18.7.0 +build_alias = +build_cpu = x86_64 +build_os = darwin18.7.0 +build_vendor = apple +builddir = . +cc_info_string = gcc-mp-9 (MacPorts gcc9 9.4.0_0) 9.4.0 +cxx_info_string = g++-mp-9 (MacPorts gcc9 9.4.0_0) 9.4.0 +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +enable_avx_safe_mode = +enable_bse_unpacked = +enable_cclock = +enable_crpa_optim = +enable_exports = +enable_fc_wrapper = +enable_gw_dpc = yes +enable_hints = +enable_libtetra = +enable_lotf = +enable_memory_profiling = +enable_mpi_gpu_aware = +enable_mpi_inplace = +enable_mpi_interfaces_bugfix = +enable_mpi_io = yes +enable_mpi_io_default = +enable_netcdf_default = +enable_openmp = +enable_openmp_offload = +enable_python_invocation = +enable_shared = +enable_source_debug = +enable_static = +enable_stdin = +enable_timer = +enable_triqs_v1_4 = +enable_triqs_v2_0 = +enable_zdot_bugfix = +exec_prefix = ${prefix} +fc_info_string = GNU Fortran (MacPorts gcc9 9.4.0_0) 9.4.0 +fc_mod_fcflags = +fc_timing = standard +fcflags_opt_02_clib = +fcflags_opt_10_defs = +fcflags_opt_11_memory_mpi = +fcflags_opt_12_hide_mpi = +fcflags_opt_14_hidewrite = +fcflags_opt_16_hideleave = +fcflags_opt_16_kokkos_toolbox = +fcflags_opt_17_gpu_toolbox = +fcflags_opt_17_libtetra_ext = +fcflags_opt_17_minimax = +fcflags_opt_17_yaml_out = +fcflags_opt_18_timing = +fcflags_opt_21_hashfuncs = +fcflags_opt_27_toolbox_oop = +fcflags_opt_28_numeric_noabirule = +fcflags_opt_29_kpoints = +fcflags_opt_32_util = +fcflags_opt_33_xc_lowlevel = +fcflags_opt_39_libpaw = +fcflags_opt_41_geometry = +fcflags_opt_42_nlstrain = +fcflags_opt_42_parser = +fcflags_opt_43_ptgroups = -O0 +fcflags_opt_43_wvl_wrappers = +fcflags_opt_44_abitools = +fcflags_opt_44_abitypes_defs = +fcflags_opt_44_manage_kokkos = +fcflags_opt_45_geomoptim = +fcflags_opt_45_xgTools = +fcflags_opt_46_ghc_omp = +fcflags_opt_46_manage_cuda = +fcflags_opt_48_diago = +fcflags_opt_49_gw_toolbox_oop = +fcflags_opt_51_manage_mpi = +fcflags_opt_52_fft_mpi_noabirule = +fcflags_opt_53_ffts = +fcflags_opt_54_spacepar = +fcflags_opt_55_abiutil = +fcflags_opt_56_io_mpi = +fcflags_opt_56_mixing = +fcflags_opt_56_recipspace = +fcflags_opt_56_xc = +fcflags_opt_57_iopsp_parser = +fcflags_opt_57_iovars = +fcflags_opt_61_occeig = +fcflags_opt_62_cg_noabirule = +fcflags_opt_62_ctqmc = +fcflags_opt_62_iowfdenpot = +fcflags_opt_62_poisson = +fcflags_opt_62_wvl_wfs = +fcflags_opt_64_psp = +fcflags_opt_65_lotf_base = +fcflags_opt_65_paw = +fcflags_opt_66_nonlocal = +fcflags_opt_66_vdwxc = +fcflags_opt_66_wfs = +fcflags_opt_67_common = +fcflags_opt_67_python_invocation_ext = +fcflags_opt_67_triqs_ext = +fcflags_opt_68_dmft = +fcflags_opt_68_lotf = +fcflags_opt_68_recursion = +fcflags_opt_68_rsprc = +fcflags_opt_69_wfdesc = +fcflags_opt_70_gw = +fcflags_opt_71_bse = +fcflags_opt_71_wannier = +fcflags_opt_72_response = +fcflags_opt_77_ddb = +fcflags_opt_77_suscep = +fcflags_opt_78_effpot = +fcflags_opt_78_eph = +fcflags_opt_79_seqpar_mpi = +fcflags_opt_80_rttddft = +fcflags_opt_80_tdep = +fcflags_opt_94_scfcv = +fcflags_opt_95_drive = +fcflags_opt_98_main = +fcflags_opt_bigdft = +fcflags_opt_default = +fcflags_opt_hdf5 = +fcflags_opt_levmar = +fcflags_opt_libpsml = +fcflags_opt_libxc = +fcflags_opt_libxml2 = +fcflags_opt_linalg = +fcflags_opt_netcdf = +fcflags_opt_netcdf_fortran = +fcflags_opt_papi = +fcflags_opt_triqs = +fcflags_opt_wannier90 = +fcflags_opt_xmlf90 = +host = x86_64-apple-darwin18.7.0 +host_alias = +host_cpu = x86_64 +host_os = darwin18.7.0 +host_vendor = apple +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = ${SHELL} /Users/gonze/_Research/ABINIT_git/gonze/config/gnu/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = ${datarootdir}/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = $(MKDIR_P) +oldincludedir = /usr/include +pdfdir = ${docdir} +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +runstatedir = ${localstatedir}/run +sbindir = ${exec_prefix}/sbin +sd_abinit_common_cppflags = +sd_abinit_common_enable = no +sd_abinit_common_enable_def = no +sd_abinit_common_fcflags = +sd_abinit_common_init = def +sd_abinit_common_ldflags = +sd_abinit_common_libs = +sd_abinit_common_ok = unknown +sd_abinit_common_options = optional skip +sd_abinit_common_policy = skip +sd_abinit_common_status = optional +sd_bigdft_cppflags = +sd_bigdft_enable = no +sd_bigdft_enable_def = no +sd_bigdft_fcflags = +sd_bigdft_init = def +sd_bigdft_ldflags = +sd_bigdft_libs = +sd_bigdft_ok = unknown +sd_bigdft_options = optional warn +sd_bigdft_policy = warn +sd_bigdft_status = optional +sd_fft_cflags = +sd_fft_choices = +sd_fft_cppflags = -I/opt/local/include +sd_fft_cxxflags = +sd_fft_enable = yes +sd_fft_fcflags = -I/opt/local/include +sd_fft_flavor = fftw3 +sd_fft_init = kwd +sd_fft_ldflags = +sd_fft_libs = -L/opt/local/lib -lfftw3 -lfftw3f +sd_fft_ok = yes +sd_fftw3_cflags = +sd_fftw3_cppflags = -I/opt/local/include +sd_fftw3_enable = yes +sd_fftw3_enable_def = no +sd_fftw3_fcflags = -I/opt/local/include +sd_fftw3_init = env +sd_fftw3_ldflags = +sd_fftw3_libs = -L/opt/local/lib -lfftw3 -lfftw3f +sd_fftw3_ok = yes +sd_fftw3_options = optional skip +sd_fftw3_policy = skip +sd_fftw3_status = optional +sd_gpu_cflags = +sd_gpu_cppflags = +sd_gpu_cxxflags = +sd_gpu_enable = no +sd_gpu_enable_def = no +sd_gpu_fcflags = +sd_gpu_init = def +sd_gpu_ldflags = +sd_gpu_libs = +sd_gpu_ok = no +sd_gpu_options = optional warn +sd_gpu_policy = warn +sd_gpu_prefix = +sd_gpu_status = optional +sd_hdf5_cflags = +sd_hdf5_cppflags = -I/opt/local/include -I/opt/local/include +sd_hdf5_cxxflags = +sd_hdf5_enable = yes +sd_hdf5_enable_def = yes +sd_hdf5_enable_fc = no +sd_hdf5_fcflags = +sd_hdf5_h5cc = /opt/local/bin/h5cc +sd_hdf5_h5fc = +sd_hdf5_init = dir +sd_hdf5_ldflags = +sd_hdf5_libs = -L/opt/local/lib -L/opt/local/lib -lhdf5_hl -L/opt/local/lib -lhdf5 -lz -ldl -lm +sd_hdf5_ok = yes +sd_hdf5_options = required no-fortran warn +sd_hdf5_policy = warn +sd_hdf5_status = required +sd_kokkos_cppflags = +sd_kokkos_cxxflags = +sd_kokkos_enable = no +sd_kokkos_enable_def = no +sd_kokkos_init = def +sd_kokkos_ldflags = +sd_kokkos_libs = +sd_kokkos_ok = unknown +sd_kokkos_options = optional fail +sd_kokkos_policy = fail +sd_kokkos_status = optional +sd_levmar_cflags = +sd_levmar_cppflags = +sd_levmar_enable = no +sd_levmar_enable_def = no +sd_levmar_init = def +sd_levmar_ldflags = +sd_levmar_libs = +sd_levmar_ok = unknown +sd_levmar_options = optional fail +sd_levmar_policy = fail +sd_levmar_status = optional +sd_libpaw_cppflags = +sd_libpaw_enable = no +sd_libpaw_enable_def = no +sd_libpaw_fcflags = +sd_libpaw_init = def +sd_libpaw_ldflags = +sd_libpaw_libs = +sd_libpaw_ok = unknown +sd_libpaw_options = optional skip +sd_libpaw_policy = skip +sd_libpaw_status = optional +sd_libpsml_cppflags = +sd_libpsml_enable = no +sd_libpsml_enable_def = no +sd_libpsml_fcflags = +sd_libpsml_init = def +sd_libpsml_ldflags = +sd_libpsml_libs = +sd_libpsml_ok = unknown +sd_libpsml_options = optional warn +sd_libpsml_policy = warn +sd_libpsml_status = optional +sd_libxc_cflags = +sd_libxc_cppflags = -I/opt/local/include +sd_libxc_enable = yes +sd_libxc_enable_def = yes +sd_libxc_enable_fc = no +sd_libxc_fcflags = +sd_libxc_init = dir +sd_libxc_ldflags = +sd_libxc_libs = -L/opt/local/lib -lxc +sd_libxc_ok = yes +sd_libxc_options = required no-fortran warn +sd_libxc_policy = warn +sd_libxc_status = required +sd_linalg_cflags = +sd_linalg_choices = +sd_linalg_cppflags = +sd_linalg_cxxflags = +sd_linalg_enable = yes +sd_linalg_fcflags = -I/opt/local/include +sd_linalg_flavor = openblas +sd_linalg_has_elpa = no +sd_linalg_has_scalapack = no +sd_linalg_init = env +sd_linalg_ldflags = +sd_linalg_libs = -L/opt/local/lib -lopenblas +sd_linalg_ok = yes +sd_mpi_cc = /opt/local/bin/mpicc +sd_mpi_cflags = +sd_mpi_cppflags = -I/opt/local/include +sd_mpi_cxx = /opt/local/bin/mpicxx +sd_mpi_enable = yes +sd_mpi_enable_cxx = yes +sd_mpi_enable_def = auto +sd_mpi_enable_fc = yes +sd_mpi_fc = /opt/local/bin/mpif90 +sd_mpi_fcflags = -I/opt/local/include +sd_mpi_init = dir +sd_mpi_ldflags = +sd_mpi_libs = +sd_mpi_ok = yes +sd_mpi_options = auto optional fail +sd_mpi_policy = fail +sd_mpi_status = optional +sd_netcdf_cflags = +sd_netcdf_cppflags = -I/opt/local/include +sd_netcdf_enable = yes +sd_netcdf_enable_def = yes +sd_netcdf_fcflags = -I/opt/local/include +sd_netcdf_fortran_cflags = +sd_netcdf_fortran_cppflags = -I/opt/local/include +sd_netcdf_fortran_enable = yes +sd_netcdf_fortran_enable_def = yes +sd_netcdf_fortran_fcflags = -I/opt/local/include +sd_netcdf_fortran_init = dir +sd_netcdf_fortran_ldflags = +sd_netcdf_fortran_libs = -L/opt/local/lib -lnetcdff +sd_netcdf_fortran_ok = yes +sd_netcdf_fortran_options = required warn +sd_netcdf_fortran_policy = warn +sd_netcdf_fortran_status = required +sd_netcdf_init = dir +sd_netcdf_ldflags = +sd_netcdf_libs = -L/opt/local/lib -lnetcdf +sd_netcdf_ok = yes +sd_netcdf_options = required warn +sd_netcdf_policy = warn +sd_netcdf_status = required +sd_papi_cflags = +sd_papi_cppflags = +sd_papi_enable = no +sd_papi_enable_def = no +sd_papi_init = def +sd_papi_ldflags = +sd_papi_libs = +sd_papi_ok = unknown +sd_papi_options = optional fail +sd_papi_policy = fail +sd_papi_sd_papi_fcflags = +sd_papi_status = optional +sd_pfft_cflags = +sd_pfft_cppflags = +sd_pfft_enable = no +sd_pfft_enable_def = no +sd_pfft_init = def +sd_pfft_ldflags = +sd_pfft_libs = +sd_pfft_ok = unknown +sd_pfft_options = optional skip +sd_pfft_policy = skip +sd_pfft_status = optional +sd_sys_fcflags = +sd_triqs_cflags = +sd_triqs_cppflags = +sd_triqs_cxxflags = +sd_triqs_enable = no +sd_triqs_enable_def = no +sd_triqs_fcflags = +sd_triqs_init = def +sd_triqs_ldflags = +sd_triqs_libs = +sd_triqs_ok = unknown +sd_triqs_options = optional fail +sd_triqs_policy = fail +sd_triqs_status = optional +sd_wannier90_cppflags = +sd_wannier90_enable = yes +sd_wannier90_enable_def = no +sd_wannier90_fcflags = -I/opt/local/include +sd_wannier90_init = env +sd_wannier90_ldflags = +sd_wannier90_libs = -L/opt/local/lib -lwannier +sd_wannier90_ok = yes +sd_wannier90_options = optional warn +sd_wannier90_policy = warn +sd_wannier90_status = optional +sd_xmlf90_cppflags = +sd_xmlf90_enable = no +sd_xmlf90_enable_def = no +sd_xmlf90_fcflags = +sd_xmlf90_init = def +sd_xmlf90_ldflags = +sd_xmlf90_libs = +sd_xmlf90_ok = unknown +sd_xmlf90_options = optional warn +sd_xmlf90_policy = warn +sd_xmlf90_status = optional +sd_yakl_cppflags = +sd_yakl_enable = no +sd_yakl_enable_def = no +sd_yakl_fcflags = +sd_yakl_init = def +sd_yakl_ldflags = +sd_yakl_libs = +sd_yakl_ok = unknown +sd_yakl_options = optional fail +sd_yakl_policy = fail +sd_yakl_status = optional +sharedstatedir = ${prefix}/com +src_02_clib_fcflags = -I$(top_builddir)/shared/common/src/02_clib -I$(top_srcdir)/shared/common/src/02_clib +src_10_defs_fcflags = -I$(top_builddir)/shared/common/src/10_defs -I$(top_srcdir)/shared/common/src/10_defs +src_11_memory_mpi_fcflags = -I$(top_builddir)/shared/common/src/11_memory_mpi -I$(top_srcdir)/shared/common/src/11_memory_mpi +src_12_hide_mpi_fcflags = -I$(top_builddir)/shared/common/src/12_hide_mpi -I$(top_srcdir)/shared/common/src/12_hide_mpi +src_14_hidewrite_fcflags = -I$(top_builddir)/shared/common/src/14_hidewrite -I$(top_srcdir)/shared/common/src/14_hidewrite +src_16_hideleave_fcflags = -I$(top_builddir)/shared/common/src/16_hideleave -I$(top_srcdir)/shared/common/src/16_hideleave +src_16_kokkos_toolbox_fcflags = -I$(top_builddir)/shared/common/src/16_kokkos_toolbox -I$(top_srcdir)/shared/common/src/16_kokkos_toolbox +src_17_gpu_toolbox_fcflags = -I$(top_builddir)/shared/common/src/17_gpu_toolbox -I$(top_srcdir)/shared/common/src/17_gpu_toolbox +src_17_libtetra_ext_fcflags = -I$(top_builddir)/shared/common/src/17_libtetra_ext -I$(top_srcdir)/shared/common/src/17_libtetra_ext +src_17_minimax_fcflags = -I$(top_builddir)/shared/common/src/17_minimax -I$(top_srcdir)/shared/common/src/17_minimax +src_17_yaml_out_fcflags = -I$(top_builddir)/shared/common/src/17_yaml_out -I$(top_srcdir)/shared/common/src/17_yaml_out +src_18_timing_fcflags = -I$(top_builddir)/shared/common/src/18_timing -I$(top_srcdir)/shared/common/src/18_timing +src_21_hashfuncs_fcflags = -I$(top_builddir)/shared/common/src/21_hashfuncs -I$(top_srcdir)/shared/common/src/21_hashfuncs +src_27_toolbox_oop_fcflags = -I$(top_builddir)/shared/common/src/27_toolbox_oop -I$(top_srcdir)/shared/common/src/27_toolbox_oop +src_28_numeric_noabirule_fcflags = -I$(top_builddir)/shared/common/src/28_numeric_noabirule -I$(top_srcdir)/shared/common/src/28_numeric_noabirule +src_29_kpoints_fcflags = -I$(top_builddir)/shared/common/src/29_kpoints -I$(top_srcdir)/shared/common/src/29_kpoints +src_32_util_fcflags = -I$(top_builddir)/shared/common/src/32_util -I$(top_srcdir)/shared/common/src/32_util +src_33_xc_lowlevel_fcflags = -I$(top_builddir)/shared/common/src/33_xc_lowlevel -I$(top_srcdir)/shared/common/src/33_xc_lowlevel +src_39_libpaw_fcflags = -I$(top_builddir)/shared/libpaw/src -I$(top_srcdir)/shared/libpaw/src +src_41_geometry_fcflags = -I$(top_builddir)/src/41_geometry -I$(top_srcdir)/src/41_geometry +src_42_nlstrain_fcflags = -I$(top_builddir)/src/42_nlstrain -I$(top_srcdir)/src/42_nlstrain +src_42_parser_fcflags = -I$(top_builddir)/src/42_parser -I$(top_srcdir)/src/42_parser +src_43_ptgroups_fcflags = -I$(top_builddir)/src/43_ptgroups -I$(top_srcdir)/src/43_ptgroups +src_43_wvl_wrappers_fcflags = -I$(top_builddir)/src/43_wvl_wrappers -I$(top_srcdir)/src/43_wvl_wrappers +src_44_abitools_fcflags = -I$(top_builddir)/src/44_abitools -I$(top_srcdir)/src/44_abitools +src_44_abitypes_defs_fcflags = -I$(top_builddir)/src/44_abitypes_defs -I$(top_srcdir)/src/44_abitypes_defs +src_44_manage_kokkos_fcflags = -I$(top_builddir)/src/44_manage_kokkos -I$(top_srcdir)/src/44_manage_kokkos +src_45_geomoptim_fcflags = -I$(top_builddir)/src/45_geomoptim -I$(top_srcdir)/src/45_geomoptim +src_45_xgTools_fcflags = -I$(top_builddir)/src/45_xgTools -I$(top_srcdir)/src/45_xgTools +src_46_ghc_omp_fcflags = -I$(top_builddir)/src/46_ghc_omp -I$(top_srcdir)/src/46_ghc_omp +src_46_manage_cuda_fcflags = -I$(top_builddir)/src/46_manage_cuda -I$(top_srcdir)/src/46_manage_cuda +src_48_diago_fcflags = -I$(top_builddir)/src/48_diago -I$(top_srcdir)/src/48_diago +src_49_gw_toolbox_oop_fcflags = -I$(top_builddir)/src/49_gw_toolbox_oop -I$(top_srcdir)/src/49_gw_toolbox_oop +src_51_manage_mpi_fcflags = -I$(top_builddir)/src/51_manage_mpi -I$(top_srcdir)/src/51_manage_mpi +src_52_fft_mpi_noabirule_fcflags = -I$(top_builddir)/src/52_fft_mpi_noabirule -I$(top_srcdir)/src/52_fft_mpi_noabirule +src_53_ffts_fcflags = -I$(top_builddir)/src/53_ffts -I$(top_srcdir)/src/53_ffts +src_54_spacepar_fcflags = -I$(top_builddir)/src/54_spacepar -I$(top_srcdir)/src/54_spacepar +src_55_abiutil_fcflags = -I$(top_builddir)/src/55_abiutil -I$(top_srcdir)/src/55_abiutil +src_56_io_mpi_fcflags = -I$(top_builddir)/src/56_io_mpi -I$(top_srcdir)/src/56_io_mpi +src_56_mixing_fcflags = -I$(top_builddir)/src/56_mixing -I$(top_srcdir)/src/56_mixing +src_56_recipspace_fcflags = -I$(top_builddir)/src/56_recipspace -I$(top_srcdir)/src/56_recipspace +src_56_xc_fcflags = -I$(top_builddir)/src/56_xc -I$(top_srcdir)/src/56_xc +src_57_iopsp_parser_fcflags = -I$(top_builddir)/src/57_iopsp_parser -I$(top_srcdir)/src/57_iopsp_parser +src_57_iovars_fcflags = -I$(top_builddir)/src/57_iovars -I$(top_srcdir)/src/57_iovars +src_61_occeig_fcflags = -I$(top_builddir)/src/61_occeig -I$(top_srcdir)/src/61_occeig +src_62_cg_noabirule_fcflags = -I$(top_builddir)/src/62_cg_noabirule -I$(top_srcdir)/src/62_cg_noabirule +src_62_ctqmc_fcflags = -I$(top_builddir)/src/62_ctqmc -I$(top_srcdir)/src/62_ctqmc +src_62_iowfdenpot_fcflags = -I$(top_builddir)/src/62_iowfdenpot -I$(top_srcdir)/src/62_iowfdenpot +src_62_poisson_fcflags = -I$(top_builddir)/src/62_poisson -I$(top_srcdir)/src/62_poisson +src_62_wvl_wfs_fcflags = -I$(top_builddir)/src/62_wvl_wfs -I$(top_srcdir)/src/62_wvl_wfs +src_64_psp_fcflags = -I$(top_builddir)/src/64_psp -I$(top_srcdir)/src/64_psp +src_65_lotf_base_fcflags = -I$(top_builddir)/src/65_lotf_base -I$(top_srcdir)/src/65_lotf_base +src_65_paw_fcflags = -I$(top_builddir)/src/65_paw -I$(top_srcdir)/src/65_paw +src_66_nonlocal_fcflags = -I$(top_builddir)/src/66_nonlocal -I$(top_srcdir)/src/66_nonlocal +src_66_vdwxc_fcflags = -I$(top_builddir)/src/66_vdwxc -I$(top_srcdir)/src/66_vdwxc +src_66_wfs_fcflags = -I$(top_builddir)/src/66_wfs -I$(top_srcdir)/src/66_wfs +src_67_common_fcflags = -I$(top_builddir)/src/67_common -I$(top_srcdir)/src/67_common +src_67_python_invocation_ext_fcflags = -I$(top_builddir)/src/67_python_invocation_ext -I$(top_srcdir)/src/67_python_invocation_ext +src_67_triqs_ext_fcflags = -I$(top_builddir)/src/67_triqs_ext -I$(top_srcdir)/src/67_triqs_ext +src_68_dmft_fcflags = -I$(top_builddir)/src/68_dmft -I$(top_srcdir)/src/68_dmft +src_68_lotf_fcflags = -I$(top_builddir)/src/68_lotf -I$(top_srcdir)/src/68_lotf +src_68_recursion_fcflags = -I$(top_builddir)/src/68_recursion -I$(top_srcdir)/src/68_recursion +src_68_rsprc_fcflags = -I$(top_builddir)/src/68_rsprc -I$(top_srcdir)/src/68_rsprc +src_69_wfdesc_fcflags = -I$(top_builddir)/src/69_wfdesc -I$(top_srcdir)/src/69_wfdesc +src_70_gw_fcflags = -I$(top_builddir)/src/70_gw -I$(top_srcdir)/src/70_gw +src_71_bse_fcflags = -I$(top_builddir)/src/71_bse -I$(top_srcdir)/src/71_bse +src_71_wannier_fcflags = -I$(top_builddir)/src/71_wannier -I$(top_srcdir)/src/71_wannier +src_72_response_fcflags = -I$(top_builddir)/src/72_response -I$(top_srcdir)/src/72_response +src_77_ddb_fcflags = -I$(top_builddir)/src/77_ddb -I$(top_srcdir)/src/77_ddb +src_77_suscep_fcflags = -I$(top_builddir)/src/77_suscep -I$(top_srcdir)/src/77_suscep +src_78_effpot_fcflags = -I$(top_builddir)/src/78_effpot -I$(top_srcdir)/src/78_effpot +src_78_eph_fcflags = -I$(top_builddir)/src/78_eph -I$(top_srcdir)/src/78_eph +src_79_seqpar_mpi_fcflags = -I$(top_builddir)/src/79_seqpar_mpi -I$(top_srcdir)/src/79_seqpar_mpi +src_80_rttddft_fcflags = -I$(top_builddir)/src/80_rttddft -I$(top_srcdir)/src/80_rttddft +src_80_tdep_fcflags = -I$(top_builddir)/src/80_tdep -I$(top_srcdir)/src/80_tdep +src_94_scfcv_fcflags = -I$(top_builddir)/src/94_scfcv -I$(top_srcdir)/src/94_scfcv +src_95_drive_fcflags = -I$(top_builddir)/src/95_drive -I$(top_srcdir)/src/95_drive +src_common_fcflags = -I$(top_builddir)/shared/common/src/incs -I$(top_srcdir)/shared/common/src/incs -I$(top_builddir)/shared/common/src/mods -I$(top_srcdir)/shared/common/src/mods +src_core_fcflags = -I$(top_builddir)/src/incs -I$(top_srcdir)/src/incs -I$(top_builddir)/src/mods -I$(top_srcdir)/src/mods +src_libpaw_fcflags = -I$(top_builddir)/shared/libpaw/incs -I$(top_srcdir)/shared/libpaw/incs -I$(top_builddir)/shared/libpaw/mods -I$(top_srcdir)/shared/libpaw/mods +srcdir = . +sysconfdir = ${prefix}/etc +target = x86_64-apple-darwin18.7.0 +target_alias = +target_cpu = x86_64 +target_os = darwin18.7.0 +target_vendor = apple +top_build_prefix = ../../../../ +top_builddir = ../../../.. +top_srcdir = ../../../.. +with_abinit_common = +with_bigdft = +with_config_file = +with_debug_flavor = +with_fallbacks = +with_fc_vendor = +with_fc_version = +with_fft_flavor = fftw3 +with_fftw3 = +with_gnu_ld = +with_gpu = +with_hdf5 = /opt/local +with_kokkos = +with_levmar = +with_libpaw = +with_libpsml = +with_libxc = /opt/local +with_libxml2 = +with_linalg_flavor = openblas +with_mpi = /opt/local +with_mpi_level = +with_netcdf = /opt/local +with_optim_flavor = +with_papi = +with_pfft = +with_triqs = +with_wannier90 = +with_xmlf90 = +with_yakl = +AM_CFLAGS = -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include +AM_CXXFLAGS = $(sd_triqs_cxxflags) +AM_FCFLAGS = -ffree-form -J../mods +AM_CPPFLAGS = \ + -I$(top_builddir)/shared/common/src/10_defs -I$(top_srcdir)/shared/common/src/10_defs \ + -I$(top_builddir)/shared/common/src/16_hideleave -I$(top_srcdir)/shared/common/src/16_hideleave \ + -I$(top_builddir)/shared/common/src/17_minimax -I$(top_srcdir)/shared/common/src/17_minimax \ + -I$(top_builddir)/shared/common/src/incs -I$(top_srcdir)/shared/common/src/incs -I$(top_builddir)/shared/common/src/mods -I$(top_srcdir)/shared/common/src/mods \ + -I$(top_builddir)/src/incs -I$(top_srcdir)/src/incs -I$(top_builddir)/src/mods -I$(top_srcdir)/src/mods \ + -I$(top_builddir)/shared/libpaw/incs -I$(top_srcdir)/shared/libpaw/incs -I$(top_builddir)/shared/libpaw/mods -I$(top_srcdir)/shared/libpaw/mods \ + \ + -I/opt/local/include \ + + + +# Regular source files +lib17_minimax_srcs = \ + gx_common.h \ + minimax_grids.F90 \ + minimax_omega.F90 \ + minimax_tau.F90 \ + minimax_utils.F90 + + +# Source files depending on conditionals + +# Library description +noinst_LIBRARIES = lib17_minimax.a +lib17_minimax_a_SOURCES = $(lib17_minimax_srcs) + +# Dependencies (inside the directory) of directory 17_minimax +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. +CLEANFILES = minimax_grids_cpp.f90 minimax_omega_cpp.f90 \ + minimax_tau_cpp.f90 minimax_utils_cpp.f90 \ + minimax_grids.$(MODEXT) minimax_omega.$(MODEXT) \ + minimax_tau.$(MODEXT) minimax_utils.$(MODEXT) +EXTRA_DIST = abinit.src abinit.dep +all: all-am + +.SUFFIXES: +.SUFFIXES: .F90 .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu shared/common/src/17_minimax/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu shared/common/src/17_minimax/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) + +lib17_minimax.a: $(lib17_minimax_a_OBJECTS) $(lib17_minimax_a_DEPENDENCIES) $(EXTRA_lib17_minimax_a_DEPENDENCIES) + $(AM_V_at)-rm -f lib17_minimax.a + $(AM_V_AR)$(lib17_minimax_a_AR) lib17_minimax.a $(lib17_minimax_a_OBJECTS) $(lib17_minimax_a_LIBADD) + $(AM_V_at)$(RANLIB) lib17_minimax.a + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +.F90.o: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ $< + +.F90.obj: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-noinstLIBRARIES cscopelist-am ctags ctags-am distclean \ + distclean-compile distclean-generic distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am + +.PRECIOUS: Makefile + + +minimax_grids.$(OBJEXT): minimax_omega.$(OBJEXT) minimax_tau.$(OBJEXT) minimax_utils.$(OBJEXT) + +minimax_omega.$(OBJEXT): minimax_utils.$(OBJEXT) + +minimax_tau.$(OBJEXT): minimax_utils.$(OBJEXT) + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/GX-PAW/common/src/17_minimax/Makefile.am b/GX-PAW/common/src/17_minimax/Makefile.am new file mode 100644 index 00000000..8a99caf3 --- /dev/null +++ b/GX-PAW/common/src/17_minimax/Makefile.am @@ -0,0 +1,69 @@ +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-corelibs on 2024/03/16 21:07:38 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-corelibs script or its config file instead. +# + +AM_CFLAGS = @ABI_CPPFLAGS@ +AM_CXXFLAGS = $(sd_triqs_cxxflags) +AM_FCFLAGS = @FPPFLAGS@ @FCFLAGS_FREEFORM@ @FCFLAGS_MODDIR@ @sd_sys_fcflags@ @fcflags_opt_17_minimax@ + +AM_CPPFLAGS = \ + @src_10_defs_fcflags@ \ + @src_16_hideleave_fcflags@ \ + @src_17_minimax_fcflags@ \ + @src_common_fcflags@ \ + @src_core_fcflags@ \ + @src_libpaw_fcflags@ \ + @sd_linalg_cppflags@ \ + @sd_linalg_fcflags@ \ + @fc_mod_fcflags@ + +# Regular source files +lib17_minimax_srcs = \ + gx_common.h \ + minimax_grids.F90 \ + minimax_omega.F90 \ + minimax_tau.F90 \ + minimax_utils.F90 + +# Source files depending on conditionals + + +# Library description +noinst_LIBRARIES = lib17_minimax.a + +lib17_minimax_a_SOURCES= $(lib17_minimax_srcs) + +CLEANFILES = \ + minimax_grids_cpp.f90 \ + minimax_omega_cpp.f90 \ + minimax_tau_cpp.f90 \ + minimax_utils_cpp.f90 + +EXTRA_DIST = abinit.src + +EXTRA_DIST += abinit.dep + +# Dependencies (inside the directory) of directory 17_minimax +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. + +CLEANFILES += \ + minimax_grids.$(MODEXT) \ + minimax_omega.$(MODEXT) \ + minimax_tau.$(MODEXT) \ + minimax_utils.$(MODEXT) + +minimax_grids.$(OBJEXT): minimax_omega.$(OBJEXT) minimax_tau.$(OBJEXT) minimax_utils.$(OBJEXT) + +minimax_omega.$(OBJEXT): minimax_utils.$(OBJEXT) + +minimax_tau.$(OBJEXT): minimax_utils.$(OBJEXT) \ No newline at end of file diff --git a/GX-PAW/common/src/17_minimax/Makefile.in b/GX-PAW/common/src/17_minimax/Makefile.in new file mode 100644 index 00000000..31d80bb0 --- /dev/null +++ b/GX-PAW/common/src/17_minimax/Makefile.in @@ -0,0 +1,1481 @@ +# Makefile.in generated by automake 1.16.3 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2020 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-corelibs on 2024/03/16 21:07:38 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-corelibs script or its config file instead. +# + +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = shared/common/src/17_minimax +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/m4/arch-gpu.m4 \ + $(top_srcdir)/config/m4/arch-mpi.m4 \ + $(top_srcdir)/config/m4/auto-autotools.m4 \ + $(top_srcdir)/config/m4/auto-corelibs.m4 \ + $(top_srcdir)/config/m4/auto-debug.m4 \ + $(top_srcdir)/config/m4/auto-dirflags.m4 \ + $(top_srcdir)/config/m4/auto-env.m4 \ + $(top_srcdir)/config/m4/auto-hints.m4 \ + $(top_srcdir)/config/m4/auto-optim.m4 \ + $(top_srcdir)/config/m4/auto-options.m4 \ + $(top_srcdir)/config/m4/auto-output.m4 \ + $(top_srcdir)/config/m4/auto-triggers.m4 \ + $(top_srcdir)/config/m4/conf-atompaw.m4 \ + $(top_srcdir)/config/m4/conf-debug.m4 \ + $(top_srcdir)/config/m4/conf-fallbacks.m4 \ + $(top_srcdir)/config/m4/conf-files.m4 \ + $(top_srcdir)/config/m4/conf-init.m4 \ + $(top_srcdir)/config/m4/conf-openmp.m4 \ + $(top_srcdir)/config/m4/conf-optim.m4 \ + $(top_srcdir)/config/m4/lang-c++.m4 \ + $(top_srcdir)/config/m4/lang-c.m4 \ + $(top_srcdir)/config/m4/lang-fortran-import.m4 \ + $(top_srcdir)/config/m4/lang-fortran.m4 \ + $(top_srcdir)/config/m4/lang-python.m4 \ + $(top_srcdir)/config/m4/libxml2.m4 \ + $(top_srcdir)/config/m4/misc-display.m4 \ + $(top_srcdir)/config/m4/sd_abinit_common.m4 \ + $(top_srcdir)/config/m4/sd_arch_gpu.m4 \ + $(top_srcdir)/config/m4/sd_arch_mpi.m4 \ + $(top_srcdir)/config/m4/sd_bigdft.m4 \ + $(top_srcdir)/config/m4/sd_core.m4 \ + $(top_srcdir)/config/m4/sd_esl.m4 \ + $(top_srcdir)/config/m4/sd_fftw3.m4 \ + $(top_srcdir)/config/m4/sd_gpu_kokkos.m4 \ + $(top_srcdir)/config/m4/sd_gpu_yakl.m4 \ + $(top_srcdir)/config/m4/sd_io_hdf5.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf_fortran.m4 \ + $(top_srcdir)/config/m4/sd_levmar.m4 \ + $(top_srcdir)/config/m4/sd_libpaw.m4 \ + $(top_srcdir)/config/m4/sd_libpsml.m4 \ + $(top_srcdir)/config/m4/sd_libxc.m4 \ + $(top_srcdir)/config/m4/sd_math_fft.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_core.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_util.m4 \ + $(top_srcdir)/config/m4/sd_papi.m4 \ + $(top_srcdir)/config/m4/sd_pfft.m4 \ + $(top_srcdir)/config/m4/sd_triqs.m4 \ + $(top_srcdir)/config/m4/sd_wannier90.m4 \ + $(top_srcdir)/config/m4/sd_xmlf90.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = +lib17_minimax_a_AR = $(AR) $(ARFLAGS) +lib17_minimax_a_LIBADD = +am__objects_1 = minimax_grids.$(OBJEXT) minimax_omega.$(OBJEXT) \ + minimax_tau.$(OBJEXT) minimax_utils.$(OBJEXT) +am_lib17_minimax_a_OBJECTS = $(am__objects_1) +lib17_minimax_a_OBJECTS = $(am_lib17_minimax_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +PPFCCOMPILE = $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) +AM_V_PPFC = $(am__v_PPFC_@AM_V@) +am__v_PPFC_ = $(am__v_PPFC_@AM_DEFAULT_V@) +am__v_PPFC_0 = @echo " PPFC " $@; +am__v_PPFC_1 = +FCLD = $(FC) +FCLINK = $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \ + $@ +AM_V_FCLD = $(am__v_FCLD_@AM_V@) +am__v_FCLD_ = $(am__v_FCLD_@AM_DEFAULT_V@) +am__v_FCLD_0 = @echo " FCLD " $@; +am__v_FCLD_1 = +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(lib17_minimax_a_SOURCES) +DIST_SOURCES = $(lib17_minimax_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ABINIT_BINARY_PACKAGE = @ABINIT_BINARY_PACKAGE@ +ABINIT_COMMON_CPPFLAGS = @ABINIT_COMMON_CPPFLAGS@ +ABINIT_COMMON_FCFLAGS = @ABINIT_COMMON_FCFLAGS@ +ABINIT_COMMON_LDFLAGS = @ABINIT_COMMON_LDFLAGS@ +ABINIT_COMMON_LIBS = @ABINIT_COMMON_LIBS@ +ABINIT_TARGET = @ABINIT_TARGET@ +ABINIT_VERSION = @ABINIT_VERSION@ +ABINIT_VERSION_BASE = @ABINIT_VERSION_BASE@ +ABINIT_VERSION_BUILD = @ABINIT_VERSION_BUILD@ +ABINIT_VERSION_MAJOR = @ABINIT_VERSION_MAJOR@ +ABINIT_VERSION_MICRO = @ABINIT_VERSION_MICRO@ +ABINIT_VERSION_MINOR = @ABINIT_VERSION_MINOR@ +ABI_CPPFLAGS = @ABI_CPPFLAGS@ +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +ARFLAGS = @ARFLAGS@ +ARFLAGS_CMD = @ARFLAGS_CMD@ +ARFLAGS_DEBUG = @ARFLAGS_DEBUG@ +ARFLAGS_EXTRA = @ARFLAGS_EXTRA@ +ARFLAGS_HINTS = @ARFLAGS_HINTS@ +ARFLAGS_OPTIM = @ARFLAGS_OPTIM@ +ATOMPAW_BIN = @ATOMPAW_BIN@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BIGDFT_CPPFLAGS = @BIGDFT_CPPFLAGS@ +BIGDFT_FCFLAGS = @BIGDFT_FCFLAGS@ +BIGDFT_LDFLAGS = @BIGDFT_LDFLAGS@ +BIGDFT_LIBS = @BIGDFT_LIBS@ +BOURNE_SHELL = @BOURNE_SHELL@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CC_LDFLAGS = @CC_LDFLAGS@ +CC_LDFLAGS_DEBUG = @CC_LDFLAGS_DEBUG@ +CC_LDFLAGS_EXTRA = @CC_LDFLAGS_EXTRA@ +CC_LDFLAGS_GPU = @CC_LDFLAGS_GPU@ +CC_LDFLAGS_HINTS = @CC_LDFLAGS_HINTS@ +CC_LDFLAGS_OPTIM = @CC_LDFLAGS_OPTIM@ +CC_LIBS = @CC_LIBS@ +CC_LIBS_DEBUG = @CC_LIBS_DEBUG@ +CC_LIBS_EXTRA = @CC_LIBS_EXTRA@ +CC_LIBS_GPU = @CC_LIBS_GPU@ +CC_LIBS_HINTS = @CC_LIBS_HINTS@ +CC_LIBS_OPTIM = @CC_LIBS_OPTIM@ +CFLAGS = @CFLAGS@ +CFLAGS_DEBUG = @CFLAGS_DEBUG@ +CFLAGS_EXTRA = @CFLAGS_EXTRA@ +CFLAGS_GPU = @CFLAGS_GPU@ +CFLAGS_HINTS = @CFLAGS_HINTS@ +CFLAGS_OPTIM = @CFLAGS_OPTIM@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CPPFLAGS_DEBUG = @CPPFLAGS_DEBUG@ +CPPFLAGS_EXTRA = @CPPFLAGS_EXTRA@ +CPPFLAGS_GPU = @CPPFLAGS_GPU@ +CPPFLAGS_HINTS = @CPPFLAGS_HINTS@ +CPPFLAGS_HINTS_EXT = @CPPFLAGS_HINTS_EXT@ +CPPFLAGS_OPTIM = @CPPFLAGS_OPTIM@ +CXX = @CXX@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CXXFLAGS_DEBUG = @CXXFLAGS_DEBUG@ +CXXFLAGS_EXTRA = @CXXFLAGS_EXTRA@ +CXXFLAGS_GPU = @CXXFLAGS_GPU@ +CXXFLAGS_HINTS = @CXXFLAGS_HINTS@ +CXXFLAGS_OPTIM = @CXXFLAGS_OPTIM@ +CXX_LDFLAGS = @CXX_LDFLAGS@ +CXX_LDFLAGS_DEBUG = @CXX_LDFLAGS_DEBUG@ +CXX_LDFLAGS_EXTRA = @CXX_LDFLAGS_EXTRA@ +CXX_LDFLAGS_GPU = @CXX_LDFLAGS_GPU@ +CXX_LDFLAGS_HINTS = @CXX_LDFLAGS_HINTS@ +CXX_LDFLAGS_OPTIM = @CXX_LDFLAGS_OPTIM@ +CXX_LIBS = @CXX_LIBS@ +CXX_LIBS_DEBUG = @CXX_LIBS_DEBUG@ +CXX_LIBS_EXTRA = @CXX_LIBS_EXTRA@ +CXX_LIBS_GPU = @CXX_LIBS_GPU@ +CXX_LIBS_HINTS = @CXX_LIBS_HINTS@ +CXX_LIBS_OPTIM = @CXX_LIBS_OPTIM@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ +FCFLAGS = @FCFLAGS@ +FCFLAGS_DEBUG = @FCFLAGS_DEBUG@ +FCFLAGS_EXTRA = @FCFLAGS_EXTRA@ +FCFLAGS_F90 = @FCFLAGS_F90@ +FCFLAGS_FIXEDFORM = @FCFLAGS_FIXEDFORM@ +FCFLAGS_FREEFORM = @FCFLAGS_FREEFORM@ +FCFLAGS_HINTS = @FCFLAGS_HINTS@ +FCFLAGS_MODDIR = @FCFLAGS_MODDIR@ +FCFLAGS_OPENMP = @FCFLAGS_OPENMP@ +FCFLAGS_OPENMP_OFFLOAD = @FCFLAGS_OPENMP_OFFLOAD@ +FCFLAGS_OPTIM = @FCFLAGS_OPTIM@ +FCLIBS = @FCLIBS@ +FC_LDFLAGS = @FC_LDFLAGS@ +FC_LDFLAGS_DEBUG = @FC_LDFLAGS_DEBUG@ +FC_LDFLAGS_EXTRA = @FC_LDFLAGS_EXTRA@ +FC_LDFLAGS_HINTS = @FC_LDFLAGS_HINTS@ +FC_LDFLAGS_OPTIM = @FC_LDFLAGS_OPTIM@ +FC_LIBS = @FC_LIBS@ +FC_LIBS_DEBUG = @FC_LIBS_DEBUG@ +FC_LIBS_EXTRA = @FC_LIBS_EXTRA@ +FC_LIBS_HINTS = @FC_LIBS_HINTS@ +FC_LIBS_OPTIM = @FC_LIBS_OPTIM@ +FC_NOWRAP = @FC_NOWRAP@ +FFLAGS = @FFLAGS@ +FFTW3_CFLAGS = @FFTW3_CFLAGS@ +FFTW3_CPPFLAGS = @FFTW3_CPPFLAGS@ +FFTW3_FCFLAGS = @FFTW3_FCFLAGS@ +FFTW3_LDFLAGS = @FFTW3_LDFLAGS@ +FFTW3_LIBS = @FFTW3_LIBS@ +FFT_CFLAGS = @FFT_CFLAGS@ +FFT_FCFLAGS = @FFT_FCFLAGS@ +FPP = @FPP@ +FPPFLAGS = @FPPFLAGS@ +FPPFLAGS_DEBUG = @FPPFLAGS_DEBUG@ +FPPFLAGS_EXTRA = @FPPFLAGS_EXTRA@ +FPPFLAGS_HINTS = @FPPFLAGS_HINTS@ +FPPFLAGS_OPTIM = @FPPFLAGS_OPTIM@ +GPU_ARCH = @GPU_ARCH@ +GPU_CFLAGS = @GPU_CFLAGS@ +GPU_CPPFLAGS = @GPU_CPPFLAGS@ +GPU_CXXFLAGS = @GPU_CXXFLAGS@ +GPU_FCFLAGS = @GPU_FCFLAGS@ +GPU_LDFLAGS = @GPU_LDFLAGS@ +GPU_LIBS = @GPU_LIBS@ +GRAPHATOM_BIN = @GRAPHATOM_BIN@ +GREP = @GREP@ +H5CC = @H5CC@ +HDF5_CFLAGS = @HDF5_CFLAGS@ +HDF5_CPPFLAGS = @HDF5_CPPFLAGS@ +HDF5_CXXFLAGS = @HDF5_CXXFLAGS@ +HDF5_FCFLAGS = @HDF5_FCFLAGS@ +HDF5_LDFLAGS = @HDF5_LDFLAGS@ +HDF5_LIBS = @HDF5_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +LDFLAGS = @LDFLAGS@ +LEVMAR_CFLAGS = @LEVMAR_CFLAGS@ +LEVMAR_CPPFLAGS = @LEVMAR_CPPFLAGS@ +LEVMAR_LDFLAGS = @LEVMAR_LDFLAGS@ +LEVMAR_LIBS = @LEVMAR_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPAW_CPPFLAGS = @LIBPAW_CPPFLAGS@ +LIBPAW_FCFLAGS = @LIBPAW_FCFLAGS@ +LIBPAW_LDFLAGS = @LIBPAW_LDFLAGS@ +LIBPAW_LIBS = @LIBPAW_LIBS@ +LIBPSML_CPPFLAGS = @LIBPSML_CPPFLAGS@ +LIBPSML_FCFLAGS = @LIBPSML_FCFLAGS@ +LIBPSML_LDFLAGS = @LIBPSML_LDFLAGS@ +LIBPSML_LIBS = @LIBPSML_LIBS@ +LIBS = @LIBS@ +LIBXC_CFLAGS = @LIBXC_CFLAGS@ +LIBXC_CPPFLAGS = @LIBXC_CPPFLAGS@ +LIBXC_FCFLAGS = @LIBXC_FCFLAGS@ +LIBXC_LDFLAGS = @LIBXC_LDFLAGS@ +LIBXC_LIBS = @LIBXC_LIBS@ +LIBXML2_CPPFLAGS = @LIBXML2_CPPFLAGS@ +LIBXML2_FCFLAGS = @LIBXML2_FCFLAGS@ +LIBXML2_LIBS = @LIBXML2_LIBS@ +LINALG_CFLAGS = @LINALG_CFLAGS@ +LINALG_CPPFLAGS = @LINALG_CPPFLAGS@ +LINALG_CXXFLAGS = @LINALG_CXXFLAGS@ +LINALG_FCFLAGS = @LINALG_FCFLAGS@ +LINALG_LDFLAGS = @LINALG_LDFLAGS@ +LINALG_LIBS = @LINALG_LIBS@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODEXT = @MODEXT@ +MPI_CFLAGS = @MPI_CFLAGS@ +MPI_CPPFLAGS = @MPI_CPPFLAGS@ +MPI_CXXFLAGS = @MPI_CXXFLAGS@ +MPI_FCFLAGS = @MPI_FCFLAGS@ +MPI_LDFLAGS = @MPI_LDFLAGS@ +MPI_LIBS = @MPI_LIBS@ +MV = @MV@ +NETCDF_CFLAGS = @NETCDF_CFLAGS@ +NETCDF_CPPFLAGS = @NETCDF_CPPFLAGS@ +NETCDF_CXXFLAGS = @NETCDF_CXXFLAGS@ +NETCDF_FCFLAGS = @NETCDF_FCFLAGS@ +NETCDF_FORTRAN_CFLAGS = @NETCDF_FORTRAN_CFLAGS@ +NETCDF_FORTRAN_CPPFLAGS = @NETCDF_FORTRAN_CPPFLAGS@ +NETCDF_FORTRAN_CXXFLAGS = @NETCDF_FORTRAN_CXXFLAGS@ +NETCDF_FORTRAN_FCFLAGS = @NETCDF_FORTRAN_FCFLAGS@ +NETCDF_FORTRAN_LDFLAGS = @NETCDF_FORTRAN_LDFLAGS@ +NETCDF_FORTRAN_LIBS = @NETCDF_FORTRAN_LIBS@ +NETCDF_LDFLAGS = @NETCDF_LDFLAGS@ +NETCDF_LIBS = @NETCDF_LIBS@ +NVCC = @NVCC@ +NVCC_CFLAGS = @NVCC_CFLAGS@ +NVCC_CPPFLAGS = @NVCC_CPPFLAGS@ +NVCC_LDFLAGS = @NVCC_LDFLAGS@ +NVCC_LIBS = @NVCC_LIBS@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PAPI_CFLAGS = @PAPI_CFLAGS@ +PAPI_CPPFLAGS = @PAPI_CPPFLAGS@ +PAPI_LDFLAGS = @PAPI_LDFLAGS@ +PAPI_LIBS = @PAPI_LIBS@ +PATCH = @PATCH@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PFFT_CFLAGS = @PFFT_CFLAGS@ +PFFT_CPPFLAGS = @PFFT_CPPFLAGS@ +PFFT_LDFLAGS = @PFFT_LDFLAGS@ +PFFT_LIBS = @PFFT_LIBS@ +PYFLAGS = @PYFLAGS@ +PYTHON = @PYTHON@ +PYTHON_CONFIG = @PYTHON_CONFIG@ +PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ +RANLIB = @RANLIB@ +REALPATH = @REALPATH@ +RM = @RM@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +TAR = @TAR@ +TRIQS_CFLAGS = @TRIQS_CFLAGS@ +TRIQS_CPPFLAGS = @TRIQS_CPPFLAGS@ +TRIQS_CXXFLAGS = @TRIQS_CXXFLAGS@ +TRIQS_LDFLAGS = @TRIQS_LDFLAGS@ +TRIQS_LIBS = @TRIQS_LIBS@ +TRUE_CPP = @TRUE_CPP@ +VERSION = @VERSION@ +WANNIER90_CPPFLAGS = @WANNIER90_CPPFLAGS@ +WANNIER90_FCFLAGS = @WANNIER90_FCFLAGS@ +WANNIER90_LDFLAGS = @WANNIER90_LDFLAGS@ +WANNIER90_LIBS = @WANNIER90_LIBS@ +XML2_CONFIG = @XML2_CONFIG@ +XMLF90_CPPFLAGS = @XMLF90_CPPFLAGS@ +XMLF90_FCFLAGS = @XMLF90_FCFLAGS@ +XMLF90_LDFLAGS = @XMLF90_LDFLAGS@ +XMLF90_LIBS = @XMLF90_LIBS@ +XML_CPPFLAGS = @XML_CPPFLAGS@ +XML_LIBS = @XML_LIBS@ +XPP = @XPP@ +XPPFLAGS = @XPPFLAGS@ +XPPFLAGS_DEBUG = @XPPFLAGS_DEBUG@ +XPPFLAGS_EXTRA = @XPPFLAGS_EXTRA@ +XPPFLAGS_OPTIM = @XPPFLAGS_OPTIM@ +YAKL_CPPFLAGS = @YAKL_CPPFLAGS@ +YAKL_FCFLAGS = @YAKL_FCFLAGS@ +YAKL_LDFLAGS = @YAKL_LDFLAGS@ +YAKL_LIBS = @YAKL_LIBS@ +abi_ac_distcheck = @abi_ac_distcheck@ +abi_ac_version = @abi_ac_version@ +abi_am_version = @abi_am_version@ +abi_avx_safe_mode_enable = @abi_avx_safe_mode_enable@ +abi_bse_unpacked_enable = @abi_bse_unpacked_enable@ +abi_cc_path = @abi_cc_path@ +abi_cc_vendor = @abi_cc_vendor@ +abi_cc_version = @abi_cc_version@ +abi_cclock_enable = @abi_cclock_enable@ +abi_cpp_path = @abi_cpp_path@ +abi_cpu_64bits = @abi_cpu_64bits@ +abi_cpu_bits = @abi_cpu_bits@ +abi_cpu_model = @abi_cpu_model@ +abi_cpu_platform = @abi_cpu_platform@ +abi_cpu_spec = @abi_cpu_spec@ +abi_cpu_vendor = @abi_cpu_vendor@ +abi_crpa_optim_enable = @abi_crpa_optim_enable@ +abi_cxx_path = @abi_cxx_path@ +abi_cxx_vendor = @abi_cxx_vendor@ +abi_cxx_version = @abi_cxx_version@ +abi_debug_flavor = @abi_debug_flavor@ +abi_exports_enable = @abi_exports_enable@ +abi_fbk_abinit_common_ok = @abi_fbk_abinit_common_ok@ +abi_fbk_bigdft_ok = @abi_fbk_bigdft_ok@ +abi_fbk_config = @abi_fbk_config@ +abi_fbk_enable = @abi_fbk_enable@ +abi_fbk_fft_ok = @abi_fbk_fft_ok@ +abi_fbk_fftw3_ok = @abi_fbk_fftw3_ok@ +abi_fbk_gpu_ok = @abi_fbk_gpu_ok@ +abi_fbk_hdf5_ok = @abi_fbk_hdf5_ok@ +abi_fbk_init = @abi_fbk_init@ +abi_fbk_kokkos_ok = @abi_fbk_kokkos_ok@ +abi_fbk_levmar_ok = @abi_fbk_levmar_ok@ +abi_fbk_libpaw_ok = @abi_fbk_libpaw_ok@ +abi_fbk_libpsml_ok = @abi_fbk_libpsml_ok@ +abi_fbk_libxc_ok = @abi_fbk_libxc_ok@ +abi_fbk_libxml2_ok = @abi_fbk_libxml2_ok@ +abi_fbk_linalg_ok = @abi_fbk_linalg_ok@ +abi_fbk_list = @abi_fbk_list@ +abi_fbk_mpi_ok = @abi_fbk_mpi_ok@ +abi_fbk_netcdf_fortran_ok = @abi_fbk_netcdf_fortran_ok@ +abi_fbk_netcdf_ok = @abi_fbk_netcdf_ok@ +abi_fbk_papi_ok = @abi_fbk_papi_ok@ +abi_fbk_pfft_ok = @abi_fbk_pfft_ok@ +abi_fbk_prefix = @abi_fbk_prefix@ +abi_fbk_required = @abi_fbk_required@ +abi_fbk_triqs_ok = @abi_fbk_triqs_ok@ +abi_fbk_wannier90_ok = @abi_fbk_wannier90_ok@ +abi_fbk_xmlf90_ok = @abi_fbk_xmlf90_ok@ +abi_fbk_yakl_ok = @abi_fbk_yakl_ok@ +abi_fc_path = @abi_fc_path@ +abi_fc_vendor = @abi_fc_vendor@ +abi_fc_version = @abi_fc_version@ +abi_fc_wrap = @abi_fc_wrap@ +abi_fc_wrapper_enable = @abi_fc_wrapper_enable@ +abi_fpp_path = @abi_fpp_path@ +abi_gpu_arch = @abi_gpu_arch@ +abi_gpu_fcflags = @abi_gpu_fcflags@ +abi_gpu_flavor = @abi_gpu_flavor@ +abi_gpu_hip_libdir = @abi_gpu_hip_libdir@ +abi_gpu_incs = @abi_gpu_incs@ +abi_gpu_ldflags = @abi_gpu_ldflags@ +abi_gpu_libs = @abi_gpu_libs@ +abi_gpu_nvtx_v3 = @abi_gpu_nvtx_v3@ +abi_gpu_roctx = @abi_gpu_roctx@ +abi_gw_dpc_enable = @abi_gw_dpc_enable@ +abi_hints_enable = @abi_hints_enable@ +abi_libtetra_enable = @abi_libtetra_enable@ +abi_libxml2_cppflags = @abi_libxml2_cppflags@ +abi_libxml2_enable = @abi_libxml2_enable@ +abi_libxml2_fcflags = @abi_libxml2_fcflags@ +abi_libxml2_init = @abi_libxml2_init@ +abi_libxml2_ldflags = @abi_libxml2_ldflags@ +abi_libxml2_libs = @abi_libxml2_libs@ +abi_libxml2_ok = @abi_libxml2_ok@ +abi_libxml2_prefix = @abi_libxml2_prefix@ +abi_lotf_enable = @abi_lotf_enable@ +abi_lt_version = @abi_lt_version@ +abi_m4_version = @abi_m4_version@ +abi_memory_profiling_enable = @abi_memory_profiling_enable@ +abi_mpi_cflags = @abi_mpi_cflags@ +abi_mpi_cppflags = @abi_mpi_cppflags@ +abi_mpi_cxxflags = @abi_mpi_cxxflags@ +abi_mpi_enable = @abi_mpi_enable@ +abi_mpi_fcflags = @abi_mpi_fcflags@ +abi_mpi_flavor = @abi_mpi_flavor@ +abi_mpi_gpu_aware_enable = @abi_mpi_gpu_aware_enable@ +abi_mpi_incs = @abi_mpi_incs@ +abi_mpi_inplace_enable = @abi_mpi_inplace_enable@ +abi_mpi_interfaces_bugfix_enable = @abi_mpi_interfaces_bugfix_enable@ +abi_mpi_io_default_enable = @abi_mpi_io_default_enable@ +abi_mpi_io_enable = @abi_mpi_io_enable@ +abi_mpi_ldflags = @abi_mpi_ldflags@ +abi_mpi_level = @abi_mpi_level@ +abi_mpi_libs = @abi_mpi_libs@ +abi_netcdf_default_enable = @abi_netcdf_default_enable@ +abi_openmp_enable = @abi_openmp_enable@ +abi_openmp_offload_enable = @abi_openmp_offload_enable@ +abi_optim_flavor = @abi_optim_flavor@ +abi_python_invocation_enable = @abi_python_invocation_enable@ +abi_source_debug_enable = @abi_source_debug_enable@ +abi_stdin_enable = @abi_stdin_enable@ +abi_sys_spec = @abi_sys_spec@ +abi_timer_enable = @abi_timer_enable@ +abi_triqs_v1_4_enable = @abi_triqs_v1_4_enable@ +abi_triqs_v2_0_enable = @abi_triqs_v2_0_enable@ +abi_zdot_bugfix_enable = @abi_zdot_bugfix_enable@ +abinit_bindir = @abinit_bindir@ +abinit_builddir = @abinit_builddir@ +abinit_chkdir = @abinit_chkdir@ +abinit_datdir = @abinit_datdir@ +abinit_docdir = @abinit_docdir@ +abinit_incdir = @abinit_incdir@ +abinit_libdir = @abinit_libdir@ +abinit_mandir = @abinit_mandir@ +abinit_prefix = @abinit_prefix@ +abinit_srcdir = @abinit_srcdir@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_FC = @ac_ct_FC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cc_info_string = @cc_info_string@ +cxx_info_string = @cxx_info_string@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +enable_avx_safe_mode = @enable_avx_safe_mode@ +enable_bse_unpacked = @enable_bse_unpacked@ +enable_cclock = @enable_cclock@ +enable_crpa_optim = @enable_crpa_optim@ +enable_exports = @enable_exports@ +enable_fc_wrapper = @enable_fc_wrapper@ +enable_gw_dpc = @enable_gw_dpc@ +enable_hints = @enable_hints@ +enable_libtetra = @enable_libtetra@ +enable_lotf = @enable_lotf@ +enable_memory_profiling = @enable_memory_profiling@ +enable_mpi_gpu_aware = @enable_mpi_gpu_aware@ +enable_mpi_inplace = @enable_mpi_inplace@ +enable_mpi_interfaces_bugfix = @enable_mpi_interfaces_bugfix@ +enable_mpi_io = @enable_mpi_io@ +enable_mpi_io_default = @enable_mpi_io_default@ +enable_netcdf_default = @enable_netcdf_default@ +enable_openmp = @enable_openmp@ +enable_openmp_offload = @enable_openmp_offload@ +enable_python_invocation = @enable_python_invocation@ +enable_shared = @enable_shared@ +enable_source_debug = @enable_source_debug@ +enable_static = @enable_static@ +enable_stdin = @enable_stdin@ +enable_timer = @enable_timer@ +enable_triqs_v1_4 = @enable_triqs_v1_4@ +enable_triqs_v2_0 = @enable_triqs_v2_0@ +enable_zdot_bugfix = @enable_zdot_bugfix@ +exec_prefix = @exec_prefix@ +fc_info_string = @fc_info_string@ +fc_mod_fcflags = @fc_mod_fcflags@ +fc_timing = @fc_timing@ +fcflags_opt_02_clib = @fcflags_opt_02_clib@ +fcflags_opt_10_defs = @fcflags_opt_10_defs@ +fcflags_opt_11_memory_mpi = @fcflags_opt_11_memory_mpi@ +fcflags_opt_12_hide_mpi = @fcflags_opt_12_hide_mpi@ +fcflags_opt_14_hidewrite = @fcflags_opt_14_hidewrite@ +fcflags_opt_16_hideleave = @fcflags_opt_16_hideleave@ +fcflags_opt_16_kokkos_toolbox = @fcflags_opt_16_kokkos_toolbox@ +fcflags_opt_17_gpu_toolbox = @fcflags_opt_17_gpu_toolbox@ +fcflags_opt_17_libtetra_ext = @fcflags_opt_17_libtetra_ext@ +fcflags_opt_17_minimax = @fcflags_opt_17_minimax@ +fcflags_opt_17_yaml_out = @fcflags_opt_17_yaml_out@ +fcflags_opt_18_timing = @fcflags_opt_18_timing@ +fcflags_opt_21_hashfuncs = @fcflags_opt_21_hashfuncs@ +fcflags_opt_27_toolbox_oop = @fcflags_opt_27_toolbox_oop@ +fcflags_opt_28_numeric_noabirule = @fcflags_opt_28_numeric_noabirule@ +fcflags_opt_29_kpoints = @fcflags_opt_29_kpoints@ +fcflags_opt_32_util = @fcflags_opt_32_util@ +fcflags_opt_33_xc_lowlevel = @fcflags_opt_33_xc_lowlevel@ +fcflags_opt_39_libpaw = @fcflags_opt_39_libpaw@ +fcflags_opt_41_geometry = @fcflags_opt_41_geometry@ +fcflags_opt_42_nlstrain = @fcflags_opt_42_nlstrain@ +fcflags_opt_42_parser = @fcflags_opt_42_parser@ +fcflags_opt_43_ptgroups = @fcflags_opt_43_ptgroups@ +fcflags_opt_43_wvl_wrappers = @fcflags_opt_43_wvl_wrappers@ +fcflags_opt_44_abitools = @fcflags_opt_44_abitools@ +fcflags_opt_44_abitypes_defs = @fcflags_opt_44_abitypes_defs@ +fcflags_opt_44_manage_kokkos = @fcflags_opt_44_manage_kokkos@ +fcflags_opt_45_geomoptim = @fcflags_opt_45_geomoptim@ +fcflags_opt_45_xgTools = @fcflags_opt_45_xgTools@ +fcflags_opt_46_ghc_omp = @fcflags_opt_46_ghc_omp@ +fcflags_opt_46_manage_cuda = @fcflags_opt_46_manage_cuda@ +fcflags_opt_48_diago = @fcflags_opt_48_diago@ +fcflags_opt_49_gw_toolbox_oop = @fcflags_opt_49_gw_toolbox_oop@ +fcflags_opt_51_manage_mpi = @fcflags_opt_51_manage_mpi@ +fcflags_opt_52_fft_mpi_noabirule = @fcflags_opt_52_fft_mpi_noabirule@ +fcflags_opt_53_ffts = @fcflags_opt_53_ffts@ +fcflags_opt_54_spacepar = @fcflags_opt_54_spacepar@ +fcflags_opt_55_abiutil = @fcflags_opt_55_abiutil@ +fcflags_opt_56_io_mpi = @fcflags_opt_56_io_mpi@ +fcflags_opt_56_mixing = @fcflags_opt_56_mixing@ +fcflags_opt_56_recipspace = @fcflags_opt_56_recipspace@ +fcflags_opt_56_xc = @fcflags_opt_56_xc@ +fcflags_opt_57_iopsp_parser = @fcflags_opt_57_iopsp_parser@ +fcflags_opt_57_iovars = @fcflags_opt_57_iovars@ +fcflags_opt_61_occeig = @fcflags_opt_61_occeig@ +fcflags_opt_62_cg_noabirule = @fcflags_opt_62_cg_noabirule@ +fcflags_opt_62_ctqmc = @fcflags_opt_62_ctqmc@ +fcflags_opt_62_iowfdenpot = @fcflags_opt_62_iowfdenpot@ +fcflags_opt_62_poisson = @fcflags_opt_62_poisson@ +fcflags_opt_62_wvl_wfs = @fcflags_opt_62_wvl_wfs@ +fcflags_opt_64_psp = @fcflags_opt_64_psp@ +fcflags_opt_65_lotf_base = @fcflags_opt_65_lotf_base@ +fcflags_opt_65_paw = @fcflags_opt_65_paw@ +fcflags_opt_66_nonlocal = @fcflags_opt_66_nonlocal@ +fcflags_opt_66_vdwxc = @fcflags_opt_66_vdwxc@ +fcflags_opt_66_wfs = @fcflags_opt_66_wfs@ +fcflags_opt_67_common = @fcflags_opt_67_common@ +fcflags_opt_67_python_invocation_ext = @fcflags_opt_67_python_invocation_ext@ +fcflags_opt_67_triqs_ext = @fcflags_opt_67_triqs_ext@ +fcflags_opt_68_dmft = @fcflags_opt_68_dmft@ +fcflags_opt_68_lotf = @fcflags_opt_68_lotf@ +fcflags_opt_68_recursion = @fcflags_opt_68_recursion@ +fcflags_opt_68_rsprc = @fcflags_opt_68_rsprc@ +fcflags_opt_69_wfdesc = @fcflags_opt_69_wfdesc@ +fcflags_opt_70_gw = @fcflags_opt_70_gw@ +fcflags_opt_71_bse = @fcflags_opt_71_bse@ +fcflags_opt_71_wannier = @fcflags_opt_71_wannier@ +fcflags_opt_72_response = @fcflags_opt_72_response@ +fcflags_opt_77_ddb = @fcflags_opt_77_ddb@ +fcflags_opt_77_suscep = @fcflags_opt_77_suscep@ +fcflags_opt_78_effpot = @fcflags_opt_78_effpot@ +fcflags_opt_78_eph = @fcflags_opt_78_eph@ +fcflags_opt_79_seqpar_mpi = @fcflags_opt_79_seqpar_mpi@ +fcflags_opt_80_rttddft = @fcflags_opt_80_rttddft@ +fcflags_opt_80_tdep = @fcflags_opt_80_tdep@ +fcflags_opt_94_scfcv = @fcflags_opt_94_scfcv@ +fcflags_opt_95_drive = @fcflags_opt_95_drive@ +fcflags_opt_98_main = @fcflags_opt_98_main@ +fcflags_opt_bigdft = @fcflags_opt_bigdft@ +fcflags_opt_default = @fcflags_opt_default@ +fcflags_opt_hdf5 = @fcflags_opt_hdf5@ +fcflags_opt_levmar = @fcflags_opt_levmar@ +fcflags_opt_libpsml = @fcflags_opt_libpsml@ +fcflags_opt_libxc = @fcflags_opt_libxc@ +fcflags_opt_libxml2 = @fcflags_opt_libxml2@ +fcflags_opt_linalg = @fcflags_opt_linalg@ +fcflags_opt_netcdf = @fcflags_opt_netcdf@ +fcflags_opt_netcdf_fortran = @fcflags_opt_netcdf_fortran@ +fcflags_opt_papi = @fcflags_opt_papi@ +fcflags_opt_triqs = @fcflags_opt_triqs@ +fcflags_opt_wannier90 = @fcflags_opt_wannier90@ +fcflags_opt_xmlf90 = @fcflags_opt_xmlf90@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sd_abinit_common_cppflags = @sd_abinit_common_cppflags@ +sd_abinit_common_enable = @sd_abinit_common_enable@ +sd_abinit_common_enable_def = @sd_abinit_common_enable_def@ +sd_abinit_common_fcflags = @sd_abinit_common_fcflags@ +sd_abinit_common_init = @sd_abinit_common_init@ +sd_abinit_common_ldflags = @sd_abinit_common_ldflags@ +sd_abinit_common_libs = @sd_abinit_common_libs@ +sd_abinit_common_ok = @sd_abinit_common_ok@ +sd_abinit_common_options = @sd_abinit_common_options@ +sd_abinit_common_policy = @sd_abinit_common_policy@ +sd_abinit_common_status = @sd_abinit_common_status@ +sd_bigdft_cppflags = @sd_bigdft_cppflags@ +sd_bigdft_enable = @sd_bigdft_enable@ +sd_bigdft_enable_def = @sd_bigdft_enable_def@ +sd_bigdft_fcflags = @sd_bigdft_fcflags@ +sd_bigdft_init = @sd_bigdft_init@ +sd_bigdft_ldflags = @sd_bigdft_ldflags@ +sd_bigdft_libs = @sd_bigdft_libs@ +sd_bigdft_ok = @sd_bigdft_ok@ +sd_bigdft_options = @sd_bigdft_options@ +sd_bigdft_policy = @sd_bigdft_policy@ +sd_bigdft_status = @sd_bigdft_status@ +sd_fft_cflags = @sd_fft_cflags@ +sd_fft_choices = @sd_fft_choices@ +sd_fft_cppflags = @sd_fft_cppflags@ +sd_fft_cxxflags = @sd_fft_cxxflags@ +sd_fft_enable = @sd_fft_enable@ +sd_fft_fcflags = @sd_fft_fcflags@ +sd_fft_flavor = @sd_fft_flavor@ +sd_fft_init = @sd_fft_init@ +sd_fft_ldflags = @sd_fft_ldflags@ +sd_fft_libs = @sd_fft_libs@ +sd_fft_ok = @sd_fft_ok@ +sd_fftw3_cflags = @sd_fftw3_cflags@ +sd_fftw3_cppflags = @sd_fftw3_cppflags@ +sd_fftw3_enable = @sd_fftw3_enable@ +sd_fftw3_enable_def = @sd_fftw3_enable_def@ +sd_fftw3_fcflags = @sd_fftw3_fcflags@ +sd_fftw3_init = @sd_fftw3_init@ +sd_fftw3_ldflags = @sd_fftw3_ldflags@ +sd_fftw3_libs = @sd_fftw3_libs@ +sd_fftw3_ok = @sd_fftw3_ok@ +sd_fftw3_options = @sd_fftw3_options@ +sd_fftw3_policy = @sd_fftw3_policy@ +sd_fftw3_status = @sd_fftw3_status@ +sd_gpu_cflags = @sd_gpu_cflags@ +sd_gpu_cppflags = @sd_gpu_cppflags@ +sd_gpu_cxxflags = @sd_gpu_cxxflags@ +sd_gpu_enable = @sd_gpu_enable@ +sd_gpu_enable_def = @sd_gpu_enable_def@ +sd_gpu_fcflags = @sd_gpu_fcflags@ +sd_gpu_init = @sd_gpu_init@ +sd_gpu_ldflags = @sd_gpu_ldflags@ +sd_gpu_libs = @sd_gpu_libs@ +sd_gpu_ok = @sd_gpu_ok@ +sd_gpu_options = @sd_gpu_options@ +sd_gpu_policy = @sd_gpu_policy@ +sd_gpu_prefix = @sd_gpu_prefix@ +sd_gpu_status = @sd_gpu_status@ +sd_hdf5_cflags = @sd_hdf5_cflags@ +sd_hdf5_cppflags = @sd_hdf5_cppflags@ +sd_hdf5_cxxflags = @sd_hdf5_cxxflags@ +sd_hdf5_enable = @sd_hdf5_enable@ +sd_hdf5_enable_def = @sd_hdf5_enable_def@ +sd_hdf5_enable_fc = @sd_hdf5_enable_fc@ +sd_hdf5_fcflags = @sd_hdf5_fcflags@ +sd_hdf5_h5cc = @sd_hdf5_h5cc@ +sd_hdf5_h5fc = @sd_hdf5_h5fc@ +sd_hdf5_init = @sd_hdf5_init@ +sd_hdf5_ldflags = @sd_hdf5_ldflags@ +sd_hdf5_libs = @sd_hdf5_libs@ +sd_hdf5_ok = @sd_hdf5_ok@ +sd_hdf5_options = @sd_hdf5_options@ +sd_hdf5_policy = @sd_hdf5_policy@ +sd_hdf5_status = @sd_hdf5_status@ +sd_kokkos_cppflags = @sd_kokkos_cppflags@ +sd_kokkos_cxxflags = @sd_kokkos_cxxflags@ +sd_kokkos_enable = @sd_kokkos_enable@ +sd_kokkos_enable_def = @sd_kokkos_enable_def@ +sd_kokkos_init = @sd_kokkos_init@ +sd_kokkos_ldflags = @sd_kokkos_ldflags@ +sd_kokkos_libs = @sd_kokkos_libs@ +sd_kokkos_ok = @sd_kokkos_ok@ +sd_kokkos_options = @sd_kokkos_options@ +sd_kokkos_policy = @sd_kokkos_policy@ +sd_kokkos_status = @sd_kokkos_status@ +sd_levmar_cflags = @sd_levmar_cflags@ +sd_levmar_cppflags = @sd_levmar_cppflags@ +sd_levmar_enable = @sd_levmar_enable@ +sd_levmar_enable_def = @sd_levmar_enable_def@ +sd_levmar_init = @sd_levmar_init@ +sd_levmar_ldflags = @sd_levmar_ldflags@ +sd_levmar_libs = @sd_levmar_libs@ +sd_levmar_ok = @sd_levmar_ok@ +sd_levmar_options = @sd_levmar_options@ +sd_levmar_policy = @sd_levmar_policy@ +sd_levmar_status = @sd_levmar_status@ +sd_libpaw_cppflags = @sd_libpaw_cppflags@ +sd_libpaw_enable = @sd_libpaw_enable@ +sd_libpaw_enable_def = @sd_libpaw_enable_def@ +sd_libpaw_fcflags = @sd_libpaw_fcflags@ +sd_libpaw_init = @sd_libpaw_init@ +sd_libpaw_ldflags = @sd_libpaw_ldflags@ +sd_libpaw_libs = @sd_libpaw_libs@ +sd_libpaw_ok = @sd_libpaw_ok@ +sd_libpaw_options = @sd_libpaw_options@ +sd_libpaw_policy = @sd_libpaw_policy@ +sd_libpaw_status = @sd_libpaw_status@ +sd_libpsml_cppflags = @sd_libpsml_cppflags@ +sd_libpsml_enable = @sd_libpsml_enable@ +sd_libpsml_enable_def = @sd_libpsml_enable_def@ +sd_libpsml_fcflags = @sd_libpsml_fcflags@ +sd_libpsml_init = @sd_libpsml_init@ +sd_libpsml_ldflags = @sd_libpsml_ldflags@ +sd_libpsml_libs = @sd_libpsml_libs@ +sd_libpsml_ok = @sd_libpsml_ok@ +sd_libpsml_options = @sd_libpsml_options@ +sd_libpsml_policy = @sd_libpsml_policy@ +sd_libpsml_status = @sd_libpsml_status@ +sd_libxc_cflags = @sd_libxc_cflags@ +sd_libxc_cppflags = @sd_libxc_cppflags@ +sd_libxc_enable = @sd_libxc_enable@ +sd_libxc_enable_def = @sd_libxc_enable_def@ +sd_libxc_enable_fc = @sd_libxc_enable_fc@ +sd_libxc_fcflags = @sd_libxc_fcflags@ +sd_libxc_init = @sd_libxc_init@ +sd_libxc_ldflags = @sd_libxc_ldflags@ +sd_libxc_libs = @sd_libxc_libs@ +sd_libxc_ok = @sd_libxc_ok@ +sd_libxc_options = @sd_libxc_options@ +sd_libxc_policy = @sd_libxc_policy@ +sd_libxc_status = @sd_libxc_status@ +sd_linalg_cflags = @sd_linalg_cflags@ +sd_linalg_choices = @sd_linalg_choices@ +sd_linalg_cppflags = @sd_linalg_cppflags@ +sd_linalg_cxxflags = @sd_linalg_cxxflags@ +sd_linalg_enable = @sd_linalg_enable@ +sd_linalg_fcflags = @sd_linalg_fcflags@ +sd_linalg_flavor = @sd_linalg_flavor@ +sd_linalg_has_elpa = @sd_linalg_has_elpa@ +sd_linalg_has_scalapack = @sd_linalg_has_scalapack@ +sd_linalg_init = @sd_linalg_init@ +sd_linalg_ldflags = @sd_linalg_ldflags@ +sd_linalg_libs = @sd_linalg_libs@ +sd_linalg_ok = @sd_linalg_ok@ +sd_mpi_cc = @sd_mpi_cc@ +sd_mpi_cflags = @sd_mpi_cflags@ +sd_mpi_cppflags = @sd_mpi_cppflags@ +sd_mpi_cxx = @sd_mpi_cxx@ +sd_mpi_enable = @sd_mpi_enable@ +sd_mpi_enable_cxx = @sd_mpi_enable_cxx@ +sd_mpi_enable_def = @sd_mpi_enable_def@ +sd_mpi_enable_fc = @sd_mpi_enable_fc@ +sd_mpi_fc = @sd_mpi_fc@ +sd_mpi_fcflags = @sd_mpi_fcflags@ +sd_mpi_init = @sd_mpi_init@ +sd_mpi_ldflags = @sd_mpi_ldflags@ +sd_mpi_libs = @sd_mpi_libs@ +sd_mpi_ok = @sd_mpi_ok@ +sd_mpi_options = @sd_mpi_options@ +sd_mpi_policy = @sd_mpi_policy@ +sd_mpi_status = @sd_mpi_status@ +sd_netcdf_cflags = @sd_netcdf_cflags@ +sd_netcdf_cppflags = @sd_netcdf_cppflags@ +sd_netcdf_enable = @sd_netcdf_enable@ +sd_netcdf_enable_def = @sd_netcdf_enable_def@ +sd_netcdf_fcflags = @sd_netcdf_fcflags@ +sd_netcdf_fortran_cflags = @sd_netcdf_fortran_cflags@ +sd_netcdf_fortran_cppflags = @sd_netcdf_fortran_cppflags@ +sd_netcdf_fortran_enable = @sd_netcdf_fortran_enable@ +sd_netcdf_fortran_enable_def = @sd_netcdf_fortran_enable_def@ +sd_netcdf_fortran_fcflags = @sd_netcdf_fortran_fcflags@ +sd_netcdf_fortran_init = @sd_netcdf_fortran_init@ +sd_netcdf_fortran_ldflags = @sd_netcdf_fortran_ldflags@ +sd_netcdf_fortran_libs = @sd_netcdf_fortran_libs@ +sd_netcdf_fortran_ok = @sd_netcdf_fortran_ok@ +sd_netcdf_fortran_options = @sd_netcdf_fortran_options@ +sd_netcdf_fortran_policy = @sd_netcdf_fortran_policy@ +sd_netcdf_fortran_status = @sd_netcdf_fortran_status@ +sd_netcdf_init = @sd_netcdf_init@ +sd_netcdf_ldflags = @sd_netcdf_ldflags@ +sd_netcdf_libs = @sd_netcdf_libs@ +sd_netcdf_ok = @sd_netcdf_ok@ +sd_netcdf_options = @sd_netcdf_options@ +sd_netcdf_policy = @sd_netcdf_policy@ +sd_netcdf_status = @sd_netcdf_status@ +sd_papi_cflags = @sd_papi_cflags@ +sd_papi_cppflags = @sd_papi_cppflags@ +sd_papi_enable = @sd_papi_enable@ +sd_papi_enable_def = @sd_papi_enable_def@ +sd_papi_init = @sd_papi_init@ +sd_papi_ldflags = @sd_papi_ldflags@ +sd_papi_libs = @sd_papi_libs@ +sd_papi_ok = @sd_papi_ok@ +sd_papi_options = @sd_papi_options@ +sd_papi_policy = @sd_papi_policy@ +sd_papi_sd_papi_fcflags = @sd_papi_sd_papi_fcflags@ +sd_papi_status = @sd_papi_status@ +sd_pfft_cflags = @sd_pfft_cflags@ +sd_pfft_cppflags = @sd_pfft_cppflags@ +sd_pfft_enable = @sd_pfft_enable@ +sd_pfft_enable_def = @sd_pfft_enable_def@ +sd_pfft_init = @sd_pfft_init@ +sd_pfft_ldflags = @sd_pfft_ldflags@ +sd_pfft_libs = @sd_pfft_libs@ +sd_pfft_ok = @sd_pfft_ok@ +sd_pfft_options = @sd_pfft_options@ +sd_pfft_policy = @sd_pfft_policy@ +sd_pfft_status = @sd_pfft_status@ +sd_sys_fcflags = @sd_sys_fcflags@ +sd_triqs_cflags = @sd_triqs_cflags@ +sd_triqs_cppflags = @sd_triqs_cppflags@ +sd_triqs_cxxflags = @sd_triqs_cxxflags@ +sd_triqs_enable = @sd_triqs_enable@ +sd_triqs_enable_def = @sd_triqs_enable_def@ +sd_triqs_fcflags = @sd_triqs_fcflags@ +sd_triqs_init = @sd_triqs_init@ +sd_triqs_ldflags = @sd_triqs_ldflags@ +sd_triqs_libs = @sd_triqs_libs@ +sd_triqs_ok = @sd_triqs_ok@ +sd_triqs_options = @sd_triqs_options@ +sd_triqs_policy = @sd_triqs_policy@ +sd_triqs_status = @sd_triqs_status@ +sd_wannier90_cppflags = @sd_wannier90_cppflags@ +sd_wannier90_enable = @sd_wannier90_enable@ +sd_wannier90_enable_def = @sd_wannier90_enable_def@ +sd_wannier90_fcflags = @sd_wannier90_fcflags@ +sd_wannier90_init = @sd_wannier90_init@ +sd_wannier90_ldflags = @sd_wannier90_ldflags@ +sd_wannier90_libs = @sd_wannier90_libs@ +sd_wannier90_ok = @sd_wannier90_ok@ +sd_wannier90_options = @sd_wannier90_options@ +sd_wannier90_policy = @sd_wannier90_policy@ +sd_wannier90_status = @sd_wannier90_status@ +sd_xmlf90_cppflags = @sd_xmlf90_cppflags@ +sd_xmlf90_enable = @sd_xmlf90_enable@ +sd_xmlf90_enable_def = @sd_xmlf90_enable_def@ +sd_xmlf90_fcflags = @sd_xmlf90_fcflags@ +sd_xmlf90_init = @sd_xmlf90_init@ +sd_xmlf90_ldflags = @sd_xmlf90_ldflags@ +sd_xmlf90_libs = @sd_xmlf90_libs@ +sd_xmlf90_ok = @sd_xmlf90_ok@ +sd_xmlf90_options = @sd_xmlf90_options@ +sd_xmlf90_policy = @sd_xmlf90_policy@ +sd_xmlf90_status = @sd_xmlf90_status@ +sd_yakl_cppflags = @sd_yakl_cppflags@ +sd_yakl_enable = @sd_yakl_enable@ +sd_yakl_enable_def = @sd_yakl_enable_def@ +sd_yakl_fcflags = @sd_yakl_fcflags@ +sd_yakl_init = @sd_yakl_init@ +sd_yakl_ldflags = @sd_yakl_ldflags@ +sd_yakl_libs = @sd_yakl_libs@ +sd_yakl_ok = @sd_yakl_ok@ +sd_yakl_options = @sd_yakl_options@ +sd_yakl_policy = @sd_yakl_policy@ +sd_yakl_status = @sd_yakl_status@ +sharedstatedir = @sharedstatedir@ +src_02_clib_fcflags = @src_02_clib_fcflags@ +src_10_defs_fcflags = @src_10_defs_fcflags@ +src_11_memory_mpi_fcflags = @src_11_memory_mpi_fcflags@ +src_12_hide_mpi_fcflags = @src_12_hide_mpi_fcflags@ +src_14_hidewrite_fcflags = @src_14_hidewrite_fcflags@ +src_16_hideleave_fcflags = @src_16_hideleave_fcflags@ +src_16_kokkos_toolbox_fcflags = @src_16_kokkos_toolbox_fcflags@ +src_17_gpu_toolbox_fcflags = @src_17_gpu_toolbox_fcflags@ +src_17_libtetra_ext_fcflags = @src_17_libtetra_ext_fcflags@ +src_17_minimax_fcflags = @src_17_minimax_fcflags@ +src_17_yaml_out_fcflags = @src_17_yaml_out_fcflags@ +src_18_timing_fcflags = @src_18_timing_fcflags@ +src_21_hashfuncs_fcflags = @src_21_hashfuncs_fcflags@ +src_27_toolbox_oop_fcflags = @src_27_toolbox_oop_fcflags@ +src_28_numeric_noabirule_fcflags = @src_28_numeric_noabirule_fcflags@ +src_29_kpoints_fcflags = @src_29_kpoints_fcflags@ +src_32_util_fcflags = @src_32_util_fcflags@ +src_33_xc_lowlevel_fcflags = @src_33_xc_lowlevel_fcflags@ +src_39_libpaw_fcflags = @src_39_libpaw_fcflags@ +src_41_geometry_fcflags = @src_41_geometry_fcflags@ +src_42_nlstrain_fcflags = @src_42_nlstrain_fcflags@ +src_42_parser_fcflags = @src_42_parser_fcflags@ +src_43_ptgroups_fcflags = @src_43_ptgroups_fcflags@ +src_43_wvl_wrappers_fcflags = @src_43_wvl_wrappers_fcflags@ +src_44_abitools_fcflags = @src_44_abitools_fcflags@ +src_44_abitypes_defs_fcflags = @src_44_abitypes_defs_fcflags@ +src_44_manage_kokkos_fcflags = @src_44_manage_kokkos_fcflags@ +src_45_geomoptim_fcflags = @src_45_geomoptim_fcflags@ +src_45_xgTools_fcflags = @src_45_xgTools_fcflags@ +src_46_ghc_omp_fcflags = @src_46_ghc_omp_fcflags@ +src_46_manage_cuda_fcflags = @src_46_manage_cuda_fcflags@ +src_48_diago_fcflags = @src_48_diago_fcflags@ +src_49_gw_toolbox_oop_fcflags = @src_49_gw_toolbox_oop_fcflags@ +src_51_manage_mpi_fcflags = @src_51_manage_mpi_fcflags@ +src_52_fft_mpi_noabirule_fcflags = @src_52_fft_mpi_noabirule_fcflags@ +src_53_ffts_fcflags = @src_53_ffts_fcflags@ +src_54_spacepar_fcflags = @src_54_spacepar_fcflags@ +src_55_abiutil_fcflags = @src_55_abiutil_fcflags@ +src_56_io_mpi_fcflags = @src_56_io_mpi_fcflags@ +src_56_mixing_fcflags = @src_56_mixing_fcflags@ +src_56_recipspace_fcflags = @src_56_recipspace_fcflags@ +src_56_xc_fcflags = @src_56_xc_fcflags@ +src_57_iopsp_parser_fcflags = @src_57_iopsp_parser_fcflags@ +src_57_iovars_fcflags = @src_57_iovars_fcflags@ +src_61_occeig_fcflags = @src_61_occeig_fcflags@ +src_62_cg_noabirule_fcflags = @src_62_cg_noabirule_fcflags@ +src_62_ctqmc_fcflags = @src_62_ctqmc_fcflags@ +src_62_iowfdenpot_fcflags = @src_62_iowfdenpot_fcflags@ +src_62_poisson_fcflags = @src_62_poisson_fcflags@ +src_62_wvl_wfs_fcflags = @src_62_wvl_wfs_fcflags@ +src_64_psp_fcflags = @src_64_psp_fcflags@ +src_65_lotf_base_fcflags = @src_65_lotf_base_fcflags@ +src_65_paw_fcflags = @src_65_paw_fcflags@ +src_66_nonlocal_fcflags = @src_66_nonlocal_fcflags@ +src_66_vdwxc_fcflags = @src_66_vdwxc_fcflags@ +src_66_wfs_fcflags = @src_66_wfs_fcflags@ +src_67_common_fcflags = @src_67_common_fcflags@ +src_67_python_invocation_ext_fcflags = @src_67_python_invocation_ext_fcflags@ +src_67_triqs_ext_fcflags = @src_67_triqs_ext_fcflags@ +src_68_dmft_fcflags = @src_68_dmft_fcflags@ +src_68_lotf_fcflags = @src_68_lotf_fcflags@ +src_68_recursion_fcflags = @src_68_recursion_fcflags@ +src_68_rsprc_fcflags = @src_68_rsprc_fcflags@ +src_69_wfdesc_fcflags = @src_69_wfdesc_fcflags@ +src_70_gw_fcflags = @src_70_gw_fcflags@ +src_71_bse_fcflags = @src_71_bse_fcflags@ +src_71_wannier_fcflags = @src_71_wannier_fcflags@ +src_72_response_fcflags = @src_72_response_fcflags@ +src_77_ddb_fcflags = @src_77_ddb_fcflags@ +src_77_suscep_fcflags = @src_77_suscep_fcflags@ +src_78_effpot_fcflags = @src_78_effpot_fcflags@ +src_78_eph_fcflags = @src_78_eph_fcflags@ +src_79_seqpar_mpi_fcflags = @src_79_seqpar_mpi_fcflags@ +src_80_rttddft_fcflags = @src_80_rttddft_fcflags@ +src_80_tdep_fcflags = @src_80_tdep_fcflags@ +src_94_scfcv_fcflags = @src_94_scfcv_fcflags@ +src_95_drive_fcflags = @src_95_drive_fcflags@ +src_common_fcflags = @src_common_fcflags@ +src_core_fcflags = @src_core_fcflags@ +src_libpaw_fcflags = @src_libpaw_fcflags@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +with_abinit_common = @with_abinit_common@ +with_bigdft = @with_bigdft@ +with_config_file = @with_config_file@ +with_debug_flavor = @with_debug_flavor@ +with_fallbacks = @with_fallbacks@ +with_fc_vendor = @with_fc_vendor@ +with_fc_version = @with_fc_version@ +with_fft_flavor = @with_fft_flavor@ +with_fftw3 = @with_fftw3@ +with_gnu_ld = @with_gnu_ld@ +with_gpu = @with_gpu@ +with_hdf5 = @with_hdf5@ +with_kokkos = @with_kokkos@ +with_levmar = @with_levmar@ +with_libpaw = @with_libpaw@ +with_libpsml = @with_libpsml@ +with_libxc = @with_libxc@ +with_libxml2 = @with_libxml2@ +with_linalg_flavor = @with_linalg_flavor@ +with_mpi = @with_mpi@ +with_mpi_level = @with_mpi_level@ +with_netcdf = @with_netcdf@ +with_optim_flavor = @with_optim_flavor@ +with_papi = @with_papi@ +with_pfft = @with_pfft@ +with_triqs = @with_triqs@ +with_wannier90 = @with_wannier90@ +with_xmlf90 = @with_xmlf90@ +with_yakl = @with_yakl@ +AM_CFLAGS = @ABI_CPPFLAGS@ +AM_CXXFLAGS = $(sd_triqs_cxxflags) +AM_FCFLAGS = @FPPFLAGS@ @FCFLAGS_FREEFORM@ @FCFLAGS_MODDIR@ @sd_sys_fcflags@ @fcflags_opt_17_minimax@ +AM_CPPFLAGS = \ + @src_10_defs_fcflags@ \ + @src_16_hideleave_fcflags@ \ + @src_17_minimax_fcflags@ \ + @src_common_fcflags@ \ + @src_core_fcflags@ \ + @src_libpaw_fcflags@ \ + @sd_linalg_cppflags@ \ + @sd_linalg_fcflags@ \ + @fc_mod_fcflags@ + + +# Regular source files +lib17_minimax_srcs = \ + gx_common.h \ + minimax_grids.F90 \ + minimax_omega.F90 \ + minimax_tau.F90 \ + minimax_utils.F90 + + +# Source files depending on conditionals + +# Library description +noinst_LIBRARIES = lib17_minimax.a +lib17_minimax_a_SOURCES = $(lib17_minimax_srcs) + +# Dependencies (inside the directory) of directory 17_minimax +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. +CLEANFILES = minimax_grids_cpp.f90 minimax_omega_cpp.f90 \ + minimax_tau_cpp.f90 minimax_utils_cpp.f90 \ + minimax_grids.$(MODEXT) minimax_omega.$(MODEXT) \ + minimax_tau.$(MODEXT) minimax_utils.$(MODEXT) +EXTRA_DIST = abinit.src abinit.dep +all: all-am + +.SUFFIXES: +.SUFFIXES: .F90 .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu shared/common/src/17_minimax/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu shared/common/src/17_minimax/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) + +lib17_minimax.a: $(lib17_minimax_a_OBJECTS) $(lib17_minimax_a_DEPENDENCIES) $(EXTRA_lib17_minimax_a_DEPENDENCIES) + $(AM_V_at)-rm -f lib17_minimax.a + $(AM_V_AR)$(lib17_minimax_a_AR) lib17_minimax.a $(lib17_minimax_a_OBJECTS) $(lib17_minimax_a_LIBADD) + $(AM_V_at)$(RANLIB) lib17_minimax.a + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +.F90.o: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ $< + +.F90.obj: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-noinstLIBRARIES cscopelist-am ctags ctags-am distclean \ + distclean-compile distclean-generic distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am + +.PRECIOUS: Makefile + + +minimax_grids.$(OBJEXT): minimax_omega.$(OBJEXT) minimax_tau.$(OBJEXT) minimax_utils.$(OBJEXT) + +minimax_omega.$(OBJEXT): minimax_utils.$(OBJEXT) + +minimax_tau.$(OBJEXT): minimax_utils.$(OBJEXT) + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/GX-PAW/common/src/17_minimax/README.md b/GX-PAW/common/src/17_minimax/README.md new file mode 100644 index 00000000..405e4759 --- /dev/null +++ b/GX-PAW/common/src/17_minimax/README.md @@ -0,0 +1,6 @@ + +This directory contains Fortran routines and include files taken +from the [GreenX library](https://github.com/nomad-coe/greenX), +in particular the files located in the GX-TimeFrequency directory. + +It should be relatively easy to keep the local copy in synch with the official one provide by the Green-X library. diff --git a/GX-PAW/common/src/17_minimax/__pycache__/abinit.cpython-36.pyc b/GX-PAW/common/src/17_minimax/__pycache__/abinit.cpython-36.pyc new file mode 100644 index 00000000..a1693a40 Binary files /dev/null and b/GX-PAW/common/src/17_minimax/__pycache__/abinit.cpython-36.pyc differ diff --git a/GX-PAW/common/src/17_minimax/abinit.dep b/GX-PAW/common/src/17_minimax/abinit.dep new file mode 100644 index 00000000..dac67b4b --- /dev/null +++ b/GX-PAW/common/src/17_minimax/abinit.dep @@ -0,0 +1,17 @@ +# Dependencies (inside the directory) of directory 17_minimax +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. + +CLEANFILES += \ + minimax_grids.$(MODEXT) \ + minimax_omega.$(MODEXT) \ + minimax_tau.$(MODEXT) \ + minimax_utils.$(MODEXT) + +minimax_grids.$(OBJEXT): minimax_omega.$(OBJEXT) minimax_tau.$(OBJEXT) minimax_utils.$(OBJEXT) + +minimax_omega.$(OBJEXT): minimax_utils.$(OBJEXT) + +minimax_tau.$(OBJEXT): minimax_utils.$(OBJEXT) \ No newline at end of file diff --git a/GX-PAW/common/src/17_minimax/abinit.dir b/GX-PAW/common/src/17_minimax/abinit.dir new file mode 100644 index 00000000..7567a0cf --- /dev/null +++ b/GX-PAW/common/src/17_minimax/abinit.dir @@ -0,0 +1,8 @@ +# Dependencies (outside the directory) of directory 17_minimax +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. + +include_dirs = \ +['10_defs', '16_hideleave', '17_minimax'] \ No newline at end of file diff --git a/GX-PAW/common/src/17_minimax/abinit.src b/GX-PAW/common/src/17_minimax/abinit.src new file mode 100644 index 00000000..0c6a8c23 --- /dev/null +++ b/GX-PAW/common/src/17_minimax/abinit.src @@ -0,0 +1,29 @@ +# -*- Python -*- +# +# Copyright (C) 2005-2024 ABINIT Group (Yann Pouillon) +# +# This file is part of the ABINIT software package. For license information, +# please see the COPYING file in the top-level directory of the ABINIT source +# distribution. +# + +# +# Source files making up the 67_recursion library +# + +# Source file attributes +ABI_SRC_NIL = 0 # No attribute +ABI_SRC_BLT = 1 # The file is built by a script +ABI_SRC_DEP = 2 # The file depends on other files + +# Source files +sources = [ + "gx_common.h", + "minimax_grids.F90", + "minimax_omega.F90", + "minimax_tau.F90", + "minimax_utils.F90", +] + +# IMPORTANT : please use the alphabetic order in the previous list. Do NOT add the new routine names at the end of the list. +# This is important to avoid numerous conflicts at merge time. Thank you very much. Xavier. diff --git a/GX-PAW/common/src/17_minimax/gx_common.h b/GX-PAW/common/src/17_minimax/gx_common.h new file mode 100644 index 00000000..4cf35fce --- /dev/null +++ b/GX-PAW/common/src/17_minimax/gx_common.h @@ -0,0 +1,14 @@ +! ************************************************************************************************** +! Copyright (C) 2020-2023 Green-X library +! This file is distributed under the terms of the APACHE2 License. +! +! ************************************************************************************************** +/* +#ifdef HAVE_FC_LONG_LINES +#define _REGISTER_EXC(msg) call register_exc(msg, filename=__FILE__, lineno=__LINE__) +#else +#define _REGISTER_EXC(msg) call register_exc(msg) +#endif +*/ + +#define _REGISTER_EXC(msg) ABI_ERROR(msg) diff --git a/GX-PAW/common/src/17_minimax/lib17_minimax.a b/GX-PAW/common/src/17_minimax/lib17_minimax.a new file mode 100644 index 00000000..3c21f778 Binary files /dev/null and b/GX-PAW/common/src/17_minimax/lib17_minimax.a differ diff --git a/GX-PAW/common/src/17_minimax/minimax_grids.F90 b/GX-PAW/common/src/17_minimax/minimax_grids.F90 new file mode 100644 index 00000000..acd3f7f8 --- /dev/null +++ b/GX-PAW/common/src/17_minimax/minimax_grids.F90 @@ -0,0 +1,545 @@ +! ************************************************************************************************** +! Copyright (C) 2020-2023 Green-X library +! This file is distributed under the terms of the APACHE2 License. +! +! ************************************************************************************************** +!> \brief Routines to calculate frequency and time grids (integration points and weights) +!> for correlation methods as well as weights for the inhomogeneous cosine/sine transform. +!> +!> NB: When dealing with runtime exceptions, we set ierr to a non-zero value and return immediately +! to the caller so we don't need to goto to a cleanup section at the end of the procedure. +! Assume -std=f2008: i.e. allocatable arrays are automatically deallocated when going out of scope. +!> reference: [https://doi.org/10.1021/ct5001268](https://doi.org/10.1021/ct5001268) +!> reference: [https://doi.org/10.1103/PhysRevB.94.165109](https://doi.org/10.1103/PhysRevB.94.165109) +! ************************************************************************************************** + +module minimax_grids +#if defined HAVE_CONFIG_H +#include "config.h" +#endif +#include "abi_common.h" + +#include "gx_common.h" + use defs_basis, only: dp, pi + use m_errors + !use kinds, only: dp + !use error_handling, only: register_exc + !use constants, only: pi + use minimax_tau, only: get_points_weights_tau + use minimax_omega, only: get_points_weights_omega + use minimax_utils, only: cosine_wt, cosine_tw, sine_tw + !use lapack_interfaces, only: dgemm, dgesdd + + implicit none + + private + + !> Main entry point for client code. + public :: gx_minimax_grid, gx_minimax_grid_frequency + +contains + + !> \brief Compute minimax grid for GW calculation on imaginary time/frequency domain. + !! @param[in] num_points: Number of mesh points. + !! @param[in] e_min: Minimum transition energy. Arbitrary units as we only need e_max/e_min + !! @param[in] e_max: Maximum transition energy. + !! @param[out] tau_points: imaginary time grid points + !! @param[out] tau_weights: weights for imaginary time grid points weights + !! @param[out] omega_points: imaginary frequency grid points + !! @param[out] omega_weights: weights for imaginary frequency grid points + !! @param[out] cosft_wt: weights for tau -> omega cosine transform. cos(w*t) factor is included. + !! @param[out] cosft_tw: weights for omega -> tau cosine transform. cos(w*t) factor is included. + !! @param[out] sinft_wt: weights for tau -> omega sine transform. sin(w*t) factor is included. + !! @param[out] max_errors: Max error for the three kind of transforms (same order as previous args) + !! @param[out] cosft_duality_error. Max_{ij} |AB - I| where A and B are the cosft_wt and cosft_tw matrices. + !! @param[out] ierr: Exit status + !! @param[in] bare_cos_sin_weights: whether the cosine and sine weights are multiplied by cos and sin term, optional + subroutine gx_minimax_grid(num_points, e_min, e_max, & + tau_points, tau_weights, omega_points, omega_weights, & + cosft_wt, cosft_tw, sinft_wt, & + max_errors, cosft_duality_error, ierr, bare_cos_sin_weights, regterm) + + integer, intent(in) :: num_points + real(kind=dp), intent(in) :: e_min, e_max + real(kind=dp), allocatable, dimension(:), & + intent(out) :: tau_points, tau_weights + real(kind=dp), allocatable, dimension(:), & + intent(out) :: omega_points, omega_weights + real(kind=dp), allocatable, dimension(:, :), & + intent(out) :: cosft_wt, cosft_tw, sinft_wt + real(kind=dp), intent(out) :: max_errors(3), cosft_duality_error + logical, intent(in), optional :: bare_cos_sin_weights + integer, intent(out) :: ierr + real(kind=dp),optional,intent(in) :: regterm + + ! Internal variables + logical :: my_bare_cos_sin_weights + integer, parameter :: cos_t_to_cos_w = 1 + integer, parameter :: cos_w_to_cos_t = 2 + integer, parameter :: sin_t_to_sin_w = 3 + integer :: i_point, j_point + real(kind=dp) :: e_range, scaling, regterm__ + real(kind=dp), dimension(:), allocatable :: x_tw + real(kind=dp), dimension(:, :), allocatable :: mat + real(kind=dp), dimension(:, :), allocatable :: tmp_cosft_wt, tmp_cosft_tw + + my_bare_cos_sin_weights = .false. + if (present(bare_cos_sin_weights)) then + my_bare_cos_sin_weights = bare_cos_sin_weights + endif + + regterm__ = 0.0_dp; if (present(regterm)) regterm__ = regterm + + ! Begin work + e_range = e_max/e_min + ierr = 0 + + ! Allocations + allocate (x_tw(2*num_points)) + if (.not. allocated(omega_points)) then + allocate (omega_points(num_points)) + end if + if (.not. allocated(omega_weights)) then + allocate (omega_weights(num_points)) + end if + if (.not. allocated(tau_points)) then + allocate (tau_points(num_points)) + end if + if (.not. allocated(tau_weights)) then + allocate (tau_weights(num_points)) + end if + + ! Get the frequency grid points and weights + call get_points_weights_omega(num_points, e_range, x_tw, ierr) + if (ierr /= 0) return + + ! Scale the frequency grid points and weights from [1,R] to [e_min,e_max] + ! Note: the frequency grid points and weights include a factor of two + scaling = e_min + omega_points(:) = x_tw(1: num_points) *scaling + omega_weights(:) = x_tw(num_points+1: 2* num_points) *scaling + + ! Get the time grid points and weights + call get_points_weights_tau(num_points, e_range, x_tw, ierr) + if (ierr /= 0) return + + ! Scale the time grid points and weights from [1,R] to [e_min,e_max] + scaling = 2.0_dp *e_min + tau_points(:) = x_tw(1:num_points) / scaling + tau_weights(:) = x_tw(num_points+1:2*num_points) / scaling + + allocate (cosft_wt(num_points, num_points)) + allocate (cosft_tw(num_points, num_points)) + allocate (sinft_wt(num_points, num_points)) + allocate (tmp_cosft_wt(num_points, num_points)) + allocate (tmp_cosft_tw(num_points, num_points)) + + ! get the weights for the cosine transform W^c(it) -> W^c(iw) + call get_transformation_weights(num_points, tau_points, omega_points, cosft_wt, e_min, e_max, & + max_errors(1), cos_t_to_cos_w, regterm__, ierr) + if (ierr /= 0) return + + ! get the weights for the cosine transform W^c(iw) -> W^c(it) + call get_transformation_weights(num_points, tau_points, omega_points, cosft_tw, e_min, e_max, & + max_errors(2), cos_w_to_cos_t, regterm__, ierr) + if (ierr /= 0) return + + ! get the weights for the sine transform Sigma^sin(it) -> Sigma^sin(iw) (PRB 94, 165109 (2016), Eq. 71) + call get_transformation_weights(num_points, tau_points, omega_points, sinft_wt, e_min, e_max, & + max_errors(3), sin_t_to_sin_w, regterm__, ierr) + if (ierr /= 0) return + + ! Compute the actual weights used for the inhomogeneous cosine/ FT and check whether + ! the two matrices for the forward/backward transform are the inverse of each other. + if(.not.my_bare_cos_sin_weights) then + do j_point = 1, num_points + do i_point = 1, num_points + cosft_wt(j_point, i_point) = cosft_wt(j_point, i_point)*cos(tau_points(i_point)*omega_points(j_point)) + cosft_tw(i_point, j_point) = cosft_tw(i_point, j_point)*cos(tau_points(i_point)*omega_points(j_point)) + sinft_wt(j_point, i_point) = sinft_wt(j_point, i_point)*sin(tau_points(i_point)*omega_points(j_point)) + end do + end do + else + do j_point = 1, num_points + do i_point = 1, num_points + tmp_cosft_wt(j_point, i_point) = cosft_wt(j_point, i_point)*cos(tau_points(i_point)*omega_points(j_point)) + tmp_cosft_tw(i_point, j_point) = cosft_tw(i_point, j_point)*cos(tau_points(i_point)*omega_points(j_point)) + end do + end do + end if + + allocate (mat(num_points, num_points)) + if(.not.my_bare_cos_sin_weights) then + mat(:,:) = matmul(cosft_wt, cosft_tw) + else + mat(:,:) = matmul(tmp_cosft_wt, tmp_cosft_tw) + endif + + do i_point = 1, num_points + mat(i_point, i_point) = mat(i_point, i_point) - 1.0_dp + end do + cosft_duality_error = maxval(abs(mat)) + + deallocate (mat) + deallocate (x_tw) + deallocate (tmp_cosft_wt,tmp_cosft_tw) + + end subroutine gx_minimax_grid + + !> \brief Retrieves the frequency grid for a canonical GW/RPA calculation + !! @param[in] num_points: Number of mesh points. + !! @param[in] e_min: Minimum transition energy. Arbitrary units as we only need e_max/e_min + !! @param[in] e_max: Maximum transition energy. + !! @param[out] omega_points: imaginary frequency grid points + !! @param[out] omega_weights: weights for imaginary frequency grid points + !! @param[out] ierr: Exit status + subroutine gx_minimax_grid_frequency (num_points, e_min, e_max, omega_points, omega_weights, ierr) + integer, intent(in) :: num_points + real(kind=dp), intent(in) :: e_min, e_max + real(kind=dp), allocatable, dimension(:), & + intent(out) :: omega_points(:), omega_weights(:) + integer, intent(out) :: ierr + + ! Internal variables + real(kind=dp) :: e_range, scaling + real(kind=dp), dimension(:), allocatable :: x_tw + + ! Begin work + e_range = e_max/e_min + ierr = 0 + + ! Allocations + allocate (x_tw(2*num_points)) + if (.not. allocated(omega_points)) then + allocate (omega_points(num_points)) + end if + if (.not. allocated(omega_weights)) then + allocate (omega_weights(num_points)) + end if + + ! Get the frequency grid points and weights + call get_points_weights_omega(num_points, e_range, x_tw, ierr) + if (ierr /= 0) return + + ! Scale the frequency grid points and weights from [1,R] to [e_min,e_max] + ! Note: the frequency grid points and weights include a factor of two + scaling = e_min + omega_points(:) = x_tw(1: num_points) *scaling + omega_weights(:) = x_tw(num_points+1: 2* num_points) *scaling + + deallocate (x_tw) + + end subroutine gx_minimax_grid_frequency + + + !> \brief Get the weights eiter for the cosine/sin transformation for tau to omega or viceversa + !! @param[in] num_points: Number of mesh points. + !! @param[in] tau_points: imaginary time grid points + !! @param[in] omega_points: imaginary frequency grid points + !! @param[inout] weights: corresponding tranformation weights + !! @param[in] e_min: Minimum transition energy. + !! @param[in] e_max: Maximum transition energy. + !! @param[inout] max_error: Max error for the transform + !! @param[in] transformation type : 1 the cosine transform cos(it) -> cos(iw) + !! : 2 the cosine transform cos(iw) -> cos(it) + !! : 3 the sine transform sin(it) -> sin(iw) + !! @param[in] ierr: exit status + subroutine get_transformation_weights(num_points, tau_points, omega_points, weights, e_min, e_max, & + max_error, transformation_type, regterm, ierr) + + integer, intent(in) :: num_points + real(kind=dp), allocatable, dimension(:), & + intent(in) :: tau_points + real(kind=dp), allocatable, dimension(:), & + intent(in) :: omega_points + real(kind=dp), allocatable, dimension(:, :), & + intent(inout) :: weights + real(kind=dp), intent(in) :: e_min, e_max + real(kind=dp), intent(inout) :: max_error + integer, intent(in) :: transformation_type + integer, intent(out) :: ierr + real(kind=dp),intent(in) :: regterm + + ! Internal variables + integer :: i_node, i_point, j_point, k_point, & + num_x_nodes + integer, parameter :: nodes_factor = 200 + real(kind=dp) :: current_point, x_factor + real(kind=dp), allocatable, dimension(:) :: weights_work, x_mu, psi + real(kind=dp), allocatable, dimension(:, :) :: mat_A + + integer :: lwork + integer, allocatable, dimension(:) :: iwork + real(kind=dp), allocatable, dimension(:) :: vec_S, vec_UT_psi, work + real(kind=dp), allocatable, dimension(:, :) :: mat_U, mat_VT, mat_VT_s + + ! Begin work + ierr = 0 + + allocate (weights_work(num_points), source=0.0_dp) + + ! compute the number of x nodes per magnitude points per 10-interval + num_x_nodes = (int(log10(e_max/e_min)) + 1)*nodes_factor + + ! make sure that the number of x nodes are at least as many integration points + num_x_nodes = max(num_x_nodes, num_points) + + allocate (x_mu(num_x_nodes), source=0.0_dp) + allocate (psi(num_x_nodes), source=0.0_dp) + + ! Allocations for the BLAS routines + ! double the value nessary for 'A' to achieve good performance + lwork = 8*num_points*num_points + 12*num_points + 2*num_x_nodes + allocate (iwork(8*num_points), source=0) + allocate (work(lwork), source=0.0_dp) + + allocate (mat_A(num_x_nodes, num_points), source=0.0_dp) + allocate (mat_U(num_x_nodes, num_x_nodes), source=0.0_dp) + allocate (mat_VT(num_x_nodes, num_points), source=0.0_dp) + allocate (mat_VT_s(num_points, num_x_nodes), source=0.0_dp) + allocate (vec_S(num_points), source=0.0_dp) + allocate (vec_UT_psi(num_x_nodes), source=0.0_dp) + + ! set the x-mu logarithmically in the interval [e_min,e_max] + x_factor = (e_max/e_min)**(1.0_dp/(real(num_x_nodes, kind=dp) - 1.0_dp)) + do i_node = 1, num_x_nodes + x_mu(i_node) = e_min*x_factor**(i_node - 1) + end do + + current_point = 0.0_dp + max_error = 0.0_dp + + ! loop over all grid points + do i_point = 1, num_points + ! calculate psi and mat_A + call calculate_psi_and_mat_A(num_points, tau_points, omega_points, num_x_nodes, x_mu, psi, & + mat_A, i_point, current_point, transformation_type) + + ! Singular value decomposition of mat_A = U*Sigma*V^T + call dgesdd('A', num_x_nodes, num_points, mat_A, num_x_nodes, vec_S, mat_U, num_x_nodes, & + mat_VT, num_x_nodes, work, lwork, iwork, ierr) + + if (ierr /= 0) then + _REGISTER_EXC("DGESDD returned ierr != 0") + return + end if + + ! integration weights = (V Sigma^-1 U^T)*psi + + ! 1) V * Sigma^-1 + !regterm = 0.01_dp + do j_point = 1, num_points + do k_point = 1, num_points + if (regterm > tiny(regterm)) then + mat_VT_s(k_point, j_point) = mat_VT(j_point, k_point)*vec_S(j_point) / & + (vec_S(j_point)**2+regterm**2) + else + mat_VT_s(k_point, j_point) = mat_VT(j_point, k_point) / vec_S(j_point) + end if + end do ! k_point + end do ! j_point + + ! 2) (U^T)*psi + call dgemm('T', 'N', num_x_nodes, 1, num_x_nodes, 1.0_dp, mat_U, num_x_nodes, psi, num_x_nodes, & + 0.0_dp, vec_UT_psi, num_x_nodes) + + ! 3) (V*Sigma^-1) * (U^T*psi) + call dgemm('N', 'N', num_points, 1, num_x_nodes, 1.0_dp, mat_VT_s, num_points, vec_UT_psi, & + num_x_nodes, 0.0_dp, weights_work, num_points) + + weights(i_point, :) = weights_work(:) + + ! calculate the maximum error of the fitting + call calculate_max_error(num_points, tau_points, omega_points, weights_work, num_x_nodes, x_mu, & + psi, current_point, max_error, transformation_type) + end do ! i_point + + deallocate (x_mu, psi, mat_A, weights_work, vec_S, mat_U, mat_VT, work, iwork, mat_VT_s, vec_UT_psi) + + end subroutine get_transformation_weights + + !> \brief Calculate the auxiliary matrix for cosine/sin transformation for tau to omega or viceversa + !! @param[in] num_points: Number of mesh points. + !! @param[in] tau_points: imaginary time grid points + !! @param[in] omega_points: imaginary frequency grid points + !! @param[in] num_x_nodes: Number of node in the interval [e_min,e_max] + !! @param[in] x_mu : Transition energy (nodes in the interval [e_min,e_max]) + !! @param[inout] psi: corresponding auxiliary function (see transformation type definition) + !! @param[inout] mat_A: auxiliary matrix (see transformation type definition) + !! @param[in] i_point: pointer for the current grid point + !! @param[inout] current_point: current grid point ether omega(i_point) or tau_(i_point) + !! @param[in] transformation type : + !! (1) the cosine transform cos(it) -> cos(iw): psi(omega,x), mat_A = cos(omega*tau)*psi(tau,x) + !! (2) the cosine transform cos(iw) -> cos(it): psi(tau,x) , mat_A = cos(omega*tau)*psi(omega,x) + !! (3) the sine transform sin(it) -> sin(iw): psi(omega,x), mat_A = sin(omega*tau)*psi(tau,x) + subroutine calculate_psi_and_mat_A(num_points, tau_points, omega_points, num_x_nodes, x_mu, psi, & + mat_A, i_point, current_point, transformation_type) + + integer, intent(in) :: num_points, num_x_nodes, i_point + real(kind=dp), allocatable, dimension(:), & + intent(in) :: tau_points, omega_points, x_mu + real(kind=dp), allocatable, dimension(:), & + intent(inout) :: psi + real(kind=dp), allocatable, dimension(:, :), & + intent(inout) :: mat_A + real(kind=dp), intent(inout) :: current_point + integer, intent(in) :: transformation_type + + ! Internal variables + integer :: i_node, j_point + real(kind=dp) :: tau, omega + + ! Begin work + + ! the cosine transform cos(it) -> cos(iw) + if (transformation_type == cosine_tw) then + omega = omega_points(i_point) + current_point = omega + + ! psi(omega_k,x) = 2x/(x^2+omega_k^2) + do i_node = 1, num_x_nodes + psi(i_node) = 2.0_dp*x_mu(i_node)/((x_mu(i_node))**2 + omega**2) + end do + + ! mat_A = cos(omega_k * tau) psi(tau,x) + do j_point = 1, num_points + tau = tau_points(j_point) + do i_node = 1, num_x_nodes + mat_A(i_node, j_point) = cos(omega*tau)*exp(-x_mu(i_node)*tau) + end do + end do + + ! the cosine transform cos(iw) -> cos(it) + else if (transformation_type == cosine_wt) then + tau = tau_points(i_point) + current_point = tau + + ! psi(tau_k,x) = =exp(-x*|tau_k|) + do i_node = 1, num_x_nodes + psi(i_node) = exp(-x_mu(i_node)*tau) + end do + + ! mat_A = cos(tau_k,omega) psi(omega,x) + do j_point = 1, num_points + omega = omega_points(j_point) + do i_node = 1, num_x_nodes + mat_A(i_node, j_point) = cos(tau*omega)*2.0_dp*x_mu(i_node)/(x_mu(i_node)**2 + omega**2) + end do + end do + + ! the sine transform sin(it) -> sin(iw) + else if (transformation_type == sine_tw) then + omega = omega_points(i_point) + current_point = omega + + ! psi(omega_k,x) = 2*omega_k/(x^2+omega_k^2) + do i_node = 1, num_x_nodes + psi(i_node) = 2.0_dp*omega/(x_mu(i_node)**2 + omega**2) + end do + + ! mat_A = sin(omega_k,tau)*phi(tau,x) + do j_point = 1, num_points + tau = tau_points(j_point) + do i_node = 1, num_x_nodes + mat_A(i_node, j_point) = sin(omega*tau)*exp(-x_mu(i_node)*tau) + end do + end do + end if + + end subroutine calculate_psi_and_mat_A + + !> /brief calculate the error of the fit function for the cosine/sin transformation for tau to omega or viceversa + !! @param[in] num_points: Number of mesh points. + !! @param[in] tau_points: imaginary time grid points + !! @param[in] omega_points: imaginary frequency grid points + !! @param[in] weights_work: work vector for the transformation weights + !! @param[in] num_x_nodes: Number of node in the interval [e_min,e_max] + !! @param[in] x_mu : Transition energy (nodes in the interval [e_min,e_max]) + !! @param[in] psi: corresponding auxiliary function (see transformation type definition) + !! @param[in] current_point: current grid point ether omega(i_point) or tau_(i_point) + !! @param[out] max_error: Max error for the transform. + !! @param[in] transformation type : 1 fit function for the cosine transform cos(it) -> cos(iw), psi(omeaga,x) + !! : 2 fit function for the cosine transform cos(iw) -> cos(it), psi(tau,x) + !! : 3 fit function for the sine transform sin(it) -> sin(iw), psi(omega,x) + subroutine calculate_max_error(num_points, tau_points, omega_points, weights_work, num_x_nodes, x_mu, & + psi, current_point, max_error, transformation_type) + + real(kind=dp), intent(out) :: max_error + real(kind=dp), intent(in) :: current_point + real(kind=dp), allocatable, dimension(:), & + intent(in) :: tau_points, omega_points, x_mu, psi, & + weights_work + integer, intent(in) :: num_points, num_x_nodes + integer, intent(in) :: transformation_type + + ! Internal variables + integer :: i_node,i_point + real(kind=dp) :: func_val, func_val_temp, max_error_tmp, & + tau, omega, x_val + + ! Begin work + max_error_tmp = 0.0_dp + + ! the cosine transform cos(it) -> cos(iw) + if (transformation_type == cosine_tw) then + omega=current_point + + do i_node = 1, num_x_nodes + func_val = 0.0_dp + ! calculate value of the fit function f(x) = f(x) + weights(omega)cos(omega*tau)psi(tau.x) + do i_point = 1, num_points + tau = tau_points(i_point) + func_val = func_val + weights_work(i_point)*cos(omega*tau)*exp(-x_mu(i_node)*tau) + end do + + if (abs(psi(i_node) - func_val) > max_error_tmp) then + max_error_tmp = abs(psi(i_node) - func_val) + func_val_temp = func_val + end if + end do + + ! the cosine transform cos(iw) -> cos(it) + else if (transformation_type == cosine_wt) then + tau = current_point + + do i_node = 1, num_x_nodes + func_val = 0.0_dp + x_val=x_mu(i_node) + ! calculate value of the fit function f(x) = f(x) + weights(tau)cos(omega*tau)psi(omega.x) + do i_point = 1, num_points + omega = omega_points(i_point) + func_val = func_val + weights_work(i_point)*cos(tau*omega)*2.0_dp*x_val/(x_val**2 + omega**2) + end do + + if (abs(psi(i_node) - func_val) > max_error_tmp) then + max_error_tmp = abs(psi(i_node) - func_val) + func_val_temp = func_val + end if + end do + + ! the sine transform sin(it) -> sin(iw) + else if (transformation_type == sine_tw) then + omega = current_point + + do i_node = 1, num_x_nodes + func_val = 0.0_dp + ! calculate value of the fit function f(x) = f(x) + weights(omega)sin(omega*tau)psi(tau.x) + do i_point = 1, num_points + tau = tau_points(i_point) + func_val = func_val + weights_work(i_point)*sin(omega*tau)*exp(-x_mu(i_node)*tau) + end do + + if (abs(psi(i_node) - func_val) > max_error_tmp) then + max_error_tmp = abs(psi(i_node) - func_val) + func_val_temp = func_val + end if + end do + end if + + if (max_error_tmp > max_error) then + max_error = max_error_tmp + end if + + end subroutine calculate_max_error + +end module minimax_grids diff --git a/GX-PAW/common/src/17_minimax/minimax_grids.o b/GX-PAW/common/src/17_minimax/minimax_grids.o new file mode 100644 index 00000000..08f2f7b1 Binary files /dev/null and b/GX-PAW/common/src/17_minimax/minimax_grids.o differ diff --git a/GX-PAW/common/src/17_minimax/minimax_omega.F90 b/GX-PAW/common/src/17_minimax/minimax_omega.F90 new file mode 100644 index 00000000..f828ab59 --- /dev/null +++ b/GX-PAW/common/src/17_minimax/minimax_omega.F90 @@ -0,0 +1,2240 @@ +! *************************************************************************************************** +! Copyright (C) 2020-2023 Green-X library +! This file is distributed under the terms of the APACHE2 License. +! +! *************************************************************************************************** +!> \brief This module contains the tabulated minimax coefficients that approximate +!> 1/x ~ 1/pi \sum_{i} w_i x^2/(x^2+a_i^2)^2 with x \in [1:rc] +!> The arrays containing the coefficients and weights are stored in the `er_aw_aux` derived type. +!> To extend this module, add the new entries to `omega_npoints_supported`, `energy_ranges_grids`, +!> and fill the corresponding arrays in the derived type. +!> reference: [https://doi.org/10.1021/ct5001268](https://doi.org/10.1021/ct5001268) +!> reference: [https://doi.org/10.1103/PhysRevB.94.165109](https://doi.org/10.1103/PhysRevB.94.165109) +! *************************************************************************************************** +module minimax_omega +#if defined HAVE_CONFIG_H +#include "config.h" +#endif +#include "abi_common.h" +#include "gx_common.h" + use defs_basis, only: dp + use m_errors + !use kinds, only: dp + !use error_handling, only: register_exc + use minimax_utils, only: er_aw_aux + implicit none + + private + + !> list with the number of points supported for the imag-time meshes + integer, parameter :: ngrids = 15 + integer, parameter, public :: omega_npoints_supported(ngrids) = & + [6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34] + integer, parameter :: energy_ranges_grids(ngrids) = & + [13, 13, 15, 18, 21, 36, 37, 40, 40, 40, 19, 28, 28, 18, 7] + + public :: get_points_weights_omega + +contains + + !> \brief Stores the minimax coefficients for all supported grid sizes + !! @param[in] grid_size - grid size + !! @param[inout] aw - derived type of energy ranges and coefficients:weights + subroutine set_aw_array_omega(grid_size, aw) + integer, intent(in) :: grid_size + type(er_aw_aux), intent(inout) :: aw + + select case(grid_size) + case(6) + aw%energy_range(:) = [1.5849_dp,2.5119_dp,3.9811_dp,6.3096_dp,10.0000_dp,15.8489_dp,25.1189_dp,39.8107_dp,63.0957_dp,& + 100.0000_dp,158.4893_dp,251.1886_dp,398.1072_dp] + aw%aw_erange_matrix(:,1) = [0.1655921867_dp,0.5209012738_dp,0.9601309570_dp,1.5943859351_dp,2.7306701362_dp,5.8749472842_dp,0.3350409678_dp,0.3850084475_dp,0.5102784088_dp,& + 0.8010367883_dp,1.6389781325_dp,6.1530434388_dp] + aw%aw_erange_matrix(:,2) = [0.1805946879_dp,0.5710657016_dp,1.0624914384_dp,1.7847101379_dp,3.0902608916_dp,6.7008049407_dp,0.3658827843_dp,0.4263996093_dp,0.5761737092_dp,& + 0.9174724599_dp,1.8850148010_dp,7.0551807646_dp] + aw%aw_erange_matrix(:,3) = [0.2107412898_dp,0.6758353424_dp,1.2899365007_dp,2.2366556977_dp,3.9937219129_dp,8.8543593569_dp,0.4284867076_dp,0.5184556747_dp,0.7378491813_dp,& + 1.2226010100_dp,2.5465173691_dp,9.4627147137_dp] + aw%aw_erange_matrix(:,4) = [0.2398913915_dp,0.7830273741_dp,1.5440300762_dp,2.7906304931_dp,5.1927614407_dp,11.8692704652_dp,0.4899249120_dp,0.6209200162_dp,0.9423639946_dp,& + 1.6456777707_dp,3.5063104284_dp,12.9449494205_dp] + aw%aw_erange_matrix(:,5) = [0.2673892983_dp,0.8903650428_dp,1.8225708515_dp,3.4589903359_dp,6.7690150328_dp,16.0814892391_dp,0.5487973414_dp,0.7321630617_dp,1.1933651064_dp,& + 2.2183473080_dp,4.8878751777_dp,17.9923442029_dp] + aw%aw_erange_matrix(:,6) = [0.2928309791_dp,0.9958642183_dp,2.1219318882_dp,4.2497817154_dp,8.8133486370_dp,21.9427374532_dp,0.6041411724_dp,0.8499697001_dp,1.4915299424_dp,& + 2.9717516759_dp,6.8532141469_dp,25.3187548500_dp] + aw%aw_erange_matrix(:,7) = [0.3159877346_dp,1.0977576875_dp,2.4369534500_dp,5.1642537452_dp,11.4185878867_dp,30.0488928270_dp,0.6553089559_dp,0.9716623387_dp,1.8340079795_dp,& + 3.9316976361_dp,9.6037639984_dp,35.9602691606_dp] + aw%aw_erange_matrix(:,8) = [0.3367465699_dp,1.1944388989_dp,2.7609613838_dp,6.1944061883_dp,14.6663452364_dp,41.1631772657_dp,0.7018712769_dp,1.0942251613_dp,2.2141179142_dp,& + 5.1124612568_dp,13.3702621560_dp,51.4089921368_dp] + aw%aw_erange_matrix(:,9) = [0.3550728269_dp,1.2844528796_dp,3.0859658208_dp,7.3210405275_dp,18.6070113241_dp,56.2194168750_dp,0.7435582547_dp,1.2144539917_dp,2.6213742311_dp,& + 6.5100771106_dp,18.3838109224_dp,73.7809389606_dp] + aw%aw_erange_matrix(:,10) = [0.3709877153_dp,1.3665230999_dp,3.4030538180_dp,8.5128437088_dp,23.2337294933_dp,76.2759655370_dp,0.7802273935_dp,1.3291370683_dp,3.0419246526_dp,& + 8.0964568401_dp,24.8212721126_dp,105.9887144250_dp] + aw%aw_erange_matrix(:,11) = [0.3845515600_dp,1.4395817104_dp,3.7029023900_dp,9.7268226520_dp,28.4534055091_dp,102.3628470217_dp,0.8118390150_dp,1.4352343393_dp,3.4593757378_dp,& + 9.8157444418_dp,32.7233122900_dp,151.7982620088_dp] + aw%aw_erange_matrix(:,12) = [0.3958434305_dp,1.5027520411_dp,3.9761855968_dp,10.9096324549_dp,34.0580373848_dp,135.1079781755_dp,0.8384180383_dp,1.5299753461_dp,3.8557072482_dp,& + 11.5832713988_dp,41.8902966573_dp,215.3882300448_dp] + aw%aw_erange_matrix(:,13) = [0.4049246607_dp,1.5552016328_dp,4.2134089372_dp,11.9977032386_dp,39.6930350498_dp,173.9106681833_dp,0.8599721981_dp,1.6107309991_dp,4.2114952563_dp,& + 13.2844959178_dp,51.7581905099_dp,299.3780119369_dp] + aw%aw_erange_matrix(:,14) = [0.4117629031_dp,1.5957145113_dp,4.4032949099_dp,12.9112278362_dp,44.7999640048_dp,215.2118480052_dp,0.8763104024_dp,1.6743960921_dp,4.5039003347_dp,& + 14.7656672369_dp,61.2249538434_dp,398.9837714449_dp] + case(8) + aw%energy_range(:) = [10.0000_dp,15.8489_dp,25.1189_dp,39.8107_dp,63.0957_dp,100.0000_dp,158.4893_dp,251.1886_dp,398.1072_dp,& + 630.9573_dp,1000.0000_dp,1584.8932_dp,2511.8864_dp] + aw%aw_erange_matrix(:,1) = [0.2071657943_dp,0.6610068185_dp,1.2441397724_dp,2.0831497522_dp,3.3887988553_dp,5.5847789422_dp,9.8270353946_dp,1.7281350381_dp,0.4207454390_dp,& + 0.5014976440_dp,0.6851766586_dp,1.0262600603_dp,1.6496784456_dp,2.9041456023_dp,6.2037554522_dp,23.2093654407_dp] + aw%aw_erange_matrix(:,2) = [0.2281975509_dp,0.7378108396_dp,1.4244318649_dp,2.4707104240_dp,4.1905418464_dp,7.2131597201_dp,13.1990042083_dp,29.9997176794_dp,0.4649882690_dp,& + 0.5742245008_dp,0.8283885406_dp,1.3139969363_dp,2.2222991557_dp,4.0573273175_dp,8.7886716040_dp,32.6307167054_dp] + aw%aw_erange_matrix(:,3) = [0.2478325384_dp,0.8123920588_dp,1.6105407106_dp,2.8990088123_dp,5.1406825221_dp,9.2811129613_dp,17.7585094674_dp,41.7034890992_dp,0.5067204192_dp,& + 0.6488380257_dp,0.9885419393_dp,1.6617137904_dp,2.9674466307_dp,5.6611212463_dp,12.5401854734_dp,46.3415559475_dp] + aw%aw_erange_matrix(:,4) = [0.2659623770_dp,0.8840006194_dp,1.8001085399_dp,3.3647028374_dp,6.2468323093_dp,11.8655812207_dp,23.8618997130_dp,58.2201559306_dp,0.5456512836_dp,& + 0.7242341275_dp,1.1636891030_dp,2.0709124861_dp,3.9122188078_dp,7.8497209223_dp,17.9508953905_dp,66.3317026050_dp] + aw%aw_erange_matrix(:,5) = [0.2825286714_dp,0.9519740012_dp,1.9904683567_dp,3.8621957498_dp,7.5094353654_dp,15.0358645326_dp,31.9280725161_dp,81.4355610562_dp,0.5815837142_dp,& + 0.7992370771_dp,1.3509789933_dp,2.5397840102_dp,5.0777819156_dp,10.7708899999_dp,25.6817056446_dp,95.5142824872_dp] + aw%aw_erange_matrix(:,6) = [0.2975081621_dp,1.0157197989_dp,2.1786795733_dp,4.3835258184_dp,8.9196010680_dp,18.8421849707_dp,42.4191477984_dp,113.8785066010_dp,0.6143889942_dp,& + 0.8726271509_dp,1.5467092421_dp,3.0626313217_dp,6.4748941133_dp,14.5714440993_dp,36.5813059769_dp,138.1359857525_dp] + aw%aw_erange_matrix(:,7) = [0.3109044422_dp,1.0747189671_dp,2.3616257812_dp,4.9184789791_dp,10.4573448605_dp,23.3016349187_dp,55.7970544598_dp,158.8526834842_dp,0.6439946472_dp,& + 0.9431868807_dp,1.7464589798_dp,3.6295451089_dp,8.0992146383_dp,19.3741257946_dp,51.6724717864_dp,200.3405959261_dp] + aw%aw_erange_matrix(:,8) = [0.3227426886_dp,1.1285376083_dp,2.5361560368_dp,5.4549563099_dp,12.0906636709_dp,28.3830633636_dp,72.4478080141_dp,220.5115689924_dp,0.6703777562_dp,& + 1.0097564124_dp,1.9453052591_dp,4.2264715904_dp,9.9271812582_dp,25.2464912037_dp,72.0737340430_dp,290.8984786126_dp] + aw%aw_erange_matrix(:,9) = [0.3330653429_dp,1.1768381468_dp,2.6992426824_dp,5.9795753281_dp,13.7758193804_dp,33.9934529728_dp,92.5691845452_dp,303.7688360097_dp,0.6935592742_dp,& + 1.0712866459_dp,2.1381008841_dp,4.8357521746_dp,11.9134085419_dp,32.1651386464_dp,98.8188127849_dp,422.0268465485_dp] + aw%aw_erange_matrix(:,10) = [0.3419271677_dp,1.2193812021_dp,2.8481167646_dp,6.4783947849_dp,15.4589061277_dp,39.9686099759_dp,116.0253061549_dp,413.8290580287_dp,0.7135957406_dp,& + 1.1268764982_dp,2.3197607958_dp,5.4370721963_dp,13.9903510517_dp,39.9811217952_dp,132.5423013393_dp,609.9378472851_dp] + aw%aw_erange_matrix(:,11) = [0.3493873557_dp,1.2560051022_dp,2.9803168477_dp,6.9374999179_dp,17.0780527326_dp,46.0690845013_dp,142.1776489457_dp,554.9087117432_dp,0.7305630635_dp,& + 1.1757734018_dp,2.4854579125_dp,6.0084938106_dp,16.0699904831_dp,48.3919200908_dp,173.0191454100_dp,873.9156615559_dp] + aw%aw_erange_matrix(:,12) = [0.3554939312_dp,1.2865572716_dp,3.0935328862_dp,7.3429185821_dp,18.5642203900_dp,51.9760118440_dp,169.6889674060_dp,727.2704120894_dp,0.7445214007_dp,& + 1.2172980158_dp,2.6305474321_dp,6.5268067690_dp,18.0450614155_dp,56.9170815136_dp,218.5505156517_dp,1230.5349651906_dp] + aw%aw_erange_matrix(:,13) = [0.3602495964_dp,1.3107201533_dp,3.1850020782_dp,7.6788144410_dp,19.8359971798_dp,57.2679524910_dp,196.2327143675_dp,920.7799560162_dp,0.7554361141_dp,& + 1.2506098187_dp,2.7498665119_dp,6.9656401678_dp,19.7831086916_dp,64.8519815020_dp,265.1056052278_dp,1674.6829767463_dp] + aw%aw_erange_matrix(:,14) = [0.3635299969_dp,1.3275808457_dp,3.2498551555_dp,7.9215394123_dp,20.7780605758_dp,61.3311078827_dp,217.8756023806_dp,1101.7305989568_dp,0.7629878767_dp,& + 1.2741002658_dp,2.8355822804_dp,7.2879118995_dp,21.0979770379_dp,71.1253081773_dp,304.8441281342_dp,2131.3275131179_dp] + case(10) + aw%energy_range(:) = [10.0000_dp,15.8489_dp,25.1189_dp,39.8107_dp,63.0957_dp,100.0000_dp,158.4893_dp,251.1886_dp,398.1072_dp,& + 630.9573_dp,1000.0000_dp,1584.8932_dp,2511.8864_dp,3981.0717_dp,6309.5734_dp] + aw%aw_erange_matrix(:,1) = [0.1691355148_dp,0.5284642103_dp,0.9545511712_dp,1.5047418958_dp,2.2597115867_dp,3.3454936705_dp,4.9862966533_dp,7.6650093063_dp,12.7796542255_dp,& + 27.2864801899_dp,0.3417226652_dp,0.3844227596_dp,0.4771272671_dp,0.6363706526_dp,0.8938238488_dp,1.3129879948_dp,2.0414882487_dp,3.5103169114_dp,7.4908908101_dp,28.4904121016_dp] + aw%aw_erange_matrix(:,2) = [0.1869871309_dp,0.5895532734_dp,1.0837264945_dp,1.7513396673_dp,2.7113373418_dp,4.1525884587_dp,6.4085359717_dp,10.1783866742_dp,17.4346686857_dp,& + 37.8980985815_dp,0.3786450204_dp,0.4367817026_dp,0.5649171097_dp,0.7896364896_dp,1.1607673493_dp,1.7743885110_dp,2.8435711821_dp,4.9711742872_dp,10.6201538876_dp,40.0398066552_dp] + aw%aw_erange_matrix(:,3) = [0.2039012435_dp,0.6490652017_dp,1.2154617028_dp,2.0166038170_dp,3.2247481157_dp,5.1221232176_dp,8.2115606004_dp,13.5286265845_dp,23.9062720036_dp,& + 53.0749019920_dp,0.4138813037_dp,0.4900973682_dp,0.6611573329_dp,0.9690511968_dp,1.4926655730_dp,2.3817399021_dp,3.9551983098_dp,7.0759673349_dp,15.2045183691_dp,56.8572918710_dp] + aw%aw_erange_matrix(:,4) = [0.2215612726_dp,0.7130836108_dp,1.3641220347_dp,2.3327570045_dp,3.8722111284_dp,6.4171323475_dp,10.7641098295_dp,18.5487568360_dp,34.1014651224_dp,& + 77.8384401962_dp,0.4509585163_dp,0.5500867058_dp,0.7775819091_dp,1.2005601561_dp,1.9481146439_dp,3.2680298069_dp,5.6771590916_dp,10.5041265527_dp,22.8758677846_dp,84.9127568138_dp] + aw%aw_erange_matrix(:,5) = [0.2345329395_dp,0.7614514514_dp,1.4815009224_dp,2.5950035869_dp,4.4373238158_dp,7.6084809054_dp,13.2446162815_dp,23.7066487254_dp,45.1296102041_dp,& + 105.6515405245_dp,0.4783942076_dp,0.5972714864_dp,0.8751233602_dp,1.4057763384_dp,2.3748072156_dp,4.1473552541_dp,7.4887345561_dp,14.3092728834_dp,31.6856232830_dp,117.1748283873_dp] + aw%aw_erange_matrix(:,6) = [0.2464823496_dp,0.8071022381_dp,1.5964864475_dp,2.8627114558_dp,5.0394486965_dp,8.9364966681_dp,16.1470780375_dp,30.0602271613_dp,59.4110826768_dp,& + 143.0796327614_dp,0.5038292544_dp,0.6433038741_dp,0.9752840930_dp,1.6265181595_dp,2.8558127957_dp,5.1896016186_dp,9.7542857946_dp,19.3262236939_dp,43.7567202430_dp, 161.6443914088_dp] + aw%aw_erange_matrix(:,7) = [0.2654151573_dp,0.8817697294_dp,1.7938027165_dp,3.3470666145_dp,6.1913419928_dp,11.6351237642_dp,22.4546568543_dp,44.9392680518_dp,95.5658998932_dp,& + 244.1384121888_dp,0.5444673083_dp,0.7217806651_dp,1.1573032493_dp,2.0521555932_dp,3.8424395191_dp,7.4786895698_dp,15.1258300988_dp,32.2334439760_dp,77.0350952259_dp,286.6561721471_dp] + aw%aw_erange_matrix(:,8) = [0.2762854262_dp,0.9260414313_dp,1.9164695671_dp,3.6641228087_dp,6.9876700672_dp,13.6157081584_dp,27.4080928631_dp,57.5664213221_dp,128.9747437104_dp,& + 344.8292437935_dp,0.5679986258_dp,0.7701986486_dp,1.2766274473_dp,2.3475292633_dp,4.5697038635_dp,9.2840896357_dp,19.7029788976_dp,44.2289545620_dp,110.6270863337_dp,417.1647742251_dp] + aw%aw_erange_matrix(:,9) = [0.2820309257_dp,0.9498823515_dp,1.9843457172_dp,3.8448332437_dp,7.4562107662_dp,14.8232425960_dp,30.5554359026_dp,65.9925282444_dp,152.5750528656_dp,& + 419.9454634243_dp,0.5804976867_dp,0.7968584417_dp,1.3446054795_dp,2.5213920887_dp,5.0132488016_dp,10.4308177021_dp,22.7523418007_dp,52.6831372017_dp,135.7521321651_dp,517.8733383965_dp] + aw%aw_erange_matrix(:,10) = [0.2916392096_dp,0.9904672599_dp,2.1029049829_dp,4.1695234368_dp,8.3244617815_dp,17.1414352405_dp,36.8575879013_dp,83.7621447531_dp,205.6283870841_dp,& + 600.5018496162_dp,0.6014985087_dp,0.8431887875_dp,1.4665763527_dp,2.8432978010_dp,5.8636306085_dp,12.7210853018_dp,29.1509189638_dp,71.5379751769_dp,195.8981148161_dp,770.3526395770_dp] + aw%aw_erange_matrix(:,11) = [0.2997413607_dp,1.0254167167_dp,2.2081204281_dp,4.4673434763_dp,9.1504060805_dp,19.4417624082_dp,43.4386668156_dp,103.5471053219_dp,269.7738483758_dp,& + 840.2848331258_dp,0.6193060617_dp,0.8840434321_dp,1.5781675031_dp,3.1488061460_dp,6.7046855839_dp,15.0996376420_dp,36.2060502309_dp,93.9657265595_dp,274.5288412137_dp,1126.0984805870_dp] + aw%aw_erange_matrix(:,12) = [0.3068119265_dp,1.0564844599_dp,2.3041382741_dp,4.7471116229_dp,9.9518408796_dp,21.7608680962_dp,50.3946041349_dp,125.7778595593_dp,348.0823679645_dp,& + 1165.5956152032_dp,0.6349224147_dp,0.9211050699_dp,1.6826698673_dp,3.4442834592_dp,7.5487363569_dp,17.5953310413_dp,44.0329344049_dp,120.7330042899_dp,378.0891314432_dp,1642.4900496712_dp] + aw%aw_erange_matrix(:,13) = [0.3128903217_dp,1.0836325633_dp,2.3900037820_dp,5.0037876383_dp,10.7087987937_dp,24.0290199661_dp,57.5035919858_dp,149.8665589334_dp,440.3163793218_dp,& + 1597.3324135008_dp,0.6484056036_dp,0.9540645582_dp,1.7782223062_dp,3.7222989519_dp,8.3698000470_dp,20.1241272281_dp,52.3878207087_dp,151.3903898996_dp,509.3860603144_dp,2383.3770295017_dp] + aw%aw_erange_matrix(:,14) = [0.3180208381_dp,1.1068742715_dp,2.4649964188_dp,5.2330020840_dp,11.4022590556_dp,26.1726545478_dp,64.4968153514_dp,174.8953978169_dp,544.3139194265_dp,& + 2152.9928502293_dp,0.6598289811_dp,0.9827062576_dp,1.8632606978_dp,3.9759704470_dp,9.1413408907_dp,22.5889526629_dp,60.9288369969_dp,184.8771547581_dp,668.1120868220_dp,3424.9941233446_dp] + aw%aw_erange_matrix(:,15) = [0.3222327278_dp,1.1261846760_dp,2.5283617927_dp,5.4303608672_dp,12.0125527722_dp,28.1109550492_dp,71.0481159543_dp,199.5351883274_dp,654.9414770847_dp,& + 2834.2166166353_dp,0.6692367974_dp,1.0068010254_dp,1.9362446833_dp,4.1983457774_dp,9.8350334132_dp,24.8769328455_dp,69.1997933226_dp,219.3240772356_dp,848.0876503767_dp,4831.8698300660_dp] + aw%aw_erange_matrix(:,16) = [0.3255214101_dp,1.1414100173_dp,2.5790085497_dp,5.5905435586_dp,12.5168740676_dp,29.7491494348_dp,76.7532744950_dp,221.9330386256_dp,762.7629878613_dp,& + 3600.8832911895_dp,0.6766014703_dp,1.0259889580_dp,1.9953123273_dp,4.3814587926_dp,10.4182966230_dp,26.8526025391_dp,76.6027833431_dp,251.8170602854_dp,1033.5460450322_dp,6581.5947573428_dp] + case(12) + aw%energy_range(:) = [10.0000_dp,15.8489_dp,25.1189_dp,39.8107_dp,63.0957_dp,100.0000_dp,158.4893_dp,251.1886_dp,398.1072_dp,& + 630.9573_dp,1000.0000_dp,1584.8932_dp,2511.8864_dp,3981.0717_dp,6309.5734_dp,10000.0000_dp,15848.9319_dp,25118.8643_dp] + aw%aw_erange_matrix(:,1) = [0.1429218755_dp,0.4413040082_dp,0.7787608801_dp,1.1864502692_dp,1.7042237511_dp,2.3869386764_dp,3.3160967043_dp,4.6250055507_dp,6.5625649934_dp,& + 9.6884369954_dp,15.6631146136_dp,32.7980178888_dp,0.2879096642_dp,0.3132260593_dp,0.3668155938_dp,0.4551062337_dp,0.5894057676_dp,0.7892350989_dp,1.0903935815_dp,& + 1.5663175771_dp,2.3928796682_dp,4.0893782104_dp,8.7825606869_dp,33.8102751115_dp] + aw%aw_erange_matrix(:,2) = [0.1584039050_dp,0.4923328393_dp,0.8800124739_dp,1.3655907229_dp,2.0071985270_dp,2.8866096232_dp,4.1262350784_dp,5.9244211841_dp,8.6433443828_dp,& + 13.0785495268_dp,21.5592271650_dp,45.7118338614_dp,0.3196222832_dp,0.3542571191_dp,0.4283564047_dp,0.5523360633_dp,0.7442466481_dp,1.0344524304_dp,1.4766097932_dp,& + 2.1765609805_dp,3.3811001812_dp,5.8128874205_dp,12.4386306554_dp,47.5132218404_dp] + aw%aw_erange_matrix(:,3) = [0.1732162492_dp,0.5421693623_dp,0.9824597614_dp,1.5548177385_dp,2.3422035365_dp,3.4651351072_dp,5.1078262325_dp,7.5699331662_dp,11.3905202972_dp,& + 17.7236693379_dp,29.8814434759_dp,64.2938771336_dp,0.3501242235_dp,0.3957859959_dp,0.4947508394_dp,0.6635483653_dp,0.9309027084_dp,1.3448855041_dp,1.9886743748_dp,& + 3.0204285513_dp,4.7952476232_dp,8.3319958117_dp,17.8065500802_dp,67.4765078414_dp] + aw%aw_erange_matrix(:,4) = [0.1872798507_dp,0.5905014926_dp,1.0854206804_dp,1.7532172531_dp,2.7093772498_dp,4.1282041031_dp,6.2843865572_dp,9.6323358121_dp,14.9869260172_dp,& + 24.0540642157_dp,41.6061199649_dp,91.0579838939_dp,0.3792435644_dp,0.4375045382_dp,0.5656048578_dp,0.7888458222_dp,1.1518726945_dp,1.7303560649_dp,2.6551434426_dp,& + 4.1695556253_dp,6.7988935390_dp,12.0017657848_dp,25.7012299118_dp,96.6398811058_dp] + aw%aw_erange_matrix(:,5) = [0.2005431091_dp,0.6370759298_dp,1.1882131903_dp,1.9596143934_dp,3.1080141107_dp,4.8798810059_dp,7.6781144945_dp,12.1876192174_dp,19.6488402798_dp,& + 32.6228933481_dp,58.0768113011_dp,129.6233187971_dp,0.4068597097_dp,0.4791053751_dp,0.6403871274_dp,0.9279233717_dp,1.4089046869_dp,2.2000500441_dp,3.5065734207_dp,& + 5.7089766044_dp,9.6048855357_dp,17.3210624857_dp,37.3219713868_dp,139.3487102141_dp] + aw%aw_erange_matrix(:,6) = [0.2129723629_dp,0.6816735477_dp,1.2901205273_dp,2.1725086187_dp,3.5363611280_dp,5.7219435274_dp,9.3081177834_dp,15.3135513250_dp,25.6240110606_dp,& + 44.1260843459_dp,81.1209689443_dp,185.1814120492_dp,0.4328851129_dp,0.5202704606_dp,0.7184166502_dp,1.0800067147_dp,1.7027459853_dp,2.7617892731_dp,4.5740080605_dp,& + 7.7357979157_dp,13.4820663628_dp,24.9778985366_dp,54.4233997075_dp,202.0289741531_dp] + aw%aw_erange_matrix(:,7) = [0.2245470036_dp,0.7240993142_dp,1.3903836822_dp,2.3900535856_dp,3.9914711962_dp,6.6532201376_dp,11.1882815305_dp,19.0846043138_dp,33.1849165684_dp,& + 59.4159094721_dp,113.1875318972_dp,265.1423802300_dp,0.4572563533_dp,0.5606704196_dp,0.7988654765_dp,1.2438096034_dp,2.0328893255_dp,3.4211580276_dp,5.8867908786_dp,& + 10.3557613983_dp,18.7581531731_dp,35.8993571496_dp,79.5506004677_dp,294.1829550392_dp] + aw%aw_erange_matrix(:,8) = [0.2352569289_dp,0.7641800006_dp,1.4882116081_dp,2.6100766743_dp,4.4691309002_dp,7.6689956608_dp,13.3248903807_dp,23.5651210903_dp,42.6155684811_dp,& + 79.5012479303_dp,157.4966041219_dp,380.0140548312_dp,0.4799299760_dp,0.5999706068_dp,0.8807759597_dp,1.4175212571_dp,2.3973518587_dp,4.1805461970_dp,7.4696971805_dp,& + 13.6771070681_dp,25.8156997830_dp,51.2989610152_dp,116.3509369773_dp,429.8532978855_dp] + aw%aw_erange_matrix(:,9) = [0.2451010324_dp,0.8017654177_dp,1.5828017133_dp,2.8301315091_dp,4.9638755099_dp,8.7605637856_dp,15.7142019721_dp,28.8008583603_dp,54.1903386201_dp,& + 105.5249731655_dp,218.1800947562_dp,544.5701280399_dp,0.5008804244_dp,0.6378406025_dp,0.9630900436_dp,1.5988302974_dp,2.7925242877_dp,5.0382073210_dp,9.3394978690_dp,& + 17.8013122631_dp,35.0774426337_dp,72.7082927464_dp,169.9652196055_dp,629.7648944090_dp] + aw%aw_erange_matrix(:,10) = [0.2540860929_dp,0.8367307788_dp,1.6733652691_dp,3.0475761199_dp,5.4690974483_dp,9.9150059248_dp,18.3402496051_dp,34.8093868001_dp,68.1439425172_dp,& + 138.7068831809_dp,300.3728140052_dp,779.3504064325_dp,0.5200987061_dp,0.6739648288_dp,1.0446871754_dp,1.7849867539_dp,3.2131230326_dp,5.9874580217_dp,11.5012197452_dp,& + 22.8106613081_dp,46.9772400931_dp,101.9720804684_dp,247.4758767966_dp,924.4338269797_dp] + aw%aw_erange_matrix(:,11) = [0.2622257858_dp,0.8689789279_dp,1.7591538896_dp,3.2596687994_dp,5.9772463916_dp,11.1152640178_dp,21.1732100622_dp,41.5702473402_dp,84.6330027911_dp,& + 180.2402911075_dp,410.1862989334_dp,1112.4892104442_dp,0.5375911789_dp,0.7080527257_dp,1.1244271067_dp,1.9728991568_dp,3.6522685550_dp,7.0161575650_dp,13.9445301437_dp,& + 28.7532181011_dp,61.9137136958_dp,141.1783745973_dp,358.3390054868_dp,1358.6237808356_dp] + aw%aw_erange_matrix(:,12) = [0.2695397145_dp,0.8984418080_dp,1.8394842699_dp,3.4636731491_dp,6.4801097618_dp,12.3405489690_dp,24.1686845488_dp,49.0161813673_dp,103.6916002257_dp,& + 231.1334699402_dp,554.4649729304_dp,1581.7521816579_dp,0.5533782107_dp,0.7398474700_dp,1.2011938191_dp,2.1592596327_dp,4.1016985956_dp,8.1065950190_dp,16.6408070873_dp,& + 35.6265963621_dp,80.1860664335_dp,192.4911013451_dp,514.6393661077_dp,1997.6015554757_dp] + aw%aw_erange_matrix(:,13) = [0.2760524229_dp,0.9250808413_dp,1.9137590003_dp,3.6569632156_dp,6.9691521519_dp,13.5670860508_dp,27.2681820098_dp,57.0270405663_dp,125.1857068673_dp,& + 291.9952897702_dp,740.1948138210_dp,2236.4143292529_dp,0.5674926172_dp,0.7691325599_dp,1.2739369142_dp,2.3406863163_dp,4.5521069506_dp,9.2358710776_dp,19.5415050994_dp,& + 43.3627936431_dp,101.9156324042_dp,257.8561654396_dp,730.8786122152_dp,2935.5916108398_dp] + aw%aw_erange_matrix(:,14) = [0.2817923316_dp,0.9488858958_dp,1.9814813109_dp,3.8371183004_dp,7.4358800759_dp,14.7691411930_dp,30.4009348015_dp,65.4279344217_dp,148.7737052777_dp,& + 362.7781053922_dp,973.4258195636_dp,3138.1182553730_dp,0.5799777558_dp,0.7957356560_dp,1.3417066692_dp,2.5138686631_dp,4.9935763572_dp,10.3767865261_dp,22.5783236670_dp,& + 51.8169502523_dp,126.9620346466_dp,338.5696696685_dp,1022.8563670293_dp,4306.3486764644_dp] + aw%aw_erange_matrix(:,15) = [0.2867904139_dp,0.9698720269_dp,2.0422603506_dp,4.0019927656_dp,7.8721789655_dp,15.9201852024_dp,33.4868654474_dp,73.9924717306_dp,173.8808134122_dp,& + 442.5068881766_dp,1257.6017567738_dp,4358.8912675126_dp,0.5908848778_dp,0.8195285979_dp,1.4036776623_dp,2.6756952059_dp,5.4160438292_dp,11.4991268023_dp,25.6653392884_dp,& + 60.7626525470_dp,154.8473999059_dp,434.7285925715_dp,1405.0882864622_dp,1293.9857358549_dp] + aw%aw_erange_matrix(:,16) = [0.2910780860_dp,0.9880717528_dp,2.0957994347_dp,4.1497340080_dp,8.2705289811_dp,16.9939014393_dp,36.4399516317_dp,82.4500835175_dp,199.6913462924_dp,& + 529.0300260431_dp,1591.2609924507_dp,5972.6134097078_dp,0.6002686025_dp,0.8404208888_dp,1.4591515488_dp,2.8233296403_dp,5.8096852863_dp,12.5710278432_dp,28.7025282055_dp,& + 69.8944444213_dp,184.7013394375_dp,544.6171058090_dp,1886.1991561619_dp,1636.7409625631_dp] + aw%aw_erange_matrix(:,17) = [0.2946830135_dp,1.0035172315_dp,2.1418493923_dp,4.2786919199_dp,8.6239165593_dp,17.9644477245_dp,39.1701771936_dp,90.4925192593_dp,225.1497724816_dp,& + 618.7984682735_dp,1965.0906091672_dp,8032.3776354955_dp,0.6081776611_dp,0.8583399368_dp,1.5075185249_dp,2.9541692000_dp,6.1650041879_dp,13.5597425826_dp,31.5787233026_dp,& + 78.8332286894_dp,215.2252971871_dp,664.0736526166_dp,2461.7976878738_dp,13101.2227769949_dp] + aw%aw_erange_matrix(:,18) = [0.2976197396_dp,1.0161987870_dp,2.1800846641_dp,4.3870919140_dp,8.9250517003_dp,18.8047527393_dp,41.5801589448_dp,97.7669240973_dp,248.9317783904_dp,& + 706.5698042833_dp,2358.0029706570_dp,10518.0301237170_dp,0.6146340927_dp,0.8731818667_dp,1.5481304343_dp,3.0655438415_dp,6.4721849704_dp,14.4304002566_dp,34.1694206849_dp,& + 87.1199659748_dp,244.6345912064_dp,785.7486816858_dp,3104.0521536434_dp,18366.2833303773_dp] + aw%aw_erange_matrix(:,19) = [0.2998670956_dp,1.0259644793_dp,2.2097926993_dp,4.4721489070_dp,9.1639446473_dp,19.4800041119_dp,43.5475134513_dp,103.8257383340_dp,269.2803013626_dp,& + 784.6486318135_dp,2730.6250483393_dp,13221.1901021026_dp,0.6195831378_dp,0.8846907737_dp,1.5799656761_dp,3.1538099965_dp,6.7186856110_dp,15.1395754616_dp,36.3189542433_dp,& + 94.1609721175_dp,270.4429681576_dp,897.7357862925_dp,3745.2859315653_dp,24671.3210710722_dp] + case(14) + aw%energy_range(:) = [10.0000_dp,15.8489_dp,25.1189_dp,39.8107_dp,63.0957_dp,100.0000_dp,158.4893_dp,251.1886_dp,398.1072_dp,& + 630.9573_dp,1000.0000_dp,1584.8932_dp,2511.8864_dp,3981.0717_dp,6309.5734_dp,10000.0000_dp,15848.9319_dp,25118.8643_dp,39810.7171_dp,& + 63095.7344_dp,100000.0000_dp] + aw%aw_erange_matrix(:,1) = [0.1237520189_dp,0.3793210576_dp,0.6597671782_dp,0.9840308063_dp,1.3749190589_dp,1.8615001814_dp,2.4828690979_dp,3.2948316051_dp,4.3831950418_dp,& + 5.8934107334_dp,8.1059865442_dp,11.6655039451_dp,18.5015048397_dp,38.2819532635_dp,0.2488370146_dp,0.2650794331_dp,0.2989413739_dp,0.3533487033_dp,0.4332130096_dp,& + 0.5463612200_dp,0.7054753585_dp,0.9323118806_dp,1.2675835756_dp,1.7965516204_dp,2.7252931763_dp,4.6615549872_dp,10.0839562478_dp,39.1544232431_dp] + aw%aw_erange_matrix(:,2) = [0.1374094319_dp,0.4232874675_dp,0.7434627635_dp,1.1246519429_dp,1.5998350917_dp,2.2119848549_dp,3.0197111559_dp,4.1068823716_dp,5.6011802735_dp,& + 7.7149478780_dp,10.8492870266_dp,15.9125394356_dp,25.6080428343_dp,53.4755730624_dp,0.2766436526_dp,0.2989467997_dp,0.3458113038_dp,0.4220036888_dp,0.5354349601_dp,& + 0.6984826350_dp,0.9306650650_dp,1.2643532502_dp,1.7581552449_dp,2.5320019406_dp,3.8730686134_dp,6.6286669095_dp,14.2653278687_dp,55.0281302896_dp] + aw%aw_erange_matrix(:,3) = [0.1505666691_dp,0.4663185031_dp,0.8277068519_dp,1.2712878156_dp,1.8436088079_dp,2.6071668363_dp,3.6492744660_dp,5.0966470423_dp,7.1423813249_dp,& + 10.1035301725_dp,14.5662361716_dp,21.8316004103_dp,35.7316313060_dp,75.4226567085_dp,0.3035404850_dp,0.3330713582_dp,0.3957256454_dp,0.4990979554_dp,0.6558183478_dp,& + 0.8856202117_dp,1.2193001614_dp,1.7067737275_dp,2.4354797344_dp,3.5786067486_dp,5.5425490305_dp,9.5203253363_dp,20.4055935443_dp,78.1654326549_dp] + aw%aw_erange_matrix(:,4) = [0.1631562520_dp,0.5081770951_dp,0.9120372525_dp,1.4233448685_dp,2.1061443172_dp,3.0494194848_dp,4.3813220072_dp,6.2921913817_dp,9.0755650205_dp,& + 13.2120067673_dp,19.5745958656_dp,30.0570187431_dp,50.1492744094_dp,107.1783297388_dp,0.3293860261_dp,0.3672500562_dp,0.4484587525_dp,0.5846770059_dp,0.7955240571_dp,& + 1.1120199476_dp,1.5828730610_dp,2.2865361693_dp,3.3573874234_dp,5.0527187015_dp,7.9582310915_dp,13.7699199075_dp,29.4466322395_dp,111.9883059949_dp] + aw%aw_erange_matrix(:,5) = [0.1751328845_dp,0.5486776639_dp,0.9960210811_dp,1.5801351784_dp,2.3869791803_dp,3.5403675980_dp,5.2247498897_dp,7.7222102918_dp,11.4770489386_dp,& + 17.2224496874_dp,26.2781750027_dp,41.4427682146_dp,70.6620174299_dp,153.1839920115_dp,0.3540807601_dp,0.4012905745_dp,0.5037213598_dp,0.6785936111_dp,0.9553641327_dp,& + 1.3815652392_dp,2.0332043125_dp,3.0338539093_dp,4.5937656003_dp,7.1052263662_dp,11.4303112105_dp,20.0061321519_dp,42.7874318856_dp,161.5637932500_dp] + aw%aw_erange_matrix(:,6) = [0.1864652922_dp,0.5876633466_dp,1.0792191469_dp,1.7408187754_dp,2.6851623062_dp,4.0805890775_dp,6.1868950019_dp,9.4146722805_dp,14.4288638472_dp,& + 22.3464969167_dp,35.1805962456_dp,57.1239822554_dp,99.7934538596_dp,219.8849251090_dp,0.3775511583_dp,0.4349982165_dp,0.5611463585_dp,0.7804726447_dp,1.1356966669_dp,& + 1.6975108670_dp,2.5819061296_dp,3.9814540008_dp,6.2266818203_dp,9.9270851610_dp,16.3796136997_dp,29.1318891212_dp,62.5017658877_dp,234.4013377657_dp] + aw%aw_erange_matrix(:,7) = [0.1971320791_dp,0.6249956559_dp,1.1611723802_dp,1.9043787816_dp,2.9991713766_dp,4.6693370438_dp,7.2727561475_dp,11.3950369748_dp,18.0156522854_dp,& + 28.8229704372_dp,46.8960302078_dp,78.5862781220_dp,141.0502377875_dp,316.6100822049_dp,0.3997417912_dp,0.4681716805_dp,0.6202849713_dp,0.8896863729_dp,1.3363204068_dp,& + 2.0621694870_dp,3.2396561944_dp,5.1633036255_dp,8.3493271249_dp,13.7533070113_dp,23.3648778784_dp,42.4276062839_dp,91.6530813193_dp,341.6356160655_dp] + aw%aw_erange_matrix(:,8) = [0.2071196561_dp,0.6605509163_dp,1.2414020419_dp,2.0696221481_dp,3.3268716611_dp,5.3043048684_dp,8.4841749046_dp,13.6840687647_dp,22.3200876467_dp,& + 36.9116410253_dp,62.1534675938_dp,107.7376013130_dp,199.2542570825_dp,456.8148338118_dp,0.4206116673_dp,0.5006042902_dp,0.6806119502_dp,1.0053444289_dp,1.5563837555_dp,& + 2.4765762114_dp,4.0152964555_dp,6.6127134579_dp,11.0633152384_dp,18.8639006227_dp,33.1094249311_dp,61.6803117299_dp,134.7433279119_dp,249.7791775842_dp] + aw%aw_erange_matrix(:,9) = [0.2164211208_dp,0.6942199530_dp,1.3194178020_dp,2.2351995560_dp,3.6655163476_dp,5.9814567261_dp,9.8190406778_dp,16.2953330419_dp,27.4167071273_dp,& + 46.8819737408_dp,81.7899193598_dp,146.9723500158_dp,280.9494882357_dp,659.8171183904_dp,0.4401325181_dp,0.5320881774_dp,0.7415378106_dp,1.1263002544_dp,1.7943210878_dp,& + 2.9401644200_dp,4.9148026024_dp,8.3597883164_dp,14.4738828904_dp,25.5798337763_dp,46.5220179584_dp,89.3352189162_dp,198.3395493241_dp,733.3143455343_dp] + aw%aw_erange_matrix(:,10) = [0.2250355201_dp,0.7259090833_dp,1.3947298426_dp,2.3996392595_dp,4.0117873209_dp,6.6949449046_dp,11.2705993355_dp,19.2325359337_dp,33.3642363588_dp,& + 58.9958553993_dp,106.7269043438_dp,199.2107206824_dp,394.8716061946_dp,953.1877173873_dp,0.4582878540_dp,0.5624197640_dp,0.8024260872_dp,1.2511740402_dp,2.0478267482_dp,& + 3.4504904254_dp,5.9402028103_dp,10.4282848334_dp,18.6826463204_dp,34.2518029731_dp,64.7040280062_dp,128.6569747902_dp,291.9231783438_dp,1078.5150247338_dp] + aw%aw_erange_matrix(:,11) = [0.2329672393_dp,0.7555413998_dp,1.4668625114_dp,2.5613905063_dp,4.3618737487_dp,7.4371311516_dp,12.8269527907_dp,22.4869444262_dp,40.1967444694_dp,& + 73.4837764659_dp,137.9240966582_dp,267.8878409083_dp,552.4401168858_dp,1375.9767397362_dp,0.4750722360_dp,0.5914055029_dp,0.8626137302_dp,1.3783908160_dp,2.3138738004_dp,& + 4.0030452232_dp,7.0885544544_dp,12.8320538455_dp,23.7778167607_dp,45.2396241167_dp,88.9322108883_dp,183.8727618124_dp,428.9924509359_dp,1589.0574882567_dp] + aw%aw_erange_matrix(:,12) = [0.2402254166_dp,0.7830578426_dp,1.5353678880_dp,2.7188726288_dp,4.7115837714_dp,8.1987224212_dp,14.4708344316_dp,26.0351871851_dp,47.9142866742_dp,& + 90.5147950650_dp,176.3046192376_dp,356.8585531562_dp,768.1850111560_dp,1982.9500242172_dp,0.4904905322_dp,0.6188672200_dp,0.9214329207_dp,1.5062311781_dp,2.5887805355_dp,& + 4.5911873826_dp,8.3511084620_dp,15.5713777752_dp,29.8221820388_dp,58.8806263183_dp,120.6042717758_dp,260.2481833296_dp,628.4008054380_dp,2344.2037701947_dp] + aw%aw_erange_matrix(:,13) = [0.2468233492_dp,0.8084178279_dp,1.5998381346_dp,2.8705261553_dp,5.0564823086_dp,8.9690218562_dp,16.1797300245_dp,29.8377700205_dp,56.4740220701_dp,& + 110.1618693375_dp,222.6488481804_dp,470.1773374173_dp,1059.9473360129_dp,2849.9290757236_dp,0.5045570755_dp,0.6446466508_dp,0.9782327448_dp,1.6328911714_dp,2.8683231326_dp,& + 5.2062217421_dp,9.7127961169_dp,18.6296360315_dp,36.8397037996_dp,75.4467599949_dp,161.1342170119_dp,364.0212493064_dp,915.8061534622_dp,3460.6173145631_dp] + aw%aw_erange_matrix(:,14) = [0.2527778876_dp,0.8315993357_dp,1.6599158447_dp,3.0148625096_dp,5.3920458557_dp,9.7362845660_dp,17.9263848498_dp,33.8386264546_dp,65.7830638131_dp,& + 132.3657077044_dp,277.4583246669_dp,611.7132434736_dp,1448.5954171971_dp,4080.0961955192_dp,0.5172947070_dp,0.6686089264_dp,1.0323993525_dp,1.7565471256_dp,3.1478880630_dp,& + 5.8376343335_dp,11.1521569039_dp,21.9708116140_dp,44.8021855325_dp,95.0923352411_dp,211.7879402237_dp,502.0958885177_dp,1324.9016742343_dp,5109.1479217630_dp] + aw%aw_erange_matrix(:,15) = [0.2581088191_dp,0.8525984201_dp,1.7153018106_dp,3.1505090575_dp,5.7138232801_dp,10.4881555752_dp,19.6796959600_dp,37.9659478012_dp,75.6944278689_dp,& + 156.9018728488_dp,340.7986066435_dp,784.5727195079_dp,1956.8887152134_dp,5810.5946526557_dp,0.5287337062_dp,0.6906448661_dp,1.0833734070_dp,1.8754207705_dp,3.4226532212_dp,& + 6.4734757869_dp,12.6417849586_dp,25.5383524518_dp,53.6179916839_dp,117.7972403305_dp,273.4582120634_dp,681.3862209558_dp,1897.7667932019_dp,7538.0176679465_dp] + aw%aw_erange_matrix(:,16) = [0.2628382234_dp,0.8714280605_dp,1.7657596164_dp,3.2762461263_dp,6.0175894628_dp,11.2121536455_dp,21.4059326227_dp,42.1343821843_dp,86.0072674859_dp,& + 183.3569410967_dp,412.1386866853_dp,990.3340957722_dp,2607.0355156257_dp,8217.6518865426_dp,0.5389105748_dp,0.7106719317_dp,1.1306636688_dp,1.9878394438_dp,3.6877820943_dp,& + 7.1008636764_dp,14.1493031685_dp,29.2557818247_dp,63.1250213151_dp,143.3135345823_dp,346.3927806276_dp,907.7234332819_dp,2683.2231510780_dp,11103.1863555287_dp] + aw%aw_erange_matrix(:,17) = [0.2669897168_dp,0.8881160366_dp,1.8111159140_dp,3.3910312600_dp,6.2994739200_dp,11.8961448564_dp,23.0701486723_dp,46.2484254367_dp,96.4719312295_dp,& + 211.1191385393_dp,490.2118567969_dp,1228.1451103779_dp,3416.4888677083_dp,11516.2764247119_dp,0.5478665013_dp,0.7286334755_dp,1.1738551166_dp,2.0922847636_dp,3.9386087483_dp,& + 7.7065456968_dp,15.6387696490_dp,33.0291620045_dp,73.0897431844_dp,171.1251080115_dp,429.9069845345_dp,1184.3032522341_dp,3731.5986458489_dp,16303.6463671380_dp] + aw%aw_erange_matrix(:,18) = [0.2705873339_dp,0.9027008262_dp,1.8512534027_dp,3.4940013018_dp,6.5560338595_dp,12.5287105641_dp,24.6375162990_dp,50.2063656122_dp,106.7989482477_dp,& + 239.3855189704_dp,572.9217973825_dp,1493.7802560807_dp,4391.6531513823_dp,15946.3157069551_dp,0.5556449687_dp,0.7444951812_dp,1.2126082806_dp,2.1874187044_dp,4.1707779482_dp,& + 8.2774187326_dp,17.0722537538_dp,36.7509601270_dp,83.2126077162_dp,200.4282185106_dp,522.1239375852_dp,1509.7550525312_dp,5083.9915726941_dp,23809.4872933868_dp] + aw%aw_erange_matrix(:,19) = [0.2736534033_dp,0.9152228943_dp,1.8860889161_dp,3.5844307219_dp,6.7842091626_dp,13.0992262603_dp,26.0740471238_dp,53.9032916651_dp,116.6682197836_dp,& + 267.1788894394_dp,657.2957186602_dp,1778.7428167398_dp,5519.3340205550_dp,21728.1102484379_dp,0.5622871153_dp,0.7582357751_dp,1.2466418911_dp,2.2720643515_dp,4.3802733591_dp,& + 8.8008061721_dp,18.4110184365_dp,40.3038468518_dp,93.1367925368_dp,230.1312226533_dp,619.7711046485_dp,1875.9814388890_dp,6754.1179845509_dp,34441.9288939212_dp] + aw%aw_erange_matrix(:,20) = [0.2762038751_dp,0.9257049710_dp,1.9155181787_dp,3.6615955500_dp,6.9810205813_dp,13.5972653572_dp,27.3456018037_dp,57.2299813261_dp,125.7291850483_dp,& + 293.3488003957_dp,739.4224775091_dp,2069.3129722892_dp,6755.4499384197_dp,28953.1020102810_dp,0.5678214945_dp,0.7698248185_dp,1.2756800070_dp,2.3450904474_dp,4.5631932604_dp,& + 9.2640941495_dp,19.6151475842_dp,43.5610242519_dp,102.4505562674_dp,258.8483817322_dp,717.9870196681_dp,2265.7579672866_dp,8700.5852876781_dp,23988.4028262284_dp] + aw%aw_erange_matrix(:,21) = [0.2782372627_dp,0.9341052990_dp,1.9392811143_dp,3.7244178713_dp,7.1426775987_dp,14.0104317718_dp,28.4127187100_dp,60.0605983468_dp,133.5708071158_dp,& + 316.4906323388_dp,814.1646091006_dp,2344.8657889336_dp,8008.3640462208_dp,37336.4453482422_dp,0.5722398731_dp,0.7791695364_dp,1.2993167745_dp,2.4050765797_dp,4.7149464686_dp,& + 9.6528320691_dp,20.6390719566_dp,46.3754930149_dp,110.6595490445_dp,284.8116113011_dp,809.8918933503_dp,2649.3019212461_dp,10784.5707432897_dp,67552.5430413666_dp] + aw%aw_erange_matrix(:,22) = [0.2797061105_dp,0.9401976208_dp,1.9566150716_dp,3.7705342696_dp,7.2621588744_dp,14.3181598521_dp,29.2146691724_dp,62.2108644129_dp,139.6075090217_dp,& + 334.6128282321_dp,874.0601697758_dp,2573.2407688027_dp,9106.9093547352_dp,45681.2634053412_dp,0.5754349166_dp,0.7859786803_dp,1.3166648423_dp,2.4494118770_dp,4.8279665616_dp,& + 9.9449041050_dp,21.4163941175_dp,48.5390530841_dp,117.0692434004_dp,305.4980103858_dp,885.1734856830_dp,2976.7201952819_dp,12696.1696497372_dp,12778.6824362300_dp] + case(16) + aw%energy_range(:) = [100.0000_dp,200.0000_dp,300.0000_dp,400.0000_dp,500.0000_dp,600.0000_dp,700.0000_dp,800.0000_dp,900.0000_dp,& + 1000.0000_dp,2000.0000_dp,3000.0000_dp,4000.0000_dp,5000.0000_dp,6000.0000_dp,7000.0000_dp,8000.0000_dp,9000.0000_dp,& + 10000.0000_dp,20000.0000_dp,30000.0000_dp,40000.0000_dp,50000.0000_dp,60000.0000_dp,70000.0000_dp,80000.0000_dp,100000.0000_dp,& + 200000.0000_dp,300000.0000_dp,400000.0000_dp,500000.0000_dp,600000.0000_dp,700000.0000_dp,900000.0000_dp,1000000.0000_dp,2000000.0000_dp] + aw%aw_erange_matrix(:,1) = [0.1658239563_dp,0.5171334987_dp,0.9303765657_dp,1.4570328304_dp,2.1653332837_dp,3.1504614774_dp,4.5493907204_dp,6.5633618109_dp,9.4930875435_dp,& + 13.7964356275_dp,20.1903405767_dp,29.8547208171_dp,44.9220344899_dp,69.9611336073_dp,118.0767404750_dp,254.2593005437_dp,0.3348764695_dp,0.3746857163_dp,& + 0.4602578814_dp,0.6042610194_dp,0.8279633068_dp,1.1647585940_dp,1.6660742054_dp,2.4110700070_dp,3.5231064904_dp,5.2000156651_dp,7.7774760619_dp,& + 11.8871228315_dp,18.9384589784_dp,32.9637281791_dp,70.4783921035_dp,266.9897014276_dp] + aw%aw_erange_matrix(:,2) = [0.1796188680_dp,0.5640280477_dp,1.0284857024_dp,1.6421539724_dp,2.5006876754_dp,3.7435994693_dp,5.5807790003_dp,8.3344011034_dp,12.5067566445_dp,& + 18.8932813718_dp,28.7803521422_dp,44.3247744642_dp,69.4123519683_dp,112.1580355482_dp,195.1385370534_dp,428.7889331091_dp,0.3633588263_dp,0.4144472317_dp,& + 0.5257979977_dp,0.7172007538_dp,1.0226908688_dp,1.4974394233_dp,2.2295271553_dp,3.3596316448_dp,5.1145469104_dp,7.8671158960_dp,12.2541055605_dp,& + 19.4492942193_dp,31.9606311600_dp,56.6861571917_dp,121.5342919900_dp,456.2757433765_dp] + aw%aw_erange_matrix(:,3) = [0.1884206558_dp,0.5944581318_dp,1.0939595566_dp,1.7698243503_dp,2.7399902108_dp,4.1815948362_dp,6.3691396726_dp,9.7367276671_dp,14.9817468349_dp,& + 23.2417208469_dp,36.4072939505_dp,57.7165006394_dp,93.0524051206_dp,154.5727044051_dp,275.3415317763_dp,614.8206695657_dp,0.3816114859_dp,0.4409681802_dp,& + 0.5715874075_dp,0.7994100006_dp,1.1698313059_dp,1.7581297911_dp,2.6876523229_dp,4.1609421883_dp,6.5137596498_dp,10.3121683937_dp,16.5396985487_dp,& + 27.0108280205_dp,45.5192320567_dp,82.1625739085_dp,177.0957911240_dp,661.1497609718_dp] + aw%aw_erange_matrix(:,4) = [0.1942245489_dp,0.6147551504_dp,1.1384592804_dp,1.8585037172_dp,2.9099802892_dp,4.4998377208_dp,6.9552594441_dp,10.8043246093_dp,16.9133032253_dp,& + 26.7254744252_dp,42.6898191774_dp,69.0766171353_dp,113.7276867204_dp,192.8055539393_dp,349.6006065415_dp,790.3452737603_dp,0.3936831697_dp,0.4589820405_dp,& + 0.6036357188_dp,0.8584885627_dp,1.2781808217_dp,1.9547747000_dp,3.0418929157_dp,4.7968259440_dp,7.6549361447_dp,12.3649985948_dp,20.2496262505_dp,& + 33.7670856027_dp,58.0126849704_dp,106.2423790202_dp,230.2949013970_dp,856.7974792736_dp] + aw%aw_erange_matrix(:,5) = [0.1977793344_dp,0.6272812805_dp,1.1662618497_dp,1.9146970328_dp,3.0192751478_dp,4.7074780059_dp,7.3434611868_dp,11.5225402840_dp,18.2342831138_dp,& + 29.1500315315_dp,47.1447614801_dp,77.2947047525_dp,129.0029463514_dp,221.6596281574_dp,406.7355719018_dp,927.2785886489_dp,0.4010914531_dp,0.4702308484_dp,& + 0.6240364829_dp,0.8967364985_dp,1.3494396924_dp,2.0861507928_dp,3.2824399973_dp,5.2360918865_dp,8.4577514041_dp,13.8375110832_dp,22.9665285321_dp,& + 38.8239553182_dp,67.5699243680_dp,125.0145140343_dp,272.2104357523_dp,1010.7843885329_dp] + aw%aw_erange_matrix(:,6) = [0.2010199598_dp,0.6387647242_dp,1.1919823186_dp,1.9672237865_dp,3.1225339638_dp,4.9057820342_dp,7.7183469335_dp,12.2242186521_dp,19.5408274593_dp,& + 31.5798875131_dp,51.6732052000_dp,85.7770369270_dp,145.0284244241_dp,252.4408886700_dp,468.6362428400_dp,1077.3185674270_dp,0.4078548995_dp,0.4806325979_dp,& + 0.6431662648_dp,0.9330450826_dp,1.4178702260_dp,2.2137849058_dp,3.5189801563_dp,5.6736133804_dp,9.2684033321_dp,15.3464195837_dp,25.7949391503_dp,& + 44.1777207407_dp,77.8637319323_dp,145.5476370987_dp,318.4847845698_dp,1180.7283739724_dp] + aw%aw_erange_matrix(:,7) = [0.2036357272_dp,0.6480796035_dp,1.2130110734_dp,2.0105568730_dp,3.2085103104_dp,5.0724515279_dp,8.0364891453_dp,12.8257596802_dp,20.6730636781_dp,& + 33.7101155845_dp,55.6932870488_dp,93.4100340197_dp,159.6610710660_dp,280.9748180399_dp,526.8369133777_dp,1219.8782585539_dp,0.4133212123_dp,0.4891333035_dp,& + 0.6589889393_dp,0.9633962334_dp,1.4756465826_dp,2.3226398100_dp,3.7228583371_dp,6.0549753566_dp,9.9835456561_dp,16.6949014551_dp,28.3582444400_dp,& + 49.1030685081_dp,87.4821676279_dp,165.0097234930_dp,362.7425520277_dp,1343.2809779482_dp] + aw%aw_erange_matrix(:,8) = [0.2058745597_dp,0.6560851540_dp,1.2312036533_dp,2.0483275158_dp,3.2840295056_dp,5.2200001614_dp,8.3204227320_dp,13.3672158293_dp,21.7015229918_dp,& + 35.6641641476_dp,59.4203432588_dp,100.5691194919_dp,173.5582973450_dp,308.4325898904_dp,583.5453837457_dp,1360.0872526018_dp,0.4180048571_dp,0.4964846624_dp,& + 0.6728092420_dp,0.9901400253_dp,1.5269809838_dp,2.4201774666_dp,3.9071667252_dp,6.4030043433_dp,10.6428407911_dp,17.9517964627_dp,30.7760779219_dp,& + 53.8090647968_dp,96.7970063398_dp,184.0976852129_dp,406.5124764312_dp,1504.1053871788_dp] + aw%aw_erange_matrix(:,9) = [0.2077912924_dp,0.6629634515_dp,1.2469237706_dp,2.0811759162_dp,3.3501432124_dp,5.3500462336_dp,8.5724304784_dp,13.8513493414_dp,22.6283946159_dp,& + 37.4403000338_dp,62.8396973494_dp,107.2042380768_dp,186.5815850155_dp,334.4658066377_dp,637.9185442861_dp,1495.6706240607_dp,0.4220184019_dp,0.5028346837_dp,& + 0.6848492255_dp,1.0136143492_dp,1.5723626774_dp,2.5070345558_dp,4.0725558633_dp,6.7178768910_dp,11.2446128484_dp,19.1100572735_dp,33.0275110259_dp,& + 58.2410816559_dp,105.6752713292_dp,202.5005558789_dp,449.0416009016_dp,1660.4659036836_dp] + aw%aw_erange_matrix(:,10) = [0.2094923936_dp,0.6690871465_dp,1.2609893400_dp,2.1107332848_dp,3.4099787231_dp,5.4684406771_dp,8.8032721349_dp,14.2977110381_dp,23.4889292652_dp,& + 39.1018169779_dp,66.0648728347_dp,113.5194187887_dp,199.1000985493_dp,359.7546766569_dp,691.2795357746_dp,1629.7753326901_dp,0.4255833454_dp,0.5085145079_dp,& + 0.6956987766_dp,1.0349067155_dp,1.6137842105_dp,2.5868202378_dp,4.2255077367_dp,7.0111805679_dp,11.8095483158_dp,20.2066645740_dp,35.1789178138_dp,& + 62.5191992847_dp,114.3381260493_dp,220.6457384190_dp,491.2838223352_dp,1815.8906489997_dp] + aw%aw_erange_matrix(:,11) = [0.2199648199_dp,0.7071951819_dp,1.3500294829_dp,2.3014898753_dp,3.8039161896_dp,6.2640677360_dp,10.3883548409_dp,17.4342263733_dp,29.6892498137_dp,& + 51.4072666001_dp,90.6897262810_dp,163.4029142875_dp,301.8062739164_dp,576.0321730685_dp,1167.1668975223_dp,2866.3462242273_dp,0.4475919613_dp,0.5444247827_dp,& + 0.7660427188_dp,1.1760818110_dp,1.8944331370_dp,3.1396588060_dp,5.3110028691_dp,9.1474459873_dp,16.0425147770_dp,28.6838564013_dp,52.3961981225_dp,& + 98.1027617656_dp,189.5125190165_dp,385.0546230890_dp,886.8755808827_dp,3279.8478272665_dp] + aw%aw_erange_matrix(:,12) = [0.2254855052_dp,0.7275782696_dp,1.3987483827_dp,2.4085395227_dp,4.0308014702_dp,6.7346910616_dp,11.3525925922_dp,19.4003421223_dp,33.7045605198_dp,& + 59.6659845037_dp,107.8826671839_dp,199.8010945617_dp,380.5441566179_dp,751.1705566466_dp,1574.9757412239_dp,3976.4773412762_dp,0.4592382989_dp,0.5640363685_dp,& + 0.8057309987_dp,1.2580610596_dp,2.0620213178_dp,3.4794870345_dp,5.9992069045_dp,10.5478798269_dp,18.9204492344_dp,34.6829355162_dp,65.1335363101_dp,& + 125.7646065496_dp,251.2571114743_dp,528.1385400286_dp,1248.0730162840_dp,4633.2205691667_dp] + aw%aw_erange_matrix(:,13) = [0.2291458665_dp,0.7412092104_dp,1.4317646055_dp,2.4821649469_dp,4.1892346702_dp,7.0685405142_dp,12.0481267399_dp,20.8444486250_dp,36.7129393061_dp,& + 65.9914860689_dp,121.3803567467_dp,229.1872120887_dp,446.1810946735_dp,902.6024217645_dp,1941.8011404909_dp,5009.8797981362_dp,0.4669775049_dp,0.5773103204_dp,& + 0.8331017001_dp,1.3155491614_dp,2.1814882044_dp,3.7259467698_dp,6.5076857600_dp,11.6037988956_dp,21.1394644229_dp,39.4249699560_dp,75.4872508046_dp,& + 148.9751731359_dp,304.9770020045_dp,657.7086747979_dp,1587.3127020998_dp,5920.5836116932_dp] + aw%aw_erange_matrix(:,14) = [0.2318596903_dp,0.7513766684_dp,1.4566226975_dp,2.5381740443_dp,4.3110511476_dp,7.3280974803_dp,12.5953321268_dp,21.9953590831_dp,39.1449985136_dp,& + 71.1874381046_dp,132.6694525539_dp,254.2770222187_dp,503.5763265609_dp,1038.7505242344_dp,2281.9830831059_dp,5995.4201867196_dp,0.4727245350_dp,0.5872949645_dp,& + 0.8539595110_dp,1.3598710730_dp,2.2746638421_dp,3.9205272572_dp,6.9144790809_dp,12.4609259649_dp,22.9699959240_dp,43.4081130047_dp,84.3638508080_dp,& + 169.3475197779_dp,353.4300407609_dp,778.2539995976_dp,1912.5495272325_dp,7170.1862702921_dp] + aw%aw_erange_matrix(:,15) = [0.2339807060_dp,0.7593601296_dp,1.4762809337_dp,2.5828177926_dp,4.4089425095_dp,7.5384598077_dp,13.0428921163_dp,22.9461450702_dp,41.1765817165_dp,& + 75.5822463322_dp,142.3542055651_dp,276.1554260895_dp,554.5891223527_dp,1162.5126510088_dp,2599.2657303576_dp,6936.9282990729_dp,0.4772216588_dp,0.5951850642_dp,& + 0.8706052760_dp,1.3955573868_dp,2.3503508883_dp,4.0800752099_dp,7.2514580363_dp,13.1790000167_dp,24.5229388830_dp,46.8353673012_dp,92.1257860967_dp,& + 187.4970205995_dp,397.5505430031_dp,890.8446878113_dp,2224.2514849963_dp,8382.1693155268_dp] + aw%aw_erange_matrix(:,16) = [0.2356793956_dp,0.7657776935_dp,1.4921732725_dp,2.6191360223_dp,4.4890956483_dp,7.7118769938_dp,13.4145537890_dp,23.7420529926_dp,42.8924978643_dp,& + 79.3317990745_dp,150.7127022461_dp,295.2912232099_dp,599.9130242432_dp,1274.5505465661_dp,2892.8155189719_dp,7826.4112995750_dp,0.4808268417_dp,0.6015597181_dp,& + 0.8841592457_dp,1.4248201349_dp,2.4128521625_dp,4.2128183487_dp,7.5341272004_dp,13.7868247088_dp,25.8508308086_dp,49.7997024600_dp,98.9279932108_dp,& + 203.6471318934_dp,437.5258171102_dp,995.0542013082_dp,2519.2792916087_dp,9542.4090958235_dp] + aw%aw_erange_matrix(:,17) = [0.2371565111_dp,0.7713754938_dp,1.5061014152_dp,2.6511323500_dp,4.5600934351_dp,7.8663613515_dp,13.7476759824_dp,24.4602645785_dp,44.4526453154_dp,& + 82.7702439130_dp,158.4531745840_dp,313.2153957547_dp,642.9446106408_dp,1382.6658986086_dp,3181.5886752821_dp,8718.1400956821_dp,0.4839643244_dp,0.6071435314_dp,& + 0.8961089748_dp,1.4507707931_dp,2.4686060916_dp,4.3319773629_dp,7.7896221881_dp,14.3404299411_dp,27.0706817674_dp,52.5494620743_dp,105.3087850947_dp,& + 218.9962003902_dp,476.1150312763_dp,1097.5429367020_dp,2815.3425231749_dp,10719.5970542372_dp] + aw%aw_erange_matrix(:,18) = [0.2383791084_dp,0.7760210462_dp,1.5177070330_dp,2.6779122634_dp,4.6197910361_dp,7.9968899954_dp,14.0306238436_dp,25.0738482607_dp,45.7942010596_dp,& + 85.7488108977_dp,165.2155200571_dp,329.0306611577_dp,681.3643289726_dp,1480.5867105295_dp,3447.6614433086_dp,9554.0768038375_dp,0.4865630036_dp,0.6117940844_dp,& + 0.9061164509_dp,1.4726120633_dp,2.5157672599_dp,4.4333150345_dp,8.0081916631_dp,14.8171429018_dp,28.1288792974_dp,54.9549336775_dp,110.9450611137_dp,& + 232.7097323559_dp,511.0662157786_dp,1191.9134190740_dp,3092.9786516246_dp,11835.2685529071_dp] + aw%aw_erange_matrix(:,19) = [0.2394665902_dp,0.7801625788_dp,1.5280893080_dp,2.7019607355_dp,4.6736119972_dp,8.1150612069_dp,14.2879456072_dp,25.6346618970_dp,47.0272976636_dp,& + 88.5041660059_dp,171.5175017002_dp,343.8975074435_dp,717.8562386955_dp,1574.7785572547_dp,3707.5649743359_dp,10383.6173776339_dp,0.4888758675_dp,0.6159527397_dp,& + 0.9151075636_dp,1.4923189155_dp,2.5585033151_dp,4.5255698396_dp,8.2081862684_dp,15.2558256454_dp,29.1089076738_dp,57.1990378291_dp,116.2478565054_dp,& + 245.7410456839_dp,544.6795257491_dp,1284.0102386442_dp,3368.4543745396_dp,12953.5463215818_dp] + aw%aw_erange_matrix(:,20) = [0.2439619664_dp,0.7973783256_dp,1.5716141482_dp,2.8037227500_dp,4.9035780994_dp,8.6252020092_dp,15.4113137626_dp,28.1136928196_dp,52.5555501891_dp,& + 101.0585978770_dp,200.7780139937_dp,414.4852435996_dp,895.8803941817_dp,2050.0627104149_dp,5075.6686568281_dp,14954.4580822648_dp,0.4984506753_dp,0.6333689027_dp,& + 0.9531960652_dp,1.5766772529_dp,2.7433912393_dp,4.9292826236_dp,9.0945232101_dp,17.2277759200_dp,33.5858729046_dp,67.6424807184_dp,141.4668848886_dp,& + 309.3410134400_dp,714.0113279167_dp,1766.7070327012_dp,4881.8715715996_dp,19298.8728735009_dp] + aw%aw_erange_matrix(:,21) = [0.2478279300_dp,0.8123088648_dp,1.6098451410_dp,2.8943658057_dp,5.1114173621_dp,9.0934365297_dp,16.4599619538_dp,30.4718781049_dp,57.9279973917_dp,& + 113.5632674097_dp,230.7738103388_dp,489.3739960868_dp,1092.8458035605_dp,2604.4914515779_dp,6784.1755383131_dp,21126.5938719292_dp,0.5067031432_dp,0.6486421647_dp,& + 0.9871729657_dp,1.6531092746_dp,2.9135882831_dp,5.3073611547_dp,9.9405537607_dp,19.1508072532_dp,38.0595278081_dp,78.3761296950_dp,168.2580432143_dp,& + 379.6405402638_dp,910.5686482995_dp,2362.9849944263_dp,6902.2943103602_dp,28308.3872897900_dp] + aw%aw_erange_matrix(:,22) = [0.2514110598_dp,0.8262529170_dp,1.6459615928_dp,2.9810777709_dp,5.3128665077_dp,9.5536787342_dp,17.5067289098_dp,32.8670116462_dp,63.4939169303_dp,& + 126.8202428653_dp,263.4528827777_dp,573.6956888284_dp,1323.9079398301_dp,3290.3703991318_dp,9054.9595427138_dp,30108.6774943850_dp,0.5143672124_dp,0.6630486295_dp,& + 1.0197128862_dp,1.7273374322_dp,3.0812675888_dp,5.6857203227_dp,10.8021228802_dp,21.1482386282_dp,42.8128367051_dp,90.0863080323_dp,198.4197507679_dp,& + 461.8721798911_dp,1151.8268578609_dp,3142.5671960808_dp,9776.8791816980_dp,42218.0357732799_dp] + aw%aw_erange_matrix(:,23) = [0.2528648661_dp,0.8319400523_dp,1.6608070636_dp,3.0170254246_dp,5.3971276906_dp,9.7480354519_dp,17.9534629117_dp,33.9014551716_dp,65.9309509359_dp,& + 132.7183864347_dp,278.2715570858_dp,612.8301683368_dp,1434.3246872856_dp,3630.9670915019_dp,10244.6006180858_dp,35169.9484258880_dp,0.5174810704_dp,0.6689639360_dp,& + 1.0332116800_dp,1.7584224449_dp,3.1521769341_dp,5.8474418989_dp,11.1748131102_dp,22.0240893092_dp,44.9299973167_dp,95.3987073443_dp,212.4065171189_dp,& + 501.0472318215_dp,1270.7717805347_dp,3544.9212020745_dp,11358.6770977554_dp,50438.7867085082_dp] + aw%aw_erange_matrix(:,24) = [0.2540178287_dp,0.8364626133_dp,1.6726606843_dp,3.0458564268_dp,5.4650232643_dp,9.9054313390_dp,18.3172623041_dp,34.7491988801_dp,67.9427763605_dp,& + 137.6294300508_dp,290.7381148994_dp,646.1741312441_dp,1529.9418440504_dp,3932.3963561222_dp,11330.9240361175_dp,40008.6302545528_dp,0.5199523330_dp,0.6736843844_dp,& + 1.0440414321_dp,1.7834844605_dp,3.2096404326_dp,5.9792371720_dp,11.4804650089_dp,22.7476005967_dp,46.6936240903_dp,99.8680124417_dp,224.3149960761_dp,& + 534.9001420101_dp,1375.5456381947_dp,3908.7242534887_dp,12844.6064444480_dp,58542.0291926889_dp] + aw%aw_erange_matrix(:,25) = [0.2549866597_dp,0.8402713328_dp,1.6826763795_dp,3.0703054062_dp,5.5228184490_dp,10.0399627163_dp,18.6296349600_dp,35.4808942840_dp,69.6896819013_dp,& + 141.9241704959_dp,301.7339346247_dp,675.8978088757_dp,1616.3466709216_dp,4209.8606318184_dp,12358.3316621397_dp,44778.8527500268_dp,0.5220301394_dp,0.6776710138_dp,& + 1.0532273130_dp,1.8048276749_dp,3.2587821104_dp,6.0924657188_dp,11.7444239751_dp,23.3761442225_dp,48.2363839893_dp,103.8097568816_dp,234.9225954454_dp,& + 565.4312578691_dp,1471.5757374943_dp,4249.6766379633_dp,14284.3739993822_dp,66756.6799545079_dp] + aw%aw_erange_matrix(:,26) = [0.2557379623_dp,0.8432302665_dp,1.6904785022_dp,3.0894072855_dp,5.5681138327_dp,10.1457517019_dp,18.8761878055_dp,36.0608740066_dp,71.0812157353_dp,& + 145.3652502260_dp,310.6065038413_dp,700.0934038910_dp,1687.4839763069_dp,4441.8642446357_dp,13237.4233285534_dp,49012.9853448564_dp,0.5236421949_dp,0.6807753338_dp,& + 1.0604055083_dp,1.8215607028_dp,3.2974406445_dp,6.1818753132_dp,11.9537421510_dp,23.8770049585_dp,49.4727321296_dp,106.9899559504_dp,243.5512252355_dp,& + 590.5230779693_dp,1551.5664026893_dp,4539.0466303904_dp,15541.6302935884_dp,74231.5026953161_dp] + aw%aw_erange_matrix(:,27) = [0.2564010066_dp,0.8458454742_dp,1.6973895312_dp,3.1063685052_dp,5.6084358624_dp,10.2401858384_dp,19.0969567918_dp,36.5820317312_dp,72.3367447872_dp,& + 148.4850951264_dp,318.6981956473_dp,722.3220420976_dp,1753.4648026928_dp,4659.8942229397_dp,14080.0786413567_dp,53206.2646298460_dp,0.5250654315_dp,0.6835242044_dp,& + 1.0667801460_dp,1.8364605534_dp,3.3319609425_dp,6.2619625564_dp,12.1418947712_dp,24.3290376869_dp,50.5938079390_dp,109.8898305026_dp,251.4731553408_dp,& + 613.7591553860_dp,1626.4857294511_dp,4814.4131352645_dp,16767.8460227627_dp,81800.7679527001_dp] + aw%aw_erange_matrix(:,28) = [0.2569579799_dp,0.8480451452_dp,1.7032135982_dp,3.1206920238_dp,5.6425623211_dp,10.3203007309_dp,19.2847495852_dp,37.0266973365_dp,73.4118087721_dp,& + 151.1678172710_dp,325.6920218555_dp,741.6587582025_dp,1811.3449162210_dp,4853.3898389440_dp,14841.2606227166_dp,57109.6782120646_dp,0.5262613911_dp,0.6858400767_dp,& + 1.0721640653_dp,1.8490739264_dp,3.3612548402_dp,6.3301068408_dp,12.3024758825_dp,24.7161813844_dp,51.5578904486_dp,112.3958353629_dp,258.3601782316_dp,& + 634.1127155092_dp,1692.7687392040_dp,5061.4926908256_dp,17892.6585424032_dp,88993.4207075852_dp] + aw%aw_erange_matrix(:,29) = [0.2601086530_dp,0.8605372769_dp,1.7364832603_dp,3.2030405150_dp,5.8400927889_dp,10.7874442332_dp,20.3888339693_dp,39.6659293840_dp,79.8639942984_dp,& + 167.4841928139_dp,368.9281247815_dp,863.6957532433_dp,2186.7779179576_dp,6158.1308626283_dp,20299.1328844362_dp,88518.0624195757_dp,0.5330336883_dp,0.6990576419_dp,& + 1.1031270006_dp,1.9221308937_dp,3.5321977981_dp,6.7310729459_dp,13.2563078352_dp,27.0409938894_dp,57.4220651473_dp,127.8761716171_dp,301.7231778952_dp,& + 765.4361399106_dp,2134.7178433253_dp,6789.2247063929_dp,26396.7938069641_dp,151820.0966657112_dp] + aw%aw_erange_matrix(:,30) = [0.2614966852_dp,0.8660674107_dp,1.7513173842_dp,3.2400462999_dp,5.9295952618_dp,11.0010208697_dp,20.8987354919_dp,40.8990199295_dp,82.9197874585_dp,& + 175.3383856309_dp,390.1601646950_dp,925.1616158777_dp,2382.3435121866_dp,6871.1762964399_dp,23520.7435741661_dp,110153.9881294830_dp,0.5360210432_dp,0.7049445153_dp,& + 1.1170457625_dp,1.9552577903_dp,3.6104195243_dp,6.9164166856_dp,13.7023077006_dp,28.1425885947_dp,60.2445555475_dp,135.4684857718_dp,323.4906988269_dp,& + 833.3513502597_dp,2372.6392364149_dp,7775.2837755386_dp,31745.5832863604_dp,200031.9346445932_dp] + aw%aw_erange_matrix(:,31) = [0.2623927492_dp,0.8696462837_dp,1.7609524952_dp,3.2641782950_dp,5.9882069182_dp,11.1415264621_dp,21.2359218209_dp,41.7193109697_dp,84.9669229685_dp,& + 180.6447640614_dp,404.6557682024_dp,967.6939419883_dp,2520.1487688994_dp,7387.1215399292_dp,25957.6498637107_dp,128242.7476018067_dp,0.5379508276_dp,0.7087659818_dp,& + 1.1261236891_dp,1.9769586430_dp,3.6618994578_dp,7.0390289460_dp,13.9991008027_dp,28.8806875885_dp,62.1510894274_dp,140.6475316153_dp,338.5222526788_dp,& + 881.0021806147_dp,2543.2483567892_dp,8505.7649642908_dp,35939.1316653421_dp,243328.3687408177_dp] + aw%aw_erange_matrix(:,32) = [0.2627718541_dp,0.8711624407_dp,1.7650423724_dp,3.2744439752_dp,6.0131978634_dp,11.2015882891_dp,21.3804756521_dp,42.0721537208_dp,85.8509744751_dp,& + 182.9472918632_dp,410.9831456456_dp,986.4022841619_dp,2581.3991354344_dp,7619.9982039966_dp,27086.8268950307_dp,137169.1569910549_dp,0.5387675634_dp,0.7103875892_dp,& + 1.1299856469_dp,1.9862130069_dp,3.6839098411_dp,7.0916041097_dp,14.1267854429_dp,29.1994539835_dp,62.9782445560_dp,142.9069894020_dp,345.1258622933_dp,& + 902.1267806327_dp,2619.8368734934_dp,8839.9515605404_dp,37923.2973041788_dp,265681.1476518737_dp] + aw%aw_erange_matrix(:,33) = [0.2630563241_dp,0.8723010280_dp,1.7681172895_dp,3.2821715705_dp,6.0320340151_dp,11.2469199987_dp,21.4897444333_dp,42.3393399670_dp,86.5218140028_dp,& + 184.6989170267_dp,415.8117268558_dp,1000.7370869878_dp,2628.5923438906_dp,7800.9192070029_dp,27976.7347726542_dp,144460.9017578381_dp,0.5393805485_dp,0.7116065610_dp,& + 1.1328929300_dp,1.9931889395_dp,3.7005241796_dp,7.1313503089_dp,14.2234810120_dp,29.4413473310_dp,63.6074429868_dp,144.6307313309_dp,350.1822634135_dp,& + 918.3799832426_dp,2679.1608813270_dp,9101.4598729715_dp,39504.8220871568_dp,284420.3782975398_dp] + aw%aw_erange_matrix(:,34) = [0.2631220516_dp,0.8725641954_dp,1.7688284187_dp,3.2839599089_dp,6.0363962050_dp,11.2574261051_dp,21.5150897584_dp,42.4013736123_dp,86.6777403351_dp,& + 185.1066253440_dp,416.9375814523_dp,1004.0867366174_dp,2639.6521074329_dp,7843.5048705938_dp,28187.8193172578_dp,146224.5950682552_dp,0.5395221931_dp,0.7118884373_dp,& + 1.1335657430_dp,1.9948045635_dp,3.7043749873_dp,7.1405702071_dp,14.2459323077_dp,29.4975719842_dp,63.7538844428_dp,145.0325865154_dp,351.3634064255_dp,& + 922.1861683415_dp,2693.1017695894_dp,9163.2515901222_dp,39882.2284393060_dp,289017.1383106848_dp] + aw%aw_erange_matrix(:,35) = [0.2632430200_dp,0.8730486024_dp,1.7701375706_dp,3.2872526463_dp,6.0444296439_dp,11.2767795705_dp,21.5617948504_dp,42.5157341799_dp,86.9653380131_dp,& + 185.8590678941_dp,419.0170693894_dp,1010.2806915518_dp,2660.1360303686_dp,7922.5633528021_dp,28581.3200056667_dp,149548.2524287735_dp,0.5397828928_dp,0.7124073530_dp,& + 1.1348045430_dp,1.9977798579_dp,3.7114686158_dp,7.1575602956_dp,14.2873222561_dp,29.6012761437_dp,64.0241425762_dp,145.7747325103_dp,353.5470109870_dp,& + 929.2326291739_dp,2718.9608472867_dp,9278.1983512593_dp,40588.0967343748_dp,297748.1292678806_dp] + aw%aw_erange_matrix(:,36) = [0.2632429401_dp,0.8730483137_dp,1.7701369194_dp,3.2872513050_dp,6.0444269378_dp,11.2767744685_dp,21.5617863587_dp,42.5157223060_dp,86.9653280383_dp,& + 185.8590851153_dp,419.0171719308_dp,1010.2809208136_dp,2660.1364682755_dp,7922.5650536918_dp,28581.3263301165_dp,149548.1582384946_dp,0.5397827248_dp,0.7124070868_dp,& + 1.1348040577_dp,1.9977789035_dp,3.7114667697_dp,7.1575573632_dp,14.2873184980_dp,29.6012739603_dp,64.0241513050_dp,145.7747859397_dp,353.5471227288_dp,& + 929.2327874624_dp,2718.9611614626_dp,9278.2017268714_dp,40588.1035800849_dp,297747.7938530878_dp] + aw%aw_erange_matrix(:,37) = [0.2632429813_dp,0.8730484658_dp,1.7701372744_dp,3.2872520534_dp,6.0444284162_dp,11.2767770018_dp,21.5617897706_dp,42.5157249296_dp,86.9653208691_dp,& + 185.8590311595_dp,419.0169629233_dp,1010.2803149420_dp,2660.1347243218_dp,7922.5593417351_dp,28581.2923662009_dp,149547.9734559663_dp,0.5397828118_dp,0.7124072317_dp,& + 1.1348043344_dp,1.9977794407_dp,3.7114677002_dp,7.1575584514_dp,14.2873190018_dp,29.6012708257_dp,64.0241309025_dp,145.7747002374_dp,353.5468820873_dp,& + 929.2321366837_dp,2718.9594320326_dp,9278.1929046266_dp,40588.0340115379_dp,297747.5613474760_dp] + case(18) + aw%energy_range(:) = [100.0000_dp,200.0000_dp,300.0000_dp,400.0000_dp,500.0000_dp,600.0000_dp,700.0000_dp,800.0000_dp,900.0000_dp,& + 1000.0000_dp,2000.0000_dp,3000.0000_dp,4000.0000_dp,5000.0000_dp,6000.0000_dp,8000.0000_dp,9000.0000_dp,10000.0000_dp,& + 20000.0000_dp,30000.0000_dp,40000.0000_dp,50000.0000_dp,60000.0000_dp,70000.0000_dp,80000.0000_dp,100000.0000_dp,200000.0000_dp,& + 300000.0000_dp,400000.0000_dp,500000.0000_dp,600000.0000_dp,700000.0000_dp,1000000.0000_dp,2000000.0000_dp,3000000.0000_dp,4000000.0000_dp,5000000.0000_dp& + ] + aw%aw_erange_matrix(:,1) = [0.1527981223_dp,0.4736735191_dp,0.8422879268_dp,1.2969949102_dp,1.8866941753_dp,2.6768243548_dp,3.7576314748_dp,5.2560227000_dp,7.3529844088_dp,& + 10.3098202106_dp,14.5091054561_dp,20.5224221475_dp,29.2333380207_dp,42.0933873501_dp,61.7573643645_dp,94.0319878961_dp,155.8524525586_dp,331.6666454386_dp,& + 0.3081114816_dp,0.3389838301_dp,0.4045613209_dp,0.5129049024_dp,0.6772652660_dp,0.9178430315_dp,1.2646393907_dp,1.7618830445_dp,2.4749338974_dp,& + 3.5014291571_dp,4.9905064808_dp,7.1795753170_dp,10.4751687346_dp,15.6616554134_dp,24.5415634965_dp,42.3610859910_dp,90.6499809216_dp,345.5812203285_dp] + aw%aw_erange_matrix(:,2) = [0.1630595518_dp,0.5078454432_dp,0.9113242587_dp,1.4219143796_dp,2.1032373061_dp,3.0432092324_dp,4.3670504641_dp,6.2565617694_dp,8.9792704978_dp,& + 12.9333140459_dp,18.7182748971_dp,27.2516047571_dp,39.9742332838_dp,59.2607021773_dp,89.4001916667_dp,139.5646279037_dp,236.0119955160_dp,508.8712615468_dp,& + 0.3291860241_dp,0.3669636069_dp,0.4479530140_dp,0.5836830921_dp,0.7934040217_dp,1.1070968212_dp,1.5704132532_dp,2.2524718420_dp,3.2581634715_dp,& + 4.7480031887_dp,6.9716245615_dp,10.3290234975_dp,15.4980119683_dp,23.7506428902_dp,37.9159495927_dp,66.0684302416_dp,141.2646651462_dp,534.8041524444_dp] + aw%aw_erange_matrix(:,3) = [0.1705157849_dp,0.5329774509_dp,0.9631534900_dp,1.5180492354_dp,2.2742864325_dp,3.3403090241_dp,4.8743423617_dp,7.1117069959_dp,10.4071362841_dp,& + 15.3013839295_dp,22.6281315821_dp,33.6909746028_dp,50.5733327575_dp,76.7403326936_dp,118.4300130927_dp,188.7754427627_dp,324.7362218774_dp,708.1501449317_dp,& + 0.3445471260_dp,0.3879712607_dp,0.4817375016_dp,0.6406265045_dp,0.8896307917_dp,1.2683429214_dp,1.8382595742_dp,2.6945175568_dp,3.9847496713_dp,& + 5.9398737665_dp,8.9260338600_dp,13.5377629091_dp,20.7845131696_dp,32.5347358248_dp,52.8383624414_dp,93.0090646173_dp,199.0924806088_dp,749.7941673117_dp] + aw%aw_erange_matrix(:,4) = [0.1753724416_dp,0.5494915993_dp,0.9977173837_dp,1.5832956162_dp,2.3925275383_dp,3.5495056900_dp,5.2382028596_dp,7.7366662011_dp,11.4709080813_dp,& + 17.1011211083_dp,25.6620404322_dp,38.7975529653_dp,59.1717536234_dp,91.2571770104_dp,143.1147450183_dp,231.5674047467_dp,403.3643728158_dp,887.0367390720_dp,& + 0.3545753722_dp,0.4019794831_dp,0.5048425080_dp,0.6804591848_dp,0.9583294358_dp,1.3857363627_dp,2.0371295696_dp,3.0294111303_dp,4.5468532602_dp,& + 6.8822916295_dp,10.5070740928_dp,16.1959498886_dp,25.2721771652_dp,40.1736865810_dp,66.1018252049_dp,117.3386399133_dp,251.6255820785_dp,944.3885629150_dp] + aw%aw_erange_matrix(:,5) = [0.1792634140_dp,0.5628074380_dp,1.0258882361_dp,1.6371516574_dp,2.4914222321_dp,3.7268076313_dp,5.5507285118_dp,8.2808021364_dp,12.4102029358_dp,& + 18.7137008125_dp,28.4225509460_dp,43.5198027864_dp,67.2597852973_dp,105.1576978013_dp,167.1846844824_dp,274.0316583356_dp,482.5800516279_dp,1069.1455217709_dp,& + 0.3626230022_dp,0.4133949264_dp,0.5240129938_dp,0.7140417682_dp,1.0170969827_dp,1.4875843790_dp,2.2121408831_dp,3.3284979466_dp,5.0566306497_dp,& + 7.7508728374_dp,11.9891683644_dp,18.7325758390_dp,29.6347190103_dp,47.7398012261_dp,79.4699929121_dp,142.1908163494_dp,305.5941129510_dp,1143.8185002949_dp] + aw%aw_erange_matrix(:,6) = [0.1824275671_dp,0.5736934774_dp,1.0491222851_dp,1.6820304473_dp,2.5747196681_dp,3.8777631059_dp,5.8197221117_dp,8.7543843212_dp,13.2371920221_dp,& + 20.1507264819_dp,30.9140562606_dp,47.8396956470_dp,74.7650047430_dp,118.2516977816_dp,190.2115173141_dp,315.2750004868_dp,560.5441858754_dp,1250.0374608106_dp,& + 0.3691763555_dp,0.4228081801_dp,0.5400524031_dp,0.7425032375_dp,1.0674915506_dp,1.5759280281_dp,2.3657256452_dp,3.5941590911_dp,5.5152047015_dp,& + 8.5426973513_dp,13.3594489834_dp,21.1129759784_dp,33.7929507589_dp,55.0675461174_dp,92.6154883865_dp,166.9270513977_dp,359.6149740839_dp,1343.0921742095_dp] + aw%aw_erange_matrix(:,7) = [0.1845402510_dp,0.5809913394_dp,1.0648021114_dp,1.7125536673_dp,2.6318299464_dp,3.9821018390_dp,6.0071758416_dp,9.0871950403_dp,13.8234621614_dp,& + 21.1788583886_dp,32.7140056593_dp,50.9928543565_dp,80.3035192335_dp,128.0271172500_dp,207.6104411774_dp,346.8108778212_dp,620.7887994110_dp,1390.8547791118_dp,& + 0.3735565554_dp,0.4291597901_dp,0.5509930923_dp,0.7621042619_dp,1.1025040768_dp,1.6378374763_dp,2.4743053650_dp,3.7836997749_dp,5.8455413731_dp,& + 9.1189076723_dp,14.3673717310_dp,22.8839631506_dp,36.9240327578_dp,60.6541254041_dp,102.7587257895_dp,186.2028175932_dp,401.9170351636_dp,1498.9565722365_dp] + aw%aw_erange_matrix(:,8) = [0.1868028095_dp,0.5888334464_dp,1.0817455973_dp,1.7457516566_dp,2.6943634927_dp,4.0971241083_dp,6.2152460671_dp,9.4592277517_dp,14.4836733720_dp,& + 22.3456860772_dp,34.7736661548_dp,54.6327852171_dp,86.7572435755_dp,139.5319952300_dp,228.3021868469_dp,384.7072757845_dp,693.8618958579_dp,1562.7906525256_dp,& + 0.3782516137_dp,0.4360221814_dp,0.5629206924_dp,0.7836442748_dp,1.1412631241_dp,1.7068676743_dp,2.5962717093_dp,3.9982573034_dp,6.2225285063_dp,& + 9.7821717658_dp,15.5382258481_dp,24.9613535034_dp,40.6349607723_dp,67.3468998832_dp,115.0396342009_dp,209.7488892780_dp,453.8302508246_dp,1690.0724518598_dp] + aw%aw_erange_matrix(:,9) = [0.1889192323_dp,0.5961942268_dp,1.0977388657_dp,1.7772929339_dp,2.7541781755_dp,4.2078951751_dp,6.4170137568_dp,9.8225699892_dp,15.1332825355_dp,& + 23.5028395309_dp,36.8333949661_dp,58.3054821199_dp,93.3316171825_dp,151.3722280049_dp,249.8269779137_dp,424.5573643490_dp,771.4557948840_dp,1746.6429947131_dp,& + 0.3826473328_dp,0.4424985483_dp,0.5742792596_dp,0.8043204163_dp,1.1787417405_dp,1.7741030137_dp,2.7159546043_dp,4.2104439185_dp,6.5984257859_dp,& + 10.4493076166_dp,16.7268978412_dp,27.0913648258_dp,44.4802785076_dp,74.3592538063_dp,128.0493684396_dp,234.9282829482_dp,509.6295674211_dp,1895.3494531455_dp] + aw%aw_erange_matrix(:,10) = [0.1903879496_dp,0.6013168240_dp,1.1089208087_dp,1.7994640492_dp,2.7964566007_dp,4.2866286979_dp,6.5612419722_dp,10.0838243357_dp,15.6032531027_dp,& + 24.3454652121_dp,38.3436918964_dp,61.0185260176_dp,98.2269380823_dp,160.2640090902_dp,266.1379252521_dp,455.0313652623_dp,831.2881474395_dp,1889.2621396318_dp,& + 0.3857000407_dp,0.4470258630_dp,0.5822782434_dp,0.8189759799_dp,1.2054673384_dp,1.8223342042_dp,2.8023370561_dp,4.3645792132_dp,6.8733432774_dp,& + 10.9407585128_dp,17.6093055967_dp,28.6856426725_dp,47.3838669100_dp,79.7036000150_dp,138.0572536990_dp,254.4553065018_dp,553.1007480388_dp,2055.1987987535_dp] + aw%aw_erange_matrix(:,11) = [0.2004773481_dp,0.6368375672_dp,1.1876500661_dp,1.9583390236_dp,3.1049903474_dp,4.8719302829_dp,7.6540035084_dp,12.1029440095_dp,19.3126222915_dp,& + 31.1473126488_dp,50.8338732988_dp,84.0516485483_dp,140.9901400583_dp,240.3905954302_dp,418.1349129991_dp,749.0950031399_dp,1427.9283160510_dp,3346.5458889158_dp,& + 0.4067217569_dp,0.4788809259_dp,0.6399266301_dp,0.9268650214_dp,1.4061641204_dp,2.1918280699_dp,3.4779960725_dp,5.5969933640_dp,9.1237199299_dp,& + 15.0663243585_dp,25.2211938823_dp,42.8502473564_dp,74.0218425104_dp,130.4575379986_dp,236.5689891584_dp,453.0888523964_dp,1004.4155925382_dp,3714.2671841220_dp] + aw%aw_erange_matrix(:,12) = [0.2060923936_dp,0.6568656934_dp,1.2329832605_dp,2.0520357907_dp,3.2914706387_dp,5.2345868421_dp,8.3485657989_dp,13.4209241076_dp,21.8030961178_dp,& + 35.8535966396_dp,59.7602909927_dp,101.0994830552_dp,173.8694957238_dp,304.6097011437_dp,545.5713806587_dp,1007.6354663732_dp,1977.0084005764_dp,4735.0152742876_dp,& + 0.4184608131_dp,0.4972036411_dp,0.6741675114_dp,0.9927793132_dp,1.5320651526_dp,2.4298648191_dp,3.9254906978_dp,6.4374740045_dp,10.7070328659_dp,& + 18.0675541150_dp,30.9613891161_dp,53.9559505932_dp,95.8098141785_dp,173.9182100598_dp,325.1068088959_dp,640.0565130514_dp,1442.8622811605_dp,5330.2153116126_dp] + aw%aw_erange_matrix(:,13) = [0.2094752506_dp,0.6690253334_dp,1.2608469589_dp,2.1104329482_dp,3.4093675338_dp,5.4672211845_dp,8.8008565440_dp,14.2928786861_dp,23.4788549362_dp,& + 39.0785473296_dp,65.9992861070_dp,113.2752218097_dp,197.9172373939_dp,352.8303735122_dp,644.0840718013_dp,1213.8952851159_dp,2429.0637615777_dp,5906.9084339158_dp,& + 0.4255474045_dp,0.5084570324_dp,0.6955884802_dp,1.0346890513_dp,1.6133572157_dp,2.5859849971_dp,4.2238534821_dp,7.0077645581_dp,11.8017672094_dp,& + 20.1852821928_dp,35.1022677213_dp,62.1633910973_dp,112.3459056401_dp,207.8857691341_dp,396.5505381224_dp,795.8587346363_dp,1817.2294197627_dp,6715.7635445298_dp] + aw%aw_erange_matrix(:,14) = [0.2121581617_dp,0.6787202020_dp,1.2832499726_dp,2.1578321904_dp,3.5059957828_dp,5.6597904823_dp,9.1791392965_dp,15.0301826515_dp,24.9125941632_dp,& + 41.8731378865_dp,71.4815357600_dp,124.1393652143_dp,219.7421301739_dp,397.4317148687_dp,737.1595777719_dp,1413.3997553296_dp,2876.9782299657_dp,7091.0678107240_dp,& + 0.4311754820_dp,0.5174998412_dp,0.7130167803_dp,1.0691630744_dp,1.6809311462_dp,2.7171607638_dp,4.4774063857_dp,7.4983357144_dp,12.7559194999_dp,& + 22.0575880369_dp,38.8208607896_dp,69.6617108245_dp,127.7446017458_dp,240.1988094408_dp,466.1397468408_dp,951.4027569398_dp,2198.4961458203_dp,8133.3203336836_dp] + aw%aw_erange_matrix(:,15) = [0.2139921648_dp,0.6853739849_dp,1.2987228567_dp,2.1908018772_dp,3.5736987910_dp,5.7957235572_dp,9.4482495044_dp,15.5590537094_dp,25.9502231069_dp,& + 43.9153424776_dp,75.5306015660_dp,132.2581172941_dp,236.2663898368_dp,431.6998885572_dp,809.8664998975_dp,1572.1602361118_dp,3240.3954623280_dp,8067.4677286845_dp,& + 0.4350267749_dp,0.5237425120_dp,0.7251601402_dp,1.0933802360_dp,1.7287741808_dp,2.8107871087_dp,4.6599346945_dp,7.8547530404_dp,13.4560860148_dp,& + 23.4465065014_dp,41.6124750965_dp,75.3655610751_dp,139.6318053004_dp,265.5594759721_dp,521.7790434550_dp,1078.2496818124_dp,2514.6604163544_dp,9314.1638997611_dp] + aw%aw_erange_matrix(:,16) = [0.2178151179_dp,0.6993140505_dp,1.3313988591_dp,2.2610539640_dp,3.7192949294_dp,6.0908275329_dp,10.0383009651_dp,16.7310269976_dp,28.2761942458_dp,& + 48.5511764282_dp,84.8506107486_dp,151.2366932549_dp,275.5700358601_dp,514.8276950982_dp,990.2516885162_dp,1976.2621831459_dp,4191.2288257724_dp,10683.1908182285_dp,& + 0.4430653606_dp,0.5369178579_dp,0.7510882812_dp,1.1456226846_dp,1.8330157272_dp,3.0168938111_dp,5.0661839848_dp,8.6574888928_dp,15.0535279971_dp,& + 26.6605642029_dp,48.1744338564_dp,89.0091722681_dp,168.6305683277_dp,328.8251790857_dp,664.1592767767_dp,1412.0406993233_dp,3367.6131241992_dp,12525.3812822271_dp] + aw%aw_erange_matrix(:,17) = [0.2188081567_dp,0.7029508216_dp,1.3399817439_dp,2.2796476603_dp,3.7581319758_dp,6.1701789054_dp,10.1983028044_dp,17.0517005110_dp,28.9188643373_dp,& + 49.8458188665_dp,87.4842442568_dp,156.6703747359_dp,286.9896650454_dp,539.3866234032_dp,1044.5712481684_dp,2100.6359589853_dp,4490.8966264193_dp,11524.8126775818_dp,& + 0.4451558102_dp,0.5403766820_dp,0.7579621105_dp,1.1595935419_dp,1.8611279523_dp,3.0729639927_dp,5.1777339300_dp,8.8801319309_dp,15.5014537915_dp,& + 27.5726472053_dp,50.0613660602_dp,92.9907021237_dp,177.2345753094_dp,347.9535003042_dp,708.1450322595_dp,1517.6510781274_dp,3643.4817836702_dp,13572.1857422280_dp] + aw%aw_erange_matrix(:,18) = [0.2197828445_dp,0.7065268576_dp,1.3484452335_dp,2.2980407479_dp,3.7966747852_dp,6.2491922090_dp,10.3581829359_dp,17.3733379970_dp,29.5661089226_dp,& + 51.1555523006_dp,90.1619002253_dp,162.2258144685_dp,298.7390660052_dp,564.8375634919_dp,1101.3350723375_dp,2231.8691674585_dp,4810.4999157353_dp,12431.0893265124_dp,& + 0.4472086016_dp,0.5437865853_dp,0.7647663233_dp,1.1734727600_dp,1.8891535196_dp,3.1290645559_dp,5.2897782356_dp,9.1047033174_dp,15.9553383683_dp,& + 28.5015525163_dp,51.9939423727_dp,97.0943433317_dp,186.1660494056_dp,367.9733742722_dp,754.6199482807_dp,1630.4422765799_dp,3941.1471257651_dp,14706.2839701511_dp] + aw%aw_erange_matrix(:,19) = [0.2265068924_dp,0.7313723956_dp,1.4079029715_dp,2.4288666490_dp,4.0743494431_dp,6.8260310413_dp,11.5419454962_dp,19.7913469464_dp,34.5140986987_dp,& + 61.3557522089_dp,111.4538331601_dp,207.4531772156_dp,397.0044159553_dp,784.4559544064_dp,1609.5435792804_dp,3459.5173734479_dp,7955.7224057844_dp,21787.7872792344_dp,& + 0.4613964399_dp,0.5677182986_dp,0.8132820575_dp,1.2738440119_dp,2.0946622147_dp,3.5464814496_dp,6.1366541222_dp,10.8315244763_dp,19.5122061582_dp,& + 35.9359276337_dp,67.8312378331_dp,131.6382289194_dp,263.7064908785_dp,548.1543124891_dp,1191.1152093944_dp,2744.1365262322_dp,7034.9730156755_dp,26779.6427117294_dp] + aw%aw_erange_matrix(:,20) = [0.2299046347_dp,0.7440466445_dp,1.4386817413_dp,2.4977004608_dp,4.2229117582_dp,7.1400486674_dp,12.1983208840_dp,21.1590457313_dp,37.3746256619_dp,& + 67.3972149915_dp,124.4113415746_dp,235.8339174556_dp,460.8695878332_dp,933.1280623325_dp,1970.5451213787_dp,4383.4382370187_dp,10490.0415539656_dp,29853.7138953906_dp,& + 0.4685835491_dp,0.5800895256_dp,0.8388841363_dp,1.3277922637_dp,2.2071337130_dp,3.7792979087_dp,6.6187541544_dp,11.8367180574_dp,21.6341446873_dp,& + 40.4936762994_dp,77.8419038960_dp,154.2432177310_dp,316.5085486601_dp,676.6859045395_dp,1520.1522622007_dp,3640.7662046546_dp,9709.9025797711_dp,37642.0149894778_dp] + aw%aw_erange_matrix(:,21) = [0.2322426137_dp,0.7528155675_dp,1.4601566795_dp,2.5461768342_dp,4.3285472611_dp,7.3655789295_dp,12.6748091407_dp,22.1635689596_dp,39.5028735027_dp,& + 71.9574649193_dp,134.3529357777_dp,258.0191755122_dp,511.8853109587_dp,1054.9582203366_dp,2275.6093922057_dp,5194.4156325965_dp,12821.7854876095_dp,37657.6423999949_dp,& + 0.4735360781_dp,0.5887137683_dp,0.8569421263_dp,1.3662449059_dp,2.2881386212_dp,3.9488343848_dp,6.9740393893_dp,12.5872963374_dp,23.2418684237_dp,& + 44.0038125005_dp,85.6955724242_dp,172.3579359302_dp,359.8809360759_dp,785.4069036400_dp,1808.5700733323_dp,4462.1506943232_dp,12290.4942808444_dp,48494.3206443843_dp] + aw%aw_erange_matrix(:,22) = [0.2336768436_dp,0.7582143877_dp,1.4734520876_dp,2.5763743626_dp,4.3947703836_dp,7.5079066797_dp,12.9776624895_dp,22.8070387800_dp,40.8780295306_dp,& + 74.9328525019_dp,140.9115314301_dp,272.8423532693_dp,546.4815978838_dp,1139.0497298808_dp,2490.7560668022_dp,5782.0074376657_dp,14570.4471420771_dp,43741.3576559383_dp,& + 0.4765770918_dp,0.5940500004_dp,0.8682017317_dp,1.3903872862_dp,2.3393490281_dp,4.0568008584_dp,7.2021080821_dp,13.0733720716_dp,24.2932834607_dp,& + 46.3248131822_dp,90.9542469493_dp,184.6642780706_dp,389.8515787306_dp,862.0796631928_dp,2017.1246766216_dp,5075.1705599863_dp,14292.7434800951_dp,57167.3354554488_dp] + aw%aw_erange_matrix(:,23) = [0.2349711741_dp,0.7630994958_dp,1.4855312811_dp,2.6039326902_dp,4.4554861518_dp,7.6390323637_dp,13.2581387984_dp,23.4063874175_dp,42.1670929633_dp,& + 77.7420965786_dp,147.1549158039_dp,287.0876041224_dp,580.1016244922_dp,1221.8669259734_dp,2706.1509321370_dp,6382.6921105031_dp,16407.5280492903_dp,50341.3630128390_dp,& + 0.4793233813_dp,0.5988959516_dp,0.8784840550_dp,1.4125452718_dp,2.3865869706_dp,4.1569264641_dp,7.4148536739_dp,13.5297327259_dp,25.2875843255_dp,& + 48.5377313573_dp,96.0150836930_dp,196.6366941974_dp,419.3845618102_dp,938.8088067222_dp,2229.8751236449_dp,5716.1223474154_dp,16452.9800581583_dp,66773.6908077037_dp] + aw%aw_erange_matrix(:,24) = [0.2362056864_dp,0.7677702998_dp,1.4971240753_dp,2.6304912868_dp,4.5142511221_dp,7.7665188164_dp,13.5321609484_dp,23.9950874146_dp,43.4408449937_dp,& + 80.5367989944_dp,153.4142279527_dp,301.4979966589_dp,614.4734307780_dp,1307.6229833800_dp,2932.7423350003_dp,7027.5640383226_dp,18433.7806581014_dp,57865.4795639180_dp,& + 0.4819444399_dp,0.6035448238_dp,0.8883992010_dp,1.4340115990_dp,2.4325645800_dp,4.2548680283_dp,7.6240978812_dp,13.9813064760_dp,26.2781501086_dp,& + 50.7593479718_dp,101.1408282912_dp,208.8878226568_dp,449.9752198065_dp,1019.4696542107_dp,2457.7060905133_dp,6419.2205665980_dp,18898.5337435476_dp,77962.5285029020_dp] + aw%aw_erange_matrix(:,25) = [0.2373811804_dp,0.7722283067_dp,1.5082286277_dp,2.6560325699_dp,4.5709979484_dp,7.8901603872_dp,13.7991626271_dp,24.5716663778_dp,44.6955816594_dp,& + 83.3078107108_dp,159.6671289369_dp,316.0196927701_dp,649.4705607609_dp,1396.0394640284_dp,3170.0394143638_dp,7716.7206819492_dp,20659.4302682909_dp,66423.1120212093_dp,& + 0.4844417397_dp,0.6079960880_dp,0.8979397304_dp,1.4547589152_dp,2.4772012954_dp,4.3504088347_dp,7.8292862308_dp,14.4267153785_dp,27.2616042688_dp,& + 52.9814469879_dp,106.3116632913_dp,221.3708125829_dp,481.5183314923_dp,1103.8598269916_dp,2700.4771705858_dp,7186.6895812688_dp,21655.8394871780_dp,90981.2260411802_dp] + aw%aw_erange_matrix(:,26) = [0.2384929321_dp,0.7764541060_dp,1.5187910501_dp,2.6804190928_dp,4.6253918957_dp,8.0091653367_dp,14.0573010465_dp,25.1318593329_dp,45.9214125315_dp,& + 86.0320248361_dp,165.8589709257_dp,330.5213437011_dp,684.7716456399_dp,1486.3194127934_dp,3416.0807835360_dp,8445.7682576954_dp,23080.0500376109_dp,76077.3463064641_dp,& + 0.4868050225_dp,0.6122283656_dp,0.9070534966_dp,1.4746621676_dp,2.5202048636_dp,4.4428752109_dp,8.0288699041_dp,14.8623807033_dp,28.2295988616_dp,& + 55.1842978329_dp,111.4801345970_dp,233.9693080953_dp,513.7236927079_dp,1191.2537920844_dp,2956.4629917081_dp,8015.5672953765_dp,24733.8193867627_dp,106025.7763539200_dp] + aw%aw_erange_matrix(:,27) = [0.2424066958_dp,0.7914046541_dp,1.5564443104_dp,2.7680823572_dp,4.8226295707_dp,8.4446731203_dp,15.0114711050_dp,27.2256530508_dp,50.5608704286_dp,& + 96.4912212100_dp,190.0298069297_dp,388.2508224812_dp,828.6545663149_dp,1865.1697805908_dp,4487.8156685859_dp,11785.0441837860_dp,35002.1836037296_dp,128962.1250768669_dp,& + 0.4951355072_dp,0.6273021161_dp,0.9398489002_dp,1.5469558320_dp,2.6778932564_dp,4.7854195711_dp,8.7766219472_dp,16.5153607224_dp,31.9551714346_dp,& + 63.8025814509_dp,132.0903298321_dp,285.3568780777_dp,648.7347131305_dp,1570.3680700535_dp,4117.2842170109_dp,12010.0206109856_dp,40950.7873618795_dp,194612.8629584392_dp] + aw%aw_erange_matrix(:,28) = [0.2451483463_dp,0.8019477304_dp,1.5832664989_dp,2.8312249320_dp,4.9663414572_dp,8.7658865407_dp,15.7246398040_dp,28.8139006699_dp,54.1393916659_dp,& + 104.7144822098_dp,209.4610558075_dp,435.8986297272_dp,951.2536527997_dp,2201.0294283516_dp,5487.9035786263_dp,15127.5077224134_dp,48255.1157456922_dp,198725.3328400740_dp,& + 2.0039254651_dp,2.5521059930_dp,3.8540019382_dp,6.3989622653_dp,11.1779286325_dp,20.1685457731_dp,37.3818682463_dp,71.1764172917_dp,139.5702311295_dp,& + 282.9901494567_dp,596.5096927657_dp,1316.5702025323_dp,3072.3924881061_dp,7685.7784941115_dp,21038.1983744905_dp,65151.8935038286_dp,242901.2154403277_dp,1303987.3158731237_dp] + aw%aw_erange_matrix(:,29) = [0.2451584911_dp,0.8019868539_dp,1.5833664624_dp,2.8314613818_dp,4.9668822755_dp,8.7671015990_dp,15.7273526805_dp,28.8199804209_dp,54.1531881809_dp,& + 104.7464454026_dp,209.5372970267_dp,436.0876685648_dp,951.7466778391_dp,2202.4031805614_dp,5492.0861687473_dp,15141.9292444349_dp,48315.1164798901_dp,199069.2488759779_dp,& + 0.5010030137_dp,0.6380664445_dp,0.9635890952_dp,1.5999393770_dp,2.7949236246_dp,5.0431140248_dp,9.3476469670_dp,17.7990399522_dp,34.9039874892_dp,& + 70.7748108912_dp,149.1950441262_dp,329.3185677466_dp,768.5855483743_dp,1922.9069771868_dp,5264.4349177856_dp,16306.9754356859_dp,60818.5342949878_dp,326683.0762412191_dp] + aw%aw_erange_matrix(:,30) = [0.2460843831_dp,0.8055606841_dp,1.5925097532_dp,2.8531188820_dp,5.0164916215_dp,8.8787427624_dp,15.9770766339_dp,29.3807725841_dp,55.4287162064_dp,& + 107.7095964209_dp,216.6287632197_dp,453.7426000720_dp,998.0221583737_dp,2332.1646550623_dp,5890.4995870220_dp,16531.9236622109_dp,54208.2506864180_dp,234158.2961103953_dp,& + 0.5029791750_dp,0.6417196055_dp,0.9717065651_dp,1.6181802341_dp,2.8354963081_dp,5.1331308781_dp,9.5487949715_dp,18.2555079161_dp,35.9638756655_dp,& + 73.3120612863_dp,155.5108113290_dp,345.8365421606_dp,814.5932497073_dp,2061.9760197334_dp,5733.6867171101_dp,18158.2802893164_dp,70123.8908441199_dp,398633.9384505207_dp] + aw%aw_erange_matrix(:,31) = [0.2466623194_dp,0.8077948498_dp,1.5982387997_dp,2.8667234346_dp,5.0477367999_dp,8.9492548457_dp,16.1352880115_dp,29.7372894100_dp,56.2428185727_dp,& + 109.6094612719_dp,221.1999709041_dp,465.1963104174_dp,1028.2814580196_dp,2417.8718375738_dp,6157.2042805604_dp,17480.4794754592_dp,58357.0349287896_dp,260473.4413372097_dp,& + 0.5042131777_dp,0.6440079330_dp,0.9768069389_dp,1.6296735867_dp,2.8611344928_dp,5.1901916339_dp,9.6767456775_dp,18.5470129577_dp,36.6437851669_dp,& + 74.9482070859_dp,159.6086502713_dp,356.6335737870_dp,844.9445707055_dp,2154.8129629221_dp,6052.0114227348_dp,19444.0387880265_dp,76846.9611556469_dp,455064.7940782208_dp] + aw%aw_erange_matrix(:,32) = [0.2470052603_dp,0.8091218154_dp,1.6016463057_dp,2.8748276155_dp,5.0663795081_dp,8.9913991392_dp,16.2300284650_dp,29.9512323720_dp,56.7325330921_dp,& + 110.7554906838_dp,223.9664660987_dp,472.1556042268_dp,1046.7571381205_dp,2470.5309237515_dp,6322.4522482374_dp,18075.3893191007_dp,61011.6261370216_dp,278043.4319918001_dp,& + 0.5049456007_dp,0.6453687263_dp,0.9798456467_dp,1.6365329129_dp,2.8764626879_dp,5.2243720830_dp,9.7535545588_dp,18.7224245427_dp,37.0540406668_dp,& + 75.9386048198_dp,162.0985889041_dp,363.2242952357_dp,863.5775619736_dp,2212.2293119703_dp,6250.8786633660_dp,20259.3672008996_dp,81220.2624367206_dp,493903.7336261885_dp] + aw%aw_erange_matrix(:,33) = [0.2479070591_dp,0.8126156863_dp,1.6106355109_dp,2.8962520852_dp,5.1157722654_dp,9.1033195075_dp,16.4822737221_dp,30.5225047448_dp,58.0445152466_dp,& + 113.8376373968_dp,231.4406236551_dp,491.0606539737_dp,1097.2889246287_dp,2615.8193585517_dp,6783.7921251546_dp,19765.1665816340_dp,68773.2087073112_dp,332879.9902833110_dp,& + 0.5068722333_dp,0.6489576683_dp,0.9878804553_dp,1.6547124799_dp,2.9171851328_dp,5.3154164832_dp,9.9587430808_dp,19.1925744522_dp,38.1578179311_dp,& + 78.6150396384_dp,168.8626882537_dp,381.2426698660_dp,914.9252925831_dp,2372.0982841524_dp,6812.5177792103_dp,22611.4620307756_dp,94313.9725576750_dp,621003.7893413518_dp] + aw%aw_erange_matrix(:,34) = [0.2488445564_dp,0.8162546763_dp,1.6200245149_dp,2.9186987450_dp,5.1676891801_dp,9.2213672091_dp,16.7493449509_dp,31.1299547030_dp,59.4464473127_dp,& + 117.1499428429_dp,239.5273357413_dp,511.6827842253_dp,1152.9725592643_dp,2778.0302179810_dp,7308.1217912983_dp,21736.8287450385_dp,78245.3963530631_dp,407389.7568922244_dp,& + 0.5088761210_dp,0.6527048135_dp,0.9963009145_dp,1.6738302826_dp,2.9601613259_dp,5.4118721369_dp,10.1770679896_dp,19.6952763247_dp,39.3446624314_dp,& + 81.5118069612_dp,176.2408673541_dp,401.0839570649_dp,972.1435868244_dp,2553.0292718077_dp,7461.9282580860_dp,25420.7597614315_dp,110881.6155222195_dp,807717.4768339451_dp] + aw%aw_erange_matrix(:,35) = [0.2489027717_dp,0.8164809134_dp,1.6206092698_dp,2.9200994031_dp,5.1709349593_dp,9.2287620348_dp,16.7661108868_dp,31.1681785725_dp,59.5348987369_dp,& + 117.3595707997_dp,240.0409997763_dp,512.9984965777_dp,1156.5449506809_dp,2788.5118341189_dp,7342.3362280433_dp,21867.3537661850_dp,78888.3507304854_dp,412773.3816334762_dp,& + 0.5090005943_dp,0.6529381345_dp,0.9968264487_dp,1.6750258908_dp,2.9628544011_dp,5.4179295425_dp,10.1908113350_dp,19.7270039685_dp,39.4197954981_dp,& + 81.6958381899_dp,176.7115790119_dp,402.3563056081_dp,975.8367478350_dp,2564.8072390811_dp,7504.7021546451_dp,25609.0943418721_dp,112028.7196634320_dp,821824.7982251805_dp] + aw%aw_erange_matrix(:,36) = [0.2489028793_dp,0.8164812826_dp,1.6206100265_dp,2.9201007372_dp,5.1709371443_dp,9.2287653856_dp,16.7661154320_dp,31.1681839603_dp,59.5349042318_dp,& + 117.3595737483_dp,240.0409935634_dp,512.9985002870_dp,1156.5449881503_dp,2788.5116971549_dp,7342.3361726431_dp,21867.3597042521_dp,78888.3522147178_dp,412773.5597732165_dp,& + 0.5090008175_dp,0.6529384478_dp,0.9968269205_dp,1.6750265874_dp,2.9628554209_dp,5.4179308019_dp,10.1908123913_dp,19.7270045689_dp,39.4197948530_dp,& + 81.6958325873_dp,176.7115700855_dp,402.3563424594_dp,975.8367333780_dp,2564.8068659078_dp,7504.7037477325_dp,25609.1035816155_dp,112028.6869791661_dp,821825.9737785851_dp] + aw%aw_erange_matrix(:,37) = [0.2489028079_dp,0.8164810378_dp,1.6206095245_dp,2.9200998161_dp,5.1709354667_dp,9.2287624833_dp,16.7661110594_dp,31.1681786578_dp,59.5349016573_dp,& + 117.3595876258_dp,240.0410761551_dp,512.9988191375_dp,1156.5459366962_dp,2788.5140947174_dp,7342.3407649382_dp,21867.3686070922_dp,78888.4332660082_dp,412773.9966006952_dp,& + 0.5090006693_dp,0.6529382408_dp,0.9968266019_dp,1.6750260368_dp,2.9628544290_dp,5.4179293831_dp,10.1908109785_dp,19.7270045640_dp,39.4198017403_dp,& + 81.6958641187_dp,176.7116945056_dp,402.3567263825_dp,975.8376809767_dp,2564.8088840884_dp,7504.7057927441_dp,25609.1162370374_dp,112028.8631073939_dp,821826.1873703946_dp] + aw%aw_erange_matrix(:,38) = [0.2489028522_dp,0.8164811882_dp,1.6206098122_dp,2.9201002719_dp,5.1709361783_dp,9.2287636832_dp,16.7661132249_dp,31.1681828409_dp,59.5349119329_dp,& + 117.3596202973_dp,240.0411572863_dp,512.9989857692_dp,1156.5464150529_dp,2788.5158335943_dp,7342.3468180366_dp,21867.3834916361_dp,78888.4353980769_dp,412773.6537501516_dp,& + 0.5090007613_dp,0.6529383634_dp,0.9968267522_dp,1.6750262318_dp,2.9628547692_dp,5.4179300607_dp,10.1908123018_dp,19.7270076400_dp,39.4198129704_dp,& + 81.6958999381_dp,176.7117546132_dp,402.3568620295_dp,975.8382656500_dp,2564.8112405019_dp,7504.7120444986_dp,25609.1291848948_dp,112028.7748460801_dp,821825.5760266429_dp] + case(20) + aw%energy_range(:) = [100.0000_dp,200.0000_dp,300.0000_dp,400.0000_dp,500.0000_dp,600.0000_dp,700.0000_dp,800.0000_dp,900.0000_dp,& + 1000.0000_dp,2000.0000_dp,3000.0000_dp,4000.0000_dp,5000.0000_dp,6000.0000_dp,7000.0000_dp,8000.0000_dp,9000.0000_dp,& + 10000.0000_dp,20000.0000_dp,30000.0000_dp,40000.0000_dp,50000.0000_dp,60000.0000_dp,70000.0000_dp,80000.0000_dp,100000.0000_dp,& + 200000.0000_dp,300000.0000_dp,400000.0000_dp,500000.0000_dp,600000.0000_dp,700000.0000_dp,900000.0000_dp,1000000.0000_dp,2000000.0000_dp,& + 3000000.0000_dp,4000000.0000_dp,8000000.0000_dp,10000000.0000_dp] + aw%aw_erange_matrix(:,1) = [0.1269005661_dp,0.3893436383_dp,0.6784223260_dp,1.0143054963_dp,1.4209575480_dp,1.9280640442_dp,2.5734629819_dp,3.4063474143_dp,4.4916150233_dp,& + 5.9159470021_dp,7.7966091574_dp,10.2948349674_dp,13.6376091270_dp,18.1564082014_dp,24.3637900705_dp,33.1239654661_dp,46.0884630118_dp,67.0263507212_dp,& + 107.1915270177_dp,222.9766291753_dp,0.2552297265_dp,0.2726311907_dp,0.3088610134_dp,0.3668677723_dp,0.4513440201_dp,0.5691227872_dp,0.7298027520_dp,& + 0.9466832844_dp,1.2381561701_dp,1.6298372023_dp,2.1580142079_dp,2.8756651728_dp,3.8639634663_dp,5.2565377559_dp,7.2960714266_dp,10.4818575419_dp,& + 16.0127746431_dp,27.4249166322_dp,59.1658806072_dp,228.8684844393_dp] + aw%aw_erange_matrix(:,2) = [0.1487641846_dp,0.4603640033_dp,0.8158259805_dp,1.2500369197_dp,1.8069581625_dp,2.5446723364_dp,3.5422243445_dp,4.9092359416_dp,6.7996884178_dp,& + 9.4319683501_dp,13.1184778521_dp,18.3103368732_dp,25.6672898525_dp,36.1736796938_dp,51.3499975303_dp,73.6954851986_dp,107.7903192646_dp,163.6788697578_dp,& + 270.7085752167_dp,575.2960452142_dp,0.2998464753_dp,0.3282616729_dp,0.3884117226_dp,0.4872546392_dp,0.6361565358_dp,0.8522889325_dp,1.1608604696_dp,& + 1.5984996809_dp,2.2183218944_dp,3.0975820152_dp,4.3495025604_dp,6.1423404725_dp,8.7323602516_dp,12.5272476594_dp,18.2263003194_dp,27.1833348194_dp,& + 42.5198181117_dp,73.3349718913_dp,156.9707549667_dp,598.8882107641_dp] + aw%aw_erange_matrix(:,3) = [0.1553033321_dp,0.4819730674_dp,0.8589054503_dp,1.3267340899_dp,1.9376352225_dp,2.7619553370_dp,3.8974115944_dp,5.4823168482_dp,7.7149415235_dp,& + 10.8822280753_dp,15.4029303766_dp,21.8935434075_dp,31.2718335439_dp,44.9272234982_dp,65.0249340347_dp,95.1241869292_dp,141.6840250994_dp,218.6556268996_dp,& + 366.3368632313_dp,785.0727107663_dp,0.3132497414_dp,0.3457182041_dp,0.4148355207_dp,0.5294098044_dp,0.7039668881_dp,0.9607439790_dp,1.3329053603_dp,& + 1.8694832105_dp,2.6428897343_dp,3.7604095010_dp,5.3820811386_dp,7.7494027866_dp,11.2340289890_dp,16.4283684885_dp,24.3388578990_dp,36.8755634811_dp,& + 58.3510265348_dp,101.1969993687_dp,216.3941760866_dp,821.7863004547_dp] + aw%aw_erange_matrix(:,4) = [0.1602004477_dp,0.4982768628_dp,0.8918282994_dp,1.3862726480_dp,2.0407769840_dp,2.9363514353_dp,4.1872918884_dp,5.9579161540_dp,8.4874770477_dp,& + 12.1277050228_dp,17.4000555539_dp,25.0843007374_dp,36.3587398714_dp,53.0308860036_dp,77.9444988857_dp,115.7893855068_dp,175.0326856823_dp,273.7531584568_dp,& + 463.6315343486_dp,1000.6412716698_dp,0.3233065868_dp,0.3590615676_dp,0.4355111553_dp,0.5631070573_dp,0.7592170706_dp,1.0507088367_dp,1.4781533654_dp,& + 2.1023610716_dp,3.0144546403_dp,4.3514790279_dp,6.3209308272_dp,9.2402745759_dp,13.6035123636_dp,20.2025549258_dp,30.3787724867_dp,46.6452428752_dp,& + 74.5772897925_dp,130.0596055803_dp,278.0987366596_dp,1052.3224746964_dp] + aw%aw_erange_matrix(:,5) = [0.1638688488_dp,0.5105604532_dp,0.9168785055_dp,1.4321163876_dp,2.1211989903_dp,3.0740630119_dp,4.4191033387_dp,6.3431018079_dp,9.1212764540_dp,& + 13.1631392903_dp,19.0832782264_dp,27.8120992982_dp,40.7725452278_dp,60.1717228114_dp,89.5126977791_dp,134.5978846704_dp,205.8797927146_dp,325.4902463212_dp,& + 556.1414701978_dp,1207.3263758191_dp,0.3308512935_dp,0.3692149624_dp,0.4515227451_dp,0.5896214449_dp,0.8033146592_dp,1.1234887339_dp,1.5972344368_dp,& + 2.2958886770_dp,3.3275669505_dp,4.8568023156_dp,7.1357039513_dp,10.5544529160_dp,15.7262899198_dp,23.6407452337_dp,35.9746460773_dp,55.8450726898_dp,& + 90.0739692140_dp,157.8883317051_dp,337.7570557426_dp,1274.5553902054_dp] + aw%aw_erange_matrix(:,6) = [0.1666812473_dp,0.5200197880_dp,0.9363159150_dp,1.4680135301_dp,2.1847779446_dp,3.1839864675_dp,4.6059283508_dp,6.6565650054_dp,9.6421957068_dp,& + 14.0228927018_dp,20.4957937657_dp,30.1266222062_dp,44.5611562236_dp,66.3756371885_dp,99.6904809947_dp,151.3616213170_dp,233.7317810725_dp,372.7770246586_dp,& + 641.5652904001_dp,1399.5025565565_dp,0.3366421328_dp,0.3770934988_dp,0.4641134201_dp,0.6107224468_dp,0.8387891450_dp,1.1826400637_dp,1.6950085513_dp,& + 2.4564493367_dp,3.5901441623_dp,5.2853183249_dp,7.8347083231_dp,11.6956640563_dp,17.5931650358_dp,26.7044655011_dp,41.0283931704_dp,64.2634427909_dp,& + 104.4206964123_dp,183.8648608116_dp,393.5981950763_dp,1482.1123469086_dp] + aw%aw_erange_matrix(:,7) = [0.1689983670_dp,0.5278413162_dp,0.9524859226_dp,1.4980942342_dp,2.2384628937_dp,3.2775178203_dp,4.7661176411_dp,6.9274306303_dp,10.0959126890_dp,& + 14.7778992447_dp,21.7468510348_dp,32.1949647809_dp,47.9786541782_dp,72.0271500965_dp,109.0579600700_dp,166.9560061338_dp,259.9205313825_dp,417.6959062761_dp,& + 723.4174819692_dp,1584.7298779218_dp,0.3414175972_dp,0.3836475849_dp,0.4746985841_dp,0.6286311009_dp,0.8691546306_dp,1.2336868862_dp,1.7800761528_dp,& + 2.5973123241_dp,3.8225027660_dp,5.6679375388_dp,8.4647255049_dp,12.7343955668_dp,19.3099663809_dp,29.5523018192_dp,45.7781719211_dp,72.2624507871_dp,& + 118.1883304765_dp,208.9732397638_dp,447.7166658434_dp,1682.9251682933_dp] + aw%aw_erange_matrix(:,8) = [0.1709975801_dp,0.5346104341_dp,0.9665527031_dp,1.5244238634_dp,2.2857569714_dp,3.3604499415_dp,4.9090787048_dp,7.1707601199_dp,10.5062642169_dp,& + 15.4655323863_dp,22.8946056552_dp,34.1070735500_dp,51.1634950623_dp,77.3386634166_dp,117.9404792765_dp,181.8804039669_dp,285.2201402775_dp,461.4812139354_dp,& + 803.8200405044_dp,1767.6358274642_dp,0.3455411323_dp,0.3893490233_dp,0.4839888077_dp,0.6444742812_dp,0.8962114315_dp,1.2794858141_dp,1.8569268957_dp,& + 2.7254731305_dp,4.0354666725_dp,6.0213163325_dp,9.0512798536_dp,13.7096395972_dp,20.9361451675_dp,32.2748999074_dp,50.3627737688_dp,80.0575861694_dp,& + 131.7236728332_dp,233.8208784489_dp,501.4126707244_dp,1881.8947304241_dp] + aw%aw_erange_matrix(:,9) = [0.1728363280_dp,0.5408533960_dp,0.9795862984_dp,1.5489540702_dp,2.3300726590_dp,3.4386091506_dp,5.0445951101_dp,7.4027796571_dp,10.8999168753_dp,& + 16.1293383882_dp,24.0098862171_dp,35.9779368508_dp,54.3023627872_dp,82.6138138091_dp,126.8337910507_dp,196.9496532881_dp,310.9861906317_dp,506.4458754055_dp,& + 886.9824447716_dp,1957.7555762036_dp,0.3493363943_dp,0.3946314940_dp,0.4926645366_dp,0.6593741291_dp,0.9218200047_dp,1.3231002939_dp,1.9305653016_dp,& + 2.8490587713_dp,4.2421870714_dp,6.3667075825_dp,9.6287355654_dp,14.6770820798_dp,22.5622795853_dp,35.0204218560_dp,55.0265945555_dp,88.0576357175_dp,& + 145.7292992131_dp,259.6935178652_dp,557.4706539806_dp,2089.3700179412_dp] + aw%aw_erange_matrix(:,10) = [0.1747236608_dp,0.5472787064_dp,0.9930617083_dp,1.5744526151_dp,2.3763969335_dp,3.5207727637_dp,5.1878638223_dp,7.6494891918_dp,11.3209836695_dp,& + 16.8437657056_dp,25.2179952404_dp,38.0183385206_dp,57.7503322676_dp,88.4526053005_dp,136.7566607627_dp,213.9055578161_dp,340.2293509804_dp,557.9081484565_dp,& + 982.8584902244_dp,2178.0487007882_dp,0.3532346686_dp,0.4000927534_dp,0.5017031300_dp,0.6750038465_dp,0.9488503163_dp,1.3694128804_dp,2.0092328227_dp,& + 2.9819085667_dp,4.4658471680_dp,6.7429430083_dp,10.2622527490_dp,15.7464359524_dp,24.3739941067_dp,38.1048989064_dp,60.3120644386_dp,97.2046014714_dp,& + 161.8768332801_dp,289.7172339532_dp,622.7088267238_dp,2330.5550510347_dp] + aw%aw_erange_matrix(:,11) = [0.1838745625_dp,0.5786892739_dp,1.0598468503_dp,1.7028865109_dp,2.6137008180_dp,3.9489011076_dp,5.9473718311_dp,8.9806897085_dp,13.6350803488_dp,& + 20.8464416741_dp,32.1256332940_dp,49.9393672334_dp,78.3638910186_dp,124.2286594356_dp,199.1775712702_dp,323.5964676730_dp,535.0206455703_dp,910.8130205444_dp,& + 1657.5903483082_dp,3757.0281223492_dp,0.3721759923_dp,0.4271526160_dp,0.5475253024_dp,0.7558746146_dp,1.0913474028_dp,1.6180556646_dp,2.4394980262_dp,& + 3.7226755839_dp,5.7384807986_dp,8.9299655994_dp,14.0291217392_dp,22.2595825062_dp,35.6953004506_dp,57.9143208283_dp,95.2571205121_dp,159.5310630972_dp,& + 275.1830699133_dp,505.5360584493_dp,1097.2825503989_dp,4079.8052751862_dp] + aw%aw_erange_matrix(:,12) = [0.1893442233_dp,0.5976752765_dp,1.1009673746_dp,1.7836840623_dp,2.7663449388_dp,4.2305124459_dp,6.4583627568_dp,9.8972867136_dp,15.2672324439_dp,& + 23.7416603604_dp,37.2568521772_dp,59.0482829106_dp,94.5956167624_dp,153.3195984480_dp,251.7106390248_dp,419.3652380359_dp,711.7922522672_dp,1243.8026770051_dp,& + 2317.1948214930_dp,5340.4387162258_dp,0.3835304794_dp,0.4438057686_dp,0.5765838506_dp,0.8085345155_dp,1.1864117381_dp,1.7879159406_dp,2.7406303285_dp,& + 4.2543159880_dp,6.6762179522_dp,10.5868161488_dp,16.9678208963_dp,27.5015100275_dp,45.1142123920_dp,74.9889317930_dp,126.5354006363_dp,217.5697005416_dp,& + 384.9447949438_dp,721.8571663357_dp,1582.0813807270_dp,5862.7984242797_dp] + aw%aw_erange_matrix(:,13) = [0.1929640538_dp,0.6103308334_dp,1.1287011703_dp,1.8389229760_dp,2.8721747439_dp,4.4285304006_dp,6.8228632844_dp,10.5608772296_dp,16.4673389679_dp,& + 25.9056654089_dp,41.1595610556_dp,66.1066026800_dp,107.4272765066_dp,176.8178959446_dp,295.1453267194_dp,500.5708301967_dp,865.7939502029_dp,1542.1363147961_dp,& + 2923.8663861836_dp,6825.3663623913_dp,0.3910589308_dp,0.4550328658_dp,0.5965434966_dp,0.8453048888_dp,1.2538080536_dp,1.9101646448_dp,2.9607357991_dp,& + 4.6492516408_dp,7.3848369300_dp,11.8617470151_dp,19.2731872933_dp,31.6994620652_dp,52.8262769166_dp,89.3073795371_dp,153.4500850616_dp,268.9102192056_dp,& + 484.8471515734_dp,923.9508809596_dp,2042.4381629022_dp,7555.7714291597_dp] + aw%aw_erange_matrix(:,14) = [0.1953268529_dp,0.6186315144_dp,1.1470347510_dp,1.8757697123_dp,2.9434263672_dp,4.5631048003_dp,7.0729626672_dp,11.0207404044_dp,17.3077365919_dp,& + 27.4379440803_dp,43.9558913837_dp,71.2286774216_dp,116.8675691848_dp,194.3646884356_dp,328.1086307600_dp,563.2980208060_dp,987.0560823558_dp,1781.8374413443_dp,& + 3420.8334598571_dp,8059.7253799248_dp,0.3959791965_dp,0.4624522078_dp,0.6098967742_dp,0.8701722334_dp,1.2998481007_dp,1.9945168283_dp,3.1141917800_dp,& + 4.9276143462_dp,7.8900918050_dp,12.7820305921_dp,20.9592839967_dp,34.8134090969_dp,58.6347666239_dp,100.2713734263_dp,174.4335470338_dp,309.7252860155_dp,& + 565.9174595153_dp,1091.1791332967_dp,2428.3939374675_dp,8976.2684789511_dp] + aw%aw_erange_matrix(:,15) = [0.1979220756_dp,0.6277857441_dp,1.1673867666_dp,1.9169822219_dp,3.0237404335_dp,4.7159901539_dp,7.3593849231_dp,11.5518207748_dp,18.2869048651_dp,& + 29.2401475740_dp,47.2782513535_dp,77.3810455573_dp,128.3416896459_dp,215.9685447344_dp,369.2709270409_dp,642.8540289853_dp,1143.4943281987_dp,2096.7545149013_dp,& + 4085.4764949230_dp,9733.4147125769_dp,0.4013891591_dp,0.4706859123_dp,0.6248675868_dp,0.8983032593_dp,1.3523696718_dp,2.0915568230_dp,3.2922785955_dp,& + 5.2536478204_dp,8.4877039551_dp,13.8820055023_dp,22.9974199128_dp,38.6235354068_dp,65.8361819586_dp,114.0616190251_dp,201.2456490940_dp,362.7865858475_dp,& + 673.2812412339_dp,1316.6864159845_dp,2955.5779328169_dp,10919.2910161878_dp] + aw%aw_erange_matrix(:,16) = [0.1993791819_dp,0.6329426794_dp,1.1789139470_dp,1.9404690900_dp,3.0698025097_dp,4.8042386799_dp,7.5258072374_dp,11.8625304683_dp,18.8639570543_dp,& + 30.3105291734_dp,49.2680571847_dp,81.0992054850_dp,135.3443840989_dp,229.2954621089_dp,394.9635543219_dp,693.1603194264_dp,1243.8428121004_dp,2301.9027515682_dp,& + 4525.1220971822_dp,10853.8603929865_dp,0.4044292682_dp,0.4753481665_dp,0.6334154455_dp,0.9144830930_dp,1.3827858098_dp,2.1481427993_dp,3.3968720385_dp,& + 5.4465903028_dp,8.8442306363_dp,14.5439310045_dp,24.2353524597_dp,40.9611235878_dp,70.3029252891_dp,122.7179376050_dp,218.2984984777_dp,397.0258012296_dp,& + 743.6524001242_dp,1466.8140504486_dp,3310.5991720942_dp,12229.9813326092_dp] + aw%aw_erange_matrix(:,17) = [0.2007287666_dp,0.6377302769_dp,1.1896559856_dp,1.9624505391_dp,3.1131031720_dp,4.8875693338_dp,7.6836814310_dp,12.1587068457_dp,19.4168411849_dp,& + 31.3417174027_dp,51.1963607081_dp,84.7255865155_dp,142.2220551115_dp,242.4849819026_dp,420.6068715213_dp,743.8425862321_dp,1345.9981578952_dp,2513.1236504618_dp,& + 4982.9639601912_dp,12031.2882728258_dp,0.4072467615_dp,0.4796920152_dp,0.6414256270_dp,0.9297223696_dp,1.4115709668_dp,2.2019529685_dp,3.4968358422_dp,& + 5.6319773197_dp,9.1887497064_dp,15.1874794416_dp,25.4468668705_dp,43.2652212867_dp,74.7401103499_dp,131.3908637934_dp,235.5463785324_dp,432.0212860913_dp,& + 816.4059531201_dp,1623.8371874752_dp,3685.2386391427_dp,13615.2774199275_dp] + aw%aw_erange_matrix(:,18) = [0.2020840295_dp,0.6425489310_dp,1.2005071815_dp,1.9847477410_dp,3.1572137609_dp,4.9728273747_dp,7.8459300539_dp,12.4645182026_dp,19.9905584018_dp,& + 32.4174866719_dp,53.2196564781_dp,88.5545015972_dp,149.5336572481_dp,256.6123898725_dp,448.3028300934_dp,799.0904867364_dp,1458.5112786281_dp,2748.4098173074_dp,& + 5498.8688318388_dp,13370.3635889921_dp,0.4100777806_dp,0.4840791375_dp,0.6495606546_dp,0.9452750654_dp,1.4410840136_dp,2.2573816221_dp,3.6003093288_dp,& + 5.8248681410_dp,9.5492020231_dp,15.8648082978_dp,26.7302003384_dp,45.7230169360_dp,79.5095689997_dp,140.7919497274_dp,254.4173532130_dp,470.7090887768_dp,& + 897.7590223867_dp,1801.4936356453_dp,4113.0305585569_dp,15200.0410499012_dp] + aw%aw_erange_matrix(:,19) = [0.2032205695_dp,0.6465984181_dp,1.2096570722_dp,2.0036212512_dp,3.1946985238_dp,5.0455691472_dp,7.9849323186_dp,12.7276523813_dp,20.4864941198_dp,& + 33.3520284721_dp,54.9867771812_dp,91.9181816995_dp,155.9979832028_dp,269.1908123424_dp,473.1550907773_dp,849.0992659852_dp,1561.3529337435_dp,2965.7991208260_dp,& + 5980.8252030269_dp,14632.6142302186_dp,0.4124532089_dp,0.4877777262_dp,0.6564540765_dp,0.9585134479_dp,1.4663123889_dp,2.3049676386_dp,3.6895439071_dp,& + 5.9920148700_dp,9.8631540337_dp,16.4580266269_dp,27.8609119922_dp,47.9026672970_dp,83.7695736201_dp,149.2552286193_dp,271.5551657080_dp,506.1887949137_dp,& + 973.1779944256_dp,1968.0569962117_dp,4517.7640074971_dp,16702.4332984174_dp] + aw%aw_erange_matrix(:,20) = [0.2100467885_dp,0.6710867958_dp,1.2655966277_dp,2.1204488023_dp,3.4297162999_dp,5.5076322035_dp,8.8799491815_dp,14.4464326282_dp,23.7761722206_dp,& + 39.6552702974_dp,67.1241456556_dp,115.4870441158_dp,202.3027424707_dp,361.5321008587_dp,660.7054799726_dp,1238.4882754172_dp,2391.2466429102_dp,4792.5946650321_dp,& + 10209.5610089504_dp,26121.5962145944_dp,0.4267457680_dp,0.5103745955_dp,0.6992682155_dp,1.0419398350_dp,1.6275173138_dp,2.6133681708_dp,4.2765680933_dp,& + 7.1093051388_dp,11.9982862164_dp,20.5686675844_dp,35.8579383327_dp,63.6688292548_dp,115.3603001063_dp,213.7851141281_dp,406.3852699746_dp,795.4467675420_dp,& + 1613.4496474889_dp,3445.5938150773_dp,8247.6252410914_dp,30701.4510546252_dp] + aw%aw_erange_matrix(:,21) = [0.2134211415_dp,0.6832999754_dp,1.2938913455_dp,2.1804863813_dp,3.5524727238_dp,5.7530169518_dp,9.3635167855_dp,15.3921413624_dp,25.6219059850_dp,& + 43.2672961425_dp,74.2412586858_dp,129.6605522363_dp,230.9357343846_dp,420.4305728470_dp,784.5694186442_dp,1506.0086109926_dp,2987.7753404713_dp,6175.4472528435_dp,& + 13596.3071435874_dp,35790.3633594939_dp,0.4338273088_dp,0.5217934532_dp,0.7213589758_dp,1.0857823424_dp,1.7137308375_dp,2.7812811282_dp,4.6022721177_dp,& + 7.7418600433_dp,13.2336587334_dp,23.0037453201_dp,40.7184816207_dp,73.5253160601_dp,135.7348748315_dp,256.8755076852_dp,500.0120134270_dp,1005.4531221143_dp,& + 2102.5694231474_dp,4639.9562502971_dp,11424.8081725858_dp,42857.5681328368_dp] + aw%aw_erange_matrix(:,22) = [0.2154048306_dp,0.6905139694_dp,1.3107300197_dp,2.2165178156_dp,3.6267841342_dp,5.9028827283_dp,9.6615935230_dp,15.9808544186_dp,26.7831616219_dp,& + 45.5662657275_dp,78.8290086443_dp,138.9260518495_dp,249.9487133875_dp,460.2341641642_dp,869.9648330428_dp,1694.7284101600_dp,3420.0061213002_dp,7209.4431806666_dp,& + 16220.7724974093_dp,43535.7255823378_dp,0.4379955245_dp,0.5285852418_dp,0.7346430220_dp,1.1124030451_dp,1.7665688206_dp,2.8851827907_dp,4.8058758827_dp,& + 8.1416390320_dp,14.0237512217_dp,24.5814305810_dp,43.9127669455_dp,80.1057147054_dp,149.5786505165_dp,286.7398293421_dp,566.3838524293_dp,1158.2631897128_dp,& + 2469.5012711559_dp,5568.0985493326_dp,13982.7476296939_dp,52802.4632251246_dp] + aw%aw_erange_matrix(:,23) = [0.2173211080_dp,0.6975072808_dp,1.3271437824_dp,2.2518575469_dp,3.7001326120_dp,6.0517729437_dp,9.9597591924_dp,16.5740573443_dp,27.9625628780_dp,& + 47.9214414702_dp,83.5739597163_dp,148.6111402314_dp,270.0601611920_dp,502.9071881088_dp,962.9363686967_dp,1903.8962513689_dp,3909.2840000751_dp,8409.8263874927_dp,& + 19358.8810606264_dp,53065.9842160918_dp,0.4420257835_dp,0.5352028042_dp,0.7476902021_dp,1.1387347329_dp,1.8191920194_dp,2.9893972965_dp,5.0116395287_dp,& + 8.5489641930_dp,14.8359261888_dp,26.2190424023_dp,47.2641244408_dp,87.0925493281_dp,164.4757637376_dp,319.3690989999_dp,640.1806662632_dp,1331.6759700693_dp,& + 2896.1226974247_dp,6678.6718268326_dp,17138.0059712719_dp,65264.0692155336_dp] + aw%aw_erange_matrix(:,24) = [0.2193531513_dp,0.7049495461_dp,1.3447091867_dp,2.2899142584_dp,3.7796302540_dp,6.2142182128_dp,10.2873452565_dp,17.2306802824_dp,29.2786972691_dp,& + 50.5731813132_dp,88.9693208847_dp,159.7456029322_dp,293.4694015758_dp,553.2823373222_dp,1074.4843057459_dp,2159.6665041804_dp,4521.2568082323_dp,9952.9945444859_dp,& + 23528.1129162730_dp,66154.9862522529_dp,0.4463035027_dp,0.5422814483_dp,0.7617594998_dp,1.1673332908_dp,1.8767443882_dp,3.1041993470_dp,5.2400633384_dp,& + 9.0049401523_dp,15.7534327805_dp,28.0876681074_dp,51.1309398709_dp,95.2546322855_dp,182.1240661173_dp,358.6470914471_dp,730.6730596026_dp,1548.9997428759_dp,& + 3444.9107894353_dp,8153.0596082736_dp,21475.7473625549_dp,82745.2901188683_dp] + aw%aw_erange_matrix(:,25) = [0.2199556850_dp,0.7071616248_dp,1.3499499029_dp,2.3013165037_dp,3.8035517381_dp,6.2633169276_dp,10.3868212036_dp,17.4310747137_dp,29.6825632027_dp,& + 51.3917750880_dp,90.6459552077_dp,163.2314157746_dp,300.8594912800_dp,569.3374889456_dp,1110.4290304790_dp,2243.1545546858_dp,4724.1213696404_dp,10474.2783230759_dp,& + 24969.1774183049_dp,70787.9056406355_dp,0.4475727160_dp,0.5443927270_dp,0.7659785620_dp,1.1759505156_dp,1.8941667611_dp,3.1391208583_dp,5.3099073825_dp,& + 9.1451444214_dp,16.0372798748_dp,28.6696636488_dp,52.3442994499_dp,97.8372524796_dp,187.7612122269_dp,371.3292221168_dp,760.2592827024_dp,1621.1098798282_dp,& + 3630.2728339545_dp,8661.9987430013_dp,23010.5776793044_dp,89027.1877264543_dp] + aw%aw_erange_matrix(:,26) = [0.2213967225_dp,0.7124620182_dp,1.3625440438_dp,2.3288072141_dp,3.8614201529_dp,6.3825038823_dp,10.6291843551_dp,17.9212449302_dp,30.6746932010_dp,& + 53.4122903462_dp,94.8062798825_dp,171.9324347205_dp,319.4305524136_dp,609.9958576948_dp,1202.2760280137_dp,2458.7628453062_dp,5254.7959061760_dp,11859.8272869300_dp,& + 28876.4300087964_dp,83621.3584888344_dp,0.4506096931_dp,0.5494651356_dp,0.7761574759_dp,1.1968178614_dp,1.9365098729_dp,3.2243155683_dp,5.4809935891_dp,& + 9.4901034635_dp,16.7390513969_dp,30.1162910985_dp,55.3783262185_dp,104.3386324165_dp,202.0605295036_dp,403.7825310523_dp,836.7510481214_dp,1809.8393464491_dp,& + 4122.7132961454_dp,10039.4586895308_dp,27256.9773349684_dp,106669.4482880922_dp] + aw%aw_erange_matrix(:,27) = [0.2224633678_dp,0.7163943625_dp,1.3719211590_dp,2.3493577781_dp,3.9048579408_dp,6.4723510220_dp,10.8127104194_dp,18.2942246887_dp,31.4336342187_dp,& + 54.9669673773_dp,98.0283202070_dp,178.7205394600_dp,334.0395318624_dp,642.2863900989_dp,1276.0355268848_dp,2634.2100758602_dp,5693.5921229264_dp,13028.5986277815_dp,& + 32256.4716147261_dp,95035.7667695921_dp,0.4528589947_dp,0.5532406648_dp,0.7837727453_dp,1.2125008092_dp,1.9684751543_dp,3.2889301656_dp,5.6114015966_dp,& + 9.7544762384_dp,17.2800949143_dp,31.2389616706_dp,57.7502559085_dp,109.4634285227_dp,213.4387314049_dp,429.8879637881_dp,899.0683013216_dp,1965.9491929210_dp,& + 4537.6897182456_dp,11227.6210172707_dp,31024.3140825160_dp,122643.2181496294_dp] + aw%aw_erange_matrix(:,28) = [0.2270035179_dp,0.7332198213_dp,1.4123703151_dp,2.4388103627_dp,4.0957062773_dp,6.8709440976_dp,11.6353156671_dp,19.9847521336_dp,34.9159532511_dp,& + 62.1982419296_dp,113.2457066364_dp,211.3399667308_dp,405.6484519624_dp,804.2585035719_dp,1656.2452930299_dp,3568.8525746747_dp,8128.5951388481_dp,19864.2862011517_dp,& + 53453.5351595583_dp,172915.1665532315_dp,0.4624461756_dp,0.5695146586_dp,0.8169775175_dp,1.2815895432_dp,2.1107247940_dp,3.5795452147_dp,6.2047044555_dp,& + 10.9724629989_dp,19.8075121695_dp,36.5649147988_dp,69.1995242361_dp,134.6929562291_dp,270.7382314800_dp,564.8796459398_dp,1231.6238153148_dp,2831.6002200052_dp,& + 6952.2631308159_dp,18588.0043317405_dp,56341.6438905135_dp,237851.7740726325_dp] + aw%aw_erange_matrix(:,29) = [0.2282452994_dp,0.7378467772_dp,1.4235873662_dp,2.4638483499_dp,4.1496383234_dp,6.9847050121_dp,11.8725768460_dp,20.4779361720_dp,35.9446606584_dp,& + 64.3642984509_dp,117.8753890465_dp,221.4402103430_dp,428.2726175934_dp,856.6427196043_dp,1782.6521146754_dp,3890.1080292655_dp,9000.8493152889_dp,22446.8911166671_dp,& + 62057.6209967001_dp,207544.2604152353_dp,0.4650721038_dp,0.5740240208_dp,0.8262871486_dp,1.3011642069_dp,2.1514462179_dp,3.6636459744_dp,6.3784203874_dp,& + 11.3336694651_dp,20.5676692843_dp,38.1920219064_dp,72.7592346003_dp,142.6946633080_dp,289.3308298026_dp,609.8630677897_dp,1345.9979183502_dp,3140.9672008704_dp,& + 7857.7024751677_dp,21526.9070605909_dp,67335.1753726742_dp,292199.2083754797_dp] + aw%aw_erange_matrix(:,30) = [0.2302329800_dp,0.7452757671_dp,1.4416828789_dp,2.5044527384_dp,4.2375756404_dp,7.1712444839_dp,12.2639786439_dp,21.2968875142_dp,37.6653148941_dp,& + 68.0168392117_dp,125.7541243801_dp,238.8096013994_dp,467.6539561913_dp,949.1365523813_dp,2009.6995661194_dp,4479.4250976071_dp,10644.4747666966_dp,27491.3402238993_dp,& + 79749.2290866879_dp,284201.2216034857_dp,0.4692787280_dp,0.5812951424_dp,0.8413981073_dp,1.3331256476_dp,2.2183275752_dp,3.8026339752_dp,6.6674495133_dp,& + 11.9391083775_dp,21.8523111879_dp,40.9671715187_dp,78.8940703298_dp,156.6502558501_dp,322.2102932417_dp,690.7273514479_dp,1555.7163249990_dp,3722.3682098598_dp,& + 9614.2346334070_dp,27480.1654067523_dp,91042.1984510180_dp,418626.7623824707_dp] + aw%aw_erange_matrix(:,31) = [0.2309997652_dp,0.7481491652_dp,1.4487102104_dp,2.5202919496_dp,4.2720372785_dp,7.2446994523_dp,12.4188978358_dp,21.6228557718_dp,38.3544509116_dp,& + 69.4899002151_dp,128.9566358732_dp,245.9334937859_dp,483.9748566103_dp,987.9423670191_dp,2106.3746675355_dp,4734.9715827774_dp,11374.0526670871_dp,29802.1776879041_dp,& + 88233.9284246859_dp,323606.8205726882_dp,0.4709026293_dp,0.5841176915_dp,0.8472969826_dp,1.3456653710_dp,2.2446991698_dp,3.8577278692_dp,6.7826779609_dp,& + 12.1820097136_dp,22.3713323301_dp,42.0972287354_dp,81.4145349861_dp,162.4426397032_dp,336.0203223899_dp,725.1737456466_dp,1646.5888196690_dp,3979.7077292905_dp,& + 10413.4545368449_dp,30293.3774670340_dp,102890.7613584087_dp,486716.6945973909_dp] + aw%aw_erange_matrix(:,32) = [0.2317216671_dp,0.7508582400_dp,1.4553502446_dp,2.5352946574_dp,4.3047609754_dp,7.3146332056_dp,12.5668057721_dp,21.9350283572_dp,39.0166700294_dp,& + 70.9108372686_dp,132.0592352592_dp,252.8695660393_dp,499.9578397739_dp,1026.2066992849_dp,2202.4979190057_dp,4991.7130843994_dp,12116.9785521321_dp,32199.1397717070_dp,& + 97281.6652623537_dp,367557.7408342897_dp,0.4724320498_dp,0.5867840700_dp,0.8528864803_dp,1.3575799638_dp,2.2698244257_dp,3.9103698421_dp,6.8931246234_dp,& + 12.4156370380_dp,22.8724611966_dp,43.1930603877_dp,83.8707280295_dp,168.1194331310_dp,349.6448317936_dp,759.4272357179_dp,1737.8300995737_dp,4241.2567183729_dp,& + 11238.8274817755_dp,33264.2891459751_dp,115840.3068652384_dp,565032.8320210141_dp] + aw%aw_erange_matrix(:,33) = [0.2315723578_dp,0.7502976548_dp,1.4539752009_dp,2.5321852206_dp,4.2979726514_dp,7.3001120222_dp,12.5360618709_dp,21.8700659116_dp,38.8786859171_dp,& + 70.6143296572_dp,131.4107403383_dp,251.4170699709_dp,496.6034330584_dp,1018.1548395679_dp,2182.2059654894_dp,4937.2959217347_dp,11958.6904408133_dp,31684.7806037803_dp,& + 95319.1174596458_dp,357852.8059662599_dp,0.4721156826_dp,0.5862319504_dp,0.8517278701_dp,1.3551078642_dp,2.2646060976_dp,3.8994247207_dp,6.8701337691_dp,& + 12.3669407660_dp,22.7678540238_dp,42.9639318185_dp,83.3561980628_dp,166.9277005859_dp,346.7773613512_dp,752.1960779938_dp,1718.4964408708_dp,4185.5739886276_dp,& + 11062.0231565802_dp,32622.3714329241_dp,113004.7096290576_dp,547527.8009971447_dp] + aw%aw_erange_matrix(:,34) = [0.2330327465_dp,0.7557879577_dp,1.4674695396_dp,2.5627685619_dp,4.3648927073_dp,7.4436029263_dp,12.8406272949_dp,22.5154022539_dp,40.2536360812_dp,& + 73.5790953005_dp,137.9204825461_dp,266.0638269379_dp,530.6088760669_dp,1100.2979423094_dp,2390.8193260591_dp,5502.1832614508_dp,13622.9172653753_dp,37190.3510177558_dp,& + 116916.8682410683_dp,470023.6490242586_dp,0.4752111280_dp,0.5916491579_dp,0.8631275974_dp,1.3794916206_dp,2.3162037201_dp,4.0079285275_dp,7.0986967091_dp,& + 12.8525666419_dp,23.8146804455_dp,45.2658378904_dp,88.5485224119_dp,179.0166268464_dp,376.0424512008_dp,826.5356805498_dp,1919.0447455394_dp,4769.8029212309_dp,& + 12945.6412313694_dp,39612.4676004553_dp,144982.7424613823_dp,756968.8285960874_dp] + aw%aw_erange_matrix(:,35) = [0.2336917809_dp,0.7582706845_dp,1.4735909944_dp,2.5766905568_dp,4.3954654329_dp,7.5094042557_dp,12.9808579282_dp,22.8138487792_dp,40.8926315209_dp,& + 74.9645608438_dp,140.9816947594_dp,273.0014821883_dp,546.8530172131_dp,1139.9352317226_dp,2492.7321322551_dp,5782.4620143348_dp,14465.6745115322_dp,40059.1967586687_dp,& + 128683.0742356157_dp,536270.9828905459_dp,0.4766087737_dp,0.5941057386_dp,0.8683196623_dp,1.3906408024_dp,2.3398881961_dp,4.0579408165_dp,7.2045237306_dp,& + 13.0785379764_dp,24.3044984032_dp,46.3496670744_dp,91.0107736800_dp,184.7968202259_dp,390.1716259317_dp,862.8470043196_dp,2018.4159457724_dp,5064.6094943918_dp,& + 13919.4946699187_dp,43354.1266009085_dp,163081.8283592247_dp,887800.6101104312_dp] + aw%aw_erange_matrix(:,36) = [0.2355385238_dp,0.7652446928_dp,1.4908503515_dp,2.6161051844_dp,4.4823892214_dp,7.6973271787_dp,13.3832773956_dp,23.6748478611_dp,42.7470247408_dp,& + 79.0122012776_dp,149.9936478274_dp,293.6070803411_dp,595.6059838121_dp,1260.3986842078_dp,2807.2890323238_dp,6664.8121324150_dp,17189.9402657865_dp,49693.4223340807_dp,& + 170733.9762369749_dp,805469.2230494008_dp,0.4805277478_dp,0.6010292090_dp,0.8830277392_dp,1.4223703274_dp,2.4076048048_dp,4.2016395524_dp,7.5102407058_dp,& + 13.7352562402_dp,25.7375980707_dp,49.5449228420_dp,98.3333406215_dp,202.1619239973_dp,433.1318992402_dp,974.8691200400_dp,2330.5777436894_dp,6012.6125605664_dp,& + 17152.3502183949_dp,56371.8063813081_dp,231269.1995400906_dp,1471413.4587235544_dp] + aw%aw_erange_matrix(:,37) = [0.2362071507_dp,0.7677758110_dp,1.4971376489_dp,2.6305221598_dp,4.5143190664_dp,7.7666656655_dp,13.5324758503_dp,23.9957637090_dp,43.4423108596_dp,& + 80.5400224950_dp,153.4214474265_dp,301.5145297428_dp,614.5118221402_dp,1307.7048556028_dp,2932.7523689171_dp,7023.8190577394_dp,18328.4549698330_dp,53879.2052977139_dp,& + 190218.9242868384_dp,949194.0448591732_dp,0.4819475446_dp,0.6035502702_dp,0.8884107039_dp,1.4340363557_dp,2.4326174364_dp,4.2549803904_dp,7.6243378838_dp,& + 13.9818257869_dp,26.2792936842_dp,50.7619154150_dp,101.1467263538_dp,208.9017043246_dp,450.0072447952_dp,1019.5178319373_dp,2457.2729303758_dp,6406.5081871167_dp,& + 18539.3546761464_dp,62228.8072704350_dp,264565.1715539864_dp,1816006.0736520144_dp] + aw%aw_erange_matrix(:,38) = [0.2364530992_dp,0.7687077649_dp,1.4994560497_dp,2.6358469269_dp,4.5261314955_dp,7.7923613317_dp,13.5878673870_dp,24.1151440977_dp,43.7015244540_dp,& + 81.1110277037_dp,154.7061920184_dp,304.4880688618_dp,621.6490505745_dp,1325.6482610671_dp,2980.6219613941_dp,7161.8389722969_dp,18770.6868607551_dp,55530.0093352317_dp,& + 198106.2027454207_dp,1011151.4363131844_dp,0.4824699375_dp,0.6044797423_dp,0.8903993119_dp,1.4383537855_dp,2.4418905796_dp,4.2747928499_dp,7.6668029553_dp,& + 14.0737977482_dp,26.4818471532_dp,51.2182598778_dp,102.2051146882_dp,211.4467869967_dp,456.4084213622_dp,1036.5472513717_dp,2505.9293668235_dp,6559.1442235077_dp,& + 19083.5104881533_dp,64570.1582319044_dp,278327.6560799017_dp,1971462.0517839019_dp] + aw%aw_erange_matrix(:,39) = [0.2367095486_dp,0.7696799444_dp,1.5018761682_dp,2.6414095143_dp,4.5384812877_dp,7.8192485816_dp,13.6458809992_dp,24.2403057633_dp,43.9736166609_dp,& + 81.7112244189_dp,156.0587389971_dp,307.6242756745_dp,629.1931118456_dp,1344.6642439415_dp,3031.5179204175_dp,7309.2032431469_dp,19245.6104053433_dp,57318.3302885437_dp,& + 206780.8472123449_dp,1081955.9030865165_dp,0.4830146984_dp,0.6054499197_dp,0.8924769416_dp,1.4428683492_dp,2.4515956228_dp,4.2955476337_dp,7.7113346404_dp,& + 14.1703631996_dp,26.6948129146_dp,51.6988123571_dp,103.3216424614_dp,214.1373371973_dp,463.1924064512_dp,1054.6496457913_dp,2557.8478071162_dp,6722.8307602149_dp,& + 19671.1937760559_dp,67126.1132235567_dp,293647.8995180877_dp,2154156.0464118524_dp] + aw%aw_erange_matrix(:,40) = [0.2367095349_dp,0.7696798865_dp,1.5018760060_dp,2.6414091090_dp,4.5384803880_dp,7.8192469055_dp,13.6458785809_dp,24.2403033433_dp,43.9736154891_dp,& + 81.7112237157_dp,156.0587358919_dp,307.6242853845_dp,629.1931876082_dp,1344.6644722167_dp,3031.5183208785_dp,7309.2050560073_dp,19245.6245161903_dp,57318.4221315288_dp,& + 206781.1357473792_dp,1081957.0745627352_dp,0.4830146683_dp,0.6054498545_dp,0.8924767853_dp,1.4428679989_dp,2.4515949740_dp,4.2955467799_dp,7.7113341374_dp,& + 14.1703638145_dp,26.6948145327_dp,51.6988107401_dp,103.3216426489_dp,214.1373680273_dp,463.1925209623_dp,1054.6498000269_dp,2557.8481281643_dp,6722.8344505458_dp,& + 19671.2220756444_dp,67126.2577886249_dp,293648.2400787623_dp,2154159.1938336445_dp] + aw%aw_erange_matrix(:,41) = [0.2367095541_dp,0.7696799621_dp,1.5018762083_dp,2.6414096107_dp,4.5384815233_dp,7.8192491231_dp,13.6458822537_dp,24.2403086901_dp,43.9736233707_dp,& + 81.7112406038_dp,156.0587780238_dp,307.6243783226_dp,629.1933873974_dp,1344.6649288229_dp,3031.5198680274_dp,7309.2110293459_dp,19245.6405004830_dp,57318.4440887523_dp,& + 206781.2190072980_dp,1081956.3896388158_dp,0.4830147094_dp,0.6054499345_dp,0.8924769754_dp,1.4428684363_dp,2.4515958270_dp,4.2955480752_dp,7.7113357241_dp,& + 14.1703656022_dp,26.6948186934_dp,51.6988265456_dp,103.3216780396_dp,214.1374401511_dp,463.1926703671_dp,1054.6502565123_dp,2557.8502733234_dp,6722.8416355782_dp,& + 19671.2347474855_dp,67126.2610550484_dp,293648.2839700870_dp,2154156.9017522712_dp] + + case(22) + aw%energy_range(:) = [300.0000_dp,400.0000_dp,500.0000_dp,600.0000_dp,700.0000_dp,800.0000_dp,900.0000_dp,1000.0000_dp,2000.0000_dp,& + 3000.0000_dp,4000.0000_dp,5000.0000_dp,6000.0000_dp,7000.0000_dp,8000.0000_dp,9000.0000_dp,10000.0000_dp,20000.0000_dp,& + 30000.0000_dp,40000.0000_dp,50000.0000_dp,60000.0000_dp,70000.0000_dp,80000.0000_dp,90000.0000_dp,100000.0000_dp,200000.0000_dp,& + 300000.0000_dp,400000.0000_dp,500000.0000_dp,600000.0000_dp,700000.0000_dp,900000.0000_dp,1000000.0000_dp,2000000.0000_dp,3000000.0000_dp,& + 4000000.0000_dp,8000000.0000_dp,10000000.0000_dp,20000000.0000_dp] + aw%aw_erange_matrix(:,1) = [0.1441170079_dp,0.4451145641_dp,0.7857939550_dp,1.1973661610_dp,1.7186472507_dp,2.4001934207_dp,3.3098070861_dp,4.5401370249_dp,6.2193688435_dp,& + 8.5264401723_dp,11.7129087711_dp,16.1347214090_dp,22.2990405865_dp,30.9348424021_dp,43.1034312355_dp,60.3826338002_dp,85.2055156575_dp,121.5752734763_dp,& + 176.8552726753_dp,267.2687084529_dp,440.3633877802_dp,933.5558599550_dp,0.2903383428_dp,0.3160954628_dp,0.3704109236_dp,0.4591352090_dp,0.5917629166_dp,& + 0.7825054649_dp,1.0519884735_dp,1.4297869951_dp,1.9581425612_dp,2.6974086133_dp,3.7340920396_dp,5.1929188031_dp,7.2554447161_dp,10.1901370325_dp,& + 14.4047979662_dp,20.5484937206_dp,29.7390957561_dp,44.1549395243_dp,68.8480988193_dp,118.5837954971_dp,253.9501486803_dp,970.2789416090_dp] + aw%aw_erange_matrix(:,2) = [0.1474105568_dp,0.4559130086_dp,0.8070286742_dp,1.2345389542_dp,1.7808470248_dp,2.5017389105_dp,3.4727994837_dp,4.7983711562_dp,6.6242944473_dp,& + 9.1562340866_dp,12.6862864221_dp,17.6319936874_dp,24.5942916675_dp,34.4452843471_dp,48.4656274751_dp,68.5719674822_dp,97.7297737183_dp,140.8119314461_dp,& + 206.7281558429_dp,314.9556889586_dp,522.2764283993_dp,1111.8020434921_dp,0.2970754887_dp,0.3246975236_dp,0.3831023542_dp,0.4789076184_dp,0.6229013216_dp,& + 0.8313334849_dp,1.1279698914_dp,1.5471809908_dp,2.1385090603_dp,2.9734175546_dp,4.1553361018_dp,5.8348147393_dp,8.2329276737_dp,11.6789033110_dp,& + 16.6748494761_dp,24.0192841580_dp,35.0782737284_dp,52.4847352813_dp,82.2838180992_dp,142.0622184717_dp,303.9925224140_dp,1158.6905294384_dp] + aw%aw_erange_matrix(:,3) = [0.1509114548_dp,0.4674397882_dp,0.8298629576_dp,1.2748765694_dp,1.8490035523_dp,2.6141134833_dp,3.6549567374_dp,5.0898154801_dp,7.0858322045_dp,& + 9.8813161595_dp,13.8184986598_dp,19.3920793856_dp,27.3220131651_dp,38.6645168307_dp,54.9862100984_dp,78.6510794212_dp,113.3349529261_dp,165.0780268890_dp,& + 244.8627444176_dp,376.4911344565_dp,628.9041822634_dp,1345.1582530811_dp,0.3042445363_dp,0.3339492071_dp,0.3969424873_dp,0.5007484871_dp,0.6576940599_dp,& + 0.8864769553_dp,1.2146730855_dp,1.6825377112_dp,2.3486802916_dp,3.2985363257_dp,4.6570969536_dp,6.6082616541_dp,9.4248453780_dp,13.5167161989_dp,& + 19.5126964524_dp,28.4139492475_dp,41.9238890770_dp,63.2887057983_dp,99.8733667932_dp,172.9695531491_dp,369.9196209268_dp,1406.2736900862_dp] + aw%aw_erange_matrix(:,4) = [0.1536955769_dp,0.4766431857_dp,0.8482212221_dp,1.3075836427_dp,1.9047706222_dp,2.7069072191_dp,3.8067527379_dp,5.3349075831_dp,7.4775506122_dp,& + 10.5024969217_dp,14.7978220987_dp,20.9296285029_dp,29.7293786467_dp,42.4279775826_dp,60.8668544973_dp,87.8452195912_dp,127.7374606155_dp,187.7396398310_dp,& + 280.8870352463_dp,435.2340572550_dp,731.5679695302_dp,1571.1092032473_dp,0.3099516325_dp,0.3413883875_dp,0.4082149191_dp,0.5187488871_dp,0.6866731163_dp,& + 0.9328608381_dp,1.2883077496_dp,1.7986072367_dp,2.5306860309_dp,3.5829468654_dp,5.1006370721_dp,7.2993849475_dp,10.5018746881_dp,15.1967144192_dp,& + 22.1379816124_dp,32.5291277259_dp,48.4117813933_dp,73.6440274365_dp,116.8901378887_dp,203.0436360961_dp,434.1404306477_dp,1646.8793814655_dp] + aw%aw_erange_matrix(:,5) = [0.1558744528_dp,0.4838689714_dp,0.8627147674_dp,1.3335806630_dp,1.9494171648_dp,2.7817388039_dp,3.9300549891_dp,5.5354412574_dp,7.8004098099_dp,& + 11.0183226847_dp,15.6173196140_dp,22.2265048555_dp,31.7767107976_dp,45.6561173235_dp,65.9561614006_dp,95.8760736092_dp,140.4382319943_dp,207.9178440912_dp,& + 313.2691722510_dp,488.5011213669_dp,825.3330516836_dp,1778.4598955036_dp,0.3144217358_dp,0.3472620250_dp,0.4172059508_dp,0.5332404256_dp,0.7101979337_dp,& + 0.9708090378_dp,1.3490122248_dp,1.8950335727_dp,2.6830828484_dp,3.8230245213_dp,5.4781864563_dp,7.8928076393_dp,11.4350158276_dp,16.6659401779_dp,& + 24.4562148221_dp,36.1991864700_dp,54.2555265945_dp,83.0592301482_dp,132.4851645401_dp,230.7461798524_dp,493.3677623531_dp,1868.3614859391_dp] + aw%aw_erange_matrix(:,6) = [0.1577420296_dp,0.4900788355_dp,0.8752275409_dp,1.3561497684_dp,1.9884059014_dp,2.8474770181_dp,4.0390177175_dp,5.7137100310_dp,8.0891555723_dp,& + 11.4824948537_dp,16.3594459705_dp,23.4086773838_dp,33.6557463687_dp,48.6400404477_dp,70.6954704396_dp,103.4126190545_dp,152.4529012532_dp,227.1621219673_dp,& + 344.4017643056_dp,540.0960501577_dp,916.7176409366_dp,1981.3800393377_dp,0.3182558030_dp,0.3523332401_dp,0.4250332577_dp,0.5459520475_dp,0.7309733738_dp,& + 1.0045360104_dp,1.4033026897_dp,1.9818183126_dp,2.8211326611_dp,4.0419585198_dp,5.8248758088_dp,8.4416547480_dp,12.3045371057_dp,18.0456850793_dp,& + 26.6509067698_dp,39.7026540781_dp,59.8808816713_dp,92.1955098840_dp,147.7226935005_dp,257.9376341497_dp,551.5733506510_dp,2085.6903898363_dp] + aw%aw_erange_matrix(:,7) = [0.1595766639_dp,0.4961941481_dp,0.8876018082_dp,1.3785833858_dp,2.0273709206_dp,2.9135345279_dp,4.1491070977_dp,5.8948089586_dp,8.3841166359_dp,& + 11.9593604585_dp,17.1263515456_dp,24.6377784386_dp,35.6217919538_dp,51.7828553129_dp,75.7217693626_dp,111.4634347167_dp,165.3839526969_dp,248.0336779114_dp,& + 378.4248655535_dp,596.8834139329_dp,1017.8967204650_dp,2206.9416060218_dp,0.3220246206_dp,0.3573485404_dp,0.4328331959_dp,0.5587069224_dp,0.7519487226_dp,& + 1.0387865473_dp,1.4587538002_dp,2.0709759914_dp,2.9638074450_dp,4.2696295778_dp,6.1877188747_dp,9.0199170047_dp,13.2270451038_dp,19.5201486658_dp,& + 29.0140129036_dp,43.5044754869_dp,66.0336664421_dp,102.2649561638_dp,164.6285305303_dp,288.2428905701_dp,616.5303843661_dp,2327.8897713507_dp] + aw%aw_erange_matrix(:,8) = [0.1607758370_dp,0.5001994629_dp,0.8957348627_dp,1.3933903711_dp,2.0532041805_dp,2.9575267169_dp,4.2227520566_dp,6.0165023287_dp,8.5832297537_dp,& + 12.2827798171_dp,17.6490051764_dp,25.4796436320_dp,36.9754961105_dp,53.9586928177_dp,79.2215722409_dp,117.1028760760_dp,174.4985213677_dp,262.8395830695_dp,& + 402.7145263321_dp,637.6680025120_dp,1090.9284951990_dp,2370.3030519817_dp,0.3244893294_dp,0.3606449683_dp,0.4379919839_dp,0.5671906911_dp,0.7659710933_dp,& + 1.0617934070_dp,1.4961780450_dp,2.1314381034_dp,3.0610397916_dp,4.4255789634_dp,6.4375758500_dp,9.4203116621_dp,13.8694767492_dp,20.5531330096_dp,& + 30.6799434891_dp,46.2020717059_dp,70.4282404222_dp,109.5032207396_dp,176.8498238540_dp,310.2367273619_dp,663.7309286332_dp,2503.6840921749_dp] + aw%aw_erange_matrix(:,9) = [0.1702949317_dp,0.5322291046_dp,0.9615962494_dp,1.5151290039_dp,2.2690279176_dp,3.3310549033_dp,4.8582988517_dp,7.0841296034_dp,10.3597776853_dp,& + 15.2192192939_dp,22.4814415016_dp,33.4131871038_dp,49.9905945622_dp,75.3247673562_dp,114.3645047607_dp,175.0835271486_dp,270.5694444089_dp,423.0035691868_dp,& + 672.4894120225_dp,1102.2467053651_dp,1941.0601164726_dp,4300.3213909263_dp,0.3440915125_dp,0.3873401394_dp,0.4807065242_dp,0.6388630857_dp,0.8866070222_dp,& + 1.2631916428_dp,1.8295180866_dp,2.6796325717_dp,3.9590078574_dp,5.8937480925_dp,8.8376065366_dp,13.3484020449_dp,20.3136743061_dp,31.1605701810_dp,& + 48.2150157017_dp,75.3433791336_dp,119.1971624550_dp,192.0205174951_dp,319.6439631329_dp,571.9142828487_dp,1229.1457147735_dp,4600.6335286739_dp] + aw%aw_erange_matrix(:,10) = [0.1751737113_dp,0.5488134918_dp,0.9962897074_dp,1.5805812543_dp,2.3875698497_dp,3.5406582649_dp,5.2226560654_dp,7.7095997631_dp,11.4238934505_dp,& + 17.0188181974_dp,25.5143694717_dp,38.5178939127_dp,58.5863953296_dp,89.8287076831_dp,138.9210470214_dp,216.8546735931_dp,342.0459845127_dp,546.2432659295_dp,& + 887.3346565379_dp,1484.7821847441_dp,2661.6442082050_dp,5969.3805448616_dp,0.3541646554_dp,0.4014009373_dp,0.5038786064_dp,0.6787816639_dp,0.9554085499_dp,& + 1.3806897245_dp,2.0284537527_dp,3.0144712625_dp,4.5208083482_dp,6.8354919016_dp,10.4176848007_dp,16.0058837975_dp,24.7997029446_dp,38.7698494521_dp,& + 61.1977786202_dp,97.6480183184_dp,157.8383419143_dp,259.7304550554_dp,440.7316633955_dp,799.5695689941_dp,1726.6346830857_dp,6437.6178577764_dp] + aw%aw_erange_matrix(:,11) = [0.1786605245_dp,0.5607391016_dp,1.0214944059_dp,1.6287106244_dp,2.4758421281_dp,3.6987251620_dp,5.5009421394_dp,8.1935410949_dp,12.2582875674_dp,& + 18.4496574426_dp,27.9611671890_dp,42.6996718386_dp,65.7430067681_dp,102.1132676984_dp,160.1028425852_dp,253.5924066567_dp,406.2255798146_dp,659.3610703780_dp,& + 1089.1052916976_dp,1852.3179473042_dp,3368.2046865402_dp,7629.7200789319_dp,0.3613752591_dp,0.4116146059_dp,0.5210026545_dp,0.7087356034_dp,1.0077570304_dp,& + 1.4712983380_dp,2.1839573403_dp,3.2798930404_dp,4.9726725077_dp,7.6045852128_dp,11.7289136623_dp,18.2487103549_dp,28.6538458757_dp,45.4319734700_dp,& + 72.7949838902_dp,118.0021317674_dp,193.9061669689_dp,324.4297576502_dp,559.1145859642_dp,1026.4106597221_dp,2227.1693511420_dp,8282.0067772426_dp] + aw%aw_erange_matrix(:,12) = [0.1813450973_dp,0.5699633994_dp,1.0411401995_dp,1.6665645720_dp,2.5459211440_dp,3.8253991316_dp,5.7260836687_dp,8.5888766643_dp,12.9467842565_dp,& + 19.6427530017_dp,30.0240408832_dp,46.2666324055_dp,71.9233970381_dp,112.8627012275_dp,178.9001052545_dp,286.6890467935_dp,464.9859737318_dp,764.7335015874_dp,& + 1280.5197283134_dp,2207.4752523151_dp,4062.5186031124_dp,9281.1213264381_dp,0.3669335038_dp,0.4195744584_dp,0.5345185794_dp,0.7326456820_dp,1.0499742563_dp,& + 1.5451051803_dp,2.3119173440_dp,3.5006092308_dp,5.3525783932_dp,8.2587061985_dp,12.8577717274_dp,20.2045879871_dp,32.0610577862_dp,51.4077134976_dp,& + 83.3599685472_dp,136.8550046716_dp,227.9113435888_dp,386.5773340372_dp,674.9690116950_dp,1252.0133781118_dp,2729.4415777034_dp,10130.7415306161_dp] + aw%aw_erange_matrix(:,13) = [0.1833338883_dp,0.5768212745_dp,1.0558321359_dp,1.6950684509_dp,2.5990673867_dp,3.9221558102_dp,5.8993011088_dp,8.8953008809_dp,13.4845628578_dp,& + 20.5822211246_dp,31.6622793027_dp,49.1250261247_dp,76.9238552397_dp,121.6495322931_dp,194.4351535622_dp,314.3668670048_dp,514.7553317662_dp,855.2146140510_dp,& + 1447.2985333385_dp,2521.5749798449_dp,4685.0915653480_dp,10776.8769976891_dp,0.3710549661_dp,0.4255263433_dp,0.5447226473_dp,0.7508512219_dp,1.0823705115_dp,& + 1.6021755303_dp,2.4116319975_dp,3.6739975702_dp,5.6535533366_dp,8.7815543992_dp,13.7686065252_dp,21.7985240141_dp,34.8673581133_dp,56.3856031945_dp,& + 92.2682670682_dp,152.9604066795_dp,257.3711559175_dp,441.2259101090_dp,778.3984647651_dp,1456.1530645300_dp,3187.5508156520_dp,11816.0652107334_dp] + aw%aw_erange_matrix(:,14) = [0.1846993927_dp,0.5815420244_dp,1.0659886574_dp,1.7148709205_dp,2.6361792700_dp,3.9900699229_dp,6.0215196900_dp,9.1126696936_dp,13.8681827815_dp,& + 21.2563233179_dp,32.8450833612_dp,51.2024131733_dp,80.5836340585_dp,128.1290319014_dp,205.9837254840_dp,335.1221389073_dp,552.4298912987_dp,924.4085445080_dp,& + 1576.2391837470_dp,2767.1649646297_dp,5177.0285760558_dp,11968.0101921659_dp,0.3738866518_dp,0.4296404103_dp,0.5518247314_dp,0.7635998287_dp,1.1051835638_dp,& + 1.6425850104_dp,2.4826334701_dp,3.7981811199_dp,5.8704424825_dp,9.1607763090_dp,14.4337771750_dp,22.9710593563_dp,36.9478243061_dp,60.1067835636_dp,& + 98.9873310955_dp,165.2254581116_dp,280.0407946667_dp,483.7490844027_dp,859.8059192899_dp,1618.5092634315_dp,3554.2352326421_dp,13164.8584113213_dp] + aw%aw_erange_matrix(:,15) = [0.1863159286_dp,0.5871435638_dp,1.0780861353_dp,1.7385623737_dp,2.6807832835_dp,4.0720717291_dp,6.1697823293_dp,9.3776312873_dp,14.3381504702_dp,& + 22.0865346935_dp,34.3099852655_dp,53.7906461618_dp,85.1725466571_dp,136.3093079270_dp,220.6715201873_dp,361.7306746046_dp,601.1493487618_dp,1014.7342015612_dp,& + 1746.2754646089_dp,3094.4730042350_dp,5839.2462359963_dp,13583.4717321030_dp,0.3772409197_dp,0.4345401521_dp,0.5603352643_dp,0.7789597942_dp,1.1328071284_dp,& + 1.6917566707_dp,2.5694667575_dp,3.9508550874_dp,6.1385688770_dp,9.6323320726_dp,15.2660503121_dp,24.4478778325_dp,39.5867564818_dp,64.8627666955_dp,& + 107.6453534898_dp,181.1704182944_dp,309.7963420236_dp,540.1439781093_dp,968.9375786961_dp,1838.3380293709_dp,4053.8917273431_dp,15002.9058091478_dp] + aw%aw_erange_matrix(:,16) = [0.1874491096_dp,0.5910786161_dp,1.0866144797_dp,1.7553323939_dp,2.7124897315_dp,4.1306103807_dp,6.2760804391_dp,9.5684449515_dp,14.6781771453_dp,& + 22.6901511739_dp,35.3806113482_dp,55.6927681520_dp,88.5650444889_dp,142.3954823450_dp,231.6746888189_dp,381.8130740649_dp,638.2186219844_dp,1084.0696401078_dp,& + 1878.0508173881_dp,3350.6845228755_dp,6362.5940066825_dp,14869.3790003703_dp,0.3795935452_dp,0.4379939369_dp,0.5663682251_dp,0.7899025747_dp,1.1525774075_dp,& + 1.7271089569_dp,2.6321873130_dp,4.0616703072_dp,6.3341813840_dp,9.9782253786_dp,15.8800577265_dp,25.5440999260_dp,41.5585006333_dp,68.4414805289_dp,& + 114.2100287782_dp,193.3604391435_dp,332.7498029047_dp,584.0715532503_dp,1054.8129830325_dp,2012.9829311354_dp,4453.3508278722_dp,16472.7282706270_dp] + aw%aw_erange_matrix(:,17) = [0.1885601309_dp,0.5949435551_dp,1.0950152212_dp,1.7719071153_dp,2.7439358430_dp,4.1888715677_dp,6.3822508125_dp,9.7597284816_dp,15.0203489378_dp,& + 23.3000361001_dp,36.4670111742_dp,57.6317844147_dp,92.0403898602_dp,148.6633790991_dp,243.0714308414_dp,402.7434914100_dp,677.1160380394_dp,1157.3658398981_dp,& + 2018.4815769762_dp,3626.0594871088_dp,6929.7141747184_dp,16271.5410347054_dp,0.3819012251_dp,0.4413957194_dp,0.5723379721_dp,0.8007750327_dp,1.1722948409_dp,& + 1.7624982958_dp,2.6952142291_dp,4.1734732902_dp,6.5323723645_dp,10.3302491537_dp,16.5079275583_dp,26.6707828007_dp,43.5961111463_dp,72.1615147521_dp,& + 121.0774167617_dp,206.2009442956_dp,357.1109028044_dp,631.0761653313_dp,1147.5021742117_dp,2203.0459385795_dp,4890.5029612894_dp,18081.8150431117_dp] + aw%aw_erange_matrix(:,18) = [0.1949721439_dp,0.6173833608_dp,1.1442706687_dp,1.8701975876_dp,2.9326176744_dp,4.5426256257_dp,7.0347798366_dp,10.9502950579_dp,17.1785341300_dp,& + 27.2014489279_dp,43.5223948903_dp,70.4304089244_dp,115.3855662997_dp,191.5763875326_dp,322.7363825403_dp,552.4214919992_dp,962.3597980213_dp,1710.0488185397_dp,& + 3110.5415198588_dp,5840.0703282200_dp,11642.5774305799_dp,28229.4187113292_dp,0.3952402409_dp,0.4613337535_dp,0.6078754830_dp,0.8663943938_dp,1.2928300232_dp,& + 1.9816150738_dp,3.0906376694_dp,4.8847277598_dp,7.8119316436_dp,12.6390187248_dp,20.6958382995_dp,34.3232956305_dp,57.7096225293_dp,98.4829095756_dp,& + 170.8120264454_dp,301.6028591803_dp,543.2970597500_dp,1001.7216600548_dp,1903.5448151789_dp,3806.3180661427_dp,8669.3134062261_dp,32033.8629627412_dp] + aw%aw_erange_matrix(:,19) = [0.1989936579_dp,0.6315770411_dp,1.1758570143_dp,1.9342303779_dp,3.0575467110_dp,4.7807182690_dp,7.4813737603_dp,11.7794206688_dp,18.7093013688_dp,& + 30.0230402179_dp,48.7323254479_dp,80.0951812638_dp,133.4456756804_dp,225.6565231393_dp,387.8397394358_dp,678.6406164985_dp,1211.3802849063_dp,2211.4874488749_dp,& + 4144.7367834599_dp,8037.5098416462_dp,16548.4305196300_dp,41164.1260029741_dp,0.4036247252_dp,0.4741118580_dp,0.6311438163_dp,0.9101749351_dp,1.3746722656_dp,& + 2.1330207366_dp,3.3688668648_dp,5.3948238511_dp,8.7483618785_dp,14.3654969511_dp,23.9006459132_dp,40.3265272169_dp,69.0821489178_dp,120.3188199799_dp,& + 213.4039721814_dp,386.2091970505_dp,714.9239674599_dp,1358.3716125206_dp,2666.1544529873_dp,5503.7069646357_dp,12825.2482547198_dp,47498.4176536332_dp] + aw%aw_erange_matrix(:,20) = [0.2012398251_dp,0.6395460651_dp,1.1937403319_dp,1.9708322316_dp,3.1296625400_dp,4.9195321781_dp,7.7444221494_dp,12.2730231350_dp,19.6309633750_dp,& + 31.7425193808_dp,51.9487229388_dp,86.1461083728_dp,144.9264642124_dp,247.6850987875_dp,430.6983554712_dp,763.4326099256_dp,1382.4880756646_dp,2564.8940904068_dp,& + 4894.8478751235_dp,9683.4857210923_dp,20349.8357700459_dp,51476.5126403194_dp,0.4083141186_dp,0.4813434144_dp,0.6444825088_dp,0.9355576386_dp,1.4226280417_dp,& + 2.2226888379_dp,3.5354855195_dp,5.7039073132_dp,9.3229230420_dp,15.4391028073_dp,25.9225083298_dp,44.1734243794_dp,76.4943715915_dp,134.8171272371_dp,& + 242.2667924135_dp,444.8560814685_dp,836.9407376956_dp,1619.2611464210_dp,3242.1602051841_dp,6830.5350237777_dp,16170.9299807350_dp,60052.6640642910_dp] + aw%aw_erange_matrix(:,21) = [0.2031013903_dp,0.6461734099_dp,1.2086954079_dp,2.0016344619_dp,3.1907461078_dp,5.0378865217_dp,7.9702265965_dp,12.6997643083_dp,20.4338313337_dp,& + 33.2525770312_dp,54.7982458408_dp,91.5581069943_dp,155.3022643479_dp,267.8221547321_dp,470.3748416022_dp,843.0417524393_dp,1545.6991555430_dp,2908.1006079514_dp,& + 5638.4548607852_dp,11354.0307723722_dp,24307.6261873841_dp,62454.1953729316_dp,0.4122040611_dp,0.4873890311_dp,0.6557280892_dp,0.9571166377_dp,1.4636458120_dp,& + 2.2999290014_dp,3.6800777992_dp,5.9742484168_dp,9.8297094546_dp,16.3946685455_dp,27.7397415678_dp,47.6678799194_dp,83.3060772782_dp,148.3119784438_dp,& + 269.5146984226_dp,501.1037686841_dp,956.0713638982_dp,1879.2062241708_dp,3829.5600216847_dp,8218.7718324805_dp,19754.2291589833_dp,73606.6628531452_dp] + aw%aw_erange_matrix(:,22) = [0.2044706274_dp,0.6510614115_dp,1.2197740916_dp,2.0245667788_dp,3.2364565258_dp,5.1269163503_dp,8.1409989236_dp,13.0243295830_dp,21.0481499450_dp,& + 34.4155005946_dp,57.0081317402_dp,95.7873860342_dp,163.4785724775_dp,283.8372264599_dp,502.2535952563_dp,907.7398648202_dp,1680.0621771135_dp,3194.8362150066_dp,& + 6270.3626608683_dp,12801.8342624381_dp,27813.0700007564_dp,72367.8368479170_dp,0.4150672770_dp,0.4918664757_dp,0.6641121553_dp,0.9732840170_dp,1.4945761136_dp,& + 2.3585007678_dp,3.7903687893_dp,6.1817486925_dp,10.2213048087_dp,17.1383810531_dp,29.1651807511_dp,50.4323715012_dp,88.7453993863_dp,159.1994923049_dp,& + 291.7511186854_dp,547.5995278200_dp,1055.9921467960_dp,2100.9062518821_dp,4340.2867613719_dp,9452.2928804385_dp,23004.4310131155_dp,85998.7587267308_dp] + aw%aw_erange_matrix(:,23) = [0.2056339913_dp,0.6552234254_dp,1.2292398492_dp,2.0442370789_dp,3.2758225079_dp,5.2039030315_dp,8.2892965859_dp,13.3074393893_dp,21.5865610271_dp,& + 35.4399702397_dp,58.9657788358_dp,99.5567529494_dp,170.8145030769_dp,298.3125292928_dp,531.3048638729_dp,967.2458165086_dp,1804.9420001729_dp,3464.5536118564_dp,& + 6873.1194736988_dp,14205.5621734136_dp,31274.7335599056_dp,82323.4357501457_dp,0.4175013571_dp,0.4956912645_dp,0.6713113061_dp,0.9872300013_dp,1.5213724870_dp,& + 2.4094684040_dp,3.8867869924_dp,6.3640474403_dp,10.5671697265_dp,17.7990155080_dp,30.4392843147_dp,52.9201923354_dp,93.6770014619_dp,169.1526099203_dp,& + 312.2675177799_dp,590.9469880749_dp,1150.2563016995_dp,2312.9292394903_dp,4836.5436768091_dp,10672.8741971187_dp,26278.5272782612_dp,98576.8398088366_dp] + aw%aw_erange_matrix(:,24) = [0.2069775040_dp,0.6600403189_dp,1.2402327852_dp,2.0671701032_dp,3.3219021337_dp,5.2943872625_dp,8.4643316662_dp,13.6430845236_dp,22.2279304584_dp,& + 36.6666360357_dp,61.3229363072_dp,104.1231900943_dp,179.7617000289_dp,316.0993748034_dp,567.3008660624_dp,1041.6720817014_dp,1962.8128315737_dp,3809.7592672350_dp,& + 7655.8017849026_dp,16059.6754897271_dp,35937.1573256609_dp,95979.7168344628_dp,0.4203139414_dp,0.5001321869_dp,0.6797133590_dp,1.0035802839_dp,1.5529244825_dp,& + 2.4697458496_dp,4.0013459453_dp,6.5817175578_dp,10.9823423117_dp,18.5966034510_dp,31.9871611128_dp,55.9633339786_dp,99.7550714105_dp,181.5226720347_dp,& + 338.0059839916_dp,645.9068723725_dp,1271.2310300312_dp,2588.8867103792_dp,5493.2080250041_dp,12319.3081132178_dp,30781.7220454709_dp,116032.3361356684_dp] + aw%aw_erange_matrix(:,25) = [0.2077600768_dp,0.6628512249_dp,1.2466664953_dp,2.0806362775_dp,3.3490518982_dp,5.3478846618_dp,8.5681905110_dp,13.8429992394_dp,22.6114911707_dp,& + 37.4034452225_dp,62.7455533529_dp,106.8936002490_dp,185.2211900665_dp,327.0222518995_dp,589.5644501511_dp,1088.0778452197_dp,2062.1588170631_dp,4029.3210732029_dp,& + 8159.8868646223_dp,17271.7242812273_dp,39038.0060180248_dp,105212.7558571776_dp,0.4219530067_dp,0.5027307873_dp,0.6846512915_dp,1.0132264590_dp,1.5716075243_dp,& + 2.5055718323_dp,4.0697026631_dp,6.7121470095_dp,11.2322439839_dp,19.0790457755_dp,32.9284400592_dp,57.8247358066_dp,103.4968820433_dp,189.1927368246_dp,& + 354.0939232709_dp,680.5742458585_dp,1348.3404179074_dp,2766.9321874856_dp,5923.0003828403_dp,13415.2124592168_dp,33832.0226596393_dp,127958.1253110201_dp] + aw%aw_erange_matrix(:,26) = [0.2081933907_dp,0.6644092995_dp,1.2502387307_dp,2.0881274955_dp,3.3641848468_dp,5.3777628442_dp,8.6263151792_dp,13.9551256504_dp,22.8271222335_dp,& + 37.8187145077_dp,63.5495604636_dp,108.4640724552_dp,188.3263905304_dp,333.2579881587_dp,602.3274434799_dp,1114.8061969430_dp,2119.6881360598_dp,4157.2632433470_dp,& + 8455.8029227834_dp,17989.5483700177_dp,40893.5201427240_dp,110793.3937650666_dp,0.4228608173_dp,0.5041734701_dp,0.6873996295_dp,1.0186071731_dp,1.5820510036_dp,& + 2.5256408657_dp,4.1080813740_dp,6.7855534851_dp,11.3732572424_dp,19.3520470382_dp,33.4627328234_dp,58.8849027429_dp,105.6360383871_dp,193.5959479043_dp,& + 363.3729426820_dp,700.6757280481_dp,1393.3257585172_dp,2871.5488135792_dp,6177.6869430943_dp,14071.1666852181_dp,35677.2966879028_dp,135212.4893551906_dp] + aw%aw_erange_matrix(:,27) = [0.2126896792_dp,0.6806463088_dp,1.2877207566_dp,2.1673388521_dp,3.5254761417_dp,5.6988175431_dp,9.2562253644_dp,15.1813044173_dp,25.2082899090_dp,& + 42.4533225674_dp,72.6275529540_dp,126.4250934438_dp,224.3499352542_dp,406.7658702139_dp,755.5306376950_dp,1442.3710717637_dp,2841.9040752803_dp,5809.6717047741_dp,& + 12410.4327513260_dp,27993.7566576718_dp,68112.6855855200_dp,197105.0711734123_dp,0.4322912965_dp,0.5193038647_dp,0.7165165519_dp,1.0761259374_dp,1.6946552790_dp,& + 2.7439544295_dp,4.5295089336_dp,7.5997918750_dp,12.9546020382_dp,22.4502390722_dp,39.6060527282_dp,71.2522576889_dp,130.9956580492_dp,246.7504440960_dp,& + 477.7177064352_dp,954.3214052744_dp,1976.8634044630_dp,4273.8859897270_dp,9730.3487791900_dp,23679.3321160828_dp,64242.9910056185_dp,251314.2383457562_dp] + aw%aw_erange_matrix(:,28) = [0.2148506623_dp,0.6884960952_dp,1.3060105620_dp,2.2063965034_dp,3.6058618945_dp,5.8605887338_dp,9.5772645824_dp,15.8138619829_dp,26.4528236083_dp,& + 44.9102492173_dp,77.5153928277_dp,136.2629278459_dp,244.4603760083_dp,448.6865704893_dp,845.0327763266_dp,1639.0867126265_dp,3289.7162486028_dp,6873.6362626559_dp,& + 15075.1917476659_dp,35124.4234356608_dp,88918.3748025578_dp,268262.3870982124_dp,0.4368306957_dp,0.5266819660_dp,0.7309096004_dp,1.1049021959_dp,1.7516438527_dp,& + 2.8557587918_dp,4.7480597843_dp,8.0277823096_dp,13.7980148178_dp,24.1290973780_dp,42.9934113931_dp,78.2036161505_dp,145.5571962110_dp,278.0120655497_dp,& + 546.8198535035_dp,1112.4669786357_dp,2354.1730370757_dp,5220.6504649706_dp,12258.1003979030_dp,30975.0629494139_dp,87667.7472601300_dp,351779.6569114250_dp] + aw%aw_erange_matrix(:,29) = [0.2162960739_dp,0.6937634781_dp,1.3183457165_dp,2.2328880527_dp,3.6607039037_dp,5.9716175520_dp,9.7989909978_dp,16.2536756436_dp,27.3244349773_dp,& + 46.6446372977_dp,80.9960047169_dp,143.3364569524_dp,259.0772035160_dp,479.5297940043_dp,911.8075091408_dp,1788.2313178298_dp,3635.7123210357_dp,7714.5068495501_dp,& + 17240.5593049632_dp,41126.8844351203_dp,107256.8315932670_dp,334468.4142116168_dp,0.4398695068_dp,0.5316560297_dp,0.7406846089_dp,1.1245732962_dp,1.7908465995_dp,& + 2.9331717561_dp,4.9004358219_dp,8.3284198219_dp,14.3952910496_dp,25.3286146616_dp,45.4374254892_dp,83.2738985787_dp,156.3084281805_dp,301.4138423068_dp,& + 599.3712464305_dp,1234.9595130365_dp,2652.8146881089_dp,5989.8447382865_dp,14379.3880386348_dp,37357.2157063584_dp,109268.7175994240_dp,448590.5277955089_dp] + aw%aw_erange_matrix(:,30) = [0.2175489615_dp,0.6983403824_dp,1.3291049343_dp,2.2560941408_dp,3.7089561760_dp,6.0697478824_dp,9.9958909398_dp,16.6462313546_dp,28.1066854919_dp,& + 48.2106183031_dp,84.1596278834_dp,149.8135414594_dp,272.5731644807_dp,508.2772508988_dp,974.7206949381_dp,1930.5269348597_dp,3970.7603418492_dp,8543.5263891771_dp,& + 19423.6436846440_dp,47355.7019649240_dp,127040.1189612220_dp,409445.8705308242_dp,0.4425052341_dp,0.5359932906_dp,0.7492554445_dp,1.1419058702_dp,1.8255532742_dp,& + 3.0020442357_dp,5.0367139881_dp,8.5988243515_dp,14.9358296058_dp,26.4215582445_dp,47.6810139402_dp,87.9673293454_dp,166.3542765990_dp,323.5145185104_dp,& + 649.6137627437_dp,1353.7622928283_dp,2947.4487643582_dp,6764.6820381226_dp,16572.9303100728_dp,44186.7283424959_dp,133460.3979620122_dp,561771.4053367316_dp] + aw%aw_erange_matrix(:,31) = [0.2183655321_dp,0.7013290003_dp,1.3361511974_dp,2.2713420130_dp,3.7407681622_dp,6.1346684432_dp,10.1266305250_dp,16.9079042504_dp,28.6303408601_dp,& + 49.2638104409_dp,86.2982926807_dp,154.2174006332_dp,281.8088166601_dp,528.0951327582_dp,1018.4600600214_dp,2030.4371999963_dp,4208.7872511490_dp,9140.9572351626_dp,& + 21025.2887042307_dp,52033.6921893655_dp,142382.9745163791_dp,470099.2643897415_dp,0.4442239173_dp,0.5388331067_dp,0.7548910589_dp,1.1533454759_dp,1.8485433178_dp,& + 3.0478384059_dp,5.1276930632_dp,8.7801354603_dp,15.3000002759_dp,27.1617591539_dp,49.2093322210_dp,91.1852548813_dp,173.2924797777_dp,338.9060844958_dp,& + 684.9422045330_dp,1438.2483388607_dp,3159.8300824946_dp,7332.5436483025_dp,18214.6557127919_dp,49442.5755149292_dp,152802.2864061145_dp,655909.8326738909_dp] + aw%aw_erange_matrix(:,32) = [0.2186742698_dp,0.7024601361_dp,1.3388223923_dp,2.2771328530_dp,3.7528722252_dp,6.1594172318_dp,10.1765707675_dp,17.0080735857_dp,28.8312664887_dp,& + 49.6689563903_dp,87.1233422844_dp,155.9217005828_dp,285.3957794177_dp,535.8233082895_dp,1035.5965855717_dp,2069.7953197016_dp,4303.1660507614_dp,9379.7304298714_dp,& + 21671.8682357735_dp,53947.3406519953_dp,148776.3411909367_dp,496015.8330232533_dp,0.4448739108_dp,0.5399095191_dp,0.7570321760_dp,1.1577006749_dp,1.8573135211_dp,& + 3.0653442416_dp,5.1625488328_dp,8.8497656811_dp,15.4402227276_dp,27.4475943113_dp,49.8013936782_dp,92.4363071552_dp,176.0007433716_dp,344.9417174036_dp,& + 698.8697765041_dp,1471.7638618206_dp,3244.7139487741_dp,7561.6130733739_dp,18884.7796936697_dp,51622.1097406976_dp,161002.6247092503_dp,696808.1581583555_dp] + aw%aw_erange_matrix(:,33) = [0.2198782128_dp,0.7068770903_dp,1.3492753836_dp,2.2998478985_dp,3.8004682907_dp,6.2569829743_dp,10.3739770360_dp,17.4051752184_dp,29.6303106739_dp,& + 51.2857373122_dp,90.4284787704_dp,162.7785957362_dp,299.8977953452_dp,567.2430641136_dp,1105.7187063146_dp,2232.0769799967_dp,4695.8805796643_dp,10384.5178072463_dp,& + 24432.0291527249_dp,62274.4829269457_dp,177368.6923233238_dp,616547.3782229358_dp,0.4474095073_dp,0.5441210056_dp,0.7654350773_dp,1.1748395273_dp,1.8919185945_dp,& + 3.1346104489_dp,5.3008774428_dp,9.1269978871_dp,16.0004962841_dp,28.5941391536_dp,52.1866082452_dp,97.5010391597_dp,187.0257125595_dp,369.6683449598_dp,& + 756.3504831659_dp,1611.3010131586_dp,3601.8754227676_dp,8538.2086436403_dp,21790.5978465254_dp,61293.6413919722_dp,198624.4160270221_dp,892097.8845087624_dp] + aw%aw_erange_matrix(:,34) = [0.2205755009_dp,0.7094397114_dp,1.3553564847_dp,2.3131026874_dp,3.8283285292_dp,6.3142767965_dp,10.4902942063_dp,17.6400128585_dp,30.1047304678_dp,& + 52.2498851800_dp,92.4090505664_dp,166.9098935930_dp,308.6890319929_dp,586.4239656771_dp,1148.8758631538_dp,2332.9165048231_dp,4942.7373086278_dp,11025.1617954126_dp,& + 26224.1209959338_dp,67814.4643245868_dp,197071.8130837686_dp,704030.7938736863_dp,0.4488787179_dp,0.5465704995_dp,0.7703414465_dp,1.1848813813_dp,1.9122625275_dp,& + 3.1754743020_dp,5.3827921486_dp,9.2918390922_dp,16.3351246999_dp,29.2823043794_dp,53.6260747158_dp,100.5763289562_dp,193.7665976955_dp,384.9076036113_dp,& + 792.1068957790_dp,1699.0621792049_dp,3829.5233339028_dp,9171.0744405107_dp,23714.4471176181_dp,67887.1739965544_dp,225396.6303648227_dp,1038874.3973506133_dp] + aw%aw_erange_matrix(:,35) = [0.2224377059_dp,0.7162996642_dp,1.3716949966_dp,2.3488612926_dp,3.9038067049_dp,6.4701726928_dp,10.8082522130_dp,18.2851453162_dp,31.4151173088_dp,& + 54.9289395078_dp,97.9492814189_dp,178.5534824685_dp,333.6786520013_dp,641.4848041205_dp,1274.1891627742_dp,2629.7223575866_dp,5681.3924050273_dp,12981.9776395896_dp,& + 31846.2925691313_dp,85845.5733578560_dp,264842.4043736593_dp,1033196.5811019712_dp,0.4528048661_dp,0.5531496173_dp,0.7835887038_dp,1.2121210746_dp,1.9676997164_dp,& + 3.2873595156_dp,5.6082247602_dp,9.7480209040_dp,17.2668500230_dp,31.2113983728_dp,57.6918295511_dp,109.3367311298_dp,213.1561628256_dp,429.2351241074_dp,& + 897.4862306011_dp,1961.7878918285_dp,4524.1985462233_dp,11149.5494849911_dp,29923.5093028414_dp,90140.2431887631_dp,322195.0066980188_dp,1626621.7226316575_dp] + aw%aw_erange_matrix(:,36) = [0.2239628349_dp,0.7219355060_dp,1.3851835473_dp,2.3785430503_dp,3.9668088400_dp,6.6010539366_dp,11.0768290063_dp,18.8336926711_dp,32.5373962751_dp,& + 57.2417989927_dp,102.7750045174_dp,188.7976056543_dp,355.9168822786_dp,691.1313918785_dp,1388.9298160111_dp,2906.5063814445_dp,6385.7594355512_dp,14901.0391217622_dp,& + 37566.6308767189_dp,105158.5712504577_dp,343432.4005668496_dp,1472923.8844171131_dp,0.4560229807_dp,0.5585787528_dp,0.7945963525_dp,1.2348954597_dp,2.0143300102_dp,& + 3.3820668359_dp,5.8003474242_dp,10.1396846683_dp,18.0733281755_dp,32.8962669883_dp,61.2787261993_dp,117.1534472128_dp,230.6822681245_dp,469.9066152974_dp,& + 995.8900705536_dp,2212.3499471505_dp,5204.1049563543_dp,13150.8079295981_dp,36485.4121522435_dp,115173.4190205108_dp,442490.0578465670_dp,2493513.1430867943_dp] + aw%aw_erange_matrix(:,37) = [0.2243965013_dp,0.7235409420_dp,1.3890367197_dp,2.3870485328_dp,3.9849206258_dp,6.6388051324_dp,11.1545712186_dp,18.9930833620_dp,32.8648647383_dp,& + 57.9198028342_dp,104.1969950480_dp,191.8339523060_dp,362.5524557845_dp,706.0600231939_dp,1423.7460810181_dp,2991.4083594542_dp,6604.7171596209_dp,15507.7421901125_dp,& + 39415.9362265085_dp,111603.1061980504_dp,371012.6224243028_dp,1643128.6270796654_dp,0.4569384765_dp,0.5601292542_dp,0.7977525237_dp,1.2414486178_dp,2.0277943095_dp,& + 3.4095131325_dp,5.8562441841_dp,10.2541265145_dp,18.3100902522_dp,33.3934954384_dp,62.3434883801_dp,119.4892526136_dp,235.9593169549_dp,482.2607809330_dp,& + 1026.0926003988_dp,2290.2227401019_dp,5418.7139363672_dp,13795.1304786747_dp,38655.0410926747_dp,123775.6738481261_dp,486536.0450457267_dp,2852917.4730972610_dp] + aw%aw_erange_matrix(:,38) = [0.2257280868_dp,0.7284787343_dp,1.4009186212_dp,2.4133523642_dp,4.0410989331_dp,6.7562599561_dp,11.3972381152_dp,19.4923653756_dp,33.8946132905_dp,& + 60.0610038276_dp,108.7094229805_dp,201.5218299780_dp,383.8565871173_dp,754.3383757573_dp,1537.3076264585_dp,3271.2067186961_dp,7335.5742038181_dp,17566.3480868639_dp,& + 45831.7044920070_dp,134698.6726713842_dp,475373.8675466694_dp,2370246.2019322505_dp,0.4597507654_dp,0.5649093236_dp,0.8075184620_dp,1.2617918420_dp,2.0697260288_dp,& + 3.4952761608_dp,6.0315410632_dp,10.6144464483_dp,19.0587908729_dp,34.9734966865_dp,65.7453442538_dp,126.9982293865_dp,253.0444886075_dp,522.5921175813_dp,& + 1125.6665078537_dp,2550.0437280359_dp,6145.5294802653_dp,16020.1320351972_dp,46350.6273161777_dp,155535.3340619753_dp,660935.4431146942_dp,4531788.9980076430_dp] + aw%aw_erange_matrix(:,39) = [0.2260960944_dp,0.7298455047_dp,1.4042154577_dp,2.4206704955_dp,4.0567721899_dp,6.7891239920_dp,11.4653468388_dp,19.6329684749_dp,34.1856733039_dp,& + 60.6687050686_dp,109.9960138655_dp,204.2984775948_dp,389.9991164296_dp,768.3550821883_dp,1570.5493708793_dp,3353.9236728895_dp,7554.3047013994_dp,18192.2530611664_dp,& + 47824.6037415822_dp,142101.8482716335_dp,510652.7132165922_dp,2648668.5120964348_dp,0.4605283085_dp,0.5662353265_dp,0.8102368088_dp,1.2674717305_dp,2.0814689820_dp,& + 3.5193707950_dp,6.0809598880_dp,10.7164098245_dp,19.2715422705_dp,35.4245562861_dp,66.7215685549_dp,129.1658164223_dp,258.0099439913_dp,534.4067343872_dp,& + 1155.1115416141_dp,2627.7595629551_dp,6366.0648192168_dp,16707.9785338324_dp,48791.6363938491_dp,166005.7221901024_dp,722469.0060948996_dp,5234589.6473626727_dp] + aw%aw_erange_matrix(:,40) = [0.2261733010_dp,0.7301323991_dp,1.4049080386_dp,2.4222091516_dp,4.0600702464_dp,6.7960450259_dp,11.4797022884_dp,19.6626311552_dp,34.2471415656_dp,& + 60.7971921298_dp,110.2683862617_dp,204.8871446678_dp,391.3035452124_dp,771.3373955617_dp,1577.6379738323_dp,3371.6096725859_dp,7601.2284769245_dp,18327.1102478198_dp,& + 48256.5019054435_dp,143720.2228231070_dp,518483.1882992422_dp,2712897.2449349295_dp,0.4606914567_dp,0.5665138676_dp,0.8108084502_dp,1.2686672317_dp,2.0839426746_dp,& + 3.5244506649_dp,6.0913885366_dp,10.7379499327_dp,19.3165403313_dp,35.5200796859_dp,66.9286031901_dp,129.6262695848_dp,259.0667452007_dp,536.9266561480_dp,& + 1161.4076992782_dp,2644.4284351048_dp,6413.5530026239_dp,16856.8500540382_dp,49323.6295552938_dp,168312.3706533907_dp,736293.7184796637_dp,5401331.4693767307_dp] + aw%aw_erange_matrix(:,41) = [0.2261732461_dp,0.7301322119_dp,1.4049076526_dp,2.4222084544_dp,4.0600690988_dp,6.7960433225_dp,11.4796999614_dp,19.6626279855_dp,34.2471373492_dp,& + 60.7971896142_dp,110.2683938690_dp,204.8871558975_dp,391.3034734250_dp,771.3370001893_dp,1577.6366809335_dp,3371.6062497252_dp,7601.2208578517_dp,18327.0899173436_dp,& + 48256.4331612689_dp,143719.9828438671_dp,518482.1905220594_dp,2712896.0135127371_dp,0.4606913432_dp,0.5665137093_dp,0.8108082029_dp,1.2686668512_dp,2.0839421606_dp,& + 3.5244500779_dp,6.0913878513_dp,10.7379488866_dp,19.3165397141_dp,35.5200850043_dp,66.9286165836_dp,129.6262502847_dp,259.0665725933_dp,536.9261347651_dp,& + 1161.4063004605_dp,2644.4255245315_dp,6413.5465926378_dp,16856.8275378510_dp,49323.5406084456_dp,168312.0958090605_dp,736292.1370502859_dp,5401335.3836557837_dp] + case(24) + aw%energy_range(:) = [700.0000_dp,800.0000_dp,900.0000_dp,1000.0000_dp,2000.0000_dp,3000.0000_dp,4000.0000_dp,5000.0000_dp,6000.0000_dp,& + 7000.0000_dp,8000.0000_dp,9000.0000_dp,10000.0000_dp,20000.0000_dp,30000.0000_dp,40000.0000_dp,50000.0000_dp,60000.0000_dp,& + 70000.0000_dp,80000.0000_dp,90000.0000_dp,100000.0000_dp,200000.0000_dp,300000.0000_dp,400000.0000_dp,500000.0000_dp,600000.0000_dp,& + 700000.0000_dp,900000.0000_dp,1000000.0000_dp,2000000.0000_dp,3000000.0000_dp,4000000.0000_dp,8000000.0000_dp,20000000.0000_dp,30000000.0000_dp,& + 40000000.0000_dp,50000000.0000_dp,60000000.0000_dp,70000000.0000_dp] + aw%aw_erange_matrix(:,1) = [0.1444831841_dp,0.4463129305_dp,0.7881428810_dp,1.2014614143_dp,1.7254689683_dp,2.4112775480_dp,3.3275084061_dp,4.5680241415_dp,6.2628063920_dp,& + 8.5934240114_dp,11.8152023682_dp,16.2892192514_dp,22.5288206461_dp,31.2678471963_dp,43.5619559201_dp,60.9420651793_dp,85.6545500191_dp,121.0591608460_dp,& + 172.3522673692_dp,248.0734198626_dp,363.8458976581_dp,553.8515140977_dp,917.7986693324_dp,1952.9117915519_dp,0.2910870254_dp,0.3170469290_dp,0.3718060277_dp,& + 0.4612957722_dp,0.5951464219_dp,0.7877810899_dp,1.0601464492_dp,1.4422957175_dp,1.9771680040_dp,2.7260990272_dp,3.7768785615_dp,5.2556016576_dp,& + 7.3442618251_dp,10.3072523710_dp,14.5322648586_dp,20.5960578770_dp,29.3777063234_dp,42.2751385759_dp,61.6812840242_dp,92.2133252902_dp,144.4837916238_dp,& + 249.3832447505_dp,533.6819506240_dp,2034.6812130298_dp] + aw%aw_erange_matrix(:,2) = [0.1462351224_dp,0.4520540968_dp,0.7994228466_dp,1.2211864610_dp,1.7584357941_dp,2.4650348251_dp,3.4136941332_dp,4.7044124886_dp,6.4764241313_dp,& + 8.9252888104_dp,12.3275308604_dp,17.0764098214_dp,23.7342251851_dp,33.1094526118_dp,46.3718374940_dp,65.2272650233_dp,92.1916981548_dp,131.0436704122_dp,& + 187.6411062375_dp,271.6082468252_dp,400.4981511560_dp,612.5417457455_dp,1018.8940111719_dp,2173.3280071422_dp,0.2946702604_dp,0.3216162729_dp,0.3785364862_dp,& + 0.4717652242_dp,0.6116114582_dp,0.8135669770_dp,1.1002227739_dp,1.5041403839_dp,2.0720738283_dp,2.8711592052_dp,3.9980154578_dp,5.5922033331_dp,& + 7.8563040850_dp,11.0862799686_dp,15.7184068280_dp,22.4046116197_dp,32.1413789683_dp,46.5137216101_dp,68.2261257303_dp,102.4653370494_dp,161.0806535929_dp,& + 278.4572085100_dp,595.6911596593_dp,2267.9697886947_dp] + aw%aw_erange_matrix(:,3) = [0.1480254215_dp,0.4579337645_dp,0.8110189757_dp,1.2415600901_dp,1.7926594407_dp,2.5211286991_dp,3.5040867940_dp,4.8481890429_dp,6.7027698187_dp,& + 9.2787577535_dp,12.8761137851_dp,17.9239105861_dp,25.0392947209_dp,35.1149478848_dp,49.4502635769_dp,69.9514249484_dp,99.4452959336_dp,142.1967669711_dp,& + 204.8365962245_dp,298.2605268262_dp,442.2824727194_dp,679.8553440442_dp,1135.4135593105_dp,2428.1922750715_dp,0.2983340021_dp,0.3263141520_dp,0.3855062739_dp,& + 0.4826798657_dp,0.6288796171_dp,0.8407612053_dp,1.1427161320_dp,1.5700685414_dp,2.1738000022_dp,3.0275157594_dp,4.2377477964_dp,5.9592805615_dp,& + 8.4181383582_dp,11.9464976910_dp,17.0367899874_dp,24.4284761387_dp,35.2557057237_dp,51.3239814800_dp,75.7055579826_dp,114.2569409241_dp,180.2699406534_dp,& + 312.1779089127_dp,667.6444661491_dp,2538.2837097538_dp] + aw%aw_erange_matrix(:,4) = [0.1495207465_dp,0.4628547668_dp,0.8207591322_dp,1.2587484912_dp,1.8216692929_dp,2.5689048829_dp,3.5814431792_dp,4.9718158210_dp,6.8983254114_dp,& + 9.5856273277_dp,13.3547404058_dp,18.6671136196_dp,26.1897918363_dp,36.8925672577_dp,52.1943604128_dp,74.1872982909_dp,105.9888838572_dp,152.3217269704_dp,& + 220.5481261826_dp,322.7717685540_dp,480.9542755105_dp,742.5159256330_dp,1244.3915104090_dp,2667.3021019704_dp,0.3013957086_dp,0.3302604655_dp,0.3914004560_dp,& + 0.4919676878_dp,0.6436556862_dp,0.8641511062_dp,1.1794484220_dp,1.6273447109_dp,2.2626275452_dp,3.1647612174_dp,4.4493120040_dp,6.2850287038_dp,& + 8.9195842042_dp,12.7188298679_dp,18.2277869335_dp,26.2684744543_dp,38.1057440783_dp,55.7555316005_dp,82.6418345370_dp,125.2598873133_dp,198.2669609027_dp,& + 343.9024155387_dp,735.3761760093_dp,2792.4007975812_dp] + aw%aw_erange_matrix(:,5) = [0.1581584545_dp,0.4914655700_dp,0.8780290019_dp,1.3612185024_dp,1.9971910555_dp,2.8623379317_dp,4.0637284684_dp,5.7542616489_dp,8.1550244560_dp,& + 11.5886381531_dp,16.5294112875_dp,23.6793452859_dp,34.0841888721_dp,49.3120741540_dp,71.7310702306_dp,104.9457479288_dp,154.4966301940_dp,229.0167848121_dp,& + 342.2593271762_dp,517.0527707275_dp,794.5036692063_dp,1261.3893969466_dp,2162.7398061845_dp,4705.9350887607_dp,0.3191110394_dp,0.3534686602_dp,0.4267939039_dp,& + 0.5488233603_dp,0.7356835113_dp,1.0122083638_dp,1.4156919494_dp,2.0016798733_dp,2.8528008777_dp,4.0922437829_dp,5.9044201005_dp,8.5668449726_dp,& + 12.4997077073_dp,18.3436967442_dp,27.0838216744_dp,40.2505374352_dp,60.2583466839_dp,91.0142703018_dp,139.1437232012_dp,216.9327357162_dp,351.1339455834_dp,& + 616.8079434404_dp,1319.8772466218_dp,4975.5101757964_dp] + aw%aw_erange_matrix(:,6) = [0.1631097620_dp,0.5080135567_dp,0.9116667485_dp,1.4225389648_dp,2.1043236614_dp,3.0450359010_dp,4.3700131540_dp,6.2611211321_dp,8.9856050855_dp,& + 12.9399049409_dp,18.7167879480_dp,27.2090533360_dp,39.7710395669_dp,58.4723061861_dp,86.4999013261_dp,128.8036555283_dp,193.1479506070_dp,291.8704906235_dp,& + 444.9645785607_dp,685.9916443587_dp,1075.4395233632_dp,1739.5672411434_dp,3029.3298737363_dp,6660.6016806705_dp,0.3292892917_dp,0.3671025078_dp,0.4481712623_dp,& + 0.5840409015_dp,0.7939862869_dp,1.1080155816_dp,1.5717812452_dp,2.2542645172_dp,3.2596882303_dp,4.7460262182_dp,6.9539264000_dp,10.2522278622_dp,& + 15.2101805373_dp,22.7131385208_dp,34.1501527103_dp,51.7234046577_dp,78.9730765643_dp,121.7140919219_dp,189.8748316532_dp,301.7465519058_dp,496.3642328717_dp,& + 880.9495966272_dp,1889.0610962342_dp,7090.4217269333_dp] + aw%aw_erange_matrix(:,7) = [0.1664674025_dp,0.5192992114_dp,0.9348305991_dp,1.4652599863_dp,2.1798809460_dp,3.1754829050_dp,4.5914060961_dp,6.6320592545_dp,9.6011642410_dp,& + 13.9544169906_dp,20.3812229064_dp,29.9326640661_dp,44.2235898076_dp,65.7546627134_dp,98.4306545184_dp,148.4042522886_dp,225.4705402984_dp,345.4244262409_dp,& + 534.2099602523_dp,835.8233970236_dp,1329.8280854082_dp,2181.2822208070_dp,3843.6799664110_dp,8519.1634651685_dp,0.3362016095_dp,0.3764914681_dp,0.4631460168_dp,& + 0.6090928797_dp,0.8360361451_dp,1.1780256329_dp,1.6873334714_dp,2.4437398939_dp,3.5690964004_dp,5.2502409163_dp,7.7752875394_dp,11.5915422657_dp,& + 17.3987403579_dp,26.3006419804_dp,40.0544557406_dp,61.4877246077_dp,95.2120979201_dp,148.8986862848_dp,235.7507129855_dp,380.0737118713_dp,633.1136329283_dp,& + 1133.3186348854_dp,2436.0577961080_dp,9116.6780863972_dp] + aw%aw_erange_matrix(:,8) = [0.1690776973_dp,0.5281095095_dp,0.9530417927_dp,1.4991313490_dp,2.2403191273_dp,3.2807596388_dp,4.7716782841_dp,6.9368306537_dp,10.1115966056_dp,& + 14.8036958093_dp,21.7883944857_dp,32.2591622719_dp,48.0682608207_dp,72.1146215914_dp,108.9756534578_dp,165.9485193173_dp,254.7915087282_dp,394.6980676439_dp,& + 617.5622271710_dp,977.9811277731_dp,1575.1218646365_dp,2613.9759091892_dp,4652.4661733029_dp,10382.7978511251_dp,0.3415811579_dp,0.3838728955_dp,0.4750640433_dp,& + 0.6292516218_dp,0.8702095713_dp,1.2354628915_dp,1.7830337174_dp,2.6021851733_dp,3.8304277561_dp,5.6805493356_dp,8.4838802661_dp,12.7601201248_dp,& + 19.3310759058_dp,29.5078437842_dp,45.4025661560_dp,70.4555770009_dp,110.3464794351_dp,174.6287171469_dp,279.8799006894_dp,456.6692570002_dp,768.9396428512_dp,& + 1387.0711545806_dp,2989.0749703627_dp,11161.0556901874_dp] + aw%aw_erange_matrix(:,9) = [0.1709557703_dp,0.5344686559_dp,0.9662573049_dp,1.5238691353_dp,2.2847567751_dp,3.3586881106_dp,4.9060235024_dp,7.1655139823_dp,10.4972872973_dp,& + 15.4500901467_dp,22.8675204274_dp,34.0574489068_dp,51.0647967947_dp,77.1150960111_dp,117.3434868279_dp,180.0072675174_dp,278.5322573782_dp,435.0365515056_dp,& + 686.6040010667_dp,1097.1993584122_dp,1783.4898352383_dp,2986.2142227836_dp,5356.0836020504_dp,12016.9059606308_dp,0.3454548628_dp,0.3892293024_dp,0.4837928296_dp,& + 0.6441385331_dp,0.8956351410_dp,1.2785039189_dp,1.8552630076_dp,2.7226521906_dp,4.0306368631_dp,6.0128362011_dp,9.0356096383_dp,13.6779344741_dp,& + 20.8626467845_dp,32.0743836708_dp,49.7259301183_dp,77.7832698071_dp,122.8543665835_dp,196.1515671140_dp,317.2657255647_dp,522.4150070505_dp,887.0057238075_dp,& + 1609.9115965938_dp,3477.1227916280_dp,12962.7512514722_dp] + aw%aw_erange_matrix(:,10) = [0.1726447830_dp,0.5402022810_dp,0.9782242070_dp,1.5463843073_dp,2.3254181485_dp,3.4303775442_dp,5.0302797273_dp,7.3781823188_dp,10.8579865286_dp,& + 16.0581304869_dp,23.8888077362_dp,35.7702460115_dp,53.9381215294_dp,81.9441090303_dp,125.4853484427_dp,193.7959335739_dp,302.0155051485_dp,475.3005938585_dp,& + 756.1877714365_dp,1218.5936533093_dp,1997.9473426011_dp,3373.4421522655_dp,6095.0561348602_dp,13744.7879009066_dp,0.3489409145_dp,0.3940794590_dp,0.4917547726_dp,& + 0.6578067504_dp,0.9191179687_dp,1.3184835161_dp,1.9227402786_dp,2.8358581620_dp,4.2199323354_dp,6.3290212303_dp,9.5641245019_dp,14.5633247217_dp,& + 22.3510726502_dp,34.5881630863_dp,53.9955472147_dp,85.0836236152_dp,135.4324631636_dp,218.0114762829_dp,355.6392245410_dp,590.6401417408_dp,1010.8425872098_dp,& + 1845.7325256463_dp,3995.9445980019_dp,14876.1560237048_dp] + aw%aw_erange_matrix(:,11) = [0.1738605393_dp,0.5443380620_dp,0.9868867334_dp,1.5627507674_dp,2.3551044797_dp,3.4829469465_dp,5.1217979994_dp,7.5355209805_dp,11.1260743095_dp,& + 16.5122194112_dp,24.6553358520_dp,37.0625585194_dp,56.1180969954_dp,85.6293729569_dp,131.7375179578_dp,204.4544488438_dp,320.2960832789_dp,506.8809564298_dp,& + 811.2057377731_dp,1315.4042726890_dp,2170.5222479635_dp,3687.8741411859_dp,6700.0179154473_dp,15167.5878795238_dp,0.3514515514_dp,0.3975902285_dp,0.4975525841_dp,& + 0.6678130090_dp,0.9363925476_dp,1.3480308458_dp,1.9728444581_dp,2.9203241384_dp,4.3618812340_dp,6.5673687306_dp,9.9647275133_dp,15.2383215088_dp,& + 23.4927406755_dp,36.5287652598_dp,57.3142122789_dp,90.7993513300_dp,145.3568831305_dp,235.4026772409_dp,386.4380005836_dp,645.9038040534_dp,1112.0689367858_dp,& + 2039.9867949721_dp,4425.0672231763_dp,16457.6314110225_dp] + aw%aw_erange_matrix(:,12) = [0.1753655164_dp,0.5494678874_dp,0.9976670809_dp,1.5831986606_dp,2.3923461136_dp,3.5491675380_dp,5.2375601555_dp,7.7353810978_dp,11.4680982283_dp,& + 17.0941702077_dp,25.6423723038_dp,38.7349608389_dp,58.9541546985_dp,90.4506116309_dp,139.9656122303_dp,218.5705032899_dp,344.6710685128_dp,549.2960926611_dp,& + 885.6771136835_dp,1447.5423259491_dp,2408.1530281330_dp,4124.7049256973_dp,7547.3043273828_dp,17171.9709510711_dp,0.3545610482_dp,0.4019591263_dp,0.5048080352_dp,& + 0.6803975269_dp,0.9582167603_dp,1.3855239964_dp,2.0367043909_dp,3.0284718185_dp,4.5444937849_dp,6.8755236067_dp,10.4853717613_dp,16.1204210430_dp,& + 24.9933884816_dp,39.0953047224_dp,61.7321009802_dp,98.4615076338_dp,158.7605363404_dp,259.0791626459_dp,428.7271349072_dp,722.4697634703_dp,1253.5792039363_dp,& + 2313.6572543644_dp,5032.2139735216_dp,18693.9190060109_dp] + aw%aw_erange_matrix(:,13) = [0.1762525278_dp,0.5524966749_dp,1.0040508933_dp,1.5953494848_dp,2.4145565226_dp,3.5888042694_dp,5.3071037767_dp,7.8558935977_dp,11.6751259028_dp,& + 17.4478358462_dp,26.2447351358_dp,39.7600958375_dp,60.7007012587_dp,93.4344188867_dp,145.0847228505_dp,227.4021853772_dp,360.0129611396_dp,576.1649809108_dp,& + 933.1802189583_dp,1532.4570953189_dp,2562.0641335204_dp,4409.9027665207_dp,8104.5389998819_dp,18497.1969702348_dp,0.3563945776_dp,0.4045461520_dp,0.5091256006_dp,& + 0.6879192306_dp,0.9713130436_dp,1.4081098242_dp,2.0753236739_dp,3.0941375016_dp,4.6558387310_dp,7.0642416323_dp,10.8056938539_dp,16.6657683060_dp,& + 25.9259213466_dp,40.6989072978_dp,64.5084644211_dp,103.3064950012_dp,167.2921824588_dp,274.2567753884_dp,456.0426876422_dp,772.3234133156_dp,1346.4655933627_dp,& + 2494.5638380344_dp,5435.1707231009_dp,20177.5066401676_dp] + aw%aw_erange_matrix(:,14) = [0.1829783682_dp,0.5755938137_dp,1.0531970558_dp,1.6899438035_dp,2.5894885088_dp,3.9046729855_dp,5.8679231710_dp,8.8396478506_dp,13.3866247544_dp,& + 20.4106346920_dp,31.3621347581_dp,48.5995152028_dp,76.0007561643_dp,120.0187127092_dp,191.5278286467_dp,309.1059913741_dp,504.9671486648_dp,835.8995406056_dp,& + 1403.9494370002_dp,2397.0991426389_dp,4175.7480862539_dp,7492.4429100080_dp,14302.6666713534_dp,33555.9419248088_dp,0.3703179667_dp,0.4244588968_dp,0.5428864332_dp,& + 0.7475654171_dp,1.0765075808_dp,1.5918195796_dp,2.3934883989_dp,3.6423586825_dp,5.5984672689_dp,8.6855481066_dp,13.6007516181_dp,21.5035284761_dp,& + 34.3450835002_dp,55.4512312859_dp,90.5696137480_dp,149.7836724584_dp,251.0801516726_dp,427.1647777877_dp,738.9719004826_dp,1304.3562792987_dp,2368.9196212347_dp,& + 4543.2054945270_dp,10079.2529978940_dp,37268.9585459828_dp] + aw%aw_erange_matrix(:,15) = [0.1864328591_dp,0.5875492898_dp,1.0789643041_dp,1.7402865658_dp,2.6840380111_dp,4.0780712696_dp,6.1806590053_dp,9.3971229425_dp,14.3728222885_dp,& + 22.1479648759_dp,34.4187048094_dp,53.9832910445_dp,85.5148902410_dp,136.9198284881_dp,221.7622052391_dp,363.6659505460_dp,604.4572621267_dp,1019.5465755022_dp,& + 1747.7402439870_dp,3051.1515592744_dp,5443.8681058120_dp,10014.0254933408_dp,19571.8504999681_dp,46737.2209709122_dp,0.3774836319_dp,0.4348958056_dp,0.5609552035_dp,& + 0.7800821684_dp,1.1348314252_dp,1.6953702560_dp,2.5758665583_dp,3.9621412099_dp,6.1584508458_dp,9.6674081750_dp,15.3281438612_dp,24.5583220846_dp,& + 39.7842045296_dp,65.2168705851_dp,108.2771491585_dp,182.2605473204_dp,311.4266558086_dp,540.9645390539_dp,957.1793336441_dp,1730.8219657637_dp,3222.4346623368_dp,& + 6320.4828281551_dp,14214.0487649746_dp,52510.9710846642_dp] + aw%aw_erange_matrix(:,16) = [0.1888673828_dp,0.5960135969_dp,1.0973453046_dp,1.7765141441_dp,2.7526956080_dp,4.2051369061_dp,6.4119579634_dp,9.8133747332_dp,15.1165441060_dp,& + 23.4719283795_dp,36.7740207159_dp,58.1812475623_dp,93.0278994207_dp,150.4486063818_dp,246.3207344899_dp,408.6913848578_dp,687.9884842007_dp,1176.6680482315_dp,& + 2048.0301817657_dp,3635.6622808178_dp,6606.1147808342_dp,12388.8768429516_dp,24670.4465803243_dp,59765.6786084483_dp,0.3825395972_dp,0.4423391997_dp,0.5739985133_dp,& + 0.8038071031_dp,1.1778066684_dp,1.7724143723_dp,2.7129170522_dp,4.2049553639_dp,6.5883275304_dp,10.4299109641_dp,16.6861925793_dp,26.9915765371_dp,& + 44.1776987280_dp,73.2245357881_dp,123.0341810517_dp,209.8052795947_dp,363.5965618859_dp,641.4271543159_dp,1154.3058667782_dp,2125.9959039706_dp,4035.3547351848_dp,& + 8060.2352858889_dp,18344.4026094871_dp,67781.7202153203_dp] + aw%aw_erange_matrix(:,17) = [0.1908012661_dp,0.6027605095_dp,1.1120797355_dp,1.8057447039_dp,2.8084669625_dp,4.3090570644_dp,6.6024368735_dp,10.1586238065_dp,15.7380385569_dp,& + 24.5870918153_dp,38.7746508920_dp,61.7792631772_dp,99.5296982089_dp,162.2789883408_dp,268.0395021411_dp,449.0011876172_dp,763.7792359281_dp,1321.3436607123_dp,& + 2329.0736920909_dp,4192.7194711633_dp,7736.4036043617_dp,14750.2565581519_dp,29855.8684036316_dp,73259.4938942780_dp,0.3865594411_dp,0.4483047301_dp,0.5845463388_dp,& + 0.8231452604_dp,1.2130930613_dp,1.8361346851_dp,2.8271157811_dp,4.4088710629_dp,6.9523315126_dp,11.0812505492_dp,17.8571269115_dp,29.1105993227_dp,& + 48.0449841567_dp,80.3549054679_dp,136.3396775154_dp,234.9807659012_dp,411.9945806478_dp,736.1685089361_dp,1343.6208414133_dp,2513.2762031319_dp,4849.9948833345_dp,& + 9844.1013924928_dp,22656.5439149310_dp,83782.4350216886_dp] + aw%aw_erange_matrix(:,18) = [0.1919275086_dp,0.6066993775_dp,1.1207162119_dp,1.8229571440_dp,2.8414643308_dp,4.3708369707_dp,6.7162289720_dp,10.3659192449_dp,16.1131786879_dp,& + 25.2639983229_dp,39.9963115681_dp,63.9904453046_dp,103.5530041949_dp,169.6542328021_dp,281.6889602727_dp,474.5581547092_dp,812.2969292007_dp,1414.9478643552_dp,& + 2513.0666715026_dp,4562.2632949378_dp,8497.4370986425_dp,16366.6024633931_dp,33466.2430685965_dp,82787.2172804636_dp,0.3889019836_dp,0.4518008519_dp,0.5907670865_dp,& + 0.8346137832_dp,1.2341277170_dp,1.8743137280_dp,2.8959011651_dp,4.5323761503_dp,7.1740882935_dp,11.4805267880_dp,18.5796868308_dp,30.4275119206_dp,& + 50.4668006262_dp,84.8571339354_dp,144.8165065913_dp,251.1773091777_dp,443.4670252683_dp,798.5123604322_dp,1469.8554010678_dp,2775.3655096322_dp,5410.4529573927_dp,& + 11092.7716344120_dp,25718.0669014744_dp,95181.4081571741_dp] + aw%aw_erange_matrix(:,19) = [0.1933564752_dp,0.6117072285_dp,1.1317332773_dp,1.8449986465_dp,2.8838871676_dp,4.4505826874_dp,6.8637146235_dp,10.6357387185_dp,16.6036560695_dp,& + 26.1532312813_dp,41.6093312507_dp,66.9259189279_dp,108.9256358365_dp,179.5658252755_dp,300.1599611170_dp,509.4060406167_dp,879.0070210811_dp,1544.8462284673_dp,& + 2771.0527089735_dp,5086.4824495012_dp,9591.3232342662_dp,18724.5089389590_dp,38815.6860863636_dp,97090.0884551632_dp,0.3918757640_dp,0.4562600553_dp,0.5987432017_dp,& + 0.8493866271_dp,1.2613397417_dp,1.9239173760_dp,2.9856672819_dp,4.6943066179_dp,7.4662809377_dp,12.0094024620_dp,19.5421859073_dp,32.1923730307_dp,& + 53.7336445114_dp,90.9733989748_dp,156.4213655496_dp,273.5386766621_dp,487.3256351897_dp,886.2968738300_dp,1649.6781570207_dp,3153.6366120257_dp,6231.3588092874_dp,& + 12950.7918869555_dp,30335.2973550919_dp,112436.4040300664_dp] + aw%aw_erange_matrix(:,20) = [0.1943108649_dp,0.6150583398_dp,1.1391286283_dp,1.8598474852_dp,2.9125723120_dp,4.5047064536_dp,6.9641970949_dp,10.8202994673_dp,16.9405572126_dp,& + 26.7667538902_dp,42.7275330578_dp,68.9713190578_dp,112.6899259480_dp,186.5519734475_dp,313.2643525875_dp,534.3064613806_dp,927.0515751223_dp,1639.2210763092_dp,& + 2960.3313694703_dp,5475.3667191272_dp,10413.0770973923_dp,20521.1923064040_dp,42954.0503775990_dp,108298.4636116199_dp,0.3938629079_dp,0.4592529596_dp,0.6041227721_dp,& + 0.8593932698_dp,1.2798463359_dp,1.9577875801_dp,3.0472157781_dp,4.8058207173_dp,7.6684349009_dp,12.3771167228_dp,20.2149315842_dp,33.4329555659_dp,& + 56.0441348430_dp,95.3280102273_dp,164.7438650793_dp,289.7034968450_dp,519.3108399542_dp,950.9467013146_dp,1783.5755312295_dp,3438.8306422667_dp,6859.0622879598_dp,& + 14393.4131448216_dp,33968.5865839197_dp,126069.5260881044_dp] + aw%aw_erange_matrix(:,21) = [0.1949032214_dp,0.6171408932_dp,1.1437339237_dp,1.8691160596_dp,2.9305208092_dp,4.5386549110_dp,7.0273811323_dp,10.9366543075_dp,17.1535354611_dp,& + 27.1557321237_dp,43.4386900404_dp,70.2765199610_dp,115.1006922353_dp,191.0437625747_dp,321.7261864634_dp,550.4612767752_dp,958.3845356844_dp,1701.1269394308_dp,& + 3085.3013461297_dp,5734.0280135783_dp,10964.2880847546_dp,21737.9946794511_dp,45785.8936787092_dp,116037.0486525428_dp,0.3950966654_dp,0.4611165613_dp,0.6074832097_dp,& + 0.8656616533_dp,1.2914696376_dp,1.9791158688_dp,3.0860784239_dp,4.8764334118_dp,7.7968297202_dp,12.6114183250_dp,20.6450781310_dp,34.2291299363_dp,& + 57.5329369882_dp,98.1462887434_dp,170.1559468014_dp,300.2707826044_dp,540.3423289538_dp,993.7338507104_dp,1872.8451331777_dp,3630.5621595573_dp,7285.0828648038_dp,& + 15382.7674510084_dp,36483.7054953274_dp,135535.8212170132_dp] + aw%aw_erange_matrix(:,22) = [0.1957720327_dp,0.6201990235_dp,1.1505096734_dp,1.8827832009_dp,2.9570477503_dp,4.5889452522_dp,7.1212022418_dp,11.1098543744_dp,17.4713901640_dp,& + 27.7378660787_dp,44.5061580411_dp,72.2419557300_dp,118.7435604274_dp,197.8568938439_dp,334.6141501693_dp,575.1781571063_dp,1006.5656809942_dp,1796.8561741546_dp,& + 3279.7752019921_dp,6139.4481789634_dp,11835.3955721937_dp,23679.2326211424_dp,50350.4509662074_dp,128623.6218266693_dp,0.3969067823_dp,0.4638582278_dp,0.6124418747_dp,& + 0.8749358787_dp,1.3087093028_dp,2.0108284560_dp,3.1440110917_dp,4.9819816166_dp,7.9893021889_dp,12.9637375819_dp,21.2940339582_dp,35.4345964000_dp,& + 59.7958078474_dp,102.4478997776_dp,178.4546346000_dp,316.5566527953_dp,572.9382481426_dp,1060.4671926503_dp,2013.0696387129_dp,3934.1906223460_dp,7966.0451652464_dp,& + 16980.6073115596_dp,40584.4378242144_dp,151021.1309224219_dp] + aw%aw_erange_matrix(:,23) = [0.2002461459_dp,0.6360169682_dp,1.1858073518_dp,1.9545646981_dp,3.0975480162_dp,4.8575927560_dp,7.6268085948_dp,12.0518525036_dp,19.2170535566_dp,& + 30.9684436655_dp,50.4969794088_dp,83.4072432416_dp,139.7137783912_dp,237.6491988999_dp,411.0974939497_dp,724.4779974750_dp,1303.4072415926_dp,2399.9188301826_dp,& + 4536.3545712665_dp,8836.7244095185_dp,17832.0695821586_dp,37588.7313101731_dp,84568.0625046655_dp,226966.2639682454_dp,0.4062390180_dp,0.4781358064_dp,0.6385508701_dp,& + 0.9242446811_dp,1.4012091057_dp,2.1825540574_dp,3.4607422084_dp,5.5649291451_dp,9.0639245813_dp,14.9538420687_dp,25.0059868007_dp,42.4241007821_dp,& + 73.1120947228_dp,128.1758008948_dp,228.9860170869_dp,417.7161578158_dp,779.9730587579_dp,1495.1570001170_dp,2953.2211352557_dp,6039.1568430082_dp,12875.3710433885_dp,& + 29029.3067895134_dp,72895.8090520912_dp,275268.7460731898_dp] + aw%aw_erange_matrix(:,24) = [0.2024815412_dp,0.6439643614_dp,1.2037021062_dp,1.9913302780_dp,3.1702718090_dp,4.9981368390_dp,7.8942337200_dp,12.5558382127_dp,20.1624293735_dp,& + 32.7408610623_dp,53.8300577411_dp,89.7139523154_dp,151.7555001583_dp,260.9145776443_dp,456.7106658891_dp,815.4955041133_dp,1488.8648679717_dp,2787.2541806911_dp,& + 5369.2458241369_dp,10690.6943830916_dp,22133.0553106771_dp,48080.4578752378_dp,111921.3929908081_dp,310054.3982273569_dp,0.4109084631_dp,0.4853706722_dp,0.6519640922_dp,& + 0.9498844425_dp,1.4498568430_dp,2.2739075720_dp,3.6312570729_dp,5.8827522877_dp,9.6577525920_dp,16.0695496943_dp,27.1196226053_dp,46.4715804298_dp,& + 80.9658775306_dp,143.6572985116_dp,260.0725160256_dp,481.4950700111_dp,914.1408442148_dp,1785.7458912894_dp,3604.4557769198_dp,7558.6415962404_dp,16595.2369123843_dp,& + 38690.8383591849_dp,100368.4160876864_dp,384003.2781817770_dp] + aw%aw_erange_matrix(:,25) = [0.2039567119_dp,0.6492254626_dp,1.2156080576_dp,2.0159319152_dp,3.2192215462_dp,5.0933017063_dp,8.0764294302_dp,12.9014270844_dp,20.8151563281_dp,& + 33.9736801250_dp,56.1669868274_dp,94.1743421713_dp,160.3531893150_dp,277.7002901640_dp,490.0030483859_dp,882.7913553629_dp,1627.9958775646_dp,3082.6829710924_dp,& + 6016.7364088544_dp,12164.4767840963_dp,25644.1479578213_dp,56926.2601799215_dp,135896.2211163915_dp,385806.8250424920_dp,0.4139924228_dp,0.4901828907_dp,0.6609540956_dp,& + 0.9671847902_dp,1.4828904550_dp,2.3363392233_dp,3.7485736650_dp,6.1029857769_dp,10.0723994400_dp,16.8550410343_dp,28.6209903116_dp,49.3745811661_dp,& + 86.6589100855_dp,155.0112635701_dp,283.1683034569_dp,529.5717113954_dp,1016.9467821925_dp,2012.6150198099_dp,4124.0260826563_dp,8802.2467366642_dp,19734.3484631149_dp,& + 47151.5875767643_dp,125438.4106855630_dp,485666.9083783065_dp] + aw%aw_erange_matrix(:,26) = [0.2055673467_dp,0.6549847994_dp,1.2286964022_dp,2.0431060098_dp,3.2735552217_dp,5.1994615206_dp,8.2807259499_dp,13.2910468289_dp,21.5553230270_dp,& + 35.3804009379_dp,58.8516753405_dp,99.3364742574_dp,170.3845470209_dp,297.4612814803_dp,529.5892192070_dp,963.7092597510_dp,1797.4232859338_dp,3447.7052295662_dp,& + 6830.3684580497_dp,14053.7281490869_dp,30254.7503089476_dp,68893.4388476543_dp,169553.8298265210_dp,496454.7630005633_dp,0.4173618876_dp,0.4954716961_dp,0.6708971787_dp,& + 0.9864262758_dp,1.5198254021_dp,2.4065203711_dp,3.8811991441_dp,6.3534602006_dp,10.5470373047_dp,17.7604653058_dp,30.3647360665_dp,52.7741998671_dp,& + 93.3866305692_dp,168.5641608069_dp,311.0474288038_dp,588.3411042745_dp,1144.4310035522_dp,2298.6212533427_dp,4791.7758490115_dp,10437.6142304121_dp,23979.2675978929_dp,& + 58996.0415985972_dp,161990.8672374849_dp,638001.6820435197_dp] + aw%aw_erange_matrix(:,27) = [0.2064011738_dp,0.6579726530_dp,1.2355091212_dp,2.0573041779_dp,3.3020544276_dp,5.2553652812_dp,8.3887498750_dp,13.4979535159_dp,21.9502037788_dp,& + 36.1346314572_dp,60.2988976236_dp,102.1356640703_dp,175.8594793244_dp,308.3241340257_dp,551.5250341372_dp,1008.9534798882_dp,1893.1294938710_dp,3656.3350617894_dp,& + 7301.8176749966_dp,15166.3913332697_dp,33024.3878930755_dp,76262.2133270944_dp,190937.6852233650_dp,569244.0191144008_dp,0.4191072142_dp,0.4982240484_dp,0.6760976197_dp,& + 0.9965344591_dp,1.5393100459_dp,2.4437019466_dp,3.9517791205_dp,6.4873953644_dp,10.8021459673_dp,18.2498228687_dp,31.3128861331_dp,54.6349452492_dp,& + 97.0957788302_dp,176.0965088937_dp,326.6818011124_dp,621.6340733884_dp,1217.4896215046_dp,2464.7258506438_dp,5185.7023064458_dp,11420.5986557085_dp,26590.0760656226_dp,& + 66494.1460453540_dp,185954.5871745703_dp,740487.4545925040_dp] + aw%aw_erange_matrix(:,28) = [0.2069473623_dp,0.6599321428_dp,1.2399855137_dp,2.0666533148_dp,3.3208617706_dp,5.2923403084_dp,8.4603636295_dp,13.6354580461_dp,22.2133210058_dp,& + 36.6386187468_dp,61.2689400365_dp,104.0182476066_dp,179.5553404692_dp,315.6874040485_dp,566.4625636771_dp,1039.9234228171_dp,1959.0297899986_dp,3800.9768763157_dp,& + 7631.3020520032_dp,15951.4927035377_dp,35001.7471899578_dp,81601.8175684925_dp,206733.5066518533_dp,624217.5061446414_dp,0.4202508244_dp,0.5000323042_dp,0.6795239323_dp,& + 1.0032108704_dp,1.5522101072_dp,2.4683780768_dp,3.9987402083_dp,6.5767534844_dp,10.9728473608_dp,18.5783075397_dp,31.9515376989_dp,55.8930431704_dp,& + 99.6140917521_dp,181.2342367570_dp,337.4010521710_dp,644.5943900368_dp,1268.2134649454_dp,2580.9523062512_dp,5463.8818279494_dp,12122.4744053872_dp,28479.9495951574_dp,& + 72017.3729303258_dp,203996.8322474206_dp,819009.0853796824_dp] + aw%aw_erange_matrix(:,29) = [0.2080560400_dp,0.6639152616_dp,1.2491054372_dp,2.0857494935_dp,3.3593782386_dp,5.3682673170_dp,8.6078320121_dp,13.9194491543_dp,22.7584698362_dp,& + 37.6864141852_dp,63.2932307438_dp,107.9629979857_dp,187.3348116528_dp,331.2648288771_dp,598.2430837050_dp,1106.2373789992_dp,2101.1756501406_dp,4115.6267659699_dp,& + 8355.2595234098_dp,17697.4412971776_dp,39464.9865942383_dp,93885.6595351764_dp,243995.2377014678_dp,757857.4157596451_dp,0.4225730372_dp,0.5037157949_dp,0.6865270616_dp,& + 1.0168977099_dp,1.5787311035_dp,2.5192573189_dp,4.0958664533_dp,6.7621752902_dp,11.3283177149_dp,19.2649813825_dp,33.2922034421_dp,58.5462453372_dp,& + 104.9520621780_dp,192.1864445864_dp,360.3978380572_dp,694.2110326979_dp,1378.7413088996_dp,2836.6754539486_dp,6083.0125894334_dp,13706.5409808708_dp,32820.1208767645_dp,& + 84990.3921886387_dp,247623.1992522239_dp,1013683.5125962318_dp] + aw%aw_erange_matrix(:,30) = [0.2086229906_dp,0.6659551693_dp,1.2537871783_dp,2.0955787863_dp,3.3792578586_dp,5.4075645609_dp,8.6843760162_dp,14.0673029317_dp,23.0432110022_dp,& + 38.2356161107_dp,64.3583119800_dp,110.0472074752_dp,191.4640570211_dp,339.5755459375_dp,615.2958976748_dp,1142.0521032722_dp,2178.5187904791_dp,4288.3166661044_dp,& + 8756.6648990544_dp,18677.4814402983_dp,42008.7829868896_dp,101025.2813056025_dp,266225.5339394037_dp,840189.0337543851_dp,0.4237610217_dp,0.5056064334_dp,0.6901342543_dp,& + 1.0239693692_dp,1.5924740338_dp,2.5457011394_dp,4.1465052178_dp,6.8591733952_dp,11.5149439368_dp,19.6269041586_dp,34.0018349981_dp,59.9571832820_dp,& + 107.8053907815_dp,198.0745027431_dp,372.8413526334_dp,721.2561856370_dp,1439.4986038208_dp,2978.6388931596_dp,6430.7685878544_dp,14609.0370583744_dp,35337.3204457132_dp,& + 92690.8378643312_dp,274318.1245022812_dp,1136158.3378886473_dp] + aw%aw_erange_matrix(:,31) = [0.2111806944_dp,0.6751827547_dp,1.2750561783_dp,2.1404498524_dp,3.4704630723_dp,5.5887796899_dp,9.0392391198_dp,14.7566598510_dp,24.3789215199_dp,& + 40.8290449665_dp,69.4244694660_dp,120.0406239881_dp,211.4397779839_dp,380.1812178791_dp,699.5546530760_dp,1321.2923396911_dp,2571.3552923339_dp,5180.7616058073_dp,& + 10874.4834095190_dp,23980.9003142699_dp,56222.5464472466_dp,142643.8057631811_dp,403694.9767809444_dp,1391473.9581879203_dp,0.4291241952_dp,0.5141930313_dp,0.7066212751_dp,& + 1.0564735310_dp,1.6559845279_dp,2.6685873696_dp,4.3832162627_dp,7.3154660928_dp,12.3988842590_dp,21.3539379109_dp,37.4158312967_dp,66.8065297429_dp,& + 121.7960864484_dp,227.2709704917_dp,435.3318534744_dp,859.0638901184_dp,1754.3542748555_dp,3729.1133253954_dp,8313.7392748885_dp,19642.6835388834_dp,49919.8202587492_dp,& + 139631.7262233275_dp,449045.0624672886_dp,2001280.6863545526_dp] + aw%aw_erange_matrix(:,32) = [0.2125969665_dp,0.6803102019_dp,1.2869401101_dp,2.1656777276_dp,3.5220698592_dp,5.6919883734_dp,9.2427260150_dp,15.1548178567_dp,25.1564155014_dp,& + 42.3514215141_dp,72.4259368188_dp,126.0217534493_dp,223.5309953320_dp,405.0717238833_dp,751.9446450040_dp,1434.5659541384_dp,2824.3239866350_dp,5768.2796567234_dp,& + 12306.0386561942_dp,27684.0954913213_dp,66565.5855619688_dp,174641.4608164631_dp,518013.8791092461_dp,1904957.6860556419_dp,0.4320966442_dp,0.5189888763_dp,0.7159049223_dp,& + 1.0749081224_dp,1.6922530620_dp,2.7392608109_dp,4.5203739564_dp,7.5819868126_dp,12.9196935934_dp,22.3811392637_dp,39.4674900536_dp,70.9698418255_dp,& + 130.4085513688_dp,245.5007781725_dp,474.9819812083_dp,948.1270588067_dp,1962.2383742802_dp,4237.2879515551_dp,9628.2131752047_dp,23291.8408956365_dp,61017.6014557670_dp,& + 177786.8621323129_dp,605226.9344436220_dp,2870733.8946965942_dp] + aw%aw_erange_matrix(:,33) = [0.2132695741_dp,0.6827498287_dp,1.2926110628_dp,2.1777560455_dp,3.5468611522_dp,5.7417402458_dp,9.3411717059_dp,15.3481851416_dp,25.5355758791_dp,& + 43.0971936674_dp,73.9035641690_dp,128.9823922196_dp,229.5525727490_dp,417.5523004302_dp,778.4177778483_dp,1492.3138719166_dp,2954.6271780646_dp,6074.6245254553_dp,& + 13063.5733753494_dp,29679.9486357327_dp,72273.4652868895_dp,192878.7961952659_dp,586367.5442187003_dp,2236309.3100171653_dp,0.4335089877_dp,0.5212769423_dp,0.7203531437_dp,& + 1.0837744875_dp,1.7097604899_dp,2.7735040793_dp,4.5870953547_dp,7.7121931725_dp,13.1753123415_dp,22.8878541390_dp,40.4851894216_dp,73.0476851150_dp,& + 134.7363351500_dp,254.7319156092_dp,495.2360230429_dp,994.0826779543_dp,2070.7747619650_dp,4506.3494196423_dp,10336.1536309671_dp,25299.7051970274_dp,67297.3647441372_dp,& + 200234.1922210731_dp,702701.4995745739_dp,3461740.1959740943_dp] + aw%aw_erange_matrix(:,34) = [0.2150829046_dp,0.6893415019_dp,1.3079869009_dp,2.2106327256_dp,3.6146141065_dp,5.8782715972_dp,9.6125021144_dp,15.8835991874_dp,26.5906849420_dp,& + 45.1838301234_dp,78.0627755497_dp,137.3716442069_dp,246.7428674929_dp,453.4824822938_dp,855.3653288675_dp,1662.0339954080_dp,3342.5859977612_dp,7000.9659576450_dp,& + 15398.1175701049_dp,35979.9458938123_dp,90869.7484760846_dp,255001.8023268931_dp,836010.4680315829_dp,3610137.9489567750_dp,0.4373188176_dp,0.5274790190_dp,0.7324720192_dp,& + 1.1080393825_dp,1.7578825773_dp,2.8680510468_dp,4.7721982641_dp,8.0752861022_dp,13.8921279284_dp,24.3175279960_dp,43.3760413994_dp,78.9944241952_dp,& + 147.2269685231_dp,281.6291372125_dp,554.8973653689_dp,1131.1713880854_dp,2399.3995675088_dp,5335.7345961901_dp,12567.2387424551_dp,31809.1061357633_dp,88442.4269198594_dp,& + 280054.4392423225_dp,1081281.8907916807_dp,6144477.1931226198_dp] + aw%aw_erange_matrix(:,35) = [0.2165930652_dp,0.6948475016_dp,1.3208906322_dp,2.2383689182_dp,3.6720827635_dp,5.9947219726_dp,9.8452725753_dp,16.3457796585_dp,27.5076111590_dp,& + 47.0105467502_dp,81.7334634348_dp,144.8422973338_dp,262.2054726695_dp,486.1705763020_dp,926.2835742482_dp,1820.8219585072_dp,3712.0243465929_dp,7901.9899443997_dp,& + 17728.9181774639_dp,42482.4642094690_dp,110935.1954153121_dp,326443.5813006668_dp,1154434.8260509006_dp,5781356.9989355495_dp,0.4404941569_dp,0.5326820484_dp,0.7427082354_dp,& + 1.1286586347_dp,1.7990134429_dp,2.9493499546_dp,4.9323877193_dp,8.3916905095_dp,14.5214900744_dp,25.5831661414_dp,45.9585680087_dp,84.3608268729_dp,& + 158.6270259471_dp,306.4949315504_dp,610.8703111254_dp,1262.0054175612_dp,2719.4503872294_dp,6163.5122768420_dp,14862.8018785892_dp,38774.3852334501_dp,112303.9756007481_dp,& + 377443.5489992495_dp,1608248.1327597764_dp,11094076.8939570524_dp] + aw%aw_erange_matrix(:,36) = [0.2168964316_dp,0.6959553706_dp,1.3234936713_dp,2.2439801696_dp,3.6837434635_dp,6.0184220373_dp,9.8927970601_dp,16.4404642464_dp,27.6961512705_dp,& + 47.3876757393_dp,82.4946502898_dp,146.3991269027_dp,265.4456163087_dp,493.0633053106_dp,941.3454924190_dp,1854.8287099511_dp,3791.9280212223_dp,8099.1945515460_dp,& + 18246.6079122569_dp,43954.2423941564_dp,115594.1123838407_dp,343661.4351591033_dp,1236140.9579337058_dp,6425268.6480215443_dp,0.4411323020_dp,0.5337314275_dp,0.7447804190_dp,& + 1.1328464721_dp,1.8073938481_dp,2.9659692183_dp,4.9652493357_dp,8.4568455273_dp,14.6516263430_dp,25.8460501330_dp,46.4976527613_dp,85.4872484983_dp,& + 161.0348837836_dp,311.7843337008_dp,622.8743701127_dp,1290.3324929360_dp,2789.5315523077_dp,6347.2730727057_dp,15381.2037871690_dp,40382.7525270133_dp,117984.7797854022_dp,& + 401713.0322907210_dp,1750477.9329989499_dp,12721107.1410644483_dp] + aw%aw_erange_matrix(:,37) = [0.2169478873_dp,0.6961433326_dp,1.3239354887_dp,2.2449330249_dp,3.6857245817_dp,6.0224507836_dp,9.9008803711_dp,16.4565786906_dp,27.7282595944_dp,& + 47.4519471087_dp,82.6244852079_dp,146.6649395716_dp,265.9994656071_dp,494.2429805873_dp,943.9269276343_dp,1860.6668801483_dp,3805.6732878833_dp,8133.1970629416_dp,& + 18336.1264451855_dp,44209.7091040348_dp,116407.0903538253_dp,346690.1240705280_dp,1250715.2222315413_dp,6544211.3271539956_dp,0.4412405490_dp,0.5339095341_dp,0.7451323337_dp,& + 1.1335580802_dp,1.8088186847_dp,2.9687965656_dp,4.9708434948_dp,8.4679443019_dp,14.6738099962_dp,25.8909020511_dp,46.5897246998_dp,85.6798576521_dp,& + 161.4471299613_dp,312.6911520817_dp,624.9356458304_dp,1295.2064355812_dp,2801.6167510162_dp,6379.0437501817_dp,15471.1386798570_dp,40663.0522792135_dp,118981.2717130096_dp,& + 406012.7170565017_dp,1776130.8402275355_dp,13029418.8102731034_dp] + aw%aw_erange_matrix(:,38) = [0.2169478264_dp,0.6961431310_dp,1.3239350833_dp,2.2449322868_dp,3.6857232781_dp,6.0224484819_dp,9.9008762124_dp,16.4565713050_dp,27.7282478624_dp,& + 47.4519313029_dp,82.6244671381_dp,146.6649193671_dp,265.9994282692_dp,494.2428842899_dp,943.9266830835_dp,1860.6659661581_dp,3805.6698149069_dp,8133.1886582707_dp,& + 18336.1134176163_dp,44209.6890770845_dp,116407.0371097728_dp,346689.9548800496_dp,1250714.0256065591_dp,6544214.1689795908_dp,0.4412404242_dp,0.5339093704_dp,0.7451320789_dp,& + 1.1335576530_dp,1.8088179504_dp,2.9687952328_dp,4.9708410108_dp,8.4679403632_dp,14.6738054972_dp,25.8908986825_dp,46.5897234836_dp,85.6798521392_dp,& + 161.4470960848_dp,312.6910643546_dp,624.9353852151_dp,1295.2050923634_dp,2801.6128421333_dp,6379.0383109776_dp,15471.1352540443_dp,40663.0366129218_dp,118981.2187605095_dp,& + 406012.4514282376_dp,1776130.0998965928_dp,13029440.2357217539_dp] + aw%aw_erange_matrix(:,39) = [0.2169478601_dp,0.6961432398_dp,1.3239352879_dp,2.2449326098_dp,3.6857237227_dp,6.0224490422_dp,9.9008770007_dp,16.4565726436_dp,27.7282499624_dp,& + 47.4519338851_dp,82.6244700195_dp,146.6649265568_dp,265.9994706539_dp,494.2430824024_dp,943.9273027902_dp,1860.6676639493_dp,3805.6748495209_dp,8133.2017341120_dp,& + 18336.1361661298_dp,44209.7150067573_dp,116407.0961493534_dp,346690.3346687911_dp,1250716.5858198206_dp,6544226.9576467071_dp,0.4412404929_dp,0.5339094543_dp,0.7451321872_dp,& + 1.1335577780_dp,1.8088180645_dp,2.9687953689_dp,4.9708413746_dp,8.4679410855_dp,14.6738061972_dp,25.8908989301_dp,46.5897243043_dp,85.6798634775_dp,& + 161.4471702996_dp,312.6913259474_dp,624.9360109932_dp,1295.2068805749_dp,2801.6182433885_dp,6379.0486819907_dp,15471.1415467669_dp,40663.0440192628_dp,118981.2970290090_dp,& + 406013.2421766578_dp,1776133.1830551089_dp,13029460.0603005476_dp] + aw%aw_erange_matrix(:,40) = [0.2169479967_dp,0.6961436853_dp,1.3239361471_dp,2.2449340725_dp,3.6857261237_dp,6.0224529463_dp,9.9008832907_dp,16.4565827169_dp,27.7282659546_dp,& + 47.4519585470_dp,82.6245082082_dp,146.6649938493_dp,265.9996029798_dp,494.2433169496_dp,943.9277081020_dp,1860.6683344416_dp,3805.6754034417_dp,8133.2001170045_dp,& + 18336.1289895845_dp,44209.6996877465_dp,116407.1332170651_dp,346690.5901280560_dp,1250716.7713186527_dp,6544221.5728685968_dp,0.4412407721_dp,0.5339098040_dp,0.7451326784_dp,& + 1.1335585175_dp,1.8088192407_dp,2.9687972497_dp,4.9708443493_dp,8.4679458110_dp,14.6738133960_dp,25.8909093105_dp,46.5897425393_dp,85.6799078188_dp,& + 161.4472551451_dp,312.6914494586_dp,624.9362441543_dp,1295.2071101789_dp,2801.6174908422_dp,6379.0447749927_dp,15471.1343512902_dp,40663.0398564033_dp,118981.4429058655_dp,& + 406013.4704579106_dp,1776132.5999892899_dp,13029447.5373880584_dp] + aw%aw_erange_matrix(:,41) = [0.2169478985_dp,0.6961433640_dp,1.3239355155_dp,2.2449329447_dp,3.6857241342_dp,6.0224494299_dp,9.9008770705_dp,16.4565717454_dp,27.7282471829_dp,& + 47.4519283504_dp,82.6244613012_dp,146.6649201632_dp,265.9994918861_dp,494.2431774153_dp,943.9275927639_dp,1860.6684146201_dp,3805.6761428686_dp,8133.2032452987_dp,& + 18336.1404962747_dp,44209.7307288540_dp,116407.0902591648_dp,346690.0500622534_dp,1250715.6210436232_dp,6544220.2872860357_dp,0.4412405713_dp,0.5339095492_dp,0.7451322969_dp,& + 1.1335578770_dp,1.8088181090_dp,2.9687952461_dp,4.9708407975_dp,8.4679396767_dp,14.6738038573_dp,25.8908957844_dp,46.5897217627_dp,85.6798744744_dp,& + 161.4472174171_dp,312.6914357359_dp,624.9363266513_dp,1295.2074549019_dp,2801.6186711074_dp,6379.0488934272_dp,15471.1492766609_dp,40663.0531671503_dp,118981.2047286658_dp,& + 406012.8144159144_dp,1776131.7484223465_dp,13029447.0094524790_dp] + case(26) + aw%energy_range(:) = [799.0_dp, 995.0_dp, 1293.0_dp, 1738.0_dp, 2238.0_dp, 3009.0_dp, 4377.0_dp,& + 6256.0_dp, 9034.0_dp, 15564.0_dp, 19500.0_dp, 22300.0_dp, 24783.0_dp, 41198.0_dp, 94407.0_dp, 189080.0_dp,& + 457444.0_dp, 2101965.0_dp, 14140999.0_dp] + aw%aw_erange_matrix(:, 1) = [0.13642311899920728_dp, 0.4200545572769177_dp, 0.7370807753440111_dp, 1.1133066772659823_dp, 1.5801544604816498_dp, 2.1776122735126364_dp,& + 2.958051608229127_dp, 3.9913517870782127_dp, 5.371912501848569_dp, 7.228355464212482_dp, 9.73704628190353_dp, 13.14105442578561_dp, 17.776888498885384_dp,& + 24.112423571820134_dp, 32.80110412846477_dp, 44.760201041042265_dp, 61.285574367976004_dp, 84.22431526497385_dp, 116.24572841708785_dp, 161.2969910194418_dp,& + 225.45259795885693_dp, 318.7313048003067_dp, 459.67927623297453_dp, 689.4586002694374_dp, 1129.2608611575954_dp, 2384.899332663137_dp, 0.27462662125713716_dp,& + 0.2963690140650455_dp, 0.34194449526494647_dp, 0.4156960072544763_dp, 0.5246016522241007_dp, 0.678958500149969_dp, 0.8934517120897347_dp, 1.1887228663585705_dp,& + 1.5936139137203535_dp, 2.1483557077661164_dp, 2.9090998337926104_dp, 3.9543808256482187_dp, 5.394380930104983_dp, 7.384320521229908_dp, 10.144053822937831_dp,& + 13.98732687567056_dp, 19.366933030106217_dp, 26.948262498364663_dp, 37.739388497689305_dp, 53.348600455664965_dp, 76.56744981421966_dp, 112.8945538518047_dp,& + 175.19453971323657_dp, 301.19411259128674_dp, 645.6383267719649_dp, 2472.504957810595_dp] + aw%aw_erange_matrix(:, 2) = [0.13925292153649474_dp, 0.4292451559612877_dp, 0.7548554587233549_dp, 1.1437833384686722_dp, 1.6300177124420845_dp, 2.2571802345230276_dp,& + 3.0828977198982144_dp, 4.1847303613644495_dp, 5.668362141207399_dp, 7.679038990085008_dp, 10.417660954546289_dp, 14.163558801605095_dp, 19.30691297965789_dp,& + 26.395168657294754_dp, 36.199950721972876_dp, 49.8144257942317_dp, 68.79692224946095_dp, 95.38754743793149_dp, 132.8473999791564_dp, 186.0241881676569_dp,& + 262.3929640997449_dp, 374.2539456946303_dp, 544.2375437714703_dp, 822.2186120363165_dp, 1354.4009319403576_dp, 2870.8477591124674_dp, 0.28040112472679574_dp,& + 0.30356564912420003_dp, 0.3522269185689752_dp, 0.43123890171761686_dp, 0.5484284775560514_dp, 0.7154038747678296_dp, 0.9488235797546415_dp, 1.2722683343829815_dp,& + 1.7189393959653365_dp, 2.3355248974949743_dp, 3.1877439258332987_dp, 4.368323267393725_dp, 6.008533513106221_dp, 8.294995170661158_dp, 11.494429371223015_dp,& + 15.990739727277512_dp, 22.342169324408708_dp, 31.373674894712472_dp, 44.337963681573235_dp, 63.228794541463415_dp, 91.4807612744294_dp, 135.78931506653154_dp,& + 211.68822580031673_dp, 364.5832859080767_dp, 780.7919711700442_dp, 2983.4784258039044_dp] + aw%aw_erange_matrix(:, 3) = [0.14255313239112444_dp, 0.44000221057671707_dp, 0.7757923584694003_dp, 1.1799690097399198_dp, 1.6897357815984675_dp, 2.3533173555606655_dp,& + 3.235072042865805_dp, 4.422504788444178_dp, 6.036065942606674_dp, 8.242988234525232_dp, 11.27697154139003_dp, 15.466358681870163_dp, 21.274694591939472_dp,& + 29.359452647866682_dp, 40.65762974807096_dp, 56.51155510141434_dp, 78.85603619054034_dp, 110.50208558142461_dp, 155.58114995208211_dp, 220.28032446631136_dp,& + 314.1757282936284_dp, 453.002579503336_dp, 665.5199679038552_dp, 1014.5604898901777_dp, 1683.22275383598_dp, 3584.316130956811_dp, 0.28714175969757383_dp,& + 0.31204447582876227_dp, 0.364492437091783_dp, 0.4499982622781763_dp, 0.5774890351263188_dp, 0.7602856703230421_dp, 1.0176474576111718_dp, 1.3770666782034746_dp,& + 1.8776058066032693_dp, 2.5747281832062225_dp, 3.5472996309663594_dp, 4.907773444426638_dp, 6.817081323539761_dp, 9.506552191680779_dp, 13.31048343115922_dp,& + 18.71524624188938_dp, 26.435090191201706_dp, 37.53395349827001_dp, 53.63476429545202_dp, 77.3183278694657_dp, 112.99764481556716_dp, 169.1712283981583_dp, 265.33605383413214_dp, 458.1910477032067_dp, 980.4158381921823_dp, 3736.258588894085_dp] + aw%aw_erange_matrix(:, 4) = [0.1461752355773306_dp, 0.45185762356828396_dp, 0.7990360544025357_dp, 1.2205083800767933_dp, 1.7572993236504337_dp, 2.4631760346842047_dp,& + 3.4107040936751862_dp, 4.699662235621062_dp, 6.468947005916596_dp, 8.913592437239087_dp, 12.309286000158947_dp, 17.047905694553386_dp, 23.689335953611156_dp,& + 33.03746908843982_dp, 46.25240948793399_dp, 65.01743260557059_dp, 91.79007233646534_dp, 130.18588342772145_dp, 185.58109233196095_dp, 266.1051496392308_dp,& + 384.41585349757804_dp, 561.3175220599338_dp, 834.5950790025629_dp, 1285.9791179040656_dp, 2151.82484272534_dp, 4607.654058324236_dp, 0.2945477387281676_dp,& + 0.3214595830325172_dp, 0.37830480422867613_dp, 0.4714034978877635_dp, 0.611040549973395_dp, 0.8126695125533263_dp, 1.0988217520443189_dp, 1.5019658160165765_dp,& + 2.06870896475044_dp, 2.8659496939699607_dp, 3.9899051060400774_dp, 5.579409370592633_dp, 7.835605731464965_dp, 11.051295593199974_dp, 15.655055606015468_dp,& + 22.278373441162756_dp, 31.859818549870184_dp, 45.8120996920796_dp, 66.3057001417783_dp, 96.79792736663595_dp, 143.16536816614507_dp, 216.57964119429673_dp, 342.31559687568875_dp, 593.3221880856304_dp, 1268.7961696472178_dp, 4820.528614472729_dp] + aw%aw_erange_matrix(:, 5) = [0.1491837006061548_dp, 0.46174475862674996_dp, 0.8185592742668346_dp, 1.2548602679290635_dp, 1.8150957152976515_dp, 2.558059962915574_dp,& + 3.563852447313441_dp, 4.943651210588896_dp, 6.8536849594075475_dp, 9.515417267221789_dp, 13.244928718595732_dp, 18.495967806145995_dp, 25.923415200427836_dp,& + 36.47741618080311_dp, 51.54392422008612_dp, 73.15615247652946_dp, 104.31586449506281_dp, 149.48862759379944_dp, 215.38537956732102_dp, 312.2481145191122_dp,& + 456.12776079236704_dp, 673.453709288462_dp, 1012.0267276035421_dp, 1574.3691121807644_dp, 2654.80297068303_dp, 5713.432382523477_dp, 0.30070547042796897_dp,& + 0.329369148940076_dp, 0.3900659972080265_dp, 0.4898601972791792_dp, 0.6402960685231848_dp, 0.8588226443075349_dp, 1.1710637934386325_dp, 1.6142423603884266_dp,& + 2.242256373868115_dp, 3.133186411937803_dp, 4.400427168655394_dp, 6.20926516954263_dp, 8.801701004315937_dp, 12.533857850605154_dp, 17.932816993690953_dp,& + 25.783927946483768_dp, 37.26719820010372_dp, 54.17638997139517_dp, 79.2886731198742_dp, 117.0433439522649_dp, 174.96435451384102_dp, 267.2144601065969_dp, 425.4335136047249_dp, 740.2128400786926_dp, 1582.657563073928_dp, 5997.255668095278_dp] + aw%aw_erange_matrix(:, 6) = [0.15260234927102537_dp, 0.47302539641929003_dp, 0.840991102837249_dp, 1.294672645194693_dp, 1.8827021467743683_dp, 2.6700932738662866_dp,& + 3.7463755633773785_dp, 5.2371602474102446_dp, 7.32087360313924_dp, 10.253221414128866_dp, 14.403238412842787_dp, 20.306771564613143_dp, 28.74634048361317_dp,& + 40.87115597284819_dp, 58.378725955266525_dp, 83.7917688772186_dp, 120.88443420446742_dp, 175.34684950976114_dp, 255.8424057631557_dp, 375.7503122503565_dp,& + 556.2295831578734_dp, 832.2606405042899_dp, 1266.9035893238452_dp, 1994.1233884282024_dp, 3394.9032163950633_dp, 7352.339298447235_dp, 0.3077100277629248_dp,& + 0.33845848997185407_dp, 0.4037598644074573_dp, 0.5116119745332622_dp, 0.6751498929108865_dp, 0.9143651994460601_dp, 1.2588616224335032_dp, 1.75204662427369_dp,& + 2.4574104002902457_dp, 3.4679202527071955_dp, 4.920122312459791_dp, 7.015412894339497_dp, 10.052310636158587_dp, 14.475746343180617_dp, 20.952944399378328_dp,& + 30.491434160561496_dp, 44.62526181307512_dp, 65.71573855063913_dp, 97.45740287039392_dp, 145.7937686814701_dp, 220.7911788117634_dp, 341.2160648337932_dp, 548.3643432689413_dp, 959.1555990081102_dp, 2051.35284281865_dp, 7749.544195896773_dp] + aw%aw_erange_matrix(:, 7) = [0.15677016271388225_dp, 0.4868453590049744_dp, 0.8687054372436632_dp, 1.3443711902060458_dp, 1.9680308145076961_dp, 2.8130758201236987_dp,& + 3.981916598375189_dp, 5.620150667525299_dp, 7.937365822573636_dp, 11.238009575994626_dp, 15.967571787550442_dp, 22.782179390039534_dp, 32.65420224580025_dp,& + 47.03362680645636_dp, 68.09645542153785_dp, 99.13012280380028_dp, 145.13706650883265_dp, 213.79117632911775_dp, 316.97982833553084_dp, 473.36316641843865_dp,& + 712.8558730426033_dp, 1085.3059686529182_dp, 1680.4570998839688_dp, 2686.878722527825_dp, 4633.878278204835_dp, 10122.376598223758_dp, 0.3162602891789823_dp,& + 0.3496899146467389_dp, 0.4209457453791445_dp, 0.5393025302878296_dp, 0.7200886783450724_dp, 0.9868388578481941_dp, 1.3747701483151744_dp, 1.9361268964127185_dp,& + 2.748293611495538_dp, 3.9261112821432245_dp, 5.640652928475169_dp, 8.14800606157719_dp, 11.833678475242102_dp, 17.28159907773421_dp, 25.382209512440305_dp,& + 37.50344417920538_dp, 55.76466551122398_dp, 83.48401940950261_dp, 125.93307609242711_dp, 191.6876355183379_dp, 295.31901285869344_dp, 463.7601116874953_dp, 755.1838770980437_dp, 1331.5355795873638_dp, 2851.124163900499_dp, 10729.678598478598_dp] + aw%aw_erange_matrix(:, 8) = [0.16057542542593983_dp, 0.49952962028824754_dp, 0.8943731123892699_dp, 1.3909076292240965_dp, 2.048865907808532_dp, 2.950126882998398_dp,& + 4.2103425278857385_dp, 5.995954911767919_dp, 8.549525380892058_dp, 12.227842251849554_dp, 17.559745488437873_dp, 25.33455063970661_dp, 36.7382813247586_dp,& + 53.565155655152715_dp, 78.54849962850257_dp, 115.8829384695536_dp, 172.05630085125_dp, 257.19020516627944_dp, 387.2342312585102_dp, 587.6466072063987_dp,& + 899.8509121387558_dp, 1393.5887995892674_dp, 2194.6568910457167_dp, 3565.0884460947423_dp, 6230.642206140841_dp, 13732.602514515214_dp, 0.32407734329056537_dp,& + 0.3600930324125088_dp, 0.43712641231000066_dp, 0.5657644526879636_dp, 0.7636093738551866_dp, 1.0579110134655951_dp, 1.4898487496937127_dp, 2.121183742243155_dp,& + 3.0444831771204277_dp, 4.398856321226892_dp, 6.39429509803701_dp, 9.349562092561689_dp, 13.751584428416358_dp, 20.349284881552315_dp, 30.303092531346753_dp,& + 45.425519514426874_dp, 68.57296149770674_dp, 104.29448877473207_dp, 159.93517513497875_dp, 247.604939611224_dp, 388.0261636148984_dp, 619.3536447537377_dp, 1022.6891506041642_dp, 1819.6861630933722_dp, 3904.600906393468_dp, 14642.034530501202_dp] + aw%aw_erange_matrix(:, 9) = [0.16432089011213946_dp, 0.5120783448939726_dp, 0.9199886972681118_dp, 1.437840597555715_dp, 2.1313000192264977_dp, 3.0914596821926974_dp,& + 4.448548492729215_dp, 6.392274593692749_dp, 9.202519740089308_dp, 13.296161754347343_dp, 19.29914269890146_dp, 28.158315667958256_dp, 41.31644063618593_dp,& + 60.98825519945388_dp, 90.59976907891678_dp, 135.49373172032819_dp, 204.0739991922362_dp, 309.6835071732142_dp, 473.73172471065976_dp, 731.0162782781778_dp,& + 1139.1233191834983_dp, 1796.2958792734264_dp, 2880.674779835234_dp, 4760.907205234219_dp, 8443.643014901543_dp, 18797.512140801202_dp, 0.33178166646984186_dp,& + 0.3704756224159047_dp, 0.4535273760622626_dp, 0.5929656383094599_dp, 0.8089125230587538_dp, 1.1327811095321214_dp, 1.6125162306884913_dp, 2.320823479534045_dp,& + 3.3679786225905852_dp, 4.921818456475184_dp, 7.239122346149252_dp, 10.715224167142727_dp, 15.963061445035835_dp, 23.94020351071544_dp, 36.154875568991734_dp,& + 55.00354905209596_dp, 84.33076754977621_dp, 130.3718204724196_dp, 203.3763607524491_dp, 320.5163292162362_dp, 511.499766113826_dp, 831.0632228122023_dp, 1393.996082618058_dp, 2507.6502273684464_dp, 5398.730047404666_dp, 20174.243482162154_dp] + aw%aw_erange_matrix(:, 10) = [0.16955168876185606_dp, 0.5297128492681893_dp, 0.9563682595025127_dp, 1.5053456637551013_dp, 2.251458851423233_dp, 3.30025374096381_dp,& + 4.805213971653435_dp, 6.993792120211177_dp, 10.207452358120111_dp, 14.963970947103403_dp, 22.05530884512796_dp, 32.702779510861056_dp, 48.80530736719183_dp,& + 73.34037086293017_dp, 111.01793202252156_dp, 169.3581666315736_dp, 260.4877531652313_dp, 404.17142433017716_dp, 633.0038005727723_dp, 1001.4735710632112_dp,& + 1602.2710504984482_dp, 2597.339796633601_dp, 4284.439326490744_dp, 7277.272159321957_dp, 13217.442145549_dp, 29915.954039362532_dp, 0.34255855985607125_dp,& + 0.3852211686852873_dp, 0.4772548827347379_dp, 0.6329784737782622_dp, 0.8765598435301294_dp, 1.246188563782287_dp, 1.800992159648441_dp, 2.6320669330081983_dp,& + 3.8799679680225974_dp, 5.762558150515838_dp, 8.61966780966633_dp, 12.985306239805702_dp, 19.705483921340985_dp, 30.13234025723871_dp, 46.44736905029676_dp,& + 72.20575596588289_dp, 113.2647934625349_dp, 179.39118814888906_dp, 287.0985893630822_dp, 464.81061857234823_dp, 762.7938761510428_dp, 1274.5462739445218_dp, 2193.7537015644107_dp, 4023.287609783773_dp, 8726.293698066565_dp, 32456.229019326278_dp] + aw%aw_erange_matrix(:, 11) = [0.17161078656390408_dp, 0.5366905364814994_dp, 0.97088881076514_dp, 1.5325699975422944_dp, 2.300445459098221_dp, 3.386304928549832_dp,& + 4.953814656226931_dp, 7.2471781401179225_dp, 10.635564848787308_dp, 15.682784328062063_dp, 23.257647540954054_dp, 34.710448891778356_dp, 52.15789633691571_dp,& + 78.94769861589022_dp, 120.42398853039909_dp, 185.20235595500606_dp, 287.3191078945018_dp, 449.9016881055523_dp, 711.5314989639854_dp, 1137.4846615524127_dp,& + 1840.156204841028_dp, 3018.1229428253846_dp, 5039.367148043016_dp, 8662.764242204496_dp, 15902.181332715702_dp, 36264.30820408944_dp, 0.3468065253991383_dp,& + 0.3911064628011852_dp, 0.48686770710592453_dp, 0.649407004504934_dp, 0.9046709269666874_dp, 1.2938615472397417_dp, 1.8811396766420316_dp, 2.7659895528533784_dp,& + 4.102970732081106_dp, 6.133424978400673_dp, 9.236763352774814_dp, 14.014155411820974_dp, 21.42640568242634_dp, 33.02345872650458_dp, 51.33068406408745_dp,& + 80.5068763005674_dp, 127.47998440706951_dp, 203.93737778272407_dp, 329.88071553711586_dp, 540.1552172919626_dp, 897.0521095218941_dp, 1517.2143251608513_dp, 2641.8070030495096_dp, 4889.503800534578_dp, 10648.322208945656_dp, 39537.49857015622_dp] + aw%aw_erange_matrix(:, 12) = [0.1728061198835349_dp, 0.5407506981101403_dp, 0.9793714038026303_dp, 1.5485484444330022_dp, 2.3293373186010964_dp, 3.4373065991570115_dp,& + 5.0423230776903445_dp, 7.398853217497418_dp, 10.89314740028624_dp, 16.11757919438818_dp, 23.988966085187993_dp, 35.93874008813103_dp, 54.22162060992446_dp,& + 82.42176042102257_dp, 126.29163129215709_dp, 195.15830646295916_dp, 304.3099266577351_dp, 479.10015694274045_dp, 762.1158665504651_dp, 1225.9324082258843_dp,& + 1996.438395305476_dp, 3297.6059283833983_dp, 5546.6394027927_dp, 9604.798156883016_dp, 17747.506304598486_dp, 40662.28777164996_dp, 0.3492740223484516_dp,& + 0.3945444048035226_dp, 0.4925209274047293_dp, 0.6591264626127379_dp, 0.9213922685098963_dp, 1.322366949443488_dp, 1.929314142208889_dp, 2.8469205908136956_dp,& + 4.238488142375349_dp, 6.360114867321287_dp, 9.616265458690265_dp, 14.650939404307358_dp, 22.498728594279285_dp, 34.837787125550584_dp, 54.418346394612065_dp,& + 85.79761930703064_dp, 136.61734637002158_dp, 219.8591273308433_dp, 357.9019839857931_dp, 590.021281618985_dp, 986.9076588661666_dp, 1681.5547940952313_dp, 2948.8741403686568_dp, 5489.390378606207_dp, 11987.379922744534_dp, 44468.08958434164_dp] + aw%aw_erange_matrix(:, 13) = [0.1737308948597355_dp, 0.5438966877521114_dp, 0.9859610380912929_dp, 1.560999073537973_dp, 2.3519219694926194_dp, 3.4773019976149877_dp,& + 5.11195442725365_dp, 7.518569316391805_dp, 11.09714005655843_dp, 16.463120094991794_dp, 24.572288754382765_dp, 36.922235617447974_dp, 55.880761448416834_dp,& + 85.22675085299979_dp, 131.05081429199765_dp, 203.27261201403803_dp, 318.2293711657402_dp, 503.152754643253_dp, 804.032555977885_dp, 1299.6927362845154_dp,& + 2127.667695664749_dp, 3534.0326704862105_dp, 5979.169285255363_dp, 10414.573972160117_dp, 19345.73831740431_dp, 44492.46471079593_dp, 0.3511837705016231_dp,& + 0.39721506693266434_dp, 0.4969316438045135_dp, 0.6667392102402926_dp, 0.9345354080893498_dp, 1.3448487389874917_dp, 1.967438938031642_dp, 2.9111947746582425_dp,& + 4.346509228913013_dp, 6.541503533662434_dp, 9.921152543346885_dp, 15.164693048542738_dp, 23.367741212788335_dp, 36.315072183771754_dp, 56.94501925463534_dp,& + 90.15017067236717_dp, 144.17713392303253_dp, 233.11210787240515_dp, 381.3788199371866_dp, 632.0944337435812_dp, 1063.2960978183357_dp, 1822.393451001988_dp, 3214.1964330189876_dp, 6011.5393853613305_dp, 13158.00196550311_dp, 48777.36298097777_dp] + aw%aw_erange_matrix(:, 14) = [0.17799130240706984_dp, 0.558445410809649_dp, 1.0166297309491044_dp, 1.6193831652945954_dp, 2.4586620686801695_dp, 3.667829742572521_dp,& + 5.446314891054136_dp, 8.098126747261656_dp, 12.093029411971516_dp, 18.164916061856836_dp, 27.47177125227526_dp, 41.85862387738217_dp, 64.29463269296241_dp,& + 99.6081132229676_dp, 155.73791067776023_dp, 245.8920402977068_dp, 392.3244219552829_dp, 633.0449562544749_dp, 1033.945999167842_dp, 1711.154006548549_dp,& + 2873.283514523331_dp, 4904.516412355985_dp, 8541.213772971501_dp, 15320.756510308098_dp, 29238.418877095413_dp, 68583.17313114721_dp, 0.35999057854489624_dp,& + 0.40964342132227255_dp, 0.517678596262729_dp, 0.702891167526621_dp, 0.9974953889055737_dp, 1.4534562037793455_dp, 2.1531958092699743_dp, 3.2271377404365795_dp,& + 4.882410917802139_dp, 7.450138129922876_dp, 11.464071575277625_dp, 17.792734308409212_dp, 27.864023043096953_dp, 44.05169019349174_dp, 70.34922266622794_dp,& + 113.5616876658134_dp, 185.44652039869408_dp, 306.62505535472695_dp, 513.8711614457693_dp, 874.0321926895938_dp, 1511.615678189863_dp, 2667.372553488233_dp, 4842.950527196566_dp, 9285.588160319077_dp, 20597.325965171356_dp, 76161.8596274348_dp] + aw%aw_erange_matrix(:, 15) = [0.18427327646299554_dp, 0.5800678142111884_dp, 1.062813174396542_dp, 1.7086710138090095_dp, 2.6245433407677226_dp, 3.9687456084576795_dp,& + 5.983088088759827_dp, 9.044214821988016_dp, 13.747180049983248_dp, 21.04333745984166_dp, 32.47068559616262_dp, 50.54348632696267_dp, 79.41986612597532_dp,& + 126.06149615339397_dp, 202.27775198215787_dp, 328.3861574350742_dp, 539.8798783942364_dp, 899.8005204338677_dp, 1522.1727316803415_dp, 2617.4198392181756_dp,& + 4582.775104882628_dp, 8188.716947049966_dp, 14986.46895717419_dp, 28322.082953313376_dp, 56826.75793518779_dp, 138481.00974898663_dp, 0.3730028368021069_dp,& + 0.428354171574684_dp, 0.549600032397171_dp, 0.7595995851576278_dp, 1.098014096850626_dp, 1.629865924998882_dp, 2.460250070930056_dp, 3.7589670939362154_dp,& + 5.801833730520023_dp, 9.040587178848838_dp, 14.222505427016364_dp, 22.59766467101562_dp, 36.28293067415338_dp, 58.9106289633826_dp, 96.80295342684235_dp,& + 161.1348984666336_dp, 271.99263116463095_dp, 466.14531748937003_dp, 812.2703291175023_dp, 1441.5731111728833_dp, 2611.4422570763995_dp, 4844.665731670444_dp, 9266.732583950343_dp, 18647.213606093355_dp, 42656.46566405554_dp, 157660.6216097217_dp] + aw%aw_erange_matrix(:, 16) = [0.1889166187549335_dp, 0.5961850834729495_dp, 1.097718788260886_dp, 1.7772527519739671_dp, 2.754100363430344_dp, 4.207746123352419_dp,& + 6.416725271991069_dp, 9.821987600643263_dp, 15.131996317599018_dp, 23.4995566780628_dp, 36.8234002615115_dp, 58.269695998899806_dp, 93.18703062085261_dp,& + 150.7367390335279_dp, 246.84666046331515_dp, 409.6601639519172_dp, 689.7883982951697_dp, 1180.0211938503542_dp, 2054.1392300559787_dp, 3645.406178397627_dp,& + 6610.227338646847_dp, 12282.21946267068_dp, 23479.16184253136_dp, 46536.49778293873_dp, 97988.005994822_dp, 248271.71627050647_dp, 0.3826418964555519_dp,& + 0.44249042636795055_dp, 0.5742647482387918_dp, 0.8042933870412514_dp, 1.1786909803221888_dp, 1.7740059766551828_dp, 2.7157599189739634_dp, 4.210014007474866_dp,& + 6.5973245402497005_dp, 10.445947244529027_dp, 16.71490137908719_dp, 27.043296616534693_dp, 44.27161732479843_dp, 73.39668617871985_dp, 123.35300047165461_dp,& + 210.40156572097126_dp, 364.7172011277595_dp, 643.5002779012159_dp, 1157.7720495453327_dp, 2128.791663589068_dp, 4011.0945220895405_dp, 7773.563988357228_dp, 15593.849284273198_dp, 32917.0364973997_dp, 78051.06376348506_dp, 289942.76429117593_dp] + aw%aw_erange_matrix(:, 17) = [0.194043824675455_dp, 0.6141201650984125_dp, 1.137056339966442_dp, 1.8556822490348746_dp, 2.9045171634501883_dp, 4.489491230295626_dp,& + 6.935918070559926_dp, 10.768297969516013_dp, 16.84551695032909_dp, 26.59345448264271_dp, 42.41124163468271_dp, 68.39190043336116_dp, 111.6218630548935_dp,& + 184.5662784702303_dp, 309.53243627996767_dp, 527.1995714305152_dp, 913.3020625088166_dp, 1612.1087655214071_dp, 2905.5631924229647_dp, 5360.760592207567_dp,& + 10156.351679516332_dp, 19836.90395856863_dp, 40153.56249059423_dp, 84945.40622185206_dp, 191879.29446083526_dp, 516853.91463486024_dp, 0.3933068197531215_dp,& + 0.45841433657798863_dp, 0.6026132459496706_dp, 0.8565818421331466_dp, 1.2746407100646033_dp, 1.948249294221966_dp, 3.029862020316641_dp, 4.774339119270673_dp,& + 7.611287961919275_dp, 12.27301847355483_dp, 20.02418710434074_dp, 33.08062796253295_dp, 55.38677548001659_dp, 94.08664339680347_dp, 162.36610582016837_dp,& + 285.0728404570405_dp, 510.11475389805196_dp, 932.2410214966416_dp, 1744.2541855756215_dp, 3351.323885452711_dp, 6636.946607638909_dp, 13613.456185258428_dp, 29125.998944110084_dp, 65928.95446339808_dp, 166172.86831676983_dp, 628359.6031461136_dp] + aw%aw_erange_matrix(:, 18) = [0.20097761439605452_dp, 0.6386142361636943_dp, 1.1916436123207983_dp, 1.9665277909771697_dp, 3.121155070595262_dp, 4.903104495370994_dp,& + 7.713190752815356_dp, 12.214218517736429_dp, 19.52076540766317_dp, 31.536135148981113_dp, 51.56105718002733_dp, 85.41349834924547_dp, 143.5295342840862_dp,& + 244.98992662983036_dp, 425.42112573916177_dp, 752.9079358406352_dp, 1360.9881333864396_dp, 2519.3466781523043_dp, 4791.042590791367_dp, 9397.53189950536_dp,& + 19109.699703842572_dp, 40556.572222445735_dp, 90659.45721129453_dp, 216333.95478046086_dp, 564416.1292362113_dp, 1760880.0389147545_dp, 0.4077664557826492_dp,& + 0.48049567628653145_dp, 0.6429124643807497_dp, 0.9325592299631679_dp, 1.4169440263827862_dp, 2.2120247106687776_dp, 3.515599466670522_dp, 5.666879358451872_dp,& + 9.253815059676851_dp, 15.309414383937733_dp, 25.677138365111702_dp, 43.7042055643289_dp, 75.58521070695693_dp, 133.0274420624619_dp, 238.67600100704755_dp,& + 437.47737171537983_dp, 821.2587051299821_dp, 1583.8578781748606_dp, 3150.0096236720124_dp, 6491.449657956827_dp, 13947.036522523289_dp, 31498.820504827483_dp, 75639.29476513214_dp, 196582.0757874882_dp, 575257.5915715584_dp, 2362446.5347060743_dp] + aw%aw_erange_matrix(:, 19) = [0.20658002404396444_dp, 0.6586140986839257_dp, 1.2369737792708104_dp, 2.060361497488803_dp, 3.3082012274969337_dp, 5.267442774090238_dp,& + 8.412127582372415_dp, 13.542811939893562_dp, 22.035981804979933_dp, 36.29881109275795_dp, 60.6146407237101_dp, 102.74788434800739_dp, 177.06018691028456_dp,& + 310.7136329238608_dp, 556.36637029124_dp, 1018.9766332082758_dp, 1914.422668305446_dp, 3702.980284069834_dp, 7407.809066534502_dp, 15417.95314386633_dp,& + 33651.57917590195_dp, 77878.97148771118_dp, 194227.98208713965_dp, 535582.0636490324_dp, 1709364.267502628_dp, 7045890.294848618_dp, 0.4194816618416714_dp,& + 0.49881572197479607_dp, 0.6772179216261252_dp, 0.9987160310392028_dp, 1.5435226281295777_dp, 2.451754987162261_dp, 3.9670946613559326_dp, 6.516517085204095_dp,& + 10.85773397839894_dp, 18.356701405781113_dp, 31.520492951672992_dp, 55.0435050002148_dp, 97.91266305771113_dp, 177.760944100452_dp, 330.14945470086406_dp,& + 629.0496827419165_dp, 1233.841581178721_dp, 2502.1075901274335_dp, 5274.877655599449_dp, 11644.098372122406_dp, 27178.121421602995_dp, 68003.68316809284_dp, 186203.45469776812_dp, 576894.7309753906_dp, 2152261.8479348915_dp, 11566361.80487531_dp] + aw%aw_erange_matrix(:, 20) = [0.20878089337233605_dp, 0.6665236543193817_dp, 1.2550931614146674_dp, 2.0983237232110734_dp, 3.38481582751189_dp, 5.418564331713917_dp,& + 8.705828067862388_dp, 14.108794066294884_dp, 23.12322697734966_dp, 38.390182043454885_dp, 64.65856322054098_dp, 110.63583466643804_dp, 192.63262310028742_dp,& + 341.932785309222_dp, 620.1449956190338_dp, 1152.2653509765064_dp, 2200.646613149521_dp, 4337.910771163601_dp, 8872.44998086692_dp, 18961.533603283864_dp,& + 42748.40639563531_dp, 103069.49259277884_dp, 271388.86064721714_dp, 808265.503410061_dp, 2915885.1156875044_dp, 15257006.288806498_dp, 0.4240919425078822_dp,& + 0.5061337957364646_dp, 0.6911418800611648_dp, 1.0259473122312546_dp, 1.5963227579992894_dp, 2.5531163460188835_dp, 4.160724269135366_dp, 6.8864489147035135_dp,& + 11.567503857113842_dp, 19.729006828740097_dp, 34.20240654961173_dp, 60.35680029031647_dp, 108.61537925165752_dp, 199.75021678633257_dp, 376.3927619922551_dp,& + 728.9995944299609_dp, 1456.9587839825_dp, 3019.6115675071173_dp, 6531.619658687757_dp, 14871.950539519852_dp, 36069.05923591306_dp, 94800.92746541071_dp, 277390.3096379278_dp, 946568.3924295901_dp, 4140822.150621181_dp, 30376446.323901277_dp] + case(28) + aw%energy_range(:) = [1545.0_dp, 2002.0_dp, 2600.0_dp, 3300.0_dp, 4000.0_dp, 5000.0_dp, 5800.0_dp,& + 7000.0_dp, 8500.0_dp, 11000.0_dp, 14000.0_dp, 18000.0_dp, 22000.0_dp, 30000.0_dp, 40000.0_dp, 55000.0_dp,& + 75000.0_dp, 100000.0_dp, 140000.0_dp, 200000.0_dp, 280000.0_dp, 400000.0_dp, 700000.0_dp, 1200000.0_dp,& + 2000000.0_dp, 4500000.0_dp, 10000000.0_dp, 50000000.0_dp] + aw%aw_erange_matrix(:, 1) = [0.13575757270404953_dp, 0.4178973639556045_dp, 0.7329236428021971_dp, 1.1062108040376035_dp, 1.568601536611355_dp, 2.1592688100674207_dp,& + 2.9294121393197234_dp, 3.9472075381811034_dp, 5.304565115169143_dp, 7.126455157872397_dp, 9.58387216560659_dp, 12.911957380816203_dp, 17.435457004483258_dp,& + 23.60465355900629_dp, 32.04632634372974_dp, 43.63642652454945_dp, 59.604434449969176_dp, 81.68464372636545_dp, 112.33867792077912_dp, 155.0906277872644_dp,& + 215.05233203699643_dp, 299.80262448398395_dp, 421.01528178406727_dp, 597.918699882043_dp, 865.992956895906_dp, 1303.7011000121163_dp, 2141.5524242895876_dp,& + 4531.217316508373_dp, 0.27326920724684195_dp, 0.2946860969732406_dp, 0.33955686148055997_dp, 0.4121109865279064_dp, 0.5191386834268464_dp, 0.6706479068869163_dp,& + 0.8808905660301858_dp, 1.1698656397567786_dp, 1.5654653694813896_dp, 2.106516824061551_dp, 2.847090389745759_dp, 3.8626161289484946_dp, 5.258596350357734_dp,& + 7.183071722294598_dp, 9.844561359899942_dp, 13.538086075854713_dp, 18.68336222220931_dp, 25.881909474247266_dp, 36.00509685683712_dp, 50.336922172287224_dp,& + 70.82460332971439_dp, 100.57024668126095_dp, 144.9365352509728_dp, 214.43007706895824_dp, 333.52874619054023_dp, 573.9031161499247_dp, 1229.5973040920514_dp, 4703.444164101694_dp] + aw%aw_erange_matrix(:, 2) = [0.13875490228933057_dp, 0.4276255171652803_dp, 0.7517156037290086_dp, 1.1383835985980468_dp, 1.6211543280535077_dp, 2.24298954813131_dp,& + 3.0605574074054775_dp, 4.150010628234262_dp, 5.614955400623468_dp, 7.597559757812928_dp, 10.294150717899024_dp, 13.977239772443514_dp, 19.02678365968016_dp,& + 25.97476748389089_dp, 35.56910288047172_dp, 48.86570866761254_dp, 67.36207051671413_dp, 93.19263977809487_dp, 129.41834545397384_dp, 180.464373940652_dp,& + 252.8054276668391_dp, 356.10337604440286_dp, 505.2839065614399_dp, 724.884011732378_dp, 1059.8824174872211_dp, 1608.9472923295727_dp, 2660.4222496990938_dp,& + 5652.953965854954_dp, 0.27938451496965105_dp, 0.3022942729129253_dp, 0.3504019114933159_dp, 0.42846797473594944_dp, 0.5441638095088057_dp, 0.7088566053659555_dp,& + 0.9388406258537662_dp, 1.2571515140355833_dp, 1.696177262039284_dp, 2.3013920551824687_dp, 3.1366969256786756_dp, 4.292078154026608_dp, 5.894629362616917_dp,& + 8.124486230083422_dp, 11.237991762535799_dp, 15.601617466229358_dp, 21.74214403705774_dp, 30.42206941171729_dp, 42.75588434748671_dp, 60.397316412895705_dp,& + 85.86308174160227_dp, 123.15573491240343_dp, 179.14126278900252_dp, 267.1160865820656_dp, 417.7474719630637_dp, 720.4456660885186_dp, 1542.1360738637661_dp, 5884.200372654236_dp] + aw%aw_erange_matrix(:, 3) = [0.14170133198228974_dp, 0.4372217263238123_dp, 0.7703667410153948_dp, 1.170561871979771_dp, 1.6741573415215183_dp, 2.328150315477383_dp,& + 3.1950959957750866_dp, 4.359823742790623_dp, 5.938793138824031_dp, 8.093266245009781_dp, 11.047988350138315_dp, 15.117836905873796_dp, 20.74603727817547_dp,& + 28.559241927240333_dp, 39.447320753058946_dp, 54.67958659957536_dp, 76.07517146731833_dp, 106.25479226978082_dp, 149.01700315289193_dp, 209.91049251369597_dp,& + 297.1309477297457_dp, 423.00157872210633_dp, 606.6410313436483_dp, 879.4603870251076_dp, 1298.7028908996313_dp, 1988.89250689582_dp, 3311.7439315777756_dp,& + 7068.809688414042_dp, 0.28540132117732764_dp, 0.30984707978323456_dp, 0.36129794839002666_dp, 0.44508976371473236_dp, 0.5698536211227944_dp, 0.7484481979075869_dp,& + 0.9994281881329805_dp, 1.349221631283907_dp, 1.8352885387908624_dp, 2.5106794264046326_dp, 3.4506197143865025_dp, 4.7620484853517535_dp, 6.597491611853674_dp,& + 9.175333108649932_dp, 12.809599627131021_dp, 17.954022803045103_dp, 25.267822915246338_dp, 35.715254750483545_dp, 50.719550256407835_dp, 72.40992923579321_dp,& + 104.04357266683634_dp, 150.80209138086602_dp, 221.51983619636096_dp, 333.11222703164094_dp, 524.1575321727823_dp, 906.5045080905089_dp, 1939.0883159241562_dp,& + 7379.912745615771_dp] + aw%aw_erange_matrix(:, 4) = [0.1443213439813841_dp, 0.4457831750819166_dp, 0.7871040955754438_dp, 1.199649305615617_dp, 1.7224480814853638_dp, 2.406363780432981_dp,& + 3.3196484980978123_dp, 4.555610260714856_dp, 6.243390548485977_dp, 8.563273777666188_dp, 11.768595390094813_dp, 16.217282570542377_dp, 22.41751110034019_dp,& + 31.094143991937496_dp, 43.28592662828489_dp, 60.4884812383459_dp, 84.86601967785074_dp, 119.56722092591784_dp, 169.20143472321413_dp, 240.5679228390866_dp,& + 343.80218836354004_dp, 494.2629646656425_dp, 715.8986735090695_dp, 1048.0827251136477_dp, 1562.2463425593953_dp, 2412.584383401865_dp, 4044.261841910583_dp,& + 8670.083651639381_dp, 0.29075611057246903_dp, 0.3166261585220409_dp, 0.3711885602570686_dp, 0.46033854458071854_dp, 0.5936453499685163_dp, 0.7854359258485714_dp,& + 1.0565085213633747_dp, 1.436688222670177_dp, 1.968561659570244_dp, 2.712912087952586_dp, 3.7566401596502166_dp, 5.224345933312585_dp, 7.295336462823744_dp,& + 10.228723138518374_dp, 14.400665352704436_dp, 20.36000930380217_dp, 28.912119534169648_dp, 41.246715659956386_dp, 59.136507003494074_dp, 85.2557783449816_dp,& + 123.72029659330352_dp, 181.09033026269378_dp, 268.50693202646386_dp, 407.097383174319_dp, 644.5187891323013_dp, 1118.0760747835973_dp, 2390.794104288915_dp, 9077.664025334678_dp] + aw%aw_erange_matrix(:, 5) = [0.14638817647917096_dp, 0.4525562304919969_dp, 0.8004113661058508_dp, 1.2229192620590597_dp, 1.7613392882634402_dp, 2.46978131492719_dp,& + 3.4213217718648257_dp, 4.716508123125715_dp, 6.495398953009317_dp, 8.954788755571927_dp, 12.373034589954802_dp, 17.14606176978465_dp, 23.83987749306696_dp,& + 33.26757985490672_dp, 46.60291342057746_dp, 65.54869201567364_dp, 92.58820799313293_dp, 131.36337282507247_dp, 187.24910181582314_dp, 268.2384452991122_dp,& + 386.33916361080026_dp, 559.8711155854782_dp, 817.5377393277938_dp, 1206.597963677244_dp, 1812.5358477762866_dp, 2818.7486911520996_dp, 4751.872883766852_dp,& + 10224.75043407236_dp, 0.2949833929923809_dp, 0.3220167305947149_dp, 0.37912854664712514_dp, 0.4726893344740349_dp, 0.6130690229748341_dp, 0.815855353412895_dp,& + 1.103786627022251_dp, 1.5096476978683913_dp, 2.0805275568641997_dp, 2.8840571372482406_dp, 4.0175653372807405_dp, 5.6215679248366985_dp, 7.899729561825618_dp,& + 11.148556975090484_dp, 15.801822722811611_dp, 22.49747280636011_dp, 32.179229771450665_dp, 46.2526111584764_dp, 66.82858029050779_dp, 97.11489993975235_dp,& + 142.07650817080304_dp, 209.6486242985047_dp, 313.28112229681227_dp, 478.2993974050695_dp, 761.3056079394062_dp, 1324.411398249371_dp, 2831.738972704671_dp, 10731.431828374814_dp] + aw%aw_erange_matrix(:, 6) = [0.14873276811274175_dp, 0.4602604435552678_dp, 0.8156202251610892_dp, 1.2496712569060364_dp, 1.8063333929867138_dp, 2.5436216992100222_dp,& + 3.5404623300065525_dp, 4.906249870587573_dp, 6.794488603605298_dp, 9.422467064090277_dp, 13.09985016154952_dp, 18.270496883841385_dp, 25.573981534747755_dp,& + 35.93662127761815_dp, 50.706943480264954_dp, 71.85851387250909_dp, 102.29562759788192_dp, 146.31752861965646_dp, 210.33006795552657_dp, 303.95126003728876_dp,& + 441.76539937885485_dp, 646.211368042272_dp, 952.6710416909058_dp, 1419.5536773254755_dp, 2152.239930114691_dp, 3375.245128381901_dp, 5728.981212116223_dp,& + 12382.677743050794_dp, 0.29978212482122407_dp, 0.3281783565393207_dp, 0.38828614617008406_dp, 0.4870536747556686_dp, 0.6358284060736311_dp, 0.8517463850003115_dp,& + 1.159944468384693_dp, 1.5968934307453053_dp, 2.2153322272555918_dp, 3.0915535322808045_dp, 4.336186457224601_dp, 6.110220047392288_dp, 8.648930492647603_dp,& + 12.297804765083454_dp, 17.566800104918254_dp, 25.212855803295792_dp, 36.36638248551193_dp, 52.727201300860486_dp, 76.87269143077049_dp, 112.75446596355195_dp,& + 166.53426131891115_dp, 248.1027496502268_dp, 374.209851157723_dp, 576.1670830958_dp, 923.1971063861915_dp, 1612.0060664213056_dp, 3447.1144071775916_dp, 13034.665823606138_dp] + aw%aw_erange_matrix(:, 7) = [0.1502608626762777_dp, 0.46529381929136415_dp, 0.8255984287192656_dp, 1.2673137696821588_dp, 1.836171369209371_dp, 2.5928648745864002_dp,& + 3.620360959868694_dp, 5.03420711947541_dp, 6.997322718003583_dp, 9.741445894989209_dp, 13.598470784165613_dp, 19.046535582715773_dp, 26.77821561373657_dp,& + 37.802020863101404_dp, 53.59437014367614_dp, 76.32857147441665_dp, 109.22216155171537_dp, 157.0678149109126_dp, 227.05242355977109_dp, 330.03689277986626_dp,& + 482.59561279417204_dp, 710.3800419453736_dp, 1054.0275615855337_dp, 1580.7806999365232_dp, 2411.814227215001_dp, 3804.1445503572704_dp, 6487.450697686814_dp,& + 14065.757793553257_dp, 0.30291165139633314_dp, 0.33222125521586104_dp, 0.39434230166254536_dp, 0.49662265274183637_dp, 0.6510887543947779_dp, 0.8759576781503452_dp,& + 1.1980509194264035_dp, 1.65644466400815_dp, 2.3078985102205145_dp, 3.2349123916804046_dp, 4.557716389303409_dp, 6.452190401185147_dp, 9.17678285087093_dp,& + 13.11317617239606_dp, 18.828100900733247_dp, 27.16794809144496_dp, 39.40475025321865_dp, 57.46370759694749_dp, 84.28289069496383_dp, 124.394912066618_dp,& + 184.90546198899864_dp, 277.2608566102862_dp, 420.8506637137679_dp, 651.7708792506397_dp, 1049.2452864243335_dp, 1837.0994387864066_dp, 3929.4241467171732_dp, 14836.654624922767_dp] + aw%aw_erange_matrix(:, 8) = [0.15216067096721872_dp, 0.471565223326128_dp, 0.8380780093696487_dp, 1.28948169785262_dp, 1.8738495345723247_dp, 2.6553598559323834_dp,& + 3.7222688062985685_dp, 5.19822827508094_dp, 7.258634966635491_dp, 10.154495182186366_dp, 14.247532860539385_dp, 20.062185372368273_dp, 28.363094298620563_dp,& + 40.27130480928199_dp, 57.43960199384115_dp, 82.31880941446532_dp, 118.5650689039139_dp, 171.66758912191602_dp, 249.9251651508212_dp, 365.9837744748739_dp,& + 539.3021607201113_dp, 800.2307440291746_dp, 1197.160479701725_dp, 1810.4543604483329_dp, 2784.8104361839814_dp, 4425.491363293105_dp, 7593.770462224588_dp,& + 16532.026633916616_dp, 0.30680462287335947_dp, 0.33727803632012604_dp, 0.40197064053453857_dp, 0.5087540933684152_dp, 0.6705478410902993_dp, 0.9069974242331109_dp,& + 1.247162385748679_dp, 1.7336002070451948_dp, 2.428475465424688_dp, 3.422685558563218_dp, 4.849534981128361_dp, 6.905320699402122_dp, 9.88048894377267_dp,& + 14.207072801318644_dp, 20.53138622494952_dp, 29.82621577753499_dp, 43.56537666330866_dp, 63.997988617140564_dp, 94.58522278172896_dp, 140.7101667657315_dp,& + 210.87312430131763_dp, 318.83821988553984_dp, 487.951265473417_dp, 761.4827237292491_dp, 1233.5478315642981_dp, 2167.935258865102_dp, 4639.411026254049_dp, 17485.041970829057_dp] + aw%aw_erange_matrix(:, 9) = [0.1540799216139811_dp, 0.47791627634651673_dp, 0.850769563354445_dp, 1.3121430573119903_dp, 1.9125794571765222_dp, 2.71995838496797_dp,& + 3.8281934943752236_dp, 5.369664505300357_dp, 7.533297508669478_dp, 10.591136793513773_dp, 14.937707413108372_dp, 21.14872971257977_dp, 30.069271553254573_dp,& + 42.94695048821831_dp, 61.63452932012581_dp, 88.90016193695817_dp, 128.90594661034356_dp, 187.95199381913332_dp, 275.6440545272999_dp, 406.74745153174376_dp,& + 604.1811788842098_dp, 903.9925961038582_dp, 1364.0684178021952_dp, 2080.9739321821835_dp, 3228.5707596988204_dp, 5171.757203514712_dp, 8933.185118640264_dp,& + 19534.126420802_dp, 0.31073990046537614_dp, 0.3424211000331794_dp, 0.40978979014005723_dp, 0.5212783171859456_dp, 0.6907658913737462_dp, 0.9394414583345747_dp,& + 1.2987972772142504_dp, 1.8151994912799103_dp, 2.556766327946643_dp, 3.6237110927440117_dp, 5.163950286772281_dp, 7.396774913472435_dp, 10.648956311521417_dp,& + 15.410163693505844_dp, 22.418599460431437_dp, 32.7943079459921_dp, 48.24841432234958_dp, 71.4147546141822_dp, 106.38218646397881_dp, 159.56520008768115_dp,& + 241.17359283608667_dp, 367.8412274406162_dp, 567.849453755969_dp, 893.4358642502303_dp, 1457.1994566202313_dp, 2571.939694554795_dp, 5508.2172091289185_dp, 20720.162172438253_dp] + aw%aw_erange_matrix(:, 10) = [0.15656226451877622_dp, 0.4861541997731515_dp, 0.8673131850431656_dp, 1.3418609364967635_dp, 1.9636960012374267_dp, 2.805769901664884_dp,& + 3.969811694463799_dp, 5.600354203716589_dp, 7.905313246191792_dp, 11.186501541338686_dp, 15.88524322405582_dp, 22.65105407014549_dp, 32.44576099810582_dp,& + 46.702425471088645_dp, 67.5696101585034_dp, 98.28954732885543_dp, 143.78811859550652_dp, 211.6029698300622_dp, 313.35735776243826_dp, 467.1276302319483_dp,& + 701.3067172895998_dp, 1061.0705297754337_dp, 1619.7132862760398_dp, 2500.373676035913_dp, 3925.0320573338013_dp, 6356.748668419306_dp, 11081.327581159301_dp,& + 24381.679371671577_dp, 0.3158335009912212_dp, 0.34912565992572775_dp, 0.4200753104160631_dp, 0.5378896525589358_dp, 0.7177805773200047_dp, 0.9830934888999047_dp,& + 1.368743715763372_dp, 1.9264972868488104_dp, 2.732981028075031_dp, 3.9018333932401776_dp, 5.602211794669996_dp, 8.087135781098235_dp, 11.737161876852092_dp,& + 17.128136373382_dp, 25.137060567441367_dp, 37.10879805120811_dp, 55.12084225228906_dp, 82.40796079967193_dp, 124.05157534923438_dp, 188.11812693397164_dp,& + 287.5913676589109_dp, 443.82063547247185_dp, 693.2803515796006_dp, 1103.1543539828035_dp, 1816.6489638049509_dp, 3226.5521973584873_dp, 6920.118346610322_dp, 25967.01374573565_dp] + aw%aw_erange_matrix(:, 11) = [0.15881564616129193_dp, 0.4936556598653273_dp, 0.8824588841815081_dp, 1.3692457113825114_dp, 2.0111264485492355_dp, 2.885950423092618_dp,& + 4.103059689428933_dp, 5.818927316225091_dp, 8.260287362001002_dp, 11.75871117291467_dp, 16.802727948824526_dp, 24.116981065069147_dp, 34.78330983777523_dp,& + 50.42729724265466_dp, 73.50780317707246_dp, 107.76979904893427_dp, 158.95837591286625_dp, 235.95442692125644_dp, 352.598636504137_dp, 530.6546935517891_dp,& + 804.6962971730163_dp, 1230.3548358289224_dp, 1898.8241278088317_dp, 2964.5082086762377_dp, 4706.457126412182_dp, 7704.024872038893_dp, 13551.675236040213_dp,& + 30000.20611112028_dp, 0.3204610031116597_dp, 0.3552640894565443_dp, 0.4295842351097504_dp, 0.5533833088806153_dp, 0.7431779324839743_dp, 1.0244390610175549_dp,& + 1.4354819295430314_dp, 2.0334801056157183_dp, 2.903655037921023_dp, 4.1733290625525665_dp, 6.0335143863200065_dp, 8.772275269918612_dp, 12.82662526184919_dp,& + 18.863835903341464_dp, 27.909803652722584_dp, 41.55338127934832_dp, 62.27454140110857_dp, 93.97671287155796_dp, 142.86069930469114_dp, 218.88238290006603_dp,& + 338.2447047196054_dp, 527.8483016510384_dp, 833.9328380491752_dp, 1341.6124089588006_dp, 2230.6304097502575_dp, 3987.780431784136_dp, 8568.294988757902_dp,& + 32079.26783423429_dp] + aw%aw_erange_matrix(:, 12) = [0.1610939781339949_dp, 0.5012631407780889_dp, 0.8978984268667602_dp, 1.3973374389835533_dp, 2.0601052994909983_dp, 2.9693037686025625_dp,& + 4.2425076374898465_dp, 6.049209333425932_dp, 8.63683304888055_dp, 12.369947100756928_dp, 17.78988041970464_dp, 25.70606845547581_dp, 37.33707453593626_dp,& + 54.529958798718575_dp, 80.10419787720568_dp, 118.39528522114581_dp, 176.12137581924918_dp, 263.7777454271281_dp, 397.90331695679896_dp, 604.8077130867456_dp,& + 926.7903239830885_dp, 1432.7407682152939_dp, 2236.883538210146_dp, 3534.396483826615_dp, 5679.4632854654_dp, 9404.641424310748_dp, 16707.201153452228_dp,& + 37236.60159840964_dp, 0.3251433866999734_dp, 0.3615219000652313_dp, 0.43936851892508155_dp, 0.5694605971527937_dp, 0.7697318471818748_dp, 1.0679770987543238_dp,& + 1.5062564601488997_dp, 2.147747329286371_dp, 3.0872938959644456_dp, 4.467674438671821_dp, 6.504813446418115_dp, 9.527106074077976_dp, 14.03718906734335_dp,& + 20.809713515195543_dp, 31.04736871222941_dp, 46.63203851421735_dp, 70.53290909444102_dp, 107.47651145953795_dp, 165.06008557957134_dp, 255.62996703107464_dp,& + 399.52200422464244_dp, 630.8696403435848_dp, 1008.8071793310638_dp, 1642.3274927796938_dp, 2759.7196504068343_dp, 4970.842422998521_dp, 10706.437123051388_dp, 39993.678157447954_dp] + aw%aw_erange_matrix(:, 13) = [0.16286202517738316_dp, 0.5071829401058993_dp, 0.9099691167949224_dp, 1.4194239255890508_dp, 2.0988437736405245_dp, 3.0356259048953707_dp,& + 4.35412840156482_dp, 6.2346505351972965_dp, 8.941919073444248_dp, 12.868307590765278_dp, 18.599987337738977_dp, 27.01899385998513_dp, 39.46194816028856_dp,& + 57.968842841688435_dp, 85.67620223471917_dp, 127.4437361103542_dp, 190.86221942438462_dp, 287.8902318415413_dp, 437.5401948107147_dp, 670.3390916786248_dp,& + 1035.844707784025_dp, 1615.5694884106663_dp, 2545.9657775567157_dp, 4062.078331546931_dp, 6592.278861303402_dp, 11020.719723335082_dp, 19740.079474062593_dp,& + 44247.269653501586_dp, 0.32877960783872057_dp, 0.36641441495071897_dp, 0.44708193429055737_dp, 0.5822306885078613_dp, 0.7909661025753427_dp, 1.1030159511231001_dp,& + 1.5635761654481883_dp, 2.2408877406025356_dp, 3.237972207764307_dp, 4.710846444376257_dp, 6.896950066089331_dp, 10.159810780070979_dp, 15.059747172258659_dp,& + 22.466688314211762_dp, 33.741746573072334_dp, 51.032123644139766_dp, 77.75480860637037_dp, 119.39847679866706_dp, 184.86920459563467_dp, 288.78280596198823_dp,& + 455.4522326064931_dp, 726.0680539550964_dp, 1172.5112874975482_dp, 1927.6011121765132_dp, 3268.0690080523195_dp, 5925.0502577809875_dp, 12791.74491637296_dp, 47700.6553314684_dp] + aw%aw_erange_matrix(:, 14) = [0.16550588765942553_dp, 0.516062009336416_dp, 0.9281674926129342_dp, 1.4529297711024542_dp, 2.1579962800811443_dp, 3.1375655705474386_dp,& + 4.526824919336864_dp, 6.52346781619548_dp, 9.420301579076966_dp, 13.655208883851635_dp, 19.888399623526567_dp, 29.122872846718497_dp, 42.89382564991708_dp,& + 63.56900112741913_dp, 94.82915018373326_dp, 142.44372123087916_dp, 215.53542531034506_dp, 328.6632843331655_dp, 505.2926101128234_dp, 783.6477805337622_dp,& + 1226.7296666006187_dp, 1939.7944616575992_dp, 3101.785623951648_dp, 5025.174302162332_dp, 8284.281861937603_dp, 14062.83179723175_dp, 25528.48971632664_dp,& + 57759.22356371914_dp, 0.3342213065985371_dp, 0.3737907231275688_dp, 0.45881732537071723_dp, 0.601819261468133_dp, 0.8237789857593867_dp, 1.1575413887012014_dp,& + 1.6533971399634884_dp, 2.3878799654780147_dp, 3.4775169315434225_dp, 5.100383812329383_dp, 7.530103230545625_dp, 11.189861262594912_dp, 16.738922378384462_dp,& + 25.212398544065515_dp, 38.249144800530594_dp, 58.46701561201135_dp, 90.0873039981285_dp, 139.9857380571293_dp, 219.48397400182492_dp, 347.4492001516725_dp,& + 555.763013631551_dp, 899.2679993238643_dp, 1474.9019487688392_dp, 2462.9199651441854_dp, 4236.78509184323_dp, 7766.730019457065_dp, 16842.450828736164_dp, 62648.76273159001_dp] + aw%aw_erange_matrix(:, 15) = [0.1678624984386396_dp, 0.5240039277065677_dp, 0.9445413343768262_dp, 1.4832899296027031_dp, 2.2119941166231323_dp, 3.231318139361639_dp,& + 4.686840531125701_dp, 6.793101100181927_dp, 9.870359826324044_dp, 14.401421486392543_dp, 21.120311419307942_dp, 31.151884233378865_dp, 46.23355566119178_dp,& + 69.07063891977168_dp, 103.9111329114676_dp, 157.48467618090592_dp, 240.55243987990312_dp, 370.4940225061482_dp, 575.6771054267826_dp, 902.9360411163456_dp,& + 1430.5655099944815_dp, 2291.326618763138_dp, 3714.3291401860997_dp, 6105.216711407023_dp, 10216.855593912702_dp, 17602.252858531945_dp, 32376.971831996485_dp,& + 73939.47243943921_dp, 0.3390761234013535_dp, 0.38042748095334855_dp, 0.46948517950905133_dp, 0.6197911244215307_dp, 0.8541350450818376_dp, 1.2083859869249218_dp,& + 1.737819635649183_dp, 2.5271580680576275_dp, 3.7063925373131634_dp, 5.475812712926834_dp, 8.145864684746673_dp, 12.201123189749161_dp, 18.403853838774207_dp,& + 27.96322210175245_dp, 42.81450321088113_dp, 66.08467665891509_dp, 102.87759879730325_dp, 161.61423975462415_dp, 256.35102809823303_dp, 410.8517040007441_dp,& + 665.8762082773686_dp, 1092.5932138672465_dp, 1818.4906655133614_dp, 3082.6261009452624_dp, 5379.192173747507_dp, 9973.306180469173_dp, 21737.4521360814_dp, 80688.08263620315_dp] + aw%aw_erange_matrix(:, 16) = [0.17036496307430077_dp, 0.5324663182632273_dp, 0.9620895318113227_dp, 1.516053047783045_dp, 2.2706890746569957_dp, 3.333970091290067_dp,& + 4.863327619652776_dp, 7.092693187729123_dp, 10.374220724548097_dp, 15.243403064520715_dp, 22.521699980194235_dp, 33.47979649400302_dp, 50.09973367935207_dp,& + 75.49983243992041_dp, 114.63042911159955_dp, 175.42509396717406_dp, 270.7269739485002_dp, 421.55091333978646_dp, 662.6791216153256_dp, 1052.3953320146977_dp,& + 1689.6875070139436_dp, 2745.231543799062_dp, 4518.674628346486_dp, 7549.367766712861_dp, 12851.219414149484_dp, 22522.974006977485_dp, 42073.064211266406_dp,& + 97154.3497922795_dp, 0.3442359726520383_dp, 0.38754007185862954_dp, 0.4810326806451499_dp, 0.6394198647471336_dp, 0.8875587091716534_dp, 1.2648037235106746_dp,& + 1.8322244813392865_dp, 2.684145960116962_dp, 3.966500195829279_dp, 5.906140569869111_dp, 8.858010554137483_dp, 13.381685635639329_dp, 20.36673130214467_dp,& + 31.24005706702999_dp, 48.31255482932005_dp, 75.36517063974274_dp, 118.6518389635584_dp, 188.6382478887288_dp, 303.059337317903_dp, 492.38182357709826_dp,& + 809.7503916539654_dp, 1349.5688287135445_dp, 2283.7129470839764_dp, 3938.318929170714_dp, 6988.303443289154_dp, 13136.528535241805_dp, 28826.90535778617_dp, 106792.5668680263_dp] + aw%aw_erange_matrix(:, 17) = [0.17269556592412857_dp, 0.5403748964029321_dp, 0.9785852679690707_dp, 1.5470653817948434_dp, 2.3266514376923366_dp, 3.4325577583865416_dp,& + 5.0340686756366715_dp, 7.384684578834457_dp, 10.86904453036137_dp, 16.076821539981736_dp, 23.92028394592648_dp, 35.82315617144631_dp, 54.02701058174775_dp,& + 82.09339856008381_dp, 125.73557580722034_dp, 194.2117754907147_dp, 302.6873267691643_dp, 476.2910454873438_dp, 757.1780279061045_dp, 1217.01315551735_dp,& + 1979.4070403165824_dp, 3261.0324543098973_dp, 5448.912148191038_dp, 9251.68321181564_dp, 16020.743424436212_dp, 28570.382753480066_dp, 54229.78154218437_dp,& + 126696.56228762324_dp, 0.3490457636631589_dp, 0.39422579301772903_dp, 0.49199588231797214_dp, 0.6582220201025798_dp, 0.9198335281974843_dp, 1.3197051837498925_dp,& + 1.9248079614290126_dp, 2.839336845230337_dp, 4.225765459102832_dp, 6.338790677137095_dp, 9.580492391710184_dp, 14.590781522893115_dp, 22.39718076042754_dp,& + 34.665500315997214_dp, 54.12415292925981_dp, 85.29113057050759_dp, 135.73577535381042_dp, 218.29950108939332_dp, 355.0638815393454_dp, 584.5607922611614_dp,& + 975.1302787959035_dp, 1650.2897030531005_dp, 2838.7772270165033_dp, 4980.693094157311_dp, 8991.001468037319_dp, 17151.64888313862_dp, 37936.68288424044_dp, 140330.3757792011_dp] + aw%aw_erange_matrix(:, 18) = [0.17476493191141415_dp, 0.5474193940515534_dp, 0.9933573948794411_dp, 1.5750134784958338_dp, 2.3774182245590976_dp, 3.5225875266569684_dp,& + 5.191031053231731_dp, 7.65493753438325_dp, 11.330235095244555_dp, 16.85924390942949_dp, 25.24328503055809_dp, 38.05761248430254_dp, 57.80337969002844_dp,& + 88.49020666120597_dp, 136.61135242458343_dp, 212.79570615428042_dp, 334.6422749519929_dp, 531.6505866599738_dp, 853.9241940929868_dp, 1387.782907449122_dp,& + 2284.2677480183024_dp, 3812.2510844331973_dp, 6459.925409369088_dp, 11136.186670622694_dp, 19600.27283250913_dp, 35545.19130000765_dp, 68536.45729392112_dp,& + 161999.07322111004_dp, 0.35331994251863175_dp, 0.4002125878121666_dp, 0.5019021590207834_dp, 0.675348992397178_dp, 0.9494484180546069_dp, 1.370438471536318_dp,& + 2.010972421797265_dp, 2.984828447386733_dp, 4.47068346087602_dp, 6.7507629145842705_dp, 10.274207336138101_dp, 15.761962819310062_dp, 24.382228769987734_dp,& + 38.04723731915354_dp, 59.92133877283344_dp, 95.30210365832416_dp, 153.1695274726372_dp, 248.9507054460044_dp, 409.5337510421667_dp, 682.5234878783859_dp,& + 1153.6752246200758_dp, 1980.5529864545388_dp, 3459.8436855153436_dp, 6170.831685857496_dp, 11326.739601304256_dp, 21929.575378095506_dp, 48923.087093047834_dp, 180801.94440922138_dp] + aw%aw_erange_matrix(:, 19) = [0.17707349703529857_dp, 0.5553034658173043_dp, 1.0099791730991756_dp, 1.6066610726001294_dp, 2.4352859938075695_dp, 3.6258937322871367_dp,& + 5.372347774805723_dp, 7.969256176272777_dp, 11.870406472074928_dp, 17.78239069764118_dp, 26.81626145155005_dp, 40.73582235231918_dp, 62.36857184593184_dp,& + 96.29361499410518_dp, 150.00711005408417_dp, 235.9221311383991_dp, 374.8476146182405_dp, 602.1299577709411_dp, 978.6687811138307_dp, 1611.0196047848676_dp,& + 2688.7838466688286_dp, 4555.662141059458_dp, 7848.009593576401_dp, 13774.881010275332_dp, 24721.57253813353_dp, 45756.96334453548_dp, 89961.78780041506_dp,& + 215802.3342656405_dp, 0.3580921418111161_dp, 0.40694849130748023_dp, 0.5131489467923581_dp, 0.6949501550098907_dp, 0.9835895138470994_dp, 1.429340141748686_dp,& + 2.1117265083379655_dp, 3.156213050221744_dp, 4.761412846546327_dp, 7.243742288102652_dp, 11.111375537133872_dp, 17.187982478782033_dp, 26.82207794053154_dp,& + 42.2454800002888_dp, 67.19501324394297_dp, 108.0057380925622_dp, 175.56201559076507_dp, 288.83560003555107_dp, 481.41389562366794_dp, 813.7768209755345_dp,& + 1396.8818687993016_dp, 2438.628712875254_dp, 4338.525137576797_dp, 7891.642771451579_dp, 14783.538737749648_dp, 29163.479733223845_dp, 65827.4645722146_dp, 243179.26518144744_dp] + aw%aw_erange_matrix(:, 20) = [0.17939121623291196_dp, 0.5632460962554191_dp, 1.0268207360191903_dp, 1.6389441207178375_dp, 2.494730975718965_dp, 3.732765899075506_dp,& + 5.561259778907539_dp, 8.299124280524993_dp, 12.441566280835362_dp, 18.766165667383223_dp, 28.506386171958923_dp, 43.638584384879934_dp, 67.36224738878316_dp,& + 104.91328976480246_dp, 164.9591150046168_dp, 262.0244972943479_dp, 420.7723136732652_dp, 683.6778754860417_dp, 1125.0251624529246_dp, 1876.914526701929_dp,& + 3178.594976788772_dp, 5472.221732744173_dp, 9593.809960559516_dp, 17167.666568195575_dp, 31469.64998425534_dp, 59575.37273864424_dp, 119738.62770948543_dp,& + 292181.0961057968_dp, 0.36288753563601406_dp, 0.4137727803438694_dp, 0.5246525197888982_dp, 0.7151692528977265_dp, 1.0190794875976732_dp, 1.4910294440355354_dp,& + 2.2180532993489983_dp, 3.3385033549868535_dp, 5.073189714925689_dp, 7.776982900408857_dp, 12.025161831532559_dp, 18.759485999109437_dp, 29.538246648034107_dp,& + 46.969812152842266_dp, 75.47470761821671_dp, 122.64510922855702_dp, 201.70899555206492_dp, 336.0740868831789_dp, 567.8651913799991_dp, 974.2972338202875_dp,& + 1699.8017696089582_dp, 3020.746535916867_dp, 5480.209144976741_dp, 10183.145007147052_dp, 19511.673781213012_dp, 39328.72129742758_dp, 90071.79118231079_dp, 332938.41349157074_dp] + aw%aw_erange_matrix(:, 21) = [0.18145787532761345_dp, 0.5703516980411364_dp, 1.041969987100468_dp, 1.668169762478659_dp, 2.548905102202213_dp, 3.8308153868700057_dp,& + 5.73575077606394_dp, 8.605924764080692_dp, 12.976605854940628_dp, 19.694664135422833_dp, 30.114196205027547_dp, 46.4231488999098_dp, 72.19529201520032_dp,& + 113.33495114684222_dp, 179.71600233232834_dp, 288.0668684898181_dp, 467.1287314532969_dp, 767.0353863539326_dp, 1276.6863337842099_dp, 2156.5782398644915_dp,& + 3702.2394624534754_dp, 6469.865405622618_dp, 11532.348640847953_dp, 21019.959826658564_dp, 39325.54785388118_dp, 76112.75783759716_dp, 156400.96081191118_dp,& + 388429.5049686922_dp, 0.3671671269112481_dp, 0.41991063535051504_dp, 0.5350925824270352_dp, 0.7336661302058223_dp, 1.051784230902112_dp, 1.5482836110025917_dp,& + 2.31745277890254_dp, 3.510201538782171_dp, 5.369167048208645_dp, 8.287401135959756_dp, 12.907497398486063_dp, 20.29096603628255_dp, 32.211289400182395_dp,& + 51.667875628946675_dp, 83.80064093288466_dp, 137.54326768587123_dp, 228.6628977463769_dp, 385.45278105561033_dp, 659.609584732442_dp, 1147.48083087963_dp,& + 2032.5976860626631_dp, 3673.224580494971_dp, 6788.760553221407_dp, 12875.900072438904_dp, 25223.35236302233_dp, 51966.7592745666_dp, 120920.32428947231_dp, 447736.17541344964_dp] + aw%aw_erange_matrix(:, 22) = [0.18352365749998711_dp, 0.5774767415391759_dp, 1.0572402465072317_dp, 1.6978091130093156_dp, 2.604194412635273_dp, 3.931521110681753_dp,& + 5.916123772874016_dp, 8.925163169995924_dp, 13.537158542380958_dp, 20.674441611900086_dp, 31.823697567083265_dp, 49.40770243187122_dp, 77.4199205005401_dp,& + 122.5224666728988_dp, 195.97318566547537_dp, 317.0604624119025_dp, 519.3281914726538_dp, 862.0631903466981_dp, 1451.9161062243747_dp, 2484.485489661112_dp,& + 4326.234527544991_dp, 7680.233304404955_dp, 13931.912588144245_dp, 25897.50172535608_dp, 49530.68109870176_dp, 98224.55152386216_dp, 206939.49053745338_dp,& + 524566.9562885154_dp, 0.3714484036559812_dp, 0.4260967455633218_dp, 0.5457049480928435_dp, 0.7526107268819361_dp, 1.085512849361448_dp, 1.6077308109599637_dp,& + 2.421373349769565_dp, 3.690999486571998_dp, 5.683179798418424_dp, 8.83322260839823_dp, 13.858958047223895_dp, 21.957146639909727_dp, 35.147034069885805_dp,& + 56.87996069901934_dp, 93.13791144680825_dp, 154.44652085662315_dp, 259.63116034555344_dp, 442.9649858732788_dp, 768.0687208011793_dp, 1355.5892058006805_dp,& + 2439.7899569103974_dp, 4487.76072780871_dp, 8459.538519483716_dp, 16402.660399711818_dp, 32921.61554906603_dp, 69533.14758216766_dp, 164947.39394785516_dp, 612800.2731138045_dp] + aw%aw_erange_matrix(:, 23) = [0.1865127174002091_dp, 0.5878264119237888_dp, 1.0795642254870847_dp, 1.7414647079050736_dp, 2.686262513059428_dp, 4.082172829391877_dp,& + 6.188096843488031_dp, 9.410456034264666_dp, 14.396547620814117_dp, 22.190018755083887_dp, 34.49317521293508_dp, 54.11536762065149_dp, 85.74999790790363_dp,& + 137.3406746169067_dp, 222.5209261857046_dp, 365.04500319056837_dp, 606.9830522872659_dp, 1024.1840598017022_dp, 1756.0972227796592_dp, 3064.6905800265477_dp,& + 5454.026428632921_dp, 9920.369530831516_dp, 18493.617558448037_dp, 35457.83700573299_dp, 70250.70208206157_dp, 144978.57163654402_dp, 318662.0049240475_dp,& + 837598.2931640423_dp, 0.3776493979310916_dp, 0.435138768215793_dp, 0.5613788375562351_dp, 0.7808493636204112_dp, 1.1362155303193089_dp, 1.6978417615255126_dp,& + 2.5802450840754427_dp, 3.9698657023594675_dp, 6.172064932079413_dp, 9.69144120022167_dp, 15.370728380706238_dp, 24.634198247900454_dp, 39.92036731837176_dp,& + 65.46330289853823_dp, 108.72733676148118_dp, 183.09024363050807_dp, 312.9622216519181_dp, 543.7670826405075_dp, 961.8761857704002_dp, 1735.4901623013577_dp,& + 3201.003196409115_dp, 6051.665762920312_dp, 11766.014824513828_dp, 23628.41759091035_dp, 49336.106221828624_dp, 108694.3328979675_dp, 267237.7291173849_dp, 1002021.1700926761_dp] + aw%aw_erange_matrix(:, 24) = [0.18910898992309827_dp, 0.5968553778314455_dp, 1.099179600396227_dp, 1.7801437973508598_dp, 2.7596026949493577_dp, 4.217972884397996_dp,& + 6.435421861591648_dp, 9.855784799002635_dp, 15.192663835695727_dp, 23.608087390187727_dp, 37.01748316805854_dp, 58.61754075464745_dp, 93.81326580419346_dp,& + 151.87161660723567_dp, 248.92100011282085_dp, 413.49172640188107_dp, 696.9547246299024_dp, 1193.621061792798_dp, 2080.3822432854854_dp, 3696.998493291677_dp,& + 6713.636172345608_dp, 12492.44299238403_dp, 23898.55659235671_dp, 47203.17808379973_dp, 96805.96561293019_dp, 207957.8998427237_dp, 477933.1522768045_dp,& + 1308114.0012041177_dp, 0.3830416352614052_dp, 0.4430819114148896_dp, 0.5753071318246739_dp, 0.8061988913511784_dp, 1.182158486497417_dp, 1.7802506103346156_dp,& + 2.726920016454761_dp, 4.229882717633601_dp, 6.632680284308672_dp, 10.509000784328796_dp, 16.82784984813855_dp, 27.24691097632485_dp, 44.64167580356611_dp,& + 74.07592303550199_dp, 124.61429974186086_dp, 212.77537227876334_dp, 369.25379542370973_dp, 652.3218043365148_dp, 1175.259654699904_dp, 2164.1710677218566_dp,& + 4083.922692671305_dp, 7922.927093368247_dp, 15865.524351752772_dp, 32963.81111451602_dp, 71590.44785506214_dp, 164831.2803483035_dp, 422312.83970923733_dp, 1607194.846517409_dp] + aw%aw_erange_matrix(:, 25) = [0.19132297837375925_dp, 0.6045842212401715_dp, 1.116075239909931_dp, 1.8137003319341403_dp, 2.823703852560562_dp, 4.3375571365379555_dp,& + 6.654879506061997_dp, 10.25406160102038_dp, 15.910566848875042_dp, 24.8980512789274_dp, 39.33518360062533_dp, 62.79250184241327_dp, 101.37073372724154_dp,& + 165.64870251297975_dp, 274.26536197966556_dp, 460.63593723457706_dp, 785.8148240324404_dp, 1363.7143426301643_dp, 2411.848280798477_dp, 4356.437870983105_dp,& + 8057.345689393333_dp, 15307.674322294604_dp, 29991.967793708438_dp, 60909.637552873915_dp, 129092.68815909834_dp, 288420.9208707836_dp, 693804.4807934643_dp,& + 1984726.5657356782_dp, 0.38764444414599436_dp, 0.4499221966702515_dp, 0.5874206914731522_dp, 0.8284384818447332_dp, 1.2227914287059967_dp, 1.8537196608025412_dp,& + 2.858764193877508_dp, 4.46563291856233_dp, 7.054128800394659_dp, 11.264308056241072_dp, 18.18795719360849_dp, 29.712689970242995_dp, 49.150504691840844_dp,& + 82.40656726563064_dp, 140.1950401391153_dp, 242.32987003504195_dp, 426.2290660460464_dp, 764.2086384943232_dp, 1399.6697911963972_dp, 2625.280715869226_dp,& + 5058.106540783201_dp, 10048.454253234977_dp, 20681.146673725165_dp, 44371.40116757773_dp, 100098.51304747425_dp, 240936.64519318528_dp, 645993.0255202315_dp, 2511145.760363479_dp] + aw%aw_erange_matrix(:, 26) = [0.19436594608582472_dp, 0.6152519388154075_dp, 1.1395565637382394_dp, 1.860708304267537_dp, 2.914238339347287_dp, 4.507855666735311_dp,& + 6.970054206984331_dp, 10.831076997871907_dp, 16.960267570555793_dp, 26.802718362766388_dp, 42.793217314755324_dp, 69.09173097076558_dp, 112.91204543512235_dp,& + 186.9652299761567_dp, 314.0415178600245_dp, 535.7867637150474_dp, 929.9119488429988_dp, 1644.8265501191415_dp, 2971.387935288634_dp, 5496.481343756791_dp,& + 10444.205167643195_dp, 20466.948914951925_dp, 41573.49202713281_dp, 88115.73197659155_dp, 196655.41477188517_dp, 468312.0718363519_dp, 1218658.020501648_dp,& + 3790777.501461529_dp, 0.39397762301074635_dp, 0.4594261340249453_dp, 0.6044348272087624_dp, 0.8599749829785104_dp, 1.2809242553853217_dp, 1.959763999342232_dp,& + 3.0508139495699504_dp, 4.812352417460658_dp, 7.680299553389941_dp, 12.398744349822774_dp, 20.2545889010679_dp, 33.50625966016763_dp, 56.1810053198472_dp,& + 95.58665349028226_dp, 165.23942057994483_dp, 290.66767214215037_dp, 521.2161338636482_dp, 954.7499892270533_dp, 1791.0386147663526_dp, 3451.3628492991857_dp,& + 6857.78940921672_dp, 14117.121205871057_dp, 30292.355037472884_dp, 68308.93744588633_dp, 163720.9776403595_dp, 424479.54068993696_dp, 1238540.16298379_dp,& + 5075528.538071685_dp] + aw%aw_erange_matrix(:, 27) = [0.19682681061058516_dp, 0.6239175967168831_dp, 1.1587697829037367_dp, 1.899493134270955_dp, 2.9895781441779548_dp, 4.650804912675836_dp,& + 7.236967535355107_dp, 11.324261660542758_dp, 17.866223883633104_dp, 28.463640303603217_dp, 45.84226954217273_dp, 74.71248548146892_dp, 123.3437137988759_dp,& + 206.5036090144391_dp, 351.0605506141016_dp, 606.9104628799121_dp, 1068.8355016906876_dp, 1921.4860373237475_dp, 3534.938103259401_dp, 6675.151370185142_dp,& + 12987.084625450672_dp, 26158.425843963676_dp, 54887.04107632314_dp, 120986.04511920984_dp, 283491.0124779256_dp, 718729.5124126623_dp, 2032037.8454332922_dp,& + 6994905.371452202_dp, 0.39910525153739623_dp, 0.46720011780848775_dp, 0.618510057951796_dp, 0.8863247571224414_dp, 1.3299488054374997_dp, 2.050026502879363_dp,& + 3.21586179306573_dp, 5.113357675674665_dp, 8.229788884254283_dp, 13.40574530515295_dp, 22.111763971910367_dp, 36.960758258119995_dp, 62.6753790751042_dp,& + 107.95244981242995_dp, 189.13916327630196_dp, 337.6660556617939_dp, 615.5008714320224_dp, 1148.2967230500535_dp, 2199.040277147706_dp, 4338.370096055334_dp,& + 8857.05088458885_dp, 18820.230015785593_dp, 41940.375294296646_dp, 99039.96110832106_dp, 251532.47511127745_dp, 702946.2892638468_dp, 2257925.6950304266_dp, 10050972.42119658_dp] + aw%aw_erange_matrix(:, 28) = [0.20028753559878754_dp, 0.636163845466183_dp, 1.1861370761903154_dp, 1.9552398102278608_dp, 3.0988787201672205_dp, 4.860155327990237_dp,& + 7.631666931241998_dp, 12.060973589284364_dp, 19.234093080159262_dp, 31.000249030237566_dp, 50.55650397769404_dp, 83.5192836105384_dp, 139.92647812445165_dp,& + 238.0575763348749_dp, 411.8925953402226_dp, 726.0520810993172_dp, 1306.5848049114_dp, 2406.4753954062408_dp, 4550.1807639341105_dp, 8866.114556558668_dp,& + 17889.50386772233_dp, 37615.62178522411_dp, 83127.72557060457_dp, 195408.6566631889_dp, 497429.1250321897_dp, 1411467.9993363773_dp, 4708143.792268462_dp,& + 20982067.79050034_dp, 0.4063254337661295_dp, 0.47826913702275475_dp, 0.6387969282983723_dp, 0.9247131283500699_dp, 1.4020945643989537_dp, 2.1842105605751816_dp,& + 3.4638219546199718_dp, 5.570645148922087_dp, 9.074555435905518_dp, 14.97371681097282_dp, 25.043435353654875_dp, 42.49539020969764_dp, 73.2495448121482_dp,& + 128.4448601273465_dp, 229.52203941450034_dp, 418.8057941608578_dp, 782.2389088299047_dp, 1499.9808360221182_dp, 2963.6575509358563_dp, 6060.980474110256_dp,& + 12905.219416347047_dp, 28829.611589852855_dp, 68285.64328511298_dp, 174085.66633020202_dp, 488713.1004068534_dp, 1569108.161138_dp, 6194788.779558858_dp, 36612022.104547605_dp] + aw%aw_erange_matrix(:, 29) = [0.20148359962188625_dp, 0.6404126846191118_dp, 1.1956914499421463_dp, 1.9748404662282764_dp, 3.1375902789765524_dp, 4.934852000261182_dp,& + 7.773570595927496_dp, 12.327952344136781_dp, 19.733992303134418_dp, 31.935665896373646_dp, 52.31190662715458_dp, 86.8332262967865_dp, 146.23818287831133_dp,& + 250.21865465340818_dp, 435.66229015608553_dp, 773.3205522921141_dp, 1402.527891101972_dp, 2605.9768107615196_dp, 4977.008179815615_dp, 9810.671652583082_dp,& + 20066.047813611207_dp, 42883.66712086875_dp, 96680.36874016587_dp, 233103.28859658248_dp, 613776.5842567491_dp, 1827984.087654119_dp, 6594610.0314337425_dp,& + 34505523.772945166_dp, 0.4088233220420713_dp, 0.48213225469004667_dp, 0.6459447763036226_dp, 0.9383525242997238_dp, 1.427930574234908_dp, 2.232645680425932_dp,& + 3.5540692271124623_dp, 5.738543059876525_dp, 9.387632026047086_dp, 15.56066926581158_dp, 26.1527798090333_dp, 44.61430119999274_dp, 77.34960393660401_dp,& + 136.50197172084523_dp, 245.64488988592876_dp, 451.7568092688549_dp, 851.2535497022337_dp, 1648.713481816509_dp, 3295.0758202094717_dp, 6829.19231168343_dp,& + 14772.00579885476_dp, 33634.6146271831_dp, 81574.2303691521_dp, 214402.9977956818_dp, 627349.5338890508_dp, 2140772.611660053_dp, 9364952.860952146_dp, 68700022.28914484_dp] + case(30) + aw%energy_range(:) = [2906.0_dp, 3236.0_dp, 3810.0_dp, 4405.0_dp, 5400.0_dp, 6800.0_dp, 8400.0_dp,& + 10000.0_dp, 12000.0_dp, 15000.0_dp, 20000.0_dp, 28000.0_dp, 38000.0_dp, 50000.0_dp, 64000.0_dp, 84000.0_dp,& + 110000.0_dp, 160000.0_dp, 220000.0_dp, 370000.0_dp, 520000.0_dp, 700000.0_dp, 1100000.0_dp, 1800000.0_dp,& + 3300000.0_dp, 6000000.0_dp, 18000000.0_dp, 50000000.0_dp] + aw%aw_erange_matrix(:, 1) = [0.13472077973006066_dp, 0.41454012407362284_dp, 0.7264650127115554_dp, 1.0952103821233763_dp, 1.5507340744641087_dp, 2.1309684610148_dp,& + 2.8853353291317902_dp, 3.879435757744625_dp, 5.201430031729745_dp, 6.970811684768931_dp, 9.350560848436539_dp, 12.564071001580649_dp, 16.918834424102887_dp,& + 22.83972781830551_dp, 30.915985544342572_dp, 41.967774219335894_dp, 57.14098640727171_dp, 78.0429357516686_dp, 106.93789608418125_dp, 147.0314580515426_dp,& + 202.88978553122783_dp, 281.07180694626186_dp, 391.1193573348081_dp, 547.2093677381681_dp, 771.1975057919235_dp, 1099.0536535908907_dp, 1596.9929628828843_dp,& + 2411.043015679036_dp, 3969.4542024452535_dp, 8410.91429702379_dp, 0.2711551412973589_dp, 0.2920716478256109_dp, 0.33586025075301174_dp, 0.40657866325776965_dp,& + 0.5107331186087983_dp, 0.6578956545676304_dp, 0.8616669035192411_dp, 1.141083396755036_dp, 1.5226214332468109_dp, 2.0430277403045745_dp, 2.7533146911523487_dp,& + 3.7244090770834286_dp, 5.055161408861251_dp, 6.883741530882366_dp, 9.403917834043737_dp, 12.888423735149207_dp, 17.72269370396895_dp, 24.453949230243484_dp,& + 33.86342292727139_dp, 47.07450697595598_dp, 65.71944005664618_dp, 92.20885123968911_dp, 130.2022391295589_dp, 185.52477786139306_dp, 268.21783125503725_dp,& + 397.8749440116057_dp, 619.9912456625073_dp, 1067.5959324975324_dp, 2286.544806677275_dp, 8738.901002766614_dp] + aw%aw_erange_matrix(:, 2) = [0.13585569926755156_dp, 0.41821529920891193_dp, 0.7335359382994969_dp, 1.1072550786213582_dp, 1.5703001886119063_dp, 2.1619633106722445_dp,& + 2.9336148368913126_dp, 3.9536785393619445_dp, 5.3144254385553475_dp, 7.141352466099918_dp, 9.606222474304257_dp, 12.945295441239312_dp, 17.484938603694847_dp,& + 23.67775987140482_dp, 32.153806670690884_dp, 43.793428768676115_dp, 59.83145780414573_dp, 82.00695648247473_dp, 112.7798752913388_dp, 155.64727131571763_dp,& + 215.6109099360864_dp, 299.8834977532089_dp, 418.99426494865514_dp, 588.6278555996877_dp, 832.992868332105_dp, 1191.901753683428_dp, 1738.4527532218908_dp,& + 2633.334968802445_dp, 4346.804005514949_dp, 9226.029101357823_dp, 0.27346932244426364_dp, 0.29493396442164976_dp, 0.3399080685990791_dp, 0.4126376624973753_dp,& + 0.5199403220488905_dp, 0.6718660354991877_dp, 0.8827295318060852_dp, 1.1726225736322562_dp, 1.5695736101023368_dp, 2.11260882730488_dp, 2.8560883332106437_dp,& + 3.8758604781327994_dp, 5.278022513223343_dp, 7.211435940783844_dp, 9.88567929424256_dp, 13.596923594598676_dp, 18.765442234455477_dp, 25.990394261374576_dp,& + 36.130687740769254_dp, 50.42631140632084_dp, 70.68536095476419_dp, 99.58565375015075_dp, 141.19809034005954_dp, 201.9985700024835_dp, 293.1161927876947_dp,& + 436.16688367969607_dp, 681.1401603164769_dp, 1173.9561106510982_dp, 2513.427330670278_dp, 9596.45252078042_dp] + aw%aw_erange_matrix(:, 3) = [0.1375558839742156_dp, 0.4237299246561157_dp, 0.7441765936480988_dp, 1.1254465790607633_dp, 1.599969145991199_dp, 2.209153355047187_dp,& + 3.007419074036812_dp, 4.067629377796827_dp, 5.488551916391047_dp, 7.4052176805776915_dp, 10.003405965567303_dp, 13.540012927877152_dp, 18.37183281919031_dp,& + 24.996410070481446_dp, 34.11028053997399_dp, 46.692377235692085_dp, 64.1240439733692_dp, 88.36264595714124_dp, 122.19431621878961_dp, 169.60498916584984_dp,& + 236.33171640990545_dp, 330.6978635702647_dp, 464.9206246434375_dp, 657.2768359572758_dp, 936.038129172727_dp, 1347.6645495728708_dp, 1977.1418257598443_dp,& + 3010.365247643635_dp, 4989.502375747524_dp, 10618.098959488718_dp, 0.2769375636736402_dp, 0.2992417954352494_dp, 0.3460350190138061_dp, 0.4218590106585124_dp,& + 0.5340215517074247_dp, 0.6933277649140891_dp, 0.9152251840626363_dp, 1.221486913213276_dp, 1.642626003597483_dp, 2.2213351486133592_dp, 3.0173862657746264_dp,& + 4.114624855968743_dp, 5.630986359973453_dp, 7.732893888537386_dp, 10.656041641143203_dp, 14.735541137742192_dp, 20.449897303637602_dp, 28.485619304084782_dp,& + 39.83308706520946_dp, 55.9309260308313_dp, 78.88877991500787_dp, 111.84546669541834_dp, 159.5854467970953_dp, 229.71687105279605_dp, 335.26062431596165_dp,& + 501.33247053904597_dp, 785.6426382482606_dp, 1356.1465778665718_dp, 2902.1064912290262_dp, 11063.595563099649_dp] + aw%aw_erange_matrix(:, 4) = [0.13904406912216055_dp, 0.4285658262322887_dp, 0.7535381269110286_dp, 1.1415170467922802_dp, 1.6262961987891298_dp, 2.251219295815267_dp,& + 3.073508947298677_dp, 4.170131059288361_dp, 5.64589044652921_dp, 7.644726401563794_dp, 10.365587059435269_dp, 14.084865660094467_dp, 19.18826867042609_dp,& + 26.216290635576655_dp, 35.929400137120936_dp, 49.401912630111426_dp, 68.15783436974851_dp, 94.36850091147679_dp, 131.14193494596577_dp, 182.94990655704783_dp,& + 256.26545423428075_dp, 360.5318037841861_dp, 509.6803886172214_dp, 724.6381601758845_dp, 1037.8525105472484_dp, 1502.6329781048792_dp, 2216.1957399484836_dp,& + 3390.239707940744_dp, 5640.184567731188_dp, 12031.914357631216_dp, 0.2799747756857045_dp, 0.3030322366372613_dp, 0.35146079871870245_dp, 0.4300750514997268_dp,& + 0.5466362705834609_dp, 0.7126509028520336_dp, 0.9446233777431962_dp, 1.265903264001014_dp, 1.7093454326345185_dp, 2.3211172345101936_dp, 3.1661481858067866_dp,& + 4.3359496851147625_dp, 5.959873147875833_dp, 8.221381778008848_dp, 11.381671588892244_dp, 15.81412949615409_dp, 22.054886195529974_dp, 30.877498691173102_dp,& + 43.404310509478876_dp, 61.27480112850241_dp, 86.90579792265169_dp, 123.90910951709412_dp, 177.80590692076998_dp, 257.378170487146_dp, 377.6084511567668_dp,& + 567.2233674632031_dp, 891.8325474154066_dp, 1541.8004917177743_dp, 3298.2637895129933_dp, 12556.72637834854_dp] + aw%aw_erange_matrix(:, 5) = [0.1410960680209205_dp, 0.43524771510986004_dp, 0.7665207024486466_dp, 1.1639061919509923_dp, 1.6631581543024647_dp, 2.3104184708475035_dp,& + 3.1669893883276354_dp, 4.31584603104468_dp, 5.870689930586957_dp, 7.98866892968443_dp, 10.88837830270718_dp, 14.875483870146642_dp, 20.379381338093896_dp,& + 28.00589822144426_dp, 38.61341811457132_dp, 53.4233672664893_dp, 74.1813854349557_dp, 103.39372381185264_dp, 144.67616311753628_dp, 203.27301335960897_dp,& + 286.8373320413796_dp, 406.623030913939_dp, 579.3566390283918_dp, 830.3204498005787_dp, 1198.869283622746_dp, 1749.6835713037394_dp, 2600.2624010801505_dp,& + 4004.8623767257905_dp, 6698.999233522065_dp, 14341.174561026246_dp, 0.28416489317358423_dp, 0.30828949437487013_dp, 0.3590402711124012_dp, 0.441630361459561_dp,& + 0.5644857180354212_dp, 0.7401452754725963_dp, 0.9866774703026394_dp, 1.329777825854361_dp, 1.8058067012349928_dp, 2.4661647204139823_dp, 3.3835989597835665_dp,& + 4.661316876386105_dp, 6.44620592460885_dp, 8.948088111649072_dp, 12.46789325682324_dp, 17.439091025312962_dp, 24.488970722743385_dp, 34.52989393893134_dp,& + 48.896371819916574_dp, 69.55355936542944_dp, 99.42066613014704_dp, 142.88959294052594_dp, 206.70580521988288_dp, 301.61265861851626_dp, 445.87454058368684_dp,& + 674.2295764664547_dp, 1065.3146704916662_dp, 1846.16967438266_dp, 3948.0236905716197_dp, 15001.510222225108_dp] + aw%aw_erange_matrix(:, 6) = [0.1433674220737173_dp, 0.4426628898148459_dp, 0.7809932553639084_dp, 1.1890061029798735_dp, 1.704736489813709_dp, 2.377608587440356_dp,& + 3.273747520531666_dp, 4.483286536624551_dp, 6.130604696754322_dp, 8.388821954366914_dp, 11.500472923115659_dp, 15.807168838438361_dp, 21.792381891352697_dp,& + 30.143468661033495_dp, 41.842032467696654_dp, 58.29624138024914_dp, 81.53560861416956_dp, 114.49935191584215_dp, 161.4660067158691_dp, 228.69835105975287_dp,& + 325.4212244904479_dp, 465.3259909564963_dp, 668.9419565107365_dp, 967.5375179808443_dp, 1410.04407287766_dp, 2076.991268832287_dp, 3114.140011343559_dp,& + 4834.667209637358_dp, 8139.076115188743_dp, 17497.251222371135_dp, 0.28880597793065726_dp, 0.3141509726409205_dp, 0.3675650580459323_dp, 0.45473435293913267_dp,& + 0.5848768476213745_dp, 0.7717685864556612_dp, 1.0353639404508452_dp, 1.40420681219775_dp, 1.9189447923955225_dp, 2.637427383030786_dp, 3.6421108679020224_dp,& + 5.050847015942239_dp, 7.032663994123608_dp, 9.830952206979282_dp, 13.797695578641337_dp, 19.444278287883428_dp, 27.51733560480189_dp, 39.112759774672554_dp,& + 55.84848632682428_dp, 80.12935385306108_dp, 115.56018244354962_dp, 167.60893912635234_dp, 244.72674037424497_dp, 360.41056089443987_dp, 537.5456031771105_dp,& + 819.2944118660395_dp, 1302.3421015152915_dp, 2264.016465253404_dp, 4840.7455216590715_dp, 18353.395351716823_dp] + aw%aw_erange_matrix(:, 7) = [0.14540131106958792_dp, 0.4493201231807535_dp, 0.7940459513320671_dp, 1.2117724207523894_dp, 1.742680949975074_dp, 2.4393090166647937_dp,& + 3.372391950439403_dp, 4.6389574815944155_dp, 6.373746357911509_dp, 8.76549528730057_dp, 12.080324874755885_dp, 16.69553805190378_dp, 23.14873214645153_dp,& + 32.20953897394508_dp, 44.9849668143921_dp, 63.07490757920756_dp, 88.80297222972374_dp, 125.5611681322551_dp, 178.32791033803593_dp, 254.45242267177184_dp,& + 364.85390471544207_dp, 525.8798118900401_dp, 762.2489971360726_dp, 1111.8955650866828_dp, 1634.515787335805_dp, 2428.5690684021565_dp, 3671.812768394607_dp,& + 5743.738068689888_dp, 9729.027159680023_dp, 20999.800616241264_dp, 0.29296462129985257_dp, 0.3194381187890608_dp, 0.3753221134330865_dp, 0.46675631543264745_dp,& + 0.603721438689452_dp, 0.8011914963522677_dp, 1.0809588799458272_dp, 1.4743627941460153_dp, 2.0262889424868957_dp, 2.8010104053825082_dp, 3.8907309938858594_dp,& + 5.428124636584_dp, 7.604818108996212_dp, 10.698763243148507_dp, 15.114982641820642_dp, 21.44655967928129_dp, 30.56648418002324_dp, 43.766908758055855_dp,& + 62.972012402581825_dp, 91.06685250734347_dp, 132.41339099298463_dp, 193.68120824830095_dp, 285.2463053053247_dp, 423.7403809729896_dp, 637.3320623502533_dp,& + 978.785932422185_dp, 1565.1330028308446_dp, 2729.7495636084445_dp, 5836.893913938098_dp, 22085.748007810864_dp] + aw%aw_erange_matrix(:, 8) = [0.14704498509396693_dp, 0.4547122051327194_dp, 0.8046596707087634_dp, 1.2303750029956346_dp, 1.7738485727322384_dp, 2.490259810187349_dp,& + 3.4542822843702057_dp, 4.768871567754432_dp, 6.577734807920994_dp, 9.08321025306724_dp, 12.572096360608057_dp, 17.453197931663386_dp, 24.312214399521167_dp,& + 33.99241851749717_dp, 47.713888969755104_dp, 67.25069977138067_dp, 95.19575945076387_dp, 135.35908014067192_dp, 193.37069282272213_dp, 277.60030747331535_dp,& + 400.57327496453024_dp, 581.1788761653216_dp, 848.1843494228331_dp, 1246.0269352662644_dp, 1844.99711942575_dp, 2761.311771739057_dp, 4204.4686241418385_dp,& + 6619.444613532952_dp, 11271.466932643574_dp, 24413.71197303721_dp, 0.2963273364593187_dp, 0.32373778596338965_dp, 0.38167760520153354_dp, 0.47667488142293696_dp,& + 0.6193657530314871_dp, 0.8257586307206471_dp, 1.1192417599126105_dp, 1.533595893064965_dp, 2.1174318721030514_dp, 2.94070601543572_dp, 4.104305072137064_dp,& + 5.7541994984779885_dp, 8.10243649038172_dp, 11.458433528239942_dp, 16.275877851241827_dp, 23.223421109964608_dp, 33.291908731012114_dp, 47.958153257319175_dp,& + 69.43709408889302_dp, 101.07403138845517_dp, 147.96365128967585_dp, 217.94992175702825_dp, 323.3082261097551_dp, 483.7891734632719_dp, 732.8442123233287_dp,& + 1132.825686861123_dp, 1820.9007070932764_dp, 3185.3327939434785_dp, 6812.567149441103_dp, 25734.79348292465_dp] + aw%aw_erange_matrix(:, 9) = [0.14873028953425532_dp, 0.46025228447257244_dp,& + 0.815604068464183_dp, 1.249642730565338_dp, 1.806285223311792_dp, 2.5435423302102835_dp, 3.540333750899514_dp, 4.906044230436624_dp, 6.79416292983886_dp,& + 9.421954935784605_dp, 13.09904827265635_dp, 18.269242442139955_dp, 25.57201171534198_dp, 35.93349371466727_dp, 50.70186253663502_dp, 71.84990624465202_dp,& + 102.27999990001246_dp, 146.28615444437523_dp, 210.25885598550244_dp, 303.76857082731135_dp, 441.24677896342706_dp, 644.626277933146_dp, 947.5662954369608_dp,& + 1402.4345459606109_dp, 2092.551420913222_dp, 3156.1169200796808_dp, 4842.013686573819_dp, 7676.179724663517_dp, 13145.496536528115_dp, 28580.5493144719_dp,& + 0.2997770495160067_dp, 0.328171810325839_dp, 0.3882763609129264_dp, 0.4870382457606423_dp, 0.6358038475084181_dp, 0.8517074887441279_dp, 1.1598833349774023_dp,& + 1.5967979705738689_dp, 2.2151837931186287_dp, 3.0913230528117115_dp, 4.335827775714694_dp, 6.109657533128254_dp, 8.648033701785389_dp, 12.296330771130819_dp,& + 17.564247818840375_dp, 25.20806484627957_dp, 36.35635494507822_dp, 52.70347606492981_dp, 76.80980640661534_dp, 112.57226010676658_dp, 165.9717478515792_dp,& + 246.28595384282085_dp, 368.1305098723015_dp, 555.1307149475209_dp, 847.33732032532_dp, 1319.0786553040762_dp, 2132.484724545273_dp, 3743.164994620193_dp,& + 8008.935958082978_dp, 30201.87390773344_dp] + aw%aw_erange_matrix(:, 10) = [0.15074658869167354_dp, 0.4668958035836203_dp, 0.8287813045866178_dp, 1.27295686026729_dp, 1.8457432235406386_dp,& + 2.6087085124986893_dp, 3.6461433188342913_dp, 5.0756183993344335_dp, 7.063160044261513_dp, 9.845291593081901_dp, 13.761294933072154_dp, 19.30074127352979_dp,& + 27.17394477351595_dp, 38.41701402640067_dp, 54.549426069506936_dp, 77.81182846954663_dp, 111.5272001496651_dp, 160.6530382259186_dp, 232.63167019101493_dp,& + 338.7100316718215_dp, 496.0070705705839_dp, 730.7907240768792_dp, 1083.762366034212_dp, 1618.8284659000788_dp, 2438.461166724189_dp, 3713.4370228988228_dp,& + 5751.214494532453_dp, 9197.732198940443_dp, 15865.762408736662_dp, 34662.09472159822_dp, 0.3039067430763809_dp, 0.3335109318096939_dp, 0.39628223332684037_dp,& + 0.4996995618831505_dp, 0.6560124551532797_dp, 0.8837941444637961_dp, 1.2104228747326704_dp, 1.6758387356208266_dp, 2.338139093731629_dp, 3.2818964868464273_dp,& + 4.630558114772758_dp, 6.565010733264908_dp, 9.3515186170747_dp, 13.384001926625498_dp, 19.24839955061762_dp, 27.821277621574968_dp, 40.421935481490465_dp,& + 59.048766447593984_dp, 86.74957609916163_dp, 128.20747215218674_dp, 190.67974791015314_dp, 285.53140615722333_dp, 430.82223445682513_dp, 655.9371796248371_dp,& + 1010.808613556427_dp, 1587.720772783595_dp, 2585.9493214732233_dp, 4560.104639212192_dp, 9764.47140618184_dp, 36744.78826999934_dp] + aw%aw_erange_matrix(:, 11) = [0.15327074211168326_dp, 0.47523666558201105_dp, 0.8454081293698346_dp, 1.302555423844387_dp, 1.8961670213435633_dp, 2.69253915656829_dp,& + 3.7831603662440982_dp, 5.296661745560639_dp, 7.416146989170787_dp, 10.404588465380735_dp, 14.642337577033341_dp, 20.682906910118618_dp, 29.33645605992322_dp,& + 41.795526321167316_dp, 59.825609960791006_dp, 86.05587769109584_dp, 124.42572946943761_dp, 180.87560328043566_dp, 264.42380444802404_dp, 388.8590073673682_dp,& + 575.4255155780847_dp, 857.1327939358282_dp, 1285.7823929714118_dp, 1943.721808327101_dp, 2964.44501552976_dp, 4572.099023467233_dp, 7170.690868688525_dp,& + 11603.357270785074_dp, 20212.957283840064_dp, 44452.062155362604_dp, 0.3090804319893144_dp, 0.34024841302588593_dp, 0.40647905218403607_dp, 0.5159643143279251_dp,& + 0.6821714531077357_dp, 0.9256259273559609_dp, 1.2767723822584245_dp, 1.7803337442227432_dp, 2.5018545143392776_dp, 3.5375123917367213_dp, 5.028880015326183_dp,& + 7.185241661144039_dp, 10.31751858363557_dp, 14.890153020130612_dp, 21.600969658960963_dp, 31.504943516808023_dp, 46.20741046677315_dp, 68.16803820969625_dp,& + 101.1831518566797_dp, 151.15859371819528_dp, 227.3632897864881_dp, 344.4976384132564_dp, 526.2026890949384_dp, 811.3228331489025_dp, 1266.1935178202223_dp,& + 2013.0176783429627_dp, 3312.4890760215126_dp, 5880.358930845362_dp, 12610.246229383727_dp, 47327.426186591925_dp] + aw%aw_erange_matrix(:, 12) = [0.15611582449200168_dp, 0.484670676531795_dp, 0.864327133672447_dp, 1.3364820958197925_dp, 1.95441681134768_dp, 2.7901462861902027_dp,& + 3.9439511540731202_dp, 5.558103736628507_dp, 7.836974880015686_dp, 11.076799625053408_dp, 15.710099980914652_dp, 22.372456900097028_dp, 32.00355723960249_dp,& + 46.00113943456652_dp, 66.45713829064987_dp, 96.52248517478913_dp, 140.97482131096695_dp, 207.10885220939085_dp, 306.14421022273984_dp, 455.47137403605_dp,& + 682.2697601790953_dp, 1029.4036326614776_dp, 1565.1742345818764_dp, 2399.817998955818_dp, 3714.5558190868474_dp, 5816.906307974656_dp, 9263.140996927303_dp,& + 15206.919687605141_dp, 26815.704784746697_dp, 59463.77740012989_dp, 0.31491712377093267_dp, 0.3479154795072989_dp, 0.41821106711586165_dp, 0.5348674813300344_dp,& + 0.7128490804971861_dp, 0.9750995854659087_dp, 1.3558946548404465_dp, 1.9059877530566083_dp, 2.700404389007717_dp, 3.8502466936019597_dp, 5.520642891704094_dp,& + 7.958186966900626_dp, 11.533140951457444_dp, 16.804769365680052_dp, 24.623195574865484_dp, 36.28937749112529_dp, 53.80834509662708_dp, 80.29343692857348_dp,& + 120.617438528961_dp, 182.4720644848956_dp, 278.11257974792727_dp, 427.27607514947135_dp, 662.181110971826_dp, 1036.4628530654331_dp, 1642.486743242303_dp,& + 2650.295375405498_dp, 4418.177298699454_dp, 7913.127380453787_dp, 17012.044780129974_dp, 63654.92138377425_dp] + aw%aw_erange_matrix(:, 13) = [0.1585986414808211_dp, 0.49293227874864953_dp, 0.8809949627642996_dp, 1.3665913620994945_dp, 2.0065154205489626_dp, 2.878132174317013_dp,& + 4.090028118330613_dp, 5.797486964911083_dp, 8.225361402603866_dp, 11.702236433624119_dp, 16.71188568127808_dp, 23.971353089725582_dp, 34.550285638470136_dp,& + 50.05461492230114_dp, 72.91135545553885_dp, 106.8135350467453_dp, 157.4208108370035_dp, 233.47191953414887_dp, 348.56667909998555_dp, 524.0475847624567_dp,& + 793.707794772235_dp, 1211.5739798923714_dp, 1864.96076865716_dp, 2896.8251945846673_dp, 4545.4128751191465_dp, 7219.5552340802415_dp, 11662.784361729111_dp,& + 19411.052011165215_dp, 34635.22084899565_dp, 77428.2594678933_dp, 0.32001521125658394_dp, 0.35467076049069735_dp, 0.4286612826978466_dp, 0.5518737641051952_dp,& + 0.7406950741154976_dp, 1.020384176642642_dp, 1.4289161118477156_dp, 2.022921463432152_dp, 2.8867554481509226_dp, 4.146355805574743_dp, 5.990514160302193_dp,& + 8.703718091097011_dp, 12.717190750178169_dp, 18.688773175675315_dp, 27.628891977363935_dp, 41.10078967616605_dp, 61.541495564791326_dp, 92.78097905404866_dp,& + 140.8899743107899_dp, 215.57923784028515_dp, 332.53694700008424_dp, 517.3923979879823_dp, 812.5836504864853_dp, 1289.6958474565083_dp, 2073.21922438688_dp,& + 3392.879910503737_dp, 5728.411572233089_dp, 10353.785071731596_dp, 22327.676016416055_dp, 83326.1396670659_dp] + aw%aw_erange_matrix(:, 14) = [0.16074983925508995_dp, 0.5001125329781305_dp, 0.895558007331798_dp, 1.3930676119416314_dp, 2.0526395034160516_dp, 2.9565619374491274_dp,& + 4.221130086493037_dp, 6.013805694103401_dp, 8.578774475403922_dp, 12.275421409740702_dp, 17.636750591062544_dp, 25.45877687591181_dp, 36.93833585853616_dp,& + 53.88713953905948_dp, 79.0668373760298_dp, 116.71771479662618_dp, 173.39998521474163_dp, 259.34441610997936_dp, 390.64111209658677_dp, 592.8223625140175_dp,& + 906.7916067039687_dp, 1398.75497341123_dp, 2177.101203426909_dp, 3421.6595296219302_dp, 5436.041196216437_dp, 8747.131818317119_dp, 14319.470865868023_dp,& + 24141.727891729002_dp, 43561.727407829894_dp, 98145.10564234719_dp, 0.3244358799675633_dp, 0.36057328739839345_dp, 0.43787941475989645_dp, 0.5670049256958328_dp,& + 0.7656628944752096_dp, 1.061285309171881_dp, 1.4953457271663428_dp, 2.130078015174346_dp, 3.0588087175505323_dp, 4.421869344637797_dp, 6.431225106069265_dp,& + 9.408834909529705_dp, 13.846816687671257_dp, 20.50252534817982_dp, 30.550011110026805_dp, 45.82334962368959_dp, 69.2111001525887_dp, 105.3018847464044_dp,& + 161.45180420057966_dp, 249.56900420929912_dp, 389.13450782321206_dp, 612.3924255583513_dp, 973.4482751978251_dp, 1564.7379361211877_dp, 2548.6891529503337_dp,& + 4226.38253248531_dp, 7222.917612404246_dp, 13174.2778180717_dp, 28509.267725054422_dp, 106160.2639173599_dp] + aw%aw_erange_matrix(:, 15) = [0.16262039381403579_dp, 0.5063730793021797_dp, 0.9083149017898943_dp, 1.4163907532992552_dp, 2.093511982304147_dp, 3.026477274832255_dp,& + 4.338696841349741_dp, 6.208955650732167_dp, 8.899549165899632_dp, 12.798932651615898_dp, 18.486939408625744_dp, 26.835311895791346_dp, 39.16387831263876_dp,& + 57.485091296067274_dp, 84.89004001294464_dp, 126.1629602905402_dp, 188.7682361032193_dp, 284.4506192138729_dp, 431.85558174323637_dp, 660.8659291039313_dp,& + 1019.8615285065216_dp, 1588.0275062829162_dp, 2496.5319476854356_dp, 3965.666107658971_dp, 6371.910543745203_dp, 10375.825366387413_dp, 17195.468551114795_dp,& + 29341.488754297978_dp, 53508.65421134318_dp, 121456.79271852584_dp, 0.3282825301877526_dp, 0.36574392060492084_dp, 0.44602159399289126_dp, 0.5804703376001655_dp,& + 0.7880316454913989_dp, 1.0981622518906817_dp, 1.5556172675403404_dp, 2.227923946607758_dp, 3.2169479016852027_dp, 4.676829032127763_dp, 6.84194682233671_dp,& + 10.070815237141659_dp, 14.915491370586214_dp, 22.232202221987517_dp, 33.35916502004518_dp, 50.40499220758785_dp, 76.72092077578877_dp, 117.6818705337546_dp,& + 181.9923044138381_dp, 283.8951043119145_dp, 446.95633356501054_dp, 710.6481252216735_dp, 1142.0217013584413_dp, 1857.0207285861836_dp, 3061.524750375996_dp,& + 5139.401571578885_dp, 8885.07671917959_dp, 16351.40165928286_dp, 35518.56312434257_dp, 132016.67889946306_dp] + aw%aw_erange_matrix(:, 16) = [0.16461121992013572_dp, 0.5130537467027886_dp, 0.9219891409850267_dp, 1.4415265282665501_dp, 2.137812541238478_dp, 3.1026919987933703_dp,& + 4.4675924708665224_dp, 6.4241492550129164_dp, 9.255358150849865_dp, 13.383148444589107_dp, 19.441687490427764_dp, 28.39127642576762_dp, 41.696760806942606_dp,& + 61.60931997659668_dp, 91.61536108245578_dp, 137.1580410041917_dp, 206.80796953910746_dp, 314.1817503489433_dp, 481.1195168715122_dp, 743.0074290063551_dp,& + 1157.8021962841462_dp, 1821.5380800469534_dp, 2895.3812180016926_dp, 4653.7282926606185_dp, 7572.086677425676_dp, 12495.669401832365_dp, 20997.801241262867_dp,& + 36325.86747707651_dp, 67064.21998527332_dp, 153559.877190311_dp, 0.3323792923495753_dp, 0.37128645855707815_dp, 0.45481882638693466_dp, 0.5951234815811263_dp,& + 0.8125303911554078_dp, 1.1387980677420937_dp, 1.6224364113285599_dp, 2.3370716045920283_dp, 3.394480042467526_dp, 4.96495158621143_dp, 7.309291980811711_dp,& + 10.829475690871233_dp, 16.149448348937934_dp, 24.245113751975293_dp, 36.65532694022094_dp, 55.82764892756104_dp, 85.69068300209298_dp, 132.6116968691035_dp,& + 207.0173551055982_dp, 326.1707659062317_dp, 518.9945518804797_dp, 834.5771689653424_dp, 1357.4620315784393_dp, 2235.8803375612997_dp, 3736.3891876038815_dp,& + 6360.155290450391_dp, 11143.129516033901_dp, 20727.354533996564_dp, 45246.467731381585_dp, 167864.82966862986_dp] + aw%aw_erange_matrix(:, 17) = [0.16651351865477473_dp, 0.519454577907408_dp, 0.9351507515667731_dp, 1.4658532410614418_dp, 2.1809354081217633_dp, 3.1773124769855223_dp,& + 4.594526615255376_dp, 6.637313429476753_dp, 9.609926239283139_dp, 13.968927280965282_dp, 20.40513523133305_dp, 29.97193207470911_dp, 44.28787090328388_dp,& + 65.85939691635402_dp, 98.59953714664259_dp, 148.66946924606546_dp, 225.85763585192822_dp, 345.86375336652645_dp, 534.124192482264_dp, 832.2963196222343_dp,& + 1309.3929484951884_dp, 2081.173047394442_dp, 3344.449587785483_dp, 5438.954165136708_dp, 8961.84030797197_dp, 14989.196056927289_dp, 25545.816609735895_dp,& + 44824.33409960151_dp, 83822.32422493344_dp, 193711.93304782244_dp, 0.3362966051832095_dp, 0.37662123463393204_dp, 0.4633544143824645_dp, 0.609443679214809_dp,& + 0.8366282415179814_dp, 1.1790166265088777_dp, 1.6889775685600297_dp, 2.4464495867510347_dp, 3.5735433123097637_dp, 5.257520611088955_dp, 7.787186659800698_dp,& + 11.61095992362215_dp, 17.43030221471878_dp, 26.351381738650314_dp, 40.13360778161903_dp, 61.60103361444086_dp, 95.33067886989048_dp, 148.81734792065342_dp,& + 234.46891374272712_dp, 373.0691144154962_dp, 599.8733847399587_dp, 975.5122812884488_dp, 1605.8677591621924_dp, 2679.2461731874328_dp, 4538.878632523566_dp,& + 7836.630003949259_dp, 13921.767968244894_dp, 26195.561124088643_dp, 57512.80156760765_dp, 213037.54770361463_dp] + aw%aw_erange_matrix(:, 18) = [0.1690396225959909_dp, 0.527980783630836_dp, 0.9527749551685267_dp, 1.498633358447118_dp, 2.2394273289730373_dp, 3.279200504430522_dp,& + 4.768998475289711_dp, 6.932282588250648_dp, 10.103948332171994_dp, 14.790913525485701_dp, 21.76710746310645_dp, 32.22374652919386_dp, 48.00922529285711_dp,& + 72.01561958382231_dp, 108.80743703784105_dp, 165.65487919516372_dp, 254.2501943193653_dp, 393.59144812337_dp, 614.8871476380654_dp, 970.0073946246416_dp,& + 1546.2520771713355_dp, 2492.5552724924996_dp, 4066.776314102136_dp, 6722.740655991635_dp, 11274.547185878206_dp, 19219.24710678121_dp, 33422.55081167871_dp,& + 59863.52522850395_dp, 114088.22675193982_dp, 267340.0098022138_dp, 0.34150265594038326_dp, 0.3837647419711019_dp, 0.4748885595852012_dp, 0.62895347380013_dp,& + 0.8697020693702873_dp, 1.234606483406498_dp, 1.7816009492315084_dp, 2.599802736845317_dp, 3.8264796009278195_dp, 5.674012679777352_dp, 8.473042796813875_dp,& + 12.742076623550743_dp, 19.300782196734378_dp, 29.456166689431363_dp, 45.31165528195391_dp, 70.28579444325638_dp, 109.99285877629794_dp, 173.7564076580376_dp,& + 277.24527030010586_dp, 447.12984357739214_dp, 729.4347143254225_dp, 1204.7788753069976_dp, 2016.732652224046_dp, 3425.9003452972343_dp, 5916.967870704429_dp,& + 10425.95017181254_dp, 18902.03087469423_dp, 36195.04534310194_dp, 80228.85952678222_dp, 296685.58400527935_dp] + aw%aw_erange_matrix(:, 19) = [0.17108080746256005_dp, 0.5348926066785868_dp, 0.9671403722271738_dp, 1.5255266347919436_dp, 2.28774274844055_dp, 3.3639396483885546_dp,& + 4.91510333449395_dp, 7.181015523939525_dp, 10.52351093743281_dp, 15.494175591137205_dp, 22.941350060033994_dp, 34.180859122853406_dp, 51.27100453309755_dp,& + 77.4598244795078_dp, 117.91998358022018_dp, 180.96932452902817_dp, 280.12130623254893_dp, 437.57174786980636_dp, 690.205645858275_dp, 1100.09105655256_dp,& + 1773.0902705202968_dp, 2892.412355453728_dp, 4780.204848654172_dp, 8012.96799945039_dp, 13643.383830950022_dp, 23642.754995570554_dp, 41847.26051761937_dp,& + 76336.01713020806_dp, 148006.18917830326_dp, 351302.6976256991_dp, 0.3457128544559845_dp, 0.38958721362433624_dp, 0.4843783651820528_dp, 0.6451406758484797_dp,& + 0.8973522100189902_dp, 1.2814196455666504_dp, 1.8601713021665005_dp, 2.7308645051656586_dp, 4.044329620340544_dp, 6.035636552378946_dp, 9.073587781716466_dp,& + 13.741287830611094_dp, 20.968542428515345_dp, 32.25164234427676_dp, 50.02217350804501_dp, 78.2730704718351_dp, 123.63448072667782_dp, 197.24709108663288_dp,& + 318.07033201598585_dp, 518.8138973365631_dp, 856.7493308578589_dp, 1433.7763216800754_dp, 2434.4354710513157_dp, 4199.723043713225_dp, 7375.479667359867_dp,& + 13229.498032764022_dp, 24425.382905474227_dp, 47540.939727448866_dp, 106401.9838008185_dp, 393145.5653859997_dp] + aw%aw_erange_matrix(:, 20) = [0.174208015078396_dp, 0.5455214527091232_dp, 0.9893700986809595_dp, 1.567453246082248_dp, 2.3636540955315315_dp, 3.498122562251638_dp,& + 5.14827993215702_dp, 7.581158591694967_dp, 11.204028439530992_dp, 16.64459737206355_dp, 24.87939231168654_dp, 37.44134013217713_dp, 56.75883515046388_dp,& + 86.71544891414382_dp, 133.58416570470814_dp, 207.60520215097725_dp, 325.68438918806163_dp, 516.070276345991_dp, 826.5786325694985_dp, 1339.2814449968866_dp,& + 2197.1869318584554_dp, 3653.596263478819_dp, 6165.272491162445_dp, 10572.339869517313_dp, 18455.027976540176_dp, 32866.476778294564_dp, 59929.80935369267_dp,& + 112813.36919811858_dp, 225478.89700441147_dp, 547806.2274616612_dp, 0.35216932807662665_dp, 0.39859666877705746_dp, 0.4992199916127204_dp, 0.6706989633151823_dp,& + 0.9413877281467774_dp, 1.3565962959075781_dp, 1.9874058221916224_dp, 2.944935529470972_dp, 4.403353007447031_dp, 6.637198331969463_dp, 10.082430143316417_dp,& + 15.437217064917919_dp, 23.830070641189668_dp, 37.103429138667835_dp, 58.297656696714924_dp, 92.48760514385602_dp, 148.24827340732497_dp, 240.26021813127747_dp,& + 394.0140410806184_dp, 654.4499869389458_dp, 1102.1183917626631_dp, 1884.023044363102_dp, 3273.8242918006918_dp, 5792.447112731419_dp, 10457.841973367156_dp,& + 19329.53596485672_dp, 36827.67063798521_dp, 73825.92204301585_dp, 168436.45444117606_dp, 622444.873239739_dp] + aw%aw_erange_matrix(:, 21) = [0.1761202582043389_dp, 0.5520447609872519_dp, 1.0030974507555772_dp, 1.5935326203454305_dp, 2.4112315066636985_dp, 3.582863330501751_dp,& + 5.296667728366527_dp, 7.8377867885008925_dp, 11.643980957560537_dp, 17.394560044285978_dp, 26.15386564019807_dp, 39.605200340498676_dp, 60.43629423022499_dp,& + 92.98154542968216_dp, 144.30465853295624_dp, 226.04648771845612_dp, 357.6210989688087_dp, 571.8230985597171_dp, 924.8176309939128_dp, 1514.236505987768_dp,& + 2512.5546787169756_dp, 4229.875717696101_dp, 7234.632430202447_dp, 12591.32549473927_dp, 22342.113889996825_dp, 40517.55575462074_dp, 75377.59785941406_dp,& + 144997.0428070577_dp, 296108.0338286232_dp, 731745.2865811108_dp, 0.35612112320338896_dp, 0.4041597774113941_dp, 0.5084797084927667_dp, 0.6867923770493396_dp,& + 0.9693484716162668_dp, 1.404717445752288_dp, 2.0695156681544655_dp, 3.084248878260065_dp, 4.639047881996104_dp, 7.035740134386317_dp, 10.757234904755125_dp,& + 16.58309947892346_dp, 25.78417424843358_dp, 40.454121614614245_dp, 64.0813539216139_dp, 102.54891398088944_dp, 165.90782834877612_dp, 271.5712510504401_dp,& + 450.164506454231_dp, 756.4348015438803_dp, 1290.0017302932613_dp, 2235.688380530208_dp, 3943.8151743642957_dp, 7094.4981359781395_dp, 13045.295369347426_dp,& + 24603.05448593095_dp, 47901.44750228873_dp, 98085.01445426073_dp, 227192.3617986822_dp, 840731.2172617969_dp] + aw%aw_erange_matrix(:, 22) = [0.1777047921517639_dp, 0.5574641492548221_dp, 1.0145511230139452_dp, 1.615403373339322_dp, 2.4513426308010158_dp, 3.654686527513127_dp,& + 5.423110673160765_dp, 8.057659233477818_dp, 12.023051097483231_dp, 18.04454685946229_dp, 27.2652711716243_dp, 41.50449808496695_dp, 63.68639951776318_dp,& + 98.56001627479766_dp, 153.92310734481697_dp, 242.72975295820916_dp, 386.770803794943_dp, 623.1980350390293_dp, 1016.2779319339597_dp, 1678.941978088846_dp,& + 2813.0616487372854_dp, 4786.311559672938_dp, 8282.29270001942_dp, 14601.419569806514_dp, 26282.105739415867_dp, 48430.57601768038_dp, 91721.68927815263_dp,& + 179924.08934574723_dp, 374820.9154378848_dp, 941327.26358562_dp, 0.35939787631562287_dp, 0.40880114349624547_dp, 0.5162611101798964_dp, 0.700403353403251_dp,& + 0.9931343712493289_dp, 1.4458855436673317_dp, 2.14016413580574_dp, 3.204825966103843_dp, 4.844304322301563_dp, 7.385060426051078_dp, 11.352727207647774_dp,& + 17.601567628385595_dp, 27.534196851429424_dp, 43.479077462900264_dp, 69.34760901334614_dp, 111.79404993830953_dp, 182.29420743169334_dp, 300.93178966239077_dp,& + 503.4177074926195_dp, 854.3541827114868_dp, 1472.829099303335_dp, 2582.950642714769_dp, 4616.207797210845_dp, 8424.894875912756_dp, 15742.71644167282_dp,& + 30226.322987810392_dp, 60011.99599547493_dp, 125336.8664775516_dp, 294698.3519483209_dp, 1092989.8333233916_dp] + aw%aw_erange_matrix(:, 23) = [0.1799647702096782_dp, 0.5652158330702483_dp, 1.0310122635781176_dp, 1.6470123533176932_dp, 2.5096521841629245_dp, 3.7597091666054_dp,& + 5.609096447864183_dp, 8.383032013517075_dp, 12.587531728381435_dp, 19.018811032717153_dp, 28.942669406068813_dp, 44.39198046554904_dp, 68.66582954328437_dp,& + 107.17728460643622_dp, 168.91213211075208_dp, 268.97398648093684_dp, 433.091609012251_dp, 705.730911521849_dp, 1164.951694181309_dp, 1950.1393511855931_dp,& + 3314.8576251656086_dp, 5729.913200878512_dp, 10089.505182983685_dp, 18135.458661616507_dp, 33359.02655596435_dp, 62993.26164148739_dp, 122648.53064183371_dp,& + 248143.1247122177_dp, 533911.066633673_dp, 1377658.9174851538_dp, 0.3640748855027726_dp, 0.4154710858336259_dp, 0.5275322007755151_dp, 0.7202571525801186_dp,& + 1.0280528203703319_dp, 1.5066998100771394_dp, 2.2451905408110053_dp, 3.385256860173649_dp, 5.153564269391184_dp, 7.915191281602387_dp, 12.263349591995896_dp,& + 19.17157925153088_dp, 30.255048026265875_dp, 48.22502671655241_dp, 77.69046144427213_dp, 126.59311361740465_dp, 208.81898401605096_dp, 349.03416680624724_dp,& + 591.8119175008418_dp, 1019.2202578014185_dp, 1785.4939265361284_dp, 3187.1280052231455_dp, 5808.604372665699_dp, 10835.102219391534_dp, 20748.74858833901_dp,& + 40952.890888395414_dp, 83848.098471279_dp, 180849.87459593892_dp, 436512.7424947387_dp, 1628215.5545881148_dp] + aw%aw_erange_matrix(:, 24) = [0.1822263529525982_dp, 0.5729996377421059_dp, 1.047635792810745_dp, 1.6791461382690935_dp, 2.569340077952974_dp, 3.8679621955823156_dp,& + 5.80214952385766_dp, 8.723197827758348_dp, 13.18207930971986_dp, 20.052986490730195_dp, 30.737880819936766_dp, 47.50921787860396_dp, 74.09130058582036_dp,& + 116.65928109072428_dp, 185.57975117283885_dp, 298.4887547568673_dp, 485.82262550322196_dp, 800.9299575569713_dp, 1338.911182611906_dp, 2272.4501320329528_dp,& + 3921.5269940453863_dp, 6892.49799005733_dp, 12363.437660742366_dp, 22688.291515470326_dp, 42722.85096985635_dp, 82860.32561548792_dp, 166362.18596925205_dp,& + 348621.725686658_dp, 779233.374778165_dp, 2079017.4769696286_dp, 0.36875937076082166_dp, 0.4222059972744914_dp, 0.5390198837588891_dp, 0.7406604412767378_dp,& + 1.064209794623797_dp, 1.5701371533427577_dp, 2.3555718741622864_dp, 3.5763689918945434_dp, 5.483812634926247_dp, 8.486176027552165_dp, 13.253067856267064_dp,& + 20.89439819576877_dp, 33.271277856794725_dp, 53.54362530829514_dp, 87.14918047880543_dp, 143.58213829294814_dp, 239.6811218766154_dp, 405.8231322234427_dp,& + 697.8346358530627_dp, 1220.419781249127_dp, 2174.402936582649_dp, 3954.658279362839_dp, 7359.4771270599895_dp, 14054.111690526057_dp, 27639.364929808464_dp,& + 56238.866456371696_dp, 119209.6009779448_dp, 267043.87988619285_dp, 666555.4805450162_dp, 2511681.1233505663_dp] + aw%aw_erange_matrix(:, 25) = [0.1847328901237733_dp, 0.5816579181920506_dp, 1.06623831659397_dp, 1.7153584342875687_dp, 2.6370944394526834_dp, 3.991747606377202_dp,& + 6.0245444078219315_dp, 9.118059462860709_dp, 13.87771304303639_dp, 21.273099986416568_dp, 32.874558748673664_dp, 51.25417761001875_dp, 80.67448644264461_dp,& + 128.28771388301732_dp, 206.25529162006907_dp, 335.55403757007736_dp, 552.9304377149555_dp, 923.8479731240166_dp, 1567.0928663554876_dp, 2702.6050494655915_dp,& + 4746.810112095555_dp, 8507.992746711141_dp, 15599.418914679965_dp, 29344.431295226907_dp, 56841.83138821593_dp, 113909.37304425648_dp, 237628.48164125465_dp,& + 520905.746109544_dp, 1225334.6216953252_dp, 3428882.660853226_dp, 0.3739561299590209_dp, 0.42974153402664883_dp, 0.5519996672430176_dp, 0.7639144679035607_dp,& + 1.1057476916121531_dp, 1.643586260939031_dp, 2.4843963114705385_dp, 3.801270659603255_dp, 5.875848620822421_dp, 9.170241595714248_dp, 14.45037787184633_dp,& + 23.0002074091981_dp, 36.99882559646296_dp, 60.19432989625214_dp, 99.12731724056621_dp, 165.39119652215672_dp, 279.8872363721547_dp, 481.0007472363202_dp,& + 840.6692554162208_dp, 1496.7525126524065_dp, 2720.0603815860054_dp, 5057.476332433218_dp, 9648.32206240805_dp, 18951.758348951535_dp, 38497.25395781284_dp,& + 81332.10767021636_dp, 180141.95260617262_dp, 424305.6328571203_dp, 1112162.6633453001_dp, 4275158.808925236_dp] + aw%aw_erange_matrix(:, 26) = [0.18691650786522696_dp, 0.5892282516421157_dp, 1.082601142199495_dp, 1.7474335701008017_dp, 2.697541917641801_dp, 4.102986967183923_dp,& + 6.2258726307243295_dp, 9.478229744358938_dp, 14.51725016133735_dp, 22.40416043035721_dp, 34.87275063631003_dp, 54.7892770133363_dp, 86.95106742502657_dp,& + 139.4937652327716_dp, 226.41043496205668_dp, 372.1384211072813_dp, 620.0671404995333_dp, 1048.6405945196989_dp, 1802.5180601563457_dp, 3154.370380781851_dp,& + 5630.817881197405_dp, 10277.053936391727_dp, 19232.435067105616_dp, 37032.92799563058_dp, 73696.42898519848_dp, 152437.06029497125_dp, 330262.7698185401_dp,& + 757951.6008420573_dp, 1883277.8699494905_dp, 5569496.903527443_dp, 0.37848766297101066_dp, 0.4363686681953113_dp, 0.5635257557534139_dp, 0.7847411896337352_dp,& + 1.1432429581246502_dp, 1.710400928686577_dp, 2.6025143390201344_dp, 4.00918762919726_dp, 6.241432379311925_dp, 9.814018030878975_dp, 15.58816401063637_dp,& + 25.02210792050149_dp, 40.617544040137886_dp, 66.72766316858582_dp, 111.04481815761915_dp, 187.3905962133754_dp, 321.0551681264537_dp, 559.2435025237448_dp,& + 992.0158501613989_dp, 1795.4100023823648_dp, 3322.951465507801_dp, 6306.521335539891_dp, 12314.481572253086_dp, 24843.55105667421_dp, 52058.072852874495_dp,& + 114094.52399515717_dp, 264080.7768830504_dp, 655640.4058250692_dp, 1818602.1997626221_dp, 7205611.5064693205_dp] + aw%aw_erange_matrix(:, 27) = [0.19022370155321527_dp, 0.600743360402157_dp, 1.1076668599949147_dp, 1.7969727227449328_dp, 2.7916954361292103_dp, 4.277740702902653_dp,& + 6.5449132123072955_dp, 10.054129405857609_dp, 15.549497842664334_dp, 24.247957163099166_dp, 38.164643624522434_dp, 60.67913113804187_dp, 97.53572421208379_dp,& + 158.6390445053919_dp, 261.3334003305023_dp, 436.50559155590565_dp, 740.1775348487877_dp, 1276.0295073067164_dp, 2240.2658443373566_dp, 4013.504032417865_dp,& + 7354.933813953658_dp, 13827.327012835409_dp, 26765.8040824929_dp, 53592.215438201536_dp, 111658.9332077399_dp, 244020.31011080078_dp, 565646.7162849859_dp,& + 1414014.9652098955_dp, 3921844.1534676724_dp, 13169687.030866666_dp, 0.38535856099370613_dp, 0.44651820489987665_dp, 0.581378827915768_dp, 0.817323895709002_dp,& + 1.2024468005348359_dp, 1.8168664498604732_dp, 2.792503569715967_dp, 4.346916881821315_dp, 6.841455614222962_dp, 10.882312536529671_dp, 17.498453583809766_dp,& + 28.45950172040968_dp, 46.85274666913898_dp, 78.1487335864584_dp, 132.20639852667364_dp, 227.12421582085403_dp, 396.8047794537329_dp, 706.1854709081963_dp,& + 1282.7567112370582_dp, 2383.8137152178447_dp, 4544.9881609113345_dp, 8921.411882096174_dp, 18107.46271796117_dp, 38212.670216679006_dp, 84456.33216515457_dp,& + 197425.42988053817_dp, 494979.5222323457_dp, 1359946.1830275727_dp, 4269995.133188314_dp, 18594665.56920044_dp] + aw%aw_erange_matrix(:, 28) = [0.19253210390672987_dp, 0.6088167991143922_dp, 1.1253694421581641_dp, 1.8322551698762215_dp, 2.8593371177556604_dp, 4.4043903646211_dp,& + 6.77820202691528_dp, 10.479140516198576_dp, 16.3186936413819_dp, 25.636021161233007_dp, 40.670025252886504_dp, 65.21432629001508_dp, 105.78867675687461_dp,& + 173.7699859169831_dp, 289.3412272171402_dp, 488.9577195527415_dp, 839.7790283388382_dp, 1468.253800848674_dp, 2618.293272053489_dp, 4773.313983139066_dp,& + 8921.221516951595_dp, 17152.781586299636_dp, 34075.58424824942_dp, 70338.2733815119_dp, 151993.0955958592_dp, 347390.7830575113_dp, 852464.8697898219_dp,& + 2298933.9421763406_dp, 7097047.894166372_dp, 27714975.772786345_dp, 0.39015997333677005_dp, 0.4536843511969253_dp, 0.5941303836763525_dp, 0.8408337569147337_dp,& + 1.2455691251977075_dp, 1.8951408073458809_dp, 2.933537085150634_dp, 4.600165407270463_dp, 7.296212807798878_dp, 11.701195546464378_dp, 18.980540228606937_dp,& + 31.16106108953815_dp, 51.82170019429503_dp, 87.38781813144793_dp, 149.60556002756704_dp, 260.3773737102548_dp, 461.44327006014964_dp, 834.290139541255_dp,& + 1542.3362969521413_dp, 2923.3653677825737_dp, 5699.927184905687_dp, 11479.628646828858_dp, 24006.639124934227_dp, 52485.55856206102_dp, 121068.69686949911_dp,& + 298453.56221816584_dp, 801312.2270425739_dp, 2415145.5599759216_dp, 8639654.807896439_dp, 43666635.56753933_dp] + aw%aw_erange_matrix(:, 29) = [0.1949107095730563_dp, 0.6171672239307736_dp, 1.143792172436484_dp, 1.8692333576553928_dp, 2.930748110931505_dp, 4.539085142263593_dp,& + 7.028182432141186_dp, 10.938130943606705_dp, 17.15624033998357_dp, 27.16067680457394_dp, 43.44774061879075_dp, 70.29315104327573_dp, 115.13144509398658_dp,& + 191.1011162579555_dp, 321.8342697698806_dp, 550.6671938372235_dp, 958.7797787732911_dp, 1701.8776841547697_dp, 3086.6003811493197_dp, 5735.080964660857_dp,& + 10953.106276804325_dp, 21590.73855228189_dp, 44160.136736286004_dp, 94375.76532091481_dp, 212768.38665855065_dp, 513000.1708834057_dp, 1350765.9399022928_dp,& + 4022932.679434288_dp, 14513078.288369589_dp, 75937900.62142041_dp, 0.39511226230548274_dp, 0.461140130776742_dp, 0.6075257413400078_dp, 0.8657410584741931_dp,& + 1.2916169964663862_dp, 1.979386468292054_dp, 3.0865718388636862_dp, 4.877330577353741_dp, 7.798462568355467_dp, 12.614401907780815_dp, 20.650563498437013_dp,& + 34.23929473043507_dp, 57.55196112216066_dp, 98.18231951367711_dp, 170.22503623388062_dp, 300.40452026165275_dp, 540.6000901136043_dp, 994.1995519608768_dp,& + 1873.38945083301_dp, 3628.392490521107_dp, 7251.604873762116_dp, 15029.267131045708_dp, 32509.31717011665_dp, 74021.0484408064_dp, 179523.81893802425_dp,& + 471846.2096834248_dp, 1380639.0831843547_dp, 4711303.6808049455_dp, 20609904.76278654_dp, 151191206.84136662_dp] + case(32) + aw%energy_range(:) = [4862.0_dp, 5846.0_dp, 6665.0_dp, 7800.0_dp, 10044.0_dp, 14058.0_dp,& + 19114.0_dp, 25870.0_dp, 35180.0_dp, 58986.0_dp, 85052.0_dp, 126612.0_dp, 247709.0_dp, 452410.0_dp,& + 1104308.0_dp, 2582180.0_dp, 10786426.0_dp, 72565710.0_dp] + aw%aw_erange_matrix(:, 1) = [0.13254275519610229_dp, 0.4075002434334006_dp, 0.7129653611128071_dp, 1.072311142230351_dp, 1.5137054634325515_dp, 2.072585907106472_dp,& + 2.7948198255241965_dp, 3.7408887157784005_dp, 4.991538722697482_dp, 6.655495576177275_dp, 8.880073834050316_dp, 11.865844968082882_dp, 15.88700871736706_dp,& + 21.319800434807853_dp, 28.682257688821725_dp, 38.69010148421391_dp, 52.335569763753064_dp, 70.99909077535013_dp, 96.60819689305963_dp, 131.86486082729905_dp,& + 180.57288090293983_dp, 248.11368921054333_dp, 342.14755601137466_dp, 473.67067120472257_dp, 658.6709548634489_dp, 920.892639935345_dp, 1296.9341360028814_dp,& + 1847.0377800992435_dp, 2682.1510880264454_dp, 4047.085323969744_dp, 6660.040272218769_dp, 14108.029689918747_dp, 0.2667161148094765_dp, 0.2866077185534088_dp,& + 0.32818422173681944_dp, 0.3951613742572797_dp, 0.4934816587166093_dp, 0.6318550781930461_dp, 0.8226002283812441_dp, 1.0828685966380414_dp, 1.4363782680324575_dp,& + 1.915847231861476_dp, 2.566403777298568_dp, 3.4503727336112044_dp, 4.654008952170379_dp, 6.29699863203509_dp, 8.545911800328465_dp, 11.633320983339523_dp,& + 15.885087444621595_dp, 21.759494015934315_dp, 29.903701501622987_dp, 41.235837219460294_dp, 57.06571237167945_dp, 79.27552554087899_dp, 110.59838219031958_dp,& + 155.06890815199284_dp, 218.81060764214297_dp, 311.5722127601456_dp, 450.16760079454133_dp, 667.4313363099551_dp, 1039.6543728256195_dp, 1789.9748349736915_dp, 3833.9681364720745_dp, 14655.44632366239_dp] + aw%aw_erange_matrix(:, 2) = [0.1343248849882633_dp, 0.4132592119099152_dp, 0.7240043390799359_dp, 1.091026925935713_dp, 1.54395256157537_dp, 2.120249021729213_dp,& + 2.8686740645792272_dp, 3.8538693799190424_dp, 5.162601596809094_dp, 6.912333890906867_dp, 9.263083009950755_dp, 12.433910552841194_dp, 16.725965711187758_dp,& + 22.554817278001472_dp, 30.49600178512726_dp, 41.3494455589017_dp, 56.23095197989688_dp, 76.70267881628598_dp, 104.96008395875586_dp, 144.10119183719314_dp,& + 198.5169327875596_dp, 274.4618860978532_dp, 380.899499080189_dp, 530.7797694607106_dp, 743.0392454072074_dp, 1045.9229630462034_dp, 1483.0537807692358_dp,& + 2126.1516611014854_dp, 3106.7411184121765_dp, 4713.500361879859_dp, 7790.3641571104345_dp, 16548.445240300603_dp, 0.2703480614473483_dp, 0.2910756261579897_dp,& + 0.3344559767841716_dp, 0.40448278489060463_dp, 0.5075565457043502_dp, 0.6530872691721998_dp, 0.8544340076849473_dp, 1.130277093651096_dp, 1.506570063148876_dp,& + 2.019293595727479_dp, 2.718337239493882_dp, 3.6729796521022116_dp, 4.9796461563368934_dp, 6.772925073652045_dp, 9.241267903229764_dp, 12.649452794111886_dp,& + 17.370863762271927_dp, 23.934101209739133_dp, 33.090676974430735_dp, 45.914061903125_dp, 63.94611611042478_dp, 89.41703574194196_dp, 125.58445451312652_dp,& + 177.27970461634078_dp, 251.853187763381_dp, 360.99548168525195_dp, 524.7699272889096_dp, 782.0601891451947_dp, 1222.611932252175_dp, 2108.162233431274_dp, 4512.831122628449_dp, 17222.120678400817_dp] + aw%aw_erange_matrix(:, 3) = [0.13557338601660668_dp, 0.41730065260389615_dp, 0.7317746815552322_dp, 1.104251698157746_dp, 1.5654155709323194_dp, 2.1542162086848187_dp,& + 2.9215329135167067_dp, 3.9350769825526832_dp, 5.286080227577014_dp, 7.0985194219082555_dp, 9.541929524180782_dp, 12.849299970750083_dp, 17.34218791649807_dp,& + 23.466110116962277_dp, 31.840626080497724_dp, 43.33050125803531_dp, 59.147245510736425_dp, 80.99462553628598_dp, 111.2781774935937_dp, 153.40846663158962_dp,& + 212.24282951584453_dp, 294.7341924733544_dp, 410.8955699804921_dp, 575.2616255690891_dp, 809.1768735737788_dp, 1144.5847770269388_dp, 1630.9076924124556_dp,& + 2349.3603614162894_dp, 3448.4571118322583_dp, 5252.914668389623_dp, 8709.488526056672_dp, 18538.811858380694_dp, 0.27289359484351916_dp, 0.294220982001665_dp,& + 0.3388980759862916_dp, 0.411123396942743_dp, 0.5176359133047135_dp, 0.668364809184891_dp, 0.8774440884042964_dp, 1.1646980641075588_dp, 1.557761149115098_dp,& + 2.0950797638638385_dp, 2.8301605859021666_dp, 3.837593566983341_dp, 5.221615251219452_dp, 7.128324609566002_dp, 9.763174149466698_dp, 13.41611573645175_dp,& + 18.497910846798998_dp, 25.59282079046985_dp, 35.53550575895753_dp, 49.524062051914576_dp, 69.28781614975094_dp, 97.34010675862754_dp, 137.36838088542098_dp,& + 194.86122705934486_dp, 278.18695350675137_dp, 400.6526832866276_dp, 585.0253370519614_dp, 875.1939500761971_dp, 1371.947991018934_dp, 2368.536327804507_dp,& + 5068.399861166353_dp, 9319.551508880766_dp] + aw%aw_erange_matrix(:, 4) = [0.1370499857872464_dp, 0.422087838650514_dp, 0.7410040914005517_dp, 1.1200141103213002_dp, 1.5910937845067552_dp, 2.195011651443817_dp,& + 2.985262954814932_dp, 4.033361919610758_dp, 5.436098124858981_dp, 7.325593527943965_dp, 9.883341376758114_dp, 13.359912878263156_dp, 18.102752475144438_dp,& + 24.595554809189636_dp, 33.51428674450282_dp, 45.80722857230063_dp, 62.80982762248363_dp, 86.41024933404324_dp, 119.28915593140628_dp, 165.26885298524112_dp,& + 229.82488386010735_dp, 320.8416671697241_dp, 449.7412806501914_dp, 633.1998473772219_dp, 895.83705332351_dp, 1274.6569305047908_dp, 1827.0549682010767_dp,& + 2647.329246149724_dp, 3907.374072374449_dp, 5981.275709049701_dp, 9956.014230886252_dp, 21245.91059831021_dp, 0.27590538134484827_dp, 0.2979573565068322_dp,& + 0.3442035946496803_dp, 0.41909606429356827_dp, 0.5297935391581631_dp, 0.6868712744253185_dp, 0.9054313778178337_dp, 1.2067332819592969_dp, 1.6205293980185511_dp,& + 2.1883874721831376_dp, 2.9684149635372044_dp, 4.041990934394181_dp, 5.523387463777131_dp, 7.573569384258536_dp, 10.420063818936963_dp, 14.385689720800096_dp,& + 19.930287584151156_dp, 27.711636209408702_dp, 38.67488869797654_dp, 54.18479605908046_dp, 76.22300391975581_dp, 107.6864815178738_dp, 152.8489241029493_dp,& + 218.10116939555124_dp, 313.21671931714536_dp, 453.742571335189_dp, 666.1923552433152_dp, 1001.3603174380673_dp, 1575.1576866889702_dp, 2723.745097867967_dp,& + 5826.475195617796_dp, 22177.608473258828_dp] + aw%aw_erange_matrix(:, 5) = [0.1393751435556022_dp, 0.4296428076126454_dp, 0.7556269118458908_dp, 1.1451112107395522_dp, 1.6321993263496475_dp, 2.260676043411754_dp,& + 3.088405025081973_dp, 4.193293537779408_dp, 5.681535826776683_dp, 7.69912759768035_dp, 10.448065969109644_dp, 14.209271435146666_dp, 19.375182226620723_dp,& + 26.496316789495793_dp, 36.34808912459801_dp, 50.02711707757524_dp, 69.09067912961464_dp, 95.75961436726789_dp, 133.21501966925618_dp, 186.03449395457477_dp,& + 260.83759278866273_dp, 367.24818341626917_dp, 519.3442915671452_dp, 737.8771467239039_dp, 1053.7584086797096_dp, 1513.801330668974_dp, 2190.9702417788335_dp,& + 3205.2140171776487_dp, 4774.210825118251_dp, 7368.122740715144_dp, 12344.973991941335_dp, 26456.259009955764_dp, 0.28065064408654583_dp, 0.3038780328549319_dp,& + 0.3526759573849975_dp, 0.4319215261801991_dp, 0.5494801124103226_dp, 0.7170195083647463_dp, 0.9512879181334657_dp, 1.2759995304848823_dp, 1.7245524024350398_dp,& + 2.3439221516534534_dp, 3.2002414143320297_dp, 4.386814440304756_dp, 6.0356680674184835_dp, 8.334263247492462_dp, 11.549773796002393_dp, 16.064517095499955_dp,& + 22.427907607712154_dp, 31.43303552982579_dp, 44.23019793781067_dp, 62.496359675110796_dp, 88.69028623168306_dp, 126.44134851448199_dp, 181.15338754218374_dp,& + 260.9731813081323_dp, 378.4325232446994_dp, 553.5022272702486_dp, 820.1059662618102_dp, 1242.61943354538_dp, 1966.3786822155184_dp, 3410.3262356194664_dp,& + 7292.46886903304_dp, 27693.855354838164_dp] + aw%aw_erange_matrix(:, 6) = [.14237486453944107_dp, 0.4394200534952092_dp, 0.7746555330683098_dp, 1.177996095520943_dp, 1.6864652619295697_dp,& + 2.3480282638346726_dp, 3.2266616421606034_dp, 4.409302651924302_dp, 6.015552554226239_dp, 8.21136864768518_dp, 11.228525969594424_dp, 15.392442739194209_dp,& + 21.162171526463748_dp, 29.18815796828059_dp, 40.3960633542662_dp, 56.109002958965746_dp, 78.22669193938121_dp, 109.4893460132257_dp, 153.8685432400606_dp,& + 217.14949285761446_dp, 307.80403247089794_dp, 438.30940204930323_dp, 627.1596980492438_dp, 901.9765906170177_dp, 1304.4290970945126_dp, 1898.3283702431997_dp,& + 2783.931515564688_dp, 4126.483644157721_dp, 6224.503686674229_dp, 9716.401957272288_dp, 16429.986790645627_dp, 35423.70971974651_dp, 0.28677747480312377_dp,& + 0.3115840468325672_dp, 0.36382211720758184_dp, 0.44896687419484355_dp, 0.5758826693409299_dp, 0.7577922978063393_dp, 1.013805148375157_dp, 1.371186351736884_dp,& + 1.8686546654955012_dp, 2.56115176168904_dp, 3.5267457265125604_dp, 4.876653159913234_dp, 6.769843587920379_dp, 9.434411669061411_dp, 13.198996941760914_dp,& + 18.53920060615783_dp, 26.14651426672167_dp, 37.03124772871653_dp, 52.677154132184704_dp, 75.27530196334217_dp, 108.08071153726374_dp, 155.96210569315744_dp,& + 226.2630374093172_dp, 330.18690270710874_dp, 485.1305151943868_dp, 718.9484199953382_dp, 1078.8257499526349_dp, 1653.3065930339428_dp, 2639.3168711629464_dp, 4598.936377351543_dp, 9833.306219117254_dp, 7228.01191754706_dp] + aw%aw_erange_matrix(:, 7) = [.14502370796551703_dp, 0.4480829010539378_dp, 0.7916157981286331_dp, 1.2075243508496802_dp,& + 1.7355837902840658_dp, 2.4277406075189805_dp, 3.353852391880919_dp, 4.609630408244423_dp, 6.327831185413123_dp, 8.694192211759745_dp, 11.970290957285025_dp,& + 16.5265343114819_dp, 22.890028099278148_dp, 31.81440016230547_dp, 44.38216963745914_dp, 62.15561490757339_dp, 87.40030591467784_dp, 123.41813625304623_dp,& + 175.04637990163923_dp, 249.4101615146111_dp, 357.06464925805403_dp, 513.7420529668599_dp, 743.0485870384754_dp, 1080.6808579217216_dp, 1581.14809900435_dp,& + 2328.8609813458747_dp, 3457.607083546514_dp, 5188.8198870627575_dp, 7921.499237107771_dp, 12501.58289355634_dp, 21329.60428145102_dp, 46259.92356298488_dp,& + 0.29219234212764755_dp, 0.31845370690034347_dp, 0.373872890610569_dp, 0.4645031477238152_dp, 0.600179586011295_dp, 0.7956470306437238_dp, 1.0723453581784659_dp,& + 1.4610762243702629_dp, 2.0059080326461616_dp, 2.76987145000088_dp, 3.8432790806788373_dp, 5.355919395975122_dp, 7.495003555741856_dp, 10.531701795474737_dp,& + 14.860576373030604_dp, 21.05848895536974_dp, 29.97309227512008_dp, 42.856552877705376_dp, 61.56891170854085_dp, 88.88951722712217_dp, 128.99783246328127_dp,& + 188.2232678787817_dp, 276.231225060434_dp, 407.9416932740777_dp, 606.7569403074244_dp, 910.3888055268573_dp, 1382.7234338831393_dp, 2142.64856112768_dp,& + 3450.91828637881_dp, 6043.794023233803_dp, 12927.644737686549_dp, 8805.08862191054_dp] + aw%aw_erange_matrix(:, 8) = [0.14754727473790832_dp, 0.4563621690490255_dp, 0.8079150128057052_dp, 1.2360970460871308_dp, 1.783465172289044_dp, 2.506029552409794_dp,& + 3.479706891724579_dp, 4.809331033064525_dp, 6.641460873789643_dp, 9.182776952331544_dp, 12.726704342125874_dp, 17.692182381254717_dp, 24.680446495334998_dp,& + 34.55864851933651_dp, 48.58367650175289_dp, 68.58652178045523_dp, 97.24837691414776_dp, 138.51657135506775_dp, 198.2350828975321_dp, 285.1066307856165_dp,& + 412.17114696470446_dp, 599.09566525532_dp, 875.7537331156108_dp, 1287.8873903467286_dp, 1906.2215953314396_dp, 2841.576751154979_dp, 4271.337323387628_dp,& + 6490.79405022356_dp, 10031.563416886413_dp, 16011.899712868733_dp, 27575.24726251585_dp, 60178.67874227437_dp, 0.2973552991659925_dp, 0.3250566186141874_dp,& + 0.38363560044751194_dp, 0.4797430677530813_dp, 0.6242227281583522_dp, 0.8334115127308077_dp, 1.131206159458274_dp, 1.552168109039008_dp, 2.146103694832248_dp,& + 2.984800054553381_dp, 4.171951997411542_dp, 5.857847187535488_dp, 8.26118966072219_dp, 11.701694869826639_dp, 16.64903553098479_dp, 23.796760202379794_dp,& + 34.17459871027205_dp, 49.32017560264589_dp, 71.54333486665355_dp, 104.33600828116667_dp, 153.01300195482676_dp, 225.72365375346706_dp, 335.069793993653_dp,& + 500.74431450896293_dp, 753.9795215702264_dp, 1145.5159990918794_dp, 1761.5202623948937_dp, 2761.370072156297_dp, 4489.970449108518_dp, 7909.344598672393_dp, 16932.78473977757_dp, 3749.23270457554_dp] + aw%aw_erange_matrix(:, 9) = [.15002348519433922_dp, 0.46451130342750646_dp, 0.824045021042684_dp, 1.2645625089537342_dp, 1.8315097984767872_dp, 2.5851574108560396_dp,& + 3.6078322639753786_dp, 5.014105379427872_dp, 6.965398429552594_dp, 9.69114538724383_dp, 13.519686414362274_dp, 18.92366324500486_dp, 26.587123387509088_dp,& + 37.50529299176741_dp, 53.13378944809952_dp, 75.61310381203099_dp, 108.10840448253303_dp, 155.3272050619175_dp, 224.31329381924482_dp, 325.67298187252476_dp,& + 475.48339517776736_dp, 698.2866475093558_dp, 1031.8319129009446_dp, 1534.6726862536486_dp, 2298.5349133548734_dp, 3468.9808108623843_dp, 5281.614870909423_dp,& + 8131.595592028999_dp, 12730.978340941307_dp, 20567.038495110464_dp, 35778.24682408639_dp, 78609.82719130651_dp, 0.3024254049895312_dp, 0.3315918385852816_dp,& + 0.3933970226398002_dp, 0.49512550705651104_dp, 0.6486960402797961_dp, 0.872153928090401_dp, 1.1920524512393371_dp, 1.6470520511792885_dp, 2.2932691781075087_dp,& + 3.212208165551602_dp, 4.522554416231983_dp, 6.3977829741741665_dp, 9.092580992760151_dp, 12.982711954934162_dp, 18.625509909639966_dp, 26.85224510411176_dp,& + 38.910067639696216_dp, 56.68163261798167_dp, 83.02738125985056_dp, 122.3231205179819_dp, 181.31153080692263_dp, 270.46417120445864_dp, 406.1868615016362_dp,& + 614.4531917978084_dp, 936.963281227043_dp, 1442.136769945214_dp, 2246.721112418363_dp, 3565.852508027438_dp, 5859.209649832797_dp, 10391.307380953114_dp,& + 22278.529118569048_dp, 3643.6346001724_dp] + aw%aw_erange_matrix(:, 10) = [0.15399032986872938_dp, 0.4776194738561411_dp, 0.8501753043803365_dp, 1.31107946792835_dp, 1.9107571034709487_dp, 2.7169110257810085_dp,& + 3.823183728851228_dp, 5.361535227120927_dp, 7.52023882937859_dp, 10.570320241106216_dp, 14.904710488340205_dp, 21.09662727004116_dp, 29.987193874300804_dp,& + 42.81777942605248_dp, 61.43118108216903_dp, 88.57949619935079_dp, 128.39852284791314_dp, 187.14404553452533_dp, 274.34323674515576_dp, 404.60959924450174_dp,& + 600.5280841395823_dp, 897.2831647081848_dp, 1350.157326096996_dp, 2046.8215895330711_dp, 3127.779028909418_dp, 4821.115088237592_dp, 7503.844806420884_dp,& + 11818.550736004621_dp, 18929.880007178966_dp, 31248.80735377127_dp, 55365.10950684564_dp, 123170.41015076623_dp, 0.310556146577657_dp, 0.3421802780606353_dp,& + 0.4094223614818588_dp, 0.5206878687071103_dp, 0.6898099116933477_dp, 0.9379031112155564_dp, 1.2963422286973751_dp, 1.8113088637921357_dp, 2.5506317768186104_dp,& + 3.6140696050359202_dp, 5.148822519751217_dp, 7.37304808270909_dp, 10.611713921777906_dp, 15.351596184949763_dp, 22.32620193123881_dp, 32.64780730303991_dp,& + 48.01425448983265_dp, 71.03533163849936_dp, 105.75208085448396_dp, 158.47022734372413_dp, 239.1101888774951_dp, 363.4164108225496_dp, 556.6165909250806_dp,& + 859.5761486038269_dp, 1339.388089086674_dp, 2108.33111127726_dp, 3360.4896315872797_dp, 5453.393419146713_dp, 9137.412009720016_dp, 16424.470778988587_dp,& + 35351.12874442453_dp, 32131.62635064372_dp] + aw%aw_erange_matrix(:, 11) = [.15665201491118563_dp, 0.48645255086696204_dp, 0.8679140908633145_dp, 1.3429441991327895_dp, 1.9655663020388237_dp, 2.8089215705883355_dp,& + 3.9750326498505615_dp, 5.608890975167092_dp, 7.919132231547877_dp, 11.208702795546053_dp, 15.920717165510954_dp, 22.707526807683728_dp, 32.53546396340545_dp,& + 46.84477048297584_dp, 67.79548225092432_dp, 98.64818052206019_dp, 144.35799385904798_dp, 212.50854417045272_dp, 314.7924737632916_dp, 469.3788283542409_dp,& + 704.7334196247324_dp, 1065.8446744796906_dp, 1624.4783236718592_dp, 2496.2720234668195_dp, 3869.6487189479203_dp, 6055.704970336431_dp, 9577.158206331736_dp,& + 15337.311175310337_dp, 24985.53443387876_dp, 41924.21370939059_dp, 75335.12561757576_dp, 169240.0831820107_dp, 0.31601774300631147_dp, 0.34936919542211453_dp,& + 0.42045090124222617_dp, 0.5384991728556235_dp, 0.718776108006642_dp, 0.9847086381286597_dp, 1.3713420192235894_dp, 1.9306481293657263_dp, 2.7395796341433103_dp,& + 3.912291447920088_dp, 5.6187616588370295_dp, 8.113318173320359_dp, 11.778610539345083_dp, 17.193842137070394_dp, 25.24140130107934_dp, 37.2747560295197_dp,& + 55.384907761264955_dp, 82.82679809483118_dp, 124.70772472447071_dp, 189.1091967049713_dp, 288.93348305516747_dp, 444.97622020020765_dp, 691.102363652001_dp,& + 1083.0962406902304_dp, 1714.1073266384424_dp, 2742.5244927502104_dp, 4445.571757485345_dp, 7336.150374476061_dp, 12481.117979830125_dp, 22687.396569080272_dp,& + 49029.27213151443_dp, 82714.99577064996_dp] + aw%aw_erange_matrix(:, 12) = [.15940855323823325_dp, 0.4956331404107984_dp, 0.8864643437510178_dp, 1.3765162067718617_dp, 2.023770980185183_dp, 2.9074148057363085_dp,& + 4.1388784725835_dp, 5.877927890230674_dp, 8.356513563090692_dp, 11.914499292816961_dp, 17.053639088844527_dp, 24.519740335146867_dp, 35.428643273777766_dp,& + 51.46079251611351_dp, 75.16399270031552_dp, 110.42815348333873_dp, 163.2357643618038_dp, 242.85834932021987_dp, 363.7810629576585_dp, 548.8279687880828_dp,& + 834.2882284949019_dp, 1278.4147835625017_dp, 1975.6780750770085_dp, 3080.979098507853_dp, 4851.394465485563_dp, 7719.529300718981_dp, 12426.190192755064_dp,& + 20273.565432739022_dp, 33665.94446711274_dp, 57559.451254663276_dp, 105152.47765026288_dp, 238976.3949138361_dp, 0.32167917419720454_dp, 0.35688752020406733_dp,& + 0.432113620138954_dp, 0.557526309412786_dp, 0.750001170356205_dp, 1.0355963446410574_dp, 1.4535706405145328_dp, 2.0626057961394766_dp, 2.9503327570367945_dp,& + 4.247930889038919_dp, 6.152607117843223_dp, 8.96241660484181_dp, 13.130563431815835_dp, 19.350693737814375_dp, 28.691905293869226_dp, 42.814199349842106_dp,& + 64.3152735879299_dp, 97.29381534174325_dp, 148.2732887039295_dp, 227.73244606015456_dp, 352.66878271895433_dp, 550.9427692926408_dp, 868.7360090031099_dp,& + 1383.5494745755586_dp, 2227.296811182226_dp, 3628.5346977825025_dp, 5993.829605644713_dp, 10082.06745111222_dp, 17463.261532301312_dp, 32186.387908159864_dp,& + 69962.03966745277_dp, 59964.04274551442_dp] + aw%aw_erange_matrix(:, 13) = [.16373958436697705_dp, 0.5101264978608379_dp, 0.9159896069529507_dp, 1.430480778525928_dp, 2.1183125355919272_dp, 3.069088155985158_dp,& + 4.410666493484344_dp, 6.328951180857867_dp, 9.097685942967209_dp, 13.123807198212786_dp, 19.017093457142934_dp, 27.69800527238066_dp, 40.56599533589728_dp,& + 59.76432998550568_dp, 88.60026000403526_dp, 132.21751623180904_dp, 198.68257999925436_dp, 300.7563968967366_dp, 458.81385584717975_dp, 705.7073030471846_dp,& + 1094.9631974180384_dp, 1714.7688190287618_dp, 2712.160181788416_dp, 4335.464784701027_dp, 7009.996439266402_dp, 11475.67124355327_dp, 19043.69699662228_dp,& + 32095.955514205307_dp, 55144.14939722096_dp, 97554.96015781426_dp, 183803.08980484723_dp, 427090.13572662364_dp, 0.33058526273756267_dp, 0.36885467782088144_dp,& + 0.450950093626708_dp, 0.5886660848688742_dp, 0.8017140595780422_dp, 1.12082540025602_dp, 1.592831379794522_dp, 2.2886261360881694_dp, 3.31553715895999_dp,& + 4.836588787162195_dp, 7.100671060940492_dp, 10.490115312417089_dp, 15.596294033961502_dp, 23.34074274734257_dp, 35.17091805226463_dp, 53.37952681146768_dp,& + 81.6305668168434_dp, 125.83495501612735_dp, 195.62426652036729_dp, 306.86047742079927_dp, 485.9640372839356_dp, 777.4791364469528_dp, 1257.4930839302167_dp,& + 2057.832096842602_dp, 3410.5310726374632_dp, 5731.642662527518_dp, 9785.587565752354_dp, 17033.465557765263_dp, 30505.194880449075_dp, 57794.75930208428_dp,& + 127350.9867284555_dp, 71374.61882211326_dp] + aw%aw_erange_matrix(:, 14) = [.16729345587752817_dp, 0.5220837915443625_dp, 0.9405741148525995_dp, 1.475915186417087_dp, 2.1988425579314264_dp, 3.2084229320437876_dp,& + 4.647658877867247_dp, 6.726900296718572_dp, 9.759556549152265_dp, 14.217184101692544_dp, 20.815259881214573_dp, 30.6479058416218_dp, 45.40134046704283_dp,& + 67.69506474900591_dp, 101.63225933231537_dp, 153.69629208332117_dp, 234.2259466666511_dp, 359.8693374590021_dp, 557.713000374505_dp, 872.3154950503812_dp,& + 1377.8469922115526_dp, 2199.339147354942_dp, 3550.4526300007215_dp, 5801.72143903217_dp, 9606.137468107807_dp, 16135.098020267218_dp, 27533.125876830458_dp,& + 47827.00298089529_dp, 84872.60988452473_dp, 155240.74372944486_dp, 301769.0915913182_dp, 717663.1356247213_dp, 0.3379034645137452_dp, 0.37881946738547795_dp,& + 0.46689089916190624_dp, 0.615406140323357_dp, 0.8467064090676832_dp, 1.1959082144868687_dp, 1.7170430113398156_dp, 2.4927824943410823_dp, 3.6497349710027573_dp,& + 5.382588868417295_dp, 7.992470539282596_dp, 11.948356757923296_dp, 17.986233607448835_dp, 27.27066375498558_dp, 41.66060391661398_dp, 64.15126447641241_dp,& + 99.61667730605177_dp, 156.07223690236458_dp, 246.84813859319397_dp, 394.3808745412634_dp, 636.9222168901913_dp, 1040.5940426531995_dp, 1721.4116028413248_dp,& + 2886.2600258571556_dp, 4910.7228383421725_dp, 8490.620025490385_dp, 14947.387548118924_dp, 26881.538126356885_dp, 49765.1843652489_dp, 97101.2613405646_dp,& + 217655.43736295513_dp, 04161.4023302288_dp] + aw%aw_erange_matrix(:, 15) = [.17199827765823103_dp, 0.5380059294727404_dp, 0.9736341997615289_dp, 1.5377352694938258_dp, 2.3097736290470463_dp, 3.402751176442763_dp,& + 4.982320081056548_dp, 7.295965784769458_dp, 10.718311338355647_dp, 15.822271186795035_dp, 23.491931948889743_dp, 35.10335805529794_dp, 52.81700264781087_dp,& + 80.05534788452564_dp, 122.29130031272524_dp, 188.3639662992407_dp, 292.70049836028585_dp, 459.11521059936763_dp, 727.3932946321102_dp, 1164.8655376002584_dp,& + 1887.0757702166622_dp, 3095.3089278858897_dp, 5145.990609712843_dp, 8681.612837930576_dp, 14883.222751239353_dp, 25969.45893893789_dp, 46211.24410112112_dp,& + 84069.60121476448_dp, 156951.2764731812_dp, 303071.86527144857_dp, 621318.3413283181_dp, 1540176.9421143653_dp, 0.3476062896043872_dp, 0.39221916200807294_dp,& + 0.4886942701051685_dp, 0.6525426235716102_dp, 0.9100580818924567_dp, 1.3030331602543401_dp, 1.8966193817904524_dp, 2.7919595402699877_dp, 4.146395650315994_dp,& + 6.205957727039082_dp, 9.35800145395578_dp, 14.217249893697428_dp, 21.767802513575838_dp, 33.599962887862425_dp, 52.309603978141894_dp, 82.17963968964122_dp,& + 130.3576745067898_dp, 208.91882658105692_dp, 338.53188644986636_dp, 555.0775251553036_dp, 921.7987850368266_dp, 1552.0204912904064_dp, 2652.486928566717_dp,& + 4607.857141150226_dp, 8149.500672123086_dp, 14702.176180519695_dp, 27120.413678845984_dp, 51329.09608829233_dp, 100319.89810256775_dp, 206207.35016280194_dp, 478990.19443877833_dp, 773158.149536881_dp] + aw%aw_erange_matrix(:, 16) = [.17588045499160682_dp, 0.5512257021498627_dp, 1.0013703118630188_dp, 1.5902434264445422_dp, 2.405215799012508_dp, 3.572121574953908_dp,& + 5.277810308974558_dp, 7.8050898047384285_dp, 11.587777615192842_dp, 17.298487998001825_dp, 25.990127895451295_dp, 39.32634673857857_dp, 59.96085024576093_dp,& + 92.16864779688744_dp, 142.9088285424604_dp, 223.63608103002358_dp, 353.42944347083966_dp, 564.4730793406918_dp, 911.8045474251959_dp, 1490.9411871748462_dp,& + 2470.3259539694427_dp, 4152.227298440316_dp, 7089.513439000162_dp, 12314.898215191599_dp, 21802.90624200313_dp, 39428.49288596958_dp, 73023.82463664327_dp,& + 138969.14164413267_dp, 272986.4175263669_dp, 557893.4292914037_dp, 1213363.1419136985_dp, 3160013.276178309_dp, 0.35562539358245254_dp, 0.4034598630828778_dp,& + 0.507310698035364_dp, 0.6847544241793833_dp, 0.965797905499124_dp, 1.3985904597574628_dp, 2.0590328917447116_dp, 3.0664136286150927_dp, 4.608786136806865_dp,& + 6.9844140449501895_dp, 10.67005177539468_dp, 16.434554413045298_dp, 25.529954614876807_dp, 40.0165712983268_dp, 63.323071537954775_dp, 101.22419148541576_dp,& + 163.5720951785129_dp, 267.4096498030514_dp, 442.6620147937182_dp, 742.7299414402248_dp, 1264.594124324258_dp, 2187.7911393276054_dp, 3851.763119153975_dp,& + 6913.383865787345_dp, 12677.15458167547_dp, 23810.25092763602_dp, 45950.63865686885_dp, 91498.37485707413_dp, 189213.13598878586_dp, 412506.46573426365_dp, 1004859.506854019_dp, 757500.169762731_dp] + aw%aw_erange_matrix(:, 17) = [.18118431919794764_dp, 0.569409896731795_dp, 1.0399575954447753_dp, 1.6642774050832718_dp, 2.5416705589038666_dp, 3.817686030211855_dp,& + 5.712321227186271_dp, 8.564613330770575_dp, 12.904350409701964_dp, 19.568888331266418_dp, 29.895695056866206_dp, 46.04343093576417_dp, 71.5338357343432_dp,& + 112.17788900752778_dp, 177.6801488903931_dp, 284.45814060206254_dp, 460.674367791145_dp, 755.3691485577447_dp, 1255.340718976754_dp, 2116.97044167198_dp,& + 3627.5472563405187_dp, 6326.311406095248_dp, 11249.843141984617_dp, 20444.63279555149_dp, 38074.51328278192_dp, 72907.33134133912_dp, 144152.9579642091_dp,& + 295906.8845605476_dp, 635237.5946890834_dp, 1441541.5594042293_dp, 3533032.483017847_dp, 10300282.297035703_dp, 0.3666004567229466_dp, 0.41909533951682115_dp,& + 0.5337007693305699_dp, 0.7311922617920863_dp, 1.047397173851464_dp, 1.5405811924145458_dp, 2.3040410310537687_dp, 3.4869635940224217_dp, 5.328980129783192_dp,& + 8.21786366292428_dp, 12.786862454319088_dp, 20.0807884362153_dp, 31.842977578575024_dp, 51.017784629932365_dp, 82.64330507271109_dp, 135.4622543365706_dp,& + 224.87803543778475_dp, 378.47920097589025_dp, 646.570836391214_dp, 1122.6914600829598_dp, 1984.5495359592944_dp, 3577.888523900694_dp, 6593.427321251175_dp,& + 12452.706002367568_dp, 24181.569964546125_dp, 48474.222324463255_dp, 100819.77620242331_dp, 219012.9151368635_dp, 501508.5608275271_dp, 1228961.4319415095_dp, 3359678.97519788_dp, 3198823.17240385_dp] + aw%aw_erange_matrix(:, 18) = [0.1860758083606257_dp, 0.5863105731285033_dp, 1.0762838189916888_dp, 1.735025194760996_dp, 2.6741091733730666_dp, 4.059774820324427_dp,& + 6.147499799667448_dp, 9.337719533159323_dp, 14.267190355767958_dp, 21.960866171726565_dp, 34.08763874663045_dp, 53.39659047772489_dp, 84.47130014903539_dp,& + 135.05292206821736_dp, 218.3968931937055_dp, 357.54107328410043_dp, 593.1761358820205_dp, 998.4464642388938_dp, 1707.390489925032_dp, 2970.9030847374506_dp,& + 5269.79573455244_dp, 9550.044752723195_dp, 17728.825622420598_dp, 33825.049900245765_dp, 66597.83794457617_dp, 136026.81652248927_dp, 290225.5203619125_dp,& + 652973.7303844218_dp, 1570277.6349969232_dp, 4120560.3068352453_dp, 12225526.961836666_dp, 44976022.1592941_dp, 0.37674253105568495_dp, 0.43381021502950023_dp,& + 0.5590636422872557_dp, 0.7766587789599726_dp, 1.1286591474829935_dp, 1.68435592509438_dp, 2.5563667570796293_dp, 3.9277652235068583_dp, 6.097912064812507_dp,& + 9.560625610789286_dp, 15.139088266420053_dp, 24.221728239197674_dp, 39.180550580116204_dp, 64.12452706067008_dp, 106.27918892115885_dp, 178.55890322928792_dp,& + 304.458022589578_dp, 527.5532342378145_dp, 930.4049107379313_dp, 1673.1477374753613_dp, 3074.6018027427394_dp, 5788.391058089275_dp, 11199.697804802257_dp,& + 22357.499058820344_dp, 46274.36537417859_dp, 99934.30172443499_dp, 227100.46858913172_dp, 549456.1902431552_dp, 1439654.5954696422_dp, 4195690.360297783_dp,& + 14287820.480068853_dp, 67797329.79665162_dp] + aw%aw_erange_matrix(:, 19) = [.18894944364096963_dp, 0.5962994473518639_dp, 1.0979679811546372_dp, 1.7777457879798018_dp, 2.755038431602313_dp, 4.2094890725295695_dp,& + 6.419910672165012_dp, 9.827743718777555_dp, 15.14232519057394_dp, 23.518028627832294_dp, 36.85642384608609_dp, 58.3288648866487_dp, 93.29351960290545_dp,& + 150.92965910813132_dp, 247.19917473345893_dp, 410.3110727485798_dp, 691.0051346282855_dp, 1182.327758062675_dp, 2058.578907101761_dp, 3654.0712480702805_dp,& + 6627.183883848432_dp, 12313.689493852524_dp, 23517.234882837332_dp, 46357.167452919886_dp, 94815.65398959102_dp, 202633.14120244567_dp, 456833.45962230937_dp,& + 1101461.096498392_dp, 2900225.249530281_dp, 8637618.748843128_dp, 31160984.654377617_dp, 163046130.3896004_dp, 0.3827101036463066_dp, 0.4425913279562002_dp,& + 0.5744425048624656_dp, 0.804618202373891_dp, 1.179281838121873_dp, 1.7750696801469283_dp, 2.717660210867893_dp, 4.213395860766345_dp, 6.603340508278996_dp,& + 10.45667355729473_dp, 16.73411042964203_dp, 27.07791316760568_dp, 44.334509463025526_dp, 73.51209156253726_dp, 123.56723754128413_dp, 210.80455542346078_dp,& + 365.486536699493_dp, 644.9928757856525_dp, 1160.7129102321292_dp, 2134.627971456765_dp, 4022.319779194768_dp, 7790.4608937563735_dp, 15569.825611679273_dp,& + 32269.164071811185_dp, 69800.37245131386_dp, 158930.03677550773_dp, 385455.2889064046_dp, 1013100.9672579938_dp, 2964362.2649549907_dp, 10115616.277159294_dp,& + 44251495.17814687_dp, 24622278.5292175_dp] + case(34) + aw%energy_range(:) = [9649.0_dp, 15161.0_dp, 29986.0_dp, 49196.0_dp, 109833.0_dp, 276208.0_dp, 852991.0_dp] + aw%aw_erange_matrix(:, 1) = [0.13207515772844727_dp, 0.405991108403864_dp, 0.7100791180957539_dp, 1.0674316993343833_dp, 1.5058443663983385_dp, 2.0602382660689633_dp,& + 2.7757484556313985_dp, 3.711806532052663_dp, 4.947645044945255_dp, 6.589801356244469_dp, 8.782420666111134_dp, 11.721478364771365_dp, 15.674500523350034_dp,& + 21.008017787373205_dp, 28.22593014264274_dp, 38.02331749903241_dp, 51.362195208386105_dp, 69.57856923496088_dp, 94.53432041984598_dp, 128.83359338669658_dp,& + 176.13249956696887_dp, 241.58470670964914_dp, 332.48668514742263_dp, 459.220222708152_dp, 636.6470551378719_dp, 886.216031469228_dp, 1239.261662676278_dp,& + 1742.4871050895674_dp, 2467.9964867366607_dp, 3534.353825869125_dp, 5159.135288744986_dp, 7820.30687542924_dp, 12915.999073999303_dp, 27423.79759942945_dp,& + 0.26576346823795405_dp, 0.2854396551016808_dp, 0.32655197737161484_dp, 0.39274601046287516_dp, 0.48984881388427076_dp, 0.6263944482633245_dp, 0.8144408041785135_dp,& + 1.070757575293203_dp, 1.4185065739762008_dp, 1.889596892023973_dp, 2.527980829463319_dp, 3.3942720864211324_dp, 4.572231822130947_dp, 6.17790432405361_dp,& + 8.372526211327902_dp, 11.380831596076106_dp, 15.517105781570788_dp, 21.222416096494825_dp, 29.118047224727174_dp, 40.08257127813093_dp, 55.363655573112425_dp,& + 76.74148031407067_dp, 106.77011264742791_dp, 149.13984256372788_dp, 209.23574802895516_dp, 295.0380382861162_dp, 418.6824781799572_dp, 599.4725232857328_dp,& + 870.5618605429147_dp, 1296.282804430787_dp, 2025.283801158086_dp, 3491.3059333297665_dp, 7474.317631875756_dp, 28531.55532533201_dp] + aw%aw_erange_matrix(:, 2) = [0.13599210879419024_dp, 0.41865733842571035_dp, 0.734387462880487_dp, 1.1087078459161832_dp, 1.5726641901039529_dp, 2.165714712843095_dp,& + 2.9394684766946595_dp, 3.962695691901657_dp, 5.328172864333448_dp, 7.162136411063943_dp, 9.637432516710518_dp, 12.991909466518228_dp, 17.55426383461847_dp,& + 23.78051806766095_dp, 32.30571538388694_dp, 44.01747962910964_dp, 60.161119876385705_dp, 82.49044121504559_dp, 113.48508380736385_dp, 156.6651752262542_dp,& + 217.04910217389076_dp, 301.823097180824_dp, 421.326779743335_dp, 590.5151234901978_dp, 831.1508175496598_dp, 1175.1475564541768_dp, 1669.8147612822702_dp,& + 2386.5033267913464_dp, 3436.11940867051_dp, 5000.901252994878_dp, 7412.324148921864_dp, 11389.23639096364_dp, 19014.75702535834_dp, 40656.29906587002_dp,& + 0.2737475207928825_dp, 0.2952786790800227_dp, 0.34039675533342323_dp, 0.4133708800225637_dp, 0.5210568682574819_dp, 0.6735634934463747_dp, 0.885293451950756_dp,& + 1.1764687033967232_dp, 1.575309481781747_dp, 2.1211239192365996_dp, 2.8686862980856427_dp, 3.8944530711305823_dp, 5.305413278430533_dp, 7.2517322156689525_dp,& + 9.944880861346203_dp, 13.683733937475726_dp, 18.89229644939318_dp, 26.1744814467069_dp, 36.39402095230821_dp, 50.791640045991635_dp, 71.15786208341221_dp,& + 100.0896105547862_dp, 141.37465650014659_dp, 200.57507440601208_dp, 285.9310387743719_dp, 409.81030920422364_dp, 591.1755952564811_dp, 860.2110797442753_dp,& + 1268.287932013144_dp, 1913.3787096119436_dp, 3017.958277485201_dp, 5225.5076295652025_dp, 11175.8295539236_dp, 42493.69287150706_dp] + aw%aw_erange_matrix(:, 3) = [0.14157456993085618_dp, 0.43680814305293825_dp, 0.7695603918544728_dp, 1.1691652838645754_dp, 1.6718472598074612_dp, 2.3244228725405374_dp,& + 3.189182451328711_dp, 4.350562914610808_dp, 5.924439306359134_dp, 8.071200190010469_dp, 11.014281956686672_dp, 15.066594360092068_dp, 20.668390911055305_dp,& + 28.44180291698298_dp, 39.26974002093017_dp, 54.41058484826287_dp, 75.66572466277076_dp, 105.6254757771726_dp, 148.03193881969935_dp, 208.3172512208018_dp,& + 294.4065207981018_dp, 417.9228078083311_dp, 596.0074159115596_dp, 854.090540688523_dp, 1230.1481604663468_dp, 1781.3282413698837_dp, 2594.479625814838_dp,& + 3803.497041610086_dp, 5619.84470555754_dp, 8392.880364891958_dp, 12752.616596160462_dp, 20039.19394160478_dp, 34069.0659733131_dp, 73716.52254207557_dp,& + 0.28514234691822854_dp, 0.30952051330129193_dp, 0.36082397822605955_dp, 0.444362626815503_dp, 0.5687241475224296_dp, 0.7466995085435535_dp, 0.9967403173431321_dp,& + 1.3451190863662297_dp, 1.8290618703769976_dp, 2.50126712171007_dp, 3.4364289749111423_dp, 4.740680380007788_dp, 6.565312747281522_dp, 9.12679076184029_dp,& + 12.73608082512356_dp, 17.84183040178123_dp, 25.094256075252144_dp, 35.44016472753401_dp, 50.26505189600494_dp, 71.60683168542646_dp, 102.47931445154013_dp,& + 147.3651890657808_dp, 212.9734421023194_dp, 309.41511024819323_dp, 452.05559786284186_dp, 664.5034127165376_dp, 983.6387878300005_dp, 1468.7306525598128_dp,& + 2220.152861116728_dp, 3425.255864392015_dp, 5497.180237430633_dp, 9607.611108068526_dp, 20546.39934902344_dp, 77652.80170951472_dp] + aw%aw_erange_matrix(:, 4) = [0.14537972365704172_dp, 0.44924937732846576_dp, 0.7939069438582139_dp, 1.2115293253508186_dp, 1.742274641402974_dp, 2.438646450121879_dp,& + 3.3713296629150684_dp, 4.637276320033501_dp, 6.371112976811227_dp, 8.761403563453904_dp, 12.07400661126176_dp, 16.685826322050936_dp, 23.133850907384492_dp,& + 32.18677637709266_dp, 44.95016073622998_dp, 63.02161541345043_dp, 88.72107581753308_dp, 125.43437293871429_dp, 178.12881222660047_dp, 254.13153300040636_dp,& + 364.31201181146474_dp, 524.8905530158796_dp, 760.2239712046822_dp, 1107.130506542137_dp, 1621.6666690030702_dp, 2389.8720059435745_dp, 3545.100289215905_dp,& + 5296.792046393856_dp, 7980.859332173258_dp, 12157.208254096504_dp, 18833.87560950116_dp, 30128.29725464392_dp, 51981.56843007888_dp, 113581.24285918285_dp,& + 0.29292046810329686_dp, 0.31938180850986814_dp, 0.3752391615051481_dp, 0.4666272739869208_dp, 0.6035184960523118_dp, 0.8008736626361799_dp, 1.0804648717121432_dp,& + 1.4736003482843745_dp, 2.025118651024602_dp, 2.7992210995810174_dp, 3.8880019577883864_dp, 5.423967095382597_dp, 7.598483671540265_dp, 10.689098259656856_dp,& + 15.100189404799776_dp, 21.423785021626927_dp, 30.53105704736921_dp, 43.71077401338752_dp, 62.88009577250318_dp, 90.90758923336087_dp, 132.11161052090677_dp,& + 193.0349397957077_dp, 283.65875554453504_dp, 419.32384092692257_dp, 623.8101438332048_dp, 934.3678665192813_dp, 1410.2058150916341_dp, 2147.682363184511_dp,& + 3310.5494277589387_dp, 5201.420046514296_dp, 8473.557800314775_dp, 14944.543756287507_dp, 32001.381350595566_dp, 120417.37064242488_dp] + aw%aw_erange_matrix(:, 5) = [0.15111478683237578_dp, 0.46811081455805653_dp, 0.8311975658154092_dp, 1.277245657117571_dp, 1.8530267811044683_dp, 2.6207793743639676_dp,& + 3.6658104514987024_dp, 5.107246498350614_dp, 7.113506495693816_dp, 9.924804821974032_dp, 13.886131394604528_dp, 19.49590677142994_dp, 27.47820253689281_dp,& + 38.89058150232696_dp, 55.28609346493793_dp, 78.95811810682723_dp, 113.31277487728954_dp, 163.43910700431258_dp, 236.9880966222402_dp, 345.5375832850856_dp,& + 506.7277789266936_dp, 747.6291874168176_dp, 1110.0992865921862_dp, 1659.3801603581437_dp, 2498.036749955731_dp, 3788.815996745633_dp, 5792.691112251481_dp,& + 8933.562233913393_dp, 13912.5117339868_dp, 21925.010151757728_dp, 35138.25619155491_dp, 58037.885439910475_dp, 102878.64576803103_dp, 228949.87062864064_dp,& + 0.30466116249925723_dp, 0.33448999997528_dp, 0.39775748201433164_dp, 0.5020431600763641_dp, 0.6597680435379347_dp, 0.8897794356898496_dp, 1.2198845885842693_dp,& + 1.6906902612632702_dp, 2.361327809416546_dp, 3.317974468669039_dp, 4.686572913471436_dp, 6.651901833209751_dp, 9.486316315170766_dp, 13.593305414380533_dp,& + 19.57390295671377_dp, 28.32858472187177_dp, 41.21465830698257_dp, 60.291072612452794_dp, 88.70200998589976_dp, 131.28259205540442_dp, 195.52312215176198_dp,& + 293.11741299959453_dp, 442.472251954802_dp, 672.8167062941227_dp, 1031.0121854686051_dp, 1593.012339907218_dp, 2483.590841950321_dp, 3911.6669142200035_dp,& + 6238.5231601672385_dp, 10129.751559788456_dp, 16981.74160635827_dp, 30536.056841551963_dp, 65732.37502124789_dp, 245660.71368655932_dp] + aw%aw_erange_matrix(:, 6) = [0.15704353232796245_dp, 0.4877544479660704_dp, 0.8705376156017336_dp, 1.3476766920864_dp, 1.9737426791979278_dp, 2.8227090946785225_dp,& + 3.997888328321955_dp, 5.646288443196994_dp, 7.979713585250564_dp, 11.306104853980733_dp, 16.076474036543857_dp, 22.955699193585055_dp, 32.930053373920856_dp,& + 47.47165037958756_dp, 68.79170082433475_dp, 100.23337165106483_dp, 146.88580759062535_dp, 216.55141603131435_dp, 321.2823482312382_dp, 479.84253008685556_dp,& + 721.6893163095895_dp, 1093.4758256486132_dp, 1669.780298225661_dp, 2571.0074565627824_dp, 3993.6144689187036_dp, 6261.819958404189_dp, 9917.405887043775_dp,& + 15878.648337580931_dp, 25729.53619615957_dp, 42273.37458242063_dp, 70711.43133488682_dp, 121772.29407575646_dp, 223895.20974520067_dp, 511167.1805753637_dp,& + 0.3168215245682693_dp, 0.35043246766637764_dp, 0.42209228667081694_dp, 0.5411651568675625_dp, 0.7231338255849368_dp, 0.9917838145432007_dp, 1.3827323888424163_dp,& + 1.948858523758149_dp, 2.7685520945936393_dp, 3.958248763359216_dp, 5.69155685455881_dp, 8.22860474914602_dp, 11.961351425605036_dp, 17.48401674923339_dp,& + 25.70334691811683_dp, 38.01255695679674_dp, 56.567920087611036_dp, 84.73230593273999_dp, 127.79279074297057_dp, 194.13262416830213_dp, 297.16429850617567_dp,& + 458.5516775688101_dp, 713.6415082198464_dp, 1120.7309215735056_dp, 1777.0914240859645_dp, 2847.100049696002_dp, 4612.5746467497465_dp, 7565.363105491919_dp,& + 12586.173245720442_dp, 21325.994478121225_dp, 37197.937321555175_dp, 68943.1032010462_dp, 150241.71258102785_dp, 557720.3208697784_dp] + aw%aw_erange_matrix(:, 7) = [0.16336922513552726_dp, 0.5088837963863347_dp, 0.9134464251208241_dp, 1.4258068793865757_dp, 2.110076760757019_dp, 3.0549223319570658_dp,& + 4.386714080773768_dp, 6.288970678299134_dp, 9.031595056512524_dp, 13.015314763001339_dp, 18.83983365553746_dp, 27.40919724979278_dp, 40.09598751880866_dp,& + 58.99925287825027_dp, 87.35305062053737_dp, 130.1791624944713_dp, 195.3394286468929_dp, 295.2486883643026_dp, 449.6914179453214_dp, 690.5032975197853_dp,& + 1069.4420394766496_dp, 1671.582707097392_dp, 2638.4152977365293_dp, 4208.234704650762_dp, 6787.845837025887_dp, 11081.975915584215_dp, 18331.11464078846_dp,& + 30757.7543831196_dp, 52425.18373362508_dp, 90952.31947001838_dp, 161183.38574164535_dp, 294404.0420740371_dp, 571514.7455391894_dp, 1357785.7335867172_dp,& + 0.3298231494705116_dp, 0.3678238583365475_dp, 0.44931443538568944_dp, 0.5859423647480262_dp, 0.7971613283485441_dp, 1.1132755348536536_dp, 1.5804195782403758_dp,& + 2.26835630112171_dp, 3.2825754864813064_dp, 4.7831079906178315_dp, 7.01394730221803_dp, 10.349374600517876_dp, 15.367451600728_dp, 22.967563824366035_dp,& + 34.56004919104946_dp, 52.374936525753725_dp, 79.96951316778983_dp, 123.07138037510275_dp, 190.99409829094074_dp, 299.04206165572833_dp, 472.6466080518463_dp,& + 754.5744583501951_dp, 1217.6699793620016_dp, 1987.724673849413_dp, 3285.207068806235_dp, 5502.805705516988_dp, 9352.508394580818_dp, 16151.576514128332_dp,& + 28398.10726253618_dp, 51001.74394184054_dp, 94285.04834791286_dp, 183730.02847568074_dp, 411506.64532360405_dp, 1520426.766419325_dp] + aw%aw_erange_matrix(:, 8) = [0.1835103101234003_dp, 0.5774305061474206_dp, 1.057140472868453_dp, 1.697614005082806_dp, 2.6038279115366483_dp, 3.930849397069668_dp,& + 5.914914021102437_dp, 8.92301131893533_dp, 13.533362340789761_dp, 20.667776233995074_dp, 31.812016357593226_dp, 49.387219863328404_dp, 77.3839092638016_dp,& + 122.4588606715459_dp, 195.86011110608575_dp, 316.8577691536953_dp, 518.9611571628808_dp, 861.3906597021048_dp, 1450.6667756885272_dp, 2482.126411324662_dp,& + 4321.685991308644_dp, 7671.18540800507_dp, 13912.797854700362_dp, 25850.79390530169_dp, 49371.03198418239_dp, 97320.21724486594_dp, 199052.03066138524_dp,& + 425399.7542270562_dp, 959057.1525395216_dp, 2312357.9736451125_dp, 6088604.151380904_dp, 18133512.159556706_dp, 65418675.293680795_dp, 342296590.6151682_dp,& + 0.37142071027541074_dp, 0.4260563273244676_dp, 0.5456348676942346_dp, 0.752484593582803_dp, 1.0852868522175914_dp, 1.6073303748410037_dp, 2.4206700397850627_dp,& + 3.6897704463837764_dp, 5.681035810947625_dp, 8.82947962399161_dp, 13.852405454162984_dp, 21.945623429966453_dp, 35.126642589694754_dp, 56.843590502572916_dp,& + 93.0724205769061_dp, 154.32725344417676_dp, 259.4111633804356_dp, 442.5533297274132_dp, 767.2854489636625_dp, 1354.0674261637732_dp, 2436.7445344093326_dp,& + 4481.335149019925_dp, 8444.272788875625_dp, 16354.953153653125_dp, 32686.61977168015_dp, 67744.54837929386_dp, 146536.159793689_dp, 333651.2446730961_dp,& + 809207.8445405798_dp, 2126855.0754410354_dp, 6223266.011027118_dp, 21236461.045184538_dp, 92901077.9747871_dp, 681507114.6255051_dp] + end select + + end subroutine set_aw_array_omega + + !> \brief Unpacks the minimax coefficients for the desired energy range + !! @param[in] grid_size - size of the grid + !! @param[in] e_range - the selected energy range + !! @param[inout] ac_we - vector containing coefficients and weights + !! @param[out] ierr - error code + subroutine get_points_weights_omega(grid_size, e_range, ac_we, ierr, erange_list) + integer, intent(in) :: grid_size + real(kind=dp), intent(in) :: e_range + real(kind=dp), dimension(2* grid_size), intent(inout) :: ac_we + integer, intent(out) :: ierr + real(kind=dp),optional,allocatable,intent(out) :: erange_list(:) + + !> Internal variables + integer :: kloc, bup + type(er_aw_aux) :: aw + real(kind=dp) :: e_ratio + + !> Begin work + ierr = 0 + if (.not. any(omega_npoints_supported == grid_size)) then + ierr = 1 + _REGISTER_EXC("The grid size you chose is not available.") + return + end if + + ! Find location of grid size + !kloc = findloc(omega_npoints_supported, grid_size, 1) + do kloc=1,size(omega_npoints_supported) + if (omega_npoints_supported(kloc) == grid_size) exit + end do + bup = energy_ranges_grids(kloc) + + ! Allocate and set type elements + allocate(aw%energy_range(bup)) + allocate(aw%aw_erange_matrix(2*grid_size, bup+1)) + call set_aw_array_omega(grid_size, aw) + + ! Get coefficients and weights + e_ratio = 1.0_dp + call aw%get_coeff_weight(grid_size, bup, e_range, ac_we, e_ratio) + ac_we(:) = ac_we(:) / e_ratio + + if (present(erange_list)) then + allocate(erange_list(bup)) + erange_list(:) = aw%energy_range + end if + + ! Deallocate + deallocate(aw%energy_range) + deallocate(aw%aw_erange_matrix) + + end subroutine get_points_weights_omega + +end module minimax_omega diff --git a/GX-PAW/common/src/17_minimax/minimax_omega.o b/GX-PAW/common/src/17_minimax/minimax_omega.o new file mode 100644 index 00000000..52f8b3c1 Binary files /dev/null and b/GX-PAW/common/src/17_minimax/minimax_omega.o differ diff --git a/GX-PAW/common/src/17_minimax/minimax_tau.F90 b/GX-PAW/common/src/17_minimax/minimax_tau.F90 new file mode 100644 index 00000000..65a76d37 --- /dev/null +++ b/GX-PAW/common/src/17_minimax/minimax_tau.F90 @@ -0,0 +1,2957 @@ +! *************************************************************************************************** +! Copyright (C) 2020-2023 Green-X library +! This file is distributed under the terms of the APACHE2 License. +! +! *************************************************************************************************** +!> \brief This module contains the tabulated minimax coefficients that approximate +!> 1/x ~ sum_{i}^{k} w_i exp(-a_i * x) with x \in [1:rc] +!> The arrays containing the coefficients and weights are stored in the `er_aw_aux` derived type. +!> To extend this module, add the new entries to `tau_npoints_supported`, `energy_ranges_grids`, +!> and fill the corresponding arrays in the derived type. +!> reference: [https://doi.org/10.1021/ct5001268](https://doi.org/10.1021/ct5001268) +!> reference: [https://doi.org/10.1103/PhysRevB.94.165109](https://doi.org/10.1103/PhysRevB.94.165109) +! *************************************************************************************************** +module minimax_tau +#if defined HAVE_CONFIG_H +#include "config.h" +#endif +#include "abi_common.h" +#include "gx_common.h" + use defs_basis, only: dp + use m_errors + !use kinds, only: dp + !use error_handling, only: register_exc + use minimax_utils, only: er_aw_aux + implicit none + + private + + !> list with the number of points supported for the imag-time meshes + integer, parameter :: ngrids = 15 + integer, parameter, public :: tau_npoints_supported(ngrids) = & + [6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34] + integer, parameter :: energy_ranges_grids(ngrids) = & + [13, 13, 15, 18, 21, 36, 37, 39, 40, 40, 19, 28, 28, 18, 7] + + public :: get_points_weights_tau + +contains + + !> \brief Stores the minimax coefficients for all supported grid sizes + !! @param[in] grid_size - size of the grid + !! @param[inout] aw - derived type of energy ranges and coefficients:weights + subroutine set_aw_array_tau(grid_size, aw) + integer, intent(in) :: grid_size + type(er_aw_aux), intent(inout) :: aw + + select case(grid_size) + case(6) + aw%energy_range(:) = [1.5849_dp, 2.5119_dp, 3.9811_dp, 6.3096_dp, 10.0000_dp,& + 15.8489_dp, 25.1189_dp, 39.8107_dp, 63.0957_dp,& + 100.0000_dp, 158.4893_dp, 251.1886_dp, 398.1072_dp] + aw%aw_erange_matrix(:, 1) = [0.1534423273_dp, 0.8208030144_dp, 2.0763266378_dp, 4.0375449448_dp, 6.9549672561_dp, 11.4891014500_dp, 0.3951503587_dp,& + 0.9483584804_dp, 1.5813287669_dp, 2.3797403876_dp, 3.5481339356_dp, 5.8817260742_dp] + aw%aw_erange_matrix(:, 2) = [0.1205040984_dp, 0.6471706375_dp, 1.6495023836_dp, 3.2457669505_dp, 5.6881108969_dp, 9.6288261179_dp, 0.3106082604_dp,& + 0.7514093561_dp, 1.2720076125_dp, 1.9595162536_dp, 3.0177199430_dp, 5.2126406909_dp] + aw%aw_erange_matrix(:, 3) = [0.1005838109_dp, 0.5423052006_dp, 1.3926894069_dp, 2.7733849876_dp, 4.9443770209_dp, 8.5653072999_dp, 0.2594925337_dp,& + 0.6326994282_dp, 1.0873449642_dp, 1.7143811393_dp, 2.7218526271_dp, 4.8651609155_dp] + aw%aw_erange_matrix(:, 4) = [0.0745374837_dp, 0.4051625322_dp, 1.0572745177_dp, 2.1597944537_dp, 3.9894964633_dp, 7.2237871301_dp, 0.1926489629_dp,& + 0.4774754563_dp, 0.8471482105_dp, 1.4011198768_dp, 2.3561324362_dp, 4.4544447949_dp] + aw%aw_erange_matrix(:, 5) = [0.0543212595_dp, 0.2985187630_dp, 0.7962225874_dp, 1.6836229509_dp, 3.2535534712_dp, 6.1993107282_dp, 0.1407385830_dp,& + 0.3565694185_dp, 0.6603802522_dp, 1.1604683175_dp, 2.0803300697_dp, 4.1513349990_dp] + aw%aw_erange_matrix(:, 6) = [0.0391835514_dp, 0.2184067186_dp, 0.5994995153_dp, 1.3240424530_dp, 2.6961080409_dp, 5.4203992106_dp, 0.1018333153_dp,& + 0.2654513291_dp, 0.5191592345_dp, 0.9779410789_dp, 1.8692768235_dp, 3.9186061085_dp] + aw%aw_erange_matrix(:, 7) = [0.0280585989_dp, 0.1592861279_dp, 0.4535621551_dp, 1.0550856007_dp, 2.2736909699_dp, 4.8223631523_dp, 0.0732079266_dp,& + 0.1979229248_dp, 0.4135142943_dp, 0.8384872273_dp, 1.7033414620_dp, 3.7333533452_dp] + aw%aw_erange_matrix(:, 8) = [0.0199972626_dp, 0.1162433512_dp, 0.3464841610_dp, 0.8546910330_dp, 1.9521830237_dp, 4.3586015820_dp, 0.0524378861_dp,& + 0.1485110005_dp, 0.3348353302_dp, 0.7306689896_dp, 1.5701588368_dp, 3.5827524038_dp] + aw%aw_erange_matrix(:, 9) = [0.0142171937_dp, 0.0852259462_dp, 0.2684487069_dp, 0.7053207912_dp, 1.7059999114_dp, 3.9958883070_dp, 0.0375251243_dp,& + 0.1126916200_dp, 0.2761723166_dp, 0.6463232558_dp, 1.4619350572_dp, 3.4590599788_dp] + aw%aw_erange_matrix(:, 10) = [0.0101053619_dp, 0.0630473824_dp, 0.2117607106_dp, 0.5936601317_dp, 1.5164074935_dp, 3.7104671974_dp, 0.0269037518_dp,& + 0.0868884069_dp, 0.2322198587_dp, 0.5797744541_dp, 1.3735367201_dp, 3.3571561550_dp] + aw%aw_erange_matrix(:, 11) = [0.0071978808_dp, 0.0472825494_dp, 0.1706047888_dp, 0.5098889800_dp, 1.3697999561_dp, 3.4851720987_dp, 0.0193881718_dp,& + 0.0683650657_dp, 0.1990907295_dp, 0.5270527982_dp, 1.3013617514_dp, 3.2733697689_dp] + aw%aw_erange_matrix(:, 12) = [0.0051532116_dp, 0.0361337473_dp, 0.1407180752_dp, 0.4469079904_dp, 1.2563367882_dp, 3.3075069418_dp, 0.0141042618_dp,& + 0.0550896004_dp, 0.1740170543_dp, 0.4853305543_dp, 1.2427571345_dp, 3.2049369357_dp] + aw%aw_erange_matrix(:, 13) = [0.0037247921_dp, 0.0282947016_dp, 0.1190443970_dp, 0.3996406559_dp, 1.1688995465_dp, 3.1683119524_dp, 0.0104189611_dp,& + 0.0455916166_dp, 0.1550538183_dp, 0.4525504643_dp, 1.1957054331_dp, 3.1497211714_dp] + aw%aw_erange_matrix(:, 14) = [0.0027359974_dp, 0.0228248008_dp, 0.1034065810_dp, 0.3644298766_dp, 1.1022400211_dp, 3.0606897855_dp, 0.0078759332_dp,& + 0.0388225207_dp, 0.1408179499_dp, 0.4271560097_dp, 1.1585955269_dp, 3.1059901069_dp] + case(8) + aw%energy_range(:) = [10.0000_dp, 15.8489_dp, 25.1189_dp, 39.8107_dp, 63.0957_dp,& + 100.0000_dp, 158.4893_dp, 251.1886_dp, 398.1072_dp, 630.9573_dp,& + 1000.0000_dp, 1584.8932_dp, 2511.8864_dp] + aw%aw_erange_matrix(:, 1) = [0.0410961677_dp, 0.2215921004_dp, 0.5688643520_dp, 1.1299764766_dp, 1.9937655343_dp, 3.3208105202_dp, 5.4098231211_dp,& + 8.9485547791_dp, 0.1060264691_dp, 0.2585290567_dp, 0.4435891050_dp, 0.6929754149_dp, 1.0604512559_dp, 1.6406263618_dp, 2.6364875094_dp, 4.7875207638_dp] + aw%aw_erange_matrix(:, 2) = [0.0294981977_dp, 0.1602023889_dp, 0.4171350374_dp, 0.8475736875_dp, 1.5433057317_dp, 2.6707425150_dp, 4.5354087346_dp,& + 7.8277568864_dp, 0.0762269210_dp, 0.1885752622_dp, 0.3328646094_dp, 0.5428410724_dp, 0.8754790293_dp, 1.4275727338_dp, 2.4016019104_dp, 4.5261221056_dp] + aw%aw_erange_matrix(:, 3) = [0.0209899113_dp, 0.1150165283_dp, 0.3048862124_dp, 0.6373750483_dp, 1.2053450775_dp, 2.1776820981_dp, 3.8637697754_dp,& + 6.9570683332_dp, 0.0543478976_dp, 0.1368874674_dp, 0.2503214962_dp, 0.4296737848_dp, 0.7335320894_dp, 1.2599694377_dp, 2.2127956985_dp, 4.3145944146_dp] + aw%aw_erange_matrix(:, 4) = [0.0148401762_dp, 0.0822239432_dp, 0.2229043947_dp, 0.4824765203_dp, 0.9529144401_dp, 1.8027560234_dp, 3.3434086590_dp,& + 6.2719911449_dp, 0.0385180029_dp, 0.0992010434_dp, 0.1894294562_dp, 0.3445892444_dp, 0.6234527401_dp, 1.1253809532_dp, 2.0573355093_dp, 4.1393353027_dp] + aw%aw_erange_matrix(:, 5) = [0.0104449886_dp, 0.0586763377_dp, 0.1635760280_dp, 0.3689646813_dp, 0.7643187927_dp, 1.5159884551_dp, 2.9363772533_dp,& + 5.7267555407_dp, 0.0271911499_dp, 0.0719923583_dp, 0.1447925468_dp, 0.2804290097_dp, 0.5370201382_dp, 1.0156145492_dp, 1.9274472597_dp, 3.9922032180_dp] + aw%aw_erange_matrix(:, 6) = [0.0073303679_dp, 0.0418998419_dp, 0.1209028303_dp, 0.2859242910_dp, 0.6229028126_dp, 1.2950331297_dp, 2.6150915219_dp,& + 5.2886811820_dp, 0.0191536972_dp, 0.0524874990_dp, 0.1121483173_dp, 0.2317178191_dp, 0.4683927372_dp, 0.9251988681_dp, 1.8180761389_dp, 3.8678537709_dp] + aw%aw_erange_matrix(:, 7) = [0.0051372225_dp, 0.0300161640_dp, 0.0903142204_dp, 0.2250889082_dp, 0.5162665984_dp, 1.1235047008_dp, 2.3595117299_dp,& + 4.9341336214_dp, 0.0134857752_dp, 0.0385736952_dp, 0.0882435850_dp, 0.1944219012_dp, 0.4134424375_dp, 0.8503209725_dp, 1.7256834115_dp, 3.7624829337_dp] + aw%aw_erange_matrix(:, 8) = [0.0036002613_dp, 0.0216336337_dp, 0.0684129319_dp, 0.1803598683_dp, 0.4353504991_dp, 0.9894641326_dp, 2.1550074529_dp,& + 4.6457957380_dp, 0.0095074576_dp, 0.0286789793_dp, 0.0706649087_dp, 0.1656344893_dp, 0.3692115544_dp, 0.7881982435_dp, 1.6476414680_dp, 3.6732307680_dp] + aw%aw_erange_matrix(:, 9) = [0.0025268045_dp, 0.0157375491_dp, 0.0527163930_dp, 0.1473061940_dp, 0.3735693722_dp, 0.8841524703_dp, 1.9907155422_dp,& + 4.4106669852_dp, 0.0067246311_dp, 0.0216513436_dp, 0.0576569758_dp, 0.1432645576_dp, 0.3335125532_dp, 0.7366874142_dp, 1.5818713728_dp, 3.5978167045_dp] + aw%aw_erange_matrix(:, 10) = [0.0017790505_dp, 0.0115988461_dp, 0.0414413896_dp, 0.1227558108_dp, 0.3261731917_dp, 0.8011585238_dp, 1.8585679204_dp,& + 4.2189781344_dp, 0.0047836527_dp, 0.0166593084_dp, 0.0479683727_dp, 0.1258102636_dp, 0.3047080911_dp, 0.6941204359_dp, 1.5267225054_dp, 3.5344255520_dp] + aw%aw_erange_matrix(:, 11) = [0.0012593172_dp, 0.0086977894_dp, 0.0333179986_dp, 0.1044408163_dp, 0.2897047768_dp, 0.7357044190_dp, 1.7524150854_dp,& + 4.0631467031_dp, 0.0034335494_dp, 0.0131079750_dp, 0.0407111652_dp, 0.1121712160_dp, 0.2815295945_dp, 0.6591400198_dp, 1.4808101311_dp, 3.4815299149_dp] + aw%aw_erange_matrix(:, 12) = [0.0008992926_dp, 0.0066689908_dp, 0.0274568200_dp, 0.0907619245_dp, 0.2616803521_dp, 0.6842860055_dp, 1.6676681182_dp,& + 3.9374424568_dp, 0.0024984514_dp, 0.0105791706_dp, 0.0352648241_dp, 0.1015481471_dp, 0.2630137361_dp, 0.6306824085_dp, 1.4430323891_dp, 3.4379149107_dp] + aw%aw_erange_matrix(:, 13) = [0.0006511970_dp, 0.0052555004_dp, 0.0232331300_dp, 0.0805769027_dp, 0.2402766535_dp, 0.6442562263_dp, 1.6007710076_dp,& + 3.8373360452_dp, 0.0018548778_dp, 0.0087795311_dp, 0.0311892270_dp, 0.0933425139_dp, 0.2484004110_dp, 0.6078709938_dp, 1.4124537209_dp, 3.4025456698_dp] + aw%aw_erange_matrix(:, 14) = [0.0004817072_dp, 0.0042773567_dp, 0.0202081663_dp, 0.0730638184_dp, 0.2241387198_dp, 0.6135835799_dp, 1.5489149535_dp,& + 3.7591686639_dp, 0.0014161889_dp, 0.0075045226_dp, 0.0281686456_dp, 0.0870986616_dp, 0.2370801484_dp, 0.5899701185_dp, 1.3882618018_dp, 3.3745190976_dp] + case(10) + aw%energy_range(:) = [10.0000_dp, 15.8489_dp, 25.1189_dp, 39.8107_dp, 63.0957_dp, 100.0000_dp,& + 158.4893_dp, 251.1886_dp, 398.1072_dp, 630.9573_dp, 1000.0000_dp,& + 1584.8932_dp, 2511.8864_dp, 3981.0717_dp, 6309.5734_dp] + aw%aw_erange_matrix(:, 1) = [0.0330697624_dp, 0.1768078438_dp, 0.4464853449_dp, 0.8637994095_dp, 1.4665304201_dp, 2.3172114001_dp, 3.5172089430_dp,& + 5.2328732180_dp, 7.7617287679_dp, 11.7952949789_dp, 0.0851548885_dp, 0.2041221377_dp, 0.3387624704_dp, 0.5020218013_dp, 0.7136389791_dp,& + 1.0042283384_dp, 1.4225951252_dp, 2.0553775439_dp, 3.1013168391_dp, 5.3215604239_dp] + aw%aw_erange_matrix(:, 2) = [0.0236720154_dp, 0.1271138180_dp, 0.3236822915_dp, 0.6344940443_dp, 1.0975870642_dp, 1.7773429154_dp, 2.7785871376_dp,& + 4.2719025722_dp, 6.5582697626_dp, 10.3263813643_dp, 0.0610159587_dp, 0.1475426219_dp, 0.2490140072_dp, 0.3787936644_dp, 0.5578985972_dp,& + 0.8187105789_dp, 1.2113333425_dp, 1.8225764417_dp, 2.8490231857_dp, 5.0376131531_dp] + aw%aw_erange_matrix(:, 3) = [0.0167859311_dp, 0.0906140453_dp, 0.2331247893_dp, 0.4645377048_dp, 0.8225114978_dp, 1.3719280550_dp, 2.2188430810_dp,& + 3.5357560691_dp, 5.6260677965_dp, 9.1774382056_dp, 0.0433183177_dp, 0.1058666501_dp, 0.1824134653_dp, 0.2865259976_dp, 0.4400162724_dp,& + 0.6761202158_dp, 1.0455810781_dp, 1.6359664124_dp, 2.6436405908_dp, 4.8056680998_dp] + aw%aw_erange_matrix(:, 4) = [0.0118170372_dp, 0.0641991517_dp, 0.1672645684_dp, 0.3401155680_dp, 0.6193913122_dp, 1.0690495497_dp, 1.7944040288_dp,& + 2.9682685375_dp, 4.8960358518_dp, 8.2659053716_dp, 0.0305390218_dp, 0.0756000893_dp, 0.1335956518_dp, 0.2180513278_dp, 0.3509424253_dp,& + 0.5655362558_dp, 0.9130793425_dp, 1.4827338153_dp, 2.4721207512_dp, 4.6114350814_dp] + aw%aw_erange_matrix(:, 5) = [0.0082736336_dp, 0.0452968206_dp, 0.1198570122_dp, 0.2498047575_dp, 0.4701898609_dp, 0.8428723827_dp, 1.4710843779_dp,& + 2.5270093394_dp, 4.3178190934_dp, 7.5333932640_dp, 0.0214183290_dp, 0.0538519398_dp, 0.0981228090_dp, 0.1674591236_dp, 0.2833958314_dp,& + 0.4787566255_dp, 0.8054477304_dp, 1.3548062293_dp, 2.3266241431_dp, 4.4464016762_dp] + aw%aw_erange_matrix(:, 6) = [0.0057695951_dp, 0.0318850374_dp, 0.0859854511_dp, 0.1845984841_dp, 0.3607477727_dp, 0.6734363414_dp, 1.2230817482_dp,& + 2.1806860083_dp, 3.8549835580_dp, 6.9382542461_dp, 0.0149667333_dp, 0.0383470288_dp, 0.0724914643_dp, 0.1300892819_dp, 0.2318018691_dp,& + 0.4098643125_dp, 0.7169870686_dp, 1.2469010615_dp, 2.2020857144_dp, 4.3050004436_dp] + aw%aw_erange_matrix(:, 7) = [0.0040123212_dp, 0.0224292598_dp, 0.0619085873_dp, 0.1376297836_dp, 0.2803265917_dp, 0.5457959215_dp, 1.0313322018_dp,& + 1.9064099527_dp, 3.4810591957_dp, 6.4503500759_dp, 0.0104341288_dp, 0.0273555299_dp, 0.0540240668_dp, 0.1023930872_dp, 0.1920401273_dp,& + 0.3546405619_dp, 0.6437134573_dp, 1.1553442821_dp, 2.0949658889_dp, 4.1832825912_dp] + aw%aw_erange_matrix(:, 8) = [0.0027856541_dp, 0.0157937535_dp, 0.0448481728_dp, 0.1037925661_dp, 0.2209854440_dp, 0.4489803369_dp, 0.8818934417_dp,& + 1.6874467002_dp, 3.1766710704_dp, 6.0475787906_dp, 0.0072661315_dp, 0.0195941905_dp, 0.0407225136_dp, 0.0817423486_dp, 0.1611258077_dp,& + 0.3100532566_dp, 0.5827362547_dp, 1.0774384067_dp, 2.0026449628_dp, 4.0782983130_dp] + aw%aw_erange_matrix(:, 9) = [0.0019327474_dp, 0.0111525104_dp, 0.0327753346_dp, 0.0793548313_dp, 0.1769378304_dp, 0.3749891456_dp, 0.7645313671_dp,& + 1.5113972490_dp, 2.9273291880_dp, 5.7132711850_dp, 0.0050602718_dp, 0.0141268602_dp, 0.0311202095_dp, 0.0662243130_dp, 0.1368964938_dp,& + 0.2738596643_dp, 0.5318462411_dp, 1.0110650398_dp, 1.9230352100_dp, 3.9876880962_dp] + aw%aw_erange_matrix(:, 10) = [0.0013414763_dp, 0.0079135387_dp, 0.0242305726_dp, 0.0616336183_dp, 0.1440265775_dp, 0.3180415012_dp, 0.6717744197_dp,& + 1.3691124338_dp, 2.7222502593_dp, 5.4349420610_dp, 0.0035286728_dp, 0.0102803623_dp, 0.0241590001_dp, 0.0544702109_dp, 0.1177892252_dp,& + 0.2443886234_dp, 0.4893474221_dp, 0.9545715678_dp, 1.8545048283_dp, 3.9096100475_dp] + aw%aw_erange_matrix(:, 11) = [0.0009324064_dp, 0.0056560504_dp, 0.0181721289_dp, 0.0487120808_dp, 0.1192629003_dp, 0.2739191229_dp, 0.5980643983_dp,& + 1.2536520059_dp, 2.5531126726_dp, 5.2028197179_dp, 0.0024672655_dp, 0.0075741023_dp, 0.0190815196_dp, 0.0454982798_dp, 0.1026475177_dp,& + 0.2203452052_dp, 0.4538671149_dp, 0.9065751913_dp, 1.7956644412_dp, 3.8424989882_dp] + aw%aw_erange_matrix(:, 12) = [0.0006497444_dp, 0.0040833478_dp, 0.0138630492_dp, 0.0392312547_dp, 0.1005045507_dp, 0.2395418039_dp, 0.5392569146_dp,& + 1.1597390133_dp, 2.4134857725_dp, 5.0092570960_dp, 0.0017326137_dp, 0.0056676592_dp, 0.0153513377_dp, 0.0386046831_dp, 0.0906088701_dp,& + 0.2007206044_dp, 0.4242960863_dp, 0.8659292391_dp, 1.7453482692_dp, 3.7850453570_dp] + aw%aw_erange_matrix(:, 13) = [0.0004546223_dp, 0.0029878372_dp, 0.0107866942_dp, 0.0322343304_dp, 0.0862209138_dp, 0.2126637392_dp, 0.4922674783_dp,& + 1.0833747559_dp, 2.2984274495_dp, 4.8483158018_dp, 0.0012247077_dp, 0.0043218651_dp, 0.0125921514_dp, 0.0332845904_dp, 0.0810286101_dp,& + 0.1847320073_dp, 0.3997482877_dp, 0.8317002528_dp, 1.7026006523_dp, 3.7361789668_dp] + aw%aw_erange_matrix(:, 14) = [0.0003200556_dp, 0.0022246315_dp, 0.0085816023_dp, 0.0270450051_dp, 0.0753063709_dp, 0.1916196153_dp, 0.4547477247_dp,& + 1.0214393206_dp, 2.2039990618_dp, 4.7151828791_dp, 0.0008740345_dp, 0.0033691497_dp, 0.0105393561_dp, 0.0291696470_dp, 0.0734134385_dp,& + 0.1717543874_dp, 0.3794887739_dp, 0.8030879371_dp, 1.6665845213_dp, 3.6949629981_dp] + aw%aw_erange_matrix(:, 15) = [0.0002273927_dp, 0.0016930353_dp, 0.0069960068_dp, 0.0231854324_dp, 0.0669605830_dp, 0.1751716668_dp, 0.4249074065_dp,& + 0.9714990965_dp, 2.1270679156_dp, 4.6059719000_dp, 0.0006324539_dp, 0.0026928112_dp, 0.0090069991_dp, 0.0259895933_dp, 0.0673853109_dp,& + 0.1612907871_dp, 0.3629137459_dp, 0.7794159919_dp, 1.6365795128_dp, 3.6605913731_dp] + aw%aw_erange_matrix(:, 16) = [0.0001638280_dp, 0.0013235929_dp, 0.0058560160_dp, 0.0203202808_dp, 0.0606089867_dp, 0.1624111567_dp, 0.4014057161_dp,& + 0.9317006239_dp, 2.0652164939_dp, 4.5176548597_dp, 0.0004668065_dp, 0.0022124398_dp, 0.0078651680_dp, 0.0235476809_dp, 0.0626594967_dp,& + 0.1529569671_dp, 0.3495462844_dp, 0.7601415052_dp, 1.6120023672_dp, 3.6324120602_dp] + case(12) + aw%energy_range(:) = [10.0000_dp, 15.8489_dp, 25.1189_dp, 39.8107_dp, 63.0957_dp, 100.0000_dp,& + 158.4893_dp, 251.1886_dp, 398.1072_dp, 630.9573_dp, 1000.0000_dp, 1584.8932_dp, 2511.8864_dp,& + 3981.0717_dp, 6309.5734_dp, 10000.0000_dp, 15848.9319_dp, 25118.8643_dp] + aw%aw_erange_matrix(:, 1) = [0.0276731293_dp, 0.1472866131_dp, 0.3687581752_dp, 0.7039332404_dp, 1.1723654412_dp, 1.8045683155_dp, 2.6469524305_dp,& + 3.7693192226_dp, 5.2773524399_dp, 7.3381749736_dp, 10.2488461667_dp, 14.7099922874_dp, 0.0711846766_dp, 0.1690895322_dp, 0.2757926388_dp,& + 0.3977636094_dp, 0.5441057435_dp, 0.7279147631_dp, 0.9682939485_dp, 1.2936786640_dp, 1.7493131133_dp, 2.4187704026_dp, 3.5024366141_dp, 5.7855524080_dp] + aw%aw_erange_matrix(:, 2) = [0.0197744403_dp, 0.1055540607_dp, 0.2657286900_dp, 0.5115778444_dp, 0.8622848926_dp, 1.3486298025_dp, 2.0182853816_dp,& + 2.9432989908_dp, 4.2321628138_dp, 6.0546789845_dp, 8.7089828257_dp, 12.8889838191_dp, 0.0509006255_dp, 0.1216171100_dp, 0.2005723407_dp,& + 0.2942623895_dp, 0.4121942175_dp, 0.5683208329_dp, 0.7828128482_dp, 1.0849323300_dp, 1.5201863096_dp, 2.1715313996_dp, 3.2362170757_dp, 5.4827819151_dp] + aw%aw_erange_matrix(:, 3) = [0.0139914438_dp, 0.0749462508_dp, 0.1899352964_dp, 0.3694953283_dp, 0.6321343467_dp, 1.0083502424_dp, 1.5460638227_dp,& + 2.3179957425_dp, 3.4336834940_dp, 5.0643777475_dp, 7.5093175535_dp, 11.4582109486_dp, 0.0360435732_dp, 0.0867256318_dp, 0.1449645046_dp,& + 0.2171731804_dp, 0.3130978055_dp, 0.4472033444_dp, 0.6401597909_dp, 0.9215937590_dp, 1.3374215538_dp, 1.9708906690_dp, 3.0177535019_dp, 5.2339591533_dp] + aw%aw_erange_matrix(:, 4) = [0.0098233039_dp, 0.0528381746_dp, 0.1349852452_dp, 0.2659580878_dp, 0.4633451027_dp, 0.7567923091_dp, 1.1933915052_dp,& + 1.8450943819_dp, 2.8211687374_dp, 4.2936117871_dp, 6.5630286139_dp, 10.3169372291_dp, 0.0253298174_dp, 0.0614579856_dp, 0.1044042198_dp,& + 0.1604027682_dp, 0.2392238170_dp, 0.3554023577_dp, 0.5295956187_dp, 0.7916439851_dp, 1.1882714021_dp, 1.8038125350_dp, 2.8336933495_dp, 5.0241742006_dp] + aw%aw_erange_matrix(:, 5) = [0.0068554341_dp, 0.0370564464_dp, 0.0955849405_dp, 0.1912568606_dp, 0.3405607339_dp, 0.5717808682_dp, 0.9302915137_dp,& + 1.4862655552_dp, 2.3478924769_dp, 3.6875108667_dp, 5.8073060489_dp, 9.3940946176_dp, 0.0176966619_dp, 0.0433653612_dp, 0.0751114198_dp,& + 0.1189110538_dp, 0.1843254395_dp, 0.2855556571_dp, 0.4429546072_dp, 0.6866338193_dp, 1.0644429943_dp, 1.6622940695_dp, 2.6760843207_dp, 4.8445700066_dp] + aw%aw_erange_matrix(:, 6) = [0.0047621174_dp, 0.0258922313_dp, 0.0675671842_dp, 0.1377372356_dp, 0.2516682757_dp, 0.4358989283_dp, 0.7335111111_dp,& + 1.2123305473_dp, 1.9789993531_dp, 3.2058934683_dp, 5.1968506439_dp, 8.6390361850_dp, 0.0123090460_dp, 0.0305206067_dp, 0.0541046151_dp,& + 0.0887139624_dp, 0.1434876371_dp, 0.2320235826_dp, 0.3742832810_dp, 0.6007236316_dp, 0.9604392059_dp, 1.5411563269_dp, 2.5398045385_dp, 4.6893655829_dp] + aw%aw_erange_matrix(:, 7) = [0.0032965068_dp, 0.0180490022_dp, 0.0477641980_dp, 0.0995665181_dp, 0.1874300857_dp, 0.3359256681_dp, 0.5855771225_dp,& + 1.0016134105_dp, 1.6888502670_dp, 2.8194249642_dp, 4.6987721274_dp, 8.0151195661_dp, 0.0085339378_dp, 0.0214595543_dp, 0.0391102006_dp,& + 0.0667625447_dp, 0.1129751216_dp, 0.1906296580_dp, 0.3193090639_dp, 0.5298124247_dp, 0.8724391547_dp, 1.4368081150_dp, 2.4212834056_dp, 4.5544745698_dp] + aw%aw_erange_matrix(:, 8) = [0.0022762644_dp, 0.0125677039_dp, 0.0338269925_dp, 0.0724068993_dp, 0.1409732198_dp, 0.2620656724_dp, 0.4736158009_dp,& + 0.8381994746_dp, 1.4586379799_dp, 2.5065758758_dp, 4.2889044537_dp, 7.4953768133_dp, 0.0059035786_dp, 0.0150972863_dp, 0.0284353503_dp,& + 0.0507789773_dp, 0.0900226433_dp, 0.1583351587_dp, 0.2749467359_dp, 0.4709220586_dp, 0.7976398186_dp, 1.3465944433_dp, 2.3178650924_dp, 4.4368325878_dp] + aw%aw_erange_matrix(:, 9) = [0.0015692112_dp, 0.0087519455_dp, 0.0240448765_dp, 0.0530894602_dp, 0.1072765322_dp, 0.2071777069_dp, 0.3882400731_dp,& + 0.7104394593_dp, 1.2745126394_dp, 2.2513920738_dp, 3.9492406835_dp, 7.0596133347_dp, 0.0040787492_dp, 0.0106444112_dp, 0.0208412874_dp,& + 0.0390928325_dp, 0.0726187626_dp, 0.1329358715_dp, 0.2389268087_dp, 0.4218108128_dp, 0.7338882151_dp, 1.2684530084_dp, 2.2274784048_dp, 4.3340445584_dp] + aw%aw_erange_matrix(:, 10) = [0.0010808702_dp, 0.0061030127_dp, 0.0171885376_dp, 0.0393301517_dp, 0.0827196472_dp, 0.1661050396_dp, 0.3226299268_dp,& + 0.6097857548_dp, 1.1261984299_dp, 2.0419146289_dp, 3.6661682448_dp, 6.6924544132_dp, 0.0028168777_dp, 0.0075342598_dp, 0.0154330800_dp,& + 0.0304965669_dp, 0.0593131883_dp, 0.1128213789_dp, 0.2095432740_dp, 0.3807404710_dp, 0.6794745486_dp, 1.2007255924_dp, 2.1484537810_dp, 4.2441834572_dp] + aw%aw_erange_matrix(:, 11) = [0.0007444375_dp, 0.0042674833_dp, 0.0123834195_dp, 0.0294995195_dp, 0.0647151559_dp, 0.1351401380_dp, 0.2718256132_dp,& + 0.5299318244_dp, 1.0060016190_dp, 1.8690725994_dp, 3.4292526441_dp, 6.3820141516_dp, 0.0019463550_dp, 0.0053641267_dp, 0.0115705684_dp,& + 0.0241262403_dp, 0.0490612250_dp, 0.0968006464_dp, 0.1854888062_dp, 0.3463341687_dp, 0.6330104563_dp, 1.1420475986_dp, 2.0794138297_dp, 4.1656658317_dp] + aw%aw_erange_matrix(:, 12) = [0.0005130705_dp, 0.0029969040_dp, 0.0090121194_dp, 0.0224440417_dp, 0.0514233406_dp, 0.1116185588_dp, 0.2322060971_dp,& + 0.4661910446_dp, 0.9081058970_dp, 1.7259054260_dp, 3.2303898959_dp, 6.1189723302_dp, 0.0013467807_dp, 0.0038499840_dp, 0.0087994505_dp,& + 0.0193674948_dp, 0.0411066473_dp, 0.0839811159_dp, 0.1657464888_dp, 0.3174854170_dp, 0.5933519921_dp, 1.0912778783_dp, 2.0192022809_dp, 4.0971686784_dp] + aw%aw_erange_matrix(:, 13) = [0.0003541405_dp, 0.0021177005_dp, 0.0066414300_dp, 0.0173517266_dp, 0.0415390587_dp, 0.0936217813_dp, 0.2011144128_dp,& + 0.4150562059_dp, 0.8280777004_dp, 1.6070223727_dp, 3.0632229700_dp, 5.8959440901_dp, 0.0009342370_dp, 0.0027926556_dp, 0.0067994457_dp,& + 0.0157843491_dp, 0.0348978173_dp, 0.0736865554_dp, 0.1495177964_dp, 0.2932983996_dp, 0.5595503883_dp, 1.0474552726_dp, 1.9668404301_dp, 4.0375772596_dp] + aw%aw_erange_matrix(:, 14) = [0.0002450328_dp, 0.0015091465_dp, 0.0049687254_dp, 0.0136527233_dp, 0.0341354342_dp, 0.0797616748_dp, 0.1765865877_dp,& + 0.3738789013_dp, 0.7625021866_dp, 1.5081991527_dp, 2.9226994333_dp, 5.7069942693_dp, 0.0006505188_dp, 0.0020530149_dp, 0.0053457983_dp,& + 0.0130665496_dp, 0.0300282048_dp, 0.0653990603_dp, 0.1361698664_dp, 0.2730416562_dp, 0.5308111938_dp, 1.0097601352_dp, 1.9214869313_dp, 3.9859370380_dp] + aw%aw_erange_matrix(:, 15) = [0.0001701376_dp, 0.0010875693_dp, 0.0037833625_dp, 0.0109476101_dp, 0.0285522959_dp, 0.0690278231_dp, 0.1571594905_dp,& + 0.3406410667_dp, 0.7087222805_dp, 1.4260874074_dp, 2.8047517783_dp, 5.5472853843_dp, 0.0004554191_dp, 0.0015341915_dp, 0.0042812667_dp,& + 0.0109920399_dp, 0.0261952113_dp, 0.0587184401_dp, 0.1251974104_dp, 0.2561136781_dp, 0.5064635464_dp, 0.9774854852_dp, 1.8824077828_dp, 3.9414177238_dp] + aw%aw_erange_matrix(:, 16) = [0.0001187248_dp, 0.0007951840_dp, 0.0029392994_dp, 0.0089567848_dp, 0.0243186289_dp, 0.0606825937_dp, 0.1417400945_dp,& + 0.3138020680_dp, 0.6646691425_dp, 1.3580347536_dp, 2.7061116698_dp, 5.4128869315_dp, 0.0003212717_dp, 0.0011689985_dp, 0.0034961439_dp,& + 0.0094011682_dp, 0.0231726278_dp, 0.0533353063_dp, 0.1161983613_dp, 0.2420232525_dp, 0.4859467156_dp, 0.9500293558_dp, 1.8489717513_dp, 3.9033068726_dp] + aw%aw_erange_matrix(:, 17) = [0.0000834432_dp, 0.0005922059_dp, 0.0023356082_dp, 0.0074845398_dp, 0.0210976147_dp, 0.0541859891_dp, 0.1295099966_dp,& + 0.2921841803_dp, 0.6287314551_dp, 1.3019414676_dp, 2.6241566957_dp, 5.3006121791_dp, 0.0002290980_dp, 0.0009110177_dp, 0.0029139485_dp,& + 0.0081785934_dp, 0.0207908695_dp, 0.0490106127_dp, 0.1088539140_dp, 0.2303716185_dp, 0.4687957030_dp, 0.9268838333_dp, 1.8206410245_dp, 3.8709984304_dp] + aw%aw_erange_matrix(:, 18) = [0.0000592658_dp, 0.0004512821_dp, 0.0019025862_dp, 0.0063934448_dp, 0.0186470165_dp, 0.0491400281_dp, 0.1198519988_dp,& + 0.2748801818_dp, 0.5996436460_dp, 1.2561293960_dp, 2.5567595977_dp, 5.2078458291_dp, 0.0001658923_dp, 0.0007282576_dp, 0.0024811714_dp,& + 0.0072403151_dp, 0.0189219666_dp, 0.0455586869_dp, 0.1029100002_dp, 0.2208331616_dp, 0.4546218887_dp, 0.9076157149_dp, 1.7969509606_dp, 3.8439691363_dp] + aw%aw_erange_matrix(:, 19) = [0.0000427539_dp, 0.0003536020_dp, 0.0015919883_dp, 0.0055863488_dp, 0.0167910186_dp, 0.0452482974_dp, 0.1122951892_dp,& + 0.2611820892_dp, 0.5763969601_dp, 1.2192345007_dp, 2.5021613308_dp, 5.1323956397_dp, 0.0001227292_dp, 0.0005986865_dp, 0.0021600744_dp,& + 0.0065244896_dp, 0.0174683766_dp, 0.0428338303_dp, 0.0981617995_dp, 0.2131383094_dp, 0.4430948941_dp, 0.8918475783_dp, 1.7774899045_dp, 3.8217552341_dp] + case(14) + aw%energy_range(:) = [10.0000_dp, 15.8489_dp, 25.1189_dp, 39.8107_dp, 63.0957_dp, 100.0000_dp,& + 158.4893_dp, 251.1886_dp, 398.1072_dp, 630.9573_dp, 1000.0000_dp, 1584.8932_dp, 2511.8864_dp,& + 3981.0717_dp, 6309.5734_dp, 10000.0000_dp, 15848.9319_dp, 25118.8643_dp, 39810.7171_dp, 63095.7344_dp, 100000.0000_dp] + aw%aw_erange_matrix(:, 1) = [0.0237936782_dp, 0.1262969955_dp, 0.3146137237_dp, 0.5959508382_dp, 0.9817872624_dp, 1.4893066488_dp, 2.1434983519_dp,& + 2.9801772260_dp, 4.0503393145_dp, 5.4269061190_dp, 7.2167997449_dp, 9.5870429977_dp, 12.8357453001_dp, 17.6753249521_dp, 0.0611672950_dp,& + 0.1445085894_dp, 0.2333087911_dp, 0.3312554161_dp, 0.4432468756_dp, 0.5759073007_dp, 0.7383747432_dp, 0.9433758083_dp, 1.2089173155_dp,& + 1.5616542882_dp, 2.0450063723_dp, 2.7419835160_dp, 3.8566734312_dp, 6.1981791899_dp] + aw%aw_erange_matrix(:, 2) = [0.0169816642_dp, 0.0903275498_dp, 0.2258900214_dp, 0.4304310095_dp, 0.7149888745_dp, 1.0965252424_dp, 1.6002842943_dp,& + 2.2629949541_dp, 3.1372091996_dp, 4.2978145261_dp, 5.8537407167_dp, 7.9734653507_dp, 10.9544068995_dp, 15.4993236149_dp, 0.0436764843_dp,& + 0.1036202428_dp, 0.1686129519_dp, 0.2422818311_dp, 0.3296217363_dp, 0.4376054730_dp, 0.5759638625_dp, 0.7581137515_dp, 1.0026174373_dp,& + 1.3363743540_dp, 1.8026148317_dp, 2.4832977293_dp, 3.5786612501_dp, 5.8790633067_dp] + aw%aw_erange_matrix(:, 3) = [0.0119972526_dp, 0.0639735360_dp, 0.1607328068_dp, 0.3084839990_dp, 0.5176460378_dp, 0.8046770125_dp, 1.1946063310_dp,& + 1.7242874128_dp, 2.4466652263_dp, 3.4372421876_dp, 4.8058180424_dp, 6.7218376735_dp, 9.4826338752_dp, 13.7842321234_dp, 0.0308743065_dp,& + 0.0736138461_dp, 0.1209192548_dp, 0.1762894116_dp, 0.2447353626_dp, 0.3334443879_dp, 0.4524878835_dp, 0.6155970910_dp, 0.8415625308_dp,& + 1.1575185632_dp, 1.6069457576_dp, 2.2716047438_dp, 3.3492956544_dp, 5.6157341385_dp] + aw%aw_erange_matrix(:, 4) = [0.0084076681_dp, 0.0449636994_dp, 0.1135988127_dp, 0.2199152900_dp, 0.3735947871_dp, 0.5903443786_dp, 0.8944811045_dp,& + 1.3221417879_dp, 1.9255697207_dp, 2.7798165137_dp, 3.9948200990_dp, 5.7408169122_dp, 8.3156700660_dp, 12.4109325959_dp, 0.0216511589_dp,& + 0.0519267386_dp, 0.0862556649_dp, 0.1279584309_dp, 0.1819750580_dp, 0.2555243887_dp, 0.3587034665_dp, 0.5052195178_dp, 0.7139586455_dp,& + 1.0124827029_dp, 1.4449804822_dp, 2.0936661885_dp, 3.1548999120_dp, 5.3926769614_dp] + aw%aw_erange_matrix(:, 5) = [0.0058545394_dp, 0.0314169341_dp, 0.0798961491_dp, 0.1562801892_dp, 0.2694516528_dp, 0.4341668678_dp, 0.6735857092_dp,& + 1.0224344459_dp, 1.5314708133_dp, 2.2746179259_dp, 3.3615119894_dp, 4.9630904952_dp, 7.3782044923_dp, 11.2956335062_dp, 0.0150881610_dp,& + 0.0364360730_dp, 0.0613313227_dp, 0.0928838706_dp, 0.1358762369_dp, 0.1973630960_dp, 0.2871909934_dp, 0.4188526951_dp, 0.6113456809_dp,& + 0.8928419449_dp, 1.3085276567_dp, 1.9414929173_dp, 2.9873859616_dp, 5.2007139221_dp] + aw%aw_erange_matrix(:, 6) = [0.0040562245_dp, 0.0218539742_dp, 0.0560102454_dp, 0.1109232899_dp, 0.1946568562_dp, 0.3208703328_dp, 0.5112371968_dp,& + 0.7986245426_dp, 1.2318540903_dp, 1.8833267668_dp, 2.8620729079_dp, 4.3396108414_dp, 6.6160518775_dp, 10.3786630825_dp, 0.0104630611_dp,& + 0.0254712518_dp, 0.0435516941_dp, 0.0675857103_dp, 0.1021182426_dp, 0.1538700771_dp, 0.2322649417_dp, 0.3505246702_dp, 0.5277975034_dp,& + 0.7929346940_dp, 1.1922412386_dp, 1.8099472487_dp, 2.8415520058_dp, 5.0338617688_dp] + aw%aw_erange_matrix(:, 7) = [0.0027992651_dp, 0.0151526724_dp, 0.0391950273_dp, 0.0787783513_dp, 0.1411563608_dp, 0.2388040142_dp, 0.3917244612_dp,& + 0.6307171506_dp, 1.0024644268_dp, 1.5776184281_dp, 2.4643581015_dp, 3.8346158305_dp, 5.9898844950_dp, 9.6168480481_dp, 0.0072283419_dp,& + 0.0177636198_dp, 0.0309408098_dp, 0.0494041369_dp, 0.0773938528_dp, 0.1211829834_dp, 0.1897088377_dp, 0.2959270382_dp, 0.4591303320_dp,& + 0.7088154109_dp, 1.0924186101_dp, 1.6954725243_dp, 2.7137745874_dp, 4.8878976412_dp] + aw%aw_erange_matrix(:, 8) = [0.0019260163_dp, 0.0104833755_dp, 0.0274163538_dp, 0.0560830704_dp, 0.1029553545_dp, 0.1792971830_dp, 0.3033947804_dp,& + 0.5039497133_dp, 0.8254537344_dp, 1.3366813377_dp, 2.1447535633_dp, 3.4218231610_dp, 5.4707784720_dp, 8.9783978369_dp, 0.0049795399_dp,& + 0.0123739468_dp, 0.0220303943_dp, 0.0363538024_dp, 0.0592326432_dp, 0.0964440642_dp, 0.1564474990_dp, 0.2519410443_dp, 0.4023081489_dp,& + 0.6375997771_dp, 1.0063349415_dp, 1.5954396637_dp, 2.6013624022_dp, 4.7596612523_dp] + aw%aw_erange_matrix(:, 9) = [0.0013222495_dp, 0.0072441400_dp, 0.0191950478_dp, 0.0400934258_dp, 0.0756713875_dp, 0.1360117507_dp, 0.2377411946_dp,& + 0.4075418317_dp, 0.6877504424_dp, 1.1452008897_dp, 1.8857902883_dp, 3.0816948930_dp, 5.0371415973_dp, 8.4394873058_dp, 0.0034234922_dp,& + 0.0086197096_dp, 0.0157487515_dp, 0.0269783975_dp, 0.0458232460_dp, 0.0775717368_dp, 0.1302433050_dp, 0.2162717795_dp, 0.3550545602_dp,& + 0.5770852050_dp, 0.9318838821_dp, 1.5078058926_dp, 2.5022210559_dp, 4.6466884816_dp] + aw%aw_erange_matrix(:, 10) = [0.0009063749_dp, 0.0050043736_dp, 0.0134702129_dp, 0.0288347782_dp, 0.0561436492_dp, 0.1043728737_dp, 0.1886107108_dp,& + 0.3336543186_dp, 0.5797709752_dp, 0.9918421828_dp, 1.6744195586_dp, 2.7995206256_dp, 4.6726106098_dp, 7.9819594252_dp, 0.0023507281_dp,& + 0.0060117822_dp, 0.0113238920_dp, 0.0202237097_dp, 0.0358553075_dp, 0.0630595051_dp, 0.1094556677_dp, 0.1871955718_dp, 0.3156131499_dp,& + 0.5255332814_dp, 0.8673791226_dp, 1.4309274629_dp, 2.4146664138_dp, 4.5470018340_dp] + aw%aw_erange_matrix(:, 11) = [0.0006207558_dp, 0.0034593750_dp, 0.0094888452_dp, 0.0209005466_dp, 0.0421152117_dp, 0.0811052514_dp, 0.1515714938_dp,& + 0.2765844244_dp, 0.4944571337_dp, 0.8681492042_dp, 1.5007904059_dp, 2.5640827408_dp, 4.3646060695_dp, 7.5917613733_dp, 0.0016132125_dp,& + 0.0042033180_dp, 0.0082051681_dp, 0.0153343742_dp, 0.0283888063_dp, 0.0518157294_dp, 0.0928668378_dp, 0.1633931970_dp, 0.2825994311_dp,& + 0.4815408039_dp, 0.8114386960_dp, 1.3634496528_dp, 2.3373123760_dp, 4.4589805898_dp] + aw%aw_erange_matrix(:, 12) = [0.0004250257_dp, 0.0023953290_dp, 0.0067207167_dp, 0.0152965867_dp, 0.0319860564_dp, 0.0638742350_dp, 0.1234325709_dp,& + 0.2321694171_dp, 0.4265771556_dp, 0.7677581817_dp, 1.3573866615_dp, 2.3667230075_dp, 4.1033285208_dp, 7.2578630071_dp, 0.0011072202_dp,& + 0.0029503441_dp, 0.0060027300_dp, 0.0117733548_dp, 0.0227515996_dp, 0.0430443066_dp, 0.0795610664_dp, 0.1438398396_dp, 0.2549060018_dp,& + 0.4439586001_dp, 0.7629125934_dp, 1.3042372856_dp, 2.2689984236_dp, 4.3812747921_dp] + aw%aw_erange_matrix(:, 13) = [0.0002911017_dp, 0.0016631492_dp, 0.0047946445_dp, 0.0113241508_dp, 0.0246263552_dp, 0.0510161558_dp, 0.1018875389_dp,& + 0.1973480201_dp, 0.3722122939_dp, 0.6858159813_dp, 1.2383805242_dp, 2.2006300353_dp, 3.8809743266_dp, 6.9713912766_dp, 0.0007605525_dp,& + 0.0020822672_dp, 0.0044420437_dp, 0.0091605927_dp, 0.0184618417_dp, 0.0361581540_dp, 0.0688392550_dp, 0.1277263816_dp, 0.2316313965_dp,& + 0.4118257407_dp, 0.7208180838_dp, 1.2523064711_dp, 2.2087140692_dp, 4.3127157224_dp] + aw%aw_erange_matrix(:, 14) = [0.0001995700_dp, 0.0011595295_dp, 0.0034524399_dp, 0.0084955264_dp, 0.0192432510_dp, 0.0413511687_dp, 0.0852771242_dp,& + 0.1698836547_dp, 0.3284577878_dp, 0.6186813704_dp, 1.1393608161_dp, 2.0606221816_dp, 3.6915967870_dp, 6.7255839033_dp, 0.0005232710_dp,& + 0.0014805383_dp, 0.0033311544_dp, 0.0072290816_dp, 0.0151751660_dp, 0.0307257083_dp, 0.0601730847_dp, 0.1144276403_dp, 0.2120682416_dp,& + 0.3843826899_dp, 0.6843807450_dp, 1.2068922048_dp, 2.1556860505_dp, 4.2524123622_dp] + aw%aw_erange_matrix(:, 15) = [0.0001370440_dp, 0.0008130158_dp, 0.0025145919_dp, 0.0064696769_dp, 0.0152763632_dp, 0.0340306034_dp, 0.0723813392_dp,& + 0.1480920563_dp, 0.2930715707_dp, 0.5634732104_dp, 1.0567504907_dp, 1.9423970762_dp, 3.5301492307_dp, 6.5145924693_dp, 0.0003609177_dp,& + 0.0010628352_dp, 0.0025356684_dp, 0.0057896189_dp, 0.0126401225_dp, 0.0264193690_dp, 0.0531457819_dp, 0.1034316774_dp, 0.1956149122_dp,& + 0.3609571463_dp, 0.6528859764_dp, 1.1672606510_dp, 2.1091543249_dp, 4.1994938535_dp] + aw%aw_erange_matrix(:, 16) = [0.0000943292_dp, 0.0005743617_dp, 0.0018567491_dp, 0.0050088333_dp, 0.0123298613_dp, 0.0284433849_dp, 0.0623023416_dp,& + 0.1307057577_dp, 0.2643293512_dp, 0.5179294356_dp, 0.9876865837_dp, 1.8424511225_dp, 3.3924602893_dp, 6.3335236354_dp, 0.0002498085_dp,& + 0.0007721791_dp, 0.0019618732_dp, 0.0047081086_dp, 0.0106724872_dp, 0.0229904052_dp, 0.0474305891_dp, 0.0943252116_dp, 0.1817720546_dp,& + 0.3409759754_dp, 0.6257092922_dp, 1.1327575630_dp, 2.0684341083_dp, 4.1531784722_dp] + aw%aw_erange_matrix(:, 17) = [0.0000651365_dp, 0.0004097585_dp, 0.0013931604_dp, 0.0039478705_dp, 0.0101248429_dp, 0.0241506943_dp, 0.0543825199_dp,& + 0.1167789486_dp, 0.2409226560_dp, 0.4803083615_dp, 0.9299382185_dp, 1.7580291538_dp, 3.2752284213_dp, 6.1784868742_dp, 0.0001737312_dp,& + 0.0005692888_dp, 0.0015447657_dp, 0.0038896495_dp, 0.0091375731_dp, 0.0202515001_dp, 0.0427754289_dp, 0.0867830166_dp, 0.1701401832_dp,& + 0.3239747287_dp, 0.6023404762_dp, 1.1028471436_dp, 2.0329658726_dp, 4.1128293420_dp] + aw%aw_erange_matrix(:, 18) = [0.0000451780_dp, 0.0002960620_dp, 0.0010648809_dp, 0.0031722807_dp, 0.0084646811_dp, 0.0208370642_dp, 0.0481400189_dp,& + 0.1056065372_dp, 0.2218612717_dp, 0.4492752495_dp, 0.8817787002_dp, 1.6869834288_dp, 3.1758682753_dp, 6.0464269241_dp, 0.0001216233_dp,& + 0.0004271658_dp, 0.0012393754_dp, 0.0032669191_dp, 0.0079367228_dp, 0.0180617935_dp, 0.0389867897_dp, 0.0805512332_dp, 0.1604032849_dp,& + 0.3095824040_dp, 0.5823698798_dp, 1.0770993952_dp, 2.0023024581_dp, 4.0779388476_dp] + aw%aw_erange_matrix(:, 19) = [0.0000315328_dp, 0.0002174308_dp, 0.0008313641_dp, 0.0026022985_dp, 0.0072095763_dp, 0.0182730950_dp, 0.0432167413_dp,& + 0.0966537970_dp, 0.2063800292_dp, 0.4237806872_dp, 0.8418287528_dp, 1.6275738925_dp, 3.0922598344_dp, 5.9348141031_dp, 0.0000859396_dp,& + 0.0003272551_dp, 0.0010144705_dp, 0.0027916184_dp, 0.0069966844_dp, 0.0163137262_dp, 0.0359133252_dp, 0.0754269174_dp, 0.1523033750_dp,& + 0.2974898789_dp, 0.5654495050_dp, 1.0551430219_dp, 1.9760540876_dp, 4.0480653472_dp] + aw%aw_erange_matrix(:, 20) = [0.0000222079_dp, 0.0001629932_dp, 0.0006645802_dp, 0.0021817704_dp, 0.0062585553_dp, 0.0162885708_dp, 0.0393399077_dp,& + 0.0895029361_dp, 0.1938660784_dp, 0.4029632862_dp, 0.8089283219_dp, 1.5783019361_dp, 3.0225368925_dp, 5.8413807575_dp, 0.0000615230_dp,& + 0.0002567640_dp, 0.0008481266_dp, 0.0024284357_dp, 0.0062618334_dp, 0.0149229402_dp, 0.0334327161_dp, 0.0712410515_dp, 0.1456187328_dp,& + 0.2874223434_dp, 0.5512586346_dp, 1.0366236919_dp, 1.9538396852_dp, 4.0227772765_dp] + aw%aw_erange_matrix(:, 21) = [0.0000158399_dp, 0.0001252648_dp, 0.0005450424_dp, 0.0018707369_dp, 0.0055376345_dp, 0.0147550601_dp, 0.0362978083_dp,& + 0.0838207306_dp, 0.1838173647_dp, 0.3860983826_dp, 0.7820753769_dp, 1.5378394885_dp, 2.9650064681_dp, 5.7640301975_dp, 0.0000448370_dp,& + 0.0002068443_dp, 0.0007247732_dp, 0.0021511315_dp, 0.0056892147_dp, 0.0138220852_dp, 0.0314441670_dp, 0.0678498508_dp, 0.1401543526_dp,& + 0.2791293861_dp, 0.5394940065_dp, 1.0211944165_dp, 1.9352770155_dp, 4.0016416470_dp] + aw%aw_erange_matrix(:, 22) = [0.0000115002_dp, 0.0000991173_dp, 0.0004592690_dp, 0.0016408940_dp, 0.0049930058_dp, 0.0135768119_dp, 0.0339290060_dp,& + 0.0793477695_dp, 0.1758354289_dp, 0.3726002908_dp, 0.7604460875_dp, 1.5050773582_dp, 2.9182351984_dp, 5.7009682775_dp, 0.0000334643_dp,& + 0.0001714169_dp, 0.0006333913_dp, 0.0019403728_dp, 0.0052461953_dp, 0.0129586872_dp, 0.0298673394_dp, 0.0651362091_dp, 0.1357480131_dp,& + 0.2723982760_dp, 0.5298926968_dp, 1.0085489528_dp, 1.9200248668_dp, 3.9842719598_dp] + case(16) + aw%energy_range(:) = [100.0_dp, 200.0_dp, 300.0_dp, 400.0_dp, 500.0_dp, 600.0_dp, 700.0_dp, 800.0_dp,& + 900.0_dp, 1000.0_dp, 2.00e+03_dp, 3.00e+03_dp, 4.00e+03_dp, 5.00e+03_dp, 6.00e+03_dp, 7.00e+03_dp, 8.00e+03_dp,& + 9.00e+03_dp, 1.00e+04_dp, 2.00e+04_dp, 3.00e+04_dp, 4.00e+04_dp, 5.00e+04_dp, 6.00e+04_dp, 7.00e+04_dp,& + 8.00e+04_dp, 1.00e+05_dp, 2.00e+05_dp, 3.00e+05_dp, 4.00e+05_dp, 5.00e+05_dp, 6.00e+05_dp, 7.00e+05_dp,& + 9.00e+05_dp, 1.00e+06_dp, 2.00e+06_dp] + aw%aw_erange_matrix(:, 1) = [3.53350980972745024e-03_dp, 1.89307470173197823e-02_dp, 4.79913291058656280e-02_dp, 9.34063314619771184e-02_dp, 1.59900975899146841e-01_dp,& + 2.55237720565199833e-01_dp, 3.91507506232646407e-01_dp, 5.86692524556495676e-01_dp, 8.66706221259449516e-01_dp, 1.26834755965607449e+00_dp, 1.84378922435133030e+00_dp,& + 2.66770358673057162e+00_dp, 3.84969929504600383e+00_dp, 5.55989190488239782e+00_dp, 8.09609615483757494e+00_dp, 1.21489357832949842e+01_dp, 9.10308460639413716e-03_dp,& + 2.19107094627195229e-02_dp, 3.66477217677682598e-02_dp, 5.49529774439788052e-02_dp, 7.93083736311463450e-02_dp, 1.13354729405511695e-01_dp, 1.62148972334804270e-01_dp,& + 2.32492103990712351e-01_dp, 3.33595921973548981e-01_dp, 4.78268763696850785e-01_dp, 6.84867425639795080e-01_dp, 9.80851423476391093e-01_dp, 1.41057748263778815e+00_dp,& + 2.05646355120530222e+00_dp, 3.11470981048028772e+00_dp, 5.34707526399065092e+00_dp] + aw%aw_erange_matrix(:, 2) = [2.01256609288612623e-03_dp, 1.08393025800470229e-02_dp, 2.77607372768341396e-02_dp, 5.49153548548539372e-02_dp, 9.62139067787890073e-02_dp,& + 1.58268585901329639e-01_dp, 2.51551762218636565e-01_dp, 3.91889894075743928e-01_dp, 6.02624857991079899e-01_dp, 9.17865362174561272e-01_dp, 1.38738289791511860e+00_dp,& + 2.08421352166685470e+00_dp, 3.11754692365379737e+00_dp, 4.65845614288767074e+00_dp, 7.00624402509797584e+00_dp, 1.08487716247577879e+01_dp, 5.19100503916200377e-03_dp,& + 1.26277612849116580e-02_dp, 2.15606407131872894e-02_dp, 3.33846640063611144e-02_dp, 5.02953701646382048e-02_dp, 7.55353808513282848e-02_dp, 1.13633681039463183e-01_dp,& + 1.70879885021969491e-01_dp, 2.56195443232918985e-01_dp, 3.82459276964640105e-01_dp, 5.68547819274359711e-01_dp, 8.42929673227647003e-01_dp, 1.25134422119431932e+00_dp,& + 1.87743223838423345e+00_dp, 2.91674707410050216e+00_dp, 5.12003624180075434e+00_dp] + aw%aw_erange_matrix(:, 3) = [1.44321148556243663e-03_dp, 7.80153177980970076e-03_dp, 2.01254698329391621e-02_dp, 4.02748735892814805e-02_dp, 7.17270043310115762e-02_dp,& + 1.20437842219770330e-01_dp, 1.95922508665984957e-01_dp, 3.12738745192699397e-01_dp, 4.92726432022653815e-01_dp, 7.68398119460578344e-01_dp, 1.18803361602970625e+00_dp,& + 1.82355128165130798e+00_dp, 2.78370305964699760e+00_dp, 4.23999745998180622e+00_dp, 6.49272540108700547e+00_dp, 1.02289376129522349e+01_dp, 3.72555641699100692e-03_dp,& + 9.13029870564178482e-03_dp, 1.58171136039656351e-02_dp, 2.50466904073013037e-02_dp, 3.88327073275191448e-02_dp, 6.01510240904654450e-02_dp, 9.32081506757678202e-02_dp,& + 1.44008985109400189e-01_dp, 2.21302503955418645e-01_dp, 3.37961419891918136e-01_dp, 5.13089899907686053e-01_dp, 7.75684683956141319e-01_dp, 1.17230167874908897e+00_dp,& + 1.78743631474834719e+00_dp, 2.81663768450139029e+00_dp, 5.00548143863775064e+00_dp] + aw%aw_erange_matrix(:, 4) = [1.13860760663766201e-03_dp, 6.17299781269263839e-03_dp, 1.60169098352160554e-02_dp, 3.23524323481128584e-02_dp, 5.83702583176669565e-02_dp,& + 9.95777894307948580e-02_dp, 1.64831557562902881e-01_dp, 2.67822190872354815e-01_dp, 4.29360268183013538e-01_dp, 6.80845171457615028e-01_dp, 1.06948381160530315e+00_dp,& + 1.66634821469290184e+00_dp, 2.57980100528938738e+00_dp, 3.98159346669642966e+00_dp, 6.17273411310204700e+00_dp, 9.83997227880138681e+00_dp, 2.94117041553301631e-03_dp,& + 7.25063797608869933e-03_dp, 1.27075060808783998e-02_dp, 2.04817457415186997e-02_dp, 3.24552336489367654e-02_dp, 5.14120457313516355e-02_dp, 8.13399962135207821e-02_dp,& + 1.28053125906785886e-01_dp, 2.00171599487160429e-01_dp, 3.10536809254130741e-01_dp, 4.78375693670618274e-01_dp, 7.33023992755198917e-01_dp, 1.12160597395424810e+00_dp,& + 1.72926445447689736e+00_dp, 2.75168129090199720e+00_dp, 4.93124071847187917e+00_dp] + aw%aw_erange_matrix(:, 5) = [9.46859903916035537e-04_dp, 5.14616088730276196e-03_dp, 1.34185711537655374e-02_dp, 2.73192349904864268e-02_dp, 4.98287460342099059e-02_dp,& + 8.61193605778245858e-02_dp, 1.44555695695986336e-01_dp, 2.38183015880307103e-01_dp, 3.87041479853388215e-01_dp, 6.21684790258431930e-01_dp, 9.88486563062811463e-01_dp,& + 1.55783889875341841e+00_dp, 2.43776191947990073e+00_dp, 3.80015625761590004e+00_dp, 5.94658657784491584e+00_dp, 9.56369803004218078e+00_dp, 2.44721319362834096e-03_dp,& + 6.06309616212743173e-03_dp, 1.07312550216339935e-02_dp, 1.75540514820946535e-02_dp, 2.83110517763022485e-02_dp, 4.56402961035302507e-02_dp, 7.33688359935863454e-02_dp,& + 1.17168476679268843e-01_dp, 1.85554660029532470e-01_dp, 2.91329319901989403e-01_dp, 4.53792910832546526e-01_dp, 7.02522550597137641e-01_dp, 1.08507304824308415e+00_dp,& + 1.68710567859197180e+00_dp, 2.70447200538390886e+00_dp, 4.87732532908532423e+00_dp] + aw%aw_erange_matrix(:, 6) = [8.14183837939547509e-04_dp, 4.43467955230156252e-03_dp, 1.16136389856696040e-02_dp, 2.38092630968598784e-02_dp, 4.38383776182723894e-02_dp,& + 7.66089872341315092e-02_dp, 1.30098648127646099e-01_dp, 2.16845526181672299e-01_dp, 3.56280572517574390e-01_dp, 5.78280446078727084e-01_dp, 9.28540305907498920e-01_dp,& + 1.47688490081642176e+00_dp, 2.33103078021899535e+00_dp, 3.66297548958391106e+00_dp, 5.77473392533884855e+00_dp, 9.35293868610848378e+00_dp, 2.10531973679683841e-03_dp,& + 5.23888103224154095e-03_dp, 9.35274075631195578e-03_dp, 1.54958369642747475e-02_dp, 2.53648437706326772e-02_dp, 4.14818886569631451e-02_dp, 6.75490862157180211e-02_dp,& + 1.09125281408510050e-01_dp, 1.74637111405913398e-01_dp, 2.76845040629674743e-01_dp, 4.35096147843626602e-01_dp, 6.79150611008417449e-01_dp, 1.05690673230816246e+00_dp,& + 1.65445677640878741e+00_dp, 2.66782922167630066e+00_dp, 4.83550044561988024e+00_dp] + aw%aw_erange_matrix(:, 7) = [7.16494901298969080e-04_dp, 3.91018638216612119e-03_dp, 1.02801072464593964e-02_dp, 2.12070464670612545e-02_dp, 3.93748784721239808e-02_dp,& + 6.94755195241083950e-02_dp, 1.19170770235098020e-01_dp, 2.00585127206465486e-01_dp, 3.32649462565160037e-01_dp, 5.44678859853301556e-01_dp, 8.81798125100913932e-01_dp,& + 1.41334590605841526e+00_dp, 2.24676696687539001e+00_dp, 3.55412349045657461e+00_dp, 5.63780628889054558e+00_dp, 9.18448241122484710e+00_dp, 1.85351442545404581e-03_dp,& + 4.63039115192240627e-03_dp, 8.33054786648090156e-03_dp, 1.39590364258402114e-02_dp, 2.31433556018734582e-02_dp, 3.83107456954635550e-02_dp, 6.30622860656869233e-02_dp,& + 1.02863316936792890e-01_dp, 1.66063213575976282e-01_dp, 2.65381378593835426e-01_dp, 4.20195346923853241e-01_dp, 6.60410163061198929e-01_dp, 1.03420797660110741e+00_dp,& + 1.62804896339238914e+00_dp, 2.63813532983522236e+00_dp, 4.80162132438811451e+00_dp] + aw%aw_erange_matrix(:, 8) = [6.41326809481740758e-04_dp, 3.50617346260536722e-03_dp, 9.25085074482776167e-03_dp, 1.91923279358940310e-02_dp, 3.59033684018405658e-02_dp,& + 6.38944507354568814e-02_dp, 1.10562852458958027e-01_dp, 1.87686236929583999e-01_dp, 3.13773709712884596e-01_dp, 5.17662494297918774e-01_dp, 8.43986668600400392e-01_dp,& + 1.36166018332979322e+00_dp, 2.17788216574139337e+00_dp, 3.46475828890199411e+00_dp, 5.52500051528785985e+00_dp, 9.04533575355827679e+00_dp, 1.65971109796032596e-03_dp,& + 4.16106326244922858e-03_dp, 7.53902014585412523e-03_dp, 1.27615706769678879e-02_dp, 2.13972122588712184e-02_dp, 3.57936419467514491e-02_dp, 5.94677802105419498e-02_dp,& + 9.78053035397581927e-02_dp, 1.59087168480228858e-01_dp, 2.55993100221750536e-01_dp, 4.07920704338065321e-01_dp, 6.44893253755295270e-01_dp, 1.01533352025257706e+00_dp,& + 1.60602200914479964e+00_dp, 2.61332768483982214e+00_dp, 4.77332649007502585e+00_dp] + aw%aw_erange_matrix(:, 9) = [5.81552858876719573e-04_dp, 3.18458728238287577e-03_dp, 8.43009848407876017e-03_dp, 1.75811659326021198e-02_dp, 3.31156506410349299e-02_dp,& + 5.93885926005389142e-02_dp, 1.03571099986227905e-01_dp, 1.77143894018762488e-01_dp, 2.98252992060085709e-01_dp, 4.95321060119377710e-01_dp, 8.12552457633085590e-01_dp,& + 1.31848446625012738e+00_dp, 2.12009233578978984e+00_dp, 3.38951070393522613e+00_dp, 5.42973079030332695e+00_dp, 8.92755335444040199e+00_dp, 1.50556315952505627e-03_dp,& + 3.78704505063218438e-03_dp, 6.90596865384866029e-03_dp, 1.17983671303826514e-02_dp, 1.99815601654048762e-02_dp, 3.37352970754505530e-02_dp, 5.65047866336671131e-02_dp,& + 9.36063868568455248e-02_dp, 1.53259665040788029e-01_dp, 2.48106420809356160e-01_dp, 3.97557329619784516e-01_dp, 6.31734422799635764e-01_dp, 9.99268430087539294e-01_dp,& + 1.58722306022532145e+00_dp, 2.59212588251235276e+00_dp, 4.74915085228901113e+00_dp] + aw%aw_erange_matrix(:, 10) = [5.32791449243409957e-04_dp, 2.92201407330914490e-03_dp, 7.75884196839569766e-03_dp, 1.62599925842890798e-02_dp, 3.08208827514734295e-02_dp,& + 5.56612598231712857e-02_dp, 9.77557047572212706e-02_dp, 1.68326485590083619e-01_dp, 2.85201980076353778e-01_dp, 4.76439727683499570e-01_dp, 7.85862548805269845e-01_dp,& + 1.28166964157642660e+00_dp, 2.07063073322832736e+00_dp, 3.32489911123671833e+00_dp, 5.34771226724267912e+00_dp, 8.82595237509298869e+00_dp, 1.37978885020055087e-03_dp,& + 3.48132965159881182e-03_dp, 6.38681382757585753e-03_dp, 1.10042750893626431e-02_dp, 1.88060416343505121e-02_dp, 3.20129266794980244e-02_dp, 5.40079284084068259e-02_dp,& + 9.00461102030354760e-02_dp, 1.48291387217199144e-01_dp, 2.41349478045632310e-01_dp, 3.88639236651869280e-01_dp, 6.20366715867012197e-01_dp, 9.85345131558152731e-01_dp,& + 1.57089164262038694e+00_dp, 2.57368414096267095e+00_dp, 4.72812711274626363e+00_dp] + aw%aw_erange_matrix(:, 11) = [2.99224120879729519e-04_dp, 1.66026313565520206e-03_dp, 4.51381700033238586e-03_dp, 9.81114129695110151e-03_dp, 1.94616438373382758e-02_dp,& + 3.68864680879441853e-02_dp, 6.79045674012652006e-02_dp, 1.22204135062910973e-01_dp, 2.15692386527333746e-01_dp, 3.74167706912010345e-01_dp, 6.39029285349485887e-01_dp,& + 1.07625266047240209e+00_dp, 1.79115927400814545e+00_dp, 2.95586846091472255e+00_dp, 4.87513923191184961e+00_dp, 8.23667784479432186e+00_dp, 7.76884742069300360e-04_dp,& + 2.00656602380648846e-03_dp, 3.85231021696860266e-03_dp, 7.05187854403546612e-03_dp, 1.28051535867035465e-02_dp, 2.29904356331946634e-02_dp, 4.06223196249400550e-02_dp,& + 7.05684431621601549e-02_dp, 1.20615323824493109e-01_dp, 2.03090767371495673e-01_dp, 3.37395001084139834e-01_dp, 5.54190330170222567e-01_dp, 9.03401381371959022e-01_dp,& + 1.47399421150855536e+00_dp, 2.46379540993549329e+00_dp, 4.60293586094290941e+00_dp] + aw%aw_erange_matrix(:, 12) = [2.13470521766618681e-04_dp, 1.19443821216121972e-03_dp, 3.30309294815460527e-03_dp, 7.36335748981275899e-03_dp, 1.50440187979848754e-02_dp,& + 2.93726979281437213e-02_dp, 5.55989091923544607e-02_dp, 1.02640726711399635e-01_dp, 1.85414326356829418e-01_dp, 3.28517321642923299e-01_dp, 5.72017178043324859e-01_dp,& + 9.80614752437028669e-01_dp, 1.65873474387425257e+00_dp, 2.77836756683095709e+00_dp, 4.64507203421799542e+00_dp, 7.94720268358463677e+00_dp, 5.55246702745094663e-04_dp,& + 1.45843838376191748e-03_dp, 2.89028275110567992e-03_dp, 5.50037429515352373e-03_dp, 1.03516891504137030e-02_dp, 1.91571445523666846e-02_dp, 3.47438857823840624e-02_dp,& + 6.17661025400090061e-02_dp, 1.07787025740297096e-01_dp, 1.84949410097452444e-01_dp, 3.12595021695347530e-01_dp, 5.21582146906248378e-01_dp, 8.62410403168432427e-01_dp,& + 1.42497657398810884e+00_dp, 2.40787031054696632e+00_dp, 4.53927021665296770e+00_dp] + aw%aw_erange_matrix(:, 13) = [1.68012592820130133e-04_dp, 9.46540488815995548e-04_dp, 2.65389383834955736e-03_dp, 6.03435111070690922e-03_dp, 1.26044257319316653e-02_dp,& + 2.51439404415568467e-02_dp, 4.85422220818330988e-02_dp, 9.12233302740963620e-02_dp, 1.67457115943608098e-01_dp, 3.01044618457292690e-01_dp, 5.31153332379371790e-01_dp,& + 9.21602589992802423e-01_dp, 1.57617191456792005e+00_dp, 2.66672079636148762e+00_dp, 4.49933223235559598e+00_dp, 7.76286688504890332e+00_dp, 4.37651070085769004e-04_dp,& + 1.16536666410485871e-03_dp, 2.36804563911255589e-03_dp, 4.63798343442946379e-03_dp, 8.95184829397262932e-03_dp, 1.69190097024326525e-02_dp, 3.12441751584375850e-02_dp,& + 5.64366963334440863e-02_dp, 9.99033373206869579e-02_dp, 1.73650154624361980e-01_dp, 2.96961393104604898e-01_dp, 5.00806584552872414e-01_dp, 8.36059273049339358e-01_dp,& + 1.39325367922203336e+00_dp, 2.37154456299757888e+00_dp, 4.49793067920409495e+00_dp] + aw%aw_erange_matrix(:, 14) = [1.37026975479014590e+00_dp, 2.34515676733101053e+00_dp, 4.46790660194239475e+00_dp, 1.39556140827204678e-04_dp, 7.90875404343269173e-04_dp,& + 2.24373197289569727e-03_dp, 5.18614495108164764e-03_dp, 1.10265465390968261e-02_dp, 2.23694637981097025e-02_dp, 4.38480579093586884e-02_dp, 8.35312227650857608e-02_dp,& + 1.55218699402296184e-01_dp, 2.82125295666550369e-01_dp, 5.02747768057156597e-01_dp, 8.80238193840727434e-01_dp, 1.51787502219682380e+00_dp, 2.58739721912801590e+00_dp,& + 4.39526935349846326e+00_dp, 7.63076233425439288e+00_dp, 3.63984273626696418e-04_dp, 9.80644321112650276e-04_dp, 2.03480199951820533e-03_dp, 4.07735377152630956e-03_dp,& + 8.02412457026831227e-03_dp, 1.54111678077861834e-02_dp, 2.88537422675381669e-02_dp, 5.27529528046750545e-02_dp, 9.43962899936182931e-02_dp, 1.65682189837208782e-01_dp,& + 2.85842929517656941e-01_dp, 4.85920011438755906e-01_dp, 8.17057847522464131e-01_dp] + aw%aw_erange_matrix(:, 15) = [1.19940633777844367e-04_dp, 6.83291861808967222e-04_dp, 1.95877168414221835e-03_dp, 4.59174524873474151e-03_dp, 9.90855703502338189e-03_dp,& + 2.03808716667070837e-02_dp, 4.04466664137481044e-02_dp, 7.79018628897185372e-02_dp, 1.46181662230467829e-01_dp, 2.68042251689520117e-01_dp, 4.81450674354238051e-01_dp,& + 8.49025951183791872e-01_dp, 1.47363870321694668e+00_dp, 2.52691885693640472e+00_dp, 4.31562663815705783e+00_dp, 7.52937595194574971e+00_dp, 3.13174089302581220e-04_dp,& + 8.52574377712036276e-04_dp, 1.80131247687566765e-03_dp, 3.67844340685374513e-03_dp, 7.35389540699760667e-03_dp, 1.43079355017790150e-02_dp, 2.70861317219600745e-02_dp,& + 5.00039451671855859e-02_dp, 9.02531713884734688e-02_dp, 1.59643928480476205e-01_dp, 2.77362092792709347e-01_dp, 4.74499463661941734e-01_dp, 8.02409594992836150e-01_dp,& + 1.35248644425788744e+00_dp, 2.32469837012121960e+00_dp, 4.44463201570879818e+00_dp] + aw%aw_erange_matrix(:, 16) = [1.05537307465743284e-04_dp, 6.04114890345993001e-04_dp, 1.74808087768887855e-03_dp, 4.14892351339478469e-03_dp, 9.06777482852746779e-03_dp,& + 1.88708736505370164e-02_dp, 3.78405483771319731e-02_dp, 7.35534743950406605e-02_dp, 1.39149970172078974e-01_dp, 2.57012619692873145e-01_dp, 4.64673706380170914e-01_dp,& + 8.24310774687844305e-01_dp, 1.43845177788936329e+00_dp, 2.47862798314855626e+00_dp, 4.25183840359052656e+00_dp, 7.44799055279019750e+00_dp, 2.75845624421119831e-04_dp,& + 7.58059696898161304e-04_dp, 1.62738916170547445e-03_dp, 3.37735747437889998e-03_dp, 6.84165302145215218e-03_dp, 1.34560408443224477e-02_dp, 2.57094629782190394e-02_dp,& + 4.78470046371534674e-02_dp, 8.69809853452546689e-02_dp, 1.54846909473789957e-01_dp, 2.70589095153322690e-01_dp, 4.65336333654371825e-01_dp, 7.90610641841838824e-01_dp,& + 1.33811980156249577e+00_dp, 2.30814335154912431e+00_dp, 4.42579981986181270e+00_dp] + aw%aw_erange_matrix(:, 17) = [9.44773691119611941e-05_dp, 5.43193371816229689e-04_dp, 1.58529076001570363e-03_dp, 3.80445119019962551e-03_dp, 8.40830888946824360e-03_dp,& + 1.76766622119811992e-02_dp, 3.57636322027086104e-02_dp, 7.00642034135144226e-02_dp, 1.33472875053466083e-01_dp, 2.48058977084102017e-01_dp, 4.50988013467829851e-01_dp,& + 8.04062319500161493e-01_dp, 1.40951520734543023e+00_dp, 2.43878826484893274e+00_dp, 4.19907917115933049e+00_dp, 7.38055138869627925e+00_dp, 2.47168812970795910e-04_dp,& + 6.85157250381651867e-04_dp, 1.49210873033567303e-03_dp, 3.14045446537675015e-03_dp, 6.43430877951877301e-03_dp, 1.27727320392762647e-02_dp, 2.45972718527957372e-02_dp,& + 4.60935944652694080e-02_dp, 8.43063411502943394e-02_dp, 1.50906614412536083e-01_dp, 2.65001268910812326e-01_dp, 4.57747306434051426e-01_dp, 7.80806606488453681e-01_dp,& + 1.32615265104682423e+00_dp, 2.29433424518916640e+00_dp, 4.41009226224503337e+00_dp] + aw%aw_erange_matrix(:, 18) = [8.56966014984952726e-05_dp, 4.94737232830936907e-04_dp, 1.45531491856781760e-03_dp, 3.52771939786528143e-03_dp, 7.87462438036366438e-03_dp,& + 1.67031895938322059e-02_dp, 3.40593424378246093e-02_dp, 6.71839347162209166e-02_dp, 1.28761881603225270e-01_dp, 2.40594118418479552e-01_dp, 4.39530255088571464e-01_dp,& + 7.87047459730448873e-01_dp, 1.38512122114885150e+00_dp, 2.40511115764277461e+00_dp, 4.15438397780310265e+00_dp, 7.32332950147354378e+00_dp, 2.24392060575159135e-04_dp,& + 6.27041706761741094e-04_dp, 1.38344066171848458e-03_dp, 2.94819848362962850e-03_dp, 6.10068538780172715e-03_dp, 1.22089286671955115e-02_dp, 2.36739223810270155e-02_dp,& + 4.46301312678028944e-02_dp, 8.20634642574863266e-02_dp, 1.47588508027176962e-01_dp, 2.60278104396839072e-01_dp, 4.51311362761884882e-01_dp, 7.72468954882403636e-01_dp,& + 1.31595387099549921e+00_dp, 2.28255173264817390e+00_dp, 4.39669057356122384e+00_dp] + aw%aw_erange_matrix(:, 19) = [7.85427260255526331e-05_dp, 4.55192461786559175e-04_dp, 1.34886745971785765e-03_dp, 3.29980061701751507e-03_dp, 7.43216147935275330e-03_dp,& + 1.58908890315543790e-02_dp, 3.26288715086645031e-02_dp, 6.47538075936886781e-02_dp, 1.24768765970660347e-01_dp, 2.34240816007087072e-01_dp, 4.29743078508864784e-01_dp,& + 7.72466595117579313e-01_dp, 1.36415811068297010e+00_dp, 2.37610189373330272e+00_dp, 4.11581100024765245e+00_dp, 7.27387779175559945e+00_dp, 2.05828296233996665e-04_dp,& + 5.79516303470468453e-04_dp, 1.29394653547505538e-03_dp, 2.78840262668174875e-03_dp, 5.82114329324756683e-03_dp, 1.17334510546047814e-02_dp, 2.28910200924036800e-02_dp,& + 4.33834862866021784e-02_dp, 8.01450248378290792e-02_dp, 1.44739972641330816e-01_dp, 2.56210088425984417e-01_dp, 4.45752169295529965e-01_dp, 7.65249583727318994e-01_dp,& + 1.30710669831289317e+00_dp, 2.27232012462184851e+00_dp, 4.38505336694388248e+00_dp] + aw%aw_erange_matrix(:, 20) = [4.43803089127606113e-05_dp, 2.65218591197643853e-04_dp, 8.30855323495340568e-04_dp, 2.16814201958144461e-03_dp, 5.18489451591576823e-03_dp,& + 1.16752594424327817e-02_dp, 2.50600750841695370e-02_dp, 5.16739374920347702e-02_dp, 1.02949002312831606e-01_dp, 1.99055913849081695e-01_dp, 3.74892690057061606e-01_dp,& + 6.89886804356359851e-01_dp, 1.24433776114628336e+00_dp, 2.20900073280761244e+00_dp, 3.89224221437696771e+00_dp, 6.98596666740116490e+00_dp, 1.17061244040588000e-04_dp,& + 3.49507944241428143e-04_dp, 8.49620646664857337e-04_dp, 1.96981214128917614e-03_dp, 4.35085567522754818e-03_dp, 9.17937119472227517e-03_dp, 1.86109192573347161e-02_dp,& + 3.64635216587984104e-02_dp, 6.93518532719665654e-02_dp, 1.28520713372702128e-01_dp, 2.32797744928449957e-01_dp, 4.13453840598429323e-01_dp, 7.22968566709522364e-01_dp,& + 1.25497538883367321e+00_dp, 2.21182278597783633e+00_dp, 4.31625131487044467e+00_dp] + aw%aw_erange_matrix(:, 21) = [3.18692979875762945e-05_dp, 1.94924143581001979e-04_dp, 6.34735317845784510e-04_dp, 1.72499618053375062e-03_dp, 4.27312550471167351e-03_dp,& + 9.90891266044059173e-03_dp, 2.17985806983987014e-02_dp, 4.58990884084013243e-02_dp, 9.31095938820044738e-02_dp, 1.82893089930429714e-01_dp, 3.49282689301175675e-01_dp,& + 6.50775264786516261e-01_dp, 1.18688178491725038e+00_dp, 2.12803484113070596e+00_dp, 3.78301819554569896e+00_dp, 6.84446856078756305e+00_dp, 8.44802619933795508e-05_dp,& + 2.63287491421840790e-04_dp, 6.75566783375913349e-04_dp, 1.63333525201483530e-03_dp, 3.72314514391366329e-03_dp, 8.05605050544987676e-03_dp, 1.66815720516301329e-02_dp,& + 3.32777027647976134e-02_dp, 6.42904126378543717e-02_dp, 1.20789761544245547e-01_dp, 2.21475826652405366e-01_dp, 3.97635557280198393e-01_dp, 7.02038439571572748e-01_dp,& + 1.22895802375841612e+00_dp, 2.18148993239703737e+00_dp, 4.28175673827994530e+00_dp] + aw%aw_erange_matrix(:, 22) = [2.52372605908996745e-05_dp, 1.57392133212888027e-04_dp, 5.28274241848721731e-04_dp, 1.47892945126437171e-03_dp, 3.75547803252764293e-03_dp,& + 8.88646471280357154e-03_dp, 1.98792253903057707e-02_dp, 4.24522975011028258e-02_dp, 8.71647656143440946e-02_dp, 1.73023533565983295e-01_dp, 3.33498452444295046e-01_dp,& + 6.26473072676287823e-01_dp, 1.15092966665799223e+00_dp, 2.07707237149278523e+00_dp, 3.71394768667479935e+00_dp, 6.75468845238541338e+00_dp, 6.71839362983703346e-05_dp,& + 2.16820834544496606e-04_dp, 5.78858894715697709e-04_dp, 1.44079602687706139e-03_dp, 3.35595107506599056e-03_dp, 7.38753519939425174e-03_dp, 1.55169220144455947e-02_dp,& + 3.13310776551212547e-02_dp, 6.11648614294553819e-02_dp, 1.15971107204260557e-01_dp, 2.14360693807584268e-01_dp, 3.87622881472094116e-01_dp, 6.88709210745946487e-01_dp,& + 1.21231184422481064e+00_dp, 2.16203090843149370e+00_dp, 4.25962792921999256e+00_dp] + aw%aw_erange_matrix(:, 23) = [2.10828735485771043e-05_dp, 1.33747043923274799e-04_dp, 4.60302814175420549e-04_dp, 1.31908976394215505e-03_dp, 3.41373834744931924e-03_dp,& + 8.20208746315155210e-03_dp, 1.85794936296085622e-02_dp, 4.00951119714870186e-02_dp, 8.30646818595997816e-02_dp, 1.66166495086338906e-01_dp, 3.22461707884920790e-01_dp,& + 6.09385272174553516e-01_dp, 1.12552832887090504e+00_dp, 2.04092006169053786e+00_dp, 3.66479300909027206e+00_dp, 6.69064931196403645e+00_dp, 5.63375423327661044e-05_dp,& + 1.87324678348996492e-04_dp, 5.15997238093761422e-04_dp, 1.31297823197896904e-03_dp, 3.10840654255903261e-03_dp, 6.93141540756278107e-03_dp, 1.47143909644481610e-02_dp,& + 2.99783578189846064e-02_dp, 5.89769743650245121e-02_dp, 1.12576359067155851e-01_dp, 2.09319673205829559e-01_dp, 3.80493824364532884e-01_dp, 6.79179041147570661e-01_dp,& + 1.20037201041025687e+00_dp, 2.14804779322759742e+00_dp, 4.24372611094621011e+00_dp] + aw%aw_erange_matrix(:, 24) = [1.82166686738074864e-05_dp, 1.17355253951603524e-04_dp, 4.12646046678105574e-04_dp, 1.20544501630295061e-03_dp, 3.16766225037333439e-03_dp,& + 7.70401763679718320e-03_dp, 1.76251541149907119e-02_dp, 3.83513160771349129e-02_dp, 8.00120403518244372e-02_dp, 1.61032879231492870e-01_dp, 3.14159010930951887e-01_dp,& + 5.96476492618847165e-01_dp, 1.10626971507662764e+00_dp, 2.01342726666024063e+00_dp, 3.62732282398227612e+00_dp, 6.64174934770401748e+00_dp, 4.88479888159984235e-05_dp,& + 1.66743914977552775e-04_dp, 4.71273806908887769e-04_dp, 1.22055032501193809e-03_dp, 2.92729126196330808e-03_dp, 6.59463811322526239e-03_dp, 1.41173715836293810e-02_dp,& + 2.89656047084140694e-02_dp, 5.73298928164362870e-02_dp, 1.10008370974673766e-01_dp, 2.05490126818393987e-01_dp, 3.75057914236386680e-01_dp, 6.71889473870629361e-01_dp,& + 1.19121736903672493e+00_dp, 2.13731165043817173e+00_dp, 4.23151659571047745e+00_dp] + aw%aw_erange_matrix(:, 25) = [1.61101137105389739e-05_dp, 1.05257432767853372e-04_dp, 3.77124469837566750e-04_dp, 1.11973962747994172e-03_dp, 2.98014652008201080e-03_dp,& + 7.32119813756530822e-03_dp, 1.68863969203923159e-02_dp, 3.69933310084055861e-02_dp, 7.76226242551877887e-02_dp, 1.56996883399357717e-01_dp, 3.07606512749093397e-01_dp,& + 5.86254946758791418e-01_dp, 1.09097647899171291e+00_dp, 1.99154292498465102e+00_dp, 3.59744001648970313e+00_dp, 6.60269853853355038e+00_dp, 4.33396342454888918e-05_dp,& + 1.51467498773258743e-04_dp, 4.37524678131294127e-04_dp, 1.14987956691945054e-03_dp, 2.78750323004162831e-03_dp, 6.33280212676514374e-03_dp, 1.36504094549384763e-02_dp,& + 2.81694379065950094e-02_dp, 5.60293648763132632e-02_dp, 1.07972916431346322e-01_dp, 2.02444490698196894e-01_dp, 3.70722013872658129e-01_dp, 6.66060575713892322e-01_dp,& + 1.18388318186635288e+00_dp, 2.12870098815666564e+00_dp, 4.22172408565013857e+00_dp] + aw%aw_erange_matrix(:, 26) = [1.44910830020980627e-05_dp, 9.59247666285387932e-05_dp, 3.49480241611745145e-04_dp, 1.05236428638244149e-03_dp, 2.83143875825483384e-03_dp,& + 7.01541787267422751e-03_dp, 1.62928054973930578e-02_dp, 3.58967694676089050e-02_dp, 7.56850447598008957e-02_dp, 1.53712204828203025e-01_dp, 3.02257000428244105e-01_dp,& + 5.77887188163868748e-01_dp, 1.07842740830373907e+00_dp, 1.97355013597876772e+00_dp, 3.57283298867063293e+00_dp, 6.57050657122702475e+00_dp, 3.91036617280149617e-05_dp,& + 1.39622093468860363e-04_dp, 4.10978281792326609e-04_dp, 1.09367810950585973e-03_dp, 2.67546635017943237e-03_dp, 6.12167259211140406e-03_dp, 1.32720036926534928e-02_dp,& + 2.75215465371370822e-02_dp, 5.49672130356585603e-02_dp, 1.06305300828417465e-01_dp, 1.99942346115711156e-01_dp, 3.67151255105131302e-01_dp, 6.61250501621218900e-01_dp,& + 1.17782146729458970e+00_dp, 2.12157781794781597e+00_dp, 4.21362308983330625e+00_dp] + aw%aw_erange_matrix(:, 27) = [1.21556594544792030e-05_dp, 8.23983748572736053e-05_dp, 3.08963398371883647e-04_dp, 9.52384499123811097e-04_dp, 2.60842886057528018e-03_dp,& + 6.55290684696903554e-03_dp, 1.53886295835706215e-02_dp, 3.42166248696358297e-02_dp, 7.27014821000612765e-02_dp, 1.48632646931657925e-01_dp, 2.93953603975382449e-01_dp,& + 5.64857136583094444e-01_dp, 1.05883226845267098e+00_dp, 1.94538975252448010e+00_dp, 3.53425049785512657e+00_dp, 6.51996578961256912e+00_dp, 3.29892698526955332e-05_dp,& + 1.22339673980425813e-04_dp, 3.71555506181443741e-04_dp, 1.00911840740269950e-03_dp, 2.50533305997647192e-03_dp, 5.79875266691652017e-03_dp, 1.26898229903717064e-02_dp,& + 2.65198029780881646e-02_dp, 5.33179394599257103e-02_dp, 1.03706252106678443e-01_dp, 1.96029940068529973e-01_dp, 3.61552073806202301e-01_dp, 6.53689885157118789e-01_dp,& + 1.16827593217446624e+00_dp, 2.11034879572048117e+00_dp, 4.20085232088900096e+00_dp] + aw%aw_erange_matrix(:, 28) = [7.13471002471993354e-06_dp, 5.29467032451044542e-05_dp, 2.18126901539138012e-04_dp, 7.21360517466291921e-04_dp, 2.08015499871736474e-03_dp,& + 5.43528204883592450e-03_dp, 1.31681009285434403e-02_dp, 3.00345719866606173e-02_dp, 6.51901784064533585e-02_dp, 1.35719345130269731e-01_dp, 2.72666080314345083e-01_dp,& + 5.31207153623647232e-01_dp, 1.00790980686110809e+00_dp, 1.87182424824945604e+00_dp, 3.43304177060903370e+00_dp, 6.38699885280501967e+00_dp, 1.98257938552532495e-05_dp,& + 8.40296462119933309e-05_dp, 2.80273970340653956e-04_dp, 8.07328750940328643e-04_dp, 2.09061226948387829e-03_dp, 4.99849164035787510e-03_dp, 1.12274645565650279e-02_dp,& + 2.39748495351119265e-02_dp, 4.90869662060536283e-02_dp, 9.69821658282067484e-02_dp, 1.85832842429148964e-01_dp, 3.46864256074506494e-01_dp, 6.33748523755653492e-01_dp,& + 1.14299369524447547e+00_dp, 2.08053509421593663e+00_dp, 4.16694294663970854e+00_dp] + aw%aw_erange_matrix(:, 29) = [5.29249514301132187e-06_dp, 4.19343252757951111e-05_dp, 1.82737438901562374e-04_dp, 6.27843358430121520e-04_dp, 1.85983070894205180e-03_dp,& + 4.95818859592519427e-03_dp, 1.22023907425847667e-02_dp, 2.81878008516035054e-02_dp, 6.18305239154504777e-02_dp, 1.29880299744984995e-01_dp, 2.62950034242736719e-01_dp,& + 5.15724357812102130e-01_dp, 9.84317591482867238e-01_dp, 1.83754523881623699e+00_dp, 3.38566863771911741e+00_dp, 6.32456122317518865e+00_dp, 1.49899692977725207e-05_dp,& + 6.93204774283267655e-05_dp, 2.43220905340470661e-04_dp, 7.22473373592021528e-04_dp, 1.91187712314453383e-03_dp, 4.64701311884111248e-03_dp, 1.05752900144337678e-02_dp,& + 2.28253081203215642e-02_dp, 4.71550285030659447e-02_dp, 9.38829556499910095e-02_dp, 1.81094415667536784e-01_dp, 3.39990601639111378e-01_dp, 6.24360483604677663e-01_dp,& + 1.13103660859194521e+00_dp, 2.06639710262585607e+00_dp, 4.15086131910516443e+00_dp] + aw%aw_erange_matrix(:, 30) = [4.31773736878657279e-06_dp, 3.60303047352619597e-05_dp, 1.63261168167596623e-04_dp, 5.75226168100277158e-04_dp, 1.73379504384428150e-03_dp,& + 4.68178815714303739e-03_dp, 1.16372706574355469e-02_dp, 2.70982187469671100e-02_dp, 5.98347883444798334e-02_dp, 1.26391629758851071e-01_dp, 2.57116152461817626e-01_dp,& + 5.06388230347464385e-01_dp, 9.70039638261550818e-01_dp, 1.81673675871043816e+00_dp, 3.35684316451570375e+00_dp, 6.28650545297204477e+00_dp, 1.24303076540154611e-05_dp,& + 6.12924753893748605e-05_dp, 2.22338565270176626e-04_dp, 6.73725996984385692e-04_dp, 1.80782224834487824e-03_dp, 4.44029321814444489e-03_dp, 1.01885563508556497e-02_dp,& + 2.21389857406311917e-02_dp, 4.59949144505170382e-02_dp, 9.20126454807105032e-02_dp, 1.78222523273414285e-01_dp, 3.35808992061634781e-01_dp, 6.18631233760847832e-01_dp,& + 1.12372183807606851e+00_dp, 2.05773586398375707e+00_dp, 4.14100882646687207e+00_dp] + aw%aw_erange_matrix(:, 31) = [3.70975867485438758e-06_dp, 3.23095974345838857e-05_dp, 1.50751791796946199e-04_dp, 5.40915866129935237e-04_dp, 1.65069566621838817e-03_dp,& + 4.49801466629874431e-03_dp, 1.12590458181901151e-02_dp, 2.63650642132821425e-02_dp, 5.84859131899247639e-02_dp, 1.24024822968737125e-01_dp, 2.53145535590468929e-01_dp,& + 5.00016351298351092e-01_dp, 9.60271964584979987e-01_dp, 1.80247354207944044e+00_dp, 3.33705426048128562e+00_dp, 6.26035148960221832e+00_dp, 1.08336000906553486e-05_dp,& + 5.61646913829607426e-05_dp, 2.08706414643022598e-04_dp, 6.41498436540636542e-04_dp, 1.73842323177099346e-03_dp, 4.30149368219168854e-03_dp, 9.92748802913993866e-03_dp,& + 2.16736122289964903e-02_dp, 4.52053172738387798e-02_dp, 9.07355616494632117e-02_dp, 1.76256045479438767e-01_dp, 3.32938764907261542e-01_dp, 6.14690683320622044e-01_dp,& + 1.11868286357054081e+00_dp, 2.05176383786785221e+00_dp, 4.13421515627375502e+00_dp] + aw%aw_erange_matrix(:, 32) = [3.29307433796630773e-06_dp, 2.97376527986368188e-05_dp, 1.41976719845007126e-04_dp, 5.16576765783947141e-04_dp, 1.59126867541210652e-03_dp,& + 4.36579262671051883e-03_dp, 1.09856221527627942e-02_dp, 2.58330132577597980e-02_dp, 5.75039035275383276e-02_dp, 1.22297087801244098e-01_dp, 2.50240360996554667e-01_dp,& + 4.95345024579851689e-01_dp, 9.53099040349520976e-01_dp, 1.79198460975399865e+00_dp, 3.32248583508375628e+00_dp, 6.24108223942480667e+00_dp, 9.73921315654793179e-06_dp,& + 5.25819992873462335e-05_dp, 1.99028066423316980e-04_dp, 6.18407632563333165e-04_dp, 1.68838246973765458e-03_dp, 4.20092557580681921e-03_dp, 9.73759613841949229e-03_dp,& + 2.13340343901398007e-02_dp, 4.46276041650120678e-02_dp, 8.97990158818834650e-02_dp, 1.74811044817542116e-01_dp, 3.30826015322738642e-01_dp, 6.11785841611682035e-01_dp,& + 1.11496412843897841e+00_dp, 2.04735361117476744e+00_dp, 4.12919801960688915e+00_dp] + aw%aw_erange_matrix(:, 33) = [2.98964795412928161e-06_dp, 2.78510556032888645e-05_dp, 1.35463612561978952e-04_dp, 4.98353624804465101e-04_dp, 1.54649765459536899e-03_dp,& + 4.26571596491992760e-03_dp, 1.07779202919790727e-02_dp, 2.54276640489241416e-02_dp, 5.67539329083084562e-02_dp, 1.20974901513310126e-01_dp, 2.48013235638977037e-01_dp,& + 4.91758596295572781e-01_dp, 9.47584973821341991e-01_dp, 1.78391286926115833e+00_dp, 3.31126541650462869e+00_dp, 6.22623261842660014e+00_dp, 8.94223582088384038e-06_dp,& + 4.99308515006045077e-05_dp, 1.91777151092376909e-04_dp, 6.00986766112024265e-04_dp, 1.65044538838878419e-03_dp, 4.12440019763640146e-03_dp, 9.59267530862847537e-03_dp,& + 2.10742486967102106e-02_dp, 4.41847367419175643e-02_dp, 8.90798160999419775e-02_dp, 1.73699706474474164e-01_dp, 3.29198984665094174e-01_dp, 6.09546349869233395e-01_dp,& + 1.11209472908096241e+00_dp, 2.04394895409445887e+00_dp, 4.12532474780290670e+00_dp] + aw%aw_erange_matrix(:, 34) = [2.57922219186754929e-06_dp, 2.52766850415510830e-05_dp, 1.26457365708311655e-04_dp, 4.72914025961016545e-04_dp, 1.48357617092218538e-03_dp,& + 4.12436318531398793e-03_dp, 1.04834085373526585e-02_dp, 2.48510894180926055e-02_dp, 5.56843884684864870e-02_dp, 1.19085180222321993e-01_dp, 2.44824194691807717e-01_dp,& + 4.86614940401622065e-01_dp, 9.39665921045545360e-01_dp, 1.77230748120379422e+00_dp, 3.29511861865382860e+00_dp, 6.20484984880878532e+00_dp, 7.86406486178199112e-06_dp,& + 4.62765946095298626e-05_dp, 1.81648002610440557e-04_dp, 5.76466629589813639e-04_dp, 1.59676844408603957e-03_dp, 4.01569466774701501e-03_dp, 9.38616135532111505e-03_dp,& + 2.07030869722131423e-02_dp, 4.35506157524021276e-02_dp, 8.80480980271636099e-02_dp, 1.72102869337548120e-01_dp, 3.26857898204441721e-01_dp, 6.06320214250667622e-01_dp,& + 1.10795741758446264e+00_dp, 2.03903724449288815e+00_dp, 4.11973685029489456e+00_dp] + aw%aw_erange_matrix(:, 35) = [2.43541362433170772e-06_dp, 2.43674010920485705e-05_dp, 1.23239875127668686e-04_dp, 4.63753248815872328e-04_dp, 1.46079218475904187e-03_dp,& + 4.07296827940922378e-03_dp, 1.03759836334632576e-02_dp, 2.46402394239789019e-02_dp, 5.52924317122943237e-02_dp, 1.18391416193676977e-01_dp, 2.43651638230665685e-01_dp,& + 4.84721244099458271e-01_dp, 9.36747200836526961e-01_dp, 1.76802615796251827e+00_dp, 3.28915764337563843e+00_dp, 6.19695188747453063e+00_dp, 7.48620957173570369e-06_dp,& + 4.49744932307259967e-05_dp, 1.77998490979932098e-04_dp, 5.67577081138817986e-04_dp, 1.57722452679259057e-03_dp, 3.97598562426190998e-03_dp, 9.31052865345715144e-03_dp,& + 2.05668655620557320e-02_dp, 4.33174693969102659e-02_dp, 8.76681895298326436e-02_dp, 1.71514093328614226e-01_dp, 3.25993725425264114e-01_dp, 6.05128200549742812e-01_dp,& + 1.10642760942127394e+00_dp, 2.03722030677132970e+00_dp, 4.11766973357092336e+00_dp] + aw%aw_erange_matrix(:, 36) = [1.90859617159554337e-06_dp, 2.09950439600139040e-05_dp, 1.11113988674419262e-04_dp, 4.28852559134845432e-04_dp, 1.37333608208660158e-03_dp,& + 3.87459378923412116e-03_dp, 9.95955902729078225e-03_dp, 2.38200692781438822e-02_dp, 5.37634425665394003e-02_dp, 1.15678622021244265e-01_dp, 2.39057295596334041e-01_dp,& + 4.77288361373471137e-01_dp, 9.25274009180120371e-01_dp, 1.75117594726518022e+00_dp, 3.26567406672438754e+00_dp, 6.16581627107343788e+00_dp, 6.10122979734671908e-06_dp,& + 4.00837025306847991e-05_dp, 1.64084444472536599e-04_dp, 5.33400320302549955e-04_dp, 1.50164908261383990e-03_dp, 3.82175791908060704e-03_dp, 9.01575168296964852e-03_dp,& + 2.00344308423492865e-02_dp, 4.24040123406136116e-02_dp, 8.61766786663821643e-02_dp, 1.69198486719865704e-01_dp, 3.22589816911634075e-01_dp, 6.00426913775136684e-01_dp,& + 1.10038807582983877e+00_dp, 2.03004300869215726e+00_dp, 4.10950392701377876e+00_dp] + aw%aw_erange_matrix(:, 37) = [1.90827994525250899e-06_dp, 2.09929942749567209e-05_dp, 1.11106514447489467e-04_dp, 4.28830855332524641e-04_dp, 1.37328138921740056e-03_dp,& + 3.87446922377897339e-03_dp, 9.95929668391619047e-03_dp, 2.38195511381459925e-02_dp, 5.37624744822230785e-02_dp, 1.15676901105840627e-01_dp, 2.39054376294121851e-01_dp,& + 4.77283632901010835e-01_dp, 9.25266704669341467e-01_dp, 1.75116520865135428e+00_dp, 3.26565907490263108e+00_dp, 6.16579634865748449e+00_dp, 6.10039728638633995e-06_dp,& + 4.00806962962503083e-05_dp, 1.64075783635878373e-04_dp, 5.33378918013125954e-04_dp, 1.50160156415125889e-03_dp, 3.82166062969930154e-03_dp, 9.01556517573429313e-03_dp,& + 2.00340931971503301e-02_dp, 4.24034320065246953e-02_dp, 8.61757293982789441e-02_dp, 1.69197011150964555e-01_dp, 3.22587647195451244e-01_dp, 6.00423914940963921e-01_dp,& + 1.10038421265627195e+00_dp, 2.03003839540528963e+00_dp, 4.10949865437411699e+00_dp] + case(18) + aw%energy_range(:) = [100.0_dp, 2.00e+02_dp, 3.00e+02_dp, 4.00e+02_dp, 5.00e+02_dp, 6.00e+02_dp,& + 7.00e+02_dp, 8.00e+02_dp, 9.00e+02_dp, 1.00e+03_dp, 2.00e+03_dp, 3.00e+03_dp, 4.00e+03_dp, 5.00e+03_dp,& + 6.00e+03_dp, 8.00e+03_dp, 9.00e+03_dp, 1.00e+04_dp, 2.00e+04_dp, 3.00e+04_dp, 4.00e+04_dp, 5.00e+04_dp,& + 6.00e+04_dp, 7.00e+04_dp, 8.00e+04_dp, 1.00e+05_dp, 2.00e+05_dp, 3.00e+05_dp, 4.00e+05_dp, 5.00e+05_dp,& + 6.00e+05_dp, 7.00e+05_dp, 1.00e+06_dp, 2.00e+06_dp, 3.00e+06_dp, 4.00e+06_dp, 5.00e+06_dp] + aw%aw_erange_matrix(:, 1) = [3.13060568305601351e-03_dp, 1.67097480153570073e-02_dp, 4.20603752640300449e-02_dp, 8.09539652999341081e-02_dp, 1.36390967857746681e-01_dp,& + 2.13147798122915927e-01_dp, 3.18509646416849312e-01_dp, 4.63157341438440340e-01_dp, 6.62226034996298507e-01_dp, 9.36677961961052907e-01_dp, 1.31523305493242249e+00_dp,& + 1.83718188625082179e+00_dp, 2.55661335463641270e+00_dp, 3.54919245789090043e+00_dp, 4.92431566493793138e+00_dp, 6.85079762824929883e+00_dp, 9.62538936192941819e+00_dp,& + 1.39441065435998155e+01_dp, 8.05825095210471742e-03_dp, 1.92509609476614607e-02_dp, 3.17394427938591031e-02_dp, 4.65387250173524350e-02_dp, 6.51190142803804162e-02_dp,& + 8.95940655383273415e-02_dp, 1.22892483688214565e-01_dp, 1.68903153525686522e-01_dp, 2.32696487928973766e-01_dp, 3.20948271173013500e-01_dp, 4.42642242720547530e-01_dp,& + 6.10162954106962974e-01_dp, 8.41123679816304204e-01_dp, 1.16188888281340885e+00_dp, 1.61556100548747228e+00_dp, 2.28381103982621791e+00_dp, 3.36465045919326933e+00_dp,& + 5.63501703153524858e+00_dp] + aw%aw_erange_matrix(:, 2) = [1.77849763282545976e-03_dp, 9.53050331705429001e-03_dp, 2.41715763670106998e-02_dp, 4.70787133826155654e-02_dp, 8.06744954509492351e-02_dp,& + 1.28944316701122441e-01_dp, 1.98099178394377601e-01_dp, 2.97374199692843622e-01_dp, 4.40063137209178501e-01_dp, 6.44984839288004541e-01_dp, 9.38607314927031755e-01_dp,& + 1.35811986020136444e+00_dp, 1.95596687976843242e+00_dp, 2.80694386709650079e+00_dp, 4.02057818466138084e+00_dp, 5.76669629386025306e+00_dp, 8.34281786095414724e+00_dp,& + 1.24402956709732422e+01_dp, 4.58203689637041566e-03_dp, 1.10339170966427605e-02_dp, 1.84719162771828926e-02_dp, 2.77374293691252972e-02_dp, 4.01072366160640584e-02_dp,& + 5.74545178903397985e-02_dp, 8.23776589959942379e-02_dp, 1.18364088609596463e-01_dp, 1.70115491406395952e-01_dp, 2.44089150111693826e-01_dp, 3.49280752689573537e-01_dp,& + 4.98372261284116880e-01_dp, 7.09596261927372463e-01_dp, 1.01023464227912507e+00_dp, 1.44442078136247543e+00_dp, 2.09441041846179798e+00_dp, 3.15665485525111889e+00_dp,& + 5.39538962042540060e+00_dp] + aw%aw_erange_matrix(:, 3) = [1.27310209329263785e-03_dp, 6.84088991188971929e-03_dp, 1.74418711512609667e-02_dp, 3.42567626710492470e-02_dp, 5.94095603098494657e-02_dp,& + 9.64524637447977395e-02_dp, 1.50974587362519258e-01_dp, 2.31356617556676830e-01_dp, 3.49810807722170936e-01_dp, 5.23902124174831840e-01_dp, 7.78760954826290486e-01_dp,& + 1.15027942021814567e+00_dp, 1.68981403336343616e+00_dp, 2.47148636863273063e+00_dp, 3.60474942090268691e+00_dp, 5.25997727567653595e+00_dp, 7.73535457520057523e+00_dp,& + 1.17204273208081204e+01_dp, 3.28199550905035548e-03_dp, 7.94687934938108353e-03_dp, 1.34463066977488586e-02_dp, 2.05292847448247245e-02_dp, 3.03582077757123363e-02_dp,& + 4.46469181613256619e-02_dp, 6.57772653088819770e-02_dp, 9.69972855612304119e-02_dp, 1.42802353477466282e-01_dp, 2.09516542528400629e-01_dp, 3.06107049805222575e-01_dp,& + 4.45372961500316800e-01_dp, 6.45855025440923547e-01_dp, 9.35353101387836228e-01_dp, 1.35865735200749205e+00_dp, 1.99853353342874773e+00_dp, 3.05090311395216762e+00_dp,& + 5.27388729479473550e+00_dp] + aw%aw_erange_matrix(:, 4) = [1.00300764061800004e-03_dp, 5.40119285324320610e-03_dp, 1.38290060307211613e-02_dp, 2.73431383817179241e-02_dp, 4.78739878380367509e-02_dp,& + 7.86830586197688475e-02_dp, 1.24932830849546025e-01_dp, 1.94417356236044975e-01_dp, 2.98609672055963393e-01_dp, 4.54213697328763211e-01_dp, 6.85426012155419873e-01_dp,& + 1.02720865762776636e+00_dp, 1.53010666114936233e+00_dp, 2.26769934719810662e+00_dp, 3.34931803735087019e+00_dp, 4.94568863021012639e+00_dp, 7.35552542383112673e+00_dp,& + 1.12674173192650144e+01_dp, 2.58696587386509974e-03_dp, 6.29119659728542141e-03_dp, 1.07351937196825085e-02_dp, 1.66070637685148750e-02_dp, 2.49888153437386115e-02_dp,& + 3.74779891899764961e-02_dp, 5.63035562499744971e-02_dp, 8.45522551019596558e-02_dp, 1.26579337993229679e-01_dp, 1.88608097926375479e-01_dp, 2.79565535852876024e-01_dp,& + 4.12305005143533798e-01_dp, 6.05556651756423370e-01_dp, 8.87470522524977157e-01_dp, 1.30331335096881218e+00_dp, 1.93627015321842832e+00_dp, 2.98203008114882762e+00_dp,& + 5.19487437442852773e+00_dp] + aw%aw_erange_matrix(:, 5) = [8.33130943394381563e-04_dp, 4.49453339308115464e-03_dp, 1.15484388891811066e-02_dp, 2.29636533575316402e-02_dp, 4.05306238239156805e-02_dp,& + 6.72958002634303637e-02_dp, 1.08102758203152668e-01_dp, 1.70308031845335772e-01_dp, 2.64834042691084737e-01_dp, 4.07739033822954400e-01_dp, 6.22509561219692031e-01_dp,& + 9.43386633099325134e-01_dp, 1.42026920255805522e+00_dp, 2.12628406201697340e+00_dp, 3.17063021819169144e+00_dp, 4.72428168372380153e+00_dp, 7.08638539056717587e+00_dp,& + 1.09449464392502041e+01_dp, 2.14969537437315582e-03_dp, 5.24688620068331120e-03_dp, 9.01722309283595376e-03_dp, 1.41042638297888476e-02_dp, 2.15285615268984536e-02_dp,& + 3.27975625536323784e-02_dp, 5.00253106214112592e-02_dp, 7.61799293424517826e-02_dp, 1.15510957557027463e-01_dp, 1.74159210949979215e-01_dp, 2.61009248396864846e-01_dp,& + 3.88940440982029068e-01_dp, 5.76812654610189601e-01_dp, 8.53035431936163269e-01_dp, 1.26324693268146993e+00_dp, 1.89098401425114604e+00_dp, 2.93182828153962438e+00_dp,& + 5.13733863073762365e+00_dp] + aw%aw_erange_matrix(:, 6) = [7.15674370843821166e-04_dp, 3.86697304672405486e-03_dp, 9.96677365690930121e-03_dp, 1.99172110614480556e-02_dp, 3.54008150836152211e-02_dp,& + 5.92954333284383614e-02_dp, 9.61933370780173463e-02_dp, 1.53107118543686582e-01_dp, 2.40526092120968232e-01_dp, 3.73997115143040904e-01_dp, 5.76437879681963916e-01_dp,& + 8.81503038816230711e-01_dp, 1.33855571884150937e+00_dp, 2.02033476439687165e+00_dp, 3.03590765912302984e+00_dp, 4.55643391821923860e+00_dp, 6.88142347695170553e+00_dp,& + 1.06984955705750568e+01_dp, 1.84728124663890124e-03_dp, 4.52309511617493120e-03_dp, 7.82185187058320568e-03_dp, 1.23524323213823044e-02_dp, 1.90859782538452365e-02_dp,& + 2.94573075116894845e-02_dp, 4.54900527824695505e-02_dp, 7.00598456607959136e-02_dp, 1.07331414106435472e-01_dp, 1.63375364458601763e-01_dp, 2.47034717198631570e-01_dp,& + 3.71200184596518046e-01_dp, 5.54826538805611946e-01_dp, 8.26526683183469335e-01_dp, 1.23224156051956890e+00_dp, 1.85580993954395712e+00_dp, 2.89276832421468555e+00_dp,& + 5.09260485295158460e+00_dp] + aw%aw_erange_matrix(:, 7) = [6.29246983573313696e-04_dp, 3.40476518226396794e-03_dp, 8.79983474088586425e-03_dp, 1.76636613430474140e-02_dp, 3.15919107906099256e-02_dp,& + 5.33250278657308244e-02_dp, 8.72499733034381025e-02_dp, 1.40098901437124612e-01_dp, 2.22007419058450256e-01_dp, 3.48102016441458606e-01_dp, 5.40828223715164258e-01_dp,& + 8.33348162653710256e-01_dp, 1.27456789671411364e+00_dp, 1.93688694440292952e+00_dp, 2.92924597136559184e+00_dp, 4.42294883364496982e+00_dp, 6.71781677985601000e+00_dp,& + 1.05012007218785897e+01_dp, 1.62470924325914612e-03_dp, 3.98939943132514165e-03_dp, 6.93740550799082280e-03_dp, 1.10494735645689061e-02_dp, 1.72556556398382119e-02_dp,& + 2.69305189193088587e-02_dp, 4.20241386577638529e-02_dp, 6.53370028900366329e-02_dp, 1.00963057749311427e-01_dp, 1.54911672533170230e-01_dp, 2.35986284011789865e-01_dp,& + 3.57080603033420874e-01_dp, 5.37221991259609011e-01_dp, 8.05188864650826619e-01_dp, 1.20717674174648137e+00_dp, 1.82728826865744765e+00_dp, 2.86104949584900714e+00_dp,& + 5.05629894405748725e+00_dp] + aw%aw_erange_matrix(:, 8) = [5.62782334945291941e-04_dp, 3.04901907885508743e-03_dp, 7.90029086110356077e-03_dp, 1.59223945992483552e-02_dp, 2.86389033037378754e-02_dp,& + 4.86751317030152050e-02_dp, 8.02458271532852235e-02_dp, 1.29848258845782466e-01_dp, 2.07321142519682061e-01_dp, 3.27435994170185096e-01_dp, 5.12236322594479265e-01_dp,& + 7.94460714322788752e-01_dp, 1.22261725071368121e+00_dp, 1.86880404707785375e+00_dp, 2.84184092769238550e+00_dp, 4.31314738354701088e+00_dp, 6.58281632626634128e+00_dp,& + 1.03380056558369038e+01_dp, 1.45351311063793179e-03_dp, 3.57821112835372780e-03_dp, 6.25389079018070105e-03_dp, 1.00377848387202106e-02_dp, 1.58249375146050225e-02_dp,& + 2.49388369993986600e-02_dp, 3.92681519545044280e-02_dp, 6.15504612191745196e-02_dp, 9.58190040595412740e-02_dp, 1.48028823756269218e-01_dp, 2.26946010516923008e-01_dp,& + 3.45462248099259850e-01_dp, 5.22662230551262152e-01_dp, 7.87462830383376389e-01_dp, 1.18627850542234259e+00_dp, 1.80344595414217435e+00_dp, 2.83450126737101193e+00_dp,& + 5.02592512274666348e+00_dp] + aw%aw_erange_matrix(:, 9) = [5.09956820844997220e-04_dp, 2.76606079370183720e-03_dp, 7.18379472930052044e-03_dp, 1.45324734401939566e-02_dp, 2.62744457345686147e-02_dp,& + 4.49365179818514496e-02_dp, 7.45860480149161398e-02_dp, 1.21519479481494080e-01_dp, 1.95321069512380402e-01_dp, 3.10456408919682125e-01_dp, 4.88620042582648240e-01_dp,& + 7.62179819446476281e-01_dp, 1.17929178166661575e+00_dp, 1.81178303747056191e+00_dp, 2.76835875929337583e+00_dp, 4.22053315012927488e+00_dp, 6.46863952158576350e+00_dp,& + 1.01996937375922911e+01_dp, 1.31742409134479239e-03_dp, 3.25085143951871257e-03_dp, 5.70821004123319310e-03_dp, 9.22663936664768272e-03_dp, 1.46708066965285135e-02_dp,& + 2.33201522555469623e-02_dp, 3.70110320759733727e-02_dp, 5.84271461966189842e-02_dp, 9.15486203042080171e-02_dp, 1.42281684231895439e-01_dp, 2.19357305638089473e-01_dp,& + 3.35661995709629124e-01_dp, 5.10326837097277775e-01_dp, 7.72386958060629958e-01_dp, 1.16844839325418315e+00_dp, 1.78305793410421654e+00_dp, 2.81177434489785316e+00_dp,& + 4.99993299310682104e+00_dp] + aw%aw_erange_matrix(:, 10) = [4.66884191696600092e-04_dp, 2.53518315097069156e-03_dp, 6.59842169255152496e-03_dp, 1.33946637142630318e-02_dp, 2.43333256802801684e-02_dp,& + 4.18555359937679630e-02_dp, 6.99004840051102028e-02_dp, 1.14590085605347738e-01_dp, 1.85286893591144752e-01_dp, 2.96188601701286136e-01_dp, 4.68682238029433706e-01_dp,& + 7.34806567718746972e-01_dp, 1.14240233117834866e+00_dp, 1.76305053795450828e+00_dp, 2.70534768772159451e+00_dp, 4.14088691630270844e+00_dp, 6.37021671670584588e+00_dp,& + 1.00802468831582139e+01_dp, 1.20644262202773494e-03_dp, 2.98351806905674134e-03_dp, 5.26144993746265575e-03_dp, 8.55990693672604996e-03_dp, 1.37168167419120662e-02_dp,& + 2.19731075762485857e-02_dp, 3.51198349523668615e-02_dp, 5.57937272538030424e-02_dp, 8.79277306880305448e-02_dp, 1.37383772368286527e-01_dp, 2.12859795610828961e-01_dp,& + 3.27235125271443661e-01_dp, 4.99679091955250343e-01_dp, 7.59329485867318521e-01_dp, 1.15296227944800744e+00_dp, 1.76531471483956559e+00_dp, 2.79197621123604556e+00_dp,& + 4.97729762459709502e+00_dp] + aw%aw_erange_matrix(:, 11) = [2.60914461772335975e-04_dp, 1.42841100538599729e-03_dp, 3.77931336615040716e-03_dp, 7.87553426551717423e-03_dp, 1.48187271209905720e-02_dp,& + 2.65443710178691790e-02_dp, 4.62373542001488086e-02_dp, 7.89916247748617822e-02_dp, 1.32848433755762302e-01_dp, 2.20379319232295229e-01_dp, 3.61064527641105915e-01_dp,& + 5.84852933079486603e-01_dp, 9.37523669434331519e-01_dp, 1.48897669044511138e+00_dp, 2.34696867784464924e+00_dp, 3.68347884456586971e+00_dp, 5.80045014349923616e+00_dp,& + 9.38451113606470066e+00_dp, 6.75435555884669296e-04_dp, 1.69811101235115263e-03_dp, 3.09356203984489887e-03_dp, 5.27770014065303151e-03_dp, 8.92467772623281759e-03_dp,& + 1.50467300660292111e-02_dp, 2.51712972165478929e-02_dp, 4.16516501616942189e-02_dp, 6.81184703412873321e-02_dp, 1.10132067155941857e-01_dp, 1.76142887783290847e-01_dp,& + 2.78930670620491594e-01_dp, 4.37845260282784421e-01_dp, 6.82625481569703596e-01_dp, 1.06112107980412063e+00_dp, 1.65936002035834029e+00_dp, 2.67334288372550377e+00_dp,& + 4.84179632444405428e+00_dp] + aw%aw_erange_matrix(:, 12) = [1.85513213773606345e-04_dp, 1.02150286740210769e-03_dp, 2.73448938724222363e-03_dp, 5.80387009885520444e-03_dp, 1.11810481774840837e-02_dp,& + 2.05518300952334462e-02_dp, 3.67304305786214091e-02_dp, 6.43020141414563928e-02_dp, 1.10640253721470419e-01_dp, 1.87473309428166701e-01_dp, 3.13264290932447564e-01_dp,& + 5.16812698313678487e-01_dp, 8.42722150950093285e-01_dp, 1.35988341226895848e+00_dp, 2.17548182992352057e+00_dp, 3.46162154443591952e+00_dp, 5.52102425741810254e+00_dp,& + 9.04041836150807754e+00_dp, 4.80852705753012058e-04_dp, 1.22305403571343449e-03_dp, 2.27947736150288169e-03_dp, 4.01365797781973958e-03_dp, 7.01540376387589735e-03_dp,& + 1.21847611879422838e-02_dp, 2.09200714737653552e-02_dp, 3.54265591278901115e-02_dp, 5.91658737085576508e-02_dp, 9.75188516417223455e-02_dp, 1.58774380033241708e-01_dp,& + 2.55620059373879827e-01_dp, 4.07460398574663651e-01_dp, 6.44326699296321581e-01_dp, 1.01465268223249172e+00_dp, 1.60523186707796173e+00_dp, 2.61244035390791707e+00_dp,& + 4.77231660346555397e+00_dp] + aw%aw_erange_matrix(:, 13) = [1.45623827102946623e-04_dp, 8.05588152979675896e-04_dp, 2.17691130407093175e-03_dp, 4.68812739584344249e-03_dp, 9.19600123660022604e-03_dp,& + 1.72289055604926133e-02_dp, 3.13676494456035099e-02_dp, 5.58742924602326219e-02_dp, 9.76924100663839612e-02_dp, 1.67998143390820670e-01_dp, 2.84577977288065331e-01_dp,& + 4.75453513865553901e-01_dp, 7.84416664022989374e-01_dp, 1.27964179827845292e+00_dp, 2.06788347256167926e+00_dp, 3.32129384479391954e+00_dp, 5.34312314157560042e+00_dp,& + 8.82025781425350708e+00_dp, 3.77841659955862491e-04_dp, 9.70055271158684097e-04_dp, 1.84098010513958528e-03_dp, 3.32040210608571234e-03_dp, 5.94400030565985817e-03_dp,& + 1.05417311185070812e-02_dp, 1.84298427244651702e-02_dp, 3.17154955608041356e-02_dp, 5.37447671964476903e-02_dp, 8.97721982893909948e-02_dp, 1.47968012029178114e-01_dp,& + 2.40943262811694148e-01_dp, 3.88121908953358907e-01_dp, 6.19717513693844646e-01_dp, 9.84555284879807480e-01_dp, 1.56996784104876874e+00_dp, 2.57264246868716873e+00_dp,& + 4.72694104483554423e+00_dp] + aw%aw_erange_matrix(:, 14) = [1.20693065016366942e-04_dp, 6.70318312279102792e-04_dp, 1.82598709243442714e-03_dp, 3.98066758906077175e-03_dp, 7.92407149371679963e-03_dp,& + 1.50731508121776207e-02_dp, 2.78434453982067988e-02_dp, 5.02664501056209675e-02_dp, 8.89754985015726030e-02_dp, 1.54744075465572922e-01_dp, 2.64859545012644360e-01_dp,& + 4.46762838614896685e-01_dp, 7.43631633383161961e-01_dp, 1.22308810558274139e+00_dp, 1.99154189668606629e+00_dp, 3.22116127998360158e+00_dp, 5.21559085842792136e+00_dp,& + 8.66187972983845889e+00_dp, 3.13424614215803300e-04_dp, 8.11091344556560262e-04_dp, 1.56293846928815807e-03_dp, 2.87442640486548556e-03_dp, 5.24259999238325686e-03_dp,& + 9.44812750354856110e-03_dp, 1.67483721901341004e-02_dp, 2.91782108273659670e-02_dp, 4.99968956826367938e-02_dp, 8.43623562376343422e-02_dp, 1.40351586287337071e-01_dp,& + 2.30511253319458237e-01_dp, 3.74270678501655019e-01_dp, 6.01971072101519233e-01_dp, 9.62727552491357996e-01_dp, 1.54428582589175911e+00_dp, 2.54359484716486017e+00_dp,& + 4.69383505396399681e+00_dp] + aw%aw_erange_matrix(:, 15) = [1.03530813604779028e-04_dp, 5.77010708614184996e-04_dp, 1.58297978993598076e-03_dp, 3.48764309027865815e-03_dp, 7.02981637575661022e-03_dp,& + 1.35420129552544823e-02_dp, 2.53143459665430594e-02_dp, 4.62021297583787224e-02_dp, 8.25996052244215434e-02_dp, 1.44967282294702543e-01_dp, 2.50201253823955916e-01_dp,& + 4.25283165263042551e-01_dp, 7.12899874312358128e-01_dp, 1.18022626317392154e+00_dp, 1.93338491947318536e+00_dp, 3.14454465168471442e+00_dp, 5.11766152430480759e+00_dp,& + 8.53993925026136758e+00_dp, 2.69059599396066513e-04_dp, 7.01171220589084324e-04_dp, 1.36917997681255824e-03_dp, 2.55983016868183361e-03_dp, 4.74076816982743621e-03_dp,& + 8.65545451941890018e-03_dp, 1.55159703188033887e-02_dp, 2.73005170505556810e-02_dp, 4.71993736826663846e-02_dp, 8.02927232938843299e-02_dp, 1.34581100450814117e-01_dp,& + 2.22555937276669474e-01_dp, 3.63645272961041655e-01_dp, 5.88286109735375096e-01_dp, 9.45821302421523069e-01_dp, 1.52432961945465073e+00_dp, 2.52098460780209654e+00_dp,& + 4.66807280121724055e+00_dp] + aw%aw_erange_matrix(:, 16) = [8.12878045927325100e-05_dp, 4.55784176179485265e-04_dp, 1.26575781231635042e-03_dp, 2.83901197267764265e-03_dp, 5.84075866946649497e-03_dp,& + 1.14816659474414502e-02_dp, 2.18703351471255143e-02_dp, 4.06049658428226795e-02_dp, 7.37274839449534453e-02_dp, 1.31232827738574781e-01_dp, 2.29429562298488349e-01_dp,& + 3.94602877306535982e-01_dp, 6.68687020587504510e-01_dp, 1.11816086345712651e+00_dp, 1.84868752331819342e+00_dp, 3.03241562091376515e+00_dp, 4.97377213890380609e+00_dp,& + 8.36023751368250245e+00_dp, 2.11528474078379687e-04_dp, 5.57938342187908878e-04_dp, 1.11429094995911461e-03_dp, 2.13984900872585520e-03_dp, 4.05975600506285235e-03_dp,& + 7.56390783215793276e-03_dp, 1.37976760555232440e-02_dp, 2.46541044572325049e-02_dp, 4.32184500991177195e-02_dp, 7.44508856457123808e-02_dp, 1.26231561940560427e-01_dp,& + 2.10961000314310559e-01_dp, 3.48056000387103548e-01_dp, 5.68089975660581725e-01_dp, 9.20748230015767999e-01_dp, 1.49462504826186793e+00_dp, 2.48726404601868678e+00_dp,& + 4.62966203399261467e+00_dp] + aw%aw_erange_matrix(:, 17) = [7.36290238032269906e-05_dp, 4.13946476575048573e-04_dp, 1.15578122974341227e-03_dp, 2.61246326353696025e-03_dp, 5.42131632353000555e-03_dp,& + 1.07469311984104646e-02_dp, 2.06290337409884283e-02_dp, 3.85675089612289509e-02_dp, 7.04684426329998531e-02_dp, 1.26145823376294514e-01_dp, 2.21678062600754872e-01_dp,& + 3.83075284348309064e-01_dp, 6.51971738557552305e-01_dp, 1.09456550812149200e+00_dp, 1.81633014027732598e+00_dp, 2.98939917340350014e+00_dp, 4.91838496867421782e+00_dp,& + 8.29089093989333747e+00_dp, 1.91708707114072877e-04_dp, 5.08367399657288512e-04_dp, 1.02527533888157078e-03_dp, 1.99114795509654219e-03_dp, 3.81505964757374331e-03_dp,& + 7.16665373395437236e-03_dp, 1.31655503592034168e-02_dp, 2.36714122682651733e-02_dp, 4.17278947848333456e-02_dp, 7.22471020464889591e-02_dp, 1.23060199748490182e-01_dp,& + 2.06529455242298821e-01_dp, 3.42064141262841903e-01_dp, 5.60288564762608798e-01_dp, 9.11022245959785426e-01_dp, 1.48306650559867004e+00_dp, 2.47412089926975653e+00_dp,& + 4.61469407825248634e+00_dp] + aw%aw_erange_matrix(:, 18) = [6.73944932443592415e-05_dp, 3.79844572428876927e-04_dp, 1.06590795373273759e-03_dp, 2.42654206896005193e-03_dp, 5.07517853516520952e-03_dp,& + 1.01369719376394104e-02_dp, 1.95925662402830214e-02_dp, 3.68571498016495233e-02_dp, 6.77192628196435775e-02_dp, 1.21835648595960938e-01_dp, 2.15083880414005030e-01_dp,& + 3.73233014220664572e-01_dp, 6.37653103358320594e-01_dp, 1.07429339684447545e+00_dp, 1.78845750203856402e+00_dp, 2.95226237507783207e+00_dp, 4.87048249753405393e+00_dp,& + 8.23083530472446867e+00_dp, 1.75569876637717915e-04_dp, 4.67898292556300052e-04_dp, 9.52228454181657511e-04_dp, 1.86817929682057309e-03_dp, 3.61108514012193401e-03_dp,& + 6.83324047724214335e-03_dp, 1.26319553349792356e-02_dp, 2.28377529856874373e-02_dp, 4.04577800825522693e-02_dp, 7.03617133989330734e-02_dp, 1.20337130462841210e-01_dp,& + 2.02711688147605068e-01_dp, 3.36886623918729866e-01_dp, 5.53529442704170482e-01_dp, 9.02576781682568829e-01_dp, 1.47301298821370485e+00_dp, 2.46267883439995794e+00_dp,& + 4.60166480506323872e+00_dp] + aw%aw_erange_matrix(:, 19) = [3.77097267144774277e-05_dp, 2.16718158239339242e-04_dp, 6.31964795877831245e-04_dp, 1.51501851013790970e-03_dp, 3.34484667837428931e-03_dp,& + 7.02512458570965417e-03_dp, 1.42014149350935173e-02_dp, 2.78013295560369245e-02_dp, 5.29266569041400847e-02_dp, 9.83025113032961195e-02_dp, 1.78600150657352325e-01_dp,& + 3.18120006405406497e-01_dp, 5.56596891614358547e-01_dp, 9.58408306407735666e-01_dp, 1.62774470686190731e+00_dp, 2.73655217246640481e+00_dp, 4.59058386383132877e+00_dp,& + 7.87837440091345975e+00_dp, 9.86461415774919214e-05_dp, 2.73221143359511415e-04_dp, 5.94197557752134385e-04_dp, 1.24895734154715447e-03_dp, 2.55620318224912286e-03_dp,& + 5.06990830887251494e-03_dp, 9.75621380152377933e-03_dp, 1.82704930302675719e-02_dp, 3.33967548858809735e-02_dp, 5.97405156792770453e-02_dp, 1.04810909008227066e-01_dp,& + 1.80703082801913328e-01_dp, 3.06740164242034985e-01_dp, 5.13823817457257026e-01_dp, 8.52592911322042957e-01_dp, 1.41317820778574244e+00_dp, 2.39437286369400981e+00_dp,& + 4.52390876499952377e+00_dp] + aw%aw_erange_matrix(:, 20) = [2.68925195549073629e-05_dp, 1.56793785885291212e-04_dp, 4.69893990043240026e-04_dp, 1.16545220385413321e-03_dp, 2.65989506956115698e-03_dp,& + 5.75384007396932337e-03_dp, 1.19342111722500789e-02_dp, 2.38928003384090495e-02_dp, 4.63925218571977285e-02_dp, 8.76901279402622358e-02_dp, 1.61839358502072539e-01_dp,& + 2.92374836693560902e-01_dp, 5.18161174811695435e-01_dp, 9.02717884502531653e-01_dp, 1.54960075834088817e+00_dp, 2.63061729962015844e+00_dp, 4.45202318493723048e+00_dp,& + 7.70286032300627355e+00_dp, 7.05638795782659030e-05_dp, 2.01002867914723093e-04_dp, 4.56947425490451874e-04_dp, 1.00093647179561995e-03_dp, 2.11652844500955601e-03_dp,& + 4.31084332567352024e-03_dp, 8.48457589505386897e-03_dp, 1.62034578815592155e-02_dp, 3.01348775048121756e-02_dp, 5.47430158873886477e-02_dp, 9.73833001049487501e-02_dp,& + 1.70015028445808208e-01_dp, 2.91900568092631596e-01_dp, 4.94043300498388738e-01_dp, 8.27439707654565648e-01_dp, 1.38283937942449198e+00_dp, 2.35959541119381777e+00_dp,& + 4.48433441513418707e+00_dp] + aw%aw_erange_matrix(:, 21) = [2.11776428406011891e-05_dp, 1.24955957092028758e-04_dp, 3.82749361784648454e-04_dp, 9.73991658367676029e-04_dp, 2.27688417139812168e-03_dp,& + 5.02884426710743966e-03_dp, 1.06183171895938705e-02_dp, 2.15888221418370253e-02_dp, 4.24877264991899983e-02_dp, 8.12706704880782893e-02_dp, 1.51590277234206289e-01_dp,& + 2.76478503601760406e-01_dp, 4.94222230573377497e-01_dp, 8.67763285947123597e-01_dp, 1.50022012401874916e+00_dp, 2.56328999983562467e+00_dp, 4.36355480209440749e+00_dp,& + 7.59041890716973189e+00_dp, 5.57090107245227829e-05_dp, 1.62366769955750792e-04_dp, 3.81782556436269834e-04_dp, 8.61192201413146460e-04_dp, 1.86281232839267670e-03_dp,& + 3.86442117299721881e-03_dp, 7.72478532341631073e-03_dp, 1.49514707528110163e-02_dp, 2.81353063747719796e-02_dp, 5.16464716293368112e-02_dp, 9.27364294632549019e-02_dp,& + 1.63269905535395971e-01_dp, 2.82461831610602510e-01_dp, 4.81374480384390513e-01_dp, 8.11235487340904116e-01_dp, 1.36320833480298265e+00_dp, 2.33703760956925288e+00_dp,& + 4.45866956074495580e+00_dp] + aw%aw_erange_matrix(:, 22) = [1.76070275101297462e-05_dp, 1.04974632586343552e-04_dp, 3.27524057106157195e-04_dp, 8.50889138429431618e-04_dp, 2.02675943694682068e-03_dp,& + 4.54854527962151971e-03_dp, 9.73548372448280498e-03_dp, 2.00259509380829870e-02_dp, 3.98132333040402478e-02_dp, 7.68361260215089659e-02_dp, 1.44456327953492114e-01_dp,& + 2.65338595024798618e-01_dp, 4.77344481537174625e-01_dp, 8.42986466846138205e-01_dp, 1.46505294151738807e+00_dp, 2.51515068726526270e+00_dp, 4.30009786276047024e+00_dp,& + 7.50957825176482174e+00_dp, 4.64186887815647243e-05_dp, 1.37983797560572785e-04_dp, 3.33452287623846701e-04_dp, 7.69419491405382667e-04_dp, 1.69333629958220424e-03_dp,& + 3.56219435629200097e-03_dp, 7.20463902309312343e-03_dp, 1.40860992359440711e-02_dp, 2.67414967648813770e-02_dp, 4.94717544703552684e-02_dp, 8.94508734055344951e-02_dp,& + 1.58471793174805697e-01_dp, 2.75710974071400383e-01_dp, 4.72269671037240601e-01_dp, 7.99542467873979534e-01_dp, 1.34899902892752999e+00_dp, 2.32068207466329079e+00_dp,& + 4.44006317705370979e+00_dp] + aw%aw_erange_matrix(:, 23) = [1.51487261945737330e-05_dp, 9.11659324769150721e-05_dp, 2.89040873614000921e-04_dp, 7.64069868490654643e-04_dp, 1.84814200002400239e-03_dp,& + 4.20167024631436757e-03_dp, 9.09161519340235570e-03_dp, 1.88763863743453900e-02_dp, 3.78313678142224094e-02_dp, 7.35284936492460878e-02_dp, 1.39104394958239008e-01_dp,& + 2.56938214106312401e-01_dp, 4.64558752402094766e-01_dp, 8.24140212584070331e-01_dp, 1.43820799153508694e+00_dp, 2.47829256677809928e+00_dp, 4.25139458167740614e+00_dp,& + 7.44742363171281507e+00_dp, 4.00172934108619654e-05_dp, 1.21053459367159757e-04_dp, 2.99362782194228345e-04_dp, 7.03592889127086147e-04_dp, 1.57016975178594681e-03_dp,& + 3.34027399899004991e-03_dp, 6.81941752803501798e-03_dp, 1.34404676386291749e-02_dp, 2.56948821776365501e-02_dp, 4.78293838010395780e-02_dp, 8.69568482518628116e-02_dp,& + 1.54812802519890103e-01_dp, 2.70541537476452487e-01_dp, 4.65272231353635712e-01_dp, 7.90528148997813096e-01_dp, 1.33801932338487473e+00_dp, 2.30802753439873376e+00_dp,& + 4.42566810636102037e+00_dp] + aw%aw_erange_matrix(:, 24) = [1.33450946857598585e-05_dp, 8.10013345693360817e-05_dp, 2.60505518780499042e-04_dp, 6.99027120294132363e-04_dp, 1.71292672688305443e-03_dp,& + 3.93664118611715408e-03_dp, 8.59572801141966769e-03_dp, 1.79849132808722820e-02_dp, 3.62852280011255329e-02_dp, 7.09344754417242929e-02_dp, 1.34887592254427091e-01_dp,& + 2.50292160328723368e-01_dp, 4.54405961654528678e-01_dp, 8.09126146653293299e-01_dp, 1.41676082143058490e+00_dp, 2.44877472513873817e+00_dp, 4.21231557277193680e+00_dp,& + 7.39748146374000015e+00_dp, 3.53174020538623987e-05_dp, 1.08539211526486186e-04_dp, 2.73819521014837626e-04_dp, 6.53580073098785556e-04_dp, 1.47559217672499333e-03_dp,& + 3.16843822945470479e-03_dp, 6.51906462972331319e-03_dp, 1.29340795221531794e-02_dp, 2.48697209477921517e-02_dp, 4.65285612184684963e-02_dp, 8.49733606273255226e-02_dp,& + 1.51892088420516908e-01_dp, 2.66401503567959441e-01_dp, 4.59651859717771616e-01_dp, 7.83269968829686136e-01_dp, 1.32916215886498579e+00_dp, 2.29780866662279104e+00_dp,& + 4.41404428527587811e+00_dp] + aw%aw_erange_matrix(:, 25) = [1.19608983643762814e-05_dp, 7.31776981510573726e-05_dp, 2.38397281335537387e-04_dp, 6.48177541128883454e-04_dp, 1.60627044353721924e-03_dp,& + 3.72594606594641407e-03_dp, 8.19885121070576886e-03_dp, 1.72673139868429436e-02_dp, 3.50344193249588626e-02_dp, 6.88267529409492540e-02_dp, 1.31448064305153656e-01_dp,& + 2.44852576105250047e-01_dp, 4.46070906494070551e-01_dp, 7.96766930006198804e-01_dp, 1.39906449480958073e+00_dp, 2.42437075724512852e+00_dp, 4.17995561517234826e+00_dp,& + 7.35607828290079802e+00_dp, 3.17082936442419536e-05_dp, 9.88711098779920632e-05_dp, 2.53846227836985994e-04_dp, 6.14009273933647896e-04_dp, 1.40009229465454287e-03_dp,& + 3.03030469936903983e-03_dp, 6.27622081555165301e-03_dp, 1.25226197820897597e-02_dp, 2.41963451940166926e-02_dp, 4.54629624299898311e-02_dp, 8.33430042783768893e-02_dp,& + 1.49484033643996705e-01_dp, 2.62978817693378941e-01_dp, 4.54994127276706906e-01_dp, 7.77242691667035968e-01_dp, 1.32179571981875110e+00_dp, 2.28930236484464933e+00_dp,& + 4.40436883899004261e+00_dp] + aw%aw_erange_matrix(:, 26) = [9.96761158553555444e-06_dp, 6.18692914207559080e-05_dp, 2.06170036210568655e-04_dp, 5.73211107890209581e-04_dp, 1.44730240695950876e-03_dp,& + 3.40892099536259157e-03_dp, 7.59685007995568491e-03_dp, 1.61712883720046205e-02_dp, 3.31125600685078861e-02_dp, 6.55713200633647325e-02_dp, 1.26111159618525148e-01_dp,& + 2.36377868660430784e-01_dp, 4.33038093291385484e-01_dp, 7.77379946000164024e-01_dp, 1.37122800415111401e+00_dp, 2.38589243185479205e+00_dp, 4.12883680000907560e+00_dp,& + 7.29058430903771093e+00_dp, 2.65071583106260783e-05_dp, 8.48293254396083508e-05_dp, 2.24390897268131415e-04_dp, 5.54811598906642159e-04_dp, 1.28593422488879972e-03_dp,& + 2.81969169097368326e-03_dp, 5.90338491932312654e-03_dp, 1.18871614049258830e-02_dp, 2.31510113224687453e-02_dp, 4.38012130603939800e-02_dp, 8.07902275831345329e-02_dp,& + 1.45699852659562423e-01_dp, 2.57582690043541174e-01_dp, 4.47629793783756336e-01_dp, 7.67689878785539737e-01_dp, 1.31009898646472545e+00_dp, 2.27578179593081087e+00_dp,& + 4.38899056842124402e+00_dp] + aw%aw_erange_matrix(:, 27) = [5.69628328201120298e-06_dp, 3.73947477693335357e-05_dp, 1.34808292606433211e-04_dp, 4.02363370425018007e-04_dp, 1.07522362749315568e-03_dp,& + 2.64987937419991189e-03_dp, 6.12770973340106412e-03_dp, 1.34527127599654243e-02_dp, 2.82784222092996897e-02_dp, 5.72823558565759422e-02_dp, 1.12375952980137431e-01_dp,& + 2.14359358899264385e-01_dp, 3.98891047400829091e-01_dp, 7.26205544331862018e-01_dp, 1.29727249730106053e+00_dp, 2.28310280963276657e+00_dp, 3.99168266601377741e+00_dp,& + 7.11430302311417950e+00_dp, 1.53412014655641082e-05_dp, 5.40378710172882411e-05_dp, 1.57188321282197624e-04_dp, 4.15042400610066186e-04_dp, 1.00955395518829635e-03_dp,& + 2.29966856177653885e-03_dp, 4.96771195351118459e-03_dp, 1.02701101357026894e-02_dp, 2.04586605332921639e-02_dp, 3.94755240942939317e-02_dp, 7.40820751149756651e-02_dp,& + 1.35671534087687312e-01_dp, 2.43174288430001523e-01_dp, 4.27834657486577119e-01_dp, 7.41867110367467664e-01_dp, 1.27834520477995417e+00_dp, 2.23898801777038958e+00_dp,& + 4.34714455839110681e+00_dp] + aw%aw_erange_matrix(:, 28) = [4.13173182523085577e-06_dp, 2.82953569586273491e-05_dp, 1.07357655282983076e-04_dp, 3.34031207388946118e-04_dp, 9.21278013215434373e-04_dp,& + 2.32697217024414134e-03_dp, 5.48821969396552471e-03_dp, 1.22464124910277479e-02_dp, 2.60980188844333050e-02_dp, 5.34905273921795141e-02_dp, 1.06014872445904379e-01_dp,& + 2.04051155883155949e-01_dp, 3.82751435806632623e-01_dp, 7.01813987411379236e-01_dp, 1.26176462906345210e+00_dp, 2.23344686165775030e+00_dp, 3.92510147193946413e+00_dp,& + 7.02842472272909724e+00_dp, 1.12413825198791527e-05_dp, 4.23581397394261224e-05_dp, 1.30257470325819791e-04_dp, 3.56609544464453910e-04_dp, 8.90477280344353396e-04_dp,& + 2.07032072932821203e-03_dp, 4.54706396508409039e-03_dp, 9.53127582160513340e-03_dp, 1.92112591692011961e-02_dp, 3.74468407961127125e-02_dp, 7.09020793561878498e-02_dp,& + 1.30872002390418907e-01_dp, 2.36219607171893220e-01_dp, 4.18208222356725279e-01_dp, 7.29229896403720712e-01_dp, 1.26273069797389059e+00_dp, 2.22084593571100797e+00_dp,& + 4.32651261931560516e+00_dp] + aw%aw_erange_matrix(:, 29) = [3.30226286847199525e-06_dp, 2.34206306119432754e-05_dp, 9.23040944987100478e-05_dp, 2.95637516785855010e-04_dp, 8.33032454706429562e-04_dp,& + 2.13888506531630974e-03_dp, 5.11084598639201682e-03_dp, 1.15268119959546240e-02_dp, 2.47853719976952012e-02_dp, 5.11897543127538684e-02_dp, 1.02128694597074979e-01_dp,& + 1.97715753164931340e-01_dp, 3.72779679793518004e-01_dp, 6.86673954558245980e-01_dp, 1.23963600788232053e+00_dp, 2.20239644190786343e+00_dp, 3.88335573763512620e+00_dp,& + 6.97447560324605043e+00_dp, 9.06493831009571861e-06_dp, 3.60111158305800768e-05_dp, 1.15103834959029406e-04_dp, 3.22921911156177086e-04_dp, 8.20644989436114134e-04_dp,& + 1.93402803087780505e-03_dp, 4.29437456179440017e-03_dp, 9.08340287300126066e-03_dp, 1.84491991824218791e-02_dp, 3.61990758173190777e-02_dp, 6.89345184382906401e-02_dp,& + 1.27886682133110025e-01_dp, 2.31873470472087867e-01_dp, 4.12167639049623669e-01_dp, 7.21272419162619305e-01_dp, 1.25287237048937405e+00_dp, 2.20937452693632252e+00_dp,& + 4.31346712866726367e+00_dp] + aw%aw_erange_matrix(:, 30) = [2.78283201387954402e-06_dp, 2.03426037320646153e-05_dp, 8.26259072951729948e-05_dp, 2.70516106805006676e-04_dp, 7.74477217336155344e-04_dp,& + 2.01269269881237858e-03_dp, 4.85538908841575724e-03_dp, 1.10360899520125632e-02_dp, 2.38846577194131125e-02_dp, 4.96025957422899302e-02_dp, 9.94354927347321504e-02_dp,& + 1.93307477671805478e-01_dp, 3.65816591824084103e-01_dp, 6.76069111738649142e-01_dp, 1.22409427413862582e+00_dp, 2.18053922732942196e+00_dp, 3.85391701960755872e+00_dp,& + 6.93638192354861616e+00_dp, 7.70087496722592801e-06_dp, 3.19576584688943520e-05_dp, 1.05177485427069824e-04_dp, 3.00482919789287189e-04_dp, 7.73582704782332952e-04_dp,& + 1.84134068718631730e-03_dp, 4.12126152251564119e-03_dp, 8.77467844465320244e-03_dp, 1.79211328551752251e-02_dp, 3.53304913887004385e-02_dp, 6.75593850637441345e-02_dp,& + 1.25792833963319417e-01_dp, 2.28815579140328212e-01_dp, 4.07905810796353407e-01_dp, 7.15645047122159150e-01_dp, 1.24588833188247139e+00_dp, 2.20123945650827624e+00_dp,& + 4.30421587078781709e+00_dp] + aw%aw_erange_matrix(:, 31) = [2.42470995219759579e-06_dp, 1.82056418065889971e-05_dp, 7.58071587224136450e-05_dp, 2.52573761105593449e-04_dp, 7.32207996753558832e-04_dp,& + 1.92083837540198534e-03_dp, 4.66820156902059222e-03_dp, 1.06745344941764735e-02_dp, 2.32179642804407754e-02_dp, 4.84231777753803896e-02_dp, 9.74273510544483023e-02_dp,& + 1.90010738320586459e-01_dp, 3.60595635420595140e-01_dp, 6.68099359921788150e-01_dp, 1.21239121059783406e+00_dp, 2.16405314617733913e+00_dp, 3.83168318569659494e+00_dp,& + 6.90758403160364232e+00_dp, 6.75989988981772157e-06_dp, 2.91166320615211813e-05_dp, 9.80814416411888686e-05_dp, 2.84239565715768542e-04_dp, 7.39214990519655962e-04_dp,& + 1.77319565434359968e-03_dp, 3.99328716643299574e-03_dp, 8.54540727765975248e-03_dp, 1.75274395605375770e-02_dp, 3.46807424038581488e-02_dp, 6.65276661394083452e-02_dp,& + 1.24217779070994183e-01_dp, 2.26510012074744777e-01_dp, 4.04685973490304496e-01_dp, 7.11386227023358408e-01_dp, 1.24059585248586801e+00_dp, 2.19507011726273715e+00_dp,& + 4.29720009490146815e+00_dp] + aw%aw_erange_matrix(:, 32) = [2.16176129771252570e-06_dp, 1.66270788284179806e-05_dp, 7.07073818199545589e-05_dp, 2.39005352223638798e-04_dp, 6.99970597597809083e-04_dp,& + 1.85032202789351969e-03_dp, 4.52374236259756816e-03_dp, 1.03943065527904843e-02_dp, 2.26993688693021452e-02_dp, 4.75029283214516498e-02_dp, 9.58563153562880799e-02_dp,& + 1.87425604388040429e-01_dp, 3.56493299282148790e-01_dp, 6.61826019040598901e-01_dp, 1.20316501743560211e+00_dp, 2.15103939920971232e+00_dp, 3.81411428402921349e+00_dp,& + 6.88481150276458820e+00_dp, 6.06872942426459449e-06_dp, 2.70007474622843711e-05_dp, 9.27112801831565700e-05_dp, 2.71824476999939159e-04_dp, 7.12764856522128025e-04_dp,& + 1.72046973418600829e-03_dp, 3.89384253410110818e-03_dp, 8.36660921401996896e-03_dp, 1.72194799075441295e-02_dp, 3.41711481654501797e-02_dp, 6.57166273395015377e-02_dp,& + 1.22977096456407906e-01_dp, 2.24690622353530628e-01_dp, 4.02141088617422038e-01_dp, 7.08015656612941524e-01_dp, 1.23640293809345647e+00_dp, 2.19017966864169455e+00_dp,& + 4.29163868677014726e+00_dp] + aw%aw_erange_matrix(:, 33) = [1.66936450608206082e-06_dp, 1.36431464861143047e-05_dp, 6.08878352206036587e-05_dp, 2.12464299388389423e-04_dp, 6.36156479143742287e-04_dp,& + 1.70945176503017405e-03_dp, 4.23305031045998186e-03_dp, 9.82704453711613982e-03_dp, 2.16443420921362956e-02_dp, 4.56228251434010676e-02_dp, 9.26348688449874502e-02_dp,& + 1.82107804189891698e-01_dp, 3.48030917348462088e-01_dp, 6.48853583623900110e-01_dp, 1.18404608576497394e+00_dp, 2.12402377079366600e+00_dp, 3.77759108546833344e+00_dp,& + 6.83742277697884582e+00_dp, 4.77387758909035730e-06_dp, 2.29508126780449446e-05_dp, 8.21955857595700617e-05_dp, 2.47176829848202247e-04_dp, 6.59746554464799278e-04_dp,& + 1.61399895858116817e-03_dp, 3.69183124596445282e-03_dp, 8.00159671421590488e-03_dp, 1.65881388791646808e-02_dp, 3.31226449124670599e-02_dp, 6.40425960094452851e-02_dp,& + 1.20409083459694130e-01_dp, 2.20915444128518351e-01_dp, 3.96849048328325904e-01_dp, 7.00993735471721613e-01_dp, 1.22765555889850098e+00_dp, 2.17996886122467481e+00_dp,& + 4.28002698121303382e+00_dp] + aw%aw_erange_matrix(:, 34) = [1.05153210682392675e-06_dp, 9.82109359198566600e-06_dp, 4.78395861953558743e-05_dp, 1.76150199721789534e-04_dp, 5.46950548985951032e-04_dp,& + 1.50929468544557942e-03_dp, 3.81467384580032147e-03_dp, 9.00203065583603246e-03_dp, 2.00964950531542334e-02_dp, 4.28440003106925135e-02_dp, 8.78430751011748528e-02_dp,& + 1.74153796774317637e-01_dp, 3.35311955480436741e-01_dp, 6.29273208523922545e-01_dp, 1.15508235334965992e+00_dp, 2.08297103191134481e+00_dp, 3.72195535108324504e+00_dp,& + 6.76510927942180729e+00_dp, 3.14818816312260181e-06_dp, 1.76265786828965847e-05_dp, 6.77797879677525459e-05_dp, 2.12550340542676892e-04_dp, 5.83980993235004228e-04_dp,& + 1.45984592182904255e-03_dp, 3.39626651311348464e-03_dp, 7.46288840499817214e-03_dp, 1.56494990870774189e-02_dp, 3.15539085571265657e-02_dp, 6.15241149934381698e-02_dp,& + 1.16526851395361591e-01_dp, 2.15183704649527130e-01_dp, 3.88784002747290469e-01_dp, 6.90258249868418550e-01_dp, 1.21424952388445284e+00_dp, 2.16429814216163985e+00_dp,& + 4.26220623979455038e+00_dp] + aw%aw_erange_matrix(:, 35) = [8.34728214621684905e-07_dp, 8.44560904459773364e-06_dp, 4.29584696333223408e-05_dp, 1.62177244224623302e-04_dp, 5.11932680714949351e-04_dp,& + 1.42954228669343788e-03_dp, 3.64602080873342380e-03_dp, 8.66631682566647125e-03_dp, 1.94617241079152355e-02_dp, 4.16968867194957987e-02_dp, 8.58538110406805999e-02_dp,& + 1.70835591676214343e-01_dp, 3.29983260076326335e-01_dp, 6.21039304902132216e-01_dp, 1.14286341091260302e+00_dp, 2.06560541307989309e+00_dp, 3.69837086391296577e+00_dp,& + 6.73440815365611112e+00_dp, 2.57729833765363847e-06_dp, 1.56542937546273492e-05_dp, 6.22229276297930358e-05_dp, 1.98899151081870858e-04_dp, 5.53641700347800485e-04_dp,& + 1.39738260727315100e-03_dp, 3.27536872998534807e-03_dp, 7.24082112567673349e-03_dp, 1.52600396475556441e-02_dp, 3.08993617692109243e-02_dp, 6.04681734753560185e-02_dp,& + 1.14892156390790021e-01_dp, 2.12761131320170715e-01_dp, 3.85363989641657190e-01_dp, 6.85693142737872852e-01_dp, 1.20853665780972341e+00_dp, 2.15761202134704488e+00_dp,& + 4.25460273384813270e+00_dp] + aw%aw_erange_matrix(:, 36) = [7.31697418235159294e-07_dp, 7.78192913747531435e-06_dp, 4.05556972701898700e-05_dp, 1.55204510399602370e-04_dp, 4.94292159044087270e-04_dp,& + 1.38908477445104676e-03_dp, 3.55999988304802392e-03_dp, 8.49433877643784516e-03_dp, 1.91353729694584383e-02_dp, 4.11053346197430766e-02_dp, 8.48253033248454608e-02_dp,& + 1.69116119572689377e-01_dp, 3.27216548478532321e-01_dp, 6.16756871439927856e-01_dp, 1.13649899521993558e+00_dp, 2.05654909227641935e+00_dp, 3.68605932606823439e+00_dp,& + 6.71837038140371501e+00_dp, 2.30579035272544704e-06_dp, 1.46876721811319836e-05_dp, 5.94476934252411929e-05_dp, 1.92009110580819360e-04_dp, 5.38216569141812995e-04_dp,& + 1.36544905409106596e-03_dp, 3.21328987943083396e-03_dp, 7.12638348625628006e-03_dp, 1.50587343735886312e-02_dp, 3.05601639949946297e-02_dp, 5.99197402403319895e-02_dp,& + 1.14041463521724409e-01_dp, 2.11498245945244356e-01_dp, 3.83578440411476651e-01_dp, 6.83306702782851882e-01_dp, 1.20554729177078546e+00_dp, 2.15411140205395535e+00_dp,& + 4.25062177779508943e+00_dp] + aw%aw_erange_matrix(:, 37) = [6.83039002664919050e-07_dp, 7.46562050293998484e-06_dp, 3.93979118840847106e-05_dp, 1.51820281594498933e-04_dp, 4.85687667238021291e-04_dp,& + 1.36927867666848582e-03_dp, 3.51776903744843977e-03_dp, 8.40971701364783518e-03_dp, 1.89744917631880054e-02_dp, 4.08132582175073366e-02_dp, 8.43167978175517058e-02_dp,& + 1.68265003230324950e-01_dp, 3.25845673139424641e-01_dp, 6.14633097811190798e-01_dp, 1.13334030627276450e+00_dp, 2.05205152948763603e+00_dp, 3.67994206898681142e+00_dp,& + 6.71039878795908340e+00_dp, 2.17748291977497743e-06_dp, 1.42229341674666827e-05_dp, 5.81001678508209256e-05_dp, 1.88645103315669666e-04_dp, 5.30656526049757909e-04_dp,& + 1.34975291504493789e-03_dp, 3.18270709340716688e-03_dp, 7.06990140878475948e-03_dp, 1.49592223666598269e-02_dp, 3.03922627801653661e-02_dp, 5.96479536663102744e-02_dp,& + 1.13619458264455936e-01_dp, 2.10871203187387918e-01_dp, 3.82691193513678196e-01_dp, 6.82120087405447051e-01_dp, 1.20406013018453062e+00_dp, 2.15236939221153945e+00_dp,& + 4.24864073243265405e+00_dp] + aw%aw_erange_matrix(:, 38) = [6.72200345974212699e-07_dp, 7.39487832678119611e-06_dp, 3.91377783182234103e-05_dp, 1.51057631809280499e-04_dp, 4.83744654923509341e-04_dp,& + 1.36479949662894596e-03_dp, 3.50820740770161005e-03_dp, 8.39053967695347139e-03_dp, 1.89380042261968438e-02_dp, 4.07469730322969001e-02_dp, 8.42013313845971084e-02_dp,& + 1.68071648316776984e-01_dp, 3.25534113047576457e-01_dp, 6.14150254525752004e-01_dp, 1.13262195300347757e+00_dp, 2.05102842495773885e+00_dp, 3.67855023430316885e+00_dp,& + 6.70858477543888654e+00_dp, 2.14889286843083340e-06_dp, 1.41186087411002464e-05_dp, 5.77964458703214584e-05_dp, 1.87885165416971971e-04_dp, 5.28946021846840391e-04_dp,& + 1.34619737793210893e-03_dp, 3.17577288535281048e-03_dp, 7.05708509626393893e-03_dp, 1.49366276661514613e-02_dp, 3.03541189639940263e-02_dp, 5.95861799519916066e-02_dp,& + 1.13523502921516722e-01_dp, 2.10728576176481969e-01_dp, 3.82489316883349306e-01_dp, 6.81850022811744116e-01_dp, 1.20372159515618860e+00_dp, 2.15197279609530101e+00_dp,& + 4.24818970522041894e+00_dp] + case(20) + aw%energy_range(:) = [200.0_dp, 3.00e+02_dp, 4.00e+02_dp, 5.00e+02_dp, 6.00e+02_dp, 7.00e+02_dp,& + 8.00e+02_dp, 9.00e+02_dp, 1.00e+03_dp, 2.00e+03_dp, 3.00e+03_dp, 4.00e+03_dp, 5.00e+03_dp, 6.00e+03_dp,& + 7.00e+03_dp, 8.00e+03_dp, 9.00e+03_dp, 1.00e+04_dp, 2.00e+04_dp, 3.00e+04_dp, 4.00e+04_dp, 5.00e+04_dp,& + 6.00e+04_dp, 7.00e+04_dp, 8.00e+04_dp, 1.00e+05_dp, 2.00e+05_dp, 3.00e+05_dp, 4.00e+05_dp, 5.00e+05_dp,& + 6.00e+05_dp, 7.00e+05_dp, 9.00e+05_dp, 1.00e+06_dp, 2.00e+06_dp, 3.00e+06_dp, 4.00e+06_dp, 8.00e+06_dp, 1.00e+07_dp] + aw%aw_erange_matrix(:, 1) = [1.59340911033067478e-03_dp, 8.50904946849679461e-03_dp, 2.14381324891662305e-02_dp, 4.13217924134164430e-02_dp, 6.97620860473193438e-02_dp,& + 1.09321104685075207e-01_dp, 1.63918949130833574e-01_dp, 2.39312230571788187e-01_dp, 3.43666004319766016e-01_dp, 4.88296891505629160e-01_dp, 6.88703938259422221e-01_dp,& + 9.66014744733213249e-01_dp, 1.34900932673276852e+00_dp, 1.87699212381449976e+00_dp, 2.60403874113626044e+00_dp, 3.60576914286975558e+00_dp, 4.99149485326237308e+00_dp,& + 6.92991716904237887e+00_dp, 9.71772239452879383e+00_dp, 1.40512612733913116e+01_dp, 4.10193054094624976e-03_dp, 9.80903579051960878e-03_dp, 1.62026542274407610e-02_dp,& + 2.38266973811476421e-02_dp, 3.34742013991377804e-02_dp, 4.62892230812084957e-02_dp, 6.38565714484942287e-02_dp, 8.82787418367577265e-02_dp, 1.22298020153240233e-01_dp,& + 1.69523185339919447e-01_dp, 2.34779037546969105e-01_dp, 3.24592511147649587e-01_dp, 4.47879020689130047e-01_dp, 6.16992015749276979e-01_dp, 8.49517596862311541e-01_dp,& + 1.17178329836823036e+00_dp, 1.62685169309855482e+00_dp, 2.29638632075273952e+00_dp, 3.37853613531567998e+00_dp, 5.65113328705362239e+00_dp] + aw%aw_erange_matrix(:, 2) = [1.13904499210405719e-03_dp, 6.09552014069879994e-03_dp, 1.54192503088270930e-02_dp, 2.99082651922659183e-02_dp, 5.09493519494348124e-02_dp,& + 8.08010692431461869e-02_dp, 1.22961299281198297e-01_dp, 1.82606873383205665e-01_dp, 2.67142819438789980e-01_dp, 3.86955966557172848e-01_dp, 5.56484587041208290e-01_dp,& + 7.95723471843741592e-01_dp, 1.13232890329597891e+00_dp, 1.60460031003783343e+00_dp, 2.26586404926580043e+00_dp, 3.19138968216569285e+00_dp, 4.49062754712213330e+00_dp,& + 6.33281343681569542e+00_dp, 9.01494311947765325e+00_dp, 1.32306709449480362e+01_dp, 2.93366938570087778e-03_dp, 7.04515555971851719e-03_dp, 1.17321497525370126e-02_dp,& + 1.74722715685951720e-02_dp, 2.49801406266746927e-02_dp, 3.52990340770604344e-02_dp, 4.98753280948631070e-02_dp, 7.06377004364660971e-02_dp, 1.00147769319503158e-01_dp,& + 1.41860186612827538e-01_dp, 2.00495050445585049e-01_dp, 2.82543540531873028e-01_dp, 3.96979859841220306e-01_dp, 5.56341007540550048e-01_dp, 7.78542662514336348e-01_dp,& + 1.09037275616667939e+00_dp, 1.53538382621142788e+00_dp, 2.19546436446452242e+00_dp, 3.26782969634996601e+00_dp, 5.52341118050514801e+00_dp] + aw%aw_erange_matrix(:, 3) = [8.96430353358386965e-04_dp, 4.80511917695569061e-03_dp, 1.21936515586327544e-02_dp, 2.37702270534453051e-02_dp, 4.07838827125285575e-02_dp,& + 6.52933285267013330e-02_dp, 1.00510331249324444e-01_dp, 1.51213651502473068e-01_dp, 2.24287342990249272e-01_dp, 3.29482475920918672e-01_dp, 4.80507719050899063e-01_dp,& + 6.96566570523348361e-01_dp, 1.00451159229719678e+00_dp, 1.44189952932815313e+00_dp, 2.06147408277824784e+00_dp, 2.93819399840996098e+00_dp, 4.18155568909791153e+00_dp,& + 5.96116486731876360e+00_dp, 8.57432689691118100e+00_dp, 1.27131467807816598e+01_dp, 2.30967192745106529e-03_dp, 5.56509969704642189e-03_dp, 9.32697130056928982e-03_dp,& + 1.40298314904001731e-02_dp, 2.03348345664661201e-02_dp, 2.92125911781597747e-02_dp, 4.20091617449700402e-02_dp, 6.05323709666417131e-02_dp, 8.72222769826312971e-02_dp,& + 1.25427531276734477e-01_dp, 1.79788267361212062e-01_dp, 2.56755085344252509e-01_dp, 3.65322039803622378e-01_dp, 5.18132829129207328e-01_dp, 7.33319053236828111e-01_dp,& + 1.03799272215612737e+00_dp, 1.47607815325437985e+00_dp, 2.12968859060615667e+00_dp, 3.19552335247835018e+00_dp, 5.44013345543908233e+00_dp] + aw%aw_erange_matrix(:, 4) = [7.43941858108558194e-04_dp, 3.99324506572499953e-03_dp, 1.01604121564421498e-02_dp, 1.98903231588493483e-02_dp, 3.43334526398137996e-02_dp,& + 5.54024931102704218e-02_dp, 8.60964974945682276e-02_dp, 1.30896886303630361e-01_dp, 1.96299511993370007e-01_dp, 2.91581476175378829e-01_dp, 4.29903569927137685e-01_dp,& + 6.29867338197687143e-01_dp, 9.17703244108222349e-01_dp, 1.33038016317608565e+00_dp, 1.92016513297746938e+00_dp, 2.76174277576863370e+00_dp, 3.96461447664841415e+00_dp,& + 5.69866218889320120e+00_dp, 8.26147101907144155e+00_dp, 1.23441248885543207e+01_dp, 1.91738312725215298e-03_dp, 4.63273201663321442e-03_dp, 7.80616390956771766e-03_dp,& + 1.18410761366227798e-02_dp, 1.73585460554474165e-02_dp, 2.52729488781124716e-02_dp, 3.68533483311020288e-02_dp, 5.38175204768781279e-02_dp, 7.85158078111489882e-02_dp,& + 1.14216036069974561e-01_dp, 1.65492589404866192e-01_dp, 2.38756014936469058e-01_dp, 3.43003601684555626e-01_dp, 4.90948202391497612e-01_dp, 7.00877399607738760e-01_dp,& + 1.00015045424850091e+00_dp, 1.43298990052828579e+00_dp, 2.08171532337388987e+00_dp, 3.14270096039701530e+00_dp, 5.37936604706722488e+00_dp] + aw%aw_erange_matrix(:, 5) = [6.38569097485054823e-04_dp, 3.43174037774286039e-03_dp, 8.75196804462230991e-03_dp, 1.71963112345279133e-02_dp, 2.98398770292170358e-02_dp,& + 4.84818741012941479e-02_dp, 7.59541529063177817e-02_dp, 1.16504064565401771e-01_dp, 1.76322405079390676e-01_dp, 2.64313084573280566e-01_dp, 3.93202447454869652e-01_dp,& + 5.81109560406391834e-01_dp, 8.53759528622831998e-01_dp, 1.24763563082221629e+00_dp, 1.81460168527891219e+00_dp, 2.62909845388257679e+00_dp, 3.80061152976508865e+00_dp,& + 5.49923963973098662e+00_dp, 8.02281714515402378e+00_dp, 1.20616990467191130e+01_dp, 1.64624927347082348e-03_dp, 3.98721122270609320e-03_dp, 6.74992784847414876e-03_dp,& + 1.03137860467780312e-02_dp, 1.52680780395206932e-02_dp, 2.24817028905434819e-02_dp, 3.31621895881786602e-02_dp, 4.89568250767923874e-02_dp, 7.21456267563233278e-02_dp,& + 1.05931034158105800e-01_dp, 1.54831311570967134e-01_dp, 2.25219052919692603e-01_dp, 3.26086701981142257e-01_dp, 4.70194933849082175e-01_dp, 6.75950928297744835e-01_dp,& + 9.70912199566876133e-01_dp, 1.39954954691031519e+00_dp, 2.04436947680555070e+00_dp, 3.10152548232226133e+00_dp, 5.33203772355721828e+00_dp] + aw%aw_erange_matrix(:, 6) = [5.61072571143229307e-04_dp, 3.01847196714530959e-03_dp, 7.71392131513013325e-03_dp, 1.52066639997109291e-02_dp, 2.65115694541762648e-02_dp,& + 4.33359502045003939e-02_dp, 6.83752103545800793e-02_dp, 1.05685662835659139e-01_dp, 1.61209385496320828e-01_dp, 2.43545204318619424e-01_dp, 3.65061973518195249e-01_dp,& + 5.43478150149877104e-01_dp, 8.04094672373795283e-01_dp, 1.18298183861235096e+00_dp, 1.73165420573701256e+00_dp, 2.52433338301671384e+00_dp, 3.67047792002619833e+00_dp,& + 5.34036265755118400e+00_dp, 7.83204467831639839e+00_dp, 1.18353304830751558e+01_dp, 1.44680898907737616e-03_dp, 3.51167044073153866e-03_dp, 5.96968933905672565e-03_dp,& + 9.18093559184831980e-03_dp, 1.37085277848084802e-02_dp, 2.03834591409695898e-02_dp, 3.03625964952499612e-02_dp, 4.52360196139964740e-02_dp, 6.72262909737048331e-02_dp,& + 9.94809247142534742e-02_dp, 1.46469151754476751e-01_dp, 2.14528074303888566e-01_dp, 3.12641076666117790e-01_dp, 4.53603331993510606e-01_dp, 6.55917496307296788e-01_dp,& + 9.47305530734814605e-01_dp, 1.37245042451229127e+00_dp, 2.01402824955472548e+00_dp, 3.06803524529046046e+00_dp, 5.29356870637847177e+00_dp] + aw%aw_erange_matrix(:, 7) = [5.01502882940591649e-04_dp, 2.70059099306814735e-03_dp, 6.91448695519962693e-03_dp, 1.36715291090292804e-02_dp, 2.39368946329081636e-02_dp,& + 3.93412656695783861e-02_dp, 6.24656462006050184e-02_dp, 9.72062500368065519e-02_dp, 1.49296807648936825e-01_dp, 2.27079819851898512e-01_dp, 3.42621991546906424e-01_dp,& + 5.13300567195080992e-01_dp, 7.64051947550105304e-01_dp, 1.13058766242498310e+00_dp, 1.66411434419076909e+00_dp, 2.43865478941696301e+00_dp, 3.56363419705310402e+00_dp,& + 5.20947420923795512e+00_dp, 7.67443229279426298e+00_dp, 1.16478865034794978e+01_dp, 1.29348047897017305e-03_dp, 3.14559139318004288e-03_dp, 5.36758143201675371e-03_dp,& + 8.30349608680929288e-03_dp, 1.24943149769587650e-02_dp, 1.87387247506306288e-02_dp, 2.81509204278415082e-02_dp, 4.22732668306473811e-02_dp, 6.32799645640150787e-02_dp,& + 9.42711779089224627e-02_dp, 1.39672583458803179e-01_dp, 2.05788207123199618e-01_dp, 3.01590110107878451e-01_dp, 4.39899072363681753e-01_dp, 6.39296224930650192e-01_dp,& + 9.27643339822016300e-01_dp, 1.34980836215914834e+00_dp, 1.98862199643710014e+00_dp, 3.03996478570268147e+00_dp, 5.26134269478920658e+00_dp] + aw%aw_erange_matrix(:, 8) = [4.54176798051982500e-04_dp, 2.44789321253706393e-03_dp, 6.27827314840997529e-03_dp, 1.24477642842393075e-02_dp, 2.18795651918432255e-02_dp,& + 3.61390339655896717e-02_dp, 5.77092718818298725e-02_dp, 9.03495739014426036e-02_dp, 1.39615485330027711e-01_dp, 2.13629615927840938e-01_dp, 3.24198064335450342e-01_dp,& + 4.88401802539330132e-01_dp, 7.30858277294287317e-01_dp, 1.08696225289904591e+00_dp, 1.60764513485711924e+00_dp, 2.36674787687761778e+00_dp, 3.47365879336816574e+00_dp,& + 5.09892433582888494e+00_dp, 7.54098359742881197e+00_dp, 1.14888704905340866e+01_dp, 1.17164923379155499e-03_dp, 2.85436374449175379e-03_dp, 4.88752520782221103e-03_dp,& + 7.60157610521120051e-03_dp, 1.15183886939231837e-02_dp, 1.74086397296599645e-02_dp, 2.63499286281822058e-02_dp, 3.98439640943772447e-02_dp, 6.00233171003619198e-02_dp,& + 8.99465532002833024e-02_dp, 1.34000176292588674e-01_dp, 1.98457373277317051e-01_dp, 2.92277680330032319e-01_dp, 4.28301261947665823e-01_dp, 6.25175194562218151e-01_dp,& + 9.10882366673366861e-01_dp, 1.33045440899754253e+00_dp, 1.96686388521136335e+00_dp, 3.01590430475151239e+00_dp, 5.23373285475806327e+00_dp] + aw%aw_erange_matrix(:, 9) = [2.31389545652061434e-04_dp, 1.25573548361936158e-03_dp, 3.26467418878907721e-03_dp, 6.61525939054778862e-03_dp, 1.19877180510286341e-02_dp,& + 2.05587754848347778e-02_dp, 3.42247963066599770e-02_dp, 5.59267900365687104e-02_dp, 9.01510566310825684e-02_dp, 1.43681976375189924e-01_dp, 2.26707521329035461e-01_dp,& + 3.54426262682979276e-01_dp, 5.49376630765429419e-01_dp, 8.44825940909645468e-01_dp, 1.28978231999914672e+00_dp, 1.95672260232700945e+00_dp, 2.95461562172969705e+00_dp,& + 4.45472865449403788e+00_dp, 6.75680531467232992e+00_dp, 1.05482558845397225e+01_dp, 5.97841988594928681e-04_dp, 1.47677186318177149e-03_dp, 2.59844834407391709e-03_dp,& + 4.21318849959283811e-03_dp, 6.72427730470716387e-03_dp, 1.07286659349290717e-02_dp, 1.70853685841758293e-02_dp, 2.70540197117113690e-02_dp, 4.25071646238493889e-02_dp,& + 6.62263969430600397e-02_dp, 1.02319734751618513e-01_dp, 1.56818913364540680e-01_dp, 2.38545154014374761e-01_dp, 3.60397852411913966e-01_dp, 5.41391349029674895e-01_dp,& + 8.10266992654025575e-01_dp, 1.21316027447477337e+00_dp, 1.83411013311083582e+00_dp, 2.86864360132638829e+00_dp, 5.06499212313868163e+00_dp] + aw%aw_erange_matrix(:, 10) = [2.31389545652061434e-04_dp, 1.25573548361936158e-03_dp, 3.26467418878907721e-03_dp, 6.61525939054778862e-03_dp, 1.19877180510286341e-02_dp,& + 2.05587754848347778e-02_dp, 3.42247963066599770e-02_dp, 5.59267900365687104e-02_dp, 9.01510566310825684e-02_dp, 1.43681976375189924e-01_dp, 2.26707521329035461e-01_dp,& + 3.54426262682979276e-01_dp, 5.49376630765429419e-01_dp, 8.44825940909645468e-01_dp, 1.28978231999914672e+00_dp, 1.95672260232700945e+00_dp, 2.95461562172969705e+00_dp,& + 4.45472865449403788e+00_dp, 6.75680531467232992e+00_dp, 1.05482558845397225e+01_dp, 5.97841988594928681e-04_dp, 1.47677186318177149e-03_dp, 2.59844834407391709e-03_dp,& + 4.21318849959283811e-03_dp, 6.72427730470716387e-03_dp, 1.07286659349290717e-02_dp, 1.70853685841758293e-02_dp, 2.70540197117113690e-02_dp, 4.25071646238493889e-02_dp,& + 6.62263969430600397e-02_dp, 1.02319734751618513e-01_dp, 1.56818913364540680e-01_dp, 2.38545154014374761e-01_dp, 3.60397852411913966e-01_dp, 5.41391349029674895e-01_dp,& + 8.10266992654025575e-01_dp, 1.21316027447477337e+00_dp, 1.83411013311083582e+00_dp, 2.86864360132638829e+00_dp, 5.06499212313868163e+00_dp] + aw%aw_erange_matrix(:, 11) = [1.64106873478977560e-04_dp, 8.94356094481026532e-04_dp, 2.34479715468854369e-03_dp, 4.81575108056488989e-03_dp, 8.88843116175322932e-03_dp,& + 1.55765097799911226e-02_dp, 2.65296970497616198e-02_dp, 4.43454032277437946e-02_dp, 7.30554063217297017e-02_dp, 1.18861997867758001e-01_dp, 1.91229739550221989e-01_dp,& + 3.04490668298481315e-01_dp, 4.80195734468752133e-01_dp, 7.50565238695916959e-01_dp, 1.16361704350310702e+00_dp, 1.79107160906205554e+00_dp, 2.74158681135842963e+00_dp,& + 4.18670920782826972e+00_dp, 6.42686158846605249e+00_dp, 1.01490122213306133e+01_dp, 4.24401097476844607e-04_dp, 1.05727589829934018e-03_dp, 1.89172495585899852e-03_dp,& + 3.14454430541335128e-03_dp, 5.16652752063045690e-03_dp, 8.47954378269798539e-03_dp, 1.38517863631827491e-02_dp, 2.24395660034455643e-02_dp, 3.59963271602878956e-02_dp,& + 5.71680679504821404e-02_dp, 8.99177023531648745e-02_dp, 1.40139757841798468e-01_dp, 2.16557288029568279e-01_dp, 3.32058063174325457e-01_dp, 5.05792188779843777e-01_dp,& + 7.66839932609333474e-01_dp, 1.16187995611759587e+00_dp, 1.77553947438556503e+00_dp, 2.80338937361828577e+00_dp, 4.99034689774381057e+00_dp] + aw%aw_erange_matrix(:, 12) = [1.28568716066204100e-04_dp, 7.03026514521875668e-04_dp, 1.85560664685786446e-03_dp, 3.85208057449708437e-03_dp, 7.21190652297153730e-03_dp,& + 1.28460330737252409e-02_dp, 2.22490411662515028e-02_dp, 3.78016757009908971e-02_dp, 6.32460841694079262e-02_dp, 1.04408351026837459e-01_dp, 1.70278412496789294e-01_dp,& + 2.74610981192654091e-01_dp, 4.38288395194931735e-01_dp, 6.92809118645061894e-01_dp, 1.08549282488148080e+00_dp, 1.68750781965786012e+00_dp, 2.60725900002492317e+00_dp,& + 4.01645618802980753e+00_dp, 6.21599941615518858e+00_dp, 9.89266388698867338e+00_dp, 3.32741224892216562e-04_dp, 8.34534629424527529e-04_dp, 1.51314890244545991e-03_dp,& + 2.56412204028950768e-03_dp, 4.30430865632256462e-03_dp, 7.20813936570132222e-03_dp, 1.19869142915110007e-02_dp, 1.97302600503207887e-02_dp, 3.21119534017258179e-02_dp,& + 5.16847784772300686e-02_dp, 8.23092470536804649e-02_dp, 1.29779454499307473e-01_dp, 2.02740721724053524e-01_dp, 3.14058639815314677e-01_dp, 4.82960697769841130e-01_dp,& + 7.38747791964979639e-01_dp, 1.12847197448742165e+00_dp, 1.73718758800898043e+00_dp, 2.76055445478163319e+00_dp, 4.94138714425316028e+00_dp] + aw%aw_erange_matrix(:, 13) = [1.06385133376617129e-04_dp, 5.83370449728654429e-04_dp, 1.54858333545919999e-03_dp, 3.24385777928466301e-03_dp, 6.14515163133302119e-03_dp,& + 1.10907193996734339e-02_dp, 1.94655108102521276e-02_dp, 3.34965919996977265e-02_dp, 5.67188754614086563e-02_dp, 9.46864375291209259e-02_dp, 1.56042379020865263e-01_dp,& + 2.54114990033732113e-01_dp, 4.09287211708037946e-01_dp, 6.52511637001359834e-01_dp, 1.03057187695187857e+00_dp, 1.61420249636376889e+00_dp, 2.51159646991932384e+00_dp,& + 3.89457106698527467e+00_dp, 6.06439084840805709e+00_dp, 9.70773966211605277e+00_dp, 2.75500745629308705e-04_dp, 6.94914441903353897e-04_dp, 1.27416915369170597e-03_dp,& + 2.19363072846082878e-03_dp, 3.74574197015587265e-03_dp, 6.37142538505014715e-03_dp, 1.07417435383839119e-02_dp, 1.78979789245490017e-02_dp, 2.94548268302540286e-02_dp,& + 4.78947831060808488e-02_dp, 7.69998423782822516e-02_dp, 1.22485294515095461e-01_dp, 1.92932600352046763e-01_dp, 3.01183266467369593e-01_dp, 4.66514755988375607e-01_dp,& + 7.18387752933783763e-01_dp, 1.10413579938484174e+00_dp, 1.70914727341012851e+00_dp, 2.72917918879560562e+00_dp, 4.90554472200116276e+00_dp] + aw%aw_erange_matrix(:, 14) = [9.11299266109850996e-05_dp, 5.00955114194532930e-04_dp, 1.33647988051104581e-03_dp, 2.82165743093389315e-03_dp, 5.39955123421062468e-03_dp,& + 9.85332451242546502e-03_dp, 1.74849063769687285e-02_dp, 3.04045333851281283e-02_dp, 5.19884132146004527e-02_dp, 8.75805986006403664e-02_dp, 1.45554197257650425e-01_dp,& + 2.38902835711941874e-01_dp, 3.87614188439427632e-01_dp, 6.22204747423747206e-01_dp, 9.89024982295867328e-01_dp, 1.55845308345162348e+00_dp, 2.43850005542893200e+00_dp,& + 3.80105900780219708e+00_dp, 5.94768748398844416e+00_dp, 9.56502795220571223e+00_dp, 2.36123336764438414e-04_dp, 5.98562968184080508e-04_dp, 1.10826359627376253e-03_dp,& + 1.93399216337780569e-03_dp, 3.34948608200666496e-03_dp, 5.77034764998995628e-03_dp, 9.83706815425649042e-03_dp, 1.65534576760454771e-02_dp, 2.74876882326032593e-02_dp,& + 4.50662590827335952e-02_dp, 7.30078523507230459e-02_dp, 1.16963153229053499e-01_dp, 1.85459608227162981e-01_dp, 2.91315098444254794e-01_dp, 4.53841813215039913e-01_dp,& + 7.02623714126374366e-01_dp, 1.08521855803019984e+00_dp, 1.68728817043916113e+00_dp, 2.70468505928098901e+00_dp, 4.87757399779168743e+00_dp] + aw%aw_erange_matrix(:, 15) = [7.99513211818079095e-05_dp, 4.40480100273793647e-04_dp, 1.18043287221358643e-03_dp, 2.50972866667220542e-03_dp, 4.84536770340586800e-03_dp,& + 8.92681999663503915e-03_dp, 1.59901889293979985e-02_dp, 2.80527231464049974e-02_dp, 4.83635179114337843e-02_dp, 8.20972791919212935e-02_dp, 1.37407975722330933e-01_dp,& + 2.27015822801634820e-01_dp, 3.70583378740419300e-01_dp, 5.98265757020446043e-01_dp, 9.56051274598360368e-01_dp, 1.51401624986978511e+00_dp, 2.38001241056539525e+00_dp,& + 3.72598892795090819e+00_dp, 5.85374707237895908e+00_dp, 9.44991526480561461e+00_dp, 2.07259523146821357e-04_dp, 5.27743168436076507e-04_dp, 9.85682497105203016e-04_dp,& + 1.74056798836079831e-03_dp, 3.05118589870811367e-03_dp, 5.31311515597368816e-03_dp, 9.14249557319238466e-03_dp, 1.55127983671289656e-02_dp, 2.59540846387241245e-02_dp,& + 4.28465752176474188e-02_dp, 6.98561346118610760e-02_dp, 1.12578862868986593e-01_dp, 1.79495499922559476e-01_dp, 2.83401465126374263e-01_dp, 4.43634265712469833e-01_dp,& + 6.89877063657090339e-01_dp, 1.06987289829179089e+00_dp, 1.66951450142050417e+00_dp, 2.68474521792867948e+00_dp, 4.85481079054310882e+00_dp] + aw%aw_erange_matrix(:, 16) = [7.13831975957801421e-05_dp, 3.94070557414630566e-04_dp, 1.06039838107656217e-03_dp, 2.26887735894547218e-03_dp, 4.41516125917593150e-03_dp,& + 8.20292284367789629e-03_dp, 1.48143307208321289e-02_dp, 2.61901631484158237e-02_dp, 4.54744113356478005e-02_dp, 7.77009627515651835e-02_dp, 1.30840559929286476e-01_dp,& + 2.17383566833786041e-01_dp, 3.56717684228294363e-01_dp, 5.78690630181714849e-01_dp, 9.28980394500882545e-01_dp, 1.47740187212987562e+00_dp, 2.33166526247446670e+00_dp,& + 3.66376254665971857e+00_dp, 5.77570286165077995e+00_dp, 9.35411658107688737e+00_dp, 1.85129909885371226e-04_dp, 4.73313642877459817e-04_dp, 8.91030234594590402e-04_dp,& + 1.59011031429565509e-03_dp, 2.81702158923678942e-03_dp, 4.95098003577831326e-03_dp, 8.58806747962608148e-03_dp, 1.46764266654769941e-02_dp, 2.47140097130862518e-02_dp,& + 4.10417708233977371e-02_dp, 6.72804167578404944e-02_dp, 1.08978898750293735e-01_dp, 1.74576875600901571e-01_dp, 2.76848637903514494e-01_dp, 4.35150781120790531e-01_dp,& + 6.79248731263868200e-01_dp, 1.05704272734518123e+00_dp, 1.65462493376700914e+00_dp, 2.66802416177299628e+00_dp, 4.83572672360228850e+00_dp] + aw%aw_erange_matrix(:, 17) = [6.45919046172234337e-05_dp, 3.57244359004111266e-04_dp, 9.64947091415230274e-04_dp, 2.07669093975910773e-03_dp, 4.07020796657402498e-03_dp,& + 7.61911830524246176e-03_dp, 1.38602950606173652e-02_dp, 2.46700717584350873e-02_dp, 4.31034385684379573e-02_dp, 7.40744584914696386e-02_dp, 1.25397230109973362e-01_dp,& + 2.09364698321958947e-01_dp, 3.45127358310070076e-01_dp, 5.62266257195702113e-01_dp, 9.06188494647871989e-01_dp, 1.44647873670279070e+00_dp, 2.29071990594395736e+00_dp,& + 3.61093746195846910e+00_dp, 5.70932120129661769e+00_dp, 9.27251323213914169e+00_dp, 1.67585006389789945e-04_dp, 4.30065142823307851e-04_dp, 8.15501787443688214e-04_dp,& + 1.46924809715015601e-03_dp, 2.62738699777469598e-03_dp, 4.65542668219270928e-03_dp, 8.13250988854261406e-03_dp, 1.39851462776275932e-02_dp, 2.36836605335067965e-02_dp,& + 3.95350223678160792e-02_dp, 6.51206049207332244e-02_dp, 1.05947940902738805e-01_dp, 1.70420066107486362e-01_dp, 2.71291456476858317e-01_dp, 4.27933455588147660e-01_dp,& + 6.70181271059925754e-01_dp, 1.04607118754885398e+00_dp, 1.64187059552129311e+00_dp, 2.65368847252926798e+00_dp, 4.81936838224020203e+00_dp] + aw%aw_erange_matrix(:, 18) = [5.90671705438591002e-05_dp, 3.27255606259535938e-04_dp, 8.87065468156453198e-04_dp, 1.91938066912922299e-03_dp, 3.78659468047330564e-03_dp,& + 7.13661315013889956e-03_dp, 1.30675308560924963e-02_dp, 2.34003282960270620e-02_dp, 4.11132236983706573e-02_dp, 7.10164792782264631e-02_dp, 1.20787940407201908e-01_dp,& + 2.02548136693446179e-01_dp, 3.35239539268372189e-01_dp, 5.48208274009858720e-01_dp, 8.86621522655313465e-01_dp, 1.41985849853084023e+00_dp, 2.25538654350318835e+00_dp,& + 3.56525777952575273e+00_dp, 5.65182136139268199e+00_dp, 9.20173727079627390e+00_dp, 1.53308858399679005e-04_dp, 3.94802873973349074e-04_dp, 7.53679480203142270e-04_dp,& + 1.36971213154538172e-03_dp, 2.47007058014086459e-03_dp, 4.40855407450766335e-03_dp, 7.74972129914588363e-03_dp, 1.34012766381315894e-02_dp, 2.28093810679012438e-02_dp,& + 3.82511320233823726e-02_dp, 6.32731384704180860e-02_dp, 1.03346060178322777e-01_dp, 1.66839925784102922e-01_dp, 2.66490624991893299e-01_dp, 4.21681106402822914e-01_dp,& + 6.62306829712637768e-01_dp, 1.03652366240097460e+00_dp, 1.63075503979098335e+00_dp, 2.64118514241116120e+00_dp, 4.80510334732246758e+00_dp] + aw%aw_erange_matrix(:, 19) = [3.28224484567984215e-05_dp, 1.84280197576634352e-04_dp, 5.13129793251420252e-04_dp, 1.15533955303439673e-03_dp, 2.38715227416747520e-03_dp,& + 4.71232336588018729e-03_dp, 9.01068360323859820e-03_dp, 1.67877454786610168e-02_dp, 3.05777352644954897e-02_dp, 5.45820241665686198e-02_dp, 9.56682633955002193e-02_dp,& + 1.64917942299495190e-01_dp, 2.80002569262169099e-01_dp, 4.68811468855826918e-01_dp, 7.74997699140769214e-01_dp, 1.26661171850926046e+00_dp, 2.05033163283972186e+00_dp,& + 3.29831462211391546e+00_dp, 5.31390007833082478e+00_dp, 8.78400792567013156e+00_dp, 8.54353690799433902e-05_dp, 2.25944182794824420e-04_dp, 4.53440750018906298e-04_dp,& + 8.75662275353216932e-04_dp, 1.66953305618841390e-03_dp, 3.12340547841677462e-03_dp, 5.71770714816871497e-03_dp, 1.02484381286729095e-02_dp, 1.80155532583461571e-02_dp,& + 3.11124892427445850e-02_dp, 5.28682739024428569e-02_dp, 8.85173770573338542e-02_dp, 1.46210202743524420e-01_dp, 2.38544300502429640e-01_dp, 3.84945819661920263e-01_dp,& + 6.15657996825351939e-01_dp, 9.79571892515397891e-01_dp, 1.56411282476503422e+00_dp, 2.56602511289843704e+00_dp, 4.71939831326842363e+00_dp] + aw%aw_erange_matrix(:, 20) = [2.32962402161399536e-05_dp, 1.32055981092677323e-04_dp, 3.74839977969314763e-04_dp, 8.67018033095867083e-04_dp, 1.84480865155746280e-03_dp,& + 3.74520339779335545e-03_dp, 7.34592546659092009e-03_dp, 1.40019747000581871e-02_dp, 2.60313282678624226e-02_dp, 4.73329996204092801e-02_dp, 8.43648984201871011e-02_dp,& + 1.47673591218463379e-01_dp, 2.54264341878251476e-01_dp, 4.31247942064372725e-01_dp, 7.21449996818138595e-01_dp, 1.19217247906242885e+00_dp, 1.94962022268630952e+00_dp,& + 3.16596292239029875e+00_dp, 5.14506868844995147e+00_dp, 8.57409525716754750e+00_dp, 6.07636192166222057e-05_dp, 1.63793630532315700e-04_dp, 3.40174856657600921e-04_dp,& + 6.82306032697698860e-04_dp, 1.34385222906203733e-03_dp, 2.58273566631901609e-03_dp, 4.83830666876542814e-03_dp, 8.85011586892991454e-03_dp, 1.58425745251531969e-02_dp,& + 2.78122580371543207e-02_dp, 4.79708046156028245e-02_dp, 8.14215630554797898e-02_dp, 1.36187506557822940e-01_dp, 2.24776382379014678e-01_dp, 3.66617269529460332e-01_dp,& + 5.92120682929402009e-01_dp, 9.50565358380333736e-01_dp, 1.52993546398228419e+00_dp, 2.52733955994408444e+00_dp, 4.67531311945309902e+00_dp] + aw%aw_erange_matrix(:, 21) = [1.82768686384135133e-05_dp, 1.04417347919080671e-04_dp, 3.01000951462268346e-04_dp, 7.10847810668938790e-04_dp, 1.54571361298362132e-03_dp,& + 3.20181862357970517e-03_dp, 6.39397242950541685e-03_dp, 1.23832469483872113e-02_dp, 2.33510009743427664e-02_dp, 4.30030599635740085e-02_dp, 7.75327408507942573e-02_dp,& + 1.37137607870212203e-01_dp, 2.38383717160715658e-01_dp, 4.07862967786620456e-01_dp, 6.87842494503462798e-01_dp, 1.14511059809369953e+00_dp, 1.88553654502488044e+00_dp,& + 3.08128096542072605e+00_dp, 5.03656339350511306e+00_dp, 8.43873603575548970e+00_dp, 4.77510514538043561e-05_dp, 1.30725348199526632e-04_dp, 2.78839678510383097e-04_dp,& + 5.74965922084611988e-04_dp, 1.15864133134080285e-03_dp, 2.26903071507058825e-03_dp, 4.31941617512579795e-03_dp, 8.01292114296655450e-03_dp, 1.45246256387368058e-02_dp,& + 2.57871124684656526e-02_dp, 4.49334652585602345e-02_dp, 7.69779065263630213e-02_dp, 1.29854768623762662e-01_dp, 2.16005958323979730e-01_dp, 3.54854744034257708e-01_dp,& + 5.76915783269319360e-01_dp, 9.31723856159322739e-01_dp, 1.50764439582344267e+00_dp, 2.50205346399103279e+00_dp, 4.64650701658826915e+00_dp] + aw%aw_erange_matrix(:, 22) = [1.51473404015659037e-05_dp, 8.71243659234028809e-05_dp, 2.54468973576208357e-04_dp, 6.11299999793072594e-04_dp, 1.35240591857200892e-03_dp,& + 2.84571706861578774e-03_dp, 5.76205885506093137e-03_dp, 1.12962211654832664e-02_dp, 2.15323161898956957e-02_dp, 4.00375633330651501e-02_dp, 7.28140302835723480e-02_dp,& + 1.29805206598339162e-01_dp, 2.27255100152298689e-01_dp, 3.91372245954157760e-01_dp, 6.64007613693874399e-01_dp, 1.11156238321900980e+00_dp, 1.83964746537561008e+00_dp,& + 3.02040766915205072e+00_dp, 4.95832144405293640e+00_dp, 8.34090257682230707e+00_dp, 3.96314252090897067e-05_dp, 1.09946771533849565e-04_dp, 2.39749996962043585e-04_dp,& + 5.05239856466603251e-04_dp, 1.03620411711276652e-03_dp, 2.05866032990039511e-03_dp, 3.96726052268024654e-03_dp, 7.43881961236985724e-03_dp, 1.36125006461492604e-02_dp,& + 2.43739175756457205e-02_dp, 4.27979881349007454e-02_dp, 7.38322409424063963e-02_dp, 1.25343663588691395e-01_dp, 2.09722480931934130e-01_dp, 3.46383680564075980e-01_dp,& + 5.65915026807195964e-01_dp, 9.18039164611651803e-01_dp, 1.49140766131358671e+00_dp, 2.48360686525505825e+00_dp, 4.62549692830303449e+00_dp] + aw%aw_erange_matrix(:, 23) = [1.29964471150150904e-05_dp, 7.52038805186812202e-05_dp, 2.22196529687256864e-04_dp, 5.41590274135701007e-04_dp, 1.21550187536022020e-03_dp,& + 2.59071146873320968e-03_dp, 5.30494890727680173e-03_dp, 1.05027659096567447e-02_dp, 2.01940756625821997e-02_dp, 3.78396999976663775e-02_dp, 6.92940663971308296e-02_dp,& + 1.24303453575809700e-01_dp, 2.18860535391796729e-01_dp, 3.78872950063046332e-01_dp, 6.45862912815095225e-01_dp, 1.08592321681505455e+00_dp, 1.80445573105089041e+00_dp,& + 2.97358732052783425e+00_dp, 4.89799912289900607e+00_dp, 8.26534218773699791e+00_dp, 3.40471852492794184e-05_dp, 9.55719144498884892e-05_dp, 2.12380450750809476e-04_dp,& + 4.55655798037782084e-04_dp, 9.47931731475714148e-04_dp, 1.90530071147553015e-03_dp, 3.70815234948269814e-03_dp, 7.01300923792264747e-03_dp, 1.29311616612344006e-02_dp,& + 2.33115500084998054e-02_dp, 4.11833744572942667e-02_dp, 7.14413307639191336e-02_dp, 1.21898463543825414e-01_dp, 2.04902638957595640e-01_dp, 3.39859968590963457e-01_dp,& + 5.57413284554014177e-01_dp, 9.07431857378405593e-01_dp, 1.47879445892678762e+00_dp, 2.46926002025859992e+00_dp, 4.60915876949644421e+00_dp] + aw%aw_erange_matrix(:, 24) = [1.14207048273847982e-05_dp, 6.64484130614495310e-05_dp, 1.98364705632591312e-04_dp, 4.89680342568533803e-04_dp, 1.11257515254348303e-03_dp,& + 2.39722037536997104e-03_dp, 4.95521165465335599e-03_dp, 9.89119282393999266e-03_dp, 1.91558185967471602e-02_dp, 3.61245234039200835e-02_dp, 6.65327103010643489e-02_dp,& + 1.19966975407711327e-01_dp, 2.12215600247272179e-01_dp, 3.68940412206329449e-01_dp, 6.31393682491580011e-01_dp, 1.06541330659025468e+00_dp, 1.77622627153034740e+00_dp,& + 2.93594113554789704e+00_dp, 4.84940422326652865e+00_dp, 8.20438542819059968e+00_dp, 2.99538235601905597e-05_dp, 8.49804556698071739e-05_dp, 1.92001219094591990e-04_dp,& + 4.18248947198593781e-04_dp, 8.80584218195854191e-04_dp, 1.78723479963482403e-03_dp, 3.50716773455697671e-03_dp, 6.68055972088156622e-03_dp, 1.23961398099230700e-02_dp,& + 2.24730180647289973e-02_dp, 3.99030113422094643e-02_dp, 6.95373455443270422e-02_dp, 1.19144298782168687e-01_dp, 2.01035969122660890e-01_dp, 3.34609664670065254e-01_dp,& + 5.50551680495186879e-01_dp, 8.98850509114371254e-01_dp, 1.46857223003089277e+00_dp, 2.45762167144899246e+00_dp, 4.59590654805552301e+00_dp] + aw%aw_erange_matrix(:, 25) = [1.02129853665488214e-05_dp, 5.97224033665720453e-05_dp, 1.79968001876572704e-04_dp, 4.49310761967231735e-04_dp, 1.03186306193965745e-03_dp,& + 2.24429055378175648e-03_dp, 4.67683405379132593e-03_dp, 9.40136451442429369e-03_dp, 1.83196550766199957e-02_dp, 3.47364191544349277e-02_dp, 6.42881061852892816e-02_dp,& + 1.16428075481103732e-01_dp, 2.06773452807062580e-01_dp, 3.60779453324731381e-01_dp, 6.19470494647045289e-01_dp, 1.04846815361171242e+00_dp, 1.75284955056996217e+00_dp,& + 2.90470529324109350e+00_dp, 4.80902024684955354e+00_dp, 8.15366880961822815e+00_dp, 2.68148886718955737e-05_dp, 7.68210992565900367e-05_dp, 1.76153395456738691e-04_dp,& + 3.88828307524828219e-04_dp, 8.27109072609790168e-04_dp, 1.69277491364309648e-03_dp, 3.34534816880062945e-03_dp, 6.41142722928096046e-03_dp, 1.19609238164291500e-02_dp,& + 2.17879658757671769e-02_dp, 3.88529268269094813e-02_dp, 6.79702850602889735e-02_dp, 1.16870209587740290e-01_dp, 1.97833926492451712e-01_dp, 3.30250262574636633e-01_dp,& + 5.44840978502778017e-01_dp, 8.91694374810249268e-01_dp, 1.46003514088497854e+00_dp, 2.44789415028531510e+00_dp, 4.58483112275295301e+00_dp] + aw%aw_erange_matrix(:, 26) = [8.47669796166132796e-06_dp, 5.00242837971973656e-05_dp, 1.53275574109323258e-04_dp, 3.90182608568225638e-04_dp, 9.12420752458163536e-04_dp,& + 2.01578379024756416e-03_dp, 4.25730835582959020e-03_dp, 8.65759910626789746e-03_dp, 1.70415533953586391e-02_dp, 3.26021220288412600e-02_dp, 6.08186688565086689e-02_dp,& + 1.10932128458666804e-01_dp, 1.98285574595964298e-01_dp, 3.48001922484235227e-01_dp, 6.00737297535444026e-01_dp, 1.02176139285064571e+00_dp, 1.71590475217036720e+00_dp,& + 2.85522414136309743e+00_dp, 4.74492660635849450e+00_dp, 8.07306337224151704e+00_dp, 2.22992568351785837e-05_dp, 6.50136849135791761e-05_dp, 1.52942130635250624e-04_dp,& + 3.45130342825854480e-04_dp, 7.46765182067150022e-04_dp, 1.54955133592102182e-03_dp, 3.09811531544227498e-03_dp, 5.99752381829290158e-03_dp, 1.12877049899231616e-02_dp,& + 2.07227873132566805e-02_dp, 3.72125394571043919e-02_dp, 6.55119435253443683e-02_dp, 1.13288963572479862e-01_dp, 1.92773634125936455e-01_dp, 3.23339065790839486e-01_dp,& + 5.35761993096250388e-01_dp, 8.80290439328862417e-01_dp, 1.44640642561162580e+00_dp, 2.43235010495084447e+00_dp, 4.56713502379775083e+00_dp] + aw%aw_erange_matrix(:, 27) = [4.77162217975052653e-06_dp, 2.91668856331809356e-05_dp, 9.48821379855366293e-05_dp, 2.57598292613655199e-04_dp, 6.37572758202925127e-04_dp,& + 1.47742295887662387e-03_dp, 3.24827632234858232e-03_dp, 6.83617387254335015e-03_dp, 1.38616547779678596e-02_dp, 2.72171464660654339e-02_dp, 5.19550945129050798e-02_dp,& + 9.67332163320293176e-02_dp, 1.76134574373753433e-01_dp, 3.14350903325736952e-01_dp, 5.50994272272958718e-01_dp, 9.50322068117752772e-01_dp, 1.61643700300510540e+00_dp,& + 2.72126761065023093e+00_dp, 4.57063870580321119e+00_dp, 7.85315353792608306e+00_dp, 1.26470920648656757e-05_dp, 3.93709424700992549e-05_dp, 1.00885940425964106e-04_dp,& + 2.43669035312139701e-04_dp, 5.55019876746663788e-04_dp, 1.20021707946449396e-03_dp, 2.48403177561761770e-03_dp, 4.95320350081516082e-03_dp, 9.56550428124965796e-03_dp,& + 1.79641999719573932e-02_dp, 3.29171066132178045e-02_dp, 5.90100020341800327e-02_dp, 1.03730646694039405e-01_dp, 1.79155565358709440e-01_dp, 3.04600128154180194e-01_dp,& + 5.10981306992512874e-01_dp, 8.48989087313390955e-01_dp, 1.40884114975024644e+00_dp, 2.38940742183020793e+00_dp, 4.51825790067075239e+00_dp] + aw%aw_erange_matrix(:, 28) = [3.42200124612533428e-06_dp, 2.14795977800482488e-05_dp, 7.27931060367611917e-05_dp, 2.05652828701512050e-04_dp, 5.26124616740868763e-04_dp,& + 1.25246741430834582e-03_dp, 2.81569672700486551e-03_dp, 6.03795545760961710e-03_dp, 1.24413051501760675e-02_dp, 2.47714301236555100e-02_dp, 4.78697619177791758e-02_dp,& + 9.01024065490877851e-02_dp, 1.65668103195190375e-01_dp, 2.98282223223030774e-01_dp, 5.27015875188172278e-01_dp, 9.15593507937763729e-01_dp, 1.56772415593837122e+00_dp,& + 2.65525119808757593e+00_dp, 4.48431225145893819e+00_dp, 7.74382455050710927e+00_dp, 9.12267553996344091e-06_dp, 2.97782938235843919e-05_dp, 8.04762008480940360e-05_dp,& + 2.02054552088428699e-04_dp, 4.73662260510720275e-04_dp, 1.04800747447037716e-03_dp, 2.21052298276957397e-03_dp, 4.47925090915589005e-03_dp, 8.77100834263967732e-03_dp,& + 1.66730757520466601e-02_dp, 3.08806180820769202e-02_dp, 5.58915044031746411e-02_dp, 9.90980169561825330e-02_dp, 1.72492449290110456e-01_dp, 2.95352774830862530e-01_dp,& + 4.98659663798053099e-01_dp, 8.33325756198420309e-01_dp, 1.38995327107408162e+00_dp, 2.36775916083012872e+00_dp, 4.49362344166366778e+00_dp] + aw%aw_erange_matrix(:, 29) = [2.70857528023669478e-06_dp, 1.73824675975106526e-05_dp, 6.08007017131558374e-05_dp, 1.76793729684337786e-04_dp, 4.62880220912142407e-04_dp,& + 1.12249782389384407e-03_dp, 2.56197738480458100e-03_dp, 5.56375798474603462e-03_dp, 1.15881961261663814e-02_dp, 2.32883361269934745e-02_dp, 4.53714740249268472e-02_dp,& + 8.60171390199267055e-02_dp, 1.59176614013866874e-01_dp, 2.88256566568690420e-01_dp, 5.11975058103568248e-01_dp, 8.93705673791643340e-01_dp, 1.53689447832666781e+00_dp,& + 2.61332238621594604e+00_dp, 4.42932837952966896e+00_dp, 7.67404440659009524e+00_dp, 7.25671600966090790e-06_dp, 2.46108812587894022e-05_dp, 6.91283002216229860e-05_dp,& + 1.78280345108654118e-04_dp, 4.26255177147598569e-04_dp, 9.57935241483460109e-04_dp, 2.04659436769854316e-03_dp, 4.19208858133998229e-03_dp, 8.28508624517085290e-03_dp,& + 1.58768608867642276e-02_dp, 2.96155024326393256e-02_dp, 5.39414460482286126e-02_dp, 9.61839308156842016e-02_dp, 1.68278613421956519e-01_dp, 2.89476370736281186e-01_dp,& + 4.90796176703813092e-01_dp, 8.23293620189284980e-01_dp, 1.37782304675651202e+00_dp, 2.35383537187622638e+00_dp, 4.47778069418177083e+00_dp] + aw%aw_erange_matrix(:, 30) = [2.26251445525014870e-06_dp, 1.48039880636135852e-05_dp, 5.31416128088749591e-05_dp, 1.58040646840163678e-04_dp, 4.21147625899582134e-04_dp,& + 1.03563677296014656e-03_dp, 2.39060962537256377e-03_dp, 5.24060798095646665e-03_dp, 1.10023814471914491e-02_dp, 2.22631671738785647e-02_dp, 4.36345263985256498e-02_dp,& + 8.31622337480630441e-02_dp, 1.54619409838966410e-01_dp, 2.81189489616427979e-01_dp, 5.01334015720054205e-01_dp, 8.78170141334107202e-01_dp, 1.51494988258760133e+00_dp,& + 2.58340536033461099e+00_dp, 4.39002046838892390e+00_dp, 7.62408789263364106e+00_dp, 6.08870912420167293e-06_dp, 2.13307424187180562e-05_dp, 6.17488367021811645e-05_dp,& + 1.62519357537921707e-04_dp, 3.94389143487223006e-04_dp, 8.96733927318684983e-04_dp, 1.93421640753366165e-03_dp, 3.99374279098910039e-03_dp, 7.94726547986469162e-03_dp,& + 1.53201567889741652e-02_dp, 2.87264724416089259e-02_dp, 5.25648940004549425e-02_dp, 9.41185062368712216e-02_dp, 1.65281005493465305e-01_dp, 2.85282262721775703e-01_dp,& + 4.85167472736483585e-01_dp, 8.16094915370970453e-01_dp, 1.36910268768840915e+00_dp, 2.34381536801679990e+00_dp, 4.46638053432672422e+00_dp] + aw%aw_erange_matrix(:, 31) = [1.95520309160147283e-06_dp, 1.30177455610905032e-05_dp, 4.77699277056753375e-05_dp, 1.44704490268162631e-04_dp, 3.91112695871576065e-04_dp,& + 9.72507920670827395e-04_dp, 2.26505403621023388e-03_dp, 5.00223926417243947e-03_dp, 1.05677607556923341e-02_dp, 2.14987830405207782e-02_dp, 4.23337650579894906e-02_dp,& + 8.10160083972915057e-02_dp, 1.51181699507279416e-01_dp, 2.75842138921684243e-01_dp, 4.93260368570506924e-01_dp, 8.66354247590333748e-01_dp, 1.49822391705281710e+00_dp,& + 2.56056177053762957e+00_dp, 4.35996302045826134e+00_dp, 7.58584741797931628e+00_dp, 5.28329779560503016e-06_dp, 1.90417363895934812e-05_dp, 5.64974872526313138e-05_dp,& + 1.51136234246477072e-04_dp, 3.71130443441160750e-04_dp, 8.51695348297861333e-04_dp, 1.85095701759959981e-03_dp, 3.84595112808428473e-03_dp, 7.69430931514070420e-03_dp,& + 1.49015115640716844e-02_dp, 2.80553763496916748e-02_dp, 5.15222643888510815e-02_dp, 9.25493475814019861e-02_dp, 1.62997391612473730e-01_dp, 2.82079259084697609e-01_dp,& + 4.80859508026839078e-01_dp, 8.10575201442163107e-01_dp, 1.36240694358376646e+00_dp, 2.33611580283512099e+00_dp, 4.45762085471925396e+00_dp] + aw%aw_erange_matrix(:, 32) = [1.72960139273996152e-06_dp, 1.17001313607044589e-05_dp, 4.37650399987639228e-05_dp, 1.34646135657629157e-04_dp, 3.68237981352100647e-04_dp,& + 9.24047534313781802e-04_dp, 2.16804637027645259e-03_dp, 4.81707060286444468e-03_dp, 1.02285848708239310e-02_dp, 2.08998908680933203e-02_dp, 4.13110880916842740e-02_dp,& + 7.93234571129355220e-02_dp, 1.48463301946358234e-01_dp, 2.71603440324783507e-01_dp, 4.86846776771414413e-01_dp, 8.56949848514978574e-01_dp, 1.48488918635942313e+00_dp,& + 2.54232388180733038e+00_dp, 4.33593842613987768e+00_dp, 7.55525676106186950e+00_dp, 4.69160847264410453e-06_dp, 1.73423940337633487e-05_dp, 5.25344729271504530e-05_dp,& + 1.42442614305894703e-04_dp, 3.53216246020351498e-04_dp, 8.16776990505050119e-04_dp, 1.78605723081466314e-03_dp, 3.73022452802260294e-03_dp, 7.49545986497960476e-03_dp,& + 1.45712907599660872e-02_dp, 2.75244331035289849e-02_dp, 5.06951675615561689e-02_dp, 9.13015702641552934e-02_dp, 1.61177550862612262e-01_dp, 2.79521774387272437e-01_dp,& + 4.77413832677281047e-01_dp, 8.06153910734494272e-01_dp, 1.35703777400223546e+00_dp, 2.32993793434914931e+00_dp, 4.45059264173135372e+00_dp] + aw%aw_erange_matrix(:, 33) = [1.41886137796995782e-06_dp, 9.87436540219261310e-06_dp, 3.81420863321894053e-05_dp, 1.20328937033829805e-04_dp, 3.35306348287066293e-04_dp,& + 8.53643157287757213e-04_dp, 2.02606093436642374e-03_dp, 4.54436729619164034e-03_dp, 9.72644390103706222e-03_dp, 2.00092321896778690e-02_dp, 3.97841823036489475e-02_dp,& + 7.67876127175006890e-02_dp, 1.44377938952077817e-01_dp, 2.65215781458406519e-01_dp, 4.77157897649237217e-01_dp, 8.42711908654622754e-01_dp, 1.46466244711069460e+00_dp,& + 2.51461522969896301e+00_dp, 4.29939105591348802e+00_dp, 7.50867691488572575e+00_dp, 3.87596278284403415e-06_dp, 1.49686541796921346e-05_dp, 4.68892269201415766e-05_dp,& + 1.29887348425810148e-04_dp, 3.27092391898948858e-04_dp, 7.65470839571249194e-04_dp, 1.69010905179960060e-03_dp, 3.55824376587745303e-03_dp, 7.19863210358792378e-03_dp,& + 1.40764462054979219e-02_dp, 2.67260753852816696e-02_dp, 4.94477050531962614e-02_dp, 8.94144794385312719e-02_dp, 1.58418528983117257e-01_dp, 2.75635868471146572e-01_dp,& + 4.72168173179626172e-01_dp, 7.99411892474264363e-01_dp, 1.34884014613905223e+00_dp, 2.32049905986289229e+00_dp, 4.43985498462144701e+00_dp] + aw%aw_erange_matrix(:, 34) = [1.30682076215574168e-06_dp, 9.21230103419385707e-06_dp, 3.60777820506542435e-05_dp, 1.15007390574968328e-04_dp, 3.22942749282655722e-04_dp,& + 8.26999800237385391e-04_dp, 1.97198120105341245e-03_dp, 4.43994262135867599e-03_dp, 9.53329117896053665e-03_dp, 1.96653009055034987e-02_dp, 3.91925682314573712e-02_dp,& + 7.58021570974209136e-02_dp, 1.42786148248512379e-01_dp, 2.62721115240734437e-01_dp, 4.73366064322675417e-01_dp, 8.37129449336611819e-01_dp, 1.45671906055837219e+00_dp,& + 2.50371868274963472e+00_dp, 4.28500293152441092e+00_dp, 7.49032450783281689e+00_dp, 3.58166740544859434e-06_dp, 1.41012624824627562e-05_dp, 4.47894722858063098e-05_dp,& + 1.25160938055950030e-04_dp, 3.17174709330518730e-04_dp, 7.45865050527678465e-04_dp, 1.65324808989842547e-03_dp, 3.49187701447795399e-03_dp, 7.08364872000395891e-03_dp,& + 1.38841187666644134e-02_dp, 2.64148762682075572e-02_dp, 4.89601819209699238e-02_dp, 8.86752668909496500e-02_dp, 1.57335503252764047e-01_dp, 2.74107634843242409e-01_dp,& + 4.70101764244850173e-01_dp, 7.96752312857495482e-01_dp, 1.34560294170146966e+00_dp, 2.31676949685429490e+00_dp, 4.43561236801076575e+00_dp] + aw%aw_erange_matrix(:, 35) = [7.71991367601195506e-07_dp, 6.01188017486886296e-06_dp, 2.58331150414066731e-05_dp, 8.79343948397957349e-05_dp, 2.58798759078993318e-04_dp,& + 6.86622104597263264e-04_dp, 1.68348045801247907e-03_dp, 3.87710431958284253e-03_dp, 8.48313765549411902e-03_dp, 1.77813926363193896e-02_dp, 3.59308996111747034e-02_dp,& + 7.03381717934871697e-02_dp, 1.33915686402270723e-01_dp, 2.48756796209642445e-01_dp, 4.52055656622306401e-01_dp, 8.05644178219993679e-01_dp, 1.41177905572475915e+00_dp,& + 2.44190912873904908e+00_dp, 4.20321643292941616e+00_dp, 7.38584390670966684e+00_dp, 2.17516527710297515e-06_dp, 9.83686937874478960e-06_dp, 3.40911794807122775e-05_dp,& + 1.00516175832159038e-04_dp, 2.64611812117782411e-04_dp, 6.40634437941980267e-04_dp, 1.45335802417366814e-03_dp, 3.12886949168914236e-03_dp, 6.45007574789729140e-03_dp,& + 1.28175787260026396e-02_dp, 2.46794247572051199e-02_dp, 4.62278443048538337e-02_dp, 8.45138014752302991e-02_dp, 1.51214003421640153e-01_dp, 2.65438575788372044e-01_dp,& + 4.58342505053100036e-01_dp, 7.81576747787620318e-01_dp, 1.32709377942230344e+00_dp, 2.29542090956463429e+00_dp, 4.41132831206158560e+00_dp] + aw%aw_erange_matrix(:, 36) = [5.76735002793307808e-07_dp, 4.81796949814678273e-06_dp, 2.18483421872876011e-05_dp, 7.70173393749095747e-05_dp, 2.32217067617773254e-04_dp,& + 6.27214064392758990e-04_dp, 1.55933122602490491e-03_dp, 3.63157033812529315e-03_dp, 8.01975002563170940e-03_dp, 1.69419691855408096e-02_dp, 3.44652936060531184e-02_dp,& + 6.78648367359473981e-02_dp, 1.29874232623644670e-01_dp, 2.42357827527284242e-01_dp, 4.42240387974227989e-01_dp, 7.91076763029657348e-01_dp, 1.39090428178819203e+00_dp,& + 2.41310249516129938e+00_dp, 4.16499789079741589e+00_dp, 7.33692571660345116e+00_dp, 1.66095137224994890e-06_dp, 8.20074753469969660e-06_dp, 2.97676497989321825e-05_dp,& + 9.02363370065398159e-05_dp, 2.42198175651940829e-04_dp, 5.94996626056037070e-04_dp, 1.36547679821607312e-03_dp, 2.96745695023317713e-03_dp, 6.16563639522362070e-03_dp,& + 1.23347764774671582e-02_dp, 2.38881047565255543e-02_dp, 4.49739612649937420e-02_dp, 8.25931421941693417e-02_dp, 1.48374217827051180e-01_dp, 2.61398494781967083e-01_dp,& + 4.52840084356117167e-01_dp, 7.74451476612179168e-01_dp, 1.31838081518574168e+00_dp, 2.28535676109961017e+00_dp, 4.39988104041656669e+00_dp] + aw%aw_erange_matrix(:, 37) = [4.73886425613891435e-07_dp, 4.17970580864170017e-06_dp, 1.96623716565723957e-05_dp, 7.09049514450060440e-05_dp, 2.17110309698999125e-04_dp,& + 5.93067710371235650e-04_dp, 1.48733455024355546e-03_dp, 3.48814465718405879e-03_dp, 7.74742832481121156e-03_dp, 1.64461239878085849e-02_dp, 3.35957282494034823e-02_dp,& + 6.63917017136938514e-02_dp, 1.27458933211450770e-01_dp, 2.38522094193151818e-01_dp, 4.36341108323591909e-01_dp, 7.82300621989012179e-01_dp, 1.37830238440942998e+00_dp,& + 2.39568197291720386e+00_dp, 4.14185357093737938e+00_dp, 7.30727204549361353e+00_dp, 1.38993180594434485e-06_dp, 7.30994082205168018e-06_dp, 2.73439544949609298e-05_dp,& + 8.43748407830279597e-05_dp, 2.29265931027044855e-04_dp, 5.68425191544899631e-04_dp, 1.31393787419090916e-03_dp, 2.87222570368213378e-03_dp, 5.99696872720659104e-03_dp,& + 1.20472328507921500e-02_dp, 2.34150217578703822e-02_dp, 4.42218217302560376e-02_dp, 8.14375937677677270e-02_dp, 1.46661112136236865e-01_dp, 2.58955474937018260e-01_dp,& + 4.49505769567694891e-01_dp, 7.70126058061773699e-01_dp, 1.31308443450498591e+00_dp, 2.27923439428326180e+00_dp, 4.39291748104259039e+00_dp] + aw%aw_erange_matrix(:, 38) = [3.12168708718758378e-07_dp, 3.15509043854656020e-06_dp, 1.60396540039556192e-05_dp, 6.05345347901636982e-05_dp, 1.91046499902649901e-04_dp,& + 5.33409518772520698e-04_dp, 1.36030194508581252e-03_dp, 3.23305392937584934e-03_dp, 7.25986670485826487e-03_dp, 1.55533654998133344e-02_dp, 3.20225029785451004e-02_dp,& + 6.37152356941127068e-02_dp, 1.23054399695399289e-01_dp, 2.31504282444295856e-01_dp, 4.25516417063861396e-01_dp, 7.66155682919092751e-01_dp, 1.35506744495752551e+00_dp,& + 2.36350179853319853e+00_dp, 4.09903554897101507e+00_dp, 7.25235124629250461e+00_dp, 9.63437611266755152e-07_dp, 5.84573868356708477e-06_dp, 2.32262863906807196e-05_dp,& + 7.42268033517151106e-05_dp, 2.06579837360269531e-04_dp, 5.21343456951251210e-04_dp, 1.22188281591533582e-03_dp, 2.70100566659986366e-03_dp, 5.69202387249046534e-03_dp,& + 1.15248770221008552e-02_dp, 2.25520303961786774e-02_dp, 4.28447386130575286e-02_dp, 7.93150026366342964e-02_dp, 1.43505171794848924e-01_dp, 2.54443118346391550e-01_dp,& + 4.43332986627030412e-01_dp, 7.62102886337588492e-01_dp, 1.30324574547687333e+00_dp, 2.26785189738067405e+00_dp, 4.37997143688256863e+00_dp] + aw%aw_erange_matrix(:, 39) = [2.80580408279310689e-07_dp, 2.95049171159065096e-06_dp, 1.52945248324598467e-05_dp, 5.83575109507800420e-05_dp, 1.85496679406350597e-04_dp,& + 5.20572087731371934e-04_dp, 1.33274249195369592e-03_dp, 3.17734742663118618e-03_dp, 7.15281285816080775e-03_dp, 1.53564408426251769e-02_dp, 3.16741120106560844e-02_dp,& + 6.31205011915101227e-02_dp, 1.22072732313017143e-01_dp, 2.29936027072113913e-01_dp, 4.23091764893167077e-01_dp, 7.62531838111124793e-01_dp, 1.34984278928180279e+00_dp,& + 2.35625468033670904e+00_dp, 4.08938104591259144e+00_dp, 7.23995693521429562e+00_dp, 8.80031312565509921e-07_dp, 5.54661609202853559e-06_dp, 2.23609176671629847e-05_dp,& + 7.20599509266696783e-05_dp, 2.01682267113263946e-04_dp, 5.11094418303308790e-04_dp, 1.20171110412647811e-03_dp, 2.66328344812695808e-03_dp, 5.62453458732293469e-03_dp,& + 1.14088214568662284e-02_dp, 2.23596457931184399e-02_dp, 4.25368372706329823e-02_dp, 7.88391630738977944e-02_dp, 1.42796013385649651e-01_dp, 2.53427036209508516e-01_dp,& + 4.41940442033310288e-01_dp, 7.60290074913774427e-01_dp, 1.30102008571134586e+00_dp, 2.26527528542373968e+00_dp, 4.37704095531072479e+00_dp] + aw%aw_erange_matrix(:, 40) = [2.50037054543459451e-07_dp, 2.75065850253568672e-06_dp, 1.45580032538501094e-05_dp, 5.61886134141293647e-05_dp, 1.79937558126970633e-04_dp,& + 5.07661812572850549e-04_dp, 1.30494106638445761e-03_dp, 3.12101246683672406e-03_dp, 7.04432961318839871e-03_dp, 1.51565421457647235e-02_dp, 3.13199357226953551e-02_dp,& + 6.25151135010186682e-02_dp, 1.21072355633585996e-01_dp, 2.28336294921602012e-01_dp, 4.20616270923935887e-01_dp, 7.58829132331704792e-01_dp, 1.34450082520074798e+00_dp,& + 2.34884061013481915e+00_dp, 4.07949963320537279e+00_dp, 7.22726712269525429e+00_dp, 7.99319498651264064e-07_dp, 5.25167142347067190e-06_dp, 2.14984315244743870e-05_dp,& + 6.98872794461767599e-05_dp, 1.96751022559891727e-04_dp, 5.00742416654297745e-04_dp, 1.18128601236660593e-03_dp, 2.62500956852358778e-03_dp, 5.55594123795717914e-03_dp,& + 1.12906947598504191e-02_dp, 2.21635794060799952e-02_dp, 4.22226943193413917e-02_dp, 7.83531987853733763e-02_dp, 1.42071127423185201e-01_dp, 2.52387601399961081e-01_dp,& + 4.40514903391555690e-01_dp, 7.58433221310045091e-01_dp, 1.29873933283050214e+00_dp, 2.26263422505046297e+00_dp, 4.37403718786888618e+00_dp] + case(22) + aw%energy_range(:) = [300.0_dp, 4.00e+02_dp, 5.00e+02_dp, 6.00e+02_dp, 7.00e+02_dp, 8.00e+02_dp,& + 9.00e+02_dp, 1.00e+03_dp, 2.00e+03_dp, 3.00e+03_dp, 4.00e+03_dp, 5.00e+03_dp, 6.00e+03_dp, 7.00e+03_dp,& + 8.00e+03_dp, 9.00e+03_dp, 1.00e+04_dp, 2.00e+04_dp, 3.00e+04_dp, 4.00e+04_dp, 5.00e+04_dp, 6.00e+04_dp,& + 7.00e+04_dp, 8.00e+04_dp, 9.00e+04_dp, 1.00e+05_dp, 2.00e+05_dp, 3.00e+05_dp, 4.00e+05_dp, 5.00e+05_dp,& + 6.00e+05_dp, 7.00e+05_dp, 9.00e+05_dp, 1.00e+06_dp, 2.00e+06_dp, 3.00e+06_dp, 4.00e+06_dp, 8.00e+06_dp,& + 1.00e+07_dp, 2.00e+07_dp] + aw%aw_erange_matrix(:, 1) = [1.03063435016644759e-03_dp, 5.49923156302779131e-03_dp, 1.38334982710772401e-02_dp, 2.65993900808953014e-02_dp, 4.47520782299964323e-02_dp,& + 6.98068249252753320e-02_dp, 1.04068428172679431e-01_dp, 1.50908691841177584e-01_dp, 2.15093367125171991e-01_dp, 3.03194997198029947e-01_dp, 4.24153351843991056e-01_dp,& + 5.90049532797139786e-01_dp, 8.17165186315059078e-01_dp, 1.12742439261148752e+00_dp, 1.55037456293163300e+00_dp, 2.12598214734496160e+00_dp, 2.90878150747867537e+00_dp,& + 3.97455237146797069e+00_dp, 5.43242203991751627e+00_dp, 7.45067149032892484e+00_dp, 1.03258659770943311e+01_dp, 1.47568560745174491e+01_dp, 2.65267482488290270e-03_dp,& + 6.33294964486558112e-03_dp, 1.04280009978064310e-02_dp, 1.52601415880402238e-02_dp, 2.12939160800245907e-02_dp, 2.91950765345169380e-02_dp, 3.98847415349164389e-02_dp,& + 5.45833554480214117e-02_dp, 7.48722343170218907e-02_dp, 1.02808246584750670e-01_dp, 1.41104546650114959e-01_dp, 1.93377742947796749e-01_dp, 2.64475170911950552e-01_dp,& + 3.60922373755072967e-01_dp, 4.91572352482467723e-01_dp, 6.68626420794888210e-01_dp, 9.09416270057912035e-01_dp, 1.23993354412780010e+00_dp, 1.70291215537995910e+00_dp,& + 2.37993376114488786e+00_dp, 3.47004010223380899e+00_dp, 5.75693742710772938e+00_dp] + aw%aw_erange_matrix(:, 2) = [8.10419979097196271e-04_dp, 4.32987536073072780e-03_dp, 1.09190123190569411e-02_dp, 2.10767323714248292e-02_dp, 3.56564928575854728e-02_dp,& + 5.60293239853698402e-02_dp, 8.42994325741821121e-02_dp, 1.23562539505384872e-01_dp, 1.78216928035805383e-01_dp, 2.54372027381100541e-01_dp, 3.60416024188965678e-01_dp,& + 5.07804615065230336e-01_dp, 7.12142098042157556e-01_dp, 9.94656213174979431e-01_dp, 1.38422766463101721e+00_dp, 1.92025211199259704e+00_dp, 2.65686848896032091e+00_dp,& + 3.66971228809781413e+00_dp, 5.06805126036200360e+00_dp, 7.02049940645484494e+00_dp, 9.82370441014125895e+00_dp, 1.41744350886459483e+01_dp, 2.08650546514541199e-03_dp,& + 4.99439128734344585e-03_dp, 8.26521775822509387e-03_dp, 1.21897481171777209e-02_dp, 1.71946451409541179e-02_dp, 2.38974280159545208e-02_dp, 3.31536769147314225e-02_dp,& + 4.60989289766344304e-02_dp, 6.42187687672978874e-02_dp, 8.94764759215750105e-02_dp, 1.24503013523261263e-01_dp, 1.72850667563437199e-01_dp, 2.39329044250052747e-01_dp,& + 3.30466087030480693e-01_dp, 4.55174709176111914e-01_dp, 6.25790536020832566e-01_dp, 8.59861415531779083e-01_dp, 1.18365880545163105e+00_dp, 1.64018693622440770e+00_dp,& + 2.31109169778968848e+00_dp, 3.39467469919791842e+00_dp, 5.66979714295159365e+00_dp] + aw%aw_erange_matrix(:, 3) = [6.72087511475085949e-04_dp, 3.59470541834720032e-03_dp, 9.08388199334733346e-03_dp, 1.75914399761403981e-02_dp, 2.98985789014098169e-02_dp,& + 4.72721062533955350e-02_dp, 7.16685007640940897e-02_dp, 1.05977773122365365e-01_dp, 1.54324000984959686e-01_dp, 2.22471673239026196e-01_dp, 3.18397403077191776e-01_dp,& + 4.53086738924418142e-01_dp, 6.41628569576203733e-01_dp, 9.04712386590862394e-01_dp, 1.27069340352189464e+00_dp, 1.77850551848010774e+00_dp, 2.48195346725823196e+00_dp,& + 3.45653086090150197e+00_dp, 4.81159232043718621e+00_dp, 6.71601195856402455e+00_dp, 9.46655499820343849e+00_dp, 1.37585735658933945e+01_dp, 1.73078487945685843e-03_dp,& + 4.15198025245653354e-03_dp, 6.89993499781980761e-03_dp, 1.02427683744667868e-02_dp, 1.45792067227524021e-02_dp, 2.04898999177307757e-02_dp, 2.87796793557555178e-02_dp,& + 4.05195853742843989e-02_dp, 5.71242252255813182e-02_dp, 8.04874394188137554e-02_dp, 1.13176946315939941e-01_dp, 1.58691959877238359e-01_dp, 2.21806152200116485e-01_dp,& + 3.09039947394767034e-01_dp, 4.29341930072118849e-01_dp, 5.95141807058347960e-01_dp, 8.24148898888018566e-01_dp, 1.14285360673369163e+00_dp, 1.59448465845054477e+00_dp,& + 2.26077227364725486e+00_dp, 3.33952020201084965e+00_dp, 5.60610623943482977e+00_dp] + aw%aw_erange_matrix(:, 4) = [5.76541798871297640e-04_dp, 3.08657044423512337e-03_dp, 7.81384360765192271e-03_dp, 1.51747461063655789e-02_dp, 2.58955551659944376e-02_dp,& + 4.11627624208335333e-02_dp, 6.28174199310700121e-02_dp, 9.35877186751942342e-02_dp, 1.37382081158007707e-01_dp, 1.99693938226721324e-01_dp, 2.88175538974597800e-01_dp,& + 4.13439277418744755e-01_dp, 5.90160840003604248e-01_dp, 8.38592901620649034e-01_dp, 1.18665791055058212e+00_dp, 1.67290216164992822e+00_dp, 2.35084112371337550e+00_dp,& + 3.29583373130628576e+00_dp, 4.61729059143473908e+00_dp, 6.48429700742921433e+00_dp, 9.19374382724353545e+00_dp, 1.34399421870293594e+01_dp, 1.48505007631269024e-03_dp,& + 3.56922047817995755e-03_dp, 5.95304204495843321e-03_dp, 8.88728889829167902e-03_dp, 1.27488075761912085e-02_dp, 1.80886261992498042e-02_dp, 2.56706382245647236e-02_dp,& + 3.65147544192421236e-02_dp, 5.19801105704495656e-02_dp, 7.39057929346307041e-02_dp, 1.04808005358250939e-01_dp, 1.48140573971585643e-01_dp, 2.08643744206222864e-01_dp,& + 2.92826030129254233e-01_dp, 4.09658325664241707e-01_dp, 5.71640483938300803e-01_dp, 7.96609091792657598e-01_dp, 1.11123351656180658e+00_dp, 1.55893392619487359e+00_dp,& + 2.22152972695046858e+00_dp, 3.29646371471532484e+00_dp, 5.55643282286291385e+00_dp] + aw%aw_erange_matrix(:, 5) = [5.06301374348889252e-04_dp, 2.71278761171135814e-03_dp, 6.87856017151506141e-03_dp, 1.33920607281986185e-02_dp, 2.29358966453171338e-02_dp,& + 3.66319603265295932e-02_dp, 5.62274858691858906e-02_dp, 8.43186005607075850e-02_dp, 1.24637851061089364e-01_dp, 1.82457621413614907e-01_dp, 2.65164755739631663e-01_dp,& + 3.83064351283859128e-01_dp, 5.50488938082404622e-01_dp, 7.87324820338791365e-01_dp, 1.12112723035988537e+00_dp, 1.59010865056180872e+00_dp, 2.24752958332770136e+00_dp,& + 3.16862246665946223e+00_dp, 4.46283451629254735e+00_dp, 6.29942745333522058e+00_dp, 8.97541645187698656e+00_dp, 1.31843080894929585e+01_dp, 1.30437265924520491e-03_dp,& + 3.14022289782075158e-03_dp, 5.25443251677055415e-03_dp, 7.88389833135097473e-03_dp, 1.13876295487330640e-02_dp, 1.62920447106396638e-02_dp, 2.33270389319482595e-02_dp,& + 3.34706882965253444e-02_dp, 4.80370967810812288e-02_dp, 6.88203632849411356e-02_dp, 9.82931931226290467e-02_dp, 1.39869704652046317e-01_dp, 1.98259233188294887e-01_dp,& + 2.79956408660673450e-01_dp, 3.93946342038355879e-01_dp, 5.52783442365534894e-01_dp, 7.74408322866289134e-01_dp, 1.08564112055017259e+00_dp, 1.53006862036254487e+00_dp,& + 2.18959872101262132e+00_dp, 3.26139926305611993e+00_dp, 5.51600983923928290e+00_dp] + aw%aw_erange_matrix(:, 6) = [4.52328997700439893e-04_dp, 2.42541940651550166e-03_dp, 6.15878752614964706e-03_dp, 1.20180968011167049e-02_dp, 2.06500938360118999e-02_dp,& + 3.31230995252827717e-02_dp, 5.11059061643640358e-02_dp, 7.70839435227944486e-02_dp, 1.14642450144781846e-01_dp, 1.68868576944605442e-01_dp, 2.46925992970210867e-01_dp,& + 3.58859892600339014e-01_dp, 5.18710476831461653e-01_dp, 7.46049362900396584e-01_dp, 1.06811334063430730e+00_dp, 1.52282190800534600e+00_dp, 2.16320763058890853e+00_dp,& + 3.06438439565946164e+00_dp, 4.33582313860725588e+00_dp, 6.14693617040813933e+00_dp, 8.79485826575428042e+00_dp, 1.29724514738667107e+01_dp, 1.16552367137457281e-03_dp,& + 2.81018559121979815e-03_dp, 4.71590909909307045e-03_dp, 7.10813611379747506e-03_dp, 1.03309111563121975e-02_dp, 1.48897071521879761e-02_dp, 2.14855604114208808e-02_dp,& + 3.10614767189596394e-02_dp, 4.48939487762343367e-02_dp, 6.47390130701064465e-02_dp, 9.30317245051570513e-02_dp, 1.33150898969299131e-01_dp, 1.89777281414116400e-01_dp,& + 2.69390808048385000e-01_dp, 3.80985576078253563e-01_dp, 5.37159738903385531e-01_dp, 7.55941220449633189e-01_dp, 1.06428001974542874e+00_dp, 1.50591026264861583e+00_dp,& + 2.16282550536570506e+00_dp, 3.23197665458178296e+00_dp, 5.48211161243339973e+00_dp] + aw%aw_erange_matrix(:, 7) = [4.09463955316871013e-04_dp, 2.19707903409960747e-03_dp, 5.58634642673214599e-03_dp, 1.09238913120095690e-02_dp, 1.88262894374492430e-02_dp,& + 3.03164034487479472e-02_dp, 4.69960276555681095e-02_dp, 7.12558970704633005e-02_dp, 1.06555323301802465e-01_dp, 1.57822973295951186e-01_dp, 2.32030915294803464e-01_dp,& + 3.39000042141027635e-01_dp, 4.92516686674662585e-01_dp, 7.11877254549920457e-01_dp, 1.02403778262496448e+00_dp, 1.46665684376382033e+00_dp, 2.09256091345909478e+00_dp,& + 2.97675266211982104e+00_dp, 4.22871778952681066e+00_dp, 6.01799933870749992e+00_dp, 8.64184581975755783e+00_dp, 1.27925889223381191e+01_dp, 1.05523685978521371e-03_dp,& + 2.54778311387449021e-03_dp, 4.28697639370369601e-03_dp, 6.48857830184702573e-03_dp, 9.48380540077316606e-03_dp, 1.37599740604215665e-02_dp, 1.99932026118929546e-02_dp,& + 2.90965281146010890e-02_dp, 4.23143327934254188e-02_dp, 6.13697396007867879e-02_dp, 8.86646198838301897e-02_dp, 1.27546015735097384e-01_dp, 1.82668158546487353e-01_dp,& + 2.60496080777035011e-01_dp, 3.70029323875206817e-01_dp, 5.23901932671672510e-01_dp, 7.40216597135249899e-01_dp, 1.04603708345079682e+00_dp, 1.48522947792240667e+00_dp,& + 2.13986938637024560e+00_dp, 3.20673200723689300e+00_dp, 5.45304183152807376e+00_dp] + aw%aw_erange_matrix(:, 8) = [3.74536513689004711e-04_dp, 2.01093874256135082e-03_dp, 5.11931403847935666e-03_dp, 1.00300616007581826e-02_dp, 1.73338888970692613e-02_dp,& + 2.80143887120274729e-02_dp, 4.36151707268864000e-02_dp, 6.64446546939080340e-02_dp, 9.98527469147449664e-02_dp, 1.48630270429679301e-01_dp, 2.19582093557942060e-01_dp,& + 3.22332445416299462e-01_dp, 4.70443843893328828e-01_dp, 6.82968577305359203e-01_dp, 9.86611911362780591e-01_dp, 1.41879734177426342e+00_dp, 2.03216328844818372e+00_dp,& + 2.90160786155497918e+00_dp, 4.13662510506400238e+00_dp, 5.90687310592433601e+00_dp, 8.50970804507050538e+00_dp, 1.26370160085061674e+01_dp, 9.65363281953964957e-04_dp,& + 2.33375825085292959e-03_dp, 3.93654790774339725e-03_dp, 5.98116160943248411e-03_dp, 8.78763358698389681e-03_dp, 1.28273133232257447e-02_dp, 1.87545059713052562e-02_dp,& + 2.74562383607578030e-02_dp, 4.01489971289221217e-02_dp, 5.85269615945393437e-02_dp, 8.49623494432137777e-02_dp, 1.22773325112377513e-01_dp, 1.76589448341746752e-01_dp,& + 2.52860956026609074e-01_dp, 3.60590351441223977e-01_dp, 5.12441666736709212e-01_dp, 7.26582638760519983e-01_dp, 1.03017804776413668e+00_dp, 1.46721338759692377e+00_dp,& + 2.11984251267978685e+00_dp, 3.18469537275312620e+00_dp, 5.42767735620232283e+00_dp] + aw%aw_erange_matrix(:, 9) = [2.07916311779228946e-04_dp, 1.12155761153414431e-03_dp, 2.88127758734212178e-03_dp, 5.72772751608632748e-03_dp, 1.01054123620637430e-02_dp,& + 1.67704053240377918e-02_dp, 2.69244859195186571e-02_dp, 4.23921907191599640e-02_dp, 6.58805569609397790e-02_dp, 1.01364968397741645e-01_dp, 1.54647961551893698e-01_dp,& + 2.34154774032586194e-01_dp, 3.52057663618104755e-01_dp, 5.25861379354838676e-01_dp, 7.80644517631268742e-01_dp, 1.15226216680138238e+00_dp, 1.69204597817615787e+00_dp,& + 2.47409994481944739e+00_dp, 3.60786218697460548e+00_dp, 5.26369191349306487e+00_dp, 7.73976068285175334e+00_dp, 1.17256205146613937e+01_dp, 5.36467715023434774e-04_dp,& + 1.30915525385516996e-03_dp, 2.24911227056142802e-03_dp, 3.51604898345418779e-03_dp, 5.36313626635470143e-03_dp, 8.16430335527195197e-03_dp, 1.24437195139966619e-02_dp,& + 1.89365370967848681e-02_dp, 2.86935938504337684e-02_dp, 4.32292742095023511e-02_dp, 6.47224871099811999e-02_dp, 9.62938700402608677e-02_dp, 1.42392698698953352e-01_dp,& + 2.09342291317476281e-01_dp, 3.06123801474388446e-01_dp, 4.45550520347793078e-01_dp, 6.46173012089851895e-01_dp, 9.35795948539298372e-01_dp, 1.35921039025971568e+00_dp,& + 1.99918186703179845e+00_dp, 3.05163758801036078e+00_dp, 5.27474337655333336e+00_dp] + aw%aw_erange_matrix(:, 10) = [1.47171034911424206e-04_dp, 7.96428323837147919e-04_dp, 2.05896664004827238e-03_dp, 4.13466706766572444e-03_dp, 7.39936201103626439e-03_dp,& + 1.24987458722376123e-02_dp, 2.04667409164244057e-02_dp, 3.28906135988269246e-02_dp, 5.21610594386609783e-02_dp, 8.18464632812529458e-02_dp, 1.27238497445389814e-01_dp,& + 1.96136667599684955e-01_dp, 2.99969379508689626e-01_dp, 4.55391258003387089e-01_dp, 6.86560914454681037e-01_dp, 1.02841510570747774e+00_dp, 1.53148292016649346e+00_dp,& + 2.26933300000655347e+00_dp, 3.35128770114537033e+00_dp, 4.94806350992282962e+00_dp, 7.35836582136724626e+00_dp, 1.12707865998321051e+01_dp, 3.80005538578459382e-04_dp,& + 9.33338699389642040e-04_dp, 1.62390227222127871e-03_dp, 2.58855365800755768e-03_dp, 4.04653947253978859e-03_dp, 6.32189653318652577e-03_dp, 9.87455765362500217e-03_dp,& + 1.53655063745645748e-02_dp, 2.37611806119816318e-02_dp, 3.64787245922180148e-02_dp, 5.55869015818103787e-02_dp, 8.40880209433377684e-02_dp, 1.26315924755279474e-01_dp,& + 1.88500889520422404e-01_dp, 2.79583276965536864e-01_dp, 4.12427769529583099e-01_dp, 6.05771789423283358e-01_dp, 8.87768717560709297e-01_dp, 1.30368560346876783e+00_dp,& + 1.93670672248412501e+00_dp, 2.98252430167097149e+00_dp, 5.19544853947986507e+00_dp] + aw%aw_erange_matrix(:, 11) = [1.15126529151328002e-04_dp, 6.24589880363876355e-04_dp, 1.62281269600238784e-03_dp, 3.28507237039356694e-03_dp, 5.94484779181019777e-03_dp,& + 1.01786277534976731e-02_dp, 1.69147981879632543e-02_dp, 2.75915369674121259e-02_dp, 4.43996514867282185e-02_dp, 7.06474284750039511e-02_dp, 1.11295571810849231e-01_dp,& + 1.73732377650324982e-01_dp, 2.68890258627387913e-01_dp, 4.12848323366157011e-01_dp, 6.29131981503187498e-01_dp, 9.52033554436149010e-01_dp, 1.43150419010024965e+00_dp,& + 2.14070865917387732e+00_dp, 3.18885412672288426e+00_dp, 4.74688455032915613e+00_dp, 7.11389711304269490e+00_dp, 1.09779502387492141e+01_dp, 2.97432196185447480e-04_dp,& + 7.34248784794580079e-04_dp, 1.29035202001703082e-03_dp, 2.08832471267370078e-03_dp, 3.32556285051951008e-03_dp, 5.29418675624997431e-03_dp, 8.41388498269535212e-03_dp,& + 1.32987566459194743e-02_dp, 2.08601018763598482e-02_dp, 3.24495525587031458e-02_dp, 5.00598444054498465e-02_dp, 7.66096125520880494e-02_dp, 1.16348407992360639e-01_dp,& + 1.75434489290140605e-01_dp, 2.62768980870982161e-01_dp, 3.91238667044871424e-01_dp, 5.79697167071256625e-01_dp, 8.56531677721931839e-01_dp, 1.26734410170348299e+00_dp,& + 1.89563508424130456e+00_dp, 2.93699604108030687e+00_dp, 5.14326427364680150e+00_dp] + aw%aw_erange_matrix(:, 12) = [9.51436729162034249e-05_dp, 5.17270965481586619e-04_dp, 1.34965095006098776e-03_dp, 2.75063616270900500e-03_dp, 5.02409835099588628e-03_dp,& + 8.69766774200029721e-03_dp, 1.46251882146344186e-02_dp, 2.41394814613502019e-02_dp, 3.92893016178502003e-02_dp, 6.31964222262876157e-02_dp, 1.00581828984489030e-01_dp,& + 1.58532956889468474e-01_dp, 2.47615612840909299e-01_dp, 3.83479011279471482e-01_dp, 5.89170141663977631e-01_dp, 8.98487922099273972e-01_dp, 1.36093326932247560e+00_dp,& + 2.04934678905197076e+00_dp, 3.07282922941290959e+00_dp, 4.60248581721676064e+00_dp, 6.93772132176544698e+00_dp, 1.07662537605035951e+01_dp, 2.45921947329527614e-04_dp,& + 6.09681575569105444e-04_dp, 1.08048217433343984e-03_dp, 1.77082905344642201e-03_dp, 2.86240028463815915e-03_dp, 4.62458201556379886e-03_dp, 7.44872589102107702e-03_dp,& + 1.19154813231642353e-02_dp, 1.88958529137463194e-02_dp, 2.96926738305596759e-02_dp, 4.62411918444786615e-02_dp, 7.13957799066545634e-02_dp, 1.09339911550742505e-01_dp,& + 1.66173373117442319e-01_dp, 2.50761842671747781e-01_dp, 3.76001769077057402e-01_dp, 5.60827824679953180e-01_dp, 8.33800292631723394e-01_dp, 1.24077761664007458e+00_dp,& + 1.86551413845751934e+00_dp, 2.90355631432598127e+00_dp, 5.10496090727687246e+00_dp] + aw%aw_erange_matrix(:, 13) = [8.14132863726718339e-05_dp, 4.43438181799428747e-04_dp, 1.16127534069767604e-03_dp, 2.38070961367043300e-03_dp, 4.38334849656378360e-03_dp,& + 7.65984385472751658e-03_dp, 1.30076358481182111e-02_dp, 2.16797344420144138e-02_dp, 3.56167156386108796e-02_dp, 5.77972661403760996e-02_dp, 9.27570244102206981e-02_dp,& + 1.47348988468907538e-01_dp, 2.31851068382248837e-01_dp, 3.61572161335724507e-01_dp, 5.59177233840892129e-01_dp, 8.58067272951867022e-01_dp, 1.30737537959642269e+00_dp,& + 1.97967156835564628e+00_dp, 2.98395950829788603e+00_dp, 4.49146636044110981e+00_dp, 6.80184903552209796e+00_dp, 1.06025902099772953e+01_dp, 2.10518581262747359e-04_dp,& + 5.23849992285989872e-04_dp, 9.35189048688426995e-04_dp, 1.54940041282643323e-03_dp, 2.53609900434045550e-03_dp, 4.14739470159187530e-03_dp, 6.75323587542941538e-03_dp,& + 1.09086636409994140e-02_dp, 1.74532704715506803e-02_dp, 2.76513431020509702e-02_dp, 4.33922324868079509e-02_dp, 6.74784216164883988e-02_dp, 1.04039232976262802e-01_dp,& + 1.59125353965573757e-01_dp, 2.41570662449016704e-01_dp, 3.64275022925983405e-01_dp, 5.46233634635032272e-01_dp, 8.16142673469200441e-01_dp, 1.22006746819583412e+00_dp,& + 1.84197380919507925e+00_dp, 2.87739093899265930e+00_dp, 5.07500437871142740e+00_dp] + aw%aw_erange_matrix(:, 14) = [7.13592602953326029e-05_dp, 3.89315053628413934e-04_dp, 1.02290016637576254e-03_dp, 2.10808534696908844e-03_dp, 3.90891228002737939e-03_dp,& + 6.88672932852428445e-03_dp, 1.17942977996034100e-02_dp, 1.98213106598323675e-02_dp, 3.28221100608088456e-02_dp, 5.36606118809696275e-02_dp, 8.67228342890487836e-02_dp,& + 1.38671335005026458e-01_dp, 2.19548687767534084e-01_dp, 3.44383806133186920e-01_dp, 5.35525179860289025e-01_dp, 8.26041520397564399e-01_dp, 1.26475567304876946e+00_dp,& + 1.92400558711946434e+00_dp, 2.91270629065943742e+00_dp, 4.40218119622389903e+00_dp, 6.69230018398852167e+00_dp, 1.04703744397918381e+01_dp, 1.84588073435838182e-04_dp,& + 4.60846669383881493e-04_dp, 8.28098646616922209e-04_dp, 1.38513747790979511e-03_dp, 2.29191443040749473e-03_dp, 3.78682567533227508e-03_dp, 6.22287602595384889e-03_dp,& + 1.01345751815021604e-02_dp, 1.63359744295523690e-02_dp, 2.60597081143932423e-02_dp, 4.11571292968829355e-02_dp, 6.43873797754156846e-02_dp, 9.98340320606822124e-02_dp,& + 1.53505526775757045e-01_dp, 2.34207088139599728e-01_dp, 3.54838537454467418e-01_dp, 5.34442377729807849e-01_dp, 8.01825742248729934e-01_dp, 1.20322663456372658e+00_dp,& + 1.82279189171337763e+00_dp, 2.85604880272480033e+00_dp, 5.05057914863739565e+00_dp] + aw%aw_erange_matrix(:, 15) = [6.36579983019180099e-05_dp, 3.47816904834585600e-04_dp, 9.16606656190229580e-04_dp, 1.89805540144578791e-03_dp, 3.54186609442470228e-03_dp,& + 6.28539259011753546e-03_dp, 1.08448267084552269e-02_dp, 1.83579477305851300e-02_dp, 3.06080848555685126e-02_dp, 5.03641360602654284e-02_dp, 8.18875824451109208e-02_dp,& + 1.31681632920222336e-01_dp, 2.09590915238371839e-01_dp, 3.30407578483158271e-01_dp, 5.16210949027820387e-01_dp, 7.99785285621254727e-01_dp, 1.22968561961200007e+00_dp,& + 1.87804688652642215e+00_dp, 2.85370281770559808e+00_dp, 4.32805520345455630e+00_dp, 6.60115781335191620e+00_dp, 1.03601921647022532e+01_dp, 1.64721176977347488e-04_dp,& + 4.12482080613346225e-04_dp, 7.45587885479292458e-04_dp, 1.25784498264198616e-03_dp, 2.10122286130215137e-03_dp, 3.50288356884526867e-03_dp, 5.80195979248964312e-03_dp,& + 9.51595545077662391e-03_dp, 1.54375270625704136e-02_dp, 2.47725892091762018e-02_dp, 3.93402058975390809e-02_dp, 6.18624226914841341e-02_dp, 9.63832904369785054e-02_dp,& + 1.48874223255665072e-01_dp, 2.28114450085994347e-01_dp, 3.47001715767874530e-01_dp, 5.24616719284114019e-01_dp, 7.89859775543438225e-01_dp, 1.18911662284867847e+00_dp,& + 1.80669222746527725e+00_dp, 2.83812086290345444e+00_dp, 5.03006762909104310e+00_dp] + aw%aw_erange_matrix(:, 16) = [5.75572951779637076e-05_dp, 3.14914306640529064e-04_dp, 8.32188482767582728e-04_dp, 1.73080610181602598e-03_dp, 3.24846434323990390e-03_dp,& + 5.80238149711106033e-03_dp, 1.00780714842716203e-02_dp, 1.71696844891436259e-02_dp, 2.88006307318317452e-02_dp, 4.76592602480586866e-02_dp, 7.79009926997707575e-02_dp,& + 1.25892715892636398e-01_dp, 2.01308959280787431e-01_dp, 3.18737484345279931e-01_dp, 5.00024124918876711e-01_dp, 7.77705013695570990e-01_dp, 1.20009993174445717e+00_dp,& + 1.83916349363603615e+00_dp, 2.80365447240209775e+00_dp, 4.26503999352744056e+00_dp, 6.52353530439399965e+00_dp, 1.02662211683425344e+01_dp, 1.48980050649978461e-04_dp,& + 3.74093905974257025e-04_dp, 6.79878494222507942e-04_dp, 1.15594085400318246e-03_dp, 1.94750477749893228e-03_dp, 3.27230714177671918e-03_dp, 5.45783233086765719e-03_dp,& + 9.00715387075903817e-03_dp, 1.46946051562604138e-02_dp, 2.37030724147478736e-02_dp, 3.78236373963166950e-02_dp, 5.97460018280367572e-02_dp, 9.34794912089463720e-02_dp,& + 1.44962599288782995e-01_dp, 2.22950806915248823e-01_dp, 3.40338543176551489e-01_dp, 5.16238115635440420e-01_dp, 7.79629764330003971e-01_dp, 1.17702800798791141e+00_dp,& + 1.79287805320122295e+00_dp, 2.82272660203277903e+00_dp, 5.01245943123840831e+00_dp] + aw%aw_erange_matrix(:, 17) = [5.25969497635628904e-05_dp, 2.88140299657843612e-04_dp, 7.63388729255190458e-04_dp, 1.59416624183384543e-03_dp, 3.00791751449272894e-03_dp,& + 5.40463761301825715e-03_dp, 9.44360608781482681e-03_dp, 1.61815943494118403e-02_dp, 2.72904897758569354e-02_dp, 4.53890949790402704e-02_dp, 7.45408810429689511e-02_dp,& + 1.20994088473675779e-01_dp, 1.94274624261707080e-01_dp, 3.08790956078508427e-01_dp, 4.86183223357853467e-01_dp, 7.58767923389570109e-01_dp, 1.17465534317426790e+00_dp,& + 1.80563799283809878e+00_dp, 2.76040516925991852e+00_dp, 4.21047946882117508e+00_dp, 6.45621984012329531e+00_dp, 1.01846271205820038e+01_dp, 1.36178924890914869e-04_dp,& + 3.42825234820011090e-04_dp, 6.26191749168496454e-04_dp, 1.07228090118842716e-03_dp, 1.82051245976536883e-03_dp, 3.08056613776433322e-03_dp, 5.16995083867658693e-03_dp,& + 8.57926437455989663e-03_dp, 1.40668760010720529e-02_dp, 2.27955019479989147e-02_dp, 3.65315987641240403e-02_dp, 5.79362557797011499e-02_dp, 9.09878764338887397e-02_dp,& + 1.41595346423459723e-01_dp, 2.18492311409719364e-01_dp, 3.34569115823445562e-01_dp, 5.08964731161898665e-01_dp, 7.70729091745732675e-01_dp, 1.16649062786416691e+00_dp,& + 1.78082044043342025e+00_dp, 2.80928104526444544e+00_dp, 4.99708355849031083e+00_dp] + aw%aw_erange_matrix(:, 18) = [2.90762890407724913e-05_dp, 1.60820764045495378e-04_dp, 4.34422626290592476e-04_dp, 9.35039866616582996e-04_dp, 1.83288487070204118e-03_dp,& + 3.43151821088961929e-03_dp, 6.24330639046053164e-03_dp, 1.11139604851392074e-02_dp, 1.94205651181870234e-02_dp, 3.33783588073015142e-02_dp, 5.65099671357182226e-02_dp,& + 9.43565235776523542e-02_dp, 1.55546612904553100e-01_dp, 2.53391770241247982e-01_dp, 4.08255853980029115e-01_dp, 6.51070811498433266e-01_dp, 1.02859999602671803e+00_dp,& + 1.61156146938925948e+00_dp, 2.50813991254804813e+00_dp, 3.89015625413403843e+00_dp, 6.05888858834257960e+00_dp, 9.70101820848491236e+00_dp, 7.54396214641075318e-05_dp,& + 1.93611184726491780e-04_dp, 3.67183036170629030e-04_dp, 6.61657087412284291e-04_dp, 1.18342298349698389e-03_dp, 2.09721549528343789e-03_dp, 3.66409371548580276e-03_dp,& + 6.30174076999150123e-03_dp, 1.06730393182044355e-02_dp, 1.78180701123197525e-02_dp, 2.93512452214240056e-02_dp, 4.77539458032805800e-02_dp, 7.68061849693031928e-02_dp,& + 1.22220852210935996e-01_dp, 1.92577294064878640e-01_dp, 3.00716204350791827e-01_dp, 4.65916878838533499e-01_dp, 7.17645882764439302e-01_dp, 1.10324722563679933e+00_dp,& + 1.70812188016783417e+00_dp, 2.72803096337466400e+00_dp, 4.90423336038595714e+00_dp] + aw%aw_erange_matrix(:, 19) = [2.05653889251502476e-05_dp, 1.14520867388633136e-04_dp, 3.13640994086593816e-04_dp, 6.89261854057424649e-04_dp, 1.38517347545250176e-03_dp,& + 2.66038656199351492e-03_dp, 4.95918459442486713e-03_dp, 9.02797406142399547e-03_dp, 1.61023543090457119e-02_dp, 2.82000330967852458e-02_dp, 4.85739460822395552e-02_dp,& + 8.24063146263888241e-02_dp, 1.37862273521427520e-01_dp, 2.27676785155268485e-01_dp, 3.71530405037607481e-01_dp, 5.99598522246047039e-01_dp, 9.57889945568599410e-01_dp,& + 1.51649820008986214e+00_dp, 2.38328420664463492e+00_dp, 3.73019408610861980e+00_dp, 5.85901523269036240e+00_dp, 9.45637637256199426e+00_dp, 5.34363201296681438e-05_dp,& + 1.39020073506606164e-04_dp, 2.70599284078877720e-04_dp, 5.03939028710325798e-04_dp, 9.29930193231351420e-04_dp, 1.69264740976545792e-03_dp, 3.02631466800271781e-03_dp,& + 5.31244207968048672e-03_dp, 9.16523880225796408e-03_dp, 1.55609829578794105e-02_dp, 2.60333897168352757e-02_dp, 4.29663462371881605e-02_dp, 7.00293507626535416e-02_dp,& + 1.12821990431476962e-01_dp, 1.79827912884988311e-01_dp, 2.83844003822466384e-01_dp, 4.44206488566912749e-01_dp, 6.90593012627218727e-01_dp, 1.07073613696106928e+00_dp,& + 1.67051539850277919e+00_dp, 2.68586871499289925e+00_dp, 4.85609323400620241e+00_dp] + aw%aw_erange_matrix(:, 20) = [1.60905223191839913e-05_dp, 9.00924705193344226e-05_dp, 2.49480714636845147e-04_dp, 5.57253697520921840e-04_dp, 1.14108958815330652e-03_dp,& + 2.23286406677653416e-03_dp, 4.23520330690799109e-03_dp, 7.83307362353265896e-03_dp, 1.41734445524208229e-02_dp, 2.51488274898480427e-02_dp, 4.38393471602563367e-02_dp,& + 7.51948372263522291e-02_dp, 1.27077300211358046e-01_dp, 2.11840719863816418e-01_dp, 3.48709343563647356e-01_dp, 5.67347420179910911e-01_dp, 9.13246803231961057e-01_dp,& + 1.45606441575002998e+00_dp, 2.30342338171505601e+00_dp, 3.62733903836381089e+00_dp, 5.72994466090799826e+00_dp, 9.29787769290753019e+00_dp, 4.18582630530724392e-05_dp,& + 1.10095201120191568e-04_dp, 2.18729154478433733e-04_dp, 4.17481342981990177e-04_dp, 7.87767058022032255e-04_dp, 1.46107800353917133e-03_dp, 2.65485040360329211e-03_dp,& + 4.72745322818911469e-03_dp, 8.26152870286268534e-03_dp, 1.41915027312551519e-02_dp, 2.39975456485793520e-02_dp, 3.99980426188496635e-02_dp, 6.57871441778337951e-02_dp,& + 1.06885646486166594e-01_dp, 1.71708282235778303e-01_dp, 2.73015955599476445e-01_dp, 4.30175629967851303e-01_dp, 6.73000885562459072e-01_dp, 1.04948552778007187e+00_dp,& + 1.64584195942300959e+00_dp, 2.65815350615402668e+00_dp, 4.82446309349684288e+00_dp] + aw%aw_erange_matrix(:, 21) = [1.33051281617681520e-05_dp, 7.48448384990370801e-05_dp, 2.09214312792452143e-04_dp, 4.73669311645959765e-04_dp, 9.84726055373060525e-04_dp,& + 1.95547892998873714e-03_dp, 3.75958796998500291e-03_dp, 7.03892644101850040e-03_dp, 1.28777413472578924e-02_dp, 2.30792052353523229e-02_dp, 4.05991719793361294e-02_dp,& + 7.02191345034593045e-02_dp, 1.19579941024401004e-01_dp, 2.00755646924385800e-01_dp, 3.32632747525695771e-01_dp, 5.44494103839673005e-01_dp, 8.81442137232194889e-01_dp,& + 1.41280037704187977e+00_dp, 2.24600452092047931e+00_dp, 3.55311338618090922e+00_dp, 5.63651897644199629e+00_dp, 9.18288725381164284e+00_dp, 3.46469464063064458e-05_dp,& + 9.19802895962243850e-05_dp, 1.85890421128139926e-04_dp, 3.61858574332359778e-04_dp, 6.94740965771247919e-04_dp, 1.30729901127845001e-03_dp, 2.40507869574388064e-03_dp,& + 4.32982418281745076e-03_dp, 7.64129555982906786e-03_dp, 1.32433409792537971e-02_dp, 2.25766959381045185e-02_dp, 3.79110871371775016e-02_dp, 6.27841312538312130e-02_dp,& + 1.02656723796630878e-01_dp, 1.65890020881459044e-01_dp, 2.65214803703477164e-01_dp, 4.20016957188921014e-01_dp, 6.60207961676460342e-01_dp, 1.03397579428113473e+00_dp,& + 1.62778610521243183e+00_dp, 2.63784401884980513e+00_dp, 4.80129185077557441e+00_dp] + aw%aw_erange_matrix(:, 22) = [1.13934021647398620e-05_dp, 6.43553767195351271e-05_dp, 1.81384735260225273e-04_dp, 4.15465804906859325e-04_dp, 8.74784651968030431e-04_dp,& + 1.75842677544671769e-03_dp, 3.41835170634737342e-03_dp, 6.46392134002142949e-03_dp, 1.19317312559794313e-02_dp, 2.15566465163261507e-02_dp, 3.81989404458580872e-02_dp,& + 6.65099017862893216e-02_dp, 1.13958393754720083e-01_dp, 1.92399599408031863e-01_dp, 3.20454452163599690e-01_dp, 5.27104117055056220e-01_dp, 8.57140736476918685e-01_dp,& + 1.37961952060154536e+00_dp, 2.20182185430469257e+00_dp, 3.49583596141349240e+00_dp, 5.56425878518387496e+00_dp, 9.09379170158253380e+00_dp, 2.96949246120568376e-05_dp,& + 7.94830390495184180e-05_dp, 1.63026224371196949e-04_dp, 3.22611474393445742e-04_dp, 6.28209031130342569e-04_dp, 1.19604481045554301e-03_dp, 2.22261828090361850e-03_dp,& + 4.03689706422688966e-03_dp, 7.18093917005207995e-03_dp, 1.25347945927189886e-02_dp, 2.15083195138626969e-02_dp, 3.63328896886428443e-02_dp, 6.05012296058346846e-02_dp,& + 9.94262052048541650e-02_dp, 1.61425318654521810e-01_dp, 2.59203569677637025e-01_dp, 4.12159396023710212e-01_dp, 6.50279574358099022e-01_dp, 1.02190518592096291e+00_dp,& + 1.61370511273339901e+00_dp, 2.62198875738320014e+00_dp, 4.78320650635398081e+00_dp] + aw%aw_erange_matrix(:, 23) = [9.99454274093545240e-06_dp, 5.66643636299825617e-05_dp, 1.60896503364809740e-04_dp, 3.72334006752350892e-04_dp, 7.92633889132781234e-04_dp,& + 1.60990407495521142e-03_dp, 3.15902992422392986e-03_dp, 6.02364217988483278e-03_dp, 1.12024081667284076e-02_dp, 2.03755415661601089e-02_dp, 3.63264769194730081e-02_dp,& + 6.36013551904103663e-02_dp, 1.09529542685367035e-01_dp, 1.85787923004832572e-01_dp, 3.10780127529339312e-01_dp, 5.13239254991739280e-01_dp, 8.37700866434439195e-01_dp,& + 1.35299652288265082e+00_dp, 2.16627671791894283e+00_dp, 3.44965052286817064e+00_dp, 5.50588350642492852e+00_dp, 9.02171444171596804e+00_dp, 2.60697394028477843e-05_dp,& + 7.02972872632460762e-05_dp, 1.46084629233613855e-04_dp, 2.93196758798126291e-04_dp, 5.77782380989189191e-04_dp, 1.11092466332648305e-03_dp, 2.08191067723823313e-03_dp,& + 3.80944401039385065e-03_dp, 6.82128745818843651e-03_dp, 1.19781797824074533e-02_dp, 2.06647966320373938e-02_dp, 3.50810773504934836e-02_dp, 5.86827296947812008e-02_dp,& + 9.68427139463775566e-02_dp, 1.57841812595722136e-01_dp, 2.54362549305863661e-01_dp, 4.05812091239185158e-01_dp, 6.42237696997827623e-01_dp, 1.01210598637712601e+00_dp,& + 1.60225484010221209e+00_dp, 2.60908459532920922e+00_dp, 4.76848987721681183e+00_dp] + aw%aw_erange_matrix(:, 24) = [8.92352094047950570e-06_dp, 5.07651520041585948e-05_dp, 1.45123988619345743e-04_dp, 3.38934589926485311e-04_dp, 7.28555367815529533e-04_dp,& + 1.49318516017513179e-03_dp, 2.95380020435500549e-03_dp, 5.67296401145544159e-03_dp, 1.06181420151690940e-02_dp, 1.94243935039796548e-02_dp, 3.48114124334977515e-02_dp,& + 6.12377859731470867e-02_dp, 1.05916301172055749e-01_dp, 1.80374296040537785e-01_dp, 3.02832467443627407e-01_dp, 5.01814244147640531e-01_dp, 8.21637300725933217e-01_dp,& + 1.33094204170813835e+00_dp, 2.13676550226255024e+00_dp, 3.41123201151645850e+00_dp, 5.45724971517158153e+00_dp, 8.96159470755822163e+00_dp, 2.32930218299722802e-05_dp,& + 6.32360769780289069e-05_dp, 1.32967133627795708e-04_dp, 2.70192493508733436e-04_dp, 5.37965852619124883e-04_dp, 1.04317824981281699e-03_dp, 1.96917378155438572e-03_dp,& + 3.62614732732700114e-03_dp, 6.52996012917771932e-03_dp, 1.15252083208033391e-02_dp, 1.99754326692176479e-02_dp, 3.40540728555096608e-02_dp, 5.71854808137426049e-02_dp,& + 9.47086037923560858e-02_dp, 1.54872615401006386e-01_dp, 2.50340151197668392e-01_dp, 4.00524640047162650e-01_dp, 6.35523448616123310e-01_dp, 1.00390904389308799e+00_dp,& + 1.59266346971105199e+00_dp, 2.59826755537668985e+00_dp, 4.75615524329419248e+00_dp] + aw%aw_erange_matrix(:, 25) = [8.07533230400322961e-06_dp, 4.60856441621744308e-05_dp, 1.32570852452785267e-04_dp, 3.12210915451310400e-04_dp, 6.76950813769914249e-04_dp,& + 1.39856692266817424e-03_dp, 2.78640694108129661e-03_dp, 5.38534378226993276e-03_dp, 1.01365344492760443e-02_dp, 1.86368240312546410e-02_dp, 3.35517776609026847e-02_dp,& + 5.92653909136533208e-02_dp, 1.02890821649513090e-01_dp, 1.75827211907739561e-01_dp, 2.96137945827540716e-01_dp, 4.92165535839492907e-01_dp, 8.08038902739617870e-01_dp,& + 1.31223194784214559e+00_dp, 2.11168172454495195e+00_dp, 3.37852397717336084e+00_dp, 5.41578989059694660e+00_dp, 8.91029189403326782e+00_dp, 2.10932070918042014e-05_dp,& + 5.76236612613593971e-05_dp, 1.22472462807700111e-04_dp, 2.51622999405283748e-04_dp, 5.05555830895371150e-04_dp, 9.87653780958501438e-04_dp, 1.87624224076666157e-03_dp,& + 3.47429497489486552e-03_dp, 6.28753596109184708e-03_dp, 1.11467641378285454e-02_dp, 1.93973929963348439e-02_dp, 3.31900503795852508e-02_dp, 5.59219848393945895e-02_dp,& + 9.29025902137011472e-02_dp, 1.52353349648122888e-01_dp, 2.46919086314924902e-01_dp, 3.96017811288945254e-01_dp, 6.29789380412422162e-01_dp, 9.96897394001393877e-01_dp,& + 1.58444925174457607e+00_dp, 2.58899789320651852e+00_dp, 4.74558629969863599e+00_dp] + aw%aw_erange_matrix(:, 26) = [7.38580306967939125e-06_dp, 4.22757469481121925e-05_dp, 1.22319116365676202e-04_dp, 2.90280105497779098e-04_dp, 6.34352507020876050e-04_dp,& + 1.32000166881638282e-03_dp, 2.64665609257590077e-03_dp, 5.14403969909843321e-03_dp, 9.73069986920719991e-03_dp, 1.79705334901513712e-02_dp, 3.24822962283058056e-02_dp,& + 5.75852967059411816e-02_dp, 1.00306058599380868e-01_dp, 1.71931950772977377e-01_dp, 2.90388822316800965e-01_dp, 4.83860549183816491e-01_dp, 7.96309975940985959e-01_dp,& + 1.29606381803504678e+00_dp, 2.08996987178063476e+00_dp, 3.35017255185728491e+00_dp, 5.37981093058197679e+00_dp, 8.86573240555865993e+00_dp, 1.93042785336726517e-05_dp,& + 5.30458699076083204e-05_dp, 1.13860681610436235e-04_dp, 2.36261993628351859e-04_dp, 4.78547024573813535e-04_dp, 9.41102528781277313e-04_dp, 1.79793452155763102e-03_dp,& + 3.34577588500104516e-03_dp, 6.08156170905922461e-03_dp, 1.08240927944734319e-02_dp, 1.89029713356079453e-02_dp, 3.24488645598754247e-02_dp, 5.48352209151617767e-02_dp,& + 9.13453669492429871e-02_dp, 1.50176191039324863e-01_dp, 2.43956403619624701e-01_dp, 3.92107409822559982e-01_dp, 6.24805750964588902e-01_dp, 9.90794782222321646e-01_dp,& + 1.57729255106850563e+00_dp, 2.58091724238665954e+00_dp, 4.73637393673943219e+00_dp] + aw%aw_erange_matrix(:, 27) = [4.11577647931065565e-06_dp, 2.41109171591163585e-05_dp, 7.28959878731409684e-05_dp, 1.82705558633408622e-04_dp, 4.21135317613602464e-04_dp,& + 9.18895701336235049e-04_dp, 1.92013555113837073e-03_dp, 3.86903859938759207e-03_dp, 7.55495901793930974e-03_dp, 1.43514943327147215e-02_dp, 2.66043538157777967e-02_dp,& + 4.82519876889243582e-02_dp, 8.58062586147143591e-02_dp, 1.49884652982802707e-01_dp, 2.57581294617070133e-01_dp, 4.36111432279205069e-01_dp, 7.28412434315531154e-01_dp,& + 1.20188826287217632e+00_dp, 1.96280936152550511e+00_dp, 3.18334555122622742e+00_dp, 5.16729407011710684e+00_dp, 8.60177692919055659e+00_dp, 1.08103451888892216e-05_dp,& + 3.10771144342180430e-05_dp, 7.16274298056807080e-05_dp, 1.58818698899649766e-04_dp, 3.39017395939608462e-04_dp, 6.95803112746412513e-04_dp, 1.37837010493610415e-03_dp,& + 2.64713734273472811e-03_dp, 4.94736636639465065e-03_dp, 9.02660699562345820e-03_dp, 1.61196197861813856e-02_dp, 2.82360865790384878e-02_dp, 4.86035197591654297e-02_dp,& + 8.23430936734954044e-02_dp, 1.37495298031682200e-01_dp, 2.26580573866090457e-01_dp, 3.69028426862235914e-01_dp, 5.95227692025933064e-01_dp, 9.54405318751613607e-01_dp,& + 1.53446955274810404e+00_dp, 2.53247747978796900e+00_dp, 4.68116716115914766e+00_dp] + aw%aw_erange_matrix(:, 28) = [2.93059248958698421e-06_dp, 1.74658802185034416e-05_dp, 5.44583745684866936e-05_dp, 1.41377660096951151e-04_dp, 3.36534398962208472e-04_dp,& + 7.54852749661623769e-04_dp, 1.61490243368843443e-03_dp, 3.32054799874063672e-03_dp, 6.59924585107690177e-03_dp, 1.27320754504761414e-02_dp, 2.39302082708908702e-02_dp,& + 4.39420719319380260e-02_dp, 7.90196677371394623e-02_dp, 1.39438282335772434e-01_dp, 2.41862130257866903e-01_dp, 4.12999486066383314e-01_dp, 6.95243226386015767e-01_dp,& + 1.15549789669796255e+00_dp, 1.89970943889035770e+00_dp, 3.10004174254383846e+00_dp, 5.06063560401212964e+00_dp, 8.46879716288626128e+00_dp, 7.72551686138751593e-06_dp,& + 2.29485526199224021e-05_dp, 5.54045251476519742e-05_dp, 1.27743027514059810e-04_dp, 2.80970684003487112e-04_dp, 5.90784411349128818e-04_dp, 1.19440174575451401e-03_dp,& + 2.33442466393772412e-03_dp, 4.43040475364441487e-03_dp, 8.19396116517738353e-03_dp, 1.48113872318636000e-02_dp, 2.62296888928512453e-02_dp, 4.55996442864698009e-02_dp,& + 7.79556120448624684e-02_dp, 1.31252074888239895e-01_dp, 2.17946128537454792e-01_dp, 3.57462889284247576e-01_dp, 5.80294174541846508e-01_dp, 9.35917506305006919e-01_dp,& + 1.51261219411583525e+00_dp, 2.50769258392197258e+00_dp, 4.65293052711519373e+00_dp] + aw%aw_erange_matrix(:, 29) = [2.30617418414400491e-06_dp, 1.39420777043108131e-05_dp, 4.45428273019938463e-05_dp, 1.18703172459198118e-04_dp, 2.89149766243032937e-04_dp,& + 6.61245134643599955e-04_dp, 1.43788129075881482e-03_dp, 2.99794059227682236e-03_dp, 6.03016118430149163e-03_dp, 1.17572577965464210e-02_dp, 2.23048693646072070e-02_dp,& + 4.12997430637738125e-02_dp, 7.48263377765128745e-02_dp, 1.32937840432216126e-01_dp, 2.32017568873716828e-01_dp, 3.98440204051437541e-01_dp, 6.74237452945035676e-01_dp,& + 1.12597907163621103e+00_dp, 1.85938903873710504e+00_dp, 3.04661998143597090e+00_dp, 4.99203821681522708e+00_dp, 8.38308565543044537e+00_dp, 6.09799434345543036e-06_dp,& + 1.86031294610854214e-05_dp, 4.65026406609495805e-05_dp, 1.10215809968520044e-04_dp, 2.47519551061662203e-04_dp, 5.29229248136807960e-04_dp, 1.08503939977670663e-03_dp,& + 2.14625956536696220e-03_dp, 4.11601348431579837e-03_dp, 7.68278225386337735e-03_dp, 1.40014093755201335e-02_dp, 2.49779158617415425e-02_dp, 4.37124829452176303e-02_dp,& + 7.51816527951001123e-02_dp, 1.27281803376186359e-01_dp, 2.12425880206672552e-01_dp, 3.50032879386126261e-01_dp, 5.70659285004944894e-01_dp, 9.23946461035048960e-01_dp,& + 1.49842149874735231e+00_dp, 2.49157828538030701e+00_dp, 4.63457567934905068e+00_dp] + aw%aw_erange_matrix(:, 30) = [1.91673417108346766e-06_dp, 1.17329394155408427e-05_dp, 3.82558718053225527e-05_dp, 1.04102752208523592e-04_dp, 2.58167492293393994e-04_dp,& + 5.99208950755224603e-04_dp, 1.31919777523101895e-03_dp, 2.77948005793550099e-03_dp, 5.64143484885461059e-03_dp, 1.10862905776961066e-02_dp, 2.11785606265024878e-02_dp,& + 3.94575988228887883e-02_dp, 7.18869622660941177e-02_dp, 1.28358831044982691e-01_dp, 2.25051956635620498e-01_dp, 3.88096902922114961e-01_dp, 6.59259631949477898e-01_dp,& + 1.10486180022603597e+00_dp, 1.83046068334501411e+00_dp, 3.00819690941418516e+00_dp, 4.94260149290475415e+00_dp, 8.32122291118276891e+00_dp, 5.08183620378214294e-06_dp,& + 1.58611740792196564e-05_dp, 4.07692268035397438e-05_dp, 9.86978499440419532e-05_dp, 2.25198865481160177e-04_dp, 4.87659743499264313e-04_dp, 1.01044451864037857e-03_dp,& + 2.01681198765380019e-03_dp, 3.89810708052533254e-03_dp, 7.32613084356623177e-03_dp, 1.34329356605255353e-02_dp, 2.40946839162048780e-02_dp, 4.23744855460415557e-02_dp,& + 7.32062368579494555e-02_dp, 1.24443048187603433e-01_dp, 2.08464324797154321e-01_dp, 3.44682957393298239e-01_dp, 5.63701175641321828e-01_dp, 9.15279688026507388e-01_dp,& + 1.48812871187359153e+00_dp, 2.47987867707640985e+00_dp, 4.62125107431175497e+00_dp] + aw%aw_erange_matrix(:, 31) = [1.64895154539128592e-06_dp, 1.02072794924256046e-05_dp, 3.38721200697524231e-05_dp, 9.37926563723827687e-05_dp, 2.36021601897219344e-04_dp,& + 5.54396087801813965e-04_dp, 1.23269227931650425e-03_dp, 2.61902174395846734e-03_dp, 5.35401143155140626e-03_dp, 1.05872805743862670e-02_dp, 2.03365792784754133e-02_dp,& + 3.80741487753279012e-02_dp, 6.96703693849783090e-02_dp, 1.24892908078455087e-01_dp, 2.19761770847518162e-01_dp, 3.80217398314288302e-01_dp, 6.47817938432648677e-01_dp,& + 1.08869000178272612e+00_dp, 1.80825851778046087e+00_dp, 2.97865254527264423e+00_dp, 4.90453114611245944e+00_dp, 8.27352996176200151e+00_dp, 4.38249705452781130e-06_dp,& + 1.39570693499999557e-05_dp, 3.67194437667889460e-05_dp, 9.04326665574478182e-05_dp, 2.08991926420577247e-04_dp, 4.57196086844999120e-04_dp, 9.55358061867149109e-04_dp,& + 1.92058951967479397e-03_dp, 3.73520283693082713e-03_dp, 7.05815542147528608e-03_dp, 1.30038803460141780e-02_dp, 2.34253646377022597e-02_dp, 4.13568231121202931e-02_dp,& + 7.16987462523292624e-02_dp, 1.22270113321089682e-01_dp, 2.05423489126560666e-01_dp, 3.40566056588523680e-01_dp, 5.58334743885169460e-01_dp, 9.08582871030465422e-01_dp,& + 1.48016432544994636e+00_dp, 2.47081889914956276e+00_dp, 4.61093391716888146e+00_dp] + aw%aw_erange_matrix(:, 32) = [1.45267137242234143e-06_dp, 9.08473901898180976e-06_dp, 3.06194421232814190e-05_dp, 8.60601847394439973e-05_dp, 2.19244189704205446e-04_dp,& + 5.20152574520566825e-04_dp, 1.16610631558480534e-03_dp, 2.49474268811706885e-03_dp, 5.13019808764342191e-03_dp, 1.01968830327122013e-02_dp, 1.96751314298413485e-02_dp,& + 3.69833245921940279e-02_dp, 6.79168533834199339e-02_dp, 1.22142900489391221e-01_dp, 2.15553010782744109e-01_dp, 3.73933331954689918e-01_dp, 6.38672818386253449e-01_dp,& + 1.07573861955972894e+00_dp, 1.79044663631006951e+00_dp, 2.95491509748028536e+00_dp, 4.87390682634371331e+00_dp, 8.23513085914243881e+00_dp, 3.86950818582524928e-06_dp,& + 1.25492735313935511e-05_dp, 3.36812570154890965e-05_dp, 8.41512016483296542e-05_dp, 1.96556699954354561e-04_dp, 4.33646608105545236e-04_dp, 9.12509887585908025e-04_dp,& + 1.84534789011500493e-03_dp, 3.60723263852728761e-03_dp, 6.84679241967494235e-03_dp, 1.26642458832250532e-02_dp, 2.28938244986376313e-02_dp, 4.05462799949124764e-02_dp,& + 7.04948703003382277e-02_dp, 1.20530599439649236e-01_dp, 2.02983789833098893e-01_dp, 3.37256378604028129e-01_dp, 5.54012851349098612e-01_dp, 9.03181465052904309e-01_dp,& + 1.47373337309290209e+00_dp, 2.46349906129618867e+00_dp, 4.60259878286634017e+00_dp] + aw%aw_erange_matrix(:, 33) = [1.18277247892696558e-06_dp, 7.53382482588371914e-06_dp, 2.60779342135758097e-05_dp, 7.51224967992965151e-05_dp, 1.95227490959034921e-04_dp,& + 4.70636327260251150e-04_dp, 1.06900360456677339e-03_dp, 2.31219715214458750e-03_dp, 4.79941040416772841e-03_dp, 9.61676624548491073e-03_dp, 1.86875564926067758e-02_dp,& + 3.53477669019867657e-02_dp, 6.52776944090153743e-02_dp, 1.17989813958694983e-01_dp, 2.09177270981736163e-01_dp, 3.64387140331187465e-01_dp, 6.24745252980397514e-01_dp,& + 1.05596959718259154e+00_dp, 1.76320425107576462e+00_dp, 2.91854809430863416e+00_dp, 4.82692443114716951e+00_dp, 8.17616067826534554e+00_dp, 3.16347496014357980e-06_dp,& + 1.05923351682571904e-05_dp, 2.93818833567492176e-05_dp, 7.51263108427510873e-05_dp, 1.78491524155511525e-04_dp, 3.99137372795228319e-04_dp, 8.49268614427133983e-04_dp,& + 1.73361549881359978e-03_dp, 3.41618966482252866e-03_dp, 6.52978107886599199e-03_dp, 1.21527333444035497e-02_dp, 2.20903099402139230e-02_dp, 3.93168852348080300e-02_dp,& + 6.86633087650498353e-02_dp, 1.17876752111420763e-01_dp, 1.99252260617322013e-01_dp, 3.32182555274532387e-01_dp, 5.47373749754756389e-01_dp, 8.94869814973328404e-01_dp,& + 1.46382478847394260e+00_dp, 2.45221311683700316e+00_dp, 4.58974844353298117e+00_dp] + aw%aw_erange_matrix(:, 34) = [1.08558975265753804e-06_dp, 6.97285376172907351e-06_dp, 2.44187131788034063e-05_dp, 7.10783551714022979e-05_dp, 1.86251757654043172e-04_dp,& + 4.51964338749976540e-04_dp, 1.03211326511026759e-03_dp, 2.24240799000784878e-03_dp, 4.67226182859080928e-03_dp, 9.39273150226986077e-03_dp, 1.83045903951385980e-02_dp,& + 3.47112002893365107e-02_dp, 6.42471602021468663e-02_dp, 1.16363354044152947e-01_dp, 2.06673731808339645e-01_dp, 3.60629672694155023e-01_dp, 6.19251357685395520e-01_dp,& + 1.04815633217125259e+00_dp, 1.75241891111554859e+00_dp, 2.90412934660146105e+00_dp, 4.80827507059037096e+00_dp, 8.15273245915029676e+00_dp, 2.90904199273370447e-06_dp,& + 9.88034801454935336e-06_dp, 2.77915178824643994e-05_dp, 7.17425769405372472e-05_dp, 1.71651991907649401e-04_dp, 3.85972311497142693e-04_dp, 8.24990713833095119e-04_dp,& + 1.69049331602863983e-03_dp, 3.34211810029706735e-03_dp, 6.40637181413836274e-03_dp, 1.19528930710990269e-02_dp, 2.17753820228709649e-02_dp, 3.88336452846907987e-02_dp,& + 6.79414859800191867e-02_dp, 1.16828366220876056e-01_dp, 1.97774934638904970e-01_dp, 3.30169852509938300e-01_dp, 5.44735529705501431e-01_dp, 8.91562114870858569e-01_dp,& + 1.45987724968194699e+00_dp, 2.44771417531497759e+00_dp, 4.58462621781103863e+00_dp] + aw%aw_erange_matrix(:, 35) = [6.22443128153836243e-07_dp, 4.27249258996541033e-06_dp, 1.62529434981895659e-05_dp, 5.06723551372187647e-05_dp, 1.39970205298834170e-04_dp,& + 3.53952707704476986e-04_dp, 8.35587239036498326e-04_dp, 1.86596152975692232e-03_dp, 3.97906594391459704e-03_dp, 8.15997287551761645e-03_dp, 1.61801165734150668e-02_dp,& + 3.11543738785128727e-02_dp, 5.84518687707416690e-02_dp, 1.07163785865984809e-01_dp, 1.92439133160937026e-01_dp, 3.39164408599788414e-01_dp, 5.87732340746192183e-01_dp,& + 1.00315928195193260e+00_dp, 1.69009616012076735e+00_dp, 2.82057188884279064e+00_dp, 4.69995107106125420e+00_dp, 8.01641724611723205e+00_dp, 1.69447527098163592e-06_dp,& + 6.40758836525944905e-06_dp, 1.97579702891286563e-05_dp, 5.41860854219365049e-05_dp, 1.35475897817959490e-04_dp, 3.15281723642006119e-04_dp, 6.92999412035867472e-04_dp,& + 1.45356824534664895e-03_dp, 2.93142672355146397e-03_dp, 5.71664630206478001e-03_dp, 1.08280772977361450e-02_dp, 1.99915467045142618e-02_dp, 3.60808077689588336e-02_dp,& + 6.38082290950276743e-02_dp, 1.10796842461126116e-01_dp, 1.89239110538469507e-01_dp, 3.18495400746003077e-01_dp, 5.29379993990211850e-01_dp, 8.72253926728072893e-01_dp,& + 1.43678397212003950e+00_dp, 2.42136411381618455e+00_dp, 4.55462934975407041e+00_dp] + aw%aw_erange_matrix(:, 36) = [4.53256279959429321e-07_dp, 3.26878734999866000e-06_dp, 1.31027952196471195e-05_dp, 4.24920984671517627e-05_dp, 1.20820935182527079e-04_dp,& + 3.12359866245833266e-04_dp, 7.50452140340149851e-04_dp, 1.70006788803432618e-03_dp, 3.66912131859901351e-03_dp, 7.60185017767122523e-03_dp, 1.52077471182174816e-02_dp,& + 2.95107269951396245e-02_dp, 5.57508778139598829e-02_dp, 1.02843352284423747e-01_dp, 1.85708083820780356e-01_dp, 3.28951310972175948e-01_dp, 5.72652040159266185e-01_dp,& + 9.81523069005708071e-01_dp, 1.65999785504769770e+00_dp, 2.78006816972400372e+00_dp, 4.64728478552088919e+00_dp, 7.94999503748127889e+00_dp, 1.24971764372527093e-06_dp,& + 5.08693360054884036e-06_dp, 1.65312955368420163e-05_dp, 4.68598876288360330e-05_dp, 1.19967770120401381e-04_dp, 2.84338124589194133e-04_dp, 6.34229301738489055e-04_dp,& + 1.34655468330935183e-03_dp, 2.74363821848860141e-03_dp, 5.39788780956410898e-03_dp, 1.03033356187560935e-02_dp, 1.91523824205403828e-02_dp, 3.47760576778694888e-02_dp,& + 6.18359029296285598e-02_dp, 1.07900957575593051e-01_dp, 1.85117905918771225e-01_dp, 3.12830321739075157e-01_dp, 5.21895291602346822e-01_dp, 8.62807124565198813e-01_dp,& + 1.42545339596598897e+00_dp, 2.40841578774241505e+00_dp, 4.53989122605335726e+00_dp] + aw%aw_erange_matrix(:, 37) = [3.63740571041784989e-07_dp, 2.73125761452274828e-06_dp, 1.13733685754730894e-05_dp, 3.78950548332579519e-05_dp, 1.09860031801165795e-04_dp,& + 2.88206840734960544e-04_dp, 7.00437661465795267e-04_dp, 1.60167354427463173e-03_dp, 3.48380066085383650e-03_dp, 7.26582778105013850e-03_dp, 1.46188014738536480e-02_dp,& + 2.85099408863252156e-02_dp, 5.40985925072002410e-02_dp, 1.00189350362776639e-01_dp, 1.81557748909266986e-01_dp, 3.22632697144117742e-01_dp, 5.63293870386273099e-01_dp,& + 9.68060181105636075e-01_dp, 1.64122492626440830e+00_dp, 2.75475404530085344e+00_dp, 4.61431574676766854e+00_dp, 7.90836486312216547e+00_dp, 1.01409632024120888e-06_dp,& + 4.36831411403733670e-06_dp, 1.47156694458407933e-05_dp, 4.26471698655039871e-05_dp, 1.10913726307929666e-04_dp, 2.66058980170149045e-04_dp, 5.99179766226317343e-04_dp,& + 1.28222314284284615e-03_dp, 2.62997912749839136e-03_dp, 5.20382011759427769e-03_dp, 9.98220585354878814e-03_dp, 1.86364744122212017e-02_dp, 3.39706152505146533e-02_dp,& + 6.06138426345598294e-02_dp, 1.06100631413093172e-01_dp, 1.82548009071161421e-01_dp, 3.09287976144302701e-01_dp, 5.17203741948951023e-01_dp, 8.56873541617053647e-01_dp,& + 1.41832565744026207e+00_dp, 2.40026352880592597e+00_dp, 4.53061282785091457e+00_dp] + aw%aw_erange_matrix(:, 38) = [2.19404256848981043e-07_dp, 1.84893021480692055e-06_dp, 8.43625704482602870e-06_dp, 2.98539805089761292e-05_dp, 9.02519223531514164e-05_dp,& + 2.44242657282476964e-04_dp, 6.08129647216171612e-04_dp, 1.41799756751927273e-03_dp, 3.13453794163316875e-03_dp, 6.62735814303910126e-03_dp, 1.34918126483430569e-02_dp,& + 2.65829458200730478e-02_dp, 5.08996208966378191e-02_dp, 9.50257265065573287e-02_dp, 1.73447302844207202e-01_dp, 3.10236178966879494e-01_dp, 5.44868696002544395e-01_dp,& + 9.41469060432773341e-01_dp, 1.60404226603196398e+00_dp, 2.70449668138230370e+00_dp, 4.54873608362962933e+00_dp, 7.82544076598920668e+00_dp, 6.33674353720899892e-07_dp,& + 3.16142029665097347e-06_dp, 1.15345020495897742e-05_dp, 3.50716751174244654e-05_dp, 9.43328038257060746e-05_dp, 2.32109865626505300e-04_dp, 5.33339583218342948e-04_dp,& + 1.16022830478211113e-03_dp, 2.41270135549469158e-03_dp, 4.83023949766437938e-03_dp, 9.36025275674355617e-03_dp, 1.76318741011527759e-02_dp, 3.23946358386633729e-02_dp,& + 5.82122731713006977e-02_dp, 1.02548721779660013e-01_dp, 1.77459667457144227e-01_dp, 3.02251570077447795e-01_dp, 5.07857954639636011e-01_dp, 8.45025080919816096e-01_dp,& + 1.40406690406700996e+00_dp, 2.38393910989210678e+00_dp, 4.51203496554961259e+00_dp] + aw%aw_erange_matrix(:, 39) = [1.88351987687530526e-07_dp, 1.65516314143432405e-06_dp, 7.76785348869954718e-06_dp, 2.79714222719367443e-05_dp, 8.55649156628721677e-05_dp,& + 2.33566931271817656e-04_dp, 5.85434841966541754e-04_dp, 1.37238105469931603e-03_dp, 3.04706477699641810e-03_dp, 6.46630606172341350e-03_dp, 1.32057750849448336e-02_dp,& + 2.60912206996127931e-02_dp, 5.00794300971465628e-02_dp, 9.36962113326961776e-02_dp, 1.71351144739202293e-01_dp, 3.07021398554227165e-01_dp, 5.40075954336806552e-01_dp,& + 9.34533420128018766e-01_dp, 1.59432099391613225e+00_dp, 2.69133052375000670e+00_dp, 4.53152801808002970e+00_dp, 7.80365554201054845e+00_dp, 5.51739955394908927e-07_dp,& + 2.88965349261451595e-06_dp, 1.07885628952105954e-05_dp, 3.32527414287060681e-05_dp, 9.02854705937388568e-05_dp, 2.23718084617662434e-04_dp, 5.16899809855151391e-04_dp,& + 1.12951230425542559e-03_dp, 2.35760844161404847e-03_dp, 4.73493932271073885e-03_dp, 9.20075307202328566e-03_dp, 1.73730417593908858e-02_dp, 3.19869002325735771e-02_dp,& + 5.75886203437633443e-02_dp, 1.01623229464899281e-01_dp, 1.76129789220076022e-01_dp, 3.00407486887453057e-01_dp, 5.05402669684611339e-01_dp, 8.41905915259029580e-01_dp,& + 1.40030742906647565e+00_dp, 2.37963135568394124e+00_dp, 4.50713289901048153e+00_dp] + aw%aw_erange_matrix(:, 40) = [1.23463765871970068e-07_dp, 1.24227014851891724e-06_dp, 6.30099821315938331e-06_dp, 2.37495954184466969e-05_dp, 7.48900605176096643e-05_dp,& + 2.08968957693649965e-04_dp, 5.32666280583382590e-04_dp, 1.26553213999849889e-03_dp, 2.84091478504491443e-03_dp, 6.08477333004282805e-03_dp, 1.25251097567092018e-02_dp,& + 2.49165105968512969e-02_dp, 4.81132640892589572e-02_dp, 9.04993115648662916e-02_dp, 1.66296983651955499e-01_dp, 2.99251001169452469e-01_dp, 5.28465936613628950e-01_dp,& + 9.17699371327465596e-01_dp, 1.57068501829206730e+00_dp, 2.65927189410928433e+00_dp, 4.48957841416491110e+00_dp, 7.75050185857576590e+00_dp, 3.80362342875479197e-07_dp,& + 2.29776591986583113e-06_dp, 9.11381832026984379e-06_dp, 2.90972858209795715e-05_dp, 8.09262360808636432e-05_dp, 2.04132278747352609e-04_dp, 4.78246163371334081e-04_dp,& + 1.05685121252171066e-03_dp, 2.22661125745068867e-03_dp, 4.50733829706144711e-03_dp, 8.81836131340562289e-03_dp, 1.67503996067354943e-02_dp, 3.10030960016899580e-02_dp,& + 5.60797619815002549e-02_dp, 9.93786263009129034e-02_dp, 1.72897283618897418e-01_dp, 2.95916166307739981e-01_dp, 4.99412180283538731e-01_dp, 8.34284318373271327e-01_dp,& + 1.39111094836104243e+00_dp, 2.36908715257658553e+00_dp, 4.49513452427299054e+00_dp] + aw%aw_erange_matrix(:, 41) = [1.02979676562400021e-07_dp, 1.10854968898761468e-06_dp, 5.80971202290333547e-06_dp, 2.23025644309457052e-05_dp, 7.11719810020676382e-05_dp,& + 2.00298943958802087e-04_dp, 5.13894394260241950e-04_dp, 1.22723782279953353e-03_dp, 2.76657497214461779e-03_dp, 5.94647117621023135e-03_dp, 1.22772700541065420e-02_dp,& + 2.44871162678800998e-02_dp, 4.73921055980099926e-02_dp, 8.93231782165937738e-02_dp, 1.64432528157402086e-01_dp, 2.96377581020370262e-01_dp, 5.24163324919575291e-01_dp,& + 9.11448679670500250e-01_dp, 1.56189379176514986e+00_dp, 2.64733075596364120e+00_dp, 4.47393507086348041e+00_dp, 7.73066360217537518e+00_dp, 3.26171811190760098e-07_dp,& + 2.10104899061767922e-06_dp, 8.53914972141398519e-06_dp, 2.76455700276699606e-05_dp, 7.76156655549408933e-05_dp, 1.97138891792050330e-04_dp, 4.64340969794496488e-04_dp,& + 1.03055189846285229e-03_dp, 2.17895340158323885e-03_dp, 4.42417057412375098e-03_dp, 8.67809718203898725e-03_dp, 1.65212418851616687e-02_dp, 3.06399342642522041e-02_dp,& + 5.55212911142715648e-02_dp, 9.85458312366256639e-02_dp, 1.71695339933153363e-01_dp, 2.94242876376668128e-01_dp, 4.97176480282642719e-01_dp, 8.31435706595659907e-01_dp,& + 1.38766992546048185e+00_dp, 2.36513945874929021e+00_dp, 4.49064259579510860e+00_dp] + case(24) + aw%energy_range(:) = [700.0_dp, 8.00e+02_dp, 9.00e+02_dp, 1.00e+03_dp, 2.00e+03_dp, 3.00e+03_dp,& + 4.00e+03_dp, 5.00e+03_dp, 6.00e+03_dp, 7.00e+03_dp, 8.00e+03_dp, 9.00e+03_dp, 1.00e+04_dp, 2.00e+04_dp,& + 3.00e+04_dp, 4.00e+04_dp, 5.00e+04_dp, 6.00e+04_dp, 7.00e+04_dp, 8.00e+04_dp, 9.00e+04_dp, 1.00e+05_dp,& + 2.00e+05_dp, 3.00e+05_dp, 4.00e+05_dp, 5.00e+05_dp, 6.00e+05_dp, 7.00e+05_dp, 9.00e+05_dp, 1.00e+06_dp,& + 2.00e+06_dp, 3.00e+06_dp, 4.00e+06_dp, 8.00e+06_dp, 2.00e+07_dp, 3.00e+07_dp, 4.00e+07_dp, 5.00e+07_dp,& + 6.00e+07_dp, 7.00e+07_dp] + aw%aw_erange_matrix(:, 1) = [4.61317700479576837e-04_dp, 2.46443268044606398e-03_dp, 6.21345008294119528e-03_dp, 1.19897132374405420e-02_dp, 2.02739670923447989e-02_dp,& + 3.18377099027178576e-02_dp, 4.78641607352428139e-02_dp, 7.00932512854925693e-02_dp, 1.00995744524275372e-01_dp, 1.44001017114561369e-01_dp, 2.03812472187446275e-01_dp,& + 2.86844291102829552e-01_dp, 4.01816272151374665e-01_dp, 5.60555452265255383e-01_dp, 7.79074123523174955e-01_dp, 1.07902724507158587e+00_dp, 1.48971094898826495e+00_dp,& + 2.05088065362743333e+00_dp, 2.81692631784065739e+00_dp, 3.86357451267436502e+00_dp, 5.29999983565710409e+00_dp, 7.29459539669274015e+00_dp, 1.01439426048849182e+01_dp,& + 1.45461238319090658e+01_dp, 1.18767724263906926e-03_dp, 2.84226242662972452e-03_dp, 4.70164567550286974e-03_dp, 6.92948268053140016e-03_dp, 9.76556987556314801e-03_dp,& + 1.35567096474764615e-02_dp, 1.87833434726818599e-02_dp, 2.60829208461077489e-02_dp, 3.62884493956485005e-02_dp, 5.04988006632740294e-02_dp, 7.01833384580881903e-02_dp,& + 9.73204001278768216e-02_dp, 1.34577004251765914e-01_dp, 1.85546146090968617e-01_dp, 2.55067662909368387e-01_dp, 3.49675457527506173e-01_dp, 4.78250711655921312e-01_dp,& + 6.53047794479161281e-01_dp, 8.91478429703930542e-01_dp, 1.21963437813600217e+00_dp, 1.68034347718683685e+00_dp, 2.35520511567018120e+00_dp, 3.44298876450068247e+00_dp,& + 5.72565205661532151e+00_dp] + aw%aw_erange_matrix(:, 2) = [4.11980014757813294e-04_dp, 2.20218766663119207e-03_dp, 5.55862987655223253e-03_dp, 1.07453858648086705e-02_dp, 1.82164123493948234e-02_dp,& + 2.87041419880564239e-02_dp, 4.33359895250264304e-02_dp, 6.37736777702597457e-02_dp, 9.23826170114171730e-02_dp, 1.32457260670822530e-01_dp, 1.88535709332668000e-01_dp,& + 2.66836289436336582e-01_dp, 3.75853089494852632e-01_dp, 5.27160408446637252e-01_dp, 7.36497424890991237e-01_dp, 1.02523787513350029e+00_dp, 1.42240794982540342e+00_dp,& + 1.96753139965474189e+00_dp, 2.71483737564820293e+00_dp, 3.73999376922786686e+00_dp, 5.15223275732461516e+00_dp, 7.12008431709909395e+00_dp, 9.94016617156099969e+00_dp,& + 1.43097188153594352e+01_dp, 1.06080168802775662e-03_dp, 2.54170514486310849e-03_dp, 4.21420577207505098e-03_dp, 6.23348669844608384e-03_dp, 8.82867531556557998e-03_dp,& + 1.23323780583169552e-02_dp, 1.72055167230363085e-02_dp, 2.40604218131138421e-02_dp, 3.37013637092306306e-02_dp, 4.71970817466301068e-02_dp, 6.59863937004311618e-02_dp,& + 9.20172060027153044e-02_dp, 1.27927606892525386e-01_dp, 1.77286101655570294e-01_dp, 2.44917205757472778e-01_dp, 3.37355128111671732e-01_dp, 4.63504613240878216e-01_dp,& + 6.35674025908022466e-01_dp, 8.71362734772751835e-01_dp, 1.19677651746772584e+00_dp, 1.65485388494679975e+00_dp, 2.32722153133878740e+00_dp, 3.41234946707974229e+00_dp,& + 5.69022770301579861e+00_dp] + aw%aw_erange_matrix(:, 3) = [3.72806520431575163e-04_dp, 1.99388436321399796e-03_dp, 5.03811424246158705e-03_dp, 9.75517179974083257e-03_dp, 1.65765442512157170e-02_dp,& + 2.62016561693737791e-02_dp, 3.97104181416016513e-02_dp, 5.86977067051166548e-02_dp, 8.54388560953810161e-02_dp, 1.23112995790628954e-01_dp, 1.76116725194692542e-01_dp,& + 2.50500112554284782e-01_dp, 3.54562363691661109e-01_dp, 4.99658274778876366e-01_dp, 7.01288277111772440e-01_dp, 9.80578466724679298e-01_dp, 1.36631525250825869e+00_dp,& + 1.89781419909175453e+00_dp, 2.62915704460106348e+00_dp, 3.63595379763080739e+00_dp, 5.02748284753467001e+00_dp, 6.97239513779703390e+00_dp, 9.76735138988749441e+00_dp,& + 1.41088911813171514e+01_dp, 9.60054683003752954e-04_dp, 2.30285140794512459e-03_dp, 3.82626089893532912e-03_dp, 5.67832873667764668e-03_dp, 8.07909101155888758e-03_dp,& + 1.13488960778253562e-02_dp, 1.59317538928749752e-02_dp, 2.24184032766560244e-02_dp, 3.15885952094700703e-02_dp, 4.44852695692428135e-02_dp, 6.25207250741233039e-02_dp,& + 8.76159789193741573e-02_dp, 1.22383066659518827e-01_dp, 1.70367866048186239e-01_dp, 2.36379862462686358e-01_dp, 3.26951588065993282e-01_dp, 4.51006378864590440e-01_dp,& + 6.20898175320340973e-01_dp, 8.54202371646161751e-01_dp, 1.17722564617834635e+00_dp, 1.63300707797638411e+00_dp, 2.30320448441095449e+00_dp, 3.38603970674368115e+00_dp,& + 5.65982601526982343e+00_dp] + aw%aw_erange_matrix(:, 4) = [3.40894989658156158e-04_dp, 1.82413360015617294e-03_dp, 4.61364657059914075e-03_dp, 8.94685377476417409e-03_dp, 1.52360305182347028e-02_dp,& + 2.41521932880958377e-02_dp, 3.67341083233717822e-02_dp, 5.45185761920902526e-02_dp, 7.97026688006645112e-02_dp, 1.15365325762695883e-01_dp, 1.65780012083858674e-01_dp,& + 2.36849876892240685e-01_dp, 3.36703186808777699e-01_dp, 4.76501207076854616e-01_dp, 6.71532675088139408e-01_dp, 9.42702715780466827e-01_dp, 1.31858217642094422e+00_dp,& + 1.83829760971432665e+00_dp, 2.55579468298687518e+00_dp, 3.54662686975614116e+00_dp, 4.92011019612566258e+00_dp, 6.84500370663874502e+00_dp, 9.61801465982363268e+00_dp,& + 1.39350872540719504e+01_dp, 8.77977092803098593e-04_dp, 2.10811603342637727e-03_dp, 3.50954342145100209e-03_dp, 5.22417896258082007e-03_dp, 7.46417514899641848e-03_dp,& + 1.05391312290683773e-02_dp, 1.48782012757832979e-02_dp, 2.10532969348070191e-02_dp, 2.98229050916155036e-02_dp, 4.22074870861415263e-02_dp, 5.95959414534450033e-02_dp,& + 8.38852069850493515e-02_dp, 1.17663630726851889e-01_dp, 1.64456093340965559e-01_dp, 2.29057495231711011e-01_dp, 3.17997376089129424e-01_dp, 4.40213987897014047e-01_dp,& + 6.08100391202702206e-01_dp, 8.39298888882065830e-01_dp, 1.16020653656844219e+00_dp, 1.61395451350079222e+00_dp, 2.28223380167740286e+00_dp, 3.36305647785424844e+00_dp,& + 5.63328102292555677e+00_dp] + aw%aw_erange_matrix(:, 5) = [1.88795805568305188e-04_dp, 1.01400115142319413e-03_dp, 2.58300392260153115e-03_dp, 5.06584363608998407e-03_dp, 8.76730367286805874e-03_dp,& + 1.41958066456900449e-02_dp, 2.21500852814415922e-02_dp, 3.38258175595678862e-02_dp, 5.09607130548969528e-02_dp, 7.60446026209399273e-02_dp, 1.12620940361637653e-01_dp,& + 1.65710194214140877e-01_dp, 2.42397023416488389e-01_dp, 3.52640217042394732e-01_dp, 5.10388023217978382e-01_dp, 7.35116678054602901e-01_dp, 1.05396843833842668e+00_dp,& + 1.50477651092529774e+00_dp, 2.14050598056043739e+00_dp, 3.03623428950970142e+00_dp, 4.30143635337295560e+00_dp, 6.10556518287263117e+00_dp, 8.74579010501390641e+00_dp,& + 1.29148008998208805e+01_dp, 4.86654817252449518e-04_dp, 1.17725533742895250e-03_dp, 1.98830281754513094e-03_dp, 3.02701082824698847e-03_dp, 4.45920039261790517e-03_dp,& + 6.52920049323299067e-03_dp, 9.57628576953010319e-03_dp, 1.40613554274847882e-02_dp, 2.06184517578951940e-02_dp, 3.01329443607712862e-02_dp, 4.38468275407232905e-02_dp,& + 6.34991502937741203e-02_dp, 9.15159897521184845e-02_dp, 1.31269865123574248e-01_dp, 1.87436793299735255e-01_dp, 2.66494955363848318e-01_dp, 3.77442432795629668e-01_dp,& + 5.32890432269656378e-01_dp, 7.50891768492044198e-01_dp, 1.05843323548548329e+00_dp, 1.49929102855462681e+00_dp, 2.15548436751696793e+00_dp, 3.22390716218214379e+00_dp,& + 5.47281923289078875e+00_dp] + aw%aw_erange_matrix(:, 6) = [1.33427979879733433e-04_dp, 7.18433254841546395e-04_dp, 1.83906927024921757e-03_dp, 3.63506515744753747e-03_dp, 6.36149785981150306e-03_dp,& + 1.04491270264946770e-02_dp, 1.65795527241529989e-02_dp, 2.57813106025258330e-02_dp, 3.95671230072276656e-02_dp, 6.01362603417052582e-02_dp, 9.06664868182099210e-02_dp,& + 1.35726987616870548e-01_dp, 2.01856747454321001e-01_dp, 2.98370867095851700e-01_dp, 4.38482092638891707e-01_dp, 6.40861383013148767e-01_dp, 9.31820828562283765e-01_dp,& + 1.34841254883383077e+00_dp, 1.94297380038203182e+00_dp, 2.79022945855977467e+00_dp, 3.99967675626622343e+00_dp, 5.74114862457286090e+00_dp, 8.31217874731993867e+00_dp,& + 1.24040095890847244e+01_dp, 3.44130368286081915e-04_dp, 8.36706427768368899e-04_dp, 1.42714852826577037e-03_dp, 2.20633507238329448e-03_dp, 3.31708266638522549e-03_dp,& + 4.97022951206217267e-03_dp, 7.45981483004476333e-03_dp, 1.11925033131611302e-02_dp, 1.67408732612223804e-02_dp, 2.49202508268891523e-02_dp, 3.68922396160049557e-02_dp,& + 5.43053576506714181e-02_dp, 7.94882733701729322e-02_dp, 1.15716499858170993e-01_dp, 1.67582052787808633e-01_dp, 2.41511378984097774e-01_dp, 3.46509438124794511e-01_dp,& + 4.95283964065632909e-01_dp, 7.06101175609208598e-01_dp, 1.00628208022072796e+00_dp, 1.44000076131204913e+00_dp, 2.08954179767392523e+00_dp, 3.15133029335533754e+00_dp,& + 5.38929409080123012e+00_dp] + aw%aw_erange_matrix(:, 7) = [1.04250475968719529e-04_dp, 5.62434846586883390e-04_dp, 1.44529215232509214e-03_dp, 2.87438545558675335e-03_dp, 5.07444496778178353e-03_dp,& + 8.42791403765329357e-03_dp, 1.35428891589042914e-02_dp, 2.13430157659925332e-02_dp, 3.31995961636812609e-02_dp, 5.11278905675659201e-02_dp, 7.80713885758039378e-02_dp,& + 1.18306355073952013e-01_dp, 1.78012762503832633e-01_dp, 2.66076339391266126e-01_dp, 3.95212155199796689e-01_dp, 5.83537857385897696e-01_dp, 8.56785151592705407e-01_dp,& + 1.25144833027563851e+00_dp, 1.81940222905018301e+00_dp, 2.63509388185717119e+00_dp, 3.80800630789495509e+00_dp, 5.50822584360313794e+00_dp, 8.03357315982872500e+00_dp,& + 1.20744336863641823e+01_dp, 2.68996632674163355e-04_dp, 6.56625167389525942e-04_dp, 1.12870041866375997e-03_dp, 1.76601824232699143e-03_dp, 2.69672945425687835e-03_dp,& + 4.11011475066255620e-03_dp, 6.27162578892574273e-03_dp, 9.55395941180009305e-03_dp, 1.44904153087516245e-02_dp, 2.18501207381241840e-02_dp, 3.27402220142435363e-02_dp,& + 4.87465497783093477e-02_dp, 7.21287903700857935e-02_dp, 1.06091753018451918e-01_dp, 1.55163298946024042e-01_dp, 2.25725405889390468e-01_dp, 3.26776910843770640e-01_dp,& + 4.71080795343457037e-01_dp, 6.77041874442256497e-01_dp, 9.72210621290131027e-01_dp, 1.40104765578737966e+00_dp, 2.04605142372271365e+00_dp, 3.10338539062153806e+00_dp,& + 5.33417799388986769e+00_dp] + aw%aw_erange_matrix(:, 8) = [8.60702692156677649e-05_dp, 4.65114939959932621e-04_dp, 1.19907141731334676e-03_dp, 2.39707428680903433e-03_dp, 4.26279719994325425e-03_dp,& + 7.14473113931465495e-03_dp, 1.15991031196004540e-02_dp, 1.84755620863822669e-02_dp, 2.90453917178807412e-02_dp, 4.51928342290498289e-02_dp, 6.96930782895108097e-02_dp,& + 1.06609942703662974e-01_dp, 1.61860507551532584e-01_dp, 2.44013029323841529e-01_dp, 3.65410912297271961e-01_dp, 5.43754167744837758e-01_dp, 8.04331171810440226e-01_dp,& + 1.18320390842443945e+00_dp, 1.73188145034004104e+00_dp, 2.52458166839406806e+00_dp, 3.67076033844195226e+00_dp, 5.34069001995255821e+00_dp, 7.83242599609456835e+00_dp,& + 1.18357747699633205e+01_dp, 2.22168392942659196e-04_dp, 5.44112340898784920e-04_dp, 9.41381930808274890e-04_dp, 1.48771980108678759e-03_dp, 2.30078547368130389e-03_dp,& + 3.55441144055798327e-03_dp, 5.49385058844628626e-03_dp, 8.46781237274265262e-03_dp, 1.29813311762030457e-02_dp, 1.97695679484370945e-02_dp, 2.98989679463123291e-02_dp,& + 4.49078586761989459e-02_dp, 6.70028857513928350e-02_dp, 9.93334764617979371e-02_dp, 1.46375777052357187e-01_dp, 2.14473541561244596e-01_dp, 3.12615211071711419e-01_dp,& + 4.53599442273293074e-01_dp, 6.55931125535817783e-01_dp, 9.47333528911167511e-01_dp, 1.37249031352070938e+00_dp, 2.01407793455765693e+00_dp, 3.06809337921977532e+00_dp,& + 5.29363780354398639e+00_dp] + aw%aw_erange_matrix(:, 9) = [7.35869645249009983e-05_dp, 3.98222439617148128e-04_dp, 1.02950700202266679e-03_dp, 2.06738844202907076e-03_dp, 3.69979762146187881e-03_dp,& + 6.24960775740759315e-03_dp, 1.02338223116612819e-02_dp, 1.64461400978437935e-02_dp, 2.60820040112540938e-02_dp, 4.09257216998439588e-02_dp, 6.36231823837244415e-02_dp,& + 9.80737721947836233e-02_dp, 1.49989582730209625e-01_dp, 2.27689481649009401e-01_dp, 3.43222681429479259e-01_dp, 5.13955927425115533e-01_dp, 7.64820623024491164e-01_dp,& + 1.13152686170774897e+00_dp, 1.66528148450246660e+00_dp, 2.44010733200013785e+00_dp, 3.56542795473851504e+00_dp, 5.21166099607335731e+00_dp, 7.67705939750003274e+00_dp,& + 1.16510073290945790e+01_dp, 1.90006553496260215e-04_dp, 4.66679698561009014e-04_dp, 8.11972748891158828e-04_dp, 1.29432004627338948e-03_dp, 2.02335419246756076e-03_dp,& + 3.16110715631146965e-03_dp, 4.93756480024014170e-03_dp, 7.68324601351366970e-03_dp, 1.18813996660679481e-02_dp, 1.82405979747101814e-02_dp, 2.77950589275952030e-02_dp,& + 4.20451221695035682e-02_dp, 6.31545619227385918e-02_dp, 9.42274356570295957e-02_dp, 1.39696660640596132e-01_dp, 2.05872670840081984e-01_dp, 3.01732069454644758e-01_dp,& + 4.40098225879962446e-01_dp, 6.39552987516172733e-01_dp, 9.27957121150538633e-01_dp, 1.35017632361663553e+00_dp, 1.98903921323124511e+00_dp, 3.04042851829495486e+00_dp,& + 5.26187676953501082e+00_dp] + aw%aw_erange_matrix(:, 10) = [6.44514573999347920e-05_dp, 3.49225738643587041e-04_dp, 9.05098491367132977e-04_dp, 1.82487183604718010e-03_dp, 3.28411412095126363e-03_dp,& + 5.58544158928153938e-03_dp, 9.21480458048908220e-03_dp, 1.49216002458564274e-02_dp, 2.38410458106975941e-02_dp, 3.76776768918578378e-02_dp, 5.89735493136651773e-02_dp,& + 9.14951983715417694e-02_dp, 1.40788103345794030e-01_dp, 2.14967214972540538e-01_dp, 3.25839716358234444e-01_dp, 4.90496392665096093e-01_dp, 7.33570921668526221e-01_dp,& + 1.09047737920517407e+00_dp, 1.61216535544398987e+00_dp, 2.37248792813998666e+00_dp, 3.48083475126634134e+00_dp, 5.10774102813810416e+00_dp, 7.55163007644648143e+00_dp,& + 1.15015619316919242e+01_dp, 1.66465131597940633e-04_dp, 4.09900723438320251e-04_dp, 7.16764476367776548e-04_dp, 1.15129869659960074e-03_dp, 1.81671653497322556e-03_dp,& + 2.86564216197924930e-03_dp, 4.51598565603269098e-03_dp, 7.08380410476581145e-03_dp, 1.10347859186615826e-02_dp, 1.70558170237268512e-02_dp, 2.61546028825580430e-02_dp,& + 3.97999906179644716e-02_dp, 6.01199150029828877e-02_dp, 9.01801073240176276e-02_dp, 1.34376404462795612e-01_dp, 1.98989782083773575e-01_dp, 2.92984668785511437e-01_dp,& + 4.29202352242147200e-01_dp, 6.26286398050400872e-01_dp, 9.12211091526156537e-01_dp, 1.33199552795959963e+00_dp, 1.96860108029619463e+00_dp, 3.01782812607916640e+00_dp,& + 5.23594152400877633e+00_dp] + aw%aw_erange_matrix(:, 11) = [5.74573911142637605e-05_dp, 3.11684623020712826e-04_dp, 8.09635130832271513e-04_dp, 1.63834818633580115e-03_dp, 2.96333997615317278e-03_dp,& + 5.07066619532897059e-03_dp, 8.42087391253820358e-03_dp, 1.37271063464835565e-02_dp, 2.20751546004689554e-02_dp, 3.51037841908612078e-02_dp, 5.52690030169233279e-02_dp,& + 8.62266873666506506e-02_dp, 1.33382837623802902e-01_dp, 2.04680840684917709e-01_dp, 3.11723207399472901e-01_dp, 4.71366094888306608e-01_dp, 7.07988534202323549e-01_dp,& + 1.05674961893049946e+00_dp, 1.56837521684017522e+00_dp, 2.31656811658794703e+00_dp, 3.41068391151613692e+00_dp, 5.02135579453298764e+00_dp, 7.44715654865751109e+00_dp,& + 1.13768882928525468e+01_dp, 1.48438750838859814e-04_dp, 3.66354657591505713e-04_dp, 6.43528711138076251e-04_dp, 1.04077773951916867e-03_dp, 1.65601701224966317e-03_dp,& + 2.63413631151620305e-03_dp, 4.18317594997089440e-03_dp, 6.60730297325672587e-03_dp, 1.03575971916804524e-02_dp, 1.61027348493536226e-02_dp, 2.48280067198096421e-02_dp,& + 3.79754683209380384e-02_dp, 5.76423555260552750e-02_dp, 8.68612913875122794e-02_dp, 1.29995688217542371e-01_dp, 1.93300157685571572e-01_dp, 2.85727088968599663e-01_dp,& + 4.20131176055101696e-01_dp, 6.15206996762805436e-01_dp, 8.99025069289258183e-01_dp, 1.31673677564042046e+00_dp, 1.95142115546416606e+00_dp, 2.99881719873486530e+00_dp,& + 5.21413327144736982e+00_dp] + aw%aw_erange_matrix(:, 12) = [5.19194844599093182e-05_dp, 2.81938310272364628e-04_dp, 7.33891254313736381e-04_dp, 1.49004253136384920e-03_dp, 2.70751936584285148e-03_dp,& + 4.65849717247361281e-03_dp, 7.78222394784469640e-03_dp, 1.27614307050279169e-02_dp, 2.06403321636805109e-02_dp, 3.30021402713332468e-02_dp, 5.22298565539675783e-02_dp,& + 8.18850557283881259e-02_dp, 1.27254363843749468e-01_dp, 1.96133703097384510e-01_dp, 2.99948891930471528e-01_dp, 4.55352600399399010e-01_dp, 6.86501888848262798e-01_dp,& + 1.02833225371209092e+00_dp, 1.53137179368997578e+00_dp, 2.26918848143912966e+00_dp, 3.35110440223032890e+00_dp, 4.94783619446950329e+00_dp, 7.35808960155657665e+00_dp,& + 1.12704558919221842e+01_dp, 1.34163112709142986e-04_dp, 3.31820004635060867e-04_dp, 5.85292383956380639e-04_dp, 9.52525712116287344e-04_dp, 1.52695895112218939e-03_dp,& + 2.44697373117672189e-03_dp, 3.91234116246991139e-03_dp, 6.21720431912608975e-03_dp, 9.80020195791868332e-03_dp, 1.53143843958859476e-02_dp, 2.37256997067326163e-02_dp,& + 3.64529621596812875e-02_dp, 5.55666229010075563e-02_dp, 8.40702126792006177e-02_dp, 1.26298364826408188e-01_dp, 1.88481852726078480e-01_dp, 2.79561367968087338e-01_dp,& + 4.12401859887934819e-01_dp, 6.05741037023105555e-01_dp, 8.87732639884163621e-01_dp, 1.30364414849327814e+00_dp, 1.93666021655104847e+00_dp, 2.98247296013335905e+00_dp,& + 5.19538978702465215e+00_dp] + aw%aw_erange_matrix(:, 13) = [4.74186432943696765e-05_dp, 2.57746697458575752e-04_dp, 6.72215423261009561e-04_dp, 1.36904849982412988e-03_dp, 2.49822952531189102e-03_dp,& + 4.32007260453564409e-03_dp, 7.25562191687022153e-03_dp, 1.19615994316679373e-02_dp, 1.94465690339826643e-02_dp, 3.12459287321233924e-02_dp, 4.96795967508927919e-02_dp,& + 7.82273487251369526e-02_dp, 1.22071872432134465e-01_dp, 1.88880212928117241e-01_dp, 2.89923179188923408e-01_dp, 4.41674209821309227e-01_dp, 6.68093992391500135e-01_dp,& + 1.00391918666630020e+00_dp, 1.49950080486156123e+00_dp, 2.22828459865320605e+00_dp, 3.29956003603171188e+00_dp, 4.88411601355048663e+00_dp, 7.28077788598311759e+00_dp,& + 1.11779608830889874e+01_dp, 1.22559089642059892e-04_dp, 3.03711714289307680e-04_dp, 5.37776362192977984e-04_dp, 8.80243545699582047e-04_dp, 1.42070033407478650e-03_dp,& + 2.29195134187792178e-03_dp, 3.68670370867581459e-03_dp, 5.89048389132385431e-03_dp, 9.33114202532726519e-03_dp, 1.46480918768852972e-02_dp, 2.27903209466914676e-02_dp,& + 3.51561724177167217e-02_dp, 5.37923877258781602e-02_dp, 8.16765885661760588e-02_dp, 1.23117559944136062e-01_dp, 1.84324333905412557e-01_dp, 2.74226332070221845e-01_dp,& + 4.05696473576583005e-01_dp, 5.97509585343210525e-01_dp, 8.77892506855791011e-01_dp, 1.29221601746443571e+00_dp, 1.92376053724517249e+00_dp, 2.96818176516477417e+00_dp,& + 5.17900498532960363e+00_dp] + aw%aw_erange_matrix(:, 14) = [2.61083791822088096e-05_dp, 1.42941529537112346e-04_dp, 3.78238298307792835e-04_dp, 7.88329163685841622e-04_dp, 1.48366706040521873e-03_dp,& + 2.65832050595232044e-03_dp, 4.63167445906838716e-03_dp, 7.91463449746751015e-03_dp, 1.33137928011505726e-02_dp, 2.20900805920563811e-02_dp, 3.61964230826096120e-02_dp,& + 5.86305139732095984e-02_dp, 9.39547021811209387e-02_dp, 1.49057156701848881e-01_dp, 2.34259870304458884e-01_dp, 3.64924444193215181e-01_dp, 5.63775440324342236e-01_dp,& + 8.64276277219052314e-01_dp, 1.31561809087683490e+00_dp, 1.99041393475007755e+00_dp, 2.99768336390155410e+00_dp, 4.50863479760469854e+00_dp, 6.82288522285185906e+00_dp,& + 1.06279521240912498e+01_dp, 6.75881961905316794e-05_dp, 1.69941829583506848e-04_dp, 3.09660645286637180e-04_dp, 5.28449765678521083e-04_dp, 8.93909737450426485e-04_dp,& + 1.50755454518753588e-03_dp, 2.52260544486072663e-03_dp, 4.17515964100183094e-03_dp, 6.82943561603700355e-03_dp, 1.10428692695803531e-02_dp, 1.76609395891629099e-02_dp,& + 2.79551936600397379e-02_dp, 4.38230950360496002e-02_dp, 6.80758902725479981e-02_dp, 1.04851842353276908e-01_dp, 1.60209704371014588e-01_dp, 2.42988684117548870e-01_dp,& + 3.66088449395505444e-01_dp, 5.48495011204098826e-01_dp, 8.18883412230972274e-01_dp, 1.22328644924849317e+00_dp, 1.84563625570733736e+00_dp, 2.88146370066102930e+00_dp,& + 5.07966645973249964e+00_dp] + aw%aw_erange_matrix(:, 15) = [1.84166877500424847e-05_dp, 1.01338248367429024e-04_dp, 2.70891966570577041e-04_dp, 5.73694488797580346e-04_dp, 1.10214286207274627e-03_dp,& + 2.01979102326085933e-03_dp, 3.59919332013810796e-03_dp, 6.28346253476893234e-03_dp, 1.07836615736264969e-02_dp, 1.82283844401024825e-02_dp, 3.03902691978087669e-02_dp,& + 5.00259315263227727e-02_dp, 8.13821346394924122e-02_dp, 1.30944068492507670e-01_dp, 2.08534415819745522e-01_dp, 3.28919285252216531e-01_dp, 5.14148465757719220e-01_dp,& + 7.96974976579003069e-01_dp, 1.22592434973876929e+00_dp, 1.87310901935587482e+00_dp, 2.84735349060911780e+00_dp, 4.32006788637914774e+00_dp, 6.59132616815617300e+00_dp,& + 1.03482965837111074e+01_dp, 4.77290069970175520e-05_dp, 1.21229034727591870e-04_dp, 2.25323962158315027e-04_dp, 3.95274223967029151e-04_dp, 6.88280321531956432e-04_dp,& + 1.19144209154864065e-03_dp, 2.03962888495879150e-03_dp, 3.44498476015290189e-03_dp, 5.73982220072231236e-03_dp, 9.43952078562288431e-03_dp, 1.53354254075933113e-02_dp,& + 2.46314750288419253e-02_dp, 3.91438412593936233e-02_dp, 6.15909001408859735e-02_dp, 9.60125940056078819e-02_dp, 1.48376380429630472e-01_dp, 2.27458649535560359e-01_dp,& + 3.46156859171918130e-01_dp, 5.23555793005025527e-01_dp, 7.88565881874275010e-01_dp, 1.18758903687419193e+00_dp, 1.80494770837808072e+00_dp, 2.83617741341719309e+00_dp,& + 5.02784446982277977e+00_dp] + aw%aw_erange_matrix(:, 16) = [1.43794768756607054e-05_dp, 7.94407267743463643e-05_dp, 2.14087932379079663e-04_dp, 4.59136410574220309e-04_dp, 8.96028446508450216e-04_dp,& + 1.66976560805800903e-03_dp, 3.02439562000179516e-03_dp, 5.36142841649881168e-03_dp, 9.33261828251444152e-03_dp, 1.59834223811472532e-02_dp, 2.69719480469838291e-02_dp,& + 4.49000383443473317e-02_dp, 7.38097878200917878e-02_dp, 1.19922436646304767e-01_dp, 1.92730359779763410e-01_dp, 3.06601683045230333e-01_dp, 4.83130261167591724e-01_dp,& + 7.54583091101484027e-01_dp, 1.16902310938102127e+00_dp, 1.79820599818541327e+00_dp, 2.75080499784322763e+00_dp, 4.19835486807251801e+00_dp, 6.44124697922546652e+00_dp,& + 1.01664653479358034e+01_dp, 3.72987233959718080e-05_dp, 9.55023307763634883e-05_dp, 1.80306769262708713e-04_dp, 3.23000597716850072e-04_dp, 5.74384980429340519e-04_dp,& + 1.01281517270836044e-03_dp, 1.76185443937899150e-03_dp, 3.01850376221718007e-03_dp, 5.09455509525917009e-03_dp, 8.47801039225177903e-03_dp, 1.39245855006621139e-02_dp,& + 2.25932205171958285e-02_dp, 3.62453228422488644e-02_dp, 5.75358316723112370e-02_dp, 9.04363388859761169e-02_dp, 1.40849109314211712e-01_dp, 2.17502832012251235e-01_dp,& + 3.33286821824373858e-01_dp, 5.07345903543043319e-01_dp, 7.68745571632986624e-01_dp, 1.16413988586492589e+00_dp, 1.77812850683180224e+00_dp, 2.80627812635434282e+00_dp,& + 4.99364996097974512e+00_dp] + aw%aw_erange_matrix(:, 17) = [1.18698686593928831e-05_dp, 6.57987372519803132e-05_dp, 1.78547872493372021e-04_dp, 3.86965633398256553e-04_dp, 7.64927524801522433e-04_dp,& + 1.44461477591216773e-03_dp, 2.65033992561638154e-03_dp, 4.75461176520393294e-03_dp, 8.36747964438012796e-03_dp, 1.44754415456443269e-02_dp, 2.46547347360661258e-02_dp,& + 4.13957363940960638e-02_dp, 6.85920817827494478e-02_dp, 1.12272209497015801e-01_dp, 1.81685535435211376e-01_dp, 2.90905349470154673e-01_dp, 4.61185157968011961e-01_dp,& + 7.24426017410617407e-01_dp, 1.12833880171398193e+00_dp, 1.74440310606512305e+00_dp, 2.68116884929595223e+00_dp, 4.11025744803576565e+00_dp, 6.33230139095818423e+00_dp,& + 1.00341731712209583e+01_dp, 3.08118052761882747e-05_dp, 7.94316379583479926e-05_dp, 1.51946049989422485e-04_dp, 2.76867314429344680e-04_dp, 5.00546327724966239e-04_dp,& + 8.95303265024346073e-04_dp, 1.57678048653578742e-03_dp, 2.73118078633072508e-03_dp, 4.65550196358321608e-03_dp, 7.81784620563788155e-03_dp, 1.29478320850938706e-02_dp,& + 2.11711793130857778e-02_dp, 3.42085251400267229e-02_dp, 5.46671320559994553e-02_dp, 8.64666120186466519e-02_dp, 1.35458776456228530e-01_dp, 2.10333988073563849e-01_dp,& + 3.23971999669050770e-01_dp, 4.95558891813246472e-01_dp, 7.54273716590565968e-01_dp, 1.14696009064139304e+00_dp, 1.75843162533584119e+00_dp, 2.78429279390467688e+00_dp,& + 4.96851608304748105e+00_dp] + aw%aw_erange_matrix(:, 18) = [1.01493431280495660e-05_dp, 5.64287459736858947e-05_dp, 1.54048782241414248e-04_dp, 3.36923608381857085e-04_dp, 6.73292683860254046e-04_dp,& + 1.28578896967230009e-03_dp, 2.38399572301077958e-03_dp, 4.31864823262937802e-03_dp, 7.66826727101123547e-03_dp, 1.33744831265954194e-02_dp, 2.29508473085234047e-02_dp,& + 3.88018974502402081e-02_dp, 6.47063094043532072e-02_dp, 1.06542423418234347e-01_dp, 1.73369498044410736e-01_dp, 2.79028802966647560e-01_dp, 4.44504455672566912e-01_dp,& + 7.01405979754009423e-01_dp, 1.09716150449456173e+00_dp, 1.70302614499239291e+00_dp, 2.62744582849347097e+00_dp, 4.04210657742671842e+00_dp, 6.24783410420217855e+00_dp,& + 9.93142792023963317e+00_dp, 2.63626597308958994e-05_dp, 6.83685184434004267e-05_dp, 1.32281726070828857e-04_dp, 2.44526922853104708e-04_dp, 4.48128899840554611e-04_dp,& + 8.10914556311444754e-04_dp, 1.44254868588091119e-03_dp, 2.52097880352028861e-03_dp, 4.33180300591165697e-03_dp, 7.32769485138720818e-03_dp, 1.22179195528638145e-02_dp,& + 2.01021318534979378e-02_dp, 3.26687760109587166e-02_dp, 5.24871984612843082e-02_dp, 8.34353088058046727e-02_dp, 1.31323922327678949e-01_dp, 2.04811435442679157e-01_dp,& + 3.16767923821470954e-01_dp, 4.86409942277473528e-01_dp, 7.43005052876108962e-01_dp, 1.13354766795262840e+00_dp, 1.74302496515801608e+00_dp, 2.76708003629181443e+00_dp,& + 4.94884391877995977e+00_dp] + aw%aw_erange_matrix(:, 19) = [8.89159792421571919e-06_dp, 4.95679759385973532e-05_dp, 1.36053541829094280e-04_dp, 2.99977481659800306e-04_dp, 6.05167956636287752e-04_dp,& + 1.16678643116254008e-03_dp, 2.18286506262262972e-03_dp, 3.98697545429172167e-03_dp, 7.13264240424145868e-03_dp, 1.25257332181879580e-02_dp, 2.16295848923911474e-02_dp,& + 3.67796513829504942e-02_dp, 6.16616759570113027e-02_dp, 1.02032133648366691e-01_dp, 1.66795229349862156e-01_dp, 2.69602214582802258e-01_dp, 4.31215560915994778e-01_dp,& + 6.83003680179501083e-01_dp, 1.07215935945554053e+00_dp, 1.66974905151588637e+00_dp, 2.58412884818207900e+00_dp, 3.98703522675006061e+00_dp, 6.17945438240648137e+00_dp,& + 9.84813569764865449e+00_dp, 2.31090359611159263e-05_dp, 6.02520826232466015e-05_dp, 1.17764151694591736e-04_dp, 2.20423029443349397e-04_dp, 4.08645842617014101e-04_dp,& + 7.46742145461516856e-04_dp, 1.33964120871897128e-03_dp, 2.35868484184250304e-03_dp, 4.08029370297597824e-03_dp, 6.94465896923445857e-03_dp, 1.16445004865607972e-02_dp,& + 1.92581817007345599e-02_dp, 3.14477152838842297e-02_dp, 5.07511400667911144e-02_dp, 8.10116930296266996e-02_dp, 1.28005765901508001e-01_dp, 2.00364381438578598e-01_dp,& + 3.10948256083292796e-01_dp, 4.78997560880030648e-01_dp, 7.33851748304701790e-01_dp, 1.12262978179298445e+00_dp, 1.73046443461699351e+00_dp, 2.75303631908657787e+00_dp,& + 4.93279721463345133e+00_dp] + aw%aw_erange_matrix(:, 20) = [7.92943492811425830e-06_dp, 4.43119886893608735e-05_dp, 1.22228438916328571e-04_dp, 2.71462597082496330e-04_dp, 5.52266425565187515e-04_dp,& + 1.07374597432597870e-03_dp, 2.02455078893148087e-03_dp, 3.72424731470214062e-03_dp, 6.70586488633590980e-03_dp, 1.18458140458168742e-02_dp, 2.05658987513696045e-02_dp,& + 3.51442089237571711e-02_dp, 5.91890323565376700e-02_dp, 9.83549064639916010e-02_dp, 1.61415871849318354e-01_dp, 2.61863081860778169e-01_dp, 4.20271543291650895e-01_dp,& + 6.67804863119458081e-01_dp, 1.05145486973064473e+00_dp, 1.64212563949061630e+00_dp, 2.54809424129414674e+00_dp, 3.94113788444330471e+00_dp, 6.12237951803294411e+00_dp,& + 9.77853300456316532e+00_dp, 2.06192331618514530e-05_dp, 5.40232427598474560e-05_dp, 1.06560123283953070e-04_dp, 2.01663689689283911e-04_dp, 3.77635630469695682e-04_dp,& + 6.95932200646762786e-04_dp, 1.25760040368501206e-03_dp, 2.22852306033233727e-03_dp, 3.87749916160977023e-03_dp, 6.63431088389790976e-03_dp, 1.11778258007327515e-02_dp,& + 1.85685094452199342e-02_dp, 3.04460612739809039e-02_dp, 4.93219665747793509e-02_dp, 7.90098877663644311e-02_dp, 1.25256618914649454e-01_dp, 1.96669278768011990e-01_dp,& + 3.06099682906322057e-01_dp, 4.72806941866720010e-01_dp, 7.26190639008665206e-01_dp, 1.11347540533697198e+00_dp, 1.71991912047126894e+00_dp, 2.74123817138487302e+00_dp,& + 4.91931883283546956e+00_dp] + aw%aw_erange_matrix(:, 21) = [7.16803627752296239e-06_dp, 4.01472861242540915e-05_dp, 1.11245581550157771e-04_dp, 2.48715393760719119e-04_dp, 5.09832385277932164e-04_dp,& + 9.98664196884188442e-04_dp, 1.89603649313176896e-03_dp, 3.50978968722603793e-03_dp, 6.35572049443416942e-03_dp, 1.12853755554045646e-02_dp, 1.96853755382704262e-02_dp,& + 3.37850528172386894e-02_dp, 5.71266496204200641e-02_dp, 9.52775123910288707e-02_dp, 1.56900006222728733e-01_dp, 2.55347499709513814e-01_dp, 4.11033133743181289e-01_dp,& + 6.54943032172548123e-01_dp, 1.03389409665238108e+00_dp, 1.61864812042625017e+00_dp, 2.51741167839956104e+00_dp, 3.90199569344713248e+00_dp, 6.07364192296369865e+00_dp,& + 9.71903856517508125e+00_dp, 1.86483698557531051e-05_dp, 4.90798524334996915e-05_dp, 9.76228211832427784e-05_dp, 1.86586179919061534e-04_dp, 3.52510875396298037e-04_dp,& + 6.54476032558140510e-04_dp, 1.19026386844131257e-03_dp, 2.12113611193764668e-03_dp, 3.70941336484984733e-03_dp, 6.37599906979002557e-03_dp, 1.07879045037535207e-02_dp,& + 1.79902231510591024e-02_dp, 2.96034208909502425e-02_dp, 4.81160033294198430e-02_dp, 7.73159166920895230e-02_dp, 1.22924046545293070e-01_dp, 1.93526319649241829e-01_dp,& + 3.01966139537300782e-01_dp, 4.67518202278870365e-01_dp, 7.19633505022078235e-01_dp, 1.10562814659246533e+00_dp, 1.71086947711974235e+00_dp, 2.73110774807190726e+00_dp,& + 4.90774746482512736e+00_dp] + aw%aw_erange_matrix(:, 22) = [6.54949147016424086e-06_dp, 3.67599211858730431e-05_dp, 1.02291500164715865e-04_dp, 2.30098974047354389e-04_dp, 4.74930005243569232e-04_dp,& + 9.36573543839715889e-04_dp, 1.78919693255239561e-03_dp, 3.33062482114044114e-03_dp, 6.06187997524775934e-03_dp, 1.08131197488804381e-02_dp, 1.89406030311630204e-02_dp,& + 3.26314625686266457e-02_dp, 5.53706182403844657e-02_dp, 9.26495368264531882e-02_dp, 1.53033136019531224e-01_dp, 2.49754228873652645e-01_dp, 4.03083928263728630e-01_dp,& + 6.43852135287927729e-01_dp, 1.01872118657447630e+00_dp, 1.59832643757846027e+00_dp, 2.49081087202628870e+00_dp, 3.86801386852845352e+00_dp, 6.03128197184597514e+00_dp,& + 9.66728464063949744e+00_dp, 1.70468480459040007e-05_dp, 4.50533009508492739e-05_dp, 9.03089046067231504e-05_dp, 1.74162345743696236e-04_dp, 3.31659425896218565e-04_dp,& + 6.19857458060724576e-04_dp, 1.13373860134602334e-03_dp, 2.03057927006095170e-03_dp, 3.56709326293176438e-03_dp, 6.15647623537543282e-03_dp, 1.04554160078639425e-02_dp,& + 1.74955809810295078e-02_dp, 2.88805867702902064e-02_dp, 4.70787375241496497e-02_dp, 7.58552793104651651e-02_dp, 1.20908097467212469e-01_dp, 1.90804104268044533e-01_dp,& + 2.98378767154727942e-01_dp, 4.62919868474127638e-01_dp, 7.13923126866968127e-01_dp, 1.09878506894649397e+00_dp, 1.70297020149869560e+00_dp, 2.72226075711566873e+00_dp,& + 4.89764341611014054e+00_dp] + aw%aw_erange_matrix(:, 23) = [3.62316384899741436e-06_dp, 2.06662589591035961e-05_dp, 5.93867981928769439e-05_dp, 1.39664500034251184e-04_dp, 3.02392953597313812e-04_dp,& + 6.23913220384252542e-04_dp, 1.24158348366475721e-03_dp, 2.39714437510383811e-03_dp, 4.50785328572772450e-03_dp, 8.28120766800075590e-03_dp, 1.48975198963633287e-02_dp,& + 2.62969675682382595e-02_dp, 4.56258770476314496e-02_dp, 7.79234553364625548e-02_dp, 1.31168639852292268e-01_dp, 2.17862779049170785e-01_dp, 3.57407097284327568e-01_dp,& + 5.79664656849280702e-01_dp, 9.30329070134009117e-01_dp, 1.47922848122994299e+00_dp, 2.33408033532110970e+00_dp, 3.66687452965429594e+00_dp, 5.77960966222481343e+00_dp,& + 9.35891569613454344e+00_dp, 9.46282935694829789e-06_dp, 2.58239371914388208e-05_dp, 5.47876477692921878e-05_dp, 1.12357899174281211e-04_dp, 2.25410508844244435e-04_dp,& + 4.39823252088218024e-04_dp, 8.34658513466712024e-04_dp, 1.54415035187728013e-03_dp, 2.79222575559080624e-03_dp, 4.94654471638751418e-03_dp, 8.60219334755443939e-03_dp,& + 1.47099223834576687e-02_dp, 2.47707250906284218e-02_dp, 4.11284759244666259e-02_dp, 6.74067205235111266e-02_dp, 1.09157124591444152e-01_dp, 1.74821633710288610e-01_dp,& + 2.77175755009873737e-01_dp, 4.35575233193674860e-01_dp, 6.79781417253571218e-01_dp, 1.05768662814925518e+00_dp, 1.65537289255531617e+00_dp, 2.66886452835402821e+00_dp,& + 4.83668577282495349e+00_dp] + aw%aw_erange_matrix(:, 24) = [2.56687094857670747e-06_dp, 1.48140478608297225e-05_dp, 4.35497791130441602e-05_dp, 1.05483081347521106e-04_dp, 2.35279200779714979e-04_dp,& + 4.98716166471356516e-04_dp, 1.01631470784968917e-03_dp, 2.00367258026344771e-03_dp, 3.83831240431013699e-03_dp, 7.16862405397350293e-03_dp, 1.30889059367504789e-02_dp,& + 2.34169831350073999e-02_dp, 4.11292984187428753e-02_dp, 7.10353848964340034e-02_dp, 1.20813060809651041e-01_dp, 2.02583315021552357e-01_dp, 3.35289428889970098e-01_dp,& + 5.48278572538722253e-01_dp, 8.86719055490787444e-01_dp, 1.41999108109747230e+00_dp, 2.25556255062890854e+00_dp, 3.56548544062999051e+00_dp, 5.65210809347542398e+00_dp,& + 9.20209037623522264e+00_dp, 6.72075406470941075e-06_dp, 1.87685583158872635e-05_dp, 4.13668609905263349e-05_dp, 8.80705285290741191e-05_dp, 1.82104310081710000e-04_dp,& + 3.64206856695979675e-04_dp, 7.05845136760333502e-04_dp, 1.33003091463308461e-03_dp, 2.44448090513076869e-03_dp, 4.39402586807451350e-03_dp, 7.74244744853903443e-03_dp,& + 1.33988214598457188e-02_dp, 2.28105603270823097e-02_dp, 3.82556134740365747e-02_dp, 6.32811652381851802e-02_dp, 1.03358286124759155e-01_dp, 1.66857298877244459e-01_dp,& + 2.66514261343302805e-01_dp, 4.21712108726296664e-01_dp, 6.62346025261959515e-01_dp, 1.03657129271470283e+00_dp, 1.63081056713585570e+00_dp, 2.64124764570998494e+00_dp,& + 4.80517466483982947e+00_dp] + aw%aw_erange_matrix(:, 25) = [2.01189546515375101e-06_dp, 1.17233648244081383e-05_dp, 3.50959117953791644e-05_dp, 8.69336997157480054e-05_dp, 1.98162808962633010e-04_dp,& + 4.28198887734239765e-04_dp, 8.87310707804653417e-04_dp, 1.77499333157769465e-03_dp, 3.44404039243215946e-03_dp, 6.50571406299224695e-03_dp, 1.19998262339639714e-02_dp,& + 2.16660879508208393e-02_dp, 3.83716824509428289e-02_dp, 6.67773897929400395e-02_dp, 1.14364666796375455e-01_dp, 1.93004773521509243e-01_dp, 3.21338201704145010e-01_dp,& + 5.28368394359665539e-01_dp, 8.58910473987573475e-01_dp, 1.38203960453247343e+00_dp, 2.20504874997767697e+00_dp, 3.50002411369846511e+00_dp, 5.56954749675741123e+00_dp,& + 9.10031727857536055e+00_dp, 5.27841311303466373e-06_dp, 1.50189207592488828e-05_dp, 3.40851587092681632e-05_dp, 7.45495484921219001e-05_dp, 1.57451713073147425e-04_dp,& + 3.20381451057778646e-04_dp, 6.30059109418049687e-04_dp, 1.20240733871348647e-03_dp, 2.23481334346221916e-03_dp, 4.05744093651400767e-03_dp, 7.21380013754863766e-03_dp,& + 1.25857693863473327e-02_dp, 2.15855187408655474e-02_dp, 3.64472744823981926e-02_dp, 6.06670935229573008e-02_dp, 9.96614146138858764e-02_dp, 1.61751005459189912e-01_dp,& + 2.59642830354010423e-01_dp, 4.12734473920376044e-01_dp, 6.51007217786149228e-01_dp, 1.02279085179190932e+00_dp, 1.61473916165854003e+00_dp, 2.62315361076397657e+00_dp,& + 4.78453508191765398e+00_dp] + aw%aw_erange_matrix(:, 26) = [1.66650804957725690e-06_dp, 9.79195922229785925e-06_dp, 2.97671963956997093e-05_dp, 7.50889943280584854e-05_dp, 1.74120549715566273e-04_dp,& + 3.81901310856980159e-04_dp, 8.01589645444458201e-04_dp, 1.62141965041956676e-03_dp, 3.17676475082105583e-03_dp, 6.05256166106276500e-03_dp, 1.12497586142683032e-02_dp,& + 2.04520438710679604e-02_dp, 3.64478368323097671e-02_dp, 6.37901575616463962e-02_dp, 1.09817537982207961e-01_dp, 1.86218609625028619e-01_dp, 3.11411354298047838e-01_dp,& + 5.14145288920909826e-01_dp, 8.38972998045112384e-01_dp, 1.35474093066610513e+00_dp, 2.16860835622923531e+00_dp, 3.45268305902671191e+00_dp, 5.50971944265975022e+00_dp,& + 9.02645357677880433e+00_dp, 4.37996254015510915e-06_dp, 1.26639117157945443e-05_dp, 2.94358206429358304e-05_dp, 6.57479994815268992e-05_dp, 1.41144005156891599e-04_dp,& + 2.91016833733939099e-04_dp, 5.78733039505662308e-04_dp, 1.11517019493301544e-03_dp, 2.09031926898599211e-03_dp, 3.82378124258229632e-03_dp, 6.84438590118669875e-03_dp,& + 1.20142093327273401e-02_dp, 2.07196220387161727e-02_dp, 3.51626591189038648e-02_dp, 5.88014907670197443e-02_dp, 9.70117352483137046e-02_dp, 1.58076631362593256e-01_dp,& + 2.54680227579877017e-01_dp, 4.06229158366321563e-01_dp, 6.42766719215347226e-01_dp, 1.01275123016837187e+00_dp, 1.60300933245512400e+00_dp, 2.60993519962017695e+00_dp,& + 4.76945988476785665e+00_dp] + aw%aw_erange_matrix(:, 27) = [1.42943695055503615e-06_dp, 8.46165424382126785e-06_dp, 2.60698401100851063e-05_dp, 6.67814196952674276e-05_dp, 1.57061980096056565e-04_dp,& + 3.48699609753426410e-04_dp, 7.39534350906485968e-04_dp, 1.50932350422760685e-03_dp, 2.98025358505948608e-03_dp, 5.71723340985497933e-03_dp, 1.06915099200873675e-02_dp,& + 1.95437765453790706e-02_dp, 3.50017679326257297e-02_dp, 6.15351694963551937e-02_dp, 1.06371585743293251e-01_dp, 1.81057398934298813e-01_dp, 3.03836641250375683e-01_dp,& + 5.03259532047688363e-01_dp, 8.23671639355172513e-01_dp, 1.33373790244342372e+00_dp, 2.14050999882194981e+00_dp, 3.41611042866982118e+00_dp, 5.46342911645605334e+00_dp,& + 8.96923709909895805e+00_dp, 3.76280666490803481e-06_dp, 1.10349192639900207e-05_dp, 2.61749472871830625e-05_dp, 5.94785304240196910e-05_dp, 1.29381396050283660e-04_dp,& + 2.69624782417856625e-04_dp, 5.41030666856124102e-04_dp, 1.05062825583379063e-03_dp, 1.98274016404487120e-03_dp, 3.64883628530559678e-03_dp, 6.56639788172501491e-03_dp,& + 1.15821299145321133e-02_dp, 2.00622942977296825e-02_dp, 3.41837277229397746e-02_dp, 5.73747999305673703e-02_dp, 9.49788229467453393e-02_dp, 1.55249040753075052e-01_dp,& + 2.50850676871953726e-01_dp, 4.01196417731231325e-01_dp, 6.36377279055782896e-01_dp, 1.00495221581774308e+00_dp, 1.59388478284124879e+00_dp, 2.59964533909053719e+00_dp,& + 4.75772623961460805e+00_dp] + aw%aw_erange_matrix(:, 28) = [1.25593072779015605e-06_dp, 7.48509099235730312e-06_dp, 2.33380690075558333e-05_dp, 6.05862425351964338e-05_dp, 1.44216985724140322e-04_dp,& + 3.23477349893590250e-04_dp, 6.92027615642327380e-04_dp, 1.42292839335073692e-03_dp, 2.82790124968306227e-03_dp, 5.45589697607193076e-03_dp, 1.02544101565129903e-02_dp,& + 1.88296350361601139e-02_dp, 3.38604593210769314e-02_dp, 5.97492896911544571e-02_dp, 1.03633917275519655e-01_dp, 1.76945222267432978e-01_dp, 2.97785582188463460e-01_dp,& + 4.94542408381846377e-01_dp, 8.11391530926075077e-01_dp, 1.31684830884414028e+00_dp, 2.11787478911631055e+00_dp, 3.38660403430587609e+00_dp, 5.42603669207294903e+00_dp,& + 8.92297581960380093e+00_dp, 3.31083107841461289e-06_dp, 9.83462735015609646e-06_dp, 2.37431616737304026e-05_dp, 5.47422903320507240e-05_dp, 1.20404032431273536e-04_dp,& + 2.53165446792662674e-04_dp, 5.11825542614317668e-04_dp, 1.00034096162128451e-03_dp, 1.89849149621014197e-03_dp, 3.51120721241224461e-03_dp, 6.34681078723501029e-03_dp,& + 1.12395614532896839e-02_dp, 1.95393860050951801e-02_dp, 3.34025813261771970e-02_dp, 5.62331329589741413e-02_dp, 9.33477903750834642e-02_dp, 1.52974946772401754e-01_dp,& + 2.47763903298591159e-01_dp, 3.97131605130562226e-01_dp, 6.31207427889815320e-01_dp, 9.98632371583498379e-01_dp, 1.58648264165129627e+00_dp, 2.59129305213222505e+00_dp,& + 4.74820305492783490e+00_dp] + aw%aw_erange_matrix(:, 29) = [1.01778594648656121e-06_dp, 6.13964731036603379e-06_dp, 1.95437043381015915e-05_dp, 5.18826467221919149e-05_dp, 1.25959840810346862e-04_dp,& + 2.87251594465221492e-04_dp, 6.23174152494021744e-04_dp, 1.29672357902945769e-03_dp, 2.60381073572208722e-03_dp, 5.06916370135518206e-03_dp, 9.60407022854281069e-03_dp,& + 1.77619303644410004e-02_dp, 3.21466090409059171e-02_dp, 5.70568253617527582e-02_dp, 9.94914935344446277e-02_dp, 1.70702308494943306e-01_dp, 2.88571152142299225e-01_dp,& + 4.81231097389002938e-01_dp, 7.92591691975457646e-01_dp, 1.29093228148162753e+00_dp, 2.08307176405047878e+00_dp, 3.34115706531417889e+00_dp, 5.36836180585040168e+00_dp,& + 8.85154518963745929e+00_dp, 2.68997557333974691e-06_dp, 8.17318793142506686e-06_dp, 2.03264410175787538e-05_dp, 4.79845597463935636e-05_dp, 1.07440884457087255e-04_dp,& + 2.29172855787619596e-04_dp, 4.68916988302596819e-04_dp, 9.25955715518831149e-04_dp, 1.77312743317322493e-03_dp, 3.30532793617600807e-03_dp, 6.01677224026092323e-03_dp,& + 1.07224755421114620e-02_dp, 1.87470115600596697e-02_dp, 3.22146730966314590e-02_dp, 5.44912851539835832e-02_dp, 9.08517990792797603e-02_dp, 1.49485166818382670e-01_dp,& + 2.43014842555163008e-01_dp, 3.90863195448717893e-01_dp, 6.23218401902415731e-01_dp, 9.88849326774313808e-01_dp, 1.57500959510431038e+00_dp, 2.57833868291318158e+00_dp,& + 4.73343442147548998e+00_dp] + aw%aw_erange_matrix(:, 30) = [9.32182506534499083e-07_dp, 5.65427050047378655e-06_dp, 1.81641642924285632e-05_dp, 4.86843580634723421e-05_dp, 1.19179404603004141e-04_dp,& + 2.73671187884923781e-04_dp, 5.97153185443552881e-04_dp, 1.24869564104713331e-03_dp, 2.51801395372686782e-03_dp, 4.92030585912688317e-03_dp, 9.35256125525345955e-03_dp,& + 1.73472617732815110e-02_dp, 3.14784531695425571e-02_dp, 5.60035198389070496e-02_dp, 9.78658552320255670e-02_dp, 1.68245317352748835e-01_dp, 2.84935135760699454e-01_dp,& + 4.75965809488915204e-01_dp, 7.85139110856129308e-01_dp, 1.28063839499368748e+00_dp, 2.06922374707535184e+00_dp, 3.32304676889775541e+00_dp, 5.34535083343202011e+00_dp,& + 8.82301987561054979e+00_dp, 2.46663401521989575e-06_dp, 7.57112122388445892e-06_dp, 1.90707407840366502e-05_dp, 4.54661847163986995e-05_dp, 1.02558395312991546e-04_dp,& + 2.20060394488419609e-04_dp, 4.52506637725504329e-04_dp, 8.97337131127042280e-04_dp, 1.72464367837495440e-03_dp, 3.22533744287678255e-03_dp, 5.88801225850025742e-03_dp,& + 1.05199906179829199e-02_dp, 1.84356786606557875e-02_dp, 3.17464912516325359e-02_dp, 5.38028411029115722e-02_dp, 8.98627198152701229e-02_dp, 1.48098961240044624e-01_dp,& + 2.41124261770076231e-01_dp, 3.88362754098591501e-01_dp, 6.20025938789660280e-01_dp, 9.84934139986923918e-01_dp, 1.57041302902575808e+00_dp, 2.57314565679063278e+00_dp,& + 4.72751471396439804e+00_dp] + aw%aw_erange_matrix(:, 31) = [5.25590892574421312e-07_dp, 3.33043832380041068e-06_dp, 1.14431096247839162e-05_dp, 3.27431485458530691e-05_dp, 8.46350992273292666e-05_dp,& + 2.03153259621234258e-04_dp, 4.59821285980971557e-04_dp, 9.91650001765859547e-04_dp, 2.05322006704024111e-03_dp, 4.10523807758926031e-03_dp, 7.96233658384974327e-03_dp,& + 1.50356841335305951e-02_dp, 2.77253004357191461e-02_dp, 5.00458991089591035e-02_dp, 8.86130494935644941e-02_dp, 1.54180051460468925e-01_dp, 2.64010700262742870e-01_dp,& + 4.45519145014729834e-01_dp, 7.41854921517251187e-01_dp, 1.22061484027573153e+00_dp, 1.98819245481561180e+00_dp, 3.21675627422806087e+00_dp, 5.20996853074945587e+00_dp,& + 8.65488645350951025e+00_dp, 1.40411871441283978e-06_dp, 4.65945746373287958e-06_dp, 1.28088836351098766e-05_dp, 3.25470686510014471e-05_dp, 7.69739430187918623e-05_dp,& + 1.71503599393232409e-04_dp, 3.63832666091625401e-04_dp, 7.40831450577037333e-04_dp, 1.45671193408331381e-03_dp, 2.77917966751328000e-03_dp, 5.16386766644335356e-03_dp,& + 9.37269395086945054e-03_dp, 1.66596630508670449e-02_dp, 2.90591748479299729e-02_dp, 4.98287886466289229e-02_dp, 8.41233836030797211e-02_dp, 1.40016424411814888e-01_dp,& + 2.30051959107940712e-01_dp, 3.73659596847667475e-01_dp, 6.01186234654401463e-01_dp, 9.61760021921176378e-01_dp, 1.54314545194367869e+00_dp, 2.54230382876726591e+00_dp,& + 4.69236395299902842e+00_dp] + aw%aw_erange_matrix(:, 32) = [3.77746786484820052e-07_dp, 2.47367412749661625e-06_dp, 8.88910608615204707e-06_dp, 2.64595599516958189e-05_dp, 7.05587839095670583e-05_dp,& + 1.73605015730760731e-04_dp, 4.00918296660801555e-04_dp, 8.79201294501707228e-04_dp, 1.84641001010475377e-03_dp, 3.73718127951488998e-03_dp, 7.32635321852410579e-03_dp,& + 1.39659443490608732e-02_dp, 2.59704105931541744e-02_dp, 4.72342122738790837e-02_dp, 8.42092467768616737e-02_dp, 1.47434278696521814e-01_dp, 2.53904839975671481e-01_dp,& + 4.30720296200788055e-01_dp, 7.20694024878018924e-01_dp, 1.19111682847565215e+00_dp, 1.94818633451092960e+00_dp, 3.16407218709918769e+00_dp, 5.14265022994814824e+00_dp,& + 8.57108216879129792e+00_dp, 1.01675696110901377e-06_dp, 3.56683154388218107e-06_dp, 1.03378032813617490e-05_dp, 2.72303186636337344e-05_dp, 6.61190130474000151e-05_dp,& + 1.50405574194169988e-04_dp, 3.24539504225176522e-04_dp, 6.70313968410577820e-04_dp, 1.33423257207291950e-03_dp, 2.57262674798155143e-03_dp, 4.82482714628009336e-03_dp,& + 8.83010058528159621e-03_dp, 1.58120634727405042e-02_dp, 2.77660334220296082e-02_dp, 4.79020030873376218e-02_dp, 8.13214175964597497e-02_dp, 1.36045354853115003e-01_dp,& + 2.24580177693445515e-01_dp, 3.66354910501169195e-01_dp, 5.91782424535910456e-01_dp, 9.50147106691224264e-01_dp, 1.52944143192368198e+00_dp, 2.52677962908059905e+00_dp,& + 4.67467516563689411e+00_dp] + aw%aw_erange_matrix(:, 33) = [2.99664078973365364e-07_dp, 2.01676529456486806e-06_dp, 7.49812484072044869e-06_dp, 2.29562789622202959e-05_dp, 6.25512438204072960e-05_dp,& + 1.56516836091155691e-04_dp, 3.66388142810575204e-04_dp, 8.12526363145498094e-04_dp, 1.72258719036366107e-03_dp, 3.51495368214549408e-03_dp, 6.93951365252978413e-03_dp,& + 1.33110102712282775e-02_dp, 2.48897248127692254e-02_dp, 4.54936440738658576e-02_dp, 8.14701439600811622e-02_dp, 1.43220425244155236e-01_dp, 2.47567293637350416e-01_dp,& + 4.21406547480265403e-01_dp, 7.07333082751402054e-01_dp, 1.17243749048047086e+00_dp, 1.92278753935211300e+00_dp, 3.13055087517012032e+00_dp, 5.09974132074687425e+00_dp,& + 8.51759375779859873e+00_dp, 8.11840237974868068e-07_dp, 2.97676437467599049e-06_dp, 8.95877340782960216e-06_dp, 2.41887320656559041e-05_dp, 5.97983195236438640e-05_dp,& + 1.37949802576712747e-04_dp, 3.01077435777808875e-04_dp, 6.27802625559085981e-04_dp, 1.25978454436160171e-03_dp, 2.44616712980497359e-03_dp, 4.61592672479145365e-03_dp,& + 8.49387389545272833e-03_dp, 1.52841394595869661e-02_dp, 2.69568604463215691e-02_dp, 4.66912232329309493e-02_dp, 7.95538490348449423e-02_dp, 1.33531359311761549e-01_dp,& + 2.21104809883150316e-01_dp, 3.61701630907670990e-01_dp, 5.85776206087097573e-01_dp, 9.42713589653869088e-01_dp, 1.52065506289460450e+00_dp, 2.51681761990832609e+00_dp,& + 4.66332558154922250e+00_dp] + aw%aw_erange_matrix(:, 34) = [1.73730848626341147e-07_dp, 1.26912975751936725e-06_dp, 5.15153823606368156e-06_dp, 1.68583242672310579e-05_dp, 4.82488018910973975e-05_dp,& + 1.25356558872712483e-04_dp, 3.02348850888272086e-04_dp, 6.87116047706990687e-04_dp, 1.48687959331074144e-03_dp, 3.08752828321902546e-03_dp, 6.18872533876025505e-03_dp,& + 1.20297098566864904e-02_dp, 2.27603976223081025e-02_dp, 4.20421469029760714e-02_dp, 7.60071669908969072e-02_dp, 1.34772064548270148e-01_dp, 2.34800518610677439e-01_dp,& + 4.02562837605401957e-01_dp, 6.80194494981714026e-01_dp, 1.13436171838198985e+00_dp, 1.87085280236007812e+00_dp, 3.06182420563061042e+00_dp, 5.01157764804825945e+00_dp,& + 8.40751494962753831e+00_dp, 4.80674357513349563e-07_dp, 1.99285021040878236e-06_dp, 6.55476843504883173e-06_dp, 1.87193473234136633e-05_dp, 4.81793844230035082e-05_dp,& + 1.14656730135680914e-04_dp, 2.56580931723435343e-04_dp, 5.46218825474838882e-04_dp, 1.11545180541612024e-03_dp, 2.19881887010929793e-03_dp, 4.20412520900342954e-03_dp,& + 7.82644901475024538e-03_dp, 1.42296156649352728e-02_dp, 2.53313747253629783e-02_dp, 4.42464196352532271e-02_dp, 7.59679212838059170e-02_dp, 1.28409035336740834e-01_dp,& + 2.13995562863774413e-01_dp, 3.52148516834832837e-01_dp, 5.73406097443571627e-01_dp, 9.27362789204974280e-01_dp, 1.50247436216476671e+00_dp, 2.49618240430330474e+00_dp,& + 4.63981967370555548e+00_dp] + aw%aw_erange_matrix(:, 35) = [8.83557997605877948e-08_dp, 7.47621325013458939e-07_dp, 3.42094325152354304e-06_dp, 1.21275048693836442e-05_dp, 3.67073078597054470e-05_dp,& + 9.94269390815720596e-05_dp, 2.47729277561915806e-04_dp, 5.77957806383662246e-04_dp, 1.27817905627881727e-03_dp, 2.70349188858008379e-03_dp, 5.50551104637513576e-03_dp,& + 1.08506159368095528e-02_dp, 2.07813764065210640e-02_dp, 3.88056832254963860e-02_dp, 7.08434483001099541e-02_dp, 1.26728575363420248e-01_dp, 2.22565577319307151e-01_dp,& + 3.84396180083315220e-01_dp, 6.53889333621266999e-01_dp, 1.09727575495089158e+00_dp, 1.82005115357550351e+00_dp, 2.99435099495450929e+00_dp, 4.92476615078199753e+00_dp,& + 8.29888537518427327e+00_dp, 2.55529326096967382e-07_dp, 1.28101632753650128e-06_dp, 4.68483136949608877e-06_dp, 1.42645386838839181e-05_dp, 3.84046913218155287e-05_dp,& + 9.45648951403460541e-05_dp, 2.17414031756023513e-04_dp, 4.73182154646426033e-04_dp, 9.84365118873844428e-04_dp, 1.97135109764810497e-03_dp, 3.82125539958089091e-03_dp,& + 7.19986438314273742e-03_dp, 1.32309845000683334e-02_dp, 2.37799409987305317e-02_dp, 4.18963448627306043e-02_dp, 7.24985040317744495e-02_dp, 1.23423627531251801e-01_dp,& + 2.07038657087652705e-01_dp, 3.42753920314871008e-01_dp, 5.61187961935596724e-01_dp, 9.12144801594348853e-01_dp, 1.48440167457457406e+00_dp, 2.47563978283315533e+00_dp,& + 4.61642377288386729e+00_dp] + aw%aw_erange_matrix(:, 36) = [6.73037114169863018e-08_dp, 6.15083928304524313e-07_dp, 2.95799200667729676e-06_dp, 1.08093200246870833e-05_dp, 3.33939114298216740e-05_dp,& + 9.18125355691171255e-05_dp, 2.31401289449927543e-04_dp, 5.44849270884113237e-04_dp, 1.21410857985279684e-03_dp, 2.58437607064648106e-03_dp, 5.29171190470389356e-03_dp,& + 1.04787688883060739e-02_dp, 2.01529709097529389e-02_dp, 3.77717105057609748e-02_dp, 6.91847136654090700e-02_dp, 1.24131995921297408e-01_dp, 2.18598244610203857e-01_dp,& + 3.78481518936924666e-01_dp, 6.45293540998941872e-01_dp, 1.08511722510447250e+00_dp, 1.80334769771032977e+00_dp, 2.97211117186446261e+00_dp, 4.89609522498911520e+00_dp,& + 8.26295542251170545e+00_dp, 1.99905590548142190e-07_dp, 1.09346719997225291e-06_dp, 4.16270885497327146e-06_dp, 1.29775979642102512e-05_dp, 3.55132473075491176e-05_dp,& + 8.85130922866433315e-05_dp, 2.05444546193259424e-04_dp, 4.50593300850056185e-04_dp, 9.43410547046450560e-04_dp, 1.89966434483849686e-03_dp, 3.69967524627809853e-03_dp,& + 6.99955720877200142e-03_dp, 1.29098322668550324e-02_dp, 2.32783313621694361e-02_dp, 4.11328258393498930e-02_dp, 7.13663368852438390e-02_dp, 1.21790184148070746e-01_dp,& + 2.04750863881002110e-01_dp, 3.39654172854953862e-01_dp, 5.57144662627416243e-01_dp, 9.07096256949488255e-01_dp, 1.47839499420113785e+00_dp, 2.46880540504772039e+00_dp,& + 4.60864108894960012e+00_dp] + aw%aw_erange_matrix(:, 37) = [5.63756690531640412e-08_dp, 5.45141297997350871e-07_dp, 2.70769884954924823e-06_dp, 1.00840013918214356e-05_dp, 3.15478386877207276e-05_dp,& + 8.75303677559782821e-05_dp, 2.22151558418467874e-04_dp, 5.25982385558769624e-04_dp, 1.17741860773814709e-03_dp, 2.51588033812328270e-03_dp, 5.16832913419365200e-03_dp,& + 1.02635057571827584e-02_dp, 1.97881815370499134e-02_dp, 3.71700157932754807e-02_dp, 6.82173313560840711e-02_dp, 1.22614657374409589e-01_dp, 2.16275737349087366e-01_dp,& + 3.75013409641876516e-01_dp, 6.40245931716625027e-01_dp, 1.07796811297597017e+00_dp, 1.79351481908389587e+00_dp, 2.95900624505579835e+00_dp, 4.87918727523437390e+00_dp,& + 8.24175408051627123e+00_dp, 1.71004560103619930e-07_dp, 9.92697182334500706e-07_dp, 3.87517398119211907e-06_dp, 1.22588587859795228e-05_dp, 3.38825784507339864e-05_dp,& + 8.50746811867344256e-05_dp, 1.98603590662673526e-04_dp, 4.37620082429083308e-04_dp, 9.19792981883775355e-04_dp, 1.85817869104775574e-03_dp, 3.62910029291854761e-03_dp,& + 6.88296869424027957e-03_dp, 1.27224568583438127e-02_dp, 2.29850377491460055e-02_dp, 4.06855229641864269e-02_dp, 7.07018891871147998e-02_dp, 1.20829997461524813e-01_dp,& + 2.03404047259240744e-01_dp, 3.37826922494642301e-01_dp, 5.54758380422972652e-01_dp, 9.04113729252530862e-01_dp, 1.47484379397260934e+00_dp, 2.46476324738877839e+00_dp,& + 4.60403828058722464e+00_dp] + aw%aw_erange_matrix(:, 38) = [4.97727334423554353e-08_dp, 5.02362703653979704e-07_dp, 2.55210099415985428e-06_dp, 9.62796532877697780e-06_dp, 3.03779168827208642e-05_dp,& + 8.48006137249868207e-05_dp, 2.16228093411334309e-04_dp, 5.13855469129673821e-04_dp, 1.15376339955213739e-03_dp, 2.47160443344679372e-03_dp, 5.08839625681514231e-03_dp,& + 1.01237778225120988e-02_dp, 1.95509905546010845e-02_dp, 3.67781907166757280e-02_dp, 6.75865115296859498e-02_dp, 1.21624002892814623e-01_dp, 2.14757714355392260e-01_dp,& + 3.72744327869088288e-01_dp, 6.36940431071695179e-01_dp, 1.07328260087689120e+00_dp, 1.78706575054210970e+00_dp, 2.95040589323683777e+00_dp, 4.86808565133181492e+00_dp,& + 8.22782834614862679e+00_dp, 1.53527937248053923e-07_dp, 9.30292090694303919e-07_dp, 3.69429667736570611e-06_dp, 1.18027092080259345e-05_dp, 3.28412887152215973e-05_dp,& + 8.28687759523755483e-05_dp, 1.94198515391785591e-04_dp, 4.29240839990999558e-04_dp, 9.04499659731136489e-04_dp, 1.83125625161053240e-03_dp, 3.58321300228387710e-03_dp,& + 6.80703685979662000e-03_dp, 1.26002412612291458e-02_dp, 2.27934815659137542e-02_dp, 4.03930275176479434e-02_dp, 7.02669241279521711e-02_dp, 1.20200804967896063e-01_dp,& + 2.02520698022807338e-01_dp, 3.36627475925464603e-01_dp, 5.53190825239166961e-01_dp, 9.02153291225225029e-01_dp, 1.47250849030304987e+00_dp, 2.46210442577815325e+00_dp,& + 4.60101076371775353e+00_dp] + aw%aw_erange_matrix(:, 39) = [4.54831153544427612e-08_dp, 4.74311903038898438e-07_dp, 2.44888557777143065e-06_dp, 9.32308394742767545e-06_dp, 2.95915288927230389e-05_dp,& + 8.29584078660507352e-05_dp, 2.12218152772813436e-04_dp, 5.05625512349111269e-04_dp, 1.13767652809357344e-03_dp, 2.44144169165903856e-03_dp, 5.03386058151400473e-03_dp,& + 1.00283211490093185e-02_dp, 1.93887642490112345e-02_dp, 3.65099283872732522e-02_dp, 6.71542261219890135e-02_dp, 1.20944571556333424e-01_dp, 2.13715815831136330e-01_dp,& + 3.71185887070233866e-01_dp, 6.34668776570053494e-01_dp, 1.07006079320012026e+00_dp, 1.78262916583945974e+00_dp, 2.94448692129155454e+00_dp, 4.86044271378568205e+00_dp,& + 8.21823878370653027e+00_dp, 1.42165942952855346e-07_dp, 8.89001610702881171e-07_dp, 3.57333074708115803e-06_dp, 1.14958044585542086e-05_dp, 3.21377578790810807e-05_dp,& + 8.13736727282972984e-05_dp, 1.91205375065229427e-04_dp, 4.23535649468275604e-04_dp, 8.94068906357722956e-04_dp, 1.81286680170237983e-03_dp, 3.55182937124549425e-03_dp,& + 6.75504634547574589e-03_dp, 1.25164764040281099e-02_dp, 2.26620736919062662e-02_dp, 4.01922123332519241e-02_dp, 6.99680751359165881e-02_dp, 1.19768218649619368e-01_dp,& + 2.01912999870729831e-01_dp, 3.35801860811374198e-01_dp, 5.52111298303506470e-01_dp, 9.00802638517182452e-01_dp, 1.47089907493926009e+00_dp, 2.46027174684356087e+00_dp,& + 4.59892398993987772e+00_dp] + aw%aw_erange_matrix(:, 40) = [4.26332790582793822e-08_dp, 4.55544206136908078e-07_dp, 2.37925183473571949e-06_dp, 9.11626334904722569e-06_dp, 2.90560504435212923e-05_dp,& + 8.17004889875167856e-05_dp, 2.09474117457653813e-04_dp, 4.99983900984721685e-04_dp, 1.12663318539456248e-03_dp, 2.42071040105016049e-03_dp, 4.99633835450934323e-03_dp,& + 9.96258442379749191e-03_dp, 1.92769570672496685e-02_dp, 3.63249095219593948e-02_dp, 6.68558923498574209e-02_dp, 1.20475406766376483e-01_dp, 2.12995986723446162e-01_dp,& + 3.70108684828051648e-01_dp, 6.33097934099508097e-01_dp, 1.06783207893617949e+00_dp, 1.77955909527023692e+00_dp, 2.94038989063624623e+00_dp, 4.85515116651880430e+00_dp,& + 8.21159837079276755e+00_dp, 1.34612764719713526e-07_dp, 8.61194007477554715e-07_dp, 3.49125284802499254e-06_dp, 1.12866852981321436e-05_dp, 3.16569858948818157e-05_dp,& + 8.03497133548326689e-05_dp, 1.89151871671935050e-04_dp, 4.19615901888986101e-04_dp, 8.86893879869551276e-04_dp, 1.80020424723260561e-03_dp, 3.53020009634539807e-03_dp,& + 6.71918701354781538e-03_dp, 1.24586613018964967e-02_dp, 2.25713186132279371e-02_dp, 4.00534441211037942e-02_dp, 6.97614577762599025e-02_dp, 1.19468999123271330e-01_dp,& + 2.01492477091762962e-01_dp, 3.35230321284752497e-01_dp, 5.51363731371360744e-01_dp, 8.99867050312488370e-01_dp, 1.46978400514046514e+00_dp, 2.45900184417820222e+00_dp,& + 4.59747803870346328e+00_dp] + aw%aw_erange_matrix(:, 41) = [3.97972590548516455e-08_dp, 4.36749112881947908e-07_dp, 2.30901822095820461e-06_dp, 8.90669065507326356e-06_dp, 2.85117175356736206e-05_dp,& + 8.04187756982368461e-05_dp, 2.06673117528046558e-04_dp, 4.94216810283568228e-04_dp, 1.11533067884091630e-03_dp, 2.39947110229914162e-03_dp, 4.95786323959217148e-03_dp,& + 9.89512729906643317e-03_dp, 1.91621474132992256e-02_dp, 3.61348098865640135e-02_dp, 6.65492040412706404e-02_dp, 1.19992874044612341e-01_dp, 2.12255329235387591e-01_dp,& + 3.68999882184251282e-01_dp, 6.31480441291888073e-01_dp, 1.06553645346505910e+00_dp, 1.77639597593752963e+00_dp, 2.93616768736423195e+00_dp, 4.84969691214935050e+00_dp,& + 8.20475280537622176e+00_dp, 1.27091452363502344e-07_dp, 8.33187435856259754e-07_dp, 3.40806720221057817e-06_dp, 1.10739933654662787e-05_dp, 3.11667995071938201e-05_dp,& + 7.93037753836723042e-05_dp, 1.87051235559900289e-04_dp, 4.15601409035354721e-04_dp, 8.79538074509779336e-04_dp, 1.78721154926010824e-03_dp, 3.50799043261123059e-03_dp,& + 6.68234146845954162e-03_dp, 1.23992217962518251e-02_dp, 2.24779652765556351e-02_dp, 3.99106362824236602e-02_dp, 6.95487353045896317e-02_dp, 1.19160818883065692e-01_dp,& + 2.01059207738448181e-01_dp, 3.34641268995125973e-01_dp, 5.50593039253774119e-01_dp, 8.98902290488593048e-01_dp, 1.46863396273117752e+00_dp, 2.45769198685639312e+00_dp,& + 4.59598661029939581e+00_dp] + case(26) + aw%energy_range(:) = [799.0_dp, 995.0_dp, 1293.0_dp, 1738.0_dp, 2238.0_dp, 3009.0_dp, 4377.0_dp,& + 6256.0_dp, 9034.0_dp, 15564.0_dp, 19500.0_dp, 22300.0_dp, 24783.0_dp, 41198.0_dp, 94407.0_dp, 189080.0_dp,& + 457444.0_dp, 2101965.0_dp, 14140999.0_dp] + aw%aw_erange_matrix(:, 1) = [0.00037867004555797054_dp, 0.002019373143542281_dp, 0.005074452374668418_dp, 0.009741339051894624_dp, 0.016351249099763064_dp,& + 0.025426574118427834_dp, 0.03775841037254848_dp, 0.05450081932003549_dp, 0.0772810957375601_dp, 0.1083363446608876_dp, 0.15069589349866513_dp,& + 0.20843076717336742_dp, 0.2869911650766578_dp, 0.3936564974164155_dp, 0.5381309695975518_dp, 0.7333307052011886_dp, 0.996427988952117_dp,& + 1.3502505778649674_dp, 1.8251937089224979_dp, 2.4619239536701665_dp, 3.3154239654767634_dp, 4.461579856601731_dp, 6.009262672635442_dp,& + 8.12630074937428_dp, 11.10929348730981_dp, 15.660501844751538_dp, 0.0009745069197489692_dp, 0.002323920525926464_dp, 0.003818499918990434_dp,& + 0.005569525222864092_dp, 0.007736056032946723_dp, 0.01054486610207425_dp, 0.014309337959120037_dp, 0.01944447015531593_dp, 0.026485944451580964_dp,& + 0.03612533116765179_dp, 0.04926670257709911_dp, 0.06710398765236568_dp, 0.09122022393749045_dp, 0.12371484118454482_dp, 0.16736960998240946_dp,& + 0.2258689406847251_dp, 0.30409900038431836_dp, 0.40856816694415354_dp, 0.548030961075663_dp, 0.7344894715293502_dp, 0.9849728438705977_dp,& + 1.3251021306723128_dp, 1.7972852200464182_dp, 2.4831111234607426_dp, 3.582848552118199_dp, 5.8876320817174905_dp] + aw%aw_erange_matrix(:, 2) = [0.00031416617596844365_dp, 0.0016768070133771967_dp, 0.004220387402167522_dp, 0.008122019548232636_dp, 0.013681535061623657_dp,& + 0.021375962641606915_dp, 0.03193242611639194_dp, 0.04641604327774391_dp, 0.0663338368572065_dp, 0.09376694799993701_dp, 0.13155072067060036_dp,& + 0.18352265415559924_dp, 0.2548586347835214_dp, 0.3525227140309385_dp, 0.4858648853075939_dp, 0.667414665262307_dp, 0.9139380450657599_dp,& + 1.2478576632771592_dp, 1.699195061182984_dp, 2.3083135493129188_dp, 3.13000622971369_dp, 4.240119346476375_dp, 5.747638276053859_dp,& + 7.820581475731412_dp, 10.755506760817696_dp, 15.2531099085639_dp, 0.0008086633399478686_dp, 0.001931716707111731_dp, 0.0031843549489835176_dp,& + 0.0046679761695975755_dp, 0.006529332077378777_dp, 0.008979243990088065_dp, 0.012309502604654843_dp, 0.016906748893981475_dp, 0.023272740862285972_dp,& + 0.03206195264016037_dp, 0.04413963056111703_dp, 0.060659468387992695_dp, 0.08316331669118938_dp, 0.11371010407957528_dp, 0.15504510373245767_dp,& + 0.21082547573489732_dp, 0.28592663287586667_dp, 0.38687165073350616_dp, 0.5224647206101295_dp, 0.7047999539903935_dp, 0.951040871895601_dp,& + 1.286968657510818_dp, 1.7551267580277088_dp, 2.437087428172129_dp, 3.5325565753903243_dp, 5.829332987897013_dp] + aw%aw_erange_matrix(:, 3) = [0.000251216262630506_dp, 0.0013422657589387847_dp, 0.0033852831378795366_dp, 0.006535679555855439_dp, 0.01105946790435755_dp,& + 0.017384205344456737_dp, 0.02616631610050564_dp, 0.03837171615696803_dp, 0.05537294469791371_dp, 0.07907682374899021_dp, 0.11210158563747868_dp,& + 0.15802208108125124_dp, 0.22170328658555793_dp, 0.3097484547351596_dp, 0.43109811316492785_dp, 0.5978298541062674_dp, 0.826228906983008_dp,& + 1.1382318360717252_dp, 1.5634041077266412_dp, 2.1417299191833186_dp, 2.9277541939220253_dp, 3.9972537939524453_dp, 5.459336924183542_dp,& + 7.482255655971381_dp, 10.362568049094785_dp, 14.79927594838438_dp, 0.0006467895131307655_dp, 0.0015483789662149572_dp, 0.002562990408244027_dp,& + 0.00378128864955077_dp, 0.005336413195947385_dp, 0.0074211270754708444_dp, 0.010302498712647285_dp, 0.014334977955021215_dp, 0.01998237358756267_dp,& + 0.027857715884000284_dp, 0.038782119259036095_dp, 0.05386231670249176_dp, 0.07459076970770032_dp, 0.10297648694866778_dp, 0.1417181535853474_dp,& + 0.19443583384059848_dp, 0.26598602063677856_dp, 0.36290208001606944_dp, 0.4940399248668749_dp, 0.671597172994337_dp, 0.9128949281590978_dp,& + 1.2439090969479831_dp, 1.7073582868867894_dp, 2.3848234540233704_dp, 3.4754029453297375_dp, 5.763153512206444_dp] + aw%aw_erange_matrix(:, 4) = [0.0001950376405774879_dp, 0.0010434591619187578_dp, 0.002638226324824606_dp, 0.005113292156951265_dp, 0.00870086598207974_dp,& + 0.013778342596377403_dp, 0.020929407226154117_dp, 0.031017048599119232_dp, 0.04527407877688829_dp, 0.06542623021788685_dp, 0.09386550782858209_dp,& + 0.1338911807639374_dp, 0.19003887760085253_dp, 0.26852546690556994_dp, 0.3778478282417773_dp, 0.5295878007623821_dp, 0.739496104873784_dp,& + 1.0289606432203449_dp, 1.427022553455354_dp, 1.9732190338166054_dp, 2.721788596346289_dp, 3.7484019634398744_dp, 5.162286381612833_dp,& + 7.131961441982249_dp, 9.954041146838616_dp, 14.32582187195048_dp, 0.0005022997712497699_dp, 0.0012056339745159519_dp, 0.0020057022650528562_dp,& + 0.0029823455742529125_dp, 0.004254672143777001_dp, 0.0059963576674781395_dp, 0.008448134528374854_dp, 0.011930608474038368_dp, 0.016868224194481772_dp,& + 0.023830776674747995_dp, 0.03359223660591877_dp, 0.04720772204797841_dp, 0.06611395904656978_dp, 0.09226211932358148_dp, 0.12829508657243463_dp,& + 0.17778587596291995_dp, 0.24556239855995798_dp, 0.3381606409098896_dp, 0.4644850568708377_dp, 0.6368412465900805_dp, 0.8727231844202037_dp,& + 1.198329166055601_dp, 1.6565902038491545_dp, 2.329130996306286_dp, 3.414441737018883_dp, 5.692646250049292_dp] + aw%aw_erange_matrix(:, 5) = [0.0001570075292014777_dp, 0.0008410019818081912_dp, 0.002131222620982682_dp, 0.004145569234358363_dp, 0.007090677510918224_dp,& + 0.011305441203226727_dp, 0.01731697219552165_dp, 0.02590771238094241_dp, 0.03820108916428952_dp, 0.05578097500511556_dp, 0.08086136666211902_dp,& + 0.11652297811189155_dp, 0.16703767866605654_dp, 0.23830959694579532_dp, 0.33847251734047956_dp, 0.47869779524697986_dp, 0.6742880172162485_dp,& + 0.9461646148413084_dp, 1.3229154365464835_dp, 1.8436824667954244_dp, 2.5624225632785795_dp, 3.5546935048363073_dp, 4.929807210724086_dp,& + 6.856512184015644_dp, 9.631510529999963_dp, 13.950799086937636_dp, 0.0004044673162152666_dp, 0.0009731515874605558_dp, 0.0016264516115000137_dp,& + 0.002435950210582391_dp, 0.0035098078378292706_dp, 0.005006471432500407_dp, 0.0071456103103081205_dp, 0.010221155980366915_dp, 0.01462678603467543_dp,& + 0.02089809034158199_dp, 0.02977080559865047_dp, 0.042257136734592034_dp, 0.059746455952240894_dp, 0.08413972088086426_dp, 0.11803003373030124_dp,& + 0.1649465354635964_dp, 0.22968730801733273_dp, 0.31878354856943114_dp, 0.44117315496449167_dp, 0.6092463295611383_dp, 0.8406397450171417_dp,& + 1.161742484167732_dp, 1.6156774111835495_dp, 2.2841323787971173_dp, 3.36513821401701_dp, 5.635684641787822_dp] + aw%aw_erange_matrix(:, 6) = [0.00012173433282636892_dp, 0.000653044843078349_dp, 0.0016597094198001826_dp, 0.0032432122902587715_dp, 0.005583731099072486_dp,& + 0.00897974690437299_dp, 0.01389829106398585_dp, 0.021035914001762628_dp, 0.03139940878203811_dp, 0.046421111007702805_dp, 0.06812376578216424_dp,& + 0.09935124887637425_dp, 0.1440867725430818_dp, 0.20788864079466032_dp, 0.29848482929563186_dp, 0.42658280937440796_dp, 0.6069727081348725_dp,& + 0.8600354677167223_dp, 1.213825493528422_dp, 1.7070100456167858_dp, 2.393195963336712_dp, 3.3477843441213753_dp, 4.680165709088339_dp,& + 6.5593534066075065_dp, 9.282192058087176_dp, 13.54332387201712_dp, 0.00031370730222591084_dp, 0.0007570695990484558_dp, 0.0012727251500342805_dp,& + 0.0019236429401252328_dp, 0.0028062999069873792_dp, 0.004062578033501044_dp, 0.00588929507373728_dp, 0.00855186255429553_dp, 0.012411138722817702_dp,& + 0.017965594962442332_dp, 0.025908461038187995_dp, 0.03720320806718786_dp, 0.05318444551258281_dp, 0.0756939715032581_dp, 0.10726485539108421_dp,& + 0.1513713746489183_dp, 0.21277116226058032_dp, 0.297982246389678_dp, 0.41597262011480124_dp, 0.5792223633874778_dp, 0.8055284041136077_dp,& + 1.1215023110944804_dp, 1.5705011278690364_dp, 2.234313406989394_dp, 3.310497107984999_dp, 5.57261913216792_dp] + aw%aw_erange_matrix(:, 7) = [8.814790587980884e-05_dp, 0.0004738555483452858_dp, 0.001209162224838196_dp, 0.0023779784718090265_dp, 0.004131730232456246_dp,& + 0.006724209366814066_dp, 0.010555208090639503_dp, 0.01622487926307075_dp, 0.02460909648355756_dp, 0.036969426022926015_dp, 0.05511124918766332_dp,& + 0.08160627715945637_dp, 0.12010201314867164_dp, 0.17574961207193285_dp, 0.2557933011845474_dp, 0.37038042948632577_dp, 0.5336738618256365_dp,& + 0.7653829566132899_dp, 1.092887558492255_dp, 1.5542408605150586_dp, 2.2025803308040364_dp, 3.113074354623969_dp, 4.395181735531908_dp,& + 6.218242520601409_dp, 8.87933263258288_dp, 13.071612343557268_dp, 0.0002272629071152242_dp, 0.0005507552663901378_dp, 0.000933441836691016_dp,& + 0.001428839311231769_dp, 0.002120237386026644_dp, 0.0031304749854564546_dp, 0.0046303259129662575_dp, 0.006853192947474817_dp, 0.01012290436688526_dp,& + 0.014894995829624644_dp, 0.021812185159477044_dp, 0.03177875816649789_dp, 0.046061554071504564_dp, 0.06642770441212868_dp, 0.09533262717257988_dp,& + 0.1361769876776064_dp, 0.19366000664329205_dp, 0.27427258699605633_dp, 0.38700765699040135_dp, 0.5444449877078907_dp, 0.7645728576669742_dp,& + 1.0742808530249828_dp, 1.517233705376216_dp, 2.175383868205045_dp, 3.245782737215517_dp, 5.498017132429984_dp] + aw%aw_erange_matrix(:, 8) = [6.476469600717215e-05_dp, 0.00034891783555501116_dp, 0.0008941569546994692_dp, 0.001770490093242039_dp, 0.003106199645499256_dp,& + 0.0051184335340408015_dp, 0.008151285145167414_dp, 0.012724953439821175_dp, 0.019606591631387022_dp, 0.029915037575018_dp, 0.04527205344500337_dp,& + 0.06801655695473027_dp, 0.10150518730808944_dp, 0.1505317627030831_dp, 0.22191039986921127_dp, 0.32528375402693044_dp, 0.4742415082162232_dp,& + 0.6878698417118773_dp, 0.9929114555738491_dp, 1.426826349178114_dp, 2.0422826887022167_dp, 2.914194983288514_dp, 4.152054985305785_dp,& + 5.925500508772846_dp, 8.531868435284434_dp, 12.663118219514553_dp, 0.00016705896835219716_dp, 0.0004066434009563924_dp, 0.0006951433499719869_dp,& + 0.0010783855735630424_dp, 0.0016285976932411544_dp, 0.002452428674095891_dp, 0.003698822692463904_dp, 0.005574655476173014_dp, 0.008372611367675033_dp,& + 0.012511058447330109_dp, 0.01858785984880576_dp, 0.027453700962179424_dp, 0.04031295449132496_dp, 0.058862610090479196_dp, 0.08548341120436852_dp,& + 0.12350282964756092_dp, 0.17755835622889385_dp, 0.25410556179535176_dp, 0.3621484874152968_dp, 0.5143475290193675_dp, 0.728860394738634_dp,& + 1.0328353641593397_dp, 1.470237966477004_dp, 2.1232087233584265_dp, 3.1884016755763915_dp, 5.431943610280663_dp] + aw%aw_erange_matrix(:, 9) = [4.714267869850108e-05_dp, 0.00025461261481751654_dp, 0.0006556761719344113_dp, 0.001308468824945838_dp, 0.002321150197926946_dp,& + 0.003878461874698709_dp, 0.006274894154406174_dp, 0.009959418801224819_dp, 0.01560204953263909_dp, 0.02419303582580116_dp, 0.03718681238787033_dp,& + 0.056707527706112246_dp, 0.08584014778037409_dp, 0.12904063424870618_dp, 0.19271144671607915_dp, 0.2860061442236756_dp, 0.4219516424878554_dp,& + 0.6190135338939492_dp, 0.903289679923842_dp, 1.3116275192031754_dp, 1.8961959695325519_dp, 2.7316203672239747_dp, 3.927395419802043_dp,& + 5.653448502577673_dp, 8.207416056488858_dp, 12.280210966173971_dp, 0.00012167157119425256_dp, 0.00029765224752192887_dp, 0.0005138446741296063_dp,& + 0.0008093181914490766_dp, 0.0012462946084647903_dp, 0.0019166924309280847_dp, 0.002949916160920999_dp, 0.004529176144148134_dp, 0.006918766955709136_dp,& + 0.010502242217013015_dp, 0.01583456242948638_dp, 0.02371430118668526_dp, 0.03528415663667773_dp, 0.05217068929971722_dp, 0.07667811497799712_dp,& + 0.11205676769912475_dp, 0.16287592945291882_dp, 0.23554669511627027_dp, 0.3390729578857381_dp, 0.4861840636834821_dp, 0.6951983617349604_dp,& + 0.9935218371108636_dp, 1.4254333766864864_dp, 2.073293734219426_dp, 3.133425653975384_dp, 5.368705541720747_dp] + aw%aw_erange_matrix(:, 10) = [2.9443353786715123e-05_dp, 0.00015968865887835848_dp, 0.0004146519996900374_dp, 0.0008385653229066657_dp, 0.0015154710444555315_dp,& + 0.002590553782265674_dp, 0.004297458120933096_dp, 0.0069977275055487075_dp, 0.011241365987483699_dp, 0.017857778834567364_dp, 0.02808897944065483_dp,& + 0.043782322061949784_dp, 0.06766742773244867_dp, 0.1037518951041952_dp, 0.1578839462681274_dp, 0.2385489270378087_dp, 0.3579930679384087_dp,& + 0.5338068043298525_dp, 0.791161589813274_dp, 1.1660045885058554_dp, 1.7097467191304874_dp, 2.496543051760848_dp, 3.635839789357852_dp,& + 5.297957374408996_dp, 7.7810148585358885_dp, 11.774676503198675_dp, 7.606243073747058e-05_dp, 0.000187654111092642_dp, 0.00032937906982910266_dp,& + 0.0005320965908695892_dp, 0.0008454741794288284_dp, 0.0013429974722876687_dp, 0.0021300795419892347_dp, 0.003360638155325681_dp, 0.005262693302642904_dp,& + 0.008173980176265023_dp, 0.0125917789247931_dp, 0.01924336061080778_dp, 0.029185562811316818_dp, 0.043945018416338716_dp, 0.0657148857554778_dp,& + 0.09763017054646428_dp, 0.1441532549628787_dp, 0.2116173831358168_dp, 0.3090075514896036_dp, 0.4491309451933545_dp, 0.6505180076674358_dp,& + 0.9409371471889534_dp, 1.3651313188527026_dp, 2.0058258806612064_dp, 3.0589785756980588_dp, 5.283171742769873_dp] + aw%aw_erange_matrix(:, 11) = [2.4221939880648916e-05_dp, 0.00013162518783252502_dp, 0.0003431050538880391_dp, 0.000698189132475488_dp, 0.001272589233863707_dp,& + 0.0021976433259721703_dp, 0.0036856546266738404_dp, 0.00606744928063478_dp, 0.009850534125738348_dp, 0.015806672884776662_dp, 0.025100760660057786_dp,& + 0.03947837634367904_dp, 0.06153686837154947_dp, 0.09511493193970912_dp, 0.14584951983758487_dp, 0.22196820786998617_dp, 0.335412339591795_dp,& + 0.5034260546260962_dp, 0.7508088209241689_dp, 1.1131398816244866_dp, 1.6415127034352714_dp, 2.409875693114849_dp, 3.527638075049888_dp,& + 5.165269756856301_dp, 7.621098250903887_dp, 11.584360794128232_dp, 6.260081073117763e-05_dp, 0.0001550481237336088_dp, 0.00027425459381644776_dp,& + 0.0004482075757040794_dp, 0.0007220779147665958_dp, 0.0011628086873198505_dp, 0.0018674017508154028_dp, 0.0029793398493427954_dp, 0.004713349903984844_dp,& + 0.00739000908391551_dp, 0.011484659947886356_dp, 0.017697084080236986_dp, 0.0270505598375803_dp, 0.04103207563980036_dp, 0.06178995726179555_dp,& + 0.09241161287658448_dp, 0.13731382654384652_dp, 0.20279428302236951_dp, 0.2978245159544139_dp, 0.43523615879690214_dp, 0.6336386632046422_dp,& + 0.9209431632237726_dp, 1.3420830429471422_dp, 1.9799449671624767_dp, 3.0303736903126226_dp, 5.250335959421828_dp] + aw%aw_erange_matrix(:, 12) = [2.1564828392874976e-05_dp, 0.00011732900716735743_dp, 0.00030658459101179467_dp, 0.0006263105810174703_dp, 0.0011476627771254888_dp,& + 0.001994368166545555_dp, 0.0033669949117497793_dp, 0.005579455105811666_dp, 0.009115754087433222_dp, 0.014715595238257124_dp, 0.023500724387693545_dp,& + 0.037159447358704495_dp, 0.058214268280899095_dp, 0.09040780191303678_dp, 0.1392561892112249_dp, 0.21283882379303048_dp, 0.32292082611394995_dp,& + 0.48654501997143224_dp, 0.728293233827829_dp, 1.0835278065593024_dp, 1.6031531143244464_dp, 2.360992062122655_dp, 3.466427749396279_dp,& + 5.090015465029667_dp, 7.53020860247837_dp, 11.47601339726731_dp, 5.574871333711635e-05_dp, 0.00013841643320123116_dp, 0.0002460246878681958_dp,& + 0.00040498060578160683_dp, 0.0006579585426571892_dp, 0.0010682911223034433_dp, 0.0017283542359863323_dp, 0.002775834478515568_dp, 0.0044179824445092115_dp,& + 0.006965640555090498_dp, 0.010881623599671406_dp, 0.01684992291318925_dp, 0.025874425224763156_dp, 0.03941906165439105_dp, 0.05960588810571241_dp,& + 0.08949416080199679_dp, 0.13347332726212882_dp, 0.1978191873760846_dp, 0.29149390319797547_dp, 0.4273416663588288_dp, 0.6240165631691874_dp,& + 0.9095125059692878_dp, 1.3288753869034111_dp, 1.9650901753832044_dp, 3.013944114046813_dp, 5.231485480677545_dp] + aw%aw_erange_matrix(:, 13) = [1.968079412594506e-05_dp, 0.00010718493641102105_dp, 0.0002806353581711279_dp, 0.0005751273705017238_dp, 0.0010584284934163331_dp,& + 0.001848589008502448_dp, 0.003137423022955394_dp, 0.005226209962089254_dp, 0.008581348030605833_dp, 0.013918427654363913_dp, 0.022326614770472653_dp,& + 0.03545081033521797_dp, 0.0557565940780925_dp, 0.0869132477657862_dp, 0.1343443806186961_dp, 0.20601549407747916_dp, 0.31355578173538573_dp,& + 0.4738522008187966_dp, 0.7113173707719063_dp, 1.061144148921342_dp, 1.574088149869358_dp, 2.323872276609698_dp, 3.4198568581275923_dp,& + 5.032662209058464_dp, 7.460841068394957_dp, 11.393228561803523_dp, 5.0889409017427654e-05_dp, 0.00012660472263169967_dp, 0.0002259210980998603_dp,& + 0.0003740655095418279_dp, 0.0006118384940478349_dp, 0.000999874816429794_dp, 0.0016270976310772938_dp, 0.0026268356436642305_dp, 0.004200673380690335_dp,& + 0.006652036004218306_dp, 0.010434155159748769_dp, 0.016218897955811638_dp, 0.02499520138410832_dp, 0.038209141684542064_dp, 0.05796233141783732_dp,& + 0.08729199004516089_dp, 0.13056598592688773_dp, 0.19404256395643912_dp, 0.2866758412418721_dp, 0.4213188646546868_dp, 0.6166595702412992_dp,& + 0.900755794469128_dp, 1.3187413549017004_dp, 1.9536794891939209_dp, 3.00131680399958_dp, 5.21699996325917_dp] + aw%aw_erange_matrix(:, 14) = [1.2674056285680165e-05_dp, 6.938931077849002e-05_dp, 0.0001836100520485683_dp, 0.0003826779493233582_dp, 0.0007202040757498056_dp,& + 0.0012903838734080182_dp, 0.002248236525495258_dp, 0.00384173613615444_dp, 0.006462366726733287_dp, 0.010722120046078792_dp, 0.017568831387303644_dp,& + 0.028457372697558436_dp, 0.04560190325370437_dp, 0.07234504966297221_dp, 0.11369479964375559_dp, 0.1771007906182374_dp, 0.2735712154870606_dp,& + 0.4192744014302692_dp, 0.637834936286395_dp, 0.9636469742972286_dp, 1.4467538592483378_dp, 2.1603857309953622_dp, 3.2137696680006567_dp,& + 4.777814618678099_dp, 7.151554564591586_dp, 11.0231252332385_dp, 3.2810000033385146e-05_dp, 8.24959243779711e-05_dp, 0.00015031831931530549_dp,& + 0.0002565196061853303_dp, 0.0004339110517853371_dp, 0.0007317640998323022_dp, 0.0012244457171152918_dp, 0.0020265452915832964_dp, 0.0033148331774103383_dp,& + 0.005359851622721186_dp, 0.008571929299584299_dp, 0.013568145467107103_dp, 0.021269239209990003_dp, 0.033039016114448296_dp, 0.05088380967787895_dp,& + 0.07773666161595308_dp, 0.11786137108586371_dp, 0.177428416908905_dp, 0.26534598308886587_dp, 0.3944982542877601_dp, 0.583721306443492_dp,& + 0.8613658745137791_dp, 1.2729807136647084_dp, 1.9020150846924464_dp, 2.9440730604569967_dp, 5.151372469471086_dp] + aw%aw_erange_matrix(:, 15) = [6.186479912580181e-06_dp, 3.4233291323971405e-05_dp, 9.256119767321995e-05_dp, 0.00019951435503347473_dp, 0.000391782808208518_dp,& + 0.0007348447007241284_dp, 0.0013393430685668998_dp, 0.0023881407715703996_dp, 0.004179359736833124_dp, 0.007193105406189777_dp, 0.012193603475754204_dp,& + 0.020384081500457202_dp, 0.03363963393153156_dp, 0.054854535910931194_dp, 0.0884563818462964_dp, 0.1411619416118249_dp, 0.22308161106495417_dp,& + 0.3493255541517698_dp, 0.5423345187791336_dp, 0.835274429372801_dp, 1.277059229828611_dp, 1.9400953490632433_dp, 2.933324383841704_dp,& + 4.428041894721328_dp, 6.724054874045832_dp, 10.508722000292966_dp, 1.605270034684411e-05_dp, 4.1236777606757607e-05_dp, 7.834646084720584e-05_dp,& + 0.00014151002746774427_dp, 0.0002536786392750537_dp, 0.00045044627173442046_dp, 0.0007883280940822237_dp, 0.0013578695679215443_dp, 0.0023029240253660617_dp,& + 0.0038494157006882636_dp, 0.006348322282988488_dp, 0.010339483088961496_dp, 0.016645606665935727_dp, 0.026509781185170438_dp, 0.04179532069895724_dp,& + 0.06527461060266015_dp, 0.10104501326885583_dp, 0.15512766861607885_dp, 0.23633651295613511_dp, 0.3575717157671407_dp, 0.5378622500972828_dp,& + 0.8059829678217727_dp, 1.2081212436199635_dp, 1.8283703742955213_dp, 2.862256950464903_dp, 5.057682060420358_dp] + aw%aw_erange_matrix(:, 16) = [3.398642214192787e-06_dp, 1.9025312202899538e-05_dp, 5.266161038810626e-05_dp, 0.00011755445811565422_dp, 0.00024054583577387794_dp,& + 0.00047036774204517446_dp, 0.0008915989199018158_dp, 0.0016480620414409948_dp, 0.00298048536052862_dp, 0.005285920675047294_dp, 0.009210353187127669_dp,& + 0.01579153884075367_dp, 0.026677173353753962_dp, 0.044455103994883116_dp, 0.07314891087057689_dp, 0.11895589362798491_dp, 0.19133835932619525_dp,& + 0.3046280564326354_dp, 0.48037697428284243_dp, 0.7508072430736709_dp, 1.1639388014245502_dp, 1.7914938071058262_dp, 2.7421307814095353_dp,& + 4.18739539739007_dp, 6.427708444690209_dp, 10.150038983021496_dp, 8.840904815568487e-06_dp, 2.3243411245798182e-05_dp, 4.61419948505059e-05_dp,& + 8.798822647972772e-05_dp, 0.0001658923006259312_dp, 0.0003074688101295367_dp, 0.0005583537180990002_dp, 0.0009937301893068423_dp, 0.001735787847791623_dp,& + 0.002980424755862107_dp, 0.005037848905051201_dp, 0.008393759041169294_dp, 0.013800737687712429_dp, 0.022413678806554142_dp, 0.03598900168633015_dp,& + 0.057175813550115986_dp, 0.08993936716796855_dp, 0.1401758115607063_dp, 0.21660925146824841_dp, 0.33212798532910376_dp, 0.5058820683958832_dp,& + 0.7669510501463104_dp, 1.1620122321700583_dp, 1.775691260253936_dp, 2.8035588004499257_dp, 4.990540570288636_dp] + aw%aw_erange_matrix(:, 17) = [1.5924512725077461e-06_dp, 9.091861526358144e-06_dp, 2.617525769293245e-05_dp, 6.171102340282755e-05_dp, 0.00013395463159750724_dp,& + 0.00027703236128610273_dp, 0.0005524440573740519_dp, 0.0010685815369178362_dp, 0.002012774020332085_dp, 0.0037030176407984823_dp, 0.006670370391832498_dp,& + 0.011788596543354984_dp, 0.020475865129561125_dp, 0.03500529115221168_dp, 0.058978461638664194_dp, 0.09804109351785203_dp, 0.16095595007242294_dp,& + 0.26120029165707_dp, 0.41933283009911826_dp, 0.6664993354060413_dp, 1.0496740893941348_dp, 1.6397469396988835_dp, 2.54498795937397_dp,& + 3.9371777982755236_dp, 6.11745128618483_dp, 9.772519404832513_dp, 4.1599386041678434e-06_dp, 1.1373735340879785e-05_dp, 2.420740702971419e-05_dp,& + 4.980537853880897e-05_dp, 0.00010018420860309139_dp, 0.00019590630897285626_dp, 0.0003724648960236611_dp, 0.0006901948951647627_dp, 0.0012498546464018527_dp,& + 0.0022170391172995803_dp, 0.0038600176308915607_dp, 0.006607746433407134_dp, 0.011137935349822067_dp, 0.018509521510997304_dp, 0.030360279138384877_dp,& + 0.04919938780336098_dp, 0.07883793047658633_dp, 0.12502011000770785_dp, 0.19635093903737422_dp, 0.3056814182538295_dp, 0.47227226126957916_dp,& + 0.7255282521113733_dp, 1.112683210316189_dp, 1.7190059451835937_dp, 2.7402160914459284_dp, 4.918151105513321_dp] + aw%aw_erange_matrix(:, 18) = [4.376362889407548e-07_dp, 2.643443650482503e-06_dp, 8.433114286038146e-06_dp, 2.2439275175400065e-05_dp, 5.458751916823435e-05_dp,& + 0.00012469615312218161_dp, 0.00027090154346575427_dp, 0.0005643774226213476_dp, 0.001134437804378847_dp, 0.0022105491534259005_dp, 0.004191467146338867_dp,& + 0.007757292968144634_dp, 0.014048601297429358_dp, 0.024949196870902246_dp, 0.04352732410856656_dp, 0.07471686858797275_dp, 0.12635898905420878_dp,& + 0.21078138430975438_dp, 0.3471766909066865_dp, 0.5651735745080563_dp, 0.9102276762862731_dp, 1.451965060215205_dp, 2.2979916853626663_dp,& + 3.6203271934806356_dp, 5.721128905491445_dp, 9.287036012890901_dp, 1.15698350323011e-06_dp, 3.5239168925237668e-06_dp, 8.790907369106611e-06_dp,& + 2.0802473841355257e-05_dp, 4.666225571530836e-05_dp, 9.967519249166123e-05_dp, 0.00020419454443829576_dp, 0.0004036329368680413_dp, 0.0007736164897230748_dp,& + 0.0014432538211834921_dp, 0.002629031662183179_dp, 0.004688130413199208_dp, 0.008201289641287034_dp, 0.014100202125235302_dp, 0.023861417673799547_dp,& + 0.03979881543108159_dp, 0.06550130495364699_dp, 0.10648414776164583_dp, 0.17115716235174305_dp, 0.27227855433947445_dp, 0.42921718067635106_dp,& + 0.6717958687439105_dp, 1.048026560686365_dp, 1.6441450980118213_dp, 2.656245656029467_dp, 4.82228579092364_dp] + aw%aw_erange_matrix(:, 19) = [9.23626066730038e-08_dp, 6.508986506667573e-07_dp, 2.548256199033377e-06_dp, 8.121244988671366e-06_dp, 2.280050217208556e-05_dp,& + 5.838011937544951e-05_dp, 0.00013919237871694767_dp, 0.0003133658603796936_dp, 0.0006727986081208618_dp, 0.0013877632092122146_dp, 0.002765631333703304_dp,& + 0.005348711634689046_dp, 0.010074592422860395_dp, 0.018535050517138794_dp, 0.03338852029027121_dp, 0.05900918410430352_dp, 0.10249708343303293_dp,& + 0.17523445903983162_dp, 0.2952639242558341_dp, 0.4909040641368631_dp, 0.8062587841364091_dp, 1.3097798505481377_dp, 2.1083909166084847_dp,& + 3.3742290423813217_dp, 5.410341564313699_dp, 8.903545764950158_dp, 2.5312239739000636e-07_dp, 9.960996067355009e-07_dp, 3.1628525158730217e-06_dp,& + 8.836550056217969e-06_dp, 2.2389728532275477e-05_dp, 5.264557648617341e-05_dp, 0.0001166810769940904_dp, 0.00024642731945934143_dp, 0.0004998727804625503_dp,& + 0.0009797084412907111_dp, 0.0018638236468942935_dp, 0.00345441392005227_dp, 0.0062559619517267165_dp, 0.011097497158462704_dp, 0.019322067389699597_dp,& + 0.03307729968505806_dp, 0.05575685817980752_dp, 0.09266621527033955_dp, 0.15202316630925258_dp, 0.24647013442575488_dp, 0.39542567933234785_dp,& + 0.6290352095921129_dp, 0.9959743276132635_dp, 1.583367038071677_dp, 2.5877759334182198_dp, 4.74419254971056_dp] + aw%aw_erange_matrix(:, 20) = [1.6637944502107968e-08_dp, 1.8303408054343632e-07_dp, 9.687195306133241e-07_dp, 3.7389122528334316e-06_dp, 1.1973447021251308e-05_dp,& + 3.378096920589386e-05_dp, 8.68338189070593e-05_dp, 0.00020767968945116668_dp, 0.00046874696407475663_dp, 0.001008553647726778_dp, 0.0020841046186256115_dp,& + 0.0041598936699362606_dp, 0.008056312504669037_dp, 0.015193061067365586_dp, 0.02798246122774749_dp, 0.050456461866690214_dp, 0.08925401954572831_dp,& + 0.15515900119886547_dp, 0.2654733104360881_dp, 0.44765566677475566_dp, 0.7449030289121367_dp, 1.2248551649261998_dp, 1.9939328236196414_dp,& + 3.2243037705041826_dp, 5.219599665831332_dp, 8.666863277748455_dp, 5.318821639180232e-08_dp, 3.4945656362875746e-07_dp, 1.4305518660978924e-06_dp,& + 4.650456118314243e-06_dp, 1.30922605762957e-05_dp, 3.33205562494026e-05_dp, 7.860562991572967e-05_dp, 0.00017467466389322248_dp, 0.0003697061169016621_dp,& + 0.0007513106176187417_dp, 0.0014748157046539873_dp, 0.0028095645215491876_dp, 0.005213528655212034_dp, 0.009451865748843455_dp, 0.016782910646881463_dp,& + 0.029246610819691533_dp, 0.05010725392331038_dp, 0.08452724443086411_dp, 0.14058736988255555_dp, 0.23083686098028847_dp, 0.37470521981828925_dp,& + 0.6025298048228135_dp, 0.9634165096071392_dp, 1.5450976370872966_dp, 2.5445132697805617_dp, 4.694880341120372_dp] + case(28) + aw%energy_range(:) = [1545.0_dp, 2002.0_dp, 2600.0_dp, 3300.0_dp, 4000.0_dp, 5000.0_dp, 5800.0_dp,& + 7000.0_dp, 8500.0_dp, 11000.0_dp, 14000.0_dp, 18000.0_dp, 22000.0_dp, 30000.0_dp, 40000.0_dp, 55000.0_dp,& + 75000.0_dp, 100000.0_dp, 140000.0_dp, 200000.0_dp, 280000.0_dp, 400000.0_dp, 700000.0_dp, 1200000.0_dp,& + 2000000.0_dp, 4500000.0_dp, 10000000.0_dp, 50000000.0_dp] + aw%aw_erange_matrix(:, 1) = [0.00019912749139307142_dp, 0.0010623606743332262_dp, 0.002671743519332409_dp, 0.00513532276440788_dp, 0.008635195625198482_dp,& + 0.013459847519256876_dp, 0.020047630847673463_dp, 0.029039389901087887_dp, 0.04134031090156478_dp, 0.05819756722342521_dp, 0.0813050912035362_dp,& + 0.11294734291964816_dp, 0.156193889583069_dp, 0.21515890144425773_dp, 0.2953443526600425_dp, 0.4040922882505582_dp, 0.5511803231110346_dp,& + 0.7496069714265129_dp, 1.016632455219541_dp, 1.3751727396754474_dp, 1.8557042554346754_dp, 2.4989586763196456_dp, 3.3599578911008456_dp,& + 4.514593597566258_dp, 6.071708534726409_dp, 8.199087984832916_dp, 11.19334614657497_dp, 15.75712024734422_dp, 0.0005125044577801448_dp,& + 0.0012232237231645984_dp, 0.00201318827111783_dp, 0.0029437832219448537_dp, 0.004103311596300065_dp, 0.005618171589079525_dp, 0.007663188401742024_dp,& + 0.010469929287815255_dp, 0.01433805703894519_dp, 0.01965640843594298_dp, 0.026936172517646257_dp, 0.036855644579373535_dp, 0.05031748334107659_dp,& + 0.06852207829804384_dp, 0.09306268185731213_dp, 0.12604985461633972_dp, 0.1702755103243793_dp, 0.22943160937864643_dp, 0.30840755489079047_dp,& + 0.4137086894086003_dp, 0.5540782272946391_dp, 0.741497238773558_dp, 0.9929644420040254_dp, 1.3340651862992305_dp, 1.8071782497597113_dp,& + 2.4938998954135005_dp, 3.5946345041711467_dp, 5.901304226915114_dp] + aw%aw_erange_matrix(:, 2) = [0.00015937273545708875_dp, 0.0008511031358508971_dp, 0.0021444475784000504_dp, 0.004133806965295614_dp, 0.006979927658415096_dp,& + 0.010939953042854741_dp, 0.016407375175241108_dp, 0.02396000912675003_dp, 0.034417229669099075_dp, 0.04891406525328216_dp, 0.06900316741446434_dp,& + 0.09679560984224389_dp, 0.13515199610246875_dp, 0.18793838914519878_dp, 0.2603666777263224_dp, 0.3594458206099125_dp, 0.494579482258333_dp,& + 0.6783583159834518_dp, 0.927614454599119_dp, 1.2648378420472655_dp, 1.7201130600602677_dp, 2.3338552489887388_dp, 3.1608903963862245_dp,& + 4.2770721150582895_dp, 5.7913663447139845_dp, 7.871758093638662_dp, 10.814809416909151_dp, 15.321476179970999_dp, 0.00041027809665924954_dp,& + 0.0009811723452880425_dp, 0.001620915236450962_dp, 0.0023840944111134044_dp, 0.0033503311465523967_dp, 0.004634503191430588_dp, 0.006395709602901231_dp,& + 0.008844913900028784_dp, 0.012257024616981905_dp, 0.016993101307172367_dp, 0.02353379728419698_dp, 0.03252363542798268_dp, 0.04482787026200198_dp,& + 0.06160612640371776_dp, 0.08440876245542936_dp, 0.11530375228655552_dp, 0.15704466612137769_dp, 0.21329510792248377_dp, 0.28893382637364007_dp,& + 0.39048261973383075_dp, 0.5267381633327601_dp, 0.7097795124230211_dp, 0.9567475153369529_dp, 1.2933958092367415_dp, 1.762243934642854_dp,& + 2.4448656022179347_dp, 3.5410603027618426_dp, 5.839188641520334_dp] + aw%aw_erange_matrix(:, 3) = [0.00012724350537371705_dp, 0.0006802420548887551_dp, 0.0017174005833444652_dp, 0.0033210405572595314_dp, 0.005632832416553322_dp,& + 0.008881578544535886_dp, 0.013419698685145537_dp, 0.019766846961404197_dp, 0.028663060595610065_dp, 0.041139669406250204_dp, 0.058618369068556976_dp,& + 0.08304861028830621_dp, 0.11709467333563459_dp, 0.16438742365500805_dp, 0.2298611471707931_dp, 0.32020292243210463_dp, 0.44445136041510835_dp,& + 0.6147946527884036_dp, 0.8476375115705392_dp, 1.1650387509190727_dp, 1.5966797391113152_dp, 2.1826420752053064_dp, 2.9775354931417777_dp,& + 4.057156308900191_dp, 5.530582551166736_dp, 7.5660060038749855_dp, 10.45997985096501_dp, 14.911921279047414_dp, 0.00032764611790808316_dp,& + 0.0007852281095230586_dp, 0.001302499732766977_dp, 0.001927928018050743_dp, 0.0027331746862386277_dp, 0.0038223319490506384_dp, 0.005339653436386936_dp,& + 0.0074768267093066575_dp, 0.010485860861582824_dp, 0.01470204224626301_dp, 0.020577182689456824_dp, 0.028723198501018832_dp, 0.03996852241361688_dp,& + 0.05543195597157087_dp, 0.07662014166796133_dp, 0.10555670439639143_dp, 0.14495398753342661_dp, 0.1984431170697882_dp, 0.27088687577758624_dp,& + 0.36881736713632424_dp, 0.501078546468407_dp, 0.6798426309902373_dp, 0.9223911021644032_dp, 1.2546500752337444_dp, 1.719292335657813_dp,& + 2.3978939243834243_dp, 3.489702010303218_dp, 5.779704886427998_dp] + aw%aw_erange_matrix(:, 4) = [0.0001035812061619439_dp, 0.000554312958948722_dp, 0.0014022178351092648_dp, 0.0027199186238307522_dp, 0.004633626332072742_dp,& + 0.007348901862042884_dp, 0.011184100569752935_dp, 0.016610348266822107_dp, 0.02430141997172798_dp, 0.03520198814732897_dp, 0.05062394356636958_dp,& + 0.0723803681708885_dp, 0.10296857818003698_dp, 0.14581768397450023_dp, 0.2056217187942231_dp, 0.28878665461351954_dp, 0.4040292970175386_dp,& + 0.5631795391897031_dp, 0.7822574690472879_dp, 1.0829291748663241_dp, 1.4945032140919154_dp, 2.056746330708999_dp, 2.8240560994099004_dp,& + 3.87216062398999_dp, 5.31022885971396_dp, 7.306643557351196_dp, 10.157983272563953_dp, 14.562388075641433_dp, 0.000266779348158189_dp,& + 0.0006406783010995833_dp, 0.0010669475657666657_dp, 0.0015890577230093321_dp, 0.0022720547662622424_dp, 0.003210897076964011_dp, 0.004537212534376952_dp,& + 0.006426464787961385_dp, 0.009111540381231737_dp, 0.012906037854636046_dp, 0.018237038812244945_dp, 0.025687953276114096_dp, 0.036054499502532374_dp,& + 0.05041868971863853_dp, 0.070247180509793_dp, 0.0975222869562315_dp, 0.134916933126155_dp, 0.1860296678962944_dp, 0.2557045471811927_dp,& + 0.3504778528812439_dp, 0.4792309189974202_dp, 0.6542157222577841_dp, 0.8928389893219679_dp, 1.2211855078507017_dp, 1.6820762830637361_dp,& + 2.357109509558417_dp, 3.4450757129111187_dp, 5.728067480861656_dp] + aw%aw_erange_matrix(:, 5) = [8.771437194659891e-05_dp, 0.00046981282949284237_dp, 0.0011904567715385075_dp, 0.0023152670914235655_dp, 0.003959200577898668_dp,& + 0.006310722793342447_dp, 0.009662905002781183_dp, 0.01445070779560698_dp, 0.021298505075191456_dp, 0.031086296591640365_dp, 0.04504371996352949_dp,& + 0.06488109904164477_dp, 0.09296905461591826_dp, 0.13258247030343728_dp, 0.1882303453180191_dp, 0.26610050569058297_dp, 0.3746580755427752_dp,& + 0.5254504247939676_dp, 0.7341916622638109_dp, 1.0222323068269783_dp, 1.418577696146867_dp, 1.9627342158223895_dp, 2.7089187483169885_dp,& + 3.732793667761796_dp, 5.14359311285564_dp, 7.109854244554064_dp, 9.928196448146211_dp, 14.295810062691444_dp, 0.0002259584596775983_dp,& + 0.0005436014065931008_dp, 0.0009083522994476501_dp, 0.001360022022949313_dp, 0.0019587330256291995_dp, 0.0027925453027995255_dp, 0.003983542841235872_dp,& + 0.005695043198214815_dp, 0.008145671980235551_dp, 0.011632693203529134_dp, 0.01656425108725137_dp, 0.023501595060412054_dp, 0.03321470050609412_dp,& + 0.04675631004359308_dp, 0.06556089291033432_dp, 0.09157703564672734_dp, 0.1274448334217016_dp, 0.17673475828550625_dp, 0.2442731132825866_dp,& + 0.33659611474367285_dp, 0.4626113339076691_dp, 0.6346313704421029_dp, 0.8701615672163753_dp, 1.1954150913540855_dp, 1.6533375661453558_dp,& + 2.325557793916785_dp, 3.410528405591019_dp, 5.688122811462863_dp] + aw%aw_erange_matrix(:, 6) = [7.231152188478278e-05_dp, 0.00038772726865815517_dp, 0.0009844837786035514_dp, 0.0019209126836657545_dp, 0.003300157154162172_dp,& + 0.005292557663606624_dp, 0.008164163748376724_dp, 0.012311171926660728_dp, 0.018304991861179568_dp, 0.026956176212698496_dp, 0.03940566382368068_dp,& + 0.057252298754729467_dp, 0.08272831849932695_dp, 0.11893897414817305_dp, 0.17018831821850053_dp, 0.2424208413642749_dp, 0.34381888188337045_dp,& + 0.48560994949960345_dp, 0.68315888981334_dp, 0.9574526915358277_dp, 1.3371435383436294_dp, 1.8614300851160115_dp, 2.5843101667934096_dp,& + 3.5813587287033566_dp, 4.961876490500659_dp, 6.894579341534884_dp, 9.676154843478928_dp, 14.002777296643712_dp, 0.00018632498066864197_dp,& + 0.00044921855213653585_dp, 0.0007537638296544074_dp, 0.0011359077842782092_dp, 0.0016504930186307747_dp, 0.002378087896208448_dp, 0.0034304274436559386_dp,& + 0.004957778020056624_dp, 0.007163453510160269_dp, 0.010326973559848835_dp, 0.0148355888498722_dp, 0.02122577871325675_dp, 0.030238442499465622_dp,& + 0.04289294382786412_dp, 0.06058666241299866_dp, 0.08522882557656473_dp, 0.11942055225842414_dp, 0.16669801861501937_dp, 0.23186426244014152_dp,& + 0.32145183283272727_dp, 0.44439450297432675_dp, 0.6130709874752484_dp, 0.8450980113616935_dp, 1.1668375144951064_dp, 1.621384532244084_dp,& + 2.290416624110755_dp, 3.3720270933942214_dp, 5.643641293866133_dp] + aw%aw_erange_matrix(:, 7) = [6.358752692633583e-05_dp, 0.0003412046362365837_dp, 0.0008676052314903817_dp, 0.001696724618707933_dp, 0.0029245257586060763_dp,& + 0.004710233349785592_dp, 0.007303215812339811_dp, 0.011075692416141687_dp, 0.016566304596355927_dp, 0.024542556688053108_dp, 0.03609017098515814_dp,& + 0.05273820097743335_dp, 0.07663171929303365_dp, 0.11076846568614528_dp, 0.15932179622752599_dp, 0.22808006029257497_dp, 0.32504298834606_dp,& + 0.4612301705022223_dp, 0.6517778001414668_dp, 0.9174329759430668_dp, 1.2866126278634253_dp, 1.7983078281539955_dp, 2.506365504219328_dp,& + 3.4862959694100204_dp, 4.847438621720606_dp, 6.7586271477598405_dp, 9.516604972737115_dp, 13.816917061150304_dp, 0.00016387366227471576_dp,& + 0.0003956833555057065_dp, 0.0006658661861317086_dp, 0.0010080085317879625_dp, 0.0014736812958346364_dp, 0.002138763598196897_dp, 0.00310853235933617_dp,& + 0.004525172218371909_dp, 0.006582500342505047_dp, 0.0095488999069641_dp, 0.013798331312490912_dp, 0.01985134913295637_dp, 0.028429999006008653_dp,& + 0.04053182527263095_dp, 0.05752974961085405_dp, 0.08130676932209915_dp, 0.11443765763930915_dp, 0.16043487908983078_dp, 0.2240845367272352_dp,& + 0.311914711856157_dp, 0.4328741422164402_dp, 0.5993829816920151_dp, 0.8291300891292139_dp, 1.1485759543667498_dp, 1.6009173789914857_dp,& + 2.2678714811822975_dp, 3.3473105643753676_dp, 5.615101807506323_dp] + aw%aw_erange_matrix(:, 8) = [5.40208922943882e-05_dp, 0.0002901574218009231_dp, 0.0007392141971595068_dp, 0.0014500283280455789_dp, 0.002510177021344463_dp,& + 0.0040657991238261465_dp, 0.006346521670349522_dp, 0.009696151598289092_dp, 0.01461448675071523_dp, 0.021817888400210955_dp, 0.03232620376087572_dp,& + 0.047584791601727995_dp, 0.06963362235719665_dp, 0.10134008926088696_dp, 0.14671822700211287_dp, 0.21136500303928102_dp, 0.30305507802937337_dp,& + 0.43255028902361986_dp, 0.6147016140691686_dp, 0.8699548471471977_dp, 1.2264290200274872_dp, 1.7228495271474296_dp, 2.412866754832892_dp,& + 3.371902180409746_dp, 4.7093379807234985_dp, 6.594155669520039_dp, 9.323180769772668_dp, 13.591212022178699_dp, 0.00013925034927611353_dp,& + 0.00033689758020930645_dp, 0.0005691288628998808_dp, 0.000866760965686723_dp, 0.0012774771286669078_dp, 0.0018715412342993915_dp, 0.0027465275546555167_dp,& + 0.004035039597245034_dp, 0.0059195955044671665_dp, 0.0086551765726244_dp, 0.012599568036048066_dp, 0.018253775832994857_dp, 0.02631653618635365_dp,& + 0.03775822887923194_dp, 0.053921093309633066_dp, 0.07665492497469895_dp, 0.10850075471633389_dp, 0.1529401192419044_dp, 0.2147361484742657_dp,& + 0.30040908293128193_dp, 0.41892390451696465_dp, 0.5827503975591537_dp, 0.8096664957210812_dp, 1.1262568684972982_dp, 1.5758496574356475_dp,& + 2.240219834134439_dp, 3.316979586478506_dp, 5.5800996039424104_dp] + aw%aw_erange_matrix(:, 9) = [4.564555265477108e-05_dp, 0.0002454346685212948_dp, 0.0006265784407134182_dp, 0.001233158622447077_dp, 0.0021448652153409154_dp,& + 0.0034954182642228226_dp, 0.005495608826652996_dp, 0.00846210660098653_dp, 0.012857585326682552_dp, 0.01934938119006627_dp, 0.028893873468546265_dp,& + 0.04285529874482882_dp, 0.06317112153384097_dp, 0.0925808252186819_dp, 0.13494115158016368_dp, 0.19565897567855495_dp, 0.2822840227867385_dp,& + 0.405318874954234_dp, 0.5793256641233082_dp, 0.8244427232040404_dp, 1.168482383587411_dp, 1.6498933305311403_dp, 2.322117411253598_dp,& + 3.2604766389691147_dp, 4.574390024972901_dp, 6.432989341834178_dp, 9.133196407474784_dp, 13.369095389855303_dp, 0.00011768969816977658_dp,& + 0.00028534927032496446_dp, 0.0004840726346740154_dp, 0.0007420579710874475_dp, 0.0011032591807000774_dp, 0.0016325138217318865_dp, 0.002419994753070502_dp,& + 0.0035891515886961726_dp, 0.005311642196826666_dp, 0.007829394245850389_dp, 0.011484246513613412_dp, 0.016757755663488007_dp, 0.024325289635545783_dp,& + 0.03512979233715042_dp, 0.05048226189921966_dp, 0.07219835845965666_dp, 0.1027839824530896_dp, 0.14568785531725492_dp, 0.20564777829998312_dp,& + 0.2891735001868529_dp, 0.4052436947742419_dp, 0.5663760127138803_dp, 0.7904374777760682_dp, 1.1041398360339376_dp, 1.5509491079980848_dp,& + 2.21270825293388_dp, 3.2867828515308894_dp, 5.5452724054483005_dp] + aw%aw_erange_matrix(:, 10) = [3.6488006929306264e-05_dp, 0.00019649151810584802_dp, 0.000503107877439482_dp, 0.000994818980265892_dp, 0.0017419330458111762_dp,& + 0.00286324584306399_dp, 0.004546790823266163_dp, 0.0070764254736432365_dp, 0.01086988103008825_dp, 0.01653489379720316_dp, 0.024950193189557313_dp,& + 0.0373800572984858_dp, 0.05563473102373159_dp, 0.08229382069514388_dp, 0.12101608504744633_dp, 0.1769674560118736_dp, 0.25741052665895353_dp,& + 0.3725145015640989_dp, 0.5364671734722614_dp, 0.7690049629152851_dp, 1.0975352324996732_dp, 1.5601365551801154_dp, 2.209966148011392_dp,& + 3.1222026085468673_dp, 4.406302512891578_dp, 6.231592566777427_dp, 8.895138025566414_dp, 13.09015522563044_dp, 9.411058161764564e-05_dp,& + 0.00022887458151702356_dp, 0.00039057680221556677_dp, 0.0006042814819193009_dp, 0.0009094035245976271_dp, 0.0013641332935019103_dp, 0.002049648033435726_dp,& + 0.003078322757949694_dp, 0.004608548064372825_dp, 0.006866051954909783_dp, 0.010172626387128262_dp, 0.014985141010389004_dp, 0.021949052283394388_dp,& + 0.03197188778843743_dp, 0.046323942696241904_dp, 0.0667759221190767_dp, 0.09578682159309504_dp, 0.13676065620689198_dp, 0.19439935510505243_dp,& + 0.27519525733539296_dp, 0.3881406112452913_dp, 0.5458114344320582_dp, 0.7661884133896568_dp, 1.0761497928442625_dp, 1.519347409242135_dp,& + 2.177726198492106_dp, 3.2483564776686458_dp, 5.5009815780981555_dp] + aw%aw_erange_matrix(:, 11) = [2.9588446308604547e-05_dp, 0.00015957764714927812_dp, 0.00040980061859442377_dp, 0.0008141581268268158_dp, 0.0014351942867949477_dp,& + 0.002379218143911262_dp, 0.003815130228038144_dp, 0.0059991869926145835_dp, 0.009311238414156518_dp, 0.014308514375164259_dp, 0.021803455514145805_dp,& + 0.03297432754720971_dp, 0.04952104060181237_dp, 0.07388347387186651_dp, 0.1095460460641794_dp, 0.16146092263899975_dp, 0.23663401107846255_dp,& + 0.3449341441338246_dp, 0.5002090250697223_dp, 0.7218265976855273_dp, 1.036819021323394_dp, 1.4829173538285452_dp, 2.113006031585928_dp,& + 3.002118887270464_dp, 4.25973634734891_dp, 6.055362139002693_dp, 8.68620971747294_dp, 12.84476212055696_dp, 7.634110961434247e-05_dp,& + 0.00018622528846790902_dp, 0.00031969127466536623_dp, 0.0004991918529001643_dp, 0.0007602900708133781_dp, 0.0011555100382159716_dp, 0.0017584338105163752_dp,& + 0.0026721061529931525_dp, 0.004043591457129711_dp, 0.00608455281208252_dp, 0.009099150682157118_dp, 0.013522328657324851_dp, 0.01997274372862434_dp,& + 0.029325909214924503_dp, 0.04281497070968849_dp, 0.06216914194983893_dp, 0.08980351557167271_dp, 0.12907941549114965_dp, 0.184663246594884_dp,& + 0.2630278258762335_dp, 0.3731736346682672_dp, 0.5277260380561264_dp, 0.7447670823860634_dp, 1.051327938626868_dp, 1.4912362410625788_dp,& + 2.1465432019415753_dp, 3.214074319529515_dp, 5.461496007193266_dp] + aw%aw_erange_matrix(:, 12) = [2.3779414127343956e-05_dp, 0.00012846422005240743_dp, 0.0003309928831073909_dp, 0.0006610841016675125_dp, 0.001174111517851935_dp,& + 0.001964735642046167_dp, 0.0031839437046973372_dp, 0.005062138452978201_dp, 0.007943587365676456_dp, 0.012337793711020667_dp, 0.01899408520862755_dp,& + 0.02900819673889348_dp, 0.0439733623874622_dp, 0.06619336766731646_dp, 0.09898159274083276_dp, 0.1470789732012216_dp, 0.2172359337388872_dp,& + 0.31902010927146557_dp, 0.465935489961852_dp, 0.676974407399601_dp, 0.9787827564627841_dp, 1.4087293747222094_dp, 2.0194090526711066_dp,& + 2.8856949554637783_dp, 4.117081205191889_dp, 5.883249820883165_dp, 8.481580484406694_dp, 12.603865500485162_dp, 6.137647450224398e-05_dp,& + 0.00015022918522230813_dp, 0.00025961689799477495_dp, 0.00040956404897364297_dp, 0.0006319903102840593_dp, 0.0009740518614949558_dp, 0.0015022032585384295_dp,& + 0.002310722155775527_dp, 0.0035358702066416604_dp, 0.005375683414999454_dp, 0.008117044767788793_dp, 0.012173222749539778_dp, 0.018136165890969762_dp,& + 0.026849214184554587_dp, 0.03950783752538176_dp, 0.057798731689314514_dp, 0.08409142368704033_dp, 0.1217021378276602_dp, 0.17525857508663245_dp,& + 0.2512102337617962_dp, 0.3585618870750593_dp, 0.5099851018896473_dp, 0.7236623896941952_dp, 1.0267809590048702_dp, 1.4633527890610423_dp,& + 2.1155495825866195_dp, 3.1799713652899073_dp, 5.422242322222096_dp] + aw%aw_erange_matrix(:, 13) = [1.996975719114667e-05_dp, 0.00010803766024790043_dp, 0.00027914946672295566_dp, 0.0005600685201304379_dp, 0.0010010455833094946_dp,& + 0.0016883469263468778_dp, 0.0027600190175514337_dp, 0.004427777354772284_dp, 0.0070100858816421925_dp, 0.010981630036803518_dp, 0.017045370162921285_dp,& + 0.026235975775831418_dp, 0.04006720477930825_dp, 0.060740772707250645_dp, 0.09144094582526643_dp, 0.13674817658247623_dp, 0.20321752055734807_dp,& + 0.3001847449852204_dp, 0.44088738725627163_dp, 0.6440243823419953_dp, 0.9359372859467849_dp, 1.3537064463445627_dp, 1.9496922567626198_dp,& + 2.798633041764183_dp, 4.010025863301125_dp, 5.753689968035089_dp, 8.327144493740365_dp, 12.421679016019592_dp, 5.156001410295644e-05_dp,& + 0.00012656590579908283_dp, 0.00021996531665695752_dp, 0.00035003655094498806_dp, 0.0005460402965281552_dp, 0.0008512186113124776_dp, 0.0013268718440107125_dp,& + 0.0020609116400843674_dp, 0.0031816393309671174_dp, 0.004876914587104125_dp, 0.007420595371219653_dp, 0.011209484450019506_dp, 0.016815094297439877_dp,& + 0.02505596575962014_dp, 0.037098296020097635_dp, 0.05459544297770877_dp, 0.07988080804958117_dp, 0.11623432159124078_dp, 0.16825175472580994_dp,& + 0.2423620424395829_dp, 0.3475704605516449_dp, 0.4965817576093905_dp, 0.7076548141522077_dp, 1.0080986813480735_dp, 1.4420727665642223_dp,& + 2.09185113214404_dp, 3.1538737345296277_dp, 5.392217904025483_dp] + aw%aw_erange_matrix(:, 14) = [1.5245472100141073e-05_dp, 8.267520676446116e-05_dp, 0.0002146253100574728_dp, 0.00043387740900171205_dp, 0.0007836944027554964_dp,& + 0.0013387930663292789_dp, 0.0022193817580203824_dp, 0.0036113909961874636_dp, 0.005797519906650395_dp, 0.009203847862920226_dp, 0.01446808989009802_dp,& + 0.022538313347044602_dp, 0.034814713569521594_dp, 0.05335209638799308_dp, 0.0811475703355085_dp, 0.12254732266532327_dp, 0.18381921201396537_dp,& + 0.27395570440350625_dp, 0.40579685475434923_dp, 0.5976003453364507_dp, 0.875245772613848_dp, 1.2753705825844541_dp, 1.8499693672606738_dp,& + 2.6735624079289133_dp, 3.855638524201632_dp, 5.566220151857392_dp, 8.103052167483417_dp, 12.156727650422702_dp, 3.9383299458817714e-05_dp,& + 9.713918675705757e-05_dp, 0.000170421510611186_dp, 0.0002751089399893439_dp, 0.0004367526322332042_dp, 0.0006931539398019088_dp, 0.0010985049239842675_dp,& + 0.0017318671480729233_dp, 0.0027102869498213354_dp, 0.004207039027136905_dp, 0.006477134639756053_dp, 0.009893360814081634_dp, 0.014997191697894255_dp,& + 0.02257042180249529_dp, 0.03373549826844379_dp, 0.05009547634855471_dp, 0.07392862462849442_dp, 0.10845863055245018_dp, 0.15823054590725322_dp,& + 0.22963859190692054_dp, 0.33168416368000975_dp, 0.47711716376192037_dp, 0.6843078702870563_dp, 0.9807484854746213_dp, 1.4108257998358733_dp,& + 2.0569814817847933_dp, 3.1154409728311463_dp, 5.348031605731007_dp] + aw%aw_erange_matrix(:, 15) = [1.1868158588050793e-05_dp, 6.451496656973e-05_dp, 0.00016828367389327262_dp, 0.0003428138578813575_dp, 0.0006257728657443166_dp,& + 0.001082546664145262_dp, 0.0018189122009131555_dp, 0.002999899699939122_dp, 0.004879035508307028_dp, 0.007842398392055541_dp, 0.012473504017331851_dp,& + 0.019647823262643315_dp, 0.030669526100067415_dp, 0.04746815571454119_dp, 0.07287994053111492_dp, 0.11104807754173227_dp, 0.16798957023910677_dp,& + 0.2523945702323838_dp, 0.37675011948627407_dp, 0.5589184164507482_dp, 0.8243607282457994_dp, 1.209308359311203_dp, 1.7654144169432378_dp,& + 2.566987933665634_dp, 3.7234969430883793_dp, 5.405141983044582_dp, 7.9098851591902335_dp, 11.927751732780631_dp, 3.067518035880976e-05_dp,& + 7.602736152767003e-05_dp, 0.00013466099350051709_dp, 0.0002205156203375216_dp, 0.00035609796830194946_dp, 0.0005747749473125263_dp, 0.0009249835582363322_dp,& + 0.0014785254567841132_dp, 0.0023430318256698933_dp, 0.003679400712048183_dp, 0.005726484701954953_dp, 0.008836295353538897_dp, 0.013524092658912494_dp,& + 0.02053931124436599_dp, 0.030965498069383788_dp, 0.04636050178159656_dp, 0.06895241489824191_dp, 0.1019128924749107_dp, 0.14973885102211165_dp,& + 0.2187896005944566_dp, 0.31805835198625043_dp, 0.4603305714250192_dp, 0.6640726964679041_dp, 0.9569407810619277_dp, 1.3835309605116226_dp,& + 2.026448697565121_dp, 3.0817527233540427_dp, 5.309325429687417_dp] + aw%aw_erange_matrix(:, 16) = [8.994970387322457e-06_dp, 4.9038651219381535e-05_dp, 0.00012866021417541092_dp, 0.00026454506965524195_dp, 0.0004890218504779385_dp,& + 0.0008585083873106919_dp, 0.0014649004957659442_dp, 0.002453066714438582_dp, 0.00404818477662515_dp, 0.006597100721999991_dp, 0.010629669867507806_dp,& + 0.016948840913414677_dp, 0.026762034057250313_dp, 0.041871547214080776_dp, 0.06494887934178976_dp, 0.09992774926372437_dp, 0.15256426013426896_dp,& + 0.2312316469143259_dp, 0.3480438390880272_dp, 0.520441341810499_dp, 0.7734349455842019_dp, 1.1428133579373827_dp, 1.6798513048817534_dp,& + 2.4586158447712725_dp, 3.5885384348523433_dp, 5.240004673003719_dp, 7.7112226946250795_dp, 11.691667476075265_dp, 2.3263971840934205e-05_dp,& + 5.799733961007195e-05_dp, 0.00010391874644151258_dp, 0.0001730995125618299_dp, 0.0002850761818642179_dp, 0.00046892999174830916_dp, 0.0007675526539416234_dp,& + 0.0012456339379473573_dp, 0.0020014080059075953_dp, 0.0031832610399331806_dp, 0.005013553854404307_dp, 0.007822909693482165_dp, 0.012099368861470802_dp,& + 0.018558470273632704_dp, 0.02824263531163439_dp, 0.04266142900862469_dp, 0.06398871559990858_dp, 0.09533906369189366_dp, 0.14115536539598936_dp,& + 0.20775581572804178_dp, 0.3041200099484807_dp, 0.4430661693538553_dp, 0.6431592914657807_dp, 0.9322296232686789_dp, 1.355102086814327_dp,& + 1.9945706936958254_dp, 3.046542150566686_dp, 5.268893998445498_dp] + aw%aw_erange_matrix(:, 17) = [6.8673479673260504e-06_dp, 3.755590753670896e-05_dp, 9.915139981458229e-05_dp, 0.00020590986120619216_dp, 0.00038570411969655687_dp,& + 0.0006874225835250557_dp, 0.0011912995282688835_dp, 0.0020251938479038355_dp, 0.0033901629916074914_dp, 0.005599342672133319_dp, 0.009136035642934201_dp,& + 0.0147397005849582_dp, 0.023532325447503034_dp, 0.03720291582111918_dp, 0.05827512485526659_dp, 0.09049318420974399_dp, 0.13937535368635193_dp,& + 0.21300368025384273_dp, 0.3231464746438852_dp, 0.4868502227776408_dp, 0.7287007191729763_dp, 1.0840642579491595_dp, 1.6038486600019533_dp,& + 2.3618790984089095_dp, 3.467539083950752_dp, 5.09138219825452_dp, 7.53185924341038_dp, 11.47798005469671_dp, 1.7773461657358013e-05_dp,& + 4.458780785431919e-05_dp, 8.088403265892346e-05_dp, 0.00013715743270713957_dp, 0.00023041539243485957_dp, 0.00038613012816423253_dp, 0.0006425163485643913_dp,& + 0.001058147634119284_dp, 0.0017230321030210073_dp, 0.002774473725192771_dp, 0.004420090523231148_dp, 0.006971221027705693_dp, 0.010891151319944746_dp,& + 0.01686432115872218_dp, 0.025895072083461815_dp, 0.03944781877116618_dp, 0.059645137430023996_dp, 0.0895468281752171_dp, 0.13354285706817015_dp,& + 0.1979094322641605_dp, 0.291608890942118_dp, 0.42748519623553954_dp, 0.6241916121496675_dp, 0.9097205132707596_dp, 1.3291156770565788_dp,& + 1.965360170512719_dp, 3.0142420912237333_dp, 5.231825921337635_dp] + aw%aw_erange_matrix(:, 18) = [5.34722652436438e-06_dp, 2.9335345788005576e-05_dp, 7.794420445994551e-05_dp, 0.0001635102977617264_dp, 0.0003103380666014091_dp,& + 0.0005612614423847721_dp, 0.0009871305012123896_dp, 0.0017020454525922442_dp, 0.002887383643586052_dp, 0.004828517011721044_dp, 0.007970062065688042_dp,& + 0.012998268728170836_dp, 0.02096295289681554_dp, 0.03345668031415268_dp, 0.052876323139595754_dp, 0.08280245241436206_dp, 0.1285464334202786_dp,& + 0.19793519202552176_dp, 0.30243198793781245_dp, 0.4587328138519049_dp, 0.6910421452320579_dp, 1.0343433822030452_dp, 1.5392071335504423_dp,& + 2.279230497059965_dp, 3.3637429883435237_dp, 4.96344347806973_dp, 7.377008968134632_dp, 11.293074733218035_dp, 1.3848866712786266e-05_dp,& + 3.496420645730977e-05_dp, 6.422528074399328e-05_dp, 0.00011085156828305275_dp, 0.00018979249819623976_dp, 0.0003236153897281577_dp, 0.0005467478277421638_dp,& + 0.000912713310709869_dp, 0.001504624320381209_dp, 0.0024504009658675406_dp, 0.003945073258731463_dp, 0.006283381657271798_dp, 0.009907137885517564_dp,& + 0.015473588963650402_dp, 0.023953503710281564_dp, 0.03677113226590553_dp, 0.056002962059688105_dp, 0.08465896050001478_dp, 0.1270800799647972_dp,& + 0.18950233376937137_dp, 0.2808690547904898_dp, 0.4140431391215438_dp, 0.6077531842367035_dp, 0.8901351666158656_dp, 1.3064316369806335_dp,& + 1.9398043844798791_dp, 2.9859550412644587_dp, 5.199382405454911_dp] + aw%aw_erange_matrix(:, 19) = [3.991479954961762e-06_dp, 2.198720501971829e-05_dp, 5.890526173006801e-05_dp, 0.00012518031616235489_dp, 0.00024153524567753135_dp,& + 0.00044471016635781095_dp, 0.0007960973675010948_dp, 0.0013958401833713643_dp, 0.0024051630337238337_dp, 0.004080730226383008_dp, 0.0068267899198047955_dp,& + 0.011273593700680132_dp, 0.018394388130399692_dp, 0.029678633788751282_dp, 0.04738664952634921_dp, 0.07492145227987683_dp, 0.11736834467836472_dp,& + 0.18227349630314565_dp, 0.2807619982420454_dp, 0.42913828874392707_dp, 0.65117720616762_dp, 0.9814263687158781_dp, 1.4700673778736164_dp,& + 2.190427750165236_dp, 3.2517634440541547_dp, 4.824930255638227_dp, 7.208868255000471_dp, 11.091834807498854_dp, 1.0346862342302347e-05_dp,& + 2.6338249637987535e-05_dp, 4.916412854301245e-05_dp, 8.674834277534896e-05_dp, 0.00015194758780428323_dp, 0.00026440532385478294_dp, 0.00045469618333409404_dp,& + 0.0007711009718467_dp, 0.0012894728448137978_dp, 0.002127757911813279_dp, 0.0034674947327675617_dp, 0.005585492420042323_dp, 0.008900179331682422_dp,& + 0.014038952538275588_dp, 0.02193542166778625_dp, 0.033968992230147974_dp, 0.05216418521519709_dp, 0.07947410573244414_dp, 0.12018284604662782_dp,& + 0.18047837042907597_dp, 0.26927867836352665_dp, 0.3994632895161757_dp, 0.5898412436801937_dp, 0.8687080586761889_dp, 1.2815327235597582_dp,& + 1.91168824489995_dp, 2.954800144592791_dp, 5.163666162590388_dp] + aw%aw_erange_matrix(:, 20) = [2.9287097241919463e-06_dp, 1.6211294489452685e-05_dp, 4.3860626639419625e-05_dp, 9.463310124321836e-05_dp, 0.00018604994609815954_dp,& + 0.0003493943765511619_dp, 0.0006375682448360294_dp, 0.0011380795201948043_dp, 0.001993709375951546_dp, 0.00343456904920158_dp, 0.005827197217933671_dp,& + 0.009749051421957427_dp, 0.016100560249175083_dp, 0.026272317263678777_dp, 0.042392659447799845_dp, 0.06769166630053426_dp, 0.10703277867836304_dp,& + 0.16768452950177593_dp, 0.26043499640668427_dp, 0.4011952042193507_dp, 0.6133044483273886_dp, 0.9308639628203111_dp, 1.4036513854446626_dp,& + 2.1047075037398466_dp, 3.143200044406983_dp, 4.6901364769963045_dp, 7.044731962208944_dp, 10.894906305627384_dp, 7.599945789593838e-06_dp,& + 1.9535340209099297e-05_dp, 3.7160656136204285e-05_dp, 6.722566694134913e-05_dp, 0.00012069652213103665_dp, 0.00021459840053591846_dp, 0.0003759981286012543_dp,& + 0.0006483001768113125_dp, 0.0011005125730724488_dp, 0.0018410833738741884_dp, 0.0030385893339244744_dp, 0.004952462825414513_dp, 0.007978278215654642_dp,& + 0.012714011523554197_dp, 0.02005632833363888_dp, 0.03133963591517064_dp, 0.04853577656951428_dp, 0.07453950556949848_dp, 0.11357558363229604_dp,& + 0.17178036896999477_dp, 0.2580420507206907_dp, 0.3852520170265286_dp, 0.5722961014253114_dp, 0.847629061135607_dp, 1.2569519792288701_dp,& + 1.8838624046566568_dp, 2.923931086168498_dp, 5.1282957309537895_dp] + aw%aw_erange_matrix(:, 21) = [2.187887975241367e-06_dp, 1.217302105778866e-05_dp, 3.3280277384650595e-05_dp, 7.294651585196924e-05_dp, 0.0001461477506435841_dp,& + 0.0002798259055981046_dp, 0.0005201025046636251_dp, 0.0009442991970046586_dp, 0.0016801646722205163_dp, 0.0029359404461932336_dp, 0.005046805926292481_dp,& + 0.008545920293678393_dp, 0.014272096616783494_dp, 0.023531600046055763_dp, 0.038339327744621156_dp, 0.061775614958965434_dp, 0.09851040024837446_dp,& + 0.15556831587766237_dp, 0.243439200558_dp, 0.3776832590482275_dp, 0.5812481524315448_dp, 0.8878298248851654_dp, 1.3468344739190594_dp,& + 2.031033514764075_dp, 3.0495035108172392_dp, 4.573381799063933_dp, 6.902137854735053_dp, 10.723425645457905_dp, 5.683864101635673e-06_dp,& + 1.4761618602067145e-05_dp, 2.863922084439926e-05_dp, 5.31200028912619e-05_dp, 9.765726111159933e-05_dp, 0.00017719091014345152_dp, 0.00031593721698955905_dp,& + 0.0005532594185059319_dp, 0.000952423486460829_dp, 0.001613835283450162_dp, 0.002695001718544619_dp, 0.004440391442639413_dp, 0.007225736946277607_dp,& + 0.01162326005144731_dp, 0.018497020133015078_dp, 0.02914136949940742_dp, 0.04548081139069081_dp, 0.07035707490413387_dp, 0.10794019701910468_dp,& + 0.1643177452299961_dp, 0.24834763708314758_dp, 0.37292767817567907_dp, 0.5570086406904123_dp, 0.829186245882319_dp, 1.2353723738001468_dp,& + 1.8593753882752646_dp, 2.896735710900212_dp, 5.0971507815821235_dp] + aw%aw_erange_matrix(:, 22) = [1.6070031867276192e-06_dp, 8.996223208889756e-06_dp, 2.4903330256736718e-05_dp, 5.5597271413213874e-05_dp, 0.00011378123225419507_dp,& + 0.00022251943620373886_dp, 0.0004218452833351526_dp, 0.0007798397462569304_dp, 0.001410464737003683_dp, 0.0025017001910060442_dp, 0.0043594012767892145_dp,& + 0.007474944527557248_dp, 0.012628553354571935_dp, 0.021045689348535686_dp, 0.03463175327773065_dp, 0.05632151430959264_dp, 0.09059550579868533_dp,& + 0.1442379871996754_dp, 0.2274428250359289_dp, 0.35541953739182136_dp, 0.5507212109659467_dp, 0.8466317459799636_dp, 1.2921752687688919_dp,& + 1.9598406408284006_dp, 2.9586009577769_dp, 4.459717588193107_dp, 6.762921787948558_dp, 10.555632767123296_dp, 4.180340751600858e-06_dp,& + 1.099130280826382e-05_dp, 2.1822771688601605e-05_dp, 4.1621175974422805e-05_dp, 7.848461568768336e-05_dp, 0.00014548449813908576_dp, 0.00026422505480514413_dp,& + 0.0004703011644186479_dp, 0.0008215666081596167_dp, 0.0014107803843716492_dp, 0.002384836263299515_dp, 0.0039737397649737246_dp, 0.006533894710819361_dp,& + 0.010612242095881175_dp, 0.017040581368346817_dp, 0.027073311442312262_dp, 0.04258730399078407_dp, 0.06637038094501468_dp, 0.10253618298821561_dp,& + 0.15712087871604702_dp, 0.23894860519216926_dp, 0.36091957483420634_dp, 0.5420459855749467_dp, 0.8110632955302136_dp, 1.2140975460551333_dp,& + 1.8351776848641823_dp, 2.8698308488017825_dp, 5.066349620899207_dp] + aw%aw_erange_matrix(:, 23) = [9.917609137977847e-07_dp, 5.61571565668021e-06_dp, 1.5905578931798044e-05_dp, 3.668045117366575e-05_dp, 7.779911321491552e-05_dp,& + 0.0001574703243782781_dp, 0.0003080352227521647_dp, 0.0005857339949829306_dp, 0.0010866136806263423_dp, 0.0019719871993643633_dp, 0.0035086606810778888_dp,& + 0.006131766091278258_dp, 0.010541856280946737_dp, 0.017853461412239566_dp, 0.029820286970471933_dp, 0.049173663410606715_dp, 0.08012714696416229_dp,& + 0.1291233103698595_dp, 0.20593171918618178_dp, 0.32525471926745003_dp, 0.5090693312937355_dp, 0.7900513389150534_dp, 1.216653152188614_dp,& + 1.8609312710223198_dp, 2.831687087034342_dp, 4.300351181611193_dp, 6.567047622277454_dp, 10.318912411219488_dp, 2.5862090723245625e-06_dp,& + 6.95626109831625e-06_dp, 1.4392071614748994e-05_dp, 2.874925884264212e-05_dp, 5.642970465568392e-05_dp, 0.00010814505912642593_dp, 0.0002021008939835649_dp,& + 0.0003688922773676731_dp, 0.0006591003182679095_dp, 0.0011550942822986209_dp, 0.0019891964272602783_dp, 0.0033713558748037233_dp, 0.0056309115068987_dp,& + 0.00927906547653282_dp, 0.015101574633332329_dp, 0.024295245067122773_dp, 0.03866754865528627_dp, 0.060926803424727255_dp, 0.09510216196058996_dp,& + 0.14715087305959354_dp, 0.22584200604915872_dp, 0.34407208794479094_dp, 0.5209358458550991_dp, 0.7853686557167923_dp, 1.1838124863793347_dp,& + 1.8006332661854303_dp, 2.8313699702065134_dp, 5.0223450191392205_dp] + aw%aw_erange_matrix(:, 24) = [6.243870742444705e-07_dp, 3.5837547513507616e-06_dp, 1.0424530634626105e-05_dp, 2.4910967538724005e-05_dp, 5.48216536959138e-05_dp,& + 0.0001148065303999889_dp, 0.000231490488679646_dp, 0.00045215860524583124_dp, 0.0008590837338469464_dp, 0.0015927682432411259_dp, 0.0028891299956185297_dp,& + 0.005138253059658019_dp, 0.008976135083193377_dp, 0.015426433468499803_dp, 0.026117293389759495_dp, 0.043609983170991296_dp, 0.0718927383781267_dp,& + 0.11711702885780055_dp, 0.18868749571084845_dp, 0.3008660121451099_dp, 0.47512403493520045_dp, 0.7435972663838382_dp, 1.154222692676153_dp,& + 1.7786576652841575_dp, 2.7255320837393326_dp, 4.166412460588324_dp, 6.401776404663582_dp, 10.11856522638141_dp, 1.6329106731735064e-06_dp,& + 4.511304110662316e-06_dp, 9.770509823422929e-06_dp, 2.0454024246766166e-05_dp, 4.172679855059072e-05_dp, 8.25404415798886e-05_dp, 0.00015847711044459983_dp,& + 0.00029619555479324744_dp, 0.0005404696680087612_dp, 0.000965266351597196_dp, 0.0016909815488903273_dp, 0.0029109600865339395_dp, 0.004931885217935304_dp,& + 0.008234716202420396_dp, 0.01356583086594651_dp, 0.022072242618732946_dp, 0.035500720158786525_dp, 0.05648910800327906_dp, 0.08899040639475064_dp,& + 0.13888891315246274_dp, 0.21489980129365738_dp, 0.32990928766337146_dp, 0.5030773832314516_dp, 0.7635106326257592_dp, 1.157931116384902_dp,& + 1.771014718506682_dp, 2.798340277794168_dp, 4.984574132350961_dp] + aw%aw_erange_matrix(:, 25) = [4.0370316213559476e-07_dp, 2.3541711422913717e-06_dp, 7.057573612279361e-06_dp, 1.751162431119145e-05_dp, 3.998197703771905e-05_dp,& + 8.651758104084795e-05_dp, 0.00017950101241220228_dp, 0.00035945947508640393_dp, 0.0006981140824218166_dp, 0.001319810424458466_dp, 0.0024361923309759396_dp,& + 0.004401544013890147_dp, 0.007800025204094134_dp, 0.013581611201940205_dp, 0.023271704375636543_dp, 0.03929119474223725_dp, 0.06544075124204898_dp,& + 0.10762751156023793_dp, 0.17494730054790258_dp, 0.2812860986936203_dp, 0.44768004577537496_dp, 0.705795087398322_dp, 1.1031142167130359_dp,& + 1.7109362858917831_dp, 2.6377277178978358_dp, 4.055162275207615_dp, 6.264028054745519_dp, 9.951137323627291_dp, 1.0593262130160056e-06_dp,& + 3.0185707613834373e-06_dp, 6.8658831794879865e-06_dp, 1.5046778554922312e-05_dp, 3.182893187575826e-05_dp, 6.484710011709137e-05_dp, 0.00012766407757989652_dp,& + 0.000243860437909589_dp, 0.00045361234593234906_dp, 0.0008241579727338823_dp, 0.001466238321223863_dp, 0.002559617356616681_dp, 0.004392266266516603_dp,& + 0.0074199303035661236_dp, 0.012355848225194005_dp, 0.02030472924789548_dp, 0.0329612503015901_dp, 0.05290210344877982_dp, 0.08401329609895744_dp,& + 0.13211363792116823_dp, 0.20586780977743016_dp, 0.3181478896142563_dp, 0.48816468770340044_dp, 0.7451687687530838_dp, 1.1361253599700833_dp,& + 1.7459877749472628_dp, 2.7703909434425067_dp, 4.952626774509824_dp] + aw%aw_erange_matrix(:, 26) = [2.0330900665342417e-07_dp, 1.2259721995909777e-06_dp, 3.9000493864165235e-06_dp, 1.0346548674455454e-05_dp, 2.5104573254227977e-05_dp,& + 5.722321695341548e-05_dp, 0.0001240915794841191_dp, 0.00025812480274594484_dp, 0.0005181574776824829_dp, 0.0010084979886612006_dp, 0.0019102647242876139_dp,& + 0.003532146072512572_dp, 0.0063914997207670885_dp, 0.011342304908756772_dp, 0.019774721642387954_dp, 0.03392304253932974_dp, 0.05733626485492922_dp,& + 0.0955906794116426_dp, 0.15736013123361753_dp, 0.2560121769552906_dp, 0.4119766499624099_dp, 0.6562580036536524_dp, 1.0356912360288544_dp,& + 1.6210528978513052_dp, 2.5205569278227222_dp, 3.906010837038453_dp, 6.07864411392436_dp, 9.725147433824423_dp, 5.372960626792664e-07_dp,& + 1.6313777234005112e-06_dp, 4.053582188809558e-06_dp, 9.562645330678188e-06_dp, 2.140029237042944e-05_dp, 4.5628018410594356e-05_dp, 9.332815320834305e-05_dp,& + 0.00018423715674012751_dp, 0.0003527071740962291_dp, 0.0006573395283833412_dp, 0.0011963286460791483_dp, 0.0021315852595548933_dp, 0.003726211411404738_dp,& + 0.006402085885163769_dp, 0.010827471574921069_dp, 0.018049062427338197_dp, 0.029689317308315376_dp, 0.048239120452325215_dp, 0.0774890829270111_dp,& + 0.12316278045588097_dp, 0.1938483490800667_dp, 0.30239008881049667_dp, 0.4680611192958136_dp, 0.7203071572907666_dp, 1.1064348627930074_dp,& + 1.7118002420359797_dp, 2.732149945273555_dp, 4.908937928661797_dp] + aw%aw_erange_matrix(:, 27) = [1.0453117858944355e-07_dp, 6.608617412970565e-07_dp, 2.263239779628554e-06_dp, 6.456580799232289e-06_dp, 1.6648773232985477e-05_dp,& + 3.988538010811069e-05_dp, 9.013431830037881e-05_dp, 0.00019412595183632066_dp, 0.00040148594866505004_dp, 0.000801953768960446_dp, 0.0015541047607406542_dp,& + 0.002932474750123789_dp, 0.0054037297272779_dp, 0.0097481213186169_dp, 0.01725076571642057_dp, 0.029999477630049398_dp, 0.05134367891607686_dp,& + 0.08659470336954253_dp, 0.14408515309896788_dp, 0.2367592019652705_dp, 0.3845463783654337_dp, 0.6178989765753549_dp, 0.9831034515051852_dp,& + 1.5504849076462728_dp, 2.4280266299570483_dp, 3.7876319869184405_dp, 5.930901453777237_dp, 9.544473553973464_dp, 2.7911359387760054e-07_dp,& + 9.225699169205882e-07_dp, 2.525970869540034e-06_dp, 6.400448408750558e-06_dp, 1.5105857774384374e-05_dp, 3.360200325419909e-05_dp, 7.118848251951222e-05_dp,& + 0.00014478894137667428_dp, 0.0002844248664965114_dp, 0.0005421792095475284_dp, 0.001006646872918385_dp, 0.0018259034247645597_dp, 0.003243545770723624_dp,& + 0.0056545862514208655_dp, 0.009691209964763319_dp, 0.016353052767086353_dp, 0.027203315594152448_dp, 0.044661579803193296_dp, 0.07243798977464_dp,& + 0.11617410461859103_dp, 0.18438950337219645_dp, 0.2898984327270837_dp, 0.45201785956261764_dp, 0.7003495143727266_dp, 1.0824839695902242_dp,& + 1.6841236033891487_dp, 2.701136203287264_dp, 4.87352184807004_dp] + aw%aw_erange_matrix(:, 28) = [2.883608355013751e-08_dp, 2.1533521290478e-07_dp, 8.922309745530507e-07_dp, 2.9625449220607536e-06_dp, 8.567451943237967e-06_dp,& + 2.243432347635065e-05_dp, 5.4443793898855104e-05_dp, 0.00012434900771925045_dp, 0.0002702071667839422_dp, 0.0005630773934606482_dp, 0.001132097168889575_dp,& + 0.0022064607569192898_dp, 0.004184511435918261_dp, 0.007745737975074526_dp, 0.014029823575166972_dp, 0.024919304936911416_dp, 0.04348066531140458_dp,& + 0.07464540686704813_dp, 0.12625156513534663_dp, 0.2106228965724005_dp, 0.34694729093744464_dp, 0.5648480693819434_dp, 0.9097754411882123_dp,& + 1.4513508415022998_dp, 2.297177622667234_dp, 3.619275978541861_dp, 5.719806682040045_dp, 9.28540894538464_dp, 8.026935386394373e-08_dp,& + 3.431660125547769e-07_dp, 1.1507249938591508e-06_dp, 3.3255150480524145e-06_dp, 8.631544858985621e-06_dp, 2.0673889190163757e-05_dp, 4.650257994599218e-05_dp,& + 9.941521329490123e-05_dp, 0.0002037413884778986_dp, 0.00040284592225487954_dp, 0.0007722776557802875_dp, 0.0014410293829550617_dp, 0.0026254207291881958_dp,& + 0.0046823958218659345_dp, 0.008192369379080482_dp, 0.014086602667824237_dp, 0.023841088169455484_dp, 0.039769020002557186_dp, 0.06545851893082533_dp,& + 0.1064240118543133_dp, 0.1710745747479101_dp, 0.2721680114354786_dp, 0.42907347105223687_dp, 0.671615155080402_dp, 1.0478076752969256_dp,& + 1.6438903234547084_dp, 2.6559588426369642_dp, 4.821957836337722_dp] + aw%aw_erange_matrix(:, 29) = [7.2246193648183315e-09_dp, 7.947805205434051e-08_dp, 4.2064242178143404e-07_dp, 1.6235298675242196e-06_dp, 5.1991703168705275e-06_dp,& + 1.4668546651111404e-05_dp, 3.7705424076918065e-05_dp, 9.01796708136201e-05_dp, 0.0002035415234868656_dp, 0.0004379390624442907_dp, 0.0009049701100068852_dp,& + 0.0018063291005268592_dp, 0.0034982504743316482_dp, 0.006597202794116675_dp, 0.012150671665557649_dp, 0.021909404675932484_dp, 0.03875606413936719_dp,& + 0.06737255773930659_dp, 0.11526829896699824_dp, 0.1943501837935314_dp, 0.3233020082512726_dp, 0.5311764928093146_dp, 0.8628395371729328_dp,& + 1.3874103242942566_dp, 2.212207252365476_dp, 3.5093118591573305_dp, 5.581272308767191_dp, 9.114780312141413_dp, 2.3095697901478273e-08_dp,& + 1.5174284298730647e-07_dp, 6.211817019789001e-07_dp, 2.0193446034719265e-06_dp, 5.684986670359784e-06_dp, 1.4468629362219993e-05_dp, 3.413251437719442e-05_dp,& + 7.584802072328596e-05_dp, 0.00016053557840876553_dp, 0.0003262378591667722_dp, 0.0006404016188164239_dp, 0.0012199823490146536_dp, 0.0022638430447923645_dp,& + 0.0041042325427612_dp, 0.007287543243404729_dp, 0.012699528275383098_dp, 0.021757390677572788_dp, 0.03670161910421734_dp, 0.061035614898498174_dp,& + 0.10018369236083766_dp, 0.16247380492926894_dp, 0.26061721476056016_dp, 0.41400956019249524_dp, 0.6526199011491635_dp, 1.0247530046294373_dp,& + 1.617029280212683_dp, 2.625732716141634_dp, 4.78747600908045_dp] + case(30) + aw%energy_range(:) = [2906.0_dp, 3236.0_dp, 3810.0_dp, 4405.0_dp, 5400.0_dp, 6800.0_dp, 8400.0_dp,& + 10000.0_dp, 12000.0_dp, 15000.0_dp, 20000.0_dp, 28000.0_dp, 38000.0_dp, 50000.0_dp, 64000.0_dp, 84000.0_dp,& + 110000.0_dp, 160000.0_dp, 220000.0_dp, 370000.0_dp, 520000.0_dp, 700000.0_dp, 1100000.0_dp, 1800000.0_dp,& + 3300000.0_dp, 6000000.0_dp, 18000000.0_dp, 50000000.0_dp] + aw%aw_erange_matrix(:, 1) = [0.00010719782131833758_dp, 0.0005720967766785331_dp, 0.001439669174001423_dp, 0.002769849121659816_dp, 0.004664000049778321_dp,& + 0.007283241780546586_dp, 0.010873000028774003_dp, 0.015792629918665993_dp, 0.02255038608921401_dp, 0.031847782299297675_dp, 0.04463988143266245_dp,& + 0.06221821662158963_dp, 0.08632310206096853_dp, 0.11929354905847961_dp, 0.16426574047985984_dp, 0.2254347024266385_dp, 0.30839852293765396_dp,& + 0.42061064113062563_dp, 0.5719741696129382_dp, 0.7756243966360713_dp, 1.0489645297600516_dp, 1.415051852321483_dp, 1.9044914330966105_dp,& + 2.558117126903484_dp, 3.4310117702125913_dp, 4.5990752550643395_dp, 6.171106184489477_dp, 8.314824292369494_dp, 11.326871889957468_dp,& + 15.91048796379593_dp, 0.0002759212187476099_dp, 0.0006589920695996667_dp, 0.001085937188673809_dp, 0.0015910122106733914_dp, 0.0022237295869651035_dp,& + 0.003055163774041633_dp, 0.004183672861951183_dp, 0.005739573533927359_dp, 0.007891868776677179_dp, 0.010860734164881057_dp, 0.014936866838559482_dp,& + 0.020507383044696917_dp, 0.02808894961545452_dp, 0.038370325842103176_dp, 0.052267550952526234_dp, 0.07099592893538823_dp, 0.09616415398590554_dp,& + 0.1298977096485147_dp, 0.17500152116499199_dp, 0.235176717264172_dp, 0.3153154828400979_dp, 0.4219165107665381_dp, 0.5637038218742615_dp,& + 0.7526245591453196_dp, 1.005629375577748_dp, 1.3482480324070423_dp, 1.8228149068796895_dp, 2.510939848106289_dp, 3.6132439344998795_dp, 5.9228966909439205_dp] + aw%aw_erange_matrix(:, 2) = [9.76676051737233e-05_dp, 0.000521439839796676_dp, 0.0013131673080453233_dp, 0.0025293903535565823_dp, 0.0042661250059111795_dp,& + 0.0066765801036800295_dp, 0.009994783165295324_dp, 0.014564000812497294_dp, 0.020870492553693578_dp, 0.02958685422269625_dp, 0.04163138568046643_dp,& + 0.058249942771901375_dp, 0.08112692839971898_dp, 0.11253369957795559_dp, 0.15552549205786806_dp, 0.2142017013001525_dp, 0.29404913356355256_dp,& + 0.4023941070276559_dp, 0.5489978387767454_dp, 0.7468418586806641_dp, 1.0131691905482183_dp, 1.3708791149003934_dp, 1.8504330035916199_dp,& + 2.4925505474173923_dp, 3.3522463174174093_dp, 4.505410618668513_dp, 6.060890691327169_dp, 8.186478838726869_dp, 11.178786177384513_dp,& + 15.74038405881577_dp, 0.00025141352623809566_dp, 0.0006009323005964832_dp, 0.0009917485369505094_dp, 0.0014564055840763494_dp, 0.002042200574311218_dp,& + 0.0028172406584227633_dp, 0.003875825130607345_dp, 0.005342947480157929_dp, 0.00738116098048549_dp, 0.010203263291670922_dp, 0.014091611662835478_dp,& + 0.019423788992341998_dp, 0.026705494627716198_dp, 0.03661296179988794_dp, 0.05004819563708869_dp, 0.06821123613467164_dp, 0.09269486715309114_dp,& + 0.12560901090026905_dp, 0.16974491105273157_dp, 0.22879407342136257_dp, 0.30764598759629597_dp, 0.4128070021079015_dp, 0.5530226357541534_dp,& + 0.7402778334602197_dp, 0.9915767219176012_dp, 1.332510891997349_dp, 1.8054641559432192_dp, 2.49203146209568_dp, 3.5925935804922893_dp, 5.89893592679766_dp] + aw%aw_erange_matrix(:, 3) = [8.47819458078811e-05_dp, 0.00045292247232938765_dp, 0.0011419488590203569_dp, 0.0022036034544386665_dp, 0.0037263081029974285_dp,& + 0.005851972143509195_dp, 0.008798246612654406_dp, 0.012885194918659285_dp, 0.018567320347579703_dp, 0.026475458982841895_dp, 0.03747475660944132_dp,& + 0.05274484615883288_dp, 0.07388876569982615_dp, 0.103079000554941_dp, 0.14325196624460337_dp, 0.19836605747691327_dp, 0.27374326191660053_dp,& + 0.3765207493043709_dp, 0.5162475872690495_dp, 0.7056742360429414_dp, 0.9618016216492792_dp, 1.3072886416997354_dp, 1.772376230882795_dp,& + 2.39760681930879_dp, 3.237886311434963_dp, 4.369085529708981_dp, 5.900122672480505_dp, 7.998902446784312_dp, 10.962002095892634_dp,& + 15.491026703179935_dp, 0.00021827426323305446_dp, 0.0005223668404015434_dp, 0.0008641224881204865_dp, 0.0012736436118541284_dp, 0.001795042273807457_dp,& + 0.0024921178119473955_dp, 0.00345325315447348_dp, 0.004795711504484412_dp, 0.006672726568911133_dp, 0.009286420295701826_dp, 0.012906984705977642_dp,& + 0.017897959998054307_dp, 0.02474875419566456_dp, 0.0341168643096291_dp, 0.046883167956700916_dp, 0.06422456826044022_dp, 0.08770953467687731_dp,& + 0.11942394754852313_dp, 0.16213754631449626_dp, 0.21952613567742027_dp, 0.2964736644552558_dp, 0.39949638395652903_dp, 0.5373706722452656_dp,& + 0.7221373998987525_dp, 0.9708812677144617_dp, 1.309288667276434_dp, 1.7798217912856973_dp, 2.464060270734846_dp, 3.5620371023687465_dp, 5.8635023001897295_dp] + aw%aw_erange_matrix(:, 4) = [7.475415175359787e-05_dp, 0.0003995782940364109_dp, 0.0010085401523130205_dp, 0.0019494530926649103_dp, 0.003304487334168418_dp,& + 0.005206188391856581_dp, 0.007858547072014874_dp, 0.011562196417307553_dp, 0.01674502130839572_dp, 0.02400284151062447_dp, 0.03415615402045192_dp,& + 0.04832877588615427_dp, 0.06805486346691048_dp, 0.09542279350363236_dp, 0.13326739942725138_dp, 0.18542592486136436_dp, 0.25707802147355546_dp,& + 0.3551966628680496_dp, 0.48914575629830964_dp, 0.6714729217979144_dp, 0.9189652081581203_dp, 1.2540675821639358_dp, 1.706822983665265_dp,& + 2.3176124905704714_dp, 3.1412403932005213_dp, 4.253555048851896_dp, 5.763534315696107_dp, 7.839184077942836_dp, 10.777063260156016_dp,& + 15.27796168145106_dp, 0.00019248226458298544_dp, 0.0004611671410305988_dp, 0.0007645470771240003_dp, 0.0011307064674945877_dp, 0.001601097912084883_dp,& + 0.002235885143791768_dp, 0.003118439955104845_dp, 0.00435950977219228_dp, 0.006104510985566756_dp, 0.008546583020796826_dp, 0.011945581030119579_dp,& + 0.016652984461283625_dp, 0.02314408570724871_dp, 0.03206002850298206_dp, 0.044263120398424796_dp, 0.06090977430142275_dp, 0.08354673398267808_dp,& + 0.11423814381228614_dp, 0.15573394602932067_dp, 0.2116949419787466_dp, 0.28699873776286255_dp, 0.38816866941911854_dp, 0.5240067210209787_dp,& + 0.7066019007188943_dp, 0.9531097377337013_dp, 1.2893015561438181_dp, 1.7577121859945424_dp, 2.439914418694296_dp, 3.5356481389173076_dp, 5.832916244207001_dp] + aw%aw_erange_matrix(:, 5) = [6.263685476987877e-05_dp, 0.0003350864107617077_dp, 0.0008471021406263553_dp, 0.0016414732496533968_dp, 0.0027923267352349805_dp,& + 0.004420069092229887_dp, 0.006710856247430801_dp, 0.009939856329159545_dp, 0.014500042255919464_dp, 0.02094127936473627_dp, 0.030025328730095918_dp,& + 0.042802276529506474_dp, 0.06071482338334902_dp, 0.08573906273600417_dp, 0.1205734666631485_dp, 0.168891746293846_dp, 0.23568035070007362_dp,& + 0.3276881055094081_dp, 0.4540246498488577_dp, 0.6269572963379791_dp, 0.8629754834557104_dp, 1.1842241235652444_dp, 1.6204657246854692_dp,& + 2.2118496417292866_dp, 3.0130302596964915_dp, 4.099816741357715_dp, 5.581265514191353_dp, 7.625526452879397_dp, 10.52915117245689_dp,& + 14.99185357007055_dp, 0.00016131234676709978_dp, 0.0003871323803883455_dp, 0.0006438639425224474_dp, 0.0009569827684469891_dp, 0.0013644640382973136_dp,& + 0.0019216628235682472_dp, 0.002705305661659533_dp, 0.003817552287654078_dp, 0.005393559577915718_dp, 0.007614615789728071_dp, 0.0107267793784036_dp,& + 0.01506524759897237_dp, 0.02108608211163133_dp, 0.029407976403737046_dp, 0.040867556214958384_dp, 0.05659266977268607_dp, 0.07809948510740791_dp,& + 0.10742117687653448_dp, 0.1472789549319935_dp, 0.20131104861420793_dp, 0.27438405593923587_dp, 0.3730286538370253_dp, 0.50607994537212_dp,& + 0.6856919919465865_dp, 0.9291183488974969_dp, 1.2622503775094018_dp, 1.7277292939880777_dp, 2.407128771305674_dp, 3.4998023815666013_dp, 5.791398263742947_dp] + aw%aw_erange_matrix(:, 6) = [5.1260796624319686e-05_dp, 0.00027449998212479283_dp, 0.0006952559402364613_dp, 0.0013512581469068891_dp, 0.0023084695955214183_dp,& + 0.0036748571064951344_dp, 0.005618146035815099_dp, 0.008387084892047715_dp, 0.012338401496919359_dp, 0.01797419704821914_dp, 0.025994966614220735_dp,& + 0.03737346294738748_dp, 0.05345583818085436_dp, 0.0760988446106003_dp, 0.10785503448538585_dp, 0.15222193676863333_dp, 0.2139764359272559_dp,& + 0.29962253812775563_dp, 0.4179901608236006_dp, 0.5810358869798488_dp, 0.8049164836351872_dp, 1.11143825413834_dp, 1.5300435290071273_dp,& + 2.1006127473331047_dp, 2.8776209315806276_dp, 3.93682226153259_dp, 5.387354342884511_dp, 7.397531351751853_dp, 10.263919356557402_dp,& + 14.685102820756857_dp, 0.00013204473011131683_dp, 0.0003175248324260899_dp, 0.0005301211290638112_dp, 0.000792646090309341_dp, 0.0011394726365449568_dp,& + 0.0016209075495792747_dp, 0.0023066917116162182_dp, 0.0032900298122596973_dp, 0.004695415042196518_dp, 0.0066917090579473775_dp, 0.009510290459434545_dp,& + 0.013468802311717997_dp, 0.019002357781084556_dp, 0.02670497738030662_dp, 0.037384817040713114_dp, 0.05213776033026327_dp, 0.072445378072951_dp,& + 0.10030529745315488_dp, 0.13840505606579703_dp, 0.19035539860923475_dp, 0.2610076849435031_dp, 0.3568973694825793_dp, 0.48689310015691706_dp,& + 0.6632189222745253_dp, 0.9032371034193576_dp, 1.2329755271865048_dp, 1.695201274879912_dp, 2.3715025399546223_dp, 3.4608285109987857_dp, 5.746290251951392_dp] + aw%aw_erange_matrix(:, 7) = [4.264827171158114e-05_dp, 0.00022859921129368268_dp, 0.0005800651655637003_dp, 0.0011306618266057897_dp, 0.001939659276932296_dp,& + 0.0031047255791507274_dp, 0.004778205945319036_dp, 0.007186731964418128_dp, 0.010656673525706605_dp, 0.01565005735652159_dp, 0.02281575734702256_dp,& + 0.03306097534037487_dp, 0.04764947470167637_dp, 0.0683354702649706_dp, 0.09754528626464402_dp, 0.13862301432535307_dp, 0.19616179200890152_dp,& + 0.27644949046799433_dp, 0.3880673249123362_dp, 0.5426935306072133_dp, 0.7561844283103211_dp, 1.0500376608384598_dp, 1.4534003880410857_dp,& + 2.005901250325418_dp, 2.7618425195091647_dp, 3.796918364528742_dp, 5.220333260426152_dp, 7.200552079960992_dp, 10.034172866297915_dp,& + 14.41882124837872_dp, 0.0001098833579123983_dp, 0.0002647437855875365_dp, 0.0004436472669265954_dp, 0.0006672101026873376_dp, 0.0009667895306084336_dp,& + 0.0013884135997529708_dp, 0.0019959070037335724_dp, 0.0028749526284055213_dp, 0.004141093118158889_dp, 0.005952643864305207_dp, 0.008528340123693306_dp,& + 0.01217052007837369_dp, 0.017295858304956554_dp, 0.024476476682491477_dp, 0.03449505017711748_dp, 0.04841859097574648_dp, 0.06769708781585487_dp,& + 0.09429528482789237_dp, 0.13086897935334732_dp, 0.1810021324793278_dp, 0.24952974948475865_dp, 0.3429885311920854_dp, 0.4702742651357602_dp,& + 0.6436716531183656_dp, 0.880640225748484_dp, 1.2073331130934455_dp, 1.6666371474517014_dp, 2.3401654531537157_dp, 3.4265253480645885_dp, 5.706615197039722_dp] + aw%aw_erange_matrix(:, 8) = [3.6638445936143444e-05_dp, 0.00019654898584533858_dp, 0.0004995365456010348_dp, 0.0009761629469610179_dp, 0.001680692380508944_dp,& + 0.0027030234477272513_dp, 0.004183824314963024_dp, 0.006332898868769434_dp, 0.009453508422633638_dp, 0.013977114132271049_dp, 0.020513053005428484_dp,& + 0.02991804681839935_dp, 0.043392038467264346_dp, 0.06260934488416951_dp, 0.089897358898568_dp, 0.12847922117893293_dp, 0.18280238941596594_dp,& + 0.25898237331386087_dp, 0.36540085871444006_dp, 0.5135113514430796_dp, 0.718925939367594_dp, 1.0028894169830442_dp, 1.3943048957706679_dp,& + 1.9325902027814568_dp, 2.6718997828791795_dp, 3.6878719059499683_dp, 5.089761008341865_dp, 7.046156150294659_dp, 9.853694451194254_dp,& + 14.209263474504755_dp, 9.441684068693651e-05_dp, 0.00022786014262271372_dp, 0.00038307351711976584_dp, 0.0005790223101422384_dp, 0.0008447661561374952_dp,& + 0.0012230417856923205_dp, 0.0017731334822002557_dp, 0.002574990545123123_dp, 0.003737321923840727_dp, 0.005410302324390409_dp, 0.007802786243657_dp,& + 0.011205034742082835_dp, 0.016019061597614896_dp, 0.02279945700439318_dp, 0.032308353668577205_dp, 0.04558931015753348_dp, 0.06406643328220389_dp,& + 0.08967722561429306_dp, 0.1250507942222136_dp, 0.17374800817672645_dp, 0.24058882427995695_dp, 0.3321088613980677_dp, 0.4572237934265981_dp,& + 0.6282658627647734_dp, 0.8627730246821379_dp, 1.187001575527606_dp, 1.6439399241381616_dp, 2.3152296444802993_dp, 3.3992160109205325_dp, 5.6750508010285134_dp] + aw%aw_erange_matrix(:, 9) = [3.125352048295285e-05_dp, 0.00016781351172929327_dp, 0.00042725280780375096_dp, 0.0008372368297287864_dp, 0.0014472482996344947_dp,& + 0.0023397061489668085_dp, 0.00364397706459525_dp, 0.005553554215846271_dp, 0.008349288769114196_dp, 0.012432933353972381_dp, 0.018375235671074245_dp,& + 0.0269833920064158_dp, 0.03939439104594155_dp, 0.057203310896803944_dp, 0.08263890933961444_dp, 0.118803108858221_dp, 0.16999660677619183_dp,& + 0.24216036024367976_dp, 0.3434728927615001_dp, 0.4851575786991668_dp, 0.6825748514741242_dp, 0.956707159367906_dp, 1.3362022902301018_dp,& + 1.8602550523674573_dp, 2.582860494442485_dp, 3.5795923551771076_dp, 4.959752013207221_dp, 6.892057403111867_dp, 9.673196873736643_dp,& + 13.999332658018544_dp, 8.055654719138439e-05_dp, 0.0001947658525515697_dp, 0.00032859686532794565_dp, 0.0004994306825817649_dp, 0.0007340947583837473_dp,& + 0.0010721035282296792_dp, 0.001568310846736925_dp, 0.002297102568888374_dp, 0.0033605346972129828_dp, 0.00490077013024238_dp, 0.0071168327918336724_dp,& + 0.010286868707377024_dp, 0.01479808821232481_dp, 0.021187271898748812_dp, 0.03019555503700218_dp, 0.042842362400043486_dp, 0.06052496436664667_dp,& + 0.08515234916902564_dp, 0.11932532276255173_dp, 0.16657974696296404_dp, 0.23171843775477596_dp, 0.3212739304330216_dp, 0.4441803236632917_dp,& + 0.6128171239515162_dp, 0.8448023886795951_dp, 1.1664998500858539_dp, 1.6210063652060114_dp, 2.2900001311037035_dp, 3.371570229987856_dp, 5.643112922874634_dp] + aw%aw_erange_matrix(:, 10) = [2.572460674430881e-05_dp, 0.00013828809639808773_dp, 0.0003528803185321503_dp, 0.0006939963784805861_dp, 0.0012058419667301263_dp,& + 0.00196250811153749_dp, 0.003080710120197529_dp, 0.004735659001322314_dp, 0.007183065998906602_dp, 0.010791253848864667_dp, 0.016087325873200328_dp,& + 0.02382213056319325_dp, 0.03506059129972535_dp, 0.051306532736392435_dp, 0.07467445268948096_dp, 0.10812503757927873_dp, 0.15578699671299615_dp,& + 0.2233955307214805_dp, 0.31888824542436384_dp, 0.45321390622010965_dp, 0.6414306299530386_dp, 0.9042033223791973_dp, 1.2698679478183343_dp,& + 1.7773436933847355_dp, 2.4804246798636003_dp, 3.4545978455659587_dp, 4.80921488681201_dp, 6.713149815396915_dp, 9.463167209838238_dp,& + 13.75460415331797_dp, 6.632324623333035e-05_dp, 0.00016073115506706547_dp, 0.0002724186286744679_dp, 0.00041700914328903177_dp, 0.0006188187442380069_dp,& + 0.000913709771883424_dp, 0.0013515392555132155_dp, 0.002000450746020119_dp, 0.0029549917404197673_dp, 0.004348167160940399_dp, 0.006367634264735562_dp,& + 0.009277411142785488_dp, 0.013447324345434384_dp, 0.01939310256171694_dp, 0.027830892296757826_dp, 0.03975118351588367_dp, 0.056518799068157294_dp,& + 0.08000790205760616_dp, 0.11278427119956595_dp, 0.15835215912014322_dp, 0.2214916578911036_dp, 0.3087289982044895_dp, 0.42901765162073763_dp,& + 0.5947915793660636_dp, 0.8237640916060611_dp, 1.142429482918768_dp, 1.5940199744065582_dp, 2.2602675888442345_dp, 3.3389719364130626_dp, 5.605477212236766_dp] + aw%aw_erange_matrix(:, 11) = [2.0010353507234397e-05_dp, 0.0001077433422458143_dp, 0.00027580023006758454_dp, 0.0005451258515021734_dp, 0.0009539529098224693_dp,& + 0.0015668441726082855_dp, 0.0024859562396115408_dp, 0.003865438814677545_dp, 0.005931997279200694_dp, 0.009015206545406032_dp, 0.013591237471033118_dp,& + 0.020344680291656994_dp, 0.03025506904355767_dp, 0.04471729454363523_dp, 0.0657084625235162_dp, 0.09601821543882148_dp, 0.13956549956219141_dp,& + 0.2018327748807436_dp, 0.2904595479070126_dp, 0.41605219017177664_dp, 0.5932887745998796_dp, 0.8424313672051914_dp, 1.1914160744119529_dp,& + 1.678803642976038_dp, 2.3581208348346263_dp, 3.3047307785320212_dp, 4.6280385004171025_dp, 6.497115386386612_dp, 9.208843054933286_dp,& + 13.457588010635305_dp, 5.1609539489171625e-05_dp, 0.00012547938250585046_dp, 0.00021401951207906163_dp, 0.0003308508348857692_dp, 0.0004973777574979467_dp,& + 0.0007451991801870302_dp, 0.0011183825299403462_dp, 0.0016778698024847744_dp, 0.0025094583225573333_dp, 0.0037353071207149595_dp, 0.005529432603001048_dp,& + 0.008138731296629963_dp, 0.011911786975259289_dp, 0.0173383968709882_dp, 0.02510367274551181_dp, 0.03616185208550007_dp, 0.05183670042056887_dp,& + 0.07395778747131394_dp, 0.10504533244757883_dp, 0.14856147943385148_dp, 0.20925449434054086_dp, 0.2936386766166653_dp, 0.41068755123213285_dp,& + 0.5728998438821491_dp, 0.7981069410955339_dp, 1.1129693992413612_dp, 1.5608972768887142_dp, 2.223705100788062_dp, 3.298855550400102_dp, 5.559194240832182_dp] + aw%aw_erange_matrix(:, 12) = [1.4913158562437485e-05_dp, 8.046249863674396e-05_dp, 0.00020679269836799646_dp, 0.00041135606175085387_dp, 0.000726429457279576_dp,& + 0.001206954515218603_dp, 0.0019403041016435166_dp, 0.0030592205520702234_dp, 0.004760844972277948_dp, 0.007334997531745175_dp, 0.011205132165430936_dp,& + 0.016986616421301493_dp, 0.025568952229820977_dp, 0.03823114994605764_dp, 0.056802896237992014_dp, 0.08388874591064059_dp, 0.12317874197383723_dp,& + 0.17987720132408636_dp, 0.26129273365588884_dp, 0.3776482327688284_dp, 0.5431920469707082_dp, 0.7777259064649447_dp, 1.1087233079248426_dp,& + 1.5743236370665366_dp, 2.2277313150621567_dp, 3.144149304477041_dp, 4.433028932012796_dp, 6.263665410565493_dp, 8.933099495687644_dp,& + 13.134684015624826_dp, 3.848089108885685e-05_dp, 9.39454195069688e-05_dp, 0.00016153027576924122_dp, 0.0002528432683507074_dp, 0.0003863006748200446_dp,& + 0.000589103857593431_dp, 0.0008994092337673156_dp, 0.0013708168552981645_dp, 0.0020800635852347526_dp, 0.0031378613819817206_dp, 0.004703620407911122_dp,& + 0.007005705166384156_dp, 0.010369489117192241_dp, 0.015256172448531693_dp, 0.02231631000951314_dp, 0.03246335096484727_dp, 0.04697433098325742_dp,& + 0.06762737851039459_dp, 0.09688924910721004_dp, 0.13817140362709024_dp, 0.19618184162864452_dp, 0.2774160356134996_dp, 0.39086437274546876_dp,& + 0.5490937144681445_dp, 0.7700664939132916_dp, 1.0806338759241187_dp, 1.5244170903885788_dp, 2.183343539374224_dp, 3.254529601017961_dp, 5.508095437648589_dp] + aw%aw_erange_matrix(:, 13) = [1.1418872198921082e-05_dp, 6.173413750253069e-05_dp, 0.00015929220328335313_dp, 0.00031889503854739523_dp, 0.0005682342649483396_dp,& + 0.0009547547779672074_dp, 0.0015542608919948567_dp, 0.0024827272879236525_dp, 0.003914044995780404_dp, 0.006106526724782397_dp, 0.009441451620849054_dp,& + 0.01447827421468276_dp, 0.022033096235727034_dp, 0.03328960553532699_dp, 0.04995516756713029_dp, 0.07447945346316431_dp, 0.11035934551634245_dp,& + 0.16256247169247554_dp, 0.23811344985212937_dp, 0.3469031346310937_dp, 0.5028042883523934_dp, 0.7252121362263632_dp, 1.0411867545570728_dp,& + 1.4884852069632906_dp, 2.120012518561155_dp, 3.0108136851550755_dp, 4.2703677397197355_dp, 6.068165404997884_dp, 8.701408700808228_dp,& + 12.8626331750244_dp, 2.947787098787719e-05_dp, 7.225954134028555e-05_dp, 0.0001252402865134724_dp, 0.00019846473664424758_dp, 0.00030798161384563543_dp,& + 0.0004775038459907116_dp, 0.0007405481153276563_dp, 0.0011449321771295313_dp, 0.0017601237436588445_dp, 0.0026874815648166833_dp, 0.004074324357547685_dp,& + 0.0061335185303593494_dp, 0.009170846038462778_dp, 0.013623145317805922_dp, 0.020111251332522298_dp, 0.029513178507526473_dp, 0.043064913823154624_dp,& + 0.062498815014491525_dp, 0.09023329634576005_dp, 0.12963292767495377_dp, 0.18536685282870904_dp, 0.26390946533406945_dp, 0.3742607782294386_dp,& + 0.5290426355523791_dp, 0.7463296721416969_dp, 1.0531417380773798_dp, 1.493293292834725_dp, 2.1488272848196677_dp, 3.216586556758033_dp, 5.464388958502095_dp] + aw%aw_erange_matrix(:, 14) = [8.982546693806235e-06_dp, 4.865818678309805e-05_dp, 0.00012604148335636865_dp, 0.00025390861901678955_dp, 0.0004563995854196066_dp,& + 0.0007750952045840026_dp, 0.0012767265489376275_dp, 0.002064101925548432_dp, 0.0032927700122513484_dp, 0.005195994959981289_dp, 0.008121235122746024_dp,& + 0.012582721029292343_dp, 0.019336695756878207_dp, 0.029488494866509965_dp, 0.044644170175709534_dp, 0.06712415308115761_dp, 0.10026296333569998_dp,& + 0.14882782019535817_dp, 0.2196010954609523_dp, 0.3221882442730784_dp, 0.47013658664261176_dp, 0.6824859983381489_dp, 0.9859314820504801_dp,& + 1.417888163895422_dp, 2.030988118342932_dp, 2.900125529064684_dp, 4.134793295219112_dp, 5.904650857570968_dp, 8.50705581410213_dp,& + 12.633884453832914_dp, 2.3198709666506916e-05_dp, 5.709307522017352e-05_dp, 9.972792415428492e-05_dp, 0.0001599273928986242_dp, 0.0002518605559821019_dp,& + 0.00039647689416403176_dp, 0.0006236485188629505_dp, 0.0009766180462365724_dp, 0.0015189982582493745_dp, 0.0023445004429086033_dp, 0.0035904524574293063_dp,& + 0.005456804956339633_dp, 0.008232881015796438_dp, 0.012334887697009843_dp, 0.01835828332102448_dp, 0.027150564163334993_dp, 0.03991202944665125_dp,& + 0.05833481297012722_dp, 0.08479428042701978_dp, 0.12261246982859136_dp, 0.17642213365813839_dp, 0.2526759210340022_dp, 0.3603782883628389_dp,& + 0.5121951678672628_dp, 0.7262964913958404_dp, 1.0298496814196687_dp, 1.4668430564566999_dp, 2.119432331068027_dp, 3.1842446525056274_dp, 5.427158434113688_dp] + aw%aw_erange_matrix(:, 15) = [7.238349702296008e-06_dp, 3.928458373506955e-05_dp, 0.00010214563688496669_dp, 0.00020702207021802802_dp, 0.0003752580104799391_dp,& + 0.0006437818300993232_dp, 0.001072114382774453_dp, 0.0017525850080720873_dp, 0.002826070350614258_dp, 0.004505651346498813_dp, 0.007111320652225213_dp,& + 0.011120302372900251_dp, 0.017239502228764955_dp, 0.026509227663294707_dp, 0.04045088318380033_dp, 0.06127621597555976_dp, 0.09218233054747209_dp,& + 0.13776574927878416_dp, 0.2046011860485274_dp, 0.3020478300836994_dp, 0.443370229666864_dp, 0.6472971651730427_dp, 0.9402012658200933_dp,& + 1.3591924682162404_dp, 1.956655369037565_dp, 2.8073424394429862_dp, 4.020750844752612_dp, 5.766686098521229_dp, 8.342653009498491_dp,& + 12.439991369032668_dp, 1.8702020468622055e-05_dp, 4.6203219782190167e-05_dp, 8.131762180666392e-05_dp, 0.00013190143534228278_dp, 0.00021061299324796057_dp,& + 0.0003361903026363539_dp, 0.000535605997735673_dp, 0.0008484276122519987_dp, 0.0013334887847408908_dp, 0.0020781819161196638_dp, 0.003211507934451115_dp,& + 0.004922574199422692_dp, 0.007486789650255751_dp, 0.011302797934300408_dp, 0.016944298667165195_dp, 0.02523242357196762_dp, 0.03733639323117268_dp,& + 0.05491299477721061_dp, 0.08029934786534572_dp, 0.11677913471088484_dp, 0.16895145657274943_dp, 0.24324744526263437_dp, 0.3486724489732179_dp,& + 0.49792796808610074_dp, 0.7092652162431419_dp, 1.009980880755789_dp, 1.4442192775687972_dp, 2.094243792411222_dp, 3.1565101709731045_dp, 5.395251764843703_dp] + aw%aw_erange_matrix(:, 16) = [5.706429844293361e-06_dp, 3.1040364829701505e-05_dp, 8.107328661660111e-05_dp, 0.00016550326188419503_dp, 0.0003029763316477536_dp,& + 0.0005259009041296794_dp, 0.0008867852843333584_dp, 0.0014677450288040894_dp, 0.002395273728414361_dp, 0.003862517134876226_dp, 0.006162129729070569_dp,& + 0.00973422779264423_dp, 0.015235895683403678_dp, 0.023641332048275565_dp, 0.03638532798309582_dp, 0.055567718600602306_dp, 0.08424323176407787_dp,& + 0.12683043751734444_dp, 0.18968622248619452_dp, 0.2819098113026998_dp, 0.4164652673968472_dp, 0.6117484077902107_dp, 0.893783996100621_dp,& + 1.2993493017998998_dp, 1.8805551654919748_dp, 2.7119921346520504_dp, 3.9031533013982855_dp, 5.623997981838861_dp, 8.172198452849088_dp,& + 12.238558563265647_dp, 1.4751349028333799e-05_dp, 3.660909835718544e-05_dp, 6.501211560655282e-05_dp, 0.00010687536539993863_dp, 0.00017337123549154558_dp,& + 0.00028107588099189824_dp, 0.000454137569267576_dp, 0.0007285000756826098_dp, 0.001158211238344495_dp, 0.0018242672088928367_dp, 0.0028471735084972696_dp,& + 0.004404897269066725_dp, 0.006758454939132606_dp, 0.01028819929336629_dp, 0.01554501319618277_dp, 0.023322182186959424_dp, 0.03475584758118297_dp,& + 0.05146485198022031_dp, 0.07574483876932264_dp, 0.11083732616584702_dp, 0.16130359908425193_dp, 0.23354923720333218_dp, 0.3365774511982118_dp,& + 0.48312462993088157_dp, 0.6915266416555069_dp, 0.9892183849743513_dp, 1.420514754404278_dp, 2.0678032116600904_dp, 3.127373080182709_dp, 5.361746811812883_dp] + aw%aw_erange_matrix(:, 17) = [4.507925303711096e-06_dp, 2.4580451494530444e-05_dp, 6.451263281768541e-05_dp, 0.00013272058871030806_dp, 0.0002455197572529811_dp,& + 0.0004313910776655633_dp, 0.0007367445062259567_dp, 0.001234786889942828_dp, 0.002039383465959761_dp, 0.00332603532508658_dp, 0.005363004530984576_dp,& + 0.008557044500582709_dp, 0.01352012174944254_dp, 0.021166153619467505_dp, 0.03285042829603399_dp, 0.05056939685207151_dp, 0.07724543673788668_dp,& + 0.11713067199112848_dp, 0.17637697527453522_dp, 0.263837336282913_dp, 0.39218930488595755_dp, 0.5795089364205666_dp, 0.8514842120807159_dp,& + 1.2445671334250805_dp, 1.8105970655011243_dp, 2.6239991397280553_dp, 3.7942542214271437_dp, 5.491467032685958_dp, 8.013480504379215_dp,& + 12.05062051565182_dp, 1.165943020924494e-05_dp, 2.907711562944157e-05_dp, 5.2135381292650646e-05_dp, 8.692931914146652e-05_dp, 0.00014332433921579002_dp,& + 0.00023600989072825049_dp, 0.0003866717964299752_dp, 0.0006280479343018203_dp, 0.0010098870748762492_dp, 0.001607379741603303_dp, 0.00253325997236095_dp,& + 0.003955231709080428_dp, 0.006120960061358173_dp, 0.009393712743103142_dp, 0.014302912174317341_dp, 0.02161546778139668_dp, 0.03243595167457546_dp,& + 0.04834668628642002_dp, 0.07160299218511915_dp, 0.10540485530435402_dp, 0.15427553890661685_dp, 0.22459367842315606_dp, 0.3253574621758251_dp,& + 0.46933370101682803_dp, 0.6749372715340488_dp, 0.9697356715189667_dp, 1.3982111886845372_dp, 2.0428791235793997_dp, 3.099885407679866_dp, 5.330156088439341_dp] + aw%aw_erange_matrix(:, 18) = [3.2492504706355543e-06_dp, 1.7782935938647487e-05_dp, 4.702094527107548e-05_dp, 9.788765130060788e-05_dp, 0.00018394800566011574_dp,& + 0.0003290226690843259_dp, 0.0005722787919864911_dp, 0.0009762934532250238_dp, 0.0016397346725346576_dp, 0.002716663917457915_dp, 0.004445425742834286_dp,& + 0.007191491449190322_dp, 0.011510534331810433_dp, 0.01824066242763528_dp, 0.02863642038498904_dp, 0.044562287024877995_dp, 0.06877046943314344_dp,& + 0.10529755457345026_dp, 0.16002804271088766_dp, 0.24149146592791995_dp, 0.361986165199179_dp, 0.5391615439925698_dp, 0.7982521139849742_dp,& + 1.1752670593405194_dp, 1.7216703901842698_dp, 2.511651208522495_dp, 3.654660979891775_dp, 5.320994285506342_dp, 7.808735565003434_dp,& + 11.80762543615471_dp, 8.410837332223653e-06_dp, 2.113245841372446e-05_dp, 3.845111058827689e-05_dp, 6.548419810172488e-05_dp, 0.00011052592304298797_dp,& + 0.00018602054544749434_dp, 0.0003107143750285354_dp, 0.0005134448260073493_dp, 0.0008386432327700857_dp, 0.0013542399463937198_dp, 0.002163165180703502_dp,& + 0.0034200707057045_dp, 0.0053555078104983965_dp, 0.008310672199526598_dp, 0.012787041135722151_dp, 0.019516894799063707_dp, 0.029562998187469335_dp,& + 0.044458853860523784_dp, 0.0664052872217014_dp, 0.09854535532252624_dp, 0.14534905940024856_dp, 0.2131554574377401_dp, 0.3109515151654752_dp,& + 0.4515398978356489_dp, 0.653437304234083_dp, 0.9443877723109725_dp, 1.3691021780052584_dp, 2.010279336423766_dp, 3.063897971847719_dp, 5.288820184644417_dp] + aw%aw_erange_matrix(:, 19) = [2.460537860443357e-06_dp, 1.3513517677623214e-05_dp, 3.598515389781885e-05_dp, 7.575261086818076e-05_dp, 0.0001444216294004159_dp,& + 0.00026247903310060725_dp, 0.0004639039840208787_dp, 0.0008036114726657992_dp, 0.001369205915452374_dp, 0.0022989755449385045_dp, 0.0038090333768977967_dp,& + 0.006233886266199457_dp, 0.01008661073890614_dp, 0.016147469119526157_dp, 0.025593516684082565_dp, 0.04018693519947543_dp, 0.06254703089827915_dp,& + 0.0965408099871576_dp, 0.14784085162679408_dp, 0.22471839016516207_dp, 0.33916659817804756_dp, 0.5084886871639984_dp, 0.7575478060875892_dp,& + 1.1219864437669036_dp, 1.6529529420726783_dp, 2.4244318079577103_dp, 3.5458393070593472_dp, 5.187620119758077_dp, 7.648065546110419_dp,& + 11.61648316806262_dp, 6.374120402922641e-06_dp, 1.6128252577743594e-05_dp, 2.9754113670763418e-05_dp, 5.166430893732005e-05_dp, 8.901502625196717e-05_dp,& + 0.00015264214630912148_dp, 0.0002591687585053359_dp, 0.00043455383137211705_dp, 0.000719240735481554_dp, 0.0011756556233951615_dp, 0.0018992288700902785_dp,& + 0.003034542038483531_dp, 0.004798831948386736_dp, 0.007515980097531093_dp, 0.011665360331427038_dp, 0.017951632069288924_dp, 0.027403921176393425_dp,& + 0.041516070343442624_dp, 0.06244414300326091_dp, 0.0932837802259788_dp, 0.13845969920620585_dp, 0.20427585444540086_dp, 0.2997063234922189_dp,& + 0.43757882986144675_dp, 0.6364895482287001_dp, 0.9243252918542686_dp, 1.3459866886820373_dp, 1.9843322156142236_dp, 3.035224685946777_dp, 5.255903429150008_dp] + aw%aw_erange_matrix(:, 20) = [1.5637740408395342e-06_dp, 8.644581438556428e-06_dp, 2.3326026659580105e-05_dp, 5.012244143843333e-05_dp, 9.804997776691128e-05_dp,& + 0.000183175648888439_dp, 0.0003325825937550191_dp, 0.0005909069030179598_dp, 0.0010307262850542825_dp, 0.001768639145774748_dp, 0.0029898323691103764_dp,& + 0.004985271727949821_dp, 0.008207526024267482_dp, 0.013353895620644004_dp, 0.0214892751837372_dp, 0.034226463130117915_dp, 0.053989018153179254_dp,& + 0.08439206340451581_dp, 0.1307907673641504_dp, 0.20106621537104283_dp, 0.3067466011130968_dp, 0.46460274135109153_dp, 0.698920779817791_dp,& + 1.0447664262134877_dp, 1.5527831264532448_dp, 2.296617666855539_dp, 3.3856119528633637_dp, 4.990434105875191_dp, 7.4097119078577_dp,& + 11.33215729315795_dp, 4.056801137252665e-06_dp, 1.0400304864325584e-05_dp, 1.968307964805301e-05_dp, 3.537211676997081e-05_dp, 6.309758174077909e-05_dp,& + 0.00011156144898932593_dp, 0.0001945228908869725_dp, 0.0003339605532184735_dp, 0.000564711446670201_dp, 0.0009413729224733118_dp, 0.0015485976328911168_dp,& + 0.0025163527439127716_dp, 0.004042366217657837_dp, 0.006424908889055276_dp, 0.010110351754549359_dp, 0.01576172006986062_dp, 0.02435693199744164_dp,& + 0.03732881710193292_dp, 0.05676374129839576_dp, 0.08568239505343193_dp, 0.12843634401072082_dp, 0.19127041101280928_dp, 0.28313227875730185_dp,& + 0.41688110772833514_dp, 0.6112296495300013_dp, 0.8942832614684186_dp, 1.3112417204467246_dp, 1.9452277892500305_dp, 2.9919599852080703_dp, 5.206267501211972_dp] + aw%aw_erange_matrix(:, 21) = [1.162904999603526e-06_dp, 6.460220717190712e-06_dp, 1.7606607480068412e-05_dp, 3.8410731277459235e-05_dp, 7.652869912290393e-05_dp,& + 0.00014570244755436322_dp, 0.00026937164379552174_dp, 0.0004866802067040396_dp, 0.0008620687596415197_dp, 0.001500239074857704_dp, 0.0025692139442485516_dp,& + 0.004335527408651135_dp, 0.00721744537817494_dp, 0.011864777494471953_dp, 0.01927761941951377_dp, 0.030981700048419165_dp, 0.04928550606403292_dp,& + 0.07765484694198317_dp, 0.12125517110926898_dp, 0.18773242857967326_dp, 0.2883321960866146_dp, 0.43949878526491704_dp, 0.6651609536255874_dp,& + 1.0000229662476519_dp, 1.4944068851808134_dp, 2.2217383426459816_dp, 3.2913012165448343_dp, 4.873895944019108_dp, 7.268367413333011_dp,& + 11.163103194460474_dp, 3.0200745063435063e-06_dp, 7.819224105572315e-06_dp, 1.5081156733800399e-05_dp, 2.776801766506454e-05_dp, 5.0700455074630125e-05_dp,& + 9.145615638049602e-05_dp, 0.0001622504928743556_dp, 0.00028286367265657205_dp, 0.0004849887879932366_dp, 0.0008187828750348566_dp, 0.0013627221411797283_dp,& + 0.002238314348285273_dp, 0.003631885398877431_dp, 0.005826597760169261_dp, 0.009249172128608455_dp, 0.014537611686674936_dp, 0.0226387619956523_dp,& + 0.03494804598497715_dp, 0.053508604450163914_dp, 0.0812939971568708_dp, 0.12260888215529167_dp, 0.18365876903663883_dp, 0.27337120427563866_dp,& + 0.4046203209300098_dp, 0.5961868839329513_dp, 0.8763095433545912_dp, 1.2903758814089559_dp, 1.9216820534456363_dp, 2.9658783009061263_dp, 5.176364379511127_dp] + aw%aw_erange_matrix(:, 22) = [8.982200709109713e-07_dp, 5.013746520038623e-06_dp, 1.3797556086375253e-05_dp, 3.053886905121258e-05_dp, 6.188411270912267e-05_dp,& + 0.00011984809712211666_dp, 0.00022515174308936954_dp, 0.00041280335546669807_dp, 0.0007410557365297971_dp, 0.0013054805064640572_dp, 0.0022608163607798406_dp,& + 0.003854540538433318_dp, 0.006477967304857807_dp, 0.010743336152506139_dp, 0.01759914400488243_dp, 0.028501352515678965_dp, 0.04566568530951012_dp,& + 0.07243687914225057_dp, 0.11382566141804518_dp, 0.17728511649027562_dp, 0.2738276317065499_dp, 0.41962643246873177_dp, 0.6383115216108352_dp,& + 0.9642825901967439_dp, 1.4475879782153047_dp, 2.1614613507414213_dp, 3.2151308325865324_dp, 4.779503431415253_dp, 7.153609650797204_dp,& + 11.025589359258367_dp, 2.33509910395076e-06_dp, 6.10398857813977e-06_dp, 1.1988268517456785e-05_dp, 2.2570731247056643e-05_dp, 4.206867163196105e-05_dp,& + 7.722227756857685e-05_dp, 0.00013907449507452585_dp, 0.0002457091386543816_dp, 0.00042636927263886435_dp, 0.0007277240308901886_dp, 0.0012233619517539264_dp,& + 0.0020280492037779985_dp, 0.0033189631613667883_dp, 0.005367062740884365_dp, 0.008583092022062843_dp, 0.0135845766573915_dp, 0.021292762750234086_dp,& + 0.033072042665578866_dp, 0.05092942142345538_dp, 0.07779867772338114_dp, 0.11794435500606822_dp, 0.17753757154997848_dp, 0.26548687080483935_dp,& + 0.3946762763128839_dp, 0.5839408961339644_dp, 0.8616294721408878_dp, 1.27328786626255_dp, 1.902362545255473_dp, 2.944458259522062_dp, 5.1518134931437265_dp] + aw%aw_erange_matrix(:, 23) = [6.070765776691511e-07_dp, 3.416871225040894e-06_dp, 9.561919657171797e-06_dp, 2.1683051083242104e-05_dp, 4.515689173365717e-05_dp,& + 8.982491421280511e-05_dp, 0.00017296367691311632_dp, 0.00032428348083868487_dp, 0.0005940202656656541_dp, 0.001065793876730367_dp, 0.0018767883279394732_dp,& + 0.0032490764599530236_dp, 0.0055377486897541_dp, 0.009304158830434279_dp, 0.015426407047504075_dp, 0.02526460961553787_dp, 0.0409062041812229_dp,& + 0.06552740429734295_dp, 0.10392219781712_dp, 0.16327176797255086_dp, 0.25425762049527484_dp, 0.3926657116824371_dp, 0.6016960744289409_dp,& + 0.9153062522487351_dp, 1.3831427017478757_dp, 2.0781516959653166_dp, 3.1094698633638336_dp, 4.64815163738497_dp, 6.99350202546865_dp,& + 10.833342615226073_dp, 1.5810344568110277e-06_dp, 4.201983132608034e-06_dp, 8.509301559244783e-06_dp, 1.660217499192091e-05_dp, 3.1937948250709083e-05_dp,& + 6.0196622838881555e-05_dp, 0.00011090164490251824_dp, 0.00019990225033881748_dp, 0.0003531805009952824_dp, 0.000612721804071078_dp, 0.0010454964371682956_dp,& + 0.0017570690249359784_dp, 0.0029120339233426416_dp, 0.004764440773172712_dp, 0.007702737556158165_dp, 0.012315669576916223_dp, 0.019488241944529968_dp,& + 0.03054057337997689_dp, 0.0474276677063864_dp, 0.0730254826754342_dp, 0.11153946595828376_dp, 0.1690888848289202_dp, 0.2545515426791882_dp,& + 0.3808215765752087_dp, 0.5668083660036856_dp, 0.8410170454494971_dp, 1.2492234533619844_dp, 1.8750991975085831_dp, 2.91420232217261_dp, 5.117153113908438_dp] + aw%aw_erange_matrix(:, 24) = [3.9676424024146875e-07_dp, 2.2573188915559954e-06_dp, 6.453978574008018e-06_dp, 1.5076014172691726e-05_dp, 3.241300804980766e-05_dp,& + 6.644316731632574e-05_dp, 0.00013145859105193587_dp, 0.0002525113816701914_dp, 0.0004726891479758136_dp, 0.0008648183450896165_dp, 0.0015500448519401517_dp,& + 0.00272698303228361_dp, 0.004716941205527944_dp, 0.008033374074156422_dp, 0.013487530814882825_dp, 0.022347744374551653_dp, 0.03657761361377878_dp,& + 0.0591894063537043_dp, 0.09476465831169727_dp, 0.15021601736547668_dp, 0.23589569241536856_dp, 0.3672011309219512_dp, 0.5668972518738795_dp,& + 0.8684896297613345_dp, 1.3212084913196627_dp, 1.9976957850654782_dp, 3.00698161245029_dp, 4.520261622699826_dp, 6.837125864760079_dp,& + 10.645115539809895_dp, 1.0356874216884052e-06_dp, 2.812088667709278e-06_dp, 5.914445821533368e-06_dp, 1.2021336664547268e-05_dp, 2.3940050145157427e-05_dp,& + 4.6430499419310365e-05_dp, 8.765815047744608e-05_dp, 0.00016143932217372545_dp, 0.0002907528424437285_dp, 0.0005132235070598931_dp, 0.0008895970920506905_dp,& + 0.0015167009659352298_dp, 0.0025470709958953243_dp, 0.004218406965056695_dp, 0.006897410357753999_dp, 0.011144514451186464_dp, 0.017808764773569234_dp,& + 0.028165958189904933_dp, 0.044118529654135305_dp, 0.0684833014292294_dp, 0.1054043456969387_dp, 0.16094570015015752_dp, 0.24395004441521287_dp,& + 0.3673168074143_dp, 0.550025709656669_dp, 0.8207374761240367_dp, 1.2254629611475691_dp, 1.8481116761650778_dp, 2.884215749911384_dp, 5.082816358644647_dp] + aw%aw_erange_matrix(:, 25) = [2.3571329342099874e-07_dp, 1.3632343165414816e-06_dp, 4.023756596461991e-06_dp, 9.795394424152668e-06_dp, 2.195714519062327e-05_dp,& + 4.674841254419276e-05_dp, 9.563512339593217e-05_dp, 0.00018918230274547437_dp, 0.00036348321259617266_dp, 0.0006806544569921736_dp, 0.001245724390748882_dp,& + 0.002233454990133142_dp, 0.00393042938989855_dp, 0.0068003647335751725_dp, 0.011584430850915652_dp, 0.019453873577319414_dp, 0.032240162866761804_dp,& + 0.052779185694875504_dp, 0.08542204924536101_dp, 0.136787796738067_dp, 0.2168656674798965_dp, 0.3406212481786099_dp, 0.5303313641534245_dp,& + 0.8189892522205988_dp, 1.2553469341161432_dp, 1.9116889104572583_dp, 2.896909089589307_dp, 4.382351904816623_dp, 6.667935664555373_dp,& + 10.44093549828013_dp, 6.17436261768095e-07_dp, 1.7313881986083482e-06_dp, 3.841234035608705e-06_dp, 8.228727173271725e-06_dp, 1.709820341911912e-05_dp,& + 3.4332974259821285e-05_dp, 6.676429369632049e-05_dp, 0.00012617607786624823_dp, 0.0002325052400773221_dp, 0.0004189073145508487_dp, 0.000739676578430109_dp,& + 0.0012824873185346604_dp, 0.0021871159459730906_dp, 0.0036737980596718025_dp, 0.006085791120718465_dp, 0.009952725340223944_dp, 0.01608416328295351_dp,& + 0.02570677247015947_dp, 0.04066411629576856_dp, 0.06370600198386596_dp, 0.09890586632566792_dp, 0.15226260044097462_dp, 0.23257478024275838_dp,& + 0.35274192070832605_dp, 0.5318168800175598_dp, 0.7986316416317844_dp, 1.1994633292908101_dp, 1.8185003473260537_dp, 2.851271019221645_dp, 5.045111765749473_dp] + aw%aw_erange_matrix(:, 26) = [1.4156108142769783e-07_dp, 8.358408090279267e-07_dp, 2.563425668333653e-06_dp, 6.532496957198105e-06_dp, 1.529085429435563e-05_dp,& + 3.381004239065925e-05_dp, 7.145759572627074e-05_dp, 0.0001454048583206386_dp, 0.0002863676783658706_dp, 0.0005481076173216848_dp, 0.0010229120533241523_dp,& + 0.0018664583231752616_dp, 0.0033372345185815654_dp, 0.005858297289124_dp, 0.010112965971934416_dp, 0.017191603273076256_dp, 0.028814641239522522_dp,& + 0.04766849746482397_dp, 0.07790741829272711_dp, 0.12589760019317675_dp, 0.2013131761655887_dp, 0.3187416881227427_dp, 0.5000288557106496_dp,& + 0.7777107650960449_dp, 1.200107192058866_dp, 1.8391727503056268_dp, 2.803666178964093_dp, 4.265054523983134_dp, 6.5235529232359735_dp,& + 10.266242055151874_dp, 3.724391604535185e-07_dp, 1.0869250980985111e-06_dp, 2.5605516562597e-06_dp, 5.7850356623393795e-06_dp, 1.2528619638131183e-05_dp,& + 2.6016291223482876e-05_dp, 5.204832564381964e-05_dp, 0.00010081228246405614_dp, 0.00018982349811898816_dp, 0.0003486351977763963_dp, 0.000626280938172421_dp,& + 0.0011028905979224082_dp, 0.0019076162117445236_dp, 0.0032460080919710396_dp, 0.005441424633595424_dp, 0.00899711363781583_dp, 0.01468851247521531_dp,& + 0.023699427657021866_dp, 0.03782154672437762_dp, 0.059744945747629535_dp, 0.09347917704011861_dp, 0.1449628687820927_dp, 0.2229515840638538_dp,& + 0.34033980700933175_dp, 0.5162398701965166_dp, 0.7796319970356158_dp, 1.1770306615230532_dp, 1.7928810285625805_dp, 2.8227297861916565_dp, 5.012462806749877_dp] + aw%aw_erange_matrix(:, 27) = [5.619543540742037e-08_dp, 3.5072928313745456e-07_dp, 1.1785442886447028e-06_dp, 3.3029924055616623e-06_dp, 8.394882189434066e-06_dp,& + 1.987896075698813e-05_dp, 4.449626404673206e-05_dp, 9.506973724339386e-05_dp, 0.00019528307697601834_dp, 0.0003877720465039687_dp, 0.0007475784942017128_dp,& + 0.001404160723388905_dp, 0.002576876821658531_dp, 0.004631430044514_dp, 0.008168570072664031_dp, 0.014161927673231893_dp, 0.024169988544510326_dp,& + 0.04065896918886588_dp, 0.06749026098429482_dp, 0.1106503055340562_dp, 0.17933541972048098_dp, 0.28755422315274737_dp, 0.45648527437792397_dp,& + 0.7179486868235401_dp, 1.119577032884951_dp, 1.7327879813628193_dp, 2.6661030665007965_dp, 4.091161983842176_dp, 6.3086506803163065_dp,& + 10.005419833797736_dp, 1.4962249041277701e-07_dp, 4.835223883864694e-07_dp, 1.2927723889950915e-06_dp, 3.221113081192073e-06_dp, 7.5085382788298944e-06_dp,& + 1.653889597388599e-05_dp, 3.475621269796358e-05_dp, 7.020789074538884e-05_dp, 0.000137107896070371_dp, 0.0002600215543190807_dp, 0.00048059369103468994_dp,& + 0.0008682158907070847_dp, 0.0015367276921454673_dp, 0.0026702645844449866_dp, 0.004562839898703722_dp, 0.007678366608423676_dp, 0.012740848501038493_dp,& + 0.02086877544772841_dp, 0.03377384609132226_dp, 0.05405280484981297_dp, 0.08561371875294983_dp, 0.13429708936338725_dp, 0.20878452860262342_dp,& + 0.32195328331951945_dp, 0.4929981089833493_dp, 0.7511227960385115_dp, 1.1432128213684527_dp, 1.7541296769802968_dp, 2.7794877584199225_dp, 4.963023556769552_dp] + aw%aw_erange_matrix(:, 28) = [2.4343774571442308e-08_dp, 1.6513085830933388e-07_dp, 6.196802532079424e-07_dp, 1.9114039978346155e-06_dp, 5.2375690334248195e-06_dp,& + 1.316277905469794e-05_dp, 3.092030271194152e-05_dp, 6.876819455159673e-05_dp, 0.0001461441409773963_dp, 0.0002988264714800754_dp, 0.0005910302376020617_dp,& + 0.0011354771724870155_dp, 0.0021261659208679307_dp, 0.0038911087717360972_dp, 0.0069760886290369745_dp, 0.012276085772085119_dp, 0.021239226973771258_dp,& + 0.03618004618429005_dp, 0.060756103616981624_dp, 0.10068683961443668_dp, 0.16482922554469034_dp, 0.2667764798918916_dp, 0.4272231990996556_dp,& + 0.6774637303634756_dp, 1.064618278549332_dp, 1.6596947503579922_dp, 2.5710208535654164_dp, 3.9703478472317504_dp, 6.158711044835771_dp,& + 9.822845740299956_dp, 6.607779435757453e-08_dp, 2.4531316662915766e-07_dp, 7.456766806787507e-07_dp, 2.026328956129065e-06_dp, 5.0327732385235214e-06_dp,& + 1.1652295901214502e-05_dp, 2.5505955301673674e-05_dp, 5.331453501898778e-05_dp, 0.0001072058234797249_dp, 0.00020853777085767683_dp, 0.0003941273627591354_dp,& + 0.0007262462873395727_dp, 0.0013084426047463612_dp, 0.00231027419159065_dp, 0.004005535279633006_dp, 0.006830718203653046_dp, 0.011473559821092195_dp,& + 0.019005957730023747_dp, 0.031081856143062504_dp, 0.0502296954993904_dp, 0.08028203266369409_dp, 0.12700459445500437_dp, 0.19901982937944282_dp,& + 0.3091853239783209_dp, 0.4767481905112323_dp, 0.7310696923220488_dp, 1.1193069602208368_dp, 1.72663775937696_dp, 2.74875508795335_dp, 4.927904659791831_dp] + aw%aw_erange_matrix(:, 29) = [3.3134286206436378e-09_dp, 3.608476731974466e-08_dp, 1.9011771017402648e-07_dp, 7.319641454121685e-07_dp, 2.3402664590560514e-06_dp,& + 6.59508695658557e-06_dp, 1.6937909149354525e-05_dp, 4.048237319663682e-05_dp, 9.132011445721631e-05_dp, 0.00019639172259169963_dp, 0.0004056673541505352_dp,& + 0.0008094360939409007_dp, 0.001567130287522824_dp, 0.0029545924806747004_dp, 0.005440438931022152_dp, 0.009807773172795757_dp, 0.017345795847210112_dp,& + 0.030148043017114434_dp, 0.0515717640546498_dp, 0.08693872933672857_dp, 0.14459504048117927_dp, 0.23750169179013617_dp, 0.3856081802743787_dp,& + 0.6193889538319287_dp, 0.9851526108818242_dp, 1.5532426287786882_dp, 2.431651849778814_dp, 3.7922799603529507_dp, 5.93671227399739_dp,& + 9.551588089060862_dp, 1.0546633313159667e-08_dp, 6.866238130433312e-08_dp, 2.8014791592507246e-07_dp, 9.089927672975243e-07_dp, 2.5558210419120903e-06_dp,& + 6.498693707400478e-06_dp, 1.531991208406891e-05_dp, 3.4023779895267246e-05_dp, 7.197856727334818e-05_dp, 0.00014621506144801751_dp, 0.0002869199340733901_dp,& + 0.0005464264697957605_dp, 0.0010137006051227095_dp, 0.0018373548659257801_dp, 0.0032617470785987366_dp, 0.005682944230668296_dp, 0.009734554219352109_dp,& + 0.016418075032354977_dp, 0.02729906435610205_dp, 0.04479995778261982_dp, 0.07263414004010217_dp, 0.11644650227746163_dp, 0.1847594577631817_dp,& + 0.2903885825624092_dp, 0.4526492240843357_dp, 0.7011369514153092_dp, 1.0834309171758731_dp, 1.6852193328076974_dp, 2.7023644845108916_dp, 4.874923027763007_dp] + case(32) + aw%energy_range(:) = [4862.0_dp, 5846.0_dp, 6665.0_dp, 7800.0_dp, 10044.0_dp, 14058.0_dp,& + 19114.0_dp, 25870.0_dp, 35180.0_dp, 58986.0_dp, 85052.0_dp, 126612.0_dp, 247709.0_dp, 452410.0_dp,& + 1104308.0_dp, 2582180.0_dp, 10786426.0_dp, 72565710.0_dp] + aw%aw_erange_matrix(:, 1) = [6.390102821995496e-05_dp, 0.0003410048490902184_dp, 0.000858015893339577_dp, 0.0016504328288047757_dp, 0.002778247721262644_dp,& + 0.004336751679872466_dp, 0.0064710209548362084_dp, 0.009393407912277671_dp, 0.01340416788754177_dp, 0.018917565422190717_dp, 0.026497301468281335_dp,& + 0.036905213045864395_dp, 0.0511672148624311_dp, 0.07066128158960995_dp, 0.09723384839331731_dp, 0.13335312533591778_dp, 0.18231048817210543_dp,& + 0.24848450523394644_dp, 0.3376865863344385_dp, 0.4576131552357413_dp, 0.6184374387625521_dp, 0.8335859250026539_dp, 1.1207633263472254_dp,& + 1.5033220996389998_dp, 2.0121331479703484_dp, 2.6882384204905283_dp, 3.5868412256539663_dp, 4.783852020373796_dp, 6.387973693919086_dp,& + 8.566792744620582_dp, 11.61702931918549_dp, 16.243244163196902_dp, 0.0001644750107629364_dp, 0.0003927652580734362_dp, 0.0006470526340880139_dp,& + 0.0009476004809462573_dp, 0.0013236672585754251_dp, 0.00181722804655121_dp, 0.0024863648293148356_dp, 0.0034080264366486593_dp, 0.004681956510169319_dp,& + 0.006437986099490384_dp, 0.00884737093390095_dp, 0.01213798662642807_dp, 0.01661375946425665_dp, 0.022679584239104586_dp, 0.030873595466529645_dp,& + 0.0419091652309378_dp, 0.05672961944641861_dp, 0.07657952416894345_dp, 0.10309761695759492_dp, 0.13843826485639682_dp, 0.18543118617833296_dp,& + 0.24779409719067566_dp, 0.3304222201755898_dp, 0.43979746242641576_dp, 0.5846010059990558_dp, 0.7767070228661042_dp, 1.0329650164221098_dp,& + 1.3787901136203442_dp, 1.8564287417380754_dp, 2.547529279131862_dp, 3.6531886321446416_dp, 5.969270620351697_dp] + aw%aw_erange_matrix(:, 2) = [5.442349002883837e-05_dp, 0.0002906163628933693_dp, 0.0007321293214401846_dp, 0.0014109784539713872_dp, 0.0023816365307190094_dp,& + 0.0037311772208214787_dp, 0.005592773584012946_dp, 0.0081619152463338_dp, 0.011715729132325964_dp, 0.016637929524033673_dp, 0.023453105417011018_dp,& + 0.03287403908552556_dp, 0.045865900699847945_dp, 0.06373214396298486_dp, 0.08822857905561622_dp, 0.12171425464017217_dp, 0.16735049859917261_dp,& + 0.22936294868166074_dp, 0.3133859506800179_dp, 0.4269147709487938_dp, 0.5798994400836499_dp, 0.7855261781163106_dp, 1.0612512378052221_dp,& + 1.4301841263166695_dp, 1.9229772371853768_dp, 2.580501782235826_dp, 3.4578625966778955_dp, 4.630962088019041_dp, 6.208582258228505_dp,& + 8.358418878620247_dp, 11.37712612667173_dp, 15.968170544511102_dp, 0.0001401015051695221_dp, 0.00033499665110023704_dp, 0.0005532522530987489_dp,& + 0.0008133560062402562_dp, 0.0011422450286066607_dp, 0.0015787618621387204_dp, 0.002176697085238142_dp, 0.0030073676766694266_dp, 0.004163649639092577_dp,& + 0.005767402761174793_dp, 0.007980687395399007_dp, 0.011020625281672214_dp, 0.015178459352483943_dp, 0.020844174229750198_dp, 0.028538588286649656_dp,& + 0.03895532923923562_dp, 0.05301575138551127_dp, 0.07194074865569469_dp, 0.09734467595148226_dp, 0.1313584288969531_dp, 0.17679160298883081_dp,& + 0.23734854692003116_dp, 0.31792227850976007_dp, 0.42500882037583165_dp, 0.5673248919963556_dp, 0.7568049338284129_dp, 1.0103817704846647_dp,& + 1.3535647228420928_dp, 1.8286721197765015_dp, 2.517319618502594_dp, 3.6202102280059703_dp, 5.930981680526662_dp] + aw%aw_erange_matrix(:, 3) = [4.8544808464658475e-05_dp, 0.0002593485712181486_dp, 0.0006539518705617748_dp, 0.0012620998863735048_dp, 0.002134648029009164_dp,& + 0.003353250117842424_dp, 0.005043178699940835_dp, 0.007388686080392843_dp, 0.010651467508498257_dp, 0.01519484467183565_dp, 0.02151725732341947_dp,& + 0.03029858754646109_dp, 0.04246309490817034_dp, 0.05926381239480956_dp, 0.08239494336727046_dp, 0.11414097839482948_dp, 0.15757400511758252_dp,& + 0.21681422548727597_dp, 0.29737332757633034_dp, 0.4066065418252456_dp, 0.5543077141349219_dp, 0.7534939940706474_dp, 1.0214457127670413_dp,& + 1.3810991072747199_dp, 1.8629492914867638_dp, 2.5077428833752067_dp, 3.370510682262872_dp, 4.52714545796296_dp, 6.086483167699423_dp,& + 8.216299008759131_dp, 11.213210923746692_dp, 15.779945298966286_dp, 0.00012498176375406726_dp, 0.000299130758824733_dp, 0.0004949254877793316_dp,& + 0.0007296849915859161_dp, 0.0010288042473983914_dp, 0.0014290235014882077_dp, 0.0019812415860893163_dp, 0.0027529950493393966_dp, 0.00383257137438519_dp,& + 0.005336492795437645_dp, 0.007420608589016774_dp, 0.01029470391501449_dp, 0.014241296894904196_dp, 0.01964004703493962_dp, 0.02699971016577413_dp,& + 0.03700007872604122_dp, 0.050547012803328586_dp, 0.06884458868981981_dp, 0.09348967784530542_dp, 0.12659613160197555_dp, 0.17095862941207848_dp,& + 0.2302711267303353_dp, 0.3094239152326776_dp, 0.4149216994326361_dp, 0.555505084520509_dp, 0.7431502415960526_dp, 0.9948487920453783_dp,& + 1.3361777826685788_dp, 1.809509286088653_dp, 2.496441460806496_dp, 3.597410863544938_dp, 5.9045255378523525_dp] + aw%aw_erange_matrix(:, 4) = [4.2319791684398945e-05_dp, 0.0002262256833340046_dp, 0.0005710759339812151_dp, 0.0011041000499916853_dp, 0.0018721273080030145_dp,& + 0.002950744254164121_dp, 0.004456329948077625_dp, 0.006560445775378507_dp, 0.009507343812482433_dp, 0.013637283047013359_dp, 0.01941907839765781_dp,& + 0.027495223047590025_dp, 0.03874330338636378_dp, 0.054358588747561776_dp, 0.07596440384363516_dp, 0.10575909660902735_dp, 0.14671121294566578_dp,& + 0.20281810337064493_dp, 0.27944792395127677_dp, 0.38379131316561327_dp, 0.525457692252208_dp, 0.7172635733637082_dp, 0.9762793617085143_dp,& + 1.3252331952635001_dp, 1.7944297509586076_dp, 2.4244629711653745_dp, 3.270270626899914_dp, 4.407729666691881_dp, 5.945738068832148_dp,& + 8.052167730865541_dp, 11.023603896745234_dp, 15.561924493694205_dp, 0.00010896980958811763_dp, 0.0002611185815588283_dp, 0.00043301817888623847_dp,& + 0.0006406820460768114_dp, 0.0009077674409158128_dp, 0.001268624601649587_dp, 0.0017708556976942175_dp, 0.002477704567241762_dp, 0.0034722665030748113_dp,& + 0.004865004260125733_dp, 0.006804656478190395_dp, 0.009492536281842186_dp, 0.013201017163803366_dp, 0.01829768554187978_dp, 0.025277118873799437_dp,& + 0.034802761118126926_dp, 0.04776205831199323_dp, 0.06533896907314592_dp, 0.08910928388293891_dp, 0.1211660799438405_dp, 0.16428554188642505_dp,& + 0.22214824519628396_dp, 0.29963998828115096_dp, 0.40327442471190905_dp, 0.5418192779326029_dp, 0.7272994796496782_dp, 0.9767765646718063_dp,& + 1.315909458684106_dp, 1.7871373292268897_dp, 2.4720433230436907_dp, 3.5707586649853615_dp, 5.873612522584144_dp] + aw%aw_erange_matrix(:, 5) = [3.393255390660133e-05_dp, 0.00018157221465841256_dp, 0.0004592307676320871_dp, 0.0008905276367436023_dp, 0.0015164746316516245_dp,& + 0.0024038182425049908_dp, 0.003655880996707775_dp, 0.0054255179504103905_dp, 0.007931245931576318_dp, 0.0114792650369607_dp, 0.01649451279684121_dp,& + 0.023563843280162002_dp, 0.033494992691347265_dp, 0.047396265575400595_dp, 0.06678363974811272_dp, 0.093724229945987_dp, 0.13102792038715239_dp,& + 0.18250270781166214_dp, 0.2532942033927338_dp, 0.3503362853107127_dp, 0.4829488331079465_dp, 0.6636312054412428_dp, 0.9091194626135006_dp,& + 1.241807411536441_dp, 1.6916904363164948_dp, 2.299110603722669_dp, 3.1188473050465815_dp, 4.226742880544712_dp, 5.73178901479017_dp,& + 7.802015996740442_dp, 10.73398018079764_dp, 15.228283328315147_dp, 8.739335036060486e-05_dp, 0.00020983760313852035_dp, 0.0003493229451058535_dp,& + 0.0005199664146008647_dp, 0.0007428694438573918_dp, 0.001048824687194698_dp, 0.0014805150854819704_dp, 0.0020948189118065326_dp, 0.0029671598393268173_dp,& + 0.004198990073584458_dp, 0.005928343272370908_dp, 0.008343628060712927_dp, 0.011701624144711492_dp, 0.0163512213147089_dp, 0.022764888824347185_dp,& + 0.03158039794694182_dp, 0.04365605404949107_dp, 0.06014369592103612_dp, 0.08258509281019695_dp, 0.11303931699899293_dp, 0.1542516135087157_dp,& + 0.20987914795565896_dp, 0.28479788380848736_dp, 0.38553266378218126_dp, 0.5208913754190811_dp, 0.7029743313415381_dp, 0.9489538722825864_dp,& + 1.2846216880545815_dp, 1.7525303625505235_dp, 2.4342520367725067_dp, 3.5294590063092537_dp, 5.82574638448254_dp] + aw%aw_erange_matrix(:, 6) = [2.5286922170354894e-05_dp, 0.00013550300515152938_dp, 0.00034365254863389185_dp, 0.0006692829830793605_dp, 0.0011467768099562_dp,& + 0.0018326842825994733_dp, 0.0028151146148173586_dp, 0.004225026003742279_dp, 0.006250780019705354_dp, 0.009158586718943748_dp, 0.013321604127882514_dp,& + 0.01926054419553751_dp, 0.02769941545264008_dp, 0.03964139074601272_dp, 0.056471580120530336_dp, 0.08009577889831763_dp, 0.11312722824816804_dp,& + 0.15913731138320336_dp, 0.22299123810302657_dp, 0.3112966160076166_dp, 0.43300212495019025_dp, 0.6001966661049284_dp, 0.8291790761739616_dp,& + 1.141900704443846_dp, 1.5679415214227161_dp, 2.147298128643314_dp, 2.934523705189343_dp, 4.00539737112386_dp, 5.469022915149277_dp,& + 7.493643904207673_dp, 10.375817412384437_dp, 14.814601510443076_dp, 6.514769920993364e-05_dp, 0.00015687397983623111_dp, 0.00026260059811101074_dp,& + 0.000394267458907849_dp, 0.000569987485627106_dp, 0.0008163276402528582_dp, 0.0011701237352853642_dp, 0.001680758396099781_dp, 0.002414639429717159_dp,& + 0.0034624986342827427_dp, 0.004949404187288667_dp, 0.00704789552613599_dp, 0.00999535091125554_dp, 0.014117167183015276_dp, 0.019857768872086755_dp,& + 0.02782204007098351_dp, 0.03883055990410155_dp, 0.05399308565310966_dp, 0.07480617533828689_dp, 0.1032828703661818_dp, 0.14212537017885443_dp,& + 0.19495650401901887_dp, 0.2666345532300576_dp, 0.3636933937165475_dp, 0.4949878042793592_dp, 0.6727122940047311_dp, 0.91418280277028_dp,& + 1.2453685853158643_dp, 1.7089820529103965_dp, 2.3866034784779506_dp, 3.4773514427582293_dp, 5.765409584335823_dp] + aw%aw_erange_matrix(:, 7) = [1.932135319864962e-05_dp, 0.00010368197789193328_dp, 0.0002636661772942731_dp, 0.0005157191470705282_dp, 0.0008891130218806238_dp,& + 0.0014324323017507073_dp, 0.002221781063255329_dp, 0.003370774273254239_dp, 0.005043864110016273_dp, 0.00747544974094905_dp, 0.010997228176632299_dp,& + 0.01607649385487372_dp, 0.023369007932130658_dp, 0.033791453456649585_dp, 0.04862029962984213_dp, 0.06962623074409648_dp, 0.09925634818539467_dp,& + 0.14088037853305638_dp, 0.199122452009721_dp, 0.2803071363072363_dp, 0.39305808457961094_dp, 0.549101229063986_dp, 0.7643445772055675_dp,& + 1.0603390883163382_dp, 1.466283147413628_dp, 2.0218493641999524_dp, 2.781370504056042_dp, 3.8205517999540817_dp, 5.248586694740235_dp,& + 7.23391404025796_dp, 10.073125286074314_dp, 14.464007598891323_dp, 4.9794334064441845e-05_dp, 0.0001202442466871008_dp, 0.00020239142207391234_dp,& + 0.00030648388928353133_dp, 0.00044826394218884584_dp, 0.0006508962458350465_dp, 0.0009465213181019036_dp, 0.001378560941846276_dp, 0.002006235556189542_dp,& + 0.002911588665713435_dp, 0.004208981250342487_dp, 0.006057652087479506_dp, 0.008678530354123182_dp, 0.012376893766972177_dp, 0.01757291406967402_dp,& + 0.02484274557305271_dp, 0.034973648086824426_dp, 0.04903775694722466_dp, 0.0684906283923225_dp, 0.09530279631811456_dp, 0.1321356654214213_dp,& + 0.1825779770666456_dp, 0.2514677535724369_dp, 0.34534170861863805_dp, 0.473091186246975_dp, 0.6469906291688993_dp, 0.8844828931716822_dp,& + 1.2116994219481383_dp, 1.6715060390575855_dp, 2.3455108368533817_dp, 3.432378601360354_dp, 5.713384147526647_dp] + aw%aw_erange_matrix(:, 8) = [1.4818639796865528e-05_dp, 7.963886363515554e-05_dp, 0.00020311223580610354_dp, 0.00039911404589973475_dp, 0.0006926333595966217_dp,& + 0.0011254943882583104_dp, 0.0017635291623248677_dp, 0.0027054780460561163_dp, 0.004095260696633318_dp, 0.006139843660554759_dp, 0.009134914466544177_dp,& + 0.013500979005727987_dp, 0.019833495884515773_dp, 0.02897206838249403_dp, 0.042095533039198385_dp, 0.06085215831868936_dp, 0.08753730146299196_dp,& + 0.1253350272549887_dp, 0.17864571781396288_dp, 0.2535290933953418_dp, 0.35830209305587557_dp, 0.5043450664128841_dp, 0.7071902955364795_dp,& + 0.9879995840794562_dp, 1.3755955013642696_dp, 1.9093257812455384_dp, 2.6432950751333295_dp, 3.6531218956627853_dp, 5.048075954994877_dp,& + 6.99678689342338_dp, 9.795906582751762_dp, 14.142088288126018_dp, 3.820307739174523e-05_dp, 9.253211423715926e-05_dp, 0.00015666144789002137_dp,& + 0.00023941035175647392_dp, 0.0003544795957843895_dp, 0.0005220706038556393_dp, 0.0007702567427026573_dp, 0.0011373348215882129_dp, 0.001676302988186351_dp,& + 0.002461551034244103_dp, 0.003597851119996275_dp, 0.005232383925906072_dp, 0.007571020540645877_dp, 0.01090045623553385_dp, 0.01561826230147036_dp,& + 0.022273572546892197_dp, 0.03162200007875945_dp, 0.04469955727258082_dp, 0.06292193738822648_dp, 0.08821770562181855_dp, 0.12320712191071415_dp,& + 0.17144328423198826_dp, 0.23774090556227068_dp, 0.3286348439935499_dp, 0.45304683721268363_dp, 0.6233242933376546_dp, 0.8570306244015214_dp,& + 1.1804560303362448_dp, 1.6366228282940412_dp, 2.3071833124934_dp, 3.3903998854623985_dp, 5.664862602289436_dp] + aw%aw_erange_matrix(:, 9) = [1.1315989220620849e-05_dp, 6.091484824470965e-05_dp, 0.0001558556348063919_dp, 0.0003078203984115187_dp, 0.0005380983662976303_dp,& + 0.0008826023610964867_dp, 0.0013981206622491853_dp, 0.0021702768627684973_dp, 0.0033248504851841115_dp, 0.005044444967959304_dp, 0.007592519217726472_dp,& + 0.011347339662602948_dp, 0.016849450868861544_dp, 0.024867669342019266_dp, 0.03649043474384647_dp, 0.05325176815491175_dp, 0.07730430050505666_dp,& + 0.1116561161775443_dp, 0.16049387125009024_dp, 0.22962230812156062_dp, 0.3270606812998151_dp, 0.46385106272587334_dp, 0.6551545548992531_dp,& + 0.9217445361800276_dp, 1.2920638357850092_dp, 1.8051264992628424_dp, 2.514796276521399_dp, 3.496590833178514_dp, 4.85984548686659_dp,& + 6.773380959237685_dp, 9.533934166411905_dp, 13.837118014874001_dp, 2.918394667912216e-05_dp, 7.092102053120252e-05_dp, 0.0001208490607819795_dp,& + 0.00018654379226223144_dp, 0.00027989427379719806_dp, 0.0004184502969887145_dp, 0.000626673050017551_dp, 0.0009383293128013663_dp, 0.0014008572107836192_dp,& + 0.002081684144431634_dp, 0.0030767293366374213_dp, 0.004521918459768059_dp, 0.006608939226821494_dp, 0.009606834282132472_dp, 0.013891522205312699_dp,& + 0.0199860217642558_dp, 0.028615075699006714_dp, 0.04077910134384887_dp, 0.057854053870927825_dp, 0.08172606721705969_dp, 0.11497300539733377_dp,& + 0.16111009858027334_dp, 0.22492545113901904_dp, 0.3129477675464925_dp, 0.43412426576959084_dp, 0.6008706467915673_dp, 0.8308678912066612_dp,& + 1.1505656278854524_dp, 1.6031493439397482_dp, 2.270331555451258_dp, 3.3500083706514476_dp, 5.6182166490122984_dp] + aw%aw_erange_matrix(:, 10) = [7.188720818598015e-06_dp, 3.881661788798954e-05_dp, 9.991514616563082e-05_dp, 0.00019924670807668527_dp, 0.0003530921393375012_dp,& + 0.0005892390933533132_dp, 0.0009519594342766803_dp, 0.0015086954155209336_dp, 0.0023599840025008696_dp, 0.003654238190455114_dp, 0.005609186735480063_dp,& + 0.008542461005020551_dp, 0.01291487453690728_dp, 0.01939133485309362_dp, 0.028926175238232574_dp, 0.04288217331115784_dp, 0.06319585740381348_dp,& + 0.09260618135064007_dp, 0.13496966452445772_dp, 0.19569319485572675_dp, 0.2823266941469131_dp, 0.40537308432315655_dp, 0.5793949454394274_dp,& + 0.8245311284762115_dp, 1.1685945009236132_dp, 1.6500342331912714_dp, 2.322292524496194_dp, 3.260691519334744_dp, 4.574650070688025_dp,& + 6.433299519631953_dp, 9.133561259222846_dp, 13.369520380969645_dp, 1.8552570543955455e-05_dp, 4.5365280395614445e-05_dp, 7.824430449992235e-05_dp,& + 0.000123064841905601_dp, 0.00018917614532398957_dp, 0.00029038908164917863_dp, 0.0004461302902503803_dp, 0.0006838555287975979_dp, 0.001043105615047013_dp,& + 0.0015811894241096348_dp, 0.0023809364846653818_dp, 0.003561415027894291_dp, 0.005292829489029218_dp, 0.007817192602841475_dp, 0.011476902733337355_dp,& + 0.01675409107074492_dp, 0.024324590249295588_dp, 0.035131696353015066_dp, 0.050486674490227534_dp, 0.07220539175013203_dp, 0.10279391074071534_dp,& + 0.14570107833907187_dp, 0.20566478637597496_dp, 0.28919483053487227_dp, 0.40526987079618043_dp, 0.5664074675124494_dp, 0.7904744673132619_dp,& + 1.1041823544223337_dp, 1.5509968448017435_dp, 2.2127606942845244_dp, 3.286839828729209_dp, 5.545336982828468_dp] + aw%aw_erange_matrix(:, 11) = [5.212842853721373e-06_dp, 2.8216485728556984e-05_dp, 7.298119875698969e-05_dp, 0.00014666687860403872_dp, 0.00026275225618308033_dp,& + 0.0004444091505151155_dp, 0.0007287615881022521_dp, 0.0011728502574399147_dp, 0.0018626816535886259_dp, 0.0029267741621968922_dp, 0.004555909601317652_dp,& + 0.007031533755260647_dp, 0.01076629475072859_dp, 0.016361592669832718_dp, 0.02468887356341755_dp, 0.03700391916268461_dp, 0.055106793600662854_dp,& + 0.08156471559554047_dp, 0.12002134058150862_dp, 0.17562433753378992_dp, 0.2556145691836236_dp, 0.370135979817623_dp, 0.5333479158700739_dp,& + 0.7649561302861829_dp, 1.092336920188996_dp, 1.5535402649553307_dp, 2.201701148128128_dp, 3.111986649331865_dp, 4.39385578004782_dp,& + 6.216650142887412_dp, 8.877446914810541_dp, 13.069399675595056_dp, 1.3460633699481115e-05_dp, 3.307685267989567e-05_dp, 5.7604518102217696e-05_dp,& + 9.195641910083116e-05_dp, 0.00014400755053456355_dp, 0.00022539775962319305_dp, 0.0003526662335951264_dp, 0.0005496236389883362_dp, 0.0008511354053799554_dp,& + 0.0013083814172165737_dp, 0.0019961328695681448_dp, 0.0030229467394267007_dp, 0.00454547537639009_dp, 0.00678848631990991_dp, 0.010072747132319853_dp,& + 0.014853695284454384_dp, 0.021774843424492554_dp, 0.03174125164120884_dp, 0.04602026166587432_dp, 0.06637923482681696_dp, 0.0952736156331887_dp,& + 0.13610397708422503_dp, 0.19356942137149777_dp, 0.27416081565736494_dp, 0.3868712620397728_dp, 0.5442810461868627_dp, 0.7643794009427055_dp,& + 1.0740573000929907_dp, 1.5169810386781961_dp, 2.1751039860564134_dp, 3.2454752973208514_dp, 5.497663131109453_dp] + aw%aw_erange_matrix(:, 12) = [3.6756703015465298e-06_dp, 1.9954750677579616e-05_dp, 5.191549207164041e-05_dp, 0.00010531730513004429_dp, 0.00019114894568566566_dp,& + 0.0003284345206580502_dp, 0.0005478574351058358_dp, 0.0008970642726998205_dp, 0.001448846563954588_dp, 0.0023134440610659145_dp, 0.00365660754627558_dp,& + 0.005725809627536767_dp, 0.008888016831791598_dp, 0.01368381089343313_dp, 0.020904518142872384_dp, 0.031701561841387796_dp, 0.04774073523681854_dp,& + 0.07141882485947987_dp, 0.10616643258939448_dp, 0.15686955518574938_dp, 0.23045435097627895_dp, 0.33669592809026266_dp, 0.48933536087816165_dp,& + 0.7076244370403264_dp, 1.0184762856769092_dp, 1.4595108245228903_dp, 2.0835241856266555_dp, 2.965501956804563_dp, 4.214929989807013_dp,& + 6.001367447071038_dp, 8.622077664029446_dp, 12.76932426608392_dp, 9.497600314818484e-06_dp, 2.347760247868802e-05_dp, 4.136863276834202e-05_dp,& + 6.721947207800727e-05_dp, 0.00010755652914793868_dp, 0.00017204310109274583_dp, 0.00027461020521950513_dp, 0.00043573410701580053_dp, 0.0006859083122114215_dp,& + 0.0010704829571126738_dp, 0.0016564711186942442_dp, 0.0025422076964986724_dp, 0.003871039755848531_dp, 0.005850643295798488_dp, 0.008780144703142966_dp,& + 0.013088020403816946_dp, 0.01938482007375741_dp, 0.02853620387815694_dp, 0.04176374049584569_dp, 0.06078358076425594_dp, 0.087996854859105_dp,& + 0.12675113895160917_dp, 0.18170115882627896_dp, 0.2593129035941683_dp, 0.3685886307380454_dp, 0.5221684374385586_dp, 0.7381657526850111_dp,& + 1.0436599990100175_dp, 1.4825352832265704_dp, 2.136878793265541_dp, 3.2034437811357703_dp, 5.449257489548676_dp] + aw%aw_erange_matrix(:, 13) = [2.0394837579119305e-06_dp, 1.1136428689231387e-05_dp, 2.9311026954581983e-05_dp, 6.057395938117077e-05_dp, 0.00011273361636596131_dp,& + 0.00019945262227642557_dp, 0.00034307020413915784_dp, 0.0005789986244949678_dp, 0.0009626136389075716_dp, 0.0015797047702976012_dp, 0.0025620328180390273_dp,& + 0.00411027194192014_dp, 0.006527602589322277_dp, 0.010268581467814463_dp, 0.016009798955308914_dp, 0.02475143770962476_dp, 0.03796243042890685_dp,& + 0.057786831913653906_dp, 0.0873357482301367_dp, 0.1310983577206706_dp, 0.19551814727621097_dp, 0.2897978980472306_dp, 0.4270216153720778_dp,& + 0.6257183147230295_dp, 0.9120522680792509_dp, 1.3229345707400562_dp, 1.9105866829861018_dp, 2.7496652071687744_dp, 3.9496659363104385_dp,& + 5.680486965184195_dp, 8.239732353995374_dp, 12.318415719148392_dp, 5.276628830314947e-06_dp, 1.3196668481729192e-05_dp, 2.379458469172375e-05_dp,& + 3.999888381841533e-05_dp, 6.655277116013134e-05_dp, 0.00011053727387478837_dp, 0.00018248747181848964_dp, 0.00029842809341232193_dp, 0.0004828462223872788_dp,& + 0.0007729214376067976_dp, 0.001224631278196218_dp, 0.001921577765363735_dp, 0.0029876866735399437_dp, 0.0046053732161687655_dp, 0.007041380807008615_dp,& + 0.010683336283217822_dp, 0.016091204665789092_dp, 0.02406937359680715_dp, 0.03576720002987578_dp, 0.05281872257231177_dp, 0.07753624384014632_dp,& + 0.11317828438072734_dp, 0.16432147566237754_dp, 0.2373819281103962_dp, 0.34136408980953675_dp, 0.48899079151871744_dp, 0.6985643332266451_dp,& + 0.9974643386084848_dp, 1.4299370040199422_dp, 2.0783190576822954_dp, 3.138964327630411_dp, 5.375073752754771_dp] + aw%aw_erange_matrix(:, 14) = [1.2029417634752254e-06_dp, 6.609895643735541e-06_dp, 1.761886326860991e-05_dp, 3.714701435066809e-05_dp, 7.09606454750247e-05_dp,& + 0.00012924586800944736_dp, 0.0002289177620104591_dp, 0.00039735575327091586_dp, 0.0006783049971089168_dp, 0.001140918627613451_dp, 0.0018934100817969098_dp,& + 0.0031034810098270562_dp, 0.0050286516433828725_dp, 0.008060966671683137_dp, 0.012792436500279173_dp, 0.020110206423758527_dp, 0.03133410211483852_dp,& + 0.04841425570428367_dp, 0.07421348496567018_dp, 0.11290867950409522_dp, 0.1705586323733128_dp, 0.2559040285419376_dp, 0.38149111837813177_dp,& + 0.5652486706311622_dp, 0.8327086526705059_dp, 1.2201713489652732_dp, 1.7793482729282073_dp, 2.5845851027859807_dp, 3.745354303892851_dp,& + 5.4318267387256425_dp, 7.941927006849686_dp, 11.965772395891321_dp, 3.1166015808204985e-06_dp, 7.893584647537054e-06_dp, 1.4590421523143668e-05_dp,& + 2.540166835137321e-05_dp, 4.38866273658644e-05_dp, 7.544235506820306e-05_dp, 0.00012836853819339647_dp, 0.0002156510284757784_dp, 0.00035755049600582473_dp,& + 0.0005853791673295657_dp, 0.0009470589489445969_dp, 0.0015152726995104847_dp, 0.0023993396733646157_dp, 0.0037624022005128713_dp, 0.005846143988201738_dp,& + 0.009006130762738474_dp, 0.01376205648174844_dp, 0.02086880821287917_dp, 0.03141648831640661_dp, 0.04697057987136505_dp, 0.06976767926454802_dp,& + 0.10298830876584288_dp, 0.1511376630263013_dp, 0.2205811788480397_dp, 0.320313759532162_dp, 0.4631152216015924_dp, 0.6674360776688134_dp,& + 0.9609048344557064_dp, 1.3880820200304151_dp, 2.031544618845653_dp, 3.087377771089118_dp, 5.31578682998986_dp] + aw%aw_erange_matrix(:, 15) = [5.514768391533348e-07_dp, 3.0661463050989084e-06_dp, 8.370607042832422e-06_dp, 1.830793322995512e-05_dp, 3.65866489044243e-05_dp,& + 6.987140555359488e-05_dp, 0.00012955245746241426_dp, 0.00023469156977383316_dp, 0.00041673066301572737_dp, 0.0007268469188482661_dp, 0.0012473021552990137_dp,& + 0.002108784237240361_dp, 0.0035166643543472435_dp, 0.005790416868049286_dp, 0.009422327737378779_dp, 0.015164272167993003_dp, 0.02415507435487594_dp,& + 0.038106181361843135_dp, 0.05957064947730835_dp, 0.09233052534676135_dp, 0.14195168557080626_dp, 0.2165746550862792_dp, 0.3280373760158957_dp,& + 0.493465990037226_dp, 0.7375325370826453_dp, 1.0956894156446793_dp, 1.6189196862917987_dp, 2.381098691427177_dp, 3.4916207819996172_dp,& + 5.1210060943387665_dp, 7.5676555925110085_dp, 11.520669806145102_dp, 1.4324492833187423e-06_dp, 3.714945365379106e-06_dp, 7.187993199450151e-06_dp,& + 1.3287667789384625e-05_dp, 2.435221365340668e-05_dp, 4.406786544877652e-05_dp, 7.839477316844559e-05_dp, 0.00013700432533564813_dp, 0.00023541888373746023_dp,& + 0.0003982417143724247_dp, 0.0006640223423546365_dp, 0.0010925276402432504_dp, 0.0017755203327472222_dp, 0.0028526152739405167_dp, 0.0045344377578051915_dp,& + 0.007136218994535957_dp, 0.011126225466246156_dp, 0.01719515628222213_dp, 0.026355033830470446_dp, 0.04007940751399853_dp, 0.06050127009572156_dp,& + 0.09069160330701329_dp, 0.13505126572297815_dp, 0.19986523979796597_dp, 0.2940997147198093_dp, 0.4305938358212778_dp, 0.6279833290723216_dp,& + 0.9142278655051918_dp, 1.3343266294937697_dp, 1.971223529289826_dp, 3.0207289388880563_dp, 5.239269717116346_dp] + aw%aw_erange_matrix(:, 16) = [2.6346628583772034e-07_dp, 1.4870682611802608e-06_dp, 4.18499777462391e-06_dp, 9.565754079998203e-06_dp, 2.0095438915823317e-05_dp,& + 4.030712638205273e-05_dp, 7.820310873891258e-05_dp, 0.0001476189063429688_dp, 0.00027206125557350966_dp, 0.0004908276742423054_dp, 0.0008686422030538531_dp,& + 0.0015106576888148007_dp, 0.0025855700579017434_dp, 0.0043608859416256075_dp, 0.007256247781115456_dp, 0.011923381221441286_dp, 0.01936500732097008_dp,& + 0.031110395247887928_dp, 0.049472724953768164_dp, 0.07792391423249093_dp, 0.12163719777397036_dp, 0.18826820696011917_dp, 0.2890741916661454_dp,& + 0.44051299024821017_dp, 0.6665282145336267_dp, 1.0018392157983365_dp, 1.4967815518731842_dp, 2.2247902473537535_dp, 3.295151802440413_dp,& + 4.87866127574686_dp, 7.274154425483326_dp, 11.170031678415262_dp, 6.865691087424058e-07_dp, 1.8349687179642652e-06_dp, 3.75363535847515e-06_dp,& + 7.406302503889748e-06_dp, 1.4385998863803715e-05_dp, 2.7332856632656454e-05_dp, 5.070293872960844e-05_dp, 9.194731882902252e-05_dp, 0.00016333066755487376_dp,& + 0.0002847458523672339_dp, 0.0004880328440654819_dp, 0.0008235400684252141_dp, 0.001370000313997599_dp, 0.002249268185463258_dp, 0.003648135807576948_dp,& + 0.005850384133560756_dp, 0.009283540163912576_dp, 0.01458663604211278_dp, 0.022707798579110823_dp, 0.03504400012572891_dp, 0.05364018073213217_dp,& + 0.08147187176803067_dp, 0.12284570471579664_dp, 0.18396885882280342_dp, 0.27376977104743744_dp, 0.4051220237008429_dp, 0.5968036286827566_dp,& + 0.8770477402799991_dp, 1.2912341021707199_dp, 1.9226515113345246_dp, 2.9669527288987725_dp, 5.177596037459169_dp] + aw%aw_erange_matrix(:, 17) = [7.696764691509552e-08_dp, 4.5183075501644766e-07_dp, 1.3712733197245156e-06_dp, 3.452398063116915e-06_dp, 7.99119238288884e-06_dp,& + 1.7499890158507848e-05_dp, 3.668225172908821e-05_dp, 7.411367023252019e-05_dp, 0.0001450609740104884_dp, 0.0002761333471939282_dp, 0.0005128366382617873_dp,& + 0.0009316733536716902_dp, 0.0016592776527650684_dp, 0.0029023227583525545_dp, 0.004993762465329047_dp, 0.008463615785356367_dp, 0.014146318917564842_dp,& + 0.02334212828021178_dp, 0.03805782856888779_dp, 0.0613630042242151_dp, 0.0979136503362365_dp, 0.15471676332581316_dp, 0.24224053787692895_dp,& + 0.3760196167953944_dp, 0.5789730031642062_dp, 0.8847668378302425_dp, 1.3427798213464026_dp, 2.0257631969638736_dp, 3.042786371879784_dp,& + 4.564995894383141_dp, 6.891880055654338_dp, 10.711074682469496_dp, 2.0224960490304485e-07_dp, 5.837519191389681e-07_dp, 1.3534097826701593e-06_dp,& + 3.0163324999016133e-06_dp, 6.464297707355912e-06_dp, 1.331006273228438e-05_dp, 2.6438493784462622e-05_dp, 5.089377871159909e-05_dp, 9.53135908336066e-05_dp,& + 0.00017421956824809404_dp, 0.0003116271902197154_dp, 0.0005466663994455823_dp, 0.0009422361350401303_dp, 0.0015981946213501235_dp, 0.0026712728244169207_dp,& + 0.004404875333973468_dp, 0.00717331310959028_dp, 0.011546952692401411_dp, 0.018387490277830258_dp, 0.028986360940377882_dp, 0.04526460807725196_dp,& + 0.07006006488175816_dp, 0.10753871373789183_dp, 0.16378446149863707_dp, 0.24765288245177752_dp, 0.3720420890669611_dp, 0.5559074354965244_dp,& + 0.8278548563568215_dp, 1.2338117262467065_dp, 1.8576021658437778_dp, 2.8947650724141107_dp, 5.094894347251689_dp] + aw%aw_erange_matrix(:, 18) = [1.5580960122828055e-08_dp, 1.0192299261551187e-07_dp, 3.657511654714275e-07_dp, 1.0874230387694592e-06_dp, 2.8971440093678986e-06_dp,& + 7.1231112287328e-06_dp, 1.6440376252868036e-05_dp, 3.6035911594207885e-05_dp, 7.564822282610485e-05_dp, 0.0001530604093750471_dp, 0.0002999674552596099_dp,& + 0.0005716626169231291_dp, 0.0010627819854068627_dp, 0.0019325381417571955_dp, 0.0034446462658281212_dp, 0.006029758821968773_dp, 0.010382043759726605_dp,& + 0.017607085158632928_dp, 0.02944628039743525_dp, 0.04861435988540585_dp, 0.07930297685700823_dp, 0.12792652074627453_dp, 0.20421936908257549_dp,& + 0.3228415686086713_dp, 0.5057217947095013_dp, 0.785484422991801_dp, 1.2105330871831885_dp, 1.852886865611021_dp, 2.8213315422092657_dp,& + 4.2873111269979765_dp, 6.550982976987269_dp, 10.299461972660755_dp, 4.192785461816036e-08_dp, 1.4682586910958697e-07_dp, 4.248767433871547e-07_dp,& + 1.117972412187448e-06_dp, 2.71251708562224e-06_dp, 6.166664608205133e-06_dp, 1.3299698724334126e-05_dp, 2.7458360437668858e-05_dp, 5.463565964132874e-05_dp,& + 0.00010531494807998692_dp, 0.0001974602213268062_dp, 0.0003612942851684024_dp, 0.0006468325897487988_dp, 0.001135618706607295_dp, 0.0019588032650003236_dp,& + 0.003324710089253406_dp, 0.005560469162003084_dp, 0.009174344598623402_dp, 0.014948285309521006_dp, 0.024074306780617383_dp, 0.03835406948576763_dp,& + 0.060489181968959096_dp, 0.0945015966761899_dp, 0.1463417320393485_dp, 0.22477371348415012_dp, 0.34269334477792374_dp, 0.5192018690921564_dp,& + 0.7832512032052583_dp, 1.1813099794431254_dp, 1.7977731364021527_dp, 2.828182155100705_dp, 5.018697893750251_dp] + aw%aw_erange_matrix(:, 19) = [1.4796558719757977e-09_dp, 1.6277762282636202e-08_dp, 8.615102100471783e-08_dp, 3.3251166768869524e-07_dp, 1.064831343891703e-06_dp,& + 3.0042406722730696e-06_dp, 7.722404719947578e-06_dp, 1.8469628120696557e-05_dp, 4.168720676495336e-05_dp, 8.969407716668371e-05_dp, 0.00018534670944540425_dp,& + 0.00036995434452620024_dp, 0.0007164776276992899_dp, 0.0013511756947926401_dp, 0.0024885840769342527_dp, 0.004487272639985271_dp, 0.007937634518341114_dp,& + 0.013798542180092185_dp, 0.023607852053926744_dp, 0.03980353161167122_dp, 0.06620914631345257_dp, 0.10876176019481658_dp, 0.17659514989891748_dp,& + 0.28364164912494744_dp, 0.45099127302133024_dp, 0.7103683461225575_dp, 1.109312567732835_dp, 1.7191679096665389_dp, 2.648421848786194_dp,& + 4.06873544538514_dp, 6.280858212318488_dp, 9.971616727521422_dp, 4.7301698039073534e-09_dp, 3.1078236876760897e-08_dp, 1.2722293347158736e-07_dp,& + 4.135773629354279e-07_dp, 1.1643319139692173e-06_dp, 2.9633030798047164e-06_dp, 6.990659700961397e-06_dp, 1.5534394085699292e-05_dp, 3.28792052583233e-05_dp,& + 6.681670495514343e-05_dp, 0.00013116076656301764_dp, 0.0002498651223560153_dp, 0.0004636589258144925_dp, 0.0008405899279454757_dp, 0.0014925644239063773_dp,& + 0.0026009920182698686_dp, 0.004456120959091793_dp, 0.00751677674389606_dp, 0.012500261250050913_dp, 0.020516489982978243_dp, 0.03326657617193578_dp,& + 0.053334802223457274_dp, 0.08461553683522265_dp, 0.13293582624456382_dp, 0.20696680596446562_dp, 0.31958257452387945_dp, 0.4899879264178536_dp,& + 0.7474157763110646_dp, 1.1388011986618074_dp, 1.7490627041810483_dp, 2.7738272660229994_dp, 4.9565545529977175_dp] + case(34) + aw%energy_range(:) = [9649.0_dp, 15161.0_dp, 29986.0_dp, 49196.0_dp, 109833.0_dp, 276208.0_dp, 852991.0_dp] + aw%aw_erange_matrix(:, 1) = [3.284029233271286e-05_dp, 0.0001753443602861097_dp, 0.0004416382833363001_dp, 0.0008508530310865113_dp, 0.001435500605855746_dp,& + 0.0022474948219129297_dp, 0.003366173371324329_dp, 0.004907942966760921_dp, 0.007037748206337417_dp, 0.009983831117905245_dp, 0.014057973412231587_dp,& + 0.019683414844193538_dp, 0.02743271515183254_dp, 0.03807838736551588_dp, 0.052660091008446035_dp, 0.07257342975355677_dp, 0.09968697353631621_dp,& + 0.13649612296545818_dp, 0.18632500099011615_dp, 0.2535908886542759_dp, 0.3441500984275648_dp, 0.46575004766668_dp, 0.6286204407593304_dp,& + 0.8462483877785438_dp, 1.1364010501626234_dp, 1.5224916494827863_dp, 2.035445381255887_dp, 2.716346186249304_dp, 3.620421040738206_dp,& + 4.823581438788581_dp, 6.434509907627798_dp, 8.620766164346367_dp, 11.679090118639257_dp, 16.31432816585662_dp, 8.4538052355896e-05_dp,& + 0.00020209318539166847_dp, 0.00033361605486797254_dp, 0.0004901319572083779_dp, 0.0006876803644732437_dp, 0.0009493703556928221_dp, 0.0013072005549165328_dp,& + 0.0018035890085942577_dp, 0.0024937295684409103_dp, 0.0034499397324379713_dp, 0.00476826036404788_dp, 0.0065772141488150675_dp, 0.009049030640506878_dp,& + 0.012414126010019873_dp, 0.016979951815415794_dp, 0.02315561592334051_dp, 0.031484041042937_dp, 0.04268391545844468_dp, 0.05770434764295233_dp,& + 0.07779602216248598_dp, 0.10460388481675117_dp, 0.14028819232415718_dp, 0.18768361957484037_dp, 0.2505110517811862_dp, 0.33366599536844854_dp,& + 0.4436264870131247_dp, 0.5890644515470643_dp, 0.7818386670916874_dp, 1.0387776399865274_dp, 1.3852730956246349_dp, 1.8635541689521873_dp,& + 2.5552790973254864_dp, 3.661647560244881_dp, 5.979097365202448_dp] + aw%aw_erange_matrix(:, 2) = [2.2094687262226044e-05_dp, 0.00011816317101145329_dp, 0.00029854362986100777_dp, 0.0005779739014899124_dp, 0.0009819112670486493_dp,& + 0.0015516034173501654_dp, 0.0023507187818878183_dp, 0.0034732685500535195_dp, 0.00505334279364789_dp, 0.007278229326144087_dp, 0.010406819589614869_dp,& + 0.014795161155330522_dp, 0.020931286923915934_dp, 0.029482154546951286_dp, 0.04135653654321724_dp, 0.05778898092867048_dp, 0.08045158704880996_dp,& + 0.11160243319073283_dp, 0.15428220578421106_dp, 0.2125741178044686_dp, 0.2919468573365305_dp, 0.3997065271731107_dp, 0.545592087818525_dp,& + 0.7425611332686428_dp, 1.0078318394632224_dp, 1.3642789958888877_dp, 1.8423416665523202_dp, 2.48272174251732_dp, 3.34042303033154_dp,& + 4.49133411535853_dp, 6.044309582675748_dp, 8.167153038233048_dp, 11.156471603344267_dp, 15.714736908294974_dp, 5.689777248462453e-05_dp,& + 0.0001364647878286462_dp, 0.0002266959149215116_dp, 0.0003363227347021138_dp, 0.0004783149170860289_dp, 0.0006715498663212837_dp, 0.0009421913049362618_dp,& + 0.0013250426248297155_dp, 0.0018660179676916586_dp, 0.00262648268480602_dp, 0.003689465255982615_dp, 0.005167783411766887_dp, 0.007214591621086576_dp,& + 0.010037222243044243_dp, 0.013915457617770334_dp, 0.01922566776214666_dp, 0.02647264919678102_dp, 0.03633153858613665_dp, 0.049702887216291285_dp,& + 0.06778493328431712_dp, 0.09216841458681874_dp, 0.12496114099205212_dp, 0.1689524368948172_dp, 0.22783243637559455_dp, 0.3064902609254688_dp,& + 0.411433435566918_dp, 0.5514107558972641_dp, 0.7384129467740507_dp, 0.9894523508058952_dp, 1.3301301240547123_dp, 1.8028378573543902_dp,& + 2.489168614889156_dp, 3.5894672490279578_dp, 5.895310588871672_dp] + aw%aw_erange_matrix(:, 3) = [1.2132019239369146e-05_dp, 6.506554392462203e-05_dp, 0.00016528151320033429_dp, 0.00032271987439700723_dp, 0.0005549904907647636_dp,& + 0.0008912186380916402_dp, 0.0013769333304078336_dp, 0.00207998381188429_dp, 0.0030983248733590404_dp, 0.004571097441508312_dp, 0.006694456763746173_dp,& + 0.009743704668641925_dp, 0.0141037713916676_dp, 0.02031087384545962_dp, 0.029109193553804015_dp, 0.04152772200656733_dp, 0.05898411878582171_dp,& + 0.08342465247911345_dp, 0.11751221427114543_dp, 0.1648782324800013_dp, 0.23045938623741916_dp, 0.3209467823295079_dp, 0.44538447707509593_dp,& + 0.6159672665711226_dp, 0.8491072823533072_dp, 1.1668710896432313_dp, 1.5989474740844776_dp, 2.1854242653839444_dp, 2.9809152725739025_dp,& + 4.061217864274067_dp, 5.535407811609172_dp, 7.571672639611632_dp, 10.466564989305379_dp, 14.91952959384994_dp, 3.126217597574477e-05_dp,& + 7.540587737410632e-05_dp, 0.00012663926218204873_dp, 0.00019110769108438634_dp, 0.00027820581560489743_dp, 0.000401742249839652_dp, 0.0005808693019056328_dp,& + 0.0008413761481210849_dp, 0.0012182358494751703_dp, 0.001759637722089599_dp, 0.00253246317609668_dp, 0.003629502407336348_dp, 0.00517906799440672_dp,& + 0.0073579025027302025_dp, 0.01040852585005309_dp, 0.014662503493069159_dp, 0.020571571811010672_dp, 0.028749161300949972_dp, 0.04002565337439286_dp,& + 0.05552176300115481_dp, 0.07674587007131725_dp, 0.10572312939601615_dp, 0.14516718239506418_dp, 0.19871016099008434_dp, 0.2712154487579484_dp,& + 0.3692151806287191_dp, 0.5015525805409441_dp, 0.6803982020135383_dp, 0.9230308920142081_dp, 1.2553734442165063_dp, 1.7200955901449364_dp,& + 2.3987730554757754_dp, 3.4906629653715_dp, 5.780815874478559_dp] + aw%aw_erange_matrix(:, 4) = [7.845531705064765e-06_dp, 4.217579566703759e-05_dp, 0.0001076255406955941_dp, 0.0002116704074840506_dp, 0.0003678026352786526_dp,& + 0.000598637239972256_dp, 0.000939800791185946_dp, 0.0014447771966513766_dp, 0.002191627535252642_dp, 0.0032927972200630018_dp, 0.004909216880554122_dp,& + 0.007270144108734435_dp, 0.010700753084513917_dp, 0.015660261119126325_dp, 0.02279439226673758_dp, 0.033007300151380946_dp, 0.04755981744820865_dp,& + 0.06820320985515761_dp, 0.09736066855556012_dp, 0.13837281589809153_dp, 0.19582885861759528_dp, 0.2760121868265214_dp, 0.3874989458973457_dp,& + 0.5419617440352286_dp, 0.7552508475941064_dp, 1.048857678610048_dp, 1.4519234318259462_dp, 2.004071631268318_dp, 2.759600998924181_dp,& + 3.7942044073242056_dp, 5.217087596451319_dp, 7.196718451225344_dp, 10.029695823161129_dp, 14.413626849760721_dp, 2.022742080929783e-05_dp,& + 4.902127023830298e-05_dp, 8.308838409631613e-05_dp, 0.00012719755797047105_dp, 0.00018877141608928316_dp, 0.00027875729779708194_dp, 0.00041237481957666014_dp,& + 0.0006104274314639044_dp, 0.0009017824485847016_dp, 0.0013270526990110587_dp, 0.0019435429478184875_dp, 0.0028318806888766317_dp, 0.004105011117474572_dp,& + 0.0059204430431561185_dp, 0.008496895591229079_dp, 0.012136858469163465_dp, 0.017257067102487582_dp, 0.02442954195917895_dp, 0.03443669419909579_dp,& + 0.04834513188831433_dp, 0.06760433082481605_dp, 0.09417845588835595_dp, 0.13072271761835513_dp, 0.18082056576074482_dp, 0.2493066841224739_dp,& + 0.3427177893721846_dp, 0.46995019394607707_dp, 0.6432897947695325_dp, 0.8801980582788952_dp, 1.2068306280775711_dp, 1.6660767737909483_dp,& + 2.3395502248176463_dp, 3.4258517245052684_dp, 5.7058363778559205_dp] + aw%aw_erange_matrix(:, 5) = [3.865603619912879e-06_dp, 2.087430645188353e-05_dp, 5.3738065099243575e-05_dp, 0.00010718454630525007_dp, 0.0001900012319697737_dp,& + 0.00031718955789873134_dp, 0.0005126537329759226_dp, 0.0008128168395638415_dp, 0.0012719920833382853_dp, 0.001970384125983329_dp, 0.0030256963224515113_dp,& + 0.00460969356562721_dp, 0.006971643847773047_dp, 0.010471317877795917_dp, 0.01562522911317097_dp, 0.023171141484273704_dp, 0.034157679556524934_dp,& + 0.05006830174859498_dp, 0.0729921440414609_dp, 0.1058585802344639_dp, 0.1527581466742932_dp, 0.2193802673426605_dp, 0.31360877991591823_dp,& + 0.4463309353744743_dp, 0.6325368438825444_dp, 0.8928196332263253_dp, 1.2554443726415525_dp, 1.759267106284206_dp, 2.458035348630705_dp,& + 3.427215114290294_dp, 4.77616847618911_dp, 6.673804689443379_dp, 9.416907604833742_dp, 13.70063546514659_dp, 9.976454765718753e-06_dp,& + 2.4397956666150202e-05_dp, 4.2091633541468636e-05_dp, 6.622948123983615e-05_dp, 0.00010186030376456873_dp, 0.00015644233845744574_dp, 0.0002404690130604266_dp,& + 0.0003687782406776715_dp, 0.0005627493820533361_dp, 0.0008533803933831028_dp, 0.0012854870718438482_dp, 0.0019235107198793406_dp, 0.002859592750775737_dp,& + 0.004224781787747757_dp, 0.0062045295634641385_dp, 0.009060029072853486_dp, 0.0131574822853581_dp, 0.019008095244250185_dp, 0.02732254096178089_dp,& + 0.03908488812876366_dp, 0.055652686745107795_dp, 0.07889222315477536_dp, 0.11136127365662019_dp, 0.15655676737113142_dp, 0.21925337945032786_dp,& + 0.30597553969409247_dp, 0.42568066454670456_dp, 0.5908146138910935_dp, 0.8191119697759165_dp, 1.137096600179962_dp, 1.5880319126786595_dp,& + 2.2536634913094686_dp, 3.331728541732483_dp, 5.597118014202835_dp] + aw%aw_erange_matrix(:, 6) = [1.7147362511403065e-06_dp, 9.319802731855972e-06_dp, 2.4302616807482706e-05_dp, 4.948261860530359e-05_dp, 9.026404229610094e-05_dp,& + 0.0001560250715046401_dp, 0.00026193159643869907_dp, 0.0004316317370034808_dp, 0.0007014310228413562_dp, 0.0011265811323026616_dp, 0.001790538099368303_dp,& + 0.002818442710487939_dp, 0.004396613985562227_dp, 0.006800572618267542_dp, 0.01043510374307695_dp, 0.015891226467704685_dp, 0.02402679235817231_dp,& + 0.03607995947798214_dp, 0.05382821091103021_dp, 0.07981021388476216_dp, 0.11763406509273454_dp, 0.17240391938168603_dp, 0.25130849721857534_dp,& + 0.36443086121519086_dp, 0.525861591666699_dp, 0.7552321345423689_dp, 1.0798433566303969_dp, 1.5376756421659512_dp, 2.1818096583688225_dp,& + 3.087384050821325_dp, 4.363863206811109_dp, 6.180624421988004_dp, 8.83477361053772_dp, 13.019312520088521_dp, 4.43185996007463e-06_dp,& + 1.0980758773489005e-05_dp, 1.943725634861249e-05_dp, 3.1800270744211854e-05_dp, 5.129667367655266e-05_dp, 8.27095880626353e-05_dp, 0.0001329766243411858_dp,& + 0.00021237174266944332_dp, 0.0003362840713927107_dp, 0.0005277050042553842_dp, 0.0008207467241987074_dp, 0.001265656823748127_dp, 0.001935949524221289_dp,& + 0.002938498181312597_dp, 0.004427745609890722_dp, 0.00662561356009038_dp, 0.009849268137973679_dp, 0.01454967083492188_dp, 0.021364880820575197_dp,& + 0.031193465982641635_dp, 0.04529525929852885_dp, 0.06542926430703719_dp, 0.09404211859223464_dp, 0.13452588222462222_dp, 0.19157264817324873_dp,& + 0.27166955823017896_dp, 0.3838116245690371_dp, 0.5405893273969905_dp, 0.7600124959108089_dp, 1.0690028998164918_dp, 1.5112619233396074_dp,& + 2.168763561959426_dp, 3.238506003394989_dp, 5.489633460260332_dp] + aw%aw_erange_matrix(:, 7) = [6.35749973501056e-07_dp, 3.492169089246581e-06_dp, 9.302356973224121e-06_dp, 1.9592566972831844e-05_dp, 3.7377729183938204e-05_dp,& + 6.798117415794394e-05_dp, 0.00012023568563760358_dp, 0.0002084236297872551_dp, 0.00035534106272681936_dp, 0.0005969900768905776_dp, 0.0009896587375544644_dp,& + 0.001620507511517086_dp, 0.0026232770839453665_dp, 0.004201426984363522_dp, 0.006661986770200809_dp, 0.010464757550535931_dp, 0.01629338409394917_dp,& + 0.025157418466823473_dp, 0.038538075135755495_dp, 0.05859528378548497_dp, 0.088460352930584_dp, 0.13264771717146925_dp, 0.19763178422753508_dp,& + 0.2926522443111407_dp, 0.4308357751366649_dp, 0.6307586891808089_dp, 0.9186346830441839_dp, 1.3314221217344053_dp, 1.9213813610912545_dp,& + 2.76319200354934_dp, 3.9663504041897766_dp, 5.700732751780247_dp, 8.263919165830904_dp, 12.346999008174697_dp, 1.646994148539095e-06_dp,& + 4.168704436960474e-06_dp, 7.695536879782202e-06_dp, 1.3374173961844378e-05_dp, 2.3064311988245763e-05_dp, 3.958321376425686e-05_dp, 6.725628425988863e-05_dp,& + 0.00011284251346096221_dp, 0.0001868773135187132_dp, 0.0003056293856662244_dp, 0.0004939782736171523_dp, 0.0007896314087630558_dp, 0.0012492643080895956_dp,& + 0.001957402304692391_dp, 0.0030391875844591482_dp, 0.004678623430285177_dp, 0.007144500300310407_dp, 0.010827043576140467_dp, 0.016289458703073287_dp,& + 0.024340088611569204_dp, 0.03613298947254673_dp, 0.05330759009262987_dp, 0.07818208570144934_dp, 0.11402099109647866_dp, 0.16540631928634394_dp,& + 0.23875782212611196_dp, 0.3430802599354601_dp, 0.49109150628018977_dp, 0.7010818269759505_dp, 1.0004112023843146_dp, 1.4333015739126787_dp,& + 2.0820719815510036_dp, 3.1430997613534135_dp, 5.379828456565977_dp] + aw%aw_erange_matrix(:, 8) = [1.117489994479298e-09_dp, 1.0437767934573854e-08_dp, 5.084528505414382e-08_dp, 1.872213850467172e-07_dp, 5.813350591395648e-07_dp,& + 1.6041946888512065e-06_dp, 4.054564459005386e-06_dp, 9.568204612679587e-06_dp, 2.1360561665920905e-05_dp, 4.553900601252074e-05_dp, 9.336828090817695e-05_dp,& + 0.00018510270750313838_dp, 0.0003563527131882449_dp, 0.0006684922084643366_dp, 0.0012254246986170441_dp, 0.002200236453707954_dp, 0.0038770557829877106_dp,& + 0.006716063190006149_dp, 0.011453417554768287_dp, 0.019253386304452922_dp, 0.0319378960087355_dp, 0.052330033425615166_dp, 0.0847641054822857_dp,& + 0.13583764990140365_dp, 0.21551319196591645_dp, 0.3387243798072503_dp, 0.527711765290698_dp, 0.8154303015314811_dp, 1.2505960123470905_dp,& + 1.9054661547111273_dp, 2.8889237961629872_dp, 4.37232400643935_dp, 6.65560984092506_dp, 10.426038695834771_dp, 3.3457340053937633e-09_dp,& + 1.873386519501546e-08_dp, 7.20396391424945e-08_dp, 2.259124367219339e-07_dp, 6.20700398368113e-07_dp, 1.5516519034576341e-06_dp, 3.6098773524770243e-06_dp,& + 7.932321947059267e-06_dp, 1.6633942623129364e-05_dp, 3.353876533808818e-05_dp, 6.539287755778778e-05_dp, 0.00012384295496778607_dp, 0.00022861478182158466_dp,& + 0.0004125495803926801_dp, 0.0007294839100515848_dp, 0.0012664381661580966_dp, 0.002162272032202245_dp, 0.003635959152010226_dp, 0.006029053426126615_dp,& + 0.009868936147464018_dp, 0.015962272528537477_dp, 0.025532104472748035_dp, 0.040417626126145245_dp, 0.06336363493503006_dp, 0.09843823938908386_dp,& + 0.1516353587304579_dp, 0.23175010955983177_dp, 0.35168177852781385_dp, 0.5304884039781542_dp, 0.7970145382697631_dp, 1.197557199061726_dp,& + 1.8163260289376923_dp, 2.848850144582029_dp, 5.042342061181277_dp] + end select + + end subroutine set_aw_array_tau + + !> \brief Unpacks the minimax coefficients for the desired energy range + !! @param[in] k - size of the grid + !! @param[in] e_range - the selected energy range + !! @param[inout] ac_we - vector containing coefficients and weights + !! @param[out] ierr - error code + subroutine get_points_weights_tau(grid_size, e_range, ac_we, ierr, erange_list) + integer, intent(in) :: grid_size + real(kind=dp), intent(in) :: e_range + real(kind=dp), dimension(2*grid_size), intent(inout) :: ac_we + integer, intent(out) :: ierr + real(kind=dp),optional,allocatable,intent(out) :: erange_list(:) + + !> Internal variables + integer :: kloc, bup + type(er_aw_aux) :: aw + real(kind=dp) :: e_ratio + + !> Begin work + ierr = 0 + if (.not. any(tau_npoints_supported == grid_size)) then + ierr = 1 + _REGISTER_EXC("The grid size you chose is not available.") + return + end if + + ! Find location of grid size + !kloc = findloc(tau_npoints_supported, grid_size, 1) + do kloc=1,size(tau_npoints_supported) + if (tau_npoints_supported(kloc) == grid_size) exit + end do + bup = energy_ranges_grids(kloc) + + ! Allocate and set type elements + allocate(aw%energy_range(bup)) + allocate(aw%aw_erange_matrix(2*grid_size, bup+1)) + call set_aw_array_tau(grid_size, aw) + + ! Get coefficients and weights + e_ratio = 1.0_dp + call aw%get_coeff_weight(grid_size, bup, e_range, ac_we, e_ratio) + ac_we(:) = ac_we(:) * e_ratio + + if (present(erange_list)) then + allocate(erange_list(bup)) + erange_list(:) = aw%energy_range + end if + + ! Deallocate + deallocate(aw%energy_range) + deallocate(aw%aw_erange_matrix) + + end subroutine get_points_weights_tau + + +end module minimax_tau diff --git a/GX-PAW/common/src/17_minimax/minimax_tau.o b/GX-PAW/common/src/17_minimax/minimax_tau.o new file mode 100644 index 00000000..e5895d11 Binary files /dev/null and b/GX-PAW/common/src/17_minimax/minimax_tau.o differ diff --git a/GX-PAW/common/src/17_minimax/minimax_utils.F90 b/GX-PAW/common/src/17_minimax/minimax_utils.F90 new file mode 100644 index 00000000..3c72d6bf --- /dev/null +++ b/GX-PAW/common/src/17_minimax/minimax_utils.F90 @@ -0,0 +1,97 @@ +! *************************************************************************************************** +! Copyright (C) 2020-2023 Green-X library +! This file is distributed under the terms of the APACHE2 License. +! +! *************************************************************************************************** +!> \brief This module contains auxiliary procedures and data structures for the main minimax routines +! *************************************************************************************************** +module minimax_utils +#if defined HAVE_CONFIG_H +#include "config.h" +#endif +#include "abi_common.h" +#include "gx_common.h" + use defs_basis, only: dp + use m_errors + !use kinds, only: dp + implicit none + + private + + type, public :: er_aw_aux + ! Sorted array of the energy ranges + real(kind=dp), dimension(:), allocatable :: energy_range + ! Matrices with coefficients and weights per energy region + real(kind=dp), dimension(:, :), allocatable :: aw_erange_matrix + contains + procedure :: get_coeff_weight => coeffs_and_weights + end type er_aw_aux + + !> Transformation types + integer, parameter, public :: cosine_tw = 1 + integer, parameter, public :: cosine_wt = 2 + integer, parameter, public :: sine_tw = 3 + +contains + + !> \brief Find first element in unsorted array that is strictly greater than a given value + !> This algorithm is O(n), difficult to do better with unsorted arrays + !! @param[in] lenght - lenght of sorted array + !! @param[in] einter - sorted array of the energy intervals + !! @param[in] eval - the energy value + function find_erange(length, einter, eval) result(idx) + integer, intent(in) :: length + real(kind=dp), dimension(length), intent(in) :: einter + real(kind=dp), intent(in) :: eval + integer :: idx + + ! Auxiliary variables + integer :: jdx + real(kind=dp) :: tmp_min_max + + ! Begin work + tmp_min_max = huge(0.0_dp) + idx = length + 1 + + do jdx = 1, length + if (eval < einter(jdx) .and. einter(jdx) < tmp_min_max) then + idx = jdx + tmp_min_max = einter(jdx) + end if + end do + + end function find_erange + + !> \brief Selects the energy region and scales weights and coefficients + !! @param[in] grid_size - the grid size + !! @param[in] bup - length of the energy region array + !! @param[in] e_range - the selected energy range + !! @param[inout] e_ratio - an heuristic correction factor + !! @param[inout] ac_we - vector containing coefficients and weights + subroutine coeffs_and_weights(this, grid_size, bup, e_range, ac_we, e_ratio) + class(er_aw_aux), intent(in) :: this + integer, intent(in) :: grid_size + integer, intent(in) :: bup + real(kind=dp), intent(in) :: e_range + real(kind=dp), dimension(:), intent(inout) :: ac_we + real(kind=dp), intent(inout) :: e_ratio + + ! Internal variables + integer :: ien + + ! Select energy region + ien = find_erange(bup, this%energy_range, e_range) + + ! Scale grids for large sizes when erange falls in the first energy range + if (ien == 1 .and. grid_size > 20) then + e_ratio = this%energy_range(1) / e_range + if (e_ratio > 1.5_dp) then + e_ratio = e_ratio / 1.5_dp + endif + end if + + ac_we(:) = this%aw_erange_matrix(:, ien) + + end subroutine coeffs_and_weights + +end module minimax_utils diff --git a/GX-PAW/common/src/17_minimax/minimax_utils.o b/GX-PAW/common/src/17_minimax/minimax_utils.o new file mode 100644 index 00000000..d425c030 Binary files /dev/null and b/GX-PAW/common/src/17_minimax/minimax_utils.o differ diff --git a/GX-PAW/common/src/17_yaml_out/.deps/c_pair_list.Po b/GX-PAW/common/src/17_yaml_out/.deps/c_pair_list.Po new file mode 100644 index 00000000..20a5ca3d --- /dev/null +++ b/GX-PAW/common/src/17_yaml_out/.deps/c_pair_list.Po @@ -0,0 +1,402 @@ +c_pair_list.o: c_pair_list.c \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdlib.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/Availability.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/AvailabilityInternal.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_symbol_aliasing.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_posix_availability.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/wait.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_pid_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_id_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/signal.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/appleapiopts.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/signal.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/signal.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_mcontext.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/_mcontext.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/machine/_structs.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/i386/_structs.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int8_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int16_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int32_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int64_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int8_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int16_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int32_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int64_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_intptr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uintptr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_attr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_sigaltstack.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ucontext.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_sigset_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_size_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uid_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/resource.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include/stdint.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/stdint.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint8_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint16_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint32_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint64_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_intmax_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uintmax_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_timeval.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/endian.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/endian.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_endian.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/_OSByteOrder.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/i386/_OSByteOrder.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/alloca.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ct_rune_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_rune_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_wchar_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_null.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/malloc/_malloc.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_dev_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_mode_t.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/stdio.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include/stdarg.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_stdio.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_va_list.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/stdio.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_off_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ssize_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_stdio.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_common.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/string.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_rsize_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_errno_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/strings.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_strings.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_string.h \ + ../../../../shared/common/src/incs/abi_clib.h ../../../../config.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include/stddef.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_char.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_short.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_caddr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_blkcnt_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_blksize_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_gid_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_in_addr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_in_port_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ino_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ino64_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_key_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_nlink_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_clock_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_time_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_useconds_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_suseconds_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_def.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_setsize.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_set.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_clr.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_zero.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_isset.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_copy.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_cond_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_condattr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_mutex_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_mutexattr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_once_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_rwlock_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_rwlockattr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_key_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fsblkcnt_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fsfilcnt_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/inttypes.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/errno.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/errno.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/malloc.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/math.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/stat.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_timespec.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_s_ifmt.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_filesec_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/unistd.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/unistd.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_posix_vdisable.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_seek_set.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/select.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_select.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uuid_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/gethostuuid.h + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdlib.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/Availability.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/AvailabilityInternal.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_symbol_aliasing.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_posix_availability.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/wait.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_pid_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_id_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/signal.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/appleapiopts.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/signal.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/signal.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_mcontext.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/_mcontext.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/machine/_structs.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/i386/_structs.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int8_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int16_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int32_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int64_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int8_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int16_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int32_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int64_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_intptr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uintptr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_attr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_sigaltstack.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ucontext.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_sigset_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_size_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uid_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/resource.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include/stdint.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/stdint.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint8_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint16_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint32_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint64_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_intmax_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uintmax_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_timeval.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/endian.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/endian.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_endian.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/_OSByteOrder.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/i386/_OSByteOrder.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/alloca.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ct_rune_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_rune_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_wchar_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_null.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/malloc/_malloc.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_dev_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_mode_t.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/stdio.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include/stdarg.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_stdio.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_va_list.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/stdio.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_off_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ssize_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_stdio.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_common.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/string.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_rsize_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_errno_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/strings.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_strings.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_string.h: + +../../../../shared/common/src/incs/abi_clib.h: + +../../../../config.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include/stddef.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_char.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_short.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_caddr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_blkcnt_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_blksize_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_gid_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_in_addr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_in_port_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ino_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ino64_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_key_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_nlink_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_clock_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_time_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_useconds_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_suseconds_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_def.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_setsize.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_set.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_clr.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_zero.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_isset.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_copy.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_cond_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_condattr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_mutex_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_mutexattr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_once_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_rwlock_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_rwlockattr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_key_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fsblkcnt_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fsfilcnt_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/inttypes.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/errno.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/errno.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/malloc.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/math.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/stat.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_timespec.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_s_ifmt.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_filesec_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/unistd.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/unistd.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_posix_vdisable.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_seek_set.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/select.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_select.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uuid_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/gethostuuid.h: diff --git a/GX-PAW/common/src/17_yaml_out/Makefile b/GX-PAW/common/src/17_yaml_out/Makefile new file mode 100644 index 00000000..dc11d3ac --- /dev/null +++ b/GX-PAW/common/src/17_yaml_out/Makefile @@ -0,0 +1,1509 @@ +# Makefile.in generated by automake 1.16.3 from Makefile.am. +# shared/common/src/17_yaml_out/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994-2020 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-corelibs on 2024/03/16 21:07:38 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-corelibs script or its config file instead. +# + + +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/abinit +pkgincludedir = $(includedir)/abinit +pkglibdir = $(libdir)/abinit +pkglibexecdir = $(libexecdir)/abinit +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = x86_64-apple-darwin18.7.0 +host_triplet = x86_64-apple-darwin18.7.0 +target_triplet = x86_64-apple-darwin18.7.0 +subdir = shared/common/src/17_yaml_out +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/m4/arch-gpu.m4 \ + $(top_srcdir)/config/m4/arch-mpi.m4 \ + $(top_srcdir)/config/m4/auto-autotools.m4 \ + $(top_srcdir)/config/m4/auto-corelibs.m4 \ + $(top_srcdir)/config/m4/auto-debug.m4 \ + $(top_srcdir)/config/m4/auto-dirflags.m4 \ + $(top_srcdir)/config/m4/auto-env.m4 \ + $(top_srcdir)/config/m4/auto-hints.m4 \ + $(top_srcdir)/config/m4/auto-optim.m4 \ + $(top_srcdir)/config/m4/auto-options.m4 \ + $(top_srcdir)/config/m4/auto-output.m4 \ + $(top_srcdir)/config/m4/auto-triggers.m4 \ + $(top_srcdir)/config/m4/conf-atompaw.m4 \ + $(top_srcdir)/config/m4/conf-debug.m4 \ + $(top_srcdir)/config/m4/conf-fallbacks.m4 \ + $(top_srcdir)/config/m4/conf-files.m4 \ + $(top_srcdir)/config/m4/conf-init.m4 \ + $(top_srcdir)/config/m4/conf-openmp.m4 \ + $(top_srcdir)/config/m4/conf-optim.m4 \ + $(top_srcdir)/config/m4/lang-c++.m4 \ + $(top_srcdir)/config/m4/lang-c.m4 \ + $(top_srcdir)/config/m4/lang-fortran-import.m4 \ + $(top_srcdir)/config/m4/lang-fortran.m4 \ + $(top_srcdir)/config/m4/lang-python.m4 \ + $(top_srcdir)/config/m4/libxml2.m4 \ + $(top_srcdir)/config/m4/misc-display.m4 \ + $(top_srcdir)/config/m4/sd_abinit_common.m4 \ + $(top_srcdir)/config/m4/sd_arch_gpu.m4 \ + $(top_srcdir)/config/m4/sd_arch_mpi.m4 \ + $(top_srcdir)/config/m4/sd_bigdft.m4 \ + $(top_srcdir)/config/m4/sd_core.m4 \ + $(top_srcdir)/config/m4/sd_esl.m4 \ + $(top_srcdir)/config/m4/sd_fftw3.m4 \ + $(top_srcdir)/config/m4/sd_gpu_kokkos.m4 \ + $(top_srcdir)/config/m4/sd_gpu_yakl.m4 \ + $(top_srcdir)/config/m4/sd_io_hdf5.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf_fortran.m4 \ + $(top_srcdir)/config/m4/sd_levmar.m4 \ + $(top_srcdir)/config/m4/sd_libpaw.m4 \ + $(top_srcdir)/config/m4/sd_libpsml.m4 \ + $(top_srcdir)/config/m4/sd_libxc.m4 \ + $(top_srcdir)/config/m4/sd_math_fft.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_core.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_util.m4 \ + $(top_srcdir)/config/m4/sd_papi.m4 \ + $(top_srcdir)/config/m4/sd_pfft.m4 \ + $(top_srcdir)/config/m4/sd_triqs.m4 \ + $(top_srcdir)/config/m4/sd_wannier90.m4 \ + $(top_srcdir)/config/m4/sd_xmlf90.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +AM_V_AR = $(am__v_AR_$(V)) +am__v_AR_ = $(am__v_AR_$(AM_DEFAULT_VERBOSITY)) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = +lib17_yaml_out_a_AR = $(AR) $(ARFLAGS) +lib17_yaml_out_a_LIBADD = +am__objects_1 = c_pair_list.$(OBJEXT) m_type_pair_list.$(OBJEXT) \ + m_pair_list.$(OBJEXT) m_stream_string.$(OBJEXT) \ + m_yaml.$(OBJEXT) +am_lib17_yaml_out_a_OBJECTS = $(am__objects_1) +lib17_yaml_out_a_OBJECTS = $(am_lib17_yaml_out_a_OBJECTS) +AM_V_P = $(am__v_P_$(V)) +am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY)) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I. -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/config/gnu/depcomp +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/c_pair_list.Po +am__mv = mv -f +PPFCCOMPILE = $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) +AM_V_PPFC = $(am__v_PPFC_$(V)) +am__v_PPFC_ = $(am__v_PPFC_$(AM_DEFAULT_VERBOSITY)) +am__v_PPFC_0 = @echo " PPFC " $@; +am__v_PPFC_1 = +FCLD = $(FC) +FCLINK = $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \ + $@ +AM_V_FCLD = $(am__v_FCLD_$(V)) +am__v_FCLD_ = $(am__v_FCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_FCLD_0 = @echo " FCLD " $@; +am__v_FCLD_1 = +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(lib17_yaml_out_a_SOURCES) +DIST_SOURCES = $(lib17_yaml_out_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in \ + $(top_srcdir)/config/gnu/depcomp +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ABINIT_BINARY_PACKAGE = abinit-10.0.0.83-58be4d_x86_64_darwin18.7.0_gnu9.4 +ABINIT_COMMON_CPPFLAGS = +ABINIT_COMMON_FCFLAGS = +ABINIT_COMMON_LDFLAGS = +ABINIT_COMMON_LIBS = +ABINIT_TARGET = x86_64_darwin18.7.0_gnu9.4 +ABINIT_VERSION = 10.0.0.83-58be4d +ABINIT_VERSION_BASE = 10.0 +ABINIT_VERSION_BUILD = 20240316 +ABINIT_VERSION_MAJOR = 10 +ABINIT_VERSION_MICRO = 0 +ABINIT_VERSION_MINOR = 0 +ABI_CPPFLAGS = -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include +ACLOCAL = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' aclocal-1.16 +AMTAR = $${TAR-tar} +AM_DEFAULT_VERBOSITY = 1 +AR = ar +ARFLAGS = rc +ARFLAGS_CMD = rc +ARFLAGS_DEBUG = +ARFLAGS_EXTRA = +ARFLAGS_HINTS = +ARFLAGS_OPTIM = +ATOMPAW_BIN = +AUTOCONF = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' autoconf +AUTOHEADER = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' autoheader +AUTOMAKE = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' automake-1.16 +AWK = awk +BIGDFT_CPPFLAGS = +BIGDFT_FCFLAGS = +BIGDFT_LDFLAGS = +BIGDFT_LIBS = +BOURNE_SHELL = /bin/sh +CC = /opt/local/bin/mpicc +CCDEPMODE = depmode=gcc3 +CC_LDFLAGS = +CC_LDFLAGS_DEBUG = +CC_LDFLAGS_EXTRA = +CC_LDFLAGS_GPU = +CC_LDFLAGS_HINTS = +CC_LDFLAGS_OPTIM = +CC_LIBS = +CC_LIBS_DEBUG = +CC_LIBS_EXTRA = +CC_LIBS_GPU = +CC_LIBS_HINTS = +CC_LIBS_OPTIM = +CFLAGS = -O2 -g +CFLAGS_DEBUG = +CFLAGS_EXTRA = +CFLAGS_GPU = +CFLAGS_HINTS = +CFLAGS_OPTIM = +CPP = /opt/local/bin/mpicc -E +CPPFLAGS = +CPPFLAGS_DEBUG = +CPPFLAGS_EXTRA = +CPPFLAGS_GPU = +CPPFLAGS_HINTS = +CPPFLAGS_HINTS_EXT = -P -std=c99 +CPPFLAGS_OPTIM = +CXX = /opt/local/bin/mpicxx +CXXDEPMODE = depmode=gcc3 +CXXFLAGS = -O2 -g +CXXFLAGS_DEBUG = +CXXFLAGS_EXTRA = +CXXFLAGS_GPU = +CXXFLAGS_HINTS = +CXXFLAGS_OPTIM = +CXX_LDFLAGS = +CXX_LDFLAGS_DEBUG = +CXX_LDFLAGS_EXTRA = +CXX_LDFLAGS_GPU = +CXX_LDFLAGS_HINTS = +CXX_LDFLAGS_OPTIM = +CXX_LIBS = +CXX_LIBS_DEBUG = +CXX_LIBS_EXTRA = +CXX_LIBS_GPU = +CXX_LIBS_HINTS = +CXX_LIBS_OPTIM = +CYGPATH_W = echo +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +ECHO_C = \c +ECHO_N = +ECHO_T = +EGREP = /usr/bin/grep -E +EXEEXT = +F77 = /opt/local/bin/mpif90 +FC = /opt/local/bin/mpif90 +FCFLAGS = -O2 -g -ffree-line-length-none -I/opt/local/include -I/opt/local/include -I/opt/local/include +FCFLAGS_DEBUG = +FCFLAGS_EXTRA = +FCFLAGS_F90 = +FCFLAGS_FIXEDFORM = -ffixed-form +FCFLAGS_FREEFORM = -ffree-form +FCFLAGS_HINTS = -ffree-line-length-none +FCFLAGS_MODDIR = -J../mods +FCFLAGS_OPENMP = +FCFLAGS_OPENMP_OFFLOAD = +FCFLAGS_OPTIM = +FCLIBS = -L/opt/local/lib -L/opt/local/lib/openmpi-gcc9 -L/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0 -L/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/../../.. -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi -lgfortran -lquadmath -lm +FC_LDFLAGS = +FC_LDFLAGS_DEBUG = +FC_LDFLAGS_EXTRA = +FC_LDFLAGS_HINTS = +FC_LDFLAGS_OPTIM = +FC_LIBS = +FC_LIBS_DEBUG = +FC_LIBS_EXTRA = +FC_LIBS_HINTS = +FC_LIBS_OPTIM = +FC_NOWRAP = /opt/local/bin/mpif90 +FFLAGS = -O2 -g -ffree-line-length-none -I/opt/local/include -I/opt/local/include -I/opt/local/include +FFTW3_CFLAGS = +FFTW3_CPPFLAGS = -I/opt/local/include +FFTW3_FCFLAGS = -I/opt/local/include +FFTW3_LDFLAGS = +FFTW3_LIBS = -L/opt/local/lib -lfftw3 -lfftw3f +FFT_CFLAGS = +FFT_FCFLAGS = +FPP = +FPPFLAGS = +FPPFLAGS_DEBUG = +FPPFLAGS_EXTRA = +FPPFLAGS_HINTS = +FPPFLAGS_OPTIM = +GPU_ARCH = +GPU_CFLAGS = +GPU_CPPFLAGS = +GPU_CXXFLAGS = +GPU_FCFLAGS = +GPU_LDFLAGS = +GPU_LIBS = +GRAPHATOM_BIN = +GREP = /usr/bin/grep +H5CC = +HDF5_CFLAGS = +HDF5_CPPFLAGS = +HDF5_CXXFLAGS = +HDF5_FCFLAGS = +HDF5_LDFLAGS = +HDF5_LIBS = +INSTALL = /opt/local/libexec/gnubin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +KOKKOS_CPPFLAGS = +KOKKOS_CXXFLAGS = +KOKKOS_LDFLAGS = +KOKKOS_LIBS = +LDFLAGS = +LEVMAR_CFLAGS = +LEVMAR_CPPFLAGS = +LEVMAR_LDFLAGS = +LEVMAR_LIBS = +LIBOBJS = +LIBPAW_CPPFLAGS = +LIBPAW_FCFLAGS = +LIBPAW_LDFLAGS = +LIBPAW_LIBS = +LIBPSML_CPPFLAGS = +LIBPSML_FCFLAGS = +LIBPSML_LDFLAGS = +LIBPSML_LIBS = +LIBS = -L/opt/local/lib -lwannier -L/opt/local/lib -lxc -L/opt/local/lib -lnetcdff -L/opt/local/lib -lnetcdf -L/opt/local/lib -L/opt/local/lib -lhdf5_hl -L/opt/local/lib -lhdf5 -lz -ldl -lm -L/opt/local/lib -lfftw3 -lfftw3f +LIBXC_CFLAGS = +LIBXC_CPPFLAGS = +LIBXC_FCFLAGS = +LIBXC_LDFLAGS = +LIBXC_LIBS = +LIBXML2_CPPFLAGS = +LIBXML2_FCFLAGS = +LIBXML2_LIBS = +LINALG_CFLAGS = +LINALG_CPPFLAGS = +LINALG_CXXFLAGS = +LINALG_FCFLAGS = -I/opt/local/include +LINALG_LDFLAGS = +LINALG_LIBS = -L/opt/local/lib -lopenblas +LN_S = ln -s +LTLIBOBJS = +MAKEINFO = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' makeinfo +MKDIR_P = /opt/local/libexec/gnubin/mkdir -p +MODEXT = mod +MPI_CFLAGS = +MPI_CPPFLAGS = +MPI_CXXFLAGS = +MPI_FCFLAGS = +MPI_LDFLAGS = +MPI_LIBS = +MV = /opt/local/libexec/gnubin/mv +NETCDF_CFLAGS = +NETCDF_CPPFLAGS = +NETCDF_CXXFLAGS = +NETCDF_FCFLAGS = +NETCDF_FORTRAN_CFLAGS = +NETCDF_FORTRAN_CPPFLAGS = +NETCDF_FORTRAN_CXXFLAGS = +NETCDF_FORTRAN_FCFLAGS = +NETCDF_FORTRAN_LDFLAGS = +NETCDF_FORTRAN_LIBS = +NETCDF_LDFLAGS = +NETCDF_LIBS = +NVCC = +NVCC_CFLAGS = +NVCC_CPPFLAGS = +NVCC_LDFLAGS = +NVCC_LIBS = +OBJEXT = o +PACKAGE = abinit +PACKAGE_BUGREPORT = https://bugs.launchpad.net/abinit/ +PACKAGE_NAME = ABINIT +PACKAGE_STRING = ABINIT 10.0.0.83-58be4d +PACKAGE_TARNAME = abinit +PACKAGE_URL = +PACKAGE_VERSION = 10.0.0.83-58be4d +PAPI_CFLAGS = +PAPI_CPPFLAGS = +PAPI_LDFLAGS = +PAPI_LIBS = +PATCH = patch +PATH_SEPARATOR = : +PERL = /usr/bin/perl +PFFT_CFLAGS = +PFFT_CPPFLAGS = +PFFT_LDFLAGS = +PFFT_LIBS = +PYFLAGS = +PYTHON = python3.9 +PYTHON_CONFIG = python3.9-config +PYTHON_CPPFLAGS = -I/opt/local/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -I/opt/local/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 +RANLIB = ranlib +REALPATH = realpath +RM = /opt/local/libexec/gnubin/rm +SED = /usr/bin/sed +SET_MAKE = +SHELL = /bin/sh +STRIP = +TAR = tar +TRIQS_CFLAGS = +TRIQS_CPPFLAGS = +TRIQS_CXXFLAGS = +TRIQS_LDFLAGS = +TRIQS_LIBS = +TRUE_CPP = cpp +VERSION = 10.0.0.83-58be4d +WANNIER90_CPPFLAGS = +WANNIER90_FCFLAGS = -I/opt/local/include +WANNIER90_LDFLAGS = +WANNIER90_LIBS = -L/opt/local/lib -lwannier +XML2_CONFIG = +XMLF90_CPPFLAGS = +XMLF90_FCFLAGS = +XMLF90_LDFLAGS = +XMLF90_LIBS = +XML_CPPFLAGS = +XML_LIBS = +XPP = +XPPFLAGS = +XPPFLAGS_DEBUG = +XPPFLAGS_EXTRA = +XPPFLAGS_OPTIM = +YAKL_CPPFLAGS = +YAKL_FCFLAGS = +YAKL_LDFLAGS = +YAKL_LIBS = +abi_ac_distcheck = --with-config-file="/Users/gonze/_Research/ABINIT_git/gonze/mac-1P0-225.ac9" +abi_ac_version = 027100 +abi_am_version = 011603 +abi_avx_safe_mode_enable = no +abi_bse_unpacked_enable = no +abi_cc_path = +abi_cc_vendor = gnu +abi_cc_version = 9.4 +abi_cclock_enable = no +abi_cpp_path = +abi_cpu_64bits = yes +abi_cpu_bits = 64 +abi_cpu_model = unknown +abi_cpu_platform = apple +abi_cpu_spec = unknown_unknown +abi_cpu_vendor = unknown +abi_crpa_optim_enable = no +abi_cxx_path = +abi_cxx_vendor = gnu +abi_cxx_version = 9.4 +abi_debug_flavor = basic +abi_exports_enable = no +abi_fbk_abinit_common_ok = no +abi_fbk_bigdft_ok = disabled +abi_fbk_config = +abi_fbk_enable = no +abi_fbk_fft_ok = no +abi_fbk_fftw3_ok = no +abi_fbk_gpu_ok = no +abi_fbk_hdf5_ok = disabled +abi_fbk_init = def +abi_fbk_kokkos_ok = no +abi_fbk_levmar_ok = no +abi_fbk_libpaw_ok = no +abi_fbk_libpsml_ok = disabled +abi_fbk_libxc_ok = disabled +abi_fbk_libxml2_ok = no +abi_fbk_linalg_ok = disabled +abi_fbk_list = +abi_fbk_mpi_ok = no +abi_fbk_netcdf_fortran_ok = disabled +abi_fbk_netcdf_ok = disabled +abi_fbk_papi_ok = no +abi_fbk_pfft_ok = no +abi_fbk_prefix = +abi_fbk_required = +abi_fbk_triqs_ok = no +abi_fbk_wannier90_ok = disabled +abi_fbk_xmlf90_ok = disabled +abi_fbk_yakl_ok = no +abi_fc_path = +abi_fc_vendor = gnu +abi_fc_version = 9.4 +abi_fc_wrap = no +abi_fc_wrapper_enable = no +abi_fpp_path = +abi_gpu_arch = +abi_gpu_fcflags = +abi_gpu_flavor = none +abi_gpu_hip_libdir = +abi_gpu_incs = +abi_gpu_ldflags = +abi_gpu_libs = +abi_gpu_nvtx_v3 = +abi_gpu_roctx = +abi_gw_dpc_enable = yes +abi_hints_enable = yes +abi_libtetra_enable = yes +abi_libxml2_cppflags = +abi_libxml2_enable = no +abi_libxml2_fcflags = +abi_libxml2_init = def +abi_libxml2_ldflags = +abi_libxml2_libs = +abi_libxml2_ok = unknown +abi_libxml2_prefix = +abi_lotf_enable = no +abi_lt_version = 020406 +abi_m4_version = 010419 +abi_memory_profiling_enable = no +abi_mpi_cflags = +abi_mpi_cppflags = +abi_mpi_cxxflags = +abi_mpi_enable = yes +abi_mpi_fcflags = +abi_mpi_flavor = auto +abi_mpi_gpu_aware_enable = no +abi_mpi_incs = +abi_mpi_inplace_enable = yes +abi_mpi_interfaces_bugfix_enable = no +abi_mpi_io_default_enable = no +abi_mpi_io_enable = yes +abi_mpi_ldflags = +abi_mpi_level = 2 +abi_mpi_libs = +abi_netcdf_default_enable = no +abi_openmp_enable = no +abi_openmp_offload_enable = no +abi_optim_flavor = standard +abi_python_invocation_enable = no +abi_source_debug_enable = no +abi_stdin_enable = yes +abi_sys_spec = darwin-x86_64 +abi_timer_enable = yes +abi_triqs_v1_4_enable = no +abi_triqs_v2_0_enable = no +abi_zdot_bugfix_enable = no +abinit_bindir = /usr/local/bin +abinit_builddir = /Users/gonze/_Research/ABINIT_git/gonze +abinit_chkdir = /usr/local/share/abinit/tests +abinit_datdir = /usr/local/share/abinit +abinit_docdir = /usr/local/doc/abinit +abinit_incdir = /usr/local/include +abinit_libdir = /usr/local/lib +abinit_mandir = /usr/local/share/man +abinit_prefix = /usr/local +abinit_srcdir = /Users/gonze/_Research/ABINIT_git/gonze +abs_builddir = /Users/gonze/_Research/ABINIT_git/gonze/shared/common/src/17_yaml_out +abs_srcdir = /Users/gonze/_Research/ABINIT_git/gonze/shared/common/src/17_yaml_out +abs_top_builddir = /Users/gonze/_Research/ABINIT_git/gonze +abs_top_srcdir = /Users/gonze/_Research/ABINIT_git/gonze +ac_ct_CC = +ac_ct_CXX = +ac_ct_FC = +am__include = include +am__leading_dot = . +am__quote = +am__tar = tar --format=ustar -chf - "$$tardir" +am__untar = tar -xf - +bindir = ${exec_prefix}/bin +build = x86_64-apple-darwin18.7.0 +build_alias = +build_cpu = x86_64 +build_os = darwin18.7.0 +build_vendor = apple +builddir = . +cc_info_string = gcc-mp-9 (MacPorts gcc9 9.4.0_0) 9.4.0 +cxx_info_string = g++-mp-9 (MacPorts gcc9 9.4.0_0) 9.4.0 +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +enable_avx_safe_mode = +enable_bse_unpacked = +enable_cclock = +enable_crpa_optim = +enable_exports = +enable_fc_wrapper = +enable_gw_dpc = yes +enable_hints = +enable_libtetra = +enable_lotf = +enable_memory_profiling = +enable_mpi_gpu_aware = +enable_mpi_inplace = +enable_mpi_interfaces_bugfix = +enable_mpi_io = yes +enable_mpi_io_default = +enable_netcdf_default = +enable_openmp = +enable_openmp_offload = +enable_python_invocation = +enable_shared = +enable_source_debug = +enable_static = +enable_stdin = +enable_timer = +enable_triqs_v1_4 = +enable_triqs_v2_0 = +enable_zdot_bugfix = +exec_prefix = ${prefix} +fc_info_string = GNU Fortran (MacPorts gcc9 9.4.0_0) 9.4.0 +fc_mod_fcflags = +fc_timing = standard +fcflags_opt_02_clib = +fcflags_opt_10_defs = +fcflags_opt_11_memory_mpi = +fcflags_opt_12_hide_mpi = +fcflags_opt_14_hidewrite = +fcflags_opt_16_hideleave = +fcflags_opt_16_kokkos_toolbox = +fcflags_opt_17_gpu_toolbox = +fcflags_opt_17_libtetra_ext = +fcflags_opt_17_minimax = +fcflags_opt_17_yaml_out = +fcflags_opt_18_timing = +fcflags_opt_21_hashfuncs = +fcflags_opt_27_toolbox_oop = +fcflags_opt_28_numeric_noabirule = +fcflags_opt_29_kpoints = +fcflags_opt_32_util = +fcflags_opt_33_xc_lowlevel = +fcflags_opt_39_libpaw = +fcflags_opt_41_geometry = +fcflags_opt_42_nlstrain = +fcflags_opt_42_parser = +fcflags_opt_43_ptgroups = -O0 +fcflags_opt_43_wvl_wrappers = +fcflags_opt_44_abitools = +fcflags_opt_44_abitypes_defs = +fcflags_opt_44_manage_kokkos = +fcflags_opt_45_geomoptim = +fcflags_opt_45_xgTools = +fcflags_opt_46_ghc_omp = +fcflags_opt_46_manage_cuda = +fcflags_opt_48_diago = +fcflags_opt_49_gw_toolbox_oop = +fcflags_opt_51_manage_mpi = +fcflags_opt_52_fft_mpi_noabirule = +fcflags_opt_53_ffts = +fcflags_opt_54_spacepar = +fcflags_opt_55_abiutil = +fcflags_opt_56_io_mpi = +fcflags_opt_56_mixing = +fcflags_opt_56_recipspace = +fcflags_opt_56_xc = +fcflags_opt_57_iopsp_parser = +fcflags_opt_57_iovars = +fcflags_opt_61_occeig = +fcflags_opt_62_cg_noabirule = +fcflags_opt_62_ctqmc = +fcflags_opt_62_iowfdenpot = +fcflags_opt_62_poisson = +fcflags_opt_62_wvl_wfs = +fcflags_opt_64_psp = +fcflags_opt_65_lotf_base = +fcflags_opt_65_paw = +fcflags_opt_66_nonlocal = +fcflags_opt_66_vdwxc = +fcflags_opt_66_wfs = +fcflags_opt_67_common = +fcflags_opt_67_python_invocation_ext = +fcflags_opt_67_triqs_ext = +fcflags_opt_68_dmft = +fcflags_opt_68_lotf = +fcflags_opt_68_recursion = +fcflags_opt_68_rsprc = +fcflags_opt_69_wfdesc = +fcflags_opt_70_gw = +fcflags_opt_71_bse = +fcflags_opt_71_wannier = +fcflags_opt_72_response = +fcflags_opt_77_ddb = +fcflags_opt_77_suscep = +fcflags_opt_78_effpot = +fcflags_opt_78_eph = +fcflags_opt_79_seqpar_mpi = +fcflags_opt_80_rttddft = +fcflags_opt_80_tdep = +fcflags_opt_94_scfcv = +fcflags_opt_95_drive = +fcflags_opt_98_main = +fcflags_opt_bigdft = +fcflags_opt_default = +fcflags_opt_hdf5 = +fcflags_opt_levmar = +fcflags_opt_libpsml = +fcflags_opt_libxc = +fcflags_opt_libxml2 = +fcflags_opt_linalg = +fcflags_opt_netcdf = +fcflags_opt_netcdf_fortran = +fcflags_opt_papi = +fcflags_opt_triqs = +fcflags_opt_wannier90 = +fcflags_opt_xmlf90 = +host = x86_64-apple-darwin18.7.0 +host_alias = +host_cpu = x86_64 +host_os = darwin18.7.0 +host_vendor = apple +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = ${SHELL} /Users/gonze/_Research/ABINIT_git/gonze/config/gnu/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = ${datarootdir}/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = $(MKDIR_P) +oldincludedir = /usr/include +pdfdir = ${docdir} +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +runstatedir = ${localstatedir}/run +sbindir = ${exec_prefix}/sbin +sd_abinit_common_cppflags = +sd_abinit_common_enable = no +sd_abinit_common_enable_def = no +sd_abinit_common_fcflags = +sd_abinit_common_init = def +sd_abinit_common_ldflags = +sd_abinit_common_libs = +sd_abinit_common_ok = unknown +sd_abinit_common_options = optional skip +sd_abinit_common_policy = skip +sd_abinit_common_status = optional +sd_bigdft_cppflags = +sd_bigdft_enable = no +sd_bigdft_enable_def = no +sd_bigdft_fcflags = +sd_bigdft_init = def +sd_bigdft_ldflags = +sd_bigdft_libs = +sd_bigdft_ok = unknown +sd_bigdft_options = optional warn +sd_bigdft_policy = warn +sd_bigdft_status = optional +sd_fft_cflags = +sd_fft_choices = +sd_fft_cppflags = -I/opt/local/include +sd_fft_cxxflags = +sd_fft_enable = yes +sd_fft_fcflags = -I/opt/local/include +sd_fft_flavor = fftw3 +sd_fft_init = kwd +sd_fft_ldflags = +sd_fft_libs = -L/opt/local/lib -lfftw3 -lfftw3f +sd_fft_ok = yes +sd_fftw3_cflags = +sd_fftw3_cppflags = -I/opt/local/include +sd_fftw3_enable = yes +sd_fftw3_enable_def = no +sd_fftw3_fcflags = -I/opt/local/include +sd_fftw3_init = env +sd_fftw3_ldflags = +sd_fftw3_libs = -L/opt/local/lib -lfftw3 -lfftw3f +sd_fftw3_ok = yes +sd_fftw3_options = optional skip +sd_fftw3_policy = skip +sd_fftw3_status = optional +sd_gpu_cflags = +sd_gpu_cppflags = +sd_gpu_cxxflags = +sd_gpu_enable = no +sd_gpu_enable_def = no +sd_gpu_fcflags = +sd_gpu_init = def +sd_gpu_ldflags = +sd_gpu_libs = +sd_gpu_ok = no +sd_gpu_options = optional warn +sd_gpu_policy = warn +sd_gpu_prefix = +sd_gpu_status = optional +sd_hdf5_cflags = +sd_hdf5_cppflags = -I/opt/local/include -I/opt/local/include +sd_hdf5_cxxflags = +sd_hdf5_enable = yes +sd_hdf5_enable_def = yes +sd_hdf5_enable_fc = no +sd_hdf5_fcflags = +sd_hdf5_h5cc = /opt/local/bin/h5cc +sd_hdf5_h5fc = +sd_hdf5_init = dir +sd_hdf5_ldflags = +sd_hdf5_libs = -L/opt/local/lib -L/opt/local/lib -lhdf5_hl -L/opt/local/lib -lhdf5 -lz -ldl -lm +sd_hdf5_ok = yes +sd_hdf5_options = required no-fortran warn +sd_hdf5_policy = warn +sd_hdf5_status = required +sd_kokkos_cppflags = +sd_kokkos_cxxflags = +sd_kokkos_enable = no +sd_kokkos_enable_def = no +sd_kokkos_init = def +sd_kokkos_ldflags = +sd_kokkos_libs = +sd_kokkos_ok = unknown +sd_kokkos_options = optional fail +sd_kokkos_policy = fail +sd_kokkos_status = optional +sd_levmar_cflags = +sd_levmar_cppflags = +sd_levmar_enable = no +sd_levmar_enable_def = no +sd_levmar_init = def +sd_levmar_ldflags = +sd_levmar_libs = +sd_levmar_ok = unknown +sd_levmar_options = optional fail +sd_levmar_policy = fail +sd_levmar_status = optional +sd_libpaw_cppflags = +sd_libpaw_enable = no +sd_libpaw_enable_def = no +sd_libpaw_fcflags = +sd_libpaw_init = def +sd_libpaw_ldflags = +sd_libpaw_libs = +sd_libpaw_ok = unknown +sd_libpaw_options = optional skip +sd_libpaw_policy = skip +sd_libpaw_status = optional +sd_libpsml_cppflags = +sd_libpsml_enable = no +sd_libpsml_enable_def = no +sd_libpsml_fcflags = +sd_libpsml_init = def +sd_libpsml_ldflags = +sd_libpsml_libs = +sd_libpsml_ok = unknown +sd_libpsml_options = optional warn +sd_libpsml_policy = warn +sd_libpsml_status = optional +sd_libxc_cflags = +sd_libxc_cppflags = -I/opt/local/include +sd_libxc_enable = yes +sd_libxc_enable_def = yes +sd_libxc_enable_fc = no +sd_libxc_fcflags = +sd_libxc_init = dir +sd_libxc_ldflags = +sd_libxc_libs = -L/opt/local/lib -lxc +sd_libxc_ok = yes +sd_libxc_options = required no-fortran warn +sd_libxc_policy = warn +sd_libxc_status = required +sd_linalg_cflags = +sd_linalg_choices = +sd_linalg_cppflags = +sd_linalg_cxxflags = +sd_linalg_enable = yes +sd_linalg_fcflags = -I/opt/local/include +sd_linalg_flavor = openblas +sd_linalg_has_elpa = no +sd_linalg_has_scalapack = no +sd_linalg_init = env +sd_linalg_ldflags = +sd_linalg_libs = -L/opt/local/lib -lopenblas +sd_linalg_ok = yes +sd_mpi_cc = /opt/local/bin/mpicc +sd_mpi_cflags = +sd_mpi_cppflags = -I/opt/local/include +sd_mpi_cxx = /opt/local/bin/mpicxx +sd_mpi_enable = yes +sd_mpi_enable_cxx = yes +sd_mpi_enable_def = auto +sd_mpi_enable_fc = yes +sd_mpi_fc = /opt/local/bin/mpif90 +sd_mpi_fcflags = -I/opt/local/include +sd_mpi_init = dir +sd_mpi_ldflags = +sd_mpi_libs = +sd_mpi_ok = yes +sd_mpi_options = auto optional fail +sd_mpi_policy = fail +sd_mpi_status = optional +sd_netcdf_cflags = +sd_netcdf_cppflags = -I/opt/local/include +sd_netcdf_enable = yes +sd_netcdf_enable_def = yes +sd_netcdf_fcflags = -I/opt/local/include +sd_netcdf_fortran_cflags = +sd_netcdf_fortran_cppflags = -I/opt/local/include +sd_netcdf_fortran_enable = yes +sd_netcdf_fortran_enable_def = yes +sd_netcdf_fortran_fcflags = -I/opt/local/include +sd_netcdf_fortran_init = dir +sd_netcdf_fortran_ldflags = +sd_netcdf_fortran_libs = -L/opt/local/lib -lnetcdff +sd_netcdf_fortran_ok = yes +sd_netcdf_fortran_options = required warn +sd_netcdf_fortran_policy = warn +sd_netcdf_fortran_status = required +sd_netcdf_init = dir +sd_netcdf_ldflags = +sd_netcdf_libs = -L/opt/local/lib -lnetcdf +sd_netcdf_ok = yes +sd_netcdf_options = required warn +sd_netcdf_policy = warn +sd_netcdf_status = required +sd_papi_cflags = +sd_papi_cppflags = +sd_papi_enable = no +sd_papi_enable_def = no +sd_papi_init = def +sd_papi_ldflags = +sd_papi_libs = +sd_papi_ok = unknown +sd_papi_options = optional fail +sd_papi_policy = fail +sd_papi_sd_papi_fcflags = +sd_papi_status = optional +sd_pfft_cflags = +sd_pfft_cppflags = +sd_pfft_enable = no +sd_pfft_enable_def = no +sd_pfft_init = def +sd_pfft_ldflags = +sd_pfft_libs = +sd_pfft_ok = unknown +sd_pfft_options = optional skip +sd_pfft_policy = skip +sd_pfft_status = optional +sd_sys_fcflags = +sd_triqs_cflags = +sd_triqs_cppflags = +sd_triqs_cxxflags = +sd_triqs_enable = no +sd_triqs_enable_def = no +sd_triqs_fcflags = +sd_triqs_init = def +sd_triqs_ldflags = +sd_triqs_libs = +sd_triqs_ok = unknown +sd_triqs_options = optional fail +sd_triqs_policy = fail +sd_triqs_status = optional +sd_wannier90_cppflags = +sd_wannier90_enable = yes +sd_wannier90_enable_def = no +sd_wannier90_fcflags = -I/opt/local/include +sd_wannier90_init = env +sd_wannier90_ldflags = +sd_wannier90_libs = -L/opt/local/lib -lwannier +sd_wannier90_ok = yes +sd_wannier90_options = optional warn +sd_wannier90_policy = warn +sd_wannier90_status = optional +sd_xmlf90_cppflags = +sd_xmlf90_enable = no +sd_xmlf90_enable_def = no +sd_xmlf90_fcflags = +sd_xmlf90_init = def +sd_xmlf90_ldflags = +sd_xmlf90_libs = +sd_xmlf90_ok = unknown +sd_xmlf90_options = optional warn +sd_xmlf90_policy = warn +sd_xmlf90_status = optional +sd_yakl_cppflags = +sd_yakl_enable = no +sd_yakl_enable_def = no +sd_yakl_fcflags = +sd_yakl_init = def +sd_yakl_ldflags = +sd_yakl_libs = +sd_yakl_ok = unknown +sd_yakl_options = optional fail +sd_yakl_policy = fail +sd_yakl_status = optional +sharedstatedir = ${prefix}/com +src_02_clib_fcflags = -I$(top_builddir)/shared/common/src/02_clib -I$(top_srcdir)/shared/common/src/02_clib +src_10_defs_fcflags = -I$(top_builddir)/shared/common/src/10_defs -I$(top_srcdir)/shared/common/src/10_defs +src_11_memory_mpi_fcflags = -I$(top_builddir)/shared/common/src/11_memory_mpi -I$(top_srcdir)/shared/common/src/11_memory_mpi +src_12_hide_mpi_fcflags = -I$(top_builddir)/shared/common/src/12_hide_mpi -I$(top_srcdir)/shared/common/src/12_hide_mpi +src_14_hidewrite_fcflags = -I$(top_builddir)/shared/common/src/14_hidewrite -I$(top_srcdir)/shared/common/src/14_hidewrite +src_16_hideleave_fcflags = -I$(top_builddir)/shared/common/src/16_hideleave -I$(top_srcdir)/shared/common/src/16_hideleave +src_16_kokkos_toolbox_fcflags = -I$(top_builddir)/shared/common/src/16_kokkos_toolbox -I$(top_srcdir)/shared/common/src/16_kokkos_toolbox +src_17_gpu_toolbox_fcflags = -I$(top_builddir)/shared/common/src/17_gpu_toolbox -I$(top_srcdir)/shared/common/src/17_gpu_toolbox +src_17_libtetra_ext_fcflags = -I$(top_builddir)/shared/common/src/17_libtetra_ext -I$(top_srcdir)/shared/common/src/17_libtetra_ext +src_17_minimax_fcflags = -I$(top_builddir)/shared/common/src/17_minimax -I$(top_srcdir)/shared/common/src/17_minimax +src_17_yaml_out_fcflags = -I$(top_builddir)/shared/common/src/17_yaml_out -I$(top_srcdir)/shared/common/src/17_yaml_out +src_18_timing_fcflags = -I$(top_builddir)/shared/common/src/18_timing -I$(top_srcdir)/shared/common/src/18_timing +src_21_hashfuncs_fcflags = -I$(top_builddir)/shared/common/src/21_hashfuncs -I$(top_srcdir)/shared/common/src/21_hashfuncs +src_27_toolbox_oop_fcflags = -I$(top_builddir)/shared/common/src/27_toolbox_oop -I$(top_srcdir)/shared/common/src/27_toolbox_oop +src_28_numeric_noabirule_fcflags = -I$(top_builddir)/shared/common/src/28_numeric_noabirule -I$(top_srcdir)/shared/common/src/28_numeric_noabirule +src_29_kpoints_fcflags = -I$(top_builddir)/shared/common/src/29_kpoints -I$(top_srcdir)/shared/common/src/29_kpoints +src_32_util_fcflags = -I$(top_builddir)/shared/common/src/32_util -I$(top_srcdir)/shared/common/src/32_util +src_33_xc_lowlevel_fcflags = -I$(top_builddir)/shared/common/src/33_xc_lowlevel -I$(top_srcdir)/shared/common/src/33_xc_lowlevel +src_39_libpaw_fcflags = -I$(top_builddir)/shared/libpaw/src -I$(top_srcdir)/shared/libpaw/src +src_41_geometry_fcflags = -I$(top_builddir)/src/41_geometry -I$(top_srcdir)/src/41_geometry +src_42_nlstrain_fcflags = -I$(top_builddir)/src/42_nlstrain -I$(top_srcdir)/src/42_nlstrain +src_42_parser_fcflags = -I$(top_builddir)/src/42_parser -I$(top_srcdir)/src/42_parser +src_43_ptgroups_fcflags = -I$(top_builddir)/src/43_ptgroups -I$(top_srcdir)/src/43_ptgroups +src_43_wvl_wrappers_fcflags = -I$(top_builddir)/src/43_wvl_wrappers -I$(top_srcdir)/src/43_wvl_wrappers +src_44_abitools_fcflags = -I$(top_builddir)/src/44_abitools -I$(top_srcdir)/src/44_abitools +src_44_abitypes_defs_fcflags = -I$(top_builddir)/src/44_abitypes_defs -I$(top_srcdir)/src/44_abitypes_defs +src_44_manage_kokkos_fcflags = -I$(top_builddir)/src/44_manage_kokkos -I$(top_srcdir)/src/44_manage_kokkos +src_45_geomoptim_fcflags = -I$(top_builddir)/src/45_geomoptim -I$(top_srcdir)/src/45_geomoptim +src_45_xgTools_fcflags = -I$(top_builddir)/src/45_xgTools -I$(top_srcdir)/src/45_xgTools +src_46_ghc_omp_fcflags = -I$(top_builddir)/src/46_ghc_omp -I$(top_srcdir)/src/46_ghc_omp +src_46_manage_cuda_fcflags = -I$(top_builddir)/src/46_manage_cuda -I$(top_srcdir)/src/46_manage_cuda +src_48_diago_fcflags = -I$(top_builddir)/src/48_diago -I$(top_srcdir)/src/48_diago +src_49_gw_toolbox_oop_fcflags = -I$(top_builddir)/src/49_gw_toolbox_oop -I$(top_srcdir)/src/49_gw_toolbox_oop +src_51_manage_mpi_fcflags = -I$(top_builddir)/src/51_manage_mpi -I$(top_srcdir)/src/51_manage_mpi +src_52_fft_mpi_noabirule_fcflags = -I$(top_builddir)/src/52_fft_mpi_noabirule -I$(top_srcdir)/src/52_fft_mpi_noabirule +src_53_ffts_fcflags = -I$(top_builddir)/src/53_ffts -I$(top_srcdir)/src/53_ffts +src_54_spacepar_fcflags = -I$(top_builddir)/src/54_spacepar -I$(top_srcdir)/src/54_spacepar +src_55_abiutil_fcflags = -I$(top_builddir)/src/55_abiutil -I$(top_srcdir)/src/55_abiutil +src_56_io_mpi_fcflags = -I$(top_builddir)/src/56_io_mpi -I$(top_srcdir)/src/56_io_mpi +src_56_mixing_fcflags = -I$(top_builddir)/src/56_mixing -I$(top_srcdir)/src/56_mixing +src_56_recipspace_fcflags = -I$(top_builddir)/src/56_recipspace -I$(top_srcdir)/src/56_recipspace +src_56_xc_fcflags = -I$(top_builddir)/src/56_xc -I$(top_srcdir)/src/56_xc +src_57_iopsp_parser_fcflags = -I$(top_builddir)/src/57_iopsp_parser -I$(top_srcdir)/src/57_iopsp_parser +src_57_iovars_fcflags = -I$(top_builddir)/src/57_iovars -I$(top_srcdir)/src/57_iovars +src_61_occeig_fcflags = -I$(top_builddir)/src/61_occeig -I$(top_srcdir)/src/61_occeig +src_62_cg_noabirule_fcflags = -I$(top_builddir)/src/62_cg_noabirule -I$(top_srcdir)/src/62_cg_noabirule +src_62_ctqmc_fcflags = -I$(top_builddir)/src/62_ctqmc -I$(top_srcdir)/src/62_ctqmc +src_62_iowfdenpot_fcflags = -I$(top_builddir)/src/62_iowfdenpot -I$(top_srcdir)/src/62_iowfdenpot +src_62_poisson_fcflags = -I$(top_builddir)/src/62_poisson -I$(top_srcdir)/src/62_poisson +src_62_wvl_wfs_fcflags = -I$(top_builddir)/src/62_wvl_wfs -I$(top_srcdir)/src/62_wvl_wfs +src_64_psp_fcflags = -I$(top_builddir)/src/64_psp -I$(top_srcdir)/src/64_psp +src_65_lotf_base_fcflags = -I$(top_builddir)/src/65_lotf_base -I$(top_srcdir)/src/65_lotf_base +src_65_paw_fcflags = -I$(top_builddir)/src/65_paw -I$(top_srcdir)/src/65_paw +src_66_nonlocal_fcflags = -I$(top_builddir)/src/66_nonlocal -I$(top_srcdir)/src/66_nonlocal +src_66_vdwxc_fcflags = -I$(top_builddir)/src/66_vdwxc -I$(top_srcdir)/src/66_vdwxc +src_66_wfs_fcflags = -I$(top_builddir)/src/66_wfs -I$(top_srcdir)/src/66_wfs +src_67_common_fcflags = -I$(top_builddir)/src/67_common -I$(top_srcdir)/src/67_common +src_67_python_invocation_ext_fcflags = -I$(top_builddir)/src/67_python_invocation_ext -I$(top_srcdir)/src/67_python_invocation_ext +src_67_triqs_ext_fcflags = -I$(top_builddir)/src/67_triqs_ext -I$(top_srcdir)/src/67_triqs_ext +src_68_dmft_fcflags = -I$(top_builddir)/src/68_dmft -I$(top_srcdir)/src/68_dmft +src_68_lotf_fcflags = -I$(top_builddir)/src/68_lotf -I$(top_srcdir)/src/68_lotf +src_68_recursion_fcflags = -I$(top_builddir)/src/68_recursion -I$(top_srcdir)/src/68_recursion +src_68_rsprc_fcflags = -I$(top_builddir)/src/68_rsprc -I$(top_srcdir)/src/68_rsprc +src_69_wfdesc_fcflags = -I$(top_builddir)/src/69_wfdesc -I$(top_srcdir)/src/69_wfdesc +src_70_gw_fcflags = -I$(top_builddir)/src/70_gw -I$(top_srcdir)/src/70_gw +src_71_bse_fcflags = -I$(top_builddir)/src/71_bse -I$(top_srcdir)/src/71_bse +src_71_wannier_fcflags = -I$(top_builddir)/src/71_wannier -I$(top_srcdir)/src/71_wannier +src_72_response_fcflags = -I$(top_builddir)/src/72_response -I$(top_srcdir)/src/72_response +src_77_ddb_fcflags = -I$(top_builddir)/src/77_ddb -I$(top_srcdir)/src/77_ddb +src_77_suscep_fcflags = -I$(top_builddir)/src/77_suscep -I$(top_srcdir)/src/77_suscep +src_78_effpot_fcflags = -I$(top_builddir)/src/78_effpot -I$(top_srcdir)/src/78_effpot +src_78_eph_fcflags = -I$(top_builddir)/src/78_eph -I$(top_srcdir)/src/78_eph +src_79_seqpar_mpi_fcflags = -I$(top_builddir)/src/79_seqpar_mpi -I$(top_srcdir)/src/79_seqpar_mpi +src_80_rttddft_fcflags = -I$(top_builddir)/src/80_rttddft -I$(top_srcdir)/src/80_rttddft +src_80_tdep_fcflags = -I$(top_builddir)/src/80_tdep -I$(top_srcdir)/src/80_tdep +src_94_scfcv_fcflags = -I$(top_builddir)/src/94_scfcv -I$(top_srcdir)/src/94_scfcv +src_95_drive_fcflags = -I$(top_builddir)/src/95_drive -I$(top_srcdir)/src/95_drive +src_common_fcflags = -I$(top_builddir)/shared/common/src/incs -I$(top_srcdir)/shared/common/src/incs -I$(top_builddir)/shared/common/src/mods -I$(top_srcdir)/shared/common/src/mods +src_core_fcflags = -I$(top_builddir)/src/incs -I$(top_srcdir)/src/incs -I$(top_builddir)/src/mods -I$(top_srcdir)/src/mods +src_libpaw_fcflags = -I$(top_builddir)/shared/libpaw/incs -I$(top_srcdir)/shared/libpaw/incs -I$(top_builddir)/shared/libpaw/mods -I$(top_srcdir)/shared/libpaw/mods +srcdir = . +sysconfdir = ${prefix}/etc +target = x86_64-apple-darwin18.7.0 +target_alias = +target_cpu = x86_64 +target_os = darwin18.7.0 +target_vendor = apple +top_build_prefix = ../../../../ +top_builddir = ../../../.. +top_srcdir = ../../../.. +with_abinit_common = +with_bigdft = +with_config_file = +with_debug_flavor = +with_fallbacks = +with_fc_vendor = +with_fc_version = +with_fft_flavor = fftw3 +with_fftw3 = +with_gnu_ld = +with_gpu = +with_hdf5 = /opt/local +with_kokkos = +with_levmar = +with_libpaw = +with_libpsml = +with_libxc = /opt/local +with_libxml2 = +with_linalg_flavor = openblas +with_mpi = /opt/local +with_mpi_level = +with_netcdf = /opt/local +with_optim_flavor = +with_papi = +with_pfft = +with_triqs = +with_wannier90 = +with_xmlf90 = +with_yakl = +AM_CFLAGS = -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include +AM_CXXFLAGS = $(sd_triqs_cxxflags) +AM_FCFLAGS = -ffree-form -J../mods +AM_CPPFLAGS = \ + -I$(top_builddir)/shared/common/src/10_defs -I$(top_srcdir)/shared/common/src/10_defs \ + -I$(top_builddir)/shared/common/src/11_memory_mpi -I$(top_srcdir)/shared/common/src/11_memory_mpi \ + -I$(top_builddir)/shared/common/src/14_hidewrite -I$(top_srcdir)/shared/common/src/14_hidewrite \ + -I$(top_builddir)/shared/common/src/16_hideleave -I$(top_srcdir)/shared/common/src/16_hideleave \ + -I$(top_builddir)/shared/common/src/17_yaml_out -I$(top_srcdir)/shared/common/src/17_yaml_out \ + -I$(top_builddir)/shared/common/src/incs -I$(top_srcdir)/shared/common/src/incs -I$(top_builddir)/shared/common/src/mods -I$(top_srcdir)/shared/common/src/mods \ + -I$(top_builddir)/src/incs -I$(top_srcdir)/src/incs -I$(top_builddir)/src/mods -I$(top_srcdir)/src/mods \ + -I$(top_builddir)/shared/libpaw/incs -I$(top_srcdir)/shared/libpaw/incs -I$(top_builddir)/shared/libpaw/mods -I$(top_srcdir)/shared/libpaw/mods \ + + + +# Regular source files +lib17_yaml_out_srcs = \ + c_pair_list.c \ + m_type_pair_list.F90 \ + m_pair_list.F90 \ + m_stream_string.F90 \ + m_yaml.F90 + + +# Source files depending on conditionals + +# Library description +noinst_LIBRARIES = lib17_yaml_out.a +lib17_yaml_out_a_SOURCES = $(lib17_yaml_out_srcs) + +# Dependencies (inside the directory) of directory 17_yaml_out +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. +CLEANFILES = c_pair_list_cpp.c m_type_pair_list_cpp.f90 \ + m_pair_list_cpp.f90 m_stream_string_cpp.f90 m_yaml_cpp.f90 \ + m_pair_list.$(MODEXT) m_stream_string.$(MODEXT) \ + m_type_pair_list.$(MODEXT) m_yaml.$(MODEXT) +EXTRA_DIST = abinit.src abinit.dep +all: all-am + +.SUFFIXES: +.SUFFIXES: .F90 .c .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu shared/common/src/17_yaml_out/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu shared/common/src/17_yaml_out/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) + +lib17_yaml_out.a: $(lib17_yaml_out_a_OBJECTS) $(lib17_yaml_out_a_DEPENDENCIES) $(EXTRA_lib17_yaml_out_a_DEPENDENCIES) + $(AM_V_at)-rm -f lib17_yaml_out.a + $(AM_V_AR)$(lib17_yaml_out_a_AR) lib17_yaml_out.a $(lib17_yaml_out_a_OBJECTS) $(lib17_yaml_out_a_LIBADD) + $(AM_V_at)$(RANLIB) lib17_yaml_out.a + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +include ./$(DEPDIR)/c_pair_list.Po # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) + +.F90.o: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ $< + +.F90.obj: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.c.o: + $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< + $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# $(AM_V_CC)source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(COMPILE) -c -o $@ $< + +.c.obj: + $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` + $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# $(AM_V_CC)source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -f ./$(DEPDIR)/c_pair_list.Po + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f ./$(DEPDIR)/c_pair_list.Po + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ + clean-generic clean-noinstLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am + +.PRECIOUS: Makefile + + +m_pair_list.$(OBJEXT): m_type_pair_list.$(OBJEXT) + +m_yaml.$(OBJEXT): m_pair_list.$(OBJEXT) m_stream_string.$(OBJEXT) + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/GX-PAW/common/src/17_yaml_out/Makefile.am b/GX-PAW/common/src/17_yaml_out/Makefile.am new file mode 100644 index 00000000..3b206b4e --- /dev/null +++ b/GX-PAW/common/src/17_yaml_out/Makefile.am @@ -0,0 +1,68 @@ +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-corelibs on 2024/03/16 21:07:38 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-corelibs script or its config file instead. +# + +AM_CFLAGS = @ABI_CPPFLAGS@ +AM_CXXFLAGS = $(sd_triqs_cxxflags) +AM_FCFLAGS = @FPPFLAGS@ @FCFLAGS_FREEFORM@ @FCFLAGS_MODDIR@ @sd_sys_fcflags@ @fcflags_opt_17_yaml_out@ + +AM_CPPFLAGS = \ + @src_10_defs_fcflags@ \ + @src_11_memory_mpi_fcflags@ \ + @src_14_hidewrite_fcflags@ \ + @src_16_hideleave_fcflags@ \ + @src_17_yaml_out_fcflags@ \ + @src_common_fcflags@ \ + @src_core_fcflags@ \ + @src_libpaw_fcflags@ \ + @fc_mod_fcflags@ + +# Regular source files +lib17_yaml_out_srcs = \ + c_pair_list.c \ + m_type_pair_list.F90 \ + m_pair_list.F90 \ + m_stream_string.F90 \ + m_yaml.F90 + +# Source files depending on conditionals + + +# Library description +noinst_LIBRARIES = lib17_yaml_out.a + +lib17_yaml_out_a_SOURCES= $(lib17_yaml_out_srcs) + +CLEANFILES = \ + c_pair_list_cpp.c \ + m_type_pair_list_cpp.f90 \ + m_pair_list_cpp.f90 \ + m_stream_string_cpp.f90 \ + m_yaml_cpp.f90 + +EXTRA_DIST = abinit.src + +EXTRA_DIST += abinit.dep + +# Dependencies (inside the directory) of directory 17_yaml_out +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. + +CLEANFILES += \ + m_pair_list.$(MODEXT) \ + m_stream_string.$(MODEXT) \ + m_type_pair_list.$(MODEXT) \ + m_yaml.$(MODEXT) + +m_pair_list.$(OBJEXT): m_type_pair_list.$(OBJEXT) + +m_yaml.$(OBJEXT): m_pair_list.$(OBJEXT) m_stream_string.$(OBJEXT) \ No newline at end of file diff --git a/GX-PAW/common/src/17_yaml_out/Makefile.in b/GX-PAW/common/src/17_yaml_out/Makefile.in new file mode 100644 index 00000000..827d15ad --- /dev/null +++ b/GX-PAW/common/src/17_yaml_out/Makefile.in @@ -0,0 +1,1509 @@ +# Makefile.in generated by automake 1.16.3 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2020 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-corelibs on 2024/03/16 21:07:38 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-corelibs script or its config file instead. +# + +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = shared/common/src/17_yaml_out +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/m4/arch-gpu.m4 \ + $(top_srcdir)/config/m4/arch-mpi.m4 \ + $(top_srcdir)/config/m4/auto-autotools.m4 \ + $(top_srcdir)/config/m4/auto-corelibs.m4 \ + $(top_srcdir)/config/m4/auto-debug.m4 \ + $(top_srcdir)/config/m4/auto-dirflags.m4 \ + $(top_srcdir)/config/m4/auto-env.m4 \ + $(top_srcdir)/config/m4/auto-hints.m4 \ + $(top_srcdir)/config/m4/auto-optim.m4 \ + $(top_srcdir)/config/m4/auto-options.m4 \ + $(top_srcdir)/config/m4/auto-output.m4 \ + $(top_srcdir)/config/m4/auto-triggers.m4 \ + $(top_srcdir)/config/m4/conf-atompaw.m4 \ + $(top_srcdir)/config/m4/conf-debug.m4 \ + $(top_srcdir)/config/m4/conf-fallbacks.m4 \ + $(top_srcdir)/config/m4/conf-files.m4 \ + $(top_srcdir)/config/m4/conf-init.m4 \ + $(top_srcdir)/config/m4/conf-openmp.m4 \ + $(top_srcdir)/config/m4/conf-optim.m4 \ + $(top_srcdir)/config/m4/lang-c++.m4 \ + $(top_srcdir)/config/m4/lang-c.m4 \ + $(top_srcdir)/config/m4/lang-fortran-import.m4 \ + $(top_srcdir)/config/m4/lang-fortran.m4 \ + $(top_srcdir)/config/m4/lang-python.m4 \ + $(top_srcdir)/config/m4/libxml2.m4 \ + $(top_srcdir)/config/m4/misc-display.m4 \ + $(top_srcdir)/config/m4/sd_abinit_common.m4 \ + $(top_srcdir)/config/m4/sd_arch_gpu.m4 \ + $(top_srcdir)/config/m4/sd_arch_mpi.m4 \ + $(top_srcdir)/config/m4/sd_bigdft.m4 \ + $(top_srcdir)/config/m4/sd_core.m4 \ + $(top_srcdir)/config/m4/sd_esl.m4 \ + $(top_srcdir)/config/m4/sd_fftw3.m4 \ + $(top_srcdir)/config/m4/sd_gpu_kokkos.m4 \ + $(top_srcdir)/config/m4/sd_gpu_yakl.m4 \ + $(top_srcdir)/config/m4/sd_io_hdf5.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf_fortran.m4 \ + $(top_srcdir)/config/m4/sd_levmar.m4 \ + $(top_srcdir)/config/m4/sd_libpaw.m4 \ + $(top_srcdir)/config/m4/sd_libpsml.m4 \ + $(top_srcdir)/config/m4/sd_libxc.m4 \ + $(top_srcdir)/config/m4/sd_math_fft.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_core.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_util.m4 \ + $(top_srcdir)/config/m4/sd_papi.m4 \ + $(top_srcdir)/config/m4/sd_pfft.m4 \ + $(top_srcdir)/config/m4/sd_triqs.m4 \ + $(top_srcdir)/config/m4/sd_wannier90.m4 \ + $(top_srcdir)/config/m4/sd_xmlf90.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = +lib17_yaml_out_a_AR = $(AR) $(ARFLAGS) +lib17_yaml_out_a_LIBADD = +am__objects_1 = c_pair_list.$(OBJEXT) m_type_pair_list.$(OBJEXT) \ + m_pair_list.$(OBJEXT) m_stream_string.$(OBJEXT) \ + m_yaml.$(OBJEXT) +am_lib17_yaml_out_a_OBJECTS = $(am__objects_1) +lib17_yaml_out_a_OBJECTS = $(am_lib17_yaml_out_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/config/gnu/depcomp +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/c_pair_list.Po +am__mv = mv -f +PPFCCOMPILE = $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) +AM_V_PPFC = $(am__v_PPFC_@AM_V@) +am__v_PPFC_ = $(am__v_PPFC_@AM_DEFAULT_V@) +am__v_PPFC_0 = @echo " PPFC " $@; +am__v_PPFC_1 = +FCLD = $(FC) +FCLINK = $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \ + $@ +AM_V_FCLD = $(am__v_FCLD_@AM_V@) +am__v_FCLD_ = $(am__v_FCLD_@AM_DEFAULT_V@) +am__v_FCLD_0 = @echo " FCLD " $@; +am__v_FCLD_1 = +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(lib17_yaml_out_a_SOURCES) +DIST_SOURCES = $(lib17_yaml_out_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in \ + $(top_srcdir)/config/gnu/depcomp +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ABINIT_BINARY_PACKAGE = @ABINIT_BINARY_PACKAGE@ +ABINIT_COMMON_CPPFLAGS = @ABINIT_COMMON_CPPFLAGS@ +ABINIT_COMMON_FCFLAGS = @ABINIT_COMMON_FCFLAGS@ +ABINIT_COMMON_LDFLAGS = @ABINIT_COMMON_LDFLAGS@ +ABINIT_COMMON_LIBS = @ABINIT_COMMON_LIBS@ +ABINIT_TARGET = @ABINIT_TARGET@ +ABINIT_VERSION = @ABINIT_VERSION@ +ABINIT_VERSION_BASE = @ABINIT_VERSION_BASE@ +ABINIT_VERSION_BUILD = @ABINIT_VERSION_BUILD@ +ABINIT_VERSION_MAJOR = @ABINIT_VERSION_MAJOR@ +ABINIT_VERSION_MICRO = @ABINIT_VERSION_MICRO@ +ABINIT_VERSION_MINOR = @ABINIT_VERSION_MINOR@ +ABI_CPPFLAGS = @ABI_CPPFLAGS@ +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +ARFLAGS = @ARFLAGS@ +ARFLAGS_CMD = @ARFLAGS_CMD@ +ARFLAGS_DEBUG = @ARFLAGS_DEBUG@ +ARFLAGS_EXTRA = @ARFLAGS_EXTRA@ +ARFLAGS_HINTS = @ARFLAGS_HINTS@ +ARFLAGS_OPTIM = @ARFLAGS_OPTIM@ +ATOMPAW_BIN = @ATOMPAW_BIN@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BIGDFT_CPPFLAGS = @BIGDFT_CPPFLAGS@ +BIGDFT_FCFLAGS = @BIGDFT_FCFLAGS@ +BIGDFT_LDFLAGS = @BIGDFT_LDFLAGS@ +BIGDFT_LIBS = @BIGDFT_LIBS@ +BOURNE_SHELL = @BOURNE_SHELL@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CC_LDFLAGS = @CC_LDFLAGS@ +CC_LDFLAGS_DEBUG = @CC_LDFLAGS_DEBUG@ +CC_LDFLAGS_EXTRA = @CC_LDFLAGS_EXTRA@ +CC_LDFLAGS_GPU = @CC_LDFLAGS_GPU@ +CC_LDFLAGS_HINTS = @CC_LDFLAGS_HINTS@ +CC_LDFLAGS_OPTIM = @CC_LDFLAGS_OPTIM@ +CC_LIBS = @CC_LIBS@ +CC_LIBS_DEBUG = @CC_LIBS_DEBUG@ +CC_LIBS_EXTRA = @CC_LIBS_EXTRA@ +CC_LIBS_GPU = @CC_LIBS_GPU@ +CC_LIBS_HINTS = @CC_LIBS_HINTS@ +CC_LIBS_OPTIM = @CC_LIBS_OPTIM@ +CFLAGS = @CFLAGS@ +CFLAGS_DEBUG = @CFLAGS_DEBUG@ +CFLAGS_EXTRA = @CFLAGS_EXTRA@ +CFLAGS_GPU = @CFLAGS_GPU@ +CFLAGS_HINTS = @CFLAGS_HINTS@ +CFLAGS_OPTIM = @CFLAGS_OPTIM@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CPPFLAGS_DEBUG = @CPPFLAGS_DEBUG@ +CPPFLAGS_EXTRA = @CPPFLAGS_EXTRA@ +CPPFLAGS_GPU = @CPPFLAGS_GPU@ +CPPFLAGS_HINTS = @CPPFLAGS_HINTS@ +CPPFLAGS_HINTS_EXT = @CPPFLAGS_HINTS_EXT@ +CPPFLAGS_OPTIM = @CPPFLAGS_OPTIM@ +CXX = @CXX@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CXXFLAGS_DEBUG = @CXXFLAGS_DEBUG@ +CXXFLAGS_EXTRA = @CXXFLAGS_EXTRA@ +CXXFLAGS_GPU = @CXXFLAGS_GPU@ +CXXFLAGS_HINTS = @CXXFLAGS_HINTS@ +CXXFLAGS_OPTIM = @CXXFLAGS_OPTIM@ +CXX_LDFLAGS = @CXX_LDFLAGS@ +CXX_LDFLAGS_DEBUG = @CXX_LDFLAGS_DEBUG@ +CXX_LDFLAGS_EXTRA = @CXX_LDFLAGS_EXTRA@ +CXX_LDFLAGS_GPU = @CXX_LDFLAGS_GPU@ +CXX_LDFLAGS_HINTS = @CXX_LDFLAGS_HINTS@ +CXX_LDFLAGS_OPTIM = @CXX_LDFLAGS_OPTIM@ +CXX_LIBS = @CXX_LIBS@ +CXX_LIBS_DEBUG = @CXX_LIBS_DEBUG@ +CXX_LIBS_EXTRA = @CXX_LIBS_EXTRA@ +CXX_LIBS_GPU = @CXX_LIBS_GPU@ +CXX_LIBS_HINTS = @CXX_LIBS_HINTS@ +CXX_LIBS_OPTIM = @CXX_LIBS_OPTIM@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ +FCFLAGS = @FCFLAGS@ +FCFLAGS_DEBUG = @FCFLAGS_DEBUG@ +FCFLAGS_EXTRA = @FCFLAGS_EXTRA@ +FCFLAGS_F90 = @FCFLAGS_F90@ +FCFLAGS_FIXEDFORM = @FCFLAGS_FIXEDFORM@ +FCFLAGS_FREEFORM = @FCFLAGS_FREEFORM@ +FCFLAGS_HINTS = @FCFLAGS_HINTS@ +FCFLAGS_MODDIR = @FCFLAGS_MODDIR@ +FCFLAGS_OPENMP = @FCFLAGS_OPENMP@ +FCFLAGS_OPENMP_OFFLOAD = @FCFLAGS_OPENMP_OFFLOAD@ +FCFLAGS_OPTIM = @FCFLAGS_OPTIM@ +FCLIBS = @FCLIBS@ +FC_LDFLAGS = @FC_LDFLAGS@ +FC_LDFLAGS_DEBUG = @FC_LDFLAGS_DEBUG@ +FC_LDFLAGS_EXTRA = @FC_LDFLAGS_EXTRA@ +FC_LDFLAGS_HINTS = @FC_LDFLAGS_HINTS@ +FC_LDFLAGS_OPTIM = @FC_LDFLAGS_OPTIM@ +FC_LIBS = @FC_LIBS@ +FC_LIBS_DEBUG = @FC_LIBS_DEBUG@ +FC_LIBS_EXTRA = @FC_LIBS_EXTRA@ +FC_LIBS_HINTS = @FC_LIBS_HINTS@ +FC_LIBS_OPTIM = @FC_LIBS_OPTIM@ +FC_NOWRAP = @FC_NOWRAP@ +FFLAGS = @FFLAGS@ +FFTW3_CFLAGS = @FFTW3_CFLAGS@ +FFTW3_CPPFLAGS = @FFTW3_CPPFLAGS@ +FFTW3_FCFLAGS = @FFTW3_FCFLAGS@ +FFTW3_LDFLAGS = @FFTW3_LDFLAGS@ +FFTW3_LIBS = @FFTW3_LIBS@ +FFT_CFLAGS = @FFT_CFLAGS@ +FFT_FCFLAGS = @FFT_FCFLAGS@ +FPP = @FPP@ +FPPFLAGS = @FPPFLAGS@ +FPPFLAGS_DEBUG = @FPPFLAGS_DEBUG@ +FPPFLAGS_EXTRA = @FPPFLAGS_EXTRA@ +FPPFLAGS_HINTS = @FPPFLAGS_HINTS@ +FPPFLAGS_OPTIM = @FPPFLAGS_OPTIM@ +GPU_ARCH = @GPU_ARCH@ +GPU_CFLAGS = @GPU_CFLAGS@ +GPU_CPPFLAGS = @GPU_CPPFLAGS@ +GPU_CXXFLAGS = @GPU_CXXFLAGS@ +GPU_FCFLAGS = @GPU_FCFLAGS@ +GPU_LDFLAGS = @GPU_LDFLAGS@ +GPU_LIBS = @GPU_LIBS@ +GRAPHATOM_BIN = @GRAPHATOM_BIN@ +GREP = @GREP@ +H5CC = @H5CC@ +HDF5_CFLAGS = @HDF5_CFLAGS@ +HDF5_CPPFLAGS = @HDF5_CPPFLAGS@ +HDF5_CXXFLAGS = @HDF5_CXXFLAGS@ +HDF5_FCFLAGS = @HDF5_FCFLAGS@ +HDF5_LDFLAGS = @HDF5_LDFLAGS@ +HDF5_LIBS = @HDF5_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +LDFLAGS = @LDFLAGS@ +LEVMAR_CFLAGS = @LEVMAR_CFLAGS@ +LEVMAR_CPPFLAGS = @LEVMAR_CPPFLAGS@ +LEVMAR_LDFLAGS = @LEVMAR_LDFLAGS@ +LEVMAR_LIBS = @LEVMAR_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPAW_CPPFLAGS = @LIBPAW_CPPFLAGS@ +LIBPAW_FCFLAGS = @LIBPAW_FCFLAGS@ +LIBPAW_LDFLAGS = @LIBPAW_LDFLAGS@ +LIBPAW_LIBS = @LIBPAW_LIBS@ +LIBPSML_CPPFLAGS = @LIBPSML_CPPFLAGS@ +LIBPSML_FCFLAGS = @LIBPSML_FCFLAGS@ +LIBPSML_LDFLAGS = @LIBPSML_LDFLAGS@ +LIBPSML_LIBS = @LIBPSML_LIBS@ +LIBS = @LIBS@ +LIBXC_CFLAGS = @LIBXC_CFLAGS@ +LIBXC_CPPFLAGS = @LIBXC_CPPFLAGS@ +LIBXC_FCFLAGS = @LIBXC_FCFLAGS@ +LIBXC_LDFLAGS = @LIBXC_LDFLAGS@ +LIBXC_LIBS = @LIBXC_LIBS@ +LIBXML2_CPPFLAGS = @LIBXML2_CPPFLAGS@ +LIBXML2_FCFLAGS = @LIBXML2_FCFLAGS@ +LIBXML2_LIBS = @LIBXML2_LIBS@ +LINALG_CFLAGS = @LINALG_CFLAGS@ +LINALG_CPPFLAGS = @LINALG_CPPFLAGS@ +LINALG_CXXFLAGS = @LINALG_CXXFLAGS@ +LINALG_FCFLAGS = @LINALG_FCFLAGS@ +LINALG_LDFLAGS = @LINALG_LDFLAGS@ +LINALG_LIBS = @LINALG_LIBS@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODEXT = @MODEXT@ +MPI_CFLAGS = @MPI_CFLAGS@ +MPI_CPPFLAGS = @MPI_CPPFLAGS@ +MPI_CXXFLAGS = @MPI_CXXFLAGS@ +MPI_FCFLAGS = @MPI_FCFLAGS@ +MPI_LDFLAGS = @MPI_LDFLAGS@ +MPI_LIBS = @MPI_LIBS@ +MV = @MV@ +NETCDF_CFLAGS = @NETCDF_CFLAGS@ +NETCDF_CPPFLAGS = @NETCDF_CPPFLAGS@ +NETCDF_CXXFLAGS = @NETCDF_CXXFLAGS@ +NETCDF_FCFLAGS = @NETCDF_FCFLAGS@ +NETCDF_FORTRAN_CFLAGS = @NETCDF_FORTRAN_CFLAGS@ +NETCDF_FORTRAN_CPPFLAGS = @NETCDF_FORTRAN_CPPFLAGS@ +NETCDF_FORTRAN_CXXFLAGS = @NETCDF_FORTRAN_CXXFLAGS@ +NETCDF_FORTRAN_FCFLAGS = @NETCDF_FORTRAN_FCFLAGS@ +NETCDF_FORTRAN_LDFLAGS = @NETCDF_FORTRAN_LDFLAGS@ +NETCDF_FORTRAN_LIBS = @NETCDF_FORTRAN_LIBS@ +NETCDF_LDFLAGS = @NETCDF_LDFLAGS@ +NETCDF_LIBS = @NETCDF_LIBS@ +NVCC = @NVCC@ +NVCC_CFLAGS = @NVCC_CFLAGS@ +NVCC_CPPFLAGS = @NVCC_CPPFLAGS@ +NVCC_LDFLAGS = @NVCC_LDFLAGS@ +NVCC_LIBS = @NVCC_LIBS@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PAPI_CFLAGS = @PAPI_CFLAGS@ +PAPI_CPPFLAGS = @PAPI_CPPFLAGS@ +PAPI_LDFLAGS = @PAPI_LDFLAGS@ +PAPI_LIBS = @PAPI_LIBS@ +PATCH = @PATCH@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PFFT_CFLAGS = @PFFT_CFLAGS@ +PFFT_CPPFLAGS = @PFFT_CPPFLAGS@ +PFFT_LDFLAGS = @PFFT_LDFLAGS@ +PFFT_LIBS = @PFFT_LIBS@ +PYFLAGS = @PYFLAGS@ +PYTHON = @PYTHON@ +PYTHON_CONFIG = @PYTHON_CONFIG@ +PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ +RANLIB = @RANLIB@ +REALPATH = @REALPATH@ +RM = @RM@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +TAR = @TAR@ +TRIQS_CFLAGS = @TRIQS_CFLAGS@ +TRIQS_CPPFLAGS = @TRIQS_CPPFLAGS@ +TRIQS_CXXFLAGS = @TRIQS_CXXFLAGS@ +TRIQS_LDFLAGS = @TRIQS_LDFLAGS@ +TRIQS_LIBS = @TRIQS_LIBS@ +TRUE_CPP = @TRUE_CPP@ +VERSION = @VERSION@ +WANNIER90_CPPFLAGS = @WANNIER90_CPPFLAGS@ +WANNIER90_FCFLAGS = @WANNIER90_FCFLAGS@ +WANNIER90_LDFLAGS = @WANNIER90_LDFLAGS@ +WANNIER90_LIBS = @WANNIER90_LIBS@ +XML2_CONFIG = @XML2_CONFIG@ +XMLF90_CPPFLAGS = @XMLF90_CPPFLAGS@ +XMLF90_FCFLAGS = @XMLF90_FCFLAGS@ +XMLF90_LDFLAGS = @XMLF90_LDFLAGS@ +XMLF90_LIBS = @XMLF90_LIBS@ +XML_CPPFLAGS = @XML_CPPFLAGS@ +XML_LIBS = @XML_LIBS@ +XPP = @XPP@ +XPPFLAGS = @XPPFLAGS@ +XPPFLAGS_DEBUG = @XPPFLAGS_DEBUG@ +XPPFLAGS_EXTRA = @XPPFLAGS_EXTRA@ +XPPFLAGS_OPTIM = @XPPFLAGS_OPTIM@ +YAKL_CPPFLAGS = @YAKL_CPPFLAGS@ +YAKL_FCFLAGS = @YAKL_FCFLAGS@ +YAKL_LDFLAGS = @YAKL_LDFLAGS@ +YAKL_LIBS = @YAKL_LIBS@ +abi_ac_distcheck = @abi_ac_distcheck@ +abi_ac_version = @abi_ac_version@ +abi_am_version = @abi_am_version@ +abi_avx_safe_mode_enable = @abi_avx_safe_mode_enable@ +abi_bse_unpacked_enable = @abi_bse_unpacked_enable@ +abi_cc_path = @abi_cc_path@ +abi_cc_vendor = @abi_cc_vendor@ +abi_cc_version = @abi_cc_version@ +abi_cclock_enable = @abi_cclock_enable@ +abi_cpp_path = @abi_cpp_path@ +abi_cpu_64bits = @abi_cpu_64bits@ +abi_cpu_bits = @abi_cpu_bits@ +abi_cpu_model = @abi_cpu_model@ +abi_cpu_platform = @abi_cpu_platform@ +abi_cpu_spec = @abi_cpu_spec@ +abi_cpu_vendor = @abi_cpu_vendor@ +abi_crpa_optim_enable = @abi_crpa_optim_enable@ +abi_cxx_path = @abi_cxx_path@ +abi_cxx_vendor = @abi_cxx_vendor@ +abi_cxx_version = @abi_cxx_version@ +abi_debug_flavor = @abi_debug_flavor@ +abi_exports_enable = @abi_exports_enable@ +abi_fbk_abinit_common_ok = @abi_fbk_abinit_common_ok@ +abi_fbk_bigdft_ok = @abi_fbk_bigdft_ok@ +abi_fbk_config = @abi_fbk_config@ +abi_fbk_enable = @abi_fbk_enable@ +abi_fbk_fft_ok = @abi_fbk_fft_ok@ +abi_fbk_fftw3_ok = @abi_fbk_fftw3_ok@ +abi_fbk_gpu_ok = @abi_fbk_gpu_ok@ +abi_fbk_hdf5_ok = @abi_fbk_hdf5_ok@ +abi_fbk_init = @abi_fbk_init@ +abi_fbk_kokkos_ok = @abi_fbk_kokkos_ok@ +abi_fbk_levmar_ok = @abi_fbk_levmar_ok@ +abi_fbk_libpaw_ok = @abi_fbk_libpaw_ok@ +abi_fbk_libpsml_ok = @abi_fbk_libpsml_ok@ +abi_fbk_libxc_ok = @abi_fbk_libxc_ok@ +abi_fbk_libxml2_ok = @abi_fbk_libxml2_ok@ +abi_fbk_linalg_ok = @abi_fbk_linalg_ok@ +abi_fbk_list = @abi_fbk_list@ +abi_fbk_mpi_ok = @abi_fbk_mpi_ok@ +abi_fbk_netcdf_fortran_ok = @abi_fbk_netcdf_fortran_ok@ +abi_fbk_netcdf_ok = @abi_fbk_netcdf_ok@ +abi_fbk_papi_ok = @abi_fbk_papi_ok@ +abi_fbk_pfft_ok = @abi_fbk_pfft_ok@ +abi_fbk_prefix = @abi_fbk_prefix@ +abi_fbk_required = @abi_fbk_required@ +abi_fbk_triqs_ok = @abi_fbk_triqs_ok@ +abi_fbk_wannier90_ok = @abi_fbk_wannier90_ok@ +abi_fbk_xmlf90_ok = @abi_fbk_xmlf90_ok@ +abi_fbk_yakl_ok = @abi_fbk_yakl_ok@ +abi_fc_path = @abi_fc_path@ +abi_fc_vendor = @abi_fc_vendor@ +abi_fc_version = @abi_fc_version@ +abi_fc_wrap = @abi_fc_wrap@ +abi_fc_wrapper_enable = @abi_fc_wrapper_enable@ +abi_fpp_path = @abi_fpp_path@ +abi_gpu_arch = @abi_gpu_arch@ +abi_gpu_fcflags = @abi_gpu_fcflags@ +abi_gpu_flavor = @abi_gpu_flavor@ +abi_gpu_hip_libdir = @abi_gpu_hip_libdir@ +abi_gpu_incs = @abi_gpu_incs@ +abi_gpu_ldflags = @abi_gpu_ldflags@ +abi_gpu_libs = @abi_gpu_libs@ +abi_gpu_nvtx_v3 = @abi_gpu_nvtx_v3@ +abi_gpu_roctx = @abi_gpu_roctx@ +abi_gw_dpc_enable = @abi_gw_dpc_enable@ +abi_hints_enable = @abi_hints_enable@ +abi_libtetra_enable = @abi_libtetra_enable@ +abi_libxml2_cppflags = @abi_libxml2_cppflags@ +abi_libxml2_enable = @abi_libxml2_enable@ +abi_libxml2_fcflags = @abi_libxml2_fcflags@ +abi_libxml2_init = @abi_libxml2_init@ +abi_libxml2_ldflags = @abi_libxml2_ldflags@ +abi_libxml2_libs = @abi_libxml2_libs@ +abi_libxml2_ok = @abi_libxml2_ok@ +abi_libxml2_prefix = @abi_libxml2_prefix@ +abi_lotf_enable = @abi_lotf_enable@ +abi_lt_version = @abi_lt_version@ +abi_m4_version = @abi_m4_version@ +abi_memory_profiling_enable = @abi_memory_profiling_enable@ +abi_mpi_cflags = @abi_mpi_cflags@ +abi_mpi_cppflags = @abi_mpi_cppflags@ +abi_mpi_cxxflags = @abi_mpi_cxxflags@ +abi_mpi_enable = @abi_mpi_enable@ +abi_mpi_fcflags = @abi_mpi_fcflags@ +abi_mpi_flavor = @abi_mpi_flavor@ +abi_mpi_gpu_aware_enable = @abi_mpi_gpu_aware_enable@ +abi_mpi_incs = @abi_mpi_incs@ +abi_mpi_inplace_enable = @abi_mpi_inplace_enable@ +abi_mpi_interfaces_bugfix_enable = @abi_mpi_interfaces_bugfix_enable@ +abi_mpi_io_default_enable = @abi_mpi_io_default_enable@ +abi_mpi_io_enable = @abi_mpi_io_enable@ +abi_mpi_ldflags = @abi_mpi_ldflags@ +abi_mpi_level = @abi_mpi_level@ +abi_mpi_libs = @abi_mpi_libs@ +abi_netcdf_default_enable = @abi_netcdf_default_enable@ +abi_openmp_enable = @abi_openmp_enable@ +abi_openmp_offload_enable = @abi_openmp_offload_enable@ +abi_optim_flavor = @abi_optim_flavor@ +abi_python_invocation_enable = @abi_python_invocation_enable@ +abi_source_debug_enable = @abi_source_debug_enable@ +abi_stdin_enable = @abi_stdin_enable@ +abi_sys_spec = @abi_sys_spec@ +abi_timer_enable = @abi_timer_enable@ +abi_triqs_v1_4_enable = @abi_triqs_v1_4_enable@ +abi_triqs_v2_0_enable = @abi_triqs_v2_0_enable@ +abi_zdot_bugfix_enable = @abi_zdot_bugfix_enable@ +abinit_bindir = @abinit_bindir@ +abinit_builddir = @abinit_builddir@ +abinit_chkdir = @abinit_chkdir@ +abinit_datdir = @abinit_datdir@ +abinit_docdir = @abinit_docdir@ +abinit_incdir = @abinit_incdir@ +abinit_libdir = @abinit_libdir@ +abinit_mandir = @abinit_mandir@ +abinit_prefix = @abinit_prefix@ +abinit_srcdir = @abinit_srcdir@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_FC = @ac_ct_FC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cc_info_string = @cc_info_string@ +cxx_info_string = @cxx_info_string@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +enable_avx_safe_mode = @enable_avx_safe_mode@ +enable_bse_unpacked = @enable_bse_unpacked@ +enable_cclock = @enable_cclock@ +enable_crpa_optim = @enable_crpa_optim@ +enable_exports = @enable_exports@ +enable_fc_wrapper = @enable_fc_wrapper@ +enable_gw_dpc = @enable_gw_dpc@ +enable_hints = @enable_hints@ +enable_libtetra = @enable_libtetra@ +enable_lotf = @enable_lotf@ +enable_memory_profiling = @enable_memory_profiling@ +enable_mpi_gpu_aware = @enable_mpi_gpu_aware@ +enable_mpi_inplace = @enable_mpi_inplace@ +enable_mpi_interfaces_bugfix = @enable_mpi_interfaces_bugfix@ +enable_mpi_io = @enable_mpi_io@ +enable_mpi_io_default = @enable_mpi_io_default@ +enable_netcdf_default = @enable_netcdf_default@ +enable_openmp = @enable_openmp@ +enable_openmp_offload = @enable_openmp_offload@ +enable_python_invocation = @enable_python_invocation@ +enable_shared = @enable_shared@ +enable_source_debug = @enable_source_debug@ +enable_static = @enable_static@ +enable_stdin = @enable_stdin@ +enable_timer = @enable_timer@ +enable_triqs_v1_4 = @enable_triqs_v1_4@ +enable_triqs_v2_0 = @enable_triqs_v2_0@ +enable_zdot_bugfix = @enable_zdot_bugfix@ +exec_prefix = @exec_prefix@ +fc_info_string = @fc_info_string@ +fc_mod_fcflags = @fc_mod_fcflags@ +fc_timing = @fc_timing@ +fcflags_opt_02_clib = @fcflags_opt_02_clib@ +fcflags_opt_10_defs = @fcflags_opt_10_defs@ +fcflags_opt_11_memory_mpi = @fcflags_opt_11_memory_mpi@ +fcflags_opt_12_hide_mpi = @fcflags_opt_12_hide_mpi@ +fcflags_opt_14_hidewrite = @fcflags_opt_14_hidewrite@ +fcflags_opt_16_hideleave = @fcflags_opt_16_hideleave@ +fcflags_opt_16_kokkos_toolbox = @fcflags_opt_16_kokkos_toolbox@ +fcflags_opt_17_gpu_toolbox = @fcflags_opt_17_gpu_toolbox@ +fcflags_opt_17_libtetra_ext = @fcflags_opt_17_libtetra_ext@ +fcflags_opt_17_minimax = @fcflags_opt_17_minimax@ +fcflags_opt_17_yaml_out = @fcflags_opt_17_yaml_out@ +fcflags_opt_18_timing = @fcflags_opt_18_timing@ +fcflags_opt_21_hashfuncs = @fcflags_opt_21_hashfuncs@ +fcflags_opt_27_toolbox_oop = @fcflags_opt_27_toolbox_oop@ +fcflags_opt_28_numeric_noabirule = @fcflags_opt_28_numeric_noabirule@ +fcflags_opt_29_kpoints = @fcflags_opt_29_kpoints@ +fcflags_opt_32_util = @fcflags_opt_32_util@ +fcflags_opt_33_xc_lowlevel = @fcflags_opt_33_xc_lowlevel@ +fcflags_opt_39_libpaw = @fcflags_opt_39_libpaw@ +fcflags_opt_41_geometry = @fcflags_opt_41_geometry@ +fcflags_opt_42_nlstrain = @fcflags_opt_42_nlstrain@ +fcflags_opt_42_parser = @fcflags_opt_42_parser@ +fcflags_opt_43_ptgroups = @fcflags_opt_43_ptgroups@ +fcflags_opt_43_wvl_wrappers = @fcflags_opt_43_wvl_wrappers@ +fcflags_opt_44_abitools = @fcflags_opt_44_abitools@ +fcflags_opt_44_abitypes_defs = @fcflags_opt_44_abitypes_defs@ +fcflags_opt_44_manage_kokkos = @fcflags_opt_44_manage_kokkos@ +fcflags_opt_45_geomoptim = @fcflags_opt_45_geomoptim@ +fcflags_opt_45_xgTools = @fcflags_opt_45_xgTools@ +fcflags_opt_46_ghc_omp = @fcflags_opt_46_ghc_omp@ +fcflags_opt_46_manage_cuda = @fcflags_opt_46_manage_cuda@ +fcflags_opt_48_diago = @fcflags_opt_48_diago@ +fcflags_opt_49_gw_toolbox_oop = @fcflags_opt_49_gw_toolbox_oop@ +fcflags_opt_51_manage_mpi = @fcflags_opt_51_manage_mpi@ +fcflags_opt_52_fft_mpi_noabirule = @fcflags_opt_52_fft_mpi_noabirule@ +fcflags_opt_53_ffts = @fcflags_opt_53_ffts@ +fcflags_opt_54_spacepar = @fcflags_opt_54_spacepar@ +fcflags_opt_55_abiutil = @fcflags_opt_55_abiutil@ +fcflags_opt_56_io_mpi = @fcflags_opt_56_io_mpi@ +fcflags_opt_56_mixing = @fcflags_opt_56_mixing@ +fcflags_opt_56_recipspace = @fcflags_opt_56_recipspace@ +fcflags_opt_56_xc = @fcflags_opt_56_xc@ +fcflags_opt_57_iopsp_parser = @fcflags_opt_57_iopsp_parser@ +fcflags_opt_57_iovars = @fcflags_opt_57_iovars@ +fcflags_opt_61_occeig = @fcflags_opt_61_occeig@ +fcflags_opt_62_cg_noabirule = @fcflags_opt_62_cg_noabirule@ +fcflags_opt_62_ctqmc = @fcflags_opt_62_ctqmc@ +fcflags_opt_62_iowfdenpot = @fcflags_opt_62_iowfdenpot@ +fcflags_opt_62_poisson = @fcflags_opt_62_poisson@ +fcflags_opt_62_wvl_wfs = @fcflags_opt_62_wvl_wfs@ +fcflags_opt_64_psp = @fcflags_opt_64_psp@ +fcflags_opt_65_lotf_base = @fcflags_opt_65_lotf_base@ +fcflags_opt_65_paw = @fcflags_opt_65_paw@ +fcflags_opt_66_nonlocal = @fcflags_opt_66_nonlocal@ +fcflags_opt_66_vdwxc = @fcflags_opt_66_vdwxc@ +fcflags_opt_66_wfs = @fcflags_opt_66_wfs@ +fcflags_opt_67_common = @fcflags_opt_67_common@ +fcflags_opt_67_python_invocation_ext = @fcflags_opt_67_python_invocation_ext@ +fcflags_opt_67_triqs_ext = @fcflags_opt_67_triqs_ext@ +fcflags_opt_68_dmft = @fcflags_opt_68_dmft@ +fcflags_opt_68_lotf = @fcflags_opt_68_lotf@ +fcflags_opt_68_recursion = @fcflags_opt_68_recursion@ +fcflags_opt_68_rsprc = @fcflags_opt_68_rsprc@ +fcflags_opt_69_wfdesc = @fcflags_opt_69_wfdesc@ +fcflags_opt_70_gw = @fcflags_opt_70_gw@ +fcflags_opt_71_bse = @fcflags_opt_71_bse@ +fcflags_opt_71_wannier = @fcflags_opt_71_wannier@ +fcflags_opt_72_response = @fcflags_opt_72_response@ +fcflags_opt_77_ddb = @fcflags_opt_77_ddb@ +fcflags_opt_77_suscep = @fcflags_opt_77_suscep@ +fcflags_opt_78_effpot = @fcflags_opt_78_effpot@ +fcflags_opt_78_eph = @fcflags_opt_78_eph@ +fcflags_opt_79_seqpar_mpi = @fcflags_opt_79_seqpar_mpi@ +fcflags_opt_80_rttddft = @fcflags_opt_80_rttddft@ +fcflags_opt_80_tdep = @fcflags_opt_80_tdep@ +fcflags_opt_94_scfcv = @fcflags_opt_94_scfcv@ +fcflags_opt_95_drive = @fcflags_opt_95_drive@ +fcflags_opt_98_main = @fcflags_opt_98_main@ +fcflags_opt_bigdft = @fcflags_opt_bigdft@ +fcflags_opt_default = @fcflags_opt_default@ +fcflags_opt_hdf5 = @fcflags_opt_hdf5@ +fcflags_opt_levmar = @fcflags_opt_levmar@ +fcflags_opt_libpsml = @fcflags_opt_libpsml@ +fcflags_opt_libxc = @fcflags_opt_libxc@ +fcflags_opt_libxml2 = @fcflags_opt_libxml2@ +fcflags_opt_linalg = @fcflags_opt_linalg@ +fcflags_opt_netcdf = @fcflags_opt_netcdf@ +fcflags_opt_netcdf_fortran = @fcflags_opt_netcdf_fortran@ +fcflags_opt_papi = @fcflags_opt_papi@ +fcflags_opt_triqs = @fcflags_opt_triqs@ +fcflags_opt_wannier90 = @fcflags_opt_wannier90@ +fcflags_opt_xmlf90 = @fcflags_opt_xmlf90@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sd_abinit_common_cppflags = @sd_abinit_common_cppflags@ +sd_abinit_common_enable = @sd_abinit_common_enable@ +sd_abinit_common_enable_def = @sd_abinit_common_enable_def@ +sd_abinit_common_fcflags = @sd_abinit_common_fcflags@ +sd_abinit_common_init = @sd_abinit_common_init@ +sd_abinit_common_ldflags = @sd_abinit_common_ldflags@ +sd_abinit_common_libs = @sd_abinit_common_libs@ +sd_abinit_common_ok = @sd_abinit_common_ok@ +sd_abinit_common_options = @sd_abinit_common_options@ +sd_abinit_common_policy = @sd_abinit_common_policy@ +sd_abinit_common_status = @sd_abinit_common_status@ +sd_bigdft_cppflags = @sd_bigdft_cppflags@ +sd_bigdft_enable = @sd_bigdft_enable@ +sd_bigdft_enable_def = @sd_bigdft_enable_def@ +sd_bigdft_fcflags = @sd_bigdft_fcflags@ +sd_bigdft_init = @sd_bigdft_init@ +sd_bigdft_ldflags = @sd_bigdft_ldflags@ +sd_bigdft_libs = @sd_bigdft_libs@ +sd_bigdft_ok = @sd_bigdft_ok@ +sd_bigdft_options = @sd_bigdft_options@ +sd_bigdft_policy = @sd_bigdft_policy@ +sd_bigdft_status = @sd_bigdft_status@ +sd_fft_cflags = @sd_fft_cflags@ +sd_fft_choices = @sd_fft_choices@ +sd_fft_cppflags = @sd_fft_cppflags@ +sd_fft_cxxflags = @sd_fft_cxxflags@ +sd_fft_enable = @sd_fft_enable@ +sd_fft_fcflags = @sd_fft_fcflags@ +sd_fft_flavor = @sd_fft_flavor@ +sd_fft_init = @sd_fft_init@ +sd_fft_ldflags = @sd_fft_ldflags@ +sd_fft_libs = @sd_fft_libs@ +sd_fft_ok = @sd_fft_ok@ +sd_fftw3_cflags = @sd_fftw3_cflags@ +sd_fftw3_cppflags = @sd_fftw3_cppflags@ +sd_fftw3_enable = @sd_fftw3_enable@ +sd_fftw3_enable_def = @sd_fftw3_enable_def@ +sd_fftw3_fcflags = @sd_fftw3_fcflags@ +sd_fftw3_init = @sd_fftw3_init@ +sd_fftw3_ldflags = @sd_fftw3_ldflags@ +sd_fftw3_libs = @sd_fftw3_libs@ +sd_fftw3_ok = @sd_fftw3_ok@ +sd_fftw3_options = @sd_fftw3_options@ +sd_fftw3_policy = @sd_fftw3_policy@ +sd_fftw3_status = @sd_fftw3_status@ +sd_gpu_cflags = @sd_gpu_cflags@ +sd_gpu_cppflags = @sd_gpu_cppflags@ +sd_gpu_cxxflags = @sd_gpu_cxxflags@ +sd_gpu_enable = @sd_gpu_enable@ +sd_gpu_enable_def = @sd_gpu_enable_def@ +sd_gpu_fcflags = @sd_gpu_fcflags@ +sd_gpu_init = @sd_gpu_init@ +sd_gpu_ldflags = @sd_gpu_ldflags@ +sd_gpu_libs = @sd_gpu_libs@ +sd_gpu_ok = @sd_gpu_ok@ +sd_gpu_options = @sd_gpu_options@ +sd_gpu_policy = @sd_gpu_policy@ +sd_gpu_prefix = @sd_gpu_prefix@ +sd_gpu_status = @sd_gpu_status@ +sd_hdf5_cflags = @sd_hdf5_cflags@ +sd_hdf5_cppflags = @sd_hdf5_cppflags@ +sd_hdf5_cxxflags = @sd_hdf5_cxxflags@ +sd_hdf5_enable = @sd_hdf5_enable@ +sd_hdf5_enable_def = @sd_hdf5_enable_def@ +sd_hdf5_enable_fc = @sd_hdf5_enable_fc@ +sd_hdf5_fcflags = @sd_hdf5_fcflags@ +sd_hdf5_h5cc = @sd_hdf5_h5cc@ +sd_hdf5_h5fc = @sd_hdf5_h5fc@ +sd_hdf5_init = @sd_hdf5_init@ +sd_hdf5_ldflags = @sd_hdf5_ldflags@ +sd_hdf5_libs = @sd_hdf5_libs@ +sd_hdf5_ok = @sd_hdf5_ok@ +sd_hdf5_options = @sd_hdf5_options@ +sd_hdf5_policy = @sd_hdf5_policy@ +sd_hdf5_status = @sd_hdf5_status@ +sd_kokkos_cppflags = @sd_kokkos_cppflags@ +sd_kokkos_cxxflags = @sd_kokkos_cxxflags@ +sd_kokkos_enable = @sd_kokkos_enable@ +sd_kokkos_enable_def = @sd_kokkos_enable_def@ +sd_kokkos_init = @sd_kokkos_init@ +sd_kokkos_ldflags = @sd_kokkos_ldflags@ +sd_kokkos_libs = @sd_kokkos_libs@ +sd_kokkos_ok = @sd_kokkos_ok@ +sd_kokkos_options = @sd_kokkos_options@ +sd_kokkos_policy = @sd_kokkos_policy@ +sd_kokkos_status = @sd_kokkos_status@ +sd_levmar_cflags = @sd_levmar_cflags@ +sd_levmar_cppflags = @sd_levmar_cppflags@ +sd_levmar_enable = @sd_levmar_enable@ +sd_levmar_enable_def = @sd_levmar_enable_def@ +sd_levmar_init = @sd_levmar_init@ +sd_levmar_ldflags = @sd_levmar_ldflags@ +sd_levmar_libs = @sd_levmar_libs@ +sd_levmar_ok = @sd_levmar_ok@ +sd_levmar_options = @sd_levmar_options@ +sd_levmar_policy = @sd_levmar_policy@ +sd_levmar_status = @sd_levmar_status@ +sd_libpaw_cppflags = @sd_libpaw_cppflags@ +sd_libpaw_enable = @sd_libpaw_enable@ +sd_libpaw_enable_def = @sd_libpaw_enable_def@ +sd_libpaw_fcflags = @sd_libpaw_fcflags@ +sd_libpaw_init = @sd_libpaw_init@ +sd_libpaw_ldflags = @sd_libpaw_ldflags@ +sd_libpaw_libs = @sd_libpaw_libs@ +sd_libpaw_ok = @sd_libpaw_ok@ +sd_libpaw_options = @sd_libpaw_options@ +sd_libpaw_policy = @sd_libpaw_policy@ +sd_libpaw_status = @sd_libpaw_status@ +sd_libpsml_cppflags = @sd_libpsml_cppflags@ +sd_libpsml_enable = @sd_libpsml_enable@ +sd_libpsml_enable_def = @sd_libpsml_enable_def@ +sd_libpsml_fcflags = @sd_libpsml_fcflags@ +sd_libpsml_init = @sd_libpsml_init@ +sd_libpsml_ldflags = @sd_libpsml_ldflags@ +sd_libpsml_libs = @sd_libpsml_libs@ +sd_libpsml_ok = @sd_libpsml_ok@ +sd_libpsml_options = @sd_libpsml_options@ +sd_libpsml_policy = @sd_libpsml_policy@ +sd_libpsml_status = @sd_libpsml_status@ +sd_libxc_cflags = @sd_libxc_cflags@ +sd_libxc_cppflags = @sd_libxc_cppflags@ +sd_libxc_enable = @sd_libxc_enable@ +sd_libxc_enable_def = @sd_libxc_enable_def@ +sd_libxc_enable_fc = @sd_libxc_enable_fc@ +sd_libxc_fcflags = @sd_libxc_fcflags@ +sd_libxc_init = @sd_libxc_init@ +sd_libxc_ldflags = @sd_libxc_ldflags@ +sd_libxc_libs = @sd_libxc_libs@ +sd_libxc_ok = @sd_libxc_ok@ +sd_libxc_options = @sd_libxc_options@ +sd_libxc_policy = @sd_libxc_policy@ +sd_libxc_status = @sd_libxc_status@ +sd_linalg_cflags = @sd_linalg_cflags@ +sd_linalg_choices = @sd_linalg_choices@ +sd_linalg_cppflags = @sd_linalg_cppflags@ +sd_linalg_cxxflags = @sd_linalg_cxxflags@ +sd_linalg_enable = @sd_linalg_enable@ +sd_linalg_fcflags = @sd_linalg_fcflags@ +sd_linalg_flavor = @sd_linalg_flavor@ +sd_linalg_has_elpa = @sd_linalg_has_elpa@ +sd_linalg_has_scalapack = @sd_linalg_has_scalapack@ +sd_linalg_init = @sd_linalg_init@ +sd_linalg_ldflags = @sd_linalg_ldflags@ +sd_linalg_libs = @sd_linalg_libs@ +sd_linalg_ok = @sd_linalg_ok@ +sd_mpi_cc = @sd_mpi_cc@ +sd_mpi_cflags = @sd_mpi_cflags@ +sd_mpi_cppflags = @sd_mpi_cppflags@ +sd_mpi_cxx = @sd_mpi_cxx@ +sd_mpi_enable = @sd_mpi_enable@ +sd_mpi_enable_cxx = @sd_mpi_enable_cxx@ +sd_mpi_enable_def = @sd_mpi_enable_def@ +sd_mpi_enable_fc = @sd_mpi_enable_fc@ +sd_mpi_fc = @sd_mpi_fc@ +sd_mpi_fcflags = @sd_mpi_fcflags@ +sd_mpi_init = @sd_mpi_init@ +sd_mpi_ldflags = @sd_mpi_ldflags@ +sd_mpi_libs = @sd_mpi_libs@ +sd_mpi_ok = @sd_mpi_ok@ +sd_mpi_options = @sd_mpi_options@ +sd_mpi_policy = @sd_mpi_policy@ +sd_mpi_status = @sd_mpi_status@ +sd_netcdf_cflags = @sd_netcdf_cflags@ +sd_netcdf_cppflags = @sd_netcdf_cppflags@ +sd_netcdf_enable = @sd_netcdf_enable@ +sd_netcdf_enable_def = @sd_netcdf_enable_def@ +sd_netcdf_fcflags = @sd_netcdf_fcflags@ +sd_netcdf_fortran_cflags = @sd_netcdf_fortran_cflags@ +sd_netcdf_fortran_cppflags = @sd_netcdf_fortran_cppflags@ +sd_netcdf_fortran_enable = @sd_netcdf_fortran_enable@ +sd_netcdf_fortran_enable_def = @sd_netcdf_fortran_enable_def@ +sd_netcdf_fortran_fcflags = @sd_netcdf_fortran_fcflags@ +sd_netcdf_fortran_init = @sd_netcdf_fortran_init@ +sd_netcdf_fortran_ldflags = @sd_netcdf_fortran_ldflags@ +sd_netcdf_fortran_libs = @sd_netcdf_fortran_libs@ +sd_netcdf_fortran_ok = @sd_netcdf_fortran_ok@ +sd_netcdf_fortran_options = @sd_netcdf_fortran_options@ +sd_netcdf_fortran_policy = @sd_netcdf_fortran_policy@ +sd_netcdf_fortran_status = @sd_netcdf_fortran_status@ +sd_netcdf_init = @sd_netcdf_init@ +sd_netcdf_ldflags = @sd_netcdf_ldflags@ +sd_netcdf_libs = @sd_netcdf_libs@ +sd_netcdf_ok = @sd_netcdf_ok@ +sd_netcdf_options = @sd_netcdf_options@ +sd_netcdf_policy = @sd_netcdf_policy@ +sd_netcdf_status = @sd_netcdf_status@ +sd_papi_cflags = @sd_papi_cflags@ +sd_papi_cppflags = @sd_papi_cppflags@ +sd_papi_enable = @sd_papi_enable@ +sd_papi_enable_def = @sd_papi_enable_def@ +sd_papi_init = @sd_papi_init@ +sd_papi_ldflags = @sd_papi_ldflags@ +sd_papi_libs = @sd_papi_libs@ +sd_papi_ok = @sd_papi_ok@ +sd_papi_options = @sd_papi_options@ +sd_papi_policy = @sd_papi_policy@ +sd_papi_sd_papi_fcflags = @sd_papi_sd_papi_fcflags@ +sd_papi_status = @sd_papi_status@ +sd_pfft_cflags = @sd_pfft_cflags@ +sd_pfft_cppflags = @sd_pfft_cppflags@ +sd_pfft_enable = @sd_pfft_enable@ +sd_pfft_enable_def = @sd_pfft_enable_def@ +sd_pfft_init = @sd_pfft_init@ +sd_pfft_ldflags = @sd_pfft_ldflags@ +sd_pfft_libs = @sd_pfft_libs@ +sd_pfft_ok = @sd_pfft_ok@ +sd_pfft_options = @sd_pfft_options@ +sd_pfft_policy = @sd_pfft_policy@ +sd_pfft_status = @sd_pfft_status@ +sd_sys_fcflags = @sd_sys_fcflags@ +sd_triqs_cflags = @sd_triqs_cflags@ +sd_triqs_cppflags = @sd_triqs_cppflags@ +sd_triqs_cxxflags = @sd_triqs_cxxflags@ +sd_triqs_enable = @sd_triqs_enable@ +sd_triqs_enable_def = @sd_triqs_enable_def@ +sd_triqs_fcflags = @sd_triqs_fcflags@ +sd_triqs_init = @sd_triqs_init@ +sd_triqs_ldflags = @sd_triqs_ldflags@ +sd_triqs_libs = @sd_triqs_libs@ +sd_triqs_ok = @sd_triqs_ok@ +sd_triqs_options = @sd_triqs_options@ +sd_triqs_policy = @sd_triqs_policy@ +sd_triqs_status = @sd_triqs_status@ +sd_wannier90_cppflags = @sd_wannier90_cppflags@ +sd_wannier90_enable = @sd_wannier90_enable@ +sd_wannier90_enable_def = @sd_wannier90_enable_def@ +sd_wannier90_fcflags = @sd_wannier90_fcflags@ +sd_wannier90_init = @sd_wannier90_init@ +sd_wannier90_ldflags = @sd_wannier90_ldflags@ +sd_wannier90_libs = @sd_wannier90_libs@ +sd_wannier90_ok = @sd_wannier90_ok@ +sd_wannier90_options = @sd_wannier90_options@ +sd_wannier90_policy = @sd_wannier90_policy@ +sd_wannier90_status = @sd_wannier90_status@ +sd_xmlf90_cppflags = @sd_xmlf90_cppflags@ +sd_xmlf90_enable = @sd_xmlf90_enable@ +sd_xmlf90_enable_def = @sd_xmlf90_enable_def@ +sd_xmlf90_fcflags = @sd_xmlf90_fcflags@ +sd_xmlf90_init = @sd_xmlf90_init@ +sd_xmlf90_ldflags = @sd_xmlf90_ldflags@ +sd_xmlf90_libs = @sd_xmlf90_libs@ +sd_xmlf90_ok = @sd_xmlf90_ok@ +sd_xmlf90_options = @sd_xmlf90_options@ +sd_xmlf90_policy = @sd_xmlf90_policy@ +sd_xmlf90_status = @sd_xmlf90_status@ +sd_yakl_cppflags = @sd_yakl_cppflags@ +sd_yakl_enable = @sd_yakl_enable@ +sd_yakl_enable_def = @sd_yakl_enable_def@ +sd_yakl_fcflags = @sd_yakl_fcflags@ +sd_yakl_init = @sd_yakl_init@ +sd_yakl_ldflags = @sd_yakl_ldflags@ +sd_yakl_libs = @sd_yakl_libs@ +sd_yakl_ok = @sd_yakl_ok@ +sd_yakl_options = @sd_yakl_options@ +sd_yakl_policy = @sd_yakl_policy@ +sd_yakl_status = @sd_yakl_status@ +sharedstatedir = @sharedstatedir@ +src_02_clib_fcflags = @src_02_clib_fcflags@ +src_10_defs_fcflags = @src_10_defs_fcflags@ +src_11_memory_mpi_fcflags = @src_11_memory_mpi_fcflags@ +src_12_hide_mpi_fcflags = @src_12_hide_mpi_fcflags@ +src_14_hidewrite_fcflags = @src_14_hidewrite_fcflags@ +src_16_hideleave_fcflags = @src_16_hideleave_fcflags@ +src_16_kokkos_toolbox_fcflags = @src_16_kokkos_toolbox_fcflags@ +src_17_gpu_toolbox_fcflags = @src_17_gpu_toolbox_fcflags@ +src_17_libtetra_ext_fcflags = @src_17_libtetra_ext_fcflags@ +src_17_minimax_fcflags = @src_17_minimax_fcflags@ +src_17_yaml_out_fcflags = @src_17_yaml_out_fcflags@ +src_18_timing_fcflags = @src_18_timing_fcflags@ +src_21_hashfuncs_fcflags = @src_21_hashfuncs_fcflags@ +src_27_toolbox_oop_fcflags = @src_27_toolbox_oop_fcflags@ +src_28_numeric_noabirule_fcflags = @src_28_numeric_noabirule_fcflags@ +src_29_kpoints_fcflags = @src_29_kpoints_fcflags@ +src_32_util_fcflags = @src_32_util_fcflags@ +src_33_xc_lowlevel_fcflags = @src_33_xc_lowlevel_fcflags@ +src_39_libpaw_fcflags = @src_39_libpaw_fcflags@ +src_41_geometry_fcflags = @src_41_geometry_fcflags@ +src_42_nlstrain_fcflags = @src_42_nlstrain_fcflags@ +src_42_parser_fcflags = @src_42_parser_fcflags@ +src_43_ptgroups_fcflags = @src_43_ptgroups_fcflags@ +src_43_wvl_wrappers_fcflags = @src_43_wvl_wrappers_fcflags@ +src_44_abitools_fcflags = @src_44_abitools_fcflags@ +src_44_abitypes_defs_fcflags = @src_44_abitypes_defs_fcflags@ +src_44_manage_kokkos_fcflags = @src_44_manage_kokkos_fcflags@ +src_45_geomoptim_fcflags = @src_45_geomoptim_fcflags@ +src_45_xgTools_fcflags = @src_45_xgTools_fcflags@ +src_46_ghc_omp_fcflags = @src_46_ghc_omp_fcflags@ +src_46_manage_cuda_fcflags = @src_46_manage_cuda_fcflags@ +src_48_diago_fcflags = @src_48_diago_fcflags@ +src_49_gw_toolbox_oop_fcflags = @src_49_gw_toolbox_oop_fcflags@ +src_51_manage_mpi_fcflags = @src_51_manage_mpi_fcflags@ +src_52_fft_mpi_noabirule_fcflags = @src_52_fft_mpi_noabirule_fcflags@ +src_53_ffts_fcflags = @src_53_ffts_fcflags@ +src_54_spacepar_fcflags = @src_54_spacepar_fcflags@ +src_55_abiutil_fcflags = @src_55_abiutil_fcflags@ +src_56_io_mpi_fcflags = @src_56_io_mpi_fcflags@ +src_56_mixing_fcflags = @src_56_mixing_fcflags@ +src_56_recipspace_fcflags = @src_56_recipspace_fcflags@ +src_56_xc_fcflags = @src_56_xc_fcflags@ +src_57_iopsp_parser_fcflags = @src_57_iopsp_parser_fcflags@ +src_57_iovars_fcflags = @src_57_iovars_fcflags@ +src_61_occeig_fcflags = @src_61_occeig_fcflags@ +src_62_cg_noabirule_fcflags = @src_62_cg_noabirule_fcflags@ +src_62_ctqmc_fcflags = @src_62_ctqmc_fcflags@ +src_62_iowfdenpot_fcflags = @src_62_iowfdenpot_fcflags@ +src_62_poisson_fcflags = @src_62_poisson_fcflags@ +src_62_wvl_wfs_fcflags = @src_62_wvl_wfs_fcflags@ +src_64_psp_fcflags = @src_64_psp_fcflags@ +src_65_lotf_base_fcflags = @src_65_lotf_base_fcflags@ +src_65_paw_fcflags = @src_65_paw_fcflags@ +src_66_nonlocal_fcflags = @src_66_nonlocal_fcflags@ +src_66_vdwxc_fcflags = @src_66_vdwxc_fcflags@ +src_66_wfs_fcflags = @src_66_wfs_fcflags@ +src_67_common_fcflags = @src_67_common_fcflags@ +src_67_python_invocation_ext_fcflags = @src_67_python_invocation_ext_fcflags@ +src_67_triqs_ext_fcflags = @src_67_triqs_ext_fcflags@ +src_68_dmft_fcflags = @src_68_dmft_fcflags@ +src_68_lotf_fcflags = @src_68_lotf_fcflags@ +src_68_recursion_fcflags = @src_68_recursion_fcflags@ +src_68_rsprc_fcflags = @src_68_rsprc_fcflags@ +src_69_wfdesc_fcflags = @src_69_wfdesc_fcflags@ +src_70_gw_fcflags = @src_70_gw_fcflags@ +src_71_bse_fcflags = @src_71_bse_fcflags@ +src_71_wannier_fcflags = @src_71_wannier_fcflags@ +src_72_response_fcflags = @src_72_response_fcflags@ +src_77_ddb_fcflags = @src_77_ddb_fcflags@ +src_77_suscep_fcflags = @src_77_suscep_fcflags@ +src_78_effpot_fcflags = @src_78_effpot_fcflags@ +src_78_eph_fcflags = @src_78_eph_fcflags@ +src_79_seqpar_mpi_fcflags = @src_79_seqpar_mpi_fcflags@ +src_80_rttddft_fcflags = @src_80_rttddft_fcflags@ +src_80_tdep_fcflags = @src_80_tdep_fcflags@ +src_94_scfcv_fcflags = @src_94_scfcv_fcflags@ +src_95_drive_fcflags = @src_95_drive_fcflags@ +src_common_fcflags = @src_common_fcflags@ +src_core_fcflags = @src_core_fcflags@ +src_libpaw_fcflags = @src_libpaw_fcflags@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +with_abinit_common = @with_abinit_common@ +with_bigdft = @with_bigdft@ +with_config_file = @with_config_file@ +with_debug_flavor = @with_debug_flavor@ +with_fallbacks = @with_fallbacks@ +with_fc_vendor = @with_fc_vendor@ +with_fc_version = @with_fc_version@ +with_fft_flavor = @with_fft_flavor@ +with_fftw3 = @with_fftw3@ +with_gnu_ld = @with_gnu_ld@ +with_gpu = @with_gpu@ +with_hdf5 = @with_hdf5@ +with_kokkos = @with_kokkos@ +with_levmar = @with_levmar@ +with_libpaw = @with_libpaw@ +with_libpsml = @with_libpsml@ +with_libxc = @with_libxc@ +with_libxml2 = @with_libxml2@ +with_linalg_flavor = @with_linalg_flavor@ +with_mpi = @with_mpi@ +with_mpi_level = @with_mpi_level@ +with_netcdf = @with_netcdf@ +with_optim_flavor = @with_optim_flavor@ +with_papi = @with_papi@ +with_pfft = @with_pfft@ +with_triqs = @with_triqs@ +with_wannier90 = @with_wannier90@ +with_xmlf90 = @with_xmlf90@ +with_yakl = @with_yakl@ +AM_CFLAGS = @ABI_CPPFLAGS@ +AM_CXXFLAGS = $(sd_triqs_cxxflags) +AM_FCFLAGS = @FPPFLAGS@ @FCFLAGS_FREEFORM@ @FCFLAGS_MODDIR@ @sd_sys_fcflags@ @fcflags_opt_17_yaml_out@ +AM_CPPFLAGS = \ + @src_10_defs_fcflags@ \ + @src_11_memory_mpi_fcflags@ \ + @src_14_hidewrite_fcflags@ \ + @src_16_hideleave_fcflags@ \ + @src_17_yaml_out_fcflags@ \ + @src_common_fcflags@ \ + @src_core_fcflags@ \ + @src_libpaw_fcflags@ \ + @fc_mod_fcflags@ + + +# Regular source files +lib17_yaml_out_srcs = \ + c_pair_list.c \ + m_type_pair_list.F90 \ + m_pair_list.F90 \ + m_stream_string.F90 \ + m_yaml.F90 + + +# Source files depending on conditionals + +# Library description +noinst_LIBRARIES = lib17_yaml_out.a +lib17_yaml_out_a_SOURCES = $(lib17_yaml_out_srcs) + +# Dependencies (inside the directory) of directory 17_yaml_out +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. +CLEANFILES = c_pair_list_cpp.c m_type_pair_list_cpp.f90 \ + m_pair_list_cpp.f90 m_stream_string_cpp.f90 m_yaml_cpp.f90 \ + m_pair_list.$(MODEXT) m_stream_string.$(MODEXT) \ + m_type_pair_list.$(MODEXT) m_yaml.$(MODEXT) +EXTRA_DIST = abinit.src abinit.dep +all: all-am + +.SUFFIXES: +.SUFFIXES: .F90 .c .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu shared/common/src/17_yaml_out/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu shared/common/src/17_yaml_out/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) + +lib17_yaml_out.a: $(lib17_yaml_out_a_OBJECTS) $(lib17_yaml_out_a_DEPENDENCIES) $(EXTRA_lib17_yaml_out_a_DEPENDENCIES) + $(AM_V_at)-rm -f lib17_yaml_out.a + $(AM_V_AR)$(lib17_yaml_out_a_AR) lib17_yaml_out.a $(lib17_yaml_out_a_OBJECTS) $(lib17_yaml_out_a_LIBADD) + $(AM_V_at)$(RANLIB) lib17_yaml_out.a + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c_pair_list.Po@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) + +.F90.o: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ $< + +.F90.obj: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -f ./$(DEPDIR)/c_pair_list.Po + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f ./$(DEPDIR)/c_pair_list.Po + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ + clean-generic clean-noinstLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am + +.PRECIOUS: Makefile + + +m_pair_list.$(OBJEXT): m_type_pair_list.$(OBJEXT) + +m_yaml.$(OBJEXT): m_pair_list.$(OBJEXT) m_stream_string.$(OBJEXT) + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/GX-PAW/common/src/17_yaml_out/README.md b/GX-PAW/common/src/17_yaml_out/README.md new file mode 100644 index 00000000..c78d3303 --- /dev/null +++ b/GX-PAW/common/src/17_yaml_out/README.md @@ -0,0 +1,8 @@ +# What is this + +Neat is the NEw Abinit Testing tool. In this folder are tools for use in Fortran to produce +structured data output. These data are to be used by the python side of the project in +smart testing. + +This folder is for lower level tools that handle conversion of data into YAML +document. diff --git a/GX-PAW/common/src/17_yaml_out/__pycache__/abinit.cpython-36.pyc b/GX-PAW/common/src/17_yaml_out/__pycache__/abinit.cpython-36.pyc new file mode 100644 index 00000000..06ab0e70 Binary files /dev/null and b/GX-PAW/common/src/17_yaml_out/__pycache__/abinit.cpython-36.pyc differ diff --git a/GX-PAW/common/src/17_yaml_out/abinit.dep b/GX-PAW/common/src/17_yaml_out/abinit.dep new file mode 100644 index 00000000..4ea338c5 --- /dev/null +++ b/GX-PAW/common/src/17_yaml_out/abinit.dep @@ -0,0 +1,15 @@ +# Dependencies (inside the directory) of directory 17_yaml_out +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. + +CLEANFILES += \ + m_pair_list.$(MODEXT) \ + m_stream_string.$(MODEXT) \ + m_type_pair_list.$(MODEXT) \ + m_yaml.$(MODEXT) + +m_pair_list.$(OBJEXT): m_type_pair_list.$(OBJEXT) + +m_yaml.$(OBJEXT): m_pair_list.$(OBJEXT) m_stream_string.$(OBJEXT) \ No newline at end of file diff --git a/GX-PAW/common/src/17_yaml_out/abinit.dir b/GX-PAW/common/src/17_yaml_out/abinit.dir new file mode 100644 index 00000000..acfee4a3 --- /dev/null +++ b/GX-PAW/common/src/17_yaml_out/abinit.dir @@ -0,0 +1,8 @@ +# Dependencies (outside the directory) of directory 17_yaml_out +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. + +include_dirs = \ +['10_defs', '11_memory_mpi', '14_hidewrite', '16_hideleave', '17_yaml_out'] \ No newline at end of file diff --git a/GX-PAW/common/src/17_yaml_out/abinit.src b/GX-PAW/common/src/17_yaml_out/abinit.src new file mode 100644 index 00000000..59aab1db --- /dev/null +++ b/GX-PAW/common/src/17_yaml_out/abinit.src @@ -0,0 +1,27 @@ +# -*- Python -*- +# +# Copyright (C) 2005-2024 ABINIT Group (Yann Pouillon) +# +# This file is part of the ABINIT software package. For license information, +# please see the COPYING file in the top-level directory of the ABINIT source +# distribution. +# + +# +# Source files making up the 70_gw library +# + +# Source file attributes +ABI_SRC_NIL = 0 # No attribute +ABI_SRC_BLT = 1 # The file is built by a script +ABI_SRC_DEP = 2 # The file depends on other files + +# Source files +sources = [ + "c_pair_list.c", + "m_type_pair_list.F90", + "m_pair_list.F90", + "m_stream_string.F90", + "m_yaml.F90", + ] +# IMPORTANT : please use the alphabetic order in the previous list. Do NOT add the new routine names at the end of the list. diff --git a/GX-PAW/common/src/17_yaml_out/c_pair_list.c b/GX-PAW/common/src/17_yaml_out/c_pair_list.c new file mode 100644 index 00000000..e7a5927f --- /dev/null +++ b/GX-PAW/common/src/17_yaml_out/c_pair_list.c @@ -0,0 +1,268 @@ +/* + * Author: Theo Cavignac + * Implementation of a simple linked pair list structure. + * Unless you really know what you are doing you probably should + * look at the Fortran interface instead: m_pair_list.F90 + * + * Possible improvement: + * - Add new type to be stored: it may worth it to implement the possibility to store numerical arrays + * - Optimise memory allocation: malloc is not super efficient on little chunks + */ +#include + +#include +#include +#include + +#include "abi_clib.h" + +#define FALSE 0 +#define TRUE 1 + +/* type codes */ +#define TC_EMPTY -2 +#define TC_NOTFOUND -1 +#define TC_INT 0 +#define TC_REAL 1 +#define TC_STRING 2 + +typedef uint8_t bool; + +typedef union { + int i; + double r; + char* s; +/* + int* iarr; + double* rarr; +*/ +} value; + +typedef struct Pair { + int8_t type_code; + char* key; + struct Pair* next; + value val; +} pair_t; + +typedef struct { + pair_t* first; + pair_t* cursor; + int length; +} pair_list; + +/* Lazy string comparision */ +static bool str_eq(char* s1, char* s2){ + while(*s1 && *s2){ + if(*s1 != *s2){ + return FALSE; + } + s1++; s2++; + } + return (*s1 | *s2) == 0; +} + +/* Fortran style to C style string + * return a new allocated pointer to the C string + */ +static char* ftoc_str(char* fstr, int length){ + int i; + char* cstr; + cstr = xmalloc((length+1)*sizeof(char)); + for(i = 0; i < length; i++){ + cstr[i] = fstr[i]; + } + cstr[length] = '\x00'; + return cstr; +} + +/* C style to Fortran style string + * fstr must be allocated and of size length + */ +static void ctof_str(char* fstr, char* cstr, int length){ + int c = 0; + while(cstr[c] != '\x00' && c < length){ + fstr[c] = cstr[c]; + c++; + } + while(c < length){ + fstr[c++] = ' '; + } +} + +/* Look for a given key, if found return FALSE and have + * selected point to the pair, else return TRUE, allocate a new pair + * and have selected point to it + */ +static bool get_or_create(pair_list* pl, char* ckey, pair_t** selected){ + if(pl->first){ + pair_t* prev = NULL; + pair_t* pair = pl->first; + + while(pair){ + if(str_eq(ckey, pair->key)){ + *selected = pair; + return FALSE; + } else { + prev = pair; + pair = pair->next; + } + } + pair_t* new_pair = xmalloc(sizeof(pair_t)); + new_pair->type_code = TC_EMPTY; + new_pair->key = ckey; + new_pair->next = NULL; + prev->next = new_pair; + *selected = new_pair; + return TRUE; + } else { /* first element of the list */ + pair_t* new_pair = xmalloc(sizeof(pair_t)); + new_pair->type_code = TC_EMPTY; + new_pair->key = ckey; + new_pair->next = NULL; + pl->first = new_pair; + pl->cursor = new_pair; + *selected = new_pair; + return TRUE; + } +} + +/* free a pair after freeing the next one */ +static void pair_free(pair_t* p){ + if(p){ + pair_free(p->next); + xfree(p->key); + if(p->type_code == TC_STRING){ + xfree(p->val.s); + } + xfree(p); + } +} + + +/* Visible from fortran */ + +/* set an integer value */ +void pair_list_seti(pair_list* l, char* fkey, int* i, int* len){ + pair_t* pair = NULL; + char* ckey = ftoc_str(fkey, *len); + bool is_new = get_or_create(l, ckey, &pair); + if(!is_new){ + xfree(ckey); + } else { + if(pair->type_code == TC_STRING){ + xfree(pair->val.s); + } + } + l->length += is_new; + pair->type_code = TC_INT; + pair->val.i = *i; +} + +/* set a real (double) value */ +void pair_list_setr(pair_list* l, char* fkey, double* r, int* len){ + pair_t* pair = NULL; + char* ckey = ftoc_str(fkey, *len); + bool is_new = get_or_create(l, ckey, &pair); + if(!is_new){ + xfree(ckey); + } else { + if(pair->type_code == TC_STRING){ + xfree(pair->val.s); + } + } + l->length += is_new; + pair->type_code = TC_REAL; + pair->val.r = *r; +} + +/* set a string value + */ +void pair_list_sets(pair_list* l, char* fkey, char* s, int* len, int* len_s){ + pair_t* pair = NULL; + char* ckey = ftoc_str(fkey, *len); + bool is_new = get_or_create(l, ckey, &pair); + if(!is_new){ + xfree(ckey); + } else { + if(pair->type_code == TC_STRING){ + xfree(pair->val.s); + } + } + l->length += is_new; + pair->type_code = TC_STRING; + pair->val.s = ftoc_str(s, *len_s); +} + +/* get a value from a key */ +void pair_list_get_(pair_list* l, char* fkey, int* type_code, int*i, double* r, char* s, int* len, int* len_s){ + if(!l->first){ + /* list is empty */ + *type_code = TC_EMPTY; + return; + } else { + char* ckey = ftoc_str(fkey, *len); + pair_t* pair = l->first; + while(pair){ + if(str_eq(pair->key, ckey)){ + *type_code = pair->type_code; + switch(pair->type_code){ + case TC_REAL: + *r = pair->val.r; + break; + case TC_INT: + *i = pair->val.i; + break; + case TC_STRING: + ctof_str(s, pair->val.s, *len_s); + break; + } + break; + } else { + pair = pair->next; + } + } + if(!pair){ + /* key not found */ + *type_code = TC_NOTFOUND; + } + xfree(ckey); + } +} + +/* move the cursor forward in the chain + */ +void pair_list_next(pair_list* pl){ + pl->cursor = pl->cursor->next; +} + +/* free the whole chained list */ +void pair_list_free(pair_list* pl){ + pair_free(pl->first); + pl->first = NULL; + pl->cursor = NULL; + pl->length = 0; +} + +/* Return the pair pointed by the cursor */ +void pair_list_look_(pair_list* pl, char* fkey, int* type_code, int* i, double* r, char* s, int* len, int* len_s){ + pair_t* p = pl->cursor; + if(p){ + *type_code = p->type_code; + switch(p->type_code){ + case TC_REAL: + *r = p->val.r; + break; + case TC_INT: + *i = p->val.i; + break; + case TC_STRING: + ctof_str(s, p->val.s, *len_s); + break; + } + ctof_str(fkey, p->key, *len); + } else { + /* reached end of list */ + *type_code = TC_EMPTY; + } +} diff --git a/GX-PAW/common/src/17_yaml_out/c_pair_list.o b/GX-PAW/common/src/17_yaml_out/c_pair_list.o new file mode 100644 index 00000000..d918ef20 Binary files /dev/null and b/GX-PAW/common/src/17_yaml_out/c_pair_list.o differ diff --git a/GX-PAW/common/src/17_yaml_out/lib17_yaml_out.a b/GX-PAW/common/src/17_yaml_out/lib17_yaml_out.a new file mode 100644 index 00000000..3da3b91e Binary files /dev/null and b/GX-PAW/common/src/17_yaml_out/lib17_yaml_out.a differ diff --git a/GX-PAW/common/src/17_yaml_out/m_pair_list.F90 b/GX-PAW/common/src/17_yaml_out/m_pair_list.F90 new file mode 100644 index 00000000..7b948d42 --- /dev/null +++ b/GX-PAW/common/src/17_yaml_out/m_pair_list.F90 @@ -0,0 +1,500 @@ +!!****m* ABINIT/m_pair_list +!! NAME +!! m_pair_list +!! +!! FUNCTION +!! This module defines an API to build +!! dictionaries containing string keys and numeric or string values. +!! It is implemented in C as a simple linked pair list (associative list). +!! +!! COPYRIGHT +!! Copyright (C) 2009-2024 ABINIT group (TC, MG) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! NOTES +!! This module provide an implementation of a pair list +!! Possible improvement: +!! - Simplify the usage of get by removing the limit in key and string size +!! - Simplify the usage of get by removing the need for variable for all possible +!! content when you know what is stored +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" + +module m_pair_list + + use, intrinsic :: iso_c_binding + use m_type_pair_list + use m_errors + + use m_fstrings, only : sjoin, itoa + + implicit none + + ! Similar constants used in C code. + integer,public,parameter :: TC_EMPTY=-2, TC_NOTFOUND=-1, TC_INT=0, TC_REAL=1, TC_STRING=2 + + private + public :: pair_list_set, pair_list_get, pair_list_free + public :: pair_list_next, pair_list_look, pair_list_iter, pair_list_restart + public :: pair_list + + type :: pair_list + type(c_pair_list) :: plc + contains + procedure :: set => pair_list_set + procedure :: set_keys => pair_list_set_keys + procedure :: set_keys_to_null => pair_list_set_keys_to_null + procedure :: get => pair_list_get + procedure :: free => pair_list_free + procedure :: next => pair_list_next + procedure :: look => pair_list_look + procedure :: iter => pair_list_iter + procedure :: restart => pair_list_restart + procedure :: length => pair_list_length + procedure :: increment => pair_list_increment + end type pair_list + +! ------------------------------------------------------------------------------- +! - - +! - Private C function binding - +! - - +! ------------------------------------------------------------------------------- + interface + + subroutine pair_list_next_c(pl) bind(C, name="pair_list_next") + use m_type_pair_list + type(c_pair_list),intent(in) :: pl + end subroutine pair_list_next_c + + subroutine pair_list_free_c(pl) bind(C, name="pair_list_free") + use m_type_pair_list + type(c_pair_list),intent(inout) :: pl + end subroutine pair_list_free_c + + subroutine pair_list_seti(pl, key, i, len) bind(C, name="pair_list_seti") + use m_type_pair_list + type(c_pair_list) :: pl + character(kind=c_char) :: key(*) + integer(kind=c_int) :: i, len + end subroutine pair_list_seti + + subroutine pair_list_setr(pl, key, r, len) bind(C, name="pair_list_setr") + use m_type_pair_list + type(c_pair_list) :: pl + character(kind=c_char) :: key(*) + integer(kind=c_int) :: len + real(kind=c_double) :: r + end subroutine pair_list_setr + + subroutine pair_list_sets(pl, key, s, len, len_s) bind(C, name="pair_list_sets") + use m_type_pair_list + type(c_pair_list) :: pl + character(kind=c_char) :: key(*), s(*) + integer(kind=c_int) :: len, len_s + real(kind=c_double) :: r + end subroutine pair_list_sets + + subroutine pair_list_get_c(pl, key, type_code, i, r, s, len, len_s) bind(C, name="pair_list_get_") + use m_type_pair_list + type(c_pair_list) :: pl + character(kind=c_char) :: key(*), s(*) + integer(kind=c_int) :: i, type_code, len, len_s + real(kind=c_double) :: r + end subroutine pair_list_get_c + + subroutine pair_list_look_c(pl, key, type_code, i, r, s, len, len_s) bind(C, name="pair_list_look_") + use m_type_pair_list + type(c_pair_list) :: pl + integer(kind=c_int) :: type_code, i, len, len_s + character(kind=c_char) :: key(len), s(len_s) + real(kind=c_double) :: r + end subroutine pair_list_look_c + + end interface + +! ------------------------------------------------------------------------------- +! - - +! - Pure Fortran Wrapper - +! - - +! ------------------------------------------------------------------------------- + contains +!!*** + +!!****f* m_pair_list/pair_list_length +!! NAME +!! pair_list_length +!! +!! FUNCTION +!! REturn the number of items stored in pl +!! +!! INPUTS +!! pl = +!! +!! OUTPUT +!! +!! SOURCE + +function pair_list_length(pl) result(length) + class(pair_list),intent(in) :: pl + integer :: length + length = pl%plc%length +end function pair_list_length +!!*** + +!!****f* m_pair_list/pair_list_get +!! NAME +!! pair_list_get +!! +!! FUNCTION +!! Get the value associated with a key, only one of i and r is modified +!! +!! INPUTS +!! pl = +!! key = +!! s = +!! +!! OUTPUT +!! i = +!! type_code = +!! 0 if the value was an integer (and so that i is setted) +!! 1 if the value was a real number (and so that r is setted) +!! 2 if the value was a string (and so that s is setted) +!! -1 if the key was not present (neither i nor r are setted) +!! -2 if the list is empty (neither i nor r are setted) +!! r = +!! +!! SOURCE + +subroutine pair_list_get(pl, key, type_code, i, r, s) + class(pair_list),intent(in) :: pl + character(kind=c_char,len=*),intent(in) :: key, s + integer(kind=c_int),intent(out) :: i, type_code + real(kind=c_double),intent(out) :: r + call pair_list_get_c(pl%plc, trim(key), type_code, i, r, s, len_trim(key), len(s)) +end subroutine pair_list_get +!!*** + +!!****f* m_pair_list/pair_list_look +!! NAME +!! pair_list_look +!! +!! FUNCTION +!! pair_list has a cursor which point onto an arbitrary element +!! of the list. pair_list_look allow to extract the key-value pair from +!! that element +!! +!! If key is shorter than the actual key of the pair, only available space +!! is used resulting in truncated key +!! If key is longer than the actual key remaining space is filled with spaces +!! +!! INPUTS +!! pl = +!! +!! OUTPUT +!! key = +!! s = +!! type_code = +!! 1 if the value was a real number (and so that r is setted) +!! 0 if the value was an integer (and so that i is setted) +!! -2 if the cursor is null (list is empty or end have been reached) +!! i = +!! r = +!! +!! SOURCE + +subroutine pair_list_look(pl, key, type_code, i, r, s) + use m_type_pair_list + class(pair_list),intent(in) :: pl + character(kind=c_char,len=*),intent(out) :: key, s + integer(kind=c_int),intent(out) :: type_code, i + real(kind=c_double),intent(out) :: r + call pair_list_look_c(pl%plc, key, type_code, i, r, s, len(key), len(s)) +end subroutine pair_list_look +!!*** + +!!****f* m_pair_list/pair_list_next +!! NAME +!! pair_list_next +!! +!! FUNCTION +!! have the cursor (cf: pair_list_look) moving forward of one element. +!! +!! INPUTS +!! pl = +!! +!! OUTPUT +!! +!! SOURCE + subroutine pair_list_next(pl) + class(pair_list),intent(in) :: pl + call pair_list_next_c(pl%plc) + end subroutine pair_list_next +!!*** + +!!****f* m_pair_list/pair_list_free +!! NAME +!! pair_list_free +!! +!! FUNCTION +!! free memory occupied by the list (not the pair_list variable itself !) +!! and reset the pair_list variable (it can be reused as an empty list) +!! +!! SOURCE + +subroutine pair_list_free(pl) + + class(pair_list),intent(inout) :: pl + call pair_list_free_c(pl%plc) + +end subroutine pair_list_free +!!*** + +!!****f* m_pair_list/pair_list_set +!! NAME +!! pair_list_set +!! +!! FUNCTION +!! set a key-value par into the list. If the key is already present, the +!! corresponding pair is updated. If not the pair is created. +!! Only one of i and r should be provided (i is the default if both are +!! provided). Nothing happen if none of them are provided. +!! +!! INPUTS +!! pl = +!! key = +!! i =optional +!! r =optional +!! s =optional +!! +!! OUTPUT +!! +!! SOURCE + +subroutine pair_list_set(pl, key, i, r, s) + + class(pair_list),intent(in) :: pl + character(len=*),intent(in) :: key + integer,intent(in),optional :: i + real(kind=c_double),intent(in),optional :: r + character(len=*),intent(in),optional :: s + + if (present(i)) then + call pair_list_seti(pl%plc, trim(key), i, len_trim(key)) + else if (present(r)) then + call pair_list_setr(pl%plc, trim(key), r, len_trim(key)) + else if (present(s)) then + call pair_list_sets(pl%plc, trim(key), s, len_trim(key), len_trim(s)) + end if + +end subroutine pair_list_set +!!*** + +!!****f* m_pair_list/pair_list_set_keys +!! NAME +!! pair_list_set_keys +!! +!! FUNCTION +!! Set the value of a list of comma-separated keys. +!! +!! Example +!! +!! d%set_keys("foo, bar", ivals=[1, 2]) +!! +!! INPUTS +!! pl = +!! keylist = +!! i =optional +!! r =optional +!! s =optional +!! +!! OUTPUT +!! +!! SOURCE + +subroutine pair_list_set_keys(pl, keylist, ivals, rvals) !, svals) + + class(pair_list),intent(in) :: pl + character(len=*),intent(in) :: keylist + integer,intent(in),optional :: ivals(:) + real(kind=c_double),intent(in),optional :: rvals(:) + !character(len=*),intent(in),optional :: svals(:) + +!Local variables------------------------------- + integer :: i, n, start, stp + character(len=len(keylist)) :: key +! ************************************************************************* + + n = 1 + do i=1,len_trim(keylist) + if (keylist(i:i) == ",") n = n + 1 + end do + + start = 1 + do i=1,n + stp = index(keylist(start:), ",") + if (stp == 0) then + key = keylist(start:) + else + key = keylist(start: start + stp - 2) + start = start + stp + ABI_CHECK(start < len_trim(keylist), sjoin("Invalid keylist:", keylist)) + end if + key = adjustl(key) + + if (present(ivals)) then + ABI_CHECK(size(ivals) == n, "size(ivals) != n") + call pair_list_seti(pl%plc, trim(key), ivals(i), len_trim(key)) + + else if (present(rvals)) then + ABI_CHECK(size(rvals) == n, "size(rvals) != n") + call pair_list_setr(pl%plc, trim(key), rvals(i), len_trim(key)) + + !else if (present(svals)) then + ! TODO: Pass single string with comma-separated tokens. + ! ABI_CHECK(size(svals) == n, "size(svals) != n") + ! call pair_list_sets(pl%plc, trim(key), svals(i), len_trim(key), len_trim(svals(i))) + end if + end do + +end subroutine pair_list_set_keys +!!*** + +!!****f* m_pair_list/pair_list_set_keys_to_null +!! NAME +!! pair_list_set_keys_to_null +!! +!! FUNCTION +!! Set the value of a list of comma-separated keys to null +!! +!! Example: +!! +!! dict%set_keys_to_null("foo, bar") +!! +!! INPUTS +!! keylist: List of comma-separated keys +!! +!! SOURCE + +subroutine pair_list_set_keys_to_null(pl, keylist) + + class(pair_list),intent(in) :: pl + character(len=*),intent(in) :: keylist + +!Local variables------------------------------- + integer :: start, stp +! ************************************************************************* + + start = 1 + do + stp = index(keylist(start:), ",") + if (stp == 0) then + call pl%set(adjustl(trim(keylist(start:))), s="null") + exit + else + call pl%set(adjustl(trim(keylist(start:start+stp-2))), s="null") + start = start + stp + ABI_CHECK(start < len_trim(keylist), sjoin("Invalid keylist:", keylist)) + end if + end do + +end subroutine pair_list_set_keys_to_null +!!*** + +!!****f* m_pair_list/pair_list_restart +!! NAME +!! pair_list_restart +!! +!! FUNCTION +!! have the cursor going back to the first element (cf: pair_list_next) +!! +!! SOURCE + +subroutine pair_list_restart(pl) + + class(pair_list),intent(inout) :: pl + pl%plc%cursor = pl%plc%first; + +end subroutine pair_list_restart +!!*** + +!!****f* m_pair_list/pair_list_iter +!! NAME +!! pair_list_iter +!! +!! FUNCTION +!! equivalent to pair_list_look followed by pair_list_next +!! +!! INPUTS +!! pl = +!! +!! OUTPUT +!! key = +!! type_code = +!! i = +!! r = +!! s = +!! +!! SOURCE + +subroutine pair_list_iter(pl, key, type_code, i, r, s) + + class(pair_list),intent(in) :: pl + character(len=*),intent(out) :: key + integer,intent(out) :: type_code + integer,intent(out) :: i + real(kind=c_double),intent(out) :: r + character(len=*),intent(out) :: s + + call pair_list_look(pl, key, type_code, i, r, s) + if(type_code >= 0) call pair_list_next_c(pl%plc) + +end subroutine pair_list_iter +!!*** + +!!****f* m_pair_list/pair_list_increment +!! NAME +!! pair_list_increment +!! +!! FUNCTION +!! Increment integer value. Create key if not already present. +!! +!! INPUTS +!! pl = +!! key = +!! cnt=Increment +!! +!! SOURCE + +subroutine pair_list_increment(pl, key, cnt) + + class(pair_list),intent(in) :: pl + character(len=*),intent(in) :: key + integer,intent(in) :: cnt + + integer(kind=c_int) :: i, type_code + real(kind=c_double) :: r + character(kind=c_char,len=500) :: s + + call pair_list_get(pl, key, type_code, i, r, s) + select case (type_code) + case (TC_EMPTY, TC_NOTFOUND) + call pair_list_set(pl, key, i=cnt) + case (TC_INT) + call pair_list_set(pl, key, i=cnt + i) + case default + ABI_ERROR(sjoin("Expecting value in dict of integer type. got:", itoa(type_code))) + end select + +end subroutine pair_list_increment +!!*** + +end module m_pair_list +!!*** diff --git a/GX-PAW/common/src/17_yaml_out/m_pair_list.o b/GX-PAW/common/src/17_yaml_out/m_pair_list.o new file mode 100644 index 00000000..29fa86c5 Binary files /dev/null and b/GX-PAW/common/src/17_yaml_out/m_pair_list.o differ diff --git a/GX-PAW/common/src/17_yaml_out/m_stream_string.F90 b/GX-PAW/common/src/17_yaml_out/m_stream_string.F90 new file mode 100644 index 00000000..9e2290fa --- /dev/null +++ b/GX-PAW/common/src/17_yaml_out/m_stream_string.F90 @@ -0,0 +1,383 @@ +!!****m* ABINIT/m_stream_string +!! NAME +!! m_stream_string +!! +!! FUNCTION +!! This module define a type representing a variable size +!! string. It can be used in a file-like way by writing to it or reading it. +!! Memory is automatically allocated on writing and freed on reading. +!! +!! COPYRIGHT +!! Copyright (C) 2009-2024 ABINIT group (TC, MG) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! NOTES +!! Provide tools to manipulate variable size strings in an incremental FIFO way +!! Use `stream%push` to incrementally fill the string. The required memory space will be allocated +!! automatically when needed. +!! To avoid memory leaks you have to use stream_free on the stream to free the memory space unless +!! you already flushed it using stream%flush, stream%transfer, stream%to_string or stream%to_file. +!! Unlike the last four methods, stream_copy and stream_debug do not modify the source stream +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" + +module m_stream_string + + use defs_basis + use m_profiling_abi + + use m_fstrings, only : prep_char !, replace + + implicit none + + private + + integer,public,parameter :: chunk_size = 248 + + type,private :: stream_chunk + type(stream_chunk), pointer :: next => null() + character(len=chunk_size) :: chunk = repeat(' ', chunk_size) + end type stream_chunk + + type,public :: stream_string + integer :: length = 0 + type(stream_chunk), pointer :: head => null() + contains + procedure :: flush => stream_flush_unit + procedure :: flush_units => stream_flush_units + procedure :: free => stream_free + procedure :: copy => stream_copy + procedure :: push => stream_push + procedure :: pop_chunk => stream_pop_chunk + procedure :: to_string => stream_to_string + procedure :: to_file => stream_to_file + procedure :: transfer => stream_transfer + procedure :: debug => stream_debug + + end type stream_string + +contains +!!*** + +subroutine stream_flush_unit(stream, unit, newline, firstchar) + + class(stream_string),intent(inout) :: stream + integer,intent(in) :: unit + logical,optional,intent(in) :: newline + character(len=*),optional,intent(in) :: firstchar + + character(len=stream%length) :: s + character(len=2 * stream%length) :: new_s + + if (unit == dev_null) then + call stream%free() + return + end if + + call stream%to_string(s) + + if (present(firstchar)) then + !new_s = trim(firstchar) // trim(replace(trim(s), ch10, ch10//trim(firstchar))) + new_s = prep_char(s, firstchar) + write(unit, "(a)")trim(new_s) + else +#if defined FC_NVHPC || defined FC_LLVM + write(unit, "(a)") s +#else + write(unit, "(a)") trim(s) +#endif + end if + + if (present(newline)) then + if (newline) write(unit, "(a)")"" + end if + + call stream%free() + +end subroutine stream_flush_unit + + +subroutine stream_flush_units(stream, units, newline) + + class(stream_string),intent(inout) :: stream + integer,intent(in) :: units(:) + logical,optional,intent(in) :: newline + +!Local variables------------------------------- +!scalars + integer :: ii, cnt + character(len=stream%length) :: s +!arrays + integer :: my_units(size(units)) + +!****************************************************************** + + ! Remove duplicated units (if any) + my_units(1) = units(1); cnt = 1 + do ii=2,size(units) + if (any(units(ii) == my_units(1:cnt))) cycle + cnt = cnt + 1 + my_units(cnt) = units(ii) + end do + + call stream%to_string(s) + + do ii=1,cnt + if (units(ii) == dev_null) cycle + write(units(ii), "(a)")trim(s) + if (present(newline)) then + if (newline) write(units(ii), "(a)")"" + end if + end do + + call stream%free() + +end subroutine stream_flush_units + +!!****f* m_stream_string/stream_free +!! NAME +!! stream_free +!! +!! FUNCTION +!! free stream. Most of the time this is not needed since +!! routines to access the content free the stream +!! +!! SOURCE + +subroutine stream_free(stream) + + class(stream_string),intent(inout) :: stream + type(stream_chunk), pointer :: cursor, prev + cursor => stream%head + do while (associated(cursor)) + prev => cursor + cursor => cursor%next + ABI_FREE_SCALAR(prev) + end do + stream%head => NULL() + stream%length = 0 + +end subroutine stream_free +!!*** + +!!****f* m_stream_string/stream_copy +!! NAME +!! stream_copy +!! +!! FUNCTION +!! copy src content to dest without altering src +!! +!! SOURCE + +subroutine stream_copy(src, dest) + class(stream_string),intent(inout) :: src, dest + type(stream_chunk), pointer :: cursor + cursor => src%head + do while (associated(cursor)) + call dest%push(cursor%chunk) + cursor => cursor%next + end do +end subroutine stream_copy +!!*** + +!!****f* m_stream_string/stream_push +!! NAME +!! stream_push +!! +!! FUNCTION +!! Write string to stream, allocating memory if needed +!! +!! SOURCE + +subroutine stream_push(stream, string) + class(stream_string),intent(inout) :: stream + character(len=*),intent(in) :: string + integer :: offset, room_left, soffset + type(stream_chunk), pointer :: cursor + + offset = stream%length + + if (.not.associated(stream%head)) then + ABI_MALLOC_SCALAR(stream%head) + end if + cursor => stream%head + + do while(offset > chunk_size) + cursor => cursor%next + offset = offset - chunk_size + end do + + room_left = chunk_size - offset + if (room_left < len(string)) then + cursor%chunk(offset+1:chunk_size) = string(1:room_left) + soffset = room_left + do while (soffset < len(string)) + ABI_MALLOC_SCALAR(cursor%next) + cursor%next%chunk(1:min(chunk_size, len(string)-soffset)) = & + string(soffset+1:min(soffset+chunk_size,len(string))) + cursor => cursor%next + soffset = soffset + chunk_size + end do + else + cursor%chunk(offset+1:offset+len(string)) = string + end if + stream%length = stream%length + len(string) + +end subroutine stream_push +!!*** + +!!****f* m_stream_string/stream_pop_chunk +!! NAME +!! stream_pop_chunk +!! +!! FUNCTION +!! Remove the last chunk of stream an put its content in string +!! +!! SOURCE + +subroutine stream_pop_chunk(stream, string) + class(stream_string),intent(inout) :: stream + character(len=chunk_size),intent(out) :: string + type(stream_chunk),pointer :: cursor + + string = stream%head%chunk + if (stream%length > chunk_size) then + ! copy the next pointer + cursor => stream%head%next + ! have next pointing to nothing + stream%head%next => NULL() + ! free head + ABI_FREE_SCALAR(stream%head) + stream%head => cursor + stream%length = stream%length - chunk_size + else + ABI_FREE_SCALAR(stream%head) + stream%length = 0 + end if + +end subroutine stream_pop_chunk +!!*** + +!!****f* m_stream_string/stream_to_string +!! NAME +!! stream_to_string +!! +!! FUNCTION +!! Copy the content of stream to string, freeing stream. String must be large enough +!! +!! SOURCE + +subroutine stream_to_string(stream, string) + + class(stream_string),intent(inout) :: stream + character(len=*),intent(out) :: string + character(len=chunk_size) :: stmp + integer :: offset, length + offset = 0 + + string = repeat(' ', len(string)) + do while (stream%length > 0) + length = stream%length + call stream%pop_chunk(stmp) + string(offset+1:offset+min(length, chunk_size)) = stmp(1:min(length, chunk_size)) + offset = offset + chunk_size + end do + +end subroutine stream_to_string +!!*** + +!!****f* m_stream_string/stream_to_file +!! NAME +!! stream_to_file +!! +!! FUNCTION +!! Write the content of stream to the file, freeing stream +!! +!! SOURCE + +subroutine stream_to_file(stream, file_d) + class(stream_string),intent(inout) :: stream + integer,intent(in) :: file_d + character(len=chunk_size) :: stmp + integer :: offset, length + offset = 0 + + do while (stream%length > 0) + length = stream%length + call stream%pop_chunk(stmp) + write(file_d, '(A)', advance='no') stmp(1:min(length, chunk_size)) + offset = offset + chunk_size + end do + +end subroutine stream_to_file +!!*** + +!!****f* m_stream_string/stream_transfer +!! NAME +!! stream_transfer +!! +!! FUNCTION +!! Copy the content of src to dest, freeing src +!! If possible does not reallocate memory and just have +!! dest point to src content +!! +!! SOURCE + +subroutine stream_transfer(src, dest) + class(stream_string),intent(inout) :: src, dest + character(len=chunk_size) :: chunk + integer :: length + if(.not.associated(dest%head)) then + ! if possible just transfer the pointer + dest%head => src%head + dest%length = src%length + src%head => NULL() + else + do while (src%length > 0) + length = src%length + call src%pop_chunk(chunk) + if(length > chunk_size) then + call dest%push(chunk) + else + call dest%push(chunk(1:length)) + end if + end do + end if + +end subroutine stream_transfer +!!*** + +!!****f* m_stream_string/stream_debug +!! NAME +!! stream_debug +!! +!! FUNCTION +!! Show the content of the chunks on stdout +!! +!! SOURCE + +subroutine stream_debug(src) + class(stream_string),intent(inout) :: src + type(stream_chunk), pointer :: cursor + integer :: c + cursor => src%head + c = 1 + do while (associated(cursor)) + write(std_out,*) "Chunk no", c + write(std_out,'(A)') cursor%chunk + cursor => cursor%next + c = c + 1 + end do +end subroutine stream_debug +!!*** + +end module m_stream_string +!!*** diff --git a/GX-PAW/common/src/17_yaml_out/m_stream_string.o b/GX-PAW/common/src/17_yaml_out/m_stream_string.o new file mode 100644 index 00000000..cb5bbad4 Binary files /dev/null and b/GX-PAW/common/src/17_yaml_out/m_stream_string.o differ diff --git a/GX-PAW/common/src/17_yaml_out/m_type_pair_list.F90 b/GX-PAW/common/src/17_yaml_out/m_type_pair_list.F90 new file mode 100644 index 00000000..3c44692f --- /dev/null +++ b/GX-PAW/common/src/17_yaml_out/m_type_pair_list.F90 @@ -0,0 +1,37 @@ +!!****m* ABINIT/m_type_pair_list +!! NAME +!! m_pair_list +!! +!! FUNCTION +!! This module define the interface to the C implementation +!! of pair_list. See m_pair_list. +!! +!! COPYRIGHT +!! Copyright (C) 2009-2024 ABINIT group (TC, MG) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! NOTES +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +module m_type_pair_list + use, intrinsic :: iso_c_binding +! type c_pair_list +! Represent a list of key-value pairs value can be either +! integer, double precision real or string. +! Never manipulate member directly or you will corrupt +! data. Use routines of m_pair_list instead + type, bind(C) :: c_pair_list + type(c_ptr) :: first = C_NULL_PTR + type(c_ptr) :: cursor = C_NULL_PTR + integer(c_int) :: length = 0 + end type c_pair_list + contains +end module m_type_pair_list +!!*** diff --git a/GX-PAW/common/src/17_yaml_out/m_type_pair_list.o b/GX-PAW/common/src/17_yaml_out/m_type_pair_list.o new file mode 100644 index 00000000..f220409e Binary files /dev/null and b/GX-PAW/common/src/17_yaml_out/m_type_pair_list.o differ diff --git a/GX-PAW/common/src/17_yaml_out/m_yaml.F90 b/GX-PAW/common/src/17_yaml_out/m_yaml.F90 new file mode 100644 index 00000000..3c66ba90 --- /dev/null +++ b/GX-PAW/common/src/17_yaml_out/m_yaml.F90 @@ -0,0 +1,1889 @@ +!!****m* ABINIT/m_yaml +!! NAME +!! m_yaml +!! +!! FUNCTION +!! This module defines low-level routines to format data into YAML documents. +!! Supported data include numeric arrays of one and two dimensions, +!! strings, numbers, dictionaries from m_pair_list and 1D arrays of dictionaries. +!! +!! COPYRIGHT +!! Copyright (C) 2009-2024 ABINIT group (TC, MG) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" + +module m_yaml + + use defs_basis +#ifdef HAVE_FC_IEEE_ARITHMETIC + use ieee_arithmetic +#endif + use m_errors + use m_pair_list + use m_stream_string + + use m_fstrings, only : sjoin, char_count, itoa, sjoin + use m_io_tools, only : is_open + + implicit none + + private +!!*** + +!---------------------------------------------------------------------- + +!!****t* m_yaml/yamldoc_t +!! NAME +!! yamldoc_t +!! +!! FUNCTION +!! High-level API to write (simple) Yaml documents. +!! +!! SOURCE + + type,public :: yamldoc_t + + integer :: default_keysize = 30 + ! Default key size + + integer :: default_stringsize = 500 + ! Default string size + + integer :: default_width = 0 + ! impose a minimum width of the field name side of the column (padding with spaces) + + integer :: default_multiline_trig = 8 + ! minimum number of elements before switching to multiline representation. + + character(len=20) :: default_ifmt = '(I0)' + ! Default format for integer + + character(len=20) :: default_rfmt = '(ES16.8)' + ! Default format for real + + character(len=20) :: default_kfmt = "(A)" + ! Default format for keys + + character(len=20) :: default_sfmt = "(A)" + ! Default format for strings + + type(stream_string) :: stream + ! Stream object used to build yaml string. + + contains + + procedure :: write_and_free => yamldoc_write_unit_and_free + ! Write Yaml document to unit and free memory. + + procedure :: write_units_and_free => yamldoc_write_units_and_free + ! Write Yaml document to a list of units and free memory. + + procedure :: add_real => yamldoc_add_real + ! Add a real number field to a document + + procedure :: add_reals => yamldoc_add_reals + ! Add a list of real number fields to a document + + procedure :: add_paired_real2d => yamldoc_add_paired_real2d + ! Add a field containing two 2D array of real numbers with the same shape. + + procedure :: add_int => yamldoc_add_int + ! Add an integer field to a document + + procedure :: add_ints => yamldoc_add_ints + ! Add a list of integers to a document + + procedure :: add_string => yamldoc_add_string + ! Add a string field to a document + + procedure :: add_real1d => yamldoc_add_real1d + ! Add a field containing a 1D array of real numbers + + procedure :: add_real2d => yamldoc_add_real2d + ! Add a field containing a 2D real number array + + procedure :: add_int1d => yamldoc_add_int1d + ! Add a field containing a 1D integer array + + procedure :: add_int2d => yamldoc_add_int2d + ! Add a field containing a 2D integer array + + !procedure :: add_tabular => yamldoc_add_tabular + ! Add a field with a complete table data + + procedure :: open_tabular => yamldoc_open_tabular + ! Open a field for tabular data + + procedure :: add_tabular_line => yamldoc_add_tabular_line + ! Add a line of tabular data in an already opened table field + + procedure :: add_dict => yamldoc_add_dict + ! Add a field containing a dictionary/pair_list + + procedure :: add_dictlist => yamldoc_add_dictlist + ! Add a field containing a list of dictionaries/array of pair_list + + procedure :: set_keys_to_string => yamldoc_set_keys_to_string + ! Set all keys to a common (string) value + + end type yamldoc_t +!!*** + + public :: yamldoc_open + ! Open a yaml document + + public :: yaml_single_dict + ! Create a full document from a single dictionary + + public :: yaml_write_dict + ! Write a dictionary in a Yaml document. + + public :: yaml_iterstart + ! Set the value of the iteration indices used to build the iteration_state dict in the Yaml documents + + character(len=1),parameter :: eol = char(10) + + ! This is a list of reserved_keywords that shall not be used as keys in Yaml dictionaries. + character(len=12),parameter :: reserved_keywords(10) = [character(len=12) :: & + "tol_abs", "tol_rel", "tol_vec", "tol_eq", "ignore", & + "ceil", "equation", "equations", "callback", "callbacks"] + + ! Global variables used to save the iteration state in Abinit. + ! Set by yaml_iterstart + integer,public,save,protected :: DTSET_IDX = -1 + integer,public,save,protected :: TIMIMAGE_IDX = -1 + integer,public,save,protected :: IMAGE_IDX = -1 + integer,public,save,protected :: ITIME_IDX = -1 + integer,public,save,protected :: ICYCLE_IDX = -1 + + integer,parameter,private :: MAGIC_IGNORE_INT = huge(0) - 1 + real(dp),parameter,private :: MAGIC_IGNORE_REAL = huge(one) - one + +contains + +!!****f* m_yaml/yaml_iterstart +!! NAME +!! yaml_iterstart +!! +!! FUNCTION +!! Mark the start of an iteration named by label and numbered by file +!! +!! INPUTS +!! label=key name +!! val=value +!! [newline] = set to false to prevent adding newlines after fields +!! +!! SOURCE + +subroutine yaml_iterstart(label, val, unit, use_yaml, newline) + +!Arguments ------------------------------------ + integer,intent(in) :: val, unit, use_yaml + character(len=*),intent(in) :: label + logical,intent(in),optional :: newline + +!Local variables------------------------------- + character(len=6) :: tmp_i + logical :: nl + type(stream_string) :: stream +! ************************************************************************* + + select case (label) + case ("dtset") + DTSET_IDX = val + TIMIMAGE_IDX = -1 + IMAGE_IDX = -1 + ITIME_IDX = -1 + ICYCLE_IDX = -1 + case ("timimage") + TIMIMAGE_IDX = val + case ("image") + IMAGE_IDX = val + case ("itime") + ITIME_IDX = val + case ("icycle") + ICYCLE_IDX = val + case default + ABI_ERROR(sjoin("Invalid value for label:", label)) + end select + + if (use_yaml == 1) then + if (unit == dev_null .or. .not. is_open(unit)) return + ABI_DEFAULT(nl, newline, .true.) + write(tmp_i, '(I6)') val + call stream%push('--- !IterStart'//eol//label//':'//tmp_i//eol//'...') + if (nl) call stream%push(eol) + call stream%flush(unit) + end if + +end subroutine yaml_iterstart +!!*** + +!!****f* m_yaml/yamldoc_open +!! NAME +!! yamldoc_open +!! +!! FUNCTION +!! Open a yaml document +!! +!! INPUTS +!! tag: add a tag to the field +!! [info]: info about document. +!! [newline]: optional, set to false to prevent adding newlines after fields +!! [width]: optional, impose a minimum width of the field name side of the column (padding with spaces) +!! [int_fmt]: Default format for integers. +!! [real_fmt]: Default format for real. +!! [with_iter_state]: True if dict with iteration state should be added. Default: True +!! +!! SOURCE + +type(yamldoc_t) function yamldoc_open(tag, info, newline, width, int_fmt, real_fmt, with_iter_state) result(new) + +!Arguments ------------------------------------ + character(len=*),intent(in) :: tag + character(len=*),optional,intent(in) :: info + logical,intent(in),optional :: newline + integer,intent(in),optional :: width + character(len=*),optional,intent(in) :: int_fmt, real_fmt + logical,optional,intent(in) :: with_iter_state + +!Local variables------------------------------- + logical :: nl, with_iter_state_ + type(pair_list) :: dict +! ************************************************************************* + + ABI_DEFAULT(nl, newline, .False.) + + if (present(width)) new%default_width = width + if (present(int_fmt)) new%default_ifmt = int_fmt + if (present(real_fmt)) new%default_rfmt = real_fmt + + call new%stream%push(ch10//'---'//' !'//trim(tag)//ch10) + + with_iter_state_ = .True.; if (present(with_iter_state)) with_iter_state_ = with_iter_state + if (with_iter_state_ .and. DTSET_IDX /= -1) then + ! Write dictionary with iteration state. + call dict%set('dtset', i=DTSET_IDX) + if (TIMIMAGE_IDX /= -1) call dict%set("timimage", i=TIMIMAGE_IDX) + if (IMAGE_IDX /= -1) call dict%set("image", i=IMAGE_IDX) + if (ITIME_IDX /= -1) call dict%set("itime", i=ITIME_IDX) + if (ICYCLE_IDX /= -1) call dict%set("icycle", i=ICYCLE_IDX) + call new%add_dict('iteration_state', dict, int_fmt="(i0)") + call dict%free() + end if + + if (present(info)) then + if (len_trim(info) /= 0) then + ! TODO: Replace comment with info + call new%stream%push('comment') + if (new%default_width > 7) call new%stream%push(repeat(' ', new%default_width - 7)) + call new%stream%push(': ') + call yaml_print_string(new%stream, info) + call new%stream%push(eol) + end if + end if + + if (nl) call new%stream%push(eol) + +end function yamldoc_open +!!*** + +!!****f* m_yaml/yamldoc_add_real +!! NAME +!! yamldoc_add_real +!! +!! FUNCTION +!! Add a real number field to a document +!! +!! INPUTS +!! label = key name +!! val = value +!! [tag] = optional, add a tag to the field +!! [real_fmt] = override the default formatting +!! [newline] = set to false to prevent adding newlines after fields +!! [width] = impose a minimum width of the field name side of the column (padding with spaces) +!! [comment]: optional Yaml comment added after the value +!! [ignore]= If present, ignore entry if value is equal to ignore. +!! +!! SOURCE + +subroutine yamldoc_add_real(self, label, val, tag, real_fmt, newline, width, comment, ignore) + +!Arguments ------------------------------------ + class(yamldoc_t),intent(inout) :: self + character(len=*),intent(in) :: label + real(dp),intent(in) :: val + character(len=*),intent(in),optional :: tag, real_fmt + logical,intent(in),optional :: newline + integer,intent(in),optional :: width + character(len=*),intent(in),optional :: comment + real(dp),optional,intent(in) :: ignore + +!Local variables------------------------------- + integer :: w + character(len=50) :: tmp_r + character(len=30) :: rfmt + logical :: nl +! ************************************************************************* + + if (present(ignore)) then + if (val == ignore) return + end if + + ABI_DEFAULT(nl, newline, .true.) + ABI_DEFAULT(w, width, self%default_width) + ABI_DEFAULT(rfmt, real_fmt, self%default_rfmt) + + if (present(tag)) then + call yaml_start_field(self%stream, label, width=w, tag=tag) + else + call yaml_start_field(self%stream, label, width=w) + end if + + call self%stream%push(' ') + call format_real(val, tmp_r, trim(rfmt)) + call self%stream%push(trim(tmp_r)) + + if (present(comment)) call self%stream%push(' # '//trim(comment)) + if (nl) call self%stream%push(eol) + +end subroutine yamldoc_add_real +!!*** + +!!****f* m_yaml/yamldoc_add_reals +!! NAME +!! yamldoc_add_reals +!! +!! FUNCTION +!! Add a list of real numbers to the document +!! +!! INPUTS +!! keylist = List of comma-separated keywords +!! values = List of values +!! [real_fmt] = override the default formatting +!! [width] = impose a minimum width of the field name side of the column (padding with spaces) +!! [dict_key]=If present, a dictionary with key `dict_key` is created instead of a list. +!! [multiline_trig] = optional minimum number of elements before switching to multiline representation +!! [ignore]= If present, ignore entries whose values is equal to ignore. +!! +!! SOURCE + +subroutine yamldoc_add_reals(self, keylist, values, real_fmt, width, dict_key, multiline_trig, ignore) + +!Arguments ------------------------------------ + class(yamldoc_t),intent(inout) :: self + character(len=*),intent(in) :: keylist + real(dp),intent(in) :: values(:) + character(len=*),intent(in),optional :: real_fmt, dict_key + integer,intent(in),optional :: width, multiline_trig + real(dp),optional,intent(in) :: ignore + +!Local variables------------------------------- + integer :: i, n, w, start, stp, vmax + character(len=30) :: rfmt + real(dp) :: my_ignore + type(pair_list) :: dict +! ************************************************************************* + + ABI_DEFAULT(w, width, self%default_width) + ABI_DEFAULT(rfmt, real_fmt, self%default_rfmt) + ABI_DEFAULT(my_ignore, ignore, MAGIC_IGNORE_REAL) + + n = char_count(keylist, ",") + 1 + ABI_CHECK(size(values) == n, sjoin("size of values:", itoa(size(values)), " != len(tokens):", keylist)) + + start = 1 + + if (.not. present(dict_key)) then + do i=1,n + stp = index(keylist(start:), ",") + if (stp == 0) then + call self%add_real(adjustl(keylist(start:)), values(i), real_fmt=rfmt, width=w, ignore=my_ignore) + else + call self%add_real(adjustl(keylist(start: start + stp - 2)), values(i), real_fmt=rfmt, width=w, ignore=my_ignore) + start = start + stp + ABI_CHECK(start < len_trim(keylist), sjoin("Invalid keylist:", keylist)) + end if + end do + + else + + ! Create and insert dictionary. + do i=1,n + stp = index(keylist(start:), ",") + if (stp == 0) then + if (values(i) /= my_ignore) call dict%set(adjustl(keylist(start:)), r=values(i)) + else + if (values(i) /= my_ignore) call dict%set(adjustl(keylist(start: start + stp - 2)), r=values(i)) + start = start + stp + ABI_CHECK(start < len_trim(keylist), sjoin("Invalid keylist:", keylist)) + end if + end do + ABI_DEFAULT(vmax, multiline_trig, self%default_multiline_trig) + call self%add_dict(trim(dict_key), dict, multiline_trig=vmax, real_fmt=rfmt, width=w) + call dict%free() + end if + +end subroutine yamldoc_add_reals +!!*** + +!!****f* m_yaml/yamldoc_add_int +!! NAME +!! yamldoc_add_int +!! +!! FUNCTION +!! Add an integer field to a document +!! +!! INPUTS +!! label = key name +!! val = value +!! [tag] = optional, add a tag to the field +!! [int_fmt] = optional override the default formatting +!! [newline] = set to false to prevent adding newlines after fields +!! [width] = impose a minimum width of the field name side of the column (padding with spaces) +!! [comment]: optional Yaml comment added after the value +!! [ignore]= If present, ignore entrie if values is equal to ignore. +!! +!! SOURCE + +subroutine yamldoc_add_int(self, label, val, tag, int_fmt, newline, width, comment, ignore) + +!Arguments ------------------------------------ + class(yamldoc_t),intent(inout) :: self + integer,intent(in) :: val + character(len=*),intent(in) :: label + character(len=*),intent(in),optional :: tag, int_fmt + logical,intent(in),optional :: newline + integer,intent(in),optional :: width + character(len=*),intent(in),optional :: comment + integer,intent(in),optional :: ignore + +!Local variables------------------------------- + integer :: w + character(50) :: tmp_i + character(len=30) :: ifmt + logical :: nl +! ************************************************************************* + + if (present(ignore)) then + if (val == ignore) return + end if + + ABI_DEFAULT(nl, newline, .true.) + ABI_DEFAULT(w, width, self%default_width) + ABI_DEFAULT(ifmt, int_fmt, self%default_ifmt) + + if (present(tag)) then + call yaml_start_field(self%stream, label, width=w, tag=tag) + else + call yaml_start_field(self%stream, label, width=w) + end if + + call self%stream%push(' ') + write(tmp_i, trim(ifmt)) val + call self%stream%push(trim(tmp_i)) + + if (present(comment)) call self%stream%push(' # '//trim(comment)) + if (nl) call self%stream%push(eol) + +end subroutine yamldoc_add_int +!!*** + +!!****f* m_yaml/yamldoc_add_ints +!! NAME +!! yamldoc_add_ints +!! +!! FUNCTION +!! Add a list of integer numbers to the document +!! +!! INPUTS +!! keylist = List of comma-separated keywords e.g. "foo, bar" +!! values = List of integer values +!! [int_fmt] = override the default formatting +!! [width] = impose a minimum width of the field name side of the column (padding with spaces) +!! [dict_key]=If present, a dictionary with key `dict_key` is created instead of a list. +!! [multiline_trig] = minimum number of elements before switching to multiline representation +!! [ignore]= If present, ignore entrie if values is equal to ignore. +!! +!! SOURCE + +subroutine yamldoc_add_ints(self, keylist, values, int_fmt, width, dict_key, multiline_trig, ignore) + +!Arguments ------------------------------------ + class(yamldoc_t),intent(inout) :: self + character(len=*),intent(in) :: keylist + integer,intent(in) :: values(:) + character(len=*),intent(in),optional :: int_fmt, dict_key + integer,intent(in),optional :: width, multiline_trig + integer,intent(in),optional :: ignore + +!Local variables------------------------------- + integer :: i, n, w, start, stp, vmax, my_ignore + character(len=30) :: ifmt + type(pair_list) :: dict +! ************************************************************************* + + ABI_DEFAULT(w, width, self%default_width) + ABI_DEFAULT(ifmt, int_fmt, self%default_ifmt) + ABI_DEFAULT(my_ignore, ignore, MAGIC_IGNORE_INT) + + n = char_count(keylist, ",") + 1 + ABI_CHECK(size(values) == n, sjoin("size of values:", itoa(size(values)), " != len(tokens):", keylist)) + + start = 1 + + if (.not. present(dict_key)) then + ! one line per entry. + do i=1,n + stp = index(keylist(start:), ",") + if (stp == 0) then + call self%add_int(adjustl(keylist(start:)), values(i), int_fmt=ifmt, width=w, ignore=my_ignore) + else + call self%add_int(adjustl(keylist(start: start + stp - 2)), values(i), int_fmt=ifmt, width=w, ignore=my_ignore) + start = start + stp + ABI_CHECK(start < len_trim(keylist), sjoin("Invalid keylist:", keylist)) + end if + end do + + else + ! Create and insert dictionary. + do i=1,n + stp = index(keylist(start:), ",") + if (stp == 0) then + if (values(i) /= my_ignore) call dict%set(adjustl(keylist(start:)), i=values(i)) + else + if (values(i) /= my_ignore) call dict%set(adjustl(keylist(start: start + stp - 2)), i=values(i)) + start = start + stp + ABI_CHECK(start < len_trim(keylist), sjoin("Invalid keylist:", keylist)) + end if + end do + + ABI_DEFAULT(vmax, multiline_trig, self%default_multiline_trig) + call self%add_dict(trim(dict_key), dict, multiline_trig=vmax, int_fmt=ifmt, width=w) + call dict%free() + end if + +end subroutine yamldoc_add_ints +!!*** + +!!****f* m_yaml/yamldoc_add_string +!! NAME +!! yamldoc_add_string +!! +!! FUNCTION +!! Add a string field to a document +!! +!! INPUTS +!! label = key name +!! val = value +!! [tag] = optional, add a tag to the field +!! [newline] = set to false to prevent adding newlines after fields +!! [width] = impose a minimum width of the field name side of the column (padding with spaces) +!! +!! SOURCE + +subroutine yamldoc_add_string(self, label, val, tag, newline, width) + +!Arguments ------------------------------------ + class(yamldoc_t),intent(inout) :: self + character(len=*),intent(in) :: val + character(len=*),intent(in) :: label + character(len=*),intent(in),optional :: tag + logical,intent(in),optional :: newline + integer,intent(in),optional :: width + +!Local variables------------------------------- + integer :: w + logical :: nl +! ************************************************************************* + + ABI_DEFAULT(nl, newline, .true.) + ABI_DEFAULT(w, width, self%default_width) + + if (present(tag)) then + call yaml_start_field(self%stream, label, width=w, tag=tag) + else + call yaml_start_field(self%stream, label, width=w) + end if + + call self%stream%push(' ') + call yaml_print_string(self%stream, trim(val)) + if (nl) call self%stream%push(eol) + +end subroutine yamldoc_add_string +!!*** + +!!****f* m_yaml/yamldoc_add_real1d +!! NAME +!! yamldoc_add_real1d +!! +!! FUNCTION +!! Add a field containing a 1D array of real numbers +!! +!! INPUTS +!! label = key name +!! arr(:) +!! [multiline_trig] = optional minimum number of elements before switching to multiline representation +!! [tag] = optional, add a tag to the field +!! [real_fmt] = override the default formatting +!! [newline] = set to false to prevent adding newlines after fields +!! [width] = impose a minimum width of the field name side of the column (padding with spaces) +!! [comment]: optional Yaml comment added after the value +!! +!! SOURCE + +subroutine yamldoc_add_real1d(self, label, arr, tag, real_fmt, multiline_trig, newline, width, comment) + +!Arguments ------------------------------------ + class(yamldoc_t),intent(inout) :: self + integer,intent(in),optional :: multiline_trig + real(dp),intent(in) :: arr(:) + character(len=*),intent(in) :: label + character(len=*),intent(in),optional :: tag, real_fmt + logical,intent(in),optional :: newline + integer,intent(in),optional :: width + character(len=*),intent(in),optional :: comment + +!Local variables------------------------------- + integer :: w, length, vmax + character(len=30) :: rfmt + logical :: nl +! ************************************************************************* + + length = size(arr) + + ABI_DEFAULT(nl, newline, .true.) + ABI_DEFAULT(w, width, self%default_width) + ABI_DEFAULT(rfmt, real_fmt, self%default_rfmt) + ABI_DEFAULT(vmax, multiline_trig, self%default_multiline_trig) + + if (present(tag)) then + call yaml_start_field(self%stream, label, width=w, tag=tag) + else + call yaml_start_field(self%stream, label, width=w) + end if + + call yaml_print_real1d(self%stream, length, arr, trim(rfmt), vmax) + if (present(comment)) call self%stream%push(' # '//trim(comment)) + if (nl) call self%stream%push(eol) + +end subroutine yamldoc_add_real1d +!!*** + +!!****f* m_yaml/yamldoc_add_int1d +!! NAME +!! yamldoc_add_int1d +!! +!! FUNCTION +!! Add a field containing a 1D integer array +!! +!! INPUTS +!! label = key name +!! arr(:) = +!! [multiline_trig] = optional minimum number of elements before switching to multiline representation +!! [tag] : add a tag to the field +!! int_fmt =optional override the default formatting +!! [newline] = set to false to prevent adding newlines after fields +!! [width] = impose a minimum width of the field name side of the column (padding with spaces) +!! [comment]: optional Yaml comment added after the value +!! +!! SOURCE + +subroutine yamldoc_add_int1d(self, label, arr, tag, int_fmt, multiline_trig, newline, width, comment) + +!Arguments ------------------------------------ + class(yamldoc_t),intent(inout) :: self + integer,intent(in),optional :: multiline_trig + integer,intent(in) :: arr(:) + character(len=*),intent(in) :: label + character(len=*),intent(in),optional :: tag, int_fmt + logical,intent(in),optional :: newline + integer,intent(in),optional :: width + character(len=*),intent(in),optional :: comment + +!Local variables------------------------------- + character(len=30) :: ifmt + integer :: w, length, vmax + logical :: nl +! ************************************************************************* + + ABI_DEFAULT(nl, newline, .true.) + ABI_DEFAULT(w, width, self%default_width) + ABI_DEFAULT(ifmt, int_fmt, self%default_ifmt) + ABI_DEFAULT(vmax, multiline_trig, self%default_multiline_trig) + length = size(arr) + + if (present(tag)) then + call yaml_start_field(self%stream, label, width=w, tag=tag) + else + call yaml_start_field(self%stream, label, width=w) + end if + + call yaml_print_int1d(self%stream, length, arr, trim(ifmt), vmax) + if (present(comment)) call self%stream%push(' # '//trim(comment)) + if (nl) call self%stream%push(eol) + +end subroutine yamldoc_add_int1d +!!*** + +!!****f* m_yaml/yamldoc_add_dict +!! NAME +!! yamldoc_add_dict +!! +!! FUNCTION +!! Add a field containing a dictionary/pair_list +!! +!! INPUTS +!! label = +!! pl = +!! string_size =optional maximum storage size for strings found in a pair_list +!! key_size =optional maximum storage size for keys of a pair_list +!! multiline_trig =optional minimum number of elements before switching to multiline representation +!! tag =optional add a tag to the field +!! key_fmt =optional override the default formatting +!! int_fmt =optional override the default formatting +!! real_fmt =optional override the default formatting +!! string_fmt =optional override the default formatting +!! newline =optional set to false to prevent adding newlines after fields +!! width =optional impose a minimum width of the field name side of the column (padding with spaces) +!! [comment]: optional Yaml comment added after the value +!! +!! OUTPUT +!! pl = +!! +!! SOURCE + +subroutine yamldoc_add_dict(self, label, pl, tag, key_size, string_size, key_fmt, & + int_fmt, real_fmt, string_fmt, multiline_trig, newline, width, comment) + +!Arguments ------------------------------------ + class(yamldoc_t),intent(inout) :: self + type(pair_list),intent(inout) :: pl + character(len=*),intent(in) :: label + integer,intent(in),optional :: string_size, key_size, multiline_trig + character(len=*),intent(in),optional :: tag, key_fmt, int_fmt, real_fmt, string_fmt + logical,intent(in),optional :: newline + integer,intent(in),optional :: width + character(len=*),intent(in),optional :: comment + +!Local variables------------------------------- + integer :: w, vmax, ks, ss + character(len=30) :: kfmt, ifmt, rfmt, sfmt + logical :: nl +! ************************************************************************* + + ABI_DEFAULT(nl, newline, .true.) + ABI_DEFAULT(w, width, self%default_width) + ABI_DEFAULT(ks, key_size, self%default_keysize) + ABI_DEFAULT(ss, string_size, self%default_stringsize) + ABI_DEFAULT(kfmt, key_fmt, self%default_kfmt) + ABI_DEFAULT(rfmt, real_fmt, self%default_rfmt) + ABI_DEFAULT(ifmt, int_fmt, self%default_ifmt) + ABI_DEFAULT(sfmt, string_fmt, self%default_sfmt) + ABI_DEFAULT(vmax, multiline_trig, self%default_multiline_trig) + + if (present(tag)) then + call yaml_start_field(self%stream, label, width=w, tag=tag) + else + call yaml_start_field(self%stream, label, width=w) + end if + + call yaml_print_dict(self%stream, pl, ks, ss, trim(kfmt), trim(ifmt), trim(rfmt), trim(sfmt), vmax) + if (present(comment)) call self%stream%push(' # '//trim(comment)) + if (nl) call self%stream%push(eol) + +end subroutine yamldoc_add_dict +!!*** + +!!****f* m_yaml/yamldoc_add_real2d +!! NAME +!! yamldoc_add_real2d +!! +!! FUNCTION +!! Add a field containing a 2D array of real numbers +!! +!! INPUTS +!! label = key name +!! arr(:, :) = input array. +!! [slist(:)]= List of strings (same length as the first dim or second dime of arr, depending on mode). +!! If present, the string will be included in the the row. +!! [tag]= add a tag to the field +!! [real_fmt]= override the default formatting +!! [multiline_trig]: optional minimum number of elements before switching to multiline representation +!! [newline]: set to false to prevent adding newlines after fields +!! [width]: impose a minimum width of the field name side of the column (padding with spaces) +!! [mode]: "T" to write the transpose of arr i.e columns become rows in output (DEFAULT), "N" for normal order +!! [comment]: optional Yaml comment added after the key. +!! +!! SOURCE + +subroutine yamldoc_add_real2d(self, label, arr, slist, tag, real_fmt, multiline_trig, newline, width, mode, comment) + +!Arguments ------------------------------------ + class(yamldoc_t),intent(inout) :: self + real(dp),intent(in) :: arr(:, :) + character(len=*),intent(in) :: label + character(len=*),optional,intent(in) :: slist(:) + character(len=*),intent(in),optional :: tag, real_fmt + integer,intent(in),optional :: multiline_trig + logical,intent(in),optional :: newline + integer,intent(in),optional :: width + character(len=1),intent(in),optional :: mode + character(len=*),intent(in),optional :: comment + +!Local variables------------------------------- + integer :: m, n, w, i, vmax + real(dp) :: line(max(size(arr, dim=1), size(arr, dim=2))) + character(len=30) :: rfmt + character(len=1) :: my_mode + logical :: nl +! ************************************************************************* + + m = size(arr, dim=1) + n = size(arr, dim=2) + + ABI_DEFAULT(nl, newline, .true.) + ABI_DEFAULT(w, width, self%default_width) + ABI_DEFAULT(my_mode, mode, "T") + ABI_DEFAULT(rfmt, real_fmt, self%default_rfmt) + ABI_DEFAULT(vmax, multiline_trig, self%default_multiline_trig) + + if (present(tag)) then + call yaml_start_field(self%stream, label, width=w, tag=tag) + else + call yaml_start_field(self%stream, label, width=w) + end if + if (present(comment)) call self%stream%push(' # '//trim(comment)) + + if (my_mode == "T") then + do i=1,n + call self%stream%push(eol//'-') + line(1:m) = arr(:,i) + if (.not. present(slist)) then + call yaml_print_real1d(self%stream, m, line, rfmt, vmax) + else + call yaml_print_real1d(self%stream, m, line, rfmt, vmax, string=trim(slist(i))) + end if + end do + else + do i=1,m + call self%stream%push(eol//'-') + line(1:n) = arr(i,:) + if (.not. present(slist)) then + call yaml_print_real1d(self%stream, n, line, rfmt, vmax) + else + call yaml_print_real1d(self%stream, n, line, rfmt, vmax, string=trim(slist(i))) + end if + end do + end if + + if (nl) call self%stream%push(eol) + +end subroutine yamldoc_add_real2d +!!*** + +!!****f* m_yaml/yamldoc_add_paired_real2d +!! NAME +!! yamldoc_add_paired_real2d +!! +!! FUNCTION +!! Add a field containing two 2D real arrays with the same shape. +!! +!! Example: +!! cartesian_forces_and_xred: +!! - [ [ -0.0000E+00, -0.0000E+00, -0.0000E+00, ], [ 0.0000E+00, 0.0000E+00, 0.0000E+00, ] ] +!! - [ [ -0.0000E+00, -0.0000E+00, -0.0000E+00, ], [ 2.5000E-01, 2.5000E-01, 2.5000E-01, ] ] +!! +!! INPUTS +!! label = key name +!! arr1(:,:), arr2(:,:) = input arrays. +!! [slist(:)]= List of strings (same length as the first dim or second dime of arr, depending on mode). +!! If present, the string will be included in the the row. +!! [tag]= add a tag to the field +!! [real_fmt]= override the default formatting +!! [multiline_trig]: optional minimum number of elements before switching to multiline representation +!! [newline]: set to false to prevent adding newlines after fields +!! [width]: impose a minimum width of the field name side of the column (padding with spaces) +!! [mode]: "T" to write the transpose of arr i.e columns become rows in output (DEFAULT), "N" for normal order +!! [comment]: optional Yaml comment added after the key +!! +!! SOURCE + +subroutine yamldoc_add_paired_real2d(self, label, arr1, arr2, slist, tag, real_fmt, & + multiline_trig, newline, width, mode, comment) + +!Arguments ------------------------------------ + class(yamldoc_t),intent(inout) :: self + real(dp),intent(in) :: arr1(:, :), arr2(:,:) + character(len=*),intent(in) :: label + character(len=*),intent(in),optional :: tag, real_fmt + integer,intent(in),optional :: multiline_trig + logical,intent(in),optional :: newline + integer,intent(in),optional :: width + character(len=1),intent(in),optional :: mode + character(len=*),optional,intent(in) :: slist(:) + character(len=*),intent(in),optional :: comment + +!Local variables------------------------------- + integer :: m, n, w, i, vmax + real(dp) :: line(2 * max(size(arr1, dim=1), size(arr1, dim=2))) + character(len=30) :: rfmt + character(len=1) :: my_mode + logical :: nl +! ************************************************************************* + + m = size(arr1, dim=1) + n = size(arr1, dim=2) + + ABI_CHECK(all(shape(arr1) == shape(arr2)), "arr1 and arr2 must have same shape") + + ABI_DEFAULT(nl, newline, .true.) + ABI_DEFAULT(w, width, self%default_width) + ABI_DEFAULT(my_mode, mode, "T") + ABI_DEFAULT(rfmt, real_fmt, self%default_rfmt) + ABI_DEFAULT(vmax, multiline_trig, self%default_multiline_trig) + + if (present(tag)) then + call yaml_start_field(self%stream, label, width=w, tag=tag) + else + call yaml_start_field(self%stream, label, width=w) + end if + if (present(comment)) call self%stream%push(' # '//trim(comment)) + + if (my_mode == "T") then + if (present(slist)) then + ABI_CHECK(size(slist) == n, "size(slist) != n") + end if + do i=1,n + call self%stream%push(eol//'- [') + line(1:m) = arr1(:,i) + call yaml_print_real1d(self%stream, m, line, rfmt, vmax) + call self%stream%push(',') + line(1:m) = arr2(:,i) + call yaml_print_real1d(self%stream, m, line, rfmt, vmax) + if (present(slist)) call self%stream%push(', '//trim(slist(i))) + call self%stream%push(' ]') + end do + else + if (present(slist)) then + ABI_CHECK(size(slist) == n, "size(slist) != m") + end if + do i=1,m + call self%stream%push(eol//'- [') + line(1:n) = arr1(i,:) + call yaml_print_real1d(self%stream, n, line, rfmt, vmax) + call self%stream%push(',') + line(1:n) = arr2(i,:) + call yaml_print_real1d(self%stream, n, line, rfmt, vmax) + if (present(slist)) call self%stream%push(', '//trim(slist(i))) + call self%stream%push(']') + end do + end if + + if (nl) call self%stream%push(eol) + +end subroutine yamldoc_add_paired_real2d +!!*** + +!!****f* m_yaml/yamldoc_add_int2d +!! NAME +!! yamldoc_add_int2d +!! +!! FUNCTION +!! Add a field containing a 2D integer array +!! +!! INPUTS +!! label = key name +!! arr(:, :) = +!! [slist(:)]= List of strings (same length as the first dim or second dime of arr, depending on mode). +!! If present, the string will be included in the the row. +!! [tag]= add a tag to the field +!! [int_fmt]: override the default formatting +!! multiline_trig =optional minimum number of elements before switching to multiline representation +!! [newline] = set to false to prevent adding newlines after fields +!! [width] = impose a minimum width of the field name side of the column (padding with spaces) +!! [mode] = "T" to write the transpose of arr i.e columns become rows in output (DEFAULT), "N" for normal order +!! [comment]: optional Yaml comment added after the key. +!! +!! SOURCE + +subroutine yamldoc_add_int2d(self, label, arr, slist, tag, int_fmt, multiline_trig, newline, width, mode, comment) + +!Arguments ------------------------------------ + class(yamldoc_t),intent(inout) :: self + integer,intent(in) :: arr(:, :) + character(len=*),intent(in) :: label + character(len=*),optional,intent(in) :: slist(:) + character(len=*),intent(in),optional :: tag, int_fmt + integer,intent(in),optional :: multiline_trig + logical,intent(in),optional :: newline + integer,intent(in),optional :: width + character(len=1),intent(in),optional :: mode + character(len=*),intent(in),optional :: comment + +!Local variables------------------------------- + integer :: m, n, w, i, vmax + integer :: line(max(size(arr, dim=1), size(arr, dim=2))) + character(len=30) :: ifmt + character(len=1) :: my_mode + logical :: nl +! ************************************************************************* + + m = size(arr, dim=1) + n = size(arr, dim=2) + + ABI_DEFAULT(nl, newline, .true.) + ABI_DEFAULT(w, width, self%default_width) + ABI_DEFAULT(my_mode, mode, "T") + ABI_DEFAULT(ifmt, int_fmt, self%default_ifmt) + ABI_DEFAULT(vmax, multiline_trig, self%default_multiline_trig) + + if (present(tag)) then + call yaml_start_field(self%stream, label, width=w, tag=tag) + else + call yaml_start_field(self%stream, label, width=w) + end if + if (present(comment)) call self%stream%push(' # '//trim(comment)) + + if (my_mode == "T") then + do i=1,n + call self%stream%push(eol//'-') + line(1:m) = arr(:,i) + if (.not. present(slist)) then + call yaml_print_int1d(self%stream, m, line, ifmt, vmax) + else + call yaml_print_int1d(self%stream, m, line, ifmt, vmax, string=slist(i)) + end if + end do + else + do i=1,m + call self%stream%push(eol//'-') + line(1:n) = arr(i,:) + if (.not. present(slist)) then + call yaml_print_int1d(self%stream, n, line, ifmt, vmax) + else + call yaml_print_int1d(self%stream, n, line, ifmt, vmax, string=slist(i)) + end if + end do + end if + + if (nl) call self%stream%push(eol) + +end subroutine yamldoc_add_int2d +!!*** + +!!****f* m_yaml/yamldoc_add_dictlist +!! NAME +!! yamldoc_add_dictlist +!! +!! FUNCTION +!! Add a field containing a list of dictionaries/array of pair_list +!! +!! INPUTS +!! label = key name +!! n = +!! plarr(n) = +!! key_size =optional maximum storage size for keys of a pair_list +!! string_size =optional maximum storage size for strings of a pair_list +!! multiline_trig =optional minimum number of elements before switching to multiline representation +!! [tag]= add a tag to the field +!! key_fmt =optional override the default formatting +!! int_fmt =optional override the default formatting +!! real_fmt =optional override the default formatting +!! string_fmt =optional override the default formatting +!! [newline] = set to false to prevent adding newlines after fields +!! [width] = impose a minimum width of the field name side of the column (padding with spaces) +!! +!! SOURCE + +subroutine yamldoc_add_dictlist(self, label, n, plarr, tag, key_size, string_size, key_fmt, int_fmt, & + real_fmt, string_fmt, multiline_trig, newline, width) + +!Arguments ------------------------------------ + class(yamldoc_t),intent(inout) :: self + integer,intent(in) :: n + type(pair_list),intent(inout) :: plarr(n) + character(len=*),intent(in) :: label + integer,intent(in),optional :: key_size, string_size + integer,intent(in),optional :: multiline_trig + character(len=*),intent(in),optional :: tag, key_fmt, int_fmt, real_fmt, string_fmt + logical,intent(in),optional :: newline + integer,intent(in),optional :: width + +!Local variables------------------------------- + integer :: w + character(len=30) :: kfmt, ifmt, rfmt, sfmt + integer :: vmax, ks, i, ss + logical :: nl +! ************************************************************************* + + ABI_DEFAULT(nl, newline, .true.) + ABI_DEFAULT(w, width, self%default_width) + ABI_DEFAULT(kfmt, key_fmt, self%default_kfmt) + ABI_DEFAULT(rfmt, real_fmt, self%default_rfmt) + ABI_DEFAULT(ifmt, int_fmt, self%default_ifmt) + ABI_DEFAULT(sfmt, string_fmt, self%default_sfmt) + ABI_DEFAULT(vmax, multiline_trig, self%default_multiline_trig) + ABI_DEFAULT(ks, key_size, self%default_keysize) + ABI_DEFAULT(ss, string_size, self%default_keysize) + + if (present(tag)) then + call yaml_start_field(self%stream, label, width=w, tag=tag) + else + call yaml_start_field(self%stream, label, width=w) + end if + call self%stream%push(eol) + + do i=1,n + call self%stream%push('- ') + call yaml_print_dict(self%stream, plarr(i), ks, ss, trim(kfmt), trim(ifmt), trim(rfmt), trim(sfmt), vmax) + if (nl .or. i /= n) call self%stream%push(eol) + end do + +end subroutine yamldoc_add_dictlist +!!*** + +!!****f* m_yaml/yamldoc_open_tabular +!! NAME +!! yamldoc_open_tabular +!! +!! FUNCTION +!! Open a field for tabular data +!! +!! INPUTS +!! label = key name +!! [tag] =optional add a tag to the field +!! [newline] = set to false to prevent adding newlines after fields +!! [indent] = optional number of spaces to add to the header +!! [comment]: optional Yaml comment added after the value +!! +!! SOURCE + +subroutine yamldoc_open_tabular(self, label, tag, indent, newline, comment) + +!Arguments ------------------------------------ + class(yamldoc_t),intent(inout) :: self + character(len=*),intent(in) :: label + character(len=*),intent(in),optional :: tag + logical,intent(in),optional :: newline + integer,intent(in),optional :: indent + character(len=*),intent(in),optional :: comment + +!Local variables------------------------------- + integer :: n + logical :: nl +! ************************************************************************* + + ABI_DEFAULT(nl, newline, .true.) + ABI_DEFAULT(n, indent, 4) + + if (n > 4) then + call self%stream%push(repeat(' ', n-4)) + end if + + if (present(tag)) then + call yaml_start_field(self%stream, label, tag=tag) + else + call yaml_start_field(self%stream, label, tag='Tabular') + end if + + if (present(comment)) then + call self%stream%push(' | # '//trim(comment)//eol) + else + call self%stream%push(' |'//eol) + end if + +end subroutine yamldoc_open_tabular +!!*** + +!!****f* m_yaml/yamldoc_add_tabular_line +!! NAME +!! yamldoc_add_tabular_line +!! +!! FUNCTION +!! Add a line of tabular data in an already opened table field +!! +!! INPUTS +!! line = +!! [newline] = set to false to prevent adding newlines after fields +!! [indent] = optional number of spaces to add to the header +!! +!! SOURCE + +subroutine yamldoc_add_tabular_line(self, line, newline, indent) + +!Arguments ------------------------------------ + class(yamldoc_t),intent(inout) :: self + character(len=*),intent(in) :: line + logical,intent(in),optional :: newline + integer,intent(in),optional :: indent + +!Local variables------------------------------- + integer :: n + logical :: nl +! ************************************************************************* + + ABI_DEFAULT(nl, newline, .true.) + ABI_DEFAULT(n, indent, 4) + + call self%stream%push(repeat(' ', n)//trim(line)) + if (nl) call self%stream%push(eol) + +end subroutine yamldoc_add_tabular_line +!!*** + +!!****f* m_yaml/yamldoc_add_tabular +!! NAME +!! yamldoc_add_tabular +!! +!! FUNCTION +!! Add a field with a complete table data +!! +!! INPUTS +!! label = +!! input =stream containing an already built table +!! tag =optional add a tag to the field +!! newline =optional set to false to prevent adding newlines after fields +!! indent =optional number of spaces to add to each line +!! +!! SOURCE + +!subroutine yamldoc_add_tabular(self, label, input, tag, newline, indent) +! +!!Arguments ------------------------------------ +! class(yamldoc_t),intent(inout) :: self +! character(len=*),intent(in) :: label +! type(stream_string),intent(inout) :: input +! character(len=*),intent(in),optional :: tag +! logical,intent(in),optional :: newline +! integer,intent(in),optional :: indent +! +!!Local variables------------------------------- +! integer :: n +! character(len=100) :: t +! logical :: nl +!! ************************************************************************* +! +! ABI_DEFAULT(nl, newline, .true.) +! ABI_DEFAULT(n, indent, 4) +! ABI_DEFAULT(t, tag, 'Tabular') +! +! call yaml_open_tabular(label, tag=t, stream=self%stream, newline=nl) +! +! if (n > 4) call self%stream%push(repeat(' ', n - 4)) +! +! call write_indent(input, self%stream, n) +! if (nl) call self%stream%push(eol) +! +!end subroutine yamldoc_add_tabular +!!*** + +!!****f* m_yaml/yaml_single_dict +!! NAME +!! yaml_single_dict +!! +!! FUNCTION +!! Create a full document from a single dictionary +!! +!! INPUTS +!! unit +!! tag = +!! comment = +!! pl = +!! key_size =maximum storage size for the keys of pl +!! string_size =maximum storage size for the strings found in pl +!! tag =optional add a tag to the field +!! int_fmt =optional override the default formatting +!! real_fmt =optional override the default formatting +!! string_fmt =optional override the default formatting +!! width =optional impose a minimum width of the field name side of the column (padding with spaces) +!! newline =optional set to false to prevent adding newlines after fields +!! +!! OUTPUT +!! pl = +!! +!! SOURCE + +subroutine yaml_single_dict(unit, tag, comment, pl, key_size, string_size, & + int_fmt, real_fmt, string_fmt, newline, width) + +!Arguments ------------------------------------ + integer,intent(in) :: unit + type(pair_list),intent(inout) :: pl + character(len=*),intent(in) :: tag + character(len=*),intent(in) :: comment + integer,intent(in) :: key_size, string_size + character(len=*),intent(in),optional :: int_fmt, real_fmt, string_fmt + integer,intent(in), optional :: width + logical,intent(in),optional :: newline + +!Local variables------------------------------- + type(yamldoc_t) :: doc + character(len=30) :: ifmt, rfmt, sfmt + character(len=string_size) :: vs, tmp_s + character(len=key_size) :: key + integer :: vi, k, type_code, w + character(len=50) :: tmp_i, tmp_r + real(dp) :: vr + logical :: nl +! ************************************************************************* + + ABI_DEFAULT(nl, newline, .true.) + ABI_DEFAULT(rfmt, real_fmt, doc%default_rfmt) + ABI_DEFAULT(ifmt, int_fmt, doc%default_ifmt) + ABI_DEFAULT(sfmt, string_fmt, doc%default_sfmt) + ABI_DEFAULT(w, width, doc%default_width) + + call doc%stream%push('--- !'//tag) + + if (comment /= '') then + call doc%stream%push(eol) + call yaml_start_field(doc%stream, 'comment', width=w) + call yaml_print_string(doc%stream, comment) + end if + call doc%stream%push(eol) + + call pl%restart() + do k=1,pl%length() + call string_clear(key) + call string_clear(vs) + call pl%iter(key, type_code, vi, vr, vs) + + call yaml_start_field(doc%stream, trim(key), width=w) + call doc%stream%push(' ') + if (type_code == TC_INT) then + call string_clear(tmp_i) + write(tmp_i, ifmt) vi + call doc%stream%push(trim(tmp_i)) + else if (type_code == TC_REAL) then + call string_clear(tmp_r) + call format_real(vr, tmp_r, rfmt) + call doc%stream%push(trim(tmp_r)) + else if (type_code == TC_STRING) then + call string_clear(tmp_s) + write(tmp_s, sfmt) vs + call yaml_print_string(doc%stream, trim(tmp_s)) + end if + call doc%stream%push(eol) + end do + + call doc%write_and_free(unit, newline=nl) + +end subroutine yaml_single_dict +!!*** + +!!****f* m_yaml/yaml_write_dict +!! NAME +!! yaml_write_dict +!! +!! FUNCTION +!! Write a dictionary in a Yaml document. +!! +!! INPUTS +!! tag: Yaml tag +!! dict_name: Dictionary name +!! dict: Dictionary +!! unit: Unit numver +!! [with_iter_state]: True if dict with iteration state should be added. Default: False +!! +!! SOURCE + +subroutine yaml_write_dict(tag, dict_name, dict, unit, with_iter_state) + +!Arguments ------------------------------------ + character(len=*),intent(in) :: tag, dict_name + type(pair_list),intent(inout) :: dict + integer,intent(in) :: unit + logical,optional,intent(in) :: with_iter_state + +!Local variables------------------------------- + type(yamldoc_t) :: ydoc + logical :: with_iter_state_ +! ************************************************************************* + + with_iter_state_ = .False.; if (present(with_iter_state)) with_iter_state_ = with_iter_state + + ydoc = yamldoc_open(tag, with_iter_state=with_iter_state_) + call ydoc%add_dict(dict_name, dict) + call ydoc%write_and_free(unit) + +end subroutine yaml_write_dict +!!*** + +!!****f* m_yaml/yamldoc_write_unit_and_free +!! NAME +!! yamldoc_write_unit_and_free +!! +!! FUNCTION +!! Write Yaml document to unit and free memory. +!! +!! INPUTS +!! [newline]= set to False to prevent adding newlines after fields. Default: True +!! [firstchar]= Add first char to each line. Useful if the Yaml document must be added after shell comments +!! with firstchar="#". +!! +!! SOURCE + +subroutine yamldoc_write_unit_and_free(self, unit, newline, firstchar) + +!Arguments ------------------------------------ + class(yamldoc_t),intent(inout) :: self + integer,intent(in) :: unit + logical,intent(in),optional :: newline + character(len=*),optional,intent(in) :: firstchar + +!Local variables------------------------------- + logical :: nl +! ************************************************************************* + + if (self%stream%length == 0) return + ABI_DEFAULT(nl, newline, .true.) + + call self%stream%push('...') + + ! FIXME: In principle, we should not use is_open here but it seems that + ! ab_out is not set to dev_null if parallelism over images. + if (is_open(unit)) then + if (present(firstchar)) then + call self%stream%flush(unit, newline=nl, firstchar=firstchar) + else + call self%stream%flush(unit, newline=nl) + end if + else + call self%stream%free() + end if + +end subroutine yamldoc_write_unit_and_free +!!*** + +!!****f* m_yaml/yamldoc_write_units_and_free +!! NAME +!! yamldoc_write_units_and_free +!! +!! FUNCTION +!! Write Yaml document to a list of units and free memory. +!! +!! INPUTS +!! [newline]= set to false to prevent adding newlines after fields. Default: True +!! +!! SOURCE + +subroutine yamldoc_write_units_and_free(self, units, newline) + +!Arguments ------------------------------------ + class(yamldoc_t),intent(inout) :: self + integer,intent(in) :: units(:) + logical,intent(in),optional :: newline + +!Local variables------------------------------- + integer :: ii, cnt + logical :: nl +!arrays + integer :: my_units(size(units)) +! ************************************************************************* + + if (self%stream%length == 0) return + ABI_DEFAULT(nl, newline, .true.) + + ! Remove duplicated units (if any) + ! FIXME: In principle, we should not use is_open here but it seems that + ! ab_out is not set to dev_null if parallelism over images. + my_units(1) = units(1); cnt = 1 + do ii=2,size(units) + if (any(units(ii) == my_units(1:cnt))) cycle + if (is_open(units(ii))) then + cnt = cnt + 1 + my_units(cnt) = units(ii) + end if + end do + + call self%stream%push('...') + call self%stream%flush_units(my_units, newline=nl) + +end subroutine yamldoc_write_units_and_free +!!*** + +!!****f* m_yaml/yamldoc_set_keys_to_string +!! NAME +!! yamldoc_set_keys_to_string +!! +!! FUNCTION +!! Set all keys to a common (string) value +!! +!! INPUTS +!! keylist = List of comma-separated keywords +!! svalue = String Value +!! [width] = impose a minimum width of the field name side of the column (padding with spaces) +!! [dict_key]=If present, a dictionary with key `dict_key` is created instead of a list. +!! [multiline_trig] = optional minimum number of elements before switching to multiline representation +!! +!! SOURCE + +subroutine yamldoc_set_keys_to_string(self, keylist, svalue, dict_key, width, multiline_trig) + +!Arguments ------------------------------------ + class(yamldoc_t),intent(inout) :: self + character(len=*),intent(in) :: keylist, svalue + character(len=*),intent(in),optional :: dict_key + integer,intent(in),optional :: width, multiline_trig + +!Local variables------------------------------- + integer :: i, n, w, start, stp, vmax + type(pair_list) :: dict + +! ************************************************************************* + + ABI_DEFAULT(w, width, self%default_width) + + n = char_count(keylist, ",") + 1 + start = 1 + + if (.not. present(dict_key)) then + do i=1,n + stp = index(keylist(start:), ",") + if (stp == 0) then + call self%add_string(adjustl(keylist(start:)), svalue, width=w) + else + call self%add_string(adjustl(keylist(start: start + stp - 2)), svalue, width=w) + start = start + stp + ABI_CHECK(start < len_trim(keylist), sjoin("Invalid keylist:", keylist)) + end if + end do + + else + ! Create and insert dictionary. + do i=1,n + stp = index(keylist(start:), ",") + if (stp == 0) then + call dict%set(adjustl(keylist(start:)), s=svalue) + else + call dict%set(adjustl(keylist(start: start + stp - 2)), s=svalue) + start = start + stp + ABI_CHECK(start < len_trim(keylist), sjoin("Invalid keylist:", keylist)) + end if + end do + ABI_DEFAULT(vmax, multiline_trig, self%default_multiline_trig) + call self%add_dict(trim(dict_key), dict, multiline_trig=vmax, width=w) + call dict%free() + end if + +end subroutine yamldoc_set_keys_to_string +!!*** + +! private +subroutine string_clear(string) + character(len=*),intent(inout) :: string + string = repeat(' ', len(string)) +end subroutine string_clear + +subroutine format_real(val, dest, formt) + real(dp),intent(in) :: val + character(len=*),intent(out) :: dest + character(len=*),intent(in) :: formt + +!#ifdef HAVE_FC_IEEE_ARITHMETIC +! if (ieee_is_nan(val)) then ! NaN +! write(dest, '(a)') '.nan' +! else if (val == MAGIC_UNDEF) then +!#else +! if (val == MAGIC_UNDEF) then +!#endif + if (val == MAGIC_UNDEF) then + write(dest, '(a)') 'null' + else + write(dest, trim(formt)) val + end if + +end subroutine format_real + +!subroutine write_indent(input, output, n) +! class(stream_string),intent(inout) :: input, output +! integer,intent(in) :: n +! +! integer :: buffstart, buffstop, length +! character(len=chunk_size) :: buffer +! +! do while (input%length > 0) +! length = input%length +! call input%pop_chunk(buffer) +! +! buffstart = 1 +! buffstop = 1 +! do while (buffstart < min(length, chunk_size)) +! buffstop = index(buffer(buffstart:), eol) +! if (buffstop > 0) then +! call output%push(buffer(buffstart:buffstop)) +! call output%push(repeat(' ', n)) +! buffstart = buffstop+1 +! else if (buffstart < min(length, chunk_size)) then +! call output%push(buffer(buffstart:min(length, chunk_size))) +! buffstart = chunk_size +! end if +! end do +! end do +!end subroutine write_indent + +subroutine forbid_reserved_label(label) + character(len=*),intent(in) :: label + integer :: i + + do i=1,size(reserved_keywords) + if (reserved_keywords(i) == label) then + ABI_ERROR(trim(label)//' is a reserved keyword and cannot be used as a YAML label.') + end if + end do +end subroutine forbid_reserved_label + +pure function yaml_quote_string(string) result(quoted) + + character(len=*),intent(in) :: string + character(len=len(string)+2) :: quoted + logical :: multiline, spec_char, quote + spec_char = index(string, ':', back=.true.) /= 0 + spec_char = spec_char .or. index(string, '{') /= 0 + spec_char = spec_char .or. index(string, '}') /= 0 + spec_char = spec_char .or. index(string, '[') /= 0 + spec_char = spec_char .or. index(string, ']') /= 0 + spec_char = spec_char .or. index(string, ',') /= 0 + spec_char = spec_char .or. index(string, '&') /= 0 + spec_char = spec_char .or. index(string, '*') /= 0 + spec_char = spec_char .or. index(string, '#') /= 0 + spec_char = spec_char .or. index(string, '?') /= 0 + spec_char = spec_char .or. index(string, '|') /= 0 + spec_char = spec_char .or. index(string, '-') /= 0 + spec_char = spec_char .or. index(string, '<') /= 0 + spec_char = spec_char .or. index(string, '>') /= 0 + spec_char = spec_char .or. index(string, '=') /= 0 + spec_char = spec_char .or. index(string, '!') /= 0 + spec_char = spec_char .or. index(string, '%') /= 0 + spec_char = spec_char .or. index(string, '@') /= 0 + spec_char = spec_char .or. index(string, '`') /= 0 + + quote = index(string, "'") /= 0 + multiline = index(string, eol, back=.true.) /= 0 + + if (quote) then + quoted='"'//string//'"' + else if (multiline .or. spec_char) then + quoted="'"//string//"'" + else + quoted=string + endif +end function yaml_quote_string + +subroutine yaml_start_field(stream, label, tag, width) + + type(stream_string),intent(inout) :: stream + character(len=*),intent(in) :: label + integer,optional,intent(in) :: width + character(len=*),intent(in),optional :: tag + !character(len=*),optional,intent(in) :: comment + + character(len=len_trim(label)+2) :: quoted + +!#ifdef HAVE_DEBUG_MODE + call forbid_reserved_label(trim(label)) +!#endif + + quoted = yaml_quote_string(label) + if (present(width)) then + if (width > len_trim(label)) then + call stream%push(trim(quoted)//repeat(' ', width-len_trim(quoted))//':') + else + call stream%push(trim(quoted)//':') + end if + else + call stream%push(trim(quoted)//':') + end if + if (present(tag)) call stream%push(' !'//trim(tag)) + !if (present(comment)) call stream%push(' #'//trim(comment)) + +end subroutine yaml_start_field + +subroutine yaml_print_real1d(stream, length, arr, rfmt, vmax, string) + +!Arguments ------------------------------------ + type(stream_string),intent(inout) :: stream + integer,intent(in) :: vmax, length + real(dp),intent(in) :: arr(length) + character(len=*),intent(in) :: rfmt + character(len=*),optional,intent(in) :: string + +!Local variables------------------------------- + integer :: i + character(len=50) :: tmp_r +! ************************************************************************* + + if (length > vmax) then + call stream%push(' ['//eol//' ') + else + call stream%push(' [') + end if + + do i=1,length + call string_clear(tmp_r) + call format_real(arr(i), tmp_r, rfmt) + call stream%push(trim(tmp_r)) + if (i > 0 .and. mod(i, vmax) == 0 .and. i /= length) then + call stream%push(', '//eol//' ') + else + call stream%push(', ') + end if + end do + + if (length > vmax) call stream%push(eol) + if (present(string)) call stream%push(trim(string)) + call stream%push(']') + +end subroutine yaml_print_real1d + +subroutine yaml_print_int1d(stream, length, arr, ifmt, vmax, string) + +!Arguments ------------------------------------ + type(stream_string),intent(inout) :: stream + integer,intent(in) :: vmax + integer,intent(in) :: length + integer,intent(in) :: arr(length) + character(len=*),intent(in) :: ifmt + character(len=*),optional,intent(in) :: string + +!Local variables------------------------------- + integer :: i + character(len=50) :: tmp_i +! ************************************************************************* + + if (length > vmax) then + call stream%push(' ['//eol//' ') + else + call stream%push(' [') + end if + + do i=1,length + call string_clear(tmp_i) + write(tmp_i, ifmt) arr(i) + call stream%push(trim(tmp_i)) + if (i > 0 .and. mod(i, vmax) == 0 .and. i /= length) then + call stream%push(', '//eol//' ') + else + call stream%push(', ') + end if + end do + + if (length > vmax) call stream%push(eol) + if (present(string)) call stream%push(trim(string)) + call stream%push(']') + +end subroutine yaml_print_int1d + +subroutine yaml_print_dict(stream, pl, key_size, s_size, kfmt, ifmt, rfmt, sfmt, vmax) + + type(stream_string),intent(inout) :: stream + integer,intent(in) :: vmax + type(pair_list),intent(inout) :: pl + character(len=*),intent(in) :: ifmt, rfmt, kfmt, sfmt + integer,intent(in) :: key_size, s_size + character(len=key_size) :: key + character(len=key_size+5) :: tmp_key + character(len=100) :: tmp_r, tmp_i + character(len=s_size) :: tmp_s + + integer :: i, vi, type_code + real(dp) :: vr + character(len=s_size) :: vs + + if (pl%length() > vmax) then + call stream%push(' {'//eol//' ') + else + call stream%push(' {') + end if + + call pl%restart() + do i=1,pl%length() + call pl%iter(key, type_code, vi, vr, vs) + +!#ifdef HAVE_DEBUG_MODE + call forbid_reserved_label(trim(key)) +!#endif + + ! TODO: Should enclose key in double quotation markers only if needed + !if has_whitespaces(key) then + ! call string_clear(tmp_key) + ! write(tmp_key, kfmt) '"'//trim(key)//'"' + !else + !end if + write(tmp_key, kfmt) trim(key) + + call stream%push(trim(tmp_key)//': ') + + select case (type_code) + case (TC_INT) + call string_clear(tmp_i) + write(tmp_i, ifmt) vi + call stream%push(trim(tmp_i)) + case (TC_REAL) + call string_clear(tmp_r) + call format_real(vr, tmp_r, rfmt) + call stream%push(trim(tmp_r)) + case (TC_STRING) + call string_clear(tmp_s) + write(tmp_s, sfmt) vs + call yaml_print_string(stream, trim(tmp_s)) + case default + ABI_ERROR(sjoin("Invalid type_code:", itoa(type_code))) + end select + + if (i > 0 .and. mod(i, vmax) == 0 .and. i /= pl%length()) then + call stream%push(', '//eol//' ') + else + call stream%push(', ') + end if + end do + + if (pl%length() > vmax) call stream%push(eol) + call stream%push('}') + +end subroutine yaml_print_dict + +subroutine yaml_print_string(stream, string) + + type(stream_string),intent(inout) :: stream + character(len=*),intent(in) :: string + character(len=len_trim(string)+2) :: quoted + + quoted = yaml_quote_string(string) + call stream%push(trim(quoted)) + +end subroutine yaml_print_string + +!pure logical function has_whitespaces(string) result (ans) +! +! character(len=*),intent(in) :: string +! integer :: ii, jj +! +! ans = .False. +! do ii=len_trim(string), 1, -1 +! if (string(ii:ii) == " ") then +! ans = .True.; exit +! end if +! end do +! +! if (ans) then +! do jj=1,ii-1 +! if (string(ii:ii) /= " ") exit +! end do +! if (jj == ii) ans = .False. +! end do +! +!end function has_whitespaces + +end module m_yaml +!!*** diff --git a/GX-PAW/common/src/17_yaml_out/m_yaml.o b/GX-PAW/common/src/17_yaml_out/m_yaml.o new file mode 100644 index 00000000..95f0ff13 Binary files /dev/null and b/GX-PAW/common/src/17_yaml_out/m_yaml.o differ diff --git a/GX-PAW/common/src/18_timing/Makefile b/GX-PAW/common/src/18_timing/Makefile new file mode 100644 index 00000000..2dfb16df --- /dev/null +++ b/GX-PAW/common/src/18_timing/Makefile @@ -0,0 +1,1463 @@ +# Makefile.in generated by automake 1.16.3 from Makefile.am. +# shared/common/src/18_timing/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994-2020 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-corelibs on 2024/03/16 21:07:38 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-corelibs script or its config file instead. +# + + +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/abinit +pkgincludedir = $(includedir)/abinit +pkglibdir = $(libdir)/abinit +pkglibexecdir = $(libexecdir)/abinit +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = x86_64-apple-darwin18.7.0 +host_triplet = x86_64-apple-darwin18.7.0 +target_triplet = x86_64-apple-darwin18.7.0 +subdir = shared/common/src/18_timing +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/m4/arch-gpu.m4 \ + $(top_srcdir)/config/m4/arch-mpi.m4 \ + $(top_srcdir)/config/m4/auto-autotools.m4 \ + $(top_srcdir)/config/m4/auto-corelibs.m4 \ + $(top_srcdir)/config/m4/auto-debug.m4 \ + $(top_srcdir)/config/m4/auto-dirflags.m4 \ + $(top_srcdir)/config/m4/auto-env.m4 \ + $(top_srcdir)/config/m4/auto-hints.m4 \ + $(top_srcdir)/config/m4/auto-optim.m4 \ + $(top_srcdir)/config/m4/auto-options.m4 \ + $(top_srcdir)/config/m4/auto-output.m4 \ + $(top_srcdir)/config/m4/auto-triggers.m4 \ + $(top_srcdir)/config/m4/conf-atompaw.m4 \ + $(top_srcdir)/config/m4/conf-debug.m4 \ + $(top_srcdir)/config/m4/conf-fallbacks.m4 \ + $(top_srcdir)/config/m4/conf-files.m4 \ + $(top_srcdir)/config/m4/conf-init.m4 \ + $(top_srcdir)/config/m4/conf-openmp.m4 \ + $(top_srcdir)/config/m4/conf-optim.m4 \ + $(top_srcdir)/config/m4/lang-c++.m4 \ + $(top_srcdir)/config/m4/lang-c.m4 \ + $(top_srcdir)/config/m4/lang-fortran-import.m4 \ + $(top_srcdir)/config/m4/lang-fortran.m4 \ + $(top_srcdir)/config/m4/lang-python.m4 \ + $(top_srcdir)/config/m4/libxml2.m4 \ + $(top_srcdir)/config/m4/misc-display.m4 \ + $(top_srcdir)/config/m4/sd_abinit_common.m4 \ + $(top_srcdir)/config/m4/sd_arch_gpu.m4 \ + $(top_srcdir)/config/m4/sd_arch_mpi.m4 \ + $(top_srcdir)/config/m4/sd_bigdft.m4 \ + $(top_srcdir)/config/m4/sd_core.m4 \ + $(top_srcdir)/config/m4/sd_esl.m4 \ + $(top_srcdir)/config/m4/sd_fftw3.m4 \ + $(top_srcdir)/config/m4/sd_gpu_kokkos.m4 \ + $(top_srcdir)/config/m4/sd_gpu_yakl.m4 \ + $(top_srcdir)/config/m4/sd_io_hdf5.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf_fortran.m4 \ + $(top_srcdir)/config/m4/sd_levmar.m4 \ + $(top_srcdir)/config/m4/sd_libpaw.m4 \ + $(top_srcdir)/config/m4/sd_libpsml.m4 \ + $(top_srcdir)/config/m4/sd_libxc.m4 \ + $(top_srcdir)/config/m4/sd_math_fft.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_core.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_util.m4 \ + $(top_srcdir)/config/m4/sd_papi.m4 \ + $(top_srcdir)/config/m4/sd_pfft.m4 \ + $(top_srcdir)/config/m4/sd_triqs.m4 \ + $(top_srcdir)/config/m4/sd_wannier90.m4 \ + $(top_srcdir)/config/m4/sd_xmlf90.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +AM_V_AR = $(am__v_AR_$(V)) +am__v_AR_ = $(am__v_AR_$(AM_DEFAULT_VERBOSITY)) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = +lib18_timing_a_AR = $(AR) $(ARFLAGS) +lib18_timing_a_LIBADD = +am__objects_1 = m_xpapi.$(OBJEXT) m_time.$(OBJEXT) +am_lib18_timing_a_OBJECTS = $(am__objects_1) +lib18_timing_a_OBJECTS = $(am_lib18_timing_a_OBJECTS) +AM_V_P = $(am__v_P_$(V)) +am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY)) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I. -I$(top_builddir) +PPFCCOMPILE = $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) +AM_V_PPFC = $(am__v_PPFC_$(V)) +am__v_PPFC_ = $(am__v_PPFC_$(AM_DEFAULT_VERBOSITY)) +am__v_PPFC_0 = @echo " PPFC " $@; +am__v_PPFC_1 = +FCLD = $(FC) +FCLINK = $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \ + $@ +AM_V_FCLD = $(am__v_FCLD_$(V)) +am__v_FCLD_ = $(am__v_FCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_FCLD_0 = @echo " FCLD " $@; +am__v_FCLD_1 = +SOURCES = $(lib18_timing_a_SOURCES) +DIST_SOURCES = $(lib18_timing_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ABINIT_BINARY_PACKAGE = abinit-10.0.0.83-58be4d_x86_64_darwin18.7.0_gnu9.4 +ABINIT_COMMON_CPPFLAGS = +ABINIT_COMMON_FCFLAGS = +ABINIT_COMMON_LDFLAGS = +ABINIT_COMMON_LIBS = +ABINIT_TARGET = x86_64_darwin18.7.0_gnu9.4 +ABINIT_VERSION = 10.0.0.83-58be4d +ABINIT_VERSION_BASE = 10.0 +ABINIT_VERSION_BUILD = 20240316 +ABINIT_VERSION_MAJOR = 10 +ABINIT_VERSION_MICRO = 0 +ABINIT_VERSION_MINOR = 0 +ABI_CPPFLAGS = -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include +ACLOCAL = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' aclocal-1.16 +AMTAR = $${TAR-tar} +AM_DEFAULT_VERBOSITY = 1 +AR = ar +ARFLAGS = rc +ARFLAGS_CMD = rc +ARFLAGS_DEBUG = +ARFLAGS_EXTRA = +ARFLAGS_HINTS = +ARFLAGS_OPTIM = +ATOMPAW_BIN = +AUTOCONF = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' autoconf +AUTOHEADER = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' autoheader +AUTOMAKE = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' automake-1.16 +AWK = awk +BIGDFT_CPPFLAGS = +BIGDFT_FCFLAGS = +BIGDFT_LDFLAGS = +BIGDFT_LIBS = +BOURNE_SHELL = /bin/sh +CC = /opt/local/bin/mpicc +CCDEPMODE = depmode=gcc3 +CC_LDFLAGS = +CC_LDFLAGS_DEBUG = +CC_LDFLAGS_EXTRA = +CC_LDFLAGS_GPU = +CC_LDFLAGS_HINTS = +CC_LDFLAGS_OPTIM = +CC_LIBS = +CC_LIBS_DEBUG = +CC_LIBS_EXTRA = +CC_LIBS_GPU = +CC_LIBS_HINTS = +CC_LIBS_OPTIM = +CFLAGS = -O2 -g +CFLAGS_DEBUG = +CFLAGS_EXTRA = +CFLAGS_GPU = +CFLAGS_HINTS = +CFLAGS_OPTIM = +CPP = /opt/local/bin/mpicc -E +CPPFLAGS = +CPPFLAGS_DEBUG = +CPPFLAGS_EXTRA = +CPPFLAGS_GPU = +CPPFLAGS_HINTS = +CPPFLAGS_HINTS_EXT = -P -std=c99 +CPPFLAGS_OPTIM = +CXX = /opt/local/bin/mpicxx +CXXDEPMODE = depmode=gcc3 +CXXFLAGS = -O2 -g +CXXFLAGS_DEBUG = +CXXFLAGS_EXTRA = +CXXFLAGS_GPU = +CXXFLAGS_HINTS = +CXXFLAGS_OPTIM = +CXX_LDFLAGS = +CXX_LDFLAGS_DEBUG = +CXX_LDFLAGS_EXTRA = +CXX_LDFLAGS_GPU = +CXX_LDFLAGS_HINTS = +CXX_LDFLAGS_OPTIM = +CXX_LIBS = +CXX_LIBS_DEBUG = +CXX_LIBS_EXTRA = +CXX_LIBS_GPU = +CXX_LIBS_HINTS = +CXX_LIBS_OPTIM = +CYGPATH_W = echo +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +ECHO_C = \c +ECHO_N = +ECHO_T = +EGREP = /usr/bin/grep -E +EXEEXT = +F77 = /opt/local/bin/mpif90 +FC = /opt/local/bin/mpif90 +FCFLAGS = -O2 -g -ffree-line-length-none -I/opt/local/include -I/opt/local/include -I/opt/local/include +FCFLAGS_DEBUG = +FCFLAGS_EXTRA = +FCFLAGS_F90 = +FCFLAGS_FIXEDFORM = -ffixed-form +FCFLAGS_FREEFORM = -ffree-form +FCFLAGS_HINTS = -ffree-line-length-none +FCFLAGS_MODDIR = -J../mods +FCFLAGS_OPENMP = +FCFLAGS_OPENMP_OFFLOAD = +FCFLAGS_OPTIM = +FCLIBS = -L/opt/local/lib -L/opt/local/lib/openmpi-gcc9 -L/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0 -L/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/../../.. -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi -lgfortran -lquadmath -lm +FC_LDFLAGS = +FC_LDFLAGS_DEBUG = +FC_LDFLAGS_EXTRA = +FC_LDFLAGS_HINTS = +FC_LDFLAGS_OPTIM = +FC_LIBS = +FC_LIBS_DEBUG = +FC_LIBS_EXTRA = +FC_LIBS_HINTS = +FC_LIBS_OPTIM = +FC_NOWRAP = /opt/local/bin/mpif90 +FFLAGS = -O2 -g -ffree-line-length-none -I/opt/local/include -I/opt/local/include -I/opt/local/include +FFTW3_CFLAGS = +FFTW3_CPPFLAGS = -I/opt/local/include +FFTW3_FCFLAGS = -I/opt/local/include +FFTW3_LDFLAGS = +FFTW3_LIBS = -L/opt/local/lib -lfftw3 -lfftw3f +FFT_CFLAGS = +FFT_FCFLAGS = +FPP = +FPPFLAGS = +FPPFLAGS_DEBUG = +FPPFLAGS_EXTRA = +FPPFLAGS_HINTS = +FPPFLAGS_OPTIM = +GPU_ARCH = +GPU_CFLAGS = +GPU_CPPFLAGS = +GPU_CXXFLAGS = +GPU_FCFLAGS = +GPU_LDFLAGS = +GPU_LIBS = +GRAPHATOM_BIN = +GREP = /usr/bin/grep +H5CC = +HDF5_CFLAGS = +HDF5_CPPFLAGS = +HDF5_CXXFLAGS = +HDF5_FCFLAGS = +HDF5_LDFLAGS = +HDF5_LIBS = +INSTALL = /opt/local/libexec/gnubin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +KOKKOS_CPPFLAGS = +KOKKOS_CXXFLAGS = +KOKKOS_LDFLAGS = +KOKKOS_LIBS = +LDFLAGS = +LEVMAR_CFLAGS = +LEVMAR_CPPFLAGS = +LEVMAR_LDFLAGS = +LEVMAR_LIBS = +LIBOBJS = +LIBPAW_CPPFLAGS = +LIBPAW_FCFLAGS = +LIBPAW_LDFLAGS = +LIBPAW_LIBS = +LIBPSML_CPPFLAGS = +LIBPSML_FCFLAGS = +LIBPSML_LDFLAGS = +LIBPSML_LIBS = +LIBS = -L/opt/local/lib -lwannier -L/opt/local/lib -lxc -L/opt/local/lib -lnetcdff -L/opt/local/lib -lnetcdf -L/opt/local/lib -L/opt/local/lib -lhdf5_hl -L/opt/local/lib -lhdf5 -lz -ldl -lm -L/opt/local/lib -lfftw3 -lfftw3f +LIBXC_CFLAGS = +LIBXC_CPPFLAGS = +LIBXC_FCFLAGS = +LIBXC_LDFLAGS = +LIBXC_LIBS = +LIBXML2_CPPFLAGS = +LIBXML2_FCFLAGS = +LIBXML2_LIBS = +LINALG_CFLAGS = +LINALG_CPPFLAGS = +LINALG_CXXFLAGS = +LINALG_FCFLAGS = -I/opt/local/include +LINALG_LDFLAGS = +LINALG_LIBS = -L/opt/local/lib -lopenblas +LN_S = ln -s +LTLIBOBJS = +MAKEINFO = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' makeinfo +MKDIR_P = /opt/local/libexec/gnubin/mkdir -p +MODEXT = mod +MPI_CFLAGS = +MPI_CPPFLAGS = +MPI_CXXFLAGS = +MPI_FCFLAGS = +MPI_LDFLAGS = +MPI_LIBS = +MV = /opt/local/libexec/gnubin/mv +NETCDF_CFLAGS = +NETCDF_CPPFLAGS = +NETCDF_CXXFLAGS = +NETCDF_FCFLAGS = +NETCDF_FORTRAN_CFLAGS = +NETCDF_FORTRAN_CPPFLAGS = +NETCDF_FORTRAN_CXXFLAGS = +NETCDF_FORTRAN_FCFLAGS = +NETCDF_FORTRAN_LDFLAGS = +NETCDF_FORTRAN_LIBS = +NETCDF_LDFLAGS = +NETCDF_LIBS = +NVCC = +NVCC_CFLAGS = +NVCC_CPPFLAGS = +NVCC_LDFLAGS = +NVCC_LIBS = +OBJEXT = o +PACKAGE = abinit +PACKAGE_BUGREPORT = https://bugs.launchpad.net/abinit/ +PACKAGE_NAME = ABINIT +PACKAGE_STRING = ABINIT 10.0.0.83-58be4d +PACKAGE_TARNAME = abinit +PACKAGE_URL = +PACKAGE_VERSION = 10.0.0.83-58be4d +PAPI_CFLAGS = +PAPI_CPPFLAGS = +PAPI_LDFLAGS = +PAPI_LIBS = +PATCH = patch +PATH_SEPARATOR = : +PERL = /usr/bin/perl +PFFT_CFLAGS = +PFFT_CPPFLAGS = +PFFT_LDFLAGS = +PFFT_LIBS = +PYFLAGS = +PYTHON = python3.9 +PYTHON_CONFIG = python3.9-config +PYTHON_CPPFLAGS = -I/opt/local/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -I/opt/local/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 +RANLIB = ranlib +REALPATH = realpath +RM = /opt/local/libexec/gnubin/rm +SED = /usr/bin/sed +SET_MAKE = +SHELL = /bin/sh +STRIP = +TAR = tar +TRIQS_CFLAGS = +TRIQS_CPPFLAGS = +TRIQS_CXXFLAGS = +TRIQS_LDFLAGS = +TRIQS_LIBS = +TRUE_CPP = cpp +VERSION = 10.0.0.83-58be4d +WANNIER90_CPPFLAGS = +WANNIER90_FCFLAGS = -I/opt/local/include +WANNIER90_LDFLAGS = +WANNIER90_LIBS = -L/opt/local/lib -lwannier +XML2_CONFIG = +XMLF90_CPPFLAGS = +XMLF90_FCFLAGS = +XMLF90_LDFLAGS = +XMLF90_LIBS = +XML_CPPFLAGS = +XML_LIBS = +XPP = +XPPFLAGS = +XPPFLAGS_DEBUG = +XPPFLAGS_EXTRA = +XPPFLAGS_OPTIM = +YAKL_CPPFLAGS = +YAKL_FCFLAGS = +YAKL_LDFLAGS = +YAKL_LIBS = +abi_ac_distcheck = --with-config-file="/Users/gonze/_Research/ABINIT_git/gonze/mac-1P0-225.ac9" +abi_ac_version = 027100 +abi_am_version = 011603 +abi_avx_safe_mode_enable = no +abi_bse_unpacked_enable = no +abi_cc_path = +abi_cc_vendor = gnu +abi_cc_version = 9.4 +abi_cclock_enable = no +abi_cpp_path = +abi_cpu_64bits = yes +abi_cpu_bits = 64 +abi_cpu_model = unknown +abi_cpu_platform = apple +abi_cpu_spec = unknown_unknown +abi_cpu_vendor = unknown +abi_crpa_optim_enable = no +abi_cxx_path = +abi_cxx_vendor = gnu +abi_cxx_version = 9.4 +abi_debug_flavor = basic +abi_exports_enable = no +abi_fbk_abinit_common_ok = no +abi_fbk_bigdft_ok = disabled +abi_fbk_config = +abi_fbk_enable = no +abi_fbk_fft_ok = no +abi_fbk_fftw3_ok = no +abi_fbk_gpu_ok = no +abi_fbk_hdf5_ok = disabled +abi_fbk_init = def +abi_fbk_kokkos_ok = no +abi_fbk_levmar_ok = no +abi_fbk_libpaw_ok = no +abi_fbk_libpsml_ok = disabled +abi_fbk_libxc_ok = disabled +abi_fbk_libxml2_ok = no +abi_fbk_linalg_ok = disabled +abi_fbk_list = +abi_fbk_mpi_ok = no +abi_fbk_netcdf_fortran_ok = disabled +abi_fbk_netcdf_ok = disabled +abi_fbk_papi_ok = no +abi_fbk_pfft_ok = no +abi_fbk_prefix = +abi_fbk_required = +abi_fbk_triqs_ok = no +abi_fbk_wannier90_ok = disabled +abi_fbk_xmlf90_ok = disabled +abi_fbk_yakl_ok = no +abi_fc_path = +abi_fc_vendor = gnu +abi_fc_version = 9.4 +abi_fc_wrap = no +abi_fc_wrapper_enable = no +abi_fpp_path = +abi_gpu_arch = +abi_gpu_fcflags = +abi_gpu_flavor = none +abi_gpu_hip_libdir = +abi_gpu_incs = +abi_gpu_ldflags = +abi_gpu_libs = +abi_gpu_nvtx_v3 = +abi_gpu_roctx = +abi_gw_dpc_enable = yes +abi_hints_enable = yes +abi_libtetra_enable = yes +abi_libxml2_cppflags = +abi_libxml2_enable = no +abi_libxml2_fcflags = +abi_libxml2_init = def +abi_libxml2_ldflags = +abi_libxml2_libs = +abi_libxml2_ok = unknown +abi_libxml2_prefix = +abi_lotf_enable = no +abi_lt_version = 020406 +abi_m4_version = 010419 +abi_memory_profiling_enable = no +abi_mpi_cflags = +abi_mpi_cppflags = +abi_mpi_cxxflags = +abi_mpi_enable = yes +abi_mpi_fcflags = +abi_mpi_flavor = auto +abi_mpi_gpu_aware_enable = no +abi_mpi_incs = +abi_mpi_inplace_enable = yes +abi_mpi_interfaces_bugfix_enable = no +abi_mpi_io_default_enable = no +abi_mpi_io_enable = yes +abi_mpi_ldflags = +abi_mpi_level = 2 +abi_mpi_libs = +abi_netcdf_default_enable = no +abi_openmp_enable = no +abi_openmp_offload_enable = no +abi_optim_flavor = standard +abi_python_invocation_enable = no +abi_source_debug_enable = no +abi_stdin_enable = yes +abi_sys_spec = darwin-x86_64 +abi_timer_enable = yes +abi_triqs_v1_4_enable = no +abi_triqs_v2_0_enable = no +abi_zdot_bugfix_enable = no +abinit_bindir = /usr/local/bin +abinit_builddir = /Users/gonze/_Research/ABINIT_git/gonze +abinit_chkdir = /usr/local/share/abinit/tests +abinit_datdir = /usr/local/share/abinit +abinit_docdir = /usr/local/doc/abinit +abinit_incdir = /usr/local/include +abinit_libdir = /usr/local/lib +abinit_mandir = /usr/local/share/man +abinit_prefix = /usr/local +abinit_srcdir = /Users/gonze/_Research/ABINIT_git/gonze +abs_builddir = /Users/gonze/_Research/ABINIT_git/gonze/shared/common/src/18_timing +abs_srcdir = /Users/gonze/_Research/ABINIT_git/gonze/shared/common/src/18_timing +abs_top_builddir = /Users/gonze/_Research/ABINIT_git/gonze +abs_top_srcdir = /Users/gonze/_Research/ABINIT_git/gonze +ac_ct_CC = +ac_ct_CXX = +ac_ct_FC = +am__include = include +am__leading_dot = . +am__quote = +am__tar = tar --format=ustar -chf - "$$tardir" +am__untar = tar -xf - +bindir = ${exec_prefix}/bin +build = x86_64-apple-darwin18.7.0 +build_alias = +build_cpu = x86_64 +build_os = darwin18.7.0 +build_vendor = apple +builddir = . +cc_info_string = gcc-mp-9 (MacPorts gcc9 9.4.0_0) 9.4.0 +cxx_info_string = g++-mp-9 (MacPorts gcc9 9.4.0_0) 9.4.0 +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +enable_avx_safe_mode = +enable_bse_unpacked = +enable_cclock = +enable_crpa_optim = +enable_exports = +enable_fc_wrapper = +enable_gw_dpc = yes +enable_hints = +enable_libtetra = +enable_lotf = +enable_memory_profiling = +enable_mpi_gpu_aware = +enable_mpi_inplace = +enable_mpi_interfaces_bugfix = +enable_mpi_io = yes +enable_mpi_io_default = +enable_netcdf_default = +enable_openmp = +enable_openmp_offload = +enable_python_invocation = +enable_shared = +enable_source_debug = +enable_static = +enable_stdin = +enable_timer = +enable_triqs_v1_4 = +enable_triqs_v2_0 = +enable_zdot_bugfix = +exec_prefix = ${prefix} +fc_info_string = GNU Fortran (MacPorts gcc9 9.4.0_0) 9.4.0 +fc_mod_fcflags = +fc_timing = standard +fcflags_opt_02_clib = +fcflags_opt_10_defs = +fcflags_opt_11_memory_mpi = +fcflags_opt_12_hide_mpi = +fcflags_opt_14_hidewrite = +fcflags_opt_16_hideleave = +fcflags_opt_16_kokkos_toolbox = +fcflags_opt_17_gpu_toolbox = +fcflags_opt_17_libtetra_ext = +fcflags_opt_17_minimax = +fcflags_opt_17_yaml_out = +fcflags_opt_18_timing = +fcflags_opt_21_hashfuncs = +fcflags_opt_27_toolbox_oop = +fcflags_opt_28_numeric_noabirule = +fcflags_opt_29_kpoints = +fcflags_opt_32_util = +fcflags_opt_33_xc_lowlevel = +fcflags_opt_39_libpaw = +fcflags_opt_41_geometry = +fcflags_opt_42_nlstrain = +fcflags_opt_42_parser = +fcflags_opt_43_ptgroups = -O0 +fcflags_opt_43_wvl_wrappers = +fcflags_opt_44_abitools = +fcflags_opt_44_abitypes_defs = +fcflags_opt_44_manage_kokkos = +fcflags_opt_45_geomoptim = +fcflags_opt_45_xgTools = +fcflags_opt_46_ghc_omp = +fcflags_opt_46_manage_cuda = +fcflags_opt_48_diago = +fcflags_opt_49_gw_toolbox_oop = +fcflags_opt_51_manage_mpi = +fcflags_opt_52_fft_mpi_noabirule = +fcflags_opt_53_ffts = +fcflags_opt_54_spacepar = +fcflags_opt_55_abiutil = +fcflags_opt_56_io_mpi = +fcflags_opt_56_mixing = +fcflags_opt_56_recipspace = +fcflags_opt_56_xc = +fcflags_opt_57_iopsp_parser = +fcflags_opt_57_iovars = +fcflags_opt_61_occeig = +fcflags_opt_62_cg_noabirule = +fcflags_opt_62_ctqmc = +fcflags_opt_62_iowfdenpot = +fcflags_opt_62_poisson = +fcflags_opt_62_wvl_wfs = +fcflags_opt_64_psp = +fcflags_opt_65_lotf_base = +fcflags_opt_65_paw = +fcflags_opt_66_nonlocal = +fcflags_opt_66_vdwxc = +fcflags_opt_66_wfs = +fcflags_opt_67_common = +fcflags_opt_67_python_invocation_ext = +fcflags_opt_67_triqs_ext = +fcflags_opt_68_dmft = +fcflags_opt_68_lotf = +fcflags_opt_68_recursion = +fcflags_opt_68_rsprc = +fcflags_opt_69_wfdesc = +fcflags_opt_70_gw = +fcflags_opt_71_bse = +fcflags_opt_71_wannier = +fcflags_opt_72_response = +fcflags_opt_77_ddb = +fcflags_opt_77_suscep = +fcflags_opt_78_effpot = +fcflags_opt_78_eph = +fcflags_opt_79_seqpar_mpi = +fcflags_opt_80_rttddft = +fcflags_opt_80_tdep = +fcflags_opt_94_scfcv = +fcflags_opt_95_drive = +fcflags_opt_98_main = +fcflags_opt_bigdft = +fcflags_opt_default = +fcflags_opt_hdf5 = +fcflags_opt_levmar = +fcflags_opt_libpsml = +fcflags_opt_libxc = +fcflags_opt_libxml2 = +fcflags_opt_linalg = +fcflags_opt_netcdf = +fcflags_opt_netcdf_fortran = +fcflags_opt_papi = +fcflags_opt_triqs = +fcflags_opt_wannier90 = +fcflags_opt_xmlf90 = +host = x86_64-apple-darwin18.7.0 +host_alias = +host_cpu = x86_64 +host_os = darwin18.7.0 +host_vendor = apple +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = ${SHELL} /Users/gonze/_Research/ABINIT_git/gonze/config/gnu/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = ${datarootdir}/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = $(MKDIR_P) +oldincludedir = /usr/include +pdfdir = ${docdir} +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +runstatedir = ${localstatedir}/run +sbindir = ${exec_prefix}/sbin +sd_abinit_common_cppflags = +sd_abinit_common_enable = no +sd_abinit_common_enable_def = no +sd_abinit_common_fcflags = +sd_abinit_common_init = def +sd_abinit_common_ldflags = +sd_abinit_common_libs = +sd_abinit_common_ok = unknown +sd_abinit_common_options = optional skip +sd_abinit_common_policy = skip +sd_abinit_common_status = optional +sd_bigdft_cppflags = +sd_bigdft_enable = no +sd_bigdft_enable_def = no +sd_bigdft_fcflags = +sd_bigdft_init = def +sd_bigdft_ldflags = +sd_bigdft_libs = +sd_bigdft_ok = unknown +sd_bigdft_options = optional warn +sd_bigdft_policy = warn +sd_bigdft_status = optional +sd_fft_cflags = +sd_fft_choices = +sd_fft_cppflags = -I/opt/local/include +sd_fft_cxxflags = +sd_fft_enable = yes +sd_fft_fcflags = -I/opt/local/include +sd_fft_flavor = fftw3 +sd_fft_init = kwd +sd_fft_ldflags = +sd_fft_libs = -L/opt/local/lib -lfftw3 -lfftw3f +sd_fft_ok = yes +sd_fftw3_cflags = +sd_fftw3_cppflags = -I/opt/local/include +sd_fftw3_enable = yes +sd_fftw3_enable_def = no +sd_fftw3_fcflags = -I/opt/local/include +sd_fftw3_init = env +sd_fftw3_ldflags = +sd_fftw3_libs = -L/opt/local/lib -lfftw3 -lfftw3f +sd_fftw3_ok = yes +sd_fftw3_options = optional skip +sd_fftw3_policy = skip +sd_fftw3_status = optional +sd_gpu_cflags = +sd_gpu_cppflags = +sd_gpu_cxxflags = +sd_gpu_enable = no +sd_gpu_enable_def = no +sd_gpu_fcflags = +sd_gpu_init = def +sd_gpu_ldflags = +sd_gpu_libs = +sd_gpu_ok = no +sd_gpu_options = optional warn +sd_gpu_policy = warn +sd_gpu_prefix = +sd_gpu_status = optional +sd_hdf5_cflags = +sd_hdf5_cppflags = -I/opt/local/include -I/opt/local/include +sd_hdf5_cxxflags = +sd_hdf5_enable = yes +sd_hdf5_enable_def = yes +sd_hdf5_enable_fc = no +sd_hdf5_fcflags = +sd_hdf5_h5cc = /opt/local/bin/h5cc +sd_hdf5_h5fc = +sd_hdf5_init = dir +sd_hdf5_ldflags = +sd_hdf5_libs = -L/opt/local/lib -L/opt/local/lib -lhdf5_hl -L/opt/local/lib -lhdf5 -lz -ldl -lm +sd_hdf5_ok = yes +sd_hdf5_options = required no-fortran warn +sd_hdf5_policy = warn +sd_hdf5_status = required +sd_kokkos_cppflags = +sd_kokkos_cxxflags = +sd_kokkos_enable = no +sd_kokkos_enable_def = no +sd_kokkos_init = def +sd_kokkos_ldflags = +sd_kokkos_libs = +sd_kokkos_ok = unknown +sd_kokkos_options = optional fail +sd_kokkos_policy = fail +sd_kokkos_status = optional +sd_levmar_cflags = +sd_levmar_cppflags = +sd_levmar_enable = no +sd_levmar_enable_def = no +sd_levmar_init = def +sd_levmar_ldflags = +sd_levmar_libs = +sd_levmar_ok = unknown +sd_levmar_options = optional fail +sd_levmar_policy = fail +sd_levmar_status = optional +sd_libpaw_cppflags = +sd_libpaw_enable = no +sd_libpaw_enable_def = no +sd_libpaw_fcflags = +sd_libpaw_init = def +sd_libpaw_ldflags = +sd_libpaw_libs = +sd_libpaw_ok = unknown +sd_libpaw_options = optional skip +sd_libpaw_policy = skip +sd_libpaw_status = optional +sd_libpsml_cppflags = +sd_libpsml_enable = no +sd_libpsml_enable_def = no +sd_libpsml_fcflags = +sd_libpsml_init = def +sd_libpsml_ldflags = +sd_libpsml_libs = +sd_libpsml_ok = unknown +sd_libpsml_options = optional warn +sd_libpsml_policy = warn +sd_libpsml_status = optional +sd_libxc_cflags = +sd_libxc_cppflags = -I/opt/local/include +sd_libxc_enable = yes +sd_libxc_enable_def = yes +sd_libxc_enable_fc = no +sd_libxc_fcflags = +sd_libxc_init = dir +sd_libxc_ldflags = +sd_libxc_libs = -L/opt/local/lib -lxc +sd_libxc_ok = yes +sd_libxc_options = required no-fortran warn +sd_libxc_policy = warn +sd_libxc_status = required +sd_linalg_cflags = +sd_linalg_choices = +sd_linalg_cppflags = +sd_linalg_cxxflags = +sd_linalg_enable = yes +sd_linalg_fcflags = -I/opt/local/include +sd_linalg_flavor = openblas +sd_linalg_has_elpa = no +sd_linalg_has_scalapack = no +sd_linalg_init = env +sd_linalg_ldflags = +sd_linalg_libs = -L/opt/local/lib -lopenblas +sd_linalg_ok = yes +sd_mpi_cc = /opt/local/bin/mpicc +sd_mpi_cflags = +sd_mpi_cppflags = -I/opt/local/include +sd_mpi_cxx = /opt/local/bin/mpicxx +sd_mpi_enable = yes +sd_mpi_enable_cxx = yes +sd_mpi_enable_def = auto +sd_mpi_enable_fc = yes +sd_mpi_fc = /opt/local/bin/mpif90 +sd_mpi_fcflags = -I/opt/local/include +sd_mpi_init = dir +sd_mpi_ldflags = +sd_mpi_libs = +sd_mpi_ok = yes +sd_mpi_options = auto optional fail +sd_mpi_policy = fail +sd_mpi_status = optional +sd_netcdf_cflags = +sd_netcdf_cppflags = -I/opt/local/include +sd_netcdf_enable = yes +sd_netcdf_enable_def = yes +sd_netcdf_fcflags = -I/opt/local/include +sd_netcdf_fortran_cflags = +sd_netcdf_fortran_cppflags = -I/opt/local/include +sd_netcdf_fortran_enable = yes +sd_netcdf_fortran_enable_def = yes +sd_netcdf_fortran_fcflags = -I/opt/local/include +sd_netcdf_fortran_init = dir +sd_netcdf_fortran_ldflags = +sd_netcdf_fortran_libs = -L/opt/local/lib -lnetcdff +sd_netcdf_fortran_ok = yes +sd_netcdf_fortran_options = required warn +sd_netcdf_fortran_policy = warn +sd_netcdf_fortran_status = required +sd_netcdf_init = dir +sd_netcdf_ldflags = +sd_netcdf_libs = -L/opt/local/lib -lnetcdf +sd_netcdf_ok = yes +sd_netcdf_options = required warn +sd_netcdf_policy = warn +sd_netcdf_status = required +sd_papi_cflags = +sd_papi_cppflags = +sd_papi_enable = no +sd_papi_enable_def = no +sd_papi_init = def +sd_papi_ldflags = +sd_papi_libs = +sd_papi_ok = unknown +sd_papi_options = optional fail +sd_papi_policy = fail +sd_papi_sd_papi_fcflags = +sd_papi_status = optional +sd_pfft_cflags = +sd_pfft_cppflags = +sd_pfft_enable = no +sd_pfft_enable_def = no +sd_pfft_init = def +sd_pfft_ldflags = +sd_pfft_libs = +sd_pfft_ok = unknown +sd_pfft_options = optional skip +sd_pfft_policy = skip +sd_pfft_status = optional +sd_sys_fcflags = +sd_triqs_cflags = +sd_triqs_cppflags = +sd_triqs_cxxflags = +sd_triqs_enable = no +sd_triqs_enable_def = no +sd_triqs_fcflags = +sd_triqs_init = def +sd_triqs_ldflags = +sd_triqs_libs = +sd_triqs_ok = unknown +sd_triqs_options = optional fail +sd_triqs_policy = fail +sd_triqs_status = optional +sd_wannier90_cppflags = +sd_wannier90_enable = yes +sd_wannier90_enable_def = no +sd_wannier90_fcflags = -I/opt/local/include +sd_wannier90_init = env +sd_wannier90_ldflags = +sd_wannier90_libs = -L/opt/local/lib -lwannier +sd_wannier90_ok = yes +sd_wannier90_options = optional warn +sd_wannier90_policy = warn +sd_wannier90_status = optional +sd_xmlf90_cppflags = +sd_xmlf90_enable = no +sd_xmlf90_enable_def = no +sd_xmlf90_fcflags = +sd_xmlf90_init = def +sd_xmlf90_ldflags = +sd_xmlf90_libs = +sd_xmlf90_ok = unknown +sd_xmlf90_options = optional warn +sd_xmlf90_policy = warn +sd_xmlf90_status = optional +sd_yakl_cppflags = +sd_yakl_enable = no +sd_yakl_enable_def = no +sd_yakl_fcflags = +sd_yakl_init = def +sd_yakl_ldflags = +sd_yakl_libs = +sd_yakl_ok = unknown +sd_yakl_options = optional fail +sd_yakl_policy = fail +sd_yakl_status = optional +sharedstatedir = ${prefix}/com +src_02_clib_fcflags = -I$(top_builddir)/shared/common/src/02_clib -I$(top_srcdir)/shared/common/src/02_clib +src_10_defs_fcflags = -I$(top_builddir)/shared/common/src/10_defs -I$(top_srcdir)/shared/common/src/10_defs +src_11_memory_mpi_fcflags = -I$(top_builddir)/shared/common/src/11_memory_mpi -I$(top_srcdir)/shared/common/src/11_memory_mpi +src_12_hide_mpi_fcflags = -I$(top_builddir)/shared/common/src/12_hide_mpi -I$(top_srcdir)/shared/common/src/12_hide_mpi +src_14_hidewrite_fcflags = -I$(top_builddir)/shared/common/src/14_hidewrite -I$(top_srcdir)/shared/common/src/14_hidewrite +src_16_hideleave_fcflags = -I$(top_builddir)/shared/common/src/16_hideleave -I$(top_srcdir)/shared/common/src/16_hideleave +src_16_kokkos_toolbox_fcflags = -I$(top_builddir)/shared/common/src/16_kokkos_toolbox -I$(top_srcdir)/shared/common/src/16_kokkos_toolbox +src_17_gpu_toolbox_fcflags = -I$(top_builddir)/shared/common/src/17_gpu_toolbox -I$(top_srcdir)/shared/common/src/17_gpu_toolbox +src_17_libtetra_ext_fcflags = -I$(top_builddir)/shared/common/src/17_libtetra_ext -I$(top_srcdir)/shared/common/src/17_libtetra_ext +src_17_minimax_fcflags = -I$(top_builddir)/shared/common/src/17_minimax -I$(top_srcdir)/shared/common/src/17_minimax +src_17_yaml_out_fcflags = -I$(top_builddir)/shared/common/src/17_yaml_out -I$(top_srcdir)/shared/common/src/17_yaml_out +src_18_timing_fcflags = -I$(top_builddir)/shared/common/src/18_timing -I$(top_srcdir)/shared/common/src/18_timing +src_21_hashfuncs_fcflags = -I$(top_builddir)/shared/common/src/21_hashfuncs -I$(top_srcdir)/shared/common/src/21_hashfuncs +src_27_toolbox_oop_fcflags = -I$(top_builddir)/shared/common/src/27_toolbox_oop -I$(top_srcdir)/shared/common/src/27_toolbox_oop +src_28_numeric_noabirule_fcflags = -I$(top_builddir)/shared/common/src/28_numeric_noabirule -I$(top_srcdir)/shared/common/src/28_numeric_noabirule +src_29_kpoints_fcflags = -I$(top_builddir)/shared/common/src/29_kpoints -I$(top_srcdir)/shared/common/src/29_kpoints +src_32_util_fcflags = -I$(top_builddir)/shared/common/src/32_util -I$(top_srcdir)/shared/common/src/32_util +src_33_xc_lowlevel_fcflags = -I$(top_builddir)/shared/common/src/33_xc_lowlevel -I$(top_srcdir)/shared/common/src/33_xc_lowlevel +src_39_libpaw_fcflags = -I$(top_builddir)/shared/libpaw/src -I$(top_srcdir)/shared/libpaw/src +src_41_geometry_fcflags = -I$(top_builddir)/src/41_geometry -I$(top_srcdir)/src/41_geometry +src_42_nlstrain_fcflags = -I$(top_builddir)/src/42_nlstrain -I$(top_srcdir)/src/42_nlstrain +src_42_parser_fcflags = -I$(top_builddir)/src/42_parser -I$(top_srcdir)/src/42_parser +src_43_ptgroups_fcflags = -I$(top_builddir)/src/43_ptgroups -I$(top_srcdir)/src/43_ptgroups +src_43_wvl_wrappers_fcflags = -I$(top_builddir)/src/43_wvl_wrappers -I$(top_srcdir)/src/43_wvl_wrappers +src_44_abitools_fcflags = -I$(top_builddir)/src/44_abitools -I$(top_srcdir)/src/44_abitools +src_44_abitypes_defs_fcflags = -I$(top_builddir)/src/44_abitypes_defs -I$(top_srcdir)/src/44_abitypes_defs +src_44_manage_kokkos_fcflags = -I$(top_builddir)/src/44_manage_kokkos -I$(top_srcdir)/src/44_manage_kokkos +src_45_geomoptim_fcflags = -I$(top_builddir)/src/45_geomoptim -I$(top_srcdir)/src/45_geomoptim +src_45_xgTools_fcflags = -I$(top_builddir)/src/45_xgTools -I$(top_srcdir)/src/45_xgTools +src_46_ghc_omp_fcflags = -I$(top_builddir)/src/46_ghc_omp -I$(top_srcdir)/src/46_ghc_omp +src_46_manage_cuda_fcflags = -I$(top_builddir)/src/46_manage_cuda -I$(top_srcdir)/src/46_manage_cuda +src_48_diago_fcflags = -I$(top_builddir)/src/48_diago -I$(top_srcdir)/src/48_diago +src_49_gw_toolbox_oop_fcflags = -I$(top_builddir)/src/49_gw_toolbox_oop -I$(top_srcdir)/src/49_gw_toolbox_oop +src_51_manage_mpi_fcflags = -I$(top_builddir)/src/51_manage_mpi -I$(top_srcdir)/src/51_manage_mpi +src_52_fft_mpi_noabirule_fcflags = -I$(top_builddir)/src/52_fft_mpi_noabirule -I$(top_srcdir)/src/52_fft_mpi_noabirule +src_53_ffts_fcflags = -I$(top_builddir)/src/53_ffts -I$(top_srcdir)/src/53_ffts +src_54_spacepar_fcflags = -I$(top_builddir)/src/54_spacepar -I$(top_srcdir)/src/54_spacepar +src_55_abiutil_fcflags = -I$(top_builddir)/src/55_abiutil -I$(top_srcdir)/src/55_abiutil +src_56_io_mpi_fcflags = -I$(top_builddir)/src/56_io_mpi -I$(top_srcdir)/src/56_io_mpi +src_56_mixing_fcflags = -I$(top_builddir)/src/56_mixing -I$(top_srcdir)/src/56_mixing +src_56_recipspace_fcflags = -I$(top_builddir)/src/56_recipspace -I$(top_srcdir)/src/56_recipspace +src_56_xc_fcflags = -I$(top_builddir)/src/56_xc -I$(top_srcdir)/src/56_xc +src_57_iopsp_parser_fcflags = -I$(top_builddir)/src/57_iopsp_parser -I$(top_srcdir)/src/57_iopsp_parser +src_57_iovars_fcflags = -I$(top_builddir)/src/57_iovars -I$(top_srcdir)/src/57_iovars +src_61_occeig_fcflags = -I$(top_builddir)/src/61_occeig -I$(top_srcdir)/src/61_occeig +src_62_cg_noabirule_fcflags = -I$(top_builddir)/src/62_cg_noabirule -I$(top_srcdir)/src/62_cg_noabirule +src_62_ctqmc_fcflags = -I$(top_builddir)/src/62_ctqmc -I$(top_srcdir)/src/62_ctqmc +src_62_iowfdenpot_fcflags = -I$(top_builddir)/src/62_iowfdenpot -I$(top_srcdir)/src/62_iowfdenpot +src_62_poisson_fcflags = -I$(top_builddir)/src/62_poisson -I$(top_srcdir)/src/62_poisson +src_62_wvl_wfs_fcflags = -I$(top_builddir)/src/62_wvl_wfs -I$(top_srcdir)/src/62_wvl_wfs +src_64_psp_fcflags = -I$(top_builddir)/src/64_psp -I$(top_srcdir)/src/64_psp +src_65_lotf_base_fcflags = -I$(top_builddir)/src/65_lotf_base -I$(top_srcdir)/src/65_lotf_base +src_65_paw_fcflags = -I$(top_builddir)/src/65_paw -I$(top_srcdir)/src/65_paw +src_66_nonlocal_fcflags = -I$(top_builddir)/src/66_nonlocal -I$(top_srcdir)/src/66_nonlocal +src_66_vdwxc_fcflags = -I$(top_builddir)/src/66_vdwxc -I$(top_srcdir)/src/66_vdwxc +src_66_wfs_fcflags = -I$(top_builddir)/src/66_wfs -I$(top_srcdir)/src/66_wfs +src_67_common_fcflags = -I$(top_builddir)/src/67_common -I$(top_srcdir)/src/67_common +src_67_python_invocation_ext_fcflags = -I$(top_builddir)/src/67_python_invocation_ext -I$(top_srcdir)/src/67_python_invocation_ext +src_67_triqs_ext_fcflags = -I$(top_builddir)/src/67_triqs_ext -I$(top_srcdir)/src/67_triqs_ext +src_68_dmft_fcflags = -I$(top_builddir)/src/68_dmft -I$(top_srcdir)/src/68_dmft +src_68_lotf_fcflags = -I$(top_builddir)/src/68_lotf -I$(top_srcdir)/src/68_lotf +src_68_recursion_fcflags = -I$(top_builddir)/src/68_recursion -I$(top_srcdir)/src/68_recursion +src_68_rsprc_fcflags = -I$(top_builddir)/src/68_rsprc -I$(top_srcdir)/src/68_rsprc +src_69_wfdesc_fcflags = -I$(top_builddir)/src/69_wfdesc -I$(top_srcdir)/src/69_wfdesc +src_70_gw_fcflags = -I$(top_builddir)/src/70_gw -I$(top_srcdir)/src/70_gw +src_71_bse_fcflags = -I$(top_builddir)/src/71_bse -I$(top_srcdir)/src/71_bse +src_71_wannier_fcflags = -I$(top_builddir)/src/71_wannier -I$(top_srcdir)/src/71_wannier +src_72_response_fcflags = -I$(top_builddir)/src/72_response -I$(top_srcdir)/src/72_response +src_77_ddb_fcflags = -I$(top_builddir)/src/77_ddb -I$(top_srcdir)/src/77_ddb +src_77_suscep_fcflags = -I$(top_builddir)/src/77_suscep -I$(top_srcdir)/src/77_suscep +src_78_effpot_fcflags = -I$(top_builddir)/src/78_effpot -I$(top_srcdir)/src/78_effpot +src_78_eph_fcflags = -I$(top_builddir)/src/78_eph -I$(top_srcdir)/src/78_eph +src_79_seqpar_mpi_fcflags = -I$(top_builddir)/src/79_seqpar_mpi -I$(top_srcdir)/src/79_seqpar_mpi +src_80_rttddft_fcflags = -I$(top_builddir)/src/80_rttddft -I$(top_srcdir)/src/80_rttddft +src_80_tdep_fcflags = -I$(top_builddir)/src/80_tdep -I$(top_srcdir)/src/80_tdep +src_94_scfcv_fcflags = -I$(top_builddir)/src/94_scfcv -I$(top_srcdir)/src/94_scfcv +src_95_drive_fcflags = -I$(top_builddir)/src/95_drive -I$(top_srcdir)/src/95_drive +src_common_fcflags = -I$(top_builddir)/shared/common/src/incs -I$(top_srcdir)/shared/common/src/incs -I$(top_builddir)/shared/common/src/mods -I$(top_srcdir)/shared/common/src/mods +src_core_fcflags = -I$(top_builddir)/src/incs -I$(top_srcdir)/src/incs -I$(top_builddir)/src/mods -I$(top_srcdir)/src/mods +src_libpaw_fcflags = -I$(top_builddir)/shared/libpaw/incs -I$(top_srcdir)/shared/libpaw/incs -I$(top_builddir)/shared/libpaw/mods -I$(top_srcdir)/shared/libpaw/mods +srcdir = . +sysconfdir = ${prefix}/etc +target = x86_64-apple-darwin18.7.0 +target_alias = +target_cpu = x86_64 +target_os = darwin18.7.0 +target_vendor = apple +top_build_prefix = ../../../../ +top_builddir = ../../../.. +top_srcdir = ../../../.. +with_abinit_common = +with_bigdft = +with_config_file = +with_debug_flavor = +with_fallbacks = +with_fc_vendor = +with_fc_version = +with_fft_flavor = fftw3 +with_fftw3 = +with_gnu_ld = +with_gpu = +with_hdf5 = /opt/local +with_kokkos = +with_levmar = +with_libpaw = +with_libpsml = +with_libxc = /opt/local +with_libxml2 = +with_linalg_flavor = openblas +with_mpi = /opt/local +with_mpi_level = +with_netcdf = /opt/local +with_optim_flavor = +with_papi = +with_pfft = +with_triqs = +with_wannier90 = +with_xmlf90 = +with_yakl = +AM_CFLAGS = -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include +AM_CXXFLAGS = $(sd_triqs_cxxflags) +AM_FCFLAGS = -ffree-form -J../mods +AM_CPPFLAGS = \ + -I$(top_builddir)/shared/common/src/02_clib -I$(top_srcdir)/shared/common/src/02_clib \ + -I$(top_builddir)/shared/common/src/10_defs -I$(top_srcdir)/shared/common/src/10_defs \ + -I$(top_builddir)/shared/common/src/12_hide_mpi -I$(top_srcdir)/shared/common/src/12_hide_mpi \ + -I$(top_builddir)/shared/common/src/14_hidewrite -I$(top_srcdir)/shared/common/src/14_hidewrite \ + -I$(top_builddir)/shared/common/src/16_hideleave -I$(top_srcdir)/shared/common/src/16_hideleave \ + -I$(top_builddir)/shared/common/src/18_timing -I$(top_srcdir)/shared/common/src/18_timing \ + -I$(top_builddir)/shared/common/src/incs -I$(top_srcdir)/shared/common/src/incs -I$(top_builddir)/shared/common/src/mods -I$(top_srcdir)/shared/common/src/mods \ + -I$(top_builddir)/src/incs -I$(top_srcdir)/src/incs -I$(top_builddir)/src/mods -I$(top_srcdir)/src/mods \ + -I$(top_builddir)/shared/libpaw/incs -I$(top_srcdir)/shared/libpaw/incs -I$(top_builddir)/shared/libpaw/mods -I$(top_srcdir)/shared/libpaw/mods \ + \ + -I/opt/local/include \ + -I/opt/local/include \ + + + +# Regular source files +lib18_timing_srcs = \ + m_xpapi.F90 \ + m_time.F90 + + +# Source files depending on conditionals + +# Library description +noinst_LIBRARIES = lib18_timing.a +lib18_timing_a_SOURCES = $(lib18_timing_srcs) + +# Dependencies (inside the directory) of directory 18_timing +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. +CLEANFILES = m_xpapi_cpp.f90 m_time_cpp.f90 m_time.$(MODEXT) \ + m_xpapi.$(MODEXT) +EXTRA_DIST = abinit.src abinit.dep _18_timing_ +all: all-am + +.SUFFIXES: +.SUFFIXES: .F90 .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu shared/common/src/18_timing/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu shared/common/src/18_timing/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) + +lib18_timing.a: $(lib18_timing_a_OBJECTS) $(lib18_timing_a_DEPENDENCIES) $(EXTRA_lib18_timing_a_DEPENDENCIES) + $(AM_V_at)-rm -f lib18_timing.a + $(AM_V_AR)$(lib18_timing_a_AR) lib18_timing.a $(lib18_timing_a_OBJECTS) $(lib18_timing_a_LIBADD) + $(AM_V_at)$(RANLIB) lib18_timing.a + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +.F90.o: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ $< + +.F90.obj: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-noinstLIBRARIES cscopelist-am ctags ctags-am distclean \ + distclean-compile distclean-generic distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am + +.PRECIOUS: Makefile + + +m_time.$(OBJEXT): m_xpapi.$(OBJEXT) + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/GX-PAW/common/src/18_timing/Makefile.am b/GX-PAW/common/src/18_timing/Makefile.am new file mode 100644 index 00000000..39372f58 --- /dev/null +++ b/GX-PAW/common/src/18_timing/Makefile.am @@ -0,0 +1,63 @@ +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-corelibs on 2024/03/16 21:07:38 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-corelibs script or its config file instead. +# + +AM_CFLAGS = @ABI_CPPFLAGS@ +AM_CXXFLAGS = $(sd_triqs_cxxflags) +AM_FCFLAGS = @FPPFLAGS@ @FCFLAGS_FREEFORM@ @FCFLAGS_MODDIR@ @sd_sys_fcflags@ @fcflags_opt_18_timing@ + +AM_CPPFLAGS = \ + @src_02_clib_fcflags@ \ + @src_10_defs_fcflags@ \ + @src_12_hide_mpi_fcflags@ \ + @src_14_hidewrite_fcflags@ \ + @src_16_hideleave_fcflags@ \ + @src_18_timing_fcflags@ \ + @src_common_fcflags@ \ + @src_core_fcflags@ \ + @src_libpaw_fcflags@ \ + @sd_papi_cppflags@ \ + @sd_mpi_cppflags@ \ + @sd_mpi_fcflags@ \ + @fc_mod_fcflags@ + +# Regular source files +lib18_timing_srcs = \ + m_xpapi.F90 \ + m_time.F90 + +# Source files depending on conditionals + + +# Library description +noinst_LIBRARIES = lib18_timing.a + +lib18_timing_a_SOURCES= $(lib18_timing_srcs) + +CLEANFILES = \ + m_xpapi_cpp.f90 \ + m_time_cpp.f90 + +EXTRA_DIST = abinit.src + +EXTRA_DIST += abinit.dep + +# Dependencies (inside the directory) of directory 18_timing +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. + +CLEANFILES += \ + m_time.$(MODEXT) \ + m_xpapi.$(MODEXT) + +m_time.$(OBJEXT): m_xpapi.$(OBJEXT) +EXTRA_DIST += _18_timing_ diff --git a/GX-PAW/common/src/18_timing/Makefile.in b/GX-PAW/common/src/18_timing/Makefile.in new file mode 100644 index 00000000..c09c2239 --- /dev/null +++ b/GX-PAW/common/src/18_timing/Makefile.in @@ -0,0 +1,1463 @@ +# Makefile.in generated by automake 1.16.3 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2020 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-corelibs on 2024/03/16 21:07:38 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-corelibs script or its config file instead. +# + +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = shared/common/src/18_timing +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/m4/arch-gpu.m4 \ + $(top_srcdir)/config/m4/arch-mpi.m4 \ + $(top_srcdir)/config/m4/auto-autotools.m4 \ + $(top_srcdir)/config/m4/auto-corelibs.m4 \ + $(top_srcdir)/config/m4/auto-debug.m4 \ + $(top_srcdir)/config/m4/auto-dirflags.m4 \ + $(top_srcdir)/config/m4/auto-env.m4 \ + $(top_srcdir)/config/m4/auto-hints.m4 \ + $(top_srcdir)/config/m4/auto-optim.m4 \ + $(top_srcdir)/config/m4/auto-options.m4 \ + $(top_srcdir)/config/m4/auto-output.m4 \ + $(top_srcdir)/config/m4/auto-triggers.m4 \ + $(top_srcdir)/config/m4/conf-atompaw.m4 \ + $(top_srcdir)/config/m4/conf-debug.m4 \ + $(top_srcdir)/config/m4/conf-fallbacks.m4 \ + $(top_srcdir)/config/m4/conf-files.m4 \ + $(top_srcdir)/config/m4/conf-init.m4 \ + $(top_srcdir)/config/m4/conf-openmp.m4 \ + $(top_srcdir)/config/m4/conf-optim.m4 \ + $(top_srcdir)/config/m4/lang-c++.m4 \ + $(top_srcdir)/config/m4/lang-c.m4 \ + $(top_srcdir)/config/m4/lang-fortran-import.m4 \ + $(top_srcdir)/config/m4/lang-fortran.m4 \ + $(top_srcdir)/config/m4/lang-python.m4 \ + $(top_srcdir)/config/m4/libxml2.m4 \ + $(top_srcdir)/config/m4/misc-display.m4 \ + $(top_srcdir)/config/m4/sd_abinit_common.m4 \ + $(top_srcdir)/config/m4/sd_arch_gpu.m4 \ + $(top_srcdir)/config/m4/sd_arch_mpi.m4 \ + $(top_srcdir)/config/m4/sd_bigdft.m4 \ + $(top_srcdir)/config/m4/sd_core.m4 \ + $(top_srcdir)/config/m4/sd_esl.m4 \ + $(top_srcdir)/config/m4/sd_fftw3.m4 \ + $(top_srcdir)/config/m4/sd_gpu_kokkos.m4 \ + $(top_srcdir)/config/m4/sd_gpu_yakl.m4 \ + $(top_srcdir)/config/m4/sd_io_hdf5.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf_fortran.m4 \ + $(top_srcdir)/config/m4/sd_levmar.m4 \ + $(top_srcdir)/config/m4/sd_libpaw.m4 \ + $(top_srcdir)/config/m4/sd_libpsml.m4 \ + $(top_srcdir)/config/m4/sd_libxc.m4 \ + $(top_srcdir)/config/m4/sd_math_fft.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_core.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_util.m4 \ + $(top_srcdir)/config/m4/sd_papi.m4 \ + $(top_srcdir)/config/m4/sd_pfft.m4 \ + $(top_srcdir)/config/m4/sd_triqs.m4 \ + $(top_srcdir)/config/m4/sd_wannier90.m4 \ + $(top_srcdir)/config/m4/sd_xmlf90.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = +lib18_timing_a_AR = $(AR) $(ARFLAGS) +lib18_timing_a_LIBADD = +am__objects_1 = m_xpapi.$(OBJEXT) m_time.$(OBJEXT) +am_lib18_timing_a_OBJECTS = $(am__objects_1) +lib18_timing_a_OBJECTS = $(am_lib18_timing_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +PPFCCOMPILE = $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) +AM_V_PPFC = $(am__v_PPFC_@AM_V@) +am__v_PPFC_ = $(am__v_PPFC_@AM_DEFAULT_V@) +am__v_PPFC_0 = @echo " PPFC " $@; +am__v_PPFC_1 = +FCLD = $(FC) +FCLINK = $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \ + $@ +AM_V_FCLD = $(am__v_FCLD_@AM_V@) +am__v_FCLD_ = $(am__v_FCLD_@AM_DEFAULT_V@) +am__v_FCLD_0 = @echo " FCLD " $@; +am__v_FCLD_1 = +SOURCES = $(lib18_timing_a_SOURCES) +DIST_SOURCES = $(lib18_timing_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ABINIT_BINARY_PACKAGE = @ABINIT_BINARY_PACKAGE@ +ABINIT_COMMON_CPPFLAGS = @ABINIT_COMMON_CPPFLAGS@ +ABINIT_COMMON_FCFLAGS = @ABINIT_COMMON_FCFLAGS@ +ABINIT_COMMON_LDFLAGS = @ABINIT_COMMON_LDFLAGS@ +ABINIT_COMMON_LIBS = @ABINIT_COMMON_LIBS@ +ABINIT_TARGET = @ABINIT_TARGET@ +ABINIT_VERSION = @ABINIT_VERSION@ +ABINIT_VERSION_BASE = @ABINIT_VERSION_BASE@ +ABINIT_VERSION_BUILD = @ABINIT_VERSION_BUILD@ +ABINIT_VERSION_MAJOR = @ABINIT_VERSION_MAJOR@ +ABINIT_VERSION_MICRO = @ABINIT_VERSION_MICRO@ +ABINIT_VERSION_MINOR = @ABINIT_VERSION_MINOR@ +ABI_CPPFLAGS = @ABI_CPPFLAGS@ +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +ARFLAGS = @ARFLAGS@ +ARFLAGS_CMD = @ARFLAGS_CMD@ +ARFLAGS_DEBUG = @ARFLAGS_DEBUG@ +ARFLAGS_EXTRA = @ARFLAGS_EXTRA@ +ARFLAGS_HINTS = @ARFLAGS_HINTS@ +ARFLAGS_OPTIM = @ARFLAGS_OPTIM@ +ATOMPAW_BIN = @ATOMPAW_BIN@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BIGDFT_CPPFLAGS = @BIGDFT_CPPFLAGS@ +BIGDFT_FCFLAGS = @BIGDFT_FCFLAGS@ +BIGDFT_LDFLAGS = @BIGDFT_LDFLAGS@ +BIGDFT_LIBS = @BIGDFT_LIBS@ +BOURNE_SHELL = @BOURNE_SHELL@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CC_LDFLAGS = @CC_LDFLAGS@ +CC_LDFLAGS_DEBUG = @CC_LDFLAGS_DEBUG@ +CC_LDFLAGS_EXTRA = @CC_LDFLAGS_EXTRA@ +CC_LDFLAGS_GPU = @CC_LDFLAGS_GPU@ +CC_LDFLAGS_HINTS = @CC_LDFLAGS_HINTS@ +CC_LDFLAGS_OPTIM = @CC_LDFLAGS_OPTIM@ +CC_LIBS = @CC_LIBS@ +CC_LIBS_DEBUG = @CC_LIBS_DEBUG@ +CC_LIBS_EXTRA = @CC_LIBS_EXTRA@ +CC_LIBS_GPU = @CC_LIBS_GPU@ +CC_LIBS_HINTS = @CC_LIBS_HINTS@ +CC_LIBS_OPTIM = @CC_LIBS_OPTIM@ +CFLAGS = @CFLAGS@ +CFLAGS_DEBUG = @CFLAGS_DEBUG@ +CFLAGS_EXTRA = @CFLAGS_EXTRA@ +CFLAGS_GPU = @CFLAGS_GPU@ +CFLAGS_HINTS = @CFLAGS_HINTS@ +CFLAGS_OPTIM = @CFLAGS_OPTIM@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CPPFLAGS_DEBUG = @CPPFLAGS_DEBUG@ +CPPFLAGS_EXTRA = @CPPFLAGS_EXTRA@ +CPPFLAGS_GPU = @CPPFLAGS_GPU@ +CPPFLAGS_HINTS = @CPPFLAGS_HINTS@ +CPPFLAGS_HINTS_EXT = @CPPFLAGS_HINTS_EXT@ +CPPFLAGS_OPTIM = @CPPFLAGS_OPTIM@ +CXX = @CXX@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CXXFLAGS_DEBUG = @CXXFLAGS_DEBUG@ +CXXFLAGS_EXTRA = @CXXFLAGS_EXTRA@ +CXXFLAGS_GPU = @CXXFLAGS_GPU@ +CXXFLAGS_HINTS = @CXXFLAGS_HINTS@ +CXXFLAGS_OPTIM = @CXXFLAGS_OPTIM@ +CXX_LDFLAGS = @CXX_LDFLAGS@ +CXX_LDFLAGS_DEBUG = @CXX_LDFLAGS_DEBUG@ +CXX_LDFLAGS_EXTRA = @CXX_LDFLAGS_EXTRA@ +CXX_LDFLAGS_GPU = @CXX_LDFLAGS_GPU@ +CXX_LDFLAGS_HINTS = @CXX_LDFLAGS_HINTS@ +CXX_LDFLAGS_OPTIM = @CXX_LDFLAGS_OPTIM@ +CXX_LIBS = @CXX_LIBS@ +CXX_LIBS_DEBUG = @CXX_LIBS_DEBUG@ +CXX_LIBS_EXTRA = @CXX_LIBS_EXTRA@ +CXX_LIBS_GPU = @CXX_LIBS_GPU@ +CXX_LIBS_HINTS = @CXX_LIBS_HINTS@ +CXX_LIBS_OPTIM = @CXX_LIBS_OPTIM@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ +FCFLAGS = @FCFLAGS@ +FCFLAGS_DEBUG = @FCFLAGS_DEBUG@ +FCFLAGS_EXTRA = @FCFLAGS_EXTRA@ +FCFLAGS_F90 = @FCFLAGS_F90@ +FCFLAGS_FIXEDFORM = @FCFLAGS_FIXEDFORM@ +FCFLAGS_FREEFORM = @FCFLAGS_FREEFORM@ +FCFLAGS_HINTS = @FCFLAGS_HINTS@ +FCFLAGS_MODDIR = @FCFLAGS_MODDIR@ +FCFLAGS_OPENMP = @FCFLAGS_OPENMP@ +FCFLAGS_OPENMP_OFFLOAD = @FCFLAGS_OPENMP_OFFLOAD@ +FCFLAGS_OPTIM = @FCFLAGS_OPTIM@ +FCLIBS = @FCLIBS@ +FC_LDFLAGS = @FC_LDFLAGS@ +FC_LDFLAGS_DEBUG = @FC_LDFLAGS_DEBUG@ +FC_LDFLAGS_EXTRA = @FC_LDFLAGS_EXTRA@ +FC_LDFLAGS_HINTS = @FC_LDFLAGS_HINTS@ +FC_LDFLAGS_OPTIM = @FC_LDFLAGS_OPTIM@ +FC_LIBS = @FC_LIBS@ +FC_LIBS_DEBUG = @FC_LIBS_DEBUG@ +FC_LIBS_EXTRA = @FC_LIBS_EXTRA@ +FC_LIBS_HINTS = @FC_LIBS_HINTS@ +FC_LIBS_OPTIM = @FC_LIBS_OPTIM@ +FC_NOWRAP = @FC_NOWRAP@ +FFLAGS = @FFLAGS@ +FFTW3_CFLAGS = @FFTW3_CFLAGS@ +FFTW3_CPPFLAGS = @FFTW3_CPPFLAGS@ +FFTW3_FCFLAGS = @FFTW3_FCFLAGS@ +FFTW3_LDFLAGS = @FFTW3_LDFLAGS@ +FFTW3_LIBS = @FFTW3_LIBS@ +FFT_CFLAGS = @FFT_CFLAGS@ +FFT_FCFLAGS = @FFT_FCFLAGS@ +FPP = @FPP@ +FPPFLAGS = @FPPFLAGS@ +FPPFLAGS_DEBUG = @FPPFLAGS_DEBUG@ +FPPFLAGS_EXTRA = @FPPFLAGS_EXTRA@ +FPPFLAGS_HINTS = @FPPFLAGS_HINTS@ +FPPFLAGS_OPTIM = @FPPFLAGS_OPTIM@ +GPU_ARCH = @GPU_ARCH@ +GPU_CFLAGS = @GPU_CFLAGS@ +GPU_CPPFLAGS = @GPU_CPPFLAGS@ +GPU_CXXFLAGS = @GPU_CXXFLAGS@ +GPU_FCFLAGS = @GPU_FCFLAGS@ +GPU_LDFLAGS = @GPU_LDFLAGS@ +GPU_LIBS = @GPU_LIBS@ +GRAPHATOM_BIN = @GRAPHATOM_BIN@ +GREP = @GREP@ +H5CC = @H5CC@ +HDF5_CFLAGS = @HDF5_CFLAGS@ +HDF5_CPPFLAGS = @HDF5_CPPFLAGS@ +HDF5_CXXFLAGS = @HDF5_CXXFLAGS@ +HDF5_FCFLAGS = @HDF5_FCFLAGS@ +HDF5_LDFLAGS = @HDF5_LDFLAGS@ +HDF5_LIBS = @HDF5_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +LDFLAGS = @LDFLAGS@ +LEVMAR_CFLAGS = @LEVMAR_CFLAGS@ +LEVMAR_CPPFLAGS = @LEVMAR_CPPFLAGS@ +LEVMAR_LDFLAGS = @LEVMAR_LDFLAGS@ +LEVMAR_LIBS = @LEVMAR_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPAW_CPPFLAGS = @LIBPAW_CPPFLAGS@ +LIBPAW_FCFLAGS = @LIBPAW_FCFLAGS@ +LIBPAW_LDFLAGS = @LIBPAW_LDFLAGS@ +LIBPAW_LIBS = @LIBPAW_LIBS@ +LIBPSML_CPPFLAGS = @LIBPSML_CPPFLAGS@ +LIBPSML_FCFLAGS = @LIBPSML_FCFLAGS@ +LIBPSML_LDFLAGS = @LIBPSML_LDFLAGS@ +LIBPSML_LIBS = @LIBPSML_LIBS@ +LIBS = @LIBS@ +LIBXC_CFLAGS = @LIBXC_CFLAGS@ +LIBXC_CPPFLAGS = @LIBXC_CPPFLAGS@ +LIBXC_FCFLAGS = @LIBXC_FCFLAGS@ +LIBXC_LDFLAGS = @LIBXC_LDFLAGS@ +LIBXC_LIBS = @LIBXC_LIBS@ +LIBXML2_CPPFLAGS = @LIBXML2_CPPFLAGS@ +LIBXML2_FCFLAGS = @LIBXML2_FCFLAGS@ +LIBXML2_LIBS = @LIBXML2_LIBS@ +LINALG_CFLAGS = @LINALG_CFLAGS@ +LINALG_CPPFLAGS = @LINALG_CPPFLAGS@ +LINALG_CXXFLAGS = @LINALG_CXXFLAGS@ +LINALG_FCFLAGS = @LINALG_FCFLAGS@ +LINALG_LDFLAGS = @LINALG_LDFLAGS@ +LINALG_LIBS = @LINALG_LIBS@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODEXT = @MODEXT@ +MPI_CFLAGS = @MPI_CFLAGS@ +MPI_CPPFLAGS = @MPI_CPPFLAGS@ +MPI_CXXFLAGS = @MPI_CXXFLAGS@ +MPI_FCFLAGS = @MPI_FCFLAGS@ +MPI_LDFLAGS = @MPI_LDFLAGS@ +MPI_LIBS = @MPI_LIBS@ +MV = @MV@ +NETCDF_CFLAGS = @NETCDF_CFLAGS@ +NETCDF_CPPFLAGS = @NETCDF_CPPFLAGS@ +NETCDF_CXXFLAGS = @NETCDF_CXXFLAGS@ +NETCDF_FCFLAGS = @NETCDF_FCFLAGS@ +NETCDF_FORTRAN_CFLAGS = @NETCDF_FORTRAN_CFLAGS@ +NETCDF_FORTRAN_CPPFLAGS = @NETCDF_FORTRAN_CPPFLAGS@ +NETCDF_FORTRAN_CXXFLAGS = @NETCDF_FORTRAN_CXXFLAGS@ +NETCDF_FORTRAN_FCFLAGS = @NETCDF_FORTRAN_FCFLAGS@ +NETCDF_FORTRAN_LDFLAGS = @NETCDF_FORTRAN_LDFLAGS@ +NETCDF_FORTRAN_LIBS = @NETCDF_FORTRAN_LIBS@ +NETCDF_LDFLAGS = @NETCDF_LDFLAGS@ +NETCDF_LIBS = @NETCDF_LIBS@ +NVCC = @NVCC@ +NVCC_CFLAGS = @NVCC_CFLAGS@ +NVCC_CPPFLAGS = @NVCC_CPPFLAGS@ +NVCC_LDFLAGS = @NVCC_LDFLAGS@ +NVCC_LIBS = @NVCC_LIBS@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PAPI_CFLAGS = @PAPI_CFLAGS@ +PAPI_CPPFLAGS = @PAPI_CPPFLAGS@ +PAPI_LDFLAGS = @PAPI_LDFLAGS@ +PAPI_LIBS = @PAPI_LIBS@ +PATCH = @PATCH@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PFFT_CFLAGS = @PFFT_CFLAGS@ +PFFT_CPPFLAGS = @PFFT_CPPFLAGS@ +PFFT_LDFLAGS = @PFFT_LDFLAGS@ +PFFT_LIBS = @PFFT_LIBS@ +PYFLAGS = @PYFLAGS@ +PYTHON = @PYTHON@ +PYTHON_CONFIG = @PYTHON_CONFIG@ +PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ +RANLIB = @RANLIB@ +REALPATH = @REALPATH@ +RM = @RM@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +TAR = @TAR@ +TRIQS_CFLAGS = @TRIQS_CFLAGS@ +TRIQS_CPPFLAGS = @TRIQS_CPPFLAGS@ +TRIQS_CXXFLAGS = @TRIQS_CXXFLAGS@ +TRIQS_LDFLAGS = @TRIQS_LDFLAGS@ +TRIQS_LIBS = @TRIQS_LIBS@ +TRUE_CPP = @TRUE_CPP@ +VERSION = @VERSION@ +WANNIER90_CPPFLAGS = @WANNIER90_CPPFLAGS@ +WANNIER90_FCFLAGS = @WANNIER90_FCFLAGS@ +WANNIER90_LDFLAGS = @WANNIER90_LDFLAGS@ +WANNIER90_LIBS = @WANNIER90_LIBS@ +XML2_CONFIG = @XML2_CONFIG@ +XMLF90_CPPFLAGS = @XMLF90_CPPFLAGS@ +XMLF90_FCFLAGS = @XMLF90_FCFLAGS@ +XMLF90_LDFLAGS = @XMLF90_LDFLAGS@ +XMLF90_LIBS = @XMLF90_LIBS@ +XML_CPPFLAGS = @XML_CPPFLAGS@ +XML_LIBS = @XML_LIBS@ +XPP = @XPP@ +XPPFLAGS = @XPPFLAGS@ +XPPFLAGS_DEBUG = @XPPFLAGS_DEBUG@ +XPPFLAGS_EXTRA = @XPPFLAGS_EXTRA@ +XPPFLAGS_OPTIM = @XPPFLAGS_OPTIM@ +YAKL_CPPFLAGS = @YAKL_CPPFLAGS@ +YAKL_FCFLAGS = @YAKL_FCFLAGS@ +YAKL_LDFLAGS = @YAKL_LDFLAGS@ +YAKL_LIBS = @YAKL_LIBS@ +abi_ac_distcheck = @abi_ac_distcheck@ +abi_ac_version = @abi_ac_version@ +abi_am_version = @abi_am_version@ +abi_avx_safe_mode_enable = @abi_avx_safe_mode_enable@ +abi_bse_unpacked_enable = @abi_bse_unpacked_enable@ +abi_cc_path = @abi_cc_path@ +abi_cc_vendor = @abi_cc_vendor@ +abi_cc_version = @abi_cc_version@ +abi_cclock_enable = @abi_cclock_enable@ +abi_cpp_path = @abi_cpp_path@ +abi_cpu_64bits = @abi_cpu_64bits@ +abi_cpu_bits = @abi_cpu_bits@ +abi_cpu_model = @abi_cpu_model@ +abi_cpu_platform = @abi_cpu_platform@ +abi_cpu_spec = @abi_cpu_spec@ +abi_cpu_vendor = @abi_cpu_vendor@ +abi_crpa_optim_enable = @abi_crpa_optim_enable@ +abi_cxx_path = @abi_cxx_path@ +abi_cxx_vendor = @abi_cxx_vendor@ +abi_cxx_version = @abi_cxx_version@ +abi_debug_flavor = @abi_debug_flavor@ +abi_exports_enable = @abi_exports_enable@ +abi_fbk_abinit_common_ok = @abi_fbk_abinit_common_ok@ +abi_fbk_bigdft_ok = @abi_fbk_bigdft_ok@ +abi_fbk_config = @abi_fbk_config@ +abi_fbk_enable = @abi_fbk_enable@ +abi_fbk_fft_ok = @abi_fbk_fft_ok@ +abi_fbk_fftw3_ok = @abi_fbk_fftw3_ok@ +abi_fbk_gpu_ok = @abi_fbk_gpu_ok@ +abi_fbk_hdf5_ok = @abi_fbk_hdf5_ok@ +abi_fbk_init = @abi_fbk_init@ +abi_fbk_kokkos_ok = @abi_fbk_kokkos_ok@ +abi_fbk_levmar_ok = @abi_fbk_levmar_ok@ +abi_fbk_libpaw_ok = @abi_fbk_libpaw_ok@ +abi_fbk_libpsml_ok = @abi_fbk_libpsml_ok@ +abi_fbk_libxc_ok = @abi_fbk_libxc_ok@ +abi_fbk_libxml2_ok = @abi_fbk_libxml2_ok@ +abi_fbk_linalg_ok = @abi_fbk_linalg_ok@ +abi_fbk_list = @abi_fbk_list@ +abi_fbk_mpi_ok = @abi_fbk_mpi_ok@ +abi_fbk_netcdf_fortran_ok = @abi_fbk_netcdf_fortran_ok@ +abi_fbk_netcdf_ok = @abi_fbk_netcdf_ok@ +abi_fbk_papi_ok = @abi_fbk_papi_ok@ +abi_fbk_pfft_ok = @abi_fbk_pfft_ok@ +abi_fbk_prefix = @abi_fbk_prefix@ +abi_fbk_required = @abi_fbk_required@ +abi_fbk_triqs_ok = @abi_fbk_triqs_ok@ +abi_fbk_wannier90_ok = @abi_fbk_wannier90_ok@ +abi_fbk_xmlf90_ok = @abi_fbk_xmlf90_ok@ +abi_fbk_yakl_ok = @abi_fbk_yakl_ok@ +abi_fc_path = @abi_fc_path@ +abi_fc_vendor = @abi_fc_vendor@ +abi_fc_version = @abi_fc_version@ +abi_fc_wrap = @abi_fc_wrap@ +abi_fc_wrapper_enable = @abi_fc_wrapper_enable@ +abi_fpp_path = @abi_fpp_path@ +abi_gpu_arch = @abi_gpu_arch@ +abi_gpu_fcflags = @abi_gpu_fcflags@ +abi_gpu_flavor = @abi_gpu_flavor@ +abi_gpu_hip_libdir = @abi_gpu_hip_libdir@ +abi_gpu_incs = @abi_gpu_incs@ +abi_gpu_ldflags = @abi_gpu_ldflags@ +abi_gpu_libs = @abi_gpu_libs@ +abi_gpu_nvtx_v3 = @abi_gpu_nvtx_v3@ +abi_gpu_roctx = @abi_gpu_roctx@ +abi_gw_dpc_enable = @abi_gw_dpc_enable@ +abi_hints_enable = @abi_hints_enable@ +abi_libtetra_enable = @abi_libtetra_enable@ +abi_libxml2_cppflags = @abi_libxml2_cppflags@ +abi_libxml2_enable = @abi_libxml2_enable@ +abi_libxml2_fcflags = @abi_libxml2_fcflags@ +abi_libxml2_init = @abi_libxml2_init@ +abi_libxml2_ldflags = @abi_libxml2_ldflags@ +abi_libxml2_libs = @abi_libxml2_libs@ +abi_libxml2_ok = @abi_libxml2_ok@ +abi_libxml2_prefix = @abi_libxml2_prefix@ +abi_lotf_enable = @abi_lotf_enable@ +abi_lt_version = @abi_lt_version@ +abi_m4_version = @abi_m4_version@ +abi_memory_profiling_enable = @abi_memory_profiling_enable@ +abi_mpi_cflags = @abi_mpi_cflags@ +abi_mpi_cppflags = @abi_mpi_cppflags@ +abi_mpi_cxxflags = @abi_mpi_cxxflags@ +abi_mpi_enable = @abi_mpi_enable@ +abi_mpi_fcflags = @abi_mpi_fcflags@ +abi_mpi_flavor = @abi_mpi_flavor@ +abi_mpi_gpu_aware_enable = @abi_mpi_gpu_aware_enable@ +abi_mpi_incs = @abi_mpi_incs@ +abi_mpi_inplace_enable = @abi_mpi_inplace_enable@ +abi_mpi_interfaces_bugfix_enable = @abi_mpi_interfaces_bugfix_enable@ +abi_mpi_io_default_enable = @abi_mpi_io_default_enable@ +abi_mpi_io_enable = @abi_mpi_io_enable@ +abi_mpi_ldflags = @abi_mpi_ldflags@ +abi_mpi_level = @abi_mpi_level@ +abi_mpi_libs = @abi_mpi_libs@ +abi_netcdf_default_enable = @abi_netcdf_default_enable@ +abi_openmp_enable = @abi_openmp_enable@ +abi_openmp_offload_enable = @abi_openmp_offload_enable@ +abi_optim_flavor = @abi_optim_flavor@ +abi_python_invocation_enable = @abi_python_invocation_enable@ +abi_source_debug_enable = @abi_source_debug_enable@ +abi_stdin_enable = @abi_stdin_enable@ +abi_sys_spec = @abi_sys_spec@ +abi_timer_enable = @abi_timer_enable@ +abi_triqs_v1_4_enable = @abi_triqs_v1_4_enable@ +abi_triqs_v2_0_enable = @abi_triqs_v2_0_enable@ +abi_zdot_bugfix_enable = @abi_zdot_bugfix_enable@ +abinit_bindir = @abinit_bindir@ +abinit_builddir = @abinit_builddir@ +abinit_chkdir = @abinit_chkdir@ +abinit_datdir = @abinit_datdir@ +abinit_docdir = @abinit_docdir@ +abinit_incdir = @abinit_incdir@ +abinit_libdir = @abinit_libdir@ +abinit_mandir = @abinit_mandir@ +abinit_prefix = @abinit_prefix@ +abinit_srcdir = @abinit_srcdir@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_FC = @ac_ct_FC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cc_info_string = @cc_info_string@ +cxx_info_string = @cxx_info_string@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +enable_avx_safe_mode = @enable_avx_safe_mode@ +enable_bse_unpacked = @enable_bse_unpacked@ +enable_cclock = @enable_cclock@ +enable_crpa_optim = @enable_crpa_optim@ +enable_exports = @enable_exports@ +enable_fc_wrapper = @enable_fc_wrapper@ +enable_gw_dpc = @enable_gw_dpc@ +enable_hints = @enable_hints@ +enable_libtetra = @enable_libtetra@ +enable_lotf = @enable_lotf@ +enable_memory_profiling = @enable_memory_profiling@ +enable_mpi_gpu_aware = @enable_mpi_gpu_aware@ +enable_mpi_inplace = @enable_mpi_inplace@ +enable_mpi_interfaces_bugfix = @enable_mpi_interfaces_bugfix@ +enable_mpi_io = @enable_mpi_io@ +enable_mpi_io_default = @enable_mpi_io_default@ +enable_netcdf_default = @enable_netcdf_default@ +enable_openmp = @enable_openmp@ +enable_openmp_offload = @enable_openmp_offload@ +enable_python_invocation = @enable_python_invocation@ +enable_shared = @enable_shared@ +enable_source_debug = @enable_source_debug@ +enable_static = @enable_static@ +enable_stdin = @enable_stdin@ +enable_timer = @enable_timer@ +enable_triqs_v1_4 = @enable_triqs_v1_4@ +enable_triqs_v2_0 = @enable_triqs_v2_0@ +enable_zdot_bugfix = @enable_zdot_bugfix@ +exec_prefix = @exec_prefix@ +fc_info_string = @fc_info_string@ +fc_mod_fcflags = @fc_mod_fcflags@ +fc_timing = @fc_timing@ +fcflags_opt_02_clib = @fcflags_opt_02_clib@ +fcflags_opt_10_defs = @fcflags_opt_10_defs@ +fcflags_opt_11_memory_mpi = @fcflags_opt_11_memory_mpi@ +fcflags_opt_12_hide_mpi = @fcflags_opt_12_hide_mpi@ +fcflags_opt_14_hidewrite = @fcflags_opt_14_hidewrite@ +fcflags_opt_16_hideleave = @fcflags_opt_16_hideleave@ +fcflags_opt_16_kokkos_toolbox = @fcflags_opt_16_kokkos_toolbox@ +fcflags_opt_17_gpu_toolbox = @fcflags_opt_17_gpu_toolbox@ +fcflags_opt_17_libtetra_ext = @fcflags_opt_17_libtetra_ext@ +fcflags_opt_17_minimax = @fcflags_opt_17_minimax@ +fcflags_opt_17_yaml_out = @fcflags_opt_17_yaml_out@ +fcflags_opt_18_timing = @fcflags_opt_18_timing@ +fcflags_opt_21_hashfuncs = @fcflags_opt_21_hashfuncs@ +fcflags_opt_27_toolbox_oop = @fcflags_opt_27_toolbox_oop@ +fcflags_opt_28_numeric_noabirule = @fcflags_opt_28_numeric_noabirule@ +fcflags_opt_29_kpoints = @fcflags_opt_29_kpoints@ +fcflags_opt_32_util = @fcflags_opt_32_util@ +fcflags_opt_33_xc_lowlevel = @fcflags_opt_33_xc_lowlevel@ +fcflags_opt_39_libpaw = @fcflags_opt_39_libpaw@ +fcflags_opt_41_geometry = @fcflags_opt_41_geometry@ +fcflags_opt_42_nlstrain = @fcflags_opt_42_nlstrain@ +fcflags_opt_42_parser = @fcflags_opt_42_parser@ +fcflags_opt_43_ptgroups = @fcflags_opt_43_ptgroups@ +fcflags_opt_43_wvl_wrappers = @fcflags_opt_43_wvl_wrappers@ +fcflags_opt_44_abitools = @fcflags_opt_44_abitools@ +fcflags_opt_44_abitypes_defs = @fcflags_opt_44_abitypes_defs@ +fcflags_opt_44_manage_kokkos = @fcflags_opt_44_manage_kokkos@ +fcflags_opt_45_geomoptim = @fcflags_opt_45_geomoptim@ +fcflags_opt_45_xgTools = @fcflags_opt_45_xgTools@ +fcflags_opt_46_ghc_omp = @fcflags_opt_46_ghc_omp@ +fcflags_opt_46_manage_cuda = @fcflags_opt_46_manage_cuda@ +fcflags_opt_48_diago = @fcflags_opt_48_diago@ +fcflags_opt_49_gw_toolbox_oop = @fcflags_opt_49_gw_toolbox_oop@ +fcflags_opt_51_manage_mpi = @fcflags_opt_51_manage_mpi@ +fcflags_opt_52_fft_mpi_noabirule = @fcflags_opt_52_fft_mpi_noabirule@ +fcflags_opt_53_ffts = @fcflags_opt_53_ffts@ +fcflags_opt_54_spacepar = @fcflags_opt_54_spacepar@ +fcflags_opt_55_abiutil = @fcflags_opt_55_abiutil@ +fcflags_opt_56_io_mpi = @fcflags_opt_56_io_mpi@ +fcflags_opt_56_mixing = @fcflags_opt_56_mixing@ +fcflags_opt_56_recipspace = @fcflags_opt_56_recipspace@ +fcflags_opt_56_xc = @fcflags_opt_56_xc@ +fcflags_opt_57_iopsp_parser = @fcflags_opt_57_iopsp_parser@ +fcflags_opt_57_iovars = @fcflags_opt_57_iovars@ +fcflags_opt_61_occeig = @fcflags_opt_61_occeig@ +fcflags_opt_62_cg_noabirule = @fcflags_opt_62_cg_noabirule@ +fcflags_opt_62_ctqmc = @fcflags_opt_62_ctqmc@ +fcflags_opt_62_iowfdenpot = @fcflags_opt_62_iowfdenpot@ +fcflags_opt_62_poisson = @fcflags_opt_62_poisson@ +fcflags_opt_62_wvl_wfs = @fcflags_opt_62_wvl_wfs@ +fcflags_opt_64_psp = @fcflags_opt_64_psp@ +fcflags_opt_65_lotf_base = @fcflags_opt_65_lotf_base@ +fcflags_opt_65_paw = @fcflags_opt_65_paw@ +fcflags_opt_66_nonlocal = @fcflags_opt_66_nonlocal@ +fcflags_opt_66_vdwxc = @fcflags_opt_66_vdwxc@ +fcflags_opt_66_wfs = @fcflags_opt_66_wfs@ +fcflags_opt_67_common = @fcflags_opt_67_common@ +fcflags_opt_67_python_invocation_ext = @fcflags_opt_67_python_invocation_ext@ +fcflags_opt_67_triqs_ext = @fcflags_opt_67_triqs_ext@ +fcflags_opt_68_dmft = @fcflags_opt_68_dmft@ +fcflags_opt_68_lotf = @fcflags_opt_68_lotf@ +fcflags_opt_68_recursion = @fcflags_opt_68_recursion@ +fcflags_opt_68_rsprc = @fcflags_opt_68_rsprc@ +fcflags_opt_69_wfdesc = @fcflags_opt_69_wfdesc@ +fcflags_opt_70_gw = @fcflags_opt_70_gw@ +fcflags_opt_71_bse = @fcflags_opt_71_bse@ +fcflags_opt_71_wannier = @fcflags_opt_71_wannier@ +fcflags_opt_72_response = @fcflags_opt_72_response@ +fcflags_opt_77_ddb = @fcflags_opt_77_ddb@ +fcflags_opt_77_suscep = @fcflags_opt_77_suscep@ +fcflags_opt_78_effpot = @fcflags_opt_78_effpot@ +fcflags_opt_78_eph = @fcflags_opt_78_eph@ +fcflags_opt_79_seqpar_mpi = @fcflags_opt_79_seqpar_mpi@ +fcflags_opt_80_rttddft = @fcflags_opt_80_rttddft@ +fcflags_opt_80_tdep = @fcflags_opt_80_tdep@ +fcflags_opt_94_scfcv = @fcflags_opt_94_scfcv@ +fcflags_opt_95_drive = @fcflags_opt_95_drive@ +fcflags_opt_98_main = @fcflags_opt_98_main@ +fcflags_opt_bigdft = @fcflags_opt_bigdft@ +fcflags_opt_default = @fcflags_opt_default@ +fcflags_opt_hdf5 = @fcflags_opt_hdf5@ +fcflags_opt_levmar = @fcflags_opt_levmar@ +fcflags_opt_libpsml = @fcflags_opt_libpsml@ +fcflags_opt_libxc = @fcflags_opt_libxc@ +fcflags_opt_libxml2 = @fcflags_opt_libxml2@ +fcflags_opt_linalg = @fcflags_opt_linalg@ +fcflags_opt_netcdf = @fcflags_opt_netcdf@ +fcflags_opt_netcdf_fortran = @fcflags_opt_netcdf_fortran@ +fcflags_opt_papi = @fcflags_opt_papi@ +fcflags_opt_triqs = @fcflags_opt_triqs@ +fcflags_opt_wannier90 = @fcflags_opt_wannier90@ +fcflags_opt_xmlf90 = @fcflags_opt_xmlf90@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sd_abinit_common_cppflags = @sd_abinit_common_cppflags@ +sd_abinit_common_enable = @sd_abinit_common_enable@ +sd_abinit_common_enable_def = @sd_abinit_common_enable_def@ +sd_abinit_common_fcflags = @sd_abinit_common_fcflags@ +sd_abinit_common_init = @sd_abinit_common_init@ +sd_abinit_common_ldflags = @sd_abinit_common_ldflags@ +sd_abinit_common_libs = @sd_abinit_common_libs@ +sd_abinit_common_ok = @sd_abinit_common_ok@ +sd_abinit_common_options = @sd_abinit_common_options@ +sd_abinit_common_policy = @sd_abinit_common_policy@ +sd_abinit_common_status = @sd_abinit_common_status@ +sd_bigdft_cppflags = @sd_bigdft_cppflags@ +sd_bigdft_enable = @sd_bigdft_enable@ +sd_bigdft_enable_def = @sd_bigdft_enable_def@ +sd_bigdft_fcflags = @sd_bigdft_fcflags@ +sd_bigdft_init = @sd_bigdft_init@ +sd_bigdft_ldflags = @sd_bigdft_ldflags@ +sd_bigdft_libs = @sd_bigdft_libs@ +sd_bigdft_ok = @sd_bigdft_ok@ +sd_bigdft_options = @sd_bigdft_options@ +sd_bigdft_policy = @sd_bigdft_policy@ +sd_bigdft_status = @sd_bigdft_status@ +sd_fft_cflags = @sd_fft_cflags@ +sd_fft_choices = @sd_fft_choices@ +sd_fft_cppflags = @sd_fft_cppflags@ +sd_fft_cxxflags = @sd_fft_cxxflags@ +sd_fft_enable = @sd_fft_enable@ +sd_fft_fcflags = @sd_fft_fcflags@ +sd_fft_flavor = @sd_fft_flavor@ +sd_fft_init = @sd_fft_init@ +sd_fft_ldflags = @sd_fft_ldflags@ +sd_fft_libs = @sd_fft_libs@ +sd_fft_ok = @sd_fft_ok@ +sd_fftw3_cflags = @sd_fftw3_cflags@ +sd_fftw3_cppflags = @sd_fftw3_cppflags@ +sd_fftw3_enable = @sd_fftw3_enable@ +sd_fftw3_enable_def = @sd_fftw3_enable_def@ +sd_fftw3_fcflags = @sd_fftw3_fcflags@ +sd_fftw3_init = @sd_fftw3_init@ +sd_fftw3_ldflags = @sd_fftw3_ldflags@ +sd_fftw3_libs = @sd_fftw3_libs@ +sd_fftw3_ok = @sd_fftw3_ok@ +sd_fftw3_options = @sd_fftw3_options@ +sd_fftw3_policy = @sd_fftw3_policy@ +sd_fftw3_status = @sd_fftw3_status@ +sd_gpu_cflags = @sd_gpu_cflags@ +sd_gpu_cppflags = @sd_gpu_cppflags@ +sd_gpu_cxxflags = @sd_gpu_cxxflags@ +sd_gpu_enable = @sd_gpu_enable@ +sd_gpu_enable_def = @sd_gpu_enable_def@ +sd_gpu_fcflags = @sd_gpu_fcflags@ +sd_gpu_init = @sd_gpu_init@ +sd_gpu_ldflags = @sd_gpu_ldflags@ +sd_gpu_libs = @sd_gpu_libs@ +sd_gpu_ok = @sd_gpu_ok@ +sd_gpu_options = @sd_gpu_options@ +sd_gpu_policy = @sd_gpu_policy@ +sd_gpu_prefix = @sd_gpu_prefix@ +sd_gpu_status = @sd_gpu_status@ +sd_hdf5_cflags = @sd_hdf5_cflags@ +sd_hdf5_cppflags = @sd_hdf5_cppflags@ +sd_hdf5_cxxflags = @sd_hdf5_cxxflags@ +sd_hdf5_enable = @sd_hdf5_enable@ +sd_hdf5_enable_def = @sd_hdf5_enable_def@ +sd_hdf5_enable_fc = @sd_hdf5_enable_fc@ +sd_hdf5_fcflags = @sd_hdf5_fcflags@ +sd_hdf5_h5cc = @sd_hdf5_h5cc@ +sd_hdf5_h5fc = @sd_hdf5_h5fc@ +sd_hdf5_init = @sd_hdf5_init@ +sd_hdf5_ldflags = @sd_hdf5_ldflags@ +sd_hdf5_libs = @sd_hdf5_libs@ +sd_hdf5_ok = @sd_hdf5_ok@ +sd_hdf5_options = @sd_hdf5_options@ +sd_hdf5_policy = @sd_hdf5_policy@ +sd_hdf5_status = @sd_hdf5_status@ +sd_kokkos_cppflags = @sd_kokkos_cppflags@ +sd_kokkos_cxxflags = @sd_kokkos_cxxflags@ +sd_kokkos_enable = @sd_kokkos_enable@ +sd_kokkos_enable_def = @sd_kokkos_enable_def@ +sd_kokkos_init = @sd_kokkos_init@ +sd_kokkos_ldflags = @sd_kokkos_ldflags@ +sd_kokkos_libs = @sd_kokkos_libs@ +sd_kokkos_ok = @sd_kokkos_ok@ +sd_kokkos_options = @sd_kokkos_options@ +sd_kokkos_policy = @sd_kokkos_policy@ +sd_kokkos_status = @sd_kokkos_status@ +sd_levmar_cflags = @sd_levmar_cflags@ +sd_levmar_cppflags = @sd_levmar_cppflags@ +sd_levmar_enable = @sd_levmar_enable@ +sd_levmar_enable_def = @sd_levmar_enable_def@ +sd_levmar_init = @sd_levmar_init@ +sd_levmar_ldflags = @sd_levmar_ldflags@ +sd_levmar_libs = @sd_levmar_libs@ +sd_levmar_ok = @sd_levmar_ok@ +sd_levmar_options = @sd_levmar_options@ +sd_levmar_policy = @sd_levmar_policy@ +sd_levmar_status = @sd_levmar_status@ +sd_libpaw_cppflags = @sd_libpaw_cppflags@ +sd_libpaw_enable = @sd_libpaw_enable@ +sd_libpaw_enable_def = @sd_libpaw_enable_def@ +sd_libpaw_fcflags = @sd_libpaw_fcflags@ +sd_libpaw_init = @sd_libpaw_init@ +sd_libpaw_ldflags = @sd_libpaw_ldflags@ +sd_libpaw_libs = @sd_libpaw_libs@ +sd_libpaw_ok = @sd_libpaw_ok@ +sd_libpaw_options = @sd_libpaw_options@ +sd_libpaw_policy = @sd_libpaw_policy@ +sd_libpaw_status = @sd_libpaw_status@ +sd_libpsml_cppflags = @sd_libpsml_cppflags@ +sd_libpsml_enable = @sd_libpsml_enable@ +sd_libpsml_enable_def = @sd_libpsml_enable_def@ +sd_libpsml_fcflags = @sd_libpsml_fcflags@ +sd_libpsml_init = @sd_libpsml_init@ +sd_libpsml_ldflags = @sd_libpsml_ldflags@ +sd_libpsml_libs = @sd_libpsml_libs@ +sd_libpsml_ok = @sd_libpsml_ok@ +sd_libpsml_options = @sd_libpsml_options@ +sd_libpsml_policy = @sd_libpsml_policy@ +sd_libpsml_status = @sd_libpsml_status@ +sd_libxc_cflags = @sd_libxc_cflags@ +sd_libxc_cppflags = @sd_libxc_cppflags@ +sd_libxc_enable = @sd_libxc_enable@ +sd_libxc_enable_def = @sd_libxc_enable_def@ +sd_libxc_enable_fc = @sd_libxc_enable_fc@ +sd_libxc_fcflags = @sd_libxc_fcflags@ +sd_libxc_init = @sd_libxc_init@ +sd_libxc_ldflags = @sd_libxc_ldflags@ +sd_libxc_libs = @sd_libxc_libs@ +sd_libxc_ok = @sd_libxc_ok@ +sd_libxc_options = @sd_libxc_options@ +sd_libxc_policy = @sd_libxc_policy@ +sd_libxc_status = @sd_libxc_status@ +sd_linalg_cflags = @sd_linalg_cflags@ +sd_linalg_choices = @sd_linalg_choices@ +sd_linalg_cppflags = @sd_linalg_cppflags@ +sd_linalg_cxxflags = @sd_linalg_cxxflags@ +sd_linalg_enable = @sd_linalg_enable@ +sd_linalg_fcflags = @sd_linalg_fcflags@ +sd_linalg_flavor = @sd_linalg_flavor@ +sd_linalg_has_elpa = @sd_linalg_has_elpa@ +sd_linalg_has_scalapack = @sd_linalg_has_scalapack@ +sd_linalg_init = @sd_linalg_init@ +sd_linalg_ldflags = @sd_linalg_ldflags@ +sd_linalg_libs = @sd_linalg_libs@ +sd_linalg_ok = @sd_linalg_ok@ +sd_mpi_cc = @sd_mpi_cc@ +sd_mpi_cflags = @sd_mpi_cflags@ +sd_mpi_cppflags = @sd_mpi_cppflags@ +sd_mpi_cxx = @sd_mpi_cxx@ +sd_mpi_enable = @sd_mpi_enable@ +sd_mpi_enable_cxx = @sd_mpi_enable_cxx@ +sd_mpi_enable_def = @sd_mpi_enable_def@ +sd_mpi_enable_fc = @sd_mpi_enable_fc@ +sd_mpi_fc = @sd_mpi_fc@ +sd_mpi_fcflags = @sd_mpi_fcflags@ +sd_mpi_init = @sd_mpi_init@ +sd_mpi_ldflags = @sd_mpi_ldflags@ +sd_mpi_libs = @sd_mpi_libs@ +sd_mpi_ok = @sd_mpi_ok@ +sd_mpi_options = @sd_mpi_options@ +sd_mpi_policy = @sd_mpi_policy@ +sd_mpi_status = @sd_mpi_status@ +sd_netcdf_cflags = @sd_netcdf_cflags@ +sd_netcdf_cppflags = @sd_netcdf_cppflags@ +sd_netcdf_enable = @sd_netcdf_enable@ +sd_netcdf_enable_def = @sd_netcdf_enable_def@ +sd_netcdf_fcflags = @sd_netcdf_fcflags@ +sd_netcdf_fortran_cflags = @sd_netcdf_fortran_cflags@ +sd_netcdf_fortran_cppflags = @sd_netcdf_fortran_cppflags@ +sd_netcdf_fortran_enable = @sd_netcdf_fortran_enable@ +sd_netcdf_fortran_enable_def = @sd_netcdf_fortran_enable_def@ +sd_netcdf_fortran_fcflags = @sd_netcdf_fortran_fcflags@ +sd_netcdf_fortran_init = @sd_netcdf_fortran_init@ +sd_netcdf_fortran_ldflags = @sd_netcdf_fortran_ldflags@ +sd_netcdf_fortran_libs = @sd_netcdf_fortran_libs@ +sd_netcdf_fortran_ok = @sd_netcdf_fortran_ok@ +sd_netcdf_fortran_options = @sd_netcdf_fortran_options@ +sd_netcdf_fortran_policy = @sd_netcdf_fortran_policy@ +sd_netcdf_fortran_status = @sd_netcdf_fortran_status@ +sd_netcdf_init = @sd_netcdf_init@ +sd_netcdf_ldflags = @sd_netcdf_ldflags@ +sd_netcdf_libs = @sd_netcdf_libs@ +sd_netcdf_ok = @sd_netcdf_ok@ +sd_netcdf_options = @sd_netcdf_options@ +sd_netcdf_policy = @sd_netcdf_policy@ +sd_netcdf_status = @sd_netcdf_status@ +sd_papi_cflags = @sd_papi_cflags@ +sd_papi_cppflags = @sd_papi_cppflags@ +sd_papi_enable = @sd_papi_enable@ +sd_papi_enable_def = @sd_papi_enable_def@ +sd_papi_init = @sd_papi_init@ +sd_papi_ldflags = @sd_papi_ldflags@ +sd_papi_libs = @sd_papi_libs@ +sd_papi_ok = @sd_papi_ok@ +sd_papi_options = @sd_papi_options@ +sd_papi_policy = @sd_papi_policy@ +sd_papi_sd_papi_fcflags = @sd_papi_sd_papi_fcflags@ +sd_papi_status = @sd_papi_status@ +sd_pfft_cflags = @sd_pfft_cflags@ +sd_pfft_cppflags = @sd_pfft_cppflags@ +sd_pfft_enable = @sd_pfft_enable@ +sd_pfft_enable_def = @sd_pfft_enable_def@ +sd_pfft_init = @sd_pfft_init@ +sd_pfft_ldflags = @sd_pfft_ldflags@ +sd_pfft_libs = @sd_pfft_libs@ +sd_pfft_ok = @sd_pfft_ok@ +sd_pfft_options = @sd_pfft_options@ +sd_pfft_policy = @sd_pfft_policy@ +sd_pfft_status = @sd_pfft_status@ +sd_sys_fcflags = @sd_sys_fcflags@ +sd_triqs_cflags = @sd_triqs_cflags@ +sd_triqs_cppflags = @sd_triqs_cppflags@ +sd_triqs_cxxflags = @sd_triqs_cxxflags@ +sd_triqs_enable = @sd_triqs_enable@ +sd_triqs_enable_def = @sd_triqs_enable_def@ +sd_triqs_fcflags = @sd_triqs_fcflags@ +sd_triqs_init = @sd_triqs_init@ +sd_triqs_ldflags = @sd_triqs_ldflags@ +sd_triqs_libs = @sd_triqs_libs@ +sd_triqs_ok = @sd_triqs_ok@ +sd_triqs_options = @sd_triqs_options@ +sd_triqs_policy = @sd_triqs_policy@ +sd_triqs_status = @sd_triqs_status@ +sd_wannier90_cppflags = @sd_wannier90_cppflags@ +sd_wannier90_enable = @sd_wannier90_enable@ +sd_wannier90_enable_def = @sd_wannier90_enable_def@ +sd_wannier90_fcflags = @sd_wannier90_fcflags@ +sd_wannier90_init = @sd_wannier90_init@ +sd_wannier90_ldflags = @sd_wannier90_ldflags@ +sd_wannier90_libs = @sd_wannier90_libs@ +sd_wannier90_ok = @sd_wannier90_ok@ +sd_wannier90_options = @sd_wannier90_options@ +sd_wannier90_policy = @sd_wannier90_policy@ +sd_wannier90_status = @sd_wannier90_status@ +sd_xmlf90_cppflags = @sd_xmlf90_cppflags@ +sd_xmlf90_enable = @sd_xmlf90_enable@ +sd_xmlf90_enable_def = @sd_xmlf90_enable_def@ +sd_xmlf90_fcflags = @sd_xmlf90_fcflags@ +sd_xmlf90_init = @sd_xmlf90_init@ +sd_xmlf90_ldflags = @sd_xmlf90_ldflags@ +sd_xmlf90_libs = @sd_xmlf90_libs@ +sd_xmlf90_ok = @sd_xmlf90_ok@ +sd_xmlf90_options = @sd_xmlf90_options@ +sd_xmlf90_policy = @sd_xmlf90_policy@ +sd_xmlf90_status = @sd_xmlf90_status@ +sd_yakl_cppflags = @sd_yakl_cppflags@ +sd_yakl_enable = @sd_yakl_enable@ +sd_yakl_enable_def = @sd_yakl_enable_def@ +sd_yakl_fcflags = @sd_yakl_fcflags@ +sd_yakl_init = @sd_yakl_init@ +sd_yakl_ldflags = @sd_yakl_ldflags@ +sd_yakl_libs = @sd_yakl_libs@ +sd_yakl_ok = @sd_yakl_ok@ +sd_yakl_options = @sd_yakl_options@ +sd_yakl_policy = @sd_yakl_policy@ +sd_yakl_status = @sd_yakl_status@ +sharedstatedir = @sharedstatedir@ +src_02_clib_fcflags = @src_02_clib_fcflags@ +src_10_defs_fcflags = @src_10_defs_fcflags@ +src_11_memory_mpi_fcflags = @src_11_memory_mpi_fcflags@ +src_12_hide_mpi_fcflags = @src_12_hide_mpi_fcflags@ +src_14_hidewrite_fcflags = @src_14_hidewrite_fcflags@ +src_16_hideleave_fcflags = @src_16_hideleave_fcflags@ +src_16_kokkos_toolbox_fcflags = @src_16_kokkos_toolbox_fcflags@ +src_17_gpu_toolbox_fcflags = @src_17_gpu_toolbox_fcflags@ +src_17_libtetra_ext_fcflags = @src_17_libtetra_ext_fcflags@ +src_17_minimax_fcflags = @src_17_minimax_fcflags@ +src_17_yaml_out_fcflags = @src_17_yaml_out_fcflags@ +src_18_timing_fcflags = @src_18_timing_fcflags@ +src_21_hashfuncs_fcflags = @src_21_hashfuncs_fcflags@ +src_27_toolbox_oop_fcflags = @src_27_toolbox_oop_fcflags@ +src_28_numeric_noabirule_fcflags = @src_28_numeric_noabirule_fcflags@ +src_29_kpoints_fcflags = @src_29_kpoints_fcflags@ +src_32_util_fcflags = @src_32_util_fcflags@ +src_33_xc_lowlevel_fcflags = @src_33_xc_lowlevel_fcflags@ +src_39_libpaw_fcflags = @src_39_libpaw_fcflags@ +src_41_geometry_fcflags = @src_41_geometry_fcflags@ +src_42_nlstrain_fcflags = @src_42_nlstrain_fcflags@ +src_42_parser_fcflags = @src_42_parser_fcflags@ +src_43_ptgroups_fcflags = @src_43_ptgroups_fcflags@ +src_43_wvl_wrappers_fcflags = @src_43_wvl_wrappers_fcflags@ +src_44_abitools_fcflags = @src_44_abitools_fcflags@ +src_44_abitypes_defs_fcflags = @src_44_abitypes_defs_fcflags@ +src_44_manage_kokkos_fcflags = @src_44_manage_kokkos_fcflags@ +src_45_geomoptim_fcflags = @src_45_geomoptim_fcflags@ +src_45_xgTools_fcflags = @src_45_xgTools_fcflags@ +src_46_ghc_omp_fcflags = @src_46_ghc_omp_fcflags@ +src_46_manage_cuda_fcflags = @src_46_manage_cuda_fcflags@ +src_48_diago_fcflags = @src_48_diago_fcflags@ +src_49_gw_toolbox_oop_fcflags = @src_49_gw_toolbox_oop_fcflags@ +src_51_manage_mpi_fcflags = @src_51_manage_mpi_fcflags@ +src_52_fft_mpi_noabirule_fcflags = @src_52_fft_mpi_noabirule_fcflags@ +src_53_ffts_fcflags = @src_53_ffts_fcflags@ +src_54_spacepar_fcflags = @src_54_spacepar_fcflags@ +src_55_abiutil_fcflags = @src_55_abiutil_fcflags@ +src_56_io_mpi_fcflags = @src_56_io_mpi_fcflags@ +src_56_mixing_fcflags = @src_56_mixing_fcflags@ +src_56_recipspace_fcflags = @src_56_recipspace_fcflags@ +src_56_xc_fcflags = @src_56_xc_fcflags@ +src_57_iopsp_parser_fcflags = @src_57_iopsp_parser_fcflags@ +src_57_iovars_fcflags = @src_57_iovars_fcflags@ +src_61_occeig_fcflags = @src_61_occeig_fcflags@ +src_62_cg_noabirule_fcflags = @src_62_cg_noabirule_fcflags@ +src_62_ctqmc_fcflags = @src_62_ctqmc_fcflags@ +src_62_iowfdenpot_fcflags = @src_62_iowfdenpot_fcflags@ +src_62_poisson_fcflags = @src_62_poisson_fcflags@ +src_62_wvl_wfs_fcflags = @src_62_wvl_wfs_fcflags@ +src_64_psp_fcflags = @src_64_psp_fcflags@ +src_65_lotf_base_fcflags = @src_65_lotf_base_fcflags@ +src_65_paw_fcflags = @src_65_paw_fcflags@ +src_66_nonlocal_fcflags = @src_66_nonlocal_fcflags@ +src_66_vdwxc_fcflags = @src_66_vdwxc_fcflags@ +src_66_wfs_fcflags = @src_66_wfs_fcflags@ +src_67_common_fcflags = @src_67_common_fcflags@ +src_67_python_invocation_ext_fcflags = @src_67_python_invocation_ext_fcflags@ +src_67_triqs_ext_fcflags = @src_67_triqs_ext_fcflags@ +src_68_dmft_fcflags = @src_68_dmft_fcflags@ +src_68_lotf_fcflags = @src_68_lotf_fcflags@ +src_68_recursion_fcflags = @src_68_recursion_fcflags@ +src_68_rsprc_fcflags = @src_68_rsprc_fcflags@ +src_69_wfdesc_fcflags = @src_69_wfdesc_fcflags@ +src_70_gw_fcflags = @src_70_gw_fcflags@ +src_71_bse_fcflags = @src_71_bse_fcflags@ +src_71_wannier_fcflags = @src_71_wannier_fcflags@ +src_72_response_fcflags = @src_72_response_fcflags@ +src_77_ddb_fcflags = @src_77_ddb_fcflags@ +src_77_suscep_fcflags = @src_77_suscep_fcflags@ +src_78_effpot_fcflags = @src_78_effpot_fcflags@ +src_78_eph_fcflags = @src_78_eph_fcflags@ +src_79_seqpar_mpi_fcflags = @src_79_seqpar_mpi_fcflags@ +src_80_rttddft_fcflags = @src_80_rttddft_fcflags@ +src_80_tdep_fcflags = @src_80_tdep_fcflags@ +src_94_scfcv_fcflags = @src_94_scfcv_fcflags@ +src_95_drive_fcflags = @src_95_drive_fcflags@ +src_common_fcflags = @src_common_fcflags@ +src_core_fcflags = @src_core_fcflags@ +src_libpaw_fcflags = @src_libpaw_fcflags@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +with_abinit_common = @with_abinit_common@ +with_bigdft = @with_bigdft@ +with_config_file = @with_config_file@ +with_debug_flavor = @with_debug_flavor@ +with_fallbacks = @with_fallbacks@ +with_fc_vendor = @with_fc_vendor@ +with_fc_version = @with_fc_version@ +with_fft_flavor = @with_fft_flavor@ +with_fftw3 = @with_fftw3@ +with_gnu_ld = @with_gnu_ld@ +with_gpu = @with_gpu@ +with_hdf5 = @with_hdf5@ +with_kokkos = @with_kokkos@ +with_levmar = @with_levmar@ +with_libpaw = @with_libpaw@ +with_libpsml = @with_libpsml@ +with_libxc = @with_libxc@ +with_libxml2 = @with_libxml2@ +with_linalg_flavor = @with_linalg_flavor@ +with_mpi = @with_mpi@ +with_mpi_level = @with_mpi_level@ +with_netcdf = @with_netcdf@ +with_optim_flavor = @with_optim_flavor@ +with_papi = @with_papi@ +with_pfft = @with_pfft@ +with_triqs = @with_triqs@ +with_wannier90 = @with_wannier90@ +with_xmlf90 = @with_xmlf90@ +with_yakl = @with_yakl@ +AM_CFLAGS = @ABI_CPPFLAGS@ +AM_CXXFLAGS = $(sd_triqs_cxxflags) +AM_FCFLAGS = @FPPFLAGS@ @FCFLAGS_FREEFORM@ @FCFLAGS_MODDIR@ @sd_sys_fcflags@ @fcflags_opt_18_timing@ +AM_CPPFLAGS = \ + @src_02_clib_fcflags@ \ + @src_10_defs_fcflags@ \ + @src_12_hide_mpi_fcflags@ \ + @src_14_hidewrite_fcflags@ \ + @src_16_hideleave_fcflags@ \ + @src_18_timing_fcflags@ \ + @src_common_fcflags@ \ + @src_core_fcflags@ \ + @src_libpaw_fcflags@ \ + @sd_papi_cppflags@ \ + @sd_mpi_cppflags@ \ + @sd_mpi_fcflags@ \ + @fc_mod_fcflags@ + + +# Regular source files +lib18_timing_srcs = \ + m_xpapi.F90 \ + m_time.F90 + + +# Source files depending on conditionals + +# Library description +noinst_LIBRARIES = lib18_timing.a +lib18_timing_a_SOURCES = $(lib18_timing_srcs) + +# Dependencies (inside the directory) of directory 18_timing +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. +CLEANFILES = m_xpapi_cpp.f90 m_time_cpp.f90 m_time.$(MODEXT) \ + m_xpapi.$(MODEXT) +EXTRA_DIST = abinit.src abinit.dep _18_timing_ +all: all-am + +.SUFFIXES: +.SUFFIXES: .F90 .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu shared/common/src/18_timing/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu shared/common/src/18_timing/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) + +lib18_timing.a: $(lib18_timing_a_OBJECTS) $(lib18_timing_a_DEPENDENCIES) $(EXTRA_lib18_timing_a_DEPENDENCIES) + $(AM_V_at)-rm -f lib18_timing.a + $(AM_V_AR)$(lib18_timing_a_AR) lib18_timing.a $(lib18_timing_a_OBJECTS) $(lib18_timing_a_LIBADD) + $(AM_V_at)$(RANLIB) lib18_timing.a + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +.F90.o: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ $< + +.F90.obj: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-noinstLIBRARIES cscopelist-am ctags ctags-am distclean \ + distclean-compile distclean-generic distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am + +.PRECIOUS: Makefile + + +m_time.$(OBJEXT): m_xpapi.$(OBJEXT) + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/GX-PAW/common/src/18_timing/_18_timing_ b/GX-PAW/common/src/18_timing/_18_timing_ new file mode 100644 index 00000000..07c0c79e --- /dev/null +++ b/GX-PAW/common/src/18_timing/_18_timing_ @@ -0,0 +1,20 @@ +!!****d* ABINIT/18_timing +!! NAME +!! 18_timing +!! +!! DESCRIPTION +!! FIXME: Description is missing +!! +!! COPYRIGHT +!! Copyright (C) 1998-2024 ABINIT group +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! For the initials of contributors, see ~abinit/doc/developers/contributors.txt . +!! +!! CHILDREN +!! interfaces_18_timing.F90 +!! m_time.F90 +!! m_xpapi.F90 +!! +!!*** diff --git a/GX-PAW/common/src/18_timing/__pycache__/abinit.cpython-36.pyc b/GX-PAW/common/src/18_timing/__pycache__/abinit.cpython-36.pyc new file mode 100644 index 00000000..66d3128e Binary files /dev/null and b/GX-PAW/common/src/18_timing/__pycache__/abinit.cpython-36.pyc differ diff --git a/GX-PAW/common/src/18_timing/abinit.dep b/GX-PAW/common/src/18_timing/abinit.dep new file mode 100644 index 00000000..492ce1c4 --- /dev/null +++ b/GX-PAW/common/src/18_timing/abinit.dep @@ -0,0 +1,11 @@ +# Dependencies (inside the directory) of directory 18_timing +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. + +CLEANFILES += \ + m_time.$(MODEXT) \ + m_xpapi.$(MODEXT) + +m_time.$(OBJEXT): m_xpapi.$(OBJEXT) \ No newline at end of file diff --git a/GX-PAW/common/src/18_timing/abinit.dir b/GX-PAW/common/src/18_timing/abinit.dir new file mode 100644 index 00000000..7c63399a --- /dev/null +++ b/GX-PAW/common/src/18_timing/abinit.dir @@ -0,0 +1,13 @@ +# Dependencies (outside the directory) of directory 18_timing +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. + +include_dirs = \ +['02_clib', + '10_defs', + '12_hide_mpi', + '14_hidewrite', + '16_hideleave', + '18_timing'] \ No newline at end of file diff --git a/GX-PAW/common/src/18_timing/abinit.src b/GX-PAW/common/src/18_timing/abinit.src new file mode 100644 index 00000000..fc68ffaa --- /dev/null +++ b/GX-PAW/common/src/18_timing/abinit.src @@ -0,0 +1,25 @@ +# -*- Python -*- +# +# Copyright (C) 2005-2024 ABINIT Group (Yann Pouillon) +# +# This file is part of the ABINIT software package. For license information, +# please see the COPYING file in the top-level directory of the ABINIT source +# distribution. +# + +# +# Source files making up the 1managempi library +# + +# Source file attributes +ABI_SRC_NIL = 0 # No attribute +ABI_SRC_BLT = 1 # The file is built by a script +ABI_SRC_DEP = 2 # The file depends on other files + +# Source files +sources = [ + "m_xpapi.F90", + "m_time.F90", + ] +# IMPORTANT : please use the alphabetic order in the previous list. Do NOT add the new routine names at the end of the list. +# This is important to avoid numerous conflicts at merge time. Thank you very much. Xavier. diff --git a/GX-PAW/common/src/18_timing/lib18_timing.a b/GX-PAW/common/src/18_timing/lib18_timing.a new file mode 100644 index 00000000..bb56c53a Binary files /dev/null and b/GX-PAW/common/src/18_timing/lib18_timing.a differ diff --git a/GX-PAW/common/src/18_timing/m_time.F90 b/GX-PAW/common/src/18_timing/m_time.F90 new file mode 100644 index 00000000..4d60c6fd --- /dev/null +++ b/GX-PAW/common/src/18_timing/m_time.F90 @@ -0,0 +1,887 @@ +!!****m* ABINIT/m_time +!! NAME +!! m_time +!! +!! FUNCTION +!! This module contains accumulators for the timer. +!! and functions to get cpu and wall time. +!! +!! COPYRIGHT +!! Copyright (C) 2009-2024 ABINIT group (MG, XG, MT, TD) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" + +module m_time + + use defs_basis + use m_abicore + use m_errors + use, intrinsic :: iso_c_binding +#if defined HAVE_MPI2 + use mpi +#endif + use m_xmpi + use m_clib + + use m_xpapi, only: xpapi_flops + use m_fstrings, only: char_count, sjoin + + implicit none + +#if defined HAVE_MPI1 + include 'mpif.h' +#endif + + private + + public :: asctime ! Build a 24-character string of the following form: 'Sun Jun 20 23:21:05 1993'. + public :: sec2str ! Convert time data in seconds to string + public :: str2sec ! Convert a string with time (Slurm form) in seconds + public :: abi_wtime ! Returns wall clock time in seconds since some arbitrary start. + public :: abi_cpu_time ! Returns cpu time in seconds since some arbitrary start. + public :: cwtime ! Returns cpu, wall clock time and gflops + public :: cwtime_report ! Stop timers, write message, reinit counters. + + ! FIXME: Deprecated Should be replaced by cwtime + public :: timein + public :: time_accu + public :: timab + public :: time_set_papiopt + public :: time_get_papiopt + +!!*** + + ! papiopt is a flag which indicates if there is or not an analysis of speed execution is made. + ! By defaut the analysis is not done + integer,private,save :: papiopt=0 + + !================== + ! Counter variables + !================== + + ! TIMER_SIZE determines the maximum number of "timing slots" available + integer,public,parameter :: TIMER_SIZE=1999 + + ! timeopt is a flag which indicates the suppression or not of the timing. + integer,private,save :: timopt=1 + + ! Number of times that the routine has been called + integer,private,save :: ncount(TIMER_SIZE)=0 + + ! Accumulating cpu time (1) and wall to wall time (2) for each "timing slots" + real(dp),private,save :: acctim(2,TIMER_SIZE)=zero,tzero(2,TIMER_SIZE)=zero + + ! Accumulating number of floating point operation and cpu time (1) and wall time (2) for each "performance slot" + real(dp),private,save :: papi_accflops(TIMER_SIZE)=zero, papi_acctim(2,TIMER_SIZE)=zero + + ! Reference value for number of floating point operation and time (cpu and wall) for each performance slot + real(dp),private,save :: papi_flops(TIMER_SIZE)=zero , papi_tzero(2,TIMER_SIZE)=zero + + ! Elapsed time and elapsed number of floating point operation since a reference +#ifdef HAVE_PAPI + real(dp),private,save :: papi_tottim(2,TIMER_SIZE)=zero, papi_totflops(TIMER_SIZE)=zero +#endif + +CONTAINS +!!*** + +!!****f* m_time/asctime +!! NAME +!! asctime +!! +!! FUNCTION +!! Build a 24-character string of the following form: 'Sun Jun 20 23:21:05 1993'. +!! +!! SOURCE + +function asctime() + +!Arguments ------------------------------------ + character(len=24) :: asctime + +!Local variables------------------------------- + integer :: day,dd,ja,jy,jm,jdn,mm,year + integer :: values(8) + character(len=5) :: strzone + character(len=8) :: strdat + character(len=10) :: strtime + character(len=3),parameter :: day_names(7)=(/'Mon','Tue','Wed','Thu','Fri','Sat','Sun'/) + character(len=3),parameter :: month_names(12)=(/'Jan','Feb','Mar','Apr','May','Jun',& +& 'Jul','Aug','Sep','Oct','Nov','Dec'/) + +! ************************************************************************* + +!Get year, month and day + call date_and_time(strdat,strtime,strzone,values) + + year=values(1) + mm=values(2) + dd=values(3) + +!Get day of the week + if (mm > 2) then + jy=year + jm=mm+1 + else + jy=year-1 + jm=mm+13 + end if + + jdn=int(365.25d0*jy)+int(30.6001d0*jm)+dd+1720995 + ja=int(0.01d0*jy) + jdn=jdn+2-ja+int(quarter*ja) + day=mod(jdn,7)+1 + + ! Build a 24-character string of the following form: 'Sun Jun 20 23:21:05 1993'. + write(asctime, '(a,1x,a,1x,i0.2,1x,2(i0.2,a),i0.2,1x,i4)')& + day_names(day),month_names(mm),dd,values(5),":",values(6),":",values(7),year + +end function asctime +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_time/sec2str +!! NAME +!! sec2str +!! +!! FUNCTION +!! Convert time data in seconds to string +!! +!! INPUTS +!! time_s=Time in seconds +!! +!! OUTPUT +!! string with time displayed in the form: [days-][hours:][minutes:]seconds +!! +!! SOURCE + +pure function sec2str(time_s) result(str) + +!Arguments ------------------------------------ +!scalars + real(dp),intent(in) :: time_s + character(len=500) :: str + +!Local variables------------------------------- + integer :: days,hours,minutes,seconds + +! ************************************************************************* + + days = time_s / 86400 + hours = MOD(time_s,86400._dp) / 3600 + minutes = MOD(time_s,3600._dp) / 60 + seconds = MOD(time_s,60._dp) + + if (days > 0) then + write(str,'(i0,3(a,i0.2),a)')days,"-",hours,":",minutes,":",seconds, " [days]" + else if (hours > 0) then + write(str,'(i0.2,2(a,i0.2),a)')hours,":",minutes,":",seconds, " [hours]" + else if (minutes > 0) then + write(str,'(i0.2,a,i0.2,a)')minutes,":",seconds, " [minutes]" + else + write(str,'(f5.2,a)')time_s," [s]" + end if + +end function sec2str +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_time/str2sec +!! NAME +!! str2sec +!! +!! FUNCTION +!! Convert a string to time data in seconds. Return negative value if not valid string +!! Accepts a string in one the following (SLURM) forms: +!! +!! # "days-hours", +!! # "days-hours:minutes", +!! # "days-hours:minutes:seconds". +!! # "minutes", +!! # "minutes:seconds", +!! # "hours:minutes:seconds", +!! +!! SOURCE + +real(dp) pure function str2sec(str) result(time) + +!Arguments ------------------------------------ +!scalars + character(len=*),intent(in) :: str + +!Local variables------------------------------- + integer :: days,hours,minutes,seconds,dash,i,j + +! ************************************************************************* + + days = 0; hours = 0; minutes = 0; seconds = 0 + dash = index(str, "-") + if (dash /= 0) read(str(:dash-1),*,err=1) days + + select case (char_count(str, ":")) + case (0) + if (dash /= 0) then + read(str(dash+1:),*,err=1)hours + else + read(str(dash+1:),*,err=1)minutes + end if + + case (1) + i = index(str, ":") + if (dash /= 0) then + read(str(dash+1:i-1),*,err=1)hours + read(str(i+1:),*,err=1)minutes + else + read(str(:i-1),*,err=1)minutes + read(str(i+1:),*,err=1)seconds + end if + + case(2) + i = index(str, ":") + read(str(dash+1:i-1),*,err=1)hours + j = index(str(i+1:), ":") + i + read(str(i+1:j-1),*,err=1)minutes + read(str(j+1:),*,err=1)seconds + + case default + time = -one; return + end select + + time = 24 * 3600 * days + hours * 3600 + minutes * 60 + seconds + return + +1 time = -one + +end function str2sec +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_time/abi_cpu_time +!! NAME +!! abi_cpu_time +!! +!! FUNCTION +!! Timing routine. Returns cpu time in seconds since some arbitrary start. +!! +!! INPUTS +!! (no inputs) +!! +!! OUTPUT +!! cpu_time= cpu time in seconds +!! +!! NOTES +!! For CPU time, contains machine-dependent code (choice will be selected by c preprocessor). +!! Note that all supported machines are listed explicitly below; there +!! is no "else" which covers "other". The C preprocessor will place +!! a spurious line of code (see below) into the fortran source unless +!! preprocessed with -Dflag where flag refers to one of the supported machines. +!! +!! WARNING: the following list is no more accurate (YP 20060530) +!! +!! Presently supported flags: "ibm", "hp", "P6", "dec_alpha", "sgi", "vpp", "sun", "mac", "nec", "sr8k" +!! Previously supported flags: "ultrix". Might still work ! +!! +!! Calls machine-dependent "mclock" for "ibm" . +!! Calls ANSI C subroutine "cclock" for "hp" and "sgi". +!! Calls machine-dependent "etime" for "P6", "mac", "dec_alpha", "sun", "nec" . +!! Calls machine-dependent "clock" for "vpp" +!! Calls machine-dependent "xclock" for "sr8k" +!! +!! SOURCE + +function abi_cpu_time() result(cpu) + +!Arguments ------------------------------------ + real(dp) :: cpu + +!Local variables------------------------------- +#ifdef HAVE_FC_CPUTIME + real :: cpu_sp +#elif defined FC_IBM + integer :: mclock +#elif defined HAVE_OS_MACOSX + real :: tmp(2) !real array only needed by etime + real(dp) :: etime +#else + integer :: count_now,count_max,count_rate +#endif + +! ************************************************************************* + +!Machine-dependent timers +#ifdef HAVE_CCLOCK + call clib_cclock(cpu) + +#elif defined HAVE_FC_CPUTIME +!This is the F95 standard subroutine. + call cpu_time(cpu_sp) + cpu = cpu_sp + +#elif defined FC_IBM + cpu = mclock()*0.01d0 + +#elif defined HAVE_OS_MACOSX + cpu = clib_etime(tmp) + +#else +!This is the Fortran90 standard subroutine, might not always be sufficiently accurate + call system_clock(count_now,count_rate,count_max) + cpu=dble(count_now)/dble(count_rate) +#endif + +end function abi_cpu_time +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_time/abi_wtime +!! NAME +!! abi_wtime +!! +!! FUNCTION +!! Return wall clock time in seconds since some arbitrary start. +!! Call the F90 intrinsic date_and_time . +!! +!! INPUTS +!! (no inputs) +!! +!! OUTPUT +!! wall= wall clock time in seconds +!! +!! SOURCE + +function abi_wtime() result(wall) + +!Arguments ------------------------------------ +!scalars + real(dp) :: wall + +!Local variables------------------------------- +!scalars +#ifndef HAVE_MPI + integer,parameter :: nday(24)=(/31,28,31,30,31,30,31,31,30,31,30,31,& +& 31,28,31,30,31,30,31,31,30,31,30,31/) + integer,save :: month_init,month_now,start=1,year_init + integer :: months + character(len=8) :: date + character(len=10) :: time + character(len=5) :: zone + character(len=500) :: msg +!arrays + integer :: values(8) +#endif + +! ************************************************************************* + +#ifndef HAVE_MPI + +!The following section of code is standard F90, but it is useful only if the intrinsics +!date_and_time is accurate at the 0.01 sec level, which is not the case for a P6 with the pghpf compiler ... +!Year and month initialisation + if(start==1)then + start=0 + call date_and_time(date,time,zone,values) + year_init=values(1) + month_init=values(2) + end if + +!Uses intrinsic F90 subroutine Date_and_time for +!wall clock (not correct when a change of year happen) + call date_and_time(date,time,zone,values) + +!Compute first the number of seconds from the beginning of the month + wall=(values(3)*24.0d0+values(5))*3600.0d0+values(6)*60.0d0+values(7)+values(8)*0.001d0 + +!If the month has changed, compute the number of seconds +!to be added. This fails if the program ran one year !! + month_now=values(2) + if(month_now/=month_init)then + if(year_init+1==values(1))then + month_now=month_now+12 + end if + if(month_now<=month_init)then + msg = 'Problem with month and year numbers.' + ABI_BUG(msg) + end if + do months=month_init,month_now-1 + wall=wall+86400.0d0*nday(months) + end do + end if + +!Now take into account bissextile years (I think 2000 is bissextile, but I am not sure ...) + if(mod(year_init,4)==0 .and. month_init<=2 .and. month_now>2) wall=wall+3600.0d0 + if(mod(values(1),4)==0 .and. month_init<=14 .and. month_now>14) wall=wall+3600.0d0 + +#else +!Use the timer provided by MPI1. + wall = MPI_WTIME() +#endif + +end function abi_wtime +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_time/cwtime +!! NAME +!! cwtime +!! +!! FUNCTION +!! Timing routine. Returns cpu and wall clock time in seconds. +!! +!! INPUTS +!! start_or_stop= +!! "start" to start the timers +!! "stop" to stop the timers and return the final cpu_time and wall_time +!! [msg]: Optional message printed to std_out +!! [comm]: MPI communicator. If values averaged inside comm are wanted. Only for "stop" +!! +!! OUTPUT +!! cpu= cpu time in seconds +!! wall= wall clock time in seconds +!! gflops = Gigaflops +!! +!! NOTES +!! Example: +!! ! Init cpu and wall +!! call cwtime(cpu,wall,gflops,"start") +!! +!! do_stuff() +!! +!! ! stop the counters, return cpu- and wall-time spent in do_stuff() +!! call cwtime(cpu,wall,gflops,"stop") +!! +!! SOURCE + +subroutine cwtime(cpu, wall, gflops, start_or_stop, msg, comm) + +!Arguments ------------------------------------ +!scalars + real(dp),intent(inout) :: cpu,wall + real(dp),intent(out) :: gflops + character(len=*),intent(in) :: start_or_stop + character(len=*),intent(in),optional :: msg + integer,intent(in),optional :: comm + +!Local variables------------------------------- +#ifndef HAVE_PAPI + logical,parameter :: use_papi=.FALSE. +#else + logical,parameter :: use_papi=.TRUE. +#endif + integer :: ierr + integer(C_INT) :: check + integer(C_LONG_LONG) :: flops + real(C_FLOAT) :: real_time,proc_time,mflops + real(dp) :: vals(3) + +! ************************************************************************* + + if (present(msg)) call wrtout(std_out, msg) + + select case (start_or_stop) + case ("start") + if (use_papi) then + call xpapi_flops(real_time,proc_time,flops,mflops,check) + cpu = proc_time; wall = real_time; gflops = mflops / 1000 + else + cpu = abi_cpu_time(); wall = abi_wtime(); gflops = -one + end if + + case ("stop") + if (use_papi) then + call xpapi_flops(real_time,proc_time,flops,mflops,check) + cpu = proc_time - cpu; wall = real_time - wall; gflops = mflops / 1000 + else + cpu = abi_cpu_time() - cpu; wall = abi_wtime() - wall; gflops = -one + end if + if (present(comm)) then + vals = [cpu, wall, gflops] + call xmpi_sum(vals, comm, ierr) + vals = vals / xmpi_comm_size(comm) + cpu = vals(1); wall = vals(2); gflops = vals(3) + end if + + case default + ABI_ERROR("Wrong option for start_or_stop: "//trim(start_or_stop)) + end select + +end subroutine cwtime +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_time/cwtime_report +!! NAME +!! cwtime_report +!! +!! FUNCTION +!! Stop timers, write message, reinit counters. +!! +!! INPUT +!! [pre_str], [end_str]: String to print before and after the timing section +!! [comm]: MPI communicator. If values averaged inside comm is wanted. Only for "stop" +!! +!! SIDE EFFECTS +!! cpu= cpu time in seconds +!! wall= wall clock time in seconds +!! gflops = Gigaflops +!! +!! OUTPUT +!! [out_wall]= Output wall-time. +!! +!! SOURCE + +subroutine cwtime_report(tag, cpu, wall, gflops, pre_str, end_str, out_wall, comm) + +!Arguments ------------------------------------ +!scalars + real(dp),intent(inout) :: cpu,wall + real(dp),intent(out) :: gflops + integer,intent(in),optional :: comm + character(len=*),intent(in) :: tag + character(len=*),optional,intent(in) :: pre_str, end_str + real(dp),optional,intent(out) :: out_wall + +!Local variables------------------------------- +!scalars + character(len=500) :: avg_type + +! ************************************************************************* + + if (present(comm)) then + call cwtime(cpu, wall, gflops, "stop", comm=comm) + avg_type = "(MPI average) <<< TIME" + else + call cwtime(cpu, wall, gflops, "stop") + avg_type = "<<< TIME" + end if + if (present(pre_str)) call wrtout(std_out, pre_str) + + call wrtout(std_out, sjoin(tag, ", wall:", sec2str(wall), ", cpu:", sec2str(cpu), avg_type), do_flush=.True.) + + !if (present(end_str)) call wrtout(std_out, " ...") + if (present(end_str)) call wrtout(std_out, end_str) + if (present(out_wall)) out_wall = wall + + call cwtime(cpu, wall, gflops, "start") + + ! Activate this line to get mallinfo section for each checkpoint + !call clib_print_mallinfo(std_out) + +end subroutine cwtime_report +!!*** + +!!****f* m_time/timein +!! NAME +!! timein +!! +!! FUNCTION +!! Timing routine. Returns cpu and wall clock time in seconds since some arbitrary start. +!! For wall clock time, call the F90 intrinsic date_and_time. +!! +!! INPUTS +!! (no inputs) +!! +!! OUTPUT +!! cpu= cpu time in seconds +!! wall= wall clock time in seconds +!! +!! NOTES +!! For CPU time, contains machine-dependent code (choice will be selected +!! by C preprocessor, see abi_cpu_time). +!! +!! TODO +!! Should be replaced by cwtime +!! +!! SOURCE + +subroutine timein(cpu,wall) + +!Arguments ------------------------------------ +!scalars + real(dp),intent(out) :: cpu,wall +! ************************************************************************* + + ! CPU time + cpu = abi_cpu_time() + ! Wall time + wall = abi_wtime() + +end subroutine timein +!!*** + +!!****f* m_time/time_accu +!! NAME +!! time_accu +!! +!! FUNCTION +!! Return the number of times the counter has been called +!! and corresponding data for given index +!! +!! INPUTS +!! nn=index of accumulator (distinguish what is being timed); +!! +!! OUTPUT +!! tottim(2)=accumulated time for accumulator nn +!! totftimes(2)=accumulated time for accumulator nn evaluated by papi +!! totffops =accumulated number of flops for accumulator nn evaluated by papi +!! return_ncount gives the number of times that the accumulator has been incremented +!! +!! SOURCE + +subroutine time_accu(nn,return_ncount,tottim,totflops,totftimes) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: nn + integer,intent(out) :: return_ncount + real(dp),intent(out) :: totflops +!arrays + real(dp),intent(out) :: totftimes(2),tottim(2) + +!Local variables------------------------------- +!scalars + character(len=500) :: msg + +! ************************************************************************* + +!Check that nn lies in sensible bounds + if (nn<0.or.nn>TIMER_SIZE) then + write(msg,'(a,i6,a,i8,a)')' dim TIMER_SIZE=',TIMER_SIZE,' but input nn=',nn,'.' + ABI_BUG(msg) + end if + +!return accumulated time for nn + tottim(1)=acctim(1,nn) + tottim(2)=acctim(2,nn) + +!return accumulated number flops for nn + totflops = papi_accflops(nn) + +!return accumulated time for nn evaluated by papi + totftimes(1) = papi_acctim(1,nn) + totftimes(2) = papi_acctim(2,nn) + return_ncount=ncount(nn) + +end subroutine time_accu +!!*** + +!!****f* m_time/time_set_papiopt +!! NAME +!! time_set_papiopt +!! +!! FUNCTION +!! Set the value of papiopt +!! +!! SOURCE + +subroutine time_set_papiopt(opt) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: opt + +! ************************************************************************* + + papiopt = opt + +end subroutine time_set_papiopt +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_time/time_get_papiopt +!! NAME +!! time_get_papiopt +!! +!! FUNCTION +!! Return the value of papiopt +!! +!! SOURCE + +function time_get_papiopt() + +!Arguments ------------------------------------ +!scalars + integer :: time_get_papiopt + +! ************************************************************************* + + time_get_papiopt = papiopt + +end function time_get_papiopt +!!*** + +!!****f* m_time/timab +!! NAME +!! timab +!! +!! FUNCTION +!! Timing subroutine. Calls machine-dependent "timein" which returns elapsed cpu and wall clock times in sec. +!! Depending on value of "option" routine will: +!! +!! (0) Zero all accumulators +!! (1 or -1) Start with new incremental time slice for accumulator n using explicit call to timein (or PAPI) +!! (2 or -2) Stop time slice; add time to accumulator n also increase by one the counter for this accumulator +!! (3) DEPRECATED Start with new incremental time slice for accumulator n +!! using stored values for cpu, wall, and PAPI infos ( ! do not use for stop ) +!! Typically used immediately after a call to timab for another counter with option=2. This saves one call to timein. +!! (4) Report time slice for accumlator n (not full time accumlated) +!! (5) Option to suppress timing (nn should be 0) or reenable it (nn /=0) +!! For negative options : same action than positive values, except for -1 and -2, +!! use stored values for cpu, wall, and PAPI infos ( ! do not use for stop ), instead of calling "timein". +!! Typically used immediately after a call to timab for another counter with option=2 or 1. This saves one call to timein. +!! +!! +!! If, on first entry, subroutine is not being initialized, it +!! will automatically initialize as well as rezero accumulator n. +!! However, initialization SHOULD be done explicitly by the user +!! so that it can be done near the top of his/her main routine. +!! +!! INPUTS +!! nn=index of accumulator (distinguish what is being timed); NOT used if option=0 +!! option=see comment above +!! +!! OUTPUT +!! on option=4: +!! tottim(2,nn)=accumulated time for accumulator nn; otherwise +!! tottim is a dummy variable. +!! option gives the number of times that the +!! accumulator has been incremented +!! +!! SOURCE +!! + +subroutine timab(nn, option, tottim) + +#ifdef HAVE_PAPI +#include "f90papi.h" +#endif + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: nn,option +!arrays + real(dp),intent(out) :: tottim(2) + +!Local variables------------------------------- +!scalars + real(dp),save :: cpu,wall + character(len=500) :: msg +#ifdef HAVE_PAPI + integer(C_INT) :: check + integer(C_LONG_LONG),save :: flops1 + real(C_FLOAT),save :: real_time,proc_time + real(C_FLOAT) :: mflops1 + character(len=PAPI_MAX_STR_LEN) :: papi_errstr +#endif +! ************************************************************************* + + if (option==5) timopt=mod(nn,10) + + ! If timopt was set to zero by a call with option=5, suppress + ! all action of this routine (might as well return at this point !) + if(timopt/=0 .and. option/=5)then + ! Check that nn lies in sensible bounds + if (nn<1.or.nn>TIMER_SIZE) then + write(msg,'(2(a,i0))')' TIMER_SIZE = ',TIMER_SIZE,' but input nn = ',nn + ABI_BUG(msg) + end if + +#ifdef HAVE_PAPI + ! for all active options for time if papi analysis has been selected. + if (option/=3.and.time_get_papiopt()==1) then + call PAPIf_flops(real_time, proc_time, flops1, mflops1, check) + if (check /= PAPI_OK) then + call papif_perror(check,papi_errstr,check) + write(std_out,*) 'Problem to initialize papi high level inteface' + write(std_out,*) 'Error code', papi_errstr + end if + if (flops1 < 0) then + ABI_WARNING("Number of floating point instruction Overflow") + papi_flops(:)=-1 + end if + end if +#endif + + select case (abs(option)) + case (0) + ! Zero out all accumulators of time and init timers + acctim(:,:) = 0.0d0 + tzero(:,:) = 0.0d0 + ncount(:) = 0 + papi_flops(:) = 0 + papi_acctim(:,:) = 0. + papi_accflops(:) = 0. + papi_tzero(:,:) = 0. + + case (1) + ! Initialize timab for nn + if(option>0) call timein(cpu,wall) + tzero(1,nn)=cpu + tzero(2,nn)=wall +#ifdef HAVE_PAPI + papi_flops(nn) = flops1 ! Initialize megaflops for nn + papi_tzero(1,nn) = proc_time + papi_tzero(2,nn) = real_time +#endif + + case (2) + ! Accumulate time for nn (also keep the values of cpu, wall, proc_time, real_time, flops1) + if(option>0)call timein(cpu,wall) + acctim(1,nn)=acctim(1,nn)+cpu -tzero(1,nn) + acctim(2,nn)=acctim(2,nn)+wall-tzero(2,nn) + ncount(nn)=ncount(nn)+1 +#ifdef HAVE_PAPI + ! accumulate time and flops for nn Difference between 2 calls to Papif_flops + papi_acctim(1,nn)=papi_acctim(1,nn)+ proc_time - papi_tzero(1,nn) + papi_acctim(2,nn)=papi_acctim(2,nn)+ real_time - papi_tzero(2,nn) + papi_accflops(nn)=papi_accflops(nn)+ flops1- papi_flops(nn) +#endif + +!Should be suppressed, equivalent to -1 + case (3) + ! Use previously obtained values to initialize timab for nn + ! Typically used immediately after a call to timab for another counter with option=2 . This saves one call to timein. + tzero(1,nn)=cpu + tzero(2,nn)=wall +#ifdef HAVE_PAPI + papi_flops(nn)=flops1 + papi_tzero(1,nn) = proc_time + papi_tzero(2,nn) = real_time +#endif + + case (4) + ! Return elapsed time for nn (do not accumulate) + call timein(cpu,wall) + tottim(1)=cpu-tzero(1,nn) + tottim(2)=wall-tzero(2,nn) +#ifdef HAVE_PAPI + ! return elapsed floating point operationfor nn (do not accumulate) + papi_tottim(1,nn)= proc_time - papi_tzero(1,nn) + papi_tottim(2,nn)= real_time - papi_tzero(2,nn) + papi_totflops(nn)= flops1 - papi_flops(nn) +#endif + + case default + write(msg,'(a,i10,a)')' Input option not valid, =',option,'.' + ABI_BUG(msg) + end select + end if + +end subroutine timab +!!*** + +end module m_time diff --git a/GX-PAW/common/src/18_timing/m_time.o b/GX-PAW/common/src/18_timing/m_time.o new file mode 100644 index 00000000..48c6b3c9 Binary files /dev/null and b/GX-PAW/common/src/18_timing/m_time.o differ diff --git a/GX-PAW/common/src/18_timing/m_xpapi.F90 b/GX-PAW/common/src/18_timing/m_xpapi.F90 new file mode 100644 index 00000000..2f4236a2 --- /dev/null +++ b/GX-PAW/common/src/18_timing/m_xpapi.F90 @@ -0,0 +1,299 @@ +!!****m* ABINIT/m_xpapi +!! NAME +!! m_xpapi +!! +!! FUNCTION +!! Thin wrapper for the PAPI library. +!! +!! COPYRIGHT +!! Copyright (C) 2009-2024 ABINIT group (MG,DC) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" + +MODULE m_xpapi + + use defs_basis + use m_errors + use, intrinsic :: iso_c_binding + + implicit none + + private + +#ifdef HAVE_PAPI +#include "f90papi.h" +#endif + + public :: xpapi_init + public :: xpapi_show_info + public :: xpapi_flops + public :: xpapi_shutdown +!!*** + +!---------------------------------------------------------------------- + +CONTAINS !=========================================================== +!!*** + +!!****f* m_xpapi/xpapi_init +!! NAME +!! xpapi_init +!! +!! FUNCTION +!! initialize the PAPI library. It must be called before any low level PAPI functions can be used. +!! If your application is making use of threads PAPI_thread_init (3) also be called prior to making +!! any calls to the library other than PAPI_library_init(). +!! +!! SOURCE + +subroutine xpapi_init() + +#ifdef HAVE_PAPI +!Local variables------------------------------- + character(len=PAPI_MAX_STR_LEN) :: papi_errstr + integer(C_INT) :: check + real(C_FLOAT) :: real_time,proc_time,mflops + integer(C_LONG_LONG) :: flpops + +! ************************************************************************* + + check = PAPI_VER_CURRENT + call PAPIf_library_init(check) + + if ( check /= PAPI_VER_CURRENT .and. check >0 ) then + ABI_WARNING(" PAPI library version mismatch!") + end if + !ABI_CHECK(check>=0," PAPI Initialization error!") + !XPAPI_CHECK(check," PAPI Initialization error!") + +!#ifdef HAVE_OPENMP + !call PAPIf_thread_init(pthread_self, check) + !XPAPI_CHECK(check>=0," PAPIf_thread_init") +!#endif + +! First pass. Set up counters to monitor PAPI_FP_OPS and PAPI_TOT_CYC events and start the counters +! Subsequent calls will read the counters and return total real time, +! total process time, total floting point instructions or operations +! since the start of the mesurement and the Mflop/s rate since latests call to PAPI_flops + call PAPIf_flops(real_time, proc_time, flpops, mflops, check) + XPAPI_CHECK(check,"Problem in PAPIf_flops") + +#endif + +end subroutine xpapi_init +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_xpapi/xpapi_show_info +!! NAME +!! xpapi_show_info +!! +!! FUNCTION +!! +!! INPUTS +!! [unit]=unit number for writing. The named constant dev_null defined in defs_basis can be used to avoid any printing. +!! Default = std_out +!! [mode_paral]= --optional argument-- +!! 'COLL' if all procs are calling the routine with the same message to be written once only. Default. +!! 'PERS' if the procs are calling the routine with different messages each to be written, +!! or if one proc is calling the routine: DEFAULT = "COLL" +!! +!! SOURCE + +subroutine xpapi_show_info(unit,mode_paral) + +!Arguments------------------------- + integer,optional,intent(in) :: unit + character(len=*),optional,intent(in) :: mode_paral + +!Local variables------------------- +#ifdef HAVE_PAPI + integer :: unt + integer(C_INT) :: num_hwcntrs,ncpu,nnodes,totalcpus,vendor,model + real(C_FLOAT) :: revision,mhz + character(len=PAPI_MAX_STR_LEN) :: vendor_string,model_string + character(len=500) :: msg,my_mode +#endif + +! ************************************************************************* + +#ifdef HAVE_PAPI + unt = std_out; if (PRESENT(unit)) unt = unit + my_mode = "COLL"; if (PRESENT(mode_paral)) my_mode = mode_paral + + call PAPIf_num_counters(num_hwcntrs) + if (num_hwcntrs < 0) then + ABI_WARNING(" The installation does not support PAPI") + end if + + if (num_hwcntrs == 0) then + msg = " The installation supports PAPI, but this machine does not provide hardware counters." + ABI_WARNING(msg) + end if + + call PAPIF_get_hardware_info (ncpu,nnodes,totalcpus,vendor,vendor_string,model,model_string,revision,mhz) + + write(msg,"(a,i0)")" PAPI Version ",PAPI_VER_CURRENT + call wrtout(unt,msg,my_mode) + write(msg,"(a,i0)")" Number of hardware counters: ",num_hwcntrs + call wrtout(unt,msg,my_mode) + write(msg,"(a,i0)")" Number of CPUs in an SMP Node: ",ncpu + call wrtout(unt,msg,my_mode) + write(msg,"(a,i0)")" Number of nodes in the entire system: ",nnodes + call wrtout(unt,msg,my_mode) + write(msg,"(a,i0)")" Total number of CPUs in the entire system: ",totalcpus + call wrtout(unt,msg,my_mode) + !write(msg,"(a,i0)")" Vendor id number of CPU: ",vendor + !call wrtout(unt,msg,my_mode) + !write(msg,"(a)") " Vendor id string of CPU: "//TRIM(vendor_string) + !call wrtout(unt,msg,my_mode) + !write(msg,"(a,i0)")" Model number of CPU: ",model + !call wrtout(unt,msg,my_mode) + write(msg,"(a)") " Model string of CPU: "//TRIM(model_string) + !call wrtout(unt,msg,my_mode) + !write(msg,"(a,f5.1)")" Revision number of CPU: ",revision + !write(msg,"(a,f8.2")" Cycle time of this CPU; *may* be an estimate generated at init time with a quick timing routine",mhz + +#else + ABI_UNUSED(mode_paral) + ABI_UNUSED(unit) +#endif + +end subroutine xpapi_show_info +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_xpapi/xpapi_flops +!! NAME +!! xpapi_flops +!! +!! FUNCTION +!! PAPI High Level: Simplified call to get Mflops/s, real and processor time +!! +!! OUTPUT +!! real_time -- total realtime since the first PAPI_flops() call +!! proc_time -- total process time since the first PAPI_flops() call +!! flops -- total floating point instructions or operations since the first call +!! mflops -- Mflop/s achieved since the previous call +!! check = exit status +!! +!! SOURCE + +subroutine xpapi_flops(real_time,proc_time,flops,mflops,check) + +!Arguments------------------------- + integer(C_INT),intent(out) :: check + integer(C_LONG_LONG),intent(out) :: flops + real(C_FLOAT),intent(out) :: real_time,proc_time,mflops + +! ************************************************************************* + +#ifdef HAVE_PAPI + call PAPIf_flops(real_time, proc_time, flops, mflops, check) +#endif + +end subroutine xpapi_flops +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_xpapi/xpapi_shutdown +!! NAME +!! xpapi_shutdown +!! +!! FUNCTION +!! exit function used by the PAPI Library to free resources and shut down when certain error conditions arise. +!! +!! SOURCE + +subroutine xpapi_shutdown() + +! ************************************************************************* + +#ifdef HAVE_PAPI + call PAPIf_shutdown() +#endif + +end subroutine xpapi_shutdown +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_xpapi/xpapi_handle_error +!! NAME +!! xpapi_handle_error +!! +!! FUNCTION +!! +!! SOURCE + +subroutine xpapi_handle_error(check,err_msg,file,line) + +!Arguments ------------------------------------ +!scalars + integer(C_INT),intent(in) :: check + integer,optional,intent(in) :: line + character(len=*),intent(in) :: err_msg + character(len=*),optional,intent(in) :: file + +!Local variables------------------------------- + integer :: f90line + character(len=10) :: lnum + character(len=500) :: f90name + character(len=500) :: my_msg +#ifdef HAVE_PAPI + integer(C_INT) :: ierr,ans + character(len=PAPI_MAX_STR_LEN) :: papi_errstr +#endif + +! ************************************************************************* + + if (PRESENT(line)) then + f90line=line + else + f90line=0 + end if + write(lnum,'(i0)')f90line + + if (PRESENT(file)) then + !f90name = basename(file) + f90name = file + else + f90name='Subroutine Unknown' + end if + + my_msg=TRIM(f90name)//":"//TRIM(lnum)//":" + +#ifdef HAVE_PAPI + if (check /= PAPI_OK) then + write(std_out,*) " Error in papi library at: "//TRIM(my_msg) + write(std_out,*) " User message: "//TRIM(err_msg) + call PAPIF_is_initialized(ans) + if (ans == PAPI_LOW_LEVEL_INITED) then + call papif_perror(check,papi_errstr,ierr) + write(std_out,*) 'Error code: ',TRIM(papi_errstr) + else + write(std_out,*) "Papi library is not initialized!" + end if + end if + ABI_ERROR("Fatal error") +#else + ABI_UNUSED(err_msg) + if (.FALSE.) write(std_out,*) check +#endif + +end subroutine xpapi_handle_error +!!*** + +END MODULE m_xpapi +!!*** diff --git a/GX-PAW/common/src/18_timing/m_xpapi.o b/GX-PAW/common/src/18_timing/m_xpapi.o new file mode 100644 index 00000000..87dd80d2 Binary files /dev/null and b/GX-PAW/common/src/18_timing/m_xpapi.o differ diff --git a/GX-PAW/common/src/21_hashfuncs/Makefile b/GX-PAW/common/src/21_hashfuncs/Makefile new file mode 100644 index 00000000..ddf6288d --- /dev/null +++ b/GX-PAW/common/src/21_hashfuncs/Makefile @@ -0,0 +1,1541 @@ +# Makefile.in generated by automake 1.16.3 from Makefile.am. +# shared/common/src/21_hashfuncs/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994-2020 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-corelibs on 2024/03/16 21:07:38 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-corelibs script or its config file instead. +# + + +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/abinit +pkgincludedir = $(includedir)/abinit +pkglibdir = $(libdir)/abinit +pkglibexecdir = $(libexecdir)/abinit +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = x86_64-apple-darwin18.7.0 +host_triplet = x86_64-apple-darwin18.7.0 +target_triplet = x86_64-apple-darwin18.7.0 +check_PROGRAMS = test_md5_sum_from_file$(EXEEXT) \ + test_md5_sum_from_string$(EXEEXT) +subdir = shared/common/src/21_hashfuncs +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/m4/arch-gpu.m4 \ + $(top_srcdir)/config/m4/arch-mpi.m4 \ + $(top_srcdir)/config/m4/auto-autotools.m4 \ + $(top_srcdir)/config/m4/auto-corelibs.m4 \ + $(top_srcdir)/config/m4/auto-debug.m4 \ + $(top_srcdir)/config/m4/auto-dirflags.m4 \ + $(top_srcdir)/config/m4/auto-env.m4 \ + $(top_srcdir)/config/m4/auto-hints.m4 \ + $(top_srcdir)/config/m4/auto-optim.m4 \ + $(top_srcdir)/config/m4/auto-options.m4 \ + $(top_srcdir)/config/m4/auto-output.m4 \ + $(top_srcdir)/config/m4/auto-triggers.m4 \ + $(top_srcdir)/config/m4/conf-atompaw.m4 \ + $(top_srcdir)/config/m4/conf-debug.m4 \ + $(top_srcdir)/config/m4/conf-fallbacks.m4 \ + $(top_srcdir)/config/m4/conf-files.m4 \ + $(top_srcdir)/config/m4/conf-init.m4 \ + $(top_srcdir)/config/m4/conf-openmp.m4 \ + $(top_srcdir)/config/m4/conf-optim.m4 \ + $(top_srcdir)/config/m4/lang-c++.m4 \ + $(top_srcdir)/config/m4/lang-c.m4 \ + $(top_srcdir)/config/m4/lang-fortran-import.m4 \ + $(top_srcdir)/config/m4/lang-fortran.m4 \ + $(top_srcdir)/config/m4/lang-python.m4 \ + $(top_srcdir)/config/m4/libxml2.m4 \ + $(top_srcdir)/config/m4/misc-display.m4 \ + $(top_srcdir)/config/m4/sd_abinit_common.m4 \ + $(top_srcdir)/config/m4/sd_arch_gpu.m4 \ + $(top_srcdir)/config/m4/sd_arch_mpi.m4 \ + $(top_srcdir)/config/m4/sd_bigdft.m4 \ + $(top_srcdir)/config/m4/sd_core.m4 \ + $(top_srcdir)/config/m4/sd_esl.m4 \ + $(top_srcdir)/config/m4/sd_fftw3.m4 \ + $(top_srcdir)/config/m4/sd_gpu_kokkos.m4 \ + $(top_srcdir)/config/m4/sd_gpu_yakl.m4 \ + $(top_srcdir)/config/m4/sd_io_hdf5.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf_fortran.m4 \ + $(top_srcdir)/config/m4/sd_levmar.m4 \ + $(top_srcdir)/config/m4/sd_libpaw.m4 \ + $(top_srcdir)/config/m4/sd_libpsml.m4 \ + $(top_srcdir)/config/m4/sd_libxc.m4 \ + $(top_srcdir)/config/m4/sd_math_fft.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_core.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_util.m4 \ + $(top_srcdir)/config/m4/sd_papi.m4 \ + $(top_srcdir)/config/m4/sd_pfft.m4 \ + $(top_srcdir)/config/m4/sd_triqs.m4 \ + $(top_srcdir)/config/m4/sd_wannier90.m4 \ + $(top_srcdir)/config/m4/sd_xmlf90.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +AM_V_AR = $(am__v_AR_$(V)) +am__v_AR_ = $(am__v_AR_$(AM_DEFAULT_VERBOSITY)) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = +lib21_hashfuncs_a_AR = $(AR) $(ARFLAGS) +lib21_hashfuncs_a_LIBADD = +am__objects_1 = m_hash_md5.$(OBJEXT) +am_lib21_hashfuncs_a_OBJECTS = $(am__objects_1) +lib21_hashfuncs_a_OBJECTS = $(am_lib21_hashfuncs_a_OBJECTS) +am_test_md5_sum_from_file_OBJECTS = \ + test_md5_sum_from_file-test_md5_sum_from_file.$(OBJEXT) +test_md5_sum_from_file_OBJECTS = $(am_test_md5_sum_from_file_OBJECTS) +test_md5_sum_from_file_DEPENDENCIES = lib21_hashfuncs.a \ + ../02_clib/lib02_clib.a ../16_hideleave/lib16_hideleave.a \ + ../14_hidewrite/lib14_hidewrite.a \ + ../12_hide_mpi/lib12_hide_mpi.a \ + ../11_memory_mpi/lib11_memory_mpi.a ../10_defs/lib10_defs.a \ + ../02_clib/lib02_clib.a +am_test_md5_sum_from_string_OBJECTS = \ + test_md5_sum_from_string-test_md5_sum_from_string.$(OBJEXT) +test_md5_sum_from_string_OBJECTS = \ + $(am_test_md5_sum_from_string_OBJECTS) +test_md5_sum_from_string_DEPENDENCIES = lib21_hashfuncs.a \ + ../02_clib/lib02_clib.a ../16_hideleave/lib16_hideleave.a \ + ../14_hidewrite/lib14_hidewrite.a \ + ../12_hide_mpi/lib12_hide_mpi.a \ + ../11_memory_mpi/lib11_memory_mpi.a ../10_defs/lib10_defs.a \ + ../02_clib/lib02_clib.a +AM_V_P = $(am__v_P_$(V)) +am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY)) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I. -I$(top_builddir) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +am__v_lt_1 = +PPFCCOMPILE = $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) +AM_V_PPFC = $(am__v_PPFC_$(V)) +am__v_PPFC_ = $(am__v_PPFC_$(AM_DEFAULT_VERBOSITY)) +am__v_PPFC_0 = @echo " PPFC " $@; +am__v_PPFC_1 = +FCLD = $(FC) +FCLINK = $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \ + $@ +AM_V_FCLD = $(am__v_FCLD_$(V)) +am__v_FCLD_ = $(am__v_FCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_FCLD_0 = @echo " FCLD " $@; +am__v_FCLD_1 = +SOURCES = $(lib21_hashfuncs_a_SOURCES) \ + $(test_md5_sum_from_file_SOURCES) \ + $(test_md5_sum_from_string_SOURCES) +DIST_SOURCES = $(lib21_hashfuncs_a_SOURCES) \ + $(test_md5_sum_from_file_SOURCES) \ + $(test_md5_sum_from_string_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ABINIT_BINARY_PACKAGE = abinit-10.0.0.83-58be4d_x86_64_darwin18.7.0_gnu9.4 +ABINIT_COMMON_CPPFLAGS = +ABINIT_COMMON_FCFLAGS = +ABINIT_COMMON_LDFLAGS = +ABINIT_COMMON_LIBS = +ABINIT_TARGET = x86_64_darwin18.7.0_gnu9.4 +ABINIT_VERSION = 10.0.0.83-58be4d +ABINIT_VERSION_BASE = 10.0 +ABINIT_VERSION_BUILD = 20240316 +ABINIT_VERSION_MAJOR = 10 +ABINIT_VERSION_MICRO = 0 +ABINIT_VERSION_MINOR = 0 +ABI_CPPFLAGS = -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include +ACLOCAL = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' aclocal-1.16 +AMTAR = $${TAR-tar} +AM_DEFAULT_VERBOSITY = 1 +AR = ar +ARFLAGS = rc +ARFLAGS_CMD = rc +ARFLAGS_DEBUG = +ARFLAGS_EXTRA = +ARFLAGS_HINTS = +ARFLAGS_OPTIM = +ATOMPAW_BIN = +AUTOCONF = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' autoconf +AUTOHEADER = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' autoheader +AUTOMAKE = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' automake-1.16 +AWK = awk +BIGDFT_CPPFLAGS = +BIGDFT_FCFLAGS = +BIGDFT_LDFLAGS = +BIGDFT_LIBS = +BOURNE_SHELL = /bin/sh +CC = /opt/local/bin/mpicc +CCDEPMODE = depmode=gcc3 +CC_LDFLAGS = +CC_LDFLAGS_DEBUG = +CC_LDFLAGS_EXTRA = +CC_LDFLAGS_GPU = +CC_LDFLAGS_HINTS = +CC_LDFLAGS_OPTIM = +CC_LIBS = +CC_LIBS_DEBUG = +CC_LIBS_EXTRA = +CC_LIBS_GPU = +CC_LIBS_HINTS = +CC_LIBS_OPTIM = +CFLAGS = -O2 -g +CFLAGS_DEBUG = +CFLAGS_EXTRA = +CFLAGS_GPU = +CFLAGS_HINTS = +CFLAGS_OPTIM = +CPP = /opt/local/bin/mpicc -E +CPPFLAGS = +CPPFLAGS_DEBUG = +CPPFLAGS_EXTRA = +CPPFLAGS_GPU = +CPPFLAGS_HINTS = +CPPFLAGS_HINTS_EXT = -P -std=c99 +CPPFLAGS_OPTIM = +CXX = /opt/local/bin/mpicxx +CXXDEPMODE = depmode=gcc3 +CXXFLAGS = -O2 -g +CXXFLAGS_DEBUG = +CXXFLAGS_EXTRA = +CXXFLAGS_GPU = +CXXFLAGS_HINTS = +CXXFLAGS_OPTIM = +CXX_LDFLAGS = +CXX_LDFLAGS_DEBUG = +CXX_LDFLAGS_EXTRA = +CXX_LDFLAGS_GPU = +CXX_LDFLAGS_HINTS = +CXX_LDFLAGS_OPTIM = +CXX_LIBS = +CXX_LIBS_DEBUG = +CXX_LIBS_EXTRA = +CXX_LIBS_GPU = +CXX_LIBS_HINTS = +CXX_LIBS_OPTIM = +CYGPATH_W = echo +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +ECHO_C = \c +ECHO_N = +ECHO_T = +EGREP = /usr/bin/grep -E +EXEEXT = +F77 = /opt/local/bin/mpif90 +FC = /opt/local/bin/mpif90 +FCFLAGS = -O2 -g -ffree-line-length-none -I/opt/local/include -I/opt/local/include -I/opt/local/include +FCFLAGS_DEBUG = +FCFLAGS_EXTRA = +FCFLAGS_F90 = +FCFLAGS_FIXEDFORM = -ffixed-form +FCFLAGS_FREEFORM = -ffree-form +FCFLAGS_HINTS = -ffree-line-length-none +FCFLAGS_MODDIR = -J../mods +FCFLAGS_OPENMP = +FCFLAGS_OPENMP_OFFLOAD = +FCFLAGS_OPTIM = +FCLIBS = -L/opt/local/lib -L/opt/local/lib/openmpi-gcc9 -L/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0 -L/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/../../.. -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi -lgfortran -lquadmath -lm +FC_LDFLAGS = +FC_LDFLAGS_DEBUG = +FC_LDFLAGS_EXTRA = +FC_LDFLAGS_HINTS = +FC_LDFLAGS_OPTIM = +FC_LIBS = +FC_LIBS_DEBUG = +FC_LIBS_EXTRA = +FC_LIBS_HINTS = +FC_LIBS_OPTIM = +FC_NOWRAP = /opt/local/bin/mpif90 +FFLAGS = -O2 -g -ffree-line-length-none -I/opt/local/include -I/opt/local/include -I/opt/local/include +FFTW3_CFLAGS = +FFTW3_CPPFLAGS = -I/opt/local/include +FFTW3_FCFLAGS = -I/opt/local/include +FFTW3_LDFLAGS = +FFTW3_LIBS = -L/opt/local/lib -lfftw3 -lfftw3f +FFT_CFLAGS = +FFT_FCFLAGS = +FPP = +FPPFLAGS = +FPPFLAGS_DEBUG = +FPPFLAGS_EXTRA = +FPPFLAGS_HINTS = +FPPFLAGS_OPTIM = +GPU_ARCH = +GPU_CFLAGS = +GPU_CPPFLAGS = +GPU_CXXFLAGS = +GPU_FCFLAGS = +GPU_LDFLAGS = +GPU_LIBS = +GRAPHATOM_BIN = +GREP = /usr/bin/grep +H5CC = +HDF5_CFLAGS = +HDF5_CPPFLAGS = +HDF5_CXXFLAGS = +HDF5_FCFLAGS = +HDF5_LDFLAGS = +HDF5_LIBS = +INSTALL = /opt/local/libexec/gnubin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +KOKKOS_CPPFLAGS = +KOKKOS_CXXFLAGS = +KOKKOS_LDFLAGS = +KOKKOS_LIBS = +LDFLAGS = +LEVMAR_CFLAGS = +LEVMAR_CPPFLAGS = +LEVMAR_LDFLAGS = +LEVMAR_LIBS = +LIBOBJS = +LIBPAW_CPPFLAGS = +LIBPAW_FCFLAGS = +LIBPAW_LDFLAGS = +LIBPAW_LIBS = +LIBPSML_CPPFLAGS = +LIBPSML_FCFLAGS = +LIBPSML_LDFLAGS = +LIBPSML_LIBS = +LIBS = -L/opt/local/lib -lwannier -L/opt/local/lib -lxc -L/opt/local/lib -lnetcdff -L/opt/local/lib -lnetcdf -L/opt/local/lib -L/opt/local/lib -lhdf5_hl -L/opt/local/lib -lhdf5 -lz -ldl -lm -L/opt/local/lib -lfftw3 -lfftw3f +LIBXC_CFLAGS = +LIBXC_CPPFLAGS = +LIBXC_FCFLAGS = +LIBXC_LDFLAGS = +LIBXC_LIBS = +LIBXML2_CPPFLAGS = +LIBXML2_FCFLAGS = +LIBXML2_LIBS = +LINALG_CFLAGS = +LINALG_CPPFLAGS = +LINALG_CXXFLAGS = +LINALG_FCFLAGS = -I/opt/local/include +LINALG_LDFLAGS = +LINALG_LIBS = -L/opt/local/lib -lopenblas +LN_S = ln -s +LTLIBOBJS = +MAKEINFO = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' makeinfo +MKDIR_P = /opt/local/libexec/gnubin/mkdir -p +MODEXT = mod +MPI_CFLAGS = +MPI_CPPFLAGS = +MPI_CXXFLAGS = +MPI_FCFLAGS = +MPI_LDFLAGS = +MPI_LIBS = +MV = /opt/local/libexec/gnubin/mv +NETCDF_CFLAGS = +NETCDF_CPPFLAGS = +NETCDF_CXXFLAGS = +NETCDF_FCFLAGS = +NETCDF_FORTRAN_CFLAGS = +NETCDF_FORTRAN_CPPFLAGS = +NETCDF_FORTRAN_CXXFLAGS = +NETCDF_FORTRAN_FCFLAGS = +NETCDF_FORTRAN_LDFLAGS = +NETCDF_FORTRAN_LIBS = +NETCDF_LDFLAGS = +NETCDF_LIBS = +NVCC = +NVCC_CFLAGS = +NVCC_CPPFLAGS = +NVCC_LDFLAGS = +NVCC_LIBS = +OBJEXT = o +PACKAGE = abinit +PACKAGE_BUGREPORT = https://bugs.launchpad.net/abinit/ +PACKAGE_NAME = ABINIT +PACKAGE_STRING = ABINIT 10.0.0.83-58be4d +PACKAGE_TARNAME = abinit +PACKAGE_URL = +PACKAGE_VERSION = 10.0.0.83-58be4d +PAPI_CFLAGS = +PAPI_CPPFLAGS = +PAPI_LDFLAGS = +PAPI_LIBS = +PATCH = patch +PATH_SEPARATOR = : +PERL = /usr/bin/perl +PFFT_CFLAGS = +PFFT_CPPFLAGS = +PFFT_LDFLAGS = +PFFT_LIBS = +PYFLAGS = +PYTHON = python3.9 +PYTHON_CONFIG = python3.9-config +PYTHON_CPPFLAGS = -I/opt/local/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -I/opt/local/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 +RANLIB = ranlib +REALPATH = realpath +RM = /opt/local/libexec/gnubin/rm +SED = /usr/bin/sed +SET_MAKE = +SHELL = /bin/sh +STRIP = +TAR = tar +TRIQS_CFLAGS = +TRIQS_CPPFLAGS = +TRIQS_CXXFLAGS = +TRIQS_LDFLAGS = +TRIQS_LIBS = +TRUE_CPP = cpp +VERSION = 10.0.0.83-58be4d +WANNIER90_CPPFLAGS = +WANNIER90_FCFLAGS = -I/opt/local/include +WANNIER90_LDFLAGS = +WANNIER90_LIBS = -L/opt/local/lib -lwannier +XML2_CONFIG = +XMLF90_CPPFLAGS = +XMLF90_FCFLAGS = +XMLF90_LDFLAGS = +XMLF90_LIBS = +XML_CPPFLAGS = +XML_LIBS = +XPP = +XPPFLAGS = +XPPFLAGS_DEBUG = +XPPFLAGS_EXTRA = +XPPFLAGS_OPTIM = +YAKL_CPPFLAGS = +YAKL_FCFLAGS = +YAKL_LDFLAGS = +YAKL_LIBS = +abi_ac_distcheck = --with-config-file="/Users/gonze/_Research/ABINIT_git/gonze/mac-1P0-225.ac9" +abi_ac_version = 027100 +abi_am_version = 011603 +abi_avx_safe_mode_enable = no +abi_bse_unpacked_enable = no +abi_cc_path = +abi_cc_vendor = gnu +abi_cc_version = 9.4 +abi_cclock_enable = no +abi_cpp_path = +abi_cpu_64bits = yes +abi_cpu_bits = 64 +abi_cpu_model = unknown +abi_cpu_platform = apple +abi_cpu_spec = unknown_unknown +abi_cpu_vendor = unknown +abi_crpa_optim_enable = no +abi_cxx_path = +abi_cxx_vendor = gnu +abi_cxx_version = 9.4 +abi_debug_flavor = basic +abi_exports_enable = no +abi_fbk_abinit_common_ok = no +abi_fbk_bigdft_ok = disabled +abi_fbk_config = +abi_fbk_enable = no +abi_fbk_fft_ok = no +abi_fbk_fftw3_ok = no +abi_fbk_gpu_ok = no +abi_fbk_hdf5_ok = disabled +abi_fbk_init = def +abi_fbk_kokkos_ok = no +abi_fbk_levmar_ok = no +abi_fbk_libpaw_ok = no +abi_fbk_libpsml_ok = disabled +abi_fbk_libxc_ok = disabled +abi_fbk_libxml2_ok = no +abi_fbk_linalg_ok = disabled +abi_fbk_list = +abi_fbk_mpi_ok = no +abi_fbk_netcdf_fortran_ok = disabled +abi_fbk_netcdf_ok = disabled +abi_fbk_papi_ok = no +abi_fbk_pfft_ok = no +abi_fbk_prefix = +abi_fbk_required = +abi_fbk_triqs_ok = no +abi_fbk_wannier90_ok = disabled +abi_fbk_xmlf90_ok = disabled +abi_fbk_yakl_ok = no +abi_fc_path = +abi_fc_vendor = gnu +abi_fc_version = 9.4 +abi_fc_wrap = no +abi_fc_wrapper_enable = no +abi_fpp_path = +abi_gpu_arch = +abi_gpu_fcflags = +abi_gpu_flavor = none +abi_gpu_hip_libdir = +abi_gpu_incs = +abi_gpu_ldflags = +abi_gpu_libs = +abi_gpu_nvtx_v3 = +abi_gpu_roctx = +abi_gw_dpc_enable = yes +abi_hints_enable = yes +abi_libtetra_enable = yes +abi_libxml2_cppflags = +abi_libxml2_enable = no +abi_libxml2_fcflags = +abi_libxml2_init = def +abi_libxml2_ldflags = +abi_libxml2_libs = +abi_libxml2_ok = unknown +abi_libxml2_prefix = +abi_lotf_enable = no +abi_lt_version = 020406 +abi_m4_version = 010419 +abi_memory_profiling_enable = no +abi_mpi_cflags = +abi_mpi_cppflags = +abi_mpi_cxxflags = +abi_mpi_enable = yes +abi_mpi_fcflags = +abi_mpi_flavor = auto +abi_mpi_gpu_aware_enable = no +abi_mpi_incs = +abi_mpi_inplace_enable = yes +abi_mpi_interfaces_bugfix_enable = no +abi_mpi_io_default_enable = no +abi_mpi_io_enable = yes +abi_mpi_ldflags = +abi_mpi_level = 2 +abi_mpi_libs = +abi_netcdf_default_enable = no +abi_openmp_enable = no +abi_openmp_offload_enable = no +abi_optim_flavor = standard +abi_python_invocation_enable = no +abi_source_debug_enable = no +abi_stdin_enable = yes +abi_sys_spec = darwin-x86_64 +abi_timer_enable = yes +abi_triqs_v1_4_enable = no +abi_triqs_v2_0_enable = no +abi_zdot_bugfix_enable = no +abinit_bindir = /usr/local/bin +abinit_builddir = /Users/gonze/_Research/ABINIT_git/gonze +abinit_chkdir = /usr/local/share/abinit/tests +abinit_datdir = /usr/local/share/abinit +abinit_docdir = /usr/local/doc/abinit +abinit_incdir = /usr/local/include +abinit_libdir = /usr/local/lib +abinit_mandir = /usr/local/share/man +abinit_prefix = /usr/local +abinit_srcdir = /Users/gonze/_Research/ABINIT_git/gonze +abs_builddir = /Users/gonze/_Research/ABINIT_git/gonze/shared/common/src/21_hashfuncs +abs_srcdir = /Users/gonze/_Research/ABINIT_git/gonze/shared/common/src/21_hashfuncs +abs_top_builddir = /Users/gonze/_Research/ABINIT_git/gonze +abs_top_srcdir = /Users/gonze/_Research/ABINIT_git/gonze +ac_ct_CC = +ac_ct_CXX = +ac_ct_FC = +am__include = include +am__leading_dot = . +am__quote = +am__tar = tar --format=ustar -chf - "$$tardir" +am__untar = tar -xf - +bindir = ${exec_prefix}/bin +build = x86_64-apple-darwin18.7.0 +build_alias = +build_cpu = x86_64 +build_os = darwin18.7.0 +build_vendor = apple +builddir = . +cc_info_string = gcc-mp-9 (MacPorts gcc9 9.4.0_0) 9.4.0 +cxx_info_string = g++-mp-9 (MacPorts gcc9 9.4.0_0) 9.4.0 +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +enable_avx_safe_mode = +enable_bse_unpacked = +enable_cclock = +enable_crpa_optim = +enable_exports = +enable_fc_wrapper = +enable_gw_dpc = yes +enable_hints = +enable_libtetra = +enable_lotf = +enable_memory_profiling = +enable_mpi_gpu_aware = +enable_mpi_inplace = +enable_mpi_interfaces_bugfix = +enable_mpi_io = yes +enable_mpi_io_default = +enable_netcdf_default = +enable_openmp = +enable_openmp_offload = +enable_python_invocation = +enable_shared = +enable_source_debug = +enable_static = +enable_stdin = +enable_timer = +enable_triqs_v1_4 = +enable_triqs_v2_0 = +enable_zdot_bugfix = +exec_prefix = ${prefix} +fc_info_string = GNU Fortran (MacPorts gcc9 9.4.0_0) 9.4.0 +fc_mod_fcflags = +fc_timing = standard +fcflags_opt_02_clib = +fcflags_opt_10_defs = +fcflags_opt_11_memory_mpi = +fcflags_opt_12_hide_mpi = +fcflags_opt_14_hidewrite = +fcflags_opt_16_hideleave = +fcflags_opt_16_kokkos_toolbox = +fcflags_opt_17_gpu_toolbox = +fcflags_opt_17_libtetra_ext = +fcflags_opt_17_minimax = +fcflags_opt_17_yaml_out = +fcflags_opt_18_timing = +fcflags_opt_21_hashfuncs = +fcflags_opt_27_toolbox_oop = +fcflags_opt_28_numeric_noabirule = +fcflags_opt_29_kpoints = +fcflags_opt_32_util = +fcflags_opt_33_xc_lowlevel = +fcflags_opt_39_libpaw = +fcflags_opt_41_geometry = +fcflags_opt_42_nlstrain = +fcflags_opt_42_parser = +fcflags_opt_43_ptgroups = -O0 +fcflags_opt_43_wvl_wrappers = +fcflags_opt_44_abitools = +fcflags_opt_44_abitypes_defs = +fcflags_opt_44_manage_kokkos = +fcflags_opt_45_geomoptim = +fcflags_opt_45_xgTools = +fcflags_opt_46_ghc_omp = +fcflags_opt_46_manage_cuda = +fcflags_opt_48_diago = +fcflags_opt_49_gw_toolbox_oop = +fcflags_opt_51_manage_mpi = +fcflags_opt_52_fft_mpi_noabirule = +fcflags_opt_53_ffts = +fcflags_opt_54_spacepar = +fcflags_opt_55_abiutil = +fcflags_opt_56_io_mpi = +fcflags_opt_56_mixing = +fcflags_opt_56_recipspace = +fcflags_opt_56_xc = +fcflags_opt_57_iopsp_parser = +fcflags_opt_57_iovars = +fcflags_opt_61_occeig = +fcflags_opt_62_cg_noabirule = +fcflags_opt_62_ctqmc = +fcflags_opt_62_iowfdenpot = +fcflags_opt_62_poisson = +fcflags_opt_62_wvl_wfs = +fcflags_opt_64_psp = +fcflags_opt_65_lotf_base = +fcflags_opt_65_paw = +fcflags_opt_66_nonlocal = +fcflags_opt_66_vdwxc = +fcflags_opt_66_wfs = +fcflags_opt_67_common = +fcflags_opt_67_python_invocation_ext = +fcflags_opt_67_triqs_ext = +fcflags_opt_68_dmft = +fcflags_opt_68_lotf = +fcflags_opt_68_recursion = +fcflags_opt_68_rsprc = +fcflags_opt_69_wfdesc = +fcflags_opt_70_gw = +fcflags_opt_71_bse = +fcflags_opt_71_wannier = +fcflags_opt_72_response = +fcflags_opt_77_ddb = +fcflags_opt_77_suscep = +fcflags_opt_78_effpot = +fcflags_opt_78_eph = +fcflags_opt_79_seqpar_mpi = +fcflags_opt_80_rttddft = +fcflags_opt_80_tdep = +fcflags_opt_94_scfcv = +fcflags_opt_95_drive = +fcflags_opt_98_main = +fcflags_opt_bigdft = +fcflags_opt_default = +fcflags_opt_hdf5 = +fcflags_opt_levmar = +fcflags_opt_libpsml = +fcflags_opt_libxc = +fcflags_opt_libxml2 = +fcflags_opt_linalg = +fcflags_opt_netcdf = +fcflags_opt_netcdf_fortran = +fcflags_opt_papi = +fcflags_opt_triqs = +fcflags_opt_wannier90 = +fcflags_opt_xmlf90 = +host = x86_64-apple-darwin18.7.0 +host_alias = +host_cpu = x86_64 +host_os = darwin18.7.0 +host_vendor = apple +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = ${SHELL} /Users/gonze/_Research/ABINIT_git/gonze/config/gnu/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = ${datarootdir}/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = $(MKDIR_P) +oldincludedir = /usr/include +pdfdir = ${docdir} +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +runstatedir = ${localstatedir}/run +sbindir = ${exec_prefix}/sbin +sd_abinit_common_cppflags = +sd_abinit_common_enable = no +sd_abinit_common_enable_def = no +sd_abinit_common_fcflags = +sd_abinit_common_init = def +sd_abinit_common_ldflags = +sd_abinit_common_libs = +sd_abinit_common_ok = unknown +sd_abinit_common_options = optional skip +sd_abinit_common_policy = skip +sd_abinit_common_status = optional +sd_bigdft_cppflags = +sd_bigdft_enable = no +sd_bigdft_enable_def = no +sd_bigdft_fcflags = +sd_bigdft_init = def +sd_bigdft_ldflags = +sd_bigdft_libs = +sd_bigdft_ok = unknown +sd_bigdft_options = optional warn +sd_bigdft_policy = warn +sd_bigdft_status = optional +sd_fft_cflags = +sd_fft_choices = +sd_fft_cppflags = -I/opt/local/include +sd_fft_cxxflags = +sd_fft_enable = yes +sd_fft_fcflags = -I/opt/local/include +sd_fft_flavor = fftw3 +sd_fft_init = kwd +sd_fft_ldflags = +sd_fft_libs = -L/opt/local/lib -lfftw3 -lfftw3f +sd_fft_ok = yes +sd_fftw3_cflags = +sd_fftw3_cppflags = -I/opt/local/include +sd_fftw3_enable = yes +sd_fftw3_enable_def = no +sd_fftw3_fcflags = -I/opt/local/include +sd_fftw3_init = env +sd_fftw3_ldflags = +sd_fftw3_libs = -L/opt/local/lib -lfftw3 -lfftw3f +sd_fftw3_ok = yes +sd_fftw3_options = optional skip +sd_fftw3_policy = skip +sd_fftw3_status = optional +sd_gpu_cflags = +sd_gpu_cppflags = +sd_gpu_cxxflags = +sd_gpu_enable = no +sd_gpu_enable_def = no +sd_gpu_fcflags = +sd_gpu_init = def +sd_gpu_ldflags = +sd_gpu_libs = +sd_gpu_ok = no +sd_gpu_options = optional warn +sd_gpu_policy = warn +sd_gpu_prefix = +sd_gpu_status = optional +sd_hdf5_cflags = +sd_hdf5_cppflags = -I/opt/local/include -I/opt/local/include +sd_hdf5_cxxflags = +sd_hdf5_enable = yes +sd_hdf5_enable_def = yes +sd_hdf5_enable_fc = no +sd_hdf5_fcflags = +sd_hdf5_h5cc = /opt/local/bin/h5cc +sd_hdf5_h5fc = +sd_hdf5_init = dir +sd_hdf5_ldflags = +sd_hdf5_libs = -L/opt/local/lib -L/opt/local/lib -lhdf5_hl -L/opt/local/lib -lhdf5 -lz -ldl -lm +sd_hdf5_ok = yes +sd_hdf5_options = required no-fortran warn +sd_hdf5_policy = warn +sd_hdf5_status = required +sd_kokkos_cppflags = +sd_kokkos_cxxflags = +sd_kokkos_enable = no +sd_kokkos_enable_def = no +sd_kokkos_init = def +sd_kokkos_ldflags = +sd_kokkos_libs = +sd_kokkos_ok = unknown +sd_kokkos_options = optional fail +sd_kokkos_policy = fail +sd_kokkos_status = optional +sd_levmar_cflags = +sd_levmar_cppflags = +sd_levmar_enable = no +sd_levmar_enable_def = no +sd_levmar_init = def +sd_levmar_ldflags = +sd_levmar_libs = +sd_levmar_ok = unknown +sd_levmar_options = optional fail +sd_levmar_policy = fail +sd_levmar_status = optional +sd_libpaw_cppflags = +sd_libpaw_enable = no +sd_libpaw_enable_def = no +sd_libpaw_fcflags = +sd_libpaw_init = def +sd_libpaw_ldflags = +sd_libpaw_libs = +sd_libpaw_ok = unknown +sd_libpaw_options = optional skip +sd_libpaw_policy = skip +sd_libpaw_status = optional +sd_libpsml_cppflags = +sd_libpsml_enable = no +sd_libpsml_enable_def = no +sd_libpsml_fcflags = +sd_libpsml_init = def +sd_libpsml_ldflags = +sd_libpsml_libs = +sd_libpsml_ok = unknown +sd_libpsml_options = optional warn +sd_libpsml_policy = warn +sd_libpsml_status = optional +sd_libxc_cflags = +sd_libxc_cppflags = -I/opt/local/include +sd_libxc_enable = yes +sd_libxc_enable_def = yes +sd_libxc_enable_fc = no +sd_libxc_fcflags = +sd_libxc_init = dir +sd_libxc_ldflags = +sd_libxc_libs = -L/opt/local/lib -lxc +sd_libxc_ok = yes +sd_libxc_options = required no-fortran warn +sd_libxc_policy = warn +sd_libxc_status = required +sd_linalg_cflags = +sd_linalg_choices = +sd_linalg_cppflags = +sd_linalg_cxxflags = +sd_linalg_enable = yes +sd_linalg_fcflags = -I/opt/local/include +sd_linalg_flavor = openblas +sd_linalg_has_elpa = no +sd_linalg_has_scalapack = no +sd_linalg_init = env +sd_linalg_ldflags = +sd_linalg_libs = -L/opt/local/lib -lopenblas +sd_linalg_ok = yes +sd_mpi_cc = /opt/local/bin/mpicc +sd_mpi_cflags = +sd_mpi_cppflags = -I/opt/local/include +sd_mpi_cxx = /opt/local/bin/mpicxx +sd_mpi_enable = yes +sd_mpi_enable_cxx = yes +sd_mpi_enable_def = auto +sd_mpi_enable_fc = yes +sd_mpi_fc = /opt/local/bin/mpif90 +sd_mpi_fcflags = -I/opt/local/include +sd_mpi_init = dir +sd_mpi_ldflags = +sd_mpi_libs = +sd_mpi_ok = yes +sd_mpi_options = auto optional fail +sd_mpi_policy = fail +sd_mpi_status = optional +sd_netcdf_cflags = +sd_netcdf_cppflags = -I/opt/local/include +sd_netcdf_enable = yes +sd_netcdf_enable_def = yes +sd_netcdf_fcflags = -I/opt/local/include +sd_netcdf_fortran_cflags = +sd_netcdf_fortran_cppflags = -I/opt/local/include +sd_netcdf_fortran_enable = yes +sd_netcdf_fortran_enable_def = yes +sd_netcdf_fortran_fcflags = -I/opt/local/include +sd_netcdf_fortran_init = dir +sd_netcdf_fortran_ldflags = +sd_netcdf_fortran_libs = -L/opt/local/lib -lnetcdff +sd_netcdf_fortran_ok = yes +sd_netcdf_fortran_options = required warn +sd_netcdf_fortran_policy = warn +sd_netcdf_fortran_status = required +sd_netcdf_init = dir +sd_netcdf_ldflags = +sd_netcdf_libs = -L/opt/local/lib -lnetcdf +sd_netcdf_ok = yes +sd_netcdf_options = required warn +sd_netcdf_policy = warn +sd_netcdf_status = required +sd_papi_cflags = +sd_papi_cppflags = +sd_papi_enable = no +sd_papi_enable_def = no +sd_papi_init = def +sd_papi_ldflags = +sd_papi_libs = +sd_papi_ok = unknown +sd_papi_options = optional fail +sd_papi_policy = fail +sd_papi_sd_papi_fcflags = +sd_papi_status = optional +sd_pfft_cflags = +sd_pfft_cppflags = +sd_pfft_enable = no +sd_pfft_enable_def = no +sd_pfft_init = def +sd_pfft_ldflags = +sd_pfft_libs = +sd_pfft_ok = unknown +sd_pfft_options = optional skip +sd_pfft_policy = skip +sd_pfft_status = optional +sd_sys_fcflags = +sd_triqs_cflags = +sd_triqs_cppflags = +sd_triqs_cxxflags = +sd_triqs_enable = no +sd_triqs_enable_def = no +sd_triqs_fcflags = +sd_triqs_init = def +sd_triqs_ldflags = +sd_triqs_libs = +sd_triqs_ok = unknown +sd_triqs_options = optional fail +sd_triqs_policy = fail +sd_triqs_status = optional +sd_wannier90_cppflags = +sd_wannier90_enable = yes +sd_wannier90_enable_def = no +sd_wannier90_fcflags = -I/opt/local/include +sd_wannier90_init = env +sd_wannier90_ldflags = +sd_wannier90_libs = -L/opt/local/lib -lwannier +sd_wannier90_ok = yes +sd_wannier90_options = optional warn +sd_wannier90_policy = warn +sd_wannier90_status = optional +sd_xmlf90_cppflags = +sd_xmlf90_enable = no +sd_xmlf90_enable_def = no +sd_xmlf90_fcflags = +sd_xmlf90_init = def +sd_xmlf90_ldflags = +sd_xmlf90_libs = +sd_xmlf90_ok = unknown +sd_xmlf90_options = optional warn +sd_xmlf90_policy = warn +sd_xmlf90_status = optional +sd_yakl_cppflags = +sd_yakl_enable = no +sd_yakl_enable_def = no +sd_yakl_fcflags = +sd_yakl_init = def +sd_yakl_ldflags = +sd_yakl_libs = +sd_yakl_ok = unknown +sd_yakl_options = optional fail +sd_yakl_policy = fail +sd_yakl_status = optional +sharedstatedir = ${prefix}/com +src_02_clib_fcflags = -I$(top_builddir)/shared/common/src/02_clib -I$(top_srcdir)/shared/common/src/02_clib +src_10_defs_fcflags = -I$(top_builddir)/shared/common/src/10_defs -I$(top_srcdir)/shared/common/src/10_defs +src_11_memory_mpi_fcflags = -I$(top_builddir)/shared/common/src/11_memory_mpi -I$(top_srcdir)/shared/common/src/11_memory_mpi +src_12_hide_mpi_fcflags = -I$(top_builddir)/shared/common/src/12_hide_mpi -I$(top_srcdir)/shared/common/src/12_hide_mpi +src_14_hidewrite_fcflags = -I$(top_builddir)/shared/common/src/14_hidewrite -I$(top_srcdir)/shared/common/src/14_hidewrite +src_16_hideleave_fcflags = -I$(top_builddir)/shared/common/src/16_hideleave -I$(top_srcdir)/shared/common/src/16_hideleave +src_16_kokkos_toolbox_fcflags = -I$(top_builddir)/shared/common/src/16_kokkos_toolbox -I$(top_srcdir)/shared/common/src/16_kokkos_toolbox +src_17_gpu_toolbox_fcflags = -I$(top_builddir)/shared/common/src/17_gpu_toolbox -I$(top_srcdir)/shared/common/src/17_gpu_toolbox +src_17_libtetra_ext_fcflags = -I$(top_builddir)/shared/common/src/17_libtetra_ext -I$(top_srcdir)/shared/common/src/17_libtetra_ext +src_17_minimax_fcflags = -I$(top_builddir)/shared/common/src/17_minimax -I$(top_srcdir)/shared/common/src/17_minimax +src_17_yaml_out_fcflags = -I$(top_builddir)/shared/common/src/17_yaml_out -I$(top_srcdir)/shared/common/src/17_yaml_out +src_18_timing_fcflags = -I$(top_builddir)/shared/common/src/18_timing -I$(top_srcdir)/shared/common/src/18_timing +src_21_hashfuncs_fcflags = -I$(top_builddir)/shared/common/src/21_hashfuncs -I$(top_srcdir)/shared/common/src/21_hashfuncs +src_27_toolbox_oop_fcflags = -I$(top_builddir)/shared/common/src/27_toolbox_oop -I$(top_srcdir)/shared/common/src/27_toolbox_oop +src_28_numeric_noabirule_fcflags = -I$(top_builddir)/shared/common/src/28_numeric_noabirule -I$(top_srcdir)/shared/common/src/28_numeric_noabirule +src_29_kpoints_fcflags = -I$(top_builddir)/shared/common/src/29_kpoints -I$(top_srcdir)/shared/common/src/29_kpoints +src_32_util_fcflags = -I$(top_builddir)/shared/common/src/32_util -I$(top_srcdir)/shared/common/src/32_util +src_33_xc_lowlevel_fcflags = -I$(top_builddir)/shared/common/src/33_xc_lowlevel -I$(top_srcdir)/shared/common/src/33_xc_lowlevel +src_39_libpaw_fcflags = -I$(top_builddir)/shared/libpaw/src -I$(top_srcdir)/shared/libpaw/src +src_41_geometry_fcflags = -I$(top_builddir)/src/41_geometry -I$(top_srcdir)/src/41_geometry +src_42_nlstrain_fcflags = -I$(top_builddir)/src/42_nlstrain -I$(top_srcdir)/src/42_nlstrain +src_42_parser_fcflags = -I$(top_builddir)/src/42_parser -I$(top_srcdir)/src/42_parser +src_43_ptgroups_fcflags = -I$(top_builddir)/src/43_ptgroups -I$(top_srcdir)/src/43_ptgroups +src_43_wvl_wrappers_fcflags = -I$(top_builddir)/src/43_wvl_wrappers -I$(top_srcdir)/src/43_wvl_wrappers +src_44_abitools_fcflags = -I$(top_builddir)/src/44_abitools -I$(top_srcdir)/src/44_abitools +src_44_abitypes_defs_fcflags = -I$(top_builddir)/src/44_abitypes_defs -I$(top_srcdir)/src/44_abitypes_defs +src_44_manage_kokkos_fcflags = -I$(top_builddir)/src/44_manage_kokkos -I$(top_srcdir)/src/44_manage_kokkos +src_45_geomoptim_fcflags = -I$(top_builddir)/src/45_geomoptim -I$(top_srcdir)/src/45_geomoptim +src_45_xgTools_fcflags = -I$(top_builddir)/src/45_xgTools -I$(top_srcdir)/src/45_xgTools +src_46_ghc_omp_fcflags = -I$(top_builddir)/src/46_ghc_omp -I$(top_srcdir)/src/46_ghc_omp +src_46_manage_cuda_fcflags = -I$(top_builddir)/src/46_manage_cuda -I$(top_srcdir)/src/46_manage_cuda +src_48_diago_fcflags = -I$(top_builddir)/src/48_diago -I$(top_srcdir)/src/48_diago +src_49_gw_toolbox_oop_fcflags = -I$(top_builddir)/src/49_gw_toolbox_oop -I$(top_srcdir)/src/49_gw_toolbox_oop +src_51_manage_mpi_fcflags = -I$(top_builddir)/src/51_manage_mpi -I$(top_srcdir)/src/51_manage_mpi +src_52_fft_mpi_noabirule_fcflags = -I$(top_builddir)/src/52_fft_mpi_noabirule -I$(top_srcdir)/src/52_fft_mpi_noabirule +src_53_ffts_fcflags = -I$(top_builddir)/src/53_ffts -I$(top_srcdir)/src/53_ffts +src_54_spacepar_fcflags = -I$(top_builddir)/src/54_spacepar -I$(top_srcdir)/src/54_spacepar +src_55_abiutil_fcflags = -I$(top_builddir)/src/55_abiutil -I$(top_srcdir)/src/55_abiutil +src_56_io_mpi_fcflags = -I$(top_builddir)/src/56_io_mpi -I$(top_srcdir)/src/56_io_mpi +src_56_mixing_fcflags = -I$(top_builddir)/src/56_mixing -I$(top_srcdir)/src/56_mixing +src_56_recipspace_fcflags = -I$(top_builddir)/src/56_recipspace -I$(top_srcdir)/src/56_recipspace +src_56_xc_fcflags = -I$(top_builddir)/src/56_xc -I$(top_srcdir)/src/56_xc +src_57_iopsp_parser_fcflags = -I$(top_builddir)/src/57_iopsp_parser -I$(top_srcdir)/src/57_iopsp_parser +src_57_iovars_fcflags = -I$(top_builddir)/src/57_iovars -I$(top_srcdir)/src/57_iovars +src_61_occeig_fcflags = -I$(top_builddir)/src/61_occeig -I$(top_srcdir)/src/61_occeig +src_62_cg_noabirule_fcflags = -I$(top_builddir)/src/62_cg_noabirule -I$(top_srcdir)/src/62_cg_noabirule +src_62_ctqmc_fcflags = -I$(top_builddir)/src/62_ctqmc -I$(top_srcdir)/src/62_ctqmc +src_62_iowfdenpot_fcflags = -I$(top_builddir)/src/62_iowfdenpot -I$(top_srcdir)/src/62_iowfdenpot +src_62_poisson_fcflags = -I$(top_builddir)/src/62_poisson -I$(top_srcdir)/src/62_poisson +src_62_wvl_wfs_fcflags = -I$(top_builddir)/src/62_wvl_wfs -I$(top_srcdir)/src/62_wvl_wfs +src_64_psp_fcflags = -I$(top_builddir)/src/64_psp -I$(top_srcdir)/src/64_psp +src_65_lotf_base_fcflags = -I$(top_builddir)/src/65_lotf_base -I$(top_srcdir)/src/65_lotf_base +src_65_paw_fcflags = -I$(top_builddir)/src/65_paw -I$(top_srcdir)/src/65_paw +src_66_nonlocal_fcflags = -I$(top_builddir)/src/66_nonlocal -I$(top_srcdir)/src/66_nonlocal +src_66_vdwxc_fcflags = -I$(top_builddir)/src/66_vdwxc -I$(top_srcdir)/src/66_vdwxc +src_66_wfs_fcflags = -I$(top_builddir)/src/66_wfs -I$(top_srcdir)/src/66_wfs +src_67_common_fcflags = -I$(top_builddir)/src/67_common -I$(top_srcdir)/src/67_common +src_67_python_invocation_ext_fcflags = -I$(top_builddir)/src/67_python_invocation_ext -I$(top_srcdir)/src/67_python_invocation_ext +src_67_triqs_ext_fcflags = -I$(top_builddir)/src/67_triqs_ext -I$(top_srcdir)/src/67_triqs_ext +src_68_dmft_fcflags = -I$(top_builddir)/src/68_dmft -I$(top_srcdir)/src/68_dmft +src_68_lotf_fcflags = -I$(top_builddir)/src/68_lotf -I$(top_srcdir)/src/68_lotf +src_68_recursion_fcflags = -I$(top_builddir)/src/68_recursion -I$(top_srcdir)/src/68_recursion +src_68_rsprc_fcflags = -I$(top_builddir)/src/68_rsprc -I$(top_srcdir)/src/68_rsprc +src_69_wfdesc_fcflags = -I$(top_builddir)/src/69_wfdesc -I$(top_srcdir)/src/69_wfdesc +src_70_gw_fcflags = -I$(top_builddir)/src/70_gw -I$(top_srcdir)/src/70_gw +src_71_bse_fcflags = -I$(top_builddir)/src/71_bse -I$(top_srcdir)/src/71_bse +src_71_wannier_fcflags = -I$(top_builddir)/src/71_wannier -I$(top_srcdir)/src/71_wannier +src_72_response_fcflags = -I$(top_builddir)/src/72_response -I$(top_srcdir)/src/72_response +src_77_ddb_fcflags = -I$(top_builddir)/src/77_ddb -I$(top_srcdir)/src/77_ddb +src_77_suscep_fcflags = -I$(top_builddir)/src/77_suscep -I$(top_srcdir)/src/77_suscep +src_78_effpot_fcflags = -I$(top_builddir)/src/78_effpot -I$(top_srcdir)/src/78_effpot +src_78_eph_fcflags = -I$(top_builddir)/src/78_eph -I$(top_srcdir)/src/78_eph +src_79_seqpar_mpi_fcflags = -I$(top_builddir)/src/79_seqpar_mpi -I$(top_srcdir)/src/79_seqpar_mpi +src_80_rttddft_fcflags = -I$(top_builddir)/src/80_rttddft -I$(top_srcdir)/src/80_rttddft +src_80_tdep_fcflags = -I$(top_builddir)/src/80_tdep -I$(top_srcdir)/src/80_tdep +src_94_scfcv_fcflags = -I$(top_builddir)/src/94_scfcv -I$(top_srcdir)/src/94_scfcv +src_95_drive_fcflags = -I$(top_builddir)/src/95_drive -I$(top_srcdir)/src/95_drive +src_common_fcflags = -I$(top_builddir)/shared/common/src/incs -I$(top_srcdir)/shared/common/src/incs -I$(top_builddir)/shared/common/src/mods -I$(top_srcdir)/shared/common/src/mods +src_core_fcflags = -I$(top_builddir)/src/incs -I$(top_srcdir)/src/incs -I$(top_builddir)/src/mods -I$(top_srcdir)/src/mods +src_libpaw_fcflags = -I$(top_builddir)/shared/libpaw/incs -I$(top_srcdir)/shared/libpaw/incs -I$(top_builddir)/shared/libpaw/mods -I$(top_srcdir)/shared/libpaw/mods +srcdir = . +sysconfdir = ${prefix}/etc +target = x86_64-apple-darwin18.7.0 +target_alias = +target_cpu = x86_64 +target_os = darwin18.7.0 +target_vendor = apple +top_build_prefix = ../../../../ +top_builddir = ../../../.. +top_srcdir = ../../../.. +with_abinit_common = +with_bigdft = +with_config_file = +with_debug_flavor = +with_fallbacks = +with_fc_vendor = +with_fc_version = +with_fft_flavor = fftw3 +with_fftw3 = +with_gnu_ld = +with_gpu = +with_hdf5 = /opt/local +with_kokkos = +with_levmar = +with_libpaw = +with_libpsml = +with_libxc = /opt/local +with_libxml2 = +with_linalg_flavor = openblas +with_mpi = /opt/local +with_mpi_level = +with_netcdf = /opt/local +with_optim_flavor = +with_papi = +with_pfft = +with_triqs = +with_wannier90 = +with_xmlf90 = +with_yakl = +AM_CFLAGS = -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include +AM_CXXFLAGS = $(sd_triqs_cxxflags) +AM_FCFLAGS = -ffree-form -J../mods +AM_CPPFLAGS = \ + -I$(top_builddir)/shared/common/src/14_hidewrite -I$(top_srcdir)/shared/common/src/14_hidewrite \ + -I$(top_builddir)/shared/common/src/incs -I$(top_srcdir)/shared/common/src/incs -I$(top_builddir)/shared/common/src/mods -I$(top_srcdir)/shared/common/src/mods \ + -I$(top_builddir)/src/incs -I$(top_srcdir)/src/incs -I$(top_builddir)/src/mods -I$(top_srcdir)/src/mods \ + -I$(top_builddir)/shared/libpaw/incs -I$(top_srcdir)/shared/libpaw/incs -I$(top_builddir)/shared/libpaw/mods -I$(top_srcdir)/shared/libpaw/mods \ + + + +# Regular source files +lib21_hashfuncs_srcs = \ + m_hash_md5.F90 + + +# Source files depending on conditionals + +# Library description +noinst_LIBRARIES = lib21_hashfuncs.a +lib21_hashfuncs_a_SOURCES = $(lib21_hashfuncs_srcs) + +# Dependencies (inside the directory) of directory 21_hashfuncs +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. +CLEANFILES = m_hash_md5_cpp.f90 m_hash_md5.$(MODEXT) \ + test_md5_sum_from_file.log test_md5_sum_from_file.tmp \ + test_md5_sum_from_string.log test_md5_sum_from_string.tmp +EXTRA_DIST = abinit.src abinit.dep _21_hashfuncs_ +test_md5_sum_from_file_SOURCES = test_md5_sum_from_file.F90 +test_md5_sum_from_file_CPPFLAGS = -I/opt/local/include -I$(top_srcdir)/shared/common/src/incs -I$(top_srcdir)/src/incs -I$(top_builddir)/shared/common/src/mods -I$(top_builddir)/src/mods +test_md5_sum_from_file_LDADD = \ + lib21_hashfuncs.a \ + ../02_clib/lib02_clib.a \ + ../16_hideleave/lib16_hideleave.a \ + ../14_hidewrite/lib14_hidewrite.a \ + ../12_hide_mpi/lib12_hide_mpi.a \ + ../11_memory_mpi/lib11_memory_mpi.a \ + ../10_defs/lib10_defs.a \ + ../02_clib/lib02_clib.a \ + -L/opt/local/lib -lnetcdf \ + -L/opt/local/lib -lopenblas + +test_md5_sum_from_string_SOURCES = test_md5_sum_from_string.F90 +test_md5_sum_from_string_CPPFLAGS = -I/opt/local/include -I$(top_srcdir)/shared/common/src/incs -I$(top_srcdir)/src/incs -I$(top_builddir)/shared/common/src/mods -I$(top_builddir)/src/mods +test_md5_sum_from_string_LDADD = \ + lib21_hashfuncs.a \ + ../02_clib/lib02_clib.a \ + ../16_hideleave/lib16_hideleave.a \ + ../14_hidewrite/lib14_hidewrite.a \ + ../12_hide_mpi/lib12_hide_mpi.a \ + ../11_memory_mpi/lib11_memory_mpi.a \ + ../10_defs/lib10_defs.a \ + ../02_clib/lib02_clib.a \ + -L/opt/local/lib -lnetcdf \ + -L/opt/local/lib -lopenblas + +all: all-am + +.SUFFIXES: +.SUFFIXES: .F90 .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu shared/common/src/21_hashfuncs/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu shared/common/src/21_hashfuncs/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-checkPROGRAMS: + -test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS) + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) + +lib21_hashfuncs.a: $(lib21_hashfuncs_a_OBJECTS) $(lib21_hashfuncs_a_DEPENDENCIES) $(EXTRA_lib21_hashfuncs_a_DEPENDENCIES) + $(AM_V_at)-rm -f lib21_hashfuncs.a + $(AM_V_AR)$(lib21_hashfuncs_a_AR) lib21_hashfuncs.a $(lib21_hashfuncs_a_OBJECTS) $(lib21_hashfuncs_a_LIBADD) + $(AM_V_at)$(RANLIB) lib21_hashfuncs.a + +test_md5_sum_from_file$(EXEEXT): $(test_md5_sum_from_file_OBJECTS) $(test_md5_sum_from_file_DEPENDENCIES) $(EXTRA_test_md5_sum_from_file_DEPENDENCIES) + @rm -f test_md5_sum_from_file$(EXEEXT) + $(AM_V_FCLD)$(FCLINK) $(test_md5_sum_from_file_OBJECTS) $(test_md5_sum_from_file_LDADD) $(LIBS) + +test_md5_sum_from_string$(EXEEXT): $(test_md5_sum_from_string_OBJECTS) $(test_md5_sum_from_string_DEPENDENCIES) $(EXTRA_test_md5_sum_from_string_DEPENDENCIES) + @rm -f test_md5_sum_from_string$(EXEEXT) + $(AM_V_FCLD)$(FCLINK) $(test_md5_sum_from_string_OBJECTS) $(test_md5_sum_from_string_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +.F90.o: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ $< + +.F90.obj: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +test_md5_sum_from_file-test_md5_sum_from_file.o: test_md5_sum_from_file.F90 + $(AM_V_PPFC)$(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_md5_sum_from_file_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o test_md5_sum_from_file-test_md5_sum_from_file.o `test -f 'test_md5_sum_from_file.F90' || echo '$(srcdir)/'`test_md5_sum_from_file.F90 + +test_md5_sum_from_file-test_md5_sum_from_file.obj: test_md5_sum_from_file.F90 + $(AM_V_PPFC)$(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_md5_sum_from_file_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o test_md5_sum_from_file-test_md5_sum_from_file.obj `if test -f 'test_md5_sum_from_file.F90'; then $(CYGPATH_W) 'test_md5_sum_from_file.F90'; else $(CYGPATH_W) '$(srcdir)/test_md5_sum_from_file.F90'; fi` + +test_md5_sum_from_string-test_md5_sum_from_string.o: test_md5_sum_from_string.F90 + $(AM_V_PPFC)$(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_md5_sum_from_string_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o test_md5_sum_from_string-test_md5_sum_from_string.o `test -f 'test_md5_sum_from_string.F90' || echo '$(srcdir)/'`test_md5_sum_from_string.F90 + +test_md5_sum_from_string-test_md5_sum_from_string.obj: test_md5_sum_from_string.F90 + $(AM_V_PPFC)$(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_md5_sum_from_string_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o test_md5_sum_from_string-test_md5_sum_from_string.obj `if test -f 'test_md5_sum_from_string.F90'; then $(CYGPATH_W) 'test_md5_sum_from_string.F90'; else $(CYGPATH_W) '$(srcdir)/test_md5_sum_from_string.F90'; fi` + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-local +check: check-am +all-am: Makefile $(LIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-noinstLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am check-local clean \ + clean-checkPROGRAMS clean-generic clean-noinstLIBRARIES \ + cscopelist-am ctags ctags-am distclean distclean-compile \ + distclean-generic distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am + +.PRECIOUS: Makefile + + +check-local: + ./test_md5_sum_from_file >test_md5_sum_from_file.log 2>&1; grep '^TEST FAILED' test_md5_sum_from_file.log && echo 'Unit test test_md5_sum_from_file FAILED' || echo 'Unit test test_md5_sum_from_file OK' + ./test_md5_sum_from_string >test_md5_sum_from_string.log 2>&1; grep '^TEST FAILED' test_md5_sum_from_string.log && echo 'Unit test test_md5_sum_from_string FAILED' || echo 'Unit test test_md5_sum_from_string OK' + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/GX-PAW/common/src/21_hashfuncs/Makefile.am b/GX-PAW/common/src/21_hashfuncs/Makefile.am new file mode 100644 index 00000000..0d50bf90 --- /dev/null +++ b/GX-PAW/common/src/21_hashfuncs/Makefile.am @@ -0,0 +1,94 @@ +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-corelibs on 2024/03/16 21:07:38 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-corelibs script or its config file instead. +# + +AM_CFLAGS = @ABI_CPPFLAGS@ +AM_CXXFLAGS = $(sd_triqs_cxxflags) +AM_FCFLAGS = @FPPFLAGS@ @FCFLAGS_FREEFORM@ @FCFLAGS_MODDIR@ @sd_sys_fcflags@ @fcflags_opt_21_hashfuncs@ + +AM_CPPFLAGS = \ + @src_14_hidewrite_fcflags@ \ + @src_common_fcflags@ \ + @src_core_fcflags@ \ + @src_libpaw_fcflags@ \ + @fc_mod_fcflags@ + +# Regular source files +lib21_hashfuncs_srcs = \ + m_hash_md5.F90 + +# Source files depending on conditionals + + +# Library description +noinst_LIBRARIES = lib21_hashfuncs.a + +lib21_hashfuncs_a_SOURCES= $(lib21_hashfuncs_srcs) + +CLEANFILES = \ + m_hash_md5_cpp.f90 + +EXTRA_DIST = abinit.src + +EXTRA_DIST += abinit.dep + +# Dependencies (inside the directory) of directory 21_hashfuncs +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. + +CLEANFILES += \ + m_hash_md5.$(MODEXT) + + +check_PROGRAMS = \ + test_md5_sum_from_file \ + test_md5_sum_from_string + +test_md5_sum_from_file_SOURCES = test_md5_sum_from_file.F90 +test_md5_sum_from_file_CPPFLAGS = @sd_netcdf_cppflags@ @sd_linalg_cppflags@ -I$(top_srcdir)/shared/common/src/incs -I$(top_srcdir)/src/incs -I$(top_builddir)/shared/common/src/mods -I$(top_builddir)/src/mods +test_md5_sum_from_file_LDADD = \ + lib21_hashfuncs.a \ + ../02_clib/lib02_clib.a \ + ../16_hideleave/lib16_hideleave.a \ + ../14_hidewrite/lib14_hidewrite.a \ + ../12_hide_mpi/lib12_hide_mpi.a \ + ../11_memory_mpi/lib11_memory_mpi.a \ + ../10_defs/lib10_defs.a \ + ../02_clib/lib02_clib.a \ + @sd_netcdf_libs@ \ + @sd_linalg_libs@ + +test_md5_sum_from_string_SOURCES = test_md5_sum_from_string.F90 +test_md5_sum_from_string_CPPFLAGS = @sd_netcdf_cppflags@ @sd_linalg_cppflags@ -I$(top_srcdir)/shared/common/src/incs -I$(top_srcdir)/src/incs -I$(top_builddir)/shared/common/src/mods -I$(top_builddir)/src/mods +test_md5_sum_from_string_LDADD = \ + lib21_hashfuncs.a \ + ../02_clib/lib02_clib.a \ + ../16_hideleave/lib16_hideleave.a \ + ../14_hidewrite/lib14_hidewrite.a \ + ../12_hide_mpi/lib12_hide_mpi.a \ + ../11_memory_mpi/lib11_memory_mpi.a \ + ../10_defs/lib10_defs.a \ + ../02_clib/lib02_clib.a \ + @sd_netcdf_libs@ \ + @sd_linalg_libs@ + +check-local: + ./test_md5_sum_from_file >test_md5_sum_from_file.log 2>&1; grep '^TEST FAILED' test_md5_sum_from_file.log && echo 'Unit test test_md5_sum_from_file FAILED' || echo 'Unit test test_md5_sum_from_file OK' + ./test_md5_sum_from_string >test_md5_sum_from_string.log 2>&1; grep '^TEST FAILED' test_md5_sum_from_string.log && echo 'Unit test test_md5_sum_from_string FAILED' || echo 'Unit test test_md5_sum_from_string OK' + +CLEANFILES += \ + test_md5_sum_from_file.log \ + test_md5_sum_from_file.tmp \ + test_md5_sum_from_string.log \ + test_md5_sum_from_string.tmp + +EXTRA_DIST += _21_hashfuncs_ diff --git a/GX-PAW/common/src/21_hashfuncs/Makefile.in b/GX-PAW/common/src/21_hashfuncs/Makefile.in new file mode 100644 index 00000000..8bd08789 --- /dev/null +++ b/GX-PAW/common/src/21_hashfuncs/Makefile.in @@ -0,0 +1,1541 @@ +# Makefile.in generated by automake 1.16.3 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2020 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-corelibs on 2024/03/16 21:07:38 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-corelibs script or its config file instead. +# + +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +check_PROGRAMS = test_md5_sum_from_file$(EXEEXT) \ + test_md5_sum_from_string$(EXEEXT) +subdir = shared/common/src/21_hashfuncs +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/m4/arch-gpu.m4 \ + $(top_srcdir)/config/m4/arch-mpi.m4 \ + $(top_srcdir)/config/m4/auto-autotools.m4 \ + $(top_srcdir)/config/m4/auto-corelibs.m4 \ + $(top_srcdir)/config/m4/auto-debug.m4 \ + $(top_srcdir)/config/m4/auto-dirflags.m4 \ + $(top_srcdir)/config/m4/auto-env.m4 \ + $(top_srcdir)/config/m4/auto-hints.m4 \ + $(top_srcdir)/config/m4/auto-optim.m4 \ + $(top_srcdir)/config/m4/auto-options.m4 \ + $(top_srcdir)/config/m4/auto-output.m4 \ + $(top_srcdir)/config/m4/auto-triggers.m4 \ + $(top_srcdir)/config/m4/conf-atompaw.m4 \ + $(top_srcdir)/config/m4/conf-debug.m4 \ + $(top_srcdir)/config/m4/conf-fallbacks.m4 \ + $(top_srcdir)/config/m4/conf-files.m4 \ + $(top_srcdir)/config/m4/conf-init.m4 \ + $(top_srcdir)/config/m4/conf-openmp.m4 \ + $(top_srcdir)/config/m4/conf-optim.m4 \ + $(top_srcdir)/config/m4/lang-c++.m4 \ + $(top_srcdir)/config/m4/lang-c.m4 \ + $(top_srcdir)/config/m4/lang-fortran-import.m4 \ + $(top_srcdir)/config/m4/lang-fortran.m4 \ + $(top_srcdir)/config/m4/lang-python.m4 \ + $(top_srcdir)/config/m4/libxml2.m4 \ + $(top_srcdir)/config/m4/misc-display.m4 \ + $(top_srcdir)/config/m4/sd_abinit_common.m4 \ + $(top_srcdir)/config/m4/sd_arch_gpu.m4 \ + $(top_srcdir)/config/m4/sd_arch_mpi.m4 \ + $(top_srcdir)/config/m4/sd_bigdft.m4 \ + $(top_srcdir)/config/m4/sd_core.m4 \ + $(top_srcdir)/config/m4/sd_esl.m4 \ + $(top_srcdir)/config/m4/sd_fftw3.m4 \ + $(top_srcdir)/config/m4/sd_gpu_kokkos.m4 \ + $(top_srcdir)/config/m4/sd_gpu_yakl.m4 \ + $(top_srcdir)/config/m4/sd_io_hdf5.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf_fortran.m4 \ + $(top_srcdir)/config/m4/sd_levmar.m4 \ + $(top_srcdir)/config/m4/sd_libpaw.m4 \ + $(top_srcdir)/config/m4/sd_libpsml.m4 \ + $(top_srcdir)/config/m4/sd_libxc.m4 \ + $(top_srcdir)/config/m4/sd_math_fft.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_core.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_util.m4 \ + $(top_srcdir)/config/m4/sd_papi.m4 \ + $(top_srcdir)/config/m4/sd_pfft.m4 \ + $(top_srcdir)/config/m4/sd_triqs.m4 \ + $(top_srcdir)/config/m4/sd_wannier90.m4 \ + $(top_srcdir)/config/m4/sd_xmlf90.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = +lib21_hashfuncs_a_AR = $(AR) $(ARFLAGS) +lib21_hashfuncs_a_LIBADD = +am__objects_1 = m_hash_md5.$(OBJEXT) +am_lib21_hashfuncs_a_OBJECTS = $(am__objects_1) +lib21_hashfuncs_a_OBJECTS = $(am_lib21_hashfuncs_a_OBJECTS) +am_test_md5_sum_from_file_OBJECTS = \ + test_md5_sum_from_file-test_md5_sum_from_file.$(OBJEXT) +test_md5_sum_from_file_OBJECTS = $(am_test_md5_sum_from_file_OBJECTS) +test_md5_sum_from_file_DEPENDENCIES = lib21_hashfuncs.a \ + ../02_clib/lib02_clib.a ../16_hideleave/lib16_hideleave.a \ + ../14_hidewrite/lib14_hidewrite.a \ + ../12_hide_mpi/lib12_hide_mpi.a \ + ../11_memory_mpi/lib11_memory_mpi.a ../10_defs/lib10_defs.a \ + ../02_clib/lib02_clib.a +am_test_md5_sum_from_string_OBJECTS = \ + test_md5_sum_from_string-test_md5_sum_from_string.$(OBJEXT) +test_md5_sum_from_string_OBJECTS = \ + $(am_test_md5_sum_from_string_OBJECTS) +test_md5_sum_from_string_DEPENDENCIES = lib21_hashfuncs.a \ + ../02_clib/lib02_clib.a ../16_hideleave/lib16_hideleave.a \ + ../14_hidewrite/lib14_hidewrite.a \ + ../12_hide_mpi/lib12_hide_mpi.a \ + ../11_memory_mpi/lib11_memory_mpi.a ../10_defs/lib10_defs.a \ + ../02_clib/lib02_clib.a +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +PPFCCOMPILE = $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) +AM_V_PPFC = $(am__v_PPFC_@AM_V@) +am__v_PPFC_ = $(am__v_PPFC_@AM_DEFAULT_V@) +am__v_PPFC_0 = @echo " PPFC " $@; +am__v_PPFC_1 = +FCLD = $(FC) +FCLINK = $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \ + $@ +AM_V_FCLD = $(am__v_FCLD_@AM_V@) +am__v_FCLD_ = $(am__v_FCLD_@AM_DEFAULT_V@) +am__v_FCLD_0 = @echo " FCLD " $@; +am__v_FCLD_1 = +SOURCES = $(lib21_hashfuncs_a_SOURCES) \ + $(test_md5_sum_from_file_SOURCES) \ + $(test_md5_sum_from_string_SOURCES) +DIST_SOURCES = $(lib21_hashfuncs_a_SOURCES) \ + $(test_md5_sum_from_file_SOURCES) \ + $(test_md5_sum_from_string_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ABINIT_BINARY_PACKAGE = @ABINIT_BINARY_PACKAGE@ +ABINIT_COMMON_CPPFLAGS = @ABINIT_COMMON_CPPFLAGS@ +ABINIT_COMMON_FCFLAGS = @ABINIT_COMMON_FCFLAGS@ +ABINIT_COMMON_LDFLAGS = @ABINIT_COMMON_LDFLAGS@ +ABINIT_COMMON_LIBS = @ABINIT_COMMON_LIBS@ +ABINIT_TARGET = @ABINIT_TARGET@ +ABINIT_VERSION = @ABINIT_VERSION@ +ABINIT_VERSION_BASE = @ABINIT_VERSION_BASE@ +ABINIT_VERSION_BUILD = @ABINIT_VERSION_BUILD@ +ABINIT_VERSION_MAJOR = @ABINIT_VERSION_MAJOR@ +ABINIT_VERSION_MICRO = @ABINIT_VERSION_MICRO@ +ABINIT_VERSION_MINOR = @ABINIT_VERSION_MINOR@ +ABI_CPPFLAGS = @ABI_CPPFLAGS@ +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +ARFLAGS = @ARFLAGS@ +ARFLAGS_CMD = @ARFLAGS_CMD@ +ARFLAGS_DEBUG = @ARFLAGS_DEBUG@ +ARFLAGS_EXTRA = @ARFLAGS_EXTRA@ +ARFLAGS_HINTS = @ARFLAGS_HINTS@ +ARFLAGS_OPTIM = @ARFLAGS_OPTIM@ +ATOMPAW_BIN = @ATOMPAW_BIN@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BIGDFT_CPPFLAGS = @BIGDFT_CPPFLAGS@ +BIGDFT_FCFLAGS = @BIGDFT_FCFLAGS@ +BIGDFT_LDFLAGS = @BIGDFT_LDFLAGS@ +BIGDFT_LIBS = @BIGDFT_LIBS@ +BOURNE_SHELL = @BOURNE_SHELL@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CC_LDFLAGS = @CC_LDFLAGS@ +CC_LDFLAGS_DEBUG = @CC_LDFLAGS_DEBUG@ +CC_LDFLAGS_EXTRA = @CC_LDFLAGS_EXTRA@ +CC_LDFLAGS_GPU = @CC_LDFLAGS_GPU@ +CC_LDFLAGS_HINTS = @CC_LDFLAGS_HINTS@ +CC_LDFLAGS_OPTIM = @CC_LDFLAGS_OPTIM@ +CC_LIBS = @CC_LIBS@ +CC_LIBS_DEBUG = @CC_LIBS_DEBUG@ +CC_LIBS_EXTRA = @CC_LIBS_EXTRA@ +CC_LIBS_GPU = @CC_LIBS_GPU@ +CC_LIBS_HINTS = @CC_LIBS_HINTS@ +CC_LIBS_OPTIM = @CC_LIBS_OPTIM@ +CFLAGS = @CFLAGS@ +CFLAGS_DEBUG = @CFLAGS_DEBUG@ +CFLAGS_EXTRA = @CFLAGS_EXTRA@ +CFLAGS_GPU = @CFLAGS_GPU@ +CFLAGS_HINTS = @CFLAGS_HINTS@ +CFLAGS_OPTIM = @CFLAGS_OPTIM@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CPPFLAGS_DEBUG = @CPPFLAGS_DEBUG@ +CPPFLAGS_EXTRA = @CPPFLAGS_EXTRA@ +CPPFLAGS_GPU = @CPPFLAGS_GPU@ +CPPFLAGS_HINTS = @CPPFLAGS_HINTS@ +CPPFLAGS_HINTS_EXT = @CPPFLAGS_HINTS_EXT@ +CPPFLAGS_OPTIM = @CPPFLAGS_OPTIM@ +CXX = @CXX@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CXXFLAGS_DEBUG = @CXXFLAGS_DEBUG@ +CXXFLAGS_EXTRA = @CXXFLAGS_EXTRA@ +CXXFLAGS_GPU = @CXXFLAGS_GPU@ +CXXFLAGS_HINTS = @CXXFLAGS_HINTS@ +CXXFLAGS_OPTIM = @CXXFLAGS_OPTIM@ +CXX_LDFLAGS = @CXX_LDFLAGS@ +CXX_LDFLAGS_DEBUG = @CXX_LDFLAGS_DEBUG@ +CXX_LDFLAGS_EXTRA = @CXX_LDFLAGS_EXTRA@ +CXX_LDFLAGS_GPU = @CXX_LDFLAGS_GPU@ +CXX_LDFLAGS_HINTS = @CXX_LDFLAGS_HINTS@ +CXX_LDFLAGS_OPTIM = @CXX_LDFLAGS_OPTIM@ +CXX_LIBS = @CXX_LIBS@ +CXX_LIBS_DEBUG = @CXX_LIBS_DEBUG@ +CXX_LIBS_EXTRA = @CXX_LIBS_EXTRA@ +CXX_LIBS_GPU = @CXX_LIBS_GPU@ +CXX_LIBS_HINTS = @CXX_LIBS_HINTS@ +CXX_LIBS_OPTIM = @CXX_LIBS_OPTIM@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ +FCFLAGS = @FCFLAGS@ +FCFLAGS_DEBUG = @FCFLAGS_DEBUG@ +FCFLAGS_EXTRA = @FCFLAGS_EXTRA@ +FCFLAGS_F90 = @FCFLAGS_F90@ +FCFLAGS_FIXEDFORM = @FCFLAGS_FIXEDFORM@ +FCFLAGS_FREEFORM = @FCFLAGS_FREEFORM@ +FCFLAGS_HINTS = @FCFLAGS_HINTS@ +FCFLAGS_MODDIR = @FCFLAGS_MODDIR@ +FCFLAGS_OPENMP = @FCFLAGS_OPENMP@ +FCFLAGS_OPENMP_OFFLOAD = @FCFLAGS_OPENMP_OFFLOAD@ +FCFLAGS_OPTIM = @FCFLAGS_OPTIM@ +FCLIBS = @FCLIBS@ +FC_LDFLAGS = @FC_LDFLAGS@ +FC_LDFLAGS_DEBUG = @FC_LDFLAGS_DEBUG@ +FC_LDFLAGS_EXTRA = @FC_LDFLAGS_EXTRA@ +FC_LDFLAGS_HINTS = @FC_LDFLAGS_HINTS@ +FC_LDFLAGS_OPTIM = @FC_LDFLAGS_OPTIM@ +FC_LIBS = @FC_LIBS@ +FC_LIBS_DEBUG = @FC_LIBS_DEBUG@ +FC_LIBS_EXTRA = @FC_LIBS_EXTRA@ +FC_LIBS_HINTS = @FC_LIBS_HINTS@ +FC_LIBS_OPTIM = @FC_LIBS_OPTIM@ +FC_NOWRAP = @FC_NOWRAP@ +FFLAGS = @FFLAGS@ +FFTW3_CFLAGS = @FFTW3_CFLAGS@ +FFTW3_CPPFLAGS = @FFTW3_CPPFLAGS@ +FFTW3_FCFLAGS = @FFTW3_FCFLAGS@ +FFTW3_LDFLAGS = @FFTW3_LDFLAGS@ +FFTW3_LIBS = @FFTW3_LIBS@ +FFT_CFLAGS = @FFT_CFLAGS@ +FFT_FCFLAGS = @FFT_FCFLAGS@ +FPP = @FPP@ +FPPFLAGS = @FPPFLAGS@ +FPPFLAGS_DEBUG = @FPPFLAGS_DEBUG@ +FPPFLAGS_EXTRA = @FPPFLAGS_EXTRA@ +FPPFLAGS_HINTS = @FPPFLAGS_HINTS@ +FPPFLAGS_OPTIM = @FPPFLAGS_OPTIM@ +GPU_ARCH = @GPU_ARCH@ +GPU_CFLAGS = @GPU_CFLAGS@ +GPU_CPPFLAGS = @GPU_CPPFLAGS@ +GPU_CXXFLAGS = @GPU_CXXFLAGS@ +GPU_FCFLAGS = @GPU_FCFLAGS@ +GPU_LDFLAGS = @GPU_LDFLAGS@ +GPU_LIBS = @GPU_LIBS@ +GRAPHATOM_BIN = @GRAPHATOM_BIN@ +GREP = @GREP@ +H5CC = @H5CC@ +HDF5_CFLAGS = @HDF5_CFLAGS@ +HDF5_CPPFLAGS = @HDF5_CPPFLAGS@ +HDF5_CXXFLAGS = @HDF5_CXXFLAGS@ +HDF5_FCFLAGS = @HDF5_FCFLAGS@ +HDF5_LDFLAGS = @HDF5_LDFLAGS@ +HDF5_LIBS = @HDF5_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +LDFLAGS = @LDFLAGS@ +LEVMAR_CFLAGS = @LEVMAR_CFLAGS@ +LEVMAR_CPPFLAGS = @LEVMAR_CPPFLAGS@ +LEVMAR_LDFLAGS = @LEVMAR_LDFLAGS@ +LEVMAR_LIBS = @LEVMAR_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPAW_CPPFLAGS = @LIBPAW_CPPFLAGS@ +LIBPAW_FCFLAGS = @LIBPAW_FCFLAGS@ +LIBPAW_LDFLAGS = @LIBPAW_LDFLAGS@ +LIBPAW_LIBS = @LIBPAW_LIBS@ +LIBPSML_CPPFLAGS = @LIBPSML_CPPFLAGS@ +LIBPSML_FCFLAGS = @LIBPSML_FCFLAGS@ +LIBPSML_LDFLAGS = @LIBPSML_LDFLAGS@ +LIBPSML_LIBS = @LIBPSML_LIBS@ +LIBS = @LIBS@ +LIBXC_CFLAGS = @LIBXC_CFLAGS@ +LIBXC_CPPFLAGS = @LIBXC_CPPFLAGS@ +LIBXC_FCFLAGS = @LIBXC_FCFLAGS@ +LIBXC_LDFLAGS = @LIBXC_LDFLAGS@ +LIBXC_LIBS = @LIBXC_LIBS@ +LIBXML2_CPPFLAGS = @LIBXML2_CPPFLAGS@ +LIBXML2_FCFLAGS = @LIBXML2_FCFLAGS@ +LIBXML2_LIBS = @LIBXML2_LIBS@ +LINALG_CFLAGS = @LINALG_CFLAGS@ +LINALG_CPPFLAGS = @LINALG_CPPFLAGS@ +LINALG_CXXFLAGS = @LINALG_CXXFLAGS@ +LINALG_FCFLAGS = @LINALG_FCFLAGS@ +LINALG_LDFLAGS = @LINALG_LDFLAGS@ +LINALG_LIBS = @LINALG_LIBS@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODEXT = @MODEXT@ +MPI_CFLAGS = @MPI_CFLAGS@ +MPI_CPPFLAGS = @MPI_CPPFLAGS@ +MPI_CXXFLAGS = @MPI_CXXFLAGS@ +MPI_FCFLAGS = @MPI_FCFLAGS@ +MPI_LDFLAGS = @MPI_LDFLAGS@ +MPI_LIBS = @MPI_LIBS@ +MV = @MV@ +NETCDF_CFLAGS = @NETCDF_CFLAGS@ +NETCDF_CPPFLAGS = @NETCDF_CPPFLAGS@ +NETCDF_CXXFLAGS = @NETCDF_CXXFLAGS@ +NETCDF_FCFLAGS = @NETCDF_FCFLAGS@ +NETCDF_FORTRAN_CFLAGS = @NETCDF_FORTRAN_CFLAGS@ +NETCDF_FORTRAN_CPPFLAGS = @NETCDF_FORTRAN_CPPFLAGS@ +NETCDF_FORTRAN_CXXFLAGS = @NETCDF_FORTRAN_CXXFLAGS@ +NETCDF_FORTRAN_FCFLAGS = @NETCDF_FORTRAN_FCFLAGS@ +NETCDF_FORTRAN_LDFLAGS = @NETCDF_FORTRAN_LDFLAGS@ +NETCDF_FORTRAN_LIBS = @NETCDF_FORTRAN_LIBS@ +NETCDF_LDFLAGS = @NETCDF_LDFLAGS@ +NETCDF_LIBS = @NETCDF_LIBS@ +NVCC = @NVCC@ +NVCC_CFLAGS = @NVCC_CFLAGS@ +NVCC_CPPFLAGS = @NVCC_CPPFLAGS@ +NVCC_LDFLAGS = @NVCC_LDFLAGS@ +NVCC_LIBS = @NVCC_LIBS@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PAPI_CFLAGS = @PAPI_CFLAGS@ +PAPI_CPPFLAGS = @PAPI_CPPFLAGS@ +PAPI_LDFLAGS = @PAPI_LDFLAGS@ +PAPI_LIBS = @PAPI_LIBS@ +PATCH = @PATCH@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PFFT_CFLAGS = @PFFT_CFLAGS@ +PFFT_CPPFLAGS = @PFFT_CPPFLAGS@ +PFFT_LDFLAGS = @PFFT_LDFLAGS@ +PFFT_LIBS = @PFFT_LIBS@ +PYFLAGS = @PYFLAGS@ +PYTHON = @PYTHON@ +PYTHON_CONFIG = @PYTHON_CONFIG@ +PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ +RANLIB = @RANLIB@ +REALPATH = @REALPATH@ +RM = @RM@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +TAR = @TAR@ +TRIQS_CFLAGS = @TRIQS_CFLAGS@ +TRIQS_CPPFLAGS = @TRIQS_CPPFLAGS@ +TRIQS_CXXFLAGS = @TRIQS_CXXFLAGS@ +TRIQS_LDFLAGS = @TRIQS_LDFLAGS@ +TRIQS_LIBS = @TRIQS_LIBS@ +TRUE_CPP = @TRUE_CPP@ +VERSION = @VERSION@ +WANNIER90_CPPFLAGS = @WANNIER90_CPPFLAGS@ +WANNIER90_FCFLAGS = @WANNIER90_FCFLAGS@ +WANNIER90_LDFLAGS = @WANNIER90_LDFLAGS@ +WANNIER90_LIBS = @WANNIER90_LIBS@ +XML2_CONFIG = @XML2_CONFIG@ +XMLF90_CPPFLAGS = @XMLF90_CPPFLAGS@ +XMLF90_FCFLAGS = @XMLF90_FCFLAGS@ +XMLF90_LDFLAGS = @XMLF90_LDFLAGS@ +XMLF90_LIBS = @XMLF90_LIBS@ +XML_CPPFLAGS = @XML_CPPFLAGS@ +XML_LIBS = @XML_LIBS@ +XPP = @XPP@ +XPPFLAGS = @XPPFLAGS@ +XPPFLAGS_DEBUG = @XPPFLAGS_DEBUG@ +XPPFLAGS_EXTRA = @XPPFLAGS_EXTRA@ +XPPFLAGS_OPTIM = @XPPFLAGS_OPTIM@ +YAKL_CPPFLAGS = @YAKL_CPPFLAGS@ +YAKL_FCFLAGS = @YAKL_FCFLAGS@ +YAKL_LDFLAGS = @YAKL_LDFLAGS@ +YAKL_LIBS = @YAKL_LIBS@ +abi_ac_distcheck = @abi_ac_distcheck@ +abi_ac_version = @abi_ac_version@ +abi_am_version = @abi_am_version@ +abi_avx_safe_mode_enable = @abi_avx_safe_mode_enable@ +abi_bse_unpacked_enable = @abi_bse_unpacked_enable@ +abi_cc_path = @abi_cc_path@ +abi_cc_vendor = @abi_cc_vendor@ +abi_cc_version = @abi_cc_version@ +abi_cclock_enable = @abi_cclock_enable@ +abi_cpp_path = @abi_cpp_path@ +abi_cpu_64bits = @abi_cpu_64bits@ +abi_cpu_bits = @abi_cpu_bits@ +abi_cpu_model = @abi_cpu_model@ +abi_cpu_platform = @abi_cpu_platform@ +abi_cpu_spec = @abi_cpu_spec@ +abi_cpu_vendor = @abi_cpu_vendor@ +abi_crpa_optim_enable = @abi_crpa_optim_enable@ +abi_cxx_path = @abi_cxx_path@ +abi_cxx_vendor = @abi_cxx_vendor@ +abi_cxx_version = @abi_cxx_version@ +abi_debug_flavor = @abi_debug_flavor@ +abi_exports_enable = @abi_exports_enable@ +abi_fbk_abinit_common_ok = @abi_fbk_abinit_common_ok@ +abi_fbk_bigdft_ok = @abi_fbk_bigdft_ok@ +abi_fbk_config = @abi_fbk_config@ +abi_fbk_enable = @abi_fbk_enable@ +abi_fbk_fft_ok = @abi_fbk_fft_ok@ +abi_fbk_fftw3_ok = @abi_fbk_fftw3_ok@ +abi_fbk_gpu_ok = @abi_fbk_gpu_ok@ +abi_fbk_hdf5_ok = @abi_fbk_hdf5_ok@ +abi_fbk_init = @abi_fbk_init@ +abi_fbk_kokkos_ok = @abi_fbk_kokkos_ok@ +abi_fbk_levmar_ok = @abi_fbk_levmar_ok@ +abi_fbk_libpaw_ok = @abi_fbk_libpaw_ok@ +abi_fbk_libpsml_ok = @abi_fbk_libpsml_ok@ +abi_fbk_libxc_ok = @abi_fbk_libxc_ok@ +abi_fbk_libxml2_ok = @abi_fbk_libxml2_ok@ +abi_fbk_linalg_ok = @abi_fbk_linalg_ok@ +abi_fbk_list = @abi_fbk_list@ +abi_fbk_mpi_ok = @abi_fbk_mpi_ok@ +abi_fbk_netcdf_fortran_ok = @abi_fbk_netcdf_fortran_ok@ +abi_fbk_netcdf_ok = @abi_fbk_netcdf_ok@ +abi_fbk_papi_ok = @abi_fbk_papi_ok@ +abi_fbk_pfft_ok = @abi_fbk_pfft_ok@ +abi_fbk_prefix = @abi_fbk_prefix@ +abi_fbk_required = @abi_fbk_required@ +abi_fbk_triqs_ok = @abi_fbk_triqs_ok@ +abi_fbk_wannier90_ok = @abi_fbk_wannier90_ok@ +abi_fbk_xmlf90_ok = @abi_fbk_xmlf90_ok@ +abi_fbk_yakl_ok = @abi_fbk_yakl_ok@ +abi_fc_path = @abi_fc_path@ +abi_fc_vendor = @abi_fc_vendor@ +abi_fc_version = @abi_fc_version@ +abi_fc_wrap = @abi_fc_wrap@ +abi_fc_wrapper_enable = @abi_fc_wrapper_enable@ +abi_fpp_path = @abi_fpp_path@ +abi_gpu_arch = @abi_gpu_arch@ +abi_gpu_fcflags = @abi_gpu_fcflags@ +abi_gpu_flavor = @abi_gpu_flavor@ +abi_gpu_hip_libdir = @abi_gpu_hip_libdir@ +abi_gpu_incs = @abi_gpu_incs@ +abi_gpu_ldflags = @abi_gpu_ldflags@ +abi_gpu_libs = @abi_gpu_libs@ +abi_gpu_nvtx_v3 = @abi_gpu_nvtx_v3@ +abi_gpu_roctx = @abi_gpu_roctx@ +abi_gw_dpc_enable = @abi_gw_dpc_enable@ +abi_hints_enable = @abi_hints_enable@ +abi_libtetra_enable = @abi_libtetra_enable@ +abi_libxml2_cppflags = @abi_libxml2_cppflags@ +abi_libxml2_enable = @abi_libxml2_enable@ +abi_libxml2_fcflags = @abi_libxml2_fcflags@ +abi_libxml2_init = @abi_libxml2_init@ +abi_libxml2_ldflags = @abi_libxml2_ldflags@ +abi_libxml2_libs = @abi_libxml2_libs@ +abi_libxml2_ok = @abi_libxml2_ok@ +abi_libxml2_prefix = @abi_libxml2_prefix@ +abi_lotf_enable = @abi_lotf_enable@ +abi_lt_version = @abi_lt_version@ +abi_m4_version = @abi_m4_version@ +abi_memory_profiling_enable = @abi_memory_profiling_enable@ +abi_mpi_cflags = @abi_mpi_cflags@ +abi_mpi_cppflags = @abi_mpi_cppflags@ +abi_mpi_cxxflags = @abi_mpi_cxxflags@ +abi_mpi_enable = @abi_mpi_enable@ +abi_mpi_fcflags = @abi_mpi_fcflags@ +abi_mpi_flavor = @abi_mpi_flavor@ +abi_mpi_gpu_aware_enable = @abi_mpi_gpu_aware_enable@ +abi_mpi_incs = @abi_mpi_incs@ +abi_mpi_inplace_enable = @abi_mpi_inplace_enable@ +abi_mpi_interfaces_bugfix_enable = @abi_mpi_interfaces_bugfix_enable@ +abi_mpi_io_default_enable = @abi_mpi_io_default_enable@ +abi_mpi_io_enable = @abi_mpi_io_enable@ +abi_mpi_ldflags = @abi_mpi_ldflags@ +abi_mpi_level = @abi_mpi_level@ +abi_mpi_libs = @abi_mpi_libs@ +abi_netcdf_default_enable = @abi_netcdf_default_enable@ +abi_openmp_enable = @abi_openmp_enable@ +abi_openmp_offload_enable = @abi_openmp_offload_enable@ +abi_optim_flavor = @abi_optim_flavor@ +abi_python_invocation_enable = @abi_python_invocation_enable@ +abi_source_debug_enable = @abi_source_debug_enable@ +abi_stdin_enable = @abi_stdin_enable@ +abi_sys_spec = @abi_sys_spec@ +abi_timer_enable = @abi_timer_enable@ +abi_triqs_v1_4_enable = @abi_triqs_v1_4_enable@ +abi_triqs_v2_0_enable = @abi_triqs_v2_0_enable@ +abi_zdot_bugfix_enable = @abi_zdot_bugfix_enable@ +abinit_bindir = @abinit_bindir@ +abinit_builddir = @abinit_builddir@ +abinit_chkdir = @abinit_chkdir@ +abinit_datdir = @abinit_datdir@ +abinit_docdir = @abinit_docdir@ +abinit_incdir = @abinit_incdir@ +abinit_libdir = @abinit_libdir@ +abinit_mandir = @abinit_mandir@ +abinit_prefix = @abinit_prefix@ +abinit_srcdir = @abinit_srcdir@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_FC = @ac_ct_FC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cc_info_string = @cc_info_string@ +cxx_info_string = @cxx_info_string@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +enable_avx_safe_mode = @enable_avx_safe_mode@ +enable_bse_unpacked = @enable_bse_unpacked@ +enable_cclock = @enable_cclock@ +enable_crpa_optim = @enable_crpa_optim@ +enable_exports = @enable_exports@ +enable_fc_wrapper = @enable_fc_wrapper@ +enable_gw_dpc = @enable_gw_dpc@ +enable_hints = @enable_hints@ +enable_libtetra = @enable_libtetra@ +enable_lotf = @enable_lotf@ +enable_memory_profiling = @enable_memory_profiling@ +enable_mpi_gpu_aware = @enable_mpi_gpu_aware@ +enable_mpi_inplace = @enable_mpi_inplace@ +enable_mpi_interfaces_bugfix = @enable_mpi_interfaces_bugfix@ +enable_mpi_io = @enable_mpi_io@ +enable_mpi_io_default = @enable_mpi_io_default@ +enable_netcdf_default = @enable_netcdf_default@ +enable_openmp = @enable_openmp@ +enable_openmp_offload = @enable_openmp_offload@ +enable_python_invocation = @enable_python_invocation@ +enable_shared = @enable_shared@ +enable_source_debug = @enable_source_debug@ +enable_static = @enable_static@ +enable_stdin = @enable_stdin@ +enable_timer = @enable_timer@ +enable_triqs_v1_4 = @enable_triqs_v1_4@ +enable_triqs_v2_0 = @enable_triqs_v2_0@ +enable_zdot_bugfix = @enable_zdot_bugfix@ +exec_prefix = @exec_prefix@ +fc_info_string = @fc_info_string@ +fc_mod_fcflags = @fc_mod_fcflags@ +fc_timing = @fc_timing@ +fcflags_opt_02_clib = @fcflags_opt_02_clib@ +fcflags_opt_10_defs = @fcflags_opt_10_defs@ +fcflags_opt_11_memory_mpi = @fcflags_opt_11_memory_mpi@ +fcflags_opt_12_hide_mpi = @fcflags_opt_12_hide_mpi@ +fcflags_opt_14_hidewrite = @fcflags_opt_14_hidewrite@ +fcflags_opt_16_hideleave = @fcflags_opt_16_hideleave@ +fcflags_opt_16_kokkos_toolbox = @fcflags_opt_16_kokkos_toolbox@ +fcflags_opt_17_gpu_toolbox = @fcflags_opt_17_gpu_toolbox@ +fcflags_opt_17_libtetra_ext = @fcflags_opt_17_libtetra_ext@ +fcflags_opt_17_minimax = @fcflags_opt_17_minimax@ +fcflags_opt_17_yaml_out = @fcflags_opt_17_yaml_out@ +fcflags_opt_18_timing = @fcflags_opt_18_timing@ +fcflags_opt_21_hashfuncs = @fcflags_opt_21_hashfuncs@ +fcflags_opt_27_toolbox_oop = @fcflags_opt_27_toolbox_oop@ +fcflags_opt_28_numeric_noabirule = @fcflags_opt_28_numeric_noabirule@ +fcflags_opt_29_kpoints = @fcflags_opt_29_kpoints@ +fcflags_opt_32_util = @fcflags_opt_32_util@ +fcflags_opt_33_xc_lowlevel = @fcflags_opt_33_xc_lowlevel@ +fcflags_opt_39_libpaw = @fcflags_opt_39_libpaw@ +fcflags_opt_41_geometry = @fcflags_opt_41_geometry@ +fcflags_opt_42_nlstrain = @fcflags_opt_42_nlstrain@ +fcflags_opt_42_parser = @fcflags_opt_42_parser@ +fcflags_opt_43_ptgroups = @fcflags_opt_43_ptgroups@ +fcflags_opt_43_wvl_wrappers = @fcflags_opt_43_wvl_wrappers@ +fcflags_opt_44_abitools = @fcflags_opt_44_abitools@ +fcflags_opt_44_abitypes_defs = @fcflags_opt_44_abitypes_defs@ +fcflags_opt_44_manage_kokkos = @fcflags_opt_44_manage_kokkos@ +fcflags_opt_45_geomoptim = @fcflags_opt_45_geomoptim@ +fcflags_opt_45_xgTools = @fcflags_opt_45_xgTools@ +fcflags_opt_46_ghc_omp = @fcflags_opt_46_ghc_omp@ +fcflags_opt_46_manage_cuda = @fcflags_opt_46_manage_cuda@ +fcflags_opt_48_diago = @fcflags_opt_48_diago@ +fcflags_opt_49_gw_toolbox_oop = @fcflags_opt_49_gw_toolbox_oop@ +fcflags_opt_51_manage_mpi = @fcflags_opt_51_manage_mpi@ +fcflags_opt_52_fft_mpi_noabirule = @fcflags_opt_52_fft_mpi_noabirule@ +fcflags_opt_53_ffts = @fcflags_opt_53_ffts@ +fcflags_opt_54_spacepar = @fcflags_opt_54_spacepar@ +fcflags_opt_55_abiutil = @fcflags_opt_55_abiutil@ +fcflags_opt_56_io_mpi = @fcflags_opt_56_io_mpi@ +fcflags_opt_56_mixing = @fcflags_opt_56_mixing@ +fcflags_opt_56_recipspace = @fcflags_opt_56_recipspace@ +fcflags_opt_56_xc = @fcflags_opt_56_xc@ +fcflags_opt_57_iopsp_parser = @fcflags_opt_57_iopsp_parser@ +fcflags_opt_57_iovars = @fcflags_opt_57_iovars@ +fcflags_opt_61_occeig = @fcflags_opt_61_occeig@ +fcflags_opt_62_cg_noabirule = @fcflags_opt_62_cg_noabirule@ +fcflags_opt_62_ctqmc = @fcflags_opt_62_ctqmc@ +fcflags_opt_62_iowfdenpot = @fcflags_opt_62_iowfdenpot@ +fcflags_opt_62_poisson = @fcflags_opt_62_poisson@ +fcflags_opt_62_wvl_wfs = @fcflags_opt_62_wvl_wfs@ +fcflags_opt_64_psp = @fcflags_opt_64_psp@ +fcflags_opt_65_lotf_base = @fcflags_opt_65_lotf_base@ +fcflags_opt_65_paw = @fcflags_opt_65_paw@ +fcflags_opt_66_nonlocal = @fcflags_opt_66_nonlocal@ +fcflags_opt_66_vdwxc = @fcflags_opt_66_vdwxc@ +fcflags_opt_66_wfs = @fcflags_opt_66_wfs@ +fcflags_opt_67_common = @fcflags_opt_67_common@ +fcflags_opt_67_python_invocation_ext = @fcflags_opt_67_python_invocation_ext@ +fcflags_opt_67_triqs_ext = @fcflags_opt_67_triqs_ext@ +fcflags_opt_68_dmft = @fcflags_opt_68_dmft@ +fcflags_opt_68_lotf = @fcflags_opt_68_lotf@ +fcflags_opt_68_recursion = @fcflags_opt_68_recursion@ +fcflags_opt_68_rsprc = @fcflags_opt_68_rsprc@ +fcflags_opt_69_wfdesc = @fcflags_opt_69_wfdesc@ +fcflags_opt_70_gw = @fcflags_opt_70_gw@ +fcflags_opt_71_bse = @fcflags_opt_71_bse@ +fcflags_opt_71_wannier = @fcflags_opt_71_wannier@ +fcflags_opt_72_response = @fcflags_opt_72_response@ +fcflags_opt_77_ddb = @fcflags_opt_77_ddb@ +fcflags_opt_77_suscep = @fcflags_opt_77_suscep@ +fcflags_opt_78_effpot = @fcflags_opt_78_effpot@ +fcflags_opt_78_eph = @fcflags_opt_78_eph@ +fcflags_opt_79_seqpar_mpi = @fcflags_opt_79_seqpar_mpi@ +fcflags_opt_80_rttddft = @fcflags_opt_80_rttddft@ +fcflags_opt_80_tdep = @fcflags_opt_80_tdep@ +fcflags_opt_94_scfcv = @fcflags_opt_94_scfcv@ +fcflags_opt_95_drive = @fcflags_opt_95_drive@ +fcflags_opt_98_main = @fcflags_opt_98_main@ +fcflags_opt_bigdft = @fcflags_opt_bigdft@ +fcflags_opt_default = @fcflags_opt_default@ +fcflags_opt_hdf5 = @fcflags_opt_hdf5@ +fcflags_opt_levmar = @fcflags_opt_levmar@ +fcflags_opt_libpsml = @fcflags_opt_libpsml@ +fcflags_opt_libxc = @fcflags_opt_libxc@ +fcflags_opt_libxml2 = @fcflags_opt_libxml2@ +fcflags_opt_linalg = @fcflags_opt_linalg@ +fcflags_opt_netcdf = @fcflags_opt_netcdf@ +fcflags_opt_netcdf_fortran = @fcflags_opt_netcdf_fortran@ +fcflags_opt_papi = @fcflags_opt_papi@ +fcflags_opt_triqs = @fcflags_opt_triqs@ +fcflags_opt_wannier90 = @fcflags_opt_wannier90@ +fcflags_opt_xmlf90 = @fcflags_opt_xmlf90@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sd_abinit_common_cppflags = @sd_abinit_common_cppflags@ +sd_abinit_common_enable = @sd_abinit_common_enable@ +sd_abinit_common_enable_def = @sd_abinit_common_enable_def@ +sd_abinit_common_fcflags = @sd_abinit_common_fcflags@ +sd_abinit_common_init = @sd_abinit_common_init@ +sd_abinit_common_ldflags = @sd_abinit_common_ldflags@ +sd_abinit_common_libs = @sd_abinit_common_libs@ +sd_abinit_common_ok = @sd_abinit_common_ok@ +sd_abinit_common_options = @sd_abinit_common_options@ +sd_abinit_common_policy = @sd_abinit_common_policy@ +sd_abinit_common_status = @sd_abinit_common_status@ +sd_bigdft_cppflags = @sd_bigdft_cppflags@ +sd_bigdft_enable = @sd_bigdft_enable@ +sd_bigdft_enable_def = @sd_bigdft_enable_def@ +sd_bigdft_fcflags = @sd_bigdft_fcflags@ +sd_bigdft_init = @sd_bigdft_init@ +sd_bigdft_ldflags = @sd_bigdft_ldflags@ +sd_bigdft_libs = @sd_bigdft_libs@ +sd_bigdft_ok = @sd_bigdft_ok@ +sd_bigdft_options = @sd_bigdft_options@ +sd_bigdft_policy = @sd_bigdft_policy@ +sd_bigdft_status = @sd_bigdft_status@ +sd_fft_cflags = @sd_fft_cflags@ +sd_fft_choices = @sd_fft_choices@ +sd_fft_cppflags = @sd_fft_cppflags@ +sd_fft_cxxflags = @sd_fft_cxxflags@ +sd_fft_enable = @sd_fft_enable@ +sd_fft_fcflags = @sd_fft_fcflags@ +sd_fft_flavor = @sd_fft_flavor@ +sd_fft_init = @sd_fft_init@ +sd_fft_ldflags = @sd_fft_ldflags@ +sd_fft_libs = @sd_fft_libs@ +sd_fft_ok = @sd_fft_ok@ +sd_fftw3_cflags = @sd_fftw3_cflags@ +sd_fftw3_cppflags = @sd_fftw3_cppflags@ +sd_fftw3_enable = @sd_fftw3_enable@ +sd_fftw3_enable_def = @sd_fftw3_enable_def@ +sd_fftw3_fcflags = @sd_fftw3_fcflags@ +sd_fftw3_init = @sd_fftw3_init@ +sd_fftw3_ldflags = @sd_fftw3_ldflags@ +sd_fftw3_libs = @sd_fftw3_libs@ +sd_fftw3_ok = @sd_fftw3_ok@ +sd_fftw3_options = @sd_fftw3_options@ +sd_fftw3_policy = @sd_fftw3_policy@ +sd_fftw3_status = @sd_fftw3_status@ +sd_gpu_cflags = @sd_gpu_cflags@ +sd_gpu_cppflags = @sd_gpu_cppflags@ +sd_gpu_cxxflags = @sd_gpu_cxxflags@ +sd_gpu_enable = @sd_gpu_enable@ +sd_gpu_enable_def = @sd_gpu_enable_def@ +sd_gpu_fcflags = @sd_gpu_fcflags@ +sd_gpu_init = @sd_gpu_init@ +sd_gpu_ldflags = @sd_gpu_ldflags@ +sd_gpu_libs = @sd_gpu_libs@ +sd_gpu_ok = @sd_gpu_ok@ +sd_gpu_options = @sd_gpu_options@ +sd_gpu_policy = @sd_gpu_policy@ +sd_gpu_prefix = @sd_gpu_prefix@ +sd_gpu_status = @sd_gpu_status@ +sd_hdf5_cflags = @sd_hdf5_cflags@ +sd_hdf5_cppflags = @sd_hdf5_cppflags@ +sd_hdf5_cxxflags = @sd_hdf5_cxxflags@ +sd_hdf5_enable = @sd_hdf5_enable@ +sd_hdf5_enable_def = @sd_hdf5_enable_def@ +sd_hdf5_enable_fc = @sd_hdf5_enable_fc@ +sd_hdf5_fcflags = @sd_hdf5_fcflags@ +sd_hdf5_h5cc = @sd_hdf5_h5cc@ +sd_hdf5_h5fc = @sd_hdf5_h5fc@ +sd_hdf5_init = @sd_hdf5_init@ +sd_hdf5_ldflags = @sd_hdf5_ldflags@ +sd_hdf5_libs = @sd_hdf5_libs@ +sd_hdf5_ok = @sd_hdf5_ok@ +sd_hdf5_options = @sd_hdf5_options@ +sd_hdf5_policy = @sd_hdf5_policy@ +sd_hdf5_status = @sd_hdf5_status@ +sd_kokkos_cppflags = @sd_kokkos_cppflags@ +sd_kokkos_cxxflags = @sd_kokkos_cxxflags@ +sd_kokkos_enable = @sd_kokkos_enable@ +sd_kokkos_enable_def = @sd_kokkos_enable_def@ +sd_kokkos_init = @sd_kokkos_init@ +sd_kokkos_ldflags = @sd_kokkos_ldflags@ +sd_kokkos_libs = @sd_kokkos_libs@ +sd_kokkos_ok = @sd_kokkos_ok@ +sd_kokkos_options = @sd_kokkos_options@ +sd_kokkos_policy = @sd_kokkos_policy@ +sd_kokkos_status = @sd_kokkos_status@ +sd_levmar_cflags = @sd_levmar_cflags@ +sd_levmar_cppflags = @sd_levmar_cppflags@ +sd_levmar_enable = @sd_levmar_enable@ +sd_levmar_enable_def = @sd_levmar_enable_def@ +sd_levmar_init = @sd_levmar_init@ +sd_levmar_ldflags = @sd_levmar_ldflags@ +sd_levmar_libs = @sd_levmar_libs@ +sd_levmar_ok = @sd_levmar_ok@ +sd_levmar_options = @sd_levmar_options@ +sd_levmar_policy = @sd_levmar_policy@ +sd_levmar_status = @sd_levmar_status@ +sd_libpaw_cppflags = @sd_libpaw_cppflags@ +sd_libpaw_enable = @sd_libpaw_enable@ +sd_libpaw_enable_def = @sd_libpaw_enable_def@ +sd_libpaw_fcflags = @sd_libpaw_fcflags@ +sd_libpaw_init = @sd_libpaw_init@ +sd_libpaw_ldflags = @sd_libpaw_ldflags@ +sd_libpaw_libs = @sd_libpaw_libs@ +sd_libpaw_ok = @sd_libpaw_ok@ +sd_libpaw_options = @sd_libpaw_options@ +sd_libpaw_policy = @sd_libpaw_policy@ +sd_libpaw_status = @sd_libpaw_status@ +sd_libpsml_cppflags = @sd_libpsml_cppflags@ +sd_libpsml_enable = @sd_libpsml_enable@ +sd_libpsml_enable_def = @sd_libpsml_enable_def@ +sd_libpsml_fcflags = @sd_libpsml_fcflags@ +sd_libpsml_init = @sd_libpsml_init@ +sd_libpsml_ldflags = @sd_libpsml_ldflags@ +sd_libpsml_libs = @sd_libpsml_libs@ +sd_libpsml_ok = @sd_libpsml_ok@ +sd_libpsml_options = @sd_libpsml_options@ +sd_libpsml_policy = @sd_libpsml_policy@ +sd_libpsml_status = @sd_libpsml_status@ +sd_libxc_cflags = @sd_libxc_cflags@ +sd_libxc_cppflags = @sd_libxc_cppflags@ +sd_libxc_enable = @sd_libxc_enable@ +sd_libxc_enable_def = @sd_libxc_enable_def@ +sd_libxc_enable_fc = @sd_libxc_enable_fc@ +sd_libxc_fcflags = @sd_libxc_fcflags@ +sd_libxc_init = @sd_libxc_init@ +sd_libxc_ldflags = @sd_libxc_ldflags@ +sd_libxc_libs = @sd_libxc_libs@ +sd_libxc_ok = @sd_libxc_ok@ +sd_libxc_options = @sd_libxc_options@ +sd_libxc_policy = @sd_libxc_policy@ +sd_libxc_status = @sd_libxc_status@ +sd_linalg_cflags = @sd_linalg_cflags@ +sd_linalg_choices = @sd_linalg_choices@ +sd_linalg_cppflags = @sd_linalg_cppflags@ +sd_linalg_cxxflags = @sd_linalg_cxxflags@ +sd_linalg_enable = @sd_linalg_enable@ +sd_linalg_fcflags = @sd_linalg_fcflags@ +sd_linalg_flavor = @sd_linalg_flavor@ +sd_linalg_has_elpa = @sd_linalg_has_elpa@ +sd_linalg_has_scalapack = @sd_linalg_has_scalapack@ +sd_linalg_init = @sd_linalg_init@ +sd_linalg_ldflags = @sd_linalg_ldflags@ +sd_linalg_libs = @sd_linalg_libs@ +sd_linalg_ok = @sd_linalg_ok@ +sd_mpi_cc = @sd_mpi_cc@ +sd_mpi_cflags = @sd_mpi_cflags@ +sd_mpi_cppflags = @sd_mpi_cppflags@ +sd_mpi_cxx = @sd_mpi_cxx@ +sd_mpi_enable = @sd_mpi_enable@ +sd_mpi_enable_cxx = @sd_mpi_enable_cxx@ +sd_mpi_enable_def = @sd_mpi_enable_def@ +sd_mpi_enable_fc = @sd_mpi_enable_fc@ +sd_mpi_fc = @sd_mpi_fc@ +sd_mpi_fcflags = @sd_mpi_fcflags@ +sd_mpi_init = @sd_mpi_init@ +sd_mpi_ldflags = @sd_mpi_ldflags@ +sd_mpi_libs = @sd_mpi_libs@ +sd_mpi_ok = @sd_mpi_ok@ +sd_mpi_options = @sd_mpi_options@ +sd_mpi_policy = @sd_mpi_policy@ +sd_mpi_status = @sd_mpi_status@ +sd_netcdf_cflags = @sd_netcdf_cflags@ +sd_netcdf_cppflags = @sd_netcdf_cppflags@ +sd_netcdf_enable = @sd_netcdf_enable@ +sd_netcdf_enable_def = @sd_netcdf_enable_def@ +sd_netcdf_fcflags = @sd_netcdf_fcflags@ +sd_netcdf_fortran_cflags = @sd_netcdf_fortran_cflags@ +sd_netcdf_fortran_cppflags = @sd_netcdf_fortran_cppflags@ +sd_netcdf_fortran_enable = @sd_netcdf_fortran_enable@ +sd_netcdf_fortran_enable_def = @sd_netcdf_fortran_enable_def@ +sd_netcdf_fortran_fcflags = @sd_netcdf_fortran_fcflags@ +sd_netcdf_fortran_init = @sd_netcdf_fortran_init@ +sd_netcdf_fortran_ldflags = @sd_netcdf_fortran_ldflags@ +sd_netcdf_fortran_libs = @sd_netcdf_fortran_libs@ +sd_netcdf_fortran_ok = @sd_netcdf_fortran_ok@ +sd_netcdf_fortran_options = @sd_netcdf_fortran_options@ +sd_netcdf_fortran_policy = @sd_netcdf_fortran_policy@ +sd_netcdf_fortran_status = @sd_netcdf_fortran_status@ +sd_netcdf_init = @sd_netcdf_init@ +sd_netcdf_ldflags = @sd_netcdf_ldflags@ +sd_netcdf_libs = @sd_netcdf_libs@ +sd_netcdf_ok = @sd_netcdf_ok@ +sd_netcdf_options = @sd_netcdf_options@ +sd_netcdf_policy = @sd_netcdf_policy@ +sd_netcdf_status = @sd_netcdf_status@ +sd_papi_cflags = @sd_papi_cflags@ +sd_papi_cppflags = @sd_papi_cppflags@ +sd_papi_enable = @sd_papi_enable@ +sd_papi_enable_def = @sd_papi_enable_def@ +sd_papi_init = @sd_papi_init@ +sd_papi_ldflags = @sd_papi_ldflags@ +sd_papi_libs = @sd_papi_libs@ +sd_papi_ok = @sd_papi_ok@ +sd_papi_options = @sd_papi_options@ +sd_papi_policy = @sd_papi_policy@ +sd_papi_sd_papi_fcflags = @sd_papi_sd_papi_fcflags@ +sd_papi_status = @sd_papi_status@ +sd_pfft_cflags = @sd_pfft_cflags@ +sd_pfft_cppflags = @sd_pfft_cppflags@ +sd_pfft_enable = @sd_pfft_enable@ +sd_pfft_enable_def = @sd_pfft_enable_def@ +sd_pfft_init = @sd_pfft_init@ +sd_pfft_ldflags = @sd_pfft_ldflags@ +sd_pfft_libs = @sd_pfft_libs@ +sd_pfft_ok = @sd_pfft_ok@ +sd_pfft_options = @sd_pfft_options@ +sd_pfft_policy = @sd_pfft_policy@ +sd_pfft_status = @sd_pfft_status@ +sd_sys_fcflags = @sd_sys_fcflags@ +sd_triqs_cflags = @sd_triqs_cflags@ +sd_triqs_cppflags = @sd_triqs_cppflags@ +sd_triqs_cxxflags = @sd_triqs_cxxflags@ +sd_triqs_enable = @sd_triqs_enable@ +sd_triqs_enable_def = @sd_triqs_enable_def@ +sd_triqs_fcflags = @sd_triqs_fcflags@ +sd_triqs_init = @sd_triqs_init@ +sd_triqs_ldflags = @sd_triqs_ldflags@ +sd_triqs_libs = @sd_triqs_libs@ +sd_triqs_ok = @sd_triqs_ok@ +sd_triqs_options = @sd_triqs_options@ +sd_triqs_policy = @sd_triqs_policy@ +sd_triqs_status = @sd_triqs_status@ +sd_wannier90_cppflags = @sd_wannier90_cppflags@ +sd_wannier90_enable = @sd_wannier90_enable@ +sd_wannier90_enable_def = @sd_wannier90_enable_def@ +sd_wannier90_fcflags = @sd_wannier90_fcflags@ +sd_wannier90_init = @sd_wannier90_init@ +sd_wannier90_ldflags = @sd_wannier90_ldflags@ +sd_wannier90_libs = @sd_wannier90_libs@ +sd_wannier90_ok = @sd_wannier90_ok@ +sd_wannier90_options = @sd_wannier90_options@ +sd_wannier90_policy = @sd_wannier90_policy@ +sd_wannier90_status = @sd_wannier90_status@ +sd_xmlf90_cppflags = @sd_xmlf90_cppflags@ +sd_xmlf90_enable = @sd_xmlf90_enable@ +sd_xmlf90_enable_def = @sd_xmlf90_enable_def@ +sd_xmlf90_fcflags = @sd_xmlf90_fcflags@ +sd_xmlf90_init = @sd_xmlf90_init@ +sd_xmlf90_ldflags = @sd_xmlf90_ldflags@ +sd_xmlf90_libs = @sd_xmlf90_libs@ +sd_xmlf90_ok = @sd_xmlf90_ok@ +sd_xmlf90_options = @sd_xmlf90_options@ +sd_xmlf90_policy = @sd_xmlf90_policy@ +sd_xmlf90_status = @sd_xmlf90_status@ +sd_yakl_cppflags = @sd_yakl_cppflags@ +sd_yakl_enable = @sd_yakl_enable@ +sd_yakl_enable_def = @sd_yakl_enable_def@ +sd_yakl_fcflags = @sd_yakl_fcflags@ +sd_yakl_init = @sd_yakl_init@ +sd_yakl_ldflags = @sd_yakl_ldflags@ +sd_yakl_libs = @sd_yakl_libs@ +sd_yakl_ok = @sd_yakl_ok@ +sd_yakl_options = @sd_yakl_options@ +sd_yakl_policy = @sd_yakl_policy@ +sd_yakl_status = @sd_yakl_status@ +sharedstatedir = @sharedstatedir@ +src_02_clib_fcflags = @src_02_clib_fcflags@ +src_10_defs_fcflags = @src_10_defs_fcflags@ +src_11_memory_mpi_fcflags = @src_11_memory_mpi_fcflags@ +src_12_hide_mpi_fcflags = @src_12_hide_mpi_fcflags@ +src_14_hidewrite_fcflags = @src_14_hidewrite_fcflags@ +src_16_hideleave_fcflags = @src_16_hideleave_fcflags@ +src_16_kokkos_toolbox_fcflags = @src_16_kokkos_toolbox_fcflags@ +src_17_gpu_toolbox_fcflags = @src_17_gpu_toolbox_fcflags@ +src_17_libtetra_ext_fcflags = @src_17_libtetra_ext_fcflags@ +src_17_minimax_fcflags = @src_17_minimax_fcflags@ +src_17_yaml_out_fcflags = @src_17_yaml_out_fcflags@ +src_18_timing_fcflags = @src_18_timing_fcflags@ +src_21_hashfuncs_fcflags = @src_21_hashfuncs_fcflags@ +src_27_toolbox_oop_fcflags = @src_27_toolbox_oop_fcflags@ +src_28_numeric_noabirule_fcflags = @src_28_numeric_noabirule_fcflags@ +src_29_kpoints_fcflags = @src_29_kpoints_fcflags@ +src_32_util_fcflags = @src_32_util_fcflags@ +src_33_xc_lowlevel_fcflags = @src_33_xc_lowlevel_fcflags@ +src_39_libpaw_fcflags = @src_39_libpaw_fcflags@ +src_41_geometry_fcflags = @src_41_geometry_fcflags@ +src_42_nlstrain_fcflags = @src_42_nlstrain_fcflags@ +src_42_parser_fcflags = @src_42_parser_fcflags@ +src_43_ptgroups_fcflags = @src_43_ptgroups_fcflags@ +src_43_wvl_wrappers_fcflags = @src_43_wvl_wrappers_fcflags@ +src_44_abitools_fcflags = @src_44_abitools_fcflags@ +src_44_abitypes_defs_fcflags = @src_44_abitypes_defs_fcflags@ +src_44_manage_kokkos_fcflags = @src_44_manage_kokkos_fcflags@ +src_45_geomoptim_fcflags = @src_45_geomoptim_fcflags@ +src_45_xgTools_fcflags = @src_45_xgTools_fcflags@ +src_46_ghc_omp_fcflags = @src_46_ghc_omp_fcflags@ +src_46_manage_cuda_fcflags = @src_46_manage_cuda_fcflags@ +src_48_diago_fcflags = @src_48_diago_fcflags@ +src_49_gw_toolbox_oop_fcflags = @src_49_gw_toolbox_oop_fcflags@ +src_51_manage_mpi_fcflags = @src_51_manage_mpi_fcflags@ +src_52_fft_mpi_noabirule_fcflags = @src_52_fft_mpi_noabirule_fcflags@ +src_53_ffts_fcflags = @src_53_ffts_fcflags@ +src_54_spacepar_fcflags = @src_54_spacepar_fcflags@ +src_55_abiutil_fcflags = @src_55_abiutil_fcflags@ +src_56_io_mpi_fcflags = @src_56_io_mpi_fcflags@ +src_56_mixing_fcflags = @src_56_mixing_fcflags@ +src_56_recipspace_fcflags = @src_56_recipspace_fcflags@ +src_56_xc_fcflags = @src_56_xc_fcflags@ +src_57_iopsp_parser_fcflags = @src_57_iopsp_parser_fcflags@ +src_57_iovars_fcflags = @src_57_iovars_fcflags@ +src_61_occeig_fcflags = @src_61_occeig_fcflags@ +src_62_cg_noabirule_fcflags = @src_62_cg_noabirule_fcflags@ +src_62_ctqmc_fcflags = @src_62_ctqmc_fcflags@ +src_62_iowfdenpot_fcflags = @src_62_iowfdenpot_fcflags@ +src_62_poisson_fcflags = @src_62_poisson_fcflags@ +src_62_wvl_wfs_fcflags = @src_62_wvl_wfs_fcflags@ +src_64_psp_fcflags = @src_64_psp_fcflags@ +src_65_lotf_base_fcflags = @src_65_lotf_base_fcflags@ +src_65_paw_fcflags = @src_65_paw_fcflags@ +src_66_nonlocal_fcflags = @src_66_nonlocal_fcflags@ +src_66_vdwxc_fcflags = @src_66_vdwxc_fcflags@ +src_66_wfs_fcflags = @src_66_wfs_fcflags@ +src_67_common_fcflags = @src_67_common_fcflags@ +src_67_python_invocation_ext_fcflags = @src_67_python_invocation_ext_fcflags@ +src_67_triqs_ext_fcflags = @src_67_triqs_ext_fcflags@ +src_68_dmft_fcflags = @src_68_dmft_fcflags@ +src_68_lotf_fcflags = @src_68_lotf_fcflags@ +src_68_recursion_fcflags = @src_68_recursion_fcflags@ +src_68_rsprc_fcflags = @src_68_rsprc_fcflags@ +src_69_wfdesc_fcflags = @src_69_wfdesc_fcflags@ +src_70_gw_fcflags = @src_70_gw_fcflags@ +src_71_bse_fcflags = @src_71_bse_fcflags@ +src_71_wannier_fcflags = @src_71_wannier_fcflags@ +src_72_response_fcflags = @src_72_response_fcflags@ +src_77_ddb_fcflags = @src_77_ddb_fcflags@ +src_77_suscep_fcflags = @src_77_suscep_fcflags@ +src_78_effpot_fcflags = @src_78_effpot_fcflags@ +src_78_eph_fcflags = @src_78_eph_fcflags@ +src_79_seqpar_mpi_fcflags = @src_79_seqpar_mpi_fcflags@ +src_80_rttddft_fcflags = @src_80_rttddft_fcflags@ +src_80_tdep_fcflags = @src_80_tdep_fcflags@ +src_94_scfcv_fcflags = @src_94_scfcv_fcflags@ +src_95_drive_fcflags = @src_95_drive_fcflags@ +src_common_fcflags = @src_common_fcflags@ +src_core_fcflags = @src_core_fcflags@ +src_libpaw_fcflags = @src_libpaw_fcflags@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +with_abinit_common = @with_abinit_common@ +with_bigdft = @with_bigdft@ +with_config_file = @with_config_file@ +with_debug_flavor = @with_debug_flavor@ +with_fallbacks = @with_fallbacks@ +with_fc_vendor = @with_fc_vendor@ +with_fc_version = @with_fc_version@ +with_fft_flavor = @with_fft_flavor@ +with_fftw3 = @with_fftw3@ +with_gnu_ld = @with_gnu_ld@ +with_gpu = @with_gpu@ +with_hdf5 = @with_hdf5@ +with_kokkos = @with_kokkos@ +with_levmar = @with_levmar@ +with_libpaw = @with_libpaw@ +with_libpsml = @with_libpsml@ +with_libxc = @with_libxc@ +with_libxml2 = @with_libxml2@ +with_linalg_flavor = @with_linalg_flavor@ +with_mpi = @with_mpi@ +with_mpi_level = @with_mpi_level@ +with_netcdf = @with_netcdf@ +with_optim_flavor = @with_optim_flavor@ +with_papi = @with_papi@ +with_pfft = @with_pfft@ +with_triqs = @with_triqs@ +with_wannier90 = @with_wannier90@ +with_xmlf90 = @with_xmlf90@ +with_yakl = @with_yakl@ +AM_CFLAGS = @ABI_CPPFLAGS@ +AM_CXXFLAGS = $(sd_triqs_cxxflags) +AM_FCFLAGS = @FPPFLAGS@ @FCFLAGS_FREEFORM@ @FCFLAGS_MODDIR@ @sd_sys_fcflags@ @fcflags_opt_21_hashfuncs@ +AM_CPPFLAGS = \ + @src_14_hidewrite_fcflags@ \ + @src_common_fcflags@ \ + @src_core_fcflags@ \ + @src_libpaw_fcflags@ \ + @fc_mod_fcflags@ + + +# Regular source files +lib21_hashfuncs_srcs = \ + m_hash_md5.F90 + + +# Source files depending on conditionals + +# Library description +noinst_LIBRARIES = lib21_hashfuncs.a +lib21_hashfuncs_a_SOURCES = $(lib21_hashfuncs_srcs) + +# Dependencies (inside the directory) of directory 21_hashfuncs +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. +CLEANFILES = m_hash_md5_cpp.f90 m_hash_md5.$(MODEXT) \ + test_md5_sum_from_file.log test_md5_sum_from_file.tmp \ + test_md5_sum_from_string.log test_md5_sum_from_string.tmp +EXTRA_DIST = abinit.src abinit.dep _21_hashfuncs_ +test_md5_sum_from_file_SOURCES = test_md5_sum_from_file.F90 +test_md5_sum_from_file_CPPFLAGS = @sd_netcdf_cppflags@ @sd_linalg_cppflags@ -I$(top_srcdir)/shared/common/src/incs -I$(top_srcdir)/src/incs -I$(top_builddir)/shared/common/src/mods -I$(top_builddir)/src/mods +test_md5_sum_from_file_LDADD = \ + lib21_hashfuncs.a \ + ../02_clib/lib02_clib.a \ + ../16_hideleave/lib16_hideleave.a \ + ../14_hidewrite/lib14_hidewrite.a \ + ../12_hide_mpi/lib12_hide_mpi.a \ + ../11_memory_mpi/lib11_memory_mpi.a \ + ../10_defs/lib10_defs.a \ + ../02_clib/lib02_clib.a \ + @sd_netcdf_libs@ \ + @sd_linalg_libs@ + +test_md5_sum_from_string_SOURCES = test_md5_sum_from_string.F90 +test_md5_sum_from_string_CPPFLAGS = @sd_netcdf_cppflags@ @sd_linalg_cppflags@ -I$(top_srcdir)/shared/common/src/incs -I$(top_srcdir)/src/incs -I$(top_builddir)/shared/common/src/mods -I$(top_builddir)/src/mods +test_md5_sum_from_string_LDADD = \ + lib21_hashfuncs.a \ + ../02_clib/lib02_clib.a \ + ../16_hideleave/lib16_hideleave.a \ + ../14_hidewrite/lib14_hidewrite.a \ + ../12_hide_mpi/lib12_hide_mpi.a \ + ../11_memory_mpi/lib11_memory_mpi.a \ + ../10_defs/lib10_defs.a \ + ../02_clib/lib02_clib.a \ + @sd_netcdf_libs@ \ + @sd_linalg_libs@ + +all: all-am + +.SUFFIXES: +.SUFFIXES: .F90 .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu shared/common/src/21_hashfuncs/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu shared/common/src/21_hashfuncs/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-checkPROGRAMS: + -test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS) + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) + +lib21_hashfuncs.a: $(lib21_hashfuncs_a_OBJECTS) $(lib21_hashfuncs_a_DEPENDENCIES) $(EXTRA_lib21_hashfuncs_a_DEPENDENCIES) + $(AM_V_at)-rm -f lib21_hashfuncs.a + $(AM_V_AR)$(lib21_hashfuncs_a_AR) lib21_hashfuncs.a $(lib21_hashfuncs_a_OBJECTS) $(lib21_hashfuncs_a_LIBADD) + $(AM_V_at)$(RANLIB) lib21_hashfuncs.a + +test_md5_sum_from_file$(EXEEXT): $(test_md5_sum_from_file_OBJECTS) $(test_md5_sum_from_file_DEPENDENCIES) $(EXTRA_test_md5_sum_from_file_DEPENDENCIES) + @rm -f test_md5_sum_from_file$(EXEEXT) + $(AM_V_FCLD)$(FCLINK) $(test_md5_sum_from_file_OBJECTS) $(test_md5_sum_from_file_LDADD) $(LIBS) + +test_md5_sum_from_string$(EXEEXT): $(test_md5_sum_from_string_OBJECTS) $(test_md5_sum_from_string_DEPENDENCIES) $(EXTRA_test_md5_sum_from_string_DEPENDENCIES) + @rm -f test_md5_sum_from_string$(EXEEXT) + $(AM_V_FCLD)$(FCLINK) $(test_md5_sum_from_string_OBJECTS) $(test_md5_sum_from_string_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +.F90.o: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ $< + +.F90.obj: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +test_md5_sum_from_file-test_md5_sum_from_file.o: test_md5_sum_from_file.F90 + $(AM_V_PPFC)$(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_md5_sum_from_file_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o test_md5_sum_from_file-test_md5_sum_from_file.o `test -f 'test_md5_sum_from_file.F90' || echo '$(srcdir)/'`test_md5_sum_from_file.F90 + +test_md5_sum_from_file-test_md5_sum_from_file.obj: test_md5_sum_from_file.F90 + $(AM_V_PPFC)$(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_md5_sum_from_file_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o test_md5_sum_from_file-test_md5_sum_from_file.obj `if test -f 'test_md5_sum_from_file.F90'; then $(CYGPATH_W) 'test_md5_sum_from_file.F90'; else $(CYGPATH_W) '$(srcdir)/test_md5_sum_from_file.F90'; fi` + +test_md5_sum_from_string-test_md5_sum_from_string.o: test_md5_sum_from_string.F90 + $(AM_V_PPFC)$(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_md5_sum_from_string_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o test_md5_sum_from_string-test_md5_sum_from_string.o `test -f 'test_md5_sum_from_string.F90' || echo '$(srcdir)/'`test_md5_sum_from_string.F90 + +test_md5_sum_from_string-test_md5_sum_from_string.obj: test_md5_sum_from_string.F90 + $(AM_V_PPFC)$(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_md5_sum_from_string_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o test_md5_sum_from_string-test_md5_sum_from_string.obj `if test -f 'test_md5_sum_from_string.F90'; then $(CYGPATH_W) 'test_md5_sum_from_string.F90'; else $(CYGPATH_W) '$(srcdir)/test_md5_sum_from_string.F90'; fi` + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-local +check: check-am +all-am: Makefile $(LIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-noinstLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am check-local clean \ + clean-checkPROGRAMS clean-generic clean-noinstLIBRARIES \ + cscopelist-am ctags ctags-am distclean distclean-compile \ + distclean-generic distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am + +.PRECIOUS: Makefile + + +check-local: + ./test_md5_sum_from_file >test_md5_sum_from_file.log 2>&1; grep '^TEST FAILED' test_md5_sum_from_file.log && echo 'Unit test test_md5_sum_from_file FAILED' || echo 'Unit test test_md5_sum_from_file OK' + ./test_md5_sum_from_string >test_md5_sum_from_string.log 2>&1; grep '^TEST FAILED' test_md5_sum_from_string.log && echo 'Unit test test_md5_sum_from_string FAILED' || echo 'Unit test test_md5_sum_from_string OK' + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/GX-PAW/common/src/21_hashfuncs/_21_hashfuncs_ b/GX-PAW/common/src/21_hashfuncs/_21_hashfuncs_ new file mode 100644 index 00000000..892d702e --- /dev/null +++ b/GX-PAW/common/src/21_hashfuncs/_21_hashfuncs_ @@ -0,0 +1,22 @@ +!!****d* ABINIT/21_hashfuncs +!! NAME +!! 21_hashfuncs +!! +!! DESCRIPTION +!! Hash functions to calculate checksums +!! +!! COPYRIGHT +!! Copyright (C) 2016-2024 ABINIT Group (Yann Pouillon) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! For the initials of contributors, see +!! ~abinit/doc/developers/contributors.txt . +!! +!! CHILDREN +!! interfaces_21_hashfuncs.F90 +!! m_hash_md5.F90 +!! test_md5_sum_from_file.F90 +!! test_md5_sum_from_string.F90 +!! +!!*** diff --git a/GX-PAW/common/src/21_hashfuncs/__pycache__/abinit.cpython-36.pyc b/GX-PAW/common/src/21_hashfuncs/__pycache__/abinit.cpython-36.pyc new file mode 100644 index 00000000..06ec4c34 Binary files /dev/null and b/GX-PAW/common/src/21_hashfuncs/__pycache__/abinit.cpython-36.pyc differ diff --git a/GX-PAW/common/src/21_hashfuncs/abinit.dep b/GX-PAW/common/src/21_hashfuncs/abinit.dep new file mode 100644 index 00000000..7ddaa3a9 --- /dev/null +++ b/GX-PAW/common/src/21_hashfuncs/abinit.dep @@ -0,0 +1,9 @@ +# Dependencies (inside the directory) of directory 21_hashfuncs +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. + +CLEANFILES += \ + m_hash_md5.$(MODEXT) + diff --git a/GX-PAW/common/src/21_hashfuncs/abinit.dir b/GX-PAW/common/src/21_hashfuncs/abinit.dir new file mode 100644 index 00000000..ee415909 --- /dev/null +++ b/GX-PAW/common/src/21_hashfuncs/abinit.dir @@ -0,0 +1,8 @@ +# Dependencies (outside the directory) of directory 21_hashfuncs +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. + +include_dirs = \ +['14_hidewrite'] \ No newline at end of file diff --git a/GX-PAW/common/src/21_hashfuncs/abinit.src b/GX-PAW/common/src/21_hashfuncs/abinit.src new file mode 100644 index 00000000..934cb582 --- /dev/null +++ b/GX-PAW/common/src/21_hashfuncs/abinit.src @@ -0,0 +1,29 @@ +# -*- Python -*- +# +# Copyright (C) 2016-2024 ABINIT Group (Yann Pouillon) +# +# This file is part of the ABINIT software package. For license information, +# please see the COPYING file in the top-level directory of the ABINIT source +# distribution. +# + +# +# Source files making up the 21_checksums library +# + +# Source file attributes +ABI_SRC_NIL = 0 # No attribute +ABI_SRC_BLT = 1 # The file is built by a script +ABI_SRC_DEP = 2 # The file depends on other files + +# Source files +sources = [ + "m_hash_md5.F90" +] +# IMPORTANT : please use the alphabetic order in the previous list. Do NOT add the new routine names at the end of the list. +# This is important to avoid numerous conflicts at merge time. Thank you very much. Xavier. + +checkers = { + "test_md5_sum_from_file":["02_clib"], + "test_md5_sum_from_string":["02_clib"] +} diff --git a/GX-PAW/common/src/21_hashfuncs/lib21_hashfuncs.a b/GX-PAW/common/src/21_hashfuncs/lib21_hashfuncs.a new file mode 100644 index 00000000..a99617fd Binary files /dev/null and b/GX-PAW/common/src/21_hashfuncs/lib21_hashfuncs.a differ diff --git a/GX-PAW/common/src/21_hashfuncs/m_hash_md5.F90 b/GX-PAW/common/src/21_hashfuncs/m_hash_md5.F90 new file mode 100644 index 00000000..5390d883 --- /dev/null +++ b/GX-PAW/common/src/21_hashfuncs/m_hash_md5.F90 @@ -0,0 +1,370 @@ +!!****m* ABINIT/m_hash_md5 +!! NAME +!! m_hash_md5 +!! +!! FUNCTION +!! This module provides resources to calculate MD5 checksums. +!! +!! COPYRIGHT +!! Copyright (C) 2016-2024 ABINIT group (Yann Pouillon) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" + +module m_hash_md5 + + use, intrinsic :: iso_c_binding + use m_abicore + + implicit none + + private + + public :: md5_check ! Checks whether two MD5 sums are identical + public :: md5_sum_from_file ! Computes a MD5 sum from a file + public :: md5_sum_from_string ! Computes a MD5 sum from a text string + + type :: md5_context_t + private + type(c_ptr) :: ptr = C_NULL_PTR + end type md5_context_t + + interface + function MD5_Context_New() bind(c, name="MD5_Context_New") + import + type(c_ptr) :: MD5_Context_New + end function MD5_Context_New + end interface + interface + subroutine MD5_Digest_File(fname, retval) bind(c, name="MD5_Digest_File") + import + character(kind=c_char) :: fname(*) + character(kind=c_char) :: retval(33) + end subroutine MD5_Digest_File + end interface + interface + subroutine MD5_Final(retval, ctx) bind(c, name="MD5_Final") + import + character(kind=c_char) :: retval(33) + type(c_ptr), value :: ctx + end subroutine MD5_Final + end interface + interface + subroutine MD5_Init(ctx) bind(c, name="MD5_Init") + import + type(c_ptr), value :: ctx + end subroutine MD5_Init + end interface + interface + subroutine MD5_Update(ctx, buffer, bufsize) bind(c, name="MD5_Update") + import + type(c_ptr), value :: ctx + character(kind=c_char) :: buffer(*) + integer(c_int), value :: bufsize + end subroutine MD5_Update + end interface + +contains !=========================================================== +!!*** + +!!****f* m_hash_md5/md5_check +!! NAME +!! md5_check +!! +!! FUNCTION +!! Checks whether two MD5 sums are identical. +!! +!! INPUTS +!! sum1 = the first sum to compare +!! sum2 = the second sum to compare +!! +!! OUTPUT +!! boolean telling whether the two sums are identical +!! +!! NOTES +!! Created a function to be able to add more operations than just checking +!! the equality of the sums. +!! +!! SOURCE + +function md5_check(sum1,sum2) + +!Arguments ------------------------------------ + character(len=32),intent(in) :: sum1 + character(len=32),intent(in) :: sum2 + +!Local variables------------------------------- + logical :: md5_check + +! ********************************************************************* + + md5_check = ( sum1 == sum2 ) + +end function md5_check +!!*** + +! --------------------------------------------------------------------- + +!!****f* m_hash_md5/md5_sum_from_file +!! NAME +!! md5_sum_from_file +!! +!! FUNCTION +!! Computes a MD5 sum from a file. +!! +!! INPUTS +!! fname = path to the file +!! +!! OUTPUT +!! String representing the MD5 sum of the file +!! +!! SOURCE + +function md5_sum_from_file(fname) + +!Arguments ------------------------------------ + character(len=*),intent(in) :: fname + +!Local variables------------------------------- + character(len=32) :: md5_sum_from_file + character(kind=c_char) :: retval(33) + character(kind=c_char), allocatable :: path(:) + integer :: strlen + +! ********************************************************************* + + ! Translate file name to C + strlen = len_trim(fname) + ABI_MALLOC(path,(strlen+1)) + call f_to_c_string(fname, path) + + ! Get MD5 sum from C + call MD5_Digest_file(path, retval) + call c_to_f_string(retval, md5_sum_from_file) + + ! Clean up the mess + ABI_FREE(path) + +end function md5_sum_from_file +!!*** + +! --------------------------------------------------------------------- + +!!****f* m_hash_md5/md5_sum_from_string +!! NAME +!! md5_sum_from_string +!! +!! FUNCTION +!! Computes a MD5 sum from a string. +!! +!! INPUTS +!! text = string to process +!! +!! OUTPUT +!! String representing the MD5 sum of the argument +!! +!! SOURCE + +function md5_sum_from_string(text) + +!Arguments ------------------------------------ + character(len=*), intent(in) :: text + +!Local variables------------------------------- + character(len=32) :: md5_sum_from_string + type(md5_context_t) :: ctx + +! ********************************************************************* + + call hash_init(ctx) + call hash_update(ctx, text, len_trim(text)) + call hash_final(md5_sum_from_string, ctx) + +end function md5_sum_from_string +!!*** + +! ========================= Private functions ========================= + +!!****f* m_hash_md5/hash_final +!! NAME +!! hash_final +!! +!! FUNCTION +!! Builds the final return value of the MD5 checksum. +!! +!! INPUTS +!! ctx = MD5 context object +!! +!! OUTPUT +!! retval = string containing the MD5 checksum +!! +!! SOURCE + +subroutine hash_final(retval, ctx) + +!Arguments ------------------------------------ + character(len=32), intent(out) :: retval + type(md5_context_t), intent(inout) :: ctx + +!Local variables------------------------------- + character(kind=c_char) :: c_retval(33) + +! ********************************************************************* + + call MD5_Final(c_retval, ctx%ptr) + call c_to_f_string(c_retval, retval) + +end subroutine hash_final +!!*** + +! --------------------------------------------------------------------- + +!!****f* m_hash_md5/hash_init +!! NAME +!! hash_init +!! +!! FUNCTION +!! Checks whether two MD5 sums are identical. +!! +!! INPUTS +!! ctx = MD5 context object +!! +!! SIDE EFFECTS +!! ctx is reset to its intial values +!! +!! NOTES +!! Created a function to be able to add more operations than just checking +!! the equality of the sums. +!! +!! SOURCE + +subroutine hash_init(ctx) + +!Arguments ------------------------------------ + type(md5_context_t), intent(inout) :: ctx + +! ********************************************************************* + + ctx%ptr = MD5_Context_New() + call MD5_Init(ctx%ptr) + +end subroutine hash_init +!!*** + +! --------------------------------------------------------------------- + +!!****f* m_hash_md5/hash_update +!! NAME +!! hash_update +!! +!! FUNCTION +!! Updates a MD5 context object. +!! +!! INPUTS +!! ctx = MD5 context object +!! buffer = data to process +!! bufsize = number of bytes to process +!! +!! SIDE EFFECTS +!! ctx gets updated with the new data +!! +!! SOURCE + +subroutine hash_update(ctx, buffer, bufsize) + +!Arguments ------------------------------------ + type(md5_context_t), intent(inout) :: ctx + character(len=*), intent(in) :: buffer + integer, intent(in) :: bufsize + +!Local variables------------------------------- + character(kind=c_char), allocatable :: c_buffer(:) + integer :: strlen + +! ********************************************************************* + + ! Translate buffer into C + strlen = len_trim(buffer) +! allocate(c_buffer(strlen+1)) + ABI_MALLOC(c_buffer,(strlen+1)) + call f_to_c_string(trim(buffer), c_buffer) + + ! Update C MD5 context + call MD5_Update(ctx%ptr, c_buffer, bufsize) + + ! Clean up the mess +! deallocate(c_buffer) + ABI_FREE(c_buffer) + +end subroutine hash_update +!!*** + + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + + ! Helper functions to convert between C and Fortran strings + ! Based on the routines by Joseph M. Krahn + + subroutine c_to_f_string(c_string, f_string) + + character(kind=c_char,len=1), intent(in) :: c_string(*) + character(len=*), intent(out) :: f_string + + integer :: i + + i = 1 + do while(c_string(i) /= C_NULL_CHAR .and. i <= len(f_string)) + f_string(i:i) = c_string(i) + i = i + 1 + end do + if (i < len(f_string)) f_string(i:) = ' ' + + end subroutine c_to_f_string + + subroutine c_to_f_string_ptr(c_string, f_string) + + type(c_ptr), intent(in) :: c_string + character(len=*), intent(out) :: f_string + + character(len=1, kind=c_char), pointer :: p_chars(:) + integer :: i + + if (.not. c_associated(c_string)) then + f_string = ' ' + else + call c_f_pointer(c_string, p_chars, [huge(0)]) + i = 1 + do while(p_chars(i) /= C_NULL_CHAR .and. i <= len(f_string)) + f_string(i:i) = p_chars(i) + i = i + 1 + end do + if (i < len(f_string)) f_string(i:) = ' ' + end if + + end subroutine c_to_f_string_ptr + + subroutine f_to_c_string(f_string, c_string) + + character(len=*), intent(in) :: f_string + character(kind=c_char,len=1), intent(out) :: c_string(len_trim(f_string)+1) + + integer :: i, strlen + + strlen = len_trim(f_string) + + forall (i=1:strlen) + c_string(i) = f_string(i:i) + end forall + c_string(strlen+1) = C_NULL_CHAR + + end subroutine f_to_c_string + +end module m_hash_md5 +!!*** diff --git a/GX-PAW/common/src/21_hashfuncs/m_hash_md5.o b/GX-PAW/common/src/21_hashfuncs/m_hash_md5.o new file mode 100644 index 00000000..245afdbd Binary files /dev/null and b/GX-PAW/common/src/21_hashfuncs/m_hash_md5.o differ diff --git a/GX-PAW/common/src/21_hashfuncs/test_md5_sum_from_file.F90 b/GX-PAW/common/src/21_hashfuncs/test_md5_sum_from_file.F90 new file mode 100644 index 00000000..a837923b --- /dev/null +++ b/GX-PAW/common/src/21_hashfuncs/test_md5_sum_from_file.F90 @@ -0,0 +1,104 @@ +!!****p* ABINIT/21_hashfuncs/tests/test_md5_sum_from_file +!! NAME +!! test_md5_sum_from_file +!! +!! FUNCTION +!! Unit test for the test_md5_sum_from_file routine of m_hash_md5. +!! +!! COPYRIGHT +!! Copyright (C) 2016-2024 ABINIT Group (Yann Pouillon) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! For the initials of contributors, see +!! ~abinit/doc/developers/contributors.txt . +!! +!! NOTES +!! This program is run by "make check". +!! +!! INPUTS +!! (main routine) +!! +!! OUTPUT +!! (main routine) +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +program test_md5_sum_from_file + +use defs_basis, only: ch10,fnlen,std_out +use m_hash_md5 +implicit none + +character(len=*), parameter :: abinit_input_string = "ABINIT" +character(len=32), parameter :: abinit_md5_single_line_ref = & +& "1c57f60933157a3b6e13def40286f0c5" +character(len=32), parameter :: abinit_md5_multi_line_ref = & +& "953ac666dcdbf651ee3393d374216499" + +character(len=fnlen), parameter :: tmp_file = "test_md5_sum_from_file.tmp" + +character(len=32) :: chk_value_single, chk_value_multi +logical :: test_ok + +#if defined DEBUG_MODE +write(std_out,'(a,a)') "Unitary test: md5_sum_from_file", ch10 +#endif + +! File of one line + newline character +#if defined DEBUG_MODE +write(std_out,'(1x,a,1x,a)') "Creating single-line ", trim(tmp_file) +write(std_out,'(1x,a," = ",a)') "Reference MD5 sum", abinit_md5_single_line_ref +#endif + +open(unit=1, file=trim(tmp_file), form="formatted", status="replace") +write(1,'(a)') abinit_input_string +close(1) + +chk_value_single = md5_sum_from_file(tmp_file) + +#if defined DEBUG_MODE +write(std_out,'(1x,a," = ",a)') "Computed MD5 sum", chk_value_single +#endif + +! File of three lines + newline characters +#if defined DEBUG_MODE +write(std_out,*) +write(std_out,'(1x,a,1x,a)') "Creating multi-line ", trim(tmp_file) +write(std_out,'(1x,a," = ",a)') "Reference MD5 sum", abinit_md5_multi_line_ref +#endif + +open(unit=1, file=trim(tmp_file), form="formatted", status="replace") +write(1,'(a)') abinit_input_string +write(1,'(a)') abinit_input_string +write(1,'(a)') abinit_input_string +close(1) + +chk_value_multi = md5_sum_from_file(tmp_file) + +#if defined DEBUG_MODE +write(std_out,'(1x,a," = ",a)') "Computed MD5 sum", chk_value_multi +#endif + +! Report test result +test_ok = ( md5_check(abinit_md5_single_line_ref, chk_value_single) .and. & +& md5_check(abinit_md5_multi_line_ref, chk_value_multi) ) +#if defined DEBUG_MODE +write(std_out,*) +if ( test_ok ) then + write(std_out,'(a,a)') "TEST OK", ch10 +else + write(std_out,'(a,a)') "TEST FAILED", ch10 +end if +#else +if ( .not. test_ok ) then + write(std_out,'(a,a)') "TEST FAILED", ch10 +end if +#endif + +end program test_md5_sum_from_file +!!*** diff --git a/GX-PAW/common/src/21_hashfuncs/test_md5_sum_from_string.F90 b/GX-PAW/common/src/21_hashfuncs/test_md5_sum_from_string.F90 new file mode 100644 index 00000000..97d0562f --- /dev/null +++ b/GX-PAW/common/src/21_hashfuncs/test_md5_sum_from_string.F90 @@ -0,0 +1,71 @@ +!!****p* ABINIT/21_hashfuncs/tests/test_md5_sum_from_string +!! NAME +!! test_md5_sum_from_string +!! +!! FUNCTION +!! Unit test for the test_md5_sum_from_string routine of m_hash_md5. +!! +!! COPYRIGHT +!! Copyright (C) 2016-2024 ABINIT Group (Yann Pouillon) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! For the initials of contributors, see +!! ~abinit/doc/developers/contributors.txt . +!! +!! NOTES +!! This program is run by "make check". +!! +!! INPUTS +!! (main routine) +!! +!! OUTPUT +!! (main routine) +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +program test_md5_sum_from_string + +use defs_basis, only: ch10,std_out +use m_hash_md5 +implicit none + +character(len=*), parameter :: abinit_input_string = "ABINIT" // ch10 +character(len=32), parameter :: abinit_md5_ref = & +& "1c57f60933157a3b6e13def40286f0c5" + +character(len=32) :: chk_value +logical :: test_ok + +#if defined DEBUG_MODE +write(std_out,'(a,a)') "Unitary test: md5_sum_from_string", ch10 +write(std_out,'(1x,a," = ",a)') "Reference MD5 sum", abinit_md5_ref +#endif + +chk_value = md5_sum_from_string(abinit_input_string) + +#if defined DEBUG_MODE +write(std_out,'(1x,a," = ",a)') "Computed MD5 sum", chk_value +#endif + +! Report test result +test_ok = md5_check(abinit_md5_ref, chk_value) +#if defined DEBUG_MODE +write(std_out,*) +if ( test_ok ) then + write(std_out,'(a,a)') "TEST OK", ch10 +else + write(std_out,'(a,a)') "TEST FAILED", ch10 +end if +#else +if ( .not. test_ok ) then + write(std_out,'(a,a)') "TEST FAILED", ch10 +end if +#endif + +end program test_md5_sum_from_string +!!*** diff --git a/GX-PAW/common/src/27_toolbox_oop/Makefile b/GX-PAW/common/src/27_toolbox_oop/Makefile new file mode 100644 index 00000000..3be73ef0 --- /dev/null +++ b/GX-PAW/common/src/27_toolbox_oop/Makefile @@ -0,0 +1,1466 @@ +# Makefile.in generated by automake 1.16.3 from Makefile.am. +# shared/common/src/27_toolbox_oop/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994-2020 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-corelibs on 2024/03/16 21:07:38 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-corelibs script or its config file instead. +# + + +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/abinit +pkgincludedir = $(includedir)/abinit +pkglibdir = $(libdir)/abinit +pkglibexecdir = $(libexecdir)/abinit +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = x86_64-apple-darwin18.7.0 +host_triplet = x86_64-apple-darwin18.7.0 +target_triplet = x86_64-apple-darwin18.7.0 +subdir = shared/common/src/27_toolbox_oop +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/m4/arch-gpu.m4 \ + $(top_srcdir)/config/m4/arch-mpi.m4 \ + $(top_srcdir)/config/m4/auto-autotools.m4 \ + $(top_srcdir)/config/m4/auto-corelibs.m4 \ + $(top_srcdir)/config/m4/auto-debug.m4 \ + $(top_srcdir)/config/m4/auto-dirflags.m4 \ + $(top_srcdir)/config/m4/auto-env.m4 \ + $(top_srcdir)/config/m4/auto-hints.m4 \ + $(top_srcdir)/config/m4/auto-optim.m4 \ + $(top_srcdir)/config/m4/auto-options.m4 \ + $(top_srcdir)/config/m4/auto-output.m4 \ + $(top_srcdir)/config/m4/auto-triggers.m4 \ + $(top_srcdir)/config/m4/conf-atompaw.m4 \ + $(top_srcdir)/config/m4/conf-debug.m4 \ + $(top_srcdir)/config/m4/conf-fallbacks.m4 \ + $(top_srcdir)/config/m4/conf-files.m4 \ + $(top_srcdir)/config/m4/conf-init.m4 \ + $(top_srcdir)/config/m4/conf-openmp.m4 \ + $(top_srcdir)/config/m4/conf-optim.m4 \ + $(top_srcdir)/config/m4/lang-c++.m4 \ + $(top_srcdir)/config/m4/lang-c.m4 \ + $(top_srcdir)/config/m4/lang-fortran-import.m4 \ + $(top_srcdir)/config/m4/lang-fortran.m4 \ + $(top_srcdir)/config/m4/lang-python.m4 \ + $(top_srcdir)/config/m4/libxml2.m4 \ + $(top_srcdir)/config/m4/misc-display.m4 \ + $(top_srcdir)/config/m4/sd_abinit_common.m4 \ + $(top_srcdir)/config/m4/sd_arch_gpu.m4 \ + $(top_srcdir)/config/m4/sd_arch_mpi.m4 \ + $(top_srcdir)/config/m4/sd_bigdft.m4 \ + $(top_srcdir)/config/m4/sd_core.m4 \ + $(top_srcdir)/config/m4/sd_esl.m4 \ + $(top_srcdir)/config/m4/sd_fftw3.m4 \ + $(top_srcdir)/config/m4/sd_gpu_kokkos.m4 \ + $(top_srcdir)/config/m4/sd_gpu_yakl.m4 \ + $(top_srcdir)/config/m4/sd_io_hdf5.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf_fortran.m4 \ + $(top_srcdir)/config/m4/sd_levmar.m4 \ + $(top_srcdir)/config/m4/sd_libpaw.m4 \ + $(top_srcdir)/config/m4/sd_libpsml.m4 \ + $(top_srcdir)/config/m4/sd_libxc.m4 \ + $(top_srcdir)/config/m4/sd_math_fft.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_core.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_util.m4 \ + $(top_srcdir)/config/m4/sd_papi.m4 \ + $(top_srcdir)/config/m4/sd_pfft.m4 \ + $(top_srcdir)/config/m4/sd_triqs.m4 \ + $(top_srcdir)/config/m4/sd_wannier90.m4 \ + $(top_srcdir)/config/m4/sd_xmlf90.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +AM_V_AR = $(am__v_AR_$(V)) +am__v_AR_ = $(am__v_AR_$(AM_DEFAULT_VERBOSITY)) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = +lib27_toolbox_oop_a_AR = $(AR) $(ARFLAGS) +lib27_toolbox_oop_a_LIBADD = +am__objects_1 = m_copy.$(OBJEXT) m_iterators.$(OBJEXT) \ + m_mpiotk.$(OBJEXT) m_nctk.$(OBJEXT) +am_lib27_toolbox_oop_a_OBJECTS = $(am__objects_1) +lib27_toolbox_oop_a_OBJECTS = $(am_lib27_toolbox_oop_a_OBJECTS) +AM_V_P = $(am__v_P_$(V)) +am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY)) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I. -I$(top_builddir) +PPFCCOMPILE = $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) +AM_V_PPFC = $(am__v_PPFC_$(V)) +am__v_PPFC_ = $(am__v_PPFC_$(AM_DEFAULT_VERBOSITY)) +am__v_PPFC_0 = @echo " PPFC " $@; +am__v_PPFC_1 = +FCLD = $(FC) +FCLINK = $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \ + $@ +AM_V_FCLD = $(am__v_FCLD_$(V)) +am__v_FCLD_ = $(am__v_FCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_FCLD_0 = @echo " FCLD " $@; +am__v_FCLD_1 = +SOURCES = $(lib27_toolbox_oop_a_SOURCES) +DIST_SOURCES = $(lib27_toolbox_oop_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ABINIT_BINARY_PACKAGE = abinit-10.0.0.83-58be4d_x86_64_darwin18.7.0_gnu9.4 +ABINIT_COMMON_CPPFLAGS = +ABINIT_COMMON_FCFLAGS = +ABINIT_COMMON_LDFLAGS = +ABINIT_COMMON_LIBS = +ABINIT_TARGET = x86_64_darwin18.7.0_gnu9.4 +ABINIT_VERSION = 10.0.0.83-58be4d +ABINIT_VERSION_BASE = 10.0 +ABINIT_VERSION_BUILD = 20240316 +ABINIT_VERSION_MAJOR = 10 +ABINIT_VERSION_MICRO = 0 +ABINIT_VERSION_MINOR = 0 +ABI_CPPFLAGS = -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include +ACLOCAL = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' aclocal-1.16 +AMTAR = $${TAR-tar} +AM_DEFAULT_VERBOSITY = 1 +AR = ar +ARFLAGS = rc +ARFLAGS_CMD = rc +ARFLAGS_DEBUG = +ARFLAGS_EXTRA = +ARFLAGS_HINTS = +ARFLAGS_OPTIM = +ATOMPAW_BIN = +AUTOCONF = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' autoconf +AUTOHEADER = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' autoheader +AUTOMAKE = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' automake-1.16 +AWK = awk +BIGDFT_CPPFLAGS = +BIGDFT_FCFLAGS = +BIGDFT_LDFLAGS = +BIGDFT_LIBS = +BOURNE_SHELL = /bin/sh +CC = /opt/local/bin/mpicc +CCDEPMODE = depmode=gcc3 +CC_LDFLAGS = +CC_LDFLAGS_DEBUG = +CC_LDFLAGS_EXTRA = +CC_LDFLAGS_GPU = +CC_LDFLAGS_HINTS = +CC_LDFLAGS_OPTIM = +CC_LIBS = +CC_LIBS_DEBUG = +CC_LIBS_EXTRA = +CC_LIBS_GPU = +CC_LIBS_HINTS = +CC_LIBS_OPTIM = +CFLAGS = -O2 -g +CFLAGS_DEBUG = +CFLAGS_EXTRA = +CFLAGS_GPU = +CFLAGS_HINTS = +CFLAGS_OPTIM = +CPP = /opt/local/bin/mpicc -E +CPPFLAGS = +CPPFLAGS_DEBUG = +CPPFLAGS_EXTRA = +CPPFLAGS_GPU = +CPPFLAGS_HINTS = +CPPFLAGS_HINTS_EXT = -P -std=c99 +CPPFLAGS_OPTIM = +CXX = /opt/local/bin/mpicxx +CXXDEPMODE = depmode=gcc3 +CXXFLAGS = -O2 -g +CXXFLAGS_DEBUG = +CXXFLAGS_EXTRA = +CXXFLAGS_GPU = +CXXFLAGS_HINTS = +CXXFLAGS_OPTIM = +CXX_LDFLAGS = +CXX_LDFLAGS_DEBUG = +CXX_LDFLAGS_EXTRA = +CXX_LDFLAGS_GPU = +CXX_LDFLAGS_HINTS = +CXX_LDFLAGS_OPTIM = +CXX_LIBS = +CXX_LIBS_DEBUG = +CXX_LIBS_EXTRA = +CXX_LIBS_GPU = +CXX_LIBS_HINTS = +CXX_LIBS_OPTIM = +CYGPATH_W = echo +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +ECHO_C = \c +ECHO_N = +ECHO_T = +EGREP = /usr/bin/grep -E +EXEEXT = +F77 = /opt/local/bin/mpif90 +FC = /opt/local/bin/mpif90 +FCFLAGS = -O2 -g -ffree-line-length-none -I/opt/local/include -I/opt/local/include -I/opt/local/include +FCFLAGS_DEBUG = +FCFLAGS_EXTRA = +FCFLAGS_F90 = +FCFLAGS_FIXEDFORM = -ffixed-form +FCFLAGS_FREEFORM = -ffree-form +FCFLAGS_HINTS = -ffree-line-length-none +FCFLAGS_MODDIR = -J../mods +FCFLAGS_OPENMP = +FCFLAGS_OPENMP_OFFLOAD = +FCFLAGS_OPTIM = +FCLIBS = -L/opt/local/lib -L/opt/local/lib/openmpi-gcc9 -L/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0 -L/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/../../.. -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi -lgfortran -lquadmath -lm +FC_LDFLAGS = +FC_LDFLAGS_DEBUG = +FC_LDFLAGS_EXTRA = +FC_LDFLAGS_HINTS = +FC_LDFLAGS_OPTIM = +FC_LIBS = +FC_LIBS_DEBUG = +FC_LIBS_EXTRA = +FC_LIBS_HINTS = +FC_LIBS_OPTIM = +FC_NOWRAP = /opt/local/bin/mpif90 +FFLAGS = -O2 -g -ffree-line-length-none -I/opt/local/include -I/opt/local/include -I/opt/local/include +FFTW3_CFLAGS = +FFTW3_CPPFLAGS = -I/opt/local/include +FFTW3_FCFLAGS = -I/opt/local/include +FFTW3_LDFLAGS = +FFTW3_LIBS = -L/opt/local/lib -lfftw3 -lfftw3f +FFT_CFLAGS = +FFT_FCFLAGS = +FPP = +FPPFLAGS = +FPPFLAGS_DEBUG = +FPPFLAGS_EXTRA = +FPPFLAGS_HINTS = +FPPFLAGS_OPTIM = +GPU_ARCH = +GPU_CFLAGS = +GPU_CPPFLAGS = +GPU_CXXFLAGS = +GPU_FCFLAGS = +GPU_LDFLAGS = +GPU_LIBS = +GRAPHATOM_BIN = +GREP = /usr/bin/grep +H5CC = +HDF5_CFLAGS = +HDF5_CPPFLAGS = +HDF5_CXXFLAGS = +HDF5_FCFLAGS = +HDF5_LDFLAGS = +HDF5_LIBS = +INSTALL = /opt/local/libexec/gnubin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +KOKKOS_CPPFLAGS = +KOKKOS_CXXFLAGS = +KOKKOS_LDFLAGS = +KOKKOS_LIBS = +LDFLAGS = +LEVMAR_CFLAGS = +LEVMAR_CPPFLAGS = +LEVMAR_LDFLAGS = +LEVMAR_LIBS = +LIBOBJS = +LIBPAW_CPPFLAGS = +LIBPAW_FCFLAGS = +LIBPAW_LDFLAGS = +LIBPAW_LIBS = +LIBPSML_CPPFLAGS = +LIBPSML_FCFLAGS = +LIBPSML_LDFLAGS = +LIBPSML_LIBS = +LIBS = -L/opt/local/lib -lwannier -L/opt/local/lib -lxc -L/opt/local/lib -lnetcdff -L/opt/local/lib -lnetcdf -L/opt/local/lib -L/opt/local/lib -lhdf5_hl -L/opt/local/lib -lhdf5 -lz -ldl -lm -L/opt/local/lib -lfftw3 -lfftw3f +LIBXC_CFLAGS = +LIBXC_CPPFLAGS = +LIBXC_FCFLAGS = +LIBXC_LDFLAGS = +LIBXC_LIBS = +LIBXML2_CPPFLAGS = +LIBXML2_FCFLAGS = +LIBXML2_LIBS = +LINALG_CFLAGS = +LINALG_CPPFLAGS = +LINALG_CXXFLAGS = +LINALG_FCFLAGS = -I/opt/local/include +LINALG_LDFLAGS = +LINALG_LIBS = -L/opt/local/lib -lopenblas +LN_S = ln -s +LTLIBOBJS = +MAKEINFO = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' makeinfo +MKDIR_P = /opt/local/libexec/gnubin/mkdir -p +MODEXT = mod +MPI_CFLAGS = +MPI_CPPFLAGS = +MPI_CXXFLAGS = +MPI_FCFLAGS = +MPI_LDFLAGS = +MPI_LIBS = +MV = /opt/local/libexec/gnubin/mv +NETCDF_CFLAGS = +NETCDF_CPPFLAGS = +NETCDF_CXXFLAGS = +NETCDF_FCFLAGS = +NETCDF_FORTRAN_CFLAGS = +NETCDF_FORTRAN_CPPFLAGS = +NETCDF_FORTRAN_CXXFLAGS = +NETCDF_FORTRAN_FCFLAGS = +NETCDF_FORTRAN_LDFLAGS = +NETCDF_FORTRAN_LIBS = +NETCDF_LDFLAGS = +NETCDF_LIBS = +NVCC = +NVCC_CFLAGS = +NVCC_CPPFLAGS = +NVCC_LDFLAGS = +NVCC_LIBS = +OBJEXT = o +PACKAGE = abinit +PACKAGE_BUGREPORT = https://bugs.launchpad.net/abinit/ +PACKAGE_NAME = ABINIT +PACKAGE_STRING = ABINIT 10.0.0.83-58be4d +PACKAGE_TARNAME = abinit +PACKAGE_URL = +PACKAGE_VERSION = 10.0.0.83-58be4d +PAPI_CFLAGS = +PAPI_CPPFLAGS = +PAPI_LDFLAGS = +PAPI_LIBS = +PATCH = patch +PATH_SEPARATOR = : +PERL = /usr/bin/perl +PFFT_CFLAGS = +PFFT_CPPFLAGS = +PFFT_LDFLAGS = +PFFT_LIBS = +PYFLAGS = +PYTHON = python3.9 +PYTHON_CONFIG = python3.9-config +PYTHON_CPPFLAGS = -I/opt/local/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -I/opt/local/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 +RANLIB = ranlib +REALPATH = realpath +RM = /opt/local/libexec/gnubin/rm +SED = /usr/bin/sed +SET_MAKE = +SHELL = /bin/sh +STRIP = +TAR = tar +TRIQS_CFLAGS = +TRIQS_CPPFLAGS = +TRIQS_CXXFLAGS = +TRIQS_LDFLAGS = +TRIQS_LIBS = +TRUE_CPP = cpp +VERSION = 10.0.0.83-58be4d +WANNIER90_CPPFLAGS = +WANNIER90_FCFLAGS = -I/opt/local/include +WANNIER90_LDFLAGS = +WANNIER90_LIBS = -L/opt/local/lib -lwannier +XML2_CONFIG = +XMLF90_CPPFLAGS = +XMLF90_FCFLAGS = +XMLF90_LDFLAGS = +XMLF90_LIBS = +XML_CPPFLAGS = +XML_LIBS = +XPP = +XPPFLAGS = +XPPFLAGS_DEBUG = +XPPFLAGS_EXTRA = +XPPFLAGS_OPTIM = +YAKL_CPPFLAGS = +YAKL_FCFLAGS = +YAKL_LDFLAGS = +YAKL_LIBS = +abi_ac_distcheck = --with-config-file="/Users/gonze/_Research/ABINIT_git/gonze/mac-1P0-225.ac9" +abi_ac_version = 027100 +abi_am_version = 011603 +abi_avx_safe_mode_enable = no +abi_bse_unpacked_enable = no +abi_cc_path = +abi_cc_vendor = gnu +abi_cc_version = 9.4 +abi_cclock_enable = no +abi_cpp_path = +abi_cpu_64bits = yes +abi_cpu_bits = 64 +abi_cpu_model = unknown +abi_cpu_platform = apple +abi_cpu_spec = unknown_unknown +abi_cpu_vendor = unknown +abi_crpa_optim_enable = no +abi_cxx_path = +abi_cxx_vendor = gnu +abi_cxx_version = 9.4 +abi_debug_flavor = basic +abi_exports_enable = no +abi_fbk_abinit_common_ok = no +abi_fbk_bigdft_ok = disabled +abi_fbk_config = +abi_fbk_enable = no +abi_fbk_fft_ok = no +abi_fbk_fftw3_ok = no +abi_fbk_gpu_ok = no +abi_fbk_hdf5_ok = disabled +abi_fbk_init = def +abi_fbk_kokkos_ok = no +abi_fbk_levmar_ok = no +abi_fbk_libpaw_ok = no +abi_fbk_libpsml_ok = disabled +abi_fbk_libxc_ok = disabled +abi_fbk_libxml2_ok = no +abi_fbk_linalg_ok = disabled +abi_fbk_list = +abi_fbk_mpi_ok = no +abi_fbk_netcdf_fortran_ok = disabled +abi_fbk_netcdf_ok = disabled +abi_fbk_papi_ok = no +abi_fbk_pfft_ok = no +abi_fbk_prefix = +abi_fbk_required = +abi_fbk_triqs_ok = no +abi_fbk_wannier90_ok = disabled +abi_fbk_xmlf90_ok = disabled +abi_fbk_yakl_ok = no +abi_fc_path = +abi_fc_vendor = gnu +abi_fc_version = 9.4 +abi_fc_wrap = no +abi_fc_wrapper_enable = no +abi_fpp_path = +abi_gpu_arch = +abi_gpu_fcflags = +abi_gpu_flavor = none +abi_gpu_hip_libdir = +abi_gpu_incs = +abi_gpu_ldflags = +abi_gpu_libs = +abi_gpu_nvtx_v3 = +abi_gpu_roctx = +abi_gw_dpc_enable = yes +abi_hints_enable = yes +abi_libtetra_enable = yes +abi_libxml2_cppflags = +abi_libxml2_enable = no +abi_libxml2_fcflags = +abi_libxml2_init = def +abi_libxml2_ldflags = +abi_libxml2_libs = +abi_libxml2_ok = unknown +abi_libxml2_prefix = +abi_lotf_enable = no +abi_lt_version = 020406 +abi_m4_version = 010419 +abi_memory_profiling_enable = no +abi_mpi_cflags = +abi_mpi_cppflags = +abi_mpi_cxxflags = +abi_mpi_enable = yes +abi_mpi_fcflags = +abi_mpi_flavor = auto +abi_mpi_gpu_aware_enable = no +abi_mpi_incs = +abi_mpi_inplace_enable = yes +abi_mpi_interfaces_bugfix_enable = no +abi_mpi_io_default_enable = no +abi_mpi_io_enable = yes +abi_mpi_ldflags = +abi_mpi_level = 2 +abi_mpi_libs = +abi_netcdf_default_enable = no +abi_openmp_enable = no +abi_openmp_offload_enable = no +abi_optim_flavor = standard +abi_python_invocation_enable = no +abi_source_debug_enable = no +abi_stdin_enable = yes +abi_sys_spec = darwin-x86_64 +abi_timer_enable = yes +abi_triqs_v1_4_enable = no +abi_triqs_v2_0_enable = no +abi_zdot_bugfix_enable = no +abinit_bindir = /usr/local/bin +abinit_builddir = /Users/gonze/_Research/ABINIT_git/gonze +abinit_chkdir = /usr/local/share/abinit/tests +abinit_datdir = /usr/local/share/abinit +abinit_docdir = /usr/local/doc/abinit +abinit_incdir = /usr/local/include +abinit_libdir = /usr/local/lib +abinit_mandir = /usr/local/share/man +abinit_prefix = /usr/local +abinit_srcdir = /Users/gonze/_Research/ABINIT_git/gonze +abs_builddir = /Users/gonze/_Research/ABINIT_git/gonze/shared/common/src/27_toolbox_oop +abs_srcdir = /Users/gonze/_Research/ABINIT_git/gonze/shared/common/src/27_toolbox_oop +abs_top_builddir = /Users/gonze/_Research/ABINIT_git/gonze +abs_top_srcdir = /Users/gonze/_Research/ABINIT_git/gonze +ac_ct_CC = +ac_ct_CXX = +ac_ct_FC = +am__include = include +am__leading_dot = . +am__quote = +am__tar = tar --format=ustar -chf - "$$tardir" +am__untar = tar -xf - +bindir = ${exec_prefix}/bin +build = x86_64-apple-darwin18.7.0 +build_alias = +build_cpu = x86_64 +build_os = darwin18.7.0 +build_vendor = apple +builddir = . +cc_info_string = gcc-mp-9 (MacPorts gcc9 9.4.0_0) 9.4.0 +cxx_info_string = g++-mp-9 (MacPorts gcc9 9.4.0_0) 9.4.0 +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +enable_avx_safe_mode = +enable_bse_unpacked = +enable_cclock = +enable_crpa_optim = +enable_exports = +enable_fc_wrapper = +enable_gw_dpc = yes +enable_hints = +enable_libtetra = +enable_lotf = +enable_memory_profiling = +enable_mpi_gpu_aware = +enable_mpi_inplace = +enable_mpi_interfaces_bugfix = +enable_mpi_io = yes +enable_mpi_io_default = +enable_netcdf_default = +enable_openmp = +enable_openmp_offload = +enable_python_invocation = +enable_shared = +enable_source_debug = +enable_static = +enable_stdin = +enable_timer = +enable_triqs_v1_4 = +enable_triqs_v2_0 = +enable_zdot_bugfix = +exec_prefix = ${prefix} +fc_info_string = GNU Fortran (MacPorts gcc9 9.4.0_0) 9.4.0 +fc_mod_fcflags = +fc_timing = standard +fcflags_opt_02_clib = +fcflags_opt_10_defs = +fcflags_opt_11_memory_mpi = +fcflags_opt_12_hide_mpi = +fcflags_opt_14_hidewrite = +fcflags_opt_16_hideleave = +fcflags_opt_16_kokkos_toolbox = +fcflags_opt_17_gpu_toolbox = +fcflags_opt_17_libtetra_ext = +fcflags_opt_17_minimax = +fcflags_opt_17_yaml_out = +fcflags_opt_18_timing = +fcflags_opt_21_hashfuncs = +fcflags_opt_27_toolbox_oop = +fcflags_opt_28_numeric_noabirule = +fcflags_opt_29_kpoints = +fcflags_opt_32_util = +fcflags_opt_33_xc_lowlevel = +fcflags_opt_39_libpaw = +fcflags_opt_41_geometry = +fcflags_opt_42_nlstrain = +fcflags_opt_42_parser = +fcflags_opt_43_ptgroups = -O0 +fcflags_opt_43_wvl_wrappers = +fcflags_opt_44_abitools = +fcflags_opt_44_abitypes_defs = +fcflags_opt_44_manage_kokkos = +fcflags_opt_45_geomoptim = +fcflags_opt_45_xgTools = +fcflags_opt_46_ghc_omp = +fcflags_opt_46_manage_cuda = +fcflags_opt_48_diago = +fcflags_opt_49_gw_toolbox_oop = +fcflags_opt_51_manage_mpi = +fcflags_opt_52_fft_mpi_noabirule = +fcflags_opt_53_ffts = +fcflags_opt_54_spacepar = +fcflags_opt_55_abiutil = +fcflags_opt_56_io_mpi = +fcflags_opt_56_mixing = +fcflags_opt_56_recipspace = +fcflags_opt_56_xc = +fcflags_opt_57_iopsp_parser = +fcflags_opt_57_iovars = +fcflags_opt_61_occeig = +fcflags_opt_62_cg_noabirule = +fcflags_opt_62_ctqmc = +fcflags_opt_62_iowfdenpot = +fcflags_opt_62_poisson = +fcflags_opt_62_wvl_wfs = +fcflags_opt_64_psp = +fcflags_opt_65_lotf_base = +fcflags_opt_65_paw = +fcflags_opt_66_nonlocal = +fcflags_opt_66_vdwxc = +fcflags_opt_66_wfs = +fcflags_opt_67_common = +fcflags_opt_67_python_invocation_ext = +fcflags_opt_67_triqs_ext = +fcflags_opt_68_dmft = +fcflags_opt_68_lotf = +fcflags_opt_68_recursion = +fcflags_opt_68_rsprc = +fcflags_opt_69_wfdesc = +fcflags_opt_70_gw = +fcflags_opt_71_bse = +fcflags_opt_71_wannier = +fcflags_opt_72_response = +fcflags_opt_77_ddb = +fcflags_opt_77_suscep = +fcflags_opt_78_effpot = +fcflags_opt_78_eph = +fcflags_opt_79_seqpar_mpi = +fcflags_opt_80_rttddft = +fcflags_opt_80_tdep = +fcflags_opt_94_scfcv = +fcflags_opt_95_drive = +fcflags_opt_98_main = +fcflags_opt_bigdft = +fcflags_opt_default = +fcflags_opt_hdf5 = +fcflags_opt_levmar = +fcflags_opt_libpsml = +fcflags_opt_libxc = +fcflags_opt_libxml2 = +fcflags_opt_linalg = +fcflags_opt_netcdf = +fcflags_opt_netcdf_fortran = +fcflags_opt_papi = +fcflags_opt_triqs = +fcflags_opt_wannier90 = +fcflags_opt_xmlf90 = +host = x86_64-apple-darwin18.7.0 +host_alias = +host_cpu = x86_64 +host_os = darwin18.7.0 +host_vendor = apple +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = ${SHELL} /Users/gonze/_Research/ABINIT_git/gonze/config/gnu/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = ${datarootdir}/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = $(MKDIR_P) +oldincludedir = /usr/include +pdfdir = ${docdir} +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +runstatedir = ${localstatedir}/run +sbindir = ${exec_prefix}/sbin +sd_abinit_common_cppflags = +sd_abinit_common_enable = no +sd_abinit_common_enable_def = no +sd_abinit_common_fcflags = +sd_abinit_common_init = def +sd_abinit_common_ldflags = +sd_abinit_common_libs = +sd_abinit_common_ok = unknown +sd_abinit_common_options = optional skip +sd_abinit_common_policy = skip +sd_abinit_common_status = optional +sd_bigdft_cppflags = +sd_bigdft_enable = no +sd_bigdft_enable_def = no +sd_bigdft_fcflags = +sd_bigdft_init = def +sd_bigdft_ldflags = +sd_bigdft_libs = +sd_bigdft_ok = unknown +sd_bigdft_options = optional warn +sd_bigdft_policy = warn +sd_bigdft_status = optional +sd_fft_cflags = +sd_fft_choices = +sd_fft_cppflags = -I/opt/local/include +sd_fft_cxxflags = +sd_fft_enable = yes +sd_fft_fcflags = -I/opt/local/include +sd_fft_flavor = fftw3 +sd_fft_init = kwd +sd_fft_ldflags = +sd_fft_libs = -L/opt/local/lib -lfftw3 -lfftw3f +sd_fft_ok = yes +sd_fftw3_cflags = +sd_fftw3_cppflags = -I/opt/local/include +sd_fftw3_enable = yes +sd_fftw3_enable_def = no +sd_fftw3_fcflags = -I/opt/local/include +sd_fftw3_init = env +sd_fftw3_ldflags = +sd_fftw3_libs = -L/opt/local/lib -lfftw3 -lfftw3f +sd_fftw3_ok = yes +sd_fftw3_options = optional skip +sd_fftw3_policy = skip +sd_fftw3_status = optional +sd_gpu_cflags = +sd_gpu_cppflags = +sd_gpu_cxxflags = +sd_gpu_enable = no +sd_gpu_enable_def = no +sd_gpu_fcflags = +sd_gpu_init = def +sd_gpu_ldflags = +sd_gpu_libs = +sd_gpu_ok = no +sd_gpu_options = optional warn +sd_gpu_policy = warn +sd_gpu_prefix = +sd_gpu_status = optional +sd_hdf5_cflags = +sd_hdf5_cppflags = -I/opt/local/include -I/opt/local/include +sd_hdf5_cxxflags = +sd_hdf5_enable = yes +sd_hdf5_enable_def = yes +sd_hdf5_enable_fc = no +sd_hdf5_fcflags = +sd_hdf5_h5cc = /opt/local/bin/h5cc +sd_hdf5_h5fc = +sd_hdf5_init = dir +sd_hdf5_ldflags = +sd_hdf5_libs = -L/opt/local/lib -L/opt/local/lib -lhdf5_hl -L/opt/local/lib -lhdf5 -lz -ldl -lm +sd_hdf5_ok = yes +sd_hdf5_options = required no-fortran warn +sd_hdf5_policy = warn +sd_hdf5_status = required +sd_kokkos_cppflags = +sd_kokkos_cxxflags = +sd_kokkos_enable = no +sd_kokkos_enable_def = no +sd_kokkos_init = def +sd_kokkos_ldflags = +sd_kokkos_libs = +sd_kokkos_ok = unknown +sd_kokkos_options = optional fail +sd_kokkos_policy = fail +sd_kokkos_status = optional +sd_levmar_cflags = +sd_levmar_cppflags = +sd_levmar_enable = no +sd_levmar_enable_def = no +sd_levmar_init = def +sd_levmar_ldflags = +sd_levmar_libs = +sd_levmar_ok = unknown +sd_levmar_options = optional fail +sd_levmar_policy = fail +sd_levmar_status = optional +sd_libpaw_cppflags = +sd_libpaw_enable = no +sd_libpaw_enable_def = no +sd_libpaw_fcflags = +sd_libpaw_init = def +sd_libpaw_ldflags = +sd_libpaw_libs = +sd_libpaw_ok = unknown +sd_libpaw_options = optional skip +sd_libpaw_policy = skip +sd_libpaw_status = optional +sd_libpsml_cppflags = +sd_libpsml_enable = no +sd_libpsml_enable_def = no +sd_libpsml_fcflags = +sd_libpsml_init = def +sd_libpsml_ldflags = +sd_libpsml_libs = +sd_libpsml_ok = unknown +sd_libpsml_options = optional warn +sd_libpsml_policy = warn +sd_libpsml_status = optional +sd_libxc_cflags = +sd_libxc_cppflags = -I/opt/local/include +sd_libxc_enable = yes +sd_libxc_enable_def = yes +sd_libxc_enable_fc = no +sd_libxc_fcflags = +sd_libxc_init = dir +sd_libxc_ldflags = +sd_libxc_libs = -L/opt/local/lib -lxc +sd_libxc_ok = yes +sd_libxc_options = required no-fortran warn +sd_libxc_policy = warn +sd_libxc_status = required +sd_linalg_cflags = +sd_linalg_choices = +sd_linalg_cppflags = +sd_linalg_cxxflags = +sd_linalg_enable = yes +sd_linalg_fcflags = -I/opt/local/include +sd_linalg_flavor = openblas +sd_linalg_has_elpa = no +sd_linalg_has_scalapack = no +sd_linalg_init = env +sd_linalg_ldflags = +sd_linalg_libs = -L/opt/local/lib -lopenblas +sd_linalg_ok = yes +sd_mpi_cc = /opt/local/bin/mpicc +sd_mpi_cflags = +sd_mpi_cppflags = -I/opt/local/include +sd_mpi_cxx = /opt/local/bin/mpicxx +sd_mpi_enable = yes +sd_mpi_enable_cxx = yes +sd_mpi_enable_def = auto +sd_mpi_enable_fc = yes +sd_mpi_fc = /opt/local/bin/mpif90 +sd_mpi_fcflags = -I/opt/local/include +sd_mpi_init = dir +sd_mpi_ldflags = +sd_mpi_libs = +sd_mpi_ok = yes +sd_mpi_options = auto optional fail +sd_mpi_policy = fail +sd_mpi_status = optional +sd_netcdf_cflags = +sd_netcdf_cppflags = -I/opt/local/include +sd_netcdf_enable = yes +sd_netcdf_enable_def = yes +sd_netcdf_fcflags = -I/opt/local/include +sd_netcdf_fortran_cflags = +sd_netcdf_fortran_cppflags = -I/opt/local/include +sd_netcdf_fortran_enable = yes +sd_netcdf_fortran_enable_def = yes +sd_netcdf_fortran_fcflags = -I/opt/local/include +sd_netcdf_fortran_init = dir +sd_netcdf_fortran_ldflags = +sd_netcdf_fortran_libs = -L/opt/local/lib -lnetcdff +sd_netcdf_fortran_ok = yes +sd_netcdf_fortran_options = required warn +sd_netcdf_fortran_policy = warn +sd_netcdf_fortran_status = required +sd_netcdf_init = dir +sd_netcdf_ldflags = +sd_netcdf_libs = -L/opt/local/lib -lnetcdf +sd_netcdf_ok = yes +sd_netcdf_options = required warn +sd_netcdf_policy = warn +sd_netcdf_status = required +sd_papi_cflags = +sd_papi_cppflags = +sd_papi_enable = no +sd_papi_enable_def = no +sd_papi_init = def +sd_papi_ldflags = +sd_papi_libs = +sd_papi_ok = unknown +sd_papi_options = optional fail +sd_papi_policy = fail +sd_papi_sd_papi_fcflags = +sd_papi_status = optional +sd_pfft_cflags = +sd_pfft_cppflags = +sd_pfft_enable = no +sd_pfft_enable_def = no +sd_pfft_init = def +sd_pfft_ldflags = +sd_pfft_libs = +sd_pfft_ok = unknown +sd_pfft_options = optional skip +sd_pfft_policy = skip +sd_pfft_status = optional +sd_sys_fcflags = +sd_triqs_cflags = +sd_triqs_cppflags = +sd_triqs_cxxflags = +sd_triqs_enable = no +sd_triqs_enable_def = no +sd_triqs_fcflags = +sd_triqs_init = def +sd_triqs_ldflags = +sd_triqs_libs = +sd_triqs_ok = unknown +sd_triqs_options = optional fail +sd_triqs_policy = fail +sd_triqs_status = optional +sd_wannier90_cppflags = +sd_wannier90_enable = yes +sd_wannier90_enable_def = no +sd_wannier90_fcflags = -I/opt/local/include +sd_wannier90_init = env +sd_wannier90_ldflags = +sd_wannier90_libs = -L/opt/local/lib -lwannier +sd_wannier90_ok = yes +sd_wannier90_options = optional warn +sd_wannier90_policy = warn +sd_wannier90_status = optional +sd_xmlf90_cppflags = +sd_xmlf90_enable = no +sd_xmlf90_enable_def = no +sd_xmlf90_fcflags = +sd_xmlf90_init = def +sd_xmlf90_ldflags = +sd_xmlf90_libs = +sd_xmlf90_ok = unknown +sd_xmlf90_options = optional warn +sd_xmlf90_policy = warn +sd_xmlf90_status = optional +sd_yakl_cppflags = +sd_yakl_enable = no +sd_yakl_enable_def = no +sd_yakl_fcflags = +sd_yakl_init = def +sd_yakl_ldflags = +sd_yakl_libs = +sd_yakl_ok = unknown +sd_yakl_options = optional fail +sd_yakl_policy = fail +sd_yakl_status = optional +sharedstatedir = ${prefix}/com +src_02_clib_fcflags = -I$(top_builddir)/shared/common/src/02_clib -I$(top_srcdir)/shared/common/src/02_clib +src_10_defs_fcflags = -I$(top_builddir)/shared/common/src/10_defs -I$(top_srcdir)/shared/common/src/10_defs +src_11_memory_mpi_fcflags = -I$(top_builddir)/shared/common/src/11_memory_mpi -I$(top_srcdir)/shared/common/src/11_memory_mpi +src_12_hide_mpi_fcflags = -I$(top_builddir)/shared/common/src/12_hide_mpi -I$(top_srcdir)/shared/common/src/12_hide_mpi +src_14_hidewrite_fcflags = -I$(top_builddir)/shared/common/src/14_hidewrite -I$(top_srcdir)/shared/common/src/14_hidewrite +src_16_hideleave_fcflags = -I$(top_builddir)/shared/common/src/16_hideleave -I$(top_srcdir)/shared/common/src/16_hideleave +src_16_kokkos_toolbox_fcflags = -I$(top_builddir)/shared/common/src/16_kokkos_toolbox -I$(top_srcdir)/shared/common/src/16_kokkos_toolbox +src_17_gpu_toolbox_fcflags = -I$(top_builddir)/shared/common/src/17_gpu_toolbox -I$(top_srcdir)/shared/common/src/17_gpu_toolbox +src_17_libtetra_ext_fcflags = -I$(top_builddir)/shared/common/src/17_libtetra_ext -I$(top_srcdir)/shared/common/src/17_libtetra_ext +src_17_minimax_fcflags = -I$(top_builddir)/shared/common/src/17_minimax -I$(top_srcdir)/shared/common/src/17_minimax +src_17_yaml_out_fcflags = -I$(top_builddir)/shared/common/src/17_yaml_out -I$(top_srcdir)/shared/common/src/17_yaml_out +src_18_timing_fcflags = -I$(top_builddir)/shared/common/src/18_timing -I$(top_srcdir)/shared/common/src/18_timing +src_21_hashfuncs_fcflags = -I$(top_builddir)/shared/common/src/21_hashfuncs -I$(top_srcdir)/shared/common/src/21_hashfuncs +src_27_toolbox_oop_fcflags = -I$(top_builddir)/shared/common/src/27_toolbox_oop -I$(top_srcdir)/shared/common/src/27_toolbox_oop +src_28_numeric_noabirule_fcflags = -I$(top_builddir)/shared/common/src/28_numeric_noabirule -I$(top_srcdir)/shared/common/src/28_numeric_noabirule +src_29_kpoints_fcflags = -I$(top_builddir)/shared/common/src/29_kpoints -I$(top_srcdir)/shared/common/src/29_kpoints +src_32_util_fcflags = -I$(top_builddir)/shared/common/src/32_util -I$(top_srcdir)/shared/common/src/32_util +src_33_xc_lowlevel_fcflags = -I$(top_builddir)/shared/common/src/33_xc_lowlevel -I$(top_srcdir)/shared/common/src/33_xc_lowlevel +src_39_libpaw_fcflags = -I$(top_builddir)/shared/libpaw/src -I$(top_srcdir)/shared/libpaw/src +src_41_geometry_fcflags = -I$(top_builddir)/src/41_geometry -I$(top_srcdir)/src/41_geometry +src_42_nlstrain_fcflags = -I$(top_builddir)/src/42_nlstrain -I$(top_srcdir)/src/42_nlstrain +src_42_parser_fcflags = -I$(top_builddir)/src/42_parser -I$(top_srcdir)/src/42_parser +src_43_ptgroups_fcflags = -I$(top_builddir)/src/43_ptgroups -I$(top_srcdir)/src/43_ptgroups +src_43_wvl_wrappers_fcflags = -I$(top_builddir)/src/43_wvl_wrappers -I$(top_srcdir)/src/43_wvl_wrappers +src_44_abitools_fcflags = -I$(top_builddir)/src/44_abitools -I$(top_srcdir)/src/44_abitools +src_44_abitypes_defs_fcflags = -I$(top_builddir)/src/44_abitypes_defs -I$(top_srcdir)/src/44_abitypes_defs +src_44_manage_kokkos_fcflags = -I$(top_builddir)/src/44_manage_kokkos -I$(top_srcdir)/src/44_manage_kokkos +src_45_geomoptim_fcflags = -I$(top_builddir)/src/45_geomoptim -I$(top_srcdir)/src/45_geomoptim +src_45_xgTools_fcflags = -I$(top_builddir)/src/45_xgTools -I$(top_srcdir)/src/45_xgTools +src_46_ghc_omp_fcflags = -I$(top_builddir)/src/46_ghc_omp -I$(top_srcdir)/src/46_ghc_omp +src_46_manage_cuda_fcflags = -I$(top_builddir)/src/46_manage_cuda -I$(top_srcdir)/src/46_manage_cuda +src_48_diago_fcflags = -I$(top_builddir)/src/48_diago -I$(top_srcdir)/src/48_diago +src_49_gw_toolbox_oop_fcflags = -I$(top_builddir)/src/49_gw_toolbox_oop -I$(top_srcdir)/src/49_gw_toolbox_oop +src_51_manage_mpi_fcflags = -I$(top_builddir)/src/51_manage_mpi -I$(top_srcdir)/src/51_manage_mpi +src_52_fft_mpi_noabirule_fcflags = -I$(top_builddir)/src/52_fft_mpi_noabirule -I$(top_srcdir)/src/52_fft_mpi_noabirule +src_53_ffts_fcflags = -I$(top_builddir)/src/53_ffts -I$(top_srcdir)/src/53_ffts +src_54_spacepar_fcflags = -I$(top_builddir)/src/54_spacepar -I$(top_srcdir)/src/54_spacepar +src_55_abiutil_fcflags = -I$(top_builddir)/src/55_abiutil -I$(top_srcdir)/src/55_abiutil +src_56_io_mpi_fcflags = -I$(top_builddir)/src/56_io_mpi -I$(top_srcdir)/src/56_io_mpi +src_56_mixing_fcflags = -I$(top_builddir)/src/56_mixing -I$(top_srcdir)/src/56_mixing +src_56_recipspace_fcflags = -I$(top_builddir)/src/56_recipspace -I$(top_srcdir)/src/56_recipspace +src_56_xc_fcflags = -I$(top_builddir)/src/56_xc -I$(top_srcdir)/src/56_xc +src_57_iopsp_parser_fcflags = -I$(top_builddir)/src/57_iopsp_parser -I$(top_srcdir)/src/57_iopsp_parser +src_57_iovars_fcflags = -I$(top_builddir)/src/57_iovars -I$(top_srcdir)/src/57_iovars +src_61_occeig_fcflags = -I$(top_builddir)/src/61_occeig -I$(top_srcdir)/src/61_occeig +src_62_cg_noabirule_fcflags = -I$(top_builddir)/src/62_cg_noabirule -I$(top_srcdir)/src/62_cg_noabirule +src_62_ctqmc_fcflags = -I$(top_builddir)/src/62_ctqmc -I$(top_srcdir)/src/62_ctqmc +src_62_iowfdenpot_fcflags = -I$(top_builddir)/src/62_iowfdenpot -I$(top_srcdir)/src/62_iowfdenpot +src_62_poisson_fcflags = -I$(top_builddir)/src/62_poisson -I$(top_srcdir)/src/62_poisson +src_62_wvl_wfs_fcflags = -I$(top_builddir)/src/62_wvl_wfs -I$(top_srcdir)/src/62_wvl_wfs +src_64_psp_fcflags = -I$(top_builddir)/src/64_psp -I$(top_srcdir)/src/64_psp +src_65_lotf_base_fcflags = -I$(top_builddir)/src/65_lotf_base -I$(top_srcdir)/src/65_lotf_base +src_65_paw_fcflags = -I$(top_builddir)/src/65_paw -I$(top_srcdir)/src/65_paw +src_66_nonlocal_fcflags = -I$(top_builddir)/src/66_nonlocal -I$(top_srcdir)/src/66_nonlocal +src_66_vdwxc_fcflags = -I$(top_builddir)/src/66_vdwxc -I$(top_srcdir)/src/66_vdwxc +src_66_wfs_fcflags = -I$(top_builddir)/src/66_wfs -I$(top_srcdir)/src/66_wfs +src_67_common_fcflags = -I$(top_builddir)/src/67_common -I$(top_srcdir)/src/67_common +src_67_python_invocation_ext_fcflags = -I$(top_builddir)/src/67_python_invocation_ext -I$(top_srcdir)/src/67_python_invocation_ext +src_67_triqs_ext_fcflags = -I$(top_builddir)/src/67_triqs_ext -I$(top_srcdir)/src/67_triqs_ext +src_68_dmft_fcflags = -I$(top_builddir)/src/68_dmft -I$(top_srcdir)/src/68_dmft +src_68_lotf_fcflags = -I$(top_builddir)/src/68_lotf -I$(top_srcdir)/src/68_lotf +src_68_recursion_fcflags = -I$(top_builddir)/src/68_recursion -I$(top_srcdir)/src/68_recursion +src_68_rsprc_fcflags = -I$(top_builddir)/src/68_rsprc -I$(top_srcdir)/src/68_rsprc +src_69_wfdesc_fcflags = -I$(top_builddir)/src/69_wfdesc -I$(top_srcdir)/src/69_wfdesc +src_70_gw_fcflags = -I$(top_builddir)/src/70_gw -I$(top_srcdir)/src/70_gw +src_71_bse_fcflags = -I$(top_builddir)/src/71_bse -I$(top_srcdir)/src/71_bse +src_71_wannier_fcflags = -I$(top_builddir)/src/71_wannier -I$(top_srcdir)/src/71_wannier +src_72_response_fcflags = -I$(top_builddir)/src/72_response -I$(top_srcdir)/src/72_response +src_77_ddb_fcflags = -I$(top_builddir)/src/77_ddb -I$(top_srcdir)/src/77_ddb +src_77_suscep_fcflags = -I$(top_builddir)/src/77_suscep -I$(top_srcdir)/src/77_suscep +src_78_effpot_fcflags = -I$(top_builddir)/src/78_effpot -I$(top_srcdir)/src/78_effpot +src_78_eph_fcflags = -I$(top_builddir)/src/78_eph -I$(top_srcdir)/src/78_eph +src_79_seqpar_mpi_fcflags = -I$(top_builddir)/src/79_seqpar_mpi -I$(top_srcdir)/src/79_seqpar_mpi +src_80_rttddft_fcflags = -I$(top_builddir)/src/80_rttddft -I$(top_srcdir)/src/80_rttddft +src_80_tdep_fcflags = -I$(top_builddir)/src/80_tdep -I$(top_srcdir)/src/80_tdep +src_94_scfcv_fcflags = -I$(top_builddir)/src/94_scfcv -I$(top_srcdir)/src/94_scfcv +src_95_drive_fcflags = -I$(top_builddir)/src/95_drive -I$(top_srcdir)/src/95_drive +src_common_fcflags = -I$(top_builddir)/shared/common/src/incs -I$(top_srcdir)/shared/common/src/incs -I$(top_builddir)/shared/common/src/mods -I$(top_srcdir)/shared/common/src/mods +src_core_fcflags = -I$(top_builddir)/src/incs -I$(top_srcdir)/src/incs -I$(top_builddir)/src/mods -I$(top_srcdir)/src/mods +src_libpaw_fcflags = -I$(top_builddir)/shared/libpaw/incs -I$(top_srcdir)/shared/libpaw/incs -I$(top_builddir)/shared/libpaw/mods -I$(top_srcdir)/shared/libpaw/mods +srcdir = . +sysconfdir = ${prefix}/etc +target = x86_64-apple-darwin18.7.0 +target_alias = +target_cpu = x86_64 +target_os = darwin18.7.0 +target_vendor = apple +top_build_prefix = ../../../../ +top_builddir = ../../../.. +top_srcdir = ../../../.. +with_abinit_common = +with_bigdft = +with_config_file = +with_debug_flavor = +with_fallbacks = +with_fc_vendor = +with_fc_version = +with_fft_flavor = fftw3 +with_fftw3 = +with_gnu_ld = +with_gpu = +with_hdf5 = /opt/local +with_kokkos = +with_levmar = +with_libpaw = +with_libpsml = +with_libxc = /opt/local +with_libxml2 = +with_linalg_flavor = openblas +with_mpi = /opt/local +with_mpi_level = +with_netcdf = /opt/local +with_optim_flavor = +with_papi = +with_pfft = +with_triqs = +with_wannier90 = +with_xmlf90 = +with_yakl = +AM_CFLAGS = -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include +AM_CXXFLAGS = $(sd_triqs_cxxflags) +AM_FCFLAGS = -ffree-form -J../mods +AM_CPPFLAGS = \ + -I$(top_builddir)/shared/common/src/10_defs -I$(top_srcdir)/shared/common/src/10_defs \ + -I$(top_builddir)/shared/common/src/12_hide_mpi -I$(top_srcdir)/shared/common/src/12_hide_mpi \ + -I$(top_builddir)/shared/common/src/14_hidewrite -I$(top_srcdir)/shared/common/src/14_hidewrite \ + -I$(top_builddir)/shared/common/src/16_hideleave -I$(top_srcdir)/shared/common/src/16_hideleave \ + -I$(top_builddir)/shared/common/src/17_yaml_out -I$(top_srcdir)/shared/common/src/17_yaml_out \ + -I$(top_builddir)/shared/common/src/incs -I$(top_srcdir)/shared/common/src/incs -I$(top_builddir)/shared/common/src/mods -I$(top_srcdir)/shared/common/src/mods \ + -I$(top_builddir)/src/incs -I$(top_srcdir)/src/incs -I$(top_builddir)/src/mods -I$(top_srcdir)/src/mods \ + -I$(top_builddir)/shared/libpaw/incs -I$(top_srcdir)/shared/libpaw/incs -I$(top_builddir)/shared/libpaw/mods -I$(top_srcdir)/shared/libpaw/mods \ + -I/opt/local/include -I/opt/local/include \ + -I/opt/local/include \ + -I/opt/local/include \ + -I/opt/local/include \ + -I/opt/local/include \ + + + +# Regular source files +lib27_toolbox_oop_srcs = \ + m_copy.F90 \ + m_iterators.F90 \ + m_mpiotk.F90 \ + m_nctk.F90 + + +# Source files depending on conditionals + +# Library description +noinst_LIBRARIES = lib27_toolbox_oop.a +lib27_toolbox_oop_a_SOURCES = $(lib27_toolbox_oop_srcs) + +# Dependencies (inside the directory) of directory 27_toolbox_oop +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. +CLEANFILES = m_copy_cpp.f90 m_iterators_cpp.f90 m_mpiotk_cpp.f90 \ + m_nctk_cpp.f90 m_copy.$(MODEXT) m_iterators.$(MODEXT) \ + m_mpiotk.$(MODEXT) m_nctk.$(MODEXT) +EXTRA_DIST = abinit.src abinit.dep _27_toolbox_oop_ +all: all-am + +.SUFFIXES: +.SUFFIXES: .F90 .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu shared/common/src/27_toolbox_oop/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu shared/common/src/27_toolbox_oop/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) + +lib27_toolbox_oop.a: $(lib27_toolbox_oop_a_OBJECTS) $(lib27_toolbox_oop_a_DEPENDENCIES) $(EXTRA_lib27_toolbox_oop_a_DEPENDENCIES) + $(AM_V_at)-rm -f lib27_toolbox_oop.a + $(AM_V_AR)$(lib27_toolbox_oop_a_AR) lib27_toolbox_oop.a $(lib27_toolbox_oop_a_OBJECTS) $(lib27_toolbox_oop_a_LIBADD) + $(AM_V_at)$(RANLIB) lib27_toolbox_oop.a + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +.F90.o: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ $< + +.F90.obj: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-noinstLIBRARIES cscopelist-am ctags ctags-am distclean \ + distclean-compile distclean-generic distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am + +.PRECIOUS: Makefile + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/GX-PAW/common/src/27_toolbox_oop/Makefile.am b/GX-PAW/common/src/27_toolbox_oop/Makefile.am new file mode 100644 index 00000000..fb22363b --- /dev/null +++ b/GX-PAW/common/src/27_toolbox_oop/Makefile.am @@ -0,0 +1,70 @@ +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-corelibs on 2024/03/16 21:07:38 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-corelibs script or its config file instead. +# + +AM_CFLAGS = @ABI_CPPFLAGS@ +AM_CXXFLAGS = $(sd_triqs_cxxflags) +AM_FCFLAGS = @FPPFLAGS@ @FCFLAGS_FREEFORM@ @FCFLAGS_MODDIR@ @sd_sys_fcflags@ @fcflags_opt_27_toolbox_oop@ + +AM_CPPFLAGS = \ + @src_10_defs_fcflags@ \ + @src_12_hide_mpi_fcflags@ \ + @src_14_hidewrite_fcflags@ \ + @src_16_hideleave_fcflags@ \ + @src_17_yaml_out_fcflags@ \ + @src_common_fcflags@ \ + @src_core_fcflags@ \ + @src_libpaw_fcflags@ \ + @sd_hdf5_cppflags@ \ + @sd_netcdf_cppflags@ \ + @sd_netcdf_fcflags@ \ + @sd_netcdf_fortran_cppflags@ \ + @sd_netcdf_fortran_fcflags@ \ + @fc_mod_fcflags@ + +# Regular source files +lib27_toolbox_oop_srcs = \ + m_copy.F90 \ + m_iterators.F90 \ + m_mpiotk.F90 \ + m_nctk.F90 + +# Source files depending on conditionals + + +# Library description +noinst_LIBRARIES = lib27_toolbox_oop.a + +lib27_toolbox_oop_a_SOURCES= $(lib27_toolbox_oop_srcs) + +CLEANFILES = \ + m_copy_cpp.f90 \ + m_iterators_cpp.f90 \ + m_mpiotk_cpp.f90 \ + m_nctk_cpp.f90 + +EXTRA_DIST = abinit.src + +EXTRA_DIST += abinit.dep + +# Dependencies (inside the directory) of directory 27_toolbox_oop +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. + +CLEANFILES += \ + m_copy.$(MODEXT) \ + m_iterators.$(MODEXT) \ + m_mpiotk.$(MODEXT) \ + m_nctk.$(MODEXT) + + +EXTRA_DIST += _27_toolbox_oop_ diff --git a/GX-PAW/common/src/27_toolbox_oop/Makefile.in b/GX-PAW/common/src/27_toolbox_oop/Makefile.in new file mode 100644 index 00000000..8199ab27 --- /dev/null +++ b/GX-PAW/common/src/27_toolbox_oop/Makefile.in @@ -0,0 +1,1466 @@ +# Makefile.in generated by automake 1.16.3 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2020 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-corelibs on 2024/03/16 21:07:38 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-corelibs script or its config file instead. +# + +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = shared/common/src/27_toolbox_oop +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/m4/arch-gpu.m4 \ + $(top_srcdir)/config/m4/arch-mpi.m4 \ + $(top_srcdir)/config/m4/auto-autotools.m4 \ + $(top_srcdir)/config/m4/auto-corelibs.m4 \ + $(top_srcdir)/config/m4/auto-debug.m4 \ + $(top_srcdir)/config/m4/auto-dirflags.m4 \ + $(top_srcdir)/config/m4/auto-env.m4 \ + $(top_srcdir)/config/m4/auto-hints.m4 \ + $(top_srcdir)/config/m4/auto-optim.m4 \ + $(top_srcdir)/config/m4/auto-options.m4 \ + $(top_srcdir)/config/m4/auto-output.m4 \ + $(top_srcdir)/config/m4/auto-triggers.m4 \ + $(top_srcdir)/config/m4/conf-atompaw.m4 \ + $(top_srcdir)/config/m4/conf-debug.m4 \ + $(top_srcdir)/config/m4/conf-fallbacks.m4 \ + $(top_srcdir)/config/m4/conf-files.m4 \ + $(top_srcdir)/config/m4/conf-init.m4 \ + $(top_srcdir)/config/m4/conf-openmp.m4 \ + $(top_srcdir)/config/m4/conf-optim.m4 \ + $(top_srcdir)/config/m4/lang-c++.m4 \ + $(top_srcdir)/config/m4/lang-c.m4 \ + $(top_srcdir)/config/m4/lang-fortran-import.m4 \ + $(top_srcdir)/config/m4/lang-fortran.m4 \ + $(top_srcdir)/config/m4/lang-python.m4 \ + $(top_srcdir)/config/m4/libxml2.m4 \ + $(top_srcdir)/config/m4/misc-display.m4 \ + $(top_srcdir)/config/m4/sd_abinit_common.m4 \ + $(top_srcdir)/config/m4/sd_arch_gpu.m4 \ + $(top_srcdir)/config/m4/sd_arch_mpi.m4 \ + $(top_srcdir)/config/m4/sd_bigdft.m4 \ + $(top_srcdir)/config/m4/sd_core.m4 \ + $(top_srcdir)/config/m4/sd_esl.m4 \ + $(top_srcdir)/config/m4/sd_fftw3.m4 \ + $(top_srcdir)/config/m4/sd_gpu_kokkos.m4 \ + $(top_srcdir)/config/m4/sd_gpu_yakl.m4 \ + $(top_srcdir)/config/m4/sd_io_hdf5.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf_fortran.m4 \ + $(top_srcdir)/config/m4/sd_levmar.m4 \ + $(top_srcdir)/config/m4/sd_libpaw.m4 \ + $(top_srcdir)/config/m4/sd_libpsml.m4 \ + $(top_srcdir)/config/m4/sd_libxc.m4 \ + $(top_srcdir)/config/m4/sd_math_fft.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_core.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_util.m4 \ + $(top_srcdir)/config/m4/sd_papi.m4 \ + $(top_srcdir)/config/m4/sd_pfft.m4 \ + $(top_srcdir)/config/m4/sd_triqs.m4 \ + $(top_srcdir)/config/m4/sd_wannier90.m4 \ + $(top_srcdir)/config/m4/sd_xmlf90.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = +lib27_toolbox_oop_a_AR = $(AR) $(ARFLAGS) +lib27_toolbox_oop_a_LIBADD = +am__objects_1 = m_copy.$(OBJEXT) m_iterators.$(OBJEXT) \ + m_mpiotk.$(OBJEXT) m_nctk.$(OBJEXT) +am_lib27_toolbox_oop_a_OBJECTS = $(am__objects_1) +lib27_toolbox_oop_a_OBJECTS = $(am_lib27_toolbox_oop_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +PPFCCOMPILE = $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) +AM_V_PPFC = $(am__v_PPFC_@AM_V@) +am__v_PPFC_ = $(am__v_PPFC_@AM_DEFAULT_V@) +am__v_PPFC_0 = @echo " PPFC " $@; +am__v_PPFC_1 = +FCLD = $(FC) +FCLINK = $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \ + $@ +AM_V_FCLD = $(am__v_FCLD_@AM_V@) +am__v_FCLD_ = $(am__v_FCLD_@AM_DEFAULT_V@) +am__v_FCLD_0 = @echo " FCLD " $@; +am__v_FCLD_1 = +SOURCES = $(lib27_toolbox_oop_a_SOURCES) +DIST_SOURCES = $(lib27_toolbox_oop_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ABINIT_BINARY_PACKAGE = @ABINIT_BINARY_PACKAGE@ +ABINIT_COMMON_CPPFLAGS = @ABINIT_COMMON_CPPFLAGS@ +ABINIT_COMMON_FCFLAGS = @ABINIT_COMMON_FCFLAGS@ +ABINIT_COMMON_LDFLAGS = @ABINIT_COMMON_LDFLAGS@ +ABINIT_COMMON_LIBS = @ABINIT_COMMON_LIBS@ +ABINIT_TARGET = @ABINIT_TARGET@ +ABINIT_VERSION = @ABINIT_VERSION@ +ABINIT_VERSION_BASE = @ABINIT_VERSION_BASE@ +ABINIT_VERSION_BUILD = @ABINIT_VERSION_BUILD@ +ABINIT_VERSION_MAJOR = @ABINIT_VERSION_MAJOR@ +ABINIT_VERSION_MICRO = @ABINIT_VERSION_MICRO@ +ABINIT_VERSION_MINOR = @ABINIT_VERSION_MINOR@ +ABI_CPPFLAGS = @ABI_CPPFLAGS@ +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +ARFLAGS = @ARFLAGS@ +ARFLAGS_CMD = @ARFLAGS_CMD@ +ARFLAGS_DEBUG = @ARFLAGS_DEBUG@ +ARFLAGS_EXTRA = @ARFLAGS_EXTRA@ +ARFLAGS_HINTS = @ARFLAGS_HINTS@ +ARFLAGS_OPTIM = @ARFLAGS_OPTIM@ +ATOMPAW_BIN = @ATOMPAW_BIN@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BIGDFT_CPPFLAGS = @BIGDFT_CPPFLAGS@ +BIGDFT_FCFLAGS = @BIGDFT_FCFLAGS@ +BIGDFT_LDFLAGS = @BIGDFT_LDFLAGS@ +BIGDFT_LIBS = @BIGDFT_LIBS@ +BOURNE_SHELL = @BOURNE_SHELL@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CC_LDFLAGS = @CC_LDFLAGS@ +CC_LDFLAGS_DEBUG = @CC_LDFLAGS_DEBUG@ +CC_LDFLAGS_EXTRA = @CC_LDFLAGS_EXTRA@ +CC_LDFLAGS_GPU = @CC_LDFLAGS_GPU@ +CC_LDFLAGS_HINTS = @CC_LDFLAGS_HINTS@ +CC_LDFLAGS_OPTIM = @CC_LDFLAGS_OPTIM@ +CC_LIBS = @CC_LIBS@ +CC_LIBS_DEBUG = @CC_LIBS_DEBUG@ +CC_LIBS_EXTRA = @CC_LIBS_EXTRA@ +CC_LIBS_GPU = @CC_LIBS_GPU@ +CC_LIBS_HINTS = @CC_LIBS_HINTS@ +CC_LIBS_OPTIM = @CC_LIBS_OPTIM@ +CFLAGS = @CFLAGS@ +CFLAGS_DEBUG = @CFLAGS_DEBUG@ +CFLAGS_EXTRA = @CFLAGS_EXTRA@ +CFLAGS_GPU = @CFLAGS_GPU@ +CFLAGS_HINTS = @CFLAGS_HINTS@ +CFLAGS_OPTIM = @CFLAGS_OPTIM@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CPPFLAGS_DEBUG = @CPPFLAGS_DEBUG@ +CPPFLAGS_EXTRA = @CPPFLAGS_EXTRA@ +CPPFLAGS_GPU = @CPPFLAGS_GPU@ +CPPFLAGS_HINTS = @CPPFLAGS_HINTS@ +CPPFLAGS_HINTS_EXT = @CPPFLAGS_HINTS_EXT@ +CPPFLAGS_OPTIM = @CPPFLAGS_OPTIM@ +CXX = @CXX@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CXXFLAGS_DEBUG = @CXXFLAGS_DEBUG@ +CXXFLAGS_EXTRA = @CXXFLAGS_EXTRA@ +CXXFLAGS_GPU = @CXXFLAGS_GPU@ +CXXFLAGS_HINTS = @CXXFLAGS_HINTS@ +CXXFLAGS_OPTIM = @CXXFLAGS_OPTIM@ +CXX_LDFLAGS = @CXX_LDFLAGS@ +CXX_LDFLAGS_DEBUG = @CXX_LDFLAGS_DEBUG@ +CXX_LDFLAGS_EXTRA = @CXX_LDFLAGS_EXTRA@ +CXX_LDFLAGS_GPU = @CXX_LDFLAGS_GPU@ +CXX_LDFLAGS_HINTS = @CXX_LDFLAGS_HINTS@ +CXX_LDFLAGS_OPTIM = @CXX_LDFLAGS_OPTIM@ +CXX_LIBS = @CXX_LIBS@ +CXX_LIBS_DEBUG = @CXX_LIBS_DEBUG@ +CXX_LIBS_EXTRA = @CXX_LIBS_EXTRA@ +CXX_LIBS_GPU = @CXX_LIBS_GPU@ +CXX_LIBS_HINTS = @CXX_LIBS_HINTS@ +CXX_LIBS_OPTIM = @CXX_LIBS_OPTIM@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ +FCFLAGS = @FCFLAGS@ +FCFLAGS_DEBUG = @FCFLAGS_DEBUG@ +FCFLAGS_EXTRA = @FCFLAGS_EXTRA@ +FCFLAGS_F90 = @FCFLAGS_F90@ +FCFLAGS_FIXEDFORM = @FCFLAGS_FIXEDFORM@ +FCFLAGS_FREEFORM = @FCFLAGS_FREEFORM@ +FCFLAGS_HINTS = @FCFLAGS_HINTS@ +FCFLAGS_MODDIR = @FCFLAGS_MODDIR@ +FCFLAGS_OPENMP = @FCFLAGS_OPENMP@ +FCFLAGS_OPENMP_OFFLOAD = @FCFLAGS_OPENMP_OFFLOAD@ +FCFLAGS_OPTIM = @FCFLAGS_OPTIM@ +FCLIBS = @FCLIBS@ +FC_LDFLAGS = @FC_LDFLAGS@ +FC_LDFLAGS_DEBUG = @FC_LDFLAGS_DEBUG@ +FC_LDFLAGS_EXTRA = @FC_LDFLAGS_EXTRA@ +FC_LDFLAGS_HINTS = @FC_LDFLAGS_HINTS@ +FC_LDFLAGS_OPTIM = @FC_LDFLAGS_OPTIM@ +FC_LIBS = @FC_LIBS@ +FC_LIBS_DEBUG = @FC_LIBS_DEBUG@ +FC_LIBS_EXTRA = @FC_LIBS_EXTRA@ +FC_LIBS_HINTS = @FC_LIBS_HINTS@ +FC_LIBS_OPTIM = @FC_LIBS_OPTIM@ +FC_NOWRAP = @FC_NOWRAP@ +FFLAGS = @FFLAGS@ +FFTW3_CFLAGS = @FFTW3_CFLAGS@ +FFTW3_CPPFLAGS = @FFTW3_CPPFLAGS@ +FFTW3_FCFLAGS = @FFTW3_FCFLAGS@ +FFTW3_LDFLAGS = @FFTW3_LDFLAGS@ +FFTW3_LIBS = @FFTW3_LIBS@ +FFT_CFLAGS = @FFT_CFLAGS@ +FFT_FCFLAGS = @FFT_FCFLAGS@ +FPP = @FPP@ +FPPFLAGS = @FPPFLAGS@ +FPPFLAGS_DEBUG = @FPPFLAGS_DEBUG@ +FPPFLAGS_EXTRA = @FPPFLAGS_EXTRA@ +FPPFLAGS_HINTS = @FPPFLAGS_HINTS@ +FPPFLAGS_OPTIM = @FPPFLAGS_OPTIM@ +GPU_ARCH = @GPU_ARCH@ +GPU_CFLAGS = @GPU_CFLAGS@ +GPU_CPPFLAGS = @GPU_CPPFLAGS@ +GPU_CXXFLAGS = @GPU_CXXFLAGS@ +GPU_FCFLAGS = @GPU_FCFLAGS@ +GPU_LDFLAGS = @GPU_LDFLAGS@ +GPU_LIBS = @GPU_LIBS@ +GRAPHATOM_BIN = @GRAPHATOM_BIN@ +GREP = @GREP@ +H5CC = @H5CC@ +HDF5_CFLAGS = @HDF5_CFLAGS@ +HDF5_CPPFLAGS = @HDF5_CPPFLAGS@ +HDF5_CXXFLAGS = @HDF5_CXXFLAGS@ +HDF5_FCFLAGS = @HDF5_FCFLAGS@ +HDF5_LDFLAGS = @HDF5_LDFLAGS@ +HDF5_LIBS = @HDF5_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +LDFLAGS = @LDFLAGS@ +LEVMAR_CFLAGS = @LEVMAR_CFLAGS@ +LEVMAR_CPPFLAGS = @LEVMAR_CPPFLAGS@ +LEVMAR_LDFLAGS = @LEVMAR_LDFLAGS@ +LEVMAR_LIBS = @LEVMAR_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPAW_CPPFLAGS = @LIBPAW_CPPFLAGS@ +LIBPAW_FCFLAGS = @LIBPAW_FCFLAGS@ +LIBPAW_LDFLAGS = @LIBPAW_LDFLAGS@ +LIBPAW_LIBS = @LIBPAW_LIBS@ +LIBPSML_CPPFLAGS = @LIBPSML_CPPFLAGS@ +LIBPSML_FCFLAGS = @LIBPSML_FCFLAGS@ +LIBPSML_LDFLAGS = @LIBPSML_LDFLAGS@ +LIBPSML_LIBS = @LIBPSML_LIBS@ +LIBS = @LIBS@ +LIBXC_CFLAGS = @LIBXC_CFLAGS@ +LIBXC_CPPFLAGS = @LIBXC_CPPFLAGS@ +LIBXC_FCFLAGS = @LIBXC_FCFLAGS@ +LIBXC_LDFLAGS = @LIBXC_LDFLAGS@ +LIBXC_LIBS = @LIBXC_LIBS@ +LIBXML2_CPPFLAGS = @LIBXML2_CPPFLAGS@ +LIBXML2_FCFLAGS = @LIBXML2_FCFLAGS@ +LIBXML2_LIBS = @LIBXML2_LIBS@ +LINALG_CFLAGS = @LINALG_CFLAGS@ +LINALG_CPPFLAGS = @LINALG_CPPFLAGS@ +LINALG_CXXFLAGS = @LINALG_CXXFLAGS@ +LINALG_FCFLAGS = @LINALG_FCFLAGS@ +LINALG_LDFLAGS = @LINALG_LDFLAGS@ +LINALG_LIBS = @LINALG_LIBS@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODEXT = @MODEXT@ +MPI_CFLAGS = @MPI_CFLAGS@ +MPI_CPPFLAGS = @MPI_CPPFLAGS@ +MPI_CXXFLAGS = @MPI_CXXFLAGS@ +MPI_FCFLAGS = @MPI_FCFLAGS@ +MPI_LDFLAGS = @MPI_LDFLAGS@ +MPI_LIBS = @MPI_LIBS@ +MV = @MV@ +NETCDF_CFLAGS = @NETCDF_CFLAGS@ +NETCDF_CPPFLAGS = @NETCDF_CPPFLAGS@ +NETCDF_CXXFLAGS = @NETCDF_CXXFLAGS@ +NETCDF_FCFLAGS = @NETCDF_FCFLAGS@ +NETCDF_FORTRAN_CFLAGS = @NETCDF_FORTRAN_CFLAGS@ +NETCDF_FORTRAN_CPPFLAGS = @NETCDF_FORTRAN_CPPFLAGS@ +NETCDF_FORTRAN_CXXFLAGS = @NETCDF_FORTRAN_CXXFLAGS@ +NETCDF_FORTRAN_FCFLAGS = @NETCDF_FORTRAN_FCFLAGS@ +NETCDF_FORTRAN_LDFLAGS = @NETCDF_FORTRAN_LDFLAGS@ +NETCDF_FORTRAN_LIBS = @NETCDF_FORTRAN_LIBS@ +NETCDF_LDFLAGS = @NETCDF_LDFLAGS@ +NETCDF_LIBS = @NETCDF_LIBS@ +NVCC = @NVCC@ +NVCC_CFLAGS = @NVCC_CFLAGS@ +NVCC_CPPFLAGS = @NVCC_CPPFLAGS@ +NVCC_LDFLAGS = @NVCC_LDFLAGS@ +NVCC_LIBS = @NVCC_LIBS@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PAPI_CFLAGS = @PAPI_CFLAGS@ +PAPI_CPPFLAGS = @PAPI_CPPFLAGS@ +PAPI_LDFLAGS = @PAPI_LDFLAGS@ +PAPI_LIBS = @PAPI_LIBS@ +PATCH = @PATCH@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PFFT_CFLAGS = @PFFT_CFLAGS@ +PFFT_CPPFLAGS = @PFFT_CPPFLAGS@ +PFFT_LDFLAGS = @PFFT_LDFLAGS@ +PFFT_LIBS = @PFFT_LIBS@ +PYFLAGS = @PYFLAGS@ +PYTHON = @PYTHON@ +PYTHON_CONFIG = @PYTHON_CONFIG@ +PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ +RANLIB = @RANLIB@ +REALPATH = @REALPATH@ +RM = @RM@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +TAR = @TAR@ +TRIQS_CFLAGS = @TRIQS_CFLAGS@ +TRIQS_CPPFLAGS = @TRIQS_CPPFLAGS@ +TRIQS_CXXFLAGS = @TRIQS_CXXFLAGS@ +TRIQS_LDFLAGS = @TRIQS_LDFLAGS@ +TRIQS_LIBS = @TRIQS_LIBS@ +TRUE_CPP = @TRUE_CPP@ +VERSION = @VERSION@ +WANNIER90_CPPFLAGS = @WANNIER90_CPPFLAGS@ +WANNIER90_FCFLAGS = @WANNIER90_FCFLAGS@ +WANNIER90_LDFLAGS = @WANNIER90_LDFLAGS@ +WANNIER90_LIBS = @WANNIER90_LIBS@ +XML2_CONFIG = @XML2_CONFIG@ +XMLF90_CPPFLAGS = @XMLF90_CPPFLAGS@ +XMLF90_FCFLAGS = @XMLF90_FCFLAGS@ +XMLF90_LDFLAGS = @XMLF90_LDFLAGS@ +XMLF90_LIBS = @XMLF90_LIBS@ +XML_CPPFLAGS = @XML_CPPFLAGS@ +XML_LIBS = @XML_LIBS@ +XPP = @XPP@ +XPPFLAGS = @XPPFLAGS@ +XPPFLAGS_DEBUG = @XPPFLAGS_DEBUG@ +XPPFLAGS_EXTRA = @XPPFLAGS_EXTRA@ +XPPFLAGS_OPTIM = @XPPFLAGS_OPTIM@ +YAKL_CPPFLAGS = @YAKL_CPPFLAGS@ +YAKL_FCFLAGS = @YAKL_FCFLAGS@ +YAKL_LDFLAGS = @YAKL_LDFLAGS@ +YAKL_LIBS = @YAKL_LIBS@ +abi_ac_distcheck = @abi_ac_distcheck@ +abi_ac_version = @abi_ac_version@ +abi_am_version = @abi_am_version@ +abi_avx_safe_mode_enable = @abi_avx_safe_mode_enable@ +abi_bse_unpacked_enable = @abi_bse_unpacked_enable@ +abi_cc_path = @abi_cc_path@ +abi_cc_vendor = @abi_cc_vendor@ +abi_cc_version = @abi_cc_version@ +abi_cclock_enable = @abi_cclock_enable@ +abi_cpp_path = @abi_cpp_path@ +abi_cpu_64bits = @abi_cpu_64bits@ +abi_cpu_bits = @abi_cpu_bits@ +abi_cpu_model = @abi_cpu_model@ +abi_cpu_platform = @abi_cpu_platform@ +abi_cpu_spec = @abi_cpu_spec@ +abi_cpu_vendor = @abi_cpu_vendor@ +abi_crpa_optim_enable = @abi_crpa_optim_enable@ +abi_cxx_path = @abi_cxx_path@ +abi_cxx_vendor = @abi_cxx_vendor@ +abi_cxx_version = @abi_cxx_version@ +abi_debug_flavor = @abi_debug_flavor@ +abi_exports_enable = @abi_exports_enable@ +abi_fbk_abinit_common_ok = @abi_fbk_abinit_common_ok@ +abi_fbk_bigdft_ok = @abi_fbk_bigdft_ok@ +abi_fbk_config = @abi_fbk_config@ +abi_fbk_enable = @abi_fbk_enable@ +abi_fbk_fft_ok = @abi_fbk_fft_ok@ +abi_fbk_fftw3_ok = @abi_fbk_fftw3_ok@ +abi_fbk_gpu_ok = @abi_fbk_gpu_ok@ +abi_fbk_hdf5_ok = @abi_fbk_hdf5_ok@ +abi_fbk_init = @abi_fbk_init@ +abi_fbk_kokkos_ok = @abi_fbk_kokkos_ok@ +abi_fbk_levmar_ok = @abi_fbk_levmar_ok@ +abi_fbk_libpaw_ok = @abi_fbk_libpaw_ok@ +abi_fbk_libpsml_ok = @abi_fbk_libpsml_ok@ +abi_fbk_libxc_ok = @abi_fbk_libxc_ok@ +abi_fbk_libxml2_ok = @abi_fbk_libxml2_ok@ +abi_fbk_linalg_ok = @abi_fbk_linalg_ok@ +abi_fbk_list = @abi_fbk_list@ +abi_fbk_mpi_ok = @abi_fbk_mpi_ok@ +abi_fbk_netcdf_fortran_ok = @abi_fbk_netcdf_fortran_ok@ +abi_fbk_netcdf_ok = @abi_fbk_netcdf_ok@ +abi_fbk_papi_ok = @abi_fbk_papi_ok@ +abi_fbk_pfft_ok = @abi_fbk_pfft_ok@ +abi_fbk_prefix = @abi_fbk_prefix@ +abi_fbk_required = @abi_fbk_required@ +abi_fbk_triqs_ok = @abi_fbk_triqs_ok@ +abi_fbk_wannier90_ok = @abi_fbk_wannier90_ok@ +abi_fbk_xmlf90_ok = @abi_fbk_xmlf90_ok@ +abi_fbk_yakl_ok = @abi_fbk_yakl_ok@ +abi_fc_path = @abi_fc_path@ +abi_fc_vendor = @abi_fc_vendor@ +abi_fc_version = @abi_fc_version@ +abi_fc_wrap = @abi_fc_wrap@ +abi_fc_wrapper_enable = @abi_fc_wrapper_enable@ +abi_fpp_path = @abi_fpp_path@ +abi_gpu_arch = @abi_gpu_arch@ +abi_gpu_fcflags = @abi_gpu_fcflags@ +abi_gpu_flavor = @abi_gpu_flavor@ +abi_gpu_hip_libdir = @abi_gpu_hip_libdir@ +abi_gpu_incs = @abi_gpu_incs@ +abi_gpu_ldflags = @abi_gpu_ldflags@ +abi_gpu_libs = @abi_gpu_libs@ +abi_gpu_nvtx_v3 = @abi_gpu_nvtx_v3@ +abi_gpu_roctx = @abi_gpu_roctx@ +abi_gw_dpc_enable = @abi_gw_dpc_enable@ +abi_hints_enable = @abi_hints_enable@ +abi_libtetra_enable = @abi_libtetra_enable@ +abi_libxml2_cppflags = @abi_libxml2_cppflags@ +abi_libxml2_enable = @abi_libxml2_enable@ +abi_libxml2_fcflags = @abi_libxml2_fcflags@ +abi_libxml2_init = @abi_libxml2_init@ +abi_libxml2_ldflags = @abi_libxml2_ldflags@ +abi_libxml2_libs = @abi_libxml2_libs@ +abi_libxml2_ok = @abi_libxml2_ok@ +abi_libxml2_prefix = @abi_libxml2_prefix@ +abi_lotf_enable = @abi_lotf_enable@ +abi_lt_version = @abi_lt_version@ +abi_m4_version = @abi_m4_version@ +abi_memory_profiling_enable = @abi_memory_profiling_enable@ +abi_mpi_cflags = @abi_mpi_cflags@ +abi_mpi_cppflags = @abi_mpi_cppflags@ +abi_mpi_cxxflags = @abi_mpi_cxxflags@ +abi_mpi_enable = @abi_mpi_enable@ +abi_mpi_fcflags = @abi_mpi_fcflags@ +abi_mpi_flavor = @abi_mpi_flavor@ +abi_mpi_gpu_aware_enable = @abi_mpi_gpu_aware_enable@ +abi_mpi_incs = @abi_mpi_incs@ +abi_mpi_inplace_enable = @abi_mpi_inplace_enable@ +abi_mpi_interfaces_bugfix_enable = @abi_mpi_interfaces_bugfix_enable@ +abi_mpi_io_default_enable = @abi_mpi_io_default_enable@ +abi_mpi_io_enable = @abi_mpi_io_enable@ +abi_mpi_ldflags = @abi_mpi_ldflags@ +abi_mpi_level = @abi_mpi_level@ +abi_mpi_libs = @abi_mpi_libs@ +abi_netcdf_default_enable = @abi_netcdf_default_enable@ +abi_openmp_enable = @abi_openmp_enable@ +abi_openmp_offload_enable = @abi_openmp_offload_enable@ +abi_optim_flavor = @abi_optim_flavor@ +abi_python_invocation_enable = @abi_python_invocation_enable@ +abi_source_debug_enable = @abi_source_debug_enable@ +abi_stdin_enable = @abi_stdin_enable@ +abi_sys_spec = @abi_sys_spec@ +abi_timer_enable = @abi_timer_enable@ +abi_triqs_v1_4_enable = @abi_triqs_v1_4_enable@ +abi_triqs_v2_0_enable = @abi_triqs_v2_0_enable@ +abi_zdot_bugfix_enable = @abi_zdot_bugfix_enable@ +abinit_bindir = @abinit_bindir@ +abinit_builddir = @abinit_builddir@ +abinit_chkdir = @abinit_chkdir@ +abinit_datdir = @abinit_datdir@ +abinit_docdir = @abinit_docdir@ +abinit_incdir = @abinit_incdir@ +abinit_libdir = @abinit_libdir@ +abinit_mandir = @abinit_mandir@ +abinit_prefix = @abinit_prefix@ +abinit_srcdir = @abinit_srcdir@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_FC = @ac_ct_FC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cc_info_string = @cc_info_string@ +cxx_info_string = @cxx_info_string@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +enable_avx_safe_mode = @enable_avx_safe_mode@ +enable_bse_unpacked = @enable_bse_unpacked@ +enable_cclock = @enable_cclock@ +enable_crpa_optim = @enable_crpa_optim@ +enable_exports = @enable_exports@ +enable_fc_wrapper = @enable_fc_wrapper@ +enable_gw_dpc = @enable_gw_dpc@ +enable_hints = @enable_hints@ +enable_libtetra = @enable_libtetra@ +enable_lotf = @enable_lotf@ +enable_memory_profiling = @enable_memory_profiling@ +enable_mpi_gpu_aware = @enable_mpi_gpu_aware@ +enable_mpi_inplace = @enable_mpi_inplace@ +enable_mpi_interfaces_bugfix = @enable_mpi_interfaces_bugfix@ +enable_mpi_io = @enable_mpi_io@ +enable_mpi_io_default = @enable_mpi_io_default@ +enable_netcdf_default = @enable_netcdf_default@ +enable_openmp = @enable_openmp@ +enable_openmp_offload = @enable_openmp_offload@ +enable_python_invocation = @enable_python_invocation@ +enable_shared = @enable_shared@ +enable_source_debug = @enable_source_debug@ +enable_static = @enable_static@ +enable_stdin = @enable_stdin@ +enable_timer = @enable_timer@ +enable_triqs_v1_4 = @enable_triqs_v1_4@ +enable_triqs_v2_0 = @enable_triqs_v2_0@ +enable_zdot_bugfix = @enable_zdot_bugfix@ +exec_prefix = @exec_prefix@ +fc_info_string = @fc_info_string@ +fc_mod_fcflags = @fc_mod_fcflags@ +fc_timing = @fc_timing@ +fcflags_opt_02_clib = @fcflags_opt_02_clib@ +fcflags_opt_10_defs = @fcflags_opt_10_defs@ +fcflags_opt_11_memory_mpi = @fcflags_opt_11_memory_mpi@ +fcflags_opt_12_hide_mpi = @fcflags_opt_12_hide_mpi@ +fcflags_opt_14_hidewrite = @fcflags_opt_14_hidewrite@ +fcflags_opt_16_hideleave = @fcflags_opt_16_hideleave@ +fcflags_opt_16_kokkos_toolbox = @fcflags_opt_16_kokkos_toolbox@ +fcflags_opt_17_gpu_toolbox = @fcflags_opt_17_gpu_toolbox@ +fcflags_opt_17_libtetra_ext = @fcflags_opt_17_libtetra_ext@ +fcflags_opt_17_minimax = @fcflags_opt_17_minimax@ +fcflags_opt_17_yaml_out = @fcflags_opt_17_yaml_out@ +fcflags_opt_18_timing = @fcflags_opt_18_timing@ +fcflags_opt_21_hashfuncs = @fcflags_opt_21_hashfuncs@ +fcflags_opt_27_toolbox_oop = @fcflags_opt_27_toolbox_oop@ +fcflags_opt_28_numeric_noabirule = @fcflags_opt_28_numeric_noabirule@ +fcflags_opt_29_kpoints = @fcflags_opt_29_kpoints@ +fcflags_opt_32_util = @fcflags_opt_32_util@ +fcflags_opt_33_xc_lowlevel = @fcflags_opt_33_xc_lowlevel@ +fcflags_opt_39_libpaw = @fcflags_opt_39_libpaw@ +fcflags_opt_41_geometry = @fcflags_opt_41_geometry@ +fcflags_opt_42_nlstrain = @fcflags_opt_42_nlstrain@ +fcflags_opt_42_parser = @fcflags_opt_42_parser@ +fcflags_opt_43_ptgroups = @fcflags_opt_43_ptgroups@ +fcflags_opt_43_wvl_wrappers = @fcflags_opt_43_wvl_wrappers@ +fcflags_opt_44_abitools = @fcflags_opt_44_abitools@ +fcflags_opt_44_abitypes_defs = @fcflags_opt_44_abitypes_defs@ +fcflags_opt_44_manage_kokkos = @fcflags_opt_44_manage_kokkos@ +fcflags_opt_45_geomoptim = @fcflags_opt_45_geomoptim@ +fcflags_opt_45_xgTools = @fcflags_opt_45_xgTools@ +fcflags_opt_46_ghc_omp = @fcflags_opt_46_ghc_omp@ +fcflags_opt_46_manage_cuda = @fcflags_opt_46_manage_cuda@ +fcflags_opt_48_diago = @fcflags_opt_48_diago@ +fcflags_opt_49_gw_toolbox_oop = @fcflags_opt_49_gw_toolbox_oop@ +fcflags_opt_51_manage_mpi = @fcflags_opt_51_manage_mpi@ +fcflags_opt_52_fft_mpi_noabirule = @fcflags_opt_52_fft_mpi_noabirule@ +fcflags_opt_53_ffts = @fcflags_opt_53_ffts@ +fcflags_opt_54_spacepar = @fcflags_opt_54_spacepar@ +fcflags_opt_55_abiutil = @fcflags_opt_55_abiutil@ +fcflags_opt_56_io_mpi = @fcflags_opt_56_io_mpi@ +fcflags_opt_56_mixing = @fcflags_opt_56_mixing@ +fcflags_opt_56_recipspace = @fcflags_opt_56_recipspace@ +fcflags_opt_56_xc = @fcflags_opt_56_xc@ +fcflags_opt_57_iopsp_parser = @fcflags_opt_57_iopsp_parser@ +fcflags_opt_57_iovars = @fcflags_opt_57_iovars@ +fcflags_opt_61_occeig = @fcflags_opt_61_occeig@ +fcflags_opt_62_cg_noabirule = @fcflags_opt_62_cg_noabirule@ +fcflags_opt_62_ctqmc = @fcflags_opt_62_ctqmc@ +fcflags_opt_62_iowfdenpot = @fcflags_opt_62_iowfdenpot@ +fcflags_opt_62_poisson = @fcflags_opt_62_poisson@ +fcflags_opt_62_wvl_wfs = @fcflags_opt_62_wvl_wfs@ +fcflags_opt_64_psp = @fcflags_opt_64_psp@ +fcflags_opt_65_lotf_base = @fcflags_opt_65_lotf_base@ +fcflags_opt_65_paw = @fcflags_opt_65_paw@ +fcflags_opt_66_nonlocal = @fcflags_opt_66_nonlocal@ +fcflags_opt_66_vdwxc = @fcflags_opt_66_vdwxc@ +fcflags_opt_66_wfs = @fcflags_opt_66_wfs@ +fcflags_opt_67_common = @fcflags_opt_67_common@ +fcflags_opt_67_python_invocation_ext = @fcflags_opt_67_python_invocation_ext@ +fcflags_opt_67_triqs_ext = @fcflags_opt_67_triqs_ext@ +fcflags_opt_68_dmft = @fcflags_opt_68_dmft@ +fcflags_opt_68_lotf = @fcflags_opt_68_lotf@ +fcflags_opt_68_recursion = @fcflags_opt_68_recursion@ +fcflags_opt_68_rsprc = @fcflags_opt_68_rsprc@ +fcflags_opt_69_wfdesc = @fcflags_opt_69_wfdesc@ +fcflags_opt_70_gw = @fcflags_opt_70_gw@ +fcflags_opt_71_bse = @fcflags_opt_71_bse@ +fcflags_opt_71_wannier = @fcflags_opt_71_wannier@ +fcflags_opt_72_response = @fcflags_opt_72_response@ +fcflags_opt_77_ddb = @fcflags_opt_77_ddb@ +fcflags_opt_77_suscep = @fcflags_opt_77_suscep@ +fcflags_opt_78_effpot = @fcflags_opt_78_effpot@ +fcflags_opt_78_eph = @fcflags_opt_78_eph@ +fcflags_opt_79_seqpar_mpi = @fcflags_opt_79_seqpar_mpi@ +fcflags_opt_80_rttddft = @fcflags_opt_80_rttddft@ +fcflags_opt_80_tdep = @fcflags_opt_80_tdep@ +fcflags_opt_94_scfcv = @fcflags_opt_94_scfcv@ +fcflags_opt_95_drive = @fcflags_opt_95_drive@ +fcflags_opt_98_main = @fcflags_opt_98_main@ +fcflags_opt_bigdft = @fcflags_opt_bigdft@ +fcflags_opt_default = @fcflags_opt_default@ +fcflags_opt_hdf5 = @fcflags_opt_hdf5@ +fcflags_opt_levmar = @fcflags_opt_levmar@ +fcflags_opt_libpsml = @fcflags_opt_libpsml@ +fcflags_opt_libxc = @fcflags_opt_libxc@ +fcflags_opt_libxml2 = @fcflags_opt_libxml2@ +fcflags_opt_linalg = @fcflags_opt_linalg@ +fcflags_opt_netcdf = @fcflags_opt_netcdf@ +fcflags_opt_netcdf_fortran = @fcflags_opt_netcdf_fortran@ +fcflags_opt_papi = @fcflags_opt_papi@ +fcflags_opt_triqs = @fcflags_opt_triqs@ +fcflags_opt_wannier90 = @fcflags_opt_wannier90@ +fcflags_opt_xmlf90 = @fcflags_opt_xmlf90@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sd_abinit_common_cppflags = @sd_abinit_common_cppflags@ +sd_abinit_common_enable = @sd_abinit_common_enable@ +sd_abinit_common_enable_def = @sd_abinit_common_enable_def@ +sd_abinit_common_fcflags = @sd_abinit_common_fcflags@ +sd_abinit_common_init = @sd_abinit_common_init@ +sd_abinit_common_ldflags = @sd_abinit_common_ldflags@ +sd_abinit_common_libs = @sd_abinit_common_libs@ +sd_abinit_common_ok = @sd_abinit_common_ok@ +sd_abinit_common_options = @sd_abinit_common_options@ +sd_abinit_common_policy = @sd_abinit_common_policy@ +sd_abinit_common_status = @sd_abinit_common_status@ +sd_bigdft_cppflags = @sd_bigdft_cppflags@ +sd_bigdft_enable = @sd_bigdft_enable@ +sd_bigdft_enable_def = @sd_bigdft_enable_def@ +sd_bigdft_fcflags = @sd_bigdft_fcflags@ +sd_bigdft_init = @sd_bigdft_init@ +sd_bigdft_ldflags = @sd_bigdft_ldflags@ +sd_bigdft_libs = @sd_bigdft_libs@ +sd_bigdft_ok = @sd_bigdft_ok@ +sd_bigdft_options = @sd_bigdft_options@ +sd_bigdft_policy = @sd_bigdft_policy@ +sd_bigdft_status = @sd_bigdft_status@ +sd_fft_cflags = @sd_fft_cflags@ +sd_fft_choices = @sd_fft_choices@ +sd_fft_cppflags = @sd_fft_cppflags@ +sd_fft_cxxflags = @sd_fft_cxxflags@ +sd_fft_enable = @sd_fft_enable@ +sd_fft_fcflags = @sd_fft_fcflags@ +sd_fft_flavor = @sd_fft_flavor@ +sd_fft_init = @sd_fft_init@ +sd_fft_ldflags = @sd_fft_ldflags@ +sd_fft_libs = @sd_fft_libs@ +sd_fft_ok = @sd_fft_ok@ +sd_fftw3_cflags = @sd_fftw3_cflags@ +sd_fftw3_cppflags = @sd_fftw3_cppflags@ +sd_fftw3_enable = @sd_fftw3_enable@ +sd_fftw3_enable_def = @sd_fftw3_enable_def@ +sd_fftw3_fcflags = @sd_fftw3_fcflags@ +sd_fftw3_init = @sd_fftw3_init@ +sd_fftw3_ldflags = @sd_fftw3_ldflags@ +sd_fftw3_libs = @sd_fftw3_libs@ +sd_fftw3_ok = @sd_fftw3_ok@ +sd_fftw3_options = @sd_fftw3_options@ +sd_fftw3_policy = @sd_fftw3_policy@ +sd_fftw3_status = @sd_fftw3_status@ +sd_gpu_cflags = @sd_gpu_cflags@ +sd_gpu_cppflags = @sd_gpu_cppflags@ +sd_gpu_cxxflags = @sd_gpu_cxxflags@ +sd_gpu_enable = @sd_gpu_enable@ +sd_gpu_enable_def = @sd_gpu_enable_def@ +sd_gpu_fcflags = @sd_gpu_fcflags@ +sd_gpu_init = @sd_gpu_init@ +sd_gpu_ldflags = @sd_gpu_ldflags@ +sd_gpu_libs = @sd_gpu_libs@ +sd_gpu_ok = @sd_gpu_ok@ +sd_gpu_options = @sd_gpu_options@ +sd_gpu_policy = @sd_gpu_policy@ +sd_gpu_prefix = @sd_gpu_prefix@ +sd_gpu_status = @sd_gpu_status@ +sd_hdf5_cflags = @sd_hdf5_cflags@ +sd_hdf5_cppflags = @sd_hdf5_cppflags@ +sd_hdf5_cxxflags = @sd_hdf5_cxxflags@ +sd_hdf5_enable = @sd_hdf5_enable@ +sd_hdf5_enable_def = @sd_hdf5_enable_def@ +sd_hdf5_enable_fc = @sd_hdf5_enable_fc@ +sd_hdf5_fcflags = @sd_hdf5_fcflags@ +sd_hdf5_h5cc = @sd_hdf5_h5cc@ +sd_hdf5_h5fc = @sd_hdf5_h5fc@ +sd_hdf5_init = @sd_hdf5_init@ +sd_hdf5_ldflags = @sd_hdf5_ldflags@ +sd_hdf5_libs = @sd_hdf5_libs@ +sd_hdf5_ok = @sd_hdf5_ok@ +sd_hdf5_options = @sd_hdf5_options@ +sd_hdf5_policy = @sd_hdf5_policy@ +sd_hdf5_status = @sd_hdf5_status@ +sd_kokkos_cppflags = @sd_kokkos_cppflags@ +sd_kokkos_cxxflags = @sd_kokkos_cxxflags@ +sd_kokkos_enable = @sd_kokkos_enable@ +sd_kokkos_enable_def = @sd_kokkos_enable_def@ +sd_kokkos_init = @sd_kokkos_init@ +sd_kokkos_ldflags = @sd_kokkos_ldflags@ +sd_kokkos_libs = @sd_kokkos_libs@ +sd_kokkos_ok = @sd_kokkos_ok@ +sd_kokkos_options = @sd_kokkos_options@ +sd_kokkos_policy = @sd_kokkos_policy@ +sd_kokkos_status = @sd_kokkos_status@ +sd_levmar_cflags = @sd_levmar_cflags@ +sd_levmar_cppflags = @sd_levmar_cppflags@ +sd_levmar_enable = @sd_levmar_enable@ +sd_levmar_enable_def = @sd_levmar_enable_def@ +sd_levmar_init = @sd_levmar_init@ +sd_levmar_ldflags = @sd_levmar_ldflags@ +sd_levmar_libs = @sd_levmar_libs@ +sd_levmar_ok = @sd_levmar_ok@ +sd_levmar_options = @sd_levmar_options@ +sd_levmar_policy = @sd_levmar_policy@ +sd_levmar_status = @sd_levmar_status@ +sd_libpaw_cppflags = @sd_libpaw_cppflags@ +sd_libpaw_enable = @sd_libpaw_enable@ +sd_libpaw_enable_def = @sd_libpaw_enable_def@ +sd_libpaw_fcflags = @sd_libpaw_fcflags@ +sd_libpaw_init = @sd_libpaw_init@ +sd_libpaw_ldflags = @sd_libpaw_ldflags@ +sd_libpaw_libs = @sd_libpaw_libs@ +sd_libpaw_ok = @sd_libpaw_ok@ +sd_libpaw_options = @sd_libpaw_options@ +sd_libpaw_policy = @sd_libpaw_policy@ +sd_libpaw_status = @sd_libpaw_status@ +sd_libpsml_cppflags = @sd_libpsml_cppflags@ +sd_libpsml_enable = @sd_libpsml_enable@ +sd_libpsml_enable_def = @sd_libpsml_enable_def@ +sd_libpsml_fcflags = @sd_libpsml_fcflags@ +sd_libpsml_init = @sd_libpsml_init@ +sd_libpsml_ldflags = @sd_libpsml_ldflags@ +sd_libpsml_libs = @sd_libpsml_libs@ +sd_libpsml_ok = @sd_libpsml_ok@ +sd_libpsml_options = @sd_libpsml_options@ +sd_libpsml_policy = @sd_libpsml_policy@ +sd_libpsml_status = @sd_libpsml_status@ +sd_libxc_cflags = @sd_libxc_cflags@ +sd_libxc_cppflags = @sd_libxc_cppflags@ +sd_libxc_enable = @sd_libxc_enable@ +sd_libxc_enable_def = @sd_libxc_enable_def@ +sd_libxc_enable_fc = @sd_libxc_enable_fc@ +sd_libxc_fcflags = @sd_libxc_fcflags@ +sd_libxc_init = @sd_libxc_init@ +sd_libxc_ldflags = @sd_libxc_ldflags@ +sd_libxc_libs = @sd_libxc_libs@ +sd_libxc_ok = @sd_libxc_ok@ +sd_libxc_options = @sd_libxc_options@ +sd_libxc_policy = @sd_libxc_policy@ +sd_libxc_status = @sd_libxc_status@ +sd_linalg_cflags = @sd_linalg_cflags@ +sd_linalg_choices = @sd_linalg_choices@ +sd_linalg_cppflags = @sd_linalg_cppflags@ +sd_linalg_cxxflags = @sd_linalg_cxxflags@ +sd_linalg_enable = @sd_linalg_enable@ +sd_linalg_fcflags = @sd_linalg_fcflags@ +sd_linalg_flavor = @sd_linalg_flavor@ +sd_linalg_has_elpa = @sd_linalg_has_elpa@ +sd_linalg_has_scalapack = @sd_linalg_has_scalapack@ +sd_linalg_init = @sd_linalg_init@ +sd_linalg_ldflags = @sd_linalg_ldflags@ +sd_linalg_libs = @sd_linalg_libs@ +sd_linalg_ok = @sd_linalg_ok@ +sd_mpi_cc = @sd_mpi_cc@ +sd_mpi_cflags = @sd_mpi_cflags@ +sd_mpi_cppflags = @sd_mpi_cppflags@ +sd_mpi_cxx = @sd_mpi_cxx@ +sd_mpi_enable = @sd_mpi_enable@ +sd_mpi_enable_cxx = @sd_mpi_enable_cxx@ +sd_mpi_enable_def = @sd_mpi_enable_def@ +sd_mpi_enable_fc = @sd_mpi_enable_fc@ +sd_mpi_fc = @sd_mpi_fc@ +sd_mpi_fcflags = @sd_mpi_fcflags@ +sd_mpi_init = @sd_mpi_init@ +sd_mpi_ldflags = @sd_mpi_ldflags@ +sd_mpi_libs = @sd_mpi_libs@ +sd_mpi_ok = @sd_mpi_ok@ +sd_mpi_options = @sd_mpi_options@ +sd_mpi_policy = @sd_mpi_policy@ +sd_mpi_status = @sd_mpi_status@ +sd_netcdf_cflags = @sd_netcdf_cflags@ +sd_netcdf_cppflags = @sd_netcdf_cppflags@ +sd_netcdf_enable = @sd_netcdf_enable@ +sd_netcdf_enable_def = @sd_netcdf_enable_def@ +sd_netcdf_fcflags = @sd_netcdf_fcflags@ +sd_netcdf_fortran_cflags = @sd_netcdf_fortran_cflags@ +sd_netcdf_fortran_cppflags = @sd_netcdf_fortran_cppflags@ +sd_netcdf_fortran_enable = @sd_netcdf_fortran_enable@ +sd_netcdf_fortran_enable_def = @sd_netcdf_fortran_enable_def@ +sd_netcdf_fortran_fcflags = @sd_netcdf_fortran_fcflags@ +sd_netcdf_fortran_init = @sd_netcdf_fortran_init@ +sd_netcdf_fortran_ldflags = @sd_netcdf_fortran_ldflags@ +sd_netcdf_fortran_libs = @sd_netcdf_fortran_libs@ +sd_netcdf_fortran_ok = @sd_netcdf_fortran_ok@ +sd_netcdf_fortran_options = @sd_netcdf_fortran_options@ +sd_netcdf_fortran_policy = @sd_netcdf_fortran_policy@ +sd_netcdf_fortran_status = @sd_netcdf_fortran_status@ +sd_netcdf_init = @sd_netcdf_init@ +sd_netcdf_ldflags = @sd_netcdf_ldflags@ +sd_netcdf_libs = @sd_netcdf_libs@ +sd_netcdf_ok = @sd_netcdf_ok@ +sd_netcdf_options = @sd_netcdf_options@ +sd_netcdf_policy = @sd_netcdf_policy@ +sd_netcdf_status = @sd_netcdf_status@ +sd_papi_cflags = @sd_papi_cflags@ +sd_papi_cppflags = @sd_papi_cppflags@ +sd_papi_enable = @sd_papi_enable@ +sd_papi_enable_def = @sd_papi_enable_def@ +sd_papi_init = @sd_papi_init@ +sd_papi_ldflags = @sd_papi_ldflags@ +sd_papi_libs = @sd_papi_libs@ +sd_papi_ok = @sd_papi_ok@ +sd_papi_options = @sd_papi_options@ +sd_papi_policy = @sd_papi_policy@ +sd_papi_sd_papi_fcflags = @sd_papi_sd_papi_fcflags@ +sd_papi_status = @sd_papi_status@ +sd_pfft_cflags = @sd_pfft_cflags@ +sd_pfft_cppflags = @sd_pfft_cppflags@ +sd_pfft_enable = @sd_pfft_enable@ +sd_pfft_enable_def = @sd_pfft_enable_def@ +sd_pfft_init = @sd_pfft_init@ +sd_pfft_ldflags = @sd_pfft_ldflags@ +sd_pfft_libs = @sd_pfft_libs@ +sd_pfft_ok = @sd_pfft_ok@ +sd_pfft_options = @sd_pfft_options@ +sd_pfft_policy = @sd_pfft_policy@ +sd_pfft_status = @sd_pfft_status@ +sd_sys_fcflags = @sd_sys_fcflags@ +sd_triqs_cflags = @sd_triqs_cflags@ +sd_triqs_cppflags = @sd_triqs_cppflags@ +sd_triqs_cxxflags = @sd_triqs_cxxflags@ +sd_triqs_enable = @sd_triqs_enable@ +sd_triqs_enable_def = @sd_triqs_enable_def@ +sd_triqs_fcflags = @sd_triqs_fcflags@ +sd_triqs_init = @sd_triqs_init@ +sd_triqs_ldflags = @sd_triqs_ldflags@ +sd_triqs_libs = @sd_triqs_libs@ +sd_triqs_ok = @sd_triqs_ok@ +sd_triqs_options = @sd_triqs_options@ +sd_triqs_policy = @sd_triqs_policy@ +sd_triqs_status = @sd_triqs_status@ +sd_wannier90_cppflags = @sd_wannier90_cppflags@ +sd_wannier90_enable = @sd_wannier90_enable@ +sd_wannier90_enable_def = @sd_wannier90_enable_def@ +sd_wannier90_fcflags = @sd_wannier90_fcflags@ +sd_wannier90_init = @sd_wannier90_init@ +sd_wannier90_ldflags = @sd_wannier90_ldflags@ +sd_wannier90_libs = @sd_wannier90_libs@ +sd_wannier90_ok = @sd_wannier90_ok@ +sd_wannier90_options = @sd_wannier90_options@ +sd_wannier90_policy = @sd_wannier90_policy@ +sd_wannier90_status = @sd_wannier90_status@ +sd_xmlf90_cppflags = @sd_xmlf90_cppflags@ +sd_xmlf90_enable = @sd_xmlf90_enable@ +sd_xmlf90_enable_def = @sd_xmlf90_enable_def@ +sd_xmlf90_fcflags = @sd_xmlf90_fcflags@ +sd_xmlf90_init = @sd_xmlf90_init@ +sd_xmlf90_ldflags = @sd_xmlf90_ldflags@ +sd_xmlf90_libs = @sd_xmlf90_libs@ +sd_xmlf90_ok = @sd_xmlf90_ok@ +sd_xmlf90_options = @sd_xmlf90_options@ +sd_xmlf90_policy = @sd_xmlf90_policy@ +sd_xmlf90_status = @sd_xmlf90_status@ +sd_yakl_cppflags = @sd_yakl_cppflags@ +sd_yakl_enable = @sd_yakl_enable@ +sd_yakl_enable_def = @sd_yakl_enable_def@ +sd_yakl_fcflags = @sd_yakl_fcflags@ +sd_yakl_init = @sd_yakl_init@ +sd_yakl_ldflags = @sd_yakl_ldflags@ +sd_yakl_libs = @sd_yakl_libs@ +sd_yakl_ok = @sd_yakl_ok@ +sd_yakl_options = @sd_yakl_options@ +sd_yakl_policy = @sd_yakl_policy@ +sd_yakl_status = @sd_yakl_status@ +sharedstatedir = @sharedstatedir@ +src_02_clib_fcflags = @src_02_clib_fcflags@ +src_10_defs_fcflags = @src_10_defs_fcflags@ +src_11_memory_mpi_fcflags = @src_11_memory_mpi_fcflags@ +src_12_hide_mpi_fcflags = @src_12_hide_mpi_fcflags@ +src_14_hidewrite_fcflags = @src_14_hidewrite_fcflags@ +src_16_hideleave_fcflags = @src_16_hideleave_fcflags@ +src_16_kokkos_toolbox_fcflags = @src_16_kokkos_toolbox_fcflags@ +src_17_gpu_toolbox_fcflags = @src_17_gpu_toolbox_fcflags@ +src_17_libtetra_ext_fcflags = @src_17_libtetra_ext_fcflags@ +src_17_minimax_fcflags = @src_17_minimax_fcflags@ +src_17_yaml_out_fcflags = @src_17_yaml_out_fcflags@ +src_18_timing_fcflags = @src_18_timing_fcflags@ +src_21_hashfuncs_fcflags = @src_21_hashfuncs_fcflags@ +src_27_toolbox_oop_fcflags = @src_27_toolbox_oop_fcflags@ +src_28_numeric_noabirule_fcflags = @src_28_numeric_noabirule_fcflags@ +src_29_kpoints_fcflags = @src_29_kpoints_fcflags@ +src_32_util_fcflags = @src_32_util_fcflags@ +src_33_xc_lowlevel_fcflags = @src_33_xc_lowlevel_fcflags@ +src_39_libpaw_fcflags = @src_39_libpaw_fcflags@ +src_41_geometry_fcflags = @src_41_geometry_fcflags@ +src_42_nlstrain_fcflags = @src_42_nlstrain_fcflags@ +src_42_parser_fcflags = @src_42_parser_fcflags@ +src_43_ptgroups_fcflags = @src_43_ptgroups_fcflags@ +src_43_wvl_wrappers_fcflags = @src_43_wvl_wrappers_fcflags@ +src_44_abitools_fcflags = @src_44_abitools_fcflags@ +src_44_abitypes_defs_fcflags = @src_44_abitypes_defs_fcflags@ +src_44_manage_kokkos_fcflags = @src_44_manage_kokkos_fcflags@ +src_45_geomoptim_fcflags = @src_45_geomoptim_fcflags@ +src_45_xgTools_fcflags = @src_45_xgTools_fcflags@ +src_46_ghc_omp_fcflags = @src_46_ghc_omp_fcflags@ +src_46_manage_cuda_fcflags = @src_46_manage_cuda_fcflags@ +src_48_diago_fcflags = @src_48_diago_fcflags@ +src_49_gw_toolbox_oop_fcflags = @src_49_gw_toolbox_oop_fcflags@ +src_51_manage_mpi_fcflags = @src_51_manage_mpi_fcflags@ +src_52_fft_mpi_noabirule_fcflags = @src_52_fft_mpi_noabirule_fcflags@ +src_53_ffts_fcflags = @src_53_ffts_fcflags@ +src_54_spacepar_fcflags = @src_54_spacepar_fcflags@ +src_55_abiutil_fcflags = @src_55_abiutil_fcflags@ +src_56_io_mpi_fcflags = @src_56_io_mpi_fcflags@ +src_56_mixing_fcflags = @src_56_mixing_fcflags@ +src_56_recipspace_fcflags = @src_56_recipspace_fcflags@ +src_56_xc_fcflags = @src_56_xc_fcflags@ +src_57_iopsp_parser_fcflags = @src_57_iopsp_parser_fcflags@ +src_57_iovars_fcflags = @src_57_iovars_fcflags@ +src_61_occeig_fcflags = @src_61_occeig_fcflags@ +src_62_cg_noabirule_fcflags = @src_62_cg_noabirule_fcflags@ +src_62_ctqmc_fcflags = @src_62_ctqmc_fcflags@ +src_62_iowfdenpot_fcflags = @src_62_iowfdenpot_fcflags@ +src_62_poisson_fcflags = @src_62_poisson_fcflags@ +src_62_wvl_wfs_fcflags = @src_62_wvl_wfs_fcflags@ +src_64_psp_fcflags = @src_64_psp_fcflags@ +src_65_lotf_base_fcflags = @src_65_lotf_base_fcflags@ +src_65_paw_fcflags = @src_65_paw_fcflags@ +src_66_nonlocal_fcflags = @src_66_nonlocal_fcflags@ +src_66_vdwxc_fcflags = @src_66_vdwxc_fcflags@ +src_66_wfs_fcflags = @src_66_wfs_fcflags@ +src_67_common_fcflags = @src_67_common_fcflags@ +src_67_python_invocation_ext_fcflags = @src_67_python_invocation_ext_fcflags@ +src_67_triqs_ext_fcflags = @src_67_triqs_ext_fcflags@ +src_68_dmft_fcflags = @src_68_dmft_fcflags@ +src_68_lotf_fcflags = @src_68_lotf_fcflags@ +src_68_recursion_fcflags = @src_68_recursion_fcflags@ +src_68_rsprc_fcflags = @src_68_rsprc_fcflags@ +src_69_wfdesc_fcflags = @src_69_wfdesc_fcflags@ +src_70_gw_fcflags = @src_70_gw_fcflags@ +src_71_bse_fcflags = @src_71_bse_fcflags@ +src_71_wannier_fcflags = @src_71_wannier_fcflags@ +src_72_response_fcflags = @src_72_response_fcflags@ +src_77_ddb_fcflags = @src_77_ddb_fcflags@ +src_77_suscep_fcflags = @src_77_suscep_fcflags@ +src_78_effpot_fcflags = @src_78_effpot_fcflags@ +src_78_eph_fcflags = @src_78_eph_fcflags@ +src_79_seqpar_mpi_fcflags = @src_79_seqpar_mpi_fcflags@ +src_80_rttddft_fcflags = @src_80_rttddft_fcflags@ +src_80_tdep_fcflags = @src_80_tdep_fcflags@ +src_94_scfcv_fcflags = @src_94_scfcv_fcflags@ +src_95_drive_fcflags = @src_95_drive_fcflags@ +src_common_fcflags = @src_common_fcflags@ +src_core_fcflags = @src_core_fcflags@ +src_libpaw_fcflags = @src_libpaw_fcflags@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +with_abinit_common = @with_abinit_common@ +with_bigdft = @with_bigdft@ +with_config_file = @with_config_file@ +with_debug_flavor = @with_debug_flavor@ +with_fallbacks = @with_fallbacks@ +with_fc_vendor = @with_fc_vendor@ +with_fc_version = @with_fc_version@ +with_fft_flavor = @with_fft_flavor@ +with_fftw3 = @with_fftw3@ +with_gnu_ld = @with_gnu_ld@ +with_gpu = @with_gpu@ +with_hdf5 = @with_hdf5@ +with_kokkos = @with_kokkos@ +with_levmar = @with_levmar@ +with_libpaw = @with_libpaw@ +with_libpsml = @with_libpsml@ +with_libxc = @with_libxc@ +with_libxml2 = @with_libxml2@ +with_linalg_flavor = @with_linalg_flavor@ +with_mpi = @with_mpi@ +with_mpi_level = @with_mpi_level@ +with_netcdf = @with_netcdf@ +with_optim_flavor = @with_optim_flavor@ +with_papi = @with_papi@ +with_pfft = @with_pfft@ +with_triqs = @with_triqs@ +with_wannier90 = @with_wannier90@ +with_xmlf90 = @with_xmlf90@ +with_yakl = @with_yakl@ +AM_CFLAGS = @ABI_CPPFLAGS@ +AM_CXXFLAGS = $(sd_triqs_cxxflags) +AM_FCFLAGS = @FPPFLAGS@ @FCFLAGS_FREEFORM@ @FCFLAGS_MODDIR@ @sd_sys_fcflags@ @fcflags_opt_27_toolbox_oop@ +AM_CPPFLAGS = \ + @src_10_defs_fcflags@ \ + @src_12_hide_mpi_fcflags@ \ + @src_14_hidewrite_fcflags@ \ + @src_16_hideleave_fcflags@ \ + @src_17_yaml_out_fcflags@ \ + @src_common_fcflags@ \ + @src_core_fcflags@ \ + @src_libpaw_fcflags@ \ + @sd_hdf5_cppflags@ \ + @sd_netcdf_cppflags@ \ + @sd_netcdf_fcflags@ \ + @sd_netcdf_fortran_cppflags@ \ + @sd_netcdf_fortran_fcflags@ \ + @fc_mod_fcflags@ + + +# Regular source files +lib27_toolbox_oop_srcs = \ + m_copy.F90 \ + m_iterators.F90 \ + m_mpiotk.F90 \ + m_nctk.F90 + + +# Source files depending on conditionals + +# Library description +noinst_LIBRARIES = lib27_toolbox_oop.a +lib27_toolbox_oop_a_SOURCES = $(lib27_toolbox_oop_srcs) + +# Dependencies (inside the directory) of directory 27_toolbox_oop +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. +CLEANFILES = m_copy_cpp.f90 m_iterators_cpp.f90 m_mpiotk_cpp.f90 \ + m_nctk_cpp.f90 m_copy.$(MODEXT) m_iterators.$(MODEXT) \ + m_mpiotk.$(MODEXT) m_nctk.$(MODEXT) +EXTRA_DIST = abinit.src abinit.dep _27_toolbox_oop_ +all: all-am + +.SUFFIXES: +.SUFFIXES: .F90 .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu shared/common/src/27_toolbox_oop/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu shared/common/src/27_toolbox_oop/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) + +lib27_toolbox_oop.a: $(lib27_toolbox_oop_a_OBJECTS) $(lib27_toolbox_oop_a_DEPENDENCIES) $(EXTRA_lib27_toolbox_oop_a_DEPENDENCIES) + $(AM_V_at)-rm -f lib27_toolbox_oop.a + $(AM_V_AR)$(lib27_toolbox_oop_a_AR) lib27_toolbox_oop.a $(lib27_toolbox_oop_a_OBJECTS) $(lib27_toolbox_oop_a_LIBADD) + $(AM_V_at)$(RANLIB) lib27_toolbox_oop.a + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +.F90.o: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ $< + +.F90.obj: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-noinstLIBRARIES cscopelist-am ctags ctags-am distclean \ + distclean-compile distclean-generic distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am + +.PRECIOUS: Makefile + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/GX-PAW/common/src/27_toolbox_oop/_27_toolbox_oop_ b/GX-PAW/common/src/27_toolbox_oop/_27_toolbox_oop_ new file mode 100644 index 00000000..7a9b82c7 --- /dev/null +++ b/GX-PAW/common/src/27_toolbox_oop/_27_toolbox_oop_ @@ -0,0 +1,22 @@ +!!****d* ABINIT/27_toolbox_oop +!! NAME +!! 27_toolbox_oop +!! +!! DESCRIPTION +!! FIXME: Description is missing +!! +!! COPYRIGHT +!! Copyright (C) 1998-2024 ABINIT group +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! For the initials of contributors, see ~abinit/doc/developers/contributors.txt . +!! +!! CHILDREN +!! interfaces_27_toolbox_oop.F90 +!! m_copy.F90 +!! m_iterators.F90 +!! m_mpiotk.F90 +!! m_nctk.F90 +!! +!!*** diff --git a/GX-PAW/common/src/27_toolbox_oop/__pycache__/abinit.cpython-36.pyc b/GX-PAW/common/src/27_toolbox_oop/__pycache__/abinit.cpython-36.pyc new file mode 100644 index 00000000..524a3de3 Binary files /dev/null and b/GX-PAW/common/src/27_toolbox_oop/__pycache__/abinit.cpython-36.pyc differ diff --git a/GX-PAW/common/src/27_toolbox_oop/abinit.dep b/GX-PAW/common/src/27_toolbox_oop/abinit.dep new file mode 100644 index 00000000..b434f590 --- /dev/null +++ b/GX-PAW/common/src/27_toolbox_oop/abinit.dep @@ -0,0 +1,12 @@ +# Dependencies (inside the directory) of directory 27_toolbox_oop +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. + +CLEANFILES += \ + m_copy.$(MODEXT) \ + m_iterators.$(MODEXT) \ + m_mpiotk.$(MODEXT) \ + m_nctk.$(MODEXT) + diff --git a/GX-PAW/common/src/27_toolbox_oop/abinit.dir b/GX-PAW/common/src/27_toolbox_oop/abinit.dir new file mode 100644 index 00000000..108687f0 --- /dev/null +++ b/GX-PAW/common/src/27_toolbox_oop/abinit.dir @@ -0,0 +1,8 @@ +# Dependencies (outside the directory) of directory 27_toolbox_oop +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. + +include_dirs = \ +['10_defs', '12_hide_mpi', '14_hidewrite', '16_hideleave', '17_yaml_out'] \ No newline at end of file diff --git a/GX-PAW/common/src/27_toolbox_oop/abinit.src b/GX-PAW/common/src/27_toolbox_oop/abinit.src new file mode 100644 index 00000000..f3481196 --- /dev/null +++ b/GX-PAW/common/src/27_toolbox_oop/abinit.src @@ -0,0 +1,27 @@ +# -*- Python -*- +# +# Copyright (C) 2005-2024 ABINIT Group (Yann Pouillon) +# +# This file is part of the ABINIT software package. For license information, +# please see the COPYING file in the top-level directory of the ABINIT source +# distribution. +# + +# +# Source files making up the 27_toolbox_oop library +# + +# Source file attributes +ABI_SRC_NIL = 0 # No attribute +ABI_SRC_BLT = 1 # The file is built by a script +ABI_SRC_DEP = 2 # The file depends on other files + +# Source files +sources = [ + "m_copy.F90", + "m_iterators.F90", + "m_mpiotk.F90", + "m_nctk.F90", +] +# IMPORTANT : please use the alphabetic order in the previous list. Do NOT add the new routine names at the end of the list. +# This is important to avoid numerous conflicts at merge time. Thank you very much. Xavier. diff --git a/GX-PAW/common/src/27_toolbox_oop/lib27_toolbox_oop.a b/GX-PAW/common/src/27_toolbox_oop/lib27_toolbox_oop.a new file mode 100644 index 00000000..370e0c46 Binary files /dev/null and b/GX-PAW/common/src/27_toolbox_oop/lib27_toolbox_oop.a differ diff --git a/GX-PAW/common/src/27_toolbox_oop/m_copy.F90 b/GX-PAW/common/src/27_toolbox_oop/m_copy.F90 new file mode 100644 index 00000000..3df7bce3 --- /dev/null +++ b/GX-PAW/common/src/27_toolbox_oop/m_copy.F90 @@ -0,0 +1,2052 @@ +!!****m* ABINIT/m_copy +!! NAME +!! m_copy +!! +!! FUNCTION +!! This module provides a generic interface used to copy pointers: +!! deep_copy: used to return a deep copy of pointers. The procedure is useful if data types +!! with several pointers have to be copied. +!! addr_copy: used to copy the address contained in a pointer +!! +!! COPYRIGHT +!! Copyright (C) 2008-2024 ABINIT group (MG,MT) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! NOTES +!! * The intent for pointer arguments is not specified since +!! we have to conform to the F90 specifications. However xval is IN while copy is OUT +!! +!! * copy is a pointer and is supposed to be *not allocated*. +!! If the value to be copied points to null(), also the copy will be nullified. +!! +!! * On the alloc_copy routine: +!! Since copy is INTENT(OUT), if the associated actual argument is +!! currently allocated, the actual argument is deallocated on procedure invocation so that the dummy +!! argument has an allocation status of not currently allocated. +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" + +MODULE m_copy + + use defs_basis, only : dp, spc, dpc + use, intrinsic :: iso_c_binding + use m_abicore + + implicit none + + private + + public :: deep_copy ! Performs deep copy of two pointers + public :: alloc_copy ! Allocate an allocable array and copy data. See notes in alloc_copy_int1d + public :: addr_copy ! Performs a bitwise copy of a pointer (copy address) + + interface deep_copy + module procedure deep_copy_int0d + module procedure deep_copy_int1d + module procedure deep_copy_int2d + module procedure deep_copy_int3d + module procedure deep_copy_int4d + module procedure deep_copy_rdp0d + module procedure deep_copy_rdp1d + module procedure deep_copy_rdp2d + module procedure deep_copy_rdp3d + module procedure deep_copy_rdp4d + module procedure deep_copy_csp0d + module procedure deep_copy_csp1d + module procedure deep_copy_csp2d + module procedure deep_copy_csp3d + module procedure deep_copy_csp4d + module procedure deep_copy_cdp0d + module procedure deep_copy_cdp1d + module procedure deep_copy_cdp2d + module procedure deep_copy_cdp3d + module procedure deep_copy_cdp4d + module procedure deep_copy_log0d + module procedure deep_copy_log1d + module procedure deep_copy_log2d + module procedure deep_copy_log3d + module procedure deep_copy_log4d + !module procedure deep_copy_ch1d !Does not work on XLF, do not use it for the time being. + end interface deep_copy + + interface alloc_copy + module procedure alloc_copy_int1d + module procedure alloc_copy_int2d + module procedure alloc_copy_int3d + module procedure alloc_copy_int4d_1b + module procedure alloc_copy_int4d + module procedure alloc_copy_rdp1d + module procedure alloc_copy_rdp2d + module procedure alloc_copy_rdp3d + module procedure alloc_copy_rdp4d + module procedure alloc_copy_rdp5d + module procedure alloc_copy_rdp6d + module procedure alloc_copy_csp1d + module procedure alloc_copy_csp2d + module procedure alloc_copy_csp3d + module procedure alloc_copy_csp4d + module procedure alloc_copy_cdp1d + module procedure alloc_copy_cdp2d + module procedure alloc_copy_cdp3d + module procedure alloc_copy_cdp4d + module procedure alloc_copy_log1d + module procedure alloc_copy_log2d + module procedure alloc_copy_log3d + module procedure alloc_copy_log4d + end interface alloc_copy + + interface addr_copy + module procedure addr_copy_int1d + module procedure addr_copy_int2d + module procedure addr_copy_int3d + module procedure addr_copy_int4d + module procedure addr_copy_dp1d + module procedure addr_copy_dp2d + module procedure addr_copy_dp3d + module procedure addr_copy_dp4d + module procedure addr_copy_dp5d + end interface addr_copy + +CONTAINS !=========================================================== +!!*** + +!!****f* m_copy/deep_copy_int0d +!! NAME +!! deep_copy_int0d +!! +!! FUNCTION +!! Performs a deep copy of a pointer. +!! +!! SOURCE + +subroutine deep_copy_int0d(xval,copy) + +!Arguments ------------------------------------ + integer,intent(in) :: xval + integer,intent(out) :: copy +! ********************************************************************* + + copy=xval + +end subroutine deep_copy_int0d +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_copy/deep_copy_int1d +!! NAME +!! deep_copy_int1d +!! +!! FUNCTION +!! Performs a deep copy of a pointer. +!! +!! SOURCE + +subroutine deep_copy_int1d(xval,copy) + +!Arguments ------------------------------------ + integer,pointer :: xval(:) + integer,pointer :: copy(:) + +!Local variables------------------------------- + integer :: il,iu +! ********************************************************************* + + if (associated(xval)) then + il=lbound(xval,DIM=1); iu=ubound(xval,DIM=1) + ABI_MALLOC(copy,(il:iu)) + copy(:)=xval(:) + else + nullify(copy) + end if + +end subroutine deep_copy_int1d +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_copy/deep_copy_int2d +!! NAME +!! deep_copy_int2d +!! +!! FUNCTION +!! Performs a deep copy of a pointer. +!! +!! SOURCE + +subroutine deep_copy_int2d(xval,copy) + +!Arguments ------------------------------------ + integer,pointer :: xval(:,:) + integer,pointer :: copy(:,:) + +!Local variables------------------------------- + integer :: il1,iu1,il2,iu2 +! ********************************************************************* + + if (associated(xval)) then + il1=lbound(xval,DIM=1); iu1=ubound(xval,DIM=1) + il2=lbound(xval,DIM=2); iu2=ubound(xval,DIM=2) + ABI_MALLOC(copy,(il1:iu1,il2:iu2)) + copy(:,:)=xval(:,:) + else + nullify(copy) + end if + +end subroutine deep_copy_int2d +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_copy/deep_copy_int3d +!! NAME +!! deep_copy_int3d +!! +!! FUNCTION +!! Performs a deep copy of a pointer. +!! +!! SOURCE + +subroutine deep_copy_int3d(xval,copy) + +!Arguments ------------------------------------ + integer,pointer :: xval(:,:,:) + integer,pointer :: copy(:,:,:) + +!Local variables------------------------------- + integer :: il1,iu1,il2,iu2,il3,iu3 +! ********************************************************************* + + if (associated(xval)) then + il1=lbound(xval,DIM=1); iu1=ubound(xval,DIM=1) + il2=lbound(xval,DIM=2); iu2=ubound(xval,DIM=2) + il3=lbound(xval,DIM=3); iu3=ubound(xval,DIM=3) + ABI_MALLOC(copy,(il1:iu1,il2:iu2,il3:iu3)) + copy(:,:,:)=xval(:,:,:) + else + nullify(copy) + end if + +end subroutine deep_copy_int3d +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_copy/deep_copy_int4d +!! NAME +!! deep_copy_int4d +!! +!! FUNCTION +!! Performs a deep copy of a pointer. +!! +!! SOURCE + +subroutine deep_copy_int4d(xval,copy) + +!Arguments ------------------------------------ + integer,pointer :: xval(:,:,:,:) + integer,pointer :: copy(:,:,:,:) + +!Local variables------------------------------- + integer :: il1,iu1,il2,iu2,il3,iu3,il4,iu4 +! ********************************************************************* + + if (associated(xval)) then + il1=lbound(xval,DIM=1); iu1=ubound(xval,DIM=1) + il2=lbound(xval,DIM=2); iu2=ubound(xval,DIM=2) + il3=lbound(xval,DIM=3); iu3=ubound(xval,DIM=3) + il4=lbound(xval,DIM=4); iu4=ubound(xval,DIM=4) + ABI_MALLOC(copy,(il1:iu1,il2:iu2,il3:iu3,il4:iu4)) + copy(:,:,:,:)=xval(:,:,:,:) + else + nullify(copy) + end if + +end subroutine deep_copy_int4d +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_copy/deep_copy_rdp0d +!! NAME +!! deep_copy_rdp0d +!! +!! FUNCTION +!! Performs a deep copy of a pointer. +!! +!! SOURCE + +subroutine deep_copy_rdp0d(xval,copy) + +!Arguments ------------------------------------ + real(dp),intent(in) :: xval + real(dp),intent(out) :: copy +! ********************************************************************* + copy=xval + +end subroutine deep_copy_rdp0d +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_copy/deep_copy_rdp1d +!! NAME +!! deep_copy_rdp1d + +!! FUNCTION +!! Performs a deep copy of a pointer. +!! +!! SOURCE + +subroutine deep_copy_rdp1d(xval,copy) + +!Arguments ------------------------------------ + real(dp),pointer :: xval(:) + real(dp),pointer :: copy(:) + +!Local variables------------------------------- + integer :: il,iu +! ********************************************************************* + + if (associated(xval)) then + il=lbound(xval,DIM=1); iu=ubound(xval,DIM=1) + ABI_MALLOC(copy,(il:iu)) + copy(:)=xval(:) + else + nullify(copy) + end if + +end subroutine deep_copy_rdp1d +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_copy/deep_copy_rdp2d +!! NAME +!! deep_copy_rdp2d +!! +!! FUNCTION +!! Performs a deep copy of a pointer. +!! +!! SOURCE + +subroutine deep_copy_rdp2d(xval,copy) + +!Arguments ------------------------------------ + real(dp),pointer :: xval(:,:) + real(dp),pointer :: copy(:,:) + +!Local variables------------------------------- + integer :: il1,iu1,il2,iu2 +! ********************************************************************* + + if (associated(xval)) then + il1=lbound(xval,DIM=1); iu1=ubound(xval,DIM=1) + il2=lbound(xval,DIM=2); iu2=ubound(xval,DIM=2) + ABI_MALLOC(copy,(il1:iu1,il2:iu2)) + copy(:,:)=xval(:,:) + else + nullify(copy) + end if + +end subroutine deep_copy_rdp2d +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_copy/deep_copy_rdp3d +!! NAME +!! deep_copy_rdp3d +!! +!! FUNCTION +!! Performs a deep copy of a pointer. +!! +!! SOURCE + +subroutine deep_copy_rdp3d(xval,copy) + +!Arguments ------------------------------------ + real(dp),pointer :: xval(:,:,:) + real(dp),pointer :: copy(:,:,:) + +!Local variables------------------------------- + integer :: il1,iu1,il2,iu2,il3,iu3 +! ********************************************************************* + + if (associated(xval)) then + il1=lbound(xval,DIM=1); iu1=ubound(xval,DIM=1) + il2=lbound(xval,DIM=2); iu2=ubound(xval,DIM=2) + il3=lbound(xval,DIM=3); iu3=ubound(xval,DIM=3) + ABI_MALLOC(copy,(il1:iu1,il2:iu2,il3:iu3)) + copy(:,:,:)=xval(:,:,:) + else + nullify(copy) + end if + +end subroutine deep_copy_rdp3d +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_copy/deep_copy_rdp4d +!! NAME +!! deep_copy_rdp4d +!! +!! FUNCTION +!! Performs a deep copy of a pointer. +!! +!! SOURCE + +subroutine deep_copy_rdp4d(xval,copy) + +!Arguments ------------------------------------ + real(dp),pointer :: xval(:,:,:,:) + real(dp),pointer :: copy(:,:,:,:) + +!Local variables------------------------------- + integer :: il1,iu1,il2,iu2,il3,iu3,il4,iu4 +! ********************************************************************* + + if (associated(xval)) then + il1=lbound(xval,DIM=1); iu1=ubound(xval,DIM=1) + il2=lbound(xval,DIM=2); iu2=ubound(xval,DIM=2) + il3=lbound(xval,DIM=3); iu3=ubound(xval,DIM=3) + il4=lbound(xval,DIM=4); iu4=ubound(xval,DIM=4) + ABI_MALLOC(copy,(il1:iu1,il2:iu2,il3:iu3,il4:iu4)) + copy(:,:,:,:)=xval(:,:,:,:) + else + nullify(copy) + end if + +end subroutine deep_copy_rdp4d +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_copy/deep_copy_csp0d +!! NAME +!! deep_copy_csp0d +!! +!! FUNCTION +!! Performs a deep copy of a pointer. +!! +!! SOURCE + +subroutine deep_copy_csp0d(xval,copy) + +!Arguments ------------------------------------ + complex(spc),intent(in) :: xval + complex(spc),intent(out) :: copy +! ********************************************************************* + copy=xval + +end subroutine deep_copy_csp0d +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_copy/deep_copy_csp1d +!! NAME +!! deep_copy_csp1d +!! +!! FUNCTION +!! Performs a deep copy of a pointer. +!! +!! SOURCE + +subroutine deep_copy_csp1d(xval,copy) + +!Arguments ------------------------------------ + complex(spc),pointer :: xval(:) + complex(spc),pointer :: copy(:) + +!Local variables------------------------------- + integer :: il,iu +! ********************************************************************* + + if (associated(xval)) then + il=lbound(xval,DIM=1); iu=ubound(xval,DIM=1) + ABI_MALLOC(copy,(il:iu)) + copy(:)=xval(:) + else + nullify(copy) + end if + +end subroutine deep_copy_csp1d +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_copy/deep_copy_csp2d +!! NAME +!! deep_copy_csp2d +!! +!! FUNCTION +!! Performs a deep copy of a pointer. +!! +!! SOURCE + +subroutine deep_copy_csp2d(xval,copy) + +!Arguments ------------------------------------ + complex(spc),pointer :: xval(:,:) + complex(spc),pointer :: copy(:,:) + +!Local variables------------------------------- + integer :: il1,iu1,il2,iu2 +! ********************************************************************* + + if (associated(xval)) then + il1=lbound(xval,DIM=1); iu1=ubound(xval,DIM=1) + il2=lbound(xval,DIM=2); iu2=ubound(xval,DIM=2) + ABI_MALLOC(copy,(il1:iu1,il2:iu2)) + copy(:,:)=xval(:,:) + else + nullify(copy) + end if + +end subroutine deep_copy_csp2d +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_copy/deep_copy_csp3d +!! NAME +!! deep_copy_csp3d +!! +!! FUNCTION +!! Performs a deep copy of a pointer. +!! +!! SOURCE + +subroutine deep_copy_csp3d(xval,copy) + +!Arguments ------------------------------------ + complex(spc),pointer :: xval(:,:,:) + complex(spc),pointer :: copy(:,:,:) + +!Local variables------------------------------- + integer :: il1,iu1,il2,iu2,il3,iu3 +! ********************************************************************* + + if (associated(xval)) then + il1=lbound(xval,DIM=1); iu1=ubound(xval,DIM=1) + il2=lbound(xval,DIM=2); iu2=ubound(xval,DIM=2) + il3=lbound(xval,DIM=3); iu3=ubound(xval,DIM=3) + ABI_MALLOC(copy,(il1:iu1,il2:iu2,il3:iu3)) + copy(:,:,:)=xval(:,:,:) + else + nullify(copy) + end if + +end subroutine deep_copy_csp3d +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_copy/deep_copy_csp4d +!! NAME +!! deep_copy_csp4d +!! +!! FUNCTION +!! Performs a deep copy of a pointer. +!! +!! SOURCE + +subroutine deep_copy_csp4d(xval,copy) + +!Arguments ------------------------------------ + complex(spc),pointer :: xval(:,:,:,:) + complex(spc),pointer :: copy(:,:,:,:) + +!Local variables------------------------------- + integer :: il1,iu1,il2,iu2,il3,iu3,il4,iu4 +! ********************************************************************* + + if (associated(xval)) then + il1=lbound(xval,DIM=1); iu1=ubound(xval,DIM=1) + il2=lbound(xval,DIM=2); iu2=ubound(xval,DIM=2) + il3=lbound(xval,DIM=3); iu3=ubound(xval,DIM=3) + il4=lbound(xval,DIM=4); iu4=ubound(xval,DIM=4) + ABI_MALLOC(copy,(il1:iu1,il2:iu2,il3:iu3,il4:iu4)) + copy(:,:,:,:)=xval(:,:,:,:) + else + nullify(copy) + end if + +end subroutine deep_copy_csp4d +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_copy/deep_copy_cdp0d +!! NAME +!! deep_copy_cdp0d +!! +!! FUNCTION +!! Performs a deep copy of a pointer. +!! +!! SOURCE + +subroutine deep_copy_cdp0d(xval,copy) + +!Arguments ------------------------------------ + complex(dpc),intent(in) :: xval + complex(dpc),intent(out) :: copy +! ********************************************************************* + copy=xval + +end subroutine deep_copy_cdp0d +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_copy/deep_copy_cdp1d +!! NAME +!! deep_copy_cdp1d +!! +!! FUNCTION +!! Performs a deep copy of a pointer. +!! +!! SOURCE + +subroutine deep_copy_cdp1d(xval,copy) + +!Arguments ------------------------------------ + complex(dpc),pointer :: xval(:) + complex(dpc),pointer :: copy(:) + +!Local variables------------------------------- + integer :: il,iu +! ********************************************************************* + + if (associated(xval)) then + il=lbound(xval,DIM=1); iu=ubound(xval,DIM=1) + ABI_MALLOC(copy,(il:iu)) + copy(:)=xval(:) + else + nullify(copy) + end if + +end subroutine deep_copy_cdp1d +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_copy/deep_copy_cdp2d +!! NAME +!! deep_copy_cdp2d +!! +!! FUNCTION +!! Performs a deep copy of a pointer. +!! +!! SOURCE + +subroutine deep_copy_cdp2d(xval,copy) + +!Arguments ------------------------------------ + complex(dpc),pointer :: xval(:,:) + complex(dpc),pointer :: copy(:,:) + +!Local variables------------------------------- + integer :: il1,iu1,il2,iu2 +! ********************************************************************* + + if (associated(xval)) then + il1=lbound(xval,DIM=1); iu1=ubound(xval,DIM=1) + il2=lbound(xval,DIM=2); iu2=ubound(xval,DIM=2) + ABI_MALLOC(copy,(il1:iu1,il2:iu2)) + copy(:,:)=xval(:,:) + else + nullify(copy) + end if + +end subroutine deep_copy_cdp2d +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_copy/deep_copy_cdp3d +!! NAME +!! deep_copy_cdp3d +!! +!! FUNCTION +!! Performs a deep copy of a pointer. +!! +!! SOURCE + +subroutine deep_copy_cdp3d(xval,copy) + +!Arguments ------------------------------------ + complex(dpc),pointer :: xval(:,:,:) + complex(dpc),pointer :: copy(:,:,:) + +!Local variables------------------------------- + integer :: il1,iu1,il2,iu2,il3,iu3 +! ********************************************************************* + + if (associated(xval)) then + il1=lbound(xval,DIM=1); iu1=ubound(xval,DIM=1) + il2=lbound(xval,DIM=2); iu2=ubound(xval,DIM=2) + il3=lbound(xval,DIM=3); iu3=ubound(xval,DIM=3) + ABI_MALLOC(copy,(il1:iu1,il2:iu2,il3:iu3)) + copy(:,:,:)=xval(:,:,:) + else + nullify(copy) + end if + +end subroutine deep_copy_cdp3d +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_copy/deep_copy_cdp4d +!! NAME +!! deep_copy_cdp4d +!! +!! FUNCTION +!! Performs a deep copy of a pointer. +!! +!! SOURCE + +subroutine deep_copy_cdp4d(xval,copy) + +!Arguments ------------------------------------ + complex(dpc),pointer :: xval(:,:,:,:) + complex(dpc),pointer :: copy(:,:,:,:) + +!Local variables------------------------------- + integer :: il1,iu1,il2,iu2,il3,iu3,il4,iu4 +! ********************************************************************* + + if (associated(xval)) then + il1=lbound(xval,DIM=1); iu1=ubound(xval,DIM=1) + il2=lbound(xval,DIM=2); iu2=ubound(xval,DIM=2) + il3=lbound(xval,DIM=3); iu3=ubound(xval,DIM=3) + il4=lbound(xval,DIM=4); iu4=ubound(xval,DIM=4) + ABI_MALLOC(copy,(il1:iu1,il2:il2,il3:iu3,il4:iu4)) + copy(:,:,:,:)=xval(:,:,:,:) + else + nullify(copy) + end if + +end subroutine deep_copy_cdp4d +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_copy/deep_copy_ch1d +!! NAME +!! deep_copy_ch1d +!! +!! FUNCTION +!! Performs a deep copy of a pointer. +!! +!! NOTES +!! This routine segfaults on XLF, disabled for the time being +!! Should test whether passing slen fixes the problem +!! +!! SOURCE + +subroutine deep_copy_ch1d(xval,copy,slen) + +!Arguments ------------------------------------ + integer,intent(in) :: slen + character(len=slen),pointer :: xval(:) + character(len=slen),pointer :: copy(:) + +!Local variables------------------------------- + integer :: il,iu +! ********************************************************************* + + if (associated(xval)) then + il=lbound(xval,DIM=1); iu=ubound(xval,DIM=1) + ABI_MALLOC(copy,(il:iu)) + copy(:)=xval(:) + else + nullify(copy) + end if + +end subroutine deep_copy_ch1d +!!*** + +!!****f* m_copy/deep_copy_log0d +!! NAME +!! deep_copy_log0d +!! +!! FUNCTION +!! Performs a deep copy of a pointer. +!! +!! SOURCE + +subroutine deep_copy_log0d(xval,copy) + +!Arguments ------------------------------------ + logical,intent(in) :: xval + logical,intent(out) :: copy +! ********************************************************************* + + copy=xval + +end subroutine deep_copy_log0d +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_copy/deep_copy_log1d +!! NAME +!! deep_copy_log1d +!! +!! FUNCTION +!! Performs a deep copy of a pointer. +!! +!! SOURCE + +subroutine deep_copy_log1d(xval,copy) + +!Arguments ------------------------------------ + logical,pointer :: xval(:) + logical,pointer :: copy(:) + +!Local variables------------------------------- + integer :: il,iu +! ********************************************************************* + + if (associated(xval)) then + il=lbound(xval,DIM=1); iu=ubound(xval,DIM=1) + ABI_MALLOC(copy,(il:iu)) + copy(:)=xval(:) + else + nullify(copy) + end if + +end subroutine deep_copy_log1d +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_copy/deep_copy_log2d +!! NAME +!! deep_copy_log2d +!! +!! FUNCTION +!! Performs a deep copy of a pointer. +!! +!! SOURCE + +subroutine deep_copy_log2d(xval,copy) + +!Arguments ------------------------------------ + logical,pointer :: xval(:,:) + logical,pointer :: copy(:,:) + +!Local variables------------------------------- + integer :: il1,iu1,il2,iu2 +! ********************************************************************* + + if (associated(xval)) then + il1=lbound(xval,DIM=1); iu1=ubound(xval,DIM=1) + il2=lbound(xval,DIM=2); iu2=ubound(xval,DIM=2) + ABI_MALLOC(copy,(il1:iu1,il2:iu2)) + copy(:,:)=xval(:,:) + else + nullify(copy) + end if + +end subroutine deep_copy_log2d +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_copy/deep_copy_log3d +!! NAME +!! deep_copy_log3d +!! +!! FUNCTION +!! Performs a deep copy of a pointer. +!! +!! SOURCE + +subroutine deep_copy_log3d(xval,copy) + +!Arguments ------------------------------------ + logical,pointer :: xval(:,:,:) + logical,pointer :: copy(:,:,:) + +!Local variables------------------------------- + integer :: il1,iu1,il2,iu2,il3,iu3 +! ********************************************************************* + + if (associated(xval)) then + il1=lbound(xval,DIM=1); iu1=ubound(xval,DIM=1) + il2=lbound(xval,DIM=2); iu2=ubound(xval,DIM=2) + il3=lbound(xval,DIM=3); iu3=ubound(xval,DIM=3) + ABI_MALLOC(copy,(il1:iu1,il2:iu2,il3:iu3)) + copy(:,:,:)=xval(:,:,:) + else + nullify(copy) + end if + +end subroutine deep_copy_log3d +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_copy/deep_copy_log4d +!! NAME +!! deep_copy_log4d +!! +!! FUNCTION +!! Performs a deep copy of a pointer. +!! +!! SOURCE + +subroutine deep_copy_log4d(xval,copy) + +!Arguments ------------------------------------ + logical,pointer :: xval(:,:,:,:) + logical,pointer :: copy(:,:,:,:) + +!Local variables------------------------------- + integer :: il1,iu1,il2,iu2,il3,iu3,il4,iu4 +! ********************************************************************* + + if (associated(xval)) then + il1=lbound(xval,DIM=1); iu1=ubound(xval,DIM=1) + il2=lbound(xval,DIM=2); iu2=ubound(xval,DIM=2) + il3=lbound(xval,DIM=3); iu3=ubound(xval,DIM=3) + il4=lbound(xval,DIM=4); iu4=ubound(xval,DIM=4) + ABI_MALLOC(copy,(il1:iu1,il2:iu2,il3:iu3,il4:iu4)) + copy(:,:,:,:)=xval(:,:,:,:) + else + nullify(copy) + end if + +end subroutine deep_copy_log4d +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_copy/alloc_copy_int1d +!! NAME +!! alloc_copy_int1d +!! +!! FUNCTION +!! Performs a copy of an array. +!! +!! SOURCE + +subroutine alloc_copy_int1d(xval,copy) + +!Arguments ------------------------------------ + integer,intent(in) :: xval(:) + integer,allocatable,intent(out) :: copy(:) + +!Local variables------------------------------- + integer :: il,iu +! ********************************************************************* + + il=lbound(xval,DIM=1); iu=ubound(xval,DIM=1) + ABI_MALLOC(copy,(il:iu)) + copy(:)=xval(:) + +end subroutine alloc_copy_int1d +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_copy/alloc_copy_int2d +!! NAME +!! alloc_copy_int2d +!! +!! FUNCTION +!! Performs a copy of an array. +!! +!! SOURCE + +subroutine alloc_copy_int2d(xval,copy) + +!Arguments ------------------------------------ + integer,intent(in) :: xval(:,:) + integer,allocatable,intent(out) :: copy(:,:) + +!Local variables------------------------------- + integer :: il1,iu1,il2,iu2 +! ********************************************************************* + + il1=lbound(xval,DIM=1); iu1=ubound(xval,DIM=1) + il2=lbound(xval,DIM=2); iu2=ubound(xval,DIM=2) + ABI_MALLOC(copy,(il1:iu1,il2:iu2)) + copy(:,:)=xval(:,:) + +end subroutine alloc_copy_int2d +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_copy/alloc_copy_int3d +!! NAME +!! alloc_copy_int3d +!! +!! FUNCTION +!! Performs a copy of an array. +!! +!! SOURCE + +subroutine alloc_copy_int3d(xval,copy) + +!Arguments ------------------------------------ + integer,intent(in) :: xval(:,:,:) + integer,allocatable,intent(out) :: copy(:,:,:) + +!Local variables------------------------------- + integer :: il1,iu1,il2,iu2,il3,iu3 +! ********************************************************************* + + il1=lbound(xval,DIM=1); iu1=ubound(xval,DIM=1) + il2=lbound(xval,DIM=2); iu2=ubound(xval,DIM=2) + il3=lbound(xval,DIM=3); iu3=ubound(xval,DIM=3) + ABI_MALLOC(copy,(il1:iu1,il2:iu2,il3:iu3)) + copy(:,:,:)=xval(:,:,:) + +end subroutine alloc_copy_int3d +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_copy/alloc_copy_int4d_1b +!! NAME +!! alloc_copy_int4d_1b +!! +!! FUNCTION +!! Performs a copy of an array. +!! +!! SOURCE + +subroutine alloc_copy_int4d_1b(xval, copy) + +!Arguments ------------------------------------ + integer(c_int8_t),intent(in) :: xval(:,:,:,:) + integer(c_int8_t),allocatable,intent(out) :: copy(:,:,:,:) + +!Local variables------------------------------- + integer :: il1,iu1,il2,iu2,il3,iu3,il4,iu4 +! ********************************************************************* + + il1=lbound(xval,DIM=1); iu1=ubound(xval,DIM=1) + il2=lbound(xval,DIM=2); iu2=ubound(xval,DIM=2) + il3=lbound(xval,DIM=3); iu3=ubound(xval,DIM=3) + il4=lbound(xval,DIM=4); iu4=ubound(xval,DIM=4) + ABI_MALLOC(copy,(il1:iu1,il2:iu2,il3:iu3,il4:iu4)) + copy(:,:,:,:)=xval(:,:,:,:) + +end subroutine alloc_copy_int4d_1b +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_copy/alloc_copy_int4d +!! NAME +!! alloc_copy_int4d +!! +!! FUNCTION +!! Performs a copy of an array. +!! +!! SOURCE + +subroutine alloc_copy_int4d(xval, copy) + +!Arguments ------------------------------------ + integer,intent(in) :: xval(:,:,:,:) + integer,allocatable,intent(out) :: copy(:,:,:,:) + +!Local variables------------------------------- + integer :: il1,iu1,il2,iu2,il3,iu3,il4,iu4 +! ********************************************************************* + + il1=lbound(xval,DIM=1); iu1=ubound(xval,DIM=1) + il2=lbound(xval,DIM=2); iu2=ubound(xval,DIM=2) + il3=lbound(xval,DIM=3); iu3=ubound(xval,DIM=3) + il4=lbound(xval,DIM=4); iu4=ubound(xval,DIM=4) + ABI_MALLOC(copy,(il1:iu1,il2:iu2,il3:iu3,il4:iu4)) + copy(:,:,:,:)=xval(:,:,:,:) + +end subroutine alloc_copy_int4d +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_copy/alloc_copy_rdp1d +!! NAME +!! alloc_copy_rdp1d +!! +!! FUNCTION +!! Performs a copy of an array. +!! +!! SOURCE + +subroutine alloc_copy_rdp1d(xval,copy) + +!Arguments ------------------------------------ + real(dp),intent(in) :: xval(:) + real(dp),allocatable,intent(out) :: copy(:) + +!Local variables------------------------------- + integer :: il,iu +! ********************************************************************* + + il=lbound(xval,DIM=1); iu=ubound(xval,DIM=1) + ABI_MALLOC(copy,(il:iu)) + copy(:)=xval(:) + +end subroutine alloc_copy_rdp1d +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_copy/alloc_copy_rdp2d +!! NAME +!! alloc_copy_rdp2d +!! +!! FUNCTION +!! Performs a copy of an array. +!! +!! SOURCE + +subroutine alloc_copy_rdp2d(xval,copy) + +!Arguments ------------------------------------ + real(dp),intent(in) :: xval(:,:) + real(dp),allocatable,intent(out) :: copy(:,:) + +!Local variables------------------------------- + integer :: il1,iu1,il2,iu2 +! ********************************************************************* + + il1=lbound(xval,DIM=1); iu1=ubound(xval,DIM=1) + il2=lbound(xval,DIM=2); iu2=ubound(xval,DIM=2) + ABI_MALLOC(copy,(il1:iu1,il2:iu2)) + copy(:,:)=xval(:,:) + +end subroutine alloc_copy_rdp2d +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_copy/alloc_copy_rdp3d +!! NAME +!! alloc_copy_rdp3d +!! +!! FUNCTION +!! Performs a copy of an array. +!! +!! SOURCE + +subroutine alloc_copy_rdp3d(xval,copy) + +!Arguments ------------------------------------ + real(dp),intent(in) :: xval(:,:,:) + real(dp),allocatable,intent(out) :: copy(:,:,:) + +!Local variables------------------------------- + integer :: il1,iu1,il2,iu2,il3,iu3 +! ********************************************************************* + + il1=lbound(xval,DIM=1); iu1=ubound(xval,DIM=1) + il2=lbound(xval,DIM=2); iu2=ubound(xval,DIM=2) + il3=lbound(xval,DIM=3); iu3=ubound(xval,DIM=3) + ABI_MALLOC(copy,(il1:iu1,il2:iu2,il3:iu3)) + copy(:,:,:)=xval(:,:,:) + +end subroutine alloc_copy_rdp3d +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_copy/alloc_copy_rdp4d +!! NAME +!! alloc_copy_rdp4d +!! +!! FUNCTION +!! Performs a copy of an array. +!! +!! SOURCE + +subroutine alloc_copy_rdp4d(xval,copy) + +!Arguments ------------------------------------ + real(dp),intent(in) :: xval(:,:,:,:) + real(dp),allocatable,intent(out) :: copy(:,:,:,:) + +!Local variables------------------------------- + integer :: il1,iu1,il2,iu2,il3,iu3,il4,iu4 +! ********************************************************************* + + il1=lbound(xval,DIM=1); iu1=ubound(xval,DIM=1) + il2=lbound(xval,DIM=2); iu2=ubound(xval,DIM=2) + il3=lbound(xval,DIM=3); iu3=ubound(xval,DIM=3) + il4=lbound(xval,DIM=4); iu4=ubound(xval,DIM=4) + ABI_MALLOC(copy,(il1:iu1,il2:iu2,il3:iu3,il4:iu4)) + copy(:,:,:,:)=xval(:,:,:,:) + +end subroutine alloc_copy_rdp4d +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_copy/alloc_copy_rdp5d +!! NAME +!! alloc_copy_rdp5d +!! +!! FUNCTION +!! Performs a copy of an array. +!! +!! SOURCE + +subroutine alloc_copy_rdp5d(xval,copy) + +!Arguments ------------------------------------ + real(dp),intent(in) :: xval(:,:,:,:,:) + real(dp),allocatable,intent(out) :: copy(:,:,:,:,:) + +!Local variables------------------------------- + integer :: il1,iu1,il2,iu2,il3,iu3,il4,iu4,il5,iu5 +! ********************************************************************* + + il1=lbound(xval,DIM=1); iu1=ubound(xval,DIM=1) + il2=lbound(xval,DIM=2); iu2=ubound(xval,DIM=2) + il3=lbound(xval,DIM=3); iu3=ubound(xval,DIM=3) + il4=lbound(xval,DIM=4); iu4=ubound(xval,DIM=4) + il5=lbound(xval,DIM=5); iu5=ubound(xval,DIM=5) + ABI_MALLOC(copy,(il1:iu1,il2:iu2,il3:iu3,il4:iu4,il5:iu5)) + copy(:,:,:,:,:)=xval(:,:,:,:,:) + +end subroutine alloc_copy_rdp5d +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_copy/alloc_copy_rdp6d +!! NAME +!! alloc_copy_rdp6d +!! +!! FUNCTION +!! Performs a copy of an array. +!! +!! SOURCE + +subroutine alloc_copy_rdp6d(xval,copy) + +!Arguments ------------------------------------ + real(dp),intent(in) :: xval(:,:,:,:,:,:) + real(dp),allocatable,intent(out) :: copy(:,:,:,:,:,:) + +!Local variables------------------------------- + integer :: il1,iu1,il2,iu2,il3,iu3,il4,iu4,il5,iu5,il6,iu6 +! ********************************************************************* + + il1=lbound(xval,DIM=1); iu1=ubound(xval,DIM=1) + il2=lbound(xval,DIM=2); iu2=ubound(xval,DIM=2) + il3=lbound(xval,DIM=3); iu3=ubound(xval,DIM=3) + il4=lbound(xval,DIM=4); iu4=ubound(xval,DIM=4) + il5=lbound(xval,DIM=5); iu5=ubound(xval,DIM=5) + il6=lbound(xval,DIM=6); iu6=ubound(xval,DIM=6) + ABI_MALLOC(copy,(il1:iu1,il2:iu2,il3:iu3,il4:iu4,il5:iu5,il6:iu6)) + copy(:,:,:,:,:,:)=xval(:,:,:,:,:,:) + +end subroutine alloc_copy_rdp6d +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_copy/alloc_copy_csp1d +!! NAME +!! alloc_copy_csp1d +!! +!! FUNCTION +!! Performs a copy of an array. +!! +!! SOURCE + +subroutine alloc_copy_csp1d(xval,copy) + +!Arguments ------------------------------------ + complex(spc),intent(in) :: xval(:) + complex(spc),allocatable,intent(out) :: copy(:) + +!Local variables------------------------------- + integer :: il,iu +! ********************************************************************* + + il=lbound(xval,DIM=1); iu=ubound(xval,DIM=1) + ABI_MALLOC(copy,(il:iu)) + copy(:)=xval(:) + +end subroutine alloc_copy_csp1d +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_copy/alloc_copy_csp2d +!! NAME +!! alloc_copy_csp2d +!! +!! FUNCTION +!! Performs a copy of an array. +!! +!! SOURCE + +subroutine alloc_copy_csp2d(xval,copy) + +!Arguments ------------------------------------ + complex(spc),intent(in) :: xval(:,:) + complex(spc),allocatable,intent(out) :: copy(:,:) + +!Local variables------------------------------- + integer :: il1,iu1,il2,iu2 +! ********************************************************************* + + il1=lbound(xval,DIM=1); iu1=ubound(xval,DIM=1) + il2=lbound(xval,DIM=2); iu2=ubound(xval,DIM=2) + ABI_MALLOC(copy,(il1:iu1,il2:iu2)) + copy(:,:)=xval(:,:) + +end subroutine alloc_copy_csp2d +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_copy/alloc_copy_csp3d +!! NAME +!! alloc_copy_csp3d +!! +!! FUNCTION +!! Performs a copy of an array. +!! +!! SOURCE + +subroutine alloc_copy_csp3d(xval,copy) + +!Arguments ------------------------------------ + complex(spc),intent(in) :: xval(:,:,:) + complex(spc),allocatable,intent(out) :: copy(:,:,:) + +!Local variables------------------------------- + integer :: il1,iu1,il2,iu2,il3,iu3 +! ********************************************************************* + + il1=lbound(xval,DIM=1); iu1=ubound(xval,DIM=1) + il2=lbound(xval,DIM=2); iu2=ubound(xval,DIM=2) + il3=lbound(xval,DIM=3); iu3=ubound(xval,DIM=3) + ABI_MALLOC(copy,(il1:iu1,il2:iu2,il3:iu3)) + copy(:,:,:)=xval(:,:,:) + +end subroutine alloc_copy_csp3d +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_copy/alloc_copy_csp4d +!! NAME +!! alloc_copy_csp4d +!! +!! FUNCTION +!! Performs a copy of an array. +!! +!! SOURCE + +subroutine alloc_copy_csp4d(xval,copy) + +!Arguments ------------------------------------ + complex(spc),intent(in) :: xval(:,:,:,:) + complex(spc),allocatable,intent(out) :: copy(:,:,:,:) + +!Local variables------------------------------- + integer :: il1,iu1,il2,iu2,il3,iu3,il4,iu4 +! ********************************************************************* + + il1=lbound(xval,DIM=1); iu1=ubound(xval,DIM=1) + il2=lbound(xval,DIM=2); iu2=ubound(xval,DIM=2) + il3=lbound(xval,DIM=3); iu3=ubound(xval,DIM=3) + il4=lbound(xval,DIM=4); iu4=ubound(xval,DIM=4) + ABI_MALLOC(copy,(il1:iu1,il2:iu2,il3:iu3,il4:iu4)) + copy(:,:,:,:)=xval(:,:,:,:) + +end subroutine alloc_copy_csp4d +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_copy/alloc_copy_cdp1d +!! NAME +!! alloc_copy_cdp1d +!! +!! FUNCTION +!! Performs a copy of an array. +!! +!! SOURCE + +subroutine alloc_copy_cdp1d(xval,copy) + +!Arguments ------------------------------------ + complex(dpc),intent(in) :: xval(:) + complex(dpc),allocatable,intent(out) :: copy(:) + +!Local variables------------------------------- + integer :: il,iu +! ********************************************************************* + + il=lbound(xval,DIM=1); iu=ubound(xval,DIM=1) + ABI_MALLOC(copy,(il:iu)) + copy(:)=xval(:) + +end subroutine alloc_copy_cdp1d +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_copy/alloc_copy_cdp2d +!! NAME +!! alloc_copy_cdp2d +!! +!! FUNCTION +!! Performs a copy of an array. +!! +!! SOURCE + +subroutine alloc_copy_cdp2d(xval,copy) + +!Arguments ------------------------------------ + complex(dpc),intent(in) :: xval(:,:) + complex(dpc),allocatable,intent(out) :: copy(:,:) + +!Local variables------------------------------- + integer :: il1,iu1,il2,iu2 +! ********************************************************************* + + il1=lbound(xval,DIM=1); iu1=ubound(xval,DIM=1) + il2=lbound(xval,DIM=2); iu2=ubound(xval,DIM=2) + ABI_MALLOC(copy,(il1:iu1,il2:iu2)) + copy(:,:)=xval(:,:) + +end subroutine alloc_copy_cdp2d +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_copy/alloc_copy_cdp3d +!! NAME +!! alloc_copy_cdp3d +!! +!! FUNCTION +!! Performs a copy of an array. +!! +!! SOURCE + +subroutine alloc_copy_cdp3d(xval,copy) + +!Arguments ------------------------------------ + complex(dpc),intent(in) :: xval(:,:,:) + complex(dpc),allocatable,intent(out) :: copy(:,:,:) + +!Local variables------------------------------- + integer :: il1,iu1,il2,iu2,il3,iu3 +! ********************************************************************* + + il1=lbound(xval,DIM=1); iu1=ubound(xval,DIM=1) + il2=lbound(xval,DIM=2); iu2=ubound(xval,DIM=2) + il3=lbound(xval,DIM=3); iu3=ubound(xval,DIM=3) + ABI_MALLOC(copy,(il1:iu1,il2:iu2,il3:iu3)) + copy(:,:,:)=xval(:,:,:) + +end subroutine alloc_copy_cdp3d +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_copy/alloc_copy_cdp4d +!! NAME +!! alloc_copy_cdp4d +!! +!! FUNCTION +!! Performs a copy of an array. +!! +!! SOURCE + +subroutine alloc_copy_cdp4d(xval,copy) + +!Arguments ------------------------------------ + complex(dpc),intent(in) :: xval(:,:,:,:) + complex(dpc),allocatable,intent(out) :: copy(:,:,:,:) + +!Local variables------------------------------- + integer :: il1,iu1,il2,iu2,il3,iu3,il4,iu4 +! ********************************************************************* + + il1=lbound(xval,DIM=1); iu1=ubound(xval,DIM=1) + il2=lbound(xval,DIM=2); iu2=ubound(xval,DIM=2) + il3=lbound(xval,DIM=3); iu3=ubound(xval,DIM=3) + il4=lbound(xval,DIM=4); iu4=ubound(xval,DIM=4) + ABI_MALLOC(copy,(il1:iu1,il2:il2,il3:iu3,il4:iu4)) + copy(:,:,:,:)=xval(:,:,:,:) + +end subroutine alloc_copy_cdp4d +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_copy/alloc_copy_ch1d +!! NAME +!! alloc_copy_ch1d +!! +!! FUNCTION +!! Performs a copy of an array. +!! +!! NOTES +!! This routine segfaults on XLF, disabled for the time being +!! Should test whether passing slen fixes the problem +!! +!! SOURCE + +subroutine alloc_copy_ch1d(xval,copy,slen) + +!Arguments ------------------------------------ + integer,intent(in) :: slen + character(len=slen),intent(in) :: xval(:) + character(len=slen),allocatable,intent(out) :: copy(:) + +!Local variables------------------------------- + integer :: il,iu +! ********************************************************************* + + il=lbound(xval,DIM=1); iu=ubound(xval,DIM=1) + ABI_MALLOC(copy,(il:iu)) + copy(:)=xval(:) + +end subroutine alloc_copy_ch1d +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_copy/alloc_copy_log1d +!! NAME +!! alloc_copy_log1d +!! +!! FUNCTION +!! Performs a copy of an array. +!! +!! SOURCE + +subroutine alloc_copy_log1d(xval,copy) + +!Arguments ------------------------------------ + logical,intent(in) :: xval(:) + logical,allocatable,intent(out) :: copy(:) + +!Local variables------------------------------- + integer :: il,iu +! ********************************************************************* + + il=lbound(xval,DIM=1); iu=ubound(xval,DIM=1) + ABI_MALLOC(copy,(il:iu)) + copy(:)=xval(:) + +end subroutine alloc_copy_log1d +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_copy/alloc_copy_log2d +!! NAME +!! alloc_copy_log2d +!! +!! FUNCTION +!! Performs a copy of an array. +!! +!! SOURCE + +subroutine alloc_copy_log2d(xval,copy) + +!Arguments ------------------------------------ + logical,intent(in) :: xval(:,:) + logical,allocatable,intent(out) :: copy(:,:) + +!Local variables------------------------------- + integer :: il1,iu1,il2,iu2 +! ********************************************************************* + + il1=lbound(xval,DIM=1); iu1=ubound(xval,DIM=1) + il2=lbound(xval,DIM=2); iu2=ubound(xval,DIM=2) + ABI_MALLOC(copy,(il1:iu1,il2:iu2)) + copy(:,:)=xval(:,:) + +end subroutine alloc_copy_log2d +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_copy/alloc_copy_log3d +!! NAME +!! alloc_copy_log3d +!! +!! FUNCTION +!! Performs a copy of an array. +!! +!! SOURCE + +subroutine alloc_copy_log3d(xval,copy) + +!Arguments ------------------------------------ + logical,intent(in) :: xval(:,:,:) + logical,allocatable,intent(out) :: copy(:,:,:) + +!Local variables------------------------------- + integer :: il1,iu1,il2,iu2,il3,iu3 +! ********************************************************************* + + il1=lbound(xval,DIM=1); iu1=ubound(xval,DIM=1) + il2=lbound(xval,DIM=2); iu2=ubound(xval,DIM=2) + il3=lbound(xval,DIM=3); iu3=ubound(xval,DIM=3) + ABI_MALLOC(copy,(il1:iu1,il2:iu2,il3:iu3)) + copy(:,:,:)=xval(:,:,:) + +end subroutine alloc_copy_log3d +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_copy/alloc_copy_log4d +!! NAME +!! alloc_copy_log4d +!! +!! FUNCTION +!! Performs a copy of an array. +!! +!! SOURCE + +subroutine alloc_copy_log4d(xval,copy) + +!Arguments ------------------------------------ + logical,intent(in) :: xval(:,:,:,:) + logical,allocatable,intent(out) :: copy(:,:,:,:) + +!Local variables------------------------------- + integer :: il1,iu1,il2,iu2,il3,iu3,il4,iu4 +! ********************************************************************* + + il1=lbound(xval,DIM=1); iu1=ubound(xval,DIM=1) + il2=lbound(xval,DIM=2); iu2=ubound(xval,DIM=2) + il3=lbound(xval,DIM=3); iu3=ubound(xval,DIM=3) + il4=lbound(xval,DIM=4); iu4=ubound(xval,DIM=4) + ABI_MALLOC(copy,(il1:iu1,il2:iu2,il3:iu3,il4:iu4)) + copy(:,:,:,:)=xval(:,:,:,:) + +end subroutine alloc_copy_log4d +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_copy/addr_copy_int1d +!! NAME +!! addr_copy_int1d +!! +!! FUNCTION +!! Performs a bitwise copy of a pointer. +!! +!! SOURCE + +subroutine addr_copy_int1d(xval,copy) + +!Arguments ------------------------------------ + integer,pointer :: xval(:) + integer,pointer :: copy(:) + +!Local variables------------------------------- +#if defined HAVE_FC_ISO_C_BINDING + integer :: shp(1) + type(C_PTR) :: ham_ptr +#endif + +! ********************************************************************* + + if (associated(xval)) then +#if defined HAVE_FC_ISO_C_BINDING + shp=shape(xval) + if (product(shp)>0) then + ham_ptr=c_loc(xval(1)) + call c_f_pointer(ham_ptr,copy,shp) + else + ABI_MALLOC(copy,(0)) + end if +#else + copy=transfer(xval,copy) +#endif + else + nullify(copy) + end if + +end subroutine addr_copy_int1d +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_copy/addr_copy_int2d +!! NAME +!! addr_copy_int2d +!! +!! FUNCTION +!! Performs a bitwise copy of a pointer. +!! +!! SOURCE + +subroutine addr_copy_int2d(xval,copy) + +!Arguments ------------------------------------ + integer,pointer :: xval(:,:) + integer,pointer :: copy(:,:) + +!Local variables------------------------------- +#if defined HAVE_FC_ISO_C_BINDING + integer :: shp(2) + type(C_PTR) :: ham_ptr +#endif + +! ********************************************************************* + + if (associated(xval)) then +#if defined HAVE_FC_ISO_C_BINDING + shp=shape(xval) + if (product(shp)>0) then + ham_ptr=c_loc(xval(1,1)) + call c_f_pointer(ham_ptr,copy,shp) + else + ABI_MALLOC(copy,(0,0)) + end if +#else + copy=transfer(xval,copy) +#endif + else + nullify(copy) + end if + +end subroutine addr_copy_int2d +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_copy/addr_copy_int3d +!! NAME +!! addr_copy_int3d +!! +!! FUNCTION +!! Performs a bitwise copy of a pointer. +!! +!! SOURCE + +subroutine addr_copy_int3d(xval,copy) + +!Arguments ------------------------------------ + integer,pointer :: xval(:,:,:) + integer,pointer :: copy(:,:,:) + +!Local variables------------------------------- +#if defined HAVE_FC_ISO_C_BINDING + integer :: shp(3) + type(C_PTR) :: ham_ptr +#endif + +! ********************************************************************* + + if (associated(xval)) then +#if defined HAVE_FC_ISO_C_BINDING + shp=shape(xval) + if (product(shp)>0) then + ham_ptr=c_loc(xval(1,1,1)) + call c_f_pointer(ham_ptr,copy,shp) + else + ABI_MALLOC(copy,(0,0,0)) + end if +#else + copy=transfer(xval,copy) +#endif + else + nullify(copy) + end if + +end subroutine addr_copy_int3d +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_copy/addr_copy_int4d +!! NAME +!! addr_copy_int4d +!! +!! FUNCTION +!! Performs a bitwise copy of a pointer. +!! +!! SOURCE + +subroutine addr_copy_int4d(xval,copy) + +!Arguments ------------------------------------ + integer,pointer :: xval(:,:,:,:) + integer,pointer :: copy(:,:,:,:) + +!Local variables------------------------------- +#if defined HAVE_FC_ISO_C_BINDING + integer :: shp(4) + type(C_PTR) :: ham_ptr +#endif + +! ********************************************************************* + + if (associated(xval)) then +#if defined HAVE_FC_ISO_C_BINDING + shp=shape(xval) + if (product(shp)>0) then + ham_ptr=c_loc(xval(1,1,1,1)) + call c_f_pointer(ham_ptr,copy,shp) + else + ABI_MALLOC(copy,(0,0,0,0)) + end if +#else + copy=transfer(xval,copy) +#endif + else + nullify(copy) + end if + +end subroutine addr_copy_int4d +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_copy/addr_copy_dp1d +!! NAME +!! addr_copy_dp1d +!! +!! FUNCTION +!! Performs a bitwise copy of a pointer. +!! +!! SOURCE + +subroutine addr_copy_dp1d(xval,copy) + +!Arguments ------------------------------------ + real(dp),pointer :: xval(:) + real(dp),pointer :: copy(:) + +!Local variables------------------------------- +#if defined HAVE_FC_ISO_C_BINDING + integer :: shp(1) + type(C_PTR) :: ham_ptr +#endif + +! ********************************************************************* + + if (associated(xval)) then +#if defined HAVE_FC_ISO_C_BINDING + shp=shape(xval) + if (product(shp)>0) then + ham_ptr=c_loc(xval(1)) + call c_f_pointer(ham_ptr,copy,shp) + else + ABI_MALLOC(copy,(0)) + end if +#else + copy=transfer(xval,copy) +#endif + else + nullify(copy) + end if + +end subroutine addr_copy_dp1d +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_copy/addr_copy_dp2d +!! NAME +!! addr_copy_dp2d +!! +!! FUNCTION +!! Performs a bitwise copy of a pointer. +!! +!! SOURCE + +subroutine addr_copy_dp2d(xval,copy) + +!Arguments ------------------------------------ + real(dp),pointer :: xval(:,:) + real(dp),pointer :: copy(:,:) + +!Local variables------------------------------- +#if defined HAVE_FC_ISO_C_BINDING + integer :: shp(2) + type(C_PTR) :: ham_ptr +#endif + +! ********************************************************************* + + if (associated(xval)) then +#if defined HAVE_FC_ISO_C_BINDING + shp=shape(xval) + if (product(shp)>0) then + ham_ptr=c_loc(xval(1,1)) + call c_f_pointer(ham_ptr,copy,shp) + else + ABI_MALLOC(copy,(0,0)) + end if +#else + copy=transfer(xval,copy) +#endif + else + nullify(copy) + end if + +end subroutine addr_copy_dp2d +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_copy/addr_copy_dp3d +!! NAME +!! addr_copy_dp3d +!! +!! FUNCTION +!! Performs a bitwise copy of a pointer. +!! +!! SOURCE + +subroutine addr_copy_dp3d(xval,copy) + +!Arguments ------------------------------------ + real(dp),pointer :: xval(:,:,:) + real(dp),pointer :: copy(:,:,:) + +!Local variables------------------------------- +#if defined HAVE_FC_ISO_C_BINDING + integer :: shp(3) + type(C_PTR) :: ham_ptr +#endif + +! ********************************************************************* + + if (associated(xval)) then +#if defined HAVE_FC_ISO_C_BINDING + shp=shape(xval) + if (product(shp)>0) then + ham_ptr=c_loc(xval(1,1,1)) + call c_f_pointer(ham_ptr,copy,shp) + else + ABI_MALLOC(copy,(0,0,0)) + end if +#else + copy=transfer(xval,copy) +#endif + else + nullify(copy) + end if + +end subroutine addr_copy_dp3d +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_copy/addr_copy_dp4d +!! NAME +!! addr_copy_dp4d +!! +!! FUNCTION +!! Performs a bitwise copy of a pointer. +!! +!! SOURCE + +subroutine addr_copy_dp4d(xval,copy) + +!Arguments ------------------------------------ + real(dp),pointer :: xval(:,:,:,:) + real(dp),pointer :: copy(:,:,:,:) + +!Local variables------------------------------- +#if defined HAVE_FC_ISO_C_BINDING + integer :: shp(4) + type(C_PTR) :: ham_ptr +#endif + +! ********************************************************************* + + if (associated(xval)) then +#if defined HAVE_FC_ISO_C_BINDING + shp=shape(xval) + if (product(shp)>0) then + ham_ptr=c_loc(xval(1,1,1,1)) + call c_f_pointer(ham_ptr,copy,shp) + else + ABI_MALLOC(copy,(0,0,0,0)) + end if +#else + copy=transfer(xval,copy) +#endif + else + nullify(copy) + end if + +end subroutine addr_copy_dp4d +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_copy/addr_copy_dp5d +!! NAME +!! addr_copy_dp5d +!! +!! FUNCTION +!! Performs a bitwise copy of a pointer. +!! +!! SOURCE + +subroutine addr_copy_dp5d(xval,copy) + +!Arguments ------------------------------------ + real(dp),pointer :: xval(:,:,:,:,:) + real(dp),pointer :: copy(:,:,:,:,:) + +!Local variables------------------------------- +#if defined HAVE_FC_ISO_C_BINDING + integer :: shp(5) + type(C_PTR) :: ham_ptr +#endif + +! ********************************************************************* + + if (associated(xval)) then +#if defined HAVE_FC_ISO_C_BINDING + shp=shape(xval) + if (product(shp)>0) then + ham_ptr=c_loc(xval(1,1,1,1,1)) + call c_f_pointer(ham_ptr,copy,shp) + else + ABI_MALLOC(copy,(0,0,0,0,0)) + end if +#else + copy=transfer(xval,copy) +#endif + else + nullify(copy) + end if + +end subroutine addr_copy_dp5d +!!*** + +END MODULE m_copy +!!*** diff --git a/GX-PAW/common/src/27_toolbox_oop/m_copy.o b/GX-PAW/common/src/27_toolbox_oop/m_copy.o new file mode 100644 index 00000000..e55c453b Binary files /dev/null and b/GX-PAW/common/src/27_toolbox_oop/m_copy.o differ diff --git a/GX-PAW/common/src/27_toolbox_oop/m_iterators.F90 b/GX-PAW/common/src/27_toolbox_oop/m_iterators.F90 new file mode 100644 index 00000000..43e38728 --- /dev/null +++ b/GX-PAW/common/src/27_toolbox_oop/m_iterators.F90 @@ -0,0 +1,531 @@ +!!****m* ABINIT/m_iterators +!! NAME +!! m_iterators +!! +!! FUNCTION +!! This module defines objects (iterators) that are used to facilitate the +!! iteration over the elements of an ensemble e.g. set of transitions. +!! +!! COPYRIGHT +!! Copyright (C) 2009-2024 ABINIT group (MG) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! NOTES +!! Iterators are used to obtain an indirect indexing that can be used to access array elements +!! or array sections. An iterator is an object that contains the list of indices that should +!! be treated. Each processor has its own local version initialized according the the distribution +!! of the data across the nodes. +!! Using iterators for looping facilitates the implementation of MPI algorithms since all the +!! information on the distribution of the tasks is stored in the iterator itself +!! For example an MPI loop over spins, k-points and bands can be written in terms of iterators using: +!! +!! do isp=1,iter_len(Iter_bks) +!! spin = iter_yield(Iter_bks,idx3=isp) +!! +!! do ikp=1,iter_len(Iter_bks,idx3=isp) +!! ik_ibz = iter_yield(Iter_bks,idx2=ikp,idx3=isp) +!! +!! do ibn=1,iter_len(Iter_bks,idx2=ikp,idx3=isp) +!! band = iter_yield(Iter_bks,entry1=ibn,idx2=ikp,idx3=isp) +!! +!! iter_len gives the number of non-zero entries +!! iter_yield returns the global indices used to access the data. +!! +!! The main advantage is seen in sections of code that are MPI parallelized because each node +!! will have its own iterator (to be initialized by the programmer). +!! Therefore it is very easy to distribute the workload among the nodes without having to +!! to use "cycle" of "if then" instruction in the inners loops. +!! Another important advantage is that the MPI implementation will continue to work even +!! if the data distribution is changed, only the iterator has to be modified. +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" + +MODULE m_iterators + + use defs_basis + use m_abicore + use m_errors + + implicit none + + private +!!*** + +!---------------------------------------------------------------------- + +!!****t* m_iterators/indices_t +!! NAME +!! indices_t +!! +!! FUNCTION +!! A base datatype for constructing ragged arrays. +!! +!! SOURCE + + type,private :: indices_t + integer :: leng + integer, allocatable :: indx(:) + ! indx(leng) The set of indices. + end type indices_t +!!*** + +!---------------------------------------------------------------------- + +!!****t* m_iterators/iter2_t +!! NAME +!! iter2_t +!! +!! FUNCTION +!! +!! SOURCE + + type,public :: iter2_t + private + integer :: sizes(2) + integer :: starts(2) + type(indices_t),allocatable :: slice(:,:) + ! Temporary structure to store the indices in full storage mode. + +#if 0 + integer :: len3 + ! The number of non-zero entries in the last dimension. + + integer,allocatable :: map3(:) + ! map3(len3) + ! Indirect indexing packed --> full for the last dimension. + + integer,allocatable :: len2(:) + ! len2(len3) + ! Gives the number of non-zero entries along the second dimension for each non-null index along the 3-dimension. + + type(indices_t),allocatable :: map2(:) + ! map2(len3)%indices + ! Indirect indexing packed --> full for the second dimension. + + type(indices_t),allocatable :: len1(:,:) + ! len1(MAX(len2),len3) + ! Gives the number of non-zero entries along the first dimension. + + type(indices_t),allocatable :: map1(:) + ! map1(MAX(len2),len3)%indices + ! Indirect indexing packed --> full for the first dimension. +#endif + + end type iter2_t + + public :: iter_alloc ! Allocate the iterator. + public :: iter_push ! Copy a set of indices in the iterator + public :: iter_free ! Deallocate the iterator. + public :: OPERATOR(.LBOUND.) ! + public :: OPERATOR(.UBOUND.) ! + public :: OPERATOR(.SIZE.) ! + public :: iter_len ! The number of indices in a slice of the iterator + public :: iter_yield ! Return the indices in of the slice of the iterator. + public :: iter_print ! Printout of the iterator, just for debugging purposes. +!!*** + + interface iter_alloc + module procedure iter2_alloc + !module procedure iter3_alloc + end interface iter_alloc + + interface iter_push + module procedure iter2_push + !module procedure iter3_push + end interface iter_push + + interface iter_free + module procedure iter2_free + !module procedure iter3_free + end interface iter_free + + interface operator(.lbound.) + module procedure iter2_lbound + !module procedure iter3_lbound + end interface + + interface operator(.ubound.) + module procedure iter2_ubound + !module procedure iter3_ubound + end interface + + interface operator(.size.) + module procedure iter2_size + !module procedure iter3_size + end interface + + interface iter_len + module procedure iter2_len + !module procedure iter3_len + end interface iter_len + + interface iter_yield + module procedure iter2_yield + !module procedure iter3_yield + end interface iter_yield + + interface iter_print + module procedure iter2_print + !module procedure iter3_print + end interface iter_print + +CONTAINS !=========================================================== +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_iterators/indices_free +!! NAME +!! indices_free +!! +!! FUNCTION +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +subroutine indices_free(Ids) + +!Arguments ------------------------------------ + type(indices_t),intent(inout) :: Ids + +! ************************************************************************* + + Ids%leng=0 + ABI_SFREE(Ids%indx) + +end subroutine indices_free +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_iterators/iter2_alloc +!! NAME +!! iter2_alloc +!! +!! FUNCTION +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +subroutine iter2_alloc(Iter2,sizes,starts) + + +!Arguments ------------------------------------ +!scalars + type(iter2_t),intent(inout) :: Iter2 +!arrays + integer,intent(in) :: sizes(2) + integer,optional,intent(in) :: starts(2) + +!Local variables ------------------------------ +!scalars + integer :: s1,s2,i1,i2 + +!************************************************************************ + s1=1; s2=1 + if (PRESENT(starts)) then + s1=starts(1) + s2=starts(2) + end if + + Iter2%starts=(/s1,s2/) + Iter2%sizes =sizes + + ABI_MALLOC( Iter2%slice,(s1:s1+sizes(1)-1, s2:s2+sizes(2)-1)) + + do i2=LBOUND(Iter2%slice,DIM=2),UBOUND(Iter2%slice,DIM=2) + do i1=LBOUND(Iter2%slice,DIM=1),UBOUND(Iter2%slice,DIM=1) + Iter2%slice(i1,i2)%leng=0 + end do + end do + +end subroutine iter2_alloc +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_iterators/iter2_push +!! NAME +!! iter2_push +!! +!! FUNCTION +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +subroutine iter2_push(Iter2,i1,i2,list) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: i1,i2 + type(iter2_t),intent(inout) :: Iter2 +!arrays + integer,intent(in) :: list(:) + +!Local variables ------------------------------ +!scalars + integer :: leng + +!************************************************************************ + + leng = SIZE(list) + + if (allocated( Iter2%slice(i1,i2)%indx) ) then + ABI_ERROR("Iter2%slice already allocated") + end if + + Iter2%slice(i1,i2)%leng = leng + ABI_MALLOC(Iter2%slice(i1,i2)%indx,(leng)) + Iter2%slice(i1,i2)%indx(:) = list + +end subroutine iter2_push +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_iterators/iter2_free +!! NAME +!! iter2_free +!! +!! FUNCTION +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +subroutine iter2_free(Iter2) + +!Arguments ------------------------------------ +!scalars + type(iter2_t),intent(inout) :: Iter2 + +!Local variables ------------------------------ +!scalars + integer :: i1,i2 + +!************************************************************************ + + do i2=LBOUND(Iter2%slice,DIM=2),UBOUND(Iter2%slice,DIM=2) + do i1=LBOUND(Iter2%slice,DIM=1),UBOUND(Iter2%slice,DIM=1) + call indices_free(Iter2%slice(i1,i2)) + end do + end do + + ABI_SFREE(Iter2%slice) + +end subroutine iter2_free +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_iterators/iter2_len +!! NAME +!! iter2_len +!! +!! FUNCTION +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +function iter2_len(Iter2,i1,i2) + +!Arguments ------------------------------------ + integer,intent(in) :: i1,i2 + integer :: iter2_len + type(iter2_t),intent(in) :: Iter2 + +! ************************************************************************* + + iter2_len = Iter2%slice(i1,i2)%leng + +end function iter2_len +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_iterators/iter2_lbound +!! NAME +!! iter2_lbound +!! +!! FUNCTION +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +function iter2_lbound(Iter2,dim) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: dim + integer :: iter2_lbound + type(iter2_t),intent(in) :: Iter2 + +!************************************************************************ + + iter2_lbound = Iter2%starts(dim) + +end function iter2_lbound +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_iterators/iter2_ubound +!! NAME +!! iter2_ubound +!! +!! FUNCTION +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +function iter2_ubound(Iter2,dim) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: dim + integer :: iter2_ubound + type(iter2_t),intent(in) :: Iter2 + +!************************************************************************ + + iter2_ubound = Iter2%starts(dim) + Iter2%sizes(dim) -1 + +end function iter2_ubound +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_iterators/iter2_size +!! NAME +!! iter2_size +!! +!! FUNCTION +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +function iter2_size(Iter2,dim) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: dim + integer :: iter2_size + type(iter2_t),intent(in) :: Iter2 + +!************************************************************************ + + iter2_size = iter2_ubound(Iter2,dim) - iter2_lbound(Iter2,dim) + 1 + +end function iter2_size +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_iterators/iter2_yield +!! NAME +!! iter2_yield +!! +!! FUNCTION +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +function iter2_yield(Iter2,idx,i1,i2) + +!Arguments ------------------------------------ + integer,intent(in) :: idx,i1,i2 + integer :: iter2_yield + type(iter2_t),intent(in) :: Iter2 + +! ************************************************************************* + + iter2_yield = Iter2%slice(i1,i2)%indx(idx) + +end function iter2_yield +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_iterators/iter2_print +!! NAME +!! iter2_print +!! +!! FUNCTION +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +subroutine iter2_print(Iter2,header,unit,mode_paral,prtvol) + +!Arguments ------------------------------------ +!scalars + integer,optional,intent(in) :: unit,prtvol + character(len=4),optional,intent(in) :: mode_paral + character(len=*),optional,intent(in) :: header + type(iter2_t),intent(in) :: Iter2 + +!Local variables------------------------------- + integer :: my_unt,my_prtvol,ntot,i1,i2,idx + character(len=4) :: my_mode + character(len=500) :: msg +! ********************************************************************* + + my_unt =std_out; if (PRESENT(unit )) my_unt =unit + my_prtvol=0 ; if (PRESENT(prtvol )) my_prtvol=prtvol + my_mode ='COLL' ; if (PRESENT(mode_paral)) my_mode =mode_paral + + msg=' ==== Content of the iter2_t object ==== ' + if (PRESENT(header)) msg=' ==== '//TRIM(ADJUSTL(header))//' ==== ' + call wrtout(my_unt,msg,my_mode) + + ntot = PRODUCT(Iter2%sizes) + write(std_out,*)"total number of elements:",ntot + write(std_out,*)"list of indices: " + + do i2=iter2_lbound(Iter2,DIM=2),iter2_ubound(Iter2,DIM=2) + do i1=iter2_lbound(Iter2,DIM=1),iter2_lbound(Iter2,DIM=1) + write(std_out,*) (iter_yield(Iter2,idx,i1,i2), idx=1,iter_len(Iter2,i1,i2)) + end do + end do + +end subroutine iter2_print + +END MODULE m_iterators +!!*** diff --git a/GX-PAW/common/src/27_toolbox_oop/m_iterators.o b/GX-PAW/common/src/27_toolbox_oop/m_iterators.o new file mode 100644 index 00000000..06097fa6 Binary files /dev/null and b/GX-PAW/common/src/27_toolbox_oop/m_iterators.o differ diff --git a/GX-PAW/common/src/27_toolbox_oop/m_mpiotk.F90 b/GX-PAW/common/src/27_toolbox_oop/m_mpiotk.F90 new file mode 100644 index 00000000..3591c556 --- /dev/null +++ b/GX-PAW/common/src/27_toolbox_oop/m_mpiotk.F90 @@ -0,0 +1,855 @@ +!!****m* ABINIT/m_mpiotk +!! NAME +!! m_mpiotk +!! +!! FUNCTION +!! This module provides helper functions for MPI-IO operations. +!! +!! COPYRIGHT +!! Copyright (C) 2009-2024 ABINIT group (MG) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! For the initials of contributors, see ~abinit/doc/developers/contributors.txt. +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" + +MODULE m_mpiotk + + use defs_basis + use m_abicore + use m_errors + use m_xmpi +#if defined HAVE_MPI2 && defined HAVE_MPI_IO + use mpi +#endif + + use iso_c_binding + + implicit none + +#if defined HAVE_MPI1 && defined HAVE_MPI_IO + include 'mpif.h' +#endif + + private + +!public procedures. +#ifdef HAVE_MPI_IO + public :: mpiotk_read_fsuba_dp2D ! (individual|collective) read of a 2D sub-matrix + public :: mpiotk_write_fsuba_dp2D ! (individual|collective) write of a 2D sub-matrix + + public :: mpiotk_read_fsuba_dpc3D ! (individual|collective) read of a 3D sub-matrix + !public :: mpiotk_write_fsuba_dpc3D ! (individual|collective) write of a 3D sub-matrix + + public :: mpiotk_read_fsuba_dpc4D ! (individual|collective) read of a 4D sub-matrix + !public :: mpiotk_write_fsuba_dpc4D ! (individual|collective) write of a 4D sub-matrix +#else + public :: no_mpiotk +#endif +!!*** + +CONTAINS +!!*** + +#ifndef HAVE_MPI_IO + +!---------------------------------------------------------------------- + +!!****f* m_mpiotk/no_mpiotk +!! NAME +!! no_mpiotk +!! +!! FUNCTION +!! Empty placeholder. +!! +!! SOURCE + +subroutine no_mpiotk() + +! ************************************************************************* + +end subroutine no_mpiotk +!!*** + +#else + +!!****f* m_mpiotk/setup_fsuba_dp2D +!! NAME +!! setup_fsuba_dp2D +!! +!! FUNCTION +!! Setup tables used in (read|write) a 2D array stored in a Fortran file +!! +!! NOTES +!! The value of ierr should always be checked by the caller +!! +!! INPUTS +!! sizes(2) +!! subsizes(2) +!! starts(2) +!! chunk_bsize = +!! comm = MPI communicator +!! +!! OUTPUTS +!! my_basead(:) +!! my_subsizes(:,:) +!! my_starts(:,:) +!! ierr=status error. A non zero value indicates that chunk_bsize is smaller that the fortran record +!! and therefore bufsz has not been read. +!! +!! SOURCE + +subroutine setup_fsuba_dp2D(sizes,subsizes,starts,chunk_bsize,& + my_basead,my_subsizes,my_starts,my_ncalls,ncalls,comm,ierr) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: comm + integer,intent(out) :: ncalls,my_ncalls,ierr + integer(XMPI_OFFSET_KIND),intent(in) :: chunk_bsize +!arrays + integer,intent(in) :: sizes(2),subsizes(2),starts(2) + integer,allocatable,intent(out) :: my_basead(:),my_subsizes(:,:),my_starts(:,:) + +!Local variables ------------------------------ +!scalars + integer :: mpierr,ny2read,ny_chunk,icall,yrest + integer :: size_x,subs_x,start_x,start_y,stop_y + !character(len=500) :: msg + +!************************************************************************ + + size_x = sizes(1) + subs_x = subsizes(1) + start_x = starts(1) + start_y = starts(2) + stop_y = start_y + subsizes(2)-1 ! last column to read + ! + ! Read rows in blocks of size ny_chunk: + ! MPI-IO crashes if we try to read data > 2Gb in a single call. + ny2read = subsizes(2) + ny_chunk = ny2read + if ((two*subs_x*ny2read*xmpi_bsize_dp) > chunk_bsize) then + ny_chunk = chunk_bsize / (2*subs_x*xmpi_bsize_dp) + !if (ny_chunk == 0) ny_chunk = 50 + end if + + call xmpi_min(ny_chunk,ierr,comm,mpierr) + if (ierr == 0) then + ierr = 1 + RETURN + end if + ierr = 0 + ! + ! my_ncalls : number of read needed to fill my buffer. + ! ncalls : max number of read in comm (needed for collective operations). + my_ncalls = ny2read / ny_chunk + yrest = MOD(ny2read, ny_chunk) + if (yrest /= 0) my_ncalls = my_ncalls + 1 + + call xmpi_max(my_ncalls,ncalls,comm,mpierr) + ! + ! Compute arrays used to define the file view. + ABI_MALLOC(my_subsizes,(2,ncalls)) + ABI_MALLOC(my_starts,(2,ncalls)) + ABI_MALLOC(my_basead,(ncalls)) + + do icall=1,my_ncalls + + if (icall*ny_chunk <= ny2read) then + my_subsizes(:,icall) = (/subs_x, ny_chunk/) + my_starts(:,icall) = (/start_x, (icall-1) * ny_chunk + start_y/) + my_basead(icall) = 1 + 2*(icall-1)*ny_chunk*subs_x ! 2 accounts for real and imag part. + else + ! Two cases: + ! 1) ny2read > ny_chunk and not divisible by ny2read + ! 2) ny2read < ny_chunk + my_subsizes(:,icall) = (/subs_x, yrest/) + if (ny2read >= ny_chunk) then + my_starts(:,icall) = (/start_x, stop_y-yrest+1/) + my_basead(icall) = 1 + 2 * (ny2read-yrest) * subs_x ! 2 accounts for real and imag part. + else + my_starts(:,icall) = starts + my_basead(icall) = 1 + end if + end if + end do + !write(std_out,*)" >>>> my_ncalls, ncalls, ny2read, ny_chunk ",my_ncalls,ncalls,ny2read,ny_chunk + +end subroutine setup_fsuba_dp2D +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_mpiotk/mpiotk_read_fsuba_dp2D +!! NAME +!! mpiotk_read_fsuba_dp2D +!! +!! FUNCTION +!! Read a block of contiguous data stored in a 2D matrix. +!! Data is placed within Fortran records. Target: complex data stored in a real array. +!! +!! NOTES +!! The value of ierr should always be checked by the caller +!! +!! INPUTS +!! fh = MPI-IO file handler. +!! offset = +!! sizes(2) +!! subsizes(2) +!! starts(2) +!! bufsz = dimension of buffer (takes into accout both real and imaginary part) +!! chunk_bsize = +!! sc_mode= MPI-IO option +!! xmpio_single ==> for reading by current proc. +!! xmpio_collective ==> for collective reading. +!! comm = MPI communicator +!! +!! OUTPUTS +!! buffer(bufsz) +!! ierr=status error. A non zero value indicates that chunk_bsize is smaller that the fortran record +!! and therefore bufsz has not been read. +!! +!! SOURCE + +subroutine mpiotk_read_fsuba_dp2D(fh,offset,sizes,subsizes,starts,bufsz,buffer,chunk_bsize,sc_mode,comm,ierr) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: fh,comm,bufsz,sc_mode + integer,intent(out) :: ierr + integer(XMPI_OFFSET_KIND),intent(in) :: offset,chunk_bsize +!arrays + integer,intent(in) :: sizes(2),subsizes(2),starts(2) + real(dp),intent(out),target :: buffer(bufsz) + +!Local variables ------------------------------ +!scalars + integer :: mpierr,ptr,ncount,myfh + integer :: fsub_type,my_ncalls,icall,ncalls,subs_x + integer(XMPI_OFFSET_KIND) :: my_offset,my_offpad + !character(len=500) :: msg + type(c_ptr) :: cptr +!arrays + integer :: call_subsizes(2),call_starts(2) + integer,allocatable :: my_basead(:),my_subsizes(:,:),my_starts(:,:) + real(dp),allocatable :: dummy_buf(:,:) + real(dp),pointer :: buf_ptr(:) + +!************************************************************************ + + ! Workaround for XLF + myfh = fh + + if (bufsz < 2 * PRODUCT(subsizes) ) then + ABI_ERROR("bufsz is too small") + end if + + if (sc_mode==xmpio_single) then + ! This makes the automatic tests fail (cut3d) + !ABI_WARNING("comm != xmpi_comm_self") + else if (sc_mode==xmpio_collective) then + continue + else + ABI_ERROR("Wrong sc_mode") + end if + + subs_x = subsizes(1) + + call setup_fsuba_dp2D(sizes,subsizes,starts,chunk_bsize,my_basead,my_subsizes,my_starts,my_ncalls,ncalls,comm,ierr) + if (ierr/=0) RETURN + + do icall=1,ncalls + + if (icall <= my_ncalls) then + call_subsizes = my_subsizes(:,icall) + call_starts = my_starts(:,icall) + ptr = my_basead(icall) + else + ! Fake values needed to call read_all collectively. + call_subsizes = (/subs_x, 1/) + call_starts = starts + end if + ncount = PRODUCT(call_subsizes) + !write(std_out,*)" icall,ptr, ncount, ",icall,ptr,ncount + !write(std_out,*)" call_starts",call_starts + !write(std_out,*)" call_subsizes",call_subsizes + + ! Create subarry file view. + call xmpio_create_fsubarray_2D(sizes,call_subsizes,call_starts,MPI_DOUBLE_COMPLEX,fsub_type,my_offpad,mpierr) + ABI_CHECK_MPI(mpierr,"fsubarray_2D") + + ! Update the offset. + my_offset = offset + my_offpad + + call MPI_FILE_SET_VIEW(myfh, my_offset, MPI_BYTE, fsub_type, 'native', MPI_INFO_NULL, mpierr) + ABI_CHECK_MPI(mpierr,"SET_VIEW") + + call MPI_TYPE_FREE(fsub_type, mpierr) + ABI_CHECK_MPI(mpierr,"MPI_TYPE_FREE") + + if (sc_mode==xmpio_collective) then + ! Collective read + if (icall <= my_ncalls) then + cptr=c_loc(buffer(ptr)) ; call c_f_pointer(cptr,buf_ptr,[ncount]) + call MPI_FILE_READ_ALL(myfh, buf_ptr, ncount, MPI_DOUBLE_COMPLEX, MPI_STATUS_IGNORE, mpierr) + else + ABI_MALLOC(dummy_buf,(2,subs_x)) + call MPI_FILE_READ_ALL(myfh, dummy_buf, ncount, MPI_DOUBLE_COMPLEX, MPI_STATUS_IGNORE, mpierr) + ABI_FREE(dummy_buf) + end if + ABI_CHECK_MPI(mpierr,"FILE_READ_ALL") + + else + ! Individual read. + cptr=c_loc(buffer(ptr)) ; call c_f_pointer(cptr,buf_ptr,[ncount]) + call MPI_FILE_READ(myfh, buf_ptr, ncount, MPI_DOUBLE_COMPLEX, MPI_STATUS_IGNORE, mpierr) + ABI_CHECK_MPI(mpierr,"FILE_READ") + end if + + end do + + ABI_FREE(my_subsizes) + ABI_FREE(my_starts) + ABI_FREE(my_basead) + +end subroutine mpiotk_read_fsuba_dp2D +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_mpiotk/mpiotk_write_fsuba_dp2D +!! NAME +!! mpiotk_write_fsuba_dp2D +!! +!! FUNCTION +!! Write a block of contiguous data stored in a 2D matrix. +!! Data is placed within Fortran records. Target: complex data stored in a real array. +!! +!! NOTES +!! The value of ierr should always be checked by the caller +!! +!! INPUTS +!! fh = MPI-IO file handler. +!! offset = +!! sizes(2) +!! subsizes(2) +!! starts(2) +!! bufsz = dimension of buffer (takes into accout both real and imaginary part) +!! buffer(bufsz) +!! chunk_bsize = +!! sc_mode= MPI-IO option +!! xmpio_single ==> for reading by current proc. +!! xmpio_collective ==> for collective reading. +!! comm = MPI communicator +!! +!! OUTPUTS +!! ierr=status error. A non zero value indicates that chunk_bsize is smaller that the fortran record +!! and therefore bufsz has not been written. +!! +!! SOURCE + +subroutine mpiotk_write_fsuba_dp2D(fh,offset,sizes,subsizes,starts,bufsz,buffer,chunk_bsize,sc_mode,comm,ierr) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: fh,comm,bufsz,sc_mode + integer,intent(out) :: ierr + integer(XMPI_OFFSET_KIND),intent(in) :: offset,chunk_bsize +!arrays + integer,intent(in) :: sizes(2),subsizes(2),starts(2) + real(dp),intent(in),target :: buffer(bufsz) + +!Local variables ------------------------------ +!scalars + integer :: mpierr,ptr,ncount,myfh + integer :: fsub_type,my_ncalls,icall,ncalls,subs_x + integer(XMPI_OFFSET_KIND) :: my_offset,my_offpad + type(c_ptr) :: cptr + !character(len=500) :: msg +!arrays + integer :: call_subsizes(2),call_starts(2) + integer,allocatable :: my_basead(:),my_subsizes(:,:),my_starts(:,:) +real(dp),pointer :: buf_ptr(:) + +!************************************************************************ + + DBG_ENTER("COLL") + + ! Workaround for XLF + myfh = fh + + if (bufsz < 2 * PRODUCT(subsizes) ) then + ABI_ERROR("bufsz is too small") + end if + + if (sc_mode==xmpio_single) then + call setup_fsuba_dp2D(sizes,subsizes,starts,chunk_bsize,my_basead,my_subsizes,my_starts,my_ncalls,ncalls,xmpi_comm_self,ierr) + else if (sc_mode==xmpio_collective) then + call setup_fsuba_dp2D(sizes,subsizes,starts,chunk_bsize,my_basead,my_subsizes,my_starts,my_ncalls,ncalls,comm,ierr) + else + ABI_ERROR("Wrong sc_mode") + end if + if (ierr/=0) RETURN + + subs_x = subsizes(1) + do icall=1,ncalls + + if (icall <= my_ncalls) then + call_subsizes = my_subsizes(:,icall) + call_starts = my_starts(:,icall) + ptr = my_basead(icall) + else + ! Fake values needed to call write_all collectively. + call_subsizes = (/subs_x, 1/) + call_starts = starts + end if + ncount = PRODUCT(call_subsizes) + !write(std_out,*)" icall,ptr, ncount, ",icall,ptr,ncount + !write(std_out,*)" call_starts",call_starts + !write(std_out,*)" call_subsizes",call_subsizes + + ! Create subarry file view. + call xmpio_create_fsubarray_2D(sizes,call_subsizes,call_starts,MPI_DOUBLE_COMPLEX,fsub_type,my_offpad,mpierr) + ABI_CHECK_MPI(mpierr,"fsubarray_2D") + + ! Update the offset. + my_offset = offset + my_offpad + + call MPI_FILE_SET_VIEW(myfh, my_offset, MPI_BYTE, fsub_type, 'native', MPI_INFO_NULL, mpierr) + ABI_CHECK_MPI(mpierr,"SET_VIEW") + + call MPI_TYPE_FREE(fsub_type, mpierr) + ABI_CHECK_MPI(mpierr,"MPI_TYPE_FREE") + + if (sc_mode==xmpio_collective) then + ! Collective write + if (icall <= my_ncalls) then + cptr=c_loc(buffer(ptr)) ; call c_f_pointer(cptr,buf_ptr,[ncount]) + call MPI_FILE_WRITE_ALL(myfh, buf_ptr, ncount, MPI_DOUBLE_COMPLEX, MPI_STATUS_IGNORE, mpierr) + else + ! Re-write my first chunk of data. + cptr=c_loc(buffer(1)) ; call c_f_pointer(cptr,buf_ptr,[ncount]) + call MPI_FILE_WRITE_ALL(myfh, buf_ptr, ncount, MPI_DOUBLE_COMPLEX, MPI_STATUS_IGNORE, mpierr) + end if + ABI_CHECK_MPI(mpierr,"FILE_WRITE_ALL") + + else + ! Individual write. + cptr=c_loc(buffer(ptr)) ; call c_f_pointer(cptr,buf_ptr,[ncount]) + call MPI_FILE_WRITE(myfh, buf_ptr, ncount, MPI_DOUBLE_COMPLEX, MPI_STATUS_IGNORE, mpierr) + ABI_CHECK_MPI(mpierr,"FILE_WRITE") + end if + + end do + + ABI_FREE(my_subsizes) + ABI_FREE(my_starts) + ABI_FREE(my_basead) + + DBG_EXIT("COLL") + +end subroutine mpiotk_write_fsuba_dp2D +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_mpiotk/mpiotk_read_fsuba_dpc3D +!! NAME +!! mpiotk_read_fsuba_dpc3D +!! +!! FUNCTION +!! Read of a block of contiguous data stored in a 3D matrix. +!! Data is placed within Fortran records. Target: complex data stored in a complex array. +!! +!! NOTES +!! The value of ierr should always be checked by the caller +!! +!! INPUTS +!! fh = MPI-IO file handler. +!! offset = +!! sizes(3) +!! subsizes(3) +!! starts(3) +!! bufsz = dimension of cbuffer +!! chunk_bsize = +!! comm = MPI communicator +!! sc_mode= MPI-IO option +!! xmpio_single ==> for reading by current proc. +!! xmpio_collective ==> for collective reading. +!! +!! OUTPUTS +!! cbuffer(bufsz) +!! ierr=status error. A non zero value indicates that chunk_bsize is smaller that the fortran record +!! and therefore bufsz has not been read. +!! +!! SOURCE + +subroutine mpiotk_read_fsuba_dpc3D(fh,offset,sizes,subsizes,starts,bufsz,cbuffer,chunk_bsize,sc_mode,comm,ierr) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: fh,comm,bufsz,sc_mode + integer,intent(out) :: ierr + integer(XMPI_OFFSET_KIND),intent(in) :: offset,chunk_bsize +!arrays + integer,intent(in) :: sizes(3),subsizes(3),starts(3) + complex(dpc),intent(out),target :: cbuffer(bufsz) + +!Local variables------------------------------- +!scalars + integer :: mpierr,nz2read,nz_chunk,ptr,ncount,myfh + integer :: fsub_type,my_ncalls,icall,zrest,ncalls + integer :: size_x,size_y,subs_x,subs_y,subs_xy,start_x,start_y,start_z,stop_z + integer(XMPI_OFFSET_KIND) :: my_offset,my_offpad + !character(len=500) :: msg + type(c_ptr) :: cptr +!arrays + integer :: call_subsizes(3),call_starts(3) + integer,allocatable :: my_basead(:),my_subsizes(:,:),my_starts(:,:) + complex(dpc),allocatable :: dummy_cbuf(:) + complex(dpc),pointer :: buf_ptr(:) + +!************************************************************************ + + ! Workaround for XLF + myfh = fh + + if (bufsz < PRODUCT(subsizes) ) then + ABI_ERROR("bufsz is too small") + end if + + if (sc_mode==xmpio_single) then + ABI_CHECK(comm==xmpi_comm_self,"comm != xmpi_comm_self") + else if (sc_mode==xmpio_collective) then + continue + else + ABI_ERROR("Wrong sc_mode") + end if + + size_x = sizes(1) + size_y = sizes(2) + subs_x = subsizes(1) + subs_y = subsizes(2) + subs_xy = subs_x * subs_y + start_x = starts(1) + start_y = starts(2) + start_z = starts(3) + stop_z = start_z + subsizes(3)-1 ! last column to read + + ! Read rows in blocks of size nz_chunk: + ! MPI-IO crashes if we try to read data > 2Gb in a single call. + nz2read = subsizes(3) + nz_chunk = nz2read + if ( (one*subs_xy*nz2read*xmpi_bsize_dpc) > chunk_bsize) then + nz_chunk = chunk_bsize / (subs_xy*xmpi_bsize_dpc) + !if (nz_chunk == 0) nz_chunk = 50 + end if + + call xmpi_min(nz_chunk,ierr,comm,mpierr) + if (ierr == 0) then + ierr = 1 + RETURN + end if + ierr = 0 + + ! my_ncalls : number of read needed to fill my cbuffer. + ! ncalls : max number of read in comm (needed for collective operations). + my_ncalls = nz2read / nz_chunk + zrest = MOD(nz2read, nz_chunk) + if (zrest /= 0) my_ncalls = my_ncalls + 1 + + call xmpi_max(my_ncalls,ncalls,comm,mpierr) + + ! Compute arrays used to define the file view. + ABI_MALLOC(my_subsizes,(3,ncalls)) + ABI_MALLOC(my_starts,(3,ncalls)) + ABI_MALLOC(my_basead,(ncalls)) + + do icall=1,my_ncalls + if (icall*nz_chunk <= nz2read) then + my_subsizes(:,icall) = (/subs_x, subs_y, nz_chunk/) + my_starts(:,icall) = (/start_x, start_y, (icall-1) * nz_chunk + start_z/) + my_basead(icall) = 1 + (icall-1)*subs_xy*nz_chunk + else + ! Two cases: + ! 1) nz2read > nz_chunk and not divisible by nz2read + ! 2) nz2read < nz_chunk + my_subsizes(:,icall) = (/subs_x, subs_y, zrest/) + if (nz2read >= nz_chunk) then + my_starts(:,icall) = (/start_x, start_y, stop_z-zrest+1/) + my_basead(icall) = 1 + (nz2read-zrest) * subs_xy + else + my_starts(:,icall) = starts + my_basead(icall) = 1 + end if + end if + end do + !write(std_out,*)" >>>> my_ncalls, ncalls, nz2read, nz_chunk ",my_ncalls,ncalls,nz2read,nz_chunk + + do icall=1,ncalls + + if (icall <= my_ncalls) then + call_subsizes = my_subsizes(:,icall) + call_starts = my_starts(:,icall) + ptr = my_basead(icall) + else + ! Fake values needed to call read_all collectively. + call_subsizes = (/subs_x, 1, 1/) + call_starts = starts + end if + ncount = PRODUCT(call_subsizes) + !write(std_out,*)" icall,ptr, ncount, ",icall,ptr,ncount + !write(std_out,*)" call_starts",call_starts + !write(std_out,*)" call_subsizes",call_subsizes + + ! Create subarry file view. + call xmpio_create_fsubarray_3D(sizes,call_subsizes,call_starts,MPI_DOUBLE_COMPLEX,& +& fsub_type,my_offpad,mpierr) + ABI_CHECK_MPI(mpierr,"fsubarray_3D") + + ! Update the offset. + my_offset = offset + my_offpad + + call MPI_FILE_SET_VIEW(myfh, my_offset, MPI_BYTE, fsub_type, 'native', MPI_INFO_NULL, mpierr) + ABI_CHECK_MPI(mpierr,"SET_VIEW") + + call MPI_TYPE_FREE(fsub_type, mpierr) + ABI_CHECK_MPI(mpierr,"MPI_TYPE_FREE") + + if (sc_mode==xmpio_collective) then + ! Collective read + if (icall <= my_ncalls) then + cptr=c_loc(cbuffer(ptr)) ; call c_f_pointer(cptr,buf_ptr,[ncount]) + call MPI_FILE_READ_ALL(myfh, buf_ptr, ncount, MPI_DOUBLE_COMPLEX, MPI_STATUS_IGNORE, mpierr) + else + ABI_MALLOC(dummy_cbuf,(subs_x)) + call MPI_FILE_READ_ALL(myfh, dummy_cbuf, ncount, MPI_DOUBLE_COMPLEX, MPI_STATUS_IGNORE, mpierr) + ABI_FREE(dummy_cbuf) + end if + ABI_CHECK_MPI(mpierr,"FILE_READ_ALL") + + else + ! Individual read. + cptr=c_loc(cbuffer(ptr)) ; call c_f_pointer(cptr,buf_ptr,[ncount]) + call MPI_FILE_READ(myfh, buf_ptr, ncount, MPI_DOUBLE_COMPLEX, MPI_STATUS_IGNORE, mpierr) + ABI_CHECK_MPI(mpierr,"FILE_READ") + end if + + end do + + ABI_FREE(my_subsizes) + ABI_FREE(my_starts) + ABI_FREE(my_basead) + +end subroutine mpiotk_read_fsuba_dpc3D +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_mpiotk/mpiotk_read_fsuba_dpc4D +!! NAME +!! mpiotk_read_fsuba_dpc4D +!! +!! FUNCTION +!! Reading a block of contiguous data stored in a 4D matrix. +!! Data is placed within Fortran records. Target: complex data stored in a complex array. +!! +!! NOTES +!! The value of ierr should always be checked by the caller +!! +!! INPUTS +!! fh = MPI-IO file handler. +!! offset = +!! sizes(4) +!! subsizes(4) +!! starts(4) +!! bufsz = dimension of cbuffer +!! chunk_bsize = +!! comm = MPI communicator +!! sc_mode= MPI-IO option +!! xmpio_single ==> for reading by current proc. +!! xmpio_collective ==> for collective reading. +!! +!! OUTPUTS +!! cbuffer(bufsz) +!! ierr=status error. A non zero value indicates that chunk_bsize is smaller that the fortran record +!! and therefore bufsz has not been read. +!! +!! SOURCE + +subroutine mpiotk_read_fsuba_dpc4D(fh,offset,sizes,subsizes,starts,bufsz,cbuffer,chunk_bsize,sc_mode,comm,ierr) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: fh,comm,bufsz,sc_mode + integer,intent(out) :: ierr + integer(XMPI_OFFSET_KIND),intent(in) :: offset,chunk_bsize +!arrays + integer,intent(in) :: sizes(4),subsizes(4),starts(4) + complex(dpc),intent(out),target :: cbuffer(bufsz) + +!Local variables------------------------------- +!scalars + integer :: mpierr,na2read,na_chunk,ptr,ncount,myfh + integer :: fsub_type,my_ncalls,icall,arest,ncalls + integer :: size_x,size_y,size_z,subs_x,subs_y,subs_z,subs_xyz,start_x,start_y,start_z,start_a,stop_a + integer(XMPI_OFFSET_KIND) :: my_offset,my_offpad + !character(len=500) :: msg + type(c_ptr) :: cptr +!arrays + integer :: call_subsizes(4),call_starts(4) + integer,allocatable :: my_basead(:),my_subsizes(:,:),my_starts(:,:) + complex(dpc),allocatable :: dummy_cbuf(:) + complex(dpc),pointer :: buf_ptr(:) + +!************************************************************************ + + ! Workaround for XLF + myfh = fh + + if (bufsz < PRODUCT(subsizes) ) then + ABI_ERROR("bufsz is too small") + end if + + if (sc_mode==xmpio_single) then + ABI_CHECK(comm==xmpi_comm_self,"comm != xmpi_comm_self") + else if (sc_mode==xmpio_collective) then + continue + else + ABI_ERROR("Wrong sc_mode") + end if + + size_x = sizes(1) + size_y = sizes(2) + size_z = sizes(3) + + subs_x = subsizes(1) + subs_y = subsizes(2) + subs_z = subsizes(3) + subs_xyz = subs_x * subs_y * subs_z + + start_x = starts(1) + start_y = starts(2) + start_z = starts(3) + start_a = starts(4) + stop_a = start_a + subsizes(4)-1 ! last column to read + + ! Read rows in blocks of size na_chunk: + ! MPI-IO crashes if we try to read data > 2Gb in a single call. + na2read = subsizes(4) + na_chunk = na2read + if ( (one*subs_xyz*na2read*xmpi_bsize_dpc) > chunk_bsize) then + na_chunk = chunk_bsize / (subs_xyz*xmpi_bsize_dpc) + end if + + call xmpi_min(na_chunk,ierr,comm,mpierr) + if (ierr == 0) then + ierr = 1 + RETURN + end if + ierr = 0 + + ! my_ncalls : number of read needed to fill my cbuffer. + ! ncalls : max number of read in comm (needed for collective operations). + my_ncalls = na2read / na_chunk + arest = MOD(na2read, na_chunk) + if (arest /= 0) my_ncalls = my_ncalls + 1 + + call xmpi_max(my_ncalls,ncalls,comm,mpierr) + + ! Compute arrays used to define the file view. + ABI_MALLOC(my_subsizes,(4,ncalls)) + ABI_MALLOC(my_starts,(4,ncalls)) + ABI_MALLOC(my_basead,(ncalls)) + + do icall=1,my_ncalls + + if (icall*na_chunk <= na2read) then + my_subsizes(:,icall) = (/subs_x, subs_y, subs_z, na_chunk/) + my_starts(:,icall) = (/start_x, start_y, start_z, (icall-1) * na_chunk + start_a/) + my_basead(icall) = 1 + (icall-1)*subs_xyz*na_chunk + else + ! Two cases: + ! 1) na2read > na_chunk and not divisible by na2read + ! 2) na2read < na_chunk + my_subsizes(:,icall) = (/subs_x, subs_y, subs_z, arest/) + if (na2read >= na_chunk) then + my_starts(:,icall) = (/start_x, start_y, start_z, stop_a-arest+1/) + my_basead(icall) = 1 + (na2read-arest) * subs_xyz + else + my_starts(:,icall) = starts + my_basead(icall) = 1 + end if + end if + end do + !write(std_out,*)" >>>> my_ncalls, ncalls, na2read, na_chunk ",my_ncalls,ncalls,na2read,na_chunk + + do icall=1,ncalls + + if (icall <= my_ncalls) then + call_subsizes = my_subsizes(:,icall) + call_starts = my_starts(:,icall) + ptr = my_basead(icall) + else + ! Fake values needed to call read_all collectively. + call_subsizes = (/subs_x, 1, 1, 1/) + call_starts = starts + end if + ncount = PRODUCT(call_subsizes) + ! + !write(std_out,*)" icall,ptr, ncount, ",icall,ptr,ncount + !write(std_out,*)" call_starts",call_starts + !write(std_out,*)" call_subsizes",call_subsizes + ! + ! Create subarry file view. + call xmpio_create_fsubarray_4D(sizes,call_subsizes,call_starts,MPI_DOUBLE_COMPLEX,& +& fsub_type,my_offpad,mpierr) + ABI_CHECK_MPI(mpierr,"fsubarray_4D") + + ! Update the offset. + my_offset = offset + my_offpad + + call MPI_FILE_SET_VIEW(myfh, my_offset, MPI_BYTE, fsub_type, 'native', MPI_INFO_NULL, mpierr) + ABI_CHECK_MPI(mpierr,"SET_VIEW") + + call MPI_TYPE_FREE(fsub_type, mpierr) + ABI_CHECK_MPI(mpierr,"MPI_TYPE_FREE") + + if (sc_mode==xmpio_collective) then + ! Collective read + if (icall <= my_ncalls) then + cptr=c_loc(cbuffer(ptr)) ; call c_f_pointer(cptr,buf_ptr,[ncount]) + call MPI_FILE_READ_ALL(myfh, cbuffer(ptr:), ncount, MPI_DOUBLE_COMPLEX, MPI_STATUS_IGNORE, mpierr) + else + ABI_MALLOC(dummy_cbuf,(subs_x)) + call MPI_FILE_READ_ALL(myfh, dummy_cbuf, ncount, MPI_DOUBLE_COMPLEX, MPI_STATUS_IGNORE, mpierr) + ABI_FREE(dummy_cbuf) + end if + ABI_CHECK_MPI(mpierr,"FILE_READ_ALL") + else + ! Individual read. + cptr=c_loc(cbuffer(ptr)) ; call c_f_pointer(cptr,buf_ptr,[ncount]) + call MPI_FILE_READ(myfh, buf_ptr, ncount, MPI_DOUBLE_COMPLEX, MPI_STATUS_IGNORE, mpierr) + ABI_CHECK_MPI(mpierr,"FILE_READ") + end if + + end do + + ABI_FREE(my_subsizes) + ABI_FREE(my_starts) + ABI_FREE(my_basead) + +end subroutine mpiotk_read_fsuba_dpc4D +!!*** +#endif + +END MODULE m_mpiotk +!!*** diff --git a/GX-PAW/common/src/27_toolbox_oop/m_mpiotk.o b/GX-PAW/common/src/27_toolbox_oop/m_mpiotk.o new file mode 100644 index 00000000..989fb2c5 Binary files /dev/null and b/GX-PAW/common/src/27_toolbox_oop/m_mpiotk.o differ diff --git a/GX-PAW/common/src/27_toolbox_oop/m_nctk.F90 b/GX-PAW/common/src/27_toolbox_oop/m_nctk.F90 new file mode 100644 index 00000000..b99edff5 --- /dev/null +++ b/GX-PAW/common/src/27_toolbox_oop/m_nctk.F90 @@ -0,0 +1,3043 @@ +!!****m* ABINIT/m_nctk +!! NAME +!! m_nctk +!! +!! FUNCTION +!! Tools and wrappers for NETCDF-IO. +!! +!! COPYRIGHT +!! Copyright (C) 2008-2024 ABINIT group (MG) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! TODO +!! Remove create_nc_file, write_var_netcdf, the output of OUT.nc is dangereous +!! because we can create too many dimensions and get +!! nf90_def_dim - NetCDF library returned: NetCDF: NC_MAX_DIMS exceeded +!! Moreover the multiple calls to redef render the IO very inefficient +!! That part should be rationalized! +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" + +MODULE m_nctk + + use defs_basis + use m_abicore + use m_build_info + use m_errors + use, intrinsic :: iso_c_binding + use m_xmpi +#ifdef HAVE_NETCDF + use netcdf +#endif + + use m_fstrings, only : itoa, sjoin, lstrip, char_count, strcat, endswith, startswith, ltoa + use m_io_tools, only : pick_aname, delete_file, file_exists + use m_yaml, only : DTSET_IDX + + implicit none + + private +!!*** + + integer,public,parameter :: nctk_noid = -huge(1) + ! This value is used to signal to procedures that IO should not be performed. + + ! Basic variables + character(len=*),public,parameter :: etsfio_file_format = "ETSF Nanoquanta" + character(len=*),public,parameter :: etsfio_conventions = "http://www.etsf.eu/fileformats/" + + integer,public,parameter :: etsfio_charlen = 80 + ! The value corresponding to character_string_len + + real,public,parameter :: etsfio_version = 3.3 + ! This is clearly wrong because one should use strings instad of floats that cannot be represented exactly + ! but, unfortunately, it's in the specifications and we have to live with it! + +#ifdef HAVE_NETCDF + integer,public,parameter :: nctk_max_dims = NF90_MAX_DIMS + ! Maximum number of dimensions + + integer,public,parameter :: nctk_slen = NF90_MAX_NAME + ! String length used for the names of dimensions and variables + ! The maximum allowable number of characters + +#else + ! replacements + integer,public,parameter :: nctk_max_dims = 7 + integer,public,parameter :: nctk_slen = 256 +#endif + +#ifdef HAVE_NETCDF + ! netcdf4-hdf5 is the default + integer,save,private :: def_cmode_for_seq_create = ior(ior(nf90_clobber, nf90_netcdf4), nf90_write) + ! netcdf4 classic + !integer,save,private :: def_cmode_for_seq_create = ior(nf90_clobber, nf90_write) +#endif + + character(len=5),private,parameter :: NCTK_IMPLICIT_DIMS(10) = [ & + "one ", "two ", "three", "four ", "five ", "six ", "seven", "eight", "nine ", "ten "] + +!!****t* m_nctk/nctkerr_t +!! NAME +!! nctkerr_t +!! +!! FUNCTION +!! +!! SOURCE +!! + type,private :: nctkerr_t +#ifdef HAVE_NETCDF + integer :: ncerr = nf90_noerr +#else + integer :: ncerr = 0 +#endif + integer :: line = 0 + character(len=fnlen) :: file = "Dummy File" + character(len=2048) :: msg="No error detected" + end type nctkerr_t +!!*** + + type(nctkerr_t),private,save :: einfo + +!!****t* m_nctk/ncfdim_t +!! NAME +!! nctkdim_t +!! +!! FUNCTION +!! Stores the name and the value of a netcdf dimension +!! +!! SOURCE + + type,public :: nctkdim_t + character(len=nctk_slen) :: name ! name of the dimension. + integer :: value ! value of the dimension. + !integer :: id + end type nctkdim_t +!!*** + +!!****t* m_nctk/nctkarr_t +!! NAME +!! nctkarr_t +!! +!! FUNCTION +!! Stores the name and the shape of a netcdf array +!! +!! SOURCE + + type,public :: nctkarr_t + character(len=nctk_slen) :: name ! name of the array. + character(len=4) :: dtype ! string specifying the type. + character(len=nctk_slen) :: shape_str ! string with the shape. e.g. "dim1, dim2" for [dim1, dim2] array. + end type nctkarr_t +!!*** + +!!****s* m_nctk/nctkvar_t +!! NAME +!! nctkvar_t +!! +!! FUNCTION +!! This structure stores variable information, such as +!! name, NetCDF id, type, shape and dimensions. It contains the following elements: +!! +!! SOURCE + + type nctkvar_t + + integer :: id + ! the id used by NetCDF to access this variable. + + integer :: xtype + ! the type of the variable + + integer :: ndims + ! the number of dimensions (0 for scalar variable). + + integer :: natts + ! The number of attributes associated to the variable + + character(len=nctk_slen) :: name + ! the variable name. + + character(len=nctk_slen) :: dimnames(nctk_max_dims) + ! the name corresponding to each dimension + ! Only if array variable, only (1:ndims) are relevent + + integer :: dimids(nctk_max_dims) = -1 + ! The id of the dimensions. only (1:ndims) are relevent + + integer :: dimlens(nctk_max_dims) = 0 + ! the size for each dimension if array variable, only (1:ndims) are relevent + + !character(len=nctk_slen) :: dimnames(nctk_max_dims) + !character(len=nctk_slen), pointer :: ncattnames(:) + ! * ncattnames: the name corresponding to all associated attributes + + end type nctkvar_t + !!*** + + public :: nctk_use_classic_for_seq ! Use netcdf-classic for files that are used in sequential. + ! instead of the default that is netcdf4/hdf5. + public :: nctk_idname ! Return the nc identifier from the name of the variable. + public :: nctk_idgroup ! Return the nc identifier from the name of a group. + public :: nctk_ncify ! Append ".nc" to ipath if ipath does not end with ".nc" + public :: nctk_string_from_occopt ! Return human-readable string with the smearing scheme. + public :: nctk_fort_or_ncfile ! Test wheter a path exists (fortran or nc file) and + ! select iomode depending on file extension. + public :: nctk_try_fort_or_ncfile ! Return fortran or netcdf filename depending on the existence of the file. + public :: nctk_test_mpiio ! Test at run-time whether the netcdf library supports parallel IO. + +#ifdef HAVE_NETCDF + public :: ab_define_var ! Helper function used to declare a netcdf variable. + + ! Helper functions + public :: nctk_open_read ! Open a file in read-only mode. + public :: nctk_open_create ! Create a netcdf file for modifications. + public :: nctk_open_modify ! Open an already existent file for modifications. + public :: nctk_add_etsf_header ! Add the ETSF-IO header. + public :: nctk_set_defmode ! Set the file in define mode (metadata) + public :: nctk_set_datamode ! Set the file in datamode (IO) + public :: nctk_set_collective ! Set collective access for a netcdf variable + + public :: nctk_def_dims ! Define dimensions in a netcdf file. + interface nctk_def_dims + module procedure nctk_def_one_dim + module procedure nctk_def_dim_list + end interface nctk_def_dims + + public :: nctk_set_atomic_units ! Set the value of the attributes "units" and "scale_to_atomic_units". + public :: nctk_def_basedims ! Define the basic dimensions used in ETSF-IO files. + public :: nctk_def_scalars_type ! Declare a list of scalars of the given type. + public :: nctk_def_iscalars ! Declare a list of integer scalars. + public :: nctk_def_dpscalars ! Declare a list of double precision scalars. + public :: nctk_write_iscalars ! Write a list of integer scalars. + public :: nctk_write_dpscalars ! Write a list of double precision scalars. + public :: nctk_defnwrite_ivars ! Declare and write a list of integer scalars. + public :: nctk_defnwrite_dpvars ! Declare and write a list of double precisions scalars. + public :: nctk_write_ibz ! Write k-points in the IBZ and corresponding weights. + + public :: nctk_def_one_array + public :: nctk_def_arrays ! Define netcdf arrays. + + interface nctk_def_arrays + module procedure nctk_def_one_array + module procedure nctk_def_array_list + end interface nctk_def_arrays + + public :: nctk_get_dim + + public :: nctk_write_datar + public :: nctk_read_datar + + ! FIXME These routines are specific to anaddb + ! and should be moved at the level of 77_ddb + public :: nctk_defwrite_nonana_terms ! Write phonon frequencies and displacements for q-->0 + ! in the presence of non-analytical behaviour. + public :: nctk_defwrite_nonana_raman_terms ! Write raman susceptiblities for q-->0 + public :: nctk_defwrite_raman_terms ! Write raman susceptiblities and frequencies for q=0 + +#endif + public :: create_nc_file ! FIXME: Deprecated + public :: write_var_netcdf ! FIXME: Deprecated + public :: write_eig ! FIXME: Deprecated + + !integer,save ABI_PROTECTED, public :: nctk_cache_size = 32000000 + ! If the cache_size is provided when opening a netCDF-4/HDF5 file, it will be used instead + ! of the default (32000000) as the size, in bytes, of the HDF5 chunk cache. + + !integer,save ABI_PROTECTED, public :: nctk_cache_nelems = 1000 + ! If cache_nelems is provided when opening a netCDF-4/HDF5 file, it will be used instead + ! of the default (1000) as the maximum number of elements in the HDF5 chunk cache. + + !real,save ABI_PROTECTED, public :: nctk_cache_premtion = 0.75 + ! If cache_preemption is provided when opening a netCDF-4/HDF5 file, it will be used + ! instead of the default (0.75) as the preemption value for the HDF5 chunk cache. + + logical, save ABI_PROTECTED, public :: nctk_has_mpiio = .false. + ! This flag is set to true if the netcdf library supports parallel IO. + ! Cannot use CPP flags because nf90_open_par and other similar functions are always + ! exported by netcdf. As a consequence we have to check at run-time if we can + ! perform parallel IO and we use nctk_has_mpiio to select the IO algorithms. + +CONTAINS + + +!!****f* m_nctk/nctk_set_default_for_seq +!! NAME +!! nctk_set_default_for_seq +!! +!! FUNCTION +!! Use netcdf classic mode for new files when only sequential-IO needs to be performed +!! +!! SOURCE + +subroutine nctk_use_classic_for_seq() + +! ********************************************************************* + +#ifdef HAVE_NETCDF + ! Use netcdf classic mode. + def_cmode_for_seq_create = ior(nf90_clobber, nf90_write) + ABI_COMMENT("Using netcdf-classic mode") +#endif + +end subroutine nctk_use_classic_for_seq +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_nctk/nctk_idname +!! NAME +!! nctk_idname +!! +!! FUNCTION +!! Return the nc identifier from the name of the variable +!! +!! SOURCE + +integer function nctk_idname(ncid, varname) result(varid) + +!Arguments ------------------------------------ + integer,intent(in) :: ncid + character(len=*),intent(in) :: varname + +!Local variables------------------------------- +!scalars + integer :: ncerr + character(len=1000) :: msg + +! ********************************************************************* + +#ifdef HAVE_NETCDF + ncerr = nf90_inq_varid(ncid, varname, varid) + + if (ncerr /= nf90_noerr) then + write(msg,'(6a)')& + "NetCDF library returned: `",trim(nf90_strerror(ncerr)), "`", ch10,& + "while trying to get the ncid of variable: ",trim(varname) + ABI_ERROR(msg) + end if +#else + ABI_ERROR("Netcdf support is not activated") + write(std_out,*)ncid,varname +#endif + +end function nctk_idname +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_nctk/nctk_idgroup +!! NAME +!! nctk_idgroup +!! +!! FUNCTION +!! Return the nc identifier from the name of a group +!! +!! SOURCE + +integer function nctk_idgroup(ncid, grpname) result(grpid) + +!Arguments ------------------------------------ + integer,intent(in) :: ncid + character(len=*),intent(in) :: grpname + +!Local variables------------------------------- +!scalars + integer :: ncerr + character(len=1000) :: msg + +! ********************************************************************* + +#ifdef HAVE_NETCDF + ncerr = nf90_inq_ncid(ncid, grpname, grpid) + + if (ncerr /= nf90_noerr) then + write(msg,'(6a)')& + "NetCDF library returned: `",trim(nf90_strerror(ncerr)), "`", ch10,& + "while trying to get the ncid of group: ",trim(grpname) + ABI_ERROR(msg) + end if +#else + ABI_ERROR("Netcdf support is not activated") + write(std_out,*)ncid,grpname +#endif + +end function nctk_idgroup +!!*** + +!---------------------------------------------------------------------- +!!****f* m_nctk/nctk_ncify +!! NAME +!! nctk_ncify +!! +!! FUNCTION +!! Append ".nc" to ipath if ipath does not end with ".nc" +!! +!! SOURCE + +function nctk_ncify(ipath) result(opath) + + character(len=*),intent(in) :: ipath + character(len=fnlen) :: opath + +! ********************************************************************* + + if (.not. endswith(ipath, ".nc")) then + opath = trim(ipath)//'.nc' + else + opath = ipath + end if + +end function nctk_ncify +!!*** + + +!---------------------------------------------------------------------- + +!!****f* m_nctk/nctk_string_from_occopt +!! NAME +!! nctk_string_from_occopt +!! +!! FUNCTION +!! +!! SOURCE + +pure function nctk_string_from_occopt(occopt) result(smearing) + + integer,intent(in) :: occopt + character(len=etsfio_charlen) :: smearing + +! ********************************************************************* + + select case (occopt) + case (3) + smearing = "Fermi-Dirac" + case (4) + smearing = "cold smearing of N. Marzari with minimization of the bump" + case (5) + smearing = "cold smearing of N. Marzari with monotonic function in the tail" + case (6) + smearing = "Methfessel and Paxton" + case (7) + smearing = "gaussian" + case (8) + smearing = "uniform" + case default + smearing = "none" + end select + +end function nctk_string_from_occopt +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_nctk/nctk_fort_or_ncfile +!! NAME +!! nctk_fort_or_ncfile +!! +!! FUNCTION +!! Return the iomode used to perform IO operations on filename. +!! If filename does not exist, a similar file with extension `.nc` is tried +!! and iomode is set to IO_MODE_ETSF if the file exists. +!! This trick is used to run the Abinit test suite in netcdf mode without changing the input files. +!! The modification (if any) is logged to std_out. +!! +!! SIDE EFFECTS +!! filename=Tentative filename in input. Changed to netcdf file if input filename does not exist +!! and a file with netcdf extension is found. +!! +!! OUTPUT +!! iomode=Flag selecting the IO library. Set to IO_MODE_ETSF if netcdf file, else IO_MODE_MPI +!! if MPI supports it, finally IO_MODE_FORTRAN +!! errmsg=String with error message. Use `if (len_trim(errmsg) /= 0) ABI_ERROR(errmsg)` +!! to handle possible errors in the caller. +!! +!! SOURCE + +subroutine nctk_fort_or_ncfile(filename, iomode, errmsg) + + character(len=*),intent(inout) :: filename + character(len=*),intent(out) :: errmsg + integer,intent(out) :: iomode + +! ********************************************************************* + errmsg = "" + + ! Default value +#ifdef HAVE_MPI_IO + iomode = IO_MODE_MPI +#else + iomode = IO_MODE_FORTRAN +#endif + + ! Checking the existence of data file + if (.not.file_exists(filename)) then + ! Trick needed to run Abinit test suite in netcdf mode. + if (file_exists(nctk_ncify(filename))) then + write(std_out,"(3a)")"- File: ",trim(filename)," does not exist but found netcdf file with similar name." + filename = nctk_ncify(filename); iomode = IO_MODE_ETSF + end if + if (.not. file_exists(filename)) then + errmsg = 'Missing file: '//trim(filename) + end if + end if + +end subroutine nctk_fort_or_ncfile +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_nctk/nctk_try_fort_or_ncfile +!! NAME +!! nctk_try_fort_or_ncfile +!! +!! FUNCTION +!! If filename does not exist, a similar file with extension `.nc` is tried +!! This trick is used to run the Abinit test suite in netcdf mode without changing the input files. +!! The modification (if any) is logged to unit (Default: std_out) +!! +!! SIDE EFFECTS +!! filename=Tentative filename in input. Changed to netcdf file if input filename does not exist +!! and a file with netcdf extension is found. +!! +!! OUTPUT +!! errmsg=String with error message if return value /= 0 +!! +!! SOURCE + +integer function nctk_try_fort_or_ncfile(filename, errmsg, unit) result(ierr) + +!Arguments ------------------------------------ + character(len=*),intent(inout) :: filename + character(len=*),intent(out) :: errmsg + integer,optional,intent(in) :: unit + +!Local variables------------------------------- + integer :: unt + +! ********************************************************************* + + unt = std_out; if (present(unit)) unt = unit + ierr = 0; errmsg = "" + + if (.not.file_exists(filename)) then + ! Try netcdf exists. + if (file_exists(nctk_ncify(filename))) then + if (unt /= dev_null) then + write(unt,"(3a)")"- File: ",trim(filename)," does not exist but found netcdf file with similar name." + end if + filename = nctk_ncify(filename) + end if + if (.not. file_exists(filename)) then + ierr = 1; errmsg = 'Cannot find file: '//trim(filename) + end if + end if + +end function nctk_try_fort_or_ncfile +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_nctk/nctk_test_mpiio +!! NAME +!! nctk_test_mpiio +!! +!! FUNCTION +!! Test at run-time whether the netcdf library supports parallel IO and +!! set the value of the module variable `nctk_has_mpiio`. +!! This is a COLLECTIVE routine that should be called by all processors +!! in MPI_COMM_WORLD at the beginning of the calculation +!! +!! INPUTS +!! [print_warning]=TRUE if a warning about paral_kgb use has to be printed +!! Optional, default=yes +!! +!! SOURCE + +subroutine nctk_test_mpiio(print_warning) + + logical,intent(in),optional :: print_warning + +!Local variables------------------------------- +!scalars + logical :: my_print_warning +#ifdef HAVE_NETCDF_MPI + integer,parameter :: master=0 + integer :: ierr,ncid,ncerr + character(len=500) :: msg + character(len=fnlen) :: apath +#endif + +! ********************************************************************* + + nctk_has_mpiio = .False. + my_print_warning=.true. ; if (present(print_warning)) my_print_warning=print_warning + +!FIXME nf90create fails when using NVHPC +! This might be due to my environment, maybe not, need to investigate this... +!!#ifndef FC_NVHPC +#ifdef HAVE_NETCDF_MPI + if (xmpi_comm_rank(xmpi_world) == master) then + ! Try to open a file with hdf5. + apath = pick_aname() + ncerr = nf90_create(apath, cmode=ior(ior(nf90_netcdf4, nf90_mpiio), nf90_write), ncid=ncid, & + comm=xmpi_comm_self, info=xmpio_info) + + if (ncerr == nf90_noerr) then + nctk_has_mpiio = .True. + call wrtout(std_out," Netcdf library supports MPI-IO", "COLL") + else if (ncerr == nf90_enopar) then + ! This is the value returned by the C function ifndef USE_PARALLEL + ABI_WARNING(sjoin("Netcdf lib does not support MPI-IO and: ", nf90_strerror(ncerr))) + nctk_has_mpiio = .False. + else + ! Maybe something wrong in the low-level layer! + ABI_WARNING(sjoin("Strange, netcdf seems to support MPI-IO but: ", nf90_strerror(ncerr))) + nctk_has_mpiio = .False. + end if + + ncerr = nf90_close(ncid) + call delete_file(apath, ierr) + end if + + ! Master broadcast nctk_has_mpiio + call xmpi_bcast(nctk_has_mpiio,master,xmpi_world,ierr) + + if ((.not.nctk_has_mpiio).and.my_print_warning) then + write(msg,"(5a)") & + "The netcdf library does not support parallel IO, see message above",ch10,& + "Abinit won't be able to produce files in parallel e.g. when paral_kgb==1 is used.",ch10,& + "Action: install a netcdf4+HDF5 library with MPI-IO support." + ABI_WARNING(msg) + end if +#endif +!!#endif + +#ifdef HAVE_NETCDF_DEFAULT + if (.not. nctk_has_mpiio) then + ABI_ERROR("--netcdf-default is on but netcdf library does not support MPI-IO. Aborting now") + end if +#endif + +end subroutine nctk_test_mpiio +!!*** + +#ifdef HAVE_NETCDF + +!!****f* m_nctk/str2xtype +!! NAME +!! str2xtype +!! +!! FUNCTION +!! Return the netcdf type from a string. Possible values: +!! c or ch for NF90_CHAR +!! i or int for NF90_INTtrue +!! sp for NF90_FLOAT +!! dp for NF90_DOUBLE +!! +!! SOURCE + +integer function str2xtype(string) result(xtype) + +!Arguments ------------------------------------ + character(len=*),intent(in) :: string + +! ********************************************************************* + + !Type FORTRAN API Mnemonic Bits + !byte NF90_BYTE 8 + !char NF90_CHAR 8 + !short NF90_SHORT 16 + !int NF90_INT 32 + !float NF90_FLOAT 32 + !double NF90_DOUBLE 64 + + select case (string) + case ("c", "ch", "char") + xtype = NF90_CHAR + case ("i", "int") + xtype = NF90_INT + case ("sp") + xtype = NF90_FLOAT + case ("dp") + xtype = NF90_DOUBLE + case default + ABI_ERROR(sjoin("Invalid string type:", string)) + end select + +end function str2xtype +!!*** + +!!****f* m_nctk/bail_if_ncerr +!! NAME +!! bail_if_ncerr +!! +!! FUNCTION +!! +!! INPUTS +!! ncerr=Netcdf error +!! line=line number of the file where problem occurred +!! file=name of the f90 file containing the caller +!! +!! SOURCE + +logical function bail_if_ncerr(ncerr, file, line) result(bail) + +!Arguments ------------------------------------ + integer,intent(in) :: ncerr + character(len=*),optional,intent(in) :: file + integer,optional,intent(in) :: line + +! ********************************************************************* + + bail = (ncerr /= nf90_noerr) + + if (bail) then + einfo%ncerr = ncerr + einfo%file = "Subroutine Unknown"; if (present(file)) einfo%file = file + einfo%line = 0; if (present(line)) einfo%line = line + ! Append Netcdf string to user-defined message. + write(einfo%msg,'(2a)')'NetCDF library raised: ',trim(nf90_strerror(ncerr)) + end if + +end function bail_if_ncerr +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_nctk/nctk_open_read +!! NAME +!! nctk_open_read +!! +!! FUNCTION +!! Open a netcdf file in read-only mode. Return exit status. +!! +!! INPUTS +!! ncid=Netcdf identifier. +!! comm=MPI communicator. +!! +!! SOURCE + +integer function nctk_open_read(ncid, path, comm) result(ncerr) + +!Arguments ------------------------------------ + integer,intent(out) :: ncid + integer,intent(in) :: comm + character(len=*),intent(in) :: path + +!Local variables------------------------------- + integer :: nprocs + +! ********************************************************************* + nprocs = xmpi_comm_size(comm) + + ! Enforce netcdf4 only if the communicator contains more than one processor. + if (nctk_has_mpiio .and. nprocs > 1) then +#ifdef HAVE_NETCDF_MPI + ncerr = nf90_open(path, mode=ior(ior(nf90_netcdf4, nf90_mpiio), nf90_nowrite),& + comm=comm, info=xmpio_info, ncid=ncid) +#else + ncerr = nf90_einval + ABI_WARNING("Netcdf without MPI support. Cannot open file, will abort in caller") +#endif + NCF_CHECK_MSG(ncerr, sjoin("opening file:", path)) + else + ncerr = nf90_open(path, mode=nf90_nowrite, ncid=ncid) + NCF_CHECK_MSG(ncerr, sjoin("opening file:", path)) + !if (ncerr /= NC_EHDFERR) then + ! ncerr = nf90_open(path, mode=ior(ior(nf90_netcdf4), nf90_nowrite),& + ! comm=comm, info=xmpio_info, ncid=ncid) + !end if + if (nprocs > 1) then + ncerr = nf90_einval + ABI_WARNING("netcdf without MPI-IO support with nprocs > 1! Will abort in the caller") + end if + endif + +end function nctk_open_read +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_nctk/nctk_open_create +!! NAME +!! nctk_open_create +!! +!! FUNCTION +!! Create and open the netcdf file. Return exis status. +!! +!! INPUTS +!! path=Name of the file +!! comm=MPI communicator. +!! +!! OUTPUT +!! ncid=Netcdf identifier. +!! +!! SOURCE + +integer function nctk_open_create(ncid, path, comm) result(ncerr) + +!Arguments ------------------------------------ + integer,intent(out) :: ncid + integer,intent(in) :: comm + character(len=*),intent(in) :: path + +!Local variables------------------------------- + integer :: input_len, cmode !, ii, ich + character(len=strlen) :: my_string + +! ********************************************************************* + + ! Always use mpiio mode (i.e. hdf5) if available so that one can perform parallel IO + if (nctk_has_mpiio) then + ncerr = nf90_einval +#ifdef HAVE_NETCDF_MPI + write(my_string,'(2a)') "- Creating HDf5 file with MPI-IO support: ",path + call wrtout(std_out,my_string) + ! Believe it or not, I have to use xmpi_comm_self even in sequential to avoid weird SIGSEV in the MPI layer! + ncerr = nf90_create(path, cmode=ior(ior(nf90_netcdf4, nf90_mpiio), nf90_write), ncid=ncid, & + comm=comm, info=xmpio_info) +#endif + else + ! Note that here we don't enforce nf90_netcdf4 hence the netcdf file with be in classic model. + write(my_string,'(2a)') "- Creating HDf5 file with MPI-IO support: ",path + call wrtout(std_out,my_string) + !ncerr = nf90_create(path, ior(nf90_clobber, nf90_write), ncid) + cmode = def_cmode_for_seq_create + ncerr = nf90_create(path, cmode=cmode, ncid=ncid) + if (xmpi_comm_size(comm) > 1) then + ABI_WARNING("netcdf without MPI-IO support with nprocs > 1!") + end if + end if + NCF_CHECK(ncerr) + + ! Write etsf_header: file format, version and conventions. + NCF_CHECK(nf90_put_att(ncid, NF90_GLOBAL, "file_format", etsfio_file_format)) + NCF_CHECK(nf90_put_att(ncid, NF90_GLOBAL, "file_format_version", etsfio_version)) + NCF_CHECK(nf90_put_att(ncid, NF90_GLOBAL, "Conventions", etsfio_conventions)) + + ! Add info on the code that produced this file. These are extensions not in the standard. + NCF_CHECK(nf90_put_att(ncid, NF90_GLOBAL, "code", "Abinit")) + NCF_CHECK(nf90_put_att(ncid, NF90_GLOBAL, "abinit_version", abinit_version)) + + ! Define the basic dimensions used in ETSF-IO files. + NCF_CHECK(nctk_def_basedims(ncid, defmode=.True.)) + + if (len_trim(INPUT_STRING) /= 0) then + ! Write string with input. + my_string = trim(INPUT_STRING) + if (DTSET_IDX /= -1 .and. index(INPUT_STRING, "jdtset ") == 0) then + my_string = "jdtset " // trim(itoa(DTSET_IDX)) // " " // trim(INPUT_STRING) + end if + + ! Since INPUT_STRING contains many control characters at the end (likely because it's a global var) + ! and we want to save space on disk, we cannot use trim_len and we have to find the last alphanum char in my_string. + input_len = len_trim(my_string) +#if 0 + do ii=len(my_string), 1, -1 + ich = iachar(my_string(ii:ii)) + select case(ich) + case(0:32) ! space, tab, or control character + !write(std_out, *)"space/tab/control at: ",ii, "iachar: ",iachar(my_string(ii:ii)), "char:", my_string(ii:ii) + cycle + case default + input_len = ii !; write(std_out, *)"Exiting at ii: ",ii, "with: ",my_string(ii:ii) + exit + end select + end do +#endif + + NCF_CHECK(nctk_def_dims(ncid, nctkdim_t("input_len", input_len))) + NCF_CHECK(nctk_def_arrays(ncid, nctkarr_t("input_string", "c", "input_len"))) + + if (xmpi_comm_rank(comm) == 0) then + NCF_CHECK(nctk_set_datamode(ncid)) + ! Pass my_string(1:input_len)) instead from trim(string) to avoid SIGSEV on higgs_intel_19.0_serial + NCF_CHECK(nf90_put_var(ncid, nctk_idname(ncid, "input_string"), my_string(1:input_len))) + NCF_CHECK(nctk_set_defmode(ncid)) + end if + end if + +end function nctk_open_create +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_nctk/nctk_open_modify +!! NAME +!! nctk_open_modfy +!! +!! FUNCTION +!! Open an already existent netcdf file for modifications. Return exit status. +!! +!! INPUTS +!! path=File name. +!! comm=MPI communicator. +!! +!! OUTPUT +!! ncid=Netcdf identifier. +!! +!! SOURCE + +integer function nctk_open_modify(ncid, path, comm) result(ncerr) + +!Arguments ------------------------------------ + integer,intent(out) :: ncid + integer,intent(in) :: comm + character(len=*),intent(in) :: path + +! ********************************************************************* + + if (.not. nctk_has_mpiio .and. xmpi_comm_size(comm) > 1) then + ABI_ERROR("netcdf without MPI-IO support and nprocs > 1!") + end if + + if (xmpi_comm_size(comm) > 1 .or. nctk_has_mpiio) then + call wrtout(std_out, sjoin("- Opening HDf5 file with MPI-IO support:", path)) +#ifdef HAVE_NETCDF_MPI + ncerr = nf90_open_par(path, cmode=ior(ior(nf90_netcdf4, nf90_mpiio), nf90_write), & + comm=comm, info=xmpio_info, ncid=ncid) + NCF_CHECK_MSG(ncerr, sjoin("nf90_open_par: ", path)) +#else + ABI_ERROR("nprocs > 1 but netcdf does not support MPI-IO") +#endif + else + call wrtout(std_out, sjoin("- Opening netcdf file without MPI-IO support:", path)) + ncerr = nf90_open(path, nf90_write, ncid) + NCF_CHECK_MSG(ncerr, sjoin("nf90_open: ", path)) + end if + + ! Set file in define mode. + NCF_CHECK(nctk_set_defmode(ncid)) + +end function nctk_open_modify +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_nctk/nctk_add_etsf_header +!! NAME +!! nctk_add_etsf_header +!! +!! FUNCTION +!! Add the etsf-io header to a file associated to a netcdf file handler. +!! +!! INPUTS +!! ncid=Netcdf file identifier. +!! * version = the number of version to be created. +!! * title = (optional) a title for the file (80 characters max). +!! * history = (optional) the first line of history (1024 characters max). +!! * with_etsf_header = (optional) if true, will create a header +!! as defined in the ETSF specifications (default is .true.). +!! When value is .false., arguments title, history and version +!! are ignored. +!! +!! SOURCE + +integer function nctk_add_etsf_header(ncid, title, history) result(ncerr) + +!Arguments ------------------------------------ + integer,intent(in) :: ncid + character(len=*),optional,intent(in) :: title,history + +!Local variables------------------------------- + !integer :: ncerr + character(len=*), parameter :: file_format = "ETSF Nanoquanta" + character(len=*), parameter :: conventions = "http://www.etsf.eu/fileformats/" + real :: format_version = 3.3 ! Real is not a good choice for a version! + +! ********************************************************************* + + ncerr = nctk_set_defmode(ncid) + if (ncerr /= nf90_noerr) return + + ! The file format + ncerr = nf90_put_att(ncid, NF90_GLOBAL, "file_format", file_format) + if (ncerr /= nf90_noerr) return + + ! The version + ncerr = nf90_put_att(ncid, NF90_GLOBAL, "file_format_version", format_version) + if (ncerr /= nf90_noerr) return + + ! The conventions + ncerr = nf90_put_att(ncid, NF90_GLOBAL, "Conventions", conventions) + if (ncerr /= nf90_noerr) return + + ! The history if present + if (present(history)) then + ncerr = nf90_put_att(ncid, NF90_GLOBAL, "history", history(1:min(1024, len(history)))) + if (ncerr /= nf90_noerr) return + end if + + ! The title if present + if (present(title)) then + ncerr = nf90_put_att(ncid, NF90_GLOBAL, "title", title(1:min(80, len(title)))) + if (ncerr /= nf90_noerr) return + end if + + ! These are extensions not in the standard. + ! Add info on the code that produced this file + ncerr = nf90_put_att(ncid, NF90_GLOBAL, "code", "Abinit") + if (ncerr /= nf90_noerr) return + + ncerr = nf90_put_att(ncid, NF90_GLOBAL, "code_version", ABINIT_VERSION) + if (ncerr /= nf90_noerr) return + +end function nctk_add_etsf_header +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_nctk/nctk_set_defmode +!! NAME +!! nctk_set_defmode +!! +!! FUNCTION +!! Set the file in define mode, return exit status. +!! +!! INPUTS +!! ncid=Netcdf identifier. +!! +!! SOURCE + +integer function nctk_set_defmode(ncid) result(ncerr) + +!Arguments ------------------------------------ + integer,intent(in) :: ncid + +! ********************************************************************* + + ncerr = nf90_redef(ncid) + ! Use same trick as in etsf_io + if (ncerr /= nf90_noerr .and. ncerr /= -39) then + NCF_CHECK(ncerr) + else + ncerr = nf90_noerr + end if + +end function nctk_set_defmode +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_nctk/nctk_set_datamode +!! NAME +!! nctk_set_datamode +!! +!! FUNCTION +!! Set the file in data mode. Return exit status +!! +!! INPUTS +!! ncid=Netcdf identifier. +!! [reserve] +!! +!! OUTPUT +!! ncerr=Exit status +!! +!! SOURCE + +integer function nctk_set_datamode(ncid, reserve) result(ncerr) + +!Arguments ------------------------------------ + integer,intent(in) :: ncid + logical,intent(in),optional :: reserve + +!Local variables------------------------------- +!scalars + logical :: do_reserve + +! ********************************************************************* + + do_reserve = .False.; if (present(reserve)) do_reserve = reserve + + ncerr = nf90_enddef(ncid) + + ! Use same trick as in etsf_io + ! neded otherwise netcdf complains if the file is already in def mode. + if (ncerr /= nf90_noerr .and. ncerr /= -38) then + NCF_CHECK(ncerr) + else + ncerr = nf90_noerr + end if + + return + + ! TODO + if (do_reserve) then + ncerr = nf90_enddef(ncid) + !ncerr = nf90__enddef(ncid) + else + ncerr = nf90_enddef(ncid) + end if + +end function nctk_set_datamode +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_nctk/nctk_set_collective +!! NAME +!! nctk_set_collective +!! +!! FUNCTION +!! Use collective IO for the given netcdf variable. Return exit status. +!! +!! INPUTS +!! ncid=Netcdf file identifier. +!! varid=Netcdf variable identifier. +!! +!! SOURCE + +integer function nctk_set_collective(ncid, varid) result(ncerr) + +!Arguments ------------------------------------ + integer,intent(in) :: ncid,varid + +! *********************************************************************true + + ncerr = nf90_einval +#ifdef HAVE_NETCDF_MPI + ncerr = nf90_var_par_access(ncid, varid, nf90_collective) +#else + ABI_ERROR("nctk_set_collective should not be called if NETCDF does not support MPI-IO") + ABI_UNUSED((/ncid, varid/)) +#endif + +end function nctk_set_collective +!!*** + +!!****f* m_nctk/nctk_def_one_dim +!! NAME +!! nctk_def_one_dim +!! +!! FUNCTION +!! Define list of dimensions variables and write their values. +!! Return immediately if error +!! +!! INPUTS +!! ncid=Netcdf identifier. +!! dimnames(:)=List of strings with the name of the dimensions +!! values(:)=List of integer scalars +!! [defmode]=If True, the nc file is set in define mode (default=False) +!! [prefix]=Prefix added to varnames and dimensions. Empty string if not specified. +!! +!! SOURCE + +integer function nctk_def_one_dim(ncid, nctkdim, defmode, prefix) result(ncerr) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: ncid + logical,optional,intent(in) :: defmode + character(len=*),optional,intent(in) :: prefix +!arrays + type(nctkdim_t),intent(in) :: nctkdim + +!Local variables------------------------------- + integer :: dimid,dimlen + character(len=nctk_slen) :: dname + character(len=500) :: msg +! ********************************************************************* + + ncerr = nf90_noerr + + if (present(defmode)) then + if (defmode) then + NCF_CHECK(nctk_set_defmode(ncid)) + end if + end if + + if (present(prefix)) then + if (any(nctkdim%name == NCTK_IMPLICIT_DIMS)) then + dname = nctkdim%name + else + dname = strcat(prefix, nctkdim%name) + end if + else + dname = nctkdim%name + end if + + ! if dimension already exists, test whether it has the same value else define new dim. + ncerr = nf90_inq_dimid(ncid, dname, dimid) + + if (ncerr == nf90_noerr) then + NCF_CHECK(nf90_inquire_dimension(ncid, dimid, len=dimlen)) + if (dimlen /= nctkdim%value) then + write(msg, "(4a,2(a,i0))")& + "dimension ", trim(dname)," already exists but with a different value",ch10,& + "from file: ", dimlen, "; about to write: ", nctkdim%value + ABI_ERROR(msg) + end if + else + ncerr = nf90_def_dim(ncid, dname, nctkdim%value, dimid) + NCF_CHECK(ncerr) + end if + +end function nctk_def_one_dim +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_nctk/nctk_def_dim_list +!! NAME +!! nctk_def_dim_list +!! +!! FUNCTION +!! Define list of dimensions variables and write their values. +!! Return immediately if error +!! +!! INPUTS +!! ncid=Netcdf identifier. +!! dimnames(:)=List of strings with the name of the dimensions +!! values(:)=List of integer scalars +!! [defmode]=If True, the nc file is set in define mode (default=False) +!! [prefix]=Prefix added to varnames and dimensions. Empty string if not specified. +!! +!! SOURCE + +integer function nctk_def_dim_list(ncid, nctkdims, defmode, prefix) result(ncerr) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: ncid + logical,optional,intent(in) :: defmode + character(len=*),optional,intent(in) :: prefix +!arrays + type(nctkdim_t),intent(in) :: nctkdims(:) + +!Local variables------------------------------- +!scalars + integer :: ii + +! ********************************************************************* + + ncerr = nf90_noerr + if (present(defmode)) then + if (defmode) then + NCF_CHECK(nctk_set_defmode(ncid)) + end if + end if + + do ii=1,size(nctkdims) + if (present(prefix)) then + ncerr = nctk_def_one_dim(ncid, nctkdims(ii), prefix=prefix) + else + ncerr = nctk_def_one_dim(ncid, nctkdims(ii)) + end if + if (ncerr /= nf90_noerr) return + end do + +end function nctk_def_dim_list +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_nctk/nctk_set_atomic_units +!! NAME +!! nctk_set_atomic_units +!! +!! FUNCTION +!! Set the attributes "units" to "atomic units" and "scale_to_atomic_units" to one. +!! +!! INPUTS +!! ncid=Netcdf identifier. +!! varname=Name of the variable +!! +!! SOURCE + +integer function nctk_set_atomic_units(ncid, varname) result(ncerr) + +!Arguments ------------------------------------ + integer,intent(in) :: ncid + character(len=*),intent(in) :: varname + +!Local variables------------------------------- +!scalars + integer :: varid + +! ********************************************************************* + + ncerr = nf90_noerr + + varid = nctk_idname(ncid, varname) + NCF_CHECK(nf90_put_att(ncid, varid, "units", "atomic units")) + NCF_CHECK(nf90_put_att(ncid, varid, "scale_to_atomic_units", one)) + +end function nctk_set_atomic_units +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_nctk/nctk_def_basedims +!! NAME +!! nctk_def_basedims +!! +!! FUNCTION +!! Define the basic dimensions used in ETSF-IO files. +!! +!! INPUTS +!! ncid=Netcdf identifier. +!! [defmode]=If True, the nc file is set in define mode (default=False) +!! +!! SOURCE + +integer function nctk_def_basedims(ncid, defmode) result(ncerr) + +!Arguments ------------------------------------ + integer,intent(in) :: ncid + logical,optional,intent(in) :: defmode + +! ********************************************************************* + + ncerr = nf90_noerr + + if (present(defmode)) then + if (defmode) then + NCF_CHECK(nctk_set_defmode(ncid)) + end if + end if + + ! Basic ETSF-IO dimensions that should be always present in the file. + ncerr = nctk_def_dims(ncid, [& + nctkdim_t("complex", 2), nctkdim_t("symbol_length", 2), nctkdim_t("character_string_length", etsfio_charlen),& + nctkdim_t("number_of_cartesian_directions", 3), nctkdim_t("number_of_reduced_dimensions", 3),& + nctkdim_t("number_of_vectors", 3) & + ]) + NCF_CHECK(ncerr) + + ! Useful integers. + ncerr = nctk_def_dims(ncid, [ & + nctkdim_t("one", 1), nctkdim_t("two", 2), nctkdim_t("three", 3), & + nctkdim_t("four", 4), nctkdim_t("five", 5), nctkdim_t("six", 6), & + nctkdim_t("seven", 7), nctkdim_t("eight", 8), nctkdim_t("nine", 9), nctkdim_t("ten", 10), & + nctkdim_t("fnlen", fnlen + 1) & + ]) + NCF_CHECK(ncerr) + +end function nctk_def_basedims +!!*** + +!!****f* m_nctk/ab_define_var +!! +!! NAME +!! ab_define_var +!! +!! FUNCTION +!! Write the definition of a variable, including units and mnemonics +!! +!! INPUTS +!! ncid = Identifier of the netcdf dataset +!! var_dim_id = Identifier of the Dimensions +!! var_id = Identifier of the variable +!! var_mnemo = String of mnemonics +!! var_name = String with the name of the variable +!! var_type = NetCDF type of variable (NF90_DOUBLE, etc) +!! var_units = String of units +!! +!! OUTPUT +!! (only writing) +!! +!! SOURCE + +subroutine ab_define_var(ncid, var_dim_id, var_id, var_type, var_name, var_mnemo, var_units) + +!Arguments ------------------------------------ +!scalars + integer, intent(in) :: ncid + integer, intent(out) :: var_id + character(len=*), intent(in) :: var_mnemo,var_units,var_name + integer,intent(in) :: var_type +!arrays + integer,intent(in) :: var_dim_id(:) + +!Local variables------------------------------- +!scalars + integer :: ncerr + +! ************************************************************************* + +#ifdef HAVE_NETCDF + ncerr = nf90_def_var(ncid, trim(var_name), var_type, var_dim_id, var_id) + NCF_CHECK_MSG(ncerr," define variable "//trim(var_name)) + + ncerr = nf90_put_att(ncid, var_id, "units",trim(var_units)) + NCF_CHECK_MSG(ncerr," define attribute for "//trim(var_name)) + + ncerr = nf90_put_att(ncid, var_id, "mnemonics", trim(var_mnemo)) + NCF_CHECK_MSG(ncerr," define attribute for "//trim(var_name)) +#endif + +end subroutine ab_define_var +!!*** + +!!****f* m_nctk/nctk_def_scalars_type +!! NAME +!! nctk_def_scalars_type +!! +!! FUNCTION +!! Define list of **scalar** variables with a given type, Return immediately if error +!! +!! INPUTS +!! ncid=Netcdf identifier. +!! varnames(:)=List of strings with the name of the variables +!! xtype=Type of the variables +!! [defmode]=If True, the nc file is set in define mode (default=False) +!! [prefix]=Prefix added to varnames and dimensions. Empty string if not specified. +!! +!! SOURCE + +integer function nctk_def_scalars_type(ncid, varnames, xtype, defmode, prefix) result(ncerr) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: ncid,xtype + logical,optional,intent(in) :: defmode + character(len=*),optional,intent(in) :: prefix +!arrays + character(len=*),intent(in) :: varnames(:) + +!Local variables------------------------------- +!scalars + integer :: ii,varid + character(len=nctk_slen) :: vname + type(nctkvar_t) :: var + +! ********************************************************************* + + ncerr = nf90_noerr + if (present(defmode)) then + if (defmode) then + NCF_CHECK(nctk_set_defmode(ncid)) + end if + end if + + ! Special case where dimension is null + do ii=1,size(varnames) + vname = varnames(ii) + if (present(prefix)) vname = strcat(prefix, vname) + + if (nf90_inq_varid(ncid, vname, varid) == nf90_noerr) then + ! Variable already exists. Check if type and dimensions agree + call var_from_id(ncid, varid, var) + + if (.not. (var%xtype == xtype .and. var%ndims == 0)) then + ABI_ERROR("variable already exists with a different definition.") + else + cycle ! Dimension matches, skip definition. + end if + + else + ! Define variable since it doesn't exist. + ncerr = nf90_def_var(ncid, vname, xtype, varid) + NCF_CHECK(ncerr) + end if + end do + +end function nctk_def_scalars_type +!!*** + +!!****f* m_nctk/nctk_def_iscalars +!! NAME +!! nctk_def_iscalars +!! +!! FUNCTION +!! Define list of integer **scalar** variables. Return immediately if error +!! +!! INPUTS +!! ncid=Netcdf identifier. +!! varnames(:)=List of strings with the name of the variables +!! [defmode]=If True, the nc file is set in define mode (default=False) +!! [prefix]=Prefix added to varnames and dimensions. Empty string if not specified. +!! +!! SOURCE + +integer function nctk_def_iscalars(ncid, varnames, defmode, prefix) result(ncerr) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: ncid + logical,optional,intent(in) :: defmode + character(len=*),optional,intent(in) :: prefix +!arrays + character(len=*),intent(in) :: varnames(:) + +! ********************************************************************* + + if (present(defmode)) then + ncerr = nctk_def_scalars_type(ncid, varnames, nf90_int, defmode=defmode) + else + if (present(prefix)) then + ncerr = nctk_def_scalars_type(ncid, varnames, nf90_int, prefix=prefix) + else + ncerr = nctk_def_scalars_type(ncid, varnames, nf90_int) + end if + end if + +end function nctk_def_iscalars +!!*** + +!!****f* m_nctk/nctk_def_dpscalars +!! NAME +!! nctk_def_dpscalars +!! +!! FUNCTION +!! Define list of double precision **scalar** variables. Return immediately if error +!! +!! INPUTS +!! ncid=Netcdf identifier. +!! varnames(:)=List of strings with the name of the variables +!! [defmode]=If True, the nc file is set in define mode (default=False) +!! [prefix]=Prefix added to varnames and dimensions. Empty string if not specified. +!! +!! SOURCE + +integer function nctk_def_dpscalars(ncid, varnames, defmode, prefix) result(ncerr) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: ncid + logical,optional,intent(in) :: defmode + character(len=*),optional,intent(in) :: prefix +!arrays + character(len=*),intent(in) :: varnames(:) + +!Local variables------------------------------- + character(len=nctk_slen) :: prefix_ + +! ********************************************************************* + prefix_ = ""; if (present(prefix)) prefix_ = prefix + + if (present(defmode)) then + ncerr = nctk_def_scalars_type(ncid, varnames, nf90_double, defmode=defmode, prefix=prefix_) + else + ncerr = nctk_def_scalars_type(ncid, varnames, nf90_double, prefix=prefix_) + end if + +end function nctk_def_dpscalars +!!*** + +!!****f* m_nctk/nctk_def_one_array +!! NAME +!! nctk_def_one_array +!! +!! FUNCTION +!! Define list of arrays with a given type, Return immediately if error +!! +!! INPUTS +!! ncid=Netcdf identifier. +!! nctk_array=Array descriptor. +!! [defmode]=If True, the nc file is set in define mode (default=False) +!! [prefix]=Prefix added to varnames and dimensions. Empty string if not specified. +!! +!! SOURCE + + +integer function nctk_def_one_array(ncid, nctk_array, defmode, varid, prefix) result(ncerr) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: ncid + logical,optional,intent(in) :: defmode + integer,optional,intent(out) :: varid + type(nctkarr_t),intent(in) :: nctk_array + character(len=*),optional,intent(in) :: prefix + +!Local variables------------------------------- +!scalars + integer :: ii,xtype,prev,cnt,nn,vid + character(len=500) :: msg +!arrays + integer :: dimids(NF90_MAX_DIMS),dimvals(NF90_MAX_DIMS) + character(len=nctk_slen) :: sarr(NF90_MAX_DIMS), string, pre, vname, dimname + type(nctkvar_t) :: var + +! ********************************************************************* + + pre = ""; if (present(prefix)) pre = prefix + + ncerr = nf90_noerr + if (present(defmode)) then + if (defmode) then + NCF_CHECK(nctk_set_defmode(ncid)) + end if + end if + + xtype = str2xtype(nctk_array%dtype) + vname = strcat(pre, nctk_array%name) + + ! Build array of strings with the dimensions. + string = nctk_array%shape_str + nn = char_count(string, ",") + ABI_CHECK(nn <= NF90_MAX_DIMS, "Too many dimensions!") + + ! Parse dimension names and add prefix (if any). + if (nn == 0) then + cnt = 1 + dimname = lstrip(string) + if (any(dimname == NCTK_IMPLICIT_DIMS)) then + sarr(1) = dimname + else + sarr(1) = strcat(pre, dimname) + end if + else + prev = 0; cnt = 0 + do ii=1,len_trim(string) + if (string(ii:ii) == ",") then + cnt = cnt + 1 + dimname = lstrip(string(prev+1:ii-1)) + if (any(dimname == NCTK_IMPLICIT_DIMS)) then + sarr(cnt) = dimname + else + sarr(cnt) = strcat(pre, dimname) + end if + prev = ii + end if + end do + cnt = cnt + 1 + dimname = lstrip(string(prev+1:ii-1)) + if (any(dimname == NCTK_IMPLICIT_DIMS)) then + sarr(cnt) = dimname + else + sarr(cnt) = strcat(pre, dimname) + end if + end if + + ! Get dimids + do ii=1,cnt + NCF_CHECK_MSG(nf90_inq_dimid(ncid, sarr(ii), dimids(ii)), sarr(ii)) + NCF_CHECK(nf90_inquire_dimension(ncid, dimids(ii), len=dimvals(ii))) + end do + + ! Check if dimension already exists. + ! Variable already exists. Check if type and dimensions agree + if (nf90_inq_varid(ncid, vname, vid) == nf90_noerr) then + call var_from_id(ncid, vid, var) + if (.not. (var%xtype == xtype .and. var%ndims == cnt)) then + write(msg,"(4a,2(2(a,i0),a))")& + "variable ",trim(vname)," already exists with a different definition:",ch10,& + "In file: xtype = ",var%xtype,", ndims = ",var%ndims,ch10,& + "From caller: xtype = ",xtype,", ndims = ",cnt,ch10 + ABI_ERROR(msg) + end if + if (any(dimvals(1:cnt) /= var%dimlens(1:var%ndims))) then + write(msg,"(4a,2(3a))")& + "variable ",trim(vname)," already exists but with different shape.",ch10,& + "In file: dims = ",trim(ltoa(var%dimlens(:var%ndims))),ch10,& + "From caller dims = ",trim(ltoa(dimvals(:cnt))),ch10 + ABI_ERROR(msg) + end if + if (present(varid)) varid = vid + return + end if + + ! Define variable since it doesn't exist. + ncerr = nf90_def_var(ncid, vname, xtype, dimids(1:cnt), vid) + NCF_CHECK(ncerr) + + if (present(varid)) varid = vid + +end function nctk_def_one_array +!!*** + +!!****f* m_nctk/nctk_def_array_list +!! NAME +!! nctk_def_array_list +!! +!! FUNCTION +!! Define list of arrays with a given type, Return immediately if error +!! +!! INPUTS +!! ncid=Netcdf identifier. +!! nctk_arrays(:)=List of array descriptors. +!! [defmode]=If True, the nc file is set in define mode (default=False) +!! [prefix]=Prefix added to varnames and dimensions. Empty string if not specified. +!! +!! SOURCE + + +integer function nctk_def_array_list(ncid, nctk_arrays, defmode, prefix) result(ncerr) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: ncid + logical,optional,intent(in) :: defmode + character(len=*),optional,intent(in) :: prefix +!arrays + type(nctkarr_t),intent(in) :: nctk_arrays(:) + +!Local variables------------------------------- +!scalars + integer :: ia + +! ********************************************************************* + + ncerr = nf90_noerr + if (present(defmode)) then + if (defmode) then + NCF_CHECK(nctk_set_defmode(ncid)) + end if + end if + + do ia=1,size(nctk_arrays) + if (present(prefix)) then + NCF_CHECK(nctk_def_one_array(ncid, nctk_arrays(ia), prefix=prefix)) + else + NCF_CHECK(nctk_def_one_array(ncid, nctk_arrays(ia))) + end if + end do + +end function nctk_def_array_list +!!*** + +!!****f* m_nctk/nctk_write_iscalars +!! NAME +!! nctk_write_iscalars +!! +!! FUNCTION +!! Write a list of **scalar** integer variables. Return immediately if error +!! +!! INPUTS +!! ncid=Netcdf identifier. +!! varnames(:)=List of strings with the name of the variables +!! values(:)=List of integer scalars +!! [datamode]=If True, the nc file is set in data mode (default=False) +!! +!! OUTPUT +!! ncerr=Exit status +!! +!! SOURCE + +integer function nctk_write_iscalars(ncid, varnames, values, datamode) result(ncerr) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: ncid + logical,optional,intent(in) :: datamode +!arrays + integer,intent(in) :: values(:) + character(len=*),intent(in) :: varnames(:) + +!Local variables------------------------------- +!scalars + integer :: ii,varid + +! ********************************************************************* + + ABI_CHECK(size(varnames) == size(values), "Different size in varnames, values") + + ncerr = nf90_noerr + if (present(datamode)) then + if (datamode) then + NCF_CHECK(nctk_set_datamode(ncid)) + end if + end if + + do ii=1,size(varnames) + NCF_CHECK_MSG(nf90_inq_varid(ncid, varnames(ii), varid), sjoin("Inquiring: ", varnames(ii))) + NCF_CHECK(nf90_put_var(ncid, varid, values(ii))) + end do + +end function nctk_write_iscalars +!!*** + +!!****f* m_nctk/nctk_write_dpscalars +!! NAME +!! nctk_write_dpscalars +!! +!! FUNCTION +!! Write a list of **scalar** real(dp) variables. Return immediately if error +!! +!! INPUTS +!! ncid=Netcdf identifier. +!! varnames(:)=List of strings with the name of the variables +!! values(:)=List of real(dp) scalars +!! [datamode]=If True, the nc file is set in data mode (default=False) +!! +!! SOURCE + +integer function nctk_write_dpscalars(ncid, varnames, values, datamode) result(ncerr) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: ncid + logical,optional,intent(in) :: datamode +!arrays + real(dp),intent(in) :: values(:) + character(len=*),intent(in) :: varnames(:) + +!Local variables------------------------------- +!scalars + integer :: ii,varid + +! ********************************************************************* + + ncerr = nf90_noerr + + ABI_CHECK(size(varnames) == size(values), "Different size in varnames, values") + + if (present(datamode)) then + if (datamode) then + NCF_CHECK(nctk_set_datamode(ncid)) + end if + end if + + do ii=1,size(varnames) + NCF_CHECK(nf90_inq_varid(ncid, varnames(ii), varid)) + NCF_CHECK(nf90_put_var(ncid, varid, values(ii))) + end do + +end function nctk_write_dpscalars +!!*** + +!!****f* m_nctk/nctk_defnwrite_ivars +!! NAME +!! nctk_defnwrite_ivars +!! +!! FUNCTION +!! Define list of integer **scalar** variables and write their values. +!! Return immediately if error +!! +!! INPUTS +!! ncid=Netcdf identifier. +!! varnames(:)=List of strings with the name of the variables +!! values(:)=List of integer scalars +!! +!! SOURCE + +integer function nctk_defnwrite_ivars(ncid, varnames, values) result(ncerr) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: ncid +!arrays + integer,intent(in) :: values(:) + character(len=*),intent(in) :: varnames(:) + +!Local variables------------------------------- +!scalars + integer :: ii,varid + +! ********************************************************************* + + ABI_CHECK(size(varnames) == size(values), "Different size in varnames, values") + + ncerr = nctk_def_iscalars(ncid, varnames, defmode=.True.) + NCF_CHECK(ncerr) + + NCF_CHECK(nctk_set_datamode(ncid)) + do ii=1,size(varnames) + varid = nctk_idname(ncid, varnames(ii)) + NCF_CHECK(nf90_put_var(ncid, varid, values(ii))) + end do + +end function nctk_defnwrite_ivars +!!*** + +!!****f* m_nctk/nctk_defnwrite_dpvars +!! NAME +!! nctk_defnwrite_dpvars +!! +!! FUNCTION +!! Define list of real(dp) **scalar** variables and write their values. +!! Return immediately if error +!! +!! INPUTS +!! ncid=Netcdf identifier. +!! varnames(:)=List of strings with the name of the variables +!! values(:)=List of integer scalars +!! +!! SOURCE + +integer function nctk_defnwrite_dpvars(ncid, varnames, values) result(ncerr) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: ncid +!arrays + real(dp),intent(in) :: values(:) + character(len=*),intent(in) :: varnames(:) + +!Local variables------------------------------- +!scalars + integer :: ii,varid +!arrays + +! ********************************************************************* + ncerr = nf90_noerr + + ABI_CHECK(size(varnames) == size(values), "Different size in varnames, values") + + ncerr = nctk_def_dpscalars(ncid, varnames, defmode=.True.) + NCF_CHECK(ncerr) + + NCF_CHECK(nctk_set_datamode(ncid)) + do ii=1,size(varnames) + !write(std_out,*)varnames(ii) + varid = nctk_idname(ncid, varnames(ii)) + NCF_CHECK(nf90_put_var(ncid, varid, values(ii))) + end do + +end function nctk_defnwrite_dpvars +!!*** + +!!****f* m_nctk/nctk_write_ibz +!! NAME +!! nctk_write_ibz +!! +!! FUNCTION +!! Write the list of the k-points in the IBZ with the corresponding weights in Netcdf format. +!! Mainly used for passing data to AbiPy. This routine should be called by master only. +!! +!! INPUTS +!! fname=File name +!! kpoints(:,:)=List of k-points +!! weights(:)=K-point weights +!! +!! OUTPUT +!! ncerr=Exit status +!! +!! SOURCE + +integer function nctk_write_ibz(fname, kpoints, weights) result(ncerr) + +!Arguments ------------------------------------ +!scalars + character(len=*),intent(in) :: fname +!arrays + real(dp),intent(in) :: kpoints(:,:),weights(:) + +!Local variables------------------------------- +!scalars + integer :: nkpts,ncid + +! ********************************************************************* + + ABI_CHECK(size(kpoints, dim=2) == size(weights), "size(kpoints, dim=2) != size(weights)") + nkpts = size(kpoints, dim=2) + + NCF_CHECK_MSG(nctk_open_create(ncid, fname, xmpi_comm_self), sjoin("Creating:", fname)) + + ncerr = nctk_def_dims(ncid, [ & + nctkdim_t("number_of_reduced_dimensions",3), nctkdim_t("number_of_kpoints", nkpts)], defmode=.True.) + NCF_CHECK(ncerr) + + ncerr = nctk_def_array_list(ncid, [& + nctkarr_t('reduced_coordinates_of_kpoints', "dp", "number_of_reduced_dimensions, number_of_kpoints"),& + nctkarr_t('kpoint_weights', "dp", "number_of_kpoints")]) + NCF_CHECK(ncerr) + + NCF_CHECK(nctk_set_datamode(ncid)) + + ncerr = nf90_put_var(ncid, nctk_idname(ncid, 'reduced_coordinates_of_kpoints'), kpoints) + NCF_CHECK(ncerr) + + NCF_CHECK(nf90_put_var(ncid, nctk_idname(ncid, 'kpoint_weights'), weights)) + + NCF_CHECK(nf90_close(ncid)) + +end function nctk_write_ibz +!!*** + +!!****f* m_nctk/nctk_get_dim +!! NAME +!! nctk_get_dim +!! +!! FUNCTION +!! Get the value of a dimension from its name. +!! +!! INPUTS +!! ncid=Netcdf identifier. +!! dimname=Name of the dimension. +!! [datamode]=If True, the nc file is set in data mode (default=False) +!! +!! OUTPUT +!! dimlen=Value of the dimension. +!! +!! SOURCE + +integer function nctk_get_dim(ncid, dimname, dimlen, datamode) result(ncerr) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: ncid + character(len=*),intent(in) :: dimname + integer,intent(out) :: dimlen + logical,optional,intent(in) :: datamode + +!Local variables------------------------------- +!scalars + integer :: dimid + +! ********************************************************************* + + ncerr = nf90_noerr + + if (present(datamode)) then + if (datamode) then + NCF_CHECK(nctk_set_datamode(ncid)) + end if + end if + + ncerr = nf90_inq_dimid(ncid, dimname, dimid) + if (ncerr == nf90_noerr) then + ncerr = nf90_inquire_dimension(ncid, dimid, len=dimlen) + end if + +end function nctk_get_dim +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_nctk/nctk_write_datar +!! NAME +!! nctk_write_datar +!! +!! FUNCTION +!! Write an array in real space in netcdf format +!! +!! INPUTS +!! path=Filename +!! varname=Name of the variable to write. +!! ngfft(18)=information about 3D FFT +!! cplex=1 for real arrays (e.g. GS rhor), 2 for complex array. +!! nfft=number of points in the real space FFT mesh treated by this MPI proc +!! nspden=number of spin-density components +!! comm_fft=MPI communicator (used only if MPI-FFT). +!! fftn3_distrib(n3)=rank of the processors which own fft planes in 3rd dimension. +!! ffti3_local(n3)=local index for 3d dimension +!! datar(cplex*nfft,nspden)= array in real space. +!! [action] +!! +!! OUTPUT +!! Only writing +!! +!! SOURCE + +integer function nctk_write_datar(varname,path,ngfft,cplex,nfft,nspden,& + comm_fft,fftn3_distrib,ffti3_local,datar,action) result(ncerr) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: cplex,nfft,nspden,comm_fft + character(len=*),intent(in) :: path,varname + character(len=*),optional,intent(in) :: action +!arrays + integer,intent(in) :: ngfft(18),fftn3_distrib(ngfft(3)),ffti3_local(ngfft(3)) + real(dp),target,intent(in) :: datar(cplex*nfft,nspden) + +!Local variables------------------------------- +!scalars + integer,parameter :: master=0 + integer :: ncid,varid,i3,nproc_fft,me_fft,i3_glob,n1,n2,n3,ispden,cmode + logical :: ionode + character(len=nctk_slen) :: cplex_name,my_action + !character(len=500) :: msg +!arrays + real(dp),allocatable :: glob_datar(:,:) + +! ************************************************************************* + + ! FIXME: Default should be open but this enters into conflict with the abi_estf stuff! + ! if we are using MPI-IO since file is not open with HDF5. + !my_action = "create"; if (present(action)) my_action = action + my_action = "open"; if (present(action)) my_action = action + + nproc_fft = xmpi_comm_size(comm_fft); me_fft = xmpi_comm_rank(comm_fft) + n1 = ngfft(1); n2 = ngfft(2); n3 = ngfft(3) + + ! TODO: Be careful here because we should always create with HDF5 if available + ! to avoid problems if we have to reread with nproc_fft > 1 and MPI-IO + ionode = .True.; ncerr = nf90_noerr + if (nproc_fft == 1) then + select case(my_action) + case ("open") + ncerr = nf90_open(path, mode=nf90_write, ncid=ncid) + case ("create") + ncerr = nctk_open_create(ncid, path, comm_fft) + case default + ABI_ERROR(sjoin("Wrong action: ", my_action)) + end select + + else + if (nctk_has_mpiio) then + call wrtout(std_out, strcat("nctk_write_datar: using MPI-IO to write ", varname, path), "COLL") + + ncerr = nf90_einval +#ifdef HAVE_NETCDF_MPI + select case(my_action) + case ("open") + ncerr = nf90_open(path, mode=nf90_write, comm=comm_fft, info=xmpio_info, ncid=ncid) + case ("create") + ncerr = nf90_create(path, cmode=ior(ior(nf90_netcdf4, nf90_mpiio), nf90_write), & + comm=comm_fft, info=xmpio_info, ncid=ncid) + case default + ABI_ERROR(strcat("Wrong action:", my_action)) + end select +#endif + else + ! MPI-FFT without MPI-support. Only master performs IO + ionode = (me_fft == master) + if (ionode) then + select case(my_action) + case ("open") + ncerr = nf90_open(path, mode=nf90_write, ncid=ncid) + case ("create") + !ncerr = nf90_create(path, cmode=nf90_clobber, ncid=ncid) + cmode = def_cmode_for_seq_create + ncerr = nf90_create(path, cmode=cmode, ncid=ncid) + case default + ABI_ERROR(strcat("Wrong action:", my_action)) + end select + end if + end if + end if + NCF_CHECK_MSG(ncerr, sjoin("opening file:", path)) + + if (ionode) then + ! Define dims and variables + !write(std_out,*)"defing dims",trim(varname)," in file: ",path + cplex_name = strcat("real_or_complex_", varname) + ncerr = nctk_def_dims(ncid, [& + nctkdim_t(cplex_name, cplex),& + nctkdim_t("number_of_grid_points_vector1", n1),& + nctkdim_t("number_of_grid_points_vector2", n2),& + nctkdim_t("number_of_grid_points_vector3", n3),& + nctkdim_t("number_of_components", nspden)], defmode=.True.) + NCF_CHECK(ncerr) + + ncerr = nctk_def_one_array(ncid, nctkarr_t(name=varname, dtype="dp", shape_str=strcat(cplex_name, & +", number_of_grid_points_vector1, number_of_grid_points_vector2, number_of_grid_points_vector3, number_of_components")),& + varid=varid) + + ! Add attributes + varid = nctk_idname(ncid, varname) + NCF_CHECK(nf90_put_att(ncid, varid, "units", "atomic units")) + NCF_CHECK(nf90_put_att(ncid, varid, "scale_to_atomic_units", one)) + end if + + if (nproc_fft == 1) then + ! no MPI-FFT --> write data directly. + varid = nctk_idname(ncid, varname) + NCF_CHECK(nctk_set_datamode(ncid)) + NCF_CHECK(nf90_put_var(ncid, varid, datar, start=[1,1,1,1,1], count=[cplex, n1, n2, n3, nspden])) + NCF_CHECK(nf90_close(ncid)) + + else + ! Must handle data distribution. + ABI_CHECK(mod(n3, nproc_fft) == 0, "assuming mod(n3, nproc_fft) == 0") + + i3_glob = -1 + do i3=1,ngfft(3) + if (fftn3_distrib(i3) == me_fft) then + i3_glob = i3 + exit + end if + end do + ABI_CHECK(i3_glob > 0, "negative i3_glob") + + !do i3=i3_glob,ngfft(3) + ! if (fftn3_distrib(i3) /= me_fft) exit + ! !assert all(ffn3_distrib(i3_glob:i3_glob -1 + ngfft(3) / nproc_fft) == me_fft) + !end do + !i3_glob = i3- 1 + !print*,"i3_glob",i3_glob + + if (ionode) then + NCF_CHECK(nf90_enddef(ncid)) + end if + + ! Array on disk has shape [cplex, n1, n2, n3, nspden] + if (nctk_has_mpiio) then + ! Use collective IO. + ncerr = nf90_einval + NCF_CHECK(nctk_set_collective(ncid, varid)) + + do ispden=1,nspden + ncerr = nf90_put_var(ncid, varid, datar(:,ispden), start=[1,1,1,i3_glob,ispden], & + count=[cplex,n1,n2,n3/nproc_fft,1]) + NCF_CHECK(ncerr) + end do + else + ! MPI-FFT without MPI-IO. Collect data (requires more memory and communication) + ABI_MALLOC(glob_datar, (cplex*product(ngfft(1:3)), nspden)) + call collect_datar(ngfft,cplex,nfft,nspden,datar,comm_fft,fftn3_distrib,ffti3_local,glob_datar,master=master) + + if (ionode) then + ! Write global array. + NCF_CHECK(nf90_put_var(ncid, varid, glob_datar, start=[1,1,1,1,1], count=[cplex,n1,n2,n3,nspden])) + end if + ABI_FREE(glob_datar) + end if + + if (ionode) then + NCF_CHECK(nf90_close(ncid)) + end if + end if + + !ok = .True. + ! Sequential IO + !do rank=0,nproc_fft-1 + ! if (rank == me_fft) then + ! ncerr = nf90_open(path, mode=nf90_write, ncid=ncid) + ! do ispden=1,nspden + ! ncerr = nf90_put_var(ncid, varid, datar(1:,ispden), start=[1,1,1,i3_glob,ispden], & + ! count=[cplex,ngfft(1),ngfft(2),ngfft(3)/nproc_fft,1]) + ! end do + ! ncerr = nf90_close(ncid) + ! end if + ! call xmpi_barrier(comm_fft) + !end do + +end function nctk_write_datar +!!*** + +!!****f* m_nctk/nctk_read_datar +!! NAME +!! nctk_read_datar +!! +!! FUNCTION +!! Read an array in real space in netcdf format +!! +!! INPUTS +!! path=Filename +!! varname=Name of the variable to read. +!! ngfft(18)=information about 3D FFT +!! cplex=1 for real arrays (e.g. GS rhor), 2 for complex array. +!! nfft=number of points in the real space FFT mesh treated by this MPI proc +!! nspden=number of spin-density components +!! comm_fft=MPI communicator (used only if MPI-FFT). +!! fftn3_distrib(n3)=rank of the processors which own fft planes in 3rd dimension. +!! ffti3_local(n3)=local index for 3d dimension +!! datar(cplex*nfft,nspden)= array in real space. +!! +!! OUTPUT +!! Only writing +!! +!! SOURCE + +integer function nctk_read_datar(path,varname,ngfft,cplex,nfft,nspden,& + comm_fft,fftn3_distrib,ffti3_local,datar) result(ncerr) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: cplex,nfft,nspden,comm_fft + character(len=*),intent(in) :: path,varname +!arrays + integer,intent(in) :: ngfft(18),fftn3_distrib(ngfft(3)),ffti3_local(ngfft(3)) + real(dp),intent(out) :: datar(cplex*nfft,nspden) + +!Local variables------------------------------- +!scalars + integer,parameter :: master=0 + integer :: ncid,varid,i3,nproc_fft,me_fft,i3_glob,n1,n2,n3,ispden + logical :: ionode +!arrays + real(dp),allocatable :: glob_datar(:,:) + +! ************************************************************************* + + nproc_fft = xmpi_comm_size(comm_fft); me_fft = xmpi_comm_rank(comm_fft) + n1 = ngfft(1); n2 = ngfft(2); n3 = ngfft(3) + + ! TODO: Be careful here because we should always create with HDF5 if available + ! to avoid problems if we have to reread with nproc_fft > 1 and MPI-IO + ionode = .True. + if (nproc_fft == 1) then + ncerr = nf90_open(path, mode=nf90_nowrite, ncid=ncid) + else + if (nctk_has_mpiio) then + !write(std_out,*)"open_par: ",trim(path) + !ncerr = nf90_open_par(path, nf90_nowrite, + ! Don't know why but the format is not autodected! + ncerr = nf90_einval +#ifdef HAVE_NETCDF_MPI + ncerr = nf90_open(path, mode=ior(ior(nf90_netcdf4, nf90_mpiio), nf90_nowrite),& + comm=comm_fft, info=xmpio_info, ncid=ncid) +#endif + else + ! MPI-FFT without MPI-support. Only master does IO + ionode = (me_fft == master); ncerr = nf90_noerr + if (ionode) ncerr = nf90_open(path, nf90_nowrite, ncid) + end if + end if + NCF_CHECK_MSG(ncerr, sjoin("opening file: ",path)) + + NCF_CHECK(nf90_inq_varid(ncid, varname, varid)) + !write(std_out,*)"about to read varname, ngfft, cplex, nfft, nspden:", trim(varname), ngfft(:3), cplex,nfft,nspden + + ! netcdf array has shape [cplex, n1, n2, n3, nspden] + if (nproc_fft == 1) then + ! No MPI-FFT --> easy + NCF_CHECK(nf90_get_var(ncid, varid, datar, start=[1,1,1,1], count=[cplex, n1, n2, n3, nspden])) + NCF_CHECK(nf90_close(ncid)) + + else + ! Handle data distribution. + ABI_CHECK(mod(ngfft(3), nproc_fft) == 0, "assuming mod(n3, nproc_fft) == 0") + + i3_glob = -1 + do i3=1,ngfft(3) + if (fftn3_distrib(i3) == me_fft) then + i3_glob = i3 + exit + end if + end do + ABI_CHECK(i3_glob > 0, "negative i3_glob") + + if (nctk_has_mpiio) then + ! Use parallel IO with collective calls. + ncerr = nf90_einval + NCF_CHECK(nctk_set_collective(ncid, varid)) + + do ispden=1,nspden + ncerr = nf90_get_var(ncid, varid, datar(:,ispden), start=[1,1,1,i3_glob,ispden], & + count=[cplex,ngfft(1),ngfft(2),ngfft(3)/nproc_fft,1]) + NCF_CHECK(ncerr) + end do + else + ! MPI-FFT without MPI-IO. Master read and broadcast (requires more memory and communication) + ABI_MALLOC(glob_datar, (cplex*product(ngfft(1:3)), nspden)) + if (ionode) then + NCF_CHECK(nf90_get_var(ncid, varid, glob_datar, start=[1,1,1,1,1], count=[cplex,n1,n2,n3,nspden])) + end if + + call distrib_datar(ngfft,cplex,nfft,nspden,glob_datar,master,comm_fft,fftn3_distrib,ffti3_local,datar) + ABI_FREE(glob_datar) + end if + + if (ionode) then + NCF_CHECK(nf90_close(ncid)) + end if + end if + +end function nctk_read_datar +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_nctk/collect_datar +!! NAME +!! collect_datar +!! +!! FUNCTION +!! Collect a real-space MPI-FFT distributed array on each proc. +!! +!! INPUTS +!! ngfft(18)=contain all needed information about 3D FFT (see NOTES at beginning of scfcv) +!! cplex=1 if real array, 2 for complex +!! nfft=Number of FFT points treated by this MPI proc +!! nspden=Second dimension of rhor +!! rhor(cplex*nfft,nspden)=Array in real space (MPI-FFT distributed) +!! fftn3_distrib(n3)=rank of the processors which own fft planes in 3rd dimension. +!! fftn3_local(n3)=local i3 indices +!! comm_fft=MPI-FFT communicator +!! [master]=MPI rank, Optional. If present, the global array is available only on master node. +!! +!! OUTPUT +!! rhor_glob(cplex*nfft_tot,nspden)=Global array +!! +!! SOURCE + +subroutine collect_datar(ngfft,cplex,nfft,nspden,rhor,comm_fft,fftn3_distrib,ffti3_local,rhor_glob,master) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: cplex,nfft,nspden,comm_fft + integer,optional,intent(in) :: master +!arrays + integer,intent(in) :: ngfft(18) + integer,intent(in) :: fftn3_distrib(ngfft(3)),ffti3_local(ngfft(3)) + real(dp),intent(in) :: rhor(cplex*nfft,nspden) + real(dp),intent(out) :: rhor_glob(cplex*product(ngfft(1:3)),nspden) + +!Local variables------------------------------- + integer :: ispden,i1,i2,i3,me_fft,i3_local,my_fftbase,glob_fftbase + integer :: n1,n2,n3,ierr,nfft_tot + +! ************************************************************************* + + nfft_tot = product(ngfft(1:3)); me_fft = xmpi_comm_rank(comm_fft) + n1 = ngfft(1); n2 = ngfft(2); n3 = ngfft(3) + + if (nfft_tot == nfft) then + ! full rhor on each node, just do a copy + rhor_glob = rhor + else + ! if MPI-FFT we have to gather the global array on each node. + rhor_glob = zero + do ispden=1,nspden + do i3=1,n3 + if (me_fft == fftn3_distrib(i3)) then + i3_local = ffti3_local(i3) + do i2=1,n2 + my_fftbase = cplex * ( (i2-1)*n1 + (i3_local-1)*n1*n2 ) + glob_fftbase = cplex * ( (i2-1)*n1 + (i3-1)*n1*n2 ) + do i1=1,cplex * n1 + rhor_glob(i1+glob_fftbase,ispden) = rhor(i1+my_fftbase,ispden) + end do + end do + end if + end do + end do + if (present(master)) then + call xmpi_sum_master(rhor_glob,master,comm_fft,ierr) + else + call xmpi_sum(rhor_glob,comm_fft,ierr) + end if + end if + +end subroutine collect_datar +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_nctk/distrib_datar +!! NAME +!! distrib_datar +!! +!! FUNCTION +!! distribute a real-space MPI-FFT +!! +!! INPUTS +!! ngfft(18)=contain all needed information about 3D FFT (see NOTES at beginning of scfcv) +!! cplex=1 if real array, 2 for complex +!! nfft=Number of FFT points treated by this MPI proc +!! nspden=Second dimension of rhor +!! rhor_glob(cplex*nfft_tot,nspden)=Global array +!! master=The rank of the node that owns the global array. +!! comm_fft=MPI-FFT communicator +!! fftn3_distrib(n3)=rank of the processors which own fft planes in 3rd dimension. +!! fftn3_local(n3)=local i3 indices +!! +!! OUTPUT +!! rhor(cplex*nfft,nspden)=Array in real space (MPI-FFT distributed) +!! +!! SOURCE + +subroutine distrib_datar(ngfft,cplex,nfft,nspden,rhor_glob,master,comm_fft,fftn3_distrib,ffti3_local,rhor) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: cplex,nfft,nspden,comm_fft,master +!arrays + integer,intent(in) :: ngfft(18) + integer,intent(in) :: fftn3_distrib(ngfft(3)),ffti3_local(ngfft(3)) + real(dp),intent(out) :: rhor(cplex*nfft,nspden) + real(dp),intent(inout) :: rhor_glob(cplex*product(ngfft(1:3)),nspden) + +!Local variables------------------------------- + integer :: ispden,i1,i2,i3,me_fft,i3_local,my_fftbase,glob_fftbase + integer :: n1,n2,n3,ierr,nfft_tot + +! ************************************************************************* + + nfft_tot = product(ngfft(1:3)); me_fft = xmpi_comm_rank(comm_fft) + n1 = ngfft(1); n2 = ngfft(2); n3 = ngfft(3) + + if (nfft_tot == nfft) then + ! full rhor on each node, just do a copy + rhor = rhor_glob + else + ! if MPI-FFT we have to gather the global array on each node. + call xmpi_bcast(rhor_glob,master,comm_fft,ierr) + do ispden=1,nspden + do i3=1,n3 + if (me_fft == fftn3_distrib(i3)) then + i3_local = ffti3_local(i3) + do i2=1,n2 + my_fftbase = cplex * ( (i2-1)*n1 + (i3_local-1)*n1*n2 ) + glob_fftbase = cplex * ( (i2-1)*n1 + (i3-1)*n1*n2 ) + do i1=1,cplex * n1 + rhor(i1+my_fftbase,ispden) = rhor_glob(i1+glob_fftbase,ispden) + end do + end do + end if + end do + end do + end if + +end subroutine distrib_datar +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_nctk/var_from_id +!! NAME +!! var_from_id +!! +!! FUNCTION +!! Initialize a nctkvar_t object from the variable id +!! +!! INPUTS +!! ncid=NC file handle +!! varid=Variable ID +!! +!! OUTPUT +!! var=Info on the variable. +!! +!! SOURCE + +subroutine var_from_id(ncid, varid, var) + +!Arguments ------------------------------------ + integer, intent(in) :: ncid, varid + type(nctkvar_t), intent(out) :: var + +!Local variables------------------------------- +!scalars + integer :: ii, ncerr + !character(len=NF90_MAX_NAME) :: ncname + +! ********************************************************************* + + ! Get info about the variable. + var%id = varid + ncerr = nf90_inquire_variable(ncid, var%id, & + name=var%name, xtype=var%xtype, ndims=var%ndims, dimids=var%dimids, natts=var%natts) + NCF_CHECK(ncerr) + + ! Get info about dimensions. + if (var%ndims > 0) then + do ii=1,var%ndims + ncerr = nf90_inquire_dimension(ncid, var%dimids(ii), len=var%dimlens(ii), name=var%dimnames(ii)) + NCF_CHECK(ncerr) + end do + end if + + ! Get the number of attributes and their names. + !if (var%natts > 0) then + ! do ii=1,var%natts + ! ncerr = nf90_inq_attname(ncid, var%id, ii, var%attnames(ii)) + ! end do + !end if + +end subroutine var_from_id +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_nctk/var_from_name +!! NAME +!! var_from_name +!! +!! FUNCTION +!! Initialize a nctkvar_t object from the variable name +!! +!! INPUTS +!! ncid=NC file handle +!! name=Variable name +!! +!! OUTPUT +!! var=Info on the variable. +!! +!! SOURCE + +subroutine var_from_name(ncid, name, var) + +!Arguments ------------------------------------ + integer, intent(in) :: ncid + character(len=*),intent(in) :: name + type(nctkvar_t), intent(out) :: var + +!Local variables------------------------------- +!scalars + integer :: varid + +! ********************************************************************* + + varid = nctk_idname(ncid, name) + call var_from_id(ncid, varid, var) + +end subroutine var_from_name +!!*** + +!!****f* m_nctk/nctk_defwrite_nonana_terms +!! NAME +!! nctk_defwrite_nonana_terms +!! +!! FUNCTION +!! Write to ncfile the phonon frequencies and displacements for q --> 0 in the presence of non-analytical behaviour. +!! +!! INPUTS +!! ncid=netcdf file id. +!! iphl2=Index of the q-point to be written to file +!! nph2l=Number of qpoints. +!! qph2l(3,nph2l)=List of phonon wavevector directions along which the non-analytical correction +!! to the Gamma-point phonon frequencies will be calculated +!! The direction is in CARTESIAN COORDINATES +!! natom=Number of atoms +!! phfrq(3*natom)=Phonon frequencies in Ha +!! cart_displ(2,3*natom,3*natom)=displacements in CARTESIAN coordinates. +!! +!! OUTPUT +!! Only writing. +!! +!! SOURCE + +subroutine nctk_defwrite_nonana_terms(ncid, iphl2, nph2l, qph2l, natom, phfrq, cart_displ, mode) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: ncid,iphl2,nph2l,natom + character(len=*),intent(in) :: mode +!arrays + real(dp),intent(in) :: qph2l(3, nph2l) + real(dp),intent(in) :: phfrq(3*natom) + real(dp),intent(in) :: cart_displ(2,3*natom,3*natom) + +!Local variables------------------------------- +!scalars + integer :: ncerr, na_phmodes_varid, na_phdispl_varid + +! ************************************************************************* + + select case (mode) + case ("define") + !NCF_CHECK(nctk_def_basedims(ncid, defmode=.True.)) + ncerr = nctk_def_dims(ncid, [nctkdim_t("number_of_non_analytical_directions", nph2l)], defmode=.True.) + NCF_CHECK(ncerr) + + ncerr = nctk_def_arrays(ncid, [& + nctkarr_t('non_analytical_directions', "dp", "number_of_cartesian_directions, number_of_non_analytical_directions"),& + nctkarr_t('non_analytical_phonon_modes', "dp", "number_of_phonon_modes, number_of_non_analytical_directions"),& + nctkarr_t('non_analytical_phdispl_cart', "dp", & + "two, number_of_phonon_modes, number_of_phonon_modes, number_of_non_analytical_directions")]) + NCF_CHECK(ncerr) + + NCF_CHECK(nctk_set_datamode(ncid)) + NCF_CHECK(nf90_put_var(ncid, nctk_idname(ncid, "non_analytical_directions"), qph2l)) + + case ("write") + + NCF_CHECK(nf90_inq_varid(ncid, "non_analytical_phonon_modes", na_phmodes_varid)) + NCF_CHECK(nf90_put_var(ncid,na_phmodes_varid,phfrq*Ha_eV,start=[1, iphl2], count=[3*natom, 1])) + NCF_CHECK(nf90_inq_varid(ncid, "non_analytical_phdispl_cart", na_phdispl_varid)) + ncerr = nf90_put_var(ncid,na_phdispl_varid,cart_displ*Bohr_Ang,& + start=[1,1,1,iphl2], count=[2,3*natom,3*natom, 1]) + NCF_CHECK(ncerr) + + case default + ABI_ERROR(sjoin("Wrong value for mode", mode)) + end select + +end subroutine nctk_defwrite_nonana_terms +!!*** + +!!****f* m_nctk/nctk_defwrite_nonana_raman_terms +!! NAME +!! nctk_defwrite_nonana_raman_terms +!! +!! FUNCTION +!! Write the Raman susceptiblities for q-->0 along different directions in the netcdf file. +!! +!! INPUTS +!! ncid=netcdf file id. +!! iphl2=Index of the q-point to be written to file. +!! nph2l=Number of qpoints. +!! rsus(3*natom,3,3)=List of Raman susceptibilities along the direction corresponding to iphl2. +!! natom=Number of atoms +!! +!! OUTPUT +!! Only writing. +!! +!! SOURCE + +subroutine nctk_defwrite_nonana_raman_terms(ncid, iphl2, nph2l, natom, rsus, mode) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: ncid,natom,iphl2,nph2l + character(len=*),intent(in) :: mode +!arrays + real(dp),intent(in) :: rsus(3*natom,3,3) + +!Local variables------------------------------- +!scalars + integer :: ncerr, raman_sus_varid + +! ************************************************************************* + +!Fake use of nph2l, to keep it as argument. This should be removed when nph2l will be used. + if(.false.)then + ncerr=nph2l + endif + + select case (mode) + case ("define") + NCF_CHECK(nctk_def_basedims(ncid, defmode=.True.)) + ncerr = nctk_def_arrays(ncid, [ nctkarr_t("non_analytical_raman_sus", "dp", & +"number_of_non_analytical_directions,number_of_phonon_modes,number_of_cartesian_directions,number_of_cartesian_directions")]) + NCF_CHECK(ncerr) + + NCF_CHECK(nctk_set_datamode(ncid)) + + case ("write") + NCF_CHECK(nf90_inq_varid(ncid, "non_analytical_raman_sus", raman_sus_varid)) + ncerr = nf90_put_var(ncid,raman_sus_varid,rsus,& + start=[iphl2,1,1,1], count=[1,3*natom,3,3]) + NCF_CHECK(ncerr) + + case default + ABI_ERROR(sjoin("Wrong value for mode", mode)) + end select + +end subroutine nctk_defwrite_nonana_raman_terms +!!*** + +!!****f* m_nctk/nctk_defwrite_raman_terms +!! NAME +!! nctk_defwrite_raman_terms +!! +!! FUNCTION +!! Write the Raman susceptiblities for q=0 and also the phonon frequncies at gamma. +!! +!! INPUTS +!! ncid=netcdf file id. +!! rsus(3*natom,3,3)=List of Raman susceptibilities. +!! natom=Number of atoms +!! +!! OUTPUT +!! Only writing. +!! +!! SOURCE + +subroutine nctk_defwrite_raman_terms(ncid, natom, rsus, phfrq) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: ncid,natom +!arrays + real(dp),intent(in) :: rsus(3*natom,3,3) + real(dp),intent(in) :: phfrq(3*natom) + +!Local variables------------------------------- +!scalars + integer :: ncerr, raman_sus_varid, phmodes_varid + +! ************************************************************************* + + NCF_CHECK(nctk_def_basedims(ncid, defmode=.True.)) + ncerr = nctk_def_arrays(ncid, [ nctkarr_t("raman_sus", "dp", & + "number_of_phonon_modes,number_of_cartesian_directions,number_of_cartesian_directions"), & + nctkarr_t("gamma_phonon_modes", "dp", "number_of_phonon_modes")]) + NCF_CHECK(ncerr) + + NCF_CHECK(nctk_set_datamode(ncid)) + + NCF_CHECK(nf90_inq_varid(ncid, "raman_sus", raman_sus_varid)) + NCF_CHECK(nf90_put_var(ncid,raman_sus_varid,rsus)) + NCF_CHECK(nf90_inq_varid(ncid, "gamma_phonon_modes", phmodes_varid)) + NCF_CHECK(nf90_put_var(ncid,phmodes_varid,phfrq*Ha_eV)) + +end subroutine nctk_defwrite_raman_terms +!!*** + +#endif + +!!****f* m_nctk/create_nc_file +!! NAME +!! create_nc_file +!! +!! FUNCTION +!! Create an NetCDF file including a dimension one definition +!! +!! INPUTS +!! +!! OUTPUT +!! +!! TODO: +!! Remove +!! +!! SOURCE + +subroutine create_nc_file (filename,ncid) + +!Arguments ------------------------------------ +!scalars + integer,intent(out) :: ncid +!arrays +character(len=*),intent(in) :: filename + +!Local variables------------------------------- +#if defined HAVE_NETCDF +integer :: one_id +integer :: ncerr, cmode +#endif + +! ************************************************************************* + + ncid = 0 +#if defined HAVE_NETCDF + ! Create the NetCDF file + !ncerr = nf90_create(path=filename,cmode=NF90_CLOBBER,ncid=ncid) + cmode = def_cmode_for_seq_create + ncerr = nf90_create(path=filename, cmode=cmode, ncid=ncid) + NCF_CHECK_MSG(ncerr, sjoin('Error while creating:', filename)) + ncerr=nf90_def_dim(ncid,'one',1,one_id) + NCF_CHECK_MSG(ncerr,'nf90_def_dim') +#endif + + end subroutine create_nc_file +!!*** + +!!****f* m_nctk/write_var_netcdf +!! +!! NAME +!! write_var_netcdf +!! +!! FUNCTION +!! Write variable into a netcdf dataset +!! +!! TODO: +!! Remove! +!! +!! INPUTS +!! arr_int +!! arr_real +!! marr +!! narr +!! typevar +!! varname +!! +!! OUTPUT +!! (only writing) +!! +!! SOURCE + +subroutine write_var_netcdf(arr_int,arr_real,marr,narr,ncid,typevar,varname) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: narr,marr,ncid + character(len=*),intent(in) :: varname + character(len=3),intent(in) :: typevar +!arrays + integer,intent(in) :: arr_int(marr) + real(dp),intent(in) :: arr_real(marr) + +!Local variables------------------------------- +!scalars + integer :: var_id,var_type,vardim_id,ncerr + !character(len=500) :: msg + +! ************************************************************************* + + !write(std_out,*)"about to write varname: ",trim(varname) + +#if defined HAVE_NETCDF + if (ncid>0) then +! ### Put the file in definition mode + ncerr=nf90_redef(ncid) + if (ncerr/=NF90_NOERR.and.ncerr/=NF90_EINDEFINE) then + NCF_CHECK_MSG(ncerr,'nf90_redef') + end if +! ### Define the dimensions + if (narr==1)then + ncerr=nf90_inq_dimid(ncid,'one',vardim_id) + NCF_CHECK_MSG(ncerr,'nf90_inq_varid') + else + ncerr=nf90_def_dim(ncid,trim(varname),narr,vardim_id) + NCF_CHECK_MSG(ncerr,'nf90_def_dim') + end if +! ### Define the variables + if (typevar=='INT') then + var_type=NF90_INT + else if (typevar=='DPR') then + var_type=NF90_DOUBLE + end if + ncerr=nf90_def_var(ncid, trim(varname), var_type, vardim_id, var_id) + NCF_CHECK_MSG(ncerr,'nf90_def_var') +! ### Put the file in data mode + ncerr=nf90_enddef(ncid) + if (ncerr/=NF90_NOERR.and.ncerr/=NF90_ENOTINDEFINE) then + NCF_CHECK_MSG(ncerr,'nf90_enddef') + end if +! ### Write variables into the dataset + if (typevar=='INT') then + ncerr=nf90_put_var(ncid,var_id,arr_int,start=(/1/),count=(/narr/)) + else if (typevar=='DPR') then + ncerr=nf90_put_var(ncid,var_id,arr_real,start=(/1/),count=(/narr/)) + end if + NCF_CHECK_MSG(ncerr,'nf90_put_var') + end if +#endif + +end subroutine write_var_netcdf +!!*** + +!!****f* ABINIT/write_eig +!! +!! NAME +!! write_eig +!! +!! FUNCTION +!! Write the eigenvalues band by band and k point by k point +!! in a NetCDF file format +!! +!! INPUTS +!! filname = Filename of the file where the history will be stored +!! +!! OUTPUT +!! (only writing) +!! +!! SOURCE + +subroutine write_eig(eigen,fermie,filename,kptns,mband,nband,nkpt,nsppol,& +& shiftfactor_extfpmd) ! Optional arguments + +!Arguments ------------------------------------ +!scalars + character(len=fnlen),intent(in) :: filename + integer,intent(in) :: nkpt,nsppol,mband + real(dp),intent(in) :: fermie + real(dp),optional,intent(in) :: shiftfactor_extfpmd +!arrays + integer,intent(in) :: nband(nkpt*nsppol) + real(dp),intent(in) :: eigen(mband*nkpt*nsppol) + real(dp),intent(in) :: kptns(3,nkpt) + +!Local variables------------------------------- +!scalars + integer :: ncerr,ncid,ii, cmode + integer :: xyz_id,nkpt_id,mband_id,nsppol_id + integer :: eig_id,fermie_id,kpt_id,nbk_id,nbk + integer :: shiftfactor_extfpmd_id + integer :: ikpt,isppol,nband_k,band_index + real(dp):: convrt +!arrays + integer :: dimEIG(3),dimKPT(2),dimNBK(2) + integer :: count2(2),start2(2) + integer :: count3(3),start3(3) + integer :: dim0(0) + real(dp):: band(mband) + +! ********************************************************************* + +#if defined HAVE_NETCDF + + convrt=1.0_dp + +!1. Create netCDF file + !ncerr = nf90_create(path=trim(filename),cmode=NF90_CLOBBER, ncid=ncid) + cmode = def_cmode_for_seq_create + ncerr = nf90_create(path=trim(filename), cmode=cmode, ncid=ncid) + NCF_CHECK_MSG(ncerr," create netcdf EIG file") + +!2. Define dimensions + ncerr = nf90_def_dim(ncid,"xyz",3,xyz_id) + NCF_CHECK_MSG(ncerr," define dimension xyz") + + ncerr = nf90_def_dim(ncid,"mband",mband,mband_id) + NCF_CHECK_MSG(ncerr," define dimension mband") + + ncerr = nf90_def_dim(ncid,"nkpt",nkpt,nkpt_id) + NCF_CHECK_MSG(ncerr," define dimension nkpt") + + ncerr = nf90_def_dim(ncid,"nsppol",nsppol,nsppol_id) + NCF_CHECK_MSG(ncerr," define dimension nsppol") + +!Dimensions for EIGENVALUES + dimEIG = (/ mband_id, nkpt_id, nsppol_id /) +!Dimensions for kpoint positions + dimKPT = (/ xyz_id, nkpt_id /) +!Dimensions for number kpoints per band and spin +!dimNBK = (/ nkpt_id, nsppol_id /) + dimNBK = (/ nkpt_id, nsppol_id /) + +!3. Define variables + call ab_define_var(ncid,dim0,fermie_id,NF90_DOUBLE,& +& "fermie","Chemical potential","Hartree") + call ab_define_var(ncid, dimEIG, eig_id, NF90_DOUBLE,& +& "Eigenvalues",& +& "Values of eigenvalues",& +& "Hartree") + call ab_define_var(ncid, dimKPT, kpt_id, NF90_DOUBLE,"Kptns",& +& "Positions of K-points in reciprocal space",& +& "Dimensionless") + call ab_define_var(ncid, dimNBK, nbk_id, NF90_INT,"NBandK",& +& "Number of bands per kpoint and Spin",& +& "Dimensionless") + if(present(shiftfactor_extfpmd)) then + call ab_define_var(ncid,dim0,shiftfactor_extfpmd_id,NF90_DOUBLE,& +& "shiftfactor_extfpmd","Extended FPMD shiftfactor","Hartree") + end if + +!4. End define mode + ncerr = nf90_enddef(ncid) + NCF_CHECK_MSG(ncerr," end define mode") + +!5 Write kpoint positions + do ikpt=1,nkpt + start2 = (/ 1, ikpt /) + count2 = (/ 3, 1 /) + ncerr = nf90_put_var(ncid, kpt_id,& +& kptns(1:3,ikpt),& +& start = start2,& +& count = count2) + NCF_CHECK_MSG(ncerr," write variable kptns") + end do + +!6.1 Write chemical potential + ncerr = nf90_put_var(ncid, fermie_id, fermie) + NCF_CHECK_MSG(ncerr," write variable fermie") + +!6.2 Write extfpmd shiftfactor + if(present(shiftfactor_extfpmd)) then + ncerr = nf90_put_var(ncid, shiftfactor_extfpmd_id, shiftfactor_extfpmd) + NCF_CHECK_MSG(ncerr," write variable shiftfactor_extfpmd") + end if + +!6.3 Write eigenvalues + band_index=0 + do isppol=1,nsppol + do ikpt=1,nkpt + nband_k=nband(ikpt+(isppol-1)*nkpt) + start3 = (/ 1, ikpt, isppol /) + count3 = (/ mband, 1, 1 /) + band(:)=zero + do ii=1,nband_k + band(ii)=eigen(band_index+ii) + end do + ncerr = nf90_put_var(ncid, eig_id,& +& band,& +& start = start3,& +& count = count3) + NCF_CHECK_MSG(ncerr," write variable band") + + band_index=band_index+nband_k + end do + end do + +!6.4 Write Number of bands per kpoint and Spin + + do isppol=1,nsppol + do ikpt=1,nkpt + start2 = (/ ikpt, 1 /) + count2 = (/ 1, 1 /) + nbk=nband(ikpt+(isppol-1)*nkpt) + ncerr = nf90_put_var(ncid, nbk_id,& +& nbk,& +& start = start2) + NCF_CHECK_MSG(ncerr," write variable nband") + end do + end do + +!7 Close file + + ncerr = nf90_close(ncid) + NCF_CHECK_MSG(ncerr," close netcdf EIG file") +#endif + +end subroutine write_eig +!!*** + +END MODULE m_nctk +!!*** diff --git a/GX-PAW/common/src/27_toolbox_oop/m_nctk.o b/GX-PAW/common/src/27_toolbox_oop/m_nctk.o new file mode 100644 index 00000000..97758c7f Binary files /dev/null and b/GX-PAW/common/src/27_toolbox_oop/m_nctk.o differ diff --git a/GX-PAW/common/src/28_numeric_noabirule/Makefile b/GX-PAW/common/src/28_numeric_noabirule/Makefile new file mode 100644 index 00000000..d1e28d97 --- /dev/null +++ b/GX-PAW/common/src/28_numeric_noabirule/Makefile @@ -0,0 +1,1592 @@ +# Makefile.in generated by automake 1.16.3 from Makefile.am. +# shared/common/src/28_numeric_noabirule/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994-2020 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-corelibs on 2024/03/16 21:07:38 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-corelibs script or its config file instead. +# + + +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/abinit +pkgincludedir = $(includedir)/abinit +pkglibdir = $(libdir)/abinit +pkglibexecdir = $(libexecdir)/abinit +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = x86_64-apple-darwin18.7.0 +host_triplet = x86_64-apple-darwin18.7.0 +target_triplet = x86_64-apple-darwin18.7.0 +check_PROGRAMS = test_spline_integrate$(EXEEXT) +subdir = shared/common/src/28_numeric_noabirule +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/m4/arch-gpu.m4 \ + $(top_srcdir)/config/m4/arch-mpi.m4 \ + $(top_srcdir)/config/m4/auto-autotools.m4 \ + $(top_srcdir)/config/m4/auto-corelibs.m4 \ + $(top_srcdir)/config/m4/auto-debug.m4 \ + $(top_srcdir)/config/m4/auto-dirflags.m4 \ + $(top_srcdir)/config/m4/auto-env.m4 \ + $(top_srcdir)/config/m4/auto-hints.m4 \ + $(top_srcdir)/config/m4/auto-optim.m4 \ + $(top_srcdir)/config/m4/auto-options.m4 \ + $(top_srcdir)/config/m4/auto-output.m4 \ + $(top_srcdir)/config/m4/auto-triggers.m4 \ + $(top_srcdir)/config/m4/conf-atompaw.m4 \ + $(top_srcdir)/config/m4/conf-debug.m4 \ + $(top_srcdir)/config/m4/conf-fallbacks.m4 \ + $(top_srcdir)/config/m4/conf-files.m4 \ + $(top_srcdir)/config/m4/conf-init.m4 \ + $(top_srcdir)/config/m4/conf-openmp.m4 \ + $(top_srcdir)/config/m4/conf-optim.m4 \ + $(top_srcdir)/config/m4/lang-c++.m4 \ + $(top_srcdir)/config/m4/lang-c.m4 \ + $(top_srcdir)/config/m4/lang-fortran-import.m4 \ + $(top_srcdir)/config/m4/lang-fortran.m4 \ + $(top_srcdir)/config/m4/lang-python.m4 \ + $(top_srcdir)/config/m4/libxml2.m4 \ + $(top_srcdir)/config/m4/misc-display.m4 \ + $(top_srcdir)/config/m4/sd_abinit_common.m4 \ + $(top_srcdir)/config/m4/sd_arch_gpu.m4 \ + $(top_srcdir)/config/m4/sd_arch_mpi.m4 \ + $(top_srcdir)/config/m4/sd_bigdft.m4 \ + $(top_srcdir)/config/m4/sd_core.m4 \ + $(top_srcdir)/config/m4/sd_esl.m4 \ + $(top_srcdir)/config/m4/sd_fftw3.m4 \ + $(top_srcdir)/config/m4/sd_gpu_kokkos.m4 \ + $(top_srcdir)/config/m4/sd_gpu_yakl.m4 \ + $(top_srcdir)/config/m4/sd_io_hdf5.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf_fortran.m4 \ + $(top_srcdir)/config/m4/sd_levmar.m4 \ + $(top_srcdir)/config/m4/sd_libpaw.m4 \ + $(top_srcdir)/config/m4/sd_libpsml.m4 \ + $(top_srcdir)/config/m4/sd_libxc.m4 \ + $(top_srcdir)/config/m4/sd_math_fft.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_core.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_util.m4 \ + $(top_srcdir)/config/m4/sd_papi.m4 \ + $(top_srcdir)/config/m4/sd_pfft.m4 \ + $(top_srcdir)/config/m4/sd_triqs.m4 \ + $(top_srcdir)/config/m4/sd_wannier90.m4 \ + $(top_srcdir)/config/m4/sd_xmlf90.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +AM_V_AR = $(am__v_AR_$(V)) +am__v_AR_ = $(am__v_AR_$(AM_DEFAULT_VERBOSITY)) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = +lib28_numeric_noabirule_a_AR = $(AR) $(ARFLAGS) +lib28_numeric_noabirule_a_LIBADD = +am__objects_1 = m_lib_four.$(OBJEXT) m_abi_linalg.$(OBJEXT) \ + m_array.$(OBJEXT) m_bessel.$(OBJEXT) m_cplxtools.$(OBJEXT) \ + m_bspline.$(OBJEXT) m_elpa.$(OBJEXT) \ + m_gaussian_quadrature.$(OBJEXT) m_hide_blas.$(OBJEXT) \ + m_hide_lapack.$(OBJEXT) m_lebedev.$(OBJEXT) \ + m_levenberg_marquardt.$(OBJEXT) m_linalg_interfaces.$(OBJEXT) \ + m_numeric_tools.$(OBJEXT) m_per_cond.$(OBJEXT) \ + m_random_xoroshiro128plus.$(OBJEXT) m_random_zbq.$(OBJEXT) \ + m_slk.$(OBJEXT) m_sort.$(OBJEXT) m_splines.$(OBJEXT) +am_lib28_numeric_noabirule_a_OBJECTS = $(am__objects_1) +lib28_numeric_noabirule_a_OBJECTS = \ + $(am_lib28_numeric_noabirule_a_OBJECTS) +am_test_spline_integrate_OBJECTS = \ + test_spline_integrate-test_spline_integrate.$(OBJEXT) +test_spline_integrate_OBJECTS = $(am_test_spline_integrate_OBJECTS) +test_spline_integrate_DEPENDENCIES = lib28_numeric_noabirule.a \ + ../02_clib/lib02_clib.a ../12_hide_mpi/lib12_hide_mpi.a \ + ../16_hideleave/lib16_hideleave.a \ + ../14_hidewrite/lib14_hidewrite.a \ + ../12_hide_mpi/lib12_hide_mpi.a \ + ../11_memory_mpi/lib11_memory_mpi.a ../10_defs/lib10_defs.a \ + ../02_clib/lib02_clib.a +AM_V_P = $(am__v_P_$(V)) +am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY)) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I. -I$(top_builddir) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +am__v_lt_1 = +PPFCCOMPILE = $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) +AM_V_PPFC = $(am__v_PPFC_$(V)) +am__v_PPFC_ = $(am__v_PPFC_$(AM_DEFAULT_VERBOSITY)) +am__v_PPFC_0 = @echo " PPFC " $@; +am__v_PPFC_1 = +FCLD = $(FC) +FCLINK = $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \ + $@ +AM_V_FCLD = $(am__v_FCLD_$(V)) +am__v_FCLD_ = $(am__v_FCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_FCLD_0 = @echo " FCLD " $@; +am__v_FCLD_1 = +SOURCES = $(lib28_numeric_noabirule_a_SOURCES) \ + $(test_spline_integrate_SOURCES) +DIST_SOURCES = $(lib28_numeric_noabirule_a_SOURCES) \ + $(test_spline_integrate_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ABINIT_BINARY_PACKAGE = abinit-10.0.0.83-58be4d_x86_64_darwin18.7.0_gnu9.4 +ABINIT_COMMON_CPPFLAGS = +ABINIT_COMMON_FCFLAGS = +ABINIT_COMMON_LDFLAGS = +ABINIT_COMMON_LIBS = +ABINIT_TARGET = x86_64_darwin18.7.0_gnu9.4 +ABINIT_VERSION = 10.0.0.83-58be4d +ABINIT_VERSION_BASE = 10.0 +ABINIT_VERSION_BUILD = 20240316 +ABINIT_VERSION_MAJOR = 10 +ABINIT_VERSION_MICRO = 0 +ABINIT_VERSION_MINOR = 0 +ABI_CPPFLAGS = -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include +ACLOCAL = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' aclocal-1.16 +AMTAR = $${TAR-tar} +AM_DEFAULT_VERBOSITY = 1 +AR = ar +ARFLAGS = rc +ARFLAGS_CMD = rc +ARFLAGS_DEBUG = +ARFLAGS_EXTRA = +ARFLAGS_HINTS = +ARFLAGS_OPTIM = +ATOMPAW_BIN = +AUTOCONF = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' autoconf +AUTOHEADER = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' autoheader +AUTOMAKE = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' automake-1.16 +AWK = awk +BIGDFT_CPPFLAGS = +BIGDFT_FCFLAGS = +BIGDFT_LDFLAGS = +BIGDFT_LIBS = +BOURNE_SHELL = /bin/sh +CC = /opt/local/bin/mpicc +CCDEPMODE = depmode=gcc3 +CC_LDFLAGS = +CC_LDFLAGS_DEBUG = +CC_LDFLAGS_EXTRA = +CC_LDFLAGS_GPU = +CC_LDFLAGS_HINTS = +CC_LDFLAGS_OPTIM = +CC_LIBS = +CC_LIBS_DEBUG = +CC_LIBS_EXTRA = +CC_LIBS_GPU = +CC_LIBS_HINTS = +CC_LIBS_OPTIM = +CFLAGS = -O2 -g +CFLAGS_DEBUG = +CFLAGS_EXTRA = +CFLAGS_GPU = +CFLAGS_HINTS = +CFLAGS_OPTIM = +CPP = /opt/local/bin/mpicc -E +CPPFLAGS = +CPPFLAGS_DEBUG = +CPPFLAGS_EXTRA = +CPPFLAGS_GPU = +CPPFLAGS_HINTS = +CPPFLAGS_HINTS_EXT = -P -std=c99 +CPPFLAGS_OPTIM = +CXX = /opt/local/bin/mpicxx +CXXDEPMODE = depmode=gcc3 +CXXFLAGS = -O2 -g +CXXFLAGS_DEBUG = +CXXFLAGS_EXTRA = +CXXFLAGS_GPU = +CXXFLAGS_HINTS = +CXXFLAGS_OPTIM = +CXX_LDFLAGS = +CXX_LDFLAGS_DEBUG = +CXX_LDFLAGS_EXTRA = +CXX_LDFLAGS_GPU = +CXX_LDFLAGS_HINTS = +CXX_LDFLAGS_OPTIM = +CXX_LIBS = +CXX_LIBS_DEBUG = +CXX_LIBS_EXTRA = +CXX_LIBS_GPU = +CXX_LIBS_HINTS = +CXX_LIBS_OPTIM = +CYGPATH_W = echo +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +ECHO_C = \c +ECHO_N = +ECHO_T = +EGREP = /usr/bin/grep -E +EXEEXT = +F77 = /opt/local/bin/mpif90 +FC = /opt/local/bin/mpif90 +FCFLAGS = -O2 -g -ffree-line-length-none -I/opt/local/include -I/opt/local/include -I/opt/local/include +FCFLAGS_DEBUG = +FCFLAGS_EXTRA = +FCFLAGS_F90 = +FCFLAGS_FIXEDFORM = -ffixed-form +FCFLAGS_FREEFORM = -ffree-form +FCFLAGS_HINTS = -ffree-line-length-none +FCFLAGS_MODDIR = -J../mods +FCFLAGS_OPENMP = +FCFLAGS_OPENMP_OFFLOAD = +FCFLAGS_OPTIM = +FCLIBS = -L/opt/local/lib -L/opt/local/lib/openmpi-gcc9 -L/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0 -L/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/../../.. -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi -lgfortran -lquadmath -lm +FC_LDFLAGS = +FC_LDFLAGS_DEBUG = +FC_LDFLAGS_EXTRA = +FC_LDFLAGS_HINTS = +FC_LDFLAGS_OPTIM = +FC_LIBS = +FC_LIBS_DEBUG = +FC_LIBS_EXTRA = +FC_LIBS_HINTS = +FC_LIBS_OPTIM = +FC_NOWRAP = /opt/local/bin/mpif90 +FFLAGS = -O2 -g -ffree-line-length-none -I/opt/local/include -I/opt/local/include -I/opt/local/include +FFTW3_CFLAGS = +FFTW3_CPPFLAGS = -I/opt/local/include +FFTW3_FCFLAGS = -I/opt/local/include +FFTW3_LDFLAGS = +FFTW3_LIBS = -L/opt/local/lib -lfftw3 -lfftw3f +FFT_CFLAGS = +FFT_FCFLAGS = +FPP = +FPPFLAGS = +FPPFLAGS_DEBUG = +FPPFLAGS_EXTRA = +FPPFLAGS_HINTS = +FPPFLAGS_OPTIM = +GPU_ARCH = +GPU_CFLAGS = +GPU_CPPFLAGS = +GPU_CXXFLAGS = +GPU_FCFLAGS = +GPU_LDFLAGS = +GPU_LIBS = +GRAPHATOM_BIN = +GREP = /usr/bin/grep +H5CC = +HDF5_CFLAGS = +HDF5_CPPFLAGS = +HDF5_CXXFLAGS = +HDF5_FCFLAGS = +HDF5_LDFLAGS = +HDF5_LIBS = +INSTALL = /opt/local/libexec/gnubin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +KOKKOS_CPPFLAGS = +KOKKOS_CXXFLAGS = +KOKKOS_LDFLAGS = +KOKKOS_LIBS = +LDFLAGS = +LEVMAR_CFLAGS = +LEVMAR_CPPFLAGS = +LEVMAR_LDFLAGS = +LEVMAR_LIBS = +LIBOBJS = +LIBPAW_CPPFLAGS = +LIBPAW_FCFLAGS = +LIBPAW_LDFLAGS = +LIBPAW_LIBS = +LIBPSML_CPPFLAGS = +LIBPSML_FCFLAGS = +LIBPSML_LDFLAGS = +LIBPSML_LIBS = +LIBS = -L/opt/local/lib -lwannier -L/opt/local/lib -lxc -L/opt/local/lib -lnetcdff -L/opt/local/lib -lnetcdf -L/opt/local/lib -L/opt/local/lib -lhdf5_hl -L/opt/local/lib -lhdf5 -lz -ldl -lm -L/opt/local/lib -lfftw3 -lfftw3f +LIBXC_CFLAGS = +LIBXC_CPPFLAGS = +LIBXC_FCFLAGS = +LIBXC_LDFLAGS = +LIBXC_LIBS = +LIBXML2_CPPFLAGS = +LIBXML2_FCFLAGS = +LIBXML2_LIBS = +LINALG_CFLAGS = +LINALG_CPPFLAGS = +LINALG_CXXFLAGS = +LINALG_FCFLAGS = -I/opt/local/include +LINALG_LDFLAGS = +LINALG_LIBS = -L/opt/local/lib -lopenblas +LN_S = ln -s +LTLIBOBJS = +MAKEINFO = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' makeinfo +MKDIR_P = /opt/local/libexec/gnubin/mkdir -p +MODEXT = mod +MPI_CFLAGS = +MPI_CPPFLAGS = +MPI_CXXFLAGS = +MPI_FCFLAGS = +MPI_LDFLAGS = +MPI_LIBS = +MV = /opt/local/libexec/gnubin/mv +NETCDF_CFLAGS = +NETCDF_CPPFLAGS = +NETCDF_CXXFLAGS = +NETCDF_FCFLAGS = +NETCDF_FORTRAN_CFLAGS = +NETCDF_FORTRAN_CPPFLAGS = +NETCDF_FORTRAN_CXXFLAGS = +NETCDF_FORTRAN_FCFLAGS = +NETCDF_FORTRAN_LDFLAGS = +NETCDF_FORTRAN_LIBS = +NETCDF_LDFLAGS = +NETCDF_LIBS = +NVCC = +NVCC_CFLAGS = +NVCC_CPPFLAGS = +NVCC_LDFLAGS = +NVCC_LIBS = +OBJEXT = o +PACKAGE = abinit +PACKAGE_BUGREPORT = https://bugs.launchpad.net/abinit/ +PACKAGE_NAME = ABINIT +PACKAGE_STRING = ABINIT 10.0.0.83-58be4d +PACKAGE_TARNAME = abinit +PACKAGE_URL = +PACKAGE_VERSION = 10.0.0.83-58be4d +PAPI_CFLAGS = +PAPI_CPPFLAGS = +PAPI_LDFLAGS = +PAPI_LIBS = +PATCH = patch +PATH_SEPARATOR = : +PERL = /usr/bin/perl +PFFT_CFLAGS = +PFFT_CPPFLAGS = +PFFT_LDFLAGS = +PFFT_LIBS = +PYFLAGS = +PYTHON = python3.9 +PYTHON_CONFIG = python3.9-config +PYTHON_CPPFLAGS = -I/opt/local/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -I/opt/local/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 +RANLIB = ranlib +REALPATH = realpath +RM = /opt/local/libexec/gnubin/rm +SED = /usr/bin/sed +SET_MAKE = +SHELL = /bin/sh +STRIP = +TAR = tar +TRIQS_CFLAGS = +TRIQS_CPPFLAGS = +TRIQS_CXXFLAGS = +TRIQS_LDFLAGS = +TRIQS_LIBS = +TRUE_CPP = cpp +VERSION = 10.0.0.83-58be4d +WANNIER90_CPPFLAGS = +WANNIER90_FCFLAGS = -I/opt/local/include +WANNIER90_LDFLAGS = +WANNIER90_LIBS = -L/opt/local/lib -lwannier +XML2_CONFIG = +XMLF90_CPPFLAGS = +XMLF90_FCFLAGS = +XMLF90_LDFLAGS = +XMLF90_LIBS = +XML_CPPFLAGS = +XML_LIBS = +XPP = +XPPFLAGS = +XPPFLAGS_DEBUG = +XPPFLAGS_EXTRA = +XPPFLAGS_OPTIM = +YAKL_CPPFLAGS = +YAKL_FCFLAGS = +YAKL_LDFLAGS = +YAKL_LIBS = +abi_ac_distcheck = --with-config-file="/Users/gonze/_Research/ABINIT_git/gonze/mac-1P0-225.ac9" +abi_ac_version = 027100 +abi_am_version = 011603 +abi_avx_safe_mode_enable = no +abi_bse_unpacked_enable = no +abi_cc_path = +abi_cc_vendor = gnu +abi_cc_version = 9.4 +abi_cclock_enable = no +abi_cpp_path = +abi_cpu_64bits = yes +abi_cpu_bits = 64 +abi_cpu_model = unknown +abi_cpu_platform = apple +abi_cpu_spec = unknown_unknown +abi_cpu_vendor = unknown +abi_crpa_optim_enable = no +abi_cxx_path = +abi_cxx_vendor = gnu +abi_cxx_version = 9.4 +abi_debug_flavor = basic +abi_exports_enable = no +abi_fbk_abinit_common_ok = no +abi_fbk_bigdft_ok = disabled +abi_fbk_config = +abi_fbk_enable = no +abi_fbk_fft_ok = no +abi_fbk_fftw3_ok = no +abi_fbk_gpu_ok = no +abi_fbk_hdf5_ok = disabled +abi_fbk_init = def +abi_fbk_kokkos_ok = no +abi_fbk_levmar_ok = no +abi_fbk_libpaw_ok = no +abi_fbk_libpsml_ok = disabled +abi_fbk_libxc_ok = disabled +abi_fbk_libxml2_ok = no +abi_fbk_linalg_ok = disabled +abi_fbk_list = +abi_fbk_mpi_ok = no +abi_fbk_netcdf_fortran_ok = disabled +abi_fbk_netcdf_ok = disabled +abi_fbk_papi_ok = no +abi_fbk_pfft_ok = no +abi_fbk_prefix = +abi_fbk_required = +abi_fbk_triqs_ok = no +abi_fbk_wannier90_ok = disabled +abi_fbk_xmlf90_ok = disabled +abi_fbk_yakl_ok = no +abi_fc_path = +abi_fc_vendor = gnu +abi_fc_version = 9.4 +abi_fc_wrap = no +abi_fc_wrapper_enable = no +abi_fpp_path = +abi_gpu_arch = +abi_gpu_fcflags = +abi_gpu_flavor = none +abi_gpu_hip_libdir = +abi_gpu_incs = +abi_gpu_ldflags = +abi_gpu_libs = +abi_gpu_nvtx_v3 = +abi_gpu_roctx = +abi_gw_dpc_enable = yes +abi_hints_enable = yes +abi_libtetra_enable = yes +abi_libxml2_cppflags = +abi_libxml2_enable = no +abi_libxml2_fcflags = +abi_libxml2_init = def +abi_libxml2_ldflags = +abi_libxml2_libs = +abi_libxml2_ok = unknown +abi_libxml2_prefix = +abi_lotf_enable = no +abi_lt_version = 020406 +abi_m4_version = 010419 +abi_memory_profiling_enable = no +abi_mpi_cflags = +abi_mpi_cppflags = +abi_mpi_cxxflags = +abi_mpi_enable = yes +abi_mpi_fcflags = +abi_mpi_flavor = auto +abi_mpi_gpu_aware_enable = no +abi_mpi_incs = +abi_mpi_inplace_enable = yes +abi_mpi_interfaces_bugfix_enable = no +abi_mpi_io_default_enable = no +abi_mpi_io_enable = yes +abi_mpi_ldflags = +abi_mpi_level = 2 +abi_mpi_libs = +abi_netcdf_default_enable = no +abi_openmp_enable = no +abi_openmp_offload_enable = no +abi_optim_flavor = standard +abi_python_invocation_enable = no +abi_source_debug_enable = no +abi_stdin_enable = yes +abi_sys_spec = darwin-x86_64 +abi_timer_enable = yes +abi_triqs_v1_4_enable = no +abi_triqs_v2_0_enable = no +abi_zdot_bugfix_enable = no +abinit_bindir = /usr/local/bin +abinit_builddir = /Users/gonze/_Research/ABINIT_git/gonze +abinit_chkdir = /usr/local/share/abinit/tests +abinit_datdir = /usr/local/share/abinit +abinit_docdir = /usr/local/doc/abinit +abinit_incdir = /usr/local/include +abinit_libdir = /usr/local/lib +abinit_mandir = /usr/local/share/man +abinit_prefix = /usr/local +abinit_srcdir = /Users/gonze/_Research/ABINIT_git/gonze +abs_builddir = /Users/gonze/_Research/ABINIT_git/gonze/shared/common/src/28_numeric_noabirule +abs_srcdir = /Users/gonze/_Research/ABINIT_git/gonze/shared/common/src/28_numeric_noabirule +abs_top_builddir = /Users/gonze/_Research/ABINIT_git/gonze +abs_top_srcdir = /Users/gonze/_Research/ABINIT_git/gonze +ac_ct_CC = +ac_ct_CXX = +ac_ct_FC = +am__include = include +am__leading_dot = . +am__quote = +am__tar = tar --format=ustar -chf - "$$tardir" +am__untar = tar -xf - +bindir = ${exec_prefix}/bin +build = x86_64-apple-darwin18.7.0 +build_alias = +build_cpu = x86_64 +build_os = darwin18.7.0 +build_vendor = apple +builddir = . +cc_info_string = gcc-mp-9 (MacPorts gcc9 9.4.0_0) 9.4.0 +cxx_info_string = g++-mp-9 (MacPorts gcc9 9.4.0_0) 9.4.0 +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +enable_avx_safe_mode = +enable_bse_unpacked = +enable_cclock = +enable_crpa_optim = +enable_exports = +enable_fc_wrapper = +enable_gw_dpc = yes +enable_hints = +enable_libtetra = +enable_lotf = +enable_memory_profiling = +enable_mpi_gpu_aware = +enable_mpi_inplace = +enable_mpi_interfaces_bugfix = +enable_mpi_io = yes +enable_mpi_io_default = +enable_netcdf_default = +enable_openmp = +enable_openmp_offload = +enable_python_invocation = +enable_shared = +enable_source_debug = +enable_static = +enable_stdin = +enable_timer = +enable_triqs_v1_4 = +enable_triqs_v2_0 = +enable_zdot_bugfix = +exec_prefix = ${prefix} +fc_info_string = GNU Fortran (MacPorts gcc9 9.4.0_0) 9.4.0 +fc_mod_fcflags = +fc_timing = standard +fcflags_opt_02_clib = +fcflags_opt_10_defs = +fcflags_opt_11_memory_mpi = +fcflags_opt_12_hide_mpi = +fcflags_opt_14_hidewrite = +fcflags_opt_16_hideleave = +fcflags_opt_16_kokkos_toolbox = +fcflags_opt_17_gpu_toolbox = +fcflags_opt_17_libtetra_ext = +fcflags_opt_17_minimax = +fcflags_opt_17_yaml_out = +fcflags_opt_18_timing = +fcflags_opt_21_hashfuncs = +fcflags_opt_27_toolbox_oop = +fcflags_opt_28_numeric_noabirule = +fcflags_opt_29_kpoints = +fcflags_opt_32_util = +fcflags_opt_33_xc_lowlevel = +fcflags_opt_39_libpaw = +fcflags_opt_41_geometry = +fcflags_opt_42_nlstrain = +fcflags_opt_42_parser = +fcflags_opt_43_ptgroups = -O0 +fcflags_opt_43_wvl_wrappers = +fcflags_opt_44_abitools = +fcflags_opt_44_abitypes_defs = +fcflags_opt_44_manage_kokkos = +fcflags_opt_45_geomoptim = +fcflags_opt_45_xgTools = +fcflags_opt_46_ghc_omp = +fcflags_opt_46_manage_cuda = +fcflags_opt_48_diago = +fcflags_opt_49_gw_toolbox_oop = +fcflags_opt_51_manage_mpi = +fcflags_opt_52_fft_mpi_noabirule = +fcflags_opt_53_ffts = +fcflags_opt_54_spacepar = +fcflags_opt_55_abiutil = +fcflags_opt_56_io_mpi = +fcflags_opt_56_mixing = +fcflags_opt_56_recipspace = +fcflags_opt_56_xc = +fcflags_opt_57_iopsp_parser = +fcflags_opt_57_iovars = +fcflags_opt_61_occeig = +fcflags_opt_62_cg_noabirule = +fcflags_opt_62_ctqmc = +fcflags_opt_62_iowfdenpot = +fcflags_opt_62_poisson = +fcflags_opt_62_wvl_wfs = +fcflags_opt_64_psp = +fcflags_opt_65_lotf_base = +fcflags_opt_65_paw = +fcflags_opt_66_nonlocal = +fcflags_opt_66_vdwxc = +fcflags_opt_66_wfs = +fcflags_opt_67_common = +fcflags_opt_67_python_invocation_ext = +fcflags_opt_67_triqs_ext = +fcflags_opt_68_dmft = +fcflags_opt_68_lotf = +fcflags_opt_68_recursion = +fcflags_opt_68_rsprc = +fcflags_opt_69_wfdesc = +fcflags_opt_70_gw = +fcflags_opt_71_bse = +fcflags_opt_71_wannier = +fcflags_opt_72_response = +fcflags_opt_77_ddb = +fcflags_opt_77_suscep = +fcflags_opt_78_effpot = +fcflags_opt_78_eph = +fcflags_opt_79_seqpar_mpi = +fcflags_opt_80_rttddft = +fcflags_opt_80_tdep = +fcflags_opt_94_scfcv = +fcflags_opt_95_drive = +fcflags_opt_98_main = +fcflags_opt_bigdft = +fcflags_opt_default = +fcflags_opt_hdf5 = +fcflags_opt_levmar = +fcflags_opt_libpsml = +fcflags_opt_libxc = +fcflags_opt_libxml2 = +fcflags_opt_linalg = +fcflags_opt_netcdf = +fcflags_opt_netcdf_fortran = +fcflags_opt_papi = +fcflags_opt_triqs = +fcflags_opt_wannier90 = +fcflags_opt_xmlf90 = +host = x86_64-apple-darwin18.7.0 +host_alias = +host_cpu = x86_64 +host_os = darwin18.7.0 +host_vendor = apple +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = ${SHELL} /Users/gonze/_Research/ABINIT_git/gonze/config/gnu/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = ${datarootdir}/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = $(MKDIR_P) +oldincludedir = /usr/include +pdfdir = ${docdir} +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +runstatedir = ${localstatedir}/run +sbindir = ${exec_prefix}/sbin +sd_abinit_common_cppflags = +sd_abinit_common_enable = no +sd_abinit_common_enable_def = no +sd_abinit_common_fcflags = +sd_abinit_common_init = def +sd_abinit_common_ldflags = +sd_abinit_common_libs = +sd_abinit_common_ok = unknown +sd_abinit_common_options = optional skip +sd_abinit_common_policy = skip +sd_abinit_common_status = optional +sd_bigdft_cppflags = +sd_bigdft_enable = no +sd_bigdft_enable_def = no +sd_bigdft_fcflags = +sd_bigdft_init = def +sd_bigdft_ldflags = +sd_bigdft_libs = +sd_bigdft_ok = unknown +sd_bigdft_options = optional warn +sd_bigdft_policy = warn +sd_bigdft_status = optional +sd_fft_cflags = +sd_fft_choices = +sd_fft_cppflags = -I/opt/local/include +sd_fft_cxxflags = +sd_fft_enable = yes +sd_fft_fcflags = -I/opt/local/include +sd_fft_flavor = fftw3 +sd_fft_init = kwd +sd_fft_ldflags = +sd_fft_libs = -L/opt/local/lib -lfftw3 -lfftw3f +sd_fft_ok = yes +sd_fftw3_cflags = +sd_fftw3_cppflags = -I/opt/local/include +sd_fftw3_enable = yes +sd_fftw3_enable_def = no +sd_fftw3_fcflags = -I/opt/local/include +sd_fftw3_init = env +sd_fftw3_ldflags = +sd_fftw3_libs = -L/opt/local/lib -lfftw3 -lfftw3f +sd_fftw3_ok = yes +sd_fftw3_options = optional skip +sd_fftw3_policy = skip +sd_fftw3_status = optional +sd_gpu_cflags = +sd_gpu_cppflags = +sd_gpu_cxxflags = +sd_gpu_enable = no +sd_gpu_enable_def = no +sd_gpu_fcflags = +sd_gpu_init = def +sd_gpu_ldflags = +sd_gpu_libs = +sd_gpu_ok = no +sd_gpu_options = optional warn +sd_gpu_policy = warn +sd_gpu_prefix = +sd_gpu_status = optional +sd_hdf5_cflags = +sd_hdf5_cppflags = -I/opt/local/include -I/opt/local/include +sd_hdf5_cxxflags = +sd_hdf5_enable = yes +sd_hdf5_enable_def = yes +sd_hdf5_enable_fc = no +sd_hdf5_fcflags = +sd_hdf5_h5cc = /opt/local/bin/h5cc +sd_hdf5_h5fc = +sd_hdf5_init = dir +sd_hdf5_ldflags = +sd_hdf5_libs = -L/opt/local/lib -L/opt/local/lib -lhdf5_hl -L/opt/local/lib -lhdf5 -lz -ldl -lm +sd_hdf5_ok = yes +sd_hdf5_options = required no-fortran warn +sd_hdf5_policy = warn +sd_hdf5_status = required +sd_kokkos_cppflags = +sd_kokkos_cxxflags = +sd_kokkos_enable = no +sd_kokkos_enable_def = no +sd_kokkos_init = def +sd_kokkos_ldflags = +sd_kokkos_libs = +sd_kokkos_ok = unknown +sd_kokkos_options = optional fail +sd_kokkos_policy = fail +sd_kokkos_status = optional +sd_levmar_cflags = +sd_levmar_cppflags = +sd_levmar_enable = no +sd_levmar_enable_def = no +sd_levmar_init = def +sd_levmar_ldflags = +sd_levmar_libs = +sd_levmar_ok = unknown +sd_levmar_options = optional fail +sd_levmar_policy = fail +sd_levmar_status = optional +sd_libpaw_cppflags = +sd_libpaw_enable = no +sd_libpaw_enable_def = no +sd_libpaw_fcflags = +sd_libpaw_init = def +sd_libpaw_ldflags = +sd_libpaw_libs = +sd_libpaw_ok = unknown +sd_libpaw_options = optional skip +sd_libpaw_policy = skip +sd_libpaw_status = optional +sd_libpsml_cppflags = +sd_libpsml_enable = no +sd_libpsml_enable_def = no +sd_libpsml_fcflags = +sd_libpsml_init = def +sd_libpsml_ldflags = +sd_libpsml_libs = +sd_libpsml_ok = unknown +sd_libpsml_options = optional warn +sd_libpsml_policy = warn +sd_libpsml_status = optional +sd_libxc_cflags = +sd_libxc_cppflags = -I/opt/local/include +sd_libxc_enable = yes +sd_libxc_enable_def = yes +sd_libxc_enable_fc = no +sd_libxc_fcflags = +sd_libxc_init = dir +sd_libxc_ldflags = +sd_libxc_libs = -L/opt/local/lib -lxc +sd_libxc_ok = yes +sd_libxc_options = required no-fortran warn +sd_libxc_policy = warn +sd_libxc_status = required +sd_linalg_cflags = +sd_linalg_choices = +sd_linalg_cppflags = +sd_linalg_cxxflags = +sd_linalg_enable = yes +sd_linalg_fcflags = -I/opt/local/include +sd_linalg_flavor = openblas +sd_linalg_has_elpa = no +sd_linalg_has_scalapack = no +sd_linalg_init = env +sd_linalg_ldflags = +sd_linalg_libs = -L/opt/local/lib -lopenblas +sd_linalg_ok = yes +sd_mpi_cc = /opt/local/bin/mpicc +sd_mpi_cflags = +sd_mpi_cppflags = -I/opt/local/include +sd_mpi_cxx = /opt/local/bin/mpicxx +sd_mpi_enable = yes +sd_mpi_enable_cxx = yes +sd_mpi_enable_def = auto +sd_mpi_enable_fc = yes +sd_mpi_fc = /opt/local/bin/mpif90 +sd_mpi_fcflags = -I/opt/local/include +sd_mpi_init = dir +sd_mpi_ldflags = +sd_mpi_libs = +sd_mpi_ok = yes +sd_mpi_options = auto optional fail +sd_mpi_policy = fail +sd_mpi_status = optional +sd_netcdf_cflags = +sd_netcdf_cppflags = -I/opt/local/include +sd_netcdf_enable = yes +sd_netcdf_enable_def = yes +sd_netcdf_fcflags = -I/opt/local/include +sd_netcdf_fortran_cflags = +sd_netcdf_fortran_cppflags = -I/opt/local/include +sd_netcdf_fortran_enable = yes +sd_netcdf_fortran_enable_def = yes +sd_netcdf_fortran_fcflags = -I/opt/local/include +sd_netcdf_fortran_init = dir +sd_netcdf_fortran_ldflags = +sd_netcdf_fortran_libs = -L/opt/local/lib -lnetcdff +sd_netcdf_fortran_ok = yes +sd_netcdf_fortran_options = required warn +sd_netcdf_fortran_policy = warn +sd_netcdf_fortran_status = required +sd_netcdf_init = dir +sd_netcdf_ldflags = +sd_netcdf_libs = -L/opt/local/lib -lnetcdf +sd_netcdf_ok = yes +sd_netcdf_options = required warn +sd_netcdf_policy = warn +sd_netcdf_status = required +sd_papi_cflags = +sd_papi_cppflags = +sd_papi_enable = no +sd_papi_enable_def = no +sd_papi_init = def +sd_papi_ldflags = +sd_papi_libs = +sd_papi_ok = unknown +sd_papi_options = optional fail +sd_papi_policy = fail +sd_papi_sd_papi_fcflags = +sd_papi_status = optional +sd_pfft_cflags = +sd_pfft_cppflags = +sd_pfft_enable = no +sd_pfft_enable_def = no +sd_pfft_init = def +sd_pfft_ldflags = +sd_pfft_libs = +sd_pfft_ok = unknown +sd_pfft_options = optional skip +sd_pfft_policy = skip +sd_pfft_status = optional +sd_sys_fcflags = +sd_triqs_cflags = +sd_triqs_cppflags = +sd_triqs_cxxflags = +sd_triqs_enable = no +sd_triqs_enable_def = no +sd_triqs_fcflags = +sd_triqs_init = def +sd_triqs_ldflags = +sd_triqs_libs = +sd_triqs_ok = unknown +sd_triqs_options = optional fail +sd_triqs_policy = fail +sd_triqs_status = optional +sd_wannier90_cppflags = +sd_wannier90_enable = yes +sd_wannier90_enable_def = no +sd_wannier90_fcflags = -I/opt/local/include +sd_wannier90_init = env +sd_wannier90_ldflags = +sd_wannier90_libs = -L/opt/local/lib -lwannier +sd_wannier90_ok = yes +sd_wannier90_options = optional warn +sd_wannier90_policy = warn +sd_wannier90_status = optional +sd_xmlf90_cppflags = +sd_xmlf90_enable = no +sd_xmlf90_enable_def = no +sd_xmlf90_fcflags = +sd_xmlf90_init = def +sd_xmlf90_ldflags = +sd_xmlf90_libs = +sd_xmlf90_ok = unknown +sd_xmlf90_options = optional warn +sd_xmlf90_policy = warn +sd_xmlf90_status = optional +sd_yakl_cppflags = +sd_yakl_enable = no +sd_yakl_enable_def = no +sd_yakl_fcflags = +sd_yakl_init = def +sd_yakl_ldflags = +sd_yakl_libs = +sd_yakl_ok = unknown +sd_yakl_options = optional fail +sd_yakl_policy = fail +sd_yakl_status = optional +sharedstatedir = ${prefix}/com +src_02_clib_fcflags = -I$(top_builddir)/shared/common/src/02_clib -I$(top_srcdir)/shared/common/src/02_clib +src_10_defs_fcflags = -I$(top_builddir)/shared/common/src/10_defs -I$(top_srcdir)/shared/common/src/10_defs +src_11_memory_mpi_fcflags = -I$(top_builddir)/shared/common/src/11_memory_mpi -I$(top_srcdir)/shared/common/src/11_memory_mpi +src_12_hide_mpi_fcflags = -I$(top_builddir)/shared/common/src/12_hide_mpi -I$(top_srcdir)/shared/common/src/12_hide_mpi +src_14_hidewrite_fcflags = -I$(top_builddir)/shared/common/src/14_hidewrite -I$(top_srcdir)/shared/common/src/14_hidewrite +src_16_hideleave_fcflags = -I$(top_builddir)/shared/common/src/16_hideleave -I$(top_srcdir)/shared/common/src/16_hideleave +src_16_kokkos_toolbox_fcflags = -I$(top_builddir)/shared/common/src/16_kokkos_toolbox -I$(top_srcdir)/shared/common/src/16_kokkos_toolbox +src_17_gpu_toolbox_fcflags = -I$(top_builddir)/shared/common/src/17_gpu_toolbox -I$(top_srcdir)/shared/common/src/17_gpu_toolbox +src_17_libtetra_ext_fcflags = -I$(top_builddir)/shared/common/src/17_libtetra_ext -I$(top_srcdir)/shared/common/src/17_libtetra_ext +src_17_minimax_fcflags = -I$(top_builddir)/shared/common/src/17_minimax -I$(top_srcdir)/shared/common/src/17_minimax +src_17_yaml_out_fcflags = -I$(top_builddir)/shared/common/src/17_yaml_out -I$(top_srcdir)/shared/common/src/17_yaml_out +src_18_timing_fcflags = -I$(top_builddir)/shared/common/src/18_timing -I$(top_srcdir)/shared/common/src/18_timing +src_21_hashfuncs_fcflags = -I$(top_builddir)/shared/common/src/21_hashfuncs -I$(top_srcdir)/shared/common/src/21_hashfuncs +src_27_toolbox_oop_fcflags = -I$(top_builddir)/shared/common/src/27_toolbox_oop -I$(top_srcdir)/shared/common/src/27_toolbox_oop +src_28_numeric_noabirule_fcflags = -I$(top_builddir)/shared/common/src/28_numeric_noabirule -I$(top_srcdir)/shared/common/src/28_numeric_noabirule +src_29_kpoints_fcflags = -I$(top_builddir)/shared/common/src/29_kpoints -I$(top_srcdir)/shared/common/src/29_kpoints +src_32_util_fcflags = -I$(top_builddir)/shared/common/src/32_util -I$(top_srcdir)/shared/common/src/32_util +src_33_xc_lowlevel_fcflags = -I$(top_builddir)/shared/common/src/33_xc_lowlevel -I$(top_srcdir)/shared/common/src/33_xc_lowlevel +src_39_libpaw_fcflags = -I$(top_builddir)/shared/libpaw/src -I$(top_srcdir)/shared/libpaw/src +src_41_geometry_fcflags = -I$(top_builddir)/src/41_geometry -I$(top_srcdir)/src/41_geometry +src_42_nlstrain_fcflags = -I$(top_builddir)/src/42_nlstrain -I$(top_srcdir)/src/42_nlstrain +src_42_parser_fcflags = -I$(top_builddir)/src/42_parser -I$(top_srcdir)/src/42_parser +src_43_ptgroups_fcflags = -I$(top_builddir)/src/43_ptgroups -I$(top_srcdir)/src/43_ptgroups +src_43_wvl_wrappers_fcflags = -I$(top_builddir)/src/43_wvl_wrappers -I$(top_srcdir)/src/43_wvl_wrappers +src_44_abitools_fcflags = -I$(top_builddir)/src/44_abitools -I$(top_srcdir)/src/44_abitools +src_44_abitypes_defs_fcflags = -I$(top_builddir)/src/44_abitypes_defs -I$(top_srcdir)/src/44_abitypes_defs +src_44_manage_kokkos_fcflags = -I$(top_builddir)/src/44_manage_kokkos -I$(top_srcdir)/src/44_manage_kokkos +src_45_geomoptim_fcflags = -I$(top_builddir)/src/45_geomoptim -I$(top_srcdir)/src/45_geomoptim +src_45_xgTools_fcflags = -I$(top_builddir)/src/45_xgTools -I$(top_srcdir)/src/45_xgTools +src_46_ghc_omp_fcflags = -I$(top_builddir)/src/46_ghc_omp -I$(top_srcdir)/src/46_ghc_omp +src_46_manage_cuda_fcflags = -I$(top_builddir)/src/46_manage_cuda -I$(top_srcdir)/src/46_manage_cuda +src_48_diago_fcflags = -I$(top_builddir)/src/48_diago -I$(top_srcdir)/src/48_diago +src_49_gw_toolbox_oop_fcflags = -I$(top_builddir)/src/49_gw_toolbox_oop -I$(top_srcdir)/src/49_gw_toolbox_oop +src_51_manage_mpi_fcflags = -I$(top_builddir)/src/51_manage_mpi -I$(top_srcdir)/src/51_manage_mpi +src_52_fft_mpi_noabirule_fcflags = -I$(top_builddir)/src/52_fft_mpi_noabirule -I$(top_srcdir)/src/52_fft_mpi_noabirule +src_53_ffts_fcflags = -I$(top_builddir)/src/53_ffts -I$(top_srcdir)/src/53_ffts +src_54_spacepar_fcflags = -I$(top_builddir)/src/54_spacepar -I$(top_srcdir)/src/54_spacepar +src_55_abiutil_fcflags = -I$(top_builddir)/src/55_abiutil -I$(top_srcdir)/src/55_abiutil +src_56_io_mpi_fcflags = -I$(top_builddir)/src/56_io_mpi -I$(top_srcdir)/src/56_io_mpi +src_56_mixing_fcflags = -I$(top_builddir)/src/56_mixing -I$(top_srcdir)/src/56_mixing +src_56_recipspace_fcflags = -I$(top_builddir)/src/56_recipspace -I$(top_srcdir)/src/56_recipspace +src_56_xc_fcflags = -I$(top_builddir)/src/56_xc -I$(top_srcdir)/src/56_xc +src_57_iopsp_parser_fcflags = -I$(top_builddir)/src/57_iopsp_parser -I$(top_srcdir)/src/57_iopsp_parser +src_57_iovars_fcflags = -I$(top_builddir)/src/57_iovars -I$(top_srcdir)/src/57_iovars +src_61_occeig_fcflags = -I$(top_builddir)/src/61_occeig -I$(top_srcdir)/src/61_occeig +src_62_cg_noabirule_fcflags = -I$(top_builddir)/src/62_cg_noabirule -I$(top_srcdir)/src/62_cg_noabirule +src_62_ctqmc_fcflags = -I$(top_builddir)/src/62_ctqmc -I$(top_srcdir)/src/62_ctqmc +src_62_iowfdenpot_fcflags = -I$(top_builddir)/src/62_iowfdenpot -I$(top_srcdir)/src/62_iowfdenpot +src_62_poisson_fcflags = -I$(top_builddir)/src/62_poisson -I$(top_srcdir)/src/62_poisson +src_62_wvl_wfs_fcflags = -I$(top_builddir)/src/62_wvl_wfs -I$(top_srcdir)/src/62_wvl_wfs +src_64_psp_fcflags = -I$(top_builddir)/src/64_psp -I$(top_srcdir)/src/64_psp +src_65_lotf_base_fcflags = -I$(top_builddir)/src/65_lotf_base -I$(top_srcdir)/src/65_lotf_base +src_65_paw_fcflags = -I$(top_builddir)/src/65_paw -I$(top_srcdir)/src/65_paw +src_66_nonlocal_fcflags = -I$(top_builddir)/src/66_nonlocal -I$(top_srcdir)/src/66_nonlocal +src_66_vdwxc_fcflags = -I$(top_builddir)/src/66_vdwxc -I$(top_srcdir)/src/66_vdwxc +src_66_wfs_fcflags = -I$(top_builddir)/src/66_wfs -I$(top_srcdir)/src/66_wfs +src_67_common_fcflags = -I$(top_builddir)/src/67_common -I$(top_srcdir)/src/67_common +src_67_python_invocation_ext_fcflags = -I$(top_builddir)/src/67_python_invocation_ext -I$(top_srcdir)/src/67_python_invocation_ext +src_67_triqs_ext_fcflags = -I$(top_builddir)/src/67_triqs_ext -I$(top_srcdir)/src/67_triqs_ext +src_68_dmft_fcflags = -I$(top_builddir)/src/68_dmft -I$(top_srcdir)/src/68_dmft +src_68_lotf_fcflags = -I$(top_builddir)/src/68_lotf -I$(top_srcdir)/src/68_lotf +src_68_recursion_fcflags = -I$(top_builddir)/src/68_recursion -I$(top_srcdir)/src/68_recursion +src_68_rsprc_fcflags = -I$(top_builddir)/src/68_rsprc -I$(top_srcdir)/src/68_rsprc +src_69_wfdesc_fcflags = -I$(top_builddir)/src/69_wfdesc -I$(top_srcdir)/src/69_wfdesc +src_70_gw_fcflags = -I$(top_builddir)/src/70_gw -I$(top_srcdir)/src/70_gw +src_71_bse_fcflags = -I$(top_builddir)/src/71_bse -I$(top_srcdir)/src/71_bse +src_71_wannier_fcflags = -I$(top_builddir)/src/71_wannier -I$(top_srcdir)/src/71_wannier +src_72_response_fcflags = -I$(top_builddir)/src/72_response -I$(top_srcdir)/src/72_response +src_77_ddb_fcflags = -I$(top_builddir)/src/77_ddb -I$(top_srcdir)/src/77_ddb +src_77_suscep_fcflags = -I$(top_builddir)/src/77_suscep -I$(top_srcdir)/src/77_suscep +src_78_effpot_fcflags = -I$(top_builddir)/src/78_effpot -I$(top_srcdir)/src/78_effpot +src_78_eph_fcflags = -I$(top_builddir)/src/78_eph -I$(top_srcdir)/src/78_eph +src_79_seqpar_mpi_fcflags = -I$(top_builddir)/src/79_seqpar_mpi -I$(top_srcdir)/src/79_seqpar_mpi +src_80_rttddft_fcflags = -I$(top_builddir)/src/80_rttddft -I$(top_srcdir)/src/80_rttddft +src_80_tdep_fcflags = -I$(top_builddir)/src/80_tdep -I$(top_srcdir)/src/80_tdep +src_94_scfcv_fcflags = -I$(top_builddir)/src/94_scfcv -I$(top_srcdir)/src/94_scfcv +src_95_drive_fcflags = -I$(top_builddir)/src/95_drive -I$(top_srcdir)/src/95_drive +src_common_fcflags = -I$(top_builddir)/shared/common/src/incs -I$(top_srcdir)/shared/common/src/incs -I$(top_builddir)/shared/common/src/mods -I$(top_srcdir)/shared/common/src/mods +src_core_fcflags = -I$(top_builddir)/src/incs -I$(top_srcdir)/src/incs -I$(top_builddir)/src/mods -I$(top_srcdir)/src/mods +src_libpaw_fcflags = -I$(top_builddir)/shared/libpaw/incs -I$(top_srcdir)/shared/libpaw/incs -I$(top_builddir)/shared/libpaw/mods -I$(top_srcdir)/shared/libpaw/mods +srcdir = . +sysconfdir = ${prefix}/etc +target = x86_64-apple-darwin18.7.0 +target_alias = +target_cpu = x86_64 +target_os = darwin18.7.0 +target_vendor = apple +top_build_prefix = ../../../../ +top_builddir = ../../../.. +top_srcdir = ../../../.. +with_abinit_common = +with_bigdft = +with_config_file = +with_debug_flavor = +with_fallbacks = +with_fc_vendor = +with_fc_version = +with_fft_flavor = fftw3 +with_fftw3 = +with_gnu_ld = +with_gpu = +with_hdf5 = /opt/local +with_kokkos = +with_levmar = +with_libpaw = +with_libpsml = +with_libxc = /opt/local +with_libxml2 = +with_linalg_flavor = openblas +with_mpi = /opt/local +with_mpi_level = +with_netcdf = /opt/local +with_optim_flavor = +with_papi = +with_pfft = +with_triqs = +with_wannier90 = +with_xmlf90 = +with_yakl = +AM_CFLAGS = -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include +AM_CXXFLAGS = $(sd_triqs_cxxflags) +AM_FCFLAGS = -ffree-form -J../mods +AM_CPPFLAGS = \ + -I$(top_builddir)/shared/common/src/10_defs -I$(top_srcdir)/shared/common/src/10_defs \ + -I$(top_builddir)/shared/common/src/11_memory_mpi -I$(top_srcdir)/shared/common/src/11_memory_mpi \ + -I$(top_builddir)/shared/common/src/12_hide_mpi -I$(top_srcdir)/shared/common/src/12_hide_mpi \ + -I$(top_builddir)/shared/common/src/14_hidewrite -I$(top_srcdir)/shared/common/src/14_hidewrite \ + -I$(top_builddir)/shared/common/src/16_hideleave -I$(top_srcdir)/shared/common/src/16_hideleave \ + -I$(top_builddir)/shared/common/src/17_gpu_toolbox -I$(top_srcdir)/shared/common/src/17_gpu_toolbox \ + -I$(top_builddir)/shared/common/src/18_timing -I$(top_srcdir)/shared/common/src/18_timing \ + -I$(top_builddir)/shared/common/src/27_toolbox_oop -I$(top_srcdir)/shared/common/src/27_toolbox_oop \ + -I$(top_builddir)/shared/common/src/28_numeric_noabirule -I$(top_srcdir)/shared/common/src/28_numeric_noabirule \ + -I$(top_builddir)/shared/common/src/incs -I$(top_srcdir)/shared/common/src/incs -I$(top_builddir)/shared/common/src/mods -I$(top_srcdir)/shared/common/src/mods \ + -I$(top_builddir)/src/incs -I$(top_srcdir)/src/incs -I$(top_builddir)/src/mods -I$(top_srcdir)/src/mods \ + -I$(top_builddir)/shared/libpaw/incs -I$(top_srcdir)/shared/libpaw/incs -I$(top_builddir)/shared/libpaw/mods -I$(top_srcdir)/shared/libpaw/mods \ + \ + -I/opt/local/include \ + -I/opt/local/include \ + -I/opt/local/include \ + -I/opt/local/include -I/opt/local/include \ + -I/opt/local/include \ + -I/opt/local/include \ + -I/opt/local/include \ + -I/opt/local/include \ + + + +# Regular source files +lib28_numeric_noabirule_srcs = \ + m_lib_four.F90 \ + m_abi_linalg.F90 \ + m_array.F90 \ + m_bessel.F90 \ + m_cplxtools.F90 \ + m_bspline.F90 \ + m_elpa.F90 \ + m_gaussian_quadrature.F90 \ + m_hide_blas.F90 \ + m_hide_lapack.F90 \ + m_lebedev.F90 \ + m_levenberg_marquardt.F90 \ + m_linalg_interfaces.F90 \ + m_numeric_tools.F90 \ + m_per_cond.F90 \ + m_random_xoroshiro128plus.F90 \ + m_random_zbq.F90 \ + m_slk.F90 \ + m_sort.F90 \ + m_splines.F90 + + +# Source files depending on conditionals + +# Library description +noinst_LIBRARIES = lib28_numeric_noabirule.a +lib28_numeric_noabirule_a_SOURCES = $(lib28_numeric_noabirule_srcs) + +# Dependencies (inside the directory) of directory 28_numeric_noabirule +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. +CLEANFILES = m_lib_four_cpp.f90 m_abi_linalg_cpp.f90 m_array_cpp.f90 \ + m_bessel_cpp.f90 m_cplxtools_cpp.f90 m_bspline_cpp.f90 \ + m_elpa_cpp.f90 m_gaussian_quadrature_cpp.f90 \ + m_hide_blas_cpp.f90 m_hide_lapack_cpp.f90 m_lebedev_cpp.f90 \ + m_levenberg_marquardt_cpp.f90 m_linalg_interfaces_cpp.f90 \ + m_numeric_tools_cpp.f90 m_per_cond_cpp.f90 \ + m_random_xoroshiro128plus_cpp.f90 m_random_zbq_cpp.f90 \ + m_slk_cpp.f90 m_sort_cpp.f90 m_splines_cpp.f90 \ + m_abi_linalg.$(MODEXT) m_array.$(MODEXT) m_bessel.$(MODEXT) \ + m_bspline.$(MODEXT) m_cplxtools.$(MODEXT) m_elpa.$(MODEXT) \ + m_gaussian_quadrature.$(MODEXT) m_hide_blas.$(MODEXT) \ + m_hide_lapack.$(MODEXT) m_lebedev.$(MODEXT) \ + m_levenberg_marquardt.$(MODEXT) m_lib_four.$(MODEXT) \ + m_linalg_interfaces.$(MODEXT) m_numeric_tools.$(MODEXT) \ + m_per_cond.$(MODEXT) m_random_xoroshiro128plus.$(MODEXT) \ + m_random_zbq.$(MODEXT) m_slk.$(MODEXT) m_sort.$(MODEXT) \ + m_splines.$(MODEXT) test_spline_integrate.log \ + test_spline_integrate.tmp +EXTRA_DIST = abinit.src abinit.dep abinit.amf replacements \ + abi_xgemm.f90 abi_xcopy.f90 abi_xtrsm.f90 abi_xheev.f90 \ + abi_xhegv.f90 abi_xhpev.f90 abi_xhpgv.f90 abi_xpotrf.f90 \ + abi_xorthonormalize.f90 abi_gpu_linalg.f90 farray_ncwrite.finc \ + genarray.py _28_numeric_noabirule_ +test_spline_integrate_SOURCES = test_spline_integrate.F90 +test_spline_integrate_CPPFLAGS = -I/opt/local/include -I$(top_srcdir)/shared/common/src/incs -I$(top_srcdir)/src/incs -I$(top_builddir)/shared/common/src/mods -I$(top_builddir)/src/mods +test_spline_integrate_LDADD = \ + lib28_numeric_noabirule.a \ + ../02_clib/lib02_clib.a \ + ../12_hide_mpi/lib12_hide_mpi.a \ + ../16_hideleave/lib16_hideleave.a \ + ../14_hidewrite/lib14_hidewrite.a \ + ../12_hide_mpi/lib12_hide_mpi.a \ + ../11_memory_mpi/lib11_memory_mpi.a \ + ../10_defs/lib10_defs.a \ + ../02_clib/lib02_clib.a \ + -L/opt/local/lib -lnetcdf \ + -L/opt/local/lib -lopenblas + +all: all-am + +.SUFFIXES: +.SUFFIXES: .F90 .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu shared/common/src/28_numeric_noabirule/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu shared/common/src/28_numeric_noabirule/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-checkPROGRAMS: + -test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS) + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) + +lib28_numeric_noabirule.a: $(lib28_numeric_noabirule_a_OBJECTS) $(lib28_numeric_noabirule_a_DEPENDENCIES) $(EXTRA_lib28_numeric_noabirule_a_DEPENDENCIES) + $(AM_V_at)-rm -f lib28_numeric_noabirule.a + $(AM_V_AR)$(lib28_numeric_noabirule_a_AR) lib28_numeric_noabirule.a $(lib28_numeric_noabirule_a_OBJECTS) $(lib28_numeric_noabirule_a_LIBADD) + $(AM_V_at)$(RANLIB) lib28_numeric_noabirule.a + +test_spline_integrate$(EXEEXT): $(test_spline_integrate_OBJECTS) $(test_spline_integrate_DEPENDENCIES) $(EXTRA_test_spline_integrate_DEPENDENCIES) + @rm -f test_spline_integrate$(EXEEXT) + $(AM_V_FCLD)$(FCLINK) $(test_spline_integrate_OBJECTS) $(test_spline_integrate_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +.F90.o: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ $< + +.F90.obj: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +test_spline_integrate-test_spline_integrate.o: test_spline_integrate.F90 + $(AM_V_PPFC)$(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_spline_integrate_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o test_spline_integrate-test_spline_integrate.o `test -f 'test_spline_integrate.F90' || echo '$(srcdir)/'`test_spline_integrate.F90 + +test_spline_integrate-test_spline_integrate.obj: test_spline_integrate.F90 + $(AM_V_PPFC)$(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_spline_integrate_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o test_spline_integrate-test_spline_integrate.obj `if test -f 'test_spline_integrate.F90'; then $(CYGPATH_W) 'test_spline_integrate.F90'; else $(CYGPATH_W) '$(srcdir)/test_spline_integrate.F90'; fi` + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-local +check: check-am +all-am: Makefile $(LIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-noinstLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am check-local clean \ + clean-checkPROGRAMS clean-generic clean-noinstLIBRARIES \ + cscopelist-am ctags ctags-am distclean distclean-compile \ + distclean-generic distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am + +.PRECIOUS: Makefile + + +m_abi_linalg.$(OBJEXT): m_slk.$(OBJEXT) + +m_array.$(OBJEXT): m_numeric_tools.$(OBJEXT) + +m_hide_lapack.$(OBJEXT): m_linalg_interfaces.$(OBJEXT) m_slk.$(OBJEXT) + +m_numeric_tools.$(OBJEXT): m_linalg_interfaces.$(OBJEXT) + +m_slk.$(OBJEXT): m_elpa.$(OBJEXT) m_numeric_tools.$(OBJEXT) + +check-local: + ./test_spline_integrate >test_spline_integrate.log 2>&1; grep '^TEST FAILED' test_spline_integrate.log && echo 'Unit test test_spline_integrate FAILED' || echo 'Unit test test_spline_integrate OK' + +m_abi_linalg.$(OBJEXT): \ + m_abi_linalg.F90 \ + abi_gpu_linalg.f90 \ + abi_xcopy.f90 \ + abi_xgemm.f90 \ + abi_xheev.f90 \ + abi_xhegv.f90 \ + abi_xhpev.f90 \ + abi_xhpgv.f90 \ + abi_xorthonormalize.f90 \ + abi_xpotrf.f90 \ + abi_xtrsm.f90 + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/GX-PAW/common/src/28_numeric_noabirule/Makefile.am b/GX-PAW/common/src/28_numeric_noabirule/Makefile.am new file mode 100644 index 00000000..c69360a3 --- /dev/null +++ b/GX-PAW/common/src/28_numeric_noabirule/Makefile.am @@ -0,0 +1,182 @@ +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-corelibs on 2024/03/16 21:07:38 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-corelibs script or its config file instead. +# + +AM_CFLAGS = @ABI_CPPFLAGS@ +AM_CXXFLAGS = $(sd_triqs_cxxflags) +AM_FCFLAGS = @FPPFLAGS@ @FCFLAGS_FREEFORM@ @FCFLAGS_MODDIR@ @sd_sys_fcflags@ @fcflags_opt_28_numeric_noabirule@ + +AM_CPPFLAGS = \ + @src_10_defs_fcflags@ \ + @src_11_memory_mpi_fcflags@ \ + @src_12_hide_mpi_fcflags@ \ + @src_14_hidewrite_fcflags@ \ + @src_16_hideleave_fcflags@ \ + @src_17_gpu_toolbox_fcflags@ \ + @src_18_timing_fcflags@ \ + @src_27_toolbox_oop_fcflags@ \ + @src_28_numeric_noabirule_fcflags@ \ + @src_common_fcflags@ \ + @src_core_fcflags@ \ + @src_libpaw_fcflags@ \ + @sd_linalg_cppflags@ \ + @sd_linalg_fcflags@ \ + @sd_mpi_cppflags@ \ + @sd_mpi_fcflags@ \ + @sd_hdf5_cppflags@ \ + @sd_netcdf_cppflags@ \ + @sd_netcdf_fcflags@ \ + @sd_netcdf_fortran_cppflags@ \ + @sd_netcdf_fortran_fcflags@ \ + @fc_mod_fcflags@ + +# Regular source files +lib28_numeric_noabirule_srcs = \ + m_lib_four.F90 \ + m_abi_linalg.F90 \ + m_array.F90 \ + m_bessel.F90 \ + m_cplxtools.F90 \ + m_bspline.F90 \ + m_elpa.F90 \ + m_gaussian_quadrature.F90 \ + m_hide_blas.F90 \ + m_hide_lapack.F90 \ + m_lebedev.F90 \ + m_levenberg_marquardt.F90 \ + m_linalg_interfaces.F90 \ + m_numeric_tools.F90 \ + m_per_cond.F90 \ + m_random_xoroshiro128plus.F90 \ + m_random_zbq.F90 \ + m_slk.F90 \ + m_sort.F90 \ + m_splines.F90 + +# Source files depending on conditionals + + +# Library description +noinst_LIBRARIES = lib28_numeric_noabirule.a + +lib28_numeric_noabirule_a_SOURCES= $(lib28_numeric_noabirule_srcs) + +CLEANFILES = \ + m_lib_four_cpp.f90 \ + m_abi_linalg_cpp.f90 \ + m_array_cpp.f90 \ + m_bessel_cpp.f90 \ + m_cplxtools_cpp.f90 \ + m_bspline_cpp.f90 \ + m_elpa_cpp.f90 \ + m_gaussian_quadrature_cpp.f90 \ + m_hide_blas_cpp.f90 \ + m_hide_lapack_cpp.f90 \ + m_lebedev_cpp.f90 \ + m_levenberg_marquardt_cpp.f90 \ + m_linalg_interfaces_cpp.f90 \ + m_numeric_tools_cpp.f90 \ + m_per_cond_cpp.f90 \ + m_random_xoroshiro128plus_cpp.f90 \ + m_random_zbq_cpp.f90 \ + m_slk_cpp.f90 \ + m_sort_cpp.f90 \ + m_splines_cpp.f90 + +EXTRA_DIST = abinit.src + +EXTRA_DIST += abinit.dep + +# Dependencies (inside the directory) of directory 28_numeric_noabirule +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. + +CLEANFILES += \ + m_abi_linalg.$(MODEXT) \ + m_array.$(MODEXT) \ + m_bessel.$(MODEXT) \ + m_bspline.$(MODEXT) \ + m_cplxtools.$(MODEXT) \ + m_elpa.$(MODEXT) \ + m_gaussian_quadrature.$(MODEXT) \ + m_hide_blas.$(MODEXT) \ + m_hide_lapack.$(MODEXT) \ + m_lebedev.$(MODEXT) \ + m_levenberg_marquardt.$(MODEXT) \ + m_lib_four.$(MODEXT) \ + m_linalg_interfaces.$(MODEXT) \ + m_numeric_tools.$(MODEXT) \ + m_per_cond.$(MODEXT) \ + m_random_xoroshiro128plus.$(MODEXT) \ + m_random_zbq.$(MODEXT) \ + m_slk.$(MODEXT) \ + m_sort.$(MODEXT) \ + m_splines.$(MODEXT) + +m_abi_linalg.$(OBJEXT): m_slk.$(OBJEXT) + +m_array.$(OBJEXT): m_numeric_tools.$(OBJEXT) + +m_hide_lapack.$(OBJEXT): m_linalg_interfaces.$(OBJEXT) m_slk.$(OBJEXT) + +m_numeric_tools.$(OBJEXT): m_linalg_interfaces.$(OBJEXT) + +m_slk.$(OBJEXT): m_elpa.$(OBJEXT) m_numeric_tools.$(OBJEXT) +check_PROGRAMS = \ + test_spline_integrate + +test_spline_integrate_SOURCES = test_spline_integrate.F90 +test_spline_integrate_CPPFLAGS = @sd_netcdf_cppflags@ @sd_linalg_cppflags@ -I$(top_srcdir)/shared/common/src/incs -I$(top_srcdir)/src/incs -I$(top_builddir)/shared/common/src/mods -I$(top_builddir)/src/mods +test_spline_integrate_LDADD = \ + lib28_numeric_noabirule.a \ + ../02_clib/lib02_clib.a \ + ../12_hide_mpi/lib12_hide_mpi.a \ + ../16_hideleave/lib16_hideleave.a \ + ../14_hidewrite/lib14_hidewrite.a \ + ../12_hide_mpi/lib12_hide_mpi.a \ + ../11_memory_mpi/lib11_memory_mpi.a \ + ../10_defs/lib10_defs.a \ + ../02_clib/lib02_clib.a \ + @sd_netcdf_libs@ \ + @sd_linalg_libs@ + +check-local: + ./test_spline_integrate >test_spline_integrate.log 2>&1; grep '^TEST FAILED' test_spline_integrate.log && echo 'Unit test test_spline_integrate FAILED' || echo 'Unit test test_spline_integrate OK' + +CLEANFILES += \ + test_spline_integrate.log \ + test_spline_integrate.tmp + +EXTRA_DIST += abinit.amf + +EXTRA_DIST += replacements \ + abi_xgemm.f90 abi_xcopy.f90 abi_xtrsm.f90 \ + abi_xheev.f90 abi_xhegv.f90 abi_xhpev.f90 \ + abi_xhpgv.f90 abi_xpotrf.f90 \ + abi_xorthonormalize.f90 abi_gpu_linalg.f90 \ + farray_ncwrite.finc \ + genarray.py + +m_abi_linalg.$(OBJEXT): \ + m_abi_linalg.F90 \ + abi_gpu_linalg.f90 \ + abi_xcopy.f90 \ + abi_xgemm.f90 \ + abi_xheev.f90 \ + abi_xhegv.f90 \ + abi_xhpev.f90 \ + abi_xhpgv.f90 \ + abi_xorthonormalize.f90 \ + abi_xpotrf.f90 \ + abi_xtrsm.f90 + +EXTRA_DIST += _28_numeric_noabirule_ diff --git a/GX-PAW/common/src/28_numeric_noabirule/Makefile.in b/GX-PAW/common/src/28_numeric_noabirule/Makefile.in new file mode 100644 index 00000000..223b4438 --- /dev/null +++ b/GX-PAW/common/src/28_numeric_noabirule/Makefile.in @@ -0,0 +1,1592 @@ +# Makefile.in generated by automake 1.16.3 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2020 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-corelibs on 2024/03/16 21:07:38 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-corelibs script or its config file instead. +# + +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +check_PROGRAMS = test_spline_integrate$(EXEEXT) +subdir = shared/common/src/28_numeric_noabirule +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/m4/arch-gpu.m4 \ + $(top_srcdir)/config/m4/arch-mpi.m4 \ + $(top_srcdir)/config/m4/auto-autotools.m4 \ + $(top_srcdir)/config/m4/auto-corelibs.m4 \ + $(top_srcdir)/config/m4/auto-debug.m4 \ + $(top_srcdir)/config/m4/auto-dirflags.m4 \ + $(top_srcdir)/config/m4/auto-env.m4 \ + $(top_srcdir)/config/m4/auto-hints.m4 \ + $(top_srcdir)/config/m4/auto-optim.m4 \ + $(top_srcdir)/config/m4/auto-options.m4 \ + $(top_srcdir)/config/m4/auto-output.m4 \ + $(top_srcdir)/config/m4/auto-triggers.m4 \ + $(top_srcdir)/config/m4/conf-atompaw.m4 \ + $(top_srcdir)/config/m4/conf-debug.m4 \ + $(top_srcdir)/config/m4/conf-fallbacks.m4 \ + $(top_srcdir)/config/m4/conf-files.m4 \ + $(top_srcdir)/config/m4/conf-init.m4 \ + $(top_srcdir)/config/m4/conf-openmp.m4 \ + $(top_srcdir)/config/m4/conf-optim.m4 \ + $(top_srcdir)/config/m4/lang-c++.m4 \ + $(top_srcdir)/config/m4/lang-c.m4 \ + $(top_srcdir)/config/m4/lang-fortran-import.m4 \ + $(top_srcdir)/config/m4/lang-fortran.m4 \ + $(top_srcdir)/config/m4/lang-python.m4 \ + $(top_srcdir)/config/m4/libxml2.m4 \ + $(top_srcdir)/config/m4/misc-display.m4 \ + $(top_srcdir)/config/m4/sd_abinit_common.m4 \ + $(top_srcdir)/config/m4/sd_arch_gpu.m4 \ + $(top_srcdir)/config/m4/sd_arch_mpi.m4 \ + $(top_srcdir)/config/m4/sd_bigdft.m4 \ + $(top_srcdir)/config/m4/sd_core.m4 \ + $(top_srcdir)/config/m4/sd_esl.m4 \ + $(top_srcdir)/config/m4/sd_fftw3.m4 \ + $(top_srcdir)/config/m4/sd_gpu_kokkos.m4 \ + $(top_srcdir)/config/m4/sd_gpu_yakl.m4 \ + $(top_srcdir)/config/m4/sd_io_hdf5.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf_fortran.m4 \ + $(top_srcdir)/config/m4/sd_levmar.m4 \ + $(top_srcdir)/config/m4/sd_libpaw.m4 \ + $(top_srcdir)/config/m4/sd_libpsml.m4 \ + $(top_srcdir)/config/m4/sd_libxc.m4 \ + $(top_srcdir)/config/m4/sd_math_fft.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_core.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_util.m4 \ + $(top_srcdir)/config/m4/sd_papi.m4 \ + $(top_srcdir)/config/m4/sd_pfft.m4 \ + $(top_srcdir)/config/m4/sd_triqs.m4 \ + $(top_srcdir)/config/m4/sd_wannier90.m4 \ + $(top_srcdir)/config/m4/sd_xmlf90.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = +lib28_numeric_noabirule_a_AR = $(AR) $(ARFLAGS) +lib28_numeric_noabirule_a_LIBADD = +am__objects_1 = m_lib_four.$(OBJEXT) m_abi_linalg.$(OBJEXT) \ + m_array.$(OBJEXT) m_bessel.$(OBJEXT) m_cplxtools.$(OBJEXT) \ + m_bspline.$(OBJEXT) m_elpa.$(OBJEXT) \ + m_gaussian_quadrature.$(OBJEXT) m_hide_blas.$(OBJEXT) \ + m_hide_lapack.$(OBJEXT) m_lebedev.$(OBJEXT) \ + m_levenberg_marquardt.$(OBJEXT) m_linalg_interfaces.$(OBJEXT) \ + m_numeric_tools.$(OBJEXT) m_per_cond.$(OBJEXT) \ + m_random_xoroshiro128plus.$(OBJEXT) m_random_zbq.$(OBJEXT) \ + m_slk.$(OBJEXT) m_sort.$(OBJEXT) m_splines.$(OBJEXT) +am_lib28_numeric_noabirule_a_OBJECTS = $(am__objects_1) +lib28_numeric_noabirule_a_OBJECTS = \ + $(am_lib28_numeric_noabirule_a_OBJECTS) +am_test_spline_integrate_OBJECTS = \ + test_spline_integrate-test_spline_integrate.$(OBJEXT) +test_spline_integrate_OBJECTS = $(am_test_spline_integrate_OBJECTS) +test_spline_integrate_DEPENDENCIES = lib28_numeric_noabirule.a \ + ../02_clib/lib02_clib.a ../12_hide_mpi/lib12_hide_mpi.a \ + ../16_hideleave/lib16_hideleave.a \ + ../14_hidewrite/lib14_hidewrite.a \ + ../12_hide_mpi/lib12_hide_mpi.a \ + ../11_memory_mpi/lib11_memory_mpi.a ../10_defs/lib10_defs.a \ + ../02_clib/lib02_clib.a +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +PPFCCOMPILE = $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) +AM_V_PPFC = $(am__v_PPFC_@AM_V@) +am__v_PPFC_ = $(am__v_PPFC_@AM_DEFAULT_V@) +am__v_PPFC_0 = @echo " PPFC " $@; +am__v_PPFC_1 = +FCLD = $(FC) +FCLINK = $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \ + $@ +AM_V_FCLD = $(am__v_FCLD_@AM_V@) +am__v_FCLD_ = $(am__v_FCLD_@AM_DEFAULT_V@) +am__v_FCLD_0 = @echo " FCLD " $@; +am__v_FCLD_1 = +SOURCES = $(lib28_numeric_noabirule_a_SOURCES) \ + $(test_spline_integrate_SOURCES) +DIST_SOURCES = $(lib28_numeric_noabirule_a_SOURCES) \ + $(test_spline_integrate_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ABINIT_BINARY_PACKAGE = @ABINIT_BINARY_PACKAGE@ +ABINIT_COMMON_CPPFLAGS = @ABINIT_COMMON_CPPFLAGS@ +ABINIT_COMMON_FCFLAGS = @ABINIT_COMMON_FCFLAGS@ +ABINIT_COMMON_LDFLAGS = @ABINIT_COMMON_LDFLAGS@ +ABINIT_COMMON_LIBS = @ABINIT_COMMON_LIBS@ +ABINIT_TARGET = @ABINIT_TARGET@ +ABINIT_VERSION = @ABINIT_VERSION@ +ABINIT_VERSION_BASE = @ABINIT_VERSION_BASE@ +ABINIT_VERSION_BUILD = @ABINIT_VERSION_BUILD@ +ABINIT_VERSION_MAJOR = @ABINIT_VERSION_MAJOR@ +ABINIT_VERSION_MICRO = @ABINIT_VERSION_MICRO@ +ABINIT_VERSION_MINOR = @ABINIT_VERSION_MINOR@ +ABI_CPPFLAGS = @ABI_CPPFLAGS@ +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +ARFLAGS = @ARFLAGS@ +ARFLAGS_CMD = @ARFLAGS_CMD@ +ARFLAGS_DEBUG = @ARFLAGS_DEBUG@ +ARFLAGS_EXTRA = @ARFLAGS_EXTRA@ +ARFLAGS_HINTS = @ARFLAGS_HINTS@ +ARFLAGS_OPTIM = @ARFLAGS_OPTIM@ +ATOMPAW_BIN = @ATOMPAW_BIN@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BIGDFT_CPPFLAGS = @BIGDFT_CPPFLAGS@ +BIGDFT_FCFLAGS = @BIGDFT_FCFLAGS@ +BIGDFT_LDFLAGS = @BIGDFT_LDFLAGS@ +BIGDFT_LIBS = @BIGDFT_LIBS@ +BOURNE_SHELL = @BOURNE_SHELL@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CC_LDFLAGS = @CC_LDFLAGS@ +CC_LDFLAGS_DEBUG = @CC_LDFLAGS_DEBUG@ +CC_LDFLAGS_EXTRA = @CC_LDFLAGS_EXTRA@ +CC_LDFLAGS_GPU = @CC_LDFLAGS_GPU@ +CC_LDFLAGS_HINTS = @CC_LDFLAGS_HINTS@ +CC_LDFLAGS_OPTIM = @CC_LDFLAGS_OPTIM@ +CC_LIBS = @CC_LIBS@ +CC_LIBS_DEBUG = @CC_LIBS_DEBUG@ +CC_LIBS_EXTRA = @CC_LIBS_EXTRA@ +CC_LIBS_GPU = @CC_LIBS_GPU@ +CC_LIBS_HINTS = @CC_LIBS_HINTS@ +CC_LIBS_OPTIM = @CC_LIBS_OPTIM@ +CFLAGS = @CFLAGS@ +CFLAGS_DEBUG = @CFLAGS_DEBUG@ +CFLAGS_EXTRA = @CFLAGS_EXTRA@ +CFLAGS_GPU = @CFLAGS_GPU@ +CFLAGS_HINTS = @CFLAGS_HINTS@ +CFLAGS_OPTIM = @CFLAGS_OPTIM@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CPPFLAGS_DEBUG = @CPPFLAGS_DEBUG@ +CPPFLAGS_EXTRA = @CPPFLAGS_EXTRA@ +CPPFLAGS_GPU = @CPPFLAGS_GPU@ +CPPFLAGS_HINTS = @CPPFLAGS_HINTS@ +CPPFLAGS_HINTS_EXT = @CPPFLAGS_HINTS_EXT@ +CPPFLAGS_OPTIM = @CPPFLAGS_OPTIM@ +CXX = @CXX@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CXXFLAGS_DEBUG = @CXXFLAGS_DEBUG@ +CXXFLAGS_EXTRA = @CXXFLAGS_EXTRA@ +CXXFLAGS_GPU = @CXXFLAGS_GPU@ +CXXFLAGS_HINTS = @CXXFLAGS_HINTS@ +CXXFLAGS_OPTIM = @CXXFLAGS_OPTIM@ +CXX_LDFLAGS = @CXX_LDFLAGS@ +CXX_LDFLAGS_DEBUG = @CXX_LDFLAGS_DEBUG@ +CXX_LDFLAGS_EXTRA = @CXX_LDFLAGS_EXTRA@ +CXX_LDFLAGS_GPU = @CXX_LDFLAGS_GPU@ +CXX_LDFLAGS_HINTS = @CXX_LDFLAGS_HINTS@ +CXX_LDFLAGS_OPTIM = @CXX_LDFLAGS_OPTIM@ +CXX_LIBS = @CXX_LIBS@ +CXX_LIBS_DEBUG = @CXX_LIBS_DEBUG@ +CXX_LIBS_EXTRA = @CXX_LIBS_EXTRA@ +CXX_LIBS_GPU = @CXX_LIBS_GPU@ +CXX_LIBS_HINTS = @CXX_LIBS_HINTS@ +CXX_LIBS_OPTIM = @CXX_LIBS_OPTIM@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ +FCFLAGS = @FCFLAGS@ +FCFLAGS_DEBUG = @FCFLAGS_DEBUG@ +FCFLAGS_EXTRA = @FCFLAGS_EXTRA@ +FCFLAGS_F90 = @FCFLAGS_F90@ +FCFLAGS_FIXEDFORM = @FCFLAGS_FIXEDFORM@ +FCFLAGS_FREEFORM = @FCFLAGS_FREEFORM@ +FCFLAGS_HINTS = @FCFLAGS_HINTS@ +FCFLAGS_MODDIR = @FCFLAGS_MODDIR@ +FCFLAGS_OPENMP = @FCFLAGS_OPENMP@ +FCFLAGS_OPENMP_OFFLOAD = @FCFLAGS_OPENMP_OFFLOAD@ +FCFLAGS_OPTIM = @FCFLAGS_OPTIM@ +FCLIBS = @FCLIBS@ +FC_LDFLAGS = @FC_LDFLAGS@ +FC_LDFLAGS_DEBUG = @FC_LDFLAGS_DEBUG@ +FC_LDFLAGS_EXTRA = @FC_LDFLAGS_EXTRA@ +FC_LDFLAGS_HINTS = @FC_LDFLAGS_HINTS@ +FC_LDFLAGS_OPTIM = @FC_LDFLAGS_OPTIM@ +FC_LIBS = @FC_LIBS@ +FC_LIBS_DEBUG = @FC_LIBS_DEBUG@ +FC_LIBS_EXTRA = @FC_LIBS_EXTRA@ +FC_LIBS_HINTS = @FC_LIBS_HINTS@ +FC_LIBS_OPTIM = @FC_LIBS_OPTIM@ +FC_NOWRAP = @FC_NOWRAP@ +FFLAGS = @FFLAGS@ +FFTW3_CFLAGS = @FFTW3_CFLAGS@ +FFTW3_CPPFLAGS = @FFTW3_CPPFLAGS@ +FFTW3_FCFLAGS = @FFTW3_FCFLAGS@ +FFTW3_LDFLAGS = @FFTW3_LDFLAGS@ +FFTW3_LIBS = @FFTW3_LIBS@ +FFT_CFLAGS = @FFT_CFLAGS@ +FFT_FCFLAGS = @FFT_FCFLAGS@ +FPP = @FPP@ +FPPFLAGS = @FPPFLAGS@ +FPPFLAGS_DEBUG = @FPPFLAGS_DEBUG@ +FPPFLAGS_EXTRA = @FPPFLAGS_EXTRA@ +FPPFLAGS_HINTS = @FPPFLAGS_HINTS@ +FPPFLAGS_OPTIM = @FPPFLAGS_OPTIM@ +GPU_ARCH = @GPU_ARCH@ +GPU_CFLAGS = @GPU_CFLAGS@ +GPU_CPPFLAGS = @GPU_CPPFLAGS@ +GPU_CXXFLAGS = @GPU_CXXFLAGS@ +GPU_FCFLAGS = @GPU_FCFLAGS@ +GPU_LDFLAGS = @GPU_LDFLAGS@ +GPU_LIBS = @GPU_LIBS@ +GRAPHATOM_BIN = @GRAPHATOM_BIN@ +GREP = @GREP@ +H5CC = @H5CC@ +HDF5_CFLAGS = @HDF5_CFLAGS@ +HDF5_CPPFLAGS = @HDF5_CPPFLAGS@ +HDF5_CXXFLAGS = @HDF5_CXXFLAGS@ +HDF5_FCFLAGS = @HDF5_FCFLAGS@ +HDF5_LDFLAGS = @HDF5_LDFLAGS@ +HDF5_LIBS = @HDF5_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +LDFLAGS = @LDFLAGS@ +LEVMAR_CFLAGS = @LEVMAR_CFLAGS@ +LEVMAR_CPPFLAGS = @LEVMAR_CPPFLAGS@ +LEVMAR_LDFLAGS = @LEVMAR_LDFLAGS@ +LEVMAR_LIBS = @LEVMAR_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPAW_CPPFLAGS = @LIBPAW_CPPFLAGS@ +LIBPAW_FCFLAGS = @LIBPAW_FCFLAGS@ +LIBPAW_LDFLAGS = @LIBPAW_LDFLAGS@ +LIBPAW_LIBS = @LIBPAW_LIBS@ +LIBPSML_CPPFLAGS = @LIBPSML_CPPFLAGS@ +LIBPSML_FCFLAGS = @LIBPSML_FCFLAGS@ +LIBPSML_LDFLAGS = @LIBPSML_LDFLAGS@ +LIBPSML_LIBS = @LIBPSML_LIBS@ +LIBS = @LIBS@ +LIBXC_CFLAGS = @LIBXC_CFLAGS@ +LIBXC_CPPFLAGS = @LIBXC_CPPFLAGS@ +LIBXC_FCFLAGS = @LIBXC_FCFLAGS@ +LIBXC_LDFLAGS = @LIBXC_LDFLAGS@ +LIBXC_LIBS = @LIBXC_LIBS@ +LIBXML2_CPPFLAGS = @LIBXML2_CPPFLAGS@ +LIBXML2_FCFLAGS = @LIBXML2_FCFLAGS@ +LIBXML2_LIBS = @LIBXML2_LIBS@ +LINALG_CFLAGS = @LINALG_CFLAGS@ +LINALG_CPPFLAGS = @LINALG_CPPFLAGS@ +LINALG_CXXFLAGS = @LINALG_CXXFLAGS@ +LINALG_FCFLAGS = @LINALG_FCFLAGS@ +LINALG_LDFLAGS = @LINALG_LDFLAGS@ +LINALG_LIBS = @LINALG_LIBS@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODEXT = @MODEXT@ +MPI_CFLAGS = @MPI_CFLAGS@ +MPI_CPPFLAGS = @MPI_CPPFLAGS@ +MPI_CXXFLAGS = @MPI_CXXFLAGS@ +MPI_FCFLAGS = @MPI_FCFLAGS@ +MPI_LDFLAGS = @MPI_LDFLAGS@ +MPI_LIBS = @MPI_LIBS@ +MV = @MV@ +NETCDF_CFLAGS = @NETCDF_CFLAGS@ +NETCDF_CPPFLAGS = @NETCDF_CPPFLAGS@ +NETCDF_CXXFLAGS = @NETCDF_CXXFLAGS@ +NETCDF_FCFLAGS = @NETCDF_FCFLAGS@ +NETCDF_FORTRAN_CFLAGS = @NETCDF_FORTRAN_CFLAGS@ +NETCDF_FORTRAN_CPPFLAGS = @NETCDF_FORTRAN_CPPFLAGS@ +NETCDF_FORTRAN_CXXFLAGS = @NETCDF_FORTRAN_CXXFLAGS@ +NETCDF_FORTRAN_FCFLAGS = @NETCDF_FORTRAN_FCFLAGS@ +NETCDF_FORTRAN_LDFLAGS = @NETCDF_FORTRAN_LDFLAGS@ +NETCDF_FORTRAN_LIBS = @NETCDF_FORTRAN_LIBS@ +NETCDF_LDFLAGS = @NETCDF_LDFLAGS@ +NETCDF_LIBS = @NETCDF_LIBS@ +NVCC = @NVCC@ +NVCC_CFLAGS = @NVCC_CFLAGS@ +NVCC_CPPFLAGS = @NVCC_CPPFLAGS@ +NVCC_LDFLAGS = @NVCC_LDFLAGS@ +NVCC_LIBS = @NVCC_LIBS@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PAPI_CFLAGS = @PAPI_CFLAGS@ +PAPI_CPPFLAGS = @PAPI_CPPFLAGS@ +PAPI_LDFLAGS = @PAPI_LDFLAGS@ +PAPI_LIBS = @PAPI_LIBS@ +PATCH = @PATCH@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PFFT_CFLAGS = @PFFT_CFLAGS@ +PFFT_CPPFLAGS = @PFFT_CPPFLAGS@ +PFFT_LDFLAGS = @PFFT_LDFLAGS@ +PFFT_LIBS = @PFFT_LIBS@ +PYFLAGS = @PYFLAGS@ +PYTHON = @PYTHON@ +PYTHON_CONFIG = @PYTHON_CONFIG@ +PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ +RANLIB = @RANLIB@ +REALPATH = @REALPATH@ +RM = @RM@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +TAR = @TAR@ +TRIQS_CFLAGS = @TRIQS_CFLAGS@ +TRIQS_CPPFLAGS = @TRIQS_CPPFLAGS@ +TRIQS_CXXFLAGS = @TRIQS_CXXFLAGS@ +TRIQS_LDFLAGS = @TRIQS_LDFLAGS@ +TRIQS_LIBS = @TRIQS_LIBS@ +TRUE_CPP = @TRUE_CPP@ +VERSION = @VERSION@ +WANNIER90_CPPFLAGS = @WANNIER90_CPPFLAGS@ +WANNIER90_FCFLAGS = @WANNIER90_FCFLAGS@ +WANNIER90_LDFLAGS = @WANNIER90_LDFLAGS@ +WANNIER90_LIBS = @WANNIER90_LIBS@ +XML2_CONFIG = @XML2_CONFIG@ +XMLF90_CPPFLAGS = @XMLF90_CPPFLAGS@ +XMLF90_FCFLAGS = @XMLF90_FCFLAGS@ +XMLF90_LDFLAGS = @XMLF90_LDFLAGS@ +XMLF90_LIBS = @XMLF90_LIBS@ +XML_CPPFLAGS = @XML_CPPFLAGS@ +XML_LIBS = @XML_LIBS@ +XPP = @XPP@ +XPPFLAGS = @XPPFLAGS@ +XPPFLAGS_DEBUG = @XPPFLAGS_DEBUG@ +XPPFLAGS_EXTRA = @XPPFLAGS_EXTRA@ +XPPFLAGS_OPTIM = @XPPFLAGS_OPTIM@ +YAKL_CPPFLAGS = @YAKL_CPPFLAGS@ +YAKL_FCFLAGS = @YAKL_FCFLAGS@ +YAKL_LDFLAGS = @YAKL_LDFLAGS@ +YAKL_LIBS = @YAKL_LIBS@ +abi_ac_distcheck = @abi_ac_distcheck@ +abi_ac_version = @abi_ac_version@ +abi_am_version = @abi_am_version@ +abi_avx_safe_mode_enable = @abi_avx_safe_mode_enable@ +abi_bse_unpacked_enable = @abi_bse_unpacked_enable@ +abi_cc_path = @abi_cc_path@ +abi_cc_vendor = @abi_cc_vendor@ +abi_cc_version = @abi_cc_version@ +abi_cclock_enable = @abi_cclock_enable@ +abi_cpp_path = @abi_cpp_path@ +abi_cpu_64bits = @abi_cpu_64bits@ +abi_cpu_bits = @abi_cpu_bits@ +abi_cpu_model = @abi_cpu_model@ +abi_cpu_platform = @abi_cpu_platform@ +abi_cpu_spec = @abi_cpu_spec@ +abi_cpu_vendor = @abi_cpu_vendor@ +abi_crpa_optim_enable = @abi_crpa_optim_enable@ +abi_cxx_path = @abi_cxx_path@ +abi_cxx_vendor = @abi_cxx_vendor@ +abi_cxx_version = @abi_cxx_version@ +abi_debug_flavor = @abi_debug_flavor@ +abi_exports_enable = @abi_exports_enable@ +abi_fbk_abinit_common_ok = @abi_fbk_abinit_common_ok@ +abi_fbk_bigdft_ok = @abi_fbk_bigdft_ok@ +abi_fbk_config = @abi_fbk_config@ +abi_fbk_enable = @abi_fbk_enable@ +abi_fbk_fft_ok = @abi_fbk_fft_ok@ +abi_fbk_fftw3_ok = @abi_fbk_fftw3_ok@ +abi_fbk_gpu_ok = @abi_fbk_gpu_ok@ +abi_fbk_hdf5_ok = @abi_fbk_hdf5_ok@ +abi_fbk_init = @abi_fbk_init@ +abi_fbk_kokkos_ok = @abi_fbk_kokkos_ok@ +abi_fbk_levmar_ok = @abi_fbk_levmar_ok@ +abi_fbk_libpaw_ok = @abi_fbk_libpaw_ok@ +abi_fbk_libpsml_ok = @abi_fbk_libpsml_ok@ +abi_fbk_libxc_ok = @abi_fbk_libxc_ok@ +abi_fbk_libxml2_ok = @abi_fbk_libxml2_ok@ +abi_fbk_linalg_ok = @abi_fbk_linalg_ok@ +abi_fbk_list = @abi_fbk_list@ +abi_fbk_mpi_ok = @abi_fbk_mpi_ok@ +abi_fbk_netcdf_fortran_ok = @abi_fbk_netcdf_fortran_ok@ +abi_fbk_netcdf_ok = @abi_fbk_netcdf_ok@ +abi_fbk_papi_ok = @abi_fbk_papi_ok@ +abi_fbk_pfft_ok = @abi_fbk_pfft_ok@ +abi_fbk_prefix = @abi_fbk_prefix@ +abi_fbk_required = @abi_fbk_required@ +abi_fbk_triqs_ok = @abi_fbk_triqs_ok@ +abi_fbk_wannier90_ok = @abi_fbk_wannier90_ok@ +abi_fbk_xmlf90_ok = @abi_fbk_xmlf90_ok@ +abi_fbk_yakl_ok = @abi_fbk_yakl_ok@ +abi_fc_path = @abi_fc_path@ +abi_fc_vendor = @abi_fc_vendor@ +abi_fc_version = @abi_fc_version@ +abi_fc_wrap = @abi_fc_wrap@ +abi_fc_wrapper_enable = @abi_fc_wrapper_enable@ +abi_fpp_path = @abi_fpp_path@ +abi_gpu_arch = @abi_gpu_arch@ +abi_gpu_fcflags = @abi_gpu_fcflags@ +abi_gpu_flavor = @abi_gpu_flavor@ +abi_gpu_hip_libdir = @abi_gpu_hip_libdir@ +abi_gpu_incs = @abi_gpu_incs@ +abi_gpu_ldflags = @abi_gpu_ldflags@ +abi_gpu_libs = @abi_gpu_libs@ +abi_gpu_nvtx_v3 = @abi_gpu_nvtx_v3@ +abi_gpu_roctx = @abi_gpu_roctx@ +abi_gw_dpc_enable = @abi_gw_dpc_enable@ +abi_hints_enable = @abi_hints_enable@ +abi_libtetra_enable = @abi_libtetra_enable@ +abi_libxml2_cppflags = @abi_libxml2_cppflags@ +abi_libxml2_enable = @abi_libxml2_enable@ +abi_libxml2_fcflags = @abi_libxml2_fcflags@ +abi_libxml2_init = @abi_libxml2_init@ +abi_libxml2_ldflags = @abi_libxml2_ldflags@ +abi_libxml2_libs = @abi_libxml2_libs@ +abi_libxml2_ok = @abi_libxml2_ok@ +abi_libxml2_prefix = @abi_libxml2_prefix@ +abi_lotf_enable = @abi_lotf_enable@ +abi_lt_version = @abi_lt_version@ +abi_m4_version = @abi_m4_version@ +abi_memory_profiling_enable = @abi_memory_profiling_enable@ +abi_mpi_cflags = @abi_mpi_cflags@ +abi_mpi_cppflags = @abi_mpi_cppflags@ +abi_mpi_cxxflags = @abi_mpi_cxxflags@ +abi_mpi_enable = @abi_mpi_enable@ +abi_mpi_fcflags = @abi_mpi_fcflags@ +abi_mpi_flavor = @abi_mpi_flavor@ +abi_mpi_gpu_aware_enable = @abi_mpi_gpu_aware_enable@ +abi_mpi_incs = @abi_mpi_incs@ +abi_mpi_inplace_enable = @abi_mpi_inplace_enable@ +abi_mpi_interfaces_bugfix_enable = @abi_mpi_interfaces_bugfix_enable@ +abi_mpi_io_default_enable = @abi_mpi_io_default_enable@ +abi_mpi_io_enable = @abi_mpi_io_enable@ +abi_mpi_ldflags = @abi_mpi_ldflags@ +abi_mpi_level = @abi_mpi_level@ +abi_mpi_libs = @abi_mpi_libs@ +abi_netcdf_default_enable = @abi_netcdf_default_enable@ +abi_openmp_enable = @abi_openmp_enable@ +abi_openmp_offload_enable = @abi_openmp_offload_enable@ +abi_optim_flavor = @abi_optim_flavor@ +abi_python_invocation_enable = @abi_python_invocation_enable@ +abi_source_debug_enable = @abi_source_debug_enable@ +abi_stdin_enable = @abi_stdin_enable@ +abi_sys_spec = @abi_sys_spec@ +abi_timer_enable = @abi_timer_enable@ +abi_triqs_v1_4_enable = @abi_triqs_v1_4_enable@ +abi_triqs_v2_0_enable = @abi_triqs_v2_0_enable@ +abi_zdot_bugfix_enable = @abi_zdot_bugfix_enable@ +abinit_bindir = @abinit_bindir@ +abinit_builddir = @abinit_builddir@ +abinit_chkdir = @abinit_chkdir@ +abinit_datdir = @abinit_datdir@ +abinit_docdir = @abinit_docdir@ +abinit_incdir = @abinit_incdir@ +abinit_libdir = @abinit_libdir@ +abinit_mandir = @abinit_mandir@ +abinit_prefix = @abinit_prefix@ +abinit_srcdir = @abinit_srcdir@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_FC = @ac_ct_FC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cc_info_string = @cc_info_string@ +cxx_info_string = @cxx_info_string@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +enable_avx_safe_mode = @enable_avx_safe_mode@ +enable_bse_unpacked = @enable_bse_unpacked@ +enable_cclock = @enable_cclock@ +enable_crpa_optim = @enable_crpa_optim@ +enable_exports = @enable_exports@ +enable_fc_wrapper = @enable_fc_wrapper@ +enable_gw_dpc = @enable_gw_dpc@ +enable_hints = @enable_hints@ +enable_libtetra = @enable_libtetra@ +enable_lotf = @enable_lotf@ +enable_memory_profiling = @enable_memory_profiling@ +enable_mpi_gpu_aware = @enable_mpi_gpu_aware@ +enable_mpi_inplace = @enable_mpi_inplace@ +enable_mpi_interfaces_bugfix = @enable_mpi_interfaces_bugfix@ +enable_mpi_io = @enable_mpi_io@ +enable_mpi_io_default = @enable_mpi_io_default@ +enable_netcdf_default = @enable_netcdf_default@ +enable_openmp = @enable_openmp@ +enable_openmp_offload = @enable_openmp_offload@ +enable_python_invocation = @enable_python_invocation@ +enable_shared = @enable_shared@ +enable_source_debug = @enable_source_debug@ +enable_static = @enable_static@ +enable_stdin = @enable_stdin@ +enable_timer = @enable_timer@ +enable_triqs_v1_4 = @enable_triqs_v1_4@ +enable_triqs_v2_0 = @enable_triqs_v2_0@ +enable_zdot_bugfix = @enable_zdot_bugfix@ +exec_prefix = @exec_prefix@ +fc_info_string = @fc_info_string@ +fc_mod_fcflags = @fc_mod_fcflags@ +fc_timing = @fc_timing@ +fcflags_opt_02_clib = @fcflags_opt_02_clib@ +fcflags_opt_10_defs = @fcflags_opt_10_defs@ +fcflags_opt_11_memory_mpi = @fcflags_opt_11_memory_mpi@ +fcflags_opt_12_hide_mpi = @fcflags_opt_12_hide_mpi@ +fcflags_opt_14_hidewrite = @fcflags_opt_14_hidewrite@ +fcflags_opt_16_hideleave = @fcflags_opt_16_hideleave@ +fcflags_opt_16_kokkos_toolbox = @fcflags_opt_16_kokkos_toolbox@ +fcflags_opt_17_gpu_toolbox = @fcflags_opt_17_gpu_toolbox@ +fcflags_opt_17_libtetra_ext = @fcflags_opt_17_libtetra_ext@ +fcflags_opt_17_minimax = @fcflags_opt_17_minimax@ +fcflags_opt_17_yaml_out = @fcflags_opt_17_yaml_out@ +fcflags_opt_18_timing = @fcflags_opt_18_timing@ +fcflags_opt_21_hashfuncs = @fcflags_opt_21_hashfuncs@ +fcflags_opt_27_toolbox_oop = @fcflags_opt_27_toolbox_oop@ +fcflags_opt_28_numeric_noabirule = @fcflags_opt_28_numeric_noabirule@ +fcflags_opt_29_kpoints = @fcflags_opt_29_kpoints@ +fcflags_opt_32_util = @fcflags_opt_32_util@ +fcflags_opt_33_xc_lowlevel = @fcflags_opt_33_xc_lowlevel@ +fcflags_opt_39_libpaw = @fcflags_opt_39_libpaw@ +fcflags_opt_41_geometry = @fcflags_opt_41_geometry@ +fcflags_opt_42_nlstrain = @fcflags_opt_42_nlstrain@ +fcflags_opt_42_parser = @fcflags_opt_42_parser@ +fcflags_opt_43_ptgroups = @fcflags_opt_43_ptgroups@ +fcflags_opt_43_wvl_wrappers = @fcflags_opt_43_wvl_wrappers@ +fcflags_opt_44_abitools = @fcflags_opt_44_abitools@ +fcflags_opt_44_abitypes_defs = @fcflags_opt_44_abitypes_defs@ +fcflags_opt_44_manage_kokkos = @fcflags_opt_44_manage_kokkos@ +fcflags_opt_45_geomoptim = @fcflags_opt_45_geomoptim@ +fcflags_opt_45_xgTools = @fcflags_opt_45_xgTools@ +fcflags_opt_46_ghc_omp = @fcflags_opt_46_ghc_omp@ +fcflags_opt_46_manage_cuda = @fcflags_opt_46_manage_cuda@ +fcflags_opt_48_diago = @fcflags_opt_48_diago@ +fcflags_opt_49_gw_toolbox_oop = @fcflags_opt_49_gw_toolbox_oop@ +fcflags_opt_51_manage_mpi = @fcflags_opt_51_manage_mpi@ +fcflags_opt_52_fft_mpi_noabirule = @fcflags_opt_52_fft_mpi_noabirule@ +fcflags_opt_53_ffts = @fcflags_opt_53_ffts@ +fcflags_opt_54_spacepar = @fcflags_opt_54_spacepar@ +fcflags_opt_55_abiutil = @fcflags_opt_55_abiutil@ +fcflags_opt_56_io_mpi = @fcflags_opt_56_io_mpi@ +fcflags_opt_56_mixing = @fcflags_opt_56_mixing@ +fcflags_opt_56_recipspace = @fcflags_opt_56_recipspace@ +fcflags_opt_56_xc = @fcflags_opt_56_xc@ +fcflags_opt_57_iopsp_parser = @fcflags_opt_57_iopsp_parser@ +fcflags_opt_57_iovars = @fcflags_opt_57_iovars@ +fcflags_opt_61_occeig = @fcflags_opt_61_occeig@ +fcflags_opt_62_cg_noabirule = @fcflags_opt_62_cg_noabirule@ +fcflags_opt_62_ctqmc = @fcflags_opt_62_ctqmc@ +fcflags_opt_62_iowfdenpot = @fcflags_opt_62_iowfdenpot@ +fcflags_opt_62_poisson = @fcflags_opt_62_poisson@ +fcflags_opt_62_wvl_wfs = @fcflags_opt_62_wvl_wfs@ +fcflags_opt_64_psp = @fcflags_opt_64_psp@ +fcflags_opt_65_lotf_base = @fcflags_opt_65_lotf_base@ +fcflags_opt_65_paw = @fcflags_opt_65_paw@ +fcflags_opt_66_nonlocal = @fcflags_opt_66_nonlocal@ +fcflags_opt_66_vdwxc = @fcflags_opt_66_vdwxc@ +fcflags_opt_66_wfs = @fcflags_opt_66_wfs@ +fcflags_opt_67_common = @fcflags_opt_67_common@ +fcflags_opt_67_python_invocation_ext = @fcflags_opt_67_python_invocation_ext@ +fcflags_opt_67_triqs_ext = @fcflags_opt_67_triqs_ext@ +fcflags_opt_68_dmft = @fcflags_opt_68_dmft@ +fcflags_opt_68_lotf = @fcflags_opt_68_lotf@ +fcflags_opt_68_recursion = @fcflags_opt_68_recursion@ +fcflags_opt_68_rsprc = @fcflags_opt_68_rsprc@ +fcflags_opt_69_wfdesc = @fcflags_opt_69_wfdesc@ +fcflags_opt_70_gw = @fcflags_opt_70_gw@ +fcflags_opt_71_bse = @fcflags_opt_71_bse@ +fcflags_opt_71_wannier = @fcflags_opt_71_wannier@ +fcflags_opt_72_response = @fcflags_opt_72_response@ +fcflags_opt_77_ddb = @fcflags_opt_77_ddb@ +fcflags_opt_77_suscep = @fcflags_opt_77_suscep@ +fcflags_opt_78_effpot = @fcflags_opt_78_effpot@ +fcflags_opt_78_eph = @fcflags_opt_78_eph@ +fcflags_opt_79_seqpar_mpi = @fcflags_opt_79_seqpar_mpi@ +fcflags_opt_80_rttddft = @fcflags_opt_80_rttddft@ +fcflags_opt_80_tdep = @fcflags_opt_80_tdep@ +fcflags_opt_94_scfcv = @fcflags_opt_94_scfcv@ +fcflags_opt_95_drive = @fcflags_opt_95_drive@ +fcflags_opt_98_main = @fcflags_opt_98_main@ +fcflags_opt_bigdft = @fcflags_opt_bigdft@ +fcflags_opt_default = @fcflags_opt_default@ +fcflags_opt_hdf5 = @fcflags_opt_hdf5@ +fcflags_opt_levmar = @fcflags_opt_levmar@ +fcflags_opt_libpsml = @fcflags_opt_libpsml@ +fcflags_opt_libxc = @fcflags_opt_libxc@ +fcflags_opt_libxml2 = @fcflags_opt_libxml2@ +fcflags_opt_linalg = @fcflags_opt_linalg@ +fcflags_opt_netcdf = @fcflags_opt_netcdf@ +fcflags_opt_netcdf_fortran = @fcflags_opt_netcdf_fortran@ +fcflags_opt_papi = @fcflags_opt_papi@ +fcflags_opt_triqs = @fcflags_opt_triqs@ +fcflags_opt_wannier90 = @fcflags_opt_wannier90@ +fcflags_opt_xmlf90 = @fcflags_opt_xmlf90@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sd_abinit_common_cppflags = @sd_abinit_common_cppflags@ +sd_abinit_common_enable = @sd_abinit_common_enable@ +sd_abinit_common_enable_def = @sd_abinit_common_enable_def@ +sd_abinit_common_fcflags = @sd_abinit_common_fcflags@ +sd_abinit_common_init = @sd_abinit_common_init@ +sd_abinit_common_ldflags = @sd_abinit_common_ldflags@ +sd_abinit_common_libs = @sd_abinit_common_libs@ +sd_abinit_common_ok = @sd_abinit_common_ok@ +sd_abinit_common_options = @sd_abinit_common_options@ +sd_abinit_common_policy = @sd_abinit_common_policy@ +sd_abinit_common_status = @sd_abinit_common_status@ +sd_bigdft_cppflags = @sd_bigdft_cppflags@ +sd_bigdft_enable = @sd_bigdft_enable@ +sd_bigdft_enable_def = @sd_bigdft_enable_def@ +sd_bigdft_fcflags = @sd_bigdft_fcflags@ +sd_bigdft_init = @sd_bigdft_init@ +sd_bigdft_ldflags = @sd_bigdft_ldflags@ +sd_bigdft_libs = @sd_bigdft_libs@ +sd_bigdft_ok = @sd_bigdft_ok@ +sd_bigdft_options = @sd_bigdft_options@ +sd_bigdft_policy = @sd_bigdft_policy@ +sd_bigdft_status = @sd_bigdft_status@ +sd_fft_cflags = @sd_fft_cflags@ +sd_fft_choices = @sd_fft_choices@ +sd_fft_cppflags = @sd_fft_cppflags@ +sd_fft_cxxflags = @sd_fft_cxxflags@ +sd_fft_enable = @sd_fft_enable@ +sd_fft_fcflags = @sd_fft_fcflags@ +sd_fft_flavor = @sd_fft_flavor@ +sd_fft_init = @sd_fft_init@ +sd_fft_ldflags = @sd_fft_ldflags@ +sd_fft_libs = @sd_fft_libs@ +sd_fft_ok = @sd_fft_ok@ +sd_fftw3_cflags = @sd_fftw3_cflags@ +sd_fftw3_cppflags = @sd_fftw3_cppflags@ +sd_fftw3_enable = @sd_fftw3_enable@ +sd_fftw3_enable_def = @sd_fftw3_enable_def@ +sd_fftw3_fcflags = @sd_fftw3_fcflags@ +sd_fftw3_init = @sd_fftw3_init@ +sd_fftw3_ldflags = @sd_fftw3_ldflags@ +sd_fftw3_libs = @sd_fftw3_libs@ +sd_fftw3_ok = @sd_fftw3_ok@ +sd_fftw3_options = @sd_fftw3_options@ +sd_fftw3_policy = @sd_fftw3_policy@ +sd_fftw3_status = @sd_fftw3_status@ +sd_gpu_cflags = @sd_gpu_cflags@ +sd_gpu_cppflags = @sd_gpu_cppflags@ +sd_gpu_cxxflags = @sd_gpu_cxxflags@ +sd_gpu_enable = @sd_gpu_enable@ +sd_gpu_enable_def = @sd_gpu_enable_def@ +sd_gpu_fcflags = @sd_gpu_fcflags@ +sd_gpu_init = @sd_gpu_init@ +sd_gpu_ldflags = @sd_gpu_ldflags@ +sd_gpu_libs = @sd_gpu_libs@ +sd_gpu_ok = @sd_gpu_ok@ +sd_gpu_options = @sd_gpu_options@ +sd_gpu_policy = @sd_gpu_policy@ +sd_gpu_prefix = @sd_gpu_prefix@ +sd_gpu_status = @sd_gpu_status@ +sd_hdf5_cflags = @sd_hdf5_cflags@ +sd_hdf5_cppflags = @sd_hdf5_cppflags@ +sd_hdf5_cxxflags = @sd_hdf5_cxxflags@ +sd_hdf5_enable = @sd_hdf5_enable@ +sd_hdf5_enable_def = @sd_hdf5_enable_def@ +sd_hdf5_enable_fc = @sd_hdf5_enable_fc@ +sd_hdf5_fcflags = @sd_hdf5_fcflags@ +sd_hdf5_h5cc = @sd_hdf5_h5cc@ +sd_hdf5_h5fc = @sd_hdf5_h5fc@ +sd_hdf5_init = @sd_hdf5_init@ +sd_hdf5_ldflags = @sd_hdf5_ldflags@ +sd_hdf5_libs = @sd_hdf5_libs@ +sd_hdf5_ok = @sd_hdf5_ok@ +sd_hdf5_options = @sd_hdf5_options@ +sd_hdf5_policy = @sd_hdf5_policy@ +sd_hdf5_status = @sd_hdf5_status@ +sd_kokkos_cppflags = @sd_kokkos_cppflags@ +sd_kokkos_cxxflags = @sd_kokkos_cxxflags@ +sd_kokkos_enable = @sd_kokkos_enable@ +sd_kokkos_enable_def = @sd_kokkos_enable_def@ +sd_kokkos_init = @sd_kokkos_init@ +sd_kokkos_ldflags = @sd_kokkos_ldflags@ +sd_kokkos_libs = @sd_kokkos_libs@ +sd_kokkos_ok = @sd_kokkos_ok@ +sd_kokkos_options = @sd_kokkos_options@ +sd_kokkos_policy = @sd_kokkos_policy@ +sd_kokkos_status = @sd_kokkos_status@ +sd_levmar_cflags = @sd_levmar_cflags@ +sd_levmar_cppflags = @sd_levmar_cppflags@ +sd_levmar_enable = @sd_levmar_enable@ +sd_levmar_enable_def = @sd_levmar_enable_def@ +sd_levmar_init = @sd_levmar_init@ +sd_levmar_ldflags = @sd_levmar_ldflags@ +sd_levmar_libs = @sd_levmar_libs@ +sd_levmar_ok = @sd_levmar_ok@ +sd_levmar_options = @sd_levmar_options@ +sd_levmar_policy = @sd_levmar_policy@ +sd_levmar_status = @sd_levmar_status@ +sd_libpaw_cppflags = @sd_libpaw_cppflags@ +sd_libpaw_enable = @sd_libpaw_enable@ +sd_libpaw_enable_def = @sd_libpaw_enable_def@ +sd_libpaw_fcflags = @sd_libpaw_fcflags@ +sd_libpaw_init = @sd_libpaw_init@ +sd_libpaw_ldflags = @sd_libpaw_ldflags@ +sd_libpaw_libs = @sd_libpaw_libs@ +sd_libpaw_ok = @sd_libpaw_ok@ +sd_libpaw_options = @sd_libpaw_options@ +sd_libpaw_policy = @sd_libpaw_policy@ +sd_libpaw_status = @sd_libpaw_status@ +sd_libpsml_cppflags = @sd_libpsml_cppflags@ +sd_libpsml_enable = @sd_libpsml_enable@ +sd_libpsml_enable_def = @sd_libpsml_enable_def@ +sd_libpsml_fcflags = @sd_libpsml_fcflags@ +sd_libpsml_init = @sd_libpsml_init@ +sd_libpsml_ldflags = @sd_libpsml_ldflags@ +sd_libpsml_libs = @sd_libpsml_libs@ +sd_libpsml_ok = @sd_libpsml_ok@ +sd_libpsml_options = @sd_libpsml_options@ +sd_libpsml_policy = @sd_libpsml_policy@ +sd_libpsml_status = @sd_libpsml_status@ +sd_libxc_cflags = @sd_libxc_cflags@ +sd_libxc_cppflags = @sd_libxc_cppflags@ +sd_libxc_enable = @sd_libxc_enable@ +sd_libxc_enable_def = @sd_libxc_enable_def@ +sd_libxc_enable_fc = @sd_libxc_enable_fc@ +sd_libxc_fcflags = @sd_libxc_fcflags@ +sd_libxc_init = @sd_libxc_init@ +sd_libxc_ldflags = @sd_libxc_ldflags@ +sd_libxc_libs = @sd_libxc_libs@ +sd_libxc_ok = @sd_libxc_ok@ +sd_libxc_options = @sd_libxc_options@ +sd_libxc_policy = @sd_libxc_policy@ +sd_libxc_status = @sd_libxc_status@ +sd_linalg_cflags = @sd_linalg_cflags@ +sd_linalg_choices = @sd_linalg_choices@ +sd_linalg_cppflags = @sd_linalg_cppflags@ +sd_linalg_cxxflags = @sd_linalg_cxxflags@ +sd_linalg_enable = @sd_linalg_enable@ +sd_linalg_fcflags = @sd_linalg_fcflags@ +sd_linalg_flavor = @sd_linalg_flavor@ +sd_linalg_has_elpa = @sd_linalg_has_elpa@ +sd_linalg_has_scalapack = @sd_linalg_has_scalapack@ +sd_linalg_init = @sd_linalg_init@ +sd_linalg_ldflags = @sd_linalg_ldflags@ +sd_linalg_libs = @sd_linalg_libs@ +sd_linalg_ok = @sd_linalg_ok@ +sd_mpi_cc = @sd_mpi_cc@ +sd_mpi_cflags = @sd_mpi_cflags@ +sd_mpi_cppflags = @sd_mpi_cppflags@ +sd_mpi_cxx = @sd_mpi_cxx@ +sd_mpi_enable = @sd_mpi_enable@ +sd_mpi_enable_cxx = @sd_mpi_enable_cxx@ +sd_mpi_enable_def = @sd_mpi_enable_def@ +sd_mpi_enable_fc = @sd_mpi_enable_fc@ +sd_mpi_fc = @sd_mpi_fc@ +sd_mpi_fcflags = @sd_mpi_fcflags@ +sd_mpi_init = @sd_mpi_init@ +sd_mpi_ldflags = @sd_mpi_ldflags@ +sd_mpi_libs = @sd_mpi_libs@ +sd_mpi_ok = @sd_mpi_ok@ +sd_mpi_options = @sd_mpi_options@ +sd_mpi_policy = @sd_mpi_policy@ +sd_mpi_status = @sd_mpi_status@ +sd_netcdf_cflags = @sd_netcdf_cflags@ +sd_netcdf_cppflags = @sd_netcdf_cppflags@ +sd_netcdf_enable = @sd_netcdf_enable@ +sd_netcdf_enable_def = @sd_netcdf_enable_def@ +sd_netcdf_fcflags = @sd_netcdf_fcflags@ +sd_netcdf_fortran_cflags = @sd_netcdf_fortran_cflags@ +sd_netcdf_fortran_cppflags = @sd_netcdf_fortran_cppflags@ +sd_netcdf_fortran_enable = @sd_netcdf_fortran_enable@ +sd_netcdf_fortran_enable_def = @sd_netcdf_fortran_enable_def@ +sd_netcdf_fortran_fcflags = @sd_netcdf_fortran_fcflags@ +sd_netcdf_fortran_init = @sd_netcdf_fortran_init@ +sd_netcdf_fortran_ldflags = @sd_netcdf_fortran_ldflags@ +sd_netcdf_fortran_libs = @sd_netcdf_fortran_libs@ +sd_netcdf_fortran_ok = @sd_netcdf_fortran_ok@ +sd_netcdf_fortran_options = @sd_netcdf_fortran_options@ +sd_netcdf_fortran_policy = @sd_netcdf_fortran_policy@ +sd_netcdf_fortran_status = @sd_netcdf_fortran_status@ +sd_netcdf_init = @sd_netcdf_init@ +sd_netcdf_ldflags = @sd_netcdf_ldflags@ +sd_netcdf_libs = @sd_netcdf_libs@ +sd_netcdf_ok = @sd_netcdf_ok@ +sd_netcdf_options = @sd_netcdf_options@ +sd_netcdf_policy = @sd_netcdf_policy@ +sd_netcdf_status = @sd_netcdf_status@ +sd_papi_cflags = @sd_papi_cflags@ +sd_papi_cppflags = @sd_papi_cppflags@ +sd_papi_enable = @sd_papi_enable@ +sd_papi_enable_def = @sd_papi_enable_def@ +sd_papi_init = @sd_papi_init@ +sd_papi_ldflags = @sd_papi_ldflags@ +sd_papi_libs = @sd_papi_libs@ +sd_papi_ok = @sd_papi_ok@ +sd_papi_options = @sd_papi_options@ +sd_papi_policy = @sd_papi_policy@ +sd_papi_sd_papi_fcflags = @sd_papi_sd_papi_fcflags@ +sd_papi_status = @sd_papi_status@ +sd_pfft_cflags = @sd_pfft_cflags@ +sd_pfft_cppflags = @sd_pfft_cppflags@ +sd_pfft_enable = @sd_pfft_enable@ +sd_pfft_enable_def = @sd_pfft_enable_def@ +sd_pfft_init = @sd_pfft_init@ +sd_pfft_ldflags = @sd_pfft_ldflags@ +sd_pfft_libs = @sd_pfft_libs@ +sd_pfft_ok = @sd_pfft_ok@ +sd_pfft_options = @sd_pfft_options@ +sd_pfft_policy = @sd_pfft_policy@ +sd_pfft_status = @sd_pfft_status@ +sd_sys_fcflags = @sd_sys_fcflags@ +sd_triqs_cflags = @sd_triqs_cflags@ +sd_triqs_cppflags = @sd_triqs_cppflags@ +sd_triqs_cxxflags = @sd_triqs_cxxflags@ +sd_triqs_enable = @sd_triqs_enable@ +sd_triqs_enable_def = @sd_triqs_enable_def@ +sd_triqs_fcflags = @sd_triqs_fcflags@ +sd_triqs_init = @sd_triqs_init@ +sd_triqs_ldflags = @sd_triqs_ldflags@ +sd_triqs_libs = @sd_triqs_libs@ +sd_triqs_ok = @sd_triqs_ok@ +sd_triqs_options = @sd_triqs_options@ +sd_triqs_policy = @sd_triqs_policy@ +sd_triqs_status = @sd_triqs_status@ +sd_wannier90_cppflags = @sd_wannier90_cppflags@ +sd_wannier90_enable = @sd_wannier90_enable@ +sd_wannier90_enable_def = @sd_wannier90_enable_def@ +sd_wannier90_fcflags = @sd_wannier90_fcflags@ +sd_wannier90_init = @sd_wannier90_init@ +sd_wannier90_ldflags = @sd_wannier90_ldflags@ +sd_wannier90_libs = @sd_wannier90_libs@ +sd_wannier90_ok = @sd_wannier90_ok@ +sd_wannier90_options = @sd_wannier90_options@ +sd_wannier90_policy = @sd_wannier90_policy@ +sd_wannier90_status = @sd_wannier90_status@ +sd_xmlf90_cppflags = @sd_xmlf90_cppflags@ +sd_xmlf90_enable = @sd_xmlf90_enable@ +sd_xmlf90_enable_def = @sd_xmlf90_enable_def@ +sd_xmlf90_fcflags = @sd_xmlf90_fcflags@ +sd_xmlf90_init = @sd_xmlf90_init@ +sd_xmlf90_ldflags = @sd_xmlf90_ldflags@ +sd_xmlf90_libs = @sd_xmlf90_libs@ +sd_xmlf90_ok = @sd_xmlf90_ok@ +sd_xmlf90_options = @sd_xmlf90_options@ +sd_xmlf90_policy = @sd_xmlf90_policy@ +sd_xmlf90_status = @sd_xmlf90_status@ +sd_yakl_cppflags = @sd_yakl_cppflags@ +sd_yakl_enable = @sd_yakl_enable@ +sd_yakl_enable_def = @sd_yakl_enable_def@ +sd_yakl_fcflags = @sd_yakl_fcflags@ +sd_yakl_init = @sd_yakl_init@ +sd_yakl_ldflags = @sd_yakl_ldflags@ +sd_yakl_libs = @sd_yakl_libs@ +sd_yakl_ok = @sd_yakl_ok@ +sd_yakl_options = @sd_yakl_options@ +sd_yakl_policy = @sd_yakl_policy@ +sd_yakl_status = @sd_yakl_status@ +sharedstatedir = @sharedstatedir@ +src_02_clib_fcflags = @src_02_clib_fcflags@ +src_10_defs_fcflags = @src_10_defs_fcflags@ +src_11_memory_mpi_fcflags = @src_11_memory_mpi_fcflags@ +src_12_hide_mpi_fcflags = @src_12_hide_mpi_fcflags@ +src_14_hidewrite_fcflags = @src_14_hidewrite_fcflags@ +src_16_hideleave_fcflags = @src_16_hideleave_fcflags@ +src_16_kokkos_toolbox_fcflags = @src_16_kokkos_toolbox_fcflags@ +src_17_gpu_toolbox_fcflags = @src_17_gpu_toolbox_fcflags@ +src_17_libtetra_ext_fcflags = @src_17_libtetra_ext_fcflags@ +src_17_minimax_fcflags = @src_17_minimax_fcflags@ +src_17_yaml_out_fcflags = @src_17_yaml_out_fcflags@ +src_18_timing_fcflags = @src_18_timing_fcflags@ +src_21_hashfuncs_fcflags = @src_21_hashfuncs_fcflags@ +src_27_toolbox_oop_fcflags = @src_27_toolbox_oop_fcflags@ +src_28_numeric_noabirule_fcflags = @src_28_numeric_noabirule_fcflags@ +src_29_kpoints_fcflags = @src_29_kpoints_fcflags@ +src_32_util_fcflags = @src_32_util_fcflags@ +src_33_xc_lowlevel_fcflags = @src_33_xc_lowlevel_fcflags@ +src_39_libpaw_fcflags = @src_39_libpaw_fcflags@ +src_41_geometry_fcflags = @src_41_geometry_fcflags@ +src_42_nlstrain_fcflags = @src_42_nlstrain_fcflags@ +src_42_parser_fcflags = @src_42_parser_fcflags@ +src_43_ptgroups_fcflags = @src_43_ptgroups_fcflags@ +src_43_wvl_wrappers_fcflags = @src_43_wvl_wrappers_fcflags@ +src_44_abitools_fcflags = @src_44_abitools_fcflags@ +src_44_abitypes_defs_fcflags = @src_44_abitypes_defs_fcflags@ +src_44_manage_kokkos_fcflags = @src_44_manage_kokkos_fcflags@ +src_45_geomoptim_fcflags = @src_45_geomoptim_fcflags@ +src_45_xgTools_fcflags = @src_45_xgTools_fcflags@ +src_46_ghc_omp_fcflags = @src_46_ghc_omp_fcflags@ +src_46_manage_cuda_fcflags = @src_46_manage_cuda_fcflags@ +src_48_diago_fcflags = @src_48_diago_fcflags@ +src_49_gw_toolbox_oop_fcflags = @src_49_gw_toolbox_oop_fcflags@ +src_51_manage_mpi_fcflags = @src_51_manage_mpi_fcflags@ +src_52_fft_mpi_noabirule_fcflags = @src_52_fft_mpi_noabirule_fcflags@ +src_53_ffts_fcflags = @src_53_ffts_fcflags@ +src_54_spacepar_fcflags = @src_54_spacepar_fcflags@ +src_55_abiutil_fcflags = @src_55_abiutil_fcflags@ +src_56_io_mpi_fcflags = @src_56_io_mpi_fcflags@ +src_56_mixing_fcflags = @src_56_mixing_fcflags@ +src_56_recipspace_fcflags = @src_56_recipspace_fcflags@ +src_56_xc_fcflags = @src_56_xc_fcflags@ +src_57_iopsp_parser_fcflags = @src_57_iopsp_parser_fcflags@ +src_57_iovars_fcflags = @src_57_iovars_fcflags@ +src_61_occeig_fcflags = @src_61_occeig_fcflags@ +src_62_cg_noabirule_fcflags = @src_62_cg_noabirule_fcflags@ +src_62_ctqmc_fcflags = @src_62_ctqmc_fcflags@ +src_62_iowfdenpot_fcflags = @src_62_iowfdenpot_fcflags@ +src_62_poisson_fcflags = @src_62_poisson_fcflags@ +src_62_wvl_wfs_fcflags = @src_62_wvl_wfs_fcflags@ +src_64_psp_fcflags = @src_64_psp_fcflags@ +src_65_lotf_base_fcflags = @src_65_lotf_base_fcflags@ +src_65_paw_fcflags = @src_65_paw_fcflags@ +src_66_nonlocal_fcflags = @src_66_nonlocal_fcflags@ +src_66_vdwxc_fcflags = @src_66_vdwxc_fcflags@ +src_66_wfs_fcflags = @src_66_wfs_fcflags@ +src_67_common_fcflags = @src_67_common_fcflags@ +src_67_python_invocation_ext_fcflags = @src_67_python_invocation_ext_fcflags@ +src_67_triqs_ext_fcflags = @src_67_triqs_ext_fcflags@ +src_68_dmft_fcflags = @src_68_dmft_fcflags@ +src_68_lotf_fcflags = @src_68_lotf_fcflags@ +src_68_recursion_fcflags = @src_68_recursion_fcflags@ +src_68_rsprc_fcflags = @src_68_rsprc_fcflags@ +src_69_wfdesc_fcflags = @src_69_wfdesc_fcflags@ +src_70_gw_fcflags = @src_70_gw_fcflags@ +src_71_bse_fcflags = @src_71_bse_fcflags@ +src_71_wannier_fcflags = @src_71_wannier_fcflags@ +src_72_response_fcflags = @src_72_response_fcflags@ +src_77_ddb_fcflags = @src_77_ddb_fcflags@ +src_77_suscep_fcflags = @src_77_suscep_fcflags@ +src_78_effpot_fcflags = @src_78_effpot_fcflags@ +src_78_eph_fcflags = @src_78_eph_fcflags@ +src_79_seqpar_mpi_fcflags = @src_79_seqpar_mpi_fcflags@ +src_80_rttddft_fcflags = @src_80_rttddft_fcflags@ +src_80_tdep_fcflags = @src_80_tdep_fcflags@ +src_94_scfcv_fcflags = @src_94_scfcv_fcflags@ +src_95_drive_fcflags = @src_95_drive_fcflags@ +src_common_fcflags = @src_common_fcflags@ +src_core_fcflags = @src_core_fcflags@ +src_libpaw_fcflags = @src_libpaw_fcflags@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +with_abinit_common = @with_abinit_common@ +with_bigdft = @with_bigdft@ +with_config_file = @with_config_file@ +with_debug_flavor = @with_debug_flavor@ +with_fallbacks = @with_fallbacks@ +with_fc_vendor = @with_fc_vendor@ +with_fc_version = @with_fc_version@ +with_fft_flavor = @with_fft_flavor@ +with_fftw3 = @with_fftw3@ +with_gnu_ld = @with_gnu_ld@ +with_gpu = @with_gpu@ +with_hdf5 = @with_hdf5@ +with_kokkos = @with_kokkos@ +with_levmar = @with_levmar@ +with_libpaw = @with_libpaw@ +with_libpsml = @with_libpsml@ +with_libxc = @with_libxc@ +with_libxml2 = @with_libxml2@ +with_linalg_flavor = @with_linalg_flavor@ +with_mpi = @with_mpi@ +with_mpi_level = @with_mpi_level@ +with_netcdf = @with_netcdf@ +with_optim_flavor = @with_optim_flavor@ +with_papi = @with_papi@ +with_pfft = @with_pfft@ +with_triqs = @with_triqs@ +with_wannier90 = @with_wannier90@ +with_xmlf90 = @with_xmlf90@ +with_yakl = @with_yakl@ +AM_CFLAGS = @ABI_CPPFLAGS@ +AM_CXXFLAGS = $(sd_triqs_cxxflags) +AM_FCFLAGS = @FPPFLAGS@ @FCFLAGS_FREEFORM@ @FCFLAGS_MODDIR@ @sd_sys_fcflags@ @fcflags_opt_28_numeric_noabirule@ +AM_CPPFLAGS = \ + @src_10_defs_fcflags@ \ + @src_11_memory_mpi_fcflags@ \ + @src_12_hide_mpi_fcflags@ \ + @src_14_hidewrite_fcflags@ \ + @src_16_hideleave_fcflags@ \ + @src_17_gpu_toolbox_fcflags@ \ + @src_18_timing_fcflags@ \ + @src_27_toolbox_oop_fcflags@ \ + @src_28_numeric_noabirule_fcflags@ \ + @src_common_fcflags@ \ + @src_core_fcflags@ \ + @src_libpaw_fcflags@ \ + @sd_linalg_cppflags@ \ + @sd_linalg_fcflags@ \ + @sd_mpi_cppflags@ \ + @sd_mpi_fcflags@ \ + @sd_hdf5_cppflags@ \ + @sd_netcdf_cppflags@ \ + @sd_netcdf_fcflags@ \ + @sd_netcdf_fortran_cppflags@ \ + @sd_netcdf_fortran_fcflags@ \ + @fc_mod_fcflags@ + + +# Regular source files +lib28_numeric_noabirule_srcs = \ + m_lib_four.F90 \ + m_abi_linalg.F90 \ + m_array.F90 \ + m_bessel.F90 \ + m_cplxtools.F90 \ + m_bspline.F90 \ + m_elpa.F90 \ + m_gaussian_quadrature.F90 \ + m_hide_blas.F90 \ + m_hide_lapack.F90 \ + m_lebedev.F90 \ + m_levenberg_marquardt.F90 \ + m_linalg_interfaces.F90 \ + m_numeric_tools.F90 \ + m_per_cond.F90 \ + m_random_xoroshiro128plus.F90 \ + m_random_zbq.F90 \ + m_slk.F90 \ + m_sort.F90 \ + m_splines.F90 + + +# Source files depending on conditionals + +# Library description +noinst_LIBRARIES = lib28_numeric_noabirule.a +lib28_numeric_noabirule_a_SOURCES = $(lib28_numeric_noabirule_srcs) + +# Dependencies (inside the directory) of directory 28_numeric_noabirule +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. +CLEANFILES = m_lib_four_cpp.f90 m_abi_linalg_cpp.f90 m_array_cpp.f90 \ + m_bessel_cpp.f90 m_cplxtools_cpp.f90 m_bspline_cpp.f90 \ + m_elpa_cpp.f90 m_gaussian_quadrature_cpp.f90 \ + m_hide_blas_cpp.f90 m_hide_lapack_cpp.f90 m_lebedev_cpp.f90 \ + m_levenberg_marquardt_cpp.f90 m_linalg_interfaces_cpp.f90 \ + m_numeric_tools_cpp.f90 m_per_cond_cpp.f90 \ + m_random_xoroshiro128plus_cpp.f90 m_random_zbq_cpp.f90 \ + m_slk_cpp.f90 m_sort_cpp.f90 m_splines_cpp.f90 \ + m_abi_linalg.$(MODEXT) m_array.$(MODEXT) m_bessel.$(MODEXT) \ + m_bspline.$(MODEXT) m_cplxtools.$(MODEXT) m_elpa.$(MODEXT) \ + m_gaussian_quadrature.$(MODEXT) m_hide_blas.$(MODEXT) \ + m_hide_lapack.$(MODEXT) m_lebedev.$(MODEXT) \ + m_levenberg_marquardt.$(MODEXT) m_lib_four.$(MODEXT) \ + m_linalg_interfaces.$(MODEXT) m_numeric_tools.$(MODEXT) \ + m_per_cond.$(MODEXT) m_random_xoroshiro128plus.$(MODEXT) \ + m_random_zbq.$(MODEXT) m_slk.$(MODEXT) m_sort.$(MODEXT) \ + m_splines.$(MODEXT) test_spline_integrate.log \ + test_spline_integrate.tmp +EXTRA_DIST = abinit.src abinit.dep abinit.amf replacements \ + abi_xgemm.f90 abi_xcopy.f90 abi_xtrsm.f90 abi_xheev.f90 \ + abi_xhegv.f90 abi_xhpev.f90 abi_xhpgv.f90 abi_xpotrf.f90 \ + abi_xorthonormalize.f90 abi_gpu_linalg.f90 farray_ncwrite.finc \ + genarray.py _28_numeric_noabirule_ +test_spline_integrate_SOURCES = test_spline_integrate.F90 +test_spline_integrate_CPPFLAGS = @sd_netcdf_cppflags@ @sd_linalg_cppflags@ -I$(top_srcdir)/shared/common/src/incs -I$(top_srcdir)/src/incs -I$(top_builddir)/shared/common/src/mods -I$(top_builddir)/src/mods +test_spline_integrate_LDADD = \ + lib28_numeric_noabirule.a \ + ../02_clib/lib02_clib.a \ + ../12_hide_mpi/lib12_hide_mpi.a \ + ../16_hideleave/lib16_hideleave.a \ + ../14_hidewrite/lib14_hidewrite.a \ + ../12_hide_mpi/lib12_hide_mpi.a \ + ../11_memory_mpi/lib11_memory_mpi.a \ + ../10_defs/lib10_defs.a \ + ../02_clib/lib02_clib.a \ + @sd_netcdf_libs@ \ + @sd_linalg_libs@ + +all: all-am + +.SUFFIXES: +.SUFFIXES: .F90 .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu shared/common/src/28_numeric_noabirule/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu shared/common/src/28_numeric_noabirule/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-checkPROGRAMS: + -test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS) + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) + +lib28_numeric_noabirule.a: $(lib28_numeric_noabirule_a_OBJECTS) $(lib28_numeric_noabirule_a_DEPENDENCIES) $(EXTRA_lib28_numeric_noabirule_a_DEPENDENCIES) + $(AM_V_at)-rm -f lib28_numeric_noabirule.a + $(AM_V_AR)$(lib28_numeric_noabirule_a_AR) lib28_numeric_noabirule.a $(lib28_numeric_noabirule_a_OBJECTS) $(lib28_numeric_noabirule_a_LIBADD) + $(AM_V_at)$(RANLIB) lib28_numeric_noabirule.a + +test_spline_integrate$(EXEEXT): $(test_spline_integrate_OBJECTS) $(test_spline_integrate_DEPENDENCIES) $(EXTRA_test_spline_integrate_DEPENDENCIES) + @rm -f test_spline_integrate$(EXEEXT) + $(AM_V_FCLD)$(FCLINK) $(test_spline_integrate_OBJECTS) $(test_spline_integrate_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +.F90.o: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ $< + +.F90.obj: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +test_spline_integrate-test_spline_integrate.o: test_spline_integrate.F90 + $(AM_V_PPFC)$(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_spline_integrate_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o test_spline_integrate-test_spline_integrate.o `test -f 'test_spline_integrate.F90' || echo '$(srcdir)/'`test_spline_integrate.F90 + +test_spline_integrate-test_spline_integrate.obj: test_spline_integrate.F90 + $(AM_V_PPFC)$(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_spline_integrate_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o test_spline_integrate-test_spline_integrate.obj `if test -f 'test_spline_integrate.F90'; then $(CYGPATH_W) 'test_spline_integrate.F90'; else $(CYGPATH_W) '$(srcdir)/test_spline_integrate.F90'; fi` + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-local +check: check-am +all-am: Makefile $(LIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-noinstLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am check-local clean \ + clean-checkPROGRAMS clean-generic clean-noinstLIBRARIES \ + cscopelist-am ctags ctags-am distclean distclean-compile \ + distclean-generic distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am + +.PRECIOUS: Makefile + + +m_abi_linalg.$(OBJEXT): m_slk.$(OBJEXT) + +m_array.$(OBJEXT): m_numeric_tools.$(OBJEXT) + +m_hide_lapack.$(OBJEXT): m_linalg_interfaces.$(OBJEXT) m_slk.$(OBJEXT) + +m_numeric_tools.$(OBJEXT): m_linalg_interfaces.$(OBJEXT) + +m_slk.$(OBJEXT): m_elpa.$(OBJEXT) m_numeric_tools.$(OBJEXT) + +check-local: + ./test_spline_integrate >test_spline_integrate.log 2>&1; grep '^TEST FAILED' test_spline_integrate.log && echo 'Unit test test_spline_integrate FAILED' || echo 'Unit test test_spline_integrate OK' + +m_abi_linalg.$(OBJEXT): \ + m_abi_linalg.F90 \ + abi_gpu_linalg.f90 \ + abi_xcopy.f90 \ + abi_xgemm.f90 \ + abi_xheev.f90 \ + abi_xhegv.f90 \ + abi_xhpev.f90 \ + abi_xhpgv.f90 \ + abi_xorthonormalize.f90 \ + abi_xpotrf.f90 \ + abi_xtrsm.f90 + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/GX-PAW/common/src/28_numeric_noabirule/_28_numeric_noabirule_ b/GX-PAW/common/src/28_numeric_noabirule/_28_numeric_noabirule_ new file mode 100644 index 00000000..9e90ae8e --- /dev/null +++ b/GX-PAW/common/src/28_numeric_noabirule/_28_numeric_noabirule_ @@ -0,0 +1,39 @@ +!!****d* ABINIT/28_numeric_noabirule +!! NAME +!! 28_numeric_noabirule +!! +!! DESCRIPTION +!! FIXME: Description is missing +!! +!! COPYRIGHT +!! Copyright (C) 1998-2024 ABINIT group +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! For the initials of contributors, see ~abinit/doc/developers/contributors.txt . +!! +!! CHILDREN +!! farray_ncwrite.finc +!! interfaces_28_numeric_noabirule.F90 +!! m_abi_linalg.F90 +!! m_array.F90 +!! m_bessel.F90 +!! m_bspline.F90 +!! m_cplxtools.F90 +!! m_elpa.F90 +!! m_gaussian_quadrature.F90 +!! m_hide_blas.F90 +!! m_hide_lapack.F90 +!! m_lebedev.F90 +!! m_levenberg_marquardt.F90 +!! m_lib_four.F90 +!! m_linalg_interfaces.F90 +!! m_numeric_tools.F90 +!! m_per_cond.F90 +!! m_random_zbq.F90 +!! m_slk.F90 +!! m_sort.F90 +!! m_splines.F90 +!! test_spline_integrate.F90 +!! +!!*** diff --git a/GX-PAW/common/src/28_numeric_noabirule/__pycache__/abinit.cpython-36.pyc b/GX-PAW/common/src/28_numeric_noabirule/__pycache__/abinit.cpython-36.pyc new file mode 100644 index 00000000..62165268 Binary files /dev/null and b/GX-PAW/common/src/28_numeric_noabirule/__pycache__/abinit.cpython-36.pyc differ diff --git a/GX-PAW/common/src/28_numeric_noabirule/abi_gpu_linalg.f90 b/GX-PAW/common/src/28_numeric_noabirule/abi_gpu_linalg.f90 new file mode 100644 index 00000000..dd583ebd --- /dev/null +++ b/GX-PAW/common/src/28_numeric_noabirule/abi_gpu_linalg.f90 @@ -0,0 +1,3633 @@ +!{\src2tex{textfont=tt}} +!!****m* ABINIT/m_abi_gpu_linalg +!! NAME +!! m_abi_gpu_linalg +!! +!! FUNCTION +!! Interfaces of GPU subroutines wrapper +!! +!! COPYRIGHT +!! Copyright (C) 2011-2024 ABINIT group (FDahm )) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~ABINIT/Infos/copyright +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! SOURCE + +!!*** + +#ifndef HAVE_GPU + +!!****f* m_abi_gpu_linalg/gpu_device_synchronize +!! NAME +!! gpu_device_synchronize +!! +!! FUNCTION +!! Wait for any running operation, compute and memory transfer, to complete on GPU. +!! +!! INPUTS +!! None +!! +!! OUTPUT +!! None +!! +!! SIDE EFFECTS +!! WARNING! : this routine is a dummy one when HAVE_GPU is not enabled +!! the correct one is in 17_gpu_toolbox/dev_spec.cu +!! +!! SOURCE + +subroutine gpu_device_synchronize() + use, intrinsic :: iso_c_binding + implicit none +end subroutine gpu_device_synchronize +!!*** + + +!!****f* m_abi_gpu_linalg/check_gpu_mem +!! NAME +!! check_gpu_mem +!! +!! FUNCTION +!! Print information about amount of free memory on GPU and total amount of memory on GPU (current device). +!! +!! INPUTS +!! str is a string message (character array). +!! +!! OUTPUT +!! None +!! +!! SIDE EFFECTS +!! WARNING! : this routine is a dummy one when HAVE_GPU is not enabled +!! the correct one is in 17_gpu_toolbox/dev_spec.cu +!! +!! SOURCE + +subroutine check_gpu_mem(str) + + !Arguments ------------------------------------ + character (KIND=c_char), intent(in), target :: str(*) + !Local variables ------------------------------ + type(c_ptr) :: dummy + + if(.false.) dummy=c_loc(str) + +end subroutine check_gpu_mem +!!*** + + +!!****f* m_abi_gpu_linalg/alloc_on_gpu +!! NAME +!! alloc_on_gpu +!! +!! FUNCTION +!! Allocate size byte in gpu memory and returns in gpu_ptr this location +!! +!! INPUTS +!! size= size in byte to allocate +!! +!! OUTPUT +!! gpu_ptr= C_PTR on gpu memory location that has been allocated +!! +!! SIDE EFFECTS +!! WARNING! : this routine is a dummy one when HAVE_GPU is not enabled +!! the correct one is in 17_gpu_toolbox/dev_spec.cu +!! +!! SOURCE + +subroutine alloc_on_gpu(gpu_ptr,size) + +!Arguments ------------------------------------ + type(c_ptr), intent(inout) :: gpu_ptr + integer(kind=c_size_t), intent(in) :: size ! size in bytes to allocate + + ABI_UNUSED(gpu_ptr) + ABI_UNUSED(size) + +end subroutine alloc_on_gpu +!!*** + +!!****f* m_abi_gpu_linalg/copy_from_gpu +!! NAME +!! copy_from_gpu +!! +!! FUNCTION +!! copy size byte from gpu memory (pointed by gpu_ptr) to cpu memory (pointed by cpu_ptr) +!! +!! INPUTS +!! size_in_bytes = size in bytes to allocate +!! gpu_ptr = C_PTR on gpu memory location that has been allocated +!! +!! OUTPUT +!! dtab = fortran tab which will contains data +!! +!! SIDE EFFECTS +!! WARNING! : this routine is a dummy one when HAVE_GPU is not enabled +!! the correct one is in 17_gpu_toolbox/dev_spec.cu +!! +!! SOURCE + +subroutine copy_from_gpu(dtab,gpu_ptr,size_in_bytes) + +!Arguments ------------------------------------ + real(dp),dimension(*) :: dtab + type(c_ptr) :: gpu_ptr + integer(kind=c_size_t), intent(in) :: size_in_bytes ! size in byte (to be transfered) + +!Local variables ------------------------------ + type(c_ptr) :: cpu_ptr + + if(.false.) write(std_out,*) dtab(1) + ABI_UNUSED(cpu_ptr) + ABI_UNUSED(gpu_ptr) + ABI_UNUSED(size_in_bytes) + +end subroutine copy_from_gpu +!!*** + +!!****f* m_abi_gpu_linalg/copy_on_gpu +!! NAME +!! copy_on_gpu +!! +!! FUNCTION +!! copy size byte from cpu (pointed by cpu_ptr) to gpu memory (pointed by gpu_ptr) +!! +!! INPUTS +!! size_in_bytes = size in bytes to allocate +!! dtab = fortran tab to copy +!! +!! OUTPUT +!! gpu_ptr= C_PTR on gpu memory location +!! +!! SIDE EFFECTS +!! WARNING! : this routine is a dummy one when HAVE_GPU is not enabled +!! the correct one is in 17_gpu_toolbox/dev_spec.cu +!! +!! SOURCE + +subroutine copy_on_gpu(dtab,gpu_ptr,size_in_bytes) + + !Arguments ------------------------------------ + real(dp),dimension(*) :: dtab + type(c_ptr) :: gpu_ptr + integer(kind=c_size_t), intent(in) :: size_in_bytes ! size in byte (to be transfered) + + !Local variables ------------------------------ + type(c_ptr) :: cpu_ptr + + if(.false.) write(std_out,*) dtab(1) + ABI_UNUSED(cpu_ptr) + ABI_UNUSED(gpu_ptr) + ABI_UNUSED(size_in_bytes) + +end subroutine copy_on_gpu +!!*** + +!!****f* m_abi_gpu_linalg/copy_gpu_to_gpu +!! NAME +!! copy_gpu_to_gpu +!! +!! FUNCTION +!! copy size byte from gpu (src) to gpu (dest) +!! +!! INPUTS +!! size_in_bytes = size in bytes to copy +!! src_gpu_ptr = C_PTR on gpu memory +!! +!! OUTPUT +!! dest_gpu_ptr = C_PTR on gpu memory +!! +!! SIDE EFFECTS +!! WARNING! : this routine is a dummy one when HAVE_GPU_CUDA is not enabled +!! the correct one is in 17_gpu_toolbox/dev_spec.cu +!! +!! PARENTS +!! lobpcgwf,m_abi_gpu_linalg +!! +!! SOURCE + +subroutine copy_gpu_to_gpu(cpu_ptr,gpu_ptr,size_in_bytes) + + !Arguments ------------------------------------ + type(c_ptr) :: cpu_ptr + type(c_ptr) :: gpu_ptr + integer(kind=c_size_t), intent(in) :: size_in_bytes ! size in byte (to be transfered) + + ABI_UNUSED(cpu_ptr) + ABI_UNUSED(gpu_ptr) + ABI_UNUSED(size_in_bytes) + +end subroutine copy_gpu_to_gpu +!!*** + +!!****f* m_abi_gpu_linalg/dealloc_on_gpu +!! NAME +!! dealloc_on_gpu +!! +!! FUNCTION +!! free memory location pointed by gpu_ptr +!! +!! INPUTS +!! +!! OUTPUT +!! gpu_ptr= C_PTR on gpu memory location that has been allocated +!! +!! SIDE EFFECTS +!! WARNING! : this routine is a dummy one when HAVE_GPU is not enabled +!! the correct one is in 17_gpu_toolbox/dev_spec.cu +!! +!! SOURCE + +subroutine dealloc_on_gpu(gpu_ptr) + + !Arguments ------------------------------------ + type(c_ptr) :: gpu_ptr + + ABI_UNUSED(gpu_ptr) + +end subroutine dealloc_on_gpu +!!*** + +!!****f* m_abi_gpu_linalg/gpu_memset +!! NAME +!! gpu_memset +!! +!! FUNCTION +!! Initializes or sets device memory to a value. +!! +!! INPUTS +!! gpu_ptr= C_PTR on gpu memory location +!! val= value used to initialized each bytes +!! size= number of bytes to initialize +!! +!! OUTPUT +!! gpu_ptr= C_PTR on gpu memory location +!! +!! SIDE EFFECTS +!! WARNING! : this routine is a dummy one when HAVE_GPU is not enabled +!! the correct one is in 17_gpu_toolbox/dev_spec.cu +!! +!! PARENTS +!! lobpcgwf +!! +!! SOURCE + +subroutine gpu_memset(gpu_ptr, val, array_size) + + !Arguments ------------------------------------ + type(c_ptr) :: gpu_ptr + integer(kind=c_int32_t), intent(in) :: val + integer(kind=c_size_t), intent(in) :: array_size + + ABI_UNUSED(gpu_ptr) + ABI_UNUSED(val) + ABI_UNUSED(array_size) + +end subroutine gpu_memset +!!*** + +!!****f* m_abi_gpu_linalg/gpu_allocated_impl +!! NAME +!! gpu_allocated_impl +!! +!! FUNCTION +!! Check if pointer points to allocated gpu device memory. +!! +!! INPUTS +!! gpu_ptr= C_PTR on gpu memory location +!! +!! OUTPUT +!! is_allocate= logical(c_bool) : true (if allocated), false (if not allocated) +!! +!! SIDE EFFECTS +!! WARNING! : this routine is a dummy one when HAVE_GPU is not enabled +!! the correct one is in 17_gpu_toolbox/dev_spec.cu +!! +!! PARENTS +!! lobpcgwf +!! +!! SOURCE + +subroutine gpu_allocated_impl(gpu_ptr, is_allocated) + + !Arguments ------------------------------------ + type(c_ptr) :: gpu_ptr + logical(kind=c_bool), intent(out) :: is_allocated + + ABI_UNUSED(gpu_ptr) + + is_allocated = .false. + +end subroutine gpu_allocated_impl +!!*** + +!!****f* m_abi_gpu_linalg/gpu_managed_ptr_status +!! NAME +!! gpu_managed_ptr_status_impl +!! +!! FUNCTION +!! Print information about a managed pointer (host or device address when accessible). +!! +!! INPUTS +!! gpu_ptr= C_PTR on gpu memory location +!! +!! OUTPUT +!! +!! SIDE EFFECTS +!! WARNING! : this routine is a dummy one when HAVE_GPU is not enabled +!! the correct one is in 17_gpu_toolbox/dev_spec.cu +!! +!! PARENTS +!! +!! SOURCE + +subroutine gpu_managed_ptr_status(gpu_ptr, str) + + !Arguments ------------------------------------ + type(c_ptr) :: gpu_ptr + character (KIND=c_char), intent(in), target :: str(*) + !Local variables ------------------------------ + type(c_ptr) :: dummy + + ABI_UNUSED(gpu_ptr) + if(.false.) dummy=c_loc(str) + +end subroutine gpu_managed_ptr_status +!!*** + +!!****f* m_abi_gpu_linalg/gpu_linalg_init +!! NAME +!! gpu_linalg_init +!! +!! FUNCTION +!! initialisation of linalg environnement on GPU +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SIDE EFFECTS +!! WARNING! : this routine is a dummy one when HAVE_GPU is not enabled +!! the correct one is in 17_gpu_toolbox/gpu_linalg.cu +!! +!! SOURCE + +subroutine gpu_linalg_init() + + +end subroutine gpu_linalg_init +!!*** + +!!****f* m_abi_gpu_linalg/gpu_linalg_shutdown +!! NAME +!! gpu_linalg_shutdown +!! +!! FUNCTION +!! close linalg environnement on GPU +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SIDE EFFECTS +!! WARNING! : this routine is a dummy one when HAVE_GPU is not enabled +!! the correct one is in 17_gpu_toolbox/gpu_linalg.cu +!! +!! SOURCE +subroutine gpu_linalg_shutdown() + +end subroutine gpu_linalg_shutdown +!!*** + +!!****f* m_abi_gpu_linalg/gpu_xgemm +!! NAME +!! gpu_xgemm +!! +!! FUNCTION +!! Compute a scalar-matrix-matrix product and return a scalar-matrix product on GPU +!! c = alpha * op(a) * op(b) + beta * c +!! +!! INPUTS +!! cplx = 1 if real 2 if complex +!! transa= from of op(a) to be used in the matrix multiplication +!! transb= from of op(b) to be used in the matrix multiplication +!! m = number of rows of the matrix op(a) and of the matrix c +!! n = number of rows of the matrix op(b) and the number of columns of the matrix c +!! k = number of columns of the matrix op(a) and the number of rows of the matrix op(b) +!! alpha = alpha scalar coefficient for matrix op(a) +!! a_gpu = pointer to gpu memory location of matrix a +!! lda = first dimension of a +!! b_gpu = pointer to gpu memory location of matrix b +!! ldb = first dimension of b +!! beta = beta scalar coefficient for matrix c +!! c_gpu = pointer to gpu memory location of matrix c +!! ldc = first dimension of c +!! +!! OUTPUT +!! c = c matrix +!! +!! +!! SIDE EFFECTS +!! WARNING! : this routine is a dummy one when HAVE_GPU is not enabled +!! the correct one is in 17_gpu_toolbox/gpu_linalg.cu +!! +!! SOURCE + +subroutine gpu_xgemm(cplx,transa,transb,m,n,k,alpha,a_gpu,lda,b_gpu,ldb,beta,c_gpu,ldc) + +!Arguments ------------------------------------ + integer,intent(in) :: cplx,lda,ldb,ldc,m,n,k + complex(dpc),intent(in) :: alpha,beta + character(len=1),intent(in) :: transa,transb + type(c_ptr),intent(in) :: a_gpu,b_gpu + type(c_ptr),intent(inout) :: c_gpu +!Local variables ------------------------------ + type(c_ptr) :: cptr + +! ********************************************************************* + + if (.false.) then + cptr=a_gpu;cptr=b_gpu;cptr=c_gpu + write(std_out,*) transa,transb,cplx,lda,ldb,ldc,m,n,k,alpha,beta + end if + +end subroutine gpu_xgemm +!!*** + +!!****f* m_abi_gpu_linalg/gpu_xtrsm +!! NAME +!! gpu_xtrsm +!! +!! FUNCTION +!! Solves a matrix equation (one matrix operand is triangular) on GPU. +!! The xtrsm routines solve one of the following matrix equations +!! op(a)*x = alpha*b +!! or +!! x*op(a) = alpha*b, +!! +!! INPUTS +!! cplx= 1 if real 2 if complex +!! side= Specifies whether op(a) appears on the left or right of x for +!! the operation to be performed as follows: +!! L or l op(a)*x = alpha*b +!! R or r x*op(a) = alpha*b +!! uplo= Specifies whether the matrix a is an upper or lower triangular +!! matrix as follows: +!! U or u Matrix a is an upper triangular matrix. +!! L or l Matrix a is a lower triangular matrix +!! transa= Specifies the form of op(a) to be used in the matrix +!! multiplication as follows: +!! N or n op(a) = a +!! T or t op(a) = a' +!! C or c op(a) = conjg(a') +!! diag= Specifies whether or not a is unit triangular as follows: +!! U or u Matrix a is assumed to be unit triangular. +!! N or n Matrix a is not assumed to be unit triangular. +!! m= Specifies the number of rows of b. The value of m must be at least zero +!! n= Specifies the number of columns of b. The value of n must be at least zero +!! alpha= Specifies the scalar alpha. When alpha is zero, then a is not referenced and b +!! need not be set before entry. +!! a_gpu = pointer to gpu memory location of array a, DIMENSION (lda, k), where k is m when side = 'L' or 'l' and is n +!! when side = 'R' or 'r'. +!! lda= Specifies the first dimension of a as declared in the calling +!! (sub)program. When side = 'L' or 'l', then lda must be at least max(1, +!! m), when side = 'R' or 'r', then lda must be at least max(1, n). +!! b_gpu = pointer to gpu memory location of b Array, DIMENSION (ldb,n). Before entry, the leading m-by-n part of the array +!! b must contain the right-hand side matrix b. +!! ldb= Specifies the first dimension of b as declared in the calling +!! (sub)program. The value of ldb must be at least max(1, m). +!! +!! OUTPUT +!! b_gpu +!! +!! SIDE EFFECTS +!! WARNING! : this routine is a dummy one when HAVE_GPU is not enabled +!! the correct one is in 17_gpu_toolbox/gpu_linalg.cu +!! +!! SOURCE +subroutine gpu_xtrsm(cplx,side,uplo,transa,diag,m,n,alpha,a_gpu,lda,b_gpu,ldb) + +! !Arguments ------------------------------------ + integer, intent(in) :: cplx,lda,ldb,m,n + complex(dpc), intent(in) :: alpha + character(len=1), intent(in) :: side,uplo,transa,diag + type(c_ptr),intent(in) :: a_gpu + type(c_ptr),intent(inout) :: b_gpu +!Local variables ------------------------------ + type(c_ptr) :: cptr + +! ********************************************************************* + + if (.false.) then + cptr=a_gpu;cptr=b_gpu + write(std_out,*) side,uplo,transa,diag,cplx,lda,ldb,m,n,alpha + end if + +end subroutine gpu_xtrsm +!!*** + +!!****f* m_abi_gpu_linalg/gpu_xaxpy +!! NAME +!! gpu_xaxpy +!! +!! FUNCTION +!! Compute a BLAS-1 AXPY operation on GPU +!! y = alpha * x + y +!! +!! INPUTS +!! cplx = 1 if real 2 if complex +!! size = vector size +!! alpha = scalar complex value +!! x_gpu = pointer to gpu memory location of array x +!! incrx = stride between consecutive elements of x +!! y_gpu = pointer to gpu memory location of array y +!! incry = stride between consecutive elements of y +!! +!! SOURCE +subroutine gpu_xaxpy(cplx, size, alpha, x_gpu, incrx, y_gpu, incry) + + ! !Arguments ------------------------------------ + integer, intent(in) :: cplx + integer, intent(in) :: size + complex(dpc), intent(in) :: alpha + type(c_ptr), intent(in) :: x_gpu + integer, intent(in) :: incrx + type(c_ptr), intent(inout) :: y_gpu + integer, intent(in) :: incry + + ABI_UNUSED((/cplx,size,incrx,incry/)) + ABI_UNUSED(alpha) + ABI_UNUSED_A(x_gpu) + ABI_UNUSED_A(y_gpu) +end subroutine gpu_xaxpy +!!*** + +!!****f* m_abi_gpu_linalg/gpu_xcopy +!! NAME +!! gpu_xcopy +!! +!! FUNCTION +!! Compute a BLAS-1 COPY operation on GPU +!! y = x (copy x into y) +!! +!! INPUTS +!! cplx = 1 if real 2 if complex +!! size = input vector size +!! x_gpu = pointer to gpu memory location of array x +!! incrx = stride between consecutive elements of x +!! y_gpu = pointer to gpu memory location of array y +!! incry = stride between consecutive elements of y +!! +!! SOURCE +subroutine gpu_xcopy(cplx, size, x_gpu, incrx, y_gpu, incry) + + ! !Arguments ------------------------------------ + integer, intent(in) :: cplx + integer, intent(in) :: size + type(c_ptr), intent(in) :: x_gpu + integer, intent(in) :: incrx + type(c_ptr), intent(inout) :: y_gpu + integer, intent(in) :: incry + + ABI_UNUSED((/cplx,size,incrx,incry/)) + ABI_UNUSED_A(x_gpu) + ABI_UNUSED_A(y_gpu) +end subroutine gpu_xcopy +!!*** + +!!****f* m_abi_gpu_linalg/gpu_xscal +!! NAME +!! gpu_xscal +!! +!! FUNCTION +!! Compute a BLAS-1 SCAL operation on GPU +!! x = alpha * x +!! +!! INPUTS +!! cplx = 1 if real 2 if complex +!! size = vector size +!! alpha = scalar complex value +!! x_gpu = pointer to gpu memory location of array x +!! incrx = stride between consecutive elements of x +!! +!! SOURCE +subroutine gpu_xscal(cplx, size, alpha, x_gpu, incrx) + + ! !Arguments ------------------------------------ + integer, intent(in) :: cplx + integer, intent(in) :: size + complex(dpc), intent(in) :: alpha + type(c_ptr), intent(in) :: x_gpu + integer, intent(in) :: incrx + + ABI_UNUSED((/cplx,size,incrx/)) + ABI_UNUSED(alpha) + ABI_UNUSED_A(x_gpu) +end subroutine gpu_xscal +!!*** + +!!****f* m_abi_gpu_linalg/gpu_xsygvd +!! NAME +!! gpu_xsygvd +!! +!! FUNCTION +!! Compute a LAPACK SYGVD operation on GPU +!! compute eigen values/vectors of a real generalized +!! symmetric-definite eigenproblem +!! +!! See cusolver documentation +!! https://docs.nvidia.com/cuda/cusolver/index.html#cuSolverDN-lt-t-gt-sygvd +!! +!! See also LAPACK doc in reference implementation: +!! https://github.com/Reference-LAPACK/lapack/blob/master/SRC/dsygvd.f +!! +!! INPUTS +!! cplx = 1 if real 2 if complex +!! itype = integer, type of problem +!! jobz = character, 'n'(eigenvalues only) or 'v' (eigenvalues + eigenvectors) +!! uplo = character, 'u' or 'l' +!! A_nrows = matrix size +!! A_ptr = pointer to gpu memory location of matrix A +!! lda = leading dimension of matrix A +!! B_ptr = pointer to gpu memory location of matrix B +!! ldb = leading dimension of matrix B +!! W_ptr = pointer to gpu memory location of matrix W (output eigen values) +!! work_ptr = +!! lwork = +!! devInfo = +!! +!! SOURCE +subroutine gpu_xsygvd(cplx, itype, jobz, uplo, A_nrows, & + & A_ptr, lda, & + & B_ptr, ldb, & + & W_ptr, & + & work_ptr, lwork, & + & devInfo) + + ! Arguments ------------------------------------ + integer, intent(in ) :: cplx + integer, intent(in ) :: itype + character(len=1),intent(in ) :: jobz + character(len=1),intent(in ) :: uplo + integer, intent(in ) :: A_nrows + type(c_ptr), intent(in ) :: A_ptr + integer, intent(in ) :: lda + type(c_ptr), intent(in ) :: B_ptr + integer, intent(in ) :: ldb + type(c_ptr), intent(inout) :: W_ptr + type(c_ptr), intent(inout) :: work_ptr + integer, intent(in ) :: lwork + integer, intent(inout) :: devInfo + + ABI_UNUSED((/cplx,itype,A_nrows,lda,ldb,lwork,devInfo/)) + ABI_UNUSED((/jobz,uplo/)) + ABI_UNUSED((/A_ptr,B_ptr,W_ptr,work_ptr/)) +end subroutine gpu_xsygvd +!!*** + +!!****f* m_abi_gpu_linalg/gpu_xsygvd_bufferSize +!! NAME +!! gpu_xsygvd_bufferSize +!! +!! FUNCTION +!! Compute required size for auxiliary work buffer used internally by cusolver +!! in cusolverDnDsygvd / cusolverDnZhegvd +!! +!! See cusolver documentation +!! https://docs.nvidia.com/cuda/cusolver/index.html#cuSolverDN-lt-t-gt-sygvd +!! +!! INPUTS +!! cplx = 1 if real 2 if complex +!! itype = integer, type of problem +!! jobz = character, 'n'(eigenvalues only) or 'v' (eigenvalues + eigenvectors) +!! uplo = character, 'u' or 'l' +!! A_nrows = matrix size +!! A_ptr = pointer to gpu memory location of matrix A +!! lda = leading dimension of matrix A +!! B_ptr = pointer to gpu memory location of matrix B +!! ldb = leading dimension of matrix B +!! W_ptr = pointer to gpu memory location of matrix W (output eigen values) +!! work_ptr = +!! lwork = +!! devInfo = +!! +!! SOURCE +subroutine gpu_xsygvd_buffersize(cplx, itype, jobz, uplo, A_nrows, & + & A_ptr, lda, & + & B_ptr, ldb, & + & W_ptr, & + & lwork) + + ! Arguments ------------------------------------ + integer, intent(in ) :: cplx + integer, intent(in ) :: itype + character(len=1),intent(in ) :: jobz + character(len=1),intent(in ) :: uplo + integer, intent(in ) :: A_nrows + type(c_ptr), intent(in ) :: A_ptr + integer, intent(in ) :: lda + type(c_ptr), intent(in ) :: B_ptr + integer, intent(in ) :: ldb + type(c_ptr), intent(inout) :: W_ptr + integer, intent(in ) :: lwork + + ABI_UNUSED((/cplx,itype,A_nrows,lda,ldb,lwork/)) + ABI_UNUSED((/jobz,uplo/)) + ABI_UNUSED((/A_ptr,B_ptr,W_ptr/)) +end subroutine gpu_xsygvd_bufferSize +!!*** + + +#endif + + +!------------------------------------------------------------------------------ +! abi_gpu_xgemm +!------------------------------------------------------------------------------ +!!****f* m_abi_gpu_linalg/abi_gpu_xgemm +!! NAME +!! abi_gpu_xgemm +!! +!! FUNCTION +!! Compute a scalar-matrix-matrix product and return a scalar-matrix product on GPU +!! c = alpha * op(a) * op(b) + beta * c +!! +!! INPUTS +!! cplx = 1 if real 2 if complex +!! transa= from of op(a) to be used in the matrix multiplication +!! transb= from of op(b) to be used in the matrix multiplication +!! m = number of rows of the matrix op(a) and of the matrix c +!! n = number of rows of the matrix op(b) and the number of columns of the matrix c +!! k = number of columns of the matrix op(a) and the number of rows of the matrix op(b) +!! alpha = alpha scalar coefficient for matrix op(a) +!! a = pointer to gpu memory location of matrix a +!! lda = first dimension of a +!! b = pointer to gpu memory location of matrix b +!! ldb = first dimension of b +!! beta = beta scalar coefficient for matrix c +!! c = pointer to gpu memory location of matrix c +!! ldc = first dimension of c +!! +!! OUTPUT +!! c = c matrix +!! +!! SOURCE + +subroutine abi_gpu_xgemm_cptr(cplx,transa,transb,m,n,k,alpha,a,lda,b,ldb,beta,c,ldc) + +!Arguments ------------------------------------ + integer,intent(in) :: cplx,lda,ldb,ldc,m,n,k + complex(dpc),intent(in) :: alpha,beta + character(len=1),intent(in) :: transa,transb + type(c_ptr),intent(in) :: a,b + type(c_ptr),intent(in) :: c + +! ********************************************************************* + + if (abi_linalg_gpu_mode == ABI_GPU_DISABLED) then + ABI_BUG("You requested to run on CPU to a GPU wrapper :/") + end if + +#ifdef HAVE_GPU + + call gpu_xgemm(cplx,transa,transb,m,n,k,alpha,& + a,lda,b,ldb,beta,c,ldc) + + if (abi_linalg_gpu_mode == ABI_GPU_OPENMP) then + ! CUDA/HIP linalg calls are run asynchronously and OpenMP is unaware of them. + ! Therefore, we issue a stream sync here to avoid + !potential mistakes in calling context. + call gpu_linalg_stream_synchronize() + end if + +#else + ! Unused if GPU code disabled + ABI_UNUSED((/cplx,lda,ldb,ldc,m,n,k/)) + ABI_UNUSED((/alpha,beta/)) + ABI_UNUSED((/transa,transb/)) + ABI_UNUSED((/a,b,c/)) +#endif + +end subroutine abi_gpu_xgemm_cptr +!!*** + +subroutine abi_gpu_xgemm_d(cplx,transa,transb,m,n,k,alpha,a,lda,b,ldb,beta,c,ldc) + +!Arguments ------------------------------------ + integer,intent(in) :: cplx,lda,ldb,ldc,m,n,k + complex(dpc),intent(in) :: alpha,beta + character(len=1),intent(in) :: transa,transb + real(dp), intent(in),target :: a(*),b(*) + real(dp), intent(inout),target :: c(*) + +! ********************************************************************* + + if (abi_linalg_gpu_mode == ABI_GPU_DISABLED) then + ABI_BUG("You requested to run on CPU to a GPU wrapper :/") + end if + + if(abi_linalg_gpu_mode == ABI_GPU_LEGACY .or. abi_linalg_gpu_mode == ABI_GPU_KOKKOS) then + call abi_gpu_xgemm_cptr(cplx,transa,transb,m,n,k,alpha,& + c_loc(a),lda,& + c_loc(b),ldb,& + beta,& + c_loc(c),ldc) + else if(abi_linalg_gpu_mode == ABI_GPU_OPENMP) then +#ifdef HAVE_OPENMP_OFFLOAD + !$OMP TARGET DATA USE_DEVICE_PTR(a,b,c) + call abi_gpu_xgemm_cptr(cplx,transa,transb,m,n,k,alpha,& + c_loc(a),lda,& + c_loc(b),ldb,& + beta,& + c_loc(c),ldc) + !$OMP END TARGET DATA +#endif + else + ABI_BUG("Unhandled GPU mode !") + end if + +end subroutine abi_gpu_xgemm_d +!!*** + +subroutine abi_gpu_xgemm_z(cplx,transa,transb,m,n,k,alpha,a,lda,b,ldb,beta,c,ldc) + +!Arguments ------------------------------------ + integer,intent(in) :: cplx,lda,ldb,ldc,m,n,k + complex(dpc),intent(in) :: alpha,beta + character(len=1),intent(in) :: transa,transb + complex(dpc),intent(in),target :: a(*),b(*) + complex(dpc),intent(inout),target :: c(*) + +! ********************************************************************* + + if (abi_linalg_gpu_mode == ABI_GPU_DISABLED) then + ABI_BUG("You requested to run on CPU to a GPU wrapper :/") + end if + + if(abi_linalg_gpu_mode == ABI_GPU_LEGACY .or. abi_linalg_gpu_mode == ABI_GPU_KOKKOS) then + call abi_gpu_xgemm_cptr(cplx,transa,transb,m,n,k,alpha,& + c_loc(a),lda,& + c_loc(b),ldb,& + beta,& + c_loc(c),ldc) + else if(abi_linalg_gpu_mode == ABI_GPU_OPENMP) then +#ifdef HAVE_OPENMP_OFFLOAD + !$OMP TARGET DATA USE_DEVICE_PTR(a,b,c) + call abi_gpu_xgemm_cptr(cplx,transa,transb,m,n,k,alpha,& + c_loc(a),lda,& + c_loc(b),ldb,& + beta,& + c_loc(c),ldc) + !$OMP END TARGET DATA +#endif + else + ABI_BUG("Unhandled GPU mode !") + end if + +end subroutine abi_gpu_xgemm_z +!!*** + +subroutine abi_gpu_xgemm_2d(cplx,transa,transb,m,n,k,alpha,a,lda,b,ldb,beta,c,ldc) + +!Arguments ------------------------------------ + integer,intent(in) :: cplx,lda,ldb,ldc,m,n,k + complex(dpc),intent(in) :: alpha,beta + character(len=1),intent(in) :: transa,transb + real(dp), intent(in),target :: a(lda,*),b(ldb,*) + real(dp), intent(inout),target :: c(ldc,*) + +! ********************************************************************* + + if (abi_linalg_gpu_mode == ABI_GPU_DISABLED) then + ABI_BUG("You requested to run on CPU to a GPU wrapper :/") + end if + + if(abi_linalg_gpu_mode == ABI_GPU_LEGACY .or. abi_linalg_gpu_mode == ABI_GPU_KOKKOS) then + call abi_gpu_xgemm_cptr(cplx,transa,transb,m,n,k,alpha,& + c_loc(a),lda,& + c_loc(b),ldb,& + beta,& + c_loc(c),ldc) + else if(abi_linalg_gpu_mode == ABI_GPU_OPENMP) then +#ifdef HAVE_OPENMP_OFFLOAD + !$OMP TARGET DATA USE_DEVICE_PTR(a,b,c) + call abi_gpu_xgemm_cptr(cplx,transa,transb,m,n,k,alpha,& + c_loc(a),lda,& + c_loc(b),ldb,& + beta,& + c_loc(c),ldc) + !$OMP END TARGET DATA +#endif + else + ABI_BUG("Unhandled GPU mode !") + end if + +end subroutine abi_gpu_xgemm_2d +!!*** + +subroutine abi_gpu_xgemm_2z(cplx,transa,transb,m,n,k,alpha,a,lda,b,ldb,beta,c,ldc) + +!Arguments ------------------------------------ + integer,intent(in) :: cplx,lda,ldb,ldc,m,n,k + complex(dpc),intent(in) :: alpha,beta + character(len=1),intent(in) :: transa,transb + complex(dpc),intent(in),target :: a(lda,*),b(ldb,*) + complex(dpc),intent(inout),target :: c(ldc,*) + +! ********************************************************************* + + if (abi_linalg_gpu_mode == ABI_GPU_DISABLED) then + ABI_BUG("You requested to run on CPU to a GPU wrapper :/") + end if + + if(abi_linalg_gpu_mode == ABI_GPU_LEGACY .or. abi_linalg_gpu_mode == ABI_GPU_KOKKOS) then + call abi_gpu_xgemm_cptr(cplx,transa,transb,m,n,k,alpha,& + c_loc(a),lda,& + c_loc(b),ldb,& + beta,& + c_loc(c),ldc) + else if(abi_linalg_gpu_mode == ABI_GPU_OPENMP) then +#ifdef HAVE_OPENMP_OFFLOAD + !$OMP TARGET DATA USE_DEVICE_PTR(a,b,c) + call abi_gpu_xgemm_cptr(cplx,transa,transb,m,n,k,alpha,& + c_loc(a),lda,& + c_loc(b),ldb,& + beta,& + c_loc(c),ldc) + !$OMP END TARGET DATA +#endif + else + ABI_BUG("Unhandled GPU mode !") + end if + +end subroutine abi_gpu_xgemm_2z +!!*** + +!------------------------------------------------------------------------------ +! abi_gpu_xgemm_strided +!------------------------------------------------------------------------------ +!!****f* m_abi_gpu_linalg/abi_gpu_xgemm_strided +!! NAME +!! abi_gpu_xgemm_strided +!! +!! FUNCTION +!! Compute a batched scalar-matrix-matrix product and return a scalar-matrix product on GPU. +!! Meant to be used on non-contiguous matrixes with data is uniformly split in the same number of batches in each matrix. +!! c = alpha * op(a) * op(b) + beta * c +!! +!! INPUTS +!! cplx = 1 if real 2 if complex +!! transa = from of op(a) to be used in the matrix multiplication +!! transb = from of op(b) to be used in the matrix multiplication +!! m = number of rows of the matrix op(a) and of the matrix c +!! n = number of rows of the matrix op(b) and the number of columns of the matrix c +!! k = number of columns of the matrix op(a) and the number of rows of the matrix op(b) +!! alpha = alpha scalar coefficient for matrix op(a) +!! a = pointer to gpu memory location of matrix a +!! lda = first dimension of a +!! strideC = stride between each batch in matrix a +!! b = pointer to gpu memory location of matrix b +!! ldb = first dimension of b +!! strideC = stride between each batch in matrix b +!! beta = beta scalar coefficient for matrix c +!! c = pointer to gpu memory location of matrix c +!! ldc = first dimension of c +!! strideC = stride between each batch in matrix c +!! batchCount = number of batches in any matrix +!! +!! OUTPUT +!! c = c matrix +!! +!! SOURCE + +subroutine abi_gpu_xgemm_strided_cptr(cplx,transa,transb,m,n,k,alpha,a,lda,strideA,b,ldb,strideB,beta,c,ldc,strideC,batchCount) + +!Arguments ------------------------------------ + integer,intent(in) :: cplx,lda,ldb,ldc,m,n,k + integer,intent(in) :: strideA,strideB,strideC,batchCount + complex(dpc),intent(in) :: alpha,beta + character(len=1),intent(in) :: transa,transb + type(c_ptr),intent(in) :: a,b + type(c_ptr),intent(in) :: c + +! ********************************************************************* + + if (abi_linalg_gpu_mode == ABI_GPU_DISABLED) then + ABI_BUG("You requested to run on CPU to a GPU wrapper :/") + end if + +#ifdef HAVE_GPU + + call gpu_xgemm_strided_batched(cplx,transa,transb,m,n,k,alpha,& + a,lda,strideA,b,ldb,strideB,beta,c,ldc,strideC,batchCount) + + if (abi_linalg_gpu_mode == ABI_GPU_OPENMP) then + ! CUDA/HIP linalg calls are run asynchronously and OpenMP is unaware of them. + ! Therefore, we issue a stream sync here to avoid + !potential mistakes in calling context. + call gpu_linalg_stream_synchronize() + end if + +#else + ! Unused if GPU code disabled + ABI_UNUSED((/cplx,lda,ldb,ldc,m,n,k/)) + ABI_UNUSED((/strideA,strideB,strideC,batchCount/)) + ABI_UNUSED((/alpha,beta/)) + ABI_UNUSED((/transa,transb/)) + ABI_UNUSED((/a,b,c/)) +#endif + +end subroutine abi_gpu_xgemm_strided_cptr +!!*** + +subroutine abi_gpu_xgemm_strided_d(cplx,transa,transb,m,n,k,alpha,a,lda,strideA,b,ldb,strideB,beta,c,ldc,strideC,batchCount) + +!Arguments ------------------------------------ + integer,intent(in) :: cplx,lda,ldb,ldc,m,n,k + integer,intent(in) :: strideA,strideB,strideC,batchCount + complex(dpc),intent(in) :: alpha,beta + character(len=1),intent(in) :: transa,transb + real(dp), intent(in),target :: a(*),b(*) + real(dp), intent(inout),target :: c(*) + +! ********************************************************************* + + if (abi_linalg_gpu_mode == ABI_GPU_DISABLED) then + ABI_BUG("You requested to run on CPU to a GPU wrapper :/") + end if + + if(abi_linalg_gpu_mode == ABI_GPU_LEGACY .or. abi_linalg_gpu_mode == ABI_GPU_KOKKOS) then + call abi_gpu_xgemm_strided_cptr(cplx,transa,transb,m,n,k,alpha,& + c_loc(a),lda,strideA,& + c_loc(b),ldb,strideB,& + beta,& + c_loc(c),ldc,strideC,batchCount) + else if(abi_linalg_gpu_mode == ABI_GPU_OPENMP) then +#ifdef HAVE_OPENMP_OFFLOAD + !$OMP TARGET DATA USE_DEVICE_PTR(a,b,c) + call abi_gpu_xgemm_strided_cptr(cplx,transa,transb,m,n,k,alpha,& + c_loc(a),lda,strideA,& + c_loc(b),ldb,strideB,& + beta,& + c_loc(c),ldc,strideC,batchCount) + !$OMP END TARGET DATA +#endif + else + ABI_BUG("Unhandled GPU mode !") + end if + +end subroutine abi_gpu_xgemm_strided_d +!!*** + +subroutine abi_gpu_xgemm_strided_z(cplx,transa,transb,m,n,k,alpha,a,lda,strideA,b,ldb,strideB,beta,c,ldc,strideC,batchCount) + +!Arguments ------------------------------------ + integer,intent(in) :: cplx,lda,ldb,ldc,m,n,k + integer,intent(in) :: strideA,strideB,strideC,batchCount + complex(dpc),intent(in) :: alpha,beta + character(len=1),intent(in) :: transa,transb + complex(dpc),intent(in),target :: a(*),b(*) + complex(dpc),intent(inout),target :: c(*) + +! ********************************************************************* + + if (abi_linalg_gpu_mode == ABI_GPU_DISABLED) then + ABI_BUG("You requested to run on CPU to a GPU wrapper :/") + end if + + if(abi_linalg_gpu_mode == ABI_GPU_LEGACY .or. abi_linalg_gpu_mode == ABI_GPU_KOKKOS) then + call abi_gpu_xgemm_strided_cptr(cplx,transa,transb,m,n,k,alpha,& + c_loc(a),lda,strideA,& + c_loc(b),ldb,strideB,& + beta,& + c_loc(c),ldc,strideC,batchCount) + else if(abi_linalg_gpu_mode == ABI_GPU_OPENMP) then +#ifdef HAVE_OPENMP_OFFLOAD + !$OMP TARGET DATA USE_DEVICE_PTR(a,b,c) + call abi_gpu_xgemm_strided_cptr(cplx,transa,transb,m,n,k,alpha,& + c_loc(a),lda,strideA,& + c_loc(b),ldb,strideB,& + beta,& + c_loc(c),ldc,strideC,batchCount) + !$OMP END TARGET DATA +#endif + else + ABI_BUG("Unhandled GPU mode !") + end if + +end subroutine abi_gpu_xgemm_strided_z +!!*** + +subroutine abi_gpu_xgemm_strided_2d(cplx,transa,transb,m,n,k,alpha,a,lda,strideA,b,ldb,strideB,beta,c,ldc,strideC,batchCount) + +!Arguments ------------------------------------ + integer,intent(in) :: cplx,lda,ldb,ldc,m,n,k + integer,intent(in) :: strideA,strideB,strideC,batchCount + complex(dpc),intent(in) :: alpha,beta + character(len=1),intent(in) :: transa,transb + real(dp), intent(in),target :: a(lda,*),b(ldb,*) + real(dp), intent(inout),target :: c(ldc,*) + +! ********************************************************************* + + if (abi_linalg_gpu_mode == ABI_GPU_DISABLED) then + ABI_BUG("You requested to run on CPU to a GPU wrapper :/") + end if + + if(abi_linalg_gpu_mode == ABI_GPU_LEGACY .or. abi_linalg_gpu_mode == ABI_GPU_KOKKOS) then + call abi_gpu_xgemm_strided_cptr(cplx,transa,transb,m,n,k,alpha,& + c_loc(a),lda,strideA,& + c_loc(b),ldb,strideB,& + beta,& + c_loc(c),ldc,strideC,batchCount) + else if(abi_linalg_gpu_mode == ABI_GPU_OPENMP) then +#ifdef HAVE_OPENMP_OFFLOAD + !$OMP TARGET DATA USE_DEVICE_PTR(a,b,c) + call abi_gpu_xgemm_strided_cptr(cplx,transa,transb,m,n,k,alpha,& + c_loc(a),lda,strideA,& + c_loc(b),ldb,strideB,& + beta,& + c_loc(c),ldc,strideC,batchCount) + !$OMP END TARGET DATA +#endif + else + ABI_BUG("Unhandled GPU mode !") + end if + +end subroutine abi_gpu_xgemm_strided_2d +!!*** + +subroutine abi_gpu_xgemm_strided_2z(cplx,transa,transb,m,n,k,alpha,a,lda,strideA,b,ldb,strideB,beta,c,ldc,strideC,batchCount) + +!Arguments ------------------------------------ + integer,intent(in) :: cplx,lda,ldb,ldc,m,n,k + integer,intent(in) :: strideA,strideB,strideC,batchCount + complex(dpc),intent(in) :: alpha,beta + character(len=1),intent(in) :: transa,transb + complex(dpc),intent(in),target :: a(lda,*),b(ldb,*) + complex(dpc),intent(inout),target :: c(ldc,*) + +! ********************************************************************* + + if (abi_linalg_gpu_mode == ABI_GPU_DISABLED) then + ABI_BUG("You requested to run on CPU to a GPU wrapper :/") + end if + + if(abi_linalg_gpu_mode == ABI_GPU_LEGACY .or. abi_linalg_gpu_mode == ABI_GPU_KOKKOS) then + call abi_gpu_xgemm_strided_cptr(cplx,transa,transb,m,n,k,alpha,& + c_loc(a),lda,strideA,& + c_loc(b),ldb,strideB,& + beta,& + c_loc(c),ldc,strideC,batchCount) + else if(abi_linalg_gpu_mode == ABI_GPU_OPENMP) then +#ifdef HAVE_OPENMP_OFFLOAD + !$OMP TARGET DATA USE_DEVICE_PTR(a,b,c) + call abi_gpu_xgemm_strided_cptr(cplx,transa,transb,m,n,k,alpha,& + c_loc(a),lda,strideA,& + c_loc(b),ldb,strideB,& + beta,& + c_loc(c),ldc,strideC,batchCount) + !$OMP END TARGET DATA +#endif + else + ABI_BUG("Unhandled GPU mode !") + end if + +end subroutine abi_gpu_xgemm_strided_2z +!!*** + +!------------------------------------------------------------------------------ +! abi_gpu_xsymm +!------------------------------------------------------------------------------ +!!****f* m_abi_gpu_linalg/abi_gpu_xsymm +!! NAME +!! abi_gpu_xsymm +!! +!! FUNCTION +!! Compute a symmetric scalar-matrix-matrix product and return a scalar-matrix product on GPU +!! c = alpha * op(a) * op(b) + beta * c , if side == L +!! c = alpha * op(b) * op(a) + beta * c , if side == R +!! +!! INPUTS +!! cplx = 1 if real 2 if complex +!! side = Specifies whether op(a) appears on the left or right of x for +!! the operation to be performed as follows: +!! L or l op(a)*x = alpha*b +!! R or r x*op(a) = alpha*b +!! uplo = Specifies whether the matrix a is an upper or lower triangular +!! matrix as follows: +!! U or u Matrix a is an upper triangular matrix. +!! L or l Matrix a is a lower triangular matrix +!! m = number of rows of the matrix op(a) and of the matrix c +!! n = number of rows of the matrix op(b) and the number of columns of the matrix c +!! alpha = alpha scalar coefficient for matrix op(a) +!! a = pointer to gpu memory location of matrix a +!! lda = first dimension of a +!! b = pointer to gpu memory location of matrix b +!! ldb = first dimension of b +!! beta = beta scalar coefficient for matrix c +!! c = pointer to gpu memory location of matrix c +!! ldc = first dimension of c +!! +!! OUTPUT +!! c = c matrix +!! +!! SOURCE + +subroutine abi_gpu_xsymm_cptr(cplx,side,uplo,m,n,alpha,a,lda,b,ldb,beta,c,ldc) + +!Arguments ------------------------------------ + integer,intent(in) :: cplx,lda,ldb,ldc,m,n + complex(dpc),intent(in) :: alpha,beta + character(len=1),intent(in) :: side,uplo + type(c_ptr),intent(in) :: a,b + type(c_ptr),intent(in) :: c + +! ********************************************************************* + + if (abi_linalg_gpu_mode == ABI_GPU_DISABLED) then + ABI_BUG("You requested to run on CPU to a GPU wrapper :/") + end if + +#ifdef HAVE_GPU + + call gpu_xsymm(cplx,side,uplo,m,n,alpha,& + a,lda,b,ldb,beta,c,ldc) + + if (abi_linalg_gpu_mode == ABI_GPU_OPENMP) then + ! CUDA/HIP linalg calls are run asynchronously and OpenMP is unaware of them. + ! Therefore, we issue a stream sync here to avoid + !potential mistakes in calling context. + call gpu_linalg_stream_synchronize() + end if + +#else + ! Unused if GPU code disabled + ABI_UNUSED((/cplx,lda,ldb,ldc,m,n/)) + ABI_UNUSED((/alpha,beta/)) + ABI_UNUSED((/side,uplo/)) + ABI_UNUSED((/a,b,c/)) +#endif + +end subroutine abi_gpu_xsymm_cptr +!!*** + +subroutine abi_gpu_xsymm_d(cplx,side,uplo,m,n,alpha,a,lda,b,ldb,beta,c,ldc) + +!Arguments ------------------------------------ + integer,intent(in) :: cplx,lda,ldb,ldc,m,n + complex(dpc),intent(in) :: alpha,beta + character(len=1),intent(in) :: side,uplo + real(dp), intent(in),target :: a(*),b(*) + real(dp), intent(inout),target :: c(*) + +! ********************************************************************* + + if (abi_linalg_gpu_mode == ABI_GPU_DISABLED) then + ABI_BUG("You requested to run on CPU to a GPU wrapper :/") + end if + + if(abi_linalg_gpu_mode == ABI_GPU_LEGACY .or. abi_linalg_gpu_mode == ABI_GPU_KOKKOS) then + call abi_gpu_xsymm_cptr(cplx,side,uplo,m,n,alpha,& + c_loc(a),lda,& + c_loc(b),ldb,& + beta,& + c_loc(c),ldc) + else if(abi_linalg_gpu_mode == ABI_GPU_OPENMP) then +#ifdef HAVE_OPENMP_OFFLOAD + !$OMP TARGET DATA USE_DEVICE_PTR(a,b,c) + call abi_gpu_xsymm_cptr(cplx,side,uplo,m,n,alpha,& + c_loc(a),lda,& + c_loc(b),ldb,& + beta,& + c_loc(c),ldc) + !$OMP END TARGET DATA +#endif + else + ABI_BUG("Unhandled GPU mode !") + end if + +end subroutine abi_gpu_xsymm_d +!!*** + +subroutine abi_gpu_xsymm_z(cplx,side,uplo,m,n,alpha,a,lda,b,ldb,beta,c,ldc) + +!Arguments ------------------------------------ + integer,intent(in) :: cplx,lda,ldb,ldc,m,n + complex(dpc),intent(in) :: alpha,beta + character(len=1),intent(in) :: side,uplo + complex(dpc),intent(in),target :: a(*),b(*) + complex(dpc),intent(inout),target :: c(*) + +! ********************************************************************* + + if (abi_linalg_gpu_mode == ABI_GPU_DISABLED) then + ABI_BUG("You requested to run on CPU to a GPU wrapper :/") + end if + + if(abi_linalg_gpu_mode == ABI_GPU_LEGACY .or. abi_linalg_gpu_mode == ABI_GPU_KOKKOS) then + call abi_gpu_xsymm_cptr(cplx,side,uplo,m,n,alpha,& + c_loc(a),lda,& + c_loc(b),ldb,& + beta,& + c_loc(c),ldc) + else if(abi_linalg_gpu_mode == ABI_GPU_OPENMP) then +#ifdef HAVE_OPENMP_OFFLOAD + !$OMP TARGET DATA USE_DEVICE_PTR(a,b,c) + call abi_gpu_xsymm_cptr(cplx,side,uplo,m,n,alpha,& + c_loc(a),lda,& + c_loc(b),ldb,& + beta,& + c_loc(c),ldc) + !$OMP END TARGET DATA +#endif + else + ABI_BUG("Unhandled GPU mode !") + end if + +end subroutine abi_gpu_xsymm_z +!!*** + +subroutine abi_gpu_xsymm_2d(cplx,side,uplo,m,n,alpha,a,lda,b,ldb,beta,c,ldc) + +!Arguments ------------------------------------ + integer,intent(in) :: cplx,lda,ldb,ldc,m,n + complex(dpc),intent(in) :: alpha,beta + character(len=1),intent(in) :: side,uplo + real(dp), intent(in),target :: a(lda,*),b(ldb,*) + real(dp), intent(inout),target :: c(ldc,*) + +! ********************************************************************* + + if (abi_linalg_gpu_mode == ABI_GPU_DISABLED) then + ABI_BUG("You requested to run on CPU to a GPU wrapper :/") + end if + + if(abi_linalg_gpu_mode == ABI_GPU_LEGACY .or. abi_linalg_gpu_mode == ABI_GPU_KOKKOS) then + call abi_gpu_xsymm_cptr(cplx,side,uplo,m,n,alpha,& + c_loc(a),lda,& + c_loc(b),ldb,& + beta,& + c_loc(c),ldc) + else if(abi_linalg_gpu_mode == ABI_GPU_OPENMP) then +#ifdef HAVE_OPENMP_OFFLOAD + !$OMP TARGET DATA USE_DEVICE_PTR(a,b,c) + call abi_gpu_xsymm_cptr(cplx,side,uplo,m,n,alpha,& + c_loc(a),lda,& + c_loc(b),ldb,& + beta,& + c_loc(c),ldc) + !$OMP END TARGET DATA +#endif + else + ABI_BUG("Unhandled GPU mode !") + end if + +end subroutine abi_gpu_xsymm_2d +!!*** + +subroutine abi_gpu_xsymm_2z(cplx,side,uplo,m,n,alpha,a,lda,b,ldb,beta,c,ldc) + +!Arguments ------------------------------------ + integer,intent(in) :: cplx,lda,ldb,ldc,m,n + complex(dpc),intent(in) :: alpha,beta + character(len=1),intent(in) :: side,uplo + complex(dpc),intent(in),target :: a(lda,*),b(ldb,*) + complex(dpc),intent(inout),target :: c(ldc,*) + +! ********************************************************************* + + if (abi_linalg_gpu_mode == ABI_GPU_DISABLED) then + ABI_BUG("You requested to run on CPU to a GPU wrapper :/") + end if + + if(abi_linalg_gpu_mode == ABI_GPU_LEGACY .or. abi_linalg_gpu_mode == ABI_GPU_KOKKOS) then + call abi_gpu_xsymm_cptr(cplx,side,uplo,m,n,alpha,& + c_loc(a),lda,& + c_loc(b),ldb,& + beta,& + c_loc(c),ldc) + else if(abi_linalg_gpu_mode == ABI_GPU_OPENMP) then +#ifdef HAVE_OPENMP_OFFLOAD + !$OMP TARGET DATA USE_DEVICE_PTR(a,b,c) + call abi_gpu_xsymm_cptr(cplx,side,uplo,m,n,alpha,& + c_loc(a),lda,& + c_loc(b),ldb,& + beta,& + c_loc(c),ldc) + !$OMP END TARGET DATA +#endif + else + ABI_BUG("Unhandled GPU mode !") + end if + +end subroutine abi_gpu_xsymm_2z +!!*** + +!------------------------------------------------------------------------------ +! abi_gpu_zhemm +!------------------------------------------------------------------------------ +!!****f* m_abi_gpu_linalg/abi_gpu_zhemm +!! NAME +!! abi_gpu_xhemm +!! +!! FUNCTION +!! Compute a Hermitian scalar-matrix-matrix product and return a scalar-matrix product on GPU +!! c = alpha * op(a) * op(b) + beta * c , if side == L +!! c = alpha * op(b) * op(a) + beta * c , if side == R +!! +!! INPUTS +!! side = Specifies whether op(a) appears on the left or right of x for +!! the operation to be performed as follows: +!! L or l op(a)*x = alpha*b +!! R or r x*op(a) = alpha*b +!! uplo = Specifies whether the matrix a is an upper or lower triangular +!! matrix as follows: +!! U or u Matrix a is an upper triangular matrix. +!! L or l Matrix a is a lower triangular matrix +!! m = number of rows of the matrix op(a) and of the matrix c +!! n = number of rows of the matrix op(b) and the number of columns of the matrix c +!! alpha = alpha scalar coefficient for matrix op(a) +!! a_gpu = pointer to gpu memory location of matrix a +!! lda = first dimension of a +!! b_gpu = pointer to gpu memory location of matrix b +!! ldb = first dimension of b +!! beta = beta scalar coefficient for matrix c +!! c_gpu = pointer to gpu memory location of matrix c +!! ldc = first dimension of c +!! +!! OUTPUT +!! c = c matrix +!! +!! SOURCE + +subroutine abi_gpu_zhemm_cptr(side,uplo,m,n,alpha,a,lda,b,ldb,beta,c,ldc) + +!Arguments ------------------------------------ + integer,intent(in) :: lda,ldb,ldc,m,n + complex(dpc),intent(in) :: alpha,beta + character(len=1),intent(in) :: side,uplo + type(c_ptr),intent(in) :: a,b + type(c_ptr),intent(in) :: c + +! ********************************************************************* + + if (abi_linalg_gpu_mode == ABI_GPU_DISABLED) then + ABI_BUG("You requested to run on CPU to a GPU wrapper :/") + end if + +#ifdef HAVE_GPU + + call gpu_zhemm(side,uplo,m,n,alpha,& + a,lda,b,ldb,beta,c,ldc) + + if (abi_linalg_gpu_mode == ABI_GPU_OPENMP) then + ! CUDA/HIP linalg calls are run asynchronously and OpenMP is unaware of them. + ! Therefore, we issue a stream sync here to avoid + !potential mistakes in calling context. + call gpu_linalg_stream_synchronize() + end if + +#else + ! Unused if GPU code disabled + ABI_UNUSED((/lda,ldb,ldc,m,n/)) + ABI_UNUSED((/alpha,beta/)) + ABI_UNUSED((/side,uplo/)) + ABI_UNUSED((/a,b,c/)) +#endif + +end subroutine abi_gpu_zhemm_cptr +!!*** + +subroutine abi_gpu_zhemm_d(side,uplo,m,n,alpha,a,lda,b,ldb,beta,c,ldc) + +!Arguments ------------------------------------ + integer,intent(in) :: lda,ldb,ldc,m,n + complex(dpc),intent(in) :: alpha,beta + character(len=1),intent(in) :: side,uplo + real(dp),intent(in),target :: a(*),b(*) + real(dp),intent(inout),target :: c(*) + +! ********************************************************************* + + if (abi_linalg_gpu_mode == ABI_GPU_DISABLED) then + ABI_BUG("You requested to run on CPU to a GPU wrapper :/") + end if + + if(abi_linalg_gpu_mode == ABI_GPU_LEGACY .or. abi_linalg_gpu_mode == ABI_GPU_KOKKOS) then + call abi_gpu_zhemm_cptr(side,uplo,m,n,alpha,& + c_loc(a),lda,& + c_loc(b),ldb,& + beta,& + c_loc(c),ldc) + else if(abi_linalg_gpu_mode == ABI_GPU_OPENMP) then +#ifdef HAVE_OPENMP_OFFLOAD + !$OMP TARGET DATA USE_DEVICE_PTR(a,b,c) + call abi_gpu_zhemm_cptr(side,uplo,m,n,alpha,& + c_loc(a),lda,& + c_loc(b),ldb,& + beta,& + c_loc(c),ldc) + !$OMP END TARGET DATA +#endif + else + ABI_BUG("Unhandled GPU mode !") + end if + +end subroutine abi_gpu_zhemm_d +!!*** + +subroutine abi_gpu_zhemm_z(side,uplo,m,n,alpha,a,lda,b,ldb,beta,c,ldc) + +!Arguments ------------------------------------ + integer,intent(in) :: lda,ldb,ldc,m,n + complex(dpc),intent(in) :: alpha,beta + character(len=1),intent(in) :: side,uplo + complex(dpc),intent(in),target :: a(*),b(*) + complex(dpc),intent(inout),target :: c(*) + +! ********************************************************************* + + if (abi_linalg_gpu_mode == ABI_GPU_DISABLED) then + ABI_BUG("You requested to run on CPU to a GPU wrapper :/") + end if + + if(abi_linalg_gpu_mode == ABI_GPU_LEGACY .or. abi_linalg_gpu_mode == ABI_GPU_KOKKOS) then + call abi_gpu_zhemm_cptr(side,uplo,m,n,alpha,& + c_loc(a),lda,& + c_loc(b),ldb,& + beta,& + c_loc(c),ldc) + else if(abi_linalg_gpu_mode == ABI_GPU_OPENMP) then +#ifdef HAVE_OPENMP_OFFLOAD + !$OMP TARGET DATA USE_DEVICE_PTR(a,b,c) + call abi_gpu_zhemm_cptr(side,uplo,m,n,alpha,& + c_loc(a),lda,& + c_loc(b),ldb,& + beta,& + c_loc(c),ldc) + !$OMP END TARGET DATA +#endif + else + ABI_BUG("Unhandled GPU mode !") + end if + +end subroutine abi_gpu_zhemm_z +!!*** + +subroutine abi_gpu_zhemm_2d(side,uplo,m,n,alpha,a,lda,b,ldb,beta,c,ldc) + +!Arguments ------------------------------------ + integer,intent(in) :: lda,ldb,ldc,m,n + complex(dpc),intent(in) :: alpha,beta + character(len=1),intent(in) :: side,uplo + real(dp),intent(in),target :: a(lda,*),b(ldb,*) + real(dp),intent(inout),target :: c(ldc,*) + +! ********************************************************************* + + if (abi_linalg_gpu_mode == ABI_GPU_DISABLED) then + ABI_BUG("You requested to run on CPU to a GPU wrapper :/") + end if + + if(abi_linalg_gpu_mode == ABI_GPU_LEGACY .or. abi_linalg_gpu_mode == ABI_GPU_KOKKOS) then + call abi_gpu_zhemm_cptr(side,uplo,m,n,alpha,& + c_loc(a),lda,& + c_loc(b),ldb,& + beta,& + c_loc(c),ldc) + else if(abi_linalg_gpu_mode == ABI_GPU_OPENMP) then +#ifdef HAVE_OPENMP_OFFLOAD + !$OMP TARGET DATA USE_DEVICE_PTR(a,b,c) + call abi_gpu_zhemm_cptr(side,uplo,m,n,alpha,& + c_loc(a),lda,& + c_loc(b),ldb,& + beta,& + c_loc(c),ldc) + !$OMP END TARGET DATA +#endif + else + ABI_BUG("Unhandled GPU mode !") + end if + +end subroutine abi_gpu_zhemm_2d +!!*** + +subroutine abi_gpu_zhemm_2z(side,uplo,m,n,alpha,a,lda,b,ldb,beta,c,ldc) + +!Arguments ------------------------------------ + integer,intent(in) :: lda,ldb,ldc,m,n + complex(dpc),intent(in) :: alpha,beta + character(len=1),intent(in) :: side,uplo + complex(dpc),intent(in),target :: a(lda,*),b(ldb,*) + complex(dpc),intent(inout),target :: c(ldc,*) + +! ********************************************************************* + + if (abi_linalg_gpu_mode == ABI_GPU_DISABLED) then + ABI_BUG("You requested to run on CPU to a GPU wrapper :/") + end if + + if(abi_linalg_gpu_mode == ABI_GPU_LEGACY .or. abi_linalg_gpu_mode == ABI_GPU_KOKKOS) then + call abi_gpu_zhemm_cptr(side,uplo,m,n,alpha,& + c_loc(a),lda,& + c_loc(b),ldb,& + beta,& + c_loc(c),ldc) + else if(abi_linalg_gpu_mode == ABI_GPU_OPENMP) then +#ifdef HAVE_OPENMP_OFFLOAD + !$OMP TARGET DATA USE_DEVICE_PTR(a,b,c) + call abi_gpu_zhemm_cptr(side,uplo,m,n,alpha,& + c_loc(a),lda,& + c_loc(b),ldb,& + beta,& + c_loc(c),ldc) + !$OMP END TARGET DATA +#endif + else + ABI_BUG("Unhandled GPU mode !") + end if + +end subroutine abi_gpu_zhemm_2z +!!*** + +!------------------------------------------------------------------------------ +! abi_gpu_xscal +!------------------------------------------------------------------------------ +!!****f* m_abi_gpu_linalg/abi_gpu_xscal +!! NAME +!! abi_gpu_xscal +!! +!! FUNCTION +!! Compute a BLAS-1 SCAL operation on GPU +!! x = alpha * x +!! +!! INPUTS +!! cplx = 1 if real 2 if complex +!! size = vector size +!! alpha = scalar complex value +!! x_gpu = pointer to gpu memory location of array x +!! incrx = stride between consecutive elements of x +!! +!! SOURCE +subroutine abi_gpu_xscal_cptr(cplx, size, alpha, x, incrx) + + ! !Arguments ------------------------------------ + integer, intent(in) :: cplx + integer, intent(in) :: size + complex(dpc), intent(in) :: alpha + type(c_ptr), intent(in) :: x + integer, intent(in) :: incrx + +! ************************************************************************* + + if (abi_linalg_gpu_mode == ABI_GPU_DISABLED) then + ABI_BUG("You requested to run on CPU to a GPU wrapper :/") + end if + +#ifdef HAVE_GPU + + call gpu_xscal(cplx, size, alpha, x, incrx) + + if (abi_linalg_gpu_mode == ABI_GPU_OPENMP) then + ! CUDA/HIP linalg calls are run asynchronously and OpenMP is unaware of them. + ! Therefore, we issue a stream sync here to avoid + !potential mistakes in calling context. + call gpu_linalg_stream_synchronize() + end if + +#else + ! Unused if GPU code disabled + ABI_UNUSED((/cplx,incrx,size/)) + ABI_UNUSED((/alpha/)) + ABI_UNUSED((/x/)) +#endif + +end subroutine abi_gpu_xscal_cptr +!!*** + +subroutine abi_gpu_xscal_d(cplx, size, alpha, x, incrx) + + ! !Arguments ------------------------------------ + integer, intent(in) :: cplx + integer, intent(in) :: size + complex(dpc), intent(in) :: alpha + real(dp), intent(inout), target :: x(*) + integer, intent(in) :: incrx + +! ************************************************************************* + + if (abi_linalg_gpu_mode == ABI_GPU_DISABLED) then + ABI_BUG("You requested to run on CPU to a GPU wrapper :/") + end if + + if(abi_linalg_gpu_mode == ABI_GPU_LEGACY .or. abi_linalg_gpu_mode == ABI_GPU_KOKKOS) then + call abi_gpu_xscal_cptr(cplx, size, alpha, c_loc(x), incrx) + else if(abi_linalg_gpu_mode == ABI_GPU_OPENMP) then +#ifdef HAVE_OPENMP_OFFLOAD + !$OMP TARGET DATA USE_DEVICE_PTR(x) + call abi_gpu_xscal_cptr(cplx, size, alpha, c_loc(x), incrx) + !$OMP END TARGET DATA +#endif + else + ABI_BUG("Unhandled GPU mode !") + end if + +end subroutine abi_gpu_xscal_d +!!*** + +subroutine abi_gpu_xscal_z(cplx, size, alpha, x, incrx) + + ! !Arguments ------------------------------------ + integer, intent(in) :: cplx + integer, intent(in) :: size + complex(dpc), intent(in) :: alpha + complex(dpc), intent(inout), target :: x(*) + integer, intent(in) :: incrx + +! ************************************************************************* + + if (abi_linalg_gpu_mode == ABI_GPU_DISABLED) then + ABI_BUG("You requested to run on CPU to a GPU wrapper :/") + end if + + if(abi_linalg_gpu_mode == ABI_GPU_LEGACY .or. abi_linalg_gpu_mode == ABI_GPU_KOKKOS) then + call abi_gpu_xscal_cptr(cplx, size, alpha, c_loc(x), incrx) + else if(abi_linalg_gpu_mode == ABI_GPU_OPENMP) then +#ifdef HAVE_OPENMP_OFFLOAD + !$OMP TARGET DATA USE_DEVICE_PTR(x) + call abi_gpu_xscal_cptr(cplx, size, alpha, c_loc(x), incrx) + !$OMP END TARGET DATA +#endif + else + ABI_BUG("Unhandled GPU mode !") + end if + +end subroutine abi_gpu_xscal_z +!!*** + +subroutine abi_gpu_xscal_2d(cplx, size, alpha, x, incrx) + + ! !Arguments ------------------------------------ + integer, intent(in) :: cplx + integer, intent(in) :: size + complex(dpc), intent(in) :: alpha + real(dp), intent(inout), target :: x(size,*) + integer, intent(in) :: incrx + +! ************************************************************************* + + if (abi_linalg_gpu_mode == ABI_GPU_DISABLED) then + ABI_BUG("You requested to run on CPU to a GPU wrapper :/") + end if + + if(abi_linalg_gpu_mode == ABI_GPU_LEGACY .or. abi_linalg_gpu_mode == ABI_GPU_KOKKOS) then + call abi_gpu_xscal_cptr(cplx, size, alpha, c_loc(x), incrx) + else if(abi_linalg_gpu_mode == ABI_GPU_OPENMP) then +#ifdef HAVE_OPENMP_OFFLOAD + !$OMP TARGET DATA USE_DEVICE_PTR(x) + call abi_gpu_xscal_cptr(cplx, size, alpha, c_loc(x), incrx) + !$OMP END TARGET DATA +#endif + else + ABI_BUG("Unhandled GPU mode !") + end if + +end subroutine abi_gpu_xscal_2d +!!*** + +subroutine abi_gpu_xscal_2z(cplx, size, alpha, x, incrx) + + ! !Arguments ------------------------------------ + integer, intent(in) :: cplx + integer, intent(in) :: size + complex(dpc), intent(in) :: alpha + complex(dpc), intent(inout), target :: x(size,*) + integer, intent(in) :: incrx + +! ************************************************************************* + + if (abi_linalg_gpu_mode == ABI_GPU_DISABLED) then + ABI_BUG("You requested to run on CPU to a GPU wrapper :/") + end if + + if(abi_linalg_gpu_mode == ABI_GPU_LEGACY .or. abi_linalg_gpu_mode == ABI_GPU_KOKKOS) then + call abi_gpu_xscal_cptr(cplx, size, alpha, c_loc(x), incrx) + else if(abi_linalg_gpu_mode == ABI_GPU_OPENMP) then +#ifdef HAVE_OPENMP_OFFLOAD + !$OMP TARGET DATA USE_DEVICE_PTR(x) + call abi_gpu_xscal_cptr(cplx, size, alpha, c_loc(x), incrx) + !$OMP END TARGET DATA +#endif + else + ABI_BUG("Unhandled GPU mode !") + end if + +end subroutine abi_gpu_xscal_2z +!!*** + +!------------------------------------------------------------------------------ +! abi_gpu_xaxpy +!------------------------------------------------------------------------------ + +!!****f* m_abi_gpu_linalg/abi_gpu_xaxpy +!! NAME +!! abi_gpu_xaxpy +!! +!! FUNCTION +!! Compute a BLAS-1 AXPY operation on GPU +!! y = alpha * x + y +!! +!! INPUTS +!! cplx = 1 if real 2 if complex +!! size = vector size +!! alpha = scalar complex value +!! x_gpu = pointer to gpu memory location of array x +!! incrx = stride between consecutive elements of x +!! y_gpu = pointer to gpu memory location of array y +!! incry = stride between consecutive elements of y +!! +!! SOURCE +subroutine abi_gpu_xaxpy_cptr(cplx, size, alpha, x, incrx, y, incry) + + ! !Arguments ------------------------------------ + integer, intent(in) :: cplx + integer, intent(in) :: size + complex(dpc), intent(in) :: alpha + type(c_ptr), intent(in) :: x + integer, intent(in) :: incrx + type(c_ptr), intent(in) :: y + integer, intent(in) :: incry + +! ************************************************************************* + + if (abi_linalg_gpu_mode == ABI_GPU_DISABLED) then + ABI_BUG("You requested to run on CPU to a GPU wrapper :/") + end if + +#ifdef HAVE_GPU + + call gpu_xaxpy(cplx, size, alpha, x, incrx, y, incry) + + if (abi_linalg_gpu_mode == ABI_GPU_OPENMP) then + ! CUDA/HIP linalg calls are run asynchronously and OpenMP is unaware of them. + ! Therefore, we issue a stream sync here to avoid + !potential mistakes in calling context. + call gpu_linalg_stream_synchronize() + end if + +#else + ! Unused if GPU code disabled + ABI_UNUSED((/cplx,incrx,incry,size/)) + ABI_UNUSED((/alpha/)) + ABI_UNUSED((/x,y/)) +#endif + +end subroutine abi_gpu_xaxpy_cptr +!!*** + +subroutine abi_gpu_xaxpy_d(cplx, size, alpha, x, incrx, y, incry) + + ! !Arguments ------------------------------------ + integer, intent(in) :: cplx + integer, intent(in) :: size + complex(dpc), intent(in) :: alpha + real(dp), intent(in), target :: x(*) + integer, intent(in) :: incrx + real(dp), intent(inout), target :: y(*) + integer, intent(in) :: incry + +! ************************************************************************* + + if (abi_linalg_gpu_mode == ABI_GPU_DISABLED) then + ABI_BUG("You requested to run on CPU to a GPU wrapper :/") + end if + + if(abi_linalg_gpu_mode == ABI_GPU_LEGACY .or. abi_linalg_gpu_mode == ABI_GPU_KOKKOS) then + call abi_gpu_xaxpy_cptr(cplx, size, alpha, c_loc(x), incrx, c_loc(y), incry) + else if(abi_linalg_gpu_mode == ABI_GPU_OPENMP) then +#ifdef HAVE_OPENMP_OFFLOAD + !$OMP TARGET DATA USE_DEVICE_PTR(x,y) + call abi_gpu_xaxpy_cptr(cplx, size, alpha, c_loc(x), incrx, c_loc(y), incry) + !$OMP END TARGET DATA +#endif + else + ABI_BUG("Unhandled GPU mode !") + end if + +end subroutine abi_gpu_xaxpy_d +!!*** + +subroutine abi_gpu_xaxpy_z(cplx, size, alpha, x, incrx, y, incry) + + ! !Arguments ------------------------------------ + integer, intent(in) :: cplx + integer, intent(in) :: size + complex(dpc), intent(in) :: alpha + complex(dpc), intent(in), target :: x(*) + integer, intent(in) :: incrx + complex(dpc), intent(inout), target :: y(*) + integer, intent(in) :: incry + +! ************************************************************************* + + if (abi_linalg_gpu_mode == ABI_GPU_DISABLED) then + ABI_BUG("You requested to run on CPU to a GPU wrapper :/") + end if + + if(abi_linalg_gpu_mode == ABI_GPU_LEGACY .or. abi_linalg_gpu_mode == ABI_GPU_KOKKOS) then + call abi_gpu_xaxpy_cptr(cplx, size, alpha, c_loc(x), incrx, c_loc(y), incry) + else if(abi_linalg_gpu_mode == ABI_GPU_OPENMP) then +#ifdef HAVE_OPENMP_OFFLOAD + !$OMP TARGET DATA USE_DEVICE_PTR(x,y) + call abi_gpu_xaxpy_cptr(cplx, size, alpha, c_loc(x), incrx, c_loc(y), incry) + !$OMP END TARGET DATA +#endif + else + ABI_BUG("Unhandled GPU mode !") + end if + +end subroutine abi_gpu_xaxpy_z +!!*** + +subroutine abi_gpu_xaxpy_2d(cplx, size, alpha, x, incrx, y, incry) + + ! !Arguments ------------------------------------ + integer, intent(in) :: cplx + integer, intent(in) :: size + complex(dpc), intent(in) :: alpha + real(dp), intent(in), target :: x(size,*) + integer, intent(in) :: incrx + real(dp), intent(inout), target :: y(size,*) + integer, intent(in) :: incry + +! ************************************************************************* + + if (abi_linalg_gpu_mode == ABI_GPU_DISABLED) then + ABI_BUG("You requested to run on CPU to a GPU wrapper :/") + end if + + if(abi_linalg_gpu_mode == ABI_GPU_LEGACY .or. abi_linalg_gpu_mode == ABI_GPU_KOKKOS) then + call abi_gpu_xaxpy_cptr(cplx, size, alpha, c_loc(x), incrx, c_loc(y), incry) + else if(abi_linalg_gpu_mode == ABI_GPU_OPENMP) then +#ifdef HAVE_OPENMP_OFFLOAD + !$OMP TARGET DATA USE_DEVICE_PTR(x,y) + call abi_gpu_xaxpy_cptr(cplx, size, alpha, c_loc(x), incrx, c_loc(y), incry) + !$OMP END TARGET DATA +#endif + else + ABI_BUG("Unhandled GPU mode !") + end if + +end subroutine abi_gpu_xaxpy_2d +!!*** + +subroutine abi_gpu_xaxpy_2z(cplx, size, alpha, x, incrx, y, incry) + + ! !Arguments ------------------------------------ + integer, intent(in) :: cplx + integer, intent(in) :: size + complex(dpc), intent(in) :: alpha + complex(dpc), intent(in), target :: x(size,*) + integer, intent(in) :: incrx + complex(dpc), intent(inout), target :: y(size,*) + integer, intent(in) :: incry + +! ************************************************************************* + + if (abi_linalg_gpu_mode == ABI_GPU_DISABLED) then + ABI_BUG("You requested to run on CPU to a GPU wrapper :/") + end if + + if(abi_linalg_gpu_mode == ABI_GPU_LEGACY .or. abi_linalg_gpu_mode == ABI_GPU_KOKKOS) then + call abi_gpu_xaxpy_cptr(cplx, size, alpha, c_loc(x), incrx, c_loc(y), incry) + else if(abi_linalg_gpu_mode == ABI_GPU_OPENMP) then +#ifdef HAVE_OPENMP_OFFLOAD + !$OMP TARGET DATA USE_DEVICE_PTR(x,y) + call abi_gpu_xaxpy_cptr(cplx, size, alpha, c_loc(x), incrx, c_loc(y), incry) + !$OMP END TARGET DATA +#endif + else + ABI_BUG("Unhandled GPU mode !") + end if + +end subroutine abi_gpu_xaxpy_2z +!!*** + +!------------------------------------------------------------------------------ +! abi_gpu_xcopy +!------------------------------------------------------------------------------ + +!!****f* m_abi_gpu_linalg/abi_gpu_xcopy +!! NAME +!! abi_gpu_xcopy +!! +!! FUNCTION +!! Compute a BLAS-1 COPY operation on GPU +!! y = x (copy x into y) +!! +!! INPUTS +!! cplx = 1 if real 2 if complex +!! size = input vector size +!! x = pointer to gpu memory location of array x +!! incrx = stride between consecutive elements of x +!! y = pointer to gpu memory location of array y +!! incry = stride between consecutive elements of y +!! +!! SOURCE +subroutine abi_gpu_xcopy_cptr(cplx, size, x, incrx, y, incry) + + ! !Arguments ------------------------------------ + integer, intent(in) :: cplx + integer, intent(in) :: size + type(c_ptr), intent(in) :: x + integer, intent(in) :: incrx + type(c_ptr), intent(in) :: y + integer, intent(in) :: incry + +! ************************************************************************* + + if (abi_linalg_gpu_mode == ABI_GPU_DISABLED) then + ABI_BUG("You requested to run on CPU to a GPU wrapper :/") + end if + +#ifdef HAVE_GPU + + call gpu_xcopy(cplx, size, x, incrx, y, incry) + + if (abi_linalg_gpu_mode == ABI_GPU_OPENMP) then + ! CUDA/HIP linalg calls are run asynchronously and OpenMP is unaware of them. + ! Therefore, we issue a stream sync here to avoid + !potential mistakes in calling context. + call gpu_linalg_stream_synchronize() + end if + +#else + ! Unused if GPU code disabled + ABI_UNUSED((/cplx,incrx,incry,size/)) + ABI_UNUSED((/x,y/)) +#endif + +end subroutine abi_gpu_xcopy_cptr +!!*** + +subroutine abi_gpu_xcopy_d(cplx, size, x, incrx, y, incry) + + ! !Arguments ------------------------------------ + integer, intent(in) :: cplx + integer, intent(in) :: size + real(dp), intent(in),target :: x(*) + integer, intent(in) :: incrx + real(dp), intent(inout),target :: y(*) + integer, intent(in) :: incry + +! ************************************************************************* + + if (abi_linalg_gpu_mode == ABI_GPU_DISABLED) then + ABI_BUG("You requested to run on CPU to a GPU wrapper :/") + end if + + if(abi_linalg_gpu_mode == ABI_GPU_LEGACY .or. abi_linalg_gpu_mode == ABI_GPU_KOKKOS) then + call abi_gpu_xcopy_cptr(cplx, size, c_loc(x), incrx, c_loc(y), incry) + else if(abi_linalg_gpu_mode == ABI_GPU_OPENMP) then +#ifdef HAVE_OPENMP_OFFLOAD + !$OMP TARGET DATA USE_DEVICE_PTR(x,y) + call abi_gpu_xcopy_cptr(cplx, size, c_loc(x), incrx, c_loc(y), incry) + !$OMP END TARGET DATA +#endif + else + ABI_BUG("Unhandled GPU mode !") + end if + +end subroutine abi_gpu_xcopy_d +!!*** + +subroutine abi_gpu_xcopy_z(cplx, size, x, incrx, y, incry) + + ! !Arguments ------------------------------------ + integer, intent(in) :: cplx + integer, intent(in) :: size + complex(dpc), intent(in),target :: x(*) + integer, intent(in) :: incrx + complex(dpc), intent(inout),target :: y(*) + integer, intent(in) :: incry + +! ************************************************************************* + + if (abi_linalg_gpu_mode == ABI_GPU_DISABLED) then + ABI_BUG("You requested to run on CPU to a GPU wrapper :/") + end if + + if(abi_linalg_gpu_mode == ABI_GPU_LEGACY .or. abi_linalg_gpu_mode == ABI_GPU_KOKKOS) then + call abi_gpu_xcopy_cptr(cplx, size, c_loc(x), incrx, c_loc(y), incry) + else if(abi_linalg_gpu_mode == ABI_GPU_OPENMP) then +#ifdef HAVE_OPENMP_OFFLOAD + !$OMP TARGET DATA USE_DEVICE_PTR(x,y) + call abi_gpu_xcopy_cptr(cplx, size, c_loc(x), incrx, c_loc(y), incry) + !$OMP END TARGET DATA +#endif + else + ABI_BUG("Unhandled GPU mode !") + end if + +end subroutine abi_gpu_xcopy_z +!!*** + +subroutine abi_gpu_xcopy_2d(cplx, size, x, incrx, y, incry) + + ! !Arguments ------------------------------------ + integer, intent(in) :: cplx + integer, intent(in) :: size + real(dp), intent(in),target :: x(size,*) + integer, intent(in) :: incrx + real(dp), intent(inout),target :: y(size,*) + integer, intent(in) :: incry + +! ************************************************************************* + + if (abi_linalg_gpu_mode == ABI_GPU_DISABLED) then + ABI_BUG("You requested to run on CPU to a GPU wrapper :/") + end if + + if(abi_linalg_gpu_mode == ABI_GPU_LEGACY .or. abi_linalg_gpu_mode == ABI_GPU_KOKKOS) then + call abi_gpu_xcopy_cptr(cplx, size, c_loc(x), incrx, c_loc(y), incry) + else if(abi_linalg_gpu_mode == ABI_GPU_OPENMP) then +#ifdef HAVE_OPENMP_OFFLOAD + !$OMP TARGET DATA USE_DEVICE_PTR(x,y) + call abi_gpu_xcopy_cptr(cplx, size, c_loc(x), incrx, c_loc(y), incry) + !$OMP END TARGET DATA +#endif + else + ABI_BUG("Unhandled GPU mode !") + end if + +end subroutine abi_gpu_xcopy_2d +!!*** + +subroutine abi_gpu_xcopy_2z(cplx, size, x, incrx, y, incry) + + ! !Arguments ------------------------------------ + integer, intent(in) :: cplx + integer, intent(in) :: size + complex(dpc), intent(in),target :: x(size,*) + integer, intent(in) :: incrx + complex(dpc), intent(inout),target :: y(size,*) + integer, intent(in) :: incry + +! ************************************************************************* + + if (abi_linalg_gpu_mode == ABI_GPU_DISABLED) then + ABI_BUG("You requested to run on CPU to a GPU wrapper :/") + end if + + if(abi_linalg_gpu_mode == ABI_GPU_LEGACY .or. abi_linalg_gpu_mode == ABI_GPU_KOKKOS) then + call abi_gpu_xcopy_cptr(cplx, size, c_loc(x), incrx, c_loc(y), incry) + else if(abi_linalg_gpu_mode == ABI_GPU_OPENMP) then +#ifdef HAVE_OPENMP_OFFLOAD + !$OMP TARGET DATA USE_DEVICE_PTR(x,y) + call abi_gpu_xcopy_cptr(cplx, size, c_loc(x), incrx, c_loc(y), incry) + !$OMP END TARGET DATA +#endif + else + ABI_BUG("Unhandled GPU mode !") + end if + +end subroutine abi_gpu_xcopy_2z +!!*** + +!------------------------------------------------------------------------------ +! abi_gpu_xtrsm +!------------------------------------------------------------------------------ + +!!****f* m_abi_gpu_linalg/abi_gpu_xtrsm +!! NAME +!! abi_gpu_xtrsm +!! +!! FUNCTION +!! Solves a matrix equation (one matrix operand is triangular) on GPU. +!! The xtrsm routines solve one of the following matrix equations +!! op(a)*x = alpha*b +!! or +!! x*op(a) = alpha*b, +!! +!! INPUTS +!! cplx= 1 if real 2 if complex +!! side= Specifies whether op(a) appears on the left or right of x for +!! the operation to be performed as follows: +!! L or l op(a)*x = alpha*b +!! R or r x*op(a) = alpha*b +!! uplo= Specifies whether the matrix a is an upper or lower triangular +!! matrix as follows: +!! U or u Matrix a is an upper triangular matrix. +!! L or l Matrix a is a lower triangular matrix +!! transa= Specifies the form of op(a) to be used in the matrix +!! multiplication as follows: +!! N or n op(a) = a +!! T or t op(a) = a' +!! C or c op(a) = conjg(a') +!! diag= Specifies whether or not a is unit triangular as follows: +!! U or u Matrix a is assumed to be unit triangular. +!! N or n Matrix a is not assumed to be unit triangular. +!! m= Specifies the number of rows of b. The value of m must be at least zero +!! n= Specifies the number of columns of b. The value of n must be at least zero +!! alpha= Specifies the scalar alpha. When alpha is zero, then a is not referenced and b +!! need not be set before entry. +!! a = pointer to gpu memory location of array a, DIMENSION (lda, k), where k is m when side = 'L' or 'l' and is n +!! when side = 'R' or 'r'. +!! lda= Specifies the first dimension of a as declared in the calling +!! (sub)program. When side = 'L' or 'l', then lda must be at least max(1, +!! m), when side = 'R' or 'r', then lda must be at least max(1, n). +!! b = pointer to gpu memory location of b Array, DIMENSION (ldb,n). Before entry, the leading m-by-n part of the array +!! b must contain the right-hand side matrix b. +!! ldb= Specifies the first dimension of b as declared in the calling +!! (sub)program. The value of ldb must be at least max(1, m). +!! +!! OUTPUT +!! b +!! +!! SIDE EFFECTS +!! WARNING! : this routine is a dummy one when HAVE_GPU_CUDA is not enabled +!! the correct one is in 17_toolbox/gpu_linalg.cu +!! +!! SOURCE +subroutine abi_gpu_xtrsm_cptr(cplx,side,uplo,transa,diag,m,n,alpha,a,lda,b,ldb) + +! !Arguments ------------------------------------ + integer, intent(in) :: cplx,lda,ldb,m,n + complex(dpc), intent(in) :: alpha + character(len=1), intent(in) :: side,uplo,transa,diag + type(c_ptr),intent(in) :: a + type(c_ptr),intent(in) :: b + +! ********************************************************************* + + if (abi_linalg_gpu_mode == ABI_GPU_DISABLED) then + ABI_BUG("You requested to run on CPU to a GPU wrapper :/") + end if + +#ifdef HAVE_GPU + + call gpu_xtrsm(cplx,side,uplo,transa,diag,m,n,alpha,a,lda,b,ldb) + + if (abi_linalg_gpu_mode == ABI_GPU_OPENMP) then + ! CUDA/HIP linalg calls are run asynchronously and OpenMP is unaware of them. + ! Therefore, we issue a stream sync here to avoid + !potential mistakes in calling context. + call gpu_linalg_stream_synchronize() + end if + +#else + ! Unused if GPU code disabled + ABI_UNUSED((/cplx,lda,ldb,m,n/)) + ABI_UNUSED((/alpha/)) + ABI_UNUSED((/side,uplo,transa,diag/)) + ABI_UNUSED((/a,b/)) +#endif + +end subroutine abi_gpu_xtrsm_cptr +!!*** + +subroutine abi_gpu_xtrsm_d(cplx,side,uplo,transa,diag,m,n,alpha,a,lda,b,ldb) + +! !Arguments ------------------------------------ + integer, intent(in) :: cplx,lda,ldb,m,n + complex(dpc), intent(in) :: alpha + character(len=1), intent(in) :: side,uplo,transa,diag + real(dp), intent(in),target :: a(*) + real(dp), intent(inout),target :: b(*) + +! ********************************************************************* + + if (abi_linalg_gpu_mode == ABI_GPU_DISABLED) then + ABI_BUG("You requested to run on CPU to a GPU wrapper :/") + end if + + if(abi_linalg_gpu_mode == ABI_GPU_LEGACY .or. abi_linalg_gpu_mode == ABI_GPU_KOKKOS) then + call abi_gpu_xtrsm_cptr(cplx,side,uplo,transa,& + diag,m,n,alpha,c_loc(a),lda,c_loc(b),ldb) + else if(abi_linalg_gpu_mode == ABI_GPU_OPENMP) then +#ifdef HAVE_OPENMP_OFFLOAD + !$OMP TARGET DATA USE_DEVICE_PTR(a,b) + call abi_gpu_xtrsm_cptr(cplx,side,uplo,transa,& + diag,m,n,alpha,c_loc(a),lda,c_loc(b),ldb) + !$OMP END TARGET DATA +#endif + else + ABI_BUG("Unhandled GPU mode !") + end if + +end subroutine abi_gpu_xtrsm_d +!!*** + +subroutine abi_gpu_xtrsm_z(cplx,side,uplo,transa,diag,m,n,alpha,a,lda,b,ldb) + +! !Arguments ------------------------------------ + integer, intent(in) :: cplx,lda,ldb,m,n + complex(dpc), intent(in) :: alpha + character(len=1), intent(in) :: side,uplo,transa,diag + complex(dpc),intent(in),target :: a(*) + complex(dpc),intent(inout),target :: b(*) + +! ********************************************************************* + + if (abi_linalg_gpu_mode == ABI_GPU_DISABLED) then + ABI_BUG("You requested to run on CPU to a GPU wrapper :/") + end if + + if(abi_linalg_gpu_mode == ABI_GPU_LEGACY .or. abi_linalg_gpu_mode == ABI_GPU_KOKKOS) then + call abi_gpu_xtrsm_cptr(cplx,side,uplo,transa,& + diag,m,n,alpha,c_loc(a),lda,c_loc(b),ldb) + else if(abi_linalg_gpu_mode == ABI_GPU_OPENMP) then +#ifdef HAVE_OPENMP_OFFLOAD + !$OMP TARGET DATA USE_DEVICE_PTR(a,b) + call abi_gpu_xtrsm_cptr(cplx,side,uplo,transa,& + diag,m,n,alpha,c_loc(a),lda,c_loc(b),ldb) + !$OMP END TARGET DATA +#endif + else + ABI_BUG("Unhandled GPU mode !") + end if + +end subroutine abi_gpu_xtrsm_z +!!*** + +subroutine abi_gpu_xtrsm_2d(cplx,side,uplo,transa,diag,m,n,alpha,a,lda,b,ldb) + +! !Arguments ------------------------------------ + integer, intent(in) :: cplx,lda,ldb,m,n + complex(dpc), intent(in) :: alpha + character(len=1), intent(in) :: side,uplo,transa,diag + real(dp), intent(in),target :: a(lda,*) + real(dp), intent(inout),target :: b(ldb,*) + +! ********************************************************************* + + if (abi_linalg_gpu_mode == ABI_GPU_DISABLED) then + ABI_BUG("You requested to run on CPU to a GPU wrapper :/") + end if + + if(abi_linalg_gpu_mode == ABI_GPU_LEGACY .or. abi_linalg_gpu_mode == ABI_GPU_KOKKOS) then + call abi_gpu_xtrsm_cptr(cplx,side,uplo,transa,& + diag,m,n,alpha,c_loc(a),lda,c_loc(b),ldb) + else if(abi_linalg_gpu_mode == ABI_GPU_OPENMP) then +#ifdef HAVE_OPENMP_OFFLOAD + !$OMP TARGET DATA USE_DEVICE_PTR(a,b) + call abi_gpu_xtrsm_cptr(cplx,side,uplo,transa,& + diag,m,n,alpha,c_loc(a),lda,c_loc(b),ldb) + !$OMP END TARGET DATA +#endif + else + ABI_BUG("Unhandled GPU mode !") + end if + +end subroutine abi_gpu_xtrsm_2d +!!*** + +subroutine abi_gpu_xtrsm_2z(cplx,side,uplo,transa,diag,m,n,alpha,a,lda,b,ldb) + +! !Arguments ------------------------------------ + integer, intent(in) :: cplx,lda,ldb,m,n + complex(dpc), intent(in) :: alpha + character(len=1), intent(in) :: side,uplo,transa,diag + complex(dpc),intent(in),target :: a(lda,*) + complex(dpc),intent(inout),target :: b(ldb,*) + +! ********************************************************************* + + if (abi_linalg_gpu_mode == ABI_GPU_DISABLED) then + ABI_BUG("You requested to run on CPU to a GPU wrapper :/") + end if + + if(abi_linalg_gpu_mode == ABI_GPU_LEGACY .or. abi_linalg_gpu_mode == ABI_GPU_KOKKOS) then + call abi_gpu_xtrsm_cptr(cplx,side,uplo,transa,& + diag,m,n,alpha,c_loc(a),lda,c_loc(b),ldb) + else if(abi_linalg_gpu_mode == ABI_GPU_OPENMP) then +#ifdef HAVE_OPENMP_OFFLOAD + !$OMP TARGET DATA USE_DEVICE_PTR(a,b) + call abi_gpu_xtrsm_cptr(cplx,side,uplo,transa,& + diag,m,n,alpha,c_loc(a),lda,c_loc(b),ldb) + !$OMP END TARGET DATA +#endif + else + ABI_BUG("Unhandled GPU mode !") + end if + +end subroutine abi_gpu_xtrsm_2z +!!*** + + +!!****f* m_abi_gpu_linalg/abi_gpu_work_resizeI +!! +!! NAME +!! abi_gpu_work_resizeI +subroutine abi_gpu_work_resizeI(array,array_managed,current_dim,asked_dim) + + integer, allocatable, intent(inout) :: array(:) + integer(kind=c_int32_t), ABI_CONTIGUOUS pointer, intent(inout) :: array_managed(:) + integer, intent(inout) :: current_dim + integer, intent(in ) :: asked_dim + +! ************************************************************************* + + if(abi_linalg_gpu_mode == ABI_GPU_LEGACY .or. abi_linalg_gpu_mode == ABI_GPU_KOKKOS) then + +#ifdef HAVE_YAKL + if ( current_dim < asked_dim ) then + current_dim = asked_dim + if ( associated(array_managed) ) then + ABI_FREE_MANAGED(array_managed) + end if + ABI_MALLOC_MANAGED(array_managed,(/asked_dim/)) + end if +#endif + + else if(abi_linalg_gpu_mode == ABI_GPU_OPENMP) then + +#ifdef HAVE_OPENMP_OFFLOAD + if ( current_dim < asked_dim ) then + current_dim = asked_dim + if ( allocated(array) ) then + !$OMP TARGET EXIT DATA MAP(release:array) + ABI_FREE(array) + end if + ABI_MALLOC(array,(asked_dim)) + !$OMP TARGET ENTER DATA MAP(alloc:array) + end if +#endif + + else + ABI_BUG("Unhandled GPU mode !") + end if + +#ifndef HAVE_GPU + ! Unused if GPU code disabled + ABI_UNUSED(array) + ABI_UNUSED(array_managed) + ABI_UNUSED((/current_dim,asked_dim/)) +#endif + +end subroutine abi_gpu_work_resizeI +!!*** + +!!****f* m_abi_gpu_linalg/abi_gpu_work_resizeR +!! +!! NAME +!! abi_gpu_work_resizeR + +subroutine abi_gpu_work_resizeR(array,array_managed,current_dim,asked_dim) + + double precision, allocatable, intent(inout) :: array(:) + real(kind=c_double), ABI_CONTIGUOUS pointer, intent(inout) :: array_managed(:) + integer, intent(inout) :: current_dim + integer, intent(in ) :: asked_dim + +! ************************************************************************* + + if(abi_linalg_gpu_mode == ABI_GPU_LEGACY .or. abi_linalg_gpu_mode == ABI_GPU_KOKKOS) then + +#ifdef HAVE_YAKL + if ( current_dim < asked_dim ) then + current_dim = asked_dim + if ( associated(array_managed) ) then + ABI_FREE_MANAGED(array_managed) + end if + ABI_MALLOC_MANAGED(array_managed,(/asked_dim/)) + end if +#endif + + else if(abi_linalg_gpu_mode == ABI_GPU_OPENMP) then + +#ifdef HAVE_OPENMP_OFFLOAD + if ( current_dim < asked_dim ) then + current_dim = asked_dim + if ( allocated(array) ) then + !$OMP TARGET EXIT DATA MAP(release:array) + ABI_FREE(array) + end if + ABI_MALLOC(array,(asked_dim)) + !$OMP TARGET ENTER DATA MAP(alloc:array) + end if +#endif + + else + ABI_BUG("Unhandled GPU mode !") + end if + +#ifndef HAVE_GPU + ! Unused if GPU code disabled + ABI_UNUSED(array) + ABI_UNUSED(array_managed) + ABI_UNUSED((/current_dim,asked_dim/)) +#endif + +end subroutine abi_gpu_work_resizeR +!!*** + +!!****f* m_abi_gpu_linalg/abi_gpu_work_resizeC +!! +!! NAME +!! abi_gpu_work_resizeC + +subroutine abi_gpu_work_resizeC(array,array_managed,current_dim,asked_dim) + + complex(kind=8), allocatable, intent(inout) :: array(:) + complex(kind=c_double_complex), ABI_CONTIGUOUS pointer, intent(inout) :: array_managed(:) + integer, intent(inout) :: current_dim + integer, intent(in ) :: asked_dim + +! ************************************************************************* + + if(abi_linalg_gpu_mode == ABI_GPU_LEGACY .or. abi_linalg_gpu_mode == ABI_GPU_KOKKOS) then + +#ifdef HAVE_YAKL + if ( current_dim < asked_dim ) then + current_dim = asked_dim + if ( associated(array_managed) ) then + ABI_FREE_MANAGED(array_managed) + end if + ABI_MALLOC_MANAGED(array_managed,(/asked_dim/)) + end if +#endif + + else if(abi_linalg_gpu_mode == ABI_GPU_OPENMP) then + +#ifdef HAVE_OPENMP_OFFLOAD + if ( current_dim < asked_dim ) then + current_dim = asked_dim + if ( allocated(array) ) then + !$OMP TARGET EXIT DATA MAP(release:array) + ABI_FREE(array) + end if + ABI_MALLOC(array,(asked_dim)) + !$OMP TARGET ENTER DATA MAP(alloc:array) + end if +#endif + + else + ABI_BUG("Unhandled GPU mode !") + end if + +#ifndef HAVE_GPU + ! Unused if GPU code disabled + ABI_UNUSED(array) + ABI_UNUSED(array_managed) + ABI_UNUSED((/current_dim,asked_dim/)) +#endif + +end subroutine abi_gpu_work_resizeC +!!*** + +!!****f* m_abi_gpu_linalg/abi_gpu_work_resizeCptr +!! +!! NAME +!! abi_gpu_work_resizeCptr + +subroutine abi_gpu_work_resizeCptr(array,current_dim,asked_dim) + + type(c_ptr), intent(inout) :: array + integer(c_size_t), intent(inout) :: current_dim + integer(c_size_t), intent(in ) :: asked_dim + +! ************************************************************************* + + if ( current_dim < asked_dim ) then + if(current_dim == 0) then + call dealloc_on_gpu(array) + end if + current_dim = asked_dim + call alloc_on_gpu(array, asked_dim) + end if + +#ifndef HAVE_GPU + ! Unused if GPU code disabled + ABI_UNUSED(array) + ABI_UNUSED((/current_dim,asked_dim/)) +#endif + +end subroutine abi_gpu_work_resizeCptr +!!*** + +subroutine abi_gpu_work_finalize() + +#ifdef HAVE_GPU + !FIXME Assuming managed here ? + if(abi_linalg_gpu_mode == ABI_GPU_LEGACY .or. abi_linalg_gpu_mode == ABI_GPU_KOKKOS) then + +#ifdef HAVE_YAKL + if ( associated(i_work_managed) ) then + ABI_FREE_MANAGED(i_work_managed) + end if + if ( associated(r_work_managed) ) then + ABI_FREE_MANAGED(r_work_managed) + end if + if ( associated(c_work_managed) ) then + ABI_FREE_MANAGED(c_work_managed) + end if +#endif + + else if(abi_linalg_gpu_mode == ABI_GPU_OPENMP) then + +#ifdef HAVE_OPENMP_OFFLOAD + if ( allocated(i_work) ) then + !$OMP TARGET EXIT DATA MAP(release:i_work) + ABI_FREE(i_work) + end if + if ( allocated(r_work) ) then + !$OMP TARGET EXIT DATA MAP(release:r_work) + ABI_FREE(r_work) + end if + if ( allocated(c_work) ) then + !$OMP TARGET EXIT DATA MAP(release:c_work) + ABI_FREE(c_work) + end if +#endif + + if(gpu_work_len > 0) then + call dealloc_on_gpu(gpu_work) + end if + + end if + + i_work_len = 0 + r_work_len = 0 + c_work_len = 0 + gpu_work_len = 0 + +#endif + +end subroutine abi_gpu_work_finalize +!!*** + +!------------------------------------------------------------------------------ +! abi_gpu_xhegvd +!------------------------------------------------------------------------------ + +!!****f* m_abi_gpu_linalg/abi_gpu_xhegvd +!! NAME +!! abi_gpu_xhegvd +!! +!! FUNCTION +!! Compute a LAPACK SYGVD operation on GPU +!! compute eigen values/vectors of a real generalized +!! symmetric-definite eigenproblem +!! +!! See cusolver documentation +!! https://docs.nvidia.com/cuda/cusolver/index.html#cuSolverDN-lt-t-gt-hegvd +!! +!! See also LAPACK doc in reference implementation: +!! https://github.com/Reference-LAPACK/lapack/blob/master/SRC/dhegvd.f +!! +!! INPUTS +!! cplx = 1 if real 2 if complex +!! itype = integer, type of problem +!! jobz = character, 'n'(eigenvalues only) or 'v' (eigenvalues + eigenvectors) +!! uplo = character, 'u' or 'l' +!! A_nrows = matrix size +!! A = pointer to gpu memory location of matrix A +!! lda = leading dimension of matrix A +!! B = pointer to gpu memory location of matrix B +!! ldb = leading dimension of matrix B +!! W = pointer to gpu memory location of matrix W (output eigen values) +!! devInfo = +!! +!! SOURCE +subroutine abi_gpu_xhegvd_cptr(cplx, itype, jobz, uplo, A_nrows, & + A, lda, & + B, ldb, & + W, & + devInfo) + + ! Arguments ------------------------------------ + integer, intent(in ) :: cplx + integer, intent(in ) :: itype + character(len=1),intent(in ) :: jobz + character(len=1),intent(in ) :: uplo + integer, intent(in ) :: A_nrows + type(c_ptr), intent(in ) :: A + integer, intent(in ) :: lda + type(c_ptr), intent(in ) :: B + integer, intent(in ) :: ldb + type(c_ptr), intent(in ) :: W + integer, intent(inout) :: devInfo + + ! Local variables ------------------------------ + integer :: bufferSize + type(c_ptr) :: gpu_ptr + +! ************************************************************************* + + if (abi_linalg_gpu_mode == ABI_GPU_DISABLED) then + ABI_BUG("You requested to run on CPU to a GPU wrapper :/") + end if + +#ifdef HAVE_GPU + + ! probe needed bufferSize + call gpu_xsygvd_buffersize(cplx, itype, jobz, uplo, & + A_nrows, & + A, lda, & + B, ldb, & + W, & + bufferSize) + + select case(cplx) + + case (1) + ! resize work array if needed and retrieve work pointer to use + if(abi_linalg_gpu_mode == ABI_GPU_LEGACY & + .or. abi_linalg_gpu_mode == ABI_GPU_KOKKOS) then + call abi_gpu_work_resize(r_work,r_work_managed,r_work_len,bufferSize) + gpu_ptr = c_loc(r_work_managed) + else if(abi_linalg_gpu_mode == ABI_GPU_OPENMP) then +#ifdef HAVE_OPENMP_GET_MAPPED_PTR + call abi_gpu_work_resize(r_work,r_work_managed,r_work_len,bufferSize) + gpu_ptr = xomp_get_mapped_ptr(c_loc(r_work)) +#else + call abi_gpu_work_resizeCptr(gpu_work,gpu_work_len,INT(1,c_size_t)*bufferSize*dp) + gpu_ptr = gpu_work +#endif + end if + + case (2) + ! resize work array if needed and retrieve work pointer to use + if(abi_linalg_gpu_mode == ABI_GPU_LEGACY & + .or. abi_linalg_gpu_mode == ABI_GPU_KOKKOS) then + call abi_gpu_work_resize(c_work,c_work_managed,c_work_len,bufferSize) + gpu_ptr = c_loc(c_work_managed) + else if(abi_linalg_gpu_mode == ABI_GPU_OPENMP) then +#ifdef HAVE_OPENMP_GET_MAPPED_PTR + call abi_gpu_work_resize(c_work,c_work_managed,c_work_len,bufferSize) + gpu_ptr = xomp_get_mapped_ptr(c_loc(c_work)) +#else + call abi_gpu_work_resizeCptr(gpu_work,gpu_work_len,INT(2,c_size_t)*bufferSize*dp) + gpu_ptr = gpu_work +#endif + end if + + end select + + ! and compute (finally) + call gpu_xsygvd(cplx, itype, jobz, uplo, & + A_nrows, & + A, lda, & + B, ldb, & + W, & + gpu_ptr, bufferSize, devInfo) + + if (abi_linalg_gpu_mode == ABI_GPU_OPENMP) then + ! CUDA/HIP linalg calls are run asynchronously and OpenMP is unaware of them. + ! Therefore, we issue a stream sync here to avoid + !potential mistakes in calling context. + call gpu_linalg_stream_synchronize() + end if + +#else + ! Unused if GPU code disabled + ABI_UNUSED((/cplx,itype,A_nrows,lda,ldb,devInfo,bufferSize/)) + ABI_UNUSED((/jobz,uplo/)) + ABI_UNUSED((/A,B,W,gpu_ptr/)) +#endif + +end subroutine abi_gpu_xhegvd_cptr +!!*** + +subroutine abi_gpu_xhegvd_d(cplx, itype, jobz, uplo, A_nrows, & + A, lda, & + B, ldb, & + W, & + devInfo) + + ! Arguments ------------------------------------ + integer, intent(in ) :: cplx + integer, intent(in ) :: itype + character(len=1),intent(in ) :: jobz + character(len=1),intent(in ) :: uplo + integer, intent(in ) :: A_nrows + real(dp), intent(in ),target :: A(*) + integer, intent(in ) :: lda + real(dp), intent(in ),target :: B(*) + integer, intent(in ) :: ldb + real(dp), intent(inout),target :: W(*) + integer, intent(inout) :: devInfo + +! ************************************************************************* + + if(abi_linalg_gpu_mode == ABI_GPU_LEGACY .or. abi_linalg_gpu_mode == ABI_GPU_KOKKOS) then + call abi_gpu_xhegvd_cptr(cplx, itype, jobz, uplo, & + A_nrows, & + c_loc(A), lda, & + c_loc(B), ldb, & + c_loc(W), & + devInfo) + else if(abi_linalg_gpu_mode == ABI_GPU_OPENMP) then +#ifdef HAVE_OPENMP_OFFLOAD + !$OMP TARGET DATA USE_DEVICE_PTR(A,B,W) + call abi_gpu_xhegvd_cptr(cplx, itype, jobz, uplo, & + A_nrows, & + c_loc(A), lda, & + c_loc(B), ldb, & + c_loc(W), & + devInfo) + !$OMP END TARGET DATA +#endif + else + ABI_BUG("Unhandled GPU mode !") + end if + +end subroutine abi_gpu_xhegvd_d +!!*** + +subroutine abi_gpu_xhegvd_z(cplx, itype, jobz, uplo, A_nrows, & + A, lda, & + B, ldb, & + W, & + devInfo) + + ! Arguments ------------------------------------ + integer, intent(in ) :: cplx + integer, intent(in ) :: itype + character(len=1),intent(in ) :: jobz + character(len=1),intent(in ) :: uplo + integer, intent(in ) :: A_nrows + complex(dpc), intent(in ),target :: A(*) + integer, intent(in ) :: lda + complex(dpc), intent(in ),target :: B(*) + integer, intent(in ) :: ldb + real(dp), intent(inout),target :: W(*) + integer, intent(inout) :: devInfo + +! ************************************************************************* + + if(abi_linalg_gpu_mode == ABI_GPU_LEGACY .or. abi_linalg_gpu_mode == ABI_GPU_KOKKOS) then + call abi_gpu_xhegvd_cptr(cplx, itype, jobz, uplo, & + A_nrows, & + c_loc(A), lda, & + c_loc(B), ldb, & + c_loc(W), & + devInfo) + else if(abi_linalg_gpu_mode == ABI_GPU_OPENMP) then +#ifdef HAVE_OPENMP_OFFLOAD + !$OMP TARGET DATA USE_DEVICE_PTR(A,B,W) + call abi_gpu_xhegvd_cptr(cplx, itype, jobz, uplo, & + A_nrows, & + c_loc(A), lda, & + c_loc(B), ldb, & + c_loc(W), & + devInfo) + !$OMP END TARGET DATA +#endif + else + ABI_BUG("Unhandled GPU mode !") + end if + +end subroutine abi_gpu_xhegvd_z +!!*** + +subroutine abi_gpu_xhegvd_2d(cplx, itype, jobz, uplo, A_nrows, & + A, lda, & + B, ldb, & + W, & + devInfo) + + ! Arguments ------------------------------------ + integer, intent(in ) :: cplx + integer, intent(in ) :: itype + character(len=1),intent(in ) :: jobz + character(len=1),intent(in ) :: uplo + integer, intent(in ) :: A_nrows,lda,ldb + real(dp), intent(in ),target :: A(lda,*) + real(dp), intent(in ),target :: B(ldb,*) + real(dp), intent(inout),target :: W(A_nrows,*) + integer, intent(inout) :: devInfo + +! ************************************************************************* + + if(abi_linalg_gpu_mode == ABI_GPU_LEGACY .or. abi_linalg_gpu_mode == ABI_GPU_KOKKOS) then + call abi_gpu_xhegvd_cptr(cplx, itype, jobz, uplo, & + A_nrows, & + c_loc(A), lda, & + c_loc(B), ldb, & + c_loc(W), & + devInfo) + else if(abi_linalg_gpu_mode == ABI_GPU_OPENMP) then +#ifdef HAVE_OPENMP_OFFLOAD + !$OMP TARGET DATA USE_DEVICE_PTR(A,B,W) + call abi_gpu_xhegvd_cptr(cplx, itype, jobz, uplo, & + A_nrows, & + c_loc(A), lda, & + c_loc(B), ldb, & + c_loc(W), & + devInfo) + !$OMP END TARGET DATA +#endif + else + ABI_BUG("Unhandled GPU mode !") + end if + +end subroutine abi_gpu_xhegvd_2d +!!*** + +subroutine abi_gpu_xhegvd_2z(cplx, itype, jobz, uplo, A_nrows, & + A, lda, & + B, ldb, & + W, & + devInfo) + + ! Arguments ------------------------------------ + integer, intent(in ) :: cplx + integer, intent(in ) :: itype + character(len=1),intent(in ) :: jobz + character(len=1),intent(in ) :: uplo + integer, intent(in ) :: A_nrows,lda,ldb + complex(dpc), intent(in ),target :: A(lda,*) + complex(dpc), intent(in ),target :: B(ldb,*) + real(dp), intent(inout),target :: W(A_nrows,*) + integer, intent(inout) :: devInfo + +! ************************************************************************* + + if(abi_linalg_gpu_mode == ABI_GPU_LEGACY .or. abi_linalg_gpu_mode == ABI_GPU_KOKKOS) then + call abi_gpu_xhegvd_cptr(cplx, itype, jobz, uplo, & + A_nrows, & + c_loc(A), lda, & + c_loc(B), ldb, & + c_loc(W), & + devInfo) + else if(abi_linalg_gpu_mode == ABI_GPU_OPENMP) then +#ifdef HAVE_OPENMP_OFFLOAD + !$OMP TARGET DATA USE_DEVICE_PTR(A,B,W) + call abi_gpu_xhegvd_cptr(cplx, itype, jobz, uplo, & + A_nrows, & + c_loc(A), lda, & + c_loc(B), ldb, & + c_loc(W), & + devInfo) + !$OMP END TARGET DATA +#endif + else + ABI_BUG("Unhandled GPU mode !") + end if + +end subroutine abi_gpu_xhegvd_2z +!!*** + +!------------------------------------------------------------------------------ +! abi_gpu_xheevd +!------------------------------------------------------------------------------ +!!****f* m_abi_gpu_linalg/abi_gpu_xheevd +!! NAME +!! abi_gpu_xheevd +!! +!! FUNCTION +!! Compute a LAPACK SYEVD operation on GPU +!! compute eigen values/vectors of a real +!! symmetric-definite eigenproblem +!! +!! See cusolver documentation +!! https://docs.nvidia.com/cuda/cusolver/index.html#cuSolverDN-lt-t-gt-heevd +!! +!! See also LAPACK doc in reference implementation: +!! https://github.com/Reference-LAPACK/lapack/blob/master/SRC/dheevd.f +!! +!! INPUTS +!! cplx = 1 if real 2 if complex +!! jobz = character, 'n'(eigenvalues only) or 'v' (eigenvalues + eigenvectors) +!! uplo = character, 'u' or 'l' +!! A_nrows = matrix size +!! A = pointer to gpu memory location of matrix A +!! lda = leading dimension of matrix A +!! W = pointer to gpu memory location of matrix W (output eigen values) +!! devInfo = +!! +!! SOURCE +subroutine abi_gpu_xheevd_cptr(cplx, jobz, uplo, A_nrows, & + A, lda, & + W, & + devInfo) + + ! Arguments ------------------------------------ + integer, intent(in ) :: cplx + character(len=1),intent(in ) :: jobz + character(len=1),intent(in ) :: uplo + integer, intent(in ) :: A_nrows + type(c_ptr), intent(in ) :: A + integer, intent(in ) :: lda + type(c_ptr), intent(in) :: W + integer, intent(inout) :: devInfo + + ! Local variables ------------------------------ + integer :: bufferSize + type(c_ptr) :: gpu_ptr + +! ************************************************************************* + + if (abi_linalg_gpu_mode == ABI_GPU_DISABLED) then + ABI_BUG("You requested to run on CPU to a GPU wrapper :/") + end if + +#ifdef HAVE_GPU + + ! probe needed bufferSize + call gpu_xsyevd_buffersize(cplx, jobz, uplo, & + A_nrows, & + A, lda, & + W, & + bufferSize) + + select case(cplx) + + case (1) + ! resize work array if needed and retrieve work pointer to use + if(abi_linalg_gpu_mode == ABI_GPU_LEGACY & + .or. abi_linalg_gpu_mode == ABI_GPU_KOKKOS) then + call abi_gpu_work_resize(r_work,r_work_managed,r_work_len,bufferSize) + gpu_ptr = c_loc(r_work_managed) + else if(abi_linalg_gpu_mode == ABI_GPU_OPENMP) then +#ifdef HAVE_OPENMP_GET_MAPPED_PTR + call abi_gpu_work_resize(r_work,r_work_managed,r_work_len,bufferSize) + gpu_ptr = xomp_get_mapped_ptr(c_loc(r_work)) +#else + call abi_gpu_work_resizeCptr(gpu_work,gpu_work_len,INT(1,c_size_t)*bufferSize*dp) + gpu_ptr = gpu_work +#endif + end if + + case (2) + ! resize work array if needed and retrieve work pointer to use + if(abi_linalg_gpu_mode == ABI_GPU_LEGACY & + .or. abi_linalg_gpu_mode == ABI_GPU_KOKKOS) then + call abi_gpu_work_resize(c_work,c_work_managed,c_work_len,bufferSize) + gpu_ptr = c_loc(c_work_managed) + else if(abi_linalg_gpu_mode == ABI_GPU_OPENMP) then +#ifdef HAVE_OPENMP_GET_MAPPED_PTR + call abi_gpu_work_resize(c_work,c_work_managed,c_work_len,bufferSize) + gpu_ptr = xomp_get_mapped_ptr(c_loc(c_work)) +#else + call abi_gpu_work_resizeCptr(gpu_work,gpu_work_len,INT(2,c_size_t)*bufferSize*dp) + gpu_ptr = gpu_work +#endif + end if + + end select + + ! and compute (finally) + call gpu_xsyevd(cplx, jobz, uplo, & + A_nrows, & + A, lda, & + W, & + gpu_ptr, bufferSize, devInfo) + + if (abi_linalg_gpu_mode == ABI_GPU_OPENMP) then + ! CUDA/HIP linalg calls are run asynchronously and OpenMP is unaware of them. + ! Therefore, we issue a stream sync here to avoid + !potential mistakes in calling context. + call gpu_linalg_stream_synchronize() + end if + +#else + ! Unused if GPU code disabled + ABI_UNUSED((/cplx,A_nrows,lda,devInfo,bufferSize/)) + ABI_UNUSED((/jobz,uplo/)) + ABI_UNUSED((/A,W,gpu_ptr/)) +#endif + +end subroutine abi_gpu_xheevd_cptr +!!*** + +subroutine abi_gpu_xheevd_d(cplx, jobz, uplo, A_nrows, & + A, lda, & + W, & + devInfo) + + ! Arguments ------------------------------------ + integer, intent(in ) :: cplx + character(len=1),intent(in ) :: jobz + character(len=1),intent(in ) :: uplo + integer, intent(in ) :: A_nrows + real(dp), intent(in ),target :: A(*) + integer, intent(in ) :: lda + real(dp), intent(inout),target :: W(*) + integer, intent(inout) :: devInfo + +! ************************************************************************* + + if(abi_linalg_gpu_mode == ABI_GPU_LEGACY .or. abi_linalg_gpu_mode == ABI_GPU_KOKKOS) then + call abi_gpu_xheevd_cptr(cplx, jobz, uplo, & + A_nrows, & + c_loc(A), lda, & + c_loc(W), & + devInfo) + else if(abi_linalg_gpu_mode == ABI_GPU_OPENMP) then +#ifdef HAVE_OPENMP_OFFLOAD + !$OMP TARGET DATA USE_DEVICE_PTR(A,W) + call abi_gpu_xheevd_cptr(cplx, jobz, uplo, & + A_nrows, & + c_loc(A), lda, & + c_loc(W), & + devInfo) + !$OMP END TARGET DATA +#endif + else + ABI_BUG("Unhandled GPU mode !") + end if + +end subroutine abi_gpu_xheevd_d +!!*** + +subroutine abi_gpu_xheevd_z(cplx, jobz, uplo, A_nrows, & + A, lda, & + W, & + devInfo) + + ! Arguments ------------------------------------ + integer, intent(in ) :: cplx + character(len=1),intent(in ) :: jobz + character(len=1),intent(in ) :: uplo + integer, intent(in ) :: A_nrows + complex(dpc), intent(in ),target :: A(*) + integer, intent(in ) :: lda + real(dp), intent(inout),target :: W(*) + integer, intent(inout) :: devInfo + +! ************************************************************************* + + if(abi_linalg_gpu_mode == ABI_GPU_LEGACY .or. abi_linalg_gpu_mode == ABI_GPU_KOKKOS) then + call abi_gpu_xheevd_cptr(cplx, jobz, uplo, & + A_nrows, & + c_loc(A), lda, & + c_loc(W), & + devInfo) + else if(abi_linalg_gpu_mode == ABI_GPU_OPENMP) then +#ifdef HAVE_OPENMP_OFFLOAD + !$OMP TARGET DATA USE_DEVICE_PTR(A,W) + call abi_gpu_xheevd_cptr(cplx, jobz, uplo, & + A_nrows, & + c_loc(A), lda, & + c_loc(W), & + devInfo) + !$OMP END TARGET DATA +#endif + else + ABI_BUG("Unhandled GPU mode !") + end if + +end subroutine abi_gpu_xheevd_z +!!*** + +subroutine abi_gpu_xheevd_2d(cplx, jobz, uplo, A_nrows, & + A, lda, & + W, & + devInfo) + + ! Arguments ------------------------------------ + integer, intent(in ) :: cplx + character(len=1),intent(in ) :: jobz + character(len=1),intent(in ) :: uplo + integer, intent(in ) :: A_nrows,lda + real(dp), intent(in ),target :: A(lda,*) + real(dp), intent(inout),target :: W(A_nrows,*) + integer, intent(inout) :: devInfo + +! ************************************************************************* + + if(abi_linalg_gpu_mode == ABI_GPU_LEGACY .or. abi_linalg_gpu_mode == ABI_GPU_KOKKOS) then + call abi_gpu_xheevd_cptr(cplx, jobz, uplo, & + A_nrows, & + c_loc(A), lda, & + c_loc(W), & + devInfo) + else if(abi_linalg_gpu_mode == ABI_GPU_OPENMP) then +#ifdef HAVE_OPENMP_OFFLOAD + !$OMP TARGET DATA USE_DEVICE_PTR(A,W) + call abi_gpu_xheevd_cptr(cplx, jobz, uplo, & + A_nrows, & + c_loc(A), lda, & + c_loc(W), & + devInfo) + !$OMP END TARGET DATA +#endif + else + ABI_BUG("Unhandled GPU mode !") + end if + +end subroutine abi_gpu_xheevd_2d +!!*** + +subroutine abi_gpu_xheevd_2z(cplx, jobz, uplo, A_nrows, & + A, lda, & + W, & + devInfo) + + ! Arguments ------------------------------------ + integer, intent(in ) :: cplx + character(len=1),intent(in ) :: jobz + character(len=1),intent(in ) :: uplo + integer, intent(in ) :: A_nrows,lda + complex(dpc), intent(in ),target :: A(lda,*) + real(dp), intent(inout),target :: W(A_nrows,*) + integer, intent(inout) :: devInfo + +! ************************************************************************* + + if(abi_linalg_gpu_mode == ABI_GPU_LEGACY .or. abi_linalg_gpu_mode == ABI_GPU_KOKKOS) then + call abi_gpu_xheevd_cptr(cplx, jobz, uplo, & + A_nrows, & + c_loc(A), lda, & + c_loc(W), & + devInfo) + else if(abi_linalg_gpu_mode == ABI_GPU_OPENMP) then +#ifdef HAVE_OPENMP_OFFLOAD + !$OMP TARGET DATA USE_DEVICE_PTR(A,W) + call abi_gpu_xheevd_cptr(cplx, jobz, uplo, & + A_nrows, & + c_loc(A), lda, & + c_loc(W), & + devInfo) + !$OMP END TARGET DATA +#endif + else + ABI_BUG("Unhandled GPU mode !") + end if + +end subroutine abi_gpu_xheevd_2z +!!*** + +!------------------------------------------------------------------------------ +! abi_gpu_xpotrf +!------------------------------------------------------------------------------ +!!****f* m_abi_gpu_linalg/abi_gpu_xpotrf +!! NAME +!! abi_gpu_xpotrf +!! +!! FUNCTION +!! Compute a LAPACK SYGVD operation on GPU +!! compute eigen values/vectors of a real +!! symmetric-definite eigenproblem +!! +!! See cusolver documentation +!! https://docs.nvidia.com/cuda/cusolver/index.html#cuSolverDN-lt-t-gt-potrf +!! +!! See also LAPACK doc in reference implementation: +!! https://github.com/Reference-LAPACK/lapack/blob/master/SRC/dpotrf.f +!! +!! INPUTS +!! cplx = 1 if real 2 if complex +!! uplo = character, 'u' or 'l' +!! A_nrows = matrix size +!! A = pointer to gpu memory location of matrix A +!! lda = leading dimension of matrix A +!! devInfo = +!! +!! SOURCE +subroutine abi_gpu_xpotrf_cptr(cplx, uplo, A_nrows, & + A, lda, & + devInfo) + + ! Arguments ------------------------------------ + integer, intent(in ) :: cplx + character(len=1),intent(in ) :: uplo + integer, intent(in ) :: A_nrows + type(c_ptr), intent(in ) :: A + integer, intent(in ) :: lda + integer, intent(inout) :: devInfo + + ! Local variables ------------------------------ + integer :: bufferSize + type(c_ptr) :: gpu_ptr + +! ************************************************************************* + + if (abi_linalg_gpu_mode == ABI_GPU_DISABLED) then + ABI_BUG("You requested to run on CPU to a GPU wrapper :/") + end if + +#ifdef HAVE_GPU + + ! probe needed bufferSize + call gpu_xpotrf_buffersize(cplx, uplo, & + A_nrows, & + A, lda, & + bufferSize) + + select case(cplx) + + case (1) + ! resize work array if needed and retrieve work pointer to use + if(abi_linalg_gpu_mode == ABI_GPU_LEGACY & + .or. abi_linalg_gpu_mode == ABI_GPU_KOKKOS) then + call abi_gpu_work_resize(r_work,r_work_managed,r_work_len,bufferSize) + gpu_ptr = c_loc(r_work_managed) + else if(abi_linalg_gpu_mode == ABI_GPU_OPENMP) then +#ifdef HAVE_OPENMP_GET_MAPPED_PTR + call abi_gpu_work_resize(r_work,r_work_managed,r_work_len,bufferSize) + gpu_ptr = xomp_get_mapped_ptr(c_loc(r_work)) +#else + call abi_gpu_work_resizeCptr(gpu_work,gpu_work_len,INT(1,c_size_t)*bufferSize*dp) + gpu_ptr = gpu_work +#endif + end if + + case (2) + ! resize work array if needed and retrieve work pointer to use + if(abi_linalg_gpu_mode == ABI_GPU_LEGACY & + .or. abi_linalg_gpu_mode == ABI_GPU_KOKKOS) then + call abi_gpu_work_resize(c_work,c_work_managed,c_work_len,bufferSize) + gpu_ptr = c_loc(c_work_managed) + else if(abi_linalg_gpu_mode == ABI_GPU_OPENMP) then +#ifdef HAVE_OPENMP_GET_MAPPED_PTR + call abi_gpu_work_resize(c_work,c_work_managed,c_work_len,bufferSize) + gpu_ptr = xomp_get_mapped_ptr(c_loc(c_work)) +#else + call abi_gpu_work_resizeCptr(gpu_work,gpu_work_len,INT(1,c_size_t)*bufferSize*dp) + gpu_ptr = gpu_work +#endif + end if + + end select + + ! and compute (finally) + call gpu_xpotrf(cplx, uplo, & + A_nrows, & + A, lda, & + gpu_ptr, bufferSize, devInfo) + + if (abi_linalg_gpu_mode == ABI_GPU_OPENMP) then + ! CUDA/HIP linalg calls are run asynchronously and OpenMP is unaware of them. + ! Therefore, we issue a stream sync here to avoid + !potential mistakes in calling context. + call gpu_linalg_stream_synchronize() + end if + +#else + ! Unused if GPU code disabled + ABI_UNUSED((/cplx,A_nrows,lda,devInfo,bufferSize/)) + ABI_UNUSED((/uplo/)) + ABI_UNUSED((/A,gpu_ptr/)) +#endif + +end subroutine abi_gpu_xpotrf_cptr +!!*** + +subroutine abi_gpu_xpotrf_d(cplx, uplo, A_nrows, & + A, lda, & + devInfo) + + ! Arguments ------------------------------------ + integer, intent(in ) :: cplx + character(len=1),intent(in ) :: uplo + integer, intent(in ) :: A_nrows + real(dp), intent(in ),target :: A(*) + integer, intent(in ) :: lda + integer, intent(inout) :: devInfo + +! ************************************************************************* + + if(abi_linalg_gpu_mode == ABI_GPU_LEGACY .or. abi_linalg_gpu_mode == ABI_GPU_KOKKOS) then + call abi_gpu_xpotrf_cptr(cplx, uplo, & + A_nrows, & + c_loc(A), lda, & + devInfo) + else if(abi_linalg_gpu_mode == ABI_GPU_OPENMP) then +#ifdef HAVE_OPENMP_OFFLOAD + !$OMP TARGET DATA USE_DEVICE_PTR(A) + call abi_gpu_xpotrf_cptr(cplx, uplo, & + A_nrows, & + c_loc(A), lda, & + devInfo) + !$OMP END TARGET DATA +#endif + else + ABI_BUG("Unhandled GPU mode !") + end if + +end subroutine abi_gpu_xpotrf_d +!!*** + +subroutine abi_gpu_xpotrf_z(cplx, uplo, A_nrows, & + A, lda, & + devInfo) + + ! Arguments ------------------------------------ + integer, intent(in ) :: cplx + character(len=1),intent(in ) :: uplo + integer, intent(in ) :: A_nrows + complex(dpc), intent(in ),target :: A(*) + integer, intent(in ) :: lda + integer, intent(inout) :: devInfo + +! ************************************************************************* + + if(abi_linalg_gpu_mode == ABI_GPU_LEGACY .or. abi_linalg_gpu_mode == ABI_GPU_KOKKOS) then + call abi_gpu_xpotrf_cptr(cplx, uplo, & + A_nrows, & + c_loc(A), lda, & + devInfo) + else if(abi_linalg_gpu_mode == ABI_GPU_OPENMP) then +#ifdef HAVE_OPENMP_OFFLOAD + !$OMP TARGET DATA USE_DEVICE_PTR(A) + call abi_gpu_xpotrf_cptr(cplx, uplo, & + A_nrows, & + c_loc(A), lda, & + devInfo) + !$OMP END TARGET DATA +#endif + else + ABI_BUG("Unhandled GPU mode !") + end if + +end subroutine abi_gpu_xpotrf_z +!!*** + +subroutine abi_gpu_xpotrf_2d(cplx, uplo, A_nrows, & + A, lda, & + devInfo) + + ! Arguments ------------------------------------ + integer, intent(in ) :: cplx + character(len=1),intent(in ) :: uplo + integer, intent(in ) :: A_nrows,lda + real(dp), intent(in ),target :: A(lda,*) + integer, intent(inout) :: devInfo + +! ************************************************************************* + + if(abi_linalg_gpu_mode == ABI_GPU_LEGACY .or. abi_linalg_gpu_mode == ABI_GPU_KOKKOS) then + call abi_gpu_xpotrf_cptr(cplx, uplo, & + A_nrows, & + c_loc(A), lda, & + devInfo) + else if(abi_linalg_gpu_mode == ABI_GPU_OPENMP) then +#ifdef HAVE_OPENMP_OFFLOAD + !$OMP TARGET DATA USE_DEVICE_PTR(A) + call abi_gpu_xpotrf_cptr(cplx, uplo, & + A_nrows, & + c_loc(A), lda, & + devInfo) + !$OMP END TARGET DATA +#endif + else + ABI_BUG("Unhandled GPU mode !") + end if + +end subroutine abi_gpu_xpotrf_2d +!!*** + +subroutine abi_gpu_xpotrf_2z(cplx, uplo, A_nrows, & + A, lda, & + devInfo) + + ! Arguments ------------------------------------ + integer, intent(in ) :: cplx + character(len=1),intent(in ) :: uplo + integer, intent(in ) :: A_nrows,lda + complex(dpc), intent(in ),target :: A(lda,*) + integer, intent(inout) :: devInfo + +! ************************************************************************* + + if(abi_linalg_gpu_mode == ABI_GPU_LEGACY .or. abi_linalg_gpu_mode == ABI_GPU_KOKKOS) then + call abi_gpu_xpotrf_cptr(cplx, uplo, & + A_nrows, & + c_loc(A), lda, & + devInfo) + else if(abi_linalg_gpu_mode == ABI_GPU_OPENMP) then +#ifdef HAVE_OPENMP_OFFLOAD + !$OMP TARGET DATA USE_DEVICE_PTR(A) + call abi_gpu_xpotrf_cptr(cplx, uplo, & + A_nrows, & + c_loc(A), lda, & + devInfo) + !$OMP END TARGET DATA +#endif + else + ABI_BUG("Unhandled GPU mode !") + end if + +end subroutine abi_gpu_xpotrf_2z +!!*** + +!!****f* m_abi_linalg/gpu_xorthonormalize +!! NAME +!! gpu_xorthonormalize +!! +!! FUNCTION +!! This routine computes the overlap of two complex wavefunctions (for a given number of bands) +!! and orthonormalizes it using gpu: +!! - Computes the products of two rectangular matrices +!! containing the wavefunctions psi and S.psi (where S is the +!! overlap (with the PAW terms if necessary)). +!! - Does a Cholesky decomposition of this overlap +!! - rotates the initial matrix blockvectorx by the triangular matrix to +!! have an orthonormal set of wavefunctions +!! +!! INPUTS +!! blockvectorbx = matrix of dimension (blocksize,vectsize) as a GPU ptr +!! (e.g. block of overlap*wavefunction) +!! blocksize = dimension of matrices (e.g number of bands) +!! spaceComm = communicator used for MPI parallelization +!! vectsize = dimension of matrices (e.g number of G vector) +!! +!! OUTPUT +!! sqgram = Choleski decomposition of transpose(blockvector)*blockvectorx as a GPU ptr +!! +!! SIDE EFFECTS +!! blockvectorx = on input, matrix of dimension (vectsize,blocksize) as a GPU ptr +!! (e.g block of wavefunction) +!! blockvectorx = on output, orthonormalized wavefunction. as a GPU ptr +!! +!! +!! SOURCE + +subroutine gpu_xorthonormalize(blockvectorx_gpu,blockvectorbx_gpu,blocksize,spaceComm,& +& sqgram_gpu,vectsize,& +& x_cplx,timopt,tim_xortho) ! optional arguments + + use, intrinsic :: iso_c_binding + implicit none + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: blocksize,spaceComm,vectsize,x_cplx + integer, intent(in), optional :: timopt,tim_xortho +!arrays + type(c_ptr),intent(inout) :: blockvectorbx_gpu, blockvectorx_gpu, sqgram_gpu +!Local variables------------------------------- +#if defined HAVE_GPU + integer :: ierr,info + real(dp), dimension(:,:),allocatable, target :: d_sqgram + complex(dpc),dimension(:,:),allocatable, target :: z_sqgram + character :: tr + real(dp) :: tsec(2) + integer(c_size_t) :: size +#else + type(c_ptr) :: cptr_a +#endif + character(len=500) :: message + +! ********************************************************************* + +#if defined HAVE_GPU + if (present(tim_xortho).and.present(timopt)) then + if(abs(timopt)==3) then + call timab(tim_xortho,1,tsec) + end if + end if + + if ( x_cplx == 1 ) then + tr='t' + ABI_MALLOC(d_sqgram,(blocksize,blocksize)) + else + tr='c' + ABI_MALLOC(z_sqgram,(blocksize,blocksize)) + end if + + call gpu_xgemm(x_cplx,tr,'n',blocksize,blocksize,vectsize, & +& cone,blockvectorx_gpu,vectsize,blockvectorbx_gpu,vectsize,czero,sqgram_gpu,blocksize) + call gpu_device_synchronize() + size=x_cplx*dp*blocksize*blocksize + + if ( x_cplx == 1 ) then + call copy_from_gpu(d_sqgram, sqgram_gpu, INT(x_cplx, c_size_t)*dp*blocksize*blocksize) + call xmpi_sum(d_sqgram,spaceComm,ierr) + call abi_xpotrf('u',blocksize,d_sqgram,blocksize,info) + call copy_on_gpu(d_sqgram, sqgram_gpu, INT(x_cplx, c_size_t)*dp*blocksize*blocksize) + else + call copy_from_gpu(z_sqgram, sqgram_gpu, size) + call xmpi_sum(z_sqgram,spaceComm,ierr) + call abi_xpotrf('u',blocksize,z_sqgram,blocksize,info) + call copy_on_gpu(z_sqgram, sqgram_gpu, size) + end if + + if (info /= 0 ) then + write(message,'(a,i3)') ' xpotrf, info=',info + ABI_WARNING(message) + end if + + call gpu_xtrsm(x_cplx,'r','u','n','n',vectsize,blocksize,cone,sqgram_gpu,blocksize,& +& blockvectorx_gpu,vectsize) + + if(x_cplx==1) then + ABI_FREE(d_sqgram) + else + ABI_FREE(z_sqgram) + end if + if (present(tim_xortho).and.present(timopt)) then + if(abs(timopt)==3) then + call timab(tim_xortho,2,tsec) + end if + end if + return + +#else + message=' This routine is not allowed when running on GPU is disabled !' + ABI_BUG(message) + if (.false.) then + write(std_out,*) blocksize,vectsize,spaceComm,x_cplx + if (present(timopt)) write(std_out,*) timopt + if (present(tim_xortho)) write(std_out,*) tim_xortho + cptr_a=blockvectorbx_gpu;cptr_a=blockvectorx_gpu;cptr_a=sqgram_gpu + end if +#endif + +end subroutine gpu_xorthonormalize +!!*** diff --git a/GX-PAW/common/src/28_numeric_noabirule/abi_xcopy.f90 b/GX-PAW/common/src/28_numeric_noabirule/abi_xcopy.f90 new file mode 100644 index 00000000..378cbcfb --- /dev/null +++ b/GX-PAW/common/src/28_numeric_noabirule/abi_xcopy.f90 @@ -0,0 +1,306 @@ +!{\src2tex{textfont=tt}} +!!****f* m_abi_linalg/abi_xcopy +!! NAME +!! abi_xcopy +!! +!! FUNCTION +!! abi_xcopy is the generic function for vector copy +!! It performs the data copy: dst(1:n:incdst) = src(1:n:incsrc) +!! +!! COPYRIGHT +!! Copyright (C) 2001-2024 ABINIT group (LNguyen,FDahm (CS)) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~ABINIT/Infos/copyright +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! SOURCE + +!!*** + +!!****f* m_abi_linalg/abi_zcopy +!! NAME +!! abi_zcopy +!! +!! FUNCTION +!! +!! INPUTS +!! +!! SOURCE +!! +subroutine abi_zcopy(size,tsrc,incsrc,tdest,incdest) + +!Arguments------------------------------------- + integer, intent(in) :: size + integer, intent(in) :: incsrc + integer, intent(in) :: incdest + complex(dpc),intent(in) :: tsrc + complex(dpc),intent(inout) :: tdest + + !Local variables------------------------------- +#ifdef DEV_LINALG_TIMING + real(dp) :: tsec(2) + call timab(TIMAB_XCOPY,1,tsec) +#endif + + call zcopy(size,tsrc,incsrc,tdest,incdest) + +#ifdef DEV_LINALG_TIMING + call timab(TIMAB_XCOPY,2,tsec) +#endif + +end subroutine abi_zcopy +!!*** + +!!****f* m_abi_linalg/abi_zcopy_1d +!! NAME +!! abi_zcopy_1d +!! +!! FUNCTION +!! +!! INPUTS +!! +!! SOURCE + +subroutine abi_zcopy_1d(size,tsrc,incsrc,tdest,incdest) + +!Arguments------------------------------------- + integer, intent(in) :: size + integer, intent(in) :: incsrc + integer, intent(in) :: incdest + complex(dpc), intent(in) :: tsrc(*) + complex(dpc), intent(inout) :: tdest(*) + + call abi_zcopy(size,tsrc(1),incsrc,tdest(1),incdest) + +end subroutine abi_zcopy_1d +!!*** + +!!****f* m_abi_linalg/abi_dcopy +!! NAME +!! abi_dcopy +!! +!! FUNCTION +!! +!! INPUTS +!! +!! SOURCE + +subroutine abi_dcopy(size,tsrc,incsrc,tdest,incdest,x_cplx) + +!Arguments------------------------------------- + integer, intent(in) :: size + integer, intent(in) :: incsrc + integer, intent(in) :: incdest + real(dp),intent(in) :: tsrc + real(dp),intent(inout) :: tdest + integer, intent(in), optional :: x_cplx + +!Local variables------------------------------- + integer :: cplx_ + +#ifdef DEV_LINALG_TIMING + real(dp) :: tsec(2) + call timab(TIMAB_XCOPY,1,tsec) +#endif + + cplx_=1 ; if(PRESENT(x_cplx)) cplx_ = x_cplx + if(cplx_ == 2) then + call zcopy(size,tsrc,incsrc,tdest,incdest) + else + call dcopy(size,tsrc,incsrc,tdest,incdest) + end if + +#ifdef DEV_LINALG_TIMING + call timab(TIMAB_XCOPY,2,tsec) +#endif + +end subroutine abi_dcopy +!!*** + +!!****f* m_abi_linalg/abi_dcopy_1d +!! NAME +!! abi_dcopy_1d +!! +!! FUNCTION +!! +!! INPUTS +!! +!! SOURCE + +subroutine abi_dcopy_1d(size,tsrc,incsrc,tdest,incdest,x_cplx) + +!Arguments------------------------------------- + integer, intent(in) :: size + integer, intent(in) :: incsrc + integer, intent(in) :: incdest + real(dp), intent(in) :: tsrc(*) + real(dp), intent(inout) :: tdest(*) +!Only for lobpcgwf + integer, intent(in), optional :: x_cplx + + call abi_dcopy(size,tsrc(1),incsrc,tdest(1),incdest,x_cplx) + +end subroutine abi_dcopy_1d +!!*** + +!!****f* m_abi_linalg/abi_dcopy_2d +!! NAME +!! abi_dcopy_2d +!! +!! FUNCTION +!! +!! INPUTS +!! +!! SOURCE + +subroutine abi_dcopy_2d(size,tsrc,incsrc,tdest,incdest,x_cplx) + +!Arguments------------------------------------- + integer, intent(in) :: size + integer, intent(in) :: incsrc + integer, intent(in) :: incdest + real(dp), DEV_CONTARRD intent(in) :: tsrc(:,:) + real(dp), DEV_CONTARRD intent(inout) :: tdest(:,:) +!Only for lobpcgwf + integer, intent(in), optional :: x_cplx + + ! write(*,*) "dcopy2D size=",size + call abi_dcopy(size,tsrc(1,1),incsrc,tdest(1,1),incdest,x_cplx) + +end subroutine abi_dcopy_2d +!!*** + +!!****f* m_abi_linalg/abi_dcopy_0d_1d +!! NAME +!! abi_dcopy_0d_1d +!! +!! FUNCTION +!! +!! INPUTS +!! +!! SOURCE + +subroutine abi_dcopy_0d_1d(size,tsrc,incsrc,tdest,incdest,x_cplx) + +!Arguments------------------------------------- + integer, intent(in) :: size + integer, intent(in) :: incsrc + integer, intent(in) :: incdest + real(dp),intent(in) :: tsrc + real(dp), intent(inout) :: tdest(*) + integer,intent(in), optional :: x_cplx !only lobpcgwf + + call abi_dcopy(size,tsrc,incsrc,tdest(1),incdest,x_cplx) + +end subroutine abi_dcopy_0d_1d +!!*** + +!!****f* m_abi_linalg/abi_dcopy_1d_0d +!! NAME +!! abi_dcopy_1d_0d +!! +!! FUNCTION +!! +!! INPUTS +!! +!! SOURCE + +subroutine abi_dcopy_1d_0d(size,tsrc,incsrc,tdest,incdest,x_cplx) + + !Arguments------------------------------------- + integer, intent(in) :: size + integer, intent(in) :: incsrc + integer, intent(in) :: incdest + real(dp),intent(in) :: tsrc(*) + real(dp),intent(inout) :: tdest + integer,intent(in), optional :: x_cplx !only lobpcgwf + + call abi_dcopy(size,tsrc(1),incsrc,tdest,incdest,x_cplx) + +end subroutine abi_dcopy_1d_0d +!!*** + +!!****f* m_abi_linalg/abi_d2zcopy_2d +!! NAME +!! abi_d2zcopy_2d +!! +!! FUNCTION +!! +!! INPUTS +!! +!! SOURCE + +subroutine abi_d2zcopy_2d(size,tsrc,incsrc,tdest,incdest,x_cplx) + + !Arguments------------------------------------- + integer, intent(in) :: size + integer, intent(in) :: incsrc + integer, intent(in) :: incdest + real(dp), DEV_CONTARRD intent(in) :: tsrc(:,:) + complex(dpc), DEV_CONTARRD intent(inout) :: tdest(:,:) + !only in lobpcgwf + integer, intent(in),optional :: x_cplx + +!Local variables------------------------------- + integer :: cplx_ + +#ifdef DEV_LINALG_TIMING + real(dp) :: tsec(2) + call timab(TIMAB_XCOPY,1,tsec) +#endif + + cplx_=1 ; if(PRESENT(x_cplx)) cplx_ = x_cplx + if(cplx_ == 2) then + call zcopy(size,tsrc,incsrc,tdest,incdest) + else + call dcopy(size,tsrc,incsrc,tdest,incdest) + end if + +#ifdef DEV_LINALG_TIMING + call timab(TIMAB_XCOPY,2,tsec) +#endif + +end subroutine abi_d2zcopy_2d +!!*** + +!!****f* m_abi_linalg/abi_z2dcopy_2d +!! NAME +!! abi_z2dcopy_2d +!! +!! FUNCTION +!! +!! INPUTS +!! +!! SOURCE + +subroutine abi_z2dcopy_2d(size,tsrc,incsrc,tdest,incdest,x_cplx) + +!Arguments------------------------------------- + integer, intent(in) :: size + integer, intent(in) :: incsrc + integer, intent(in) :: incdest + complex(dpc), DEV_CONTARRD intent(in) :: tsrc(:,:) + real(dp), DEV_CONTARRD intent(inout) :: tdest(:,:) + !only in lobpcgwf + integer,intent(in), optional :: x_cplx + +!Local variables------------------------------- + integer :: cplx_ +#ifdef DEV_LINALG_TIMING + real(dp) :: tsec(2) + call timab(TIMAB_XCOPY,1,tsec) +#endif + + cplx_=1 ; if(PRESENT(x_cplx)) cplx_ = x_cplx + if(cplx_ == 2) then + call zcopy(size,tsrc,incsrc,tdest,incdest) + else + call dcopy(size,tsrc,incsrc,tdest,incdest) + end if + +#ifdef DEV_LINALG_TIMING + call timab(TIMAB_XCOPY,2,tsec) +#endif + +end subroutine abi_z2dcopy_2d +!!*** diff --git a/GX-PAW/common/src/28_numeric_noabirule/abi_xgemm.f90 b/GX-PAW/common/src/28_numeric_noabirule/abi_xgemm.f90 new file mode 100644 index 00000000..f78c46d7 --- /dev/null +++ b/GX-PAW/common/src/28_numeric_noabirule/abi_xgemm.f90 @@ -0,0 +1,219 @@ +!{\src2tex{textfont=tt}} +!!****f* m_abi_linalg/abi_xgemm +!! NAME +!! abi_xgemm +!! +!! FUNCTION +!! abi_xgemm is the generic function that solves: +!! +!! C := alpha*op( A )*op( B ) + beta*C, +!! +!! where op( X ) is one of +!! +!! op( X ) = X or op( X ) = X**T, +!! +!! alpha and beta are scalars, and A, B and C are matrices, with op( A ) +!! an m by k matrix, op( B ) a k by n matrix and C an m by n matrix. +!! +!! COPYRIGHT +!! Copyright (C) 2001-2024 ABINIT group (LNguyen,FDahm (CS)) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~ABINIT/Infos/copyright +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! SOURCE + +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_abi_linalg/abi_zgemm_2d +!! NAME +!! abi_zgemm_2d +!! +!! FUNCTION +!! +!! INPUTS +!! +!! SOURCE + + subroutine abi_zgemm_2d(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC) + + !Arguments------------------------------------ + character(len=1),intent(in) :: TRANSA + character(len=1),intent(in) :: TRANSB + integer,intent(in) :: K + integer,intent(in) :: LDA + integer,intent(in) :: LDB + integer,intent(in) :: LDC + integer,intent(in) :: M + integer,intent(in) :: N + complex(dpc),intent(in) :: ALPHA + complex(dpc),intent(in) :: BETA + complex(dpc),target,intent(in) :: A(lda,*) + complex(dpc),target,intent(in) :: B(ldb,*) + complex(dpc),target,intent(inout) :: C(ldc,*) + + integer :: info +#ifdef DEV_LINALG_TIMING + real(dp) :: tsec(2) + call timab(TIMAB_XGEMM,1,tsec) +#endif + + if (ABI_LINALG_PLASMA_ISON) then + info = -1 +#ifdef HAVE_LINALG_PLASMA + !write(std_out,*)"Will call PLASMA_zgemm_c" + info = PLASMA_zgemm_c(trans_plasma(TRANSA),trans_plasma(TRANSB),M,N,K,ALPHA,& +& c_loc(A),LDA,c_loc(B),LDB,BETA,c_loc(C),LDC) +#endif + ABI_CHECK(info==0,"PLASMA_zgemm_c returned info !=0") + else + if (use_zgemm3m(m,n,k)) then + call _ZGEMM3M(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC) + else + call zgemm(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC) + end if + end if + +#ifdef DEV_LINALG_TIMING + call timab(TIMAB_XGEMM,2,tsec) +#endif + +end subroutine abi_zgemm_2d +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_abi_linalg/abi_zgemm_2r +!! NAME +!! abi_zgemm_2r +!! +!! FUNCTION +!! +!! INPUTS +!! +!! +!! SOURCE + + subroutine abi_zgemm_2r(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC) + + !Arguments------------------------------------ + character(len=1),intent(in) :: TRANSA + character(len=1),intent(in) :: TRANSB + integer,intent(in) :: K + integer,intent(in) :: LDA + integer,intent(in) :: LDB + integer,intent(in) :: LDC + integer,intent(in) :: M + integer,intent(in) :: N + complex(dpc),intent(in) :: ALPHA + complex(dpc),intent(in) :: BETA + real(dp),target,intent(in) :: A(*) + real(dp),target,intent(in) :: B(*) + real(dp),target,intent(inout) :: C(*) + + integer :: info +#ifdef DEV_LINALG_TIMING + real(dp) :: tsec(2) + call timab(TIMAB_XGEMM,1,tsec) +#endif + + if (ABI_LINALG_PLASMA_ISON) then + info = -1 +#ifdef HAVE_LINALG_PLASMA + !write(std_out,*)"Will call PLASMA_zgemm_c" + info = PLASMA_zgemm_c(trans_plasma(TRANSA),trans_plasma(TRANSB),M,N,K,ALPHA,& +& c_loc(A),LDA,c_loc(B),LDB,BETA,c_loc(C),LDC) +#endif + ABI_CHECK(info==0,"PLASMA_zgemm_c returned info !=0") + else + if (use_zgemm3m(m,n,k)) then + call _ZGEMM3M(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC) + else + call zgemm(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC) + end if + end if + +#ifdef DEV_LINALG_TIMING + call timab(TIMAB_XGEMM,2,tsec) +#endif + +end subroutine abi_zgemm_2r +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_abi_linalg/abi_d2zgemm +!! NAME +!! abi_d2zgemm +!! +!! FUNCTION +!! +!! INPUTS +!! +!! SOURCE +!! +subroutine abi_d2zgemm(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC,& + x_cplx) + +!Arguments ------------------------------------ + character(len=1), intent(in) :: transa + character(len=1), intent(in) :: transb + integer, intent(in) :: lda + integer, intent(in) :: ldb + integer, intent(in) :: ldc + integer, intent(in) :: m + integer, intent(in) :: n + integer, intent(in) :: k + complex(dpc),intent(in) :: alpha + complex(dpc),intent(in) :: beta + real(dp),target, intent(in) :: a(lda,*) ! FIXME should be lda * x_cplx + real(dp),target, intent(in) :: b(ldb,*) + real(dp),target, intent(inout) :: c(ldc,*) +!Only for lobpcgwf + integer, intent(in), optional :: x_cplx + +!Local variables------------------------------- + integer :: cplx_,info +#ifdef DEV_LINALG_TIMING + real(dp) :: tsec(2) + call timab(TIMAB_XGEMM,1,tsec) +#endif + + cplx_=1 ; if(PRESENT(x_cplx)) cplx_ = x_cplx + + if (ABI_LINALG_PLASMA_ISON) then + info = -1 +#ifdef HAVE_LINALG_PLASMA + !write(std_out,*) "Will call plasma_[zd]gemm" + if (cplx_ == 2) then + info = PLASMA_zgemm_c(trans_plasma(TRANSA),trans_plasma(TRANSB),M,N,K,& +& ALPHA,c_loc(A),LDA,c_loc(B),LDB,BETA,c_loc(C),LDC) + else + info = PLASMA_dgemm_c(trans_plasma(TRANSA),trans_plasma(TRANSB),M,N,K,& +& real(ALPHA,dp),c_loc(A),LDA,c_loc(B),LDB,real(BETA,dp),c_loc(C),LDC) + end if +#endif + ABI_CHECK(info==0,"PLASMA_[z,d]gemm_c returned info !=0") + else + if (cplx_ == 2) then + if (use_zgemm3m(m,n,k)) then + call _ZGEMM3M(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC) + else + call zgemm(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC) + end if + else + call dgemm(TRANSA,TRANSB,M,N,K,real(ALPHA,dp),A,LDA,B,LDB,real(BETA,dp),C,LDC) + end if + end if + +#ifdef DEV_LINALG_TIMING + call timab(TIMAB_XGEMM,2,tsec) +#endif + +end subroutine abi_d2zgemm +!!*** + +!---------------------------------------------------------------------- + diff --git a/GX-PAW/common/src/28_numeric_noabirule/abi_xheev.f90 b/GX-PAW/common/src/28_numeric_noabirule/abi_xheev.f90 new file mode 100644 index 00000000..38427a53 --- /dev/null +++ b/GX-PAW/common/src/28_numeric_noabirule/abi_xheev.f90 @@ -0,0 +1,286 @@ +!{\src2tex{textfont=tt}} +!!****f* m_abi_linalg/abi_xheev +!! NAME +!! abi_xheev +!! +!! FUNCTION +!! abi_xheev is the generic function that compute +!! all eigenvalues and, optionally, eigenvectors of a +!! symmetric or hermitian matrix A. +!! +!! COPYRIGHT +!! Copyright (C) 2001-2024 ABINIT group (LNguyen,FDahm,MT) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~ABINIT/Infos/copyright +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! SOURCE + +!!*** + +!!****f* m_abi_linalg/abi_dheev +!! NAME +!! abi_dheev +!! +!! FUNCTION +!! +!! INPUTS +!! +!! SOURCE +!! + subroutine abi_dheev(jobz,uplo,n,a,lda,w,& +& x_cplx,istwf_k,timopt,tim_xeigen,& +& use_gpu_elpa,use_gpu_magma,use_slk) + +!Arguments ------------------------------------ + character(len=1), intent(in) :: jobz + character(len=1), intent(in) :: uplo + integer, intent(in) :: n,lda + real(dp), intent(inout) :: a(n,*) ! FIXME should be cplex * lda + real(dp), intent(out) :: w(n) + integer, optional, intent(in) :: istwf_k + integer, optional, intent(in) :: x_cplx + integer, optional, intent(in) :: timopt,tim_xeigen + integer, optional, intent(in) :: use_gpu_elpa,use_gpu_magma,use_slk + +!Local variables------------------------------- + integer :: cplx_,istwf_k_,use_gpu_elpa_,use_gpu_magma_,use_slk_ + integer :: info + real(dp) :: tsec(2) + +! ********************************************************************* + + ABI_CHECK(lapack_full_storage,"BUG(1) in abi_dheev (storage)!") + ABI_CHECK(lapack_double_precision,"BUG(2) in abi_dheev (precision)!") + ABI_CHECK(n<=eigen_d_maxsize,"BUG(3) in abi_dheev (maxsize)!") + + if (present(tim_xeigen).and.present(timopt)) then + if(abs(timopt)==3) call timab(tim_xeigen,1,tsec) + end if + + cplx_=1 ; if(present(x_cplx)) cplx_ = x_cplx + use_gpu_magma_=0;if (present(use_gpu_magma)) use_gpu_magma_=use_gpu_magma + istwf_k_=1;if (present(istwf_k)) istwf_k_=istwf_k + use_slk_ = 0; if(present(use_slk)) use_slk_ = use_slk + use_gpu_elpa_=0 +#ifdef HAVE_LINALG_ELPA + if (present(use_gpu_elpa)) use_gpu_elpa_=use_gpu_elpa +#endif + +!===== MAGMA + if (ABI_LINALG_MAGMA_ISON.and.use_gpu_magma_==1) then +#if defined HAVE_LINALG_MAGMA + ABI_CHECK((lapack_divide_conquer),"BUG(4) in abi_dheev (d&c)!") + if (cplx_ == 2) then + call magmaf_zheevd(jobz,uplo,n,a,lda,w,eigen_z_work,eigen_z_lwork, & +& eigen_z_rwork,eigen_z_lrwork,eigen_iwork,eigen_liwork,info) + else + call magmaf_dsyevd(jobz,uplo,n,a,lda,w,eigen_d_work,eigen_d_lwork,& +& eigen_iwork,eigen_liwork,info) + endif +#endif + +!===== SCALAPACK + else if (ABI_LINALG_SCALAPACK_ISON.and.use_slk_==1.and.n>slk_minsize) then +#if defined HAVE_LINALG_SCALAPACK + ABI_CHECK(present(x_cplx),"BUG(5) in abi_dheev (x_cplx)!") + call compute_eigen1(slk_communicator,slk_processor,cplx_,n,n,a,w,istwf_k_,& +& use_gpu_elpa=use_gpu_elpa_) + info = 0 ! This is to avoid unwanted warning but it's not clean +#endif + +!===== PLASMA + !FDahm & LNGuyen (November 2012) : + ! In Plasma v 2.4.6, eigen routines support only + ! the eigenvalues computation (jobz=N) and not the + ! full eigenvectors bases determination (jobz=V) + else if (ABI_LINALG_PLASMA_ISON.and.LSAME(jobz,'N')) then +#if defined HAVE_LINALG_PLASMA + jobz_plasma_a = jobz_plasma(jobz) + if (cplx_ == 2) then + call PLASMA_Alloc_Workspace_zheev(n,n,plasma_work,info) + info = PLASMA_zheev_c(jobz_plasma(jobz),uplo_plasma(uplo),n,c_loc(a),lda,c_loc(w),& +& plasma_work,c_loc(eigen_z_work),n) + else + call PLASMA_Alloc_Workspace_dsyev(n,n,plasma_work,info) + info = PLASMA_dsyev_c(jobz_plasma(jobz),uplo_plasma(uplo),n,c_loc(a),lda,c_loc(w),& +& plasma_work,c_loc(eigen_d_work),n) + endif + call PLASMA_Dealloc_handle(plasma_work,info) +#endif + +!===== LAPACK + else + if (cplx_ == 2) then + call zheev(jobz,uplo,n,a,lda,w,eigen_z_work,eigen_z_lwork,eigen_z_rwork,info) + else + call dsyev(jobz,uplo,n,a,lda,w,eigen_d_work,eigen_d_lwork,info) + endif + end if + + if (present(tim_xeigen).and.present(timopt)) then + if(abs(timopt)==3) call timab(tim_xeigen,2,tsec) + end if + + ABI_CHECK(info==0,"abi_dheev returned info!=0!") + +#ifndef HAVE_LINALG_ELPA + ABI_UNUSED(use_gpu_elpa) +#endif + +end subroutine abi_dheev +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_abi_linalg/abi_cheev +!! NAME +!! abi_cheev +!! +!! FUNCTION +!! +!! INPUTS +!! +!! SOURCE + +subroutine abi_cheev(jobz,uplo,n,a,lda,w) + +!Arguments ------------------------------------ + character(len=1), intent(in) :: jobz + character(len=1), intent(in) :: uplo + integer, intent(in) :: n,lda + complex(spc), intent(inout) :: a(lda,*) + real(sp), intent(out) :: w(n) + +!Local variables------------------------------- + integer :: info,lwork + real(sp),pointer :: rwork(:) + complex(spc),pointer :: work(:) + +! ********************************************************************* + + ABI_CHECK(lapack_full_storage,"BUG(1) in abi_cheev (storage)!") + ABI_CHECK(lapack_single_precision,"BUG(2) in abi_cheev (precision)!") + ABI_CHECK(n<=eigen_c_maxsize,"BUG(3) in abi_cheev (maxsize)!") + + work => eigen_c_work ; rwork => eigen_c_rwork + lwork=eigen_c_lwork + +!===== PLASMA + !FDahm & LNGuyen (November 2012) : + ! In Plasma v 2.4.6, eigen routines support only + ! the eigenvalues computation (jobz=N) and not the + ! full eigenvectors bases determination (jobz=V) + if (ABI_LINALG_PLASMA_ISON.and.LSAME(jobz,'N')) then +#if defined HAVE_LINALG_PLASMA + if (eigen_c_lwork==0) then + ABI_MALLOC(work,(n**2)) + end if + call PLASMA_Alloc_Workspace_cheev(n,n,plasma_work,info) + info = PLASMA_cheev_c(jobz_plasma(jobz),uplo_plasma(uplo),n,c_loc(a),lda,c_loc(w),& +& plasma_work,c_loc(work),n) + call PLASMA_Dealloc_handle(plasma_work,info) + if (eigen_c_lwork==0) then + ABI_FREE(work) + end if +#endif + +!===== LAPACK + else + if (eigen_c_lwork==0) then + lwork=2*n-1 + ABI_MALLOC(work,(lwork)) + end if + if (eigen_c_lrwork==0) then + ABI_MALLOC(rwork,(3*n-2)) + end if + call cheev(jobz,uplo,n,a,lda,w,work,lwork,rwork,info) + if (eigen_c_lwork==0) then + ABI_FREE(work) + end if + if (eigen_c_lrwork==0) then + ABI_FREE(rwork) + end if + end if + + ABI_CHECK(info==0,"abi_cheev returned info!=!0") + +end subroutine abi_cheev +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_abi_linalg/abi_zheev +!! NAME +!! abi_zheev +!! +!! FUNCTION +!! +!! INPUTS +!! +!! SOURCE + +subroutine abi_zheev(jobz,uplo,n,a,lda,w) + +!Arguments ------------------------------------ + character(len=1), intent(in) :: jobz + character(len=1), intent(in) :: uplo + integer, intent(in) :: n,lda + complex(dpc), intent(inout) :: a(lda,*) + real(dp), intent(out) :: w(n) + +!Local variables------------------------------- + integer :: info,lwork + real(dp),pointer :: rwork(:) + complex(dpc),pointer :: work(:) + +! ********************************************************************* + + ABI_CHECK(lapack_full_storage,"BUG(1) in abi_zheev (storage)!") + ABI_CHECK(lapack_double_precision,"BUG(2) in abi_zheev (precision)!") + ABI_CHECK(n<=eigen_z_maxsize,"BUG(3) in abi_zheev (maxsize)!") + + work => eigen_z_work ; rwork => eigen_z_rwork + lwork=eigen_z_lwork + +!===== PLASMA + !FDahm & LNGuyen (November 2012) : + ! In Plasma v 2.4.6, eigen routines support only + ! the eigenvalues computation (jobz=N) and not the + ! full eigenvectors bases determination (jobz=V) + if (ABI_LINALG_PLASMA_ISON.and.LSAME(jobz,'N')) then +#if defined HAVE_LINALG_PLASMA + if (eigen_z_lwork==0) then + ABI_MALLOC(work,(n**2)) + end if + call PLASMA_Alloc_Workspace_zheev(n,n,plasma_work,info) + info = PLASMA_zheev_c(jobz_plasma(jobz),uplo_plasma(uplo),& +& plasma_work,c_loc(work),n) + call PLASMA_Dealloc_handle(plasma_work,info) + if (eigen_z_lwork==0) then + ABI_FREE(work) + end if +#endif + +!===== LAPACK + else + if (eigen_z_lwork==0) then + lwork=2*n-1 + ABI_MALLOC(work,(lwork)) + end if + if (eigen_z_lrwork==0) then + ABI_MALLOC(rwork,(3*n-2)) + end if + call zheev(jobz,uplo,n,a,lda,w,work,lwork,rwork,info) + if (eigen_z_lwork==0) then + ABI_FREE(work) + end if + if (eigen_z_lrwork==0) then + ABI_FREE(rwork) + end if + end if + + ABI_CHECK(info==0,"abi_zheev returned info !=0!") + +end subroutine abi_zheev +!!*** diff --git a/GX-PAW/common/src/28_numeric_noabirule/abi_xhegv.f90 b/GX-PAW/common/src/28_numeric_noabirule/abi_xhegv.f90 new file mode 100644 index 00000000..01405aa5 --- /dev/null +++ b/GX-PAW/common/src/28_numeric_noabirule/abi_xhegv.f90 @@ -0,0 +1,301 @@ +!{\src2tex{textfont=tt}} +!!****f* m_abi_linalg/abi_xhegv +!! NAME +!! abi_xhegv +!! +!! FUNCTION +!! abi_xhegv is the generic function that compute +!! all eigenvalues and, optionally, eigenvectors of a +!! generalized symmetric-definite eigenproblem, of the form +!! A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x. +!! Here A and B are assumed to be symmetric (or hermitian) and +!! B is also positive definite. +!! +!! COPYRIGHT +!! Copyright (C) 2001-2024 ABINIT group (LNguyen,FDahm,MT) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~ABINIT/Infos/copyright +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! SOURCE + +!!*** + +!!****f* m_abi_linalg/abi_dhegv +!! NAME +!! abi_dhegv +!! +!! FUNCTION +!! +!! INPUTS +!! +!! SOURCE +!! + + subroutine abi_dhegv(itype,jobz,uplo,n,a,lda,b,ldb,w, & +& x_cplx,istwf_k,timopt,tim_xeigen,& +& use_slk,use_gpu_elpa,use_gpu_magma) + +!Arguments ------------------------------------ + integer, intent(in) :: itype + character(len=1), intent(in) :: jobz + character(len=1), intent(in) :: uplo + integer, intent(in) :: n,lda,ldb + real(dp), intent(inout) :: a(n,*) ! FIXME should be cplex * lda + real(dp), intent(inout) :: b(n,*) + real(dp),target,intent(out) :: w(n) + integer, optional, intent(in) :: x_cplx + integer, optional, intent(in) :: istwf_k + integer, optional, intent(in) :: timopt,tim_xeigen + integer, optional, intent(in) :: use_gpu_elpa,use_gpu_magma,use_slk + +!Local variables ------------------------------------ + integer :: cplx_,istwf_k_,use_gpu_elpa_,use_gpu_magma_,use_slk_ + integer :: info + real(dp) :: tsec(2) + +! ********************************************************************* + + ABI_CHECK(lapack_full_storage,"BUG(1) in abi_dhegv (storage)!") + ABI_CHECK(lapack_double_precision,"BUG(2) in abi_dhegv (precision)!") + ABI_CHECK(n<=eigen_d_maxsize,"BUG(3) in abi_dhegv (maxsize)!") + + if (present(tim_xeigen).and.present(timopt)) then + if(abs(timopt)==3) call timab(tim_xeigen,1,tsec) + end if + + cplx_=1 ; if(present(x_cplx)) cplx_ = x_cplx + use_gpu_magma_=0; if (present(use_gpu_magma)) use_gpu_magma_=use_gpu_magma + use_slk_=0; if (present(use_slk)) use_slk_=use_slk + istwf_k_=1; if (present(istwf_k)) istwf_k_=istwf_k + use_gpu_elpa_=0 +#ifdef HAVE_LINALG_ELPA + if (present(use_gpu_elpa)) use_gpu_elpa_=use_gpu_elpa +#endif + + +!===== MAGMA + if (ABI_LINALG_MAGMA_ISON.and.use_gpu_magma_==1) then +#if defined HAVE_LINALG_MAGMA + ABI_CHECK((lapack_divide_conquer),"BUG(4) in abi_dhegv (d&c)!") + if (cplx_ == 2) then + call magmaf_zhegvd(itype,jobz,uplo,n,a,lda,b,ldb,w,eigen_z_work,eigen_z_lwork, & +& eigen_z_rwork,eigen_z_lrwork,eigen_iwork,eigen_liwork,info) + else + call magmaf_dsygvd(jobz,uplo,n,a,lda,w,eigen_d_work,eigen_d_lwork,& +& eigen_iwork,eigen_liwork,info) + endif +#endif + +!===== SCALAPACK + else if (ABI_LINALG_SCALAPACK_ISON.and.use_slk_==1.and.n>slk_minsize) then +#if defined HAVE_LINALG_SCALAPACK + ABI_CHECK(present(x_cplx),"BUG(5) in abi_dhegv (x_cplx)!") + call compute_eigen2(slk_communicator,slk_processor,cplx_,n,n,a,b,w,istwf_k_,& +& use_gpu_elpa=use_gpu_elpa_) + info = 0 ! This is to avoid unwanted warning but it's not clean +#endif + +!===== PLASMA + !FDahm & LNGuyen (November 2012) : + ! In Plasma v 2.4.6, eigen routines support only + ! the eigenvalues computation (jobz=N) and not the + ! full eigenvectors bases determination (jobz=V) + else if (ABI_LINALG_PLASMA_ISON.and.LSAME(jobz,'N')) then +#if defined HAVE_LINALG_PLASMA + if (cplx_ == 2) then + call PLASMA_Alloc_Workspace_zhegv(n,n,plasma_work,info) + info = PLASMA_zhegv_c(itype,jobz_plasma(jobz),uplo_plasma(uplo),n,c_loc(a),lda,& +& c_loc(b),ldb,c_loc(w),plasma_work,c_loc(eigen_z_work),n) + else + call PLASMA_Alloc_Workspace_dsygv(n,n,plasma_work,info) + info = PLASMA_dsygv_c(itype,jobz_plasma(jobz),uplo_plasma(uplo),n,c_loc(a),lda,& +& c_loc(b),ldb,c_loc(w),plasma_work,c_loc(eigen_d_work),n) + endif + call PLASMA_Dealloc_handle(plasma_work,info) +#endif + +!===== LAPACK + else + if (cplx_ == 2) then + call zhegv(itype,jobz,uplo,n,a,lda,b,ldb,w,eigen_z_work,eigen_z_lwork,eigen_z_rwork,info) + else + call dsygv(itype,jobz,uplo,n,a,lda,b,ldb,w,eigen_d_work,eigen_d_lwork,info) + endif + end if + + if (present(tim_xeigen).and.present(timopt)) then + if(abs(timopt)==3) call timab(tim_xeigen,2,tsec) + end if + + ABI_CHECK(info==0,"abi_dhegv returned info!=0!") + +#ifndef HAVE_LINALG_ELPA + ABI_UNUSED(use_gpu_elpa) +#endif + +end subroutine abi_dhegv +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_abi_linalg/abi_chegv +!! NAME +!! abi_chegv +!! +!! FUNCTION +!! +!! INPUTS +!! +!! SOURCE +!! +subroutine abi_chegv(itype,jobz,uplo,n,a,lda,b,ldb,w) + + implicit none + + !Arguments ------------------------------------ + integer,intent(in) :: itype + character(len=1), intent(in) :: jobz + character(len=1), intent(in) :: uplo + integer, intent(in) :: n,lda,ldb + complex(spc), intent(inout) :: a(lda,*) + complex(spc), intent(inout) :: b(ldb,*) + real(sp), intent(out) :: w(n) + +!Local variables------------------------------- + integer :: info,lwork + real(sp),pointer :: rwork(:) + complex(spc),pointer :: work(:) + +! ********************************************************************* + + ABI_CHECK(lapack_full_storage,"BUG(1) in abi_chegv (storage)!") + ABI_CHECK(lapack_single_precision,"BUG(2) in abi_chegv (precision)!") + ABI_CHECK(n<=eigen_c_maxsize,"BUG(3) in abi_chegv (maxsize)!") + + work => eigen_c_work ; rwork => eigen_c_rwork + lwork=eigen_c_lwork + +!===== PLASMA + !FDahm & LNGuyen (November 2012) : + ! In Plasma v 2.4.6, eigen routines support only + ! the eigenvalues computation (jobz=N) and not the + ! full eigenvectors bases determination (jobz=V) + if (ABI_LINALG_PLASMA_ISON.and.LSAME(jobz,'N')) then +#if defined HAVE_LINALG_PLASMA + if (eigen_c_lwork==0) then + ABI_MALLOC(work,(n**2)) + end if + call PLASMA_Alloc_Workspace_chegv(n,n,plasma_work,info) + info = call PLASMA_chegv(itype,jobz_plasma(jobz),uplo_plasma(uplo),n,a,lda,b,ldb,w,& +& plasma_work,c_loc(work),n) + call PLASMA_Dealloc_handle(plasma_work,info) + if (eigen_c_lwork==0) then + ABI_FREE(work) + end if +#endif + +!===== LAPACK + else + if (eigen_c_lwork==0) then + lwork=2*n-1 + ABI_MALLOC(work,(lwork)) + end if + if (eigen_c_lrwork==0) then + ABI_MALLOC(rwork,(3*n-2)) + end if + call chegv(itype,jobz,uplo,n,a,lda,b,ldb,w,work,lwork,rwork,info) + if (eigen_c_lwork==0) then + ABI_FREE(work) + end if + if (eigen_c_lrwork==0) then + ABI_FREE(rwork) + end if + end if + + ABI_CHECK(info==0,"abi_chegv returned info!=0!") + +end subroutine abi_chegv +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_abi_linalg/abi_zhegv +!! NAME +!! abi_zhegv +!! +!! FUNCTION +!! +!! INPUTS +!! +!! +!! SOURCE + +subroutine abi_zhegv(itype,jobz,uplo,n,a,lda,b,ldb,w) + + implicit none + +!Arguments ------------------------------------ + integer,intent(in) :: itype + character(len=1), intent(in) :: jobz + character(len=1), intent(in) :: uplo + integer, intent(in) :: n,lda,ldb + complex(dpc), intent(inout) :: a(lda,*) + complex(dpc), intent(inout) :: b(ldb,*) + real(dp), intent(out) :: w(n) + +!Local variables------------------------------- + integer :: info,lwork + real(dp),pointer :: rwork(:) + complex(dpc),pointer :: work(:) + +! ********************************************************************* + + ABI_CHECK(lapack_full_storage,"BUG(1) in abi_zhegv (storage)!") + ABI_CHECK(lapack_double_precision,"BUG(2) in abi_zhegv (precision)!") + ABI_CHECK(n<=eigen_z_maxsize,"BUG(3) in abi_zhegv (maxsize)!") + + work => eigen_z_work ; rwork => eigen_z_rwork + lwork=eigen_z_lwork + +!===== PLASMA + !FDahm & LNGuyen (November 2012) : + ! In Plasma v 2.4.6, eigen routines support only + ! the eigenvalues computation (jobz=N) and not the + ! full eigenvectors bases determination (jobz=V) + if (ABI_LINALG_PLASMA_ISON.and.LSAME(jobz,'N')) then +#if defined HAVE_LINALG_PLASMA + if (eigen_z_lwork==0) then + ABI_MALLOC(work,(n**2)) + end if + call PLASMA_Alloc_Workspace_zhegv(n,n,plasma_work,info) + call PLASMA_zhegv(itype,jobz_plasma(jobz),uplo_plasma(uplo),n,a,lda,b,ldb,w,& +& plasma_work,c_loc(work),n) + call PLASMA_Dealloc_handle(plasma_work,info) + if (eigen_z_lwork==0) then + ABI_FREE(work) + end if +#endif + +!===== LAPACK + else + if (eigen_z_lwork==0) then + lwork=2*n-1 + ABI_MALLOC(work,(lwork)) + end if + if (eigen_z_lrwork==0) then + ABI_MALLOC(rwork,(3*n-2)) + end if + call zhegv(itype,jobz,uplo,n,a,lda,b,ldb,w,work,lwork,rwork,info) + if (eigen_z_lwork==0) then + ABI_FREE(work) + end if + if (eigen_z_lrwork==0) then + ABI_FREE(rwork) + end if + end if + + ABI_CHECK(info==0,"abi_zhegv returned info!=0!") + +end subroutine abi_zhegv +!!*** diff --git a/GX-PAW/common/src/28_numeric_noabirule/abi_xhpev.f90 b/GX-PAW/common/src/28_numeric_noabirule/abi_xhpev.f90 new file mode 100644 index 00000000..d7b71c03 --- /dev/null +++ b/GX-PAW/common/src/28_numeric_noabirule/abi_xhpev.f90 @@ -0,0 +1,216 @@ +!{\src2tex{textfont=tt}} +!!****f* m_abi_linalg/abi_xhpev +!! NAME +!! abi_xhpev +!! +!! FUNCTION +!! abi_xhpev is the generic function that compute +!! all eigenvalues and, optionally, eigenvectors of a +!! symmetric or hermitian matrix A in packed storage +!! +!! COPYRIGHT +!! Copyright (C) 2001-2024 ABINIT group (LNguyen,FDahm,MT) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~ABINIT/Infos/copyright +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! SOURCE + +!!*** + +!!****f* m_abi_linalg/abi_dhpev +!! NAME +!! abi_dhpev +!! +!! FUNCTION +!! +!! INPUTS +!! +!! SOURCE + + subroutine abi_dhpev(jobz,uplo,n,a,w,z,ldz,istwf_k,use_slk,use_gpu_elpa) + + !Arguments ------------------------------------ + character(len=1), intent(in) :: jobz + character(len=1), intent(in) :: uplo + integer, intent(in) :: n,ldz + real(dp), intent(inout) :: a(:) + real(dp), intent(out) :: z(:,:) + real(dp), intent(out) :: w(:) + integer, optional, intent(in) :: istwf_k + integer, optional, intent(in) :: use_slk,use_gpu_elpa + +!Local variables------------------------------- + integer :: info,use_slk_,use_gpu_elpa_,istwf_k_ +#ifdef HAVE_LINALG_SCALAPACK + type(matrix_scalapack) :: sca_a,sca_ev + real(dp),allocatable :: tmp_evec(:,:) + integer :: dim_evec1,ierr +#endif + +! ********************************************************************* + + ABI_CHECK(lapack_packed_storage,"BUG(1) in abi_dhpev (storage)!") + ABI_CHECK(lapack_double_precision,"BUG(2) in abi_dhpev (precision)!") + ABI_CHECK(n<=eigen_d_maxsize,"BUG(3) in abi_dhpev (maxsize)!") + + info = 0 ! to avoid unwanted warnings but scalapack doesn't check return + + use_slk_ = 0; if (present(use_slk)) use_slk_ = use_slk + istwf_k_ = 1; if (present(istwf_k)) istwf_k_ = istwf_k + use_gpu_elpa_=0 +#ifdef HAVE_LINALG_ELPA + if (present(use_gpu_elpa)) use_gpu_elpa_=use_gpu_elpa +#endif + +!===== SCALAPACK + if (ABI_LINALG_SCALAPACK_ISON.and.use_slk_==1.and.n>slk_minsize) then +#if defined HAVE_LINALG_SCALAPACK + ! if istwfk=1, then dim_evec1=2*n and if istwfk=2, dim_evec1=n + dim_evec1= 2*n/istwf_k_ + ABI_MALLOC(tmp_evec,(dim_evec1,n)) + tmp_evec = zero + call sca_a%init(n,n,slk_processor,istwf_k_) + call sca_ev%init(n,n,slk_processor,istwf_k_) +#ifdef HAVE_LINALG_ELPA + call matrix_from_global_sym(sca_a,a,istwf_k_) +#else + call matrix_from_global(sca_a,a,istwf_k_) +#endif + call compute_eigen_problem(slk_processor,sca_a,sca_ev,w,slk_communicator,istwf_k_,& +& use_gpu_elpa=use_gpu_elpa_) + call matrix_to_global(sca_a,a,istwf_k_) + call matrix_to_reference(sca_ev,tmp_evec,istwf_k_) + call xmpi_sum(tmp_evec,z,dim_evec1*n,slk_communicator,ierr) + call sca_a%free() + call sca_ev%free() + ABI_FREE(tmp_evec) +#endif + +!===== LAPACK + else + if (istwf_k_/=2) then + call zhpev(jobz,uplo,n,a,w,z,ldz,eigen_z_work,eigen_z_rwork,info) + else + call dspev(jobz,uplo,n,a,w,z,ldz,eigen_d_work,info) + end if + end if + + ABI_CHECK(info==0,"dhpev returned info!=0") + +#ifndef HAVE_LINALG_ELPA + ABI_UNUSED(use_gpu_elpa) +#endif + +end subroutine abi_dhpev +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_abi_linalg/abi_chpev +!! NAME +!! abi_chpev +!! +!! FUNCTION +!! +!! INPUTS +!! +!! SOURCE + + subroutine abi_chpev(jobz,uplo,n,a,w,z,ldz) + + !Arguments ------------------------------------ + character(len=1), intent(in) :: jobz + character(len=1), intent(in) :: uplo + integer, intent(in) :: n,ldz + complex(spc), intent(inout) :: a(:,:) + complex(spc), intent(out) :: z(:,:) + real(sp), intent(out) :: w(:) + +!Local variables------------------------------- + integer :: info + real(sp),pointer :: rwork(:) + complex(spc),pointer :: work(:) + +! ********************************************************************* + + ABI_CHECK(lapack_packed_storage,"BUG(1) in abi_chpev (storage)!") + ABI_CHECK(lapack_single_precision,"BUG(2) in abi_chpev (precision)!") + ABI_CHECK(n<=eigen_c_maxsize,"BUG(3) in abi_chpev (maxsize)!") + + work => eigen_c_work ; rwork => eigen_c_rwork + +!===== LAPACK + if (eigen_c_lwork==0) then + ABI_MALLOC(work,(2*n-1)) + end if + if (eigen_c_lrwork==0) then + ABI_MALLOC(rwork,(3*n-2)) + end if + call chpev(jobz,uplo,n,a,w,z,ldz,work,rwork,info) + if (eigen_c_lwork==0) then + ABI_FREE(work) + end if + if (eigen_c_lrwork==0) then + ABI_FREE(rwork) + end if + + ABI_CHECK(info==0,"abi_chpev returned info!=0!") + +end subroutine abi_chpev +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_abi_linalg/abi_zhpev +!! NAME +!! abi_zhpev +!! +!! FUNCTION +!! +!! INPUTS +!! +!! SOURCE + + subroutine abi_zhpev(jobz,uplo,n,a,w,z,ldz) + +!Arguments ------------------------------------ + character(len=1), intent(in) :: jobz + character(len=1), intent(in) :: uplo + integer, intent(in) :: n,ldz + complex(dpc), intent(inout) :: a(:,:) + complex(dpc), intent(out) :: z(:,:) + real(dp), intent(out) :: w(:) + +!Local variables------------------------------- + integer :: info + real(dp),pointer :: rwork(:) + complex(dpc),pointer :: work(:) + +! ********************************************************************* + + ABI_CHECK(lapack_packed_storage,"BUG(1) in abi_zhpev (storage)!") + ABI_CHECK(lapack_double_precision,"BUG(2) in abi_zhpev (precision)!") + ABI_CHECK(n<=eigen_z_maxsize,"BUG(3) in abi_zhpev (maxsize)!") + + work => eigen_z_work ; rwork => eigen_z_rwork + +!===== LAPACK + if (eigen_z_lwork==0) then + ABI_MALLOC(work,(2*n-1)) + end if + if (eigen_z_lrwork==0) then + ABI_MALLOC(rwork,(3*n-2)) + end if + call zhpev(jobz,uplo,n,a,w,z,ldz,work,rwork,info) + if (eigen_z_lwork==0) then + ABI_FREE(work) + end if + if (eigen_z_lrwork==0) then + ABI_FREE(rwork) + end if + + ABI_CHECK(info==0,"abi_zhpev returned info!=0!") + +end subroutine abi_zhpev +!!*** diff --git a/GX-PAW/common/src/28_numeric_noabirule/abi_xhpgv.f90 b/GX-PAW/common/src/28_numeric_noabirule/abi_xhpgv.f90 new file mode 100644 index 00000000..7a529d8b --- /dev/null +++ b/GX-PAW/common/src/28_numeric_noabirule/abi_xhpgv.f90 @@ -0,0 +1,239 @@ +!{\src2tex{textfont=tt}} +!!****f* m_abi_linalg/abi_xhpgv +!! NAME +!! abi_xhpgv +!! +!! FUNCTION +!! abi_xhpgv is the generic function that compute +!! all eigenvalues and, optionally, eigenvectors of a +!! generalized symmetric-definite eigenproblem, of the form +!! A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x. +!! Here A and B are assumed to be symmetric (or hermitian), +!! stored in packed format and B is also positive definite. +!! +!! COPYRIGHT +!! Copyright (C) 2001-2024 ABINIT group (LNguyen,FDahm,MT) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~ABINIT/Infos/copyright +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! SOURCE +!!*** + +!!****f* m_abi_linalg/abi_dhpgv +!! NAME +!! abi_dhpgv +!! +!! FUNCTION +!! +!! INPUTS +!! +!! SOURCE +!! + subroutine abi_dhpgv(itype,jobz,uplo,n,a,b,w,z,ldz,istwf_k,use_slk,use_gpu_elpa) + + use m_fstrings, only : sjoin, itoa + +!Arguments ------------------------------------ + integer :: itype + character(len=1), intent(in) :: jobz + character(len=1), intent(in) :: uplo + integer, intent(in) :: n,ldz + real(dp), intent(inout) :: a(:) + real(dp), intent(inout) :: b(:) + real(dp), intent(out) :: z(:,:) + real(dp), intent(out) :: w(:) + integer, optional, intent(in) :: istwf_k + integer, optional, intent(in) :: use_slk,use_gpu_elpa + +!Local variables------------------------------- + integer :: info,use_slk_,use_gpu_elpa_,istwf_k_ +#ifdef HAVE_LINALG_SCALAPACK + type(matrix_scalapack) :: sca_a,sca_b,sca_ev + integer :: ierr +#endif + +! ********************************************************************* + + ABI_CHECK(lapack_packed_storage,"BUG(1) in abi_dhpgv (storage)!") + ABI_CHECK(lapack_double_precision,"BUG(2) in abi_dhpgv (precision)!") + ABI_CHECK(n<=eigen_d_maxsize,"BUG(3) in abi_dhpgv (maxsize)!") + + info = 0 !to avoid unwanted warning when info is not set by scalapack + + use_slk_ = 0; if (present(use_slk)) use_slk_ = use_slk + istwf_k_ = 1; if (present(istwf_k)) istwf_k_ = istwf_k + use_gpu_elpa_=0 +#ifdef HAVE_LINALG_ELPA + if (present(use_gpu_elpa)) use_gpu_elpa_=use_gpu_elpa +#endif + +!===== SCALAPACK + if (ABI_LINALG_SCALAPACK_ISON.and.use_slk_==1.and.n>slk_minsize) then +#if defined HAVE_LINALG_SCALAPACK + z = zero + call sca_a%init(n,n,slk_processor,istwf_k_) + call sca_b%init(n,n,slk_processor,istwf_k_) + call sca_ev%init(n,n,slk_processor,istwf_k_) +#ifdef HAVE_LINALG_ELPA + call matrix_from_global_sym(sca_a,a,istwf_k_) + call matrix_from_global_sym(sca_b,b,istwf_k_) +#else + call matrix_from_global(sca_a,a,istwf_k_) + call matrix_from_global(sca_b,b,istwf_k_) +#endif + call compute_generalized_eigen_problem(slk_processor,sca_a,sca_b,& +& sca_ev,w,slk_communicator,istwf_k_,use_gpu_elpa=use_gpu_elpa_) + call matrix_to_global(sca_a,a,istwf_k_) + call matrix_to_global(sca_b,b,istwf_k_) + call matrix_to_reference(sca_ev,z,istwf_k_) + call xmpi_sum(z,slk_communicator,ierr) + call sca_a%free() + call sca_ev%free() +#endif + +!===== LAPACK + else + if (istwf_k_/=2) then + call zhpgv(itype,jobz,uplo,n,a,b,w,z,ldz,eigen_z_work,eigen_z_rwork,info) + else + call dspgv(itype,jobz,uplo,n,a,b,w,z,ldz,eigen_d_work,info) + endif + end if + + if (info < 0) then + ABI_COMMENT(sjoin("argument #", itoa(-info), "had an illegal value")) + end if + + if (info > 0) then + ABI_COMMENT("DSPEV failed to converge") + if (info <= n) then + ABI_COMMENT(sjoin("DSPEV failed to converge;", itoa(info), " off-diagonal elements of")) + ABI_COMMENT(" an intermediate tridiagonal form did not converge to zero.") + else + ABI_COMMENT("The factorization of B could not be completed and no eigenvalues or eigenvectors were computed.") + endif + end if + + ABI_CHECK(info==0,"abi_dhpgv returned info!=0!") + +#ifndef HAVE_LINALG_ELPA + ABI_UNUSED(use_gpu_elpa) +#endif + +end subroutine abi_dhpgv +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_abi_linalg/abi_chpgv +!! NAME +!! abi_chpgv +!! +!! FUNCTION +!! +!! INPUTS +!! +!! SOURCE +!! + subroutine abi_chpgv(itype,jobz,uplo,n,a,b,w,z,ldz) + +!Arguments ------------------------------------ + integer,intent(in) :: itype + character(len=1), intent(in) :: jobz + character(len=1), intent(in) :: uplo + integer, intent(in) :: n,ldz + complex(spc), intent(inout) :: a(:,:) + complex(spc), intent(inout) :: b(:,:) + complex(spc), intent(out) :: z(:,:) + real(sp), intent(out) :: w(:) + +!Local variables------------------------------- + integer :: info + real(sp),pointer :: rwork(:) + complex(spc),pointer :: work(:) + +! ********************************************************************* + + ABI_CHECK(lapack_packed_storage,"BUG(1) in abi_chpgv (storage)!") + ABI_CHECK(lapack_single_precision,"BUG(2) in abi_chpgv (precision)!") + ABI_CHECK(n<=eigen_c_maxsize,"BUG(3) in abi_chpgv (maxsize)!") + + work => eigen_c_work ; rwork => eigen_c_rwork + +!===== LAPACK + if (eigen_c_lwork==0) then + ABI_MALLOC(work,(2*n-1)) + end if + if (eigen_c_lrwork==0) then + ABI_MALLOC(rwork,(3*n-2)) + end if + call chpgv(itype,jobz,uplo,n,a,b,w,z,ldz,work,rwork,info) + if (eigen_c_lwork==0) then + ABI_FREE(work) + end if + if (eigen_c_lrwork==0) then + ABI_FREE(rwork) + end if + + ABI_CHECK(info==0,"abi_chpgv returned info!=0!") + +end subroutine abi_chpgv +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_abi_linalg/abi_zhpgv +!! NAME +!! abi_zhpgv +!! +!! FUNCTION +!! +!! INPUTS +!! +!! SOURCE + +subroutine abi_zhpgv(itype,jobz,uplo,n,a,b,w,z,ldz) + +!Arguments ------------------------------------ + integer,intent(in) :: itype + integer, intent(in) :: n,ldz + character(len=1), intent(in) :: jobz + character(len=1), intent(in) :: uplo + complex(dpc), intent(inout) :: a(:,:) + complex(dpc), intent(inout) :: b(:,:) + complex(dpc), intent(out) :: z(:,:) + real(dp), intent(out) :: w(:) + +!Local variables------------------------------- + integer :: info + real(dp),pointer :: rwork(:) + complex(dpc),pointer :: work(:) + +! ********************************************************************* + + ABI_CHECK(lapack_packed_storage,"BUG(1) in abi_zhpgv (storage)!") + ABI_CHECK(lapack_double_precision,"BUG(2) in abi_zhpgv (precision)!") + ABI_CHECK(n<=eigen_z_maxsize,"BUG(3) in abi_zhpgv (maxsize)!") + + work => eigen_z_work ; rwork => eigen_z_rwork + +!===== LAPACK + if (eigen_z_lwork==0) then + ABI_MALLOC(work,(2*n-1)) + end if + if (eigen_z_lrwork==0) then + ABI_MALLOC(rwork,(3*n-2)) + end if + call zhpgv(itype,jobz,uplo,n,a,b,w,z,ldz,work,rwork,info) + if (eigen_z_lwork==0) then + ABI_FREE(work) + end if + if (eigen_z_lrwork==0) then + ABI_FREE(rwork) + end if + + ABI_CHECK(info==0,"abi_zhpgv returned info!=0!") + +end subroutine abi_zhpgv +!!*** diff --git a/GX-PAW/common/src/28_numeric_noabirule/abi_xorthonormalize.f90 b/GX-PAW/common/src/28_numeric_noabirule/abi_xorthonormalize.f90 new file mode 100644 index 00000000..b482df69 --- /dev/null +++ b/GX-PAW/common/src/28_numeric_noabirule/abi_xorthonormalize.f90 @@ -0,0 +1,244 @@ +!{\src2tex{textfont=tt}} +!!****f* m_abi_linalg/abi_xorthonormalize +!! NAME +!! abi_xorthonormalize +!! +!! FUNCTION +!! abi_xorthonormalize is the generic function for computing the +!! overlap of two complex wavefunctions (for a given number of bands) +!! and orthonormalizes it: +!! +!! COPYRIGHT +!! Copyright (C) 2001-2024 ABINIT group (LNguyen,FDahm (CS), FBottin, GZ, AR, MT) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~ABINIT/Infos/copyright +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! SOURCE + +!!*** + +!!****f* m_abi_linalg/xorthonormalize +!! NAME +!! xorthonormalize +!! +!! FUNCTION +!! This routine computes the overlap of two complex wavefunctions (for a given number of bands) +!! and orthonormalizes it: +!! - Computes the products of two rectangular matrices +!! containing the wavefunctions psi and S.psi (where S is the +!! overlap (with the PAW terms if necessary)). +!! - Does a Cholesky decomposition of this overlap +!! - rotates the initial matrix blockvectorx by the triangular matrix to +!! have an orthonormal set of wavefunctions +!! +!! INPUTS +!! blockvectorbx = matrix of dimension (blocksize,vectsize) +!! (e.g. block of overlap*wavefunction) +!! blocksize = dimension of matrices (e.g number of bands) +!! spaceComm = communicator used for MPI parallelization +!! vectsize = dimension of matrices (e.g number of G vector) +!! +!! OUTPUT +!! sqgram = Choleski decomposition of transpose(blockvector)*blockvectorx +!! +!! SIDE EFFECTS +!! blockvectorx = on input, matrix of dimension (vectsize,blocksize) +!! (e.g block of wavefunction) +!! blockvectorx = on output, orthonormalized wavefunction. +!! +!! +!! SOURCE + +subroutine xorthonormalize(blockvectorx,blockvectorbx,blocksize,spaceComm,sqgram,vectsize,& +& x_cplx,timopt,tim_xortho) ! optional arguments + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: blocksize,vectsize,spaceComm,x_cplx + integer, intent(in), optional :: timopt,tim_xortho + !arrays + real(dp),intent(in) :: blockvectorbx(vectsize,blocksize) + real(dp),intent(inout) :: blockvectorx(vectsize,blocksize) + real(dp),intent(out) :: sqgram(x_cplx*blocksize,blocksize) + +!Local variables------------------------------- + real(dp) :: tsec(2) + integer :: ierr,info + character(len=500) :: message + character, dimension(2) :: cparam + + ! ********************************************************************* + + if (present(tim_xortho).and.present(timopt)) then + if(abs(timopt)==3) then + call timab(tim_xortho,1,tsec) + end if + end if + + cparam(1)='t' + cparam(2)='c' + + call abi_xgemm(cparam(x_cplx),'n',blocksize,blocksize,vectsize,cone,blockvectorx,& +& vectsize,blockvectorbx,vectsize,czero,sqgram,blocksize,x_cplx=x_cplx) + + call xmpi_sum(sqgram,spaceComm,ierr) + + !Cholesky factorization of sqgram (ouside upper Triangular of sqgram) + call abi_xpotrf('u',blocksize,sqgram,blocksize,info,x_cplx=x_cplx) + + if (info /= 0 ) then + write(message,'(a,i0)')'abi_xpotrf, info=',info + ABI_ERROR(message) + end if + + !Find X X*sqgram=blockvectorx + call abi_xtrsm('r','u','n','n',vectsize,blocksize,cone,sqgram,blocksize,& +& blockvectorx,vectsize,x_cplx=x_cplx) + + if (present(tim_xortho).and.present(timopt)) then + if(abs(timopt)==3) then + call timab(tim_xortho,2,tsec) + end if + end if + +end subroutine xorthonormalize +!!*** + +!!****f* ABINIT/ortho_reim +!! NAME +!! ortho_reim +!! +!! FUNCTION +!! This routine computes the overlap of two wavefunctions (for a given number of bands) +!! and orthonormalizes it: +!! - Computes the products of two rectangular matrices +!! containing the wavefunctions psi and S.psi (where S is the +!! overlap (with the PAW terms if necessary)). +!! - Does a Cholesky decomposition of this overlap +!! - rotates the initial matrix blockvectorx by the triangular matrix to +!! have an orthonormal set of wavefunctions +!! +!! This version operates on arrays in which the real and the imaginary part +!! are packed together (real parts first, them imaginary parts), used when istwfk=2 +!! +!! INPUTS +!! blockvectorbx = matrix of dimension (blocksize,vectsize) +!! (e.g. block of overlap*wavefunction) +!! blocksize = dimension of matrices (e.g number of bands) +!! spaceComm = communicator used for MPI parallelization +!! vectsize = dimension of matrices (e.g number of G vector) +!! +!! OUTPUT +!! sqgram = Choleski decomposition of transpose(blockvector)*blockvectorx +!! +!! SIDE EFFECTS +!! blockvectorx = on input, matrix of dimension (vectsize,blocksize) +!! (e.g block of wavefunction) +!! blockvectorx = on output, orthonormalized wavefunction. +!! +!! SOURCE + +subroutine ortho_reim(blockvectorx,blockvectorbx,blocksize,spaceComm,sqgram,vectsize) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: blocksize,vectsize,spaceComm +!arrays + real(dp),intent(in) :: blockvectorbx(vectsize,blocksize) + real(dp),intent(inout) :: blockvectorx(vectsize,blocksize) + real(dp),intent(out) :: sqgram(blocksize,blocksize) + +!Local variables------------------------------- +!scalars + integer :: ierr,info + character(len=500) :: message + +! ********************************************************************* + + call abi_xgemm('t','n',blocksize,blocksize,vectsize,cone,blockvectorx,& +& vectsize,blockvectorbx,vectsize,czero,sqgram,blocksize) + + call xmpi_sum(sqgram,spaceComm,ierr) + + !Cholesky factorization of sqgram (ouside upper Triangular of sqgram) + call abi_d2zpotrf('u',blocksize,sqgram,blocksize,info) !vz_d + + if (info /= 0 ) then + write(message,'(a,i0)')'dpotrf, info=',info + ABI_ERROR(message) + end if + +!Find X X*sqgram=blockvectorx + call abi_xtrsm('r','u','n','n',vectsize,blocksize,one,sqgram,blocksize,blockvectorx,vectsize) + +end subroutine ortho_reim +!!*** + + +!!****f* ABINIT/zorthonormalize +!! NAME +!! zorthonormalize +!! +!! FUNCTION +!! This routine computes the overlap of two complex wavefunctions (for a given number of bands) +!! and orthonormalizes it: +!! - Computes the products of two rectangular matrices +!! containing the wavefunctions psi and S.psi (where S is the +!! overlap (with the PAW terms if necessary)). +!! - Does a Cholesky decomposition of this overlap +!! - rotates the initial matrix blockvectorx by the triangular matrix to +!! have an orthonormal set of wavefunctions +!! +!! INPUTS +!! blockvectorbx = matrix of dimension (blocksize,vectsize) +!! (e.g. block of overlap*wavefunction) +!! blocksize = dimension of matrices (e.g number of bands) +!! spaceComm = communicator used for MPI parallelization +!! vectsize = dimension of matrices (e.g number of G vector) +!! +!! OUTPUT +!! sqgram = Choleski decomposition of transpose(blockvector)*blockvectorx +!! +!! SIDE EFFECTS +!! blockvectorx = on input, matrix of dimension (vectsize,blocksize) +!! (e.g block of wavefunction) +!! blockvectorx = on output, orthonormalized wavefunction. +!! +!! +!! SOURCE + +subroutine zorthonormalize(blockvectorx,blockvectorbx,blocksize,spaceComm,sqgram,vectsize) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: blocksize,spaceComm,vectsize +!arrays + complex(dpc),intent(in) :: blockvectorbx(vectsize,blocksize) + complex(dpc),intent(inout) :: blockvectorx(vectsize,blocksize) + complex(dpc),intent(out) :: sqgram(blocksize,blocksize) + +!Local variables------------------------------- +!scalars + integer :: ierr,info + character(len=500) :: message + +! ********************************************************************* + + call abi_xgemm('c','n',blocksize,blocksize,vectsize,cone,blockvectorx,& +& vectsize,blockvectorbx,vectsize,czero,sqgram,blocksize) + + call xmpi_sum(sqgram,spaceComm,ierr) + + call abi_xpotrf('u',blocksize,sqgram,blocksize,info) + + if (info /= 0 ) then + write(message,'(a,i0)')'zpotrf, info=',info + ABI_ERROR(message) + end if + + call abi_xtrsm('r','u','n','n',vectsize,blocksize,cone,sqgram,blocksize,blockvectorx,vectsize) + +end subroutine zorthonormalize +!!*** + diff --git a/GX-PAW/common/src/28_numeric_noabirule/abi_xpotrf.f90 b/GX-PAW/common/src/28_numeric_noabirule/abi_xpotrf.f90 new file mode 100644 index 00000000..6e4921ec --- /dev/null +++ b/GX-PAW/common/src/28_numeric_noabirule/abi_xpotrf.f90 @@ -0,0 +1,160 @@ +!{\src2tex{textfont=tt}} +!!****f* m_abi_linalg/abi_xpotrf +!! NAME +!! abi_xpotrf +!! +!! FUNCTION +!! abi_xpotrf is the generic function for computing the +!! Cholesky factorization of a real symmetric (or hermitian) +!! positive definite matrix A. +!! The factorization has the form +!! A = U**T * U, if UPLO = 'U', or +!! A = L * L**T, if UPLO = 'L', +!! where U is an upper triangular matrix and L is lower triangular. +!! +!! COPYRIGHT +!! Copyright (C) 2001-2024 ABINIT group (LNguyen,FDahm (CS)) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~ABINIT/Infos/copyright +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! SOURCE + +!!*** + +!!****f* m_abi_linalg/abi_dpotrf +!! NAME +!! abi_dpotrf +!! +!! FUNCTION +!! +!! INPUTS +!! +!! SOURCE + +subroutine abi_dpotrf(uplo,n,a,lda,info) + + !Arguments ------------------------------------ + character(len=1), intent(in) :: uplo + integer, intent(in) :: n,lda + integer, intent(out) :: info + real(dp), intent(inout) :: a(*) + +! ********************************************************************* + +#ifdef HAVE_LINALG_PLASMA + if (ABI_LINALG_PLASMA_ISON) then + ! write(std_out,*) " abi_dpotrf => PLASMA dpotrf will be called " + call PLASMA_dpotrf(uplo_plasma(uplo),n,a,lda,info) + return + end if +#endif + + call dpotrf(uplo,n,a,lda,info) + +end subroutine abi_dpotrf +!!*** + +!!****f* m_abi_linalg/abi_zpotrf_2d +!! NAME +!! abi_zpotrf_2d +!! +!! FUNCTION +!! +!! INPUTS +!! +!! SOURCE + +subroutine abi_zpotrf_2d(uplo,n,a,lda,info) + + !Arguments ------------------------------------ + character(len=1), intent(in) :: uplo + integer, intent(in) :: lda,n + integer, intent(out) :: info + complex(dpc), intent(inout) :: a(lda,*) + +! ********************************************************************* + + call abi_zpotrf(uplo,n,a(1,1),lda,info) + +end subroutine abi_zpotrf_2d +!!*** + +!!****f* m_abi_linalg/abi_d2zpotrf +!! NAME +!! abi_d2zpotrf +!! +!! FUNCTION +!! +!! INPUTS +!! +!! SOURCE + +subroutine abi_d2zpotrf(uplo,n,a,lda,info,x_cplx) + +!Arguments ------------------------------------ + character(len=1), intent(in) :: uplo + integer, intent(in) :: n,lda + integer, intent(out) :: info + integer, intent(in), optional :: x_cplx + real(dp),target, intent(inout) :: a(lda,*) ! FIXME should be x_cplx * lda + + !Local Variables ----------------------------- + integer :: cplx_ + +! ********************************************************************* + + cplx_=1 ; if(PRESENT(x_cplx)) cplx_ = x_cplx + +#ifdef HAVE_LINALG_PLASMA + if (ABI_LINALG_PLASMA_ISON) then + if(cplx_ == 2) then + info = PLASMA_zpotrf_c(uplo_plasma(uplo),n,c_loc(a),lda) + else + info = PLASMA_dpotrf_c(uplo_plasma(uplo),n,c_loc(a),lda) + end if + return + end if +#endif + + if(cplx_ == 2) then + call zpotrf(uplo,n,a,lda,info) + else + call dpotrf(uplo,n,a,lda,info) + end if + +end subroutine abi_d2zpotrf +!!*** + +!!****f* m_abi_linalg/abi_zpotrf +!! NAME +!! abi_zpotrf +!! +!! FUNCTION +!! +!! INPUTS +!! +!! SOURCE + +subroutine abi_zpotrf(uplo,n,a,lda,info) + + !Arguments ------------------------------------ + character(len=1), intent(in) :: uplo + integer, intent(in) :: lda,n + integer, intent(out) :: info + complex(dpc), intent(inout) :: a(*) + +! ********************************************************************* + +#ifdef HAVE_LINALG_PLASMA + if (ABI_LINALG_PLASMA_ISON) then + ! write(*,*) " abi_zpotrf => PLASMA zpotrf will be called " + call PLASMA_zpotrf(uplo_plasma(uplo),n,a,lda,info) + return + end if +#endif + + call zpotrf(uplo,n,a,lda,info) + +end subroutine abi_zpotrf +!!*** diff --git a/GX-PAW/common/src/28_numeric_noabirule/abi_xtrsm.f90 b/GX-PAW/common/src/28_numeric_noabirule/abi_xtrsm.f90 new file mode 100644 index 00000000..adbb3431 --- /dev/null +++ b/GX-PAW/common/src/28_numeric_noabirule/abi_xtrsm.f90 @@ -0,0 +1,247 @@ +!{\src2tex{textfont=tt}} +!!****f* m_abi_linalg/abi_xtrsm +!! NAME +!! abi_xtrsm +!! +!! FUNCTION +!! abi_xtrsm is the generic function that solve : +!! * op( A )*X = alpha*B, or X*op( A ) = alpha*B, +!! * +!! * where alpha is a scalar, X and B are m by n matrices, A is a unit, or +!! * non-unit, upper or lower triangular matrix and op( A ) is one of +!! * +!! * op( A ) = A or op( A ) = A**T. +!! * +!! * The matrix X is overwritten on B. +!! +!! COPYRIGHT +!! Copyright (C) 2001-2024 ABINIT group (LNguyen,FDahm (CS)) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~ABINIT/Infos/copyright +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! SOURCE + +!!*** + +!!****f* m_abi_linalg/abi_ztrsm +!! NAME +!! abi_ztrsm +!! +!! FUNCTION +!! +!! INPUTS +!! +!! SOURCE + +subroutine abi_ztrsm(side,uplo,transa,diag,m,n,alpha,a,lda,b,ldb) + +!Arguments------------------------------------- + character(len=1), intent(in) :: side + character(len=1), intent(in) :: uplo + character(len=1), intent(in) :: transa + character(len=1), intent(in) :: diag + integer, intent(in) :: m,n,ldb,lda + complex(dpc), intent(in) :: alpha + complex(dpc),target,intent(in) :: a(lda,*) + complex(dpc),target,intent(inout) :: b(ldb,*) + +!Local variables------------------------------- +#ifdef HAVE_LINALG_PLASMA + integer :: info +#endif + +#ifdef DEV_LINALG_TIMING + real(dp) :: tsec(2) + call timab(TIMAB_XTRSM,1,tsec) +#endif + + if (ABI_LINALG_PLASMA_ISON) then +#ifdef HAVE_LINALG_PLASMA + info = PLASMA_ztrsm_c(side_plasma(side),uplo_plasma(uplo),trans_plasma(transa),diag_plasma(diag),& +& m,n,alpha,c_loc(a),lda,c_loc(b),ldb) +#endif + else + call ztrsm(side,uplo,transa,diag,m,n,alpha,a,lda,b,ldb) + end if + +#ifdef DEV_LINALG_TIMING + call timab(TIMAB_XTRSM,2,tsec) +#endif + +end subroutine abi_ztrsm +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_abi_linalg/abi_dtrsm +!! NAME +!! abi_dtrsm +!! +!! FUNCTION +!! +!! INPUTS +!! +!! SOURCE + + subroutine abi_dtrsm(side,uplo,transa,diag,m,n,alpha,a,lda,b,ldb,& +& x_cplx) + + !Arguments------------------------------------- + character(len=1), intent(in) :: side,uplo,transa,diag + integer, intent(in) :: m,n,lda,ldb + real(dp), intent(in) :: alpha + real(dp),target, intent(in) :: a(lda,*) ! FIXME should be lda * x_cplx + real(dp),target, intent(inout) :: b(ldb,*) + !Only for lobpcgwf + integer, intent(in), optional :: x_cplx + + !Local variables------------------------------- + integer :: cplx_ +#ifdef HAVE_LINALG_PLASMA + integer :: info +#endif + +#ifdef DEV_LINALG_TIMING + real(dp) :: tsec(2) + call timab(TIMAB_XTRSM,1,tsec) +#endif + + cplx_=1 ; if(PRESENT(x_cplx)) cplx_ = x_cplx + + if (ABI_LINALG_PLASMA_ISON) then +#ifdef HAVE_LINALG_PLASMA + if(cplx_ == 2) then + info = PLASMA_ztrsm_c(side_plasma(side),uplo_plasma(uplo),trans_plasma(TRANSA),diag_plasma(diag),& +& m,n,cmplx(alpha,0.d0,dpc),c_loc(a),lda,c_loc(b),ldb) + else + info = PLASMA_dtrsm_c(side_plasma(side),uplo_plasma(uplo),trans_plasma(TRANSA),diag_plasma(diag),& +& m,n,alpha,c_loc(a),lda,c_loc(b),ldb) + end if +#endif + else + if(cplx_ == 2) then + call ztrsm(side,uplo,transa,diag,m,n,cmplx(alpha,0.d0,dpc),a,lda,b,ldb) + else + call dtrsm(side,uplo,transa,diag,m,n,alpha,a,lda,b,ldb) + end if + end if + +#ifdef DEV_LINALG_TIMING + call timab(TIMAB_XTRSM,2,tsec) +#endif + +end subroutine abi_dtrsm +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_abi_linalg/abi_d2ztrsm +!! NAME +!! abi_d2ztrsm +!! +!! FUNCTION +!! +!! INPUTS +!! +!! SOURCE + + subroutine abi_d2ztrsm(side,uplo,transa,diag,m,n,alpha,a,lda,b,ldb,& +& x_cplx) + +!Arguments------------------------------------- + character(len=1), intent(in) :: side,uplo,transa,diag + integer, intent(in) :: m,n,lda,ldb + complex(dpc), intent(in) :: alpha + real(dp),target, intent(in) :: a(lda,*) ! FIXME should be lda * x_cplx + real(dp),target, intent(inout) :: b(ldb,*) + !Only for lobpcgwf + integer, intent(in), optional :: x_cplx + +!Local variables------------------------------- + integer :: cplx_ +#ifdef HAVE_LINALG_PLASMA + integer :: info +#endif + +#ifdef DEV_LINALG_TIMING + real(dp) :: tsec(2) + call timab(TIMAB_XTRSM,1,tsec) +#endif + + cplx_=1 ; if(PRESENT(x_cplx)) cplx_ = x_cplx + + if (ABI_LINALG_PLASMA_ISON) then +#ifdef HAVE_LINALG_PLASMA + if(cplx_ == 2) then + info = PLASMA_ztrsm_c(side_plasma(side),uplo_plasma(uplo),trans_plasma(TRANSA),diag_plasma(diag),& +& m,n,alpha,c_loc(a),lda,c_loc(b),ldb) + else + info = PLASMA_dtrsm_c(side_plasma(side),uplo_plasma(uplo),trans_plasma(TRANSA),diag_plasma(diag),& +& m,n,real(alpha,dp),c_loc(a),lda,c_loc(b),ldb) + end if +#endif + else + if(cplx_ == 2) then + call ztrsm(side,uplo,transa,diag,m,n,alpha,a,lda,b,ldb) + else + call dtrsm(side,uplo,transa,diag,m,n,real(alpha,dp),a,lda,b,ldb) + end if + end if + +#ifdef DEV_LINALG_TIMING + call timab(TIMAB_XTRSM,2,tsec) +#endif + +end subroutine abi_d2ztrsm +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_abi_linalg/abi_d2ztrsm_3d +!! NAME +!! abi_d2ztrsm_3d +!! +!! FUNCTION +!! +!! INPUTS +!! +!! SOURCE +!! + + subroutine abi_d2ztrsm_3d(side,uplo,transa,diag,m,n,alpha,a,lda,b,ldb) + +!Arguments------------------------------------- + character(len=1), intent(in) :: side,uplo,transa,diag + integer, intent(in) :: m,n,lda,ldb + complex(dpc), intent(in) :: alpha + real(dp), target,intent(in) :: a(2,lda,*) + real(dp), target,intent(inout) :: b(2,ldb,*) + +!Local variables------------------------------- +#ifdef HAVE_LINALG_PLASMA + integer :: info +#endif + +#ifdef DEV_LINALG_TIMING + real(dp) :: tsec(2) + call timab(TIMAB_XTRSM,1,tsec) +#endif + + if (ABI_LINALG_PLASMA_ISON) then +#ifdef HAVE_LINALG_PLASMA + info = PLASMA_ztrsm_c(side_plasma(side),uplo_plasma(uplo),trans_plasma(TRANSA),diag_plasma(diag),& +& m,n,alpha,c_loc(a),lda,c_loc(b),ldb) +#endif + else + call ztrsm(side,uplo,transa,diag,m,n,alpha,a,lda,b,ldb) + end if + +#ifdef DEV_LINALG_TIMING + call timab(TIMAB_XTRSM,2,tsec) +#endif + +end subroutine abi_d2ztrsm_3d +!!*** + +!---------------------------------------------------------------------- diff --git a/GX-PAW/common/src/28_numeric_noabirule/abinit.amf b/GX-PAW/common/src/28_numeric_noabirule/abinit.amf new file mode 100644 index 00000000..4ce98597 --- /dev/null +++ b/GX-PAW/common/src/28_numeric_noabirule/abinit.amf @@ -0,0 +1,20 @@ +EXTRA_DIST += replacements \ + abi_xgemm.f90 abi_xcopy.f90 abi_xtrsm.f90 \ + abi_xheev.f90 abi_xhegv.f90 abi_xhpev.f90 \ + abi_xhpgv.f90 abi_xpotrf.f90 \ + abi_xorthonormalize.f90 abi_gpu_linalg.f90 \ + farray_ncwrite.finc \ + genarray.py + +m_abi_linalg.$(OBJEXT): \ + m_abi_linalg.F90 \ + abi_gpu_linalg.f90 \ + abi_xcopy.f90 \ + abi_xgemm.f90 \ + abi_xheev.f90 \ + abi_xhegv.f90 \ + abi_xhpev.f90 \ + abi_xhpgv.f90 \ + abi_xorthonormalize.f90 \ + abi_xpotrf.f90 \ + abi_xtrsm.f90 diff --git a/GX-PAW/common/src/28_numeric_noabirule/abinit.dep b/GX-PAW/common/src/28_numeric_noabirule/abinit.dep new file mode 100644 index 00000000..4bf32525 --- /dev/null +++ b/GX-PAW/common/src/28_numeric_noabirule/abinit.dep @@ -0,0 +1,37 @@ +# Dependencies (inside the directory) of directory 28_numeric_noabirule +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. + +CLEANFILES += \ + m_abi_linalg.$(MODEXT) \ + m_array.$(MODEXT) \ + m_bessel.$(MODEXT) \ + m_bspline.$(MODEXT) \ + m_cplxtools.$(MODEXT) \ + m_elpa.$(MODEXT) \ + m_gaussian_quadrature.$(MODEXT) \ + m_hide_blas.$(MODEXT) \ + m_hide_lapack.$(MODEXT) \ + m_lebedev.$(MODEXT) \ + m_levenberg_marquardt.$(MODEXT) \ + m_lib_four.$(MODEXT) \ + m_linalg_interfaces.$(MODEXT) \ + m_numeric_tools.$(MODEXT) \ + m_per_cond.$(MODEXT) \ + m_random_xoroshiro128plus.$(MODEXT) \ + m_random_zbq.$(MODEXT) \ + m_slk.$(MODEXT) \ + m_sort.$(MODEXT) \ + m_splines.$(MODEXT) + +m_abi_linalg.$(OBJEXT): m_slk.$(OBJEXT) + +m_array.$(OBJEXT): m_numeric_tools.$(OBJEXT) + +m_hide_lapack.$(OBJEXT): m_linalg_interfaces.$(OBJEXT) m_slk.$(OBJEXT) + +m_numeric_tools.$(OBJEXT): m_linalg_interfaces.$(OBJEXT) + +m_slk.$(OBJEXT): m_elpa.$(OBJEXT) m_numeric_tools.$(OBJEXT) \ No newline at end of file diff --git a/GX-PAW/common/src/28_numeric_noabirule/abinit.dir b/GX-PAW/common/src/28_numeric_noabirule/abinit.dir new file mode 100644 index 00000000..6732145f --- /dev/null +++ b/GX-PAW/common/src/28_numeric_noabirule/abinit.dir @@ -0,0 +1,16 @@ +# Dependencies (outside the directory) of directory 28_numeric_noabirule +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. + +include_dirs = \ +['10_defs', + '11_memory_mpi', + '12_hide_mpi', + '14_hidewrite', + '16_hideleave', + '17_gpu_toolbox', + '18_timing', + '27_toolbox_oop', + '28_numeric_noabirule'] \ No newline at end of file diff --git a/GX-PAW/common/src/28_numeric_noabirule/abinit.src b/GX-PAW/common/src/28_numeric_noabirule/abinit.src new file mode 100644 index 00000000..adfeb522 --- /dev/null +++ b/GX-PAW/common/src/28_numeric_noabirule/abinit.src @@ -0,0 +1,49 @@ +# -*- Python -*- +# +# Copyright (C) 2005-2024 ABINIT Group (Yann Pouillon) +# +# This file is part of the ABINIT software package. For license information, +# please see the COPYING file in the top-level directory of the ABINIT source +# distribution. +# + +# +# Source files making up the numeric library +# + +# Source file attributes +ABI_SRC_NIL = 0 # No attribute +ABI_SRC_BLT = 1 # The file is built by a script +ABI_SRC_DEP = 2 # The file depends on other files + +# Source files +sources = [ + "m_lib_four.F90", + "m_abi_linalg.F90", + "m_array.F90", + "m_bessel.F90", + "m_cplxtools.F90", + "m_bspline.F90", + "m_elpa.F90", + "m_gaussian_quadrature.F90", + "m_hide_blas.F90", + "m_hide_lapack.F90", + "m_lebedev.F90", + "m_levenberg_marquardt.F90", + "m_linalg_interfaces.F90", + "m_numeric_tools.F90", + "m_per_cond.F90", + "m_random_xoroshiro128plus.F90", + "m_random_zbq.F90", + "m_slk.F90", + "m_sort.F90", + "m_splines.F90", +] +# IMPORTANT : please use the alphabetic order in the previous list. Do NOT add the new routine names at the end of the list. +# This is important to avoid numerous conflicts at merge time. Thank you very much. Xavier. + +# Put here checkers and their external dependencies +checkers = { + "test_spline_integrate": ["02_clib", "12_hide_mpi"], + } + diff --git a/GX-PAW/common/src/28_numeric_noabirule/farray_ncwrite.finc b/GX-PAW/common/src/28_numeric_noabirule/farray_ncwrite.finc new file mode 100644 index 00000000..e27b2bea --- /dev/null +++ b/GX-PAW/common/src/28_numeric_noabirule/farray_ncwrite.finc @@ -0,0 +1,94 @@ +! NOTE: This code has been generated by genarray.py +subroutine farr_real_dp1(farray, varname, ncid) + + implicit none + +!Arguments ------------------------------------ + integer,intent(in) :: ncid + character(len=*),intent(in) :: varname + real(dp),intent(in) :: farray(:) + +!Local variables------------------------------- +!scalars +#ifdef HAVE_NETCDF + integer :: dimval,ii,varid + character(len=nctk_slen) :: dimname,shape_str + +! ********************************************************************* + +! Define dimensions. +! Use *private* names for dimensions to avoid possible name collisions. +! if varname is "foo", we use "__foo_dim1__", __foo_dim2__" for name of the dimensions + NCF_CHECK(nctk_set_datamode(ncid)) + + shape_str = "" + do ii=1,size(shape(farray)) + dimval = size(farray, dim=ii) + if (ii == 1) dimval = size(farray, dim=ii) * 1 + write(dimname,"(3a,i0,a)")"__",trim(varname),"_dim",ii,"__" + + NCF_CHECK(nctk_def_dims(ncid, nctkdim_t(dimname, dimval))) + shape_str = trim(shape_str) // ", " // dimname + end do + + ! Define the variable. + NCF_CHECK(nctk_def_arrays(ncid, nctkarr_t(varname, 'dp', shape_str))) + varid = nctk_idname(ncid, varname) + + ! Write data + NCF_CHECK(nctk_set_datamode(ncid)) + NCF_CHECK(nf90_put_var(ncid, varid, farray)) + +#else + ABI_ERROR("netcdf support is not activated.") +#endif + +end subroutine farr_real_dp1 + +!-------------------------------------------------------------------------------- +subroutine farr_complex_dpc1(farray, varname, ncid) + + implicit none + +!Arguments ------------------------------------ + integer,intent(in) :: ncid + character(len=*),intent(in) :: varname + complex(dpc),intent(in) :: farray(:) + +!Local variables------------------------------- +!scalars +#ifdef HAVE_NETCDF + integer :: dimval,ii,varid + character(len=nctk_slen) :: dimname,shape_str + +! ********************************************************************* + +! Define dimensions. +! Use *private* names for dimensions to avoid possible name collisions. +! if varname is "foo", we use "__foo_dim1__", __foo_dim2__" for name of the dimensions + NCF_CHECK(nctk_set_datamode(ncid)) + + shape_str = "" + do ii=1,size(shape(farray)) + dimval = size(farray, dim=ii) + if (ii == 1) dimval = size(farray, dim=ii) * 2 + write(dimname,"(3a,i0,a)")"__",trim(varname),"_dim",ii,"__" + + NCF_CHECK(nctk_def_dims(ncid, nctkdim_t(dimname, dimval))) + shape_str = trim(shape_str) // ", " // dimname + end do + + ! Define the variable. + NCF_CHECK(nctk_def_arrays(ncid, nctkarr_t(varname, 'dp', shape_str))) + varid = nctk_idname(ncid, varname) + + ! Write data + NCF_CHECK(nctk_set_datamode(ncid)) + NCF_CHECK(nf90_put_var(ncid, varid, c2r(farray))) + +#else + ABI_ERROR("netcdf support is not activated.") +#endif + +end subroutine farr_complex_dpc1 + diff --git a/GX-PAW/common/src/28_numeric_noabirule/genarray.py b/GX-PAW/common/src/28_numeric_noabirule/genarray.py new file mode 100755 index 00000000..388cabc7 --- /dev/null +++ b/GX-PAW/common/src/28_numeric_noabirule/genarray.py @@ -0,0 +1,145 @@ +#!/usr/bin/env python +""" +Produce the routines used to write the content of a Fortran array to a netcdf file +These tools are mainly used for debugging or for a quick analysis of data. +""" + +def dimension_shape_type_kind(ndim, type, kind): + """Return a string with the fortran dimension.""" + if ndim: + dimension = ("(" + ndim*":,")[:-1] + ")" + else: + dimension = "" + + shape = "(%d)" % ndim if ndim > 0 else "" + + if kind: + type_kind = "%s(%s)" % (type, kind) + else: + type_kind = type + if type == "character": + type_kind = "%s(len=%s)" % (type, kind) + + return dimension, shape, type_kind + +def ncwrite(type, kind, ndim): + """ + Generate the routine for the allocation of pointers/arrays + + Args: + type: + Fortran intrinsic type (real, integer, complex, logical, character) + kind: + Kind of the type. if type is 'character' ... + ndim: + integer giving the number of dimensions. + """ + # Construct the name of the function + function = "farr_" + type + "_" + kind + str(ndim) + + dimension, shape, type_kind = dimension_shape_type_kind(ndim, type, kind) + + # Fortran type --> ETSF-IO flags. + xtype = { + ("integer", ""): "int", + ("real", "sp"): "sp", + ("real", "dp"): "dp", + ("complex", "spc"): "sp", + ("complex", "dpc"): "dp", + ("character", ""): "char", + }[(type, kind)] + + # Use c2r to convert from complex to real + # Multiply dims by 2 to take into account both real and imag part. + # This trick can cause a sigfault for large arrays since + # the compiler may store the result of c2r on the stack. + convert_farray = "farray"; convert_fact = 1 + if type == "complex": + convert_farray = "c2r(farray)" + convert_fact = 2 + + # Template string + template = """\ +subroutine %(function)s(farray, varname, ncid) + + implicit none + +!Arguments ------------------------------------ + integer,intent(in) :: ncid + character(len=*),intent(in) :: varname + %(type_kind)s,intent(in) :: farray%(dimension)s + +!Local variables------------------------------- +!scalars +#ifdef HAVE_NETCDF + integer :: dimval,ii,varid + character(len=nctk_slen) :: dimname,shape_str + +! ********************************************************************* + +! Define dimensions. +! Use *private* names for dimensions to avoid possible name collisions. +! if varname is "foo", we use "__foo_dim1__", __foo_dim2__" for name of the dimensions + NCF_CHECK(nctk_set_datamode(ncid)) + + shape_str = "" + do ii=1,size(shape(farray)) + dimval = size(farray, dim=ii) + if (ii == 1) dimval = size(farray, dim=ii) * %(convert_fact)s + write(dimname,"(3a,i0,a)")"__",trim(varname),"_dim",ii,"__" + + NCF_CHECK(nctk_def_dims(ncid, nctkdim_t(dimname, dimval))) + shape_str = trim(shape_str) // ", " // dimname + end do + + ! Define the variable. + NCF_CHECK(nctk_def_arrays(ncid, nctkarr_t(varname, '%(xtype)s', shape_str))) + varid = nctk_idname(ncid, varname) + + ! Write data + NCF_CHECK(nctk_set_datamode(ncid)) + NCF_CHECK(nf90_put_var(ncid, varid, %(convert_farray)s)) + +#else + MSG_ERROR("netcdf support is not activated.") +#endif + +end subroutine %(function)s +""" + return template % locals() + + +def main(): + all_ndims = range(1,2) + + # Table with types and kinds + type_and_kinds = [ + #("integer", ("",)), + ("real", ("dp",)), + ("complex", ("dpc",)), + #("logical", ("",)), + #("character", ("",)), + ] + + # The subroutines we are gonna create + subs = [ + ncwrite, + ] + + text = [] + for sub in subs: + for ndim in all_ndims: + for type, kinds in type_and_kinds: + for kind in kinds: + text.append(sub(type=type, kind=kind, ndim=ndim)) + + header = "! NOTE: This code has been generated by genarray.py\n" + text = ("\n!" + 80*"-" +"\n").join(text) + print(header + text) + + return 0 + + +if __name__ == "__main__": + import sys + sys.exit(main()) diff --git a/GX-PAW/common/src/28_numeric_noabirule/lib28_numeric_noabirule.a b/GX-PAW/common/src/28_numeric_noabirule/lib28_numeric_noabirule.a new file mode 100644 index 00000000..2ee0b39f Binary files /dev/null and b/GX-PAW/common/src/28_numeric_noabirule/lib28_numeric_noabirule.a differ diff --git a/GX-PAW/common/src/28_numeric_noabirule/m_abi_linalg.F90 b/GX-PAW/common/src/28_numeric_noabirule/m_abi_linalg.F90 new file mode 100644 index 00000000..d400bcfd --- /dev/null +++ b/GX-PAW/common/src/28_numeric_noabirule/m_abi_linalg.F90 @@ -0,0 +1,1269 @@ +!!****m* ABINIT/m_abi_linalg +!! NAME +!! m_abi_linalg +!! +!! FUNCTION +!! management of Linear Algebra wrappers routines +!! with support of different external library (scalapack, elpa, plasma, magma, ... ) +!! +!! COPYRIGHT +!! Copyright (C) 2012-2024 ABINIT group (LNguyen,FDahm,MT) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~ABINIT/Infos/copyright +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" + +module m_abi_linalg + + use defs_basis + use m_errors + use m_abicore + use m_xmpi + use m_xomp + use m_slk + use, intrinsic :: iso_c_binding +!#ifdef HAVE_LINALG_ELPA +! use m_elpa +!#endif +#ifdef HAVE_LINALG_PLASMA + use plasma, except_dp => dp, except_sp => sp +#endif + +#if defined HAVE_GPU + use m_gpu_toolbox +#endif + +#if defined HAVE_YAKL + use gator_mod, only: gator_allocate, gator_deallocate +#endif + +#if defined HAVE_MPI1 + include 'mpif.h' +#endif + +#if defined HAVE_MPI2 + use mpi +#endif + + use m_time, only : timab + + implicit none + + private +!!*** + +!This flag is ON if abi_linalg functions are in use (if this module is in use) + logical :: abi_linalg_in_use=.true. + +!These flags enable the different versions in the BLAS/LAPACK wrappers + logical,private,save :: ABI_LINALG_SCALAPACK_ISON=.False. + logical,private,save :: ABI_LINALG_MAGMA_ISON=.False. + logical,private,save :: ABI_LINALG_PLASMA_ISON=.False. + +!Working arrays for eigen problem + + logical,save :: lapack_single_precision=.false. + logical,save :: lapack_double_precision=.false. + logical,save :: lapack_full_storage =.false. + logical,save :: lapack_packed_storage =.false. + logical,save :: lapack_divide_conquer =.false. + + integer,save :: eigen_s_maxsize=0 + integer,save :: eigen_d_maxsize=0 + integer,save :: eigen_c_maxsize=0 + integer,save :: eigen_z_maxsize=0 + integer,save :: eigen_s_lwork=0 + integer,save :: eigen_d_lwork=0 + integer,save :: eigen_c_lwork=0 + integer,save :: eigen_z_lwork=0 + integer,save :: eigen_c_lrwork=0 + integer,save :: eigen_z_lrwork=0 + integer,save :: eigen_liwork=0 + + ! MG FIXME: I really do not understand why we should use global variables to wrap Scalapack routines. + ! + ! 1) The procedures are not thread-safe. + ! 2) The procedures cannot be reused with different dimensions without dellocating these globals + + integer,save,target,allocatable :: eigen_iwork(:) + real(sp),save,target,allocatable :: eigen_c_rwork(:) + real(dp),save,target,allocatable :: eigen_z_rwork(:) + real(sp),save,target,allocatable :: eigen_s_work(:) + real(dp),save,target,allocatable :: eigen_d_work(:) + complex(spc),save,target,allocatable :: eigen_c_work(:) + complex(dpc),save,target,allocatable :: eigen_z_work(:) + + integer,save,private :: slk_minsize=1 + integer,save,public :: slk_communicator=xmpi_comm_null + integer,save,public :: slk_complement_communicator=xmpi_comm_null +#ifdef HAVE_LINALG_SCALAPACK + type(processor_scalapack),save,public :: slk_processor +#endif + +!Plasma can be activated via command line +!Use XPLASMA_ISON flag and modifiy it with linalg_allow_plasma + logical,private,save :: XPLASMA_ISON=.false. + public :: linalg_allow_plasma +#ifdef HAVE_LINALG_PLASMA + type(c_ptr) :: plasma_work +#endif + + integer, save, private :: abi_linalg_gpu_mode = ABI_GPU_DISABLED + +#ifdef HAVE_GPU + integer, allocatable,save,private,target :: i_work(:) + real(kind=c_double), allocatable,save,private,target :: r_work(:) + complex(kind=c_double_complex),allocatable,save,private,target :: c_work(:) + type(c_ptr),save,private :: gpu_work + + !FIXME *_managed arrays are only used with YAKL, in place of previous ones + integer(kind=c_int32_t), ABI_CONTIGUOUS pointer,save,private :: i_work_managed(:) => null() + real(kind=c_double), ABI_CONTIGUOUS pointer,save,private :: r_work_managed(:) => null() + complex(kind=c_double_complex), ABI_CONTIGUOUS pointer,save,private :: c_work_managed(:) => null() + + integer, save, private :: i_work_len = 0 + integer, save, private :: r_work_len = 0 + integer, save, private :: c_work_len = 0 + integer(c_size_t), save, private :: gpu_work_len = 0 +#endif + +!---------------------------------------------------------------------- +!!*** + + !Procedures ------------------------------------ + public :: abi_linalg_init ! Initialization routine + public :: abi_linalg_finalize ! CleanuUp routine + public :: abi_linalg_work_allocate ! Allocate work arrays + !---------------------------------------------------------------------- + +!BLAS INTERFACE + !public :: abi_zgemm + public :: abi_xgemm + + interface abi_xgemm + module procedure abi_zgemm_2d + module procedure abi_d2zgemm + end interface abi_xgemm + + interface abi_gpu_xgemm + module procedure abi_gpu_xgemm_cptr + module procedure abi_gpu_xgemm_d + module procedure abi_gpu_xgemm_z + module procedure abi_gpu_xgemm_2d + module procedure abi_gpu_xgemm_2z + end interface abi_gpu_xgemm + + interface abi_gpu_xgemm_strided + module procedure abi_gpu_xgemm_strided_cptr + module procedure abi_gpu_xgemm_strided_d + module procedure abi_gpu_xgemm_strided_z + module procedure abi_gpu_xgemm_strided_2d + module procedure abi_gpu_xgemm_strided_2z + end interface abi_gpu_xgemm_strided + + interface abi_gpu_xsymm + module procedure abi_gpu_xsymm_cptr + module procedure abi_gpu_xsymm_d + module procedure abi_gpu_xsymm_z + module procedure abi_gpu_xsymm_2d + module procedure abi_gpu_xsymm_2z + end interface abi_gpu_xsymm + + interface abi_gpu_zhemm + module procedure abi_gpu_zhemm_cptr + module procedure abi_gpu_zhemm_d + module procedure abi_gpu_zhemm_z + module procedure abi_gpu_zhemm_2d + module procedure abi_gpu_zhemm_2z + end interface abi_gpu_zhemm + + interface abi_gpu_xscal + module procedure abi_gpu_xscal_cptr + module procedure abi_gpu_xscal_d + module procedure abi_gpu_xscal_z + module procedure abi_gpu_xscal_2d + module procedure abi_gpu_xscal_2z + end interface abi_gpu_xscal + + interface abi_gpu_xaxpy + module procedure abi_gpu_xaxpy_cptr + module procedure abi_gpu_xaxpy_d + module procedure abi_gpu_xaxpy_z + module procedure abi_gpu_xaxpy_2d + module procedure abi_gpu_xaxpy_2z + end interface abi_gpu_xaxpy + + interface abi_gpu_xheevd + module procedure abi_gpu_xheevd_cptr + module procedure abi_gpu_xheevd_d + module procedure abi_gpu_xheevd_z + module procedure abi_gpu_xheevd_2d + module procedure abi_gpu_xheevd_2z + end interface abi_gpu_xheevd + + interface abi_gpu_xhegvd + module procedure abi_gpu_xhegvd_cptr + module procedure abi_gpu_xhegvd_d + module procedure abi_gpu_xhegvd_z + module procedure abi_gpu_xhegvd_2d + module procedure abi_gpu_xhegvd_2z + end interface abi_gpu_xhegvd + + interface abi_gpu_xtrsm + module procedure abi_gpu_xtrsm_cptr + module procedure abi_gpu_xtrsm_d + module procedure abi_gpu_xtrsm_z + module procedure abi_gpu_xtrsm_2d + module procedure abi_gpu_xtrsm_2z + end interface abi_gpu_xtrsm + + interface abi_gpu_xpotrf + module procedure abi_gpu_xpotrf_cptr + module procedure abi_gpu_xpotrf_d + module procedure abi_gpu_xpotrf_z + module procedure abi_gpu_xpotrf_2d + module procedure abi_gpu_xpotrf_2z + end interface abi_gpu_xpotrf + + interface abi_gpu_xcopy + module procedure abi_gpu_xcopy_cptr + module procedure abi_gpu_xcopy_d + module procedure abi_gpu_xcopy_z + module procedure abi_gpu_xcopy_2d + module procedure abi_gpu_xcopy_2z + end interface abi_gpu_xcopy + + interface abi_gpu_work_resize + module procedure abi_gpu_work_resizeI + module procedure abi_gpu_work_resizeR + module procedure abi_gpu_work_resizeC + end interface abi_gpu_work_resize + + public :: abi_zgemm + public :: abi_zgemm_2d + public :: abi_zgemm_2r + interface abi_zgemm ! No x_cplx stuff here! + module procedure abi_zgemm_2d + module procedure abi_zgemm_2r + end interface abi_zgemm + + !---------------------------------------------------------------------- + public :: abi_xcopy + interface abi_xcopy + module procedure abi_zcopy + module procedure abi_zcopy_1d + module procedure abi_dcopy + module procedure abi_dcopy_1d + module procedure abi_dcopy_2d ! FIXME To be removed. One can pass the base adress of the array! + module procedure abi_dcopy_0d_1d + module procedure abi_dcopy_1d_0d + module procedure abi_d2zcopy_2d ! FIXME To be removed. One can pass the base adress of the array! + module procedure abi_z2dcopy_2d ! FIXME To be removed. One can pass the base adress of the array! + end interface abi_xcopy + + !---------------------------------------------------------------------- + public :: abi_xtrsm + interface abi_xtrsm + module procedure abi_ztrsm + module procedure abi_dtrsm + module procedure abi_d2ztrsm + !module procedure abi_d2ztrsm_3d + end interface abi_xtrsm + + public :: abi_d2ztrsm_3d ! Used in bestwfk TODO to be Removed + !---------------------------------------------------------------------- + +!LAPACK INTERFACE + public :: abi_xheev + interface abi_xheev + module procedure abi_dheev + module procedure abi_cheev + module procedure abi_zheev + end interface + !---------------------------------------------------------------------- + public :: abi_xhegv + interface abi_xhegv + module procedure abi_dhegv + module procedure abi_chegv + module procedure abi_zhegv + end interface + !---------------------------------------------------------------------- + public :: abi_xhpev + interface abi_xhpev + module procedure abi_dhpev + module procedure abi_chpev + module procedure abi_zhpev + end interface + !---------------------------------------------------------------------- + public :: abi_xhpgv + interface abi_xhpgv + module procedure abi_dhpgv + module procedure abi_chpgv + module procedure abi_zhpgv + end interface + !---------------------------------------------------------------------- + interface abi_xpotrf + !module procedure abi_dpotrf + module procedure abi_d2zpotrf + module procedure abi_zpotrf_2d + end interface + !---------------------------------------------------------------------- + public :: abi_xorthonormalize + interface abi_xorthonormalize + module procedure xorthonormalize + module procedure zorthonormalize + end interface + + ! This version operates on arrays in which the real and the imaginary part + ! are packed together (real parts first, them imaginary parts), used when gamma-point and istwfk=2 + public :: ortho_reim + !---------------------------------------------------------------------- + +#ifdef HAVE_GPU + + interface + + subroutine check_gpu_mem(str) bind(c, name="check_gpu_mem_") + use, intrinsic :: iso_c_binding + implicit none + character (KIND=c_char), intent(in) :: str(*) + end subroutine check_gpu_mem + + subroutine alloc_on_gpu(gpu_ptr,size_in_bytes) bind(c, name="alloc_on_gpu_") + use, intrinsic :: iso_c_binding + implicit none + type(c_ptr), intent(inout) :: gpu_ptr + integer(kind=c_size_t), intent(in) :: size_in_bytes + end subroutine alloc_on_gpu + + subroutine dealloc_on_gpu(gpu_ptr) bind(c, name="dealloc_on_gpu_") + use, intrinsic :: iso_c_binding + implicit none + type(c_ptr), intent(inout) :: gpu_ptr + end subroutine dealloc_on_gpu + + subroutine copy_gpu_to_gpu(dest_gpu_ptr, src_gpu_ptr, size_in_bytes) bind(c, name="copy_gpu_to_gpu_cpp_") + use, intrinsic :: iso_c_binding + implicit none + type(c_ptr) :: dest_gpu_ptr + type(c_ptr) :: src_gpu_ptr + integer(kind=c_size_t), intent(in) :: size_in_bytes + end subroutine copy_gpu_to_gpu + + subroutine gpu_memset(gpu_ptr, val, size_in_bytes) bind(c, name="gpu_memset_cpp_") + use, intrinsic :: iso_c_binding + implicit none + type(c_ptr), intent(in) :: gpu_ptr + integer(kind=c_int32_t), intent(in) :: val + integer(kind=c_size_t), intent(in) :: size_in_bytes + end subroutine gpu_memset + + ! logical(kind=c_bool) function gpu_allocated(gpu_ptr) bind(c, name="gpu_allocated_") + ! use, intrinsic :: iso_c_binding + ! implicit none + ! type(c_ptr), intent(in) :: gpu_ptr + ! end function gpu_allocated + + subroutine gpu_allocated_impl(gpu_ptr, is_allocated) bind(c, name="gpu_allocated_impl_") + use, intrinsic :: iso_c_binding + implicit none + type(c_ptr), intent(in) :: gpu_ptr + logical(kind=c_bool), intent(out) :: is_allocated + end subroutine gpu_allocated_impl + + subroutine gpu_managed_ptr_status(gpu_ptr, str) bind(c, name="gpu_managed_ptr_status_") + use, intrinsic :: iso_c_binding + implicit none + type(c_ptr), intent(in) :: gpu_ptr + character (KIND=c_char), intent(in) :: str(*) + end subroutine gpu_managed_ptr_status + + end interface + +#else + !dummy routines replace gpu helper routines + public :: gpu_device_synchronize + public :: check_gpu_mem + public :: alloc_on_gpu + public :: copy_from_gpu + public :: copy_on_gpu + public :: dealloc_on_gpu + public :: gpu_allocated_impl + public :: gpu_managed_ptr_status + public :: gpu_linalg_init + public :: gpu_linalg_shutdown + public :: gpu_xgemm + public :: gpu_xtrsm + public :: gpu_xaxpy + public :: gpu_xcopy + public :: gpu_xscal + public :: gpu_xsygvd + public :: gpu_xsygvd_bufferSize +#endif + + public :: copy_gpu_to_gpu + public :: gpu_memset + public :: gpu_allocated + + public :: gpu_xorthonormalize + + public :: abi_gpu_xgemm + public :: abi_gpu_xgemm_strided + public :: abi_gpu_xsymm + public :: abi_gpu_zhemm + public :: abi_gpu_xscal + public :: abi_gpu_xaxpy + public :: abi_gpu_xcopy + public :: abi_gpu_xtrsm + public :: abi_gpu_xhegvd + public :: abi_gpu_xheevd + public :: abi_gpu_xpotrf + + logical,external :: LSAME + + ! Timab slots, used if we want to profile BLAS calls + ! Fine-grained profiling, must be enabled with the CPP option DEV_LINALG_TIMING + ! For the time being, I use the same slots employed in lobpcgwf although + ! one should define specialized entries.If the index of the slot 0, no profiling is done. + + integer,parameter,private :: TIMAB_XCOPY=584 + integer,parameter,private :: TIMAB_XGEMM=532 + integer,parameter,private :: TIMAB_XORTHO=535 + integer,parameter,private :: TIMAB_XEIGEN=587 + integer,parameter,private :: TIMAB_XPRECO=536 + integer,parameter,private :: TIMAB_WFCOPY=584 + integer,parameter,private :: TIMAB_XTRSM=535 + +! Define this variable to activate timing routines +!#define DEV_LINALG_TIMING 1 + +! Support for [Z,C]GEMM3M routines + logical,save,private :: XGEMM3M_ISON = .False. + !logical,save,private :: XGEMM3M_ISON = .True. + ! True if [Z,C]GEMM3M can be used (can be set with linalg_allow_gemm3m) + + public :: linalg_allow_gemm3m + + ! Thresholds for the activation of [Z,C]GEMM3M + integer,parameter,private :: ZGEMM3M_LIMIT = 325000 + integer,parameter,private :: CGEMM3M_LIMIT = 200000 + +! Handy macros +#ifdef HAVE_LINALG_GEMM3M +#define _ZGEMM3M ZGEMM3M +#define _CGEMM3M CGEMM3M +#else +#define _ZGEMM3M ZGEMM +#define _CGEMM3M CGEMM +#endif + + +CONTAINS !=========================================================== +!!*** + +!!****f* m_abi_linalg/abi_linalg_init +!! NAME +!! abi_linalg_init +!! +!! FUNCTION +!! Initalization of linear algebra environnement +!! +!! INPUTS +!! max_eigen_pb_size= max. size of eigenproblem during calculation +!! optdriver= type of calculation (ground-state, response function, GW, ...) +!! wfoptalg= wave functions optimization algorithm (CG, LOBPCG, CHEBFI, ...) +!! paral_kgb= 1 if (k,g,b) parallelism is on +!! gpu_option = GPU implementation to use, i.e. cuda, openMP, ... (0=not using GPU) +!! use_slk= 1 if use of Scalapack is on +!! np_slk= max. number of processes to be used in Scalapack calls +!! comm_scalapack= global communicator to be used in case of Scalapack +!! +!! SOURCE +!! + + subroutine abi_linalg_init(max_eigen_pb_size,optdriver,wfoptalg,paral_kgb,& +& gpu_option,use_slk,np_slk,comm_scalapack) + +!Arguments ------------------------------------ + integer,intent(in) :: max_eigen_pb_size + integer,intent(in) :: optdriver,wfoptalg,paral_kgb + integer,intent(in) :: comm_scalapack,np_slk + integer,intent(in) :: gpu_option,use_slk + +!Local variables ------------------------------ + integer :: max_eigen_pb_size_eff=0 + logical :: need_work_space=.true. +#ifdef HAVE_LINALG_SCALAPACK + integer :: abi_info1,rank,commsize,commcart,sizecart(2) + logical :: reorder,periodic(2),keepdim(2) +#endif +#ifdef HAVE_LINALG_PLASMA + integer :: abi_info2,core_id,rank + integer :: num_cores=0,num_cores_node=0 + integer,allocatable :: affinity(:) +#endif + +!****************************************************************** + +!Use only abi_linalg in case of GS calculations + abi_linalg_in_use=(optdriver==RUNL_GSTATE.or.optdriver==RUNL_GWLS) + + max_eigen_pb_size_eff=0 + lapack_single_precision=.false. + lapack_double_precision=.false. + lapack_full_storage =.false. + lapack_packed_storage =.false. + lapack_divide_conquer =.false. + eigen_s_maxsize=0 ; eigen_d_maxsize=0 + eigen_c_maxsize=0 ; eigen_z_maxsize=0 + eigen_s_lwork=0 ; eigen_d_lwork=0 + eigen_c_lwork=0 ; eigen_z_lwork=0 + eigen_c_lrwork=0 ; eigen_z_lrwork=0 + eigen_liwork=0 + ABI_LINALG_SCALAPACK_ISON=.False. + ABI_LINALG_MAGMA_ISON=.False. + ABI_LINALG_PLASMA_ISON=.False. + slk_communicator=xmpi_comm_null + slk_complement_communicator=xmpi_comm_null + slk_minsize=1 + +!Exit here if we don't use this abi_linalg module + if (.not.abi_linalg_in_use) return + +!Set Lapack parameters + max_eigen_pb_size_eff=max_eigen_pb_size + if (wfoptalg==4.or.wfoptalg==14.or.gpu_option/=ABI_GPU_DISABLED) max_eigen_pb_size_eff=3*max_eigen_pb_size_eff + lapack_full_storage=(wfoptalg==4.or.wfoptalg==14.or.gpu_option/=ABI_GPU_DISABLED) + lapack_packed_storage=.true. + lapack_single_precision=.false. + lapack_double_precision=.true. + lapack_divide_conquer=.false. + +!Set maximum sizes + eigen_s_maxsize = max_eigen_pb_size_eff + eigen_d_maxsize = max_eigen_pb_size_eff + eigen_c_maxsize = max_eigen_pb_size_eff + eigen_z_maxsize = max_eigen_pb_size_eff + need_work_space=.true. + +#if defined HAVE_LINALG_SCALAPACK && defined HAVE_MPI + if ((paral_kgb==1.or.use_slk==1).and.np_slk>0) then + rank=xmpi_comm_rank(comm_scalapack) + ! We create slk_communicator using a cartesian grid, and store its complement + commsize = MIN(np_slk, xmpi_comm_size(comm_scalapack)) + sizecart = (/commsize, xmpi_comm_size(comm_scalapack)/commsize/) + periodic = (/.true.,.true./) ; reorder = .false. + call MPI_CART_CREATE(comm_scalapack,2,sizecart,periodic,reorder,commcart,abi_info1) + keepdim = (/.true., .false./) + call MPI_CART_SUB(commcart, keepdim, slk_communicator,abi_info1) + keepdim = (/.false., .true./) + call MPI_CART_SUB(commcart, keepdim, slk_complement_communicator,abi_info1) + call slk_processor%init(slk_communicator) + slk_minsize=maxval(slk_processor%grid%dims(1:2)) + need_work_space=(use_slk/=1) ! In this case we never use the work arrays + ABI_LINALG_SCALAPACK_ISON = .true. + end if +#else + ABI_UNUSED(comm_scalapack) + ABI_UNUSED(paral_kgb) + ABI_UNUSED(use_slk) + ABI_UNUSED(np_slk) +#endif + +!#ifdef HAVE_LINALG_ELPA +! call elpa_func_init() +!#endif + +#ifdef HAVE_LINALG_PLASMA +!Plasma Initialization +!Because use of hybrid use of mpi+openmp+plasma, +! we need to set manually the thread bindings policy +! to avoid conflicts between mpi process due to plasma + if (XPLASMA_ISON) then + num_cores=xomp_get_max_threads() + num_cores_node=xomp_get_num_cores_node() + rank=xmpi_comm_rank(xmpi_world) + if (num_cores_node == 0) then ! This means that OMP is not enabled. + num_cores_node = 1 + ABI_WARNING("You are using PLASMA but OpenMP is not enabled in Abinit!") + end if + ABI_MALLOC(affinity,(num_cores)) + do core_id =1,num_cores + affinity(core_id) = MOD(rank*num_cores + (core_id-1), num_cores_node) + end do + call PLASMA_Init_Affinity(num_cores,affinity(1),abi_info2) + ABI_FREE(affinity) + ABI_LINALG_PLASMA_ISON = .True. + lapack_divide_conquer=.true. + end if +#endif + +#ifdef HAVE_LINALG_MAGMA +#ifdef HAVE_LINALG_MAGMA_15 + call magmaf_init() + ABI_LINALG_MAGMA_ISON = .true. + lapack_divide_conquer=.true. +#endif +#endif + +#ifdef HAVE_GPU +!Cublas initialization + if (gpu_option/=ABI_GPU_DISABLED) call gpu_linalg_init() + abi_linalg_gpu_mode = gpu_option !FIXME Add a check for this +#endif + + if (need_work_space) call abi_linalg_work_allocate() + + end subroutine abi_linalg_init +!!*** + +!!****f* m_abi_linalg/abi_linalg_work_allocate +!! NAME +!! abi_linalg_work_allocate +!! +!! FUNCTION +!! +!! INPUTS +!! +!! SOURCE +!! + subroutine abi_linalg_work_allocate() + +!Arguments ------------------------------------ + +!Local variables ------------------------------ +#ifdef HAVE_LINALG_MAGMA + integer :: nb + integer :: magmaf_get_ssytrd_nb + integer :: magmaf_get_dsytrd_nb + integer :: magmaf_get_chetrd_nb + integer :: magmaf_get_zhetrd_nb +#endif + +!****************************************************************** + +!Single precision WORK + eigen_s_lwork = 0 + if (eigen_s_maxsize>0) then + if (lapack_single_precision) then + if (lapack_full_storage) then + eigen_s_lwork = max(eigen_s_lwork,3*eigen_s_maxsize-1) ! SSYEV, SSYGV + end if + if (lapack_packed_storage) then + eigen_s_lwork = max(eigen_s_lwork,3*eigen_s_maxsize) ! SSPEV[D], SSPGV[D] + end if + if (lapack_divide_conquer) then + eigen_s_lwork = max(eigen_s_lwork,1+6*eigen_s_maxsize+2*eigen_s_maxsize**2) ! SSYEVD, SSYGVD + end if + if (ABI_LINALG_MAGMA_ISON) then + if (lapack_full_storage.and.lapack_divide_conquer) then +#if defined HAVE_LINALG_MAGMA + nb=magmaf_get_ssytrd_nb(eigen_s_maxsize) + eigen_s_lwork = max(eigen_s_lwork,eigen_s_maxsize*(nb+2)) ! MAGMAF_SSYEVD, MAGMAF_SSYGVD +#endif + end if + end if + if (ABI_LINALG_PLASMA_ISON) then + if (lapack_full_storage.and.lapack_divide_conquer) then + eigen_s_lwork = max(eigen_s_lwork,eigen_s_maxsize**2) ! PLASMA_SSYEV + end if + end if + end if + end if + ABI_SFREE(eigen_s_work) + ABI_MALLOC(eigen_s_work,(eigen_s_lwork)) + +!Double precision WORK + eigen_d_lwork = 0 + if (eigen_d_maxsize>0) then + if (lapack_double_precision) then + if (lapack_full_storage) then + eigen_d_lwork = max(eigen_d_lwork,3*eigen_d_maxsize-1) ! DSYEV, DSYGV + end if + if (lapack_packed_storage) then + eigen_d_lwork = max(eigen_d_lwork,3*eigen_d_maxsize) ! DSPEV[D], DSPGV[D] + end if + if (lapack_divide_conquer) then + eigen_d_lwork = max(eigen_d_lwork,1+6*eigen_d_maxsize+2*eigen_d_maxsize**2) ! DSYEVD, DSYGVD + end if + if (ABI_LINALG_MAGMA_ISON) then + if (lapack_full_storage.and.lapack_divide_conquer) then +#if defined HAVE_LINALG_MAGMA + nb=magmaf_get_dsytrd_nb(eigen_d_maxsize) + eigen_d_lwork = max(eigen_d_lwork,eigen_d_maxsize*(nb+2)) ! MAGMAF_DSYEVD, MAGMAF_DSYGVD +#endif + end if + end if + if (ABI_LINALG_PLASMA_ISON) then + if (lapack_full_storage.and.lapack_divide_conquer) then + eigen_d_lwork = max(eigen_d_lwork,eigen_d_maxsize**2) ! PLASMA_DSYEV + end if + end if + end if + end if + ABI_SFREE(eigen_d_work) + ABI_MALLOC(eigen_d_work,(eigen_d_lwork)) + +!Single complex WORK + eigen_c_lwork = 0 + if (eigen_c_maxsize>0) then + if (lapack_single_precision) then + if (lapack_full_storage) then + eigen_c_lwork = max(eigen_c_lwork,2*eigen_c_maxsize-1) ! CHEEV, CHEGV + end if + if (lapack_packed_storage) then + eigen_c_lwork = max(eigen_c_lwork,2*eigen_c_maxsize) ! CHPEV[D], CHPGV[D] + end if + if (lapack_divide_conquer) then + eigen_c_lwork = max(eigen_c_lwork,2*eigen_c_maxsize+eigen_c_maxsize**2) ! CHEEVD, CHEGVD + end if + if (ABI_LINALG_MAGMA_ISON) then + if (lapack_full_storage.and.lapack_divide_conquer) then +#if defined HAVE_LINALG_MAGMA + nb=magmaf_get_chetrd_nb(eigen_c_maxsize) + eigen_c_lwork = max(eigen_c_lwork,eigen_c_maxsize*(nb+1)) ! MAGMAF_CHEEVD, MAGMAF_CHEGVD +#endif + end if + end if + if (ABI_LINALG_PLASMA_ISON) then + if (lapack_full_storage.and.lapack_divide_conquer) then + eigen_c_lwork = max(eigen_c_lwork,eigen_c_maxsize**2) ! PLASMA_CHEEV + end if + end if + end if + end if + ABI_SFREE(eigen_c_work) + ABI_MALLOC(eigen_c_work,(eigen_c_lwork)) + +!Double complex WORK + eigen_z_lwork = 0 + if (eigen_z_maxsize>0) then + if (lapack_double_precision) then + if (lapack_full_storage) then + eigen_z_lwork = max(eigen_z_lwork,2*eigen_z_maxsize-1) ! ZHEEV, ZHEGV + end if + if (lapack_packed_storage) then + eigen_z_lwork = max(eigen_z_lwork,2*eigen_z_maxsize) ! ZHPEV[D], ZHPGV[D] + end if + if (lapack_divide_conquer) then + eigen_z_lwork = max(eigen_z_lwork,2*eigen_z_maxsize+eigen_z_maxsize**2) ! ZHEEVD, ZHEGVD + end if + if (ABI_LINALG_MAGMA_ISON) then + if (lapack_full_storage.and.lapack_divide_conquer) then +#if defined HAVE_LINALG_MAGMA + nb=magmaf_get_zhetrd_nb(eigen_z_maxsize) + eigen_z_lwork = max(eigen_z_lwork,eigen_z_maxsize*(nb+1)) ! MAGMAF_ZHEEVD, MAGMAF_ZHEGVD +#endif + end if + end if + if (ABI_LINALG_PLASMA_ISON) then + if (lapack_full_storage.and.lapack_divide_conquer) then + eigen_z_lwork = max(eigen_z_lwork,eigen_z_maxsize**2) ! PLASMA_ZHEEV + end if + end if + end if + end if + ABI_SFREE(eigen_z_work) + ABI_MALLOC(eigen_z_work,(eigen_z_lwork)) + +!Single precision RWORK + eigen_c_lrwork = 0 + if (eigen_c_maxsize>0) then + if (lapack_single_precision) then + if (lapack_full_storage.or.lapack_packed_storage) then + eigen_c_lrwork = max(eigen_c_lrwork,3*eigen_c_maxsize-2) ! CHEEV, CHEGV, CHPEV, CHPGV + end if + if (lapack_divide_conquer) then + eigen_c_lrwork = max(eigen_c_lrwork,1+5*eigen_c_maxsize+2*eigen_c_maxsize**2) ! CHEEVD, CHEGVD, CHPEVD, CHPGVD + end if + end if + end if + ABI_SFREE(eigen_c_rwork) + ABI_MALLOC(eigen_c_rwork,(eigen_c_lrwork)) + +!Double precision RWORK + eigen_z_lrwork = 0 + if (eigen_z_maxsize>0) then + if (lapack_double_precision) then + if (lapack_full_storage.or.lapack_packed_storage) then + eigen_z_lrwork = max(eigen_z_lrwork,3*eigen_z_maxsize-2) ! ZHEEV, ZHEGV, ZHPEV, ZHPGV + end if + if (lapack_divide_conquer) then + eigen_z_lrwork = max(eigen_z_lrwork,1+5*eigen_z_maxsize+2*eigen_z_maxsize**2) ! ZHEEVD, ZHEGVD, ZHPEVD, ZHPGVD + end if + end if + end if + ABI_SFREE(eigen_z_rwork) + ABI_MALLOC(eigen_z_rwork,(eigen_z_lrwork)) + +!Integer IWORK + eigen_liwork = 0 + if (lapack_divide_conquer) then + if (lapack_single_precision) then + if (eigen_s_maxsize>0) eigen_liwork = max(eigen_liwork,3+5*eigen_s_maxsize) + if (eigen_c_maxsize>0) eigen_liwork = max(eigen_liwork,3+5*eigen_c_maxsize) + end if + if (lapack_double_precision) then + if (eigen_d_maxsize>0) eigen_liwork = max(eigen_liwork,3+5*eigen_d_maxsize) + if (eigen_z_maxsize>0) eigen_liwork = max(eigen_liwork,3+5*eigen_z_maxsize) + end if + end if + ABI_SFREE(eigen_iwork) + ABI_MALLOC(eigen_iwork,(eigen_liwork)) + + end subroutine abi_linalg_work_allocate +!!*** + +!!****f* m_abi_linalg/abi_linalg_finalize +!! NAME +!! abi_linalg_finalize +!! +!! FUNCTION +!! +!! INPUTS +!! +!! SOURCE +!! + subroutine abi_linalg_finalize(gpu_option) + +!Arguments ------------------------------------ + integer, intent(in) :: gpu_option +!Local variables ------------------------------ +#ifdef HAVE_LINALG_PLASMA + integer :: info +#endif + +!****************************************************************** + + if (.not.abi_linalg_in_use) return + + eigen_s_maxsize = 0 + eigen_d_maxsize = 0 + eigen_c_maxsize = 0 + eigen_z_maxsize = 0 + eigen_s_lwork = 0 + eigen_d_lwork = 0 + eigen_c_lwork = 0 + eigen_z_lwork = 0 + eigen_c_lrwork = 0 + eigen_z_lrwork = 0 + eigen_liwork = 0 + + lapack_full_storage=.False. + lapack_packed_storage=.False. + lapack_single_precision=.False. + lapack_double_precision=.False. + lapack_divide_conquer=.false. + +#ifdef HAVE_LINALG_SCALAPACK + if (ABI_LINALG_SCALAPACK_ISON) then + call slk_processor%free() + call xmpi_comm_free(slk_communicator) + call xmpi_comm_free(slk_complement_communicator) + slk_communicator=xmpi_comm_null + slk_complement_communicator=xmpi_comm_null + slk_minsize=1 + end if +#endif + +!#ifdef HAVE_LINALG_ELPA +! call elpa_func_uninit() +!#endif + +#ifdef HAVE_LINALG_PLASMA + call PLASMA_Finalize(info) + ABI_LINALG_PLASMA_ISON=.False. + end if +#endif + +#ifdef HAVE_LINALG_MAGMA +#ifdef HAVE_LINALG_MAGMA_15 + if (ABI_LINALG_MAGMA_ISON) then + call magmaf_finalize() + end if +#endif +#endif + +#ifdef HAVE_GPU + if (gpu_option/=ABI_GPU_DISABLED) then + call abi_gpu_work_finalize() + call gpu_linalg_shutdown() + end if + abi_linalg_gpu_mode = ABI_GPU_DISABLED +#else + ABI_UNUSED(gpu_option) +#endif + +!Memory freeing + ABI_SFREE(eigen_s_work) + ABI_SFREE(eigen_d_work) + ABI_SFREE(eigen_c_work) + ABI_SFREE(eigen_z_work) + ABI_SFREE(eigen_c_rwork) + ABI_SFREE(eigen_z_rwork) + ABI_SFREE(eigen_iwork) + + end subroutine abi_linalg_finalize +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_abi_linalg/linalg_allow_gemm3m +!! NAME +!! +!! FUNCTION +!! Programmatic interface to enable the use of [Z,C]GEMM3M calls +!! +!! SOURCE + +subroutine linalg_allow_gemm3m(bool, write_msg) + +!Arguments ------------------------------------ +!scalars + logical,intent(in) :: bool, write_msg + +! ************************************************************************* + + XGEMM3M_ISON = bool + if (write_msg) then +#ifdef HAVE_LINALG_GEMM3M + if (bool) then + ABI_COMMENT("Activating ZGEMM3M version instead of ZGEMM") + else + ABI_COMMENT("Using ZGEMM instead of ZGEMM3M") + end if +#else + if (bool) then + ABI_WARNING("Cannot activate ZGEMM3M as HAVE_LINALG_GEMM3M is not defined!") + end if +#endif + endif + +end subroutine linalg_allow_gemm3m +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_abi_linalg/use_zgemm3m +!! NAME +!! use_zgemm3m +!! +!! FUNCTION +!! Enable the use of ZGEMM3M +!! +!! NOTES +!! The CGEMM3M and ZGEMM3M routines use an algorithm requiring 3 real matrix +!! multiplications and 5 real matrix additions to compute the complex matrix +!! product; CGEMM(3S) and ZGEMM(3S) use 4 real matrix multiplications and 2 +!! real matrix additions. Because the matrix multiplication time is usually +!! the limiting performance factor in these routines, CGEMM3M and ZGEMM3M +!! may run up to 33 percent faster than CGEMM and ZGEMM. Because of other +!! overhead associated with the 3M routines, however, these performance +!! improvements may not always be realized. For example, on one processor +!! the 3M routines will generally run more slowly than the standard complex +!! matrix multiplication routines when m * n * k < FACTOR, where m, n, and k +!! are the input matrix dimensions and FACTOR is approximately 200000 for +!! CGEMM3M and 325000 for ZGEMM3M. +!! from: http://techpubs.sgi.com/library/tpl/cgi-bin/getdoc.cgi?coll=0650&db=man&raw=1&fname=/usr/share/catman/p_man/cat3/SCSL/ZGEMM3M.z +!! +!! SOURCE + +pure logical function use_zgemm3m(m, n, k) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: m,n,k + +! ************************************************************************* + + use_zgemm3m = .False. + if (XGEMM3M_ISON) use_zgemm3m = ((m * n * k) > ZGEMM3M_LIMIT) + !if (XGEMM3M_ISON) use_zgemm3m = .True. + +#ifndef HAVE_LINALG_GEMM3M + use_zgemm3m = .False. +#endif + +end function use_zgemm3m +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_abi_linalg/use_cgemm3m +!! NAME +!! use_cgemm3m +!! +!! FUNCTION +!! Enable the use of CGEMM3M +!! +!! NOTES +!! See use_zgemm3m +!! +!! SOURCE + +pure logical function use_cgemm3m(m, n, k) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: m,n,k + +! ************************************************************************* + + use_cgemm3m = .False. + if (XGEMM3M_ISON) use_cgemm3m = ((m * n * k) > CGEMM3M_LIMIT) +#ifndef HAVE_LINALG_GEMM3M + use_cgemm3m = .False. +#endif + +end function use_cgemm3m +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_abi_linalg/linalg_allow_plasma +!! NAME +!! +!! FUNCTION +!! Programmatic interface to enable the use of PLASMA +!! False to disable PLASMA version. +!! +!! SOURCE + +subroutine linalg_allow_plasma(bool) + +!Arguments ------------------------------------ +!scalars + logical,intent(in) :: bool + +! ************************************************************************* + + XPLASMA_ISON = bool +#ifndef HAVE_LINALG_PLASMA + ! Just to be on the safe-side. + ! I have to use a weird set of branches to make abirules happy in the BLAS/LAPACK + ! wrappers, and one cannot set XPLASMA_MODE to .True. if PLASMA is not available. + XPLASMA_ISON = .False. +#endif + +end subroutine linalg_allow_plasma +!!*** + +#ifdef HAVE_LINALG_PLASMA + +!!****f* m_abi_linalg/uplo_plasma +!! NAME +!! +!! FUNCTION +!! Convert uplo character to PLASMA integer +!! +!! SOURCE + +integer function uplo_plasma(uplo) + +!Arguments ------------------------------------ +!scalars + character(len=1),intent(in) :: uplo + +! ************************************************************************* + + if (LSAME(uplo,'U')) then + uplo_plasma = PlasmaUpper + else + uplo_plasma = PlasmaLower + end if + +end function uplo_plasma +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_abi_linalg/trans_plasma +!! NAME +!! +!! FUNCTION +!! Convert trans character to PLASMA integer +!! +!! SOURCE + +integer function trans_plasma(trans) + +!Arguments ------------------------------------ +!scalars + character(len=1),intent(in) :: trans + +! ************************************************************************* + + if (LSAME(trans,'C')) then + trans_plasma = PlasmaConjTrans + else if (LSAME(trans,'T')) then + trans_plasma = PlasmaTrans + else + trans_plasma = PlasmaNoTrans + end if + +end function trans_plasma +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_abi_linalg/side_plasma +!! NAME +!! +!! FUNCTION +!! Convert side character to PLASMA integer +!! +!! SOURCE + +integer function side_plasma(side) + +!Arguments ------------------------------------ +!scalars + character(len=1),intent(in) :: side + +! ************************************************************************* + + if(LSAME(side,'L')) then + side_plasma = PlasmaLeft + else + side_plasma = PlasmaRight + end if + +end function side_plasma +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_abi_linalg/diag_plasma +!! NAME +!! +!! FUNCTION +!! Convert diag character to PLASMA integer +!! +!! SOURCE + +integer function diag_plasma(diag) + +!Arguments ------------------------------------ +!scalars + character(len=1),intent(in) :: diag + +! ************************************************************************* + + if (LSAME(diag,'U')) then + diag_plasma = PlasmaUnit + else + diag_plasma = PlasmaNonUnit + end if + +end function diag_plasma +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_abi_linalg/jobz_plasma +!! NAME +!! +!! FUNCTION +!! Convert jobz character to PLASMA integer +!! +!! SOURCE + +integer function jobz_plasma(jobz) + +!Arguments ------------------------------------ +!scalars + character(len=1),intent(in) :: jobz + +! ************************************************************************* + + if (LSAME(jobz,'N')) then + jobz_plasma = PlasmaNoVec + else + jobz_plasma = PlasmaVec + end if + +end function jobz_plasma +!!*** + +#endif + +!! +!! this is just a wrapper arround gpu_allocated_cuda, because (strangely) +!! I can't manage to bind a function (not a subroutine) through iso_c_binding +!! +function gpu_allocated(gpu_ptr) result(is_allocated) + + use, intrinsic :: iso_c_binding + implicit none + + !Arguments ------------------------------------ + type(c_ptr), intent(in) :: gpu_ptr + logical(kind=c_bool) :: is_allocated + + call gpu_allocated_impl(gpu_ptr, is_allocated) + +end function gpu_allocated + +! Include files providing wrappers for some of the most commonly used BLAS & LAPACK routines + +! *********************************************************************! +! ******************* BLAS_XGEMM interface ****************************! +! *********************************************************************! +#include "abi_xgemm.f90" + +! *********************************************************************! +! ******************** BLAS_XCOPY interface ***************************! +! *********************************************************************! +#include "abi_xcopy.f90" + +! *********************************************************************! +! ******************** BLAS_XTRSM interface ***************************! +! *********************************************************************! +#include "abi_xtrsm.f90" + +! *********************************************************************! +! ********************* LAPACK XHEEV interface ***********************! +! *********************************************************************! +#include "abi_xheev.f90" + +! *********************************************************************! +! ********************* LAPACK XHEGV interface ***********************! +! *********************************************************************! +#include "abi_xhegv.f90" + +! *********************************************************************! +! ********************* LAPACK XHPEV interface ***********************! +! *********************************************************************! +#include "abi_xhpev.f90" + +! *********************************************************************! +! ********************* LAPACK XHPGV interface ***********************! +! *********************************************************************! +#include "abi_xhpgv.f90" + +! *********************************************************************! +! ****************** LAPACK XPOTRF interface *************************! +! *********************************************************************! +#include "abi_xpotrf.f90" + +! *********************************************************************! +! ************ ABINIT Orthonormalization interface *******************! +! *********************************************************************! +#include "abi_xorthonormalize.f90" + +! *********************************************************************! +! ****************** GPU LINALG interface *************************! +! *********************************************************************! +#include "abi_gpu_linalg.f90" + +!---------------------------------------------------------------------- + +end module m_abi_linalg +!!*** diff --git a/GX-PAW/common/src/28_numeric_noabirule/m_abi_linalg.o b/GX-PAW/common/src/28_numeric_noabirule/m_abi_linalg.o new file mode 100644 index 00000000..16b620ed Binary files /dev/null and b/GX-PAW/common/src/28_numeric_noabirule/m_abi_linalg.o differ diff --git a/GX-PAW/common/src/28_numeric_noabirule/m_array.F90 b/GX-PAW/common/src/28_numeric_noabirule/m_array.F90 new file mode 100644 index 00000000..6bc50c59 --- /dev/null +++ b/GX-PAW/common/src/28_numeric_noabirule/m_array.F90 @@ -0,0 +1,119 @@ +!!****m* ABINIT/m_array +!! NAME +!! m_array +!! +!! FUNCTION +!! This module provides data types that can be used to construct ragged arrays +!! and helper functions to print/write the array in different formats. +!! +!! COPYRIGHT +!! Copyright (C) 2008-2024 ABINIT group (MG) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" + +MODULE m_array + + use defs_basis + use m_abicore + use m_errors + use m_nctk +#ifdef HAVE_NETCDF + use netcdf +#endif + + use m_numeric_tools, only : c2r + + implicit none + + private +!!*** + + public :: farray_ncwrite ! Write the values to a netcdf file with id ncid (debugging tool) + ! Ex: call farray_ncwrite("array_name", array, "ncid). + + !public :: array_print ! Print the values of the array (formatted form) + + !interface array_print + ! module procedure array2_gwpc_print + !end interface array_print + + !interface array_allgatherv + ! module procedure + !end interface array_allgatherv + + interface farray_ncwrite + module procedure farr_real_dp1 + module procedure farr_complex_dpc1 + end interface farray_ncwrite + + +!!****t* m_array/array2_gwpc_type +!! NAME +!! array2_gwpc_type +!! +!! FUNCTION +!! A datatype used to construct ragged 2D-arrays with KIND=gwpc +!! +!! SOURCE + + type,public :: array2_gwpc_t + complex(gwpc),allocatable :: vals(:,:) + end type array2_gwpc_t + + interface array_free + module procedure array2_gwpc_free + end interface array_free + + public :: array_free ! Free memory +!!*** + +CONTAINS + +!!****f* m_array/array2_gwpc_free +!! NAME +!! array2_gwpc_free +!! +!! FUNCTION +!! Free memory +!! +!! SOURCE + +subroutine array2_gwpc_free(Array) + +!Arguments ------------------------------------ + type(array2_gwpc_t),intent(inout) :: Array + +! ********************************************************************* + + if (allocated(Array%vals)) then + ABI_FREE(Array%vals) + end if + +end subroutine array2_gwpc_free +!!*** + +! Include routines for dumping results in Netcdf format. +! (useful for debugging or quick analysis) +! The include file is automatically generated by the script genarray.py +! Change the python code if you need to support other kinds or types +! then add the new routines to the generic interface *farray_ncwrite* +! +! API Example +! Open the netcdf file and get the NC id +! ... +! Write data values. Use "array_name" as keyword +! call farray_ncwrite(array, "array_name", ncid) + +#include "farray_ncwrite.finc" + +END MODULE m_array + diff --git a/GX-PAW/common/src/28_numeric_noabirule/m_array.o b/GX-PAW/common/src/28_numeric_noabirule/m_array.o new file mode 100644 index 00000000..5f832e3c Binary files /dev/null and b/GX-PAW/common/src/28_numeric_noabirule/m_array.o differ diff --git a/GX-PAW/common/src/28_numeric_noabirule/m_bessel.F90 b/GX-PAW/common/src/28_numeric_noabirule/m_bessel.F90 new file mode 100644 index 00000000..ca387c9c --- /dev/null +++ b/GX-PAW/common/src/28_numeric_noabirule/m_bessel.F90 @@ -0,0 +1,1512 @@ +!!****m* ABINIT/m_bessel +!! NAME +!! m_bessel +!! +!! FUNCTION +!! Bessel functions +!! +!! COPYRIGHT +!! Copyright (C) 2008-2024 ABINIT group (MG) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" + +module m_bessel + + implicit none + + private + + public :: CALJY0 + public :: CALJY1 + public :: CALCK0 + public :: CALCK1 + +contains +!!*** + +SUBROUTINE CALJY0(ARG,RESULT,JINT) + +!--------------------------------------------------------------------- +! +! This packet computes zero-order Bessel functions of the first and +! second kind (J0 and Y0), for real arguments X, where 0 < X <= XMAX +! for Y0, and |X| <= XMAX for J0. It contains two function-type +! subprograms, BESJ0 and BESY0, and one subroutine-type +! subprogram, CALJY0. The calling statements for the primary +! entries are: +! +! Y = BESJ0(X) +! and +! Y = BESY0(X), +! +! where the entry points correspond to the functions J0(X) and Y0(X), +! respectively. The routine CALJY0 is intended for internal packet +! use only, all computations within the packet being concentrated in +! this one routine. The function subprograms invoke CALJY0 with +! the statement +! CALL CALJY0(ARG,RESULT,JINT), +! where the parameter usage is as follows: +! +! Function Parameters for CALJY0 +! call ARG RESULT JINT +! +! BESJ0(ARG) |ARG| .LE. XMAX J0(ARG) 0 +! BESY0(ARG) 0 .LT. ARG .LE. XMAX Y0(ARG) 1 +! +! The main computation uses unpublished minimax rational +! approximations for X .LE. 8.0, and an approximation from the +! book Computer Approximations by Hart, et. al., Wiley and Sons, +! New York, 1968, for arguments larger than 8.0 Part of this +! transportable packet is patterned after the machine-dependent +! FUNPACK program BESJ0(X), but cannot match that version for +! efficiency or accuracy. This version uses rational functions +! that are theoretically accurate to at least 18 significant decimal +! digits for X <= 8, and at least 18 decimal places for X > 8. The +! accuracy achieved depends on the arithmetic system, the compiler, +! the intrinsic functions, and proper selection of the machine- +! dependent constants. +! +!******************************************************************* +! +! Explanation of machine-dependent constants +! +! XINF = largest positive machine number +! XMAX = largest acceptable argument. The functions AINT, SIN +! and COS must perform properly for ABS(X) .LE. XMAX. +! We recommend that XMAX be a small integer multiple of +! sqrt(1/eps), where eps is the smallest positive number +! such that 1+eps > 1. +! XSMALL = positive argument such that 1.0-(X/2)**2 = 1.0 +! to machine precision for all ABS(X) .LE. XSMALL. +! We recommend that XSMALL < sqrt(eps)/beta, where beta +! is the floating-point radix (usually 2 or 16). +! +! Approximate values for some important machines are +! +! eps XMAX XSMALL XINF +! +! CDC 7600 (S.P.) 7.11E-15 1.34E+08 2.98E-08 1.26E+322 +! CRAY-1 (S.P.) 7.11E-15 1.34E+08 2.98E-08 5.45E+2465 +! IBM PC (8087) (S.P.) 5.96E-08 8.19E+03 1.22E-04 3.40E+38 +! IBM PC (8087) (D.P.) 1.11D-16 2.68D+08 3.72D-09 1.79D+308 +! IBM 195 (D.P.) 2.22D-16 6.87D+09 9.09D-13 7.23D+75 +! UNIVAC 1108 (D.P.) 1.73D-18 4.30D+09 2.33D-10 8.98D+307 +! VAX 11/780 (D.P.) 1.39D-17 1.07D+09 9.31D-10 1.70D+38 +! +!******************************************************************* +!******************************************************************* +! +! Error Returns +! +! The program returns the value zero for X .GT. XMAX, and returns +! -XINF when BESLY0 is called with a negative or zero argument. +! +! +! Intrinsic functions required are: +! +! ABS, AINT, COS, LOG, SIN, SQRT +! +! +! Latest modification: June 2, 1989 +! +! Author: W. J. Cody +! Mathematics and Computer Science Division +! Argonne National Laboratory +! Argonne, IL 60439 +! +! Taken from http://www.netlib.org/specfun/j0y0 +! +!-------------------------------------------------------------------- + IMPLICIT NONE + INTEGER :: I,JINT +!CS REAL + DOUBLE PRECISION :: & +& ARG,AX,CONS,DOWN,EIGHT,FIVE5,FOUR,ONE,ONEOV8,PI2,PJ0,& +& PJ1,PLG,PROD,PY0,PY1,PY2,P0,P1,P17,QJ0,QJ1,QLG,QY0,QY1,& +& QY2,Q0,Q1,RESJ,RESULT,R0,R1,SIXTY4,THREE,TWOPI,TWOPI1,& +& TWOPI2,TWO56,UP,W,WSQ,XDEN,XINF,XMAX,XNUM,XSMALL,XJ0,& +& XJ1,XJ01,XJ02,XJ11,XJ12,XY,XY0,XY01,XY02,XY1,XY11,XY12,& +& XY2,XY21,XY22,Z,ZERO,ZSQ + DIMENSION :: PJ0(7),PJ1(8),PLG(4),PY0(6),PY1(7),PY2(8),P0(6),P1(6),& +& QJ0(5),QJ1(7),QLG(4),QY0(5),QY1(6),QY2(7),Q0(5),Q1(5) +!------------------------------------------------------------------- +! Mathematical constants +! CONS = ln(.5) + Euler's gamma +!------------------------------------------------------------------- +!CS DATA ZERO,ONE,THREE,FOUR,EIGHT/0.0E0,1.0E0,3.0E0,4.0E0,8.0E0/, +!CS 1 FIVE5,SIXTY4,ONEOV8,P17/5.5E0,64.0E0,0.125E0,1.716E-1/, +!CS 2 TWO56,CONS/256.0E0,-1.1593151565841244881E-1/, +!CS 3 PI2,TWOPI/6.3661977236758134308E-1,6.2831853071795864769E0/, +!CS 4 TWOPI1,TWOPI2/6.28125E0,1.9353071795864769253E-3/ + DATA ZERO,ONE,THREE,FOUR,EIGHT/0.0D0,1.0D0,3.0D0,4.0D0,8.0D0/,& +& FIVE5,SIXTY4,ONEOV8,P17/5.5D0,64.0D0,0.125D0,1.716D-1/,& +& TWO56,CONS/256.0D0,-1.1593151565841244881D-1/,& +& PI2,TWOPI/6.3661977236758134308D-1,6.2831853071795864769D0/,& +& TWOPI1,TWOPI2/6.28125D0,1.9353071795864769253D-3/ +!------------------------------------------------------------------- +! Machine-dependent constants +!------------------------------------------------------------------- +!CS DATA XMAX/8.19E+03/,XSMALL/1.22E-09/,XINF/1.7E+38/ + DATA XMAX/1.07D+09/,XSMALL/9.31D-10/,XINF/1.7D+38/ +!------------------------------------------------------------------- +! Zeroes of Bessel functions +!------------------------------------------------------------------- +!CS DATA XJ0/2.4048255576957727686E+0/,XJ1/5.5200781102863106496E+0/, +!CS 1 XY0/8.9357696627916752158E-1/,XY1/3.9576784193148578684E+0/, +!CS 2 XY2/7.0860510603017726976E+0/, +!CS 3 XJ01/ 616.0E+0/, XJ02/-1.4244423042272313784E-03/, +!CS 4 XJ11/1413.0E+0/, XJ12/ 5.4686028631064959660E-04/, +!CS 5 XY01/ 228.0E+0/, XY02/ 2.9519662791675215849E-03/, +!CS 6 XY11/1013.0E+0/, XY12/ 6.4716931485786837568E-04/, +!CS 7 XY21/1814.0E+0/, XY22/ 1.1356030177269762362E-04/ + DATA XJ0/2.4048255576957727686D+0/,XJ1/5.5200781102863106496D+0/,& +& XY0/8.9357696627916752158D-1/,XY1/3.9576784193148578684D+0/,& +& XY2/7.0860510603017726976D+0/,& +& XJ01/ 616.0D+0/, XJ02/-1.4244423042272313784D-03/,& +& XJ11/1413.0D+0/, XJ12/ 5.4686028631064959660D-04/,& +& XY01/ 228.0D+0/, XY02/ 2.9519662791675215849D-03/,& +& XY11/1013.0D+0/, XY12/ 6.4716931485786837568D-04/,& +& XY21/1814.0D+0/, XY22/ 1.1356030177269762362D-04/ +!C------------------------------------------------------------------- +!C Coefficients for rational approximation to ln(x/a) +!C-------------------------------------------------------------------- +!CS DATA PLG/-2.4562334077563243311E+01,2.3642701335621505212E+02, +!CS 1 -5.4989956895857911039E+02,3.5687548468071500413E+02/ +!CS DATA QLG/-3.5553900764052419184E+01,1.9400230218539473193E+02, +!CS 1 -3.3442903192607538956E+02,1.7843774234035750207E+02/ + DATA PLG/-2.4562334077563243311D+01,2.3642701335621505212D+02,& +& -5.4989956895857911039D+02,3.5687548468071500413D+02/ + DATA QLG/-3.5553900764052419184D+01,1.9400230218539473193D+02,& +& -3.3442903192607538956D+02,1.7843774234035750207D+02/ +!C------------------------------------------------------------------- +!C Coefficients for rational approximation of +!C J0(X) / (X**2 - XJ0**2), XSMALL < |X| <= 4.0 +!C-------------------------------------------------------------------- +!CS DATA PJ0/6.6302997904833794242E+06,-6.2140700423540120665E+08, +!CS 1 2.7282507878605942706E+10,-4.1298668500990866786E+11, +!CS 2 -1.2117036164593528341E-01, 1.0344222815443188943E+02, +!CS 3 -3.6629814655107086448E+04/ +!CS DATA QJ0/4.5612696224219938200E+05, 1.3985097372263433271E+08, +!CS 1 2.6328198300859648632E+10, 2.3883787996332290397E+12, +!CS 2 9.3614022392337710626E+02/ + DATA PJ0/6.6302997904833794242D+06,-6.2140700423540120665D+08,& +& 2.7282507878605942706D+10,-4.1298668500990866786D+11,& +& -1.2117036164593528341D-01, 1.0344222815443188943D+02,& +& -3.6629814655107086448D+04/ + DATA QJ0/4.5612696224219938200D+05, 1.3985097372263433271D+08,& +& 2.6328198300859648632D+10, 2.3883787996332290397D+12,& +& 9.3614022392337710626D+02/ +!C------------------------------------------------------------------- +!C Coefficients for rational approximation of +!C J0(X) / (X**2 - XJ1**2), 4.0 < |X| <= 8.0 +!C------------------------------------------------------------------- +!CS DATA PJ1/4.4176707025325087628E+03, 1.1725046279757103576E+04, +!CS 1 1.0341910641583726701E+04,-7.2879702464464618998E+03, +!CS 2 -1.2254078161378989535E+04,-1.8319397969392084011E+03, +!CS 3 4.8591703355916499363E+01, 7.4321196680624245801E+02/ +!CS DATA QJ1/3.3307310774649071172E+02,-2.9458766545509337327E+03, +!CS 1 1.8680990008359188352E+04,-8.4055062591169562211E+04, +!CS 2 2.4599102262586308984E+05,-3.5783478026152301072E+05, +!CS 3 -2.5258076240801555057E+01/ + DATA PJ1/4.4176707025325087628D+03, 1.1725046279757103576D+04,& +& 1.0341910641583726701D+04,-7.2879702464464618998D+03,& +& -1.2254078161378989535D+04,-1.8319397969392084011D+03,& +& 4.8591703355916499363D+01, 7.4321196680624245801D+02/ + DATA QJ1/3.3307310774649071172D+02,-2.9458766545509337327D+03,& +& 1.8680990008359188352D+04,-8.4055062591169562211D+04,& +& 2.4599102262586308984D+05,-3.5783478026152301072D+05,& +& -2.5258076240801555057D+01/ +!C------------------------------------------------------------------- +!C Coefficients for rational approximation of +!C (Y0(X) - 2 LN(X/XY0) J0(X)) / (X**2 - XY0**2), +!C XSMALL < |X| <= 3.0 +!C-------------------------------------------------------------------- +!CS DATA PY0/1.0102532948020907590E+04,-2.1287548474401797963E+06, +!CS 1 2.0422274357376619816E+08,-8.3716255451260504098E+09, +!CS 2 1.0723538782003176831E+11,-1.8402381979244993524E+01/ +!CS DATA QY0/6.6475986689240190091E+02, 2.3889393209447253406E+05, +!CS 1 5.5662956624278251596E+07, 8.1617187777290363573E+09, +!CS 2 5.8873865738997033405E+11/ + DATA PY0/1.0102532948020907590D+04,-2.1287548474401797963D+06,& +& 2.0422274357376619816D+08,-8.3716255451260504098D+09,& +& 1.0723538782003176831D+11,-1.8402381979244993524D+01/ + DATA QY0/6.6475986689240190091D+02, 2.3889393209447253406D+05,& +& 5.5662956624278251596D+07, 8.1617187777290363573D+09,& +& 5.8873865738997033405D+11/ +!C------------------------------------------------------------------- +!C Coefficients for rational approximation of +!C (Y0(X) - 2 LN(X/XY1) J0(X)) / (X**2 - XY1**2), +!C 3.0 < |X| <= 5.5 +!C-------------------------------------------------------------------- +!CS DATA PY1/-1.4566865832663635920E+04, 4.6905288611678631510E+06, +!CS 1 -6.9590439394619619534E+08, 4.3600098638603061642E+10, +!CS 2 -5.5107435206722644429E+11,-2.2213976967566192242E+13, +!CS 3 1.7427031242901594547E+01/ +!CS DATA QY1/ 8.3030857612070288823E+02, 4.0669982352539552018E+05, +!CS 1 1.3960202770986831075E+08, 3.4015103849971240096E+10, +!CS 2 5.4266824419412347550E+12, 4.3386146580707264428E+14/ + DATA PY1/-1.4566865832663635920D+04, 4.6905288611678631510D+06,& +& -6.9590439394619619534D+08, 4.3600098638603061642D+10,& +& -5.5107435206722644429D+11,-2.2213976967566192242D+13,& +& 1.7427031242901594547D+01/ + DATA QY1/ 8.3030857612070288823D+02, 4.0669982352539552018D+05,& +& 1.3960202770986831075D+08, 3.4015103849971240096D+10,& +& 5.4266824419412347550D+12, 4.3386146580707264428D+14/ +!C------------------------------------------------------------------- +!C Coefficients for rational approximation of +!C (Y0(X) - 2 LN(X/XY2) J0(X)) / (X**2 - XY2**2), +!C 5.5 < |X| <= 8.0 +!C-------------------------------------------------------------------- +!CS DATA PY2/ 2.1363534169313901632E+04,-1.0085539923498211426E+07, +!CS 1 2.1958827170518100757E+09,-1.9363051266772083678E+11, +!CS 2 -1.2829912364088687306E+11, 6.7016641869173237784E+14, +!CS 3 -8.0728726905150210443E+15,-1.7439661319197499338E+01/ +!CS DATA QY2/ 8.7903362168128450017E+02, 5.3924739209768057030E+05, +!CS 1 2.4727219475672302327E+08, 8.6926121104209825246E+10, +!CS 2 2.2598377924042897629E+13, 3.9272425569640309819E+15, +!CS 3 3.4563724628846457519E+17/ + DATA PY2/ 2.1363534169313901632D+04,-1.0085539923498211426D+07,& +& 2.1958827170518100757D+09,-1.9363051266772083678D+11,& +& -1.2829912364088687306D+11, 6.7016641869173237784D+14,& +& -8.0728726905150210443D+15,-1.7439661319197499338D+01/ + DATA QY2/ 8.7903362168128450017D+02, 5.3924739209768057030D+05,& +& 2.4727219475672302327D+08, 8.6926121104209825246D+10,& +& 2.2598377924042897629D+13, 3.9272425569640309819D+15,& +& 3.4563724628846457519D+17/ +!C------------------------------------------------------------------- +!C Coefficients for Hart,s approximation, |X| > 8.0 +!C------------------------------------------------------------------- +!CS DATA P0/3.4806486443249270347E+03, 2.1170523380864944322E+04, +!CS 1 4.1345386639580765797E+04, 2.2779090197304684302E+04, +!CS 2 8.8961548424210455236E-01, 1.5376201909008354296E+02/ +!CS DATA Q0/3.5028735138235608207E+03, 2.1215350561880115730E+04, +!CS 1 4.1370412495510416640E+04, 2.2779090197304684318E+04, +!CS 2 1.5711159858080893649E+02/ +!CS DATA P1/-2.2300261666214198472E+01,-1.1183429920482737611E+02, +!CS 1 -1.8591953644342993800E+02,-8.9226600200800094098E+01, +!CS 2 -8.8033303048680751817E-03,-1.2441026745835638459E+00/ +!CS DATA Q1/1.4887231232283756582E+03, 7.2642780169211018836E+03, +!CS 1 1.1951131543434613647E+04, 5.7105024128512061905E+03, +!CS 2 9.0593769594993125859E+01/ + DATA P0/3.4806486443249270347D+03, 2.1170523380864944322D+04,& +& 4.1345386639580765797D+04, 2.2779090197304684302D+04,& +& 8.8961548424210455236D-01, 1.5376201909008354296D+02/ + DATA Q0/3.5028735138235608207D+03, 2.1215350561880115730D+04,& +& 4.1370412495510416640D+04, 2.2779090197304684318D+04,& +& 1.5711159858080893649D+02/ + DATA P1/-2.2300261666214198472D+01,-1.1183429920482737611D+02,& +& -1.8591953644342993800D+02,-8.9226600200800094098D+01,& +& -8.8033303048680751817D-03,-1.2441026745835638459D+00/ + DATA Q1/1.4887231232283756582D+03, 7.2642780169211018836D+03,& +& 1.1951131543434613647D+04, 5.7105024128512061905D+03,& +& 9.0593769594993125859D+01/ +!C------------------------------------------------------------------- +!C Check for error conditions +!C------------------------------------------------------------------- + AX = ABS(ARG) + IF ((JINT .EQ. 1) .AND. (ARG .LE. ZERO)) THEN + RESULT = -XINF + GO TO 2000 + ELSE IF (AX .GT. XMAX) THEN + RESULT = ZERO + GO TO 2000 + END IF + IF (AX .GT. EIGHT) GO TO 800 + IF (AX .LE. XSMALL) THEN + IF (JINT .EQ. 0) THEN + RESULT = ONE + ELSE + RESULT = PI2 * (LOG(AX) + CONS) + END IF + GO TO 2000 + END IF +!C------------------------------------------------------------------- +!C Calculate J0 for appropriate interval, preserving +!C accuracy near the zero of J0 +!C------------------------------------------------------------------- + ZSQ = AX * AX + IF (AX .LE. FOUR) THEN + XNUM = (PJ0(5) * ZSQ + PJ0(6)) * ZSQ + PJ0(7) + XDEN = ZSQ + QJ0(5) + DO 50 I = 1, 4 + XNUM = XNUM * ZSQ + PJ0(I) + XDEN = XDEN * ZSQ + QJ0(I) + 50 CONTINUE + PROD = ((AX - XJ01/TWO56) - XJ02) * (AX + XJ0) + ELSE + WSQ = ONE - ZSQ / SIXTY4 + XNUM = PJ1(7) * WSQ + PJ1(8) + XDEN = WSQ + QJ1(7) + DO 220 I = 1, 6 + XNUM = XNUM * WSQ + PJ1(I) + XDEN = XDEN * WSQ + QJ1(I) + 220 CONTINUE + PROD = (AX + XJ1) * ((AX - XJ11/TWO56) - XJ12) + END IF + RESULT = PROD * XNUM / XDEN + IF (JINT .EQ. 0) GO TO 2000 +!C------------------------------------------------------------------- +!C Calculate Y0. First find RESJ = pi/2 ln(x/xn) J0(x), +!C where xn is a zero of Y0 +!C------------------------------------------------------------------- + IF (AX .LE. THREE) THEN + UP = (AX-XY01/TWO56)-XY02 + XY = XY0 + ELSE IF (AX .LE. FIVE5) THEN + UP = (AX-XY11/TWO56)-XY12 + XY = XY1 + ELSE + UP = (AX-XY21/TWO56)-XY22 + XY = XY2 + END IF + DOWN = AX + XY + IF (ABS(UP) .LT. P17*DOWN) THEN + W = UP/DOWN + WSQ = W*W + XNUM = PLG(1) + XDEN = WSQ + QLG(1) + DO 320 I = 2, 4 + XNUM = XNUM*WSQ + PLG(I) + XDEN = XDEN*WSQ + QLG(I) + 320 CONTINUE + RESJ = PI2 * RESULT * W * XNUM/XDEN + ELSE + RESJ = PI2 * RESULT * LOG(AX/XY) + END IF +!C------------------------------------------------------------------- +!C Now calculate Y0 for appropriate interval, preserving +!C accuracy near the zero of Y0 +!C------------------------------------------------------------------- + IF (AX .LE. THREE) THEN + XNUM = PY0(6) * ZSQ + PY0(1) + XDEN = ZSQ + QY0(1) + DO 340 I = 2, 5 + XNUM = XNUM * ZSQ + PY0(I) + XDEN = XDEN * ZSQ + QY0(I) + 340 CONTINUE + ELSE IF (AX .LE. FIVE5) THEN + XNUM = PY1(7) * ZSQ + PY1(1) + XDEN = ZSQ + QY1(1) + DO 360 I = 2, 6 + XNUM = XNUM * ZSQ + PY1(I) + XDEN = XDEN * ZSQ + QY1(I) + 360 CONTINUE + ELSE + XNUM = PY2(8) * ZSQ + PY2(1) + XDEN = ZSQ + QY2(1) + DO 380 I = 2, 7 + XNUM = XNUM * ZSQ + PY2(I) + XDEN = XDEN * ZSQ + QY2(I) + 380 CONTINUE + END IF + RESULT = RESJ + UP * DOWN * XNUM / XDEN + GO TO 2000 +!C------------------------------------------------------------------- +!C Calculate J0 or Y0 for |ARG| > 8.0 +!C------------------------------------------------------------------- + 800 Z = EIGHT / AX + W = AX / TWOPI + W = AINT(W) + ONEOV8 + W = (AX - W * TWOPI1) - W * TWOPI2 + ZSQ = Z * Z + XNUM = P0(5) * ZSQ + P0(6) + XDEN = ZSQ + Q0(5) + UP = P1(5) * ZSQ + P1(6) + DOWN = ZSQ + Q1(5) + DO 850 I = 1, 4 + XNUM = XNUM * ZSQ + P0(I) + XDEN = XDEN * ZSQ + Q0(I) + UP = UP * ZSQ + P1(I) + DOWN = DOWN * ZSQ + Q1(I) + 850 CONTINUE + R0 = XNUM / XDEN + R1 = UP / DOWN + IF (JINT .EQ. 0) THEN + RESULT = SQRT(PI2/AX) * (R0*COS(W) - Z*R1*SIN(W)) + ELSE + RESULT = SQRT(PI2/AX) * (R0*SIN(W) + Z*R1*COS(W)) + END IF + 2000 RETURN +!C---------- Last line of CALJY0 ---------- + END subroutine caljy0 + + DOUBLE PRECISION FUNCTION BESJ0(X) +!CS REAL FUNCTION BESJ0(X) +!-------------------------------------------------------------------- +! +! This subprogram computes approximate values for Bessel functions +! of the first kind of order zero for arguments |X| <= XMAX +! (see comments heading CALJY0). +! +!-------------------------------------------------------------------- + IMPLICIT NONE + INTEGER :: JINT +!S REAL X, RESULT + DOUBLE PRECISION :: X, RESULT +!-------------------------------------------------------------------- + JINT=0 + CALL CALJY0(X,RESULT,JINT) + BESJ0 = RESULT + RETURN +!---------- Last line of BESJ0 ---------- + END function besj0 + DOUBLE PRECISION FUNCTION BESY0(X) +!CS REAL FUNCTION BESY0(X) +!C-------------------------------------------------------------------- +!C +!C This subprogram computes approximate values for Bessel functions +!C of the second kind of order zero for arguments 0 < X <= XMAX +!C (see comments heading CALJY0). +!C +!C-------------------------------------------------------------------- + IMPLICIT NONE + INTEGER JINT +!CS REAL X, RESULT + DOUBLE PRECISION :: X, RESULT +!-------------------------------------------------------------------- + JINT=1 + CALL CALJY0(X,RESULT,JINT) + BESY0 = RESULT + RETURN +!---------- Last line of BESY0 ---------- + END function besy0 + +SUBROUTINE CALJY1(ARG,RESULT,JINT) + +!--------------------------------------------------------------------- +! +! This packet computes first-order Bessel functions of the first and +! second kind (J1 and Y1), for real arguments X, where 0 < X <= XMAX +! for Y1, and |X| <= XMAX for J1. It contains two function-type +! subprograms, BESJ1 and BESY1, and one subroutine-type +! subprogram, CALJY1. The calling statements for the primary +! entries are: +! +! Y = BESJ1(X) +! and +! Y = BESY1(X), +! +! where the entry points correspond to the functions J1(X) and Y1(X), +! respectively. The routine CALJY1 is intended for internal packet +! use only, all computations within the packet being concentrated in +! this one routine. The function subprograms invoke CALJY1 with +! the statement +! CALL CALJY1(ARG,RESULT,JINT), +! where the parameter usage is as follows: +! +! Function Parameters for CALJY1 +! call ARG RESULT JINT +! +! BESJ1(ARG) |ARG| .LE. XMAX J1(ARG) 0 +! BESY1(ARG) 0 .LT. ARG .LE. XMAX Y1(ARG) 1 +! +! The main computation uses unpublished minimax rational +! approximations for X .LE. 8.0, and an approximation from the +! book Computer Approximations by Hart, et. al., Wiley and Sons, +! New York, 1968, for arguments larger than 8.0 Part of this +! transportable packet is patterned after the machine-dependent +! FUNPACK program BESJ1(X), but cannot match that version for +! efficiency or accuracy. This version uses rational functions +! that are theoretically accurate to at least 18 significant decimal +! digits for X <= 8, and at least 18 decimal places for X > 8. The +! accuracy achieved depends on the arithmetic system, the compiler, +! the intrinsic functions, and proper selection of the machine- +! dependent constants. +! +!******************************************************************* +! +! Explanation of machine-dependent constants +! +! XINF = largest positive machine number +! XMAX = largest acceptable argument. The functions AINT, SIN +! and COS must perform properly for ABS(X) .LE. XMAX. +! We recommend that XMAX be a small integer multiple of +! sqrt(1/eps), where eps is the smallest positive number +! such that 1+eps > 1. +! XSMALL = positive argument such that 1.0-(1/2)(X/2)**2 = 1.0 +! to machine precision for all ABS(X) .LE. XSMALL. +! We recommend that XSMALL < sqrt(eps)/beta, where beta +! is the floating-point radix (usually 2 or 16). +! +! Approximate values for some important machines are +! +! eps XMAX XSMALL XINF +! +! CDC 7600 (S.P.) 7.11E-15 1.34E+08 2.98E-08 1.26E+322 +! CRAY-1 (S.P.) 7.11E-15 1.34E+08 2.98E-08 5.45E+2465 +! IBM PC (8087) (S.P.) 5.96E-08 8.19E+03 1.22E-04 3.40E+38 +! IBM PC (8087) (D.P.) 1.11D-16 2.68D+08 3.72D-09 1.79D+308 +! IBM 195 (D.P.) 2.22D-16 6.87D+09 9.09D-13 7.23D+75 +! UNIVAC 1108 (D.P.) 1.73D-18 4.30D+09 2.33D-10 8.98D+307 +! VAX 11/780 (D.P.) 1.39D-17 1.07D+09 9.31D-10 1.70D+38 +! +!******************************************************************* +!******************************************************************* +! +! Error Returns +! +! The program returns the value zero for X .GT. XMAX, and returns +! -XINF when BESLY1 is called with a negative or zero argument. +! +! +! Intrinsic functions required are: +! +! ABS, AINT, COS, LOG, SIN, SQRT +! +! +! Author: W. J. Cody +! Mathematics and Computer Science Division +! Argonne National Laboratory +! Argonne, IL 60439 +! +! Latest modification: November 10, 1987 +! +! Taken from http://www.netlib.org/specfun/j1y1 +! +!-------------------------------------------------------------------- + IMPLICIT NONE + INTEGER :: I,JINT + DIMENSION :: PJ0(7),PJ1(8),PLG(4),PY0(7),PY1(9),P0(6),P1(6),& +& QJ0(5),QJ1(7),QLG(4),QY0(6),QY1(8),Q0(6),Q1(6) +!CS REAL + DOUBLE PRECISION :: & +& ARG,AX,DOWN,EIGHT,FOUR,HALF,PI2,PJ0,PJ1,PLG,PROD,PY0,& +& PY1,P0,P1,P17,QJ0,QJ1,QLG,QY0,QY1,Q0,Q1,RESJ,RESULT,& +& RTPI2,R0,R1,THROV8,TWOPI,TWOPI1,TWOPI2,TWO56,UP,W,WSQ,& +& XDEN,XINF,XMAX,XNUM,XSMALL,XJ0,XJ1,XJ01,XJ02,XJ11,XJ12,& +& XY,XY0,XY01,XY02,XY1,XY11,XY12,Z,ZERO,ZSQ +!------------------------------------------------------------------- +! Mathematical constants +!------------------------------------------------------------------- +!CS DATA EIGHT/8.0E0/, +!CS 1 FOUR/4.0E0/,HALF/0.5E0/,THROV8/0.375E0/, +!CS 2 PI2/6.3661977236758134308E-1/,P17/1.716E-1/ +!CS 3 TWOPI/6.2831853071795864769E+0/,ZERO/0.0E0/, +!CS 4 TWOPI1/6.28125E0/,TWOPI2/1.9353071795864769253E-03/ +!CS 5 TWO56/256.0E+0/,RTPI2/7.9788456080286535588E-1/ + DATA EIGHT/8.0D0/,& +& FOUR/4.0D0/,HALF/0.5D0/,THROV8/0.375D0/,& +& PI2/6.3661977236758134308D-1/,P17/1.716D-1/& +& TWOPI/6.2831853071795864769D+0/,ZERO/0.0D0/,& +& TWOPI1/6.28125D0/,TWOPI2/1.9353071795864769253D-03/& +& TWO56/256.0D+0/,RTPI2/7.9788456080286535588D-1/ +!------------------------------------------------------------------- +! Machine-dependent constants +!------------------------------------------------------------------- +!CS DATA XMAX/8.19E+03/,XSMALL/1.22E-09/,XINF/1.7E+38/ + DATA XMAX/1.07D+09/,XSMALL/9.31D-10/,XINF/1.7D+38/ +!------------------------------------------------------------------- +! Zeroes of Bessel functions +!------------------------------------------------------------------- +!CS DATA XJ0/3.8317059702075123156E+0/,XJ1/7.0155866698156187535E+0/, +!CS 1 XY0/2.1971413260310170351E+0/,XY1/5.4296810407941351328E+0/, +!CS 2 XJ01/ 981.0E+0/, XJ02/-3.2527979248768438556E-04/, +!CS 3 XJ11/1796.0E+0/, XJ12/-3.8330184381246462950E-05/, +!CS 4 XY01/ 562.0E+0/, XY02/ 1.8288260310170351490E-03/, +!CS 5 XY11/1390.0E+0/, XY12/-6.4592058648672279948E-06/ + DATA XJ0/3.8317059702075123156D+0/,XJ1/7.0155866698156187535D+0/,& +& XY0/2.1971413260310170351D+0/,XY1/5.4296810407941351328D+0/,& +& XJ01/ 981.0D+0/, XJ02/-3.2527979248768438556D-04/,& +& XJ11/1796.0D+0/, XJ12/-3.8330184381246462950D-05/,& +& XY01/ 562.0D+0/, XY02/ 1.8288260310170351490D-03/,& +& XY11/1390.0D+0/, XY12/-6.4592058648672279948D-06/ +!------------------------------------------------------------------- +! Coefficients for rational approximation to ln(x/a) +!-------------------------------------------------------------------- +!CS DATA PLG/-2.4562334077563243311E+01,2.3642701335621505212E+02, +!CS 1 -5.4989956895857911039E+02,3.5687548468071500413E+02/ +!CS DATA QLG/-3.5553900764052419184E+01,1.9400230218539473193E+02, +!CS 1 -3.3442903192607538956E+02,1.7843774234035750207E+02/ + DATA PLG/-2.4562334077563243311D+01,2.3642701335621505212D+02,& +& -5.4989956895857911039D+02,3.5687548468071500413D+02/ + DATA QLG/-3.5553900764052419184D+01,1.9400230218539473193D+02,& +& -3.3442903192607538956D+02,1.7843774234035750207D+02/ +!------------------------------------------------------------------- +! Coefficients for rational approximation of +! J1(X) / (X * (X**2 - XJ0**2)), XSMALL < |X| <= 4.0 +!-------------------------------------------------------------------- +!CS DATA PJ0/9.8062904098958257677E+05,-1.1548696764841276794E+08, +!CS 1 6.6781041261492395835E+09,-1.4258509801366645672E+11, +!CS 2 -4.4615792982775076130E+03, 1.0650724020080236441E+01, +!CS 3 -1.0767857011487300348E-02/ +!CS DATA QJ0/5.9117614494174794095E+05, 2.0228375140097033958E+08, +!CS 1 4.2091902282580133541E+10, 4.1868604460820175290E+12, +!CS 2 1.0742272239517380498E+03/ + DATA PJ0/9.8062904098958257677D+05,-1.1548696764841276794D+08,& +& 6.6781041261492395835D+09,-1.4258509801366645672D+11,& +& -4.4615792982775076130D+03, 1.0650724020080236441D+01,& +& -1.0767857011487300348D-02/ + DATA QJ0/5.9117614494174794095D+05, 2.0228375140097033958D+08,& +& 4.2091902282580133541D+10, 4.1868604460820175290D+12,& +& 1.0742272239517380498D+03/ +!------------------------------------------------------------------- +! Coefficients for rational approximation of +! J1(X) / (X * (X**2 - XJ1**2)), 4.0 < |X| <= 8.0 +!------------------------------------------------------------------- +!CS DATA PJ1/4.6179191852758252280E+00,-7.1329006872560947377E+03, +!CS 1 4.5039658105749078904E+06,-1.4437717718363239107E+09, +!CS 2 2.3569285397217157313E+11,-1.6324168293282543629E+13, +!CS 3 1.1357022719979468624E+14, 1.0051899717115285432E+15/ +!CS DATA QJ1/1.1267125065029138050E+06, 6.4872502899596389593E+08, +!CS 1 2.7622777286244082666E+11, 8.4899346165481429307E+13, +!CS 2 1.7128800897135812012E+16, 1.7253905888447681194E+18, +!CS 3 1.3886978985861357615E+03/ + DATA PJ1/4.6179191852758252280D+00,-7.1329006872560947377D+03,& +& 4.5039658105749078904D+06,-1.4437717718363239107D+09,& +& 2.3569285397217157313D+11,-1.6324168293282543629D+13,& +& 1.1357022719979468624D+14, 1.0051899717115285432D+15/ + DATA QJ1/1.1267125065029138050D+06, 6.4872502899596389593D+08,& +& 2.7622777286244082666D+11, 8.4899346165481429307D+13,& +& 1.7128800897135812012D+16, 1.7253905888447681194D+18,& +& 1.3886978985861357615D+03/ +!------------------------------------------------------------------- +! Coefficients for rational approximation of +! (Y1(X) - 2 LN(X/XY0) J1(X)) / (X**2 - XY0**2), +! XSMALL < |X| <= 4.0 +!-------------------------------------------------------------------- +!CS DATA PY0/2.2157953222280260820E+05,-5.9157479997408395984E+07, +!CS 1 7.2144548214502560419E+09,-3.7595974497819597599E+11, +!CS 2 5.4708611716525426053E+12, 4.0535726612579544093E+13, +!CS 3 -3.1714424660046133456E+02/ +!CS DATA QY0/8.2079908168393867438E+02, 3.8136470753052572164E+05, +!CS 1 1.2250435122182963220E+08, 2.7800352738690585613E+10, +!CS 2 4.1272286200406461981E+12, 3.0737873921079286084E+14/ + DATA PY0/2.2157953222280260820D+05,-5.9157479997408395984D+07,& +& 7.2144548214502560419D+09,-3.7595974497819597599D+11,& +& 5.4708611716525426053D+12, 4.0535726612579544093D+13,& +& -3.1714424660046133456D+02/ + DATA QY0/8.2079908168393867438D+02, 3.8136470753052572164D+05,& +& 1.2250435122182963220D+08, 2.7800352738690585613D+10,& +& 4.1272286200406461981D+12, 3.0737873921079286084D+14/ +!-------------------------------------------------------------------- +! Coefficients for rational approximation of +! (Y1(X) - 2 LN(X/XY1) J1(X)) / (X**2 - XY1**2), +! 4.0 < |X| <= 8.0 +!-------------------------------------------------------------------- +!CS DATA PY1/ 1.9153806858264202986E+06,-1.1957961912070617006E+09, +!CS 1 3.7453673962438488783E+11,-5.9530713129741981618E+13, +!CS 2 4.0686275289804744814E+15,-2.3638408497043134724E+16, +!CS 3 -5.6808094574724204577E+18, 1.1514276357909013326E+19, +!CS 4 -1.2337180442012953128E+03/ +!CS DATA QY1/ 1.2855164849321609336E+03, 1.0453748201934079734E+06, +!CS 1 6.3550318087088919566E+08, 3.0221766852960403645E+11, +!CS 2 1.1187010065856971027E+14, 3.0837179548112881950E+16, +!CS 3 5.6968198822857178911E+18, 5.3321844313316185697E+20/ + DATA PY1/ 1.9153806858264202986D+06,-1.1957961912070617006D+09,& +& 3.7453673962438488783D+11,-5.9530713129741981618D+13,& +& 4.0686275289804744814D+15,-2.3638408497043134724D+16,& +& -5.6808094574724204577D+18, 1.1514276357909013326D+19,& +& -1.2337180442012953128D+03/ + DATA QY1/ 1.2855164849321609336D+03, 1.0453748201934079734D+06,& +& 6.3550318087088919566D+08, 3.0221766852960403645D+11,& +& 1.1187010065856971027D+14, 3.0837179548112881950D+16,& +& 5.6968198822857178911D+18, 5.3321844313316185697D+20/ +!------------------------------------------------------------------- +! Coefficients for Hart,s approximation, |X| > 8.0 +!------------------------------------------------------------------- +!CS DATA P0/-1.0982405543459346727E+05,-1.5235293511811373833E+06, +!CS 1 -6.6033732483649391093E+06,-9.9422465050776411957E+06, +!CS 2 -4.4357578167941278571E+06,-1.6116166443246101165E+03/ +!CS DATA Q0/-1.0726385991103820119E+05,-1.5118095066341608816E+06, +!CS 1 -6.5853394797230870728E+06,-9.9341243899345856590E+06, +!CS 2 -4.4357578167941278568E+06,-1.4550094401904961825E+03/ +!CS DATA P1/ 1.7063754290207680021E+03, 1.8494262873223866797E+04, +!CS 1 6.6178836581270835179E+04, 8.5145160675335701966E+04, +!CS 2 3.3220913409857223519E+04, 3.5265133846636032186E+01/ +!CS DATA Q1/ 3.7890229745772202641E+04, 4.0029443582266975117E+05, +!CS 1 1.4194606696037208929E+06, 1.8194580422439972989E+06, +!CS 2 7.0871281941028743574E+05, 8.6383677696049909675E+02/ + DATA P0/-1.0982405543459346727D+05,-1.5235293511811373833D+06,& +& -6.6033732483649391093D+06,-9.9422465050776411957D+06,& +& -4.4357578167941278571D+06,-1.6116166443246101165D+03/ + DATA Q0/-1.0726385991103820119D+05,-1.5118095066341608816D+06,& +& -6.5853394797230870728D+06,-9.9341243899345856590D+06,& +& -4.4357578167941278568D+06,-1.4550094401904961825D+03/ + DATA P1/ 1.7063754290207680021D+03, 1.8494262873223866797D+04,& +& 6.6178836581270835179D+04, 8.5145160675335701966D+04,& +& 3.3220913409857223519D+04, 3.5265133846636032186D+01/ + DATA Q1/ 3.7890229745772202641D+04, 4.0029443582266975117D+05,& +& 1.4194606696037208929D+06, 1.8194580422439972989D+06,& +& 7.0871281941028743574D+05, 8.6383677696049909675D+02/ +!------------------------------------------------------------------- +! Check for error conditions +!------------------------------------------------------------------- + AX = ABS(ARG) + IF ((JINT .EQ. 1) .AND. ((ARG .LE. ZERO) .OR.& +& ((ARG .LT. HALF) .AND. (AX*XINF .LT. PI2)))) THEN + RESULT = -XINF + GO TO 2000 + ELSE IF (AX .GT. XMAX) THEN + RESULT = ZERO + GO TO 2000 + END IF + IF (AX .GT. EIGHT) THEN + GO TO 800 + ELSE IF (AX .LE. XSMALL) THEN + IF (JINT .EQ. 0) THEN + RESULT = ARG * HALF + ELSE + RESULT = -PI2 / AX + END IF + GO TO 2000 + END IF +!------------------------------------------------------------------- +! Calculate J1 for appropriate interval, preserving +! accuracy near the zero of J1 +!------------------------------------------------------------------- + ZSQ = AX * AX + IF (AX .LE. FOUR) THEN + XNUM = (PJ0(7) * ZSQ + PJ0(6)) * ZSQ + PJ0(5) + XDEN = ZSQ + QJ0(5) + DO 50 I = 1, 4 + XNUM = XNUM * ZSQ + PJ0(I) + XDEN = XDEN * ZSQ + QJ0(I) + 50 CONTINUE + PROD = ARG * ((AX - XJ01/TWO56) - XJ02) * (AX + XJ0) + ELSE + XNUM = PJ1(1) + XDEN = (ZSQ + QJ1(7)) * ZSQ + QJ1(1) + DO 220 I = 2, 6 + XNUM = XNUM * ZSQ + PJ1(I) + XDEN = XDEN * ZSQ + QJ1(I) + 220 CONTINUE + XNUM = XNUM * (AX - EIGHT) * (AX + EIGHT) + PJ1(7) + XNUM = XNUM * (AX - FOUR) * (AX + FOUR) + PJ1(8) + PROD = ARG * ((AX - XJ11/TWO56) - XJ12) * (AX + XJ1) + END IF + RESULT = PROD * (XNUM / XDEN) + IF (JINT .EQ. 0) GO TO 2000 +!------------------------------------------------------------------- +! Calculate Y1. First find RESJ = pi/2 ln(x/xn) J1(x), +! where xn is a zero of Y1 +!------------------------------------------------------------------- + IF (AX .LE. FOUR) THEN + UP = (AX-XY01/TWO56)-XY02 + XY = XY0 + ELSE + UP = (AX-XY11/TWO56)-XY12 + XY = XY1 + END IF + DOWN = AX + XY + IF (ABS(UP) .LT. P17*DOWN) THEN + W = UP/DOWN + WSQ = W*W + XNUM = PLG(1) + XDEN = WSQ + QLG(1) + DO 320 I = 2, 4 + XNUM = XNUM*WSQ + PLG(I) + XDEN = XDEN*WSQ + QLG(I) + 320 CONTINUE + RESJ = PI2 * RESULT * W * XNUM/XDEN + ELSE + RESJ = PI2 * RESULT * LOG(AX/XY) + END IF +!------------------------------------------------------------------- +! Now calculate Y1 for appropriate interval, preserving +! accuracy near the zero of Y1 +!------------------------------------------------------------------- + IF (AX .LE. FOUR) THEN + XNUM = PY0(7) * ZSQ + PY0(1) + XDEN = ZSQ + QY0(1) + DO 340 I = 2, 6 + XNUM = XNUM * ZSQ + PY0(I) + XDEN = XDEN * ZSQ + QY0(I) + 340 CONTINUE + ELSE + XNUM = PY1(9) * ZSQ + PY1(1) + XDEN = ZSQ + QY1(1) + DO 360 I = 2, 8 + XNUM = XNUM * ZSQ + PY1(I) + XDEN = XDEN * ZSQ + QY1(I) + 360 CONTINUE + END IF + RESULT = RESJ + (UP*DOWN/AX) * XNUM / XDEN + GO TO 2000 +!------------------------------------------------------------------- +! Calculate J1 or Y1 for |ARG| > 8.0 +!------------------------------------------------------------------- + 800 Z = EIGHT / AX + W = AINT(AX/TWOPI) + THROV8 + W = (AX - W * TWOPI1) - W * TWOPI2 + ZSQ = Z * Z + XNUM = P0(6) + XDEN = ZSQ + Q0(6) + UP = P1(6) + DOWN = ZSQ + Q1(6) + DO 850 I = 1, 5 + XNUM = XNUM * ZSQ + P0(I) + XDEN = XDEN * ZSQ + Q0(I) + UP = UP * ZSQ + P1(I) + DOWN = DOWN * ZSQ + Q1(I) + 850 CONTINUE + R0 = XNUM / XDEN + R1 = UP / DOWN + IF (JINT .EQ. 0) THEN + RESULT = (RTPI2/SQRT(AX)) * (R0*COS(W) - Z*R1*SIN(W)) + ELSE + RESULT = (RTPI2/SQRT(AX)) * (R0*SIN(W) + Z*R1*COS(W)) + END IF + IF ((JINT .EQ. 0) .AND. (ARG .LT. ZERO)) RESULT = -RESULT + 2000 RETURN +!---------- Last card of CALJY1 ---------- + END subroutine caljy1 + + DOUBLE PRECISION FUNCTION BESJ1(X) +!-------------------------------------------------------------------- +! +! This subprogram computes approximate values for Bessel functions +! of the first kind of order zero for arguments |X| <= XMAX +! (see comments heading CALJY1). +! +!-------------------------------------------------------------------- + IMPLICIT NONE + INTEGER :: JINT +!CS REAL + DOUBLE PRECISION :: & +& RESULT,X +!-------------------------------------------------------------------- + JINT=0 + CALL CALJY1(X,RESULT,JINT) + BESJ1 = RESULT + RETURN +!---------- Last card of BESJ1 ---------- + END function besj1 + + + DOUBLE PRECISION FUNCTION BESY1(X) +!-------------------------------------------------------------------- +! +! This subprogram computes approximate values for Bessel functions +! of the second kind of order zero for arguments 0 < X <= XMAX +! (see comments heading CALJY1). +! +!-------------------------------------------------------------------- + IMPLICIT NONE + INTEGER :: JINT +!CS REAL + DOUBLE PRECISION :: & +& RESULT,X +!-------------------------------------------------------------------- + JINT=1 + CALL CALJY1(X,RESULT,JINT) + BESY1 = RESULT + RETURN +!---------- Last card of BESY1 ---------- + END function besy1 +!!*** + +!!****f* ABINIT/CALCK0 +!! NAME +!! +!! FUNCTION +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SIDE EFFECTS +!! +!! NOTES +!! +!! SOURCE + +SUBROUTINE CALCK0(ARG,RESULT,JINT) + +!-------------------------------------------------------------------- +! +! This packet computes modified Bessel functions of the second kind +! and order zero, K0(X) and EXP(X)*K0(X), for real +! arguments X. It contains two function type subprograms, BESK0 +! and BESEK0, and one subroutine type subprogram, CALCK0. +! the calling statements for the primary entries are +! +! Y=BESK0(X) +! and +! Y=BESEK0(X) +! +! where the entry points correspond to the functions K0(X) and +! EXP(X)*K0(X), respectively. The routine CALCK0 is +! intended for internal packet use only, all computations within +! the packet being concentrated in this routine. The function +! subprograms invoke CALCK0 with the statement +! CALL CALCK0(ARG,RESULT,JINT) +! where the parameter usage is as follows +! +! Function Parameters for CALCK0 +! Call ARG RESULT JINT +! +! BESK0(ARG) 0 .LT. ARG .LE. XMAX K0(ARG) 1 +! BESEK0(ARG) 0 .LT. ARG EXP(ARG)*K0(ARG) 2 +! +! The main computation evaluates slightly modified forms of near +! minimax rational approximations generated by Russon and Blair, +! Chalk River (Atomic Energy of Canada Limited) Report AECL-3461, +! 1969. This transportable program is patterned after the +! machine-dependent FUNPACK packet NATSK0, but cannot match that +! version for efficiency or accuracy. This version uses rational +! functions that theoretically approximate K-SUB-0(X) to at +! least 18 significant decimal digits. The accuracy achieved +! depends on the arithmetic system, the compiler, the intrinsic +! functions, and proper selection of the machine-dependent +! constants. +! +!******************************************************************* +!******************************************************************* +! +! Explanation of machine-dependent constants +! +! beta = Radix for the floating-point system +! minexp = Smallest representable power of beta +! maxexp = Smallest power of beta that overflows +! XSMALL = Argument below which BESK0 and BESEK0 may +! each be represented by a constant and a log. +! largest X such that 1.0 + X = 1.0 to machine +! precision. +! XINF = Largest positive machine number; approximately +! beta**maxexp +! XMAX = Largest argument acceptable to BESK0; Solution to +! equation: +! W(X) * (1-1/8X+9/128X**2) = beta**minexp +! where W(X) = EXP(-X)*SQRT(PI/2X) +! +! +! Approximate values for some important machines are: +! +! +! beta minexp maxexp +! +! CRAY-1 (S.P.) 2 -8193 8191 +! Cyber 180/185 +! under NOS (S.P.) 2 -975 1070 +! IEEE (IBM/XT, +! SUN, etc.) (S.P.) 2 -126 128 +! IEEE (IBM/XT, +! SUN, etc.) (D.P.) 2 -1022 1024 +! IBM 3033 (D.P.) 16 -65 63 +! VAX D-Format (D.P.) 2 -128 127 +! VAX G-Format (D.P.) 2 -1024 1023 +! +! +! XSMALL XINF XMAX +! +! CRAY-1 (S.P.) 3.55E-15 5.45E+2465 5674.858 +! Cyber 180/855 +! under NOS (S.P.) 1.77E-15 1.26E+322 672.788 +! IEEE (IBM/XT, +! SUN, etc.) (S.P.) 5.95E-8 3.40E+38 85.337 +! IEEE (IBM/XT, +! SUN, etc.) (D.P.) 1.11D-16 1.79D+308 705.342 +! IBM 3033 (D.P.) 1.11D-16 7.23D+75 177.852 +! VAX D-Format (D.P.) 6.95D-18 1.70D+38 86.715 +! VAX G-Format (D.P.) 5.55D-17 8.98D+307 706.728 +! +!******************************************************************* +!******************************************************************* +! +! Error returns +! +! The program returns the value XINF for ARG .LE. 0.0, and the +! BESK0 entry returns the value 0.0 for ARG .GT. XMAX. +! +! +! Intrinsic functions required are: +! +! EXP, LOG, SQRT +! +! Latest modification: March 19, 1990 +! +! Authors: W. J. Cody and Laura Stoltz +! Mathematics and Computer Science Division +! Argonne National Laboratory +! Argonne, IL 60439 +! +! Original subroutine from netlib http://www.netlib.org/specfun/k0 +! Slightly modified by MG to follow f90 rules and double precision arithmetic +! +!-------------------------------------------------------------------- + IMPLICIT NONE + INTEGER :: I,JINT +!CS REAL + DOUBLE PRECISION :: ARG,RESULT,SUMF,SUMG,SUMP,SUMQ,TEMP +!CS REAL + DOUBLE PRECISION :: X,XX +!CS REAL + DOUBLE PRECISION :: P(6),Q(2),PP(10),QQ(10),F(4),G(3) +!C-------------------------------------------------------------------- +!C Mathematical constants +!C-------------------------------------------------------------------- +!CS REAL, PARAMETER :: ONE=1.0E0,ZERO=0.0E0 + DOUBLE PRECISION,PARAMETER :: ONE=1.0D0,ZERO=0.0D0 +!C-------------------------------------------------------------------- +!C Machine-dependent constants +!C-------------------------------------------------------------------- +!CS REAL.PARAMETER :: XSMALL=5.95E-8, XINF=3.40E+38 ,XMAX=85.337E0 + DOUBLE PRECISION,PARAMETER :: XSMALL=1.11D-16,XINF=1.79D+308,XMAX=705.342D0 +!-------------------------------------------------------------------- +! +! Coefficients for XSMALL .LE. ARG .LE. 1.0 +! +!-------------------------------------------------------------------- +!S DATA P/ 5.8599221412826100000E-04, 1.3166052564989571850E-01, +!S 1 1.1999463724910714109E+01, 4.6850901201934832188E+02, +!S 2 5.9169059852270512312E+03, 2.4708152720399552679E+03/ +!S DATA Q/-2.4994418972832303646E+02, 2.1312714303849120380E+04/ +!S DATA F/-1.6414452837299064100E+00,-2.9601657892958843866E+02, +!S 1 -1.7733784684952985886E+04,-4.0320340761145482298E+05/ +!S DATA G/-2.5064972445877992730E+02, 2.9865713163054025489E+04, +!S 1 -1.6128136304458193998E+06/ + DATA P/5.8599221412826100000D-04,1.3166052564989571850D-01,& +& 1.1999463724910714109D+01,4.6850901201934832188D+02,& +& 5.9169059852270512312D+03,2.4708152720399552679D+03/ + DATA Q/-2.4994418972832303646D+02, 2.1312714303849120380D+04/ + DATA F/-1.6414452837299064100D+00,-2.9601657892958843866D+02,& +& -1.7733784684952985886D+04,-4.0320340761145482298D+05/ + DATA G/-2.5064972445877992730D+02, 2.9865713163054025489D+04,& +& -1.6128136304458193998D+06/ +!-------------------------------------------------------------------- +! +! Coefficients for 1.0 .LT. ARG +! +!-------------------------------------------------------------------- +!S DATA PP/ 1.1394980557384778174E+02, 3.6832589957340267940E+03, +!S 1 3.1075408980684392399E+04, 1.0577068948034021957E+05, +!S 2 1.7398867902565686251E+05, 1.5097646353289914539E+05, +!S 3 7.1557062783764037541E+04, 1.8321525870183537725E+04, +!S 4 2.3444738764199315021E+03, 1.1600249425076035558E+02/ +!S DATA QQ/ 2.0013443064949242491E+02, 4.4329628889746408858E+03, +!S 1 3.1474655750295278825E+04, 9.7418829762268075784E+04, +!S 2 1.5144644673520157801E+05, 1.2689839587977598727E+05, +!S 3 5.8824616785857027752E+04, 1.4847228371802360957E+04, +!S 4 1.8821890840982713696E+03, 9.2556599177304839811E+01/ + DATA PP/ 1.1394980557384778174D+02, 3.6832589957340267940D+03,& +& 3.1075408980684392399D+04, 1.0577068948034021957D+05,& +& 1.7398867902565686251D+05, 1.5097646353289914539D+05,& +& 7.1557062783764037541D+04, 1.8321525870183537725D+04,& +& 2.3444738764199315021D+03, 1.1600249425076035558D+02/ + DATA QQ/ 2.0013443064949242491D+02, 4.4329628889746408858D+03, & +& 3.1474655750295278825D+04, 9.7418829762268075784D+04,& +& 1.5144644673520157801D+05, 1.2689839587977598727D+05,& +& 5.8824616785857027752D+04, 1.4847228371802360957D+04,& +& 1.8821890840982713696D+03, 9.2556599177304839811D+01/ +!-------------------------------------------------------------------- + X = ARG + IF (X .GT. ZERO) THEN + IF (X .LE. ONE) THEN +!-------------------------------------------------------------------- +! 0.0 .LT. ARG .LE. 1.0 +!-------------------------------------------------------------------- + TEMP = LOG(X) + IF (X .LT. XSMALL) THEN +!-------------------------------------------------------------------- +! Return for small ARG +!-------------------------------------------------------------------- + RESULT = P(6)/Q(2) - TEMP + ELSE + XX = X * X + SUMP = ((((P(1)*XX + P(2))*XX + P(3))*XX +& + P(4))*XX + P(5))*XX + P(6) + SUMQ = (XX + Q(1))*XX + Q(2) + SUMF = ((F(1)*XX + F(2))*XX + F(3))*XX + F(4) + SUMG = ((XX + G(1))*XX + G(2))*XX + G(3) + RESULT = SUMP/SUMQ - XX*SUMF*TEMP/SUMG - TEMP + IF (JINT .EQ. 2) RESULT = RESULT * EXP(X) + END IF + ELSE IF ((JINT .EQ. 1) .AND. (X .GT. XMAX)) THEN +!-------------------------------------------------------------------- +! Error return for ARG .GT. XMAX +!-------------------------------------------------------------------- + RESULT = ZERO + ELSE +!-------------------------------------------------------------------- +! 1.0 .LT. ARG +!-------------------------------------------------------------------- + XX = ONE / X + SUMP = PP(1) + DO 120 I = 2, 10 + SUMP = SUMP*XX + PP(I) + 120 CONTINUE + SUMQ = XX + DO 140 I = 1, 9 + SUMQ = (SUMQ + QQ(I))*XX + 140 CONTINUE + SUMQ = SUMQ + QQ(10) + RESULT = SUMP / SUMQ / SQRT(X) + IF (JINT .EQ. 1) RESULT = RESULT * EXP(-X) + END IF + ELSE +!-------------------------------------------------------------------- +! Error return for ARG .LE. 0.0 +!-------------------------------------------------------------------- + RESULT = XINF + END IF +!-------------------------------------------------------------------- +! Update error counts, etc. +!-------------------------------------------------------------------- + RETURN +!---------- Last line of CALCK0 ---------- + END subroutine calck0 +!!*** + +!S REAL + DOUBLE PRECISION FUNCTION BESK0(X) +!-------------------------------------------------------------------- +! +! This function program computes approximate values for the +! modified Bessel function of the second kind of order zero +! for arguments 0.0 .LT. ARG .LE. XMAX (see comments heading +! CALCK0). +! +! Authors: W. J. Cody and Laura Stoltz +! +! Latest Modification: January 19, 1988 +! +!-------------------------------------------------------------------- + IMPLICIT NONE + INTEGER :: JINT +!S REAL + DOUBLE PRECISION :: X, RESULT +!-------------------------------------------------------------------- + JINT = 1 + CALL CALCK0(X,RESULT,JINT) + BESK0 = RESULT + RETURN +!---------- Last line of BESK0 ---------- + END function besk0 +!!*** + +!S REAL + DOUBLE PRECISION FUNCTION BESEK0(X) +!-------------------------------------------------------------------- +! +! This function program computes approximate values for the +! modified Bessel function of the second kind of order zero +! multiplied by the Exponential function, for arguments +! 0.0 .LT. ARG. +! +! Authors: W. J. Cody and Laura Stoltz +! +! Latest Modification: January 19, 1988 +! +!-------------------------------------------------------------------- + IMPLICIT NONE + INTEGER JINT +!S REAL + DOUBLE PRECISION :: X,RESULT +!-------------------------------------------------------------------- + JINT = 2 + CALL CALCK0(X,RESULT,JINT) + BESEK0 = RESULT + RETURN +!---------- Last line of BESEK0 ---------- + END function BESEK0 +!!*** + +!!****f* ABINIT/CALCK1 +!! NAME +!! CALCK1 +!! +!! FUNCTION +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SIDE EFFECTS +!! +!! NOTES +!! +!! SOURCE + +SUBROUTINE CALCK1(ARG,RESULT,JINT) + +!-------------------------------------------------------------------- +! +! This packet computes modified Bessel functions of the second kind +! and order one, K1(X) and EXP(X)*K1(X), for real arguments X. +! It contains two function type subprograms, BESK1 and BESEK1, +! and one subroutine type subprogram, CALCK1. The calling +! statements for the primary entries are +! +! Y=BESK1(X) +! and +! Y=BESEK1(X) +! +! where the entry points correspond to the functions K1(X) and +! EXP(X)*K1(X), respectively. The routine CALCK1 is intended +! for internal packet use only, all computations within the +! packet being concentrated in this routine. The function +! subprograms invoke CALCK1 with the statement +! CALL CALCK1(ARG,RESULT,JINT) +! where the parameter usage is as follows +! +! Function Parameters for CALCK1 +! Call ARG RESULT JINT +! +! BESK1(ARG) XLEAST .LT. ARG .LT. XMAX K1(ARG) 1 +! BESEK1(ARG) XLEAST .LT. ARG EXP(ARG)*K1(ARG) 2 +! +! The main computation evaluates slightly modified forms of near +! minimax rational approximations generated by Russon and Blair, +! Chalk River (Atomic Energy of Canada Limited) Report AECL-3461, +! 1969. This transportable program is patterned after the +! machine-dependent FUNPACK packet NATSK1, but cannot match that +! version for efficiency or accuracy. This version uses rational +! functions that theoretically approximate K-SUB-1(X) to at +! least 18 significant decimal digits. The accuracy achieved +! depends on the arithmetic system, the compiler, the intrinsic +! functions, and proper selection of the machine-dependent +! constants. +! +!******************************************************************* +!******************************************************************* +! +! Explanation of machine-dependent constants +! +! beta = Radix for the floating-point system +! minexp = Smallest representable power of beta +! maxexp = Smallest power of beta that overflows +! XLEAST = Smallest acceptable argument, i.e., smallest machine +! number X such that 1/X is machine representable. +! XSMALL = Argument below which BESK1(X) and BESEK1(X) may +! each be represented by 1/X. A safe value is the +! largest X such that 1.0 + X = 1.0 to machine +! precision. +! XINF = Largest positive machine number; approximately +! beta**maxexp +! XMAX = Largest argument acceptable to BESK1; Solution to +! equation: +! W(X) * (1+3/8X-15/128X**2) = beta**minexp +! where W(X) = EXP(-X)*SQRT(PI/2X) +! +! +! Approximate values for some important machines are: +! +! beta minexp maxexp +! +! CRAY-1 (S.P.) 2 -8193 8191 +! Cyber 180/185 +! under NOS (S.P.) 2 -975 1070 +! IEEE (IBM/XT, +! SUN, etc.) (S.P.) 2 -126 128 +! IEEE (IBM/XT, +! SUN, etc.) (D.P.) 2 -1022 1024 +! IBM 3033 (D.P.) 16 -65 63 +! VAX D-Format (D.P.) 2 -128 127 +! VAX G-Format (D.P.) 2 -1024 1023 +! +! +! XLEAST XSMALL XINF XMAX +! +! CRAY-1 1.84E-2466 3.55E-15 5.45E+2465 5674.858 +! Cyber 180/855 +! under NOS (S.P.) 3.14E-294 1.77E-15 1.26E+322 672.789 +! IEEE (IBM/XT, +! SUN, etc.) (S.P.) 1.18E-38 5.95E-8 3.40E+38 85.343 +! IEEE (IBM/XT, +! SUN, etc.) (D.P.) 2.23D-308 1.11D-16 1.79D+308 705.343 +! IBM 3033 (D.P.) 1.39D-76 1.11D-16 7.23D+75 177.855 +! VAX D-Format (D.P.) 5.88D-39 6.95D-18 1.70D+38 86.721 +! VAX G-Format (D.P.) 1.12D-308 5.55D-17 8.98D+307 706.728 +! +!******************************************************************* +!******************************************************************* +! +! Error returns +! +! The program returns the value XINF for ARG .LE. 0.0 and the +! BESK1 entry returns the value 0.0 for ARG .GT. XMAX. +! +! +! Intrinsic functions required are: +! +! LOG, SQRT, EXP +! +! +! Authors: W. J. Cody and Laura Stoltz +! Mathematics and Computer Science Division +! Argonne National Laboratory +! Argonne, IL 60439 +! +! Latest modification: January 28, 1988 +! Taken from http://www.netlib.org/specfun/k1 +! +!-------------------------------------------------------------------- + IMPLICIT NONE + INTEGER :: I,JINT +!CS REAL + DOUBLE PRECISION :: & +& ARG,F,G,ONE,P,PP,Q,QQ,RESULT,SUMF,SUMG,& +& SUMP,SUMQ,X,XINF,XMAX,XLEAST,XSMALL,XX,ZERO + DIMENSION P(5),Q(3),PP(11),QQ(9),F(5),G(3) +!-------------------------------------------------------------------- +! Mathematical constants +!-------------------------------------------------------------------- +!CS DATA ONE/1.0E0/,ZERO/0.0E0/ + DATA ONE/1.0D0/,ZERO/0.0D0/ +!-------------------------------------------------------------------- +! Machine-dependent constants +!-------------------------------------------------------------------- +!CS DATA XLEAST/1.18E-38/,XSMALL/5.95E-8/,XINF/3.40E+38/, +!CS 1 XMAX/85.343E+0/ + DATA XLEAST/2.23D-308/,XSMALL/1.11D-16/,XINF/1.79D+308/,& +& XMAX/705.343D+0/ +!-------------------------------------------------------------------- +! Coefficients for XLEAST .LE. ARG .LE. 1.0 +!-------------------------------------------------------------------- +!CS DATA P/ 4.8127070456878442310E-1, 9.9991373567429309922E+1, +!CS 1 7.1885382604084798576E+3, 1.7733324035147015630E+5, +!CS 2 7.1938920065420586101E+5/ +!CS DATA Q/-2.8143915754538725829E+2, 3.7264298672067697862E+4, +!CS 1 -2.2149374878243304548E+6/ +!CS DATA F/-2.2795590826955002390E-1,-5.3103913335180275253E+1, +!CS 1 -4.5051623763436087023E+3,-1.4758069205414222471E+5, +!CS 2 -1.3531161492785421328E+6/ +!CS DATA G/-3.0507151578787595807E+2, 4.3117653211351080007E+4, +!CS 2 -2.7062322985570842656E+6/ + DATA P/ 4.8127070456878442310D-1, 9.9991373567429309922D+1,& +& 7.1885382604084798576D+3, 1.7733324035147015630D+5,& +& 7.1938920065420586101D+5/ + DATA Q/-2.8143915754538725829D+2, 3.7264298672067697862D+4,& +& -2.2149374878243304548D+6/ + DATA F/-2.2795590826955002390D-1,-5.3103913335180275253D+1,& +& -4.5051623763436087023D+3,-1.4758069205414222471D+5,& +& -1.3531161492785421328D+6/ + DATA G/-3.0507151578787595807D+2, 4.3117653211351080007D+4,& +& -2.7062322985570842656D+6/ +!-------------------------------------------------------------------- +! Coefficients for 1.0 .LT. ARG +!-------------------------------------------------------------------- +!CS DATA PP/ 6.4257745859173138767E-2, 7.5584584631176030810E+0, +!CS 1 1.3182609918569941308E+2, 8.1094256146537402173E+2, +!CS 2 2.3123742209168871550E+3, 3.4540675585544584407E+3, +!CS 3 2.8590657697910288226E+3, 1.3319486433183221990E+3, +!CS 4 3.4122953486801312910E+2, 4.4137176114230414036E+1, +!CS 5 2.2196792496874548962E+0/ +!CS DATA QQ/ 3.6001069306861518855E+1, 3.3031020088765390854E+2, +!CS 1 1.2082692316002348638E+3, 2.1181000487171943810E+3, +!CS 2 1.9448440788918006154E+3, 9.6929165726802648634E+2, +!CS 3 2.5951223655579051357E+2, 3.4552228452758912848E+1, +!CS 4 1.7710478032601086579E+0/ + DATA PP/ 6.4257745859173138767D-2, 7.5584584631176030810D+0,& +& 1.3182609918569941308D+2, 8.1094256146537402173D+2,& +& 2.3123742209168871550D+3, 3.4540675585544584407D+3,& +& 2.8590657697910288226D+3, 1.3319486433183221990D+3,& +& 3.4122953486801312910D+2, 4.4137176114230414036D+1,& +& 2.2196792496874548962D+0/ + DATA QQ/ 3.6001069306861518855D+1, 3.3031020088765390854D+2,& +& 1.2082692316002348638D+3, 2.1181000487171943810D+3,& +& 1.9448440788918006154D+3, 9.6929165726802648634D+2,& +& 2.5951223655579051357D+2, 3.4552228452758912848D+1,& +& 1.7710478032601086579D+0/ +!-------------------------------------------------------------------- + X = ARG + IF (X .LT. XLEAST) THEN +!-------------------------------------------------------------------- +! Error return for ARG .LT. XLEAST +!-------------------------------------------------------------------- + RESULT = XINF + ELSE IF (X .LE. ONE) THEN +!-------------------------------------------------------------------- +! XLEAST .LE. ARG .LE. 1.0 +!-------------------------------------------------------------------- + IF (X .LT. XSMALL) THEN +!-------------------------------------------------------------------- +! Return for small ARG +!-------------------------------------------------------------------- + RESULT = ONE / X + ELSE + XX = X * X + SUMP = ((((P(1)*XX + P(2))*XX + P(3))*XX + P(4))*XX & +& + P(5))*XX + Q(3) + SUMQ = ((XX + Q(1))*XX + Q(2))*XX + Q(3) + SUMF = (((F(1)*XX + F(2))*XX + F(3))*XX + F(4))*XX & +& + F(5) + SUMG = ((XX + G(1))*XX + G(2))*XX + G(3) + RESULT = (XX * LOG(X) * SUMF/SUMG + SUMP/SUMQ) / X + IF (JINT .EQ. 2) RESULT = RESULT * EXP(X) + END IF + ELSE IF ((JINT .EQ. 1) .AND. (X .GT. XMAX)) THEN +!-------------------------------------------------------------------- +! Error return for ARG .GT. XMAX +!-------------------------------------------------------------------- + RESULT = ZERO + ELSE +!-------------------------------------------------------------------- +! 1.0 .LT. ARG +!-------------------------------------------------------------------- + XX = ONE / X + SUMP = PP(1) + DO 120 I = 2, 11 + SUMP = SUMP * XX + PP(I) + 120 CONTINUE + SUMQ = XX + DO 140 I = 1, 8 + SUMQ = (SUMQ + QQ(I)) * XX + 140 CONTINUE + SUMQ = SUMQ + QQ(9) + RESULT = SUMP / SUMQ / SQRT(X) + IF (JINT .EQ. 1) RESULT = RESULT * EXP(-X) + END IF + RETURN +!---------- Last line of CALCK1 ---------- + END subroutine calck1 +!!*** + +!CS REAL + DOUBLE PRECISION FUNCTION BESK1(X) +!-------------------------------------------------------------------- +! +! This function program computes approximate values for the +! modified Bessel function of the second kind of order one +! for arguments XLEAST .LE. ARG .LE. XMAX. +! +!-------------------------------------------------------------------- + IMPLICIT NONE + INTEGER :: JINT +!CS REAL + DOUBLE PRECISION :: & +& X, RESULT +!-------------------------------------------------------------------- + JINT = 1 + CALL CALCK1(X,RESULT,JINT) + BESK1 = RESULT + RETURN +!---------- Last line of BESK1 ---------- + END function besk1 +!!*** + +!CS REAL + DOUBLE PRECISION FUNCTION BESEK1(X) +!-------------------------------------------------------------------- +! +! This function program computes approximate values for the +! modified Bessel function of the second kind of order one +! multiplied by the exponential function, for arguments +! XLEAST .LE. ARG .LE. XMAX. +! +!-------------------------------------------------------------------- + IMPLICIT NONE + INTEGER JINT +!CS REAL + DOUBLE PRECISION :: & +& X, RESULT +!-------------------------------------------------------------------- + JINT = 2 + CALL CALCK1(X,RESULT,JINT) + BESEK1 = RESULT + RETURN +!---------- Last line of BESEK1 ---------- + END function besek1 +!!*** + +end module m_bessel +!!*** diff --git a/GX-PAW/common/src/28_numeric_noabirule/m_bessel.o b/GX-PAW/common/src/28_numeric_noabirule/m_bessel.o new file mode 100644 index 00000000..53c2c7a9 Binary files /dev/null and b/GX-PAW/common/src/28_numeric_noabirule/m_bessel.o differ diff --git a/GX-PAW/common/src/28_numeric_noabirule/m_bspline.F90 b/GX-PAW/common/src/28_numeric_noabirule/m_bspline.F90 new file mode 100644 index 00000000..c8438720 --- /dev/null +++ b/GX-PAW/common/src/28_numeric_noabirule/m_bspline.F90 @@ -0,0 +1,2163 @@ +!!****m* ABINIT/m_bspline +!! NAME +!! m_bspline +!! +!! FUNCTION +!! This library contains routines for B-spline interpolation in +!! one, two, and three dimensions. Part of the routines are based +!! on the book by Carl de Boor: A practical guide to Splines (Springer, +!! New-York 1978) and have the same calling sequence and names as +!! the corresponding routines from the IMSL library. For documen- +!! tation see the additional files. NOTE: The results in the demo +!! routines may vary slightly on different architectures. +!! +!! by W. Schadow 12/04/99 +!! last changed by W. Schadow 07/28/2000 +!! VERSION 2.2 f90 VERSION +!! +!! Wolfgang Schadow +!! TRIUMF +!! 4004 Wesbrook Mall +!! Vancouver, B.C. V6T 2A3 +!! Canada +!! +!! email: schadow@triumf.ca or schadow@physik.uni-bonn.de +!! +!! www : http://www.triumf.ca/people/schadow +!! +!! MG got it from http://netlib.org/a/bspllib.tgz +!! +!! COPYRIGHT +!! Copyright (C) 2000 Wolfgang Schadow +!! +!! This library is free software; you can redistribute it and/or +!! modify it under the terms of the GNU Library 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 +!! Library General Public License for more details. +!! +!! You should have received a copy of the GNU Library General Public +!! License along with this library; if not, write to the +!! Free Software Foundation, Inc., 59 Temple Place - Suite 330, +!! Boston, MA 02111-1307, USA. +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" + +module m_bspline + + use m_abicore + use m_errors + + use defs_basis, only : sp, dp, std_out + + implicit none + + private +!!*** + + public :: dbsnak + public :: dbsint, dbsval, dbsder, dbs1gd + public :: dbs2in, dbs2dr, dbs2vl, dbs2gd + public :: dbs3in, dbs3vl, dbs3dr, dbs3gd + + integer, parameter :: sgl = sp ! kind(1.0) + integer, parameter :: dbl = dp ! kind(1.0d0) + +contains + +! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + + subroutine dbsnak(nx,xvec,kxord,xknot) + +! +! Compute the `not-a-knot' spline knot sequence. +! (see de Boor p. 167) +! +! nx - number of data points. (input) +! xvec - array of length ndata containing the location of the +! data points. (input) +! kxord - order of the spline. (input) +! xknot - array of length ndata+korder containing the knot +! sequence. (output) +! + integer, intent(in) :: nx, kxord + + real(kind=dbl), dimension(nx), intent(in) :: xvec + real(kind=dbl), dimension(nx+kxord), intent(out) :: xknot + + real(kind=dbl) :: eps + integer :: ix + logical :: first = .true. + + save first,eps + + + if (first) then + first=.false. + eps = epsilon(1.0_dbl) + !write(std_out,*) "subroutine dbsnak: ","eps = ",eps + endif + + if((kxord .lt. 0) .or. (kxord .gt. nx)) then + write(std_out,*) "subroutine dbsnak: error" + write(std_out,*) "0 <= kxord <= nx is required." + write(std_out,*) "kxord = ", kxord, " and nx = ", nx, " is given." + ABI_ERROR("Aborting now") + endif + + do ix = 1, kxord + xknot(ix) = xvec(1) + end do + + if(mod(kxord,2) .eq. 0) then + do ix = kxord+1, nx + xknot(ix) = xvec(ix-kxord/2) + end do + else + do ix = kxord+1, nx + xknot(ix) = 0.5_dbl * (xvec(ix-kxord/2) + xvec(ix-kxord/2-1)) + end do + endif + + do ix = nx+1, nx+kxord + xknot(ix) = xvec(nx) * (1.0_dbl + eps) + end do + + end subroutine dbsnak + + +! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + + subroutine dbsint(nx,xvec,xdata,kx,xknot,bcoef) + +! +! Computes the spline interpolant, returning the B-spline coefficients. +! (see de Boor p. 204) +! +! nx - number of data points. (input) +! xvec - array of length nx containing the data point +! abscissas. (input) +! xdata - array of length ndata containing the data point +! ordinates. (input) +! kx - order of the spline. (input) +! korder must be less than or equal to ndata. +! xknot - array of length nx+kx containing the knot +! sequence. (input) +! xknot must be nondecreasing. +! bscoef - array of length ndata containing the B-spline +! coefficients. (output) +! + integer, intent(in) :: nx, kx + real(kind=dbl), dimension(nx), intent(in) :: xdata, xvec + real(kind=dbl), dimension(nx+kx), intent(in) :: xknot + real(kind=dbl), dimension(nx), intent(out) :: bcoef + + integer :: nxp1, kxm1, kpkm2, leftx, lenq + integer :: ix, ik,ilp1mx, jj, iflag + real(kind=dbl) :: xveci + real(kind=dbl), dimension((2*kx-1)*nx) :: work + + + nxp1 = nx + 1 + kxm1 = kx - 1 + kpkm2 = 2 * kxm1 + leftx = kx + lenq = nx * (kx + kxm1) + + do ix = 1, lenq + work(ix) = 0.0_dbl + end do + + do ix = 1, nx + xveci = xvec(ix) + ilp1mx = min0(ix+kx,nxp1) + leftx = max0(leftx,ix) + if (xveci .lt. xknot(leftx)) goto 998 +30 if (xveci .lt. xknot(leftx+1)) go to 40 + leftx = leftx + 1 + if (leftx .lt. ilp1mx) go to 30 + leftx = leftx - 1 + if (xveci .gt. xknot(leftx+1)) goto 998 +40 call bsplvb (xknot,nx+kx,kx,1,xveci,leftx,bcoef) + jj = ix - leftx + 1 + (leftx - kx) * (kx + kxm1) + do ik = 1, kx + jj = jj + kpkm2 + work(jj) = bcoef(ik) + end do + end do + + call banfac(work,kx+kxm1,nx,kxm1,kxm1,iflag) + + if (iflag .ne. 1) then + write(std_out,*) "subroutine dbsint: error" + write(std_out,*) "no solution of linear equation system !!!" + ABI_ERROR("Aborting now") + end if + + do ix = 1, nx + bcoef(ix) = xdata(ix) + end do + + call banslv(work,kx+kxm1,nx,kxm1,kxm1,bcoef) + + return + +998 write(std_out,*) "subroutine dbsint:" + write(std_out,*) "xknot(ix) <= xknot(ix+1) required." + write(std_out,*) ix,xknot(ix),xknot(ix+1) + + ABI_ERROR("Aborting now") + + end subroutine dbsint + + +! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + + function dbsval(x,kx,xknot,nx,bcoef) + +! +! Evaluates a spline, given its B-spline representation. +! +! x - point at which the spline is to be evaluated. (input) +! kx - order of the spline. (input) +! xknot - array of length nx+kx containing the knot +! sequence. (input) +! xknot must be nondecreasing. +! nx - number of B-spline coefficients. (input) +! bcoef - array of length nx containing the B-spline +! coefficients. (input) +! dbsval - value of the spline at x. (output) +! + integer, intent(in) :: nx, kx + real(kind=dbl) :: dbsval + real(kind=dbl) :: x + real(kind=dbl), dimension(nx+kx), intent(in) :: xknot + real(kind=dbl), dimension(nx), intent(in) :: bcoef + + integer :: il, ik, ix, leftx + real(kind=dbl) :: save1, save2 + real(kind=dbl), dimension(kx) :: work, dl, dr + +! +! check if xknot(i) <= xknot(i+1) and calculation of i so that +! xknot(i) <= x < xknot(i+1) +! + + leftx = 0 + + do ix = 1,nx+kx-1 + if (xknot(ix) .gt. xknot(ix+1)) then + write(std_out,*) "subroutine dbsval:" + write(std_out,*) "xknot(ix) <= xknot(ix+1) required." + write(std_out,*) ix,xknot(ix),xknot(ix+1) + ABI_ERROR("Aborting now") + endif + if((xknot(ix) .le. x) .and. (x .lt. xknot(ix+1))) leftx = ix + end do + + if(leftx .eq. 0) then + write(std_out,*) "subroutine dbsval:" + write(std_out,*) "ix with xknot(ix) <= x < xknot(ix+1) required." + write(std_out,*) "x = ", x + ABI_ERROR("Aborting now") + endif + + do ik = 1, kx-1 + work(ik) = bcoef(leftx+ik-kx) + dl(ik) = x - xknot(leftx+ik-kx) + dr(ik) = xknot(leftx+ik) - x + end do + + work(kx) = bcoef(leftx) + dl(kx) = x - xknot(leftx) + + do ik = 1, kx-1 + save2 = work(ik) + do il = ik+1, kx + save1 = work(il) + work(il) = (dl(il) * work(il) + dr(il-ik) * save2) & + & / (dl(il) + dr(il - ik)) + save2 = save1 + end do + end do + + dbsval = work(kx) + + end function dbsval + + +! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + + function dbsder(iderx,x,kx,xknot,nx,bcoef) + +! +! Evaluates the derivative of a spline, given its B-spline representation. +! +! +! iderx - order of the derivative to be evaluated. (input) +! in particular, iderx = 0 returns the value of the +! spline. +! x - point at which the spline is to be evaluated. (input) +! kx - order of the spline. (input) +! xknot - array of length nx+kx containing the knot +! sequence. (input) +! xknot must be nondecreasing. +! nx - number of B-spline coefficients. (input) +! bcoef - array of length nx containing the B-spline +! coefficients. (input) +! dbsder - value of the iderx-th derivative of the spline at x. +! (output) +! + integer, intent(in) :: iderx, kx, nx + real(kind=dbl) :: dbsder + real(kind=dbl), intent(in) :: x + real(kind=dbl), dimension(nx+kx), intent(in) :: xknot + real(kind=dbl), dimension(nx), intent(in) :: bcoef + + integer :: ix, ik, il, leftx + real(kind=dbl) :: save, save1, save2, y, sum, dik + real(kind=dbl), dimension(kx) :: work, dl, dr,bsp + +! +! check if xknot(i) <= xknot(i+1) and calculation of i so that +! xknot(i) <= x < xknot(i+1) +! + + leftx = 0 + do ix = 1,nx+kx-1 + if (xknot(ix) .gt. xknot(ix+1)) then + write(std_out,*) "subroutine dbsder:" + write(std_out,*) "xknot(ix) <= xknot(ix+1) required." + ABI_ERROR("Aborting now") + endif + if ((xknot(ix) .le. x) .and. (x .lt. xknot(ix+1))) leftx = ix + end do + + if (leftx .eq. 0) then + write(std_out,*) "subroutine dbsder:" + write(std_out,*) "ix with xknot(ix) <= x < xknot(ix+1) required." + write(std_out,*) "xknot(1) = ", xknot(1) + write(std_out,*) "xknot(nx+kx) = ", xknot(nx+kx) + write(std_out,*) " x = ", x + ABI_ERROR("Aborting now") + endif + + if (iderx .eq. 0) then + + do ik = 1,kx-1 + work(ik) = bcoef(leftx+ik-kx) + dl(ik) = x - xknot(leftx+ik-kx) + dr(ik) = xknot(leftx+ik) - x + end do + + work(kx) = bcoef(leftx) + dl(kx) = x - xknot(leftx) + + do ik = 1,kx-1 + save2 = work(ik) + do il = ik+1,kx + save1 = work(il) + work(il) = (dl(il) * work(il) + dr(il-ik) * save2) & + & / (dl(il) + dr(il - ik)) + save2 = save1 + end do + end do + + dbsder = work(kx) + + elseif ((iderx .ge. 1) .and. (iderx .lt. kx)) then + + bsp(1) = 1.0_dbl + do ik = 1,kx-iderx-1 + dr(ik) = xknot(leftx+ik) - x + dl(ik) = x - xknot(leftx+1-ik) + save = bsp(1) + bsp(1) = 0.0_dbl + do il = 1, ik + y = save / (dr(il) + dl(ik+1-il)) + bsp(il) = bsp(il) + dr(il) * y + save = bsp(il+1) + bsp(il+1) = dl(ik+1-il) * y + end do + end do + + do ik = 1, kx + work(ik) = bcoef(leftx+ik-kx) + dr(ik) = xknot(leftx+ik) - x + dl(ik) = x - xknot(leftx+ik-kx) + end do + + do ik = 1, iderx + dik = dble(kx - ik) + save2 = work(ik) + do il = ik+1, kx + save1 = work(il) + work(il) = dik * (work(il) - save2) /(dl(il) + dr(il-ik)) + save2 = save1 + end do + end do + + sum = 0.0_dbl + + do ix = 1, kx-iderx + sum = sum + bsp(ix) * work(iderx+ix) + end do + + dbsder = sum + + else + dbsder = 0.0_dbl + endif + + end function dbsder + + +! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + + subroutine dbs1gd(iderx,nxvec,xvec,kx,xknot,nx,bcoef,val) + +! +! Evaluates the derivative of a spline on a grid, given its B-spline +! representation. +! +! iderx - order of the derivative to be evaluated. (input) +! in particular, iderx = 0 returns the value of the +! spline. +! nxvec - length of vector xvec. (input) +! xvec - array of length nxvec containing the points at which the +! spline is to be evaluated. (input) +! xvec should be strictly increasing. +! kx - order of the spline. (input) +! xknot - array of length nx+kx containing the knot +! sequence. (input) +! xknot must be nondecreasing. +! nx - number of B-spline coefficients. (input) +! bcoef - array of length nx containing the B-spline +! coefficients. (input) +! val - array of length nxvec containing the values of the +! iderx-th derivative of the spline at the points in +! xvec. (output) +! + integer, intent(in) :: iderx, nxvec, kx, nx + real(kind=dbl), dimension(nxvec), intent(in) :: xvec + real(kind=dbl), dimension(nx), intent(in) :: bcoef + real(kind=dbl), dimension(nx+kx), intent(in) :: xknot + real(kind=dbl), dimension(nxvec), intent(out) :: val + + integer :: i, il, ik, ix + integer, dimension(nxvec) :: leftx + real(kind=dbl) :: dik + real(kind=dbl), dimension(nxvec,kx) :: dl, dr, biatx, work + real(kind=dbl), dimension(nxvec) :: save1, save2, term + + logical :: same, next + + + leftx(1) = 0 + + call huntn(xknot,nx+kx,kx,xvec(1),leftx(1)) + + do ix = 2, nxvec + leftx(ix) = leftx(ix-1) + same = (xknot(leftx(ix)) .le. xvec(ix)) & + & .and. (xvec(ix) .le. xknot(leftx(ix)+1)) + if(.not. same ) then + leftx(ix) = leftx(ix) + 1 + next = (xknot(leftx(ix)) .le. xvec(ix)) & + & .and. (xvec(ix) .le. xknot(leftx(ix)+1)) + if (.not. next) then + call huntn(xknot,nx+kx,kx,xvec(ix),leftx(ix)) + end if + endif + end do + + do ix = 1, nx+kx-1 + if (xknot(ix) .gt. xknot(ix+1)) then + write(std_out,*) "subroutine dbs1gd:" + write(std_out,*) "xknot(ix) <= xknot(ix+1) required." + write(std_out,*) ix, xknot(ix), xknot(ix+1) + write(std_out,*) + write(std_out,*) xknot + ABI_ERROR("Aborting now") + endif + end do + + do ix = 1, nxvec + if ((xvec(ix).lt.xknot(1)).or.(xvec(ix).gt.xknot(nx+kx))) then + write(std_out,*) "subroutine dbs1gd:" + write(std_out,*) "ix with xknot(ix) <= x < xknot(ix+1) required." + write(std_out,*) "x = ", xvec(ix) + ABI_ERROR("Aborting now") + endif + end do + + if (iderx .eq. 0) then + + do ix = 1,nxvec + biatx(ix,1) = 1._dbl + val(ix) = 0._dbl + end do + + do ik = 1, kx-1 + do ix = 1, nxvec + dr(ix,ik) = xknot(leftx(ix)+ik) - xvec(ix) + dl(ix,ik) = xvec(ix) - xknot(leftx(ix)+1-ik) + save1(ix) = 0._dbl + end do + + do il = 1, ik + do ix = 1,nxvec + term(ix) = biatx(ix,il) & + & / (dr(ix,il) + dl(ix,ik+1-il)) + biatx(ix,il) = save1(ix) + dr(ix,il) * term(ix) + save1(ix) = dl(ix,ik+1-il) * term(ix) + end do + end do + + do ix = 1, nxvec + biatx(ix,ik+1) = save1(ix) + end do + end do + + do ik = 1, kx + do ix = 1, nxvec + val(ix) = val(ix) + biatx(ix,ik) * bcoef(leftx(ix)-kx+ik) + end do + end do + + elseif ((iderx .ge. 1) .and. (iderx .lt. kx)) then + + do ix = 1, nxvec + biatx(ix,1) = 1._dbl + val(ix) = 0._dbl + end do + + do ik = 1, kx-iderx-1 + do ix = 1, nxvec + dr(ix,ik) = xknot(leftx(ix)+ik) - xvec(ix) + dl(ix,ik) = xvec(ix) - xknot(leftx(ix)+1-ik) + save1(ix) = biatx(ix,1) + biatx(ix,1) = 0.0_dbl + do il = 1, ik + term(ix) = save1(ix) & + & / (dr(ix,il) + dl(ix,ik+1-il)) + biatx(ix,il) = biatx(ix,il) + dr(ix,il) * term(ix) + save1(ix) = biatx(ix,il+1) + biatx(ix,il+1) = dl(ix,ik+1-il) * term(ix) + end do + end do + end do + + do ik = 1, kx + do ix = 1, nxvec + work(ix,ik) = bcoef(leftx(ix)+ik-kx) + dr(ix,ik) = xknot(leftx(ix)+ik) - xvec(ix) + dl(ix,ik) = xvec(ix) - xknot(leftx(ix)+ik-kx) + end do + end do + + do ik = 1, iderx + dik = dble(kx - ik) + do ix = 1, nxvec + save2(ix) = work(ix,ik) + do il = ik+1, kx + save1(ix) = work(ix,il) + work(ix,il) = dik * (work(ix,il) - save2(ix)) & + & /(dl(ix,il) + dr(ix,il-ik)) + save2(ix) = save1(ix) + end do + end do + end do + + do i = 1, kx-iderx + do ix = 1, nxvec + val(ix) = val(ix) + biatx(ix,i) * work(ix,iderx+i) + end do + end do + + else + + do ix = 1, nxvec + val(ix) = 0.0_dbl + end do + + endif + + end subroutine dbs1gd + + +! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + + function dbsdca(iderx,x,kx,xknot,nx,bcoef,leftx) + +! +! This routine is equivalent to the routine dbsder, but it does not +! check the parameters!!! +! +! Evaluates the derivative of a spline, given its B-spline representation. +! +! +! iderx - order of the derivative to be evaluated. (input) +! in particular, iderx = 0 returns the value of the +! spline. +! x - point at which the spline is to be evaluated. (input) +! kx - order of the spline. (input) +! xknot - array of length nx+kx containing the knot +! sequence. (input) +! xknot must be nondecreasing. +! nx - number of B-spline coefficients. (input) +! bcoef - array of length nx containing the B-spline +! coefficients. (input) +! leftx - number of the intervall of xknot that includes x +! dbsdca - value of the ideriv-th derivative of the spline at x. +! (output) +! + integer, intent(in) :: iderx, kx, nx + real(kind=dbl) :: dbsdca + real(kind=dbl), intent(in) :: x + real(kind=dbl), dimension(nx+kx), intent(in) :: xknot + real(kind=dbl), dimension(nx), intent(in) :: bcoef + + integer :: i, ik, il, leftx + real(kind=dbl) :: save, save1, save2, y, sum, dik + real(kind=dbl), dimension(kx) :: work, dl, dr,bsp + + + if (iderx .eq. 0) then + + do ik = 1, kx-1 + work(ik) = bcoef(leftx+ik-kx) + dl(ik) = x - xknot(leftx+ik-kx) + dr(ik) = xknot(leftx+ik) - x + end do + + work(kx) = bcoef(leftx) + dl(kx) = x - xknot(leftx) + + do ik = 1, kx-1 + save2 = work(ik) + do il = ik+1, kx + save1 = work(il) + work(il) = (dl(il) * work(il) + dr(il-ik) * save2) & + & / (dl(il) + dr(il - ik)) + save2 = save1 + end do + end do + + dbsdca = work(kx) + + elseif ((iderx .ge. 1) .and. (iderx .lt. kx)) then + bsp(1) = 1.0_dbl + do ik = 1,kx-iderx-1 + dr(ik) = xknot(leftx+ik) - x + dl(ik) = x - xknot(leftx+1-ik) + save = bsp(1) + bsp(1) = 0.0_dbl + do il = 1, ik + y = save / (dr(il) + dl(ik+1-il)) + bsp(il) = bsp(il) + dr(il) * y + save = bsp(il+1) + bsp(il+1) = dl(ik+1-il) * y + end do + end do + + do ik = 1, kx + work(ik) = bcoef(leftx+ik-kx) + dr(ik) = xknot(leftx+ik) - x + dl(ik) = x - xknot(leftx+ik-kx) + end do + + do ik = 1, iderx + dik = dble(kx - ik) + save2 = work(ik) + do il = ik+1, kx + save1 = work(il) + work(il) = dik * (work(il) - save2) /(dl(il) + dr(il-ik)) + save2 = save1 + end do + end do + + sum = 0.0_dbl + + do i = 1, kx-iderx + sum = sum + bsp(i) * work(iderx+i) + end do + + dbsdca = sum + + else + dbsdca = 0.0_dbl + endif + + end function dbsdca + + +! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + + subroutine dbs2in(nx,xvec,ny,yvec,xydata,ldf,kx,ky,xknot,yknot,bcoef) + +! +! Computes a two-dimensional tensor-product spline interpolant, +! returning the tensor-product B-spline coefficients. +! +! nx - number of data points in the x-direction. (input) +! xvec - array of length nx containing the data points in +! the x-direction. (input) +! xdata must be strictly increasing. +! ny - number of data points in the y-direction. (input) +! yvec - array of length ny containing the data points in +! the y-direction. (input) +! ydata must be strictly increasing. +! xydata - array of size nx by nydata containing the values to +! be interpolated. (input) +! fdata(i,j) is the value at (xdata(i),ydata(j)). +! ldf - the leading dimension of fdata exactly as specified in +! the dimension statement of the calling program. +! (input) +! kx - order of the spline in the x-direction. (input) +! kxord must be less than or equal to nxdata. +! ky - order of the spline in the y-direction. (input) +! kyord must be less than or equal to nydata. +! xknot - array of length nx+kx containing the knot +! sequence in the x-direction. (input) +! xknot must be nondecreasing. +! yknot - array of length ny+ky containing the knot +! sequence in the y-direction. (input) +! yknot must be nondecreasing. +! bcoef - array of length nx*ny containing the +! tensor-product B-spline coefficients. (output) +! bscoef is treated internally as a matrix of size nxdata +! by nydata. +! + integer, intent(in) :: nx, ny, kx, ky, ldf + + real(kind=dbl), dimension(nx), intent(in) :: xvec + real(kind=dbl), dimension(ny), intent(in) :: yvec + real(kind=dbl), dimension(nx+kx), intent(in) :: xknot + real(kind=dbl), dimension(ny+ky), intent(in) :: yknot + real(kind=dbl), dimension(ldf,*), intent(in) :: xydata + real(kind=dbl), dimension(nx,ny), intent(out) :: bcoef + + real(kind=dbl), dimension(max(nx,ny),max(nx,ny)) :: work1 + real(kind=dbl), dimension(max(nx,ny)) :: work2 + real(kind=dbl), dimension(max((2*kx-1)*nx,(2*ky-1)*ny)) :: work3 + + + call spli2d(xvec,ldf,xydata,xknot,nx,kx,ny,work2,work3,work1) + call spli2d(yvec,ny, work1, yknot,ny,ky,nx,work2,work3,bcoef) + + end subroutine dbs2in + + +! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + + subroutine spli2d(xyvec,ld,xydata,xyknot,n,k,m,work2,work3,bcoef) + + integer, intent(in) :: ld, n, k, m + real(kind=dbl), dimension(n), intent(in) :: xyvec + real(kind=dbl), dimension(n+k), intent(in) :: xyknot + real(kind=dbl), dimension(ld,m), intent(in) :: xydata + real(kind=dbl), dimension(m,n), intent(out) :: bcoef + + real(kind=dbl), dimension(n), intent(out) :: work2 + real(kind=dbl), dimension((2*k-1)*n), intent(out) :: work3 + + + integer :: np1, km1, kpkm2, left, lenq, i, iflag, ilp1mx, j, jj + real(kind=dbl) :: xyveci + + np1 = n + 1 + km1 = k - 1 + kpkm2 = 2 * km1 + left = k + lenq = n * (k + km1) + + do i = 1,lenq + work3(i) = 0.0_dbl + end do + + do i = 1, n + xyveci = xyvec(i) + ilp1mx = min0(i+k,np1) + left = max0(left,i) + if (xyveci .lt. xyknot(left)) go to 998 +30 if (xyveci .lt. xyknot(left+1)) go to 40 + left = left + 1 + if (left .lt. ilp1mx) go to 30 + left = left - 1 + if (xyveci .gt. xyknot(left+1)) go to 998 +40 call bsplvb(xyknot,n+k,k,1,xyveci,left,work2) + jj = i - left + 1 + (left - k) * (k + km1) + do j = 1, k + jj = jj + kpkm2 + work3(jj) = work2(j) + end do + end do + + call banfac(work3,k+km1,n,km1,km1,iflag ) + + if (iflag .ne. 1) then + write(std_out,*) "subroutine dbs2in: error" + write(std_out,*) "no solution of linear equation system !!!" + ABI_ERROR("Aborting now") + end if + + do j = 1, m + do i = 1, n + work2(i) = xydata(i,j) + end do + + call banslv(work3,k+km1,n,km1,km1,work2) + + do i = 1, n + bcoef(j,i) = work2(i) + end do + end do + + return + +998 write(std_out,*) "subroutine db2in:" + write(std_out,*) "i with knot(i) <= x/y < knot(i+1) required." + write(std_out,*) "knot(1) = ", xyknot(1) + write(std_out,*) "knot(n+k) = ", xyknot(n+k) + write(std_out,*) " x/y = ", xyveci + + ABI_ERROR("Aborting now") + + end subroutine spli2d + + +! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + + function dbs2vl(x,y,kx,ky,xknot,yknot,nx,ny,bcoef) + +! +! evaluates a two-dimensional tensor-product spline, given its +! tensor-product B-spline representation. use numeric +! +! x - x-coordinate of the point at which the spline is to be +! evaluated. (input) +! y - y-coordinate of the point at which the spline is to be +! evaluated. (input) +! kx - order of the spline in the x-direction. (input) +! ky - order of the spline in the y-direction. (input) +! xknot - array of length nx+kx containing the knot +! sequence in the x-direction. (input) +! xknot must be nondecreasing. +! yknot - array of length ny+ky containing the knot +! sequence in the y-direction. (input) +! yknot must be nondecreasing. +! nx - number of B-spline coefficients in the x-direction. +! (input) +! ny - number of B-spline coefficients in the y-direction. +! (input) +! bcoef - array of length nx*ny containing the +! tensor-product B-spline coefficients. (input) +! bscoef is treated internally as a matrix of size nx +! by ny. +! dbs2vl - value of the spline at (x,y). (output) +! + integer, intent(in) :: nx, ny, kx, ky + real(kind=dbl), intent(in) :: x, y + real(kind=dbl), dimension(nx+kx), intent(in) :: xknot + real(kind=dbl), dimension(ny+ky), intent(in) :: yknot + real(kind=dbl), dimension(nx,ny), intent(in) :: bcoef + real(kind=dbl) :: dbs2vl + + integer :: ix, iy, iky, leftx, lefty + real(kind=dbl), dimension(ky) :: work + +! +! check if knot(i) <= knot(i+1) and calculation of i so that +! knot(i) <= x < knot(i+1) +! + + leftx = 0 + + do ix = 1, nx+kx-1 + if (xknot(ix) .gt. xknot(ix+1)) then + write(std_out,*) "subroutine dbs2vl:" + write(std_out,*) "xknot(ix) <= xknot(ix+1) required." + write(std_out,*) ix, xknot(ix), xknot(ix+1) + write(std_out,*) + write(std_out,*) xknot + ABI_ERROR("Aborting now") + endif + if((xknot(ix) .le. x) .and. (x .lt. xknot(ix+1))) leftx = ix + end do + + if(leftx .eq. 0) then + write(std_out,*) "subroutine dbs2vl:" + write(std_out,*) "ix with xknot(ix) <= x < xknot(ix+1) required." + write(std_out,*) "x = ", x + write(std_out,*) + write(std_out,*) xknot + ABI_ERROR("Aborting now") + endif + + lefty = 0 + + do iy = 1, ny+ky-1 + if (yknot(iy) .gt. yknot(iy+1)) then + write(std_out,*) "subroutine dbs2vl:" + write(std_out,*) "yknot(iy) <= yknot(iy+1) required." + write(std_out,*) iy, yknot(iy), yknot(iy+1) + ABI_ERROR("Aborting now") + endif + if((yknot(iy) .le. y) .and. (y .lt. yknot(iy+1))) lefty = iy + end do + + if(lefty .eq. 0) then + write(std_out,*) "subroutine dbs2vl:" + write(std_out,*) "iy with yknot(iy) <= y < yknot(iy+1) required." + write(std_out,*) "yknot(iy) = ", yknot(iy) + write(std_out,*) " y = ", y + write(std_out,*) "yknot(iy+1) = ", yknot(iy+1) + ABI_ERROR("Aborting now") + endif + + do iky = 1, ky + work(iky) = dbsdca(0,x,kx,xknot,nx,bcoef(1,lefty-ky+iky),leftx) + end do + + dbs2vl = dbsval(y,ky,yknot(lefty-ky+1),ky,work) + + end function dbs2vl + + +! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + + function dbs2dr(iderx,idery,x,y,kx,ky,xknot,yknot,nx,ny,bcoef) + +! +! Evaluates the derivative of a two-dimensional tensor-product spline, +! given its tensor-product B-spline representation. +! +! iderx - order of the derivative in the x-direction. (input) +! idery - order of the derivative in the y-direction. (input) +! x - x-coordinate of the point at which the spline is to be +! evaluated. (input) +! y - y-coordinate of the point at which the spline is to be +! evaluated. (input) +! kx - order of the spline in the x-direction. (input) +! ky - order of the spline in the y-direction. (input) +! xknot - array of length nx+kx containing the knot +! sequence in the x-direction. (input) +! xknot must be nondecreasing. +! yknot - array of length ny+ky containing the knot +! sequence in the y-direction. (input) +! yknot must be nondecreasing. +! nx - number of B-spline coefficients in the x-direction. +! (input) +! ny - number of B-spline coefficients in the y-direction. +! (input) +! bcoef - array of length nx*ny containing the +! tensor-product B-spline coefficients. (input) +! bscoef is treated internally as a matrix of size nx +! by ny. +! dbs2dr - value of the (iderx,idery) derivative of the spline at +! (x,y). (output) +! + integer, intent(in) :: iderx, idery + integer, intent(in) :: kx, nx, ky, ny + real(kind=dbl) :: dbs2dr + real(kind=dbl), intent(in) :: x, y + real(kind=dbl), dimension(nx+kx), intent(in) :: xknot + real(kind=dbl), dimension(ny+ky), intent(in) :: yknot + real(kind=dbl), dimension(nx,ny), intent(in) :: bcoef + + integer :: ix, iy, iky, nintx, ninty + real(kind=dbl), dimension(ky) :: work + +! +! check if knot(i) <= knot(i+1) and calculation of i so that +! knot(i) <= x < knot(i+1) +! + + nintx = 0 + + do ix = 1, nx+kx-1 + if (xknot(ix) .gt. xknot(ix+1)) then + write(std_out,*) "subroutine dbs2dr:" + write(std_out,*) "xknot(ix) <= xknot(ix+1) required." + write(std_out,*) ix, xknot(ix), xknot(ix+1) + ABI_ERROR("Aborting now") + endif + if((xknot(ix) .le. x) .and. (x .lt. xknot(ix+1))) nintx = ix + end do + + if(nintx .eq. 0) then + write(std_out,*) "subroutine dbs2dr:" + write(std_out,*) "ix with xknot(ix) <= x < xknot(ix+1) required." + write(std_out,*) "x = ", x + ABI_ERROR("Aborting now") + endif + + ninty = 0 + + do iy = 1, ny+ky-1 + if (yknot(iy) .gt. yknot(iy+1)) then + write(std_out,*) "subroutine dbs2dr:" + write(std_out,*) "yknot(iy) <= yknot(iy+1) required." + write(std_out,*) iy, yknot(iy), yknot(iy+1) + ABI_ERROR("Aborting now") + endif + if ((yknot(iy) .le. y) .and. (y .lt. yknot(iy+1))) ninty = iy + end do + + if(ninty .eq. 0) then + write(std_out,*) "subroutine dbs2dr:" + write(std_out,*) "iy with yknot(iy) <= y < yknot(iy+1) required." + write(std_out,*) "y = ", y + ABI_ERROR("Aborting now") + endif + + do iky = 1, ky + work(iky) = dbsdca(iderx,x,kx,xknot,nx,bcoef(1,ninty-ky+iky),nintx) + end do + + dbs2dr = dbsder(idery,y,ky,yknot(ninty-ky+1),ky,work) + + end function dbs2dr + + +! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + + subroutine dbs2gd(iderx,idery,nxvec,xvec,nyvec,yvec,kx,ky,xknot,yknot, & + & nx,ny,bcoef,val,ldf) + +! +! Evaluates the derivative of a two-dimensional tensor-product spline, +! given its tensor-product B-spline representation on a grid. +! +! iderx - order of the derivative in the x-direction. (input) +! idery - order of the derivative in the y-direction. (input) +! nxvec - number of grid points in the x-direction. (input) +! xvec - array of length nx containing the x-coordinates at +! which the spline is to be evaluated. (input) +! the points in xvec should be strictly increasing. +! nyvec - number of grid points in the y-direction. (input) +! yvec - array of length ny containing the y-coordinates at +! which the spline is to be evaluated. (input) +! the points in yvec should be strictly increasing. +! kx - order of the spline in the x-direction. (input) +! ky - order of the spline in the y-direction. (input) +! xknot - array of length nx+kx containing the knot +! sequence in the x-direction. (input) +! xknot must be nondecreasing. +! yknot - array of length ny+ky containing the knot +! sequence in the y-direction. (input) +! yknot must be nondecreasing. +! nx - number of B-spline coefficients in the x-direction. +! (input) +! ny - number of B-spline coefficients in the y-direction. +! (input) +! bcoef - array of length nx*ny containing the +! tensor-product B-spline coefficients. (input) +! bscoef is treated internally as a matrix of size nx +! by ny. +! val - value of the (iderx,idery) derivative of the spline on +! the nx by ny grid. (output) +! value(i,j) contains the derivative of the spline at the +! point (xvec(i),yvec(j)). +! ldf - leading dimension of value exactly as specified in the +! dimension statement of the calling program. (input) +! + integer, intent(in) :: iderx, idery + integer, intent(in) :: nxvec, nyvec + integer, intent(in) :: kx, nx, ky, ny + integer, intent(in) :: ldf + + real(kind=dbl), dimension(nxvec), intent(in) :: xvec + real(kind=dbl), dimension(nyvec), intent(in) :: yvec + real(kind=dbl), dimension(nx+kx), intent(in) :: xknot + real(kind=dbl), dimension(ny+ky), intent(in) :: yknot + real(kind=dbl), dimension(nx,ny), intent(in) :: bcoef + real(kind=dbl), dimension(ldf,*), intent(out) :: val + + integer :: i, ik, il, ix, iy, ikx, iky + integer, dimension(nxvec) :: leftx + integer, dimension(nyvec) :: lefty + real(kind=dbl), dimension(nxvec,kx) :: dl, dr + real(kind=dbl), dimension(max(nxvec,nyvec)) :: save1 + real(kind=dbl), dimension(nxvec,kx) :: biatx + real(kind=dbl), dimension(nyvec,ky) :: biaty + real(kind=dbl), dimension(max(nxvec,nyvec)) :: term + real(kind=dbl), dimension(ky) :: work + + logical :: same,next + + + leftx(1) = 0 + + call huntn(xknot,nx+kx,kx,xvec(1),leftx(1)) + + do ix = 2, nxvec + leftx(ix) = leftx(ix-1) + same = (xknot(leftx(ix)) .le. xvec(ix)) & + & .and. (xvec(ix) .le. xknot(leftx(ix)+1)) + if(.not. same ) then + leftx(ix) = leftx(ix) + 1 + next = (xknot(leftx(ix)) .le. xvec(ix)) & + & .and. (xvec(ix) .le. xknot(leftx(ix)+1)) + if (.not. next) then + call huntn(xknot,nx+kx,kx,xvec(ix),leftx(ix)) + end if + endif + end do + + do i = 1, nx+kx-1 + if (xknot(i) .gt. xknot(i+1)) then + write(std_out,*) "subroutine dbs2gd:" + write(std_out,*) "xknot(i) <= xknot(i+1) required." + write(std_out,*) i, xknot(i), xknot(i+1) + write(std_out,*) + write(std_out,*) xknot + ABI_ERROR("Aborting now") + endif + end do + + do i = 1, nxvec + if ((xvec(i).lt.xknot(1)).or.(xvec(i).gt.xknot(nx+kx))) then + write(std_out,*) "subroutine dbs2gd:" + write(std_out,*) "ix with xknot(ix) <= x < xknot(ix+1) required." + write(std_out,*) "x = ", xvec(i) + ABI_ERROR("Aborting now") + endif + end do + + lefty(1) = 0 + + call huntn(yknot,ny+ky,ky,yvec(1),lefty(1)) + + do iy = 2, nyvec + lefty(iy) = lefty(iy-1) + same = (yknot(lefty(iy)) .le. yvec(iy)) & + & .and. (yvec(iy) .le. yknot(lefty(iy)+1)) + if(.not. same ) then + lefty(iy) = lefty(iy) + 1 + next = (yknot(lefty(iy)) .le. yvec(iy)) & + & .and. (yvec(iy) .le. yknot(lefty(iy)+1)) + if (.not. next) then + call huntn(yknot,ny+ky,ky,yvec(iy),lefty(iy)) + end if + endif + end do + + do i = 1, ny+ky-1 + if (yknot(i) .gt. yknot(i+1)) then + write(std_out,*) "subroutine dbs2gd:" + write(std_out,*) "yknot(i) <= yknot(i+1) required." + write(std_out,*) i, yknot(i), yknot(i+1) + write(std_out,*) + write(std_out,*) yknot + ABI_ERROR("Aborting now") + endif + end do + + do i = 1, nyvec + if ((yvec(i).lt.yknot(1)).or.(yvec(i).gt.yknot(ny+ky))) then + write(std_out,*) "subroutine dbs2gd:" + write(std_out,*) "iy with yknot(iy) <= y < yknot(iy+1) required." + write(std_out,*) "y = ", yvec(i) + ABI_ERROR("Aborting now") + endif + end do + + if ((iderx .eq. 0) .and. (idery .eq. 0)) then + + do ix = 1,nxvec + biatx(ix,1) = 1._dbl + end do + + do ik = 1, kx-1 + do ix = 1,nxvec + dr(ix,ik) = xknot(leftx(ix)+ik) - xvec(ix) + dl(ix,ik) = xvec(ix) - xknot(leftx(ix)+1-ik) + save1(ix) = 0._dbl + end do + + do il = 1,ik + do ix = 1,nxvec + term(ix) = biatx(ix,il) & + & / (dr(ix,il) + dl(ix,ik+1-il)) + biatx(ix,il) = save1(ix) + dr(ix,il) * term(ix) + save1(ix) = dl(ix,ik+1-il) * term(ix) + end do + end do + + do ix = 1, nxvec + biatx(ix,ik+1) = save1(ix) + end do + end do + + do iy = 1, nyvec + biaty(iy,1) = 1._dbl + end do + + do ik = 1, ky-1 + do iy = 1, nyvec + dr(iy,ik) = yknot(lefty(iy)+ik) - yvec(iy) + dl(iy,ik) = yvec(iy) - yknot(lefty(iy)+1-ik) + save1(iy) = 0._dbl + end do + + do il = 1, ik + do iy = 1,nyvec + term(iy) = biaty(iy,il) & + & / (dr(iy,il) + dl(iy,ik+1-il)) + biaty(iy,il) = save1(iy) + dr(iy,il) * term(iy) + save1(iy) = dl(iy,ik+1-il) * term(iy) + end do + end do + + do iy = 1, nyvec + biaty(iy,ik+1) = save1(iy) + end do + end do + + do iy = 1, nyvec + do ix = 1, nxvec + val(ix,iy) = 0.0_dbl + end do + end do + + do iky = 1, ky + do ikx = 1, kx + do iy = 1, nyvec + do ix = 1, nxvec + val(ix,iy) = val(ix,iy) & + & + biatx(ix,ikx) * biaty(iy,iky) & + & * bcoef(leftx(ix)-kx+ikx,lefty(iy)-ky+iky) + end do + end do + end do + end do + + elseif (((iderx .ge. 1) .or. (idery .ge. 1)) & + & .and. ( (iderx .lt. kx) .and. (idery .lt. ky))) then + + do iy = 1, nyvec + do ix = 1, nxvec + do iky = 1, ky + work(iky) = dbsdca(iderx,xvec(ix),kx,xknot,nx, & + & bcoef(1,lefty(iy)-ky+iky),leftx(ix)) + end do + val(ix,iy) = dbsder(idery,yvec(iy),ky, & + & yknot(lefty(iy)-ky+1),ky,work) + end do + end do + + else + + do iy = 1, nyvec + do ix = 1, nxvec + val(ix,iy) = 0.0_dbl + end do + end do + + endif + + end subroutine dbs2gd + + +! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + + subroutine dbs3in(nx,xvec,ny,yvec,nz,zvec,xyzdata,ldf,mdf,kx,ky,kz, & + & xknot,yknot,zknot,bcoef) + +! +! Computes a three-dimensional tensor-product spline interpolant, +! returning the tensor-product B-spline coefficients. +! +! nx - number of data points in the x-direction. (input) +! xvec - array of length nxdata containing the data points in +! the x-direction. (input) +! xdata must be increasing. +! ny - number of data points in the y-direction. (input) +! yvec - array of length nydata containing the data points in +! the y-direction. (input) +! ydata must be increasing. +! nz - number of data points in the z-direction. (input) +! zvec - array of length nzdata containing the data points in +! the z-direction. (input) +! zdata must be increasing. +! xyzdata - array of size nx by ny by nz containing the +! values to be interpolated. (input) +! xyzdata(i,j,k) contains the value at +! (xvec(i),yvec(j),zvec(k)). +! ldf - leading dimension of fdata exactly as specified in the +! dimension statement of the calling program. (input) +! mdf - middle dimension of fdata exactly as specified in the +! dimension statement of the calling program. (input) +! kx - order of the spline in the x-direction. (input) +! kxord must be less than or equal to nxdata. +! ky - order of the spline in the y-direction. (input) +! kyord must be less than or equal to nydata. +! kz - order of the spline in the z-direction. (input) +! kzord must be less than or equal to nzdata. +! xknot - array of length nx+kx containing the knot +! sequence in the x-direction. (input) +! xknot must be nondecreasing. +! yknot - array of length ny+ky containing the knot +! sequence in the y-direction. (input) +! yknot must be nondecreasing. +! zknot - array of length nz+kz containing the knot +! sequence in the z-direction. (input) +! zknot must be nondecreasing. +! bcoef - array of length nx*ny*nz containing the +! tensor-product B-spline coefficients. (output) +! bscoef is treated internally as a matrix of size nx +! by ny by nz. +! + integer, intent(in) :: nx, ny, nz, kx, ky, kz + integer, intent(in) :: ldf, mdf + + real(kind=dbl), dimension(nx), intent(in) :: xvec + real(kind=dbl), dimension(ny), intent(in) :: yvec + real(kind=dbl), dimension(nz), intent(in) :: zvec + real(kind=dbl), dimension(nx+kx), intent(in) :: xknot + real(kind=dbl), dimension(ny+ky), intent(in) :: yknot + real(kind=dbl), dimension(nz+kz), intent(in) :: zknot + real(kind=dbl), dimension(ldf,mdf,nz), intent(in) :: xyzdata + real(kind=dbl), dimension(nx,ny,nz), intent(out) :: bcoef + + integer :: iz + real(kind=dbl), dimension(nx,ny,nz) :: work1 + real(kind=dbl), dimension(nz) :: work2 + real(kind=dbl), dimension((2*kz-1)*nz) :: work3 + + + call spli3d(zvec,ldf,mdf,xyzdata,zknot,nz,kz,nx,ny,work2,work3,work1, & + & nx,ny,nz) + + do iz = 1, nz + call dbs2in(nx,xvec,ny,yvec,work1(1,1,iz),nx,kx,ky,xknot,yknot, & + & bcoef(1,1,iz)) + end do + + end subroutine dbs3in + + +! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + + subroutine spli3d(xyzvec,ldf,mdf,xyzdata,xyzknot,n,k,m,l,work2,work3, & + & bcoef,nx,ny,nz) + + integer, intent(in) :: ldf, mdf, n, k, m, l + integer, intent(in) :: nx, ny, nz + real(kind=dbl), dimension(n), intent(in) :: xyzvec + real(kind=dbl), dimension(n+k), intent(in) :: xyzknot + real(kind=dbl), dimension(ldf,mdf,*), intent(in) :: xyzdata + real(kind=dbl), dimension(nx,ny,nz), intent(out) :: bcoef + real(kind=dbl), dimension(n), intent(out) :: work2 + real(kind=dbl), dimension((2*k-1)*n), intent(out) :: work3 + + integer :: np1, km1, kpkm2, left, lenq, i, ilp1mx, j, jj, iflag, in + real(kind=dbl) :: xyzveci + + + np1 = n + 1 + km1 = k - 1 + kpkm2 = 2 * km1 + left = k + lenq = n * (k + km1) + + do i = 1, lenq + work3(i) = 0._dbl + end do + + do i = 1, n + xyzveci = xyzvec(i) + ilp1mx = min0(i+k,np1) + left = max0(left,i) + if (xyzveci .lt. xyzknot(left)) go to 998 +30 if (xyzveci .lt. xyzknot(left+1)) go to 40 + left = left + 1 + if (left .lt. ilp1mx) go to 30 + left = left - 1 + if (xyzveci .gt. xyzknot(left+1)) go to 998 +40 call bsplvb(xyzknot,n+k,k,1,xyzveci,left,work2) + jj = i - left + 1 + (left - k) * (k + km1) + do j = 1, k + jj = jj + kpkm2 + work3(jj) = work2(j) + end do + end do + + call banfac(work3,k+km1,n,km1,km1,iflag) + + if (iflag .ne. 1) then + write(std_out,*) "subroutine dbs3in: error" + write(std_out,*) "no solution of linear equation system !!!" + ABI_ERROR("Aborting now") + end if + + do j = 1, l + do i = 1, m + do in = 1, n + work2(in) = xyzdata(i,j,in) + end do + + call banslv(work3,k+km1,n,km1,km1,work2) + + do in = 1, n + bcoef(i,j,in) = work2(in) + end do + + end do + end do + + return + +998 write(std_out,*) "subroutine db3in:" + write(std_out,*) "i with knot(i) <= x/y/z < knot(i+1) required." + write(std_out,*) "knot(1) = ", xyzknot(1) + write(std_out,*) "knot(n+k) = ", xyzknot(n+k) + write(std_out,*) " x/y/z = ", xyzveci + + ABI_ERROR("Aborting now") + + end subroutine spli3d + + +! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + + function dbs3vl(x,y,z,kx,ky,kz,xknot,yknot,zknot,nx,ny,nz,bcoef) + +! +! Evaluates a three-dimensional tensor-product spline, given its +! tensor-product B-spline representation. +! +! x - x-coordinate of the point at which the spline is to be +! evaluated. (input) +! y - y-coordinate of the point at which the spline is to be +! evaluated. (input) +! z - z-coordinate of the point at which the spline is to be +! evaluated. (input) +! kx - order of the spline in the x-direction. (input) +! ky - order of the spline in the y-direction. (input) +! kz - order of the spline in the z-direction. (input) +! xknot - array of length nx+kx containing the knot +! sequence in the x-direction. (input) +! xknot must be nondecreasing. +! yknot - array of length ny+ky containing the knot +! sequence in the y-direction. (input) +! yknot must be nondecreasing. +! zknot - array of length nz+kz containing the knot +! sequence in the z-direction. (input) +! zknot must be nondecreasing. +! nx - number of B-spline coefficients in the x-direction. +! (input) +! ny - number of B-spline coefficients in the y-direction. +! (input) +! nz - number of B-spline coefficients in the z-direction. +! (input) +! bcoef - array of length nx*ny*nz containing the +! tensor-product B-spline coefficients. (input) +! bscoef is treated internally as a matrix of size nx +! by ny by nz. +! dbs3vl - value of the spline at (x,y,z). (output) +! + integer, intent(in) :: nx, ny, nz, kx, ky, kz + real(kind=dbl), intent(in) :: x, y, z + real(kind=dbl), dimension(nx+kx), intent(in) :: xknot + real(kind=dbl), dimension(ny+ky), intent(in) :: yknot + real(kind=dbl), dimension(nz+kz), intent(in) :: zknot + real(kind=dbl), dimension(nx,ny,nz), intent(in) :: bcoef + real(kind=dbl) :: dbs3vl + + integer :: iz, nintz + real(kind=dbl), dimension(kz) :: work + +! +! check if knot(i) <= knot(i+1) and calculation of i so that +! knot(i) <= x < knot(i+1) +! + + nintz = 0 + + do iz = 1, nz+kz-1 + if (zknot(iz) .gt. zknot(iz + 1)) then + write(std_out,*) "subroutine dbs3vl:" + write(std_out,*) "zknot(iz) <= zknot(iz+1) required." + write(std_out,*) iz, zknot(iz), zknot(iz+1) + ABI_ERROR("Aborting now") + endif + if((zknot(iz) .le. z) .and. (z .lt. zknot(iz + 1))) nintz = iz + end do + + if(nintz .eq. 0) then + write(std_out,*) "subroutine dbs3vl:" + write(std_out,*) "iz with zknot(iz) <= z < zknot(iz+1) required." + write(std_out,*) "zknot(iz) = ", zknot(iz) + write(std_out,*) " z = ", z + write(std_out,*) "zknot(iz+1) = ", zknot(iz+1) + ABI_ERROR("Aborting now") + endif + + do iz = 1, kz + work(iz) = dbs2vl(x,y,kx,ky,xknot,yknot,nx,ny,bcoef(1,1,nintz-kz+iz)) + end do + + dbs3vl = dbsval(z,kz,zknot(nintz-kz+1),kz,work) + + end function dbs3vl + + +! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + + function dbs3dr(iderx,idery,iderz,x,y,z,kx,ky,kz,xknot,yknot,zknot, & + & nx,ny,nz,bcoef) + +! +! Evaluates the derivative of a three-dimensional tensor-product spline, +! given its tensor-product B-spline representation. +! +! iderx - order of the x-derivative. (input) +! idery - order of the y-derivative. (input) +! iderz - order of the z-derivative. (input) +! x - x-coordinate of the point at which the spline is to be +! evaluated. (input) +! y - y-coordinate of the point at which the spline is to be +! evaluated. (input) +! z - z-coordinate of the point at which the spline is to be +! evaluated. (input) +! kx - order of the spline in the x-direction. (input) +! ky - order of the spline in the y-direction. (input) +! kz - order of the spline in the z-direction. (input) +! xknot - array of length nx+kx containing the knot +! sequence in the x-direction. (input) +! xknot must be nondecreasing. +! yknot - array of length ny+ky containing the knot +! sequence in the y-direction. (input) +! yknot must be nondecreasing. +! zknot - array of length nz+kz containing the knot +! sequence in the z-direction. (input) +! zknot must be nondecreasing. +! nx - number of B-spline coefficients in the x-direction. +! (input) +! ny - number of B-spline coefficients in the y-direction. +! (input) +! nz - number of B-spline coefficients in the z-direction. +! (input) +! bcoef - array of length nx*ny*nz containing the +! tensor-product B-spline coefficients. (input) +! bscoef is treated internally as a matrix of size nx +! by ny by nz. +! dbs3dr - value of the (iderx,idery,iderz) derivative of the +! spline at (x,y,z). (output) +! + integer, intent(in) :: iderx, idery, iderz + integer, intent(in) :: nx, ny, nz, kx, ky, kz + real(kind=dbl), intent(in) :: x, y, z + real(kind=dbl), dimension(nx+kx), intent(in) :: xknot + real(kind=dbl), dimension(ny+ky), intent(in) :: yknot + real(kind=dbl), dimension(nz+kz), intent(in) :: zknot + real(kind=dbl), dimension(nx,ny,nz), intent(in) :: bcoef + real(kind=dbl) :: dbs3dr + + integer :: iz, nintz + real(kind=dbl), dimension(kz) :: work + +! +! check if knot(i) <= knot(i+1) and calculation of i so that +! knot(i) <= x < knot(i+1) +! + + nintz = 0 + + do iz = 1, nz+kz-1 + if (zknot(iz) .gt. zknot(iz + 1)) then + write(std_out,*) "subroutine dbs3vl:" + write(std_out,*) "zknot(iz) <= zknot(iz+1) required." + write(std_out,*) iz, zknot(iz), zknot(iz+1) + ABI_ERROR("Aborting now") + endif + if((zknot(iz) .le. z) .and. (z .lt. zknot(iz + 1))) nintz = iz + end do + + if(nintz .eq. 0) then + write(std_out,*) "subroutine dbs3dr:" + write(std_out,*) "iz with zknot(iz) <= z < zknot(iz+1) required." + write(std_out,*) "zknot(iz) = ", zknot(iz) + write(std_out,*) " z = ", z + write(std_out,*) "zknot(iz+1) = ", zknot(iz+1) + ABI_ERROR("Aborting now") + endif + + do iz = 1, kz + work(iz) = dbs2dr(iderx,idery,x,y,kx,ky,xknot,yknot,nx,ny, & + & bcoef(1,1,nintz-kz+iz)) + end do + + dbs3dr = dbsder(iderz,z,kz,zknot(nintz-kz+1),kz,work) + + end function dbs3dr + + +! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + + subroutine dbs3gd(iderx,idery,iderz,nxvec,xvec,nyvec,yvec,nzvec,zvec, & + & kx,ky,kz,xknot,yknot,zknot,nx,ny,nz,bcoef,val,ldf,mdf) + +! +! Evaluates the derivative of a three-dimensional tensor-product spline, +! given its tensor-product B-spline representation on a grid. +! +! iderx - order of the x-derivative. (input) +! idery - order of the y-derivative. (input) +! iderz - order of the z-derivative. (input) +! nx - number of grid points in the x-direction. (input) +! xvec - array of length nx containing the x-coordinates at +! which the spline is to be evaluated. (input) +! the points in xvec should be strictly increasing. +! ny - number of grid points in the y-direction. (input) +! yvec - array of length ny containing the y-coordinates at +! which the spline is to be evaluated. (input) +! the points in yvec should be strictly increasing. +! nz - number of grid points in the z-direction. (input) +! zvec - array of length nz containing the z-coordinates at +! which the spline is to be evaluated. (input) +! the points in yvec should be strictly increasing. +! kx - order of the spline in the x-direction. (input) +! ky - order of the spline in the y-direction. (input) +! kz - order of the spline in the z-direction. (input) +! xknot - array of length nx+kx containing the knot +! sequence in the x-direction. (input) +! xknot must be nondecreasing. +! yknot - array of length ny+ky containing the knot +! sequence in the y-direction. (input) +! yknot must be nondecreasing. +! zknot - array of length nz+kz containing the knot +! sequence in the z-direction. (input) +! zknot must be nondecreasing. +! nx - number of B-spline coefficients in the x-direction. +! (input) +! ny - number of B-spline coefficients in the y-direction. +! (input) +! nz - number of B-spline coefficients in the z-direction. +! (input) +! bcoef - array of length nx*ny*nz containing the +! tensor-product B-spline coefficients. (input) +! bscoef is treated internally as a matrix of size nx +! by ny by nz. +! val - array of size nx by ny by nz containing the values of +! the (iderx,idery,iderz) derivative of the spline on the +! nx by ny by nz grid. (output) +! value(i,j,k) contains the derivative of the spline at +! the point (xvec(i), yvec(j), zvec(k)). +! ldf - leading dimension of value exactly as specified in the +! dimension statement of the calling program. (input) +! mdf - middle dimension of value exactly as specified in the +! dimension statement of the calling program. (input) +! + integer, intent(in) :: iderx, idery, iderz + integer, intent(in) :: nxvec, nyvec, nzvec + integer, intent(in) :: kx, nx, ky, ny, kz, nz + integer, intent(in) :: ldf,mdf + + real(kind=dbl), dimension(nxvec), intent(in) :: xvec + real(kind=dbl), dimension(nyvec), intent(in) :: yvec + real(kind=dbl), dimension(nzvec), intent(in) :: zvec + real(kind=dbl), dimension(nx+kx), intent(in) :: xknot + real(kind=dbl), dimension(ny+ky), intent(in) :: yknot + real(kind=dbl), dimension(nz+kz), intent(in) :: zknot + real(kind=dbl), dimension(nx,ny,nz), intent(in) :: bcoef + real(kind=dbl), dimension(ldf,mdf,*), intent(out) :: val + + integer :: i, ik, il, ix, iy, iz + integer :: ikx, iky, ikz + integer, dimension(nxvec) :: leftx + integer, dimension(nyvec) :: lefty + integer, dimension(nzvec) :: leftz + real(kind=dbl), dimension(nxvec,kx) :: biatx + real(kind=dbl), dimension(nyvec,ky) :: biaty + real(kind=dbl), dimension(nzvec,kz) :: biatz + real(kind=dbl), dimension(max(nxvec,nyvec,nzvec)) :: term, save1 + + real(kind=dbl), dimension(max(nxvec,nyvec,nzvec), max(kx,ky,kz)) :: dl, dr + + logical :: same,next + + + do i = 1, nx+kx-1 + if (xknot(i) .gt. xknot(i+1)) then + write(std_out,*) "subroutine dbs3gd:" + write(std_out,*) "xknot(i) <= xknot(i+1) required." + write(std_out,*) i, xknot(i), xknot(i+1) + write(std_out,*) + write(std_out,*) xknot + ABI_ERROR("Aborting now") + endif + end do + + do i = 1, nxvec + if ((xvec(i).lt.xknot(1)).or.(xvec(i).gt.xknot(nx+kx))) then + write(std_out,*) "subroutine dbs3gd:" + write(std_out,*) "ix with xknot(ix) <= x < xknot(ix+1) required." + write(std_out,*) "x = ", xvec(i) + ABI_ERROR("Aborting now") + endif + end do + + leftx(1) = 0 + + call huntn(xknot,nx+kx,kx,xvec(1),leftx(1)) + + do ix = 2, nxvec + leftx(ix) = leftx(ix-1) + same = (xknot(leftx(ix)) .le. xvec(ix)) & + & .and. (xvec(ix) .le. xknot(leftx(ix)+1)) + if(.not. same ) then + leftx(ix) = leftx(ix) + 1 + next = (xknot(leftx(ix)) .le. xvec(ix)) & + & .and. (xvec(ix) .le. xknot(leftx(ix)+1)) + if (.not. next) then + call huntn(xknot,nx+kx,kx,xvec(ix),leftx(ix)) + end if + endif + end do + + do i = 1, ny+ky-1 + if (yknot(i) .gt. yknot(i+1)) then + write(std_out,*) "subroutine dbs3gd:" + write(std_out,*) "yknot(i) <= yknot(i+1) required." + write(std_out,*) i, yknot(i), yknot(i+1) + write(std_out,*) + write(std_out,*) yknot + ABI_ERROR("Aborting now") + endif + end do + + do i = 1, nyvec + if ((yvec(i).lt.yknot(1)).or.(yvec(i).gt.yknot(ny+ky))) then + write(std_out,*) "subroutine dbs3gd:" + write(std_out,*) "iy with yknot(iy) <= y < yknot(iy+1) required." + write(std_out,*) "y = ", yvec(i) + ABI_ERROR("Aborting now") + endif + end do + + lefty(1) = 0 + + call huntn(yknot,ny+ky,ky,yvec(1),lefty(1)) + + do iy = 2, nyvec + lefty(iy) = lefty(iy-1) + same = (yknot(lefty(iy)) .le. yvec(iy)) & + & .and. (yvec(iy) .le. yknot(lefty(iy)+1)) + if(.not. same ) then + lefty(iy) = lefty(iy) + 1 + next = (yknot(lefty(iy)) .le. yvec(iy)) & + & .and. (yvec(iy) .le. yknot(lefty(iy)+1)) + if (.not. next) then + call huntn(yknot,ny+ky,ky,yvec(iy),lefty(iy)) + end if + endif + end do + + do i = 1,nz+kz-1 + if (zknot(i) .gt. zknot(i+1)) then + write(std_out,*) "subroutine dbs3gd:" + write(std_out,*) "zknot(i) <= zknot(i+1) required." + write(std_out,*) i, zknot(i), zknot(i+1) + write(std_out,*) + write(std_out,*) zknot + ABI_ERROR("Aborting now") + endif + end do + + do i = 1, nzvec + if ((zvec(i).lt.zknot(1)).or.(zvec(i).gt.zknot(nz+kz))) then + write(std_out,*) "subroutine dbs3gd:" + write(std_out,*) "iz with zknot(iz) <= z < zknot(iz+1) required." + write(std_out,*) "z = ", zvec(i) + ABI_ERROR("Aborting now") + endif + end do + + leftz(1) = 0 + + call huntn(zknot,nz+kz,kz,zvec(1),leftz(1)) + + do iz = 2, nzvec + leftz(iz) = leftz(iz-1) + same = (zknot(leftz(iz)) .le. zvec(iz)) & + & .and. (zvec(iz) .le. zknot(leftz(iz)+1)) + if(.not. same ) then + leftz(iz) = leftz(iz) + 1 + next = (zknot(leftz(iz)) .le. zvec(iz)) & + & .and. (zvec(iz) .le. zknot(leftz(iz)+1)) + if (.not. next) then + call huntn(zknot,nz+kz,kz,zvec(iz),leftz(iz)) + end if + endif + end do + + if ((iderx .eq. 0) .and. (idery .eq. 0) .and. (iderz .eq.0)) then + + do ix = 1, nxvec + biatx(ix,1) = 1.0_dbl + end do + + do ik = 1, kx-1 + do ix = 1, nxvec + dr(ix,ik) = xknot(leftx(ix)+ik) - xvec(ix) + dl(ix,ik) = xvec(ix) - xknot(leftx(ix)+1-ik) + save1(ix) = 0._dbl + end do + + do il = 1, ik + do ix = 1, nxvec + term(ix) = biatx(ix,il) / (dr(ix,il) + dl(ix,ik+1-il)) + biatx(ix,il) = save1(ix) + dr(ix,il) * term(ix) + save1(ix) = dl(ix,ik+1-il) * term(ix) + end do + end do + + do ix = 1, nxvec + biatx(ix,ik+1) = save1(ix) + end do + end do + + do iy = 1, nyvec + biaty(iy,1) = 1.0_dbl + end do + + do ik = 1, ky-1 + do iy = 1, nyvec + dr(iy,ik) = yknot(lefty(iy)+ik) - yvec(iy) + dl(iy,ik) = yvec(iy) - yknot(lefty(iy)+1-ik) + save1(iy) = 0._dbl + end do + + do il = 1,ik + do iy = 1,nyvec + term(iy) = biaty(iy,il) / (dr(iy,il) + dl(iy,ik+1-il)) + biaty(iy,il) = save1(iy) + dr(iy,il) * term(iy) + save1(iy) = dl(iy,ik+1-il) * term(iy) + end do + end do + + do iy = 1,nyvec + biaty(iy,ik+1) = save1(iy) + end do + end do + + do iz = 1,nzvec + biatz(iz,1) = 1.0_dbl + end do + + do ik = 1, kz-1 + do iz = 1, nzvec + dr(iz,ik) = zknot(leftz(iz)+ik) - zvec(iz) + dl(iz,ik) = zvec(iz) - zknot(leftz(iz)+1-ik) + save1(iz) = 0._dbl + end do + + do il = 1, ik + do iz = 1, nzvec + term(iz) = biatz(iz,il) / (dr(iz,il) + dl(iz,ik+1-il)) + biatz(iz,il) = save1(iz) + dr(iz,il) * term(iz) + save1(iz) = dl(iz,ik+1-il) * term(iz) + end do + end do + + do iz = 1, nzvec + biatz(iz,ik+1) = save1(iz) + end do + end do + + do iz = 1,nzvec + do iy = 1,nyvec + do ix = 1,nxvec + val(ix,iy,iz) = 0.0_dbl + end do + end do + end do + + do ikz = 1, kz + do iky = 1, ky + do ikx = 1, kx + do iz = 1, nzvec + do iy = 1, nyvec + do ix = 1, nxvec + val(ix,iy,iz) = val(ix,iy,iz) & + & + biatx(ix,ikx) * biaty(iy,iky) & + & * biatz(iz,ikz) & + & * bcoef(leftx(ix)-kx+ikx, & + & lefty(iy)-ky+iky,leftz(iz)-kz+ikz) + end do + end do + end do + end do + end do + end do + + else + + do iz = 1, nzvec + do iy = 1, nyvec + do ix = 1, nxvec + val(ix,iy,iz) = dbs3dr(iderx,idery,iderz,xvec(ix), & + & yvec(iy),zvec(iz),kx,ky,kz,xknot,yknot, & + & zknot,nx,ny,nz,bcoef) + end do + end do + end do + + endif + + end subroutine dbs3gd + + +! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + + subroutine bsplvb(t,n,jhigh,index,x,left,biatx) + + integer, intent(in) :: n, jhigh, index, left + + real(kind=dbl), intent(in) :: x + real(kind=dbl), dimension(n), intent(in) :: t + real(kind=dbl), dimension(jhigh), intent(out) :: biatx + + integer :: j = 1 + integer :: i, jp1 + real(kind=dbl) :: saved, term + real(kind=dbl), dimension(jhigh) :: dl, dr + + + if (index .eq. 1) then + j = 1 + biatx(1) = 1.0_dbl + if (j .ge. jhigh) return + end if + +20 jp1 = j + 1 + + dr(j) = t(left+j) - x + dl(j) = x - t(left+1-j) + saved = 0._dbl + + do i = 1, j + term = biatx(i) / (dr(i) + dl(jp1-i)) + biatx(i) = saved + dr(i) * term + saved = dl(jp1-i) * term + end do + + biatx(jp1) = saved + j = jp1 + + if (j .lt. jhigh) go to 20 + + end subroutine bsplvb + + +! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + + subroutine banfac(w,nroww,nrow,nbandl,nbandu,iflag) + + integer, intent(in) :: nroww,nrow + integer, intent(in) :: nbandl,nbandu + integer, intent(out) :: iflag + real(kind=dbl), dimension(nroww,nrow), intent(inout) :: w + + real(kind=dbl) :: pivot, factor + integer :: middle, nrowm1, jmax, kmax, ipk, midmk, i, j, k + + + iflag = 1 + middle = nbandu + 1 + nrowm1 = nrow - 1 + + if (nrowm1 .lt. 0) goto 999 + if (nrowm1 .eq. 0) goto 900 + if (nrowm1 .gt. 0) goto 10 + +10 if (nbandl .gt. 0) go to 30 + + do i = 1, nrowm1 + if (w(middle,i) .eq. 0._dbl) go to 999 + end do + + go to 900 + +30 if (nbandu .gt. 0) go to 60 + + do i = 1, nrowm1 + pivot = w(middle,i) + if(pivot .eq. 0._dbl) go to 999 + jmax = min0(nbandl, nrow - i) + do j = 1, jmax + w(middle+j,i) = w(middle+j,i) / pivot + end do + end do + + return + +60 do i = 1, nrowm1 + pivot = w(middle,i) + if (pivot .eq. 0._dbl) go to 999 + jmax = min0(nbandl,nrow - i) + do j = 1,jmax + w(middle+j,i) = w(middle+j,i) / pivot + end do + + kmax = min0(nbandu,nrow - i) + + do k = 1, kmax + ipk = i + k + midmk = middle - k + factor = w(midmk,ipk) + do j = 1, jmax + w(midmk+j,ipk) = w(midmk+j,ipk) - w(middle+j,i) & + & * factor + end do + end do + end do + +900 if (w(middle,nrow) .ne. 0._dbl) return +999 iflag = 2 + + end subroutine banfac + + +! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + + subroutine banslv(w,nroww,nrow,nbandl,nbandu,b) + + integer, intent(in) :: nroww,nrow + integer, intent(in) :: nbandl,nbandu + real(kind=dbl), dimension(nroww,nrow), intent(in) :: w + real(kind=dbl), dimension(nrow), intent(inout) :: b + + integer :: middle, nrowm1, jmax, i, j + + middle = nbandu + 1 + if (nrow .eq. 1) goto 99 + nrowm1 = nrow - 1 + if (nbandl .eq. 0) goto 30 + + do i = 1, nrowm1 + jmax = min0(nbandl, nrow - i) + do j = 1, jmax + b(i+j) = b(i+j) - b(i) * w(middle+j,i) + end do + end do + +30 if (nbandu .gt. 0) goto 50 + + do i = 1, nrow + b(i) = b(i) / w(1,i) + end do + + return + +50 do i = nrow, 2, -1 + b(i) = b(i)/w(middle,i) + jmax = min0(nbandu,i-1) + do j = 1, jmax + b(i-j) = b(i-j) - b(i) * w(middle-j,i) + end do + end do + +99 b(1) = b(1) / w(middle,1) + + end subroutine banslv + + +! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + + subroutine huntn(xx,n,kord,x,jlo) + + integer, intent(in) :: n, kord + real(kind=dbl), intent(in) :: x + real(kind=dbl), dimension(n), intent(in) :: xx + + integer, intent(out) :: jlo + + integer :: max, null, jhi, jm, inc + +! +! works only for B-Splines (order n) +! + + max = n - kord + null = kord + + if (jlo.le.null.or.jlo.gt.max) then + jlo = null + jhi = max+1 + goto 30 + endif + + inc = 1 + + if (x .ge. xx(jlo)) then +10 jhi = jlo + inc + if (jhi .gt. max) then + jhi = max + 1 + else if (x .ge. xx(jhi)) then + jlo = jhi + inc = inc + inc + goto 10 + endif + else + jhi = jlo +20 jlo = jhi - inc + if (jlo .le. null) then + jlo = null + else if (x .lt. xx(jlo)) then + jhi = jlo + inc = inc + inc + goto 20 + endif + endif + +30 if (jhi-jlo.eq.1) return + + jm = (jhi + jlo) / 2 + if (x .gt. xx(jm)) then + jlo = jm + else + jhi = jm + endif + + goto 30 + + end subroutine huntn +! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +end module m_bspline +!!*** diff --git a/GX-PAW/common/src/28_numeric_noabirule/m_bspline.o b/GX-PAW/common/src/28_numeric_noabirule/m_bspline.o new file mode 100644 index 00000000..19445b5c Binary files /dev/null and b/GX-PAW/common/src/28_numeric_noabirule/m_bspline.o differ diff --git a/GX-PAW/common/src/28_numeric_noabirule/m_cplxtools.F90 b/GX-PAW/common/src/28_numeric_noabirule/m_cplxtools.F90 new file mode 100644 index 00000000..a83a405a --- /dev/null +++ b/GX-PAW/common/src/28_numeric_noabirule/m_cplxtools.F90 @@ -0,0 +1,1105 @@ +!!****m* ABINIT/m_cplxtools +!! NAME +!! m_cplxtools +!! +!! FUNCTION +!! This module defines helper functions to operate on complex arrays (mainly used in the GW code) +!! +!! COPYRIGHT +!! Copyright (C) 1992-2024 ABINIT group (MG) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! For the initials of contributors, see ~abinit/doc/developers/contributors.txt . +!! +!! NOTES +!! 1) The convention about names of interfaced routine is: cplx_, +!! where is equal to the name of the standard BLAS routine +!! +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" + +MODULE m_cplxtools + + use defs_basis + use m_abicore + use m_errors + use m_xmpi + + use m_fstrings, only : toupper + + implicit none + + private + + ! Helper functions. + public :: cplx_fromreal + public :: cplx_filter + + ! Blas1 + public :: cplx_real_zdotc + public :: cplx_zaxpby + + ! Blas2 + public :: cplx_zgemv + + !Blas3 + public :: cplx_zgemm + + ! Helper functions for DFT calculations. + public :: cplx_box2gsph + public :: cplx_gsph2box + public :: cplx_setaug_zero + public :: cplx_setaug_zero_dpc + public :: cplx_setaug_zero_spc + public :: cplx_addtorho +!*** + + ! Interfaces + interface cplx_box2gsph + module procedure cplx_box2gsph_spc + module procedure cplx_box2gsph_dpc + end interface cplx_box2gsph + + interface cplx_gsph2box + module procedure cplx_gsph2box_spc + module procedure cplx_gsph2box_dpc + end interface cplx_gsph2box + + interface cplx_setaug_zero + module procedure cplx_setaug_zero_spc + module procedure cplx_setaug_zero_dpc + end interface cplx_setaug_zero + + interface cplx_addtorho + module procedure cplx_addtorho_dpc + end interface cplx_addtorho + + !integer,parameter,private :: MIN_SIZE = 5000 + + complex(spc),private,parameter :: czero_spc = (0._sp,0._sp) + complex(spc),private,parameter :: cone_spc = (1._sp,0._sp) + !complex(spc) ,parameter :: j_spc=(0._sp,1.0_sp) + + complex(dpc),private,parameter :: czero_dpc = (0._dp,0._dp) + complex(dpc),private,parameter :: cone_dpc = (1._dp,0._dp) + !complex(dpc) ,parameter :: j_dpc=(0._dp,1.0_dp) + +CONTAINS !======================================================================================== +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_cplxtools/cplx_fromreal +!! NAME +!! cplx_fromreal +!! +!! FUNCTION +!! Convert a real array with (real,imag) part to a complex array +!! +!! INPUTS +!! n = Specifies the number of elements in ocplx +!! ireal(2*n)=Input real array. +!! +!! OUTPUT +!! ocplx(n)=Output complex array +!! +!! SOURCE + +subroutine cplx_fromreal(n,ireal,ocplx) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: n +!arrays + real(dp),intent(in) :: ireal(2,n) + complex(dpc),intent(out) :: ocplx(n) + +!Local variables ------------------------------ +!scalars + integer :: ii + +! ************************************************************************* + +!$OMP PARALLEL DO PRIVATE(ii) + do ii=1,n + ocplx(ii) = DCMPLX(ireal(1,ii),ireal(2,ii)) + end do + +end subroutine cplx_fromreal +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_cplxtools/cplx_filter +!! NAME +!! cplx_filter +!! +!! FUNCTION +!! Set all the elements of x to zero where mask is .TRUE. +!! +!! INPUTS +!! n=Specifies the number of elements in vectors x and y. +!! mask(n)=Logical array. +!! +!! SIDE EFFECTS +!! x(n)=See description. +!! +!! SOURCE + +subroutine cplx_filter(n, x, mask) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: n +!arrays + complex(dpc),intent(inout) :: x(n) + logical,intent(in) :: mask(n) + +! ************************************************************************* + + where (mask) + x = czero + end where + +end subroutine cplx_filter +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_cplxtools/cplx_real_zdotc +!! NAME +!! cplx_real_zdotc +!! +!! FUNCTION +!! Perform a vector-vector operation defined as res = REAL (\Sigma (conjg(x)*y)) where x and y are n-element vectors. +!! +!! INPUTS +!! n = Specifies the number of elements in vector x and y +!! x,y = Input arrays. +!! +!! OUTPUT +!! res=Real part of the scalar product. +!! +!! SOURCE + +function cplx_real_zdotc(n,x,y) result(res) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: n +!arrays + complex(dpc),intent(in) :: x(n) + complex(dpc),intent(in) :: y(n) + real(dp) :: res + +!Local variables------------------------------- + real(dp),external :: ddot + +! ************************************************************************* + + res = ddot(2*n,x,1,y,1) + +end function cplx_real_zdotc +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_cplxtools/cplx_zaxpby +!! NAME +!! cplx_zaxpby +!! +!! FUNCTION +!! Scales two vectors, adds them to one another and stores result in the vector. +!! y := a*x + b*y +!! +!! INPUTS +!! n = the number of elements in vectors x and y. +!! a = Specifies the scalar a. +!! x = Array. +!! b = Specifies the scalar b. +!! y = Array +!! +!! OUTPUT +!! y Contains the updated vector y. +!! +!! SOURCE + +subroutine cplx_zaxpby(n,a,x,b,y) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: n + complex(dpc),intent(in) :: a,b +!arrays + complex(dpc),intent(in) :: x(n) + complex(dpc),intent(inout) :: y(n) + +! ************************************************************************* + +#ifdef HAVE_LINALG_AXPBY + call zaxpby(n, a, x, 1, b, y, 1) +#else + call zscal(n, b, y, 1) + call zaxpy(n, a, x, 1, y,1) +#endif + +end subroutine cplx_zaxpby +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_cplxtools/cplx_zgemv +!! NAME +!! cplx_zgemv +!! +!! FUNCTION +!! The ?gemv routines perform a matrix-vector operation defined as +!! +!! y := alpha*A*x + beta*y, +!! or +!! y := alpha*A'*x + beta*y, +!! or +!! y := alpha*conjg(A')*x + beta*y, +!! +!! where: alpha and beta are scalars, x and y are vectors, A is an m-by-n matrix. +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +subroutine cplx_zgemv(trans,nrows,ncols,mat,vec,matvec,alpha,beta) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: nrows,ncols + complex(dpc),optional,intent(in) :: alpha,beta + character(len=1),intent(in) :: trans +!arrays + complex(dpc),intent(in) :: mat(nrows*ncols) + complex(dpc),intent(in) :: vec(*) + complex(dpc),intent(inout) :: matvec(*) + +!Local variables------------------------------- +!scalars + integer :: mm,nn,kk,lda,ldb,ldc + complex(dpc) :: my_alpha,my_beta + +! ************************************************************************* + + lda = nrows + mm = nrows + nn = 1 + kk = ncols + + if (toupper(trans) /= 'N') then + mm = ncols + kk = nrows + end if + + ldb = kk + ldc = mm + + my_alpha = cone_dpc; if (PRESENT(alpha)) my_alpha = alpha + my_beta = czero_dpc; if (PRESENT(beta)) my_beta = beta + + call ZGEMM(trans,"N",mm,nn,kk,my_alpha,mat,lda,vec,ldb,my_beta,matvec,ldc) + + !call ZGEMV(trans,mm,nn,my_alpha,mat,lda,vec,1,my_beta,matvec,1) + +end subroutine cplx_zgemv +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_cplxtools/cplx_zgemm +!! NAME +!! cplx_zgemm +!! +!! FUNCTION +!! The ?gemm routines perform a matrix-matrix operation with general matrices. +!! The operation is defined as C := alpha*op(A)*op(B) + beta*C, +!! where: +!! +!! op(x) is one of op(x) = x, or op(x) = x', or op(x) = conjg(x'), +!! +!! alpha and beta are scalars, +!! A, B and C are matrices: +!! op(A) is an m-by-k matrix, +!! op(B) is a k-by-n matrix, +!! C is an m-by-n matrix. +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +subroutine cplx_zgemm(transa,transb,npws,ncola,ncolb,amat,bmat,cmat,alpha,beta) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: npws,ncola,ncolb + complex(dpc),optional,intent(in) :: alpha,beta + character(len=1),intent(in) :: transa,transb +!arrays + complex(dpc),intent(in) :: amat(npws*ncola) + complex(dpc),intent(in) :: bmat(npws*ncolb) + complex(dpc),intent(inout) :: cmat(*) + +!Local variables------------------------------- +!scalars + integer :: mm,nn,kk,lda,ldb,ldc + complex(dpc) :: my_alpha,my_beta + +! ************************************************************************* + + lda = npws + ldb = npws + + mm = npws + nn = ncolb + kk = ncola + + if (toupper(transa) /= 'N') then + mm = ncola + kk = npws + end if + if (toupper(transb) /= 'N') nn = npws + + ldc = mm + + my_alpha = cone_dpc; if (PRESENT(alpha)) my_alpha = alpha + my_beta = czero_dpc; if (PRESENT(beta)) my_beta = beta + + call ZGEMM(transa,transb,mm,nn,kk,my_alpha,amat,lda,bmat,ldb,my_beta,cmat,ldc) + +end subroutine cplx_zgemm +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_cplxtools/cplx_box2gsph_spc +!! NAME +!! cplx_box2gsph_spc +!! +!! FUNCTION +!! Transfer data from the FFT box to the G-sphere. Target SPC complex array. +!! +!! INPUTS +!! nx,ny,nz=physical dimension of the FFT box. +!! ldx,ldy,ldz=Logical dimensions of the arrays. +!! ndat=number of data in iarrbox +!! npw_k=Number of planewaves in the G-sphere. +!! kg_k(3,npw_k)=Reduced coordinates of the G-vectoes. +!! iarrbox(ldx*ldy*ldz*ndat)=Complex Input arrays on the FFT box. +!! [rscal] = Scaling factor +!! +!! OUTPUT +!! oarrsph(npw_k*ndat)=Complex Data defined on the G-sphere. +!! +!! SOURCE + +subroutine cplx_box2gsph_spc(nx,ny,nz,ldx,ldy,ldz,ndat,npw_k,kg_k,iarrbox,oarrsph,rscal) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: npw_k,nx,ny,nz,ldx,ldy,ldz,ndat + real(sp),optional,intent(in) :: rscal +!arrays + integer,intent(in) :: kg_k(3,npw_k) + complex(spc),intent(in) :: iarrbox(ldx*ldy*ldz*ndat) + complex(spc),intent(out) :: oarrsph(npw_k*ndat) + +!Local variables------------------------------- +!scalars + integer :: ig,ix,iy,iz,dat,pad_sph,pad_box,ifft,ldxyz + +! ************************************************************************* + + ldxyz = ldx*ldy*ldz + if (.not. PRESENT(rscal)) then + ! + if (ndat==1) then +!$OMP PARALLEL DO PRIVATE(ix,iy,iz,ifft) + do ig=1,npw_k + ix=kg_k(1,ig); if (ix<0) ix=ix+nx; ix=ix+1 + iy=kg_k(2,ig); if (iy<0) iy=iy+ny; iy=iy+1 + iz=kg_k(3,ig); if (iz<0) iz=iz+nz; iz=iz+1 + ifft = ix + (iy-1)*ldx + (iz-1)*ldx*ldy + oarrsph(ig) = iarrbox(ifft) + end do + else +!$OMP PARALLEL DO PRIVATE(pad_sph,pad_box,ix,iy,iz,ifft) + do dat=1,ndat + pad_sph = (dat-1)*npw_k + pad_box = (dat-1)*ldxyz + do ig=1,npw_k + ix=kg_k(1,ig); if (ix<0) ix=ix+nx; ix=ix+1 + iy=kg_k(2,ig); if (iy<0) iy=iy+ny; iy=iy+1 + iz=kg_k(3,ig); if (iz<0) iz=iz+nz; iz=iz+1 + ifft = ix + (iy-1)*ldx + (iz-1)*ldx*ldy + oarrsph(ig+pad_sph) = iarrbox(ifft+pad_box) + end do + end do + end if + ! + else + if (ndat==1) then +!$OMP PARALLEL DO PRIVATE(ix,iy,iz,ifft) + do ig=1,npw_k + ix=kg_k(1,ig); if (ix<0) ix=ix+nx; ix=ix+1 + iy=kg_k(2,ig); if (iy<0) iy=iy+ny; iy=iy+1 + iz=kg_k(3,ig); if (iz<0) iz=iz+nz; iz=iz+1 + ifft = ix + (iy-1)*ldx + (iz-1)*ldx*ldy + oarrsph(ig) = iarrbox(ifft) * rscal + end do + else +!$OMP PARALLEL DO PRIVATE(pad_sph,pad_box,ix,iy,iz,ifft) + do dat=1,ndat + pad_sph = (dat-1)*npw_k + pad_box = (dat-1)*ldxyz + do ig=1,npw_k + ix=kg_k(1,ig); if (ix<0) ix=ix+nx; ix=ix+1 + iy=kg_k(2,ig); if (iy<0) iy=iy+ny; iy=iy+1 + iz=kg_k(3,ig); if (iz<0) iz=iz+nz; iz=iz+1 + ifft = ix + (iy-1)*ldx + (iz-1)*ldx*ldy + oarrsph(ig+pad_sph) = iarrbox(ifft+pad_box) * rscal + end do + end do + end if + end if + +end subroutine cplx_box2gsph_spc +!!*** + +!---------------------------------------------------------------------- + +!---------------------------------------------------------------------- + +!!****f* m_cplxtools/cplx_box2gsph_dpc +!! NAME +!! cplx_box2gsph_dpc +!! +!! FUNCTION +!! Transfer data from the FFT box to the G-sphere. Target DPC complex array. +!! +!! INPUTS +!! nx,ny,nz=physical dimension of the FFT box. +!! ldx,ldy,ldz=Logical dimensions of the arrays. +!! ndat=number of data in iarrbox +!! npw_k=Number of planewaves in the G-sphere. +!! kg_k(3,npw_k)=Reduced coordinates of the G-vectoes. +!! iarrbox(ldx*ldy*ldz*ndat)=Complex Input arrays on the FFT box. +!! [rscal] = Scaling factor +!! +!! OUTPUT +!! oarrsph(npw_k*ndat)=Complex Data defined on the G-sphere. +!! +!! SOURCE + +subroutine cplx_box2gsph_dpc(nx,ny,nz,ldx,ldy,ldz,ndat,npw_k,kg_k,iarrbox,oarrsph,rscal) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: npw_k,nx,ny,nz,ldx,ldy,ldz,ndat + real(dp),optional,intent(in) :: rscal +!arrays + integer,intent(in) :: kg_k(3,npw_k) + complex(dpc),intent(in) :: iarrbox(ldx*ldy*ldz*ndat) + complex(dpc),intent(out) :: oarrsph(npw_k*ndat) + +!Local variables------------------------------- +!scalars + integer :: ig,ix,iy,iz,dat,pad_sph,pad_box,ifft,ldxyz + +! ************************************************************************* + + ldxyz = ldx*ldy*ldz + if (.not. PRESENT(rscal)) then + ! + if (ndat==1) then +!$OMP PARALLEL DO PRIVATE(ix,iy,iz,ifft) + do ig=1,npw_k + ix=kg_k(1,ig); if (ix<0) ix=ix+nx; ix=ix+1 + iy=kg_k(2,ig); if (iy<0) iy=iy+ny; iy=iy+1 + iz=kg_k(3,ig); if (iz<0) iz=iz+nz; iz=iz+1 + ifft = ix + (iy-1)*ldx + (iz-1)*ldx*ldy + oarrsph(ig) = iarrbox(ifft) + end do + else +!$OMP PARALLEL DO PRIVATE(pad_sph,pad_box,ix,iy,iz,ifft) + do dat=1,ndat + pad_sph = (dat-1)*npw_k + pad_box = (dat-1)*ldxyz + do ig=1,npw_k + ix=kg_k(1,ig); if (ix<0) ix=ix+nx; ix=ix+1 + iy=kg_k(2,ig); if (iy<0) iy=iy+ny; iy=iy+1 + iz=kg_k(3,ig); if (iz<0) iz=iz+nz; iz=iz+1 + ifft = ix + (iy-1)*ldx + (iz-1)*ldx*ldy + oarrsph(ig+pad_sph) = iarrbox(ifft+pad_box) + end do + end do + end if + ! + else + if (ndat==1) then +!$OMP PARALLEL DO PRIVATE(ix,iy,iz,ifft) + do ig=1,npw_k + ix=kg_k(1,ig); if (ix<0) ix=ix+nx; ix=ix+1 + iy=kg_k(2,ig); if (iy<0) iy=iy+ny; iy=iy+1 + iz=kg_k(3,ig); if (iz<0) iz=iz+nz; iz=iz+1 + ifft = ix + (iy-1)*ldx + (iz-1)*ldx*ldy + oarrsph(ig) = iarrbox(ifft) * rscal + end do + else +!$OMP PARALLEL DO PRIVATE(pad_sph,pad_box,ix,iy,iz,ifft) + do dat=1,ndat + pad_sph = (dat-1)*npw_k + pad_box = (dat-1)*ldxyz + do ig=1,npw_k + ix=kg_k(1,ig); if (ix<0) ix=ix+nx; ix=ix+1 + iy=kg_k(2,ig); if (iy<0) iy=iy+ny; iy=iy+1 + iz=kg_k(3,ig); if (iz<0) iz=iz+nz; iz=iz+1 + ifft = ix + (iy-1)*ldx + (iz-1)*ldx*ldy + oarrsph(ig+pad_sph) = iarrbox(ifft+pad_box) * rscal + end do + end do + end if + end if + +end subroutine cplx_box2gsph_dpc +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_cplxtools/cplx_gsph2box_spc +!! NAME +!! cplx_gsph2box_spc +!! +!! FUNCTION +!! Array iarrsph is defined in sphere with npw points. Insert iarrsph inside box +!! of nx*ny*nz points to define array oarrbox for fft box. rest of oarrbox is filled with 0 s. +!! targer: SPC complex arrays +!! +!! INPUTS +!! iarrsph(2,npw*ndat)= contains values for npw G vectors in basis sphere +!! ndat=number of FFT to perform. +!! npw=number of G vectors in basis at this k point +!! oarrbox(2,ldx*ldy*ldz*ndat) = fft box +!! nx,ny,nz=physical dimension of the box (oarrbox) +!! ldx,ldy,ldz=memory dimension of oarrbox +!! kg_k(3,npw)=integer coordinates of G vectors in basis sphere +!! istwf_k=option parameter that describes the storage of wfs +!! +!! OUTPUT +!! oarrbox(ldx*ldy*ldz*ndat) +!! +!! NOTES +!! If istwf_k differs from 1, then special storage modes must be taken +!! into account, for symmetric wavefunctions coming from k=(0 0 0) or other +!! special k points. +!! +!! SOURCE + +subroutine cplx_gsph2box_spc(nx,ny,nz,ldx,ldy,ldz,ndat,npw,istwf_k,kg_k,iarrsph,oarrbox) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: istwf_k,nx,ny,nz,ldx,ldy,ldz,ndat,npw +!arrays + integer,intent(in) :: kg_k(3,npw) + complex(spc),intent(in) :: iarrsph(npw*ndat) + complex(spc),intent(out) :: oarrbox(ldx*ldy*ldz*ndat) + +!Local variables------------------------------- +!scalars + integer,parameter :: me_g0=1 + integer :: ix,ixinv,iy,iyinv,iz,izinv,dat,ipw,npwmin,pad_box,pad_sph,ifft,ifft_inv,ldxyz + !character(len=500) :: msg +!arrays + integer,allocatable :: ixinver(:),iyinver(:),izinver(:) + +! ************************************************************************* + +!In the case of special k-points, invariant under time-reversal, +!but not Gamma, initialize the inverse coordinates +!Remember indeed that +!u_k(G) = u_{k+G0}(G-G0); u_{-k}(G) = u_k(G)^* +!and therefore: +!u_{G0/2}(G) = u_{G0/2}(-G-G0)^*. + if (istwf_k>=2) then + ABI_MALLOC(ixinver,(nx)) + ABI_MALLOC(iyinver,(ny)) + ABI_MALLOC(izinver,(nz)) + if ( ANY(istwf_k==(/2,4,6,8/)) ) then + ixinver(1)=1 + do ix=2,nx + ixinver(ix)=nx+2-ix + end do + else + do ix=1,nx + ixinver(ix)=nx+1-ix + end do + end if + if (istwf_k>=2 .and. istwf_k<=5) then + iyinver(1)=1 + do iy=2,ny + iyinver(iy)=ny+2-iy + end do + else + do iy=1,ny + iyinver(iy)=ny+1-iy + end do + end if + if ( ANY(istwf_k==(/2,3,6,7/)) ) then + izinver(1)=1 + do iz=2,nz + izinver(iz)=nz+2-iz + end do + else + do iz=1,nz + izinver(iz)=nz+1-iz + end do + end if + end if + + ldxyz = ldx*ldy*ldz + + if (istwf_k==1) then + +!$OMP PARALLEL DO PRIVATE(pad_sph,pad_box,ix,iy,iz,ifft) + do dat=1,ndat + pad_sph = (dat-1)*npw + pad_box = (dat-1)*ldxyz + oarrbox(1+pad_box:ldxyz+pad_box) = czero_spc ! zero the sub-array + do ipw=1,npw + ix=kg_k(1,ipw); if (ix<0) ix=ix+nx; ix=ix+1 + iy=kg_k(2,ipw); if (iy<0) iy=iy+ny; iy=iy+1 + iz=kg_k(3,ipw); if (iz<0) iz=iz+nz; iz=iz+1 + ifft = ix + (iy-1)*ldx + (iz-1)*ldx*ldy +#if defined __INTEL_COMPILER && defined HAVE_OPENMP + if (ifft==0) then + ABI_ERROR("prevent ifort+OMP from miscompiling this section on cronos") + end if +#endif + oarrbox(ifft+pad_box) = iarrsph(ipw+pad_sph) + end do + end do + + else if (istwf_k>=2) then + ! + npwmin=1 + if(istwf_k==2 .and. me_g0==1) then ! If gamma point, then oarrbox must be completed + do dat=1,ndat + pad_sph = (dat-1)*npw + pad_box = (dat-1)*ldxyz + oarrbox(1+pad_box) = REAL(iarrsph(1+pad_sph)) + end do + npwmin=2 + end if + +!$OMP PARALLEL DO PRIVATE(pad_sph,pad_box,ix,ixinv,iy,iyinv,iz,izinv,ifft) + do dat=1,ndat + pad_sph = (dat-1)*npw + pad_box = (dat-1)*ldxyz + oarrbox(npwmin+pad_box:ldxyz+pad_box) = czero_spc + do ipw=npwmin,npw + ix=kg_k(1,ipw); if(ix<0)ix=ix+nx; ix=ix+1 + iy=kg_k(2,ipw); if(iy<0)iy=iy+ny; iy=iy+1 + iz=kg_k(3,ipw); if(iz<0)iz=iz+nz; iz=iz+1 + ifft = ix + (iy-1)*ldx + (iz-1)*ldx*ldy + ! Construct the coordinates of -k-G + ixinv=ixinver(ix); iyinv=iyinver(iy); izinv=izinver(iz) + ifft_inv = ixinv + (iyinv-1)*ldx + (izinv-1)*ldx*ldy +#if defined __INTEL_COMPILER && defined HAVE_OPENMP + if (ifft==0 .or. ifft_inv==0) then + ABI_ERROR("prevent ifort+OMP from miscompiling this section on cronos") + end if +#endif + oarrbox(ifft +pad_box) = iarrsph(ipw+pad_sph) + oarrbox(ifft_inv+pad_box) = CONJG(iarrsph(ipw+pad_sph)) + end do + end do + ! + else + ABI_ERROR("Wrong istwfk") + end if + + if (istwf_k>=2) then + ABI_FREE(ixinver) + ABI_FREE(iyinver) + ABI_FREE(izinver) + end if + +end subroutine cplx_gsph2box_spc +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_cplxtools/cplx_gsph2box_dpc +!! NAME +!! cplx_gsph2box_dpc +!! +!! FUNCTION +!! Array iarrsph is defined in sphere with npw points. Insert iarrsph inside box +!! of nx*ny*nz points to define array oarrbox for fft box. rest of oarrbox is filled with 0 s. +!! targer: DPC complex arrays +!! +!! INPUTS +!! iarrsph(2,npw*ndat)= contains values for npw G vectors in basis sphere +!! ndat=number of FFT to perform. +!! npw=number of G vectors in basis at this k point +!! oarrbox(2,ldx*ldy*ldz*ndat) = fft box +!! nx,ny,nz=physical dimension of the box (oarrbox) +!! ldx,ldy,ldz=memory dimension of oarrbox +!! kg_k(3,npw)=integer coordinates of G vectors in basis sphere +!! istwf_k=option parameter that describes the storage of wfs +!! +!! OUTPUT +!! oarrbox(ldx*ldy*ldz*ndat) +!! +!! NOTES +!! If istwf_k differs from 1, then special storage modes must be taken +!! into account, for symmetric wavefunctions coming from k=(0 0 0) or other +!! special k points. +!! +!! SOURCE + +subroutine cplx_gsph2box_dpc(nx,ny,nz,ldx,ldy,ldz,ndat,npw,istwf_k,kg_k,iarrsph,oarrbox) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: istwf_k,nx,ny,nz,ldx,ldy,ldz,ndat,npw +!arrays + integer,intent(in) :: kg_k(3,npw) + complex(dpc),intent(in) :: iarrsph(npw*ndat) + complex(dpc),intent(out) :: oarrbox(ldx*ldy*ldz*ndat) + +!Local variables------------------------------- +!scalars + integer,parameter :: me_g0=1 + integer :: ix,ixinv,iy,iyinv,iz,izinv,dat,ipw,npwmin,pad_box,pad_sph,ifft,ifft_inv,ldxyz + !character(len=500) :: msg +!arrays + integer,allocatable :: ixinver(:),iyinver(:),izinver(:) + +! ************************************************************************* + +!In the case of special k-points, invariant under time-reversal, +!but not Gamma, initialize the inverse coordinates +!Remember indeed that +!u_k(G) = u_{k+G0}(G-G0); u_{-k}(G) = u_k(G)^* +!and therefore: +!u_{G0/2}(G) = u_{G0/2}(-G-G0)^*. + if (istwf_k>=2) then + ABI_MALLOC(ixinver,(nx)) + ABI_MALLOC(iyinver,(ny)) + ABI_MALLOC(izinver,(nz)) + if ( ANY(istwf_k==(/2,4,6,8/)) ) then + ixinver(1)=1 + do ix=2,nx + ixinver(ix)=nx+2-ix + end do + else + do ix=1,nx + ixinver(ix)=nx+1-ix + end do + end if + if (istwf_k>=2 .and. istwf_k<=5) then + iyinver(1)=1 + do iy=2,ny + iyinver(iy)=ny+2-iy + end do + else + do iy=1,ny + iyinver(iy)=ny+1-iy + end do + end if + if ( ANY(istwf_k==(/2,3,6,7/)) ) then + izinver(1)=1 + do iz=2,nz + izinver(iz)=nz+2-iz + end do + else + do iz=1,nz + izinver(iz)=nz+1-iz + end do + end if + end if + + ldxyz = ldx*ldy*ldz + + if (istwf_k==1) then + +!$OMP PARALLEL DO PRIVATE(pad_sph,pad_box,ix,iy,iz,ifft) + do dat=1,ndat + pad_sph = (dat-1)*npw + pad_box = (dat-1)*ldxyz + oarrbox(1+pad_box:ldxyz+pad_box) = czero_dpc ! zero the sub-array + do ipw=1,npw + ix=kg_k(1,ipw); if (ix<0) ix=ix+nx; ix=ix+1 + iy=kg_k(2,ipw); if (iy<0) iy=iy+ny; iy=iy+1 + iz=kg_k(3,ipw); if (iz<0) iz=iz+nz; iz=iz+1 + ifft = ix + (iy-1)*ldx + (iz-1)*ldx*ldy +#if defined __INTEL_COMPILER && defined HAVE_OPENMP + if (ifft==0) then + ABI_ERROR("prevent ifort+OMP from miscompiling this section on cronos") + end if +#endif + oarrbox(ifft+pad_box) = iarrsph(ipw+pad_sph) + end do + end do + + else if (istwf_k>=2) then + ! + npwmin=1 + if(istwf_k==2 .and. me_g0==1) then ! If gamma point, then oarrbox must be completed + do dat=1,ndat + pad_sph = (dat-1)*npw + pad_box = (dat-1)*ldxyz + oarrbox(1+pad_box) = REAL(iarrsph(1+pad_sph)) + end do + npwmin=2 + end if + +!$OMP PARALLEL DO PRIVATE(pad_sph,pad_box,ix,ixinv,iy,iyinv,iz,izinv,ifft) + do dat=1,ndat + pad_sph = (dat-1)*npw + pad_box = (dat-1)*ldxyz + oarrbox(npwmin+pad_box:ldxyz+pad_box) = czero_dpc + do ipw=npwmin,npw + ix=kg_k(1,ipw); if(ix<0)ix=ix+nx; ix=ix+1 + iy=kg_k(2,ipw); if(iy<0)iy=iy+ny; iy=iy+1 + iz=kg_k(3,ipw); if(iz<0)iz=iz+nz; iz=iz+1 + ifft = ix + (iy-1)*ldx + (iz-1)*ldx*ldy + ! Construct the coordinates of -k-G + ixinv=ixinver(ix); iyinv=iyinver(iy); izinv=izinver(iz) + ifft_inv = ixinv + (iyinv-1)*ldx + (izinv-1)*ldx*ldy +#if defined __INTEL_COMPILER && defined HAVE_OPENMP + if (ifft==0 .or. ifft_inv==0) then + ABI_ERROR("prevent ifort+OMP from miscompiling this section on cronos") + end if +#endif + oarrbox(ifft +pad_box) = iarrsph(ipw+pad_sph) + oarrbox(ifft_inv+pad_box) = DCONJG(iarrsph(ipw+pad_sph)) + end do + end do + ! + else + ABI_ERROR("Wrong istwfk") + end if + + if (istwf_k>=2) then + ABI_FREE(ixinver) + ABI_FREE(iyinver) + ABI_FREE(izinver) + end if + +end subroutine cplx_gsph2box_dpc +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_cplxtools/cplx_setaug_zero_spc +!! NAME +!! cplx_setaug_zero_spc +!! +!! FUNCTION +!! Set to zero all elements of the array that are not in the FFT box. +!! +!! INPUTS +!! nx,ny,nz=physical dimensions of the FFT box +!! ldx,ldy,ldx=memory dimension of arr +!! ndat=number of FFTs +!! +!! SIDE EFFECT +!! arr(ldx,ldy,ldz*ndat)= all entries in the augmented region are set to zero +!! +!! SOURCE + +subroutine cplx_setaug_zero_spc(nx,ny,nz,ldx,ldy,ldz,ndat,arr) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: nx,ny,nz,ldx,ldy,ldz,ndat +!arrays + complex(spc),intent(inout) :: arr(ldx,ldy,ldz*ndat) + +!Local variables------------------------------- + integer :: iy,iz,dat,padat + +! ************************************************************************* + + if (nx /= ldx) then + do iz=1,ldz*ndat + do iy=1,ldy + arr(nx+1:ldx,iy,iz) = czero_spc + end do + end do + end if + + if (ny /= ldy) then + do iz=1,ldz*ndat + arr(:,ny+1:ldy,iz) = czero_spc + end do + end if + + if (nz /= ldz) then + do dat=1,ndat + padat = ldz*(dat-1) + do iz=nz+1,ldz + arr(:,:,iz+padat) = czero_spc + end do + end do + end if + +end subroutine cplx_setaug_zero_spc +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_cplxtools/cplx_setaug_zero_dpc +!! NAME +!! cplx_setaug_zero_dpc +!! +!! FUNCTION +!! Set to zero all elements of the array that are not in the FFT box. +!! +!! INPUTS +!! nx,ny,nz=physical dimensions of the FFT box +!! ldx,ldy,ldx=memory dimension of arr +!! ndat=number of FFTs +!! +!! SIDE EFFECT +!! arr(ldx,ldy,ldz*ndat)= all entries in the augmented region are set to zero +!! +!! SOURCE + +subroutine cplx_setaug_zero_dpc(nx,ny,nz,ldx,ldy,ldz,ndat,arr) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: nx,ny,nz,ldx,ldy,ldz,ndat +!arrays + complex(dpc),intent(inout) :: arr(ldx,ldy,ldz*ndat) + +!Local variables------------------------------- + integer :: iy,iz,dat,padat + +! ************************************************************************* + + if (nx /= ldx) then + do iz=1,ldz*ndat + do iy=1,ldy + arr(nx+1:ldx,iy,iz) = czero_dpc + end do + end do + end if + + if (ny /= ldy) then + do iz=1,ldz*ndat + arr(:,ny+1:ldy,iz) = czero_dpc + end do + end if + + if (nz /= ldz) then + do dat=1,ndat + padat = ldz*(dat-1) + do iz=nz+1,ldz + arr(:,:,iz+padat) = czero_dpc + end do + end do + end if + +end subroutine cplx_setaug_zero_dpc +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_cplxtools/cplx_addtorho_dpc +!! NAME +!! cplx_addtorho_dpc +!! +!! FUNCTION +!! Add |ur|**2 to the ground-states density rho. +!! rho = rho + weight_r * |ur|**2 +!! +!! INPUTS +!! nx,ny,nz=physical dimension of the FFT box. +!! ldx,ldy,ldz=leading dimensions of the arrays. +!! ndat=number of contributions to accumulate. +!! weight_r=weight used for the accumulation of the density in real space +!! ur(ldx,ldy,ldz*ndat)=wavefunctions in real space +!! +!! SIDE EFFECTS +!! rho(ldx,ldy,ldz) = contains the input density at input, +!! modified in input with the contribution gived by ur. +!! +!! SOURCE + +subroutine cplx_addtorho_dpc(nx,ny,nz,ldx,ldy,ldz,ndat,weight_r,ur,rho) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: nx,ny,nz,ldx,ldy,ldz,ndat + real(dp),intent(in) :: weight_r +!arrays + complex(dpc),intent(in) :: ur(ldx*ldy*ldz*ndat) + real(dp),intent(inout) :: rho(ldx*ldy*ldz) + +!Local variables------------------------------- +!scalars + integer :: ix,iy,iz,dat,ifft,ldxyz,pad_box,padz,pady + +! ************************************************************************* + + ldxyz = ldx*ldy*ldz + + if (ndat==1) then +!$OMP PARALLEL DO PRIVATE(padz, pady, ifft) + do iz=1,nz + padz = (iz-1)*ldx*ldy + do iy=1,ny + pady = (iy-1)*ldx + do ix=1,nx + ifft = ix + pady + padz + rho(ifft) = rho(ifft) + weight_r * (REAL(ur(ifft))**2 + AIMAG(ur(ifft))**2) + end do + end do + end do + + else +! It would be nice to use $OMP PARALLEL DO REDUCTION(+:rho) +! but it's risky as the private rho is allocated on the stack of the thread. +!$OMP PARALLEL PRIVATE(pad_box, padz, pady, ifft) + do dat=1,ndat + pad_box = (dat-1)*ldxyz +!$OMP DO + do iz=1,nz + padz = (iz-1)*ldx*ldy + do iy=1,ny + pady = (iy-1)*ldx + do ix=1,nx + ifft = ix + pady + padz + rho(ifft) = rho(ifft) + weight_r * (REAL(ur(ifft+pad_box)**2 + AIMAG(ur(ifft+pad_box))**2)) + end do + end do + end do +!$OMP END DO NOWAIT + end do +!$OMP END PARALLEL + end if + +end subroutine cplx_addtorho_dpc +!!*** + +!---------------------------------------------------------------------- + +END MODULE m_cplxtools +!!*** diff --git a/GX-PAW/common/src/28_numeric_noabirule/m_cplxtools.o b/GX-PAW/common/src/28_numeric_noabirule/m_cplxtools.o new file mode 100644 index 00000000..ff9c40fe Binary files /dev/null and b/GX-PAW/common/src/28_numeric_noabirule/m_cplxtools.o differ diff --git a/GX-PAW/common/src/28_numeric_noabirule/m_elpa.F90 b/GX-PAW/common/src/28_numeric_noabirule/m_elpa.F90 new file mode 100644 index 00000000..541e4e61 --- /dev/null +++ b/GX-PAW/common/src/28_numeric_noabirule/m_elpa.F90 @@ -0,0 +1,1362 @@ +!!****m* ABINIT/m_elpa +!! NAME +!! m_elpa +!! +!! FUNCTION +!! This module contains interfaces to ELPA library methods +!! See http://elpa.mpcdf.mpg.de +!! +!! COPYRIGHT +!! Copyright (C) 2016-2024 ABINIT group (MT) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" + +!!#if (defined HAVE_LINALG_ELPA) && (defined HAVE_LINALG_ELPA_2017) +!!#define HAVE_LINALG_ELPA_FORTRAN2008 +!!#else +!!#undef HAVE_LINALG_ELPA_FORTRAN2008 +!!#endif + +module m_elpa + + use defs_basis + use m_errors + +#ifdef HAVE_LINALG_ELPA +#ifdef HAVE_LINALG_ELPA_FORTRAN2008 + use elpa +#else + use elpa1 +#endif +#endif + + implicit none + + private + +#ifdef HAVE_LINALG_ELPA + +!Public procedures +!Had to choose names different from those provided by elpa + public :: elpa_func_init ! Init ELPA + public :: elpa_func_uninit ! End ELPA + public :: elpa_func_allocate ! Allocate a ELPA handle and set up MPI information + public :: elpa_func_deallocate ! Deallocate a ELPA handle + public :: elpa_func_error_handler ! Manage errors (print a readable message) + public :: elpa_func_get_communicators ! Get rows and cols communicators (not supposed to be called directly) + public :: elpa_func_set_matrix ! Set matrix specifications in a ELPA handle + public :: elpa_func_solve_evp_1stage ! Solve the diagonalization problem (use a ELPA handle) + public :: elpa_func_solve_gevp_2stage ! Solve the generalized diagonalization problem (use a ELPA handle) + public :: elpa_func_cholesky ! Apply Cholesky transformation (use a ELPA handle) + public :: elpa_func_invert_triangular ! Invert triangular matrix (use a ELPA handle) + public :: elpa_func_hermitian_multiply ! Perform C := A**H * B (use a ELPA handle) + + interface elpa_func_solve_evp_1stage + module procedure elpa_func_solve_evp_1stage_real + module procedure elpa_func_solve_evp_1stage_complex + end interface elpa_func_solve_evp_1stage + + interface elpa_func_solve_gevp_2stage + module procedure elpa_func_solve_gevp_2stage_real + module procedure elpa_func_solve_gevp_2stage_complex + end interface elpa_func_solve_gevp_2stage + + interface elpa_func_cholesky + module procedure elpa_func_cholesky_real + module procedure elpa_func_cholesky_complex + end interface elpa_func_cholesky + + interface elpa_func_invert_triangular + module procedure elpa_func_invert_triangular_real + module procedure elpa_func_invert_triangular_complex + end interface elpa_func_invert_triangular + + interface elpa_func_hermitian_multiply + module procedure elpa_func_hermitian_multiply_real + module procedure elpa_func_hermitian_multiply_complex + end interface elpa_func_hermitian_multiply + +!ELPA generalized handle + type,public :: elpa_hdl_t + logical :: is_allocated=.false. + logical :: matrix_is_set=.false. +#ifdef HAVE_LINALG_ELPA_FORTRAN2008 + class(elpa_t),pointer :: elpa +#else + integer :: mpi_comm_parent + integer :: elpa_comm_rows,elpa_comm_cols + integer :: process_row,process_col + integer :: local_nrows,local_ncols + integer :: na,nblk,nev + integer :: gpu=0 +#endif + end type elpa_hdl_t + +#endif + +CONTAINS !============================================================================== +!!*** + +#ifdef HAVE_LINALG_ELPA + +!---------------------------------------------------------------------- + +!!****f* m_elpa/elpa_func_init +!! NAME +!! elpa_func_init +!! +!! FUNCTION +!! Wrapper to elpa_init ELPA function +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +subroutine elpa_func_init() + +!Local variables------------------------------- +#ifdef HAVE_LINALG_ELPA_FORTRAN2008 + integer,parameter :: elpa_min_version=20170403 +#endif + logical :: success +! +! ********************************************************************* + + success=.true. + +#ifdef HAVE_LINALG_ELPA_FORTRAN2008 + +#if (defined HAVE_LINALG_ELPA_2016) || (defined HAVE_LINALG_ELPA_2015_11) || (defined HAVE_LINALG_ELPA_2015_02) +!This case is not supposed to happen + success=.false. + ABI_BUG('Wrong ELPA cpp directives!') +#elif (defined HAVE_LINALG_ELPA_2014) || (defined HAVE_LINALG_ELPA_2013) +!This case is not supposed to happen + success=.false. + ABI_BUG('Wrong ELPA cpp directives!') +#else + success=(elpa_init(elpa_min_version)==ELPA_OK) +#endif + +#else +!No init function +#endif + + if (.not.success) then + ABI_ERROR('Problem with ELPA (elpa_init)!') + end if + +end subroutine elpa_func_init +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_elpa/elpa_func_uninit +!! NAME +!! elpa_func_uninit +!! +!! FUNCTION +!! Wrapper to elpa_uninit ELPA function +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +subroutine elpa_func_uninit() + +! ********************************************************************* + +#ifdef HAVE_LINALG_ELPA_FORTRAN2008 + call elpa_uninit() +#else +!No uninit function +#endif + +end subroutine elpa_func_uninit +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_elpa/elpa_func_allocate +!! NAME +!! elpa_func_allocate +!! +!! FUNCTION +!! Allocate a ELPA handle and set it up with communicators specification +!! +!! INPUTS +!! [blacs_ctx]= -- optional -- Blacs context +!! [gpu]= -- optional -- Flag (0 or 1): use GPU version (currently only NVidia) +!! +!! SIDE EFFECTS +!! elpa_hdl(type)= ELPA handle +!! +!! SOURCE + +subroutine elpa_func_allocate(elpa_hdl,gpu,blacs_ctx) + +!Arguments ------------------------------------ + integer,intent(in),optional :: gpu,blacs_ctx + type(elpa_hdl_t),intent(inout) :: elpa_hdl + +!Local variables------------------------------- + integer :: err,l_gpu,l_blacs_ctx + logical :: gpu_debug_mode=.false. + character(len=10) :: varname + +! ********************************************************************* + + err=0 + ! if optional parameter is present, use it + ! else use default value, i.e. don't use GPU + l_gpu = 0 + if (present(gpu)) then + if(gpu/=0) l_gpu = 1 + end if + +#ifdef HAVE_LINALG_ELPA_FORTRAN2008 + elpa_hdl%elpa => elpa_allocate(err) + call elpa_func_error_handler(err_code=err,err_msg='Error in initialization') + + if(l_gpu==1) then +#if defined HAVE_GPU_CUDA + varname="nvidia-gpu" +#else + ABI_BUG("Requested unsupported GPU model with ELPA!") +#endif + if (err==ELPA_OK) call elpa_hdl%elpa%set(varname,l_gpu,err) + + ! Handling GPU-support on older ELPA versions (2020.11 and previous) + ! Only NVIDIA CUDA GPUs were supported with 'gpu' setting + if (err==ELPA_ERROR_ENTRY_NOT_FOUND) then +#if defined HAVE_GPU_CUDA + varname="gpu" + call elpa_hdl%elpa%set(varname,l_gpu,err) +#else + ABI_ERROR("You seem to use an old version of ELPA ( < 2021.x ) which only supports NVIDIA GPUs.") +#endif + end if + call elpa_func_error_handler(err_code=err,err_msg='Error when enabling GPU on ELPA') + + if (gpu_debug_mode) then + if (err==ELPA_OK) call elpa_hdl%elpa%set("debug",1,err) + call elpa_func_error_handler(err_code=err,err_msg='Error when enabling debug on ELPA') + end if + + end if +#else + if (err==0.and.l_gpu==1) then + elpa_hdl%gpu=l_gpu + if (gpu_debug_mode) elpa_hdl%debug=1 + end if +#endif + + if (present(blacs_ctx)) then + if (err==ELPA_OK) call elpa_hdl%elpa%set("blacs_context",int(blacs_ctx,kind=c_int),err) + call elpa_func_error_handler(err_code=err,err_varname=varname) + end if + + elpa_hdl%is_allocated=.true. + +end subroutine elpa_func_allocate +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_elpa/elpa_func_deallocate +!! NAME +!! elpa_func_deallocate_matrix +!! +!! FUNCTION +!! Deallocate a ELPA handle +!! +!! INPUTS +!! +!! SIDE EFFECTS +!! elpa_hdl(type)= ELPA handle +!! +!! SOURCE + +subroutine elpa_func_deallocate(elpa_hdl) + +!Arguments ------------------------------------ + type(elpa_hdl_t),intent(inout) :: elpa_hdl + +!Local variables------------------------------- + integer :: err + +! ********************************************************************* + + err=0 + +#ifdef HAVE_LINALG_ELPA_FORTRAN2008 + call elpa_deallocate(elpa_hdl%elpa) +#endif + + elpa_hdl%matrix_is_set=.false. + elpa_hdl%is_allocated=.false. + +end subroutine elpa_func_deallocate +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_elpa/elpa_func_error_handler +!! NAME +!! elpa_func_error_handler +!! +!! FUNCTION +!! Handle ELPA errors +!! +!! INPUTS +!! [err_code]= --optional-- Error code +!! [err_msg]= --optional-- Generic error message +!! [err_varname]= -- optional-- Name of the ELPA variable related to the error +!! +!! OUTPUT +!! No output, only printing +!! +!! SOURCE + +subroutine elpa_func_error_handler(err_code,err_msg,err_varname) + +!Arguments ------------------------------------ + integer,optional :: err_code + character(len=*),optional :: err_msg,err_varname + +!Local variables------------------------------- + integer :: err_code_ + character(len=500) :: msg + character(len=100) :: err_strg + +! ********************************************************************* + + err_code_=-100;if (present(err_code)) err_code_=err_code + if (err_code_==0) return + + err_strg='' +#ifdef HAVE_LINALG_ELPA_FORTRAN2008 + if (err_code_==ELPA_ERROR) err_strg='ELPA_ERROR' + if (err_code_==ELPA_ERROR_ENTRY_READONLY) err_strg='ELPA_ERROR_ENTRY_READONLY' + if (err_code_==ELPA_ERROR_ENTRY_NOT_FOUND) err_strg='ELPA_ERROR_ENTRY_NOT_FOUND' + if (err_code_==ELPA_ERROR_ENTRY_ALREADY_SET) err_strg='ELPA_ERROR_ENTRY_ALREADY_SET' + if (err_code_==ELPA_ERROR_ENTRY_INVALID_VALUE) err_strg='ELPA_ERROR_ENTRY_INVALID_VALUE' + if (err_code_==ELPA_ERROR_ENTRY_NO_STRING_REPRESENTATION) err_strg='ELPA_ERROR_NO_STRING_REPRESENTATION' +#endif + + write(msg,'(a)') 'ELPA library error!' + if (present(err_msg)) then + if (trim(err_msg)/="") write(msg,'(3a)') trim(msg),ch10,trim(err_msg) + end if + if (present(err_varname)) then + if (trim(err_varname)/="") write(msg,'(4a)') trim(msg),ch10,'Variable: ',trim(err_varname) + end if + if (trim(err_strg)/="") write(msg,'(4a)') trim(msg),ch10,'Error code: ',trim(err_strg) + ABI_ERROR(msg) + +end subroutine elpa_func_error_handler +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_elpa/elpa_func_get_communicators +!! NAME +!! elpa_func_get_communicators +!! +!! FUNCTION +!! Wrapper to elpa_get_communicators ELPA function +!! +!! INPUTS +!! mpi_comm_parent=Global communicator for the calculations (in) +!! process_row=Row coordinate of the calling process in the process grid (in) +!! process_col=Column coordinate of the calling process in the process grid (in) +!! +!! SIDE EFFECTS +!! elpa_hdl(type)= ELPA handle +!! +!! SOURCE + +subroutine elpa_func_get_communicators(elpa_hdl,mpi_comm_parent,process_row,process_col) + +!Arguments ------------------------------------ + integer,intent(in) :: mpi_comm_parent,process_row,process_col + type(elpa_hdl_t),intent(inout) :: elpa_hdl + +!Local variables------------------------------- + integer :: err + character(len=20) :: varname + +! ********************************************************************* + + err=0 ; varname='' + + if (.not.elpa_hdl%is_allocated) then + ABI_BUG('ELPA handle not allocated!') + end if + +#ifdef HAVE_LINALG_ELPA_FORTRAN2008 + if (err==ELPA_OK) then + varname='mpi_comm_parent' + call elpa_hdl%elpa%set(trim(varname),mpi_comm_parent,err) + end if + if (err==ELPA_OK) then + varname='process_row' + call elpa_hdl%elpa%set(trim(varname),process_row,err) + end if + if (err==ELPA_OK) then + varname='process_col' + call elpa_hdl%elpa%set(trim(varname),process_col,err) + end if + if (err==ELPA_OK) then + varname='' + err = elpa_hdl%elpa%setup() + call elpa_func_error_handler(err_code=err,err_msg='Error during ELPA setup') + endif + +#else + elpa_hdl%mpi_comm_parent=mpi_comm_parent + elpa_hdl%process_row=process_row + elpa_hdl%process_col=process_col +#if (defined HAVE_LINALG_ELPA_2016) + err=elpa_get_communicators(mpi_comm_parent,process_row,process_col,elpa_hdl%elpa_comm_rows,elpa_hdl%elpa_comm_cols) +#elif (defined HAVE_LINALG_ELPA_2015_11) || (defined HAVE_LINALG_ELPA_2015_02) + err=get_elpa_row_col_comms(mpi_comm_parent,process_row,process_col,elpa_hdl%elpa_comm_rows,elpa_hdl%elpa_comm_cols) +#elif (defined HAVE_LINALG_ELPA_2014) || (defined HAVE_LINALG_ELPA_2013) + call get_elpa_row_col_comms(mpi_comm_parent,process_row,process_col,elpa_hdl%elpa_comm_rows,elpa_hdl%elpa_comm_cols) +#else +!ELPA-LEGACY-2017 + err=elpa_get_communicators(mpi_comm_parent,process_row,process_col,elpa_hdl%elpa_comm_rows,elpa_hdl%elpa_comm_cols) +#endif + +#endif + + call elpa_func_error_handler(err_code=err,err_msg='Error in elpa_get_communicators',err_varname=varname) + +end subroutine elpa_func_get_communicators +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_elpa/elpa_func_set_matrix +!! NAME +!! elpa_func_set_matrix +!! +!! FUNCTION +!! Set parameters decribing a matrix and it's MPI distribution +!! in a ELPA handle +!! +!! INPUTS +!! na=Order of matrix A +!! nblk=Blocksize of cyclic distribution, must be the same in both directions! +!! nev=Number of eigenvalues needed. +!! local_nrows=Leading dimension of A +!! local_ncols=Local columns of matrixes A and Q (eigenvectors) +!! nev=Number of eigenvalues needed. +!! +!! SIDE EFFECTS +!! elpa_hdl(type)=handler for ELPA object +!! +!! SOURCE + +subroutine elpa_func_set_matrix(elpa_hdl,na,nblk,nev,local_nrows,local_ncols) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: na,nblk,nev,local_nrows,local_ncols + type(elpa_hdl_t),intent(inout) :: elpa_hdl +!arrays + +!Local variables------------------------------- + integer :: err + character(len=15) :: varname + +! ********************************************************************* + + err=0 ; varname='' + + if (.not.elpa_hdl%is_allocated) then + ABI_BUG('ELPA handle not allocated!') + end if + +#ifdef HAVE_LINALG_ELPA_FORTRAN2008 + if (err==ELPA_OK) then + varname="na" + call elpa_hdl%elpa%set(trim(varname),na,err) + end if + if (err==ELPA_OK) then + varname="nblk" + call elpa_hdl%elpa%set(trim(varname),nblk,err) + end if + if (err==ELPA_OK) then + varname="nev" + call elpa_hdl%elpa%set(trim(varname),nev,err) + end if + if (err==ELPA_OK) then + varname="local_nrows" + call elpa_hdl%elpa%set(trim(varname),local_nrows,err) + end if + if (err==ELPA_OK) then + varname="local_ncols" + call elpa_hdl%elpa%set(trim(varname),local_ncols,err) + end if +#else + elpa_hdl%na=na + elpa_hdl%nblk=nblk + elpa_hdl%nev=nev + elpa_hdl%local_nrows=local_nrows + elpa_hdl%local_ncols=local_ncols +#endif + + call elpa_func_error_handler(err_code=err,err_msg='Error during matrix initialization',err_varname=varname) + + elpa_hdl%matrix_is_set=.true. + +end subroutine elpa_func_set_matrix +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_elpa/elpa_func_solve_evp_2stage_real +!! NAME +!! elpa_func_solve_evp_2stage_real +!! +!! FUNCTION +!! Wrapper to elpa_solve_evp_real_2stage ELPA function +!! +!! INPUTS +!! nev=Number of eigenvalues needed. +!! +!! OUTPUT +!! ev(na)=Eigenvalues of a, every processor gets the complete set +!! qq(local_nrows,local_ncols)=Eigenvectors of aa +!! Distribution is like in Scalapack. +!! Must be always dimensioned to the full size (corresponding to (na,na)) +!! even if only a part of the eigenvalues is needed. +!! +!! SIDE EFFECTS +!! aa(local_nrows,local_ncols)=Distributed matrix for which eigenvalues are to be computed. +!! Distribution is like in Scalapack. +!! The full matrix must be set (not only one half like in scalapack). +!! Destroyed on exit (upper and lower half). +!! elpa_hdl(type)=handler for ELPA object +!! +!! SOURCE + +subroutine elpa_func_solve_gevp_2stage_real(elpa_hdl,aa,bb,qq,ev,nev) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: nev + type(elpa_hdl_t),intent(inout) :: elpa_hdl +!arrays + real(dp),intent(inout) :: aa(:,:),bb(:,:) + real(dp),intent(out) :: ev(:),qq(:,:) + +!Local variables------------------------------- + integer :: err + logical :: success + +! ********************************************************************* + + success=.true. ; err=0 + + if (.not.elpa_hdl%is_allocated) then + ABI_BUG('ELPA handle not allocated!') + end if + if (.not.elpa_hdl%matrix_is_set) then + ABI_BUG('Matrix not set in ELPA handle!') + end if +#ifdef HAVE_LINALG_ELPA_FORTRAN2008 + ABI_CHECK(size(aa)==elpa_hdl%elpa%local_nrows*elpa_hdl%elpa%local_ncols,'BUG: matrix A has wrong sizes!') + ABI_CHECK(size(qq)==elpa_hdl%elpa%local_nrows*elpa_hdl%elpa%local_ncols,'BUG: matrix Q has wrong sizes!') + ABI_CHECK(size(ev)==elpa_hdl%elpa%na,'BUG: matrix EV has wrong sizes!') +#endif + +#ifdef HAVE_LINALG_ELPA_FORTRAN2008 + if (err==ELPA_OK) call elpa_hdl%elpa%set("solver",ELPA_SOLVER_2STAGE,err) + if (err==ELPA_OK) call elpa_hdl%elpa%generalized_eigenvectors(aa,bb,ev,qq,.false.,err) + success=(err==ELPA_OK) +#endif + + if (.not.success) call elpa_func_error_handler(err_msg='Error in solve_evp_2stage_real!') + +end subroutine elpa_func_solve_gevp_2stage_real +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_elpa/elpa_func_solve_evp_2stage_complex +!! NAME +!! elpa_func_solve_evp_2stage_complex +!! +!! FUNCTION +!! Wrapper to elpa_solve_evp_complex_2stage ELPA function +!! +!! INPUTS +!! nev=Number of eigenvalues needed. +!! +!! OUTPUT +!! ev(na)=Eigenvalues of a, every processor gets the complete set +!! qq(local_nrows,local_ncols)=Eigenvectors of aa +!! Distribution is like in Scalapack. +!! Must be always dimensioned to the full size (corresponding to (na,na)) +!! even if only a part of the eigenvalues is needed. +!! +!! SIDE EFFECTS +!! aa(local_nrows,local_ncols)=Distributed matrix for which eigenvalues are to be computed. +!! Distribution is like in Scalapack. +!! The full matrix must be set (not only one half like in scalapack). +!! Destroyed on exit (upper and lower half). +!! elpa_hdl(type)=handler for ELPA object +!! +!! SOURCE + +subroutine elpa_func_solve_gevp_2stage_complex(elpa_hdl,aa,bb,qq,ev,nev) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: nev + type(elpa_hdl_t),intent(inout) :: elpa_hdl +!arrays + complex(dpc),intent(inout) :: aa(:,:),bb(:,:) + real(dp),intent(out) :: ev(:) + complex(dpc),intent(out) :: qq(:,:) + +!Local variables------------------------------- + integer :: err + logical :: success + +! ********************************************************************* + + success=.true. ; err=0 + + if (.not.elpa_hdl%is_allocated) then + ABI_BUG('ELPA handle not allocated!') + end if + if (.not.elpa_hdl%matrix_is_set) then + ABI_BUG('Matrix not set in ELPA handle!') + end if +#ifdef HAVE_LINALG_ELPA_FORTRAN2008 + ABI_CHECK(size(aa)==elpa_hdl%elpa%local_nrows*elpa_hdl%elpa%local_ncols,'BUG: matrix A has wrong sizes!') + ABI_CHECK(size(qq)==elpa_hdl%elpa%local_nrows*elpa_hdl%elpa%local_ncols,'BUG: matrix Q has wrong sizes!') + ABI_CHECK(size(ev)==elpa_hdl%elpa%na,'BUG: matrix EV has wrong sizes!') +#endif + +#ifdef HAVE_LINALG_ELPA_FORTRAN2008 + if (err==ELPA_OK) call elpa_hdl%elpa%set("solver",ELPA_SOLVER_2STAGE,err) + if (err==ELPA_OK) call elpa_hdl%elpa%generalized_eigenvectors(aa,bb,ev,qq,.false.,err) + success=(err==ELPA_OK) +#endif + + if (.not.success) call elpa_func_error_handler(err_code=err,err_msg='Error in solve_evp_2stage_complex!') + +end subroutine elpa_func_solve_gevp_2stage_complex +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_elpa/elpa_func_solve_evp_1stage_real +!! NAME +!! elpa_func_solve_evp_1stage_real +!! +!! FUNCTION +!! Wrapper to elpa_solve_evp_real_1stage ELPA function +!! +!! INPUTS +!! nev=Number of eigenvalues needed. +!! +!! OUTPUT +!! ev(na)=Eigenvalues of a, every processor gets the complete set +!! qq(local_nrows,local_ncols)=Eigenvectors of aa +!! Distribution is like in Scalapack. +!! Must be always dimensioned to the full size (corresponding to (na,na)) +!! even if only a part of the eigenvalues is needed. +!! +!! SIDE EFFECTS +!! aa(local_nrows,local_ncols)=Distributed matrix for which eigenvalues are to be computed. +!! Distribution is like in Scalapack. +!! The full matrix must be set (not only one half like in scalapack). +!! Destroyed on exit (upper and lower half). +!! elpa_hdl(type)=handler for ELPA object +!! +!! SOURCE + +subroutine elpa_func_solve_evp_1stage_real(elpa_hdl,aa,qq,ev,nev) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: nev + type(elpa_hdl_t),intent(inout) :: elpa_hdl +!arrays + real(dp),intent(inout) :: aa(:,:) + real(dp),intent(out) :: ev(:),qq(:,:) + +!Local variables------------------------------- + integer :: err + logical :: success + +! ********************************************************************* + + success=.true. ; err=0 + + if (.not.elpa_hdl%is_allocated) then + ABI_BUG('ELPA handle not allocated!') + end if + if (.not.elpa_hdl%matrix_is_set) then + ABI_BUG('Matrix not set in ELPA handle!') + end if +#ifdef HAVE_LINALG_ELPA_FORTRAN2008 + ABI_CHECK(size(aa)==elpa_hdl%elpa%local_nrows*elpa_hdl%elpa%local_ncols,'BUG: matrix A has wrong sizes!') + ABI_CHECK(size(qq)==elpa_hdl%elpa%local_nrows*elpa_hdl%elpa%local_ncols,'BUG: matrix Q has wrong sizes!') + ABI_CHECK(size(ev)==elpa_hdl%elpa%na,'BUG: matrix EV has wrong sizes!') +#else + ABI_CHECK(size(aa)==elpa_hdl%local_nrows*elpa_hdl%local_ncols,'BUG: matrix A has wrong sizes!') + ABI_CHECK(size(qq)==elpa_hdl%local_nrows*elpa_hdl%local_ncols,'BUG: matrix Q has wrong sizes!') + ABI_CHECK(size(ev)==elpa_hdl%na,'BUG: matrix EV has wrong sizes!') +#endif + +#ifdef HAVE_LINALG_ELPA_FORTRAN2008 + if (err==ELPA_OK) call elpa_hdl%elpa%set("solver",ELPA_SOLVER_1STAGE,err) + if (err==ELPA_OK) call elpa_hdl%elpa%eigenvectors(aa,ev,qq,err) + success=(err==ELPA_OK) +#elif (defined HAVE_LINALG_ELPA_2016) + success=elpa_solve_evp_real_1stage(elpa_hdl%na,nev,aa,elpa_hdl%local_nrows,ev,qq,elpa_hdl%local_nrows,& +& elpa_hdl%nblk,elpa_hdl%local_ncols,elpa_hdl%elpa_comm_rows,elpa_hdl%elpa_comm_cols) +#elif (defined HAVE_LINALG_ELPA_2015_11) + success=solve_evp_real(elpa_hdl%na,nev,aa,elpa_hdl%local_nrows,ev,qq,elpa_hdl%local_nrows,& +& elpa_hdl%nblk,elpa_hdl%local_ncols,elpa_hdl%elpa_comm_rows,elpa_hdl%elpa_comm_cols) +#elif (defined HAVE_LINALG_ELPA_2015_02) || (defined HAVE_LINALG_ELPA_2014) + success=solve_evp_real(elpa_hdl%na,nev,aa,elpa_hdl%local_nrows,ev,qq,elpa_hdl%local_nrows,& +& elpa_hdl%nblk,elpa_hdl%elpa_comm_rows,elpa_hdl%elpa_comm_cols) +#elif (defined HAVE_LINALG_ELPA_2013) + call solve_evp_real(elpa_hdl%na,nev,aa,elpa_hdl%local_nrows,ev,qq,elpa_hdl%local_nrows,& +& elpa_hdl%nblk,elpa_hdl%elpa_comm_rows,elpa_hdl%elpa_comm_cols) +#else +!ELPA-LEGACY-2017 + success=elpa_solve_evp_real_1stage_double(elpa_hdl%na,nev,aa,elpa_hdl%local_nrows,ev,qq,elpa_hdl%local_nrows,& +& elpa_hdl%nblk,elpa_hdl%local_ncols,elpa_hdl%elpa_comm_rows,elpa_hdl%elpa_comm_cols,elpa_hdl%mpi_comm_parent,.false.) +#endif + + if (.not.success) call elpa_func_error_handler(err_msg='Error in solve_evp_1stage_real!') + +end subroutine elpa_func_solve_evp_1stage_real +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_elpa/elpa_func_solve_evp_1stage_complex +!! NAME +!! elpa_func_solve_evp_1stage_complex +!! +!! FUNCTION +!! Wrapper to elpa_solve_evp_complex_1stage ELPA function +!! +!! INPUTS +!! nev=Number of eigenvalues needed. +!! +!! OUTPUT +!! ev(na)=Eigenvalues of a, every processor gets the complete set +!! qq(local_nrows,local_ncols)=Eigenvectors of aa +!! Distribution is like in Scalapack. +!! Must be always dimensioned to the full size (corresponding to (na,na)) +!! even if only a part of the eigenvalues is needed. +!! +!! SIDE EFFECTS +!! aa(local_nrows,local_ncols)=Distributed matrix for which eigenvalues are to be computed. +!! Distribution is like in Scalapack. +!! The full matrix must be set (not only one half like in scalapack). +!! Destroyed on exit (upper and lower half). +!! elpa_hdl(type)=handler for ELPA object +!! +!! SOURCE + +subroutine elpa_func_solve_evp_1stage_complex(elpa_hdl,aa,qq,ev,nev) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: nev + type(elpa_hdl_t),intent(inout) :: elpa_hdl +!arrays + complex(dpc),intent(inout) :: aa(:,:) + real(dp),intent(out) :: ev(:) + complex(dpc),intent(out) :: qq(:,:) + +!Local variables------------------------------- + integer :: err + logical :: success + +! ********************************************************************* + + success=.true. ; err=0 + + if (.not.elpa_hdl%is_allocated) then + ABI_BUG('ELPA handle not allocated!') + end if + if (.not.elpa_hdl%matrix_is_set) then + ABI_BUG('Matrix not set in ELPA handle!') + end if +#ifdef HAVE_LINALG_ELPA_FORTRAN2008 + ABI_CHECK(size(aa)==elpa_hdl%elpa%local_nrows*elpa_hdl%elpa%local_ncols,'BUG: matrix A has wrong sizes!') + ABI_CHECK(size(qq)==elpa_hdl%elpa%local_nrows*elpa_hdl%elpa%local_ncols,'BUG: matrix Q has wrong sizes!') + ABI_CHECK(size(ev)==elpa_hdl%elpa%na,'BUG: matrix EV has wrong sizes!') +#else + ABI_CHECK(size(aa)==elpa_hdl%local_nrows*elpa_hdl%local_ncols,'BUG: matrix A has wrong sizes!') + ABI_CHECK(size(qq)==elpa_hdl%local_nrows*elpa_hdl%local_ncols,'BUG: matrix Q has wrong sizes!') + ABI_CHECK(size(ev)==elpa_hdl%na,'BUG: matrix EV has wrong sizes!') +#endif + +#ifdef HAVE_LINALG_ELPA_FORTRAN2008 + if (err==ELPA_OK) call elpa_hdl%elpa%set("solver",ELPA_SOLVER_1STAGE,err) + if (err==ELPA_OK) call elpa_hdl%elpa%eigenvectors(aa,ev,qq,err) + success=(err==ELPA_OK) +#elif (defined HAVE_LINALG_ELPA_2016) + success=elpa_solve_evp_complex_1stage(elpa_hdl%na,nev,aa,elpa_hdl%local_nrows,ev,qq,elpa_hdl%local_nrows,& +& elpa_hdl%nblk,elpa_hdl%local_ncols,elpa_hdl%elpa_comm_rows,elpa_hdl%elpa_comm_cols) +#elif (defined HAVE_LINALG_ELPA_2015_11) + success=solve_evp_complex(elpa_hdl%na,nev,aa,elpa_hdl%local_nrows,ev,qq,elpa_hdl%local_nrows,& +& elpa_hdl%nblk,elpa_hdl%local_ncols,elpa_hdl%elpa_comm_rows,elpa_hdl%elpa_comm_cols) +#elif (defined HAVE_LINALG_ELPA_2015_02) || (defined HAVE_LINALG_ELPA_2014) + success=solve_evp_complex(elpa_hdl%na,nev,aa,elpa_hdl%local_nrows,ev,qq,elpa_hdl%local_nrows,& +& elpa_hdl%nblk,elpa_hdl%elpa_comm_rows,elpa_hdl%elpa_comm_cols) +#elif (defined HAVE_LINALG_ELPA_2013) + call solve_evp_complex(elpa_hdl%na,nev,aa,elpa_hdl%local_nrows,ev,qq,elpa_hdl%local_nrows,& +& elpa_hdl%nblk,elpa_hdl%elpa_comm_rows,elpa_hdl%elpa_comm_cols) +#else +!ELPA-LEGACY-2017 + success=elpa_solve_evp_complex_1stage_double(elpa_hdl%na,nev,aa,elpa_hdl%local_nrows,ev,qq,elpa_hdl%local_nrows,& +& elpa_hdl%nblk,elpa_hdl%local_ncols,elpa_hdl%elpa_comm_rows,elpa_hdl%elpa_comm_cols,elpa_hdl%mpi_comm_parent,.false.) +#endif + + if (.not.success) call elpa_func_error_handler(err_msg='Error in solve_evp_1stage_complex!') + +end subroutine elpa_func_solve_evp_1stage_complex +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_elpa/elpa_func_cholesky_real +!! NAME +!! elpa_func_cholesky_real +!! +!! FUNCTION +!! Wrapper to elpa_cholesky_real ELPA function +!! +!! INPUTS +!! +!! SIDE EFFECTS +!! aa(local_nrows,local_ncols)=Distributed matrix which should be factorized. +!! Distribution is like in Scalapack. +!! Only upper triangle is needs to be set. +!! On return, the upper triangle contains the Cholesky factor +!! and the lower triangle is set to 0. +!! elpa_hdl(type)=handler for ELPA object +!! +!! SOURCE + +subroutine elpa_func_cholesky_real(elpa_hdl,aa) + +!Arguments ------------------------------------ +!scalars + type(elpa_hdl_t),intent(inout) :: elpa_hdl +!arrays + real(dp),intent(inout) :: aa(:,:) + +!Local variables------------------------------- + integer :: err + logical :: success + +! ********************************************************************* + + success=.true. ; err=0 + + if (.not.elpa_hdl%is_allocated) then + ABI_BUG('ELPA handle not allocated!') + end if + if (.not.elpa_hdl%matrix_is_set) then + ABI_BUG('Matrix not set in ELPA handle!') + end if +#ifdef HAVE_LINALG_ELPA_FORTRAN2008 + ABI_CHECK(size(aa)==elpa_hdl%elpa%local_nrows*elpa_hdl%elpa%local_ncols,'BUG: matrix A has wrong sizes!') +#else + ABI_CHECK(size(aa)==elpa_hdl%local_nrows*elpa_hdl%local_ncols,'BUG: matrix A has wrong sizes!') +#endif + +#ifdef HAVE_LINALG_ELPA_FORTRAN2008 + call elpa_hdl%elpa%cholesky(aa,err) + success=(err==ELPA_OK) +#elif (defined HAVE_LINALG_ELPA_2016) + success = elpa_cholesky_real(elpa_hdl%na,aa,elpa_hdl%local_nrows,elpa_hdl%nblk,elpa_hdl%local_ncols,& +& elpa_hdl%elpa_comm_rows,elpa_hdl%elpa_comm_cols,.false.) +#elif (defined HAVE_LINALG_ELPA_2015_11) + call cholesky_real(elpa_hdl%na,aa,elpa_hdl%local_nrows,elpa_hdl%nblk,elpa_hdl%local_ncols,& + elpa_hdl%elpa_comm_rows,elpa_hdl%elpa_comm_cols,.false.,success) +#elif (defined HAVE_LINALG_ELPA_2015_02) + call cholesky_real(elpa_hdl%na,aa,elpa_hdl%local_nrows,elpa_hdl%nblk,& + elpa_hdl%elpa_comm_rows,elpa_hdl%elpa_comm_cols,.false.,success) +#elif (defined HAVE_LINALG_ELPA_2014) + call cholesky_real(elpa_hdl%na,aa,elpa_hdl%local_nrows,elpa_hdl%nblk,& +& elpa_hdl%elpa_comm_rows,elpa_hdl%elpa_comm_cols,success) +#elif (defined HAVE_LINALG_ELPA_2013) + call cholesky_real(elpa_hdl%na,aa,elpa_hdl%local_nrows,elpa_hdl%nblk,& +& elpa_hdl%elpa_comm_rows,elpa_hdl%elpa_comm_cols) +#else +!ELPA-LEGACY-2017 + success = elpa_cholesky_real_double(elpa_hdl%na,aa,elpa_hdl%local_nrows,elpa_hdl%nblk,elpa_hdl%local_ncols,& +& elpa_hdl%elpa_comm_rows,elpa_hdl%elpa_comm_cols,.false.) +#endif + + if (.not.success) call elpa_func_error_handler(err_msg='Error in solve_cholesky_real!') + +end subroutine elpa_func_cholesky_real +!!*** + +!---------------------------------------------------------------------- +!!****f* m_elpa/elpa_func_cholesky_complex +!! NAME +!! elpa_func_cholesky_complex +!! +!! FUNCTION +!! Wrapper to elpa_cholesky_complex ELPA function +!! +!! INPUTS +!! +!! SIDE EFFECTS +!! aa(local_nrows,local_ncols)=Distributed matrix which should be factorized. +!! Distribution is like in Scalapack. +!! Only upper triangle is needs to be set. +!! On return, the upper triangle contains the Cholesky factor +!! and the lower triangle is set to 0. +!! elpa_hdl(type)=handler for ELPA object +!! +!! SOURCE + +subroutine elpa_func_cholesky_complex(elpa_hdl,aa) + +!Arguments ------------------------------------ +!scalars + type(elpa_hdl_t),intent(inout) :: elpa_hdl +!arrays + complex(dpc),intent(inout) :: aa(:,:) + +!Local variables------------------------------- + integer :: err + logical :: success + +! ********************************************************************* + + success=.true. ; err=0 + + if (.not.elpa_hdl%is_allocated) then + ABI_BUG('ELPA handle not allocated!') + end if + if (.not.elpa_hdl%matrix_is_set) then + ABI_BUG('Matrix not set in ELPA handle!') + end if +#ifdef HAVE_LINALG_ELPA_FORTRAN2008 + ABI_CHECK(size(aa)==elpa_hdl%elpa%local_nrows*elpa_hdl%elpa%local_ncols,'BUG: matrix A has wrong sizes!') +#else + ABI_CHECK(size(aa)==elpa_hdl%local_nrows*elpa_hdl%local_ncols,'BUG: matrix A has wrong sizes!') +#endif + +#ifdef HAVE_LINALG_ELPA_FORTRAN2008 + call elpa_hdl%elpa%cholesky(aa,err) + success=(err==ELPA_OK) +#elif (defined HAVE_LINALG_ELPA_2016) + success = elpa_cholesky_complex(elpa_hdl%na,aa,elpa_hdl%local_nrows,elpa_hdl%nblk,elpa_hdl%local_ncols,& +& elpa_hdl%elpa_comm_rows,elpa_hdl%elpa_comm_cols,.false.) +#elif (defined HAVE_LINALG_ELPA_2015_11) + call cholesky_complex(elpa_hdl%na,aa,elpa_hdl%local_nrows,elpa_hdl%nblk,elpa_hdl%local_ncols,& +& elpa_hdl%elpa_comm_rows,elpa_hdl%elpa_comm_cols,.false.,success) +#elif (defined HAVE_LINALG_ELPA_2015_02) + call cholesky_complex(elpa_hdl%na,aa,elpa_hdl%local_nrows,elpa_hdl%nblk,& +& elpa_hdl%elpa_comm_rows,elpa_hdl%elpa_comm_cols,.false.,success) +#elif (defined HAVE_LINALG_ELPA_2014) + call cholesky_complex(elpa_hdl%na,aa,elpa_hdl%local_nrows,elpa_hdl%nblk,& +& elpa_hdl%elpa_comm_rows,elpa_hdl%elpa_comm_cols,success) +#elif (defined HAVE_LINALG_ELPA_2013) + call cholesky_complex(elpa_hdl%na,aa,elpa_hdl%local_nrows,elpa_hdl%nblk,& +& elpa_hdl%elpa_comm_rows,elpa_hdl%elpa_comm_cols) +#else +!ELPA-LEGACY-2017 + success = elpa_cholesky_complex_double(elpa_hdl%na,aa,elpa_hdl%local_nrows,elpa_hdl%nblk,elpa_hdl%local_ncols,& +& elpa_hdl%elpa_comm_rows,elpa_hdl%elpa_comm_cols,.false.) +#endif + + if (.not.success) call elpa_func_error_handler(err_msg='Error in solve_cholesky_complex!') + +end subroutine elpa_func_cholesky_complex +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_elpa/elpa_func_invert_triangular_real +!! NAME +!! elpa_func_invert_triangular_real +!! +!! FUNCTION +!! Wrapper to elpa_invert_triangular_real ELPA function +!! +!! INPUTS +!! +!! SIDE EFFECTS +!! aa(local_nrows,local_ncols)=Distributed matrix which should be factorized. +!! Distribution is like in Scalapack. +!! Only upper triangle is needs to be set. +!! The lower triangle is not referenced. +!! elpa_hdl(type)=handler for ELPA object +!! +!! SOURCE + +subroutine elpa_func_invert_triangular_real(elpa_hdl,aa) + +!Arguments ------------------------------------ +!scalars + type(elpa_hdl_t),intent(inout) :: elpa_hdl +!arrays + real(dp),intent(inout) :: aa(:,:) + +!Local variables------------------------------- + integer :: err + logical :: success + +! ********************************************************************* + + success=.true. ; err=0 + + if (.not.elpa_hdl%is_allocated) then + ABI_BUG('ELPA handle not allocated!') + end if + if (.not.elpa_hdl%matrix_is_set) then + ABI_BUG('Matrix not set in ELPA handle!') + end if +#ifdef HAVE_LINALG_ELPA_FORTRAN2008 + ABI_CHECK(size(aa)==elpa_hdl%elpa%local_nrows*elpa_hdl%elpa%local_ncols,'BUG: matrix A has wrong sizes!') +#else + ABI_CHECK(size(aa)==elpa_hdl%local_nrows*elpa_hdl%local_ncols,'BUG: matrix A has wrong sizes!') +#endif + +#ifdef HAVE_LINALG_ELPA_FORTRAN2008 + call elpa_hdl%elpa%invert_triangular(aa,err) + success=(err==ELPA_OK) +#elif (defined HAVE_LINALG_ELPA_2016) + success = elpa_invert_trm_real(elpa_hdl%na,aa,elpa_hdl%local_nrows,elpa_hdl%nblk,elpa_hdl%local_ncols,& +& elpa_hdl%elpa_comm_rows,elpa_hdl%elpa_comm_cols,.false.) +#elif (defined HAVE_LINALG_ELPA_2015_11) + call invert_trm_real(elpa_hdl%na,aa,elpa_hdl%local_nrows,elpa_hdl%nblk,elpa_hdl%local_ncols,& + elpa_hdl%elpa_comm_rows,elpa_hdl%elpa_comm_cols,.false.,success) +#elif (defined HAVE_LINALG_ELPA_2015_02) + call invert_trm_real(elpa_hdl%na,aa,elpa_hdl%local_nrows,elpa_hdl%nblk,& + elpa_hdl%elpa_comm_rows,elpa_hdl%elpa_comm_cols,.false.,success) +#elif (defined HAVE_LINALG_ELPA_2014) + call invert_trm_real(elpa_hdl%na,aa,elpa_hdl%local_nrows,elpa_hdl%nblk,& +& elpa_hdl%elpa_comm_rows,elpa_hdl%elpa_comm_cols,success) + success=.true. ! Sometimes get unexpected success=false +#elif (defined HAVE_LINALG_ELPA_2013) + call invert_trm_real(elpa_hdl%na,aa,elpa_hdl%local_nrows,elpa_hdl%nblk,& +& elpa_hdl%elpa_comm_rows,elpa_hdl%elpa_comm_cols) +#else +!ELPA-LEGACY-2017 + success = elpa_invert_trm_real_double(elpa_hdl%na,aa,elpa_hdl%local_nrows,elpa_hdl%nblk,elpa_hdl%local_ncols,& +& elpa_hdl%elpa_comm_rows,elpa_hdl%elpa_comm_cols,.false.) +#endif + + if (.not.success) call elpa_func_error_handler(err_msg='Error in invert_trianguler_real!') + +end subroutine elpa_func_invert_triangular_real +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_elpa/elpa_func_invert_triangular_complex +!! NAME +!! elpa_func_invert_triangular_complex +!! +!! FUNCTION +!! Wrapper to elpa_invert_triangular_complex ELPA function +!! +!! INPUTS +!! +!! SIDE EFFECTS +!! aa(local_nrows,local_ncols)=Distributed matrix which should be factorized. +!! Distribution is like in Scalapack. +!! Only upper triangle is needs to be set. +!! The lower triangle is not referenced. +!! elpa_hdl(type)=handler for ELPA object +!! +!! SOURCE + +subroutine elpa_func_invert_triangular_complex(elpa_hdl,aa) + +!Arguments ------------------------------------ +!scalars + type(elpa_hdl_t),intent(inout) :: elpa_hdl +!arrays + complex(dpc),intent(inout) :: aa(:,:) + +!Local variables------------------------------- + integer :: err + logical :: success + +! ********************************************************************* + + success=.true. ; err=0 + + if (.not.elpa_hdl%is_allocated) then + ABI_BUG('ELPA handle not allocated!') + end if + if (.not.elpa_hdl%matrix_is_set) then + ABI_BUG('Matrix not set in ELPA handle!') + end if +#ifdef HAVE_LINALG_ELPA_FORTRAN2008 + ABI_CHECK(size(aa)==elpa_hdl%elpa%local_nrows*elpa_hdl%elpa%local_ncols,'BUG: matrix A has wrong sizes!') +#else + ABI_CHECK(size(aa)==elpa_hdl%local_nrows*elpa_hdl%local_ncols,'BUG: matrix A has wrong sizes!') +#endif + +#ifdef HAVE_LINALG_ELPA_FORTRAN2008 + call elpa_hdl%elpa%invert_triangular(aa,err) + success=(err==ELPA_OK) +#elif (defined HAVE_LINALG_ELPA_2016) + success = elpa_invert_trm_complex(elpa_hdl%na,aa,elpa_hdl%local_nrows,elpa_hdl%nblk,elpa_hdl%local_ncols,& +& elpa_hdl%elpa_comm_rows,elpa_hdl%elpa_comm_cols,.false.) +#elif (defined HAVE_LINALG_ELPA_2015_11) + call invert_trm_complex(elpa_hdl%na,aa,elpa_hdl%local_nrows,elpa_hdl%nblk,elpa_hdl%local_ncols,& + elpa_hdl%elpa_comm_rows,elpa_hdl%elpa_comm_cols,.false.,success) +#elif (defined HAVE_LINALG_ELPA_2015_02) + call invert_trm_complex(elpa_hdl%na,aa,elpa_hdl%local_nrows,elpa_hdl%nblk,& + elpa_hdl%elpa_comm_rows,elpa_hdl%elpa_comm_cols,.false.,success) +#elif (defined HAVE_LINALG_ELPA_2014) + call invert_trm_complex(elpa_hdl%na,aa,elpa_hdl%local_nrows,elpa_hdl%nblk,& +& elpa_hdl%elpa_comm_rows,elpa_hdl%elpa_comm_cols,success) + success=.true. ! Sometimes get unexpected success=false +#elif (defined HAVE_LINALG_ELPA_2013) + call invert_trm_complex(elpa_hdl%na,aa,elpa_hdl%local_nrows,elpa_hdl%nblk,& +& elpa_hdl%elpa_comm_rows,elpa_hdl%elpa_comm_cols) +#else +!ELPA-LEGACY-2017 + success = elpa_invert_trm_complex_double(elpa_hdl%na,aa,elpa_hdl%local_nrows,elpa_hdl%nblk,elpa_hdl%local_ncols,& +& elpa_hdl%elpa_comm_rows,elpa_hdl%elpa_comm_cols,.false.) +#endif + + if (.not.success) call elpa_func_error_handler(err_msg='Error in invert_trianguler_complex!') + +end subroutine elpa_func_invert_triangular_complex +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_elpa/elpa_func_hermitian_multiply_real +!! NAME +!! elpa_func_hermitian_multiply_real +!! +!! FUNCTION +!! Wrapper to elpa_hermitian_multiply_real ELPA function +!! Performs C := A**T * B +!! +!! INPUTS +!! uplo_a='U' if A is upper triangular +!! 'L' if A is lower triangular +!! anything else if A is a full matrix +!! Please note: This pertains to the original A (as set in the calling program) +!! whereas the transpose of A is used for calculations +!! If uplo_a is 'U' or 'L', the other triangle is not used at all, +!! i.e. it may contain arbitrary numbers +!! uplo_c='U' if only the upper diagonal part of C is needed +!! 'L' if only the upper diagonal part of C is needed +!! anything else if the full matrix C is needed +!! Please note: Even when uplo_c is 'U' or 'L', the other triangle may be +!! written to a certain extent, i.e. one shouldn't rely on the content there! +!! ncb=Number of columns of B and C +!! aa(local_nrows,local_ncols)=Matrix A +!! bb(ldb,local_ncols_c)=Matrix B +!! local_nrows_b=Local rows of matrix B +!! local_ncols_b=Local columns of matrix B +!! local_nrows_c=Local rows of matrix C +!! local_ncols_c=Local columns of matrix C +!! +!! OUTPUT +!! cc(local_nrows_c,local_ncols_c)=Matrix C +!! +!! SIDE EFFECTS +!! elpa_hdl(type)=handler for ELPA object +!! +!! SOURCE + +subroutine elpa_func_hermitian_multiply_real(elpa_hdl,uplo_a,uplo_c,ncb,aa,bb,local_nrows_b,local_ncols_b,& +& cc,local_nrows_c,local_ncols_c) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: ncb,local_nrows_b,local_nrows_c,local_ncols_b,local_ncols_c + character*1 :: uplo_a,uplo_c + type(elpa_hdl_t),intent(inout) :: elpa_hdl +!arrays + real(dp),intent(in) :: aa(:,:),bb(:,:) + real(dp),intent(out) :: cc(:,:) + +!Local variables------------------------------- + integer :: err + logical :: success + +! ********************************************************************* + + success=.true. ; err=0 + + if (.not.elpa_hdl%is_allocated) then + ABI_BUG('ELPA handle not allocated!') + end if + if (.not.elpa_hdl%matrix_is_set) then + ABI_BUG('Matrix not set in ELPA handle!') + end if +#ifdef HAVE_LINALG_ELPA_FORTRAN2008 + ABI_CHECK(size(aa)==elpa_hdl%elpa%local_nrows*elpa_hdl%elpa%local_ncols,'BUG: matrix A has wrong sizes!') +#else + ABI_CHECK(size(aa)==elpa_hdl%local_nrows*elpa_hdl%local_ncols,'BUG: matrix A has wrong sizes!') +#endif + ABI_CHECK(size(bb)==local_nrows_b*local_ncols_b,'BUG: matrix B has wrong sizes!') + ABI_CHECK(size(cc)==local_nrows_c*local_ncols_c,'BUG: matrix C has wrong sizes!') + +#ifdef HAVE_LINALG_ELPA_FORTRAN2008 + call elpa_hdl%elpa%hermitian_multiply(uplo_a,uplo_c,ncb,aa,bb,local_nrows_b,local_ncols_b,& +& cc,local_nrows_c,local_ncols_c,err) + success=(err==ELPA_OK) +#elif (defined HAVE_LINALG_ELPA_2016) + success = elpa_mult_at_b_real(uplo_a,uplo_c,elpa_hdl%na,ncb,aa,elpa_hdl%local_nrows,elpa_hdl%local_ncols,& +& bb,local_nrows_b,local_ncols_b,elpa_hdl%nblk,elpa_hdl%elpa_comm_rows,elpa_hdl%elpa_comm_cols,& +& cc,local_nrows_c,local_ncols_c) +#elif (defined HAVE_LINALG_ELPA_2015_11) || (defined HAVE_LINALG_ELPA_2015_02) + call mult_at_b_real(uplo_a,uplo_c,elpa_hdl%na,ncb,aa,elpa_hdl%local_nrows,bb,local_nrows_b,& +& elpa_hdl%nblk,elpa_hdl%elpa_comm_rows,elpa_hdl%elpa_comm_cols,cc,local_nrows_c) +#elif (defined HAVE_LINALG_ELPA_2014) || (defined HAVE_LINALG_ELPA_2013) + call mult_at_b_real(uplo_a,uplo_c,elpa_hdl%na,ncb,aa,elpa_hdl%local_nrows,bb,local_nrows_b,& +& elpa_hdl%nblk,elpa_hdl%elpa_comm_rows,elpa_hdl%elpa_comm_cols,cc,local_nrows_c) +#else +!ELPA-LEGACY-2017 + success = elpa_mult_at_b_real_double(uplo_a,uplo_c,elpa_hdl%na,ncb,aa,elpa_hdl%local_nrows,& +& elpa_hdl%local_ncols,bb,local_nrows_b,local_ncols_b,elpa_hdl%nblk,elpa_hdl%elpa_comm_rows,& +& elpa_hdl%elpa_comm_cols,cc,local_nrows_c,local_ncols_c) +#endif + + if (.not.success) call elpa_func_error_handler(err_msg='Error in hermitian_multiply_real!') + +end subroutine elpa_func_hermitian_multiply_real +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_elpa/elpa_func_hermitian_multiply_complex +!! NAME +!! elpa_func_hermitian_multiply_complex +!! +!! FUNCTION +!! Wrapper to elpa_hermitian_multiply_complex ELPA function +!! Performs C := A**H * B +!! +!! INPUTS +!! uplo_a='U' if A is upper triangular +!! 'L' if A is lower triangular +!! anything else if A is a full matrix +!! Please note: This pertains to the original A (as set in the calling program) +!! whereas the transpose of A is used for calculations +!! If uplo_a is 'U' or 'L', the other triangle is not used at all, +!! i.e. it may contain arbitrary numbers +!! uplo_c='U' if only the upper diagonal part of C is needed +!! 'L' if only the upper diagonal part of C is needed +!! anything else if the full matrix C is needed +!! Please note: Even when uplo_c is 'U' or 'L', the other triangle may be +!! written to a certain extent, i.e. one shouldn't rely on the content there! +!! ncb=Number of columns of B and C +!! aa(local_nrows,local_ncols)=Matrix A +!! bb(ldb,local_ncols_c)=Matrix B +!! local_nrows_b=Local rows of matrix B +!! local_ncols_b=Local columns of matrix B +!! local_nrows_c=Local rows of matrix C +!! local_ncols_c=Local columns of matrix C +!! +!! OUTPUT +!! cc(local_nrows_c,local_ncols_c)=Matrix C +!! +!! SIDE EFFECTS +!! elpa_hdl(type)=handler for ELPA object +!! +!! SOURCE + +subroutine elpa_func_hermitian_multiply_complex(elpa_hdl,uplo_a,uplo_c,ncb,aa,bb,local_nrows_b,local_ncols_b,& +& cc,local_nrows_c,local_ncols_c) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: ncb,local_nrows_b,local_nrows_c,local_ncols_b,local_ncols_c + character*1 :: uplo_a,uplo_c + type(elpa_hdl_t),intent(inout) :: elpa_hdl +!arrays + complex(dpc),intent(in) :: aa(:,:),bb(:,:) + complex(dpc),intent(out) :: cc(:,:) + +!Local variables------------------------------- + integer :: err + logical :: success + +! ********************************************************************* + + success=.true. ; err=0 + + if (.not.elpa_hdl%is_allocated) then + ABI_BUG('ELPA handle not allocated!') + end if + if (.not.elpa_hdl%matrix_is_set) then + ABI_BUG('Matrix not set in ELPA handle!') + end if +#ifdef HAVE_LINALG_ELPA_FORTRAN2008 + ABI_CHECK(size(aa)==elpa_hdl%elpa%local_nrows*elpa_hdl%elpa%local_ncols,'BUG: matrix A has wrong sizes!') +#else + ABI_CHECK(size(aa)==elpa_hdl%local_nrows*elpa_hdl%local_ncols,'BUG: matrix A has wrong sizes!') +#endif + ABI_CHECK(size(bb)==local_nrows_b*local_ncols_b,'BUG: matrix B has wrong sizes!') + ABI_CHECK(size(cc)==local_nrows_c*local_ncols_c,'BUG: matrix C has wrong sizes!') + +#ifdef HAVE_LINALG_ELPA_FORTRAN2008 + call elpa_hdl%elpa%hermitian_multiply(uplo_a,uplo_c,ncb,aa,bb,local_nrows_b,local_ncols_b,& +& cc,local_nrows_c,local_ncols_c,err) + success=(err==ELPA_OK) +#elif (defined HAVE_LINALG_ELPA_2016) + success = elpa_mult_ah_b_complex(uplo_a,uplo_c,elpa_hdl%na,ncb,aa,elpa_hdl%local_nrows,elpa_hdl%local_ncols,& +& bb,local_nrows_b,local_ncols_b,elpa_hdl%nblk,elpa_hdl%elpa_comm_rows,elpa_hdl%elpa_comm_cols,& +& cc,local_nrows_c,local_ncols_c) +#elif (defined HAVE_LINALG_ELPA_2015_11) || (defined HAVE_LINALG_ELPA_2015_02) + call mult_ah_b_complex(uplo_a,uplo_c,elpa_hdl%na,ncb,aa,elpa_hdl%local_nrows,bb,local_nrows_b,& +& elpa_hdl%nblk,elpa_hdl%elpa_comm_rows,elpa_hdl%elpa_comm_cols,cc,local_nrows_c) +#elif (defined HAVE_LINALG_ELPA_2014) || (defined HAVE_LINALG_ELPA_2013) + call mult_ah_b_complex(uplo_a,uplo_c,elpa_hdl%na,ncb,aa,elpa_hdl%local_nrows,bb,local_nrows_b,& +& elpa_hdl%nblk,elpa_hdl%elpa_comm_rows,elpa_hdl%elpa_comm_cols,cc,local_nrows_c) +#else +!ELPA-LEGACY-2017 + success = elpa_mult_ah_b_complex_double(uplo_a,uplo_c,elpa_hdl%na,ncb,aa,elpa_hdl%local_nrows,& +& elpa_hdl%local_ncols,bb,local_nrows_b,local_ncols_b,elpa_hdl%nblk,elpa_hdl%elpa_comm_rows,& +& elpa_hdl%elpa_comm_cols,cc,local_nrows_c,local_ncols_c) +#endif + + if (.not.success) call elpa_func_error_handler(err_msg='Error in hermitian_multiply_complex!') + +end subroutine elpa_func_hermitian_multiply_complex +!!*** + +!---------------------------------------------------------------------- + +#endif + +END MODULE m_elpa +!!*** diff --git a/GX-PAW/common/src/28_numeric_noabirule/m_elpa.o b/GX-PAW/common/src/28_numeric_noabirule/m_elpa.o new file mode 100644 index 00000000..21795e99 Binary files /dev/null and b/GX-PAW/common/src/28_numeric_noabirule/m_elpa.o differ diff --git a/GX-PAW/common/src/28_numeric_noabirule/m_gaussian_quadrature.F90 b/GX-PAW/common/src/28_numeric_noabirule/m_gaussian_quadrature.F90 new file mode 100644 index 00000000..4e53c042 --- /dev/null +++ b/GX-PAW/common/src/28_numeric_noabirule/m_gaussian_quadrature.F90 @@ -0,0 +1,2443 @@ +!!****m* ABINIT/m_gaussian_quadrature +!! NAME +!! m_gaussian_quadrature +!! +!! FUNCTION +!! . +!! +!! COPYRIGHT +!! Copyright (C) 2009-2024 ABINIT group (JLJ, BR, MC) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" + +module m_gaussian_quadrature +!---------------------------------------------------------------------------------------------------- +! +! This module contains routines to generate the weights and positions at which to evaluate +! an integrand in order to produce a Gaussian quadrature of a given type. +! +! The code here was obtained from the internet (see header to subroutine cdgqf for further details). +! The code was slightly modified to use doubles instead of floats in order to reach greater +! accuracy. +! +!---------------------------------------------------------------------------------------------------- + + use m_abicore + use m_errors + + use defs_basis, only : dp, tol20, std_out + use m_io_tools, only : open_file + + implicit none + + private +!!*** + +!!*** + public :: gaussian_quadrature_gegenbauer, gaussian_quadrature_legendre + public :: get_frequencies_and_weights_legendre + public :: cgqf +!!*** + +contains + + +!!****f* m_hamiltonian/gaussian_quadrature_gegenbauer +!! NAME +!! gaussian_quadrature_gegenbauer +!! +!! FUNCTION +!! . +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + + subroutine gaussian_quadrature_gegenbauer(integrand,integral,order) + !---------------------------------------------------------------------------------------------------- + ! + ! This subroutine performs a gaussian quadrature of given order of the input function integrand + ! and stores the result in the variable integral. + ! + ! The integrand function is assumed to be defined on the range from 0 to infinity, and it is + ! assumed to to behave as x^2 near x=0, and 1/x^4 as x-> infinity. + ! + ! The Gegenbauer integration method is of the form: + ! + ! int_{-1}^{1} dt (1-t)^2(1+t)^2 f(t) = sum_{i} w_i f(t_i) + ! + ! + ! In order to perform such an integral, make a change of variable x = (1-t)/(1+t); this implies + ! + ! int_0^infty dx I(x) = int_{-1}^{1} dt g(t), g(t) = 2/(1+t)^2 I((1-t)/(1+t)) + ! + ! It is easy to show that g(1-delta) ~ delta^2 and g(-1+delta) ~ delta^2 for delta small. + ! Thus, we can define + ! + ! int_{-1}^{1} dt g(t) = int_{-1}^{1} dt (1+t)^2(1-t)^2 f(t), f(t) = g(t)/(1-t^2)^2 + ! + ! + !---------------------------------------------------------------------------------------------------- + + + ! input and output variables + integer, intent(in) :: order + + interface + function integrand(x) + integer, parameter :: dp=kind(1.0d0) + real(dp) integrand + real(dp),intent(in) :: x + end function integrand + end interface + + real(dp), intent(out) :: integral + + + real(dp) :: t(order), w(order) + + + integer :: i + + integer :: gaussian_kind + real(dp) :: alpha, beta, a, b + real(dp) :: x, y, f + +! ************************************************************************* + + + ! Set the arguments and weights + gaussian_kind = 3 + alpha= 2.0_dp + beta = 2.0_dp + a = -1.0_dp + b = 1.0_dp + call cgqf ( order, gaussian_kind, alpha, beta, a, b, t, w ) + + + + ! call the integrant the right number of times + + integral = 0.0_dp + + do i = 1, order + x = (1.0_dp-t(i))/(1.0_dp+t(i)) + + y = integrand(x) + + f = 2.0_dp/(1.0_dp+t(i))**2/(1.0_dp-t(i)**2)**2*y + + integral = integral + w(i)*f + + end do ! i + + end subroutine gaussian_quadrature_gegenbauer +!!*** + +!!****f* m_hamiltonian/gaussian_quadrature_legendre +!! NAME +!! gaussian_quadrature_legendre +!! +!! FUNCTION +!! . +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + + subroutine gaussian_quadrature_legendre(integrand,integral,order) + !---------------------------------------------------------------------------------------------------- + ! + ! This subroutine performs a gaussian quadrature of given order of the input function integrand + ! and stores the result in the variable integral. + ! + ! The integrand function is assumed to be defined on the range from 0 to infinity, and it is + ! assumed to to behave as x^2 near x=0, and 1/x^4 as x-> infinity. + ! + ! The Legendre integration method is of the form: + ! + ! int_{-1}^{1} dt f(t) = sum_{i} w_i f(t_i) + ! + ! + ! In order to perform such an integral, make a change of variable x = (1-t)/(1+t); this implies + ! + ! int_0^infty dx I(x) = int_{-1}^{1} dt f(t), f(t) = 2/(1+t)^2 I((1-t)/(1+t)) + ! + ! + ! + !---------------------------------------------------------------------------------------------------- + + + ! input and output variables + integer, intent(in) :: order + + interface + function integrand(x) + integer, parameter :: dp=kind(1.0d0) + real(dp) integrand + real(dp),intent(in) :: x + end function integrand + end interface + + real(dp), intent(out) :: integral + + + real(dp) :: t(order), w(order) + + + integer :: i + + integer :: gaussian_kind + real(dp) :: alpha, beta, a, b + real(dp) :: x, y, f + +! ************************************************************************* + + + ! Set the arguments and weights + gaussian_kind = 1 + alpha= 0.0_dp + beta = 0.0_dp + a = -1.0_dp + b = 1.0_dp + call cgqf ( order, gaussian_kind, alpha, beta, a, b, t, w ) + + + + ! call the integrant the right number of times + + integral = 0.0_dp + + do i = 1, order + x = (1.0_dp-t(i))/(1.0_dp+t(i)) + + y = integrand(x) + + f = 2.0_dp/(1.0_dp+t(i))**2*y + + integral = integral + w(i)*f + + end do ! i + + end subroutine gaussian_quadrature_legendre +!!*** + + +!!****f* m_hamiltonian/get_frequencies_and_weights_legendre +!! NAME +!! get_frequencies_and_weights_legendre +!! +!! FUNCTION +!! . +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + + subroutine get_frequencies_and_weights_legendre(order,frequencies,weights) + !---------------------------------------------------------------------------------------------------- + ! + ! This subroutine generates the frequencies and weights to integrate using legendre Gaussian + ! quadrature for a given order. + ! + ! The integrand function is assumed to be defined on the range from 0 to infinity, and it is + ! assumed to to behave as x^2 near x=0, and 1/x^4 as x-> infinity. + ! + ! The Legendre integration method is of the form: + ! + ! int_{-1}^{1} dt f(t) = sum_{i} w_i f(t_i) + ! + ! In order to perform such an integral, make a change of variable + ! + ! omega = (1-t)/(1+t) + ! + ! and thus + ! int_0^infty domega I(omega) = int_{-1}^{1} dt f(t), f(t) = 2/(1+t)^2 I((1-t)/(1+t)) + ! + ! and so the weights are defined as weights(i) = 2/(1+ti)^2*wi. + ! + ! + !---------------------------------------------------------------------------------------------------- + ! input and output variables + integer, intent(in) :: order + real(dp), intent(out) :: frequencies(order) + real(dp), intent(out) :: weights(order) + + + real(dp) :: t(order), w(order) + + + integer :: i + + integer :: gaussian_kind + real(dp) :: alpha, beta, a, b + real(dp) :: x, f + +! ************************************************************************* + + + ! Set the arguments and weights + gaussian_kind = 1 + alpha = 0.0_dp + beta = 0.0_dp + a = -1.0_dp + b = 1.0_dp + + call cgqf ( order, gaussian_kind, alpha, beta, a, b, t, w ) + + + ! call the integrant the right number of times + + do i = 1, order + + x = (1.0_dp-t(i))/(1.0_dp+t(i)) + f = 2.0_dp/(1.0_dp+t(i))**2 + + frequencies(i) = x + weights(i) = w(i)*f + + end do ! i + + end subroutine get_frequencies_and_weights_legendre +!!*** + +!!****f* m_hamiltonian/cdgqf +!! NAME +!! cdgqf +!! +!! FUNCTION +!! . +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +subroutine cdgqf ( nt, gaussian_kind, alpha, beta, t, wts ) + +!*****************************************************************************80 +! +!! CDGQF computes a Gauss quadrature formula with default A, B and simple knots. +! +! Discussion: +! +! This routine computes all the knots and weights of a Gauss quadrature +! formula with a classical weight function with default values for A and B, +! and only simple knots. +! +! There are no moments checks and no printing is done. +! +! Use routine EIQFS to evaluate a quadrature computed by CGQFS. +! +! Licensing: +! +! This code is distributed under the GNU LGPL license. +! +! Modified: +! +! 04 January 2010 +! +! Author: +! +! Original FORTRAN77 version by Sylvan Elhay, Jaroslav Kautsky. +! FORTRAN90 version by John Burkardt. +! +! Reference: +! +! Sylvan Elhay, Jaroslav Kautsky, +! Algorithm 655: IQPACK, FORTRAN Subroutines for the Weights of +! Interpolatory Quadrature, +! ACM Transactions on Mathematical Software, +! Volume 13, Number 4, December 1987, pages 399-415. +! +! Parameters: +! +! Input, integer ( kind = 4 ) NT, the number of knots. +! +! Input, integer ( kind = 4 ) KIND, the rule. +! 1, Legendre, (a,b) 1.0 +! 2, Chebyshev, (a,b) ((b-x)*(x-a))^(-0.5) +! 3, Gegenbauer, (a,b) ((b-x)*(x-a))^alpha +! 4, Jacobi, (a,b) (b-x)^alpha*(x-a)^beta +! 5, Generalized Laguerre, (a,inf) (x-a)^alpha*exp(-b*(x-a)) +! 6, Generalized Hermite, (-inf,inf) |x-a|^alpha*exp(-b*(x-a)^2) +! 7, Exponential, (a,b) |x-(a+b)/2.0|^alpha +! 8, Rational, (a,inf) (x-a)^alpha*(x+b)^beta +! +! Input, real ( dp ) ALPHA, the value of Alpha, if needed. +! +! Input, real ( dp ) BETA, the value of Beta, if needed. +! +! Output, real ( dp ) T(NT), the knots. +! +! Output, real ( dp ) WTS(NT), the weights. +! + integer ( kind = 4 ) nt + + real ( dp ) aj(nt) + real ( dp ) alpha + real ( dp ) beta + real ( dp ) bj(nt) + integer ( kind = 4 ) gaussian_kind + real ( dp ) t(nt) + real ( dp ) wts(nt) + real ( dp ) zemu + +! ************************************************************************* + + call parchk ( gaussian_kind, 2 * nt, alpha, beta ) +! +! Get the Jacobi matrix and zero-th moment. +! + call class_matrix ( gaussian_kind, nt, alpha, beta, aj, bj, zemu ) +! +! Compute the knots and weights. +! + call sgqf ( nt, aj, bj, zemu, t, wts ) + + return +end subroutine cdgqf +!!*** + +!!****f* m_hamiltonian/cgqf +!! NAME +!! cgqf +!! +!! FUNCTION +!! . +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +subroutine cgqf ( nt, gaussian_kind, alpha, beta, a, b, t, wts ) + +!*****************************************************************************80 +! +!! CGQF computes knots and weights of a Gauss quadrature formula. +! +! Discussion: +! +! The user may specify the interval (A,B). +! +! Only simple knots are produced. +! +! Use routine EIQFS to evaluate this quadrature formula. +! +! Licensing: +! +! This code is distributed under the GNU LGPL license. +! +! Modified: +! +! 16 February 2010 +! +! Author: +! +! Original FORTRAN77 version by Sylvan Elhay, Jaroslav Kautsky. +! FORTRAN90 version by John Burkardt. +! +! Reference: +! +! Sylvan Elhay, Jaroslav Kautsky, +! Algorithm 655: IQPACK, FORTRAN Subroutines for the Weights of +! Interpolatory Quadrature, +! ACM Transactions on Mathematical Software, +! Volume 13, Number 4, December 1987, pages 399-415. +! +! Parameters: +! +! Input, integer ( kind = 4 ) NT, the number of knots. +! +! Input, integer ( kind = 4 ) KIND, the rule. +! 1, Legendre, (a,b) 1.0 +! 2, Chebyshev Type 1, (a,b) ((b-x)*(x-a))^-0.5) +! 3, Gegenbauer, (a,b) ((b-x)*(x-a))^alpha +! 4, Jacobi, (a,b) (b-x)^alpha*(x-a)^beta +! 5, Generalized Laguerre, (a,+oo) (x-a)^alpha*exp(-b*(x-a)) +! 6, Generalized Hermite, (-oo,+oo) |x-a|^alpha*exp(-b*(x-a)^2) +! 7, Exponential, (a,b) |x-(a+b)/2.0|^alpha +! 8, Rational, (a,+oo) (x-a)^alpha*(x+b)^beta +! 9, Chebyshev Type 2, (a,b) ((b-x)*(x-a))^(+0.5) +! +! Input, real ( dp ) ALPHA, the value of Alpha, if needed. +! +! Input, real ( dp ) BETA, the value of Beta, if needed. +! +! Input, real ( dp ) A, B, the interval endpoints, or +! other parameters. +! +! Output, real ( dp ) T(NT), the knots. +! +! Output, real ( dp ) WTS(NT), the weights. +! + integer ( kind = 4 ) nt + + real ( dp ) a + real ( dp ) alpha + real ( dp ) b + real ( dp ) beta + integer ( kind = 4 ) i + integer ( kind = 4 ) gaussian_kind + integer ( kind = 4 ), allocatable :: mlt(:) + integer ( kind = 4 ), allocatable :: ndx(:) + real ( dp ) t(nt) + real ( dp ) wts(nt) + +! ************************************************************************* + +! +! Compute the Gauss quadrature formula for default values of A and B. +! + call cdgqf ( nt, gaussian_kind, alpha, beta, t, wts ) +! +! Prepare to scale the quadrature formula to other weight function with +! valid A and B. +! + ABI_MALLOC( mlt, (1:nt) ) + + mlt(1:nt) = 1 + + ABI_MALLOC( ndx, (1:nt) ) + + do i = 1, nt + ndx(i) = i + end do + + call scqf ( nt, t, mlt, wts, nt, ndx, wts, t, gaussian_kind, alpha, beta, a, b ) + + ABI_FREE( mlt ) + ABI_FREE( ndx ) + + return +end subroutine cgqf +!!*** + +!!****f* m_hamiltonian/ch_cap +!! NAME +!! ch_cap +!! +!! FUNCTION +!! . +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +subroutine ch_cap ( c ) + +!*****************************************************************************80 +! +!! CH_CAP capitalizes a single character. +! +! Licensing: +! +! This code is distributed under the GNU LGPL license. +! +! Modified: +! +! 19 July 1998 +! +! Author: +! +! John Burkardt +! +! Parameters: +! +! Input/output, character C, the character to capitalize. +! + character c + integer ( kind = 4 ) itemp + +! ************************************************************************* + + itemp = ichar ( c ) + + if ( 97 <= itemp .and. itemp <= 122 ) then + c = char ( itemp - 32 ) + end if + + return +end subroutine ch_cap +!!*** + +!!****f* m_hamiltonian/ch_eqi +!! NAME +!! ch_eqi +!! +!! FUNCTION +!! . +!! +!! INPUTS +!! +!! OUTPUT +!! +!! +!! +!! SOURCE + +function ch_eqi ( c1, c2 ) + +!*****************************************************************************80 +! +!! CH_EQI is a case insensitive comparison of two characters for equality. +! +! Example: +! +! CH_EQI ( 'A', 'a' ) is .TRUE. +! +! Licensing: +! +! This code is distributed under the GNU LGPL license. +! +! Modified: +! +! 28 July 2000 +! +! Author: +! +! John Burkardt +! +! Parameters: +! +! Input, character C1, C2, the characters to compare. +! +! Output, logical CH_EQI, the result of the comparison. +! + logical ch_eqi + character c1 + character c1_cap + character c2 + character c2_cap + +! ************************************************************************* + + c1_cap = c1 + c2_cap = c2 + + call ch_cap ( c1_cap ) + call ch_cap ( c2_cap ) + + if ( c1_cap == c2_cap ) then + ch_eqi = .true. + else + ch_eqi = .false. + end if + + return +end function ch_eqi +!!*** + +!!****f* m_hamiltonian/ch_to_digit +!! NAME +!! ch_to_digit +!! +!! FUNCTION +!! . +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +subroutine ch_to_digit ( c, digit ) + +!*****************************************************************************80 +! +!! CH_TO_DIGIT returns the integer value of a base 10 digit. +! +! Example: +! +! C DIGIT +! --- ----- +! '0' 0 +! '1' 1 +! ... ... +! '9' 9 +! ' ' 0 +! 'X' -1 +! +! Licensing: +! +! This code is distributed under the GNU LGPL license. +! +! Modified: +! +! 04 August 1999 +! +! Author: +! +! John Burkardt +! +! Parameters: +! +! Input, character C, the decimal digit, '0' through '9' or blank +! are legal. +! +! Output, integer ( kind = 4 ) DIGIT, the corresponding integer value. +! If C was 'illegal', then DIGIT is -1. +! + character c + integer ( kind = 4 ) digit + +! ************************************************************************* + + if ( lge ( c, '0' ) .and. lle ( c, '9' ) ) then + + digit = ichar ( c ) - 48 + + else if ( c == ' ' ) then + + digit = 0 + + else + + digit = -1 + + end if + + return +end subroutine ch_to_digit +!!*** + +!!****f* m_hamiltonian/class_matrix +!! NAME +!! class_matrix +!! +!! FUNCTION +!! . +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +subroutine class_matrix ( gaussian_kind, m, alpha, beta, aj, bj, zemu ) + +!*****************************************************************************80 +! +!! CLASS_MATRIX computes the Jacobi matrix for a quadrature rule. +! +! Discussion: +! +! This routine computes the diagonal AJ and sub-diagonal BJ +! elements of the order M tridiagonal symmetric Jacobi matrix +! associated with the polynomials orthogonal with respect to +! the weight function specified by KIND. +! +! For weight functions 1-7, M elements are defined in BJ even +! though only M-1 are needed. For weight function 8, BJ(M) is +! set to zero. +! +! The zero-th moment of the weight function is returned in ZEMU. +! +! Licensing: +! +! This code is distributed under the GNU LGPL license. +! +! Modified: +! +! 27 December 2009 +! +! Author: +! +! Original FORTRAN77 version by Sylvan Elhay, Jaroslav Kautsky. +! FORTRAN90 version by John Burkardt. +! +! Reference: +! +! Sylvan Elhay, Jaroslav Kautsky, +! Algorithm 655: IQPACK, FORTRAN Subroutines for the Weights of +! Interpolatory Quadrature, +! ACM Transactions on Mathematical Software, +! Volume 13, Number 4, December 1987, pages 399-415. +! +! Parameters: +! +! Input, integer ( kind = 4 ) KIND, the rule. +! 1, Legendre, (a,b) 1.0 +! 2, Chebyshev, (a,b) ((b-x)*(x-a))^(-0.5) +! 3, Gegenbauer, (a,b) ((b-x)*(x-a))^alpha +! 4, Jacobi, (a,b) (b-x)^alpha*(x-a)^beta +! 5, Generalized Laguerre, (a,inf) (x-a)^alpha*exp(-b*(x-a)) +! 6, Generalized Hermite, (-inf,inf) |x-a|^alpha*exp(-b*(x-a)^2) +! 7, Exponential, (a,b) |x-(a+b)/2.0|^alpha +! 8, Rational, (a,inf) (x-a)^alpha*(x+b)^beta +! +! Input, integer ( kind = 4 ) M, the order of the Jacobi matrix. +! +! Input, real ( dp ) ALPHA, the value of Alpha, if needed. +! +! Input, real ( dp ) BETA, the value of Beta, if needed. +! +! Output, real ( dp ) AJ(M), BJ(M), the diagonal and subdiagonal +! of the Jacobi matrix. +! +! Output, real ( dp ) ZEMU, the zero-th moment. +! + integer ( kind = 4 ) m + + real ( dp ) a2b2 + real ( dp ) ab + real ( dp ) aba + real ( dp ) abi + real ( dp ) abj + real ( dp ) abti + real ( dp ) aj(m) + real ( dp ) alpha + real ( dp ) apone + real ( dp ) beta + real ( dp ) bj(m) + integer ( kind = 4 ) i + integer ( kind = 4 ) gaussian_kind + real ( dp ), parameter :: pi = 3.14159265358979323846264338327950D+00 + real ( dp ) temp + real ( dp ) temp2 + real ( dp ) zemu + +! ************************************************************************* + + temp = epsilon ( temp ) + + call parchk ( gaussian_kind, 2 * m - 1, alpha, beta ) + + temp2 = 0.5D+00 + + if ( 500.0D+00 * temp < abs ( ( r8_gamma_gq ( temp2 ) )**2 - pi ) ) then + ABI_ERROR('Gamma function does not match machine parameters.') + end if + + if ( gaussian_kind == 1 ) then + + ab = 0.0D+00 + + zemu = 2.0D+00 / ( ab + 1.0D+00 ) + + aj(1:m) = 0.0D+00 + + do i = 1, m + abi = i + ab * mod ( i, 2 ) + abj = 2 * i + ab + bj(i) = abi * abi / ( abj * abj - 1.0D+00 ) + end do + bj(1:m) = sqrt ( bj(1:m) ) + + else if ( gaussian_kind == 2 ) then + + zemu = pi + + aj(1:m) = 0.0D+00 + + bj(1) = sqrt ( 0.5D+00 ) + bj(2:m) = 0.5D+00 + + else if ( gaussian_kind == 3 ) then + + ab = alpha * 2.0D+00 + zemu = 2.0D+00**( ab + 1.0D+00 ) * r8_gamma_gq ( alpha + 1.0D+00 )**2 & + / r8_gamma_gq ( ab + 2.0D+00 ) + + aj(1:m) = 0.0D+00 + bj(1) = 1.0D+00 / ( 2.0D+00 * alpha + 3.0D+00 ) + do i = 2, m + bj(i) = i * ( i + ab ) / ( 4.0D+00 * ( i + alpha )**2 - 1.0D+00 ) + end do + bj(1:m) = sqrt ( bj(1:m) ) + + else if ( gaussian_kind == 4 ) then + + ab = alpha + beta + abi = 2.0D+00 + ab + zemu = 2.0D+00**( ab + 1.0D+00 ) * r8_gamma_gq ( alpha + 1.0D+00 ) & + * r8_gamma_gq ( beta + 1.0D+00 ) / r8_gamma_gq ( abi ) + aj(1) = ( beta - alpha ) / abi + bj(1) = 4.0D+00 * ( 1.0 + alpha ) * ( 1.0D+00 + beta ) & + / ( ( abi + 1.0D+00 ) * abi * abi ) + a2b2 = beta * beta - alpha * alpha + + do i = 2, m + abi = 2.0D+00 * i + ab + aj(i) = a2b2 / ( ( abi - 2.0D+00 ) * abi ) + abi = abi**2 + bj(i) = 4.0D+00 * i * ( i + alpha ) * ( i + beta ) * ( i + ab ) & + / ( ( abi - 1.0D+00 ) * abi ) + end do + bj(1:m) = sqrt ( bj(1:m) ) + + else if ( gaussian_kind == 5 ) then + + zemu = r8_gamma_gq ( alpha + 1.0D+00 ) + + do i = 1, m + aj(i) = 2.0D+00 * i - 1.0D+00 + alpha + bj(i) = i * ( i + alpha ) + end do + bj(1:m) = sqrt ( bj(1:m) ) + + else if ( gaussian_kind == 6 ) then + + zemu = r8_gamma_gq ( ( alpha + 1.0D+00 ) / 2.0D+00 ) + + aj(1:m) = 0.0D+00 + + do i = 1, m + bj(i) = ( i + alpha * mod ( i, 2 ) ) / 2.0D+00 + end do + bj(1:m) = sqrt ( bj(1:m) ) + + else if ( gaussian_kind == 7 ) then + + ab = alpha + zemu = 2.0D+00 / ( ab + 1.0D+00 ) + + aj(1:m) = 0.0D+00 + + do i = 1, m + abi = i + ab * mod ( i, 2 ) + abj = 2 * i + ab + bj(i) = abi * abi / ( abj * abj - 1.0D+00 ) + end do + bj(1:m) = sqrt ( bj(1:m) ) + + else if ( gaussian_kind == 8 ) then + + ab = alpha + beta + zemu = r8_gamma_gq ( alpha + 1.0D+00 ) * r8_gamma_gq ( - ( ab + 1.0D+00 ) ) & + / r8_gamma_gq ( - beta ) + apone = alpha + 1.0D+00 + aba = ab * apone + aj(1) = - apone / ( ab + 2.0D+00 ) + bj(1) = - aj(1) * ( beta + 1.0D+00 ) / ( ab + 2.0D+00 ) / ( ab + 3.0D+00 ) + do i = 2, m + abti = ab + 2.0D+00 * i + aj(i) = aba + 2.0D+00 * ( ab + i ) * ( i - 1 ) + aj(i) = - aj(i) / abti / ( abti - 2.0D+00 ) + end do + + do i = 2, m - 1 + abti = ab + 2.0D+00 * i + bj(i) = i * ( alpha + i ) / ( abti - 1.0D+00 ) * ( beta + i ) & + / ( abti**2 ) * ( ab + i ) / ( abti + 1.0D+00 ) + end do + + bj(m) = 0.0D+00 + bj(1:m) = sqrt ( bj(1:m) ) + + end if + + return +end subroutine class_matrix +!!*** + +!!****f* m_hamiltonian/imtqlx +!! NAME +!! imtqlx +!! +!! FUNCTION +!! . +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +subroutine imtqlx ( n, d, e, z ) + +!*****************************************************************************80 +! +!! IMTQLX diagonalizes a symmetric tridiagonal matrix. +! +! Discussion: +! +! This routine is a slightly modified version of the EISPACK routine to +! perform the implicit QL algorithm on a symmetric tridiagonal matrix. +! +! The authors thank the authors of EISPACK for permission to use this +! routine. +! +! It has been modified to produce the product Q' * Z, where Z is an input +! vector and Q is the orthogonal matrix diagonalizing the input matrix. +! The changes consist (essentially) of applying the orthogonal +! transformations directly to Z as they are generated. +! +! Licensing: +! +! This code is distributed under the GNU LGPL license. +! +! Modified: +! +! 27 December 2009 +! +! Author: +! +! Original FORTRAN77 version by Sylvan Elhay, Jaroslav Kautsky. +! FORTRAN90 version by John Burkardt. +! +! Reference: +! +! Sylvan Elhay, Jaroslav Kautsky, +! Algorithm 655: IQPACK, FORTRAN Subroutines for the Weights of +! Interpolatory Quadrature, +! ACM Transactions on Mathematical Software, +! Volume 13, Number 4, December 1987, pages 399-415. +! +! Roger Martin, James Wilkinson, +! The Implicit QL Algorithm, +! Numerische Mathematik, +! Volume 12, Number 5, December 1968, pages 377-383. +! +! Parameters: +! +! Input, integer ( kind = 4 ) N, the order of the matrix. +! +! Input/output, real ( dp ) D(N), the diagonal entries of the matrix. +! On output, the information in D has been overwritten. +! +! Input/output, real ( dp ) E(N), the subdiagonal entries of the +! matrix, in entries E(1) through E(N-1). On output, the information in +! E has been overwritten. +! +! Input/output, real ( dp ) Z(N). On input, a vector. On output, +! the value of Q' * Z, where Q is the matrix that diagonalizes the +! input symmetric tridiagonal matrix. +! + integer ( kind = 4 ) n + + real ( dp ) b + real ( dp ) c + real ( dp ) d(n) + real ( dp ) e(n) + real ( dp ) f + real ( dp ) g + integer ( kind = 4 ) i + integer ( kind = 4 ) ii + integer ( kind = 4 ), parameter :: itn = 30 + integer ( kind = 4 ) j + integer ( kind = 4 ) k + integer ( kind = 4 ) l + integer ( kind = 4 ) m + integer ( kind = 4 ) mml + real ( dp ) p + real ( dp ) prec + real ( dp ) r + real ( dp ) s + real ( dp ) z(n) + +! ************************************************************************* + + prec = epsilon ( prec ) + + if ( n == 1 ) then + return + end if + + e(n) = 0.0D+00 + + do l = 1, n + + j = 0 + + do + + do m = l, n + + if ( m == n ) then + exit + end if + + if ( abs ( e(m) ) <= prec * ( abs ( d(m) ) + abs ( d(m+1) ) ) ) then + exit + end if + + end do + + p = d(l) + + if ( m == l ) then + exit + end if + + if ( itn <= j ) then + write ( std_out, '(a)' ) ' ' + write ( std_out, '(a)' ) 'IMTQLX - Fatal error!' + write ( std_out, '(a)' ) ' Iteration limit exceeded.' + write ( std_out, '(a,i8)' ) ' J = ', j + write ( std_out, '(a,i8)' ) ' L = ', l + write ( std_out, '(a,i8)' ) ' M = ', m + write ( std_out, '(a,i8)' ) ' N = ', n + ABI_ERROR("Aborting now") + end if + + j = j + 1 + g = ( d(l+1) - p ) / ( 2.0D+00 * e(l) ) + r = sqrt ( g * g + 1.0D+00 ) + g = d(m) - p + e(l) / ( g + sign ( r, g ) ) + s = 1.0D+00 + c = 1.0D+00 + p = 0.0D+00 + mml = m - l + + do ii = 1, mml + + i = m - ii + f = s * e(i) + b = c * e(i) + + if ( abs ( g ) <= abs ( f ) ) then + c = g / f + r = sqrt ( c * c + 1.0D+00 ) + e(i+1) = f * r + s = 1.0D+00 / r + c = c * s + else + s = f / g + r = sqrt ( s * s + 1.0D+00 ) + e(i+1) = g * r + c = 1.0D+00 / r + s = s * c + end if + + g = d(i+1) - p + r = ( d(i) - g ) * s + 2.0D+00 * c * b + p = s * r + d(i+1) = g + p + g = c * r - b + f = z(i+1) + z(i+1) = s * z(i) + c * f + z(i) = c * z(i) - s * f + + end do + + d(l) = d(l) - p + e(l) = g + e(m) = 0.0D+00 + + end do + + end do +! +! Sorting. +! + do ii = 2, n + + i = ii - 1 + k = i + p = d(i) + + do j = ii, n + if ( d(j) < p ) then + k = j + p = d(j) + end if + end do + + if ( k /= i ) then + d(k) = d(i) + d(i) = p + p = z(i) + z(i) = z(k) + z(k) = p + end if + + end do + + return +end subroutine imtqlx +!!*** + +!!****f* m_hamiltonian/parchk +!! NAME +!! parchk +!! +!! FUNCTION +!! . +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +subroutine parchk ( gaussian_kind, m, alpha, beta ) + +!*****************************************************************************80 +! +!! PARCHK checks parameters ALPHA and BETA for classical weight functions. +! +! Licensing: +! +! This code is distributed under the GNU LGPL license. +! +! Modified: +! +! 27 December 2009 +! +! Author: +! +! Original FORTRAN77 version by Sylvan Elhay, Jaroslav Kautsky. +! FORTRAN90 version by John Burkardt. +! +! Reference: +! +! Sylvan Elhay, Jaroslav Kautsky, +! Algorithm 655: IQPACK, FORTRAN Subroutines for the Weights of +! Interpolatory Quadrature, +! ACM Transactions on Mathematical Software, +! Volume 13, Number 4, December 1987, pages 399-415. +! +! Parameters: +! +! Input, integer ( kind = 4 ) KIND, the rule. +! 1, Legendre, (a,b) 1.0 +! 2, Chebyshev, (a,b) ((b-x)*(x-a))^(-0.5) +! 3, Gegenbauer, (a,b) ((b-x)*(x-a))^alpha +! 4, Jacobi, (a,b) (b-x)^alpha*(x-a)^beta +! 5, Generalized Laguerre, (a,inf) (x-a)^alpha*exp(-b*(x-a)) +! 6, Generalized Hermite, (-inf,inf) |x-a|^alpha*exp(-b*(x-a)^2) +! 7, Exponential, (a,b) |x-(a+b)/2.0|^alpha +! 8, Rational, (a,inf) (x-a)^alpha*(x+b)^beta +! +! Input, integer ( kind = 4 ) M, the order of the highest moment to +! be calculated. This value is only needed when KIND = 8. +! +! Input, real ( dp ) ALPHA, BETA, the parameters, if required +! by the value of KIND. +! + real ( dp ) alpha + real ( dp ) beta + integer ( kind = 4 ) gaussian_kind + integer ( kind = 4 ) m + real ( dp ) tmp + +! ************************************************************************* + + if ( gaussian_kind <= 0 ) then + ABI_ERROR('PARCHK - Fatal error: KIND <= 0.') + end if +! +! Check ALPHA for Gegenbauer, Jacobi, Laguerre, Hermite, Exponential. +! + if ( 3 <= gaussian_kind .and. alpha <= -1.0D+00 ) then + ABI_ERROR('PARCHK - Fatal error! 3 <= KIND and ALPHA <= -1.') + end if +! +! Check BETA for Jacobi. +! + if ( gaussian_kind == 4 .and. beta <= -1.0D+00 ) then + ABI_ERROR('PARCHK - Fatal error: KIND == 4 and BETA <= -1.0.') + end if +! +! Check ALPHA and BETA for rational. +! + if ( gaussian_kind == 8 ) then + tmp = alpha + beta + m + 1.0D+00 + if ( 0.0D+00 <= tmp .or. tmp <= beta ) then + ABI_ERROR('PARCHK - Fatal error! KIND == 8 but condition on ALPHA and BETA fails.') + end if + end if + + return +end subroutine parchk +!!*** + + +!!****f* m_hamiltonian/r8_gamma_gq +!! NAME +!! r8_gamma_gq +!! +!! FUNCTION +!! . +!! +!! INPUTS +!! +!! OUTPUT +!! +!! +!! +!! SOURCE + +function r8_gamma_gq ( x ) + +!*****************************************************************************80 +! +!! R8_GAMMA evaluates Gamma(X) for a real argument. +! +! Discussion: +! +! This routine calculates the gamma function for a real argument X. +! +! Computation is based on an algorithm outlined in reference 1. +! The program uses rational functions that approximate the gamma +! function to at least 20 significant decimal digits. Coefficients +! for the approximation over the interval (1,2) are unpublished. +! Those for the approximation for 12 <= X are from reference 2. +! +! Licensing: +! +! This code is distributed under the GNU LGPL license. +! +! Modified: +! +! 11 February 2008 +! +! Author: +! +! Original FORTRAN77 version by William Cody, Laura Stoltz. +! FORTRAN90 version by John Burkardt. +! +! Reference: +! +! William Cody, +! An Overview of Software Development for Special Functions, +! in Numerical Analysis Dundee, 1975, +! edited by GA Watson, +! Lecture Notes in Mathematics 506, +! Springer, 1976. +! +! John Hart, Ward Cheney, Charles Lawson, Hans Maehly, +! Charles Mesztenyi, John Rice, Henry Thatcher, +! Christoph Witzgall, +! Computer Approximations, +! Wiley, 1968, +! LC: QA297.C64. +! +! Parameters: +! +! Input, real ( dp ) X, the argument of the function. +! +! Output, real ( dp ) R8_GAMMA, the value of the function. +! + real ( dp ), dimension ( 7 ) :: c = (/ & + -1.910444077728D-03, & + 8.4171387781295D-04, & + -5.952379913043012D-04, & + 7.93650793500350248D-04, & + -2.777777777777681622553D-03, & + 8.333333333333333331554247D-02, & + 5.7083835261D-03 /) + real ( dp ), parameter :: eps = 2.22D-16 + real ( dp ) fact + integer ( kind = 4 ) i + integer ( kind = 4 ) n + real ( dp ), dimension ( 8 ) :: p = (/ & + -1.71618513886549492533811D+00, & + 2.47656508055759199108314D+01, & + -3.79804256470945635097577D+02, & + 6.29331155312818442661052D+02, & + 8.66966202790413211295064D+02, & + -3.14512729688483675254357D+04, & + -3.61444134186911729807069D+04, & + 6.64561438202405440627855D+04 /) + logical parity + real ( dp ), parameter :: pi = 3.1415926535897932384626434D+00 + real ( dp ), dimension ( 8 ) :: q = (/ & + -3.08402300119738975254353D+01, & + 3.15350626979604161529144D+02, & + -1.01515636749021914166146D+03, & + -3.10777167157231109440444D+03, & + 2.25381184209801510330112D+04, & + 4.75584627752788110767815D+03, & + -1.34659959864969306392456D+05, & + -1.15132259675553483497211D+05 /) + real ( dp ) r8_gamma_gq + real ( dp ) res + real ( dp ), parameter :: sqrtpi = 0.9189385332046727417803297D+00 + real ( dp ) sum + real ( dp ) x + real ( dp ), parameter :: xbig = 171.624D+00 + real ( dp ) xden + real ( dp ), parameter :: xinf = 1.0D+30 + real ( dp ), parameter :: xminin = 2.23D-308 + real ( dp ) xnum + real ( dp ) y + real ( dp ) y1 + real ( dp ) ysq + real ( dp ) z + +! ************************************************************************* + + parity = .false. + fact = 1.0D+00 + n = 0 + y = x +! +! Argument is negative. +! + if ( y <= 0.0D+00 ) then + + y = - x + y1 = aint ( y ) + res = y - y1 + + if (abs(res) > tol20) then !if ( res /= 0.0D+00 ) then + + if ( abs(y1 - aint ( y1 * 0.5D+00 ) * 2.0D+00) > tol20 ) then ! if ( y1 /= aint ( y1 * 0.5D+00 ) * 2.0D+00 ) then + parity = .true. + end if + + fact = - pi / sin ( pi * res ) + y = y + 1.0D+00 + + else + + res = xinf + r8_gamma_gq = res + return + + end if + + end if +! +! Argument is positive. +! + if ( y < eps ) then +! +! Argument < EPS. +! + if ( xminin <= y ) then + res = 1.0D+00 / y + else + res = xinf + r8_gamma_gq = res + return + end if + + else if ( y < 12.0D+00 ) then + + y1 = y +! +! 0.0 < argument < 1.0. +! + if ( y < 1.0D+00 ) then + + z = y + y = y + 1.0D+00 +! +! 1.0 < argument < 12.0. +! Reduce argument if necessary. +! + else + + n = int ( y ) - 1 + y = y - real ( n, dp ) + z = y - 1.0D+00 + + end if +! +! Evaluate approximation for 1.0 < argument < 2.0. +! + xnum = 0.0D+00 + xden = 1.0D+00 + do i = 1, 8 + xnum = ( xnum + p(i) ) * z + xden = xden * z + q(i) + end do + + res = xnum / xden + 1.0D+00 +! +! Adjust result for case 0.0 < argument < 1.0. +! + if ( y1 < y ) then + + res = res / y1 +! +! Adjust result for case 2.0 < argument < 12.0. +! + else if ( y < y1 ) then + + do i = 1, n + res = res * y + y = y + 1.0D+00 + end do + + end if + + else +! +! Evaluate for 12.0 <= argument. +! + if ( y <= xbig ) then + + ysq = y * y + sum = c(7) + do i = 1, 6 + sum = sum / ysq + c(i) + end do + sum = sum / y - y + sqrtpi + sum = sum + ( y - 0.5D+00 ) * log ( y ) + res = exp ( sum ) + + else + + res = xinf + r8_gamma_gq = res + return + + end if + + end if +! +! Final adjustments and return. +! + if ( parity ) then + res = - res + end if + + if ( abs(fact - 1.0D+00) > tol20 ) then !if ( fact /= 1.0D+00 ) then + res = fact / res + end if + + r8_gamma_gq = res + + return +end function r8_gamma_gq +!!*** + +!!****f* m_hamiltonian/r8mat_write +!! NAME +!! r8mat_write +!! +!! FUNCTION +!! . +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +subroutine r8mat_write ( output_filename, m, n, table ) + +!*****************************************************************************80 +! +!! R8MAT_WRITE writes an R8MAT file. +! +! Licensing: +! +! This code is distributed under the GNU LGPL license. +! +! Modified: +! +! 31 May 2009 +! +! Author: +! +! John Burkardt +! +! Parameters: +! +! Input, character ( len = * ) OUTPUT_FILENAME, the output file name. +! +! Input, integer ( kind = 4 ) M, the spatial dimension. +! +! Input, integer ( kind = 4 ) N, the number of points. +! +! Input, real ( dp ) TABLE(M,N), the table data. +! + integer ( kind = 4 ) m + integer ( kind = 4 ) n + + integer ( kind = 4 ) j + character ( len = * ) output_filename + character(len=500) :: msg + integer ( kind = 4 ) output_unit + character ( len = 30 ) string + real ( dp ) table(m,n) + +! ************************************************************************* + +! +! Open the file. +! + if (open_file(output_filename, msg, newunit=output_unit, status='replace') /= 0) then + ABI_ERROR(msg) + end if + +! +! Create a format string. +! +! For less precision in the output file, try: +! +! '(', m, 'g', 14, '.', 6, ')' +! + if ( 0 < m .and. 0 < n ) then + + write ( string, '(a1,i8,a1,i8,a1,i8,a1)' ) '(', m, 'g', 24, '.', 16, ')' +! +! Write the data. +! + do j = 1, n + write ( output_unit, string ) table(1:m,j) + end do + + end if +! +! Close the file. +! + close ( unit = output_unit ) + +end subroutine r8mat_write +!!*** + + +!!****f* m_hamiltonian/rule_write +!! NAME +!! rule_write +!! +!! FUNCTION +!! . +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +subroutine rule_write ( order, x, w, r, filename ) + +!*****************************************************************************80 +! +!! RULE_WRITE writes a quadrature rule to a file. +! +! Licensing: +! +! This code is distributed under the GNU LGPL license. +! +! Modified: +! +! 18 February 2010 +! +! Author: +! +! John Burkardt +! +! Parameters: +! +! Input, integer ( kind = 4 ) ORDER, the order of the rule. +! +! Input, real ( dp ) X(ORDER), the abscissas. +! +! Input, real ( dp ) W(ORDER), the weights. +! +! Input, real ( dp ) R(2), defines the region. +! +! Input, character ( len = * ) FILENAME, specifies the output. +! 'filename_w.txt', 'filename_x.txt', 'filename_r.txt' defining weights, +! abscissas, and region. +! + integer ( kind = 4 ) order + + character ( len = * ) filename + character ( len = 255 ) filename_r + character ( len = 255 ) filename_w + character ( len = 255 ) filename_x + real ( dp ) r(2) + real ( dp ) w(order) + real ( dp ) x(order) + +! ************************************************************************* + + filename_w = trim ( filename ) // '_w.txt' + filename_x = trim ( filename ) // '_x.txt' + filename_r = trim ( filename ) // '_r.txt' + + write ( std_out, '(a)' ) ' ' + write ( std_out, '(a)' ) ' Creating quadrature files.' + write ( std_out, '(a)' ) ' ' + write ( std_out, '(a)' ) ' "Root" file name is "' // trim ( filename ) // '".' + write ( std_out, '(a)' ) ' ' + write ( std_out, '(a)' ) ' Weight file will be "' // trim ( filename_w ) // '".' + write ( std_out, '(a)' ) ' Abscissa file will be "' // trim ( filename_x ) // '".' + write ( std_out, '(a)' ) ' Region file will be "' // trim ( filename_r ) // '".' + + call r8mat_write ( filename_w, 1, order, w ) + call r8mat_write ( filename_x, 1, order, x ) + call r8mat_write ( filename_r, 1, 2, r ) + + return +end subroutine rule_write +!!*** + + +!!****f* m_hamiltonian/s_to_i4 +!! NAME +!! s_to_i4 +!! +!! FUNCTION +!! . +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +subroutine s_to_i4 ( s, ival, ierror, length ) + +!*****************************************************************************80 +! +!! S_TO_I4 reads an I4 from a string. +! +! Licensing: +! +! This code is distributed under the GNU LGPL license. +! +! Modified: +! +! 28 June 2000 +! +! Author: +! +! John Burkardt +! +! Parameters: +! +! Input, character ( len = * ) S, a string to be examined. +! +! Output, integer ( kind = 4 ) IVAL, the integer value read from the string. +! If the string is blank, then IVAL will be returned 0. +! +! Output, integer ( kind = 4 ) IERROR, an error flag. +! 0, no error. +! 1, an error occurred. +! +! Output, integer ( kind = 4 ) LENGTH, the number of characters of S +! used to make IVAL. +! + character c + integer ( kind = 4 ) i + integer ( kind = 4 ) ierror + integer ( kind = 4 ) isgn + integer ( kind = 4 ) istate + integer ( kind = 4 ) ival + integer ( kind = 4 ) length + character ( len = * ) s + +! ************************************************************************* + + ierror = 0 + istate = 0 + isgn = 1 + ival = 0 + + do i = 1, len_trim ( s ) + + c = s(i:i) +! +! Haven't read anything. +! + if ( istate == 0 ) then + + if ( c == ' ' ) then + + else if ( c == '-' ) then + istate = 1 + isgn = -1 + else if ( c == '+' ) then + istate = 1 + isgn = + 1 + else if ( lle ( '0', c ) .and. lle ( c, '9' ) ) then + istate = 2 + ival = ichar ( c ) - ichar ( '0' ) + else + ierror = 1 + return + end if +! +! Have read the sign, expecting digits. +! + else if ( istate == 1 ) then + + if ( c == ' ' ) then + + else if ( lle ( '0', c ) .and. lle ( c, '9' ) ) then + istate = 2 + ival = ichar ( c ) - ichar ( '0' ) + else + ierror = 1 + return + end if +! +! Have read at least one digit, expecting more. +! + else if ( istate == 2 ) then + + if ( lle ( '0', c ) .and. lle ( c, '9' ) ) then + ival = 10 * ival + ichar ( c ) - ichar ( '0' ) + else + ival = isgn * ival + length = i - 1 + return + end if + + end if + + end do +! +! If we read all the characters in the string, see if we're OK. +! + if ( istate == 2 ) then + ival = isgn * ival + length = len_trim ( s ) + else + ierror = 1 + length = 0 + end if + + return +end subroutine s_to_i4 +!!*** + +!!****f* m_hamiltonian/s_to_r8 +!! NAME +!! s_to_r8 +!! +!! FUNCTION +!! . +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +subroutine s_to_r8 ( s, dval, ierror, length ) + +!*****************************************************************************80 +! +!! S_TO_R8 reads an R8 from a string. +! +! Discussion: +! +! The routine will read as many characters as possible until it reaches +! the end of the string, or encounters a character which cannot be +! part of the number. +! +! Legal input is: +! +! 1 blanks, +! 2 '+' or '-' sign, +! 2.5 blanks +! 3 integer part, +! 4 decimal point, +! 5 fraction part, +! 6 'E' or 'e' or 'D' or 'd', exponent marker, +! 7 exponent sign, +! 8 exponent integer part, +! 9 exponent decimal point, +! 10 exponent fraction part, +! 11 blanks, +! 12 final comma or semicolon, +! +! with most quantities optional. +! +! Example: +! +! S DVAL +! +! '1' 1.0 +! ' 1 ' 1.0 +! '1A' 1.0 +! '12,34,56' 12.0 +! ' 34 7' 34.0 +! '-1E2ABCD' -100.0 +! '-1X2ABCD' -1.0 +! ' 2E-1' 0.2 +! '23.45' 23.45 +! '-4.2E+2' -420.0 +! '17d2' 1700.0 +! '-14e-2' -0.14 +! 'e2' 100.0 +! '-12.73e-9.23' -12.73 * 10.0**(-9.23) +! +! Licensing: +! +! This code is distributed under the GNU LGPL license. +! +! Modified: +! +! 07 September 2004 +! +! Author: +! +! John Burkardt +! +! Parameters: +! +! Input, character ( len = * ) S, the string containing the +! data to be read. Reading will begin at position 1 and +! terminate at the end of the string, or when no more +! characters can be read to form a legal real. Blanks, +! commas, or other nonnumeric data will, in particular, +! cause the conversion to halt. +! +! Output, real ( dp ) DVAL, the value read from the string. +! +! Output, integer ( kind = 4 ) IERROR, error flag. +! 0, no errors occurred. +! 1, 2, 6 or 7, the input number was garbled. The +! value of IERROR is the last type of input successfully +! read. For instance, 1 means initial blanks, 2 means +! a plus or minus sign, and so on. +! +! Output, integer ( kind = 4 ) LENGTH, the number of characters read +! to form the number, including any terminating +! characters such as a trailing comma or blanks. +! + character c + real ( dp ) dval + integer ( kind = 4 ) ierror + integer ( kind = 4 ) ihave + integer ( kind = 4 ) isgn + integer ( kind = 4 ) iterm + integer ( kind = 4 ) jbot + integer ( kind = 4 ) jsgn + integer ( kind = 4 ) jtop + integer ( kind = 4 ) length + integer ( kind = 4 ) nchar + integer ( kind = 4 ) ndig + real ( dp ) rbot + real ( dp ) rexp + real ( dp ) rtop + character ( len = * ) s + +! ************************************************************************* + + nchar = len_trim ( s ) + + ierror = 0 + dval = 0.0D+00 + length = -1 + isgn = 1 + rtop = 0 + rbot = 1 + jsgn = 1 + jtop = 0 + jbot = 1 + ihave = 1 + iterm = 0 + + do + + length = length + 1 + + if ( nchar < length+1 ) then + exit + end if + + c = s(length+1:length+1) +! +! Blank character. +! + if ( c == ' ' ) then + + if ( ihave == 2 ) then + + else if ( ihave == 6 .or. ihave == 7 ) then + iterm = 1 + else if ( 1 < ihave ) then + ihave = 11 + end if +! +! Comma. +! + else if ( c == ',' .or. c == ';' ) then + + if ( ihave /= 1 ) then + iterm = 1 + ihave = 12 + length = length + 1 + end if +! +! Minus sign. +! + else if ( c == '-' ) then + + if ( ihave == 1 ) then + ihave = 2 + isgn = -1 + else if ( ihave == 6 ) then + ihave = 7 + jsgn = -1 + else + iterm = 1 + end if +! +! Plus sign. +! + else if ( c == '+' ) then + + if ( ihave == 1 ) then + ihave = 2 + else if ( ihave == 6 ) then + ihave = 7 + else + iterm = 1 + end if +! +! Decimal point. +! + else if ( c == '.' ) then + + if ( ihave < 4 ) then + ihave = 4 + else if ( 6 <= ihave .and. ihave <= 8 ) then + ihave = 9 + else + iterm = 1 + end if +! +! Scientific notation exponent marker. +! + else if ( ch_eqi ( c, 'E' ) .or. ch_eqi ( c, 'D' ) ) then + + if ( ihave < 6 ) then + ihave = 6 + else + iterm = 1 + end if +! +! Digit. +! + else if ( ihave < 11 .and. lle ( '0', c ) .and. lle ( c, '9' ) ) then + + if ( ihave <= 2 ) then + ihave = 3 + else if ( ihave == 4 ) then + ihave = 5 + else if ( ihave == 6 .or. ihave == 7 ) then + ihave = 8 + else if ( ihave == 9 ) then + ihave = 10 + end if + + call ch_to_digit ( c, ndig ) + + if ( ihave == 3 ) then + rtop = 10.0D+00 * rtop + real ( ndig, dp ) + else if ( ihave == 5 ) then + rtop = 10.0D+00 * rtop + real ( ndig, dp ) + rbot = 10.0D+00 * rbot + else if ( ihave == 8 ) then + jtop = 10 * jtop + ndig + else if ( ihave == 10 ) then + jtop = 10 * jtop + ndig + jbot = 10 * jbot + end if +! +! Anything else is regarded as a terminator. +! + else + iterm = 1 + end if +! +! If we haven't seen a terminator, and we haven't examined the +! entire string, go get the next character. +! + if ( iterm == 1 ) then + exit + end if + + end do +! +! If we haven't seen a terminator, and we have examined the +! entire string, then we're done, and LENGTH is equal to NCHAR. +! + if ( iterm /= 1 .and. length+1 == nchar ) then + length = nchar + end if +! +! Number seems to have terminated. Have we got a legal number? +! Not if we terminated in states 1, 2, 6 or 7! +! + if ( ihave == 1 .or. ihave == 2 .or. ihave == 6 .or. ihave == 7 ) then + ierror = ihave + write ( std_out, '(a)' ) ' ' + write ( std_out, '(a)' ) 'S_TO_R8 - Serious error!' + write ( std_out, '(a)' ) ' Illegal or nonnumeric input:' + write ( std_out, '(a)' ) ' ' // trim ( s ) + return + end if +! +! Number seems OK. Form it. +! + if ( jtop == 0 ) then + rexp = 1.0D+00 + else + if ( jbot == 1 ) then + rexp = 10.0D+00 ** ( jsgn * jtop ) + else + rexp = 10.0D+00 ** ( real ( jsgn * jtop, dp ) & + / real ( jbot, dp ) ) + end if + end if + + dval = real ( isgn, dp ) * rexp * rtop / rbot + + return +end subroutine s_to_r8 +!!*** + +!!****f* m_hamiltonian/scqf +!! NAME +!! scqf +!! +!! FUNCTION +!! . +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +subroutine scqf ( nt, t, mlt, wts, nwts, ndx, swts, st, gaussian_kind, alpha, beta, a, & + b ) + +!*****************************************************************************80 +! +!! SCQF scales a quadrature formula to a nonstandard interval. +! +! Discussion: +! +! The arrays WTS and SWTS may coincide. +! +! The arrays T and ST may coincide. +! +! Licensing: +! +! This code is distributed under the GNU LGPL license. +! +! Modified: +! +! 27 December 2009 +! +! Author: +! +! Original FORTRAN77 version by Sylvan Elhay, Jaroslav Kautsky. +! FORTRAN90 version by John Burkardt. +! +! Reference: +! +! Sylvan Elhay, Jaroslav Kautsky, +! Algorithm 655: IQPACK, FORTRAN Subroutines for the Weights of +! Interpolatory Quadrature, +! ACM Transactions on Mathematical Software, +! Volume 13, Number 4, December 1987, pages 399-415. +! +! Parameters: +! +! Input, integer ( kind = 4 ) NT, the number of knots. +! +! Input, real ( dp ) T(NT), the original knots. +! +! Input, integer ( kind = 4 ) MLT(NT), the multiplicity of the knots. +! +! Input, real ( dp ) WTS(NWTS), the weights. +! +! Input, integer ( kind = 4 ) NWTS, the number of weights. +! +! Input, integer ( kind = 4 ) NDX(NT), used to index the array WTS. +! For more details see the comments in CAWIQ. +! +! Output, real ( dp ) SWTS(NWTS), the scaled weights. +! +! Output, real ( dp ) ST(NT), the scaled knots. +! +! Input, integer ( kind = 4 ) KIND, the rule. +! 1, Legendre, (a,b) 1.0 +! 2, Chebyshev Type 1, (a,b) ((b-x)*(x-a))^(-0.5) +! 3, Gegenbauer, (a,b) ((b-x)*(x-a))^alpha +! 4, Jacobi, (a,b) (b-x)^alpha*(x-a)^beta +! 5, Generalized Laguerre, (a,+oo) (x-a)^alpha*exp(-b*(x-a)) +! 6, Generalized Hermite, (-oo,+oo) |x-a|^alpha*exp(-b*(x-a)^2) +! 7, Exponential, (a,b) |x-(a+b)/2.0|^alpha +! 8, Rational, (a,+oo) (x-a)^alpha*(x+b)^beta +! 9, Chebyshev Type 2, (a,b) ((b-x)*(x-a))^(+0.5) +! +! Input, real ( dp ) ALPHA, the value of Alpha, if needed. +! +! Input, real ( dp ) BETA, the value of Beta, if needed. +! +! Input, real ( dp ) A, B, the interval endpoints. +! + integer ( kind = 4 ) nt + integer ( kind = 4 ) nwts + + real ( dp ) a + real ( dp ) al + real ( dp ) alpha + real ( dp ) b + real ( dp ) be + real ( dp ) beta + integer ( kind = 4 ) i + integer ( kind = 4 ) k + integer ( kind = 4 ) gaussian_kind + integer ( kind = 4 ) l + integer ( kind = 4 ) mlt(nt) + integer ( kind = 4 ) ndx(nt) + real ( dp ) p + real ( dp ) shft + real ( dp ) slp + real ( dp ) st(nt) + real ( dp ) swts(nwts) + real ( dp ) t(nt) + real ( dp ) temp + real ( dp ) tmp + real ( dp ) wts(nwts) + +! ************************************************************************* + + temp = epsilon ( temp ) + + call parchk ( gaussian_kind, 1, alpha, beta ) + + if ( gaussian_kind == 1 ) then + + al = 0.0D+00 + be = 0.0D+00 + + if ( abs ( b - a ) <= temp ) then + ABI_ERROR('SCQF - Fatal error! |B - A| too small.') + end if + + shft = ( a + b ) / 2.0D+00 + slp = ( b - a ) / 2.0D+00 + + else if ( gaussian_kind == 2 ) then + + al = -0.5D+00 + be = -0.5D+00 + + if ( abs ( b - a ) <= temp ) then + ABI_ERROR('SCQF - Fatal error! |B - A| too small.') + end if + + shft = ( a + b ) / 2.0D+00 + slp = ( b - a ) / 2.0D+00 + + else if ( gaussian_kind == 3 ) then + + al = alpha + be = alpha + + if ( abs ( b - a ) <= temp ) then + ABI_ERROR('SCQF - Fatal error! |B - A| too small.') + end if + + shft = ( a + b ) / 2.0D+00 + slp = ( b - a ) / 2.0D+00 + + else if ( gaussian_kind == 4 ) then + + al = alpha + be = beta + + if ( abs ( b - a ) <= temp ) then + ABI_ERROR("SCQF - Fatal error! |B - A| too small.") + end if + + shft = ( a + b ) / 2.0D+00 + slp = ( b - a ) / 2.0D+00 + + else if ( gaussian_kind == 5 ) then + + if ( b <= 0.0D+00 ) then + ABI_ERROR('SCQF - Fatal error! B <= 0') + end if + + shft = a + slp = 1.0D+00 / b + al = alpha + be = 0.0D+00 + + else if ( gaussian_kind == 6 ) then + + if ( b <= 0.0D+00 ) then + ABI_ERROR('SCQF - Fatal error! B <= 0.') + end if + + shft = a + slp = 1.0D+00 / sqrt ( b ) + al = alpha + be = 0.0D+00 + + else if ( gaussian_kind == 7 ) then + + al = alpha + be = 0.0D+00 + + if ( abs ( b - a ) <= temp ) then + ABI_ERROR('|B - A| too small.') + end if + + shft = ( a + b ) / 2.0D+00 + slp = ( b - a ) / 2.0D+00 + + else if ( gaussian_kind == 8 ) then + + if ( a + b <= 0.0D+00 ) then + ABI_ERROR(' A + B <= 0.') + end if + + shft = a + slp = a + b + al = alpha + be = beta + + else if ( gaussian_kind == 9 ) then + + al = 0.5D+00 + be = 0.5D+00 + + if ( abs ( b - a ) <= temp ) then + ABI_ERROR('|B - A| too small.') + end if + + shft = ( a + b ) / 2.0D+00 + slp = ( b - a ) / 2.0D+00 + + end if + + p = slp**( al + be + 1.0D+00 ) + + do k = 1, nt + + st(k) = shft + slp * t(k) + l = abs ( ndx(k) ) + + if ( l /= 0 ) then + tmp = p + do i = l, l + mlt(k) - 1 + swts(i) = wts(i) * tmp + tmp = tmp * slp + end do + end if + + end do + + return +end subroutine scqf +!!*** + + +!!****f* m_hamiltonian/sgqf +!! NAME +!! sgqf +!! +!! FUNCTION +!! . +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +subroutine sgqf ( nt, aj, bj, zemu, t, wts ) + +!*****************************************************************************80 +! +!! SGQF computes knots and weights of a Gauss Quadrature formula. +! +! Discussion: +! +! This routine computes all the knots and weights of a Gauss quadrature +! formula with simple knots from the Jacobi matrix and the zero-th +! moment of the weight function, using the Golub-Welsch technique. +! +! Licensing: +! +! This code is distributed under the GNU LGPL license. +! +! Modified: +! +! 04 January 2010 +! +! Author: +! +! Original FORTRAN77 version by Sylvan Elhay, Jaroslav Kautsky. +! FORTRAN90 version by John Burkardt. +! +! Reference: +! +! Sylvan Elhay, Jaroslav Kautsky, +! Algorithm 655: IQPACK, FORTRAN Subroutines for the Weights of +! Interpolatory Quadrature, +! ACM Transactions on Mathematical Software, +! Volume 13, Number 4, December 1987, pages 399-415. +! +! Parameters: +! +! Input, integer ( kind = 4 ) NT, the number of knots. +! +! Input, real ( dp ) AJ(NT), the diagonal of the Jacobi matrix. +! +! Input/output, real ( dp ) BJ(NT), the subdiagonal of the Jacobi +! matrix, in entries 1 through NT-1. On output, BJ has been overwritten. +! +! Input, real ( dp ) ZEMU, the zero-th moment of the weight function. +! +! Output, real ( dp ) T(NT), the knots. +! +! Output, real ( dp ) WTS(NT), the weights. +! + integer ( kind = 4 ) nt + + real ( dp ) aj(nt) + real ( dp ) bj(nt) + real ( dp ) t(nt) + real ( dp ) wts(nt) + real ( dp ) zemu + +! ************************************************************************* + +! +! Exit if the zero-th moment is not positive. +! + if ( zemu <= 0.0D+00 ) then + ABI_ERROR('SGQF - Fatal error! ZEMU <= 0.') + end if +! +! Set up vectors for IMTQLX. +! + t(1:nt) = aj(1:nt) + + wts(1) = sqrt ( zemu ) + wts(2:nt) = 0.0D+00 +! +! Diagonalize the Jacobi matrix. +! + call imtqlx ( nt, t, bj, wts ) + + wts(1:nt) = wts(1:nt)**2 + + return +end subroutine sgqf +!!*** + +end module m_gaussian_quadrature +!!*** diff --git a/GX-PAW/common/src/28_numeric_noabirule/m_gaussian_quadrature.o b/GX-PAW/common/src/28_numeric_noabirule/m_gaussian_quadrature.o new file mode 100644 index 00000000..7174e12a Binary files /dev/null and b/GX-PAW/common/src/28_numeric_noabirule/m_gaussian_quadrature.o differ diff --git a/GX-PAW/common/src/28_numeric_noabirule/m_hide_blas.F90 b/GX-PAW/common/src/28_numeric_noabirule/m_hide_blas.F90 new file mode 100644 index 00000000..417f4593 --- /dev/null +++ b/GX-PAW/common/src/28_numeric_noabirule/m_hide_blas.F90 @@ -0,0 +1,1245 @@ +!!****m* ABINIT/m_hide_blas +!! NAME +!! m_hide_blas +!! +!! FUNCTION +!! This module defines interfaces for overloading BLAS routines. +!! whose goal is twofold. On one hand, using generic interfaces renders +!! the code more readable, especially when the routine can be compiled with +!! different precision type (single-precision or double precision as done for example in the GW code) +!! On the other hand, the generic interfaces defined here introduce a programming +!! layer that can be exploited for interfacing non-standard libraries such as for +!! example CUBLAS routines for GPU computations. +!! +!! COPYRIGHT +!! Copyright (C) 1992-2024 ABINIT group (MG) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! For the initials of contributors, see ~abinit/doc/developers/contributors.txt . +!! +!! NOTES +!! +!! The convention about names of interfaced routine is: x, +!! where is usually equal to the name of the standard routine +!! without the first character specifying the type and kind. +!! The full list of names is reported below. +!! BLAS procedures interfaced in this module are marked with an asterisk. +!! A complete list of possible overloaded interfaces is provided as guide for future additions. +!! +!! ================ +!! ==== BLAS 1 ==== +!! ================ +!! FUNCTION idamax isamax icamax izamax ---> XIAMAX(n,dx,incx) +!! * FUNCTION snrm2 dnrm2 scnrm2 dznmr2 ---> XNRM2(n,x,incx) +!! FUNCTION sasum dasum scasum dzasum ---> XASUM(n,x,incx) +!! * FUNCTION cdotu zdotu ---> XDOTU(n,x,incx,y,incy) +!! * FUNCTION cdotc zdotc ---> XDOTC(n,x,incx,y,incy) +!! FUNCTION sdot ddot ---> XDOT(n,x,incx,y,incy) +!! FUNCTION sdsdot sdot ---> XDSDOT(n,x,incx,y,incy) +!! SUBROUTINE saxpy daxpy caxpy zaxpy ---> XAXPY(n,ca,cx,incx,cy,incy) +!! * SUBROUTINE scopy dcopy ccopy zcopy ---> XCOPY(n,cx,incx,cy,incy) +!! SUBROUTINE srotg drotg crotg zrotg ---> XROTG(a,b,c,s) +!! SUBROUTINE srot drot csrot zdrot ---> XROT(n,x,incx,y,incy,c,s) +!! * SUBROUTINE sscal dscal cscal zscal +!! csscal zdscal ---> XSCAL(n,a,x,incx) +!! SUBROUTINE sswap dswap cswap zswap ---> XSWAP(n,x,incx,y,incy) +!! +!! ================ +!! ==== BLAS 2 ==== +!! ================ +!! SUBROUTINE sgbmv dgbmv cgbmv zgbmv ---> XGBMV(trans,m,kl,ku,n,alpha,A,lda,X,incx,beta,Y,incy) +!! * SUBROUTINE sgemv dgemv cgemv zgemv ---> XGEMV(trans,m,n,alpha,A,lda,X,incx,beta,Y,incy) +!! * SUBROUTINE cgerc zgerc ---> XGERC(m,n,alpha,x,incx,y,incy,A,lda) +!! SUBROUTINE cgeru zgeru ---> XGERU(m,n,alpha,x,incx,y,incy,A,lda) +!! SUBROUTINE chbmv zhbmv ---> XHBMV(uplo,n,k,alpha,A,lda,X,incx,beta,Y,incy) +!! SUBROUTINE chemv zhemv ---> XHEMV(uplo,n,alpha,A,lda,X,incx,beta,Y,incy) +!! * SUBROUTINE cher zher ---> XHER(uplo,n,alpha,x,incx,A,lda) +!! SUBROUTINE cher2 zher2 ---> XHER2(uplo,n,alpha,x,incx,y,incy,A,lda) +!! SUBROUTINE chpr zhpr ---> XHPR(uplo,n,alpha,x,incx,AP) +!! SUBROUTINE chpr2 zhpr2 ---> XHPR2(uplo,n,alpha,x,incx,y,incy,AP) +!! SUBROUTINE chpmv zhpmv ---> XHPMV(uplo,n,alpha,AP,X,incx,beta,Y,incy) +!! SUBROUTINE stbmv dtbmv ctbmv ztbmv ---> XTBMV(uplo,trans,diag,n,k,A,lda,X,incx) +!! SUBROUTINE stpmv dtpmv ctpmv ztpmv ---> XTPMV(uplo,trans,diag,n,AP,X,incx) +!! SUBROUTINE strmv dtrmv ctrmv ztrmv ---> XTRMV(uplo,trans,diag,n,A,lda,X,incx) +!! SUBROUTINE ssymv dsymv ---> XSYMV(uplo,n,alpha,A,lda,X,incx,beta,Y,incy) +!! SUBROUTINE ssbmv dsbmv ---> XSBMV(uplo,n,k,alpha,A,lda,X,incx,beta,Y,incy) +!! SUBROUTINE sspmv dspmv ---> XSPMV(uplo,n,alpha,AP,X,incx,beta,Y,incy) +!! SUBROUTINE stbsv dtbsv ctbsv ztbsv ---> XTBSV(uplo,trans,diag,n,k,A,lda,X,incx) +!! SUBROUTINE stpsv dtpsv ctpsv ztpsv ---> XTPSV(uplo,trans,diag,n,AP,X,incx) +!! SUBROUTINE strsv dtrsv ctrsv ztrsv ---> XTRSV(uplo,trans,diag,n,A,lda,X,incx) +!! SUBROUTINE sger dger ---> XGER(m,n,alpha,x,incx,y,incy,A,lda) +!! SUBROUTINE sspr dspr ---> XSPR(uplo,n,alpha,x,incx,AP) +!! SUBROUTINE sspr2 dspr2 ---> XSPR2(uplo,n,alpha,x,incx,y,incy,AP) +!! SUBROUTINE ssyr dsyr ---> XSYR(uplo,n,alpha,x,incx,A,lda) +!! SUBROUTINE ssyr2 dsyr2 ---> XSYR2(uplo,n,alpha,x,incx,y,incy,A,lda) +!! +!! ================ +!! ==== BLAS 3 ==== +!! ================ +!! * SUBROUTINE sgemm dgemm cgemm zgemm ---> XGEMM(transA,transB,m,n,k,alpha,A,lda,B,ldb,beta,C,ldc) +!! SUBROUTINE chemm zhemm ---> XHEMM(side,uplo,m,n,alpha,A,lda,B,ldb,beta,C,ldc) +!! SUBROUTINE cher2k zher2k ---> XHER2K(uplo,trans,n,k,alpha,A,lda,B,ldb,beta,C,ldc) +!! * SUBROUTINE cherk zherk ---> XHERK(uplo,trans,n,k,alpha,A,lda,beta,C,ldc) +!! SUBROUTINE ssymm dsymm csymm zsymm ---> XSYMM(side,uplo,m,n,alpha,A,lda,B,ldb,beta,C,ldc) +!! SUBROUTINE ssyr2k dsyr2k csyr2k zsyr2k ---> XSYR2K(uplo,trans,n,k,alpha,A,lda,B,ldb,beta,C,ldc) +!! SUBROUTINE ssyrk dsyrk csyrk zsyrk ---> XSYRK(uplo,trans,n,k,alpha,A,lda,beta,C,ldc) +!! SUBROUTINE strmm dtrmm ctrmm ztrmm ---> XTRMM(side,uplo,transa,diag,m,n,alpha,A,lda,B,ldb) +!! SUBROUTINE strsm dtrsm ctrsm ztrsm ---> XTRSM(side,uplo,transa,diag,m,n,alpha,A,lda,B,ldb) +!!------------------------------------------------------------------------------- +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" + +module m_hide_blas + + use defs_basis + use m_abicore + use m_errors + + implicit none + + private + +!BLAS1 + public :: xnrm2 + public :: xscal + public :: xdotu + public :: xdotc + public :: xcopy + +!BLAS2 + public :: xgemv + public :: xgerc + public :: xher + +!BLAS3 + public :: xgemm + public :: xherk + +! Helper functions + public :: blas_cholesky_ortho ! Cholesky orthogonalization. + + public :: sqmat_itranspose ! In-place transposition of a square matrix. + public :: sqmat_otranspose ! out-of-place transposition of a square matrix. + + public :: sqmat_iconjgtrans ! in-place conjugate transpose of a square matrix. + public :: sqmat_oconjgtrans ! out-of-place conjugate transpose of a square matrix. + +!---------------------------------------------------------------------- + +interface xnrm2 + ! + function snrm2 ( n, x, incx ) + use defs_basis + real(sp) :: snrm2 + integer,intent(in) :: incx, n + real(sp),intent(in) :: x( * ) + end function snrm2 + ! + function dnrm2 ( n, x, incx ) + use defs_basis + real(dp) :: dnrm2 + integer,intent(in) :: incx, n + real(dp),intent(in) :: x( * ) + end function dnrm2 + ! + function scnrm2( n, x, incx ) + use defs_basis + real(sp) :: scnrm2 + integer,intent(in) :: incx, n + complex(spc),intent(in) :: x( * ) + end function scnrm2 + ! + function dznrm2( n, x, incx ) + use defs_basis + real(dp) :: dznrm2 + integer,intent(in) :: incx, n + complex(dpc),intent(in) :: x( * ) + end function dznrm2 + ! +end interface xnrm2 + +!------------------------------------------------------------------------------- + +interface xscal + ! + subroutine sscal(n,sa,sx,incx) + use defs_basis + implicit none + integer :: incx + integer :: n + real(sp) :: sa + real(sp) :: sx(*) + end subroutine sscal + ! + subroutine dscal(n,da,dx,incx) + use defs_basis + implicit none + integer :: incx + integer :: n + real(dp):: da + real(dp):: dx(*) + end subroutine dscal + ! + subroutine cscal(n,ca,cx,incx) + use defs_basis + implicit none + integer :: incx + integer :: n + complex(spc) :: ca + complex(spc) :: cx(*) + end subroutine cscal + ! + subroutine zscal(n,za,zx,incx) + use defs_basis + implicit none + integer :: incx + integer :: n + complex(dpc) :: za + complex(dpc) :: zx(*) + end subroutine zscal + ! + subroutine csscal(n,sa,cx,incx) + use defs_basis + implicit none + integer :: incx + integer :: n + real(sp) :: sa + complex(spc) :: cx(*) + end subroutine csscal + ! + subroutine zdscal(n,da,zx,incx) + use defs_basis + implicit none + integer :: incx + integer :: n + real(dp) :: da + complex(dpc) :: zx(*) + end subroutine zdscal + ! +end interface xscal + +!------------------------------------------------------------------------------- + +interface xdotu + ! +#ifdef HAVE_LINALG_ZDOTU_BUG + module procedure cdotu + module procedure zdotu +#else + function cdotu(n,cx,incx,cy,incy) + use defs_basis + complex(spc) :: cdotu + complex(spc),intent(in) :: cx(*),cy(*) + integer,intent(in) :: incx,incy,n + end function cdotu + ! + function zdotu(n,zx,incx,zy,incy) + use defs_basis + complex(dpc) :: zdotu + complex(dpc),intent(in) :: zx(*),zy(*) + integer,intent(in) :: incx,incy,n + end function zdotu +#endif + ! +end interface xdotu + +!------------------------------------------------------------------------------- + + +! CDOTC, CDOTU, ZDOTC, and ZDOTU are problematic if Mac OS X's Vec lib is used. +! See http://developer.apple.com/hardwaredrivers/ve/errata.html. +! If needed, we replace them with plain Fortran code. + +interface xdotc + ! +#ifdef HAVE_LINALG_ZDOTC_BUG + module procedure cdotc + module procedure zdotc +#else + function cdotc(n,cx,incx,cy,incy) + use defs_basis + complex(spc) :: cdotc + complex(spc),intent(in) :: cx(*),cy(*) + integer,intent(in) :: incx,incy,n + end function cdotc + ! + function zdotc(n,zx,incx,zy,incy) + use defs_basis + complex(dpc) :: zdotc + complex(dpc),intent(in) :: zx(*),zy(*) + integer,intent(in) :: incx,incy,n + end function zdotc +#endif + ! +end interface xdotc + +!------------------------------------------------------------------------------- + +interface xcopy + !module procedure ABI_xcopy + ! + subroutine scopy(n,sx,incx,sy,incy) + use defs_basis + implicit none + integer,intent(in) :: incx + integer,intent(in) :: incy + integer,intent(in) :: n + real(sp),intent(in) :: sx(*) + real(sp),intent(inout) :: sy(*) + end subroutine scopy + ! + subroutine dcopy(n,dx,incx,dy,incy) + use defs_basis + implicit none + integer,intent(in) :: incx + integer,intent(in) :: incy + integer,intent(in) :: n + real(dp),intent(in) :: dx(*) + real(dp),intent(inout) :: dy(*) + end subroutine dcopy + ! + subroutine ccopy(n,cx,incx,cy,incy) + use defs_basis + implicit none + integer,intent(in) :: incx + integer,intent(in) :: incy + integer,intent(in) :: n + complex(spc),intent(in) :: cx(*) + complex(spc),intent(inout) :: cy(*) + end subroutine ccopy + ! + subroutine zcopy(n,cx,incx,cy,incy) + use defs_basis + implicit none + integer,intent(in) :: incx + integer,intent(in) :: incy + integer,intent(in) :: n + complex(dpc),intent(in) :: cx(*) + complex(dpc),intent(inout) :: cy(*) + end subroutine zcopy + ! +end interface xcopy + +!------------------------------------------------------------------------------- + +interface xgemv + ! + subroutine sgemv ( trans, m, n, alpha, a, lda, x, incx, beta, y, incy ) + use defs_basis + real(sp),intent(in) :: alpha, beta + integer,intent(in) :: incx, incy, lda, m, n + character(len=1),intent(in) :: trans + real(sp),intent(in) :: a( lda, * ), x( * ) + real(sp),intent(inout) :: y( * ) + end subroutine sgemv + ! + subroutine dgemv ( trans, m, n, alpha, a, lda, x, incx, beta, y, incy ) + use defs_basis + real(dp),intent(in) :: alpha, beta + integer,intent(in) :: incx, incy, lda, m, n + character(len=1),intent(in) :: trans + real(dp),intent(in) :: a( lda, * ), x( * ) + real(dp),intent(inout) :: y( * ) + end subroutine dgemv + ! + subroutine cgemv ( trans, m, n, alpha, a, lda, x, incx, beta, y, incy ) + use defs_basis + complex(spc),intent(in) :: alpha, beta + integer,intent(in) :: incx, incy, lda, m, n + character(len=1),intent(in) :: trans + complex(spc),intent(in) :: a( lda, * ), x( * ) + complex(spc),intent(inout) :: y( * ) + end subroutine cgemv + ! + subroutine zgemv ( trans, m, n, alpha, a, lda, x, incx, beta, y, incy ) + use defs_basis + complex(dpc),intent(in) :: alpha, beta + integer,intent(in) :: incx, incy, lda, m, n + character(len=1),intent(in) :: trans + complex(dpc),intent(in) :: a( lda, * ), x( * ) + complex(dpc),intent(inout) :: y( * ) + end subroutine zgemv + ! +end interface xgemv + +!------------------------------------------------------------------------------- + +interface xgerc + ! + subroutine cgerc ( m, n, alpha, x, incx, y, incy, a, lda ) + use defs_basis + complex(spc),intent(in) :: alpha + integer,intent(in) :: incx, incy, lda, m, n + complex(spc),intent(inout) :: a( lda, * ) + complex(spc),intent(in) :: x( * ), y( * ) + end subroutine cgerc + ! + subroutine zgerc ( m, n, alpha, x, incx, y, incy, a, lda ) + use defs_basis + complex(dpc),intent(in) :: alpha + integer,intent(in) :: incx, incy, lda, m, n + complex(dpc),intent(inout) :: a( lda, * ) + complex(dpc),intent(in) :: x( * ), y( * ) + end subroutine zgerc + ! +end interface xgerc + +!------------------------------------------------------------------------------- + +interface xher + ! + subroutine cher ( uplo, n, alpha, x, incx, a, lda ) + use defs_basis + character(len=1),intent(in) :: uplo + real(spc),intent(in) :: alpha + integer,intent(in) :: incx, lda, n + complex(spc),intent(inout) :: a( lda, * ) + complex(spc),intent(in) :: x( * ) + end subroutine cher + ! + subroutine zher ( uplo, n, alpha, x, incx, a, lda ) + use defs_basis + character(len=1),intent(in) :: uplo + real(dpc),intent(in) :: alpha + integer,intent(in) :: incx, lda, n + complex(dpc),intent(inout) :: a( lda, * ) + complex(dpc),intent(in) :: x( * ) + end subroutine zher + ! +end interface xher + +!------------------------------------------------------------------------------- + +interface xgemm + ! + subroutine sgemm ( transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc ) + use defs_basis + character(len=1),intent(in) :: transa, transb + integer,intent(in) :: m, n, k, lda, ldb, ldc + real(sp),intent(in) :: alpha, beta + real(sp),intent(in) :: a( lda, * ), b( ldb, * ) + real(sp),intent(inout) :: c( ldc, * ) + end subroutine sgemm + ! + subroutine dgemm ( transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc ) + use defs_basis + character(len=1),intent(in) :: transa, transb + integer,intent(in) :: m, n, k, lda, ldb, ldc + real(dp),intent(in) :: alpha, beta + real(dp),intent(in) :: a( lda, * ), b( ldb, * ) + real(dp),intent(inout) :: c( ldc, * ) + end subroutine dgemm + ! + subroutine cgemm ( transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc ) + use defs_basis + character(len=1),intent(in) :: transa, transb + integer,intent(in) :: m, n, k, lda, ldb, ldc + complex(spc),intent(in) :: alpha, beta + complex(spc),intent(in) :: a( lda, * ), b( ldb, * ) + complex(spc),intent(inout) :: c( ldc, * ) + end subroutine cgemm + ! + subroutine zgemm ( transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc ) + use defs_basis + character(len=1),intent(in) :: transa, transb + integer,intent(in) :: m, n, k, lda, ldb, ldc + complex(dpc),intent(in) :: alpha, beta + complex(dpc),intent(in) :: a( lda, * ), b( ldb, * ) + complex(dpc),intent(inout) :: c( ldc, * ) + end subroutine zgemm + ! +end interface xgemm + +interface xherk + ! + subroutine cherk( uplo, trans, n, k, alpha, a, lda, beta, c, ldc ) + use defs_basis + character(len=1),intent(in) :: uplo + character(len=1),intent(in) :: trans + integer,intent(in) :: n,k,lda,ldc + real(sp),intent(in) :: alpha + complex(spc),intent(in) :: a( lda, * ) + real(sp),intent(in) :: beta + complex(spc),intent(inout) :: c( ldc, * ) + end subroutine cherk + ! + subroutine zherk( uplo, trans, n, k, alpha, a, lda, beta, c, ldc ) + use defs_basis + character(len=1),intent(in) :: uplo + character(len=1),intent(in) :: trans + integer,intent(in) :: n,k,lda,ldc + real(dp),intent(in) :: alpha + complex(dpc),intent(in) :: a( lda, * ) + real(dp),intent(in) :: beta + complex(dpc),intent(inout) :: c( ldc, * ) + end subroutine zherk + ! +end interface xherk + +!------------------------------------------------------------------------------- + +interface blas_cholesky_ortho + module procedure blas_cholesky_ortho_spc + module procedure blas_cholesky_ortho_dpc +end interface blas_cholesky_ortho + +interface sqmat_itranspose + module procedure sqmat_itranspose_sp + module procedure sqmat_itranspose_dp + module procedure sqmat_itranspose_spc + module procedure sqmat_itranspose_dpc +end interface sqmat_itranspose + +interface sqmat_otranspose + module procedure sqmat_otranspose_sp + module procedure sqmat_otranspose_dp + module procedure sqmat_otranspose_spc + module procedure sqmat_otranspose_dpc +end interface sqmat_otranspose + +interface sqmat_iconjgtrans + module procedure sqmat_iconjgtrans_spc + module procedure sqmat_iconjgtrans_dpc +end interface sqmat_iconjgtrans + +interface sqmat_oconjgtrans + module procedure sqmat_oconjgtrans_spc + module procedure sqmat_oconjgtrans_dpc +end interface sqmat_oconjgtrans + + real(dp),private,parameter :: zero_dp = 0._dp + real(dp),private,parameter :: one_dp = 1._dp + + complex(dpc),private,parameter :: czero_dpc = (0._dp,0._dp) + complex(dpc),private,parameter :: cone_dpc = (1._dp,0._dp) + +CONTAINS !======================================================================================== + +! CDOTC, CDOTU, ZDOTC, and ZDOTU are problematic if Mac OS X's Vec lib is used. +! See http://developer.apple.com/hardwaredrivers/ve/errata.html. +! Here we replace them with plain Fortran code. + +#ifdef HAVE_LINALG_ZDOTC_BUG +!#warning "Using internal replacement for zdotc. External library cannot be used" +#include "replacements/cdotc.f" +#include "replacements/zdotc.f" +#endif + +#ifdef HAVE_LINALG_ZDOTU_BUG +!#warning "Using internal replacement for zdotu. External library cannot be used" +#include "replacements/cdotu.f" +#include "replacements/zdotu.f" +#endif + +!---------------------------------------------------------------------- + +!!*** + +!!****f* m_hide_blas/blas_cholesky_ortho_spc +!! NAME +!! blas_cholesky_ortho_spc +!! +!! FUNCTION +!! Performs the Cholesky orthonormalization of the vectors stored in iomat. +!! +!! INPUTS +!! vec_size=Size of each vector. +!! nvec=Number of vectors in iomat +!! +!! OUTPUT +!! cf_ovlp=Cholesky factorization of the overlap matrix. ovlp = U^H U with U upper triangle matrix returned in cf_ovlp +!! +!! SIDE EFFECTS +!! iomat(vec_size,nvec) +!! input: Input set of vectors. +!! output: Orthonormalized set. +!! +!! SOURCE + +subroutine blas_cholesky_ortho_spc(vec_size,nvec,iomat,cf_ovlp,use_gemm) + +!Arguments ------------------------------------ + integer,intent(in) :: vec_size,nvec + logical,optional,intent(in) :: use_gemm + complex(spc),intent(inout) :: iomat(vec_size,nvec) + complex(spc),intent(out) :: cf_ovlp(nvec,nvec) + +!Local variables ------------------------------ +!scalars + integer :: ierr + logical :: my_usegemm + character(len=500) :: msg + +! ************************************************************************* + + ! 1) Calculate overlap_ij = + ! TODO: use dsyrk + my_usegemm = .FALSE.; if (PRESENT(use_gemm)) my_usegemm = use_gemm + + if (my_usegemm) then + call xgemm("Conjugate","Normal",nvec,nvec,vec_size,cone_sp,iomat,vec_size,iomat,vec_size,czero_sp,cf_ovlp,nvec) + else + call xherk("U","C", nvec, vec_size, one_sp, iomat, vec_size, zero_sp, cf_ovlp, nvec) + end if + ! + ! 2) Cholesky factorization: ovlp = U^H U with U upper triangle matrix. + call CPOTRF('U',nvec,cf_ovlp,nvec,ierr) + if (ierr/=0) then + write(msg,'(a,i0)')' ZPOTRF returned info= ',ierr + ABI_ERROR(msg) + end if + ! + ! 3) Solve X U = io_mat. On exit iomat is orthonormalized. + call CTRSM('Right','Upper','Normal','Normal',vec_size,nvec,cone_sp,cf_ovlp,nvec,iomat,vec_size) + +end subroutine blas_cholesky_ortho_spc +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_hide_blas/blas_cholesky_ortho_dpc +!! NAME +!! blas_cholesky_ortho_dpc +!! +!! FUNCTION +!! Performs the Cholesky orthonormalization of the vectors stored in iomat. +!! +!! INPUTS +!! vec_size=Size of each vector. +!! nvec=Number of vectors in iomat +!! +!! OUTPUT +!! cf_ovlp=Cholesky factorization of the overlap matrix. ovlp = U^H U with U upper triangle matrix returned in cf_ovlp +!! +!! SIDE EFFECTS +!! iomat(vec_size,nvec) +!! input: Input set of vectors. +!! output: Orthonormalized set. +!! +!! SOURCE + +subroutine blas_cholesky_ortho_dpc(vec_size,nvec,iomat,cf_ovlp,use_gemm) + +!Arguments ------------------------------------ + integer,intent(in) :: vec_size,nvec + logical,optional,intent(in) :: use_gemm + complex(dpc),intent(inout) :: iomat(vec_size,nvec) + complex(dpc),intent(out) :: cf_ovlp(nvec,nvec) + +!Local variables ------------------------------ +!scalars + integer :: ierr + logical :: my_usegemm + character(len=500) :: msg + +! ************************************************************************* + + ! 1) Calculate overlap_ij = + my_usegemm = .FALSE.; if (PRESENT(use_gemm)) my_usegemm = use_gemm + + if (my_usegemm) then + call xgemm("Conjugate","Normal",nvec,nvec,vec_size,cone_dpc,iomat,vec_size,iomat,vec_size,czero_dpc,cf_ovlp,nvec) + else + call xherk("U","C", nvec, vec_size, one_dp, iomat, vec_size, zero_dp, cf_ovlp, nvec) + end if + ! + ! 2) Cholesky factorization: ovlp = U^H U with U upper triangle matrix. + call ZPOTRF('U',nvec,cf_ovlp,nvec,ierr) + if (ierr/=0) then + write(msg,'(a,i0)')' ZPOTRF returned info= ',ierr + ABI_ERROR(msg) + end if + ! + ! 3) Solve X U = io_mat. On exit io_mat is orthonormalized. + call ZTRSM('Right','Upper','Normal','Normal',vec_size,nvec,cone_dpc,cf_ovlp,nvec,iomat,vec_size) + +end subroutine blas_cholesky_ortho_dpc +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_hide_blas/sqmat_itranspose_sp +!! NAME +!! sqmat_itranspose_sp +!! +!! FUNCTION +!! Compute alpha * mat^T in place. target: single precision real matrix. +!! +!! INPUTS +!! n=size of the matrix +!! [alpha]=scalar, set to 1.0 if not present +!! +!! SIDE EFFECTS +!! mat(n,n)=in output, it contains alpha * mat^T. +!! +!! SOURCE + +subroutine sqmat_itranspose_sp(n,mat,alpha) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: n + real(sp),optional,intent(in) :: alpha +!arrays + real(sp),intent(inout) :: mat(n,n) + +! ************************************************************************* + +#ifdef HAVE_LINALG_MKL_IMATCOPY + if (PRESENT(alpha)) then + call mkl_simatcopy("Column", "Trans", n, n, alpha, mat, n, n) + else + call mkl_simatcopy("Column", "Trans", n, n, one_sp, mat, n, n) + end if +#else + ! Fallback to Fortran. + if (PRESENT(alpha)) then + mat = alpha * TRANSPOSE(mat) + else + mat = TRANSPOSE(mat) + end if +#endif + +end subroutine sqmat_itranspose_sp +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_hide_blas/sqmat_itranspose_dp +!! NAME +!! sqmat_itranspose_dp +!! +!! FUNCTION +!! Compute alpha * mat^T in place. target: double precision real matrix. +!! +!! INPUTS +!! n=size of the matrix +!! [alpha]=scalar, set to 1.0 if not present +!! +!! SIDE EFFECTS +!! mat(n,n)=in output, it contains alpha * mat^T. +!! +!! SOURCE + +subroutine sqmat_itranspose_dp(n,mat,alpha) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: n + real(dp),optional,intent(in) :: alpha +!arrays + real(dp),intent(inout) :: mat(n,n) + +! ************************************************************************* + +#ifdef HAVE_LINALG_MKL_IMATCOPY + if (PRESENT(alpha)) then + call mkl_dimatcopy("Column", "Trans", n, n, alpha, mat, n, n) + else + call mkl_dimatcopy("Column", "Trans", n, n, one_dp, mat, n, n) + end if +#else + ! Fallback to Fortran. + if (PRESENT(alpha)) then + mat = alpha * TRANSPOSE(mat) + else + mat = TRANSPOSE(mat) + end if +#endif + +end subroutine sqmat_itranspose_dp +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_hide_blas/sqmat_itranspose_spc +!! NAME +!! sqmat_itranspose_spc +!! +!! FUNCTION +!! Compute alpha * mat^T in place. target: single precision complex matrix. +!! +!! INPUTS +!! n=size of the matrix +!! [alpha]=scalar, set to 1.0 if not present +!! +!! SIDE EFFECTS +!! mat(n,n)=in output, it contains alpha * mat^T. +!! +!! SOURCE + +subroutine sqmat_itranspose_spc(n,mat,alpha) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: n + complex(spc),optional,intent(in) :: alpha +!arrays + complex(spc),intent(inout) :: mat(n,n) + +! ************************************************************************* + +#ifdef HAVE_LINALG_MKL_IMATCOPY + if (PRESENT(alpha)) then + call mkl_cimatcopy("Column", "Trans", n, n, alpha, mat, n, n) + else + call mkl_cimatcopy("Column", "Trans", n, n, cone_sp, mat, n, n) + end if +#else + ! Fallback to Fortran. + if (PRESENT(alpha)) then + mat = alpha * TRANSPOSE(mat) + else + mat = TRANSPOSE(mat) + end if +#endif + +end subroutine sqmat_itranspose_spc +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_hide_blas/sqmat_itranspose_dpc +!! NAME +!! sqmat_itranspose_dpc +!! +!! FUNCTION +!! Compute alpha * mat^T in place. target: double precision complex matrix. +!! +!! INPUTS +!! n=size of the matrix +!! [alpha]=scalar, set to 1.0 if not present +!! +!! SIDE EFFECTS +!! mat(n,n)=in output, it contains alpha * mat^T. +!! +!! SOURCE + +subroutine sqmat_itranspose_dpc(n,mat,alpha) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: n + complex(dpc),optional,intent(in) :: alpha +!arrays + complex(dpc),intent(inout) :: mat(n,n) + +! ************************************************************************* + +#ifdef HAVE_LINALG_MKL_IMATCOPY + if (PRESENT(alpha)) then + call mkl_zimatcopy("Column", "Trans", n, n, alpha, mat, n, n) + else + call mkl_zimatcopy("Column", "Trans", n, n, cone_dpc, mat, n, n) + end if +#else + ! Fallback to Fortran. + if (PRESENT(alpha)) then + mat = alpha * TRANSPOSE(mat) + else + mat = TRANSPOSE(mat) + end if +#endif + +end subroutine sqmat_itranspose_dpc +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_hide_blas/sqmat_otranspose_sp +!! NAME +!! sqmat_otranspose_sp +!! +!! FUNCTION +!! Compute alpha * mat^T out-of-place. target: single precision real matrix. +!! +!! INPUTS +!! n=size of the matrix +!! [alpha]=scalar, set to 1.0 if not present +!! imat(n,n)=Input matrix. +!! +!! OUTPUT +!! omat(n,n)=contains alpha * imat^T. +!! +!! SOURCE + +subroutine sqmat_otranspose_sp(n,imat,omat,alpha) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: n + real(sp),optional,intent(in) :: alpha +!arrays + real(sp),intent(in) :: imat(n,n) + real(sp),intent(out) :: omat(n,n) + +! ************************************************************************* + +#ifdef HAVE_LINALG_MKL_OMATCOPY + if (PRESENT(alpha)) then + call mkl_somatcopy("Column", "Transpose", n, n, alpha, imat, n, omat, n) + else + call mkl_somatcopy("Column", "Transpose", n, n, one_sp, imat, n, omat, n) + end if +#else + ! Fallback to Fortran. + if (PRESENT(alpha)) then + omat = alpha * TRANSPOSE(imat) + else + omat = TRANSPOSE(imat) + end if +#endif + +end subroutine sqmat_otranspose_sp +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_hide_blas/sqmat_otranspose_dp +!! NAME +!! sqmat_otranspose_dp +!! +!! FUNCTION +!! Compute alpha * mat^T out-of-place. target: double precision real matrix. +!! +!! INPUTS +!! n=size of the matrix +!! [alpha]=scalar, set to 1.0 if not present +!! imat(n,n)=Input matrix. +!! +!! OUTPUT +!! omat(n,n)=contains alpha * imat^T. +!! +!! SOURCE + +subroutine sqmat_otranspose_dp(n,imat,omat,alpha) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: n + real(dp),optional,intent(in) :: alpha +!arrays + real(dp),intent(in) :: imat(n,n) + real(dp),intent(out) :: omat(n,n) + +! ************************************************************************* + +#ifdef HAVE_LINALG_MKL_OMATCOPY + if (PRESENT(alpha)) then + call mkl_domatcopy("Column", "Transpose", n, n, alpha, imat, n, omat, n) + else + call mkl_domatcopy("Column", "Transpose", n, n, one_dp, imat, n, omat, n) + end if +#else + ! Fallback to Fortran. + if (PRESENT(alpha)) then + omat = alpha * TRANSPOSE(imat) + else + omat = TRANSPOSE(imat) + end if +#endif + +end subroutine sqmat_otranspose_dp +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_hide_blas/sqmat_otranspose_spc +!! NAME +!! sqmat_otranspose_spc +!! +!! FUNCTION +!! Compute alpha * mat^T out-of-place. target: single precision complex matrix. +!! +!! INPUTS +!! n=size of the matrix +!! [alpha]=scalar, set to 1.0 if not present +!! imat(n,n)=Input matrix. +!! +!! OUTPUT +!! omat(n,n)=contains alpha * imat^T. +!! +!! SOURCE + +subroutine sqmat_otranspose_spc(n,imat,omat,alpha) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: n + complex(spc),optional,intent(in) :: alpha +!arrays + complex(spc),intent(in) :: imat(n,n) + complex(spc),intent(out) :: omat(n,n) + +! ************************************************************************* + +#ifdef HAVE_LINALG_MKL_OMATCOPY + if (PRESENT(alpha)) then + call mkl_comatcopy("Column", "Transpose", n, n, alpha, imat, n, omat, n) + else + call mkl_comatcopy("Column", "Transpose", n, n, cone_sp, imat, n, omat, n) + end if +#else + ! Fallback to Fortran. + if (PRESENT(alpha)) then + omat = alpha * TRANSPOSE(imat) + else + omat = TRANSPOSE(imat) + end if +#endif + +end subroutine sqmat_otranspose_spc +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_hide_blas/sqmat_otranspose_dpc +!! NAME +!! sqmat_otranspose_dpc +!! +!! FUNCTION +!! Compute alpha * mat^T out-of-place. target: double precision complex matrix. +!! +!! INPUTS +!! n=size of the matrix +!! [alpha]=scalar, set to 1.0 if not present +!! imat(n,n)=Input matrix. +!! +!! OUTPUT +!! omat(n,n)=contains alpha * imat^T. +!! +!! SOURCE + +subroutine sqmat_otranspose_dpc(n,imat,omat,alpha) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: n + complex(dpc),optional,intent(in) :: alpha +!arrays + complex(dpc),intent(in) :: imat(n,n) + complex(dpc),intent(out) :: omat(n,n) + +! ************************************************************************* + +#ifdef HAVE_LINALG_MKL_OMATCOPY + if (PRESENT(alpha)) then + call mkl_zomatcopy("Column", "Transpose", n, n, alpha, imat, n, omat, n) + else + call mkl_zomatcopy("Column", "Transpose", n, n, cone_dpc, imat, n, omat, n) + end if +#else + ! Fallback to Fortran. + if (PRESENT(alpha)) then + omat = alpha * TRANSPOSE(imat) + else + omat = TRANSPOSE(imat) + end if +#endif + +end subroutine sqmat_otranspose_dpc +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_hide_blas/sqmat_iconjgtrans_spc +!! NAME +!! sqmat_iconjgtrans_spc +!! +!! FUNCTION +!! Compute alpha * CONJG(mat^T) in place. target: single precision complex matrix. +!! +!! INPUTS +!! n=size of the matrix +!! [alpha]=scalar, set to 1.0 if not present +!! +!! SIDE EFFECTS +!! mat(n,n)=in output, it contains alpha * CONJG(mat^T). +!! +!! SOURCE + +subroutine sqmat_iconjgtrans_spc(n,mat,alpha) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: n + complex(spc),optional,intent(in) :: alpha +!arrays + complex(spc),intent(inout) :: mat(n,n) + +! ************************************************************************* + +#ifdef HAVE_LINALG_MKL_IMATCOPY + if (PRESENT(alpha)) then + call mkl_cimatcopy("Column", "C", n, n, alpha, mat, n, n) + else + call mkl_cimatcopy("Column", "C", n, n, cone_sp, mat, n, n) + end if +#else + ! Fallback to Fortran. + if (PRESENT(alpha)) then + mat = alpha * TRANSPOSE(CONJG(mat)) + else + mat = TRANSPOSE(CONJG(mat)) + end if +#endif + +end subroutine sqmat_iconjgtrans_spc +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_hide_blas/sqmat_iconjgtrans_dpc +!! NAME +!! sqmat_iconjgtrans_dpc +!! +!! FUNCTION +!! Compute alpha * CONJG(mat^T) in place. target: double precision complex matrix. +!! +!! INPUTS +!! n=size of the matrix +!! [alpha]=scalar, set to 1.0 if not present +!! +!! SIDE EFFECTS +!! mat(n,n)=in output, it contains alpha * CONJG(mat^T). +!! +!! SOURCE + +subroutine sqmat_iconjgtrans_dpc(n, mat, alpha) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: n + complex(dpc),optional,intent(in) :: alpha +!arrays + complex(dpc),intent(inout) :: mat(n,n) + +! ************************************************************************* + +#ifdef HAVE_LINALG_MKL_IMATCOPY + if (PRESENT(alpha)) then + call mkl_zimatcopy("Column", "C", n, n, alpha, mat, n, n) + else + call mkl_zimatcopy("Column", "C", n, n, cone_dpc, mat, n, n) + end if +#else + ! Fallback to Fortran. + if (PRESENT(alpha)) then + mat = alpha * TRANSPOSE(CONJG(mat)) + else + mat = TRANSPOSE(CONJG(mat)) + end if +#endif + +end subroutine sqmat_iconjgtrans_dpc +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_hide_blas/sqmat_oconjgtrans_spc +!! NAME +!! sqmat_oconjgtrans_spc +!! +!! FUNCTION +!! Compute alpha * CONJG(mat^T) out-of-place. target: single precision complex matrix. +!! +!! INPUTS +!! n=size of the matrix +!! [alpha]=scalar, set to 1.0 if not present +!! imat(n,n)=Input matrix. +!! +!! OUTPUT +!! omat(n,n)=contains alpha * CONJG(imat^T). +!! +!! SOURCE + +subroutine sqmat_oconjgtrans_spc(n, imat, omat, alpha) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: n + complex(spc),optional,intent(in) :: alpha +!arrays + complex(spc),intent(in) :: imat(n,n) + complex(spc),intent(out) :: omat(n,n) + +! ************************************************************************* + +#ifdef HAVE_LINALG_MKL_OMATCOPY + if (PRESENT(alpha)) then + call mkl_comatcopy("Column", "C", n, n, alpha, imat, n, omat, n) + else + call mkl_comatcopy("Column", "C", n, n, cone_sp, imat, n, omat, n) + end if +#else + ! Fallback to Fortran. + if (PRESENT(alpha)) then + omat = alpha * TRANSPOSE(CONJG(imat)) + else + omat = TRANSPOSE(CONJG(imat)) + end if +#endif + +end subroutine sqmat_oconjgtrans_spc +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_hide_blas/sqmat_oconjgtrans_dpc +!! NAME +!! sqmat_oconjgtrans_dpc +!! +!! FUNCTION +!! Compute alpha * CONJG(mat^T) out-of-place. target: double precision complex matrix. +!! +!! INPUTS +!! n=size of the matrix +!! [alpha]=scalar, set to 1.0 if not present +!! imat(n,n)=Input matrix. +!! +!! OUTPUT +!! omat(n,n)=contains alpha * CONJG(imat^T). +!! +!! SOURCE + +subroutine sqmat_oconjgtrans_dpc(n,imat,omat,alpha) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: n + complex(dpc),optional,intent(in) :: alpha +!arrays + complex(dpc),intent(in) :: imat(n,n) + complex(dpc),intent(out) :: omat(n,n) + +! ************************************************************************* + +#ifdef HAVE_LINALG_MKL_OMATCOPY + if (PRESENT(alpha)) then + call mkl_zomatcopy("Column", "C", n, n, alpha, imat, n, omat, n) + else + call mkl_zomatcopy("Column", "C", n, n, cone_dpc, imat, n, omat, n) + end if +#else + ! Fallback to Fortran. + if (PRESENT(alpha)) then + omat = alpha * TRANSPOSE(CONJG(imat)) + else + omat = TRANSPOSE(CONJG(imat)) + end if +#endif + +end subroutine sqmat_oconjgtrans_dpc +!!*** + +!---------------------------------------------------------------------- + +end module m_hide_blas +!!*** diff --git a/GX-PAW/common/src/28_numeric_noabirule/m_hide_blas.o b/GX-PAW/common/src/28_numeric_noabirule/m_hide_blas.o new file mode 100644 index 00000000..613208f7 Binary files /dev/null and b/GX-PAW/common/src/28_numeric_noabirule/m_hide_blas.o differ diff --git a/GX-PAW/common/src/28_numeric_noabirule/m_hide_lapack.F90 b/GX-PAW/common/src/28_numeric_noabirule/m_hide_lapack.F90 new file mode 100644 index 00000000..c7c31999 --- /dev/null +++ b/GX-PAW/common/src/28_numeric_noabirule/m_hide_lapack.F90 @@ -0,0 +1,3908 @@ +!!****m* ABINIT/m_hide_lapack +!! NAME +!! m_hide_lapack +!! +!! FUNCTION +!! ABINIT Linear Algebra Subroutine Interfaces. +!! +!! This modules provides interfaces performing the overloading of commonly used Lapack routines. +!! The main purpose of this module is to create a layer between abinit routines and Lapack procedures. +!! This layer can be used to hide the parallel Scalapack version. In this case, only the MPI commutator +!! has to be provided in input as the wrapper will take care of the initialization of the Scalapack grid as +!! well as of the distribution of the matrix. Note that this allows one to reduce +!! the CPU time per processor but not the memory allocated since the entire matrix has to be provided in input. +!! The interfaces are very similar to the Lapack F77 version (neither F90 constructs nor +!! F90 assumed size arrays are used). The main simplification with respect to the F77 version +!! of Lapack is that the work arrays are allocated inside the wrapper with optimal size +!! thus reducing the number of input argcomm_scalapackuments that has to be passed. +!! Leading dimensions have been removed from the interface whenever possible. +!! In F90 one can pass the array descriptor if the routines should operate on a slice +!! of the local array (seldom done in abinit). +!! Using array descriptor is OK but will it likely slow-down the calculation as +!! some compilers perform a copy of the input-output data. +!! If efficiency is a concern, then the F77 call should be used +!! +!! COPYRIGHT +!! Copyright (C) 1992-2024 ABINIT group (MG, GMR, XG) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! For the initials of contributors, see ~abinit/doc/developers/contributors.txt . +!! +!! TODO +!! 1) Use a function to define the size of the Scalapack block according to some heuristic method. +!! 2) Define a threshold below which Scalapack is not used although the MPI communicator is passed. +!! 3) Split MPI communicator for Scalapack (.i.e. use a max size for the Scalapack comm; see abi_linalg_init). +!! 4) On certain networks, xmpi_sum might crash due to the size of the MPI packet. +!! This problem should be solved in hide_mpi (Module containing a private global variable +!! defining a threshold above which the input array is split into smaller chunks. +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" + +MODULE m_hide_lapack + + use defs_basis + use m_abicore + use m_xmpi + use m_errors + use m_slk + + use m_linalg_interfaces + + use m_time, only : cwtime + use m_fstrings, only : firstchar + !use m_slk, only : matrix_scalapack, processor_scalapack + + implicit none + + private + +! ========================== +! Complex Hermitian matrices +! ========================== +! The _cplex version receives matrices declared as arr(cplex,N,M) +! and calls the complex/real version depending on cplex (used e.g. for istwf_k = 2) + + public :: xheev ! Computes all the eigenvalues and, optionally, eigenvectors of a complex Hermitian matrix. + public :: xheev_cplex + + public :: xhpev ! Computes all the eigenvalues and, optionally, eigenvectors of a complex Hermitian matrix + ! in packed storage (Scalapack version not available) + + public :: xhegv ! Compute all the eigenvalues, and optionally, the eigenvectors of a complex generalized + ! Hermitian-definite eigenproblem, of the form: + ! A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x + + public :: xheevx ! Computes selected eigenvalues and, optionally, eigenvectors of a complex Hermitian matrix A. + ! Eigenvalues and eigenvectors can be selected by specifying either a range of values or a range of + ! indices for the desired eigenvalues. + + public :: xheevx_cplex + + public :: xhegvx ! Computes selected eigenvalues, and optionally, eigenvectors + ! of a complex generalized Hermitian-definite eigenproblem, + ! of the form A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x. + ! Eigenvalues and eigenvectors can be selected by specifying either a range of values or a range of + ! indices for the desired eigenvalues. + public :: xhegvx_cplex + + + public :: xhesv_cplex ! Solve A * X = B, where A is an N-by-N Hermitian matrix and X and B are N-by-NRHS matrices. + + +! ============================== +! Complex non-symmetric matrices +! ============================== + + public :: xgeev ! Computes for a complex nonsymmetric matrix A, the eigenvalues and, optionally, + ! the left and/or right eigenvectors. + + public :: xginv ! Invert a general matrix of complex elements by means of LU factorization. + + + public :: xhdp_invert ! Invert a Hermitian positive definite matrix. + + interface xheev + module procedure wrap_CHEEV + module procedure wrap_ZHEEV + end interface xheev + + interface xhpev + module procedure wrap_CHPEV + module procedure wrap_ZHPEV + end interface xhpev + + interface xhegv + module procedure wrap_ZHEGV + end interface xhegv + + public :: xhegv_cplex + + interface xheevx + module procedure wrap_ZHEEVX + end interface xheevx + + interface xhegvx + module procedure wrap_ZHEGVX + end interface xhegvx + + interface xgeev + module procedure wrap_CGEEV + module procedure wrap_ZGEEV + end interface xgeev + + interface xginv + module procedure cginv + module procedure zginv + end interface xginv + + interface xhdp_invert + module procedure zhpd_invert + end interface xhdp_invert + + public :: matrginv ! Invert a general matrix of real*8 elements. + public :: matr3eigval ! Find the eigenvalues of a real symmetric 3x3 matrix, entered in full storage mode. + + !FIXME This procedures are deprecated, use lapack API + public :: jacobi ! Computes all eigenvalues and eigenvectors of a real symmetric matrix a, + public :: ludcmp + public :: lubksb + public :: dzgedi + public :: dzgefa + +!---------------------------------------------------------------------- +! support for unitary tests and profiling. + + type,public :: latime_t + character(len=500) :: testname + integer :: msize + real(dp) :: ctime + real(dp) :: wtime + real(dp) :: max_abserr=-one + real(dp) :: gflops + end type latime_t + + public :: test_xginv + +!---------------------------------------------------------------------- +! private variables + + integer,private,parameter :: SLK_BLOCK_SIZE = 24 + ! Default block size for Scalapack distribution. + ! As recommended by Intel MKL, a more sensible default than the previous value of 40 + +CONTAINS !========================================================================================================================= +!!*** + +!!****f* m_hide_lapack/wrap_CHEEV +!! NAME +!! wrap_CHEEV +!! +!! FUNCTION +!! wrap_CHEEV computes the eigenvalues and, optionally, the eigenvectors of a +!! complex Hermitian matrix in single precision. [PRIVATE] +!! +!! INPUTS +!! JOBZ (input) CHARACTER*1 +!! = 'N': Compute eigenvalues only; +!! = 'V': Compute eigenvalues and eigenvectors. +!! +!! UPLO (input) CHARACTER*1 +!! = 'U': Upper triangle of A is stored; +!! = 'L': Lower triangle of A is stored. +!! +!! N (input) INTEGER +!! The order of the matrix A. N >= 0. +!! +!! OUTPUT +!! W (output) REAL(SP) array, dimension (N) +!! If INFO = 0, the eigenvalues in ascending order. +!! +!! See also SIDE EFFECTS +!! +!! SIDE EFFECTS +!! A (input/output) COMPLEX(SPC) array, dimension (N, N) +!! On entry, the Hermitian matrix A. If UPLO = 'U', the +!! leading N-by-N upper triangular part of A contains the +!! upper triangular part of the matrix A. If UPLO = 'L', +!! the leading N-by-N lower triangular part of A contains +!! the lower triangular part of the matrix A. +!! On exit, if JOBZ = 'V', then if INFO = 0, A contains the +!! orthonormal eigenvectors of the matrix A. +!! If JOBZ = 'N', then on exit the lower triangle (if UPLO='L') +!! or the upper triangle (if UPLO='U') of A, including the +!! diagonal, is destroyed. +!! +!! SOURCE + +subroutine wrap_CHEEV(jobz, uplo, n, a, w) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: n + character(len=*),intent(in) :: jobz,uplo +!scalars + real(sp),intent(out) :: w(n) + complex(spc),intent(inout) :: a(n,n) + +!Local variables ------------------------------ +!scalars + integer :: lwork,info + character(len=500) :: msg +!arrays + real(sp),allocatable :: rwork(:) + complex(spc),allocatable :: work(:) + +!************************************************************************ + + lwork = MAX(1,2*n-1) + + ABI_MALLOC(work, (lwork)) + ABI_MALLOC(rwork, (MAX(1,3*n-2))) + + call CHEEV(jobz,uplo,n,a,n,w,work,lwork,rwork,info) + + if (info < 0) then + write(msg,'(a,i0,a)')"The ",-info,"-th argument of CHEEV had an illegal value." + ABI_ERROR(msg) + end if + + if (info > 0) then + write(msg,'(2a,i0,a)')& + "CHEEV: the algorithm failed to converge; ",ch10,& + info," off-diagonal elements of an intermediate tridiagonal form did not converge to zero. " + ABI_ERROR(msg) + end if + + ABI_FREE(rwork) + ABI_FREE(work) + + !TODO scaLAPACK version (complex single precision buffer is needed in matrix_scalapack) + +end subroutine wrap_CHEEV +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_hide_lapack/wrap_ZHEEV +!! NAME +!! wrap_ZHEEV +!! +!! FUNCTION +!! wrap_ZHEEV computes the eigenvalues and, optionally, the eigenvectors of a +!! complex Hermitian matrix in double precision. [PRIVATE] +!! +!! INPUTS +!! JOBZ (input) CHARACTER*1 +!! = 'N': Compute eigenvalues only; +!! = 'V': Compute eigenvalues and eigenvectors. +!! +!! UPLO (input) CHARACTER*1 +!! = 'U': Upper triangle of A is stored; +!! = 'L': Lower triangle of A is stored. +!! +!! N (input) INTEGER +!! The order of the matrix A. N >= 0. +!! +!! [comm]=MPI communicator for ScaLAPACK inversion. Only available if the code has been compiled with Scalapack support. +!! To avoid wasting CPU time the scalapack initialization is avoided if the number of processors in 1, +!! in this case the sequential LAPACK routine is called. +!! OUTPUT +!! W (output) REAL(DP) array, dimension (N) +!! If INFO = 0, the eigenvalues in ascending order. +!! +!! See also SIDE EFFECTS +!! +!! SIDE EFFECTS +!! A (input/output) COMPLEX(DPC) array, dimension (N, N) +!! On entry, the Hermitian matrix A. If UPLO = 'U', the +!! leading N-by-N upper triangular part of A contains the +!! upper triangular part of the matrix A. If UPLO = 'L', +!! the leading N-by-N lower triangular part of A contains +!! the lower triangular part of the matrix A. +!! On exit, if JOBZ = 'V', then if INFO = 0, A contains the +!! orthonormal eigenvectors of the matrix A. +!! If JOBZ = 'N', then on exit the lower triangle (if UPLO='L') +!! or the upper triangle (if UPLO='U') of A, including the +!! diagonal, is destroyed. +!! +!! SOURCE + +subroutine wrap_ZHEEV(jobz, uplo, n, a, w, comm) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: n + integer,optional,intent(in) :: comm + character(len=*),intent(in) :: jobz,uplo +!arrays + complex(dpc),intent(inout) :: a(n,n) + real(dp),intent(out) :: w(n) + +!Local variables ------------------------------ +!scalars + integer :: lwork,info,nprocs + logical :: use_scalapack + character(len=500) :: msg +!arrays + real(dp),allocatable :: rwork(:) + complex(dpc),allocatable :: work(:) +#ifdef HAVE_LINALG_SCALAPACK + integer :: ierr,istwf_k + logical :: want_eigenvectors + type(matrix_scalapack) :: Slk_mat,Slk_vec + type(processor_scalapack) :: Slk_processor +#endif +!************************************************************************ + + use_scalapack=.FALSE. + if (PRESENT(comm)) then + nprocs = xmpi_comm_size(comm) +#ifdef HAVE_LINALG_SCALAPACK + use_scalapack = (nprocs>1) +#endif + end if + + SELECT CASE(use_scalapack) + CASE (.FALSE.) + + lwork = MAX(1,2*n-1) + ABI_MALLOC(work, (lwork)) + ABI_MALLOC(rwork, (MAX(1,3*n-2))) + + call ZHEEV(jobz,uplo,n,a,n,w,work,lwork,rwork,info) + + if (info < 0) then + write(msg,'(a,i0,a)')" The ",-info,"-th argument of ZHEEV had an illegal value." + ABI_ERROR(msg) + end if + + if (info > 0) then + write(msg,'(2a,i0,a)')& + "ZHEEV: the algorithm failed to converge; ",ch10,& + info," off-diagonal elements of an intermediate tridiagonal form did not converge to zero. " + ABI_ERROR(msg) + end if + + ABI_FREE(rwork) + ABI_FREE(work) + RETURN + + CASE (.TRUE.) +#ifdef HAVE_LINALG_SCALAPACK + call Slk_processor%init(comm) + istwf_k=1 + + ! Initialize and fill Scalapack matrix from the global one. + call Slk_mat%init(n,n,Slk_processor,istwf_k) + call slk_matrix_from_global_dpc_2D(Slk_mat,uplo,a) + + want_eigenvectors = firstchar(jobz,(/"V","v"/)) + if (want_eigenvectors) then + ! Initialize the distributed vectors. + call Slk_vec%init(n,n,Slk_processor,istwf_k) + end if + + ! Solve the problem with scaLAPACK. + call slk_mat%heev(jobz, uplo, Slk_vec, w) + call Slk_mat%free() + + if (want_eigenvectors) then ! A is overwritten with the eigenvectors + a = czero + call slk_matrix_to_global_dpc_2D(Slk_vec,"All",a) ! Fill the entries calculated by this node. + call Slk_vec%free() + call xmpi_sum(a,comm,ierr) ! Fill the remaing entries of the global matrix + end if + + call Slk_processor%free() + RETURN +#endif + + ABI_BUG("You should not be here!") + END SELECT + +end subroutine wrap_ZHEEV +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_hide_lapack/xheev_cplex +!! NAME +!! xheev_cplex +!! +!! FUNCTION +!! xheev_cplex computes the eigenvalues and, optionally, the eigenvectors of a +!! (complex Hermitian| real symmetric) matrix in double precision. +!! +!! INPUTS +!! JOBZ (input) CHARACTER*1 +!! = 'N': Compute eigenvalues only; +!! = 'V': Compute eigenvalues and eigenvectors. +!! +!! UPLO (input) CHARACTER*1 +!! = 'U': Upper triangle of A is stored; +!! = 'L': Lower triangle of A is stored. +!! +!! CPLEX= Size of the first dimension of the A matrix. +!! 1 for a real symmetric matrix. +!! 2 for complex Hermitian matrix stored in a real array with real and imaginary part. +!! +!! N (input) INTEGER +!! The order of the matrix A. N >= 0. +!! +!! [comm]=MPI communicator for ScaLAPACK inversion. Only available if the code has been compiled with Scalapack support. +!! To avoid wasting CPU time the scalapack initialization is avoided if the number of processors in 1, +!! in this case the sequential LAPACK routine is called. +!! +!! OUTPUT +!! W (output) REAL(DP) array, dimension (N) +!! If INFO = 0, the eigenvalues in ascending order. +!! +!! See also SIDE EFFECTS +!! +!! SIDE EFFECTS +!! A (input/output) REAL(DP) array, dimension (CPLEX, N, N) +!! On entry, the (complex Hermitian|Real symmetric) matrix A. If UPLO = 'U', the +!! leading N-by-N upper triangular part of A contains the +!! upper triangular part of the matrix A. If UPLO = 'L', +!! the leading N-by-N lower triangular part of A contains +!! the lower triangular part of the matrix A. +!! On exit, if JOBZ = 'V', then if INFO = 0, A contains the +!! orthonormal eigenvectors of the matrix A. +!! If JOBZ = 'N', then on exit the lower triangle (if UPLO='L') +!! or the upper triangle (if UPLO='U') of A, including the +!! diagonal, is destroyed. +!! +!! SOURCE + +subroutine xheev_cplex(jobz, uplo, cplex, n, a, w, msg, ierr, comm) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: n,cplex + integer,optional,intent(in) :: comm + character(len=*),intent(in) :: jobz,uplo + integer,intent(out) :: ierr + character(len=*),intent(out) :: msg +!arrays + real(dp),intent(inout) :: a(cplex,n,n) + real(dp),intent(out) :: w(n) + +!Local variables ------------------------------ +!scalars + integer :: lwork,nprocs + logical :: use_scalapack +!arrays + real(dp),allocatable :: rwork(:) + real(dp),allocatable :: work_real(:) + complex(dpc),allocatable :: work_cplx(:) +#ifdef HAVE_LINALG_SCALAPACK + !integer :: istwf_k + !logical :: want_eigenvectors + !type(matrix_scalapack) :: Slk_mat,Slk_vec + !type(processor_scalapack) :: Slk_processor +#endif +!************************************************************************ + + use_scalapack=.FALSE. + if (PRESENT(comm)) then + nprocs = xmpi_comm_size(comm) +#ifdef HAVE_LINALG_SCALAPACK + use_scalapack = (nprocs>1) +#endif + end if + + if (ALL(cplex/= [1, 2])) then + write(msg,'(a,i0)')" Wrong value for cplex: ",cplex + ierr = 1; return + end if + + SELECT CASE(use_scalapack) + CASE (.FALSE.) + if (cplex==1) then + ! Real symmetric case. + lwork = MAX(1,3*n-1) + ABI_MALLOC(work_real,(lwork)) + + call DSYEV(jobz,uplo,n,a,n,w,work_real,lwork,ierr) + + if (ierr < 0) then + write(msg,'(a,i0,a)')" The ",-ierr,"-th argument of DSYEV had an illegal value." + end if + + if (ierr > 0) then + write(msg,'(2a,i0,a)')& + "DSYEV: the algorithm failed to converge; ",ch10,& + ierr," off-diagonal elements of an intermediate tridiagonal form did not converge to zero. " + end if + + ABI_FREE(work_real) + RETURN + + else + ! Hermitian case. + lwork = MAX(1,2*n-1) + + ABI_MALLOC(work_cplx, (lwork)) + ABI_MALLOC(rwork, (MAX(1,3*n-2))) + + call ZHEEV(jobz,uplo,n,a,n,w,work_cplx,lwork,rwork,ierr) + + if (ierr < 0) then + write(msg,'(a,i0,a)')" The ",-ierr,"-th argument of ZHEEV had an illegal value." + end if + + if (ierr > 0) then + write(msg,'(2a,i0,a)')& + "ZHEEV: the algorithm failed to converge; ",ch10,& + ierr," off-diagonal elements of an intermediate tridiagonal form did not converge to zero. " + end if + + ABI_FREE(rwork) + ABI_FREE(work_cplx) + RETURN + end if ! cplex + + CASE (.TRUE.) + +#ifdef HAVE_LINALG_SCALAPACK + ABI_ERROR("Not coded yet") + + !call Slk_processor%init(comm) + !istwf_k=1 + ! + !! Initialize and fill Scalapack matrix from the global one. + !call Slk_mat%init(n,n,Slk_processor,istwf_k) + ! + !call slk_matrix_from_global_dpc_2D(Slk_mat,uplo,a) + ! + !want_eigenvectors = firstchar(jobz,(/"V","v"/)) + !if (want_eigenvectors) then ! Initialize the distributed vectors. + ! call Slk_vec%init(n,n,Slk_processor,istwf_k) + !end if + ! + !! Solve the problem with scaLAPACK. + !call slk_mat%heev(jobz,uplo,Slk_vec,w) + !call Slk_mat%free() + ! + !if (want_eigenvectors) then ! A is overwritten with the eigenvectors + ! a = czero + ! call slk_matrix_to_global_dpc_2D(Slk_vec,"All",a) ! Fill the entries calculated by this node. + ! call Slk_vec%free() + ! call xmpi_sum(a,comm,ierr) ! Fill the remaing entries of the global matrix + !end if + ! + !call Slk_processor%free() + + RETURN +#endif + + ABI_BUG("You should not be here!") + END SELECT + +end subroutine xheev_cplex +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_hide_lapack/wrap_CHPEV +!! NAME +!! wrap_CHPEV +!! +!! FUNCTION +!! wrap_CHPEV computes all the eigenvalues and, optionally, eigenvectors of a +!! complex Hermitian matrix in packed storage. Scalapack version is not available. [PRIVATE]. +!! +!! INPUTS +!! JOBZ (input) CHARACTER*1 +!! = 'N': Compute eigenvalues only; +!! = 'V': Compute eigenvalues and eigenvectors. +!! +!! UPLO (input) CHARACTER*1 +!! = 'U': Upper triangle of A is stored; +!! = 'L': Lower triangle of A is stored. +!! +!! N (input) INTEGER +!! The order of the matrix A. N >= 0. +!! +!! LDZ (input) INTEGER +!! The leading dimension of the array Z. LDZ >= 1, and if +!! JOBZ = 'V', LDZ >= max(1,N). +!! +!! OUTPUT +!! W (output) REAL(SP) array, dimension (N) +!! If INFO = 0, the eigenvalues in ascending order. +!! +!! Z (output) COMPLEX(SPC) array, dimension (LDZ, N) +!! If JOBZ = 'V', then if INFO = 0, Z contains the orthonormal +!! eigenvectors of the matrix A, with the i-th column of Z +!! holding the eigenvector associated with W(i). +!! If JOBZ = 'N', then Z is not referenced. +!! +!! See also SIDE EFFECTS +!! +!! SIDE EFFECTS +!! +!! AP (input/output) COMPLEX(SPC) array, dimension (N*(N+1)/2) +!! On entry, the upper or lower triangle of the Hermitian matrix +!! A, packed columnwise in a linear array. The j-th column of A +!! is stored in the array AP as follows: +!! if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j; +!! if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n. +!! +!! On exit, AP is overwritten by values generated during the +!! reduction to tridiagonal form. If UPLO = 'U', the diagonal +!! and first superdiagonal of the tridiagonal matrix T overwrite +!! the corresponding elements of A, and if UPLO = 'L', the +!! diagonal and first subdiagonal of T overwrite the +!! corresponding elements of A. +!! +!! SOURCE + +subroutine wrap_CHPEV(jobz, uplo, n, ap, w, z, ldz) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: n,ldz + character(len=*),intent(in) :: jobz,uplo +!arrays + real(sp),intent(out) :: w(n) + complex(spc),intent(inout) :: ap(n*(n+1)/2) + complex(spc),intent(out) :: z(ldz,n) + +!Local variables ------------------------------ +!scalars + integer :: info + character(len=500) :: msg +!arrays + real(sp),allocatable :: rwork(:) + complex(spc),allocatable :: work(:) + +!************************************************************************ + + ABI_MALLOC(work, (MAX(1,2*n-1))) + ABI_MALLOC(rwork, (MAX(1,3*n-2))) + + call CHPEV( JOBZ, UPLO, N, AP, W, Z, LDZ, WORK, RWORK, INFO ) + + if (info < 0) then + write(msg,'(a,i0,a)')" The ",-info,"-th argument of ZHEEV had an illegal value." + ABI_ERROR(msg) + end if + + if (info > 0) then + write(msg,'(2a,i0,a)')& + "ZHPEV: the algorithm failed to converge; ",ch10,& + info," off-diagonal elements of an intermediate tridiagonal form did not converge to zero. " + ABI_ERROR(msg) + end if + + ABI_FREE(rwork) + ABI_FREE(work) + +end subroutine wrap_CHPEV +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_hide_lapack/wrap_ZHPEV +!! NAME +!! wrap_ZHPEV +!! +!! FUNCTION +!! wrap_ZHPEV computes all the eigenvalues and, optionally, eigenvectors of a +!! complex Hermitian matrix in packed storage. Scalapack version is not available. [PRIVATE]. +!! +!! INPUTS +!! JOBZ (input) CHARACTER*1 +!! = 'N': Compute eigenvalues only; +!! = 'V': Compute eigenvalues and eigenvectors. +!! +!! UPLO (input) CHARACTER*1 +!! = 'U': Upper triangle of A is stored; +!! = 'L': Lower triangle of A is stored. +!! +!! N (input) INTEGER +!! The order of the matrix A. N >= 0. +!! +!! LDZ (input) INTEGER +!! The leading dimension of the array Z. LDZ >= 1, and if +!! JOBZ = 'V', LDZ >= max(1,N). +!! +!! [comm]=MPI communicator for ScaLAPACK inversion. Only available if the code has been compiled with Scalapack support. +!! To avoid wasting CPU time the scalapack initialization is avoided if the number of processors in 1, +!! in this case the sequential LAPACK routine is called. Note that scalapack does not provide native +!! support for packed symmetric matrices. Threfore we have to distribute the full matrix among the nodes. +!! in order to perform the calculation in parallel. +!! +!! OUTPUT +!! W (output) REAL(DP) array, dimension (N) +!! If INFO = 0, the eigenvalues in ascending order. +!! +!! Z (output) COMPLEX(DPC) array, dimension (LDZ, N) +!! If JOBZ = 'V', then if INFO = 0, Z contains the orthonormal +!! eigenvectors of the matrix A, with the i-th column of Z +!! holding the eigenvector associated with W(i). +!! If JOBZ = 'N', then Z is not referenced. +!! +!! See also SIDE EFFECTS +!! +!! SIDE EFFECTS +!! +!! AP (input/output) COMPLEX(DPC) array, dimension (N*(N+1)/2) +!! On entry, the upper or lower triangle of the Hermitian matrix +!! A, packed columnwise in a linear array. The j-th column of A +!! is stored in the array AP as follows: +!! if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j; +!! if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n. +!! +!! On exit, AP is overwritten by values generated during the +!! reduction to tridiagonal form. If UPLO = 'U', the diagonal +!! and first superdiagonal of the tridiagonal matrix T overwrite +!! the corresponding elements of A, and if UPLO = 'L', the +!! diagonal and first subdiagonal of T overwrite the +!! corresponding elements of A. Unchanged if ScaLAPACK is used. +!! +!! SOURCE + +subroutine wrap_ZHPEV(jobz, uplo, n, ap, w, z, ldz, comm) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: n,ldz + integer,optional,intent(in) :: comm + character(len=*),intent(in) :: jobz,uplo +!arrays + real(dp),intent(out) :: w(n) + complex(dpc),intent(inout) :: ap(n*(n+1)/2) + complex(dpc),intent(out) :: z(ldz,n) + +!Local variables ------------------------------ +!scalars + integer :: info,nprocs + logical :: use_scalapack + character(len=500) :: msg +!arrays + real(dp),allocatable :: rwork(:) + complex(dpc),allocatable :: work(:) +#ifdef HAVE_LINALG_SCALAPACK + integer :: ierr,istwf_k + logical :: want_eigenvectors + type(matrix_scalapack) :: Slk_mat,Slk_vec + type(processor_scalapack) :: Slk_processor +#endif + +!************************************************************************ + + use_scalapack=.FALSE. + if (PRESENT(comm)) then + nprocs = xmpi_comm_size(comm) +#ifdef HAVE_LINALG_SCALAPACK + use_scalapack = (nprocs>1) +#endif + end if + + SELECT CASE(use_scalapack) + CASE (.FALSE.) + ABI_MALLOC(work, (MAX(1,2*n-1))) + ABI_MALLOC(rwork, (MAX(1,3*n-2))) + + call ZHPEV(jobz,uplo,n,ap,w,z,ldz,work,rwork,info) + + if (info < 0) then + write(msg,'(a,i0,a)')" The ",-info,"-th argument of ZHPEV had an illegal value." + ABI_ERROR(msg) + end if + + if (info > 0) then + write(msg,'(2a,i0,a)')& + "ZHPEV: the algorithm failed to converge; ",ch10,& + info," off-diagonal elements of an intermediate tridiagonal form did not converge to zero. " + ABI_ERROR(msg) + end if + + ABI_FREE(rwork) + ABI_FREE(work) + RETURN + + CASE (.TRUE.) + +#ifdef HAVE_LINALG_SCALAPACK + call Slk_processor%init(comm) + istwf_k=1 + + ! Initialize and fill Scalapack matrix from the global one. + call Slk_mat%init(n,n,Slk_processor,istwf_k) + call slk_matrix_from_global_dpc_1Dp(Slk_mat,uplo,ap) + + want_eigenvectors = firstchar(jobz,(/"V","v"/)) + if (want_eigenvectors) then + ! Initialize the distributed vectors. + call Slk_vec%init(n,n,Slk_processor,istwf_k) + end if + + ! Solve the problem with scaLAPACK. + call slk_mat%heev(jobz,uplo,Slk_vec,w) + call Slk_mat%free() + + if (want_eigenvectors) then ! Collect the eigenvectors. + z = zero + call slk_matrix_to_global_dpc_2D(Slk_vec,"All",z) ! Fill the entries calculated by this node. + call Slk_vec%free() + call xmpi_sum(z,comm,ierr) ! Fill the remaing entries of the global matrix + end if + + call Slk_processor%free() + + RETURN +#endif + + ABI_BUG("You should not be here!") + END SELECT + +end subroutine wrap_ZHPEV +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_hide_lapack/wrap_ZHEGV +!! NAME +!! wrap_ZHEGV +!! +!! FUNCTION +!! wrap_ZHEGV computes all the eigenvalues, and optionally, the eigenvectors of a complex generalized +!! Hermitian-definite eigenproblem, of the form +!! A*x=(lambda)*B*x (1), +!! A*Bx=(lambda)*x, (2), or +!! B*A*x=(lambda)*x (3). +!! Here A and B are assumed to be Hermitian and B is also positive definite. +!! +!! INPUTS +!! +!! ITYPE (input) INTEGER Specifies the problem type to be solved: +!! = 1: A*x = (lambda)*B*x +!! = 2: A*B*x = (lambda)*x +!! = 3: B*A*x = (lambda)*x +!! +!! JOBZ (input) CHARACTER*1 +!! = "N": Compute eigenvalues only; +!! = "V": Compute eigenvalues and eigenvectors. +!! +!! UPLO (input) CHARACTER*1 +!! = "U": Upper triangle of A and B are stored; +!! = "L": Lower triangle of A and B are stored. +!! +!! N (input) INTEGER +!! The order of the matrices A and B. N >= 0. +!! +!! [comm]=MPI communicator for ScaLAPACK inversion. Only available if the code has been compiled with Scalapack support. +!! To avoid wasting CPU time the scalapack initialization is avoided if the number of processors in 1, +!! in this case the sequential LAPACK routine is called. +!! +!! OUTPUT +!! W (output) REAL(DP) array, dimension (N) +!! If INFO = 0, the eigenvalues in ascending order. +!! +!! See also SIDE EFFECTS +!! +!! SIDE EFFECTS +!! A (input/output) COMPLEX(DPC) array, dimension (N, N) +!! On entry, the Hermitian matrix A. If UPLO = "U", the leading N-by-N upper triangular part of A +!! contains the upper triangular part of the matrix A. +!! If UPLO = "L", the leading N-by-N lower triangular part of A contains the lower triangular part of the matrix A. +!! +!! On exit, if JOBZ = "V", then A contains the matrix Z of eigenvectors. +!! The eigenvectors are normalized as follows: if ITYPE = 1 or 2, +!! Z**H*B*Z = I; if ITYPE = 3, Z**H*inv(B)*Z = I. +!! If JOBZ = "N", then on exit the upper triangle (if UPLO="U") or the lower triangle +!! (if UPLO="L") of A, including the diagonal, is destroyed. +!! +!! +!! B (input/output) COMPLEX*16 array, dimension (LDB, N) +!! On entry, the Hermitian positive definite matrix B. +!! If UPLO = "U", the leading N-by-N upper triangular part of B contains the upper triangular part of the matrix B. +!! If UPLO = "L", the leading N-by-N lower triangular part of B contains the lower triangular part of the matrix B. +!! +!! On exit, if INFO <= N, the part of B containing the matrix is overwritten by the triangular +!! factor U or L from the Cholesky factorization B = U**H*U or B = L*L**H. +!! +!! SOURCE + +subroutine wrap_ZHEGV(itype, jobz, uplo, n, a, b, w, comm) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: n,itype + integer,optional,intent(in) :: comm + character(len=*),intent(in) :: jobz,uplo +!arrays + complex(dpc),intent(inout) :: a(n,n),b(n,n) + real(dp),intent(out) :: w(n) + +!Local variables ------------------------------ +!scalars + integer :: lwork,info,nprocs,ii + logical :: use_scalapack + character(len=500) :: msg +!arrays + real(dp),allocatable :: rwork(:) + complex(dpc),allocatable :: work(:) +#ifdef HAVE_LINALG_SCALAPACK + integer :: ierr,istwf_k + type(matrix_scalapack) :: Slk_matA,Slk_matB + type(processor_scalapack) :: Slk_processor +#endif +!************************************************************************ + + use_scalapack=.FALSE. + if (PRESENT(comm)) then + nprocs = xmpi_comm_size(comm) +#ifdef HAVE_LINALG_SCALAPACK + use_scalapack = (nprocs>1) +#endif + end if + + SELECT CASE(use_scalapack) + CASE (.FALSE.) + lwork = MAX(1,2*n-1) + + ABI_MALLOC(work, (lwork)) + ABI_MALLOC(rwork, (MAX(1,3*n-2))) + + call ZHEGV(itype,jobz,uplo,n,a,n,b,n,w,work,lwork,rwork,info) + + if (info < 0) then + write(msg,'(a,i0,a)')" The ",-info,"-th argument of ZHEGV had an illegal value." + ABI_ERROR(msg) + end if + + if (info > 0) then + if (info<= n) then + write(msg,'(2a,i0,a)')& + "ZHEGV failed to converge: ",ch10,& + info," off-diagonal elements of an intermediate tridiagonal form did not converge to zero. " + else + ii = info -n + write(msg,'(3a,i0,3a)')& + "ZHEGV failed to converge: ",ch10,& + "The leading minor of order ",ii," of B is not positive definite. ",ch10,& + "The factorization of B could not be completed and no eigenvalues or eigenvectors were computed." + end if + ABI_ERROR(msg) + end if + + ABI_FREE(rwork) + ABI_FREE(work) + RETURN + + CASE (.TRUE.) + +#ifdef HAVE_LINALG_SCALAPACK + call Slk_processor%init(comm) + istwf_k=1 + + ! Initialize and fill Scalapack matrix from the global one. + call Slk_matA%init(n,n,Slk_processor,istwf_k) + call slk_matrix_from_global_dpc_2D(Slk_matA,uplo,a) + + call Slk_matB%init(n,n,Slk_processor,istwf_k) + call slk_matrix_from_global_dpc_2D(Slk_matB,uplo,b) + + ! Solve the problem with scaLAPACK. + ABI_ERROR("slk_pZHEGV not yet coded") + ! TODO + !% call slk_pzhegv(itype,jobz,uplo,Slk_matA,Slk_matB,w) + + call Slk_matB%free() + + if (firstchar(jobz,(/"V","v"/))) then ! A is overwritten with the eigenvectors + a = czero + call slk_matrix_to_global_dpc_2D(Slk_matA,"All",a) ! Fill the entries calculated by this node. + call xmpi_sum(a,comm,ierr) ! Fill the remaing entries of the global matrix + end if + + call Slk_matA%free() + call Slk_processor%free() + RETURN +#endif + + ABI_BUG("You should not be here!") + END SELECT + +end subroutine wrap_ZHEGV +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_hide_lapack/xhegv_cplex +!! NAME +!! xhegv_cplex +!! +!! FUNCTION +!! xhegv_cplex computes all the eigenvalues, and optionally, the eigenvectors of a +!! (real generalized symmetric-definite| complex generalized Hermitian-definite) +!! eigenproblem, of the form +!! A*x=(lambda)*B*x (1), +!! A*Bx=(lambda)*x, (2), or +!! B*A*x=(lambda)*x (3). +!! Here A and B are assumed to be (symmetric|Hermitian) and B is also positive definite. +!! +!! INPUTS +!! +!! ITYPE (input) INTEGER Specifies the problem type to be solved: +!! = 1: A*x = (lambda)*B*x +!! = 2: A*B*x = (lambda)*x +!! = 3: B*A*x = (lambda)*x +!! +!! JOBZ (input) CHARACTER*1 +!! = "N": Compute eigenvalues only; +!! = "V": Compute eigenvalues and eigenvectors. +!! +!! UPLO (input) CHARACTER*1 +!! = "U": Upper triangle of A and B are stored; +!! = "L": Lower triangle of A and B are stored. +!! +!! CPLEX Size of the first dimension of the A and B matrices. +!! 1 for a real symmetric matrix. +!! 2 for a complex Hermitian matrix. +!! +!! N (input) INTEGER +!! The order of the matrices A and B. N >= 0. +!! +!! [comm]=MPI communicator for ScaLAPACK inversion. Only available if the code has been compiled with Scalapack support. +!! To avoid wasting CPU time the scalapack initialization is avoided if the number of processors in 1, +!! in this case the sequential LAPACK routine is called. +!! +!! OUTPUT +!! W (output) REAL(DP) array, dimension (N) +!! If INFO = 0, the eigenvalues in ascending order. +!! +!! See also SIDE EFFECTS +!! +!! SIDE EFFECTS +!! A (input/output) REAL(DP) array, dimension (CPLEX,N, N) +!! On entry, the (real symmetric|Hermitian) matrix A. If UPLO = "U", the leading N-by-N upper triangular part of A +!! contains the upper triangular part of the matrix A. +!! If UPLO = "L", the leading N-by-N lower triangular part of A contains the lower triangular part of the matrix A. +!! +!! On exit, if JOBZ = "V", then A contains the matrix Z of eigenvectors. +!! The eigenvectors are normalized as follows: +!! if ITYPE =1 or 2: +!! Z**T*B*Z = I if CPLEX=1 +!! Z**H*B*Z = I if CPLEX=2. +!! if ITYPE = 3, +!! Z**T*inv(B)*Z = I if CPLEX=1 +!! Z**H*inv(B)*Z = I if CPLEX=2 +!! +!! If JOBZ = "N", then on exit the upper triangle (if UPLO="U") or the lower triangle +!! (if UPLO="L") of A, including the diagonal, is destroyed. +!! +!! +!! B (input/output) REAL(DP) array, dimension (CPLEX,N, N) +!! On entry, the (real symmetric|Hermitian) positive definite matrix B. +!! If UPLO = "U", the leading N-by-N upper triangular part of B contains the upper triangular part of the matrix B. +!! If UPLO = "L", the leading N-by-N lower triangular part of B contains the lower triangular part of the matrix B. +!! +!! On exit, if INFO <= N, the part of B containing the matrix is overwritten by the triangular +!! factor U or L from the Cholesky factorization +!! B = U**T*U or B = L*L**T if CPLEX=1 +!! B = U**H*U or B = L*L**H if CPLEX=2 +!! +!! SOURCE + +subroutine xhegv_cplex(itype, jobz, uplo, cplex, n, a, b, w, msg, ierr, comm) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: n,itype,cplex + character(len=*),intent(in) :: jobz, uplo + character(len=*),intent(out) :: msg + integer,intent(out) :: ierr + integer,optional,intent(in) :: comm +!arrays + real(dp),intent(inout) :: a(cplex,n,n), b(cplex,n,n) + real(dp),intent(out) :: w(n) + +!Local variables ------------------------------ +!scalars + integer :: lwork,nprocs,ii + logical :: use_scalapack +!arrays + real(dp),allocatable :: rwork(:), work_real(:) + complex(dpc),allocatable :: work_cplx(:) +#ifdef HAVE_LINALG_SCALAPACK + !integer :: istwf_k + !type(matrix_scalapack) :: Slk_matA,Slk_matB + !type(processor_scalapack) :: Slk_processor +#endif +!************************************************************************ + + use_scalapack = .FALSE. + if (present(comm)) then + nprocs = xmpi_comm_size(comm) +#ifdef HAVE_LINALG_SCALAPACK + use_scalapack = nprocs > 1 +#endif + end if + + if (all(cplex /= [1, 2])) then + write(msg,'(a,i0)')"Wrong value for cplex: ",cplex + ierr = 1; return + end if + + SELECT CASE(use_scalapack) + CASE (.FALSE.) + + if (cplex==1) then + ! Real symmetric case. + lwork = MAX(1,3*n-1) + + ABI_MALLOC(work_real,(lwork)) + call DSYGV(itype,jobz,uplo,n,a,n,b,n,w,work_real,lwork,ierr) + + if (ierr < 0) then + write(msg,'(a,i0,a)')" The ",-ierr,"-th argument of DSYGV had an illegal value." + end if + + if (ierr > 0) then + if (ierr <= n) then + write(msg,'(2a,i0,a)')& + " DSYGV failed to converge: ",ch10,& + ierr," off-diagonal elements of an intermediate tridiagonal form did not converge to zero. " + else + ii = ierr - n + write(msg,'(3a,i0,3a)')& + "DSYGV failed to converge: ",ch10,& + "The leading minor of order ",ii," of B is not positive definite. ",ch10,& + "The factorization of B could not be completed and no eigenvalues or eigenvectors were computed." + end if + end if + + ABI_FREE(work_real) + return + + else + ! complex Hermitian case + lwork = MAX(1,2*n-1) + + ABI_MALLOC(work_cplx,(lwork)) + ABI_MALLOC(rwork,(MAX(1,3*n-2))) + + call ZHEGV(itype,jobz,uplo,n,a,n,b,n,w,work_cplx,lwork,rwork,ierr) + + if (ierr < 0) then + write(msg,'(a,i0,a)')" The ",-ierr,"-th argument of ZHEGV had an illegal value." + end if + + if (ierr > 0) then + if (ierr <= n) then + write(msg,'(2a,i0,a)')& + "ZHEGV failed to converge: ",ch10,& + ierr," off-diagonal elements of an intermediate tridiagonal form did not converge to zero. " + else + ii = ierr -n + write(msg,'(3a,i0,3a)')& + "ZHEGV failed to converge: ",ch10,& + "The leading minor of order ",ii," of B is not positive definite. ",ch10,& + "The factorization of B could not be completed and no eigenvalues or eigenvectors were computed." + end if + end if + + ABI_FREE(rwork) + ABI_FREE(work_cplx) + return + end if ! cplex + + CASE (.TRUE.) + +#ifdef HAVE_LINALG_SCALAPACK + + ABI_ERROR("Not coded yet") + ! call Slk_processor%init(comm) + ! istwf_k=1 + + ! ! Initialize and fill Scalapack matrix from the global one. + ! call Slk_matA%init(n,n,Slk_processor,istwf_k) + ! call slk_matrix_from_global_dpc_2D(Slk_matA,uplo,a) + + ! call Slk_matB%init(n,n,Slk_processor,istwf_k) + ! call slk_matrix_from_global_dpc_2D(Slk_matB,uplo,b) + + ! ! Solve the problem with scaLAPACK. + ! ABI_ERROR("slk_pZHEGV not yet coded") + ! ! TODO + ! call slk_pzhegv(itype,jobz,uplo,Slk_matA,Slk_matB,w) + + ! call Slk_matB%free() + ! + ! if (firstchar(jobz,(/"V","v"/))) then ! A is overwritten with the eigenvectors + ! a = czero + ! call slk_matrix_to_global_dpc_2D(Slk_matA,"All",a) ! Fill the entries calculated by this node. + ! call xmpi_sum(a,comm,ierr) ! Fill the remaing entries of the global matrix + ! end if + + ! call Slk_matA%free() + + ! call Slk_processor%free() + + RETURN +#endif + + ABI_BUG("You should not be here!") + END SELECT + +end subroutine xhegv_cplex +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_hide_lapack/wrap_ZHEEVX +!! NAME +!! wrap_ZHEEVX +!! +!! FUNCTION +!! wrap_ZHEEVX computes selected eigenvalues and, optionally, eigenvectors +!! of a complex Hermitian matrix A. Eigenvalues and eigenvectors can +!! be selected by specifying either a range of values or a range of +!! indices for the desired eigenvalues. +!! +!! INPUTS +!! JOBZ (input) CHARACTER*1 +!! = 'N': Compute eigenvalues only; +!! = 'V': Compute eigenvalues and eigenvectors. +!! +!! RANGE (input) CHARACTER*1 +!! = 'A': all eigenvalues will be found. +!! = 'V': all eigenvalues in the half-open interval (VL,VU] +!! will be found. +!! = 'I': the IL-th through IU-th eigenvalues will be found. +!! +!! UPLO (input) CHARACTER*1 +!! = 'U': Upper triangle of A is stored; +!! = 'L': Lower triangle of A is stored. +!! +!! N (input) INTEGER +!! The order of the matrix A. N >= 0. +!! +!! LDA (input) INTEGER +!! The leading dimension of the array A. LDA >= max(1,N). +!! +!! VL (input) REAL(DP) +!! VU (input) REAL(DP) +!! If RANGE='V', the lower and upper bounds of the interval to +!! be searched for eigenvalues. VL < VU. +!! Not referenced if RANGE = 'A' or 'I'. +!! +!! IL (input) INTEGER +!! IU (input) INTEGER +!! If RANGE='I', the indices (in ascending order) of the +!! smallest and largest eigenvalues to be returned. +!! 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0. +!! Not referenced if RANGE = 'A' or 'V'. +!! +!! ABSTOL (input) REAL(DP) +!! The absolute error tolerance for the eigenvalues. +!! An approximate eigenvalue is accepted as converged +!! when it is determined to lie in an interval [a,b] +!! of width less than or equal to +!! +!! ABSTOL + EPS * max( |a|,|b| ) , +!! +!! where EPS is the machine precision. If ABSTOL is less than +!! or equal to zero, then EPS*|T| will be used in its place, +!! where |T| is the 1-norm of the tridiagonal matrix obtained +!! by reducing A to tridiagonal form. +!! +!! Eigenvalues will be computed most accurately when ABSTOL is +!! set to twice the underflow threshold 2*DLAMCH('S'), not zero. +!! If this routine returns with INFO>0, indicating that some +!! eigenvectors did not converge, try setting ABSTOL to +!! 2*DLAMCH('S'). +!! +!! See "Computing Small Singular Values of Bidiagonal Matrices +!! with Guaranteed High Relative Accuracy," by Demmel and +!! Kahan, LAPACK Working Note #3. +!! +!! LDZ (input) INTEGER +!! The leading dimension of the array Z. LDZ >= 1, and if +!! JOBZ = 'V', LDZ >= max(1,N). +!! +!! [comm]=MPI communicator for ScaLAPACK inversion. Only available if the code has been compiled with Scalapack support. +!! To avoid wasting CPU time the scalapack initialization is avoided if the number of processors in 1, +!! in this case the sequential LAPACK routine is called. +!! +!! OUTPUT +!! M (output) INTEGER +!! The total number of eigenvalues found. 0 <= M <= N. +!! If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1. +!! +!! W (output) REAL(DP) array, dimension (N) +!! On normal exit, the first M elements contain the selected +!! eigenvalues in ascending order. +!! +!! Z (output) COMPLEX(DPC) array, dimension (LDZ, max(1,M)) +!! If JOBZ = 'V', then if INFO = 0, the first M columns of Z +!! contain the orthonormal eigenvectors of the matrix A +!! corresponding to the selected eigenvalues, with the i-th +!! column of Z holding the eigenvector associated with W(i). +!! If an eigenvector fails to converge, then that column of Z +!! contains the latest approximation to the eigenvector, and the +!! index of the eigenvector is returned in IFAIL. +!! If JOBZ = 'N', then Z is not referenced. +!! Note: the user must ensure that at least max(1,M) columns are +!! supplied in the array Z; if RANGE = 'V', the exact value of M +!! is not known in advance and an upper bound must be used. +!! +!! See also SIDE EFFECTS +!! +!! SIDE EFFECTS +!! A (input/output) COMPLEX(DPC) array, dimension (N, N) +!! On entry, the Hermitian matrix A. If UPLO = 'U', the +!! leading N-by-N upper triangular part of A contains the +!! upper triangular part of the matrix A. If UPLO = 'L', +!! the leading N-by-N lower triangular part of A contains +!! the lower triangular part of the matrix A. +!! On exit, the lower triangle (if UPLO='L') or the upper +!! triangle (if UPLO='U') of A, including the diagonal, is +!! destroyed. +!! +!! SOURCE + +subroutine wrap_ZHEEVX(jobz,range,uplo,n,a,vl,vu,il,iu,abstol,m,w,z,ldz,comm) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: il,iu,ldz,n + integer,optional,intent(in) :: comm + integer,intent(inout) :: m + real(dp),intent(in) :: abstol,vl,vu + character(len=*),intent(in) :: jobz,range,uplo +!arrays + real(dp),intent(out) :: w(n) + complex(dpc),intent(out) :: z(ldz,m) + complex(dpc),intent(inout) :: a(n,n) + +!Local variables ------------------------------ +!scalars + integer :: lwork,info,nprocs + logical :: use_scalapack + character(len=500) :: msg +!arrays + integer,allocatable :: ifail(:),iwork(:) + real(dp),allocatable :: rwork(:) + complex(dpc),allocatable :: work(:) +#ifdef HAVE_LINALG_SCALAPACK + integer :: ierr,istwf_k + logical :: want_eigenvectors + type(matrix_scalapack) :: Slk_mat,Slk_vec + type(processor_scalapack) :: Slk_processor +#endif + +!************************************************************************ + + use_scalapack=.FALSE. + if (PRESENT(comm)) then + nprocs = xmpi_comm_size(comm) +#ifdef HAVE_LINALG_SCALAPACK + use_scalapack = (nprocs>1) +#endif + end if + + SELECT CASE(use_scalapack) + CASE (.FALSE.) ! Standard LAPACK call. + + lwork = MAX(1,2*n) + ABI_MALLOC(work,(lwork)) + ABI_MALLOC(rwork,(7*n)) + ABI_MALLOC(iwork,(5*n)) + ABI_MALLOC(ifail,(n)) + + call ZHEEVX(jobz,range,uplo,n,a,n,vl,vu,il,iu,abstol,m,w,z,ldz,work,lwork,rwork,iwork,ifail,info) + + if (info < 0) then + write(msg,'(a,i0,a)')" The ",-info,"-th argument of ZHEEVX had an illegal value." + ABI_ERROR(msg) + end if + + if (info > 0) then + write(msg,'(2a,i0,a)')"ZHEEVX: the algorithm failed to converge; ",ch10,& + info,"eigenvectors failed to converge. " + ABI_ERROR(msg) + end if + + ABI_FREE(iwork) + ABI_FREE(ifail) + ABI_FREE(rwork) + ABI_FREE(work) + RETURN + + CASE (.TRUE.) + +#ifdef HAVE_LINALG_SCALAPACK + call Slk_processor%init(comm) + istwf_k=1 + + ! Initialize and fill Scalapack matrix from the global one. + call Slk_mat%init(n,n,Slk_processor,istwf_k) + call slk_matrix_from_global_dpc_2D(Slk_mat,uplo,a) + + want_eigenvectors = firstchar(jobz,(/"V","v"/)) + if (want_eigenvectors) then + ! Initialize the distributed vectors. + call Slk_vec%init(n,n,Slk_processor,istwf_k) + end if + + ! Solve the problem. + call slk_mat%pzheevx(jobz,range,uplo,vl,vu,il,iu,abstol,Slk_vec,m,w) + call Slk_mat%free() + + if (want_eigenvectors) then ! A is overwritten with the eigenvectors + z = czero + call slk_matrix_to_global_dpc_2D(Slk_vec,"All",z) ! Fill the entries calculated by this node. + call Slk_vec%free() + call xmpi_sum(z,comm,ierr) ! Fill the remaing entries of the global matrix + end if + + call Slk_processor%free() + RETURN +#endif + + ABI_BUG("You should not be here!") + END SELECT + +end subroutine wrap_ZHEEVX +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_hide_lapack/xheevx_cplex +!! NAME +!! xheevx_cplex +!! +!! FUNCTION +!! xheevx_cplex computes selected eigenvalues and, optionally, eigenvectors +!! of a (real symmetric|complex Hermitian) matrix A. Eigenvalues and eigenvectors can +!! be selected by specifying either a range of values or a range of +!! indices for the desired eigenvalues. +!! +!! INPUTS +!! JOBZ (input) CHARACTER*1 +!! = 'N': Compute eigenvalues only; +!! = 'V': Compute eigenvalues and eigenvectors. +!! +!! RANGE (input) CHARACTER*1 +!! = 'A': all eigenvalues will be found. +!! = 'V': all eigenvalues in the half-open interval (VL,VU] +!! will be found. +!! = 'I': the IL-th through IU-th eigenvalues will be found. +!! +!! UPLO (input) CHARACTER*1 +!! = 'U': Upper triangle of A is stored; +!! = 'L': Lower triangle of A is stored. +!! +!! CPLEX Size of the first dimension of the matrix A. +!! 1 for real symmetric matrix +!! 2 for complex Hermitian matrix. +!! +!! N (input) INTEGER +!! The order of the matrix A. N >= 0. +!! +!! LDA (input) INTEGER +!! The leading dimension of the array A. LDA >= max(1,N). +!! +!! VL (input) REAL(DP) +!! VU (input) REAL(DP) +!! If RANGE='V', the lower and upper bounds of the interval to +!! be searched for eigenvalues. VL < VU. +!! Not referenced if RANGE = 'A' or 'I'. +!! +!! IL (input) INTEGER +!! IU (input) INTEGER +!! If RANGE='I', the indices (in ascending order) of the +!! smallest and largest eigenvalues to be returned. +!! 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0. +!! Not referenced if RANGE = 'A' or 'V'. +!! +!! ABSTOL (input) REAL(DP) +!! The absolute error tolerance for the eigenvalues. +!! An approximate eigenvalue is accepted as converged +!! when it is determined to lie in an interval [a,b] +!! of width less than or equal to +!! +!! ABSTOL + EPS * max( |a|,|b| ) , +!! +!! where EPS is the machine precision. If ABSTOL is less than +!! or equal to zero, then EPS*|T| will be used in its place, +!! where |T| is the 1-norm of the tridiagonal matrix obtained +!! by reducing A to tridiagonal form. +!! +!! Eigenvalues will be computed most accurately when ABSTOL is +!! set to twice the underflow threshold 2*DLAMCH('S'), not zero. +!! If this routine returns with INFO>0, indicating that some +!! eigenvectors did not converge, try setting ABSTOL to +!! 2*DLAMCH('S'). +!! +!! See "Computing Small Singular Values of Bidiagonal Matrices +!! with Guaranteed High Relative Accuracy," by Demmel and +!! Kahan, LAPACK Working Note #3. +!! +!! LDZ (input) INTEGER +!! The leading dimension of the array Z. LDZ >= 1, and if +!! JOBZ = 'V', LDZ >= max(1,N). +!! +!! [comm]=MPI communicator for ScaLAPACK inversion. Only available if the code has been compiled with Scalapack support. +!! To avoid wasting CPU time the scalapack initialization is avoided if the number of processors in 1, +!! in this case the sequential LAPACK routine is called. +!! +!! OUTPUT +!! M (output) INTEGER +!! The total number of eigenvalues found. 0 <= M <= N. +!! If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1. +!! +!! W (output) REAL(DP) array, dimension (N) +!! On normal exit, the first M elements contain the selected +!! eigenvalues in ascending order. +!! +!! Z (output) REAL(DP) array, dimension (CPLEX, LDZ, max(1,M)) +!! If JOBZ = 'V', then if INFO = 0, the first M columns of Z +!! contain the orthonormal eigenvectors of the matrix A +!! corresponding to the selected eigenvalues, with the i-th +!! column of Z holding the eigenvector associated with W(i). +!! If an eigenvector fails to converge, then that column of Z +!! contains the latest approximation to the eigenvector, and the +!! index of the eigenvector is returned in IFAIL. +!! If JOBZ = 'N', then Z is not referenced. +!! Note: the user must ensure that at least max(1,M) columns are +!! supplied in the array Z; if RANGE = 'V', the exact value of M +!! is not known in advance and an upper bound must be used. +!! +!! See also SIDE EFFECTS +!! +!! SIDE EFFECTS +!! A (input/output) REAL(DP) array, dimension (CPLEX, N, N) +!! On entry, the (real symmetric|complex Hermitian) matrix A. If UPLO = 'U', the +!! leading N-by-N upper triangular part of A contains the +!! upper triangular part of the matrix A. If UPLO = 'L', +!! the leading N-by-N lower triangular part of A contains +!! the lower triangular part of the matrix A. +!! On exit, the lower triangle (if UPLO='L') or the upper +!! triangle (if UPLO='U') of A, including the diagonal, is +!! destroyed. +!! +!! SOURCE + +subroutine xheevx_cplex(jobz, range, uplo, cplex, n, a, vl, vu, il, iu, & + abstol, m, w, z, ldz, msg, ierr, comm) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: il,iu,ldz,n,cplex + integer,optional,intent(in) :: comm + integer,intent(inout) :: m + integer,intent(out) :: ierr + real(dp),intent(in) :: abstol,vl,vu + character(len=*),intent(in) :: jobz,range,uplo + character(len=*),intent(out) :: msg +!arrays + real(dp),intent(out) :: w(n) + !real(dp),intent(out) :: z(cplex,ldz,n) + real(dp),intent(out) :: z(cplex,ldz,m) + real(dp),intent(inout) :: a(cplex,n,n) + +!Local variables ------------------------------ +!scalars + integer :: lwork,nprocs + logical :: use_scalapack +!arrays + integer,allocatable :: ifail(:),iwork(:) + real(dp),allocatable :: rwork(:) + real(dp),allocatable :: work_real(:) + complex(dpc),allocatable :: work_cplx(:) +#ifdef HAVE_LINALG_SCALAPACK + !integer :: istwf_k + !logical :: want_eigenvectors + !type(matrix_scalapack) :: Slk_mat,Slk_vec + !type(processor_scalapack) :: Slk_processor +#endif + +!************************************************************************ + + use_scalapack=.FALSE. + if (PRESENT(comm)) then + nprocs = xmpi_comm_size(comm) +#ifdef HAVE_LINALG_SCALAPACK + use_scalapack = (nprocs>1) +#endif + end if + + if (ALL(cplex/=(/1,2/))) then + write(msg,'(a,i0)')" Wrong value for cplex: ",cplex + ierr = 1; return + end if + + SELECT CASE(use_scalapack) + CASE (.FALSE.) + ! Standard LAPACK call. + + if (cplex==1) then + ! Real symmetric case + lwork = MAX(1,8*n) + ABI_MALLOC(work_real,(lwork)) + ABI_MALLOC(iwork,(5*n)) + ABI_MALLOC(ifail,(n)) + + call DSYEVX(jobz,range,uplo,n,a,n,vl,vu,il,iu,abstol,m,w,z,ldz,work_real,lwork,iwork,ifail,ierr) + + if (ierr < 0) then + write(msg,'(a,i0,a)')" The ",-ierr,"-th argument of DSYEVX had an illegal value." + end if + + if (ierr > 0) then + write(msg,'(2a,i0,a)')& + "DSYEVX: the algorithm failed to converge; ",ch10,ierr,"eigenvectors failed to converge. " + end if + + ABI_FREE(work_real) + ABI_FREE(iwork) + ABI_FREE(ifail) + RETURN + + else + ! Complex Hermitian case. + lwork = MAX(1,2*n) + ABI_MALLOC(work_cplx,(lwork)) + ABI_MALLOC(rwork,(7*n)) + ABI_MALLOC(iwork,(5*n)) + ABI_MALLOC(ifail,(n)) + + call ZHEEVX(jobz,range,uplo,n,a,n,vl,vu,il,iu,abstol,m,w,z,ldz,work_cplx,lwork,rwork,iwork,ifail,ierr) + + if (ierr < 0) then + write(msg,'(a,i0,a)')" The ",-ierr,"-th argument of ZHEEVX had an illegal value." + end if + + if (ierr > 0) then + write(msg,'(2a,i0,a)')& + "ZHEEVX: the algorithm failed to converge; ",ch10,ierr,"eigenvectors failed to converge. " + end if + + ABI_FREE(iwork) + ABI_FREE(ifail) + ABI_FREE(rwork) + ABI_FREE(work_cplx) + RETURN + end if + + CASE (.TRUE.) + +#ifdef HAVE_LINALG_SCALAPACK + ABI_ERROR("Not coded yet") + ! call Slk_processor%init(comm) + ! istwf_k=1 + + ! ! Initialize and fill Scalapack matrix from the global one. + ! call Slk_mat%init(n,n,Slk_processor,istwf_k) + ! call slk_matrix_from_global_dpc_2D(Slk_mat,uplo,a) + + ! want_eigenvectors = firstchar(jobz,(/"V","v"/)) + ! if (want_eigenvectors) then ! Initialize the distributed vectors. + ! call Slk_vec%init(n,n,Slk_processor,istwf_k) + ! end if + + ! ! Solve the problem. + ! call slk_mat%pzheevx(jobz,range,uplo,vl,vu,il,iu,abstol,Slk_vec,m,w) + ! call Slk_mat%free() + ! + ! if (want_eigenvectors) then ! A is overwritten with the eigenvectors + ! z = czero + ! call slk_matrix_to_global_dpc_2D(Slk_vec,"All",z) ! Fill the entries calculated by this node. + ! call Slk_vec%free() + ! call xmpi_sum(z,comm,ierr) ! Fill the remaing entries of the global matrix + ! end if + + ! call Slk_processor%free() + + RETURN +#endif + + ABI_BUG("You should not be here!") + END SELECT + +end subroutine xheevx_cplex +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_hide_lapack/wrap_ZHEGVX +!! NAME +!! wrap_ZHEGVX +!! +!! FUNCTION +!! wrap_ZHEGVX - compute selected eigenvalues, and optionally, eigenvectors of a +!! complex generalized Hermitian-definite eigenproblem, of the form A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x. +!! Eigenvalues and eigenvectors can be selected by specifying either a range of values or a range of +!! indices for the desired eigenvalues. +!! +!! INPUTS +!! +!! ITYPE (input) INTEGER Specifies the problem type to be solved: +!! = 1: A*x = (lambda)*B*x +!! = 2: A*B*x = (lambda)*x +!! = 3: B*A*x = (lambda)*x +!! +!! JOBZ (input) CHARACTER*1 +!! = 'N': Compute eigenvalues only; +!! = 'V': Compute eigenvalues and eigenvectors. +!! +!! RANGE (input) CHARACTER*1 +!! = 'A': all eigenvalues will be found. +!! = 'V': all eigenvalues in the half-open interval (VL,VU] +!! will be found. +!! = 'I': the IL-th through IU-th eigenvalues will be found. +!! +!! UPLO (input) CHARACTER*1 +!! = 'U': Upper triangle of A is stored; +!! = 'L': Lower triangle of A is stored. +!! +!! N (input) INTEGER +!! The order of the matrices A and B. N >= 0. +!! +!! LDA (input) INTEGER +!! The leading dimension of the array A. LDA >= max(1,N). +!! +!! VL (input) REAL(DP) +!! VU (input) REAL(DP) +!! If RANGE='V', the lower and upper bounds of the interval to +!! be searched for eigenvalues. VL < VU. +!! Not referenced if RANGE = 'A' or 'I'. +!! +!! IL (input) INTEGER +!! IU (input) INTEGER +!! If RANGE='I', the indices (in ascending order) of the +!! smallest and largest eigenvalues to be returned. +!! 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0. +!! Not referenced if RANGE = 'A' or 'V'. +!! +!! ABSTOL (input) REAL(DP) +!! The absolute error tolerance for the eigenvalues. +!! An approximate eigenvalue is accepted as converged +!! when it is determined to lie in an interval [a,b] +!! of width less than or equal to +!! +!! ABSTOL + EPS * max( |a|,|b| ) , +!! +!! where EPS is the machine precision. If ABSTOL is less than +!! or equal to zero, then EPS*|T| will be used in its place, +!! where |T| is the 1-norm of the tridiagonal matrix obtained +!! by reducing A to tridiagonal form. +!! +!! Eigenvalues will be computed most accurately when ABSTOL is +!! set to twice the underflow threshold 2*DLAMCH('S'), not zero. +!! If this routine returns with INFO>0, indicating that some +!! eigenvectors did not converge, try setting ABSTOL to +!! 2*DLAMCH('S'). +!! +!! LDZ (input) INTEGER +!! The leading dimension of the array Z. LDZ >= 1, and if +!! JOBZ = 'V', LDZ >= max(1,N). +!! +!! [comm]=MPI communicator for ScaLAPACK inversion. Only available if the code has been compiled with Scalapack support. +!! To avoid wasting CPU time the scalapack initialization is avoided if the number of processors in 1, +!! in this case the sequential LAPACK routine is called. +!! +!! OUTPUT +!! M (output) INTEGER +!! The total number of eigenvalues found. 0 <= M <= N. +!! If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1. +!! +!! W (output) REAL(DP) array, dimension (N) +!! On normal exit, the first M elements contain the selected +!! eigenvalues in ascending order. +!! +!! Z (output) COMPLEX(DPC) array, dimension (LDZ, max(1,M)) +!! If JOBZ = 'V', then if INFO = 0, the first M columns of Z +!! contain the orthonormal eigenvectors of the matrix A +!! corresponding to the selected eigenvalues, with the i-th +!! column of Z holding the eigenvector associated with W(i). +!! The eigenvectors are normalized as follows: if ITYPE = 1 or 2, Z**T*B*Z = I; if ITYPE = 3, Z**T*inv(B)*Z = I. +!! If an eigenvector fails to converge, then that column of Z +!! contains the latest approximation to the eigenvector, and the +!! index of the eigenvector is returned in IFAIL. +!! If JOBZ = 'N', then Z is not referenced. +!! Note: the user must ensure that at least max(1,M) columns are +!! supplied in the array Z; if RANGE = 'V', the exact value of M +!! is not known in advance and an upper bound must be used. +!! +!! See also SIDE EFFECTS +!! +!! SIDE EFFECTS +!! A (input/output) COMPLEX(DPC) array, dimension (N, N) +!! On entry, the Hermitian matrix A. If UPLO = 'U', the +!! leading N-by-N upper triangular part of A contains the +!! upper triangular part of the matrix A. If UPLO = "L", +!! the leading N-by-N lower triangular part of A contains +!! the lower triangular part of the matrix A. +!! +!! On exit, the lower triangle (if UPLO="L") or the upper +!! triangle (if UPLO="U") of A, including the diagonal, is +!! destroyed. +!! +!! B (input/output) COMPLEX(DPC) array, dimension (LDB, N) +!! On entry, the Hermitian matrix B. If UPLO = "U", the leading N-by-N upper triangular part +!! of B contains the upper triangular part of the matrix B. +!! If UPLO = "L", the leading N-by-N lower triangular part of B contains the lower triangular part of the matrix B. +!! +!! On exit, if INFO <= N, the part of B containing the matrix is overwritten by the triangular factor +!! U or L from the Cholesky factorization B = U**H*U or B = L*L**H. +!! +!! SOURCE + +subroutine wrap_ZHEGVX(itype,jobz,range,uplo,n,a,b,vl,vu,il,iu,abstol,m,w,z,ldz,comm) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: il,iu,ldz,n,itype + integer,optional,intent(in) :: comm + integer,intent(inout) :: m + real(dp),intent(in) :: abstol,vl,vu + character(len=*),intent(in) :: jobz,range,uplo +!arrays + real(dp),intent(out) :: w(n) + !complex(dpc),intent(out) :: z(ldz,n) + complex(dpc),intent(out) :: z(ldz,m) + complex(dpc),intent(inout) :: a(n,n),b(n,n) + +!Local variables ------------------------------ +!scalars + integer :: lwork,info,nprocs,ii + logical :: use_scalapack + character(len=500) :: msg +!arrays + integer,allocatable :: ifail(:),iwork(:) + real(dp),allocatable :: rwork(:) + complex(dpc),allocatable :: work(:) +#ifdef HAVE_LINALG_SCALAPACK + integer :: ierr,istwf_k + logical :: want_eigenvectors + type(matrix_scalapack) :: Slk_matA,Slk_matB,Slk_vec + type(processor_scalapack) :: Slk_processor +#endif + +!************************************************************************ + + use_scalapack=.FALSE. + if (PRESENT(comm)) then + nprocs = xmpi_comm_size(comm) +#ifdef HAVE_LINALG_SCALAPACK + use_scalapack = (nprocs>1) +#endif + end if + + SELECT CASE(use_scalapack) + CASE (.FALSE.) + ! Standard LAPACK call. + lwork = MAX(1,2*n) + ABI_MALLOC(work,(lwork)) + ABI_MALLOC(rwork,(7*n)) + ABI_MALLOC(iwork,(5*n)) + ABI_MALLOC(ifail,(n)) + + call ZHEGVX(itype,jobz,range,uplo,n,a,n,b,n,vl,vu,il,iu,abstol,m,w,z,ldz,work,lwork,rwork,iwork,ifail,info) + + if (info < 0) then + write(msg,'(a,i0,a)')" The ",-info,"-th argument of ZHEGVX had an illegal value." + ABI_ERROR(msg) + end if + + if (info > 0) then + if (info<= n) then + write(msg,'(a,i0,a)')"ZHEGVX failed to converge: ",info," eigenvectors failed to converge. " + else + ii = info -n + write(msg,'(3a,i0,3a)')& + "ZHEEVX failed to converge: ",ch10,& + "The leading minor of order ",ii," of B is not positive definite. ",ch10,& + "The factorization of B could not be completed and no eigenvalues or eigenvectors were computed." + end if + ABI_ERROR(msg) + end if + + ABI_FREE(iwork) + ABI_FREE(ifail) + ABI_FREE(rwork) + ABI_FREE(work) + RETURN + + CASE (.TRUE.) + +#ifdef HAVE_LINALG_SCALAPACK + call Slk_processor%init(comm) + istwf_k=1 + + ! Initialize and fill Scalapack matrix from the global one. + call Slk_matA%init(n,n,Slk_processor,istwf_k) + call slk_matrix_from_global_dpc_2D(Slk_matA,uplo,a) + + call Slk_matB%init(n,n,Slk_processor,istwf_k) + call slk_matrix_from_global_dpc_2D(Slk_matB,uplo,b) + + want_eigenvectors = firstchar(jobz,(/"V","v"/)) + if (want_eigenvectors) then ! Initialize the distributed vectors. + call Slk_vec%init(n,n,Slk_processor,istwf_k) + end if + + ! Solve the problem. + ABI_ERROR("slk_pZHEGVX not coded yet") + ! TODO write the scaLAPACK wrapper. + !call slk_pZHEGVX(itype,jobz,range,uplo,Slk_matA,Slk_matB,vl,vu,il,iu,abstol,Slk_vec,m,w) + + call Slk_matA%free() + call Slk_matB%free() + + if (want_eigenvectors) then ! A is overwritten with the eigenvectors + z = czero + call slk_matrix_to_global_dpc_2D(Slk_vec,"All",z) ! Fill the entries calculated by this node. + call Slk_vec%free() + call xmpi_sum(z,comm,ierr) ! Fill the remaing entries of the global matrix + end if + + call Slk_processor%free() + + RETURN +#endif + + ABI_BUG("You should not be here!") + END SELECT + +end subroutine wrap_ZHEGVX +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_hide_lapack/xhegvx_cplex +!! NAME +!! xhegvx_cplex +!! +!! FUNCTION +!! xhegvx_cplex - compute selected eigenvalues, and optionally, eigenvectors of a +!! (real symmetric-definite|complex generalized Hermitian-definite) eigenproblem, of the form +!! A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x. +!! Here A and B are assumed to be (real symmetric|complex Hermitian) and B is also positive definite. +!! Eigenvalues and eigenvectors can be selected by specifying either a range of values or a range of +!! indices for the desired eigenvalues. +!! +!! INPUTS +!! +!! ITYPE (input) INTEGER Specifies the problem type to be solved: +!! = 1: A*x = (lambda)*B*x +!! = 2: A*B*x = (lambda)*x +!! = 3: B*A*x = (lambda)*x +!! +!! JOBZ (input) CHARACTER*1 +!! = 'N': Compute eigenvalues only; +!! = 'V': Compute eigenvalues and eigenvectors. +!! +!! RANGE (input) CHARACTER*1 +!! = 'A': all eigenvalues will be found. +!! = 'V': all eigenvalues in the half-open interval (VL,VU] +!! will be found. +!! = 'I': the IL-th through IU-th eigenvalues will be found. +!! +!! UPLO (input) CHARACTER*1 +!! = 'U': Upper triangle of A is stored; +!! = 'L': Lower triangle of A is stored. +!! +!! CPLEX Size of the first dimension of the matrices A and B +!! 1 for Real symmetric matrices +!! 2 for complex Hermitianmatrices +!! +!! N (input) INTEGER +!! The order of the matrices A and B. N >= 0. +!! +!! LDA (input) INTEGER +!! The leading dimension of the array A. LDA >= max(1,N). +!! +!! VL (input) REAL(DP) +!! VU (input) REAL(DP) +!! If RANGE='V', the lower and upper bounds of the interval to +!! be searched for eigenvalues. VL < VU. +!! Not referenced if RANGE = 'A' or 'I'. +!! +!! IL (input) INTEGER +!! IU (input) INTEGER +!! If RANGE='I', the indices (in ascending order) of the +!! smallest and largest eigenvalues to be returned. +!! 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0. +!! Not referenced if RANGE = 'A' or 'V'. +!! +!! ABSTOL (input) REAL(DP) +!! The absolute error tolerance for the eigenvalues. +!! An approximate eigenvalue is accepted as converged +!! when it is determined to lie in an interval [a,b] +!! of width less than or equal to +!! +!! ABSTOL + EPS * max( |a|,|b| ) , +!! +!! where EPS is the machine precision. If ABSTOL is less than +!! or equal to zero, then EPS*|T| will be used in its place, +!! where |T| is the 1-norm of the tridiagonal matrix obtained +!! by reducing A to tridiagonal form. +!! +!! Eigenvalues will be computed most accurately when ABSTOL is +!! set to twice the underflow threshold 2*DLAMCH('S'), not zero. +!! If this routine returns with INFO>0, indicating that some +!! eigenvectors did not converge, try setting ABSTOL to +!! 2*DLAMCH('S'). +!! +!! LDZ (input) INTEGER +!! The leading dimension of the array Z. LDZ >= 1, and if +!! JOBZ = 'V', LDZ >= max(1,N). +!! +!! [comm]=MPI communicator for ScaLAPACK inversion. Only available if the code has been compiled with Scalapack support. +!! To avoid wasting CPU time the scalapack initialization is avoided if the number of processors in 1, +!! in this case the sequential LAPACK routine is called. +!! +!! OUTPUT +!! M (output) INTEGER +!! The total number of eigenvalues found. 0 <= M <= N. +!! If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1. +!! +!! W (output) REAL(DP) array, dimension (N) +!! On normal exit, the first M elements contain the selected +!! eigenvalues in ascending order. +!! +!! Z (output) REAL(DP) array, dimension (CPLEX ,LDZ, max(1,M)) +!! If JOBZ = 'V', then if INFO = 0, the first M columns of Z +!! contain the orthonormal eigenvectors of the matrix A +!! corresponding to the selected eigenvalues, with the i-th +!! column of Z holding the eigenvector associated with W(i). +!! The eigenvectors are normalized as follows: +!! if ITYPE = 1 or 2, Z**T*B*Z = I; if ITYPE = 3, Z**T*inv(B)*Z = I. +!! +!! If an eigenvector fails to converge, then that column of Z +!! contains the latest approximation to the eigenvector, and the +!! index of the eigenvector is returned in IFAIL. +!! If JOBZ = 'N', then Z is not referenced. +!! Note: the user must ensure that at least max(1,M) columns are +!! supplied in the array Z; if RANGE = 'V', the exact value of M +!! is not known in advance and an upper bound must be used. +!! +!! See also SIDE EFFECTS +!! +!! SIDE EFFECTS +!! A (input/output) REAL(DP) array, dimension (CPLEX, N, N) +!! On entry, the (real symmetric| complex Hermitian) matrix A. If UPLO = 'U', the +!! leading N-by-N upper triangular part of A contains the +!! upper triangular part of the matrix A. If UPLO = "L", +!! the leading N-by-N lower triangular part of A contains +!! the lower triangular part of the matrix A. +!! +!! On exit, the lower triangle (if UPLO="L") or the upper +!! triangle (if UPLO="U") of A, including the diagonal, is +!! destroyed. +!! +!! B (input/output) REAL(DP) array, dimension (CPLEX, LDB, N) +!! On entry, the (real symmetric| complex Hermitian) matrix B. If UPLO = "U", the leading N-by-N upper triangular part +!! of B contains the upper triangular part of the matrix B. +!! If UPLO = "L", the leading N-by-N lower triangular part of B contains the lower triangular part of the matrix B. +!! +!! On exit, if INFO <= N, the part of B containing the matrix is overwritten by the triangular factor +!! U or L from the Cholesky factorization B = U**H*U or B = L*L**H. +!! +!! SOURCE + +subroutine xhegvx_cplex(itype, jobz, range, uplo, cplex, n, a, b, & + vl, vu, il, iu, abstol, m, w, z, ldz, msg, ierr, comm) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: il,iu,ldz,n,itype,cplex + integer,optional,intent(in) :: comm + integer,intent(inout) :: m + integer,intent(out) :: ierr + real(dp),intent(in) :: abstol,vl,vu + character(len=*),intent(in) :: jobz,range,uplo + character(len=*),intent(out) :: msg +!arrays + real(dp),intent(out) :: w(n) + !real(dp),intent(out) :: z(cplex,ldz,n) + real(dp),intent(out) :: z(cplex,ldz,m) + real(dp),intent(inout) :: a(cplex,n,n),b(cplex,n,n) + +!Local variables ------------------------------ +!scalars + integer :: lwork,nprocs,ii + logical :: use_scalapack +!arrays + integer,allocatable :: ifail(:),iwork(:) + real(dp),allocatable :: rwork(:) + real(dp),allocatable :: work_real(:) + complex(dpc),allocatable :: work_cplx(:) +#ifdef HAVE_LINALG_SCALAPACK + !integer :: istwf_k + !logical :: want_eigenvectors + !type(matrix_scalapack) :: Slk_matA,Slk_matB,Slk_vec + !type(processor_scalapack) :: Slk_processor +#endif + +!************************************************************************ + + use_scalapack=.FALSE. + if (PRESENT(comm)) then + nprocs = xmpi_comm_size(comm) +#ifdef HAVE_LINALG_SCALAPACK + use_scalapack = (nprocs>1) +#endif + end if + + if (ALL(cplex/=(/1,2/))) then + write(msg,'(a,i0)')" Wrong value for cplex: ",cplex + ierr = 1; return + end if + + SELECT CASE(use_scalapack) + + CASE (.FALSE.) + ! Standard LAPACK call. + if (cplex==1) then + ! Real symmetric case + lwork = MAX(1,8*n) + + ABI_MALLOC(work_real,(lwork)) + ABI_MALLOC(iwork,(5*n)) + ABI_MALLOC(ifail,(n)) + + call DSYGVX(itype,jobz,range,uplo,n,a,n,b,n,vl,vu,il,iu,abstol,m,w,z,ldz,work_real,lwork,iwork,ifail,ierr) + + if (ierr < 0) then + write(msg,'(a,i0,a)')" The ",-ierr,"-th argument of DSYGVX had an illegal value." + end if + + if (ierr > 0) then + if (ierr<= n) then + write(msg,'(a,i0,a)')" DSYGVX failed to converge: ",ierr," eigenvectors failed to converge. " + else + ii = ierr - n + write(msg,'(3a,i0,3a)')& + " DSYGVX failed to converge: ",ch10,& + " The leading minor of order ",ii," of B is not positive definite. ",ch10,& + " The factorization of B could not be completed and no eigenvalues or eigenvectors were computed." + end if + end if + + ABI_FREE(iwork) + ABI_FREE(ifail) + ABI_FREE(work_real) + RETURN + + else + ! Complex Hermitian case. + lwork = MAX(1,2*n) + + ABI_MALLOC(work_cplx,(lwork)) + ABI_MALLOC(rwork,(7*n)) + ABI_MALLOC(iwork,(5*n)) + ABI_MALLOC(ifail,(n)) + + !write(std_out,*)"Calling ZHEGVX" + call ZHEGVX(itype,jobz,range,uplo,n,a,n,b,n,vl,vu,il,iu,abstol,m,w,z,ldz,work_cplx,lwork,rwork,iwork,ifail,ierr) + + if (ierr < 0) then + write(msg,'(a,i0,a)')"The ",-ierr,"-th argument of ZHEGVX had an illegal value." + end if + + if (ierr > 0) then + if (ierr<= n) then + write(msg,'(a,i0,a)')"ZHEGVX failed to converge: ",ierr," eigenvectors failed to converge. " + else + ii = ierr -n + write(msg,'(3a,i0,3a)')& + "ZHEEVX failed to converge: ",ch10,& + "The leading minor of order ",ii," of B is not positive definite. ",ch10,& + "The factorization of B could not be completed and no eigenvalues or eigenvectors were computed." + end if + end if + + ABI_FREE(iwork) + ABI_FREE(ifail) + ABI_FREE(rwork) + ABI_FREE(work_cplx) + RETURN + end if ! cplex + + CASE (.TRUE.) + +#ifdef HAVE_LINALG_SCALAPACK + ABI_ERROR("not coded yet") + ! call Slk_processor%init(comm) + ! istwf_k=1 + + ! ! Initialize and fill Scalapack matrix from the global one. + ! call Slk_matA%init(n,n,Slk_processor,istwf_k) + ! call slk_matrix_from_global_dpc_2D(Slk_matA,uplo,a) + + ! call Slk_matB%init(n,n,Slk_processor,istwf_k) + ! call slk_matrix_from_global_dpc_2D(Slk_matB,uplo,b) + + ! want_eigenvectors = firstchar(jobz,(/"V","v"/)) + ! if (want_eigenvectors) then ! Initialize the distributed vectors. + ! call Slk_vec%init(n,n,Slk_processor,istwf_k) + ! end if + + ! ! Solve the problem. + ! ABI_ERROR("slk_pZHEGVX not coded yet") + ! ! TODO write the scaLAPACK wrapper. + ! call slk_pZHEGVX(itype,jobz,range,uplo,Slk_matA,Slk_matB,vl,vu,il,iu,abstol,Slk_vec,m,w) + + ! call Slk_matA%free() + ! call Slk_matB%free() + ! + ! if (want_eigenvectors) then ! A is overwritten with the eigenvectors + ! z = czero + ! call slk_matrix_to_global_dpc_2D(Slk_vec,"All",z) ! Fill the entries calculated by this node. + ! call Slk_vec%free() + ! call xmpi_sum(z,comm,ierr) ! Fill the remaing entries of the global matrix + ! end if + + ! call Slk_processor%free() + + ! RETURN +#endif + + ABI_BUG("You should not be here!") + END SELECT + +end subroutine xhegvx_cplex +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_hide_lapack/wrap_CGEEV +!! NAME +!! wrap_CGEEV +!! +!! FUNCTION +!! wrap_CGEEV computes for an N-by-N complex nonsymmetric matrix A, the +!! eigenvalues and, optionally, the left and/or right eigenvectors using single precision arithmetic. [PRIVATE] +!! +!! The right eigenvector v(j) of A satisfies: A * v(j) = lambda(j) * v(j) +!! where lambda(j) is its eigenvalue. +!! The left eigenvector u(j) of A satisfies u(j)**H * A = lambda(j) * u(j)**H +!! where u(j)**H denotes the conjugate transpose of u(j). +!! +!! The computed eigenvectors are normalized to have Euclidean norm +!! equal to 1 and largest component real. +!! +!! INPUTS +!! JOBVL (input) CHARACTER*1 +!! = 'N': left eigenvectors of A are not computed; +!! = 'V': left eigenvectors of are computed. +!! +!! JOBVR (input) CHARACTER*1 +!! = 'N': right eigenvectors of A are not computed; +!! = 'V': right eigenvectors of A are computed. +!! +!! N (input) INTEGER +!! The order of the matrix A. N >= 0. +!! +!! LDA (input) INTEGER +!! The leading dimension of the array A. LDA >= max(1,N). +!! +!! LDVL (input) INTEGER +!! The leading dimension of the array VL. LDVL >= 1; if +!! JOBVL = 'V', LDVL >= N. +!! +!! LDVR (input) INTEGER +!! The leading dimension of the array VR. LDVR >= 1; if +!! JOBVR = 'V', LDVR >= N. +!! +!! OUTPUT +!! W (output) COMPLEX(SPC) array, dimension (N) +!! W contains the computed eigenvalues. +!! VL (output) COMPLEX(SCP) array, dimension (LDVL,N) +!! If JOBVL = 'V', the left eigenvectors u(j) are stored one +!! after another in the columns of VL, in the same order +!! as their eigenvalues. +!! If JOBVL = 'N', VL is not referenced. +!! u(j) = VL(:,j), the j-th column of VL. +!! VR (output) COMPLEX(SPC) array, dimension (LDVR,N) +!! If JOBVR = 'V', the right eigenvectors v(j) are stored one +!! after another in the columns of VR, in the same order +!! as their eigenvalues. +!! If JOBVR = 'N', VR is not referenced. +!! v(j) = VR(:,j), the j-th column of VR. +!! +!! See also SIDE EFFECTS +!! +!! SIDE EFFECTS +!! A (input/output) COMPLEX(SPC) array, dimension (LDA,N) +!! On entry, the N-by-N matrix A. +!! On exit, A has been overwritten. +!! +!! SOURCE + +subroutine wrap_CGEEV(jobvl, jobvr, n, a, lda, w, vl, ldvl, vr, ldvr) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: n,lda,ldvl,ldvr + character(len=*),intent(in) :: jobvl,jobvr +!arrays + complex(spc),intent(inout) :: a(lda,n) + complex(spc),intent(out) :: w(n) + complex(spc),intent(out) :: vl(ldvl,n) + complex(spc),intent(out) :: vr(ldvr,n) + +!Local variables ------------------------------ +!scalars + integer :: info,lwork + character(len=500) :: msg +!arrays + real(sp),allocatable :: rwork(:) + complex(spc),allocatable :: work(:) + +!************************************************************************ + + lwork = MAX(1,2*n) + + ABI_MALLOC(work,(lwork)) + ABI_MALLOC(rwork,(2*n)) + + call CGEEV(jobvl,jobvr,n,a,lda,w,vl,ldvl,vr,ldvr,work,lwork,rwork,info) + + if (info < 0) then + write(msg,'(a,i0,a)')" The ",-info,"-th argument of CGEEV had an illegal value." + ABI_ERROR(msg) + end if + + if (info > 0) then + write(msg,'(3a,i0,a,i0,a)')& + "CGEEV: The QR algorithm failed to compute all the eigenvalues, and no eigenvectors have been computed;",ch10,& + "Elements ",info+1,":",n," of W contain eigenvalues which have converged. " + ABI_ERROR(msg) + end if + + ABI_FREE(work) + ABI_FREE(rwork) + +end subroutine wrap_CGEEV +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_hide_lapack/wrap_ZGEEV +!! NAME +!! wrap_ZGEEV +!! +!! FUNCTION +!! wrap_ZGEEV computes for an N-by-N complex nonsymmetric matrix A, the +!! eigenvalues and, optionally, the left and/or right eigenvectors using double precision arithmetic. [PRIVATE] +!! +!! The right eigenvector v(j) of A satisfies: A * v(j) = lambda(j) * v(j) +!! where lambda(j) is its eigenvalue. +!! The left eigenvector u(j) of A satisfies u(j)**H * A = lambda(j) * u(j)**H +!! where u(j)**H denotes the conjugate transpose of u(j). +!! +!! The computed eigenvectors are normalized to have Euclidean norm +!! equal to 1 and largest component real. +!! No scalapack version is available (PZGEEV is not provided by the Scalapack team) +!! +!! INPUTS +!! JOBVL (input) CHARACTER*1 +!! = 'N': left eigenvectors of A are not computed; +!! = 'V': left eigenvectors of are computed. +!! +!! JOBVR (input) CHARACTER*1 +!! = 'N': right eigenvectors of A are not computed; +!! = 'V': right eigenvectors of A are computed. +!! +!! N (input) INTEGER +!! The order of the matrix A. N >= 0. +!! +!! LDA (input) INTEGER +!! The leading dimension of the array A. LDA >= max(1,N). +!! +!! LDVL (input) INTEGER +!! The leading dimension of the array VL. LDVL >= 1; if +!! JOBVL = 'V', LDVL >= N. +!! +!! LDVR (input) INTEGER +!! The leading dimension of the array VR. LDVR >= 1; if +!! JOBVR = 'V', LDVR >= N. +!! +!! OUTPUT +!! W (output) COMPLEX(DPC) array, dimension (N) +!! W contains the computed eigenvalues. +!! VL (output) COMPLEX(DPC) array, dimension (LDVL,N) +!! If JOBVL = 'V', the left eigenvectors u(j) are stored one +!! after another in the columns of VL, in the same order +!! as their eigenvalues. +!! If JOBVL = 'N', VL is not referenced. +!! u(j) = VL(:,j), the j-th column of VL. +!! VR (output) COMPLEX(DPC) array, dimension (LDVR,N) +!! If JOBVR = 'V', the right eigenvectors v(j) are stored one +!! after another in the columns of VR, in the same order +!! as their eigenvalues. +!! If JOBVR = 'N', VR is not referenced. +!! v(j) = VR(:,j), the j-th column of VR. +!! +!! See also SIDE EFFECTS +!! +!! SIDE EFFECTS +!! A (input/output) COMPLEX(DPC) array, dimension (LDA,N) +!! On entry, the N-by-N matrix A. +!! On exit, A has been overwritten. +!! +!! SOURCE + +subroutine wrap_ZGEEV(jobvl,jobvr,n,a,lda,w,vl,ldvl,vr,ldvr) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: n,lda,ldvl,ldvr + character(len=*),intent(in) :: jobvl,jobvr +!arrays + complex(dpc),intent(inout) :: a(lda,n) + complex(dpc),intent(out) :: w(n) + complex(dpc),intent(out) :: vl(ldvl,n) + complex(dpc),intent(out) :: vr(ldvr,n) + +!Local variables ------------------------------ +!scalars + integer :: info,lwork + logical :: use_scalapack + character(len=500) :: msg +!arrays + real(dp),allocatable :: rwork(:) + complex(dpc),allocatable :: work(:) + +!************************************************************************ + + use_scalapack=.FALSE. + + SELECT CASE(use_scalapack) + CASE (.FALSE.) + + lwork = MAX(1,2*n) + ABI_MALLOC(work,(lwork)) + ABI_MALLOC(rwork,(2*n)) + + call ZGEEV(jobvl,jobvr,n,a,lda,w,vl,ldvl,vr,ldvr,work,lwork,rwork,info) + + if (info < 0) then + write(msg,'(a,i0,a)')" The ",-info,"-th argument of ZGEEV had an illegal value." + ABI_ERROR(msg) + end if + + if (info > 0) then + write(msg,'(3a,i0,a,i0,a)')& + "ZGEEV: The QR algorithm failed to compute all the eigenvalues, and no eigenvectors have been computed;",ch10,& + "Elements ",info+1,":",n," of W contain eigenvalues which have converged. " + ABI_ERROR(msg) + end if + + ABI_FREE(work) + ABI_FREE(rwork) + RETURN + + CASE (.TRUE.) + ABI_BUG("You should not be here!") + END SELECT + +end subroutine wrap_ZGEEV +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_hide_lapack/cginv +!! NAME +!! cginv +!! +!! FUNCTION +!! Invert a general matrix of complex elements in single precision. +!! CGETRF computes an LU factorization of a general N-by-N matrix A using partial pivoting with row interchanges. +!! CGETRI computes the inverse of a matrix using the LU factorization computed by CGETRF. +!! +!! INPUTS +!! n=size of complex matrix a +!! a=matrix of complex elements +!! [comm]=MPI communicator for ScaLAPACK inversion. Only available if the code has been compiled with Scalapack support. +!! To avoid wasting CPU time the scalapack initialization is avoided if the number of processors in 1, +!! in this case the sequential LAPACK routine is called. +!! +!! SIDE EFFECTS +!! a(n,n)= array of complex elements, input, inverted at output +!! +!! TODO +!! Add Scalapack version, matrix_scalapack has to be modified by adding a single precision complex buffer. +!! +!! SOURCE + +subroutine cginv(a, n, comm) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: n + integer,optional,intent(in) :: comm +!arrays + complex(spc),intent(inout) :: a(n,n) + +!Local variables------------------------------- +!scalars + integer :: lwork,info,nprocs + logical :: use_scalapack + character(len=500) :: msg +!arrays + integer,allocatable :: ipiv(:) + complex(spc),allocatable :: work(:) +#ifdef HAVE_LINALG_SCALAPACK + !integer :: ierr,istwf_k,ipiv_size,liwork + !integer,allocatable :: iwork(:) + !type(matrix_scalapack) :: Slk_mat + !type(processor_scalapack) :: Slk_processor +#endif + +! ************************************************************************* + + use_scalapack=.FALSE. + if (PRESENT(comm)) then + nprocs = xmpi_comm_size(comm) + ! TODO +!#ifdef HAVE_LINALG_SCALAPACK +! use_scalapack = (nprocs>1) +!#endif + end if + + SELECT CASE(use_scalapack) + + CASE (.FALSE.) + ABI_MALLOC(ipiv, (n)) + + call CGETRF(n,n,a,n,ipiv,info) ! P* L* U Factorization. + + if (info < 0) then + write(msg,'(a,i0,a)')" The ",-info,"-th argument of CGETRF had an illegal value." + ABI_ERROR(msg) + end if + + if (info > 0) then + write(msg,'(3a,i0,4a)')& + "The matrix that has been passed in argument is probably either singular or nearly singular.",ch10,& + "U(i,i) in the P*L*U factorization is exactly zero for i = ",info,ch10,& + "The factorization has been completed but the factor U is exactly singular.",ch10,& + "Division by zero will occur if it is used to solve a system of equations." + ABI_ERROR(msg) + end if + + lwork=MAX(1,n) + ABI_MALLOC(work,(lwork)) + + call CGETRI(n,a,n,ipiv,work,lwork,info) ! Inverts U and the computes inv(A) + + if (info < 0) then + write(msg,'(a,i0,a)')" The ",-info,"-th argument of CGETRI had an illegal value." + ABI_ERROR(msg) + end if + + if (info > 0) then + write(msg,'(3a,i0,a)')& + "The matrix that has been passed to this subroutine is probably either singular or nearly singular.",ch10,& + "U(i,i) for i= ",info," is exactly zero; the matrix is singular and its inverse could not be computed." + ABI_ERROR(msg) + end if + + ABI_FREE(ipiv) + ABI_FREE(work) + RETURN + + CASE (.TRUE.) + +#if 0 +! FIXME matrix_scalapack does not have a single precision complex buffer + +#ifdef HAVE_LINALG_SCALAPACK + call Slk_processor%init(comm) + istwf_k=1 + + ! Initialize and fill Scalapack matrix from the global one. + call Slk_mat%init(n,n,Slk_processor,istwf_k) + + ! IMPORTANT NOTE: PZGETRF requires square block decomposition i.e., MB_A = NB_A. + if ( Slk_mat%descript%tab(MB_)/=Slk_mat%descript%tab(NB_) ) then + msg ="PZGETRF requires square block decomposition i.e., MB_A = NB_A." + ABI_ERROR(msg) + end if + + !!call slk_matrix_from_global_dpc_2D(Slk_mat,"All",a) + + ipiv_size = my_locr(Slk_mat) + Slk_mat%descript%tab(MB_) + ABI_MALLOC(ipiv,(ipiv_size)) + + call PCGETRF(Slk_mat%sizeb_global(1),Slk_mat%sizeb_global(2),Slk_mat%buffer_cplx_sp,& +& 1,1,Slk_mat%descript%tab,ipiv,info) ! P * L * U Factorization. + + if (info/=0) then + write(msg,'(a,i0)')"PCGETRF returned info= ",info + ABI_ERROR(msg) + end if + + ! Get optimal size of workspace for PCGETRI. + lwork=-1; liwork=-1 + ABI_MALLOC(work,(1)) + ABI_MALLOC(iwork,(1)) + + call PCGETRI(Slk_mat%sizeb_global(1),Slk_mat%buffer_cplx_sp,1,1,Slk_mat%descript%tab,ipiv,& +& work,lwork,iwork,liwork,info) + + ABI_CHECK(info==0,"PZGETRI: Error during compuation of workspace size") + + lwork = NINT(DBLE(work(1))); liwork=iwork(1) + ABI_FREE(work) + ABI_FREE(iwork) + + ! Solve the problem. + ABI_MALLOC(work,(lwork)) + ABI_MALLOC(iwork,(liwork)) + + call PCGETRI(Slk_mat%sizeb_global(1),Slk_mat%buffer_cplx_sp,1,1,Slk_mat%descript%tab,ipiv,& +& work,lwork,iwork,liwork,info) + + if (info/=0) then + write(msg,'(a,i0)')"PZGETRI returned info= ",info + ABI_ERROR(msg) + end if + + ABI_FREE(work) + ABI_FREE(iwork) + ABI_FREE(ipiv) + + ! Reconstruct the global matrix from the distributed one. + a = czero + !! call slk_matrix_to_global_dpc_2D(Slk_mat,"All",a) ! Fill the entries calculated by this node. + call Slk_mat%free() + + call xmpi_sum(a,comm,ierr) ! Fill the remaing entries of the global matrix + call Slk_processor%free() + + RETURN +#endif + +#endif + + ABI_BUG("You should not be here!") + + END SELECT + +end subroutine cginv +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_hide_lapack/zginv +!! NAME +!! zginv +!! +!! FUNCTION +!! Invert a general matrix of complex elements in double precision. +!! ZGETRF computes an LU factorization of a general N-by-N matrix A using partial pivoting with row interchanges. +!! ZGETRI computes the inverse of a matrix using the LU factorization computed by ZGETRF. +!! +!! INPUTS +!! n=size of complex matrix a +!! a=matrix of complex elements +!! [comm]=MPI communicator for ScaLAPACK inversion. Only available if the code has been compiled with Scalapack support. +!! To avoid wasting CPU time the scalapack initialization is avoided if the number of processors in 1. +!! In this case the sequential LAPACK routine is called. +!! +!! SIDE EFFECTS +!! a(n,n)= array of complex elements, input, inverted at output +!! +!! SOURCE + +subroutine zginv(a, n, comm) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: n + integer,optional,intent(in) :: comm +!arrays + complex(dpc),intent(inout) :: a(n,n) + +!Local variables------------------------------- +!scalars + integer :: lwork,info,nprocs + logical :: use_scalapack + character(len=500) :: msg +!arrays + integer,allocatable :: ipiv(:) + complex(dpc),allocatable :: work(:) +#ifdef HAVE_LINALG_SCALAPACK + integer :: istwf_k,ierr + type(matrix_scalapack) :: Slk_mat + type(processor_scalapack) :: Slk_processor +#endif + +! ************************************************************************* + + use_scalapack=.FALSE. + if (PRESENT(comm)) then + nprocs = xmpi_comm_size(comm) +#ifdef HAVE_LINALG_SCALAPACK + use_scalapack = (nprocs>1) +#endif + end if + + SELECT CASE(use_scalapack) + CASE (.FALSE.) + ABI_MALLOC(ipiv, (n)) + call ZGETRF(n,n,a,n,ipiv,info) ! P* L* U Factorization. + + if (info < 0) then + write(msg,'(a,i0,a)')" The ",-info,"-th argument of ZGETRF had an illegal value." + ABI_ERROR(msg) + end if + + if (info > 0) then + write(msg,'(3a,i0,4a)')& + "The matrix that has been passed in argument is probably either singular or nearly singular.",ch10,& + "U(i,i) in the P*L*U factorization is exactly zero for i = ",info,ch10,& + "The factorization has been completed but the factor U is exactly singular.",ch10,& + "Division by zero will occur if it is used to solve a system of equations." + ABI_ERROR(msg) + end if + + lwork=MAX(1,n) + ABI_MALLOC(work,(lwork)) + + call ZGETRI(n,a,n,ipiv,work,lwork,info) ! Invert U and then compute inv(A) + + if (info < 0) then + write(msg,'(a,i0,a)')" The ",-info,"-th argument of ZGETRI had an illegal value." + ABI_ERROR(msg) + end if + + if (info > 0) then + write(msg,'(3a,i0,a)')& + "The matrix that has been passed to this subroutine is probably either singular or nearly singular.",ch10,& + "U(i,i) for i= ",info," is exactly zero; the matrix is singular and its inverse could not be computed." + ABI_ERROR(msg) + end if + + ABI_FREE(ipiv) + ABI_FREE(work) + RETURN + + CASE (.TRUE.) + +#ifdef HAVE_LINALG_SCALAPACK + call Slk_processor%init(comm) + istwf_k=1 + + ! Initialize and fill Scalapack matrix from the global one. + call Slk_mat%init(n,n,Slk_processor,istwf_k) + call slk_matrix_from_global_dpc_2D(Slk_mat,"All",a) + + ! Perform the calculation with scaLAPACK. + call Slk_mat%invert() + + ! Reconstruct the global matrix from the distributed one. + a = czero + call slk_matrix_to_global_dpc_2D(Slk_mat,"All",a) ! Fill the entries calculated by this node. + call Slk_mat%free() + + call xmpi_sum(a,comm,ierr) ! Fill the remaing entries of the global matrix + call Slk_processor%free() + + return +#endif + + ABI_BUG("You should not be here!") + END SELECT + +end subroutine zginv +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_hide_lapack/zhpd_invert +!! NAME +!! zhpd_invert +!! +!! FUNCTION +!! Invert a Hermitian positive definite matrix of complex elements in double precision. +!! +!! INPUTS +!! uplo= 'U': Upper triangle of A is stored; +!! = 'L': Lower triangle of A is stored. +!! n=size of complex matrix a +!! a=matrix of complex elements +!! [comm]=MPI communicator for ScaLAPACK inversion. Only available if the code has been compiled with Scalapack support. +!! To avoid wasting CPU time the scalapack initialization is avoided if the number of processors in 1. +!! In this case the sequential LAPACK routine is called. +!! +!! SIDE EFFECTS +!! a(n,n)= +!! On entry, the Hermitian matrix A. If UPLO = 'U', the leading +!! N-by-N upper triangular part of A contains the upper +!! triangular part of the matrix A, and the strictly lower +!! triangular part of A is not referenced. If UPLO = 'L', the +!! leading N-by-N lower triangular part of A contains the lower +!! triangular part of the matrix A, and the strictly upper +!! triangular part of A is not referenced. +!! On exit, the upper or lower triangle of the (Hermitian) inverse of A +!! +!! SOURCE + +subroutine zhpd_invert(uplo, a, n, comm) + +!Arguments ------------------------------------ +!scalars + character(len=*),intent(in) :: uplo + integer,intent(in) :: n + integer,optional,intent(in) :: comm +!arrays + complex(dpc),intent(inout) :: a(n,n) + +!Local variables------------------------------- +!scalars + integer :: info,nprocs + logical :: use_scalapack + character(len=500) :: msg +!arrays +#ifdef HAVE_LINALG_SCALAPACK + integer :: istwf_k,ierr + type(matrix_scalapack) :: Slk_mat + type(processor_scalapack) :: Slk_processor +#endif + +! ************************************************************************* + + use_scalapack=.FALSE. + if (PRESENT(comm)) then + nprocs = xmpi_comm_size(comm) +#ifdef HAVE_LINALG_SCALAPACK + use_scalapack = (nprocs>1) +#endif + end if + + SELECT CASE(use_scalapack) + CASE (.FALSE.) + ! * ZPOTRF computes the Cholesky factorization of a complex Hermitian positive definite. + ! * A = U**H * U, if UPLO = 'U', or + ! * A = L * L**H, if UPLO = 'L', + call ZPOTRF(uplo,n,a,n,info) + + if (info < 0) then + write(msg,'(a,i0,a)')" The ",-info,"-th argument of ZPOTRF had an illegal value." + ABI_ERROR(msg) + end if + + if (info > 0) then + write(msg,'(a,i0,3a)')& + "The leading minor of order ",info," is not positive definite, ",ch10,& + "and the factorization could not be completed." + ABI_ERROR(msg) + end if + ! + ! * ZPOTRI computes the inverse of a complex Hermitian positive definite + ! * matrix A using the Cholesky factorization A = U**H*U or A = L*L**H + ! * computed by ZPOTRF. + ! * On exit, the upper or lower triangle of the (Hermitian) + ! * inverse of A, overwriting the input factor U or L. + call ZPOTRI(uplo,n,a,n,info) + + if (info < 0) then + write(msg,'(a,i0,a)')" The ",-info,"-th argument of ZPOTRI had an illegal value." + ABI_ERROR(msg) + end if + + if (info > 0) then + write(msg,'(a,2(1x,i0),a)')& + "The ( ",info,info,")element of the factor U or L is zero, and the inverse could not be computed." + ABI_ERROR(msg) + end if + + RETURN + + CASE (.TRUE.) + +#ifdef HAVE_LINALG_SCALAPACK + call Slk_processor%init(comm) + istwf_k=1 + + ! Initialize and fill Scalapack matrix from the global one. + call Slk_mat%init(n,n,Slk_processor,istwf_k) + call slk_matrix_from_global_dpc_2D(Slk_mat,uplo,a) + + ! Perform the calculation with scaLAPACK. + call Slk_mat%hpd_invert(uplo, full=.False.) + + ! Reconstruct the global matrix from the distributed one. + a = czero + call slk_matrix_to_global_dpc_2D(Slk_mat,uplo,a) ! Fill the entries calculated by this node. + call Slk_mat%free() + + call xmpi_sum(a,comm,ierr) ! Fill the remaing entries of the global matrix + call Slk_processor%free() + + RETURN +#endif + + ABI_BUG("You should not be here!") + END SELECT + +end subroutine zhpd_invert +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_hide_lapack/matrginv +!! NAME +!! matrginv +!! +!! FUNCTION +!! Invert a general matrix of real*8 elements. +!! +!! INPUTS +!! lda=leading dimension of complex matrix a +!! n=size of complex matrix a +!! a=matrix of real elements +!! OUTPUT +!! a=inverse of a input matrix +!! +!! SIDE EFFECTS +!! a(lda,n)= array of real elements, input, inverted at output +!! +!! SOURCE + +subroutine matrginv(a,lda,n) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: lda,n +!arrays + real(dp),intent(inout) :: a(lda,n) + +!Local variables------------------------------- +!scalars + integer :: ierr,nwork +#if defined HAVE_LINALG_ESSL + real(dp) :: rcond +#endif + character(len=500) :: message +!arrays + integer,allocatable :: ipvt(:) +#if defined HAVE_LINALG_ESSL + real(dp) :: det(2) +#elif defined HAVE_LINALG_ASL + real(dp) :: det(2) +#endif + real(dp),allocatable :: work(:) + +! ************************************************************************* + +#if defined HAVE_LINALG_ESSL + nwork=200*n +#else + nwork=n +#endif + + ABI_MALLOC(work,(nwork)) + ABI_MALLOC(ipvt,(n)) + +#if defined HAVE_LINALG_ESSL + + call dgeicd(a,lda,n,0,rcond,det,work,nwork) + if(abs(rcond)==zero) then + write(message, '(7a)' )& + ' The matrix that has been passed in argument of this subroutine',ch10,& + ' is probably either singular or nearly singular.',ch10,& + ' The ESSL routine dgeicd failed.',ch10,& + ' Action: Contact ABINIT group ' + ABI_ERROR(message) + end if + +#elif defined HAVE_LINALG_ASL + + call dbgmlu(a,lda,n,ipvt,ierr) + if(ierr /= 0) then + write(message, '(7a)' ) ch10,& + ' The matrix that has been passed in argument of this subroutine',ch10,& + ' is probably either singular or nearly singular.',ch10,& + ' The ASL routine dbgmlu failed.',ch10,& + ' Action: Contact ABINIT group ' + ABI_ERROR(message) + end if + + call dbgmdi(a,lda,n,ipvt,det,-1,work,ierr) + + if(ierr /= 0) then + write(message, '(7a)' ) & + ' The matrix that has been passed in argument of this subroutine',ch10,& + ' is probably either singular or nearly singular.',ch10,& + ' The ASL routine dbgmdi failed.',ch10,& + ' Action: Contact ABINIT group ' + ABI_ERROR(message) + end if + +#else + + call dgetrf(n,n,a,lda,ipvt,ierr) + if(ierr /= 0) then + write(message, '(7a)' ) & + ' The matrix that has been passed in argument of this subroutine',ch10,& + ' is probably either singular or nearly singular.',ch10,& + ' The LAPACK routine dgetrf failed.',ch10,& + ' Action: Contact ABINIT group ' + ABI_ERROR(message) + end if + + call dgetri(n,a,lda,ipvt,work,n,ierr) + + if(ierr /= 0) then + write(message, '(7a)' ) & + ' The matrix that has been passed in argument of this subroutine',ch10,& + ' is probably either singular or nearly singular.',ch10,& + ' The LAPACK routine dgetri failed.',ch10,& + ' Action: Contact ABINIT group ' + ABI_ERROR(message) + end if + +#endif + + ABI_FREE(work) + ABI_FREE(ipvt) + +end subroutine matrginv +!!*** + +!!****f* m_hide_lapack/matr3eigval +!! NAME +!! matr3eigval +!! +!! FUNCTION +!! Find the eigenvalues of a real symmetric 3x3 matrix, entered in full storage mode. +!! +!! INPUTS +!! matr(3,3)=real symmetric 3x3 matrix +!! +!! OUTPUT +!! eigval(3)=three eigenvalues +!! +!! SOURCE + +subroutine matr3eigval(eigval,matr) + +!Arguments ------------------------------------ +!arrays + real(dp),intent(in) :: matr(3,3) + real(dp),intent(out) :: eigval(3) + +!Local variables------------------------------- +!scalars + integer :: ier +!arrays + real(dp) :: eigvec(2,3,3),matrx(2,6),zhpev1(2,2*3-1),zhpev2(3*3-2) + +! ************************************************************************* + + matrx(1,1)=matr(1,1) + matrx(1,2)=matr(1,2) + matrx(1,3)=matr(2,2) + matrx(1,4)=matr(1,3) + matrx(1,5)=matr(2,3) + matrx(1,6)=matr(3,3) + matrx(2,:)=zero + + call ZHPEV ('V','U',3,matrx,eigval,eigvec,3,zhpev1,zhpev2,ier) +!write(std_out,*)' eigval=',eigval + +end subroutine matr3eigval +!!*** + +!!****f* ABINIT/jacobi +!! NAME +!! jacobi +!! +!! FUNCTION +!! Computes all eigenvalues and eigenvectors of a real symmetric matrix a, +!! which is of size n by n, stored in a physical np by np array. On output, +!! elements of a above the diagonal are destroyed. d returns the +!! eigenvalues of a in its first n elements. v is a matrix with the same +!! logical and physical dimensions as a, whose columns contain, on output, +!! the normalized eigenvectors of a. nrot returns the number of Jacobi +!! rotations that were required. +!! +!! INPUTS +!! +!! OUTPUT +!! +!! NOTES +!! This routine is deprecated, use Lapack API +!! +!! SOURCE + +subroutine jacobi(a,n,np,d,v,nrot) + +!Arguments + integer :: n,np,nrot + real*8 :: a(np,np),d(np),v(np,np) +!Local variables + integer, parameter :: NMAX=500 + integer i,ip,iq,j + real*8 c,g,h,s,sm,t,tau,theta,tresh,b(NMAX),z(NMAX) + do ip=1,n + do iq=1,n + v(ip,iq)=0. + enddo + v(ip,ip)=1. + enddo + do ip=1,n + b(ip)=a(ip,ip) + d(ip)=b(ip) + z(ip)=0. + enddo + nrot=0 + do i=1,50 + sm=0. + do ip=1,n-1 + do iq=ip+1,n + sm=sm+abs(a(ip,iq)) + enddo + enddo + if(sm.eq.0.)return + if(i.lt.4)then + tresh=0.2*sm/n**2 + else + tresh=0. + endif + do ip=1,n-1 + do iq=ip+1,n + g=100.*abs(a(ip,iq)) + if((i.gt.4).and.(abs(d(ip))+g.eq.abs(d(ip))) & +& .and.(abs(d(iq))+g.eq.abs(d(iq))))then + a(ip,iq)=0. + else if(abs(a(ip,iq)).gt.tresh)then + h=d(iq)-d(ip) + if(abs(h)+g.eq.abs(h))then + t=a(ip,iq)/h + else + theta=0.5*h/a(ip,iq) + t=1./(abs(theta)+sqrt(1.+theta**2)) + if(theta.lt.0.)t=-t + endif + c=1./sqrt(1+t**2) + s=t*c + tau=s/(1.+c) + h=t*a(ip,iq) + z(ip)=z(ip)-h + z(iq)=z(iq)+h + d(ip)=d(ip)-h + d(iq)=d(iq)+h + a(ip,iq)=0. + do j=1,ip-1 + g=a(j,ip) + h=a(j,iq) + a(j,ip)=g-s*(h+g*tau) + a(j,iq)=h+s*(g-h*tau) + enddo + do j=ip+1,iq-1 + g=a(ip,j) + h=a(j,iq) + a(ip,j)=g-s*(h+g*tau) + a(j,iq)=h+s*(g-h*tau) + enddo + do j=iq+1,n + g=a(ip,j) + h=a(iq,j) + a(ip,j)=g-s*(h+g*tau) + a(iq,j)=h+s*(g-h*tau) + enddo + do j=1,n + g=v(j,ip) + h=v(j,iq) + v(j,ip)=g-s*(h+g*tau) + v(j,iq)=h+s*(g-h*tau) + enddo + nrot=nrot+1 + endif + enddo + enddo + do ip=1,n + b(ip)=b(ip)+z(ip) + d(ip)=b(ip) + z(ip)=0. + enddo + enddo + write(std_out,*) 'too many iterations in jacobi' + +end subroutine jacobi +!!*** + +!!****f* m_hide_lapack/ludcmp +!! NAME +!! ludcmp +!! +!! FUNCTION +!! Given a matrix a(1:n,1:n), with physical dimension np by np, this +!! routine replaces it by the LU decomposition of a rowwise permutation of +!! itself. a and n are input. a is output, arranged as in equation (2.3.14) +!! above; indx(1:n) is an output vector that records the row permutation +!! effected by the partial pivoting; id is output as +- 1 depending on +!! whether the number of row interchanges was even or odd, +!! respectively. This routine is used in combination with lubksb to solve +!! linear equations or invert a matrix. +!! +!! INPUTS +!! +!! OUTPUT +!! +!! NOTES +!! This routine is depreacted, use lapack API +!! +!! SOURCE + +SUBROUTINE ludcmp(a,n,np,indx,id,info) + + INTEGER n,np,indx(n),NMAX,id,info + REAL*8 a(np,np),TINY + PARAMETER (NMAX=500,TINY=1.0e-20) + + INTEGER i,imax,j,k + REAL*8 aamax,dum,sum,vv(NMAX) + +! write(std_out,*) 'ENTERING LUDCMP...' +! write(std_out,*) 'in ludcmp n=',n,' np=',np +! write(std_out,201) ((a(i,j),j=1,n),i=1,n) +! 201 FORMAT('A in ludcmp ',/,3F16.8,/,3F16.8,/,3F16.8) + id=1 + info=0 + do i=1,n + aamax=0. + do j=1,n + if (abs(a(i,j)).gt.aamax) aamax=abs(a(i,j)) + enddo + if (aamax.eq.0.) then + write(std_out,*) 'LUDCMP: singular matrix !!!' + do j=1,3 + write(std_out,*) (a(j,k),k=1,3) + enddo + info=1 + return +! stop 'singular matrix in ludcmp' + endif + vv(i)=1./aamax + enddo + do j=1,n + do i=1,j-1 + sum=a(i,j) + do k=1,i-1 + sum=sum-a(i,k)*a(k,j) + enddo + a(i,j)=sum + enddo + aamax=0. + do i=j,n + sum=a(i,j) + do k=1,j-1 + sum=sum-a(i,k)*a(k,j) + enddo + a(i,j)=sum + dum=vv(i)*abs(sum) + if (dum.ge.aamax) then + imax=i + aamax=dum + endif + enddo + if (j.ne.imax)then + do k=1,n + dum=a(imax,k) + a(imax,k)=a(j,k) + a(j,k)=dum + enddo + id=-id + vv(imax)=vv(j) + endif + indx(j)=imax + if(a(j,j).eq.0.)a(j,j)=TINY + if(j.ne.n)then + dum=1./a(j,j) + do i=j+1,n + a(i,j)=a(i,j)*dum + enddo + endif + enddo +! write(std_out,*) 'LEAVING LUDCMP...' + return +END SUBROUTINE ludcmp +!!*** + +!!****f* m_hide_lapack/lubksb +!! NAME +!! lubksb +!! +!! FUNCTION +!! Solves the set of n linear equations A . X = B. Here a is input, not as +!! the matrix A but rather as its LU decomposition, determined by the +!! routine ludcmp. indx is input as the permutation vector returned by +!! ludcmp. b(1:n) is input as the right-hand side vector B, and returns +!! with the solution vector X. a, n, np, and indx are not modified by this +!! routine and can be left in place for successive calls with different +!! right-hand sides b. This routine takes into account the possibility that +!! b will begin with many zero elements, so it is efficient for use in +!! matrix inversion. +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SIDE EFFECTS +!! +!! NOTES +!! This routine is deprecated, use lapack API +!! +!! SOURCE + +SUBROUTINE lubksb(a,n,np,indx,b) + + INTEGER n,np,indx(n) + REAL*8 a(np,np),b(n) + + INTEGER i,ii,j,ll + REAL*8 sum +! write(std_out,*) 'ENTERING LUBKSB...' +! write(std_out,201) ((a(i,j),j=1,n),i=1,n) +! 201 FORMAT('A in lubksb ',/,3F16.8,/,3F16.8,/,3F16.8) + + ii=0 + do i=1,n + ll=indx(i) + sum=b(ll) + b(ll)=b(i) + if (ii.ne.0)then + do j=ii,i-1 + sum=sum-a(i,j)*b(j) + enddo + else if (sum.ne.0.) then + ii=i + endif + b(i)=sum + enddo + do i=n,1,-1 + sum=b(i) + do j=i+1,n + sum=sum-a(i,j)*b(j) + enddo + b(i)=sum/a(i,i) + enddo +! write(std_out,*) 'LEAVING LUBKSB...' + return + +END SUBROUTINE LUBKSB +!!*** + +!!****f* m_hide_lapack/dzegdi +!! NAME +!! dzgedi +!! +!! FUNCTION +!! This routine is the clone of zgefa.F90 using real*8 a(2) instead of complex*16 +!! for the purpose of ABINIT +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SIDE EFFECTS +!! +!! NOTES +!! +!! SOURCE + +subroutine dzgedi(a,lda,n,ipvt,det,work,job) + + integer :: lda,n,ipvt(n),job + real*8 :: a(2,lda,n),det(2,2),work(2,n) +! +! zgedi computes the determinant and inverse of a matrix +! using the factors computed by zgeco or zgefa. +! +! on entry +! +! a complex*16(lda, n) +! the output from zgeco or zgefa. +! +! lda integer +! the leading dimension of the array a . +! +! n integer +! the order of the matrix a . +! +! ipvt integer(n) +! the pivot vector from zgeco or zgefa. +! +! work complex*16(n) +! work vector. contents destroyed. +! +! job integer +! = 11 both determinant and inverse. +! = 01 inverse only. +! = 10 determinant only. +! +! on return +! +! a inverse of original matrix if requested. +! otherwise unchanged. +! +! det complex*16(2) +! determinant of original matrix if requested. +! otherwise not referenced. +! determinant = det(1) * 10.0**det(2) +! with 1.0 .le. cabs1(det(1)) .lt. 10.0 +! or det(1) .eq. 0.0 . +! +! error condition +! +! a division by zero will occur if the input factor contains +! a zero on the diagonal and the inverse is requested. +! it will not occur if the subroutines are called correctly +! and if zgeco has set rcond .gt. 0.0 or zgefa has set +! info .eq. 0 . +! +! linpack. this version dated 08/14/78 . +! cleve moler, university of new mexico, argonne national lab. +! +! subroutines and functions +! +! internal variables +! + double precision :: r(2),rk(2),rkj(2) + double precision :: ten,rinv2,rabs + integer :: i,j,k,kb,kp1,l,nm1 +! +! compute determinant +! + if (job/10 .eq. 0) go to 70 + det(1,1) = 1.0d0; det(2,1) = 0.0d0 + det(1,2) = 0.0d0; det(2,2) = 0.0d0 + ten = 10.0d0 + do i = 1, n + if (ipvt(i) .ne. i) then + det(1,1) = -det(1,1) + det(2,1) = -det(2,1) + end if + r(1)=det(1,1); r(2)=det(2,1) + det(1,1) = r(1)*a(1,i,i)-r(2)*a(2,i,i) + det(2,1) = r(2)*a(1,i,i)+r(1)*a(2,i,i) +! ...exit + rabs = abs(det(1,1))+abs(det(2,1)) + if (rabs .eq. 0.0d0) go to 60 + 10 continue + rabs = abs(det(1,1))+abs(det(2,1)) + if (rabs .ge. 1.0d0) go to 20 + det(1,1) = ten*det(1,1); det(2,1) = ten*det(2,1) + det(1,2) = det(1,2) - 1.0d0 + go to 10 + 20 continue + 30 continue + rabs = abs(det(1,1))+abs(det(2,1)) + if (rabs .lt. ten) go to 40 + det(1,1) = det(1,1)/ten; det(2,1) = det(2,1)/ten + det(1,2) = det(1,2) + 1.0d0 + go to 30 + 40 continue + end do + 60 continue + 70 continue +! +! compute inverse(u) +! + if (mod(job,10) .eq. 0) go to 150 + do 100 k = 1, n + !a(k,k) = (1.0d0,0.0d0)/a(k,k) + !t = -a(k,k) + !call zscal(k-1,t,a(1,k),1) + rinv2 = 1.d0/(a(1,k,k)**2+a(2,k,k)**2) + a(1,k,k) = rinv2*a(1,k,k) + a(2,k,k) = -rinv2*a(2,k,k) + rk(1) = -a(1,k,k); rk(2) = -a(2,k,k) + do i=1,k-1 + r(1)=a(1,i,k) + r(2)=a(2,i,k) + a(1,i,k)=rk(1)*r(1)-rk(2)*r(2) + a(2,i,k)=rk(1)*r(2)+rk(2)*r(1) + end do + kp1 = k + 1 + if (n .lt. kp1) go to 90 + do 80 j = kp1, n + !t = a(k,j) + !a(k,j) = (0.0d0,0.0d0) + !call zaxpy(k,t,a(1,k),1,a(1,j),1) + rkj(1) = a(1,k,j); rkj(2) = a(2,k,j) + a(1,k,j) = 0.d0; a(2,k,j) = 0.d0 + do i=1,k + a(1,i,j)=rkj(1)*a(1,i,k)-rkj(2)*a(2,i,k)+a(1,i,j) + a(2,i,j)=rkj(2)*a(1,i,k)+rkj(1)*a(2,i,k)+a(2,i,j) + end do + 80 continue + 90 continue + 100 continue + do i=1,n + end do +! +! form inverse(u)*inverse(l) +! + nm1 = n - 1 + if (nm1 .lt. 1) go to 140 + do 130 kb = 1, nm1 + k = n - kb + kp1 = k + 1 + do 110 i = kp1, n + work(1,i) = a(1,i,k); work(2,i) = a(2,i,k) + a(1,i,k) = 0.0d0; a(2,i,k) = 0.d0 + 110 continue + do 120 j = kp1, n + r(1) = work(1,j); r(2) = work(2,j) + !call zaxpy(n,t,a(1,j),1,a(1,k),1) + do i=1,n + a(1,i,k)=r(1)*a(1,i,j)-r(2)*a(2,i,j)+a(1,i,k) + a(2,i,k)=r(2)*a(1,i,j)+r(1)*a(2,i,j)+a(2,i,k) + end do + 120 continue + l = ipvt(k) + if (l .ne. k) then + !call zswap(n,a(1,k),1,a(1,l),1) + do i=1,n + r(1) = a(1,i,k); r(2) = a(2,i,k) + a(1,i,k) = a(1,i,l); a(2,i,k) = a(2,i,l) + a(1,i,l) = r(1); a(2,i,l) = r(2) + end do + end if + 130 continue + 140 continue + 150 continue + +end subroutine dzgedi +!!*** + +!!****f* m_hide_lapack/dzgefa +!! NAME +!! dzgefa +!! +!! FUNCTION +!! This routine is the clone of zgefa.F90 using real*8 a(2) instead of complex*16 +!! for the purpose of ABINIT (2008,TD) +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SIDE EFFECTS +!! +!! NOTES +!! +!! SOURCE + +subroutine dzgefa(a,lda,n,ipvt,info) + + use m_linalg_interfaces + +!Arguments + integer :: lda,n,ipvt(n),info + real*8 :: a(2,lda,n) +! +! zgefa factors a complex*16 matrix by gaussian elimination. +! +! dzgefa is usually called by zgeco, but it can be called +! directly with a saving in time if rcond is not needed. +! (time for zgeco) = (1 + 9/n)*(time for zgefa) . +! +! on entry +! +! a complex*16(lda, n) +! the matrix to be factored. +! +! lda integer +! the leading dimension of the array a . +! +! n integer +! the order of the matrix a . +! +! on return +! +! a an upper triangular matrix and the multipliers +! which were used to obtain it. +! the factorization can be written a = l*u where +! l is a product of permutation and unit lower +! triangular matrices and u is upper triangular. +! +! ipvt integer(n) +! an integer vector of pivot indices. +! +! info integer +! = 0 normal value. +! = k if u(k,k) .eq. 0.0 . this is not an error +! condition for this subroutine, but it does +! indicate that zgesl or zgedi will divide by zero +! if called. use rcond in zgeco for a reliable +! indication of singularity. +! +! linpack. this version dated 08/14/78 . +! cleve moler, university of new mexico, argonne national lab. +! +! subroutines and functions +! +! internal variables +! +!Local variables + real*8 :: r(2),rk(2),rlj(2) + real*8 :: rinv2,rmax,rabs + integer :: i,j,k,kp1,l,nm1 + +! +! gaussian elimination with partial pivoting +! + info = 0 + nm1 = n - 1 + if (nm1 .lt. 1) go to 70 + do 60 k = 1, nm1 + kp1 = k + 1 +! +! find l = pivot index +! + !l = izamax(n-k+1,a(k,k),1) + k - 1 + rmax=0.d0 + l=0 + do i=k,n + rabs=abs(a(1,i,k))+abs(a(2,i,k)) + if(rmax<=rabs) then + rmax=rabs + l=i + end if + end do + ipvt(k) = l +! +! zero pivot implies this column already triangularized +! + if (abs(a(1,l,k))+abs(a(2,l,k)) .eq. 0.0d0) go to 40 +! +! interchange if necessary +! + if (l .eq. k) go to 10 + r(1) = a(1,l,k); r(2) = a(2,l,k) + a(1,l,k) = a(1,k,k); a(2,l,k) = a(2,k,k) + a(1,k,k) = r(1); a(2,k,k) = r(2) + 10 continue +! +! compute multipliers +! + rinv2 = 1.d0/(a(1,k,k)**2+a(2,k,k)**2) + rk(1) = -rinv2*a(1,k,k) + rk(2) = rinv2*a(2,k,k) + !call zscal(n-k,t,a(k+1,k),1) + do i=k+1,n + r(1)=a(1,i,k) + r(2)=a(2,i,k) + a(1,i,k)=rk(1)*r(1)-rk(2)*r(2) + a(2,i,k)=rk(1)*r(2)+rk(2)*r(1) + end do +! +! row elimination with column indexing +! + do j = kp1, n + rlj(1) = a(1,l,j); rlj(2) = a(2,l,j) + if (l .eq. k) go to 20 + a(1,l,j) = a(1,k,j); a(2,l,j) = a(2,k,j) + a(1,k,j) = rlj(1); a(2,k,j) = rlj(2) + 20 continue + !call zaxpy(n-k,t,a(1,k+1,k),1,a(1,k+1,j),1) + do i=k+1,n + a(1,i,j)=rlj(1)*a(1,i,k)-rlj(2)*a(2,i,k)+a(1,i,j) + a(2,i,j)=rlj(2)*a(1,i,k)+rlj(1)*a(2,i,k)+a(2,i,j) + end do + end do + go to 50 + 40 continue + info = k + 50 continue + 60 continue + 70 continue + ipvt(n) = n + if (abs(a(1,n,n))+abs(a(2,n,n)) .eq. 0.0d0) info = n + +end subroutine dzgefa +!!*** + +!!****f* m_hide_lapack/test_xginv +!! NAME +!! test_xginv +!! +!! FUNCTION + +subroutine test_xginv(msize,skinds,do_check,Tres,comm) + +!Arguments ----------------------------------- +!scalars + integer,intent(in) :: msize,comm + logical,intent(in) :: do_check + character(len=*),intent(in) :: skinds + type(latime_t),intent(out) :: Tres +!arrays + !complex(spc),allocatable :: cmat_spc(:,:) + !complex(spc),allocatable :: cmat_spc_check(:,:) + complex(dpc),allocatable :: cmat_dpc(:,:) + complex(dpc),allocatable :: cmat_dpc_check(:,:) + +!Local variables------------------------------- +!scalars + integer :: ii + real(dp) :: max_abserr + +! ************************************************************************* + + if (.FALSE.) write(std_out,*)skinds + + if (do_check) then + ABI_MALLOC(cmat_dpc_check,(msize,msize)) + cmat_dpc_check = czero + do ii=1,msize + cmat_dpc_check(ii,ii) = cone + end do + !call xginv(cmat_dpc_check,msize,comm=xmpi_comm_self) + end if + + ABI_MALLOC(cmat_dpc,(msize,msize)) + do ii=1,msize + cmat_dpc(ii,ii) = cone + end do + + call cwtime(Tres%ctime,Tres%wtime,Tres%gflops,"start") + + call xginv(cmat_dpc,msize,comm) + + call cwtime(Tres%ctime,Tres%wtime,Tres%gflops,"stop") + Tres%testname = 'test_xginv' + Tres%msize = msize + + max_abserr = -one + if (do_check) then + max_abserr = MAXVAL( ABS(cmat_dpc - cmat_dpc_check) ) + end if + Tres%max_abserr = max_abserr + + ABI_FREE(cmat_dpc) + + ABI_SFREE(cmat_dpc_check) + +end subroutine test_xginv +!!*** + +!!****f* m_cgtools/xhesv_cplex +!! NAME +!! xhesv_cplex +!! +!! FUNCTION +!! ZHESV computes the solution to a complex (real) system of linear equations +!! A * X = B, +!! +!! where A is an N-by-N Hermitian matrix and X and B are N-by-NRHS matrices. +!! The value of cplex (1 or 2) defines whether we have a complex Hermitian or real symmetric matrix +!! +!! The diagonal pivoting method is used to factor A as +!! A = U * D * U**H, if UPLO = 'U', or +!! A = L * D * L**H, if UPLO = 'L', +!! +!! where U (or L) is a product of permutation and unit upper (lower) +!! triangular matrices, and D is Hermitian and block diagonal with +!! 1-by-1 and 2-by-2 diagonal blocks. The factored form of A is then +!! used to solve the system of equations A * X = B. +!! +!! INPUTS +!! +!![in] UPLO +!! UPLO is CHARACTER*1 +!! = 'U': Upper triangle of A is stored; +!! = 'L': Lower triangle of A is stored. +!![in] N +!! N is INTEGER +!! The number of linear equations, i.e., the order of the +!! matrix A. N >= 0. +!![in] NRHS +!! NRHS is INTEGER +!! The number of right hand sides, i.e., the number of columns +!! of the matrix B. NRHS >= 0. +!![in,out] A +!! A is COMPLEX*16 array, dimension (LDA,N) +!! On entry, the Hermitian matrix A. If UPLO = 'U', the leading +!! N-by-N upper triangular part of A contains the upper +!! triangular part of the matrix A, and the strictly lower +!! triangular part of A is not referenced. If UPLO = 'L', the +!! leading N-by-N lower triangular part of A contains the lower +!! triangular part of the matrix A, and the strictly upper +!! triangular part of A is not referenced. +!! +!! On exit, if INFO = 0, the block diagonal matrix D and the +!! multipliers used to obtain the factor U or L from the +!! factorization A = U*D*U**H or A = L*D*L**H as computed by +!! ZHETRF. +!![in,out] B +!! B is COMPLEX*16 array, dimension (LDB,NRHS) +!! On entry, the N-by-NRHS right hand side matrix B. +!! On exit, if INFO = 0, the N-by-NRHS solution matrix X. +!![out] INFO +!! INFO is INTEGER +!! = 0: successful exit +!! < 0: if INFO = -i, the i-th argument had an illegal value +!! > 0: if INFO = i, D(i,i) is exactly zero. The factorization +!! has been completed, but the block diagonal matrix D is +!! exactly singular, so the solution could not be computed. +!! SOURCE + +subroutine xhesv_cplex(UPLO, cplex, N, NRHS, A, B, msg, info) + +!Arguments ------------------------------------ + character(len=1),intent(in) :: UPLO + integer,intent(in) :: cplex, N, NRHS + real(dp),intent(inout) :: A(cplex, N, N) + real(dp),intent(inout) :: B(cplex, N, NRHS) + character(len=*),intent(out) :: msg + integer,intent(out) :: info + +!Local variables ------------------------------ +!scalars + integer :: lwork, lda, ldb + integer,allocatable :: ipiv(:) + real(dp),allocatable :: work(:,:) + +!************************************************************************ + + if (all(cplex /= [1, 2])) then + write(msg,'(a,i0)')" Wrong value for cplex: ",cplex + info = 1; return + end if + + lda = N; ldb = N + + ABI_MALLOC(ipiv, (N)) + ABI_MALLOC(work, (cplex, 1)) + lwork = -1 + + if (cplex == 2) then + ! Complex version + call zhesv(uplo, N, NRHS, A, lda, ipiv, B, ldb, work, lwork, info) + lwork = int(work(1, 1)) + ABI_REMALLOC(work, (cplex, lwork)) + + call zhesv(uplo, N, NRHS, A, lda, ipiv, B, ldb, work, lwork, info) + else + ! Read version + call dsysv(uplo, N, NRHS, A, lda, ipiv, B, ldb, work, lwork, info) + lwork = int(work(1, 1)) + ABI_REMALLOC(work, (cplex, lwork)) + + call dsysv(uplo, N, NRHS, A, lda, ipiv, B, ldb, work, lwork, info) + end if + + ABI_FREE(ipiv) + ABI_FREE(work) + + if (info < 0) then + write(msg,'(a,i0,a)')" The ",-info,"-th argument of ZPOTRI had an illegal value." + else if (info > 0) then + write(msg, "(a,i0,4a)") & + " D(i,i) is exactly zero for i= ", info, ch10, & + "The factorization has been completed, but the block diagonal matrix D is ", ch10, & + "exactly singular, so the solution could not be computed." + end if + +end subroutine xhesv_cplex +!!*** + +end module m_hide_lapack +!!*** diff --git a/GX-PAW/common/src/28_numeric_noabirule/m_hide_lapack.o b/GX-PAW/common/src/28_numeric_noabirule/m_hide_lapack.o new file mode 100644 index 00000000..4ebc6de7 Binary files /dev/null and b/GX-PAW/common/src/28_numeric_noabirule/m_hide_lapack.o differ diff --git a/GX-PAW/common/src/28_numeric_noabirule/m_lebedev.F90 b/GX-PAW/common/src/28_numeric_noabirule/m_lebedev.F90 new file mode 100644 index 00000000..3c1e472e --- /dev/null +++ b/GX-PAW/common/src/28_numeric_noabirule/m_lebedev.F90 @@ -0,0 +1,7302 @@ +!!****m* ABINIT/m_lebedev +!! NAME +!! m_lebedev +!! +!! FUNCTION +!! This module contains routines for performing integrations +!! on the sphere using lebedev-laikov angular grids. +!! +!! COPYRIGHT +!! Copyright (C) 2008-2024 ABINIT group (MG) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" + +MODULE m_lebedev + + use defs_basis + use m_abicore + use m_errors + + use m_fstrings, only : sjoin, itoa + + implicit none + + private +!!*** + +!---------------------------------------------------------------------- + +!!****t* m_lebedev/lebedev_t +!! NAME +!! lebedev_t +!! +!! FUNCTION +!! Structure storing the knots and the weights of the lebedev-laikov grid. +!! +!! SOURCE + + type,public :: lebedev_t + + integer :: npts + ! Number of points in the grid + + real(dp),allocatable :: versors(:,:) + ! versors(3, npts) + ! Points on the sphere. + + real(dp),allocatable :: weights(:) + ! weights(npts) + ! weights for Spherical integration. + + contains + + procedure :: from_npts => lebedev_from_npts + + procedure :: from_index => lebedev_from_index + ! Create a lebedev grid for it's index + ! Useful if one has to loop over all the grids. + + procedure :: free => lebedev_free + ! Free memory + + end type lebedev_t + + !public :: lebedev_from_index + !public :: lebedev_free + +!---------------------------------------------------------------------- + + integer,public,parameter :: lebedev_ngrids = 32 + ! The number of grids available. + + ! The number of points in each grid. + integer,public,parameter :: lebedev_npts(lebedev_ngrids)=(/ & +0006,& +0014,& +0026,& +0038,& +0050,& +0074,& +0086,& +0110,& +0146,& +0170,& +0194,& +0230,& +0266,& +0302,& +0350,& +0434,& +0590,& +0770,& +0974,& +1202,& +1454,& +1730,& +2030,& +2354,& +2702,& +3074,& +3470,& +3890,& +4334,& +4802,& +5294,& +5810/) + +contains !=========================================================== +!!*** + +!!****f* m_lebedev/lebedev_from_npts +!! NAME +!! lebedev_from_npts +!! +!! FUNCTION +!! Create a lebedev grid given the number of points. npts +!! Exit status: +!! 0 on success +!! -1 if npts is greater than the max number of points supported. +!! N > 0 is the first grid with size greater that npts. +!! +!! INPUTS +!! +!! SOURCE + +subroutine lebedev_from_npts(new, npts, ierr) + +!Arguments ------------------------------------ +!scalars + class(lebedev_t),intent(out) :: new + integer,intent(in) :: npts + integer,intent(out) :: ierr + +!Local variables------------------------------- + integer :: seq_idx +! ********************************************************************* + + ierr = -1 + do seq_idx=1, lebedev_ngrids + if (lebedev_npts(seq_idx) == npts) then + call new%from_index(seq_idx) + ierr = 0 + return + else if (lebedev_npts(seq_idx) > npts .and. ierr == -1) then + ierr = lebedev_npts(seq_idx) + end if + end do + +end subroutine lebedev_from_npts +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_lebedev/lebedev_from_index +!! NAME +!! lebedev_from_index +!! +!! FUNCTION +!! Create a lebedev grid from the sequential index. +!! Useful if one has to loop over all the grids. +!! +!! INPUTS +!! seq_idx=Sequential index comprised between 1 and 32 defining the order of the mesh. +!! +!! OUTPUT +!! Lgrid=The grid fully initialized. +!! +!! SOURCE + +subroutine lebedev_from_index(new, seq_idx) + +!Arguments ------------------------------------ +!scalars + class(lebedev_t),intent(out) :: new + integer,intent(in) :: seq_idx + +!Local variables------------------------------- + integer :: ii + real(dp),allocatable :: xx(:),yy(:),zz(:) +! ********************************************************************* + + call build_lebedev_grid(seq_idx, new%npts, xx, yy, zz, new%weights) + + ABI_MALLOC(new%versors, (3,new%npts)) + do ii=1,new%npts + new%versors(:,ii) = [xx(ii), yy(ii), zz(ii)] + end do + + ABI_FREE(xx) + ABI_FREE(yy) + ABI_FREE(zz) + +end subroutine lebedev_from_index +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_lebedev/lebedev_free +!! NAME +!! lebedev_free +!! +!! FUNCTION +!! Free an instance of lebedev_t +!! +!! SOURCE + +subroutine lebedev_free(lgrid) + +!Arguments ------------------------------------ + class(lebedev_t),intent(inout) :: lgrid + +! ********************************************************************* + + lgrid%npts=0 + ABI_SFREE(lgrid%versors) + ABI_SFREE(lgrid%weights) + +end subroutine lebedev_free +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_lebedev/build_lebedev_grid +!! NAME +!! build_lebedev_grid +!! +!! FUNCTION +!! Helper subroutine returning the knots and weights of the angular grid +!! from its sequential index +!! +!! INPUTS +!! seq_idx=sequential index (must be in [1,32] +!! +!! OUTPUT +!! npts=Number of points +!! xx(npts),yy(npts),zz(npts)=The Cartesian coordinates of the knots. +!! ww(npts)=The weights. +!! +!! SOURCE + +subroutine build_lebedev_grid(seq_idx, npts, xx, yy, zz, ww) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: seq_idx + integer,intent(out) :: npts + real(dp),allocatable,intent(out) :: xx(:),yy(:),zz(:),ww(:) + +! ********************************************************************* + + if (seq_idx < 1 .or. seq_idx > lebedev_ngrids) then + ABI_ERROR(sjoin("seq_idx ",itoa(seq_idx), "out of range")) + end if + + npts = lebedev_npts(seq_idx) + ABI_MALLOC(xx, (npts)) + ABI_MALLOC(yy, (npts)) + ABI_MALLOC(zz, (npts)) + ABI_MALLOC(ww, (npts)) + + SELECT CASE (seq_idx) + CASE (1) + call LD0006(xx,yy,zz,ww,npts) + CASE (2) + call LD0014(xx,yy,zz,ww,npts) + CASE (3) + call LD0026(xx,yy,zz,ww,npts) + CASE (4) + call LD0038(xx,yy,zz,ww,npts) + CASE (5) + call LD0050(xx,yy,zz,ww,npts) + CASE (6) + call LD0074(xx,yy,zz,ww,npts) + CASE (7) + call LD0086(xx,yy,zz,ww,npts) + CASE (8) + call LD0110(xx,yy,zz,ww,npts) + CASE (9) + call LD0146(xx,yy,zz,ww,npts) + CASE (10) + call LD0170(xx,yy,zz,ww,npts) + CASE (11) + call LD0194(xx,yy,zz,ww,npts) + CASE (12) + call LD0230(xx,yy,zz,ww,npts) + CASE (13) + call LD0266(xx,yy,zz,ww,npts) + CASE (14) + call LD0302(xx,yy,zz,ww,npts) + CASE (15) + call LD0350(xx,yy,zz,ww,npts) + CASE (16) + call LD0434(xx,yy,zz,ww,npts) + CASE (17) + call LD0590(xx,yy,zz,ww,npts) + CASE (18) + call LD0770(xx,yy,zz,ww,npts) + CASE (19) + call LD0974(xx,yy,zz,ww,npts) + CASE (20) + call LD1202(xx,yy,zz,ww,npts) + CASE (21) + call LD1454(xx,yy,zz,ww,npts) + CASE (22) + call LD1730(xx,yy,zz,ww,npts) + CASE (23) + call LD2030(xx,yy,zz,ww,npts) + CASE (24) + call LD2354(xx,yy,zz,ww,npts) + CASE (25) + call LD2702(xx,yy,zz,ww,npts) + CASE (26) + call LD3074(xx,yy,zz,ww,npts) + CASE (27) + call LD3470(xx,yy,zz,ww,npts) + CASE (28) + call LD3890(xx,yy,zz,ww,npts) + CASE (29) + call LD4334(xx,yy,zz,ww,npts) + CASE (30) + call LD4802(xx,yy,zz,ww,npts) + CASE (31) + call LD5294(xx,yy,zz,ww,npts) + CASE (32) + call LD5810(xx,yy,zz,ww,npts) + CASE DEFAULT + ABI_ERROR(sjoin("seq_idx ", itoa(seq_idx), "out of range")) + END SELECT + +end subroutine build_lebedev_grid +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_lebedev/gen_oh +!! NAME +!! gen_oh +!! +!! FUNCTION +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +subroutine gen_oh(code, num, x, y, z, w, a, b, v) + + implicit logical(a-z) + double precision x(*),y(*),z(*),w(*) + double precision a,b,v + integer code + integer num + double precision c +!chvd +!chvd This subroutine is part of a set of subroutines that generate +!chvd Lebedev grids [1-6] for integration on a sphere. The original +!chvd C-code [1] was kindly provided by Dr. Dmitri N. Laikov and +!chvd translated into fortran by Dr. Christoph van Wuellen. +!chvd This subroutine was translated from C to fortran77 by hand. +!chvd +!chvd Users of this code are asked to include reference [1] in their +!chvd publications, and in the user- and programmers-manuals +!chvd describing their codes. +!chvd +!chvd This code was distributed through CCL (http://www.ccl.net/). +!chvd +!chvd [1] V.I. Lebedev, and D.N. Laikov +!chvd "A quadrature formula for the sphere of the 131st +!chvd algebraic order of accuracy" +!chvd Doklady Mathematics, Vol. 59, No. 3, 1999, pp. 477-481. [[cite:Lebedev1999]] +!chvd +!chvd [2] V.I. Lebedev +!chvd "A quadrature formula for the sphere of 59th algebraic +!chvd order of accuracy" +!chvd Russian Acad. Sci. Dokl. Math., Vol. 50, 1995, pp. 283-286. [[cite:Lebedev1995]] +!chvd +!chvd [3] V.I. Lebedev, and A.L. Skorokhodov +!chvd "Quadrature formulas of orders 41, 47, and 53 for the sphere" +!chvd Russian Acad. Sci. Dokl. Math., Vol. 45, 1992, pp. 587-592. [[cite:Lebedev1992]] +!chvd +!chvd [4] V.I. Lebedev +!chvd "Spherical quadrature formulas exact to orders 25-29" +!chvd Siberian Mathematical Journal, Vol. 18, 1977, pp. 99-107. [[cite:Lebedev1977]] +!chvd +!chvd [5] V.I. Lebedev +!chvd "Quadratures on a sphere" +!chvd Computational Mathematics and Mathematical Physics, Vol. 16, 1976, pp. 10-24. [[cite:Lebedev1976]] +!chvd +!chvd [6] V.I. Lebedev +!chvd "Values of the nodes and weights of ninth to seventeenth +!chvd order Gauss-Markov quadrature formulae invariant under the +!chvd octahedron group with inversion" +!chvd Computational Mathematics and Mathematical Physics, Vol. 15, 1975, pp. 44-51. [[cite:Lebedev1975]] +!chvd +!cvw +!cvw Given a point on a sphere (specified by a and b), generate all +!cvw the equivalent points under Oh symmetry, making grid points with +!cvw weight v. +!cvw The variable num is increased by the number of different points +!cvw generated. +!cvw +!cvw Depending on code, there are 6...48 different but equivalent +!cvw points. +!cvw +!cvw code=1: (0,0,1) etc ( 6 points) +!cvw code=2: (0,a,a) etc, a=1/sqrt(2) ( 12 points) +!cvw code=3: (a,a,a) etc, a=1/sqrt(3) ( 8 points) +!cvw code=4: (a,a,b) etc, b=sqrt(1-2 a^2) ( 24 points) +!cvw code=5: (a,b,0) etc, b=sqrt(1-a^2), a input ( 24 points) +!cvw code=6: (a,b,c) etc, c=sqrt(1-a^2-b^2), a/b input ( 48 points) +!cvw + select case(code) + case(1) + a=1.0d0 + x(1) = a + y(1) = 0.0d0 + z(1) = 0.0d0 + w(1) = v + x(2) = -a + y(2) = 0.0d0 + z(2) = 0.0d0 + w(2) = v + x(3) = 0.0d0 + y(3) = a + z(3) = 0.0d0 + w(3) = v + x(4) = 0.0d0 + y(4) = -a + z(4) = 0.0d0 + w(4) = v + x(5) = 0.0d0 + y(5) = 0.0d0 + z(5) = a + w(5) = v + x(6) = 0.0d0 + y(6) = 0.0d0 + z(6) = -a + w(6) = v + num=num+6 +!cvw + case(2) + a=sqrt(0.5d0) + x( 1) = 0d0 + y( 1) = a + z( 1) = a + w( 1) = v + x( 2) = 0d0 + y( 2) = -a + z( 2) = a + w( 2) = v + x( 3) = 0d0 + y( 3) = a + z( 3) = -a + w( 3) = v + x( 4) = 0d0 + y( 4) = -a + z( 4) = -a + w( 4) = v + x( 5) = a + y( 5) = 0d0 + z( 5) = a + w( 5) = v + x( 6) = -a + y( 6) = 0d0 + z( 6) = a + w( 6) = v + x( 7) = a + y( 7) = 0d0 + z( 7) = -a + w( 7) = v + x( 8) = -a + y( 8) = 0d0 + z( 8) = -a + w( 8) = v + x( 9) = a + y( 9) = a + z( 9) = 0d0 + w( 9) = v + x(10) = -a + y(10) = a + z(10) = 0d0 + w(10) = v + x(11) = a + y(11) = -a + z(11) = 0d0 + w(11) = v + x(12) = -a + y(12) = -a + z(12) = 0d0 + w(12) = v + num=num+12 +!cvw + case(3) + a = sqrt(1d0/3d0) + x(1) = a + y(1) = a + z(1) = a + w(1) = v + x(2) = -a + y(2) = a + z(2) = a + w(2) = v + x(3) = a + y(3) = -a + z(3) = a + w(3) = v + x(4) = -a + y(4) = -a + z(4) = a + w(4) = v + x(5) = a + y(5) = a + z(5) = -a + w(5) = v + x(6) = -a + y(6) = a + z(6) = -a + w(6) = v + x(7) = a + y(7) = -a + z(7) = -a + w(7) = v + x(8) = -a + y(8) = -a + z(8) = -a + w(8) = v + num=num+8 +!cvw + case(4) + b = sqrt(1d0 - 2d0*a*a) + x( 1) = a + y( 1) = a + z( 1) = b + w( 1) = v + x( 2) = -a + y( 2) = a + z( 2) = b + w( 2) = v + x( 3) = a + y( 3) = -a + z( 3) = b + w( 3) = v + x( 4) = -a + y( 4) = -a + z( 4) = b + w( 4) = v + x( 5) = a + y( 5) = a + z( 5) = -b + w( 5) = v + x( 6) = -a + y( 6) = a + z( 6) = -b + w( 6) = v + x( 7) = a + y( 7) = -a + z( 7) = -b + w( 7) = v + x( 8) = -a + y( 8) = -a + z( 8) = -b + w( 8) = v + x( 9) = a + y( 9) = b + z( 9) = a + w( 9) = v + x(10) = -a + y(10) = b + z(10) = a + w(10) = v + x(11) = a + y(11) = -b + z(11) = a + w(11) = v + x(12) = -a + y(12) = -b + z(12) = a + w(12) = v + x(13) = a + y(13) = b + z(13) = -a + w(13) = v + x(14) = -a + y(14) = b + z(14) = -a + w(14) = v + x(15) = a + y(15) = -b + z(15) = -a + w(15) = v + x(16) = -a + y(16) = -b + z(16) = -a + w(16) = v + x(17) = b + y(17) = a + z(17) = a + w(17) = v + x(18) = -b + y(18) = a + z(18) = a + w(18) = v + x(19) = b + y(19) = -a + z(19) = a + w(19) = v + x(20) = -b + y(20) = -a + z(20) = a + w(20) = v + x(21) = b + y(21) = a + z(21) = -a + w(21) = v + x(22) = -b + y(22) = a + z(22) = -a + w(22) = v + x(23) = b + y(23) = -a + z(23) = -a + w(23) = v + x(24) = -b + y(24) = -a + z(24) = -a + w(24) = v + num=num+24 +!cvw + case(5) + b=sqrt(1d0-a*a) + x( 1) = a + y( 1) = b + z( 1) = 0d0 + w( 1) = v + x( 2) = -a + y( 2) = b + z( 2) = 0d0 + w( 2) = v + x( 3) = a + y( 3) = -b + z( 3) = 0d0 + w( 3) = v + x( 4) = -a + y( 4) = -b + z( 4) = 0d0 + w( 4) = v + x( 5) = b + y( 5) = a + z( 5) = 0d0 + w( 5) = v + x( 6) = -b + y( 6) = a + z( 6) = 0d0 + w( 6) = v + x( 7) = b + y( 7) = -a + z( 7) = 0d0 + w( 7) = v + x( 8) = -b + y( 8) = -a + z( 8) = 0d0 + w( 8) = v + x( 9) = a + y( 9) = 0d0 + z( 9) = b + w( 9) = v + x(10) = -a + y(10) = 0d0 + z(10) = b + w(10) = v + x(11) = a + y(11) = 0d0 + z(11) = -b + w(11) = v + x(12) = -a + y(12) = 0d0 + z(12) = -b + w(12) = v + x(13) = b + y(13) = 0d0 + z(13) = a + w(13) = v + x(14) = -b + y(14) = 0d0 + z(14) = a + w(14) = v + x(15) = b + y(15) = 0d0 + z(15) = -a + w(15) = v + x(16) = -b + y(16) = 0d0 + z(16) = -a + w(16) = v + x(17) = 0d0 + y(17) = a + z(17) = b + w(17) = v + x(18) = 0d0 + y(18) = -a + z(18) = b + w(18) = v + x(19) = 0d0 + y(19) = a + z(19) = -b + w(19) = v + x(20) = 0d0 + y(20) = -a + z(20) = -b + w(20) = v + x(21) = 0d0 + y(21) = b + z(21) = a + w(21) = v + x(22) = 0d0 + y(22) = -b + z(22) = a + w(22) = v + x(23) = 0d0 + y(23) = b + z(23) = -a + w(23) = v + x(24) = 0d0 + y(24) = -b + z(24) = -a + w(24) = v + num=num+24 +!cvw + case(6) + c=sqrt(1d0 - a*a - b*b) + x( 1) = a + y( 1) = b + z( 1) = c + w( 1) = v + x( 2) = -a + y( 2) = b + z( 2) = c + w( 2) = v + x( 3) = a + y( 3) = -b + z( 3) = c + w( 3) = v + x( 4) = -a + y( 4) = -b + z( 4) = c + w( 4) = v + x( 5) = a + y( 5) = b + z( 5) = -c + w( 5) = v + x( 6) = -a + y( 6) = b + z( 6) = -c + w( 6) = v + x( 7) = a + y( 7) = -b + z( 7) = -c + w( 7) = v + x( 8) = -a + y( 8) = -b + z( 8) = -c + w( 8) = v + x( 9) = a + y( 9) = c + z( 9) = b + w( 9) = v + x(10) = -a + y(10) = c + z(10) = b + w(10) = v + x(11) = a + y(11) = -c + z(11) = b + w(11) = v + x(12) = -a + y(12) = -c + z(12) = b + w(12) = v + x(13) = a + y(13) = c + z(13) = -b + w(13) = v + x(14) = -a + y(14) = c + z(14) = -b + w(14) = v + x(15) = a + y(15) = -c + z(15) = -b + w(15) = v + x(16) = -a + y(16) = -c + z(16) = -b + w(16) = v + x(17) = b + y(17) = a + z(17) = c + w(17) = v + x(18) = -b + y(18) = a + z(18) = c + w(18) = v + x(19) = b + y(19) = -a + z(19) = c + w(19) = v + x(20) = -b + y(20) = -a + z(20) = c + w(20) = v + x(21) = b + y(21) = a + z(21) = -c + w(21) = v + x(22) = -b + y(22) = a + z(22) = -c + w(22) = v + x(23) = b + y(23) = -a + z(23) = -c + w(23) = v + x(24) = -b + y(24) = -a + z(24) = -c + w(24) = v + x(25) = b + y(25) = c + z(25) = a + w(25) = v + x(26) = -b + y(26) = c + z(26) = a + w(26) = v + x(27) = b + y(27) = -c + z(27) = a + w(27) = v + x(28) = -b + y(28) = -c + z(28) = a + w(28) = v + x(29) = b + y(29) = c + z(29) = -a + w(29) = v + x(30) = -b + y(30) = c + z(30) = -a + w(30) = v + x(31) = b + y(31) = -c + z(31) = -a + w(31) = v + x(32) = -b + y(32) = -c + z(32) = -a + w(32) = v + x(33) = c + y(33) = a + z(33) = b + w(33) = v + x(34) = -c + y(34) = a + z(34) = b + w(34) = v + x(35) = c + y(35) = -a + z(35) = b + w(35) = v + x(36) = -c + y(36) = -a + z(36) = b + w(36) = v + x(37) = c + y(37) = a + z(37) = -b + w(37) = v + x(38) = -c + y(38) = a + z(38) = -b + w(38) = v + x(39) = c + y(39) = -a + z(39) = -b + w(39) = v + x(40) = -c + y(40) = -a + z(40) = -b + w(40) = v + x(41) = c + y(41) = b + z(41) = a + w(41) = v + x(42) = -c + y(42) = b + z(42) = a + w(42) = v + x(43) = c + y(43) = -b + z(43) = a + w(43) = v + x(44) = -c + y(44) = -b + z(44) = a + w(44) = v + x(45) = c + y(45) = b + z(45) = -a + w(45) = v + x(46) = -c + y(46) = b + z(46) = -a + w(46) = v + x(47) = c + y(47) = -b + z(47) = -a + w(47) = v + x(48) = -c + y(48) = -b + z(48) = -a + w(48) = v + num=num+48 + case default + ABI_ERROR('Gen_Oh: Invalid Code') + stop + end select + end subroutine gen_oh +!!*** + + SUBROUTINE LD0006(X,Y,Z,W,N) + + DOUBLE PRECISION X( 6) + DOUBLE PRECISION Y( 6) + DOUBLE PRECISION Z( 6) + DOUBLE PRECISION W( 6) + INTEGER N + DOUBLE PRECISION A,B,V +!CVW +!CVW LEBEDEV 6-POINT ANGULAR GRID +!CVW +!chvd +!chvd This subroutine is part of a set of subroutines that generate +!chvd Lebedev grids [1-6] for integration on a sphere. The original +!chvd C-code [1] was kindly provided by Dr. Dmitri N. Laikov and +!chvd translated into fortran by Dr. Christoph van Wuellen. +!chvd This subroutine was translated using a C to fortran77 conversion +!chvd tool written by Dr. Christoph van Wuellen. +!chvd +!chvd Users of this code are asked to include reference [1] in their +!chvd publications, and in the user- and programmers-manuals +!chvd describing their codes. +!chvd +!chvd This code was distributed through CCL (http://www.ccl.net/). +!chvd +!chvd [1] V.I. Lebedev, and D.N. Laikov +!chvd "A quadrature formula for the sphere of the 131st +!chvd algebraic order of accuracy" +!chvd Doklady Mathematics, Vol. 59, No. 3, 1999, pp. 477-481. [[cite:Lebedev1999]] +!chvd +!chvd [2] V.I. Lebedev +!chvd "A quadrature formula for the sphere of 59th algebraic +!chvd order of accuracy" +!chvd Russian Acad. Sci. Dokl. Math., Vol. 50, 1995, pp. 283-286. [[cite:Lebedev1995]] +!chvd +!chvd [3] V.I. Lebedev, and A.L. Skorokhodov +!chvd "Quadrature formulas of orders 41, 47, and 53 for the sphere" +!chvd Russian Acad. Sci. Dokl. Math., Vol. 45, 1992, pp. 587-592. [[cite:Lebedev1992]] +!chvd +!chvd [4] V.I. Lebedev +!chvd "Spherical quadrature formulas exact to orders 25-29" +!chvd Siberian Mathematical Journal, Vol. 18, 1977, pp. 99-107. [[cite:Lebedev1977]] +!chvd +!chvd [5] V.I. Lebedev +!chvd "Quadratures on a sphere" +!chvd Computational Mathematics and Mathematical Physics, Vol. 16, 1976, pp. 10-24. [[cite:Lebedev1976]] +!chvd +!chvd [6] V.I. Lebedev +!chvd "Values of the nodes and weights of ninth to seventeenth +!chvd order Gauss-Markov quadrature formulae invariant under the +!chvd octahedron group with inversion" +!chvd Computational Mathematics and Mathematical Physics, Vol. 15, 1975, pp. 44-51. [[cite:Lebedev1975]] +!chvd + N=1 + V=0.1666666666666667D+0 + Call GEN_OH( 1, N, X(N), Y(N), Z(N), W(N), A, B, V) + N=N-1 + end subroutine LD0006 +!!*** + + SUBROUTINE LD0014(X,Y,Z,W,N) + + DOUBLE PRECISION X( 14) + DOUBLE PRECISION Y( 14) + DOUBLE PRECISION Z( 14) + DOUBLE PRECISION W( 14) + INTEGER N + DOUBLE PRECISION A,B,V +!CVW +!CVW LEBEDEV 14-POINT ANGULAR GRID +!CVW +!chvd +!chvd This subroutine is part of a set of subroutines that generate +!chvd Lebedev grids [1-6] for integration on a sphere. The original +!chvd C-code [1] was kindly provided by Dr. Dmitri N. Laikov and +!chvd translated into fortran by Dr. Christoph van Wuellen. +!chvd This subroutine was translated using a C to fortran77 conversion +!chvd tool written by Dr. Christoph van Wuellen. +!chvd +!chvd Users of this code are asked to include reference [1] in their +!chvd publications, and in the user- and programmers-manuals +!chvd describing their codes. +!chvd +!chvd This code was distributed through CCL (http://www.ccl.net/). +!chvd +!chvd [1] V.I. Lebedev, and D.N. Laikov +!chvd "A quadrature formula for the sphere of the 131st +!chvd algebraic order of accuracy" +!chvd Doklady Mathematics, Vol. 59, No. 3, 1999, pp. 477-481. [[cite:Lebedev1999]] +!chvd +!chvd [2] V.I. Lebedev +!chvd "A quadrature formula for the sphere of 59th algebraic +!chvd order of accuracy" +!chvd Russian Acad. Sci. Dokl. Math., Vol. 50, 1995, pp. 283-286. [[cite:Lebedev1995]] +!chvd +!chvd [3] V.I. Lebedev, and A.L. Skorokhodov +!chvd "Quadrature formulas of orders 41, 47, and 53 for the sphere" +!chvd Russian Acad. Sci. Dokl. Math., Vol. 45, 1992, pp. 587-592. [[cite:Lebedev1992]] +!chvd +!chvd [4] V.I. Lebedev +!chvd "Spherical quadrature formulas exact to orders 25-29" +!chvd Siberian Mathematical Journal, Vol. 18, 1977, pp. 99-107. [[cite:Lebedev1977]] +!chvd +!chvd [5] V.I. Lebedev +!chvd "Quadratures on a sphere" +!chvd Computational Mathematics and Mathematical Physics, Vol. 16, 1976, pp. 10-24. [[cite:Lebedev1976]] +!chvd +!chvd [6] V.I. Lebedev +!chvd "Values of the nodes and weights of ninth to seventeenth +!chvd order Gauss-Markov quadrature formulae invariant under the +!chvd octahedron group with inversion" +!chvd Computational Mathematics and Mathematical Physics, Vol. 15, 1975, pp. 44-51. [[cite:Lebedev1975]] +!chvd + N=1 + V=0.6666666666666667D-1 + Call GEN_OH( 1, N, X(N), Y(N), Z(N), W(N), A, B, V) + V=0.7500000000000000D-1 + Call GEN_OH( 3, N, X(N), Y(N), Z(N), W(N), A, B, V) + N=N-1 + end subroutine LD0014 +!!*** + + SUBROUTINE LD0026(X,Y,Z,W,N) + + DOUBLE PRECISION X( 26) + DOUBLE PRECISION Y( 26) + DOUBLE PRECISION Z( 26) + DOUBLE PRECISION W( 26) + INTEGER N + DOUBLE PRECISION A,B,V +!CVW +!CVW LEBEDEV 26-POINT ANGULAR GRID +!CVW +!chvd +!chvd This subroutine is part of a set of subroutines that generate +!chvd Lebedev grids [1-6] for integration on a sphere. The original +!chvd C-code [1] was kindly provided by Dr. Dmitri N. Laikov and +!chvd translated into fortran by Dr. Christoph van Wuellen. +!chvd This subroutine was translated using a C to fortran77 conversion +!chvd tool written by Dr. Christoph van Wuellen. +!chvd +!chvd Users of this code are asked to include reference [1] in their +!chvd publications, and in the user- and programmers-manuals +!chvd describing their codes. +!chvd +!chvd This code was distributed through CCL (http://www.ccl.net/). +!chvd +!chvd [1] V.I. Lebedev, and D.N. Laikov +!chvd "A quadrature formula for the sphere of the 131st +!chvd algebraic order of accuracy" +!chvd Doklady Mathematics, Vol. 59, No. 3, 1999, pp. 477-481. [[cite:Lebedev1999]] +!chvd +!chvd [2] V.I. Lebedev +!chvd "A quadrature formula for the sphere of 59th algebraic +!chvd order of accuracy" +!chvd Russian Acad. Sci. Dokl. Math., Vol. 50, 1995, pp. 283-286. [[cite:Lebedev1995]] +!chvd +!chvd [3] V.I. Lebedev, and A.L. Skorokhodov +!chvd "Quadrature formulas of orders 41, 47, and 53 for the sphere" +!chvd Russian Acad. Sci. Dokl. Math., Vol. 45, 1992, pp. 587-592. [[cite:Lebedev1992]] +!chvd +!chvd [4] V.I. Lebedev +!chvd "Spherical quadrature formulas exact to orders 25-29" +!chvd Siberian Mathematical Journal, Vol. 18, 1977, pp. 99-107. [[cite:Lebedev1977]] +!chvd +!chvd [5] V.I. Lebedev +!chvd "Quadratures on a sphere" +!chvd Computational Mathematics and Mathematical Physics, Vol. 16, 1976, pp. 10-24. [[cite:Lebedev1976]] +!chvd +!chvd [6] V.I. Lebedev +!chvd "Values of the nodes and weights of ninth to seventeenth +!chvd order Gauss-Markov quadrature formulae invariant under the +!chvd octahedron group with inversion" +!chvd Computational Mathematics and Mathematical Physics, Vol. 15, 1975, pp. 44-51. [[cite:Lebedev1975]] +!chvd + N=1 + V=0.4761904761904762D-1 + Call GEN_OH( 1, N, X(N), Y(N), Z(N), W(N), A, B, V) + V=0.3809523809523810D-1 + Call GEN_OH( 2, N, X(N), Y(N), Z(N), W(N), A, B, V) + V=0.3214285714285714D-1 + Call GEN_OH( 3, N, X(N), Y(N), Z(N), W(N), A, B, V) + N=N-1 + end subroutine LD0026 +!!*** + + SUBROUTINE LD0038(X,Y,Z,W,N) + + DOUBLE PRECISION X( 38) + DOUBLE PRECISION Y( 38) + DOUBLE PRECISION Z( 38) + DOUBLE PRECISION W( 38) + INTEGER N + DOUBLE PRECISION A,B,V +!CVW +!CVW LEBEDEV 38-POINT ANGULAR GRID +!CVW +!chvd +!chvd This subroutine is part of a set of subroutines that generate +!chvd Lebedev grids [1-6] for integration on a sphere. The original +!chvd C-code [1] was kindly provided by Dr. Dmitri N. Laikov and +!chvd translated into fortran by Dr. Christoph van Wuellen. +!chvd This subroutine was translated using a C to fortran77 conversion +!chvd tool written by Dr. Christoph van Wuellen. +!chvd +!chvd Users of this code are asked to include reference [1] in their +!chvd publications, and in the user- and programmers-manuals +!chvd describing their codes. +!chvd +!chvd This code was distributed through CCL (http://www.ccl.net/). +!chvd +!chvd [1] V.I. Lebedev, and D.N. Laikov +!chvd "A quadrature formula for the sphere of the 131st +!chvd algebraic order of accuracy" +!chvd Doklady Mathematics, Vol. 59, No. 3, 1999, pp. 477-481. [[cite:Lebedev1999]] +!chvd +!chvd [2] V.I. Lebedev +!chvd "A quadrature formula for the sphere of 59th algebraic +!chvd order of accuracy" +!chvd Russian Acad. Sci. Dokl. Math., Vol. 50, 1995, pp. 283-286. [[cite:Lebedev1995]] +!chvd +!chvd [3] V.I. Lebedev, and A.L. Skorokhodov +!chvd "Quadrature formulas of orders 41, 47, and 53 for the sphere" +!chvd Russian Acad. Sci. Dokl. Math., Vol. 45, 1992, pp. 587-592. [[cite:Lebedev1992]] +!chvd +!chvd [4] V.I. Lebedev +!chvd "Spherical quadrature formulas exact to orders 25-29" +!chvd Siberian Mathematical Journal, Vol. 18, 1977, pp. 99-107. [[cite:Lebedev1977]] +!chvd +!chvd [5] V.I. Lebedev +!chvd "Quadratures on a sphere" +!chvd Computational Mathematics and Mathematical Physics, Vol. 16, 1976, pp. 10-24. [[cite:Lebedev1976]] +!chvd +!chvd [6] V.I. Lebedev +!chvd "Values of the nodes and weights of ninth to seventeenth +!chvd order Gauss-Markov quadrature formulae invariant under the +!chvd octahedron group with inversion" +!chvd Computational Mathematics and Mathematical Physics, Vol. 15, 1975, pp. 44-51. [[cite:Lebedev1975]] +!chvd + N=1 + V=0.9523809523809524D-2 + Call GEN_OH( 1, N, X(N), Y(N), Z(N), W(N), A, B, V) + V=0.3214285714285714D-1 + Call GEN_OH( 3, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4597008433809831D+0 + V=0.2857142857142857D-1 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + N=N-1 + end subroutine LD0038 +!!*** + + SUBROUTINE LD0050(X,Y,Z,W,N) + + DOUBLE PRECISION X( 50) + DOUBLE PRECISION Y( 50) + DOUBLE PRECISION Z( 50) + DOUBLE PRECISION W( 50) + INTEGER N + DOUBLE PRECISION A,B,V +!CVW +!CVW LEBEDEV 50-POINT ANGULAR GRID +!CVW +!chvd +!chvd This subroutine is part of a set of subroutines that generate +!chvd Lebedev grids [1-6] for integration on a sphere. The original +!chvd C-code [1] was kindly provided by Dr. Dmitri N. Laikov and +!chvd translated into fortran by Dr. Christoph van Wuellen. +!chvd This subroutine was translated using a C to fortran77 conversion +!chvd tool written by Dr. Christoph van Wuellen. +!chvd +!chvd Users of this code are asked to include reference [1] in their +!chvd publications, and in the user- and programmers-manuals +!chvd describing their codes. +!chvd +!chvd This code was distributed through CCL (http://www.ccl.net/). +!chvd +!chvd [1] V.I. Lebedev, and D.N. Laikov +!chvd "A quadrature formula for the sphere of the 131st +!chvd algebraic order of accuracy" +!chvd Doklady Mathematics, Vol. 59, No. 3, 1999, pp. 477-481. [[cite:Lebedev1999]] +!chvd +!chvd [2] V.I. Lebedev +!chvd "A quadrature formula for the sphere of 59th algebraic +!chvd order of accuracy" +!chvd Russian Acad. Sci. Dokl. Math., Vol. 50, 1995, pp. 283-286. [[cite:Lebedev1995]] +!chvd +!chvd [3] V.I. Lebedev, and A.L. Skorokhodov +!chvd "Quadrature formulas of orders 41, 47, and 53 for the sphere" +!chvd Russian Acad. Sci. Dokl. Math., Vol. 45, 1992, pp. 587-592. [[cite:Lebedev1992]] +!chvd +!chvd [4] V.I. Lebedev +!chvd "Spherical quadrature formulas exact to orders 25-29" +!chvd Siberian Mathematical Journal, Vol. 18, 1977, pp. 99-107. [[cite:Lebedev1977]] +!chvd +!chvd [5] V.I. Lebedev +!chvd "Quadratures on a sphere" +!chvd Computational Mathematics and Mathematical Physics, Vol. 16, 1976, pp. 10-24. [[cite:Lebedev1976]] +!chvd +!chvd [6] V.I. Lebedev +!chvd "Values of the nodes and weights of ninth to seventeenth +!chvd order Gauss-Markov quadrature formulae invariant under the +!chvd octahedron group with inversion" +!chvd Computational Mathematics and Mathematical Physics, Vol. 15, 1975, pp. 44-51. [[cite:Lebedev1975]] +!chvd + N=1 + V=0.1269841269841270D-1 + Call GEN_OH( 1, N, X(N), Y(N), Z(N), W(N), A, B, V) + V=0.2257495590828924D-1 + Call GEN_OH( 2, N, X(N), Y(N), Z(N), W(N), A, B, V) + V=0.2109375000000000D-1 + Call GEN_OH( 3, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3015113445777636D+0 + V=0.2017333553791887D-1 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + N=N-1 + end subroutine LD0050 +!!*** + + SUBROUTINE LD0074(X,Y,Z,W,N) + + DOUBLE PRECISION X( 74) + DOUBLE PRECISION Y( 74) + DOUBLE PRECISION Z( 74) + DOUBLE PRECISION W( 74) + INTEGER N + DOUBLE PRECISION A,B,V +!CVW +!CVW LEBEDEV 74-POINT ANGULAR GRID +!CVW +!chvd +!chvd This subroutine is part of a set of subroutines that generate +!chvd Lebedev grids [1-6] for integration on a sphere. The original +!chvd C-code [1] was kindly provided by Dr. Dmitri N. Laikov and +!chvd translated into fortran by Dr. Christoph van Wuellen. +!chvd This subroutine was translated using a C to fortran77 conversion +!chvd tool written by Dr. Christoph van Wuellen. +!chvd +!chvd Users of this code are asked to include reference [1] in their +!chvd publications, and in the user- and programmers-manuals +!chvd describing their codes. +!chvd +!chvd This code was distributed through CCL (http://www.ccl.net/). +!chvd +!chvd [1] V.I. Lebedev, and D.N. Laikov +!chvd "A quadrature formula for the sphere of the 131st +!chvd algebraic order of accuracy" +!chvd Doklady Mathematics, Vol. 59, No. 3, 1999, pp. 477-481. [[cite:Lebedev1999]] +!chvd +!chvd [2] V.I. Lebedev +!chvd "A quadrature formula for the sphere of 59th algebraic +!chvd order of accuracy" +!chvd Russian Acad. Sci. Dokl. Math., Vol. 50, 1995, pp. 283-286. [[cite:Lebedev1995]] +!chvd +!chvd [3] V.I. Lebedev, and A.L. Skorokhodov +!chvd "Quadrature formulas of orders 41, 47, and 53 for the sphere" +!chvd Russian Acad. Sci. Dokl. Math., Vol. 45, 1992, pp. 587-592. [[cite:Lebedev1992]] +!chvd +!chvd [4] V.I. Lebedev +!chvd "Spherical quadrature formulas exact to orders 25-29" +!chvd Siberian Mathematical Journal, Vol. 18, 1977, pp. 99-107. [[cite:Lebedev1977]] +!chvd +!chvd [5] V.I. Lebedev +!chvd "Quadratures on a sphere" +!chvd Computational Mathematics and Mathematical Physics, Vol. 16, 1976, pp. 10-24. [[cite:Lebedev1976]] +!chvd +!chvd [6] V.I. Lebedev +!chvd "Values of the nodes and weights of ninth to seventeenth +!chvd order Gauss-Markov quadrature formulae invariant under the +!chvd octahedron group with inversion" +!chvd Computational Mathematics and Mathematical Physics, Vol. 15, 1975, pp. 44-51. [[cite:Lebedev1975]] +!chvd + N=1 + V=0.5130671797338464D-3 + Call GEN_OH( 1, N, X(N), Y(N), Z(N), W(N), A, B, V) + V=0.1660406956574204D-1 + Call GEN_OH( 2, N, X(N), Y(N), Z(N), W(N), A, B, V) + V=-0.2958603896103896D-1 + Call GEN_OH( 3, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4803844614152614D+0 + V=0.2657620708215946D-1 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3207726489807764D+0 + V=0.1652217099371571D-1 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + N=N-1 + end subroutine LD0074 +!!*** + + SUBROUTINE LD0086(X,Y,Z,W,N) + + DOUBLE PRECISION X( 86) + DOUBLE PRECISION Y( 86) + DOUBLE PRECISION Z( 86) + DOUBLE PRECISION W( 86) + INTEGER N + DOUBLE PRECISION A,B,V +!CVW +!CVW LEBEDEV 86-POINT ANGULAR GRID +!CVW +!chvd +!chvd This subroutine is part of a set of subroutines that generate +!chvd Lebedev grids [1-6] for integration on a sphere. The original +!chvd C-code [1] was kindly provided by Dr. Dmitri N. Laikov and +!chvd translated into fortran by Dr. Christoph van Wuellen. +!chvd This subroutine was translated using a C to fortran77 conversion +!chvd tool written by Dr. Christoph van Wuellen. +!chvd +!chvd Users of this code are asked to include reference [1] in their +!chvd publications, and in the user- and programmers-manuals +!chvd describing their codes. +!chvd +!chvd This code was distributed through CCL (http://www.ccl.net/). +!chvd +!chvd [1] V.I. Lebedev, and D.N. Laikov +!chvd "A quadrature formula for the sphere of the 131st +!chvd algebraic order of accuracy" +!chvd Doklady Mathematics, Vol. 59, No. 3, 1999, pp. 477-481. [[cite:Lebedev1999]] +!chvd +!chvd [2] V.I. Lebedev +!chvd "A quadrature formula for the sphere of 59th algebraic +!chvd order of accuracy" +!chvd Russian Acad. Sci. Dokl. Math., Vol. 50, 1995, pp. 283-286. [[cite:Lebedev1995]] +!chvd +!chvd [3] V.I. Lebedev, and A.L. Skorokhodov +!chvd "Quadrature formulas of orders 41, 47, and 53 for the sphere" +!chvd Russian Acad. Sci. Dokl. Math., Vol. 45, 1992, pp. 587-592. [[cite:Lebedev1992]] +!chvd +!chvd [4] V.I. Lebedev +!chvd "Spherical quadrature formulas exact to orders 25-29" +!chvd Siberian Mathematical Journal, Vol. 18, 1977, pp. 99-107. [[cite:Lebedev1977]] +!chvd +!chvd [5] V.I. Lebedev +!chvd "Quadratures on a sphere" +!chvd Computational Mathematics and Mathematical Physics, Vol. 16, 1976, pp. 10-24. [[cite:Lebedev1976]] +!chvd +!chvd [6] V.I. Lebedev +!chvd "Values of the nodes and weights of ninth to seventeenth +!chvd order Gauss-Markov quadrature formulae invariant under the +!chvd octahedron group with inversion" +!chvd Computational Mathematics and Mathematical Physics, Vol. 15, 1975, pp. 44-51. [[cite:Lebedev1975]] +!chvd + N=1 + V=0.1154401154401154D-1 + Call GEN_OH( 1, N, X(N), Y(N), Z(N), W(N), A, B, V) + V=0.1194390908585628D-1 + Call GEN_OH( 3, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3696028464541502D+0 + V=0.1111055571060340D-1 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6943540066026664D+0 + V=0.1187650129453714D-1 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3742430390903412D+0 + V=0.1181230374690448D-1 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + N=N-1 + end subroutine LD0086 +!!*** + + SUBROUTINE LD0110(X,Y,Z,W,N) + + DOUBLE PRECISION X( 110) + DOUBLE PRECISION Y( 110) + DOUBLE PRECISION Z( 110) + DOUBLE PRECISION W( 110) + INTEGER N + DOUBLE PRECISION A,B,V +!CVW +!CVW LEBEDEV 110-POINT ANGULAR GRID +!CVW +!chvd +!chvd This subroutine is part of a set of subroutines that generate +!chvd Lebedev grids [1-6] for integration on a sphere. The original +!chvd C-code [1] was kindly provided by Dr. Dmitri N. Laikov and +!chvd translated into fortran by Dr. Christoph van Wuellen. +!chvd This subroutine was translated using a C to fortran77 conversion +!chvd tool written by Dr. Christoph van Wuellen. +!chvd +!chvd Users of this code are asked to include reference [1] in their +!chvd publications, and in the user- and programmers-manuals +!chvd describing their codes. +!chvd +!chvd This code was distributed through CCL (http://www.ccl.net/). +!chvd +!chvd [1] V.I. Lebedev, and D.N. Laikov +!chvd "A quadrature formula for the sphere of the 131st +!chvd algebraic order of accuracy" +!chvd Doklady Mathematics, Vol. 59, No. 3, 1999, pp. 477-481. [[cite:Lebedev1999]] +!chvd +!chvd [2] V.I. Lebedev +!chvd "A quadrature formula for the sphere of 59th algebraic +!chvd order of accuracy" +!chvd Russian Acad. Sci. Dokl. Math., Vol. 50, 1995, pp. 283-286. [[cite:Lebedev1995]] +!chvd +!chvd [3] V.I. Lebedev, and A.L. Skorokhodov +!chvd "Quadrature formulas of orders 41, 47, and 53 for the sphere" +!chvd Russian Acad. Sci. Dokl. Math., Vol. 45, 1992, pp. 587-592. [[cite:Lebedev1992]] +!chvd +!chvd [4] V.I. Lebedev +!chvd "Spherical quadrature formulas exact to orders 25-29" +!chvd Siberian Mathematical Journal, Vol. 18, 1977, pp. 99-107. [[cite:Lebedev1977]] +!chvd +!chvd [5] V.I. Lebedev +!chvd "Quadratures on a sphere" +!chvd Computational Mathematics and Mathematical Physics, Vol. 16, 1976, pp. 10-24. [[cite:Lebedev1976]] +!chvd +!chvd [6] V.I. Lebedev +!chvd "Values of the nodes and weights of ninth to seventeenth +!chvd order Gauss-Markov quadrature formulae invariant under the +!chvd octahedron group with inversion" +!chvd Computational Mathematics and Mathematical Physics, Vol. 15, 1975, pp. 44-51. [[cite:Lebedev1975]] +!chvd + N=1 + V=0.3828270494937162D-2 + Call GEN_OH( 1, N, X(N), Y(N), Z(N), W(N), A, B, V) + V=0.9793737512487512D-2 + Call GEN_OH( 3, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1851156353447362D+0 + V=0.8211737283191111D-2 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6904210483822922D+0 + V=0.9942814891178103D-2 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3956894730559419D+0 + V=0.9595471336070963D-2 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4783690288121502D+0 + V=0.9694996361663028D-2 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + N=N-1 + end subroutine LD0110 +!!*** + + SUBROUTINE LD0146(X,Y,Z,W,N) + + DOUBLE PRECISION X( 146) + DOUBLE PRECISION Y( 146) + DOUBLE PRECISION Z( 146) + DOUBLE PRECISION W( 146) + INTEGER N + DOUBLE PRECISION A,B,V +!CVW +!CVW LEBEDEV 146-POINT ANGULAR GRID +!CVW +!chvd +!chvd This subroutine is part of a set of subroutines that generate +!chvd Lebedev grids [1-6] for integration on a sphere. The original +!chvd C-code [1] was kindly provided by Dr. Dmitri N. Laikov and +!chvd translated into fortran by Dr. Christoph van Wuellen. +!chvd This subroutine was translated using a C to fortran77 conversion +!chvd tool written by Dr. Christoph van Wuellen. +!chvd +!chvd Users of this code are asked to include reference [1] in their +!chvd publications, and in the user- and programmers-manuals +!chvd describing their codes. +!chvd +!chvd This code was distributed through CCL (http://www.ccl.net/). +!chvd +!chvd [1] V.I. Lebedev, and D.N. Laikov +!chvd "A quadrature formula for the sphere of the 131st +!chvd algebraic order of accuracy" +!chvd Doklady Mathematics, Vol. 59, No. 3, 1999, pp. 477-481. [[cite:Lebedev1999]] +!chvd +!chvd [2] V.I. Lebedev +!chvd "A quadrature formula for the sphere of 59th algebraic +!chvd order of accuracy" +!chvd Russian Acad. Sci. Dokl. Math., Vol. 50, 1995, pp. 283-286. [[cite:Lebedev1995]] +!chvd +!chvd [3] V.I. Lebedev, and A.L. Skorokhodov +!chvd "Quadrature formulas of orders 41, 47, and 53 for the sphere" +!chvd Russian Acad. Sci. Dokl. Math., Vol. 45, 1992, pp. 587-592. [[cite:Lebedev1992]] +!chvd +!chvd [4] V.I. Lebedev +!chvd "Spherical quadrature formulas exact to orders 25-29" +!chvd Siberian Mathematical Journal, Vol. 18, 1977, pp. 99-107. [[cite:Lebedev1977]] +!chvd +!chvd [5] V.I. Lebedev +!chvd "Quadratures on a sphere" +!chvd Computational Mathematics and Mathematical Physics, Vol. 16, 1976, pp. 10-24. [[cite:Lebedev1976]] +!chvd +!chvd [6] V.I. Lebedev +!chvd "Values of the nodes and weights of ninth to seventeenth +!chvd order Gauss-Markov quadrature formulae invariant under the +!chvd octahedron group with inversion" +!chvd Computational Mathematics and Mathematical Physics, Vol. 15, 1975, pp. 44-51. [[cite:Lebedev1975]] +!chvd + N=1 + V=0.5996313688621381D-3 + Call GEN_OH( 1, N, X(N), Y(N), Z(N), W(N), A, B, V) + V=0.7372999718620756D-2 + Call GEN_OH( 2, N, X(N), Y(N), Z(N), W(N), A, B, V) + V=0.7210515360144488D-2 + Call GEN_OH( 3, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6764410400114264D+0 + V=0.7116355493117555D-2 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4174961227965453D+0 + V=0.6753829486314477D-2 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1574676672039082D+0 + V=0.7574394159054034D-2 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1403553811713183D+0 + B=0.4493328323269557D+0 + V=0.6991087353303262D-2 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + N=N-1 + end subroutine LD0146 +!!*** + + SUBROUTINE LD0170(X,Y,Z,W,N) + + DOUBLE PRECISION X( 170) + DOUBLE PRECISION Y( 170) + DOUBLE PRECISION Z( 170) + DOUBLE PRECISION W( 170) + INTEGER N + DOUBLE PRECISION A,B,V +!CVW +!CVW LEBEDEV 170-POINT ANGULAR GRID +!CVW +!chvd +!chvd This subroutine is part of a set of subroutines that generate +!chvd Lebedev grids [1-6] for integration on a sphere. The original +!chvd C-code [1] was kindly provided by Dr. Dmitri N. Laikov and +!chvd translated into fortran by Dr. Christoph van Wuellen. +!chvd This subroutine was translated using a C to fortran77 conversion +!chvd tool written by Dr. Christoph van Wuellen. +!chvd +!chvd Users of this code are asked to include reference [1] in their +!chvd publications, and in the user- and programmers-manuals +!chvd describing their codes. +!chvd +!chvd This code was distributed through CCL (http://www.ccl.net/). +!chvd +!chvd [1] V.I. Lebedev, and D.N. Laikov +!chvd "A quadrature formula for the sphere of the 131st +!chvd algebraic order of accuracy" +!chvd Doklady Mathematics, Vol. 59, No. 3, 1999, pp. 477-481. [[cite:Lebedev1999]] +!chvd +!chvd [2] V.I. Lebedev +!chvd "A quadrature formula for the sphere of 59th algebraic +!chvd order of accuracy" +!chvd Russian Acad. Sci. Dokl. Math., Vol. 50, 1995, pp. 283-286. [[cite:Lebedev1995]] +!chvd +!chvd [3] V.I. Lebedev, and A.L. Skorokhodov +!chvd "Quadrature formulas of orders 41, 47, and 53 for the sphere" +!chvd Russian Acad. Sci. Dokl. Math., Vol. 45, 1992, pp. 587-592. [[cite:Lebedev1992]] +!chvd +!chvd [4] V.I. Lebedev +!chvd "Spherical quadrature formulas exact to orders 25-29" +!chvd Siberian Mathematical Journal, Vol. 18, 1977, pp. 99-107. [[cite:Lebedev1977]] +!chvd +!chvd [5] V.I. Lebedev +!chvd "Quadratures on a sphere" +!chvd Computational Mathematics and Mathematical Physics, Vol. 16, 1976, pp. 10-24. [[cite:Lebedev1976]] +!chvd +!chvd [6] V.I. Lebedev +!chvd "Values of the nodes and weights of ninth to seventeenth +!chvd order Gauss-Markov quadrature formulae invariant under the +!chvd octahedron group with inversion" +!chvd Computational Mathematics and Mathematical Physics, Vol. 15, 1975, pp. 44-51. [[cite:Lebedev1975]] +!chvd + N=1 + V=0.5544842902037365D-2 + Call GEN_OH( 1, N, X(N), Y(N), Z(N), W(N), A, B, V) + V=0.6071332770670752D-2 + Call GEN_OH( 2, N, X(N), Y(N), Z(N), W(N), A, B, V) + V=0.6383674773515093D-2 + Call GEN_OH( 3, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2551252621114134D+0 + V=0.5183387587747790D-2 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6743601460362766D+0 + V=0.6317929009813725D-2 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4318910696719410D+0 + V=0.6201670006589077D-2 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2613931360335988D+0 + V=0.5477143385137348D-2 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4990453161796037D+0 + B=0.1446630744325115D+0 + V=0.5968383987681156D-2 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + N=N-1 + end subroutine LD0170 +!!*** + + SUBROUTINE LD0194(X,Y,Z,W,N) + + DOUBLE PRECISION X( 194) + DOUBLE PRECISION Y( 194) + DOUBLE PRECISION Z( 194) + DOUBLE PRECISION W( 194) + INTEGER N + DOUBLE PRECISION A,B,V +!CVW +!CVW LEBEDEV 194-POINT ANGULAR GRID +!CVW +!chvd +!chvd This subroutine is part of a set of subroutines that generate +!chvd Lebedev grids [1-6] for integration on a sphere. The original +!chvd C-code [1] was kindly provided by Dr. Dmitri N. Laikov and +!chvd translated into fortran by Dr. Christoph van Wuellen. +!chvd This subroutine was translated using a C to fortran77 conversion +!chvd tool written by Dr. Christoph van Wuellen. +!chvd +!chvd Users of this code are asked to include reference [1] in their +!chvd publications, and in the user- and programmers-manuals +!chvd describing their codes. +!chvd +!chvd This code was distributed through CCL (http://www.ccl.net/). +!chvd +!chvd [1] V.I. Lebedev, and D.N. Laikov +!chvd "A quadrature formula for the sphere of the 131st +!chvd algebraic order of accuracy" +!chvd Doklady Mathematics, Vol. 59, No. 3, 1999, pp. 477-481. [[cite:Lebedev1999]] +!chvd +!chvd [2] V.I. Lebedev +!chvd "A quadrature formula for the sphere of 59th algebraic +!chvd order of accuracy" +!chvd Russian Acad. Sci. Dokl. Math., Vol. 50, 1995, pp. 283-286. [[cite:Lebedev1995]] +!chvd +!chvd [3] V.I. Lebedev, and A.L. Skorokhodov +!chvd "Quadrature formulas of orders 41, 47, and 53 for the sphere" +!chvd Russian Acad. Sci. Dokl. Math., Vol. 45, 1992, pp. 587-592. [[cite:Lebedev1992]] +!chvd +!chvd [4] V.I. Lebedev +!chvd "Spherical quadrature formulas exact to orders 25-29" +!chvd Siberian Mathematical Journal, Vol. 18, 1977, pp. 99-107. [[cite:Lebedev1977]] +!chvd +!chvd [5] V.I. Lebedev +!chvd "Quadratures on a sphere" +!chvd Computational Mathematics and Mathematical Physics, Vol. 16, 1976, pp. 10-24. [[cite:Lebedev1976]] +!chvd +!chvd [6] V.I. Lebedev +!chvd "Values of the nodes and weights of ninth to seventeenth +!chvd order Gauss-Markov quadrature formulae invariant under the +!chvd octahedron group with inversion" +!chvd Computational Mathematics and Mathematical Physics, Vol. 15, 1975, pp. 44-51. [[cite:Lebedev1975]] +!chvd + N=1 + V=0.1782340447244611D-2 + Call GEN_OH( 1, N, X(N), Y(N), Z(N), W(N), A, B, V) + V=0.5716905949977102D-2 + Call GEN_OH( 2, N, X(N), Y(N), Z(N), W(N), A, B, V) + V=0.5573383178848738D-2 + Call GEN_OH( 3, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6712973442695226D+0 + V=0.5608704082587997D-2 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2892465627575439D+0 + V=0.5158237711805383D-2 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4446933178717437D+0 + V=0.5518771467273614D-2 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1299335447650067D+0 + V=0.4106777028169394D-2 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3457702197611283D+0 + V=0.5051846064614808D-2 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1590417105383530D+0 + B=0.8360360154824589D+0 + V=0.5530248916233094D-2 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + N=N-1 + end subroutine LD0194 +!!*** + + SUBROUTINE LD0230(X,Y,Z,W,N) + + DOUBLE PRECISION X( 230) + DOUBLE PRECISION Y( 230) + DOUBLE PRECISION Z( 230) + DOUBLE PRECISION W( 230) + INTEGER N + DOUBLE PRECISION A,B,V +!CVW +!CVW LEBEDEV 230-POINT ANGULAR GRID +!CVW +!chvd +!chvd This subroutine is part of a set of subroutines that generate +!chvd Lebedev grids [1-6] for integration on a sphere. The original +!chvd C-code [1] was kindly provided by Dr. Dmitri N. Laikov and +!chvd translated into fortran by Dr. Christoph van Wuellen. +!chvd This subroutine was translated using a C to fortran77 conversion +!chvd tool written by Dr. Christoph van Wuellen. +!chvd +!chvd Users of this code are asked to include reference [1] in their +!chvd publications, and in the user- and programmers-manuals +!chvd describing their codes. +!chvd +!chvd This code was distributed through CCL (http://www.ccl.net/). +!chvd +!chvd [1] V.I. Lebedev, and D.N. Laikov +!chvd "A quadrature formula for the sphere of the 131st +!chvd algebraic order of accuracy" +!chvd Doklady Mathematics, Vol. 59, No. 3, 1999, pp. 477-481. [[cite:Lebedev1999]] +!chvd +!chvd [2] V.I. Lebedev +!chvd "A quadrature formula for the sphere of 59th algebraic +!chvd order of accuracy" +!chvd Russian Acad. Sci. Dokl. Math., Vol. 50, 1995, pp. 283-286. [[cite:Lebedev1995]] +!chvd +!chvd [3] V.I. Lebedev, and A.L. Skorokhodov +!chvd "Quadrature formulas of orders 41, 47, and 53 for the sphere" +!chvd Russian Acad. Sci. Dokl. Math., Vol. 45, 1992, pp. 587-592. [[cite:Lebedev1992]] +!chvd +!chvd [4] V.I. Lebedev +!chvd "Spherical quadrature formulas exact to orders 25-29" +!chvd Siberian Mathematical Journal, Vol. 18, 1977, pp. 99-107. [[cite:Lebedev1977]] +!chvd +!chvd [5] V.I. Lebedev +!chvd "Quadratures on a sphere" +!chvd Computational Mathematics and Mathematical Physics, Vol. 16, 1976, pp. 10-24. [[cite:Lebedev1976]] +!chvd +!chvd [6] V.I. Lebedev +!chvd "Values of the nodes and weights of ninth to seventeenth +!chvd order Gauss-Markov quadrature formulae invariant under the +!chvd octahedron group with inversion" +!chvd Computational Mathematics and Mathematical Physics, Vol. 15, 1975, pp. 44-51. [[cite:Lebedev1975]] +!chvd + N=1 + V=-0.5522639919727325D-1 + Call GEN_OH( 1, N, X(N), Y(N), Z(N), W(N), A, B, V) + V=0.4450274607445226D-2 + Call GEN_OH( 3, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4492044687397611D+0 + V=0.4496841067921404D-2 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2520419490210201D+0 + V=0.5049153450478750D-2 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6981906658447242D+0 + V=0.3976408018051883D-2 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6587405243460960D+0 + V=0.4401400650381014D-2 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4038544050097660D-1 + V=0.1724544350544401D-1 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5823842309715585D+0 + V=0.4231083095357343D-2 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3545877390518688D+0 + V=0.5198069864064399D-2 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2272181808998187D+0 + B=0.4864661535886647D+0 + V=0.4695720972568883D-2 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + N=N-1 + end subroutine LD0230 +!!*** + + SUBROUTINE LD0266(X,Y,Z,W,N) + + DOUBLE PRECISION X( 266) + DOUBLE PRECISION Y( 266) + DOUBLE PRECISION Z( 266) + DOUBLE PRECISION W( 266) + INTEGER N + DOUBLE PRECISION A,B,V +!CVW +!CVW LEBEDEV 266-POINT ANGULAR GRID +!CVW +!chvd +!chvd This subroutine is part of a set of subroutines that generate +!chvd Lebedev grids [1-6] for integration on a sphere. The original +!chvd C-code [1] was kindly provided by Dr. Dmitri N. Laikov and +!chvd translated into fortran by Dr. Christoph van Wuellen. +!chvd This subroutine was translated using a C to fortran77 conversion +!chvd tool written by Dr. Christoph van Wuellen. +!chvd +!chvd Users of this code are asked to include reference [1] in their +!chvd publications, and in the user- and programmers-manuals +!chvd describing their codes. +!chvd +!chvd This code was distributed through CCL (http://www.ccl.net/). +!chvd +!chvd [1] V.I. Lebedev, and D.N. Laikov +!chvd "A quadrature formula for the sphere of the 131st +!chvd algebraic order of accuracy" +!chvd Doklady Mathematics, Vol. 59, No. 3, 1999, pp. 477-481. [[cite:Lebedev1999]] +!chvd +!chvd [2] V.I. Lebedev +!chvd "A quadrature formula for the sphere of 59th algebraic +!chvd order of accuracy" +!chvd Russian Acad. Sci. Dokl. Math., Vol. 50, 1995, pp. 283-286. [[cite:Lebedev1995]] +!chvd +!chvd [3] V.I. Lebedev, and A.L. Skorokhodov +!chvd "Quadrature formulas of orders 41, 47, and 53 for the sphere" +!chvd Russian Acad. Sci. Dokl. Math., Vol. 45, 1992, pp. 587-592. [[cite:Lebedev1992]] +!chvd +!chvd [4] V.I. Lebedev +!chvd "Spherical quadrature formulas exact to orders 25-29" +!chvd Siberian Mathematical Journal, Vol. 18, 1977, pp. 99-107. [[cite:Lebedev1977]] +!chvd +!chvd [5] V.I. Lebedev +!chvd "Quadratures on a sphere" +!chvd Computational Mathematics and Mathematical Physics, Vol. 16, 1976, pp. 10-24. [[cite:Lebedev1976]] +!chvd +!chvd [6] V.I. Lebedev +!chvd "Values of the nodes and weights of ninth to seventeenth +!chvd order Gauss-Markov quadrature formulae invariant under the +!chvd octahedron group with inversion" +!chvd Computational Mathematics and Mathematical Physics, Vol. 15, 1975, pp. 44-51. [[cite:Lebedev1975]] +!chvd + N=1 + V=-0.1313769127326952D-2 + Call GEN_OH( 1, N, X(N), Y(N), Z(N), W(N), A, B, V) + V=-0.2522728704859336D-2 + Call GEN_OH( 2, N, X(N), Y(N), Z(N), W(N), A, B, V) + V=0.4186853881700583D-2 + Call GEN_OH( 3, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.7039373391585475D+0 + V=0.5315167977810885D-2 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1012526248572414D+0 + V=0.4047142377086219D-2 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4647448726420539D+0 + V=0.4112482394406990D-2 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3277420654971629D+0 + V=0.3595584899758782D-2 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6620338663699974D+0 + V=0.4256131351428158D-2 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.8506508083520399D+0 + V=0.4229582700647240D-2 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3233484542692899D+0 + B=0.1153112011009701D+0 + V=0.4080914225780505D-2 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2314790158712601D+0 + B=0.5244939240922365D+0 + V=0.4071467593830964D-2 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + N=N-1 + end subroutine LD0266 +!!*** + + SUBROUTINE LD0302(X,Y,Z,W,N) + + DOUBLE PRECISION X( 302) + DOUBLE PRECISION Y( 302) + DOUBLE PRECISION Z( 302) + DOUBLE PRECISION W( 302) + INTEGER N + DOUBLE PRECISION A,B,V +!CVW +!CVW LEBEDEV 302-POINT ANGULAR GRID +!CVW +!chvd +!chvd This subroutine is part of a set of subroutines that generate +!chvd Lebedev grids [1-6] for integration on a sphere. The original +!chvd C-code [1] was kindly provided by Dr. Dmitri N. Laikov and +!chvd translated into fortran by Dr. Christoph van Wuellen. +!chvd This subroutine was translated using a C to fortran77 conversion +!chvd tool written by Dr. Christoph van Wuellen. +!chvd +!chvd Users of this code are asked to include reference [1] in their +!chvd publications, and in the user- and programmers-manuals +!chvd describing their codes. +!chvd +!chvd This code was distributed through CCL (http://www.ccl.net/). +!chvd +!chvd [1] V.I. Lebedev, and D.N. Laikov +!chvd "A quadrature formula for the sphere of the 131st +!chvd algebraic order of accuracy" +!chvd Doklady Mathematics, Vol. 59, No. 3, 1999, pp. 477-481. [[cite:Lebedev1999]] +!chvd +!chvd [2] V.I. Lebedev +!chvd "A quadrature formula for the sphere of 59th algebraic +!chvd order of accuracy" +!chvd Russian Acad. Sci. Dokl. Math., Vol. 50, 1995, pp. 283-286. [[cite:Lebedev1995]] +!chvd +!chvd [3] V.I. Lebedev, and A.L. Skorokhodov +!chvd "Quadrature formulas of orders 41, 47, and 53 for the sphere" +!chvd Russian Acad. Sci. Dokl. Math., Vol. 45, 1992, pp. 587-592. [[cite:Lebedev1992]] +!chvd +!chvd [4] V.I. Lebedev +!chvd "Spherical quadrature formulas exact to orders 25-29" +!chvd Siberian Mathematical Journal, Vol. 18, 1977, pp. 99-107. [[cite:Lebedev1977]] +!chvd +!chvd [5] V.I. Lebedev +!chvd "Quadratures on a sphere" +!chvd Computational Mathematics and Mathematical Physics, Vol. 16, 1976, pp. 10-24. [[cite:Lebedev1976]] +!chvd +!chvd [6] V.I. Lebedev +!chvd "Values of the nodes and weights of ninth to seventeenth +!chvd order Gauss-Markov quadrature formulae invariant under the +!chvd octahedron group with inversion" +!chvd Computational Mathematics and Mathematical Physics, Vol. 15, 1975, pp. 44-51. [[cite:Lebedev1975]] +!chvd + N=1 + V=0.8545911725128148D-3 + Call GEN_OH( 1, N, X(N), Y(N), Z(N), W(N), A, B, V) + V=0.3599119285025571D-2 + Call GEN_OH( 3, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3515640345570105D+0 + V=0.3449788424305883D-2 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6566329410219612D+0 + V=0.3604822601419882D-2 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4729054132581005D+0 + V=0.3576729661743367D-2 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.9618308522614784D-1 + V=0.2352101413689164D-2 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2219645236294178D+0 + V=0.3108953122413675D-2 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.7011766416089545D+0 + V=0.3650045807677255D-2 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2644152887060663D+0 + V=0.2982344963171804D-2 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5718955891878961D+0 + V=0.3600820932216460D-2 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2510034751770465D+0 + B=0.8000727494073952D+0 + V=0.3571540554273387D-2 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1233548532583327D+0 + B=0.4127724083168531D+0 + V=0.3392312205006170D-2 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + N=N-1 + end subroutine LD0302 +!!*** + + SUBROUTINE LD0350(X,Y,Z,W,N) + + DOUBLE PRECISION X( 350) + DOUBLE PRECISION Y( 350) + DOUBLE PRECISION Z( 350) + DOUBLE PRECISION W( 350) + INTEGER N + DOUBLE PRECISION A,B,V +!CVW +!CVW LEBEDEV 350-POINT ANGULAR GRID +!CVW +!chvd +!chvd This subroutine is part of a set of subroutines that generate +!chvd Lebedev grids [1-6] for integration on a sphere. The original +!chvd C-code [1] was kindly provided by Dr. Dmitri N. Laikov and +!chvd translated into fortran by Dr. Christoph van Wuellen. +!chvd This subroutine was translated using a C to fortran77 conversion +!chvd tool written by Dr. Christoph van Wuellen. +!chvd +!chvd Users of this code are asked to include reference [1] in their +!chvd publications, and in the user- and programmers-manuals +!chvd describing their codes. +!chvd +!chvd This code was distributed through CCL (http://www.ccl.net/). +!chvd +!chvd [1] V.I. Lebedev, and D.N. Laikov +!chvd "A quadrature formula for the sphere of the 131st +!chvd algebraic order of accuracy" +!chvd Doklady Mathematics, Vol. 59, No. 3, 1999, pp. 477-481. [[cite:Lebedev1999]] +!chvd +!chvd [2] V.I. Lebedev +!chvd "A quadrature formula for the sphere of 59th algebraic +!chvd order of accuracy" +!chvd Russian Acad. Sci. Dokl. Math., Vol. 50, 1995, pp. 283-286. [[cite:Lebedev1995]] +!chvd +!chvd [3] V.I. Lebedev, and A.L. Skorokhodov +!chvd "Quadrature formulas of orders 41, 47, and 53 for the sphere" +!chvd Russian Acad. Sci. Dokl. Math., Vol. 45, 1992, pp. 587-592. [[cite:Lebedev1992]] +!chvd +!chvd [4] V.I. Lebedev +!chvd "Spherical quadrature formulas exact to orders 25-29" +!chvd Siberian Mathematical Journal, Vol. 18, 1977, pp. 99-107. [[cite:Lebedev1977]] +!chvd +!chvd [5] V.I. Lebedev +!chvd "Quadratures on a sphere" +!chvd Computational Mathematics and Mathematical Physics, Vol. 16, 1976, pp. 10-24. [[cite:Lebedev1976]] +!chvd +!chvd [6] V.I. Lebedev +!chvd "Values of the nodes and weights of ninth to seventeenth +!chvd order Gauss-Markov quadrature formulae invariant under the +!chvd octahedron group with inversion" +!chvd Computational Mathematics and Mathematical Physics, Vol. 15, 1975, pp. 44-51. [[cite:Lebedev1975]] +!chvd + N=1 + V=0.3006796749453936D-2 + Call GEN_OH( 1, N, X(N), Y(N), Z(N), W(N), A, B, V) + V=0.3050627745650771D-2 + Call GEN_OH( 3, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.7068965463912316D+0 + V=0.1621104600288991D-2 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4794682625712025D+0 + V=0.3005701484901752D-2 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1927533154878019D+0 + V=0.2990992529653774D-2 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6930357961327123D+0 + V=0.2982170644107595D-2 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3608302115520091D+0 + V=0.2721564237310992D-2 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6498486161496169D+0 + V=0.3033513795811141D-2 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1932945013230339D+0 + V=0.3007949555218533D-2 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3800494919899303D+0 + V=0.2881964603055307D-2 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2899558825499574D+0 + B=0.7934537856582316D+0 + V=0.2958357626535696D-2 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.9684121455103957D-1 + B=0.8280801506686862D+0 + V=0.3036020026407088D-2 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1833434647041659D+0 + B=0.9074658265305127D+0 + V=0.2832187403926303D-2 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + N=N-1 + end subroutine LD0350 +!!*** + + SUBROUTINE LD0434(X,Y,Z,W,N) + + DOUBLE PRECISION X( 434) + DOUBLE PRECISION Y( 434) + DOUBLE PRECISION Z( 434) + DOUBLE PRECISION W( 434) + INTEGER N + DOUBLE PRECISION A,B,V +!CVW +!CVW LEBEDEV 434-POINT ANGULAR GRID +!CVW +!chvd +!chvd This subroutine is part of a set of subroutines that generate +!chvd Lebedev grids [1-6] for integration on a sphere. The original +!chvd C-code [1] was kindly provided by Dr. Dmitri N. Laikov and +!chvd translated into fortran by Dr. Christoph van Wuellen. +!chvd This subroutine was translated using a C to fortran77 conversion +!chvd tool written by Dr. Christoph van Wuellen. +!chvd +!chvd Users of this code are asked to include reference [1] in their +!chvd publications, and in the user- and programmers-manuals +!chvd describing their codes. +!chvd +!chvd This code was distributed through CCL (http://www.ccl.net/). +!chvd +!chvd [1] V.I. Lebedev, and D.N. Laikov +!chvd "A quadrature formula for the sphere of the 131st +!chvd algebraic order of accuracy" +!chvd Doklady Mathematics, Vol. 59, No. 3, 1999, pp. 477-481. [[cite:Lebedev1999]] +!chvd +!chvd [2] V.I. Lebedev +!chvd "A quadrature formula for the sphere of 59th algebraic +!chvd order of accuracy" +!chvd Russian Acad. Sci. Dokl. Math., Vol. 50, 1995, pp. 283-286. [[cite:Lebedev1995]] +!chvd +!chvd [3] V.I. Lebedev, and A.L. Skorokhodov +!chvd "Quadrature formulas of orders 41, 47, and 53 for the sphere" +!chvd Russian Acad. Sci. Dokl. Math., Vol. 45, 1992, pp. 587-592. [[cite:Lebedev1992]] +!chvd +!chvd [4] V.I. Lebedev +!chvd "Spherical quadrature formulas exact to orders 25-29" +!chvd Siberian Mathematical Journal, Vol. 18, 1977, pp. 99-107. [[cite:Lebedev1977]] +!chvd +!chvd [5] V.I. Lebedev +!chvd "Quadratures on a sphere" +!chvd Computational Mathematics and Mathematical Physics, Vol. 16, 1976, pp. 10-24. [[cite:Lebedev1976]] +!chvd +!chvd [6] V.I. Lebedev +!chvd "Values of the nodes and weights of ninth to seventeenth +!chvd order Gauss-Markov quadrature formulae invariant under the +!chvd octahedron group with inversion" +!chvd Computational Mathematics and Mathematical Physics, Vol. 15, 1975, pp. 44-51. [[cite:Lebedev1975]] +!chvd + N=1 + V=0.5265897968224436D-3 + Call GEN_OH( 1, N, X(N), Y(N), Z(N), W(N), A, B, V) + V=0.2548219972002607D-2 + Call GEN_OH( 2, N, X(N), Y(N), Z(N), W(N), A, B, V) + V=0.2512317418927307D-2 + Call GEN_OH( 3, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6909346307509111D+0 + V=0.2530403801186355D-2 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1774836054609158D+0 + V=0.2014279020918528D-2 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4914342637784746D+0 + V=0.2501725168402936D-2 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6456664707424256D+0 + V=0.2513267174597564D-2 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2861289010307638D+0 + V=0.2302694782227416D-2 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.7568084367178018D-1 + V=0.1462495621594614D-2 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3927259763368002D+0 + V=0.2445373437312980D-2 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.8818132877794288D+0 + V=0.2417442375638981D-2 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.9776428111182649D+0 + V=0.1910951282179532D-2 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2054823696403044D+0 + B=0.8689460322872412D+0 + V=0.2416930044324775D-2 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5905157048925271D+0 + B=0.7999278543857286D+0 + V=0.2512236854563495D-2 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5550152361076807D+0 + B=0.7717462626915901D+0 + V=0.2496644054553086D-2 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.9371809858553722D+0 + B=0.3344363145343455D+0 + V=0.2236607760437849D-2 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + N=N-1 + end subroutine LD0434 +!!*** + + SUBROUTINE LD0590(X,Y,Z,W,N) + + DOUBLE PRECISION X( 590) + DOUBLE PRECISION Y( 590) + DOUBLE PRECISION Z( 590) + DOUBLE PRECISION W( 590) + INTEGER N + DOUBLE PRECISION A,B,V +!CVW +!CVW LEBEDEV 590-POINT ANGULAR GRID +!CVW +!chvd +!chvd This subroutine is part of a set of subroutines that generate +!chvd Lebedev grids [1-6] for integration on a sphere. The original +!chvd C-code [1] was kindly provided by Dr. Dmitri N. Laikov and +!chvd translated into fortran by Dr. Christoph van Wuellen. +!chvd This subroutine was translated using a C to fortran77 conversion +!chvd tool written by Dr. Christoph van Wuellen. +!chvd +!chvd Users of this code are asked to include reference [1] in their +!chvd publications, and in the user- and programmers-manuals +!chvd describing their codes. +!chvd +!chvd This code was distributed through CCL (http://www.ccl.net/). +!chvd +!chvd [1] V.I. Lebedev, and D.N. Laikov +!chvd "A quadrature formula for the sphere of the 131st +!chvd algebraic order of accuracy" +!chvd Doklady Mathematics, Vol. 59, No. 3, 1999, pp. 477-481. [[cite:Lebedev1999]] +!chvd +!chvd [2] V.I. Lebedev +!chvd "A quadrature formula for the sphere of 59th algebraic +!chvd order of accuracy" +!chvd Russian Acad. Sci. Dokl. Math., Vol. 50, 1995, pp. 283-286. [[cite:Lebedev1995]] +!chvd +!chvd [3] V.I. Lebedev, and A.L. Skorokhodov +!chvd "Quadrature formulas of orders 41, 47, and 53 for the sphere" +!chvd Russian Acad. Sci. Dokl. Math., Vol. 45, 1992, pp. 587-592. [[cite:Lebedev1992]] +!chvd +!chvd [4] V.I. Lebedev +!chvd "Spherical quadrature formulas exact to orders 25-29" +!chvd Siberian Mathematical Journal, Vol. 18, 1977, pp. 99-107. [[cite:Lebedev1977]] +!chvd +!chvd [5] V.I. Lebedev +!chvd "Quadratures on a sphere" +!chvd Computational Mathematics and Mathematical Physics, Vol. 16, 1976, pp. 10-24. [[cite:Lebedev1976]] +!chvd +!chvd [6] V.I. Lebedev +!chvd "Values of the nodes and weights of ninth to seventeenth +!chvd order Gauss-Markov quadrature formulae invariant under the +!chvd octahedron group with inversion" +!chvd Computational Mathematics and Mathematical Physics, Vol. 15, 1975, pp. 44-51. [[cite:Lebedev1975]] +!chvd + N=1 + V=0.3095121295306187D-3 + Call GEN_OH( 1, N, X(N), Y(N), Z(N), W(N), A, B, V) + V=0.1852379698597489D-2 + Call GEN_OH( 3, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.7040954938227469D+0 + V=0.1871790639277744D-2 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6807744066455243D+0 + V=0.1858812585438317D-2 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6372546939258752D+0 + V=0.1852028828296213D-2 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5044419707800358D+0 + V=0.1846715956151242D-2 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4215761784010967D+0 + V=0.1818471778162769D-2 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3317920736472123D+0 + V=0.1749564657281154D-2 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2384736701421887D+0 + V=0.1617210647254411D-2 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1459036449157763D+0 + V=0.1384737234851692D-2 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6095034115507196D-1 + V=0.9764331165051050D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6116843442009876D+0 + V=0.1857161196774078D-2 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3964755348199858D+0 + V=0.1705153996395864D-2 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1724782009907724D+0 + V=0.1300321685886048D-2 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5610263808622060D+0 + B=0.3518280927733519D+0 + V=0.1842866472905286D-2 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4742392842551980D+0 + B=0.2634716655937950D+0 + V=0.1802658934377451D-2 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5984126497885380D+0 + B=0.1816640840360209D+0 + V=0.1849830560443660D-2 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3791035407695563D+0 + B=0.1720795225656878D+0 + V=0.1713904507106709D-2 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2778673190586244D+0 + B=0.8213021581932511D-1 + V=0.1555213603396808D-2 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5033564271075117D+0 + B=0.8999205842074875D-1 + V=0.1802239128008525D-2 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + N=N-1 + end subroutine LD0590 +!!*** + + SUBROUTINE LD0770(X,Y,Z,W,N) + + DOUBLE PRECISION X( 770) + DOUBLE PRECISION Y( 770) + DOUBLE PRECISION Z( 770) + DOUBLE PRECISION W( 770) + INTEGER N + DOUBLE PRECISION A,B,V +!CVW +!CVW LEBEDEV 770-POINT ANGULAR GRID +!CVW +!chvd +!chvd This subroutine is part of a set of subroutines that generate +!chvd Lebedev grids [1-6] for integration on a sphere. The original +!chvd C-code [1] was kindly provided by Dr. Dmitri N. Laikov and +!chvd translated into fortran by Dr. Christoph van Wuellen. +!chvd This subroutine was translated using a C to fortran77 conversion +!chvd tool written by Dr. Christoph van Wuellen. +!chvd +!chvd Users of this code are asked to include reference [1] in their +!chvd publications, and in the user- and programmers-manuals +!chvd describing their codes. +!chvd +!chvd This code was distributed through CCL (http://www.ccl.net/). +!chvd +!chvd [1] V.I. Lebedev, and D.N. Laikov +!chvd "A quadrature formula for the sphere of the 131st +!chvd algebraic order of accuracy" +!chvd Doklady Mathematics, Vol. 59, No. 3, 1999, pp. 477-481. [[cite:Lebedev1999]] +!chvd +!chvd [2] V.I. Lebedev +!chvd "A quadrature formula for the sphere of 59th algebraic +!chvd order of accuracy" +!chvd Russian Acad. Sci. Dokl. Math., Vol. 50, 1995, pp. 283-286. [[cite:Lebedev1995]] +!chvd +!chvd [3] V.I. Lebedev, and A.L. Skorokhodov +!chvd "Quadrature formulas of orders 41, 47, and 53 for the sphere" +!chvd Russian Acad. Sci. Dokl. Math., Vol. 45, 1992, pp. 587-592. [[cite:Lebedev1992]] +!chvd +!chvd [4] V.I. Lebedev +!chvd "Spherical quadrature formulas exact to orders 25-29" +!chvd Siberian Mathematical Journal, Vol. 18, 1977, pp. 99-107. [[cite:Lebedev1977]] +!chvd +!chvd [5] V.I. Lebedev +!chvd "Quadratures on a sphere" +!chvd Computational Mathematics and Mathematical Physics, Vol. 16, 1976, pp. 10-24. [[cite:Lebedev1976]] +!chvd +!chvd [6] V.I. Lebedev +!chvd "Values of the nodes and weights of ninth to seventeenth +!chvd order Gauss-Markov quadrature formulae invariant under the +!chvd octahedron group with inversion" +!chvd Computational Mathematics and Mathematical Physics, Vol. 15, 1975, pp. 44-51. [[cite:Lebedev1975]] +!chvd + N=1 + V=0.2192942088181184D-3 + Call GEN_OH( 1, N, X(N), Y(N), Z(N), W(N), A, B, V) + V=0.1436433617319080D-2 + Call GEN_OH( 2, N, X(N), Y(N), Z(N), W(N), A, B, V) + V=0.1421940344335877D-2 + Call GEN_OH( 3, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5087204410502360D-1 + V=0.6798123511050502D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1228198790178831D+0 + V=0.9913184235294912D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2026890814408786D+0 + V=0.1180207833238949D-2 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2847745156464294D+0 + V=0.1296599602080921D-2 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3656719078978026D+0 + V=0.1365871427428316D-2 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4428264886713469D+0 + V=0.1402988604775325D-2 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5140619627249735D+0 + V=0.1418645563595609D-2 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6306401219166803D+0 + V=0.1421376741851662D-2 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6716883332022612D+0 + V=0.1423996475490962D-2 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6979792685336881D+0 + V=0.1431554042178567D-2 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1446865674195309D+0 + V=0.9254401499865368D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3390263475411216D+0 + V=0.1250239995053509D-2 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5335804651263506D+0 + V=0.1394365843329230D-2 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6944024393349413D-1 + B=0.2355187894242326D+0 + V=0.1127089094671749D-2 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2269004109529460D+0 + B=0.4102182474045730D+0 + V=0.1345753760910670D-2 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.8025574607775339D-1 + B=0.6214302417481605D+0 + V=0.1424957283316783D-2 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1467999527896572D+0 + B=0.3245284345717394D+0 + V=0.1261523341237750D-2 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1571507769824727D+0 + B=0.5224482189696630D+0 + V=0.1392547106052696D-2 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2365702993157246D+0 + B=0.6017546634089558D+0 + V=0.1418761677877656D-2 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.7714815866765732D-1 + B=0.4346575516141163D+0 + V=0.1338366684479554D-2 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3062936666210730D+0 + B=0.4908826589037616D+0 + V=0.1393700862676131D-2 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3822477379524787D+0 + B=0.5648768149099500D+0 + V=0.1415914757466932D-2 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + N=N-1 + end subroutine LD0770 +!!*** + + SUBROUTINE LD0974(X,Y,Z,W,N) + + DOUBLE PRECISION X( 974) + DOUBLE PRECISION Y( 974) + DOUBLE PRECISION Z( 974) + DOUBLE PRECISION W( 974) + INTEGER N + DOUBLE PRECISION A,B,V +!CVW +!CVW LEBEDEV 974-POINT ANGULAR GRID +!CVW +!chvd +!chvd This subroutine is part of a set of subroutines that generate +!chvd Lebedev grids [1-6] for integration on a sphere. The original +!chvd C-code [1] was kindly provided by Dr. Dmitri N. Laikov and +!chvd translated into fortran by Dr. Christoph van Wuellen. +!chvd This subroutine was translated using a C to fortran77 conversion +!chvd tool written by Dr. Christoph van Wuellen. +!chvd +!chvd Users of this code are asked to include reference [1] in their +!chvd publications, and in the user- and programmers-manuals +!chvd describing their codes. +!chvd +!chvd This code was distributed through CCL (http://www.ccl.net/). +!chvd +!chvd [1] V.I. Lebedev, and D.N. Laikov +!chvd "A quadrature formula for the sphere of the 131st +!chvd algebraic order of accuracy" +!chvd Doklady Mathematics, Vol. 59, No. 3, 1999, pp. 477-481. [[cite:Lebedev1999]] +!chvd +!chvd [2] V.I. Lebedev +!chvd "A quadrature formula for the sphere of 59th algebraic +!chvd order of accuracy" +!chvd Russian Acad. Sci. Dokl. Math., Vol. 50, 1995, pp. 283-286. [[cite:Lebedev1995]] +!chvd +!chvd [3] V.I. Lebedev, and A.L. Skorokhodov +!chvd "Quadrature formulas of orders 41, 47, and 53 for the sphere" +!chvd Russian Acad. Sci. Dokl. Math., Vol. 45, 1992, pp. 587-592. [[cite:Lebedev1992]] +!chvd +!chvd [4] V.I. Lebedev +!chvd "Spherical quadrature formulas exact to orders 25-29" +!chvd Siberian Mathematical Journal, Vol. 18, 1977, pp. 99-107. [[cite:Lebedev1977]] +!chvd +!chvd [5] V.I. Lebedev +!chvd "Quadratures on a sphere" +!chvd Computational Mathematics and Mathematical Physics, Vol. 16, 1976, pp. 10-24. [[cite:Lebedev1976]] +!chvd +!chvd [6] V.I. Lebedev +!chvd "Values of the nodes and weights of ninth to seventeenth +!chvd order Gauss-Markov quadrature formulae invariant under the +!chvd octahedron group with inversion" +!chvd Computational Mathematics and Mathematical Physics, Vol. 15, 1975, pp. 44-51. [[cite:Lebedev1975]] +!chvd + N=1 + V=0.1438294190527431D-3 + Call GEN_OH( 1, N, X(N), Y(N), Z(N), W(N), A, B, V) + V=0.1125772288287004D-2 + Call GEN_OH( 3, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4292963545341347D-1 + V=0.4948029341949241D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1051426854086404D+0 + V=0.7357990109125470D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1750024867623087D+0 + V=0.8889132771304384D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2477653379650257D+0 + V=0.9888347838921435D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3206567123955957D+0 + V=0.1053299681709471D-2 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3916520749849983D+0 + V=0.1092778807014578D-2 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4590825874187624D+0 + V=0.1114389394063227D-2 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5214563888415861D+0 + V=0.1123724788051555D-2 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6253170244654199D+0 + V=0.1125239325243814D-2 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6637926744523170D+0 + V=0.1126153271815905D-2 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6910410398498301D+0 + V=0.1130286931123841D-2 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.7052907007457760D+0 + V=0.1134986534363955D-2 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1236686762657990D+0 + V=0.6823367927109931D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2940777114468387D+0 + V=0.9454158160447096D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4697753849207649D+0 + V=0.1074429975385679D-2 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6334563241139567D+0 + V=0.1129300086569132D-2 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5974048614181342D-1 + B=0.2029128752777523D+0 + V=0.8436884500901954D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1375760408473636D+0 + B=0.4602621942484054D+0 + V=0.1075255720448885D-2 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3391016526336286D+0 + B=0.5030673999662036D+0 + V=0.1108577236864462D-2 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1271675191439820D+0 + B=0.2817606422442134D+0 + V=0.9566475323783357D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2693120740413512D+0 + B=0.4331561291720157D+0 + V=0.1080663250717391D-2 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1419786452601918D+0 + B=0.6256167358580814D+0 + V=0.1126797131196295D-2 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6709284600738255D-1 + B=0.3798395216859157D+0 + V=0.1022568715358061D-2 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.7057738183256172D-1 + B=0.5517505421423520D+0 + V=0.1108960267713108D-2 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2783888477882155D+0 + B=0.6029619156159187D+0 + V=0.1122790653435766D-2 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1979578938917407D+0 + B=0.3589606329589096D+0 + V=0.1032401847117460D-2 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2087307061103274D+0 + B=0.5348666438135476D+0 + V=0.1107249382283854D-2 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4055122137872836D+0 + B=0.5674997546074373D+0 + V=0.1121780048519972D-2 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + N=N-1 + end subroutine LD0974 +!!*** + + SUBROUTINE LD1202(X,Y,Z,W,N) + + DOUBLE PRECISION X(1202) + DOUBLE PRECISION Y(1202) + DOUBLE PRECISION Z(1202) + DOUBLE PRECISION W(1202) + INTEGER N + DOUBLE PRECISION A,B,V +!CVW +!CVW LEBEDEV 1202-POINT ANGULAR GRID +!CVW +!chvd +!chvd This subroutine is part of a set of subroutines that generate +!chvd Lebedev grids [1-6] for integration on a sphere. The original +!chvd C-code [1] was kindly provided by Dr. Dmitri N. Laikov and +!chvd translated into fortran by Dr. Christoph van Wuellen. +!chvd This subroutine was translated using a C to fortran77 conversion +!chvd tool written by Dr. Christoph van Wuellen. +!chvd +!chvd Users of this code are asked to include reference [1] in their +!chvd publications, and in the user- and programmers-manuals +!chvd describing their codes. +!chvd +!chvd This code was distributed through CCL (http://www.ccl.net/). +!chvd +!chvd [1] V.I. Lebedev, and D.N. Laikov +!chvd "A quadrature formula for the sphere of the 131st +!chvd algebraic order of accuracy" +!chvd Doklady Mathematics, Vol. 59, No. 3, 1999, pp. 477-481. [[cite:Lebedev1999]] +!chvd +!chvd [2] V.I. Lebedev +!chvd "A quadrature formula for the sphere of 59th algebraic +!chvd order of accuracy" +!chvd Russian Acad. Sci. Dokl. Math., Vol. 50, 1995, pp. 283-286. [[cite:Lebedev1995]] +!chvd +!chvd [3] V.I. Lebedev, and A.L. Skorokhodov +!chvd "Quadrature formulas of orders 41, 47, and 53 for the sphere" +!chvd Russian Acad. Sci. Dokl. Math., Vol. 45, 1992, pp. 587-592. [[cite:Lebedev1992]] +!chvd +!chvd [4] V.I. Lebedev +!chvd "Spherical quadrature formulas exact to orders 25-29" +!chvd Siberian Mathematical Journal, Vol. 18, 1977, pp. 99-107. [[cite:Lebedev1977]] +!chvd +!chvd [5] V.I. Lebedev +!chvd "Quadratures on a sphere" +!chvd Computational Mathematics and Mathematical Physics, Vol. 16, 1976, pp. 10-24. [[cite:Lebedev1976]] +!chvd +!chvd [6] V.I. Lebedev +!chvd "Values of the nodes and weights of ninth to seventeenth +!chvd order Gauss-Markov quadrature formulae invariant under the +!chvd octahedron group with inversion" +!chvd Computational Mathematics and Mathematical Physics, Vol. 15, 1975, pp. 44-51. [[cite:Lebedev1975]] +!chvd + N=1 + V=0.1105189233267572D-3 + Call GEN_OH( 1, N, X(N), Y(N), Z(N), W(N), A, B, V) + V=0.9205232738090741D-3 + Call GEN_OH( 2, N, X(N), Y(N), Z(N), W(N), A, B, V) + V=0.9133159786443561D-3 + Call GEN_OH( 3, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3712636449657089D-1 + V=0.3690421898017899D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.9140060412262223D-1 + V=0.5603990928680660D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1531077852469906D+0 + V=0.6865297629282609D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2180928891660612D+0 + V=0.7720338551145630D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2839874532200175D+0 + V=0.8301545958894795D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3491177600963764D+0 + V=0.8686692550179628D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4121431461444309D+0 + V=0.8927076285846890D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4718993627149127D+0 + V=0.9060820238568219D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5273145452842337D+0 + V=0.9119777254940867D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6209475332444019D+0 + V=0.9128720138604181D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6569722711857291D+0 + V=0.9130714935691735D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6841788309070143D+0 + V=0.9152873784554116D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.7012604330123631D+0 + V=0.9187436274321654D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1072382215478166D+0 + V=0.5176977312965694D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2582068959496968D+0 + V=0.7331143682101417D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4172752955306717D+0 + V=0.8463232836379928D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5700366911792503D+0 + V=0.9031122694253992D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.9827986018263947D+0 + B=0.1771774022615325D+0 + V=0.6485778453163257D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.9624249230326228D+0 + B=0.2475716463426288D+0 + V=0.7435030910982369D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.9402007994128811D+0 + B=0.3354616289066489D+0 + V=0.7998527891839054D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.9320822040143202D+0 + B=0.3173615246611977D+0 + V=0.8101731497468018D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.9043674199393299D+0 + B=0.4090268427085357D+0 + V=0.8483389574594331D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.8912407560074747D+0 + B=0.3854291150669224D+0 + V=0.8556299257311812D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.8676435628462708D+0 + B=0.4932221184851285D+0 + V=0.8803208679738260D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.8581979986041619D+0 + B=0.4785320675922435D+0 + V=0.8811048182425720D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.8396753624049856D+0 + B=0.4507422593157064D+0 + V=0.8850282341265444D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.8165288564022188D+0 + B=0.5632123020762100D+0 + V=0.9021342299040653D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.8015469370783529D+0 + B=0.5434303569693900D+0 + V=0.9010091677105086D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.7773563069070351D+0 + B=0.5123518486419871D+0 + V=0.9022692938426915D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.7661621213900394D+0 + B=0.6394279634749102D+0 + V=0.9158016174693465D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.7553584143533510D+0 + B=0.6269805509024392D+0 + V=0.9131578003189435D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.7344305757559503D+0 + B=0.6031161693096310D+0 + V=0.9107813579482705D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.7043837184021765D+0 + B=0.5693702498468441D+0 + V=0.9105760258970126D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + N=N-1 + end subroutine LD1202 +!!*** + + SUBROUTINE LD1454(X,Y,Z,W,N) + + DOUBLE PRECISION X(1454) + DOUBLE PRECISION Y(1454) + DOUBLE PRECISION Z(1454) + DOUBLE PRECISION W(1454) + INTEGER N + DOUBLE PRECISION A,B,V +!CVW +!CVW LEBEDEV 1454-POINT ANGULAR GRID +!CVW +!chvd +!chvd This subroutine is part of a set of subroutines that generate +!chvd Lebedev grids [1-6] for integration on a sphere. The original +!chvd C-code [1] was kindly provided by Dr. Dmitri N. Laikov and +!chvd translated into fortran by Dr. Christoph van Wuellen. +!chvd This subroutine was translated using a C to fortran77 conversion +!chvd tool written by Dr. Christoph van Wuellen. +!chvd +!chvd Users of this code are asked to include reference [1] in their +!chvd publications, and in the user- and programmers-manuals +!chvd describing their codes. +!chvd +!chvd This code was distributed through CCL (http://www.ccl.net/). +!chvd +!chvd [1] V.I. Lebedev, and D.N. Laikov +!chvd "A quadrature formula for the sphere of the 131st +!chvd algebraic order of accuracy" +!chvd Doklady Mathematics, Vol. 59, No. 3, 1999, pp. 477-481. [[cite:Lebedev1999]] +!chvd +!chvd [2] V.I. Lebedev +!chvd "A quadrature formula for the sphere of 59th algebraic +!chvd order of accuracy" +!chvd Russian Acad. Sci. Dokl. Math., Vol. 50, 1995, pp. 283-286. [[cite:Lebedev1995]] +!chvd +!chvd [3] V.I. Lebedev, and A.L. Skorokhodov +!chvd "Quadrature formulas of orders 41, 47, and 53 for the sphere" +!chvd Russian Acad. Sci. Dokl. Math., Vol. 45, 1992, pp. 587-592. [[cite:Lebedev1992]] +!chvd +!chvd [4] V.I. Lebedev +!chvd "Spherical quadrature formulas exact to orders 25-29" +!chvd Siberian Mathematical Journal, Vol. 18, 1977, pp. 99-107. [[cite:Lebedev1977]] +!chvd +!chvd [5] V.I. Lebedev +!chvd "Quadratures on a sphere" +!chvd Computational Mathematics and Mathematical Physics, Vol. 16, 1976, pp. 10-24. [[cite:Lebedev1976]] +!chvd +!chvd [6] V.I. Lebedev +!chvd "Values of the nodes and weights of ninth to seventeenth +!chvd order Gauss-Markov quadrature formulae invariant under the +!chvd octahedron group with inversion" +!chvd Computational Mathematics and Mathematical Physics, Vol. 15, 1975, pp. 44-51. [[cite:Lebedev1975]] +!chvd + N=1 + V=0.7777160743261247D-4 + Call GEN_OH( 1, N, X(N), Y(N), Z(N), W(N), A, B, V) + V=0.7557646413004701D-3 + Call GEN_OH( 3, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3229290663413854D-1 + V=0.2841633806090617D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.8036733271462222D-1 + V=0.4374419127053555D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1354289960531653D+0 + V=0.5417174740872172D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1938963861114426D+0 + V=0.6148000891358593D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2537343715011275D+0 + V=0.6664394485800705D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3135251434752570D+0 + V=0.7025039356923220D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3721558339375338D+0 + V=0.7268511789249627D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4286809575195696D+0 + V=0.7422637534208629D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4822510128282994D+0 + V=0.7509545035841214D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5320679333566263D+0 + V=0.7548535057718401D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6172998195394274D+0 + V=0.7554088969774001D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6510679849127481D+0 + V=0.7553147174442808D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6777315251687360D+0 + V=0.7564767653292297D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6963109410648741D+0 + V=0.7587991808518730D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.7058935009831749D+0 + V=0.7608261832033027D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.9955546194091857D+0 + V=0.4021680447874916D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.9734115901794209D+0 + V=0.5804871793945964D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.9275693732388626D+0 + V=0.6792151955945159D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.8568022422795103D+0 + V=0.7336741211286294D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.7623495553719372D+0 + V=0.7581866300989608D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5707522908892223D+0 + B=0.4387028039889501D+0 + V=0.7538257859800743D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5196463388403083D+0 + B=0.3858908414762617D+0 + V=0.7483517247053123D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4646337531215351D+0 + B=0.3301937372343854D+0 + V=0.7371763661112059D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4063901697557691D+0 + B=0.2725423573563777D+0 + V=0.7183448895756934D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3456329466643087D+0 + B=0.2139510237495250D+0 + V=0.6895815529822191D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2831395121050332D+0 + B=0.1555922309786647D+0 + V=0.6480105801792886D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2197682022925330D+0 + B=0.9892878979686097D-1 + V=0.5897558896594636D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1564696098650355D+0 + B=0.4598642910675510D-1 + V=0.5095708849247346D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6027356673721295D+0 + B=0.3376625140173426D+0 + V=0.7536906428909755D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5496032320255096D+0 + B=0.2822301309727988D+0 + V=0.7472505965575118D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4921707755234567D+0 + B=0.2248632342592540D+0 + V=0.7343017132279698D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4309422998598483D+0 + B=0.1666224723456479D+0 + V=0.7130871582177445D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3664108182313672D+0 + B=0.1086964901822169D+0 + V=0.6817022032112776D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2990189057758436D+0 + B=0.5251989784120085D-1 + V=0.6380941145604121D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6268724013144998D+0 + B=0.2297523657550023D+0 + V=0.7550381377920310D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5707324144834607D+0 + B=0.1723080607093800D+0 + V=0.7478646640144802D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5096360901960365D+0 + B=0.1140238465390513D+0 + V=0.7335918720601220D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4438729938312456D+0 + B=0.5611522095882537D-1 + V=0.7110120527658118D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6419978471082389D+0 + B=0.1164174423140873D+0 + V=0.7571363978689501D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5817218061802611D+0 + B=0.5797589531445219D-1 + V=0.7489908329079234D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + N=N-1 + end subroutine LD1454 +!!*** + + SUBROUTINE LD1730(X,Y,Z,W,N) + + DOUBLE PRECISION X(1730) + DOUBLE PRECISION Y(1730) + DOUBLE PRECISION Z(1730) + DOUBLE PRECISION W(1730) + INTEGER N + DOUBLE PRECISION A,B,V +!CVW +!CVW LEBEDEV 1730-POINT ANGULAR GRID +!CVW +!chvd +!chvd This subroutine is part of a set of subroutines that generate +!chvd Lebedev grids [1-6] for integration on a sphere. The original +!chvd C-code [1] was kindly provided by Dr. Dmitri N. Laikov and +!chvd translated into fortran by Dr. Christoph van Wuellen. +!chvd This subroutine was translated using a C to fortran77 conversion +!chvd tool written by Dr. Christoph van Wuellen. +!chvd +!chvd Users of this code are asked to include reference [1] in their +!chvd publications, and in the user- and programmers-manuals +!chvd describing their codes. +!chvd +!chvd This code was distributed through CCL (http://www.ccl.net/). +!chvd +!chvd [1] V.I. Lebedev, and D.N. Laikov +!chvd "A quadrature formula for the sphere of the 131st +!chvd algebraic order of accuracy" +!chvd Doklady Mathematics, Vol. 59, No. 3, 1999, pp. 477-481. [[cite:Lebedev1999]] +!chvd +!chvd [2] V.I. Lebedev +!chvd "A quadrature formula for the sphere of 59th algebraic +!chvd order of accuracy" +!chvd Russian Acad. Sci. Dokl. Math., Vol. 50, 1995, pp. 283-286. [[cite:Lebedev1995]] +!chvd +!chvd [3] V.I. Lebedev, and A.L. Skorokhodov +!chvd "Quadrature formulas of orders 41, 47, and 53 for the sphere" +!chvd Russian Acad. Sci. Dokl. Math., Vol. 45, 1992, pp. 587-592. [[cite:Lebedev1992]] +!chvd +!chvd [4] V.I. Lebedev +!chvd "Spherical quadrature formulas exact to orders 25-29" +!chvd Siberian Mathematical Journal, Vol. 18, 1977, pp. 99-107. [[cite:Lebedev1977]] +!chvd +!chvd [5] V.I. Lebedev +!chvd "Quadratures on a sphere" +!chvd Computational Mathematics and Mathematical Physics, Vol. 16, 1976, pp. 10-24. [[cite:Lebedev1976]] +!chvd +!chvd [6] V.I. Lebedev +!chvd "Values of the nodes and weights of ninth to seventeenth +!chvd order Gauss-Markov quadrature formulae invariant under the +!chvd octahedron group with inversion" +!chvd Computational Mathematics and Mathematical Physics, Vol. 15, 1975, pp. 44-51. [[cite:Lebedev1975]] +!chvd + N=1 + V=0.6309049437420976D-4 + Call GEN_OH( 1, N, X(N), Y(N), Z(N), W(N), A, B, V) + V=0.6398287705571748D-3 + Call GEN_OH( 2, N, X(N), Y(N), Z(N), W(N), A, B, V) + V=0.6357185073530720D-3 + Call GEN_OH( 3, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2860923126194662D-1 + V=0.2221207162188168D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.7142556767711522D-1 + V=0.3475784022286848D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1209199540995559D+0 + V=0.4350742443589804D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1738673106594379D+0 + V=0.4978569136522127D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2284645438467734D+0 + V=0.5435036221998053D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2834807671701512D+0 + V=0.5765913388219542D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3379680145467339D+0 + V=0.6001200359226003D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3911355454819537D+0 + V=0.6162178172717512D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4422860353001403D+0 + V=0.6265218152438485D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4907781568726057D+0 + V=0.6323987160974212D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5360006153211468D+0 + V=0.6350767851540569D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6142105973596603D+0 + V=0.6354362775297107D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6459300387977504D+0 + V=0.6352302462706235D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6718056125089225D+0 + V=0.6358117881417972D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6910888533186254D+0 + V=0.6373101590310117D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.7030467416823252D+0 + V=0.6390428961368665D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.8354951166354646D-1 + V=0.3186913449946576D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2050143009099486D+0 + V=0.4678028558591711D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3370208290706637D+0 + V=0.5538829697598626D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4689051484233963D+0 + V=0.6044475907190476D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5939400424557334D+0 + V=0.6313575103509012D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1394983311832261D+0 + B=0.4097581162050343D-1 + V=0.4078626431855630D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1967999180485014D+0 + B=0.8851987391293348D-1 + V=0.4759933057812725D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2546183732548967D+0 + B=0.1397680182969819D+0 + V=0.5268151186413440D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3121281074713875D+0 + B=0.1929452542226526D+0 + V=0.5643048560507316D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3685981078502492D+0 + B=0.2467898337061562D+0 + V=0.5914501076613073D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4233760321547856D+0 + B=0.3003104124785409D+0 + V=0.6104561257874195D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4758671236059246D+0 + B=0.3526684328175033D+0 + V=0.6230252860707806D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5255178579796463D+0 + B=0.4031134861145713D+0 + V=0.6305618761760796D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5718025633734589D+0 + B=0.4509426448342351D+0 + V=0.6343092767597889D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2686927772723415D+0 + B=0.4711322502423248D-1 + V=0.5176268945737826D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3306006819904809D+0 + B=0.9784487303942695D-1 + V=0.5564840313313692D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3904906850594983D+0 + B=0.1505395810025273D+0 + V=0.5856426671038980D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4479957951904390D+0 + B=0.2039728156296050D+0 + V=0.6066386925777091D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5027076848919780D+0 + B=0.2571529941121107D+0 + V=0.6208824962234458D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5542087392260217D+0 + B=0.3092191375815670D+0 + V=0.6296314297822907D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6020850887375187D+0 + B=0.3593807506130276D+0 + V=0.6340423756791859D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4019851409179594D+0 + B=0.5063389934378671D-1 + V=0.5829627677107342D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4635614567449800D+0 + B=0.1032422269160612D+0 + V=0.6048693376081110D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5215860931591575D+0 + B=0.1566322094006254D+0 + V=0.6202362317732461D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5758202499099271D+0 + B=0.2098082827491099D+0 + V=0.6299005328403779D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6259893683876795D+0 + B=0.2618824114553391D+0 + V=0.6347722390609353D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5313795124811891D+0 + B=0.5263245019338556D-1 + V=0.6203778981238834D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5893317955931995D+0 + B=0.1061059730982005D+0 + V=0.6308414671239979D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6426246321215801D+0 + B=0.1594171564034221D+0 + V=0.6362706466959498D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6511904367376113D+0 + B=0.5354789536565540D-1 + V=0.6375414170333233D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + N=N-1 + end subroutine LD1730 +!!*** + + SUBROUTINE LD2030(X,Y,Z,W,N) + + DOUBLE PRECISION X(2030) + DOUBLE PRECISION Y(2030) + DOUBLE PRECISION Z(2030) + DOUBLE PRECISION W(2030) + INTEGER N + DOUBLE PRECISION A,B,V +!CVW +!CVW LEBEDEV 2030-POINT ANGULAR GRID +!CVW +!chvd +!chvd This subroutine is part of a set of subroutines that generate +!chvd Lebedev grids [1-6] for integration on a sphere. The original +!chvd C-code [1] was kindly provided by Dr. Dmitri N. Laikov and +!chvd translated into fortran by Dr. Christoph van Wuellen. +!chvd This subroutine was translated using a C to fortran77 conversion +!chvd tool written by Dr. Christoph van Wuellen. +!chvd +!chvd Users of this code are asked to include reference [1] in their +!chvd publications, and in the user- and programmers-manuals +!chvd describing their codes. +!chvd +!chvd This code was distributed through CCL (http://www.ccl.net/). +!chvd +!chvd [1] V.I. Lebedev, and D.N. Laikov +!chvd "A quadrature formula for the sphere of the 131st +!chvd algebraic order of accuracy" +!chvd Doklady Mathematics, Vol. 59, No. 3, 1999, pp. 477-481. [[cite:Lebedev1999]] +!chvd +!chvd [2] V.I. Lebedev +!chvd "A quadrature formula for the sphere of 59th algebraic +!chvd order of accuracy" +!chvd Russian Acad. Sci. Dokl. Math., Vol. 50, 1995, pp. 283-286. [[cite:Lebedev1995]] +!chvd +!chvd [3] V.I. Lebedev, and A.L. Skorokhodov +!chvd "Quadrature formulas of orders 41, 47, and 53 for the sphere" +!chvd Russian Acad. Sci. Dokl. Math., Vol. 45, 1992, pp. 587-592. [[cite:Lebedev1992]] +!chvd +!chvd [4] V.I. Lebedev +!chvd "Spherical quadrature formulas exact to orders 25-29" +!chvd Siberian Mathematical Journal, Vol. 18, 1977, pp. 99-107. [[cite:Lebedev1977]] +!chvd +!chvd [5] V.I. Lebedev +!chvd "Quadratures on a sphere" +!chvd Computational Mathematics and Mathematical Physics, Vol. 16, 1976, pp. 10-24. [[cite:Lebedev1976]] +!chvd +!chvd [6] V.I. Lebedev +!chvd "Values of the nodes and weights of ninth to seventeenth +!chvd order Gauss-Markov quadrature formulae invariant under the +!chvd octahedron group with inversion" +!chvd Computational Mathematics and Mathematical Physics, Vol. 15, 1975, pp. 44-51. [[cite:Lebedev1975]] +!chvd + N=1 + V=0.4656031899197431D-4 + Call GEN_OH( 1, N, X(N), Y(N), Z(N), W(N), A, B, V) + V=0.5421549195295507D-3 + Call GEN_OH( 3, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2540835336814348D-1 + V=0.1778522133346553D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6399322800504915D-1 + V=0.2811325405682796D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1088269469804125D+0 + V=0.3548896312631459D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1570670798818287D+0 + V=0.4090310897173364D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2071163932282514D+0 + V=0.4493286134169965D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2578914044450844D+0 + V=0.4793728447962723D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3085687558169623D+0 + V=0.5015415319164265D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3584719706267024D+0 + V=0.5175127372677937D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4070135594428709D+0 + V=0.5285522262081019D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4536618626222638D+0 + V=0.5356832703713962D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4979195686463577D+0 + V=0.5397914736175170D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5393075111126999D+0 + V=0.5416899441599930D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6115617676843916D+0 + V=0.5419308476889938D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6414308435160159D+0 + V=0.5416936902030596D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6664099412721607D+0 + V=0.5419544338703164D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6859161771214913D+0 + V=0.5428983656630975D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6993625593503890D+0 + V=0.5442286500098193D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.7062393387719380D+0 + V=0.5452250345057301D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.7479028168349763D-1 + V=0.2568002497728530D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1848951153969366D+0 + V=0.3827211700292145D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3059529066581305D+0 + V=0.4579491561917824D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4285556101021362D+0 + V=0.5042003969083574D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5468758653496526D+0 + V=0.5312708889976025D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6565821978343439D+0 + V=0.5438401790747117D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1253901572367117D+0 + B=0.3681917226439641D-1 + V=0.3316041873197344D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1775721510383941D+0 + B=0.7982487607213301D-1 + V=0.3899113567153771D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2305693358216114D+0 + B=0.1264640966592335D+0 + V=0.4343343327201309D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2836502845992063D+0 + B=0.1751585683418957D+0 + V=0.4679415262318919D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3361794746232590D+0 + B=0.2247995907632670D+0 + V=0.4930847981631031D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3875979172264824D+0 + B=0.2745299257422246D+0 + V=0.5115031867540091D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4374019316999074D+0 + B=0.3236373482441118D+0 + V=0.5245217148457367D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4851275843340022D+0 + B=0.3714967859436741D+0 + V=0.5332041499895321D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5303391803806868D+0 + B=0.4175353646321745D+0 + V=0.5384583126021542D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5726197380596287D+0 + B=0.4612084406355461D+0 + V=0.5411067210798852D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2431520732564863D+0 + B=0.4258040133043952D-1 + V=0.4259797391468714D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3002096800895869D+0 + B=0.8869424306722721D-1 + V=0.4604931368460021D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3558554457457432D+0 + B=0.1368811706510655D+0 + V=0.4871814878255202D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4097782537048887D+0 + B=0.1860739985015033D+0 + V=0.5072242910074885D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4616337666067458D+0 + B=0.2354235077395853D+0 + V=0.5217069845235350D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5110707008417874D+0 + B=0.2842074921347011D+0 + V=0.5315785966280310D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5577415286163795D+0 + B=0.3317784414984102D+0 + V=0.5376833708758905D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6013060431366950D+0 + B=0.3775299002040700D+0 + V=0.5408032092069521D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3661596767261781D+0 + B=0.4599367887164592D-1 + V=0.4842744917904866D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4237633153506581D+0 + B=0.9404893773654421D-1 + V=0.5048926076188130D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4786328454658452D+0 + B=0.1431377109091971D+0 + V=0.5202607980478373D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5305702076789774D+0 + B=0.1924186388843570D+0 + V=0.5309932388325743D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5793436224231788D+0 + B=0.2411590944775190D+0 + V=0.5377419770895208D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6247069017094747D+0 + B=0.2886871491583605D+0 + V=0.5411696331677717D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4874315552535204D+0 + B=0.4804978774953206D-1 + V=0.5197996293282420D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5427337322059053D+0 + B=0.9716857199366665D-1 + V=0.5311120836622945D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5943493747246700D+0 + B=0.1465205839795055D+0 + V=0.5384309319956951D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6421314033564943D+0 + B=0.1953579449803574D+0 + V=0.5421859504051886D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6020628374713980D+0 + B=0.4916375015738108D-1 + V=0.5390948355046314D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6529222529856881D+0 + B=0.9861621540127005D-1 + V=0.5433312705027845D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + N=N-1 + end subroutine LD2030 +!!*** + + SUBROUTINE LD2354(X,Y,Z,W,N) + + DOUBLE PRECISION X(2354) + DOUBLE PRECISION Y(2354) + DOUBLE PRECISION Z(2354) + DOUBLE PRECISION W(2354) + INTEGER N + DOUBLE PRECISION A,B,V +!CVW +!CVW LEBEDEV 2354-POINT ANGULAR GRID +!CVW +!chvd +!chvd This subroutine is part of a set of subroutines that generate +!chvd Lebedev grids [1-6] for integration on a sphere. The original +!chvd C-code [1] was kindly provided by Dr. Dmitri N. Laikov and +!chvd translated into fortran by Dr. Christoph van Wuellen. +!chvd This subroutine was translated using a C to fortran77 conversion +!chvd tool written by Dr. Christoph van Wuellen. +!chvd +!chvd Users of this code are asked to include reference [1] in their +!chvd publications, and in the user- and programmers-manuals +!chvd describing their codes. +!chvd +!chvd This code was distributed through CCL (http://www.ccl.net/). +!chvd +!chvd [1] V.I. Lebedev, and D.N. Laikov +!chvd "A quadrature formula for the sphere of the 131st +!chvd algebraic order of accuracy" +!chvd Doklady Mathematics, Vol. 59, No. 3, 1999, pp. 477-481. [[cite:Lebedev1999]] +!chvd +!chvd [2] V.I. Lebedev +!chvd "A quadrature formula for the sphere of 59th algebraic +!chvd order of accuracy" +!chvd Russian Acad. Sci. Dokl. Math., Vol. 50, 1995, pp. 283-286. [[cite:Lebedev1995]] +!chvd +!chvd [3] V.I. Lebedev, and A.L. Skorokhodov +!chvd "Quadrature formulas of orders 41, 47, and 53 for the sphere" +!chvd Russian Acad. Sci. Dokl. Math., Vol. 45, 1992, pp. 587-592. [[cite:Lebedev1992]] +!chvd +!chvd [4] V.I. Lebedev +!chvd "Spherical quadrature formulas exact to orders 25-29" +!chvd Siberian Mathematical Journal, Vol. 18, 1977, pp. 99-107. [[cite:Lebedev1977]] +!chvd +!chvd [5] V.I. Lebedev +!chvd "Quadratures on a sphere" +!chvd Computational Mathematics and Mathematical Physics, Vol. 16, 1976, pp. 10-24. [[cite:Lebedev1976]] +!chvd +!chvd [6] V.I. Lebedev +!chvd "Values of the nodes and weights of ninth to seventeenth +!chvd order Gauss-Markov quadrature formulae invariant under the +!chvd octahedron group with inversion" +!chvd Computational Mathematics and Mathematical Physics, Vol. 15, 1975, pp. 44-51. [[cite:Lebedev1975]] +!chvd + N=1 + V=0.3922616270665292D-4 + Call GEN_OH( 1, N, X(N), Y(N), Z(N), W(N), A, B, V) + V=0.4703831750854424D-3 + Call GEN_OH( 2, N, X(N), Y(N), Z(N), W(N), A, B, V) + V=0.4678202801282136D-3 + Call GEN_OH( 3, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2290024646530589D-1 + V=0.1437832228979900D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5779086652271284D-1 + V=0.2303572493577644D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.9863103576375984D-1 + V=0.2933110752447454D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1428155792982185D+0 + V=0.3402905998359838D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1888978116601463D+0 + V=0.3759138466870372D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2359091682970210D+0 + V=0.4030638447899798D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2831228833706171D+0 + V=0.4236591432242211D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3299495857966693D+0 + V=0.4390522656946746D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3758840802660796D+0 + V=0.4502523466626247D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4204751831009480D+0 + V=0.4580577727783541D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4633068518751051D+0 + V=0.4631391616615899D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5039849474507313D+0 + V=0.4660928953698676D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5421265793440747D+0 + V=0.4674751807936953D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6092660230557310D+0 + V=0.4676414903932920D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6374654204984869D+0 + V=0.4674086492347870D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6615136472609892D+0 + V=0.4674928539483207D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6809487285958127D+0 + V=0.4680748979686447D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6952980021665196D+0 + V=0.4690449806389040D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.7041245497695400D+0 + V=0.4699877075860818D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6744033088306065D-1 + V=0.2099942281069176D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1678684485334166D+0 + V=0.3172269150712804D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2793559049539613D+0 + V=0.3832051358546523D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3935264218057639D+0 + V=0.4252193818146985D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5052629268232558D+0 + V=0.4513807963755000D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6107905315437531D+0 + V=0.4657797469114178D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1135081039843524D+0 + B=0.3331954884662588D-1 + V=0.2733362800522836D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1612866626099378D+0 + B=0.7247167465436538D-1 + V=0.3235485368463559D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2100786550168205D+0 + B=0.1151539110849745D+0 + V=0.3624908726013453D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2592282009459942D+0 + B=0.1599491097143677D+0 + V=0.3925540070712828D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3081740561320203D+0 + B=0.2058699956028027D+0 + V=0.4156129781116235D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3564289781578164D+0 + B=0.2521624953502911D+0 + V=0.4330644984623263D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4035587288240703D+0 + B=0.2982090785797674D+0 + V=0.4459677725921312D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4491671196373903D+0 + B=0.3434762087235733D+0 + V=0.4551593004456795D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4928854782917489D+0 + B=0.3874831357203437D+0 + V=0.4613341462749918D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5343646791958988D+0 + B=0.4297814821746926D+0 + V=0.4651019618269806D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5732683216530990D+0 + B=0.4699402260943537D+0 + V=0.4670249536100625D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2214131583218986D+0 + B=0.3873602040643895D-1 + V=0.3549555576441708D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2741796504750071D+0 + B=0.8089496256902013D-1 + V=0.3856108245249010D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3259797439149485D+0 + B=0.1251732177620872D+0 + V=0.4098622845756882D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3765441148826891D+0 + B=0.1706260286403185D+0 + V=0.4286328604268950D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4255773574530558D+0 + B=0.2165115147300408D+0 + V=0.4427802198993945D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4727795117058430D+0 + B=0.2622089812225259D+0 + V=0.4530473511488561D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5178546895819012D+0 + B=0.3071721431296201D+0 + V=0.4600805475703138D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5605141192097460D+0 + B=0.3508998998801138D+0 + V=0.4644599059958017D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6004763319352512D+0 + B=0.3929160876166931D+0 + V=0.4667274455712508D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3352842634946949D+0 + B=0.4202563457288019D-1 + V=0.4069360518020356D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3891971629814670D+0 + B=0.8614309758870850D-1 + V=0.4260442819919195D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4409875565542281D+0 + B=0.1314500879380001D+0 + V=0.4408678508029063D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4904893058592484D+0 + B=0.1772189657383859D+0 + V=0.4518748115548597D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5375056138769549D+0 + B=0.2228277110050294D+0 + V=0.4595564875375116D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5818255708669969D+0 + B=0.2677179935014386D+0 + V=0.4643988774315846D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6232334858144959D+0 + B=0.3113675035544165D+0 + V=0.4668827491646946D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4489485354492058D+0 + B=0.4409162378368174D-1 + V=0.4400541823741973D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5015136875933150D+0 + B=0.8939009917748489D-1 + V=0.4514512890193797D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5511300550512623D+0 + B=0.1351806029383365D+0 + V=0.4596198627347549D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5976720409858000D+0 + B=0.1808370355053196D+0 + V=0.4648659016801781D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6409956378989354D+0 + B=0.2257852192301602D+0 + V=0.4675502017157673D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5581222330827514D+0 + B=0.4532173421637160D-1 + V=0.4598494476455523D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6074705984161695D+0 + B=0.9117488031840314D-1 + V=0.4654916955152048D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6532272537379033D+0 + B=0.1369294213140155D+0 + V=0.4684709779505137D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6594761494500487D+0 + B=0.4589901487275583D-1 + V=0.4691445539106986D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + N=N-1 + end subroutine LD2354 +!!*** + + SUBROUTINE LD2702(X,Y,Z,W,N) + + DOUBLE PRECISION X(2702) + DOUBLE PRECISION Y(2702) + DOUBLE PRECISION Z(2702) + DOUBLE PRECISION W(2702) + INTEGER N + DOUBLE PRECISION A,B,V +!CVW +!CVW LEBEDEV 2702-POINT ANGULAR GRID +!CVW +!chvd +!chvd This subroutine is part of a set of subroutines that generate +!chvd Lebedev grids [1-6] for integration on a sphere. The original +!chvd C-code [1] was kindly provided by Dr. Dmitri N. Laikov and +!chvd translated into fortran by Dr. Christoph van Wuellen. +!chvd This subroutine was translated using a C to fortran77 conversion +!chvd tool written by Dr. Christoph van Wuellen. +!chvd +!chvd Users of this code are asked to include reference [1] in their +!chvd publications, and in the user- and programmers-manuals +!chvd describing their codes. +!chvd +!chvd This code was distributed through CCL (http://www.ccl.net/). +!chvd +!chvd [1] V.I. Lebedev, and D.N. Laikov +!chvd "A quadrature formula for the sphere of the 131st +!chvd algebraic order of accuracy" +!chvd Doklady Mathematics, Vol. 59, No. 3, 1999, pp. 477-481. [[cite:Lebedev1999]] +!chvd +!chvd [2] V.I. Lebedev +!chvd "A quadrature formula for the sphere of 59th algebraic +!chvd order of accuracy" +!chvd Russian Acad. Sci. Dokl. Math., Vol. 50, 1995, pp. 283-286. [[cite:Lebedev1995]] +!chvd +!chvd [3] V.I. Lebedev, and A.L. Skorokhodov +!chvd "Quadrature formulas of orders 41, 47, and 53 for the sphere" +!chvd Russian Acad. Sci. Dokl. Math., Vol. 45, 1992, pp. 587-592. [[cite:Lebedev1992]] +!chvd +!chvd [4] V.I. Lebedev +!chvd "Spherical quadrature formulas exact to orders 25-29" +!chvd Siberian Mathematical Journal, Vol. 18, 1977, pp. 99-107. [[cite:Lebedev1977]] +!chvd +!chvd [5] V.I. Lebedev +!chvd "Quadratures on a sphere" +!chvd Computational Mathematics and Mathematical Physics, Vol. 16, 1976, pp. 10-24. [[cite:Lebedev1976]] +!chvd +!chvd [6] V.I. Lebedev +!chvd "Values of the nodes and weights of ninth to seventeenth +!chvd order Gauss-Markov quadrature formulae invariant under the +!chvd octahedron group with inversion" +!chvd Computational Mathematics and Mathematical Physics, Vol. 15, 1975, pp. 44-51. [[cite:Lebedev1975]] +!chvd + N=1 + V=0.2998675149888161D-4 + Call GEN_OH( 1, N, X(N), Y(N), Z(N), W(N), A, B, V) + V=0.4077860529495355D-3 + Call GEN_OH( 3, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2065562538818703D-1 + V=0.1185349192520667D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5250918173022379D-1 + V=0.1913408643425751D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.8993480082038376D-1 + V=0.2452886577209897D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1306023924436019D+0 + V=0.2862408183288702D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1732060388531418D+0 + V=0.3178032258257357D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2168727084820249D+0 + V=0.3422945667633690D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2609528309173586D+0 + V=0.3612790520235922D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3049252927938952D+0 + V=0.3758638229818521D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3483484138084404D+0 + V=0.3868711798859953D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3908321549106406D+0 + V=0.3949429933189938D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4320210071894814D+0 + V=0.4006068107541156D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4715824795890053D+0 + V=0.4043192149672723D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5091984794078453D+0 + V=0.4064947495808078D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5445580145650803D+0 + V=0.4075245619813152D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6072575796841768D+0 + V=0.4076423540893566D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6339484505755803D+0 + V=0.4074280862251555D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6570718257486958D+0 + V=0.4074163756012244D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6762557330090709D+0 + V=0.4077647795071246D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6911161696923790D+0 + V=0.4084517552782530D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.7012841911659961D+0 + V=0.4092468459224052D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.7064559272410020D+0 + V=0.4097872687240906D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6123554989894765D-1 + V=0.1738986811745028D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1533070348312393D+0 + V=0.2659616045280191D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2563902605244206D+0 + V=0.3240596008171533D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3629346991663361D+0 + V=0.3621195964432943D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4683949968987538D+0 + V=0.3868838330760539D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5694479240657952D+0 + V=0.4018911532693111D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6634465430993955D+0 + V=0.4089929432983252D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1033958573552305D+0 + B=0.3034544009063584D-1 + V=0.2279907527706409D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1473521412414395D+0 + B=0.6618803044247135D-1 + V=0.2715205490578897D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1924552158705967D+0 + B=0.1054431128987715D+0 + V=0.3057917896703976D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2381094362890328D+0 + B=0.1468263551238858D+0 + V=0.3326913052452555D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2838121707936760D+0 + B=0.1894486108187886D+0 + V=0.3537334711890037D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3291323133373415D+0 + B=0.2326374238761579D+0 + V=0.3700567500783129D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3736896978741460D+0 + B=0.2758485808485768D+0 + V=0.3825245372589122D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4171406040760013D+0 + B=0.3186179331996921D+0 + V=0.3918125171518296D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4591677985256915D+0 + B=0.3605329796303794D+0 + V=0.3984720419937579D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4994733831718418D+0 + B=0.4012147253586509D+0 + V=0.4029746003338211D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5377731830445096D+0 + B=0.4403050025570692D+0 + V=0.4057428632156627D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5737917830001331D+0 + B=0.4774565904277483D+0 + V=0.4071719274114857D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2027323586271389D+0 + B=0.3544122504976147D-1 + V=0.2990236950664119D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2516942375187273D+0 + B=0.7418304388646328D-1 + V=0.3262951734212878D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3000227995257181D+0 + B=0.1150502745727186D+0 + V=0.3482634608242413D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3474806691046342D+0 + B=0.1571963371209364D+0 + V=0.3656596681700892D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3938103180359209D+0 + B=0.1999631877247100D+0 + V=0.3791740467794218D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4387519590455703D+0 + B=0.2428073457846535D+0 + V=0.3894034450156905D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4820503960077787D+0 + B=0.2852575132906155D+0 + V=0.3968600245508371D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5234573778475101D+0 + B=0.3268884208674639D+0 + V=0.4019931351420050D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5627318647235282D+0 + B=0.3673033321675939D+0 + V=0.4052108801278599D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5996390607156954D+0 + B=0.4061211551830290D+0 + V=0.4068978613940934D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3084780753791947D+0 + B=0.3860125523100059D-1 + V=0.3454275351319704D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3589988275920223D+0 + B=0.7928938987104867D-1 + V=0.3629963537007920D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4078628415881973D+0 + B=0.1212614643030087D+0 + V=0.3770187233889873D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4549287258889735D+0 + B=0.1638770827382693D+0 + V=0.3878608613694378D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5000278512957279D+0 + B=0.2065965798260176D+0 + V=0.3959065270221274D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5429785044928199D+0 + B=0.2489436378852235D+0 + V=0.4015286975463570D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5835939850491711D+0 + B=0.2904811368946891D+0 + V=0.4050866785614717D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6216870353444856D+0 + B=0.3307941957666609D+0 + V=0.4069320185051913D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4151104662709091D+0 + B=0.4064829146052554D-1 + V=0.3760120964062763D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4649804275009218D+0 + B=0.8258424547294755D-1 + V=0.3870969564418064D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5124695757009662D+0 + B=0.1251841962027289D+0 + V=0.3955287790534055D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5574711100606224D+0 + B=0.1679107505976331D+0 + V=0.4015361911302668D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5998597333287227D+0 + B=0.2102805057358715D+0 + V=0.4053836986719548D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6395007148516600D+0 + B=0.2518418087774107D+0 + V=0.4073578673299117D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5188456224746252D+0 + B=0.4194321676077518D-1 + V=0.3954628379231406D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5664190707942778D+0 + B=0.8457661551921499D-1 + V=0.4017645508847530D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6110464353283153D+0 + B=0.1273652932519396D+0 + V=0.4059030348651293D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6526430302051563D+0 + B=0.1698173239076354D+0 + V=0.4080565809484880D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6167551880377548D+0 + B=0.4266398851548864D-1 + V=0.4063018753664651D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6607195418355383D+0 + B=0.8551925814238349D-1 + V=0.4087191292799671D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + N=N-1 + end subroutine LD2702 +!!*** + + SUBROUTINE LD3074(X,Y,Z,W,N) + + DOUBLE PRECISION X(3074) + DOUBLE PRECISION Y(3074) + DOUBLE PRECISION Z(3074) + DOUBLE PRECISION W(3074) + INTEGER N + DOUBLE PRECISION A,B,V +!CVW +!CVW LEBEDEV 3074-POINT ANGULAR GRID +!CVW +!chvd +!chvd This subroutine is part of a set of subroutines that generate +!chvd Lebedev grids [1-6] for integration on a sphere. The original +!chvd C-code [1] was kindly provided by Dr. Dmitri N. Laikov and +!chvd translated into fortran by Dr. Christoph van Wuellen. +!chvd This subroutine was translated using a C to fortran77 conversion +!chvd tool written by Dr. Christoph van Wuellen. +!chvd +!chvd Users of this code are asked to include reference [1] in their +!chvd publications, and in the user- and programmers-manuals +!chvd describing their codes. +!chvd +!chvd This code was distributed through CCL (http://www.ccl.net/). +!chvd +!chvd [1] V.I. Lebedev, and D.N. Laikov +!chvd "A quadrature formula for the sphere of the 131st +!chvd algebraic order of accuracy" +!chvd Doklady Mathematics, Vol. 59, No. 3, 1999, pp. 477-481. [[cite:Lebedev1999]] +!chvd +!chvd [2] V.I. Lebedev +!chvd "A quadrature formula for the sphere of 59th algebraic +!chvd order of accuracy" +!chvd Russian Acad. Sci. Dokl. Math., Vol. 50, 1995, pp. 283-286. [[cite:Lebedev1995]] +!chvd +!chvd [3] V.I. Lebedev, and A.L. Skorokhodov +!chvd "Quadrature formulas of orders 41, 47, and 53 for the sphere" +!chvd Russian Acad. Sci. Dokl. Math., Vol. 45, 1992, pp. 587-592. [[cite:Lebedev1992]] +!chvd +!chvd [4] V.I. Lebedev +!chvd "Spherical quadrature formulas exact to orders 25-29" +!chvd Siberian Mathematical Journal, Vol. 18, 1977, pp. 99-107. [[cite:Lebedev1977]] +!chvd +!chvd [5] V.I. Lebedev +!chvd "Quadratures on a sphere" +!chvd Computational Mathematics and Mathematical Physics, Vol. 16, 1976, pp. 10-24. [[cite:Lebedev1976]] +!chvd +!chvd [6] V.I. Lebedev +!chvd "Values of the nodes and weights of ninth to seventeenth +!chvd order Gauss-Markov quadrature formulae invariant under the +!chvd octahedron group with inversion" +!chvd Computational Mathematics and Mathematical Physics, Vol. 15, 1975, pp. 44-51. [[cite:Lebedev1975]] +!chvd + N=1 + V=0.2599095953754734D-4 + Call GEN_OH( 1, N, X(N), Y(N), Z(N), W(N), A, B, V) + V=0.3603134089687541D-3 + Call GEN_OH( 2, N, X(N), Y(N), Z(N), W(N), A, B, V) + V=0.3586067974412447D-3 + Call GEN_OH( 3, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1886108518723392D-1 + V=0.9831528474385880D-4 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4800217244625303D-1 + V=0.1605023107954450D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.8244922058397242D-1 + V=0.2072200131464099D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1200408362484023D+0 + V=0.2431297618814187D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1595773530809965D+0 + V=0.2711819064496707D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2002635973434064D+0 + V=0.2932762038321116D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2415127590139982D+0 + V=0.3107032514197368D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2828584158458477D+0 + V=0.3243808058921213D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3239091015338138D+0 + V=0.3349899091374030D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3643225097962194D+0 + V=0.3430580688505218D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4037897083691802D+0 + V=0.3490124109290343D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4420247515194127D+0 + V=0.3532148948561955D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4787572538464938D+0 + V=0.3559862669062833D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5137265251275234D+0 + V=0.3576224317551411D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5466764056654611D+0 + V=0.3584050533086076D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6054859420813535D+0 + V=0.3584903581373224D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6308106701764562D+0 + V=0.3582991879040586D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6530369230179584D+0 + V=0.3582371187963125D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6718609524611158D+0 + V=0.3584353631122350D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6869676499894013D+0 + V=0.3589120166517785D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6980467077240748D+0 + V=0.3595445704531601D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.7048241721250522D+0 + V=0.3600943557111074D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5591105222058232D-1 + V=0.1456447096742039D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1407384078513916D+0 + V=0.2252370188283782D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2364035438976309D+0 + V=0.2766135443474897D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3360602737818170D+0 + V=0.3110729491500851D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4356292630054665D+0 + V=0.3342506712303391D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5321569415256174D+0 + V=0.3491981834026860D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6232956305040554D+0 + V=0.3576003604348932D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.9469870086838469D-1 + B=0.2778748387309470D-1 + V=0.1921921305788564D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1353170300568141D+0 + B=0.6076569878628364D-1 + V=0.2301458216495632D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1771679481726077D+0 + B=0.9703072762711040D-1 + V=0.2604248549522893D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2197066664231751D+0 + B=0.1354112458524762D+0 + V=0.2845275425870697D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2624783557374927D+0 + B=0.1750996479744100D+0 + V=0.3036870897974840D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3050969521214442D+0 + B=0.2154896907449802D+0 + V=0.3188414832298066D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3472252637196021D+0 + B=0.2560954625740152D+0 + V=0.3307046414722089D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3885610219026360D+0 + B=0.2965070050624096D+0 + V=0.3398330969031360D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4288273776062765D+0 + B=0.3363641488734497D+0 + V=0.3466757899705373D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4677662471302948D+0 + B=0.3753400029836788D+0 + V=0.3516095923230054D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5051333589553359D+0 + B=0.4131297522144286D+0 + V=0.3549645184048486D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5406942145810492D+0 + B=0.4494423776081795D+0 + V=0.3570415969441392D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5742204122576457D+0 + B=0.4839938958841502D+0 + V=0.3581251798496118D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1865407027225188D+0 + B=0.3259144851070796D-1 + V=0.2543491329913348D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2321186453689432D+0 + B=0.6835679505297343D-1 + V=0.2786711051330776D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2773159142523882D+0 + B=0.1062284864451989D+0 + V=0.2985552361083679D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3219200192237254D+0 + B=0.1454404409323047D+0 + V=0.3145867929154039D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3657032593944029D+0 + B=0.1854018282582510D+0 + V=0.3273290662067609D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4084376778363622D+0 + B=0.2256297412014750D+0 + V=0.3372705511943501D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4499004945751427D+0 + B=0.2657104425000896D+0 + V=0.3448274437851510D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4898758141326335D+0 + B=0.3052755487631557D+0 + V=0.3503592783048583D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5281547442266309D+0 + B=0.3439863920645423D+0 + V=0.3541854792663162D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5645346989813992D+0 + B=0.3815229456121914D+0 + V=0.3565995517909428D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5988181252159848D+0 + B=0.4175752420966734D+0 + V=0.3578802078302898D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2850425424471603D+0 + B=0.3562149509862536D-1 + V=0.2958644592860982D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3324619433027876D+0 + B=0.7330318886871096D-1 + V=0.3119548129116835D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3785848333076282D+0 + B=0.1123226296008472D+0 + V=0.3250745225005984D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4232891028562115D+0 + B=0.1521084193337708D+0 + V=0.3355153415935208D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4664287050829722D+0 + B=0.1921844459223610D+0 + V=0.3435847568549328D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5078458493735726D+0 + B=0.2321360989678303D+0 + V=0.3495786831622488D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5473779816204180D+0 + B=0.2715886486360520D+0 + V=0.3537767805534621D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5848617133811376D+0 + B=0.3101924707571355D+0 + V=0.3564459815421428D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6201348281584888D+0 + B=0.3476121052890973D+0 + V=0.3578464061225468D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3852191185387871D+0 + B=0.3763224880035108D-1 + V=0.3239748762836212D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4325025061073423D+0 + B=0.7659581935637135D-1 + V=0.3345491784174287D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4778486229734490D+0 + B=0.1163381306083900D+0 + V=0.3429126177301782D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5211663693009000D+0 + B=0.1563890598752899D+0 + V=0.3492420343097421D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5623469504853703D+0 + B=0.1963320810149200D+0 + V=0.3537399050235257D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6012718188659246D+0 + B=0.2357847407258738D+0 + V=0.3566209152659172D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6378179206390117D+0 + B=0.2743846121244060D+0 + V=0.3581084321919782D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4836936460214534D+0 + B=0.3895902610739024D-1 + V=0.3426522117591512D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5293792562683797D+0 + B=0.7871246819312640D-1 + V=0.3491848770121379D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5726281253100033D+0 + B=0.1187963808202981D+0 + V=0.3539318235231476D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6133658776169068D+0 + B=0.1587914708061787D+0 + V=0.3570231438458694D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6515085491865307D+0 + B=0.1983058575227646D+0 + V=0.3586207335051714D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5778692716064976D+0 + B=0.3977209689791542D-1 + V=0.3541196205164025D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6207904288086192D+0 + B=0.7990157592981152D-1 + V=0.3574296911573953D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6608688171046802D+0 + B=0.1199671308754309D+0 + V=0.3591993279818963D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6656263089489130D+0 + B=0.4015955957805969D-1 + V=0.3595855034661997D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + N=N-1 + end subroutine LD3074 +!!*** + + SUBROUTINE LD3470(X,Y,Z,W,N) + + DOUBLE PRECISION X(3470) + DOUBLE PRECISION Y(3470) + DOUBLE PRECISION Z(3470) + DOUBLE PRECISION W(3470) + INTEGER N + DOUBLE PRECISION A,B,V +!CVW +!CVW LEBEDEV 3470-POINT ANGULAR GRID +!CVW +!chvd +!chvd This subroutine is part of a set of subroutines that generate +!chvd Lebedev grids [1-6] for integration on a sphere. The original +!chvd C-code [1] was kindly provided by Dr. Dmitri N. Laikov and +!chvd translated into fortran by Dr. Christoph van Wuellen. +!chvd This subroutine was translated using a C to fortran77 conversion +!chvd tool written by Dr. Christoph van Wuellen. +!chvd +!chvd Users of this code are asked to include reference [1] in their +!chvd publications, and in the user- and programmers-manuals +!chvd describing their codes. +!chvd +!chvd This code was distributed through CCL (http://www.ccl.net/). +!chvd +!chvd [1] V.I. Lebedev, and D.N. Laikov +!chvd "A quadrature formula for the sphere of the 131st +!chvd algebraic order of accuracy" +!chvd Doklady Mathematics, Vol. 59, No. 3, 1999, pp. 477-481. [[cite:Lebedev1999]] +!chvd +!chvd [2] V.I. Lebedev +!chvd "A quadrature formula for the sphere of 59th algebraic +!chvd order of accuracy" +!chvd Russian Acad. Sci. Dokl. Math., Vol. 50, 1995, pp. 283-286. [[cite:Lebedev1995]] +!chvd +!chvd [3] V.I. Lebedev, and A.L. Skorokhodov +!chvd "Quadrature formulas of orders 41, 47, and 53 for the sphere" +!chvd Russian Acad. Sci. Dokl. Math., Vol. 45, 1992, pp. 587-592. [[cite:Lebedev1992]] +!chvd +!chvd [4] V.I. Lebedev +!chvd "Spherical quadrature formulas exact to orders 25-29" +!chvd Siberian Mathematical Journal, Vol. 18, 1977, pp. 99-107. [[cite:Lebedev1977]] +!chvd +!chvd [5] V.I. Lebedev +!chvd "Quadratures on a sphere" +!chvd Computational Mathematics and Mathematical Physics, Vol. 16, 1976, pp. 10-24. [[cite:Lebedev1976]] +!chvd +!chvd [6] V.I. Lebedev +!chvd "Values of the nodes and weights of ninth to seventeenth +!chvd order Gauss-Markov quadrature formulae invariant under the +!chvd octahedron group with inversion" +!chvd Computational Mathematics and Mathematical Physics, Vol. 15, 1975, pp. 44-51. [[cite:Lebedev1975]] +!chvd + N=1 + V=0.2040382730826330D-4 + Call GEN_OH( 1, N, X(N), Y(N), Z(N), W(N), A, B, V) + V=0.3178149703889544D-3 + Call GEN_OH( 3, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1721420832906233D-1 + V=0.8288115128076110D-4 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4408875374981770D-1 + V=0.1360883192522954D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.7594680813878681D-1 + V=0.1766854454542662D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1108335359204799D+0 + V=0.2083153161230153D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1476517054388567D+0 + V=0.2333279544657158D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1856731870860615D+0 + V=0.2532809539930247D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2243634099428821D+0 + V=0.2692472184211158D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2633006881662727D+0 + V=0.2819949946811885D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3021340904916283D+0 + V=0.2920953593973030D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3405594048030089D+0 + V=0.2999889782948352D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3783044434007372D+0 + V=0.3060292120496902D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4151194767407910D+0 + V=0.3105109167522192D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4507705766443257D+0 + V=0.3136902387550312D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4850346056573187D+0 + V=0.3157984652454632D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5176950817792470D+0 + V=0.3170516518425422D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5485384240820989D+0 + V=0.3176568425633755D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6039117238943308D+0 + V=0.3177198411207062D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6279956655573113D+0 + V=0.3175519492394733D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6493636169568952D+0 + V=0.3174654952634756D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6677644117704504D+0 + V=0.3175676415467654D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6829368572115624D+0 + V=0.3178923417835410D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6946195818184121D+0 + V=0.3183788287531909D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.7025711542057026D+0 + V=0.3188755151918807D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.7066004767140119D+0 + V=0.3191916889313849D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5132537689946062D-1 + V=0.1231779611744508D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1297994661331225D+0 + V=0.1924661373839880D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2188852049401307D+0 + V=0.2380881867403424D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3123174824903457D+0 + V=0.2693100663037885D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4064037620738195D+0 + V=0.2908673382834366D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4984958396944782D+0 + V=0.3053914619381535D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5864975046021365D+0 + V=0.3143916684147777D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6686711634580175D+0 + V=0.3187042244055363D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.8715738780835950D-1 + B=0.2557175233367578D-1 + V=0.1635219535869790D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1248383123134007D+0 + B=0.5604823383376681D-1 + V=0.1968109917696070D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1638062693383378D+0 + B=0.8968568601900765D-1 + V=0.2236754342249974D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2035586203373176D+0 + B=0.1254086651976279D+0 + V=0.2453186687017181D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2436798975293774D+0 + B=0.1624780150162012D+0 + V=0.2627551791580541D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2838207507773806D+0 + B=0.2003422342683208D+0 + V=0.2767654860152220D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3236787502217692D+0 + B=0.2385628026255263D+0 + V=0.2879467027765895D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3629849554840691D+0 + B=0.2767731148783578D+0 + V=0.2967639918918702D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4014948081992087D+0 + B=0.3146542308245309D+0 + V=0.3035900684660351D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4389818379260225D+0 + B=0.3519196415895088D+0 + V=0.3087338237298308D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4752331143674377D+0 + B=0.3883050984023654D+0 + V=0.3124608838860167D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5100457318374018D+0 + B=0.4235613423908649D+0 + V=0.3150084294226743D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5432238388954868D+0 + B=0.4574484717196220D+0 + V=0.3165958398598402D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5745758685072442D+0 + B=0.4897311639255524D+0 + V=0.3174320440957372D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1723981437592809D+0 + B=0.3010630597881105D-1 + V=0.2182188909812599D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2149553257844597D+0 + B=0.6326031554204694D-1 + V=0.2399727933921445D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2573256081247422D+0 + B=0.9848566980258631D-1 + V=0.2579796133514652D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2993163751238106D+0 + B=0.1350835952384266D+0 + V=0.2727114052623535D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3407238005148000D+0 + B=0.1725184055442181D+0 + V=0.2846327656281355D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3813454978483264D+0 + B=0.2103559279730725D+0 + V=0.2941491102051334D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4209848104423343D+0 + B=0.2482278774554860D+0 + V=0.3016049492136107D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4594519699996300D+0 + B=0.2858099509982883D+0 + V=0.3072949726175648D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4965640166185930D+0 + B=0.3228075659915428D+0 + V=0.3114768142886460D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5321441655571562D+0 + B=0.3589459907204151D+0 + V=0.3143823673666223D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5660208438582166D+0 + B=0.3939630088864310D+0 + V=0.3162269764661535D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5980264315964364D+0 + B=0.4276029922949089D+0 + V=0.3172164663759821D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2644215852350733D+0 + B=0.3300939429072552D-1 + V=0.2554575398967435D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3090113743443063D+0 + B=0.6803887650078501D-1 + V=0.2701704069135677D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3525871079197808D+0 + B=0.1044326136206709D+0 + V=0.2823693413468940D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3950418005354029D+0 + B=0.1416751597517679D+0 + V=0.2922898463214289D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4362475663430163D+0 + B=0.1793408610504821D+0 + V=0.3001829062162428D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4760661812145854D+0 + B=0.2170630750175722D+0 + V=0.3062890864542953D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5143551042512103D+0 + B=0.2545145157815807D+0 + V=0.3108328279264746D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5509709026935597D+0 + B=0.2913940101706601D+0 + V=0.3140243146201245D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5857711030329428D+0 + B=0.3274169910910705D+0 + V=0.3160638030977130D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6186149917404392D+0 + B=0.3623081329317265D+0 + V=0.3171462882206275D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3586894569557064D+0 + B=0.3497354386450040D-1 + V=0.2812388416031796D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4035266610019441D+0 + B=0.7129736739757095D-1 + V=0.2912137500288045D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4467775312332510D+0 + B=0.1084758620193165D+0 + V=0.2993241256502206D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4883638346608543D+0 + B=0.1460915689241772D+0 + V=0.3057101738983822D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5281908348434601D+0 + B=0.1837790832369980D+0 + V=0.3105319326251432D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5661542687149311D+0 + B=0.2212075390874021D+0 + V=0.3139565514428167D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6021450102031452D+0 + B=0.2580682841160985D+0 + V=0.3161543006806366D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6360520783610050D+0 + B=0.2940656362094121D+0 + V=0.3172985960613294D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4521611065087196D+0 + B=0.3631055365867002D-1 + V=0.2989400336901431D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4959365651560963D+0 + B=0.7348318468484350D-1 + V=0.3054555883947677D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5376815804038283D+0 + B=0.1111087643812648D+0 + V=0.3104764960807702D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5773314480243768D+0 + B=0.1488226085145408D+0 + V=0.3141015825977616D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6148113245575056D+0 + B=0.1862892274135151D+0 + V=0.3164520621159896D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6500407462842380D+0 + B=0.2231909701714456D+0 + V=0.3176652305912204D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5425151448707213D+0 + B=0.3718201306118944D-1 + V=0.3105097161023939D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5841860556907931D+0 + B=0.7483616335067346D-1 + V=0.3143014117890550D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6234632186851500D+0 + B=0.1125990834266120D+0 + V=0.3168172866287200D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6602934551848843D+0 + B=0.1501303813157619D+0 + V=0.3181401865570968D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6278573968375105D+0 + B=0.3767559930245720D-1 + V=0.3170663659156037D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6665611711264577D+0 + B=0.7548443301360158D-1 + V=0.3185447944625510D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + N=N-1 + end subroutine LD3470 +!!*** + + SUBROUTINE LD3890(X,Y,Z,W,N) + + DOUBLE PRECISION X(3890) + DOUBLE PRECISION Y(3890) + DOUBLE PRECISION Z(3890) + DOUBLE PRECISION W(3890) + INTEGER N + DOUBLE PRECISION A,B,V +!CVW +!CVW LEBEDEV 3890-POINT ANGULAR GRID +!CVW +!chvd +!chvd This subroutine is part of a set of subroutines that generate +!chvd Lebedev grids [1-6] for integration on a sphere. The original +!chvd C-code [1] was kindly provided by Dr. Dmitri N. Laikov and +!chvd translated into fortran by Dr. Christoph van Wuellen. +!chvd This subroutine was translated using a C to fortran77 conversion +!chvd tool written by Dr. Christoph van Wuellen. +!chvd +!chvd Users of this code are asked to include reference [1] in their +!chvd publications, and in the user- and programmers-manuals +!chvd describing their codes. +!chvd +!chvd This code was distributed through CCL (http://www.ccl.net/). +!chvd +!chvd [1] V.I. Lebedev, and D.N. Laikov +!chvd "A quadrature formula for the sphere of the 131st +!chvd algebraic order of accuracy" +!chvd Doklady Mathematics, Vol. 59, No. 3, 1999, pp. 477-481. [[cite:Lebedev1999]] +!chvd +!chvd [2] V.I. Lebedev +!chvd "A quadrature formula for the sphere of 59th algebraic +!chvd order of accuracy" +!chvd Russian Acad. Sci. Dokl. Math., Vol. 50, 1995, pp. 283-286. [[cite:Lebedev1995]] +!chvd +!chvd [3] V.I. Lebedev, and A.L. Skorokhodov +!chvd "Quadrature formulas of orders 41, 47, and 53 for the sphere" +!chvd Russian Acad. Sci. Dokl. Math., Vol. 45, 1992, pp. 587-592. [[cite:Lebedev1992]] +!chvd +!chvd [4] V.I. Lebedev +!chvd "Spherical quadrature formulas exact to orders 25-29" +!chvd Siberian Mathematical Journal, Vol. 18, 1977, pp. 99-107. [[cite:Lebedev1977]] +!chvd +!chvd [5] V.I. Lebedev +!chvd "Quadratures on a sphere" +!chvd Computational Mathematics and Mathematical Physics, Vol. 16, 1976, pp. 10-24. [[cite:Lebedev1976]] +!chvd +!chvd [6] V.I. Lebedev +!chvd "Values of the nodes and weights of ninth to seventeenth +!chvd order Gauss-Markov quadrature formulae invariant under the +!chvd octahedron group with inversion" +!chvd Computational Mathematics and Mathematical Physics, Vol. 15, 1975, pp. 44-51. [[cite:Lebedev1975]] +!chvd + N=1 + V=0.1807395252196920D-4 + Call GEN_OH( 1, N, X(N), Y(N), Z(N), W(N), A, B, V) + V=0.2848008782238827D-3 + Call GEN_OH( 2, N, X(N), Y(N), Z(N), W(N), A, B, V) + V=0.2836065837530581D-3 + Call GEN_OH( 3, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1587876419858352D-1 + V=0.7013149266673816D-4 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4069193593751206D-1 + V=0.1162798021956766D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.7025888115257997D-1 + V=0.1518728583972105D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1027495450028704D+0 + V=0.1798796108216934D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1371457730893426D+0 + V=0.2022593385972785D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1727758532671953D+0 + V=0.2203093105575464D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2091492038929037D+0 + V=0.2349294234299855D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2458813281751915D+0 + V=0.2467682058747003D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2826545859450066D+0 + V=0.2563092683572224D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3191957291799622D+0 + V=0.2639253896763318D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3552621469299578D+0 + V=0.2699137479265108D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3906329503406230D+0 + V=0.2745196420166739D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4251028614093031D+0 + V=0.2779529197397593D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4584777520111870D+0 + V=0.2803996086684265D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4905711358710193D+0 + V=0.2820302356715842D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5212011669847385D+0 + V=0.2830056747491068D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5501878488737995D+0 + V=0.2834808950776839D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6025037877479342D+0 + V=0.2835282339078929D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6254572689549016D+0 + V=0.2833819267065800D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6460107179528248D+0 + V=0.2832858336906784D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6639541138154251D+0 + V=0.2833268235451244D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6790688515667495D+0 + V=0.2835432677029253D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6911338580371512D+0 + V=0.2839091722743049D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6999385956126490D+0 + V=0.2843308178875841D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.7053037748656896D+0 + V=0.2846703550533846D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4732224387180115D-1 + V=0.1051193406971900D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1202100529326803D+0 + V=0.1657871838796974D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2034304820664855D+0 + V=0.2064648113714232D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2912285643573002D+0 + V=0.2347942745819741D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3802361792726768D+0 + V=0.2547775326597726D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4680598511056146D+0 + V=0.2686876684847025D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5528151052155599D+0 + V=0.2778665755515867D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6329386307803041D+0 + V=0.2830996616782929D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.8056516651369069D-1 + B=0.2363454684003124D-1 + V=0.1403063340168372D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1156476077139389D+0 + B=0.5191291632545936D-1 + V=0.1696504125939477D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1520473382760421D+0 + B=0.8322715736994519D-1 + V=0.1935787242745390D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1892986699745931D+0 + B=0.1165855667993712D+0 + V=0.2130614510521968D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2270194446777792D+0 + B=0.1513077167409504D+0 + V=0.2289381265931048D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2648908185093273D+0 + B=0.1868882025807859D+0 + V=0.2418630292816186D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3026389259574136D+0 + B=0.2229277629776224D+0 + V=0.2523400495631193D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3400220296151384D+0 + B=0.2590951840746235D+0 + V=0.2607623973449605D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3768217953335510D+0 + B=0.2951047291750847D+0 + V=0.2674441032689209D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4128372900921884D+0 + B=0.3307019714169930D+0 + V=0.2726432360343356D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4478807131815630D+0 + B=0.3656544101087634D+0 + V=0.2765787685924545D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4817742034089257D+0 + B=0.3997448951939695D+0 + V=0.2794428690642224D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5143472814653344D+0 + B=0.4327667110812024D+0 + V=0.2814099002062895D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5454346213905650D+0 + B=0.4645196123532293D+0 + V=0.2826429531578994D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5748739313170252D+0 + B=0.4948063555703345D+0 + V=0.2832983542550884D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1599598738286342D+0 + B=0.2792357590048985D-1 + V=0.1886695565284976D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1998097412500951D+0 + B=0.5877141038139065D-1 + V=0.2081867882748234D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2396228952566202D+0 + B=0.9164573914691377D-1 + V=0.2245148680600796D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2792228341097746D+0 + B=0.1259049641962687D+0 + V=0.2380370491511872D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3184251107546741D+0 + B=0.1610594823400863D+0 + V=0.2491398041852455D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3570481164426244D+0 + B=0.1967151653460898D+0 + V=0.2581632405881230D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3949164710492144D+0 + B=0.2325404606175168D+0 + V=0.2653965506227417D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4318617293970503D+0 + B=0.2682461141151439D+0 + V=0.2710857216747087D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4677221009931678D+0 + B=0.3035720116011973D+0 + V=0.2754434093903659D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5023417939270955D+0 + B=0.3382781859197439D+0 + V=0.2786579932519380D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5355701836636128D+0 + B=0.3721383065625942D+0 + V=0.2809011080679474D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5672608451328771D+0 + B=0.4049346360466055D+0 + V=0.2823336184560987D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5972704202540162D+0 + B=0.4364538098633802D+0 + V=0.2831101175806309D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2461687022333596D+0 + B=0.3070423166833368D-1 + V=0.2221679970354546D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2881774566286831D+0 + B=0.6338034669281885D-1 + V=0.2356185734270703D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3293963604116978D+0 + B=0.9742862487067941D-1 + V=0.2469228344805590D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3697303822241377D+0 + B=0.1323799532282290D+0 + V=0.2562726348642046D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4090663023135127D+0 + B=0.1678497018129336D+0 + V=0.2638756726753028D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4472819355411712D+0 + B=0.2035095105326114D+0 + V=0.2699311157390862D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4842513377231437D+0 + B=0.2390692566672091D+0 + V=0.2746233268403837D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5198477629962928D+0 + B=0.2742649818076149D+0 + V=0.2781225674454771D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5539453011883145D+0 + B=0.3088503806580094D+0 + V=0.2805881254045684D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5864196762401251D+0 + B=0.3425904245906614D+0 + V=0.2821719877004913D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6171484466668390D+0 + B=0.3752562294789468D+0 + V=0.2830222502333124D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3350337830565727D+0 + B=0.3261589934634747D-1 + V=0.2457995956744870D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3775773224758284D+0 + B=0.6658438928081572D-1 + V=0.2551474407503706D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4188155229848973D+0 + B=0.1014565797157954D+0 + V=0.2629065335195311D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4586805892009344D+0 + B=0.1368573320843822D+0 + V=0.2691900449925075D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4970895714224235D+0 + B=0.1724614851951608D+0 + V=0.2741275485754276D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5339505133960747D+0 + B=0.2079779381416412D+0 + V=0.2778530970122595D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5691665792531440D+0 + B=0.2431385788322288D+0 + V=0.2805010567646741D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6026387682680377D+0 + B=0.2776901883049853D+0 + V=0.2822055834031040D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6342676150163307D+0 + B=0.3113881356386632D+0 + V=0.2831016901243473D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4237951119537067D+0 + B=0.3394877848664351D-1 + V=0.2624474901131803D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4656918683234929D+0 + B=0.6880219556291447D-1 + V=0.2688034163039377D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5058857069185980D+0 + B=0.1041946859721635D+0 + V=0.2738932751287636D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5443204666713996D+0 + B=0.1398039738736393D+0 + V=0.2777944791242523D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5809298813759742D+0 + B=0.1753373381196155D+0 + V=0.2806011661660987D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6156416039447128D+0 + B=0.2105215793514010D+0 + V=0.2824181456597460D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6483801351066604D+0 + B=0.2450953312157051D+0 + V=0.2833585216577828D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5103616577251688D+0 + B=0.3485560643800719D-1 + V=0.2738165236962878D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5506738792580681D+0 + B=0.7026308631512033D-1 + V=0.2778365208203180D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5889573040995292D+0 + B=0.1059035061296403D+0 + V=0.2807852940418966D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6251641589516930D+0 + B=0.1414823925236026D+0 + V=0.2827245949674705D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6592414921570178D+0 + B=0.1767207908214530D+0 + V=0.2837342344829828D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5930314017533384D+0 + B=0.3542189339561672D-1 + V=0.2809233907610981D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6309812253390175D+0 + B=0.7109574040369549D-1 + V=0.2829930809742694D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6666296011353230D+0 + B=0.1067259792282730D+0 + V=0.2841097874111479D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6703715271049922D+0 + B=0.3569455268820809D-1 + V=0.2843455206008783D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + N=N-1 + end subroutine LD3890 +!!*** + + SUBROUTINE LD4334(X,Y,Z,W,N) + + DOUBLE PRECISION X(4334) + DOUBLE PRECISION Y(4334) + DOUBLE PRECISION Z(4334) + DOUBLE PRECISION W(4334) + INTEGER N + DOUBLE PRECISION A,B,V +!CVW +!CVW LEBEDEV 4334-POINT ANGULAR GRID +!CVW +!chvd +!chvd This subroutine is part of a set of subroutines that generate +!chvd Lebedev grids [1-6] for integration on a sphere. The original +!chvd C-code [1] was kindly provided by Dr. Dmitri N. Laikov and +!chvd translated into fortran by Dr. Christoph van Wuellen. +!chvd This subroutine was translated using a C to fortran77 conversion +!chvd tool written by Dr. Christoph van Wuellen. +!chvd +!chvd Users of this code are asked to include reference [1] in their +!chvd publications, and in the user- and programmers-manuals +!chvd describing their codes. +!chvd +!chvd This code was distributed through CCL (http://www.ccl.net/). +!chvd +!chvd [1] V.I. Lebedev, and D.N. Laikov +!chvd "A quadrature formula for the sphere of the 131st +!chvd algebraic order of accuracy" +!chvd Doklady Mathematics, Vol. 59, No. 3, 1999, pp. 477-481. [[cite:Lebedev1999]] +!chvd +!chvd [2] V.I. Lebedev +!chvd "A quadrature formula for the sphere of 59th algebraic +!chvd order of accuracy" +!chvd Russian Acad. Sci. Dokl. Math., Vol. 50, 1995, pp. 283-286. [[cite:Lebedev1995]] +!chvd +!chvd [3] V.I. Lebedev, and A.L. Skorokhodov +!chvd "Quadrature formulas of orders 41, 47, and 53 for the sphere" +!chvd Russian Acad. Sci. Dokl. Math., Vol. 45, 1992, pp. 587-592. [[cite:Lebedev1992]] +!chvd +!chvd [4] V.I. Lebedev +!chvd "Spherical quadrature formulas exact to orders 25-29" +!chvd Siberian Mathematical Journal, Vol. 18, 1977, pp. 99-107. [[cite:Lebedev1977]] +!chvd +!chvd [5] V.I. Lebedev +!chvd "Quadratures on a sphere" +!chvd Computational Mathematics and Mathematical Physics, Vol. 16, 1976, pp. 10-24. [[cite:Lebedev1976]] +!chvd +!chvd [6] V.I. Lebedev +!chvd "Values of the nodes and weights of ninth to seventeenth +!chvd order Gauss-Markov quadrature formulae invariant under the +!chvd octahedron group with inversion" +!chvd Computational Mathematics and Mathematical Physics, Vol. 15, 1975, pp. 44-51. [[cite:Lebedev1975]] +!chvd + N=1 + V=0.1449063022537883D-4 + Call GEN_OH( 1, N, X(N), Y(N), Z(N), W(N), A, B, V) + V=0.2546377329828424D-3 + Call GEN_OH( 3, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1462896151831013D-1 + V=0.6018432961087496D-4 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3769840812493139D-1 + V=0.1002286583263673D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6524701904096891D-1 + V=0.1315222931028093D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.9560543416134648D-1 + V=0.1564213746876724D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1278335898929198D+0 + V=0.1765118841507736D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1613096104466031D+0 + V=0.1928737099311080D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1955806225745371D+0 + V=0.2062658534263270D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2302935218498028D+0 + V=0.2172395445953787D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2651584344113027D+0 + V=0.2262076188876047D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2999276825183209D+0 + V=0.2334885699462397D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3343828669718798D+0 + V=0.2393355273179203D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3683265013750518D+0 + V=0.2439559200468863D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4015763206518108D+0 + V=0.2475251866060002D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4339612026399770D+0 + V=0.2501965558158773D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4653180651114582D+0 + V=0.2521081407925925D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4954893331080803D+0 + V=0.2533881002388081D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5243207068924930D+0 + V=0.2541582900848261D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5516590479041704D+0 + V=0.2545365737525860D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6012371927804176D+0 + V=0.2545726993066799D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6231574466449819D+0 + V=0.2544456197465555D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6429416514181271D+0 + V=0.2543481596881064D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6604124272943595D+0 + V=0.2543506451429194D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6753851470408250D+0 + V=0.2544905675493763D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6876717970626160D+0 + V=0.2547611407344429D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6970895061319234D+0 + V=0.2551060375448869D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.7034746912553310D+0 + V=0.2554291933816039D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.7067017217542295D+0 + V=0.2556255710686343D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4382223501131123D-1 + V=0.9041339695118195D-4 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1117474077400006D+0 + V=0.1438426330079022D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1897153252911440D+0 + V=0.1802523089820518D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2724023009910331D+0 + V=0.2060052290565496D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3567163308709902D+0 + V=0.2245002248967466D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4404784483028087D+0 + V=0.2377059847731150D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5219833154161411D+0 + V=0.2468118955882525D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5998179868977553D+0 + V=0.2525410872966528D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6727803154548222D+0 + V=0.2553101409933397D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.7476563943166086D-1 + B=0.2193168509461185D-1 + V=0.1212879733668632D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1075341482001416D+0 + B=0.4826419281533887D-1 + V=0.1472872881270931D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1416344885203259D+0 + B=0.7751191883575742D-1 + V=0.1686846601010828D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1766325315388586D+0 + B=0.1087558139247680D+0 + V=0.1862698414660208D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2121744174481514D+0 + B=0.1413661374253096D+0 + V=0.2007430956991861D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2479669443408145D+0 + B=0.1748768214258880D+0 + V=0.2126568125394796D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2837600452294113D+0 + B=0.2089216406612073D+0 + V=0.2224394603372113D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3193344933193984D+0 + B=0.2431987685545972D+0 + V=0.2304264522673135D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3544935442438745D+0 + B=0.2774497054377770D+0 + V=0.2368854288424087D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3890571932288154D+0 + B=0.3114460356156915D+0 + V=0.2420352089461772D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4228581214259090D+0 + B=0.3449806851913012D+0 + V=0.2460597113081295D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4557387211304052D+0 + B=0.3778618641248256D+0 + V=0.2491181912257687D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4875487950541643D+0 + B=0.4099086391698978D+0 + V=0.2513528194205857D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5181436529962997D+0 + B=0.4409474925853973D+0 + V=0.2528943096693220D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5473824095600661D+0 + B=0.4708094517711291D+0 + V=0.2538660368488136D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5751263398976174D+0 + B=0.4993275140354637D+0 + V=0.2543868648299022D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1489515746840028D+0 + B=0.2599381993267017D-1 + V=0.1642595537825183D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1863656444351767D+0 + B=0.5479286532462190D-1 + V=0.1818246659849308D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2238602880356348D+0 + B=0.8556763251425254D-1 + V=0.1966565649492420D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2612723375728160D+0 + B=0.1177257802267011D+0 + V=0.2090677905657991D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2984332990206190D+0 + B=0.1508168456192700D+0 + V=0.2193820409510504D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3351786584663333D+0 + B=0.1844801892177727D+0 + V=0.2278870827661928D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3713505522209120D+0 + B=0.2184145236087598D+0 + V=0.2348283192282090D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4067981098954663D+0 + B=0.2523590641486229D+0 + V=0.2404139755581477D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4413769993687534D+0 + B=0.2860812976901373D+0 + V=0.2448227407760734D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4749487182516394D+0 + B=0.3193686757808996D+0 + V=0.2482110455592573D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5073798105075426D+0 + B=0.3520226949547602D+0 + V=0.2507192397774103D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5385410448878654D+0 + B=0.3838544395667890D+0 + V=0.2524765968534880D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5683065353670530D+0 + B=0.4146810037640963D+0 + V=0.2536052388539425D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5965527620663510D+0 + B=0.4443224094681121D+0 + V=0.2542230588033068D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2299227700856157D+0 + B=0.2865757664057584D-1 + V=0.1944817013047896D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2695752998553267D+0 + B=0.5923421684485993D-1 + V=0.2067862362746635D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3086178716611389D+0 + B=0.9117817776057715D-1 + V=0.2172440734649114D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3469649871659077D+0 + B=0.1240593814082605D+0 + V=0.2260125991723423D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3845153566319655D+0 + B=0.1575272058259175D+0 + V=0.2332655008689523D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4211600033403215D+0 + B=0.1912845163525413D+0 + V=0.2391699681532458D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4567867834329882D+0 + B=0.2250710177858171D+0 + V=0.2438801528273928D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4912829319232061D+0 + B=0.2586521303440910D+0 + V=0.2475370504260665D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5245364793303812D+0 + B=0.2918112242865407D+0 + V=0.2502707235640574D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5564369788915756D+0 + B=0.3243439239067890D+0 + V=0.2522031701054241D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5868757697775287D+0 + B=0.3560536787835351D+0 + V=0.2534511269978784D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6157458853519617D+0 + B=0.3867480821242581D+0 + V=0.2541284914955151D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3138461110672113D+0 + B=0.3051374637507278D-1 + V=0.2161509250688394D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3542495872050569D+0 + B=0.6237111233730755D-1 + V=0.2248778513437852D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3935751553120181D+0 + B=0.9516223952401907D-1 + V=0.2322388803404617D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4317634668111147D+0 + B=0.1285467341508517D+0 + V=0.2383265471001355D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4687413842250821D+0 + B=0.1622318931656033D+0 + V=0.2432476675019525D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5044274237060283D+0 + B=0.1959581153836453D+0 + V=0.2471122223750674D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5387354077925727D+0 + B=0.2294888081183837D+0 + V=0.2500291752486870D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5715768898356105D+0 + B=0.2626031152713945D+0 + V=0.2521055942764682D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6028627200136111D+0 + B=0.2950904075286713D+0 + V=0.2534472785575503D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6325039812653463D+0 + B=0.3267458451113286D+0 + V=0.2541599713080121D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3981986708423407D+0 + B=0.3183291458749821D-1 + V=0.2317380975862936D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4382791182133300D+0 + B=0.6459548193880908D-1 + V=0.2378550733719775D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4769233057218166D+0 + B=0.9795757037087952D-1 + V=0.2428884456739118D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5140823911194238D+0 + B=0.1316307235126655D+0 + V=0.2469002655757292D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5496977833862983D+0 + B=0.1653556486358704D+0 + V=0.2499657574265851D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5837047306512727D+0 + B=0.1988931724126510D+0 + V=0.2521676168486082D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6160349566926879D+0 + B=0.2320174581438950D+0 + V=0.2535935662645334D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6466185353209440D+0 + B=0.2645106562168662D+0 + V=0.2543356743363214D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4810835158795404D+0 + B=0.3275917807743992D-1 + V=0.2427353285201535D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5199925041324341D+0 + B=0.6612546183967181D-1 + V=0.2468258039744386D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5571717692207494D+0 + B=0.9981498331474143D-1 + V=0.2500060956440310D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5925789250836378D+0 + B=0.1335687001410374D+0 + V=0.2523238365420979D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6261658523859670D+0 + B=0.1671444402896463D+0 + V=0.2538399260252846D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6578811126669331D+0 + B=0.2003106382156076D+0 + V=0.2546255927268069D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5609624612998100D+0 + B=0.3337500940231335D-1 + V=0.2500583360048449D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5979959659984670D+0 + B=0.6708750335901803D-1 + V=0.2524777638260203D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6330523711054002D+0 + B=0.1008792126424850D+0 + V=0.2540951193860656D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6660960998103972D+0 + B=0.1345050343171794D+0 + V=0.2549524085027472D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6365384364585819D+0 + B=0.3372799460737052D-1 + V=0.2542569507009158D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6710994302899275D+0 + B=0.6755249309678028D-1 + V=0.2552114127580376D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + N=N-1 + end subroutine LD4334 +!!*** + + SUBROUTINE LD4802(X,Y,Z,W,N) + + DOUBLE PRECISION X(4802) + DOUBLE PRECISION Y(4802) + DOUBLE PRECISION Z(4802) + DOUBLE PRECISION W(4802) + INTEGER N + DOUBLE PRECISION A,B,V +!CVW +!CVW LEBEDEV 4802-POINT ANGULAR GRID +!CVW +!chvd +!chvd This subroutine is part of a set of subroutines that generate +!chvd Lebedev grids [1-6] for integration on a sphere. The original +!chvd C-code [1] was kindly provided by Dr. Dmitri N. Laikov and +!chvd translated into fortran by Dr. Christoph van Wuellen. +!chvd This subroutine was translated using a C to fortran77 conversion +!chvd tool written by Dr. Christoph van Wuellen. +!chvd +!chvd Users of this code are asked to include reference [1] in their +!chvd publications, and in the user- and programmers-manuals +!chvd describing their codes. +!chvd +!chvd This code was distributed through CCL (http://www.ccl.net/). +!chvd +!chvd [1] V.I. Lebedev, and D.N. Laikov +!chvd "A quadrature formula for the sphere of the 131st +!chvd algebraic order of accuracy" +!chvd Doklady Mathematics, Vol. 59, No. 3, 1999, pp. 477-481. [[cite:Lebedev1999]] +!chvd +!chvd [2] V.I. Lebedev +!chvd "A quadrature formula for the sphere of 59th algebraic +!chvd order of accuracy" +!chvd Russian Acad. Sci. Dokl. Math., Vol. 50, 1995, pp. 283-286. [[cite:Lebedev1995]] +!chvd +!chvd [3] V.I. Lebedev, and A.L. Skorokhodov +!chvd "Quadrature formulas of orders 41, 47, and 53 for the sphere" +!chvd Russian Acad. Sci. Dokl. Math., Vol. 45, 1992, pp. 587-592. [[cite:Lebedev1992]] +!chvd +!chvd [4] V.I. Lebedev +!chvd "Spherical quadrature formulas exact to orders 25-29" +!chvd Siberian Mathematical Journal, Vol. 18, 1977, pp. 99-107. [[cite:Lebedev1977]] +!chvd +!chvd [5] V.I. Lebedev +!chvd "Quadratures on a sphere" +!chvd Computational Mathematics and Mathematical Physics, Vol. 16, 1976, pp. 10-24. [[cite:Lebedev1976]] +!chvd +!chvd [6] V.I. Lebedev +!chvd "Values of the nodes and weights of ninth to seventeenth +!chvd order Gauss-Markov quadrature formulae invariant under the +!chvd octahedron group with inversion" +!chvd Computational Mathematics and Mathematical Physics, Vol. 15, 1975, pp. 44-51. [[cite:Lebedev1975]] +!chvd + N=1 + V=0.9687521879420705D-4 + Call GEN_OH( 1, N, X(N), Y(N), Z(N), W(N), A, B, V) + V=0.2307897895367918D-3 + Call GEN_OH( 2, N, X(N), Y(N), Z(N), W(N), A, B, V) + V=0.2297310852498558D-3 + Call GEN_OH( 3, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2335728608887064D-1 + V=0.7386265944001919D-4 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4352987836550653D-1 + V=0.8257977698542210D-4 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6439200521088801D-1 + V=0.9706044762057630D-4 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.9003943631993181D-1 + V=0.1302393847117003D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1196706615548473D+0 + V=0.1541957004600968D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1511715412838134D+0 + V=0.1704459770092199D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1835982828503801D+0 + V=0.1827374890942906D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2165081259155405D+0 + V=0.1926360817436107D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2496208720417563D+0 + V=0.2008010239494833D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2827200673567900D+0 + V=0.2075635983209175D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3156190823994346D+0 + V=0.2131306638690909D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3481476793749115D+0 + V=0.2176562329937335D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3801466086947226D+0 + V=0.2212682262991018D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4114652119634011D+0 + V=0.2240799515668565D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4419598786519751D+0 + V=0.2261959816187525D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4714925949329543D+0 + V=0.2277156368808855D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4999293972879466D+0 + V=0.2287351772128336D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5271387221431248D+0 + V=0.2293490814084085D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5529896780837761D+0 + V=0.2296505312376273D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6000856099481712D+0 + V=0.2296793832318756D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6210562192785175D+0 + V=0.2295785443842974D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6401165879934240D+0 + V=0.2295017931529102D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6571144029244334D+0 + V=0.2295059638184868D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6718910821718863D+0 + V=0.2296232343237362D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6842845591099010D+0 + V=0.2298530178740771D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6941353476269816D+0 + V=0.2301579790280501D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.7012965242212991D+0 + V=0.2304690404996513D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.7056471428242644D+0 + V=0.2307027995907102D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4595557643585895D-1 + V=0.9312274696671092D-4 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1049316742435023D+0 + V=0.1199919385876926D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1773548879549274D+0 + V=0.1598039138877690D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2559071411236127D+0 + V=0.1822253763574900D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3358156837985898D+0 + V=0.1988579593655040D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4155835743763893D+0 + V=0.2112620102533307D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4937894296167472D+0 + V=0.2201594887699007D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5691569694793316D+0 + V=0.2261622590895036D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6405840854894251D+0 + V=0.2296458453435705D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.7345133894143348D-1 + B=0.2177844081486067D-1 + V=0.1006006990267000D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1009859834044931D+0 + B=0.4590362185775188D-1 + V=0.1227676689635876D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1324289619748758D+0 + B=0.7255063095690877D-1 + V=0.1467864280270117D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1654272109607127D+0 + B=0.1017825451960684D+0 + V=0.1644178912101232D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1990767186776461D+0 + B=0.1325652320980364D+0 + V=0.1777664890718961D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2330125945523278D+0 + B=0.1642765374496765D+0 + V=0.1884825664516690D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2670080611108287D+0 + B=0.1965360374337889D+0 + V=0.1973269246453848D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3008753376294316D+0 + B=0.2290726770542238D+0 + V=0.2046767775855328D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3344475596167860D+0 + B=0.2616645495370823D+0 + V=0.2107600125918040D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3675709724070786D+0 + B=0.2941150728843141D+0 + V=0.2157416362266829D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4001000887587812D+0 + B=0.3262440400919066D+0 + V=0.2197557816920721D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4318956350436028D+0 + B=0.3578835350611916D+0 + V=0.2229192611835437D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4628239056795531D+0 + B=0.3888751854043678D+0 + V=0.2253385110212775D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4927563229773636D+0 + B=0.4190678003222840D+0 + V=0.2271137107548774D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5215687136707969D+0 + B=0.4483151836883852D+0 + V=0.2283414092917525D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5491402346984905D+0 + B=0.4764740676087880D+0 + V=0.2291161673130077D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5753520160126075D+0 + B=0.5034021310998277D+0 + V=0.2295313908576598D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1388326356417754D+0 + B=0.2435436510372806D-1 + V=0.1438204721359031D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1743686900537244D+0 + B=0.5118897057342652D-1 + V=0.1607738025495257D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2099737037950268D+0 + B=0.8014695048539634D-1 + V=0.1741483853528379D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2454492590908548D+0 + B=0.1105117874155699D+0 + V=0.1851918467519151D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2807219257864278D+0 + B=0.1417950531570966D+0 + V=0.1944628638070613D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3156842271975842D+0 + B=0.1736604945719597D+0 + V=0.2022495446275152D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3502090945177752D+0 + B=0.2058466324693981D+0 + V=0.2087462382438514D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3841684849519686D+0 + B=0.2381284261195919D+0 + V=0.2141074754818308D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4174372367906016D+0 + B=0.2703031270422569D+0 + V=0.2184640913748162D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4498926465011892D+0 + B=0.3021845683091309D+0 + V=0.2219309165220329D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4814146229807701D+0 + B=0.3335993355165720D+0 + V=0.2246123118340624D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5118863625734701D+0 + B=0.3643833735518232D+0 + V=0.2266062766915125D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5411947455119144D+0 + B=0.3943789541958179D+0 + V=0.2280072952230796D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5692301500357246D+0 + B=0.4234320144403542D+0 + V=0.2289082025202583D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5958857204139576D+0 + B=0.4513897947419260D+0 + V=0.2294012695120025D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2156270284785766D+0 + B=0.2681225755444491D-1 + V=0.1722434488736947D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2532385054909710D+0 + B=0.5557495747805614D-1 + V=0.1830237421455091D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2902564617771537D+0 + B=0.8569368062950249D-1 + V=0.1923855349997633D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3266979823143256D+0 + B=0.1167367450324135D+0 + V=0.2004067861936271D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3625039627493614D+0 + B=0.1483861994003304D+0 + V=0.2071817297354263D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3975838937548699D+0 + B=0.1803821503011405D+0 + V=0.2128250834102103D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4318396099009774D+0 + B=0.2124962965666424D+0 + V=0.2174513719440102D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4651706555732742D+0 + B=0.2445221837805913D+0 + V=0.2211661839150214D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4974752649620969D+0 + B=0.2762701224322987D+0 + V=0.2240665257813102D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5286517579627517D+0 + B=0.3075627775211328D+0 + V=0.2262439516632620D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5586001195731895D+0 + B=0.3382311089826877D+0 + V=0.2277874557231869D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5872229902021319D+0 + B=0.3681108834741399D+0 + V=0.2287854314454994D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6144258616235123D+0 + B=0.3970397446872839D+0 + V=0.2293268499615575D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2951676508064861D+0 + B=0.2867499538750441D-1 + V=0.1912628201529828D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3335085485472725D+0 + B=0.5867879341903510D-1 + V=0.1992499672238701D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3709561760636381D+0 + B=0.8961099205022284D-1 + V=0.2061275533454027D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4074722861667498D+0 + B=0.1211627927626297D+0 + V=0.2119318215968572D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4429923648839117D+0 + B=0.1530748903554898D+0 + V=0.2167416581882652D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4774428052721736D+0 + B=0.1851176436721877D+0 + V=0.2206430730516600D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5107446539535904D+0 + B=0.2170829107658179D+0 + V=0.2237186938699523D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5428151370542935D+0 + B=0.2487786689026271D+0 + V=0.2260480075032884D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5735699292556964D+0 + B=0.2800239952795016D+0 + V=0.2277098884558542D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6029253794562866D+0 + B=0.3106445702878119D+0 + V=0.2287845715109671D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6307998987073145D+0 + B=0.3404689500841194D+0 + V=0.2293547268236294D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3752652273692719D+0 + B=0.2997145098184479D-1 + V=0.2056073839852528D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4135383879344028D+0 + B=0.6086725898678011D-1 + V=0.2114235865831876D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4506113885153907D+0 + B=0.9238849548435643D-1 + V=0.2163175629770551D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4864401554606072D+0 + B=0.1242786603851851D+0 + V=0.2203392158111650D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5209708076611709D+0 + B=0.1563086731483386D+0 + V=0.2235473176847839D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5541422135830122D+0 + B=0.1882696509388506D+0 + V=0.2260024141501235D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5858880915113817D+0 + B=0.2199672979126059D+0 + V=0.2277675929329182D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6161399390603444D+0 + B=0.2512165482924867D+0 + V=0.2289102112284834D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6448296482255090D+0 + B=0.2818368701871888D+0 + V=0.2295027954625118D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4544796274917948D+0 + B=0.3088970405060312D-1 + V=0.2161281589879992D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4919389072146628D+0 + B=0.6240947677636835D-1 + V=0.2201980477395102D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5279313026985183D+0 + B=0.9430706144280313D-1 + V=0.2234952066593166D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5624169925571135D+0 + B=0.1263547818770374D+0 + V=0.2260540098520838D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5953484627093287D+0 + B=0.1583430788822594D+0 + V=0.2279157981899988D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6266730715339185D+0 + B=0.1900748462555988D+0 + V=0.2291296918565571D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6563363204278871D+0 + B=0.2213599519592567D+0 + V=0.2297533752536649D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5314574716585696D+0 + B=0.3152508811515374D-1 + V=0.2234927356465995D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5674614932298185D+0 + B=0.6343865291465561D-1 + V=0.2261288012985219D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6017706004970264D+0 + B=0.9551503504223951D-1 + V=0.2280818160923688D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6343471270264178D+0 + B=0.1275440099801196D+0 + V=0.2293773295180159D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6651494599127802D+0 + B=0.1593252037671960D+0 + V=0.2300528767338634D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6050184986005704D+0 + B=0.3192538338496105D-1 + V=0.2281893855065666D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6390163550880400D+0 + B=0.6402824353962306D-1 + V=0.2295720444840727D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6711199107088448D+0 + B=0.9609805077002909D-1 + V=0.2303227649026753D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6741354429572275D+0 + B=0.3211853196273233D-1 + V=0.2304831913227114D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + N=N-1 + end subroutine LD4802 +!!*** + + SUBROUTINE LD5294(X,Y,Z,W,N) + + DOUBLE PRECISION X(5294) + DOUBLE PRECISION Y(5294) + DOUBLE PRECISION Z(5294) + DOUBLE PRECISION W(5294) + INTEGER N + DOUBLE PRECISION A,B,V +!CVW +!CVW LEBEDEV 5294-POINT ANGULAR GRID +!CVW +!chvd +!chvd This subroutine is part of a set of subroutines that generate +!chvd Lebedev grids [1-6] for integration on a sphere. The original +!chvd C-code [1] was kindly provided by Dr. Dmitri N. Laikov and +!chvd translated into fortran by Dr. Christoph van Wuellen. +!chvd This subroutine was translated using a C to fortran77 conversion +!chvd tool written by Dr. Christoph van Wuellen. +!chvd +!chvd Users of this code are asked to include reference [1] in their +!chvd publications, and in the user- and programmers-manuals +!chvd describing their codes. +!chvd +!chvd This code was distributed through CCL (http://www.ccl.net/). +!chvd +!chvd [1] V.I. Lebedev, and D.N. Laikov +!chvd "A quadrature formula for the sphere of the 131st +!chvd algebraic order of accuracy" +!chvd Doklady Mathematics, Vol. 59, No. 3, 1999, pp. 477-481. [[cite:Lebedev1999]] +!chvd +!chvd [2] V.I. Lebedev +!chvd "A quadrature formula for the sphere of 59th algebraic +!chvd order of accuracy" +!chvd Russian Acad. Sci. Dokl. Math., Vol. 50, 1995, pp. 283-286. [[cite:Lebedev1995]] +!chvd +!chvd [3] V.I. Lebedev, and A.L. Skorokhodov +!chvd "Quadrature formulas of orders 41, 47, and 53 for the sphere" +!chvd Russian Acad. Sci. Dokl. Math., Vol. 45, 1992, pp. 587-592. [[cite:Lebedev1992]] +!chvd +!chvd [4] V.I. Lebedev +!chvd "Spherical quadrature formulas exact to orders 25-29" +!chvd Siberian Mathematical Journal, Vol. 18, 1977, pp. 99-107. [[cite:Lebedev1977]] +!chvd +!chvd [5] V.I. Lebedev +!chvd "Quadratures on a sphere" +!chvd Computational Mathematics and Mathematical Physics, Vol. 16, 1976, pp. 10-24. [[cite:Lebedev1976]] +!chvd +!chvd [6] V.I. Lebedev +!chvd "Values of the nodes and weights of ninth to seventeenth +!chvd order Gauss-Markov quadrature formulae invariant under the +!chvd octahedron group with inversion" +!chvd Computational Mathematics and Mathematical Physics, Vol. 15, 1975, pp. 44-51. [[cite:Lebedev1975]] +!chvd + N=1 + V=0.9080510764308163D-4 + Call GEN_OH( 1, N, X(N), Y(N), Z(N), W(N), A, B, V) + V=0.2084824361987793D-3 + Call GEN_OH( 3, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2303261686261450D-1 + V=0.5011105657239616D-4 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3757208620162394D-1 + V=0.5942520409683854D-4 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5821912033821852D-1 + V=0.9564394826109721D-4 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.8403127529194872D-1 + V=0.1185530657126338D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1122927798060578D+0 + V=0.1364510114230331D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1420125319192987D+0 + V=0.1505828825605415D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1726396437341978D+0 + V=0.1619298749867023D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2038170058115696D+0 + V=0.1712450504267789D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2352849892876508D+0 + V=0.1789891098164999D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2668363354312461D+0 + V=0.1854474955629795D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2982941279900452D+0 + V=0.1908148636673661D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3295002922087076D+0 + V=0.1952377405281833D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3603094918363593D+0 + V=0.1988349254282232D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3905857895173920D+0 + V=0.2017079807160050D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4202005758160837D+0 + V=0.2039473082709094D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4490310061597227D+0 + V=0.2056360279288953D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4769586160311491D+0 + V=0.2068525823066865D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5038679887049750D+0 + V=0.2076724877534488D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5296454286519961D+0 + V=0.2081694278237885D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5541776207164850D+0 + V=0.2084157631219326D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5990467321921213D+0 + V=0.2084381531128593D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6191467096294587D+0 + V=0.2083476277129307D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6375251212901849D+0 + V=0.2082686194459732D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6540514381131168D+0 + V=0.2082475686112415D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6685899064391510D+0 + V=0.2083139860289915D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6810013009681648D+0 + V=0.2084745561831237D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6911469578730340D+0 + V=0.2087091313375890D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6988956915141736D+0 + V=0.2089718413297697D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.7041335794868720D+0 + V=0.2092003303479793D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.7067754398018567D+0 + V=0.2093336148263241D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3840368707853623D-1 + V=0.7591708117365267D-4 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.9835485954117399D-1 + V=0.1083383968169186D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1665774947612998D+0 + V=0.1403019395292510D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2405702335362910D+0 + V=0.1615970179286436D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3165270770189046D+0 + V=0.1771144187504911D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3927386145645443D+0 + V=0.1887760022988168D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4678825918374656D+0 + V=0.1973474670768214D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5408022024266935D+0 + V=0.2033787661234659D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6104967445752438D+0 + V=0.2072343626517331D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6760910702685738D+0 + V=0.2091177834226918D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6655644120217392D-1 + B=0.1936508874588424D-1 + V=0.9316684484675566D-4 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.9446246161270182D-1 + B=0.4252442002115869D-1 + V=0.1116193688682976D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1242651925452509D+0 + B=0.6806529315354374D-1 + V=0.1298623551559414D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1553438064846751D+0 + B=0.9560957491205369D-1 + V=0.1450236832456426D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1871137110542670D+0 + B=0.1245931657452888D+0 + V=0.1572719958149914D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2192612628836257D+0 + B=0.1545385828778978D+0 + V=0.1673234785867195D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2515682807206955D+0 + B=0.1851004249723368D+0 + V=0.1756860118725188D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2838535866287290D+0 + B=0.2160182608272384D+0 + V=0.1826776290439367D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3159578817528521D+0 + B=0.2470799012277111D+0 + V=0.1885116347992865D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3477370882791392D+0 + B=0.2781014208986402D+0 + V=0.1933457860170574D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3790576960890540D+0 + B=0.3089172523515731D+0 + V=0.1973060671902064D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4097938317810200D+0 + B=0.3393750055472244D+0 + V=0.2004987099616311D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4398256572859637D+0 + B=0.3693322470987730D+0 + V=0.2030170909281499D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4690384114718480D+0 + B=0.3986541005609877D+0 + V=0.2049461460119080D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4973216048301053D+0 + B=0.4272112491408562D+0 + V=0.2063653565200186D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5245681526132446D+0 + B=0.4548781735309936D+0 + V=0.2073507927381027D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5506733911803888D+0 + B=0.4815315355023251D+0 + V=0.2079764593256122D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5755339829522475D+0 + B=0.5070486445801855D+0 + V=0.2083150534968778D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1305472386056362D+0 + B=0.2284970375722366D-1 + V=0.1262715121590664D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1637327908216477D+0 + B=0.4812254338288384D-1 + V=0.1414386128545972D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1972734634149637D+0 + B=0.7531734457511935D-1 + V=0.1538740401313898D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2308694653110130D+0 + B=0.1039043639882017D+0 + V=0.1642434942331432D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2643899218338160D+0 + B=0.1334526587117626D+0 + V=0.1729790609237496D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2977171599622171D+0 + B=0.1636414868936382D+0 + V=0.1803505190260828D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3307293903032310D+0 + B=0.1942195406166568D+0 + V=0.1865475350079657D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3633069198219073D+0 + B=0.2249752879943753D+0 + V=0.1917182669679069D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3953346955922727D+0 + B=0.2557218821820032D+0 + V=0.1959851709034382D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4267018394184914D+0 + B=0.2862897925213193D+0 + V=0.1994529548117882D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4573009622571704D+0 + B=0.3165224536636518D+0 + V=0.2022138911146548D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4870279559856109D+0 + B=0.3462730221636496D+0 + V=0.2043518024208592D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5157819581450322D+0 + B=0.3754016870282835D+0 + V=0.2059450313018110D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5434651666465393D+0 + B=0.4037733784993613D+0 + V=0.2070685715318472D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5699823887764627D+0 + B=0.4312557784139123D+0 + V=0.2077955310694373D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5952403350947741D+0 + B=0.4577175367122110D+0 + V=0.2081980387824712D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2025152599210369D+0 + B=0.2520253617719557D-1 + V=0.1521318610377956D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2381066653274425D+0 + B=0.5223254506119000D-1 + V=0.1622772720185755D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2732823383651612D+0 + B=0.8060669688588620D-1 + V=0.1710498139420709D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3080137692611118D+0 + B=0.1099335754081255D+0 + V=0.1785911149448736D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3422405614587601D+0 + B=0.1399120955959857D+0 + V=0.1850125313687736D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3758808773890420D+0 + B=0.1702977801651705D+0 + V=0.1904229703933298D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4088458383438932D+0 + B=0.2008799256601680D+0 + V=0.1949259956121987D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4410450550841152D+0 + B=0.2314703052180836D+0 + V=0.1986161545363960D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4723879420561312D+0 + B=0.2618972111375892D+0 + V=0.2015790585641370D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5027843561874343D+0 + B=0.2920013195600270D+0 + V=0.2038934198707418D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5321453674452458D+0 + B=0.3216322555190551D+0 + V=0.2056334060538251D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5603839113834030D+0 + B=0.3506456615934198D+0 + V=0.2068705959462289D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5874150706875146D+0 + B=0.3789007181306267D+0 + V=0.2076753906106002D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6131559381660038D+0 + B=0.4062580170572782D+0 + V=0.2081179391734803D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2778497016394506D+0 + B=0.2696271276876226D-1 + V=0.1700345216228943D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3143733562261912D+0 + B=0.5523469316960465D-1 + V=0.1774906779990410D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3501485810261827D+0 + B=0.8445193201626464D-1 + V=0.1839659377002642D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3851430322303653D+0 + B=0.1143263119336083D+0 + V=0.1894987462975169D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4193013979470415D+0 + B=0.1446177898344475D+0 + V=0.1941548809452595D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4525585960458567D+0 + B=0.1751165438438091D+0 + V=0.1980078427252384D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4848447779622947D+0 + B=0.2056338306745660D+0 + V=0.2011296284744488D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5160871208276894D+0 + B=0.2359965487229226D+0 + V=0.2035888456966776D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5462112185696926D+0 + B=0.2660430223139146D+0 + V=0.2054516325352142D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5751425068101757D+0 + B=0.2956193664498032D+0 + V=0.2067831033092635D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6028073872853596D+0 + B=0.3245763905312779D+0 + V=0.2076485320284876D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6291338275278409D+0 + B=0.3527670026206972D+0 + V=0.2081141439525255D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3541797528439391D+0 + B=0.2823853479435550D-1 + V=0.1834383015469222D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3908234972074657D+0 + B=0.5741296374713106D-1 + V=0.1889540591777677D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4264408450107590D+0 + B=0.8724646633650199D-1 + V=0.1936677023597375D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4609949666553286D+0 + B=0.1175034422915616D+0 + V=0.1976176495066504D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4944389496536006D+0 + B=0.1479755652628428D+0 + V=0.2008536004560983D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5267194884346086D+0 + B=0.1784740659484352D+0 + V=0.2034280351712291D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5577787810220990D+0 + B=0.2088245700431244D+0 + V=0.2053944466027758D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5875563763536670D+0 + B=0.2388628136570763D+0 + V=0.2068077642882360D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6159910016391269D+0 + B=0.2684308928769185D+0 + V=0.2077250949661599D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6430219602956268D+0 + B=0.2973740761960252D+0 + V=0.2082062440705320D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4300647036213646D+0 + B=0.2916399920493977D-1 + V=0.1934374486546626D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4661486308935531D+0 + B=0.5898803024755659D-1 + V=0.1974107010484300D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5009658555287261D+0 + B=0.8924162698525409D-1 + V=0.2007129290388658D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5344824270447704D+0 + B=0.1197185199637321D+0 + V=0.2033736947471293D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5666575997416371D+0 + B=0.1502300756161382D+0 + V=0.2054287125902493D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5974457471404752D+0 + B=0.1806004191913564D+0 + V=0.2069184936818894D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6267984444116886D+0 + B=0.2106621764786252D+0 + V=0.2078883689808782D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6546664713575417D+0 + B=0.2402526932671914D+0 + V=0.2083886366116359D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5042711004437253D+0 + B=0.2982529203607657D-1 + V=0.2006593275470817D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5392127456774380D+0 + B=0.6008728062339922D-1 + V=0.2033728426135397D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5726819437668618D+0 + B=0.9058227674571398D-1 + V=0.2055008781377608D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6046469254207278D+0 + B=0.1211219235803400D+0 + V=0.2070651783518502D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6350716157434952D+0 + B=0.1515286404791580D+0 + V=0.2080953335094320D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6639177679185454D+0 + B=0.1816314681255552D+0 + V=0.2086284998988521D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5757276040972253D+0 + B=0.3026991752575440D-1 + V=0.2055549387644668D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6090265823139755D+0 + B=0.6078402297870770D-1 + V=0.2071871850267654D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6406735344387661D+0 + B=0.9135459984176636D-1 + V=0.2082856600431965D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6706397927793709D+0 + B=0.1218024155966590D+0 + V=0.2088705858819358D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6435019674426665D+0 + B=0.3052608357660639D-1 + V=0.2083995867536322D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6747218676375681D+0 + B=0.6112185773983089D-1 + V=0.2090509712889637D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + N=N-1 + end subroutine LD5294 +!!*** + + SUBROUTINE LD5810(X,Y,Z,W,N) + + DOUBLE PRECISION X(5810) + DOUBLE PRECISION Y(5810) + DOUBLE PRECISION Z(5810) + DOUBLE PRECISION W(5810) + INTEGER N + DOUBLE PRECISION A,B,V +!CVW +!CVW LEBEDEV 5810-POINT ANGULAR GRID +!CVW +!chvd +!chvd This subroutine is part of a set of subroutines that generate +!chvd Lebedev grids [1-6] for integration on a sphere. The original +!chvd C-code [1] was kindly provided by Dr. Dmitri N. Laikov and +!chvd translated into fortran by Dr. Christoph van Wuellen. +!chvd This subroutine was translated using a C to fortran77 conversion +!chvd tool written by Dr. Christoph van Wuellen. +!chvd +!chvd Users of this code are asked to include reference [1] in their +!chvd publications, and in the user- and programmers-manuals +!chvd describing their codes. +!chvd +!chvd This code was distributed through CCL (http://www.ccl.net/). +!chvd +!chvd [1] V.I. Lebedev, and D.N. Laikov +!chvd "A quadrature formula for the sphere of the 131st +!chvd algebraic order of accuracy" +!chvd Doklady Mathematics, Vol. 59, No. 3, 1999, pp. 477-481. [[cite:Lebedev1999]] +!chvd +!chvd [2] V.I. Lebedev +!chvd "A quadrature formula for the sphere of 59th algebraic +!chvd order of accuracy" +!chvd Russian Acad. Sci. Dokl. Math., Vol. 50, 1995, pp. 283-286. [[cite:Lebedev1995]] +!chvd +!chvd [3] V.I. Lebedev, and A.L. Skorokhodov +!chvd "Quadrature formulas of orders 41, 47, and 53 for the sphere" +!chvd Russian Acad. Sci. Dokl. Math., Vol. 45, 1992, pp. 587-592. [[cite:Lebedev1992]] +!chvd +!chvd [4] V.I. Lebedev +!chvd "Spherical quadrature formulas exact to orders 25-29" +!chvd Siberian Mathematical Journal, Vol. 18, 1977, pp. 99-107. [[cite:Lebedev1977]] +!chvd +!chvd [5] V.I. Lebedev +!chvd "Quadratures on a sphere" +!chvd Computational Mathematics and Mathematical Physics, Vol. 16, 1976, pp. 10-24. [[cite:Lebedev1976]] +!chvd +!chvd [6] V.I. Lebedev +!chvd "Values of the nodes and weights of ninth to seventeenth +!chvd order Gauss-Markov quadrature formulae invariant under the +!chvd octahedron group with inversion" +!chvd Computational Mathematics and Mathematical Physics, Vol. 15, 1975, pp. 44-51. [[cite:Lebedev1975]] +!chvd + N=1 + V=0.9735347946175486D-5 + Call GEN_OH( 1, N, X(N), Y(N), Z(N), W(N), A, B, V) + V=0.1907581241803167D-3 + Call GEN_OH( 2, N, X(N), Y(N), Z(N), W(N), A, B, V) + V=0.1901059546737578D-3 + Call GEN_OH( 3, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1182361662400277D-1 + V=0.3926424538919212D-4 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3062145009138958D-1 + V=0.6667905467294382D-4 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5329794036834243D-1 + V=0.8868891315019135D-4 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.7848165532862220D-1 + V=0.1066306000958872D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1054038157636201D+0 + V=0.1214506743336128D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1335577797766211D+0 + V=0.1338054681640871D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1625769955502252D+0 + V=0.1441677023628504D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1921787193412792D+0 + V=0.1528880200826557D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2221340534690548D+0 + V=0.1602330623773609D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2522504912791132D+0 + V=0.1664102653445244D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2823610860679697D+0 + V=0.1715845854011323D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3123173966267560D+0 + V=0.1758901000133069D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3419847036953789D+0 + V=0.1794382485256736D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3712386456999758D+0 + V=0.1823238106757407D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3999627649876828D+0 + V=0.1846293252959976D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4280466458648093D+0 + V=0.1864284079323098D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4553844360185711D+0 + V=0.1877882694626914D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4818736094437834D+0 + V=0.1887716321852025D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5074138709260629D+0 + V=0.1894381638175673D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5319061304570707D+0 + V=0.1898454899533629D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5552514978677286D+0 + V=0.1900497929577815D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5981009025246183D+0 + V=0.1900671501924092D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6173990192228116D+0 + V=0.1899837555533510D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6351365239411131D+0 + V=0.1899014113156229D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6512010228227200D+0 + V=0.1898581257705106D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6654758363948120D+0 + V=0.1898804756095753D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6778410414853370D+0 + V=0.1899793610426402D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6881760887484110D+0 + V=0.1901464554844117D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6963645267094598D+0 + V=0.1903533246259542D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.7023010617153579D+0 + V=0.1905556158463228D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.7059004636628753D+0 + V=0.1907037155663528D-3 + Call GEN_OH( 4, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3552470312472575D-1 + V=0.5992997844249967D-4 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.9151176620841283D-1 + V=0.9749059382456978D-4 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1566197930068980D+0 + V=0.1241680804599158D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2265467599271907D+0 + V=0.1437626154299360D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2988242318581361D+0 + V=0.1584200054793902D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3717482419703886D+0 + V=0.1694436550982744D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4440094491758889D+0 + V=0.1776617014018108D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5145337096756642D+0 + V=0.1836132434440077D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5824053672860230D+0 + V=0.1876494727075983D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6468283961043370D+0 + V=0.1899906535336482D-3 + Call GEN_OH( 5, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6095964259104373D-1 + B=0.1787828275342931D-1 + V=0.8143252820767350D-4 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.8811962270959388D-1 + B=0.3953888740792096D-1 + V=0.9998859890887728D-4 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1165936722428831D+0 + B=0.6378121797722990D-1 + V=0.1156199403068359D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1460232857031785D+0 + B=0.8985890813745037D-1 + V=0.1287632092635513D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1761197110181755D+0 + B=0.1172606510576162D+0 + V=0.1398378643365139D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2066471190463718D+0 + B=0.1456102876970995D+0 + V=0.1491876468417391D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2374076026328152D+0 + B=0.1746153823011775D+0 + V=0.1570855679175456D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2682305474337051D+0 + B=0.2040383070295584D+0 + V=0.1637483948103775D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2989653312142369D+0 + B=0.2336788634003698D+0 + V=0.1693500566632843D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3294762752772209D+0 + B=0.2633632752654219D+0 + V=0.1740322769393633D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3596390887276086D+0 + B=0.2929369098051601D+0 + V=0.1779126637278296D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3893383046398812D+0 + B=0.3222592785275512D+0 + V=0.1810908108835412D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4184653789358347D+0 + B=0.3512004791195743D+0 + V=0.1836529132600190D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4469172319076166D+0 + B=0.3796385677684537D+0 + V=0.1856752841777379D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4745950813276976D+0 + B=0.4074575378263879D+0 + V=0.1872270566606832D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5014034601410262D+0 + B=0.4345456906027828D+0 + V=0.1883722645591307D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5272493404551239D+0 + B=0.4607942515205134D+0 + V=0.1891714324525297D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5520413051846366D+0 + B=0.4860961284181720D+0 + V=0.1896827480450146D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5756887237503077D+0 + B=0.5103447395342790D+0 + V=0.1899628417059528D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1225039430588352D+0 + B=0.2136455922655793D-1 + V=0.1123301829001669D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1539113217321372D+0 + B=0.4520926166137188D-1 + V=0.1253698826711277D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1856213098637712D+0 + B=0.7086468177864818D-1 + V=0.1366266117678531D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2174998728035131D+0 + B=0.9785239488772918D-1 + V=0.1462736856106918D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2494128336938330D+0 + B=0.1258106396267210D+0 + V=0.1545076466685412D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2812321562143480D+0 + B=0.1544529125047001D+0 + V=0.1615096280814007D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3128372276456111D+0 + B=0.1835433512202753D+0 + V=0.1674366639741759D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3441145160177973D+0 + B=0.2128813258619585D+0 + V=0.1724225002437900D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3749567714853510D+0 + B=0.2422913734880829D+0 + V=0.1765810822987288D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4052621732015610D+0 + B=0.2716163748391453D+0 + V=0.1800104126010751D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4349335453522385D+0 + B=0.3007127671240280D+0 + V=0.1827960437331284D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4638776641524965D+0 + B=0.3294470677216479D+0 + V=0.1850140300716308D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4920046410462687D+0 + B=0.3576932543699155D+0 + V=0.1867333507394938D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5192273554861704D+0 + B=0.3853307059757764D+0 + V=0.1880178688638289D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5454609081136522D+0 + B=0.4122425044452694D+0 + V=0.1889278925654758D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5706220661424140D+0 + B=0.4383139587781027D+0 + V=0.1895213832507346D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5946286755181518D+0 + B=0.4634312536300553D+0 + V=0.1898548277397420D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.1905370790924295D+0 + B=0.2371311537781979D-1 + V=0.1349105935937341D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2242518717748009D+0 + B=0.4917878059254806D-1 + V=0.1444060068369326D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2577190808025936D+0 + B=0.7595498960495142D-1 + V=0.1526797390930008D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2908724534927187D+0 + B=0.1036991083191100D+0 + V=0.1598208771406474D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3236354020056219D+0 + B=0.1321348584450234D+0 + V=0.1659354368615331D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3559267359304543D+0 + B=0.1610316571314789D+0 + V=0.1711279910946440D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3876637123676956D+0 + B=0.1901912080395707D+0 + V=0.1754952725601440D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4187636705218842D+0 + B=0.2194384950137950D+0 + V=0.1791247850802529D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4491449019883107D+0 + B=0.2486155334763858D+0 + V=0.1820954300877716D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4787270932425445D+0 + B=0.2775768931812335D+0 + V=0.1844788524548449D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5074315153055574D+0 + B=0.3061863786591120D+0 + V=0.1863409481706220D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5351810507738336D+0 + B=0.3343144718152556D+0 + V=0.1877433008795068D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5619001025975381D+0 + B=0.3618362729028427D+0 + V=0.1887444543705232D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5875144035268046D+0 + B=0.3886297583620408D+0 + V=0.1894009829375006D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6119507308734495D+0 + B=0.4145742277792031D+0 + V=0.1897683345035198D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2619733870119463D+0 + B=0.2540047186389353D-1 + V=0.1517327037467653D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.2968149743237949D+0 + B=0.5208107018543989D-1 + V=0.1587740557483543D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3310451504860488D+0 + B=0.7971828470885599D-1 + V=0.1649093382274097D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3646215567376676D+0 + B=0.1080465999177927D+0 + V=0.1701915216193265D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3974916785279360D+0 + B=0.1368413849366629D+0 + V=0.1746847753144065D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4295967403772029D+0 + B=0.1659073184763559D+0 + V=0.1784555512007570D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4608742854473447D+0 + B=0.1950703730454614D+0 + V=0.1815687562112174D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4912598858949903D+0 + B=0.2241721144376724D+0 + V=0.1840864370663302D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5206882758945558D+0 + B=0.2530655255406489D+0 + V=0.1860676785390006D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5490940914019819D+0 + B=0.2816118409731066D+0 + V=0.1875690583743703D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5764123302025542D+0 + B=0.3096780504593238D+0 + V=0.1886453236347225D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6025786004213506D+0 + B=0.3371348366394987D+0 + V=0.1893501123329645D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6275291964794956D+0 + B=0.3638547827694396D+0 + V=0.1897366184519868D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3348189479861771D+0 + B=0.2664841935537443D-1 + V=0.1643908815152736D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.3699515545855295D+0 + B=0.5424000066843495D-1 + V=0.1696300350907768D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4042003071474669D+0 + B=0.8251992715430854D-1 + V=0.1741553103844483D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4375320100182624D+0 + B=0.1112695182483710D+0 + V=0.1780015282386092D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4699054490335947D+0 + B=0.1402964116467816D+0 + V=0.1812116787077125D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5012739879431952D+0 + B=0.1694275117584291D+0 + V=0.1838323158085421D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5315874883754966D+0 + B=0.1985038235312689D+0 + V=0.1859113119837737D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5607937109622117D+0 + B=0.2273765660020893D+0 + V=0.1874969220221698D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5888393223495521D+0 + B=0.2559041492849764D+0 + V=0.1886375612681076D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6156705979160163D+0 + B=0.2839497251976899D+0 + V=0.1893819575809276D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6412338809078123D+0 + B=0.3113791060500690D+0 + V=0.1897794748256767D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4076051259257167D+0 + B=0.2757792290858463D-1 + V=0.1738963926584846D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4423788125791520D+0 + B=0.5584136834984293D-1 + V=0.1777442359873466D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4760480917328258D+0 + B=0.8457772087727143D-1 + V=0.1810010815068719D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5085838725946297D+0 + B=0.1135975846359248D+0 + V=0.1836920318248129D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5399513637391218D+0 + B=0.1427286904765053D+0 + V=0.1858489473214328D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5701118433636380D+0 + B=0.1718112740057635D+0 + V=0.1875079342496592D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5990240530606021D+0 + B=0.2006944855985351D+0 + V=0.1887080239102310D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6266452685139695D+0 + B=0.2292335090598907D+0 + V=0.1894905752176822D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6529320971415942D+0 + B=0.2572871512353714D+0 + V=0.1898991061200695D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.4791583834610126D+0 + B=0.2826094197735932D-1 + V=0.1809065016458791D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5130373952796940D+0 + B=0.5699871359683649D-1 + V=0.1836297121596799D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5456252429628476D+0 + B=0.8602712528554394D-1 + V=0.1858426916241869D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5768956329682385D+0 + B=0.1151748137221281D+0 + V=0.1875654101134641D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6068186944699046D+0 + B=0.1442811654136362D+0 + V=0.1888240751833503D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6353622248024907D+0 + B=0.1731930321657680D+0 + V=0.1896497383866979D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6624927035731797D+0 + B=0.2017619958756061D+0 + V=0.1900775530219121D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5484933508028488D+0 + B=0.2874219755907391D-1 + V=0.1858525041478814D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.5810207682142106D+0 + B=0.5778312123713695D-1 + V=0.1876248690077947D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6120955197181352D+0 + B=0.8695262371439526D-1 + V=0.1889404439064607D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6416944284294319D+0 + B=0.1160893767057166D+0 + V=0.1898168539265290D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6697926391731260D+0 + B=0.1450378826743251D+0 + V=0.1902779940661772D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6147594390585488D+0 + B=0.2904957622341456D-1 + V=0.1890125641731815D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6455390026356783D+0 + B=0.5823809152617197D-1 + V=0.1899434637795751D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6747258588365477D+0 + B=0.8740384899884715D-1 + V=0.1904520856831751D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + A=0.6772135750395347D+0 + B=0.2919946135808105D-1 + V=0.1905534498734563D-3 + Call GEN_OH( 6, N, X(N), Y(N), Z(N), W(N), A, B, V) + N=N-1 +end subroutine LD5810 +!!*** + +END MODULE m_lebedev +!!*** diff --git a/GX-PAW/common/src/28_numeric_noabirule/m_lebedev.o b/GX-PAW/common/src/28_numeric_noabirule/m_lebedev.o new file mode 100644 index 00000000..594cd8af Binary files /dev/null and b/GX-PAW/common/src/28_numeric_noabirule/m_lebedev.o differ diff --git a/GX-PAW/common/src/28_numeric_noabirule/m_levenberg_marquardt.F90 b/GX-PAW/common/src/28_numeric_noabirule/m_levenberg_marquardt.F90 new file mode 100644 index 00000000..0fa368fd --- /dev/null +++ b/GX-PAW/common/src/28_numeric_noabirule/m_levenberg_marquardt.F90 @@ -0,0 +1,1608 @@ +!!****m* ABINIT/m_levenberg_marquardt +!! NAME +!! m_levenberg_marquardt +!! +!! FUNCTION +!! Module containing routines for performing Levenberg-Marquardt +!! nonlinear least-squares fit. These routines are the conversions +!! to F90 of the Minpack F77 routines by Alan Miller +!! +!! TODO: For some reason, the routine lmder, which uses analytic +!! evaluation of the Jacobian, did not work in testing (bug?). +!! lmdif proved stable, but potentially uses more funtion +!! evaluations. +!! +!! COPYRIGHT +!! Copyright (C) 2008-2024 ABINIT group (MS) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" + +module m_levenberg_marquardt + + use defs_basis + use m_abicore +! MINPACK routines which are used by both LMDIF & LMDER +! 25 October 2001: +! Changed INTENT of iflag in several places to IN OUT. +! Changed INTENT of fvec to IN OUT in user routine FCN. +! Removed arguments diag and qtv from LMDIF & LMDER. +! Replaced several DO loops with array operations. +! amiller @ bigpond.net.au + + implicit none + + private + + public :: lmdif1 + public :: lmdif + public :: lm_fit_print_info + +CONTAINS !============================================================================== +!!*** + +!!****f* m_levenberg_marquardt/lmdif1 +!! NAME +!! +!! FUNCTION +!! +!! INPUTS +!! +!! OUTPUT +!! +!! NOTES +!! +!! SOURCE + + subroutine lmdif1(fcn, m, n, x, fvec, tol, info, iwa) + + ! code converted using to_f90 by alan miller + ! date: 1999-12-11 time: 00:51:44 + + ! n.b. arguments wa & lwa have been removed. + integer, intent(in) :: m + integer, intent(in) :: n + real (dp), intent(in out) :: x(:) + real (dp), intent(out) :: fvec(:) + real (dp), intent(in) :: tol + integer, intent(out) :: info + integer, intent(out) :: iwa(:) + + ! external fcn + + interface + subroutine fcn(m, n, x, fvec, iflag, y, nfqre, nfqim, bsign, csign, multi_x_exp) + implicit none + integer, parameter :: dp = KIND(1.0d0) + integer, intent(in) :: m, n + real (dp), intent(in) :: x(n) + real (dp), intent(in out) :: fvec(m) + integer, intent(in out) :: iflag + integer, optional, intent(in) :: nfqre,nfqim,bsign,csign,multi_x_exp + real (dp), optional, intent(in) :: y(m) + end subroutine fcn + end interface + + ! ********** + + ! subroutine lmdif1 + + ! The purpose of lmdif1 is to minimize the sum of the squares of m nonlinear + ! functions in n variables by a modification of the Levenberg-Marquardt + ! algorithm. This is done by using the more general least-squares + ! solver lmdif. The user must provide a subroutine which calculates the + ! functions. The jacobian is then calculated by a forward-difference + ! approximation. + + ! the subroutine statement is + + ! subroutine lmdif1(fcn, m, n, x, fvec, tol, info, iwa) + + ! where + + ! fcn is the name of the user-supplied subroutine which calculates + ! the functions. fcn must be declared in an external statement in the + ! user calling program, and should be written as follows. + + ! subroutine fcn(m, n, x, fvec, iflag) + ! integer m, n, iflag + ! REAL (dp) x(n), fvec(m) + ! ---------- + ! calculate the functions at x and return this vector in fvec. + ! ---------- + ! return + ! end + + ! the value of iflag should not be changed by fcn unless + ! the user wants to terminate execution of lmdif1. + ! In this case set iflag to a negative integer. + + ! m is a positive integer input variable set to the number of functions. + + ! n is a positive integer input variable set to the number of variables. + ! n must not exceed m. + + ! x is an array of length n. On input x must contain an initial estimate + ! of the solution vector. On output x contains the final estimate of + ! the solution vector. + + ! fvec is an output array of length m which contains + ! the functions evaluated at the output x. + + ! tol is a nonnegative input variable. Termination occurs when the + ! algorithm estimates either that the relative error in the sum of + ! squares is at most tol or that the relative error between x and the + ! solution is at most tol. + + ! info is an integer output variable. If the user has terminated execution, + ! info is set to the (negative) value of iflag. See description of fcn. + ! Otherwise, info is set as follows. + + ! info = 0 improper input parameters. + + ! info = 1 algorithm estimates that the relative error + ! in the sum of squares is at most tol. + + ! info = 2 algorithm estimates that the relative error + ! between x and the solution is at most tol. + + ! info = 3 conditions for info = 1 and info = 2 both hold. + + ! info = 4 fvec is orthogonal to the columns of the + ! jacobian to machine precision. + + ! info = 5 number of calls to fcn has reached or exceeded 200*(n+1). + + ! info = 6 tol is too small. no further reduction in + ! the sum of squares is possible. + + ! info = 7 tol is too small. No further improvement in + ! the approximate solution x is possible. + + ! iwa is an integer work array of length n. + + ! wa is a work array of length lwa. + + ! lwa is a positive integer input variable not less than m*n+5*n+m. + + ! subprograms called + + ! user-supplied ...... fcn + + ! minpack-supplied ... lmdif + + ! argonne national laboratory. minpack project. march 1980. + ! burton s. garbow, kenneth e. hillstrom, jorge j. more + + ! ********** + integer :: maxfev, mode, nfev, nprint + real (dp) :: epsfcn, ftol, gtol, xtol, fjac(m,n) + real (dp), parameter :: factor = 100._dp , zero = 0.0_dp + + info = 0 + + ! check the input parameters for errors. + + IF (n <= 0 .OR. m < n .OR. tol < zero) GO TO 10 + + ! call lmdif. + + maxfev = 200*(n + 1) + ftol = tol + xtol = tol + gtol = zero + epsfcn = zero + mode = 1 + nprint = 0 + CALL lmdif(fcn, m, n, x, fvec, ftol, xtol, gtol, maxfev, epsfcn, & +& mode, factor, nprint, info, nfev, fjac, iwa) + IF (info == 8) info = 4 + + 10 RETURN + + ! last card of subroutine lmdif1. + + end subroutine lmdif1 +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_levenberg_marquardt/lmdif +!! NAME +!! +!! FUNCTION +!! +!! INPUTS +!! +!! OUTPUT +!! +!! NOTES +!! +!! SOURCE + + SUBROUTINE lmdif(fcn, m, n, x, fvec, ftol, xtol, gtol, maxfev, epsfcn, & + mode, factor, nprint, info, nfev, fjac, ipvt) + + ! N.B. Arguments LDFJAC, DIAG, QTF, WA1, WA2, WA3 & WA4 have been removed. + integer, intent(in) :: m + integer, intent(in) :: n + real (dp), intent(in out) :: x(:) + real (dp), intent(out) :: fvec(:) + real (dp), intent(in) :: ftol + real (dp), intent(in) :: xtol + real (dp), intent(in out) :: gtol + integer, intent(in out) :: maxfev + real (dp), intent(in out) :: epsfcn + integer, intent(in) :: mode + real (dp), intent(in) :: factor + integer, intent(in) :: nprint + integer, intent(out) :: info + integer, intent(out) :: nfev + real (dp), intent(out) :: fjac(:,:) ! fjac(ldfjac,n) + integer, intent(out) :: ipvt(:) + + ! external fcn + + interface + subroutine fcn(m, n, x, fvec, iflag, y, nfqre, nfqim, bsign, csign, multi_x_exp) + implicit none + integer, parameter :: dp = KIND(1.0d0) + integer, intent(in) :: m, n + real (dp), intent(in) :: x(n) + real (dp), intent(in out) :: fvec(m) + integer, intent(in out) :: iflag + integer, optional, intent(in) :: nfqre,nfqim,bsign,csign,multi_x_exp + real (dp), optional, intent(in) :: y(m) + end subroutine fcn + end interface + + ! ********** + + ! subroutine lmdif + + ! The purpose of lmdif is to minimize the sum of the squares of m nonlinear + ! functions in n variables by a modification of the Levenberg-Marquardt + ! algorithm. The user must provide a subroutine which calculates the + ! functions. The jacobian is then calculated by a forward-difference + ! approximation. + + ! the subroutine statement is + + ! subroutine lmdif(fcn, m, n, x, fvec, ftol, xtol, gtol, maxfev, epsfcn, + ! diag, mode, factor, nprint, info, nfev, fjac, + ! ldfjac, ipvt, qtf, wa1, wa2, wa3, wa4) + + ! N.B. 7 of these arguments have been removed in this version. + + ! where + + ! fcn is the name of the user-supplied subroutine which calculates the + ! functions. fcn must be declared in an external statement in the user + ! calling program, and should be written as follows. + + ! subroutine fcn(m, n, x, fvec, iflag) + ! integer m, n, iflag + ! REAL (dp) x(:), fvec(m) + ! ---------- + ! calculate the functions at x and return this vector in fvec. + ! ---------- + ! return + ! end + + ! the value of iflag should not be changed by fcn unless + ! the user wants to terminate execution of lmdif. + ! in this case set iflag to a negative integer. + + ! m is a positive integer input variable set to the number of functions. + + ! n is a positive integer input variable set to the number of variables. + ! n must not exceed m. + + ! x is an array of length n. On input x must contain an initial estimate + ! of the solution vector. On output x contains the final estimate of the + ! solution vector. + + ! fvec is an output array of length m which contains + ! the functions evaluated at the output x. + + ! ftol is a nonnegative input variable. Termination occurs when both the + ! actual and predicted relative reductions in the sum of squares are at + ! most ftol. Therefore, ftol measures the relative error desired + ! in the sum of squares. + + ! xtol is a nonnegative input variable. Termination occurs when the + ! relative error between two consecutive iterates is at most xtol. + ! Therefore, xtol measures the relative error desired in the approximate + ! solution. + + ! gtol is a nonnegative input variable. Termination occurs when the cosine + ! of the angle between fvec and any column of the jacobian is at most + ! gtol in absolute value. Therefore, gtol measures the orthogonality + ! desired between the function vector and the columns of the jacobian. + + ! maxfev is a positive integer input variable. Termination occurs when the + ! number of calls to fcn is at least maxfev by the end of an iteration. + + ! epsfcn is an input variable used in determining a suitable step length + ! for the forward-difference approximation. This approximation assumes + ! that the relative errors in the functions are of the order of epsfcn. + ! If epsfcn is less than the machine precision, it is assumed that the + ! relative errors in the functions are of the order of the machine + ! precision. + + ! diag is an array of length n. If mode = 1 (see below), diag is + ! internally set. If mode = 2, diag must contain positive entries that + ! serve as multiplicative scale factors for the variables. + + ! mode is an integer input variable. If mode = 1, the variables will be + ! scaled internally. If mode = 2, the scaling is specified by the input + ! diag. other values of mode are equivalent to mode = 1. + + ! factor is a positive input variable used in determining the initial step + ! bound. This bound is set to the product of factor and the euclidean + ! norm of diag*x if nonzero, or else to factor itself. In most cases + ! factor should lie in the interval (.1,100.). 100. is a generally + ! recommended value. + + ! nprint is an integer input variable that enables controlled printing of + ! iterates if it is positive. In this case, fcn is called with iflag = 0 + ! at the beginning of the first iteration and every nprint iterations + ! thereafter and immediately prior to return, with x and fvec available + ! for printing. If nprint is not positive, no special calls + ! of fcn with iflag = 0 are made. + + ! info is an integer output variable. If the user has terminated + ! execution, info is set to the (negative) value of iflag. + ! See description of fcn. Otherwise, info is set as follows. + + ! info = 0 improper input parameters. + + ! info = 1 both actual and predicted relative reductions + ! in the sum of squares are at most ftol. + + ! info = 2 relative error between two consecutive iterates <= xtol. + + ! info = 3 conditions for info = 1 and info = 2 both hold. + + ! info = 4 the cosine of the angle between fvec and any column of + ! the Jacobian is at most gtol in absolute value. + + ! info = 5 number of calls to fcn has reached or exceeded maxfev. + + ! info = 6 ftol is too small. no further reduction in + ! the sum of squares is possible. + + ! info = 7 xtol is too small. no further improvement in + ! the approximate solution x is possible. + + ! info = 8 gtol is too small. fvec is orthogonal to the + ! columns of the jacobian to machine precision. + + ! nfev is an integer output variable set to the number of calls to fcn. + + ! fjac is an output m by n array. the upper n by n submatrix + ! of fjac contains an upper triangular matrix r with + ! diagonal elements of nonincreasing magnitude such that + + ! t t t + ! p *(jac *jac)*p = r *r, + + ! where p is a permutation matrix and jac is the final calculated + ! Jacobian. Column j of p is column ipvt(j) (see below) of the + ! identity matrix. the lower trapezoidal part of fjac contains + ! information generated during the computation of r. + + ! ldfjac is a positive integer input variable not less than m + ! which specifies the leading dimension of the array fjac. + + ! ipvt is an integer output array of length n. ipvt defines a permutation + ! matrix p such that jac*p = q*r, where jac is the final calculated + ! jacobian, q is orthogonal (not stored), and r is upper triangular + ! with diagonal elements of nonincreasing magnitude. + ! Column j of p is column ipvt(j) of the identity matrix. + + ! qtf is an output array of length n which contains + ! the first n elements of the vector (q transpose)*fvec. + + ! wa1, wa2, and wa3 are work arrays of length n. + + ! wa4 is a work array of length m. + + ! subprograms called + + ! user-supplied ...... fcn + + ! minpack-supplied ... dpmpar,enorm,fdjac2,lmpar,qrfac + + ! fortran-supplied ... dabs,dmax1,dmin1,dsqrt,mod + + ! argonne national laboratory. minpack project. march 1980. + ! burton s. garbow, kenneth e. hillstrom, jorge j. more + + ! ********** + integer :: i, iflag, iter, j, l + real (dp) :: actred, delta, dirder, epsmch, fnorm, fnorm1, gnorm + real(dp) :: par, pnorm, prered, ratio, sum, temp, temp1, temp2, xnorm + real (dp) :: diag(n), qtf(n), wa1(n), wa2(n), wa3(n), wa4(m) + real (dp), parameter :: one = 1.0_dp, p1 = 0.1_dp, p5 = 0.5_dp + real(dp),parameter :: p25 = 0.25_dp, p75 = 0.75_dp, p0001 = 0.0001_dp, zero = 0.0_dp + + ! epsmch is the machine precision. + + epsmch = EPSILON(zero) + + info = 0 + iflag = 0 + nfev = 0 + + ! check the input parameters for errors. + + IF (n <= 0 .OR. m < n .OR. ftol < zero .OR. xtol < zero .OR. gtol < zero & +& .OR. maxfev <= 0 .OR. factor <= zero) GO TO 300 + IF (mode /= 2) GO TO 20 + DO j = 1, n + IF (diag(j) <= zero) GO TO 300 + END DO + + ! evaluate the function at the starting point and calculate its norm. + + 20 iflag = 1 + CALL fcn(m, n, x, fvec, iflag) + nfev = 1 + IF (iflag < 0) GO TO 300 + fnorm = enorm(m, fvec) + + ! initialize levenberg-marquardt parameter and iteration counter. + + par = zero + iter = 1 + + ! beginning of the outer loop. + + ! calculate the jacobian matrix. + + 30 iflag = 2 + CALL fdjac2(fcn, m, n, x, fvec, fjac, iflag, epsfcn) + nfev = nfev + n + IF (iflag < 0) GO TO 300 + + ! If requested, call fcn to enable printing of iterates. + + IF (nprint <= 0) GO TO 40 + iflag = 0 + IF (MOD(iter-1,nprint) == 0) THEN + CALL fcn(m, n, x, fvec, iflag) + END IF + IF (iflag < 0) GO TO 300 + + ! Compute the qr factorization of the jacobian. + + 40 CALL qrfac(m, n, fjac, .true., ipvt, wa1, wa2) + + ! On the first iteration and if mode is 1, scale according + ! to the norms of the columns of the initial jacobian. + + IF (iter /= 1) GO TO 80 + IF (mode == 2) GO TO 60 + DO j = 1, n + diag(j) = wa2(j) + IF (wa2(j) == zero) diag(j) = one + END DO + + ! On the first iteration, calculate the norm of the scaled x + ! and initialize the step bound delta. + + 60 wa3(1:n) = diag(1:n)*x(1:n) + xnorm = enorm(n, wa3) + delta = factor*xnorm + IF (delta == zero) delta = factor + + ! Form (q transpose)*fvec and store the first n components in qtf. + + 80 wa4(1:m) = fvec(1:m) + DO j = 1, n + IF (fjac(j,j) == zero) GO TO 120 + sum = DOT_PRODUCT( fjac(j:m,j), wa4(j:m) ) + temp = -sum/fjac(j,j) + DO i = j, m + wa4(i) = wa4(i) + fjac(i,j)*temp + END DO + 120 fjac(j,j) = wa1(j) + qtf(j) = wa4(j) + END DO + + ! compute the norm of the scaled gradient. + + gnorm = zero + IF (fnorm == zero) GO TO 170 + DO j = 1, n + l = ipvt(j) + IF (wa2(l) == zero) CYCLE + sum = zero + DO i = 1, j + sum = sum + fjac(i,j)*(qtf(i)/fnorm) + END DO + gnorm = MAX(gnorm, ABS(sum/wa2(l))) + END DO + + ! test for convergence of the gradient norm. + + 170 IF (gnorm <= gtol) info = 4 + IF (info /= 0) GO TO 300 + + ! rescale if necessary. + + IF (mode == 2) GO TO 200 + DO j = 1, n + diag(j) = MAX(diag(j), wa2(j)) + END DO + + ! beginning of the inner loop. + + ! determine the Levenberg-Marquardt parameter. + + 200 CALL lmpar(n, fjac, ipvt, diag, qtf, delta, par, wa1, wa2) + + ! store the direction p and x + p. calculate the norm of p. + + DO j = 1, n + wa1(j) = -wa1(j) + wa2(j) = x(j) + wa1(j) + wa3(j) = diag(j)*wa1(j) + END DO + pnorm = enorm(n, wa3) + + ! on the first iteration, adjust the initial step bound. + + IF (iter == 1) delta = MIN(delta, pnorm) + + ! evaluate the function at x + p and calculate its norm. + + iflag = 1 + CALL fcn(m, n, wa2, wa4, iflag) + nfev = nfev + 1 + IF (iflag < 0) GO TO 300 + fnorm1 = enorm(m, wa4) + + ! compute the scaled actual reduction. + + actred = -one + IF (p1*fnorm1 < fnorm) actred = one - (fnorm1/fnorm)**2 + + ! Compute the scaled predicted reduction and + ! the scaled directional derivative. + + DO j = 1, n + wa3(j) = zero + l = ipvt(j) + temp = wa1(l) + DO i = 1, j + wa3(i) = wa3(i) + fjac(i,j)*temp + END DO + END DO + temp1 = enorm(n,wa3)/fnorm + temp2 = (SQRT(par)*pnorm)/fnorm + prered = temp1**2 + temp2**2/p5 + dirder = -(temp1**2 + temp2**2) + + ! compute the ratio of the actual to the predicted reduction. + + ratio = zero + IF (prered /= zero) ratio = actred/prered + + ! update the step bound. + + IF (ratio <= p25) THEN + IF (actred >= zero) temp = p5 + IF (actred < zero) temp = p5*dirder/(dirder + p5*actred) + IF (p1*fnorm1 >= fnorm .OR. temp < p1) temp = p1 + delta = temp*MIN(delta,pnorm/p1) + par = par/temp + ELSE + IF (par /= zero .AND. ratio < p75) GO TO 260 + delta = pnorm/p5 + par = p5*par + END IF + + ! test for successful iteration. + + 260 IF (ratio < p0001) GO TO 290 + + ! successful iteration. update x, fvec, and their norms. + + DO j = 1, n + x(j) = wa2(j) + wa2(j) = diag(j)*x(j) + END DO + fvec(1:m) = wa4(1:m) + xnorm = enorm(n, wa2) + fnorm = fnorm1 + iter = iter + 1 + + ! tests for convergence. + + 290 IF (ABS(actred) <= ftol .AND. prered <= ftol .AND. p5*ratio <= one) info = 1 + IF (delta <= xtol*xnorm) info = 2 + IF (ABS(actred) <= ftol .AND. prered <= ftol & +& .AND. p5*ratio <= one .AND. info == 2) info = 3 + IF (info /= 0) GO TO 300 + + ! tests for termination and stringent tolerances. + + IF (nfev >= maxfev) info = 5 + IF (ABS(actred) <= epsmch .AND. prered <= epsmch & +& .AND. p5*ratio <= one) info = 6 + IF (delta <= epsmch*xnorm) info = 7 + IF (gnorm <= epsmch) info = 8 + IF (info /= 0) GO TO 300 + + ! end of the inner loop. repeat if iteration unsuccessful. + + IF (ratio < p0001) GO TO 200 + + ! end of the outer loop. + + GO TO 30 + + ! termination, either normal or user imposed. + + 300 IF (iflag < 0) info = iflag + iflag = 0 + IF (nprint > 0) THEN + CALL fcn(m, n, x, fvec, iflag) + END IF + RETURN + + ! last card of subroutine lmdif. + + end subroutine lmdif +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_levenberg_marquardt/lmpar +!! NAME +!! +!! FUNCTION +!! +!! INPUTS +!! +!! OUTPUT +!! +!! NOTES +!! +!! SOURCE + + subroutine lmpar(n, r, ipvt, diag, qtb, delta, par, x, sdiag) + + ! Code converted using TO_F90 by Alan Miller + ! Date: 1999-12-09 Time: 12:46:12 + + ! N.B. Arguments LDR, WA1 & WA2 have been removed. + integer, intent(in) :: n + real (dp), intent(in out) :: r(:,:) + integer, intent(in) :: ipvt(:) + real (dp), intent(in) :: diag(:) + real (dp), intent(in) :: qtb(:) + real (dp), intent(in) :: delta + real (dp), intent(out) :: par + real (dp), intent(out) :: x(:) + real (dp), intent(out) :: sdiag(:) + + ! ********** + + ! subroutine lmpar + + ! Given an m by n matrix a, an n by n nonsingular diagonal matrix d, + ! an m-vector b, and a positive number delta, the problem is to determine a + ! value for the parameter par such that if x solves the system + + ! a*x = b , sqrt(par)*d*x = 0 , + + ! in the least squares sense, and dxnorm is the euclidean + ! norm of d*x, then either par is zero and + + ! (dxnorm-delta) <= 0.1*delta , + + ! or par is positive and + + ! abs(dxnorm-delta) <= 0.1*delta . + + ! This subroutine completes the solution of the problem if it is provided + ! with the necessary information from the r factorization, with column + ! qpivoting, of a. That is, if a*p = q*r, where p is a permutation matrix, + ! q has orthogonal columns, and r is an upper triangular matrix with diagonal + ! elements of nonincreasing magnitude, then lmpar expects the full upper + ! triangle of r, the permutation matrix p, and the first n components of + ! (q transpose)*b. + ! On output lmpar also provides an upper triangular matrix s such that + + ! t t t + ! p *(a *a + par*d*d)*p = s *s . + + ! s is employed within lmpar and may be of separate interest. + + ! Only a few iterations are generally needed for convergence of the algorithm. + ! If, however, the limit of 10 iterations is reached, then the output par + ! will contain the best value obtained so far. + + ! the subroutine statement is + + ! subroutine lmpar(n,r,ldr,ipvt,diag,qtb,delta,par,x,sdiag, wa1,wa2) + + ! where + + ! n is a positive integer input variable set to the order of r. + + ! r is an n by n array. on input the full upper triangle + ! must contain the full upper triangle of the matrix r. + ! On output the full upper triangle is unaltered, and the + ! strict lower triangle contains the strict upper triangle + ! (transposed) of the upper triangular matrix s. + + ! ldr is a positive integer input variable not less than n + ! which specifies the leading dimension of the array r. + + ! ipvt is an integer input array of length n which defines the + ! permutation matrix p such that a*p = q*r. column j of p + ! is column ipvt(j) of the identity matrix. + + ! diag is an input array of length n which must contain the + ! diagonal elements of the matrix d. + + ! qtb is an input array of length n which must contain the first + ! n elements of the vector (q transpose)*b. + + ! delta is a positive input variable which specifies an upper + ! bound on the euclidean norm of d*x. + + ! par is a nonnegative variable. on input par contains an + ! initial estimate of the levenberg-marquardt parameter. + ! on output par contains the final estimate. + + ! x is an output array of length n which contains the least + ! squares solution of the system a*x = b, sqrt(par)*d*x = 0, + ! for the output par. + + ! sdiag is an output array of length n which contains the + ! diagonal elements of the upper triangular matrix s. + + ! wa1 and wa2 are work arrays of length n. + + ! subprograms called + + ! minpack-supplied ... dpmpar,enorm,qrsolv + + ! fortran-supplied ... ABS,MAX,MIN,SQRT + + ! argonne national laboratory. minpack project. march 1980. + ! burton s. garbow, kenneth e. hillstrom, jorge j. more + + ! ********** + integer :: iter, j, jm1, jp1, k, l, nsing + real (dp) :: dxnorm, dwarf, fp, gnorm, parc, parl, paru, sum, temp + real (dp) :: wa1(n), wa2(n) + real (dp), parameter :: p1 = 0.1_dp, p001 = 0.001_dp, zero = 0.0_dp + + ! dwarf is the smallest positive magnitude. + + dwarf = TINY(zero) + + ! compute and store in x the gauss-newton direction. if the + ! jacobian is rank-deficient, obtain a least squares solution. + + nsing = n + DO j = 1, n + wa1(j) = qtb(j) + IF (r(j,j) == zero .AND. nsing == n) nsing = j - 1 + IF (nsing < n) wa1(j) = zero + END DO + + DO k = 1, nsing + j = nsing - k + 1 + wa1(j) = wa1(j)/r(j,j) + temp = wa1(j) + jm1 = j - 1 + wa1(1:jm1) = wa1(1:jm1) - r(1:jm1,j)*temp + END DO + + DO j = 1, n + l = ipvt(j) + x(l) = wa1(j) + END DO + + ! initialize the iteration counter. + ! evaluate the function at the origin, and test + ! for acceptance of the gauss-newton direction. + + iter = 0 + wa2(1:n) = diag(1:n)*x(1:n) + dxnorm = enorm(n, wa2) + fp = dxnorm - delta + IF (fp <= p1*delta) GO TO 220 + + ! if the jacobian is not rank deficient, the newton + ! step provides a lower bound, parl, for the zero of + ! the function. Otherwise set this bound to zero. + + parl = zero + IF (nsing < n) GO TO 120 + DO j = 1, n + l = ipvt(j) + wa1(j) = diag(l)*(wa2(l)/dxnorm) + END DO + DO j = 1, n + sum = DOT_PRODUCT( r(1:j-1,j), wa1(1:j-1) ) + wa1(j) = (wa1(j) - sum)/r(j,j) + END DO + temp = enorm(n,wa1) + parl = ((fp/delta)/temp)/temp + + ! calculate an upper bound, paru, for the zero of the function. + + 120 DO j = 1, n + sum = DOT_PRODUCT( r(1:j,j), qtb(1:j) ) + l = ipvt(j) + wa1(j) = sum/diag(l) + END DO + gnorm = enorm(n,wa1) + paru = gnorm/delta + IF (paru == zero) paru = dwarf/MIN(delta,p1) + + ! if the input par lies outside of the interval (parl,paru), + ! set par to the closer endpoint. + + par = MAX(par,parl) + par = MIN(par,paru) + IF (par == zero) par = gnorm/dxnorm + + ! beginning of an iteration. + + 150 iter = iter + 1 + + ! evaluate the function at the current value of par. + + IF (par == zero) par = MAX(dwarf, p001*paru) + temp = SQRT(par) + wa1(1:n) = temp*diag(1:n) + CALL qrsolv(n, r, ipvt, wa1, qtb, x, sdiag) + wa2(1:n) = diag(1:n)*x(1:n) + dxnorm = enorm(n, wa2) + temp = fp + fp = dxnorm - delta + + ! if the function is small enough, accept the current value + ! of par. also test for the exceptional cases where parl + ! is zero or the number of iterations has reached 10. + + IF (ABS(fp) <= p1*delta .OR. parl == zero .AND. fp <= temp & +& .AND. temp < zero .OR. iter == 10) GO TO 220 + + ! compute the newton correction. + + DO j = 1, n + l = ipvt(j) + wa1(j) = diag(l)*(wa2(l)/dxnorm) + END DO + DO j = 1, n + wa1(j) = wa1(j)/sdiag(j) + temp = wa1(j) + jp1 = j + 1 + wa1(jp1:n) = wa1(jp1:n) - r(jp1:n,j)*temp + END DO + temp = enorm(n,wa1) + parc = ((fp/delta)/temp)/temp + + ! depending on the sign of the function, update parl or paru. + + IF (fp > zero) parl = MAX(parl,par) + IF (fp < zero) paru = MIN(paru,par) + + ! compute an improved estimate for par. + + par = MAX(parl, par+parc) + + ! end of an iteration. + + GO TO 150 + + ! termination. + + 220 IF (iter == 0) par = zero + RETURN + + ! last card of subroutine lmpar. + + end subroutine lmpar +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_levenberg_marquardt/qrfac +!! NAME +!! +!! FUNCTION +!! +!! INPUTS +!! +!! OUTPUT +!! +!! NOTES +!! +!! SOURCE + + subroutine qrfac(m, n, a, pivot, ipvt, rdiag, acnorm) + + ! Code converted using TO_F90 by Alan Miller + ! Date: 1999-12-09 Time: 12:46:17 + + ! N.B. Arguments LDA, LIPVT & WA have been removed. + integer, intent(in) :: m + integer, intent(in) :: n + real (dp), intent(in out) :: a(:,:) + logical, intent(in) :: pivot + integer, intent(out) :: ipvt(:) + real (dp), intent(out) :: rdiag(:) + real (dp), intent(out) :: acnorm(:) + + ! ********** + + ! subroutine qrfac + + ! This subroutine uses Householder transformations with column pivoting + ! (optional) to compute a qr factorization of the m by n matrix a. + ! That is, qrfac determines an orthogonal matrix q, a permutation matrix p, + ! and an upper trapezoidal matrix r with diagonal elements of nonincreasing + ! magnitude, such that a*p = q*r. The householder transformation for + ! column k, k = 1,2,...,min(m,n), is of the form + + ! t + ! i - (1/u(k))*u*u + + ! where u has zeros in the first k-1 positions. The form of this + ! transformation and the method of pivoting first appeared in the + ! corresponding linpack subroutine. + + ! the subroutine statement is + + ! subroutine qrfac(m, n, a, lda, pivot, ipvt, lipvt, rdiag, acnorm, wa) + + ! N.B. 3 of these arguments have been omitted in this version. + + ! where + + ! m is a positive integer input variable set to the number of rows of a. + + ! n is a positive integer input variable set to the number of columns of a. + + ! a is an m by n array. On input a contains the matrix for + ! which the qr factorization is to be computed. On output + ! the strict upper trapezoidal part of a contains the strict + ! upper trapezoidal part of r, and the lower trapezoidal + ! part of a contains a factored form of q (the non-trivial + ! elements of the u vectors described above). + + ! lda is a positive integer input variable not less than m + ! which specifies the leading dimension of the array a. + + ! pivot is a logical input variable. If pivot is set true, + ! then column pivoting is enforced. If pivot is set false, + ! then no column pivoting is done. + + ! ipvt is an integer output array of length lipvt. ipvt + ! defines the permutation matrix p such that a*p = q*r. + ! Column j of p is column ipvt(j) of the identity matrix. + ! If pivot is false, ipvt is not referenced. + + ! lipvt is a positive integer input variable. If pivot is false, + ! then lipvt may be as small as 1. If pivot is true, then + ! lipvt must be at least n. + + ! rdiag is an output array of length n which contains the + ! diagonal elements of r. + + ! acnorm is an output array of length n which contains the norms of the + ! corresponding columns of the input matrix a. + ! If this information is not needed, then acnorm can coincide with rdiag. + + ! wa is a work array of length n. If pivot is false, then wa + ! can coincide with rdiag. + + ! subprograms called + + ! minpack-supplied ... dpmpar,enorm + + ! fortran-supplied ... MAX,SQRT,MIN + + ! argonne national laboratory. minpack project. march 1980. + ! burton s. garbow, kenneth e. hillstrom, jorge j. more + + ! ********** + integer :: i, j, jp1, k, kmax, minmn + real (dp) :: ajnorm, epsmch, sum, temp, wa(n) + real (dp), parameter :: one = 1.0_dp, p05 = 0.05_dp, zero = 0.0_dp + + ! epsmch is the machine precision. + + epsmch = EPSILON(zero) + + ! compute the initial column norms and initialize several arrays. + + DO j = 1, n + acnorm(j) = enorm(m,a(1:,j)) + rdiag(j) = acnorm(j) + wa(j) = rdiag(j) + IF (pivot) ipvt(j) = j + END DO + + ! Reduce a to r with Householder transformations. + + minmn = MIN(m,n) + DO j = 1, minmn + IF (.NOT.pivot) GO TO 40 + + ! Bring the column of largest norm into the pivot position. + + kmax = j + DO k = j, n + IF (rdiag(k) > rdiag(kmax)) kmax = k + END DO + IF (kmax == j) GO TO 40 + DO i = 1, m + temp = a(i,j) + a(i,j) = a(i,kmax) + a(i,kmax) = temp + END DO + rdiag(kmax) = rdiag(j) + wa(kmax) = wa(j) + k = ipvt(j) + ipvt(j) = ipvt(kmax) + ipvt(kmax) = k + + ! Compute the Householder transformation to reduce the + ! j-th column of a to a multiple of the j-th unit vector. + + 40 ajnorm = enorm(m-j+1, a(j:,j)) + IF (ajnorm == zero) CYCLE + IF (a(j,j) < zero) ajnorm = -ajnorm + a(j:m,j) = a(j:m,j)/ajnorm + a(j,j) = a(j,j) + one + + ! Apply the transformation to the remaining columns and update the norms. + + jp1 = j + 1 + DO k = jp1, n + sum = DOT_PRODUCT( a(j:m,j), a(j:m,k) ) + temp = sum/a(j,j) + a(j:m,k) = a(j:m,k) - temp*a(j:m,j) + IF (.NOT.pivot .OR. rdiag(k) == zero) CYCLE + temp = a(j,k)/rdiag(k) + rdiag(k) = rdiag(k)*SQRT(MAX(zero, one-temp**2)) + IF (p05*(rdiag(k)/wa(k))**2 > epsmch) CYCLE + rdiag(k) = enorm(m-j, a(jp1:,k)) + wa(k) = rdiag(k) + END DO + rdiag(j) = -ajnorm + END DO + RETURN + + ! last card of subroutine qrfac. + + end subroutine qrfac +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_levenberg_marquardt/qrsolv +!! NAME +!! +!! FUNCTION +!! +!! INPUTS +!! +!! OUTPUT +!! +!! NOTES +!! +!! SOURCE + + SUBROUTINE qrsolv(n, r, ipvt, diag, qtb, x, sdiag) + + ! N.B. Arguments LDR & WA have been removed. + integer, intent(in) :: n + real (dp), intent(in out) :: r(:,:) + integer, intent(in) :: ipvt(:) + real (dp), intent(in) :: diag(:) + real (dp), intent(in) :: qtb(:) + real (dp), intent(out) :: x(:) + real (dp), intent(out) :: sdiag(:) + + ! ********** + + ! subroutine qrsolv + + ! Given an m by n matrix a, an n by n diagonal matrix d, and an m-vector b, + ! the problem is to determine an x which solves the system + + ! a*x = b , d*x = 0 , + + ! in the least squares sense. + + ! This subroutine completes the solution of the problem if it is provided + ! with the necessary information from the qr factorization, with column + ! pivoting, of a. That is, if a*p = q*r, where p is a permutation matrix, + ! q has orthogonal columns, and r is an upper triangular matrix with diagonal + ! elements of nonincreasing magnitude, then qrsolv expects the full upper + ! triangle of r, the permutation matrix p, and the first n components of + ! (q transpose)*b. The system a*x = b, d*x = 0, is then equivalent to + + ! t t + ! r*z = q *b , p *d*p*z = 0 , + + ! where x = p*z. if this system does not have full rank, + ! then a least squares solution is obtained. On output qrsolv + ! also provides an upper triangular matrix s such that + + ! t t t + ! p *(a *a + d*d)*p = s *s . + + ! s is computed within qrsolv and may be of separate interest. + + ! the subroutine statement is + + ! subroutine qrsolv(n, r, ldr, ipvt, diag, qtb, x, sdiag, wa) + + ! N.B. Arguments LDR and WA have been removed in this version. + + ! where + + ! n is a positive integer input variable set to the order of r. + + ! r is an n by n array. On input the full upper triangle must contain + ! the full upper triangle of the matrix r. + ! On output the full upper triangle is unaltered, and the strict lower + ! triangle contains the strict upper triangle (transposed) of the + ! upper triangular matrix s. + + ! ldr is a positive integer input variable not less than n + ! which specifies the leading dimension of the array r. + + ! ipvt is an integer input array of length n which defines the + ! permutation matrix p such that a*p = q*r. Column j of p + ! is column ipvt(j) of the identity matrix. + + ! diag is an input array of length n which must contain the + ! diagonal elements of the matrix d. + + ! qtb is an input array of length n which must contain the first + ! n elements of the vector (q transpose)*b. + + ! x is an output array of length n which contains the least + ! squares solution of the system a*x = b, d*x = 0. + + ! sdiag is an output array of length n which contains the + ! diagonal elements of the upper triangular matrix s. + + ! wa is a work array of length n. + + ! subprograms called + + ! fortran-supplied ... ABS,SQRT + + ! argonne national laboratory. minpack project. march 1980. + ! burton s. garbow, kenneth e. hillstrom, jorge j. more + + ! ********** + integer :: i, j, k, kp1, l, nsing + real (dp) :: cos, cotan, qtbpj, sin, sum, tan, temp, wa(n) + real (dp), parameter :: p5 = 0.5_dp, p25 = 0.25_dp, zero = 0.0_dp + + ! Copy r and (q transpose)*b to preserve input and initialize s. + ! In particular, save the diagonal elements of r in x. + + DO j = 1, n + r(j:n,j) = r(j,j:n) + x(j) = r(j,j) + wa(j) = qtb(j) + END DO + + ! Eliminate the diagonal matrix d using a givens rotation. + + DO j = 1, n + + ! Prepare the row of d to be eliminated, locating the + ! diagonal element using p from the qr factorization. + + l = ipvt(j) + IF (diag(l) == zero) CYCLE + sdiag(j:n) = zero + sdiag(j) = diag(l) + + ! The transformations to eliminate the row of d modify only a single + ! element of (q transpose)*b beyond the first n, which is initially zero. + + qtbpj = zero + DO k = j, n + + ! Determine a givens rotation which eliminates the + ! appropriate element in the current row of d. + + IF (sdiag(k) == zero) CYCLE + IF (ABS(r(k,k)) < ABS(sdiag(k))) THEN + cotan = r(k,k)/sdiag(k) + SIN = p5/SQRT(p25 + p25*cotan**2) + COS = SIN*cotan + ELSE + TAN = sdiag(k)/r(k,k) + COS = p5/SQRT(p25 + p25*TAN**2) + SIN = COS*TAN + END IF + + ! Compute the modified diagonal element of r and + ! the modified element of ((q transpose)*b,0). + + r(k,k) = COS*r(k,k) + SIN*sdiag(k) + temp = COS*wa(k) + SIN*qtbpj + qtbpj = -SIN*wa(k) + COS*qtbpj + wa(k) = temp + + ! Accumulate the tranformation in the row of s. + + kp1 = k + 1 + DO i = kp1, n + temp = COS*r(i,k) + SIN*sdiag(i) + sdiag(i) = -SIN*r(i,k) + COS*sdiag(i) + r(i,k) = temp + END DO + END DO + + ! Store the diagonal element of s and restore + ! the corresponding diagonal element of r. + + sdiag(j) = r(j,j) + r(j,j) = x(j) + END DO + + ! Solve the triangular system for z. If the system is singular, + ! then obtain a least squares solution. + + nsing = n + DO j = 1, n + IF (sdiag(j) == zero .AND. nsing == n) nsing = j - 1 + IF (nsing < n) wa(j) = zero + END DO + + DO k = 1, nsing + j = nsing - k + 1 + sum = DOT_PRODUCT( r(j+1:nsing,j), wa(j+1:nsing) ) + wa(j) = (wa(j) - sum)/sdiag(j) + END DO + + ! Permute the components of z back to components of x. + + DO j = 1, n + l = ipvt(j) + x(l) = wa(j) + END DO + RETURN + + ! last card of subroutine qrsolv. + + END SUBROUTINE qrsolv +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_levenberg_marquardt/enorm +!! NAME +!! +!! FUNCTION +!! +!! INPUTS +!! +!! OUTPUT +!! +!! NOTES +!! +!! SOURCE + + function enorm(n,x) result(fn_val) + + ! Code converted using TO_F90 by Alan Miller + ! Date: 1999-12-09 Time: 12:45:34 + +!Arguments ------------------------------------ +!scalars + real (dp) :: fn_val + integer, intent(in) :: n +!arrays + real (dp), intent(in) :: x(n) + +!Local variables------------------------------- + integer :: i + real (dp) :: agiant, floatn, s1, s2, s3, xabs, x1max, x3max + real (dp), parameter :: one = 1.0_dp, zero = 0.0_dp, rdwarf = 3.834e-20_dp, rgiant = 1.304e+19_dp +! ********************************************************************* + + ! function enorm + + ! given an n-vector x, this function calculates the euclidean norm of x. + + ! the euclidean norm is computed by accumulating the sum of squares in + ! three different sums. The sums of squares for the small and large + ! components are scaled so that no overflows occur. Non-destructive + ! underflows are permitted. Underflows and overflows do not occur in the + ! computation of the unscaled sum of squares for the intermediate + ! components. The definitions of small, intermediate and large components + ! depend on two constants, rdwarf and rgiant. The main restrictions on + ! these constants are that rdwarf**2 not underflow and rgiant**2 not + ! overflow. The constants given here are suitable for every known computer. + + ! the function statement is + + ! REAL (dp) function enorm(n,x) + + ! where + + ! n is a positive integer input variable. + + ! x is an input array of length n. + + ! subprograms called + + ! fortran-supplied ... ABS,SQRT + + ! argonne national laboratory. minpack project. march 1980. + ! burton s. garbow, kenneth e. hillstrom, jorge j. more + + ! ********** + + + s1 = zero + s2 = zero + s3 = zero + x1max = zero + x3max = zero + floatn = n + agiant = rgiant/floatn + DO i = 1, n + xabs = ABS(x(i)) + IF (xabs > rdwarf .AND. xabs < agiant) GO TO 70 + IF (xabs <= rdwarf) GO TO 30 + + ! sum for large components. + + IF (xabs <= x1max) GO TO 10 + s1 = one + s1*(x1max/xabs)**2 + x1max = xabs + GO TO 20 + + 10 s1 = s1 + (xabs/x1max)**2 + + 20 GO TO 60 + + ! sum for small components. + + 30 IF (xabs <= x3max) GO TO 40 + s3 = one + s3*(x3max/xabs)**2 + x3max = xabs + GO TO 60 + + 40 IF (xabs /= zero) s3 = s3 + (xabs/x3max)**2 + + 60 CYCLE + + ! sum for intermediate components. + + 70 s2 = s2 + xabs**2 + END DO + + ! calculation of norm. + + IF (s1 == zero) GO TO 100 + fn_val = x1max*SQRT(s1 + (s2/x1max)/x1max) + GO TO 120 + + 100 IF (s2 == zero) GO TO 110 + IF (s2 >= x3max) fn_val = SQRT(s2*(one + (x3max/s2)*(x3max*s3))) + IF (s2 < x3max) fn_val = SQRT(x3max*((s2/x3max) + (x3max*s3))) + GO TO 120 + + 110 fn_val = x3max*SQRT(s3) + + 120 RETURN + + ! last card of function enorm. + + END FUNCTION enorm +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_levenberg_marquardt/fdjac2 +!! NAME +!! +!! FUNCTION +!! +!! INPUTS +!! +!! OUTPUT +!! +!! NOTES +!! +!! SOURCE + + SUBROUTINE fdjac2(fcn, m, n, x, fvec, fjac, iflag, epsfcn) + + ! Code converted using TO_F90 by Alan Miller + ! Date: 1999-12-09 Time: 12:45:44 + + ! N.B. Arguments LDFJAC & WA have been removed. + integer, intent(in) :: m + integer, intent(in) :: n + real (dp), intent(in out) :: x(n) + real (dp), intent(in) :: fvec(m) + real (dp), intent(out) :: fjac(:,:) ! fjac(ldfjac,n) + integer, intent(in out) :: iflag + real (dp), intent(in) :: epsfcn + + interface + subroutine fcn(m, n, x, fvec, iflag, y, nfqre, nfqim, bsign, csign, multi_x_exp) + implicit none + integer, parameter :: dp = KIND(1.0d0) + integer, intent(in) :: m, n + real (dp), intent(in) :: x(n) + real (dp), intent(in out) :: fvec(m) + integer, intent(in out) :: iflag + integer, optional, intent(in) :: nfqre,nfqim,bsign,csign,multi_x_exp + real (dp), optional, intent(in) :: y(m) + end subroutine fcn + end interface + + ! ********** + + ! subroutine fdjac2 + + ! this subroutine computes a forward-difference approximation + ! to the m by n jacobian matrix associated with a specified + ! problem of m functions in n variables. + + ! the subroutine statement is + + ! subroutine fdjac2(fcn,m,n,x,fvec,fjac,ldfjac,iflag,epsfcn,wa) + + ! where + + ! fcn is the name of the user-supplied subroutine which calculates the + ! functions. fcn must be declared in an external statement in the user + ! calling program, and should be written as follows. + + ! subroutine fcn(m,n,x,fvec,iflag) + ! integer m,n,iflag + ! REAL (dp) x(n),fvec(m) + ! ---------- + ! calculate the functions at x and + ! return this vector in fvec. + ! ---------- + ! return + ! end + + ! the value of iflag should not be changed by fcn unless + ! the user wants to terminate execution of fdjac2. + ! in this case set iflag to a negative integer. + + ! m is a positive integer input variable set to the number of functions. + + ! n is a positive integer input variable set to the number of variables. + ! n must not exceed m. + + ! x is an input array of length n. + + ! fvec is an input array of length m which must contain the + ! functions evaluated at x. + + ! fjac is an output m by n array which contains the + ! approximation to the jacobian matrix evaluated at x. + + ! ldfjac is a positive integer input variable not less than m + ! which specifies the leading dimension of the array fjac. + + ! iflag is an integer variable which can be used to terminate + ! the execution of fdjac2. see description of fcn. + + ! epsfcn is an input variable used in determining a suitable step length + ! for the forward-difference approximation. This approximation assumes + ! that the relative errors in the functions are of the order of epsfcn. + ! If epsfcn is less than the machine precision, it is assumed that the + ! relative errors in the functions are of the order of the machine + ! precision. + + ! wa is a work array of length m. + + ! subprograms called + + ! user-supplied ...... fcn + + ! minpack-supplied ... dpmpar + + ! fortran-supplied ... ABS,MAX,SQRT + + ! argonne national laboratory. minpack project. march 1980. + ! burton s. garbow, kenneth e. hillstrom, jorge j. more + + ! ********** + integer :: j + real (dp) :: eps, epsmch, h, temp, wa(m) + real (dp), parameter :: zero = 0.0_dp + + ! epsmch is the machine precision. + + epsmch = EPSILON(zero) + + eps = SQRT(MAX(epsfcn, epsmch)) + DO j = 1, n + temp = x(j) + h = eps*ABS(temp) + IF (h == zero) h = eps + x(j) = temp + h + CALL fcn(m, n, x, wa, iflag) + IF (iflag < 0) EXIT + x(j) = temp + fjac(1:m,j) = (wa(1:m) - fvec(1:m))/h + END DO + + RETURN + +! last card of subroutine fdjac2. + + end subroutine fdjac2 +!!*** + +!!****f* m_levenberg_marquardt/lm_fit_print_info +!! NAME +!! +!! FUNCTION +!! +!! INPUTS +!! +!! OUTPUT +!! +!! NOTES +!! +!! SOURCE +subroutine lm_fit_print_info(info,msg) + + integer, intent(in) :: info + character(len=500) :: msg + + select case (info) + case (:-1) + write(msg,'(a,i0)') 'STOP LM fit: fcn in LM fit returned info = ', -info + case (0) + write(msg,'(a)') 'ERROR LM fit: improper values for input parameters in LM fit' + case (1:3) + write(msg,'(a)') 'LM fit converged' + case (4) + write(msg,'(a)') 'ERROR LM fit: residuals orthogonal to the jacobian, there may be an error in fcn.' + case (5) + write(msg,'(a)') 'ERROR LM fit: too many calls to fcn, either slow convergence, or an error in opt.' + case (6:7) + write(msg,'(a)') 'ERROR LM fit: tol was set too small' + case default + write(msg,'(a,i0)') 'ERROR LM fit: unknown info = ',info + end select + + return + +end subroutine lm_fit_print_info + +end module m_levenberg_marquardt +!!*** diff --git a/GX-PAW/common/src/28_numeric_noabirule/m_levenberg_marquardt.o b/GX-PAW/common/src/28_numeric_noabirule/m_levenberg_marquardt.o new file mode 100644 index 00000000..dcf8dd7d Binary files /dev/null and b/GX-PAW/common/src/28_numeric_noabirule/m_levenberg_marquardt.o differ diff --git a/GX-PAW/common/src/28_numeric_noabirule/m_lib_four.F90 b/GX-PAW/common/src/28_numeric_noabirule/m_lib_four.F90 new file mode 100644 index 00000000..751b02b5 --- /dev/null +++ b/GX-PAW/common/src/28_numeric_noabirule/m_lib_four.F90 @@ -0,0 +1,281 @@ +!!****f* ABINIT/nfourier +!! NAME +!! nfourier +!! +!! FUNCTION +!! +!! COPYRIGHT +!! Copyright (C) 2014-2024 ABINIT group (XG) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" + +MODULE m_lib_four + + use defs_basis + use m_errors + use m_abicore + +contains + +! This routine contains direct and inverse fourier transformation +! It is a modification of a routine of the GNU GPL +! code available on http://dmft.rutgers.edu/ and +! described in the RMP 2006 paper written by +! G.Kotliar, S.Y.Savrasov, K.Haule, V.S.Oudovenko, O.Parcollet, C.A.Marianetti +!=======+=========+=========+=========+=========+=========+=========+=$ +! TYPE : SUBROUTINE +! PROGRAM: nfourier +! PURPOSE: fourier-transform the natural-spline interpolation +! of function Green(tau) +! calculate function Green(omega) +! I/O : +! VERSION: 2-16-92 +! 29-Nov-95 removal of minimal bug concerning +! DIMENSION of rindata +! COMMENT: cf J. Stoer R. Bulirsch, Introduction to numerical +! analysis (Springer, New York, 1980) +!=======+=========+=========+=========+=========+=========+=========+=$ +! + SUBROUTINE nfourier(rindata,coutdata,iflag,Iwmax,L,Beta) + +!include 'param.dat' + IMPLICIT DOUBLE PRECISION (A-H,O-Z) + IMPLICIT INTEGER(I-N) + integer Iwmax,L,iflag + DIMENSION rindata(L) + DIMENSION rincopy(L+1),a(L),b(L),c(L),d(L),u(L+1), q(L+1),XM(L+1) + complex*16 :: coutdata(Iwmax+1) + complex*16 cdummy,explus,ex + xpi = ACOS(-One) + delta = Beta/L + DO i = 1,L + rincopy(i) = rindata(i) + ENDDO + if(iflag==1) then + rincopy(L+1) = -1-rindata(1) + else + rincopy(L+1) = -rindata(1) + endif +! Three = Two+One +! six = Two*Three + +!c +!c spline interpolation: the spline is given by +!c G(tau) = a(i) + b(i) (tau-tau_i) + c(i) ( )^2 + d(i) ( )^3 +!c The following formulas are taken directly from Stoer and +!c Bulirsch p. 102 +!c + q(1) = Zero + u(1) = Zero + DO k = 2,L + p = q(k-1)/Two+Two + q(k)=-One/Two/p + u(k)=Three/delta**2*(rincopy(k+1)+rincopy(k-1)-Two*rincopy(k)) + u(k)=(u(k)-u(k-1)/Two)/p + ENDDO + XM(L+1) = 0 + DO k = L,1,-1 + XM(k) = q(k)*XM(k+1)+u(k) + ENDDO +!c +!c The following formulas are taken directly from Stoer and +!c Bulirsch p. 98 +!c + DO j = 1, L + a(j) = rincopy(j) + c(j) = XM(j)/Two + b(j) = (rincopy(j+1)-rincopy(j))/delta - & + & (Two*XM(j)+XM(j+1))*delta/6. + d(j) = (XM(j+1)-XM(j))/(6.*delta) + ENDDO + +!c +!c The Spline multiplied by the exponential can now be exlicitely +!c integrated. The following formulas were obtained using +!c MATHEMATICA +!c + DO i = 0,Iwmax + om = (Two*(i)+One)*xpi/Beta + coutdata(i+1) = czero + DO j = 1,L + cdummy = j_dpc*om*delta*j + explus = exp(cdummy) + cdummy = j_dpc*om*delta*(j-1) + ex = exp(cdummy) + coutdata(i+1) = coutdata(i+1) + explus*(& + & ( -six* d(j) )/om**4 + & + & ( Two*j_dpc*c(j) + six*delta*j_dpc*d(j) )/om**3 +& + & ( b(j)+ Two*delta*c(j)+ three*delta**2*d(j) )/om**2 +& + & (- j_dpc*a(j) - delta*j_dpc*b(j) - delta**2*j_dpc*c(j) -& + & delta**3*j_dpc*d(j))/om) + + coutdata(i+1) = coutdata(i+1) + ex*(& + & six*d(j)/om**4 - Two*j_dpc*c(j)/om**3 & + & -b(j)/om**2 + j_dpc*a(j)/om) + ENDDO + ENDDO + end subroutine nfourier +!!*** + +! This routine contains direct and inverse fourier transformation +! It is a modification of a routine of the GNU GPL +! code available on http://dmft.rutgers.edu/ and +! described in the RMP 2006 paper written by +! G.Kotliar, S.Y.Savrasov, K.Haule, V.S.Oudovenko, O.Parcollet, C.A.Marianetti +!=======+=========+=========+=========+=========+=========+=========+=$ +! TYPE : SUBROUTINE +! PROGRAM: nfourier +! PURPOSE: fourier-transform the natural-spline interpolation +! of function Green(tau) +! calculate function Green(omega) +! I/O : +! VERSION: 2-16-92 +! 29-Nov-95 removal of minimal bug concerning +! DIMENSION of rindata +! COMMENT: cf J. Stoer R. Bulirsch, Introduction to numerical +! analysis (Springer, New York, 1980) +!=======+=========+=========+=========+=========+=========+=========+=$ +! + SUBROUTINE nfourier2(rindata,coutdata,iflag,om,L,Beta) +! include 'param.dat' + IMPLICIT DOUBLE PRECISION (A-H,O-Z) + IMPLICIT INTEGER(I-N) + integer L,iflag + DIMENSION rindata(L) + DIMENSION rincopy(L+1),a(L),b(L),c(L),d(L),u(L+1), q(L+1),XM(L+1) + complex*16 :: coutdata + real*8 :: om + complex*16 cdummy,explus,ex + xpi = ACOS(-One) + delta = Beta/L + DO i = 1,L + rincopy(i) = rindata(i) + ENDDO + if(iflag==1 .and. L.ge.1) then + rincopy(L+1) = -1-rindata(1) + elseif(iflag==0 .and. L.ge.1) then + rincopy(L+1) = -rindata(1) + else + write(std_out,*) "Warning : Check nfourier2" + endif +! Three = Two+One +! six = Two*Three + +!c +!c spline interpolation: the spline is given by +!c G(tau) = a(i) + b(i) (tau-tau_i) + c(i) ( )^2 + d(i) ( )^3 +!c The following formulas are taken directly from Stoer and +!c Bulirsch p. 102 +!c + q(1) = Zero + u(1) = Zero + DO k = 2,L + p = q(k-1)/Two+Two + q(k)=-One/Two/p + u(k)=Three/delta**2*(rincopy(k+1)+rincopy(k-1)-Two*rincopy(k)) + u(k)=(u(k)-u(k-1)/Two)/p + ENDDO + XM(L+1) = 0 + DO k = L,1,-1 + XM(k) = q(k)*XM(k+1)+u(k) + ENDDO +!c +!c The following formulas are taken directly from Stoer and +!c Bulirsch p. 98 +!c + DO j = 1, L + a(j) = rincopy(j) + c(j) = XM(j)/Two + b(j) = (rincopy(j+1)-rincopy(j))/delta - & + & (Two*XM(j)+XM(j+1))*delta/6. + d(j) = (XM(j+1)-XM(j))/(6.*delta) + ENDDO + +!c +!c The Spline multiplied by the exponential can now be exlicitely +!c integrated. The following formulas were obtained using +!c MATHEMATICA +!c + coutdata = czero + DO j = 1,L + cdummy = j_dpc*om*delta*j + explus = exp(cdummy) + cdummy = j_dpc*om*delta*(j-1) + ex = exp(cdummy) + coutdata = coutdata + explus*(& + & ( -six* d(j) )/om**4 + & + & ( Two*j_dpc*c(j) + six*delta*j_dpc*d(j) )/om**3 +& + & ( b(j)+ Two*delta*c(j)+ three*delta**2*d(j) )/om**2 +& + & (- j_dpc*a(j) - delta*j_dpc*b(j) - delta**2*j_dpc*c(j) -& + & delta**3*j_dpc*d(j))/om) + + coutdata = coutdata + ex*(& + & six*d(j)/om**4 - Two*j_dpc*c(j)/om**3 & + & -b(j)/om**2 + j_dpc*a(j)/om) + ENDDO + end subroutine nfourier2 +!=======+=========+=========+=========+=========+=========+=========+=$ +! TYPE : SUBROUTINE +! PROGRAM: invfourier +! PURPOSE: inverse fourier transform +! Greent, Greenw use physical definition +! Greent(i) = G((i-1)*deltau) for i = 1,...,L +! Greenw(n) = G(i w_n), for n = 0,L/2-1 +! w_n = (2*n+1)pi/beta +! Symmetry property: +! G(iw_(-n) = G(iw_(n-1))* +! coupled to the impurity +! I/O : +! VERSION: 6-16-92 +! COMMENT: +!=======+=========+=========+=========+=========+=========+=========+=$ +! + SUBROUTINE invfourier(cindata,routdata,Iwmax,L,iflag,beta) + +! include 'param.dat' + implicit none + integer, intent(in) :: Iwmax + complex*16, intent(in) :: cindata(1:Iwmax) !vz_d + integer, intent(in) :: L + complex*16, intent(inout) :: routdata(1:L) !vz_d + integer, intent(in) :: iflag + double precision, intent(in) :: beta + + double precision :: xpi + double precision :: tau + double precision :: om + complex*16 :: cdummy,dummy + integer :: i,j + + xpi = ACOS(-One) + DO 1 i = 1,L + routdata(i) = Zero + tau = (i-1)*beta/real(L) + DO 2 j = 1,Iwmax +! om = mod((2*(j)+One)*xpi/Beta*tau,2*xpi) + om = ((2*(j)-One)*xpi/Beta*tau) + cdummy = CMPLX(Zero,om) + dummy = cindata(j)*exp(-cdummy) + routdata(i) = routdata(i)+Two/beta*dummy +2 CONTINUE +! write(std_out,*) "FT",i,routdata(i) +1 CONTINUE +!c +!c special treatment for tau = 0 +!c + if(iflag==1 .and. L.ge.1 ) then + routdata(1) = -One/Two+routdata(1) + endif + END SUBROUTINE invfourier + +END MODULE m_lib_four +!!*** diff --git a/GX-PAW/common/src/28_numeric_noabirule/m_lib_four.o b/GX-PAW/common/src/28_numeric_noabirule/m_lib_four.o new file mode 100644 index 00000000..c5ed3182 Binary files /dev/null and b/GX-PAW/common/src/28_numeric_noabirule/m_lib_four.o differ diff --git a/GX-PAW/common/src/28_numeric_noabirule/m_linalg_interfaces.F90 b/GX-PAW/common/src/28_numeric_noabirule/m_linalg_interfaces.F90 new file mode 100644 index 00000000..5214b0c0 --- /dev/null +++ b/GX-PAW/common/src/28_numeric_noabirule/m_linalg_interfaces.F90 @@ -0,0 +1,4019 @@ +!!****m* ABINIT/m_linalg_interfaces +!! NAME +!! m_linalg_interfaces +!! +!! FUNCTION +!! Interfaces for the BLAS and LAPACK linear algebra routines. +!! +!! COPYRIGHT +!! Copyright (C) 2011-2024 ABINIT group (Yann Pouillon) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! WARNING +!! These routines are used both by real and complex arrays +!! and are commented (no interface): +!! - ztrsm, zgemm, zgemv, zhemm, zherk, zher, zgerc +!! - zcopy, zaxpy, zdscal, zscal, zdotc +!! - zhpev, zgsev, zheev, zgetrf, zpotrf, zhegv, zhpevx +!! - zhpgv, zhegst +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +module m_linalg_interfaces + + implicit none + + interface + subroutine caxpy(n,ca,cx,incx,cy,incy) + implicit none + integer :: incx + integer :: incy + integer :: n + complex :: ca + complex :: cx(*) + complex :: cy(*) + end subroutine caxpy + end interface + + interface + subroutine ccopy(n,cx,incx,cy,incy) + implicit none + integer, intent(in) :: incx, incy, n !vz_i + complex, intent(in) :: cx(*) !vz_i + complex, intent(inout) :: cy(*) !vz_i + end subroutine ccopy + end interface + + interface + complex function cdotc(n,cx,incx,cy,incy) + implicit none + integer, intent(in) :: incx, incy, n !vz_i + complex, intent(in) :: cx(*), cy(*) !vz_i + end function cdotc + end interface + + interface + complex function cdotu(n,cx,incx,cy,incy) + implicit none + integer, intent(in) :: incx, incy, n !vz_i + complex, intent(in) :: cx(*), cy(*) !vz_i + end function cdotu + end interface + + interface + subroutine cgbmv ( TRANS, M, N, KL, KU, ALPHA, A, LDA, X, INCX,& + BETA, Y, INCY ) + implicit none + integer :: INCX + integer :: INCY + integer :: KL + integer :: KU + integer :: LDA + integer :: M + integer :: N + complex :: A( LDA, * ) + complex :: ALPHA + complex :: BETA + character*1 :: TRANS + complex :: X( * ) + complex :: Y( * ) + end subroutine cgbmv + end interface + + interface + subroutine cgemm ( TRANSA, TRANSB, M, N, K, ALPHA, A, LDA, B, LDB,& + BETA, C, LDC ) + implicit none + integer,intent(in) :: K,lda,ldb,ldc,m,n !vz_i + complex,intent(in) :: A( LDA, * ) !vz_i + complex,intent(in) :: ALPHA !vz_i + complex,intent(in) :: B( LDB, * ) !vz_i + complex,intent(in) :: BETA !vz_i + complex,intent(inout) :: C( LDC, * ) !vz_i + character*1,intent(in) :: TRANSA !vz_i + character*1,intent(in) :: TRANSB !vz_i + end subroutine cgemm + end interface + + interface + subroutine cgemv ( TRANS, M, N, ALPHA, A, LDA, X, INCX,& + BETA, Y, INCY ) + implicit none + integer, intent(in) :: INCX, incy, lda, m, n !vz_i + complex, intent(in) :: A( LDA, * ) !vz_i + complex, intent(in) :: ALPHA, beta !vz_i + character*1, intent(in) :: TRANS !vz_i + complex, intent(in) :: X( * ) !vz_i + complex, intent(inout) :: Y( * ) !vz_i + end subroutine cgemv + end interface + + interface + subroutine cgerc ( M, N, ALPHA, X, INCX, Y, INCY, A, LDA ) + implicit none + integer, intent(in) :: INCX, incy, lda, m, n !vz_i + complex, intent(inout) :: A( LDA, * ) !vz_i + complex, intent(in) :: ALPHA !vz_i + complex, intent(in) :: X( * ), Y( * ) !vz_i + end subroutine cgerc + end interface + + interface + subroutine cgeru ( M, N, ALPHA, X, INCX, Y, INCY, A, LDA ) + implicit none + integer :: INCX + integer :: INCY + integer :: LDA + integer :: M + integer :: N + complex :: A( LDA, * ) + complex :: ALPHA + complex :: X( * ) + complex :: Y( * ) + end subroutine cgeru + end interface + + interface + subroutine chbmv ( UPLO, N, K, ALPHA, A, LDA, X, INCX,& + BETA, Y, INCY ) + implicit none + integer :: INCX + integer :: INCY + integer :: K + integer :: LDA + integer :: N + complex :: A( LDA, * ) + complex :: ALPHA + complex :: BETA + character*1 :: UPLO + complex :: X( * ) + complex :: Y( * ) + end subroutine chbmv + end interface + + interface + subroutine chemm ( SIDE, UPLO, M, N, ALPHA, A, LDA, B, LDB,& + BETA, C, LDC ) + implicit none + integer :: LDA + integer :: LDB + integer :: LDC + integer :: M + integer :: N + complex :: A( LDA, * ) + complex :: ALPHA + complex :: B( LDB, * ) + complex :: BETA + complex :: C( LDC, * ) + character*1 :: SIDE + character*1 :: UPLO + end subroutine chemm + end interface + + interface + subroutine chemv ( UPLO, N, ALPHA, A, LDA, X, INCX,& + BETA, Y, INCY ) + implicit none + integer :: INCX + integer :: INCY + integer :: LDA + integer :: N + complex :: A( LDA, * ) + complex :: ALPHA + complex :: BETA + character*1 :: UPLO + complex :: X( * ) + complex :: Y( * ) + end subroutine chemv + end interface + + interface + subroutine cher ( UPLO, N, ALPHA, X, INCX, A, LDA ) + implicit none + integer :: INCX + integer :: LDA + integer :: N + complex :: A( LDA, * ) + real :: ALPHA + character*1 :: UPLO + complex :: X( * ) + end subroutine cher + end interface + + interface + subroutine cher2 ( UPLO, N, ALPHA, X, INCX, Y, INCY, A, LDA ) + implicit none + integer :: INCX + integer :: INCY + integer :: LDA + integer :: N + complex :: A( LDA, * ) + complex :: ALPHA + character*1 :: UPLO + complex :: X( * ) + complex :: Y( * ) + end subroutine cher2 + end interface + + interface + subroutine cher2k( UPLO, TRANS, N, K, ALPHA, A, LDA, B, LDB,& + BETA, C, LDC ) + implicit none + integer :: K + integer :: LDA + integer :: LDB + integer :: LDC + integer :: N + complex :: A( LDA, * ) + complex :: ALPHA + complex :: B( LDB, * ) + real :: BETA + complex :: C( LDC, * ) + character*1 :: TRANS + character*1 :: UPLO + end subroutine cher2k + end interface + + interface + subroutine cherk ( UPLO, TRANS, N, K, ALPHA, A, LDA,& + BETA, C, LDC ) + implicit none + integer, intent(in) :: K,lda,ldc,n !vz_i + complex,intent(in) :: A( LDA, * ) !vz_i + real,intent(in) :: ALPHA !vz_i + real,intent(in) :: BETA !vz_i + complex,intent(inout) :: C( LDC, * ) !vz_i + character*1,intent(in) :: TRANS !vz_i + character*1,intent(in) :: UPLO !vz_i + end subroutine cherk + end interface + + interface + subroutine chpmv ( UPLO, N, ALPHA, AP, X, INCX, BETA, Y, INCY ) + implicit none + integer :: INCX + integer :: INCY + integer :: N + complex :: ALPHA + complex :: AP( * ) + complex :: BETA + character*1 :: UPLO + complex :: X( * ) + complex :: Y( * ) + end subroutine chpmv + end interface + + interface + subroutine chpr ( UPLO, N, ALPHA, X, INCX, AP ) + implicit none + integer :: INCX + integer :: N + real :: ALPHA + complex :: AP( * ) + character*1 :: UPLO + complex :: X( * ) + end subroutine chpr + end interface + + interface + subroutine chpr2 ( UPLO, N, ALPHA, X, INCX, Y, INCY, AP ) + implicit none + integer :: INCX + integer :: INCY + integer :: N + complex :: ALPHA + complex :: AP( * ) + character*1 :: UPLO + complex :: X( * ) + complex :: Y( * ) + end subroutine chpr2 + end interface + + interface + subroutine crotg(ca,cb,c,s) + implicit none + real :: c + complex :: ca + complex :: cb + complex :: s + end subroutine crotg + end interface + + interface + subroutine cscal(n,ca,cx,incx) + implicit none + integer :: incx + integer :: n + complex :: ca + complex :: cx(*) + end subroutine cscal + end interface + + interface + subroutine csrot (n,cx,incx,cy,incy,c,s) + implicit none + integer :: incx + integer :: incy + integer :: n + real :: c + real :: s + complex :: cx(1) + complex :: cy(1) + end subroutine csrot + end interface + + interface + subroutine csscal(n,sa,cx,incx) + implicit none + integer :: incx + integer :: n + real :: sa + complex :: cx(*) + end subroutine csscal + end interface + + interface + subroutine cswap (n,cx,incx,cy,incy) + implicit none + integer :: incx + integer :: incy + integer :: n + complex :: cx(*) + complex :: cy(*) + end subroutine cswap + end interface + + interface + subroutine csymm ( SIDE, UPLO, M, N, ALPHA, A, LDA, B, LDB,& + BETA, C, LDC ) + implicit none + integer :: LDA + integer :: LDB + integer :: LDC + integer :: M + integer :: N + complex :: A( LDA, * ) + complex :: ALPHA + complex :: B( LDB, * ) + complex :: BETA + complex :: C( LDC, * ) + character*1 :: SIDE + character*1 :: UPLO + end subroutine csymm + end interface + + interface + subroutine csyr2k( UPLO, TRANS, N, K, ALPHA, A, LDA, B, LDB,& + BETA, C, LDC ) + implicit none + integer :: K + integer :: LDA + integer :: LDB + integer :: LDC + integer :: N + complex :: A( LDA, * ) + complex :: ALPHA + complex :: B( LDB, * ) + complex :: BETA + complex :: C( LDC, * ) + character*1 :: TRANS + character*1 :: UPLO + end subroutine csyr2k + end interface + + interface + subroutine csyrk ( UPLO, TRANS, N, K, ALPHA, A, LDA,& + BETA, C, LDC ) + implicit none + integer :: K + integer :: LDA + integer :: LDC + integer :: N + complex :: A( LDA, * ) + complex :: ALPHA + complex :: BETA + complex :: C( LDC, * ) + character*1 :: TRANS + character*1 :: UPLO + end subroutine csyrk + end interface + + interface + subroutine ctbmv ( UPLO, TRANS, DIAG, N, K, A, LDA, X, INCX ) + implicit none + integer :: INCX + integer :: K + integer :: LDA + integer :: N + complex :: A( LDA, * ) + character*1 :: DIAG + character*1 :: TRANS + character*1 :: UPLO + complex :: X( * ) + end subroutine ctbmv + end interface + + interface + subroutine ctbsv ( UPLO, TRANS, DIAG, N, K, A, LDA, X, INCX ) + implicit none + integer :: INCX + integer :: K + integer :: LDA + integer :: N + complex :: A( LDA, * ) + character*1 :: DIAG + character*1 :: TRANS + character*1 :: UPLO + complex :: X( * ) + end subroutine ctbsv + end interface + + interface + subroutine ctpmv ( UPLO, TRANS, DIAG, N, AP, X, INCX ) + implicit none + integer :: INCX + integer :: N + complex :: AP( * ) + character*1 :: DIAG + character*1 :: TRANS + character*1 :: UPLO + complex :: X( * ) + end subroutine ctpmv + end interface + + interface + subroutine ctpsv ( UPLO, TRANS, DIAG, N, AP, X, INCX ) + implicit none + integer :: INCX + integer :: N + complex :: AP( * ) + character*1 :: DIAG + character*1 :: TRANS + character*1 :: UPLO + complex :: X( * ) + end subroutine ctpsv + end interface + + interface + subroutine ctrmm ( SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA, A, LDA,& + B, LDB ) + implicit none + integer :: LDA + integer :: LDB + integer :: M + integer :: N + complex :: A( LDA, * ) + complex :: ALPHA + complex :: B( LDB, * ) + character*1 :: DIAG + character*1 :: SIDE + character*1 :: TRANSA + character*1 :: UPLO + end subroutine ctrmm + end interface + + interface + subroutine ctrmv ( UPLO, TRANS, DIAG, N, A, LDA, X, INCX ) + implicit none + integer :: INCX + integer :: LDA + integer :: N + complex :: A( LDA, * ) + character*1 :: DIAG + character*1 :: TRANS + character*1 :: UPLO + complex :: X( * ) + end subroutine ctrmv + end interface + + interface + subroutine ctrsm ( SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA, A, LDA,& + B, LDB ) + implicit none + integer :: LDA + integer :: LDB + integer :: M + integer :: N + complex :: A( LDA, * ) + complex :: ALPHA + complex :: B( LDB, * ) + character*1 :: DIAG + character*1 :: SIDE + character*1 :: TRANSA + character*1 :: UPLO + end subroutine ctrsm + end interface + + interface + subroutine ctrsv ( UPLO, TRANS, DIAG, N, A, LDA, X, INCX ) + implicit none + integer :: INCX + integer :: LDA + integer :: N + complex :: A( LDA, * ) + character*1 :: DIAG + character*1 :: TRANS + character*1 :: UPLO + complex :: X( * ) + end subroutine ctrsv + end interface + + interface + double precision function dasum(n,dx,incx) + implicit none + integer :: incx + integer :: n + double precision :: dx(*) + end function dasum + end interface + + interface + subroutine daxpy(n,da,dx,incx,dy,incy) + implicit none + integer :: incx + integer :: incy + integer :: n + double precision :: da + double precision :: dx(*) + double precision :: dy(*) + end subroutine daxpy + end interface + + interface + double precision function dcabs1(z) + implicit none + double complex :: z + end function dcabs1 + end interface + + !interface + ! subroutine dcopy(n,dx,incx,dy,incy) + ! implicit none + ! integer :: incx + ! integer :: incy + ! integer :: n + ! double precision :: dx(*) + ! double precision :: dy(*) + ! end subroutine dcopy + !end interface + + interface + double precision function ddot(n,dx,incx,dy,incy) + implicit none + integer,intent(in) :: incx + integer,intent(in) :: incy + integer,intent(in) :: n + double precision,intent(in) :: dx(*) + double precision,intent(in) :: dy(*) + end function ddot + end interface + + interface + subroutine dgbmv ( TRANS, M, N, KL, KU, ALPHA, A, LDA, X, INCX,& + BETA, Y, INCY ) + implicit none + integer :: INCX + integer :: INCY + integer :: KL + integer :: KU + integer :: LDA + integer :: M + integer :: N + double precision :: A( LDA, * ) + double precision :: ALPHA + double precision :: BETA + character*1 :: TRANS + double precision :: X( * ) + double precision :: Y( * ) + end subroutine dgbmv + end interface + + interface + subroutine dgemm ( TRANSA, TRANSB, M, N, K, ALPHA, A, LDA, B, LDB,& + BETA, C, LDC ) + implicit none + integer,intent(in) :: K,lda,ldb,ldc,m,n !vz_i + double precision, intent(in) :: A( LDA, * ) !vz_i + double precision,intent(in) :: ALPHA !vz_i + double precision,intent(in) :: B( LDB, * ) !vz_i + double precision,intent(in) :: BETA !vz_i + double precision,intent(inout) :: C( LDC, * ) !vz_i + character*1,intent(in) :: TRANSA !vz_i + character*1,intent(in) :: TRANSB !vz_i + end subroutine dgemm + end interface + + interface + subroutine dgemv ( TRANS, M, N, ALPHA, A, LDA, X, INCX,& + BETA, Y, INCY ) + implicit none + integer, intent(in) :: INCX,incy,lda,m,n !vz_i + double precision, intent(in) :: A( LDA, * ) !vz_i + double precision, intent(in) :: ALPHA !vz_i + double precision, intent(in) :: BETA !vz_i + character*1, intent(in) :: TRANS !vz_i + double precision, intent(in) :: X( * ) !vz_i + double precision, intent(inout) :: Y( * ) !vz_i + end subroutine dgemv + end interface + + interface + subroutine dger ( M, N, ALPHA, X, INCX, Y, INCY, A, LDA ) + implicit none + integer :: INCX + integer :: INCY + integer :: LDA + integer :: M + integer :: N + double precision :: A( LDA, * ) + double precision :: ALPHA + double precision :: X( * ) + double precision :: Y( * ) + end subroutine dger + end interface + + interface + double precision function dnrm2 ( N, X, INCX ) + implicit none + integer, intent(in) :: INCX, n !vz_i + double precision,intent(in) :: X( * ) !vz_i + end function dnrm2 + end interface + + interface + subroutine drot (n,dx,incx,dy,incy,c,s) + implicit none + integer :: incx + integer :: incy + integer :: n + double precision :: c + double precision :: s + double precision :: dx(*) + double precision :: dy(*) + end subroutine drot + end interface + + interface + subroutine drotg(da,db,c,s) + implicit none + double precision :: c + double precision :: da + double precision :: db + double precision :: s + end subroutine drotg + end interface + + interface + subroutine drotm (N,DX,INCX,DY,INCY,DPARAM) + implicit none + integer :: INCX + integer :: INCY + integer :: N + double precision :: DPARAM(5) + double precision :: DX(1) + double precision :: DY(1) + end subroutine drotm + end interface + + interface + subroutine drotmg (DD1,DD2,DX1,DY1,DPARAM) + implicit none + double precision :: DD1 + double precision :: DD2 + double precision :: DPARAM(5) + double precision :: DX1 + double precision :: DY1 + end subroutine drotmg + end interface + + interface + subroutine dsbmv ( UPLO, N, K, ALPHA, A, LDA, X, INCX,& + BETA, Y, INCY ) + implicit none + integer :: INCX + integer :: INCY + integer :: K + integer :: LDA + integer :: N + double precision :: A( LDA, * ) + double precision :: ALPHA + double precision :: BETA + character*1 :: UPLO + double precision :: X( * ) + double precision :: Y( * ) + end subroutine dsbmv + end interface + + interface + subroutine dscal(n,da,dx,incx) + implicit none + integer :: incx + integer :: n + double precision :: da + double precision :: dx(*) + end subroutine dscal + end interface + + interface + double precision function dsdot (N, SX, INCX, SY, INCY) + implicit none + integer :: INCX + integer :: INCY + integer :: N + real :: SX(*) + real :: SY(*) + end function dsdot + end interface + + interface + subroutine dswap (n,dx,incx,dy,incy) + implicit none + integer :: incx + integer :: incy + integer :: n + double precision :: dx(*) + double precision :: dy(*) + end subroutine dswap + end interface + + interface + subroutine dsymm ( SIDE, UPLO, M, N, ALPHA, A, LDA, B, LDB,& + BETA, C, LDC ) + implicit none + integer :: LDA + integer :: LDB + integer :: LDC + integer :: M + integer :: N + double precision :: A( LDA, * ) + double precision :: ALPHA + double precision :: B( LDB, * ) + double precision :: BETA + double precision :: C( LDC, * ) + character*1 :: SIDE + character*1 :: UPLO + end subroutine dsymm + end interface + + interface + subroutine dsymv ( UPLO, N, ALPHA, A, LDA, X, INCX,& + BETA, Y, INCY ) + implicit none + integer :: INCX + integer :: INCY + integer :: LDA + integer :: N + double precision :: A( LDA, * ) + double precision :: ALPHA + double precision :: BETA + character*1 :: UPLO + double precision :: X( * ) + double precision :: Y( * ) + end subroutine dsymv + end interface + + interface + subroutine dtrmm ( SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA, A, LDA,& + B, LDB ) + implicit none + integer :: LDA + integer :: LDB + integer :: M + integer :: N + double precision :: A( LDA, * ) + double precision :: ALPHA + double precision :: B( LDB, * ) + character*1 :: DIAG + character*1 :: SIDE + character*1 :: TRANSA + character*1 :: UPLO + end subroutine dtrmm + end interface + + interface + subroutine dtrmv ( UPLO, TRANS, DIAG, N, A, LDA, X, INCX ) + implicit none + integer :: INCX + integer :: LDA + integer :: N + double precision :: A( LDA, * ) + character*1 :: DIAG + character*1 :: TRANS + character*1 :: UPLO + double precision :: X( * ) + end subroutine dtrmv + end interface + + interface + subroutine dtrsm ( SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA, A, LDA,& + B, LDB ) + implicit none + integer :: LDA + integer :: LDB + integer :: M + integer :: N + double precision :: A( LDA, * ) + double precision :: ALPHA + double precision :: B( LDB, * ) + character*1 :: DIAG + character*1 :: SIDE + character*1 :: TRANSA + character*1 :: UPLO + end subroutine dtrsm + end interface + + interface + subroutine dtrsv ( UPLO, TRANS, DIAG, N, A, LDA, X, INCX ) + implicit none + integer :: INCX + integer :: LDA + integer :: N + double precision :: A( LDA, * ) + character*1 :: DIAG + character*1 :: TRANS + character*1 :: UPLO + double precision :: X( * ) + end subroutine dtrsv + end interface + + interface + double precision function dzasum(n,zx,incx) + implicit none + integer :: incx + integer :: n + double complex :: zx(*) + end function dzasum + end interface + + interface + double precision function dznrm2( N, X, INCX ) + implicit none + integer, intent(in) :: INCX, n !vz_i + complex*16,intent(in) :: X( * ) !vz_i + end function dznrm2 + end interface + + interface + integer function icamax(n,cx,incx) + implicit none + integer :: incx + integer :: n + complex :: cx(*) + end function icamax + end interface + + interface + integer function idamax(n,dx,incx) + implicit none + integer :: incx + integer :: n + double precision :: dx(*) + end function idamax + end interface + + interface + integer function isamax(n,sx,incx) + implicit none + integer :: incx + integer :: n + real :: sx(*) + end function isamax + end interface + + interface + integer function izamax(n,zx,incx) + implicit none + integer :: incx + integer :: n + double complex :: zx(*) + end function izamax + end interface + + interface + real function sasum(n,sx,incx) + implicit none + integer :: incx + integer :: n + real :: sx(*) + end function sasum + end interface + + interface + subroutine saxpy(n,sa,sx,incx,sy,incy) + implicit none + integer :: incx + integer :: incy + integer :: n + real :: sa + real :: sx(*) + real :: sy(*) + end subroutine saxpy + end interface + + interface + real function scasum(n,cx,incx) + implicit none + integer :: incx + integer :: n + complex :: cx(*) + end function scasum + end interface + + interface + real function scnrm2( N, X, INCX ) + implicit none + integer, intent(in) :: INCX, n !vz_i + complex, intent(in) :: X( * ) !vz_i + end function scnrm2 + end interface + + interface + subroutine scopy(n,sx,incx,sy,incy) + implicit none + integer, intent(in) :: incx,incy,n !vz_i + real, intent(in) :: sx(*) !vz_i + real, intent(inout) :: sy(*) !vz_i + end subroutine scopy + end interface + + interface + real function sdot(n,sx,incx,sy,incy) + implicit none + integer :: incx + integer :: incy + integer :: n + real :: sx(*) + real :: sy(*) + end function sdot + end interface + + interface + real function sdsdot (N, SB, SX, INCX, SY, INCY) + implicit none + integer :: INCX + integer :: INCY + integer :: N + real :: SB + real :: SX(*) + real :: SY(*) + end function sdsdot + end interface + + interface + subroutine sgbmv ( TRANS, M, N, KL, KU, ALPHA, A, LDA, X, INCX,& + BETA, Y, INCY ) + implicit none + integer :: INCX + integer :: INCY + integer :: KL + integer :: KU + integer :: LDA + integer :: M + integer :: N + real :: A( LDA, * ) + real :: ALPHA + real :: BETA + character*1 :: TRANS + real :: X( * ) + real :: Y( * ) + end subroutine sgbmv + end interface + + interface + subroutine sgemm ( TRANSA, TRANSB, M, N, K, ALPHA, A, LDA, B, LDB,& + BETA, C, LDC ) + implicit none + integer, intent(in) :: K,lda,ldb,ldc,m,n !vz_i + real,intent(in) :: A( LDA, * ) !vz_i + real,intent(in) :: ALPHA !vz_i + real,intent(in) :: B( LDB, * ) !vz_i + real,intent(in) :: BETA !vz_i + real,intent(inout) :: C( LDC, * ) !vz_i + character*1,intent(in) :: TRANSA !vz_i + character*1,intent(in) :: TRANSB !vz_i + end subroutine sgemm + end interface + + interface + subroutine sgemv ( TRANS, M, N, ALPHA, A, LDA, X, INCX,& + BETA, Y, INCY ) + implicit none + integer,intent(in) :: INCX, incy, lda,m,n !vz_i + real,intent(in) :: A( LDA, * ) !vz_i + real,intent(in) :: ALPHA !vz_i + real,intent(in) :: BETA !vz_i + character*1,intent(in) :: TRANS !vz_i + real,intent(in) :: X( * ) !vz_i + real,intent(inout) :: Y( * ) !vz_i + end subroutine sgemv + end interface + + interface + subroutine sger ( M, N, ALPHA, X, INCX, Y, INCY, A, LDA ) + implicit none + integer :: INCX + integer :: INCY + integer :: LDA + integer :: M + integer :: N + real :: A( LDA, * ) + real :: ALPHA + real :: X( * ) + real :: Y( * ) + end subroutine sger + end interface + + interface + real function snrm2 ( N, X, INCX ) + implicit none + integer,intent(in) :: INCX,n !vz_i + real,intent(in) :: X( * ) !vz_i + end function snrm2 + end interface + + interface + subroutine srot (n,sx,incx,sy,incy,c,s) + implicit none + integer :: incx + integer :: incy + integer :: n + real :: c + real :: s + real :: sx(*) + real :: sy(*) + end subroutine srot + end interface + + interface + subroutine srotg(sa,sb,c,s) + implicit none + real :: c + real :: s + real :: sa + real :: sb + end subroutine srotg + end interface + + interface + subroutine srotm (N,SX,INCX,SY,INCY,SPARAM) + implicit none + integer :: INCX + integer :: INCY + integer :: N + real :: SPARAM(5) + real :: SX(1) + real :: SY(1) + end subroutine srotm + end interface + + interface + subroutine srotmg (SD1,SD2,SX1,SY1,SPARAM) + implicit none + real :: SD1 + real :: SD2 + real :: SPARAM(5) + real :: SX1 + real :: SY1 + end subroutine srotmg + end interface + + interface + subroutine ssbmv ( UPLO, N, K, ALPHA, A, LDA, X, INCX,& + BETA, Y, INCY ) + implicit none + integer :: INCX + integer :: INCY + integer :: K + integer :: LDA + integer :: N + real :: A( LDA, * ) + real :: ALPHA + real :: BETA + character*1 :: UPLO + real :: X( * ) + real :: Y( * ) + end subroutine ssbmv + end interface + + interface + subroutine sscal(n,sa,sx,incx) + implicit none + integer :: incx + integer :: n + real :: sa + real :: sx(*) + end subroutine sscal + end interface + + interface + subroutine sspmv ( UPLO, N, ALPHA, AP, X, INCX, BETA, Y, INCY ) + implicit none + integer :: INCX + integer :: INCY + integer :: N + real :: ALPHA + real :: AP( * ) + real :: BETA + character*1 :: UPLO + real :: X( * ) + real :: Y( * ) + end subroutine sspmv + end interface + + interface + subroutine sspr ( UPLO, N, ALPHA, X, INCX, AP ) + implicit none + integer :: INCX + integer :: N + real :: ALPHA + real :: AP( * ) + character*1 :: UPLO + real :: X( * ) + end subroutine sspr + end interface + + interface + subroutine sspr2 ( UPLO, N, ALPHA, X, INCX, Y, INCY, AP ) + implicit none + integer :: INCX + integer :: INCY + integer :: N + real :: ALPHA + real :: AP( * ) + character*1 :: UPLO + real :: X( * ) + real :: Y( * ) + end subroutine sspr2 + end interface + + interface + subroutine sswap (n,sx,incx,sy,incy) + implicit none + integer :: incx + integer :: incy + integer :: n + real :: sx(*) + real :: sy(*) + end subroutine sswap + end interface + + interface + subroutine ssymm ( SIDE, UPLO, M, N, ALPHA, A, LDA, B, LDB,& + BETA, C, LDC ) + implicit none + integer :: LDA + integer :: LDB + integer :: LDC + integer :: M + integer :: N + real :: A( LDA, * ) + real :: ALPHA + real :: B( LDB, * ) + real :: BETA + real :: C( LDC, * ) + character*1 :: SIDE + character*1 :: UPLO + end subroutine ssymm + end interface + + interface + subroutine ssymv ( UPLO, N, ALPHA, A, LDA, X, INCX,& + BETA, Y, INCY ) + implicit none + integer :: INCX + integer :: INCY + integer :: LDA + integer :: N + real :: A( LDA, * ) + real :: ALPHA + real :: BETA + character*1 :: UPLO + real :: X( * ) + real :: Y( * ) + end subroutine ssymv + end interface + + interface + subroutine ssyr ( UPLO, N, ALPHA, X, INCX, A, LDA ) + implicit none + integer :: INCX + integer :: LDA + integer :: N + real :: A( LDA, * ) + real :: ALPHA + character*1 :: UPLO + real :: X( * ) + end subroutine ssyr + end interface + + interface + subroutine ssyr2 ( UPLO, N, ALPHA, X, INCX, Y, INCY, A, LDA ) + implicit none + integer :: INCX + integer :: INCY + integer :: LDA + integer :: N + real :: A( LDA, * ) + real :: ALPHA + character*1 :: UPLO + real :: X( * ) + real :: Y( * ) + end subroutine ssyr2 + end interface + + interface + subroutine ssyr2k( UPLO, TRANS, N, K, ALPHA, A, LDA, B, LDB,& + BETA, C, LDC ) + implicit none + integer :: K + integer :: LDA + integer :: LDB + integer :: LDC + integer :: N + real :: A( LDA, * ) + real :: ALPHA + real :: B( LDB, * ) + real :: BETA + real :: C( LDC, * ) + character*1 :: TRANS + character*1 :: UPLO + end subroutine ssyr2k + end interface + + interface + subroutine ssyrk ( UPLO, TRANS, N, K, ALPHA, A, LDA,& + BETA, C, LDC ) + implicit none + integer :: K + integer :: LDA + integer :: LDC + integer :: N + real :: A( LDA, * ) + real :: ALPHA + real :: BETA + real :: C( LDC, * ) + character*1 :: TRANS + character*1 :: UPLO + end subroutine ssyrk + end interface + + interface + subroutine stbmv ( UPLO, TRANS, DIAG, N, K, A, LDA, X, INCX ) + implicit none + integer :: INCX + integer :: K + integer :: LDA + integer :: N + real :: A( LDA, * ) + character*1 :: DIAG + character*1 :: TRANS + character*1 :: UPLO + real :: X( * ) + end subroutine stbmv + end interface + + interface + subroutine stbsv ( UPLO, TRANS, DIAG, N, K, A, LDA, X, INCX ) + implicit none + integer :: INCX + integer :: K + integer :: LDA + integer :: N + real :: A( LDA, * ) + character*1 :: DIAG + character*1 :: TRANS + character*1 :: UPLO + real :: X( * ) + end subroutine stbsv + end interface + + interface + subroutine stpmv ( UPLO, TRANS, DIAG, N, AP, X, INCX ) + implicit none + integer :: INCX + integer :: N + real :: AP( * ) + character*1 :: DIAG + character*1 :: TRANS + character*1 :: UPLO + real :: X( * ) + end subroutine stpmv + end interface + + interface + subroutine stpsv ( UPLO, TRANS, DIAG, N, AP, X, INCX ) + implicit none + integer :: INCX + integer :: N + real :: AP( * ) + character*1 :: DIAG + character*1 :: TRANS + character*1 :: UPLO + real :: X( * ) + end subroutine stpsv + end interface + + interface + subroutine strmm ( SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA, A, LDA,& + B, LDB ) + implicit none + integer :: LDA + integer :: LDB + integer :: M + integer :: N + real :: A( LDA, * ) + real :: ALPHA + real :: B( LDB, * ) + character*1 :: DIAG + character*1 :: SIDE + character*1 :: TRANSA + character*1 :: UPLO + end subroutine strmm + end interface + + interface + subroutine strmv ( UPLO, TRANS, DIAG, N, A, LDA, X, INCX ) + implicit none + integer :: INCX + integer :: LDA + integer :: N + real :: A( LDA, * ) + character*1 :: DIAG + character*1 :: TRANS + character*1 :: UPLO + real :: X( * ) + end subroutine strmv + end interface + + interface + subroutine strsm ( SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA, A, LDA,& + B, LDB ) + implicit none + integer :: LDA + integer :: LDB + integer :: M + integer :: N + real :: A( LDA, * ) + real :: ALPHA + real :: B( LDB, * ) + character*1 :: DIAG + character*1 :: SIDE + character*1 :: TRANSA + character*1 :: UPLO + end subroutine strsm + end interface + + interface + subroutine strsv ( UPLO, TRANS, DIAG, N, A, LDA, X, INCX ) + implicit none + integer :: INCX + integer :: LDA + integer :: N + real :: A( LDA, * ) + character*1 :: DIAG + character*1 :: TRANS + character*1 :: UPLO + real :: X( * ) + end subroutine strsv + end interface + + !interface + ! subroutine zaxpy(n,za,zx,incx,zy,incy) + ! implicit none + ! integer :: incx + ! integer :: incy + ! integer :: n + ! double complex :: za + ! double complex :: zx(*) + ! double complex :: zy(*) + ! end subroutine zaxpy + !end interface + + !interface + ! subroutine zcopy(n,zx,incx,zy,incy) + ! implicit none + ! integer :: incx + ! integer :: incy + ! integer :: n + ! double complex :: zx(*) + ! double complex :: zy(*) + ! end subroutine zcopy + !end interface + + !interface + ! double complex function zdotc(n,zx,incx,zy,incy) + ! implicit none + ! integer :: incx + ! integer :: incy + ! integer :: n + ! double complex :: zx(*) + ! double complex :: zy(*) + ! end function zdotc + !end interface + + interface + double complex function zdotu(n,zx,incx,zy,incy) + implicit none + integer, intent(in) :: incx, incy, n !vz_i + double complex, intent(in) :: zx(*), zy(*) !vz_i + end function zdotu + end interface + + interface + subroutine zdrot( N, CX, INCX, CY, INCY, C, S ) + implicit none + integer :: INCX + integer :: INCY + integer :: N + double precision :: C + complex*16 :: CX( * ) + complex*16 :: CY( * ) + double precision :: S + end subroutine zdrot + end interface + + !interface + ! subroutine zdscal(n,da,zx,incx) + ! implicit none + ! integer :: incx + ! integer :: n + ! double precision :: da + ! double complex :: zx(*) + ! end subroutine zdscal + !end interface + + interface + subroutine zgbmv ( TRANS, M, N, KL, KU, ALPHA, A, LDA, X, INCX,& + BETA, Y, INCY ) + implicit none + integer :: INCX + integer :: INCY + integer :: KL + integer :: KU + integer :: LDA + integer :: M + integer :: N + complex*16 :: A( LDA, * ) + complex*16 :: ALPHA + complex*16 :: BETA + character*1 :: TRANS + complex*16 :: X( * ) + complex*16 :: Y( * ) + end subroutine zgbmv + end interface + + !interface + ! subroutine zgemm ( TRANSA, TRANSB, M, N, K, ALPHA, A, LDA, B, LDB, BETA, C, LDC ) + ! implicit none + ! integer :: K + ! integer :: LDA + ! integer :: LDB + ! integer :: LDC + ! integer :: M + ! integer :: N + ! complex*16 :: A( LDA, * ) + ! complex*16 :: ALPHA + ! complex*16 :: B( LDB, * ) + ! complex*16 :: BETA + ! complex*16 :: C( LDC, * ) + ! character*1 :: TRANSA + ! character*1 :: TRANSB + ! end subroutine zgemm + !end interface + + !interface + ! subroutine zgemv ( TRANS, M, N, ALPHA, A, LDA, X, INCX, BETA, Y, INCY ) + ! implicit none + ! integer :: INCX + ! integer :: INCY + ! integer :: LDA + ! integer :: M + ! integer :: N + ! complex*16 :: A( LDA, * ) + ! complex*16 :: ALPHA + ! complex*16 :: BETA + ! character*1 :: TRANS + ! complex*16 :: X( * ) + ! complex*16 :: Y( * ) + ! end subroutine zgemv + !end interface + + !interface + ! subroutine zgerc ( M, N, ALPHA, X, INCX, Y, INCY, A, LDA ) + ! implicit none + ! integer :: INCX + ! integer :: INCY + ! integer :: LDA + ! integer :: M + ! integer :: N + ! complex*16 :: A( LDA, * ) + ! complex*16 :: ALPHA + ! complex*16 :: X( * ) + ! complex*16 :: Y( * ) + ! end subroutine zgerc + !end interface + + interface + subroutine zgeru ( M, N, ALPHA, X, INCX, Y, INCY, A, LDA ) + implicit none + integer :: INCX + integer :: INCY + integer :: LDA + integer :: M + integer :: N + complex*16 :: A( LDA, * ) + complex*16 :: ALPHA + complex*16 :: X( * ) + complex*16 :: Y( * ) + end subroutine zgeru + end interface + + interface + subroutine zhbmv ( UPLO, N, K, ALPHA, A, LDA, X, INCX,& + BETA, Y, INCY ) + implicit none + integer :: INCX + integer :: INCY + integer :: K + integer :: LDA + integer :: N + complex*16 :: A( LDA, * ) + complex*16 :: ALPHA + complex*16 :: BETA + character*1 :: UPLO + complex*16 :: X( * ) + complex*16 :: Y( * ) + end subroutine zhbmv + end interface + + !interface + ! subroutine zhemm ( SIDE, UPLO, M, N, ALPHA, A, LDA, B, LDB, BETA, C, LDC ) + ! implicit none + ! integer :: LDA + ! integer :: LDB + ! integer :: LDC + ! integer :: M + ! integer :: N + ! complex*16 :: A( LDA, * ) + ! complex*16 :: ALPHA + ! complex*16 :: B( LDB, * ) + ! complex*16 :: BETA + ! complex*16 :: C( LDC, * ) + ! character*1 :: SIDE + ! character*1 :: UPLO + ! end subroutine zhemm + !end interface + + interface + subroutine zhemv ( UPLO, N, ALPHA, A, LDA, X, INCX,& + BETA, Y, INCY ) + implicit none + integer :: INCX + integer :: INCY + integer :: LDA + integer :: N + complex*16 :: A( LDA, * ) + complex*16 :: ALPHA + complex*16 :: BETA + character*1 :: UPLO + complex*16 :: X( * ) + complex*16 :: Y( * ) + end subroutine zhemv + end interface + + !interface + ! subroutine zher ( UPLO, N, ALPHA, X, INCX, A, LDA ) + ! implicit none + ! integer :: INCX + ! integer :: LDA + ! integer :: N + ! complex*16 :: A( LDA, * ) + ! double precision :: ALPHA + ! character*1 :: UPLO + ! complex*16 :: X( * ) + ! end subroutine zher + !end interface + + interface + subroutine zher2 ( UPLO, N, ALPHA, X, INCX, Y, INCY, A, LDA ) + implicit none + integer :: INCX + integer :: INCY + integer :: LDA + integer :: N + complex*16 :: A( LDA, * ) + complex*16 :: ALPHA + character*1 :: UPLO + complex*16 :: X( * ) + complex*16 :: Y( * ) + end subroutine zher2 + end interface + + interface + subroutine zher2k( UPLO, TRANS, N, K, ALPHA, A, LDA, B, LDB, BETA,& + C, LDC ) + implicit none + integer :: K + integer :: LDA + integer :: LDB + integer :: LDC + integer :: N + complex*16 :: A( LDA, * ) + complex*16 :: ALPHA + complex*16 :: B( LDB, * ) + double precision :: BETA + complex*16 :: C( LDC, * ) + character :: TRANS + character :: UPLO + end subroutine zher2k + end interface + + !interface + ! subroutine zherk( UPLO, TRANS, N, K, ALPHA, A, LDA, BETA, C, LDC ) + ! implicit none + ! integer :: K + ! integer :: LDA + ! integer :: LDC + ! integer :: N + ! complex*16 :: A( LDA, * ) + ! double precision :: ALPHA + ! double precision :: BETA + ! complex*16 :: C( LDC, * ) + ! character :: TRANS + ! character :: UPLO + ! end subroutine zherk + !end interface + + interface + subroutine zhpmv ( UPLO, N, ALPHA, AP, X, INCX, BETA, Y, INCY ) + implicit none + integer :: INCX + integer :: INCY + integer :: N + complex*16 :: ALPHA + complex*16 :: AP( * ) + complex*16 :: BETA + character*1 :: UPLO + complex*16 :: X( * ) + complex*16 :: Y( * ) + end subroutine zhpmv + end interface + + interface + subroutine zhpr ( UPLO, N, ALPHA, X, INCX, AP ) + implicit none + integer :: INCX + integer :: N + double precision :: ALPHA + complex*16 :: AP( * ) + character*1 :: UPLO + complex*16 :: X( * ) + end subroutine zhpr + end interface + + interface + subroutine zhpr2 ( UPLO, N, ALPHA, X, INCX, Y, INCY, AP ) + implicit none + integer :: INCX + integer :: INCY + integer :: N + complex*16 :: ALPHA + complex*16 :: AP( * ) + character*1 :: UPLO + complex*16 :: X( * ) + complex*16 :: Y( * ) + end subroutine zhpr2 + end interface + + interface + subroutine zrotg(ca,cb,c,s) + implicit none + double precision :: c + double complex :: ca + double complex :: cb + double complex :: s + end subroutine zrotg + end interface + + !interface + ! subroutine zscal(n,za,zx,incx) + ! implicit none + ! integer :: incx + ! integer :: n + ! double complex :: za + ! double complex :: zx(*) + ! end subroutine zscal + !end interface + + interface + subroutine zswap (n,zx,incx,zy,incy) + implicit none + integer :: incx + integer :: incy + integer :: n + double complex :: zx(*) + double complex :: zy(*) + end subroutine zswap + end interface + + interface + subroutine zsymm ( SIDE, UPLO, M, N, ALPHA, A, LDA, B, LDB,& + BETA, C, LDC ) + implicit none + integer :: LDA + integer :: LDB + integer :: LDC + integer :: M + integer :: N + complex*16 :: A( LDA, * ) + complex*16 :: ALPHA + complex*16 :: B( LDB, * ) + complex*16 :: BETA + complex*16 :: C( LDC, * ) + character*1 :: SIDE + character*1 :: UPLO + end subroutine zsymm + end interface + + interface + subroutine zsyr2k( UPLO, TRANS, N, K, ALPHA, A, LDA, B, LDB,& + BETA, C, LDC ) + implicit none + integer :: K + integer :: LDA + integer :: LDB + integer :: LDC + integer :: N + complex*16 :: A( LDA, * ) + complex*16 :: ALPHA + complex*16 :: B( LDB, * ) + complex*16 :: BETA + complex*16 :: C( LDC, * ) + character*1 :: TRANS + character*1 :: UPLO + end subroutine zsyr2k + end interface + + interface + subroutine zsyrk ( UPLO, TRANS, N, K, ALPHA, A, LDA,& + BETA, C, LDC ) + implicit none + integer :: K + integer :: LDA + integer :: LDC + integer :: N + complex*16 :: A( LDA, * ) + complex*16 :: ALPHA + complex*16 :: BETA + complex*16 :: C( LDC, * ) + character*1 :: TRANS + character*1 :: UPLO + end subroutine zsyrk + end interface + + interface + subroutine ztbmv ( UPLO, TRANS, DIAG, N, K, A, LDA, X, INCX ) + implicit none + integer :: INCX + integer :: K + integer :: LDA + integer :: N + complex*16 :: A( LDA, * ) + character*1 :: DIAG + character*1 :: TRANS + character*1 :: UPLO + complex*16 :: X( * ) + end subroutine ztbmv + end interface + + interface + subroutine ztbsv ( UPLO, TRANS, DIAG, N, K, A, LDA, X, INCX ) + implicit none + integer :: INCX + integer :: K + integer :: LDA + integer :: N + complex*16 :: A( LDA, * ) + character*1 :: DIAG + character*1 :: TRANS + character*1 :: UPLO + complex*16 :: X( * ) + end subroutine ztbsv + end interface + + interface + subroutine ztpmv ( UPLO, TRANS, DIAG, N, AP, X, INCX ) + implicit none + integer :: INCX + integer :: N + complex*16 :: AP( * ) + character*1 :: DIAG + character*1 :: TRANS + character*1 :: UPLO + complex*16 :: X( * ) + end subroutine ztpmv + end interface + + interface + subroutine ztpsv ( UPLO, TRANS, DIAG, N, AP, X, INCX ) + implicit none + integer :: INCX + integer :: N + complex*16 :: AP( * ) + character*1 :: DIAG + character*1 :: TRANS + character*1 :: UPLO + complex*16 :: X( * ) + end subroutine ztpsv + end interface + + interface + subroutine ztrmm ( SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA, A, LDA,& + B, LDB ) + implicit none + integer :: LDA + integer :: LDB + integer :: M + integer :: N + complex*16 :: A( LDA, * ) + complex*16 :: ALPHA + complex*16 :: B( LDB, * ) + character*1 :: DIAG + character*1 :: SIDE + character*1 :: TRANSA + character*1 :: UPLO + end subroutine ztrmm + end interface + + interface + subroutine ztrmv ( UPLO, TRANS, DIAG, N, A, LDA, X, INCX ) + implicit none + integer :: INCX + integer :: LDA + integer :: N + complex*16 :: A( LDA, * ) + character*1 :: DIAG + character*1 :: TRANS + character*1 :: UPLO + complex*16 :: X( * ) + end subroutine ztrmv + end interface + + !interface + ! subroutine ztrsm ( SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA, A, LDA, B, LDB ) + ! implicit none + ! integer :: LDA + ! integer :: LDB + ! integer :: M + ! integer :: N + ! complex*16 :: A( LDA, * ) + ! complex*16 :: ALPHA + ! complex*16 :: B( LDB, * ) + ! character*1 :: DIAG + ! character*1 :: SIDE + ! character*1 :: TRANSA + ! character*1 :: UPLO + ! end subroutine ztrsm + !end interface + + interface + subroutine ztrsv ( UPLO, TRANS, DIAG, N, A, LDA, X, INCX ) + implicit none + integer :: INCX + integer :: LDA + integer :: N + complex*16 :: A( LDA, * ) + character*1 :: DIAG + character*1 :: TRANS + character*1 :: UPLO + complex*16 :: X( * ) + end subroutine ztrsv + end interface + + interface + subroutine cgetf2( M, N, A, LDA, IPIV, INFO ) + implicit none + integer :: INFO + integer :: IPIV( * ) + integer :: LDA + integer :: M + integer :: N + complex :: A( LDA, * ) + end subroutine cgetf2 + end interface + + interface + subroutine cgetrf( M, N, A, LDA, IPIV, INFO ) + implicit none + integer :: INFO + integer :: IPIV( * ) + integer :: LDA + integer :: M + integer :: N + complex :: A( LDA, * ) + end subroutine cgetrf + end interface + + interface + subroutine cgetri( N, A, LDA, IPIV, WORK, LWORK, INFO ) + implicit none + integer :: INFO + integer :: IPIV( * ) + integer :: LDA + integer :: LWORK + integer :: N + complex :: A( LDA, * ) + complex :: WORK( * ) + end subroutine cgetri + end interface + + interface + subroutine chpev( JOBZ, UPLO, N, AP, W, Z, LDZ, WORK, RWORK,& + INFO ) + implicit none + integer :: INFO + integer :: LDZ + integer :: N + complex :: AP( * ) + character :: JOBZ + real :: RWORK( * ) + character :: UPLO + real :: W( * ) + complex :: WORK( * ) + complex :: Z( LDZ, * ) + end subroutine chpev + end interface + + interface + subroutine chptrd( UPLO, N, AP, D, E, TAU, INFO ) + implicit none + integer :: INFO + integer :: N + complex :: AP( * ) + real :: D( * ) + real :: E( * ) + complex :: TAU( * ) + character :: UPLO + end subroutine chptrd + end interface + + interface + complex function cladiv( X, Y ) + implicit none + complex :: X + complex :: Y + end function cladiv + end interface + + interface + real function clanhp( NORM, UPLO, N, AP, WORK ) + implicit none + integer :: N + complex :: AP( * ) + character :: NORM + character :: UPLO + real :: WORK( * ) + end function clanhp + end interface + + interface + subroutine clarf( SIDE, M, N, V, INCV, TAU, C, LDC, WORK ) + implicit none + integer :: INCV + integer :: LDC + integer :: M + integer :: N + complex :: C( LDC, * ) + character :: SIDE + complex :: TAU + complex :: V( * ) + complex :: WORK( * ) + end subroutine clarf + end interface + + interface + subroutine clarfg( N, ALPHA, X, INCX, TAU ) + implicit none + integer :: INCX + integer :: N + complex :: ALPHA + complex :: TAU + complex :: X( * ) + end subroutine clarfg + end interface + + interface + subroutine clasr( SIDE, PIVOT, DIRECT, M, N, C, S, A, LDA ) + implicit none + integer :: LDA + integer :: M + integer :: N + complex :: A( LDA, * ) + real :: C( * ) + character :: DIRECT + character :: PIVOT + real :: S( * ) + character :: SIDE + end subroutine clasr + end interface + + interface + subroutine classq( N, X, INCX, SCALE, SUMSQ ) + implicit none + integer :: INCX + integer :: N + real :: SCALE + real :: SUMSQ + complex :: X( * ) + end subroutine classq + end interface + + interface + subroutine claswp( N, A, LDA, K1, K2, IPIV, INCX ) + implicit none + integer :: INCX + integer :: IPIV( * ) + integer :: K1 + integer :: K2 + integer :: LDA + integer :: N + complex :: A( LDA, * ) + end subroutine claswp + end interface + + interface + subroutine clazro( M, N, ALPHA, BETA, A, LDA ) + implicit none + integer :: LDA + integer :: M + integer :: N + complex :: A( LDA, * ) + complex :: ALPHA + complex :: BETA + end subroutine clazro + end interface + + interface + subroutine csteqr( COMPZ, N, D, E, Z, LDZ, WORK, INFO ) + implicit none + integer :: INFO + integer :: LDZ + integer :: N + character :: COMPZ + real :: D( * ) + real :: E( * ) + real :: WORK( * ) + complex :: Z( LDZ, * ) + end subroutine csteqr + end interface + + interface + subroutine ctrtri( UPLO, DIAG, N, A, LDA, INFO ) + implicit none + integer :: INFO + integer :: LDA + integer :: N + complex :: A( LDA, * ) + character :: DIAG + character :: UPLO + end subroutine ctrtri + end interface + + interface + subroutine cung2l( M, N, K, A, LDA, TAU, WORK, INFO ) + implicit none + integer :: INFO + integer :: K + integer :: LDA + integer :: M + integer :: N + complex :: A( LDA, * ) + complex :: TAU( * ) + complex :: WORK( * ) + end subroutine cung2l + end interface + + interface + subroutine cung2r( M, N, K, A, LDA, TAU, WORK, INFO ) + implicit none + integer :: INFO + integer :: K + integer :: LDA + integer :: M + integer :: N + complex :: A( LDA, * ) + complex :: TAU( * ) + complex :: WORK( * ) + end subroutine cung2r + end interface + + interface + subroutine cupgtr( UPLO, N, AP, TAU, Q, LDQ, WORK, INFO ) + implicit none + integer :: INFO + integer :: LDQ + integer :: N + complex :: AP( * ) + complex :: Q( LDQ, * ) + complex :: TAU( * ) + character :: UPLO + complex :: WORK( * ) + end subroutine cupgtr + end interface + + interface + subroutine dbdsqr( UPLO, N, NCVT, NRU, NCC, D, E, VT, LDVT, U,& + LDU, C, LDC, WORK, INFO ) + implicit none + integer :: INFO + integer :: LDC + integer :: LDU + integer :: LDVT + integer :: N + integer :: NCC + integer :: NCVT + integer :: NRU + double precision :: C( LDC, * ) + double precision :: D( * ) + double precision :: E( * ) + double precision :: U( LDU, * ) + character :: UPLO + double precision :: VT( LDVT, * ) + double precision :: WORK( * ) + end subroutine dbdsqr + end interface + + interface + subroutine dgebd2( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, INFO ) + implicit none + integer :: INFO + integer :: LDA + integer :: M + integer :: N + double precision :: A( LDA, * ) + double precision :: D( * ) + double precision :: E( * ) + double precision :: TAUP( * ) + double precision :: TAUQ( * ) + double precision :: WORK( * ) + end subroutine dgebd2 + end interface + + interface + subroutine dgebrd( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, LWORK,& + INFO ) + implicit none + integer :: INFO + integer :: LDA + integer :: LWORK + integer :: M + integer :: N + double precision :: A( LDA, * ) + double precision :: D( * ) + double precision :: E( * ) + double precision :: TAUP( * ) + double precision :: TAUQ( * ) + double precision :: WORK( * ) + end subroutine dgebrd + end interface + + interface + subroutine dgelq2( M, N, A, LDA, TAU, WORK, INFO ) + implicit none + integer :: INFO + integer :: LDA + integer :: M + integer :: N + double precision :: A( LDA, * ) + double precision :: TAU( * ) + double precision :: WORK( * ) + end subroutine dgelq2 + end interface + + interface + subroutine dgelqf( M, N, A, LDA, TAU, WORK, LWORK, INFO ) + implicit none + integer :: INFO + integer :: LDA + integer :: LWORK + integer :: M + integer :: N + double precision :: A( LDA, * ) + double precision :: TAU( * ) + double precision :: WORK( * ) + end subroutine dgelqf + end interface + + interface + subroutine dgelss( M, N, NRHS, A, LDA, B, LDB, S, RCOND, RANK,& + WORK, LWORK, INFO ) + implicit none + integer :: INFO + integer :: LDA + integer :: LDB + integer :: LWORK + integer :: M + integer :: N + integer :: NRHS + integer :: RANK + double precision :: A( LDA, * ) + double precision :: B( LDB, * ) + double precision :: RCOND + double precision :: S( * ) + double precision :: WORK( * ) + end subroutine dgelss + end interface + + interface + subroutine dgeqr2( M, N, A, LDA, TAU, WORK, INFO ) + implicit none + integer :: INFO + integer :: LDA + integer :: M + integer :: N + double precision :: A( LDA, * ) + double precision :: TAU( * ) + double precision :: WORK( * ) + end subroutine dgeqr2 + end interface + + interface + subroutine dgeqrf( M, N, A, LDA, TAU, WORK, LWORK, INFO ) + implicit none + integer :: INFO + integer :: LDA + integer :: LWORK + integer :: M + integer :: N + double precision :: A( LDA, * ) + double precision :: TAU( * ) + double precision :: WORK( * ) + end subroutine dgeqrf + end interface + + interface + subroutine dgesvd( JOBU, JOBVT, M, N, A, LDA, S, U, LDU, VT, LDVT,& + WORK, LWORK, INFO ) + implicit none + integer :: INFO + integer :: LDA + integer :: LDU + integer :: LDVT + integer :: LWORK + integer :: M + integer :: N + double precision :: A( LDA, * ) + character :: JOBU + character :: JOBVT + double precision :: S( * ) + double precision :: U( LDU, * ) + double precision :: VT( LDVT, * ) + double precision :: WORK( * ) + end subroutine dgesvd + end interface + + interface + subroutine dgetf2( M, N, A, LDA, IPIV, INFO ) + implicit none + integer :: INFO + integer :: IPIV( * ) + integer :: LDA + integer :: M + integer :: N + double precision :: A( LDA, * ) + end subroutine dgetf2 + end interface + + interface + subroutine dgetrf( M, N, A, LDA, IPIV, INFO ) + implicit none + integer :: INFO + integer :: IPIV( * ) + integer :: LDA + integer :: M + integer :: N + double precision :: A( LDA, * ) + end subroutine dgetrf + end interface + + interface + subroutine dgetri( N, A, LDA, IPIV, WORK, LWORK, INFO ) + implicit none + integer :: INFO + integer :: IPIV( * ) + integer :: LDA + integer :: LWORK + integer :: N + double precision :: A( LDA, * ) + double precision :: WORK( * ) + end subroutine dgetri + end interface + + interface + subroutine dopgtr( UPLO, N, AP, TAU, Q, LDQ, WORK, INFO ) + implicit none + integer :: INFO + integer :: LDQ + integer :: N + double precision :: AP( * ) + double precision :: Q( LDQ, * ) + double precision :: TAU( * ) + character :: UPLO + double precision :: WORK( * ) + end subroutine dopgtr + end interface + + interface + subroutine dorg2l( M, N, K, A, LDA, TAU, WORK, INFO ) + implicit none + integer :: INFO + integer :: K + integer :: LDA + integer :: M + integer :: N + double precision :: A( LDA, * ) + double precision :: TAU( * ) + double precision :: WORK( * ) + end subroutine dorg2l + end interface + + interface + subroutine dorg2r( M, N, K, A, LDA, TAU, WORK, INFO ) + implicit none + integer :: INFO + integer :: K + integer :: LDA + integer :: M + integer :: N + double precision :: A( LDA, * ) + double precision :: TAU( * ) + double precision :: WORK( * ) + end subroutine dorg2r + end interface + + interface + subroutine dorgbr( VECT, M, N, K, A, LDA, TAU, WORK, LWORK, INFO ) + implicit none + integer :: INFO + integer :: K + integer :: LDA + integer :: LWORK + integer :: M + integer :: N + double precision :: A( LDA, * ) + double precision :: TAU( * ) + character :: VECT + double precision :: WORK( * ) + end subroutine dorgbr + end interface + + interface + subroutine dorgl2( M, N, K, A, LDA, TAU, WORK, INFO ) + implicit none + integer :: INFO + integer :: K + integer :: LDA + integer :: M + integer :: N + double precision :: A( LDA, * ) + double precision :: TAU( * ) + double precision :: WORK( * ) + end subroutine dorgl2 + end interface + + interface + subroutine dorglq( M, N, K, A, LDA, TAU, WORK, LWORK, INFO ) + implicit none + integer :: INFO + integer :: K + integer :: LDA + integer :: LWORK + integer :: M + integer :: N + double precision :: A( LDA, * ) + double precision :: TAU( * ) + double precision :: WORK( * ) + end subroutine dorglq + end interface + + interface + subroutine dorgql( M, N, K, A, LDA, TAU, WORK, LWORK, INFO ) + implicit none + integer :: INFO + integer :: K + integer :: LDA + integer :: LWORK + integer :: M + integer :: N + double precision :: A( LDA, * ) + double precision :: TAU( * ) + double precision :: WORK( * ) + end subroutine dorgql + end interface + + interface + subroutine dorgqr( M, N, K, A, LDA, TAU, WORK, LWORK, INFO ) + implicit none + integer :: INFO + integer :: K + integer :: LDA + integer :: LWORK + integer :: M + integer :: N + double precision :: A( LDA, * ) + double precision :: TAU( * ) + double precision :: WORK( * ) + end subroutine dorgqr + end interface + + interface + subroutine dorgtr( UPLO, N, A, LDA, TAU, WORK, LWORK, INFO ) + implicit none + integer :: INFO + integer :: LDA + integer :: LWORK + integer :: N + double precision :: A( LDA, * ) + double precision :: TAU( * ) + character :: UPLO + double precision :: WORK( LWORK ) + end subroutine dorgtr + end interface + + interface + subroutine dorm2r( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,& + WORK, INFO ) + implicit none + integer :: INFO + integer :: K + integer :: LDA + integer :: LDC + integer :: M + integer :: N + double precision :: A( LDA, * ) + double precision :: C( LDC, * ) + character :: SIDE + double precision :: TAU( * ) + character :: TRANS + double precision :: WORK( * ) + end subroutine dorm2r + end interface + + interface + subroutine dormbr( VECT, SIDE, TRANS, M, N, K, A, LDA, TAU, C,& + LDC, WORK, LWORK, INFO ) + implicit none + integer :: INFO + integer :: K + integer :: LDA + integer :: LDC + integer :: LWORK + integer :: M + integer :: N + double precision :: A( LDA, * ) + double precision :: C( LDC, * ) + character :: SIDE + double precision :: TAU( * ) + character :: TRANS + character :: VECT + double precision :: WORK( * ) + end subroutine dormbr + end interface + + interface + subroutine dorml2( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,& + WORK, INFO ) + implicit none + integer :: INFO + integer :: K + integer :: LDA + integer :: LDC + integer :: M + integer :: N + double precision :: A( LDA, * ) + double precision :: C( LDC, * ) + character :: SIDE + double precision :: TAU( * ) + character :: TRANS + double precision :: WORK( * ) + end subroutine dorml2 + end interface + + interface + subroutine dormlq( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,& + WORK, LWORK, INFO ) + implicit none + integer :: INFO + integer :: K + integer :: LDA + integer :: LDC + integer :: LWORK + integer :: M + integer :: N + double precision :: A( LDA, * ) + double precision :: C( LDC, * ) + character :: SIDE + double precision :: TAU( * ) + character :: TRANS + double precision :: WORK( * ) + end subroutine dormlq + end interface + + interface + subroutine dormqr( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,& + WORK, LWORK, INFO ) + implicit none + integer :: INFO + integer :: K + integer :: LDA + integer :: LDC + integer :: LWORK + integer :: M + integer :: N + double precision :: A( LDA, * ) + double precision :: C( LDC, * ) + character :: SIDE + double precision :: TAU( * ) + character :: TRANS + double precision :: WORK( * ) + end subroutine dormqr + end interface + + interface + subroutine dposv( UPLO, N, NRHS, A, LDA, B, LDB, INFO ) + implicit none + integer :: INFO + integer :: LDA + integer :: LDB + integer :: N + integer :: NRHS + double precision :: A( LDA, * ) + double precision :: B( LDB, * ) + character :: UPLO + end subroutine dposv + end interface + + interface + subroutine dpotf2( UPLO, N, A, LDA, INFO ) + implicit none + integer :: INFO + integer :: LDA + integer :: N + double precision :: A( LDA, * ) + character :: UPLO + end subroutine dpotf2 + end interface + + interface + subroutine dpotrf( UPLO, N, A, LDA, INFO ) + implicit none + integer :: INFO + integer :: LDA + integer :: N + double precision :: A( LDA, * ) + character :: UPLO + end subroutine dpotrf + end interface + + interface + subroutine dpotrs( UPLO, N, NRHS, A, LDA, B, LDB, INFO ) + implicit none + integer :: INFO + integer :: LDA + integer :: LDB + integer :: N + integer :: NRHS + double precision :: A( LDA, * ) + double precision :: B( LDB, * ) + character :: UPLO + end subroutine dpotrs + end interface + + interface + subroutine dpptrf( UPLO, N, AP, INFO ) + implicit none + integer :: INFO + integer :: N + double precision :: AP( * ) + character :: UPLO + end subroutine dpptrf + end interface + + interface + subroutine dspgst( ITYPE, UPLO, N, AP, BP, INFO ) + implicit none + integer :: INFO + integer :: ITYPE + integer :: N + double precision :: AP( * ) + double precision :: BP( * ) + character :: UPLO + end subroutine dspgst + end interface + + interface + subroutine dspgv( ITYPE, JOBZ, UPLO, N, AP, BP, W, Z, LDZ, WORK,& + INFO ) + implicit none + integer :: INFO + integer :: ITYPE + integer :: LDZ + integer :: N + double precision :: AP( * ) + double precision :: BP( * ) + double precision :: W( * ) + double precision :: WORK( * ) + double precision :: Z( LDZ, * ) + character :: JOBZ + character :: UPLO + end subroutine dspgv + end interface + + interface + subroutine drscl( N, SA, SX, INCX ) + implicit none + integer :: INCX + integer :: N + double precision :: SA + double precision :: SX( * ) + end subroutine drscl + end interface + + interface + subroutine dspev( JOBZ, UPLO, N, AP, W, Z, LDZ, WORK, INFO ) + implicit none + integer :: INFO + integer :: LDZ + integer :: N + double precision :: AP( * ) + character :: JOBZ + character :: UPLO + double precision :: W( * ) + double precision :: WORK( * ) + double precision :: Z( LDZ, * ) + end subroutine dspev + end interface + + interface + subroutine dsptrd( UPLO, N, AP, D, E, TAU, INFO ) + implicit none + integer :: INFO + integer :: N + double precision :: AP( * ) + double precision :: D( * ) + double precision :: E( * ) + double precision :: TAU( * ) + character :: UPLO + end subroutine dsptrd + end interface + + interface + subroutine dstebz( RANGE, ORDER, N, VL, VU, IL, IU, ABSTOL, D, E,& + M, NSPLIT, W, IBLOCK, ISPLIT, WORK, IWORK,& + INFO ) + implicit none + integer :: IBLOCK( * ) + integer :: IL + integer :: INFO + integer :: ISPLIT( * ) + integer :: IU + integer :: IWORK( * ) + integer :: M + integer :: N + integer :: NSPLIT + double precision :: ABSTOL + double precision :: D( * ) + double precision :: E( * ) + character :: ORDER + character :: RANGE + double precision :: VL + double precision :: VU + double precision :: W( * ) + double precision :: WORK( * ) + end subroutine dstebz + end interface + + interface + subroutine dsteqr( COMPZ, N, D, E, Z, LDZ, WORK, INFO ) + implicit none + integer :: INFO + integer :: LDZ + integer :: N + character :: COMPZ + double precision :: D( * ) + double precision :: E( * ) + double precision :: WORK( * ) + double precision :: Z( LDZ, * ) + end subroutine dsteqr + end interface + + interface + subroutine dsterf( N, D, E, INFO ) + implicit none + integer :: INFO + integer :: N + double precision :: D( * ) + double precision :: E( * ) + end subroutine dsterf + end interface + + interface + subroutine dsyev( JOBZ, UPLO, N, A, LDA, W, WORK, LWORK, INFO ) + implicit none + integer :: INFO + integer :: LDA + integer :: LWORK + integer :: N + double precision :: A( LDA, * ) + character :: JOBZ + character :: UPLO + double precision :: W( * ) + double precision :: WORK( * ) + end subroutine dsyev + end interface + + interface + subroutine dsygs2( ITYPE, UPLO, N, A, LDA, B, LDB, INFO ) + implicit none + integer :: INFO + integer :: ITYPE + integer :: LDA + integer :: LDB + integer :: N + double precision :: A( LDA, * ) + double precision :: B( LDB, * ) + character :: UPLO + end subroutine dsygs2 + end interface + + interface + subroutine dsygst( ITYPE, UPLO, N, A, LDA, B, LDB, INFO ) + implicit none + integer :: INFO + integer :: ITYPE + integer :: LDA + integer :: LDB + integer :: N + double precision :: A( LDA, * ) + double precision :: B( LDB, * ) + character :: UPLO + end subroutine dsygst + end interface + + interface + subroutine dsygv( ITYPE, JOBZ, UPLO, N, A, LDA, B, LDB, W, WORK,& + LWORK, INFO ) + implicit none + integer :: INFO + integer :: ITYPE + integer :: LDA + integer :: LDB + integer :: LWORK + integer :: N + double precision :: A( LDA, * ) + double precision :: B( LDB, * ) + character :: JOBZ + character :: UPLO + double precision :: W( * ) + double precision :: WORK( * ) + end subroutine dsygv + end interface + + interface + subroutine dsysv( UPLO, N, NRHS, A, LDA, IPIV, B, LDB, WORK,& + LWORK, INFO ) + implicit none + integer :: INFO + integer :: IPIV( * ) + integer :: LDA + integer :: LDB + integer :: LWORK + integer :: N + integer :: NRHS + double precision :: A( LDA, * ) + double precision :: B( LDB, * ) + character :: UPLO + double precision :: WORK( * ) + end subroutine dsysv + end interface + + interface + subroutine dsytd2( UPLO, N, A, LDA, D, E, TAU, INFO ) + implicit none + integer :: INFO + integer :: LDA + integer :: N + double precision :: A( LDA, * ) + double precision :: D( * ) + double precision :: E( * ) + double precision :: TAU( * ) + character :: UPLO + end subroutine dsytd2 + end interface + + interface + subroutine dsytf2( UPLO, N, A, LDA, IPIV, INFO ) + implicit none + integer :: INFO + integer :: IPIV( * ) + integer :: LDA + integer :: N + double precision :: A( LDA, * ) + character :: UPLO + end subroutine dsytf2 + end interface + + interface + subroutine dsytrd( UPLO, N, A, LDA, D, E, TAU, WORK, LWORK, INFO ) + implicit none + integer :: INFO + integer :: LDA + integer :: LWORK + integer :: N + double precision :: A( LDA, * ) + double precision :: D( * ) + double precision :: E( * ) + double precision :: TAU( * ) + character :: UPLO + double precision :: WORK( * ) + end subroutine dsytrd + end interface + + interface + subroutine dsytrf( UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO ) + implicit none + integer :: INFO + integer :: IPIV( * ) + integer :: LDA + integer :: LWORK + integer :: N + double precision :: A( LDA, * ) + character :: UPLO + double precision :: WORK( * ) + end subroutine dsytrf + end interface + + interface + subroutine dsytrs( UPLO, N, NRHS, A, LDA, IPIV, B, LDB, INFO ) + implicit none + integer :: INFO + integer :: IPIV( * ) + integer :: LDA + integer :: LDB + integer :: N + integer :: NRHS + double precision :: A( LDA, * ) + double precision :: B( LDB, * ) + character :: UPLO + end subroutine dsytrs + end interface + + interface + subroutine dtrti2( UPLO, DIAG, N, A, LDA, INFO ) + implicit none + integer :: INFO + integer :: LDA + integer :: N + double precision :: A( LDA, * ) + character :: DIAG + character :: UPLO + end subroutine dtrti2 + end interface + + interface + subroutine dtrtri( UPLO, DIAG, N, A, LDA, INFO ) + implicit none + integer :: INFO + integer :: LDA + integer :: N + double precision :: A( LDA, * ) + character :: DIAG + character :: UPLO + end subroutine dtrtri + end interface + + interface + double precision function dzsum1( N, CX, INCX ) + implicit none + integer :: INCX + integer :: N + complex*16 :: CX( * ) + end function dzsum1 + end interface + + interface + integer function izmax1( N, CX, INCX ) + implicit none + integer :: INCX + integer :: N + complex*16 :: CX( * ) + end function izmax1 + end interface + + interface + subroutine ssterf( N, D, E, INFO ) + implicit none + integer :: INFO + integer :: N + real :: D( * ) + real :: E( * ) + end subroutine ssterf + end interface + + interface + subroutine zbdsqr( UPLO, N, NCVT, NRU, NCC, D, E, VT, LDVT, U,& + LDU, C, LDC, RWORK, INFO ) + implicit none + integer :: INFO + integer :: LDC + integer :: LDU + integer :: LDVT + integer :: N + integer :: NCC + integer :: NCVT + integer :: NRU + complex*16 :: C( LDC, * ) + double precision :: D( * ) + double precision :: E( * ) + double precision :: RWORK( * ) + complex*16 :: U( LDU, * ) + character :: UPLO + complex*16 :: VT( LDVT, * ) + end subroutine zbdsqr + end interface + + interface + subroutine zgebak( JOB, SIDE, N, ILO, IHI, SCALE, M, V, LDV,& + INFO ) + implicit none + integer :: IHI + integer :: ILO + integer :: INFO + integer :: LDV + integer :: M + integer :: N + character :: JOB + double precision :: SCALE( * ) + character :: SIDE + complex*16 :: V( LDV, * ) + end subroutine zgebak + end interface + + interface + subroutine zgebal( JOB, N, A, LDA, ILO, IHI, SCALE, INFO ) + implicit none + integer :: IHI + integer :: ILO + integer :: INFO + integer :: LDA + integer :: N + complex*16 :: A( LDA, * ) + character :: JOB + double precision :: SCALE( * ) + end subroutine zgebal + end interface + + interface + subroutine zgebd2( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, INFO ) + implicit none + integer :: INFO + integer :: LDA + integer :: M + integer :: N + complex*16 :: A( LDA, * ) + double precision :: D( * ) + double precision :: E( * ) + complex*16 :: TAUP( * ) + complex*16 :: TAUQ( * ) + complex*16 :: WORK( * ) + end subroutine zgebd2 + end interface + + interface + subroutine zgebrd( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, LWORK,& + INFO ) + implicit none + integer :: INFO + integer :: LDA + integer :: LWORK + integer :: M + integer :: N + complex*16 :: A( LDA, * ) + double precision :: D( * ) + double precision :: E( * ) + complex*16 :: TAUP( * ) + complex*16 :: TAUQ( * ) + complex*16 :: WORK( * ) + end subroutine zgebrd + end interface + + interface + subroutine zgees( JOBVS, SORT, SELECT, N, A, LDA, SDIM, W, VS,& + LDVS, WORK, LWORK, RWORK, BWORK, INFO ) + implicit none + integer :: INFO + integer :: LDA + integer :: LDVS + integer :: LWORK + integer :: N + integer :: SDIM + complex*16 :: A( LDA, * ) + logical :: BWORK( * ) + character :: JOBVS + double precision :: RWORK( * ) + logical :: SELECT + character :: SORT + complex*16 :: VS( LDVS, * ) + complex*16 :: W( * ) + complex*16 :: WORK( * ) + end subroutine zgees + end interface + + interface + subroutine zgeev( JOBVL, JOBVR, N, A, LDA, W, VL, LDVL, VR, LDVR,& + WORK, LWORK, RWORK, INFO ) + implicit none + character :: JOBVL + character :: JOBVR + integer :: INFO + integer :: LDA + integer :: LDVL + integer :: LDVR + integer :: LWORK + integer :: N + double precision :: RWORK( * ) + complex*16 :: A( LDA, * ) + complex*16 :: VL( LDVL, * ) + complex*16 :: VR( LDVR, * ) + complex*16 :: W( * ) + complex*16 :: WORK( * ) + end subroutine zgeev + end interface + + interface + subroutine zgehd2( N, ILO, IHI, A, LDA, TAU, WORK, INFO ) + implicit none + integer :: IHI + integer :: ILO + integer :: INFO + integer :: LDA + integer :: N + complex*16 :: A( LDA, * ) + complex*16 :: TAU( * ) + complex*16 :: WORK( * ) + end subroutine zgehd2 + end interface + + interface + subroutine zgehrd( N, ILO, IHI, A, LDA, TAU, WORK, LWORK, INFO ) + implicit none + integer :: IHI + integer :: ILO + integer :: INFO + integer :: LDA + integer :: LWORK + integer :: N + complex*16 :: A( LDA, * ) + complex*16 :: TAU( * ) + complex*16 :: WORK( LWORK ) + end subroutine zgehrd + end interface + + interface + subroutine zgelq2( M, N, A, LDA, TAU, WORK, INFO ) + implicit none + integer :: INFO + integer :: LDA + integer :: M + integer :: N + complex*16 :: A( LDA, * ) + complex*16 :: TAU( * ) + complex*16 :: WORK( * ) + end subroutine zgelq2 + end interface + + interface + subroutine zgelqf( M, N, A, LDA, TAU, WORK, LWORK, INFO ) + implicit none + integer :: INFO + integer :: LDA + integer :: LWORK + integer :: M + integer :: N + complex*16 :: A( LDA, * ) + complex*16 :: TAU( * ) + complex*16 :: WORK( * ) + end subroutine zgelqf + end interface + + interface + subroutine zgeqr2( M, N, A, LDA, TAU, WORK, INFO ) + implicit none + integer :: INFO + integer :: LDA + integer :: M + integer :: N + complex*16 :: A( LDA, * ) + complex*16 :: TAU( * ) + complex*16 :: WORK( * ) + end subroutine zgeqr2 + end interface + + interface + subroutine zgeqrf( M, N, A, LDA, TAU, WORK, LWORK, INFO ) + implicit none + integer :: INFO + integer :: LDA + integer :: LWORK + integer :: M + integer :: N + complex*16 :: A( LDA, * ) + complex*16 :: TAU( * ) + complex*16 :: WORK( * ) + end subroutine zgeqrf + end interface + + !interface + ! subroutine zgesv( N, NRHS, A, LDA, IPIV, B, LDB, INFO ) + ! implicit none + ! integer :: INFO + ! integer :: IPIV( * ) + ! integer :: LDA + ! integer :: LDB + ! integer :: N + ! integer :: NRHS + ! complex*16 :: A( LDA, * ) + ! complex*16 :: B( LDB, * ) + ! end subroutine zgesv + !end interface + + interface + subroutine zgesvd( JOBU, JOBVT, M, N, A, LDA, S, U, LDU, VT, LDVT,& + WORK, LWORK, RWORK, INFO ) + implicit none + integer :: INFO + integer :: LDA + integer :: LDU + integer :: LDVT + integer :: LWORK + integer :: M + integer :: N + complex*16 :: A( LDA, * ) + character :: JOBU + character :: JOBVT + double precision :: RWORK( * ) + double precision :: S( * ) + complex*16 :: U( LDU, * ) + complex*16 :: VT( LDVT, * ) + complex*16 :: WORK( * ) + end subroutine zgesvd + end interface + + interface + subroutine zgetf2( M, N, A, LDA, IPIV, INFO ) + implicit none + integer :: INFO + integer :: IPIV( * ) + integer :: LDA + integer :: M + integer :: N + complex*16 :: A( LDA, * ) + end subroutine zgetf2 + end interface + + interface + subroutine zgetri( N, A, LDA, IPIV, WORK, LWORK, INFO ) + implicit none + integer :: INFO + integer :: LDA + integer :: LWORK + integer :: N + integer :: IPIV( * ) + complex*16 :: A( LDA, * ) + complex*16 :: WORK( * ) + end subroutine zgetri + end interface + + !interface + ! subroutine zgetrf( M, N, A, LDA, IPIV, INFO ) + ! implicit none + ! integer :: INFO + ! integer :: IPIV( * ) + ! integer :: LDA + ! integer :: M + ! integer :: N + ! complex*16 :: A( LDA, * ) + ! end subroutine zgetrf + !end interface + + interface + subroutine zgetrs( TRANS, N, NRHS, A, LDA, IPIV, B, LDB, INFO ) + implicit none + integer :: INFO + integer :: IPIV( * ) + integer :: LDA + integer :: LDB + integer :: N + integer :: NRHS + complex*16 :: A( LDA, * ) + complex*16 :: B( LDB, * ) + character :: TRANS + end subroutine zgetrs + end interface + + !interface + ! subroutine zheev( JOBZ, UPLO, N, A, LDA, W, WORK, LWORK, RWORK, INFO ) + ! implicit none + ! integer :: INFO + ! integer :: LDA + ! integer :: LWORK + ! integer :: N + ! complex*16 :: A( LDA, * ) + ! character :: JOBZ + ! double precision :: RWORK( * ) + ! character :: UPLO + ! double precision :: W( * ) + ! complex*16 :: WORK( * ) + ! end subroutine zheev + !end interface + + interface + subroutine zhegs2( ITYPE, UPLO, N, A, LDA, B, LDB, INFO ) + implicit none + integer :: INFO + integer :: ITYPE + integer :: LDA + integer :: LDB + integer :: N + complex*16 :: A( LDA, * ) + complex*16 :: B( LDB, * ) + character :: UPLO + end subroutine zhegs2 + end interface + + !interface + ! subroutine zhegst( ITYPE, UPLO, N, A, LDA, B, LDB, INFO ) + ! implicit none + ! integer :: INFO + ! integer :: ITYPE + ! integer :: LDA + ! integer :: LDB + ! integer :: N + ! complex*16 :: A( LDA, * ) + ! complex*16 :: B( LDB, * ) + ! character :: UPLO + ! end subroutine zhegst + !end interface + + !interface + ! subroutine zhegv( ITYPE, JOBZ, UPLO, N, A, LDA, B, LDB, W, WORK,& + ! LWORK, RWORK, INFO ) + ! implicit none + ! integer :: INFO + ! integer :: ITYPE + ! integer :: LDA + ! integer :: LDB + ! integer :: LWORK + ! integer :: N + ! complex*16 :: A( LDA, * ) + ! complex*16 :: B( LDB, * ) + ! character :: JOBZ + ! double precision :: RWORK( * ) + ! character :: UPLO + ! double precision :: W( * ) + ! complex*16 :: WORK( * ) + ! end subroutine zhegv + !end interface + + interface + subroutine zhetd2( UPLO, N, A, LDA, D, E, TAU, INFO ) + implicit none + integer :: INFO + integer :: LDA + integer :: N + complex*16 :: A( LDA, * ) + double precision :: D( * ) + double precision :: E( * ) + complex*16 :: TAU( * ) + character :: UPLO + end subroutine zhetd2 + end interface + + interface + subroutine zhetrd( UPLO, N, A, LDA, D, E, TAU, WORK, LWORK, INFO ) + implicit none + integer :: INFO + integer :: LDA + integer :: LWORK + integer :: N + complex*16 :: A( LDA, * ) + double precision :: D( * ) + double precision :: E( * ) + complex*16 :: TAU( * ) + character :: UPLO + complex*16 :: WORK( * ) + end subroutine zhetrd + end interface + + !interface + ! subroutine zhpev( JOBZ, UPLO, N, AP, W, Z, LDZ, WORK, RWORK, INFO ) + ! implicit none + ! integer :: INFO + ! integer :: LDZ + ! integer :: N + ! complex*16 :: AP( * ) + ! character :: JOBZ + ! double precision :: RWORK( * ) + ! character :: UPLO + ! double precision :: W( * ) + ! complex*16 :: WORK( * ) + ! complex*16 :: Z( LDZ, * ) + ! end subroutine zhpev + !end interface + + !interface + ! subroutine zhpevx( JOBZ, RANGE, UPLO, N, AP, VL, VU, IL, IU,& + ! ABSTOL, M, W, Z, LDZ, WORK, RWORK, IWORK,& + ! IFAIL, INFO ) + ! implicit none + ! integer :: IFAIL( * ) + ! integer :: IL + ! integer :: INFO + ! integer :: IU + ! integer :: IWORK( * ) + ! integer :: LDZ + ! integer :: M + ! integer :: N + ! double precision :: ABSTOL + ! complex*16 :: AP( * ) + ! character :: JOBZ + ! character :: RANGE + ! double precision :: RWORK( * ) + ! character :: UPLO + ! double precision :: VL + ! double precision :: VU + ! double precision :: W( * ) + ! complex*16 :: WORK( * ) + ! complex*16 :: Z( LDZ, * ) + ! end subroutine zhpevx + !end interface + + interface + subroutine zhpgst( ITYPE, UPLO, N, AP, BP, INFO ) + implicit none + integer :: INFO + integer :: ITYPE + integer :: N + complex*16 :: AP( * ) + complex*16 :: BP( * ) + character :: UPLO + end subroutine zhpgst + end interface + + !interface + ! subroutine zhpgv( ITYPE, JOBZ, UPLO, N, AP, BP, W, Z, LDZ, WORK,& + ! RWORK, INFO ) + ! implicit none + ! integer :: INFO + ! integer :: ITYPE + ! integer :: LDZ + ! integer :: N + ! complex*16 :: AP( * ) + ! complex*16 :: BP( * ) + ! character :: JOBZ + ! double precision :: RWORK( * ) + ! character :: UPLO + ! double precision :: W( * ) + ! complex*16 :: WORK( * ) + ! complex*16 :: Z( LDZ, * ) + ! end subroutine zhpgv + !end interface + + interface + subroutine zhptrd( UPLO, N, AP, D, E, TAU, INFO ) + implicit none + integer :: INFO + integer :: N + complex*16 :: AP( * ) + double precision :: D( * ) + double precision :: E( * ) + complex*16 :: TAU( * ) + character :: UPLO + end subroutine zhptrd + end interface + + interface + subroutine zhseqr( JOB, COMPZ, N, ILO, IHI, H, LDH, W, Z, LDZ,& + WORK, LWORK, INFO ) + implicit none + integer :: IHI + integer :: ILO + integer :: INFO + integer :: LDH + integer :: LDZ + integer :: LWORK + integer :: N + character :: COMPZ + complex*16 :: H( LDH, * ) + character :: JOB + complex*16 :: W( * ) + complex*16 :: WORK( * ) + complex*16 :: Z( LDZ, * ) + end subroutine zhseqr + end interface + + interface + subroutine zlabrd( M, N, NB, A, LDA, D, E, TAUQ, TAUP, X, LDX, Y,& + LDY ) + implicit none + integer :: LDA + integer :: LDX + integer :: LDY + integer :: M + integer :: N + integer :: NB + complex*16 :: A( LDA, * ) + double precision :: D( * ) + double precision :: E( * ) + complex*16 :: TAUP( * ) + complex*16 :: TAUQ( * ) + complex*16 :: X( LDX, * ) + complex*16 :: Y( LDY, * ) + end subroutine zlabrd + end interface + + interface + subroutine zlacgv( N, X, INCX ) + implicit none + integer :: INCX + integer :: N + complex*16 :: X( * ) + end subroutine zlacgv + end interface + + interface + subroutine zlacon( N, V, X, EST, KASE ) + implicit none + integer :: KASE + integer :: N + double precision :: EST + complex*16 :: V( N ) + complex*16 :: X( N ) + end subroutine zlacon + end interface + + interface + subroutine zlacpy( UPLO, M, N, A, LDA, B, LDB ) + implicit none + integer :: LDA + integer :: LDB + integer :: M + integer :: N + complex*16 :: A( LDA, * ) + complex*16 :: B( LDB, * ) + character :: UPLO + end subroutine zlacpy + end interface + + interface + double complex function zladiv( X, Y ) + implicit none + complex*16 :: X + complex*16 :: Y + end function zladiv + end interface + + interface + subroutine zlahqr( WANTT, WANTZ, N, ILO, IHI, H, LDH, W, ILOZ,& + IHIZ, Z, LDZ, INFO ) + implicit none + integer :: IHI + integer :: IHIZ + integer :: ILO + integer :: ILOZ + integer :: INFO + integer :: LDH + integer :: LDZ + integer :: N + complex*16 :: H( LDH, * ) + complex*16 :: W( * ) + logical :: WANTT + logical :: WANTZ + complex*16 :: Z( LDZ, * ) + end subroutine zlahqr + end interface + + interface + subroutine zlahrd( N, K, NB, A, LDA, TAU, T, LDT, Y, LDY ) + implicit none + integer :: K + integer :: LDA + integer :: LDT + integer :: LDY + integer :: N + integer :: NB + complex*16 :: A( LDA, * ) + complex*16 :: T( LDT, NB ) + complex*16 :: TAU( NB ) + complex*16 :: Y( LDY, NB ) + end subroutine zlahrd + end interface + + interface + subroutine zlahr2( N, K, NB, A, LDA, TAU, T, LDT, Y, LDY ) + implicit none + integer :: K + integer :: LDA + integer :: LDT + integer :: LDY + integer :: N + integer :: NB + complex*16 :: A( LDA, * ) + complex*16 :: T( LDT, NB ) + complex*16 :: TAU( NB ) + complex*16 :: Y( LDY, NB ) + end subroutine zlahr2 + end interface + + interface + double precision function zlange( NORM, M, N, A, LDA, WORK ) + implicit none + integer :: LDA + integer :: M + integer :: N + complex*16 :: A( LDA, * ) + character :: NORM + double precision :: WORK( * ) + end function zlange + end interface + + interface + double precision function zlanhe( NORM, UPLO, N, A, LDA, WORK ) + implicit none + integer :: LDA + integer :: N + complex*16 :: A( LDA, * ) + character :: NORM + character :: UPLO + double precision :: WORK( * ) + end function zlanhe + end interface + + interface + double precision function zlanhp( NORM, UPLO, N, AP, WORK ) + implicit none + integer :: N + complex*16 :: AP( * ) + character :: NORM + character :: UPLO + double precision :: WORK( * ) + end function zlanhp + end interface + + interface + double precision function zlanhs( NORM, N, A, LDA, WORK ) + implicit none + integer :: LDA + integer :: N + complex*16 :: A( LDA, * ) + character :: NORM + double precision :: WORK( * ) + end function zlanhs + end interface + + interface + subroutine zlaqr0( WANTT, WANTZ, N, ILO, IHI, H, LDH, W, ILOZ,& + IHIZ, Z, LDZ, WORK, LWORK, INFO ) + implicit none + integer :: IHI + integer :: IHIZ + integer :: ILO + integer :: ILOZ + integer :: INFO + integer :: LDH + integer :: LDZ + integer :: LWORK + integer :: N + + complex*16 :: H( LDH, * ) + complex*16 :: W( * ) + complex*16 :: WORK( * ) + complex*16 :: Z( LDZ, * ) + + logical :: WANTT + logical :: WANTZ + end subroutine zlaqr0 + end interface + + interface + subroutine zlaqr1( N, H, LDH, S1, S2, V ) + implicit none + integer :: LDH + integer :: N + complex*16 :: S1 + complex*16 :: S2 + complex*16 :: H( LDH, * ) + complex*16 :: V( * ) + end subroutine zlaqr1 + end interface + + interface + subroutine zlaqr2( WANTT, WANTZ, N, KTOP, KBOT, NW, H, LDH, ILOZ,& + IHIZ, Z, LDZ, NS, ND, SH, V, LDV, NH, T, LDT,& + NV, WV, LDWV, WORK, LWORK ) + implicit none + integer :: IHIZ, ILOZ, KBOT, KTOP, LDH, LDT + integer :: LDV, LDWV, LDZ, LWORK, N, ND, NH + integer :: NS, NV, NW + logical :: WANTT, WANTZ + complex*16 :: H( LDH, * ), SH( * ), T( LDT, * ) + complex*16 :: V( LDV, * ),WORK( * ), WV( LDWV, * ), Z( LDZ, * ) + end subroutine zlaqr2 + end interface + + interface + subroutine zlaqr3( WANTT, WANTZ, N, KTOP, KBOT, NW, H, LDH, ILOZ,& + IHIZ, Z, LDZ, NS, ND, SH, V, LDV, NH, T, LDT,& + NV, WV, LDWV, WORK, LWORK ) + implicit none + integer :: IHIZ, ILOZ, KBOT, KTOP, LDH, LDT, LDV, LDWV + integer :: LDZ, LWORK, N, ND, NH, NS, NV, NW + logical :: WANTT, WANTZ + complex*16 :: H( LDH, * ), SH( * ), T( LDT, * ) + complex*16 :: V( LDV, * ),WORK( * ), WV( LDWV, * ), Z( LDZ, * ) + end subroutine zlaqr3 + end interface + + interface + subroutine zlaqr4( WANTT, WANTZ, N, ILO, IHI, H, LDH, W, ILOZ,& + IHIZ, Z, LDZ, WORK, LWORK, INFO ) + implicit none + integer :: IHI, IHIZ, ILO, ILOZ, INFO, LDH, LDZ, LWORK, N + logical :: WANTT, WANTZ + complex*16 :: H( LDH, * ), W( * ), WORK( * ), Z( LDZ, * ) + end subroutine zlaqr4 + end interface + + interface + subroutine zlaqr5( WANTT, WANTZ, KACC22, N, KTOP, KBOT, NSHFTS, S,& + H, LDH, ILOZ, IHIZ, Z, LDZ, V, LDV, U, LDU, NV,& + WV, LDWV, NH, WH, LDWH ) + implicit none + integer :: IHIZ, ILOZ, KACC22, KBOT, KTOP, LDH, LDU, LDV + integer :: LDWH, LDWV, LDZ, N, NH, NSHFTS, NV + logical :: WANTT, WANTZ + complex*16 :: H( LDH, * ), S( * ), U( LDU, * ), V( LDV, * ) + complex*16 :: WH( LDWH, * ), WV( LDWV, * ), Z( LDZ, * ) + end subroutine zlaqr5 + end interface + + interface + subroutine zlarf( SIDE, M, N, V, INCV, TAU, C, LDC, WORK ) + implicit none + integer :: INCV + integer :: LDC + integer :: M + integer :: N + complex*16 :: C( LDC, * ) + character :: SIDE + complex*16 :: TAU + complex*16 :: V( * ) + complex*16 :: WORK( * ) + end subroutine zlarf + end interface + + interface + subroutine zlarfb( SIDE, TRANS, DIRECT, STOREV, M, N, K, V, LDV,& + T, LDT, C, LDC, WORK, LDWORK ) + implicit none + integer :: K + integer :: LDC + integer :: LDT + integer :: LDV + integer :: LDWORK + integer :: M + integer :: N + complex*16 :: C( LDC, * ) + character :: DIRECT + character :: SIDE + character :: STOREV + complex*16 :: T( LDT, * ) + character :: TRANS + complex*16 :: V( LDV, * ) + complex*16 :: WORK( LDWORK, * ) + end subroutine zlarfb + end interface + + interface + subroutine zlarfg( N, ALPHA, X, INCX, TAU ) + implicit none + integer :: INCX + integer :: N + complex*16 :: ALPHA + complex*16 :: TAU + complex*16 :: X( * ) + end subroutine zlarfg + end interface + + interface + subroutine zlarft( DIRECT, STOREV, N, K, V, LDV, TAU, T, LDT ) + implicit none + integer :: K + integer :: LDT + integer :: LDV + integer :: N + character :: DIRECT + character :: STOREV + complex*16 :: T( LDT, * ) + complex*16 :: TAU( * ) + complex*16 :: V( LDV, * ) + end subroutine zlarft + end interface + + interface + subroutine zlarfx( SIDE, M, N, V, TAU, C, LDC, WORK ) + implicit none + integer :: LDC + integer :: M + integer :: N + complex*16 :: C( LDC, * ) + character :: SIDE + complex*16 :: TAU + complex*16 :: V( * ) + complex*16 :: WORK( * ) + end subroutine zlarfx + end interface + + interface + subroutine zlartg( F, G, CS, SN, R ) + implicit none + double precision :: CS + complex*16 :: F + complex*16 :: G + complex*16 :: R + complex*16 :: SN + end subroutine zlartg + end interface + + interface + subroutine zlascl( TYPE, KL, KU, CFROM, CTO, M, N, A, LDA, INFO ) + implicit none + integer :: INFO + integer :: KL + integer :: KU + integer :: LDA + integer :: M + integer :: N + complex*16 :: A( LDA, * ) + double precision :: CFROM + double precision :: CTO + character :: TYPE + end subroutine zlascl + end interface + + interface + subroutine zlaset( UPLO, M, N, ALPHA, BETA, A, LDA ) + implicit none + integer :: LDA + integer :: M + integer :: N + complex*16 :: A( LDA, * ) + complex*16 :: ALPHA + complex*16 :: BETA + character :: UPLO + end subroutine zlaset + end interface + + interface + subroutine zlasr( SIDE, PIVOT, DIRECT, M, N, C, S, A, LDA ) + implicit none + integer :: LDA + integer :: M + integer :: N + complex*16 :: A( LDA, * ) + double precision :: C( * ) + character :: DIRECT + character :: PIVOT + double precision :: S( * ) + character :: SIDE + end subroutine zlasr + end interface + + interface + subroutine zlassq( N, X, INCX, SCALE, SUMSQ ) + implicit none + integer :: INCX + integer :: N + double precision :: SCALE + double precision :: SUMSQ + complex*16 :: X( * ) + end subroutine zlassq + end interface + + interface + subroutine zlaswp( N, A, LDA, K1, K2, IPIV, INCX ) + implicit none + integer :: INCX + integer :: IPIV( * ) + integer :: K1 + integer :: K2 + integer :: LDA + integer :: N + complex*16 :: A( LDA, * ) + end subroutine zlaswp + end interface + + interface + subroutine zlatrd( UPLO, N, NB, A, LDA, E, TAU, W, LDW ) + implicit none + integer :: LDA + integer :: LDW + integer :: N + integer :: NB + complex*16 :: A( LDA, * ) + double precision :: E( * ) + complex*16 :: TAU( * ) + character :: UPLO + complex*16 :: W( LDW, * ) + end subroutine zlatrd + end interface + + interface + subroutine zlatrs( UPLO, TRANS, DIAG, NORMIN, N, A, LDA, X, SCALE,& + CNORM, INFO ) + implicit none + character :: DIAG, NORMIN, TRANS, UPLO + integer :: INFO, LDA, N + double precision :: SCALE + double precision :: CNORM( * ) + complex*16 :: A( LDA, * ), X( * ) + end subroutine zlatrs + end interface + + interface + subroutine zlazro( M, N, ALPHA, BETA, A, LDA ) + implicit none + integer :: LDA + integer :: M + integer :: N + complex*16 :: A( LDA, * ) + complex*16 :: ALPHA + complex*16 :: BETA + end subroutine zlazro + end interface + + interface + subroutine zpotf2( UPLO, N, A, LDA, INFO ) + implicit none + integer :: INFO + integer :: LDA + integer :: N + complex*16 :: A( LDA, * ) + character :: UPLO + end subroutine zpotf2 + end interface + + !interface + ! subroutine zpotrf( UPLO, N, A, LDA, INFO ) + ! implicit none + ! integer :: INFO + ! integer :: LDA + ! integer :: N + ! complex*16 :: A( LDA, * ) + ! character :: UPLO + ! end subroutine zpotrf + !end interface + + interface + subroutine zpptrf( UPLO, N, AP, INFO ) + implicit none + integer :: INFO + integer :: N + complex*16 :: AP( * ) + character :: UPLO + end subroutine zpptrf + end interface + + interface + subroutine zrot( N, CX, INCX, CY, INCY, C, S ) + implicit none + integer :: INCX + integer :: INCY + integer :: N + double precision :: C + complex*16 :: CX( * ) + complex*16 :: CY( * ) + complex*16 :: S + end subroutine zrot + end interface + + interface + subroutine ztrevc( SIDE, HOWMNY, SELECT, N, T, LDT, VL, LDVL, VR,& + LDVR, MM, M, WORK, RWORK, INFO ) + implicit none + character :: HOWMNY, SIDE + integer :: INFO, LDT, LDVL, LDVR, M, MM, N + logical :: SELECT( * ) + double precision :: RWORK( * ) + complex*16 :: T( LDT, * ), VL( LDVL, * ), VR( LDVR, * ) + complex*16 :: WORK( * ) + end subroutine ztrevc + end interface + + interface + subroutine ztrexc( COMPQ, N, T, LDT, Q, LDQ, IFST, ILST, INFO ) + implicit none + integer :: IFST + integer :: ILST + integer :: INFO + integer :: LDQ + integer :: LDT + integer :: N + character :: COMPQ + complex*16 :: Q( LDQ, * ) + complex*16 :: T( LDT, * ) + end subroutine ztrexc + end interface + + interface + subroutine ztrsen( JOB, COMPQ, SELECT, N, T, LDT, Q, LDQ, W, M, S,& + SEP, WORK, LWORK, INFO ) + implicit none + integer :: INFO + integer :: LDQ + integer :: LDT + integer :: LWORK + integer :: M + integer :: N + character :: COMPQ + character :: JOB + complex*16 :: Q( LDQ, * ) + double precision :: S + logical :: SELECT( * ) + double precision :: SEP + complex*16 :: T( LDT, * ) + complex*16 :: W( * ) + complex*16 :: WORK( * ) + end subroutine ztrsen + end interface + + interface + subroutine ztrsyl( TRANA, TRANB, ISGN, M, N, A, LDA, B, LDB, C,& + LDC, SCALE, INFO ) + implicit none + integer :: INFO + integer :: ISGN + integer :: LDA + integer :: LDB + integer :: LDC + integer :: M + integer :: N + complex*16 :: A( LDA, * ) + complex*16 :: B( LDB, * ) + complex*16 :: C( LDC, * ) + double precision :: SCALE + character :: TRANA + character :: TRANB + end subroutine ztrsyl + end interface + + interface + subroutine ztrti2( UPLO, DIAG, N, A, LDA, INFO ) + implicit none + character :: DIAG + character :: UPLO + integer :: INFO + integer :: LDA + integer :: N + complex*16 :: A( LDA, * ) + end subroutine ztrti2 + end interface + + interface + subroutine ztrtri( UPLO, DIAG, N, A, LDA, INFO ) + implicit none + character :: DIAG + character :: UPLO + integer :: INFO + integer :: LDA + integer :: N + complex*16 :: A( LDA, * ) + end subroutine ztrtri + end interface + + interface + subroutine zungqr( M, N, K, A, LDA, TAU, WORK, LWORK, INFO ) + implicit none + integer :: INFO, K, LDA, LWORK, M, N + complex*16 :: A( LDA, * ), TAU( * ), WORK( * ) + end subroutine zungqr + end interface + +end module m_linalg_interfaces +!!*** diff --git a/GX-PAW/common/src/28_numeric_noabirule/m_linalg_interfaces.o b/GX-PAW/common/src/28_numeric_noabirule/m_linalg_interfaces.o new file mode 100644 index 00000000..ac3431de Binary files /dev/null and b/GX-PAW/common/src/28_numeric_noabirule/m_linalg_interfaces.o differ diff --git a/GX-PAW/common/src/28_numeric_noabirule/m_numeric_tools.F90 b/GX-PAW/common/src/28_numeric_noabirule/m_numeric_tools.F90 new file mode 100644 index 00000000..d9ddfccf --- /dev/null +++ b/GX-PAW/common/src/28_numeric_noabirule/m_numeric_tools.F90 @@ -0,0 +1,6438 @@ +!!****m* ABINIT/m_numeric_tools +!! NAME +!! m_numeric_tools +!! +!! FUNCTION +!! This module contains basic tools for numeric computations. +!! +!! COPYRIGHT +!! Copyright (C) 2008-2024 ABINIT group (MG, GMR, MJV, XG, MVeithen, NH, FJ, MT, DCS, FrD, Olevano, Reining, Sottile, AL) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" + +MODULE m_numeric_tools + + use defs_basis + use m_errors + use m_abicore + use m_linalg_interfaces + + use m_fstrings, only : itoa, sjoin + + implicit none + + private + + public :: arth ! Return an arithmetic progression + public :: linspace ! Similar to the above but with start, stop and num of division + public :: geop ! Return a geometric progression + public :: reverse ! Reverse a 1D array *IN PLACE* + public :: set2unit ! Set the matrix to be a unit matrix (if it is square) + public :: get_trace ! Calculate the trace of a square matrix + public :: get_diag ! Return the diagonal of a matrix as a vector + public :: isdiagmat ! True if matrix is diagonal + public :: l2int ! convert logical data to int array + public :: r2c, c2r ! Transfer complex data stored in a real array to a complex array and vice versa + public :: iseven ! True if int is even + public :: isinteger ! True if all elements of rr differ from an integer by less than tol + public :: is_zero ! True if all elements of rr differ from zero by less than tol + public :: inrange ! True if (int/float) is inside an interval. + public :: bisect ! Given a monotonic array A and x find j such that A(j)>x>A(j+1) using bisection + public :: imax_loc ! Index of maxloc on an array returned as scalar instead of array-valued quantity + public :: imin_loc ! Index of minloc on an array returned as scalar instead of array-valued quantity + public :: lfind ! Find the index of the first occurrence of .True. in a logical array. + public :: list2blocks ! Given a list of integers, find the number of contiguos groups of values. + public :: mask2blocks ! Find groups of .TRUE. elements in a logical mask. + public :: linfit ! Perform a linear fit, y = ax + b, of data + public :: llsfit_svd ! Linear least squares fit with SVD of an user-defined set of functions + public :: polyn_interp ! Polynomial interpolation with Nevilles"s algorithms, error estimate is reported + public :: quadrature ! Driver routine for performing quadratures in finite domains using different algorithms + public :: cspint ! Estimates the integral of a tabulated function. + public :: ctrap ! Corrected trapezoidal integral on uniform grid of spacing hh. + public :: coeffs_gausslegint ! Compute the coefficients (supports and weights) for Gauss-Legendre integration. + public :: simpson_cplx ! Integrate a complex function via extended Simpson's rule. + public :: hermitianize ! Force a square matrix to be hermitian + public :: mkherm ! Make the complex array(2,ndim,ndim) hermitian, by adding half of it + ! to its hermitian conjugate. + public :: hermit ! Rdefine diagonal elements of packed matrix to impose Hermiticity. + public :: symmetrize ! Force a square matrix to be symmetric + public :: pack_matrix ! Packs a matrix into hermitian format + public :: check_vec_conjg ! Test whether two complex vectors are the conjugate of each other. + public :: print_arr ! Print a vector/array + public :: pade, dpade ! Functions for Pade approximation (complex case) + public :: newrap_step ! Apply single step Newton-Raphson method to find root of a complex function + public :: OPERATOR(.x.) ! Cross product of two 3D vectors + public :: l2norm ! Return the length (ordinary L2 norm) of a vector + public :: remove_copies ! Find the subset of inequivalent items in a list. + public :: denominator ! Return the denominator of a rational number. + public :: mincm ! Return the minimum common multiple of two integers. + public :: continued_fract ! Routine to calculate the continued fraction (see description). + public :: cmplx_sphcart ! Convert an array of cplx numbers from spherical to Cartesian coordinates or vice versa. + public :: pfactorize ! Factorize a number in terms of an user-specified set of prime factors. + public :: isordered ! Check the ordering of a sequence. + public :: wrap2_zero_one ! Transforms a real number in a reduced number in the interval [0,1[ + ! where 1 is not included (tol12) + public :: wrap2_pmhalf ! Transforms a real number in areduced number in the interval ]-1/2,1/2] + ! where -1/2 is not included (tol12) + public :: interpol3d_0d ! Linear interpolation in 3D + public :: interpol3d_1d ! Linear interpolation in 3D for an array + public :: interpol3d_indices ! Computes the indices in a cube which are neighbors to the point + ! to be interpolated in interpol3d + public :: interpolate_denpot ! Liner interpolation of scalar field e.g. density of potential + public :: simpson_int ! Simpson integral of a tabulated function. Returns arrays with integrated values + public :: simpson ! Simpson integral of a tabulated function. Returns scalar with the integral on the full mesh. + public :: rhophi ! Compute the phase and the module of a complex number. + public :: smooth ! Smooth data. + public :: nderiv ! Compute first or second derivative of input function y(x) on a regular grid. + public :: central_finite_diff ! Coefficients of the central differences, for several orders of accuracy. + public :: uniformrandom ! Returns a uniform random deviate between 0.0 and 1.0. + public :: findmin ! Compute the minimum of a function whose value and derivative are known at two points. + public :: kramerskronig ! check or apply the Kramers Kronig relation + public :: invcb ! Compute a set of inverse cubic roots as fast as possible. + public :: safe_div ! Performs 'save division' that is to prevent overflow, underflow, NaN or infinity errors + public :: bool2index ! Allocate and return array with the indices in the input boolean array that evaluates to .True. + public :: polynomial_regression ! Perform a polynomial regression on incoming data points + public :: blocked_loop ! Helper function to implement blocked algorithms inside do loops. + + !MG FIXME: deprecated: just to avoid updating refs while refactoring. + public :: dotproduct + + interface arth + module procedure arth_int + module procedure arth_rdp + end interface arth + + interface reverse + module procedure reverse_int + module procedure reverse_rdp + end interface reverse + + interface set2unit + module procedure unit_matrix_int + module procedure unit_matrix_rdp + module procedure unit_matrix_cdp + end interface set2unit + + interface get_trace + module procedure get_trace_int + module procedure get_trace_rdp + module procedure get_trace_cdp + end interface get_trace + + !interface cart_prod33 + ! module procedure cart_prod33_int + ! module procedure cart_prod33_rdp + ! module procedure cart_prod33_cdp + !end interface cart_prod33 + + interface get_diag + module procedure get_diag_int + module procedure get_diag_rdp + module procedure get_diag_cdp + end interface get_diag + + interface isdiagmat + module procedure isdiagmat_int + module procedure isdiagmat_rdp + !module procedure isdiagmat_cdp + end interface isdiagmat + + interface inrange + module procedure inrange_int + module procedure inrange_dp + end interface inrange + + interface l2int + module procedure l2int_1D + module procedure l2int_2D + module procedure l2int_3D + end interface l2int + + interface r2c + module procedure rdp2cdp_1D + module procedure rdp2cdp_2D + module procedure rdp2cdp_3D + module procedure rdp2cdp_4D + module procedure rdp2cdp_5D + module procedure rdp2cdp_6D + end interface r2c + + interface c2r + module procedure cdp2rdp_0D + module procedure cdp2rdp_1D + module procedure cdp2rdp_2D + module procedure cdp2rdp_3D + module procedure cdp2rdp_4D + module procedure cdp2rdp_5D + module procedure cdp2rdp_6D + !module procedure cdp2rdp_7D + end interface c2r + + interface isinteger + module procedure is_integer_0d + module procedure is_integer_1d + end interface isinteger + + interface is_zero + module procedure is_zero_rdp_0d + module procedure is_zero_rdp_1d + end interface is_zero + + interface bisect + module procedure bisect_rdp + module procedure bisect_int + end interface bisect + + interface imax_loc + module procedure imax_loc_int + module procedure imax_loc_rdp + end interface imax_loc + + interface imin_loc + module procedure imin_loc_int + module procedure imin_loc_rdp + end interface imin_loc + + interface linfit + module procedure linfit_rdp + module procedure linfit_spc + module procedure linfit_dpc + end interface linfit + + interface hermitianize + module procedure hermitianize_spc + module procedure hermitianize_dpc + end interface hermitianize + + interface symmetrize + module procedure symmetrize_spc + module procedure symmetrize_dpc + end interface symmetrize + + interface print_arr !TODO add prtm + module procedure print_arr1d_spc + module procedure print_arr1d_dpc + module procedure print_arr2d_spc + module procedure print_arr2d_dpc + end interface print_arr + + interface operator (.x.) + module procedure cross_product_int + module procedure cross_product_rdp + end interface + + interface l2norm + module procedure l2norm_rdp + end interface l2norm + + interface isordered + module procedure isordered_rdp + end interface isordered + +!!*** + +!---------------------------------------------------------------------- + +!!****t* m_numeric_tools/stats_t +!! NAME +!! stats_t +!! +!! FUNCTION +!! Statistical parameters of a data distribution. +!! +!! SOURCE + + type,public :: stats_t + real(dp) :: mean + real(dp) :: stdev + real(dp) :: min + real(dp) :: max + end type stats_t + + public :: stats_eval ! Calculate statistical parameters of a data distribution. +!!*** + +!---------------------------------------------------------------------- + +!!****t* m_numeric_tools/vdiff_t +!! NAME +!! vdiff_t +!! +!! FUNCTION +!! Estimate the "distance" between two functions tabulated on a homogeneous grid. +!! Use `vidff` function to construct the object. +!! +!! SOURCE + + type,public :: vdiff_t + + real(dp) :: int_adiff = zero ! \int |f1-f2| dr + real(dp) :: mean_adiff = zero ! Mean {|f1-f2|} + real(dp) :: stdev_adiff = zero ! Standard deviation of {|f1-f2|} + real(dp) :: min_adiff = zero ! Min {|f1-f2|} + real(dp) :: max_adiff = zero ! Max {|f1-f2|} + real(dp) :: l1_rerr = zero ! (\int |f1-f2| dr) / (\int |f2| dr) + + end type vdiff_t + + public :: vdiff_eval ! Estimate the "distance" between two functions tabulated on a homogeneous grid. + public :: vdiff_print ! Print vdiff_t to formatted file. +!!*** + + +CONTAINS !=========================================================== +!!*** + +!!****f* m_numeric_tools/arth_int +!! NAME +!! arth_int +!! +!! FUNCTION +!! Returns an array of length nn containing an arithmetic progression whose +!! starting value is start and whose step is step. +!! +!! INPUTS +!! start=initial point +!! step=the increment +!! nn=the number of points +!! +!! OUTPUT +!! arth(nn)=the progression +!! +!! SOURCE + +pure function arth_int(start, step, nn) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: nn + integer,intent(in) :: start,step + integer :: arth_int(nn) + +!Local variables------------------------------- + integer :: ii +! ********************************************************************* + + select case (nn) + + case (1:) + arth_int(1)=start + do ii=2,nn + arth_int(ii)=arth_int(ii-1)+step + end do + + case (0) + return + end select + +end function arth_int +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/arth_rdp +!! NAME +!! arth_rdp +!! +!! FUNCTION +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +pure function arth_rdp(start, step, nn) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: nn + real(dp),intent(in) :: start,step + real(dp) :: arth_rdp(nn) + +!Local variables------------------------------- + integer :: ii +! ********************************************************************* + + select case (nn) + case (1:) + arth_rdp(1)=start + do ii=2,nn + arth_rdp(ii)=arth_rdp(ii-1)+step + end do + + case (0) + return + end select + +end function arth_rdp +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/linspace +!! NAME +!! linspace +!! +!! FUNCTION +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +pure function linspace(start, stop, nn) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: nn + real(dp),intent(in) :: start, stop + real(dp) :: linspace(nn) + +!Local variables------------------------------- + real(dp) :: length + integer :: ii +! ********************************************************************* + + select case (nn) + case (1:) + length = stop - start + do ii=1,nn + linspace(ii) = start + length * (ii-1) / (nn-1) + end do + + case (0) + return + end select + +end function linspace +!!*** + + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/geop +!! NAME +!! geop +!! +!! FUNCTION +!! Returns an array of length nn containing a geometric progression whose +!! starting value is start and whose factor is factor! +!! +!! INPUTS +!! start=initial point +!! factor=the factor of the geometric progression +!! nn=the number of points +!! +!! OUTPUT +!! geop(nn)=the progression +!! +!! SOURCE + + +pure function geop(start,factor,nn) result(res) + +!Arguments ------------------------------------ +!scalars + real(dp),intent(in) :: start,factor + integer,intent(in) :: nn + real(dp) :: res(nn) + +!Local variables------------------------------- + integer :: ii +! ********************************************************************* + + if (nn>0) res(1)=start + do ii=2,nn + res(ii)=res(ii-1)*factor + end do + +end function geop +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/reverse_int +!! NAME +!! reverse_int +!! +!! FUNCTION +!! Reverse a 1D array *IN PLACE*. Target: INT arrays +!! +!! SOURCE + +subroutine reverse_int(arr) + +!Arguments ------------------------------------ +!scalars + integer,intent(inout) :: arr(:) +!arrays + integer :: ii,nn,swap +! ************************************************************************* + + nn = SIZE(arr) + if (nn <= 1) return + + do ii=1,nn/2 + swap = arr(ii) + arr(ii) = arr(nn-ii+1) + arr(nn-ii+1) = swap + end do + +end subroutine reverse_int +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/reverse_rdp +!! NAME +!! reverse_rdp +!! +!! FUNCTION +!! Reverse a 1D array *IN PLACE*. Target: DP arrays +!! +!! SOURCE + +subroutine reverse_rdp(arr) + +!Arguments ------------------------------------ +!scalars + real(dp),intent(inout) :: arr(:) +!arrays + integer :: ii,nn + real(dp) :: swap +! ************************************************************************* + + nn = SIZE(arr) + if (nn <= 1) return + + do ii=1,nn/2 + swap = arr(ii) + arr(ii) = arr(nn-ii+1) + arr(nn-ii+1) = swap + end do + +end subroutine reverse_rdp +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/unit_matrix_int +!! NAME +!! unit_matrix_int +!! +!! FUNCTION +!! Set the matrix matrix to be a unit matrix (if it is square). +!! +!! SIDE EFFECTS +!! matrix(:,:)=set to unit on exit +!! +!! SOURCE + +pure subroutine unit_matrix_int(matrix) + +!Arguments ------------------------------------ + integer,intent(inout) :: matrix(:,:) + +!Local variables------------------------------- +!scalars + integer :: ii,nn +! ********************************************************************* + + nn=MIN(SIZE(matrix,DIM=1),SIZE(matrix,DIM=2)) + matrix(:,:)=0 + do ii=1,nn + matrix(ii,ii)=1 + end do + +end subroutine unit_matrix_int +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/unit_matrix_rdp +!! NAME +!! unit_matrix_rdp +!! +!! FUNCTION +!! Set the matrix matrix to be a unit matrix (if it is square). +!! +!! SIDE EFFECTS +!! matrix(:,:)=set to unit on exit +!! +!! SOURCE + +pure subroutine unit_matrix_rdp(matrix) + +!Arguments ------------------------------------ + real(dp),intent(inout) :: matrix(:,:) + +!Local variables------------------------------- +!scalars + integer :: ii,nn +! ********************************************************************* + + nn=MIN(SIZE(matrix,DIM=1),SIZE(matrix,DIM=2)) + matrix(:,:)=zero + do ii=1,nn + matrix(ii,ii)=one + end do + +end subroutine unit_matrix_rdp +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/unit_matrix_cdp +!! NAME +!! unit_matrix_cdp +!! +!! FUNCTION +!! Set the matrix matrix to be a unit matrix (if it is square). +!! +!! SIDE EFFECTS +!! matrix(:,:)=set to unit on exit +!! +!! SOURCE + +pure subroutine unit_matrix_cdp(matrix) + +!Arguments ------------------------------------ + complex(dpc),intent(inout) :: matrix(:,:) + +!Local variables------------------------------- +!scalars + integer :: ii,nn +! ********************************************************************* + + nn=MIN(SIZE(matrix,DIM=1),SIZE(matrix,DIM=2)) + matrix=czero + do ii=1,nn + matrix(ii,ii)=cone + end do + +end subroutine unit_matrix_cdp +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/get_trace_int +!! NAME +!! get_trace_int +!! +!! FUNCTION +!! Calculate the trace of a square matrix +!! +!! INPUTS +!! matrix(:,:) +!! +!! OUTPUT +!! trace=the trace +!! +!! SOURCE + +pure function get_trace_int(matrix) result(trace) + +!Arguments ------------------------------------ + integer :: trace + integer,intent(in) :: matrix(:,:) + +!Local variables------------------------------- +!scalars + integer :: ii +! ********************************************************************* + + trace=0 + do ii=1,size(matrix,dim=1) + trace=trace+matrix(ii,ii) + end do + +end function get_trace_int +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/get_trace_rdp +!! NAME +!! get_trace_int +!! +!! FUNCTION +!! Calculate the trace of a square matrix (real(dp) version) +!! +!! INPUTS +!! matrix(:,:) +!! +!! OUTPUT +!! trace=the trace +!! +!! SOURCE + +pure function get_trace_rdp(matrix) result(trace) + +!Arguments ------------------------------------ + real(dp) :: trace + real(dp),intent(in) :: matrix(:,:) + +!Local variables------------------------------- +!scalars + integer :: ii +! ********************************************************************* + + trace=zero + do ii=1,size(matrix,dim=1) + trace=trace+matrix(ii,ii) + end do + +end function get_trace_rdp +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/get_trace_cdp +!! NAME +!! get_trace_cdp +!! +!! FUNCTION +!! Calculate the trace of a square matrix (complex(dpc) version) +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +pure function get_trace_cdp(matrix) result(trace) + +!Arguments ------------------------------------ + complex(dpc) :: trace + complex(dpc),intent(in) :: matrix(:,:) + +!Local variables------------------------------- +!scalars + integer :: ii +! ********************************************************************* + + trace=czero + do ii=1,size(matrix,dim=1) + trace=trace+matrix(ii,ii) + end do + +end function get_trace_cdp +!!*** + +!!****f* m_numeric_tools/get_diag_int +!! NAME +!! get_diag_int +!! +!! FUNCTION +!! Return the diagonal of a square matrix as a vector +!! +!! SOURCE + +function get_diag_int(mat) result(diag) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: mat(:,:) + integer :: diag(SIZE(mat,1)) + +!Local variables------------------------------- + integer :: ii +! ************************************************************************* + + ii = assert_eq(SIZE(mat,1),SIZE(mat,2),'Matrix not square',__FILE__,__LINE__) + + do ii=1,SIZE(mat,1) + diag(ii)=mat(ii,ii) + end do + +end function get_diag_int +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/get_diag_rdp +!! NAME +!! get_diag_rdp +!! +!! FUNCTION +!! Return the diagonal of a square matrix as a vector +!! +!! SOURCE + +function get_diag_rdp(mat) result(diag) + +!Arguments ------------------------------------ +!scalars + real(dp),intent(in) :: mat(:,:) + real(dp) :: diag(SIZE(mat,1)) + +!Local variables------------------------------- + integer :: ii +! ************************************************************************* + + ABI_CHECK(SIZE(mat,1) == SIZE(mat,2), 'Matrix not square') + + do ii=1,SIZE(mat,1) + diag(ii) = mat(ii,ii) + end do + +end function get_diag_rdp +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/get_diag_cdp +!! NAME +!! get_diag_cdp +!! +!! FUNCTION +!! Return the diagonal of a square matrix as a vector +!! +!! SOURCE + +function get_diag_cdp(cmat) result(cdiag) + +!Arguments ------------------------------------ +!scalars + complex(dpc),intent(in) :: cmat(:,:) + complex(dpc) :: cdiag(SIZE(cmat,1)) + +!Local variables------------------------------- + integer :: ii +! ************************************************************************* + + ABI_CHECK(SIZE(cmat,1) == SIZE(cmat,2), 'Matrix not square') + + do ii=1,SIZE(cmat,1) + cdiag(ii)=cmat(ii,ii) + end do + +end function get_diag_cdp +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/isdiagmat_int +!! NAME +!! isdiagmat_int +!! +!! FUNCTION +!! True if matrix mat is diagonal +!! +!! SOURCE + +pure logical function isdiagmat_int(mat) result(ans) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: mat(:,:) + +!Local variables------------------------------- + integer :: ii,jj +! ************************************************************************* + + ans = .True. + do jj=1,size(mat,dim=2) + do ii=1,size(mat,dim=1) + if (ii == jj) cycle + if (mat(ii,jj) /= 0) then + ans = .False.; return + end if + end do + end do + +end function isdiagmat_int +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/isdiagmat_rdp +!! NAME +!! isdiagmat_rdp +!! +!! FUNCTION +!! True if matrix mat is diagonal withing the given absolute tolerance (default: tol12) +!! +!! SOURCE + +pure logical function isdiagmat_rdp(mat, atol) result(ans) + +!Arguments ------------------------------------ +!scalars + real(dp),intent(in) :: mat(:,:) + real(dp),optional,intent(in) :: atol + +!Local variables------------------------------- + integer :: ii,jj + real(dp) :: my_atol +! ************************************************************************* + + my_atol = tol12; if (present(atol)) my_atol = atol + + ans = .True. + do jj=1,size(mat,dim=2) + do ii=1,size(mat,dim=1) + if (ii == jj) cycle + if (abs(mat(ii,jj)) > my_atol) then + ans = .False.; return + end if + end do + end do + +end function isdiagmat_rdp +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/l2int_1D +!! NAME +!! l2int_1D +!! +!! FUNCTION +!! Convert a logical array into an int array (True --> 1, False --> 0) +!! +!! INPUTS +!! larr(:)=the input logical array +!! +!! SOURCE + +pure function l2int_1D(larr) result(int_arr) + +!Arguments ------------------------------------ +!scalars + logical,intent(in) :: larr(:) + integer :: int_arr(size(larr)) + +! ********************************************************************* + + where (larr) + int_arr = 1 + elsewhere + int_arr = 0 + end where + +end function l2int_1D +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/l2int_2D +!! NAME +!! l2int_2D +!! +!! FUNCTION +!! Convert a logical array into an int array (True --> 1, False --> 0) +!! +!! INPUTS +!! larr(:)=the input logical array +!! +!! SOURCE + +pure function l2int_2D(larr) result(int_arr) + +!Arguments ------------------------------------ +!scalars + logical,intent(in) :: larr(:,:) + integer :: int_arr(size(larr,1), size(larr,2)) + +! ********************************************************************* + + where (larr) + int_arr = 1 + elsewhere + int_arr = 0 + end where + +end function l2int_2D +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/l2int_3D +!! NAME +!! l2int_3D +!! +!! FUNCTION +!! Convert a logical array into an int array (True --> 1, False --> 0) +!! +!! INPUTS +!! larr(:)=the input logical array +!! +!! SOURCE + +pure function l2int_3D(larr) result(int_arr) + +!Arguments ------------------------------------ +!scalars + logical,intent(in) :: larr(:,:,:) + integer :: int_arr(size(larr,1), size(larr,2), size(larr,3)) + +! ********************************************************************* + + where (larr) + int_arr = 1 + elsewhere + int_arr = 0 + end where + +end function l2int_3D +!!*** + +!---------------------------------------------------------------------- + +!!***!!****f* m_numeric_tools/rdp2cdp_1D +!! NAME +!! rdp2cdp_1D +!! +!! FUNCTION +!! Create a complex array starting from a real array containing real and imaginary part +!! +!! INPUTS +!! rr(:)=the real array +!! +!! OUTPUT +!! cc(:)=the complex array +!! +!! SOURCE + +pure function rdp2cdp_1D(rr) result(cc) + +!Arguments ------------------------------------ +!scalars + real(dp),intent(in) :: rr(:,:) + complex(dpc) :: cc(SIZE(rr,2)) + +! ********************************************************************* + + cc(:)=CMPLX(rr(1,:),rr(2,:),kind=dpc) + +end function rdp2cdp_1D +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/rdp2cdp_2D +!! NAME +!! rdp2cdp_2D +!! +!! FUNCTION +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +pure function rdp2cdp_2D(rr) result(cc) + +!Arguments ------------------------------------ +!scalars + real(dp),intent(in) :: rr(:,:,:) + complex(dpc) :: cc(SIZE(rr,2),SIZE(rr,3)) + +! ********************************************************************* + + cc(:,:)=CMPLX(rr(1,:,:),rr(2,:,:), kind=dpc) + +end function rdp2cdp_2D +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/rdp2cdp_3D +!! NAME +!! rdp2cdp_3D +!! +!! FUNCTION +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +pure function rdp2cdp_3D(rr) result(cc) + +!Arguments ------------------------------------ +!scalars + real(dp),intent(in) :: rr(:,:,:,:) + complex(dpc) :: cc(SIZE(rr,2),SIZE(rr,3),SIZE(rr,4)) + +! ********************************************************************* + + cc(:,:,:)=CMPLX(rr(1,:,:,:),rr(2,:,:,:), kind=dpc) + +end function rdp2cdp_3D +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/rdp2cdp_4D +!! NAME +!! rdp2cdp_4D +!! +!! FUNCTION +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +pure function rdp2cdp_4D(rr) result(cc) + +!Arguments ------------------------------------ +!scalars + real(dp),intent(in) :: rr(:,:,:,:,:) + complex(dpc) :: cc(SIZE(rr,2),SIZE(rr,3),SIZE(rr,4),SIZE(rr,5)) + +! ********************************************************************* + + cc(:,:,:,:)=CMPLX(rr(1,:,:,:,:),rr(2,:,:,:,:), kind=dpc) + +end function rdp2cdp_4D +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/rdp2cdp_5D +!! NAME +!! rdp2cdp_5D +!! +!! FUNCTION +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +pure function rdp2cdp_5D(rr) result(cc) + +!Arguments ------------------------------------ +!scalars + real(dp),intent(in) :: rr(:,:,:,:,:,:) + complex(dpc) :: cc(SIZE(rr,2),SIZE(rr,3),SIZE(rr,4),SIZE(rr,5),SIZE(rr,6)) + +! ********************************************************************* + + cc(:,:,:,:,:)=CMPLX(rr(1,:,:,:,:,:),rr(2,:,:,:,:,:), kind=dpc) + +end function rdp2cdp_5D +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/rdp2cdp_6D +!! NAME +!! rdp2cdp_6D +!! +!! FUNCTION +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +pure function rdp2cdp_6D(rr) result(cc) + +!Arguments ------------------------------------ +!scalars + real(dp),intent(in) :: rr(:,:,:,:,:,:,:) + complex(dpc) :: cc(SIZE(rr,2),SIZE(rr,3),SIZE(rr,4),SIZE(rr,5),SIZE(rr,6),SIZE(rr,7)) + +! ********************************************************************* + + cc(:,:,:,:,:,:)=CMPLX(rr(1,:,:,:,:,:,:),rr(2,:,:,:,:,:,:), kind=dpc) + +end function rdp2cdp_6D +!!*** + + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/cdp2rdp_0D +!! NAME +!! cdp2rdp_0D +!! +!! FUNCTION +!! Create a real variable containing real and imaginary part starting from a complex array +!! +!! INPUTS +!! cc=the input complex number +!! +!! OUTPUT +!! rr(2=the real array +!! +!! SOURCE + +pure function cdp2rdp_0D(cc) result(rr) + +!Arguments ------------------------------------ +!scalars + complex(dpc),intent(in) :: cc + real(dp) :: rr(2) + +! ********************************************************************* + + rr(1)=REAL (cc) + rr(2)=AIMAG(cc) + +end function cdp2rdp_0D +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/cdp2rdp_1D +!! NAME +!! cdp2rdp_1D +!! +!! FUNCTION +!! Create a real array containing real and imaginary part starting from a complex array +!! +!! SOURCE + +pure function cdp2rdp_1D(cc) result(rr) + +!Arguments ------------------------------------ +!scalars + complex(dpc),intent(in) :: cc(:) + real(dp) :: rr(2,SIZE(cc)) + +! ********************************************************************* + + rr(1,:)=REAL (cc(:)) + rr(2,:)=AIMAG(cc(:)) + +end function cdp2rdp_1D +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/cdp2rdp_2D +!! NAME +!! cdp2rdp_2D +!! +!! FUNCTION +!! Create a real array containing real and imaginary part starting from a complex array!! +!! +!! SOURCE + +pure function cdp2rdp_2D(cc) result(rr) + +!Arguments ------------------------------------ +!scalars + complex(dpc),intent(in) :: cc(:,:) + real(dp) :: rr(2,SIZE(cc,1),SIZE(cc,2)) +! ********************************************************************* + + rr(1,:,:)=REAL (cc(:,:)) + rr(2,:,:)=AIMAG(cc(:,:)) + +end function cdp2rdp_2D +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/cdp2rdp_3D +!! NAME +!! cdp2rdp_3D +!! +!! FUNCTION +!! Create a real array containing real and imaginary part starting from a complex array!! +!! +!! SOURCE + +pure function cdp2rdp_3D(cc) result(rr) + +!Arguments ------------------------------------ +!scalars + complex(dpc),intent(in) :: cc(:,:,:) + real(dp) :: rr(2,SIZE(cc,1),SIZE(cc,2),SIZE(cc,3)) + +! ********************************************************************* + + rr(1,:,:,:)=REAL (cc(:,:,:)) + rr(2,:,:,:)=AIMAG(cc(:,:,:)) + +end function cdp2rdp_3D +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/cdp2rdp_4D +!! NAME +!! cdp2rdp_4D +!! +!! FUNCTION +!! Create a real array containing real and imaginary part starting from a complex array!! +!! +!! SOURCE + +pure function cdp2rdp_4D(cc) result(rr) + +!Arguments ------------------------------------ +!scalars + complex(dpc),intent(in) :: cc(:,:,:,:) + real(dp) :: rr(2,SIZE(cc,1),SIZE(cc,2),SIZE(cc,3),SIZE(cc,4)) +! ********************************************************************* + + rr(1,:,:,:,:)=REAL (cc(:,:,:,:)) + rr(2,:,:,:,:)=AIMAG(cc(:,:,:,:)) + +end function cdp2rdp_4D +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/cdp2rdp_5D +!! NAME +!! cdp2rdp_5D +!! +!! FUNCTION +!! Create a real array containing real and imaginary part starting from a complex array!! +!! +!! SOURCE + +pure function cdp2rdp_5D(cc) result(rr) + +!Arguments ------------------------------------ +!scalars + complex(dpc),intent(in) :: cc(:,:,:,:,:) + real(dp) :: rr(2,SIZE(cc,1),SIZE(cc,2),SIZE(cc,3),SIZE(cc,4),SIZE(cc,5)) + +! ********************************************************************* + + rr(1,:,:,:,:,:)=REAL (cc(:,:,:,:,:)) + rr(2,:,:,:,:,:)=AIMAG(cc(:,:,:,:,:)) + +end function cdp2rdp_5D +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/cdp2rdp_6D +!! NAME +!! cdp2rdp_6D +!! +!! FUNCTION +!! Create a real array containing real and imaginary part starting from a complex array!! +!! +!! SOURCE + +pure function cdp2rdp_6D(cc) result(rr) + +!Arguments ------------------------------------ +!scalars + complex(dpc),intent(in) :: cc(:,:,:,:,:,:) + real(dp) :: rr(2,SIZE(cc,1),SIZE(cc,2),SIZE(cc,3),SIZE(cc,4),SIZE(cc,5),SIZE(cc,6)) + +! ********************************************************************* + + rr(1,:,:,:,:,:,:)=REAL (cc(:,:,:,:,:,:)) + rr(2,:,:,:,:,:,:)=AIMAG(cc(:,:,:,:,:,:)) + +end function cdp2rdp_6D +!!*** + +!!!!8D arrays are not allowed in Fortran standard! +!!!****f* m_numeric_tools/cdp2rdp_7D +!!! NAME +!!! cdp2rdp_7D +!!! +!!! FUNCTION +!!! Create a real array containing real and imaginary part starting from a complex array!! +!!! +!!! SOURCE +! +!pure function cdp2rdp_7D(cc) result(rr) +! +!!Arguments ------------------------------------ +!!scalars +! complex(dpc),intent(in) :: cc(:,:,:,:,:,:,:) +! real(dp) :: rr(2,SIZE(cc,1),SIZE(cc,2),SIZE(cc,3),SIZE(cc,4),SIZE(cc,5),SIZE(cc,6),SIZE(cc,7)) +! +!! ********************************************************************* +! +! rr(1,:,:,:,:,:,:,:)=REAL (cc(:,:,:,:,:,:,:)) +! rr(2,:,:,:,:,:,:,:)=AIMAG(cc(:,:,:,:,:,:,:)) +! +!end function cdp2rdp_7D +!!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/iseven +!! NAME +!! iseven +!! +!! FUNCTION +!! Return .TRUE. if the given integer is even +!! +!! SOURCE + +elemental function iseven(nn) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: nn + logical :: iseven +! ********************************************************************* + + iseven = ((nn / 2) * 2 == nn) + +end function iseven +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/is_integer_0D +!! NAME +!! is_integer_0D +!! +!! FUNCTION +!! Return .TRUE. if all elements differ from an integer by less that tol +!! +!! INPUTS +!! rr=the set of real values to be checked +!! tol=tolerance on the difference between real and integer +!! +!! SOURCE + +pure function is_integer_0d(rr,tol) result(ans) + +!Arguments ------------------------------------ +!scalars + real(dp),intent(in) :: tol + logical :: ans +!arrays + real(dp),intent(in) :: rr + +! ************************************************************************* + + ans=(ABS(rr-NINT(rr))= win(1) .and. xval <= win(2)) + +end function inrange_int +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/inrange_dp +!! NAME +!! inrange_dp +!! +!! FUNCTION +!! True if float `xval` is inside the interval [win(1), win(2)] +!! +!! SOURCE + +pure logical function inrange_dp(xval, win) + +!Arguments ------------------------------------ +!scalars + real(dp),intent(in) :: xval, win(2) +! ************************************************************************* + + inrange_dp = (xval >= win(1) .and. xval <= win(2)) + +end function inrange_dp +!!*** + +!!****f* m_numeric_tools/bisect_rdp +!! NAME +!! bisect_rdp +!! +!! FUNCTION +!! Given an array AA(1:N), and a value x, returns the index j such that AA(j) <= x <= AA(j + 1). +!! AA must be monotonic, either increasing or decreasing. j=0 or +!! j=N is returned to indicate that x is out of range. +!! +!! SOURCE + +pure function bisect_rdp(AA, xx) result(loc) + +!Arguments ------------------------------------ +!scalars + real(dp),intent(in) :: AA(:) + real(dp),intent(in) :: xx + integer :: loc + +!Local variables------------------------------- + integer :: nn,jl,jm,ju + logical :: ascnd +! ********************************************************************* + + nn=SIZE(AA); ascnd=(AA(nn)>=AA(1)) + ! + ! Initialize lower and upper limits + jl=0; ju=nn+1 + do + if (ju-jl<=1) EXIT + jm=(ju+jl)/2 ! Compute a midpoint, + if (ascnd.EQV.(xx>=AA(jm))) then + jl=jm ! Replace lower limit + else + ju=jm ! Replace upper limit + end if + end do + ! + ! Set the output, being careful with the endpoints + if (xx==AA(1)) then + loc=1 + else if (xx==AA(nn)) then + loc=nn-1 + else + loc=jl + end if + +end function bisect_rdp +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/bisect_int +!! NAME +!! bisect_int +!! +!! FUNCTION +!! Given an array AA(1:N), and a value x, returns the index j such that AA(j) <= x <= AA(j + 1). +!! AA must be monotonic, either increasing or decreasing. j=0 or +!! j=N is returned to indicate that x is out of range. +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE +pure function bisect_int(AA,xx) result(loc) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: AA(:) + integer,intent(in) :: xx + integer :: loc + +!Local variables------------------------------- + integer :: nn,jl,jm,ju + logical :: ascnd +! ********************************************************************* + + nn=SIZE(AA) ; ascnd=(AA(nn)>=AA(1)) + + ! Initialize lower and upper limits + jl=0 ; ju=nn+1 + do + if (ju-jl<=1) EXIT + jm=(ju+jl)/2 ! Compute a midpoint + if (ascnd.EQV.(xx>=AA(jm))) then + jl=jm ! Replace lower limit + else + ju=jm ! Replace upper limit + end if + end do + ! + ! Set the output, being careful with the endpoints + if (xx==AA(1)) then + loc=1 + else if (xx==AA(nn)) then + loc=nn-1 + else + loc=jl + end if + +end function bisect_int +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/imax_loc_int +!! NAME +!! imax_loc_int +!! +!! FUNCTION +!! Index of maxloc on an array returned as scalar instead of array-valued +!! +!! SOURCE + +pure function imax_loc_int(iarr,mask) + +!Arguments ------------------------------------ +!scalars + integer :: imax_loc_int +!arrays + integer,intent(in) :: iarr(:) + logical,optional,intent(in) :: mask(:) + +!Local variables------------------------------- + integer :: imax(1) +! ************************************************************************* + + if (PRESENT(mask)) then + imax=MAXLOC(iarr,MASK=mask) + else + imax=MAXLOC(iarr) + end if + imax_loc_int=imax(1) + +end function imax_loc_int +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/imax_loc_rdp +!! NAME +!! imax_loc_rdp +!! +!! FUNCTION +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE +pure function imax_loc_rdp(arr,mask) + +!Arguments ------------------------------------ +!scalars + integer :: imax_loc_rdp +!arrays + real(dp),intent(in) :: arr(:) + logical,optional,intent(in) :: mask(:) + +!Local variables------------------------------- + integer :: imax(1) +! ************************************************************************* + + if (PRESENT(mask)) then + imax=MAXLOC(arr,MASK=mask) + else + imax=MAXLOC(arr) + end if + imax_loc_rdp=imax(1) + +end function imax_loc_rdp +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/imin_loc_int +!! NAME +!! imin_loc_int +!! +!! FUNCTION +!! Index of minloc on an array returned as scalar instead of array-valued +!! +!! SOURCE + +pure function imin_loc_int(arr, mask) + +!Arguments ------------------------------------ +!scalars + integer :: imin_loc_int +!arrays + integer,intent(in) :: arr(:) + logical,optional,intent(in) :: mask(:) + +!Local variables------------------------------- + integer :: imin(1) +! ************************************************************************* + + if (PRESENT(mask)) then + imin=MINLOC(arr,MASK=mask) + else + imin=MINLOC(arr) + end if + imin_loc_int=imin(1) + +end function imin_loc_int +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/imin_loc_rdp +!! NAME +!! imin_loc_rdp +!! +!! FUNCTION +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +pure function imin_loc_rdp(arr,mask) + +!Arguments ------------------------------------ +!scalars + integer :: imin_loc_rdp +!arrays + real(dp),intent(in) :: arr(:) + logical,optional,intent(in) :: mask(:) + +!Local variables------------------------------- + integer :: imin(1) +! ************************************************************************* + + if (PRESENT(mask)) then + imin=MINLOC(arr,MASK=mask) + else + imin=MINLOC(arr) + end if + + imin_loc_rdp=imin(1) + +end function imin_loc_rdp +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/lfind +!! NAME +!! lfind +!! +!! FUNCTION +!! Find the index of the first occurrence of .True. in a logical array. +!! Return -1 if not found. If back is True, the search starts from the +!! last element of the array (default: False). +!! +!! INPUTS +!! mask(:)=Input logical mask +!! +!! SOURCE + +integer pure function lfind(mask, back) + +!Arguments ------------------------------------ +!scalars + logical,intent(in) :: mask(:) + logical,optional,intent(in) :: back +!arrays + +!Local variables------------------------------- +!scalars + integer :: ii,nitems + logical :: do_back + +!************************************************************************ + + do_back = .False.; if (present(back)) do_back = back + lfind = -1; nitems = size(mask); if (nitems == 0) return + + if (do_back) then + ! Backward search + do ii=nitems,1,-1 + if (mask(ii)) then + lfind = ii; return + end if + end do + else + ! Forward search. + do ii=1,nitems + if (mask(ii)) then + lfind = ii; return + end if + end do + end if + +end function lfind +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/list2blocks +!! NAME +!! list2blocks +!! +!! FUNCTION +!! Given a list of integers, find the number of contiguos groups of values. +!! and returns the set of indices that can be used to loop over these groups +!! Example list = [1,2,3,5,6] --> blocks = [[1,3], [4,5]] +!! +!! INPUTS +!! list(:)=List of integers +!! +!! OUTPUTS +!! nblocks=Number of blocks +!! blocks(2,nblocks)= +!! allocatable array in input +!! in output: +!! blocks(1,i) gives the start of the i-th block +!! blocks(2,i) gives the end of the i-th block +!! +!! SOURCE + +subroutine list2blocks(list,nblocks,blocks) + +!Arguments ------------------------------------ +!scalars + integer,intent(out) :: nblocks + integer,intent(in) :: list(:) +!arrays + integer,intent(out),allocatable :: blocks(:,:) + +!Local variables------------------------------- +!scalars + integer :: ii,nitems +!arrays + integer :: work(2,size(list)) + +!************************************************************************ + + nitems = size(list) + + ! Handle nitems == 1 case + if (nitems == 1) then + ABI_MALLOC(blocks, (2,1)) + blocks = 1 + return + end if + + nblocks = 1; work(1,1) = 1 + + do ii=2,nitems + if (list(ii) /= (list(ii-1) + 1)) then + work(2,nblocks) = ii - 1 + nblocks = nblocks + 1 + work(1,nblocks) = ii + end if + end do + + work(2,nblocks) = nitems + + ABI_MALLOC(blocks, (2,nblocks)) + blocks = work(:,1:nblocks) + +end subroutine list2blocks +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/mask2blocks +!! NAME +!! mask2blocks +!! +!! FUNCTION +!! Give a logical mask, find the number of contiguos groups of .TRUE. values. +!! and return the set of indices that can be used to loop over these groups +!! +!! INPUTS +!! mask(:)=Input logical mask +!! +!! OUTPUTS +!! nblocks=Number of blocks +!! +!! SIDE EFFECTS +!! blocks(:,:)= Null pointer in input. blocks(2,nblocks) in output where +!! blocks(1,i) gives the start of the i-th block +!! blocks(2,i) gives the end of the i-th block +!! +!! SOURCE + +subroutine mask2blocks(mask,nblocks,blocks) + +!Arguments ------------------------------------ +!scalars + integer,intent(out) :: nblocks + logical,intent(in) :: mask(:) +!arrays + integer,allocatable :: blocks(:,:) + +!Local variables------------------------------- +!scalars + integer :: ii,nitems,start + logical :: inblock +!arrays + integer :: work(2,SIZE(mask)) + +!************************************************************************ + + ! Find first element. + nitems = size(mask); start = 0 + do ii=1,nitems + if (mask(ii)) then + start = ii + exit + end if + end do + + ! Handle no true element or just one. + if (start == 0) then + nblocks = 0 + ABI_MALLOC(blocks, (0,0)) + return + end if + if (start /= 0 .and. nitems == 1) then + nblocks = 1 + ABI_MALLOC(blocks, (2,1)) + blocks(:,1) = [1,1] + end if + + nblocks = 1; work(1,1) = start; inblock = .True. + + do ii=start+1,nitems + if (.not.mask(ii)) then + if (inblock) then + inblock = .False. + work(2,nblocks) = ii - 1 + end if + else + if (.not. inblock) then + inblock = .True. + nblocks = nblocks + 1 + work(1,nblocks) = ii + end if + end if + end do + + if (mask(nitems) .and. inblock) work(2,nblocks) = nitems + + ABI_MALLOC(blocks, (2,nblocks)) + blocks = work(:,1:nblocks) + +end subroutine mask2blocks +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/linfit_rdp +!! NAME +!! linfit_rdp +!! +!! FUNCTION +!! Perform a linear fit, y=ax+b, of data +!! +!! INPUTS +!! xx(nn)=xx coordinates +!! yy(nn)=yy coordinates +!! +!! OUTPUT +!! aa=coefficient of linear term of fit +!! bb=coefficient of constant term of fit +!! res=root mean square of differences between data and fit +!! +!! SOURCE + +function linfit_rdp(nn,xx,yy,aa,bb) result(res) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: nn + real(dp) :: res + real(dp),intent(out) :: aa,bb +!arrays + real(dp),intent(in) :: xx(nn),yy(nn) + +!Local variables------------------------------- +!scalars + integer :: ii + real(dp) :: msrt,sx2,sx,sxy,sy,tx,ty +! ************************************************************************* + + sx=zero ; sy=zero ; sxy=zero ; sx2=zero + do ii=1,nn + tx=xx(ii) + ty=yy(ii) + sx=sx+tx + sy=sy+ty + sxy=sxy+tx*ty + sx2=sx2+tx*tx + end do + + aa=(nn*sxy-sx*sy)/(nn*sx2-sx*sx) + bb=sy/nn-sx*aa/nn + + msrt=zero + do ii=1,nn + tx=xx(ii) + ty=yy(ii) + msrt=msrt+(ty-aa*tx-bb)**2 + end do + msrt=SQRT(msrt/nn) ; res=msrt + +end function linfit_rdp +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/linfit_spc +!! NAME +!! linfit_spc +!! +!! FUNCTION +!! Perform a linear fit, y=ax+b, of data +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +function linfit_spc(nn,xx,zz,aa,bb) result(res) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: nn + real(dp) :: res + real(dp),intent(in) :: xx(nn) + complex(spc),intent(in) :: zz(nn) + complex(spc),intent(out) :: aa,bb +!arrays + +!Local variables------------------------------- +!scalars + integer :: ii + real(dp) :: sx,sx2,msrt + complex(dpc) :: sz,sxz +! ************************************************************************* + + sx=zero ; sx2=zero ; msrt=zero + sz=czero ; sxz=czero + do ii=1,nn + sx=sx+xx(ii) + sz=sz+zz(ii) + sxz=sxz+xx(ii)*zz(ii) + sx2=sx2+xx(ii)*xx(ii) + end do + + aa=CMPLX((nn*sxz-sx*sz)/(nn*sx2-sx*sx), kind=spc) + bb=CMPLX(sz/nn-sx*aa/nn, kind=spc) + + do ii=1,nn + msrt=msrt+ABS(zz(ii)-aa*xx(ii)-bb)**2 + end do + msrt=SQRT(msrt) ; res=msrt + +end function linfit_spc +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/linfit_dpc +!! NAME +!! linfit_dpc +!! +!! FUNCTION +!! Perform a linear fit, y=ax+b, of data +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +function linfit_dpc(nn,xx,zz,aa,bb) result(res) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: nn + real(dp) :: res + real(dp),intent(in) :: xx(nn) + complex(dpc),intent(in) :: zz(nn) + complex(dpc),intent(out) :: aa,bb +!arrays + +!Local variables------------------------------- +!scalars + integer :: ii + real(dp) :: sx,sx2,msrt + complex(dpc) :: sz,sxz +! ************************************************************************* + + sx=zero ; sx2=zero ; msrt=zero + sz=czero ; sxz=czero + do ii=1,nn + sx=sx+xx(ii) + sz=sz+zz(ii) + sxz=sxz+xx(ii)*zz(ii) + sx2=sx2+xx(ii)*xx(ii) + end do + + aa=(nn*sxz-sx*sz)/(nn*sx2-sx*sx) + bb=sz/nn-sx*aa/nn + + do ii=1,nn + msrt=msrt+ABS(zz(ii)-aa*xx(ii)-bb)**2 + end do + msrt=SQRT(msrt) ; res=msrt + +end function linfit_dpc +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/llsfit_svd +!! NAME +!! llsfit_svd +!! +!! FUNCTION +!! Given a set of N data points (x,y) with individual standard deviations sigma_i, +!! use chi-square minimization to determine the M coefficients, par, of a function that +!! depends linearly on nfuncs functions, i.e f(x) = \sum_i^{nfuncs} par_i * func_i(x). +!! Solve the fitting equations using singular value decomposition of the design matrix as in Eq 14.3.17 +!! of Numerical Recipes. The program returns values for the M fit parameters par, and chi-square. +!! The user supplies a subroutine funcs(x,nfuncs) that returns the M basis functions evaluated at xx. +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +subroutine llsfit_svd(xx,yy,sigma,nfuncs,funcs,chisq,par,var,cov,info) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: nfuncs + integer,intent(out) :: info + real(dp),intent(out) :: chisq +!arrays + real(dp),intent(in) :: xx(:),yy(:),sigma(:) + real(dp),intent(out) :: par(:),var(:),cov(:,:) + + interface + function funcs(xx,nf) + use defs_basis + implicit none + real(dp),intent(in) :: xx + integer,intent(in) :: nf + real(dp) :: funcs(nf) + end function funcs + end interface + +!Local variables------------------------------- + integer,parameter :: PAD_=50 + integer :: ii,npts,lwork + real(dp),parameter :: TOL_=1.0e-5_dp +!arrays + real(dp),dimension(SIZE(xx)) :: bb,sigm1 + real(dp),dimension(SIZE(xx),nfuncs) :: dmat,dmat_save + real(dp) :: tmp(nfuncs) + real(dp),allocatable :: work(:),Vt(:,:),U(:,:),S(:) +! ************************************************************************* + + npts = assert_eq(SIZE(xx),SIZE(yy),SIZE(sigma),'Wrong size in xx,yy,sigma', __FILE__, __LINE__) + call assert((npts>=nfuncs),'No. of functions must greater than no. of points', __FILE__, __LINE__) + ii = assert_eq(nfuncs,SIZE(cov,1),SIZE(cov,2),SIZE(var),'Wrong size in covariance', __FILE__, __LINE__) + + ! + ! === Calculate design matrix and b vector === + ! * dmat_ij=f_j(x_i)/sigma_i, b_i=y_i/sigma_i + sigm1(:)=one/sigma(:) ; bb(:)=yy(:)*sigm1(:) + do ii=1,npts + dmat_save(ii,:)=funcs(xx(ii),nfuncs) + end do + dmat=dmat_save*SPREAD(sigm1,DIM=2,ncopies=nfuncs) + dmat_save(:,:)=dmat(:,:) + ! + ! === Singular value decomposition === + lwork=MAX(3*MIN(npts,nfuncs)+MAX(npts,nfuncs),5*MIN(npts,nfuncs)-4)+PAD_ + ABI_MALLOC(work,(lwork)) + ABI_MALLOC(U,(npts,npts)) + ABI_MALLOC(S,(nfuncs)) + ABI_MALLOC(Vt,(nfuncs,nfuncs)) + + call DGESVD('A','A',npts,nfuncs,dmat,npts,S,U,npts,Vt,nfuncs,work,lwork,info) + ABI_FREE(work) + GOTO 10 + ! + ! === Set to zero small singular values according to TOL_ and find coefficients === + WHERE (S>TOL_*MAXVAL(S)) + tmp=MATMUL(bb,U)/S + ELSEWHERE + S =zero + tmp=zero + END WHERE + par(:)=MATMUL(tmp,Vt) + ! + ! === Evaluate chi-square === + chisq=l2norm(MATMUL(dmat_save,par)-bb)**2 + ! + ! === Calculate covariance and variance === + ! C_jk = V_ji V_ki / S_i^2 + WHERE (S/=zero) S=one/(S*S) + + ! check this but should be correct + cov(:,:)=Vt*SPREAD(S,DIM=2,ncopies=nfuncs) + cov(:,:)=MATMUL(TRANSPOSE(Vt),cov) + var(:)=SQRT(get_diag(cov)) + +10 continue + ABI_FREE(U) + ABI_FREE(S) + ABI_FREE(Vt) + +end subroutine llsfit_svd +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/polyn_interp +!! NAME +!! polyn_interp +!! +!! FUNCTION +!! Given arrays xa and ya of length N, and given a value x, return a value y, and an error estimate dy. +!! If P(x) is the polynomial of degree N-1 such that P(xai)=yai, i=1,...,N, then the returned value y=P(x). +!! +!! INPUTS +!! xa(:)=abscissas in ascending order +!! ya(:)=ordinates +!! x=the point where the set of data has to be interpolated +!! +!! OUTPUT +!! y=the interpolated value +!! dy=error estimate +!! +!! NOTES +!! Based on the polint routine reported in Numerical Recipies +!! +!! SOURCE + +subroutine polyn_interp(xa,ya,x,y,dy) + +!Arguments ------------------------------------ +!scalars + real(dp),intent(in) :: xa(:),ya(:) + real(dp),intent(in) :: x + real(dp),intent(out) :: y,dy +!Local variables------------------------------- +!scalars + integer :: m,n,ns +!arrays + real(dp),dimension(SIZE(xa)) :: c,d,den,ho +! ************************************************************************* + + n = assert_eq(SIZE(xa),SIZE(ya),'Different size in xa and ya',__FILE__,__LINE__) + + ! === Initialize the tables of c and d === + c(:)=ya(:) ; d(:)=ya(:) ; ho(:)=xa(:)-x + ! === Find closest table entry and initial approximation to y === + ns=imin_loc(ABS(x-xa)) ; y=ya(ns) + ns=ns-1 + ! + ! === For each column of the tableau loop over current c and d and up-date them === + do m=1,n-1 + den(1:n-m)=ho(1:n-m)-ho(1+m:n) + if (ANY(den(1:n-m)==zero)) then + ABI_ERROR('Two input xa are identical') + end if + + den(1:n-m)=(c(2:n-m+1)-d(1:n-m))/den(1:n-m) + d(1:n-m)=ho(1+m:n)*den(1:n-m) ! Update c and d + c(1:n-m)=ho(1:n-m)*den(1:n-m) + + if (2*ns0 (order 10 is hard-coded) +!! 6 for Romberg integration with midpoint rule and extrapolation for h-->0 (order 10 is hard-coded) +!! 7 for Gauss-Legendre +!! +!! OUTPUT +!! quad=the integral +!! ierr=0 if quadrature converged. +!! +!! SOURCE + +recursive subroutine quadrature(func,xmin,xmax,qopt,quad,ierr,ntrial,accuracy,npts) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: qopt + integer,intent(out) :: ierr + integer,optional,intent(in) :: ntrial,npts + real(dp),intent(in) :: xmin,xmax + real(dp),optional,intent(in) :: accuracy + real(dp),intent(out) :: quad + + interface + function func(x) + use defs_basis + real(dp),intent(in) :: x + real(dp) :: func + end function func + end interface + + !interface + ! function func(x) + ! use defs_basis + ! real(dp),intent(in) :: x(:) + ! real(dp) :: func(SIZE(x)) + ! end function func + !end interface + +!Local variables------------------------------- +!scalars + integer :: K,KM,NT,NX,NX0,it,ix + real(dp) :: EPS,old_st,st,old_quad,dqromb + real(dp) :: TOL + character(len=500) :: msg +!arrays + real(dp),allocatable :: h(:),s(:) + real(dp),allocatable :: wx(:),xx(:) +! ************************************************************************* + + ierr = 0 + TOL =tol12 + EPS =tol6 ; if (PRESENT(accuracy)) EPS=accuracy + NT =20 ; if (PRESENT(ntrial )) NT=ntrial + quad =zero + + select case (qopt) + + case (1) + ! === Trapezoidal, closed form, O(1/N^2) + do it=1,NT + call trapezoidal_(func,it,xmin,xmax,quad) + if (it>5) then ! Avoid spurious early convergence + if (ABS(quad-old_quad)5) then ! Avoid spurious early convergence + if (ABS(quad-old_quad)4) then ! Avoid spurious early convergence + if (ABS(quad-old_quad)4) then ! Avoid spurious early convergence + if (ABS(quad-old_quad)=K) then + call polyn_interp(h(it-KM:it),s(it-KM:it),zero,quad,dqromb) + if (ABS(dqromb)=K) then + call polyn_interp(h(it-KM:it),s(it-KM:it),zero,quad,dqromb) + !write(std_out,*) quad,dqromb + if (ABS(dqromb)1) then + !write(std_out,*) quad + if (ABS(quad-old_quad)4096*machine precision, print error warning. +!! (Typical 64 bit machine precision is 2^-52 or 2.22e-16) +!! +!! INPUTS +!! chmin(n*n+n)=complex hermitian matrix with numerical noise possibly +!! rendering Im(diagonal elements) approximately 1e-15 or so +!! ndim=size of complex hermitian matrix +!! +!! OUTPUT +!! chmout(n*n+n)=redefined matrix with strictly real diagonal elements. +!! May be same storage location as chmin. +!! ierr=0 if no problem, 1 if the imaginary part of some element +!! too large (at present, stop in this case). +!! +!! TODO +!! Name is misleading, perhaps hermit_force_diago? +!! Interface allows aliasing +!! +!! SOURCE + +subroutine hermit(chmin, chmout, ierr, ndim) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: ndim + integer,intent(out) :: ierr +!arrays + real(dp),intent(inout) :: chmin(ndim*ndim+ndim) + real(dp),intent(inout) :: chmout(ndim*ndim+ndim) + +!Local variables------------------------------- +!scalars + integer,save :: mmesgs=20,nmesgs=0 + integer :: idim,merrors,nerrors + real(dp),parameter :: eps=epsilon(0.0d0) + real(dp) :: ch_im,ch_re,moduls,tol + character(len=500) :: msg + +! ************************************************************************* + + tol=4096.0d0*eps + + ierr=0 + merrors=0 + +!Copy matrix into possibly new location + chmout(:)=chmin(:) + +!Loop over diagonal elements of matrix (off-diag not altered) + do idim=1,ndim + + ch_im=chmout(idim*idim+idim ) + ch_re=chmout(idim*idim+idim-1) + +! check for large absolute Im part and print warning when +! larger than (some factor)*(machine precision) + nerrors=0 + if( abs(ch_im) > tol .and. abs(ch_im) > tol8*abs(ch_re)) nerrors=2 + if( abs(ch_im) > tol .or. abs(ch_im) > tol8*abs(ch_re)) nerrors=1 + + if( (abs(ch_im) > tol .and. nmesgs tol8*abs(ch_re) .and. nmesgs abs_tol)) ierr = 1 + +end function check_vec_conjg +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/print_arr1d_spc +!! NAME +!! print_arr1d_spc +!! +!! FUNCTION +!! Print an array using a nice (?) format +!! +!! INPUTS +!! arr(:)=vector/matrix to be printed +!! mode_paral(optional)=parallel mode, DEFAULT is "COLL" +!! "COLL" if all procs are calling the routine with the same message to be written only once +!! "PERS" if the procs are calling the routine with different mesgs each to be written, +!! or if one proc is calling the routine +!! unit(optional)=the unit number of the file, DEFAULT=std_out +!! max_r,max_c(optional)=Max number of rows and columns to be printed +!! (DEFAULT is 9, output format assumes to be less that 99, but there might be +!! problems with wrtout if message size exceeds 500 thus max number of elements should be ~60) +!! +!! OUTPUT +!! (only printing) +!! +!! SOURCE + +subroutine print_arr1d_spc(arr,max_r,unit,mode_paral) + +!Arguments ------------------------------------ +!scalars + integer,optional,intent(in) :: unit,max_r + character(len=4),optional,intent(in) :: mode_paral +!arrays + complex(spc),intent(in) :: arr(:) + +!Local variables------------------------------- +!scalars + integer :: unt,ii,nr,mr + character(len=4) :: mode + character(len=500) :: msg + character(len=100) :: fmth,fmt1 +! ************************************************************************* + + unt=std_out ; if (PRESENT(unit )) unt=unit + mode='COLL' ; if (PRESENT(mode_paral)) mode=mode_paral + mr=15 ; if (PRESENT(max_r )) mr=max_r + + if (mode/='COLL'.and.mode/='PERS') then + write(msg,'(2a)')' Wrong value of mode_paral ',mode + ABI_BUG(msg) + end if + ! + ! === Print out matrix === + nr=SIZE(arr,DIM=1) ; if (mr>nr) mr=nr + + write(fmth,*)'(6x,',mr,'(i2,6x))' + write(fmt1,*)'(3x,',mr,'f8.3)' + + write(msg,fmth)(ii,ii=1,mr) + call wrtout(unt,msg,mode) !header + write(msg,fmt1)REAL (arr(1:mr)) + call wrtout(unt,msg,mode) !real part + write(msg,fmt1)AIMAG(arr(1:mr)) + call wrtout(unt,msg,mode) !imag part + +end subroutine print_arr1d_spc +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/print_arr1d_dpc +!! NAME +!! print_arr1d_dpc +!! +!! FUNCTION +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +subroutine print_arr1d_dpc(arr, max_r, unit, mode_paral) + +!Arguments ------------------------------------ +!scalars + integer,optional,intent(in) :: unit, max_r + character(len=4),optional,intent(in) :: mode_paral +!arrays + complex(dpc),intent(in) :: arr(:) + +!Local variables------------------------------- +!scalars + integer :: unt,ii,nr,mr + character(len=4) :: mode + character(len=500) :: msg + character(len=100) :: fmth,fmt1 +! ************************************************************************* + + unt=std_out ; if (PRESENT(unit )) unt=unit + mode='COLL' ; if (PRESENT(mode_paral)) mode=mode_paral + mr=15 ; if (PRESENT(max_r )) mr=max_r + + if (mode/='COLL'.and.mode/='PERS') then + write(msg,'(2a)')' Wrong value of mode_paral ',mode + ABI_BUG(msg) + end if + + ! Print out matrix. + nr=SIZE(arr,DIM=1) ; if (mr>nr) mr=nr + + write(fmth,*)'(6x,',mr,'(i2,6x))' + write(fmt1,*)'(3x,',mr,'f8.3)' + + write(msg,fmth)(ii,ii=1,mr) + call wrtout(unt,msg,mode) ! header + write(msg,fmt1)REAL (arr(1:mr)) + call wrtout(unt,msg,mode) !real part + write(msg,fmt1)AIMAG(arr(1:mr)) + call wrtout(unt,msg,mode) !imag part + +end subroutine print_arr1d_dpc +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/print_arr2d_spc +!! NAME +!! print_arr2d_spc +!! +!! FUNCTION +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +subroutine print_arr2d_spc(arr, max_r, max_c, unit, mode_paral) + +!Arguments ------------------------------------ +!scalars + integer,optional,intent(in) :: unit, max_r, max_c + character(len=4),optional,intent(in) :: mode_paral +!arrays + complex(spc),intent(in) :: arr(:,:) + +!Local variables------------------------------- +!scalars + integer :: unt,ii,jj,nc,nr,mc,mr + character(len=4) :: mode + character(len=500) :: msg + character(len=100) :: fmth,fmt1,fmt2 +! ************************************************************************* + + unt =std_out; if (PRESENT(unit )) unt =unit + mode='COLL' ; if (PRESENT(mode_paral)) mode=mode_paral + mc =9 ; if (PRESENT(max_c )) mc =max_c + mr =9 ; if (PRESENT(max_r )) mr =max_r + + if (mode/='COLL'.and.mode/='PERS') then + write(msg,'(2a)')'Wrong value of mode_paral ',mode + ABI_BUG(msg) + end if + ! + ! === Print out matrix === + nr=SIZE(arr,DIM=1); if (mr>nr) mr=nr + nc=SIZE(arr,DIM=2); if (mc>nc) mc=nc + + write(fmth,*)'(6x,',mc,'(i2,6x))' + write(fmt1,*)'(3x,i2,',mc,'f8.3)' + write(fmt2,*)'(5x ,',mc,'f8.3,a)' + + write(msg,fmth)(jj,jj=1,mc) + call wrtout(unt,msg,mode) !header + do ii=1,mr + write(msg,fmt1)ii,REAL(arr(ii,1:mc)) + call wrtout(unt,msg,mode) !real part + write(msg,fmt2) AIMAG(arr(ii,1:mc)),ch10 + call wrtout(unt,msg,mode) !imag part + end do + +end subroutine print_arr2d_spc +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/print_arr2d_dpc +!! NAME +!! print_arr2d_dpc +!! +!! FUNCTION +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +subroutine print_arr2d_dpc(arr,max_r,max_c,unit,mode_paral) + +!Arguments ------------------------------------ +!scalars + integer,optional,intent(in) :: unit,max_r,max_c + character(len=4),optional,intent(in) :: mode_paral +!arrays + complex(dpc),intent(in) :: arr(:,:) + +!Local variables------------------------------- +!scalars + integer :: unt,ii,jj,nc,nr,mc,mr + character(len=4) :: mode + character(len=500) :: msg + character(len=100) :: fmth,fmt1,fmt2 +! ************************************************************************* + + unt =std_out; if (PRESENT(unit )) unt =unit + mode='COLL' ; if (PRESENT(mode_paral)) mode=mode_paral + mc =9 ; if (PRESENT(max_c )) mc =max_c + mr =9 ; if (PRESENT(max_r )) mr =max_r + + if (mode/='COLL'.and.mode/='PERS') then + write(msg,'(2a)')'Wrong value of mode_paral ',mode + ABI_BUG(msg) + end if + ! + ! === Print out matrix === + nr=SIZE(arr,DIM=1); if (mr>nr) mr=nr + nc=SIZE(arr,DIM=2); if (mc>nc) mc=nc + + write(fmth,*)'(6x,',mc,'(i2,6x))' + write(fmt1,*)'(3x,i2,',mc,'f8.3)' + write(fmt2,*)'(5x ,',mc,'f8.3,a)' + + write(msg,fmth)(jj,jj=1,mc) + call wrtout(unt, msg, mode) ! header + do ii=1,mr + write(msg,fmt1)ii,REAL(arr(ii,1:mc)) + call wrtout(unt,msg,mode) ! real part + write(msg,fmt2) AIMAG(arr(ii,1:mc)),ch10 + call wrtout(unt,msg,mode) ! imag part + end do + +end subroutine print_arr2d_dpc +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/pade +!! NAME +!! pade +!! +!! FUNCTION +!! Calculate the pade approximant in zz of the function f calculated at the n points z +!! +!! SOURCE + +function pade(n, z, f, zz) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: n + complex(dpc),intent(in) :: zz + complex(dpc) :: pade +!arrays + complex(dpc),intent(in) :: z(n), f(n) + +!Local variables------------------------------- +!scalars + complex(dpc) :: a(n) + complex(dpc) :: Az(0:n), Bz(0:n) + integer :: i +! ************************************************************************* + + call calculate_pade_a(a, n, z, f) + + Az(0)=czero + Az(1)=a(1) + Bz(0)=cone + Bz(1)=cone + + do i=1,n-1 + Az(i+1)=Az(i)+(zz-z(i))*a(i+1)*Az(i-1) + Bz(i+1)=Bz(i)+(zz-z(i))*a(i+1)*Bz(i-1) + end do + !write(std_out,*) 'Bz(n)',Bz(n) + !if (REAL(Bz(n))==zero.and.AIMAG(Bz(n))==zero) write(std_out,*) ' Bz(n) ',Bz(n) + pade=Az(n)/Bz(n) + !write(std_out,*) 'pade_approx ', pade_approx + +end function pade +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/dpade +!! NAME +!! dpade +!! +!! FUNCTION +!! Calculate the derivative of the pade approximant in zz of the function f calculated at the n points z +!! +!! SOURCE + +function dpade(n, z, f, zz) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: n + complex(dpc),intent(in) :: zz + complex(dpc) :: dpade +!arrays + complex(dpc),intent(in) :: z(n),f(n) + +!Local variables------------------------------- +!scalars + integer :: i +!arrays + complex(dpc) :: a(n) + complex(dpc) :: Az(0:n), Bz(0:n) + complex(dpc) :: dAz(0:n), dBz(0:n) +! ************************************************************************* + + call calculate_pade_a(a, n, z, f) + + Az(0)=czero + Az(1)=a(1) + Bz(0)=cone + Bz(1)=cone + dAz(0)=czero + dAz(1)=czero + dBz(0)=czero + dBz(1)=czero + + do i=1,n-1 + Az(i+1)=Az(i)+(zz-z(i))*a(i+1)*Az(i-1) + Bz(i+1)=Bz(i)+(zz-z(i))*a(i+1)*Bz(i-1) + dAz(i+1)=dAz(i)+a(i+1)*Az(i-1)+(zz-z(i))*a(i+1)*dAz(i-1) + dBz(i+1)=dBz(i)+a(i+1)*Bz(i-1)+(zz-z(i))*a(i+1)*dBz(i-1) + end do + !write(std_out,*) 'Bz(n)', Bz(n) + !if (REAL(Bz(n))==zero.and.AIMAG(Bz(n))==zero) write(std_out,*) 'Bz(n)',Bz(n) + !pade_approx = Az(n) / Bz(n) + dpade=dAz(n)/Bz(n) -Az(n)*dBz(n)/(Bz(n)*Bz(n)) + !write(std_out,*) 'pade_approx ', pade_approx + +end function dpade +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/calculate_pade_a +!! NAME +!! calculate_pade_a +!! +!! FUNCTION +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +subroutine calculate_pade_a(a, n, z, f) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: n + complex(dpc),intent(in) :: z(n),f(n) + complex(dpc),intent(out) :: a(n) + +!Local variables------------------------------- +!scalars + integer :: i,j +!arrays + complex(dpc) :: g(n,n) +! ************************************************************************* + + g(1,1:n)=f(1:n) + + do i=2,n + do j=i,n + if (REAL(g(i-1,j))==zero.and.AIMAG(g(i-1,j))==zero) write(std_out,*) 'g_i(z_j)',i,j,g(i,j) + g(i,j)=(g(i-1,i-1)-g(i-1,j)) / ((z(j)-z(i-1))*g(i-1,j)) + !write(std_out,*) 'g_i(z_j)',i,j,g(i,j) + end do + end do + do i=1,n + a(i)=g(i,i) + end do + !write(std_out,*) 'a ',a(:) + +end subroutine calculate_pade_a +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/newrap_step +!! NAME +!! newrap_step +!! +!! FUNCTION +!! Apply single step newton-raphson method to find the root of a complex function +!! z_k+1 = z_k - f(z_k) / (df/dz(z_k)) +!! +!! SOURCE + +complex(dp) function newrap_step(z, f, df) + +!Arguments ------------------------------------ +!scalars + complex(dpc),intent(in) :: z,f,df + +!Local variables------------------------------- + real(dp) :: dfm2 +! ************************************************************************* + + dfm2=ABS(df)*ABS(df) + + newrap_step = z - (f*CONJG(df))/dfm2 + !& z-one/(ABS(df)*ABS(df)) * CMPLX( REAL(f)*REAL(df)+AIMAG(f)*AIMAG(df), -REAL(f)*AIMAG(df)+AIMAG(f)*EAL(df) ) + +end function newrap_step +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/cross_product_int +!! NAME +!! cross_product_int +!! +!! FUNCTION +!! Return the cross product of two vectors with integer components. +!! +pure function cross_product_int(vec1,vec2) result(res) + +!Arguments ------------------------------------ + integer,intent(in) :: vec1(3),vec2(3) + integer :: res(3) +! ************************************************************************* + + res(1)=vec1(2)*vec2(3)-vec1(3)*vec2(2) + res(2)=vec1(3)*vec2(1)-vec1(1)*vec2(3) + res(3)=vec1(1)*vec2(2)-vec1(2)*vec2(1) + +end function cross_product_int +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/cross_product_rdp +!! NAME +!! cross_product_rdp +!! +!! FUNCTION +!! Return the cross product of two vectors with real double precision components. +!! +pure function cross_product_rdp(vec1,vec2) result(res) + +!Arguments ------------------------------------ + real(dp),intent(in) :: vec1(3),vec2(3) + real(dp) :: res(3) +! ************************************************************************* + + res(1)=vec1(2)*vec2(3)-vec1(3)*vec2(2) + res(2)=vec1(3)*vec2(1)-vec1(1)*vec2(3) + res(3)=vec1(1)*vec2(2)-vec1(2)*vec2(1) + +end function cross_product_rdp +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/l2norm_rdp +!! NAME +!! l2norm_rdp +!! +!! FUNCTION +!! Return the length (ordinary L2 norm) of a vector. +!! + +pure function l2norm_rdp(vec) result(res) + +!Arguments ------------------------------------ + real(dp),intent(in) :: vec(:) + real(dp) :: res +! ************************************************************************* + + res=SQRT(DOT_PRODUCT(vec,vec)) + +end function l2norm_rdp +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/remove_copies +!! NAME +!! remove_copies +!! +!! FUNCTION +!! Given an initial set of elements, set_in, return the subset of inequivalent items +!! packed in the first n_out positions of set_in. Use the logical function is_equal +!! to define whether two items are equivalent. +!! +!! INPUTS +!! n_in=Initial number of elements. +!! is_equal=logical function used to discern if two items are equal. +!! +!! OUTPUT +!! n_out=Number of inequivalent items found. +!! +!! SIDE EFFECTS +!! set_in(3,n_in)= +!! In input the initial set of n_in elements +!! In output set_in(3,1:n_out) contains the inequivalent elements found. +!! +!! NOTES +!! The routines only deals with arrays of 3D-vectors although generalizing the +!! algorithm to nD-space is straightforward. +!! +!! SOURCE + +subroutine remove_copies(n_in, set_in, n_out, is_equal) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: n_in + integer,intent(out) :: n_out +!arrays + real(dp),target,intent(inout) :: set_in(3,n_in) + + interface + function is_equal(k1,k2) + use defs_basis + real(dp),intent(in) :: k1(3),k2(3) + logical :: is_equal + end function is_equal + end interface + +!Local variables------------------------------- +!scalars + integer :: ii,jj + logical :: isnew +!arrays + type rdp1d_pt + integer :: idx + real(dp),pointer :: rpt(:) + end type rdp1d_pt + type(rdp1d_pt),allocatable :: Ap(:) + +! ************************************************************************* + + ABI_MALLOC(Ap,(n_in)) + Ap(1)%idx = 1 + Ap(1)%rpt => set_in(:,1) + + n_out=1 + do ii=2,n_in + + isnew=.TRUE. + do jj=1,n_out + if (is_equal(set_in(:,ii),Ap(jj)%rpt(:))) then + isnew=.FALSE. + exit + end if + end do + + if (isnew) then + n_out=n_out+1 + Ap(n_out)%rpt => set_in(:,ii) + Ap(n_out)%idx = ii + end if + end do + + ! The n_out inequivalent items are packed first. + if (n_out/=n_in) then + do ii=1,n_out + jj=Ap(ii)%idx + set_in(:,ii) = set_in(:,jj) + !write(std_out,*) Ap(ii)%idx,Ap(ii)%rpt(:) + end do + end if + + ABI_FREE(Ap) + +end subroutine remove_copies +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/denominator +!! NAME +!! denominator +!! +!! FUNCTION +!! Return the denominator of the rational number dd, sign is not considered. +!! +!! INPUTS +!! dd=The rational number +!! tolerance=Absolute tolerance +!! +!! OUTPUT +!! ierr=If /=0 the input number is not rational within the given tolerance. +!! +!! SOURCE + +integer function denominator(dd,ierr,tolerance) + +!Arguments ------------------------------------ +!scalars + integer,intent(out) :: ierr + real(dp),intent(in) :: dd + real(dp),optional,intent(in) :: tolerance + +!Local variables ------------------------------ +!scalars + integer,parameter :: largest_integer = HUGE(1) + integer :: ii + real(dp) :: my_tol + +!************************************************************************ + + ii=1 + my_tol=0.0001 ; if (PRESENT(tolerance)) my_tol=ABS(tolerance) + do + if (ABS(dd*ii-NINT(dd*ii)) No terminator. +!! -1 --> Assume constant coefficients for a_i and b_i for i>nlev with a_inf = a(nlev) and b_inf = b(nleb) +!! 1 --> Same as above but a_inf and b_inf are obtained by averaging over the nlev values. +!! aa(nlev)=Set of a_i coefficients. +!! bb(nlev)=Set of b_i coefficients. +!! nz=Number of points on the z-mesh. +!! zpts(nz)=z-mesh. +!! +!! OUTPUT +!! spectrum(nz)=Contains f(z) on the input mesh. +!! +!! SOURCE + +subroutine continued_fract(nlev,term_type,aa,bb,nz,zpts,spectrum) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: nlev,term_type,nz +!arrays + real(dp),intent(in) :: bb(nlev) + complex(dpc),intent(in) :: aa(nlev) + complex(dpc),intent(in) :: zpts(nz) + complex(dpc),intent(out) :: spectrum(nz) + +!Local variables ------------------------------ +!scalars + integer :: it + real(dp) :: bb_inf,bg,bu,swap + complex(dpc) :: aa_inf + character(len=500) :: msg +!arrays + complex(dpc),allocatable :: div(:),den(:) + +!************************************************************************ + + ABI_MALLOC(div,(nz)) + ABI_MALLOC(den,(nz)) + + select case (term_type) + case (0) ! No terminator. + div=czero + case (-1,1) + if (term_type==-1) then + bb_inf=bb(nlev) + aa_inf=aa(nlev) + else + bb_inf=SUM(bb)/nlev + aa_inf=SUM(aa)/nlev + end if + ! Be careful with the sign of the SQRT. + div(:) = half*(bb(nlev)/(bb_inf))**2 * ( zpts-aa_inf - SQRT((zpts-aa_inf)**2 - four*bb_inf**2) ) + case (2) + ABI_ERROR("To be tested") + div = zero + if (nlev>4) then + bg=zero; bu=zero + do it=1,nlev,2 + if (it+2 Cartesian + + fact = one + if (PRESENT(units)) then + if (units(1:1) == "D" .or. units(1:1) == "d") fact = two_pi/360_dp + end if + + do jj=1,SIZE(carr,DIM=2) + do ii=1,SIZE(carr,DIM=1) + rho = DBLE(carr(ii,jj)) + theta= AIMAG(carr(ii,jj)) * fact + carr(ii,jj) = CMPLX(rho*DCOS(theta), rho*DSIN(theta), kind=dpc) + end do + end do + + case ("C","c") ! Cartesian --> Spherical \theta = 2 arctan(y/(rho+x)) + + fact = one + if (PRESENT(units)) then + if (units(1:1) == "D" .or. units(1:1) == "d") fact = 360_dp/two_pi + end if + + do jj=1,SIZE(carr,DIM=2) + do ii=1,SIZE(carr,DIM=1) + rho = SQRT(ABS(carr(ii,jj))) + if (rho > tol16) then + theta= two * ATAN( AIMAG(carr(ii,jj)) / (DBLE(carr(ii,jj)) + rho) ) + else + theta= zero + end if + carr(ii,jj) = CMPLX(rho, theta*fact, kind=dpc) + end do + end do + + case default + msg = " Wrong value for from: "//TRIM(from) + ABI_BUG(msg) + end select + +end subroutine cmplx_sphcart +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/pfactorize +!! NAME +!! pfactorize +!! +!! FUNCTION +!! Factorize a number in terms of an user-specified set of prime factors +!! nn = alpha * Prod_i p^i 1) +!! +!! INPUTS +!! nn=The number to be factorized. +!! nfactors=The number of factors +!! pfactors(nfactors)=The list of prime number e.g. (/ 2, 3, 5, 7, 11 /) +!! +!! OUTPUT +!! powers(nfactors+1)= +!! The first nfactors entries are the powers i in Eq.1. powers(nfactors+1) is alpha. +!! +!! SOURCE + +subroutine pfactorize(nn,nfactors,pfactors,powers) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: nn,nfactors + integer,intent(in) :: pfactors(nfactors) + integer,intent(out) :: powers (nfactors+1) + +!Local variables ------------------------------ +!scalars + integer :: tnn,ifc,fact,ipow,maxpwr + +! ************************************************************************* + + powers=0; tnn=nn + + fact_loop: do ifc=1,nfactors + fact = pfactors (ifc) + maxpwr = NINT ( LOG(DBLE(tnn))/LOG(DBLE(fact) ) ) + 1 + do ipow=1,maxpwr + if (tnn==1) EXIT fact_loop + if ( MOD(tnn,fact)==0 ) then + tnn=tnn/fact + powers(ifc)=powers(ifc) + 1 + end if + end do + end do fact_loop + + if ( nn /= tnn * PRODUCT( pfactors**powers(1:nfactors)) ) then + ABI_BUG('nn/=tnn!') + end if + + powers(nfactors+1) = tnn + +end subroutine pfactorize +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/isordered +!! NAME +!! isordered +!! +!! FUNCTION +!! Return .TRUE. if values in array arr are ordered. +!! Consider that two double precision numbers within tolerance tol are equal. +!! +!! INPUTS +!! nn=Size of arr. +!! arr(nn)=The array with real values to be tested. +!! direction= ">" for ascending numerical order. +!! ">" for decreasing numerical order. +!! +!! SOURCE + +function isordered_rdp(nn,arr,direction,tol) result(isord) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: nn + real(dp),intent(in) :: tol + logical :: isord + character(len=*),intent(in) :: direction +!arrays + real(dp),intent(in) :: arr(nn) + +!Local variables ------------------------------ +!scalars + integer :: ii + real(dp) :: prev + character(len=500) :: msg + +! ************************************************************************* + + prev = arr(1); isord =.TRUE. + + SELECT CASE (direction(1:1)) + CASE(">") + ii=2; + do while (ii<=nn .and. isord) + if (ABS(arr(ii)-prev) > tol) isord = (arr(ii) >= prev) + prev = arr(ii) + ii = ii +1 + end do + + CASE("<") + ii=2; + do while (ii<=nn .and. isord) + if (ABS(arr(ii)-prev) > tol) isord = (arr(ii) <= prev) + prev = arr(ii) + ii = ii +1 + end do + + CASE DEFAULT + msg = "Wrong direction: "//TRIM(direction) + ABI_ERROR(msg) + END SELECT + +end function isordered_rdp +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/stats_eval +!! NAME +!! stats_eval +!! +!! FUNCTION +!! Helper function used to calculate the statistical parameters of a dataset. +!! +!! INPUT +!! arr(:)=Array with the values. +!! +!! OUTPUT +!! stats=Data type storing the parameters of the data set. +!! +!! SOURCE + +pure function stats_eval(arr) result(stats) + +!Arguments ------------------------------------ +!scalars + type(stats_t) :: stats +!arrays + real(dp),intent(in) :: arr(:) + +!Local variables ------------------------------ +!scalars + integer :: ii,nn + real(dp) :: xx,x2_sum + +! ************************************************************************* + + stats%min = +HUGE(one) + stats%max = -HUGE(one) + stats%mean = zero + + nn = SIZE(arr) + do ii=1,nn + xx = arr(ii) + stats%max = MAX(stats%max, xx) + stats%min = MIN(stats%min, xx) + stats%mean = stats%mean + xx + end do + + stats%mean = stats%mean/nn + + ! Two-pass algorithm for the variance (more stable than the single-pass one). + x2_sum = zero + do ii=1,nn + xx = arr(ii) + x2_sum = x2_sum + (xx - stats%mean)*(xx - stats%mean) + end do + + if (nn>1) then + stats%stdev = x2_sum/(nn-1) + stats%stdev = SQRT(ABS(stats%stdev)) + else + stats%stdev = zero + end if + +end function stats_eval +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/wrap2_zero_one +!! NAME +!! wrap2_zero_one +!! +!! FUNCTION +!! Transforms a real number (num) in its corresponding reduced number +!! (red) in the interval [0,1[ where 1 is not included (tol12) +!! num=red+shift +!! +!! INPUTS +!! num=real number +!! +!! OUTPUT +!! red=reduced number of num in the interval [0,1[ where 1 is not included +!! shift=num-red +!! +!! SOURCE + +elemental subroutine wrap2_zero_one(num, red, shift) + +!Arguments ------------------------------------ +!scalars + real(dp),intent(in) :: num + real(dp),intent(out) :: red,shift + +! ************************************************************************* + + if (num>zero) then + red=mod((num+tol12),one)-tol12 + else + red=-mod(-(num-one+tol12),one)+one-tol12 + end if + if(abs(red)zero) then + red=mod((num+half-tol12),one)-half+tol12 + else + red=-mod(-(num-half-tol12),one)+half+tol12 + end if + if(abs(red)nr1) ir1=ir1-nr1 + if(ir2>nr2) ir2=ir2-nr2 + if(ir3>nr3) ir3=ir3-nr3 + + if(pr1==0) pr1=nr1 + if(pr2==0) pr2=nr2 + if(pr3==0) pr3=nr3 + +end subroutine interpol3d_indices +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/interpolate_denpot +!! NAME +!! interpolate_denpot +!! +!! FUNCTION +!! Linear interpolation of density/potential given on the real space FFT mesh. +!! Assumes array on full mesh i.e. no MPI-FFT. +!! +!! INPUTS +!! cplex=1 for real, 2 for complex data. +!! in_ngfft(3)=Mesh divisions of input array +!! nspden=Number of density components. +!! in_rhor(cplex * in_nfftot * nspden)=Input array +!! out_ngfft(3)=Mesh divisions of output array +!! +!! OUTPUT +!! outrhor(cplex * out_nfftot * nspden)=Output array with interpolated data. +!! +!! SOURCE + +subroutine interpolate_denpot(cplex, in_ngfft, nspden, in_rhor, out_ngfft, out_rhor) + +!Arguments------------------------------------------------------------- +!scalars + integer,intent(in) :: cplex,nspden +!arrays + integer,intent(in) :: in_ngfft(3), out_ngfft(3) + real(dp),intent(in) :: in_rhor(cplex, product(in_ngfft), nspden) + real(dp),intent(out) :: out_rhor(cplex, product(out_ngfft), nspden) + +!Local variables-------------------------------------------------------- +!scalars + integer :: ispden, ir1, ir2, ir3, ifft + real(dp) :: rr(3) + +! ************************************************************************* + + ! Linear interpolation. + do ispden=1,nspden + do ir3=0,out_ngfft(3)-1 + rr(3) = DBLE(ir3)/out_ngfft(3) + do ir2=0,out_ngfft(2)-1 + rr(2) = DBLE(ir2)/out_ngfft(2) + do ir1=0,out_ngfft(1)-1 + rr(1) = DBLE(ir1)/out_ngfft(1) + ifft = 1 + ir1 + ir2*out_ngfft(1) + ir3*out_ngfft(1)*out_ngfft(2) + out_rhor(1:cplex, ifft, ispden) = interpol3d_1d(rr, in_ngfft(1), in_ngfft(2), in_ngfft(3), in_rhor(:, :, ispden),cplex) + end do + end do + end do + end do + +end subroutine interpolate_denpot +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/simpson_int +!! NAME +!! simpson_int +!! +!! FUNCTION +!! Simpson integral of input function +!! +!! INPUTS +!! npts=max number of points on grid for integral +!! step = space between integral arguments +!! values(npts)=integrand function. +!! +!! OUTPUT +!! int_values(npts)=integral of values. +!! +!! SOURCE + +subroutine simpson_int(npts, step, values, int_values) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: npts + real(dp),intent(in) :: step +!arrays + real(dp),intent(in) :: values(npts) + real(dp),intent(out) :: int_values(npts) + +!Local variables ------------------------- +!scalars + integer :: ii + real(dp),parameter :: coef1 = 0.375_dp !9.0_dp / 24.0_dp + real(dp),parameter :: coef2 = 1.166666666666666666666666667_dp !28.0_dp / 24.0_dp + real(dp),parameter :: coef3 = 0.958333333333333333333333333_dp !23.0_dp / 24.0_dp + character(len=500) :: msg + +! ********************************************************************* + + if (npts < 6) then + write(msg,"(a,i0)")"Number of points in integrand function must be >=6 while it is: ",npts + ABI_ERROR(msg) + end if + +!----------------------------------------------------------------- +!Simpson integral of input function +!----------------------------------------------------------------- + +!first point is 0: don t store it +!do integration equivalent to Simpson O(1/N^4) from NumRec in C p 134 NumRec in Fortran p 128 + int_values(1) = coef1*values(1) + int_values(2) = int_values(1) + coef2*values(2) + int_values(3) = int_values(2) + coef3*values(3) + + do ii=4,npts-3 + int_values(ii) = int_values(ii-1) + values(ii) + end do + + int_values(npts-2) = int_values(npts-3) + coef3*values(npts-2) + int_values(npts-1) = int_values(npts-2) + coef2*values(npts-1) + int_values(npts ) = int_values(npts-1) + coef1*values(npts ) + + int_values(:) = int_values(:) * step + +end subroutine simpson_int +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/simpson +!! NAME +!! simpson +!! +!! FUNCTION +!! Simpson integral of input function +!! +!! INPUTS +!! step = space between integral arguments +!! values(npts)=integrand function. +!! +!! OUTPUT +!! integral of values on the full mesh. +!! +!! SOURCE + +function simpson(step, values) result(res) + +!Arguments ------------------------------------ +!scalars + real(dp),intent(in) :: step + real(dp) :: res +!arrays + real(dp),intent(in) :: values(:) + +!Local variables ------------------------- +!scalars + real(dp) :: int_values(size(values)) + +! ********************************************************************* + + call simpson_int(size(values),step,values,int_values) + res = int_values(size(values)) + +end function simpson +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/rhophi +!! NAME +!! rhophi +!! +!! FUNCTION +!! Compute the phase and the module of a complex number. +!! The phase angle is fold into the interval [-pi,pi] +!! +!! INPUTS +!! cx(2) = complex number +!! +!! OUTPUT +!! phi = phase of cx fold into [-pi,pi] +!! rho = module of cx +!! +!! SOURCE + +pure subroutine rhophi(cx, phi, rho) + +!Arguments ------------------------------------ +!scalars + real(dp),intent(out) :: phi,rho +!arrays + real(dp),intent(in) :: cx(2) + +! *********************************************************************** + + rho = sqrt(cx(1)*cx(1) + cx(2)*cx(2)) + + if (abs(cx(1)) > tol8) then + + phi = atan(cx(2)/cx(1)) + + ! phi is an element of [-pi,pi] + if (cx(1) < zero) then + if (phi < zero) then + phi = phi + pi + else + phi = phi - pi + end if + end if + + else + + if (cx(2) > tol8) then + phi = pi*half + else if (cx(2) < tol8) then + phi = -pi*half + else + phi = zero + end if + + end if + +end subroutine rhophi +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/vdiff_eval +!! NAME +!! vdiff_eval +!! +!! FUNCTION +!! Estimate the "distance" between two functions tabulated on a homogeneous grid. +!! See vdiff_t +!! +!! INPUTS +!! cplex=1 if f1 and f2 are real, 2 for complex. +!! nr=Number of points in the mesh. +!! f1(cplex,nr), f2(cplex,nr)=Vectors with values +!! [vd_max]= Compute max value of the different entries. +!! +!! OUTPUT +!! vdiff_t object +!! +!! SOURCE + +type(vdiff_t) function vdiff_eval(cplex, nr, f1, f2, volume, vd_max) result(vd) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: cplex,nr + real(dp),intent(in) :: volume + type(vdiff_t),optional,intent(inout) :: vd_max +!arrays + real(dp),intent(in) :: f1(cplex,nr),f2(cplex,nr) + +!Local variables------------------------------- +!scalars + integer :: ir + real(dp) :: num,den,dr + type(stats_t) :: stats +!arrays + real(dp) :: abs_diff(nr) +! ********************************************************************* + + dr = volume / nr + + if (cplex == 1) then + abs_diff = abs(f1(1,:) - f2(1,:)) + num = sum(abs_diff) + den = sum(abs(f2(1,:))) + + else if (cplex == 2) then + do ir=1,nr + abs_diff(ir) = sqrt((f1(1,ir) - f2(1,ir))**2 + (f1(2,ir) - f2(2,ir))**2) + end do + num = sum(abs_diff) + den = zero + do ir=1,nr + den = den + sqrt(f2(1,ir)**2 + f2(2,ir)**2) + end do + end if + + vd%int_adiff = num * dr + call safe_div(num,den,zero,vd%l1_rerr) + + stats = stats_eval(abs_diff) + vd%mean_adiff = stats%mean + vd%stdev_adiff = stats%stdev + vd%min_adiff = stats%min + vd%max_adiff = stats%max + + if (present(vd_max)) then + vd_max%int_adiff = max(vd_max%int_adiff, vd%int_adiff) + vd_max%mean_adiff = max(vd_max%mean_adiff, vd%mean_adiff) + vd_max%stdev_adiff = max(vd_max%stdev_adiff, vd%stdev_adiff) + vd_max%min_adiff = max(vd_max%min_adiff, vd%min_adiff) + vd_max%max_adiff = max(vd_max%max_adiff, vd%max_adiff) + vd_max%l1_rerr = max(vd_max%l1_rerr, vd%L1_rerr) + end if + +end function vdiff_eval +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/vdiff_print +!! NAME +!! vdiff_print +!! +!! FUNCTION +!! Print vdiff_t to unit +!! +!! SOURCE + +subroutine vdiff_print(vd, unit) + +!Arguments ------------------------------------ +!scalars + integer,optional,intent(in) :: unit + type(vdiff_t),intent(in) :: vd + +!Local variables------------------------------- +!scalars + integer :: unt +! ********************************************************************* + + unt = std_out; if (present(unit)) unt = unit + write(unt,"(a,es10.3,a)")" L1_rerr: ", vd%l1_rerr, "," + write(unt,"(a,es10.3,a)")" 'Integral |f1-f2|dr': ", vd%int_adiff, "," + write(unt,"(a,es10.3,a)")" 'min {|f1-f2|}': ", vd%min_adiff, "," + write(unt,"(a,es10.3,a)")" 'Max {|f1-f2|}': ", vd%max_adiff, "," + write(unt,"(a,es10.3,a)")" 'mean {|f1-f2|}': ", vd%mean_adiff, "," + write(unt,"(a,es10.3,a)")" 'stdev {|f1-f2|}': ", vd%stdev_adiff, "," + +end subroutine vdiff_print +!!*** + +!!****f* m_numeric_tools/smooth +!! NAME +!! smooth data. +!! +!! FUNCTION +!! smooth +!! +!! INPUTS +!! mesh=Number of points. +!! it=Number of iterations. <= 0 to return a unchanged. +!! +!! SIDE EFFECTS +!! a(mesh)=Input values, smoothed in output +!! +!! SOURCE + +subroutine smooth(a, mesh, it) + +!Arguments ------------------------------------ +!scalars + integer, intent(in) :: it,mesh + real(dp), intent(inout) :: a(mesh) +!Local variables------------------------------- + integer :: i,k + real(dp) :: asm(mesh) +! ********************************************************************* + + do k=1,it + asm(1)=1.0d0/3.0d0*(a(1)+a(2)+a(3)) + asm(2)=0.25d0*(a(1)+a(2)+a(3)+a(4)) + asm(3)=0.2d0*(a(1)+a(2)+a(3)+a(4)+a(5)) + asm(4)=0.2d0*(a(2)+a(3)+a(4)+a(5)+a(6)) + asm(5)=0.2d0*(a(3)+a(4)+a(5)+a(6)+a(7)) + asm(mesh-4)=0.2d0*(a(mesh-2)+a(mesh-3)+a(mesh-4)+& +& a(mesh-5)+a(mesh-6)) + asm(mesh-3)=0.2d0*(a(mesh-1)+a(mesh-2)+a(mesh-3)+& +& a(mesh-4)+a(mesh-5)) + asm(mesh-2)=0.2d0*(a(mesh)+a(mesh-1)+a(mesh-2)+& +& a(mesh-3)+a(mesh-4)) + asm(mesh-1)=0.25d0*(a(mesh)+a(mesh-1)+a(mesh-2)+a(mesh-3)) + asm(mesh)=1.0d0/3.0d0*(a(mesh)+a(mesh-1)+a(mesh-2)) + + do i=6,mesh-5 + asm(i)=0.1d0*a(i)+0.1d0*(a(i+1)+a(i-1))+& +& 0.1d0*(a(i+2)+a(i-2))+& +& 0.1d0*(a(i+3)+a(i-3))+& +& 0.1d0*(a(i+4)+a(i-4))+& +& 0.05d0*(a(i+5)+a(i-5)) + end do + + do i=1,mesh + a(i)=asm(i) + end do + end do + +end subroutine smooth +!!*** + +!!****f* m_numeric_tools/nderiv +!! NAME +!! nderiv +!! +!! FUNCTION +!! Given an input function y(x) on a regular grid, +!! compute its first or second derivative. +!! +!! INPUTS +!! hh= radial step +!! ndim= radial mesh size +!! yy(ndim)= input function +!! norder= order of derivation (1 or 2) +!! +!! OUTPUT +!! zz(ndim)= first or second derivative of y +!! +!! SOURCE + +subroutine nderiv(hh, yy, zz, ndim, norder) + +!Arguments --------------------------------------------- +!scalars + integer,intent(in) :: ndim,norder + real(dp),intent(in) :: hh +!arrays + real(dp),intent(in) :: yy(ndim) + real(dp),intent(out) :: zz(ndim) + +!Local variables --------------------------------------- +!scalars + integer :: ier,ii + real(dp) :: aa,bb,cc,h1,y1 + +! ********************************************************************* + +!Initialization (common to 1st and 2nd derivative) + h1=one/(12.d0*hh) + y1=yy(ndim-4) + +!FIRST DERIVATIVE +!================ + if (norder==1) then + +! Prepare differentiation loop + bb=h1*(-25.d0*yy(1)+48.d0*yy(2)-36.d0*yy(3)+16.d0*yy(4)-3.d0*yy(5)) + cc=h1*(-3.d0*yy(1)-10.d0*yy(2)+18.d0*yy(3)-6.d0*yy(4)+yy(5)) +! Start differentiation loop + do ii=5,ndim + aa=bb;bb=cc + cc=h1*(yy(ii-4)-yy(ii)+8.d0*(yy(ii-1)-yy(ii-3))) + zz(ii-4)=aa + end do +! Normal exit + ier=0 + aa=h1*(-y1+6.d0*yy(ndim-3)-18.d0*yy(ndim-2)+10.d0*yy(ndim-1)+3.d0*yy(ndim)) + zz(ndim)=h1*(3.d0*y1-16.d0*yy(ndim-3)+36.d0*yy(ndim-2) -48.d0*yy(ndim-1)+25.d0*yy(ndim)) + zz(ndim-1)=aa + zz(ndim-2)=cc + zz(ndim-3)=bb + +! SECOND DERIVATIVE +! ================= + else + h1=h1/hh +! Prepare differentiation loop + bb=h1*(35.d0*yy(1)-104.d0*yy(2)+114.d0*yy(3)-56.d0*yy(4)+11.d0*yy(5)) + cc=h1*(11.d0*yy(1)-20.d0*yy(2)+6.d0*yy(3)+4.d0*yy(4)-yy(5)) +! Start differentiation loop + do ii=5,ndim + aa=bb;bb=cc + cc=h1*(-yy(ii-4)-yy(ii)+16.d0*(yy(ii-1)+yy(ii-3))-30.d0*yy(ii-2)) + zz(ii-4)=aa + end do +! Normal exit + ier=0 + aa=h1*(-y1+4.d0*yy(ndim-3)+6.d0*yy(ndim-2)-20.d0*yy(ndim-1)+11.d0*yy(ndim)) + zz(ndim)=h1*(11.d0*y1-56.d0*yy(ndim-3)+114.d0*yy(ndim-2) -104.d0*yy(ndim-1)+35.d0*yy(ndim)) + zz(ndim-1)=aa + zz(ndim-2)=cc + zz(ndim-3)=bb + + end if !norder + +end subroutine nderiv +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/central_finite_diff +!! NAME +!! central_finite_diff +!! +!! FUNCTION +!! Coefficients of the central differences, for several orders of accuracy. +!! See: https://en.wikipedia.org/wiki/Finite_difference_coefficient +!! +!! INPUTS +!! order=Derivative order. +!! ipos=Index of the point must be in [1,npts] +!! npts=Number of points used in finite difference, origin at npts/2 + 1 +!! +!! OUTPUT +!! coeffient for central finite difference +!! +!! SOURCE + +real(dp) function central_finite_diff(order, ipos, npts) result(fact) + +!Arguments --------------------------------------------- +!scalars + integer,intent(in) :: ipos,order,npts + +!Local variables --------------------------------------- +!scalars + real(dp),parameter :: empty=huge(one) +! 1st derivative. + real(dp),parameter :: d1(9,4) = reshape([ & + [-1/2._dp, 0._dp, 1/2._dp, empty, empty, empty, empty, empty, empty], & + [ 1/12._dp, -2/3._dp, 0._dp, 2/3._dp, -1/12._dp, empty, empty, empty, empty], & + [-1/60._dp, 3/20._dp, -3/4._dp, 0._dp, 3/4._dp, -3/20._dp, 1/60._dp, empty, empty], & + [ 1/280._dp, -4/105._dp, 1/5._dp, -4/5._dp, 0._dp, 4/5._dp, -1/5._dp, 4/105._dp, -1/280._dp]], [9,4]) +! 2nd derivative. + real(dp),parameter :: d2(9,4) = reshape([ & + [ 1._dp, -2._dp, 1._dp, empty, empty, empty, empty, empty, empty], & + [-1/12._dp, 4/3._dp, -5/2._dp, 4/3._dp, -1/12._dp, empty, empty, empty, empty], & + [ 1/90._dp, -3/20._dp, 3/2._dp, -49/18._dp, 3/2._dp, -3/20._dp, 1/90._dp, empty, empty], & + [-1/560._dp, 8/315._dp, -1/5._dp, 8/5._dp, -205/72._dp, 8/5._dp, -1/5._dp, 8/315._dp, -1/560._dp]], [9,4]) +! 3th derivative. + real(dp),parameter :: d3(9,3) = reshape([ & + [-1/2._dp, 1._dp, 0._dp, -1._dp, 1/2._dp, empty, empty, empty, empty], & + [ 1/8._dp, -1._dp, 13/8._dp, 0._dp, -13/8._dp, 1._dp, -1/8._dp, empty, empty], & + [ -7/240._dp, 3/10._dp, -169/120._dp, 61/30._dp, 0._dp, -61/30._dp, 169/120._dp, -3/10._dp, 7/240._dp]], & + [9,3]) +! 4th derivative. + real(dp),parameter :: d4(9,3) = reshape([ & + [ 1._dp, -4._dp, 6._dp, -4._dp, 1._dp, empty, empty, empty, empty], & + [ -1/6._dp, 2._dp, -13/2._dp, 28/3._dp, -13/2._dp, 2._dp, -1/6._dp, empty, empty], & + [ 7/240._dp, -2/5._dp, 169/60._dp, -122/15._dp, 91/8._dp, -122/15._dp, 169/60._dp, -2/5._dp, 7/240._dp]], [9,3]) +! 5th derivative. + real(dp),parameter :: d5(7) = [ -1/2._dp, 2._dp, -5/2._dp, 0._dp, 5/2._dp, -2._dp, 1/2._dp] +! 6th derivative. + real(dp),parameter :: d6(7) = [ 1._dp, -6._dp, 15._dp, -20._dp, 15._dp, -6._dp, 1._dp] +! ********************************************************************* + + select case (order) + case (1) + if (ipos < 1 .or. ipos > 9 .or. npts < 1 .or. npts > 9) goto 10 + fact = d1(ipos, npts/2) + case (2) + if (ipos < 1 .or. ipos > 9 .or. npts < 1 .or. npts > 9) goto 10 + fact = d2(ipos, npts/2) + case (3) + if (ipos < 1 .or. ipos > 9 .or. npts < 1 .or. npts > 9) goto 10 + fact = d3(ipos, npts/2) + case (4) + if (ipos < 1 .or. ipos > 9 .or. npts < 1 .or. npts > 9) goto 10 + fact = d4(ipos, npts/2 - 1) + case (5) + if (ipos < 1 .or. ipos > 7 .or. npts /= 7) goto 10 + fact = d5(ipos) + case (6) + if (ipos < 1 .or. ipos > 7 .or. npts /= 7) goto 10 + fact = d6(ipos) + case default + ABI_ERROR(sjoin("No entry for ipos:",itoa(ipos),"order", itoa(order), "npts", itoa(npts))) + end select + + if (fact == empty) then + ABI_ERROR(sjoin("Invalid ipos:",itoa(ipos),"for order", itoa(order), "npts", itoa(npts))) + end if + return + +10 ABI_ERROR(sjoin("No entry for ipos:",itoa(ipos),"order", itoa(order), "npts", itoa(npts))) + +end function central_finite_diff +!!*** + +!!****f* m_numeric_tools/uniformrandom +!! NAME +!! uniformrandom +!! +!! FUNCTION +!! Returns a uniform random deviate between 0.0 and 1.0. +!! Set seed to any value < 0 to initialize or reinitialize sequence. +!! Parameters are chosen from integer overflow=2**23 (conservative). +!! For some documentation, see Numerical Recipes, 1986, p196. +!! +!! INPUTS +!! +!! OUTPUT +!! +!! NOTES +!! +!! SOURCE + +function uniformrandom(seed) + +!Arguments ------------------------------------ +!scalars + real(dp) :: uniformrandom + integer,intent(inout) :: seed + +!Local variables --------------------------------------- + integer, parameter :: im1=11979,ia1= 430,ic1=2531 + integer, parameter :: im2= 6655,ia2= 936,ic2=1399 + integer, parameter :: im3= 6075,ia3=1366,ic3=1283 + integer, save :: init=0 + integer, save :: ii1,ii2,ii3 + integer :: kk + real(dp) :: im1inv,im2inv + real(dp), save :: table(97) + character(len=500) :: msg + +! ********************************************************************* + + im1inv=1.0d0/im1 ; im2inv=1.0d0/im2 + +!Initialize on first call or when seed<0: + if (seed<0.or.init==0) then + seed=-abs(seed) + +! First generator + ii1=mod(ic1-seed,im1) + ii1=mod(ia1*ii1+ic1,im1) +! Second generator + ii2=mod(ii1,im2) + ii1=mod(ia1*ii1+ic1,im1) +! Third generator + ii3=mod(ii1,im3) + +! Fill table + do kk=1,97 + ii1=mod(ia1*ii1+ic1,im1) + ii2=mod(ia2*ii2+ic2,im2) + table(kk)=(dble(ii1)+dble(ii2)*im2inv)*im1inv + enddo + + init=1 ; seed=1 + end if + +!Third generator gives index + ii3=mod(ia3*ii3+ic3,im3) + kk=1+(97*ii3)/im3 + if (kk<1.or.kk>97) then + write(msg,'(a,2i0,a)' ) ' trouble in uniformrandom; ii3,kk=',ii3,kk,' =>stop' + ABI_ERROR(msg) + end if + uniformrandom=table(kk) + +!Replace old value, based on generators 1 and 2 + ii1=mod(ia1*ii1+ic1,im1) + ii2=mod(ia2*ii2+ic2,im2) + table(kk)=(dble(ii1)+dble(ii2)*im2inv)*im1inv + +end function uniformrandom +!!*** + +!!****f* m_numeric_tools/findmin +!! +!! NAME +!! findmin +!! +!! FUNCTION +!! Compute the minimum of a function whose value and derivative are known at two points. +!! Also deduce different quantities at this predicted point, and at the two other points +!! It uses a quartic interpolation, with the supplementary +!! condition that the second derivative vanishes at one and +!! only one point. See Schlegel, J. Comp. Chem. 3, 214 (1982) [[cite:Schlegel1982]]. +!! For this option, lambda_1 must be 1 (new point), +!! and lambda_2 must be 0 (old point). +!! Also, if the derivative at the new point is more negative +!! than the derivative at the old point, the predicted +!! point cannot correspond to a minimum, but will be lambda=2.5_dp, +!! if the energy of the second point is lower than the energy +!! of the first point. +!! +!! INPUTS +!! etotal_1=first value of the function +!! etotal_2=second value of the function +!! dedv_1=first value of the derivative +!! dedv_2=second value of the derivative +!! lambda_1=first value of the argument +!! lambda_2=second value of the argument +!! +!! OUTPUT +!! dedv_predict=predicted value of the derivative (usually zero, +!! except if choice=4, if it happens that a minimum cannot be located, +!! and a trial step is taken) +!! d2edv2_predict=predicted value of the second derivative (not if choice=4) +!! d2edv2_1=first value of the second derivative (not if choice=4) +!! d2edv2_2=second value of the second derivative (not if choice=4) +!! etotal_predict=predicted value of the function +!! lambda_predict=predicted value of the argument +!! status= 0 if everything went normally ; +!! 1 if negative second derivative +!! 2 if some other problem +!! +!! SOURCE + +subroutine findmin(dedv_1,dedv_2,dedv_predict,& +& d2edv2_1,d2edv2_2,d2edv2_predict,& +& etotal_1,etotal_2,etotal_predict,& +& lambda_1,lambda_2,lambda_predict,status) + +!Arguments ------------------------------------ +!scalars + integer,intent(out) :: status + real(dp),intent(in) :: dedv_1,dedv_2,etotal_1,etotal_2,lambda_1,lambda_2 + real(dp),intent(out) :: d2edv2_1,d2edv2_2,d2edv2_predict,dedv_predict + real(dp),intent(out) :: etotal_predict,lambda_predict + +!Local variables------------------------------- +!scalars + real(dp) :: aa,bb,bbp,cc,ccp,d_lambda,dd + real(dp) :: discr,ee,eep,lambda_shift,sum1,sum2,sum3,uu + real(dp) :: uu3,vv,vv3 + character(len=500) :: msg + +! ************************************************************************* + +!DEBUG +!write(std_out,*)' findmin : enter' +!write(std_out,*)' choice,lambda_1,lambda_2=',choice,lambda_1,lambda_2 +!ENDDEBUG + + status=0 + d_lambda=lambda_1-lambda_2 + +!DEBUG +!do choice=3,1,-1 +!ENDDEBUG + + if(abs(lambda_1-1.0_dp)>tol12 .or. abs(lambda_2)>tol12) then + ABI_BUG('For choice=4, lambda_1 must be 1 and lambda_2 must be 0.') + end if + +!Evaluate quartic interpolation +!etotal = aa + bb * lambda + cc * lambda**2 + dd * lambda**3 + ee * lambda**4 +!Impose positive second derivative everywhere, with +!one point where it vanishes : 3*dd**2=8*cc*ee + aa=etotal_2 + bb=dedv_2 + sum1=etotal_1-aa-bb + sum2=dedv_1-bb + sum3=sum2-2.0_dp*sum1 + +!Build the discriminant of the associated 2nd degree equation + discr=sum2**2-3.0_dp*sum3**2 + if(discr<0.0_dp .or. sum2<0.0_dp)then + +! jmb init + d2edv2_2=0.0 + d2edv2_1=0.0 + d2edv2_predict=0.0 + +! Even if there is a problem, try to keep going ... + ABI_WARNING('The 2nd degree equation has no positive root (choice=4).') + status=2 + if(etotal_1 0.001) then + if (only_check/=1) then + ABI_WARNING("Check cannot be performed since the frequency step is not constant") + RETURN + else + ABI_ERROR('Cannot perform integration since frequency step is not constant') + end if + end if + end do + +!Check whether omega(1) is small or not + if (omega(1) > 0.1/Ha_eV) then + if (only_check/=1) then + ABI_WARNING('Check cannot be performed since first frequency on the grid > 0.1 eV') + RETURN + else + ABI_ERROR('Cannot perform integration since first frequency on the grid > 0.1 eV') + end if + end if + +!If eps(nomega) is not 0 warn + if (AIMAG(eps(nomega)) > 0.1 .and. enough<50) then + enough=enough+1 + write(msg,'(a,f8.4,3a,f8.2,2a)')& +& 'Im epsilon for omega = ',omega(nomega)*Ha_eV,' eV',ch10,& +& 'is not yet zero, epsilon_2 = ',AIMAG(eps(nomega)),ch10,& +& 'Kramers Kronig could give wrong results' + ABI_WARNING(msg) + if (enough==50) then + write(msg,'(3a)')' sufficient number of WARNINGS-',ch10,' stop writing ' + call wrtout(std_out,msg,'COLL') + end if + end if + + +!Perform Kramers-Kronig using naive integration + select case (method) + case (0) + + do ii=1,nomega + ww = omega(ii) + acc = 0.0_dp + do ip=1,nomega + if (ip == ii) CYCLE + wwp = omega(ip) + acc = acc + wwp/(wwp**2-ww**2) *AIMAG(eps(ip)) + end do + e1kk(ii) = one + two/pi*domega* acc + end do + +! Perform Kramers-Kronig using Simpson integration +! Simpson O(1/N^4), from NumRec in C p 134 NumRec in Fortran p 128 + case (1) + + kk=zero + + do ii=1,nomega + ww=omega(ii) + do ip=1,nomega + if (ip == ii) CYCLE + wwp = omega(ip) + kk(ip) = wwp/(wwp**2-ww**2) *AIMAG(eps(ip)) + end do + call simpson_int(nomega,domega,kk,intkk) + e1kk(ii) = one + two/pi * intkk(nomega) + end do + + case default + write(msg,'(a,i0)')' Wrong value for method ',method + ABI_BUG(msg) + end select + +!at this point real part is in e1kk, need to put it into eps + do ii=1,nomega + eps(ii)=CMPLX(e1kk(ii),AIMAG(eps(ii)), kind=dpc) + end do + +!Verify Kramers-Kronig + eav = zero + kkdif = zero + kkrms = zero + + do ii=1,nomega + kkdif = kkdif + ABS(REAL(eps(ii)) - e1kk(ii)) + kkrms = kkrms + (REAL(eps(ii)) - e1kk(ii))*(REAL(eps(ii)) - e1kk(ii)) + eav = eav + ABS(REAL(eps(ii))) + end do + + eav = eav/nomega + kkdif = (kkdif/nomega) / eav + kkrms = (kkrms/nomega) / (eav*eav) + + kk = ABS(REAL(eps(1)) - e1kk(1)) / REAL(eps(1)) + +!Write data + write(msg,'(a,f7.2,a)')' Kramers-Kronig transform is verified within ',MAXVAL(kk)*100,"%" + call wrtout(std_out,msg,'COLL') + +end subroutine kramerskronig +!!*** + +!!****f* ABINIT/dotproduct +!! NAME +!! dotproduct +!! +!! FUNCTION +!! scalar product of two vectors +!! +!! INPUTS +!! v1 and v2: two real(dp) vectors +!! +!! OUTPUT +!! scalar product of the two vectors +!! +!! SIDE EFFECTS +!! +!! WARNINGS +!! vector size is not checked +!! +!! NOTES +!! I've benchmarked this to be speedier than the intrinsic dot_product even on +!! big vectors. The point is that less check is performed. +!! +!! MG: FIXME: Well, optized blas1 is for sure better than what you wrote! +!! Now I dont' have time to update ref files +!! +!! +!! SOURCE + +function dotproduct(nv1,nv2,v1,v2) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: nv1,nv2 + real(dp) :: dotproduct +!arrays + real(dp),intent(in) :: v1(nv1,nv2),v2(nv1,nv2) + +!Local variables------------------------------- +!scalars + integer :: i,j + +! ************************************************************************* + dotproduct=zero + do j=1,nv2 + do i=1,nv1 + dotproduct=dotproduct+v1(i,j)*v2(i,j) + end do + end do + +end function dotproduct +!!*** + +!!****f* m_numeric_tools/invcb +!! NAME +!! invcb +!! +!! FUNCTION +!! Compute a set of inverse cubic roots as fast as possible : +!! rspts(:)=rhoarr(:)$^\frac{-1}{3}$ +!! +!! INPUTS +!! npts=number of real space points on which density is provided +!! rhoarr(npts)=input data +!! +!! OUTPUT +!! rspts(npts)=inverse cubic root of rhoarr +!! +!! SOURCE + +subroutine invcb(rhoarr,rspts,npts) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: npts +!arrays + real(dp),intent(in) :: rhoarr(npts) + real(dp),intent(out) :: rspts(npts) + +!Local variables------------------------------- +!scalars + integer :: ii,ipts + real(dp),parameter :: c2_27=2.0e0_dp/27.0e0_dp,c5_9=5.0e0_dp/9.0e0_dp + real(dp),parameter :: c8_9=8.0e0_dp/9.0e0_dp,m1thrd=-third + real(dp) :: del,prod,rho,rhom1,rhomtrd + logical :: test +!character(len=500) :: message + +! ************************************************************************* + +!Loop over points : here, brute force algorithm +!do ipts=1,npts +!rspts(ipts)=sign( (abs(rhoarr(ipts)))**m1thrd,rhoarr(ipts)) +!end do +! + + rhomtrd=sign( (abs(rhoarr(1)))**m1thrd, rhoarr(1) ) + rhom1=one/rhoarr(1) + rspts(1)=rhomtrd + do ipts=2,npts + rho=rhoarr(ipts) + prod=rho*rhom1 +! If the previous point is too far ... + if(prod < 0.01_dp .or. prod > 10._dp )then + rhomtrd=sign( (abs(rho))**m1thrd , rho ) + rhom1=one/rho + else + del=prod-one + do ii=1,5 +! Choose one of the two next lines, the last one is more accurate +! rhomtrd=((one+third*del)/(one+two_thirds*del))*rhomtrd + rhomtrd=((one+c5_9*del)/(one+del*(c8_9+c2_27*del)))*rhomtrd + rhom1=rhomtrd*rhomtrd*rhomtrd + del=rho*rhom1-one +! write(std_out,*)rhomtrd,del + test = del*del < 1.0e-24_dp + if(test) exit + end do + if( .not. test) then + rhomtrd=sign( (abs(rho))**m1thrd , rho ) + end if + end if + rspts(ipts)=rhomtrd + end do + +end subroutine invcb +!!*** + +!!****f* ABINIT/safe_div +!! NAME +!! safe_div +!! +!! FUNCTION +!! Subroutine safe_div performs "safe division", that is to prevent overflow, +!! underflow, NaN, or infinity errors. An alternate value is returned if the +!! division cannot be performed. (bmy, 2/26/08) +!! +!! For more information, see the discussion on: +!! http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/8b367f44c419fa1d/ +!! +!! Taken by HM from: +!! http://wiki.seas.harvard.edu/geos-chem/index.php/Floating_point_math_issues#Safe_floating-point_division +!! +!! INPUTS +!! n : Numerator for the division +!! d : Divisor for the division +!! altv : Alternate value to be returned if the division can't be done +!! +!! OUTPUT +!! +!! SOURCE + +elemental subroutine safe_div(n, d, altv, q) + +!Arguments ---------------------------------------------- +!scalars + real(dp),intent(in) :: n, d, altv + real(dp),intent(out) :: q + +! ********************************************************************* + + if ( exponent(n) - exponent(d) >= maxexponent(n) .or. d == zero) then + q = altv + else + q = n / d + endif + +end subroutine safe_div +!!*** + +!!****f* ABINIT/bool2index +!! NAME +!! bool2index +!! +!! FUNCTION +!! Allocate and return array with the indices in the input boolean array `bool_list` that evaluates to .True. +!! +!! SOURCE + +subroutine bool2index(bool_list, out_index) + +!Arguments ---------------------------------------------- +!scalars + logical,intent(in) :: bool_list(:) + integer,allocatable,intent(inout) :: out_index(:) + +!Local variables------------------------------- + integer :: ii, cnt +! ********************************************************************* + + cnt = count(bool_list) + ABI_REMALLOC(out_index, (cnt)) + cnt = 0 + do ii=1,size(bool_list) + if (bool_list(ii)) then + cnt = cnt + 1 + out_index(cnt) = ii + end if + end do + +end subroutine bool2index +!!*** + +!---------------------------------------------------------------------- +!!****f* ABINIT/polynomial_regression +!! NAME +!! polynomial_regression +!! +!! FUNCTION +!! Perform a polynomial regression on incoming data points, the +!! x-values of which are stored in array xvals and the y-values +!! stored in array yvals. Returns a one dimensional array with +!! fit coefficients (coeffs) and the unbiased RMS error of the +!! fit as a scalar (RMSerr). +!! +!! INPUTS +!! degree = order of the polynomial +!! npts = number of data points +!! xvals(npts) = x-values of those data points +!! yvals(npts) = y-values of those data points +!! +!! OUTPUT +!! coeffs(degree+1) = coefficients of the polynomial regression +!! RMSerr = unbiased RMS error on the fit +!! RMSerr=\sqrt{\frac{1}{npts-1}* +!! \sum_i^npts{(fitval-yvals(i))**2}} +!! +!! SOURCE +!! + + +subroutine polynomial_regression(degree,npts,xvals,yvals,coeffs,RMSerr) + +!Arguments ------------------------------------ + +!scalars + integer :: degree,npts + real(dp),intent(out) :: RMSerr +!arrays + real(dp),intent(in) :: xvals(1:npts),yvals(1:npts) + real(dp),intent(out) :: coeffs(degree+1) + +!Local variables------------------------------- +!scalars + integer :: ncoeffs,icoeff,ipoint,info + real(dp) :: residual,fitval +!arrays + integer,allocatable :: tmp(:) + real(dp),allocatable :: tmptwo(:) + real(dp),allocatable :: A(:,:),ATA(:,:) + +!#################################################################### +!##################### Get Polynomial Fit ######################### + + ncoeffs=degree+1 + + ABI_MALLOC(tmp,(ncoeffs)) + ABI_MALLOC(tmptwo,(ncoeffs)) + ABI_MALLOC(A,(npts,ncoeffs)) + ABI_MALLOC(ATA,(ncoeffs,ncoeffs)) + + !Construct a polynomial for all input xvalues + do icoeff=1,ncoeffs + do ipoint=1,npts + if (icoeff==1.and.xvals(ipoint)==0.0) then + A(ipoint,icoeff) = 1.0 + else + A(ipoint,icoeff) = xvals(ipoint)**(icoeff-1) + end if + end do + end do + + !Get matrix product of transpose of A and A + ATA = matmul(transpose(A),A) + + !Compute LU factorization of ATA + call DGETRF(ncoeffs,ncoeffs,ATA,ncoeffs,tmp,info) + ABI_CHECK(info == 0, sjoin('LAPACK DGETRF in polynomial regression returned:', itoa(info))) + + !Compute inverse of the LU factorized version of ATA + call DGETRI(ncoeffs,ATA,ncoeffs,tmp,tmptwo,ncoeffs,info) + ABI_CHECK(info == 0, sjoin('LAPACK DGETRI in polynomial regression returned:', itoa(info))) + + !Harvest polynomial coefficients + coeffs = matmul(matmul(ATA,transpose(A)),yvals) + +!#################################################################### +!############## RMS error on the polynomial fit ################### + + residual=0.0d0 + do ipoint=1,npts + fitval=0.0d0 + do icoeff=1,ncoeffs + if (icoeff==1.and.xvals(ipoint)==0.0) then + fitval=fitval+coeffs(icoeff) + else + fitval=fitval+coeffs(icoeff)*xvals(ipoint)**(icoeff-1) + end if + end do + residual=residual+(fitval-yvals(ipoint))**2 + end do + RMSerr=sqrt(residual/(real(npts-1,8))) + +!#################################################################### +!######################## Deallocations ########################### + + ABI_FREE(A) + ABI_FREE(ATA) + ABI_FREE(tmp) + ABI_FREE(tmptwo) + +end subroutine polynomial_regression +!!*** + +!!****f* ABINIT/blocked_loop +!! NAME +!! blocked_loop +!! +!! FUNCTION +!! Helper function to implement blocked algorithms inside do loops i.e. algorithms +!! operating on multiple items up to a maximum `batch_size`. +!! +!! Usage: +!! +!! batch_size = 4 +!! allocate(work(..., batch_size) +!! +!! do loop_index=1, loop_stop, batch_size +!! ndat = blocked_loop(loop_index, loop_stop, batch_size) +!! ! operate on ndat items in work +!! end do +!! +!! SOURCE + +integer pure function blocked_loop(loop_index, loop_stop, batch_size) result(ndat) + +!Arguments ---------------------------------------------- + integer,intent(in) :: loop_index, loop_stop, batch_size + +! ********************************************************************* + + ndat = merge(batch_size, loop_stop - loop_index + 1, loop_index + batch_size - 1 <= loop_stop) + +end function blocked_loop +!!*** + +END MODULE m_numeric_tools +!!*** diff --git a/GX-PAW/common/src/28_numeric_noabirule/m_numeric_tools.o b/GX-PAW/common/src/28_numeric_noabirule/m_numeric_tools.o new file mode 100644 index 00000000..18f7423a Binary files /dev/null and b/GX-PAW/common/src/28_numeric_noabirule/m_numeric_tools.o differ diff --git a/GX-PAW/common/src/28_numeric_noabirule/m_per_cond.F90 b/GX-PAW/common/src/28_numeric_noabirule/m_per_cond.F90 new file mode 100644 index 00000000..a62d889d --- /dev/null +++ b/GX-PAW/common/src/28_numeric_noabirule/m_per_cond.F90 @@ -0,0 +1,316 @@ +!!****m* ABINIT/m_per_cond +!! NAME +!! m_per_cond +!! +!! FUNCTION +!! This module contains basic tools for periodic conditions traitement. +!! +!! COPYRIGHT +!! Copyright (C) 2008-2024 ABINIT group (MM) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" + +MODULE m_per_cond + + use defs_basis + use m_abicore + + implicit none + + private + + public :: per_cond ! Return an arithmetic progression + public :: per_dist ! Return the distance on a periodic grid + + + interface per_cond + module procedure per_cond_re + module procedure per_cond_int + module procedure per_cond_int3 + end interface per_cond + + interface per_dist + module procedure per_dist_int + module procedure per_dist_int1 + module procedure per_dist_int3 + end interface per_dist + +CONTAINS !=========================================================== +!!*** + +!!****f* m_per_cond/per_cond_re +!! NAME +!! per_cond_re +!! +!! FUNCTION +!! Given a 2d-array of integer initial(3,nb), it calulates the values +!! of any of the array in the periodic orthogonal discretized +!! grid begining in 0 and of lengths dim_grid(3) +!! +!! +!! INPUTS +!! initial(1:3,0:nb-1)=initial point +!! dim_grid(1:3)= box lengths +!! nb= dimension +!! metric=is the factor scale of the box axes +!! +!! OUTPUT +!! per_cond_re= initial in the box +!! +!! SOURCE + +function per_cond_re(nb,initial,dim_grid,metric) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: nb + integer,intent(in) :: dim_grid(3) + integer :: per_cond_re(3,0:nb-1) + real(dp),intent(in) :: initial(3,0:nb-1) + real(dp),intent(in) :: metric(1:3) + +!Local variables------------------------------- + integer :: ii,jj + +! ********************************************************************* + do jj=0,nb-1 + do ii=1,3 + per_cond_re(ii,jj)=modulo(nint(initial(ii,jj)/metric(ii)),dim_grid(ii)) + end do + end do + + +end function per_cond_re +!!*** + +!!****f* m_per_cond/per_cond_int +!! NAME +!! per_cond_int +!! +!! FUNCTION +!! Given a 2d-array of integer initial(3,nb), it calulates the values +!! of any of the array in the periodic orthogonal discretized +!! grid begining in 0 and of lengths dim_grid(3) +!! +!! +!! INPUTS +!! initial(1:3,0:nb-1)=initial point +!! dim_grid(1:3)= box lengths +!! nb= dimension +!! metric=is the factor scale of the box axes +!! +!! OUTPUT +!! per_cond_int= initial in the box +!! +!! SOURCE + +function per_cond_int(nb,initial,dim_grid) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: nb + integer,intent(in) :: dim_grid(3) + integer :: per_cond_int(3,0:nb-1) + integer, intent(in) :: initial(3,0:nb-1) + +!Local variables------------------------------- + integer :: ii,jj + +! ********************************************************************* + do jj=0,nb-1 + do ii=1,3 + per_cond_int(ii,jj)=modulo(initial(ii,jj),dim_grid(ii)) + end do + end do + + +end function per_cond_int +!!*** + +!!****f* m_per_cond/per_cond_int3 +!! NAME +!! per_cond_int3 +!! +!! FUNCTION +!! Given a 2d-array of integer initial(3,nb), it calulates the values +!! of any of the array in the periodic orthogonal discretized +!! grid begining in 0 and of lengths dim_grid(3) +!! +!! +!! INPUTS +!! initial(1:3,0:nb-1)=initial point +!! dim_grid(1:3)= box lengths +!! nb= dimension +!! metric=is the factor scale of the box axes +!! +!! OUTPUT +!! per_cond_int3= initial in the box +!! +!! SOURCE + +function per_cond_int3(initial,dim_grid) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: dim_grid(3) + integer :: per_cond_int3(3) + integer,intent(in) :: initial(3) + + +!Local variables------------------------------- + integer :: ii + +! ********************************************************************* + + do ii=1,3 + per_cond_int3(ii) = modulo(initial(ii),dim_grid(ii)) + end do + +end function per_cond_int3 +!!*** + +!!****f* m_per_cond/per_dist_int +!! NAME +!! per_dist_int +!! +!! FUNCTION +!! Given a two 2d-array of integer initA(3,nb),initB(3,nb) in the +!! periodic grid, it calulates the values +!! of any of the distances in the periodic orthogonal discretized +!! grid begining in 0 and of lengths dim_grid(3) +!! +!! +!! INPUTS +!! initA(1:3,0:nb-1)=initial point +!! initB(1:3,0:nb-1)=initial point +!! dim_grid(1:3)= box lengths +!! nb= dimension +!! +!! OUTPUT +!! per_dist_int= initial in the box +!! +!! SOURCE + +function per_dist_int(nb,initA,initB,dim_grid) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: nb + integer,intent(in) :: dim_grid(3) + integer :: per_dist_int(3,0:nb-1) + integer,intent(in) :: initA(3,0:nb-1),initB(3,0:nb-1) + + +!Local variables------------------------------- + integer :: ii,jj, bo + +! ********************************************************************* + do jj=0,nb-1 + do ii=1,3 + bo = abs(initA(ii,jj)-initB(ii,jj)) + per_dist_int(ii,jj) = minval((/ bo,dim_grid(ii)-bo/)) + end do + end do + + +end function per_dist_int +!!*** + + +!!****f* m_per_cond/per_dist_int1 +!! NAME +!! per_dist_int1 +!! +!! FUNCTION +!! Given a two scalars of integer initA,initB in the +!! periodic grid, it calulates the values +!! of any of the distances in the periodic orthogonal discretized +!! grid begining in 0 and of lengths dim_grid +!! +!! +!! INPUTS +!! initA=initial point +!! initB=initial point +!! dim_grid= box lengths +!! +!! OUTPUT +!! per_dist_int1= initial in the box +!! +!! SOURCE + +function per_dist_int1(initA,initB,dim_grid) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: dim_grid,initA,initB + integer :: per_dist_int1 + + +!Local variables------------------------------- + integer :: bo + +! ********************************************************************* + bo = abs(initA-initB) + per_dist_int1 = minval((/ bo,dim_grid-bo/)) + +end function per_dist_int1 +!!*** + + +!!****f* m_per_cond/per_dist_int3 +!! NAME +!! per_dist_int3 +!! +!! FUNCTION +!! Given a two 3d-vector of integer initA(3),initB(3) in the +!! periodic grid, it calulates the values +!! of any of the distances in the periodic orthogonal discretized +!! grid begining in 0 and of lengths dim_grid(3) +!! +!! +!! INPUTS +!! initA(1:3)=initial point +!! initB(1:3)=initial point +!! dim_grid(1:3)= box lengths +!! +!! OUTPUT +!! per_dist_int3= initial in the box +!! +!! SOURCE + +function per_dist_int3(initA,initB,dim_grid) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: dim_grid(3) + integer :: per_dist_int3(3) + integer,intent(in) :: initA(3),initB(3) + + +!Local variables------------------------------- + integer :: ii, bo + +! ********************************************************************* + do ii=1,3 + bo = abs(initA(ii)-initB(ii)) + per_dist_int3(ii) = minval((/ bo,dim_grid(ii)-bo/)) + end do + +end function per_dist_int3 +!!*** + +END MODULE m_per_cond +!!*** diff --git a/GX-PAW/common/src/28_numeric_noabirule/m_per_cond.o b/GX-PAW/common/src/28_numeric_noabirule/m_per_cond.o new file mode 100644 index 00000000..7e9a5ed3 Binary files /dev/null and b/GX-PAW/common/src/28_numeric_noabirule/m_per_cond.o differ diff --git a/GX-PAW/common/src/28_numeric_noabirule/m_random_xoroshiro128plus.F90 b/GX-PAW/common/src/28_numeric_noabirule/m_random_xoroshiro128plus.F90 new file mode 100644 index 00000000..7065e493 --- /dev/null +++ b/GX-PAW/common/src/28_numeric_noabirule/m_random_xoroshiro128plus.F90 @@ -0,0 +1,388 @@ + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" + +#if defined HAVE_FC_SHIFTLR +#define SHIFTL_ shiftl +#define SHIFTR_ shiftr +#else +#define SHIFTL_ lshift +#define SHIFTR_ rshift +#endif + +! xoroshiro128plus method random number generator +! adapted by hexu for usage in Abinit (downgrade to Fortran 90 and added +! some functions ) +! (Fortran 2003 re-enabled) + +!** License for the xoroshiro128plus random number generator ** +! +!Written in 2016 by David Blackman and Sebastiano Vigna (vigna@acm.org) +!Translated to Fortran 2008 by Jannis Teunissen +! +!To the extent possible under law, the author has dedicated all copyright +!and related and neighboring rights to this software to the public domain +!worldwide. This software is distributed without any warranty. +! +!See . +! +! << This is the original documentation of Blackman and Vigna +!This is the successor to xorshift128+. It is the fastest full-period +!generator passing BigCrush without systematic failures, but due to the +!relatively short period it is acceptable only for applications with a +!mild amount of parallelism; otherwise, use a xorshift1024* generator. +! +!Beside passing BigCrush, this generator passes the PractRand test suite +!up to (and included) 16TB, with the exception of binary rank tests, +!which fail due to the lowest bit being an LFSR; all other bits pass all +!tests. We suggest to use a sign test to extract a random Boolean value. +! +!Note that the generator uses a simulated rotate operation, which most C +!compilers will turn into a single instruction. In Java, you can use +!Long.rotateLeft(). In languages that do not make low-level rotation +!instructions accessible xorshift128+ could be faster. +! +!The state must be seeded so that it is not everywhere zero. If you have +!a 64-bit seed, we suggest to seed a splitmix64 generator and use its +!output to fill s. +! ================= +! + +!> Module for pseudo random number generation. The internal pseudo random +!> generator is the xoroshiro128plus method. + +module m_random_xoroshiro128plus + + use defs_basis + use m_profiling_abi + + implicit none + private + + ! A 64 bit floating point type + !integer, parameter :: dp = kind(0.0d0) + + ! A 32 bit integer type + integer, parameter :: i4 = selected_int_kind(9) + + ! A 64 bit integer type + integer, parameter :: i8 = selected_int_kind(18) + + !> Random number generator type, which contains the state + type rng_t + !> The rng state (always use your own seed) + integer(i8), private :: s(2) = [123456789_i8, 987654321_i8] + integer(i8), private :: separator(32) ! Separate cache lines (parallel use) + + real(dp) :: residual =0.0d0 ! for saving residual in normal function. + logical :: has_residual = .False. + contains + procedure, non_overridable :: set_seed ! Seed the generator + procedure, non_overridable :: jump ! Jump function (see below) + procedure, non_overridable :: rand_int4 ! 4-byte random integer + procedure, non_overridable :: rand_int8 ! 8-byte random integer + procedure, non_overridable :: rand_unif_01 ! Uniform (0,1] real + procedure, non_overridable :: rand_unif_01_array ! Uniform (0,1] real + procedure, non_overridable :: rand_two_normals ! Two normal(0,1) samples + procedure, non_overridable :: rand_normal ! Two normal(0,1) samples + procedure, non_overridable :: rand_normal_array ! Two normal(0,1) samples + procedure, non_overridable :: rand_poisson ! Sample from Poisson-dist. + procedure, non_overridable :: rand_circle ! Sample on a rand_circle + procedure, non_overridable :: rand_sphere ! Sample on a rand_sphere + procedure, non_overridable :: rand_choice ! select from 1 to N randomly + procedure, non_overridable :: next ! Internal method + end type rng_t + + !> Parallel random number generator type + type prng_t + type(rng_t), allocatable :: rngs(:) + contains + procedure, non_overridable :: initialize => init_parallel + procedure, non_overridable :: finalize => finalize_parallel + end type prng_t + + + public :: rng_t + public :: prng_t + public :: set_seed + public :: jump + public :: rand_int4 + public :: rand_int8 + public :: rand_unif_01 + public :: rand_two_normals + public :: rand_normal + public :: rand_normal_array + public :: rand_poisson + public :: rand_circle + public :: rand_sphere + + +contains + + !> Initialize a collection of rng's for parallel use + !> this can be used with openmp, each thread need an + !> different rng. + subroutine init_parallel(self, n_proc, seed) + + class(prng_t), intent(inout) :: self + integer(i8), optional, intent(in) :: seed(2) + integer, intent(in) :: n_proc + integer :: n + + ABI_MALLOC(self%rngs, (n_proc)) + if (present(seed)) then + call self%rngs(1)%set_seed(seed) + endif + do n = 2, n_proc + self%rngs(n) = self%rngs(n-1) + call self%rngs(n)%jump() + end do + end subroutine init_parallel + + + !> Finalize prng_t + subroutine finalize_parallel(self) + class(prng_t), intent(inout) :: self + ABI_FREE(self%rngs) + end subroutine finalize_parallel + + !> Set a seed for the rng + subroutine set_seed(self, the_seed) + + class(rng_t), intent(inout) :: self + integer(i8), intent(in) :: the_seed(2) + + self%s = the_seed + + ! Simulate calls to next() to improve randomness of first number + !call self%jump() + call jump(self) + end subroutine set_seed + + ! This is the jump function for the generator. It is equivalent + ! to 2^64 calls to next(); it can be used to generate 2^64 + ! non-overlapping subsequences for parallel computations. + subroutine jump(self) + + class(rng_t), intent(inout) :: self + integer :: i, b + integer(i8) :: t(2), dummy + + ! The signed equivalent of the unsigned constants + integer(i8), parameter :: jmp_c(2) = & + (/-4707382666127344949_i8, -2852180941702784734_i8/) + + t = 0 + do i = 1, 2 + do b = 0, 63 + if (iand(jmp_c(i), SHIFTL_(1_i8, b)) /= 0) then + t = ieor(t, self%s) + end if + !dummy = self%next() + dummy = next(self) + end do + end do + + self%s = t + end subroutine jump + + !> Return 4-byte integer + integer(i4) function rand_int4(self) + + class(rng_t), intent(inout) :: self + !rand_int4 = int(self%next(), i4) + rand_int4 = int(next(self), i4) + end function rand_int4 + + !> Return 8-byte integer + integer(i8) function rand_int8(self) + + class(rng_t), intent(inout) :: self + !rand_int8 = self%next() + rand_int8 = next(self) + end function rand_int8 + + !> Get a uniform [0,1) random real (double precision) + real(dp) function rand_unif_01(self) + + class(rng_t), intent(inout) :: self + integer(i8) :: x + real(dp) :: tmp + + !x = self%next() + x = next(self) + x = ior(SHIFTL_(1023_i8, 52), SHIFTR_(x, 12)) + rand_unif_01 = transfer(x, tmp) - 1.0_dp + end function rand_unif_01 + + + subroutine rand_unif_01_array(self, output, size_array) + + class(rng_t), intent(inout) :: self + integer, intent(in) :: size_array + real(dp), intent(inout) :: output(size_array) + integer(i8) :: x, i + real(dp) :: tmp + + !x = self%next() + do i=1, size_array + x = next(self) + x = ior(SHIFTL_(1023_i8, 52), SHIFTR_(x, 12)) + output(i) = transfer(x, tmp) - 1.0_dp + enddo + end subroutine rand_unif_01_array + + !> Return two normal random variates with mean 0 and variance 1. + !> http://en.wikipedia.org/wiki/Marsaglia_polar_method + function rand_two_normals(self) result(rands) + + class(rng_t), intent(inout) :: self + real(dp) :: rands(2), sum_sq + do + !rands(1) = 2 * self%rand_unif_01() - 1 + rands(1) = 2 * rand_unif_01(self) - 1 + !rands(2) = 2 * self%rand_unif_01() - 1 + rands(2) = 2 * rand_unif_01(self) - 1 + sum_sq = sum(rands**2) + if (sum_sq < 1.0_dp .and. sum_sq > 0.0_dp) exit + end do + rands = rands * sqrt(-2 * log(sum_sq) / sum_sq) + end function rand_two_normals + + !> Return one normal random variates with mean 0 and variance 1. + !> http://en.wikipedia.org/wiki/Marsaglia_polar_method + function rand_normal(self) result(r) + + class(rng_t), intent(inout) :: self + real(dp) :: r, rands(2), sum_sq + if(self%has_residual) then + self%has_residual=.False. + r=self%residual + else + do + !rands(1) = 2 * self%rand_unif_01() - 1 + rands(1) = 2 * rand_unif_01(self) - 1 + !rands(2) = 2 * self%rand_unif_01() - 1 + rands(2) = 2 * rand_unif_01(self) - 1 + sum_sq = sum(rands**2) + if (sum_sq < 1.0_dp .and. sum_sq > 0.0_dp) exit + end do + rands = rands * sqrt(-2 * log(sum_sq) / sum_sq) + r=rands(1) + self%has_residual=.True. + self%residual=rands(2) + endif + end function rand_normal + + subroutine rand_normal_array(self, a, asize) + + class(rng_t), intent(inout) :: self + integer ,intent(in) :: asize + real(dp), intent(inout) :: a(asize) + integer :: i + do i=1, asize + a(i)=rand_normal(self) + enddo + end subroutine rand_normal_array + + + !> Return Poisson random variate with rate lambda. Works well for lambda < 30 + !> or so. For lambda >> 1 it can produce wrong results due to roundoff error. + function rand_poisson(self, lambda) result(rr) + + class(rng_t), intent(inout) :: self + real(dp), intent(in) :: lambda + integer(i4) :: rr + real(dp) :: expl, p + + expl = exp(-lambda) + rr = 0 + p = self%rand_unif_01() + + do while (p > expl) + rr = rr + 1 + !p = p * self%rand_unif_01() + p = p * rand_unif_01(self) + end do + end function rand_poisson + + !> Sample point on a rand_circle with given radius + function rand_circle(self, radius) result(xy) + + class(rng_t), intent(inout) :: self + real(dp), intent(in) :: radius + real(dp) :: rands(2), xy(2) + real(dp) :: sum_sq + + ! Method for uniform sampling on rand_circle + do + !rands(1) = 2 * self%rand_unif_01() - 1 + rands(1) = 2 * rand_unif_01(self) - 1 + !rands(2) = 2 * self%rand_unif_01() - 1 + rands(2) = 2 * rand_unif_01(self) - 1 + sum_sq = sum(rands**2) + if (sum_sq <= 1) exit + end do + + xy(1) = (rands(1)**2 - rands(2)**2) / sum_sq + xy(2) = 2 * rands(1) * rands(2) / sum_sq + xy = xy * radius + end function rand_circle + + !> Sample point on a rand_sphere with given radius + function rand_sphere(self, radius) result(xyz) + + class(rng_t), intent(inout) :: self + real(dp), intent(in) :: radius + real(dp) :: rands(2), xyz(3) + real(dp) :: sum_sq, tmp_sqrt + + ! Marsaglia method for uniform sampling on rand_sphere + do + rands(1) = 2 * self%rand_unif_01() - 1 + rands(2) = 2 * self%rand_unif_01() - 1 + sum_sq = sum(rands**2) + if (sum_sq <= 1) exit + end do + + tmp_sqrt = sqrt(1 - sum_sq) + xyz(1:2) = 2 * rands(1:2) * tmp_sqrt + xyz(3) = 1 - 2 * sum_sq + xyz = xyz * radius + end function rand_sphere + + function rand_choice(self, N) result(i) + class(rng_t), intent(inout) :: self + integer, intent(in) :: N + integer :: i + i=int(self%rand_unif_01()*N)+1 + end function rand_choice + + !> Interal routine: get the next value (returned as 64 bit signed integer) + function next(self) result(res) + + class(rng_t), intent(inout) :: self + integer(i8) :: res + integer(i8) :: t(2) + + t = self%s + res = t(1) + t(2) + t(2) = ieor(t(1), t(2)) + self%s(1) = ieor(ieor(rotl(t(1), 55), t(2)), SHIFTL_(t(2), 14)) + self%s(2) = rotl(t(2), 36) + end function next + + !> Helper function for next() + pure function rotl(x, k) result(res) + + integer(i8), intent(in) :: x + integer, intent(in) :: k + integer(i8) :: res + + res = ior(SHIFTL_(x, k), SHIFTR_(x, 64 - k)) + end function rotl + +end module m_random_xoroshiro128plus diff --git a/GX-PAW/common/src/28_numeric_noabirule/m_random_xoroshiro128plus.o b/GX-PAW/common/src/28_numeric_noabirule/m_random_xoroshiro128plus.o new file mode 100644 index 00000000..44949828 Binary files /dev/null and b/GX-PAW/common/src/28_numeric_noabirule/m_random_xoroshiro128plus.o differ diff --git a/GX-PAW/common/src/28_numeric_noabirule/m_random_zbq.F90 b/GX-PAW/common/src/28_numeric_noabirule/m_random_zbq.F90 new file mode 100644 index 00000000..3addd149 --- /dev/null +++ b/GX-PAW/common/src/28_numeric_noabirule/m_random_zbq.F90 @@ -0,0 +1,256 @@ +!!****m* ABINIT/m_random_zbq +!! NAME +!! m_random_zbq +!! +!! FUNCTION +!! This library contains routines for generating uniform random numbers +!! between 0 & 1, using a Marsaglia-Zaman type subtract-with-borrow generator. +!! This random number generator is non deterministic (it is not "pseudo-random"). +!! +!! These routines have been downloaded from Richard Chandler homepage, +!! then converted into Fortran90 standard. +!! Authors: +!! Richard Chandler (email: richard@stats.ucl.ac.uk) +!! Paul Northrop (email: paul@stats.ucl.ac.uk) +!! +!! COPYRIGHT +!! Copyright (C) Richard Chandler/Paul Northrop +!! Please feel free to use and adapt these routines for your own use. We +!! do, however, request that if the routines are used in work which is later +!! presented in public, or published, the source of the code (ie. us!) is +!! acknowledged. If for no other reason, this will allow other people to test +!! the routines to see if there's anything horribly wrong with them that will +!! invalidate your results. +!! +!! See http://www.ucl.ac.uk/~ucakarc/work/software/randgen.txt +!! for further information +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" + + +module m_random_zbq + + use m_abicore + + use defs_basis, only : sp, dp, std_out + + implicit none + + private +!!*** + + public :: ZBQLU01 + public :: ZBQLINI + + REAL(DP),SAVE,PRIVATE :: B=4.294967291D9,C=0.0D0 + REAL(DP),SAVE,PRIVATE :: ZBQLIX(43)= & +& (/8.001441D7,5.5321801D8,& +& 1.69570999D8,2.88589940D8,2.91581871D8,1.03842493D8,& +& 7.9952507D7,3.81202335D8,3.11575334D8,4.02878631D8, & +& 2.49757109D8,1.15192595D8,2.10629619D8,3.99952890D8,& +& 4.12280521D8,1.33873288D8,7.1345525D7,2.23467704D8, & +& 2.82934796D8,9.9756750D7,1.68564303D8,2.86817366D8, & +& 1.14310713D8,3.47045253D8,9.3762426D7 ,1.09670477D8,& +& 3.20029657D8,3.26369301D8,9.441177D6,3.53244738D8, & +& 2.44771580D8,1.59804337D8,2.07319904D8,3.37342907D8,& +& 3.75423178D8,7.0893571D7 ,4.26059785D8,3.95854390D8,& +& 2.0081010D7,5.9250059D7,1.62176640D8,3.20429173D8, & +& 2.63576576D8/) + + +contains + +! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +!******************************************************************* + REAL(DP) FUNCTION ZBQLU01(DUMMY) +!******************************************************************* +! Returns a uniform random number between 0 & 1, using +! a Marsaglia-Zaman type subtract-with-borrow generator. +! Uses double precision, rather than integer, arithmetic +! throughout because MZ's integer constants overflow +! 32-bit integer storage (which goes from -2^31 to 2^31). +! Ideally, we would explicitly truncate all integer +! quantities at each stage to ensure that the double +! precision representations do not accumulate approximation +! error; however, on some machines the use of DNINT to +! accomplish this is *seriously* slow (run-time increased +! by a factor of about 3). This double precision version +! has been tested against an integer implementation that +! uses long integers (non-standard and, again, slow) - +! the output was identical up to the 16th decimal place +! after 10^10 calls, so we're probably OK ... +! + REAL(DP) :: DUMMY + + INTEGER,SAVE :: CURPOS=1,ID22=22,ID43=43 + REAL(DP) :: X,B2,BINV + + B2 = B + BINV = 1.0D0/B + 5 X = ZBQLIX(ID22) - ZBQLIX(ID43) - C + IF (X<0.0D0) THEN + X = X + B + C = 1.0D0 + ELSE + C = 0.0D0 + ENDIF + ZBQLIX(ID43) = X +! +! Update array pointers. Do explicit check for bounds of each to +! avoid expense of modular arithmetic. If one of them is 0 the others +! won't be +! + CURPOS = CURPOS - 1 + ID22 = ID22 - 1 + ID43 = ID43 - 1 + IF (CURPOS==0) THEN + CURPOS=43 + ELSEIF (ID22==0) THEN + ID22 = 43 + ELSEIF (ID43==0) THEN + ID43 = 43 + ENDIF +! +! The integer arithmetic there can yield X=0, which can cause +! problems in subsequent routines (e.g. ZBQLEXP). The problem +! is simply that X is discrete whereas U is supposed to +! be continuous - hence if X is 0, go back and generate another +! X and return X/B^2 (etc.), which will be uniform on (0,1/B). + IF (X=1) THEN + IF(INIT==1) THEN + WRITE(std_out,1) + 1 FORMAT(//5X,'****WARNING**** You have called routine ZBQLINI ',& + & 'more than',/5X,'once. I''m ignoring any subsequent calls.',//) + INIT = 2 + END IF + RETURN + ELSE + INIT = 1 + ENDIF + +! If SEED = 0, cat the contents of the clock into a file +! and transform to obtain ZQBLIX(1), then use a congr. +! algorithm to set remaining elements. Otherwise take +! specified value of SEED. +! + IF (SEED==0) THEN +! Initial coding: +!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +!>>>>>>> COMMENT OUT FROM HERE IF YOU DON'T HAVE >>>>>>>>>>>> +!>>>>>>> 'CALL SYSTEM' CAPABILITY ... >>>>>>>>>>>> +!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +! CALL SYSTEM(' date +%S%M%H%j > zbql1234.tmp') +! ! Try all file numbers for LFLNO to 999 +! FILNO = LFLNO +! 10 OPEN(FILNO,FILE='zbql1234.tmp',ERR=11) +! GOTO 12 +! 11 FILNO = FILNO + 1 +! IF (FILNO.GT.999) THEN +! WRITE(std_out,*) 'ZBQLINI: Error on temporary file !' +! RETURN +! ENDIF +! GOTO 10 +! 12 READ(FILNO,'(3(I2),I3)') SS,MM,HH,DD +! CLOSE(FILNO) +! CALL SYSTEM('rm zbql1234.tmp') + +! New F90 coding: + CALL DATE_AND_TIME(DATE,TIME,ZONE,VALUES) + HH=VALUES(4) + MM=VALUES(5) + SS=VALUES(6) + DD=(VALUES(2)-1)*30+VALUES(3) ! Approx. for the day index + + DSS = DINT((DBLE(SS)/6.0D1) * B) + DMM = DINT((DBLE(MM)/6.0D1) * B) + DHH = DINT((DBLE(HH)/2.4D1) * B) + DDD = DINT((DBLE(DD)/3.65D2) * B) + TMPVAR1 = DMOD(DSS+DMM+DHH+DDD,B) +!<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< +!<<<<<<<< ... TO HERE (END OF COMMENTING OUT FOR <<<<<<<<<<< +!<<<<<<<< USERS WITHOUT 'CALL SYSTEM' CAPABILITY <<<<<<<<<<< +!<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< + ELSE + TMPVAR1 = DMOD(DBLE(SEED),B) + ENDIF + + ZBQLIX(1) = TMPVAR1 + DO I = 2,43 + TMPVAR1 = ZBQLIX(I-1)*3.0269D4 + TMPVAR1 = DMOD(TMPVAR1,B) + ZBQLIX(I) = TMPVAR1 + END DO + + END SUBROUTINE ZBQLINI + +end module m_random_zbq +!!*** diff --git a/GX-PAW/common/src/28_numeric_noabirule/m_random_zbq.o b/GX-PAW/common/src/28_numeric_noabirule/m_random_zbq.o new file mode 100644 index 00000000..eb3891e5 Binary files /dev/null and b/GX-PAW/common/src/28_numeric_noabirule/m_random_zbq.o differ diff --git a/GX-PAW/common/src/28_numeric_noabirule/m_slk.F90 b/GX-PAW/common/src/28_numeric_noabirule/m_slk.F90 new file mode 100644 index 00000000..8e961995 --- /dev/null +++ b/GX-PAW/common/src/28_numeric_noabirule/m_slk.F90 @@ -0,0 +1,6537 @@ +!!****m* ABINIT/m_slk +!! NAME +!! m_slk +!! +!! FUNCTION +!! High-level objects and wrappers around the ScaLAPACK and ELPA API. +!! +!! COPYRIGHT +!! Copyright (C) 2004-2024 ABINIT group (CS,GZ,FB,MG,MT) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" + +module m_slk + + use defs_basis + use m_xmpi + use m_errors + use m_abicore +#ifdef HAVE_LINALG_ELPA + use m_elpa +#endif +#ifdef HAVE_MPI2 + use mpi +#endif + + use m_fstrings, only : firstchar, toupper, itoa, sjoin, ltoa + use m_time, only : cwtime, cwtime_report + use m_numeric_tools, only : blocked_loop !, print_arr + + implicit none + +#ifdef HAVE_MPI1 + include 'mpif.h' +#endif + + private + + ! scaLAPACK array descriptor. + integer,private,parameter :: DLEN_ = 9 ! length + integer,private,parameter :: Dtype_ = 1 ! type + integer,private,parameter :: CTXT_ = 2 ! BLACS context + integer,private,parameter :: M_ = 3 ! nb global lines + integer,private,parameter :: N_ = 4 ! nb global columns + integer,private,parameter :: MB_ = 5 ! nb lines of a block + integer,private,parameter :: NB_ = 6 ! nb columns of a block + integer,private,parameter :: RSRC_ = 7 ! line of processors at the beginning + integer,private,parameter :: CSRC_ = 8 ! column of processors at the beginning + integer,private,parameter :: LLD_ = 9 ! local number of lines +!!*** + +!---------------------------------------------------------------------- + +!!****t* m_slk/grid_scalapack +!! NAME +!! grid_scalapack +!! +!! FUNCTION +!! Grid of ScaLAPACK processors. +!! +!! SOURCE + + type,public :: grid_scalapack + + integer :: nbprocs = -1 + ! Total number of processors + + integer :: dims(2) = -1 + ! Number of procs for rows/columns + + integer :: ictxt = xmpi_comm_null + ! BLACS context i.e. MPI communicator. + + logical :: use_gpu = .false. + ! Wether GPU is used, relevant for determining matrix block size. + + contains + procedure :: init => grid_init ! Set up the processor grid for ScaLAPACK. + end type grid_scalapack +!!*** + +!---------------------------------------------------------------------- + +!!****t* m_slk/processor_scalapack +!! NAME +!! processor_scalapack +!! +!! FUNCTION +!! One processor in the grid. +!! +!! SOURCE + + type,public :: processor_scalapack + + integer :: myproc = -1 + ! rank the processor + + integer :: comm = xmpi_comm_null + ! MPI communicator underlying the BLACS grid. + + integer :: coords(2) = -1 + ! Coordinates of the processor in the grid. + + type(grid_scalapack) :: grid + ! the grid to which the processor is associated to. + + contains + procedure :: init => processor_init ! Initializes an instance of processor ScaLAPACK from an MPI communicator. + procedure :: free => processor_free ! Free the object + end type processor_scalapack + + private :: build_processor_scalapack ! Build a ScaLAPACK processor descriptor +!!*** + +!---------------------------------------------------------------------- + +!!****t* m_slk/descript_scalapack +!! NAME +!! descript_scalapack +!! +!! FUNCTION +!! ScaLAPACK matrix descriptor. +!! +!! SOURCE + + type,public :: descript_scalapack + integer :: tab(DLEN_) + end type descript_scalapack +!!*** + +!---------------------------------------------------------------------- + +!!****t* m_slk/basemat_t +!! NAME +!! basemat_t +!! +!! FUNCTION +!! Base class for scalapack matrices +!! +!! SOURCE + + type,private :: basemat_t + + integer :: sizeb_local(2) = -1 + ! dimensions of the local buffer + + integer :: sizeb_global(2) = -1 + ! dimensions of the global matrix + + integer :: sizeb_blocs(2) = -1 + ! size of the block of consecutive data + + integer :: istwf_k = -1 + + type(processor_scalapack),pointer :: processor => null() + + type(descript_scalapack) :: descript + + contains + + procedure :: init => init_matrix_scalapack + ! Constructor + + procedure :: glob2loc => slk_glob2loc + ! Determine the local indices of an element from its global indices and return haveit bool flag. + + procedure :: loc2glob => slk_matrix_loc2glob + ! Return global indices of a matrix element from the local indices. + + procedure :: loc2grow => slk_matrix_loc2grow + ! Determine the global row index from the local index + + procedure :: loc2gcol => slk_matrix_loc2gcol + ! Determine the global column index from the local index + + procedure :: locmem_mb => locmem_mb + ! Return memory allocated for the local buffer in Mb. + + procedure :: print => slkmat_print + ! Print info on the object. + + procedure :: check_local_shape => slkmat_check_local_shape + ! Debugging tool to test the local shape `lshape` of the local buffer. + + procedure :: free => matrix_scalapack_free + ! Free memory + + procedure :: change_size_blocs => slk_change_size_blocs + ! Change the block sizes, return new object. + + procedure :: get_trace => slk_get_trace + ! Compute the trace of an N-by-N distributed matrix. + + procedure :: set_imag_diago_to_zero => slk_set_imag_diago_to_zero + ! Set the imaginary part of the diagonal to zero. + + procedure :: invert => slk_invert + ! Inverse of a complex matrix. + + end type basemat_t +!!*** + +!---------------------------------------------------------------------- + +!!****t* m_slk/matrix_scalapack +!! NAME +!! matrix_scalapack +!! +!! FUNCTION +!! high-level interface to ScaLAPACK matrix (double precision version) +!! +!! SOURCE + + type, public, extends(basemat_t) :: matrix_scalapack + + real(dp),allocatable :: buffer_real(:,:) + ! local part of the (real) matrix. + ! The istwf_k option passed to the constructor defines whether we have a real or complex matrix + + complex(dpc),allocatable :: buffer_cplx(:,:) + ! local part of the (complex) matrix + + contains + + procedure :: get_head_and_wings => slk_get_head_and_wings + ! Return global arrays with the head and the wings of the matrix. + + procedure :: set_head_and_wings => slk_set_head_and_wings + ! Set head and the wings of the matrix starting from global arrays. + + procedure :: copy => matrix_scalapack_copy + ! Copy object + + procedure :: hpd_invert => slk_hpd_invert + ! Inverse of a Hermitian positive definite matrix. + + procedure :: ptrans => slk_ptrans + ! Transpose matrix + + procedure :: cut => slk_cut + ! Extract submatrix and create new matrix with `size_blocs` and `processor` + + procedure :: take_from => slk_take_from + ! Take values from source + + procedure :: collect_cplx => slk_collect_cplx + ! Return on all processors the submatrix of shape (mm, nn) starting at position ija. + + procedure :: heev => slk_heev + ! Compute eigenvalues and, optionally, eigenvectors of an Hermitian matrix A. A * X = lambda * X + + procedure :: pzheevx => slk_pzheevx + ! Compute Eigenvalues and, optionally, eigenvectors of a complex Hermitian matrix A. ! A * X = lambda * X + + procedure :: pzhegvx => slk_pzhegvx + ! Eigenvalues and, optionally, eigenvectors of a complex + ! generalized Hermitian-definite eigenproblem, of the form + ! sub( A )*x=(lambda)*sub( B )*x, sub( A )*sub( B )x=(lambda)*x, + ! or sub( B )*sub( A )*x=(lambda)*x. + + procedure :: symmetrize => slk_symmetrize + ! Symmetrizes a square scaLAPACK matrix. + + procedure :: bsize_and_type => slk_bsize_and_type + ! Returns the byte size and the MPI datatype + + end type matrix_scalapack +!!*** + +!!****t* m_slk/slkmat_sp_t +!! NAME +!! slkmat_sp_t +!! +!! FUNCTION +!! high-level interface to ScaLAPACK matrix (single precision version) +!! +!! SOURCE + + type, public, extends(basemat_t) :: slkmat_sp_t + + real(sp),allocatable :: buffer_real(:,:) + ! local part of the (real) matrix. + ! The istwf_k option passed to the constructor defines whether we have a real or complex matrix + + complex(sp),allocatable :: buffer_cplx(:,:) + ! local part of the (complex) matrix + + contains + + procedure :: copy => slkmat_sp_copy + ! Copy object + + procedure :: take_from => slkmat_sp_take_from + ! Take values from source + + procedure :: ptrans => slkmat_sp_ptrans + ! Transpose matrix + + procedure :: set_head_and_wings => slkmat_sp_set_head_and_wings + ! Set head and the wings of the matrix starting from global arrays. + + !procedure :: cut => slk_cut + ! Extract submatrix and create new matrix with `size_blocs` and `processor` + + procedure :: collect_cplx => slkmat_sp_collect_cplx + ! Return on all processors the submatrix of shape (mm, nn) starting at position ija. + + procedure :: heev => slkmat_sp_heev + ! Compute eigenvalues and, optionally, eigenvectors of an Hermitian matrix A. A * X = lambda * X + + procedure :: hpd_invert => slkmat_sp_hpd_invert + ! Inverse of a Hermitian positive definite matrix. + + end type slkmat_sp_t +!!*** + + public :: block_dist_1d ! Return block size for one-dimensional block column/row distribution + public :: slk_has_elpa ! Return True if ELPA support is activated + + public :: matrix_get_local_cplx ! Return a local matrix coefficient of complex type. + public :: matrix_get_local_real ! Return a local matrix coefficient of double precision type. + public :: matrix_set_local_cplx ! Sets a local matrix coefficient of complex type. + public :: matrix_set_local_real ! Sets a local matrix coefficient of double precision type. + public :: idx_loc ! Local indices of an entry + ! from its global indices, independently of the processor. + !public :: glob_loc__ ! Return global location of a matrix coefficient. + !public :: loc_glob__ ! Return global index from a local index (row or column) + ! as a function of a given processor + public :: matrix_from_global ! Fills SCALAPACK matrix from full matrix. + public :: matrix_from_global_sym ! Fills SCALAPACK matrix from a full matrix. + public :: matrix_from_realmatrix ! Fills SCALAPACK matrix from full matrix. + public :: matrix_from_complexmatrix ! Fills SCALAPACK matrix from a full matrix. + public :: matrix_to_global ! Inserts a ScaLAPACK matrix into a global one. + public :: matrix_to_realmatrix ! Inserts a ScaLAPACK matrix into a real matrix. + public :: matrix_to_complexmatrix ! Inserts a ScaLAPACK matrix into a complex matrix. + public :: matrix_to_reference ! Fill a full matrix with respect to a SCALAPACK matrix. + public :: slk_matrix_from_global_dpc_2D ! Fill a complex SCALAPACK matrix with respect to a global matrix. + public :: slk_matrix_from_global_dpc_1Dp ! Fill a complex SCALAPACK matrix with respect to a global matrix. + ! target: double precision complex matrix in packed form. + public :: slk_matrix_to_global_dpc_2D ! Fill a global matrix with respect to a SCALAPACK matrix. + ! target: Two-dimensional Double precision complex matrix. + + public :: slk_pgemm ! Compute: C := alpha*A*B + beta*C + interface slk_pgemm + module procedure slk_pgemm_dp + module procedure slk_pgemm_sp + end interface slk_pgemm + + + public :: compute_eigen_problem ! Compute eigenvalues and eigenvectors of: A * X = lambda * X. + ! complex and real cases. + public :: compute_generalized_eigen_problem ! Compute generalized eigenvalue problem + public :: compute_eigen1 ! Compute eigenvalues and eigenvectors. complex and real cases. + public :: compute_eigen2 ! Compute eigenvalues and eigenvectors: A * X = lambda * B * X + ! complex and real cases. + + public :: slk_write ! Writes a square scaLAPACK distributed matrix on an external file using MPI-IO. + public :: slk_read ! Read a square scaLAPACK distributed matrix from an external file using MPI-IO. + public :: slk_single_fview_read_mask ! Returns an MPI datatype that can be used to read a scaLAPACK matrix from + ! a binary file using MPI-IO. + ! The view is created using the user-defined mask function + public :: slk_single_fview_read ! Returns an MPI datatype to read a scaLAPACK distributed matrix + ! from a binary file using MPI-IO. + public :: slk_single_fview_write ! Returns an MPI datatype to write a scaLAPACK distributed matrix + ! to a binary file using MPI-IO. + + + public :: slk_array_free ! Deallocate array of matrix_scalapack elements + interface slk_array_free + module procedure slk_array1_free + module procedure slk_array2_free + module procedure slk_array3_free + module procedure slk_array4_free + end interface slk_array_free + + public :: slk_array_set ! Elemental routine to set the value of the buffer to a costant value `cvalue`. + public :: slk_array_locmem_mb ! Compute memory allocated for an array of matrix_scalapack elements + +CONTAINS !============================================================================== +!!*** + +!!****f* m_slk/grid_init +!! NAME +!! grid_init +!! +!! FUNCTION +!! Set up the ScaLAPACKgrid given the total number of processors. +!! +!! INPUTS +!! nbprocs= total number of processors +!! comm= MPI communicator +!! [grid_dims]=Number of procs for each dimension. +!! +!! OUTPUT +!! grid= the grid of processors used by Scalapack +!! +!! SOURCE + +subroutine grid_init(grid, nbprocs, comm, use_gpu, grid_dims) + +!Arguments ------------------------------------ + class(grid_scalapack),intent(out) :: grid + integer,intent(in) :: nbprocs,comm + logical,intent(in) :: use_gpu + integer,optional,intent(in) :: grid_dims(2) + +!Local variables------------------------------- + integer :: i + +! ********************************************************************* + + grid%nbprocs = nbprocs + + if (.not. present(grid_dims)) then + ! Search for a rectangular grid of processors + i=INT(SQRT(float(nbprocs))) + do while (MOD(nbprocs,i) /= 0) + i = i-1 + end do + i=max(i,1) + + grid%dims(1) = i + grid%dims(2) = INT(nbprocs/i) + + else + grid%dims = grid_dims + end if + + ABI_CHECK(product(grid%dims) == nbprocs, sjoin("grid%dims:", ltoa(grid%dims), "does not agree with nprocs:", itoa(nbprocs))) + + grid%ictxt = comm + grid%use_gpu = use_gpu + +#ifdef HAVE_LINALG_SCALAPACK + ! 'R': Use row-major natural ordering + call BLACS_GRIDINIT(grid%ictxt, 'R', grid%dims(1), grid%dims(2)) +#endif + +end subroutine grid_init +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/build_processor_scalapack +!! NAME +!! build_processor_scalapack +!! +!! FUNCTION +!! Builds a ScaLAPACK processor descriptor. +!! Build of the data related to one processor in a grid +!! +!! INPUTS +!! grid= array representing the grid of processors. +!! myproc= selected processor +!! comm= MPI communicator +!! +!! OUTPUT +!! processor= descriptor of a processor +!! +!! SOURCE + +subroutine build_processor_scalapack(processor, grid, myproc, comm) + +!Arguments ------------------------------------ + class(processor_scalapack),intent(inout) :: processor + integer,intent(in) :: myproc,comm + class(grid_scalapack),intent(in) :: grid + +! ********************************************************************* + + processor%grid = grid + processor%myproc = myproc + processor%comm = comm + +#ifdef HAVE_LINALG_SCALAPACK + call BLACS_GRIDINFO(grid%ictxt, processor%grid%dims(1), processor%grid%dims(2), & + processor%coords(1), processor%coords(2)) +#endif + + ! These values are the same as those computed by BLACS_GRIDINFO + ! except in the case where the myproc argument is not the local proc + processor%coords(1) = INT((myproc) / grid%dims(2)) + processor%coords(2) = MOD((myproc), grid%dims(2)) + +end subroutine build_processor_scalapack +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/processor_init +!! NAME +!! processor_init +!! +!! FUNCTION +!! Initializes an instance of processor ScaLAPACK from an MPI communicator. +!! +!! INPUTS +!! comm= MPI communicator +!! [grid_dims]=Number of procs for each dimension. +!! +!! OUTPUT +!! processor= descriptor of a processor +!! +!! SOURCE + +subroutine processor_init(processor, comm, grid_dims) + +!Arguments ------------------------------------ + class(processor_scalapack),intent(out) :: processor + integer, intent(in) :: comm + integer,optional,intent(in) :: grid_dims(2) + +!Local variables------------------------------- + type(grid_scalapack) :: grid + integer :: nbproc,myproc + +! ********************************************************************* + + nbproc = xmpi_comm_size(comm) + myproc = xmpi_comm_rank(comm) + + if (present(grid_dims)) then + call grid%init(nbproc, comm, .false., grid_dims=grid_dims) + else + call grid%init(nbproc, comm, .false.) + end if + + call build_processor_scalapack(processor, grid, myproc, comm) + +end subroutine processor_init +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/processor_free +!! NAME +!! processor_free +!! +!! FUNCTION +!! Removes a processor from the ScaLAPACK grid. +!! +!! SOURCE + +subroutine processor_free(processor) + +!Arguments ------------------------------------ + class(processor_scalapack),intent(inout) :: processor + +! ********************************************************************* + +#ifdef HAVE_LINALG_SCALAPACK + if (processor%grid%ictxt /= xmpi_comm_null) then + call BLACS_GRIDEXIT(processor%grid%ictxt) + !call BLACS_EXIT(0) + end if +#endif + +end subroutine processor_free +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/init_matrix_scalapack +!! NAME +!! init_matrix_scalapack +!! +!! FUNCTION +!! Initialisation of a SCALAPACK matrix (each proc initializes its own part of the matrix) +!! +!! INPUTS +!! processor= descriptor of a processor +!! nbli_global= total number of lines +!! nbco_global= total number of columns +!! istwf_k= 2 if we have a real matrix else complex. +!! [size_blocs]= custom block sizes. Use -1 to use global size along that direction. +!! Useful to distribute only rows or columns. Obviously, [-1, -1] is not allowed. +!! +!! OUTPUT +!! matrix= the matrix to process +!! +!! SOURCE + +subroutine init_matrix_scalapack(matrix, nbli_global, nbco_global, processor, istwf_k, size_blocs) + +!Arguments ------------------------------------ + class(basemat_t),intent(inout) :: matrix + integer,intent(in) :: nbli_global, nbco_global, istwf_k + type(processor_scalapack),target,intent(in) :: processor + integer,intent(in),optional :: size_blocs(2) + +#ifdef HAVE_LINALG_SCALAPACK +!Local variables------------------------------- +#ifdef HAVE_LINALG_ELPA + integer, parameter :: DEFAULT_SIZE_BLOCS = 1 +#else + ! As recommended by Intel MKL, a more sensible default than the previous value of 40 + integer, parameter :: DEFAULT_SIZE_BLOCS = 24 +#endif + ! As recommanded in ELPA, which advises distributions as squared as possible using powers of 2 + integer, parameter :: DEFAULT_SIZE_BLOCS_GPU = 16 + integer :: info,sizeb + integer,external :: NUMROC + !character(len=500) :: msg + +! ********************************************************************* + + !call matrix%free() + + sizeb = DEFAULT_SIZE_BLOCS + if(processor%grid%use_gpu) sizeb = DEFAULT_SIZE_BLOCS_GPU + + !Records of the matrix type + matrix%processor => processor + matrix%sizeb_blocs(1) = MIN(sizeb, nbli_global) + matrix%sizeb_blocs(2) = MIN(sizeb, nbco_global) + +#ifdef HAVE_LINALG_ELPA + if(matrix%sizeb_blocs(1) .ne. matrix%sizeb_blocs(2)) then + matrix%sizeb_blocs(1) = MIN(matrix%sizeb_blocs(1), matrix%sizeb_blocs(2)) + matrix%sizeb_blocs(2) = matrix%sizeb_blocs(1) + end if +#endif + + ! Use custom block sizes. + if (present(size_blocs)) then + ABI_CHECK(.not. all(size_blocs == -1), "size_blocs [-1, -1] is not allowed") + if (size_blocs(1) == -1) then + matrix%sizeb_blocs(1) = nbli_global + else + matrix%sizeb_blocs(1) = MIN(size_blocs(1), nbli_global) + end if + if (size_blocs(2) == -1) then + matrix%sizeb_blocs(2) = nbco_global + else + matrix%sizeb_blocs(2) = MIN(size_blocs(2), nbco_global) + end if + end if + + matrix%sizeb_global(1) = nbli_global + matrix%sizeb_global(2) = nbco_global + + ! Size of the local buffer + ! NUMROC computes the NUMber of Rows Or Columns of a distributed matrix owned by the process indicated by IPROC. + ! NUMROC (n, nb, iproc, isrcproc, nprocs) + matrix%sizeb_local(1) = NUMROC(nbli_global, matrix%sizeb_blocs(1), & + processor%coords(1), 0, processor%grid%dims(1)) + + matrix%sizeb_local(2) = NUMROC(nbco_global,matrix%sizeb_blocs(2), & + processor%coords(2), 0, processor%grid%dims(2)) + + call idx_loc(matrix, matrix%sizeb_global(1), matrix%sizeb_global(2), & + matrix%sizeb_local(1), matrix%sizeb_local(2)) + + ! Initialisation of the SCALAPACK description of the matrix + ! (desc, m, n, mb, nb, irsrc, icsrc, ictxt, lld, info) + call DESCINIT(matrix%descript%tab, nbli_global, nbco_global, & + matrix%sizeb_blocs(1), matrix%sizeb_blocs(2), 0, 0, & + processor%grid%ictxt, MAX(1, matrix%sizeb_local(1)), info) + + if (info /= 0) then + ABI_ERROR(sjoin("Error while initializing scalapack matrix. info:", itoa(info))) + end if + + ! Allocate local buffer. + matrix%istwf_k = istwf_k + select type (matrix) + class is (matrix_scalapack) + if (istwf_k /= 2) then + ABI_MALLOC(matrix%buffer_cplx, (matrix%sizeb_local(1), matrix%sizeb_local(2))) + matrix%buffer_cplx = czero + else + ABI_MALLOC(matrix%buffer_real, (matrix%sizeb_local(1), matrix%sizeb_local(2))) + matrix%buffer_real = zero + end if + class is (slkmat_sp_t) + if (istwf_k /= 2) then + ABI_MALLOC(matrix%buffer_cplx, (matrix%sizeb_local(1), matrix%sizeb_local(2))) + matrix%buffer_cplx = czero_sp + else + ABI_MALLOC(matrix%buffer_real, (matrix%sizeb_local(1), matrix%sizeb_local(2))) + matrix%buffer_real = zero_sp + end if + class default + ABI_ERROR("Wrong class") + end select +#endif + +end subroutine init_matrix_scalapack +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/locmem_mb +!! NAME +!! locmem_mb +!! +!! FUNCTION +!! Returns memory allocated for the local buffer in Mb. +!! +!! SOURCE + +pure real(dp) function locmem_mb(mat) + +!Arguments ------------------------------------ + class(basemat_t),intent(in) :: mat + +! ********************************************************************* + + locmem_mb = zero + select type (mat) + class is (matrix_scalapack) + if (allocated(mat%buffer_real)) locmem_mb = product(int(shape(mat%buffer_real))) * dp + if (allocated(mat%buffer_cplx)) locmem_mb = product(int(shape(mat%buffer_cplx))) * two * dp + class is (slkmat_sp_t) + if (allocated(mat%buffer_real)) locmem_mb = product(int(shape(mat%buffer_real))) * sp + if (allocated(mat%buffer_cplx)) locmem_mb = product(int(shape(mat%buffer_cplx))) * two * sp + end select + locmem_mb = locmem_mb * b2Mb + +end function locmem_mb +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/slkmat_print +!! NAME +!! slkmat_print +!! +!! FUNCTION +!! Print info on scalapack matrix. +!! +!! INPUTS +!! [unit]=Unit number (default: std_out) +!! [header]=title for info +!! [prtvol]=Verbosity level (default: 0) +!! +!! SOURCE + +subroutine slkmat_print(mat, header, unit, prtvol) + +!Arguments ------------------------------------ + class(basemat_t),intent(in) :: mat + character(len=*),optional,intent(in) :: header + integer,optional,intent(in) :: prtvol, unit + +!Local variables------------------------------- + integer :: unt, my_prtvol, grid_dims(2) + character(len=50) :: matrix_dtype + character(len=5000) :: msg + +! ********************************************************************* + + unt = std_out; if (present(unit)) unt =unit + my_prtvol = 0; if (present(prtvol)) my_prtvol = prtvol + + msg = ' ==== Info on matrix_scalapack ==== ' + if (present(header)) msg=' ==== '//trim(adjustl(header))//' ==== ' + call wrtout(unt, msg) + + matrix_dtype = "undefined" + select type (mat) + class is (matrix_scalapack) + if (allocated(mat%buffer_real)) matrix_dtype = "real" + if (allocated(mat%buffer_cplx)) matrix_dtype = "complex" + class is (slkmat_sp_t) + if (allocated(mat%buffer_real)) matrix_dtype = "real" + if (allocated(mat%buffer_cplx)) matrix_dtype = "complex" + class default + ABI_ERROR("Wrong class") + end select + + grid_dims = [-1, -1] + if (associated(mat%processor)) grid_dims = mat%processor%grid%dims + + write(msg,'(5(3a),a,f8.1,a)') & + " matrix_dtype ..... ", trim(matrix_dtype), ch10, & + " sizeb_global ..... ", trim(ltoa(mat%sizeb_global)), ch10, & + " sizeb_local ...... ", trim(ltoa(mat%sizeb_local)), ch10, & + " sizeb_blocs ...... ", trim(ltoa(mat%sizeb_blocs)), ch10, & + " processor grid .. ", trim(ltoa(grid_dims)), ch10, & + " memory (Mb) ...... ", mat%locmem_mb(), ch10 + call wrtout(unt, msg) + + !if (prtvol > 10) call mat%write(unit) + +end subroutine slkmat_print +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/slkmat_check_shape +!! NAME +!! slkmat_check_shape +!! +!! FUNCTION +!! Debugging tool to test the local shape `lshape` of the local buffer. +!! Return exit status in `ok` and error message in `msg`. +!! +!! SOURCE + +logical function slkmat_check_local_shape(mat, lshape, msg) result (ok) + +!Arguments ------------------------------------ + class(basemat_t),intent(in) :: mat + integer,intent(in) :: lshape(2) + character(len=*),intent(out) :: msg + +! ********************************************************************* + + msg = "" + ok = all(mat%sizeb_local == lshape) + if (.not. ok) then + msg = sjoin("mat%sizeb_local:", ltoa(mat%sizeb_local), " not equal to input local lshape ", ltoa(lshape)) + return + end if + + select type (mat) + class is (matrix_scalapack) + if (allocated(mat%buffer_cplx)) then + ok = all(shape(mat%buffer_cplx) == lshape) + if (.not. ok) then + msg = sjoin("shape(buffer_cplx):", ltoa(shape(mat%buffer_cplx)), " != input local lshape ", ltoa(lshape)); return + end if + else if (allocated(mat%buffer_real)) then + ok = all(shape(mat%buffer_real) == lshape) + if (.not. ok) then + msg = sjoin("shape(buffer_real):", ltoa(shape(mat%buffer_real)), " != input local lshape ", ltoa(lshape)); return + end if + end if + + class is (slkmat_sp_t) + ! Same piece of code as above. May use include file! + if (allocated(mat%buffer_cplx)) then + ok = all(shape(mat%buffer_cplx) == lshape) + if (.not. ok) then + msg = sjoin("shape(buffer_cplx):", ltoa(shape(mat%buffer_cplx)), " != input local lshape ", ltoa(lshape)); return + end if + else if (allocated(mat%buffer_real)) then + ok = all(shape(mat%buffer_real) == lshape) + if (.not. ok) then + msg = sjoin("shape(buffer_real):", ltoa(shape(mat%buffer_real)), " != input local lshape ", ltoa(lshape)); return + end if + end if + + class default + ABI_ERROR("Wrong class") + end select + +end function slkmat_check_local_shape +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/slk_get_head_and_wings +!! NAME +!! slk_get_head_and_wings +!! +!! FUNCTION +!! Return global arrays with head and wings of the matrix. +!! If call_mpi if False, global MPI sum is postponed. +!! Useful to reduce the number of MPI calls if one has to operate on multiple matrices. +!! +!! SOURCE + +subroutine slk_get_head_and_wings(mat, head, low_wing, up_wing, call_mpi) + +!Arguments ------------------------------------ + class(matrix_scalapack),intent(in) :: mat + complex(dp),intent(out) :: head, low_wing(mat%sizeb_global(1)), up_wing(mat%sizeb_global(2)) + logical,intent(in) :: call_mpi + +!Local variables------------------------------- + integer :: ierr, il_g1, il_g2, iglob1, iglob2 + logical :: is_cplx + +! ********************************************************************* + + head = zero; low_wing = zero; up_wing = zero + + is_cplx = allocated(mat%buffer_cplx) + + do il_g2=1,mat%sizeb_local(2) + iglob2 = mat%loc2gcol(il_g2) + do il_g1=1,mat%sizeb_local(1) + iglob1 = mat%loc2grow(il_g1) + + if (iglob1 == 1 .or. iglob2 == 1) then + if (iglob1 == 1 .and. iglob2 == 1) then + if (is_cplx) then + head = mat%buffer_cplx(il_g1, il_g2) + else + head = mat%buffer_real(il_g1, il_g2) + end if + else if (iglob1 == 1) then + if (is_cplx) then + up_wing(iglob2) = mat%buffer_cplx(il_g1, il_g2) + else + up_wing(iglob2) = mat%buffer_real(il_g1, il_g2) + end if + else if (iglob2 == 1) then + if (is_cplx) then + low_wing(iglob1) = mat%buffer_cplx(il_g1, il_g2) + else + low_wing(iglob1) = mat%buffer_real(il_g1, il_g2) + end if + end if + end if + + end do + end do + + if (call_mpi) then + call xmpi_sum(head, mat%processor%grid%ictxt, ierr) + call xmpi_sum(low_wing, mat%processor%grid%ictxt, ierr) + call xmpi_sum(up_wing, mat%processor%grid%ictxt, ierr) + end if + +end subroutine slk_get_head_and_wings +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/slk_set_head_and_wings +!! NAME +!! slk_set_head_and_wings +!! +!! FUNCTION +!! Set head and the wings of the matrix starting from global arrays. +!! +!! SOURCE + +subroutine slk_set_head_and_wings(mat, head, low_wing, up_wing) + +!Arguments ------------------------------------ + class(matrix_scalapack),intent(inout) :: mat + complex(dp),intent(in) :: head, low_wing(mat%sizeb_global(1)), up_wing(mat%sizeb_global(2)) + +!Local variables------------------------------- + integer :: il_g1, il_g2, iglob1, iglob2 + logical :: is_cplx + +! ********************************************************************* + + is_cplx = allocated(mat%buffer_cplx) + + do il_g2=1,mat%sizeb_local(2) + iglob2 = mat%loc2gcol(il_g2) + do il_g1=1,mat%sizeb_local(1) + iglob1 = mat%loc2grow(il_g1) + + if (iglob1 == 1 .or. iglob2 == 1) then + if (iglob1 == 1 .and. iglob2 == 1) then + if (is_cplx) then + mat%buffer_cplx(il_g1, il_g2) = head + else + mat%buffer_real(il_g1, il_g2) = real(head) + end if + else if (iglob1 == 1) then + if (is_cplx) then + mat%buffer_cplx(il_g1, il_g2) = up_wing(iglob2) + else + mat%buffer_real(il_g1, il_g2) = real(up_wing(iglob2)) + end if + else if (iglob2 == 1) then + if (is_cplx) then + mat%buffer_cplx(il_g1, il_g2) = low_wing(iglob1) + else + mat%buffer_real(il_g1, il_g2) = real(low_wing(iglob1)) + end if + end if + end if + + end do + end do + +end subroutine slk_set_head_and_wings +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/slkmat_sp_set_head_and_wings +!! NAME +!! slkmat_sp_set_head_and_wings +!! +!! FUNCTION +!! Set head and the wings of the matrix starting from global arrays. +!! +!! SOURCE + +subroutine slkmat_sp_set_head_and_wings(mat, head, low_wing, up_wing) + +!Arguments ------------------------------------ + class(slkmat_sp_t),intent(inout) :: mat + complex(sp),intent(in) :: head, low_wing(mat%sizeb_global(1)), up_wing(mat%sizeb_global(2)) + +!Local variables------------------------------- + integer :: il_g1, il_g2, iglob1, iglob2 + logical :: is_cplx + +! ********************************************************************* + + is_cplx = allocated(mat%buffer_cplx) + + do il_g2=1,mat%sizeb_local(2) + iglob2 = mat%loc2gcol(il_g2) + do il_g1=1,mat%sizeb_local(1) + iglob1 = mat%loc2grow(il_g1) + + if (iglob1 == 1 .or. iglob2 == 1) then + if (iglob1 == 1 .and. iglob2 == 1) then + if (is_cplx) then + mat%buffer_cplx(il_g1, il_g2) = head + else + mat%buffer_real(il_g1, il_g2) = real(head) + end if + else if (iglob1 == 1) then + if (is_cplx) then + mat%buffer_cplx(il_g1, il_g2) = up_wing(iglob2) + else + mat%buffer_real(il_g1, il_g2) = real(up_wing(iglob2)) + end if + else if (iglob2 == 1) then + if (is_cplx) then + mat%buffer_cplx(il_g1, il_g2) = low_wing(iglob1) + else + mat%buffer_real(il_g1, il_g2) = real(low_wing(iglob1)) + end if + end if + end if + + end do + end do + +end subroutine slkmat_sp_set_head_and_wings +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/matrix_scalapack_copy +!! NAME +!! matrix_scalapack_copy +!! +!! FUNCTION +!! Copy in_mat to out_mat. If empty is True, the values in the local buffer are not copied. Default: False +!! +!! SOURCE + +subroutine matrix_scalapack_copy(in_mat, out_mat, empty) + +!Arguments ------------------------------------ + class(matrix_scalapack),intent(in) :: in_mat + class(matrix_scalapack),intent(out) :: out_mat + logical,optional,intent(in) :: empty + +!Local variables------------------------------- + logical :: empty__ + +! ********************************************************************* + + call out_mat%init(in_mat%sizeb_global(1), in_mat%sizeb_global(2), in_mat%processor, in_mat%istwf_k, & + size_blocs=in_mat%sizeb_blocs) + + empty__ = .False.; if (present(empty)) empty__ = empty + if (.not. empty__) then + if (in_mat%istwf_k == 1) then + out_mat%buffer_cplx = in_mat%buffer_cplx + else + out_mat%buffer_real = in_mat%buffer_real + end if + end if + +end subroutine matrix_scalapack_copy +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/slkmat_sp_copy +!! NAME +!! slkmat_sp_copy +!! +!! FUNCTION +!! Copy in_mat to out_mat. If empty is True, the values in the local buffer are not copied. Default: False +!! +!! SOURCE + +subroutine slkmat_sp_copy(in_mat, out_mat, empty) + +!Arguments ------------------------------------ + class(slkmat_sp_t),intent(in) :: in_mat + class(slkmat_sp_t),intent(out) :: out_mat + logical,optional,intent(in) :: empty + +!Local variables------------------------------- + logical :: empty__ + +! ********************************************************************* + + call out_mat%init(in_mat%sizeb_global(1), in_mat%sizeb_global(2), in_mat%processor, in_mat%istwf_k, & + size_blocs=in_mat%sizeb_blocs) + + empty__ = .False.; if (present(empty)) empty__ = empty + if (.not. empty__) then + if (in_mat%istwf_k == 1) then + out_mat%buffer_cplx = in_mat%buffer_cplx + else + out_mat%buffer_real = in_mat%buffer_real + end if + end if + +end subroutine slkmat_sp_copy +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/matrix_scalapack_free +!! NAME +!! matrix_scalapack_free +!! +!! FUNCTION +!! Free dynamic memory +!! +!! SOURCE + +subroutine matrix_scalapack_free(mat) + +!Arguments ------------------------------------ + class(basemat_t),intent(inout) :: mat + +! ********************************************************************* + + ! Don't free the grid. Just nullify the pointer as there might be other objects keeping a ref to processor. + mat%processor => null() + + mat%sizeb_global = 0 + mat%sizeb_blocs = 0 + mat%sizeb_local = 0 + mat%descript%tab = 0 + + select type (mat) + class is (matrix_scalapack) + ABI_SFREE(mat%buffer_cplx) + ABI_SFREE(mat%buffer_real) + class is (slkmat_sp_t) + ABI_SFREE(mat%buffer_cplx) + ABI_SFREE(mat%buffer_real) + class default + ABI_ERROR("Wrong class") + end select + +end subroutine matrix_scalapack_free +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/slk_array1_free +!! NAME +!! slk_array1_free +!! +!! FUNCTION +!! Deallocate 1d array of matrix_scalapack elements +!! +!! SOURCE + +subroutine slk_array1_free(slk_arr1) + class(basemat_t),intent(inout) :: slk_arr1(:) + integer :: i1 + do i1=1,size(slk_arr1, dim=1) + call slk_arr1(i1)%free() + end do +end subroutine slk_array1_free +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/slk_array2_free +!! NAME +!! slk_array2_free +!! +!! FUNCTION +!! Deallocate 2d array of matrix_scalapack elements +!! +!! SOURCE + +subroutine slk_array2_free(slk_arr2) + class(basemat_t),intent(inout) :: slk_arr2(:,:) + integer :: i1, i2 + do i2=1,size(slk_arr2, dim=2) + do i1=1,size(slk_arr2, dim=1) + call slk_arr2(i1, i2)%free() + end do + end do +end subroutine slk_array2_free +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/slk_array3_free +!! NAME +!! slk_array3_free +!! +!! FUNCTION +!! Deallocate 3d array of matrix_scalapack elements +!! +!! SOURCE + +subroutine slk_array3_free(slk_arr3) + class(basemat_t),intent(inout) :: slk_arr3(:,:,:) + integer :: i1, i2, i3 + do i3=1,size(slk_arr3, dim=3) + do i2=1,size(slk_arr3, dim=2) + do i1=1,size(slk_arr3, dim=1) + call slk_arr3(i1, i2, i3)%free() + end do + end do + end do +end subroutine slk_array3_free +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/slk_array4_free +!! NAME +!! slk_array4_free +!! +!! FUNCTION +!! Deallocate 4d array of matrix_scalapack elements +!! +!! SOURCE + +subroutine slk_array4_free(slk_arr4) + class(basemat_t),intent(inout) :: slk_arr4(:,:,:,:) + integer :: i1, i2, i3, i4 + do i4=1,size(slk_arr4, dim=4) + do i3=1,size(slk_arr4, dim=3) + do i2=1,size(slk_arr4, dim=2) + do i1=1,size(slk_arr4, dim=1) + call slk_arr4(i1, i2, i3, i4)%free() + end do + end do + end do + end do +end subroutine slk_array4_free +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/slk_array_set +!! NAME +!! slk_array_set +!! +!! FUNCTION +!! Elemental routine to set the value of the PBLAS buffer to a costant value `cvalue`. +!! Usually used to zero all the buffers in an array of matrix_scalapack objects. +!! +!! SOURCE + +elemental subroutine slk_array_set(mat, cvalue) + +!Arguments ------------------------------------ + class(basemat_t),intent(inout) :: mat + complex(dp),intent(in) :: cvalue + + select type (mat) + class is (matrix_scalapack) + if (allocated(mat%buffer_cplx)) mat%buffer_cplx = cvalue + if (allocated(mat%buffer_real)) mat%buffer_real = real(cvalue, kind=dp) + class is (slkmat_sp_t) + if (allocated(mat%buffer_cplx)) mat%buffer_cplx = cmplx(cvalue, kind=sp) + if (allocated(mat%buffer_real)) mat%buffer_real = real(cvalue, kind=sp) + end select + +end subroutine slk_array_set +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/slk_array_locmem_mb +!! NAME +!! slk_array_locmem_mb +!! +!! FUNCTION +!! Elemental function to compute the memory allocated for an array of matrix_scalapack elements +!! Usage: mem_mb = sum(mat_array) +!! +!! SOURCE + +elemental real(dp) function slk_array_locmem_mb(mat) result(mem_mb) + class(basemat_t),intent(in) :: mat + mem_mb = mat%locmem_mb() +end function slk_array_locmem_mb +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/block_dist_1d +!! NAME +!! block_dist_1d +!! +!! FUNCTION +!! Return block size for one-dimensional block column (row) distribution. +!! Mainly used to assign blocks of contiguous columns (rows) of a matrix to successive processes +!! when a 1d grid is employed. +!! +!! It is usually interfaced with CPP macros, e.g: +!! +!! ABI_CHECK(block_dist_1d(mat_size, nproc, block_size, msg), msg) +!! +!! INPUTS +!! mat_size=Size of the matrix (either number of rows or number of colums) +!! nproc=Number of processoes in the 1D scalapack grid +!! +!! OUTPUT +!! ok= Boolean flag with exit status (idle processes are not allowed). +!! block_size=Size of the block along this axis needed for one-dimensional block distribution +!! msg=Error message (if not ok) +!! +!! SOURCE + +logical function block_dist_1d(mat_size, nproc, block_size, msg) result (ok) + +!Arguments ------------------------------------ + integer, intent(in) :: mat_size, nproc + integer,intent(out) :: block_size + character(len=*),intent(out) :: msg + +! ********************************************************************* + + ok = .True.; msg = "" + !block_size = 1; return + + block_size = mat_size / nproc + if (block_size == 0) then + ok = .False. + write(msg, "(2(a,i0), 2a)") & + "The number of MPI processors: ", nproc, " exceeeds the number of rows (columms) of the matrix: ", mat_size, ch10, & + "Decrease the number of MPI processes for the scalapack level." + return + end if + + if (mod(mat_size, nproc) /= 0) block_size = block_size + 1 + +end function block_dist_1d +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/slk_has_elpa +!! NAME +!! slk_has_elpa +!! +!! FUNCTION +!! Return True if ELPA support is activated +!! +!! SOURCE + +pure logical function slk_has_elpa() result (ans) + +! ********************************************************************* + + ans = .False. +#ifdef HAVE_LINALG_ELPA + ans = .True. +#endif + +end function slk_has_elpa +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/matrix_get_local_cplx +!! NAME +!! matrix_get_local_cplx +!! +!! FUNCTION +!! Returns a local matrix coefficient of complex type. +!! Access to a component thanks to its local indices +!! +!! INPUTS +!! matrix= the matrix to process +!! i= row in the matrix +!! j= column in the matrix +!! +!! OUTPUT +!! The value of the local matrix. +!! +!! SOURCE + +pure complex(dpc) function matrix_get_local_cplx(matrix, i, j) + +!Arguments ------------------------------------ + class(matrix_scalapack),intent(in) :: matrix + integer, intent(in) :: i,j + +! ********************************************************************* + + matrix_get_local_cplx = matrix%buffer_cplx(i,j) + +end function matrix_get_local_cplx +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/matrix_get_local_real +!! NAME +!! matrix_get_local_real +!! +!! FUNCTION +!! Returns a local matrix coefficient of double precision type. +!! +!! INPUTS +!! matrix= the matrix to process +!! i= row in the matrix +!! j= column in the matrix +!! +!! SOURCE + +pure real(dp) function matrix_get_local_real(matrix,i,j) + +!Arguments ------------------------------------ + class(matrix_scalapack),intent(in) :: matrix + integer, intent(in) :: i,j + +! ********************************************************************* + + matrix_get_local_real = matrix%buffer_real(i,j) + +end function matrix_get_local_real +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/matrix_set_local_cplx +!! NAME +!! matrix_set_local_cplx +!! +!! FUNCTION +!! Sets a local matrix coefficient of complex type. +!! ------------------------------------------------------- +!! Positioning of a component of a matrix thanks to its local indices +!! ------------------------------------------------------- +!! +!! INPUTS +!! i= row in the matrix +!! j= column in the matrix +!! value= the value to set +!! +!! SIDE EFFECTS +!! matrix%buffer_cplx(i,j) filled with value +!! +!! SOURCE + +pure subroutine matrix_set_local_cplx(matrix,i,j,value) + +!Arguments ------------------------------------ + class(matrix_scalapack),intent(inout) :: matrix + integer, intent(in) :: i,j + complex(dp), intent(in) :: value + +! ********************************************************************* + + matrix%buffer_cplx(i,j) = value + +end subroutine matrix_set_local_cplx +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/matrix_set_local_real +!! NAME +!! matrix_set_local_real +!! +!! FUNCTION +!! Sets a local matrix coefficient of double precision type. +!! +!! INPUTS +!! i= row in the matrix +!! j= column in the matrix +!! value= the value to set +!! +!! SIDE EFFECTS +!! matrix%buffer_real(i,j) set to value +!! +!! SOURCE + +pure subroutine matrix_set_local_real(matrix, i, j, value) + +!Arguments ------------------------------------ + class(matrix_scalapack),intent(inout) :: matrix + integer, intent(in) :: i,j + real(dp), intent(in) :: value + +! ********************************************************************* + + matrix%buffer_real(i,j) = value + +end subroutine matrix_set_local_real +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/idx_loc +!! NAME +!! idx_loc +!! +!! FUNCTION +!! Return local indices from global indices, **independently** of the processor. +!! +!! INPUTS +!! matrix= the matrix to process +!! i= row in the matrix +!! j= column in the matrix +!! +!! OUTPUT +!! iloc= local row of the coefficient +!! jloc= local column of the coefficient +!! +!! SOURCE + +subroutine idx_loc(matrix, i, j, iloc, jloc) + +!Arguments ------------------------------------ + class(basemat_t),intent(in) :: matrix + integer, intent(in) :: i,j + integer, intent(out) :: iloc,jloc + +! ********************************************************************* + + iloc = glob_loc__(matrix, i, 1) + jloc = glob_loc__(matrix, j, 2) + +end subroutine idx_loc +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/glob_loc__ +!! NAME +!! glob_loc__ +!! +!! FUNCTION +!! Returns the global location of a matrix coefficient. +!! +!! INPUTS +!! matrix= the matrix to process +!! idx= number of rows in the distributed matrix +!! lico= block size index +!! +!! SOURCE + +integer function glob_loc__(matrix, idx, lico) + +!Arguments ------------------------------------ + class(basemat_t),intent(in) :: matrix + integer, intent(in) :: idx, lico + +#ifdef HAVE_LINALG_SCALAPACK +!Local variables------------------------------- + integer,external :: NUMROC + +! ********************************************************************* + + glob_loc__ = NUMROC(idx, matrix%sizeb_blocs(lico), & + matrix%processor%coords(lico), 0, matrix%processor%grid%dims(lico)) +#endif + +end function glob_loc__ +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/slk_glob2loc +!! NAME +!! slk_glob2loc +!! +!! FUNCTION +!! Determine the local indices of an element from its global indices and return haveit bool flag. +!! +!! INPUTS +!! iloc= local row index. +!! jloc= local column index. +!! +!! OUTPUT +!! iloc= row in the matrix +!! jloc= column in the matrix +!! haveit= True if (iglob, jglob) is stored on this proc +!! +!! SOURCE + +subroutine slk_glob2loc(mat, iglob, jglob, iloc, jloc, haveit) + +!Arguments ------------------------------------ + class(basemat_t),intent(in) :: mat + integer, intent(in) :: iglob, jglob + integer, intent(out) :: iloc, jloc + logical,intent(out) :: haveit + +!Local variables------------------------------- + integer :: row_src, col_src + +! ********************************************************************* + +#ifdef HAVE_LINALG_SCALAPACK + ! SUBROUTINE INFOG2L( GRINDX, GCINDX, DESC, NPROW, NPCOL, MYROW, MYCOL, LRINDX, LCINDX, RSRC, CSRC) + + call INFOG2L(iglob, jglob, mat%descript%tab, mat%processor%grid%dims(1), mat%processor%grid%dims(2), & + mat%processor%coords(1), mat%processor%coords(2), iloc, jloc, row_src, col_src) + + haveit = all(mat%processor%coords == [row_src, col_src]) +#endif + +end subroutine slk_glob2loc +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/slk_matrix_loc2glob +!! NAME +!! slk_matrix_loc2glob +!! +!! FUNCTION +!! Determine the global indices of an element from its local indices. +!! +!! INPUTS +!! matrix= the matrix to process. +!! iloc= local row index. +!! jloc= local column index. +!! +!! OUTPUT +!! i= row in the matrix +!! j= column in the matrix +!! +!! SOURCE + +pure subroutine slk_matrix_loc2glob(matrix, iloc, jloc, i, j) + +!Arguments ------------------------------------ + class(basemat_t),intent(in) :: matrix + integer, intent(in) :: iloc,jloc + integer, intent(out) :: i,j + +! ********************************************************************* + + i = loc_glob__(matrix, matrix%processor, iloc, 1) + j = loc_glob__(matrix, matrix%processor, jloc, 2) + +end subroutine slk_matrix_loc2glob +!!*** + +!!****f* m_slk/slk_matrix_loc2grow +!! NAME +!! slk_matrix_loc2grow +!! +!! FUNCTION +!! Determine the global row index from the local index +!! +!! INPUTS +!! matrix= the matrix to process. +!! iloc= local row index. +!! +!! SOURCE + +integer pure function slk_matrix_loc2grow(matrix, iloc) result(iglob) + +!Arguments ------------------------------------ + class(basemat_t),intent(in) :: matrix + integer, intent(in) :: iloc + +! ********************************************************************* + + iglob = loc_glob__(matrix, matrix%processor, iloc, 1) + +end function slk_matrix_loc2grow +!!*** + +!!****f* m_slk/slk_matrix_loc2gcol +!! NAME +!! slk_matrix_loc2gcol +!! +!! FUNCTION +!! Determine the global column index of an element from the local index +!! +!! INPUTS +!! matrix= the matrix to process. +!! jloc= local column index. +!! +!! SOURCE + +integer pure function slk_matrix_loc2gcol(matrix, jloc) result(jglob) + +!Arguments ------------------------------------ + class(basemat_t),intent(in) :: matrix + integer, intent(in) :: jloc + +! ********************************************************************* + + jglob = loc_glob__(matrix, matrix%processor, jloc, 2) + +end function slk_matrix_loc2gcol +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/loc_glob__ +!! NAME +!! loc_glob__ +!! +!! FUNCTION +!! Determine the global index from a local index (row or column) as a function of a given processor +!! +!! INPUTS +!! matrix= the matrix to process +!! proc= descriptor of a processor +!! idx= number of rows in the distributed matrix +!! lico= block size index. 1 for rows. 2 for columns +!! +!! SOURCE + +integer pure function loc_glob__(matrix, proc, idx, lico) + +!Arguments ------------------------------------ + class(basemat_t),intent(in) :: matrix + class(processor_scalapack),intent(in) :: proc + integer, intent(in) :: idx,lico + +!Local variables------------------------------- + integer :: nbcyc, rest, nblocs + +! ********************************************************************* + + nbcyc = INT((idx-1) / matrix%sizeb_blocs(lico)) + rest = MOD(idx-1, matrix%sizeb_blocs(lico)) + nblocs = nbcyc * proc%grid%dims(lico) + proc%coords(lico) + + loc_glob__ = nblocs * matrix%sizeb_blocs(lico) + rest + 1 + +end function loc_glob__ +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/matrix_from_global +!! NAME +!! matrix_from_global +!! +!! FUNCTION +!! Routine to fill a SCALAPACK matrix from a global PACKED matrix. +!! +!! INPUTS +!! istwf_k= 2 if we have a real matrix else complex. +!! reference= one-dimensional array with packed matrix. +!! +!! SIDE EFFECTS +!! matrix= the matrix to process +!! +!! SOURCE + +subroutine matrix_from_global(matrix, reference, istwf_k) + +!Arguments ------------------------------------ + class(matrix_scalapack),intent(inout) :: matrix + integer,intent(in) :: istwf_k + real(dp),intent(in) :: reference(*) + +!Local variables------------------------------- + integer :: i,j,iglob,jglob,ind + real(dp) :: val_real + complex(dp) :: val_cplx + +! ********************************************************************* + + do i=1,matrix%sizeb_local(1) + do j=1,matrix%sizeb_local(2) + call matrix%loc2glob(i, j, iglob, jglob) + + if (istwf_k/=2) then + ind = jglob*(jglob-1)+2*iglob-1 + val_cplx = dcmplx(reference(ind),reference(ind+1)) + call matrix_set_local_cplx(matrix,i,j,val_cplx) + else + ind = (jglob*(jglob-1))/2 + iglob + val_real = reference(ind) + call matrix_set_local_real(matrix,i,j,val_real) + end if + + end do + end do + +end subroutine matrix_from_global +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/matrix_from_global_sym +!! NAME +!! matrix_from_global_sym +!! +!! FUNCTION +!! +!! INPUTS +!! istwf_k= 2 if we have a real matrix else complex. +!! reference= one-dimensional array +!! +!! SIDE EFFECTS +!! matrix= the matrix to process +!! +!! SOURCE + +subroutine matrix_from_global_sym(matrix, reference, istwf_k) + +!Arguments ------------------------------------ + class(matrix_scalapack),intent(inout) :: matrix + real(dp),intent(in) :: reference(:) + integer,intent(in) :: istwf_k + +!Local variables------------------------------- + integer :: i,j,iglob,jglob,ind + complex(dp):: val_cplx + real(dp) ::val_real + +! ********************************************************************* + + do i=1,matrix%sizeb_local(1) + do j=1,matrix%sizeb_local(2) + call matrix%loc2glob(i,j,iglob,jglob) + if(jglob < iglob) then + ind = iglob*(iglob-1)+2*jglob-1 + else + ind = jglob*(jglob-1)+2*iglob-1 + end if + if (istwf_k/=2) then + val_cplx = dcmplx(reference(ind),reference(ind+1)) + if(jglob < iglob) then + call matrix_set_local_cplx(matrix,i,j,conjg(val_cplx)) + else + call matrix_set_local_cplx(matrix,i,j,val_cplx) + end if + else + ind = (ind + 1) / 2 + val_real = reference(ind) + call matrix_set_local_real(matrix,i,j,val_real) + end if + end do + end do + +end subroutine matrix_from_global_sym +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/matrix_from_realmatrix +!! NAME +!! matrix_from_realmatrix +!! +!! FUNCTION +!! Routine to fill a SCALAPACK matrix from a real global matrix (FULL STORAGE MODE) +!! +!! INPUTS +!! istwf_k= 2 if we have a real matrix else complex. +!! reference= a real matrix +!! +!! SIDE EFFECTS +!! matrix= the matrix to process +!! +!! SOURCE + +subroutine matrix_from_realmatrix(matrix, reference, istwf_k) + +!Arguments ------------------------------------ + class(matrix_scalapack),intent(inout) :: matrix + integer,intent(in) :: istwf_k +!arrays + real(dp),intent(in) :: reference(:,:) + +!Local variables------------------------------- + integer :: i,j,iglob,jglob + real(dp) :: val + +! ********************************************************************* + + ABI_UNUSED(istwf_k) + + do i=1,matrix%sizeb_local(1) + do j=1,matrix%sizeb_local(2) + call matrix%loc2glob(i, j, iglob, jglob) + val = reference(iglob, jglob) + call matrix_set_local_real(matrix,i,j,val) + end do + end do + +end subroutine matrix_from_realmatrix +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/matrix_from_complexmatrix +!! NAME +!! matrix_from_complexmatrix +!! +!! FUNCTION +!! Routine to fill a SCALAPACK matrix from a global matrix (FULL STORAGE MODE) +!! +!! INPUTS +!! istwf_k= 2 if we have a real matrix else complex. +!! reference= a complex matrix +!! +!! SIDE EFFECTS +!! matrix= the matrix to process +!! +!! SOURCE + +subroutine matrix_from_complexmatrix(matrix, reference, istwf_k) + +!Arguments ------------------------------------ + class(matrix_scalapack),intent(inout) :: matrix + integer,intent(in) :: istwf_k +!arrays + real(dp),intent(in) :: reference(:,:) + +!Local variables------------------------------- + integer :: i,j,iglob,jglob + complex(dpc) :: val + +! ********************************************************************* + + ABI_UNUSED(istwf_k) + + do i=1,matrix%sizeb_local(1) + do j=1,matrix%sizeb_local(2) + call matrix%loc2glob(i, j, iglob, jglob) + val = dcmplx(reference(2*iglob-1, jglob),reference(2*iglob, jglob)) + call matrix_set_local_cplx(matrix,i,j,val) + end do + end do + +end subroutine matrix_from_complexmatrix +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/matrix_to_global +!! NAME +!! matrix_to_global +!! +!! FUNCTION +!! Inserts a ScaLAPACK matrix into a global one in PACKED storage mode. +!! +!! INPUTS +!! matrix= the matrix to process +!! istwf_k= 2 if we have a real matrix else complex. +!! nband_k= number of bands at this k point for that spin polarization +!! +!! SIDE EFFECTS +!! reference= one-dimensional array +!! +!! SOURCE + +subroutine matrix_to_global(matrix, reference, istwf_k) + +!Arguments ------------------------------------ + class(matrix_scalapack),intent(in) :: matrix + integer,intent(in) :: istwf_k !,nband_k + real(dp),intent(inout) :: reference(*) !(nband_k*(nband_k+1)) + +!Local variables------------------------------- + integer :: i,j,iglob,jglob,ind + +! ********************************************************************* + + do i=1,matrix%sizeb_local(1) + do j=1,matrix%sizeb_local(2) + call matrix%loc2glob(i, j, iglob, jglob) + + ind = jglob*(jglob-1)+2*iglob-1 + if (ind <= matrix%sizeb_global(2)*(matrix%sizeb_global(2)+1)) then + if (istwf_k/=2) then + reference(ind) = real(matrix_get_local_cplx(matrix,i,j)) + reference(ind+1) = aimag(matrix_get_local_cplx(matrix,i,j)) + else + ind=(ind+1)/2 !real packed storage + reference(ind) = matrix_get_local_real(matrix,i,j) + end if + end if + end do + end do + +end subroutine matrix_to_global +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/matrix_to_realmatrix +!! NAME +!! matrix_to_realmatrix +!! +!! FUNCTION +!! Inserts a ScaLAPACK matrix into a real matrix in FULL STORAGE MODE. +!! +!! INPUTS +!! matrix= the matrix to process +!! istwf_k= 2 if we have a real matrix else complex. +!! +!! SIDE EFFECTS +!! reference= the matrix to fill +!! +!! SOURCE + +subroutine matrix_to_realmatrix(matrix, reference, istwf_k) + +!Arguments ------------------------------------ + class(matrix_scalapack),intent(in) :: matrix + integer,intent(in) :: istwf_k +!arrays + real(dp),intent(inout) :: reference(:,:) + +!Local variables------------------------------- + integer :: i,j,iglob,jglob + !complex(dpc) :: zvar + +! ********************************************************************* + + ABI_UNUSED(istwf_k) + + do i=1,matrix%sizeb_local(1) + do j=1,matrix%sizeb_local(2) + call matrix%loc2glob(i, j, iglob, jglob) + reference(iglob,jglob) = matrix_get_local_real(matrix,i,j) + end do + end do + +end subroutine matrix_to_realmatrix +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/matrix_to_complexmatrix +!! NAME +!! matrix_to_complexmatrix +!! +!! FUNCTION +!! Inserts a ScaLAPACK matrix into a complex matrix in FULL STORAGE MODE. +!! +!! INPUTS +!! matrix= the matrix to process +!! istwf_k= 2 if we have a real matrix else complex. +!! +!! SIDE EFFECTS +!! reference= the matrix to fill +!! +!! SOURCE + +subroutine matrix_to_complexmatrix(matrix, reference, istwf_k) + +!Arguments ------------------------------------ + integer,intent(in) :: istwf_k + class(matrix_scalapack),intent(in) :: matrix +!arrays + complex(dpc),intent(inout) :: reference(:,:) + +!Local variables------------------------------- + integer :: i,j,iglob,jglob + +! ********************************************************************* + + ABI_UNUSED(istwf_k) + + do i=1,matrix%sizeb_local(1) + do j=1,matrix%sizeb_local(2) + call matrix%loc2glob(i, j, iglob, jglob) + reference(iglob,jglob) = matrix_get_local_cplx(matrix,i,j) + end do + end do + +end subroutine matrix_to_complexmatrix +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/matrix_to_reference +!! NAME +!! matrix_to_reference +!! +!! FUNCTION +!! Routine to fill a full matrix with respect to a SCALAPACK matrix. +!! +!! INPUTS +!! matrix= the matrix to process +!! istwf_k= 2 if we have a real matrix else complex. +!! +!! SIDE EFFECTS +!! reference= one-dimensional array +!! +!! SOURCE + +subroutine matrix_to_reference(matrix, reference, istwf_k) + +!Arguments ------------------------------------ + class(matrix_scalapack),intent(in) :: matrix + integer,intent(in) :: istwf_k +!arrays + real(dp),intent(inout) :: reference(:,:) + +!Local variables------------------------------- + integer :: i,j,iglob,jglob,ind + +! ********************************************************************* + + do i=1,matrix%sizeb_local(1) + do j=1,matrix%sizeb_local(2) + call matrix%loc2glob(i, j, iglob, jglob) + + if (istwf_k/=2) then + ind=(iglob-1)*2+1 + reference(ind,jglob) = real(matrix_get_local_cplx(matrix,i,j)) + reference(ind+1,jglob) = aimag(matrix_get_local_cplx(matrix,i,j)) + else + ind=iglob + reference(ind,jglob) = matrix_get_local_real(matrix,i,j) + !reference(ind+1,jglob) = 0._dp + end if + + end do + end do + +end subroutine matrix_to_reference +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/slk_matrix_from_global_dpc_2D +!! NAME +!! slk_matrix_from_global_dpc_2D +!! +!! FUNCTION +!! Routine to fill a complex SCALAPACK matrix with respect to a global matrix. +!! target: Two-dimensional double precision complex matrix +!! +!! INPUTS +!! glob_mat=Two-dimensional array containing the global matrix. +!! uplo=String specifying whether only the upper or lower triangular part of the global matrix is used: +!! = "U": Upper triangular +!! = "L": Lower triangular +!! = "A": Full matrix (used for general complex matrices) +!! +!! SIDE EFFECTS +!! mat=The distributed matrix. +!! %buffer_cplx=Local buffer containg the value this node is dealing with. +!! +!! SOURCE + +subroutine slk_matrix_from_global_dpc_2D(mat, uplo, glob_mat) + +!Arguments ------------------------------------ +!scalars + class(matrix_scalapack),intent(inout) :: mat + character(len=*),intent(in) :: uplo +!array + complex(dpc),intent(in) :: glob_mat(:,:) + +!Local variables------------------------------- + integer :: ii, jj, iglob, jglob + +!************************************************************************ + + ABI_CHECK(allocated(mat%buffer_cplx), "%buffer_cplx not allocated") + + select case (uplo(1:1)) + + case ("A", "a") + ! Full global matrix is used. + do jj=1,mat%sizeb_local(2) + do ii=1,mat%sizeb_local(1) + call mat%loc2glob(ii, jj, iglob, jglob) + mat%buffer_cplx(ii,jj) = glob_mat(iglob,jglob) + end do + end do + + case ("U", "u") + ! Only the upper triangle of the global matrix is used. + do jj=1,mat%sizeb_local(2) + do ii=1,mat%sizeb_local(1) + call mat%loc2glob(ii, jj, iglob, jglob) + if (jglob>=iglob) then + mat%buffer_cplx(ii,jj) = glob_mat(iglob,jglob) + else + mat%buffer_cplx(ii,jj) = DCONJG(glob_mat(jglob,iglob)) + end if + end do + end do + + case ("L", "l") + ! Only the lower triangle of the global matrix is used. + do jj=1,mat%sizeb_local(2) + do ii=1,mat%sizeb_local(1) + call mat%loc2glob(ii, jj, iglob, jglob) + if (jglob<=iglob) then + mat%buffer_cplx(ii,jj) = glob_mat(iglob,jglob) + else + mat%buffer_cplx(ii,jj) = DCONJG(glob_mat(jglob,iglob)) + end if + end do + end do + + case default + ABI_BUG(" Wrong uplo: "//TRIM(uplo)) + end select + +end subroutine slk_matrix_from_global_dpc_2D +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/slk_matrix_from_global_dpc_1Dp +!! NAME +!! slk_matrix_from_global_dpc_1Dp +!! +!! FUNCTION +!! Routine to fill a complex SCALAPACK matrix with respect to a global matrix. +!! target: double precision complex matrix in packed form. +!! +!! INPUTS +!! glob_pmat(n*(n+1)/2)=One-dimensional array containing the global matrix A packed columnwise in a linear array. +!! The j-th column of A is stored in the array glob_pmat as follows: +!! if uplo = "U", glob_pmat(i + (j-1)*j/2) = A(i,j) for 1<=i<=j; +!! if uplo = "L", glob_pmat(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n. +!! where n is the number of rows or columns in the global matrix. +!! uplo=String specifying whether only the upper or lower triangular part of the global matrix is used: +!! = "U": Upper triangular +!! = "L": Lower triangular +!! +!! SIDE EFFECTS +!! mat=The distributed matrix. +!! %buffer_cplx=Local buffer containg the value this node is dealing with. +!! +!! SOURCE + +subroutine slk_matrix_from_global_dpc_1Dp(mat,uplo,glob_pmat) + +!Arguments ------------------------------------ +!scalars + class(matrix_scalapack),intent(inout) :: mat + character(len=*),intent(in) :: uplo +!array + complex(dpc),intent(in) :: glob_pmat(:) + +!Local variables------------------------------- + integer :: ii,jj,iglob,jglob,ind,n + real(dp) :: szm + +!************************************************************************ + + ABI_CHECK(allocated(mat%buffer_cplx), "%buffer_cplx not allocated") + + szm = SIZE(glob_pmat) + n = NINT( (-1 + SQRT(one+8*szm) )*half ) + if (n*(n+1)/2 /= SIZE(glob_pmat)) then + ABI_ERROR("Buggy compiler") + end if + + select case (uplo(1:1)) + + case ("U", "u") + ! Only the upper triangle of the global matrix is used. + do jj=1,mat%sizeb_local(2) + do ii=1,mat%sizeb_local(1) + call mat%loc2glob(ii, jj, iglob, jglob) + + if (jglob>=iglob) then + ind = iglob + jglob*(jglob-1)/2 + mat%buffer_cplx(ii,jj) = glob_pmat(ind) + else + ind = jglob + iglob*(iglob-1)/2 + mat%buffer_cplx(ii,jj) = DCONJG( glob_pmat(ind) ) + end if + + end do + end do + + case ("L", "l") + ! Only the lower triangle of the global matrix is used. + do jj=1,mat%sizeb_local(2) + do ii=1,mat%sizeb_local(1) + call mat%loc2glob(ii, jj, iglob, jglob) + + if (jglob<=iglob) then + ind = iglob + (jglob-1)*(2*n-jglob)/2 + mat%buffer_cplx(ii,jj) = glob_pmat(ind) + else + ind = jglob + (iglob-1)*(2*n-iglob)/2 + mat%buffer_cplx(ii,jj) = DCONJG( glob_pmat(ind) ) + end if + + end do + end do + + case default + ABI_BUG(" Wrong uplo: "//TRIM(uplo)) + end select + +end subroutine slk_matrix_from_global_dpc_1Dp +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/slk_matrix_to_global_dpc_2D +!! NAME +!! slk_matrix_to_global_dpc_2D +!! +!! FUNCTION +!! Fill a global matrix with respect to a SCALAPACK matrix. +!! target: Two-dimensional double precision complex matrix. +!! +!! INPUTS +!! Slk_mat=The distributed matrix. +!! uplo=String specifying whether the upper or lower triangular part of the global matrix has to be filled: +!! = "U": Upper triangular +!! = "L": Lower triangular +!! = "A": Full matrix is filled (used for general complex matrices) +!! +!! SIDE EFFECTS +!! glob_mat=The global matrix where the entries owned by this processors have been overwritten. +!! Note that the remaing entries not treated by this node are not changed. +!! +!! SOURCE + +subroutine slk_matrix_to_global_dpc_2D(mat, uplo, glob_mat) + +!Arguments ------------------------------------ +!scalaras + class(matrix_scalapack),intent(in) :: mat + character(len=*),intent(in) :: uplo +!arrays + complex(dpc),intent(inout) :: glob_mat(:,:) + +!Local variables------------------------------- + integer :: ii,jj,iglob,jglob + +!************************************************************************ + + select case (uplo(1:1)) + + case ("A", "a") + ! Full global matrix has to be filled. + do jj=1,mat%sizeb_local(2) + do ii=1,mat%sizeb_local(1) + call mat%loc2glob(ii, jj, iglob, jglob) + glob_mat(iglob,jglob) = mat%buffer_cplx(ii,jj) + end do + end do + + case ("U", "u") + ! Only the upper triangle of the global matrix is filled. + do jj=1,mat%sizeb_local(2) + do ii=1,mat%sizeb_local(1) + call mat%loc2glob(ii, jj, iglob, jglob) + if (jglob>=iglob) glob_mat(iglob,jglob) = mat%buffer_cplx(ii,jj) + end do + end do + + case ("L", "l") + ! Only the lower triangle of the global matrix is filled. + do jj=1,mat%sizeb_local(2) + do ii=1,mat%sizeb_local(1) + call mat%loc2glob(ii, jj, iglob, jglob) + if (jglob<=iglob) glob_mat(iglob,jglob) = mat%buffer_cplx(ii,jj) + end do + end do + + case default + ABI_BUG(" Wrong uplo: "//TRIM(uplo)) + end select + +end subroutine slk_matrix_to_global_dpc_2D +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/my_locr +!! NAME +!! my_locr +!! +!! FUNCTION +!! Method of matrix_scalapack wrapping the scaLAPACK tool LOCr. +!! +!! OUTPUT +!! my_locr= For the meaning see NOTES below. +!! +!! NOTES +!! Let K be the number of rows or columns of a distributed matrix, and assume that its process grid has dimension p x q. +!! LOCr( K ) denotes the number of elements of K that a process would receive if K were distributed over the p +!! processes of its process column. +!! Similarly, LOCc( K ) denotes the number of elements of K that a process would receive if K were distributed over +!! the q processes of its process row. +!! The values of LOCr() and LOCc() may be determined via a call to the ScaLAPACK tool function, NUMROC: +!! LOCr( M ) = NUMROC( M, MB_A, MYROW, RSRC_A, NPROW ), +!! LOCc( N ) = NUMROC( N, NB_A, MYCOL, CSRC_A, NPCOL ). An upper bound for these quantities may be computed +!! by: +!! LOCr( M ) <= ceil( ceil(M/MB_A)/NPROW )*MB_A +!! LOCc( N ) <= ceil( ceil(N/NB_A)/NPCOL )*NB_A +!! +!! SOURCE + +integer function my_locr(mat) + +!Arguments ------------------------------------ + class(basemat_t),intent(in) :: mat + +!Local variables------------------------------- +#ifdef HAVE_LINALG_SCALAPACK + integer :: M, MB_A, MYROW, RSRC_A, NPROW + integer,external :: NUMROC + +! ************************************************************************* + + M = mat%descript%tab(M_ ) ! The number of rows in the global matrix. + MB_A = mat%descript%tab(MB_) ! The number of rows in a block. + MYROW = mat%processor%coords(1) ! The row index of my processor + RSRC_A = mat%descript%tab(RSRC_) ! The row of the processors at the beginning. + NPROW = mat%processor%grid%dims(1) ! The number of processors per row in the Scalapack grid. + + my_locr = NUMROC( M, MB_A, MYROW, RSRC_A, NPROW ) +#endif + +end function my_locr +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/my_locc +!! NAME +!! my_locc +!! +!! FUNCTION +!! Method of matrix_scalapack wrapping the scaLAPACK tool LOCc. +!! +!! OUTPUT +!! my_locc= For the meaning see NOTES below. +!! +!! NOTES +!! Let K be the number of rows or columns of a distributed matrix, and assume that its process grid has dimension p x q. +!! LOCr( K ) denotes the number of elements of K that a process would receive if K were distributed over the p +!! processes of its process column. +!! Similarly, LOCc( K ) denotes the number of elements of K that a process would receive if K were distributed over +!! the q processes of its process row. +!! The values of LOCr() and LOCc() may be determined via a call to the ScaLAPACK tool function, NUMROC: +!! LOCr( M ) = NUMROC( M, MB_A, MYROW, RSRC_A, NPROW ), +!! LOCc( N ) = NUMROC( N, NB_A, MYCOL, CSRC_A, NPCOL ). An upper bound for these quantities may be computed +!! by: +!! LOCr( M ) <= ceil( ceil(M/MB_A)/NPROW )*MB_A +!! LOCc( N ) <= ceil( ceil(N/NB_A)/NPCOL )*NB_A +!! +!! SOURCE + +integer function my_locc(mat) + +!Arguments ------------------------------------ + class(basemat_t),intent(in) :: mat + +#ifdef HAVE_LINALG_SCALAPACK +!Local variables------------------------------- + integer :: N, NB_A, MYCOL, CSRC_A, NPCOL + integer,external :: NUMROC + +! ************************************************************************* + + N = mat%descript%tab(N_ ) ! The number of columns in the global matrix. + NB_A = mat%descript%tab(NB_) ! The number of columns in a block. + MYCOL = mat%processor%coords(2) ! The column index of my processor + CSRC_A = mat%descript%tab(CSRC_) ! The column of the processors at the beginning. + NPCOL = mat%processor%grid%dims(2) ! The number of processors per column in the Scalapack grid. + + my_locc = NUMROC( N, NB_A, MYCOL, CSRC_A, NPCOL ) +#endif + +end function my_locc +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/slk_pgemm_dp +!! NAME +!! slk_pgemm_dp +!! +!! FUNCTION +!! Extended matrix * matrix product: C := alpha*A*B + beta*C +!! For a simple matrix vector product, one can simply pass alpha = cone and beta = czero +!! +!! INPUTS +!! matrix1= first ScaLAPACK matrix (matrix A) +!! matrix2= second ScaLAPACK matrix (matrix B) +!! alpha= scalar multiplicator for the A*B product +!! beta= scalar multiplicator for the C matrix +!! [ija, ijb, ijc]: (global). The row and column indices in the distributed matrix A/B/C +!! indicating the first row and the first column of the submatrix, respectively. Default [1, 1] +!! +!! OUTPUT +!! results= ScaLAPACK matrix coming out of the operation +!! +!! NOTES +!! The ESLL manual says that +!! "matrices matrix1 and matrix2 must have no common elements otherwise, results are unpredictable." +!! However the official scaLAPACK documentation does not report this (severe) limitation. +!! +!! SOURCE + +subroutine slk_pgemm_dp(transa, transb, matrix1, alpha, matrix2, beta, results, & + ija, ijb, ijc) ! optional + +!Arguments ------------------------------------ + character(len=1),intent(in) :: transa, transb + class(matrix_scalapack),intent(in) :: matrix1, matrix2 + class(matrix_scalapack),intent(inout) :: results + complex(dpc),intent(in) :: alpha, beta + integer,optional,intent(in) :: ija(2), ijb(2), ijc(2) + +!Local variables------------------------------- + integer :: mm, nn, kk, ija__(2), ijb__(2), ijc__(2) + +!************************************************************************ + + ija__ = [1, 1]; if (present(ija)) ija__ = ija + ijb__ = [1, 1]; if (present(ijb)) ijb__ = ijb + ijc__ = [1, 1]; if (present(ijc)) ijc__ = ijc + + mm = matrix1%sizeb_global(1) + nn = matrix2%sizeb_global(2) + kk = matrix1%sizeb_global(2) + + if (toupper(transa) /= 'N') then + mm = matrix1%sizeb_global(2) + kk = matrix1%sizeb_global(1) + end if + if (toupper(transb) /= 'N') nn = matrix2%sizeb_global(1) + +#ifdef HAVE_LINALG_SCALAPACK + ! pzgemm(transa, transb, m, n, k, alpha, a, ia, ja, desca, b, ib, jb, descb, beta, c, ic, jc, descc) + if (matrix1%istwf_k /= 2) then + call PZGEMM(transa, transb, mm, nn, kk, alpha, & + matrix1%buffer_cplx, ija__(1), ija__(2), matrix1%descript%tab, & + matrix2%buffer_cplx, ijb__(1), ijb__(2), matrix2%descript%tab, & + beta, results%buffer_cplx, ijc__(1), ijc__(2), results%descript%tab) + else + call PDGEMM(transa, transb, mm, nn, kk, real(alpha, kind=dp), & + matrix1%buffer_cplx, ija__(1), ija__(2), matrix1%descript%tab, & + matrix2%buffer_cplx, ijb__(1), ijb__(2), matrix2%descript%tab, & + real(beta, kind=dp), results%buffer_cplx, ijc__(1), ijc__(2), results%descript%tab) + end if +#endif + +end subroutine slk_pgemm_dp +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/slk_pgemm_sp +!! NAME +!! slk_pgemm_sp +!! +!! FUNCTION +!! Extended matrix * matrix product: C := alpha*A*B + beta*C +!! For a simple matrix vector product, one can simply pass alpha = cone and beta = czero +!! +!! INPUTS +!! matrix1= first ScaLAPACK matrix (matrix A) +!! matrix2= second ScaLAPACK matrix (matrix B) +!! alpha= scalar multiplicator for the A*B product +!! beta= scalar multiplicator for the C matrix +!! [ija, ijb, ijc]: (global). The row and column indices in the distributed matrix A/B/C +!! indicating the first row and the first column of the submatrix, respectively. Default [1, 1] +!! +!! OUTPUT +!! results= ScaLAPACK matrix coming out of the operation +!! +!! NOTES +!! The ESLL manual says that +!! "matrices matrix1 and matrix2 must have no common elements otherwise, results are unpredictable." +!! However the official scaLAPACK documentation does not report this (severe) limitation. +!! +!! SOURCE + +subroutine slk_pgemm_sp(transa, transb, matrix1, alpha, matrix2, beta, results, & + ija, ijb, ijc) ! optional + +!Arguments ------------------------------------ + character(len=1),intent(in) :: transa, transb + class(slkmat_sp_t),intent(in) :: matrix1, matrix2 + class(slkmat_sp_t),intent(inout) :: results + complex(sp),intent(in) :: alpha, beta + integer,optional,intent(in) :: ija(2), ijb(2), ijc(2) + +!Local variables------------------------------- + integer :: mm, nn, kk, ija__(2), ijb__(2), ijc__(2) + +!************************************************************************ + + ija__ = [1, 1]; if (present(ija)) ija__ = ija + ijb__ = [1, 1]; if (present(ijb)) ijb__ = ijb + ijc__ = [1, 1]; if (present(ijc)) ijc__ = ijc + + mm = matrix1%sizeb_global(1) + nn = matrix2%sizeb_global(2) + kk = matrix1%sizeb_global(2) + + if (toupper(transa) /= 'N') then + mm = matrix1%sizeb_global(2) + kk = matrix1%sizeb_global(1) + end if + if (toupper(transb) /= 'N') nn = matrix2%sizeb_global(1) + +#ifdef HAVE_LINALG_SCALAPACK + ! pzgemm(transa, transb, m, n, k, alpha, a, ia, ja, desca, b, ib, jb, descb, beta, c, ic, jc, descc) + if (matrix1%istwf_k /= 2) then + call PCGEMM(transa, transb, mm, nn, kk, alpha, & + matrix1%buffer_cplx, ija__(1), ija__(2), matrix1%descript%tab, & + matrix2%buffer_cplx, ijb__(1), ijb__(2), matrix2%descript%tab, & + beta, results%buffer_cplx, ijc__(1), ijc__(2), results%descript%tab) + else + call PSGEMM(transa, transb, mm, nn, kk, real(alpha, kind=sp), & + matrix1%buffer_cplx, ija__(1), ija__(2), matrix1%descript%tab, & + matrix2%buffer_cplx, ijb__(1), ijb__(2), matrix2%descript%tab, & + real(beta, kind=sp), results%buffer_cplx, ijc__(1), ijc__(2), results%descript%tab) + end if +#endif + +end subroutine slk_pgemm_sp +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/compute_eigen_problem +!! NAME +!! compute_eigen_problem +!! +!! FUNCTION +!! Calculation of eigenvalues and eigenvectors: A * X = lambda * X, complex and real cases. +!! +!! INPUTS +!! processor= descriptor of a processor +!! matrix= the matrix to process +!! comm= MPI communicator +!! istwf_k= 2 if we have a real matrix else complex. +!! [nev]= Number of eigenvalues needed. Default: full set +!! [use_gpu_elpa]= Flag to activate the use of GPU (ELPA only) +!! +!! OUTPUT +!! results= ScaLAPACK matrix coming out of the operation (global dimensions must be equal to matrix +!! even if only a part of the eigenvectors is needed. +!! eigen= eigenvalues of the matrix dimensioned as the global size of the square matrix +!! even if only a part of the eigenvalues is needed. +!! +!! SOURCE + +subroutine compute_eigen_problem(processor, matrix, results, eigen, comm, istwf_k, & +& nev, use_gpu_elpa) ! Optional arguments + +#ifdef HAVE_LINALG_ELPA + !Arguments ------------------------------------ + class(processor_scalapack),intent(in) :: processor + class(matrix_scalapack),intent(inout) :: matrix + class(matrix_scalapack),intent(inout) :: results + DOUBLE PRECISION,intent(inout) :: eigen(:) + integer,intent(in) :: comm,istwf_k + integer,optional,intent(in) :: nev + integer,optional,intent(in) :: use_gpu_elpa + + !Local variables ------------------------------ + type(elpa_hdl_t) :: elpa_hdl + integer :: nev__,use_gpu_elpa_ + +!************************************************************************ + + nev__ = matrix%sizeb_global(1); if (present(nev)) nev__ = nev + use_gpu_elpa_=0 +#ifdef HAVE_LINALG_ELPA + if (present(use_gpu_elpa)) use_gpu_elpa_=use_gpu_elpa +#endif + + call elpa_func_allocate(elpa_hdl,gpu=use_gpu_elpa_) + call elpa_func_set_matrix(elpa_hdl,matrix%sizeb_global(1),matrix%sizeb_blocs(1),nev__,& +& matrix%sizeb_local(1),matrix%sizeb_local(2)) + call elpa_func_get_communicators(elpa_hdl,processor%comm,processor%coords(1),processor%coords(2)) + + if (istwf_k/=2) then + call elpa_func_solve_evp_1stage(elpa_hdl,matrix%buffer_cplx,results%buffer_cplx,eigen,nev__) + else + call elpa_func_solve_evp_1stage(elpa_hdl,matrix%buffer_real,results%buffer_real,eigen,nev__) + end if + + call elpa_func_deallocate(elpa_hdl) + +#else + !Arguments ------------------------------------ + class(processor_scalapack),intent(in) :: processor + class(matrix_scalapack),intent(in) :: matrix + class(matrix_scalapack),intent(inout) :: results + DOUBLE PRECISION,intent(inout) :: eigen(:) + integer,intent(in) :: comm,istwf_k + integer,optional,intent(in) :: nev + integer,optional,intent(in) :: use_gpu_elpa + +#ifdef HAVE_LINALG_SCALAPACK + !Local variables------------------------------- + integer :: LRWORK,LIWORK,LCWORK,INFO + character(len=500) :: msg + + integer , dimension(1) :: IWORK_tmp + DOUBLE PRECISION, dimension(1) :: RWORK_tmp + complex(dpc) , dimension(1) :: CWORK_tmp + + integer , allocatable :: IWORK(:) + DOUBLE PRECISION, allocatable :: RWORK(:) + complex(dpc) , allocatable :: CWORK(:) + + integer, allocatable :: ICLUSTR(:) + integer, allocatable :: IFAIL(:) + DOUBLE PRECISION, allocatable :: GAP(:) + + DOUBLE PRECISION :: ABSTOL,ORFAC + integer, parameter :: IZERO=0 + + integer :: M,NZ,ierr,TWORK_tmp(3),TWORK(3) ! IA,JA,IZ,JZ, + integer :: nev__, il, iu + character(len=1) :: range + + DOUBLE PRECISION, external :: PDLAMCH + +! ************************************************************************* + + ABI_UNUSED(use_gpu_elpa) ! No GPU implementation is using scaLAPACK + nev__ = matrix%sizeb_global(1); range = "A"; il = 0; iu = 0 + if (present(nev)) then + nev__ = nev; range = "I"; il = 1; iu = nev + end if + + ! Initialisation + INFO = 0 + ABSTOL = zero + ORFAC = -1.D+0 + + ! Allocation of the variables for the results of the calculations + ABI_MALLOC(IFAIL,(matrix%sizeb_global(2))) + ABI_MALLOC(ICLUSTR,(2*processor%grid%dims(1)*processor%grid%dims(2))) + ABI_MALLOC(GAP,(processor%grid%dims(1)*processor%grid%dims(2))) + + ! Get the size of the work arrays + if (istwf_k/=2) then + call PZHEEVX('V', range, 'U',& +& matrix%sizeb_global(2),& +& matrix%buffer_cplx,1,1,matrix%descript%tab, & +& ZERO,ZERO,il,iu,ABSTOL,& +& m,nz,eigen,ORFAC, & +& results%buffer_cplx,1,1,results%descript%tab, & +& CWORK_tmp,-1,RWORK_tmp,-1,IWORK_tmp,-1,& +& IFAIL,ICLUSTR,GAP,INFO) + else + call PDSYEVX('V', range, 'U',& +& matrix%sizeb_global(2),& +& matrix%buffer_real,1,1,matrix%descript%tab, & +& ZERO,ZERO,il,iu,ABSTOL,& +& m,nz,eigen,ORFAC, & +& results%buffer_real,1,1,results%descript%tab, & +& RWORK_tmp,-1,IWORK_tmp,-1,& +& IFAIL,ICLUSTR,GAP,INFO) + end if + + if (INFO/=0) then + write(msg,'(A,I6)') "Problem to compute workspace to use ScaLAPACK, INFO=",INFO + ABI_ERROR(msg) + endif + + TWORK_tmp(1) = IWORK_tmp(1) + TWORK_tmp(2) = INT(RWORK_tmp(1)) + TWORK_tmp(3) = INT(real(CWORK_tmp(1))) + + ! Get the maximum of the size of the work arrays processor%comm + call MPI_ALLREDUCE(TWORK_tmp,TWORK,3,MPI_integer,MPI_MAX,comm,ierr) + + LIWORK = TWORK(1) + LRWORK = TWORK(2) + matrix%sizeb_global(2) *(matrix%sizeb_global(2)-1) + LCWORK = TWORK(3) + + ! Allocation of the work arrays + if (LIWORK>0) then + ABI_MALLOC(IWORK,(LIWORK)) + IWORK(:) = 0 + else + ABI_MALLOC(IWORK,(1)) + end if + if (LRWORK>0) then + ABI_MALLOC(RWORK,(LRWORK)) + RWORK(:) = 0._dp + else + ABI_MALLOC(RWORK,(1)) + end if + if (LCWORK>0) then + ABI_MALLOC(CWORK,(LCWORK)) + CWORK(:) = (0._dp,0._dp) + else + ABI_MALLOC(CWORK,(1)) + end if + + ! prototype + !call pzheevx(jobz, range, uplo, n, a, ia, ja, desca, vl, vu, il, iu, abstol, m, nz, w, + ! orfac, z, iz, jz, descz, work, lwork, rwork, lrwork, iwork, liwork, ifail, iclustr, gap, info) + + ! Call the calculation routine + if (istwf_k/=2) then + ! write(std_out,*) 'I am using PZHEEVX' + call PZHEEVX('V', range, 'U',& + matrix%sizeb_global(2),& + matrix%buffer_cplx,1,1,matrix%descript%tab, & + ZERO,ZERO,il,iu,ABSTOL,& + m,nz,eigen,ORFAC, & + results%buffer_cplx,1,1,results%descript%tab, & + CWORK,LCWORK,RWORK,LRWORK,IWORK,LIWORK,& + IFAIL,ICLUSTR,GAP,INFO) + else + ! write(std_out,*) ' I am using PDSYEVX' + call PDSYEVX('V', range, 'U',& + matrix%sizeb_global(2),& + matrix%buffer_real,1,1,matrix%descript%tab, & + ZERO,ZERO,il,iu,ABSTOL,& + m,nz,eigen,ORFAC, & + results%buffer_real,1,1,results%descript%tab, & + RWORK,LRWORK,IWORK,LIWORK,& + IFAIL,ICLUSTR,GAP,INFO) + endif + + ! MG: TODO: Recheck the computation of the workspace as I got INFO 2 with a 5x5x5 si supercell. + if (INFO/=0) then + write(msg,'(A,I0)') "Problem to compute eigenvalues and eigenvectors with ScaLAPACK, INFO=",INFO + ABI_ERROR(msg) + endif + + ABI_FREE(IFAIl) + ABI_FREE(ICLUSTR) + ABI_FREE(GAP) + + ABI_SFREE(IWORK) + ABI_SFREE(RWORK) + ABI_SFREE(CWORK) +#endif +#endif + return + +end subroutine compute_eigen_problem +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/solve_gevp_complex +!! NAME +!! solve_gevp_complex +!! +!! FUNCTION +!! Calculation of eigenvalues and eigenvectors: A * X = lambda * B * X +!! complex and real cases. +!! +!! INPUTS +!! processor= descriptor of a processor +!! matrix1= first ScaLAPACK matrix (matrix A) +!! matrix2= second ScaLAPACK matrix (matrix B) +!! comm= MPI communicator +!! istwf_k= 2 if we have a real matrix else complex. +!! [use_gpu_elpa]= Flag to activate the use of GPU (ELPA only) +!! +!! SIDE EFFECTS +!! results= ScaLAPACK matrix coming out of the operation +!! eigen= eigenvalues of the matrix +!! +!! SOURCE + +#ifdef HAVE_LINALG_ELPA + +subroutine solve_gevp_complex(na,nev,na_rows,na_cols,nblk,a,b,ev,z,tmp1,tmp2, & +& my_prow,my_pcol,np_rows,np_cols,sc_desc,comm,& +& use_gpu_elpa) ! Optional parameter + + !-Arguments + integer,intent(in) :: na + integer,intent(in) :: nev + integer,intent(in) :: na_rows,na_cols + integer,intent(in) :: nblk + integer,intent(in) :: my_pcol,my_prow + integer,intent(in) :: np_cols,np_rows + integer,intent(in) :: sc_desc(9) + integer,intent(in) :: comm + integer,optional,intent(in) :: use_gpu_elpa + real*8 :: ev(na) + complex*16 :: a(na_rows,na_cols),b(na_rows,na_cols),z(na_rows,na_cols) + complex*16 :: tmp1(na_rows,na_cols),tmp2(na_rows,na_cols) + !-Local variables + integer :: i, n_col, n_row, use_gpu_elpa_ + integer,external :: indxl2g,numroc + complex*16, parameter :: CZERO = (0.d0,0.d0), CONE = (1.d0,0.d0) + type(elpa_hdl_t) :: elpa_hdl + +! ************************************************************************* + + use_gpu_elpa_=0 +#ifdef HAVE_LINALG_ELPA + if (present(use_gpu_elpa)) use_gpu_elpa_=use_gpu_elpa +#endif + +! Allocate ELPA handle + call elpa_func_allocate(elpa_hdl,blacs_ctx=sc_desc(CTXT_),gpu=use_gpu_elpa_) + call elpa_func_set_matrix(elpa_hdl,na,nblk,nev,na_rows,na_cols) + call elpa_func_get_communicators(elpa_hdl,comm,my_prow,my_pcol) + + call elpa_func_solve_gevp_2stage(elpa_hdl,a,b,z,ev,nev) + + call elpa_func_deallocate(elpa_hdl) + +end subroutine solve_gevp_complex + +!---------------------------------------------------------------------- + +subroutine solve_gevp_real(na,nev,na_rows,na_cols,nblk,a,b,ev,z,tmp1,tmp2, & +& my_prow,my_pcol,np_rows,np_cols,sc_desc,comm, & +& use_gpu_elpa) ! Optional argument + + !-Arguments + integer,intent(in) :: na + integer,intent(in) :: nev + integer,intent(in) :: na_rows,na_cols + integer,intent(in) :: nblk + integer,intent(in) :: my_pcol,my_prow + integer,intent(in) :: np_cols,np_rows + integer,intent(in) :: sc_desc(9) + integer,intent(in) :: comm + integer,optional,intent(in) :: use_gpu_elpa + real*8 :: ev(na) + real*8 :: a(na_rows,na_cols),b(na_rows,na_cols),z(na_rows,na_cols) + real*8::tmp1(na_rows,na_cols),tmp2(na_rows,na_cols) + !-Local variables + integer :: i, n_col, n_row, use_gpu_elpa_ + integer,external :: indxl2g,numroc + type(elpa_hdl_t) :: elpa_hdl + +! ************************************************************************* + + use_gpu_elpa_=0 +#ifdef HAVE_LINALG_ELPA + if (present(use_gpu_elpa)) use_gpu_elpa_=use_gpu_elpa +#endif + +! Allocate ELPA handle + call elpa_func_allocate(elpa_hdl,blacs_ctx=sc_desc(CTXT_),gpu=use_gpu_elpa_) + call elpa_func_set_matrix(elpa_hdl,na,nblk,nev,na_rows,na_cols) + call elpa_func_get_communicators(elpa_hdl,comm,my_prow,my_pcol) + + !FIXME Need to figure out why generalized_eigenvectors doesn't work in this real case + ! while it is fine with complex case + if(.false.) then + call elpa_func_solve_gevp_2stage(elpa_hdl,a,b,tmp1,ev,nev) + else + ! 1. Calculate Cholesky factorization of Matrix B = U**T * U + ! and invert triangular matrix U + call elpa_func_cholesky(elpa_hdl,b) + call elpa_func_invert_triangular(elpa_hdl,b) + ! 2. Calculate U**-T * A * U**-1 + ! 2a. tmp1 = U**-T * A + call elpa_func_hermitian_multiply(elpa_hdl,'U','L',na,b,a,na_rows,na_cols,tmp1,na_rows,na_cols) + ! 2b. tmp2 = tmp1**T + call pdtran(na,na,1.d0,tmp1,1,1,sc_desc,0.d0,tmp2,1,1,sc_desc) + ! 2c. A = U**-T * tmp2 ( = U**-T * Aorig * U**-1 ) + call elpa_func_hermitian_multiply(elpa_hdl,'U','U',na,b,tmp2,na_rows,na_cols,a,na_rows,na_cols) + ! A is only set in the upper half, solve_evp_real needs a full matrix + ! Set lower half from upper half + call pdtran(na,na,1.d0,a,1,1,sc_desc,0.d0,tmp1,1,1,sc_desc) + do i=1,na_cols + ! Get global column corresponding to i and number of local rows up to + ! and including the diagonal, these are unchanged in A + n_col = indxl2g(i, nblk, my_pcol, 0, np_cols) + n_row = numroc (n_col, nblk, my_prow, 0, np_rows) + a(n_row+1:na_rows,i) = tmp1(n_row+1:na_rows,i) + enddo + ! 3. Calculate eigenvalues/eigenvectors of U**-T * A * U**-1 + ! Eigenvectors go to tmp1 + call elpa_func_solve_evp_1stage(elpa_hdl,a,tmp1,ev,nev) + ! 4. Backtransform eigenvectors: Z = U**-1 * tmp1 + ! hermitian_multiply needs the transpose of U**-1, thus tmp2 = (U**-1)**T + call pdtran(na,na,1.d0,b,1,1,sc_desc,0.d0,tmp2,1,1,sc_desc) + call elpa_func_hermitian_multiply(elpa_hdl,'L','N',nev,tmp2,tmp1,na_rows,na_cols,z,na_rows,na_cols) + end if + + call elpa_func_deallocate(elpa_hdl) + + end subroutine solve_gevp_real +!!*** +#endif + +!---------------------------------------------------------------------- + +!!****f* m_slk/compute_generalized_eigen_problem +!! NAME +!! compute_generalized_eigen_problem +!! +!! FUNCTION +!! Calculation of eigenvalues and eigenvectors of the generalized eigenvalue problem: A * X = lambda * B X +!! complex and real cases. +!! +!! INPUTS +!! processor= descriptor of a processor +!! matrix1= A matrix +!! matrix2= B matrix +!! comm= MPI communicator +!! istwf_k= 2 if we have a real matrix else complex. +!! [nev]= Number of eigenvalues needed. Default: full set +!! [use_gpu_elpa]= Flag to activate the use of GPU (ELPA only) +!! +!! OUTPUT +!! results= ScaLAPACK matrix coming out of the operation (global dimensions must be equal to matrix +!! even if only a part of the eigenvectors is needed. +!! eigen= eigenvalues of the matrix dimensioned as the global size of the square matrix +!! even if only a part of the eigenvalues is needed. +!! +!! SOURCE + +subroutine compute_generalized_eigen_problem(processor,matrix1,matrix2,results,eigen,comm,istwf_k,& +& nev,use_gpu_elpa) ! Optional arguments + +#ifdef HAVE_LINALG_ELPA +!Arguments ------------------------------------ + class(processor_scalapack),intent(in) :: processor + class(matrix_scalapack),intent(in) :: matrix1,matrix2 + class(matrix_scalapack),intent(inout) :: results + DOUBLE PRECISION,intent(inout) :: eigen(:) + integer,intent(in) :: comm,istwf_k + integer,optional,intent(in) :: nev + integer,optional,intent(in) :: use_gpu_elpa +!Local + type(matrix_scalapack) :: tmp1, tmp2 + integer :: i,n_col, n_row, nev__,use_gpu_elpa__ + integer,external :: indxl2g,numroc + + nev__ = matrix1%sizeb_global(2); if (present(nev)) nev__ = nev + use_gpu_elpa__ = 0 +#ifdef HAVE_LINALG_ELPA + if (present(use_gpu_elpa)) use_gpu_elpa__ = use_gpu_elpa +#endif + + call tmp1%init(matrix1%sizeb_global(1),matrix1%sizeb_global(2),processor,istwf_k) + call tmp2%init(matrix1%sizeb_global(1),matrix1%sizeb_global(2),processor,istwf_k) + + if (istwf_k/=2) then + call solve_gevp_complex(matrix1%sizeb_global(1), nev__, & +& matrix1%sizeb_local(1),matrix1%sizeb_local(2),matrix1%sizeb_blocs(1), & +& matrix1%buffer_cplx,matrix2%buffer_cplx,eigen,results%buffer_cplx, & +& tmp1%buffer_cplx,tmp2%buffer_cplx, & +& processor%coords(1),processor%coords(2), & +& processor%grid%dims(1),processor%grid%dims(2), & +& matrix1%descript%tab,processor%comm,use_gpu_elpa=use_gpu_elpa__) + else + call solve_gevp_real(matrix1%sizeb_global(1), nev__, & +& matrix1%sizeb_local(1),matrix1%sizeb_local(2),matrix1%sizeb_blocs(1), & +& matrix1%buffer_real,matrix2%buffer_real,eigen,results%buffer_real, & +& tmp1%buffer_real,tmp2%buffer_real, & +& processor%coords(1),processor%coords(2), & +& processor%grid%dims(1),processor%grid%dims(2), & +& matrix1%descript%tab,processor%comm,use_gpu_elpa=use_gpu_elpa__) + end if + call tmp1%free() + call tmp2%free() + +#else +!Arguments ------------------------------------ + class(processor_scalapack),intent(in) :: processor + class(matrix_scalapack),intent(in) :: matrix1,matrix2 + class(matrix_scalapack),intent(inout) :: results + DOUBLE PRECISION,intent(inout) :: eigen(:) + integer,intent(in) :: comm,istwf_k + integer,optional,intent(in) :: nev + integer,optional,intent(in) :: use_gpu_elpa + +#ifdef HAVE_LINALG_SCALAPACK +!Local variables------------------------------- + integer :: LRWORK,LIWORK,LCWORK,INFO + character(len=500) :: msg + integer , dimension(1) :: IWORK_tmp + DOUBLE PRECISION, dimension(1) :: RWORK_tmp + complex(dpc) , dimension(1) :: CWORK_tmp + + integer , allocatable :: IWORK(:) + DOUBLE PRECISION, allocatable :: RWORK(:) + complex(dpc) , allocatable :: CWORK(:) + integer, allocatable :: ICLUSTR(:) + integer, allocatable :: IFAIL(:) + DOUBLE PRECISION, allocatable :: GAP(:) + DOUBLE PRECISION :: ABSTOL,ORFAC + integer , parameter :: IZERO=0 + integer :: M,NZ,ierr,TWORK_tmp(3),TWORK(3) ! IA,JA,IZ,JZ, + character(len=1) :: range + integer :: nev__, il, iu + DOUBLE PRECISION, external :: PDLAMCH + +! ************************************************************************* + + ABI_UNUSED(use_gpu_elpa) ! No GPU implementation is using scaLAPACK + nev__ = matrix1%sizeb_global(2); range = "A"; il = 0; iu = 0 + if (present(nev)) then + nev__ = nev; range = "I"; il = 1; iu = nev + end if + + ! Initialisation + INFO = 0 + ABSTOL = zero + ORFAC = -1.D+0 + + ! Allocate the arrays for the results of the calculation + ABI_MALLOC(IFAIL ,(matrix1%sizeb_global(2))) + ABI_MALLOC(ICLUSTR,(2*processor%grid%dims(1)*processor%grid%dims(2))) + ABI_MALLOC(GAP ,( processor%grid%dims(1)*processor%grid%dims(2))) + + ! Get the size of the work arrays + if (istwf_k /= 2) then + call PZHEGVX(1, 'V', range, 'U',& +& matrix1%sizeb_global(2),& +& matrix1%buffer_cplx,1,1,matrix1%descript%tab, & +& matrix2%buffer_cplx,1,1,matrix2%descript%tab, & +& ZERO,ZERO,il,iu,ABSTOL,& +& m,nz,eigen,ORFAC, & +& results%buffer_cplx,1,1,results%descript%tab, & +& CWORK_tmp,-1,RWORK_tmp,-1,IWORK_tmp,-1,& +& IFAIL,ICLUSTR,GAP,INFO) + else + call PDSYGVX(1,'V',range,'U',& +& matrix1%sizeb_global(2),& +& matrix1%buffer_real,1,1,matrix1%descript%tab, & +& matrix2%buffer_real,1,1,matrix2%descript%tab, & +& ZERO,ZERO,il,iu,ABSTOL,& +& m,nz,eigen,ORFAC, & +& results%buffer_real,1,1,results%descript%tab, & +& RWORK_tmp,-1,IWORK_tmp,-1,& +& IFAIL,ICLUSTR,GAP,INFO) + endif + + if (INFO/=0) then + write(msg,'(A,I6)') "Problem to compute workspace to use ScaLAPACK, INFO=",INFO + ABI_ERROR(msg) + endif + + TWORK_tmp(1) = IWORK_tmp(1) + TWORK_tmp(2) = INT(RWORK_tmp(1)) + matrix1%sizeb_global(2) *(matrix1%sizeb_global(2)-1) + TWORK_tmp(3) = INT(real(CWORK_tmp(1))) + + ! Get the maximum of sizes of the work arrays processor%comm + call MPI_ALLREDUCE(TWORK_tmp,TWORK,3,MPI_integer,MPI_MAX,comm,ierr) + + LIWORK = TWORK(1) + LRWORK = TWORK(2) + LCWORK = TWORK(3) + + ! Allocate the work arrays + if (LIWORK>0) then + ABI_MALLOC(IWORK,(LIWORK)) + IWORK(:) = 0 + else + ABI_MALLOC(IWORK,(1)) + end if + if (LRWORK>0) then + ABI_MALLOC(RWORK,(LRWORK)) + RWORK(:) = 0._dp + else + ABI_MALLOC(RWORK,(1)) + end if + if (LCWORK>0) then + ABI_MALLOC(CWORK,(LCWORK)) + CWORK(:) = (0._dp,0._dp) + else + ABI_MALLOC(CWORK,(1)) + end if + + ! Call the calculation routine + if (istwf_k/=2) then + ! write(std_out,*) 'I am using PZHEGVX' + call PZHEGVX(1,'V',range,'U',& +& matrix1%sizeb_global(2),& +& matrix1%buffer_cplx,1,1,matrix1%descript%tab, & +& matrix2%buffer_cplx,1,1,matrix2%descript%tab, & +& ZERO,ZERO,il,iu,ABSTOL,& +& m,nz,eigen,ORFAC, & +& results%buffer_cplx,1,1,results%descript%tab, & +& CWORK,LCWORK,RWORK,LRWORK,IWORK,LIWORK,& +& IFAIL,ICLUSTR,GAP,INFO) + else + ! write(std_out,*) 'I am using PDSYGVX' + call PDSYGVX(1,'V',range,'U',& +& matrix1%sizeb_global(2),& +& matrix1%buffer_real,1,1,matrix1%descript%tab, & +& matrix2%buffer_real,1,1,matrix2%descript%tab, & +& ZERO,ZERO,il,iu,ABSTOL,& +& m,nz,eigen,ORFAC, & +& results%buffer_real,1,1,results%descript%tab, & +& RWORK,LRWORK,IWORK,LIWORK,& +& IFAIL,ICLUSTR,GAP,INFO) + endif + + if (INFO/=0) then + write(msg,'(A,I6)') "Problem to compute eigen problem with ScaLAPACK, INFO=",INFO + ABI_ERROR(msg) + endif + + ABI_FREE(IFAIl) + ABI_FREE(ICLUSTR) + ABI_FREE(GAP) + ABI_SFREE(IWORK) + ABI_SFREE(RWORK) + ABI_SFREE(CWORK) +#endif +#endif + return + +end subroutine compute_generalized_eigen_problem +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/compute_eigen1 +!! NAME +!! compute_eigen1 +!! +!! FUNCTION +!! Calculation of eigenvalues and eigenvectors. complex and real cases. +!! +!! INPUTS +!! comm= MPI communicator +!! cplex=1 if matrix is real, 2 if complex +!! nbli_global number of lines +!! nbco_global number of columns +!! matrix= the matrix to process +!! vector= eigenvalues of the matrix +!! istwf_k= 2 if we have a real matrix else complex. +!! [use_gpu_elpa]= Flag to activate the use of GPU (ELPA only) +!! +!! OUTPUT +!! vector +!! +!! SIDE EFFECTS +!! results= ScaLAPACK matrix coming out of the operation +!! eigen= eigenvalues of the matrix +!! +!! SOURCE + +subroutine compute_eigen1(comm,processor,cplex,nbli_global,nbco_global,matrix,vector,istwf_k,& +& use_gpu_elpa) ! Optional argument + +!Arguments ------------------------------------ +!scalaras + integer,intent(in) :: comm + integer,intent(in) :: cplex,nbli_global,nbco_global + integer,intent(in) :: istwf_k + class(processor_scalapack),intent(in) :: processor + integer,intent(in),optional :: use_gpu_elpa +!arrays + real(dp),intent(inout) :: matrix(cplex*nbli_global,nbco_global) + real(dp),intent(inout) :: vector(:) + +!Local variables------------------------------- +#ifdef HAVE_LINALG_ELPA + integer :: i,j +#endif + integer :: ierr,use_gpu_elpa_ + type(matrix_scalapack) :: sca_matrix1 + type(matrix_scalapack) :: sca_matrix2 + real(dp),allocatable :: r_tmp_evec(:,:) + complex(dpc),allocatable :: z_tmp_evec(:,:) + +! ************************************************************************* + + use_gpu_elpa_=0 +#ifdef HAVE_LINALG_ELPA + if (present(use_gpu_elpa)) use_gpu_elpa_=use_gpu_elpa +#endif + + ! ================================ + ! INITIALISATION SCALAPACK MATRIX + ! ================================ + call sca_matrix1%init(nbli_global,nbco_global,processor,istwf_k) + call sca_matrix2%init(nbli_global,nbco_global,processor,istwf_k) + + ! ============================== + ! FILLING SCALAPACK MATRIX + ! ============================== + if ( istwf_k /= 2 ) then + ABI_CHECK_IEQ(cplex, 2, "cplex != 2") + ABI_MALLOC(z_tmp_evec,(nbli_global,nbco_global)) + z_tmp_evec=cmplx(0._DP,0._DP) +#ifdef HAVE_LINALG_ELPA + ! The full matrix must be set (not only one half like in scalapack). + do j=1,nbco_global + do i=j+1,nbli_global + matrix(2*(i-1)+1,j) = matrix(2*(j-1)+1,i) + matrix(2*(i-1)+2,j) = -matrix(2*(j-1)+2,i) + end do + end do +#endif + call matrix_from_complexmatrix(sca_matrix1,matrix,istwf_k) + else + ABI_CHECK_IEQ(cplex, 1, "cplex != 2") + ABI_MALLOC(r_tmp_evec,(nbli_global,nbco_global)) + r_tmp_evec(:,:)=0._DP +#ifdef HAVE_LINALG_ELPA + ! The full matrix must be set (not only one half like in scalapack). + do j=1,nbco_global + do i=j+1,nbli_global + matrix(i,j) = matrix(j,i) + end do + end do +#endif + call matrix_from_realmatrix(sca_matrix1,matrix,istwf_k) + endif + + ! ================================ + ! COMPUTE EIGEN VALUES AND VECTORS : A * X = lambda * X + ! ================================ + call compute_eigen_problem(processor,sca_matrix1, sca_matrix2,vector, comm,istwf_k, & +& use_gpu_elpa=use_gpu_elpa_) + + ! ============================== + ! CONCATENATE EIGEN VECTORS + ! ============================== +#ifdef HAVE_MPI + if (istwf_k /= 2) then + call matrix_to_complexmatrix(sca_matrix2,z_tmp_evec,istwf_k) + call MPI_ALLREDUCE(z_tmp_evec, matrix, nbli_global*nbco_global, MPI_DOUBLE_complex, MPI_SUM,comm,ierr) + else + call matrix_to_realmatrix(sca_matrix2,r_tmp_evec,istwf_k) + call MPI_ALLREDUCE(r_tmp_evec, matrix, nbli_global*nbco_global, MPI_DOUBLE_PRECISION, MPI_SUM,comm,ierr) + endif +#endif + + ! ==================================== + ! DESTRUCTION SCALAPACK AND TMP MATRICES + ! ==================================== + call sca_matrix1%free() + call sca_matrix2%free() + + ABI_SFREE(z_tmp_evec) + ABI_SFREE(r_tmp_evec) + +#ifndef HAVE_LINALG_ELPA + ABI_UNUSED(use_gpu_elpa) +#endif + +end subroutine compute_eigen1 +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/compute_eigen2 +!! NAME +!! compute_eigen2 +!! +!! FUNCTION +!! Calculation of eigenvalues and eigenvectors: A * X = lambda * B * X +!! complex and real cases. +!! +!! INPUTS +!! comm= MPI communicator +!! cplex=1 if matrix is real, 2 if complex +!! nbli_global number of lines +!! nbco_global number of columns +!! matrix1= first ScaLAPACK matrix (matrix A) +!! matrix2= second ScaLAPACK matrix (matrix B) +!! vector= +!! istwf_k= 2 if we have a real matrix else complex. +!! [use_gpu_elpa]= Flag to activate the use of GPU (ELPA only) +!! +!! SIDE EFFECTS +!! results= ScaLAPACK matrix coming out of the operation +!! eigen= eigenvalues of the matrix +!! +!! SOURCE + +subroutine compute_eigen2(comm,processor,cplex,nbli_global,nbco_global,matrix1,matrix2,vector,istwf_k, & +& use_gpu_elpa) ! Optional argument + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: cplex,nbli_global,nbco_global + integer,intent(in) :: comm + integer,intent(in) :: istwf_k + class(processor_scalapack),intent(in) :: processor + integer,optional,intent(in) :: use_gpu_elpa +!arrays + real(dp),intent(inout) :: matrix1(cplex*nbli_global,nbco_global) + real(dp),intent(inout) :: matrix2(cplex*nbli_global,nbco_global) + real(dp),intent(inout) :: vector(:) + +!Local variables------------------------------- +#ifdef HAVE_LINALG_ELPA + integer :: i,j +#endif + integer :: ierr,use_gpu_elpa_ + type(matrix_scalapack) :: sca_matrix1, sca_matrix2, sca_matrix3 + real(dp),allocatable :: r_tmp_evec(:,:) + complex(dpc),allocatable :: z_tmp_evec(:,:) + +! ************************************************************************* + + use_gpu_elpa_=0 +#if defined HAVE_LINALG_ELPA + if (present(use_gpu_elpa)) use_gpu_elpa_=use_gpu_elpa +#endif + + ! ================================ + ! INITIALISATION SCALAPACK MATRIX + ! ================================ + call sca_matrix1%init(nbli_global,nbco_global,processor,istwf_k) + call sca_matrix2%init(nbli_global,nbco_global,processor,istwf_k) + call sca_matrix3%init(nbli_global,nbco_global,processor,istwf_k) + + ! ============================== + ! FILLING SCALAPACK MATRIX + ! ============================== + if ( istwf_k /= 2 ) then + ABI_CHECK_IEQ(cplex, 2, "cplex != 2") + ABI_MALLOC(z_tmp_evec,(nbli_global,nbco_global)) + z_tmp_evec=cmplx(0._DP,0._DP) +#ifdef HAVE_LINALG_ELPA + ! The full matrix must be set (not only one half like in scalapack). + do j=1,nbco_global + do i=j+1,nbli_global + matrix1(2*(i-1)+1,j) = matrix1(2*(j-1)+1,i) + matrix1(2*(i-1)+2,j) = -matrix1(2*(j-1)+2,i) + matrix2(2*(i-1)+1,j) = matrix2(2*(j-1)+1,i) + matrix2(2*(i-1)+2,j) = -matrix2(2*(j-1)+2,i) + end do + end do +#endif + call matrix_from_complexmatrix(sca_matrix1,matrix1,istwf_k) + call matrix_from_complexmatrix(sca_matrix2,matrix2,istwf_k) + else + ABI_CHECK_IEQ(cplex, 1, "cplex != 1") + ABI_MALLOC(r_tmp_evec,(nbli_global,nbco_global)) + r_tmp_evec(:,:)=0._DP +#ifdef HAVE_LINALG_ELPA + ! The full matrix must be set (not only one half like in scalapack). + do j=1,nbco_global + do i=j+1,nbli_global + matrix1(i,j) = matrix1(j,i) + matrix2(i,j) = matrix2(j,i) + end do + end do +#endif + call matrix_from_realmatrix(sca_matrix1,matrix1,istwf_k) + call matrix_from_realmatrix(sca_matrix2,matrix2,istwf_k) + endif + + ! ================================ + ! COMPUTE EIGEN VALUES AND VECTORS : A * X = lambda * B * X + ! ================================ + call compute_generalized_eigen_problem(processor,sca_matrix1,sca_matrix2,& +& sca_matrix3,vector,comm,istwf_k,use_gpu_elpa=use_gpu_elpa_) + + ! ============================== + ! CONCATENATE EIGEN VECTORS + ! ============================== +#ifdef HAVE_MPI + if ( istwf_k /= 2 ) then + call matrix_to_complexmatrix(sca_matrix3,z_tmp_evec,istwf_k) + call MPI_ALLREDUCE(z_tmp_evec, matrix1, nbli_global*nbco_global, MPI_DOUBLE_complex,& +& MPI_SUM,comm,ierr) + else + call matrix_to_realmatrix(sca_matrix3,r_tmp_evec,istwf_k) + call MPI_ALLREDUCE(r_tmp_evec, matrix1, nbli_global*nbco_global, MPI_DOUBLE_PRECISION,& +& MPI_SUM,comm,ierr) + endif +#endif + + ! ==================================== + ! DESTRUCTION SCALAPACK AND TMP MATRICES + ! ==================================== + call sca_matrix1%free() + call sca_matrix2%free() + call sca_matrix3%free() + + +#ifndef HAVE_LINALG_ELPA + ABI_UNUSED(use_gpu_elpa) +#endif + +end subroutine compute_eigen2 +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/slk_heev +!! NAME +!! slk_heev +!! +!! FUNCTION +!! slk_heev computes selected eigenvalues and, optionally, eigenvectors of an Hermitian matrix A. +!! A * X = lambda * X +!! +!! INPUTS +!! JOBZ (global input) CHARACTER*1 +!! Specifies whether or not to compute the eigenvectors: +!! = "N": Compute eigenvalues only. +!! = "V": Compute eigenvalues and eigenvectors. +!! UPLO (global input) CHARACTER*1 +!! Specifies whether the upper or lower triangular part of the symmetric matrix A is stored: +!! = "U": Upper triangular +!! = "L": Lower triangular +!! +!! mat=The object storing the local buffer in DOUBLE PRECISION, the array descriptor, the PBLAS context. +!! vec=The distributed eigenvectors. Not referenced if JOBZ="N" +!! +!! OUTPUT +!! W (global output) array, dimension (N) where N is the rank of the global matrix. +!! On normal exit, the first M entries contain the selected eigenvalues in ascending order. +!! +!! SIDE EFFECTS +!! If JOBZ="V", the local buffer vec%buffer_cplx will contain part of the distributed eigenvectors. +!! On exit, the lower triangle (if UPLO='L') or the upper triangle (if UPLO='U') of A, including the diagonal, is destroyed. +!! +!! SOURCE + +subroutine slk_heev(mat, jobz, uplo, vec, w, & + mat_size, ija, ijz) ! Optional + +!Arguments ------------------------------------ +!scalars + class(matrix_scalapack),intent(inout) :: mat + character(len=*),intent(in) :: jobz, uplo + class(matrix_scalapack),intent(inout) :: vec +!arrays + real(dp),intent(out) :: w(:) + integer,optional,intent(in) :: mat_size, ija(2), ijz(2) + +#ifdef HAVE_LINALG_SCALAPACK +!Local variables ------------------------------ +!scalars + integer :: lwork, lrwork, info, nn + !character(len=500) :: msg +!arrays + integer :: ija__(2), ijz__(2) + real(dp),allocatable :: rwork_dp(:) + complex(dp),allocatable :: work_dp(:) + +!************************************************************************ + + ABI_CHECK(allocated(mat%buffer_cplx), "buffer_cplx not allocated") + + nn = mat%sizeb_global(2); if (present(mat_size)) nn = mat_size + ija__ = [1, 1]; if (present(ija)) ija__ = ija + ijz__ = [1, 1]; if (present(ijz)) ijz__ = ijz + + ! Get optimal size of workspace. + lwork = - 1; lrwork = -1 + ABI_MALLOC(work_dp, (1)) + ABI_MALLOC(rwork_dp, (1)) + + !call pzheev(jobz, uplo, n, a, ia, ja, desca, w, z, iz, jz, descz, work, lwork, rwork, lrwork, info) + + call PZHEEV(jobz, uplo, nn, mat%buffer_cplx, ija__(1), ija__(2), mat%descript%tab, & + w, vec%buffer_cplx, ijz__(1), ijz__(2), vec%descript%tab, work_dp, lwork, rwork_dp, lrwork, info) + ABI_CHECK(info == 0, sjoin("Error in the calculation of the workspace size, info:", itoa(info))) + + lwork = NINT(real(work_dp(1))); lrwork= NINT(rwork_dp(1)) !*2 + ABI_FREE(work_dp) + ABI_FREE(rwork_dp) + + ! MG: Nov 23 2011. On my mac with the official scalapack package, rwork(1) is not large enough and causes a SIGFAULT. + if (firstchar(jobz, ['V'])) then + if (lrwork < 2*nn + 2*nn-2) lrwork = 2*nn + 2*nn-2 + else if (firstchar(jobz, ['N'])) then + if (lrwork < 2*nn) lrwork = 2*nn + end if + !write(std_out,*)lwork,lrwork + + ! Solve the problem. + ABI_MALLOC(work_dp, (lwork)) + ABI_MALLOC(rwork_dp, (lrwork)) + + call PZHEEV(jobz, uplo, nn, mat%buffer_cplx, ija__(1), ija__(2), mat%descript%tab, & + w, vec%buffer_cplx, ijz__(1), ijz__(2), vec%descript%tab, work_dp, lwork, rwork_dp, lrwork, info) + ABI_CHECK(info == 0, sjoin("PZHEEV returned info:", itoa(info))) + ABI_FREE(work_dp) + ABI_FREE(rwork_dp) +#endif + +end subroutine slk_heev +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/slkmat_sp_heev +!! NAME +!! slkmat_sp_heev +!! +!! FUNCTION +!! slkmat_sp_heev computes selected eigenvalues and, optionally, eigenvectors of an Hermitian matrix A. +!! A * X = lambda * X +!! +!! INPUTS +!! JOBZ (global input) CHARACTER*1 +!! Specifies whether or not to compute the eigenvectors: +!! = "N": Compute eigenvalues only. +!! = "V": Compute eigenvalues and eigenvectors. +!! UPLO (global input) CHARACTER*1 +!! Specifies whether the upper or lower triangular part of the symmetric matrix A is stored: +!! = "U": Upper triangular +!! = "L": Lower triangular +!! +!! mat=The object storing the local buffer in SINGLE PRECISION, the array descriptor, the PBLAS context. +!! vec=The distributed eigenvectors. Not referenced if JOBZ="N" +!! +!! OUTPUT +!! W (global output) array, dimension (N) where N is the rank of the global matrix. +!! On normal exit, the first M entries contain the selected eigenvalues in ascending order. +!! +!! SIDE EFFECTS +!! If JOBZ="V", the local buffer vec%buffer_cplx will contain part of the distributed eigenvectors. +!! On exit, the lower triangle (if UPLO='L') or the upper triangle (if UPLO='U') of A, including the diagonal, is destroyed. +!! +!! SOURCE + +subroutine slkmat_sp_heev(mat, jobz, uplo, vec, w, & + mat_size, ija, ijz) ! Optional + +!Arguments ------------------------------------ +!scalars + class(slkmat_sp_t),intent(inout) :: mat + character(len=*),intent(in) :: jobz, uplo + class(slkmat_sp_t),intent(inout) :: vec +!arrays + real(sp),intent(out) :: w(:) + integer,optional,intent(in) :: mat_size, ija(2), ijz(2) + +#ifdef HAVE_LINALG_SCALAPACK +!Local variables ------------------------------ +!scalars + integer :: lwork, lrwork, info, nn +!arrays + integer :: ija__(2), ijz__(2) + real(sp),allocatable :: rwork_sp(:) + complex(sp),allocatable :: work_sp(:) + +!************************************************************************ + + ABI_CHECK(allocated(mat%buffer_cplx), "buffer_cplx not allocated") + + nn = mat%sizeb_global(2); if (present(mat_size)) nn = mat_size + ija__ = [1, 1]; if (present(ija)) ija__ = ija + ijz__ = [1, 1]; if (present(ijz)) ijz__ = ijz + + ! Get optimal size of workspace. + lwork = - 1; lrwork = -1 + ABI_MALLOC(work_sp, (1)) + ABI_MALLOC(rwork_sp, (1)) + + !call pzheev(jobz, uplo, n, a, ia, ja, desca, w, z, iz, jz, descz, work, lwork, rwork, lrwork, info) + + call PCHEEV(jobz, uplo, nn, mat%buffer_cplx, ija__(1), ija__(2), mat%descript%tab, & + w, vec%buffer_cplx, ijz__(1), ijz__(2), vec%descript%tab, work_sp, lwork, rwork_sp, lrwork, info) + ABI_CHECK(info == 0, sjoin("Error in the calculation of the workspace size, info:", itoa(info))) + + lwork = NINT(real(work_sp(1))); lrwork= NINT(rwork_sp(1)) !*2 + ABI_FREE(work_sp) + ABI_FREE(rwork_sp) + + ! MG: Nov 23 2011. On my mac with the official scalapack package, rwork(1) is not large enough and causes a SIGFAULT. + if (firstchar(jobz, ['V'])) then + if (lrwork < 2*nn + 2*nn-2) lrwork = 2*nn + 2*nn-2 + else if (firstchar(jobz, ['N'])) then + if (lrwork < 2*nn) lrwork = 2*nn + end if + !write(std_out,*)lwork,lrwork + + ! Solve the problem. + ABI_MALLOC(work_sp, (lwork)) + ABI_MALLOC(rwork_sp, (lrwork)) + + call PCHEEV(jobz, uplo, nn, mat%buffer_cplx, ija__(1), ija__(2), mat%descript%tab, & + w, vec%buffer_cplx, ijz__(1), ijz__(2), vec%descript%tab, work_sp, lwork, rwork_sp, lrwork, info) + ABI_CHECK(info == 0, sjoin("PCHEEV returned info:", itoa(info))) + ABI_FREE(work_sp) + ABI_FREE(rwork_sp) +#endif + +end subroutine slkmat_sp_heev +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/slk_pzheevx +!! NAME +!! slk_pzheevx +!! +!! FUNCTION +!! slk_pzheevx computes selected eigenvalues and, optionally, eigenvectors of a complex Hermitian matrix A. +!! A * X = lambda * X +!! +!! INPUTS +!! mat=ScaLAPACK matrix (matrix A) +!! +!! vec=The distributed eigenvectors X. Not referenced if JOBZ="N" +!! +!! JOBZ (global input) CHARACTER*1 +!! Specifies whether or not to compute the eigenvectors: +!! = "N": Compute eigenvalues only. +!! = "V": Compute eigenvalues and eigenvectors. +!! +!! RANGE (global input) CHARACTER*1 +!! = "A": all eigenvalues will be found. +!! = "V": all eigenvalues in the interval [VL,VU] will be found. +!! = "I": the IL-th through IU-th eigenvalues will be found. +!! +!! UPLO (global input) CHARACTER*1 +!! Specifies whether the upper or lower triangular part of the Hermitian matrix A is stored: +!! = "U": Upper triangular +!! = "L": Lower triangular +!! +!! VL (global input) DOUBLE PRECISION +!! If RANGE="V",the lower bound of the interval to be searched for eigenvalues. Not referenced if RANGE = +!! "A" or "I" +!! +!! VU (global input) DOUBLE PRECISION +!! If RANGE="V", the upper bound of the interval to be searched for eigenvalues. Not referenced if RANGE = +!! "A" or "I". +!! +!! IL (global input) integer +!! If RANGE="I", the index (from smallest to largest) of the smallest eigenvalue to be returned. IL >= 1. +!! Not referenced if RANGE = "A" or "V". +!! +!! IU (global input) integer +!! If RANGE="I", the index (from smallest to largest) of the largest eigenvalue to be returned. min(IL,N) <= +!! IU <= N. Not referenced if RANGE = "A" or "V" +!! +!! ABSTOL (global input) DOUBLE PRECISION +!! If JOBZ="V", setting ABSTOL to PDLAMCH( CONTEXT, "U") yields the most orthogonal eigenvectors. +!! The absolute error tolerance for the eigenvalues. An approximate eigenvalue is accepted as converged when +!! it is determined to lie in an interval [a,b] of width less than or equal to +!! +!! ABSTOL + EPS * max( |a|,|b| ) , +!! +!! where EPS is the machine precision. If ABSTOL is less than or equal to zero, then EPS*norm(T) will be used +!! in its place, where norm(T) is the 1-norm of the tridiagonal matrix obtained by reducing A to tridiagonal form. +!! Eigenvalues will be computed most accurately when ABSTOL is set to twice the underflow threshold +!! 2*PDLAMCH("S") not zero. If this routine returns with ((MOD(INFO,2).NE.0) .OR. (MOD(INFO/8,2).NE.0)), +!! indicating that some eigenvalues or eigenvectors did not converge, try setting ABSTOL to 2*PDLAMCH("S"). +!! +!! OUTPUT +!! mene_found= (global output) Total number of eigenvalues found. 0 <= mene_found <= N. +!! eigen(N)= (global output) Eigenvalues of A where N is the dimension of M +!! On normal exit, the first mene_found entries contain the selected eigenvalues in ascending order. +!! +!! SIDE EFFECTS +!! If JOBZ="V", the local buffer vec%buffer_cplx will contain part of the distributed eigenvectors. +!! Slk%mat%buffer_cplx is destroyed when the routine returns +!! +!! SOURCE + +subroutine slk_pzheevx(mat, jobz, range, uplo, vl, vu, il, iu, abstol, vec, mene_found, eigen) + +!Arguments ------------------------------------ + class(matrix_scalapack),intent(inout) :: mat + integer,intent(in) :: il, iu + integer,intent(out) :: mene_found + real(dp),intent(in) :: abstol,vl,vu + character(len=*),intent(in) :: jobz,range,uplo + class(matrix_scalapack),intent(inout) :: vec +!arrays + real(dp),intent(out) :: eigen(*) + +#ifdef HAVE_LINALG_SCALAPACK +!Local variables------------------------------- +!scalars + integer :: lwork,lrwork,liwork,info,nvec_calc !,ierr + real(dp) :: orfac + character(len=500) :: msg +!arrays + !integer :: ibuff(3),max_ibuff(3) + integer,allocatable :: iwork(:),iclustr(:),ifail(:) + real(dp),allocatable :: rwork(:),gap(:) + complex(dpc),allocatable :: work(:) + +!************************************************************************ + + ABI_CHECK(allocated(mat%buffer_cplx), "buffer_cplx is not allocated!") + + ! abstol = PDLAMCH(vec%processor%grid%ictxt,'U') + + orfac = -one ! Only for eigenvectors: use default value 10d-3. + ! Vectors within orfac*norm(A) will be reorthogonalized. + + ! Allocate the arrays for the results of the calculation + ABI_MALLOC(gap, (mat%processor%grid%dims(1) * mat%processor%grid%dims(2))) + + if (firstchar(jobz, ["V","v"])) then + ABI_MALLOC(ifail, (mat%sizeb_global(2))) + ABI_MALLOC(iclustr, (2*mat%processor%grid%dims(1) * mat%processor%grid%dims(2))) + end if + + ! Get the optimal size of the work arrays. + lwork=-1; lrwork=-1; liwork=-1 + ABI_MALLOC(work, (1)) + ABI_MALLOC(iwork, (1)) + ABI_MALLOC(rwork, (3)) + ! This is clearly seen in the source in which rwork(1:3) is accessed + ! in the calculation of the workspace size. + + ! prototype + !call pzheevx(jobz, range, uplo, n, a, ia, ja, desca, vl, vu, il, iu, abstol, m, nz, w, + ! orfac, z, iz, jz, descz, work, lwork, rwork, lrwork, iwork, liwork, ifail, iclustr, gap, info) + + call PZHEEVX(jobz,range,uplo, mat%sizeb_global(2),mat%buffer_cplx,1,1,mat%descript%tab,& + vl,vu,il,iu,abstol,mene_found,nvec_calc,eigen,orfac,& + vec%buffer_cplx,1,1,vec%descript%tab,& + work,lwork,rwork,lrwork,iwork,liwork,ifail,iclustr,gap,info) + + ABI_CHECK(info == 0, sjoin("Problem to compute workspace, info:", itoa(info))) + + lwork = NINT(real(work(1)),kind=dp) + lrwork = NINT(rwork(1)) + liwork = iwork(1) + + ABI_FREE(work) + ABI_FREE(rwork) + ABI_FREE(iwork) + ! + ! FROM THE SCALAPACK MAN PAGE: + ! The computed eigenvectors may not be orthogonal if the minimal workspace is supplied and ORFAC is too + ! small. If you want to guarantee orthogonality (at the cost of potentially poor performance) you should + ! add the following to LRWORK: (CLUSTERSIZE-1)*N where CLUSTERSIZE is the number of eigenvalues in the + ! largest cluster, where a cluster is defined as a set of close eigenvalues: { W(K),...,W(K+CLUSTERSIZE-1) | + ! W(J+1) <= W(J) + ORFAC*2*norm(A) }. + + if (firstchar(jobz, ["V","v"])) then + lrwork = INT( lrwork + mat%sizeb_global(2) *(mat%sizeb_global(2)-1) ) + end if + + ! ibuff(1) = lwork + ! ibuff(2) = lrwork !INT(lrwork + mat%sizeb_global(2) *(mat%sizeb_global(2)-1) + ! ibuff(3) = liwork + + ! Get the maximum of sizes of the work arrays processor%comm + ! call MPI_ALLREDUCE(ibuff,max_ibuff,3,MPI_integer,MPI_MAX,comm,ierr) + + ! lwork = max_ibuff(1) + ! lrwork = max_ibuff(2) + ! liwork = max_ibuff(3) + + ABI_MALLOC(work , (lwork )) + ABI_MALLOC(rwork, (lrwork)) + ABI_MALLOC(iwork, (liwork)) + + ! prototype + !call pzheevx(jobz, range, uplo, n, a, ia, ja, desca, vl, vu, il, iu, abstol, m, nz, w, + ! orfac, z, iz, jz, descz, work, lwork, rwork, lrwork, iwork, liwork, ifail, iclustr, gap, info) + + ! Call the scaLAPACK routine. + ! write(std_out,*) 'I am using PZHEEVX' + call PZHEEVX(jobz,range,uplo, mat%sizeb_global(2),mat%buffer_cplx,1,1,mat%descript%tab,& + vl,vu,il,iu,abstol,mene_found,nvec_calc, eigen,orfac,& + vec%buffer_cplx,1,1,vec%descript%tab,& + work,lwork,rwork,lrwork,iwork,liwork,ifail,iclustr,gap,info) + + ! TODO + !call pxheevx_info_to_msg(info, jobz, nvec_calc, mene_found, msg) + !ABI_CHECK(info == 0, msg) + + ! Handle possible error. + if (info < 0) then + write(msg,'(a,i0,a)')" The ", -info, "-th argument of P?HEEVX had an illegal value." + if (info == -25) msg = " LRWORK is too small to compute all the eigenvectors requested, no computation is performed" + ABI_ERROR(msg) + end if + + if (info > 0) then + write(msg,'(a,i0)') " P?HEEVX returned info: ",info + call wrtout(std_out, msg) + if (MOD(info, 2) /= 0)then + write(msg,'(3a)')& + " One or more eigenvectors failed to converge. ",ch10,& + " Their indices are stored in IFAIL. Ensure ABSTOL=2.0*PDLAMCH('U')" + call wrtout(std_out, msg) + end if + if (MOD(info / 2, 2) /= 0) then + write(msg,'(5a)')& + " Eigenvectors corresponding to one or more clusters of eigenvalues ",ch10,& + " could not be reorthogonalized because of insufficient workspace. ",ch10,& + " The indices of the clusters are stored in the array ICLUSTR." + call wrtout(std_out, msg) + end if + if (MOD(info / 4, 2) /= 0) then + write(msg,'(3a)')" Space limit prevented PZHEEVX from computing all of the eigenvectors between VL and VU. ",ch10,& + " The number of eigenvectors computed is returned in NZ." + call wrtout(std_out, msg) + end if + if (MOD(info / 8, 2) /= 0) then + call wrtout(std_out, "PZSTEBZ failed to compute eigenvalues. Ensure ABSTOL=2.0*PDLAMCH('U')") + end if + ABI_ERROR("Cannot continue") + end if + + ! Check the number of eigenvalues found wrt to the number of vectors calculated. + if ( firstchar(jobz, ['V','v']) .and. mene_found /= nvec_calc) then + write(msg,'(5a)')& + " The user supplied insufficient space and PZHEEVX is not able to detect this before beginning computation. ",ch10,& + " To get all the eigenvectors requested, the user must supply both sufficient space to hold the ",ch10,& + " eigenvectors in Z (M .LE. DESCZ(N_)) and sufficient workspace to compute them. " + !ierr = huge(1) + ABI_ERROR(msg) + end if + + ABI_FREE(work) + ABI_FREE(rwork) + ABI_FREE(iwork) + ABI_FREE(gap) + + ABI_SFREE(ifail) + ABI_SFREE(iclustr) +#endif + +end subroutine slk_pzheevx +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/slk_pzhegvx +!! NAME +!! slk_pzhegvx +!! +!! FUNCTION +!! slk_pzhegvx provides an object-oriented interface to the ScaLAPACK routine PZHEGVX that +!! computes selected eigenvalues and, optionally, eigenvectors of a complex generalized +!! Hermitian-definite eigenproblem, of the form +!! sub( A )*x=(lambda)*sub( B )*x, sub( A )*sub( B )x=(lambda)*x, or sub( B )*sub( A )*x=(lambda)*x. +!! Here sub( A ) denoting A( IA:IA+N-1, JA:JA+N-1 ) is assumed to be +!! Hermitian, and sub( B ) denoting B( IB:IB+N-1, JB:JB+N-1 ) is assumed +!! to be Hermitian positive definite. +!! +!! INPUTS +!! Slk_matA=ScaLAPACK matrix (matrix A) +!! Slk_matB=ScaLAPACK matrix (matrix B) +!! Slk_vec=The distributed eigenvectors X. Not referenced if JOBZ="N" +!! +!! IBtype (global input) integer +!! Specifies the problem type to be solved: +!! = 1: sub( A )*x = (lambda)*sub( B )*x +!! = 2: sub( A )*sub( B )*x = (lambda)*x +!! = 3: sub( B )*sub( A )*x = (lambda)*x +!! +!! JOBZ (global input) CHARACTER*1 +!! Specifies whether or not to compute the eigenvectors: +!! = "N": Compute eigenvalues only. +!! = "V": Compute eigenvalues and eigenvectors. +!! +!! RANGE (global input) CHARACTER*1 +!! = "A": all eigenvalues will be found. +!! = "V": all eigenvalues in the interval [VL,VU] will be found. +!! = "I": the IL-th through IU-th eigenvalues will be found. +!! +!! UPLO (global input) CHARACTER*1 +!! Specifies whether the upper or lower triangular part of the Hermitian matrix sub(A) and sub(B) is stored: +!! = "U": Upper triangular +!! = "L": Lower triangular +!! +!! VL (global input) DOUBLE PRECISION +!! If RANGE="V",the lower bound of the interval to be searched for eigenvalues. Not referenced if RANGE = +!! "A" or "I" +!! +!! VU (global input) DOUBLE PRECISION +!! If RANGE="V", the upper bound of the interval to be searched for eigenvalues. Not referenced if RANGE = +!! "A" or "I". +!! +!! IL (global input) integer +!! If RANGE="I", the index (from smallest to largest) of the smallest eigenvalue to be returned. IL >= 1. +!! Not referenced if RANGE = "A" or "V". +!! +!! IU (global input) integer +!! If RANGE="I", the index (from smallest to largest) of the largest eigenvalue to be returned. min(IL,N) <= +!! IU <= N. Not referenced if RANGE = "A" or "V" +!! +!! ABSTOL (global input) DOUBLE PRECISION +!! If JOBZ="V", setting ABSTOL to PDLAMCH( CONTEXT, "U") yields the most orthogonal eigenvectors. +!! The absolute error tolerance for the eigenvalues. An approximate eigenvalue is accepted as converged when +!! it is determined to lie in an interval [a,b] of width less than or equal to +!! +!! ABSTOL + EPS * max( |a|,|b| ) , +!! +!! where EPS is the machine precision. If ABSTOL is less than or equal to zero, then EPS*norm(T) will be used +!! in its place, where norm(T) is the 1-norm of the tridiagonal matrix obtained by reducing A to tridiagonal form. +!! Eigenvalues will be computed most accurately when ABSTOL is set to twice the underflow threshold +!! 2*PDLAMCH("S") not zero. If this routine returns with ((MOD(INFO,2).NE.0) .OR. (MOD(INFO/8,2).NE.0)), +!! indicating that some eigenvalues or eigenvectors did not converge, try setting ABSTOL to 2*PDLAMCH("S"). +!! +!! OUTPUT +!! mene_found= (global output) Total number of eigenvalues found. 0 <= mene_found <= N. +!! +!! eigen(N)= (global output) Eigenvalues of A where N is the dimension of M +!! On normal exit, the first mene_found entries contain the selected eigenvalues in ascending order. +!! +!! SIDE EFFECTS +!! Slk_vec: +!! %buffer_cplx local output (global dimension (N,N) +!! If JOBZ = 'V', then on normal exit the first M columns of Z +!! contain the orthonormal eigenvectors of the matrix +!! corresponding to the selected eigenvalues. +!! If JOBZ = 'N', then Z is not referenced. +!! +!! Slk_matA: +!! %buffer_cplx +!! (local input/local output) complex(DPC) pointer into the +!! local memory to an array of dimension (LLD_A, LOCc(JA+N-1)). +!! On entry, this array contains the local pieces of the +!! N-by-N Hermitian distributed matrix sub( A ). If UPLO = 'U', +!! the leading N-by-N upper triangular part of sub( A ) contains +!! the upper triangular part of the matrix. If UPLO = 'L', the +!! leading N-by-N lower triangular part of sub( A ) contains +!! the lower triangular part of the matrix. +!! +!! On exit, if JOBZ = 'V', then if INFO = 0, sub( A ) contains +!! the distributed matrix Z of eigenvectors. The eigenvectors +!! are normalized as follows: +!! if IBtype = 1 or 2, Z**H*sub( B )*Z = I; +!! if IBtype = 3, Z**H*inv( sub( B ) )*Z = I. +!! If JOBZ = 'N', then on exit the upper triangle (if UPLO='U') +!! or the lower triangle (if UPLO='L') of sub( A ), including +!! the diagonal, is destroyed. +!! +!! Slk_matB= +!! %buffer_cplx +!! (local input/local output) complex*(DPC) pointer into the +!! local memory to an array of dimension (LLD_B, LOCc(JB+N-1)). +!! On entry, this array contains the local pieces of the +!! N-by-N Hermitian distributed matrix sub( B ). If UPLO = 'U', +!! the leading N-by-N upper triangular part of sub( B ) contains +!! the upper triangular part of the matrix. If UPLO = 'L', the +!! leading N-by-N lower triangular part of sub( B ) contains +!! the lower triangular part of the matrix. +!! +!! On exit, if INFO <= N, the part of sub( B ) containing the +!! matrix is overwritten by the triangular factor U or L from +!! the Cholesky factorization sub( B ) = U**H*U or +!! sub( B ) = L*L**H. +!! +!! SOURCE + +subroutine slk_pzhegvx(Slk_matA, ibtype, jobz, range, uplo, Slk_matB, vl, vu, il, iu, abstol, Slk_vec, mene_found, eigen) + +!Arguments ------------------------------------ + class(matrix_scalapack),intent(inout) :: Slk_matA + integer,intent(in) :: il,iu,ibtype + integer,intent(out) :: mene_found + real(dp),intent(in) :: abstol,vl,vu + character(len=*),intent(in) :: jobz,range,uplo + class(matrix_scalapack),intent(inout) :: Slk_matB + class(matrix_scalapack),intent(inout) :: Slk_vec +!arrays + real(dp),intent(out) :: eigen(*) + +#ifdef HAVE_LINALG_SCALAPACK +!Local variables------------------------------- +!scalars + integer :: lwork,lrwork,liwork,info,nvec_calc !,ierr + real(dp) :: orfac + logical :: ltest + character(len=500) :: msg +!arrays + !integer :: ibuff(3),max_ibuff(3) + integer :: desca(DLEN_),descb(DLEN_),descz(DLEN_) + integer,allocatable :: iwork(:),iclustr(:),ifail(:) + real(dp),allocatable :: rwork(:),gap(:) + complex(dpc),allocatable :: work(:) + +!************************************************************************ + + ABI_CHECK(allocated(Slk_matA%buffer_cplx), "buffer_cplx is not allocated!") + + ! abstol = PDLAMCH(Slk_vecprocessor%grid%ictxt,'U') + + orfac = -one ! Only for eigenvectors: use default value 10d-3. + ! Vectors within orfac*norm(A) will be reorthogonalized. + + ! ====================== + ! Alignment requirements + ! ====================== + ! The distributed submatrices A(IA:*, JA:*), C(IC:IC+M-1,JC:JC+N-1), + ! and B( IB:IB+N-1, JB:JB+N-1 ) must verify some alignment properties, + + desca = Slk_matA%descript%tab + descb = Slk_matB%descript%tab + if (firstchar(jobz, ["V", "v"])) then + descz = Slk_vec%descript%tab + else + descz = Slk_matA%descript%tab + end if + + ltest = .TRUE. + ltest = ltest .and. (DESCA(MB_) == DESCA(NB_)) + !IA = IB = IZ + !JA = IB = JZ + ltest = ltest .and.ALL(DESCA(M_ ) == [DESCB(M_ ), DESCZ(M_ )]) + ltest = ltest .and.ALL(DESCA(N_ ) == [DESCB(N_ ), DESCZ(N_ )]) + ltest = ltest .and.ALL(DESCA(MB_ ) == [DESCB(MB_ ), DESCZ(MB_ )]) + ltest = ltest .and.ALL(DESCA(NB_ ) == [DESCB(NB_ ), DESCZ(NB_ )]) + ltest = ltest .and.ALL(DESCA(RSRC_) == [DESCB(RSRC_), DESCZ(RSRC_)]) + ltest = ltest .and.ALL(DESCA(CSRC_) == [DESCB(CSRC_), DESCZ(CSRC_)]) + !MOD( IA-1, DESCA( MB_ ) ) = 0 + !MOD( JA-1, DESCA( NB_ ) ) = 0 + !MOD( IB-1, DESCB( MB_ ) ) = 0 + !MOD( JB-1, DESCB( NB_ ) ) = 0 + + if (.not.ltest) then + ABI_ERROR("Alignment requirements not satisfied, check the caller") + end if + + !Allocate the arrays for the results of the calculation + ABI_MALLOC(gap, (Slk_matA%processor%grid%dims(1) * Slk_matA%processor%grid%dims(2))) + + if (firstchar(jobz, ["V","v"])) then + ABI_MALLOC(ifail,(Slk_matA%sizeb_global(2))) + ABI_MALLOC(iclustr,( 2*Slk_matA%processor%grid%dims(1) * Slk_matA%processor%grid%dims(2))) + else + ABI_MALLOC(ifail,(1)) + end if + + ! Get the optimal size of the work arrays. + lwork=-1; lrwork=-1; liwork=-1 + ABI_MALLOC(work,(1)) + ABI_MALLOC(iwork,(1)) + ABI_MALLOC(rwork,(3)) + ! This is clearly seen in the source in which rwork(1:3) is accessed + ! in the calcuation of the workspace size. + + call pzhegvx(ibtype,jobz,range,uplo, Slk_matA%sizeb_global(2),Slk_matA%buffer_cplx,1,1,Slk_matA%descript%tab,& + Slk_matB%buffer_cplx,1,1,Slk_matB%descript%tab,& + vl,vu,il,iu,abstol,mene_found,nvec_calc,eigen,orfac,& + Slk_vec%buffer_cplx,1,1,Slk_vec%descript%tab,& + work,lwork,rwork,lrwork,iwork,liwork,ifail,iclustr,gap,info) + + ABI_CHECK(info == 0, sjoin("Problem to compute workspace, info:", itoa(info))) + + lwork = NINT(real(work(1)),kind=dp) + lrwork = NINT(rwork(1)) + liwork = iwork(1) + + ABI_FREE(work) + ABI_FREE(rwork) + ABI_FREE(iwork) + + !FROM THE SCALAPACK MAN PAGE: + !The computed eigenvectors may not be orthogonal if the minimal workspace is supplied and ORFAC is too + !small. If you want to guarantee orthogonality (at the cost of potentially poor performance) you should + !add the following to LRWORK: (CLUSTERSIZE-1)*N where CLUSTERSIZE is the number of eigenvalues in the + !largest cluster, where a cluster is defined as a set of close eigenvalues: { W(K),...,W(K+CLUSTERSIZE-1) | + !W(J+1) <= W(J) + ORFAC*2*norm(A) }. + + if (firstchar(jobz, ["V","v"])) then + lrwork = INT( lrwork + Slk_matA%sizeb_global(2) *(Slk_matA%sizeb_global(2)-1) ) + end if + + !ibuff(1) = lwork + !ibuff(2) = lrwork !INT(lrwork + Slk_matA%sizeb_global(2) *(Slk_matA%sizeb_global(2)-1) + !ibuff(3) = liwork + + !Get the maximum of sizes of the work arrays processor%comm + !call MPI_ALLREDUCE(ibuff,max_ibuff,3,MPI_integer,MPI_MAX,comm,ierr) + + !lwork = max_ibuff(1) + !lrwork = max_ibuff(2) + !liwork = max_ibuff(3) + + ABI_MALLOC(work , (lwork )) + ABI_MALLOC(rwork, (lrwork)) + ABI_MALLOC(iwork, (liwork)) + + ! Call the scaLAPACK routine. + ! write(std_out,*) 'I am using PZHEGVX' + call pzhegvx(ibtype,jobz,range,uplo, Slk_matA%sizeb_global(2),Slk_matA%buffer_cplx,1,1,Slk_matA%descript%tab,& + Slk_matB%buffer_cplx,1,1,Slk_matB%descript%tab,& + vl,vu,il,iu,abstol,mene_found,nvec_calc, eigen,orfac,& + Slk_vec%buffer_cplx,1,1,Slk_vec%descript%tab,& + work,lwork,rwork,lrwork,iwork,liwork,ifail,iclustr,gap,info) + + ! Handle the possible error. + if (info < 0) then + write(msg,'(a,i7,a)')" The ",-info,"-th argument of PZHEGVX had an illegal value." + if (info==-25) msg = " LRWORK is too small to compute all the eigenvectors requested, no computation is performed" + ABI_ERROR(msg) + end if + + if (info > 0) then + write(msg,'(a,i0)') " PZHEGVX returned info: ",info + call wrtout(std_out, msg) + if (MOD(info,2)/=0)then + write(msg,'(3a)')& + " One or more eigenvectors failed to converge. ",ch10,& + " Their indices are stored in IFAIL. Ensure ABSTOL=2.0*PDLAMCH('U')" + call wrtout(std_out, msg) + end if + if (MOD(info / 2, 2) /= 0) then + write(msg,'(5a)')& + " Eigenvectors corresponding to one or more clusters of eigenvalues ",ch10,& + " could not be reorthogonalized because of insufficient workspace. ",ch10,& + " The indices of the clusters are stored in the array ICLUSTR." + call wrtout(std_out, msg) + end if + if (MOD(info / 4, 2) /= 0) then + write(msg,'(3a)')& + " Space limit prevented PZHEGVX from computing all of the eigenvectors between VL and VU. ",ch10,& + " The number of eigenvectors computed is returned in NZ." + call wrtout(std_out, msg) + end if + if (MOD(info / 8, 2) /= 0) then + msg = " PZSTEBZ failed to compute eigenvalues. Ensure ABSTOL=2.0*PDLAMCH('U')" + call wrtout(std_out, msg) + end if + if (MOD(info / 16, 2) /= 0) then + write(msg,'(3a)')& + " B was not positive definite.",ch10,& + " IFAIL(1) indicates the order of the smallest minor which is not positive definite." + call wrtout(std_out, msg) + end if + ABI_ERROR("Cannot continue") + end if + + ! Check the number of eigenvalues found wrt to the number of vectors calculated. + if ( firstchar(jobz, ['V','v']) .and. mene_found/=nvec_calc) then + write(msg,'(5a)')& + " The user supplied insufficient space and PZHEGVX is not able to detect this before beginning computation. ",ch10,& + " To get all the eigenvectors requested, the user must supply both sufficient space to hold the ",ch10,& + " eigenvectors in Z (M .LE. DESCZ(N_)) and sufficient workspace to compute them. " + ABI_ERROR(msg) + end if + + ABI_FREE(work) + ABI_FREE(rwork) + ABI_FREE(iwork) + ABI_FREE(gap) + ABI_FREE(ifail) + ABI_SFREE(iclustr) +#endif + +end subroutine slk_pzhegvx +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/slk_invert +!! NAME +!! slk_invert +!! +!! FUNCTION +!! Compute the inverse of a complex matrix. +!! +!! SIDE EFFECTS +!! mat +!! In input, the matrix to invert. +!! In output the matrix inverted and distributed among the nodes. +!! +!! SOURCE + +subroutine slk_invert(mat) + +!Arguments ------------------------------------ + class(basemat_t),intent(inout) :: mat + +#ifdef HAVE_LINALG_SCALAPACK +!Local variables ------------------------------ +!scalars + integer :: lwork,info,ipiv_size,liwork +!array + integer,allocatable :: ipiv(:), iwork(:) + complex(dp),allocatable :: work_dp(:) + complex(sp),allocatable :: work_sp(:) + +!************************************************************************ + + ! IMPORTANT NOTE: PZGETRF requires square block decomposition i.e., MB_A = NB_A. + if (mat%descript%tab(MB_) /= mat%descript%tab(NB_)) then + ABI_ERROR(" PZGETRF requires square block decomposition i.e MB_A = NB_A.") + end if + + ipiv_size = my_locr(mat) + mat%descript%tab(MB_) + ABI_MALLOC(ipiv, (ipiv_size)) + + select type (mat) + class is (matrix_scalapack) + if (allocated(mat%buffer_cplx)) then + ! P * L * U Factorization. + call PZGETRF(mat%sizeb_global(1), mat%sizeb_global(2), mat%buffer_cplx, 1, 1, mat%descript%tab,ipiv, info) + ABI_CHECK(info == 0, sjoin(" PZGETRF returned info:", itoa(info))) + + ! Get optimal size of workspace for PZGETRI. + lwork = -1; liwork = -1 + ABI_MALLOC(work_dp,(1)) + ABI_MALLOC(iwork,(1)) + + call PZGETRI(mat%sizeb_global(1), mat%buffer_cplx, 1, 1, mat%descript%tab, ipiv, work_dp, lwork, iwork, liwork, info) + ABI_CHECK(info == 0, "PZGETRI: Error while computing workspace size") + + lwork = nint(real(work_dp(1))); liwork=iwork(1) + ABI_FREE(work_dp) + ABI_FREE(iwork) + + ! Solve the problem. + ABI_MALLOC(work_dp, (lwork)) + ABI_MALLOC(iwork, (liwork)) + + call PZGETRI(mat%sizeb_global(1), mat%buffer_cplx, 1, 1, mat%descript%tab, ipiv, work_dp, lwork, iwork, liwork, info) + ABI_CHECK(info == 0, sjoin("PZGETRI returned info:", itoa(info))) + ABI_FREE(work_dp) + + else if (allocated(mat%buffer_real)) then + ABI_ERROR("Inversion for real matrices not coded!") + end if + + class is (slkmat_sp_t) + if (allocated(mat%buffer_cplx)) then + ! P * L * U Factorization. + call PCGETRF(mat%sizeb_global(1), mat%sizeb_global(2), mat%buffer_cplx, 1, 1, mat%descript%tab,ipiv, info) + ABI_CHECK(info == 0, sjoin(" PCGETRF returned info:", itoa(info))) + + ! Get optimal size of workspace for PZGETRI. + lwork = -1; liwork = -1 + ABI_MALLOC(work_sp,(1)) + ABI_MALLOC(iwork,(1)) + + call PCGETRI(mat%sizeb_global(1), mat%buffer_cplx, 1, 1, mat%descript%tab, ipiv, work_sp, lwork, iwork, liwork, info) + ABI_CHECK(info == 0, "PZGETRI: Error while computing workspace size") + + lwork = nint(real(work_sp(1))); liwork=iwork(1) + ABI_FREE(work_sp) + ABI_FREE(iwork) + + ! Solve the problem. + ABI_MALLOC(work_sp, (lwork)) + ABI_MALLOC(iwork, (liwork)) + + call PCGETRI(mat%sizeb_global(1), mat%buffer_cplx, 1, 1, mat%descript%tab, ipiv, work_sp, lwork, iwork, liwork, info) + ABI_CHECK(info == 0, sjoin("PZGETRI returned info:", itoa(info))) + ABI_FREE(work_sp) + + else if (allocated(mat%buffer_real)) then + ABI_ERROR("Inversion for real matrices not coded!") + end if + + class default + ABI_ERROR("Wrong class") + end select + + ABI_FREE(iwork) + ABI_FREE(ipiv) +#endif + +end subroutine slk_invert +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/slk_hpd_invert +!! NAME +!! slk_hpd_invert +!! +!! FUNCTION +!! Compute the inverse of an Hermitian positive definite matrix. +!! +!! INPUTS +!! uplo: global input +!! = 'U': Upper triangle of sub( A ) is stored; +!! = 'L': Lower triangle of sub( A ) is stored. +!! [full]: If full PBLAS matrix is neeeded. Default: True +!! +!! SIDE EFFECTS +!! mat= The object storing the local buffer, the array descriptor, the context, etc. +!! On entry, this array contains the local pieces of the N-by-N Hermitian distributed matrix sub( A ) to be factored. +!! If UPLO = 'U', the leading N-by-N upper triangular part of sub( A ) contains the upper triangular part of the matrix, +!! and its strictly lower triangular part is not referenced. +!! If UPLO = 'L', the leading N-by-N lower triangular part of sub( A ) contains the lower triangular part of the distribu- +!! ted matrix, and its strictly upper triangular part is not referenced. +!! On exit, the local pieces of the upper or lower triangle of the (Hermitian) inverse of sub( A ) +!! +!! SOURCE + +subroutine slk_hpd_invert(mat, uplo, full) + +!Arguments ------------------------------------ + character(len=*),intent(in) :: uplo + class(matrix_scalapack),intent(inout) :: mat + logical,optional,intent(in) :: full + +#ifdef HAVE_LINALG_SCALAPACK +!Local variables ------------------------------ +!scalars + integer :: info, mm, il1, il2, iglob1, iglob2 + type(matrix_scalapack) :: work_mat + logical :: full__ + +!************************************************************************ + + ABI_CHECK(allocated(mat%buffer_cplx), "buffer_cplx not allocated") + + ! ZPOTRF computes the Cholesky factorization of a complex Hermitian positive definite. + ! A = U**H * U, if UPLO = 'U', or + ! A = L * L**H, if UPLO = 'L', + mm = mat%sizeb_global(1) + call PZPOTRF(uplo, mm, mat%buffer_cplx, 1, 1, mat%descript%tab, info) + ABI_CHECK(info == 0, sjoin("PZPOTRF returned info:", itoa(info))) + + ! PZPOTRI computes the inverse of a complex Hermitian positive definite + ! distributed matrix sub( A ) = A(IA:IA+N-1,JA:JA+N-1) using the + ! Cholesky factorization sub( A ) = U**H*U or L*L**H computed by PZPOTRF. + call PZPOTRI(uplo, mm, mat%buffer_cplx, 1, 1, mat%descript%tab, info) + ABI_CHECK(info == 0, sjoin("PZPOTRI returned info:", itoa(info))) + + full__ = .True.; if (present(full)) full__ = full + if (full__) then + ! Only the uplo part contains the inverse so we need to fill the other triangular part. + ! 1) Fill the missing triangle with zeros and copy results to work_mat + ! 2) Call pzgeadd to compute: sub(C) := beta*sub(C) + alpha*op(sub(A)) + ! 3) Divide diagonal elements by two. + + do il2=1,mat%sizeb_local(2) + iglob2 = mat%loc2gcol(il2) + do il1=1,mat%sizeb_local(1) + iglob1 = mat%loc2grow(il1) + if (uplo == "L" .and. iglob2 > iglob1) mat%buffer_cplx(il1, il2) = zero + if (uplo == "U" .and. iglob2 < iglob1) mat%buffer_cplx(il1, il2) = zero + end do + end do + + call mat%copy(work_mat, empty=.False.) + + ! call pzgeadd(trans, m, n, alpha, a, ia, ja, desca, beta, c, ic, jc, descc) + ! sub(C) := beta*sub(C) + alpha*op(sub(A)) + call pzgeadd("C", mm, mm, cone, work_mat%buffer_cplx, 1, 1, work_mat%descript%tab, & + cone, mat%buffer_cplx, 1, 1, mat%descript%tab) + call work_mat%free() + + do il2=1,mat%sizeb_local(2) + iglob2 = mat%loc2gcol(il2) + do il1=1,mat%sizeb_local(1) + iglob1 = mat%loc2grow(il1) + if (iglob2 == iglob1) mat%buffer_cplx(il1, il2) = half * mat%buffer_cplx(il1, il2) + end do + end do + end if ! full__ +#endif + +end subroutine slk_hpd_invert +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/slkmat_sp_hpd_invert +!! NAME +!! slkmat_sp_hpd_invert +!! +!! FUNCTION +!! Compute the inverse of an Hermitian positive definite matrix. +!! +!! INPUTS +!! uplo: global input +!! = 'U': Upper triangle of sub( A ) is stored; +!! = 'L': Lower triangle of sub( A ) is stored. +!! [full]: If full PBLAS matrix is neeeded. Default: True +!! +!! SIDE EFFECTS +!! mat= The object storing the local buffer, the array descriptor, the context, etc. +!! On entry, this array contains the local pieces of the N-by-N Hermitian distributed matrix sub( A ) to be factored. +!! If UPLO = 'U', the leading N-by-N upper triangular part of sub( A ) contains the upper triangular part of the matrix, +!! and its strictly lower triangular part is not referenced. +!! If UPLO = 'L', the leading N-by-N lower triangular part of sub( A ) contains the lower triangular part of the distribu- +!! ted matrix, and its strictly upper triangular part is not referenced. +!! On exit, the local pieces of the upper or lower triangle of the (Hermitian) inverse of sub( A ) +!! +!! SOURCE + +subroutine slkmat_sp_hpd_invert(mat, uplo, full) + +!Arguments ------------------------------------ + character(len=*),intent(in) :: uplo + class(slkmat_sp_t),intent(inout) :: mat + logical,optional,intent(in) :: full + +#ifdef HAVE_LINALG_SCALAPACK +!Local variables ------------------------------ +!scalars + integer :: info, mm, il1, il2, iglob1, iglob2 + type(slkmat_sp_t) :: work_mat + logical :: full__ + +!************************************************************************ + + ABI_CHECK(allocated(mat%buffer_cplx), "buffer_cplx not allocated") + + ! ZPOTRF computes the Cholesky factorization of a complex Hermitian positive definite. + ! A = U**H * U, if UPLO = 'U', or + ! A = L * L**H, if UPLO = 'L', + mm = mat%sizeb_global(1) + call PCPOTRF(uplo, mm, mat%buffer_cplx, 1, 1, mat%descript%tab, info) + ABI_CHECK(info == 0, sjoin("PCPOTRF returned info:", itoa(info))) + + ! PZPOTRI computes the inverse of a complex Hermitian positive definite + ! distributed matrix sub( A ) = A(IA:IA+N-1,JA:JA+N-1) using the + ! Cholesky factorization sub( A ) = U**H*U or L*L**H computed by PZPOTRF. + call PCPOTRI(uplo, mm, mat%buffer_cplx, 1, 1, mat%descript%tab, info) + ABI_CHECK(info == 0, sjoin("PCPOTRI returned info:", itoa(info))) + + full__ = .True.; if (present(full)) full__ = full + if (full__) then + ! Only the uplo part contains the inverse so we need to fill the other triangular part. + ! 1) Fill the missing triangle with zeros and copy results to work_mat + ! 2) Call pzgeadd to compute: sub(C) := beta*sub(C) + alpha*op(sub(A)) + ! 3) Divide diagonal elements by two. + + do il2=1,mat%sizeb_local(2) + iglob2 = mat%loc2gcol(il2) + do il1=1,mat%sizeb_local(1) + iglob1 = mat%loc2grow(il1) + if (uplo == "L" .and. iglob2 > iglob1) mat%buffer_cplx(il1, il2) = zero_sp + if (uplo == "U" .and. iglob2 < iglob1) mat%buffer_cplx(il1, il2) = zero_sp + end do + end do + + call mat%copy(work_mat, empty=.False.) + + ! call pzgeadd(trans, m, n, alpha, a, ia, ja, desca, beta, c, ic, jc, descc) + ! sub(C) := beta*sub(C) + alpha*op(sub(A)) + call pcgeadd("C", mm, mm, cone_sp, work_mat%buffer_cplx, 1, 1, work_mat%descript%tab, & + cone_sp, mat%buffer_cplx, 1, 1, mat%descript%tab) + call work_mat%free() + + do il2=1,mat%sizeb_local(2) + iglob2 = mat%loc2gcol(il2) + do il1=1,mat%sizeb_local(1) + iglob1 = mat%loc2grow(il1) + if (iglob2 == iglob1) mat%buffer_cplx(il1, il2) = 0.5_sp * mat%buffer_cplx(il1, il2) + end do + end do + end if ! full__ +#endif + +end subroutine slkmat_sp_hpd_invert +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/slk_ptrans +!! NAME +!! slk_ptrans +!! +!! FUNCTION +!! Transposes a matrix +!! +!! sub( C ) := beta*sub( C ) + alpha*op( sub( A ) ) +!! +!! where +!! +!! sub( C ) denotes C(IC:IC+M-1,JC:JC+N-1), +!! sub( A ) denotes A(IA:IA+N-1,JA:JA+M-1), and, op( X ) = X'. +!! +!! Thus, op( sub( A ) ) denotes A(IA:IA+N-1,JA:JA+M-1)'. +!! Beta is a scalar, sub( C ) is an m by n submatrix, and sub( A ) is an n by m submatrix. +!! +!! INPUTS +!! [ija(2)]: (global) The row and column indices in the distributed matrix in_mat indicating +!! the first row and the first column of the submatrix sub(A), respectively. +!! [ijc(2)]: (global) The row and column indices in the distributed matrix out_mat +!! indicating the first row and the first column of the submatrix sub(C), respectively. +!! [free]: True to deallocate in_mat. Default: False +!! +!! SOURCE + +subroutine slk_ptrans(in_mat, trans, out_mat, & + out_gshape, ija, ijc, size_blocs, alpha, beta, free) ! optional + +!Arguments ------------------------------------ + class(matrix_scalapack),intent(inout) :: in_mat + character(len=1),intent(in) :: trans + class(matrix_scalapack),intent(inout) :: out_mat + integer,optional,intent(in) :: out_gshape(2), size_blocs(2), ija(2), ijc(2) + complex(dp),optional,intent(in) :: alpha, beta + logical,optional,intent(in) :: free + +!Local variables------------------------------- + integer :: sb, mm, nn, size_blocs__(2) + real(dp) :: ralpha__, rbeta__ + integer :: ija__(2), ijc__(2) + complex(dp) :: calpha__, cbeta__ + +! ************************************************************************* + + ija__ = [1, 1]; if (present(ija)) ija__ = ija + ijc__ = [1, 1]; if (present(ijc)) ijc__ = ijc + + ! transposed output (sub)matrix has shape (nn, mm) + if (present(out_gshape)) then + nn = out_gshape(1) + mm = out_gshape(2) + else + nn = in_mat%sizeb_global(2) + mm = in_mat%sizeb_global(1) + end if + + if (present(size_blocs)) then + size_blocs__ = size_blocs + else + ! FIXME: This can cause problems if I start to use round-robin distribution in GWR!!!!! + size_blocs__(1) = in_mat%sizeb_global(2) + sb = in_mat%sizeb_global(1) / in_mat%processor%grid%dims(2) + if (mod(in_mat%sizeb_global(1), in_mat%processor%grid%dims(2)) /= 0) sb = sb + 1 + size_blocs__(2) = sb + !size_blocs__(2) = in_mat%sizeb_blocs(1); size_blocs__(1) = in_mat%sizeb_blocs(2) + end if + + call out_mat%init(nn, mm, in_mat%processor, in_mat%istwf_k, size_blocs=size_blocs__) + + ! prototype: call pdtran(m, n, alpha, a, ia, ja, desca, beta, c, ic, jc, descc) + + if (allocated(in_mat%buffer_cplx)) then +#ifdef HAVE_LINALG_SCALAPACK + select case (trans) + case ("N") + ! sub(C) := beta*sub(C) + alpha*sub(A)', + calpha__ = cone; if (present(alpha)) calpha__ = alpha + cbeta__ = czero; if (present(beta)) cbeta__ = beta + call pztranu(nn, mm, calpha__, in_mat%buffer_cplx, ija__(1), ija__(2), & + in_mat%descript%tab, cbeta__, out_mat%buffer_cplx, ijc__(1), ijc__(2), out_mat%descript%tab) + + case ("C") + ! sub(C) := beta * sub(C) + alpha * conjg(sub(A)') + calpha__ = cone; if (present(alpha)) calpha__ = alpha + cbeta__ = czero; if (present(beta)) cbeta__ = beta + call pztranc(nn, mm, calpha__, in_mat%buffer_cplx, ija__(1), ija__(2), & + in_mat%descript%tab, cbeta__, out_mat%buffer_cplx, ijc__(1), ijc__(2), out_mat%descript%tab) + + case default + ABI_ERROR(sjoin("Invalid value for trans:", trans)) + end select + + else if (allocated(in_mat%buffer_real)) then + ralpha__ = one; if (present(alpha)) ralpha__ = real(alpha) + rbeta__ = zero; if (present(beta)) rbeta__ = real(beta) + call pdtran(nn, mm, ralpha__, in_mat%buffer_real, ija__(1), ija__(2), & + in_mat%descript%tab, rbeta__, out_mat%buffer_real, ijc__(1), ijc__(2), out_mat%descript%tab) +#endif + else + ABI_ERROR("Neither buffer_cplx nor buffer_real are allocated!") + end if + + if (present(free)) then + if (free) call in_mat%free() + end if + +end subroutine slk_ptrans +!!*** + +!!****f* m_slk/slkmat_sp_ptrans +!! NAME +!! slkmat_sp_ptrans +!! +!! FUNCTION +!! Transposes a matrix +!! +!! sub( C ) := beta*sub( C ) + alpha*op( sub( A ) ) +!! +!! where +!! +!! sub( C ) denotes C(IC:IC+M-1,JC:JC+N-1), +!! sub( A ) denotes A(IA:IA+N-1,JA:JA+M-1), and, op( X ) = X'. +!! +!! Thus, op( sub( A ) ) denotes A(IA:IA+N-1,JA:JA+M-1)'. +!! Beta is a scalar, sub( C ) is an m by n submatrix, and sub( A ) is an n by m submatrix. +!! +!! INPUTS +!! [ija(2)]: (global) The row and column indices in the distributed matrix in_mat indicating +!! the first row and the first column of the submatrix sub(A), respectively. +!! [ijc(2)]: (global) The row and column indices in the distributed matrix out_mat +!! indicating the first row and the first column of the submatrix sub(C), respectively. +!! [free]: True to deallocate in_mat. Default: False +!! +!! SOURCE + +subroutine slkmat_sp_ptrans(in_mat, trans, out_mat, & + out_gshape, ija, ijc, size_blocs, alpha, beta, free) ! optional + +!Arguments ------------------------------------ + class(slkmat_sp_t),intent(inout) :: in_mat + character(len=1),intent(in) :: trans + class(slkmat_sp_t),intent(inout) :: out_mat + integer,optional,intent(in) :: out_gshape(2), size_blocs(2), ija(2), ijc(2) + complex(sp),optional,intent(in) :: alpha, beta + logical,optional,intent(in) :: free + +!Local variables------------------------------- + integer :: sb, mm, nn, size_blocs__(2) + real(sp) :: ralpha__, rbeta__ + integer :: ija__(2), ijc__(2) + complex(sp) :: calpha__, cbeta__ + +! ************************************************************************* + + ija__ = [1, 1]; if (present(ija)) ija__ = ija + ijc__ = [1, 1]; if (present(ijc)) ijc__ = ijc + + ! transposed output (sub)matrix has shape (nn, mm) + if (present(out_gshape)) then + nn = out_gshape(1) + mm = out_gshape(2) + else + nn = in_mat%sizeb_global(2) + mm = in_mat%sizeb_global(1) + end if + + if (present(size_blocs)) then + size_blocs__ = size_blocs + else + ! FIXME: This can cause problems if I start to use round-robin distribution in GWR!!!!! + size_blocs__(1) = in_mat%sizeb_global(2) + sb = in_mat%sizeb_global(1) / in_mat%processor%grid%dims(2) + if (mod(in_mat%sizeb_global(1), in_mat%processor%grid%dims(2)) /= 0) sb = sb + 1 + size_blocs__(2) = sb + !size_blocs__(2) = in_mat%sizeb_blocs(1); size_blocs__(1) = in_mat%sizeb_blocs(2) + end if + + call out_mat%init(nn, mm, in_mat%processor, in_mat%istwf_k, size_blocs=size_blocs__) + + ! prototype: call pdtran(m, n, alpha, a, ia, ja, desca, beta, c, ic, jc, descc) + + if (allocated(in_mat%buffer_cplx)) then +#ifdef HAVE_LINALG_SCALAPACK + select case (trans) + case ("N") + ! sub(C) := beta*sub(C) + alpha*sub(A)', + calpha__ = cone_sp; if (present(alpha)) calpha__ = alpha + cbeta__ = czero_sp; if (present(beta)) cbeta__ = beta + call pctranu(nn, mm, calpha__, in_mat%buffer_cplx, ija__(1), ija__(2), & + in_mat%descript%tab, cbeta__, out_mat%buffer_cplx, ijc__(1), ijc__(2), out_mat%descript%tab) + + case ("C") + ! sub(C) := beta * sub(C) + alpha * conjg(sub(A)') + calpha__ = cone_sp; if (present(alpha)) calpha__ = alpha + cbeta__ = czero_sp; if (present(beta)) cbeta__ = beta + call pctranc(nn, mm, calpha__, in_mat%buffer_cplx, ija__(1), ija__(2), & + in_mat%descript%tab, cbeta__, out_mat%buffer_cplx, ijc__(1), ijc__(2), out_mat%descript%tab) + + case default + ABI_ERROR(sjoin("Invalid value for trans:", trans)) + end select + + else if (allocated(in_mat%buffer_real)) then + ralpha__ = one_sp; if (present(alpha)) ralpha__ = real(alpha) + rbeta__ = zero_sp; if (present(beta)) rbeta__ = real(beta) + call pstran(nn, mm, ralpha__, in_mat%buffer_real, ija__(1), ija__(2), & + in_mat%descript%tab, rbeta__, out_mat%buffer_real, ijc__(1), ijc__(2), out_mat%descript%tab) +#endif + else + ABI_ERROR("Neither buffer_cplx nor buffer_real are allocated!") + end if + + if (present(free)) then + if (free) call in_mat%free() + end if + +end subroutine slkmat_sp_ptrans +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/slk_change_size_blocs +!! NAME +!! slk_change_size_blocs +!! +!! FUNCTION +!! Change the block sizes, return new matrix in out_mat +!! +!! INPUTS +!! [free]: True if `in_mat` should be deallocated. Default: False +!! +!! OUTPUT +!! +!! SOURCE + +subroutine slk_change_size_blocs(in_mat, out_mat, & + size_blocs, processor, free) ! Optional + +!Arguments ------------------------------------ + class(basemat_t),target,intent(inout) :: in_mat + class(basemat_t),intent(out) :: out_mat + integer,optional,intent(in) :: size_blocs(2) + class(processor_scalapack), target, optional,intent(in) :: processor + logical,optional,intent(in) :: free + +!Local variables------------------------------- + type(processor_scalapack), pointer :: processor__ + +! ************************************************************************* + + processor__ => in_mat%processor; if (present(processor)) processor__ => processor + + if (present(size_blocs)) then + call out_mat%init(in_mat%sizeb_global(1), in_mat%sizeb_global(2), processor__, in_mat%istwf_k, size_blocs=size_blocs) + else + call out_mat%init(in_mat%sizeb_global(1), in_mat%sizeb_global(2), processor__, in_mat%istwf_k) + end if + !call out_mat%print(header="output matrix generated by slk_change_size_blocs") + + ABI_CHECK(same_type_as(in_mat, out_mat), "in_mat and out_mat should have same type!") + + ! p?gemr2d: Copies a submatrix from one general rectangular matrix to another. + ! prototype + !call pzgemr2d(m, n, a, ia, ja, desca, b, ib, jb, descb, ictxt) + +#ifdef HAVE_LINALG_SCALAPACK + select type (in_mat) + class is (matrix_scalapack) + select type (out_mat) + class is (matrix_scalapack) + if (allocated(in_mat%buffer_cplx)) then + call pzgemr2d(in_mat%sizeb_global(1), in_mat%sizeb_global(2), & + in_mat%buffer_cplx, 1, 1, in_mat%descript%tab, & + out_mat%buffer_cplx, 1, 1, out_mat%descript%tab, & + processor__%grid%ictxt) + + else if (allocated(in_mat%buffer_real)) then + call pdgemr2d(in_mat%sizeb_global(1), in_mat%sizeb_global(2), & + in_mat%buffer_real, 1, 1, in_mat%descript%tab, & + out_mat%buffer_real, 1, 1, out_mat%descript%tab, & + processor__%grid%ictxt) + else + ABI_ERROR("Neither buffer_cplx nor buffer_real are allocated!") + end if + end select + + class is (slkmat_sp_t) + select type (out_mat) + class is (slkmat_sp_t) + if (allocated(in_mat%buffer_cplx)) then + call pcgemr2d(in_mat%sizeb_global(1), in_mat%sizeb_global(2), & + in_mat%buffer_cplx, 1, 1, in_mat%descript%tab, & + out_mat%buffer_cplx, 1, 1, out_mat%descript%tab, & + processor__%grid%ictxt) + + else if (allocated(in_mat%buffer_real)) then + call psgemr2d(in_mat%sizeb_global(1), in_mat%sizeb_global(2), & + in_mat%buffer_real, 1, 1, in_mat%descript%tab, & + out_mat%buffer_real, 1, 1, out_mat%descript%tab, & + processor__%grid%ictxt) + else + ABI_ERROR("Neither buffer_cplx nor buffer_real are allocated!") + end if + end select + + class default + ABI_ERROR("Wrong class") + end select +#endif + + if (present(free)) then + if (free) call in_mat%free() + end if + +end subroutine slk_change_size_blocs +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/slk_cut +!! NAME +!! slk_cut +!! +!! FUNCTION +!! Extract submatrix of shape (glob_nrows, glob_ncols) starting at `ija` from `in_mat` +!! and create new matrix with `size_blocs` and `processor` +!! +!! INPUTS +!! [free]: True if `in_mat` should be deallocated. Default: False +!! +!! OUTPUT +!! +!! SOURCE + +subroutine slk_cut(in_mat, glob_nrows, glob_ncols, out_mat, & + size_blocs, processor, ija, ijb, free) ! Optional + +!Arguments ------------------------------------ + class(matrix_scalapack),target,intent(inout) :: in_mat + integer,intent(in) :: glob_nrows, glob_ncols + class(matrix_scalapack),intent(out) :: out_mat + integer,optional,intent(in) :: size_blocs(2) + class(processor_scalapack), target, optional,intent(in) :: processor + integer,optional,intent(in) :: ija(2), ijb(2) + logical,optional,intent(in) :: free + +!Local variables------------------------------- + type(processor_scalapack), pointer :: processor__ + integer :: ija__(2), ijb__(2) + +! ************************************************************************* + + ija__ = [1, 1]; if (present(ija)) ija__ = ija + ijb__ = [1, 1]; if (present(ijb)) ijb__ = ijb + + processor__ => in_mat%processor; if (present(processor)) processor__ => processor + + if (present(size_blocs)) then + call out_mat%init(glob_nrows, glob_ncols, processor__, in_mat%istwf_k, size_blocs=size_blocs) + else + call out_mat%init(glob_nrows, glob_ncols, processor__, in_mat%istwf_k) + end if + !call out_mat%print(header="output matrix generated by slk_cut") + + ! p?gemr2d: Copies a submatrix from one general rectangular matrix to another. + ! prototype + !call pzgemr2d(m, n, a, ia, ja, desca, b, ib, jb, descb, ictxt) + + if (allocated(in_mat%buffer_cplx)) then +#ifdef HAVE_LINALG_SCALAPACK + call pzgemr2d(glob_nrows, glob_ncols, & + in_mat%buffer_cplx, ija__(1), ija__(2), in_mat%descript%tab, & + out_mat%buffer_cplx, ijb__(1), ijb__(2), out_mat%descript%tab, & + processor__%grid%ictxt) + + else if (allocated(in_mat%buffer_real)) then + call pdgemr2d(glob_nrows, glob_ncols, & + in_mat%buffer_real, ija__(1), ija__(2), in_mat%descript%tab, & + out_mat%buffer_real, ijb__(1), ijb__(2), out_mat%descript%tab, & + processor__%grid%ictxt) +#endif + else + ABI_ERROR("Neither buffer_cplx nor buffer_real are allocated!") + end if + + if (present(free)) then + if (free) call in_mat%free() + end if + +end subroutine slk_cut +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/slk_take_from +!! NAME +!! slk_take_from +!! +!! FUNCTION +!! Take values from source +!! NB: This routine should be called by all procs owning mat and source. +!! +!! INPUTS +!! [free]: True if source should be deallocated. Default: False +!! +!! OUTPUT +!! +!! SOURCE + +subroutine slk_take_from(out_mat, source, & + ija, ijb, free) ! optional + +!Arguments ------------------------------------ + class(matrix_scalapack),intent(inout) :: out_mat + class(matrix_scalapack),intent(inout) :: source + integer,optional,intent(in) :: ija(2), ijb(2) + logical,optional,intent(in) :: free + +!Local variables------------------------------- + integer :: mm, nn + character(len=500) :: msg + integer :: ija__(2), ijb__(2) + +! ************************************************************************* + + ! prototype + !call pzgemr2d(m, n, a, ia, ja, desca, b, ib, jb, descb, ictxt) + + ! Take care when context A is disjoint from context B. The general rules for which parameters need to be set are: + ! + ! - All calling processes must have the correct m and n. + ! - Processes in context A must correctly define all parameters describing A. + ! - Processes in context B must correctly define all parameters describing B. + ! - Processes which are not members of context A must pass ctxt_a = -1 and need not set other parameters describing A. + ! - Processes which are not members of contextB must pass ctxt_b = -1 and need not set other parameters describing B. + + mm = source%sizeb_global(1) + nn = source%sizeb_global(2) + + ija__ = [1, 1]; if (present(ija)) ija__ = ija + ijb__ = [1, 1]; if (present(ijb)) ijb__ = ijb + + if (all(out_mat%sizeb_global == -1)) then + out_mat%descript%tab(CTXT_) = -1 + else + ABI_CHECK_IEQ(out_mat%istwf_k, source%istwf_k, "istwfk_mat /= istwfk_source") + if (any(out_mat%sizeb_global /= source%sizeb_global)) then + msg = sjoin("Matrices should have same global shape but out_mat:", ltoa(out_mat%sizeb_global), & + "source:", ltoa(source%sizeb_global)) + ABI_ERROR(msg) + end if + end if + + if (allocated(source%buffer_cplx)) then +#ifdef HAVE_LINALG_SCALAPACK + call pzgemr2d(mm, nn, & + source%buffer_cplx, ija__(1), ija__(2), source%descript%tab, & + out_mat%buffer_cplx, ijb__(1), ijb__(2), out_mat%descript%tab, & + source%processor%grid%ictxt) + + else if (allocated(source%buffer_real)) then + call pdgemr2d(mm, nn, & + source%buffer_real, ija__(1), ija__(2), source%descript%tab, & + out_mat%buffer_real,ijb__(1), ijb__(2), out_mat%descript%tab, & + source%processor%grid%ictxt) +#endif + else + ABI_ERROR("Neither buffer_cplx nor buffer_real are allocated!") + end if + + if (present(free)) then + if (free) call source%free() + end if + +end subroutine slk_take_from +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/slkmat_sp_take_from +!! NAME +!! slkmat_sp_take_from +!! +!! FUNCTION +!! Take values from source +!! NB: This routine should be called by all procs owning mat and source. +!! +!! INPUTS +!! [free]: True if source should be deallocated. Default: False +!! +!! OUTPUT +!! +!! SOURCE + +subroutine slkmat_sp_take_from(out_mat, source, & + ija, ijb, free) ! optional + +!Arguments ------------------------------------ + class(slkmat_sp_t),intent(inout) :: out_mat + class(slkmat_sp_t),intent(inout) :: source + integer,optional,intent(in) :: ija(2), ijb(2) + logical,optional,intent(in) :: free + +!Local variables------------------------------- + integer :: mm, nn + character(len=500) :: msg + integer :: ija__(2), ijb__(2) + +! ************************************************************************* + + ! prototype + !call pzgemr2d(m, n, a, ia, ja, desca, b, ib, jb, descb, ictxt) + + ! Take care when context A is disjoint from context B. The general rules for which parameters need to be set are: + ! + ! - All calling processes must have the correct m and n. + ! - Processes in context A must correctly define all parameters describing A. + ! - Processes in context B must correctly define all parameters describing B. + ! - Processes which are not members of context A must pass ctxt_a = -1 and need not set other parameters describing A. + ! - Processes which are not members of contextB must pass ctxt_b = -1 and need not set other parameters describing B. + + mm = source%sizeb_global(1) + nn = source%sizeb_global(2) + + ija__ = [1, 1]; if (present(ija)) ija__ = ija + ijb__ = [1, 1]; if (present(ijb)) ijb__ = ijb + + if (all(out_mat%sizeb_global == -1)) then + out_mat%descript%tab(CTXT_) = -1 + else + ABI_CHECK_IEQ(out_mat%istwf_k, source%istwf_k, "istwfk_mat /= istwfk_source") + if (any(out_mat%sizeb_global /= source%sizeb_global)) then + msg = sjoin("Matrices should have same global shape but out_mat:", ltoa(out_mat%sizeb_global), & + "source:", ltoa(source%sizeb_global)) + ABI_ERROR(msg) + end if + end if + + if (allocated(source%buffer_cplx)) then +#ifdef HAVE_LINALG_SCALAPACK + call pcgemr2d(mm, nn, & + source%buffer_cplx, ija__(1), ija__(2), source%descript%tab, & + out_mat%buffer_cplx, ijb__(1), ijb__(2), out_mat%descript%tab, & + source%processor%grid%ictxt) + + else if (allocated(source%buffer_real)) then + call psgemr2d(mm, nn, & + source%buffer_real, ija__(1), ija__(2), source%descript%tab, & + out_mat%buffer_real,ijb__(1), ijb__(2), out_mat%descript%tab, & + source%processor%grid%ictxt) +#endif + else + ABI_ERROR("Neither buffer_cplx nor buffer_real are allocated!") + end if + + if (present(free)) then + if (free) call source%free() + end if + +end subroutine slkmat_sp_take_from +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/slk_collect_cplx +!! NAME +!! slk_collect_cplx +!! +!! FUNCTION +!! Return on all processors the complex submatrix of shape (mm, nn) starting at position ija. +!! NB: `out_carr` is allocated by the routine. +!! If optional argument request is use, the routine uses non-blocking BCAST and client code is +!! supposed to wait before accessing out_carr. +!! +!! SOURCE + +subroutine slk_collect_cplx(in_mat, mm, nn, ija, out_carr, request) + +!Arguments ------------------------------------ + class(matrix_scalapack),intent(in) :: in_mat + integer,intent(in) :: mm, nn, ija(2) + complex(dp) ABI_ASYNC, allocatable,intent(out) :: out_carr(:,:) + integer ABI_ASYNC, optional,intent(out) :: request + +!Local variables------------------------------- + integer,parameter :: master = 0 + integer :: ierr + type(processor_scalapack) :: self_processor + type(matrix_scalapack) :: out_mat + +! ************************************************************************* + + ABI_CHECK(allocated(in_mat%buffer_cplx), "buffer_cplx is not allocated") + + if (in_mat%processor%grid%nbprocs == 1) then + ! Copy buffer and return + ABI_MALLOC(out_carr, (mm, nn)) + out_carr(:,:) = in_mat%buffer_cplx(ija(1):ija(1)+mm-1, ija(2):ija(2)+nn-1); return + end if + + ! Two-step algorithm: + ! 1) Use pzgemr2d to collect submatrix on master. + ! 2) Master brodacasts submatrix. + + if (in_mat%processor%myproc == master) then + call self_processor%init(xmpi_comm_self) + call out_mat%init(mm, nn, self_processor, in_mat%istwf_k, size_blocs=[mm, nn]) + else + out_mat%descript%tab(CTXT_) = -1 + end if + +#ifdef HAVE_LINALG_SCALAPACK + call pzgemr2d(mm, nn, & + in_mat%buffer_cplx, ija(1), ija(2), in_mat%descript%tab, & + out_mat%buffer_cplx, 1, 1, out_mat%descript%tab, & + in_mat%processor%grid%ictxt) +#endif + + if (in_mat%processor%myproc == master) then + ABI_MOVE_ALLOC(out_mat%buffer_cplx, out_carr) + call out_mat%free() + call self_processor%free() + else + ABI_MALLOC(out_carr, (mm, nn)) + end if + + if (present(request)) then + call xmpi_ibcast(out_carr, master, in_mat%processor%comm, request, ierr) + else + call xmpi_bcast(out_carr, master, in_mat%processor%comm, ierr) + end if + +end subroutine slk_collect_cplx +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/slkmat_sp_collect_cplx +!! NAME +!! slkmat_sp_collect_cplx +!! +!! FUNCTION +!! Return on all processors the complex submatrix of shape (mm, nn) starting at position ija. +!! NB: `out_carr` is allocated by the routine. +!! If optional argument request is use, the routine uses non-blocking BCAST and client code is +!! supposed to wait before accessing out_carr. +!! +!! SOURCE + +subroutine slkmat_sp_collect_cplx(in_mat, mm, nn, ija, out_carr, request) + +!Arguments ------------------------------------ + class(slkmat_sp_t),intent(in) :: in_mat + integer,intent(in) :: mm, nn, ija(2) + complex(sp) ABI_ASYNC, allocatable,intent(out) :: out_carr(:,:) + integer ABI_ASYNC, optional,intent(out) :: request + +!Local variables------------------------------- + integer,parameter :: master = 0 + integer :: ierr + type(processor_scalapack) :: self_processor + type(slkmat_sp_t) :: out_mat + +! ************************************************************************* + + ABI_CHECK(allocated(in_mat%buffer_cplx), "buffer_cplx is not allocated") + + if (in_mat%processor%grid%nbprocs == 1) then + ! Copy buffer and return + ABI_MALLOC(out_carr, (mm, nn)) + out_carr(:,:) = in_mat%buffer_cplx(ija(1):ija(1)+mm-1, ija(2):ija(2)+nn-1); return + end if + + ! Two-step algorithm: + ! 1) Use pzgemr2d to collect submatrix on master. + ! 2) Master brodacasts submatrix. + + if (in_mat%processor%myproc == master) then + call self_processor%init(xmpi_comm_self) + call out_mat%init(mm, nn, self_processor, in_mat%istwf_k, size_blocs=[mm, nn]) + else + out_mat%descript%tab(CTXT_) = -1 + end if + +#ifdef HAVE_LINALG_SCALAPACK + call pcgemr2d(mm, nn, & + in_mat%buffer_cplx, ija(1), ija(2), in_mat%descript%tab, & + out_mat%buffer_cplx, 1, 1, out_mat%descript%tab, & + in_mat%processor%grid%ictxt) +#endif + + if (in_mat%processor%myproc == master) then + ABI_MOVE_ALLOC(out_mat%buffer_cplx, out_carr) + call out_mat%free() + call self_processor%free() + else + ABI_MALLOC(out_carr, (mm, nn)) + end if + + if (present(request)) then + call xmpi_ibcast(out_carr, master, in_mat%processor%comm, request, ierr) + else + call xmpi_bcast(out_carr, master, in_mat%processor%comm, ierr) + end if + +end subroutine slkmat_sp_collect_cplx +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/slk_get_trace +!! NAME +!! slk_get_trace +!! +!! FUNCTION +!! Compute the trace of an N-by-N distributed matrix. +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +complex(dp) function slk_get_trace(mat) result(ctrace) + +!Arguments ------------------------------------ + class(basemat_t), intent(in) :: mat + +!Local variables------------------------------- +#ifdef HAVE_LINALG_SCALAPACK + real(dp) :: rtrace + real(sp) :: rtrace_sp + complex(sp) :: ctrace_sp + real(dp),external :: PDLATRA + real(sp),external :: PSLATRA + complex(sp),external :: PCLATRA + complex(dp),external :: PZLATRA +#endif + +! ************************************************************************* + + ABI_CHECK_IEQ(mat%sizeb_global(1), mat%sizeb_global(2), "get_trace assumes square matrix!") + + ! prototype for complex version. + ! COMPLEX*16 FUNCTION PZLATRA( N, A, IA, JA, DESCA ) +#ifdef HAVE_LINALG_SCALAPACK + select type (mat) + class is (matrix_scalapack) + if (allocated(mat%buffer_cplx)) then + ctrace = PZLATRA(mat%sizeb_global(1), mat%buffer_cplx, 1, 1, mat%descript%tab) + else if (allocated(mat%buffer_real)) then + rtrace = PDLATRA(mat%sizeb_global(1), mat%buffer_real, 1, 1, mat%descript%tab) + ctrace = rtrace + else + ABI_ERROR("Neither buffer_cplx nor buffer_real are allocated!") + end if + class is (slkmat_sp_t) + if (allocated(mat%buffer_cplx)) then + ctrace_sp = PCLATRA(mat%sizeb_global(1), mat%buffer_cplx, 1, 1, mat%descript%tab) + ctrace = ctrace_sp + else if (allocated(mat%buffer_real)) then + rtrace_sp = PSLATRA(mat%sizeb_global(1), mat%buffer_real, 1, 1, mat%descript%tab) + ctrace = rtrace_sp + else + ABI_ERROR("Neither buffer_cplx nor buffer_real are allocated!") + end if + class default + ABI_ERROR("Wrong class") + end select +#endif + +end function slk_get_trace +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/slk_set_imag_diago_to_zero +!! NAME +!! slk_set_imag_diago_to_zero +!! +!! FUNCTION +!! Set the imaginary part of the diagonal to zero. +!! Return in local_max the max of the imaginar part in the local buffer. +!! No MPI communication is performed inside the routine. Client code can easily reduce +!! local_max within the PBLAS communicator if needed. +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +subroutine slk_set_imag_diago_to_zero(mat, local_max) + +!Arguments ------------------------------------ + class(basemat_t), intent(inout) :: mat + real(dp),intent(out) :: local_max + +!Local variables------------------------------- + integer :: il1, iglob1, il2, iglob2 + +! ************************************************************************* + + local_max = -huge(one) + + select type (mat) + class is (matrix_scalapack) + if (allocated(mat%buffer_real)) return + do il2=1,mat%sizeb_local(2) + iglob2 = mat%loc2gcol(il2) + do il1=1,mat%sizeb_local(1) + iglob1 = mat%loc2grow(il1) + if (iglob1 == iglob2) then + local_max = max(local_max, aimag(mat%buffer_cplx(il1, il2))) + mat%buffer_cplx(il1, il2) = real(mat%buffer_cplx(il1, il2)) + end if + end do + end do + + class is (slkmat_sp_t) + if (allocated(mat%buffer_real)) return + do il2=1,mat%sizeb_local(2) + iglob2 = mat%loc2gcol(il2) + do il1=1,mat%sizeb_local(1) + iglob1 = mat%loc2grow(il1) + if (iglob1 == iglob2) then + local_max = max(local_max, aimag(mat%buffer_cplx(il1, il2))) + mat%buffer_cplx(il1, il2) = real(mat%buffer_cplx(il1, il2)) + end if + end do + end do + class default + ABI_ERROR("Wrong class") + end select + + +end subroutine slk_set_imag_diago_to_zero +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/slk_write +!! NAME +!! slk_write +!! +!! FUNCTION +!! Routine to write a square scaLAPACK-distributed matrix to an external file using MPI-IO. +!! +!! INPUTS +!! Slk_mat=Structured datatype defining the scaLAPACK distribution with the local buffer +!! containing the distributed matrix. +!! uplo=String specifying whether only the upper or lower triangular part of the global matrix is used: +!! = "U": Upper triangular +!! = "L": Lower triangular +!! = "A": Full matrix (used for general complex matrices) +!! is_fortran_file=.FALSE. is C stream is used. .TRUE. for writing Fortran binary files. +!! [fname]= Mutually exclusive with mpi_fh. The name of the external file on which the matrix will be written. +!! The file is open and closed inside the routine with MPI flags specified by flags. +!! [mpi_fh]=File handler associated to the file (already open in the caller). Not compatible with fname. +!! [flags]=MPI-IO flags used to open the file in MPI_FILE_OPEN. +!! Default is MPI_MODE_CREATE + MPI_MODE_WRONLY + MPI_MODE_EXCL. +!! [glob_subarray(2,2)] = Used to select the subarray of the global matrix. Used only when uplo="All" +!! NOTE that each node should call the routine with the same value. +!! glob_subarray(:,1)=starting global coordinates of the subarray in each dimension +!! (array of nonnegative integers >=1, <=array_of_sizes) +!! glob_subarray(:,2)=Number of elements in each dimension of the subarray (array of positive integers) +!! +!! OUTPUT +!! Only writing. The global scaLAPACK matrix is written to file fname. +!! If fname is present then the file is open and closed inside the routine. Any exception is fatal. +!! +!! SIDE EFFECTS +!! [offset]= +!! input: Offset used to access the content of the file. Default is zero. +!! output: New offset incremented with the byte size of the matrix that has been read (Fortran +!! markers are included if is_fortran_file=.TRUE.) +!! TODO +!! - Generalize the implementation adding the writing the real buffer. +!! - This routine should be removed and replaced by hdf5 + mpi-io +!! +!! SOURCE + +subroutine slk_write(Slk_mat, uplo, is_fortran_file, fname,mpi_fh, offset, flags, glob_subarray) + +!Arguments ------------------------------------ +!scalars + integer,optional,intent(in) :: flags + integer,optional,intent(inout) :: mpi_fh + integer(XMPI_OFFSET_KIND),optional,intent(inout) :: offset + logical,intent(in) :: is_fortran_file + character(len=*),optional,intent(in) :: fname + character(len=*),intent(in) :: uplo + class(matrix_scalapack),intent(in) :: Slk_mat +!array + integer,optional,intent(in) :: glob_subarray(2,2) + +!Local variables ------------------------------ +!scalars +#if defined HAVE_LINALG_SCALAPACK && defined HAVE_MPI_IO + integer :: jloc,iloc,nrows_glob,ncols_glob,elw,nrows_w,ncols_w ! iglob,jglob, + integer :: slk_type,offset_err,etype,nfrec,bsize_elm,mpi_type_elm + integer(XMPI_OFFSET_KIND) :: my_offset + logical :: do_open + integer :: comm,my_flags,my_fh,buffer_size + integer :: ierr,nelw,col_glob ! ij_loc, +!arrays + integer(XMPI_OFFSET_KIND),allocatable :: bsize_frecord(:) + integer,pointer :: elw2slk(:,:) + complex(dpc),allocatable :: buffer1_cplx(:) + character(len=500) :: msg + +!************************************************************************ + + ABI_CHECK(allocated(Slk_mat%buffer_cplx), "buffer_cplx not allocated") + + if (firstchar(uplo, ["U","L"]) .and. Slk_mat%sizeb_global(1) /= Slk_mat%sizeb_global(2) ) then + ABI_ERROR("rectangular matrices are not compatible with the specified uplo") + end if + + if (PRESENT(glob_subarray).and. .not. firstchar(uplo, ["A"])) then + ABI_ERROR("glob_subarray should not be used when uplo/=All") + end if + + do_open = PRESENT(fname) + if (do_open) then + ABI_CHECK(.not.PRESENT(fname),"fname should not be present") + else + ABI_CHECK(PRESENT(mpi_fh),"mpi_fh should be present") + end if + + my_offset=0; if (PRESENT(offset)) my_offset=offset + + comm = Slk_mat%processor%comm + + nrows_glob=Slk_mat%sizeb_global(1) + ncols_glob=Slk_mat%sizeb_global(1) + buffer_size= PRODUCT(Slk_mat%sizeb_local(1:2)) + + call slk_mat%bsize_and_type(bsize_elm, mpi_type_elm) + + if (do_open) then !Open the file. + my_flags=MPI_MODE_CREATE + MPI_MODE_WRONLY + MPI_MODE_APPEND + if (PRESENT(flags)) my_flags = flags + + call MPI_FILE_OPEN(comm, fname, my_flags, MPI_INFO_NULL, my_fh, ierr) + ABI_CHECK_MPI(ierr, "MPI_FILE_OPEN "//TRIM(fname)) + else + my_fh = mpi_fh + end if + + if (PRESENT(glob_subarray)) then + call slk_single_fview_write(Slk_mat,uplo,nelw,elw2slk,etype,slk_type,offset_err,& + is_fortran_file=is_fortran_file,glob_subarray=glob_subarray) + else + call slk_single_fview_write(Slk_mat,uplo,nelw,elw2slk,etype,slk_type,offset_err,& + is_fortran_file=is_fortran_file) + end if + + if (offset_err /= 0) then + write(msg,"(3a)")& + " Global position index cannot be stored in standard Fortran integer ",ch10,& + " scaLAPACK matrix cannot be read with a single MPI-IO call." + ABI_ERROR(msg) + end if + + call MPI_FILE_SET_VIEW(my_fh, my_offset, etype, slk_type, 'native', MPI_INFO_NULL, ierr) + ABI_CHECK_MPI(ierr,"SET_VIEW") + + call MPI_TYPE_FREE(slk_type,ierr) + ABI_CHECK_MPI(ierr,"MPI_type_FREE") + + if (nelw == buffer_size) then + ! Dump Slk_mat% immediately. + call MPI_FILE_WRITE_ALL(my_fh, Slk_mat%buffer_cplx, buffer_size, MPI_DOUBLE_complex, MPI_STATUS_IGNORE, ierr) + ABI_CHECK_MPI(ierr,"WRITE_ALL") + else + ! Have to extract the data to be written. + ABI_MALLOC(buffer1_cplx,(nelw)) + do elw=1,nelw + iloc = elw2slk(1,elw) + jloc = elw2slk(2,elw) + buffer1_cplx(elw) = Slk_mat%buffer_cplx(iloc,jloc) + end do + call MPI_FILE_WRITE_ALL(my_fh, buffer1_cplx, nelw, MPI_DOUBLE_complex, MPI_STATUS_IGNORE, ierr) + ABI_CHECK_MPI(ierr,"WRITE_ALL") + ABI_FREE(buffer1_cplx) + end if + + ABI_FREE(elw2slk) + ! + ! Number of columns and rows that have been written. + ! Used to write the Fortran markers and to increment the offset. + nrows_w = nrows_glob + ncols_w = ncols_glob + if (PRESENT(glob_subarray)) then + nrows_w = glob_subarray(1,2) - glob_subarray(1,1) + 1 + ncols_w = glob_subarray(2,2) - glob_subarray(2,1) + 1 + if (.not.firstchar(uplo, ["A"])) then + ABI_ERROR("glob_subarray should not be used when uplo/=All") + end if + end if + + !TODO check whether slk_single_fview_write can report an offset to reduce the extent. + if (is_fortran_file) then ! Collective writing of the Fortran markers. + nfrec = ncols_w + ABI_MALLOC(bsize_frecord,(nfrec)) + if (firstchar(uplo, ["A"])) then + bsize_frecord = nrows_w * bsize_elm + else if (firstchar(uplo, ["U"])) then + bsize_frecord = (/(col_glob * bsize_elm, col_glob=1,nfrec)/) + else if (firstchar(uplo, ["L"])) then + bsize_frecord = (/(col_glob * bsize_elm, col_glob=nfrec,1,-1)/) + else + ABI_ERROR("Wrong uplo") + end if + call xmpio_write_frmarkers(mpi_fh,my_offset,xmpio_collective,nfrec,bsize_frecord,ierr) + ABI_CHECK(ierr==0,"Error while writing Fortran markers") + ABI_FREE(bsize_frecord) + end if + + if (do_open) then + ! Close the file. + call MPI_FILE_CLOSE(my_fh, ierr) + ABI_CHECK_MPI(ierr,"FILE_CLOSE") + end if + + ! Increment the offset + if (PRESENT(offset)) then + if (firstchar(uplo, ["A"])) then + offset = offset + nrows_w*ncols_w*bsize_elm + if (is_fortran_file) offset = offset + ncols_w*2*xmpio_bsize_frm + else if (firstchar(uplo, ["U","L"])) then + offset = offset + ( (Slk_mat%sizeb_global(2) * (Slk_mat%sizeb_global(2))+1)/2 ) * bsize_elm + if (is_fortran_file) offset = offset + Slk_mat%sizeb_global(2)*2*xmpio_bsize_frm + else + ABI_ERROR("Wrong uplo") + end if + end if + + call xmpi_barrier(comm) + RETURN + +#else + ABI_ERROR("MPI-IO support not activated") +#endif + +end subroutine slk_write +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/slk_read +!! NAME +!! slk_read +!! +!! FUNCTION +!! Routine to read a square scaLAPACK distributed matrix from an external file using MPI-IO. +!! +!! INPUTS +!! uplo=String specifying whether only the upper or lower triangular part of the global matrix is stored on disk: +!! = "U": Upper triangular is stored +!! = "L": Lower triangular is stored +!! = "A": Full matrix (used for general complex matrices) +!! symtype=Symmetry type of the matrix stored on disk (used only if uplo = "L" or "A"). +!! = "H" for Hermitian matrix +!! = "S" for symmetric matrix. +!! = "N" if matrix has no symmetry (not compatible with uplo="L" or uplo="U". +!! is_fortran_file=.FALSE. is C stream is used. .TRUE. for writing Fortran binary files. +!! [fname]= Mutually exclusive with mpi_fh. The name of the external file from which the matrix will be read. +!! The file is open and closed inside the routine with MPI flags specified by flags. +!! [mpi_fh]=File handler associated to the file (already open in the caller). Not compatible with fname. +!! [flags]=MPI-IO flags used to open the file in MPI_FILE_OPEN. Default is MPI_MODE_RDONLY. Referenced only when fname is used. +!! +!! SIDE EFFECTS +!! Slk_mat=Structured datatype defining the scaLAPACK distribution with the local buffer +!! supposed to be allocated. +!! %buffer_cplx=Local buffer containg the distributed matrix stored on the external file. +!! If fname is present then the file is opened and closed inside the routine. Any exception is fatal. +!! [offset]= +!! input: Offset used to access the content of the file. Default is zero. +!! output: New offset incremented with the byte size of the matrix that has been read (Fortran +!! markers are included if is_fortran_file=.TRUE.) +!! +!! TODO +!! - Generalize the implementation adding the reading of the real buffer. +!! +!! - This routine is not portable as this kind of access pattern is not supported by all MPI implementations +!! E.g. with MPICH we have +!! +!! --- !ERROR +!! src_file: m_slk.F90 +!! src_line: 3780 +!! mpi_rank: 1 +!! message: | +!! SET_VIEW +!! Other I/O error , error stack: +!! ADIO_Set_view(48): **iobadoverlap displacements of filetype must be in a monotonically nondecreasing order +!! ... +!! +!! - This routine should be removed and replaced by hdf5 + mpi-io +!! +!! SOURCE + +subroutine slk_read(Slk_mat,uplo,symtype,is_fortran_file,fname,mpi_fh,offset,flags) + +!Arguments ------------------------------------ +!scalars + integer,optional,intent(in) :: flags,mpi_fh + integer(XMPI_OFFSET_KIND),optional,intent(inout) :: offset + character(len=*),optional,intent(in) :: fname + character(len=*),intent(in) :: uplo,symtype + logical,intent(in) :: is_fortran_file + class(matrix_scalapack),intent(inout) :: Slk_mat + +!Local variables ------------------------------ +#if defined HAVE_LINALG_SCALAPACK && defined HAVE_MPI_IO +!scalars + integer :: nrows_glob,offset_err,slk_type,etype + integer(XMPI_OFFSET_KIND) :: my_offset + logical :: do_open + integer :: comm,my_flags,my_fh,buffer_size,ierr,col_glob + integer :: nfrec,bsize_elm,mpi_type_elm + !complex(dpc) :: ctest + logical,parameter :: check_frm=.TRUE. + integer(XMPI_OFFSET_KIND),allocatable :: bsize_frecord(:) +!arrays + character(len=500) :: msg + +!************************************************************************ + + do_open = PRESENT(fname) + if (do_open) then + ABI_CHECK(.not.PRESENT(fname), "fname should not be present") + else + ABI_CHECK(PRESENT(mpi_fh), "mpi_fh should be present") + end if + + my_offset=0; if (PRESENT(offset)) my_offset=offset + + ABI_CHECK(allocated(Slk_mat%buffer_cplx), "%buffer_cplx not allocated") + if (firstchar(uplo, ["U","L"]) .and. Slk_mat%sizeb_global(1) /= Slk_mat%sizeb_global(2) ) then + ABI_ERROR("rectangular matrices are not compatible with the specified uplo") + end if + + nrows_glob = Slk_mat%sizeb_global(1) + + buffer_size= PRODUCT(Slk_mat%sizeb_local(1:2)) + + call wrtout(std_out, "slk_read: Using MPI-IO") + + comm = Slk_mat%processor%comm + + if (do_open) then ! Open the file. + my_flags=MPI_MODE_RDONLY; if (PRESENT(flags)) my_flags = flags + call MPI_FILE_OPEN(comm, fname, my_flags, MPI_INFO_NULL, my_fh, ierr) + ABI_CHECK_MPI(ierr,"FILE_OPEN "//TRIM(fname)) + else + my_fh = mpi_fh + end if + + call slk_single_fview_read(Slk_mat,uplo,etype,slk_type,offset_err,is_fortran_file=is_fortran_file) + + if (offset_err/=0) then + write(msg,"(3a)")& + "Global position index cannot be stored in standard Fortran integer ",ch10,& + "scaLAPACK matrix cannot be read with a single MPI-IO call." + ABI_ERROR(msg) + end if + + call MPI_FILE_SET_VIEW(my_fh, my_offset, etype, slk_type, 'native', MPI_INFO_NULL, ierr) + ABI_CHECK_MPI(ierr,"SET_VIEW") + + call MPI_FILE_READ_ALL(my_fh, Slk_mat%buffer_cplx, buffer_size, MPI_DOUBLE_complex, MPI_STATUS_IGNORE, ierr) + ABI_CHECK_MPI(ierr,"READ_ALL") + + ! Symmetrize local buffer if uplo /= "All" + call slk_symmetrize(Slk_mat, uplo, symtype) + +!BEGINDEBUG +!call MPI_FILE_READ_AT(mpi_fh,my_offset+xmpio_bsize_frm,ctest,1,MPI_DOUBLE_complex,MPI_STATUS_IGNORE,ierr) +!write(std_out,*)"ctest",ctest +!call MPI_FILE_READ_AT(mpi_fh,my_offset+2*xmpio_bsize_frm,ctest,1,MPI_DOUBLE_complex,MPI_STATUS_IGNORE,ierr) +!write(std_out,*)"ctest",ctest +!ENDDEBUG + + !call print_arr(Slk_mat%buffer_cplx,max_r=10,max_c=10,unit=std_out) + ! + ! Close the file and release the MPI filetype. + call MPI_type_FREE(slk_type,ierr) + ABI_CHECK_MPI(ierr,"MPI_type_FREE") + + call slk_mat%bsize_and_type(bsize_elm, mpi_type_elm) + +!It seems that personal call makes the code stuck +!if (is_fortran_file .and. check_frm .and. Slk_mat%Processor%myproc==0) then ! Master checks the Fortran markers. + if (is_fortran_file .and. check_frm) then ! Master checks the Fortran markers. + call wrtout(std_out,"Checking Fortran record markers...", do_flush=.True.) + nfrec = Slk_mat%sizeb_global(2) + ABI_MALLOC(bsize_frecord,(nfrec)) + if (firstchar(uplo, ["A"])) then + bsize_frecord = Slk_mat%sizeb_global(1) * bsize_elm + else if (firstchar(uplo, ["U"])) then + bsize_frecord = (/(col_glob * bsize_elm, col_glob=1,nfrec)/) + else if (firstchar(uplo, ["L"])) then + bsize_frecord = (/(col_glob * bsize_elm, col_glob=nfrec,1,-1)/) + else + ABI_ERROR("Wrong uplo") + end if + call xmpio_check_frmarkers(my_fh,my_offset,xmpio_collective,nfrec,bsize_frecord,ierr) + ABI_CHECK(ierr==0,"Wrong Fortran record markers") + ABI_FREE(bsize_frecord) + end if + + if (do_open) then ! Close the file. + call MPI_FILE_CLOSE(my_fh, ierr) + ABI_CHECK_MPI(ierr,"FILE_CLOSE") + end if + +!Increment the offset + if (PRESENT(offset)) then + if (firstchar(uplo, ["A"])) then + offset = offset + PRODUCT(Slk_mat%sizeb_global(1:2)) * bsize_elm + if (is_fortran_file) offset = offset + Slk_mat%sizeb_global(2)*2*xmpio_bsize_frm + else if (firstchar(uplo, ["U","L"])) then + offset = offset + ( (Slk_mat%sizeb_global(2) * (Slk_mat%sizeb_global(2))+1)/2 ) * bsize_elm + if (is_fortran_file) offset = offset + Slk_mat%sizeb_global(2)*2*xmpio_bsize_frm + else + ABI_ERROR("Wrong uplo") + end if + end if + + call xmpi_barrier(comm) + RETURN + +#else + ABI_ERROR("MPI-IO support not enabled") +#endif + +end subroutine slk_read +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/slk_single_fview_read_mask +!! NAME +!! slk_single_fview_read_mask +!! +!! FUNCTION +!! Return an MPI datatype that can be used to read a scaLAPACK distributed matrix from +!! a binary file using MPI-IO. The view is created using the user-defined mask function +!! mask_of_glob. The storage of the data on file is described via the user-defined function offset_of_glob. +!! +!! INPUTS +!! Slk_mat=Structured datatype defining the scaLAPACK matrix. +!! mask_of_glob(row_glob,col_glob,size_glob) is an integer function that accepts in input +!! the global indices of the matrix size_glob(1:2) are the global dimensions. +!! Return 0 if (row_glob,col_glob) should not be read. +!! offset_of_glob(row_glob,col_glob,size_glob,nsblocks,sub_block,bsize_elm,bsize_frm) +!! nsblocks=Number of sub-blocks (will be passed to offset_of_glob) +!! sub_block(2,2,nsblocks)=Global coordinates of the extremal points delimiting the sub-blocs +!! e.g. sub_block(:,1,1) gives the coordinates of the left upper corner of the first block. +!! sub_block(:,2,1) gives the coordinates of the right lower corner of the first block. +!! [is_fortran_file]=.FALSE. is C stream is used. Set to .TRUE. for writing Fortran binary files +!! with record marker. +!! +!! OUTPUT +!! my_nel=Number of elements that will be read by this node. +!! etype=Elementary data type (handle) defining the elementary unit used to access the file. +!! This is the elementary type that must be used to creae the view (MPI_BYTE is used). +!! slk_type=New MPI type that can be used to instantiate the MPI-IO view for the Fortran file. +!! Note that the view assumes that the file pointer points to the FIRST Fortran record marker. +!! offset_err=Error code. A returned non-zero value signals that the global matrix is too large +!! for a single MPI-IO access. See notes in other slk_single_fview_* routines. +!! +!! SIDE EFFECTS +!! myel2loc(:,:) +!! input: pointer to NULL +!! output: myel2loc(2,my_nel): myel2loc(:,el) gives (iloc,jloc) for el=1,my_nel. +!! +!! SOURCE + +subroutine slk_single_fview_read_mask(Slk_mat,mask_of_glob,offset_of_glob,nsblocks,sub_block,& + my_nel,myel2loc,etype,slk_type,offset_err,is_fortran_file) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: nsblocks + integer,intent(out) :: my_nel,offset_err,slk_type,etype + logical,optional,intent(in) :: is_fortran_file + class(matrix_scalapack),intent(in) :: Slk_mat +!arrays + integer,intent(in) :: sub_block(2,2,nsblocks) + integer,pointer :: myel2loc(:,:) + + interface + function mask_of_glob(row_glob,col_glob,size_glob) + use defs_basis + integer :: mask_of_glob + integer,intent(in) :: row_glob,col_glob + integer,intent(in) :: size_glob(2) + end function mask_of_glob + end interface + + interface + function offset_of_glob(row_glob,col_glob,size_glob,nsblocks,sub_block,bsize_elm,bsize_frm) + use defs_basis + use m_xmpi + integer(XMPI_OFFSET_KIND) :: offset_of_glob + integer,intent(in) :: row_glob,col_glob,bsize_elm,bsize_frm,nsblocks + integer,intent(in) :: size_glob(2),sub_block(2,2,nsblocks) + end function offset_of_glob + end interface + +!Local variables ------------------------------ +!scalars + integer :: el,jloc,iloc,iglob,jglob,mpi_err,sweep + integer :: bsize_frm,mpi_type_elm,bsize_elm + integer(XMPI_OFFSET_KIND) :: tmp_off,max_displ +!arrays + character(len=500) :: msg + integer,allocatable :: block_length(:),block_type(:) + integer(XMPI_ADDRESS_KIND),allocatable :: block_displ(:) + +!************************************************************************ + +#ifdef HAVE_MPI_IO + bsize_frm = xmpio_bsize_frm ! Byte size of the Fortran record marker. + if (PRESENT(is_fortran_file)) then + if (.not.is_fortran_file) bsize_frm = 0 + end if + + ! Byte size of the matrix element. + call slk_mat%bsize_and_type(bsize_elm, mpi_type_elm) + + ! Find the number of local matrix elements to be read, then create the table myel2loc. + do sweep=1,2 + if (sweep==2) then + ABI_MALLOC(myel2loc,(2,my_nel)) + end if + my_nel=0 + + do jloc=1,Slk_mat%sizeb_local(2) + do iloc=1,Slk_mat%sizeb_local(1) + call slk_mat%loc2glob(iloc, jloc, iglob, jglob) + if ( mask_of_glob(iglob,jglob,Slk_mat%sizeb_global)/= 0) then ! Will fill this entry. + my_nel = my_nel+1 + if (sweep==2) myel2loc(:,my_nel) = (/iloc,jloc/) + end if + end do + end do + end do + + etype = MPI_BYTE + + ! Define the mapping between scaLAPACK buffer and the storage on file. + ! Note that the view assumes that the file pointer points to the first Fortran record marker. + ABI_MALLOC(block_length,(my_nel+2)) + ABI_MALLOC(block_displ,(my_nel+2)) + ABI_MALLOC(block_type,(my_nel+2)) + block_length(1)=1 + block_displ (1)=0 + block_type (1)=MPI_LB + + offset_err=0; max_displ=0 + do el=1,my_nel + iloc = myel2loc(1,el) + jloc = myel2loc(2,el) + call slk_mat%loc2glob(iloc, jloc, iglob, jglob) + tmp_off = offset_of_glob(iglob,jglob,Slk_mat%sizeb_global,nsblocks,sub_block,bsize_elm,bsize_frm) + if (xmpio_max_address(tmp_off)) offset_err=1 ! Test for possible wraparounds. + max_displ = MAX(max_displ,tmp_off) + block_displ (el+1) = tmp_off + block_type (el+1) = mpi_type_elm + block_length(el+1) = 1 + !write(std_out,*)" iglob, jglob, tmp_off ",iglob, jglob, tmp_off + end do + !write(std_out,*)" MAX displ is ",MAXVAL(block_displ) + + if (offset_err/=0) then ! just warn, let the caller handle the exception. + write(msg,"(3a)")& + " Global position index cannot be stored in standard Fortran integer ",ch10,& + " scaLAPACK matrix cannot be read with a single MPI-IO call ." + ABI_WARNING(msg) + end if + + block_length(my_nel+2) = 1 + block_displ (my_nel+2) = max_displ + block_type (my_nel+2) = MPI_UB + + call xmpio_type_struct(my_nel+2,block_length,block_displ,block_type,slk_type,mpi_err) + ABI_CHECK_MPI(mpi_err,"MPI_type_STRUCT") + + ABI_FREE(block_length) + ABI_FREE(block_displ) + ABI_FREE(block_type) + + call MPI_type_COMMIT(slk_type,mpi_err) + ABI_CHECK_MPI(mpi_err,"MPI_type_COMMIT") + +#else + ABI_ERROR("MPI-IO is mandatatory in slk_single_fview_read_mask") +#endif + +end subroutine slk_single_fview_read_mask +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/slk_symmetrize +!! NAME +!! slk_symmetrize +!! +!! FUNCTION +!! Symmetrize a square scaLAPACK matrix. +!! +!! INPUTS +!! uplo=String specifying whether only the upper or lower triangular part of the global matrix has been read +!! = "U": Upper triangular has been read. +!! = "L": Lower triangular has been read. +!! = "A": Full matrix (used for general complex matrices) +!! symtype=Symmetry type of the matrix (used only if uplo = "L" or "A"). +!! = "H" for Hermitian matrix +!! = "S" for symmetric matrix. +!! = "N" if matrix has no symmetry (not compatible with uplo="L" or uplo="U". +!! +!! SIDE EFFECTS +!! Slk_mat=Structured datatype defining the scaLAPACK distribution with the local buffer +!! supposed to be allocated. +!! %buffer_cplx=Local buffer containg the distributed matrix stored on the external file. +!! +!! SOURCE + +subroutine slk_symmetrize(Slk_mat, uplo, symtype) + +!Arguments ------------------------------------ +!scalars + class(matrix_scalapack),intent(inout) :: Slk_mat + character(len=*),intent(in) :: symtype + character(len=*),intent(in) :: uplo + +!Local variables ------------------------------ +!scalars + integer :: jloc,iloc,iglob,jglob,ij_loc + logical :: is_hermitian,is_real,is_cplx,is_symmetric + character(len=500) :: msg + +!************************************************************************ + + is_cplx = (allocated(Slk_mat%buffer_cplx)) + is_real = (allocated(Slk_mat%buffer_real)) + + ! One and only one buffer should be allocated. + if (is_real .and. is_cplx) then + write(msg,'(a,2l1)')" ScaLAPACK buffers are not allocated correctly, is_real=, is_cplx ",is_real,is_cplx + ABI_ERROR(msg) + end if + + if (is_real) RETURN + + is_hermitian=.FALSE.; is_symmetric=.FALSE. + select case (symtype(1:1)) + case ("H", "h") + is_hermitian = .TRUE. + case ("S","s") + is_symmetric = .TRUE. + case("N","n") + if (ALL(uplo(1:1) /= ["A","a"])) then + msg = " Found symtype= "//TRIM(symtype)//", but uplo= "//TRIM(uplo) + ABI_ERROR(msg) + end if + RETURN ! Nothing to do. + case default + ABI_ERROR("Wrong symtype "//TRIM(symtype)) + end select + + !write(std_out,*)"is_cplx",is_cplx + !write(std_out,*)"is_hermitian",is_hermitian + + select case (uplo(1:1)) + case ("A","a") + ! Full global matrix has been read, nothing to do. + return + + case ("U", "u") + ! Only the upper triangle of the global matrix was read. + if (is_cplx .and. is_hermitian) then + ij_loc=0 + do jloc=1,Slk_mat%sizeb_local(2) + do iloc=1,Slk_mat%sizeb_local(1) + call slk_mat%loc2glob(iloc, jloc, iglob, jglob) + ij_loc = ij_loc+1 + if (jglob < iglob) then + ! Diagonal elements are not forced to be real. + Slk_mat%buffer_cplx(iloc,jloc) = DCONJG(Slk_mat%buffer_cplx(iloc,jloc)) + end if + !if (iglob==jglob) Slk_mat%buffer_cplx(iloc,jloc) = real(Slk_mat%buffer_cplx(iloc,jloc)) + end do + end do + end if + + case ("L", "l") + ! Only the lower triangle of the global matrix was read. + if (is_cplx .and. is_hermitian) then + ij_loc=0 + do jloc=1,Slk_mat%sizeb_local(2) + do iloc=1,Slk_mat%sizeb_local(1) + call slk_mat%loc2glob(iloc, jloc, iglob, jglob) + ij_loc = ij_loc+1 + if (jglob>iglob) then ! diagonal elements are not forced to be real. + Slk_mat%buffer_cplx(iloc,jloc) = DCONJG(Slk_mat%buffer_cplx(iloc,jloc)) + end if + !if (iglob==jglob) Slk_mat%buffer_cplx(iloc,jloc) = real(Slk_mat%buffer_cplx(iloc,jloc)) + end do + end do + end if + + case default + ABI_BUG(" Wrong uplo: "//TRIM(uplo)) + end select + +end subroutine slk_symmetrize +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/slk_single_fview_read +!! NAME +!! slk_single_fview_read +!! +!! FUNCTION +!! Return an MPI datatype that can be used to read a scaLAPACK distributed matrix from +!! a binary file using MPI-IO. +!! +!! INPUTS +!! Slk_mat=Structured datatype defining the scaLAPACK distribution with the local buffer. +!! uplo=String specifying whether only the upper or lower triangular part of the global matrix is stored on disk: +!! = "U": Upper triangular is stored +!! = "L": Lower triangular is stored +!! = "A": Full matrix (used for general complex matrices) +!! [is_fortran_file]=.FALSE. is C stream is used. .TRUE. for writing Fortran binary files +!! with record markers. In this case etype is set xmpio_mpi_type_frm provided that +!! the mpi_type of the matrix element is commensurate with xmpio_mpi_type_frm. Defaults to .TRUE. +!! +!! OUTPUT +!! etype=Elementary data type (handle) defining the elementary unit used to access the file. +!! slk_type=New MPI type that can be used to instantiate the MPI-IO view for the Fortran file. +!! Note that the view assumes that the file pointer points to the FIRST Fortran record marker. +!! offset_err=Error code. A non-zero value signals that the global matrix is too large +!! for a single MPI-IO access (see notes below). +!! +!! NOTES +!! With (signed) Fortran integers, the maximum size of the file that +!! that can be read in one-shot is around 2Gb when etype is set to byte. +!! Using a larger etype might create portability problems (real data on machines using +!! integer*16 for the marker) since etype must be a multiple of the Fortran record marker +!! Due to the above reason, block_displ is given in bytes and must be stored in a integer +!! of kind XMPI_ADDRESS_KIND. If the displacement is too large, the routine returns +!! offset_err=1 so that the caller will know that several MPI-IO reads are needed to +!! read the local buffer. +!! +!! SOURCE + +subroutine slk_single_fview_read(Slk_mat,uplo,etype,slk_type,offset_err,is_fortran_file) + +!Arguments ------------------------------------ +!scalars + integer,intent(out) :: offset_err,slk_type,etype + character(len=*),intent(in) :: uplo + logical,optional,intent(in) :: is_fortran_file + class(matrix_scalapack),intent(in) :: Slk_mat + +!Local variables ------------------------------ +!scalars + integer :: jloc,iloc,iglob,jglob,nrows_glob,ncols_glob,mpi_err,nel + integer :: bsize_frm,mpi_type_elm,ij_loc,bsize_etype,bsize_elm + integer(XMPI_OFFSET_KIND) :: ijp_glob,my_offset,cpad_frm +!arrays + character(len=500) :: msg + integer,allocatable :: block_length(:),block_type(:) + integer(XMPI_ADDRESS_KIND),allocatable :: block_displ(:) + +!************************************************************************ + +#ifdef HAVE_MPI_IO +!@matrix_scalapack + bsize_frm = xmpio_bsize_frm ! Byte size of the Fortran record marker. + if (PRESENT(is_fortran_file)) then + if (.not.is_fortran_file) bsize_frm = 0 + end if + + call slk_mat%bsize_and_type(bsize_elm, mpi_type_elm) + + ! Global dimensions. + nrows_glob=Slk_mat%sizeb_global(1) + ncols_glob=Slk_mat%sizeb_global(2) + + ! Number of matrix elements treated by this node. + nel = PRODUCT(Slk_mat%sizeb_local(1:2)) + + !Cannot use MPI_type_CREATE_INDEXED_BLOCK since it is not correctly implemented in several MPI libraries. + !etype has to be set to MPI_BYTE, since the displacement in MPI structures is always in byte. + ! ABI_WARNING("Using MPI_type_STRUCT for the MPI-IO file view") + + etype = MPI_BYTE + call MPI_type_SIZE(etype,bsize_etype,mpi_err) + + ! Define the mapping between scaLAPACK buffer and the storage on file. + ABI_MALLOC(block_length, (nel+2)) + ABI_MALLOC(block_displ, (nel+2)) + ABI_MALLOC(block_type, (nel+2)) + block_length(1)=1 + block_displ (1)=0 + block_type (1)=MPI_LB + + ! Note that the view assumes that the file pointer points to the first Fortran record marker. + offset_err=0 + select case (uplo(1:1)) + case ("A","a") ! The entire global matrix is stored on disk. TODO can use contigous vectors for better access. + ij_loc=0 + do jloc=1,Slk_mat%sizeb_local(2) + do iloc=1,Slk_mat%sizeb_local(1) + call slk_mat%loc2glob(iloc, jloc, iglob, jglob) + ij_loc = ij_loc+1 + my_offset = 2*(jglob-1)*bsize_frm + bsize_frm + (jglob-1)*nrows_glob*bsize_elm + (iglob-1) * bsize_elm + my_offset = my_offset / bsize_etype + if (xmpio_max_address(my_offset)) offset_err=1 ! Test for possible wraparounds + block_displ (ij_loc+1) = my_offset + block_type (ij_loc+1) = mpi_type_elm + block_length(ij_loc+1) = 1 + end do + end do + + case ("U","u") ! Only the upper triangle of the global matrix is stored on disk. + ij_loc=0 + do jloc=1,Slk_mat%sizeb_local(2) + do iloc=1,Slk_mat%sizeb_local(1) + call slk_mat%loc2glob(iloc, jloc, iglob, jglob) + if (jglob>=iglob) then + ijp_glob = iglob + jglob*(jglob-1)/2 ! Index for packed form + cpad_frm = 2*(jglob-1)*bsize_frm + else + ijp_glob = jglob + iglob*(iglob-1)/2 ! Index for packed form + cpad_frm = 2*(iglob-1)*bsize_frm + end if + ij_loc = ij_loc+1 + my_offset = cpad_frm + bsize_frm + (ijp_glob-1) * bsize_elm + my_offset = my_offset / bsize_etype + if (xmpio_max_address(my_offset)) offset_err=1 ! Test for possible wraparounds + block_displ (ij_loc+1) = my_offset + block_type (ij_loc+1) = mpi_type_elm + block_length(ij_loc+1) = 1 + end do + end do + + case ("L","l") ! Only the lower triangle of the global matrix is stored on disk. + ij_loc=0 + do jloc=1,Slk_mat%sizeb_local(2) + do iloc=1,Slk_mat%sizeb_local(1) + call slk_mat%loc2glob(iloc, jloc, iglob, jglob) + if (jglob<=iglob) then + ijp_glob = iglob + (jglob-1)*(2*nrows_glob-jglob)/2 ! Index for packed form + cpad_frm = 2*(jglob-1)*bsize_frm + else + ijp_glob = jglob + (iglob-1)*(2*nrows_glob-iglob)/2 ! Index for packed form + cpad_frm = 2*(iglob-1)*bsize_frm + end if + ij_loc = ij_loc+1 + my_offset = cpad_frm + bsize_frm + (ijp_glob-1) * bsize_elm + my_offset = my_offset / bsize_etype + if (xmpio_max_address(my_offset)) offset_err=1 ! block_displ is usually integer*4. Test for possible wraparounds + block_displ (ij_loc+1) = my_offset + block_type (ij_loc+1) = mpi_type_elm + block_length(ij_loc+1) = 1 + end do + end do + + if (offset_err/=0) then ! just warn, let the caller handle the exception. + write(msg,"(3a)")& + " Global position index cannot be stored in standard Fortran integer ",ch10,& + " scaLAPACK matrix cannot be read with a single MPI-IO call ." + ABI_WARNING(msg) + end if + + case default + ABI_BUG(" Wrong uplo: "//TRIM(uplo)) + end select + + block_length(nel+2)= 1 + block_displ (nel+2)= ncols_glob * (nrows_glob*bsize_elm + 2*bsize_frm) / bsize_etype + block_type (nel+2)= MPI_UB + + call xmpio_type_struct(nel+2,block_length,block_displ,block_type,slk_type,mpi_err) + ABI_CHECK_MPI(mpi_err,"MPI_type_STRUCT") + + ABI_FREE(block_length) + ABI_FREE(block_displ) + ABI_FREE(block_type) + + call MPI_type_COMMIT(slk_type,mpi_err) + ABI_CHECK_MPI(mpi_err,"MPI_type_COMMIT") + +#else + ABI_ERROR("MPI-IO is mandatatory in slk_single_fview_read") +#endif + +end subroutine slk_single_fview_read +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/slk_single_fview_write +!! NAME +!! slk_single_fview_write +!! +!! FUNCTION +!! Returns an MPI datatype that can be used to write a scaLAPACK distributed matrix to +!! a binary file using MPI-IO. +!! +!! INPUTS +!! Slk_mat=Structured datatype defining the scaLAPACK distribution with the local buffer. +!! uplo=String specifying whether only the upper or lower triangular part of the global matrix is stored on disk: +!! = "U": Upper triangular is stored +!! = "L": Lower triangular is stored +!! = "A": Full matrix (used for general complex matrices) +!! [is_fortran_file]=.FALSE. is C stream is used. .TRUE. for writing Fortran binary files +!! with record marker. In this case etype is set xmpio_mpi_type_frm provided that +!! the mpi_type of the matrix element is commensurate with xmpio_mpi_type_frm. Defaults to .TRUE. +!! glob_subarray(2,2) = Used to select the subarray of the global matrix. Used only when uplo="All" +!! glob_subarray(:,1)=starting global coordinates of the subarray in each dimension +!! (array of nonnegative integers >=1, <=array_of_sizes) +!! glob_subarray(:,2)=Number of elements in each dimension of the subarray (array of positive integers) +!! +!! OUTPUT +!! nelw=Number of elements to be written. +!! etype=Elementary data type (handle) defining the elementary unit used to access the file. +!! slk_type=New MPI type that can be used to instantiate the MPI-IO view for the Fortran file. +!! Note that the view assumes that the file pointer points to the FIRST Fortran record marker. +!! offset_err=Error code. A non-zero value signals that the global matrix is too large +!! for a single MPI-IO access (see notes below). +!! +!! SIDE EFFECTS +!! elw2slk(:,:) = +!! input: pointer to null(). +!! output: elw2slk(2,nelw) contains the local coordinates of the matrix elements to be written. +!! (useful only if the upper or lower triangle of the global matrix has to be written or when +!! uplo="all" but a global subarray is written. +!! +!! NOTES +!! With (signed) Fortran integers, the maximum size of the file that +!! that can be read in one-shot is around 2Gb when etype is set to byte. +!! Using a larger etype might create portability problems (real data on machines using +!! integer*16 for the marker) since etype must be a multiple of the Fortran record marker +!! Due to the above reason, block_displ is given in bytes and must be stored in a Fortran +!! integer of kind XMPI_ADDRESS_KIND. If the displacement is too large, the routine returns +!! offset_err=1 so that the caller will know that several MPI-IO reads are needed to +!! write the local buffer. +!! +!! SOURCE + +subroutine slk_single_fview_write(Slk_mat,uplo,nelw,elw2slk,etype,slk_type,offset_err,is_fortran_file,glob_subarray) + +!Arguments ------------------------------------ +!scalars + class(matrix_scalapack),intent(in) :: Slk_mat + integer,intent(out) :: offset_err,slk_type,etype,nelw + character(len=*),intent(in) :: uplo + logical,optional,intent(in) :: is_fortran_file +!arrays + integer,pointer :: elw2slk(:,:) + integer,optional,intent(in) :: glob_subarray(2,2) + +!Local variables ------------------------------ +!scalars + integer :: jloc,iloc,iglob,jglob,nrows_glob,ncols_glob,mpi_err,nel_max + integer :: grow_min,grow_max,gcol_min,gcol_max + integer :: bsize_frm,mpi_type_elm,ij_loc,bsize_elm + integer(XMPI_OFFSET_KIND) :: ijp_glob,my_offset,cpad_frm +!arrays + character(len=500) :: msg + integer,allocatable :: block_length(:),block_type(:) + integer(XMPI_ADDRESS_KIND),allocatable :: block_displ(:) + +!************************************************************************ + +#ifdef HAVE_MPI_IO +!@matrix_scalapack + bsize_frm = xmpio_bsize_frm ! Byte size of the Fortran record marker. + if (PRESENT(is_fortran_file)) then + if (.not.is_fortran_file) bsize_frm = 0 + end if + + if (PRESENT(glob_subarray).and..not.firstchar(uplo, ["A"])) then + ABI_ERROR("glob_subarray should not be used when uplo/=All") + end if + + call slk_mat%bsize_and_type(bsize_elm, mpi_type_elm) + + ! Global dimensions. + nrows_glob=Slk_mat%sizeb_global(1) + ncols_glob=Slk_mat%sizeb_global(2) + + ! Number of matrix elements treated by this node. + nel_max = PRODUCT(Slk_mat%sizeb_local(1:2)) + + ABI_MALLOC(elw2slk,(2,nel_max)) + elw2slk=0 + + ! Cannot use MPI_type_CREATE_INDEXED_BLOCK since it is not correctly implemented in several MPI libraries. + ! etype has to be set to MPI_BYTE, since the displacement in MPI structures is always in byte. + etype = MPI_BYTE + + ! Define the mapping between scaLAPACK buffer and the storage on file. + ABI_MALLOC(block_length, (nel_max+2)) + ABI_MALLOC(block_displ, (nel_max+2)) + ABI_MALLOC(block_type, (nel_max+2)) + block_length(1)=1 + block_displ (1)=0 + block_type (1)=MPI_LB + + ! Note that the view assumes that the file pointer points to the first Fortran record marker. + offset_err=0 + + select case (uplo(1:1)) + case ("A","a") + ! The entire global matrix is written on disk. TODO can use contigous vectors for better access. + grow_min=1; grow_max=nrows_glob + gcol_min=1; gcol_max=ncols_glob + if (PRESENT(glob_subarray)) then ! subarray access. + grow_min = glob_subarray(1,1) + gcol_min = glob_subarray(2,1) + grow_max = grow_min + glob_subarray(1,2) -1 + gcol_max = gcol_min + glob_subarray(2,2) -1 + end if + + ij_loc=0 + do jloc=1,Slk_mat%sizeb_local(2) + do iloc=1,Slk_mat%sizeb_local(1) + call slk_mat%loc2glob(iloc, jloc, iglob, jglob) + if (iglob>=grow_min.and.iglob<=grow_max .and. & ! glob_subarray element. + jglob>=gcol_min.and.jglob<=gcol_max) then + ij_loc = ij_loc+1 + my_offset = 2*(jglob-1)*bsize_frm + bsize_frm + (jglob-1)*nrows_glob*bsize_elm + (iglob-1) * bsize_elm + if (xmpio_max_address(my_offset)) offset_err=1 ! Test for possible wraparounds + block_displ (ij_loc+1) = my_offset + block_type (ij_loc+1) = mpi_type_elm + block_length(ij_loc+1) = 1 + elw2slk(:,ij_loc) = (/iloc,jloc/) ! useless when subarray are not used but oh well! + end if + end do + end do + + case ("U","u") + ! Only the upper triangle of the global matrix is stored on disk. + ij_loc=0 + do jloc=1,Slk_mat%sizeb_local(2) + do iloc=1,Slk_mat%sizeb_local(1) + call slk_mat%loc2glob(iloc, jloc, iglob, jglob) + if (jglob>=iglob) then + ijp_glob = iglob + jglob*(jglob-1)/2 ! Index for packed form + cpad_frm = 2*(jglob-1)*bsize_frm + ij_loc = ij_loc+1 + my_offset = cpad_frm + bsize_frm + (ijp_glob-1) * bsize_elm + if (xmpio_max_address(my_offset)) offset_err=1 ! Test for possible wraparounds + block_displ (ij_loc+1) = my_offset + block_type (ij_loc+1) = mpi_type_elm + block_length(ij_loc+1) = 1 + elw2slk(:,ij_loc) = (/iloc,jloc/) + end if + end do + end do + + case ("L","l") + ! Only the lower triangle of the global matrix is stored on disk. + ij_loc=0 + do jloc=1,Slk_mat%sizeb_local(2) + do iloc=1,Slk_mat%sizeb_local(1) + call slk_mat%loc2glob(iloc, jloc, iglob, jglob) + if (jglob<=iglob) then + ijp_glob = iglob + (jglob-1)*(2*nrows_glob-jglob)/2 ! Index for packed form + cpad_frm = 2*(jglob-1)*bsize_frm + ij_loc = ij_loc+1 + my_offset = cpad_frm + bsize_frm + (ijp_glob-1) * bsize_elm + if (xmpio_max_address(my_offset)) offset_err=1 ! block_displ is usually integer*4. Test for possible wraparounds + block_displ (ij_loc+1) = my_offset + block_type (ij_loc+1) = mpi_type_elm + block_length(ij_loc+1) = 1 + elw2slk(:,ij_loc) = (/iloc,jloc/) + end if + end do + end do + + case default + ABI_BUG(" Wrong uplo: "//TRIM(uplo)) + end select + + if (offset_err/=0) then ! just warn, let the caller handle the exception. + write(msg,"(3a)")& + "Global position index cannot be stored in standard Fortran integer ",ch10,& + "scaLAPACK matrix cannot be read with a single MPI-IO call ." + ABI_WARNING(msg) + end if + + ! Final number of matrix elements that will be written by this node. + nelw = ij_loc + + block_length(nelw+2)= 1 + block_displ (nelw+2)= ncols_glob * (nrows_glob*bsize_elm + 2*bsize_frm) + block_type (nelw+2)= MPI_UB + + call xmpio_type_struct(nelw+2,block_length,block_displ,block_type,slk_type,mpi_err) + ABI_CHECK_MPI(mpi_err, "MPI_type_STRUCT") + + ABI_FREE(block_length) + ABI_FREE(block_displ) + ABI_FREE(block_type) + + call MPI_type_COMMIT(slk_type,mpi_err) + ABI_CHECK_MPI(mpi_err, "MPI_type_COMMIT") + +#else + ABI_ERROR("MPI-IO is mandatatory in slk_single_fview_read") +#endif + +end subroutine slk_single_fview_write +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_slk/slk_bsize_and_type +!! NAME +!! slk_bsize_and_type +!! +!! FUNCTION +!! Returns the byte size and the MPI datatype associated to the matrix elements +!! that are stored in the ScaLAPACK_matrix +!! +!! INPUTS +!! Slk_mat=Structured datatype defining the scaLAPACK distribution with the local buffer +!! +!! OUTPUT +!! bsize_elm=Byte size of the matrix element. +!! mpi_type_elm=MPI datatype of the matrix element. +!! +!! SOURCE + +subroutine slk_bsize_and_type(Slk_mat, bsize_elm, mpi_type_elm) + +!Arguments ------------------------------------ +!scalars + class(matrix_scalapack),intent(in) :: Slk_mat + integer,intent(out) :: bsize_elm,mpi_type_elm + +!Local variables ------------------------------ +!scalars + integer :: ierr + character(len=500) :: msg + +! ************************************************************************ + + ! @matrix_scalapack + ierr=0 +#ifdef HAVE_MPI + if (allocated(Slk_mat%buffer_cplx)) then + ierr = ierr + 1 + mpi_type_elm = MPI_DOUBLE_COMPLEX + bsize_elm = xmpi_bsize_dpc + end if + + if (allocated(Slk_mat%buffer_real)) then + ierr = ierr + 1 + mpi_type_elm = MPI_DOUBLE_PRECISION + bsize_elm = xmpi_bsize_dp + end if +#endif + + ! One and only one buffer should be allocated. + if (ierr /= 1) then + write(msg,'(a,i0)')" ScaLAPACK buffers are not allocated correctly, ierr= ",ierr + ABI_ERROR(msg) + end if + +end subroutine slk_bsize_and_type +!!*** + +end module m_slk +!!*** diff --git a/GX-PAW/common/src/28_numeric_noabirule/m_slk.o b/GX-PAW/common/src/28_numeric_noabirule/m_slk.o new file mode 100644 index 00000000..6834ba89 Binary files /dev/null and b/GX-PAW/common/src/28_numeric_noabirule/m_slk.o differ diff --git a/GX-PAW/common/src/28_numeric_noabirule/m_sort.F90 b/GX-PAW/common/src/28_numeric_noabirule/m_sort.F90 new file mode 100644 index 00000000..cac05bdc --- /dev/null +++ b/GX-PAW/common/src/28_numeric_noabirule/m_sort.F90 @@ -0,0 +1,369 @@ +!!****m* ABINIT/m_sort +!! NAME +!! m_sort +!! +!! FUNCTION +!! Sorting algorithms. +!! +!! COPYRIGHT +!! Copyright (C) 2008-2024 ABINIT group (XG) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" + +module m_sort + + use defs_basis + use m_errors + use m_profiling_abi + + implicit none + + private + + ! Low-level routines + public :: sort_dp ! Sort double precision array + public :: sort_int ! Sort integer array + + ! Helper functions to perform common operations. + public :: sort_rpts ! Sort list of real points by |r| + public :: sort_rvals ! Out-of-place sort of real values + +CONTAINS !==================================================================================================== +!!*** + +!!****f* m_sort/sort_dp +!! NAME +!! sort_dp +!! +!! FUNCTION +!! Sort double precision array list(n) into ascending numerical order using Heapsort +!! algorithm, while making corresponding rearrangement of the integer +!! array iperm. Consider that two double precision numbers within tolerance tol are equal. +!! +!! INPUTS +!! n: dimension of the list +!! tol: numbers within tolerance are equal +!! list(n) intent(inout) list of double precision numbers to be sorted +!! iperm(n) intent(inout) iperm(i)=i (very important) +!! +!! OUTPUT +!! list(n) sorted list +!! iperm(n) index of permutation giving the right ascending order: +!! the i-th element of the ouput ordered list had index iperm(i) in the input list. +!! +!! SOURCE + +subroutine sort_dp(n, list, iperm, tol) + +!Arguments ------------------------------------ +!scalars + integer, intent(in) :: n + integer, intent(inout) :: iperm(n) + real(dp), intent(inout) :: list(n) + real(dp), intent(in) :: tol + +!Local variables------------------------------- +!scalars + integer :: l,ir,iap,i,j + real(dp) :: ap + character(len=500) :: msg + + if (n==1) then + +! Accomodate case of array of length 1: already sorted! + return + + else if (n<1) then + +! Should not call with n<1 + write(msg, "(a,i0,2a)")& + "sort_dp has been called with array length n= ",n, ch10, & + "having a value less than 1. This is not allowed." + ABI_ERROR(msg) + + else ! n>1 + +! Conduct the usual sort + + l=n/2+1 + ir=n + + do ! Infinite do-loop + + if (l>1) then + + l=l-1 + ap=list(l) + iap=iperm(l) + + else ! l<=1 + + ap=list(ir) + iap=iperm(ir) + list(ir)=list(1) + iperm(ir)=iperm(1) + ir=ir-1 + + if (ir==1) then + list(1)=ap + iperm(1)=iap + exit ! This is the end of this algorithm + end if + + end if ! l>1 + + i=l + j=l+l + + do while (j<=ir) + if (j1 + +end subroutine sort_dp +!!*** + +!!****f* m_sort/sort_int +!! NAME +!! sort_int +!! +!! FUNCTION +!! Sort integer array list(n) into ascending numerical order using Heapsort +!! algorithm, while making corresponding rearrangement of the integer array iperm. +!! +!! INPUTS +!! n: dimension of the list +!! list(n) intent(inout) list of double precision numbers to be sorted +!! iperm(n) intent(inout) iperm(i)=i (very important) +!! +!! OUTPUT +!! list(n): sorted list +!! iperm(n): index of permutation given the right ascending order +!! the i-th element of the ouput ordered list had index iperm(i) in the input list. +!! +!! SOURCE + +subroutine sort_int(n, list, iperm) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: n + integer,intent(inout) :: list(n),iperm(n) + +!Local variables------------------------------- +!scalars + integer :: l,ir,i,j,ip,ipp + character(len=500) :: msg +! ************************************************************************* + + if (n==1) then + +! Accomodate case of array of length 1: already sorted! + return + + else if (n<1) then + +! Should not call with n<1 + write(msg, "(a,i0,2a)")& + "sort_int has been called with array length n= ",n, ch10, & + "having a value less than 1. This is not allowed." + ABI_ERROR(msg) + + else ! n>1 + +! Conduct the usual sort + + l=n/2+1 + ir=n + + do ! Infinite do-loop + + if (l>1) then + + l=l-1 + ip=list(l) + ipp=iperm(l) + + else + + ip=list(ir) + ipp=iperm(ir) + list(ir)=list(1) + iperm(ir)=iperm(1) + ir=ir-1 + + if (ir==1) then + list(1)=ip + iperm(1)=ipp + exit ! This is the end of this algorithm + end if + + end if ! l>1 + + i=l + j=l+l + + do while (j<=ir) + if (j1 + +end subroutine sort_int +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_sort/sort_rpts +!! NAME +!! sort_rpts +!! +!! FUNCTION +!! Sort list of real space 3d-points by norm (ascending order) +!! Input list is not modified. +!! +!! INPUTS +!! n: dimension of the list +!! rpts(3, n): points in reduced coordinates +!! metric: Metric used to compute |r|. +!! [tol]: numbers within tolerance are equal. +!! +!! OUTPUT +!! iperm(n) index of permutation giving the right ascending order: +!! the i-th element of the ordered list had index iperm(i) in rpts. +!! [rmod(n)]= list of sorted |r| values. +!! +!! SOURCE + +subroutine sort_rpts(n, rpts, metric, iperm, tol, rmod) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: n + integer,allocatable,intent(out) :: iperm(:) + real(dp),optional,allocatable,intent(out) :: rmod(:) + real(dp),optional,intent(in) :: tol +!arrays + real(dp),intent(in) :: rpts(3,n), metric(3,3) + +!Local variables------------------------------- +!scalars + integer :: ii + real(dp) :: my_tol +!arrays + real(dp),allocatable :: my_rmod(:) + +!************************************************************************ + + my_tol = tol12; if (present(tol)) my_tol = tol + + ABI_MALLOC(my_rmod, (n)) + do ii=1,n + my_rmod(ii) = sqrt(dot_product(rpts(:, ii), matmul(metric, rpts(:, ii)))) + end do + ABI_MALLOC(iperm, (n)) + iperm = [(ii, ii=1,n)] + call sort_dp(n, my_rmod, iperm, my_tol) + + if (present(rmod)) then + call move_alloc(my_rmod, rmod) + else + ABI_FREE(my_rmod) + end if + +end subroutine sort_rpts +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_sort/sort_rvals +!! NAME +!! sort_rvals +!! +!! FUNCTION +!! Sort list of real values (ascending order) +!! Input list is not modified. +!! +!! INPUTS +!! n: dimension of the list +!! in_vals(n): input weigts. +!! [tol]: tolerance for comparison +!! +!! OUTPUT +!! iperm(n) index of permutation giving the right ascending order: +!! the i-th element of the ordered list had index iperm(i) in in_vals. +!! [sorted_in_vals(n)]= list of sorted weigts. +!! +!! SOURCE + +subroutine sort_rvals(n, in_vals, iperm, sorted_vals, tol) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: n + real(dp),intent(in) :: in_vals(n) + integer,allocatable,intent(out) :: iperm(:) + real(dp),allocatable,intent(out) :: sorted_vals(:) + real(dp),optional,intent(in) :: tol + +!Local variables------------------------------- +!scalars + integer :: ii + real(dp) :: my_tol + +!************************************************************************ + + my_tol = tol12; if (present(tol)) my_tol = tol + + ABI_MALLOC(sorted_vals, (n)) + sorted_vals = in_vals + ABI_MALLOC(iperm, (n)) + iperm = [(ii, ii=1,n)] + call sort_dp(n, sorted_vals, iperm, my_tol) + +end subroutine sort_rvals +!!*** + +end module m_sort +!!*** diff --git a/GX-PAW/common/src/28_numeric_noabirule/m_sort.o b/GX-PAW/common/src/28_numeric_noabirule/m_sort.o new file mode 100644 index 00000000..ce3b7228 Binary files /dev/null and b/GX-PAW/common/src/28_numeric_noabirule/m_sort.o differ diff --git a/GX-PAW/common/src/28_numeric_noabirule/m_splines.F90 b/GX-PAW/common/src/28_numeric_noabirule/m_splines.F90 new file mode 100644 index 00000000..bd821901 --- /dev/null +++ b/GX-PAW/common/src/28_numeric_noabirule/m_splines.F90 @@ -0,0 +1,1036 @@ +!!****m* ABINIT/m_splines +!! NAME +!! m_splines +!! +!! FUNCTION +!! This module contains routines for spline interpolation. +!! +!! COPYRIGHT +!! Copyright (C) 2010-2024 ABINIT group (YP, BAmadon) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" + +module m_splines + + use defs_basis + use m_abicore + use m_errors + + use m_fstrings, only : sjoin, itoa, ftoa + !use m_time, only : timab + + implicit none + + public :: splfit + public :: spline + public :: spline_bicubic + public :: spline_c + public :: spline_complex + public :: spline_integrate + public :: splint + public :: splint_complex + + !FIXME deprecated + public :: intrpl + +! ************************************************************************* + +contains +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_splines/splfit +!! NAME +!! splfit +!! +!! FUNCTION +!! Evaluate cubic spline fit to get function values on input set of ORDERED, UNFORMLY SPACED points. +!! Optionally gives derivatives (first and second) at those points too. +!! If point lies outside the range of arg, assign the extremal +!! point values to these points, and zero derivative. +!! +!! INPUTS +!! arg(numarg)=equally spaced arguments (spacing de) for data to which spline was fit. +!! fun(numarg,2)=function values to which spline was fit and spline +!! fit to second derivatives (from Numerical Recipes spline). +!! ider= see above +!! newarg(numnew)=new values of arguments at which function is desired. +!! numarg=number of arguments at which spline was fit. +!! numnew=number of arguments at which function values are desired. +!! +!! OUTPUT +!! derfun(numnew)=(optional) values of first or second derivative of function. +!! This is only computed for ider=1 or 2; otherwise derfun not used. +!! newfun(numnew)=values of function at newarg(numnew). +!! This is only computed for ider=0 or 1. +!! +!! NOTES +!! if ider=0, compute only the function (contained in fun) +!! if ider=1, compute the function (contained in fun) and its first derivative (in derfun) +!! if ider=2, compute only the second derivative of the function (in derfun) +!! +!! SOURCE + +subroutine splfit(arg, derfun, fun, ider, newarg, newfun, numarg, numnew) + + integer, intent(in) :: ider, numarg, numnew + real(dp), intent(in) :: arg(numarg), fun(numarg,2), newarg(numnew) + real(dp), intent(out) :: derfun(numnew) + real(dp), intent(inout) :: newfun(numnew) + +!Local variables--------------------------------------- + integer :: i,jspl + real(dp) :: argmin,de,d,aa,bb,cc,dd,de2_dby_six,de_dby_six + !real(dp) :: tsec(2) + +! ************************************************************************* + + ! argmin is smallest x value in spline fit; de is uniform spacing of spline argument + argmin = arg(1) + de = (arg(numarg) - argmin) / dble(numarg-1) + de2_dby_six = de**2 / six + de_dby_six = de / six + + if (de < tol12) then + ABI_ERROR(sjoin('spacing should be strictly positive, while de is: ', ftoa(de))) + endif + + jspl = -1 + + ! Do one loop for no grads, other for grads + select case (ider) + case (0) + + ! Spline index loop for no grads: + do i=1,numnew + if (newarg(i) >= arg(numarg)) then + ! function values are being requested outside range of data.',a1,' + ! Function and slope will be set to values at upper end of data. + + newfun(i) = fun(numarg,1) + + else if (newarg(i) <= arg(1)) then + newfun(i) = fun(1,1) + + else + jspl = 1 + int((newarg(i) - argmin)/de) + d = newarg(i) - arg(jspl) + bb = d / de + aa = one - bb + cc = aa*(aa**2 -one) * de2_dby_six + dd = bb*(bb**2 -one) * de2_dby_six + newfun(i)= aa * fun(jspl,1) + bb*fun(jspl+1,1) + cc*fun(jspl,2) + dd*fun(jspl+1,2) + end if + enddo + + case (1) + + ! Spline index loop includes grads: + do i=1,numnew + + if (newarg(i) >= arg(numarg)) then + newfun(i) = fun(numarg,1) + derfun(i) = zero + + else if (newarg(i) <= arg(1)) then + newfun(i) = fun(1,1) + derfun(i) = zero + + else + ! cubic spline interpolation: + jspl = 1 + int((newarg(i) - arg(1)) / de) + d = newarg(i) - arg(jspl) + bb = d / de + aa = one - bb + cc = aa*(aa**2 - one) * de2_dby_six + dd = bb*(bb**2 - one) * de2_dby_six + newfun(i) = aa*fun(jspl,1) + bb*fun(jspl+1,1) + cc*fun(jspl,2) + dd*fun(jspl+1,2) + ! spline fit to first derivative: + ! note correction of Numerical Recipes sign error + derfun(i) = (fun(jspl+1,1)-fun(jspl,1)) / de + & + (-(3.d0*aa**2 -one) * fun(jspl,2) + (3.d0*bb**2 -one) * fun(jspl+1,2)) * de_dby_six + + end if + enddo + + case (2) + + do i=1,numnew + + if (newarg(i) >= arg(numarg)) then + derfun(i) = zero + + else if (newarg(i) <= arg(1)) then + derfun(i) = zero + + else + ! cubic spline interpolation: + jspl = 1 + int((newarg(i) - argmin) / de) + d = newarg(i) - arg(jspl) + bb = d / de + aa = one - bb + ! second derivative of spline (piecewise linear function) + derfun(i) = aa*fun(jspl,2) + bb*fun(jspl+1,2) + + end if + enddo + + case default + ABI_ERROR(sjoin("Invalid ider:", itoa(ider))) + end select + +end subroutine splfit +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_splines/spline +!! NAME +!! spline +!! +!! FUNCTION +!! SPLINE (originally SPLINE_CUBIC_SET) computes the second derivatives +!! of a cubic spline. +!! +!! INPUTS +!! Input, integer N, the number of data points; N must be at least 2. +!! In the special case where N = 2 and IBCBEG = IBCEND = 0, the +!! spline will actually be linear. +!! +!! Input, double precision T(N), the knot values, that is, the points where data +!! is specified. The knot values should be distinct, and increasing. +!! +!! Input, double precision Y(N), the data values to be interpolated. +!! +!! Input, double precision YBCBEG, YBCEND, the values to be used in the boundary +!! conditions if IBCBEG or IBCEND is equal to 1 or 2. +!! +!! OUTPUT +!! Output, double precision YPP(N), the second derivatives of the cubic spline. +!! Work space, double precision DIAG(N) - should be removed ... +!! +!! SOURCE + +subroutine spline( t, y, n, ybcbeg, ybcend, ypp ) + +!******************************************************************************* +! +! Discussion: +! +! For data interpolation, the user must call SPLINE_CUBIC_SET to +! determine the second derivative data, passing in the data to be +! interpolated, and the desired boundary conditions. +! +! The data to be interpolated, plus the SPLINE_CUBIC_SET output, +! defines the spline. The user may then call SPLINE_CUBIC_VAL to +! evaluate the spline at any point. +! +! The cubic spline is a piecewise cubic polynomial. The intervals +! are determined by the "knots" or abscissas of the data to be +! interpolated. The cubic spline has continous first and second +! derivatives over the entire interval of interpolation. +! +! For any point T in the interval T(IVAL), T(IVAL+1), the form of +! the spline is +! +! SPL(T) = A(IVAL) +! + B(IVAL) * ( T - T(IVAL) ) +! + C(IVAL) * ( T - T(IVAL) )**2 +! + D(IVAL) * ( T - T(IVAL) )**3 +! +! If we assume that we know the values Y(*) and YPP(*), which represent +! the values and second derivatives of the spline at each knot, then +! the coefficients can be computed as: +! +! A(IVAL) = Y(IVAL) +! B(IVAL) = ( Y(IVAL+1) - Y(IVAL) ) / ( T(IVAL+1) - T(IVAL) ) +! - ( YPP(IVAL+1) + 2 * YPP(IVAL) ) * ( T(IVAL+1) - T(IVAL) ) / 6 +! C(IVAL) = YPP(IVAL) / 2 +! D(IVAL) = ( YPP(IVAL+1) - YPP(IVAL) ) / ( 6 * ( T(IVAL+1) - T(IVAL) ) ) +! +! Since the first derivative of the spline is +! +! SPL'(T) = B(IVAL) +! + 2 * C(IVAL) * ( T - T(IVAL) ) +! + 3 * D(IVAL) * ( T - T(IVAL) )**2, +! +! the requirement that the first derivative be continuous at interior +! knot I results in a total of N-2 equations, of the form: +! +! B(IVAL-1) + 2 C(IVAL-1) * (T(IVAL)-T(IVAL-1)) +! + 3 * D(IVAL-1) * (T(IVAL) - T(IVAL-1))**2 = B(IVAL) +! +! or, setting H(IVAL) = T(IVAL+1) - T(IVAL) +! +! ( Y(IVAL) - Y(IVAL-1) ) / H(IVAL-1) +! - ( YPP(IVAL) + 2 * YPP(IVAL-1) ) * H(IVAL-1) / 6 +! + YPP(IVAL-1) * H(IVAL-1) +! + ( YPP(IVAL) - YPP(IVAL-1) ) * H(IVAL-1) / 2 +! = +! ( Y(IVAL+1) - Y(IVAL) ) / H(IVAL) +! - ( YPP(IVAL+1) + 2 * YPP(IVAL) ) * H(IVAL) / 6 +! +! or +! +! YPP(IVAL-1) * H(IVAL-1) + 2 * YPP(IVAL) * ( H(IVAL-1) + H(IVAL) ) +! + YPP(IVAL) * H(IVAL) +! = +! 6 * ( Y(IVAL+1) - Y(IVAL) ) / H(IVAL) +! - 6 * ( Y(IVAL) - Y(IVAL-1) ) / H(IVAL-1) +! +! Boundary conditions must be applied at the first and last knots. +! The resulting tridiagonal system can be solved for the YPP values. +! +! Modified: +! +! 07 February 1999 +! 28 November 2004 XGonze : double precision +! make arguments similar to the Numeric Recipes routine +! also use algorithmics similar to the Numeric Recipes routine +! +! Author: +! +! John Burkardt +! (XGonze got it from http://www.psc.edu/~burkardt/src/spline/spline.html) +! +! Parameters: +! +! Input, integer N, the number of data points; N must be at least 2. +! In the special case where N = 2 and IBCBEG = IBCEND = 0, the +! spline will actually be linear. +! +! Input, double precision T(N), the knot values, that is, the points where data +! is specified. The knot values should be distinct, and increasing. +! +! Input, double precision Y(N), the data values to be interpolated. +! +! Input, double precision YBCBEG, YBCEND, the values to be used in the boundary +! conditions if IBCBEG or IBCEND is equal to 1 or 2. +! +! Output, double precision YPP(N), the second derivatives of the cubic spline. +! +! Work space, double precision DIAG(N) - should be removed ... +! +! +! XG041127 : In the initial implementation, one had the control on +! IBCBEG and IBCEND. Now, they are determined by the values +! of YBCBEG, YBCEND. Option 2 has been disabled. +! +! Input, integer IBCBEG, left boundary condition flag: +! +! 0: the spline should be a quadratic over the first interval; +! 1: the first derivative at the left endpoint should be YBCBEG; +! 2: the second derivative at the left endpoint should be YBCBEG. +! +! Input, integer IBCEND, right boundary condition flag: +! +! 0: the spline should be a quadratic over the last interval; +! 1: the first derivative at the right endpoint should be YBCEND; +! 2: the second derivative at the right endpoint should be YBCEND. + + integer, intent(in) :: n + real(dp), intent(in) :: t(n) + real(dp), intent(in) :: y(n) + real(dp), intent(in) :: ybcbeg + real(dp), intent(in) :: ybcend + + real(dp), intent(out) :: ypp(n) + + integer :: ibcbeg + integer :: ibcend + integer :: i,k + real(dp) :: ratio,pinv + real(dp), allocatable :: tmp(:) +! +! Check. +! + if ( n <= 1 ) then + write(std_out,* ) ' ' + write(std_out,* ) 'SPLINE_CUBIC_SET - Fatal error!' + write(std_out,* ) ' The number of knots must be at least 2.' + write(std_out,* ) ' The input value of N = ', n + ABI_ERROR("Fatal error") + end if + + ABI_MALLOC(tmp,(n)) + + do i = 1, n-1 + if ( t(i) >= t(i+1) ) then + write(std_out,* ) ' ' + write(std_out,* ) 'SPLINE_CUBIC_SET - Fatal error!' + write(std_out,* ) ' The knots must be strictly increasing, but' + write(std_out,* ) ' T(', i,') = ', t(i) + write(std_out,* ) ' T(',i+1,') = ', t(i+1) + ABI_ERROR("Fatal error") + end if + end do +! +! XG041127 + ibcbeg=1 ; ibcend=1 + if(ybcbeg>1.0d+30)ibcbeg=0 + if(ybcend>1.0d+30)ibcend=0 +! +! Set the first and last equations. +! + if ( ibcbeg == 0 ) then + ypp(1) = 0.d0 + tmp(1) = 0.d0 + else if ( ibcbeg == 1 ) then + ypp(1) = -0.5d0 + tmp(1) = (3.d0/(t(2)-t(1)))*((y(2)-y(1))/(t(2)-t(1))-ybcbeg) + end if + if ( ibcend == 0 ) then + ypp(n) = 0.d0 + tmp(n) = 0.d0 + else if ( ibcend == 1 ) then + ypp(n) = 0.5d0 + tmp(n) = (3.d0/(t(n)-t(n-1)))*(ybcend-(y(n)-y(n-1))/(t(n)-t(n-1))) + end if + +! +! Set the intermediate equations. +! + do i=2,n-1 + ratio=(t(i)-t(i-1))/(t(i+1)-t(i-1)) + pinv = 1.0d0/(ratio*ypp(i-1) + 2.0d0) + ypp(i) = (ratio-1.0d0)*pinv + tmp(i)=(6.0d0*((y(i+1)-y(i))/(t(i+1)-t(i))-(y(i)-y(i-1)) & +& /(t(i)-t(i-1)))/(t(i+1)-t(i-1))-ratio*tmp(i-1))*pinv + if (abs(tmp(i))<1.d5*tiny(0.d0)) tmp(i)=0.d0 !MT20050927 + enddo + +! Solve the equations + ypp(n) = (tmp(n)-ypp(n)*tmp(n-1))/(ypp(n)*ypp(n-1)+1.0d0) + do k=n-1,1,-1 + ypp(k)=ypp(k)*ypp(k+1)+tmp(k) + enddo + + ABI_FREE(tmp) +end subroutine spline +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_splines/spline_bicubic +!! NAME +!! spline_bicubic +!! +!! FUNCTION +!! Generates coefficients for bicubic spline interpolation. +!! +!! INPUTS +!! n1 = length of first dimension +!! n2 = length of second dimension +!! x1 = positions on first dimension +!! x2 = positions on second dimension +!! y = function values on the (x1,x2) grid +!! der1_x1 = first derivative of y wrt x1 +!! der1_x2 = first derivative of y wrt x2 +!! der2_x1x2 = second-order cross-derivative of y wrt x1x2 +!! +!! OUTPUT +!! spl_c = spline coefficients +!! +!! NOTES +!! Adapted from Numerical Recipes and libbci. +!! +!! SOURCE + +subroutine spline_bicubic(n1,n2,x1,x2,y,der1_x1,der1_x2,der2_x1x2,spl_c) + + integer,intent(in) :: n1,n2 + real(dp),intent(in) :: x1(n1),x2(n2),y(n1,n2) + real(dp),intent(in) :: der1_x1(n1,n2),der1_x2(n1,n2),der2_x1x2(n1,n2) + real(dp),intent(out):: spl_c(4,4,n1,n2) + + integer :: i1,i2 + real(dp) :: dx1,dx2,wt(16,16),z(16) + + data wt /1,0,-3,2,4*0,-3,0,9,-6,2,0,-6,4, & +& 8*0,3,0,-9,6,-2,0,6,-4,10*0,9,-6,2*0,-6,4,2*0,3,-2,6*0,-9,6, & +& 2*0,6,-4,4*0,1,0,-3,2,-2,0,6,-4,1,0,-3,2,8*0,-1,0,3,-2,1,0,-3, & +& 2,10*0,-3,2,2*0,3,-2,6*0,3,-2,2*0,-6,4,2*0,3,-2,0,1,-2,1,5*0, & +& -3,6,-3,0,2,-4,2,9*0,3,-6,3,0,-2,4,-2,10*0,-3,3,2*0,2,-2,2*0, & +& -1,1,6*0,3,-3,2*0,-2,2,5*0,1,-2,1,0,-2,4,-2,0,1,-2,1,9*0,-1,2, & +& -1,0,1,-2,1,10*0,1,-1,2*0,-1,1,6*0,-1,1,2*0,2,-2,2*0,-1,1/ + + ! Set coefficients for i1= xfit(i)) then + if(xspline(k-1) <= xfit(i)) then + right = k + left = k-1 + else + if (k-1.eq.1 .and. i.eq.1) then + ABI_ERROR('xfit(1) < xspline(1)') + !my_err=my_err+1 + !exit + else + ABI_ERROR('xfit not properly ordered') + end if + end if + delarg= xspline(right) - xspline(left) + invdelarg= 1.0d0/delarg + aa= (xspline(right)-xfit(i))*invdelarg + bb= (xfit(i)-xspline(left))*invdelarg + + yfit(i) = aa*yspline(left) + bb*yspline(right) & +& +( (aa*aa*aa-aa)*ysplin2(left) + & +& (bb*bb*bb-bb)*ysplin2(right) ) *delarg*delarg/6.0d0 + exit + end if + end do ! k + ! + if (k==nspline+1) my_err=my_err+1 ! xfit not found + end do ! i + + if (PRESENT(ierr)) ierr=my_err + +end subroutine splint +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_splines/splint_complex +!! NAME +!! splint_complex +!! +!! FUNCTION +!! Interface to the usual splint to compute *complex* spline interpolation. There is no hypothesis +!! about the spacing of the input grid points. +!! +!! INPUTS +!! nspline: number of grid points of input mesh +!! xspline(nspline): input mesh +!! yspline(nspline): complex function on input mesh +!! ysplin2(nspline): second derivative of yspline on input mesh +!! nfit: number of points of output mesh +!! xfit(nfit): output mesh +!! +!! OUTPUT +!! yfit(nfit): complex function on output mesh +!! +!! SOURCE + +subroutine splint_complex (nspline,xspline,yspline,ysplin2,nfit,xfit,yfit) + + integer, intent(in) :: nfit, nspline + real(dp), intent(in) :: xspline(nspline) + complex(dpc), intent(in) :: yspline(nspline) + complex(dpc), intent(in) :: ysplin2(nspline) + real(dp), intent(in) :: xfit(nfit) + complex(dpc), intent(out) :: yfit(nfit) + + real(dp), allocatable :: ysplin2_r(:) + real(dp), allocatable :: ysplin2_i(:) + real(dp), allocatable :: yspline_r(:) + real(dp), allocatable :: yspline_i(:) + real(dp), allocatable :: yfit_r(:) + real(dp), allocatable :: yfit_i(:) + + ABI_MALLOC(yspline_r,(nspline)) + ABI_MALLOC(yspline_i,(nspline)) + ABI_MALLOC(ysplin2_r,(nspline)) + ABI_MALLOC(ysplin2_i,(nspline)) + ABI_MALLOC(yfit_r,(nfit)) + ABI_MALLOC(yfit_i,(nfit)) + +!local + +!source + yspline_r=real(yspline) + yspline_i=aimag(yspline) !vz_d + ysplin2_r=real(ysplin2) + ysplin2_i=aimag(ysplin2) !vz_d + call splint (nspline,xspline,yspline_r,ysplin2_r,nfit,xfit,yfit_r) + call splint (nspline,xspline,yspline_i,ysplin2_i,nfit,xfit,yfit_i) + yfit=cmplx(yfit_r,yfit_i) + ABI_FREE(yspline_r) + ABI_FREE(yspline_i) + ABI_FREE(ysplin2_r) + ABI_FREE(ysplin2_i) + ABI_FREE(yfit_r) + ABI_FREE(yfit_i) + +end subroutine splint_complex +!!*** + +!!****f* m_splines/spline_integrate +!! NAME +!! spline_integrate +!! +!! FUNCTION +!! Calculates an integral using cubic spline interpolation. +!! +!! INPUTS +!! npts= number of grid points of input mesh +!! dx= step of input mesh +!! integrand= function on input mesh +!! +!! OUTPUT +!! integral= integral of the input function +!! +!! SOURCE + +subroutine spline_integrate(integral,npts,dx,integrand) + + integer,intent(in) :: npts + real(dp),intent(out) :: integral + real(dp),intent(in) :: dx,integrand(npts) + + integer :: ix + real(dp) :: ptmp,sf(npts),sf_der2(npts),sf_mesh(npts),utmp(npts) + + ! Prepare mesh + forall (ix=1:npts) sf_mesh(ix) = (ix - 1) * dx + + ! Calculate second derivative of integrand (adapted from Numercial Recipes) + sf_der2(1) = zero + sf_der2(npts) = zero + utmp(1) = zero + + do ix=2,npts-1 + ptmp = half * sf_der2(ix-1) + two + sf_der2(ix) = (half - one) / ptmp + utmp(ix) = (three * (integrand(ix+1) + integrand(ix-1) - & +& two*integrand(ix)) / (dx**2) - half * utmp(ix-1)) / ptmp + end do + do ix=npts-1,1,-1 + sf_der2(ix) = sf_der2(ix) * sf_der2(ix+1) + utmp(ix) + end do + + ! Actually calculate integral + sf(:) = integrand(:) * dx + integral = (sf(1) + sf(npts)) / 2.0_dp - & +& (sf_der2(1) + sf_der2(npts)) / 24.0_dp + & +& sum(sf(2:npts-1)) - sum(sf_der2(2:npts-1)) / 12.0_dp + +end subroutine spline_integrate +!!*** + +!!****f* m_splines/intrpl +!! NAME +!! intrpl +!! +!! FUNCTION +!! +!! DOUBLE PRECISION INTERPOLATION OF A SINGLE VALUED FUNCTION. +!! THIS SUBROUTINE INTERPOLATES, FROM VALUES OF THE FUNCTION +!! GIVEN AS ORDINATES OF INPUT DATA POINTS IN AN X-Y PLANE +!! AND FOR A GIVEN SET OF X VALUES(ABSCISSAE),THE VALUES OF +!! A SINGLE VALUED FUNCTION Y=Y(X). +!! +!! THE SUBROUTINE ALSO CALCULATES FIRST DERIVATIVES DV(X) AND +!! SECOND DERIVATIVE DV2(X) +! +!! THE INPUT PARAMETERS ARE; +!! +!! L=NUMBER OF DATA POINTS +!! (MUST BE TWO OR GREATER) +!! X=ARRAY OF DIMENSION L STORING THE X VALUES +!! OF INPUT DATA POINTS (IN ASCENDING ORDER) +!! Y=ARRAY OF DIMENSION L STORING THE Y VALUES OF INPUT DATA POINTS +!! N=NUMBER OF POINTS AT WHICH INTERPOLATION OF THE Y-VALUES +!! IS REQUIRED (MUST BE 1 OR GREATER) +!! U=ARRAY OF DIMENSION N STORING THE X VALUES +!! OF THE DESIRED POINTS +!! +!! THE OUTPUT PARAMETER IS V=ARRAY OF DIMENSION N WHERE THE +!! INTERPOLATED Y VALUES ARE TO BE DISPLAYED +!! +!! INPUTS +!! CUBIC SPLINE INTERPOLATION +!! +!! OUTPUT +!! +!! NOTES +!! This routine is deprecated and will be replaced by the other routines of this module. +!! +!! SOURCE + +SUBROUTINE INTRPL(L,X,Y,N,U,V,dv,dv2,ideriv) + + IMPLICIT DOUBLE PRECISION (A-H,O-Z) + IMPLICIT INTEGER(I-N) +! + PARAMETER (NQQ=12000) + + COMMON/QQ/ QQ(4,NQQ) + DIMENSION X(L),Y(L),U(N),V(N),DV(NQQ),DV2(NQQ) + EQUIVALENCE (P0,X3),(Q0,Y3),(Q1,T3) + REAL*8 M1,M2,M3,M4,M5 + EQUIVALENCE (UK,DX),(IMN,X2,A1,M1),(IMX,X5,A5,M5),& + & (J,SW,SA),(Y2,W2,W4,Q2),(Y5,W3,Q3) +! +! PRELIMINARY PROCESSING + + L0=L + LM1=L0-1 + LM2=LM1-1 + LP1=L0+1 + N0=N + IF(N0.GT.NQQ) THEN + NQQV=NQQ + write(std_out,2089) NQQV,N0 +! CALL EXIT + END IF + IF(LM2.LT.0) GO TO 90 + IF(N0.LE.0) GO TO 91 + DO 11 I=2,L0 + +! IF(X(I-1)-X(I))11,95,96 + IF(X(I-1)-X(I).EQ.0.0D0) GO TO 95 + IF(X(I-1)-X(I).GT.0.0D0) GO TO 96 + 11 CONTINUE + IPV=0 +! +!*** MAIN LOOP + FINT=0.0D0 + DO 80 K=1,N0 + UK=U(K) +! +!*** ROUTINE TO LOCATE THE DESIRED POINT + IF(UK.GE.X(L0)) GO TO 26 + IF(UK.LT.X(1)) GO TO 25 + IMN=2 + IMX=L0 + 21 I=(IMN+IMX)/2 + IF(UK.GE.X(I)) GO TO 23 + IMX=I + GO TO 24 + 23 IMN=I+1 + 24 IF(IMX.GT.IMN) GO TO 21 + I=IMX + GO TO 30 + 25 I=1 + GO TO 30 + 26 I=LP1 + GO TO 30 +! +!*** CHECK IF I=IPV + 30 IF(I.EQ.IPV) GO TO 70 + IPV=I +! +!*** ROUTINES TO PICK UP NECESSARY X AND Y VALUES AND TO +!*** ESTIMATE THEM IF NECESSARY + J=I + IF(J.EQ.1) J=2 + IF(J.EQ.LP1) J=L0 + X3=X(J-1) + Y3=Y(J-1) + X4=X(J) + Y4=Y(J) + A3=X4-X3 + M3=(Y4-Y3)/A3 + IF(LM2.EQ.0) GO TO 43 + IF(J.EQ.2) GO TO 41 + X2=X(J-2) + Y2=Y(J-2) + A2=X3-X2 + M2=(Y3-Y2)/A2 + IF(J.EQ.L0) GO TO 42 + 41 X5=X(J+1) + Y5=Y(J+1) + A4=X5-X4 + M4=(Y5-Y4)/A4 + IF(J.EQ.2) M2=M3+M3-M4 + GO TO 45 + 42 M4=M3+M3-M2 + GO TO 45 + 43 M2=M3 + 45 IF(J.LE.3) GO TO 46 + A1=X2-X(J-3) + M1=(Y2-Y(J-3))/A1 + GO TO 47 + 46 M1=M2+M2-M3 + 47 IF(J.GE.LM1) GO TO 48 + A5=X(J+2)-X5 + M5=(Y(J+2)-Y5)/A5 + GO TO 50 + 48 M5=M4+M4-M3 +! +!*** NUMERICAL DIFFERENTIATION + 50 IF(I.EQ.LP1) GO TO 52 + W2=ABS(M4-M3) + W3=ABS(M2-M1) + SW=W2+W3 + IF(SW.NE.0.0) GO TO 51 + W2=0.5D0 + W3=0.5D0 + SW=1.0D0 + 51 T3=(W2*M2+W3*M3)/SW + IF(I.EQ.1) GO TO 54 + 52 W3=ABS(M5-M4) + W4=ABS(M3-M2) + SW=W3+W4 + IF(SW.NE.0.0) GO TO 53 + W3=0.5D0 + W4=0.5D0 + SW=1.0D0 + 53 T4=(W3*M3+W4*M4)/SW + IF(I.NE.LP1) GO TO 60 + T3=T4 + SA=A2+A3 + T4=0.5D0*(M4+M5-A2*(A2-A3)*(M2-M3)/(SA*SA)) + X3=X4 + Y3=Y4 + A3=A2 + M3=M4 + GO TO 60 + 54 T4=T3 + SA=A3+A4 + T3=0.5D0*(M1+M2-A4*(A3-A4)*(M3-M4)/(SA*SA)) + X3=X3-A4 + Y3=Y3-M2*A4 + A3=A4 + M3=M2 +! +!*** COMPUTATION OF THE POLYNOMIAL + 60 Q2=(2.0D0*(M3-T3)+M3-T4)/A3 + Q3=(-M3-M3+T3+T4)/(A3*A3) + 70 DX=UK-P0 + V(K)=Q0+DX*(Q1+DX*(Q2+DX*Q3)) + + IF(IDERIV.EQ.0) GO TO 80 + DV(K)=Q1+DX*(2.0D0*Q2+DX*3.0D0*Q3) + DV2(k)=6.0D0*Q3*DX+2.d0*Q2 + QQ(1,K)=Q0 + QQ(2,K)=Q1 + QQ(3,K)=Q2 + QQ(4,K)=Q3 + 80 CONTINUE + RETURN +! +!*** ERROR EXIT + 90 write(std_out,2090) + GO TO 99 + 91 write(std_out,2091) + GO TO 99 + 95 write(std_out,2095) + GO TO 97 + 96 write(std_out,2096) + 97 write(std_out,2097)I,X(I) + 99 write(std_out,2099) L0,N0 + RETURN +! +!*** FORMAT STATEMENTS + 2089 FORMAT( 'WARNING ERROR IN INTRPL. MAX ALLOWED VALUE OF N0 IS',& + & I3,' HERE N0 IS',I3) + 2090 FORMAT(1X/' N = 1 OR LESS.'/) + 2091 FORMAT(1X/' N = 0 OR LESS.'/) + 2095 FORMAT(1X/' IDENTICAL X VALUES.'/) + 2096 FORMAT(1X/' X VALUES OUT OF SEQUENCE.'/) + 2097 FORMAT(4X,'I =',I7,10X,6X,'X(I) =',E12.3) + 2099 FORMAT(4X,'L =',I7,10X,3X,'N =',I7/ & + & ' ERROR DETECTED IN ROUTINE INTRPL') +! +END subroutine intrpl +!!*** + +end module m_splines +!!*** diff --git a/GX-PAW/common/src/28_numeric_noabirule/m_splines.o b/GX-PAW/common/src/28_numeric_noabirule/m_splines.o new file mode 100644 index 00000000..38e0612a Binary files /dev/null and b/GX-PAW/common/src/28_numeric_noabirule/m_splines.o differ diff --git a/GX-PAW/common/src/28_numeric_noabirule/replacements/cdotc.f b/GX-PAW/common/src/28_numeric_noabirule/replacements/cdotc.f new file mode 100644 index 00000000..435e8059 --- /dev/null +++ b/GX-PAW/common/src/28_numeric_noabirule/replacements/cdotc.f @@ -0,0 +1,59 @@ +COMPLEX FUNCTION CDOTC(N,CX,INCX,CY,INCY) + +!* .. Scalar Arguments .. + INTEGER INCX,INCY,N +!* .. +!* .. Array Arguments .. + COMPLEX CX(*),CY(*) +!* .. +!* +!* Purpose +!* ======= +!* +!* forms the dot product of two vectors, conjugating the first +!* vector. +!* +!* Further Details +!* =============== +!* +!* jack dongarra, linpack, 3/11/78. +!* modified 12/3/93, array(1) declarations changed to array(*) +!* +!* ===================================================================== +!* +!* .. Local Scalars .. + COMPLEX CTEMP + INTEGER I,IX,IY +!* .. +!* .. Intrinsic Functions .. + INTRINSIC CONJG +!* .. + CTEMP = (0.0,0.0) + CDOTC = (0.0,0.0) + IF (N.LE.0) RETURN + IF (INCX.EQ.1 .AND. INCY.EQ.1) GO TO 20 +!* +!* code for unequal increments or equal increments +!* not equal to 1 +!* + IX = 1 + IY = 1 + IF (INCX.LT.0) IX = (-N+1)*INCX + 1 + IF (INCY.LT.0) IY = (-N+1)*INCY + 1 + DO 10 I = 1,N + CTEMP = CTEMP + CONJG(CX(IX))*CY(IY) + IX = IX + INCX + IY = IY + INCY + 10 CONTINUE + CDOTC = CTEMP + RETURN +!* +!* code for both increments equal to 1 +!* + 20 DO 30 I = 1,N + CTEMP = CTEMP + CONJG(CX(I))*CY(I) + 30 CONTINUE + CDOTC = CTEMP + RETURN +END function CDOTC + diff --git a/GX-PAW/common/src/28_numeric_noabirule/replacements/cdotu.f b/GX-PAW/common/src/28_numeric_noabirule/replacements/cdotu.f new file mode 100644 index 00000000..918edd0e --- /dev/null +++ b/GX-PAW/common/src/28_numeric_noabirule/replacements/cdotu.f @@ -0,0 +1,54 @@ + COMPLEX FUNCTION CDOTU(N,CX,INCX,CY,INCY) +!* .. Scalar Arguments .. + INTEGER INCX,INCY,N +!* .. +!* .. Array Arguments .. + COMPLEX CX(*),CY(*) +!* .. +!* +!* Purpose +!* ======= +!* +!* CDOTU forms the dot product of two vectors. +!* +!* Further Details +!* =============== +!* +!* jack dongarra, linpack, 3/11/78. +!* modified 12/3/93, array(1) declarations changed to array(*) +!* +!* ===================================================================== +!* +!* .. Local Scalars .. + COMPLEX CTEMP + INTEGER I,IX,IY +!* .. + CTEMP = (0.0,0.0) + CDOTU = (0.0,0.0) + IF (N.LE.0) RETURN + IF (INCX.EQ.1 .AND. INCY.EQ.1) GO TO 20 +!* +!* code for unequal increments or equal increments +!* not equal to 1 +!* + IX = 1 + IY = 1 + IF (INCX.LT.0) IX = (-N+1)*INCX + 1 + IF (INCY.LT.0) IY = (-N+1)*INCY + 1 + DO 10 I = 1,N + CTEMP = CTEMP + CX(IX)*CY(IY) + IX = IX + INCX + IY = IY + INCY + 10 CONTINUE + CDOTU = CTEMP + RETURN +!* +!* code for both increments equal to 1 +!* + 20 DO 30 I = 1,N + CTEMP = CTEMP + CX(I)*CY(I) + 30 CONTINUE + CDOTU = CTEMP + RETURN + +END function CDOTU diff --git a/GX-PAW/common/src/28_numeric_noabirule/replacements/zdotc.f b/GX-PAW/common/src/28_numeric_noabirule/replacements/zdotc.f new file mode 100644 index 00000000..104da3b5 --- /dev/null +++ b/GX-PAW/common/src/28_numeric_noabirule/replacements/zdotc.f @@ -0,0 +1,56 @@ + DOUBLE COMPLEX FUNCTION ZDOTC(N,ZX,INCX,ZY,INCY) +!* .. Scalar Arguments .. + INTEGER INCX,INCY,N +!* .. +!* .. Array Arguments .. + DOUBLE COMPLEX ZX(*),ZY(*) +!* .. +!* +!* Purpose +!* ======= +!* +!* ZDOTC forms the dot product of a vector. +!* +!* Further Details +!* =============== +!* +!* jack dongarra, 3/11/78. +!* modified 12/3/93, array(1) declarations changed to array(*) +!* +!* ===================================================================== +!* +!* .. Local Scalars .. + DOUBLE COMPLEX ZTEMP + INTEGER I,IX,IY +!* .. +!* .. Intrinsic Functions .. + INTRINSIC DCONJG +!* .. + ZTEMP = (0.0d0,0.0d0) + ZDOTC = (0.0d0,0.0d0) + IF (N.LE.0) RETURN + IF (INCX.EQ.1 .AND. INCY.EQ.1) GO TO 20 +!* +!* code for unequal increments or equal increments +!* not equal to 1 +!* + IX = 1 + IY = 1 + IF (INCX.LT.0) IX = (-N+1)*INCX + 1 + IF (INCY.LT.0) IY = (-N+1)*INCY + 1 + DO 10 I = 1,N + ZTEMP = ZTEMP + DCONJG(ZX(IX))*ZY(IY) + IX = IX + INCX + IY = IY + INCY + 10 CONTINUE + ZDOTC = ZTEMP + RETURN +!* +!* code for both increments equal to 1 +!* + 20 DO 30 I = 1,N + ZTEMP = ZTEMP + DCONJG(ZX(I))*ZY(I) + 30 CONTINUE + ZDOTC = ZTEMP + RETURN + END function ZDOTC diff --git a/GX-PAW/common/src/28_numeric_noabirule/replacements/zdotu.f b/GX-PAW/common/src/28_numeric_noabirule/replacements/zdotu.f new file mode 100644 index 00000000..34416dca --- /dev/null +++ b/GX-PAW/common/src/28_numeric_noabirule/replacements/zdotu.f @@ -0,0 +1,53 @@ +DOUBLE COMPLEX FUNCTION ZDOTU(N,ZX,INCX,ZY,INCY) +!* .. Scalar Arguments .. + INTEGER INCX,INCY,N +!* .. +!* .. Array Arguments .. + DOUBLE COMPLEX ZX(*),ZY(*) +!* .. +!* +!* Purpose +!* ======= +!* +!* ZDOTU forms the dot product of two vectors. +!* +!* Further Details +!* =============== +!* +!* jack dongarra, 3/11/78. +!* modified 12/3/93, array(1) declarations changed to array(*) +!* +!* ===================================================================== +!* +!* .. Local Scalars .. + DOUBLE COMPLEX ZTEMP + INTEGER I,IX,IY +!* .. + ZTEMP = (0.0d0,0.0d0) + ZDOTU = (0.0d0,0.0d0) + IF (N.LE.0) RETURN + IF (INCX.EQ.1 .AND. INCY.EQ.1) GO TO 20 +!* +!* code for unequal increments or equal increments +!* not equal to 1 +!* + IX = 1 + IY = 1 + IF (INCX.LT.0) IX = (-N+1)*INCX + 1 + IF (INCY.LT.0) IY = (-N+1)*INCY + 1 + DO 10 I = 1,N + ZTEMP = ZTEMP + ZX(IX)*ZY(IY) + IX = IX + INCX + IY = IY + INCY + 10 CONTINUE + ZDOTU = ZTEMP + RETURN +!* +!* code for both increments equal to 1 +!* + 20 DO 30 I = 1,N + ZTEMP = ZTEMP + ZX(I)*ZY(I) + 30 CONTINUE + ZDOTU = ZTEMP + RETURN + END function zdotu diff --git a/GX-PAW/common/src/28_numeric_noabirule/test_spline_integrate.F90 b/GX-PAW/common/src/28_numeric_noabirule/test_spline_integrate.F90 new file mode 100644 index 00000000..03152daf --- /dev/null +++ b/GX-PAW/common/src/28_numeric_noabirule/test_spline_integrate.F90 @@ -0,0 +1,80 @@ +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +program test_spline_integrate + +use defs_basis +use m_splines +use m_xmpi +implicit none + +real(dp), parameter :: int_tol = 5.0e-3_dp +real(dp), parameter :: f1(6) = [0.0, 1.0, 2.0, 3.0, 4.0, 5.0] +real(dp), parameter :: f2(6) = [0.0, 1.0, 4.0, 9.0, 16.0, 25.0] +real(dp), parameter :: f3(6) = [0.0, 1.0, 8.0, 27.0, 64.0, 125.0] + +logical :: f1_ok, f2_ok, f3_ok, test_ok +integer :: npts +real(dp) :: dx, cal_int, ref_int, int_err + +#if defined DEBUG_MODE +write(std_out,'(a,a)') "Unitary test: spline_integrate", ch10 +write(std_out,'(1x,4(1x,a12),1x,a5)') "Function", "Analytical", "Calculated", & +& "Error (rel)", "Check" +write(std_out,'(1x,4(1x,a12),1x,a5)') "------------", "------------", & +& "------------", "------------", "-----" +#endif + +! Integrate f1 +ref_int = 12.5_dp +npts = size(f1) +dx = f1(2) - f1(1) +call spline_integrate(cal_int, npts, dx, f1) +int_err = abs((cal_int - ref_int) / ref_int) +f1_ok = ( int_err < int_tol ) +#if defined DEBUG_MODE +write(std_out,'(2x,a12,1x,e12.5,1x,e12.5,1x,e12.5,1x,5l)') "f(x) = x ", & +& ref_int, cal_int, int_err, f1_ok +#endif + +! Integrate f2 +ref_int = 125.0_dp / 3.0_dp +npts = size(f2) +dx = f2(2) - f2(1) +call spline_integrate(cal_int, npts, dx, f2) +int_err = abs((cal_int - ref_int) / ref_int) +f2_ok = ( int_err < int_tol ) +#if defined DEBUG_MODE +write(std_out,'(2x,a12,1x,e12.5,1x,e12.5,1x,e12.5,1x,5l)') "f(x) = x^2", & +& ref_int, cal_int, int_err, f2_ok +#endif + +! Integrate f3 +ref_int = 625.0_dp / 4.0_dp +npts = size(f3) +dx = f3(2) - f3(1) +call spline_integrate(cal_int, npts, dx, f3) +int_err = abs((cal_int - ref_int) / ref_int) +f3_ok = ( int_err < int_tol ) +#if defined DEBUG_MODE +write(std_out,'(2x,a12,1x,e12.5,1x,e12.5,1x,e12.5,1x,5l)') "f(x) = x^3", & +& ref_int, cal_int, int_err, f3_ok +#endif + +! Report test result +test_ok = ( f1_ok .and. f2_ok .and. f3_ok ) +#if defined DEBUG_MODE +write(std_out,*) +if ( test_ok ) then + write(std_out,'(a,a)') "TEST OK", ch10 +else + write(std_out,'(a,a)') "TEST FAILED", ch10 +end if +#else +if ( .not. test_ok ) then + write(std_out,'(a,a)') "TEST FAILED", ch10 +end if +#endif + +end program test_spline_integrate diff --git a/GX-PAW/common/src/29_kpoints/Makefile b/GX-PAW/common/src/29_kpoints/Makefile new file mode 100644 index 00000000..9bd70c95 --- /dev/null +++ b/GX-PAW/common/src/29_kpoints/Makefile @@ -0,0 +1,1463 @@ +# Makefile.in generated by automake 1.16.3 from Makefile.am. +# shared/common/src/29_kpoints/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994-2020 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-corelibs on 2024/03/16 21:07:38 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-corelibs script or its config file instead. +# + + +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/abinit +pkgincludedir = $(includedir)/abinit +pkglibdir = $(libdir)/abinit +pkglibexecdir = $(libexecdir)/abinit +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = x86_64-apple-darwin18.7.0 +host_triplet = x86_64-apple-darwin18.7.0 +target_triplet = x86_64-apple-darwin18.7.0 +subdir = shared/common/src/29_kpoints +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/m4/arch-gpu.m4 \ + $(top_srcdir)/config/m4/arch-mpi.m4 \ + $(top_srcdir)/config/m4/auto-autotools.m4 \ + $(top_srcdir)/config/m4/auto-corelibs.m4 \ + $(top_srcdir)/config/m4/auto-debug.m4 \ + $(top_srcdir)/config/m4/auto-dirflags.m4 \ + $(top_srcdir)/config/m4/auto-env.m4 \ + $(top_srcdir)/config/m4/auto-hints.m4 \ + $(top_srcdir)/config/m4/auto-optim.m4 \ + $(top_srcdir)/config/m4/auto-options.m4 \ + $(top_srcdir)/config/m4/auto-output.m4 \ + $(top_srcdir)/config/m4/auto-triggers.m4 \ + $(top_srcdir)/config/m4/conf-atompaw.m4 \ + $(top_srcdir)/config/m4/conf-debug.m4 \ + $(top_srcdir)/config/m4/conf-fallbacks.m4 \ + $(top_srcdir)/config/m4/conf-files.m4 \ + $(top_srcdir)/config/m4/conf-init.m4 \ + $(top_srcdir)/config/m4/conf-openmp.m4 \ + $(top_srcdir)/config/m4/conf-optim.m4 \ + $(top_srcdir)/config/m4/lang-c++.m4 \ + $(top_srcdir)/config/m4/lang-c.m4 \ + $(top_srcdir)/config/m4/lang-fortran-import.m4 \ + $(top_srcdir)/config/m4/lang-fortran.m4 \ + $(top_srcdir)/config/m4/lang-python.m4 \ + $(top_srcdir)/config/m4/libxml2.m4 \ + $(top_srcdir)/config/m4/misc-display.m4 \ + $(top_srcdir)/config/m4/sd_abinit_common.m4 \ + $(top_srcdir)/config/m4/sd_arch_gpu.m4 \ + $(top_srcdir)/config/m4/sd_arch_mpi.m4 \ + $(top_srcdir)/config/m4/sd_bigdft.m4 \ + $(top_srcdir)/config/m4/sd_core.m4 \ + $(top_srcdir)/config/m4/sd_esl.m4 \ + $(top_srcdir)/config/m4/sd_fftw3.m4 \ + $(top_srcdir)/config/m4/sd_gpu_kokkos.m4 \ + $(top_srcdir)/config/m4/sd_gpu_yakl.m4 \ + $(top_srcdir)/config/m4/sd_io_hdf5.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf_fortran.m4 \ + $(top_srcdir)/config/m4/sd_levmar.m4 \ + $(top_srcdir)/config/m4/sd_libpaw.m4 \ + $(top_srcdir)/config/m4/sd_libpsml.m4 \ + $(top_srcdir)/config/m4/sd_libxc.m4 \ + $(top_srcdir)/config/m4/sd_math_fft.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_core.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_util.m4 \ + $(top_srcdir)/config/m4/sd_papi.m4 \ + $(top_srcdir)/config/m4/sd_pfft.m4 \ + $(top_srcdir)/config/m4/sd_triqs.m4 \ + $(top_srcdir)/config/m4/sd_wannier90.m4 \ + $(top_srcdir)/config/m4/sd_xmlf90.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +AM_V_AR = $(am__v_AR_$(V)) +am__v_AR_ = $(am__v_AR_$(AM_DEFAULT_VERBOSITY)) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = +lib29_kpoints_a_AR = $(AR) $(ARFLAGS) +lib29_kpoints_a_LIBADD = +am__objects_1 = m_hashtable.$(OBJEXT) m_htetra.$(OBJEXT) \ + m_octree.$(OBJEXT) m_symkpt.$(OBJEXT) +am_lib29_kpoints_a_OBJECTS = $(am__objects_1) +lib29_kpoints_a_OBJECTS = $(am_lib29_kpoints_a_OBJECTS) +AM_V_P = $(am__v_P_$(V)) +am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY)) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I. -I$(top_builddir) +PPFCCOMPILE = $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) +AM_V_PPFC = $(am__v_PPFC_$(V)) +am__v_PPFC_ = $(am__v_PPFC_$(AM_DEFAULT_VERBOSITY)) +am__v_PPFC_0 = @echo " PPFC " $@; +am__v_PPFC_1 = +FCLD = $(FC) +FCLINK = $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \ + $@ +AM_V_FCLD = $(am__v_FCLD_$(V)) +am__v_FCLD_ = $(am__v_FCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_FCLD_0 = @echo " FCLD " $@; +am__v_FCLD_1 = +SOURCES = $(lib29_kpoints_a_SOURCES) +DIST_SOURCES = $(lib29_kpoints_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ABINIT_BINARY_PACKAGE = abinit-10.0.0.83-58be4d_x86_64_darwin18.7.0_gnu9.4 +ABINIT_COMMON_CPPFLAGS = +ABINIT_COMMON_FCFLAGS = +ABINIT_COMMON_LDFLAGS = +ABINIT_COMMON_LIBS = +ABINIT_TARGET = x86_64_darwin18.7.0_gnu9.4 +ABINIT_VERSION = 10.0.0.83-58be4d +ABINIT_VERSION_BASE = 10.0 +ABINIT_VERSION_BUILD = 20240316 +ABINIT_VERSION_MAJOR = 10 +ABINIT_VERSION_MICRO = 0 +ABINIT_VERSION_MINOR = 0 +ABI_CPPFLAGS = -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include +ACLOCAL = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' aclocal-1.16 +AMTAR = $${TAR-tar} +AM_DEFAULT_VERBOSITY = 1 +AR = ar +ARFLAGS = rc +ARFLAGS_CMD = rc +ARFLAGS_DEBUG = +ARFLAGS_EXTRA = +ARFLAGS_HINTS = +ARFLAGS_OPTIM = +ATOMPAW_BIN = +AUTOCONF = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' autoconf +AUTOHEADER = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' autoheader +AUTOMAKE = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' automake-1.16 +AWK = awk +BIGDFT_CPPFLAGS = +BIGDFT_FCFLAGS = +BIGDFT_LDFLAGS = +BIGDFT_LIBS = +BOURNE_SHELL = /bin/sh +CC = /opt/local/bin/mpicc +CCDEPMODE = depmode=gcc3 +CC_LDFLAGS = +CC_LDFLAGS_DEBUG = +CC_LDFLAGS_EXTRA = +CC_LDFLAGS_GPU = +CC_LDFLAGS_HINTS = +CC_LDFLAGS_OPTIM = +CC_LIBS = +CC_LIBS_DEBUG = +CC_LIBS_EXTRA = +CC_LIBS_GPU = +CC_LIBS_HINTS = +CC_LIBS_OPTIM = +CFLAGS = -O2 -g +CFLAGS_DEBUG = +CFLAGS_EXTRA = +CFLAGS_GPU = +CFLAGS_HINTS = +CFLAGS_OPTIM = +CPP = /opt/local/bin/mpicc -E +CPPFLAGS = +CPPFLAGS_DEBUG = +CPPFLAGS_EXTRA = +CPPFLAGS_GPU = +CPPFLAGS_HINTS = +CPPFLAGS_HINTS_EXT = -P -std=c99 +CPPFLAGS_OPTIM = +CXX = /opt/local/bin/mpicxx +CXXDEPMODE = depmode=gcc3 +CXXFLAGS = -O2 -g +CXXFLAGS_DEBUG = +CXXFLAGS_EXTRA = +CXXFLAGS_GPU = +CXXFLAGS_HINTS = +CXXFLAGS_OPTIM = +CXX_LDFLAGS = +CXX_LDFLAGS_DEBUG = +CXX_LDFLAGS_EXTRA = +CXX_LDFLAGS_GPU = +CXX_LDFLAGS_HINTS = +CXX_LDFLAGS_OPTIM = +CXX_LIBS = +CXX_LIBS_DEBUG = +CXX_LIBS_EXTRA = +CXX_LIBS_GPU = +CXX_LIBS_HINTS = +CXX_LIBS_OPTIM = +CYGPATH_W = echo +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +ECHO_C = \c +ECHO_N = +ECHO_T = +EGREP = /usr/bin/grep -E +EXEEXT = +F77 = /opt/local/bin/mpif90 +FC = /opt/local/bin/mpif90 +FCFLAGS = -O2 -g -ffree-line-length-none -I/opt/local/include -I/opt/local/include -I/opt/local/include +FCFLAGS_DEBUG = +FCFLAGS_EXTRA = +FCFLAGS_F90 = +FCFLAGS_FIXEDFORM = -ffixed-form +FCFLAGS_FREEFORM = -ffree-form +FCFLAGS_HINTS = -ffree-line-length-none +FCFLAGS_MODDIR = -J../mods +FCFLAGS_OPENMP = +FCFLAGS_OPENMP_OFFLOAD = +FCFLAGS_OPTIM = +FCLIBS = -L/opt/local/lib -L/opt/local/lib/openmpi-gcc9 -L/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0 -L/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/../../.. -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi -lgfortran -lquadmath -lm +FC_LDFLAGS = +FC_LDFLAGS_DEBUG = +FC_LDFLAGS_EXTRA = +FC_LDFLAGS_HINTS = +FC_LDFLAGS_OPTIM = +FC_LIBS = +FC_LIBS_DEBUG = +FC_LIBS_EXTRA = +FC_LIBS_HINTS = +FC_LIBS_OPTIM = +FC_NOWRAP = /opt/local/bin/mpif90 +FFLAGS = -O2 -g -ffree-line-length-none -I/opt/local/include -I/opt/local/include -I/opt/local/include +FFTW3_CFLAGS = +FFTW3_CPPFLAGS = -I/opt/local/include +FFTW3_FCFLAGS = -I/opt/local/include +FFTW3_LDFLAGS = +FFTW3_LIBS = -L/opt/local/lib -lfftw3 -lfftw3f +FFT_CFLAGS = +FFT_FCFLAGS = +FPP = +FPPFLAGS = +FPPFLAGS_DEBUG = +FPPFLAGS_EXTRA = +FPPFLAGS_HINTS = +FPPFLAGS_OPTIM = +GPU_ARCH = +GPU_CFLAGS = +GPU_CPPFLAGS = +GPU_CXXFLAGS = +GPU_FCFLAGS = +GPU_LDFLAGS = +GPU_LIBS = +GRAPHATOM_BIN = +GREP = /usr/bin/grep +H5CC = +HDF5_CFLAGS = +HDF5_CPPFLAGS = +HDF5_CXXFLAGS = +HDF5_FCFLAGS = +HDF5_LDFLAGS = +HDF5_LIBS = +INSTALL = /opt/local/libexec/gnubin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +KOKKOS_CPPFLAGS = +KOKKOS_CXXFLAGS = +KOKKOS_LDFLAGS = +KOKKOS_LIBS = +LDFLAGS = +LEVMAR_CFLAGS = +LEVMAR_CPPFLAGS = +LEVMAR_LDFLAGS = +LEVMAR_LIBS = +LIBOBJS = +LIBPAW_CPPFLAGS = +LIBPAW_FCFLAGS = +LIBPAW_LDFLAGS = +LIBPAW_LIBS = +LIBPSML_CPPFLAGS = +LIBPSML_FCFLAGS = +LIBPSML_LDFLAGS = +LIBPSML_LIBS = +LIBS = -L/opt/local/lib -lwannier -L/opt/local/lib -lxc -L/opt/local/lib -lnetcdff -L/opt/local/lib -lnetcdf -L/opt/local/lib -L/opt/local/lib -lhdf5_hl -L/opt/local/lib -lhdf5 -lz -ldl -lm -L/opt/local/lib -lfftw3 -lfftw3f +LIBXC_CFLAGS = +LIBXC_CPPFLAGS = +LIBXC_FCFLAGS = +LIBXC_LDFLAGS = +LIBXC_LIBS = +LIBXML2_CPPFLAGS = +LIBXML2_FCFLAGS = +LIBXML2_LIBS = +LINALG_CFLAGS = +LINALG_CPPFLAGS = +LINALG_CXXFLAGS = +LINALG_FCFLAGS = -I/opt/local/include +LINALG_LDFLAGS = +LINALG_LIBS = -L/opt/local/lib -lopenblas +LN_S = ln -s +LTLIBOBJS = +MAKEINFO = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' makeinfo +MKDIR_P = /opt/local/libexec/gnubin/mkdir -p +MODEXT = mod +MPI_CFLAGS = +MPI_CPPFLAGS = +MPI_CXXFLAGS = +MPI_FCFLAGS = +MPI_LDFLAGS = +MPI_LIBS = +MV = /opt/local/libexec/gnubin/mv +NETCDF_CFLAGS = +NETCDF_CPPFLAGS = +NETCDF_CXXFLAGS = +NETCDF_FCFLAGS = +NETCDF_FORTRAN_CFLAGS = +NETCDF_FORTRAN_CPPFLAGS = +NETCDF_FORTRAN_CXXFLAGS = +NETCDF_FORTRAN_FCFLAGS = +NETCDF_FORTRAN_LDFLAGS = +NETCDF_FORTRAN_LIBS = +NETCDF_LDFLAGS = +NETCDF_LIBS = +NVCC = +NVCC_CFLAGS = +NVCC_CPPFLAGS = +NVCC_LDFLAGS = +NVCC_LIBS = +OBJEXT = o +PACKAGE = abinit +PACKAGE_BUGREPORT = https://bugs.launchpad.net/abinit/ +PACKAGE_NAME = ABINIT +PACKAGE_STRING = ABINIT 10.0.0.83-58be4d +PACKAGE_TARNAME = abinit +PACKAGE_URL = +PACKAGE_VERSION = 10.0.0.83-58be4d +PAPI_CFLAGS = +PAPI_CPPFLAGS = +PAPI_LDFLAGS = +PAPI_LIBS = +PATCH = patch +PATH_SEPARATOR = : +PERL = /usr/bin/perl +PFFT_CFLAGS = +PFFT_CPPFLAGS = +PFFT_LDFLAGS = +PFFT_LIBS = +PYFLAGS = +PYTHON = python3.9 +PYTHON_CONFIG = python3.9-config +PYTHON_CPPFLAGS = -I/opt/local/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -I/opt/local/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 +RANLIB = ranlib +REALPATH = realpath +RM = /opt/local/libexec/gnubin/rm +SED = /usr/bin/sed +SET_MAKE = +SHELL = /bin/sh +STRIP = +TAR = tar +TRIQS_CFLAGS = +TRIQS_CPPFLAGS = +TRIQS_CXXFLAGS = +TRIQS_LDFLAGS = +TRIQS_LIBS = +TRUE_CPP = cpp +VERSION = 10.0.0.83-58be4d +WANNIER90_CPPFLAGS = +WANNIER90_FCFLAGS = -I/opt/local/include +WANNIER90_LDFLAGS = +WANNIER90_LIBS = -L/opt/local/lib -lwannier +XML2_CONFIG = +XMLF90_CPPFLAGS = +XMLF90_FCFLAGS = +XMLF90_LDFLAGS = +XMLF90_LIBS = +XML_CPPFLAGS = +XML_LIBS = +XPP = +XPPFLAGS = +XPPFLAGS_DEBUG = +XPPFLAGS_EXTRA = +XPPFLAGS_OPTIM = +YAKL_CPPFLAGS = +YAKL_FCFLAGS = +YAKL_LDFLAGS = +YAKL_LIBS = +abi_ac_distcheck = --with-config-file="/Users/gonze/_Research/ABINIT_git/gonze/mac-1P0-225.ac9" +abi_ac_version = 027100 +abi_am_version = 011603 +abi_avx_safe_mode_enable = no +abi_bse_unpacked_enable = no +abi_cc_path = +abi_cc_vendor = gnu +abi_cc_version = 9.4 +abi_cclock_enable = no +abi_cpp_path = +abi_cpu_64bits = yes +abi_cpu_bits = 64 +abi_cpu_model = unknown +abi_cpu_platform = apple +abi_cpu_spec = unknown_unknown +abi_cpu_vendor = unknown +abi_crpa_optim_enable = no +abi_cxx_path = +abi_cxx_vendor = gnu +abi_cxx_version = 9.4 +abi_debug_flavor = basic +abi_exports_enable = no +abi_fbk_abinit_common_ok = no +abi_fbk_bigdft_ok = disabled +abi_fbk_config = +abi_fbk_enable = no +abi_fbk_fft_ok = no +abi_fbk_fftw3_ok = no +abi_fbk_gpu_ok = no +abi_fbk_hdf5_ok = disabled +abi_fbk_init = def +abi_fbk_kokkos_ok = no +abi_fbk_levmar_ok = no +abi_fbk_libpaw_ok = no +abi_fbk_libpsml_ok = disabled +abi_fbk_libxc_ok = disabled +abi_fbk_libxml2_ok = no +abi_fbk_linalg_ok = disabled +abi_fbk_list = +abi_fbk_mpi_ok = no +abi_fbk_netcdf_fortran_ok = disabled +abi_fbk_netcdf_ok = disabled +abi_fbk_papi_ok = no +abi_fbk_pfft_ok = no +abi_fbk_prefix = +abi_fbk_required = +abi_fbk_triqs_ok = no +abi_fbk_wannier90_ok = disabled +abi_fbk_xmlf90_ok = disabled +abi_fbk_yakl_ok = no +abi_fc_path = +abi_fc_vendor = gnu +abi_fc_version = 9.4 +abi_fc_wrap = no +abi_fc_wrapper_enable = no +abi_fpp_path = +abi_gpu_arch = +abi_gpu_fcflags = +abi_gpu_flavor = none +abi_gpu_hip_libdir = +abi_gpu_incs = +abi_gpu_ldflags = +abi_gpu_libs = +abi_gpu_nvtx_v3 = +abi_gpu_roctx = +abi_gw_dpc_enable = yes +abi_hints_enable = yes +abi_libtetra_enable = yes +abi_libxml2_cppflags = +abi_libxml2_enable = no +abi_libxml2_fcflags = +abi_libxml2_init = def +abi_libxml2_ldflags = +abi_libxml2_libs = +abi_libxml2_ok = unknown +abi_libxml2_prefix = +abi_lotf_enable = no +abi_lt_version = 020406 +abi_m4_version = 010419 +abi_memory_profiling_enable = no +abi_mpi_cflags = +abi_mpi_cppflags = +abi_mpi_cxxflags = +abi_mpi_enable = yes +abi_mpi_fcflags = +abi_mpi_flavor = auto +abi_mpi_gpu_aware_enable = no +abi_mpi_incs = +abi_mpi_inplace_enable = yes +abi_mpi_interfaces_bugfix_enable = no +abi_mpi_io_default_enable = no +abi_mpi_io_enable = yes +abi_mpi_ldflags = +abi_mpi_level = 2 +abi_mpi_libs = +abi_netcdf_default_enable = no +abi_openmp_enable = no +abi_openmp_offload_enable = no +abi_optim_flavor = standard +abi_python_invocation_enable = no +abi_source_debug_enable = no +abi_stdin_enable = yes +abi_sys_spec = darwin-x86_64 +abi_timer_enable = yes +abi_triqs_v1_4_enable = no +abi_triqs_v2_0_enable = no +abi_zdot_bugfix_enable = no +abinit_bindir = /usr/local/bin +abinit_builddir = /Users/gonze/_Research/ABINIT_git/gonze +abinit_chkdir = /usr/local/share/abinit/tests +abinit_datdir = /usr/local/share/abinit +abinit_docdir = /usr/local/doc/abinit +abinit_incdir = /usr/local/include +abinit_libdir = /usr/local/lib +abinit_mandir = /usr/local/share/man +abinit_prefix = /usr/local +abinit_srcdir = /Users/gonze/_Research/ABINIT_git/gonze +abs_builddir = /Users/gonze/_Research/ABINIT_git/gonze/shared/common/src/29_kpoints +abs_srcdir = /Users/gonze/_Research/ABINIT_git/gonze/shared/common/src/29_kpoints +abs_top_builddir = /Users/gonze/_Research/ABINIT_git/gonze +abs_top_srcdir = /Users/gonze/_Research/ABINIT_git/gonze +ac_ct_CC = +ac_ct_CXX = +ac_ct_FC = +am__include = include +am__leading_dot = . +am__quote = +am__tar = tar --format=ustar -chf - "$$tardir" +am__untar = tar -xf - +bindir = ${exec_prefix}/bin +build = x86_64-apple-darwin18.7.0 +build_alias = +build_cpu = x86_64 +build_os = darwin18.7.0 +build_vendor = apple +builddir = . +cc_info_string = gcc-mp-9 (MacPorts gcc9 9.4.0_0) 9.4.0 +cxx_info_string = g++-mp-9 (MacPorts gcc9 9.4.0_0) 9.4.0 +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +enable_avx_safe_mode = +enable_bse_unpacked = +enable_cclock = +enable_crpa_optim = +enable_exports = +enable_fc_wrapper = +enable_gw_dpc = yes +enable_hints = +enable_libtetra = +enable_lotf = +enable_memory_profiling = +enable_mpi_gpu_aware = +enable_mpi_inplace = +enable_mpi_interfaces_bugfix = +enable_mpi_io = yes +enable_mpi_io_default = +enable_netcdf_default = +enable_openmp = +enable_openmp_offload = +enable_python_invocation = +enable_shared = +enable_source_debug = +enable_static = +enable_stdin = +enable_timer = +enable_triqs_v1_4 = +enable_triqs_v2_0 = +enable_zdot_bugfix = +exec_prefix = ${prefix} +fc_info_string = GNU Fortran (MacPorts gcc9 9.4.0_0) 9.4.0 +fc_mod_fcflags = +fc_timing = standard +fcflags_opt_02_clib = +fcflags_opt_10_defs = +fcflags_opt_11_memory_mpi = +fcflags_opt_12_hide_mpi = +fcflags_opt_14_hidewrite = +fcflags_opt_16_hideleave = +fcflags_opt_16_kokkos_toolbox = +fcflags_opt_17_gpu_toolbox = +fcflags_opt_17_libtetra_ext = +fcflags_opt_17_minimax = +fcflags_opt_17_yaml_out = +fcflags_opt_18_timing = +fcflags_opt_21_hashfuncs = +fcflags_opt_27_toolbox_oop = +fcflags_opt_28_numeric_noabirule = +fcflags_opt_29_kpoints = +fcflags_opt_32_util = +fcflags_opt_33_xc_lowlevel = +fcflags_opt_39_libpaw = +fcflags_opt_41_geometry = +fcflags_opt_42_nlstrain = +fcflags_opt_42_parser = +fcflags_opt_43_ptgroups = -O0 +fcflags_opt_43_wvl_wrappers = +fcflags_opt_44_abitools = +fcflags_opt_44_abitypes_defs = +fcflags_opt_44_manage_kokkos = +fcflags_opt_45_geomoptim = +fcflags_opt_45_xgTools = +fcflags_opt_46_ghc_omp = +fcflags_opt_46_manage_cuda = +fcflags_opt_48_diago = +fcflags_opt_49_gw_toolbox_oop = +fcflags_opt_51_manage_mpi = +fcflags_opt_52_fft_mpi_noabirule = +fcflags_opt_53_ffts = +fcflags_opt_54_spacepar = +fcflags_opt_55_abiutil = +fcflags_opt_56_io_mpi = +fcflags_opt_56_mixing = +fcflags_opt_56_recipspace = +fcflags_opt_56_xc = +fcflags_opt_57_iopsp_parser = +fcflags_opt_57_iovars = +fcflags_opt_61_occeig = +fcflags_opt_62_cg_noabirule = +fcflags_opt_62_ctqmc = +fcflags_opt_62_iowfdenpot = +fcflags_opt_62_poisson = +fcflags_opt_62_wvl_wfs = +fcflags_opt_64_psp = +fcflags_opt_65_lotf_base = +fcflags_opt_65_paw = +fcflags_opt_66_nonlocal = +fcflags_opt_66_vdwxc = +fcflags_opt_66_wfs = +fcflags_opt_67_common = +fcflags_opt_67_python_invocation_ext = +fcflags_opt_67_triqs_ext = +fcflags_opt_68_dmft = +fcflags_opt_68_lotf = +fcflags_opt_68_recursion = +fcflags_opt_68_rsprc = +fcflags_opt_69_wfdesc = +fcflags_opt_70_gw = +fcflags_opt_71_bse = +fcflags_opt_71_wannier = +fcflags_opt_72_response = +fcflags_opt_77_ddb = +fcflags_opt_77_suscep = +fcflags_opt_78_effpot = +fcflags_opt_78_eph = +fcflags_opt_79_seqpar_mpi = +fcflags_opt_80_rttddft = +fcflags_opt_80_tdep = +fcflags_opt_94_scfcv = +fcflags_opt_95_drive = +fcflags_opt_98_main = +fcflags_opt_bigdft = +fcflags_opt_default = +fcflags_opt_hdf5 = +fcflags_opt_levmar = +fcflags_opt_libpsml = +fcflags_opt_libxc = +fcflags_opt_libxml2 = +fcflags_opt_linalg = +fcflags_opt_netcdf = +fcflags_opt_netcdf_fortran = +fcflags_opt_papi = +fcflags_opt_triqs = +fcflags_opt_wannier90 = +fcflags_opt_xmlf90 = +host = x86_64-apple-darwin18.7.0 +host_alias = +host_cpu = x86_64 +host_os = darwin18.7.0 +host_vendor = apple +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = ${SHELL} /Users/gonze/_Research/ABINIT_git/gonze/config/gnu/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = ${datarootdir}/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = $(MKDIR_P) +oldincludedir = /usr/include +pdfdir = ${docdir} +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +runstatedir = ${localstatedir}/run +sbindir = ${exec_prefix}/sbin +sd_abinit_common_cppflags = +sd_abinit_common_enable = no +sd_abinit_common_enable_def = no +sd_abinit_common_fcflags = +sd_abinit_common_init = def +sd_abinit_common_ldflags = +sd_abinit_common_libs = +sd_abinit_common_ok = unknown +sd_abinit_common_options = optional skip +sd_abinit_common_policy = skip +sd_abinit_common_status = optional +sd_bigdft_cppflags = +sd_bigdft_enable = no +sd_bigdft_enable_def = no +sd_bigdft_fcflags = +sd_bigdft_init = def +sd_bigdft_ldflags = +sd_bigdft_libs = +sd_bigdft_ok = unknown +sd_bigdft_options = optional warn +sd_bigdft_policy = warn +sd_bigdft_status = optional +sd_fft_cflags = +sd_fft_choices = +sd_fft_cppflags = -I/opt/local/include +sd_fft_cxxflags = +sd_fft_enable = yes +sd_fft_fcflags = -I/opt/local/include +sd_fft_flavor = fftw3 +sd_fft_init = kwd +sd_fft_ldflags = +sd_fft_libs = -L/opt/local/lib -lfftw3 -lfftw3f +sd_fft_ok = yes +sd_fftw3_cflags = +sd_fftw3_cppflags = -I/opt/local/include +sd_fftw3_enable = yes +sd_fftw3_enable_def = no +sd_fftw3_fcflags = -I/opt/local/include +sd_fftw3_init = env +sd_fftw3_ldflags = +sd_fftw3_libs = -L/opt/local/lib -lfftw3 -lfftw3f +sd_fftw3_ok = yes +sd_fftw3_options = optional skip +sd_fftw3_policy = skip +sd_fftw3_status = optional +sd_gpu_cflags = +sd_gpu_cppflags = +sd_gpu_cxxflags = +sd_gpu_enable = no +sd_gpu_enable_def = no +sd_gpu_fcflags = +sd_gpu_init = def +sd_gpu_ldflags = +sd_gpu_libs = +sd_gpu_ok = no +sd_gpu_options = optional warn +sd_gpu_policy = warn +sd_gpu_prefix = +sd_gpu_status = optional +sd_hdf5_cflags = +sd_hdf5_cppflags = -I/opt/local/include -I/opt/local/include +sd_hdf5_cxxflags = +sd_hdf5_enable = yes +sd_hdf5_enable_def = yes +sd_hdf5_enable_fc = no +sd_hdf5_fcflags = +sd_hdf5_h5cc = /opt/local/bin/h5cc +sd_hdf5_h5fc = +sd_hdf5_init = dir +sd_hdf5_ldflags = +sd_hdf5_libs = -L/opt/local/lib -L/opt/local/lib -lhdf5_hl -L/opt/local/lib -lhdf5 -lz -ldl -lm +sd_hdf5_ok = yes +sd_hdf5_options = required no-fortran warn +sd_hdf5_policy = warn +sd_hdf5_status = required +sd_kokkos_cppflags = +sd_kokkos_cxxflags = +sd_kokkos_enable = no +sd_kokkos_enable_def = no +sd_kokkos_init = def +sd_kokkos_ldflags = +sd_kokkos_libs = +sd_kokkos_ok = unknown +sd_kokkos_options = optional fail +sd_kokkos_policy = fail +sd_kokkos_status = optional +sd_levmar_cflags = +sd_levmar_cppflags = +sd_levmar_enable = no +sd_levmar_enable_def = no +sd_levmar_init = def +sd_levmar_ldflags = +sd_levmar_libs = +sd_levmar_ok = unknown +sd_levmar_options = optional fail +sd_levmar_policy = fail +sd_levmar_status = optional +sd_libpaw_cppflags = +sd_libpaw_enable = no +sd_libpaw_enable_def = no +sd_libpaw_fcflags = +sd_libpaw_init = def +sd_libpaw_ldflags = +sd_libpaw_libs = +sd_libpaw_ok = unknown +sd_libpaw_options = optional skip +sd_libpaw_policy = skip +sd_libpaw_status = optional +sd_libpsml_cppflags = +sd_libpsml_enable = no +sd_libpsml_enable_def = no +sd_libpsml_fcflags = +sd_libpsml_init = def +sd_libpsml_ldflags = +sd_libpsml_libs = +sd_libpsml_ok = unknown +sd_libpsml_options = optional warn +sd_libpsml_policy = warn +sd_libpsml_status = optional +sd_libxc_cflags = +sd_libxc_cppflags = -I/opt/local/include +sd_libxc_enable = yes +sd_libxc_enable_def = yes +sd_libxc_enable_fc = no +sd_libxc_fcflags = +sd_libxc_init = dir +sd_libxc_ldflags = +sd_libxc_libs = -L/opt/local/lib -lxc +sd_libxc_ok = yes +sd_libxc_options = required no-fortran warn +sd_libxc_policy = warn +sd_libxc_status = required +sd_linalg_cflags = +sd_linalg_choices = +sd_linalg_cppflags = +sd_linalg_cxxflags = +sd_linalg_enable = yes +sd_linalg_fcflags = -I/opt/local/include +sd_linalg_flavor = openblas +sd_linalg_has_elpa = no +sd_linalg_has_scalapack = no +sd_linalg_init = env +sd_linalg_ldflags = +sd_linalg_libs = -L/opt/local/lib -lopenblas +sd_linalg_ok = yes +sd_mpi_cc = /opt/local/bin/mpicc +sd_mpi_cflags = +sd_mpi_cppflags = -I/opt/local/include +sd_mpi_cxx = /opt/local/bin/mpicxx +sd_mpi_enable = yes +sd_mpi_enable_cxx = yes +sd_mpi_enable_def = auto +sd_mpi_enable_fc = yes +sd_mpi_fc = /opt/local/bin/mpif90 +sd_mpi_fcflags = -I/opt/local/include +sd_mpi_init = dir +sd_mpi_ldflags = +sd_mpi_libs = +sd_mpi_ok = yes +sd_mpi_options = auto optional fail +sd_mpi_policy = fail +sd_mpi_status = optional +sd_netcdf_cflags = +sd_netcdf_cppflags = -I/opt/local/include +sd_netcdf_enable = yes +sd_netcdf_enable_def = yes +sd_netcdf_fcflags = -I/opt/local/include +sd_netcdf_fortran_cflags = +sd_netcdf_fortran_cppflags = -I/opt/local/include +sd_netcdf_fortran_enable = yes +sd_netcdf_fortran_enable_def = yes +sd_netcdf_fortran_fcflags = -I/opt/local/include +sd_netcdf_fortran_init = dir +sd_netcdf_fortran_ldflags = +sd_netcdf_fortran_libs = -L/opt/local/lib -lnetcdff +sd_netcdf_fortran_ok = yes +sd_netcdf_fortran_options = required warn +sd_netcdf_fortran_policy = warn +sd_netcdf_fortran_status = required +sd_netcdf_init = dir +sd_netcdf_ldflags = +sd_netcdf_libs = -L/opt/local/lib -lnetcdf +sd_netcdf_ok = yes +sd_netcdf_options = required warn +sd_netcdf_policy = warn +sd_netcdf_status = required +sd_papi_cflags = +sd_papi_cppflags = +sd_papi_enable = no +sd_papi_enable_def = no +sd_papi_init = def +sd_papi_ldflags = +sd_papi_libs = +sd_papi_ok = unknown +sd_papi_options = optional fail +sd_papi_policy = fail +sd_papi_sd_papi_fcflags = +sd_papi_status = optional +sd_pfft_cflags = +sd_pfft_cppflags = +sd_pfft_enable = no +sd_pfft_enable_def = no +sd_pfft_init = def +sd_pfft_ldflags = +sd_pfft_libs = +sd_pfft_ok = unknown +sd_pfft_options = optional skip +sd_pfft_policy = skip +sd_pfft_status = optional +sd_sys_fcflags = +sd_triqs_cflags = +sd_triqs_cppflags = +sd_triqs_cxxflags = +sd_triqs_enable = no +sd_triqs_enable_def = no +sd_triqs_fcflags = +sd_triqs_init = def +sd_triqs_ldflags = +sd_triqs_libs = +sd_triqs_ok = unknown +sd_triqs_options = optional fail +sd_triqs_policy = fail +sd_triqs_status = optional +sd_wannier90_cppflags = +sd_wannier90_enable = yes +sd_wannier90_enable_def = no +sd_wannier90_fcflags = -I/opt/local/include +sd_wannier90_init = env +sd_wannier90_ldflags = +sd_wannier90_libs = -L/opt/local/lib -lwannier +sd_wannier90_ok = yes +sd_wannier90_options = optional warn +sd_wannier90_policy = warn +sd_wannier90_status = optional +sd_xmlf90_cppflags = +sd_xmlf90_enable = no +sd_xmlf90_enable_def = no +sd_xmlf90_fcflags = +sd_xmlf90_init = def +sd_xmlf90_ldflags = +sd_xmlf90_libs = +sd_xmlf90_ok = unknown +sd_xmlf90_options = optional warn +sd_xmlf90_policy = warn +sd_xmlf90_status = optional +sd_yakl_cppflags = +sd_yakl_enable = no +sd_yakl_enable_def = no +sd_yakl_fcflags = +sd_yakl_init = def +sd_yakl_ldflags = +sd_yakl_libs = +sd_yakl_ok = unknown +sd_yakl_options = optional fail +sd_yakl_policy = fail +sd_yakl_status = optional +sharedstatedir = ${prefix}/com +src_02_clib_fcflags = -I$(top_builddir)/shared/common/src/02_clib -I$(top_srcdir)/shared/common/src/02_clib +src_10_defs_fcflags = -I$(top_builddir)/shared/common/src/10_defs -I$(top_srcdir)/shared/common/src/10_defs +src_11_memory_mpi_fcflags = -I$(top_builddir)/shared/common/src/11_memory_mpi -I$(top_srcdir)/shared/common/src/11_memory_mpi +src_12_hide_mpi_fcflags = -I$(top_builddir)/shared/common/src/12_hide_mpi -I$(top_srcdir)/shared/common/src/12_hide_mpi +src_14_hidewrite_fcflags = -I$(top_builddir)/shared/common/src/14_hidewrite -I$(top_srcdir)/shared/common/src/14_hidewrite +src_16_hideleave_fcflags = -I$(top_builddir)/shared/common/src/16_hideleave -I$(top_srcdir)/shared/common/src/16_hideleave +src_16_kokkos_toolbox_fcflags = -I$(top_builddir)/shared/common/src/16_kokkos_toolbox -I$(top_srcdir)/shared/common/src/16_kokkos_toolbox +src_17_gpu_toolbox_fcflags = -I$(top_builddir)/shared/common/src/17_gpu_toolbox -I$(top_srcdir)/shared/common/src/17_gpu_toolbox +src_17_libtetra_ext_fcflags = -I$(top_builddir)/shared/common/src/17_libtetra_ext -I$(top_srcdir)/shared/common/src/17_libtetra_ext +src_17_minimax_fcflags = -I$(top_builddir)/shared/common/src/17_minimax -I$(top_srcdir)/shared/common/src/17_minimax +src_17_yaml_out_fcflags = -I$(top_builddir)/shared/common/src/17_yaml_out -I$(top_srcdir)/shared/common/src/17_yaml_out +src_18_timing_fcflags = -I$(top_builddir)/shared/common/src/18_timing -I$(top_srcdir)/shared/common/src/18_timing +src_21_hashfuncs_fcflags = -I$(top_builddir)/shared/common/src/21_hashfuncs -I$(top_srcdir)/shared/common/src/21_hashfuncs +src_27_toolbox_oop_fcflags = -I$(top_builddir)/shared/common/src/27_toolbox_oop -I$(top_srcdir)/shared/common/src/27_toolbox_oop +src_28_numeric_noabirule_fcflags = -I$(top_builddir)/shared/common/src/28_numeric_noabirule -I$(top_srcdir)/shared/common/src/28_numeric_noabirule +src_29_kpoints_fcflags = -I$(top_builddir)/shared/common/src/29_kpoints -I$(top_srcdir)/shared/common/src/29_kpoints +src_32_util_fcflags = -I$(top_builddir)/shared/common/src/32_util -I$(top_srcdir)/shared/common/src/32_util +src_33_xc_lowlevel_fcflags = -I$(top_builddir)/shared/common/src/33_xc_lowlevel -I$(top_srcdir)/shared/common/src/33_xc_lowlevel +src_39_libpaw_fcflags = -I$(top_builddir)/shared/libpaw/src -I$(top_srcdir)/shared/libpaw/src +src_41_geometry_fcflags = -I$(top_builddir)/src/41_geometry -I$(top_srcdir)/src/41_geometry +src_42_nlstrain_fcflags = -I$(top_builddir)/src/42_nlstrain -I$(top_srcdir)/src/42_nlstrain +src_42_parser_fcflags = -I$(top_builddir)/src/42_parser -I$(top_srcdir)/src/42_parser +src_43_ptgroups_fcflags = -I$(top_builddir)/src/43_ptgroups -I$(top_srcdir)/src/43_ptgroups +src_43_wvl_wrappers_fcflags = -I$(top_builddir)/src/43_wvl_wrappers -I$(top_srcdir)/src/43_wvl_wrappers +src_44_abitools_fcflags = -I$(top_builddir)/src/44_abitools -I$(top_srcdir)/src/44_abitools +src_44_abitypes_defs_fcflags = -I$(top_builddir)/src/44_abitypes_defs -I$(top_srcdir)/src/44_abitypes_defs +src_44_manage_kokkos_fcflags = -I$(top_builddir)/src/44_manage_kokkos -I$(top_srcdir)/src/44_manage_kokkos +src_45_geomoptim_fcflags = -I$(top_builddir)/src/45_geomoptim -I$(top_srcdir)/src/45_geomoptim +src_45_xgTools_fcflags = -I$(top_builddir)/src/45_xgTools -I$(top_srcdir)/src/45_xgTools +src_46_ghc_omp_fcflags = -I$(top_builddir)/src/46_ghc_omp -I$(top_srcdir)/src/46_ghc_omp +src_46_manage_cuda_fcflags = -I$(top_builddir)/src/46_manage_cuda -I$(top_srcdir)/src/46_manage_cuda +src_48_diago_fcflags = -I$(top_builddir)/src/48_diago -I$(top_srcdir)/src/48_diago +src_49_gw_toolbox_oop_fcflags = -I$(top_builddir)/src/49_gw_toolbox_oop -I$(top_srcdir)/src/49_gw_toolbox_oop +src_51_manage_mpi_fcflags = -I$(top_builddir)/src/51_manage_mpi -I$(top_srcdir)/src/51_manage_mpi +src_52_fft_mpi_noabirule_fcflags = -I$(top_builddir)/src/52_fft_mpi_noabirule -I$(top_srcdir)/src/52_fft_mpi_noabirule +src_53_ffts_fcflags = -I$(top_builddir)/src/53_ffts -I$(top_srcdir)/src/53_ffts +src_54_spacepar_fcflags = -I$(top_builddir)/src/54_spacepar -I$(top_srcdir)/src/54_spacepar +src_55_abiutil_fcflags = -I$(top_builddir)/src/55_abiutil -I$(top_srcdir)/src/55_abiutil +src_56_io_mpi_fcflags = -I$(top_builddir)/src/56_io_mpi -I$(top_srcdir)/src/56_io_mpi +src_56_mixing_fcflags = -I$(top_builddir)/src/56_mixing -I$(top_srcdir)/src/56_mixing +src_56_recipspace_fcflags = -I$(top_builddir)/src/56_recipspace -I$(top_srcdir)/src/56_recipspace +src_56_xc_fcflags = -I$(top_builddir)/src/56_xc -I$(top_srcdir)/src/56_xc +src_57_iopsp_parser_fcflags = -I$(top_builddir)/src/57_iopsp_parser -I$(top_srcdir)/src/57_iopsp_parser +src_57_iovars_fcflags = -I$(top_builddir)/src/57_iovars -I$(top_srcdir)/src/57_iovars +src_61_occeig_fcflags = -I$(top_builddir)/src/61_occeig -I$(top_srcdir)/src/61_occeig +src_62_cg_noabirule_fcflags = -I$(top_builddir)/src/62_cg_noabirule -I$(top_srcdir)/src/62_cg_noabirule +src_62_ctqmc_fcflags = -I$(top_builddir)/src/62_ctqmc -I$(top_srcdir)/src/62_ctqmc +src_62_iowfdenpot_fcflags = -I$(top_builddir)/src/62_iowfdenpot -I$(top_srcdir)/src/62_iowfdenpot +src_62_poisson_fcflags = -I$(top_builddir)/src/62_poisson -I$(top_srcdir)/src/62_poisson +src_62_wvl_wfs_fcflags = -I$(top_builddir)/src/62_wvl_wfs -I$(top_srcdir)/src/62_wvl_wfs +src_64_psp_fcflags = -I$(top_builddir)/src/64_psp -I$(top_srcdir)/src/64_psp +src_65_lotf_base_fcflags = -I$(top_builddir)/src/65_lotf_base -I$(top_srcdir)/src/65_lotf_base +src_65_paw_fcflags = -I$(top_builddir)/src/65_paw -I$(top_srcdir)/src/65_paw +src_66_nonlocal_fcflags = -I$(top_builddir)/src/66_nonlocal -I$(top_srcdir)/src/66_nonlocal +src_66_vdwxc_fcflags = -I$(top_builddir)/src/66_vdwxc -I$(top_srcdir)/src/66_vdwxc +src_66_wfs_fcflags = -I$(top_builddir)/src/66_wfs -I$(top_srcdir)/src/66_wfs +src_67_common_fcflags = -I$(top_builddir)/src/67_common -I$(top_srcdir)/src/67_common +src_67_python_invocation_ext_fcflags = -I$(top_builddir)/src/67_python_invocation_ext -I$(top_srcdir)/src/67_python_invocation_ext +src_67_triqs_ext_fcflags = -I$(top_builddir)/src/67_triqs_ext -I$(top_srcdir)/src/67_triqs_ext +src_68_dmft_fcflags = -I$(top_builddir)/src/68_dmft -I$(top_srcdir)/src/68_dmft +src_68_lotf_fcflags = -I$(top_builddir)/src/68_lotf -I$(top_srcdir)/src/68_lotf +src_68_recursion_fcflags = -I$(top_builddir)/src/68_recursion -I$(top_srcdir)/src/68_recursion +src_68_rsprc_fcflags = -I$(top_builddir)/src/68_rsprc -I$(top_srcdir)/src/68_rsprc +src_69_wfdesc_fcflags = -I$(top_builddir)/src/69_wfdesc -I$(top_srcdir)/src/69_wfdesc +src_70_gw_fcflags = -I$(top_builddir)/src/70_gw -I$(top_srcdir)/src/70_gw +src_71_bse_fcflags = -I$(top_builddir)/src/71_bse -I$(top_srcdir)/src/71_bse +src_71_wannier_fcflags = -I$(top_builddir)/src/71_wannier -I$(top_srcdir)/src/71_wannier +src_72_response_fcflags = -I$(top_builddir)/src/72_response -I$(top_srcdir)/src/72_response +src_77_ddb_fcflags = -I$(top_builddir)/src/77_ddb -I$(top_srcdir)/src/77_ddb +src_77_suscep_fcflags = -I$(top_builddir)/src/77_suscep -I$(top_srcdir)/src/77_suscep +src_78_effpot_fcflags = -I$(top_builddir)/src/78_effpot -I$(top_srcdir)/src/78_effpot +src_78_eph_fcflags = -I$(top_builddir)/src/78_eph -I$(top_srcdir)/src/78_eph +src_79_seqpar_mpi_fcflags = -I$(top_builddir)/src/79_seqpar_mpi -I$(top_srcdir)/src/79_seqpar_mpi +src_80_rttddft_fcflags = -I$(top_builddir)/src/80_rttddft -I$(top_srcdir)/src/80_rttddft +src_80_tdep_fcflags = -I$(top_builddir)/src/80_tdep -I$(top_srcdir)/src/80_tdep +src_94_scfcv_fcflags = -I$(top_builddir)/src/94_scfcv -I$(top_srcdir)/src/94_scfcv +src_95_drive_fcflags = -I$(top_builddir)/src/95_drive -I$(top_srcdir)/src/95_drive +src_common_fcflags = -I$(top_builddir)/shared/common/src/incs -I$(top_srcdir)/shared/common/src/incs -I$(top_builddir)/shared/common/src/mods -I$(top_srcdir)/shared/common/src/mods +src_core_fcflags = -I$(top_builddir)/src/incs -I$(top_srcdir)/src/incs -I$(top_builddir)/src/mods -I$(top_srcdir)/src/mods +src_libpaw_fcflags = -I$(top_builddir)/shared/libpaw/incs -I$(top_srcdir)/shared/libpaw/incs -I$(top_builddir)/shared/libpaw/mods -I$(top_srcdir)/shared/libpaw/mods +srcdir = . +sysconfdir = ${prefix}/etc +target = x86_64-apple-darwin18.7.0 +target_alias = +target_cpu = x86_64 +target_os = darwin18.7.0 +target_vendor = apple +top_build_prefix = ../../../../ +top_builddir = ../../../.. +top_srcdir = ../../../.. +with_abinit_common = +with_bigdft = +with_config_file = +with_debug_flavor = +with_fallbacks = +with_fc_vendor = +with_fc_version = +with_fft_flavor = fftw3 +with_fftw3 = +with_gnu_ld = +with_gpu = +with_hdf5 = /opt/local +with_kokkos = +with_levmar = +with_libpaw = +with_libpsml = +with_libxc = /opt/local +with_libxml2 = +with_linalg_flavor = openblas +with_mpi = /opt/local +with_mpi_level = +with_netcdf = /opt/local +with_optim_flavor = +with_papi = +with_pfft = +with_triqs = +with_wannier90 = +with_xmlf90 = +with_yakl = +AM_CFLAGS = -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include +AM_CXXFLAGS = $(sd_triqs_cxxflags) +AM_FCFLAGS = -ffree-form -J../mods +AM_CPPFLAGS = \ + -I$(top_builddir)/shared/common/src/10_defs -I$(top_srcdir)/shared/common/src/10_defs \ + -I$(top_builddir)/shared/common/src/12_hide_mpi -I$(top_srcdir)/shared/common/src/12_hide_mpi \ + -I$(top_builddir)/shared/common/src/14_hidewrite -I$(top_srcdir)/shared/common/src/14_hidewrite \ + -I$(top_builddir)/shared/common/src/16_hideleave -I$(top_srcdir)/shared/common/src/16_hideleave \ + -I$(top_builddir)/shared/common/src/17_libtetra_ext -I$(top_srcdir)/shared/common/src/17_libtetra_ext \ + -I$(top_builddir)/shared/common/src/18_timing -I$(top_srcdir)/shared/common/src/18_timing \ + -I$(top_builddir)/shared/common/src/28_numeric_noabirule -I$(top_srcdir)/shared/common/src/28_numeric_noabirule \ + -I$(top_builddir)/shared/common/src/incs -I$(top_srcdir)/shared/common/src/incs -I$(top_builddir)/shared/common/src/mods -I$(top_srcdir)/shared/common/src/mods \ + -I$(top_builddir)/src/incs -I$(top_srcdir)/src/incs -I$(top_builddir)/src/mods -I$(top_srcdir)/src/mods \ + -I$(top_builddir)/shared/libpaw/incs -I$(top_srcdir)/shared/libpaw/incs -I$(top_builddir)/shared/libpaw/mods -I$(top_srcdir)/shared/libpaw/mods \ + + + +# Regular source files +lib29_kpoints_srcs = \ + m_hashtable.F90 \ + m_htetra.F90 \ + m_octree.F90 \ + m_symkpt.F90 + + +# Source files depending on conditionals + +# Library description +noinst_LIBRARIES = lib29_kpoints.a +lib29_kpoints_a_SOURCES = $(lib29_kpoints_srcs) + +# Dependencies (inside the directory) of directory 29_kpoints +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. +CLEANFILES = m_hashtable_cpp.f90 m_htetra_cpp.f90 m_octree_cpp.f90 \ + m_symkpt_cpp.f90 m_hashtable.$(MODEXT) m_htetra.$(MODEXT) \ + m_octree.$(MODEXT) m_symkpt.$(MODEXT) +EXTRA_DIST = abinit.src abinit.dep _29_kpoints_ +all: all-am + +.SUFFIXES: +.SUFFIXES: .F90 .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu shared/common/src/29_kpoints/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu shared/common/src/29_kpoints/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) + +lib29_kpoints.a: $(lib29_kpoints_a_OBJECTS) $(lib29_kpoints_a_DEPENDENCIES) $(EXTRA_lib29_kpoints_a_DEPENDENCIES) + $(AM_V_at)-rm -f lib29_kpoints.a + $(AM_V_AR)$(lib29_kpoints_a_AR) lib29_kpoints.a $(lib29_kpoints_a_OBJECTS) $(lib29_kpoints_a_LIBADD) + $(AM_V_at)$(RANLIB) lib29_kpoints.a + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +.F90.o: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ $< + +.F90.obj: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-noinstLIBRARIES cscopelist-am ctags ctags-am distclean \ + distclean-compile distclean-generic distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am + +.PRECIOUS: Makefile + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/GX-PAW/common/src/29_kpoints/Makefile.am b/GX-PAW/common/src/29_kpoints/Makefile.am new file mode 100644 index 00000000..c536b6ec --- /dev/null +++ b/GX-PAW/common/src/29_kpoints/Makefile.am @@ -0,0 +1,67 @@ +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-corelibs on 2024/03/16 21:07:38 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-corelibs script or its config file instead. +# + +AM_CFLAGS = @ABI_CPPFLAGS@ +AM_CXXFLAGS = $(sd_triqs_cxxflags) +AM_FCFLAGS = @FPPFLAGS@ @FCFLAGS_FREEFORM@ @FCFLAGS_MODDIR@ @sd_sys_fcflags@ @fcflags_opt_29_kpoints@ + +AM_CPPFLAGS = \ + @src_10_defs_fcflags@ \ + @src_12_hide_mpi_fcflags@ \ + @src_14_hidewrite_fcflags@ \ + @src_16_hideleave_fcflags@ \ + @src_17_libtetra_ext_fcflags@ \ + @src_18_timing_fcflags@ \ + @src_28_numeric_noabirule_fcflags@ \ + @src_common_fcflags@ \ + @src_core_fcflags@ \ + @src_libpaw_fcflags@ \ + @fc_mod_fcflags@ + +# Regular source files +lib29_kpoints_srcs = \ + m_hashtable.F90 \ + m_htetra.F90 \ + m_octree.F90 \ + m_symkpt.F90 + +# Source files depending on conditionals + + +# Library description +noinst_LIBRARIES = lib29_kpoints.a + +lib29_kpoints_a_SOURCES= $(lib29_kpoints_srcs) + +CLEANFILES = \ + m_hashtable_cpp.f90 \ + m_htetra_cpp.f90 \ + m_octree_cpp.f90 \ + m_symkpt_cpp.f90 + +EXTRA_DIST = abinit.src + +EXTRA_DIST += abinit.dep + +# Dependencies (inside the directory) of directory 29_kpoints +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. + +CLEANFILES += \ + m_hashtable.$(MODEXT) \ + m_htetra.$(MODEXT) \ + m_octree.$(MODEXT) \ + m_symkpt.$(MODEXT) + + +EXTRA_DIST += _29_kpoints_ diff --git a/GX-PAW/common/src/29_kpoints/Makefile.in b/GX-PAW/common/src/29_kpoints/Makefile.in new file mode 100644 index 00000000..5b53da57 --- /dev/null +++ b/GX-PAW/common/src/29_kpoints/Makefile.in @@ -0,0 +1,1463 @@ +# Makefile.in generated by automake 1.16.3 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2020 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-corelibs on 2024/03/16 21:07:38 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-corelibs script or its config file instead. +# + +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = shared/common/src/29_kpoints +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/m4/arch-gpu.m4 \ + $(top_srcdir)/config/m4/arch-mpi.m4 \ + $(top_srcdir)/config/m4/auto-autotools.m4 \ + $(top_srcdir)/config/m4/auto-corelibs.m4 \ + $(top_srcdir)/config/m4/auto-debug.m4 \ + $(top_srcdir)/config/m4/auto-dirflags.m4 \ + $(top_srcdir)/config/m4/auto-env.m4 \ + $(top_srcdir)/config/m4/auto-hints.m4 \ + $(top_srcdir)/config/m4/auto-optim.m4 \ + $(top_srcdir)/config/m4/auto-options.m4 \ + $(top_srcdir)/config/m4/auto-output.m4 \ + $(top_srcdir)/config/m4/auto-triggers.m4 \ + $(top_srcdir)/config/m4/conf-atompaw.m4 \ + $(top_srcdir)/config/m4/conf-debug.m4 \ + $(top_srcdir)/config/m4/conf-fallbacks.m4 \ + $(top_srcdir)/config/m4/conf-files.m4 \ + $(top_srcdir)/config/m4/conf-init.m4 \ + $(top_srcdir)/config/m4/conf-openmp.m4 \ + $(top_srcdir)/config/m4/conf-optim.m4 \ + $(top_srcdir)/config/m4/lang-c++.m4 \ + $(top_srcdir)/config/m4/lang-c.m4 \ + $(top_srcdir)/config/m4/lang-fortran-import.m4 \ + $(top_srcdir)/config/m4/lang-fortran.m4 \ + $(top_srcdir)/config/m4/lang-python.m4 \ + $(top_srcdir)/config/m4/libxml2.m4 \ + $(top_srcdir)/config/m4/misc-display.m4 \ + $(top_srcdir)/config/m4/sd_abinit_common.m4 \ + $(top_srcdir)/config/m4/sd_arch_gpu.m4 \ + $(top_srcdir)/config/m4/sd_arch_mpi.m4 \ + $(top_srcdir)/config/m4/sd_bigdft.m4 \ + $(top_srcdir)/config/m4/sd_core.m4 \ + $(top_srcdir)/config/m4/sd_esl.m4 \ + $(top_srcdir)/config/m4/sd_fftw3.m4 \ + $(top_srcdir)/config/m4/sd_gpu_kokkos.m4 \ + $(top_srcdir)/config/m4/sd_gpu_yakl.m4 \ + $(top_srcdir)/config/m4/sd_io_hdf5.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf_fortran.m4 \ + $(top_srcdir)/config/m4/sd_levmar.m4 \ + $(top_srcdir)/config/m4/sd_libpaw.m4 \ + $(top_srcdir)/config/m4/sd_libpsml.m4 \ + $(top_srcdir)/config/m4/sd_libxc.m4 \ + $(top_srcdir)/config/m4/sd_math_fft.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_core.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_util.m4 \ + $(top_srcdir)/config/m4/sd_papi.m4 \ + $(top_srcdir)/config/m4/sd_pfft.m4 \ + $(top_srcdir)/config/m4/sd_triqs.m4 \ + $(top_srcdir)/config/m4/sd_wannier90.m4 \ + $(top_srcdir)/config/m4/sd_xmlf90.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = +lib29_kpoints_a_AR = $(AR) $(ARFLAGS) +lib29_kpoints_a_LIBADD = +am__objects_1 = m_hashtable.$(OBJEXT) m_htetra.$(OBJEXT) \ + m_octree.$(OBJEXT) m_symkpt.$(OBJEXT) +am_lib29_kpoints_a_OBJECTS = $(am__objects_1) +lib29_kpoints_a_OBJECTS = $(am_lib29_kpoints_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +PPFCCOMPILE = $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) +AM_V_PPFC = $(am__v_PPFC_@AM_V@) +am__v_PPFC_ = $(am__v_PPFC_@AM_DEFAULT_V@) +am__v_PPFC_0 = @echo " PPFC " $@; +am__v_PPFC_1 = +FCLD = $(FC) +FCLINK = $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \ + $@ +AM_V_FCLD = $(am__v_FCLD_@AM_V@) +am__v_FCLD_ = $(am__v_FCLD_@AM_DEFAULT_V@) +am__v_FCLD_0 = @echo " FCLD " $@; +am__v_FCLD_1 = +SOURCES = $(lib29_kpoints_a_SOURCES) +DIST_SOURCES = $(lib29_kpoints_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ABINIT_BINARY_PACKAGE = @ABINIT_BINARY_PACKAGE@ +ABINIT_COMMON_CPPFLAGS = @ABINIT_COMMON_CPPFLAGS@ +ABINIT_COMMON_FCFLAGS = @ABINIT_COMMON_FCFLAGS@ +ABINIT_COMMON_LDFLAGS = @ABINIT_COMMON_LDFLAGS@ +ABINIT_COMMON_LIBS = @ABINIT_COMMON_LIBS@ +ABINIT_TARGET = @ABINIT_TARGET@ +ABINIT_VERSION = @ABINIT_VERSION@ +ABINIT_VERSION_BASE = @ABINIT_VERSION_BASE@ +ABINIT_VERSION_BUILD = @ABINIT_VERSION_BUILD@ +ABINIT_VERSION_MAJOR = @ABINIT_VERSION_MAJOR@ +ABINIT_VERSION_MICRO = @ABINIT_VERSION_MICRO@ +ABINIT_VERSION_MINOR = @ABINIT_VERSION_MINOR@ +ABI_CPPFLAGS = @ABI_CPPFLAGS@ +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +ARFLAGS = @ARFLAGS@ +ARFLAGS_CMD = @ARFLAGS_CMD@ +ARFLAGS_DEBUG = @ARFLAGS_DEBUG@ +ARFLAGS_EXTRA = @ARFLAGS_EXTRA@ +ARFLAGS_HINTS = @ARFLAGS_HINTS@ +ARFLAGS_OPTIM = @ARFLAGS_OPTIM@ +ATOMPAW_BIN = @ATOMPAW_BIN@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BIGDFT_CPPFLAGS = @BIGDFT_CPPFLAGS@ +BIGDFT_FCFLAGS = @BIGDFT_FCFLAGS@ +BIGDFT_LDFLAGS = @BIGDFT_LDFLAGS@ +BIGDFT_LIBS = @BIGDFT_LIBS@ +BOURNE_SHELL = @BOURNE_SHELL@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CC_LDFLAGS = @CC_LDFLAGS@ +CC_LDFLAGS_DEBUG = @CC_LDFLAGS_DEBUG@ +CC_LDFLAGS_EXTRA = @CC_LDFLAGS_EXTRA@ +CC_LDFLAGS_GPU = @CC_LDFLAGS_GPU@ +CC_LDFLAGS_HINTS = @CC_LDFLAGS_HINTS@ +CC_LDFLAGS_OPTIM = @CC_LDFLAGS_OPTIM@ +CC_LIBS = @CC_LIBS@ +CC_LIBS_DEBUG = @CC_LIBS_DEBUG@ +CC_LIBS_EXTRA = @CC_LIBS_EXTRA@ +CC_LIBS_GPU = @CC_LIBS_GPU@ +CC_LIBS_HINTS = @CC_LIBS_HINTS@ +CC_LIBS_OPTIM = @CC_LIBS_OPTIM@ +CFLAGS = @CFLAGS@ +CFLAGS_DEBUG = @CFLAGS_DEBUG@ +CFLAGS_EXTRA = @CFLAGS_EXTRA@ +CFLAGS_GPU = @CFLAGS_GPU@ +CFLAGS_HINTS = @CFLAGS_HINTS@ +CFLAGS_OPTIM = @CFLAGS_OPTIM@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CPPFLAGS_DEBUG = @CPPFLAGS_DEBUG@ +CPPFLAGS_EXTRA = @CPPFLAGS_EXTRA@ +CPPFLAGS_GPU = @CPPFLAGS_GPU@ +CPPFLAGS_HINTS = @CPPFLAGS_HINTS@ +CPPFLAGS_HINTS_EXT = @CPPFLAGS_HINTS_EXT@ +CPPFLAGS_OPTIM = @CPPFLAGS_OPTIM@ +CXX = @CXX@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CXXFLAGS_DEBUG = @CXXFLAGS_DEBUG@ +CXXFLAGS_EXTRA = @CXXFLAGS_EXTRA@ +CXXFLAGS_GPU = @CXXFLAGS_GPU@ +CXXFLAGS_HINTS = @CXXFLAGS_HINTS@ +CXXFLAGS_OPTIM = @CXXFLAGS_OPTIM@ +CXX_LDFLAGS = @CXX_LDFLAGS@ +CXX_LDFLAGS_DEBUG = @CXX_LDFLAGS_DEBUG@ +CXX_LDFLAGS_EXTRA = @CXX_LDFLAGS_EXTRA@ +CXX_LDFLAGS_GPU = @CXX_LDFLAGS_GPU@ +CXX_LDFLAGS_HINTS = @CXX_LDFLAGS_HINTS@ +CXX_LDFLAGS_OPTIM = @CXX_LDFLAGS_OPTIM@ +CXX_LIBS = @CXX_LIBS@ +CXX_LIBS_DEBUG = @CXX_LIBS_DEBUG@ +CXX_LIBS_EXTRA = @CXX_LIBS_EXTRA@ +CXX_LIBS_GPU = @CXX_LIBS_GPU@ +CXX_LIBS_HINTS = @CXX_LIBS_HINTS@ +CXX_LIBS_OPTIM = @CXX_LIBS_OPTIM@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ +FCFLAGS = @FCFLAGS@ +FCFLAGS_DEBUG = @FCFLAGS_DEBUG@ +FCFLAGS_EXTRA = @FCFLAGS_EXTRA@ +FCFLAGS_F90 = @FCFLAGS_F90@ +FCFLAGS_FIXEDFORM = @FCFLAGS_FIXEDFORM@ +FCFLAGS_FREEFORM = @FCFLAGS_FREEFORM@ +FCFLAGS_HINTS = @FCFLAGS_HINTS@ +FCFLAGS_MODDIR = @FCFLAGS_MODDIR@ +FCFLAGS_OPENMP = @FCFLAGS_OPENMP@ +FCFLAGS_OPENMP_OFFLOAD = @FCFLAGS_OPENMP_OFFLOAD@ +FCFLAGS_OPTIM = @FCFLAGS_OPTIM@ +FCLIBS = @FCLIBS@ +FC_LDFLAGS = @FC_LDFLAGS@ +FC_LDFLAGS_DEBUG = @FC_LDFLAGS_DEBUG@ +FC_LDFLAGS_EXTRA = @FC_LDFLAGS_EXTRA@ +FC_LDFLAGS_HINTS = @FC_LDFLAGS_HINTS@ +FC_LDFLAGS_OPTIM = @FC_LDFLAGS_OPTIM@ +FC_LIBS = @FC_LIBS@ +FC_LIBS_DEBUG = @FC_LIBS_DEBUG@ +FC_LIBS_EXTRA = @FC_LIBS_EXTRA@ +FC_LIBS_HINTS = @FC_LIBS_HINTS@ +FC_LIBS_OPTIM = @FC_LIBS_OPTIM@ +FC_NOWRAP = @FC_NOWRAP@ +FFLAGS = @FFLAGS@ +FFTW3_CFLAGS = @FFTW3_CFLAGS@ +FFTW3_CPPFLAGS = @FFTW3_CPPFLAGS@ +FFTW3_FCFLAGS = @FFTW3_FCFLAGS@ +FFTW3_LDFLAGS = @FFTW3_LDFLAGS@ +FFTW3_LIBS = @FFTW3_LIBS@ +FFT_CFLAGS = @FFT_CFLAGS@ +FFT_FCFLAGS = @FFT_FCFLAGS@ +FPP = @FPP@ +FPPFLAGS = @FPPFLAGS@ +FPPFLAGS_DEBUG = @FPPFLAGS_DEBUG@ +FPPFLAGS_EXTRA = @FPPFLAGS_EXTRA@ +FPPFLAGS_HINTS = @FPPFLAGS_HINTS@ +FPPFLAGS_OPTIM = @FPPFLAGS_OPTIM@ +GPU_ARCH = @GPU_ARCH@ +GPU_CFLAGS = @GPU_CFLAGS@ +GPU_CPPFLAGS = @GPU_CPPFLAGS@ +GPU_CXXFLAGS = @GPU_CXXFLAGS@ +GPU_FCFLAGS = @GPU_FCFLAGS@ +GPU_LDFLAGS = @GPU_LDFLAGS@ +GPU_LIBS = @GPU_LIBS@ +GRAPHATOM_BIN = @GRAPHATOM_BIN@ +GREP = @GREP@ +H5CC = @H5CC@ +HDF5_CFLAGS = @HDF5_CFLAGS@ +HDF5_CPPFLAGS = @HDF5_CPPFLAGS@ +HDF5_CXXFLAGS = @HDF5_CXXFLAGS@ +HDF5_FCFLAGS = @HDF5_FCFLAGS@ +HDF5_LDFLAGS = @HDF5_LDFLAGS@ +HDF5_LIBS = @HDF5_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +LDFLAGS = @LDFLAGS@ +LEVMAR_CFLAGS = @LEVMAR_CFLAGS@ +LEVMAR_CPPFLAGS = @LEVMAR_CPPFLAGS@ +LEVMAR_LDFLAGS = @LEVMAR_LDFLAGS@ +LEVMAR_LIBS = @LEVMAR_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPAW_CPPFLAGS = @LIBPAW_CPPFLAGS@ +LIBPAW_FCFLAGS = @LIBPAW_FCFLAGS@ +LIBPAW_LDFLAGS = @LIBPAW_LDFLAGS@ +LIBPAW_LIBS = @LIBPAW_LIBS@ +LIBPSML_CPPFLAGS = @LIBPSML_CPPFLAGS@ +LIBPSML_FCFLAGS = @LIBPSML_FCFLAGS@ +LIBPSML_LDFLAGS = @LIBPSML_LDFLAGS@ +LIBPSML_LIBS = @LIBPSML_LIBS@ +LIBS = @LIBS@ +LIBXC_CFLAGS = @LIBXC_CFLAGS@ +LIBXC_CPPFLAGS = @LIBXC_CPPFLAGS@ +LIBXC_FCFLAGS = @LIBXC_FCFLAGS@ +LIBXC_LDFLAGS = @LIBXC_LDFLAGS@ +LIBXC_LIBS = @LIBXC_LIBS@ +LIBXML2_CPPFLAGS = @LIBXML2_CPPFLAGS@ +LIBXML2_FCFLAGS = @LIBXML2_FCFLAGS@ +LIBXML2_LIBS = @LIBXML2_LIBS@ +LINALG_CFLAGS = @LINALG_CFLAGS@ +LINALG_CPPFLAGS = @LINALG_CPPFLAGS@ +LINALG_CXXFLAGS = @LINALG_CXXFLAGS@ +LINALG_FCFLAGS = @LINALG_FCFLAGS@ +LINALG_LDFLAGS = @LINALG_LDFLAGS@ +LINALG_LIBS = @LINALG_LIBS@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODEXT = @MODEXT@ +MPI_CFLAGS = @MPI_CFLAGS@ +MPI_CPPFLAGS = @MPI_CPPFLAGS@ +MPI_CXXFLAGS = @MPI_CXXFLAGS@ +MPI_FCFLAGS = @MPI_FCFLAGS@ +MPI_LDFLAGS = @MPI_LDFLAGS@ +MPI_LIBS = @MPI_LIBS@ +MV = @MV@ +NETCDF_CFLAGS = @NETCDF_CFLAGS@ +NETCDF_CPPFLAGS = @NETCDF_CPPFLAGS@ +NETCDF_CXXFLAGS = @NETCDF_CXXFLAGS@ +NETCDF_FCFLAGS = @NETCDF_FCFLAGS@ +NETCDF_FORTRAN_CFLAGS = @NETCDF_FORTRAN_CFLAGS@ +NETCDF_FORTRAN_CPPFLAGS = @NETCDF_FORTRAN_CPPFLAGS@ +NETCDF_FORTRAN_CXXFLAGS = @NETCDF_FORTRAN_CXXFLAGS@ +NETCDF_FORTRAN_FCFLAGS = @NETCDF_FORTRAN_FCFLAGS@ +NETCDF_FORTRAN_LDFLAGS = @NETCDF_FORTRAN_LDFLAGS@ +NETCDF_FORTRAN_LIBS = @NETCDF_FORTRAN_LIBS@ +NETCDF_LDFLAGS = @NETCDF_LDFLAGS@ +NETCDF_LIBS = @NETCDF_LIBS@ +NVCC = @NVCC@ +NVCC_CFLAGS = @NVCC_CFLAGS@ +NVCC_CPPFLAGS = @NVCC_CPPFLAGS@ +NVCC_LDFLAGS = @NVCC_LDFLAGS@ +NVCC_LIBS = @NVCC_LIBS@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PAPI_CFLAGS = @PAPI_CFLAGS@ +PAPI_CPPFLAGS = @PAPI_CPPFLAGS@ +PAPI_LDFLAGS = @PAPI_LDFLAGS@ +PAPI_LIBS = @PAPI_LIBS@ +PATCH = @PATCH@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PFFT_CFLAGS = @PFFT_CFLAGS@ +PFFT_CPPFLAGS = @PFFT_CPPFLAGS@ +PFFT_LDFLAGS = @PFFT_LDFLAGS@ +PFFT_LIBS = @PFFT_LIBS@ +PYFLAGS = @PYFLAGS@ +PYTHON = @PYTHON@ +PYTHON_CONFIG = @PYTHON_CONFIG@ +PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ +RANLIB = @RANLIB@ +REALPATH = @REALPATH@ +RM = @RM@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +TAR = @TAR@ +TRIQS_CFLAGS = @TRIQS_CFLAGS@ +TRIQS_CPPFLAGS = @TRIQS_CPPFLAGS@ +TRIQS_CXXFLAGS = @TRIQS_CXXFLAGS@ +TRIQS_LDFLAGS = @TRIQS_LDFLAGS@ +TRIQS_LIBS = @TRIQS_LIBS@ +TRUE_CPP = @TRUE_CPP@ +VERSION = @VERSION@ +WANNIER90_CPPFLAGS = @WANNIER90_CPPFLAGS@ +WANNIER90_FCFLAGS = @WANNIER90_FCFLAGS@ +WANNIER90_LDFLAGS = @WANNIER90_LDFLAGS@ +WANNIER90_LIBS = @WANNIER90_LIBS@ +XML2_CONFIG = @XML2_CONFIG@ +XMLF90_CPPFLAGS = @XMLF90_CPPFLAGS@ +XMLF90_FCFLAGS = @XMLF90_FCFLAGS@ +XMLF90_LDFLAGS = @XMLF90_LDFLAGS@ +XMLF90_LIBS = @XMLF90_LIBS@ +XML_CPPFLAGS = @XML_CPPFLAGS@ +XML_LIBS = @XML_LIBS@ +XPP = @XPP@ +XPPFLAGS = @XPPFLAGS@ +XPPFLAGS_DEBUG = @XPPFLAGS_DEBUG@ +XPPFLAGS_EXTRA = @XPPFLAGS_EXTRA@ +XPPFLAGS_OPTIM = @XPPFLAGS_OPTIM@ +YAKL_CPPFLAGS = @YAKL_CPPFLAGS@ +YAKL_FCFLAGS = @YAKL_FCFLAGS@ +YAKL_LDFLAGS = @YAKL_LDFLAGS@ +YAKL_LIBS = @YAKL_LIBS@ +abi_ac_distcheck = @abi_ac_distcheck@ +abi_ac_version = @abi_ac_version@ +abi_am_version = @abi_am_version@ +abi_avx_safe_mode_enable = @abi_avx_safe_mode_enable@ +abi_bse_unpacked_enable = @abi_bse_unpacked_enable@ +abi_cc_path = @abi_cc_path@ +abi_cc_vendor = @abi_cc_vendor@ +abi_cc_version = @abi_cc_version@ +abi_cclock_enable = @abi_cclock_enable@ +abi_cpp_path = @abi_cpp_path@ +abi_cpu_64bits = @abi_cpu_64bits@ +abi_cpu_bits = @abi_cpu_bits@ +abi_cpu_model = @abi_cpu_model@ +abi_cpu_platform = @abi_cpu_platform@ +abi_cpu_spec = @abi_cpu_spec@ +abi_cpu_vendor = @abi_cpu_vendor@ +abi_crpa_optim_enable = @abi_crpa_optim_enable@ +abi_cxx_path = @abi_cxx_path@ +abi_cxx_vendor = @abi_cxx_vendor@ +abi_cxx_version = @abi_cxx_version@ +abi_debug_flavor = @abi_debug_flavor@ +abi_exports_enable = @abi_exports_enable@ +abi_fbk_abinit_common_ok = @abi_fbk_abinit_common_ok@ +abi_fbk_bigdft_ok = @abi_fbk_bigdft_ok@ +abi_fbk_config = @abi_fbk_config@ +abi_fbk_enable = @abi_fbk_enable@ +abi_fbk_fft_ok = @abi_fbk_fft_ok@ +abi_fbk_fftw3_ok = @abi_fbk_fftw3_ok@ +abi_fbk_gpu_ok = @abi_fbk_gpu_ok@ +abi_fbk_hdf5_ok = @abi_fbk_hdf5_ok@ +abi_fbk_init = @abi_fbk_init@ +abi_fbk_kokkos_ok = @abi_fbk_kokkos_ok@ +abi_fbk_levmar_ok = @abi_fbk_levmar_ok@ +abi_fbk_libpaw_ok = @abi_fbk_libpaw_ok@ +abi_fbk_libpsml_ok = @abi_fbk_libpsml_ok@ +abi_fbk_libxc_ok = @abi_fbk_libxc_ok@ +abi_fbk_libxml2_ok = @abi_fbk_libxml2_ok@ +abi_fbk_linalg_ok = @abi_fbk_linalg_ok@ +abi_fbk_list = @abi_fbk_list@ +abi_fbk_mpi_ok = @abi_fbk_mpi_ok@ +abi_fbk_netcdf_fortran_ok = @abi_fbk_netcdf_fortran_ok@ +abi_fbk_netcdf_ok = @abi_fbk_netcdf_ok@ +abi_fbk_papi_ok = @abi_fbk_papi_ok@ +abi_fbk_pfft_ok = @abi_fbk_pfft_ok@ +abi_fbk_prefix = @abi_fbk_prefix@ +abi_fbk_required = @abi_fbk_required@ +abi_fbk_triqs_ok = @abi_fbk_triqs_ok@ +abi_fbk_wannier90_ok = @abi_fbk_wannier90_ok@ +abi_fbk_xmlf90_ok = @abi_fbk_xmlf90_ok@ +abi_fbk_yakl_ok = @abi_fbk_yakl_ok@ +abi_fc_path = @abi_fc_path@ +abi_fc_vendor = @abi_fc_vendor@ +abi_fc_version = @abi_fc_version@ +abi_fc_wrap = @abi_fc_wrap@ +abi_fc_wrapper_enable = @abi_fc_wrapper_enable@ +abi_fpp_path = @abi_fpp_path@ +abi_gpu_arch = @abi_gpu_arch@ +abi_gpu_fcflags = @abi_gpu_fcflags@ +abi_gpu_flavor = @abi_gpu_flavor@ +abi_gpu_hip_libdir = @abi_gpu_hip_libdir@ +abi_gpu_incs = @abi_gpu_incs@ +abi_gpu_ldflags = @abi_gpu_ldflags@ +abi_gpu_libs = @abi_gpu_libs@ +abi_gpu_nvtx_v3 = @abi_gpu_nvtx_v3@ +abi_gpu_roctx = @abi_gpu_roctx@ +abi_gw_dpc_enable = @abi_gw_dpc_enable@ +abi_hints_enable = @abi_hints_enable@ +abi_libtetra_enable = @abi_libtetra_enable@ +abi_libxml2_cppflags = @abi_libxml2_cppflags@ +abi_libxml2_enable = @abi_libxml2_enable@ +abi_libxml2_fcflags = @abi_libxml2_fcflags@ +abi_libxml2_init = @abi_libxml2_init@ +abi_libxml2_ldflags = @abi_libxml2_ldflags@ +abi_libxml2_libs = @abi_libxml2_libs@ +abi_libxml2_ok = @abi_libxml2_ok@ +abi_libxml2_prefix = @abi_libxml2_prefix@ +abi_lotf_enable = @abi_lotf_enable@ +abi_lt_version = @abi_lt_version@ +abi_m4_version = @abi_m4_version@ +abi_memory_profiling_enable = @abi_memory_profiling_enable@ +abi_mpi_cflags = @abi_mpi_cflags@ +abi_mpi_cppflags = @abi_mpi_cppflags@ +abi_mpi_cxxflags = @abi_mpi_cxxflags@ +abi_mpi_enable = @abi_mpi_enable@ +abi_mpi_fcflags = @abi_mpi_fcflags@ +abi_mpi_flavor = @abi_mpi_flavor@ +abi_mpi_gpu_aware_enable = @abi_mpi_gpu_aware_enable@ +abi_mpi_incs = @abi_mpi_incs@ +abi_mpi_inplace_enable = @abi_mpi_inplace_enable@ +abi_mpi_interfaces_bugfix_enable = @abi_mpi_interfaces_bugfix_enable@ +abi_mpi_io_default_enable = @abi_mpi_io_default_enable@ +abi_mpi_io_enable = @abi_mpi_io_enable@ +abi_mpi_ldflags = @abi_mpi_ldflags@ +abi_mpi_level = @abi_mpi_level@ +abi_mpi_libs = @abi_mpi_libs@ +abi_netcdf_default_enable = @abi_netcdf_default_enable@ +abi_openmp_enable = @abi_openmp_enable@ +abi_openmp_offload_enable = @abi_openmp_offload_enable@ +abi_optim_flavor = @abi_optim_flavor@ +abi_python_invocation_enable = @abi_python_invocation_enable@ +abi_source_debug_enable = @abi_source_debug_enable@ +abi_stdin_enable = @abi_stdin_enable@ +abi_sys_spec = @abi_sys_spec@ +abi_timer_enable = @abi_timer_enable@ +abi_triqs_v1_4_enable = @abi_triqs_v1_4_enable@ +abi_triqs_v2_0_enable = @abi_triqs_v2_0_enable@ +abi_zdot_bugfix_enable = @abi_zdot_bugfix_enable@ +abinit_bindir = @abinit_bindir@ +abinit_builddir = @abinit_builddir@ +abinit_chkdir = @abinit_chkdir@ +abinit_datdir = @abinit_datdir@ +abinit_docdir = @abinit_docdir@ +abinit_incdir = @abinit_incdir@ +abinit_libdir = @abinit_libdir@ +abinit_mandir = @abinit_mandir@ +abinit_prefix = @abinit_prefix@ +abinit_srcdir = @abinit_srcdir@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_FC = @ac_ct_FC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cc_info_string = @cc_info_string@ +cxx_info_string = @cxx_info_string@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +enable_avx_safe_mode = @enable_avx_safe_mode@ +enable_bse_unpacked = @enable_bse_unpacked@ +enable_cclock = @enable_cclock@ +enable_crpa_optim = @enable_crpa_optim@ +enable_exports = @enable_exports@ +enable_fc_wrapper = @enable_fc_wrapper@ +enable_gw_dpc = @enable_gw_dpc@ +enable_hints = @enable_hints@ +enable_libtetra = @enable_libtetra@ +enable_lotf = @enable_lotf@ +enable_memory_profiling = @enable_memory_profiling@ +enable_mpi_gpu_aware = @enable_mpi_gpu_aware@ +enable_mpi_inplace = @enable_mpi_inplace@ +enable_mpi_interfaces_bugfix = @enable_mpi_interfaces_bugfix@ +enable_mpi_io = @enable_mpi_io@ +enable_mpi_io_default = @enable_mpi_io_default@ +enable_netcdf_default = @enable_netcdf_default@ +enable_openmp = @enable_openmp@ +enable_openmp_offload = @enable_openmp_offload@ +enable_python_invocation = @enable_python_invocation@ +enable_shared = @enable_shared@ +enable_source_debug = @enable_source_debug@ +enable_static = @enable_static@ +enable_stdin = @enable_stdin@ +enable_timer = @enable_timer@ +enable_triqs_v1_4 = @enable_triqs_v1_4@ +enable_triqs_v2_0 = @enable_triqs_v2_0@ +enable_zdot_bugfix = @enable_zdot_bugfix@ +exec_prefix = @exec_prefix@ +fc_info_string = @fc_info_string@ +fc_mod_fcflags = @fc_mod_fcflags@ +fc_timing = @fc_timing@ +fcflags_opt_02_clib = @fcflags_opt_02_clib@ +fcflags_opt_10_defs = @fcflags_opt_10_defs@ +fcflags_opt_11_memory_mpi = @fcflags_opt_11_memory_mpi@ +fcflags_opt_12_hide_mpi = @fcflags_opt_12_hide_mpi@ +fcflags_opt_14_hidewrite = @fcflags_opt_14_hidewrite@ +fcflags_opt_16_hideleave = @fcflags_opt_16_hideleave@ +fcflags_opt_16_kokkos_toolbox = @fcflags_opt_16_kokkos_toolbox@ +fcflags_opt_17_gpu_toolbox = @fcflags_opt_17_gpu_toolbox@ +fcflags_opt_17_libtetra_ext = @fcflags_opt_17_libtetra_ext@ +fcflags_opt_17_minimax = @fcflags_opt_17_minimax@ +fcflags_opt_17_yaml_out = @fcflags_opt_17_yaml_out@ +fcflags_opt_18_timing = @fcflags_opt_18_timing@ +fcflags_opt_21_hashfuncs = @fcflags_opt_21_hashfuncs@ +fcflags_opt_27_toolbox_oop = @fcflags_opt_27_toolbox_oop@ +fcflags_opt_28_numeric_noabirule = @fcflags_opt_28_numeric_noabirule@ +fcflags_opt_29_kpoints = @fcflags_opt_29_kpoints@ +fcflags_opt_32_util = @fcflags_opt_32_util@ +fcflags_opt_33_xc_lowlevel = @fcflags_opt_33_xc_lowlevel@ +fcflags_opt_39_libpaw = @fcflags_opt_39_libpaw@ +fcflags_opt_41_geometry = @fcflags_opt_41_geometry@ +fcflags_opt_42_nlstrain = @fcflags_opt_42_nlstrain@ +fcflags_opt_42_parser = @fcflags_opt_42_parser@ +fcflags_opt_43_ptgroups = @fcflags_opt_43_ptgroups@ +fcflags_opt_43_wvl_wrappers = @fcflags_opt_43_wvl_wrappers@ +fcflags_opt_44_abitools = @fcflags_opt_44_abitools@ +fcflags_opt_44_abitypes_defs = @fcflags_opt_44_abitypes_defs@ +fcflags_opt_44_manage_kokkos = @fcflags_opt_44_manage_kokkos@ +fcflags_opt_45_geomoptim = @fcflags_opt_45_geomoptim@ +fcflags_opt_45_xgTools = @fcflags_opt_45_xgTools@ +fcflags_opt_46_ghc_omp = @fcflags_opt_46_ghc_omp@ +fcflags_opt_46_manage_cuda = @fcflags_opt_46_manage_cuda@ +fcflags_opt_48_diago = @fcflags_opt_48_diago@ +fcflags_opt_49_gw_toolbox_oop = @fcflags_opt_49_gw_toolbox_oop@ +fcflags_opt_51_manage_mpi = @fcflags_opt_51_manage_mpi@ +fcflags_opt_52_fft_mpi_noabirule = @fcflags_opt_52_fft_mpi_noabirule@ +fcflags_opt_53_ffts = @fcflags_opt_53_ffts@ +fcflags_opt_54_spacepar = @fcflags_opt_54_spacepar@ +fcflags_opt_55_abiutil = @fcflags_opt_55_abiutil@ +fcflags_opt_56_io_mpi = @fcflags_opt_56_io_mpi@ +fcflags_opt_56_mixing = @fcflags_opt_56_mixing@ +fcflags_opt_56_recipspace = @fcflags_opt_56_recipspace@ +fcflags_opt_56_xc = @fcflags_opt_56_xc@ +fcflags_opt_57_iopsp_parser = @fcflags_opt_57_iopsp_parser@ +fcflags_opt_57_iovars = @fcflags_opt_57_iovars@ +fcflags_opt_61_occeig = @fcflags_opt_61_occeig@ +fcflags_opt_62_cg_noabirule = @fcflags_opt_62_cg_noabirule@ +fcflags_opt_62_ctqmc = @fcflags_opt_62_ctqmc@ +fcflags_opt_62_iowfdenpot = @fcflags_opt_62_iowfdenpot@ +fcflags_opt_62_poisson = @fcflags_opt_62_poisson@ +fcflags_opt_62_wvl_wfs = @fcflags_opt_62_wvl_wfs@ +fcflags_opt_64_psp = @fcflags_opt_64_psp@ +fcflags_opt_65_lotf_base = @fcflags_opt_65_lotf_base@ +fcflags_opt_65_paw = @fcflags_opt_65_paw@ +fcflags_opt_66_nonlocal = @fcflags_opt_66_nonlocal@ +fcflags_opt_66_vdwxc = @fcflags_opt_66_vdwxc@ +fcflags_opt_66_wfs = @fcflags_opt_66_wfs@ +fcflags_opt_67_common = @fcflags_opt_67_common@ +fcflags_opt_67_python_invocation_ext = @fcflags_opt_67_python_invocation_ext@ +fcflags_opt_67_triqs_ext = @fcflags_opt_67_triqs_ext@ +fcflags_opt_68_dmft = @fcflags_opt_68_dmft@ +fcflags_opt_68_lotf = @fcflags_opt_68_lotf@ +fcflags_opt_68_recursion = @fcflags_opt_68_recursion@ +fcflags_opt_68_rsprc = @fcflags_opt_68_rsprc@ +fcflags_opt_69_wfdesc = @fcflags_opt_69_wfdesc@ +fcflags_opt_70_gw = @fcflags_opt_70_gw@ +fcflags_opt_71_bse = @fcflags_opt_71_bse@ +fcflags_opt_71_wannier = @fcflags_opt_71_wannier@ +fcflags_opt_72_response = @fcflags_opt_72_response@ +fcflags_opt_77_ddb = @fcflags_opt_77_ddb@ +fcflags_opt_77_suscep = @fcflags_opt_77_suscep@ +fcflags_opt_78_effpot = @fcflags_opt_78_effpot@ +fcflags_opt_78_eph = @fcflags_opt_78_eph@ +fcflags_opt_79_seqpar_mpi = @fcflags_opt_79_seqpar_mpi@ +fcflags_opt_80_rttddft = @fcflags_opt_80_rttddft@ +fcflags_opt_80_tdep = @fcflags_opt_80_tdep@ +fcflags_opt_94_scfcv = @fcflags_opt_94_scfcv@ +fcflags_opt_95_drive = @fcflags_opt_95_drive@ +fcflags_opt_98_main = @fcflags_opt_98_main@ +fcflags_opt_bigdft = @fcflags_opt_bigdft@ +fcflags_opt_default = @fcflags_opt_default@ +fcflags_opt_hdf5 = @fcflags_opt_hdf5@ +fcflags_opt_levmar = @fcflags_opt_levmar@ +fcflags_opt_libpsml = @fcflags_opt_libpsml@ +fcflags_opt_libxc = @fcflags_opt_libxc@ +fcflags_opt_libxml2 = @fcflags_opt_libxml2@ +fcflags_opt_linalg = @fcflags_opt_linalg@ +fcflags_opt_netcdf = @fcflags_opt_netcdf@ +fcflags_opt_netcdf_fortran = @fcflags_opt_netcdf_fortran@ +fcflags_opt_papi = @fcflags_opt_papi@ +fcflags_opt_triqs = @fcflags_opt_triqs@ +fcflags_opt_wannier90 = @fcflags_opt_wannier90@ +fcflags_opt_xmlf90 = @fcflags_opt_xmlf90@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sd_abinit_common_cppflags = @sd_abinit_common_cppflags@ +sd_abinit_common_enable = @sd_abinit_common_enable@ +sd_abinit_common_enable_def = @sd_abinit_common_enable_def@ +sd_abinit_common_fcflags = @sd_abinit_common_fcflags@ +sd_abinit_common_init = @sd_abinit_common_init@ +sd_abinit_common_ldflags = @sd_abinit_common_ldflags@ +sd_abinit_common_libs = @sd_abinit_common_libs@ +sd_abinit_common_ok = @sd_abinit_common_ok@ +sd_abinit_common_options = @sd_abinit_common_options@ +sd_abinit_common_policy = @sd_abinit_common_policy@ +sd_abinit_common_status = @sd_abinit_common_status@ +sd_bigdft_cppflags = @sd_bigdft_cppflags@ +sd_bigdft_enable = @sd_bigdft_enable@ +sd_bigdft_enable_def = @sd_bigdft_enable_def@ +sd_bigdft_fcflags = @sd_bigdft_fcflags@ +sd_bigdft_init = @sd_bigdft_init@ +sd_bigdft_ldflags = @sd_bigdft_ldflags@ +sd_bigdft_libs = @sd_bigdft_libs@ +sd_bigdft_ok = @sd_bigdft_ok@ +sd_bigdft_options = @sd_bigdft_options@ +sd_bigdft_policy = @sd_bigdft_policy@ +sd_bigdft_status = @sd_bigdft_status@ +sd_fft_cflags = @sd_fft_cflags@ +sd_fft_choices = @sd_fft_choices@ +sd_fft_cppflags = @sd_fft_cppflags@ +sd_fft_cxxflags = @sd_fft_cxxflags@ +sd_fft_enable = @sd_fft_enable@ +sd_fft_fcflags = @sd_fft_fcflags@ +sd_fft_flavor = @sd_fft_flavor@ +sd_fft_init = @sd_fft_init@ +sd_fft_ldflags = @sd_fft_ldflags@ +sd_fft_libs = @sd_fft_libs@ +sd_fft_ok = @sd_fft_ok@ +sd_fftw3_cflags = @sd_fftw3_cflags@ +sd_fftw3_cppflags = @sd_fftw3_cppflags@ +sd_fftw3_enable = @sd_fftw3_enable@ +sd_fftw3_enable_def = @sd_fftw3_enable_def@ +sd_fftw3_fcflags = @sd_fftw3_fcflags@ +sd_fftw3_init = @sd_fftw3_init@ +sd_fftw3_ldflags = @sd_fftw3_ldflags@ +sd_fftw3_libs = @sd_fftw3_libs@ +sd_fftw3_ok = @sd_fftw3_ok@ +sd_fftw3_options = @sd_fftw3_options@ +sd_fftw3_policy = @sd_fftw3_policy@ +sd_fftw3_status = @sd_fftw3_status@ +sd_gpu_cflags = @sd_gpu_cflags@ +sd_gpu_cppflags = @sd_gpu_cppflags@ +sd_gpu_cxxflags = @sd_gpu_cxxflags@ +sd_gpu_enable = @sd_gpu_enable@ +sd_gpu_enable_def = @sd_gpu_enable_def@ +sd_gpu_fcflags = @sd_gpu_fcflags@ +sd_gpu_init = @sd_gpu_init@ +sd_gpu_ldflags = @sd_gpu_ldflags@ +sd_gpu_libs = @sd_gpu_libs@ +sd_gpu_ok = @sd_gpu_ok@ +sd_gpu_options = @sd_gpu_options@ +sd_gpu_policy = @sd_gpu_policy@ +sd_gpu_prefix = @sd_gpu_prefix@ +sd_gpu_status = @sd_gpu_status@ +sd_hdf5_cflags = @sd_hdf5_cflags@ +sd_hdf5_cppflags = @sd_hdf5_cppflags@ +sd_hdf5_cxxflags = @sd_hdf5_cxxflags@ +sd_hdf5_enable = @sd_hdf5_enable@ +sd_hdf5_enable_def = @sd_hdf5_enable_def@ +sd_hdf5_enable_fc = @sd_hdf5_enable_fc@ +sd_hdf5_fcflags = @sd_hdf5_fcflags@ +sd_hdf5_h5cc = @sd_hdf5_h5cc@ +sd_hdf5_h5fc = @sd_hdf5_h5fc@ +sd_hdf5_init = @sd_hdf5_init@ +sd_hdf5_ldflags = @sd_hdf5_ldflags@ +sd_hdf5_libs = @sd_hdf5_libs@ +sd_hdf5_ok = @sd_hdf5_ok@ +sd_hdf5_options = @sd_hdf5_options@ +sd_hdf5_policy = @sd_hdf5_policy@ +sd_hdf5_status = @sd_hdf5_status@ +sd_kokkos_cppflags = @sd_kokkos_cppflags@ +sd_kokkos_cxxflags = @sd_kokkos_cxxflags@ +sd_kokkos_enable = @sd_kokkos_enable@ +sd_kokkos_enable_def = @sd_kokkos_enable_def@ +sd_kokkos_init = @sd_kokkos_init@ +sd_kokkos_ldflags = @sd_kokkos_ldflags@ +sd_kokkos_libs = @sd_kokkos_libs@ +sd_kokkos_ok = @sd_kokkos_ok@ +sd_kokkos_options = @sd_kokkos_options@ +sd_kokkos_policy = @sd_kokkos_policy@ +sd_kokkos_status = @sd_kokkos_status@ +sd_levmar_cflags = @sd_levmar_cflags@ +sd_levmar_cppflags = @sd_levmar_cppflags@ +sd_levmar_enable = @sd_levmar_enable@ +sd_levmar_enable_def = @sd_levmar_enable_def@ +sd_levmar_init = @sd_levmar_init@ +sd_levmar_ldflags = @sd_levmar_ldflags@ +sd_levmar_libs = @sd_levmar_libs@ +sd_levmar_ok = @sd_levmar_ok@ +sd_levmar_options = @sd_levmar_options@ +sd_levmar_policy = @sd_levmar_policy@ +sd_levmar_status = @sd_levmar_status@ +sd_libpaw_cppflags = @sd_libpaw_cppflags@ +sd_libpaw_enable = @sd_libpaw_enable@ +sd_libpaw_enable_def = @sd_libpaw_enable_def@ +sd_libpaw_fcflags = @sd_libpaw_fcflags@ +sd_libpaw_init = @sd_libpaw_init@ +sd_libpaw_ldflags = @sd_libpaw_ldflags@ +sd_libpaw_libs = @sd_libpaw_libs@ +sd_libpaw_ok = @sd_libpaw_ok@ +sd_libpaw_options = @sd_libpaw_options@ +sd_libpaw_policy = @sd_libpaw_policy@ +sd_libpaw_status = @sd_libpaw_status@ +sd_libpsml_cppflags = @sd_libpsml_cppflags@ +sd_libpsml_enable = @sd_libpsml_enable@ +sd_libpsml_enable_def = @sd_libpsml_enable_def@ +sd_libpsml_fcflags = @sd_libpsml_fcflags@ +sd_libpsml_init = @sd_libpsml_init@ +sd_libpsml_ldflags = @sd_libpsml_ldflags@ +sd_libpsml_libs = @sd_libpsml_libs@ +sd_libpsml_ok = @sd_libpsml_ok@ +sd_libpsml_options = @sd_libpsml_options@ +sd_libpsml_policy = @sd_libpsml_policy@ +sd_libpsml_status = @sd_libpsml_status@ +sd_libxc_cflags = @sd_libxc_cflags@ +sd_libxc_cppflags = @sd_libxc_cppflags@ +sd_libxc_enable = @sd_libxc_enable@ +sd_libxc_enable_def = @sd_libxc_enable_def@ +sd_libxc_enable_fc = @sd_libxc_enable_fc@ +sd_libxc_fcflags = @sd_libxc_fcflags@ +sd_libxc_init = @sd_libxc_init@ +sd_libxc_ldflags = @sd_libxc_ldflags@ +sd_libxc_libs = @sd_libxc_libs@ +sd_libxc_ok = @sd_libxc_ok@ +sd_libxc_options = @sd_libxc_options@ +sd_libxc_policy = @sd_libxc_policy@ +sd_libxc_status = @sd_libxc_status@ +sd_linalg_cflags = @sd_linalg_cflags@ +sd_linalg_choices = @sd_linalg_choices@ +sd_linalg_cppflags = @sd_linalg_cppflags@ +sd_linalg_cxxflags = @sd_linalg_cxxflags@ +sd_linalg_enable = @sd_linalg_enable@ +sd_linalg_fcflags = @sd_linalg_fcflags@ +sd_linalg_flavor = @sd_linalg_flavor@ +sd_linalg_has_elpa = @sd_linalg_has_elpa@ +sd_linalg_has_scalapack = @sd_linalg_has_scalapack@ +sd_linalg_init = @sd_linalg_init@ +sd_linalg_ldflags = @sd_linalg_ldflags@ +sd_linalg_libs = @sd_linalg_libs@ +sd_linalg_ok = @sd_linalg_ok@ +sd_mpi_cc = @sd_mpi_cc@ +sd_mpi_cflags = @sd_mpi_cflags@ +sd_mpi_cppflags = @sd_mpi_cppflags@ +sd_mpi_cxx = @sd_mpi_cxx@ +sd_mpi_enable = @sd_mpi_enable@ +sd_mpi_enable_cxx = @sd_mpi_enable_cxx@ +sd_mpi_enable_def = @sd_mpi_enable_def@ +sd_mpi_enable_fc = @sd_mpi_enable_fc@ +sd_mpi_fc = @sd_mpi_fc@ +sd_mpi_fcflags = @sd_mpi_fcflags@ +sd_mpi_init = @sd_mpi_init@ +sd_mpi_ldflags = @sd_mpi_ldflags@ +sd_mpi_libs = @sd_mpi_libs@ +sd_mpi_ok = @sd_mpi_ok@ +sd_mpi_options = @sd_mpi_options@ +sd_mpi_policy = @sd_mpi_policy@ +sd_mpi_status = @sd_mpi_status@ +sd_netcdf_cflags = @sd_netcdf_cflags@ +sd_netcdf_cppflags = @sd_netcdf_cppflags@ +sd_netcdf_enable = @sd_netcdf_enable@ +sd_netcdf_enable_def = @sd_netcdf_enable_def@ +sd_netcdf_fcflags = @sd_netcdf_fcflags@ +sd_netcdf_fortran_cflags = @sd_netcdf_fortran_cflags@ +sd_netcdf_fortran_cppflags = @sd_netcdf_fortran_cppflags@ +sd_netcdf_fortran_enable = @sd_netcdf_fortran_enable@ +sd_netcdf_fortran_enable_def = @sd_netcdf_fortran_enable_def@ +sd_netcdf_fortran_fcflags = @sd_netcdf_fortran_fcflags@ +sd_netcdf_fortran_init = @sd_netcdf_fortran_init@ +sd_netcdf_fortran_ldflags = @sd_netcdf_fortran_ldflags@ +sd_netcdf_fortran_libs = @sd_netcdf_fortran_libs@ +sd_netcdf_fortran_ok = @sd_netcdf_fortran_ok@ +sd_netcdf_fortran_options = @sd_netcdf_fortran_options@ +sd_netcdf_fortran_policy = @sd_netcdf_fortran_policy@ +sd_netcdf_fortran_status = @sd_netcdf_fortran_status@ +sd_netcdf_init = @sd_netcdf_init@ +sd_netcdf_ldflags = @sd_netcdf_ldflags@ +sd_netcdf_libs = @sd_netcdf_libs@ +sd_netcdf_ok = @sd_netcdf_ok@ +sd_netcdf_options = @sd_netcdf_options@ +sd_netcdf_policy = @sd_netcdf_policy@ +sd_netcdf_status = @sd_netcdf_status@ +sd_papi_cflags = @sd_papi_cflags@ +sd_papi_cppflags = @sd_papi_cppflags@ +sd_papi_enable = @sd_papi_enable@ +sd_papi_enable_def = @sd_papi_enable_def@ +sd_papi_init = @sd_papi_init@ +sd_papi_ldflags = @sd_papi_ldflags@ +sd_papi_libs = @sd_papi_libs@ +sd_papi_ok = @sd_papi_ok@ +sd_papi_options = @sd_papi_options@ +sd_papi_policy = @sd_papi_policy@ +sd_papi_sd_papi_fcflags = @sd_papi_sd_papi_fcflags@ +sd_papi_status = @sd_papi_status@ +sd_pfft_cflags = @sd_pfft_cflags@ +sd_pfft_cppflags = @sd_pfft_cppflags@ +sd_pfft_enable = @sd_pfft_enable@ +sd_pfft_enable_def = @sd_pfft_enable_def@ +sd_pfft_init = @sd_pfft_init@ +sd_pfft_ldflags = @sd_pfft_ldflags@ +sd_pfft_libs = @sd_pfft_libs@ +sd_pfft_ok = @sd_pfft_ok@ +sd_pfft_options = @sd_pfft_options@ +sd_pfft_policy = @sd_pfft_policy@ +sd_pfft_status = @sd_pfft_status@ +sd_sys_fcflags = @sd_sys_fcflags@ +sd_triqs_cflags = @sd_triqs_cflags@ +sd_triqs_cppflags = @sd_triqs_cppflags@ +sd_triqs_cxxflags = @sd_triqs_cxxflags@ +sd_triqs_enable = @sd_triqs_enable@ +sd_triqs_enable_def = @sd_triqs_enable_def@ +sd_triqs_fcflags = @sd_triqs_fcflags@ +sd_triqs_init = @sd_triqs_init@ +sd_triqs_ldflags = @sd_triqs_ldflags@ +sd_triqs_libs = @sd_triqs_libs@ +sd_triqs_ok = @sd_triqs_ok@ +sd_triqs_options = @sd_triqs_options@ +sd_triqs_policy = @sd_triqs_policy@ +sd_triqs_status = @sd_triqs_status@ +sd_wannier90_cppflags = @sd_wannier90_cppflags@ +sd_wannier90_enable = @sd_wannier90_enable@ +sd_wannier90_enable_def = @sd_wannier90_enable_def@ +sd_wannier90_fcflags = @sd_wannier90_fcflags@ +sd_wannier90_init = @sd_wannier90_init@ +sd_wannier90_ldflags = @sd_wannier90_ldflags@ +sd_wannier90_libs = @sd_wannier90_libs@ +sd_wannier90_ok = @sd_wannier90_ok@ +sd_wannier90_options = @sd_wannier90_options@ +sd_wannier90_policy = @sd_wannier90_policy@ +sd_wannier90_status = @sd_wannier90_status@ +sd_xmlf90_cppflags = @sd_xmlf90_cppflags@ +sd_xmlf90_enable = @sd_xmlf90_enable@ +sd_xmlf90_enable_def = @sd_xmlf90_enable_def@ +sd_xmlf90_fcflags = @sd_xmlf90_fcflags@ +sd_xmlf90_init = @sd_xmlf90_init@ +sd_xmlf90_ldflags = @sd_xmlf90_ldflags@ +sd_xmlf90_libs = @sd_xmlf90_libs@ +sd_xmlf90_ok = @sd_xmlf90_ok@ +sd_xmlf90_options = @sd_xmlf90_options@ +sd_xmlf90_policy = @sd_xmlf90_policy@ +sd_xmlf90_status = @sd_xmlf90_status@ +sd_yakl_cppflags = @sd_yakl_cppflags@ +sd_yakl_enable = @sd_yakl_enable@ +sd_yakl_enable_def = @sd_yakl_enable_def@ +sd_yakl_fcflags = @sd_yakl_fcflags@ +sd_yakl_init = @sd_yakl_init@ +sd_yakl_ldflags = @sd_yakl_ldflags@ +sd_yakl_libs = @sd_yakl_libs@ +sd_yakl_ok = @sd_yakl_ok@ +sd_yakl_options = @sd_yakl_options@ +sd_yakl_policy = @sd_yakl_policy@ +sd_yakl_status = @sd_yakl_status@ +sharedstatedir = @sharedstatedir@ +src_02_clib_fcflags = @src_02_clib_fcflags@ +src_10_defs_fcflags = @src_10_defs_fcflags@ +src_11_memory_mpi_fcflags = @src_11_memory_mpi_fcflags@ +src_12_hide_mpi_fcflags = @src_12_hide_mpi_fcflags@ +src_14_hidewrite_fcflags = @src_14_hidewrite_fcflags@ +src_16_hideleave_fcflags = @src_16_hideleave_fcflags@ +src_16_kokkos_toolbox_fcflags = @src_16_kokkos_toolbox_fcflags@ +src_17_gpu_toolbox_fcflags = @src_17_gpu_toolbox_fcflags@ +src_17_libtetra_ext_fcflags = @src_17_libtetra_ext_fcflags@ +src_17_minimax_fcflags = @src_17_minimax_fcflags@ +src_17_yaml_out_fcflags = @src_17_yaml_out_fcflags@ +src_18_timing_fcflags = @src_18_timing_fcflags@ +src_21_hashfuncs_fcflags = @src_21_hashfuncs_fcflags@ +src_27_toolbox_oop_fcflags = @src_27_toolbox_oop_fcflags@ +src_28_numeric_noabirule_fcflags = @src_28_numeric_noabirule_fcflags@ +src_29_kpoints_fcflags = @src_29_kpoints_fcflags@ +src_32_util_fcflags = @src_32_util_fcflags@ +src_33_xc_lowlevel_fcflags = @src_33_xc_lowlevel_fcflags@ +src_39_libpaw_fcflags = @src_39_libpaw_fcflags@ +src_41_geometry_fcflags = @src_41_geometry_fcflags@ +src_42_nlstrain_fcflags = @src_42_nlstrain_fcflags@ +src_42_parser_fcflags = @src_42_parser_fcflags@ +src_43_ptgroups_fcflags = @src_43_ptgroups_fcflags@ +src_43_wvl_wrappers_fcflags = @src_43_wvl_wrappers_fcflags@ +src_44_abitools_fcflags = @src_44_abitools_fcflags@ +src_44_abitypes_defs_fcflags = @src_44_abitypes_defs_fcflags@ +src_44_manage_kokkos_fcflags = @src_44_manage_kokkos_fcflags@ +src_45_geomoptim_fcflags = @src_45_geomoptim_fcflags@ +src_45_xgTools_fcflags = @src_45_xgTools_fcflags@ +src_46_ghc_omp_fcflags = @src_46_ghc_omp_fcflags@ +src_46_manage_cuda_fcflags = @src_46_manage_cuda_fcflags@ +src_48_diago_fcflags = @src_48_diago_fcflags@ +src_49_gw_toolbox_oop_fcflags = @src_49_gw_toolbox_oop_fcflags@ +src_51_manage_mpi_fcflags = @src_51_manage_mpi_fcflags@ +src_52_fft_mpi_noabirule_fcflags = @src_52_fft_mpi_noabirule_fcflags@ +src_53_ffts_fcflags = @src_53_ffts_fcflags@ +src_54_spacepar_fcflags = @src_54_spacepar_fcflags@ +src_55_abiutil_fcflags = @src_55_abiutil_fcflags@ +src_56_io_mpi_fcflags = @src_56_io_mpi_fcflags@ +src_56_mixing_fcflags = @src_56_mixing_fcflags@ +src_56_recipspace_fcflags = @src_56_recipspace_fcflags@ +src_56_xc_fcflags = @src_56_xc_fcflags@ +src_57_iopsp_parser_fcflags = @src_57_iopsp_parser_fcflags@ +src_57_iovars_fcflags = @src_57_iovars_fcflags@ +src_61_occeig_fcflags = @src_61_occeig_fcflags@ +src_62_cg_noabirule_fcflags = @src_62_cg_noabirule_fcflags@ +src_62_ctqmc_fcflags = @src_62_ctqmc_fcflags@ +src_62_iowfdenpot_fcflags = @src_62_iowfdenpot_fcflags@ +src_62_poisson_fcflags = @src_62_poisson_fcflags@ +src_62_wvl_wfs_fcflags = @src_62_wvl_wfs_fcflags@ +src_64_psp_fcflags = @src_64_psp_fcflags@ +src_65_lotf_base_fcflags = @src_65_lotf_base_fcflags@ +src_65_paw_fcflags = @src_65_paw_fcflags@ +src_66_nonlocal_fcflags = @src_66_nonlocal_fcflags@ +src_66_vdwxc_fcflags = @src_66_vdwxc_fcflags@ +src_66_wfs_fcflags = @src_66_wfs_fcflags@ +src_67_common_fcflags = @src_67_common_fcflags@ +src_67_python_invocation_ext_fcflags = @src_67_python_invocation_ext_fcflags@ +src_67_triqs_ext_fcflags = @src_67_triqs_ext_fcflags@ +src_68_dmft_fcflags = @src_68_dmft_fcflags@ +src_68_lotf_fcflags = @src_68_lotf_fcflags@ +src_68_recursion_fcflags = @src_68_recursion_fcflags@ +src_68_rsprc_fcflags = @src_68_rsprc_fcflags@ +src_69_wfdesc_fcflags = @src_69_wfdesc_fcflags@ +src_70_gw_fcflags = @src_70_gw_fcflags@ +src_71_bse_fcflags = @src_71_bse_fcflags@ +src_71_wannier_fcflags = @src_71_wannier_fcflags@ +src_72_response_fcflags = @src_72_response_fcflags@ +src_77_ddb_fcflags = @src_77_ddb_fcflags@ +src_77_suscep_fcflags = @src_77_suscep_fcflags@ +src_78_effpot_fcflags = @src_78_effpot_fcflags@ +src_78_eph_fcflags = @src_78_eph_fcflags@ +src_79_seqpar_mpi_fcflags = @src_79_seqpar_mpi_fcflags@ +src_80_rttddft_fcflags = @src_80_rttddft_fcflags@ +src_80_tdep_fcflags = @src_80_tdep_fcflags@ +src_94_scfcv_fcflags = @src_94_scfcv_fcflags@ +src_95_drive_fcflags = @src_95_drive_fcflags@ +src_common_fcflags = @src_common_fcflags@ +src_core_fcflags = @src_core_fcflags@ +src_libpaw_fcflags = @src_libpaw_fcflags@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +with_abinit_common = @with_abinit_common@ +with_bigdft = @with_bigdft@ +with_config_file = @with_config_file@ +with_debug_flavor = @with_debug_flavor@ +with_fallbacks = @with_fallbacks@ +with_fc_vendor = @with_fc_vendor@ +with_fc_version = @with_fc_version@ +with_fft_flavor = @with_fft_flavor@ +with_fftw3 = @with_fftw3@ +with_gnu_ld = @with_gnu_ld@ +with_gpu = @with_gpu@ +with_hdf5 = @with_hdf5@ +with_kokkos = @with_kokkos@ +with_levmar = @with_levmar@ +with_libpaw = @with_libpaw@ +with_libpsml = @with_libpsml@ +with_libxc = @with_libxc@ +with_libxml2 = @with_libxml2@ +with_linalg_flavor = @with_linalg_flavor@ +with_mpi = @with_mpi@ +with_mpi_level = @with_mpi_level@ +with_netcdf = @with_netcdf@ +with_optim_flavor = @with_optim_flavor@ +with_papi = @with_papi@ +with_pfft = @with_pfft@ +with_triqs = @with_triqs@ +with_wannier90 = @with_wannier90@ +with_xmlf90 = @with_xmlf90@ +with_yakl = @with_yakl@ +AM_CFLAGS = @ABI_CPPFLAGS@ +AM_CXXFLAGS = $(sd_triqs_cxxflags) +AM_FCFLAGS = @FPPFLAGS@ @FCFLAGS_FREEFORM@ @FCFLAGS_MODDIR@ @sd_sys_fcflags@ @fcflags_opt_29_kpoints@ +AM_CPPFLAGS = \ + @src_10_defs_fcflags@ \ + @src_12_hide_mpi_fcflags@ \ + @src_14_hidewrite_fcflags@ \ + @src_16_hideleave_fcflags@ \ + @src_17_libtetra_ext_fcflags@ \ + @src_18_timing_fcflags@ \ + @src_28_numeric_noabirule_fcflags@ \ + @src_common_fcflags@ \ + @src_core_fcflags@ \ + @src_libpaw_fcflags@ \ + @fc_mod_fcflags@ + + +# Regular source files +lib29_kpoints_srcs = \ + m_hashtable.F90 \ + m_htetra.F90 \ + m_octree.F90 \ + m_symkpt.F90 + + +# Source files depending on conditionals + +# Library description +noinst_LIBRARIES = lib29_kpoints.a +lib29_kpoints_a_SOURCES = $(lib29_kpoints_srcs) + +# Dependencies (inside the directory) of directory 29_kpoints +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. +CLEANFILES = m_hashtable_cpp.f90 m_htetra_cpp.f90 m_octree_cpp.f90 \ + m_symkpt_cpp.f90 m_hashtable.$(MODEXT) m_htetra.$(MODEXT) \ + m_octree.$(MODEXT) m_symkpt.$(MODEXT) +EXTRA_DIST = abinit.src abinit.dep _29_kpoints_ +all: all-am + +.SUFFIXES: +.SUFFIXES: .F90 .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu shared/common/src/29_kpoints/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu shared/common/src/29_kpoints/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) + +lib29_kpoints.a: $(lib29_kpoints_a_OBJECTS) $(lib29_kpoints_a_DEPENDENCIES) $(EXTRA_lib29_kpoints_a_DEPENDENCIES) + $(AM_V_at)-rm -f lib29_kpoints.a + $(AM_V_AR)$(lib29_kpoints_a_AR) lib29_kpoints.a $(lib29_kpoints_a_OBJECTS) $(lib29_kpoints_a_LIBADD) + $(AM_V_at)$(RANLIB) lib29_kpoints.a + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +.F90.o: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ $< + +.F90.obj: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-noinstLIBRARIES cscopelist-am ctags ctags-am distclean \ + distclean-compile distclean-generic distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am + +.PRECIOUS: Makefile + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/GX-PAW/common/src/29_kpoints/_29_kpoints_ b/GX-PAW/common/src/29_kpoints/_29_kpoints_ new file mode 100644 index 00000000..a78cd193 --- /dev/null +++ b/GX-PAW/common/src/29_kpoints/_29_kpoints_ @@ -0,0 +1,20 @@ +!!****d* ABINIT/28_kpoints +!! NAME +!! 29_kpoints +!! +!! DESCRIPTION +!! This directory contains routines that are related to the +!! treatment of k-points. +!! +!! COPYRIGHT +!! Copyright (C) 1998-2024 ABINIT group (TD) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! For the initials of contributors, see ~abinit/doc/developers/contributors.txt . +!! +!! CHILDREN +!! interfaces_29_kpoints.F90 +!! m_symkpt.F90 +!! +!!*** diff --git a/GX-PAW/common/src/29_kpoints/__pycache__/abinit.cpython-36.pyc b/GX-PAW/common/src/29_kpoints/__pycache__/abinit.cpython-36.pyc new file mode 100644 index 00000000..61996637 Binary files /dev/null and b/GX-PAW/common/src/29_kpoints/__pycache__/abinit.cpython-36.pyc differ diff --git a/GX-PAW/common/src/29_kpoints/abinit.dep b/GX-PAW/common/src/29_kpoints/abinit.dep new file mode 100644 index 00000000..1391f9a7 --- /dev/null +++ b/GX-PAW/common/src/29_kpoints/abinit.dep @@ -0,0 +1,12 @@ +# Dependencies (inside the directory) of directory 29_kpoints +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. + +CLEANFILES += \ + m_hashtable.$(MODEXT) \ + m_htetra.$(MODEXT) \ + m_octree.$(MODEXT) \ + m_symkpt.$(MODEXT) + diff --git a/GX-PAW/common/src/29_kpoints/abinit.dir b/GX-PAW/common/src/29_kpoints/abinit.dir new file mode 100644 index 00000000..7f58d4b7 --- /dev/null +++ b/GX-PAW/common/src/29_kpoints/abinit.dir @@ -0,0 +1,14 @@ +# Dependencies (outside the directory) of directory 29_kpoints +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. + +include_dirs = \ +['10_defs', + '12_hide_mpi', + '14_hidewrite', + '16_hideleave', + '17_libtetra_ext', + '18_timing', + '28_numeric_noabirule'] \ No newline at end of file diff --git a/GX-PAW/common/src/29_kpoints/abinit.src b/GX-PAW/common/src/29_kpoints/abinit.src new file mode 100644 index 00000000..b8d1a056 --- /dev/null +++ b/GX-PAW/common/src/29_kpoints/abinit.src @@ -0,0 +1,27 @@ +# -*- Python -*- +# +# Copyright (C) 2005-2024 ABINIT Group (Yann Pouillon) +# +# This file is part of the ABINIT software package. For license information, +# please see the COPYING file in the top-level directory of the ABINIT source +# distribution. +# + +# +# Source files making up the 2geometry library +# + +# Source file attributes +ABI_SRC_NIL = 0 # No attribute +ABI_SRC_BLT = 1 # The file is built by a script +ABI_SRC_DEP = 2 # The file depends on other files + +# Source files +sources = [ + "m_hashtable.F90", + "m_htetra.F90", + "m_octree.F90", + "m_symkpt.F90", +] +# IMPORTANT : please use the alphabetic order in the previous list. Do NOT add the new routine names at the end of the list. +# This is important to avoid numerous conflicts at merge time. Thank you very much. Xavier. diff --git a/GX-PAW/common/src/29_kpoints/lib29_kpoints.a b/GX-PAW/common/src/29_kpoints/lib29_kpoints.a new file mode 100644 index 00000000..276e34bf Binary files /dev/null and b/GX-PAW/common/src/29_kpoints/lib29_kpoints.a differ diff --git a/GX-PAW/common/src/29_kpoints/m_hashtable.F90 b/GX-PAW/common/src/29_kpoints/m_hashtable.F90 new file mode 100644 index 00000000..93843913 --- /dev/null +++ b/GX-PAW/common/src/29_kpoints/m_hashtable.F90 @@ -0,0 +1,180 @@ +!!****m* ABINIT/m_hashtable +!! NAME +!! m_hashtable +!! +!! FUNCTION +!! A dictionary like structure for integers +!! +!! COPYRIGHT +!! Copyright (C) 2010-2024 ABINIT group (HM) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" + +module m_hashtable + + use defs_basis + use m_abicore + implicit none + + type :: hashbucket + integer :: nitems + integer,allocatable :: items(:,:) + end type hashbucket + + type :: hashtable_t + integer :: bucketsize + integer :: bucketstep + integer :: nbuckets + type(hashbucket),allocatable :: buckets(:) + end type hashtable_t + + public :: hashtable_init + public :: hashtable_add + public :: hashtable_get + public :: hashtable_cleanup + public :: hashtable_items + public :: hashtable_free + + contains + type(hashtable_t) function hashtable_init(nbuckets,bucketsize,bucketstep) result(new) + ! Create the hashtable structure + integer,intent(in) :: bucketsize, bucketstep, nbuckets + integer :: ibucket + + new%nbuckets = nbuckets + new%bucketsize = bucketsize + new%bucketstep = bucketstep + ABI_MALLOC(new%buckets,(nbuckets)) + do ibucket=1,nbuckets + ABI_MALLOC(new%buckets(ibucket)%items,(2,new%bucketsize)) + new%buckets(ibucket)%nitems = 0 + end do + end function hashtable_init + + pure function compute_hash(self,key) result(ihash) + type(hashtable_t),intent(in) :: self + integer,intent(in) :: key + integer :: ihash + ihash = mod(key-1,self%nbuckets)+1 + end function compute_hash + + subroutine hashtable_add(self, key, val) + ! Add a key to the hashtable structure + type(hashtable_t) :: self + integer,intent(in) :: key, val + integer :: ihash, item, nitems + integer,allocatable :: new_items(:,:) + ! Compute bucket for this element + ihash = compute_hash(self,key) + nitems = self%buckets(ihash)%nitems + ! Check if the element already exists in the bucket + do item=1,nitems + if (self%buckets(ihash)%items(1,item) /= key) cycle + ! Replace value + self%buckets(ihash)%items(2,item) = val + return + end do + ! Check if the buckets are full + if (size(self%buckets(ihash)%items,2)==nitems) then + ABI_MALLOC(new_items,(2,nitems+self%bucketstep)) + new_items(:,:nitems) = self%buckets(ihash)%items(:,:nitems) + new_items(:,nitems+1:) = 0 + ABI_MOVE_ALLOC(new_items,self%buckets(ihash)%items) + end if + ! Add the element to the bucket + nitems = nitems + 1 + self%buckets(ihash)%items(:,nitems) = [key,val] + self%buckets(ihash)%nitems = nitems + end subroutine hashtable_add + + subroutine hashtable_print(self,iunit) + ! Print the hashtable data + type(hashtable_t),intent(in) :: self + integer,intent(in) :: iunit + integer :: ibucket,item + do ibucket=1,self%nbuckets + do item=1,self%buckets(ibucket)%nitems + write(iunit,*) ibucket, self%buckets(ibucket)%items(:,item) + end do + end do + end subroutine hashtable_print + + subroutine hashtable_get(self,key,val,ierr) + ! Get the value of a key in the hashtable + type(hashtable_t) :: self + integer,intent(in) :: key + integer,intent(out) :: val,ierr + integer :: item, ihash + ierr = 0 + ihash = compute_hash(self,key) + do item=1,self%buckets(ihash)%nitems + if (self%buckets(ihash)%items(1,item) /= key) cycle + val = self%buckets(ihash)%items(2,item) + return + end do + ierr = 1 + end subroutine hashtable_get + + subroutine hashtable_items(self,items) + ! Get an array with all the keys in hashtable + type(hashtable_t) :: self + integer :: item,ibucket,idx + integer,allocatable :: items(:,:) + ABI_MALLOC(items,(2,sum(self%buckets(:)%nitems))) + idx = 0 + do ibucket=1,self%nbuckets + do item=1,self%buckets(ibucket)%nitems + idx = idx + 1 + items(:,idx) = self%buckets(ibucket)%items(:,item) + end do + end do + end subroutine hashtable_items + + subroutine hashtable_cleanup(self) + ! Free up memory in all the buckets + ! this should be done only after all the add operations are finished + type(hashtable_t) :: self + integer :: ibucket,nitems + integer,allocatable :: new_items(:,:) + do ibucket=1,self%nbuckets + ! get size of buckets and free unecessary memory + nitems = self%buckets(ibucket)%nitems + ABI_MALLOC(new_items,(2,nitems)) + new_items = self%buckets(ibucket)%items(:,:nitems) + ABI_MOVE_ALLOC(new_items,self%buckets(ibucket)%items) + end do + end subroutine hashtable_cleanup + + integer function hashtable_size(self) result(bsize) + type(hashtable_t) :: self + integer :: ibucket + ! Return the size of the hashtable in bytes + bsize = storage_size(self%buckets)*self%nbuckets + do ibucket=1,self%nbuckets + bsize = bsize + storage_size(self%buckets(ibucket)%items)*size(self%buckets(ibucket)%items,2)*2 + end do + bsize = bsize/8 + end function hashtable_size + + subroutine hashtable_free(self) + type(hashtable_t) :: self + integer :: ibucket + if (allocated(self%buckets)) then + do ibucket=1,self%nbuckets + ABI_FREE(self%buckets(ibucket)%items) + end do + ABI_FREE(self%buckets) + end if + end subroutine hashtable_free + +end module m_hashtable +!!*** diff --git a/GX-PAW/common/src/29_kpoints/m_hashtable.o b/GX-PAW/common/src/29_kpoints/m_hashtable.o new file mode 100644 index 00000000..2307f3fe Binary files /dev/null and b/GX-PAW/common/src/29_kpoints/m_hashtable.o differ diff --git a/GX-PAW/common/src/29_kpoints/m_htetra.F90 b/GX-PAW/common/src/29_kpoints/m_htetra.F90 new file mode 100644 index 00000000..e5d6539c --- /dev/null +++ b/GX-PAW/common/src/29_kpoints/m_htetra.F90 @@ -0,0 +1,2733 @@ +!!****m* ABINIT/m_htetra +!! NAME +!! m_htetra +!! +!! FUNCTION +!! Module for tetrahedron integration of DOS and similar quantities +!! Uses some functions from a previous implementation by MJV +!! +!! COPYRIGHT +!! Copyright (C) 2010-2024 ABINIT group (HM,MJV) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! TODO +!! 1) Test more carefully the case of degenerate tethraedron +!! 2) Add options to get only delta and/or theta ? +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" + +module m_htetra + + use defs_basis + use m_abicore + use m_krank + use m_xmpi + use m_errors + + use m_fstrings, only : sjoin, itoa, ftoa + use m_numeric_tools, only : linspace + use m_simtet, only : sim0onei, SIM0TWOI + +implicit none + +private +!!*** + +integer, parameter :: TETRA_SIZE = 6 +integer, parameter :: TETRA_STEP = 6 + +!!****t* m_htetra/t_htetra_bucket +!! NAME +!! t_htetra_bucket +!! +!! FUNCTION +!! Store a bunch of tetrahedra +!! +!! SOURCE + +type :: htetra_bucket + + integer,allocatable :: indexes(:,:) + +end type htetra_bucket +!!*** + +!!****t* m_htetra/htetra_t +!! NAME +!! htetra_t +!! +!! FUNCTION +!! tetrahedron geometry object +!! +!! SOURCE + +type, public :: htetra_t + + integer :: opt + ! Option for the generation of tetrahedra + + integer :: nkibz + ! Number of points in the irreducible Brillouin zone + + integer :: nkbz + ! Number of points in the full Brillouin zone + + integer :: nbuckets + ! Number of buckets for the hash table + + integer :: nunique_tetra + ! Number of unique tetrahedron + + integer :: nibz_tetra + ! Number of ibz tetrahedron + + integer,allocatable :: tetra_total(:) + ! (%nbkibz) + ! Equivalent tetrahedra per kpoint (number of irred tetra times multiplicity) + + integer,allocatable :: tetra_count(:) + ! (%nbkibz) + ! Inequivalent tetrahedra per kpoint (number of irred tetra) + + integer,allocatable :: ibz_multiplicity(:) + ! (%nbkibz) + ! Multiplicity of each k-point + + real(dp) :: vv + ! volume of the tetrahedra + + real(dp) :: klatt(3, 3) + ! reciprocal of lattice vectors for full kpoint grid + + type(htetra_bucket),allocatable :: ibz(:) + ! indexes of the tetrahedra for each k-point + + type(htetra_bucket),allocatable :: unique_tetra(:) + ! indexes of the unique tetrahedra + + contains + + procedure :: free => htetra_free + ! Free memory + + procedure :: print => htetra_print + ! Print information about tetrahedron object + + procedure :: get_onewk => htetra_get_onewk + ! Calculate integration weights and their derivatives for a single k-point in the IBZ. + + procedure :: get_onewk_wvals => htetra_get_onewk_wvals + ! Similar to tetra_get_onewk_wvals but receives arbitrary list of frequency points. + + procedure :: get_onewk_wvals_zinv => htetra_get_onewk_wvals_zinv + ! Calculate integration weights for 1/(z-E(k)) for a single k-point in the IBZ. + + procedure :: weights_wvals_zinv => htetra_weights_wvals_zinv + ! Same as above but return the weight on all the kpoints by looping over tetrahedra + + procedure :: wvals_weights => htetra_wvals_weights + ! Compute delta and theta on a list of energies for all kpoints + + procedure :: wvals_weights_delta => htetra_wvals_weights_delta + ! Compute delta on a list of energies for all kpoints + + procedure :: blochl_weights => htetra_blochl_weights + ! And interface to help to facilitate the transition to the new tetrahedron implementation + +end type htetra_t +!!*** + +public :: htetra_init ! Initialize the object +!!*** + +contains +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_htetra/htetra_init +!! NAME +!! htetra_init +!! +!! FUNCTION +!! get tetrahedra characterized by apexes +!! +!! INPUTS +!! bz2ibz(nkpt_fullbz)=indexes of irred kpoints equivalent to kpt_fullbz +!! gprimd(3,3) = reciprocal space vectors +!! klatt(3,3)=reciprocal of lattice vectors for full kpoint grid +!! kpt_fullbz(3,nkpt_fullbz)=kpoints in full brillouin zone +!! nkpt_fullbz=number of kpoints in full brillouin zone +!! options=1.generate 24 tetrahedra per k-point +!! faster but gives different results depending on the IBZ, small error for large grids +!! 2.generate tetrahedra on the FBZ and map to IBZ +!! slower but same results for IBZ and FBZ. +!! comm= MPI communicator +!! [opt]= 1 for Togo's version, 2 for Blochl's version (default) +!! +!! OUTPUT +!! tetra%ibz(4,24,nkibz)=for each k-point, the indexes in the IBZ +!! tetra%vv = tetrahedron volume divided by full BZ volume +!! +!! SOURCE + +subroutine htetra_init(tetra, bz2ibz, gprimd, klatt, kpt_fullbz, nkpt_fullbz, kpt_ibz, nkpt_ibz, & + ierr, errorstring, comm, & + opt) ! optional + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: nkpt_fullbz, nkpt_ibz, comm + integer,optional,intent(in) :: opt + integer,intent(out) :: ierr + character(len=80),intent(out) :: errorstring + class(htetra_t),intent(out),target :: tetra +!arrays + integer,intent(in) :: bz2ibz(nkpt_fullbz) + real(dp),intent(in) :: gprimd(3,3),klatt(3,3),kpt_fullbz(3,nkpt_fullbz),kpt_ibz(3,nkpt_ibz) + +!Local variables------------------------------- +!scalars + !type(octree_t) :: oct + type(krank_t) :: krank + integer :: ikpt2,isummit,itetra,jtetra + integer :: ikibz,ikbz,idiag,ihash,min_idiag,my_rank,nprocs + integer :: max_ntetra, ntetra + real(dp) :: rcvol,length,min_length +!arrays + integer,allocatable,target :: indexes(:,:), tetra_hash_count(:) + integer :: tetra_ibz(4) + integer :: tetra_shifts(3,4,24,4) ! 3 dimensions, 4 summits, 24 tetrahedra, 4 main diagonals + integer :: tetra_shifts_6(3,4,6,1) ! 3 dimensions, 4 summits, 6 tetrahedra, 4 main diagonals + integer :: main_diagonals(3,4) + integer :: tetra_mibz(0:4) + real(dp) :: k1(3),k2(3),k3(3),diag(3) + +! ********************************************************************* + + ! Use the shifts from kpclib developed by Atsushi Togo + ! This part is produced by a python script + ! This implementation is based on spglib and kpclib by Atsushi Togo + ! after a discussion with hin on the APS 2019 where he provided + ! details of his implementation. + ! Note that we don't use it in production as we found that is approach, although faster than the original + ! one proposed by Blochl (and implemented by MJV) does not preserve symmetries that is calculations done on the full BZ + ! and the IBZ do not produce the same result. The diff, however, decreases if the sampling is densified. + + tetra_shifts(:, 1, 1,1) = [ 0, 0, 0] + tetra_shifts(:, 2, 1,1) = [ 1, 0, 0] + tetra_shifts(:, 3, 1,1) = [ 1, 1, 0] + tetra_shifts(:, 4, 1,1) = [ 1, 1, 1] + tetra_shifts(:, 1, 2,1) = [ 0, 0, 0] + tetra_shifts(:, 2, 2,1) = [ 1, 0, 0] + tetra_shifts(:, 3, 2,1) = [ 1, 0, 1] + tetra_shifts(:, 4, 2,1) = [ 1, 1, 1] + tetra_shifts(:, 1, 3,1) = [ 0, 0, 0] + tetra_shifts(:, 2, 3,1) = [ 0, 1, 0] + tetra_shifts(:, 3, 3,1) = [ 1, 1, 0] + tetra_shifts(:, 4, 3,1) = [ 1, 1, 1] + tetra_shifts(:, 1, 4,1) = [ 0, 0, 0] + tetra_shifts(:, 2, 4,1) = [ 0, 1, 0] + tetra_shifts(:, 3, 4,1) = [ 0, 1, 1] + tetra_shifts(:, 4, 4,1) = [ 1, 1, 1] + tetra_shifts(:, 1, 5,1) = [ 0, 0, 0] + tetra_shifts(:, 2, 5,1) = [ 0, 0, 1] + tetra_shifts(:, 3, 5,1) = [ 1, 0, 1] + tetra_shifts(:, 4, 5,1) = [ 1, 1, 1] + tetra_shifts(:, 1, 6,1) = [ 0, 0, 0] + tetra_shifts(:, 2, 6,1) = [ 0, 0, 1] + tetra_shifts(:, 3, 6,1) = [ 0, 1, 1] + tetra_shifts(:, 4, 6,1) = [ 1, 1, 1] + tetra_shifts(:, 1, 7,1) = [ 0, 0, 0] + tetra_shifts(:, 2, 7,1) = [ 0, 1, 0] + tetra_shifts(:, 3, 7,1) = [ 0, 1, 1] + tetra_shifts(:, 4, 7,1) = [ -1, 0, 0] + tetra_shifts(:, 1, 8,1) = [ 0, 0, 0] + tetra_shifts(:, 2, 8,1) = [ 0, 0, 1] + tetra_shifts(:, 3, 8,1) = [ 0, 1, 1] + tetra_shifts(:, 4, 8,1) = [ -1, 0, 0] + tetra_shifts(:, 1, 9,1) = [ 0, 0, 0] + tetra_shifts(:, 2, 9,1) = [ 1, 0, 0] + tetra_shifts(:, 3, 9,1) = [ 1, 0, 1] + tetra_shifts(:, 4, 9,1) = [ 0, -1, 0] + tetra_shifts(:, 1,10,1) = [ 0, 0, 0] + tetra_shifts(:, 2,10,1) = [ 0, 0, 1] + tetra_shifts(:, 3,10,1) = [ 1, 0, 1] + tetra_shifts(:, 4,10,1) = [ 0, -1, 0] + tetra_shifts(:, 1,11,1) = [ 0, 0, 0] + tetra_shifts(:, 2,11,1) = [ 0, 0, 1] + tetra_shifts(:, 3,11,1) = [ -1, -1, 0] + tetra_shifts(:, 4,11,1) = [ 0, -1, 0] + tetra_shifts(:, 1,12,1) = [ 0, 0, 0] + tetra_shifts(:, 2,12,1) = [ 0, 0, 1] + tetra_shifts(:, 3,12,1) = [ -1, -1, 0] + tetra_shifts(:, 4,12,1) = [ -1, 0, 0] + tetra_shifts(:, 1,13,1) = [ 0, 0, 0] + tetra_shifts(:, 2,13,1) = [ 1, 0, 0] + tetra_shifts(:, 3,13,1) = [ 1, 1, 0] + tetra_shifts(:, 4,13,1) = [ 0, 0, -1] + tetra_shifts(:, 1,14,1) = [ 0, 0, 0] + tetra_shifts(:, 2,14,1) = [ 0, 1, 0] + tetra_shifts(:, 3,14,1) = [ 1, 1, 0] + tetra_shifts(:, 4,14,1) = [ 0, 0, -1] + tetra_shifts(:, 1,15,1) = [ 0, 0, 0] + tetra_shifts(:, 2,15,1) = [ 0, 1, 0] + tetra_shifts(:, 3,15,1) = [ -1, 0, -1] + tetra_shifts(:, 4,15,1) = [ 0, 0, -1] + tetra_shifts(:, 1,16,1) = [ 0, 0, 0] + tetra_shifts(:, 2,16,1) = [ 0, 1, 0] + tetra_shifts(:, 3,16,1) = [ -1, 0, -1] + tetra_shifts(:, 4,16,1) = [ -1, 0, 0] + tetra_shifts(:, 1,17,1) = [ 0, 0, 0] + tetra_shifts(:, 2,17,1) = [ 1, 0, 0] + tetra_shifts(:, 3,17,1) = [ 0, -1, -1] + tetra_shifts(:, 4,17,1) = [ 0, 0, -1] + tetra_shifts(:, 1,18,1) = [ 0, 0, 0] + tetra_shifts(:, 2,18,1) = [ 1, 0, 0] + tetra_shifts(:, 3,18,1) = [ 0, -1, -1] + tetra_shifts(:, 4,18,1) = [ 0, -1, 0] + tetra_shifts(:, 1,19,1) = [ 0, 0, 0] + tetra_shifts(:, 2,19,1) = [ -1, -1, -1] + tetra_shifts(:, 3,19,1) = [ 0, -1, -1] + tetra_shifts(:, 4,19,1) = [ 0, 0, -1] + tetra_shifts(:, 1,20,1) = [ 0, 0, 0] + tetra_shifts(:, 2,20,1) = [ -1, -1, -1] + tetra_shifts(:, 3,20,1) = [ 0, -1, -1] + tetra_shifts(:, 4,20,1) = [ 0, -1, 0] + tetra_shifts(:, 1,21,1) = [ 0, 0, 0] + tetra_shifts(:, 2,21,1) = [ -1, -1, -1] + tetra_shifts(:, 3,21,1) = [ -1, 0, -1] + tetra_shifts(:, 4,21,1) = [ 0, 0, -1] + tetra_shifts(:, 1,22,1) = [ 0, 0, 0] + tetra_shifts(:, 2,22,1) = [ -1, -1, -1] + tetra_shifts(:, 3,22,1) = [ -1, 0, -1] + tetra_shifts(:, 4,22,1) = [ -1, 0, 0] + tetra_shifts(:, 1,23,1) = [ 0, 0, 0] + tetra_shifts(:, 2,23,1) = [ -1, -1, -1] + tetra_shifts(:, 3,23,1) = [ -1, -1, 0] + tetra_shifts(:, 4,23,1) = [ 0, -1, 0] + tetra_shifts(:, 1,24,1) = [ 0, 0, 0] + tetra_shifts(:, 2,24,1) = [ -1, -1, -1] + tetra_shifts(:, 3,24,1) = [ -1, -1, 0] + tetra_shifts(:, 4,24,1) = [ -1, 0, 0] + tetra_shifts(:, 1, 1,2) = [ 0, 0, 0] + tetra_shifts(:, 2, 1,2) = [ 1, 0, 0] + tetra_shifts(:, 3, 1,2) = [ 0, 1, 0] + tetra_shifts(:, 4, 1,2) = [ 0, 1, 1] + tetra_shifts(:, 1, 2,2) = [ 0, 0, 0] + tetra_shifts(:, 2, 2,2) = [ 1, 0, 0] + tetra_shifts(:, 3, 2,2) = [ 0, 0, 1] + tetra_shifts(:, 4, 2,2) = [ 0, 1, 1] + tetra_shifts(:, 1, 3,2) = [ 0, 0, 0] + tetra_shifts(:, 2, 3,2) = [ -1, 1, 0] + tetra_shifts(:, 3, 3,2) = [ -1, 1, 1] + tetra_shifts(:, 4, 3,2) = [ -1, 0, 0] + tetra_shifts(:, 1, 4,2) = [ 0, 0, 0] + tetra_shifts(:, 2, 4,2) = [ -1, 0, 1] + tetra_shifts(:, 3, 4,2) = [ -1, 1, 1] + tetra_shifts(:, 4, 4,2) = [ -1, 0, 0] + tetra_shifts(:, 1, 5,2) = [ 0, 0, 0] + tetra_shifts(:, 2, 5,2) = [ -1, 1, 0] + tetra_shifts(:, 3, 5,2) = [ 0, 1, 0] + tetra_shifts(:, 4, 5,2) = [ -1, 1, 1] + tetra_shifts(:, 1, 6,2) = [ 0, 0, 0] + tetra_shifts(:, 2, 6,2) = [ 0, 1, 0] + tetra_shifts(:, 3, 6,2) = [ -1, 1, 1] + tetra_shifts(:, 4, 6,2) = [ 0, 1, 1] + tetra_shifts(:, 1, 7,2) = [ 0, 0, 0] + tetra_shifts(:, 2, 7,2) = [ -1, 0, 1] + tetra_shifts(:, 3, 7,2) = [ 0, 0, 1] + tetra_shifts(:, 4, 7,2) = [ -1, 1, 1] + tetra_shifts(:, 1, 8,2) = [ 0, 0, 0] + tetra_shifts(:, 2, 8,2) = [ 0, 0, 1] + tetra_shifts(:, 3, 8,2) = [ -1, 1, 1] + tetra_shifts(:, 4, 8,2) = [ 0, 1, 1] + tetra_shifts(:, 1, 9,2) = [ 0, 0, 0] + tetra_shifts(:, 2, 9,2) = [ 0, 0, 1] + tetra_shifts(:, 3, 9,2) = [ 0, -1, 0] + tetra_shifts(:, 4, 9,2) = [ 1, -1, 0] + tetra_shifts(:, 1,10,2) = [ 0, 0, 0] + tetra_shifts(:, 2,10,2) = [ 1, 0, 0] + tetra_shifts(:, 3,10,2) = [ 0, 0, 1] + tetra_shifts(:, 4,10,2) = [ 1, -1, 0] + tetra_shifts(:, 1,11,2) = [ 0, 0, 0] + tetra_shifts(:, 2,11,2) = [ -1, 0, 1] + tetra_shifts(:, 3,11,2) = [ 0, -1, 0] + tetra_shifts(:, 4,11,2) = [ -1, 0, 0] + tetra_shifts(:, 1,12,2) = [ 0, 0, 0] + tetra_shifts(:, 2,12,2) = [ -1, 0, 1] + tetra_shifts(:, 3,12,2) = [ 0, 0, 1] + tetra_shifts(:, 4,12,2) = [ 0, -1, 0] + tetra_shifts(:, 1,13,2) = [ 0, 0, 0] + tetra_shifts(:, 2,13,2) = [ 0, 1, 0] + tetra_shifts(:, 3,13,2) = [ 0, 0, -1] + tetra_shifts(:, 4,13,2) = [ 1, 0, -1] + tetra_shifts(:, 1,14,2) = [ 0, 0, 0] + tetra_shifts(:, 2,14,2) = [ 1, 0, 0] + tetra_shifts(:, 3,14,2) = [ 0, 1, 0] + tetra_shifts(:, 4,14,2) = [ 1, 0, -1] + tetra_shifts(:, 1,15,2) = [ 0, 0, 0] + tetra_shifts(:, 2,15,2) = [ -1, 1, 0] + tetra_shifts(:, 3,15,2) = [ 0, 0, -1] + tetra_shifts(:, 4,15,2) = [ -1, 0, 0] + tetra_shifts(:, 1,16,2) = [ 0, 0, 0] + tetra_shifts(:, 2,16,2) = [ -1, 1, 0] + tetra_shifts(:, 3,16,2) = [ 0, 1, 0] + tetra_shifts(:, 4,16,2) = [ 0, 0, -1] + tetra_shifts(:, 1,17,2) = [ 0, 0, 0] + tetra_shifts(:, 2,17,2) = [ 0, -1, -1] + tetra_shifts(:, 3,17,2) = [ 1, -1, -1] + tetra_shifts(:, 4,17,2) = [ 0, 0, -1] + tetra_shifts(:, 1,18,2) = [ 0, 0, 0] + tetra_shifts(:, 2,18,2) = [ 0, -1, -1] + tetra_shifts(:, 3,18,2) = [ 1, -1, -1] + tetra_shifts(:, 4,18,2) = [ 0, -1, 0] + tetra_shifts(:, 1,19,2) = [ 0, 0, 0] + tetra_shifts(:, 2,19,2) = [ 1, -1, -1] + tetra_shifts(:, 3,19,2) = [ 0, 0, -1] + tetra_shifts(:, 4,19,2) = [ 1, 0, -1] + tetra_shifts(:, 1,20,2) = [ 0, 0, 0] + tetra_shifts(:, 2,20,2) = [ 1, 0, 0] + tetra_shifts(:, 3,20,2) = [ 1, -1, -1] + tetra_shifts(:, 4,20,2) = [ 1, 0, -1] + tetra_shifts(:, 1,21,2) = [ 0, 0, 0] + tetra_shifts(:, 2,21,2) = [ 1, -1, -1] + tetra_shifts(:, 3,21,2) = [ 0, -1, 0] + tetra_shifts(:, 4,21,2) = [ 1, -1, 0] + tetra_shifts(:, 1,22,2) = [ 0, 0, 0] + tetra_shifts(:, 2,22,2) = [ 1, 0, 0] + tetra_shifts(:, 3,22,2) = [ 1, -1, -1] + tetra_shifts(:, 4,22,2) = [ 1, -1, 0] + tetra_shifts(:, 1,23,2) = [ 0, 0, 0] + tetra_shifts(:, 2,23,2) = [ 0, -1, -1] + tetra_shifts(:, 3,23,2) = [ 0, 0, -1] + tetra_shifts(:, 4,23,2) = [ -1, 0, 0] + tetra_shifts(:, 1,24,2) = [ 0, 0, 0] + tetra_shifts(:, 2,24,2) = [ 0, -1, -1] + tetra_shifts(:, 3,24,2) = [ 0, -1, 0] + tetra_shifts(:, 4,24,2) = [ -1, 0, 0] + tetra_shifts(:, 1, 1,3) = [ 0, 0, 0] + tetra_shifts(:, 2, 1,3) = [ 1, 0, 0] + tetra_shifts(:, 3, 1,3) = [ 0, 1, 0] + tetra_shifts(:, 4, 1,3) = [ 1, 0, 1] + tetra_shifts(:, 1, 2,3) = [ 0, 0, 0] + tetra_shifts(:, 2, 2,3) = [ 0, 1, 0] + tetra_shifts(:, 3, 2,3) = [ 0, 0, 1] + tetra_shifts(:, 4, 2,3) = [ 1, 0, 1] + tetra_shifts(:, 1, 3,3) = [ 0, 0, 0] + tetra_shifts(:, 2, 3,3) = [ -1, 1, 0] + tetra_shifts(:, 3, 3,3) = [ 0, 0, 1] + tetra_shifts(:, 4, 3,3) = [ -1, 0, 0] + tetra_shifts(:, 1, 4,3) = [ 0, 0, 0] + tetra_shifts(:, 2, 4,3) = [ -1, 1, 0] + tetra_shifts(:, 3, 4,3) = [ 0, 1, 0] + tetra_shifts(:, 4, 4,3) = [ 0, 0, 1] + tetra_shifts(:, 1, 5,3) = [ 0, 0, 0] + tetra_shifts(:, 2, 5,3) = [ 1, -1, 1] + tetra_shifts(:, 3, 5,3) = [ 0, -1, 0] + tetra_shifts(:, 4, 5,3) = [ 1, -1, 0] + tetra_shifts(:, 1, 6,3) = [ 0, 0, 0] + tetra_shifts(:, 2, 6,3) = [ 0, -1, 1] + tetra_shifts(:, 3, 6,3) = [ 1, -1, 1] + tetra_shifts(:, 4, 6,3) = [ 0, -1, 0] + tetra_shifts(:, 1, 7,3) = [ 0, 0, 0] + tetra_shifts(:, 2, 7,3) = [ 1, 0, 0] + tetra_shifts(:, 3, 7,3) = [ 1, -1, 1] + tetra_shifts(:, 4, 7,3) = [ 1, -1, 0] + tetra_shifts(:, 1, 8,3) = [ 0, 0, 0] + tetra_shifts(:, 2, 8,3) = [ 1, 0, 0] + tetra_shifts(:, 3, 8,3) = [ 1, -1, 1] + tetra_shifts(:, 4, 8,3) = [ 1, 0, 1] + tetra_shifts(:, 1, 9,3) = [ 0, 0, 0] + tetra_shifts(:, 2, 9,3) = [ 0, -1, 1] + tetra_shifts(:, 3, 9,3) = [ 1, -1, 1] + tetra_shifts(:, 4, 9,3) = [ 0, 0, 1] + tetra_shifts(:, 1,10,3) = [ 0, 0, 0] + tetra_shifts(:, 2,10,3) = [ 1, -1, 1] + tetra_shifts(:, 3,10,3) = [ 0, 0, 1] + tetra_shifts(:, 4,10,3) = [ 1, 0, 1] + tetra_shifts(:, 1,11,3) = [ 0, 0, 0] + tetra_shifts(:, 2,11,3) = [ 0, -1, 1] + tetra_shifts(:, 3,11,3) = [ 0, -1, 0] + tetra_shifts(:, 4,11,3) = [ -1, 0, 0] + tetra_shifts(:, 1,12,3) = [ 0, 0, 0] + tetra_shifts(:, 2,12,3) = [ 0, -1, 1] + tetra_shifts(:, 3,12,3) = [ 0, 0, 1] + tetra_shifts(:, 4,12,3) = [ -1, 0, 0] + tetra_shifts(:, 1,13,3) = [ 0, 0, 0] + tetra_shifts(:, 2,13,3) = [ 1, 0, 0] + tetra_shifts(:, 3,13,3) = [ 0, 0, -1] + tetra_shifts(:, 4,13,3) = [ 0, 1, -1] + tetra_shifts(:, 1,14,3) = [ 0, 0, 0] + tetra_shifts(:, 2,14,3) = [ 1, 0, 0] + tetra_shifts(:, 3,14,3) = [ 0, 1, 0] + tetra_shifts(:, 4,14,3) = [ 0, 1, -1] + tetra_shifts(:, 1,15,3) = [ 0, 0, 0] + tetra_shifts(:, 2,15,3) = [ -1, 0, -1] + tetra_shifts(:, 3,15,3) = [ 0, 0, -1] + tetra_shifts(:, 4,15,3) = [ -1, 1, -1] + tetra_shifts(:, 1,16,3) = [ 0, 0, 0] + tetra_shifts(:, 2,16,3) = [ -1, 0, -1] + tetra_shifts(:, 3,16,3) = [ -1, 1, -1] + tetra_shifts(:, 4,16,3) = [ -1, 0, 0] + tetra_shifts(:, 1,17,3) = [ 0, 0, 0] + tetra_shifts(:, 2,17,3) = [ 0, 0, -1] + tetra_shifts(:, 3,17,3) = [ -1, 1, -1] + tetra_shifts(:, 4,17,3) = [ 0, 1, -1] + tetra_shifts(:, 1,18,3) = [ 0, 0, 0] + tetra_shifts(:, 2,18,3) = [ 0, 1, 0] + tetra_shifts(:, 3,18,3) = [ -1, 1, -1] + tetra_shifts(:, 4,18,3) = [ 0, 1, -1] + tetra_shifts(:, 1,19,3) = [ 0, 0, 0] + tetra_shifts(:, 2,19,3) = [ -1, 1, 0] + tetra_shifts(:, 3,19,3) = [ -1, 1, -1] + tetra_shifts(:, 4,19,3) = [ -1, 0, 0] + tetra_shifts(:, 1,20,3) = [ 0, 0, 0] + tetra_shifts(:, 2,20,3) = [ -1, 1, 0] + tetra_shifts(:, 3,20,3) = [ 0, 1, 0] + tetra_shifts(:, 4,20,3) = [ -1, 1, -1] + tetra_shifts(:, 1,21,3) = [ 0, 0, 0] + tetra_shifts(:, 2,21,3) = [ 0, 0, -1] + tetra_shifts(:, 3,21,3) = [ 0, -1, 0] + tetra_shifts(:, 4,21,3) = [ 1, -1, 0] + tetra_shifts(:, 1,22,3) = [ 0, 0, 0] + tetra_shifts(:, 2,22,3) = [ 1, 0, 0] + tetra_shifts(:, 3,22,3) = [ 0, 0, -1] + tetra_shifts(:, 4,22,3) = [ 1, -1, 0] + tetra_shifts(:, 1,23,3) = [ 0, 0, 0] + tetra_shifts(:, 2,23,3) = [ -1, 0, -1] + tetra_shifts(:, 3,23,3) = [ 0, 0, -1] + tetra_shifts(:, 4,23,3) = [ 0, -1, 0] + tetra_shifts(:, 1,24,3) = [ 0, 0, 0] + tetra_shifts(:, 2,24,3) = [ -1, 0, -1] + tetra_shifts(:, 3,24,3) = [ 0, -1, 0] + tetra_shifts(:, 4,24,3) = [ -1, 0, 0] + tetra_shifts(:, 1, 1,4) = [ 0, 0, 0] + tetra_shifts(:, 2, 1,4) = [ 1, 0, 0] + tetra_shifts(:, 3, 1,4) = [ 1, 1, 0] + tetra_shifts(:, 4, 1,4) = [ 0, 0, 1] + tetra_shifts(:, 1, 2,4) = [ 0, 0, 0] + tetra_shifts(:, 2, 2,4) = [ 0, 1, 0] + tetra_shifts(:, 3, 2,4) = [ 1, 1, 0] + tetra_shifts(:, 4, 2,4) = [ 0, 0, 1] + tetra_shifts(:, 1, 3,4) = [ 0, 0, 0] + tetra_shifts(:, 2, 3,4) = [ 0, 1, 0] + tetra_shifts(:, 3, 3,4) = [ -1, 0, 1] + tetra_shifts(:, 4, 3,4) = [ -1, 0, 0] + tetra_shifts(:, 1, 4,4) = [ 0, 0, 0] + tetra_shifts(:, 2, 4,4) = [ 0, 1, 0] + tetra_shifts(:, 3, 4,4) = [ -1, 0, 1] + tetra_shifts(:, 4, 4,4) = [ 0, 0, 1] + tetra_shifts(:, 1, 5,4) = [ 0, 0, 0] + tetra_shifts(:, 2, 5,4) = [ 1, 0, 0] + tetra_shifts(:, 3, 5,4) = [ 0, -1, 1] + tetra_shifts(:, 4, 5,4) = [ 0, -1, 0] + tetra_shifts(:, 1, 6,4) = [ 0, 0, 0] + tetra_shifts(:, 2, 6,4) = [ 1, 0, 0] + tetra_shifts(:, 3, 6,4) = [ 0, -1, 1] + tetra_shifts(:, 4, 6,4) = [ 0, 0, 1] + tetra_shifts(:, 1, 7,4) = [ 0, 0, 0] + tetra_shifts(:, 2, 7,4) = [ -1, -1, 1] + tetra_shifts(:, 3, 7,4) = [ -1, -1, 0] + tetra_shifts(:, 4, 7,4) = [ 0, -1, 0] + tetra_shifts(:, 1, 8,4) = [ 0, 0, 0] + tetra_shifts(:, 2, 8,4) = [ -1, -1, 1] + tetra_shifts(:, 3, 8,4) = [ -1, -1, 0] + tetra_shifts(:, 4, 8,4) = [ -1, 0, 0] + tetra_shifts(:, 1, 9,4) = [ 0, 0, 0] + tetra_shifts(:, 2, 9,4) = [ -1, -1, 1] + tetra_shifts(:, 3, 9,4) = [ 0, -1, 1] + tetra_shifts(:, 4, 9,4) = [ 0, -1, 0] + tetra_shifts(:, 1,10,4) = [ 0, 0, 0] + tetra_shifts(:, 2,10,4) = [ -1, -1, 1] + tetra_shifts(:, 3,10,4) = [ -1, 0, 1] + tetra_shifts(:, 4,10,4) = [ -1, 0, 0] + tetra_shifts(:, 1,11,4) = [ 0, 0, 0] + tetra_shifts(:, 2,11,4) = [ -1, -1, 1] + tetra_shifts(:, 3,11,4) = [ 0, -1, 1] + tetra_shifts(:, 4,11,4) = [ 0, 0, 1] + tetra_shifts(:, 1,12,4) = [ 0, 0, 0] + tetra_shifts(:, 2,12,4) = [ -1, -1, 1] + tetra_shifts(:, 3,12,4) = [ -1, 0, 1] + tetra_shifts(:, 4,12,4) = [ 0, 0, 1] + tetra_shifts(:, 1,13,4) = [ 0, 0, 0] + tetra_shifts(:, 2,13,4) = [ 0, 0, -1] + tetra_shifts(:, 3,13,4) = [ 1, 0, -1] + tetra_shifts(:, 4,13,4) = [ 1, 1, -1] + tetra_shifts(:, 1,14,4) = [ 0, 0, 0] + tetra_shifts(:, 2,14,4) = [ 0, 0, -1] + tetra_shifts(:, 3,14,4) = [ 0, 1, -1] + tetra_shifts(:, 4,14,4) = [ 1, 1, -1] + tetra_shifts(:, 1,15,4) = [ 0, 0, 0] + tetra_shifts(:, 2,15,4) = [ 1, 0, 0] + tetra_shifts(:, 3,15,4) = [ 1, 0, -1] + tetra_shifts(:, 4,15,4) = [ 1, 1, -1] + tetra_shifts(:, 1,16,4) = [ 0, 0, 0] + tetra_shifts(:, 2,16,4) = [ 0, 1, 0] + tetra_shifts(:, 3,16,4) = [ 0, 1, -1] + tetra_shifts(:, 4,16,4) = [ 1, 1, -1] + tetra_shifts(:, 1,17,4) = [ 0, 0, 0] + tetra_shifts(:, 2,17,4) = [ 1, 0, 0] + tetra_shifts(:, 3,17,4) = [ 1, 1, 0] + tetra_shifts(:, 4,17,4) = [ 1, 1, -1] + tetra_shifts(:, 1,18,4) = [ 0, 0, 0] + tetra_shifts(:, 2,18,4) = [ 0, 1, 0] + tetra_shifts(:, 3,18,4) = [ 1, 1, 0] + tetra_shifts(:, 4,18,4) = [ 1, 1, -1] + tetra_shifts(:, 1,19,4) = [ 0, 0, 0] + tetra_shifts(:, 2,19,4) = [ 0, 0, -1] + tetra_shifts(:, 3,19,4) = [ 0, 1, -1] + tetra_shifts(:, 4,19,4) = [ -1, 0, 0] + tetra_shifts(:, 1,20,4) = [ 0, 0, 0] + tetra_shifts(:, 2,20,4) = [ 0, 1, 0] + tetra_shifts(:, 3,20,4) = [ 0, 1, -1] + tetra_shifts(:, 4,20,4) = [ -1, 0, 0] + tetra_shifts(:, 1,21,4) = [ 0, 0, 0] + tetra_shifts(:, 2,21,4) = [ 0, 0, -1] + tetra_shifts(:, 3,21,4) = [ 1, 0, -1] + tetra_shifts(:, 4,21,4) = [ 0, -1, 0] + tetra_shifts(:, 1,22,4) = [ 0, 0, 0] + tetra_shifts(:, 2,22,4) = [ 1, 0, 0] + tetra_shifts(:, 3,22,4) = [ 1, 0, -1] + tetra_shifts(:, 4,22,4) = [ 0, -1, 0] + tetra_shifts(:, 1,23,4) = [ 0, 0, 0] + tetra_shifts(:, 2,23,4) = [ 0, 0, -1] + tetra_shifts(:, 3,23,4) = [ -1, -1, 0] + tetra_shifts(:, 4,23,4) = [ 0, -1, 0] + tetra_shifts(:, 1,24,4) = [ 0, 0, 0] + tetra_shifts(:, 2,24,4) = [ 0, 0, -1] + tetra_shifts(:, 3,24,4) = [ -1, -1, 0] + tetra_shifts(:, 4,24,4) = [ -1, 0, 0] + + ! These shifts are taken from previous tetrahedron implementation by MJV and BXU + ! TODO: implement shifts for the other diagonals + tetra_shifts_6(:,1,1,1) = [0,0,0] + tetra_shifts_6(:,2,1,1) = [1,0,0] + tetra_shifts_6(:,3,1,1) = [0,1,0] + tetra_shifts_6(:,4,1,1) = [1,0,1] + tetra_shifts_6(:,1,2,1) = [1,0,0] + tetra_shifts_6(:,2,2,1) = [1,1,0] + tetra_shifts_6(:,3,2,1) = [0,1,0] + tetra_shifts_6(:,4,2,1) = [1,0,1] + tetra_shifts_6(:,1,3,1) = [0,1,0] + tetra_shifts_6(:,2,3,1) = [1,1,0] + tetra_shifts_6(:,3,3,1) = [1,0,1] + tetra_shifts_6(:,4,3,1) = [1,1,1] + tetra_shifts_6(:,1,4,1) = [0,0,0] + tetra_shifts_6(:,2,4,1) = [0,1,0] + tetra_shifts_6(:,3,4,1) = [0,0,1] + tetra_shifts_6(:,4,4,1) = [1,0,1] + tetra_shifts_6(:,1,5,1) = [0,0,1] + tetra_shifts_6(:,2,5,1) = [1,0,1] + tetra_shifts_6(:,3,5,1) = [0,1,0] + tetra_shifts_6(:,4,5,1) = [0,1,1] + tetra_shifts_6(:,1,6,1) = [0,1,0] + tetra_shifts_6(:,2,6,1) = [1,0,1] + tetra_shifts_6(:,3,6,1) = [0,1,1] + tetra_shifts_6(:,4,6,1) = [1,1,1] + + main_diagonals(:,1) = [ 1, 1, 1] ! 0-7 + main_diagonals(:,2) = [-1, 1, 1] ! 1-6 + main_diagonals(:,3) = [ 1,-1, 1] ! 2-5 + main_diagonals(:,4) = [ 1, 1,-1] ! 3-4 + + nprocs = xmpi_comm_size(comm); my_rank = xmpi_comm_rank(comm) + tetra%nkibz = nkpt_ibz + tetra%nkbz = nkpt_fullbz + ! HM: this value should be important for performance + ! more buckets means faster queries for unique tetrahedra + ! but more memory due to the initial size TETRA_SIZE of the buckets + ! when changing the number of buckets one should also change the hash function + ! to distribute the tetrahedra in the buckets as uniformly as possible + ! the simplest hash (not the best!) is: + ! ihash = mod(sum(tetra_ibz),nbuckts) + ! the value of sum(tetra_ibz) is between 1 and 4*nkibz so I use nkibz nbuckets + ! a larger number of buckets should speed up finding the irreducible tetrahedra + ! but with more memory allocated + tetra%nbuckets = nkpt_ibz + ierr = 0 + ABI_CALLOC(tetra_hash_count,(tetra%nbuckets)) + + ! Determine the smallest diagonal in k-space + min_length = huge(min_length) + do idiag = 1,4 + diag(:) = gprimd(:,1)*main_diagonals(1,idiag)+& + gprimd(:,2)*main_diagonals(2,idiag)+& + gprimd(:,3)*main_diagonals(3,idiag) + length = sqrt(diag(1)*diag(1) + diag(2)*diag(2) + diag(3)*diag(3)) + if (length < min_length) then + min_length = length + min_idiag = idiag + end if + end do + + ! HM TODO: Avoid krank and map the k-point grid to indexes + ! Make full k-point rank arrays + !oct = octree_init(kpt_fullbz,2**4,[-one,-one,-one],[two,two,two]) + krank = krank_new(nkpt_fullbz, kpt_fullbz) + + ! + ! HM (13/04/2019): I implement two different versions: + ! 1. I only use 24 tetrahedra around the IBZ k-point + ! following the approach of A. Togo (phonopy, spglib, kspclib). + ! 2. I generate tetrahedra on the full Brillouin zone + ! and keep track of how many are contributing to the IBZ point and the multiplicities, + ! these can be more than 24 tetrahedra. + ! This is equivalent to what Matthieu implemented but avoids large memory allocations. + ! + ! The two implementations differ specially when using low k-point sampling + ! (the second yields the same results using IBZ or FBZ, the first one not). + ! For large sampling the two approaches yield similar results, with the first + ! one using less memory, faster to generate and compute + ! + ABI_MALLOC(tetra%unique_tetra,(tetra%nbuckets)) + do ihash=1,tetra%nbuckets + ABI_CALLOC(tetra%unique_tetra(ihash)%indexes,(0:4,TETRA_SIZE)) + end do + tetra%opt = 2; if (present(opt)) tetra%opt = opt + + select case(tetra%opt) + case(1) + ! For each k-point in the IBZ store 24 tetrahedra each refering to 4 k-points + do ikibz=1,tetra%nkibz + !if (mod(ikibz,nprocs) /= my_rank) cycle + k1 = kpt_ibz(:,ikibz) + tetra_loop1: do itetra=1,24 + do isummit=1,4 + ! Find the index of the neighbouring k-points in the BZ + k2 = k1 + tetra_shifts(1,isummit,itetra,min_idiag)*klatt(:,1) + & + tetra_shifts(2,isummit,itetra,min_idiag)*klatt(:,2) + & + tetra_shifts(3,isummit,itetra,min_idiag)*klatt(:,3) + ! Find full kpoint which is summit isummit of tetrahedron itetra around full kpt ikpt_full ! + !ikpt2 = octree_find(oct,k2,dist) + !ikpt2 = octree_find_nearest_pbc(oct,k2,dist,shift) + !if (dist>tol12) call exit(1) + ikpt2 = krank%get_index(k2) + ! Find the index of those points in the BZ and IBZ + tetra_ibz(isummit) = bz2ibz(ikpt2) + end do + ! Sort index of irr k-point edges (need this so the comparison works) + call sort_4tetra_int(tetra_ibz) + + ! Store only unique tetrahedra + ! Compute a very simple hash for each tetrahedron + ihash = compute_hash(tetra,tetra_ibz) !mod(sum(tetra_ibz),tetra%nbuckets)+1 + ! Loop over all tetrahedrons that contain this ikibz as first element + do jtetra=1,tetra_hash_count(ihash) + ! if tetrahedron already exists add multiplicity + if (tetra%unique_tetra(ihash)%indexes(1,jtetra)/=tetra_ibz(1)) cycle + if (tetra%unique_tetra(ihash)%indexes(2,jtetra)/=tetra_ibz(2)) cycle + if (tetra%unique_tetra(ihash)%indexes(3,jtetra)/=tetra_ibz(3)) cycle + if (tetra%unique_tetra(ihash)%indexes(4,jtetra)/=tetra_ibz(4)) cycle + tetra%unique_tetra(ihash)%indexes(0,jtetra) = tetra%unique_tetra(ihash)%indexes(0,jtetra)+1 + cycle tetra_loop1 + end do + ! Otherwise store new tetrahedron + tetra_hash_count(ihash) = tetra_hash_count(ihash)+1 + max_ntetra = size(tetra%unique_tetra(ihash)%indexes,2) + ! The contents don't fit the array so I have to resize it + if (tetra_hash_count(ihash)>max_ntetra) then + ABI_MALLOC(indexes,(0:4,max_ntetra+TETRA_STEP)) + indexes(0:4,:max_ntetra) = tetra%unique_tetra(ihash)%indexes + indexes(:,max_ntetra+1:) = 0 + ABI_MOVE_ALLOC(indexes,tetra%unique_tetra(ihash)%indexes) + end if + tetra%unique_tetra(ihash)%indexes(1:,tetra_hash_count(ihash)) = tetra_ibz(:) + tetra%unique_tetra(ihash)%indexes(0, tetra_hash_count(ihash)) = 1 + end do tetra_loop1 + end do + ! HM: The multiplicity of the tetrahedrons computed so far is wrong because we are using IBZ + ! I compute the k-point multiplicity so I can fix this later on + ! Only needed in blochl_weights* interface for looping over tetrahedra. + ! in the onewk routines the weight is known outside + ABI_CALLOC(tetra%ibz_multiplicity,(tetra%nkibz)) + do ikbz=1,nkpt_fullbz + ikibz = bz2ibz(ikbz) + tetra%ibz_multiplicity(ikibz) = tetra%ibz_multiplicity(ikibz) + 1 + end do + + case(2) + min_idiag = 1 + ! For each k-point in the BZ generate the 6 tetrahedra that tesselate a microzone + do ikbz=1,tetra%nkbz + k1 = kpt_fullbz(:,ikbz) + tetra_loop2: do itetra=1,6 + ! Determine tetrahedron + do isummit=1,4 + ! Find the index of the neighbouring k-points in the BZ + k2 = k1 + tetra_shifts_6(1,isummit,itetra,min_idiag)*klatt(:,1) + & + tetra_shifts_6(2,isummit,itetra,min_idiag)*klatt(:,2) + & + tetra_shifts_6(3,isummit,itetra,min_idiag)*klatt(:,3) + ! Find full kpoint which is summit isummit of tetrahedron itetra around full kpt ikpt_full ! + !ikpt2 = octree_find(oct,k2,dist) + !ikpt2 = octree_find_nearest_pbc(oct,k2,dist,shift) + !if (dist>tol12) call exit(1) + ikpt2 = krank%get_index(k2) + ! Find the index of those points in the BZ and IBZ + tetra_ibz(isummit) = bz2ibz(ikpt2) + end do + ! Sort index of irr k-point edges (need this so the comparison works) + call sort_4tetra_int(tetra_ibz) + + ! Store only unique tetrahedra + ! Compute a very simple hash for each tetrahedron + ihash = compute_hash(tetra,tetra_ibz) !mod(sum(tetra_ibz),tetra%nbuckets)+1 + ! Loop over all tetrahedrons that contain this ikibz as first element + do jtetra=1,tetra_hash_count(ihash) + ! if tetrahedron already exists add multiplicity + if (tetra%unique_tetra(ihash)%indexes(1,jtetra)/=tetra_ibz(1)) cycle + if (tetra%unique_tetra(ihash)%indexes(2,jtetra)/=tetra_ibz(2)) cycle + if (tetra%unique_tetra(ihash)%indexes(3,jtetra)/=tetra_ibz(3)) cycle + if (tetra%unique_tetra(ihash)%indexes(4,jtetra)/=tetra_ibz(4)) cycle + tetra%unique_tetra(ihash)%indexes(0,jtetra) = tetra%unique_tetra(ihash)%indexes(0,jtetra)+1 + cycle tetra_loop2 + end do + ! Otherwise store new tetrahedron + tetra_hash_count(ihash) = tetra_hash_count(ihash)+1 + max_ntetra = size(tetra%unique_tetra(ihash)%indexes,2) + ! The contents don't fit the array so I have to resize it + if (tetra_hash_count(ihash)>max_ntetra) then + ABI_MALLOC(indexes,(0:4,max_ntetra+TETRA_STEP)) + indexes(0:4,:max_ntetra) = tetra%unique_tetra(ihash)%indexes + indexes(:,max_ntetra+1:) = 0 + ABI_MOVE_ALLOC(indexes,tetra%unique_tetra(ihash)%indexes) + end if + tetra%unique_tetra(ihash)%indexes(1:,tetra_hash_count(ihash)) = tetra_ibz(:) + tetra%unique_tetra(ihash)%indexes(0, tetra_hash_count(ihash)) = 1 + end do tetra_loop2 + end do + case default + ierr = 1 + write(errorstring,*) 'Invalid option for the generation of tetrahedra,',ch10,& + 'possible options are:',ch10,& + '1. Generate 24 tetrahedra per k-point',ch10,& + '2. Generate tetrahedra in the FBZ a map to IBZ (default)' + return + end select + + !ierr = octree_free(oct) + ABI_FREE(tetra_hash_count) + call krank%free() + + ! Do some maintenance: free unused memory and count unique tetrahedra per IBZ point + tetra%nunique_tetra = 0 + do ihash=1,tetra%nbuckets + ! Count tetrahedra in this bucket + ntetra = count(tetra%unique_tetra(ihash)%indexes(0,:)>0) + tetra%nunique_tetra = tetra%nunique_tetra + ntetra + ! Allocate array with right size + ABI_MALLOC(indexes,(0:4,ntetra)) + indexes = tetra%unique_tetra(ihash)%indexes(:,:ntetra) + ABI_MOVE_ALLOC(indexes, tetra%unique_tetra(ihash)%indexes) + end do + + ! Sum the multiplicity + ABI_MALLOC(tetra%tetra_count,(tetra%nkibz)) + ABI_MALLOC(tetra%tetra_total,(tetra%nkibz)) + tetra%tetra_count = 0 + tetra%tetra_total = 0 + do ihash=1,tetra%nbuckets + ntetra = size(tetra%unique_tetra(ihash)%indexes,2) + do itetra=1,ntetra + tetra_mibz = tetra%unique_tetra(ihash)%indexes(:,itetra) + do isummit=1,4 + ikibz = tetra_mibz(isummit) + tetra%tetra_total(ikibz) = tetra%tetra_total(ikibz) + tetra_mibz(0) + tetra%tetra_count(ikibz) = tetra%tetra_count(ikibz) + 1 + end do + end do + end do + tetra%nibz_tetra = sum(tetra%tetra_count) + + ! HM: This was being allocated here, however this is only used when we loop over kpoints + ! I will only allocate this memory if the htetra_get_onewk_* routines are called (lazy evaluation) + !call htetra_init_mapping_ibz(tetra) + + ! Calculate the volume of the tetrahedra + rcvol = abs(gprimd(1,1)*(gprimd(2,2)*gprimd(3,3)-gprimd(3,2)*gprimd(2,3))- & + gprimd(2,1)*(gprimd(1,2)*gprimd(3,3)-gprimd(3,2)*gprimd(1,3))+ & + gprimd(3,1)*(gprimd(1,2)*gprimd(2,3)-gprimd(2,2)*gprimd(1,3))) + + ! Volume of all tetrahedra should be the same as that of tetra 1 + ! this is the volume of 1 tetrahedron, should be coherent with notation in Lehmann & Taut + k1(:) = gprimd(:,1)*klatt(1,1) + gprimd(:,2)*klatt(2,1) + gprimd(:,3)*klatt(3,1) + k2(:) = gprimd(:,1)*klatt(1,2) + gprimd(:,2)*klatt(2,2) + gprimd(:,3)*klatt(3,2) + k3(:) = gprimd(:,1)*klatt(1,3) + gprimd(:,2)*klatt(2,3) + gprimd(:,3)*klatt(3,3) + tetra%vv = abs(k1(1)*(k2(2)*k3(3)-k2(3)*k3(2))- & + k1(2)*(k2(1)*k3(3)-k2(3)*k3(1))+ & + k1(3)*(k2(1)*k3(2)-k2(2)*k3(1))) / 6.d0 / rcvol + + contains + integer function compute_hash(tetra,t) result(ihash) + class(htetra_t),intent(in) :: tetra + integer,intent(in) :: t(4) + ihash = mod(sum(t), tetra%nbuckets) + 1 + ! TODO: should use a more general hash function that supports more buckets + ! Something like: + ! id = t(1)*nk3+t(2)*nk2+t(3)*nk1+t(4) + ! where nk is the number of points in the IBZ + ! Computing this leads to overflow so should use + ! mod comutation operations + ! (A + B) mod C = (A mod C + B mod C) mod C + ! (A * B) mod C = (A mod C * B mod C) mod C + ! A^B mod C = ( (A mod C)^B ) mod C + end function compute_hash + +end subroutine htetra_init +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_htetra/htetra_init_mapping_ibz +!! NAME +!! htetra_init_mapping_ibz +!! +!! FUNCTION +!! The mapping to the IBZ has its own allocation routine. +!! I will only allocate this memory if the htetra_get_onewk_* routines are called (lazy evaluation) +!! +!! SOURCE + +subroutine htetra_init_mapping_ibz(tetra) + + class(htetra_t),intent(inout) :: tetra + integer :: ikibz, itetra, isummit, ihash, ntetra + integer :: tetra_count(tetra%nkibz),tetra_mibz(0:4) + + real(dp) :: mem_mb + + ! Only execute the following if not yet alocated + if (allocated(tetra%ibz)) return + + ! Allocate IBZ to tetrahedron mapping + ABI_MALLOC(tetra%ibz, (tetra%nkibz)) + mem_mb = ABI_MEM_MB(tetra%ibz) + do ikibz=1,tetra%nkibz + ABI_MALLOC(tetra%ibz(ikibz)%indexes, (2, tetra%tetra_count(ikibz))) + mem_mb = mem_mb + 2 * tetra%tetra_count(ikibz) * 4 * b2Mb + end do + + call wrtout(std_out, sjoin(" Allocating tetra%ibz%indexes with memory:", ftoa(mem_mb, fmt="f8.1"), " [Mb] <<< MEM")) + + ! Create mapping from IBZ to unique tetrahedra + tetra_count = 0 + do ihash=1,tetra%nbuckets + ntetra = size(tetra%unique_tetra(ihash)%indexes, dim=2) + do itetra=1,ntetra + tetra_mibz = tetra%unique_tetra(ihash)%indexes(:,itetra) + do isummit=1,4 + ikibz = tetra_mibz(isummit) + tetra_count(ikibz) = tetra_count(ikibz) + 1 + tetra%ibz(ikibz)%indexes(1, tetra_count(ikibz)) = ihash + tetra%ibz(ikibz)%indexes(2, tetra_count(ikibz)) = itetra + end do + end do + end do + +end subroutine htetra_init_mapping_ibz +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_htetra/htetra_get_ibz +!! NAME +!! htetra_get_ibz +!! +!! FUNCTION +!! Get the itetra tetrahedron contributing to the ikibz k-point +!! +!! SOURCE + +pure subroutine htetra_get_ibz(tetra, ikibz, itetra, tetra_mibz) + + class(htetra_t), intent(in) :: tetra + integer,intent(in) :: ikibz, itetra + integer,intent(out) :: tetra_mibz(0:4) + integer :: ihash, jtetra + + ihash = tetra%ibz(ikibz)%indexes(1,itetra) + jtetra = tetra%ibz(ikibz)%indexes(2,itetra) + tetra_mibz = tetra%unique_tetra(ihash)%indexes(:,jtetra) + +end subroutine htetra_get_ibz +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_htetra/htetra_print +!! NAME +!! htetra_print +!! +!! FUNCTION +!! write information about the tetrahedra object +!! +!! SOURCE + +subroutine htetra_print(self, unit) + + class(htetra_t), intent(in) :: self + integer,intent(in) :: unit + + real(dp) :: total_size, unique_tetra_size, ibz_pointer_size + + if (unit == dev_null) return + + unique_tetra_size = self%nunique_tetra * 5* four / 1024 ** 2 + total_size = unique_tetra_size + !write(unit,'(a,i0)') ' htetra unique_tetra:', self%nunique_tetra + !write(unit,'(a,f12.1,a)') ' htetra unique_tetra_size ', unique_tetra_size, ' [Mb] <<< MEM' + if (allocated(self%ibz)) then + ibz_pointer_size = self%nibz_tetra*2*four / 1024 ** 2 + write(unit,'(a,i0)') ' ibz_tetra: ', self%nibz_tetra + write(unit,'(a,f12.1,a)') ' ibz_tetra_size: ', ibz_pointer_size, ' [Mb] <<< MEM' + total_size = total_size + ibz_pointer_size + end if + ! integer arrays + total_size = total_size + 3 * (self%nkibz * 4) / 1024**2 + write(unit,'(a,f12.1,a)') ' htetra total size:', total_size, ' [Mb] <<< MEM' + +end subroutine htetra_print +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_htetra/htetra_free +!! NAME +!! htetra_free +!! +!! FUNCTION +!! deallocate tetrahedra pointers if needed +!! +!! SOURCE + +subroutine htetra_free(tetra) + + class(htetra_t), intent(inout) :: tetra + integer :: ikibz,ihash + + ABI_SFREE(tetra%tetra_count) + ABI_SFREE(tetra%tetra_total) + ABI_SFREE(tetra%ibz_multiplicity) + + if (allocated(tetra%unique_tetra)) then + do ihash=1,tetra%nbuckets + ABI_SFREE(tetra%unique_tetra(ihash)%indexes) + end do + ABI_FREE(tetra%unique_tetra) + end if + + if (allocated(tetra%ibz)) then + do ikibz=1,tetra%nkibz + ABI_SFREE(tetra%ibz(ikibz)%indexes) + end do + ABI_FREE(tetra%ibz) + end if + +end subroutine htetra_free +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_htetra/get_onetetra_blochl +!! NAME +!! get_onetetra_blochl +!! +!! FUNCTION +!! Private function to calculate the contributions to the weights due to a single tetrahedron. +!! Extracted from get_tetra_weight +!! +!! SOURCE + +pure subroutine get_onetetra_blochl(eig, energies, nene, bcorr, tweight, dweight) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: nene,bcorr + real(dp) ,intent(in) :: energies(nene) +!arrays + real(dp), intent(out) :: tweight(4, nene) + real(dp), intent(out) :: dweight(4, nene) + real(dp),intent(in) :: eig(4) + +!Local variables------------------------------- + integer :: ieps + real(dp) :: cc,cc1,cc2,cc3 + real(dp) :: dcc1de,dcc2de,dcc3de,dccde,eps + real(dp) :: e21,e31,e32,e41,e42,e43 + real(dp) :: inv_e32,inv_e41,inv_e42,inv_e43,inv_e21,inv_e31 + real(dp) :: deleps1,deleps2,deleps3,deleps4 + real(dp) :: e1,e2,e3,e4 + real(dp) :: invepsum, cc_pre, dccde_pre + real(dp) :: cc1_pre, cc2_pre, cc3_pre + real(dp) :: dccde_tmp + real(dp) :: bcorr_fact + +! ********************************************************************* + + ! This is output + tweight = zero; dweight = zero + + ! all notations are from Blochl PRB 49 16223 [[cite:Bloechl1994a]] Appendix B + e1 = eig(1) + e2 = eig(2) + e3 = eig(3) + e4 = eig(4) + e21 = e2-e1 + e31 = e3-e1 + e41 = e4-e1 + e32 = e3-e2 + e42 = e4-e2 + e43 = e4-e3 + inv_e21 = zero; if (e21 > tol14) inv_e21 = 1.d0 / e21 + inv_e31 = zero; if (e31 > tol14) inv_e31 = 1.d0 / e31 + inv_e41 = zero; if (e41 > tol14) inv_e41 = 1.d0 / e41 + inv_e32 = zero; if (e32 > tol14) inv_e32 = 1.d0 / e32 + inv_e42 = zero; if (e42 > tol14) inv_e42 = 1.d0 / e42 + inv_e43 = zero; if (e43 > tol14) inv_e43 = 1.d0 / e43 + + do ieps=1,nene + eps = energies(ieps) + + ! + ! eps < e1 nothing to do + ! + if (eps < e1) cycle + + ! + ! e1 < eps < e2 + ! + if (eps < e2) then + deleps1 = eps-e1 + invepsum = inv_e21+inv_e31+inv_e41 + + ! Heaviside + cc = inv_e21*inv_e31*inv_e41*deleps1**3 + tweight(1,ieps) = cc*(4.d0-deleps1*invepsum) + tweight(2,ieps) = cc*deleps1*inv_e21 + tweight(3,ieps) = cc*deleps1*inv_e31 + tweight(4,ieps) = cc*deleps1*inv_e41 + + ! Delta + dccde_pre = 3.d0*inv_e21*inv_e31*inv_e41 + dccde = dccde_pre*deleps1**2 + dweight(1,ieps) = dccde*(4.d0-deleps1*invepsum)-cc*invepsum + dweight(2,ieps) = (dccde*deleps1+cc) * inv_e21 + dweight(3,ieps) = (dccde*deleps1+cc) * inv_e31 + dweight(4,ieps) = (dccde*deleps1+cc) * inv_e41 + + if (bcorr == 1) then + ! bxu, correction terms based on Bloechl's paper + bcorr_fact = 4.d0/40.d0*dccde_pre*deleps1*deleps1 + tweight(1,ieps) = tweight(1,ieps) + bcorr_fact*( e21+e31+e41) + tweight(2,ieps) = tweight(2,ieps) + bcorr_fact*(-e21+e32+e42) + tweight(3,ieps) = tweight(3,ieps) + bcorr_fact*(-e31-e32+e43) + tweight(4,ieps) = tweight(4,ieps) + bcorr_fact*(-e41-e42-e43) + + bcorr_fact = 8.d0/40.d0*dccde_pre*deleps1 + dweight(1,ieps) = dweight(1,ieps) + bcorr_fact*( e21+e31+e41) + dweight(2,ieps) = dweight(2,ieps) + bcorr_fact*(-e21+e32+e42) + dweight(3,ieps) = dweight(3,ieps) + bcorr_fact*(-e31-e32+e43) + dweight(4,ieps) = dweight(4,ieps) + bcorr_fact*(-e41-e42-e43) + end if + + cycle + endif + + ! + ! e2 < eps < e3 + ! + if (eps < e3) then + deleps1 = eps-e1 + deleps2 = eps-e2 + deleps3 = e3-eps + deleps4 = e4-eps + cc1_pre = inv_e31*inv_e41 + cc2_pre = inv_e41*inv_e32*inv_e31 + cc3_pre = inv_e42*inv_e32*inv_e41 + + ! Heaviside + cc1 = cc1_pre*deleps1*deleps1 + cc2 = cc2_pre*deleps1*deleps2*deleps3 + cc3 = cc3_pre*deleps2*deleps2*deleps4 + + tweight(1,ieps) = (cc1)+& + (cc1+cc2)*deleps3*inv_e31+& + (cc1+cc2+cc3)*deleps4*inv_e41 + tweight(2,ieps) = (cc1+cc2+cc3)+& + (cc2+cc3)*deleps3*inv_e32+& + (cc3)*deleps4*inv_e42 + tweight(3,ieps) = (cc1+cc2)*deleps1*inv_e31+& + (cc2+cc3)*deleps2*inv_e32 + tweight(4,ieps) = (cc1+cc2+cc3)*deleps1*inv_e41+& + (cc3)*deleps2*inv_e42 + + ! Delta + dcc1de = cc1_pre*(2.d0*deleps1) + dcc2de = cc2_pre*( -deleps1*deleps2+deleps1*deleps3+deleps2*deleps3) + dcc3de = cc3_pre*(2.d0*deleps2*deleps4-deleps2*deleps2) + dweight(1,ieps) = dcc1de+& + ((dcc1de+dcc2de)*deleps3-(cc1+cc2))*inv_e31+& + ((dcc1de+dcc2de+dcc3de)*deleps4-(cc1+cc2+cc3))*inv_e41 + dweight(2,ieps) = (dcc1de+dcc2de+dcc3de)+& + ((dcc2de+dcc3de)*deleps3-(cc2+cc3))*inv_e32+& + (dcc3de*deleps4-cc3)*inv_e42 + dweight(3,ieps) = ((dcc1de+dcc2de)*deleps1+(cc1+cc2))*inv_e31+& + ((dcc2de+dcc3de)*deleps2+(cc2+cc3))*inv_e32 + dweight(4,ieps) = ((dcc1de+dcc2de+dcc3de)*deleps1+(cc1+cc2+cc3))*inv_e41+& + (dcc3de*deleps2+cc3)*inv_e42 + + if (bcorr == 1) then + ! bxu, correction terms based on Bloechl's paper + ! The correction terms may cause the dweight become negative + bcorr_fact = 4.d0/40.d0*cc1_pre*(3.d0*e21+6.d0*deleps2-3.d0*(e31+e42)*deleps2*deleps2*inv_e32*inv_e42) + tweight(1,ieps) = tweight(1,ieps) + bcorr_fact*( e21+e31+e41) + tweight(2,ieps) = tweight(2,ieps) + bcorr_fact*(-e21+e32+e42) + tweight(3,ieps) = tweight(3,ieps) + bcorr_fact*(-e31-e32+e43) + tweight(4,ieps) = tweight(4,ieps) + bcorr_fact*(-e41-e42-e43) + + bcorr_fact = 4.d0/40.d0*cc1_pre*(6.d0-6.d0*(e31+e42)*deleps2*inv_e32*inv_e42) + dweight(1,ieps) = dweight(1,ieps) + bcorr_fact*( e21+e31+e41) + dweight(2,ieps) = dweight(2,ieps) + bcorr_fact*(-e21+e32+e42) + dweight(3,ieps) = dweight(3,ieps) + bcorr_fact*(-e31-e32+e43) + dweight(4,ieps) = dweight(4,ieps) + bcorr_fact*(-e41-e42-e43) + end if + + cycle + endif + + ! + ! e3 < eps < e4 + ! + if (eps < e4) then + deleps4 = e4-eps + invepsum = inv_e41+inv_e42+inv_e43 + + ! Heaviside + cc_pre = inv_e41*inv_e42*inv_e43 + cc = cc_pre*deleps4**3 + tweight(1,ieps) = one - deleps4*cc*inv_e41 + tweight(2,ieps) = one - deleps4*cc*inv_e42 + tweight(3,ieps) = one - deleps4*cc*inv_e43 + tweight(4,ieps) = one - cc*(4.d0-deleps4*invepsum) + + ! Delta + dccde = -3.d0*cc_pre*deleps4**2 + dccde_tmp = dccde*deleps4 - cc + dweight(1,ieps) = -dccde_tmp * inv_e41 + dweight(2,ieps) = -dccde_tmp * inv_e42 + dweight(3,ieps) = -dccde_tmp * inv_e43 + dweight(4,ieps) = -4.d0*dccde + dccde_tmp*invepsum + + if (bcorr == 1) then + ! bxu, correction terms based on Bloechl's paper + ! The correction terms may cause the dweight become negative + bcorr_fact = 12.d0/40.d0*cc_pre*deleps4*deleps4 + tweight(1,ieps) = tweight(1,ieps) + bcorr_fact*( e21+e31+e41) + tweight(2,ieps) = tweight(2,ieps) + bcorr_fact*(-e21+e32+e42) + tweight(3,ieps) = tweight(3,ieps) + bcorr_fact*(-e31-e32+e43) + tweight(4,ieps) = tweight(4,ieps) + bcorr_fact*(-e41-e42-e43) + + bcorr_fact = - 24.d0/40.d0*cc_pre*deleps4 + dweight(1,ieps) = dweight(1,ieps) + bcorr_fact*( e21+e31+e41) + dweight(2,ieps) = dweight(2,ieps) + bcorr_fact*(-e21+e32+e42) + dweight(3,ieps) = dweight(3,ieps) + bcorr_fact*(-e31-e32+e43) + dweight(4,ieps) = dweight(4,ieps) + bcorr_fact*(-e41-e42-e43) + end if + + cycle + endif + + ! + ! e4 < eps + ! + if (e4 < eps) then + + ! Heaviside + tweight(:,ieps:) = one + + ! Delta unchanged by this tetrahedron + exit + end if + + ! if we have a fully degenerate tetrahedron, + ! 1) the tweight is a Heaviside (step) function, which is correct above, but + ! 2) the dweight should contain a Dirac function + ! + end do + +end subroutine get_onetetra_blochl +!!*** + +!!****f* m_htetra/get_onetetra_lambinvigneron +!! NAME +!! get_onetetra_lambinvigneron +!! +!! FUNCTION +!! Compute the complex weights according to: P. Lambin and J.P. Vigneron, Phys. Rev. B 29, 3430 (1984) +!! This routine is adapted from tdep where it was implemented +!! by Olle Hellman, all credits go to him +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +!pure +subroutine get_onetetra_lambinvigneron(eig, z, cw) + + ! dispersion values at the corners of the tetrahedron + real(dp), intent(in) :: eig(4) + ! energy to evaluate the weights at + complex(dp), intent(in) :: z + ! complex weights + complex(dp), intent(out) :: cw(4) + complex(dp) :: EZ1,EZ2,EZ3,EZ4 + real(dp) :: tol = tol14 + !real(dp) :: tol = tol10 + !real(dp) :: tol = tol6 + real(dp) :: Emin,Emax,Zdist + real(dp) :: E12,E13,E14,E23,E24,E34 + real(dp) :: a,b,c,d,e,f + complex(dp) zmE(4), verli(4) !, verm(4) + !integer :: ii, jj + + cw = zero + + ! Min and max energy + Emin=eig(1) + Emax=eig(4) + + ! First the complex energy differences + zmE = z - eig(:) + EZ1=z-eig(1) + EZ2=z-eig(2) + EZ3=z-eig(3) + EZ4=z-eig(4) + ! Smallest distance |z-Ei|, to determine wether I should switch to the + ! asymptotic behavior for numerical stability. + Zdist=huge(Zdist) + Zdist=min(Zdist,abs(EZ2)) + Zdist=min(Zdist,abs(EZ3)) + Zdist=min(Zdist,abs(EZ4)) + !@TODO add asymptotic thing with continued fractions + + ! Then the energy differences, for the coefficients. Must always be positive, I hope. + E12=eig(2)-eig(1) + E13=eig(3)-eig(1) + E14=eig(4)-eig(1) + E23=eig(3)-eig(2) + E24=eig(4)-eig(2) + E34=eig(4)-eig(3) + a=zero; if ( E12 .gt. tol ) a=one/E12 + b=zero; if ( E13 .gt. tol ) b=one/E13 + c=zero; if ( E14 .gt. tol ) c=one/E14 + d=zero; if ( E23 .gt. tol ) d=one/E23 + e=zero; if ( E24 .gt. tol ) e=one/E24 + f=zero; if ( E34 .gt. tol ) f=one/E34 + + ! Now get the actual weights + ! e1=e2=e3=e4 + if ( E12+E23+E34 .lt. tol ) then +#if 0 + !print *, "e1=e2=e3=e4" + cw(1)=0.25_dp/EZ1 + cw(2)=0.25_dp/EZ2 + cw(3)=0.25_dp/EZ3 + cw(4)=0.25_dp/EZ4 +#else + call SIM0TWOI(cw, VERLI, z-eig) +#endif + ! e2=e3=e4 ! diff wrt simteta + elseif ( E23+E34 .lt. tol ) then +#if 0 + !print *, "e2=e3=e4" + cw(1)=-a - (3*a**2*EZ2)*half + 3*a**3*EZ1*EZ2 + 3*a**4*EZ1**2*EZ2*Log(EZ2/EZ1) + cw(2)=-a - (3*a**2*EZ2)*half + 3*a**3*EZ1*EZ2 + 3*a**4*EZ1**2*EZ2*Log(EZ2/EZ1) + cw(3)=-a - (3*a**2*EZ2)*half + 3*a**3*EZ1*EZ2 + 3*a**4*EZ1**2*EZ2*Log(EZ2/EZ1) + cw(4)=-a*third + (a**2*EZ1)*half - a**3*EZ1**2 + a**4*EZ1**3*Log(EZ2/EZ1) +#else + call SIM0TWOI(cw, VERLI, z-eig) +#endif + + ! e1=e2=e3 + elseif ( E12+E23 .lt. tol ) then +#if 0 + !print *, "e1=e2=e3" ! diff wrt simteta + cw(1)=f*third - (EZ4*f**2)*half + EZ4**2*f**3 + EZ4**3*f**4*Log(EZ4/EZ3) + cw(2)=f*third - (EZ4*f**2)*half + EZ4**2*f**3 + EZ4**3*f**4*Log(EZ4/EZ3) + cw(3)=f*third - (EZ4*f**2)*half + EZ4**2*f**3 + EZ4**3*f**4*Log(EZ4/EZ3) + cw(4)=-f + (3*EZ3*f**2)*half - 3*EZ3*EZ4*f**3 + 3*EZ3*EZ4**2*f**4*Log(EZ3/EZ4) +#else + call SIM0TWOI(cw, VERLI, z-eig) +#endif + ! e1=e2 e3=e4 + elseif ( E12+E34 .lt. tol ) then +#if 0 + !print *, "e1=e2 e3=e4" ! FIXME This is Buggy, does not work even with parabolic dispersion + cw(1)=-d - (3*d**2*EZ2)*half + 3*d**3*EZ2*EZ3 + 3*d**4*EZ2*EZ3**2*Log(EZ2/EZ3) + cw(2)=-d - (3*d**2*EZ2)*half + 3*d**3*EZ2*EZ3 + 3*d**4*EZ2*EZ3**2*Log(EZ2/EZ3) + cw(3)=d - (3*d**2*EZ3)*half - 3*d**3*EZ2*EZ3 + 3*d**4*EZ2**2*EZ3*Log(EZ3/EZ2) + cw(4)=d - (3*d**2*EZ3)*half - 3*d**3*EZ2*EZ3 + 3*d**4*EZ2**2*EZ3*Log(EZ3/EZ2) +#else + !cw(1) = nine * EZ3**2 * EZ2 / E23**4 * log(EZ2/EZ3) * EZ2 * (EZ3 -E23)/E23**3 - one/E23 + !cw(2) = cw(1) + !cw(3) = nine * EZ2**2 * EZ3 / E23**4 * log(EZ3/EZ2) * EZ3 * (EZ2 +E23)/E23**3 + one/E23 + !cw(4) = cw(3) + call SIM0TWOI(cw, VERLI, z-eig) + !cw = zero +#endif + + ! e3=e4 + elseif ( E34 .lt. tol ) then + !print *, "e3=e4" +#if 0 + cw(1)=-(a*b**2*EZ1**2*(-1 + (a*EZ2 + 2*b*EZ3)*Log(EZ1))) + a**2*d**2*EZ2**3*Log(EZ2) - & + b**2*d*EZ3**2*(1 + (2*b*EZ1 + d*EZ2)*Log(EZ3)) + cw(2)=a**2*b**2*EZ1**3*Log(EZ1) - a*d**2*EZ2**2*(1 + (a*EZ1 - 2*d*EZ3)*Log(EZ2)) - & + b*d**2*EZ3**2*(1 + (b*EZ1 + 2*d*EZ2)*Log(EZ3)) + cw(3)=a*b**3*EZ1**3*Log(EZ1) - a*d**3*EZ2**3*Log(EZ2) + b*d*EZ3*(half + b*EZ1 + d*EZ2 + & + (b**2*EZ1**2 + b*d*EZ1*EZ2 + d**2*EZ2**2)*Log(EZ3)) + cw(4)=a*b**3*EZ1**3*Log(EZ1) - a*d**3*EZ2**3*Log(EZ2) + b*d*EZ3*(half + b*EZ1 + d*EZ2 + & + (b**2*EZ1**2 + b*d*EZ1*EZ2 + d**2*EZ2**2)*Log(EZ3)) +#else + call SIM0TWOI(cw, VERLI, z-eig) +#endif + ! e2=e3 + elseif ( E23 .lt. tol ) then +#if 0 + !print *, "e2=e3" + cw(1)=-(a**2*c*EZ1**2*(-1 + (2*a*EZ2 + c*EZ4)*Log(EZ1))) + & + a**2*e*EZ2**2*(1 + (2*a*EZ1 - e*EZ4)*Log(EZ2)) + c**2*e**2*EZ4**3*Log(EZ4) + cw(2)=a**3*c*EZ1**3*Log(EZ1) - & + a*e*EZ2*(half + a*EZ1 - e*EZ4 + (a**2*EZ1**2 - a*e*EZ1*EZ4 + e**2*EZ4**2)*Log(EZ2)) + c*e**3*EZ4**3*Log(EZ4) + cw(3)=a**3*c*EZ1**3*Log(EZ1) - & + a*e*EZ2*(half + a*EZ1 - e*EZ4 + (a**2*EZ1**2 - a*e*EZ1*EZ4 + e**2*EZ4**2)*Log(EZ2)) + c*e**3*EZ4**3*Log(EZ4) + cw(4)=a**2*c**2*EZ1**3*Log(EZ1) - & + a*e**2*EZ2**2*(1 + (a*EZ1 - 2*e*EZ4)*Log(EZ2)) - c*e**2*EZ4**2*(1 + (c*EZ1 + 2*e*EZ2)*Log(EZ4)) +#else + call SIM0TWOI(cw, VERLI, z-eig) +#endif + + ! e1=e2 + elseif ( E12 .lt. tol ) then + !print *, "e1=e2" +#if 0 + cw(1)=b*c*EZ1*(half - b*EZ3 - c*EZ4 + (b**2*EZ3**2 + b*c*EZ3*EZ4 + c**2*EZ4**2)*Log(EZ1)) - & + b**3*EZ3**3*f*Log(EZ3) + c**3*EZ4**3*f*Log(EZ4) + cw(2)=b*c*EZ1*(half - b*EZ3 - c*EZ4 + (b**2*EZ3**2 + b*c*EZ3*EZ4 + c**2*EZ4**2)*Log(EZ1)) - & + b**3*EZ3**3*f*Log(EZ3) + c**3*EZ4**3*f*Log(EZ4) + cw(3)=-(b**2*c*EZ1**2*(-1 + (2*b*EZ3 + c*EZ4)*Log(EZ1))) + & + b**2*EZ3**2*f*(1 + (2*b*EZ1 - EZ4*f)*Log(EZ3)) + c**2*EZ4**3*f**2*Log(EZ4) + cw(4)=-(b*c**2*EZ1**2*(-1 + (b*EZ3 + 2*c*EZ4)*Log(EZ1))) + & + b**2*EZ3**3*f**2*Log(EZ3) - c**2*EZ4**2*f*(1 + (2*c*EZ1 + EZ3*f)*Log(EZ4)) +#else + call SIM0TWOI(cw, VERLI, z-eig) +#endif + ! e1=Object with tables for tetrahedron method. +!! ik_ibz=Index of the k-point in the IBZ array +!! bcorr=1 to include Blochl correction else 0. +!! nw=number of energies in wvals +!! nibz=number of irreducible kpoints +!! wvals(nw)=Frequency points. +!! eigen_ibz(nkibz)=eigenenergies for each k point +!! +!! OUTPUT +!! weights(nw,2) = integration weights for +!! Dirac delta (derivative of theta wrt energy) and Theta (Heaviside function) +!! for a given (band, k-point, spin). +!! +!! SOURCE + +subroutine htetra_get_onewk_wvals(tetra, ik_ibz, opt, nw, wvals, max_occ, nkibz, eig_ibz, weights) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: ik_ibz,nw,nkibz,opt + real(dp) ,intent(in) :: max_occ + class(htetra_t), intent(inout) :: tetra +!arrays + real(dp),intent(in) :: wvals(nw) + real(dp),intent(in) :: eig_ibz(nkibz) + real(dp),intent(out) :: weights(nw, 2) + +!Local variables------------------------------- +!scalars + integer :: itetra,isummit,tetra_count,tetra_total + real(dp) :: tweight +!arrays + integer :: ind_ibz(4),tetra_mibz(0:4) + real(dp) :: eig(4) + real(dp) :: tweight_tmp(4,nw),dweight_tmp(4,nw) + +! ********************************************************************* + + weights = zero + ! lazy evaluation of the mapping from k-points to tetrahedra + if (.not.allocated(tetra%ibz)) call htetra_init_mapping_ibz(tetra) + + ! For each tetrahedron that belongs to this k-point + tetra_count = tetra%tetra_count(ik_ibz) + tetra_total = tetra%tetra_total(ik_ibz) + do itetra=1,tetra_count + + call htetra_get_ibz(tetra, ik_ibz, itetra, tetra_mibz) + tweight = one*tetra_mibz(0) / tetra_total + do isummit=1,4 + ! Get mapping of each summit to eig_ibz + ind_ibz(isummit) = tetra_mibz(isummit) + eig(isummit) = eig_ibz(ind_ibz(isummit)) + end do + + ! Sort energies before calling get_onetetra_blochl + call sort_4tetra(eig, ind_ibz) + + ! HM: Here we should only compute what we will use! + select case (opt) + case(0:1) + call get_onetetra_blochl(eig, wvals, nw, opt, tweight_tmp, dweight_tmp) + case(2) + call get_onetetetra_lambinvigneron_imag(eig, wvals, nw, dweight_tmp) + tweight_tmp = zero + end select + + ! Accumulate contributions to ik_ibz (there might be multiple vertexes that map onto ik_ibz) + do isummit=1,4 + if (ind_ibz(isummit) /= ik_ibz) cycle + weights(:,1) = weights(:,1) + dweight_tmp(isummit,:)*tweight*max_occ + weights(:,2) = weights(:,2) + tweight_tmp(isummit,:)*tweight*max_occ + ! HM: This exit is important, avoids summing the same contribution more than once + exit + end do + end do ! itetra + +end subroutine htetra_get_onewk_wvals +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_htetra/tetra_get_onewk +!! NAME +!! tetra_get_onewk +!! +!! FUNCTION +!! Calculate integration weights and their derivatives for a single k-point in the IBZ. +!! Same as above but different calling arguments. +!! IBZ Weights are not included +!! HM: The above is prefered but I keep this one to ease the transition +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +subroutine htetra_get_onewk(tetra, ik_ibz, bcorr, nw, nkibz, eig_ibz, enemin, enemax, max_occ, weights) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: ik_ibz,nw,nkibz,bcorr + class(htetra_t), intent(inout) :: tetra + real(dp) ,intent(in) :: enemin,enemax,max_occ +!arrays + real(dp),intent(in) :: eig_ibz(nkibz) + real(dp),intent(out) :: weights(nw,2) + +!Local variables------------------------------- +!scalars + real(dp) :: wvals(nw) + +! ********************************************************************* + + weights = zero + wvals = linspace(enemin, enemax, nw) + call htetra_get_onewk_wvals(tetra, ik_ibz, bcorr, nw, wvals, max_occ, nkibz, eig_ibz, weights) + +end subroutine htetra_get_onewk +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_htetra/htetra_get_onewk_wvals_zinv +!! NAME +!! htetra_get_onewk_wvals_zinv +!! +!! FUNCTION +!! Calculate integration weights for 1/(z-E(k)) for a single k-point in the IBZ. +!! Using either the implementation from: +!! S. Kaprzyk, Computer Physics Communications 183, 347 (2012). +!! or (TODO) +!! P. Lambin and J.P. Vigneron, Phys. Rev. B 29, 3430 (1984). +!! +!! INPUTS +!! tetra=Object with tables for tetrahedron method. +!! ik_ibz=Index of the k-point in the IBZ array +!! bcorr=1 to include Blochl correction else 0. +!! nw=number of energies in wvals +!! nibz=number of irreducible kpoints +!! wvals(nw)=Frequency points. +!! eigen_ibz(nkibz)=eigenenergies for each k point +!! opt: 1 for S. Kaprzyk routines, 2 for Lambin. +!! +!! OUTPUT +!! weights(nw,2) = integration weights for +!! Dirac delta (derivative of theta wrt energy) and Theta (Heaviside function) +!! for a given (band, k-point, spin). +!! [erange(2)]: if present, weights are computed with an approximated asyntotic expression if +!! real(z) is outside of this interval and with tetra if inside. +!! +!! SOURCE + +subroutine htetra_get_onewk_wvals_zinv(tetra, ik_ibz, nz, zvals, max_occ, nkibz, eig_ibz, opt, cweights, erange) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: ik_ibz,nz,nkibz,opt + real(dp) ,intent(in) :: max_occ + class(htetra_t), intent(inout) :: tetra +!arrays + complex(dp),intent(in) :: zvals(nz) + real(dp),optional,intent(in) :: erange(2) + real(dp),intent(in) :: eig_ibz(nkibz) + complex(dp),intent(out) :: cweights(nz) + +!Local variables------------------------------- +!scalars + integer :: itetra,isummit,tetra_total,tetra_count,iz + real(dp) :: tweight +!arrays + integer :: ind_ibz(4),tetra_mibz(0:4) + real(dp) :: eig(4), my_erange(2) + complex(dp) :: verm(4), cw(4), verli(4) +! ********************************************************************* + + cweights = zero + ! lazy evaluation of the mapping from k-points to tetrahedra + if (.not.allocated(tetra%ibz)) call htetra_init_mapping_ibz(tetra) + + if (all(opt /= [1, 2])) then + ABI_ERROR(sjoin("Invalid opt:", itoa(opt))) + end if + + my_erange = [-huge(one), huge(one)]; if (present(erange)) my_erange = erange + + ! For each tetrahedron that belongs to this k-point + tetra_count = tetra%tetra_count(ik_ibz) + tetra_total = tetra%tetra_total(ik_ibz) + do itetra=1,tetra_count + + call htetra_get_ibz(tetra, ik_ibz, itetra, tetra_mibz) + tweight = one * tetra_mibz(0) / tetra_total + do isummit=1,4 + ! Get mapping of each summit to eig_ibz + ind_ibz(isummit) = tetra_mibz(isummit) + eig(isummit) = eig_ibz(ind_ibz(isummit)) + end do + + ! Loop over frequencies + do iz=1,nz + + if (real(zvals(iz)) >= my_erange(1) .and. real(zvals(iz)) <= my_erange(2)) then + select case(opt) + case(1) + verm = zvals(iz) - eig + call SIM0TWOI(cw, VERLI, VERM) + case(2) + call get_onetetra_lambinvigneron(eig, zvals(iz), cw) + end select + else + cw = (one / (zvals(iz) - eig)) / four !* tetra%vv + end if + + do isummit=1,4 + if (ind_ibz(isummit) /= ik_ibz) cycle + cweights(iz) = cweights(iz) + cw(isummit) * tweight * max_occ + ! HM: This exit is important, avoids summing the same contribution more than once + exit + end do + end do + end do ! itetra + +end subroutine htetra_get_onewk_wvals_zinv +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_htetra/htetra_get_delta_mask +!! NAME +!! htetra_get_delta_mask +!! +!! FUNCTION +!! Get a mask for the kpoints where the delta is finite +!! + +subroutine htetra_get_delta_mask(tetra, eig_ibz, wvals, nw, nkpt, kmask, comm) + +!Arguments + integer,intent(in) :: nw,nkpt,comm + class(htetra_t), intent(in) :: tetra + real(dp),intent(in) :: wvals(nw) + real(dp),intent(in) :: eig_ibz(nkpt) + integer,intent(out) :: kmask(nkpt) + +!Local variables------------------------------- + integer :: ik_ibz,nprocs,my_rank,ierr + integer :: tetra_count, itetra, isummit, ihash + integer :: contrib + real(dp) :: emin,emax + integer :: ind_ibz(4) + real(dp) :: eig(4) + + nprocs = xmpi_comm_size(comm); my_rank = xmpi_comm_rank(comm) + kmask = 0 + ! For each bucket of tetrahedra + do ihash=1,tetra%nbuckets + if (mod(ihash,nprocs) /= my_rank) cycle + + ! For each tetrahedron + tetra_count = size(tetra%unique_tetra(ihash)%indexes, dim=2) + do itetra=1,tetra_count + + ! Get mapping of each summit to eig_ibz + do isummit=1,4 + ind_ibz(isummit) = tetra%unique_tetra(ihash)%indexes(isummit, itetra) + eig(isummit) = eig_ibz(ind_ibz(isummit)) + end do + + ! Determine the energy range of the tetrahedra + emin = minval(eig) + emax = maxval(eig) + + ! Check if any value in wvals is between emin and emax + contrib = 0; if (any(emin < wvals .and. wvals < emax)) contrib = 1 + + ! Compute the union + do isummit=1,4 + ik_ibz = ind_ibz(isummit) + kmask(ik_ibz) = kmask(ik_ibz) + contrib + end do + end do ! itetra + end do + + call xmpi_sum(kmask, comm, ierr) + +end subroutine htetra_get_delta_mask +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_htetra/htetra_wvals_weights +!! NAME +!! htetra_wvals_weights +!! +!! FUNCTION +!! Emulates the behaviour of the previous tetrahedron implementation but +!! taking a list of energies as input. +!! +!! HM: I find that in many routines its better to change the implementation +!! and accumulate the tetrahedron weights in the same way as the +!! gaussian smearing weights using htetra_get_onewk_wvals. However this requires +!! some refactoring of the code. I provide this routine to make it easier +!! to transition to the new tetrahedron implementation without refactoring. +!! Looping over tetrahedra (i.e. using tetra_blochl_weights) is currently faster +!! than looping over k-points. +!! +!! MG: Note, however, that tetra_blochl_weights requires more memory as +!! one has to allocate dweight(nw,nkpt),tweight(nw,nkpt) and the size of the arrays increases +!! quickly with the k-mesh and the number of frequencies (propto mband) +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +subroutine htetra_wvals_weights(tetra, eig_ibz, nw, wvals, max_occ, nkpt, opt, tweight, dweight, comm) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: nw,nkpt,opt,comm + class(htetra_t), intent(in) :: tetra + real(dp) ,intent(in) :: max_occ +!arrays + real(dp),intent(in) :: eig_ibz(nkpt) + real(dp),intent(out) :: dweight(nw,nkpt),tweight(nw,nkpt) + +!Local variables------------------------------- +!scalars + integer :: ik_ibz,multiplicity,nprocs,my_rank,ierr + integer :: tetra_count, itetra, isummit, ihash +!arrays + integer :: ind_ibz(4) + real(dp) :: eig(4) + real(dp) :: wvals(nw) + real(dp) :: dweight_tmp(4,nw),tweight_tmp(4,nw) + +! ********************************************************************* + + tweight = zero; dweight = zero + nprocs = xmpi_comm_size(comm); my_rank = xmpi_comm_rank(comm) + + ! For each bucket of tetrahedra + do ihash=1,tetra%nbuckets + if (mod(ihash, nprocs) /= my_rank) cycle + + ! For each tetrahedron + tetra_count = size(tetra%unique_tetra(ihash)%indexes, dim=2) + do itetra=1,tetra_count + + ! Get mapping of each summit to eig_ibz + do isummit=1,4 + ind_ibz(isummit) = tetra%unique_tetra(ihash)%indexes(isummit, itetra) + eig(isummit) = eig_ibz(ind_ibz(isummit)) + end do + + ! Sort energies before calling get_onetetra_blochl + call sort_4tetra(eig, ind_ibz) + + ! Get tetrahedron weights + select case (opt) + case(0:1) + call get_onetetra_blochl(eig, wvals, nw, opt, tweight_tmp, dweight_tmp) + case(2) + call get_onetetetra_lambinvigneron_imag(eig, wvals, nw, dweight_tmp) + tweight_tmp = zero + end select + + ! Acumulate the contributions + multiplicity = tetra%unique_tetra(ihash)%indexes(0, itetra) + do isummit=1,4 + ik_ibz = ind_ibz(isummit) + dweight(:,ik_ibz) = dweight(:,ik_ibz) + dweight_tmp(isummit,:) * multiplicity * max_occ + tweight(:,ik_ibz) = tweight(:,ik_ibz) + tweight_tmp(isummit,:) * multiplicity * max_occ + end do + end do ! itetra + end do + + ! Rescale weights + select case(tetra%opt) + case(1) + do ik_ibz=1,tetra%nkibz + dweight(:,ik_ibz) = dweight(:,ik_ibz) * tetra%ibz_multiplicity(ik_ibz) / tetra%tetra_total(ik_ibz) / tetra%nkbz + tweight(:,ik_ibz) = tweight(:,ik_ibz) * tetra%ibz_multiplicity(ik_ibz) / tetra%tetra_total(ik_ibz) / tetra%nkbz + end do + case(2) + dweight = dweight*tetra%vv / 4.0_dp + tweight = tweight*tetra%vv / 4.0_dp + end select + + call xmpi_sum(dweight, comm, ierr) + call xmpi_sum(tweight, comm, ierr) + +end subroutine htetra_wvals_weights +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_htetra/htetra_wvals_weights_delta +!! NAME +!! htetra_wvals_weights_delta +!! +!! FUNCTION +!! Same as above but computing only delta for performance and memory +!! HM: Should find a clean way to avoid copy paste routine +!! +!! SOURCE + +subroutine htetra_wvals_weights_delta(tetra, eig_ibz, nw, wvals, max_occ, nkpt, opt, dweight, comm) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: nw, nkpt, opt, comm + class(htetra_t), intent(in) :: tetra + real(dp),intent(in) :: max_occ +!arrays + real(dp),intent(in) :: eig_ibz(nkpt), wvals(nw) + real(dp),intent(out) :: dweight(nw, nkpt) + +!Local variables------------------------------- +!scalars + integer :: ik_ibz,multiplicity,nprocs,my_rank,ierr + integer :: tetra_count, itetra, isummit, ihash +!arrays + integer :: ind_ibz(4) + real(dp) :: eig(4), dweight_tmp(4,nw),tweight_tmp(4,nw) + +! ********************************************************************* + + dweight = zero + nprocs = xmpi_comm_size(comm); my_rank = xmpi_comm_rank(comm) + + ! For each bucket of tetrahedra + do ihash=1,tetra%nbuckets + if (mod(ihash, nprocs) /= my_rank) cycle + + ! For each tetrahedron + tetra_count = size(tetra%unique_tetra(ihash)%indexes, dim=2) + do itetra=1,tetra_count + + ! Get mapping of each summit to eig_ibz + do isummit=1,4 + ind_ibz(isummit) = tetra%unique_tetra(ihash)%indexes(isummit,itetra) + eig(isummit) = eig_ibz(ind_ibz(isummit)) + end do + + ! Sort energies before calling get_onetetra_blochl + call sort_4tetra(eig, ind_ibz) + + ! Get tetrahedron weights + select case (opt) + case(0:1) + call get_onetetra_blochl(eig, wvals, nw, opt, tweight_tmp, dweight_tmp) + case(2) + call get_onetetetra_lambinvigneron_imag(eig, wvals, nw, dweight_tmp) + end select + + ! Acumulate the contributions + multiplicity = tetra%unique_tetra(ihash)%indexes(0,itetra) + do isummit=1,4 + ik_ibz = ind_ibz(isummit) + dweight(:,ik_ibz) = dweight(:,ik_ibz) + dweight_tmp(isummit,:)*multiplicity*max_occ + end do + end do ! itetra + end do + + ! Rescale weights + select case(tetra%opt) + case(1) + do ik_ibz=1,tetra%nkibz + dweight(:,ik_ibz) = dweight(:,ik_ibz) * tetra%ibz_multiplicity(ik_ibz) / tetra%tetra_total(ik_ibz) / tetra%nkbz + end do + case(2) + dweight = dweight * tetra%vv / 4.0_dp + end select + + call xmpi_sum(dweight, comm, ierr) + +end subroutine htetra_wvals_weights_delta +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_htetra/htetra_blochl_weights +!! NAME +!! htetra_blochl_weights +!! +!! FUNCTION +!! Emulates the behaviour of the previous tetrahedron implementation. +!! IBZ weights are included. +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +subroutine htetra_blochl_weights(tetra, eig_ibz, enemin, enemax, max_occ, nw, nkpt, bcorr, tweight, dweight, comm) + +!Arguments ------------------------------------ +!scalars + class(htetra_t), intent(in) :: tetra + integer,intent(in) :: nw,nkpt, bcorr, comm + real(dp) ,intent(in) :: enemax, enemin, max_occ +!arrays + real(dp) ,intent(in) :: eig_ibz(nkpt) + real(dp) ,intent(out) :: dweight(nw,nkpt), tweight(nw,nkpt) + +!Local variables------------------------------- + real(dp) :: wvals(nw) + +! ********************************************************************* + + wvals = linspace(enemin, enemax, nw) + call htetra_wvals_weights(tetra,eig_ibz,nw,wvals,max_occ,nkpt,bcorr,tweight,dweight,comm) + +end subroutine htetra_blochl_weights +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_htetra/htetra_blochl_weights_wvals_zinv +!! NAME +!! htetra_blochl_weights_wvals_zinv +!! +!! FUNCTION +!! The same as htetra_get_onewk_wvals_zinv but looping over tetrahedra +!! which is more efficient +!! +!! INPUTS +!! nz: Number of frequencies +!! zvals(nw): z-values +!! max_occ=maximal occupation number (2 for nsppol=1, 1 for nsppol=2) +!! nkpt=number of irreducible kpoints +!! zinv_opt: +!! 1 for S. Kaprzyk routines, +!! 2 for Lambin-Vigneron. +!! [erange(2)]: if present, weights are computed with a standard quadrature method if +!! real(z) is outside of this interval and with tetra if inside. +!! comm=MPI communicator +!! +!! OUTPUT +!! +!! SOURCE + +subroutine htetra_weights_wvals_zinv(tetra, eig_ibz, nz, zvals, max_occ, nkpt, zinv_opt, cweight, comm, erange) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: nz, nkpt, zinv_opt, comm + class(htetra_t), intent(in) :: tetra + real(dp) ,intent(in) :: max_occ +!arrays + real(dp),intent(in) :: eig_ibz(nkpt) + real(dp),optional,intent(in) :: erange(2) + complex(dp),intent(in) :: zvals(nz) + complex(dp),intent(out) :: cweight(nz, nkpt) + +!Local variables------------------------------- +!scalars + integer :: ik_ibz, iz, multiplicity, nprocs, my_rank, ierr, ii, jj, kk, esumk + integer :: tetra_count, itetra, isummit, ihash +!arrays + integer :: ind_ibz(4) + real(dp) :: eig(4), my_erange(2) + complex(dp) :: cw(4), verli(4), verm(4), aw(4), bw(4) !, cw_lw(4) + real(dp) :: rwg(nz, 4) +! ********************************************************************* + + nprocs = xmpi_comm_size(comm); my_rank = xmpi_comm_rank(comm) + cweight = zero + + my_erange = [-huge(one), huge(one)]; if (present(erange)) my_erange = erange + + ! For each bucket of tetrahedra + do ihash=1,tetra%nbuckets + if (mod(ihash, nprocs) /= my_rank) cycle + + ! For each tetrahedron that belongs to this k-point + tetra_count = size(tetra%unique_tetra(ihash)%indexes, dim=2) + do itetra=1,tetra_count + + ! Get mapping of each summit to eig_ibz + do isummit=1,4 + ind_ibz(isummit) = tetra%unique_tetra(ihash)%indexes(isummit, itetra) + eig(isummit) = eig_ibz(ind_ibz(isummit)) + end do + + ! Get multiplicity + multiplicity = tetra%unique_tetra(ihash)%indexes(0, itetra) + + ! Sort energies before calling get_onetetra_lambinvigneron + ! SIM0TWOI does not require sorted energies but since we call the routine + ! to fix get_onetetra_lambinvigneron we need to sort here. + call sort_4tetra(eig, ind_ibz) + +if (zinv_opt == 1) then + ! Loop over frequencies + do iz=1,nz + + ! Get tetrahedron weights + if (real(zvals(iz)) >= my_erange(1) .and. real(zvals(iz)) <= my_erange(2)) then + + select case(zinv_opt) + case(1) + verm = zvals(iz) - eig + call SIM0TWOI(cw, VERLI, VERM) + + !call get_onetetra_lambinvigneron(eig, zvals(iz), cw_lw) + !if (any(abs(real(cw_lw(:)) / (real(cw(:)))) > 1.1)) then + ! do ierr=1,4 + ! !write(std_out, *) "simte vs lw:", cw(ierr), cw_lw(ierr) + ! write(std_out, *) "cw_lw / (simtet)", cw_lw(ierr) / (cw(ierr)) + ! end do + !end if + + case(2) + call get_onetetra_lambinvigneron(eig, zvals(iz), cw) + end select + + else + ! Use asymptotic expansion of integral for large z. + aw = (eig + sum(eig)) / five + do ii=1,4 + bw(ii) = zero + do jj=1,4 + if (jj == ii) cycle + esumk = zero + do kk=1,4 + if (kk == jj) cycle + esumk = esumk + (eig(kk) - eig(jj)) ** 2 + end do + bw(ii) = bw(ii) + three * (eig(jj) - eig(ii)) ** 2 + esumk + end do + end do + bw = bw / 300_dp + cw = one / (zvals(iz) - aw - bw / zvals(iz)) / four + !This for naive integration + !cw = (one / (zvals(iz) - eig)) / four + end if + + ! Accumulate contributions + do isummit=1,4 + ik_ibz = ind_ibz(isummit) + cweight(iz, ik_ibz) = cweight(iz, ik_ibz) + cw(isummit) * multiplicity * max_occ + end do + + end do ! iz + +else + call get_onetetra_ppart_lv(nz, real(zvals), eig, rwg) + + do iz=1,nz + ! Accumulate contributions + do isummit=1,4 + ik_ibz = ind_ibz(isummit) + cweight(iz, ik_ibz) = cweight(iz, ik_ibz) + rwg(iz, isummit) * multiplicity * max_occ + end do + end do +endif + + end do ! itetra + end do + + ! Rescale weights + select case(tetra%opt) + case(1) + do ik_ibz=1,tetra%nkibz + cweight(:,ik_ibz) = cweight(:,ik_ibz) * tetra%ibz_multiplicity(ik_ibz) / tetra%nkbz / tetra%tetra_total(ik_ibz) + end do + case(2) + cweight = cweight * tetra%vv + end select + + call xmpi_sum(cweight, comm, ierr) + +end subroutine htetra_weights_wvals_zinv +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_htetra/sort_4tetra +!! NAME +!! sort_4tetra +!! +!! FUNCTION +!! Sort double precision array list(4) into ascending numerical order +!! while making corresponding rearrangement of the integer array iperm. +!! +!! Taken from: https://stackoverflow.com/questions/6145364/sort-4-number-with-few-comparisons +!! +!! INPUTS +!! list(4) intent(inout) list of double precision numbers to be sorted +!! perm(4) intent(inout) iperm(i)=i (very important) +!! +!! OUTPUT +!! list(4) sorted list +!! perm(4) index of permutation given the right ascending order +!! +!! SOURCE + +pure subroutine sort_4tetra(list, perm) + + integer, intent(inout) :: perm(4) + real(dp), intent(inout) :: list(4) + +!Local variables------------------------------- + integer :: ia,ib,ic,id,ilow1,ilow2,ihigh1,ihigh2 + integer :: ilowest,ihighest,imiddle1,imiddle2 + real(dp) :: va,vb,vc,vd,vlow1,vlow2,vhigh1,vhigh2 + real(dp) :: vlowest,vhighest,vmiddle1,vmiddle2 + + va = list(1); ia = perm(1) + vb = list(2); ib = perm(2) + vc = list(3); ic = perm(3) + vd = list(4); id = perm(4) + + if (va < vb) then + vlow1 = va; vhigh1 = vb + ilow1 = ia; ihigh1 = ib + else + vlow1 = vb; vhigh1 = va + ilow1 = ib; ihigh1 = ia + endif + + if (vc < vd) then + vlow2 = vc; vhigh2 = vd + ilow2 = ic; ihigh2 = id + else + vlow2 = vd; vhigh2 = vc + ilow2 = id; ihigh2 = ic + endif + + if (vlow1 < vlow2) then + vlowest = vlow1; vmiddle1 = vlow2 + ilowest = ilow1; imiddle1 = ilow2 + else + vlowest = vlow2; vmiddle1 = vlow1 + ilowest = ilow2; imiddle1 = ilow1 + endif + + if (vhigh1 > vhigh2) then + vhighest = vhigh1; vmiddle2 = vhigh2 + ihighest = ihigh1; imiddle2 = ihigh2 + else + vhighest = vhigh2; vmiddle2 = vhigh1 + ihighest = ihigh2; imiddle2 = ihigh1 + endif + + if (vmiddle1 < vmiddle2) then + list = [vlowest, vmiddle1, vmiddle2, vhighest] + perm = [ilowest, imiddle1, imiddle2, ihighest] + else + list = [vlowest, vmiddle2, vmiddle1, vhighest] + perm = [ilowest, imiddle2, imiddle1, ihighest] + endif + +end subroutine sort_4tetra +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_numeric_tools/sort_4tetra_int +!! NAME +!! sort_4tetra_int +!! +!! FUNCTION +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +pure subroutine sort_4tetra_int(list) + + integer, intent(inout) :: list(4) + +!Local variables------------------------------- + integer :: va,vb,vc,vd, vlow1,vlow2,vhigh1,vhigh2 + integer :: vlowest,vhighest, vmiddle1,vmiddle2 + + va = list(1) + vb = list(2) + vc = list(3) + vd = list(4) + + if (va < vb) then + vlow1 = va; vhigh1 = vb + else + vlow1 = vb; vhigh1 = va + endif + + if (vc < vd) then + vlow2 = vc; vhigh2 = vd + else + vlow2 = vd; vhigh2 = vc + endif + + if (vlow1 < vlow2) then + vlowest = vlow1; vmiddle1 = vlow2 + else + vlowest = vlow2; vmiddle1 = vlow1 + endif + + if (vhigh1 > vhigh2) then + vhighest = vhigh1; vmiddle2 = vhigh2 + else + vhighest = vhigh2; vmiddle2 = vhigh1 + endif + + if (vmiddle1 < vmiddle2) then + list = [vlowest, vmiddle1, vmiddle2, vhighest] + else + list = [vlowest, vmiddle2, vmiddle1, vhighest] + endif + +end subroutine sort_4tetra_int +!!*** + +!!****f* m_htetra/get_onetetra_ppart_lv +!! NAME +!! get_onetetra_ppart_lv +!! +!! FUNCTION +!! Compute the complex weights according to: P. Lambin and J.P. Vigneron, Phys. Rev. B 29, 3430 (1984) +!! +!! INPUTS +!! nw +!! wvals: energy to evaluate the weights at +!! eig: eigenvalues at the corners of the tetrahedron +!! +!! OUTPUT +!! rwg(nw, 4) +!! +!! SOURCE + +pure subroutine get_onetetra_ppart_lv(nw, wvals, eig, rwg) + + integer,intent(in) :: nw + real(dp), intent(in) :: wvals(nw), eig(4) + real(dp), intent(out) :: rwg(nw, 4) + +!Local variables------------------------------- + integer :: ii, iw !jj, + real(dp),parameter :: tol = tol14 + !real(dp),parameter :: tol = tol20 + !real(dp),parameter :: tol = tol30 + real(dp) :: D12,D13,D14,D23,D24,D34 + real(dp) :: e10, e20, e30, e31, e32, e21 + real(dp) :: inv_e10, inv_e21, inv_e20, inv_e30, inv_e31, inv_e32 + real(dp) :: E0(nw), E1(nw), E2(nw), E3(nw) + +! ********************************************************************* + + ! Then the energy differences, for the coefficients. Must always be positive, I hope. + D12 = eig(2) - eig(1) + D13 = eig(3) - eig(1) + D14 = eig(4) - eig(1) + D23 = eig(3) - eig(2) + D24 = eig(4) - eig(2) + D34 = eig(4) - eig(3) + + ! Now get the actual weights + ! Notations + ! eij = e_i - e_j + ! Ej = E - e_j + + e10 = huge(one); e20 = huge(one); e30 = huge(one); + e31 = huge(one); e32 = huge(one); e21 = huge(one) + inv_e10 = huge(one); inv_e21 = huge(one); inv_e20 = huge(one) + inv_e30 = huge(one); inv_e31 = huge(one); inv_e32 = huge(one) + + E0 = wvals(:) - eig(1) + E1 = wvals(:) - eig(2) + E2 = wvals(:) - eig(3) + E3 = wvals(:) - eig(4) + +#if 0 + where (abs(E0) < tol1) + E0 = tol1 + end where + where (abs(E1) < tol1) + E1 = tol1 + end where + where (abs(E2) < tol1) + E2 = tol1 + end where + where (abs(E3) < tol1) + E3 = tol1 + end where +#endif + + ! e1=e2=e3=e4 + if (D12 + D23 + D34 < tol) then + do ii=1,4 + !rwg(:, ii) = 0.25_dp / (wvals - eig(ii)) + rwg(:, ii) = 0.25_dp / E0 + end do + + ! e2=e3=e4 + else if (D23 + D34 < tol) then + e10 = eig(2) - eig(1); inv_e10 = one / e10 + + do iw=1,nw + rwg(iw, 1) = & + three * E0(iw)**2 * E1(iw) * inv_e10**4 * log(abs(E1(iw) / E0(iw))) & + + 1.5_dp * E1(iw) * (two * E0(iw) + e10) * inv_e10**3 + inv_e10 + end do + + do iw=1,nw + rwg(iw, 2) = & + E0(iw) ** 3 * inv_e10**4 * log(abs(E0(iw) / E1(iw))) & + - (six * E0(iw)**2 + three * E0(iw) * e10 + two * e10**2) * inv_e10**3 / six + end do + rwg(:,3) = rwg(:,2) + rwg(:,4) = rwg(:,2) + + !rwg = zero + + ! e1=e2=e3 + else if (D12 + D23 < tol) then + + e30 = eig(4) - eig(1); inv_e30 = one / e30 + + do iw=1,nw + rwg(iw, 1) = & + E3(iw)**3 * inv_e30**4 * log(abs(E3(iw) / E0(iw))) & + + (six * E3(iw)**2 - three * E3(iw) * e30 + two * e30**2) * inv_e30**3 / six + end do + rwg(:,2) = rwg(:,1) + rwg(:,3) = rwg(:,1) + + do iw=1,nw + rwg(iw, 4) = & + three * E0(iw) * E3(iw)**2 * inv_e30**4 * log(abs(E0(iw) / E3(iw))) & + - 1.5_dp * E0(iw) * (two * E3(iw) - e30) * inv_e30**3 - inv_e30 + end do + + !rwg = zero + + ! e1=e2 < e3=e4 + else if (D12 + D34 < tol) then + + e20 = eig(3) - eig(1); inv_e20 = one / e20 + + do iw=1,nw + rwg(iw, 1) = & + three * E0(iw) * E2(iw)**2 * inv_e20**4 * log(abs(E0(iw) / E2(iw))) & + - 1.5_dp * E0(iw) * (two * E2(iw) - e20) * inv_e20**3 - inv_e20 + end do + rwg(:,2) = rwg(:,1) + + do iw=1,nw + rwg(iw, 3) = & + three * E0(iw)** 2 * E2(iw) * inv_e20**4 * log(abs(E2(iw) / E0(iw))) & + + 1.5_dp * E2(iw) * (two * E0(iw) + e20) * inv_e20**3 + inv_e20 + end do + rwg(:,4) = rwg(:,3) + + !rwg = zero + + ! e3=e4 + else if (D34 < tol) then + + e10 = eig(2) - eig(1); inv_e10 = one / e10 + e20 = eig(3) - eig(1); inv_e20 = one / e20 + e21 = eig(3) - eig(2); inv_e21 = one / e21 + + do iw=1,nw + rwg(iw, 1) = & + E0(iw)**2 * inv_e20**2 * inv_e10 & + * (one + (-two * E2(iw) * inv_e20 - E1(iw) * inv_e10) * log(abs(E0(iw)))) & + - E2(iw)**2 * inv_e20**2 * inv_e21 & + * (one + (two * E0(iw) * inv_e20 + E1(iw) * inv_e21) * log(abs(E2(iw)))) & + + E1(iw)**3 * inv_e10**2 * inv_e21**2 * log(abs(E1(iw))) + end do + + do iw=1,nw + rwg(iw, 2) = & + -E1(iw)**2 * inv_e21**2 * inv_e10 & + * (one + (-two * E2(iw) * inv_e21 + E0(iw) * inv_e10) * log(abs(E1(iw)))) & + - E2(iw)**2 * inv_e21**2 * inv_e20 & + * (one + (two * E1(iw) * inv_e21 + E0(iw) * inv_e20) * log(abs(E2(iw)))) & + + E0(iw)**3 * inv_e10**2 * inv_e20**2 * log(abs(E0(iw))) + end do + + do iw=1,nw + rwg(iw, 3) = & + +E0(iw)**3 * inv_e10 * inv_e20**3 * log(abs(E0(iw))) & + -E1(iw)**3 * inv_e10 * inv_e21**3 * log(abs(E1(iw))) & + +E2(iw) * inv_e20 * inv_e21 & + * (half + E0(iw) * inv_e20 + E1(iw) * inv_e21 & + +(E0(iw)**2 * inv_e20**2 + E1(iw)**2 * inv_e21**2 + & + E0(iw) * E1(iw) * inv_e20 * inv_e21) * log(abs(E2(iw)))) + end do + + rwg(:,4) = rwg(:,3) + + !rwg = zero + + ! e2=e3 + else if (D23 < tol) then + + e10 = eig(2) - eig(1); inv_e10 = one / e10 + e30 = eig(4) - eig(1); inv_e30 = one / e30 + e31 = eig(4) - eig(2); inv_e31 = one / e31 + + do iw=1,nw + rwg(iw, 1) = & + E0(iw)**2 * inv_e10**2 * inv_e30 & + * (one - (two * E1(iw) * inv_e10 + E3(iw) * inv_e30) * log(abs(E0(iw)))) & + + E1(iw)**2 * inv_e10**2 * inv_e31 & + * (one + (+two * E0(iw) * inv_e10 - E3(iw) * inv_e31) * log(abs(E1(iw)))) & + + E3(iw)**3 * inv_e30**2 * inv_e31**2 * log(abs(E3(iw))) + end do + + do iw=1,nw + rwg(iw, 2) = & + E0(iw)**3 * inv_e30 * inv_e10**3 * log(abs(E0(iw))) & + + E3(iw)**3 * inv_e30 * inv_e31**3 * log(abs(E3(iw))) & + - E1(iw) * inv_e10 * inv_e31 & + * (half + E0(iw) * inv_e10 - E3(iw) * inv_e31 + & + (E0(iw)**2 * inv_e10**2 + E3(iw)**2 * inv_e31**2 - E0(iw) * E3(iw) * inv_e10 * inv_e31) * log(abs(E1(iw)))) + end do + rwg(:,3) = rwg(:,2) + + do iw=1,nw + rwg(iw, 4) = & + -E3(iw)**2 * inv_e31**2 * inv_e30 & + * (one + (two * E1(iw) * inv_e31 + E0(iw) * inv_e30) * log(abs(E3(iw)))) & + - E1(iw)**2 * inv_e31**2 * inv_e10 & + * (one + (-two * E3(iw) * inv_e31 + E0(iw) * inv_e10) * log(abs(E1(iw)))) & + + E0(iw)**3 * inv_e30**2 * inv_e10**2 * log(abs(E0(iw))) + end do + + !rwg = zero + + ! e1=e2 + else if (D12 < tol) then + + e20 = eig(3) - eig(1); inv_e20 = one / e20 + e30 = eig(4) - eig(1); inv_e30 = one / e30 + e32 = eig(4) - eig(3); inv_e32 = one / e32 + + do iw=1,nw + rwg(iw, 1) = & + -E2(iw)**3 * inv_e32 * inv_e20**3 * log(abs(E2(iw))) & + + E3(iw)**3 * inv_e32 * inv_e30**3 * log(abs(E3(iw))) & + + E0(iw) * inv_e20 * inv_e30 & + * (half - E2(iw) * inv_e20 - E3(iw) * inv_e30 + & + (E2(iw)**2 * inv_e20**2 + E3(iw)**2 * inv_e30**2 + E2(iw) * E3(iw) * inv_e20 * inv_e30) * log(abs(E0(iw)))) + end do + rwg(:,2) = rwg(:,1) + + do iw=1,nw + rwg(iw, 3) = & + E2(iw)**2 * inv_e20**2 * inv_e32 & + * (one + (two * E0(iw) * inv_e20 - E3(iw) * inv_e32) * log(abs(E2(iw)))) & + + E0(iw)**2 * inv_e20**2 * inv_e30 & + * (one - (two * E2(iw) * inv_e20 + E3(iw) * inv_e30) * log(abs(E0(iw)))) & + + (E3(iw)**3 * inv_e32**2 * inv_e30**2 * log(abs(E3(iw)))) + end do + ! This was wrong due to a misplaced parantes + !rwg(:,3) = zero + + do iw=1,nw + rwg(iw, 4) = & + -E3(iw)**2 * inv_e30**2 * inv_e32 & + * (one + (two * E0(iw) * inv_e30 + E2(iw) * inv_e32) * log(abs(E3(iw)))) & + + E0(iw)**2 * inv_e30**2 * inv_e20 & + * (one - (two * E3(iw) * inv_e30 + E2(iw) * inv_e20) * log(abs(E0(iw)))) & + + (E2(iw)**3 * inv_e32**2 * inv_e20**2 * log(abs(E2(iw)))) + end do + + !rwg = zero + + ! e1 points + new%max_npoints = max_npoints + ids = [(ii,ii=1,npoints)] + new%first = octree_node_build(new,new%lo,new%hi,npoints,ids) + + end function octree_init + + type(octree_node_t) recursive function octree_node_build(octree,lo,hi,nids,ids) result (new) + type(octree_t),intent(in) :: octree + integer,intent(in) :: nids + integer,intent(in) :: ids(nids) + integer :: id, counter, ioctant, ipoint + integer :: octants(nids) + integer :: new_ids(nids) + real(dp) :: lo(3), hi(3), new_lo(3), new_hi(3) + + ! check if this is a leaf node + if (nids octree%first + lo = octree%lo + hi = octree%hi + + !check if the point is inside the initial box + trial_dist = box_dist(lo,hi,point) + if (trial_dist>0) then + closest_id = -1 + return + end if + + do + ! if leaf node + if (allocated(octn%ids)) then + do id=1,size(octn%ids) + ipoint = octn%ids(id) + trial_dist = dist_points(octree%points(:,ipoint),point) + if (trial_dist > dist) cycle + dist = trial_dist + closest_id = ipoint + end do + return + end if + ! get octant of this point + ioctant = get_octant_lohi(lo,hi,point) + ! point to this node + octn => octn%childs(ioctant) + ! get lo and hi + call get_lo_hi(lo,hi,lo_out,hi_out,ioctant) + lo = lo_out; hi = hi_out + end do + end function octree_find + + integer function octree_find_nearest(octree,point,dist) result(nearest_id) + ! Find the ids of the points whose distance to point is smaller than max_dist + ! counter is the number of points found so far + type(octree_t),target,intent(in) :: octree + real(dp),intent(in) :: point(3) + real(dp),intent(inout) :: dist + real(dp) :: check_dist + !check if the point is inside the initial box + check_dist = box_dist(octree%lo,octree%hi,point) + if (check_dist>0) then + nearest_id = -1 + return + end if + nearest_id = octn_find_nearest(octree,octree%first,octree%lo,octree%hi,point,dist) + end function octree_find_nearest + + integer recursive function octn_find_nearest(octree,octn,lo,hi,point,min_dist) result(closest_id) + ! find the nearest point by recursion + type(octree_t),intent(in) :: octree + type(octree_node_t),intent(in) :: octn + real(dp),intent(in) :: point(3) + real(dp),intent(in) :: lo(3), hi(3) + real(dp),intent(inout) :: min_dist + real(dp) :: new_lo(3), new_hi(3) + real(dp) :: dist + integer :: id, ioctant, ipoint, trial_id + closest_id = 0 + ! compute distance of point to this box (octant) + dist = box_dist(lo,hi,point) + ! if the distance is bigger than the closest point so far return + if (dist>min_dist) return + ! if this node is a leaf compare point by point + if (allocated(octn%ids)) then + do id=1,size(octn%ids) + ipoint = octn%ids(id) + dist = dist_points(octree%points(:,ipoint),point) + if (dist>min_dist) cycle + min_dist = dist + closest_id = ipoint + end do + return + end if + ! if this is a node then find the nearest for all the childs + do ioctant=1,8 + call get_lo_hi(lo,hi,new_lo,new_hi,ioctant) + trial_id = octn_find_nearest(octree,octn%childs(ioctant),new_lo,new_hi,point,min_dist) + if (trial_id==0) cycle + closest_id = trial_id + end do + end function octn_find_nearest + + integer function octree_find_nearest_pbc(octree,point,dist,shift) result(id) + ! Same as octree find but using periodic boundary conditions + type(octree_t),target,intent(in) :: octree + real(dp),intent(in) :: point(3) + real(dp),intent(inout) :: dist + real(dp),intent(out) :: shift(3) + logical :: found + integer :: trial_id, first_id + integer :: ii,jj,kk + real(dp) :: trial_dist + real(dp) :: first_shift(3), trial_shift(3) + real(dp) :: po(3) + id = 0 + ! bring the point inside the box + po = modulo(point,one) + !po = modulo(point+half,one)-half + ! compute shift + first_shift = po-point + trial_dist = dist + first_id = octn_find_nearest(octree,octree%first,octree%lo,octree%hi,po,trial_dist) + if (first_id>0.and.trial_distdist) cycle + found = .true. + dist = trial_dist + id = trial_id + shift = trial_shift + end do + end do + end do + if (.not.found) shift = first_shift + end function octree_find_nearest_pbc + + integer recursive function octn_free(octn) result(ierr) + type(octree_node_t) :: octn + integer :: ioctant + ! if leaf deallocate ids + if (allocated(octn%ids)) then + ABI_FREE(octn%ids) + else + do ioctant=1,8 + ierr = octn_free(octn%childs(ioctant)) + end do + end if + end function octn_free + + integer function octree_free(octree) result(ierr) + ! Free octree datastructure + type(octree_t),target,intent(in) :: octree + ierr = octn_free(octree%first) + end function octree_free + + pure real(dp) function dist_points(p1,p2) result(dist) + real(dp),intent(in) :: p1(3),p2(3) + dist = pow2(p1(1)-p2(1))+& + pow2(p1(2)-p2(2))+& + pow2(p1(3)-p2(3)) + end function dist_points + + pure logical function box_contains(lo,hi,po) result(inside) + ! Find box that contains point + real(dp),intent(in) :: lo(3), hi(3), po(3) + inside = (po(1)>lo(1).and.po(1)lo(2).and.po(2)lo(3).and.po(3)hi(1)) dist = dist + pow2(po(1)-hi(1)) + if (po(2)hi(2)) dist = dist + pow2(po(2)-hi(2)) + if (po(3)hi(3)) dist = dist + pow2(po(3)-hi(3)) + end function box_dist + + pure real(dp) function pow2(x) result(x2) + real(dp),intent(in) :: x + x2 = x*x + end function pow2 + + pure integer function get_octant(mi,po) result(ioctant) + real(dp),intent(in) :: po(3), mi(3) + integer :: ii,jj,kk + ii = 0; if (po(1)>=mi(1)) ii = 1 + jj = 0; if (po(2)>=mi(2)) jj = 1 + kk = 0; if (po(3)>=mi(3)) kk = 1 + ioctant = ii*4+jj*2+kk+1 + end function get_octant + + pure integer function get_octant_lohi(lo,hi,po) result(ioctant) + real(dp),intent(in) :: lo(3),hi(3),po(3) + real(dp) :: mi(3) + mi = lo+half*(hi-lo) + ioctant = get_octant(mi,po) + end function get_octant_lohi + + pure subroutine get_octants(lo,hi,nids,ids,points,octants) + ! From a list of points return the corresponding octant + real(dp),intent(in) :: lo(3), hi(3) + real(dp),intent(in) :: points(:,:) + integer,intent(in) :: nids + integer,intent(in) :: ids(nids) + integer,intent(out) :: octants(nids) + real(dp) :: mi(3) + integer :: id, ipoint + ! calculate midpoint + mi = lo+half*(hi-lo) + do id=1,nids + ipoint = ids(id) + octants(id) = get_octant(mi,points(:,ipoint)) + end do + end subroutine get_octants + + pure subroutine get_lo_hi(lo_in,hi_in,lo_out,hi_out,ioctant) + ! Subdivide a box in an octant + integer,intent(in) :: ioctant + real(dp),intent(in) :: lo_in(3), hi_in(3) + real(dp),intent(out) :: lo_out(3), hi_out(3) + real(dp) :: de(3) + de = hi_in-lo_in + lo_out = lo_in + shifts(:,1,ioctant)*de + hi_out = lo_in + shifts(:,2,ioctant)*de + end subroutine get_lo_hi + +end module m_octree +!!*** diff --git a/GX-PAW/common/src/29_kpoints/m_octree.o b/GX-PAW/common/src/29_kpoints/m_octree.o new file mode 100644 index 00000000..9ce2fa47 Binary files /dev/null and b/GX-PAW/common/src/29_kpoints/m_octree.o differ diff --git a/GX-PAW/common/src/29_kpoints/m_symkpt.F90 b/GX-PAW/common/src/29_kpoints/m_symkpt.F90 new file mode 100644 index 00000000..0a9d579e --- /dev/null +++ b/GX-PAW/common/src/29_kpoints/m_symkpt.F90 @@ -0,0 +1,863 @@ +!!****m* ABINIT/m_symkpt +!! NAME +!! m_symkpt +!! +!! COPYRIGHT +!! Copyright (C) 1999-2024 ABINIT group (XG,LSI,HM) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! TODO +!! Move it to m_kpts +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" + +module m_symkpt + + use defs_basis + use m_abicore + use m_errors + use m_sort + use m_krank + use m_numeric_tools + use m_time + + use m_fstrings, only : sjoin, itoa + + implicit none + + private +!!*** + + public :: symkpt + public :: symkpt_new + public :: mapkptsets +!!*** + +contains +!!*** + +!!****f* ABINIT/symkpt +!! NAME +!! symkpt +!! +!! FUNCTION +!! Determines the weights of the k-points for sampling the Brillouin Zone, starting from a first set +!! of weights wtk, and folding it to a new set, by taking into account the symmetries described +!! by symrec, and eventually the time-reversal symmetry. +!! Also compute the number of k points in the reduced set +!! This routine is also used for sampling the q vectors in the Brillouin zone for the computation +!! of thermodynamical properties (from the routine thm9). +!! +!! INPUTS +!! chksymbreak= if 1, will check whether the k point grid is symmetric, and stop if not. +!! gmet(3,3)=reciprocal space metric (bohr**-2). +!! iout=if non-zero, output the new number of kpoints on unit iout +!! kbz(3,nkbz)= k vectors in the BZ. +!! nkbz = number of k-points whose weights are wtk +!! nsym=number of space group symmetries +!! symrec(3,3,nsym)=3x3 matrices of the group symmetries (reciprocal space) +!! timrev: if 1, the time reversal operation has to be taken into account +!! if 0, no time reversal symmetry. +!! wtk(nkbz)=weight assigned to each k point. +!! comm=MPI communicator. +!! +!! OUTPUT +!! ibz2bz(nkbz)=non-symmetrized indices of the k-points a.k.a. ibz2bz mapping +!! The correspondence beween the iq_ibz point in IBZ and the iq_bz point in the full BZ is obtained via: +!! +!! do ik_ibz=1,nkibz +!! ik_bz = ibz2bz(ik_ibz) +!! end do +!! +!! nkibz = number of k-points in the irreducible set +!! wtk_folded(nkbz)=weight assigned to each k point, taking into account the symmetries +!! bz2ibz_smap(nkbz, 6)= Mapping BZ --> IBZ. +!! +!! NOTES +!! The decomposition of the symmetry group in its primitives might speed up the execution. +!! The output variables are stored only in the range 1:nkbz +!! +!! TODO +!! Bad scaling wrt nkbz. Should try to MPI parallelize or implement more efficient algorithm +!! +!! SOURCE + +subroutine symkpt(chksymbreak,gmet,ibz2bz,iout,kbz,nkbz,nkibz,nsym,symrec,timrev,wtk,wtk_folded, bz2ibz_smap, comm) + +!Arguments ------------------------------- +!scalars + integer,intent(in) :: chksymbreak,iout,nkbz,nsym,timrev,comm + integer,intent(out) :: nkibz +!arrays + integer,intent(in) :: symrec(3,3,nsym) + integer,intent(inout) :: ibz2bz(nkbz) !vz_i + real(dp),intent(in) :: gmet(3,3),kbz(3,nkbz),wtk(nkbz) + real(dp),intent(out) :: wtk_folded(nkbz) + integer,intent(out) :: bz2ibz_smap(6, nkbz) + +!Local variables ------------------------- +!scalars + integer :: identi,ii,ikpt,ikpt2,ind_ikpt,ind_ikpt2,ierr + integer :: ikpt_current_length,isym,itim,jj,nkpout,quit,tident + real(dp) :: difk,difk1,difk2,difk3,length2trial,reduce,reduce1,reduce2,reduce3 + !real(dp) :: cpu,wall,gflops + character(len=500) :: msg +!arrays + integer,allocatable :: list(:),bz2ibz_idx(:) + real(dp) :: gmetkpt(3),ksym(3) + real(dp),allocatable :: length2(:) + +! ********************************************************************* + + ABI_UNUSED((/comm/)) + +!DEBUG +!write(std_out,*)' symkpt : enter ' +!write(std_out,*)' chksymbreak,iout,nkbz,nsym,timrev,comm=',chksymbreak,iout,nkbz,nsym,timrev,comm +!write(std_out,*)' symrec=',symrec +!do ikpt=1,nkbz +! write(std_out,'(a,i4,3f12.4)' )' ikpt, bz(:,ikpt)=',ikpt,kbz(:,ikpt) +!enddo +!ENDDEBUG + + if (timrev/=1 .and. timrev/=0) then + ABI_BUG(sjoin(' timrev should be 0 or 1, while it is equal to:', itoa(timrev))) + end if + + ! Find the identity symmetry operation + identi = 1 + tident = -1 + if (nsym/=1) then + do isym=1,nsym + tident=1 + do jj=1,3 + if(symrec(jj,jj,isym)/=1)tident=0 + do ii=1,3 + if( ii/=jj .and. symrec(ii,jj,isym)/=0)tident=0 + end do + end do + if(tident==1)then + identi=isym + !call wrtout(std_out, sjoin(' symkpt: found identity, with number: ',itoa(identi))) + exit + end if + end do + ABI_CHECK(tident == 1, 'Did not find the identity operation') + end if + + ! Initialise the wtk_folded array using the wtk array + do ikpt=1,nkbz + wtk_folded(ikpt)=wtk(ikpt) + end do + + ! Initialize bz2ibz_smap + bz2ibz_smap = 0 + do ikpt=1,nkbz + bz2ibz_smap(1, ikpt) = ikpt + bz2ibz_smap(2, ikpt) = 1 + end do + + ! Here begins the serious business + + ! If there is some possibility for a change (otherwise, wtk_folded is correctly initialized to give no change) + if(nkbz/=1 .and. (nsym/=1 .or. timrev==1) )then + !call cwtime(cpu, wall, gflops, "start") + + ! Store the length of vectors, but take into account umklapp + ! processes by selecting the smallest length of all symmetric vectors + ABI_MALLOC(length2,(nkbz)) + + do ikpt=1,nkbz + do isym=1,nsym + do itim=1,(1-2*timrev),-2 + ! Get the symmetric of the vector + do ii=1,3 + ksym(ii)=itim*( kbz(1,ikpt)*symrec(ii,1,isym)& + +kbz(2,ikpt)*symrec(ii,2,isym)& + +kbz(3,ikpt)*symrec(ii,3,isym) ) + ksym(ii)=ksym(ii)-anint(ksym(ii)+tol8*half) + end do + gmetkpt(:)=gmet(:,1)*ksym(1)+gmet(:,2)*ksym(2)+gmet(:,3)*ksym(3) + length2trial=ksym(1)*gmetkpt(1)+ksym(2)*gmetkpt(2)+ksym(3)*gmetkpt(3) + if(isym==1 .and. itim==1)then + length2(ikpt)=length2trial + else + if(length2(ikpt)>length2trial)length2(ikpt)=length2trial + end if + end do + end do + end do + + !call cwtime_report("symkpt: length", cpu, wall, gflops) + + ! Sort the lengths + ABI_MALLOC(list,(nkbz)) + list(:)=(/ (ikpt,ikpt=1,nkbz) /) + call sort_dp(nkbz,length2,list,tol14) + ! do ikpt=1,nkbz; write(std_out,*)ikpt,length2(ikpt),list(ikpt),kbz(1:3,list(ikpt)); end do + + !call cwtime_report("symkpt: sort", cpu, wall, gflops) + + ! Examine whether the k point grid is symmetric or not + ! This check scales badly with nkbz hence it's disabled for dense meshes. + if (chksymbreak == 1 .and. nkbz < 40**3) then + ikpt_current_length=1 + ! Loop on all k points + do ikpt=1,nkbz + ind_ikpt=list(ikpt) + ! Keep track of the current length, to avoid doing needless comparisons + if(length2(ikpt)-length2(ikpt_current_length)>tol8) ikpt_current_length=ikpt + + do isym=1,nsym + do itim=1,(1-2*timrev),-2 + if(isym/=identi .or. itim/=1 )then + ! Get the symmetric of the vector + do ii=1,3 + ksym(ii)=itim*( kbz(1,ind_ikpt)*symrec(ii,1,isym)& + +kbz(2,ind_ikpt)*symrec(ii,2,isym)& + +kbz(3,ind_ikpt)*symrec(ii,3,isym) ) + end do + + ! Search over k-points with the same length, to find whether there is a connecting symmetry operation + quit=0 + do ikpt2=ikpt_current_length,nkbz + ! The next line skip all ikpt2 vectors, as soon as one becomes larger than length2(ikpt) + ! Indeed, one is already supposed to have found a symmetric k point before this happens ... + if(length2(ikpt2)-length2(ikpt)>tol8)exit + ! Ordered index + ind_ikpt2=list(ikpt2) + difk1= ksym(1)-kbz(1,ind_ikpt2) + reduce1=difk1-anint(difk1) + difk2= ksym(2)-kbz(2,ind_ikpt2) + reduce2=difk2-anint(difk2) + difk3= ksym(3)-kbz(3,ind_ikpt2) + reduce3=difk3-anint(difk3) + if (abs(reduce1)+abs(reduce2)+abs(reduce3) < tol8) then + ! The symmetric was found + quit=1; exit + end if + end do + + if (quit == 0) then + write(msg,'(3a,i0,2a,9(i0,1x),2a,i0,1a,3es16.6,6a)' )& + 'Chksymbreak = 1. It has been observed that the k point grid is not symmetric:',ch10,& + 'for the symmetry number: ',isym,ch10,& + 'with symrec= ',symrec(1:3,1:3,isym),ch10,& + 'the symmetric of the k point number: ',ind_ikpt2,' with components: ', kbz(1:3,ind_ikpt2),ch10,& + 'does not belong to the k point grid.',ch10,& + 'Read the description of the input variable chksymbreak,',ch10,& + 'You might switch it to zero, or change your k point grid to one that is symmetric.' + ABI_ERROR(msg) + end if + + end if ! End condition of non-identity symmetry + end do ! itim + end do ! isym + + end do ! ikpt + end if ! chksymbreak==1 + + ! Eliminate the k points that are symmetric of another one + do ikpt=1,nkbz-1 + ! Ordered index + ind_ikpt=list(ikpt) + + ! Not worth to examine a k point that is a symmetric of another, + ! which is the case if its weight has been set to 0 by previous folding + if (wtk_folded(ind_ikpt) < tol16) cycle + + ! Loop on the remaining k-points + do ikpt2=ikpt+1,nkbz + + ! The next line eliminates pairs of vectors that differs by their length. + ! Moreover, since the list is ordered according to the length, + ! one can skip all other ikpt2 vectors, as soon as one becomes larger than length2(ikpt) + if (length2(ikpt2) - length2(ikpt) > tol8) exit + + ! Ordered index + ind_ikpt2=list(ikpt2) + + ! If the second vector is already empty, no interest to treat it + if (wtk_folded(ind_ikpt2) < tol16) cycle + + quit = 0 + ! MG Dec 16 2018, Invert isym, itim loop to be consistent with listkk and GW routines + ! Should always use this convention when applying symmetry operations in k-space. + ! TODO: Postponed to v9 because it won't be possible to read old WFK files. + do isym=1,nsym + do itim=1,(1-2*timrev),-2 + if (isym/=identi .or. itim/=1) then + ! Get the symmetric of the vector + do ii=1,3 + ksym(ii)=itim*( kbz(1,ind_ikpt)*symrec(ii,1,isym) & + +kbz(2,ind_ikpt)*symrec(ii,2,isym)& + +kbz(3,ind_ikpt)*symrec(ii,3,isym) ) + end do + + ! The do-loop was expanded to speed up the execution + difk= ksym(1)-kbz(1,ind_ikpt2) + reduce=difk-anint(difk) + if (abs(reduce)>tol8) cycle + difk= ksym(2)-kbz(2,ind_ikpt2) + reduce=difk-anint(difk) + if (abs(reduce)>tol8) cycle + difk= ksym(3)-kbz(3,ind_ikpt2) + reduce=difk-anint(difk) + if (abs(reduce)>tol8) cycle + + ! Here, have successfully found a symmetrical k-vector + ! Assign all the weight of the k-vector to its symmetrical + wtk_folded(ind_ikpt) = wtk_folded(ind_ikpt) + wtk_folded(ind_ikpt2) + wtk_folded(ind_ikpt2) = zero + + ! Fill entries following listkk convention. + ! Note however that here we always use symrec whereas listkk uses symrel^T by default + ! so pay attention when using these tables to symmetrize wavefunctions. + bz2ibz_smap(1, ind_ikpt2) = ind_ikpt + bz2ibz_smap(2, ind_ikpt2) = isym + ! Compute difference with respect to kpt2, modulo a lattice vector + ! Sk1 + G0 = k2 + bz2ibz_smap(3:5, ind_ikpt2) = nint(-ksym(:) + kbz(:, ind_ikpt2) + tol12) + ii = 0; if (itim == -1) ii = 1 + bz2ibz_smap(6, ind_ikpt2) = ii + + ! Go to the next ikpt2 if the symmetric was found + quit = 1; exit + end if ! End condition of non-identity symmetry + end do ! isym + if (quit == 1) exit + end do ! itim + + end do ! ikpt2 + end do ! ikpt + + ABI_FREE(length2) + ABI_FREE(list) + !call cwtime_report("symkpt: loop", cpu, wall, gflops) + end if ! End check on possibility of change + + ! Create the indexing array ibz2bz + ABI_MALLOC(bz2ibz_idx, (nkbz)) + bz2ibz_idx = 0 + nkibz = 0 + do ikpt=1,nkbz + if (wtk_folded(ikpt) > tol8) then + nkibz = nkibz+1 + ibz2bz(nkibz) = ikpt + bz2ibz_idx(ikpt) = nkibz + end if + end do + + ! bz2ibz_smap stores the index in the BZ. Here we replace the BZ index with the IBZ index. + ierr = 0 + do ikpt=1,nkbz + ind_ikpt = bz2ibz_idx(bz2ibz_smap(1, ikpt)) + if (ind_ikpt /= 0) then + bz2ibz_smap(1, ikpt) = ind_ikpt + else + ierr = ierr + 1 + end if + end do + ABI_CHECK(ierr == 0, "Error while remapping bz2ibz_smap array") + + ABI_FREE(bz2ibz_idx) + + if(iout/=0)then + if(nkbz/=nkibz)then + write(msg, '(a,a,a,i6,a)' )& + ' symkpt : the number of k-points, thanks to the symmetries,',ch10,' is reduced to',nkibz,' .' + call wrtout(iout,msg) + if(iout/=std_out) call wrtout(std_out,msg) + + nkpout=nkibz + !if (nkibz>80) then + ! call wrtout(std_out,' greater than 80, so only write 20 of them ') + ! nkpout=20 + !end if + !do ii=1,nkpout + ! write(msg, '(1x,i2,a2,3es16.8)' ) ii,') ',kbz(1:3,ibz2bz(ii)) + ! call wrtout(std_out,msg) + !end do + + !DEBUG + !call wrtout(std_out,' Here are the new weights :') + !do ikpt=1,nkbz,6 + ! write(msg, '(6f12.6)' ) wtk_folded(ikpt:min(nkbz,ikpt+5)) + ! call wrtout(std_out,msg) + !end do + !ENDDEBUG + else + write(msg, '(a)' )' symkpt : not enough symmetry to change the number of k points.' + call wrtout(iout,msg) + if (iout/=std_out) call wrtout(std_out,msg) + end if + end if + +end subroutine symkpt +!!*** + +!---------------------------------------------------------------------- + +!!****f* ABINIT/symkpt_new +!! NAME +!! symkpt_new +!! +!! FUNCTION +!! Same routine as above but with an algorithm with better scalling than before. +!! From a few tests it produces the same IBZ as before but avoids computing the lengths and sorting. +!! Instead it uses the krank datatype to map k-points onto each other. +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +subroutine symkpt_new(chksymbreak,gmet,ibz2bz,iout,kbz,nkbz,nkibz,nsym,symrec,timrev,bz2ibz_smap, comm) + +!Arguments ------------------------------- +!scalars + integer,intent(in) :: chksymbreak,iout,nkbz,nsym,timrev,comm + integer,intent(out) :: nkibz +!arrays + integer,intent(in) :: symrec(3,3,nsym) + integer,intent(out) :: ibz2bz(nkbz) + real(dp),intent(in) :: gmet(3,3),kbz(3,nkbz) + integer,intent(out) :: bz2ibz_smap(6,nkbz) + +!Local variables ------------------------- +!scalars + type(krank_t) :: krank + integer :: identi,ii,ikpt,ikibz,ikpt_found + integer :: isym,itim,jj,nkpout,tident + !real(dp) :: cpu, gflops, wall + character(len=500) :: msg +!arrays + real(dp) :: ksym(3),kpt1(3) + +! ********************************************************************* + + ABI_UNUSED(comm) + ABI_UNUSED(gmet) + + if (timrev/=1 .and. timrev/=0) then + write(msg,'(a,i0)')' timrev should be 0 or 1, while it is equal to ',timrev + ABI_BUG(msg) + end if + + ! Find the identity symmetry operation + identi = 1 + tident = -1 + if (nsym/=1) then + do isym=1,nsym + tident=1 + do jj=1,3 + if(symrec(jj,jj,isym)/=1)tident=0 + do ii=1,3 + if( ii/=jj .and. symrec(ii,jj,isym)/=0)tident=0 + end do + end do + if(tident==1)then + identi=isym + !call wrtout(std_out, sjoin(' symkpt_new: found identity, with number: ',itoa(identi))) + exit + end if + end do + ABI_CHECK(tident == 1, 'Did not find the identity operation') + end if + + ! Initialize + ibz2bz = 0 + bz2ibz_smap = 0 + do ikpt=1,nkbz + bz2ibz_smap(1, ikpt) = ikpt + bz2ibz_smap(2, ikpt) = 1 + bz2ibz_smap(4, ikpt) = 1 ! We will use this as wtk_folded + end do + + ! Start krank + krank = krank_new(nkbz, kbz) + + ! Here begins the serious business + !call cwtime(cpu, wall, gflops, "start") + + ! If there is some possibility for a change + if(nkbz/=1 .and. (nsym/=1 .or. timrev==1) )then + + ! Examine whether the k point grid is symmetric or not + ! This check scales badly with nkbz hence it's disabled for dense meshes. + if (chksymbreak == 1 .and. nkbz < 40**3) then + do ikpt=1,nkbz + kpt1 = kbz(:,ikpt) + + do isym=1,nsym + do itim=0,timrev + ! Skip identity symmetry + if (isym==identi .and. itim==0) cycle + + ! Get the symmetric of the vector + do ii=1,3 + ksym(ii)=(1-2*itim)*( kpt1(1)*symrec(ii,1,isym)+& + kpt1(2)*symrec(ii,2,isym)+& + kpt1(3)*symrec(ii,3,isym) ) + end do + + !find this point + ikpt_found = krank%get_index(ksym) + !if (sum(abs(mod(ksym-kbz(:,ikpt_found),one)))>tol8) then + ! ABI_ERROR('Wrong k-point mapping found by krank') + !end if + !if k-point not found + if (ikpt_found < 0) then + write(msg,'(3a,i4,2a,9i3,2a,i6,1a,3es16.6,6a)' )& + 'Chksymbreak=1. It has been observed that the k point grid is not symmetric:',ch10,& + 'for the symmetry number: ',isym,ch10,& + 'with symrec= ',symrec(1:3,1:3,isym),ch10,& + 'the symmetric of the k point number: ',ikpt,' with components: ',kpt1(:),ch10,& + 'does not belong to the k point grid.',ch10,& + 'Read the description of the input variable chksymbreak,',ch10,& + 'You might switch it to zero, or change your k point grid to one that is symmetric.' + ABI_ERROR(msg) + end if + end do ! itim + end do ! isym + end do ! ikpt + end if + + ! Here I generate the IBZ + ikpt_loop: do ikpt=1,nkbz + + if (bz2ibz_smap(4, ikpt)==0) cycle + kpt1 = kbz(:,ikpt) + + ! MG Dec 16 2018, Invert isym, itim loop to be consistent with listkk and GW routines + ! Should always use this convention when applying symmetry operations in k-space. + ! TODO: Postponed to v9 because it won't be possible to read old WFK files. + do isym=1,nsym + do itim=0,timrev + ! Skip identity symmetry + if (isym==identi .and. itim==0) cycle + + ! Get the symmetric of the vector + do ii=1,3 + ksym(ii)=(1-2*itim)*( kpt1(1)*symrec(ii,1,isym)+& + kpt1(2)*symrec(ii,2,isym)+& + kpt1(3)*symrec(ii,3,isym) ) + end do + + !find this point + ikpt_found = krank%get_index(ksym) + !if k-point not found just cycle + if (ikpt_found < 0) cycle + !if (sum(abs(mod(ksym-kbz(:,ikpt_found),one)))>tol8) then + ! ABI_ERROR('Wrong k-point mapping found by krank') + !end if + if (ikpt_found >= ikpt) cycle + bz2ibz_smap(:3, ikpt) = [ikpt_found, isym, itim] + bz2ibz_smap(4,ikpt) = bz2ibz_smap(4,ikpt) + bz2ibz_smap(4,ikpt_found) + bz2ibz_smap(4,ikpt_found) = 0 + end do ! itim + end do ! isym + end do ikpt_loop! ikpt + + end if ! End check on possibility of change + !call cwtime_report(" ibz", cpu, wall, gflops) + + nkibz = 0 + do ikpt=1,nkbz + ikibz = bz2ibz_smap(1,ikpt) + if (ikibz /= ikpt) cycle + nkibz = nkibz + 1 + ibz2bz(nkibz) = ikpt + end do + + !do ikpt=1,nkbz + ! write(*,*) ikpt, ibz2bz(ikpt), bz2ibz_smap(1,ikpt) + !end do + + ! Initialize again + bz2ibz_smap = 0 + + ! Now I loop again over the points in the IBZ to find the mapping to the BZ + do ikpt=1,nkibz + ikibz = ibz2bz(ikpt) + kpt1 = kbz(:,ikibz) + + ! HM: Here I invert the itim and isym loop to generate the same mapping as listkk + do itim=0,timrev + do isym=1,nsym + ! Get the symmetric of the vector + do ii=1,3 + ksym(ii)=(1-2*itim)*( kpt1(1)*symrec(ii,1,isym)+& + kpt1(2)*symrec(ii,2,isym)+& + kpt1(3)*symrec(ii,3,isym) ) + end do + + ! Find this point + ikpt_found = krank%get_index(ksym) + if (ikpt_found < 0) cycle + if (bz2ibz_smap(1, ikpt_found) /= 0) cycle + bz2ibz_smap(:3, ikpt_found) = [ikpt, isym, itim] + bz2ibz_smap(4:, ikpt_found) = nint(kbz(:,ikpt_found)-ksym) + + ! TODO: Use same conventions as in listkk but must propagate the changes! + !bz2ibz_smap(1:2, ikpt_found) = [ikpt, isym] + !bz2ibz_smap(3:5, ikpt_found) = nint(-ksym + kbz(:,ikpt_found) + tol12) + !bz2ibz_smap(6, ikpt_found) = itim + end do + end do + end do + !call cwtime_report(" map", cpu, wall, gflops) + + call krank%free() + + ! Check whether the mapping was sucessfull + if (any(bz2ibz_smap(1, :) == 0)) then + ABI_ERROR('Could not initial mapping BZ to IBZ. Perhaps your grid breaks the symmetry of the lattice!') + end if + + !do ikpt=1,nkbz + ! write(*,*) ikpt, ibz2bz(ikpt), bz2ibz_smap(1,ikpt) + !end do + + if(iout/=0)then + if(nkbz/=nkibz)then + write(msg, '(a,a,a,i6,a)' )& + ' symkpt_new : the number of k-points, thanks to the symmetries,',ch10,' is reduced to',nkibz,' .' + call wrtout(iout,msg) + if(iout/=std_out) call wrtout(std_out,msg) + + nkpout=nkibz + else + write(msg, '(a)' )' symkpt_new : not enough symmetry to change the number of k points.' + call wrtout(iout,msg) + if (iout/=std_out) call wrtout(std_out,msg) + end if + end if + +end subroutine symkpt_new +!!*** + +!---------------------------------------------------------------------- + +!!****f* ABINIT/mapkptsets +!! NAME +!! mapkptsets +!! +!! FUNCTION +!! given 2 input sets of kpts (1 and 2) find the symmetry operations that yield points in list 2 from a minimal set from list 1 +!! typical usage is to find k in a list from disk, to initialize the wfk in memory +!! kin can be overcomplete etc... we just need to find _a_ solution +!! bz2kin_smap follows the listkk convention with ik, isym, g0(1:3), itimrev +!! +!! INPUTS +!! +!! OUTPUT +!! nkirred = number of irreducible k needed from list 1 (in) +!! bz2ibz_smap = mapping of indices in list 2 with their irreducible origin in list 1, +!! symop and timrev needed to transform them +!! +!! SOURCE + +subroutine mapkptsets(chksymbreak,gmet,k_in,nk_in,& +& kbz,nkbz,nkirred,nsym,symrec,timrev,bz2kin_smap, comm) + +!Arguments ------------------------------- +!scalars + integer,intent(in) :: chksymbreak,nkbz,nsym,timrev,comm + integer,intent(in) :: nk_in + integer,intent(out) :: nkirred +!arrays + integer,intent(in) :: symrec(3,3,nsym) + real(dp),intent(in) :: gmet(3,3),kbz(3,nkbz) + real(dp),intent(in) :: k_in(3,nk_in) + integer,intent(out) :: bz2kin_smap(nkbz,6) + +!Local variables ------------------------- +!scalars + type(krank_t) :: krank + integer :: identi,ii,ikpt,ik_in,ikpt_found + integer :: isym,itim,jj,tident + !real(dp) :: cpu, gflops, wall + character(len=500) :: message +!arrays + real(dp) :: ksym(3),kpt1(3) + +! ********************************************************************* + + ABI_UNUSED(comm) + ABI_UNUSED(gmet) + + if (timrev/=1 .and. timrev/=0) then + write(message,'(a,i0)')' timrev should be 0 or 1, while it is equal to ',timrev + ABI_BUG(message) + end if + + ! Find the identity symmetry operation + identi = 1 + tident = -1 + if (nsym/=1) then + do isym=1,nsym + tident=1 + do jj=1,3 + if(symrec(jj,jj,isym)/=1)tident=0 + do ii=1,3 + if( ii/=jj .and. symrec(ii,jj,isym)/=0)tident=0 + end do + end do + if(tident==1)then + identi=isym + exit + end if + end do + ABI_CHECK(tident == 1, 'Did not find the identity operation') + end if + + ! Initialize + bz2kin_smap = 0 + do ikpt=1,nkbz + bz2kin_smap(ikpt, 1) = ikpt + bz2kin_smap(ikpt, 2) = 1 + bz2kin_smap(ikpt, 3) = 1 ! We will use this as wtk_folded + end do + + ! Start krank + krank = krank_new(nkbz, kbz) + + ! Here begins the serious business + !call cwtime(cpu, wall, gflops, "start") + + ! If there is some possibility for a change + if(nkbz/=1 .and. (nsym/=1 .or. timrev==1) )then + + ! Examine whether the k point grid is symmetric or not + ! This check scales badly with nkbz hence it's disabled for dense meshes. + if (chksymbreak == 1 .and. nkbz < 40**3) then + do ikpt=1,nkbz + kpt1 = kbz(:,ikpt) + + do isym=1,nsym + do itim=0,timrev + ! Skip identity symmetry + if (isym==identi .and. itim==0) cycle + + ! Get the symmetric of the vector + do ii=1,3 + ksym(ii)=(1-2*itim)*( kpt1(1)*symrec(ii,1,isym)+& + kpt1(2)*symrec(ii,2,isym)+& + kpt1(3)*symrec(ii,3,isym) ) + end do + + !find this point + ikpt_found = krank%get_index(ksym) + !if (sum(abs(mod(ksym-kbz(:,ikpt_found),one)))>tol8) then + ! ABI_ERROR('Wrong k-point mapping found by krank') + !end if + !if k-point not found + if (ikpt_found < 0) then + write(message,'(3a,i4,2a,9i3,2a,i6,1a,3es16.6,6a)' )& + 'Chksymbreak=1. It has been observed that the k point grid is not symmetric:',ch10,& + 'for the symmetry number: ',isym,ch10,& + 'with symrec= ',symrec(1:3,1:3,isym),ch10,& + 'the symmetric of the k point number: ',ikpt,' with components: ',kpt1(:),ch10,& + 'does not belong to the k point grid.',ch10,& + 'Read the description of the input variable chksymbreak,',ch10,& + 'You might switch it to zero, or change your k point grid to one that is symmetric.' + ABI_ERROR(message) + end if + end do ! itim + end do ! isym + end do ! ikpt + end if + end if ! End check on possibility of change + !call cwtime_report(" ibz", cpu, wall, gflops) + + ! Initialize + bz2kin_smap = 0 + + ! HM: Here I invert the itim and isym loop to generate the same mapping as listkk + do itim=0,timrev + do isym=1,nsym + +!TODO: verify this inefficient use: sweep over isym=identity first to check which +! k_in are actually directly present in kbz. Will not minimize the number of k_in we use, on the contrary +! Now I loop over the points in the in list to find the mapping to the BZ + do ik_in=1,nk_in + kpt1 = k_in(:,ik_in) + + ! Get the symmetric of the vector + do ii=1,3 + ksym(ii)=(1-2*itim)*( kpt1(1)*symrec(ii,1,isym)+& + kpt1(2)*symrec(ii,2,isym)+& + kpt1(3)*symrec(ii,3,isym) ) + end do + + !find this point in the main set 2 + ikpt_found = krank%get_index(ksym) + + if (ikpt_found < 0) cycle + ! if we already filled it, ignore new symmetric pre-image + if (bz2kin_smap(ikpt_found, 1) /= 0) cycle + + bz2kin_smap(ikpt_found, 1) = ik_in + bz2kin_smap(ikpt_found, 2) = isym + bz2kin_smap(ikpt_found, 3:5) = nint(kbz(:,ikpt_found)-ksym) + bz2kin_smap(ikpt_found, 6) = itim + end do + + end do + end do + !call cwtime_report(" map", cpu, wall, gflops) + + nkirred = 0 + do ik_in=1,nk_in + ! did I end up using this ik_in? + if (any(bz2kin_smap(:,1) == ik_in)) then + nkirred = nkirred + 1 + end if + end do + +! check for redundant k in the kbz set + do ikpt=1, nkbz + if (bz2kin_smap(ikpt,1) /= 0) cycle +! find index according to krank + ikpt_found = krank%get_index(kbz(:,ikpt)) +! if I am not my own hash image, associate the smap data from my image + if (ikpt_found /= ikpt) then + bz2kin_smap(ikpt,:) = bz2kin_smap(ikpt_found,:) + end if + end do + + call krank%free() + + !Here I make a check if the mapping was sucessfull + !might exit less brutally and allow for error catching by the caller... + if (any(bz2kin_smap(:,1) == 0)) then +!print *, 'nkirred ', nkirred +!do ikpt_found=1, nkbz +!print *, bz2kin_smap(ikpt_found,:), kbz(:,ikpt_found) +!end do +!print *, 'k_in = ' +!do ik_in=1, nk_in +!print *, k_in(:,ik_in) +!end do + ABI_ERROR('Could not find mapping k-point sets') + end if + + !do ikpt=1,nkbz + ! write(*,*) ikpt, ibz2bz(ikpt), bz2kin_smap(ikpt,1) + !end do + +end subroutine mapkptsets +!!*** + +end module m_symkpt +!!*** diff --git a/GX-PAW/common/src/29_kpoints/m_symkpt.o b/GX-PAW/common/src/29_kpoints/m_symkpt.o new file mode 100644 index 00000000..702f5e42 Binary files /dev/null and b/GX-PAW/common/src/29_kpoints/m_symkpt.o differ diff --git a/GX-PAW/common/src/32_util/Makefile b/GX-PAW/common/src/32_util/Makefile new file mode 100644 index 00000000..5f5ec6ca --- /dev/null +++ b/GX-PAW/common/src/32_util/Makefile @@ -0,0 +1,1480 @@ +# Makefile.in generated by automake 1.16.3 from Makefile.am. +# shared/common/src/32_util/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994-2020 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-corelibs on 2024/03/16 21:07:38 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-corelibs script or its config file instead. +# + + +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/abinit +pkgincludedir = $(includedir)/abinit +pkglibdir = $(libdir)/abinit +pkglibexecdir = $(libexecdir)/abinit +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = x86_64-apple-darwin18.7.0 +host_triplet = x86_64-apple-darwin18.7.0 +target_triplet = x86_64-apple-darwin18.7.0 +subdir = shared/common/src/32_util +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/m4/arch-gpu.m4 \ + $(top_srcdir)/config/m4/arch-mpi.m4 \ + $(top_srcdir)/config/m4/auto-autotools.m4 \ + $(top_srcdir)/config/m4/auto-corelibs.m4 \ + $(top_srcdir)/config/m4/auto-debug.m4 \ + $(top_srcdir)/config/m4/auto-dirflags.m4 \ + $(top_srcdir)/config/m4/auto-env.m4 \ + $(top_srcdir)/config/m4/auto-hints.m4 \ + $(top_srcdir)/config/m4/auto-optim.m4 \ + $(top_srcdir)/config/m4/auto-options.m4 \ + $(top_srcdir)/config/m4/auto-output.m4 \ + $(top_srcdir)/config/m4/auto-triggers.m4 \ + $(top_srcdir)/config/m4/conf-atompaw.m4 \ + $(top_srcdir)/config/m4/conf-debug.m4 \ + $(top_srcdir)/config/m4/conf-fallbacks.m4 \ + $(top_srcdir)/config/m4/conf-files.m4 \ + $(top_srcdir)/config/m4/conf-init.m4 \ + $(top_srcdir)/config/m4/conf-openmp.m4 \ + $(top_srcdir)/config/m4/conf-optim.m4 \ + $(top_srcdir)/config/m4/lang-c++.m4 \ + $(top_srcdir)/config/m4/lang-c.m4 \ + $(top_srcdir)/config/m4/lang-fortran-import.m4 \ + $(top_srcdir)/config/m4/lang-fortran.m4 \ + $(top_srcdir)/config/m4/lang-python.m4 \ + $(top_srcdir)/config/m4/libxml2.m4 \ + $(top_srcdir)/config/m4/misc-display.m4 \ + $(top_srcdir)/config/m4/sd_abinit_common.m4 \ + $(top_srcdir)/config/m4/sd_arch_gpu.m4 \ + $(top_srcdir)/config/m4/sd_arch_mpi.m4 \ + $(top_srcdir)/config/m4/sd_bigdft.m4 \ + $(top_srcdir)/config/m4/sd_core.m4 \ + $(top_srcdir)/config/m4/sd_esl.m4 \ + $(top_srcdir)/config/m4/sd_fftw3.m4 \ + $(top_srcdir)/config/m4/sd_gpu_kokkos.m4 \ + $(top_srcdir)/config/m4/sd_gpu_yakl.m4 \ + $(top_srcdir)/config/m4/sd_io_hdf5.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf_fortran.m4 \ + $(top_srcdir)/config/m4/sd_levmar.m4 \ + $(top_srcdir)/config/m4/sd_libpaw.m4 \ + $(top_srcdir)/config/m4/sd_libpsml.m4 \ + $(top_srcdir)/config/m4/sd_libxc.m4 \ + $(top_srcdir)/config/m4/sd_math_fft.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_core.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_util.m4 \ + $(top_srcdir)/config/m4/sd_papi.m4 \ + $(top_srcdir)/config/m4/sd_pfft.m4 \ + $(top_srcdir)/config/m4/sd_triqs.m4 \ + $(top_srcdir)/config/m4/sd_wannier90.m4 \ + $(top_srcdir)/config/m4/sd_xmlf90.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +AM_V_AR = $(am__v_AR_$(V)) +am__v_AR_ = $(am__v_AR_$(AM_DEFAULT_VERBOSITY)) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = +lib32_util_a_AR = $(AR) $(ARFLAGS) +lib32_util_a_LIBADD = +am__objects_1 = m_atomdata.$(OBJEXT) m_dummy.$(OBJEXT) \ + m_exp_mat.$(OBJEXT) m_matrix.$(OBJEXT) m_pptools.$(OBJEXT) \ + m_special_funcs.$(OBJEXT) m_symtk.$(OBJEXT) m_pstat.$(OBJEXT) +am_lib32_util_a_OBJECTS = $(am__objects_1) +lib32_util_a_OBJECTS = $(am_lib32_util_a_OBJECTS) +AM_V_P = $(am__v_P_$(V)) +am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY)) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I. -I$(top_builddir) +PPFCCOMPILE = $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) +AM_V_PPFC = $(am__v_PPFC_$(V)) +am__v_PPFC_ = $(am__v_PPFC_$(AM_DEFAULT_VERBOSITY)) +am__v_PPFC_0 = @echo " PPFC " $@; +am__v_PPFC_1 = +FCLD = $(FC) +FCLINK = $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \ + $@ +AM_V_FCLD = $(am__v_FCLD_$(V)) +am__v_FCLD_ = $(am__v_FCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_FCLD_0 = @echo " FCLD " $@; +am__v_FCLD_1 = +SOURCES = $(lib32_util_a_SOURCES) +DIST_SOURCES = $(lib32_util_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in README +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ABINIT_BINARY_PACKAGE = abinit-10.0.0.83-58be4d_x86_64_darwin18.7.0_gnu9.4 +ABINIT_COMMON_CPPFLAGS = +ABINIT_COMMON_FCFLAGS = +ABINIT_COMMON_LDFLAGS = +ABINIT_COMMON_LIBS = +ABINIT_TARGET = x86_64_darwin18.7.0_gnu9.4 +ABINIT_VERSION = 10.0.0.83-58be4d +ABINIT_VERSION_BASE = 10.0 +ABINIT_VERSION_BUILD = 20240316 +ABINIT_VERSION_MAJOR = 10 +ABINIT_VERSION_MICRO = 0 +ABINIT_VERSION_MINOR = 0 +ABI_CPPFLAGS = -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include +ACLOCAL = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' aclocal-1.16 +AMTAR = $${TAR-tar} +AM_DEFAULT_VERBOSITY = 1 +AR = ar +ARFLAGS = rc +ARFLAGS_CMD = rc +ARFLAGS_DEBUG = +ARFLAGS_EXTRA = +ARFLAGS_HINTS = +ARFLAGS_OPTIM = +ATOMPAW_BIN = +AUTOCONF = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' autoconf +AUTOHEADER = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' autoheader +AUTOMAKE = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' automake-1.16 +AWK = awk +BIGDFT_CPPFLAGS = +BIGDFT_FCFLAGS = +BIGDFT_LDFLAGS = +BIGDFT_LIBS = +BOURNE_SHELL = /bin/sh +CC = /opt/local/bin/mpicc +CCDEPMODE = depmode=gcc3 +CC_LDFLAGS = +CC_LDFLAGS_DEBUG = +CC_LDFLAGS_EXTRA = +CC_LDFLAGS_GPU = +CC_LDFLAGS_HINTS = +CC_LDFLAGS_OPTIM = +CC_LIBS = +CC_LIBS_DEBUG = +CC_LIBS_EXTRA = +CC_LIBS_GPU = +CC_LIBS_HINTS = +CC_LIBS_OPTIM = +CFLAGS = -O2 -g +CFLAGS_DEBUG = +CFLAGS_EXTRA = +CFLAGS_GPU = +CFLAGS_HINTS = +CFLAGS_OPTIM = +CPP = /opt/local/bin/mpicc -E +CPPFLAGS = +CPPFLAGS_DEBUG = +CPPFLAGS_EXTRA = +CPPFLAGS_GPU = +CPPFLAGS_HINTS = +CPPFLAGS_HINTS_EXT = -P -std=c99 +CPPFLAGS_OPTIM = +CXX = /opt/local/bin/mpicxx +CXXDEPMODE = depmode=gcc3 +CXXFLAGS = -O2 -g +CXXFLAGS_DEBUG = +CXXFLAGS_EXTRA = +CXXFLAGS_GPU = +CXXFLAGS_HINTS = +CXXFLAGS_OPTIM = +CXX_LDFLAGS = +CXX_LDFLAGS_DEBUG = +CXX_LDFLAGS_EXTRA = +CXX_LDFLAGS_GPU = +CXX_LDFLAGS_HINTS = +CXX_LDFLAGS_OPTIM = +CXX_LIBS = +CXX_LIBS_DEBUG = +CXX_LIBS_EXTRA = +CXX_LIBS_GPU = +CXX_LIBS_HINTS = +CXX_LIBS_OPTIM = +CYGPATH_W = echo +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +ECHO_C = \c +ECHO_N = +ECHO_T = +EGREP = /usr/bin/grep -E +EXEEXT = +F77 = /opt/local/bin/mpif90 +FC = /opt/local/bin/mpif90 +FCFLAGS = -O2 -g -ffree-line-length-none -I/opt/local/include -I/opt/local/include -I/opt/local/include +FCFLAGS_DEBUG = +FCFLAGS_EXTRA = +FCFLAGS_F90 = +FCFLAGS_FIXEDFORM = -ffixed-form +FCFLAGS_FREEFORM = -ffree-form +FCFLAGS_HINTS = -ffree-line-length-none +FCFLAGS_MODDIR = -J../mods +FCFLAGS_OPENMP = +FCFLAGS_OPENMP_OFFLOAD = +FCFLAGS_OPTIM = +FCLIBS = -L/opt/local/lib -L/opt/local/lib/openmpi-gcc9 -L/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0 -L/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/../../.. -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi -lgfortran -lquadmath -lm +FC_LDFLAGS = +FC_LDFLAGS_DEBUG = +FC_LDFLAGS_EXTRA = +FC_LDFLAGS_HINTS = +FC_LDFLAGS_OPTIM = +FC_LIBS = +FC_LIBS_DEBUG = +FC_LIBS_EXTRA = +FC_LIBS_HINTS = +FC_LIBS_OPTIM = +FC_NOWRAP = /opt/local/bin/mpif90 +FFLAGS = -O2 -g -ffree-line-length-none -I/opt/local/include -I/opt/local/include -I/opt/local/include +FFTW3_CFLAGS = +FFTW3_CPPFLAGS = -I/opt/local/include +FFTW3_FCFLAGS = -I/opt/local/include +FFTW3_LDFLAGS = +FFTW3_LIBS = -L/opt/local/lib -lfftw3 -lfftw3f +FFT_CFLAGS = +FFT_FCFLAGS = +FPP = +FPPFLAGS = +FPPFLAGS_DEBUG = +FPPFLAGS_EXTRA = +FPPFLAGS_HINTS = +FPPFLAGS_OPTIM = +GPU_ARCH = +GPU_CFLAGS = +GPU_CPPFLAGS = +GPU_CXXFLAGS = +GPU_FCFLAGS = +GPU_LDFLAGS = +GPU_LIBS = +GRAPHATOM_BIN = +GREP = /usr/bin/grep +H5CC = +HDF5_CFLAGS = +HDF5_CPPFLAGS = +HDF5_CXXFLAGS = +HDF5_FCFLAGS = +HDF5_LDFLAGS = +HDF5_LIBS = +INSTALL = /opt/local/libexec/gnubin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +KOKKOS_CPPFLAGS = +KOKKOS_CXXFLAGS = +KOKKOS_LDFLAGS = +KOKKOS_LIBS = +LDFLAGS = +LEVMAR_CFLAGS = +LEVMAR_CPPFLAGS = +LEVMAR_LDFLAGS = +LEVMAR_LIBS = +LIBOBJS = +LIBPAW_CPPFLAGS = +LIBPAW_FCFLAGS = +LIBPAW_LDFLAGS = +LIBPAW_LIBS = +LIBPSML_CPPFLAGS = +LIBPSML_FCFLAGS = +LIBPSML_LDFLAGS = +LIBPSML_LIBS = +LIBS = -L/opt/local/lib -lwannier -L/opt/local/lib -lxc -L/opt/local/lib -lnetcdff -L/opt/local/lib -lnetcdf -L/opt/local/lib -L/opt/local/lib -lhdf5_hl -L/opt/local/lib -lhdf5 -lz -ldl -lm -L/opt/local/lib -lfftw3 -lfftw3f +LIBXC_CFLAGS = +LIBXC_CPPFLAGS = +LIBXC_FCFLAGS = +LIBXC_LDFLAGS = +LIBXC_LIBS = +LIBXML2_CPPFLAGS = +LIBXML2_FCFLAGS = +LIBXML2_LIBS = +LINALG_CFLAGS = +LINALG_CPPFLAGS = +LINALG_CXXFLAGS = +LINALG_FCFLAGS = -I/opt/local/include +LINALG_LDFLAGS = +LINALG_LIBS = -L/opt/local/lib -lopenblas +LN_S = ln -s +LTLIBOBJS = +MAKEINFO = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' makeinfo +MKDIR_P = /opt/local/libexec/gnubin/mkdir -p +MODEXT = mod +MPI_CFLAGS = +MPI_CPPFLAGS = +MPI_CXXFLAGS = +MPI_FCFLAGS = +MPI_LDFLAGS = +MPI_LIBS = +MV = /opt/local/libexec/gnubin/mv +NETCDF_CFLAGS = +NETCDF_CPPFLAGS = +NETCDF_CXXFLAGS = +NETCDF_FCFLAGS = +NETCDF_FORTRAN_CFLAGS = +NETCDF_FORTRAN_CPPFLAGS = +NETCDF_FORTRAN_CXXFLAGS = +NETCDF_FORTRAN_FCFLAGS = +NETCDF_FORTRAN_LDFLAGS = +NETCDF_FORTRAN_LIBS = +NETCDF_LDFLAGS = +NETCDF_LIBS = +NVCC = +NVCC_CFLAGS = +NVCC_CPPFLAGS = +NVCC_LDFLAGS = +NVCC_LIBS = +OBJEXT = o +PACKAGE = abinit +PACKAGE_BUGREPORT = https://bugs.launchpad.net/abinit/ +PACKAGE_NAME = ABINIT +PACKAGE_STRING = ABINIT 10.0.0.83-58be4d +PACKAGE_TARNAME = abinit +PACKAGE_URL = +PACKAGE_VERSION = 10.0.0.83-58be4d +PAPI_CFLAGS = +PAPI_CPPFLAGS = +PAPI_LDFLAGS = +PAPI_LIBS = +PATCH = patch +PATH_SEPARATOR = : +PERL = /usr/bin/perl +PFFT_CFLAGS = +PFFT_CPPFLAGS = +PFFT_LDFLAGS = +PFFT_LIBS = +PYFLAGS = +PYTHON = python3.9 +PYTHON_CONFIG = python3.9-config +PYTHON_CPPFLAGS = -I/opt/local/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -I/opt/local/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 +RANLIB = ranlib +REALPATH = realpath +RM = /opt/local/libexec/gnubin/rm +SED = /usr/bin/sed +SET_MAKE = +SHELL = /bin/sh +STRIP = +TAR = tar +TRIQS_CFLAGS = +TRIQS_CPPFLAGS = +TRIQS_CXXFLAGS = +TRIQS_LDFLAGS = +TRIQS_LIBS = +TRUE_CPP = cpp +VERSION = 10.0.0.83-58be4d +WANNIER90_CPPFLAGS = +WANNIER90_FCFLAGS = -I/opt/local/include +WANNIER90_LDFLAGS = +WANNIER90_LIBS = -L/opt/local/lib -lwannier +XML2_CONFIG = +XMLF90_CPPFLAGS = +XMLF90_FCFLAGS = +XMLF90_LDFLAGS = +XMLF90_LIBS = +XML_CPPFLAGS = +XML_LIBS = +XPP = +XPPFLAGS = +XPPFLAGS_DEBUG = +XPPFLAGS_EXTRA = +XPPFLAGS_OPTIM = +YAKL_CPPFLAGS = +YAKL_FCFLAGS = +YAKL_LDFLAGS = +YAKL_LIBS = +abi_ac_distcheck = --with-config-file="/Users/gonze/_Research/ABINIT_git/gonze/mac-1P0-225.ac9" +abi_ac_version = 027100 +abi_am_version = 011603 +abi_avx_safe_mode_enable = no +abi_bse_unpacked_enable = no +abi_cc_path = +abi_cc_vendor = gnu +abi_cc_version = 9.4 +abi_cclock_enable = no +abi_cpp_path = +abi_cpu_64bits = yes +abi_cpu_bits = 64 +abi_cpu_model = unknown +abi_cpu_platform = apple +abi_cpu_spec = unknown_unknown +abi_cpu_vendor = unknown +abi_crpa_optim_enable = no +abi_cxx_path = +abi_cxx_vendor = gnu +abi_cxx_version = 9.4 +abi_debug_flavor = basic +abi_exports_enable = no +abi_fbk_abinit_common_ok = no +abi_fbk_bigdft_ok = disabled +abi_fbk_config = +abi_fbk_enable = no +abi_fbk_fft_ok = no +abi_fbk_fftw3_ok = no +abi_fbk_gpu_ok = no +abi_fbk_hdf5_ok = disabled +abi_fbk_init = def +abi_fbk_kokkos_ok = no +abi_fbk_levmar_ok = no +abi_fbk_libpaw_ok = no +abi_fbk_libpsml_ok = disabled +abi_fbk_libxc_ok = disabled +abi_fbk_libxml2_ok = no +abi_fbk_linalg_ok = disabled +abi_fbk_list = +abi_fbk_mpi_ok = no +abi_fbk_netcdf_fortran_ok = disabled +abi_fbk_netcdf_ok = disabled +abi_fbk_papi_ok = no +abi_fbk_pfft_ok = no +abi_fbk_prefix = +abi_fbk_required = +abi_fbk_triqs_ok = no +abi_fbk_wannier90_ok = disabled +abi_fbk_xmlf90_ok = disabled +abi_fbk_yakl_ok = no +abi_fc_path = +abi_fc_vendor = gnu +abi_fc_version = 9.4 +abi_fc_wrap = no +abi_fc_wrapper_enable = no +abi_fpp_path = +abi_gpu_arch = +abi_gpu_fcflags = +abi_gpu_flavor = none +abi_gpu_hip_libdir = +abi_gpu_incs = +abi_gpu_ldflags = +abi_gpu_libs = +abi_gpu_nvtx_v3 = +abi_gpu_roctx = +abi_gw_dpc_enable = yes +abi_hints_enable = yes +abi_libtetra_enable = yes +abi_libxml2_cppflags = +abi_libxml2_enable = no +abi_libxml2_fcflags = +abi_libxml2_init = def +abi_libxml2_ldflags = +abi_libxml2_libs = +abi_libxml2_ok = unknown +abi_libxml2_prefix = +abi_lotf_enable = no +abi_lt_version = 020406 +abi_m4_version = 010419 +abi_memory_profiling_enable = no +abi_mpi_cflags = +abi_mpi_cppflags = +abi_mpi_cxxflags = +abi_mpi_enable = yes +abi_mpi_fcflags = +abi_mpi_flavor = auto +abi_mpi_gpu_aware_enable = no +abi_mpi_incs = +abi_mpi_inplace_enable = yes +abi_mpi_interfaces_bugfix_enable = no +abi_mpi_io_default_enable = no +abi_mpi_io_enable = yes +abi_mpi_ldflags = +abi_mpi_level = 2 +abi_mpi_libs = +abi_netcdf_default_enable = no +abi_openmp_enable = no +abi_openmp_offload_enable = no +abi_optim_flavor = standard +abi_python_invocation_enable = no +abi_source_debug_enable = no +abi_stdin_enable = yes +abi_sys_spec = darwin-x86_64 +abi_timer_enable = yes +abi_triqs_v1_4_enable = no +abi_triqs_v2_0_enable = no +abi_zdot_bugfix_enable = no +abinit_bindir = /usr/local/bin +abinit_builddir = /Users/gonze/_Research/ABINIT_git/gonze +abinit_chkdir = /usr/local/share/abinit/tests +abinit_datdir = /usr/local/share/abinit +abinit_docdir = /usr/local/doc/abinit +abinit_incdir = /usr/local/include +abinit_libdir = /usr/local/lib +abinit_mandir = /usr/local/share/man +abinit_prefix = /usr/local +abinit_srcdir = /Users/gonze/_Research/ABINIT_git/gonze +abs_builddir = /Users/gonze/_Research/ABINIT_git/gonze/shared/common/src/32_util +abs_srcdir = /Users/gonze/_Research/ABINIT_git/gonze/shared/common/src/32_util +abs_top_builddir = /Users/gonze/_Research/ABINIT_git/gonze +abs_top_srcdir = /Users/gonze/_Research/ABINIT_git/gonze +ac_ct_CC = +ac_ct_CXX = +ac_ct_FC = +am__include = include +am__leading_dot = . +am__quote = +am__tar = tar --format=ustar -chf - "$$tardir" +am__untar = tar -xf - +bindir = ${exec_prefix}/bin +build = x86_64-apple-darwin18.7.0 +build_alias = +build_cpu = x86_64 +build_os = darwin18.7.0 +build_vendor = apple +builddir = . +cc_info_string = gcc-mp-9 (MacPorts gcc9 9.4.0_0) 9.4.0 +cxx_info_string = g++-mp-9 (MacPorts gcc9 9.4.0_0) 9.4.0 +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +enable_avx_safe_mode = +enable_bse_unpacked = +enable_cclock = +enable_crpa_optim = +enable_exports = +enable_fc_wrapper = +enable_gw_dpc = yes +enable_hints = +enable_libtetra = +enable_lotf = +enable_memory_profiling = +enable_mpi_gpu_aware = +enable_mpi_inplace = +enable_mpi_interfaces_bugfix = +enable_mpi_io = yes +enable_mpi_io_default = +enable_netcdf_default = +enable_openmp = +enable_openmp_offload = +enable_python_invocation = +enable_shared = +enable_source_debug = +enable_static = +enable_stdin = +enable_timer = +enable_triqs_v1_4 = +enable_triqs_v2_0 = +enable_zdot_bugfix = +exec_prefix = ${prefix} +fc_info_string = GNU Fortran (MacPorts gcc9 9.4.0_0) 9.4.0 +fc_mod_fcflags = +fc_timing = standard +fcflags_opt_02_clib = +fcflags_opt_10_defs = +fcflags_opt_11_memory_mpi = +fcflags_opt_12_hide_mpi = +fcflags_opt_14_hidewrite = +fcflags_opt_16_hideleave = +fcflags_opt_16_kokkos_toolbox = +fcflags_opt_17_gpu_toolbox = +fcflags_opt_17_libtetra_ext = +fcflags_opt_17_minimax = +fcflags_opt_17_yaml_out = +fcflags_opt_18_timing = +fcflags_opt_21_hashfuncs = +fcflags_opt_27_toolbox_oop = +fcflags_opt_28_numeric_noabirule = +fcflags_opt_29_kpoints = +fcflags_opt_32_util = +fcflags_opt_33_xc_lowlevel = +fcflags_opt_39_libpaw = +fcflags_opt_41_geometry = +fcflags_opt_42_nlstrain = +fcflags_opt_42_parser = +fcflags_opt_43_ptgroups = -O0 +fcflags_opt_43_wvl_wrappers = +fcflags_opt_44_abitools = +fcflags_opt_44_abitypes_defs = +fcflags_opt_44_manage_kokkos = +fcflags_opt_45_geomoptim = +fcflags_opt_45_xgTools = +fcflags_opt_46_ghc_omp = +fcflags_opt_46_manage_cuda = +fcflags_opt_48_diago = +fcflags_opt_49_gw_toolbox_oop = +fcflags_opt_51_manage_mpi = +fcflags_opt_52_fft_mpi_noabirule = +fcflags_opt_53_ffts = +fcflags_opt_54_spacepar = +fcflags_opt_55_abiutil = +fcflags_opt_56_io_mpi = +fcflags_opt_56_mixing = +fcflags_opt_56_recipspace = +fcflags_opt_56_xc = +fcflags_opt_57_iopsp_parser = +fcflags_opt_57_iovars = +fcflags_opt_61_occeig = +fcflags_opt_62_cg_noabirule = +fcflags_opt_62_ctqmc = +fcflags_opt_62_iowfdenpot = +fcflags_opt_62_poisson = +fcflags_opt_62_wvl_wfs = +fcflags_opt_64_psp = +fcflags_opt_65_lotf_base = +fcflags_opt_65_paw = +fcflags_opt_66_nonlocal = +fcflags_opt_66_vdwxc = +fcflags_opt_66_wfs = +fcflags_opt_67_common = +fcflags_opt_67_python_invocation_ext = +fcflags_opt_67_triqs_ext = +fcflags_opt_68_dmft = +fcflags_opt_68_lotf = +fcflags_opt_68_recursion = +fcflags_opt_68_rsprc = +fcflags_opt_69_wfdesc = +fcflags_opt_70_gw = +fcflags_opt_71_bse = +fcflags_opt_71_wannier = +fcflags_opt_72_response = +fcflags_opt_77_ddb = +fcflags_opt_77_suscep = +fcflags_opt_78_effpot = +fcflags_opt_78_eph = +fcflags_opt_79_seqpar_mpi = +fcflags_opt_80_rttddft = +fcflags_opt_80_tdep = +fcflags_opt_94_scfcv = +fcflags_opt_95_drive = +fcflags_opt_98_main = +fcflags_opt_bigdft = +fcflags_opt_default = +fcflags_opt_hdf5 = +fcflags_opt_levmar = +fcflags_opt_libpsml = +fcflags_opt_libxc = +fcflags_opt_libxml2 = +fcflags_opt_linalg = +fcflags_opt_netcdf = +fcflags_opt_netcdf_fortran = +fcflags_opt_papi = +fcflags_opt_triqs = +fcflags_opt_wannier90 = +fcflags_opt_xmlf90 = +host = x86_64-apple-darwin18.7.0 +host_alias = +host_cpu = x86_64 +host_os = darwin18.7.0 +host_vendor = apple +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = ${SHELL} /Users/gonze/_Research/ABINIT_git/gonze/config/gnu/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = ${datarootdir}/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = $(MKDIR_P) +oldincludedir = /usr/include +pdfdir = ${docdir} +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +runstatedir = ${localstatedir}/run +sbindir = ${exec_prefix}/sbin +sd_abinit_common_cppflags = +sd_abinit_common_enable = no +sd_abinit_common_enable_def = no +sd_abinit_common_fcflags = +sd_abinit_common_init = def +sd_abinit_common_ldflags = +sd_abinit_common_libs = +sd_abinit_common_ok = unknown +sd_abinit_common_options = optional skip +sd_abinit_common_policy = skip +sd_abinit_common_status = optional +sd_bigdft_cppflags = +sd_bigdft_enable = no +sd_bigdft_enable_def = no +sd_bigdft_fcflags = +sd_bigdft_init = def +sd_bigdft_ldflags = +sd_bigdft_libs = +sd_bigdft_ok = unknown +sd_bigdft_options = optional warn +sd_bigdft_policy = warn +sd_bigdft_status = optional +sd_fft_cflags = +sd_fft_choices = +sd_fft_cppflags = -I/opt/local/include +sd_fft_cxxflags = +sd_fft_enable = yes +sd_fft_fcflags = -I/opt/local/include +sd_fft_flavor = fftw3 +sd_fft_init = kwd +sd_fft_ldflags = +sd_fft_libs = -L/opt/local/lib -lfftw3 -lfftw3f +sd_fft_ok = yes +sd_fftw3_cflags = +sd_fftw3_cppflags = -I/opt/local/include +sd_fftw3_enable = yes +sd_fftw3_enable_def = no +sd_fftw3_fcflags = -I/opt/local/include +sd_fftw3_init = env +sd_fftw3_ldflags = +sd_fftw3_libs = -L/opt/local/lib -lfftw3 -lfftw3f +sd_fftw3_ok = yes +sd_fftw3_options = optional skip +sd_fftw3_policy = skip +sd_fftw3_status = optional +sd_gpu_cflags = +sd_gpu_cppflags = +sd_gpu_cxxflags = +sd_gpu_enable = no +sd_gpu_enable_def = no +sd_gpu_fcflags = +sd_gpu_init = def +sd_gpu_ldflags = +sd_gpu_libs = +sd_gpu_ok = no +sd_gpu_options = optional warn +sd_gpu_policy = warn +sd_gpu_prefix = +sd_gpu_status = optional +sd_hdf5_cflags = +sd_hdf5_cppflags = -I/opt/local/include -I/opt/local/include +sd_hdf5_cxxflags = +sd_hdf5_enable = yes +sd_hdf5_enable_def = yes +sd_hdf5_enable_fc = no +sd_hdf5_fcflags = +sd_hdf5_h5cc = /opt/local/bin/h5cc +sd_hdf5_h5fc = +sd_hdf5_init = dir +sd_hdf5_ldflags = +sd_hdf5_libs = -L/opt/local/lib -L/opt/local/lib -lhdf5_hl -L/opt/local/lib -lhdf5 -lz -ldl -lm +sd_hdf5_ok = yes +sd_hdf5_options = required no-fortran warn +sd_hdf5_policy = warn +sd_hdf5_status = required +sd_kokkos_cppflags = +sd_kokkos_cxxflags = +sd_kokkos_enable = no +sd_kokkos_enable_def = no +sd_kokkos_init = def +sd_kokkos_ldflags = +sd_kokkos_libs = +sd_kokkos_ok = unknown +sd_kokkos_options = optional fail +sd_kokkos_policy = fail +sd_kokkos_status = optional +sd_levmar_cflags = +sd_levmar_cppflags = +sd_levmar_enable = no +sd_levmar_enable_def = no +sd_levmar_init = def +sd_levmar_ldflags = +sd_levmar_libs = +sd_levmar_ok = unknown +sd_levmar_options = optional fail +sd_levmar_policy = fail +sd_levmar_status = optional +sd_libpaw_cppflags = +sd_libpaw_enable = no +sd_libpaw_enable_def = no +sd_libpaw_fcflags = +sd_libpaw_init = def +sd_libpaw_ldflags = +sd_libpaw_libs = +sd_libpaw_ok = unknown +sd_libpaw_options = optional skip +sd_libpaw_policy = skip +sd_libpaw_status = optional +sd_libpsml_cppflags = +sd_libpsml_enable = no +sd_libpsml_enable_def = no +sd_libpsml_fcflags = +sd_libpsml_init = def +sd_libpsml_ldflags = +sd_libpsml_libs = +sd_libpsml_ok = unknown +sd_libpsml_options = optional warn +sd_libpsml_policy = warn +sd_libpsml_status = optional +sd_libxc_cflags = +sd_libxc_cppflags = -I/opt/local/include +sd_libxc_enable = yes +sd_libxc_enable_def = yes +sd_libxc_enable_fc = no +sd_libxc_fcflags = +sd_libxc_init = dir +sd_libxc_ldflags = +sd_libxc_libs = -L/opt/local/lib -lxc +sd_libxc_ok = yes +sd_libxc_options = required no-fortran warn +sd_libxc_policy = warn +sd_libxc_status = required +sd_linalg_cflags = +sd_linalg_choices = +sd_linalg_cppflags = +sd_linalg_cxxflags = +sd_linalg_enable = yes +sd_linalg_fcflags = -I/opt/local/include +sd_linalg_flavor = openblas +sd_linalg_has_elpa = no +sd_linalg_has_scalapack = no +sd_linalg_init = env +sd_linalg_ldflags = +sd_linalg_libs = -L/opt/local/lib -lopenblas +sd_linalg_ok = yes +sd_mpi_cc = /opt/local/bin/mpicc +sd_mpi_cflags = +sd_mpi_cppflags = -I/opt/local/include +sd_mpi_cxx = /opt/local/bin/mpicxx +sd_mpi_enable = yes +sd_mpi_enable_cxx = yes +sd_mpi_enable_def = auto +sd_mpi_enable_fc = yes +sd_mpi_fc = /opt/local/bin/mpif90 +sd_mpi_fcflags = -I/opt/local/include +sd_mpi_init = dir +sd_mpi_ldflags = +sd_mpi_libs = +sd_mpi_ok = yes +sd_mpi_options = auto optional fail +sd_mpi_policy = fail +sd_mpi_status = optional +sd_netcdf_cflags = +sd_netcdf_cppflags = -I/opt/local/include +sd_netcdf_enable = yes +sd_netcdf_enable_def = yes +sd_netcdf_fcflags = -I/opt/local/include +sd_netcdf_fortran_cflags = +sd_netcdf_fortran_cppflags = -I/opt/local/include +sd_netcdf_fortran_enable = yes +sd_netcdf_fortran_enable_def = yes +sd_netcdf_fortran_fcflags = -I/opt/local/include +sd_netcdf_fortran_init = dir +sd_netcdf_fortran_ldflags = +sd_netcdf_fortran_libs = -L/opt/local/lib -lnetcdff +sd_netcdf_fortran_ok = yes +sd_netcdf_fortran_options = required warn +sd_netcdf_fortran_policy = warn +sd_netcdf_fortran_status = required +sd_netcdf_init = dir +sd_netcdf_ldflags = +sd_netcdf_libs = -L/opt/local/lib -lnetcdf +sd_netcdf_ok = yes +sd_netcdf_options = required warn +sd_netcdf_policy = warn +sd_netcdf_status = required +sd_papi_cflags = +sd_papi_cppflags = +sd_papi_enable = no +sd_papi_enable_def = no +sd_papi_init = def +sd_papi_ldflags = +sd_papi_libs = +sd_papi_ok = unknown +sd_papi_options = optional fail +sd_papi_policy = fail +sd_papi_sd_papi_fcflags = +sd_papi_status = optional +sd_pfft_cflags = +sd_pfft_cppflags = +sd_pfft_enable = no +sd_pfft_enable_def = no +sd_pfft_init = def +sd_pfft_ldflags = +sd_pfft_libs = +sd_pfft_ok = unknown +sd_pfft_options = optional skip +sd_pfft_policy = skip +sd_pfft_status = optional +sd_sys_fcflags = +sd_triqs_cflags = +sd_triqs_cppflags = +sd_triqs_cxxflags = +sd_triqs_enable = no +sd_triqs_enable_def = no +sd_triqs_fcflags = +sd_triqs_init = def +sd_triqs_ldflags = +sd_triqs_libs = +sd_triqs_ok = unknown +sd_triqs_options = optional fail +sd_triqs_policy = fail +sd_triqs_status = optional +sd_wannier90_cppflags = +sd_wannier90_enable = yes +sd_wannier90_enable_def = no +sd_wannier90_fcflags = -I/opt/local/include +sd_wannier90_init = env +sd_wannier90_ldflags = +sd_wannier90_libs = -L/opt/local/lib -lwannier +sd_wannier90_ok = yes +sd_wannier90_options = optional warn +sd_wannier90_policy = warn +sd_wannier90_status = optional +sd_xmlf90_cppflags = +sd_xmlf90_enable = no +sd_xmlf90_enable_def = no +sd_xmlf90_fcflags = +sd_xmlf90_init = def +sd_xmlf90_ldflags = +sd_xmlf90_libs = +sd_xmlf90_ok = unknown +sd_xmlf90_options = optional warn +sd_xmlf90_policy = warn +sd_xmlf90_status = optional +sd_yakl_cppflags = +sd_yakl_enable = no +sd_yakl_enable_def = no +sd_yakl_fcflags = +sd_yakl_init = def +sd_yakl_ldflags = +sd_yakl_libs = +sd_yakl_ok = unknown +sd_yakl_options = optional fail +sd_yakl_policy = fail +sd_yakl_status = optional +sharedstatedir = ${prefix}/com +src_02_clib_fcflags = -I$(top_builddir)/shared/common/src/02_clib -I$(top_srcdir)/shared/common/src/02_clib +src_10_defs_fcflags = -I$(top_builddir)/shared/common/src/10_defs -I$(top_srcdir)/shared/common/src/10_defs +src_11_memory_mpi_fcflags = -I$(top_builddir)/shared/common/src/11_memory_mpi -I$(top_srcdir)/shared/common/src/11_memory_mpi +src_12_hide_mpi_fcflags = -I$(top_builddir)/shared/common/src/12_hide_mpi -I$(top_srcdir)/shared/common/src/12_hide_mpi +src_14_hidewrite_fcflags = -I$(top_builddir)/shared/common/src/14_hidewrite -I$(top_srcdir)/shared/common/src/14_hidewrite +src_16_hideleave_fcflags = -I$(top_builddir)/shared/common/src/16_hideleave -I$(top_srcdir)/shared/common/src/16_hideleave +src_16_kokkos_toolbox_fcflags = -I$(top_builddir)/shared/common/src/16_kokkos_toolbox -I$(top_srcdir)/shared/common/src/16_kokkos_toolbox +src_17_gpu_toolbox_fcflags = -I$(top_builddir)/shared/common/src/17_gpu_toolbox -I$(top_srcdir)/shared/common/src/17_gpu_toolbox +src_17_libtetra_ext_fcflags = -I$(top_builddir)/shared/common/src/17_libtetra_ext -I$(top_srcdir)/shared/common/src/17_libtetra_ext +src_17_minimax_fcflags = -I$(top_builddir)/shared/common/src/17_minimax -I$(top_srcdir)/shared/common/src/17_minimax +src_17_yaml_out_fcflags = -I$(top_builddir)/shared/common/src/17_yaml_out -I$(top_srcdir)/shared/common/src/17_yaml_out +src_18_timing_fcflags = -I$(top_builddir)/shared/common/src/18_timing -I$(top_srcdir)/shared/common/src/18_timing +src_21_hashfuncs_fcflags = -I$(top_builddir)/shared/common/src/21_hashfuncs -I$(top_srcdir)/shared/common/src/21_hashfuncs +src_27_toolbox_oop_fcflags = -I$(top_builddir)/shared/common/src/27_toolbox_oop -I$(top_srcdir)/shared/common/src/27_toolbox_oop +src_28_numeric_noabirule_fcflags = -I$(top_builddir)/shared/common/src/28_numeric_noabirule -I$(top_srcdir)/shared/common/src/28_numeric_noabirule +src_29_kpoints_fcflags = -I$(top_builddir)/shared/common/src/29_kpoints -I$(top_srcdir)/shared/common/src/29_kpoints +src_32_util_fcflags = -I$(top_builddir)/shared/common/src/32_util -I$(top_srcdir)/shared/common/src/32_util +src_33_xc_lowlevel_fcflags = -I$(top_builddir)/shared/common/src/33_xc_lowlevel -I$(top_srcdir)/shared/common/src/33_xc_lowlevel +src_39_libpaw_fcflags = -I$(top_builddir)/shared/libpaw/src -I$(top_srcdir)/shared/libpaw/src +src_41_geometry_fcflags = -I$(top_builddir)/src/41_geometry -I$(top_srcdir)/src/41_geometry +src_42_nlstrain_fcflags = -I$(top_builddir)/src/42_nlstrain -I$(top_srcdir)/src/42_nlstrain +src_42_parser_fcflags = -I$(top_builddir)/src/42_parser -I$(top_srcdir)/src/42_parser +src_43_ptgroups_fcflags = -I$(top_builddir)/src/43_ptgroups -I$(top_srcdir)/src/43_ptgroups +src_43_wvl_wrappers_fcflags = -I$(top_builddir)/src/43_wvl_wrappers -I$(top_srcdir)/src/43_wvl_wrappers +src_44_abitools_fcflags = -I$(top_builddir)/src/44_abitools -I$(top_srcdir)/src/44_abitools +src_44_abitypes_defs_fcflags = -I$(top_builddir)/src/44_abitypes_defs -I$(top_srcdir)/src/44_abitypes_defs +src_44_manage_kokkos_fcflags = -I$(top_builddir)/src/44_manage_kokkos -I$(top_srcdir)/src/44_manage_kokkos +src_45_geomoptim_fcflags = -I$(top_builddir)/src/45_geomoptim -I$(top_srcdir)/src/45_geomoptim +src_45_xgTools_fcflags = -I$(top_builddir)/src/45_xgTools -I$(top_srcdir)/src/45_xgTools +src_46_ghc_omp_fcflags = -I$(top_builddir)/src/46_ghc_omp -I$(top_srcdir)/src/46_ghc_omp +src_46_manage_cuda_fcflags = -I$(top_builddir)/src/46_manage_cuda -I$(top_srcdir)/src/46_manage_cuda +src_48_diago_fcflags = -I$(top_builddir)/src/48_diago -I$(top_srcdir)/src/48_diago +src_49_gw_toolbox_oop_fcflags = -I$(top_builddir)/src/49_gw_toolbox_oop -I$(top_srcdir)/src/49_gw_toolbox_oop +src_51_manage_mpi_fcflags = -I$(top_builddir)/src/51_manage_mpi -I$(top_srcdir)/src/51_manage_mpi +src_52_fft_mpi_noabirule_fcflags = -I$(top_builddir)/src/52_fft_mpi_noabirule -I$(top_srcdir)/src/52_fft_mpi_noabirule +src_53_ffts_fcflags = -I$(top_builddir)/src/53_ffts -I$(top_srcdir)/src/53_ffts +src_54_spacepar_fcflags = -I$(top_builddir)/src/54_spacepar -I$(top_srcdir)/src/54_spacepar +src_55_abiutil_fcflags = -I$(top_builddir)/src/55_abiutil -I$(top_srcdir)/src/55_abiutil +src_56_io_mpi_fcflags = -I$(top_builddir)/src/56_io_mpi -I$(top_srcdir)/src/56_io_mpi +src_56_mixing_fcflags = -I$(top_builddir)/src/56_mixing -I$(top_srcdir)/src/56_mixing +src_56_recipspace_fcflags = -I$(top_builddir)/src/56_recipspace -I$(top_srcdir)/src/56_recipspace +src_56_xc_fcflags = -I$(top_builddir)/src/56_xc -I$(top_srcdir)/src/56_xc +src_57_iopsp_parser_fcflags = -I$(top_builddir)/src/57_iopsp_parser -I$(top_srcdir)/src/57_iopsp_parser +src_57_iovars_fcflags = -I$(top_builddir)/src/57_iovars -I$(top_srcdir)/src/57_iovars +src_61_occeig_fcflags = -I$(top_builddir)/src/61_occeig -I$(top_srcdir)/src/61_occeig +src_62_cg_noabirule_fcflags = -I$(top_builddir)/src/62_cg_noabirule -I$(top_srcdir)/src/62_cg_noabirule +src_62_ctqmc_fcflags = -I$(top_builddir)/src/62_ctqmc -I$(top_srcdir)/src/62_ctqmc +src_62_iowfdenpot_fcflags = -I$(top_builddir)/src/62_iowfdenpot -I$(top_srcdir)/src/62_iowfdenpot +src_62_poisson_fcflags = -I$(top_builddir)/src/62_poisson -I$(top_srcdir)/src/62_poisson +src_62_wvl_wfs_fcflags = -I$(top_builddir)/src/62_wvl_wfs -I$(top_srcdir)/src/62_wvl_wfs +src_64_psp_fcflags = -I$(top_builddir)/src/64_psp -I$(top_srcdir)/src/64_psp +src_65_lotf_base_fcflags = -I$(top_builddir)/src/65_lotf_base -I$(top_srcdir)/src/65_lotf_base +src_65_paw_fcflags = -I$(top_builddir)/src/65_paw -I$(top_srcdir)/src/65_paw +src_66_nonlocal_fcflags = -I$(top_builddir)/src/66_nonlocal -I$(top_srcdir)/src/66_nonlocal +src_66_vdwxc_fcflags = -I$(top_builddir)/src/66_vdwxc -I$(top_srcdir)/src/66_vdwxc +src_66_wfs_fcflags = -I$(top_builddir)/src/66_wfs -I$(top_srcdir)/src/66_wfs +src_67_common_fcflags = -I$(top_builddir)/src/67_common -I$(top_srcdir)/src/67_common +src_67_python_invocation_ext_fcflags = -I$(top_builddir)/src/67_python_invocation_ext -I$(top_srcdir)/src/67_python_invocation_ext +src_67_triqs_ext_fcflags = -I$(top_builddir)/src/67_triqs_ext -I$(top_srcdir)/src/67_triqs_ext +src_68_dmft_fcflags = -I$(top_builddir)/src/68_dmft -I$(top_srcdir)/src/68_dmft +src_68_lotf_fcflags = -I$(top_builddir)/src/68_lotf -I$(top_srcdir)/src/68_lotf +src_68_recursion_fcflags = -I$(top_builddir)/src/68_recursion -I$(top_srcdir)/src/68_recursion +src_68_rsprc_fcflags = -I$(top_builddir)/src/68_rsprc -I$(top_srcdir)/src/68_rsprc +src_69_wfdesc_fcflags = -I$(top_builddir)/src/69_wfdesc -I$(top_srcdir)/src/69_wfdesc +src_70_gw_fcflags = -I$(top_builddir)/src/70_gw -I$(top_srcdir)/src/70_gw +src_71_bse_fcflags = -I$(top_builddir)/src/71_bse -I$(top_srcdir)/src/71_bse +src_71_wannier_fcflags = -I$(top_builddir)/src/71_wannier -I$(top_srcdir)/src/71_wannier +src_72_response_fcflags = -I$(top_builddir)/src/72_response -I$(top_srcdir)/src/72_response +src_77_ddb_fcflags = -I$(top_builddir)/src/77_ddb -I$(top_srcdir)/src/77_ddb +src_77_suscep_fcflags = -I$(top_builddir)/src/77_suscep -I$(top_srcdir)/src/77_suscep +src_78_effpot_fcflags = -I$(top_builddir)/src/78_effpot -I$(top_srcdir)/src/78_effpot +src_78_eph_fcflags = -I$(top_builddir)/src/78_eph -I$(top_srcdir)/src/78_eph +src_79_seqpar_mpi_fcflags = -I$(top_builddir)/src/79_seqpar_mpi -I$(top_srcdir)/src/79_seqpar_mpi +src_80_rttddft_fcflags = -I$(top_builddir)/src/80_rttddft -I$(top_srcdir)/src/80_rttddft +src_80_tdep_fcflags = -I$(top_builddir)/src/80_tdep -I$(top_srcdir)/src/80_tdep +src_94_scfcv_fcflags = -I$(top_builddir)/src/94_scfcv -I$(top_srcdir)/src/94_scfcv +src_95_drive_fcflags = -I$(top_builddir)/src/95_drive -I$(top_srcdir)/src/95_drive +src_common_fcflags = -I$(top_builddir)/shared/common/src/incs -I$(top_srcdir)/shared/common/src/incs -I$(top_builddir)/shared/common/src/mods -I$(top_srcdir)/shared/common/src/mods +src_core_fcflags = -I$(top_builddir)/src/incs -I$(top_srcdir)/src/incs -I$(top_builddir)/src/mods -I$(top_srcdir)/src/mods +src_libpaw_fcflags = -I$(top_builddir)/shared/libpaw/incs -I$(top_srcdir)/shared/libpaw/incs -I$(top_builddir)/shared/libpaw/mods -I$(top_srcdir)/shared/libpaw/mods +srcdir = . +sysconfdir = ${prefix}/etc +target = x86_64-apple-darwin18.7.0 +target_alias = +target_cpu = x86_64 +target_os = darwin18.7.0 +target_vendor = apple +top_build_prefix = ../../../../ +top_builddir = ../../../.. +top_srcdir = ../../../.. +with_abinit_common = +with_bigdft = +with_config_file = +with_debug_flavor = +with_fallbacks = +with_fc_vendor = +with_fc_version = +with_fft_flavor = fftw3 +with_fftw3 = +with_gnu_ld = +with_gpu = +with_hdf5 = /opt/local +with_kokkos = +with_levmar = +with_libpaw = +with_libpsml = +with_libxc = /opt/local +with_libxml2 = +with_linalg_flavor = openblas +with_mpi = /opt/local +with_mpi_level = +with_netcdf = /opt/local +with_optim_flavor = +with_papi = +with_pfft = +with_triqs = +with_wannier90 = +with_xmlf90 = +with_yakl = +AM_CFLAGS = -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include +AM_CXXFLAGS = $(sd_triqs_cxxflags) +AM_FCFLAGS = -ffree-form -J../mods +AM_CPPFLAGS = \ + -I$(top_builddir)/shared/common/src/02_clib -I$(top_srcdir)/shared/common/src/02_clib \ + -I$(top_builddir)/shared/common/src/10_defs -I$(top_srcdir)/shared/common/src/10_defs \ + -I$(top_builddir)/shared/common/src/14_hidewrite -I$(top_srcdir)/shared/common/src/14_hidewrite \ + -I$(top_builddir)/shared/common/src/16_hideleave -I$(top_srcdir)/shared/common/src/16_hideleave \ + -I$(top_builddir)/shared/common/src/17_libtetra_ext -I$(top_srcdir)/shared/common/src/17_libtetra_ext \ + -I$(top_builddir)/shared/common/src/17_yaml_out -I$(top_srcdir)/shared/common/src/17_yaml_out \ + -I$(top_builddir)/shared/common/src/28_numeric_noabirule -I$(top_srcdir)/shared/common/src/28_numeric_noabirule \ + -I$(top_builddir)/shared/common/src/incs -I$(top_srcdir)/shared/common/src/incs -I$(top_builddir)/shared/common/src/mods -I$(top_srcdir)/shared/common/src/mods \ + -I$(top_builddir)/src/incs -I$(top_srcdir)/src/incs -I$(top_builddir)/src/mods -I$(top_srcdir)/src/mods \ + -I$(top_builddir)/shared/libpaw/incs -I$(top_srcdir)/shared/libpaw/incs -I$(top_builddir)/shared/libpaw/mods -I$(top_srcdir)/shared/libpaw/mods \ + -I/opt/local/include \ + -I/opt/local/include \ + \ + -I/opt/local/include \ + -I/opt/local/include -I/opt/local/include \ + -I/opt/local/include \ + -I/opt/local/include \ + -I/opt/local/include \ + -I/opt/local/include \ + + + +# Regular source files +lib32_util_srcs = \ + m_atomdata.F90 \ + m_dummy.F90 \ + m_exp_mat.F90 \ + m_matrix.F90 \ + m_pptools.F90 \ + m_special_funcs.F90 \ + m_symtk.F90 \ + m_pstat.F90 + + +# Source files depending on conditionals + +# Library description +noinst_LIBRARIES = lib32_util.a +lib32_util_a_SOURCES = $(lib32_util_srcs) + +# Dependencies (inside the directory) of directory 32_util +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. +CLEANFILES = m_atomdata_cpp.f90 m_dummy_cpp.f90 m_exp_mat_cpp.f90 \ + m_matrix_cpp.f90 m_pptools_cpp.f90 m_special_funcs_cpp.f90 \ + m_symtk_cpp.f90 m_pstat_cpp.f90 m_atomdata.$(MODEXT) \ + m_dummy.$(MODEXT) m_exp_mat.$(MODEXT) m_matrix.$(MODEXT) \ + m_pptools.$(MODEXT) m_pstat.$(MODEXT) \ + m_special_funcs.$(MODEXT) m_symtk.$(MODEXT) +EXTRA_DIST = abinit.src abinit.dep _32_util_ +all: all-am + +.SUFFIXES: +.SUFFIXES: .F90 .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu shared/common/src/32_util/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu shared/common/src/32_util/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) + +lib32_util.a: $(lib32_util_a_OBJECTS) $(lib32_util_a_DEPENDENCIES) $(EXTRA_lib32_util_a_DEPENDENCIES) + $(AM_V_at)-rm -f lib32_util.a + $(AM_V_AR)$(lib32_util_a_AR) lib32_util.a $(lib32_util_a_OBJECTS) $(lib32_util_a_LIBADD) + $(AM_V_at)$(RANLIB) lib32_util.a + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +.F90.o: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ $< + +.F90.obj: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-noinstLIBRARIES cscopelist-am ctags ctags-am distclean \ + distclean-compile distclean-generic distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am + +.PRECIOUS: Makefile + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/GX-PAW/common/src/32_util/Makefile.am b/GX-PAW/common/src/32_util/Makefile.am new file mode 100644 index 00000000..2dc02b3b --- /dev/null +++ b/GX-PAW/common/src/32_util/Makefile.am @@ -0,0 +1,88 @@ +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-corelibs on 2024/03/16 21:07:38 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-corelibs script or its config file instead. +# + +AM_CFLAGS = @ABI_CPPFLAGS@ +AM_CXXFLAGS = $(sd_triqs_cxxflags) +AM_FCFLAGS = @FPPFLAGS@ @FCFLAGS_FREEFORM@ @FCFLAGS_MODDIR@ @sd_sys_fcflags@ @fcflags_opt_32_util@ + +AM_CPPFLAGS = \ + @src_02_clib_fcflags@ \ + @src_10_defs_fcflags@ \ + @src_14_hidewrite_fcflags@ \ + @src_16_hideleave_fcflags@ \ + @src_17_libtetra_ext_fcflags@ \ + @src_17_yaml_out_fcflags@ \ + @src_28_numeric_noabirule_fcflags@ \ + @src_common_fcflags@ \ + @src_core_fcflags@ \ + @src_libpaw_fcflags@ \ + @sd_fft_cppflags@ \ + @sd_fft_fcflags@ \ + @sd_linalg_cppflags@ \ + @sd_linalg_fcflags@ \ + @sd_hdf5_cppflags@ \ + @sd_netcdf_cppflags@ \ + @sd_netcdf_fcflags@ \ + @sd_netcdf_fortran_cppflags@ \ + @sd_netcdf_fortran_fcflags@ \ + @fc_mod_fcflags@ + +# Regular source files +lib32_util_srcs = \ + m_atomdata.F90 \ + m_dummy.F90 \ + m_exp_mat.F90 \ + m_matrix.F90 \ + m_pptools.F90 \ + m_special_funcs.F90 \ + m_symtk.F90 \ + m_pstat.F90 + +# Source files depending on conditionals + + +# Library description +noinst_LIBRARIES = lib32_util.a + +lib32_util_a_SOURCES= $(lib32_util_srcs) + +CLEANFILES = \ + m_atomdata_cpp.f90 \ + m_dummy_cpp.f90 \ + m_exp_mat_cpp.f90 \ + m_matrix_cpp.f90 \ + m_pptools_cpp.f90 \ + m_special_funcs_cpp.f90 \ + m_symtk_cpp.f90 \ + m_pstat_cpp.f90 + +EXTRA_DIST = abinit.src + +EXTRA_DIST += abinit.dep + +# Dependencies (inside the directory) of directory 32_util +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. + +CLEANFILES += \ + m_atomdata.$(MODEXT) \ + m_dummy.$(MODEXT) \ + m_exp_mat.$(MODEXT) \ + m_matrix.$(MODEXT) \ + m_pptools.$(MODEXT) \ + m_pstat.$(MODEXT) \ + m_special_funcs.$(MODEXT) \ + m_symtk.$(MODEXT) + + +EXTRA_DIST += _32_util_ diff --git a/GX-PAW/common/src/32_util/Makefile.in b/GX-PAW/common/src/32_util/Makefile.in new file mode 100644 index 00000000..eab3594d --- /dev/null +++ b/GX-PAW/common/src/32_util/Makefile.in @@ -0,0 +1,1480 @@ +# Makefile.in generated by automake 1.16.3 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2020 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-corelibs on 2024/03/16 21:07:38 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-corelibs script or its config file instead. +# + +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = shared/common/src/32_util +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/m4/arch-gpu.m4 \ + $(top_srcdir)/config/m4/arch-mpi.m4 \ + $(top_srcdir)/config/m4/auto-autotools.m4 \ + $(top_srcdir)/config/m4/auto-corelibs.m4 \ + $(top_srcdir)/config/m4/auto-debug.m4 \ + $(top_srcdir)/config/m4/auto-dirflags.m4 \ + $(top_srcdir)/config/m4/auto-env.m4 \ + $(top_srcdir)/config/m4/auto-hints.m4 \ + $(top_srcdir)/config/m4/auto-optim.m4 \ + $(top_srcdir)/config/m4/auto-options.m4 \ + $(top_srcdir)/config/m4/auto-output.m4 \ + $(top_srcdir)/config/m4/auto-triggers.m4 \ + $(top_srcdir)/config/m4/conf-atompaw.m4 \ + $(top_srcdir)/config/m4/conf-debug.m4 \ + $(top_srcdir)/config/m4/conf-fallbacks.m4 \ + $(top_srcdir)/config/m4/conf-files.m4 \ + $(top_srcdir)/config/m4/conf-init.m4 \ + $(top_srcdir)/config/m4/conf-openmp.m4 \ + $(top_srcdir)/config/m4/conf-optim.m4 \ + $(top_srcdir)/config/m4/lang-c++.m4 \ + $(top_srcdir)/config/m4/lang-c.m4 \ + $(top_srcdir)/config/m4/lang-fortran-import.m4 \ + $(top_srcdir)/config/m4/lang-fortran.m4 \ + $(top_srcdir)/config/m4/lang-python.m4 \ + $(top_srcdir)/config/m4/libxml2.m4 \ + $(top_srcdir)/config/m4/misc-display.m4 \ + $(top_srcdir)/config/m4/sd_abinit_common.m4 \ + $(top_srcdir)/config/m4/sd_arch_gpu.m4 \ + $(top_srcdir)/config/m4/sd_arch_mpi.m4 \ + $(top_srcdir)/config/m4/sd_bigdft.m4 \ + $(top_srcdir)/config/m4/sd_core.m4 \ + $(top_srcdir)/config/m4/sd_esl.m4 \ + $(top_srcdir)/config/m4/sd_fftw3.m4 \ + $(top_srcdir)/config/m4/sd_gpu_kokkos.m4 \ + $(top_srcdir)/config/m4/sd_gpu_yakl.m4 \ + $(top_srcdir)/config/m4/sd_io_hdf5.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf_fortran.m4 \ + $(top_srcdir)/config/m4/sd_levmar.m4 \ + $(top_srcdir)/config/m4/sd_libpaw.m4 \ + $(top_srcdir)/config/m4/sd_libpsml.m4 \ + $(top_srcdir)/config/m4/sd_libxc.m4 \ + $(top_srcdir)/config/m4/sd_math_fft.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_core.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_util.m4 \ + $(top_srcdir)/config/m4/sd_papi.m4 \ + $(top_srcdir)/config/m4/sd_pfft.m4 \ + $(top_srcdir)/config/m4/sd_triqs.m4 \ + $(top_srcdir)/config/m4/sd_wannier90.m4 \ + $(top_srcdir)/config/m4/sd_xmlf90.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = +lib32_util_a_AR = $(AR) $(ARFLAGS) +lib32_util_a_LIBADD = +am__objects_1 = m_atomdata.$(OBJEXT) m_dummy.$(OBJEXT) \ + m_exp_mat.$(OBJEXT) m_matrix.$(OBJEXT) m_pptools.$(OBJEXT) \ + m_special_funcs.$(OBJEXT) m_symtk.$(OBJEXT) m_pstat.$(OBJEXT) +am_lib32_util_a_OBJECTS = $(am__objects_1) +lib32_util_a_OBJECTS = $(am_lib32_util_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +PPFCCOMPILE = $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) +AM_V_PPFC = $(am__v_PPFC_@AM_V@) +am__v_PPFC_ = $(am__v_PPFC_@AM_DEFAULT_V@) +am__v_PPFC_0 = @echo " PPFC " $@; +am__v_PPFC_1 = +FCLD = $(FC) +FCLINK = $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \ + $@ +AM_V_FCLD = $(am__v_FCLD_@AM_V@) +am__v_FCLD_ = $(am__v_FCLD_@AM_DEFAULT_V@) +am__v_FCLD_0 = @echo " FCLD " $@; +am__v_FCLD_1 = +SOURCES = $(lib32_util_a_SOURCES) +DIST_SOURCES = $(lib32_util_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in README +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ABINIT_BINARY_PACKAGE = @ABINIT_BINARY_PACKAGE@ +ABINIT_COMMON_CPPFLAGS = @ABINIT_COMMON_CPPFLAGS@ +ABINIT_COMMON_FCFLAGS = @ABINIT_COMMON_FCFLAGS@ +ABINIT_COMMON_LDFLAGS = @ABINIT_COMMON_LDFLAGS@ +ABINIT_COMMON_LIBS = @ABINIT_COMMON_LIBS@ +ABINIT_TARGET = @ABINIT_TARGET@ +ABINIT_VERSION = @ABINIT_VERSION@ +ABINIT_VERSION_BASE = @ABINIT_VERSION_BASE@ +ABINIT_VERSION_BUILD = @ABINIT_VERSION_BUILD@ +ABINIT_VERSION_MAJOR = @ABINIT_VERSION_MAJOR@ +ABINIT_VERSION_MICRO = @ABINIT_VERSION_MICRO@ +ABINIT_VERSION_MINOR = @ABINIT_VERSION_MINOR@ +ABI_CPPFLAGS = @ABI_CPPFLAGS@ +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +ARFLAGS = @ARFLAGS@ +ARFLAGS_CMD = @ARFLAGS_CMD@ +ARFLAGS_DEBUG = @ARFLAGS_DEBUG@ +ARFLAGS_EXTRA = @ARFLAGS_EXTRA@ +ARFLAGS_HINTS = @ARFLAGS_HINTS@ +ARFLAGS_OPTIM = @ARFLAGS_OPTIM@ +ATOMPAW_BIN = @ATOMPAW_BIN@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BIGDFT_CPPFLAGS = @BIGDFT_CPPFLAGS@ +BIGDFT_FCFLAGS = @BIGDFT_FCFLAGS@ +BIGDFT_LDFLAGS = @BIGDFT_LDFLAGS@ +BIGDFT_LIBS = @BIGDFT_LIBS@ +BOURNE_SHELL = @BOURNE_SHELL@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CC_LDFLAGS = @CC_LDFLAGS@ +CC_LDFLAGS_DEBUG = @CC_LDFLAGS_DEBUG@ +CC_LDFLAGS_EXTRA = @CC_LDFLAGS_EXTRA@ +CC_LDFLAGS_GPU = @CC_LDFLAGS_GPU@ +CC_LDFLAGS_HINTS = @CC_LDFLAGS_HINTS@ +CC_LDFLAGS_OPTIM = @CC_LDFLAGS_OPTIM@ +CC_LIBS = @CC_LIBS@ +CC_LIBS_DEBUG = @CC_LIBS_DEBUG@ +CC_LIBS_EXTRA = @CC_LIBS_EXTRA@ +CC_LIBS_GPU = @CC_LIBS_GPU@ +CC_LIBS_HINTS = @CC_LIBS_HINTS@ +CC_LIBS_OPTIM = @CC_LIBS_OPTIM@ +CFLAGS = @CFLAGS@ +CFLAGS_DEBUG = @CFLAGS_DEBUG@ +CFLAGS_EXTRA = @CFLAGS_EXTRA@ +CFLAGS_GPU = @CFLAGS_GPU@ +CFLAGS_HINTS = @CFLAGS_HINTS@ +CFLAGS_OPTIM = @CFLAGS_OPTIM@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CPPFLAGS_DEBUG = @CPPFLAGS_DEBUG@ +CPPFLAGS_EXTRA = @CPPFLAGS_EXTRA@ +CPPFLAGS_GPU = @CPPFLAGS_GPU@ +CPPFLAGS_HINTS = @CPPFLAGS_HINTS@ +CPPFLAGS_HINTS_EXT = @CPPFLAGS_HINTS_EXT@ +CPPFLAGS_OPTIM = @CPPFLAGS_OPTIM@ +CXX = @CXX@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CXXFLAGS_DEBUG = @CXXFLAGS_DEBUG@ +CXXFLAGS_EXTRA = @CXXFLAGS_EXTRA@ +CXXFLAGS_GPU = @CXXFLAGS_GPU@ +CXXFLAGS_HINTS = @CXXFLAGS_HINTS@ +CXXFLAGS_OPTIM = @CXXFLAGS_OPTIM@ +CXX_LDFLAGS = @CXX_LDFLAGS@ +CXX_LDFLAGS_DEBUG = @CXX_LDFLAGS_DEBUG@ +CXX_LDFLAGS_EXTRA = @CXX_LDFLAGS_EXTRA@ +CXX_LDFLAGS_GPU = @CXX_LDFLAGS_GPU@ +CXX_LDFLAGS_HINTS = @CXX_LDFLAGS_HINTS@ +CXX_LDFLAGS_OPTIM = @CXX_LDFLAGS_OPTIM@ +CXX_LIBS = @CXX_LIBS@ +CXX_LIBS_DEBUG = @CXX_LIBS_DEBUG@ +CXX_LIBS_EXTRA = @CXX_LIBS_EXTRA@ +CXX_LIBS_GPU = @CXX_LIBS_GPU@ +CXX_LIBS_HINTS = @CXX_LIBS_HINTS@ +CXX_LIBS_OPTIM = @CXX_LIBS_OPTIM@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ +FCFLAGS = @FCFLAGS@ +FCFLAGS_DEBUG = @FCFLAGS_DEBUG@ +FCFLAGS_EXTRA = @FCFLAGS_EXTRA@ +FCFLAGS_F90 = @FCFLAGS_F90@ +FCFLAGS_FIXEDFORM = @FCFLAGS_FIXEDFORM@ +FCFLAGS_FREEFORM = @FCFLAGS_FREEFORM@ +FCFLAGS_HINTS = @FCFLAGS_HINTS@ +FCFLAGS_MODDIR = @FCFLAGS_MODDIR@ +FCFLAGS_OPENMP = @FCFLAGS_OPENMP@ +FCFLAGS_OPENMP_OFFLOAD = @FCFLAGS_OPENMP_OFFLOAD@ +FCFLAGS_OPTIM = @FCFLAGS_OPTIM@ +FCLIBS = @FCLIBS@ +FC_LDFLAGS = @FC_LDFLAGS@ +FC_LDFLAGS_DEBUG = @FC_LDFLAGS_DEBUG@ +FC_LDFLAGS_EXTRA = @FC_LDFLAGS_EXTRA@ +FC_LDFLAGS_HINTS = @FC_LDFLAGS_HINTS@ +FC_LDFLAGS_OPTIM = @FC_LDFLAGS_OPTIM@ +FC_LIBS = @FC_LIBS@ +FC_LIBS_DEBUG = @FC_LIBS_DEBUG@ +FC_LIBS_EXTRA = @FC_LIBS_EXTRA@ +FC_LIBS_HINTS = @FC_LIBS_HINTS@ +FC_LIBS_OPTIM = @FC_LIBS_OPTIM@ +FC_NOWRAP = @FC_NOWRAP@ +FFLAGS = @FFLAGS@ +FFTW3_CFLAGS = @FFTW3_CFLAGS@ +FFTW3_CPPFLAGS = @FFTW3_CPPFLAGS@ +FFTW3_FCFLAGS = @FFTW3_FCFLAGS@ +FFTW3_LDFLAGS = @FFTW3_LDFLAGS@ +FFTW3_LIBS = @FFTW3_LIBS@ +FFT_CFLAGS = @FFT_CFLAGS@ +FFT_FCFLAGS = @FFT_FCFLAGS@ +FPP = @FPP@ +FPPFLAGS = @FPPFLAGS@ +FPPFLAGS_DEBUG = @FPPFLAGS_DEBUG@ +FPPFLAGS_EXTRA = @FPPFLAGS_EXTRA@ +FPPFLAGS_HINTS = @FPPFLAGS_HINTS@ +FPPFLAGS_OPTIM = @FPPFLAGS_OPTIM@ +GPU_ARCH = @GPU_ARCH@ +GPU_CFLAGS = @GPU_CFLAGS@ +GPU_CPPFLAGS = @GPU_CPPFLAGS@ +GPU_CXXFLAGS = @GPU_CXXFLAGS@ +GPU_FCFLAGS = @GPU_FCFLAGS@ +GPU_LDFLAGS = @GPU_LDFLAGS@ +GPU_LIBS = @GPU_LIBS@ +GRAPHATOM_BIN = @GRAPHATOM_BIN@ +GREP = @GREP@ +H5CC = @H5CC@ +HDF5_CFLAGS = @HDF5_CFLAGS@ +HDF5_CPPFLAGS = @HDF5_CPPFLAGS@ +HDF5_CXXFLAGS = @HDF5_CXXFLAGS@ +HDF5_FCFLAGS = @HDF5_FCFLAGS@ +HDF5_LDFLAGS = @HDF5_LDFLAGS@ +HDF5_LIBS = @HDF5_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +LDFLAGS = @LDFLAGS@ +LEVMAR_CFLAGS = @LEVMAR_CFLAGS@ +LEVMAR_CPPFLAGS = @LEVMAR_CPPFLAGS@ +LEVMAR_LDFLAGS = @LEVMAR_LDFLAGS@ +LEVMAR_LIBS = @LEVMAR_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPAW_CPPFLAGS = @LIBPAW_CPPFLAGS@ +LIBPAW_FCFLAGS = @LIBPAW_FCFLAGS@ +LIBPAW_LDFLAGS = @LIBPAW_LDFLAGS@ +LIBPAW_LIBS = @LIBPAW_LIBS@ +LIBPSML_CPPFLAGS = @LIBPSML_CPPFLAGS@ +LIBPSML_FCFLAGS = @LIBPSML_FCFLAGS@ +LIBPSML_LDFLAGS = @LIBPSML_LDFLAGS@ +LIBPSML_LIBS = @LIBPSML_LIBS@ +LIBS = @LIBS@ +LIBXC_CFLAGS = @LIBXC_CFLAGS@ +LIBXC_CPPFLAGS = @LIBXC_CPPFLAGS@ +LIBXC_FCFLAGS = @LIBXC_FCFLAGS@ +LIBXC_LDFLAGS = @LIBXC_LDFLAGS@ +LIBXC_LIBS = @LIBXC_LIBS@ +LIBXML2_CPPFLAGS = @LIBXML2_CPPFLAGS@ +LIBXML2_FCFLAGS = @LIBXML2_FCFLAGS@ +LIBXML2_LIBS = @LIBXML2_LIBS@ +LINALG_CFLAGS = @LINALG_CFLAGS@ +LINALG_CPPFLAGS = @LINALG_CPPFLAGS@ +LINALG_CXXFLAGS = @LINALG_CXXFLAGS@ +LINALG_FCFLAGS = @LINALG_FCFLAGS@ +LINALG_LDFLAGS = @LINALG_LDFLAGS@ +LINALG_LIBS = @LINALG_LIBS@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODEXT = @MODEXT@ +MPI_CFLAGS = @MPI_CFLAGS@ +MPI_CPPFLAGS = @MPI_CPPFLAGS@ +MPI_CXXFLAGS = @MPI_CXXFLAGS@ +MPI_FCFLAGS = @MPI_FCFLAGS@ +MPI_LDFLAGS = @MPI_LDFLAGS@ +MPI_LIBS = @MPI_LIBS@ +MV = @MV@ +NETCDF_CFLAGS = @NETCDF_CFLAGS@ +NETCDF_CPPFLAGS = @NETCDF_CPPFLAGS@ +NETCDF_CXXFLAGS = @NETCDF_CXXFLAGS@ +NETCDF_FCFLAGS = @NETCDF_FCFLAGS@ +NETCDF_FORTRAN_CFLAGS = @NETCDF_FORTRAN_CFLAGS@ +NETCDF_FORTRAN_CPPFLAGS = @NETCDF_FORTRAN_CPPFLAGS@ +NETCDF_FORTRAN_CXXFLAGS = @NETCDF_FORTRAN_CXXFLAGS@ +NETCDF_FORTRAN_FCFLAGS = @NETCDF_FORTRAN_FCFLAGS@ +NETCDF_FORTRAN_LDFLAGS = @NETCDF_FORTRAN_LDFLAGS@ +NETCDF_FORTRAN_LIBS = @NETCDF_FORTRAN_LIBS@ +NETCDF_LDFLAGS = @NETCDF_LDFLAGS@ +NETCDF_LIBS = @NETCDF_LIBS@ +NVCC = @NVCC@ +NVCC_CFLAGS = @NVCC_CFLAGS@ +NVCC_CPPFLAGS = @NVCC_CPPFLAGS@ +NVCC_LDFLAGS = @NVCC_LDFLAGS@ +NVCC_LIBS = @NVCC_LIBS@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PAPI_CFLAGS = @PAPI_CFLAGS@ +PAPI_CPPFLAGS = @PAPI_CPPFLAGS@ +PAPI_LDFLAGS = @PAPI_LDFLAGS@ +PAPI_LIBS = @PAPI_LIBS@ +PATCH = @PATCH@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PFFT_CFLAGS = @PFFT_CFLAGS@ +PFFT_CPPFLAGS = @PFFT_CPPFLAGS@ +PFFT_LDFLAGS = @PFFT_LDFLAGS@ +PFFT_LIBS = @PFFT_LIBS@ +PYFLAGS = @PYFLAGS@ +PYTHON = @PYTHON@ +PYTHON_CONFIG = @PYTHON_CONFIG@ +PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ +RANLIB = @RANLIB@ +REALPATH = @REALPATH@ +RM = @RM@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +TAR = @TAR@ +TRIQS_CFLAGS = @TRIQS_CFLAGS@ +TRIQS_CPPFLAGS = @TRIQS_CPPFLAGS@ +TRIQS_CXXFLAGS = @TRIQS_CXXFLAGS@ +TRIQS_LDFLAGS = @TRIQS_LDFLAGS@ +TRIQS_LIBS = @TRIQS_LIBS@ +TRUE_CPP = @TRUE_CPP@ +VERSION = @VERSION@ +WANNIER90_CPPFLAGS = @WANNIER90_CPPFLAGS@ +WANNIER90_FCFLAGS = @WANNIER90_FCFLAGS@ +WANNIER90_LDFLAGS = @WANNIER90_LDFLAGS@ +WANNIER90_LIBS = @WANNIER90_LIBS@ +XML2_CONFIG = @XML2_CONFIG@ +XMLF90_CPPFLAGS = @XMLF90_CPPFLAGS@ +XMLF90_FCFLAGS = @XMLF90_FCFLAGS@ +XMLF90_LDFLAGS = @XMLF90_LDFLAGS@ +XMLF90_LIBS = @XMLF90_LIBS@ +XML_CPPFLAGS = @XML_CPPFLAGS@ +XML_LIBS = @XML_LIBS@ +XPP = @XPP@ +XPPFLAGS = @XPPFLAGS@ +XPPFLAGS_DEBUG = @XPPFLAGS_DEBUG@ +XPPFLAGS_EXTRA = @XPPFLAGS_EXTRA@ +XPPFLAGS_OPTIM = @XPPFLAGS_OPTIM@ +YAKL_CPPFLAGS = @YAKL_CPPFLAGS@ +YAKL_FCFLAGS = @YAKL_FCFLAGS@ +YAKL_LDFLAGS = @YAKL_LDFLAGS@ +YAKL_LIBS = @YAKL_LIBS@ +abi_ac_distcheck = @abi_ac_distcheck@ +abi_ac_version = @abi_ac_version@ +abi_am_version = @abi_am_version@ +abi_avx_safe_mode_enable = @abi_avx_safe_mode_enable@ +abi_bse_unpacked_enable = @abi_bse_unpacked_enable@ +abi_cc_path = @abi_cc_path@ +abi_cc_vendor = @abi_cc_vendor@ +abi_cc_version = @abi_cc_version@ +abi_cclock_enable = @abi_cclock_enable@ +abi_cpp_path = @abi_cpp_path@ +abi_cpu_64bits = @abi_cpu_64bits@ +abi_cpu_bits = @abi_cpu_bits@ +abi_cpu_model = @abi_cpu_model@ +abi_cpu_platform = @abi_cpu_platform@ +abi_cpu_spec = @abi_cpu_spec@ +abi_cpu_vendor = @abi_cpu_vendor@ +abi_crpa_optim_enable = @abi_crpa_optim_enable@ +abi_cxx_path = @abi_cxx_path@ +abi_cxx_vendor = @abi_cxx_vendor@ +abi_cxx_version = @abi_cxx_version@ +abi_debug_flavor = @abi_debug_flavor@ +abi_exports_enable = @abi_exports_enable@ +abi_fbk_abinit_common_ok = @abi_fbk_abinit_common_ok@ +abi_fbk_bigdft_ok = @abi_fbk_bigdft_ok@ +abi_fbk_config = @abi_fbk_config@ +abi_fbk_enable = @abi_fbk_enable@ +abi_fbk_fft_ok = @abi_fbk_fft_ok@ +abi_fbk_fftw3_ok = @abi_fbk_fftw3_ok@ +abi_fbk_gpu_ok = @abi_fbk_gpu_ok@ +abi_fbk_hdf5_ok = @abi_fbk_hdf5_ok@ +abi_fbk_init = @abi_fbk_init@ +abi_fbk_kokkos_ok = @abi_fbk_kokkos_ok@ +abi_fbk_levmar_ok = @abi_fbk_levmar_ok@ +abi_fbk_libpaw_ok = @abi_fbk_libpaw_ok@ +abi_fbk_libpsml_ok = @abi_fbk_libpsml_ok@ +abi_fbk_libxc_ok = @abi_fbk_libxc_ok@ +abi_fbk_libxml2_ok = @abi_fbk_libxml2_ok@ +abi_fbk_linalg_ok = @abi_fbk_linalg_ok@ +abi_fbk_list = @abi_fbk_list@ +abi_fbk_mpi_ok = @abi_fbk_mpi_ok@ +abi_fbk_netcdf_fortran_ok = @abi_fbk_netcdf_fortran_ok@ +abi_fbk_netcdf_ok = @abi_fbk_netcdf_ok@ +abi_fbk_papi_ok = @abi_fbk_papi_ok@ +abi_fbk_pfft_ok = @abi_fbk_pfft_ok@ +abi_fbk_prefix = @abi_fbk_prefix@ +abi_fbk_required = @abi_fbk_required@ +abi_fbk_triqs_ok = @abi_fbk_triqs_ok@ +abi_fbk_wannier90_ok = @abi_fbk_wannier90_ok@ +abi_fbk_xmlf90_ok = @abi_fbk_xmlf90_ok@ +abi_fbk_yakl_ok = @abi_fbk_yakl_ok@ +abi_fc_path = @abi_fc_path@ +abi_fc_vendor = @abi_fc_vendor@ +abi_fc_version = @abi_fc_version@ +abi_fc_wrap = @abi_fc_wrap@ +abi_fc_wrapper_enable = @abi_fc_wrapper_enable@ +abi_fpp_path = @abi_fpp_path@ +abi_gpu_arch = @abi_gpu_arch@ +abi_gpu_fcflags = @abi_gpu_fcflags@ +abi_gpu_flavor = @abi_gpu_flavor@ +abi_gpu_hip_libdir = @abi_gpu_hip_libdir@ +abi_gpu_incs = @abi_gpu_incs@ +abi_gpu_ldflags = @abi_gpu_ldflags@ +abi_gpu_libs = @abi_gpu_libs@ +abi_gpu_nvtx_v3 = @abi_gpu_nvtx_v3@ +abi_gpu_roctx = @abi_gpu_roctx@ +abi_gw_dpc_enable = @abi_gw_dpc_enable@ +abi_hints_enable = @abi_hints_enable@ +abi_libtetra_enable = @abi_libtetra_enable@ +abi_libxml2_cppflags = @abi_libxml2_cppflags@ +abi_libxml2_enable = @abi_libxml2_enable@ +abi_libxml2_fcflags = @abi_libxml2_fcflags@ +abi_libxml2_init = @abi_libxml2_init@ +abi_libxml2_ldflags = @abi_libxml2_ldflags@ +abi_libxml2_libs = @abi_libxml2_libs@ +abi_libxml2_ok = @abi_libxml2_ok@ +abi_libxml2_prefix = @abi_libxml2_prefix@ +abi_lotf_enable = @abi_lotf_enable@ +abi_lt_version = @abi_lt_version@ +abi_m4_version = @abi_m4_version@ +abi_memory_profiling_enable = @abi_memory_profiling_enable@ +abi_mpi_cflags = @abi_mpi_cflags@ +abi_mpi_cppflags = @abi_mpi_cppflags@ +abi_mpi_cxxflags = @abi_mpi_cxxflags@ +abi_mpi_enable = @abi_mpi_enable@ +abi_mpi_fcflags = @abi_mpi_fcflags@ +abi_mpi_flavor = @abi_mpi_flavor@ +abi_mpi_gpu_aware_enable = @abi_mpi_gpu_aware_enable@ +abi_mpi_incs = @abi_mpi_incs@ +abi_mpi_inplace_enable = @abi_mpi_inplace_enable@ +abi_mpi_interfaces_bugfix_enable = @abi_mpi_interfaces_bugfix_enable@ +abi_mpi_io_default_enable = @abi_mpi_io_default_enable@ +abi_mpi_io_enable = @abi_mpi_io_enable@ +abi_mpi_ldflags = @abi_mpi_ldflags@ +abi_mpi_level = @abi_mpi_level@ +abi_mpi_libs = @abi_mpi_libs@ +abi_netcdf_default_enable = @abi_netcdf_default_enable@ +abi_openmp_enable = @abi_openmp_enable@ +abi_openmp_offload_enable = @abi_openmp_offload_enable@ +abi_optim_flavor = @abi_optim_flavor@ +abi_python_invocation_enable = @abi_python_invocation_enable@ +abi_source_debug_enable = @abi_source_debug_enable@ +abi_stdin_enable = @abi_stdin_enable@ +abi_sys_spec = @abi_sys_spec@ +abi_timer_enable = @abi_timer_enable@ +abi_triqs_v1_4_enable = @abi_triqs_v1_4_enable@ +abi_triqs_v2_0_enable = @abi_triqs_v2_0_enable@ +abi_zdot_bugfix_enable = @abi_zdot_bugfix_enable@ +abinit_bindir = @abinit_bindir@ +abinit_builddir = @abinit_builddir@ +abinit_chkdir = @abinit_chkdir@ +abinit_datdir = @abinit_datdir@ +abinit_docdir = @abinit_docdir@ +abinit_incdir = @abinit_incdir@ +abinit_libdir = @abinit_libdir@ +abinit_mandir = @abinit_mandir@ +abinit_prefix = @abinit_prefix@ +abinit_srcdir = @abinit_srcdir@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_FC = @ac_ct_FC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cc_info_string = @cc_info_string@ +cxx_info_string = @cxx_info_string@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +enable_avx_safe_mode = @enable_avx_safe_mode@ +enable_bse_unpacked = @enable_bse_unpacked@ +enable_cclock = @enable_cclock@ +enable_crpa_optim = @enable_crpa_optim@ +enable_exports = @enable_exports@ +enable_fc_wrapper = @enable_fc_wrapper@ +enable_gw_dpc = @enable_gw_dpc@ +enable_hints = @enable_hints@ +enable_libtetra = @enable_libtetra@ +enable_lotf = @enable_lotf@ +enable_memory_profiling = @enable_memory_profiling@ +enable_mpi_gpu_aware = @enable_mpi_gpu_aware@ +enable_mpi_inplace = @enable_mpi_inplace@ +enable_mpi_interfaces_bugfix = @enable_mpi_interfaces_bugfix@ +enable_mpi_io = @enable_mpi_io@ +enable_mpi_io_default = @enable_mpi_io_default@ +enable_netcdf_default = @enable_netcdf_default@ +enable_openmp = @enable_openmp@ +enable_openmp_offload = @enable_openmp_offload@ +enable_python_invocation = @enable_python_invocation@ +enable_shared = @enable_shared@ +enable_source_debug = @enable_source_debug@ +enable_static = @enable_static@ +enable_stdin = @enable_stdin@ +enable_timer = @enable_timer@ +enable_triqs_v1_4 = @enable_triqs_v1_4@ +enable_triqs_v2_0 = @enable_triqs_v2_0@ +enable_zdot_bugfix = @enable_zdot_bugfix@ +exec_prefix = @exec_prefix@ +fc_info_string = @fc_info_string@ +fc_mod_fcflags = @fc_mod_fcflags@ +fc_timing = @fc_timing@ +fcflags_opt_02_clib = @fcflags_opt_02_clib@ +fcflags_opt_10_defs = @fcflags_opt_10_defs@ +fcflags_opt_11_memory_mpi = @fcflags_opt_11_memory_mpi@ +fcflags_opt_12_hide_mpi = @fcflags_opt_12_hide_mpi@ +fcflags_opt_14_hidewrite = @fcflags_opt_14_hidewrite@ +fcflags_opt_16_hideleave = @fcflags_opt_16_hideleave@ +fcflags_opt_16_kokkos_toolbox = @fcflags_opt_16_kokkos_toolbox@ +fcflags_opt_17_gpu_toolbox = @fcflags_opt_17_gpu_toolbox@ +fcflags_opt_17_libtetra_ext = @fcflags_opt_17_libtetra_ext@ +fcflags_opt_17_minimax = @fcflags_opt_17_minimax@ +fcflags_opt_17_yaml_out = @fcflags_opt_17_yaml_out@ +fcflags_opt_18_timing = @fcflags_opt_18_timing@ +fcflags_opt_21_hashfuncs = @fcflags_opt_21_hashfuncs@ +fcflags_opt_27_toolbox_oop = @fcflags_opt_27_toolbox_oop@ +fcflags_opt_28_numeric_noabirule = @fcflags_opt_28_numeric_noabirule@ +fcflags_opt_29_kpoints = @fcflags_opt_29_kpoints@ +fcflags_opt_32_util = @fcflags_opt_32_util@ +fcflags_opt_33_xc_lowlevel = @fcflags_opt_33_xc_lowlevel@ +fcflags_opt_39_libpaw = @fcflags_opt_39_libpaw@ +fcflags_opt_41_geometry = @fcflags_opt_41_geometry@ +fcflags_opt_42_nlstrain = @fcflags_opt_42_nlstrain@ +fcflags_opt_42_parser = @fcflags_opt_42_parser@ +fcflags_opt_43_ptgroups = @fcflags_opt_43_ptgroups@ +fcflags_opt_43_wvl_wrappers = @fcflags_opt_43_wvl_wrappers@ +fcflags_opt_44_abitools = @fcflags_opt_44_abitools@ +fcflags_opt_44_abitypes_defs = @fcflags_opt_44_abitypes_defs@ +fcflags_opt_44_manage_kokkos = @fcflags_opt_44_manage_kokkos@ +fcflags_opt_45_geomoptim = @fcflags_opt_45_geomoptim@ +fcflags_opt_45_xgTools = @fcflags_opt_45_xgTools@ +fcflags_opt_46_ghc_omp = @fcflags_opt_46_ghc_omp@ +fcflags_opt_46_manage_cuda = @fcflags_opt_46_manage_cuda@ +fcflags_opt_48_diago = @fcflags_opt_48_diago@ +fcflags_opt_49_gw_toolbox_oop = @fcflags_opt_49_gw_toolbox_oop@ +fcflags_opt_51_manage_mpi = @fcflags_opt_51_manage_mpi@ +fcflags_opt_52_fft_mpi_noabirule = @fcflags_opt_52_fft_mpi_noabirule@ +fcflags_opt_53_ffts = @fcflags_opt_53_ffts@ +fcflags_opt_54_spacepar = @fcflags_opt_54_spacepar@ +fcflags_opt_55_abiutil = @fcflags_opt_55_abiutil@ +fcflags_opt_56_io_mpi = @fcflags_opt_56_io_mpi@ +fcflags_opt_56_mixing = @fcflags_opt_56_mixing@ +fcflags_opt_56_recipspace = @fcflags_opt_56_recipspace@ +fcflags_opt_56_xc = @fcflags_opt_56_xc@ +fcflags_opt_57_iopsp_parser = @fcflags_opt_57_iopsp_parser@ +fcflags_opt_57_iovars = @fcflags_opt_57_iovars@ +fcflags_opt_61_occeig = @fcflags_opt_61_occeig@ +fcflags_opt_62_cg_noabirule = @fcflags_opt_62_cg_noabirule@ +fcflags_opt_62_ctqmc = @fcflags_opt_62_ctqmc@ +fcflags_opt_62_iowfdenpot = @fcflags_opt_62_iowfdenpot@ +fcflags_opt_62_poisson = @fcflags_opt_62_poisson@ +fcflags_opt_62_wvl_wfs = @fcflags_opt_62_wvl_wfs@ +fcflags_opt_64_psp = @fcflags_opt_64_psp@ +fcflags_opt_65_lotf_base = @fcflags_opt_65_lotf_base@ +fcflags_opt_65_paw = @fcflags_opt_65_paw@ +fcflags_opt_66_nonlocal = @fcflags_opt_66_nonlocal@ +fcflags_opt_66_vdwxc = @fcflags_opt_66_vdwxc@ +fcflags_opt_66_wfs = @fcflags_opt_66_wfs@ +fcflags_opt_67_common = @fcflags_opt_67_common@ +fcflags_opt_67_python_invocation_ext = @fcflags_opt_67_python_invocation_ext@ +fcflags_opt_67_triqs_ext = @fcflags_opt_67_triqs_ext@ +fcflags_opt_68_dmft = @fcflags_opt_68_dmft@ +fcflags_opt_68_lotf = @fcflags_opt_68_lotf@ +fcflags_opt_68_recursion = @fcflags_opt_68_recursion@ +fcflags_opt_68_rsprc = @fcflags_opt_68_rsprc@ +fcflags_opt_69_wfdesc = @fcflags_opt_69_wfdesc@ +fcflags_opt_70_gw = @fcflags_opt_70_gw@ +fcflags_opt_71_bse = @fcflags_opt_71_bse@ +fcflags_opt_71_wannier = @fcflags_opt_71_wannier@ +fcflags_opt_72_response = @fcflags_opt_72_response@ +fcflags_opt_77_ddb = @fcflags_opt_77_ddb@ +fcflags_opt_77_suscep = @fcflags_opt_77_suscep@ +fcflags_opt_78_effpot = @fcflags_opt_78_effpot@ +fcflags_opt_78_eph = @fcflags_opt_78_eph@ +fcflags_opt_79_seqpar_mpi = @fcflags_opt_79_seqpar_mpi@ +fcflags_opt_80_rttddft = @fcflags_opt_80_rttddft@ +fcflags_opt_80_tdep = @fcflags_opt_80_tdep@ +fcflags_opt_94_scfcv = @fcflags_opt_94_scfcv@ +fcflags_opt_95_drive = @fcflags_opt_95_drive@ +fcflags_opt_98_main = @fcflags_opt_98_main@ +fcflags_opt_bigdft = @fcflags_opt_bigdft@ +fcflags_opt_default = @fcflags_opt_default@ +fcflags_opt_hdf5 = @fcflags_opt_hdf5@ +fcflags_opt_levmar = @fcflags_opt_levmar@ +fcflags_opt_libpsml = @fcflags_opt_libpsml@ +fcflags_opt_libxc = @fcflags_opt_libxc@ +fcflags_opt_libxml2 = @fcflags_opt_libxml2@ +fcflags_opt_linalg = @fcflags_opt_linalg@ +fcflags_opt_netcdf = @fcflags_opt_netcdf@ +fcflags_opt_netcdf_fortran = @fcflags_opt_netcdf_fortran@ +fcflags_opt_papi = @fcflags_opt_papi@ +fcflags_opt_triqs = @fcflags_opt_triqs@ +fcflags_opt_wannier90 = @fcflags_opt_wannier90@ +fcflags_opt_xmlf90 = @fcflags_opt_xmlf90@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sd_abinit_common_cppflags = @sd_abinit_common_cppflags@ +sd_abinit_common_enable = @sd_abinit_common_enable@ +sd_abinit_common_enable_def = @sd_abinit_common_enable_def@ +sd_abinit_common_fcflags = @sd_abinit_common_fcflags@ +sd_abinit_common_init = @sd_abinit_common_init@ +sd_abinit_common_ldflags = @sd_abinit_common_ldflags@ +sd_abinit_common_libs = @sd_abinit_common_libs@ +sd_abinit_common_ok = @sd_abinit_common_ok@ +sd_abinit_common_options = @sd_abinit_common_options@ +sd_abinit_common_policy = @sd_abinit_common_policy@ +sd_abinit_common_status = @sd_abinit_common_status@ +sd_bigdft_cppflags = @sd_bigdft_cppflags@ +sd_bigdft_enable = @sd_bigdft_enable@ +sd_bigdft_enable_def = @sd_bigdft_enable_def@ +sd_bigdft_fcflags = @sd_bigdft_fcflags@ +sd_bigdft_init = @sd_bigdft_init@ +sd_bigdft_ldflags = @sd_bigdft_ldflags@ +sd_bigdft_libs = @sd_bigdft_libs@ +sd_bigdft_ok = @sd_bigdft_ok@ +sd_bigdft_options = @sd_bigdft_options@ +sd_bigdft_policy = @sd_bigdft_policy@ +sd_bigdft_status = @sd_bigdft_status@ +sd_fft_cflags = @sd_fft_cflags@ +sd_fft_choices = @sd_fft_choices@ +sd_fft_cppflags = @sd_fft_cppflags@ +sd_fft_cxxflags = @sd_fft_cxxflags@ +sd_fft_enable = @sd_fft_enable@ +sd_fft_fcflags = @sd_fft_fcflags@ +sd_fft_flavor = @sd_fft_flavor@ +sd_fft_init = @sd_fft_init@ +sd_fft_ldflags = @sd_fft_ldflags@ +sd_fft_libs = @sd_fft_libs@ +sd_fft_ok = @sd_fft_ok@ +sd_fftw3_cflags = @sd_fftw3_cflags@ +sd_fftw3_cppflags = @sd_fftw3_cppflags@ +sd_fftw3_enable = @sd_fftw3_enable@ +sd_fftw3_enable_def = @sd_fftw3_enable_def@ +sd_fftw3_fcflags = @sd_fftw3_fcflags@ +sd_fftw3_init = @sd_fftw3_init@ +sd_fftw3_ldflags = @sd_fftw3_ldflags@ +sd_fftw3_libs = @sd_fftw3_libs@ +sd_fftw3_ok = @sd_fftw3_ok@ +sd_fftw3_options = @sd_fftw3_options@ +sd_fftw3_policy = @sd_fftw3_policy@ +sd_fftw3_status = @sd_fftw3_status@ +sd_gpu_cflags = @sd_gpu_cflags@ +sd_gpu_cppflags = @sd_gpu_cppflags@ +sd_gpu_cxxflags = @sd_gpu_cxxflags@ +sd_gpu_enable = @sd_gpu_enable@ +sd_gpu_enable_def = @sd_gpu_enable_def@ +sd_gpu_fcflags = @sd_gpu_fcflags@ +sd_gpu_init = @sd_gpu_init@ +sd_gpu_ldflags = @sd_gpu_ldflags@ +sd_gpu_libs = @sd_gpu_libs@ +sd_gpu_ok = @sd_gpu_ok@ +sd_gpu_options = @sd_gpu_options@ +sd_gpu_policy = @sd_gpu_policy@ +sd_gpu_prefix = @sd_gpu_prefix@ +sd_gpu_status = @sd_gpu_status@ +sd_hdf5_cflags = @sd_hdf5_cflags@ +sd_hdf5_cppflags = @sd_hdf5_cppflags@ +sd_hdf5_cxxflags = @sd_hdf5_cxxflags@ +sd_hdf5_enable = @sd_hdf5_enable@ +sd_hdf5_enable_def = @sd_hdf5_enable_def@ +sd_hdf5_enable_fc = @sd_hdf5_enable_fc@ +sd_hdf5_fcflags = @sd_hdf5_fcflags@ +sd_hdf5_h5cc = @sd_hdf5_h5cc@ +sd_hdf5_h5fc = @sd_hdf5_h5fc@ +sd_hdf5_init = @sd_hdf5_init@ +sd_hdf5_ldflags = @sd_hdf5_ldflags@ +sd_hdf5_libs = @sd_hdf5_libs@ +sd_hdf5_ok = @sd_hdf5_ok@ +sd_hdf5_options = @sd_hdf5_options@ +sd_hdf5_policy = @sd_hdf5_policy@ +sd_hdf5_status = @sd_hdf5_status@ +sd_kokkos_cppflags = @sd_kokkos_cppflags@ +sd_kokkos_cxxflags = @sd_kokkos_cxxflags@ +sd_kokkos_enable = @sd_kokkos_enable@ +sd_kokkos_enable_def = @sd_kokkos_enable_def@ +sd_kokkos_init = @sd_kokkos_init@ +sd_kokkos_ldflags = @sd_kokkos_ldflags@ +sd_kokkos_libs = @sd_kokkos_libs@ +sd_kokkos_ok = @sd_kokkos_ok@ +sd_kokkos_options = @sd_kokkos_options@ +sd_kokkos_policy = @sd_kokkos_policy@ +sd_kokkos_status = @sd_kokkos_status@ +sd_levmar_cflags = @sd_levmar_cflags@ +sd_levmar_cppflags = @sd_levmar_cppflags@ +sd_levmar_enable = @sd_levmar_enable@ +sd_levmar_enable_def = @sd_levmar_enable_def@ +sd_levmar_init = @sd_levmar_init@ +sd_levmar_ldflags = @sd_levmar_ldflags@ +sd_levmar_libs = @sd_levmar_libs@ +sd_levmar_ok = @sd_levmar_ok@ +sd_levmar_options = @sd_levmar_options@ +sd_levmar_policy = @sd_levmar_policy@ +sd_levmar_status = @sd_levmar_status@ +sd_libpaw_cppflags = @sd_libpaw_cppflags@ +sd_libpaw_enable = @sd_libpaw_enable@ +sd_libpaw_enable_def = @sd_libpaw_enable_def@ +sd_libpaw_fcflags = @sd_libpaw_fcflags@ +sd_libpaw_init = @sd_libpaw_init@ +sd_libpaw_ldflags = @sd_libpaw_ldflags@ +sd_libpaw_libs = @sd_libpaw_libs@ +sd_libpaw_ok = @sd_libpaw_ok@ +sd_libpaw_options = @sd_libpaw_options@ +sd_libpaw_policy = @sd_libpaw_policy@ +sd_libpaw_status = @sd_libpaw_status@ +sd_libpsml_cppflags = @sd_libpsml_cppflags@ +sd_libpsml_enable = @sd_libpsml_enable@ +sd_libpsml_enable_def = @sd_libpsml_enable_def@ +sd_libpsml_fcflags = @sd_libpsml_fcflags@ +sd_libpsml_init = @sd_libpsml_init@ +sd_libpsml_ldflags = @sd_libpsml_ldflags@ +sd_libpsml_libs = @sd_libpsml_libs@ +sd_libpsml_ok = @sd_libpsml_ok@ +sd_libpsml_options = @sd_libpsml_options@ +sd_libpsml_policy = @sd_libpsml_policy@ +sd_libpsml_status = @sd_libpsml_status@ +sd_libxc_cflags = @sd_libxc_cflags@ +sd_libxc_cppflags = @sd_libxc_cppflags@ +sd_libxc_enable = @sd_libxc_enable@ +sd_libxc_enable_def = @sd_libxc_enable_def@ +sd_libxc_enable_fc = @sd_libxc_enable_fc@ +sd_libxc_fcflags = @sd_libxc_fcflags@ +sd_libxc_init = @sd_libxc_init@ +sd_libxc_ldflags = @sd_libxc_ldflags@ +sd_libxc_libs = @sd_libxc_libs@ +sd_libxc_ok = @sd_libxc_ok@ +sd_libxc_options = @sd_libxc_options@ +sd_libxc_policy = @sd_libxc_policy@ +sd_libxc_status = @sd_libxc_status@ +sd_linalg_cflags = @sd_linalg_cflags@ +sd_linalg_choices = @sd_linalg_choices@ +sd_linalg_cppflags = @sd_linalg_cppflags@ +sd_linalg_cxxflags = @sd_linalg_cxxflags@ +sd_linalg_enable = @sd_linalg_enable@ +sd_linalg_fcflags = @sd_linalg_fcflags@ +sd_linalg_flavor = @sd_linalg_flavor@ +sd_linalg_has_elpa = @sd_linalg_has_elpa@ +sd_linalg_has_scalapack = @sd_linalg_has_scalapack@ +sd_linalg_init = @sd_linalg_init@ +sd_linalg_ldflags = @sd_linalg_ldflags@ +sd_linalg_libs = @sd_linalg_libs@ +sd_linalg_ok = @sd_linalg_ok@ +sd_mpi_cc = @sd_mpi_cc@ +sd_mpi_cflags = @sd_mpi_cflags@ +sd_mpi_cppflags = @sd_mpi_cppflags@ +sd_mpi_cxx = @sd_mpi_cxx@ +sd_mpi_enable = @sd_mpi_enable@ +sd_mpi_enable_cxx = @sd_mpi_enable_cxx@ +sd_mpi_enable_def = @sd_mpi_enable_def@ +sd_mpi_enable_fc = @sd_mpi_enable_fc@ +sd_mpi_fc = @sd_mpi_fc@ +sd_mpi_fcflags = @sd_mpi_fcflags@ +sd_mpi_init = @sd_mpi_init@ +sd_mpi_ldflags = @sd_mpi_ldflags@ +sd_mpi_libs = @sd_mpi_libs@ +sd_mpi_ok = @sd_mpi_ok@ +sd_mpi_options = @sd_mpi_options@ +sd_mpi_policy = @sd_mpi_policy@ +sd_mpi_status = @sd_mpi_status@ +sd_netcdf_cflags = @sd_netcdf_cflags@ +sd_netcdf_cppflags = @sd_netcdf_cppflags@ +sd_netcdf_enable = @sd_netcdf_enable@ +sd_netcdf_enable_def = @sd_netcdf_enable_def@ +sd_netcdf_fcflags = @sd_netcdf_fcflags@ +sd_netcdf_fortran_cflags = @sd_netcdf_fortran_cflags@ +sd_netcdf_fortran_cppflags = @sd_netcdf_fortran_cppflags@ +sd_netcdf_fortran_enable = @sd_netcdf_fortran_enable@ +sd_netcdf_fortran_enable_def = @sd_netcdf_fortran_enable_def@ +sd_netcdf_fortran_fcflags = @sd_netcdf_fortran_fcflags@ +sd_netcdf_fortran_init = @sd_netcdf_fortran_init@ +sd_netcdf_fortran_ldflags = @sd_netcdf_fortran_ldflags@ +sd_netcdf_fortran_libs = @sd_netcdf_fortran_libs@ +sd_netcdf_fortran_ok = @sd_netcdf_fortran_ok@ +sd_netcdf_fortran_options = @sd_netcdf_fortran_options@ +sd_netcdf_fortran_policy = @sd_netcdf_fortran_policy@ +sd_netcdf_fortran_status = @sd_netcdf_fortran_status@ +sd_netcdf_init = @sd_netcdf_init@ +sd_netcdf_ldflags = @sd_netcdf_ldflags@ +sd_netcdf_libs = @sd_netcdf_libs@ +sd_netcdf_ok = @sd_netcdf_ok@ +sd_netcdf_options = @sd_netcdf_options@ +sd_netcdf_policy = @sd_netcdf_policy@ +sd_netcdf_status = @sd_netcdf_status@ +sd_papi_cflags = @sd_papi_cflags@ +sd_papi_cppflags = @sd_papi_cppflags@ +sd_papi_enable = @sd_papi_enable@ +sd_papi_enable_def = @sd_papi_enable_def@ +sd_papi_init = @sd_papi_init@ +sd_papi_ldflags = @sd_papi_ldflags@ +sd_papi_libs = @sd_papi_libs@ +sd_papi_ok = @sd_papi_ok@ +sd_papi_options = @sd_papi_options@ +sd_papi_policy = @sd_papi_policy@ +sd_papi_sd_papi_fcflags = @sd_papi_sd_papi_fcflags@ +sd_papi_status = @sd_papi_status@ +sd_pfft_cflags = @sd_pfft_cflags@ +sd_pfft_cppflags = @sd_pfft_cppflags@ +sd_pfft_enable = @sd_pfft_enable@ +sd_pfft_enable_def = @sd_pfft_enable_def@ +sd_pfft_init = @sd_pfft_init@ +sd_pfft_ldflags = @sd_pfft_ldflags@ +sd_pfft_libs = @sd_pfft_libs@ +sd_pfft_ok = @sd_pfft_ok@ +sd_pfft_options = @sd_pfft_options@ +sd_pfft_policy = @sd_pfft_policy@ +sd_pfft_status = @sd_pfft_status@ +sd_sys_fcflags = @sd_sys_fcflags@ +sd_triqs_cflags = @sd_triqs_cflags@ +sd_triqs_cppflags = @sd_triqs_cppflags@ +sd_triqs_cxxflags = @sd_triqs_cxxflags@ +sd_triqs_enable = @sd_triqs_enable@ +sd_triqs_enable_def = @sd_triqs_enable_def@ +sd_triqs_fcflags = @sd_triqs_fcflags@ +sd_triqs_init = @sd_triqs_init@ +sd_triqs_ldflags = @sd_triqs_ldflags@ +sd_triqs_libs = @sd_triqs_libs@ +sd_triqs_ok = @sd_triqs_ok@ +sd_triqs_options = @sd_triqs_options@ +sd_triqs_policy = @sd_triqs_policy@ +sd_triqs_status = @sd_triqs_status@ +sd_wannier90_cppflags = @sd_wannier90_cppflags@ +sd_wannier90_enable = @sd_wannier90_enable@ +sd_wannier90_enable_def = @sd_wannier90_enable_def@ +sd_wannier90_fcflags = @sd_wannier90_fcflags@ +sd_wannier90_init = @sd_wannier90_init@ +sd_wannier90_ldflags = @sd_wannier90_ldflags@ +sd_wannier90_libs = @sd_wannier90_libs@ +sd_wannier90_ok = @sd_wannier90_ok@ +sd_wannier90_options = @sd_wannier90_options@ +sd_wannier90_policy = @sd_wannier90_policy@ +sd_wannier90_status = @sd_wannier90_status@ +sd_xmlf90_cppflags = @sd_xmlf90_cppflags@ +sd_xmlf90_enable = @sd_xmlf90_enable@ +sd_xmlf90_enable_def = @sd_xmlf90_enable_def@ +sd_xmlf90_fcflags = @sd_xmlf90_fcflags@ +sd_xmlf90_init = @sd_xmlf90_init@ +sd_xmlf90_ldflags = @sd_xmlf90_ldflags@ +sd_xmlf90_libs = @sd_xmlf90_libs@ +sd_xmlf90_ok = @sd_xmlf90_ok@ +sd_xmlf90_options = @sd_xmlf90_options@ +sd_xmlf90_policy = @sd_xmlf90_policy@ +sd_xmlf90_status = @sd_xmlf90_status@ +sd_yakl_cppflags = @sd_yakl_cppflags@ +sd_yakl_enable = @sd_yakl_enable@ +sd_yakl_enable_def = @sd_yakl_enable_def@ +sd_yakl_fcflags = @sd_yakl_fcflags@ +sd_yakl_init = @sd_yakl_init@ +sd_yakl_ldflags = @sd_yakl_ldflags@ +sd_yakl_libs = @sd_yakl_libs@ +sd_yakl_ok = @sd_yakl_ok@ +sd_yakl_options = @sd_yakl_options@ +sd_yakl_policy = @sd_yakl_policy@ +sd_yakl_status = @sd_yakl_status@ +sharedstatedir = @sharedstatedir@ +src_02_clib_fcflags = @src_02_clib_fcflags@ +src_10_defs_fcflags = @src_10_defs_fcflags@ +src_11_memory_mpi_fcflags = @src_11_memory_mpi_fcflags@ +src_12_hide_mpi_fcflags = @src_12_hide_mpi_fcflags@ +src_14_hidewrite_fcflags = @src_14_hidewrite_fcflags@ +src_16_hideleave_fcflags = @src_16_hideleave_fcflags@ +src_16_kokkos_toolbox_fcflags = @src_16_kokkos_toolbox_fcflags@ +src_17_gpu_toolbox_fcflags = @src_17_gpu_toolbox_fcflags@ +src_17_libtetra_ext_fcflags = @src_17_libtetra_ext_fcflags@ +src_17_minimax_fcflags = @src_17_minimax_fcflags@ +src_17_yaml_out_fcflags = @src_17_yaml_out_fcflags@ +src_18_timing_fcflags = @src_18_timing_fcflags@ +src_21_hashfuncs_fcflags = @src_21_hashfuncs_fcflags@ +src_27_toolbox_oop_fcflags = @src_27_toolbox_oop_fcflags@ +src_28_numeric_noabirule_fcflags = @src_28_numeric_noabirule_fcflags@ +src_29_kpoints_fcflags = @src_29_kpoints_fcflags@ +src_32_util_fcflags = @src_32_util_fcflags@ +src_33_xc_lowlevel_fcflags = @src_33_xc_lowlevel_fcflags@ +src_39_libpaw_fcflags = @src_39_libpaw_fcflags@ +src_41_geometry_fcflags = @src_41_geometry_fcflags@ +src_42_nlstrain_fcflags = @src_42_nlstrain_fcflags@ +src_42_parser_fcflags = @src_42_parser_fcflags@ +src_43_ptgroups_fcflags = @src_43_ptgroups_fcflags@ +src_43_wvl_wrappers_fcflags = @src_43_wvl_wrappers_fcflags@ +src_44_abitools_fcflags = @src_44_abitools_fcflags@ +src_44_abitypes_defs_fcflags = @src_44_abitypes_defs_fcflags@ +src_44_manage_kokkos_fcflags = @src_44_manage_kokkos_fcflags@ +src_45_geomoptim_fcflags = @src_45_geomoptim_fcflags@ +src_45_xgTools_fcflags = @src_45_xgTools_fcflags@ +src_46_ghc_omp_fcflags = @src_46_ghc_omp_fcflags@ +src_46_manage_cuda_fcflags = @src_46_manage_cuda_fcflags@ +src_48_diago_fcflags = @src_48_diago_fcflags@ +src_49_gw_toolbox_oop_fcflags = @src_49_gw_toolbox_oop_fcflags@ +src_51_manage_mpi_fcflags = @src_51_manage_mpi_fcflags@ +src_52_fft_mpi_noabirule_fcflags = @src_52_fft_mpi_noabirule_fcflags@ +src_53_ffts_fcflags = @src_53_ffts_fcflags@ +src_54_spacepar_fcflags = @src_54_spacepar_fcflags@ +src_55_abiutil_fcflags = @src_55_abiutil_fcflags@ +src_56_io_mpi_fcflags = @src_56_io_mpi_fcflags@ +src_56_mixing_fcflags = @src_56_mixing_fcflags@ +src_56_recipspace_fcflags = @src_56_recipspace_fcflags@ +src_56_xc_fcflags = @src_56_xc_fcflags@ +src_57_iopsp_parser_fcflags = @src_57_iopsp_parser_fcflags@ +src_57_iovars_fcflags = @src_57_iovars_fcflags@ +src_61_occeig_fcflags = @src_61_occeig_fcflags@ +src_62_cg_noabirule_fcflags = @src_62_cg_noabirule_fcflags@ +src_62_ctqmc_fcflags = @src_62_ctqmc_fcflags@ +src_62_iowfdenpot_fcflags = @src_62_iowfdenpot_fcflags@ +src_62_poisson_fcflags = @src_62_poisson_fcflags@ +src_62_wvl_wfs_fcflags = @src_62_wvl_wfs_fcflags@ +src_64_psp_fcflags = @src_64_psp_fcflags@ +src_65_lotf_base_fcflags = @src_65_lotf_base_fcflags@ +src_65_paw_fcflags = @src_65_paw_fcflags@ +src_66_nonlocal_fcflags = @src_66_nonlocal_fcflags@ +src_66_vdwxc_fcflags = @src_66_vdwxc_fcflags@ +src_66_wfs_fcflags = @src_66_wfs_fcflags@ +src_67_common_fcflags = @src_67_common_fcflags@ +src_67_python_invocation_ext_fcflags = @src_67_python_invocation_ext_fcflags@ +src_67_triqs_ext_fcflags = @src_67_triqs_ext_fcflags@ +src_68_dmft_fcflags = @src_68_dmft_fcflags@ +src_68_lotf_fcflags = @src_68_lotf_fcflags@ +src_68_recursion_fcflags = @src_68_recursion_fcflags@ +src_68_rsprc_fcflags = @src_68_rsprc_fcflags@ +src_69_wfdesc_fcflags = @src_69_wfdesc_fcflags@ +src_70_gw_fcflags = @src_70_gw_fcflags@ +src_71_bse_fcflags = @src_71_bse_fcflags@ +src_71_wannier_fcflags = @src_71_wannier_fcflags@ +src_72_response_fcflags = @src_72_response_fcflags@ +src_77_ddb_fcflags = @src_77_ddb_fcflags@ +src_77_suscep_fcflags = @src_77_suscep_fcflags@ +src_78_effpot_fcflags = @src_78_effpot_fcflags@ +src_78_eph_fcflags = @src_78_eph_fcflags@ +src_79_seqpar_mpi_fcflags = @src_79_seqpar_mpi_fcflags@ +src_80_rttddft_fcflags = @src_80_rttddft_fcflags@ +src_80_tdep_fcflags = @src_80_tdep_fcflags@ +src_94_scfcv_fcflags = @src_94_scfcv_fcflags@ +src_95_drive_fcflags = @src_95_drive_fcflags@ +src_common_fcflags = @src_common_fcflags@ +src_core_fcflags = @src_core_fcflags@ +src_libpaw_fcflags = @src_libpaw_fcflags@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +with_abinit_common = @with_abinit_common@ +with_bigdft = @with_bigdft@ +with_config_file = @with_config_file@ +with_debug_flavor = @with_debug_flavor@ +with_fallbacks = @with_fallbacks@ +with_fc_vendor = @with_fc_vendor@ +with_fc_version = @with_fc_version@ +with_fft_flavor = @with_fft_flavor@ +with_fftw3 = @with_fftw3@ +with_gnu_ld = @with_gnu_ld@ +with_gpu = @with_gpu@ +with_hdf5 = @with_hdf5@ +with_kokkos = @with_kokkos@ +with_levmar = @with_levmar@ +with_libpaw = @with_libpaw@ +with_libpsml = @with_libpsml@ +with_libxc = @with_libxc@ +with_libxml2 = @with_libxml2@ +with_linalg_flavor = @with_linalg_flavor@ +with_mpi = @with_mpi@ +with_mpi_level = @with_mpi_level@ +with_netcdf = @with_netcdf@ +with_optim_flavor = @with_optim_flavor@ +with_papi = @with_papi@ +with_pfft = @with_pfft@ +with_triqs = @with_triqs@ +with_wannier90 = @with_wannier90@ +with_xmlf90 = @with_xmlf90@ +with_yakl = @with_yakl@ +AM_CFLAGS = @ABI_CPPFLAGS@ +AM_CXXFLAGS = $(sd_triqs_cxxflags) +AM_FCFLAGS = @FPPFLAGS@ @FCFLAGS_FREEFORM@ @FCFLAGS_MODDIR@ @sd_sys_fcflags@ @fcflags_opt_32_util@ +AM_CPPFLAGS = \ + @src_02_clib_fcflags@ \ + @src_10_defs_fcflags@ \ + @src_14_hidewrite_fcflags@ \ + @src_16_hideleave_fcflags@ \ + @src_17_libtetra_ext_fcflags@ \ + @src_17_yaml_out_fcflags@ \ + @src_28_numeric_noabirule_fcflags@ \ + @src_common_fcflags@ \ + @src_core_fcflags@ \ + @src_libpaw_fcflags@ \ + @sd_fft_cppflags@ \ + @sd_fft_fcflags@ \ + @sd_linalg_cppflags@ \ + @sd_linalg_fcflags@ \ + @sd_hdf5_cppflags@ \ + @sd_netcdf_cppflags@ \ + @sd_netcdf_fcflags@ \ + @sd_netcdf_fortran_cppflags@ \ + @sd_netcdf_fortran_fcflags@ \ + @fc_mod_fcflags@ + + +# Regular source files +lib32_util_srcs = \ + m_atomdata.F90 \ + m_dummy.F90 \ + m_exp_mat.F90 \ + m_matrix.F90 \ + m_pptools.F90 \ + m_special_funcs.F90 \ + m_symtk.F90 \ + m_pstat.F90 + + +# Source files depending on conditionals + +# Library description +noinst_LIBRARIES = lib32_util.a +lib32_util_a_SOURCES = $(lib32_util_srcs) + +# Dependencies (inside the directory) of directory 32_util +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. +CLEANFILES = m_atomdata_cpp.f90 m_dummy_cpp.f90 m_exp_mat_cpp.f90 \ + m_matrix_cpp.f90 m_pptools_cpp.f90 m_special_funcs_cpp.f90 \ + m_symtk_cpp.f90 m_pstat_cpp.f90 m_atomdata.$(MODEXT) \ + m_dummy.$(MODEXT) m_exp_mat.$(MODEXT) m_matrix.$(MODEXT) \ + m_pptools.$(MODEXT) m_pstat.$(MODEXT) \ + m_special_funcs.$(MODEXT) m_symtk.$(MODEXT) +EXTRA_DIST = abinit.src abinit.dep _32_util_ +all: all-am + +.SUFFIXES: +.SUFFIXES: .F90 .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu shared/common/src/32_util/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu shared/common/src/32_util/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) + +lib32_util.a: $(lib32_util_a_OBJECTS) $(lib32_util_a_DEPENDENCIES) $(EXTRA_lib32_util_a_DEPENDENCIES) + $(AM_V_at)-rm -f lib32_util.a + $(AM_V_AR)$(lib32_util_a_AR) lib32_util.a $(lib32_util_a_OBJECTS) $(lib32_util_a_LIBADD) + $(AM_V_at)$(RANLIB) lib32_util.a + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +.F90.o: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ $< + +.F90.obj: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-noinstLIBRARIES cscopelist-am ctags ctags-am distclean \ + distclean-compile distclean-generic distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am + +.PRECIOUS: Makefile + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/GX-PAW/common/src/32_util/README b/GX-PAW/common/src/32_util/README new file mode 100644 index 00000000..35cec49b --- /dev/null +++ b/GX-PAW/common/src/32_util/README @@ -0,0 +1,15 @@ +Adding a new source file inside a directory "dirname" +===================================================== + +In order to be treated properly by the ABINIT build system, +a new source file should be declared in the file abinit.src +of the same directory (just one line to be added +per new file, rather self-explanatory). + +Then, in order for the make to work : +(1) if the developer has the autotools working on his computer, he should + issue */*/makemake, then configure and make +(2) otherwise, the developer should modify by hand the Makefile.am file + of the directory in which the file is placed (just one line to be added also), + then issue make. + diff --git a/GX-PAW/common/src/32_util/_32_util_ b/GX-PAW/common/src/32_util/_32_util_ new file mode 100644 index 00000000..dc940516 --- /dev/null +++ b/GX-PAW/common/src/32_util/_32_util_ @@ -0,0 +1,31 @@ +!!****d* ABINIT/32_util +!! NAME +!! 32_util +!! +!! DESCRIPTION +!! This directory contains small utility routines that are +!! used in different places in the ABINIT package. +!! These utility can be related to the treatment of characters, +!! to basic mathematical operations, or to basic chemistry and +!! physics data. +!! +!! COPYRIGHT +!! Copyright (C) 1998-2024 ABINIT group (TD) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! For the initials of contributors, see ~abinit/doc/developers/contributors.txt . +!! +!! CHILDREN +!! interfaces_32_util.F90 +!! m_atomdata.F90 +!! m_dummy.F90 +!! m_exp_mat.F90 +!! m_integrals.F90 +!! m_matrix.F90 +!! m_pptools.F90 +!! m_special_funcs.F90 +!! m_symtk.F90 +!! test_radsintr.F90 +!! +!!*** diff --git a/GX-PAW/common/src/32_util/__pycache__/abinit.cpython-36.pyc b/GX-PAW/common/src/32_util/__pycache__/abinit.cpython-36.pyc new file mode 100644 index 00000000..289d4ae0 Binary files /dev/null and b/GX-PAW/common/src/32_util/__pycache__/abinit.cpython-36.pyc differ diff --git a/GX-PAW/common/src/32_util/abinit.dep b/GX-PAW/common/src/32_util/abinit.dep new file mode 100644 index 00000000..672ef8e8 --- /dev/null +++ b/GX-PAW/common/src/32_util/abinit.dep @@ -0,0 +1,16 @@ +# Dependencies (inside the directory) of directory 32_util +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. + +CLEANFILES += \ + m_atomdata.$(MODEXT) \ + m_dummy.$(MODEXT) \ + m_exp_mat.$(MODEXT) \ + m_matrix.$(MODEXT) \ + m_pptools.$(MODEXT) \ + m_pstat.$(MODEXT) \ + m_special_funcs.$(MODEXT) \ + m_symtk.$(MODEXT) + diff --git a/GX-PAW/common/src/32_util/abinit.dir b/GX-PAW/common/src/32_util/abinit.dir new file mode 100644 index 00000000..99721119 --- /dev/null +++ b/GX-PAW/common/src/32_util/abinit.dir @@ -0,0 +1,14 @@ +# Dependencies (outside the directory) of directory 32_util +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. + +include_dirs = \ +['02_clib', + '10_defs', + '14_hidewrite', + '16_hideleave', + '17_libtetra_ext', + '17_yaml_out', + '28_numeric_noabirule'] \ No newline at end of file diff --git a/GX-PAW/common/src/32_util/abinit.src b/GX-PAW/common/src/32_util/abinit.src new file mode 100644 index 00000000..0e3f7bf7 --- /dev/null +++ b/GX-PAW/common/src/32_util/abinit.src @@ -0,0 +1,31 @@ +# -*- Python -*- +# +# Copyright (C) 2005-2024 ABINIT Group (Yann Pouillon) +# +# This file is part of the ABINIT software package. For license information, +# please see the COPYING file in the top-level directory of the ABINIT source +# distribution. +# + +# +# Source files making up the 1util library +# + +# Source file attributes +ABI_SRC_NIL = 0 # No attribute +ABI_SRC_BLT = 1 # The file is built by a script +ABI_SRC_DEP = 2 # The file depends on other files + +# Source files +sources = [ + "m_atomdata.F90", + "m_dummy.F90", + "m_exp_mat.F90", + "m_matrix.F90", + "m_pptools.F90", + "m_special_funcs.F90", + "m_symtk.F90", + "m_pstat.F90", +] +# IMPORTANT : please use the alphabetic order in the previous list. Do NOT add the new routine names at the end of the list. +# This is important to avoid numerous conflicts at merge time. Thank you very much. Xavier. diff --git a/GX-PAW/common/src/32_util/lib32_util.a b/GX-PAW/common/src/32_util/lib32_util.a new file mode 100644 index 00000000..59251630 Binary files /dev/null and b/GX-PAW/common/src/32_util/lib32_util.a differ diff --git a/GX-PAW/common/src/32_util/m_atomdata.F90 b/GX-PAW/common/src/32_util/m_atomdata.F90 new file mode 100644 index 00000000..ba6a440f --- /dev/null +++ b/GX-PAW/common/src/32_util/m_atomdata.F90 @@ -0,0 +1,819 @@ +!!****m* ABINIT/m_atomdata +!! NAME +!! m_atomdata +!! +!! FUNCTION +!! Atomic data +!! +!! COPYRIGHT +!! Copyright (C) 2000-2024 ABINIT group (XG, MJV, MT, MG) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! TODO +!! * Use module global lookup table. +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" + +module m_atomdata + + use defs_basis + use m_errors + use m_abicore + + use m_fstrings, only : sjoin + + implicit none + + private + +! Utilities + public :: symbol2znucl ! Symbol --> znucl + public :: znucl2symbol ! znucl --> symbol + public :: atom_length ! Return atomic decay length for one given type of atom. + public :: atom_gauss ! Approximate the atomic density with a gaussian (used to initialize densities) +!!*** + +!---------------------------------------------------------------------- + +!!****t* m_atomdata/atomdata_t +!! NAME +!! atomdata_t +!! +!! FUNCTION +!! Record with the atomic data (symbol, covalent radius, atomic mass) for a given atomic specie +!! +!! SOURCE + + type,public :: atomdata_t + real(dp) :: znucl ! Atomic number (real to treat alchemy) + real(dp) :: amu ! Atomic mass + real(dp) :: rcov ! Covalent radius + character(len=2) :: symbol ! Atomic symbol + end type atomdata_t + + + public :: atomdata_from_znucl ! Return atomic data from znucl + public :: atomdata_from_symbol ! Return atomic data from symbol +!!*** + +! ************************************************************************* + +contains + +!!****f* ABINIT/atomdata_from_znucl +!! NAME +!! atomdata_from_znucl +!! +!! FUNCTION +!! Return atomic data : symbol, covalent radius, atomic mass +!! Atomic masses are those recommended by the commission on Atomic Weights and +!! Isotopic Abundances, Inorganic Chemistry Division, IUPAC, in +!! Pure Appl. Chem. 60, 841 (1988) [[cite:IUPAC1988]]. For Tc, Pm, Po to Ac, Pa and beyond U, +!! none of the isotopes has a half-life greater than 3.0d10 years, and +!! the values provided here do not come from that source. +!! +!! INPUTS +!! znucl=atomic number (a real(dp) number ! the nearest integer is selected in the routine ...) +!! +!! OUTPUT +!! amu=atomic mass (Masses beyond element 103 are fixed at 260) +!! rcov=covalent radius (Elements beyond 86 have an estimated covalent radius) +!! character(len=2) symbol=atomic symbol +!! +!! SOURCE + +subroutine atomdata_from_znucl(atom,znucl) + +!Arguments ------------------------------------ +!scalars + real(dp),intent(in) :: znucl + type(atomdata_t),intent(out) :: atom + +!Local variables------------------------------- +!scalars + integer :: nucl + real(dp) :: amu,rcov + character(len=2) :: symbol + +! ************************************************************************* + + nucl=nint(znucl) + select case (nucl) + case(0) + amu=one ; rcov=one/Bohr_Ang ; symbol='no' + case(1) + amu=1.00794d0 ; rcov=0.32d0/Bohr_Ang ; symbol=' H' + case(2) + amu=4.002602d0 ; rcov=0.93d0/Bohr_Ang ; symbol='He' + case(3) + amu=6.941d0 ; rcov=1.23d0/Bohr_Ang ; symbol='Li' + case(4) + amu=9.012182d0 ; rcov=0.90d0/Bohr_Ang ; symbol='Be' + case(5) + amu=10.811d0 ; rcov=0.80d0/Bohr_Ang ; symbol=' B' + case(6) + amu=12.011d0 ; rcov=0.77d0/Bohr_Ang ; symbol=' C' + case(7) + amu=14.00674d0 ; rcov=0.74d0/Bohr_Ang ; symbol=' N' + case(8) + amu=15.9994d0 ; rcov=0.73d0/Bohr_Ang ; symbol=' O' + case(9) + amu=18.9984032d0; rcov=0.72d0/Bohr_Ang ; symbol=' F' + + case(10) + amu=20.1797d0 ; rcov=0.71d0/Bohr_Ang ; symbol='Ne' + case(11) + amu=22.989768d0 ; rcov=1.54d0/Bohr_Ang ; symbol='Na' + case(12) + amu=24.3050d0 ; rcov=1.36d0/Bohr_Ang ; symbol='Mg' + case(13) + amu=26.981539d0 ; rcov=1.18d0/Bohr_Ang ; symbol='Al' + case(14) + amu=28.0855d0 ; rcov=1.11d0/Bohr_Ang ; symbol='Si' + case(15) + amu=30.973762d0 ; rcov=1.06d0/Bohr_Ang ; symbol=' P' + case(16) + amu=32.066d0 ; rcov=1.02d0/Bohr_Ang ; symbol=' S' + case(17) + amu=35.4527d0 ; rcov=0.99d0/Bohr_Ang ; symbol='Cl' + case(18) + amu=39.948d0 ; rcov=0.98d0/Bohr_Ang ; symbol='Ar' + case(19) + amu=39.0983d0 ; rcov=2.03d0/Bohr_Ang ; symbol=' K' + + case(20) + amu=40.078d0 ; rcov=1.74d0/Bohr_Ang ; symbol='Ca' + case(21) + amu=44.955910d0 ; rcov=1.44d0/Bohr_Ang ; symbol='Sc' + case(22) + amu=47.88d0 ; rcov=1.32d0/Bohr_Ang ; symbol='Ti' + case(23) + amu=50.9415d0 ; rcov=1.22d0/Bohr_Ang ; symbol=' V' + case(24) + amu=51.9961d0 ; rcov=1.18d0/Bohr_Ang ; symbol='Cr' + case(25) + amu=54.93805d0 ; rcov=1.17d0/Bohr_Ang ; symbol='Mn' + case(26) + amu=55.847d0 ; rcov=1.17d0/Bohr_Ang ; symbol='Fe' + case(27) + amu=58.93320d0 ; rcov=1.16d0/Bohr_Ang ; symbol='Co' + case(28) + amu=58.69d0 ; rcov=1.15d0/Bohr_Ang ; symbol='Ni' + case(29) + amu=63.546d0 ; rcov=1.17d0/Bohr_Ang ; symbol='Cu' + + case(30) + amu=65.39d0 ; rcov=1.25d0/Bohr_Ang ; symbol='Zn' + case(31) + amu=69.723d0 ; rcov=1.26d0/Bohr_Ang ; symbol='Ga' + case(32) + amu=72.61d0 ; rcov=1.22d0/Bohr_Ang ; symbol='Ge' + case(33) + amu=74.92159d0 ; rcov=1.20d0/Bohr_Ang ; symbol='As' + case(34) + amu=78.96d0 ; rcov=1.16d0/Bohr_Ang ; symbol='Se' + case(35) + amu=79.904d0 ; rcov=1.14d0/Bohr_Ang ; symbol='Br' + case(36) + amu=83.80d0 ; rcov=1.12d0/Bohr_Ang ; symbol='Kr' + case(37) + amu=85.4678d0 ; rcov=2.16d0/Bohr_Ang ; symbol='Rb' + case(38) + amu=87.62d0 ; rcov=1.91d0/Bohr_Ang ; symbol='Sr' + case(39) + amu=88.90585d0 ; rcov=1.62d0/Bohr_Ang ; symbol=' Y' + + case(40) + amu=91.224d0 ; rcov=1.45d0/Bohr_Ang ; symbol='Zr' + case(41) + amu=92.90638d0 ; rcov=1.34d0/Bohr_Ang ; symbol='Nb' + case(42) + amu=95.94d0 ; rcov=1.30d0/Bohr_Ang ; symbol='Mo' + case(43) + amu=98.9062d0 ; rcov=1.27d0/Bohr_Ang ; symbol='Tc' + case(44) + amu=101.07d0 ; rcov=1.25d0/Bohr_Ang ; symbol='Ru' + case(45) + amu=102.9055d0 ; rcov=1.25d0/Bohr_Ang ; symbol='Rh' + case(46) + amu=106.42d0 ; rcov=1.28d0/Bohr_Ang ; symbol='Pd' + case(47) + amu=107.8682d0 ; rcov=1.34d0/Bohr_Ang ; symbol='Ag' + case(48) + amu=112.411d0 ; rcov=1.48d0/Bohr_Ang ; symbol='Cd' + case(49) + amu=114.82d0 ; rcov=1.44d0/Bohr_Ang ; symbol='In' + + case(50) + amu=118.710d0 ; rcov=1.41d0/Bohr_Ang ; symbol='Sn' + case(51) + amu=121.753d0 ; rcov=1.40d0/Bohr_Ang ; symbol='Sb' + case(52) + amu=127.60d0 ; rcov=1.36d0/Bohr_Ang ; symbol='Te' + case(53) + amu=126.90447d0 ; rcov=1.33d0/Bohr_Ang ; symbol=' I' + case(54) + amu=131.29d0 ; rcov=1.31d0/Bohr_Ang ; symbol='Xe' + case(55) + amu=132.90543d0 ; rcov=2.35d0/Bohr_Ang ; symbol='Cs' + case(56) + amu=137.327d0 ; rcov=1.98d0/Bohr_Ang ; symbol='Ba' + case(57) + amu=138.9055d0 ; rcov=1.69d0/Bohr_Ang ; symbol='La' + case(58) + amu=140.115d0 ; rcov=1.65d0/Bohr_Ang ; symbol='Ce' + case(59) + amu=140.90765d0 ; rcov=1.65d0/Bohr_Ang ; symbol='Pr' + + case(60) + amu=144.24d0 ; rcov=1.64d0/Bohr_Ang ; symbol='Nd' + case(61) + amu=147.91d0 ; rcov=1.64d0/Bohr_Ang ; symbol='Pm' + case(62) + amu=150.36d0 ; rcov=1.62d0/Bohr_Ang ; symbol='Sm' + case(63) + amu=151.965d0 ; rcov=1.85d0/Bohr_Ang ; symbol='Eu' + case(64) + amu=157.25d0 ; rcov=1.61d0/Bohr_Ang ; symbol='Gd' + case(65) + amu=158.92534d0 ; rcov=1.59d0/Bohr_Ang ; symbol='Tb' + case(66) + amu=162.50d0 ; rcov=1.59d0/Bohr_Ang ; symbol='Dy' + case(67) + amu=164.93032d0 ; rcov=1.57d0/Bohr_Ang ; symbol='Ho' + case(68) + amu=167.26d0 ; rcov=1.57d0/Bohr_Ang ; symbol='Er' + case(69) + amu=168.93421d0 ; rcov=1.56d0/Bohr_Ang ; symbol='Tm' + + case(70) + amu=173.04d0 ; rcov=1.70d0/Bohr_Ang ; symbol='Yb' + case(71) + amu=174.967d0 ; rcov=1.56d0/Bohr_Ang ; symbol='Lu' + case(72) + amu=178.49d0 ; rcov=1.44d0/Bohr_Ang ; symbol='Hf' + case(73) + amu=180.9479d0 ; rcov=1.34d0/Bohr_Ang ; symbol='Ta' + case(74) + amu=183.85d0 ; rcov=1.30d0/Bohr_Ang ; symbol=' W' + case(75) + amu=186.207d0 ; rcov=1.28d0/Bohr_Ang ; symbol='Re' + case(76) + amu=190.2d0 ; rcov=1.26d0/Bohr_Ang ; symbol='Os' + case(77) + amu=192.22d0 ; rcov=1.27d0/Bohr_Ang ; symbol='Ir' + case(78) + amu=195.08d0 ; rcov=1.30d0/Bohr_Ang ; symbol='Pt' + case(79) + amu=196.96654d0 ; rcov=1.34d0/Bohr_Ang ; symbol='Au' + + case(80) + amu=200.59d0 ; rcov=1.49d0/Bohr_Ang ; symbol='Hg' + case(81) + amu=204.3833d0 ; rcov=1.48d0/Bohr_Ang ; symbol='Tl' + case(82) + amu=207.2d0 ; rcov=1.47d0/Bohr_Ang ; symbol='Pb' + case(83) + amu=208.98037d0 ; rcov=1.46d0/Bohr_Ang ; symbol='Bi' + case(84) + amu=209.0d0 ; rcov=1.46d0/Bohr_Ang ; symbol='Po' + case(85) + amu=210.0d0 ; rcov=1.45d0/Bohr_Ang ; symbol='At' + case(86) + amu=222.0d0 ; rcov=1.45d0/Bohr_Ang ; symbol='Rn' + case(87) + amu=223.0d0 ; rcov=2.50d0/Bohr_Ang ; symbol='Fr' + case(88) + amu=226.0254d0 ; rcov=2.10d0/Bohr_Ang ; symbol='Ra' + case(89) + amu=230.0d0 ; rcov=1.85d0/Bohr_Ang ; symbol='Ac' + + case(90) + amu=232.0381d0 ; rcov=1.65d0/Bohr_Ang ; symbol='Th' + case(91) + amu=231.0359d0 ; rcov=1.50d0/Bohr_Ang ; symbol='Pa' + case(92) + amu=238.0289d0 ; rcov=1.42d0/Bohr_Ang ; symbol=' U' + case(93) + amu=237.0482d0 ; rcov=1.42d0/Bohr_Ang ; symbol='Np' + case(94) + amu=242.0d0 ; rcov=1.42d0/Bohr_Ang ; symbol='Pu' + case(95) + amu=243.0d0 ; rcov=1.42d0/Bohr_Ang ; symbol='Am' + case(96) + amu=247.0d0 ; rcov=1.42d0/Bohr_Ang ; symbol='Cm' + case(97) + amu=247.0d0 ; rcov=1.42d0/Bohr_Ang ; symbol='Bk' + case(98) + amu=249.0d0 ; rcov=1.42d0/Bohr_Ang ; symbol='Cf' + case(99) + amu=254.0d0 ; rcov=1.42d0/Bohr_Ang ; symbol='Es' + + case(100) + amu=253.0d0 ; rcov=1.42d0/Bohr_Ang ; symbol='Fm' + case(101) + amu=256.0d0 ; rcov=1.42d0/Bohr_Ang ; symbol='Md' + case(102) + amu=254.0d0 ; rcov=1.42d0/Bohr_Ang ; symbol='No' + case(103) + amu=257.0d0 ; rcov=1.42d0/Bohr_Ang ; symbol='Lr' + case(104:) + amu=260.0d0 ; rcov=1.42d0/Bohr_Ang ; symbol='Xx' + + end select + + atom%znucl = znucl + atom%amu = amu + atom%rcov = rcov + atom%symbol = symbol + +end subroutine atomdata_from_znucl +!!*** + +!!****f* m_atomdata/atomdata_from_symbol +!! NAME +!! atomdata_from_symbol +!! +!! FUNCTION +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +subroutine atomdata_from_symbol(atom, symbol) + +!Arguments ------------------------------------ +!scalars + character(len=*),intent(in) :: symbol + type(atomdata_t),intent(out) :: atom + +!Local variables------------------------------- +!scalars + real(dp) :: znucl,amu,rcov + +! ************************************************************************* + + select case (symbol) + case('no') + amu= one ; rcov=one/Bohr_Ang ; znucl=0 + case(' H', 'H ') + amu= 1.00794d0 ; rcov=0.32d0/Bohr_Ang ; znucl=1 + case('He') + amu= 4.002602d0 ; rcov=0.93d0/Bohr_Ang ; znucl=2 + case('Li') + amu= 6.941d0 ; rcov=1.23d0/Bohr_Ang ; znucl=3 + case('Be') + amu= 9.012182d0 ; rcov=0.90d0/Bohr_Ang ; znucl=4 + case(' B', 'B ') + amu= 10.811d0 ; rcov=0.80d0/Bohr_Ang ; znucl=5 + case(' C', 'C ') + amu= 12.011d0 ; rcov=0.77d0/Bohr_Ang ; znucl=6 + case(' N', 'N ') + amu= 14.00674d0 ; rcov=0.74d0/Bohr_Ang ; znucl=7 + case(' O', 'O ') + amu= 15.9994d0 ; rcov=0.73d0/Bohr_Ang ; znucl=8 + case(' F', 'F ') + amu= 18.9984032d0; rcov=0.72d0/Bohr_Ang ; znucl=9 + case('Ne') + amu= 20.1797d0 ; rcov=0.71d0/Bohr_Ang ; znucl=10 + case('Na') + amu= 22.989768d0 ; rcov=1.54d0/Bohr_Ang ; znucl= 11 + case('Mg') + amu= 24.3050d0 ; rcov=1.36d0/Bohr_Ang ; znucl=12 + case('Al') + amu= 26.981539d0 ; rcov=1.18d0/Bohr_Ang ; znucl=13 + case('Si') + amu= 28.0855d0 ; rcov=1.11d0/Bohr_Ang ; znucl=14 + case(' P', 'P ') + amu= 30.973762d0 ; rcov=1.06d0/Bohr_Ang ; znucl=15 + case(' S', 'S ') + amu= 32.066d0 ; rcov=1.02d0/Bohr_Ang ; znucl=16 + case('Cl') + amu= 35.4527d0 ; rcov=0.99d0/Bohr_Ang ; znucl=17 + case('Ar') + amu= 39.948d0 ; rcov=0.98d0/Bohr_Ang ; znucl=18 + case(' K', 'K ') + amu= 39.0983d0 ; rcov=2.03d0/Bohr_Ang ; znucl=19 + case('Ca') + amu= 40.078d0 ; rcov=1.74d0/Bohr_Ang ; znucl=20 + case('Sc') + amu= 44.955910d0 ; rcov=1.44d0/Bohr_Ang ; znucl=21 + case('Ti') + amu= 47.88d0 ; rcov=1.32d0/Bohr_Ang ; znucl=22 + case(' V', 'V ') + amu= 50.9415d0 ; rcov=1.22d0/Bohr_Ang ; znucl=23 + case('Cr') + amu= 51.9961d0 ; rcov=1.18d0/Bohr_Ang ; znucl=24 + case('Mn') + amu= 54.93805d0 ; rcov=1.17d0/Bohr_Ang ; znucl=25 + case('Fe') + amu= 55.847d0 ; rcov=1.17d0/Bohr_Ang ; znucl=26 + case('Co') + amu= 58.93320d0 ; rcov=1.16d0/Bohr_Ang ; znucl=27 + case('Ni') + amu= 58.69d0 ; rcov=1.15d0/Bohr_Ang ; znucl=28 + case('Cu') + amu= 63.546d0 ; rcov=1.17d0/Bohr_Ang ; znucl=29 + case('Zn') + amu= 65.39d0 ; rcov=1.25d0/Bohr_Ang ; znucl=30 + case('Ga') + amu= 69.723d0 ; rcov=1.26d0/Bohr_Ang ; znucl=31 + case('Ge') + amu= 72.61d0 ; rcov=1.22d0/Bohr_Ang ; znucl=32 + case('As') + amu= 74.92159d0 ; rcov=1.20d0/Bohr_Ang ; znucl=33 + case('Se') + amu= 78.96d0 ; rcov=1.16d0/Bohr_Ang ; znucl=34 + case('Br') + amu= 79.904d0 ; rcov=1.14d0/Bohr_Ang ; znucl=35 + case('Kr') + amu= 83.80d0 ; rcov=1.12d0/Bohr_Ang ; znucl=36 + case('Rb') + amu= 85.4678d0 ; rcov=2.16d0/Bohr_Ang ; znucl=37 + case('Sr') + amu= 87.62d0 ; rcov=1.91d0/Bohr_Ang ; znucl=38 + case(' Y', 'Y ') + amu= 88.90585d0 ; rcov=1.62d0/Bohr_Ang ; znucl=39 + case('Zr') + amu= 91.224d0 ; rcov=1.45d0/Bohr_Ang ; znucl=40 + case('Nb') + amu= 92.90638d0 ; rcov=1.34d0/Bohr_Ang ; znucl=41 + case('Mo') + amu= 95.94d0 ; rcov=1.30d0/Bohr_Ang ; znucl=42 + case('Tc') + amu= 98.9062d0 ; rcov=1.27d0/Bohr_Ang ; znucl=43 + case('Ru') + amu= 101.07d0 ; rcov=1.25d0/Bohr_Ang ; znucl=44 + case('Rh') + amu= 102.9055d0 ; rcov=1.25d0/Bohr_Ang ; znucl=45 + case('Pd') + amu= 106.42d0 ; rcov=1.28d0/Bohr_Ang ; znucl=46 + case('Ag') + amu= 107.8682d0 ; rcov=1.34d0/Bohr_Ang ; znucl=47 + case('Cd') + amu= 112.411d0 ; rcov=1.48d0/Bohr_Ang ; znucl=48 + case('In') + amu= 114.82d0 ; rcov=1.44d0/Bohr_Ang ; znucl=49 + case('Sn') + amu= 118.710d0 ; rcov=1.41d0/Bohr_Ang ; znucl=50 + case('Sb') + amu= 121.753d0 ; rcov=1.40d0/Bohr_Ang ; znucl=51 + case('Te') + amu= 127.60d0 ; rcov=1.36d0/Bohr_Ang ; znucl=52 + case(' I', 'I ') + amu= 126.90447d0 ; rcov=1.33d0/Bohr_Ang ; znucl=53 + case('Xe') + amu= 131.29d0 ; rcov=1.31d0/Bohr_Ang ; znucl=54 + case('Cs') + amu= 132.90543d0 ; rcov=2.35d0/Bohr_Ang ; znucl=55 + case('Ba') + amu= 137.327d0 ; rcov=1.98d0/Bohr_Ang ; znucl=56 + case('La') + amu= 138.9055d0 ; rcov=1.69d0/Bohr_Ang ; znucl=57 + case('Ce') + amu= 140.115d0 ; rcov=1.65d0/Bohr_Ang ; znucl=58 + case('Pr') + amu= 140.90765d0 ; rcov=1.65d0/Bohr_Ang ; znucl=59 + case('Nd') + amu= 144.24d0 ; rcov=1.64d0/Bohr_Ang ; znucl=60 + case('Pm') + amu= 147.91d0 ; rcov=1.64d0/Bohr_Ang ; znucl=61 + case('Sm') + amu= 150.36d0 ; rcov=1.62d0/Bohr_Ang ; znucl=62 + case('Eu') + amu= 151.965d0 ; rcov=1.85d0/Bohr_Ang ; znucl=63 + case('Gd') + amu= 157.25d0 ; rcov=1.61d0/Bohr_Ang ; znucl=64 + case('Tb') + amu= 158.92534d0 ; rcov=1.59d0/Bohr_Ang ; znucl=65 + case('Dy') + amu= 162.50d0 ; rcov=1.59d0/Bohr_Ang ; znucl=66 + case('Ho') + amu= 164.93032d0 ; rcov=1.57d0/Bohr_Ang ; znucl=67 + case('Er') + amu= 167.26d0 ; rcov=1.57d0/Bohr_Ang ; znucl=68 + case('Tm') + amu= 168.93421d0 ; rcov=1.56d0/Bohr_Ang ; znucl=69 + case('Yb') + amu= 173.04d0 ; rcov=1.70d0/Bohr_Ang ; znucl=70 + case('Lu') + amu= 174.967d0 ; rcov=1.56d0/Bohr_Ang ; znucl=71 + case('Hf') + amu= 178.49d0 ; rcov=1.44d0/Bohr_Ang ; znucl=72 + case('Ta') + amu= 180.9479d0 ; rcov=1.34d0/Bohr_Ang ; znucl=73 + case(' W', 'W ') + amu= 183.85d0 ; rcov=1.30d0/Bohr_Ang ; znucl=74 + case('Re') + amu= 186.207d0 ; rcov=1.28d0/Bohr_Ang ; znucl=75 + case('Os') + amu= 190.2d0 ; rcov=1.26d0/Bohr_Ang ; znucl=76 + case('Ir') + amu= 192.22d0 ; rcov=1.27d0/Bohr_Ang ; znucl=77 + case('Pt') + amu= 195.08d0 ; rcov=1.30d0/Bohr_Ang ; znucl=78 + case('Au') + amu= 196.96654d0 ; rcov=1.34d0/Bohr_Ang ; znucl=79 + case('Hg') + amu= 200.59d0 ; rcov=1.49d0/Bohr_Ang ; znucl=80 + case('Tl') + amu= 204.3833d0 ; rcov=1.48d0/Bohr_Ang ; znucl=81 + case('Pb') + amu= 207.2d0 ; rcov=1.47d0/Bohr_Ang ; znucl=82 + case('Bi') + amu= 208.98037d0 ; rcov=1.46d0/Bohr_Ang ; znucl=83 + case('Po') + amu= 209.0d0 ; rcov=1.46d0/Bohr_Ang ; znucl=84 + case('At') + amu= 210.0d0 ; rcov=1.45d0/Bohr_Ang ; znucl=85 + case('Rn') + amu= 222.0d0 ; rcov=1.45d0/Bohr_Ang ; znucl=86 + case('Fr') + amu= 223.0d0 ; rcov=2.50d0/Bohr_Ang ; znucl=87 + case('Ra') + amu= 226.0254d0 ; rcov=2.10d0/Bohr_Ang ; znucl=88 + case('Ac') + amu= 230.0d0 ; rcov=1.85d0/Bohr_Ang ; znucl=89 + case('Th') + amu= 232.0381d0 ; rcov=1.65d0/Bohr_Ang ; znucl=90 + case('Pa') + amu= 231.0359d0 ; rcov=1.50d0/Bohr_Ang ; znucl=91 + case(' U', 'U ') + amu= 238.0289d0 ; rcov=1.42d0/Bohr_Ang ; znucl=92 + case('Np') + amu= 237.0482d0 ; rcov=1.42d0/Bohr_Ang ; znucl=93 + case('Pu') + amu= 242.0d0 ; rcov=1.42d0/Bohr_Ang ; znucl=94 + case('Am') + amu= 243.0d0 ; rcov=1.42d0/Bohr_Ang ; znucl=95 + case('Cm') + amu= 247.0d0 ; rcov=1.42d0/Bohr_Ang ; znucl=96 + case('Bk') + amu= 247.0d0 ; rcov=1.42d0/Bohr_Ang ; znucl=97 + case('Cf') + amu= 249.0d0 ; rcov=1.42d0/Bohr_Ang ; znucl=98 + case('Es') + amu= 254.0d0 ; rcov=1.42d0/Bohr_Ang ; znucl=89 + case('Fm') + amu= 253.0d0 ; rcov=1.42d0/Bohr_Ang ; znucl=100 + case('Md') + amu= 256.0d0 ; rcov=1.42d0/Bohr_Ang ; znucl=101 + case('No') + amu= 254.0d0 ; rcov=1.42d0/Bohr_Ang ; znucl=102 + case('Lr') + amu= 257.0d0 ; rcov=1.42d0/Bohr_Ang ; znucl=103 + case('Xx') + amu= 260.0d0 ; rcov=1.42d0/Bohr_Ang ; znucl=104 + case default + ABI_ERROR(sjoin("Unknown element symbol: `",trim(symbol), "`")) + end select + + atom%znucl = znucl + atom%amu = amu + atom%rcov = rcov + atom%symbol = symbol + +end subroutine atomdata_from_symbol +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_atomdata/znucl2symbol +!! NAME +!! +!! FUNCTION +!! Return the symbol from znucl +!! +!! INPUTS +!! znucl=atomic number +!! +!! OUTPUT +!! +!! SOURCE + +function znucl2symbol(znucl) result(symbol) + +!Arguments ------------------------------------ +!scalars + real(dp),intent(in) :: znucl + character(len=2) :: symbol + +!Local variables + type(atomdata_t) :: atom + +! ************************************************************************* + + call atomdata_from_znucl(atom, znucl) + symbol = atom%symbol + +end function znucl2symbol +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_atomdata/symbol2znucl +!! NAME +!! +!! FUNCTION +!! Return znucl from the symbol +!! +!! OUTPUT +!! +!! SOURCE + +function symbol2znucl(symbol) result(znucl) + +!Arguments ------------------------------------ +!scalars + real(dp) :: znucl + character(len=*),intent(in) :: symbol + +!Local variables + type(atomdata_t) :: atom + +! ************************************************************************* + + call atomdata_from_symbol(atom, symbol) + znucl = atom%znucl + +end function symbol2znucl +!!*** + +!!****f* m_atomdata/atom_length +!! NAME +!! atom_length +!! +!! FUNCTION +!! Return atomic decay length for one given type of atom. +!! This length is used to generate an approximate atomic gaussian density +!! in reciprocal space: n^AT(G)=exp[-(2pi.length.G)^2] +!! +!! INPUTS +!! densty=parameter for initialisation of the density of this atom type +!! if densty>0, returned decay length if densty ! +!! zion=charge on current type of atom (real number) +!! znucl=atomic number, for current type of atom +!! +!! OUTPUT +!! length=decay lenth +!! +!! SOURCE + +function atom_length(densty,zion,znucl) result(length) + +!Arguments ------------------------------------ +!scalars + real(dp),intent(in) :: densty,zion,znucl + real(dp) :: length + +!Local variables------------------------------- +!scalars + integer :: nval + real(dp) :: coreel +!arrays + real(dp) :: data_length(16) + +! ************************************************************************* + +!Either use the input value, or the default value, tabulated now. + if(abs(densty)>tol10)then + length=densty + else + +! Count the number of core electrons. + coreel=znucl-zion +! Round the number of valence electrons + nval=nint(zion) + +! For each set of core electron numbers, there are different decay lengths, +! they start from nval=1, and proceed by group of 5, until a default is used + + if (nval==0) then + length=zero + +! Bare ions : adjusted on 1h and 2he only + else if(coreel<0.5)then + data_length(1:4)=(/ .6_dp,.4_dp,.3_dp,.25_dp /) + length=.2_dp + if(nval<=4)length=data_length(nval) + +! 1s2 core : adjusted on 3li, 6c, 7n, and 8o + else if(coreel<2.5)then + data_length(1:8)=(/ 1.8_dp,1.4_dp,1.0_dp ,.7_dp,.6_dp,& +& .5_dp, .4_dp, .35_dp /) + length=.3_dp + if(nval<=8)length=data_length(nval) + +! Ne core (1s2 2s2 2p6) : adjusted on 11na, 13al, 14si and 17cl + else if(coreel<10.5)then + data_length(1:10)=(/ 2.0_dp,1.6_dp,1.25_dp,1.1_dp,1.0_dp,& +& .9_dp, .8_dp, .7_dp , .7_dp, .7_dp /) + length=.6_dp + if(nval<=10)length=data_length(nval) + +! Mg core (1s2 2s2 2p6 3s2) : adjusted on 19k, and on coreel==10 + else if(coreel<12.5)then + data_length(1:10)=(/ 1.9_dp,1.5_dp,1.15_dp,1.0_dp,0.9_dp,& +& .8_dp, .7_dp, .6_dp , .6_dp, .6_dp /) + length=.5_dp + if(nval<=10)length=data_length(nval) + +! Ar core (Ne + 3s2 3p6) : adjusted on 20ca, 25mn and 30zn + else if(coreel<18.5)then + data_length(1:12)=(/ 2.0_dp ,1.8_dp ,1.5_dp,1.2_dp ,1.0_dp,& +& .9_dp , .85_dp, .8_dp, .75_dp, .7_dp,& +& .65_dp, .65_dp /) + length=.6_dp + if(nval<=12)length=data_length(nval) + +! Full 3rd shell core (Ar + 3d10) : adjusted on 31ga, 34se and 38sr + else if(coreel<28.5)then + data_length(1:14)=(/ 1.5_dp ,1.25_dp,1.15_dp,1.05_dp,1.00_dp,& +& .95_dp, .95_dp, .9_dp , .9_dp , .85_dp,& +& .85_dp, .80_dp, .8_dp , .75_dp /) + length=.7_dp + if(nval<=14)length=data_length(nval) + +! Krypton core (Ar + 3d10 4s2 4p6) : adjusted on 39y, 42mo and 48cd + else if(coreel<36.5)then + data_length(1:12)=(/ 2.0_dp ,2.00_dp,1.60_dp,1.40_dp,1.25_dp,& +& 1.10_dp,1.00_dp, .95_dp, .90_dp, .85_dp,& +& .80_dp, .75_dp /) + length=.7_dp + if(nval<=12)length=data_length(nval) + +! For the remaining elements, consider a function of nval only + else + data_length(1:12)=(/ 2.0_dp ,2.00_dp,1.55_dp,1.25_dp,1.15_dp,& +& 1.10_dp,1.05_dp,1.0_dp , .95_dp , .9_dp,& +& .85_dp, .85_dp /) + length=.8_dp + if(nval<=12)length=data_length(nval) + + end if + + end if ! End the choice between default and no-default + +!DEBUG +!Here, use the previous default +!length=1.2_dp +!ENDDEBUG + +end function atom_length +!!*** + +!!****f* m_atomdata/atom_gauss +!! NAME +!! atom_gauss +!! +!! FUNCTION +!! Approximate the atomic density with a gaussian. Used to approximate densities with +!! atomic-like quantities if the pseudopotential does not provide the valence charge density. +!! +!! INPUTS +!! ntypat=Number of type of atoms. +!! densty(ntypat,3)=parameter for initialisation of the density of this atom type +!! if densty>0, returned decay length if densty! +!! ziontypat(ntypat)=charge on current type of atom (real number) +!! znucltypat=atomic number, for current type of atom +!! +!! OUTPUT +!! gauss(2,ntypat)=Gaussian parameters. +!! +!! SOURCE + +subroutine atom_gauss(ntypat, densty, ziontypat, znucltypat, gauss) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: ntypat +!arrays + real(dp),intent(in) :: densty(ntypat,4),ziontypat(ntypat),znucltypat(ntypat) + real(dp),intent(out) :: gauss(2,ntypat) + +!Local variables------------------------------- +!scalars + integer :: itypat + +! ************************************************************************* + + do itypat=1,ntypat + gauss(1,itypat) = ziontypat(itypat) + gauss(2,itypat) = atom_length(densty(itypat,1), ziontypat(itypat), znucltypat(itypat)) + end do + +end subroutine atom_gauss +!!*** + +end module m_atomdata +!!*** diff --git a/GX-PAW/common/src/32_util/m_atomdata.o b/GX-PAW/common/src/32_util/m_atomdata.o new file mode 100644 index 00000000..e9826fd7 Binary files /dev/null and b/GX-PAW/common/src/32_util/m_atomdata.o differ diff --git a/GX-PAW/common/src/32_util/m_dummy.F90 b/GX-PAW/common/src/32_util/m_dummy.F90 new file mode 100644 index 00000000..f8a47e7f --- /dev/null +++ b/GX-PAW/common/src/32_util/m_dummy.F90 @@ -0,0 +1,142 @@ +!!****f* DUMMY_TESTS/m_dummy_tests +!! NAME +!! m_dummy_tests +!! +!! FUNCTION +!! Dummy module, to detect unused values +!! +!! COPYRIGHT +!! Copyright (C) 2017-2024 ABINIT group (XG) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! INPUTS +!! used_arg = used argument +!! +!! OUTPUT +!! dummy_out1 = first output value +!! +!! SIDE EFFECTS +!! used_arg = used argument +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" + + module m_dummy_tests + + implicit none + + !private + public + + double precision, save :: dummy_value + public :: test_dummy + + contains +!!*** + +!!****f* DUMMY_TESTS/test_unused_arg +!! NAME +!! test_unused_arg +!! +!! FUNCTION +!! Dummy subroutine, to test unused arguments +!! +!! INPUTS +!! unused_arg = unused argument +!! +!! SIDE EFFECTS +!! used_arg = used argument +!! +!! SOURCE + + subroutine test_unused_arg(used_arg,unused_arg) + + implicit none + +!Local variables------------------------------- +!scalars + integer, intent(inout) :: used_arg + integer, intent(in) :: unused_arg + +!****************************************************************** + + used_arg=used_arg+1 + + end subroutine test_unused_arg +!!*** + +!!****f* DUMMY_TESTS/test_same_actual_arg +!! NAME +!! test_same_actual_arg +!! +!! FUNCTION +!! Dummy subroutine, to detect when the calling subroutine attributes to one variable results from two different arguments +!! +!! INPUTS +!! used_arg = used argument +!! +!! OUTPUT +!! dummy_out1 = first output value +!! dummy_out2 = second output value +!! +!! SIDE EFFECTS +!! used_arg = used argument +!! +!! SOURCE + + subroutine test_same_actual_arg(dummy_out1,dummy_out2,used_arg) + + implicit none + +!Local variables------------------------------- +!scalars + integer, intent(in) :: used_arg + integer, intent(out) :: dummy_out1, dummy_out2 + +!****************************************************************** + + dummy_out1=used_arg+1 + dummy_out2=used_arg+2 + + end subroutine test_same_actual_arg +!!*** + +!!****f* DUMMY_TESTS/test_dummy +!! NAME +!! test_dummy +!! +!! FUNCTION +!! Dummy subroutine +!! +!! INPUTS +!! used_arg = used argument +!! +!! OUTPUT +!! dummy_out1 = first output value +!! +!! SOURCE + + subroutine test_dummy(dummy_out1,used_arg) + + implicit none + +!Local variables------------------------------- +!scalars + integer, intent(in) :: used_arg + integer, intent(out) :: dummy_out1 + +!****************************************************************** + + dummy_out1=used_arg + + end subroutine test_dummy + + end module m_dummy_tests +!!*** diff --git a/GX-PAW/common/src/32_util/m_dummy.o b/GX-PAW/common/src/32_util/m_dummy.o new file mode 100644 index 00000000..57dc58de Binary files /dev/null and b/GX-PAW/common/src/32_util/m_dummy.o differ diff --git a/GX-PAW/common/src/32_util/m_exp_mat.F90 b/GX-PAW/common/src/32_util/m_exp_mat.F90 new file mode 100644 index 00000000..8d46a49e --- /dev/null +++ b/GX-PAW/common/src/32_util/m_exp_mat.F90 @@ -0,0 +1,157 @@ +!!****m* ABINIT/m_exp_mat +!! NAME +!! m_exp_mat +!! +!! FUNCTION +!! This subroutine calculate the exponential of a matrix +!! +!! COPYRIGHT +!! Copyright (C) 2002-2024 ABINIT group (XG) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! For the initials of contributors, see ~abinit/doc/developers/contributors.txt. +!! +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" + +MODULE m_exp_mat + + use defs_basis + use m_abicore + use m_errors + use m_linalg_interfaces + + implicit none + + private + + public :: exp_mat ! exponential of a complex matrix + + + interface exp_mat + module procedure exp_mat_cx + end interface exp_mat + + +CONTAINS !=========================================================== + !!*** + + !!****f* m_exp_mat/exp_mat_cx + !! NAME + !! exp_mat_cx + !! + !! FUNCTION + !! Returns the exponential of a complex matrix multiplied a scalar + !! + !! INPUTS + !! mat_a = the complex matrix + !! mat_a = the size of mat_a + !! factor = a real factor multiplying at the exponent + !! + !! OUTPUT + !! exp_mat_cx = its exponential is returned in the same matrix + !! SOURCE + + subroutine exp_mat_cx(mat_a,mat_a_size,factor) + + !Arguments ------------------------------------ + ! scalars + real(dp),intent(in) :: factor + ! arrays + complex(dpc),intent(inout) :: mat_a(:,:) + !complex(dpc) :: exp_mat_cx(mat_a_size,mat_a_size) + + !Local ------------------------------------------ + ! scalars + integer :: info,mat_a_size,ii + integer,parameter :: maxsize=3 + integer,parameter :: lwork=(1+32)*maxsize + + ! arrays + integer :: ipvt(mat_a_size) + character(len=500) :: msg + real(dp) :: rwork(2*maxsize) + complex(dpc),allocatable :: ww(:),uu(:,:) + complex(dpc) :: work(lwork),vl(1,1) + ! ********************************************************************* + + mat_a_size = max(1,size(mat_a,dim=1)) + ABI_MALLOC(ww,(mat_a_size)) + ABI_MALLOC(uu,(mat_a_size,mat_a_size)) + + !Now it calculates the eigenvalues and eigenvectors of the matrix + call ZGEEV('No left vectors','Vectors (right)',mat_a_size, mat_a, mat_a_size,ww,& + vl,1,uu, mat_a_size, work, lwork, rwork, info) + if (info/=0) then + write(msg,'(a,i4)')'Wrong value for rwork ',info + ABI_BUG(msg) + end if + + !!debbug + ! write(std_out,*)'mat_a',mat_a + ! write(std_out,*)'mat_a_size',mat_a_size + + ! write(std_out,*)'eigenvalues' + ! write(std_out,*)ww + ! write(std_out,*)'eigenvectors' + ! do ii=1,g_mat_size + ! write(std_out,*)'autov',ii + ! write(std_out,*)uu(:,ii) + ! end do + ! write(std_out,*)'optimal workl=',work(1) + + ! write(std_out,*)'info', info + ! write(std_out,*) '------------------' + !!enddebug + + + + !----------------------------------------------------------- + !Now it calculates the exponential of the eigenvectors (times the factor) + + !--exponential of the diagonal + ww(:) = exp( ww(:)*factor ) + + !--construction exponential matrix + mat_a = zero + mat_a(:,1) = ww(:) + mat_a(:,:) = cshift(array=mat_a,shift=(/ (-ii,ii=0,mat_a_size) /), dim=2 ) + + + !uu.exp(ww*factor) + mat_a(:,:) = matmul(uu,mat_a) + + !the inverse of the eigenvectors matrix + call ZGETRF( mat_a_size, mat_a_size, uu,mat_a_size, ipvt, info ) + if (info/=0) then + write(msg,'(a,i4)')'Wrong value for rwork ',info + ABI_BUG(msg) + end if + + call ZGETRI( mat_a_size, uu, mat_a_size, ipvt, work, lwork, info ) + if (info/=0) then + write(msg,'(a,i4)')'Wrong value for rwork ',info + ABI_BUG(msg) + end if + + !(uu.exp(ww*factor)).uu-1 + mat_a = matmul(mat_a,uu) + + ABI_FREE(ww) + ABI_FREE(uu) + + end subroutine exp_mat_cx + !!*** + + + + +END MODULE m_exp_mat +!!*** diff --git a/GX-PAW/common/src/32_util/m_exp_mat.o b/GX-PAW/common/src/32_util/m_exp_mat.o new file mode 100644 index 00000000..d1dcf307 Binary files /dev/null and b/GX-PAW/common/src/32_util/m_exp_mat.o differ diff --git a/GX-PAW/common/src/32_util/m_matrix.F90 b/GX-PAW/common/src/32_util/m_matrix.F90 new file mode 100644 index 00000000..e7eee623 --- /dev/null +++ b/GX-PAW/common/src/32_util/m_matrix.F90 @@ -0,0 +1,824 @@ +!!****m* ABINIT/m_matrix +!! NAME +!! m_matrix +!! +!! FUNCTION +!! Module containing some function acting on a matrix +!! (sqrt root) +!! +!! COPYRIGHT +!! Copyright (C) 2009-2024 ABINIT group (BA) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! NOTES +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" + +MODULE m_matrix + + use defs_basis + use m_errors + use m_abicore + + use m_hide_lapack, only : xginv + + implicit none + + private + +! public :: init_matrix ! Main creation method + public :: invsqrt_matrix ! inv of Sqrt of Matrix + public :: blockdiago_fordsyev ! inv of Sqrt of Matrix + public :: blockdiago_forzheev ! inv of Sqrt of Matrix +! public :: inverse_matrix ! Inverse matrix +! public :: nullify_matrix ! Nullify the object +! public :: destroy_matrix ! Frees the allocated memory +! public :: print_matrix ! Printout of the basic info + + +CONTAINS !=========================================================== + +!! FUNCTION +!! Initialize matrix +!! +!! INPUTS +!! ndim = dimension of matrix +!! matrix= matrix +!! +!! OUTPUT +!! matrix= square root of the matrix +!! force_diag = 0 if it no 0 on diagonal +!! = nb of zeros found otherwise +!! +!! SOURCE + +subroutine invsqrt_matrix(matrix,tndim,force_diag) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: tndim + complex(dpc),intent(inout) :: matrix(tndim,tndim) + integer, intent(out) :: force_diag +!arrays + +!Local variables------------------------------- +!scalars + integer :: im,im1,im2,info,lwork,nb_of_zero + character(len=500) :: message + real(dp) :: pawprtvol +!arrays + real(dp),allocatable :: eig(:),rwork(:) + complex(dpc),allocatable :: zwork(:),diag(:,:) + complex(dpc),allocatable :: sqrtmat(:,:),zhdp2(:,:),sqrtmatinv(:,:) + complex(dpc),allocatable :: initialmatrix(:,:) + +! ************************************************************************* + +!Do not remove this silly print instruction. Seems needed to avoid floating +!point exception on vm1_gcc51 ... +#if __GFORTRAN__ == 1 && __GNUC__ == 5 && (__GNUC_MINOR__ == 1 || __GNUC_MINOR__ == 2) + write(std_out,'(a)')' invsqrt_matrix at m_matrix.F90 : enter ( needed to avoid FPE with GCC5[1,2] )' +#endif + + DBG_ENTER("COLL") + pawprtvol=2 + + ABI_MALLOC(initialmatrix,(tndim,tndim)) + initialmatrix=matrix +! == First diagonalize matrix and keep the matrix for the change of basis + lwork=2*tndim-1 + ABI_MALLOC(rwork,(3*tndim-2)) + ABI_MALLOC(zwork,(lwork)) + ABI_MALLOC(eig,(tndim)) + + call zheev('v','u',tndim,matrix,tndim,eig,zwork,lwork,rwork,info) + if(pawprtvol>3) then + write(message,'(2a)') ch10,' - rotation matrix - ' + call wrtout(std_out,message,'COLL') + do im1=1,tndim + write(message,'(12(1x,18(1x,"(",f7.3,",",f7.3,")")))')& +! write(message,'(12(1x,18(1x,"(",f20.16,",",f20.16,")")))')& +& (matrix(im1,im2),im2=1,tndim) + call wrtout(std_out,message,'COLL') + end do + endif + + + ABI_FREE(zwork) + ABI_FREE(rwork) + if(info/=0) then + message = 'Error in diagonalization of zmat (zheev) ! - ' + ABI_ERROR(message) + end if + +! == Secondly Compute sqrt(diagonalized matrix) + ABI_MALLOC(diag,(tndim,tndim)) + diag=czero + nb_of_zero=0 + do im=1,tndim + + if(eig(im)< -tol8) then + message = " - Eigenvalues from zheev are negative or zero ! - " + write(std_out,*) + write(std_out,*) " Eigenvalue=",eig(im) + write(std_out,*) " Matrix is" + do im1=1,tndim + write(std_out,'(100f7.3)') (initialmatrix(im1,im2),im2=1,tndim) + enddo + ABI_ERROR(message) + else if(abs(eig(im))3) then + write(message,'(2a)') ch10,' - 1.0/sqrt(Eigenmatrix) - ' + call wrtout(std_out,message,'COLL') + do im1=1,tndim + write(message,'(12(1x,18(1x,"(",f7.3,",",f7.3,")")))')& +! write(message,'(12(1x,18(1x,"(",f20.16,",",f20.16,")")))')& +& (diag(im1,im2),im2=1,tndim) + call wrtout(std_out,message,'COLL') + end do + endif +!zgemm(A,B,C) : C = op(A) op(B) + call zgemm('n','t',tndim,tndim,tndim,cone,diag,tndim,conjg(matrix),tndim,czero,zhdp2,tndim) + call zgemm('n','n',tndim,tndim,tndim,cone,matrix,tndim,zhdp2,tndim,czero,sqrtmat,tndim) +! if(abs(pawprtvol)>=3) then + if(pawprtvol>3) then + write(message,'(3a)') ch10," - inverse Sqrt root of matrix is - " + call wrtout(std_out,message,'COLL') + do im1=1,tndim + write(message,'(12(1x,18(1x,"(",f20.16,",",f20.16,")")))')& +& (sqrtmat(im1,im2),im2=1,tndim) + call wrtout(std_out,message,'COLL') + end do + endif +! endif + ABI_FREE(diag) + +! == Forthly Compute the inverse of the square root +! call matcginv_dpc(sqrtmat,tndim,tndim) + !call xginv(sqrtmat,tndim) + ABI_MALLOC(sqrtmatinv,(tndim,tndim)) + sqrtmatinv=sqrtmat + if(pawprtvol>3) then + write(message,'(2a)') ch10," - inverse Sqrt root of matrix is - " + call wrtout(std_out,message,'COLL') + do im1=1,tndim + write(message,'(12(1x,18(1x,"(",f20.16,",",f20.16,")")))')& +& (sqrtmatinv(im1,im2),im2=1,tndim) + call wrtout(std_out,message,'COLL') + end do + endif + ABI_FREE(sqrtmat) + +! == Fifthly Check that O^{-0/5} O O{-0/5}=I +! zgemm(A,B,C) : C = op(A) op(B) + call zgemm('n','n',tndim,tndim,tndim,cone,initialmatrix,tndim,sqrtmatinv,tndim,czero,zhdp2,tndim) + call zgemm('n','n',tndim,tndim,tndim,cone,sqrtmatinv,tndim,zhdp2,tndim,czero,initialmatrix,tndim) + if(pawprtvol>3) then + write(message,'(3a)') ch10," - O^{-0/5} O O^{-0/5}=I - " + call wrtout(std_out,message,'COLL') + do im1=1,tndim + write(message,'(12(1x,18(1x,"(",f10.6,",",f4.1,")")))')& +! write(message,'(12(1x,18(1x,"(",f20.16,",",f20.16,")")))')& +& (initialmatrix(im1,im2),im2=1,tndim) + call wrtout(std_out,message,'COLL') + end do + endif + ABI_FREE(zhdp2) + matrix=sqrtmatinv + ABI_FREE(sqrtmatinv) + ABI_FREE(initialmatrix) + + DBG_EXIT("COLL") + +end subroutine invsqrt_matrix +!!*** + +!! FUNCTION +!! Transform matrix into block diagonal form before diagonalisation +!! +!! INPUTS +!! ndim = dimension of matrix +!! matrix= matrix +!! +!! OUTPUT +!! matrix= square root of the matrix +!! +!! SOURCE + +subroutine blockdiago_fordsyev(matrix,tndim,eig) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: tndim + real(dp),intent(inout) :: matrix(tndim,tndim) + real(dp),intent(inout) :: eig(tndim) +!arrays + +!Local variables------------------------------- +!scalars + integer :: im1,im2,im3,info,lwork,im4,indice_formax,shift !im5, + character(len=500) :: message + real(dp):: tmpx,maxvalue + integer(dp):: tmpi,newstarting,current_dege,prtopt +!arrays + real(dp),allocatable :: work(:) + real(dp),allocatable :: Permutcol(:,:) + real(dp),allocatable :: Apermutcol(:,:) + real(dp),allocatable :: Apermutline(:,:) + real(dp),allocatable :: Apermutlineback(:,:) + real(dp),allocatable :: Permutline(:,:) + real(dp),allocatable :: matrix_save(:,:) !,W(:) + integer,allocatable :: nonnul(:) + integer,allocatable :: nonnuldege(:) + logical :: testdege,swap + +! ************************************************************************* + +!!!Do not remove this silly print instruction. Seems needed to avoid floating +!!!point exception on vm1_gcc51 ... +!!#if __GFORTRAN__ == 1 && __GNUC__ == 5 && (__GNUC_MINOR__ == 1 || __GNUC_MINOR__ == 2) +!! write(std_out,'(a)')' invsqrt_matrix at m_matrix.F90 : enter ( needed to avoid FPE with GCC5[1,2] )' +!!#endif + DBG_ENTER("COLL") + + lwork=10*tndim + ABI_MALLOC(work,(lwork)) + work = zero + + ABI_MALLOC(matrix_save,(tndim,tndim)) + matrix_save=matrix + + ABI_MALLOC(Permutcol,(tndim,tndim)) + + Permutcol=zero + do im1=1,tndim + Permutcol(im1,im1)=1.d0 + end do + + prtopt=0 + + ABI_MALLOC(nonnul,(tndim)) + do im1=1,tndim + if(im1==1) nonnul(im1)=0 + if(im1>1) nonnul(im1)=nonnul(im1-1) + do im2=1,tndim + if (abs(matrix(im1,im2))>0.000000000001.and.im2>nonnul(im1)) then + nonnul(im1)=nonnul(im1)+1 + ! write(std_out,*) "im2,nonnul(im1)",im2,nonnul(im1) + ! permute + do im3=1,tndim + tmpx=matrix(im3,im2) + matrix(im3,im2)=matrix(im3,nonnul(im1)) + matrix(im3,nonnul(im1))=tmpx + tmpi=Permutcol(im3,im2) + Permutcol(im3,im2)=Permutcol(im3,nonnul(im1)) + Permutcol(im3,nonnul(im1))=tmpi + enddo + elseif (abs(matrix(im1,im2))<0.000000000001) then + matrix(im1,im2)=zero + endif + enddo + enddo + if(prtopt==1) then + write(std_out,*) "MATRIX AFTER COLUMN PERMUT" + do im1=1,tndim + write(std_out,'(2(1x,18(1x,f22.18,f22.18)))') (matrix(im1,im2),im2=1,tndim) + end do + write(std_out,*) "Permutcol MATRIX AFTER" + do im1=1,tndim + write(std_out,'(2(1x,18(1x,f22.18,f22.18)))') (Permutcol(im1,im2),im2=1,tndim) + end do + endif + + ABI_MALLOC(Apermutcol,(tndim,tndim)) + if(prtopt==1) then + write(std_out,*) "Check product of original matrix by permutation matrix " + endif + Apermutcol=zero + do im1=1,tndim + do im2=1,tndim + Apermutcol(im1,im2)=zero + do im3=1,tndim + Apermutcol(im1,im2)=matrix_save(im1,im3)*Permutcol(im3,im2)+Apermutcol(im1,im2) + ! write(std_out,*) PROD(im1,im2),A(im3,im1),A(im3,im2) + end do + end do + end do + if(prtopt==1) then + write(std_out,*) "Asave*Permutcol" + do im1=1,tndim + write(std_out,'(2(1x,18(1x,f22.18,f22.18)))') (Apermutcol(im1,im2),im2=1,tndim) + end do + endif + + + + ABI_MALLOC(Permutline,(tndim,tndim)) + Permutline=zero + do im1=1,tndim + Permutline(im1,im1)=1.d0 + end do + + do im1=1,tndim + if(im1==1) nonnul(im1)=0 + if(im1>1) nonnul(im1)=nonnul(im1-1) + do im2=1,tndim + ! write(std_out,*) "im1,im2, abs matrix(im2,im1),nonnul(im1)",im1,im2,abs(B(im1,im2)),nonnul(im1) + if (abs(matrix(im2,im1))>0.000000000001.and.im2>nonnul(im1)) then + ! write(std_out,*) "im2,nonnul(im1)",im2,nonnul(im1) + nonnul(im1)=nonnul(im1)+1 + ! write(std_out,*) "im2,nonnul(im1)",im2,nonnul(im1) + ! permute + do im3=1,tndim + tmpx=matrix(im2,im3) + matrix(im2,im3)=matrix(nonnul(im1),im3) + matrix(nonnul(im1),im3)=tmpx + tmpi=Permutline(im2,im3) + Permutline(im2,im3)=Permutline(nonnul(im1),im3) + Permutline(nonnul(im1),im3)=tmpi + enddo + elseif (abs(matrix(im2,im1))<0.000000000001) then + matrix(im2,im1)=zero + endif + enddo + enddo + if(prtopt==1) then + write(std_out,*) "matrix AFTER" + do im1=1,tndim + write(std_out,'(2(1x,18(1x,f22.18,f22.18)))') (matrix(im1,im2),im2=1,tndim) + end do + write(std_out,*) "Permutline MATRIX AFTER" + do im1=1,tndim + write(std_out,'(2(1x,18(1x,f22.18,f22.18)))') (Permutline(im1,im2),im2=1,tndim) + end do + endif + + if(prtopt==1) then + write(std_out,*) "Check product of Apermutcol matrix by permutation matrix of the line " + endif + ABI_MALLOC(Apermutline,(tndim,tndim)) + Apermutline=zero + do im1=1,tndim + do im2=1,tndim + Apermutline(im1,im2)=zero + do im3=1,tndim + Apermutline(im1,im2)=Apermutcol(im3,im2)*Permutline(im1,im3)+Apermutline(im1,im2) + ! write(std_out,*) PROD(im1,im2),A(im3,im1),A(im3,im2) + end do + end do + end do + if(prtopt==1) then + write(std_out,*) "Permutline*Apermutcol" + do im1=1,tndim + write(std_out,'(2(1x,18(1x,f22.18,f22.18)))') (Apermutline(im1,im2),im2=1,tndim) + end do + endif + work=0.d0 + call dsyev('v','u',tndim,matrix_save,tndim,eig,work,lwork,info) + if(info/=0) then + message = 'Error in diagonalization of matrix (dsyev) ! - ' + ABI_ERROR(message) + end if + if(prtopt==1) then + write(std_out,*) 'output',INFO + write(std_out,*) "Eigenvalues" + write(std_out,'(2x,20f20.15) ') (eig(im1),im1=1,tndim) + write(std_out,*) "Eigenvectors" + do im1=1,tndim + write(std_out,'(2(1x,18(1x,f20.15,f20.15)))') (matrix_save(im1,im2),im2=1,tndim) + end do + endif + + +! call dsyev('v','u',tndim,A,LDA,W,WORKTMP,LWORK,INFO) +! write(std_out,*) "optimal lwork",worktmp(1) + + work=0.d0 + call dsyev('v','u',tndim,matrix,tndim,eig,work,lwork,info) + if(info/=0) then + message = 'Error in diagonalization of matrix (dsyev) ! - ' + ABI_ERROR(message) + end if + if(prtopt==1) then + write(std_out,*) 'output',INFO + write(std_out,*) "Eigenvalues" + write(std_out,'(2x,20f20.15) ') (eig(im1),im1=1,tndim) + write(std_out,*) "Eigenvectors" + do im1=1,tndim + write(std_out,'(2(1x,18(1x,f20.15,f20.15)))') (matrix(im1,im2),im2=1,tndim) + end do + endif + + +!! REORDER EIGENVECTORS + ABI_MALLOC(nonnuldege,(tndim)) + newstarting=1 + current_dege=1 + do im4=2,tndim + if(im41) nonnuldege(im1)=nonnuldege(im1-1) + maxvalue=0.00000001 + swap=.false. + do im2=newstarting+shift,newstarting+current_dege-1 + if(abs(matrix(im1,im2))>maxvalue) then + maxvalue=abs(matrix(im1,im2)) + indice_formax=im2 + swap=.true. + endif + enddo + ! found max value: permute + if(swap) then + do im3=1,tndim + tmpx=matrix(im3,indice_formax) + matrix(im3,indice_formax)=matrix(im3,newstarting+shift) + matrix(im3,newstarting+shift)=tmpx + enddo + shift=shift+1 + endif + !write(std_out,*) "Eigenvectors after m1" + !do im3=1,tndim + ! write(std_out,'(2(1x,18(1x,f20.15,f20.15)))') (matrix(im3,im5),im5=1,tndim) + !end do + + enddo + if(prtopt==1) then + write(std_out,*) "Eigenvectors after set of dege" + do im2=1,tndim + write(std_out,'(2(1x,18(1x,f20.15,f20.15)))') (matrix(im2,im3),im3=1,tndim) + end do + endif + newstarting=im4 + current_dege=1 + endif + enddo + ABI_FREE(nonnuldege) + if(prtopt==1) then + write(std_out,*) "Ordered Eigenvectors" + do im1=1,tndim + write(std_out,'(2(1x,18(1x,f20.15,f20.15)))') (matrix(im1,im2),im2=1,tndim) + end do + endif + + if(prtopt==1) then + write(std_out,*) "inverse operation: reconstitute original matrix: only the line here" + endif + ABI_MALLOC(Apermutlineback,(tndim,tndim)) + Apermutlineback=zero + do im1=1,tndim + do im2=1,tndim + Apermutlineback(im1,im2)=zero + do im3=1,tndim + Apermutlineback(im1,im2)=matrix(im3,im2)*Permutline(im3,im1)+Apermutlineback(im1,im2) + ! write(std_out,*) PROD(im1,im2),A(im3,im1),A(im3,im2) + end do + end do + end do + matrix=Apermutlineback + if(prtopt==1) then + write(std_out,*) "t(Permutline)*Apermutcol" + do im1=1,tndim + write(std_out,'(2(1x,18(1x,f22.18,f22.18)))') (matrix(im1,im2),im2=1,tndim) + end do + endif + +! Now, set the first coefficient of eigenvectors positive. + + do im2=1,tndim ! loop over eigenvectors + do im1=1,tndim ! loop over components + if(abs(matrix(im1,im2))>tol8) then + if(matrix(im1,im2)<0) then + do im3=1,tndim + if(abs(matrix(im3,im2))>tol8) then + matrix(im3,im2)=-matrix(im3,im2) + endif + enddo + endif + exit + endif + enddo + enddo + if(prtopt==1) then + write(std_out,*) "Impose first component of eigenvectors is positive" + do im1=1,tndim + write(std_out,'(2(1x,18(1x,f22.18,f22.18)))') (matrix(im1,im2),im2=1,tndim) + end do + endif +! write(std_out,*) "inverse operation: reconstitute original matrix: then the column" +! Apermutcolback=zero +! do im1=1,tndim +! do im2=1,tndim +! Apermutcolback(im1,im2)=zero +! do im3=1,tndim +! Apermutcolback(im1,im2)=Apermutlineback(im1,im3)*Permutcol(im2,im3)+Apermutcolback(im1,im2) +! ! write(std_out,*) PROD(im1,im2),A(im3,im1),A(im3,im2) +! end do +! end do +! end do +! write(std_out,*) "Apermutlineback*t(Permutcol)" +! do im1=1,10 +! write(std_out,'(2(1x,18(1x,f22.18,f22.18)))') (Apermutcolback(im1,im2),im2=1,10) +! end do + + + ABI_FREE(Apermutlineback) + ABI_FREE(Apermutline) + ABI_FREE(matrix_save) + ABI_FREE(Apermutcol) + ABI_FREE(work) + ABI_FREE(Permutcol) + ABI_FREE(nonnul) + ABI_FREE(Permutline) + + DBG_EXIT("COLL") + +end subroutine blockdiago_fordsyev +!!*** + +!! FUNCTION +!! Transform matrix into block diagonal form before diagonalisation +!! +!! INPUTS +!! ndim = dimension of matrix +!! matrix= matrix +!! +!! OUTPUT +!! matrix= square root of the matrix +!! +!! SOURCE + +subroutine blockdiago_forzheev(matrix,tndim,eig) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: tndim + complex(dpc),intent(inout) :: matrix(tndim,tndim) + real(dp),intent(inout) :: eig(tndim) +!arrays + +!Local variables------------------------------- +!scalars + integer :: im1,im2,im3,info,lwork + character(len=500) :: message + complex(dpc):: tmpx + integer(dp):: tmpi +!arrays + real(dp),allocatable :: rwork(:) + complex(dpc),allocatable :: work(:) + real(dp),allocatable :: Permutcol(:,:) + complex(dpc),allocatable :: Apermutcol(:,:) + complex(dpc),allocatable :: Apermutline(:,:) + complex(dpc),allocatable :: Apermutlineback(:,:) + real(dp),allocatable :: Permutline(:,:) + complex(dpc),allocatable :: matrix_save(:,:) !,W(:) + integer,allocatable :: nonnul(:) + +! ************************************************************************* + +!!!Do not remove this silly print instruction. Seems needed to avoid floating +!!!point exception on vm1_gcc51 ... +!!#if __GFORTRAN__ == 1 && __GNUC__ == 5 && (__GNUC_MINOR__ == 1 || __GNUC_MINOR__ == 2) +!! write(std_out,'(a)')' invsqrt_matrix at m_matrix.F90 : enter ( needed to avoid FPE with GCC5[1,2] )' +!!#endif + DBG_ENTER("COLL") + + lwork=10*tndim + ABI_MALLOC(work,(lwork)) + ABI_MALLOC(rwork,(3*tndim-2)) + + ABI_MALLOC(matrix_save,(tndim,tndim)) + matrix_save=matrix + + ABI_MALLOC(Permutcol,(tndim,tndim)) + + Permutcol=zero + do im1=1,tndim + Permutcol(im1,im1)=1.d0 + end do + write(std_out,*) "MATRIX" + do im1=1,tndim + write(std_out,'(2(1x,30(1x,f22.18,f22.18)))') (matrix_save(im1,im2),im2=1,tndim) + end do + + ABI_MALLOC(nonnul,(tndim)) + do im1=1,tndim + if(im1==1) nonnul(im1)=0 + if(im1>1) nonnul(im1)=nonnul(im1-1) + do im2=1,tndim + if (abs(matrix(im1,im2))>0.000000000001.and.im2>nonnul(im1)) then + nonnul(im1)=nonnul(im1)+1 + ! write(std_out,*) "im2,nonnul(im1)",im2,nonnul(im1) + ! permute + do im3=1,tndim + tmpx=matrix(im3,im2) + matrix(im3,im2)=matrix(im3,nonnul(im1)) + matrix(im3,nonnul(im1))=tmpx + tmpi=Permutcol(im3,im2) + Permutcol(im3,im2)=Permutcol(im3,nonnul(im1)) + Permutcol(im3,nonnul(im1))=tmpi + enddo + elseif (abs(matrix(im1,im2))<0.000000000001) then + matrix(im1,im2)=czero + endif + enddo + enddo + write(std_out,*) "MATRIX AFTER COLUMN PERMUT" + do im1=1,tndim + write(std_out,'(2(1x,30(1x,f22.18,f22.18)))') (matrix(im1,im2),im2=1,tndim) + end do + write(std_out,*) "Permutcol MATRIX AFTER" + do im1=1,tndim + write(std_out,'(2(1x,30(1x,f22.18,f22.18)))') (Permutcol(im1,im2),im2=1,tndim) + end do + + ABI_MALLOC(Apermutcol,(tndim,tndim)) + write(std_out,*) "Check product of original matrix by permutation matrix " + Apermutcol=czero + do im1=1,tndim + do im2=1,tndim + Apermutcol(im1,im2)=czero + do im3=1,tndim + Apermutcol(im1,im2)=matrix_save(im1,im3)*Permutcol(im3,im2)+Apermutcol(im1,im2) + ! write(std_out,*) im1,im2,im3,Apermutcol(im1,im2) + end do + end do + end do + write(std_out,*) "Asave*Permutcol" + do im1=1,tndim + write(std_out,'(2(1x,30(1x,f22.18,f22.18)))') (Apermutcol(im1,im2),im2=1,tndim) + end do + + + + ABI_MALLOC(Permutline,(tndim,tndim)) + Permutline=zero + do im1=1,tndim + Permutline(im1,im1)=1.d0 + end do + + do im1=1,tndim + if(im1==1) nonnul(im1)=0 + if(im1>1) nonnul(im1)=nonnul(im1-1) + do im2=1,tndim + ! write(std_out,*) "im1,im2, abs matrix(im2,im1),nonnul(im1)",im1,im2,abs(B(im1,im2)),nonnul(im1) + if (abs(matrix(im2,im1))>0.000000000001.and.im2>nonnul(im1)) then + ! write(std_out,*) "im2,nonnul(im1)",im2,nonnul(im1) + nonnul(im1)=nonnul(im1)+1 + ! write(std_out,*) "im2,nonnul(im1)",im2,nonnul(im1) + ! permute + do im3=1,tndim + tmpx=matrix(im2,im3) + matrix(im2,im3)=matrix(nonnul(im1),im3) + matrix(nonnul(im1),im3)=tmpx + tmpi=Permutline(im2,im3) + Permutline(im2,im3)=Permutline(nonnul(im1),im3) + Permutline(nonnul(im1),im3)=tmpi + enddo + elseif (abs(matrix(im2,im1))<0.000000000001) then + matrix(im2,im1)=czero + endif + enddo + enddo + write(std_out,*) "matrix AFTER" + do im1=1,tndim + write(std_out,'(2(1x,30(1x,f22.18,f22.18)))') (matrix(im1,im2),im2=1,tndim) + end do + write(std_out,*) "Permutline MATRIX AFTER" + do im1=1,tndim + write(std_out,'(2(1x,30(1x,f22.18,f22.18)))') (Permutline(im1,im2),im2=1,tndim) + end do + + write(std_out,*) "Check product of Apermutcol matrix by permutation matrix of the line " + ABI_MALLOC(Apermutline,(tndim,tndim)) + Apermutline=czero + do im1=1,tndim + do im2=1,tndim + Apermutline(im1,im2)=czero + do im3=1,tndim + Apermutline(im1,im2)=Apermutcol(im3,im2)*Permutline(im1,im3)+Apermutline(im1,im2) + ! write(std_out,*) PROD(im1,im2),A(im3,im1),A(im3,im2) + end do + end do + end do + write(std_out,*) "Permutline*Apermutcol" + do im1=1,tndim + write(std_out,'(2(1x,30(1x,f22.18,f22.18)))') (Apermutline(im1,im2),im2=1,tndim) + end do + work=czero + call zheev('v','u',tndim,matrix_save,tndim,eig,work,lwork,rwork,info) + if(info/=0) then + message = 'Error in diagonalization of matrix (zheev) ! - ' + ABI_ERROR(message) + end if + write(std_out,*) 'output',INFO + write(std_out,*) "Eigenvalues" + write(std_out,'(2x,20f20.15) ') (eig(im1),im1=1,tndim) + write(std_out,*) "Eigenvectors" + do im1=1,tndim + write(std_out,'(2(1x,30(1x,f20.15,f20.15)))') (matrix_save(im1,im2),im2=1,tndim) + end do + + +! call dsyev('v','u',tndim,A,LDA,W,WORKTMP,LWORK,INFO) +! write(std_out,*) "optimal lwork",worktmp(1) + + work=czero + call zheev('v','u',tndim,matrix,tndim,eig,work,lwork,rwork,info) + if(info/=0) then + message = 'Error in diagonalization of matrix (zheev) ! - ' + ABI_ERROR(message) + end if + write(std_out,*) 'output',INFO + write(std_out,*) "Eigenvalues" + write(std_out,'(2x,20f20.15) ') (eig(im1),im1=1,tndim) + write(std_out,*) "Eigenvectors" + do im1=1,tndim + write(std_out,'(2(1x,30(1x,f20.15,f20.15)))') (matrix(im1,im2),im2=1,tndim) + end do + + write(std_out,*) "inverse operation: reconstitute original matrix: first the line" + ABI_MALLOC(Apermutlineback,(tndim,tndim)) + Apermutlineback=czero + do im1=1,tndim + do im2=1,tndim + Apermutlineback(im1,im2)=czero + do im3=1,tndim + Apermutlineback(im1,im2)=matrix(im3,im2)*Permutline(im3,im1)+Apermutlineback(im1,im2) + ! write(std_out,*) PROD(im1,im2),A(im3,im1),A(im3,im2) + end do + end do + end do + matrix=Apermutlineback + write(std_out,*) "t(Permutline)*Apermutcol" + do im1=1,tndim + write(std_out,'(2(1x,30(1x,f22.18,f22.18)))') (matrix(im1,im2),im2=1,tndim) + end do + +! write(std_out,*) "inverse operation: reconstitute original matrix: then the column" +! Apermutcolback=zero +! do im1=1,tndim +! do im2=1,tndim +! Apermutcolback(im1,im2)=zero +! do im3=1,tndim +! Apermutcolback(im1,im2)=Apermutlineback(im1,im3)*Permutcol(im2,im3)+Apermutcolback(im1,im2) +! ! write(std_out,*) PROD(im1,im2),A(im3,im1),A(im3,im2) +! end do +! end do +! end do +! write(std_out,*) "Apermutlineback*t(Permutcol)" +! do im1=1,10 +! write(std_out,'(2(1x,18(1x,f22.18,f22.18)))') (Apermutcolback(im1,im2),im2=1,10) +! end do + + + ABI_FREE(Apermutlineback) + ABI_FREE(Apermutline) + ABI_FREE(matrix_save) + ABI_FREE(Apermutcol) + ABI_FREE(work) + ABI_FREE(Permutcol) + ABI_FREE(nonnul) + ABI_FREE(Permutline) + ABI_FREE(rwork) + + DBG_EXIT("COLL") + +end subroutine blockdiago_forzheev +!!*** + +END MODULE m_matrix diff --git a/GX-PAW/common/src/32_util/m_matrix.o b/GX-PAW/common/src/32_util/m_matrix.o new file mode 100644 index 00000000..67506e44 Binary files /dev/null and b/GX-PAW/common/src/32_util/m_matrix.o differ diff --git a/GX-PAW/common/src/32_util/m_pptools.F90 b/GX-PAW/common/src/32_util/m_pptools.F90 new file mode 100644 index 00000000..a35158f6 --- /dev/null +++ b/GX-PAW/common/src/32_util/m_pptools.F90 @@ -0,0 +1,1066 @@ +!!****m* ABINIT/m_pptools +!! NAME +!! m_pptools +!! +!! FUNCTION +!! Helper functions used for post-processing. +!! +!! COPYRIGHT +!! Copyright (C) 2002-2024 ABINIT group (MG, ZL, MJV, BXu) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! For the initials of contributors, see ~abinit/doc/developers/contributors.txt . +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" + +MODULE m_pptools + + use defs_basis + use m_errors + use m_abicore + use m_krank + + use m_io_tools, only : open_file + use m_fstrings, only : sjoin, itoa + use m_numeric_tools, only : wrap2_pmhalf + + implicit none + + private + + public :: prmat ! print real(dp) matrices in an attractive format. + public :: printxsf ! Write a generic array in the XSF format (XCrysden format) + public :: print_fofr_ri ! Print the [real, imaginary] part of an array + public :: print_fofr_xyzri ! Print the Cartesian coordinates and the [real,imaginary] part of an array + public :: print_fofr_cube ! Print ||fofr|| in CUBE format. + public :: printbxsf ! Print band structure energies in XCrysDen format. + public :: printvtk ! Print band structure energies and velocities in VTK format. + +CONTAINS !=========================================================== +!!*** + +!!****f* m_pptools/prmat +!! NAME +!! prmat +!! +!! FUNCTION +!! This subroutine prints real*8 matrices in an attractive format. +!! +!! INPUTS +!! mat(mi,nj)= matrix to be printed +!! mi = no rows of mat +!! ni = no rows to print +!! nj = no colums of mat +!! unitm = unit to print to, if not provided std_out is chosen +!! +!! OUTPUT +!! (only writing) +!! +!! SOURCE + +subroutine prmat (mat, ni, nj, mi, unitm) + + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: mi,ni,nj + integer,intent(in), optional :: unitm +!arrays + real(dp),intent(in) :: mat(mi,nj) + +!Local variables------------------------------- +!scalars + character(len=1000) :: message + integer,parameter :: nline=10 + integer :: ii,jj,jstart,jstop,unitn + +! ************************************************************************* + + if (present(unitm)) then ! standard printing to std_out + unitn=unitm + else + unitn=std_out + end if + + do jstart = 1, nj, nline + jstop = min(nj, jstart+nline-1) + write(message, '(3x,10(i4,8x))' ) (jj,jj=jstart,jstop) + call wrtout(unitn,message,'COLL') + end do + + do ii = 1,ni + do jstart= 1, nj, nline + jstop = min(nj, jstart+nline-1) + if (jstart==1) then + write(message, '(i3,1p,10e12.4)' ) ii, (mat(ii,jj),jj=jstart,jstop) + call wrtout(unitn,message,'COLL') + else + write(message, '(3x,1p,10e12.4)' ) (mat(ii,jj),jj=jstart,jstop) + call wrtout(unitn,message,'COLL') + end if + end do + end do + +end subroutine prmat +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pptools/printxsf +!! NAME +!! printxsf +!! +!! FUNCTION +!! Write a generic array in the XSF format (XCrysden format) +!! +!! INPUTS +!! basis(3,3) = basis vectors of the direct real lattice or of the reciprocal lattice (fortran convention) +!! (Bohr units if realrecip=0, Bohr^-1 if realrecip=1, see below) +!! realrecip = 0 for a plot in real space +!! 1 for a plot in reciprocal space +!! nunit = unit number of the output file (already open by the caller, not closed here!) +!! n1=grid size along x +!! n2=grid size along y +!! n3=grid size along z +!! origin(3) = origin of the grid +!! datagrid(n1*n2*n3) = datagrid values stored using the fortran convention +!! +!! OUTPUT +!! Only write +!! +!! SOURCE + +subroutine printxsf(n1,n2,n3,datagrid,basis,origin,natom,ntypat,typat,xcart,znucl,nunit,realrecip) + + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: n1,n2,n3,nunit,realrecip + integer,intent(in) :: natom,ntypat +!arrays + integer,intent(in) :: typat(natom) + real(dp),intent(in) :: basis(3,3),datagrid(n1*n2*n3),origin(3) + real(dp),intent(in) :: xcart(3,natom), znucl(ntypat) + +!Local variables------------------------------- +!scalars + integer :: ix,iy,iz,nslice,nsym,iatom + real(dp) :: fact +!arrays + real(dp) :: tau(3,natom) + +! ************************************************************************* + + DBG_ENTER("COLL") + + if (all(realrecip/= [0,1])) then + ABI_BUG(sjoin('The argument realrecip should be 0 or 1, received:', itoa(realrecip))) + end if + +!conversion between ABINIT default units and XCrysden units + fact=Bohr_Ang; if (realrecip ==1) fact=one/fact !since we are in reciprocal space + +!TODO insert crystalline structure and dummy atoms in case of reciprocal space +!need to convert basis too + + write(nunit,'(1X,A)') 'DIM-GROUP' + write(nunit,*) '3 1' + write(nunit,'(1X,A)') 'PRIMVEC' + do iy = 1,3 + write(nunit,'(3(ES17.10,2X))') (Bohr_Ang*basis(ix,iy), ix=1,3) + end do +! +!generate translated coordinates to fit origin shift +! + do iatom = 1,natom + tau (:,iatom) = xcart(:,iatom) - origin(:) + end do + + write(nunit,'(1X,A)') 'PRIMCOORD' + write(nunit,*) natom, ' 1' + do iatom = 1,natom + write(nunit,'(i9,3(3X,ES17.10))') NINT(znucl(typat(iatom))), & ! WARNING alchemy not supported by XCrysden + Bohr_Ang*tau(1,iatom), & + Bohr_Ang*tau(2,iatom), & + Bohr_Ang*tau(3,iatom) + end do + write(nunit,'(1X,A)') 'ATOMS' + do iatom = 1,natom + write(nunit,'(i9,3(3X,ES17.10))') NINT(znucl(typat(iatom))), & ! WARNING alchemy not supported by XCrysden + Bohr_Ang*tau(1,iatom), & + Bohr_Ang*tau(2,iatom), & + Bohr_Ang*tau(3,iatom) + end do + + write(nunit,'(a)')' BEGIN_BLOCK_DATAGRID3D' + write(nunit,'(a)')' datagrid' + write(nunit,'(a)')' DATAGRID_3D_DENSITY' +!NOTE: XCrysden uses aperiodical data grid + write(nunit,*)n1+1,n2+1,n3+1 + write(nunit,*)origin + write(nunit,*)basis(:,1)*fact + write(nunit,*)basis(:,2)*fact + write(nunit,*)basis(:,3)*fact + + nslice=1 + do iz=1,n3 + do iy=1,n2 + write(nunit,'(8es16.8)') datagrid(1+n1*(nslice-1):n1+n1*(nslice-1)),datagrid(1+n1*(nslice-1)) + nslice=nslice+1 + end do + nsym=nslice-n2 + write (nunit,'(8es16.8)') datagrid(1+n1*(nsym-1):n1+n1*(nsym-1)),datagrid(1+n1*(nsym-1)) + end do + +!Now write upper plane + nslice=1 + do iy=1,n2 + write (nunit,'(8es16.8)') datagrid(1+n1*(nslice-1):n1+n1*(nslice-1)),datagrid(1+n1*(nslice-1)) + nslice=nslice+1 + end do + + nsym=nslice-n2 + write (nunit,'(8es16.8)') datagrid(1+n1*(nsym-1):n1+n1*(nsym-1)),datagrid(1+n1*(nsym-1)) + + write (nunit,'(a)')' END_DATAGRID_3D' + write (nunit,'(a)')' END_BLOCK_DATAGRID3D' + + DBG_EXIT("COLL") + +end subroutine printxsf +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pptools/print_fofr_ri +!! NAME +!! print_fofr_ri +!! +!! FUNCTION +!! Print the [real,imaginary] part of fofr on unit unit +!! +!! INPUTS +!! ri_mode = +!! "RI" if both real and imag part are wanted +!! "R" for real part +!! "I" for imaginary part +!! nx,ny,nz,ldx,ldy,ldz = Logical and physical dimensions of the array. +!! fofr(2,ldx,ldy,ldz) = Input data +!! [unit] = Fortran unit number. Default: std_out +!! +!! OUTPUT +!! Only writing +!! +!! SOURCE + + +subroutine print_fofr_ri(ri_mode,nx,ny,nz,ldx,ldy,ldz,fofr,unit) + + +!Arguments ----------------------------------------------- +!scalars + integer,intent(in) :: nx,ny,nz,ldx,ldy,ldz + integer,optional,intent(in) :: unit + character(len=*),intent(in) :: ri_mode +!arrays + real(dp),intent(in) :: fofr(2,ldx,ldy,ldz) + +!Local variables------------------------------- +!scalars + integer :: ount,ix,iy,iz +!arrays + +! ************************************************************************* + + ount = std_out; if (PRESENT(unit)) ount = unit + + SELECT CASE (ri_mode) + CASE ("RI","ri") + do iz=1,nz + do iy=1,ny + do ix=1,nx + write(ount,'(2f20.16)') fofr(:,ix,iy,iz) + end do + end do + end do + + CASE ("R","r") + do iz=1,nz + do iy=1,ny + do ix=1,nx + write(ount,'(f20.16)') fofr(1,ix,iy,iz) + end do + end do + end do + + CASE ("I","i") + do iz=1,nz + do iy=1,ny + do ix=1,nx + write(ount,'(f20.16)') fofr(2,ix,iy,iz) + end do + end do + end do + + CASE DEFAULT + ABI_ERROR("Wrong ri_mode") + END SELECT + +end subroutine print_fofr_ri +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pptools/print_fofr_xyzri +!! NAME +!! print_fofr_xyzri +!! +!! FUNCTION +!! Print the Cartesian coordinates and the [real,imaginary] part of fofr on unit unit +!! +!! INPUTS +!! ri_mode = +!! "RI" if both real and imag part are wanted +!! "R" for real part +!! "I" for imaginary part +!! nx,ny,nz,ldx,ldy,ldz = Logical and physical dimensions of the array. +!! fofr(2,ldx,ldy,ldz) = Input data +!! rprimd(3,3)=Lattive vectors in Bohr +!! [conv_fact] = Conversion factor for rprimd (rprimd is multiplied by conv_fact). Default is one +!! [unit] = Fortran unit number. Default: std_out +!! +!! OUTPUT +!! Only writing +!! +!! SOURCE + + +subroutine print_fofr_xyzri(ri_mode,nx,ny,nz,ldx,ldy,ldz,fofr,rprimd,conv_fact,unit) + + +!Arguments ----------------------------------------------- +!scalars + integer,intent(in) :: nx,ny,nz,ldx,ldy,ldz + integer,optional,intent(in) :: unit + real(dp),optional,intent(in) :: conv_fact + character(len=*),intent(in) :: ri_mode +!arrays + real(dp),intent(in) :: rprimd(3,3) + real(dp),intent(in) :: fofr(2,ldx,ldy,ldz) + +!Local variables------------------------------- +!scalars + integer :: ount,ix,iy,iz + real(dp) :: xnow,ynow,znow,my_cfact + +! ************************************************************************* + + ount = std_out; if (PRESENT(unit)) ount = unit + my_cfact = one; if (PRESENT(conv_fact)) my_cfact = conv_fact + + SELECT CASE (ri_mode) + CASE ("RI","ri") + do iz=1,nz + do iy=1,ny + do ix=1,nx + xnow = rprimd(1,1)*(ix-1)/nx + rprimd(1,2)*(iy-1)/ny + rprimd(1,3)*(iz-1)/nz + ynow = rprimd(2,1)*(ix-1)/nx + rprimd(2,2)*(iy-1)/ny + rprimd(2,3)*(iz-1)/nz + znow = rprimd(3,1)*(ix-1)/nx + rprimd(3,2)*(iy-1)/ny + rprimd(3,3)*(iz-1)/nz + write(ount,'(3f16.10,2f20.16)') my_cfact*xnow, my_cfact*ynow, my_cfact*znow,fofr(:,ix,iy,iz) + end do + end do + end do + + CASE ("R","r") + do iz=1,nz + do iy=1,ny + do ix=1,nx + xnow = rprimd(1,1)*(ix-1)/nx + rprimd(1,2)*(iy-1)/ny + rprimd(1,3)*(iz-1)/nz + ynow = rprimd(2,1)*(ix-1)/nx + rprimd(2,2)*(iy-1)/ny + rprimd(2,3)*(iz-1)/nz + znow = rprimd(3,1)*(ix-1)/nx + rprimd(3,2)*(iy-1)/ny + rprimd(3,3)*(iz-1)/nz + write(ount,'(3f16.10,f20.16)') my_cfact*xnow, my_cfact*ynow, my_cfact*znow,fofr(1,ix,iy,iz) + end do + end do + end do + + CASE ("I","i") + do iz=1,nz + do iy=1,ny + do ix=1,nx + xnow = rprimd(1,1)*(ix-1)/nx + rprimd(1,2)*(iy-1)/ny + rprimd(1,3)*(iz-1)/nz + ynow = rprimd(2,1)*(ix-1)/nx + rprimd(2,2)*(iy-1)/ny + rprimd(2,3)*(iz-1)/nz + znow = rprimd(3,1)*(ix-1)/nx + rprimd(3,2)*(iy-1)/ny + rprimd(3,3)*(iz-1)/nz + write(ount,'(3f16.10,f20.16)') my_cfact*xnow, my_cfact*ynow, my_cfact*znow,fofr(2,ix,iy,iz) + end do + end do + end do + + CASE DEFAULT + ABI_ERROR("Wrong ri_mode") + END SELECT + +end subroutine print_fofr_xyzri +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pptools/print_fofr_cube +!! NAME +!! print_fofr_cube +!! +!! FUNCTION +!! Print array fofr in the cube file format +!! +!! INPUTS +!! nx,ny,nz,ldx,ldy,ldz = Logical and physical dimensions of the array. +!! fofr(2,ldx,ldy,ldz) = Input data +!! rprimd(3,3)=Lattive vectors in Bohr +!! [unit] = Fortran unit number. Default: std_out +!! +!! OUTPUT +!! Only writing +!! +!! SOURCE + + +subroutine print_fofr_cube(nx,ny,nz,ldx,ldy,ldz,fofr,rprimd,natom,znucl_atom,xcart,unit) + + +!Arguments ----------------------------------------------- +!scalars + integer,intent(in) :: nx,ny,nz,ldx,ldy,ldz,natom + integer,optional,intent(in) :: unit +!arrays + integer,intent(in) :: znucl_atom(natom) + real(dp),intent(in) :: rprimd(3,3),xcart(3,natom) + real(dp),intent(in) :: fofr(2,ldx,ldy,ldz) + +!Local variables------------------------------- +!scalars + integer,parameter :: cplx=2 + integer :: ount,ix,iy,iz,iatom +!arrays + +! ************************************************************************* + + ount = std_out; if (PRESENT(unit)) ount = unit + +! EXAMPLE FROM THE WEB +! CPMD CUBE FILE. +! OUTER LOOP: X, MIDDLE LOOP: Y, INNER LOOP: Z +! 3 0.000000 0.000000 0.000000 +! 40 0.283459 0.000000 0.000000 +! 40 0.000000 0.283459 0.000000 +! 40 0.000000 0.000000 0.283459 +! 8 0.000000 5.570575 5.669178 5.593517 +! 1 0.000000 5.562867 5.669178 7.428055 +! 1 0.000000 7.340606 5.669178 5.111259 +! -0.25568E-04 0.59213E-05 0.81068E-05 0.10868E-04 0.11313E-04 0.35999E-05 + + write(ount,'(a)') 'ABINIT generated cube file' + write(ount,'(a)') 'from cut3d tool' + + write(ount,'(i9,3(1x,f12.6))') natom,0.,0.,0. + write(ount,'(i9,3(1x,f12.6))') nx,(rprimd(iy,1)/nx, iy=1,3) + write(ount,'(i9,3(1x,f12.6))') ny,(rprimd(iy,2)/ny, iy=1,3) + write(ount,'(i9,3(1x,f12.6))') nz,(rprimd(iy,3)/nz, iy=1,3) + + do iatom=1,natom + write(ount,'(i9,4(3X,ES17.10))') znucl_atom(iatom),0.d0,xcart(1:3,iatom) + end do + +! Note C ordering of the indexes + if (cplx==2) then + do ix=1,nx + do iy=1,ny + do iz=1,nz + write(ount,'(6(f12.6,2x))') sqrt(fofr(1,ix,iy,iz)**2 + fofr(2,ix,iy,iz)**2 ) + end do + end do + end do + else + do ix=1,nx + do iy=1,ny + do iz=1,nz + write(ount,'(6(f12.6,2x))') fofr(1,ix,iy,iz) + end do + end do + end do + end if + +end subroutine print_fofr_cube +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pptools/printbxsf +!! NAME +!! printbxsf +!! +!! FUNCTION +!! Print band structure energies in XCrysDen format. +!! +!! INPUTS +!! eigen(mband,nkpt,nsppol) = eigenvalues in hartree +!! ewind = energy window around the fermi level. +!! if ewind /= 0 ==> a band is considered in the plot of FSurf +!! only if it is inside [ ef-ewind, ef+ewind ] for some k point +!! if ewind == 0 ==> all bands will be keept in the _BXSF file +!! fermie = Fermi energy (Hartree) +!! gprimd(3,3) = dimensional primitive translations for reciprocal space (bohr^-1) +!! kptrlatt(3,3) = reciprocal of lattice vectors for full kpoint grid +!! mband = maximum number of bands +!! nsppol = 1 for unpolarized, 2 for spin-polarized +!! shiftk(3,nshiftk) =shift vector for k point grid +!! fname = filename for the fortran file +!! symafm(nsym)=(Anti)ferromagnetic symmetries. +!! use_afm=.TRUE. if (anti)ferromagnetic symmetries are used. +!! +!! OUTPUT +!! ierr=Status error. +!! BXSF file. +!! +!! SOURCE + +subroutine printbxsf(eigen,ewind,fermie,gprimd,kptrlatt,mband,& +& nkptirred,kptirred,nsym,use_afm,symrec,symafm,use_tr,nsppol,shiftk,nshiftk,fname,ierr) + + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: mband,nkptirred,nshiftk,nsppol,nsym + integer,intent(out) :: ierr + real(dp),intent(in) :: ewind,fermie + logical,intent(in) :: use_afm,use_tr + character(len=*),intent(in) :: fname +!arrays + integer,intent(in) :: kptrlatt(3,3),symafm(nsym),symrec(3,3,nsym) + real(dp),intent(in) :: eigen(mband,nkptirred,nsppol),gprimd(3,3) + real(dp),intent(in) :: kptirred(3,nkptirred),shiftk(3,nshiftk) + +!Local variables------------------------------- +!scalars + integer,parameter :: enough = 50 + integer :: iband,ik1,ik2,ik3,ikgrid,ikpt,indx + integer :: isppol,isym,maxband,minband,nk1,nk2,nk3,nkptfull,ubxsf,timrev + integer :: symkptrank, nsymfm, isymfm + real(dp) :: ene + character(len=500) :: msg + type(krank_t) :: krank +!arrays + integer,allocatable :: fulltoirred(:),symrecfm(:,:,:) + real(dp) :: kptgrid(3),gmet(3,3) + +! ************************************************************************* + + ierr = 0 + + ! Error if klatt is no simple orthogonal lattice (in red space) + ! for generalization to MP grids, need new version of XCrysDen + if (kptrlatt(1,2)/=0 .or. kptrlatt(1,3)/=0 .or. kptrlatt(2,1)/=0 .or. & + kptrlatt(2,3)/=0 .or. kptrlatt(3,1)/=0 .or. kptrlatt(3,2)/=0 ) then + write(msg,'(3a)')& + 'kptrlatt should be diagonal, for the FS calculation ',ch10,& + 'Action: use an orthogonal k-grid for the GS calculation ' + ABI_COMMENT(msg) + ierr = ierr + 1 + end if + + ! Error if there are not at least 2 kpts in each direction: + ! kptrank will fail for the intermediate points below + if (abs(kptrlatt(1,1)) < 2 .or. abs(kptrlatt(2,2)) < 2 .or. abs(kptrlatt(3,3)) < 2) then + write(msg,'(3a)')& + 'You need at least 2 points in each direction in k space to output BXSF files ',ch10,& + 'Action: use an augmented k-grid for the GS calculation (at least 2x2x2) ' + ABI_COMMENT(msg) + ierr = ierr + 1 + end if + + if (ANY(ABS(shiftk) > tol10)) then + write(msg,'(3a)')& + 'Origin of the k-grid should be (0,0,0) for the FS calculation ',ch10,& + 'Action: use a non-shifted k-grid for the GS calculation. Returning ' + ABI_COMMENT(msg) + ierr = ierr + 1 + end if + + if (ierr /= 0) return + + ! Compute reciprocal space metric. + gmet = MATMUL(TRANSPOSE(gprimd), gprimd) + + if (use_afm) then + nsymfm = 0 + do isym = 1, nsym + if (symafm(isym) == 1) nsymfm = nsymfm+1 + end do + ABI_MALLOC(symrecfm, (3,3,nsymfm)) + isymfm = 0 + do isym = 1, nsym + if (symafm(isym) == 1) then + isymfm = isymfm + 1 + symrecfm(:,:,isymfm) = symrec(:,:,isym) + end if + end do + else + nsymfm = nsym + ABI_MALLOC(symrecfm, (3,3,nsymfm)) + symrecfm = symrec + end if + + ! Xcrysden uses aperiodic data-grid (images are included in the grid) + nk1 = kptrlatt(1,1); nk2 = kptrlatt(2,2); nk3 = kptrlatt(3,3) + nkptfull = (nk1+1) * (nk2+1) * (nk3+1) + + ABI_MALLOC(fulltoirred, (nkptfull)) + timrev = 0; if (use_tr) timrev=1 + + krank = krank_new(nkptirred, kptirred, nsym=nsymfm, symrec=symrecfm, time_reversal=use_tr) + + ! Xcrysden employs the C-ordering for the Fermi Surface (x-y-z) + ikgrid=0 + do ik1=0,nk1 + do ik2=0,nk2 + do ik3=0,nk3 + + ikgrid = ikgrid+1 + kptgrid(1) = DBLE(ik1)/kptrlatt(1,1) + kptgrid(2) = DBLE(ik2)/kptrlatt(2,2) + kptgrid(3) = DBLE(ik3)/kptrlatt(3,3) + + ! Find correspondence between the Xcrysden grid and the IBZ + symkptrank = krank%get_rank(kptgrid) + fulltoirred(ikgrid) = krank%invrank(symkptrank) + + if (fulltoirred(ikgrid) < 1) then + if (ierr <= enough) then + write(msg,'(a,3es16.8,2a,i0,2a)')& + 'kpt = ',kptgrid,ch10,' with rank ', symkptrank, ch10,& + 'has no symmetric among the k-points used in the GS calculation ' + ABI_WARNING(msg) + end if + ierr = ierr + 1 + end if + + end do !ik1 + end do !ik2 + end do !ik3 + + call krank%free() + + ABI_CHECK(ierr == 0, "See above warnings") + + if (abs(ewind) < tol12 ) then + ! Keep all bands. + minband=1 + maxband=mband + else + ! Select a subset of bands. + minband = mband + maxband = 0 + ene=abs(ewind) + do isppol=1,nsppol + do iband=1,mband + if(minval(eigen(iband,:,isppol))-fermie < -ene) minband = iband + end do + do iband=mband,1,-1 + if (maxval(eigen(iband,:,isppol))-fermie > ene) maxband = iband + end do + end do ! isppol + + end if ! abs(energy_window) + + ! Dump results to file + if (open_file(fname,msg, newunit=ubxsf, status='unknown', action="write", form='formatted') /= 0 ) then + ABI_WARNING(msg) + ierr=ierr +1; RETURN + end if + + ! Write header + write(ubxsf,*)' BEGIN_INFO' + write(ubxsf,*)' #' + write(ubxsf,*)' # this is a Band-XCRYSDEN-Structure-File for Visualization of Fermi Surface' + write(ubxsf,*)' # generated by the ABINIT package' + write(ubxsf,*)' #' + write(ubxsf,*)' # bands between ',minband,' and ',maxband + write(ubxsf,*)' #' + if (nsppol == 2 ) then + write(ubxsf,*)' # NOTE: the first band is relative to spin-up electrons,' + write(ubxsf,*)' # the second band to spin-down and so on .. ' + write(ubxsf,*)' #' + end if + write(ubxsf,*)' # Launch as: xcrysden --bxsf ' + write(ubxsf,*)' #' + write(ubxsf,'(a,es16.8)')' Fermi Energy: ',fermie + write(ubxsf,*)' END_INFO' + write(ubxsf,*)' ' + write(ubxsf,*)' BEGIN_BLOCK_BANDGRID_3D' + write(ubxsf,*)' band_energies' + write(ubxsf,*)' BEGIN_BANDGRID_3D' + + write(ubxsf,*)' ',(maxband-minband+1)*nsppol + write(ubxsf,*)' ',nk1+1,nk2+1,nk3+1 + write(ubxsf,*)' ',shiftk(:,1) + ! Angstrom units are used in the BXSF format + write(ubxsf,*)' ',gprimd(:,1)/Bohr_Ang + write(ubxsf,*)' ',gprimd(:,2)/Bohr_Ang + write(ubxsf,*)' ',gprimd(:,3)/Bohr_Ang + + ! print out data for all relevant bands and full kpt grid (redundant, yes) + ! for each kpt in full zone, find equivalent irred kpt and print eigenval + indx = 0 + do iband=minband,maxband + do isppol=1,nsppol + write(ubxsf,*)' BAND: ',indx+minband + write(ubxsf,'(7(es16.8))')(eigen(iband,fulltoirred(ikpt),isppol),ikpt=1,nkptfull) + indx=indx+1 + end do + end do + + write(ubxsf,*)' END_BANDGRID_3D' + write(ubxsf,*)' END_BLOCK_BANDGRID_3D' + close(ubxsf) + + ABI_FREE(fulltoirred) + ABI_FREE(symrecfm) + +end subroutine printbxsf +!!*** + +!!****f* m_pptools/printvtk +!! NAME +!! printvtk +!! +!! FUNCTION +!! Print band structure energies and velocities in VTK format. +!! +!! INPUTS +!! eigen(mband,nkpt,nsppol) = eigenvalues in hartree +!! ewind = energy window around the fermi level. +!! if ewind /= 0 ==> a band is considered in the plot of FSurf +!! only if it is inside [ ef-ewind, ef+ewind ] for some k point +!! if ewind == 0 ==> all bands will be keept in the _BXSF file +!! fermie = Fermi energy (Hartree) +!! gprimd(3,3) = dimensional primitive translations for reciprocal space (bohr^-1) +!! kptrlatt(3,3) = reciprocal of lattice vectors for full kpoint grid +!! mband = maximum number of bands +!! nsppol = 1 for unpolarized, 2 for spin-polarized +!! shiftk(3,nshiftk) =shift vector for k point grid +!! fname = filename for the fortran file +!! symafm(nsym)=(Anti)ferromagnetic symmetries. +!! use_afm=.TRUE. if (anti)ferromagnetic symmetries are used. +!! +!! OUTPUT +!! ierr=Status error. +!! BXSF file. +!! +!! SOURCE + +subroutine printvtk(eigen,v_surf,ewind,fermie,gprimd,kptrlatt,mband,& +& nkptirred,kptirred,nsym,use_afm,symrec,symafm,use_tr,nsppol,shiftk,nshiftk,fname,ierr) + + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: mband,nkptirred,nshiftk,nsppol,nsym + integer,intent(out) :: ierr + real(dp),intent(in) :: ewind,fermie + logical,intent(in) :: use_afm,use_tr + character(len=*),intent(in) :: fname +!arrays + integer,intent(in) :: kptrlatt(3,3),symafm(nsym),symrec(3,3,nsym) + real(dp),intent(in) :: eigen(mband,nkptirred,nsppol),gprimd(3,3) + real(dp),intent(in) :: v_surf(mband,kptrlatt(1,1)+1,kptrlatt(2,2)+1,kptrlatt(3,3)+1,3,nsppol) + real(dp),intent(in) :: kptirred(3,nkptirred),shiftk(3,nshiftk) + +!Local variables------------------------------- +!scalars + integer :: iband,ikgrid,ikpt1,indx + integer :: ikpt,jkpt,kkpt,ikpt_fine, ik1, ik2, ik3 + integer :: isppol,isym,itim,maxband,minband,nk1,nk2,nk3,nkptfull,uvtk,timrev + real(dp) :: ene,res,ss,timsign + logical :: found + character(len=500) :: msg, format_str +!arrays + integer,allocatable :: fulltoirred(:) + real(dp) :: kconv(3),kpt(3),kptgrid(3),kptsym(3) + +! ************************************************************************* + + ierr=0 + +!Error if klatt is no simple orthogonal lattice (in red space) +!for generalization to MP grids, need new version of XCrysDen + + if (kptrlatt(1,2)/=0 .or. kptrlatt(1,3)/=0 .or. kptrlatt(2,1)/=0 .or. & + kptrlatt(2,3)/=0 .or. kptrlatt(3,1)/=0 .or. kptrlatt(3,2)/=0 ) then + write(msg,'(3a)')& + 'kptrlatt should be diagonal, for the FS calculation ',ch10,& + 'action: use an orthogonal k-grid for the GS calculation ' + ABI_COMMENT(msg) + ierr=ierr+1 + end if + + if (ANY(ABS(shiftk(:,:))>tol10)) then + write(msg,'(3a)')& + 'Origin of the k-grid should be (0,0,0) for the FS calculation ',ch10,& + 'Action: use a non-shifted k-grid for the GS calculation. Returning ' + ABI_COMMENT(msg) + ierr=ierr+1 + end if + + if (ierr/=0) RETURN + + ! Xcrysden uses aperiodical data-grid + nk1 = kptrlatt(1,1) + nk2 = kptrlatt(2,2) + nk3 = kptrlatt(3,3) + nkptfull=(nk1+1)*(nk2+1)*(nk3+1) + + ABI_MALLOC(fulltoirred,(nkptfull)) + timrev=0; if (use_tr) timrev=1 + + !Xcrysden employs C-ordering for the Fermi Surface. + ierr = 0 + ikgrid=0 + do ik1=0,nk1 + do ik2=0,nk2 + do ik3=0,nk3 + + ikgrid=ikgrid+1 + kptgrid(1)=DBLE(ik1)/kptrlatt(1,1) + kptgrid(2)=DBLE(ik2)/kptrlatt(2,2) + kptgrid(3)=DBLE(ik3)/kptrlatt(3,3) + call wrap2_pmhalf(kptgrid(1),kpt(1),res) + call wrap2_pmhalf(kptgrid(2),kpt(2),res) + call wrap2_pmhalf(kptgrid(3),kpt(3),res) + + ! === Find correspondence between the Xcrysden grid and the IBZ === + ! If AFM case, use only Ferromagetic symmetries. + found=.FALSE. + irred: do ikpt1=1,nkptirred + do itim=0,timrev + do isym=1,nsym + if (use_afm.and.symafm(isym)==-1) CYCLE + timsign = one-two*itim + kptsym(:) = timsign*(symrec(:,1,isym)*kptirred(1,ikpt1) + & + symrec(:,2,isym)*kptirred(2,ikpt1) + & + symrec(:,3,isym)*kptirred(3,ikpt1)) + call wrap2_pmhalf(kptsym(1),kconv(1),res) + call wrap2_pmhalf(kptsym(2),kconv(2),res) + call wrap2_pmhalf(kptsym(3),kconv(3),res) + ! is kconv equivalent to kpt? + ss= (kpt(1)-kconv(1))**2 + (kpt(2)-kconv(2))**2 + (kpt(3)-kconv(3))**2 + if (ss < tol6) then + found=.TRUE. + fulltoirred(ikgrid)=ikpt1 + exit irred + end if + + end do !itim + end do !isym + end do irred + + if (.not.found) then + write(msg,'(a,3es16.8,2a)')& + ' kpt = ',kpt,ch10,' has no symmetric among the irred k-points used in the GS calculation ' + ierr=ierr+1 + ABI_ERROR(msg) + end if + + end do !ik1 + end do !ik2 + end do !ik3 + + + if (ierr/=0) then + ABI_FREE(fulltoirred) + RETURN + end if + + if (abs(ewind) < tol12 ) then + ! Keep all bands. + minband=1 + maxband=mband + else + ! Select a subset of bands. + minband = mband + maxband = 0 + ene=abs(ewind) + do isppol=1,nsppol + do iband=1,mband + if(minval(eigen(iband,:,isppol))-fermie < -ene) then + minband = iband + end if + end do + do iband=mband,1,-1 + if (maxval(eigen(iband,:,isppol))-fermie > ene) then + maxband = iband + end if + end do + end do ! isppol + + end if ! abs(energy_window) + + ! Dump the results on file === + if (open_file(fname,msg,newunit=uvtk,status='unknown',form='formatted') /= 0) then + ABI_FREE(fulltoirred) + ABI_WARNING(msg) + ierr=ierr +1; RETURN + end if + + ! write header + write(uvtk,"(a)") '# vtk DataFile Version 2.0' + write(uvtk,"(a)") 'Eigen values for the Fermi surface' + write(uvtk,"(a)") 'ASCII' + write(uvtk,*) '' + write(uvtk,"(a)") 'DATASET STRUCTURED_GRID' + write(uvtk,"(a,3i6)") 'DIMENSIONS', nk1+1,nk2+1,nk3+1 + write(uvtk,"(a,i6,a)") 'POINTS',nkptfull,' float' + + do ik3 = 0, nk3 + do ik2 = 0, nk2 + do ik1 = 0, nk1 + write(uvtk,'(3es16.8)') dble(ik1)/nk1*gprimd(1,1)+ & + dble(ik2)/nk2*gprimd(1,2)+ & + dble(ik3)/nk3*gprimd(1,3), & + dble(ik1)/nk1*gprimd(2,1)+ & + dble(ik2)/nk2*gprimd(2,2)+ & + dble(ik3)/nk3*gprimd(2,3), & + dble(ik1)/nk1*gprimd(3,1)+ & + dble(ik2)/nk2*gprimd(3,2)+ & + dble(ik3)/nk3*gprimd(3,3) + end do + end do + end do + +!print out data for all relevant bands and full kpt grid (redundant, yes) +!for each kpt in full zone, find equivalent irred kpt and print eigenval + write(uvtk,*) '' + write(uvtk,"(a,i6)") 'POINT_DATA',nkptfull + indx=0 + do iband=minband,maxband + do isppol=1,nsppol + if (minband+indx < 10) then + format_str="(a14,i1,1X,a)" + else + format_str="(a14,i2,1X,a)" + end if + write(uvtk,format_str) 'SCALARS eigval', minband+indx, 'float 1' + write(uvtk,"(a)") 'LOOKUP_TABLE default' + write(uvtk,*) ' ' + do kkpt = nk3/2+1, nk3+nk3/2+1 + do jkpt = nk2/2+1, nk2+nk2/2+1 + do ikpt = nk1/2+1, nk1+nk1/2+1 + ik1 = ikpt + ik2 = jkpt + ik3 = kkpt + if (ikpt > nk1+1) ik1 = ikpt - nk1 + if (jkpt > nk2+1) ik2 = jkpt - nk2 + if (kkpt > nk3+1) ik3 = kkpt - nk3 +! get the index with zyx order + ikpt_fine = (ik1-1)*(nk2+1)*(nk3+1) + (ik2-1)*(nk3+1) + ik3 + write(uvtk,'(es16.8)') eigen(iband,fulltoirred(ikpt_fine),isppol) + end do + end do + end do + indx=indx+1 + end do + end do + + write(uvtk,*) '' + indx=0 + do iband=minband,maxband + do isppol=1,nsppol + if (minband+indx < 10) then + format_str="(a10,i1,1X,a)" + else + format_str="(a10,i2,1X,a)" + end if + write(uvtk,format_str) 'SCALARS ve', minband+indx, 'float' + write(uvtk,"(a)") 'LOOKUP_TABLE default' + write(uvtk,*) ' ' + do kkpt = nk3/2+1, nk3+nk3/2+1 + do jkpt = nk2/2+1, nk2+nk2/2+1 + do ikpt = nk1/2+1, nk1+nk1/2+1 + ik1 = ikpt + ik2 = jkpt + ik3 = kkpt + if (ikpt > nk1+1) ik1 = ikpt - nk1 + if (jkpt > nk2+1) ik2 = jkpt - nk2 + if (kkpt > nk3+1) ik3 = kkpt - nk3 +! write(uvtk,'(3i6,3es16.8)') ik1,ik2,ik3,v_surf(iband,ik1,ik2,ik3,1,isppol), & +! & v_surf(iband,ik1,ik2,ik3,2,isppol), & +! & v_surf(iband,ik1,ik2,ik3,3,isppol) + write(uvtk,'(es16.8)') sqrt(v_surf(iband,ik1,ik2,ik3,1,isppol)*v_surf(iband,ik1,ik2,ik3,1,isppol)+ & +& v_surf(iband,ik1,ik2,ik3,2,isppol)*v_surf(iband,ik1,ik2,ik3,2,isppol)+ & +& v_surf(iband,ik1,ik2,ik3,3,isppol)*v_surf(iband,ik1,ik2,ik3,3,isppol)) + end do + end do + end do + write(uvtk,format_str) 'SCALARS vx', minband+indx, 'float' + write(uvtk,"(a)") 'LOOKUP_TABLE default' + write(uvtk,*) ' ' + do kkpt = nk3/2+1, nk3+nk3/2+1 + do jkpt = nk2/2+1, nk2+nk2/2+1 + do ikpt = nk1/2+1, nk1+nk1/2+1 + ik1 = ikpt + ik2 = jkpt + ik3 = kkpt + if (ikpt > nk1+1) ik1 = ikpt - nk1 + if (jkpt > nk2+1) ik2 = jkpt - nk2 + if (kkpt > nk3+1) ik3 = kkpt - nk3 + write(uvtk,'(es16.8)') v_surf(iband,ik1,ik2,ik3,1,isppol) + end do + end do + end do + write(uvtk,format_str) 'SCALARS vy', minband+indx, 'float' + write(uvtk,"(a)") 'LOOKUP_TABLE default' + write(uvtk,*) ' ' + do kkpt = nk3/2+1, nk3+nk3/2+1 + do jkpt = nk2/2+1, nk2+nk2/2+1 + do ikpt = nk1/2+1, nk1+nk1/2+1 + ik1 = ikpt + ik2 = jkpt + ik3 = kkpt + if (ikpt > nk1+1) ik1 = ikpt - nk1 + if (jkpt > nk2+1) ik2 = jkpt - nk2 + if (kkpt > nk3+1) ik3 = kkpt - nk3 + write(uvtk,'(es16.8)') v_surf(iband,ik1,ik2,ik3,2,isppol) + end do + end do + end do + write(uvtk,format_str) 'SCALARS vz', minband+indx, 'float' + write(uvtk,"(a)") 'LOOKUP_TABLE default' + write(uvtk,*) ' ' + do kkpt = nk3/2+1, nk3+nk3/2+1 + do jkpt = nk2/2+1, nk2+nk2/2+1 + do ikpt = nk1/2+1, nk1+nk1/2+1 + ik1 = ikpt + ik2 = jkpt + ik3 = kkpt + if (ikpt > nk1+1) ik1 = ikpt - nk1 + if (jkpt > nk2+1) ik2 = jkpt - nk2 + if (kkpt > nk3+1) ik3 = kkpt - nk3 + write(uvtk,'(es16.8)') v_surf(iband,ik1,ik2,ik3,3,isppol) + end do + end do + end do + indx=indx+1 + end do + end do + + close (uvtk) + ABI_FREE(fulltoirred) + +end subroutine printvtk +!!*** + +END MODULE m_pptools diff --git a/GX-PAW/common/src/32_util/m_pptools.o b/GX-PAW/common/src/32_util/m_pptools.o new file mode 100644 index 00000000..2689a379 Binary files /dev/null and b/GX-PAW/common/src/32_util/m_pptools.o differ diff --git a/GX-PAW/common/src/32_util/m_pstat.F90 b/GX-PAW/common/src/32_util/m_pstat.F90 new file mode 100644 index 00000000..a4f1e39a --- /dev/null +++ b/GX-PAW/common/src/32_util/m_pstat.F90 @@ -0,0 +1,289 @@ +!!****m* ABINIT/m_pstat +!! NAME +!! m_pstat +!! +!! FUNCTION +!! Interface to the /proc/{pid}/status file available on Linux. +!! +!! COPYRIGHT +!! Copyright (C) 2017-2024 ABINIT group (MG) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" + +module m_pstat + + use defs_basis + use m_abicore + use m_errors + use, intrinsic :: iso_c_binding + use m_yaml + + use m_fstrings, only : find_and_select + use m_clib, only : clib_getpid + + implicit none + + private +!!*** + +!---------------------------------------------------------------------- + +!!****t* m_pstat/pstat_t +!! NAME +!! pstat_t +!! +!! FUNCTION +!! This object stores the most important quantites reported in the /proc/{pid}/status file +!! in particular the virtual memory VmRSS. See https://docs.kernel.org/filesystems/proc.html +!! +!! NB: This file is only available on Linux hence one should always check the value of pstat%ok +!! before using quantities such as vmrss_mb. +!! +!! Usage: +!! +!! call pstat%from_pid() +!! call pstat%print([std_out]) +!! ! reload data and print it +!! call pstat%update() +!! call pstat%print([std_out]) +!! +!! SOURCE + + type, public :: pstat_t + + logical :: ok = .False. + ! False if stat file is not available + + integer :: pid = -1 + ! Process identifier. + + integer :: threads = -1 + ! number of threads. + + integer :: fdsize = -1 + ! Number of file descriptor slots currently allocated + + real(dp) :: vmrss_mb = -one + ! Size of memory portions. + ! It contains the three following parts (VmRSS = RssAnon + RssFile + RssShmem) + + real(dp) :: vmpeak_mb = -one + ! Peak virtual memory size + + real(dp) :: vmstk_mb = -one + ! Size of stack segments + + character(len=fnlen) :: filepath = "" + ! Path of status file + + character(len=500) :: iomsg = "" + ! Error message returned when parsing filepath + + contains + procedure :: from_pid => pstat_from_pid ! Init object from process identifier (main entry point). + procedure :: from_file => pstat_from_file ! Init object from file (useful for debugging). + procedure :: print => pstat_print ! Print object. + end type pstat_t +!!*** + +!---------------------------------------------------------------------- + +contains +!!*** + +!!****f* m_pstat/pstat_from_pid +!! NAME +!! pstat_from_pid +!! +!! FUNCTION +!! Init object from process identifier (main entry point for client code). +!! +!! SOURCE + +subroutine pstat_from_pid(pstat) + +!Arguments ------------------------------------ + class(pstat_t),intent(out) :: pstat + +!Local variables------------------------------- + integer(c_int) :: pid + character(len=500) :: spid +! ************************************************************************* + + pid = clib_getpid() + write(spid, "(i0)") pid + spid = adjustl(spid) + call pstat%from_file('/proc/'//trim(spid)//'/status') + +end subroutine pstat_from_pid +!!*** + +!!****f* m_pstat/pstat_from_file +!! NAME +!! pstat_from_file +!! +!! FUNCTION +!! Init object from file (useful for debugging). +!! +!! SOURCE + +subroutine pstat_from_file(pstat, filepath) + +!Arguments ------------------------------------ + class(pstat_t),intent(inout) :: pstat + character(len=*),intent(in) :: filepath + +!Local variables------------------------------- + integer :: unit, ierr + character(len=500) :: line + integer :: istart, istop, iostat +! ************************************************************************* + + pstat%ok = .False. + pstat%filepath = filepath + + open(newunit=unit, file=trim(pstat%filepath), action="read", status="old", iostat=ierr, iomsg=pstat%iomsg) + if (ierr /= 0) then + close(unit); return + end if + + do + read(unit, "(a)", iostat=ierr, end=10, iomsg=pstat%iomsg) line + if (ierr > 0) then ! EOF + close(unit); return + end if + + ! Parse useful integers + if (index(line, "Pid:") == 1) call get_int(line, pstat%pid) + if (index(line, "Threads:") == 1) call get_int(line, pstat%threads) + if (index(line, "FDSize:") == 1) call get_int(line, pstat%fdsize) + + ! Parse memory entries + if (index(line, "VmRSS:") == 1) call get_mem_mb(line, pstat%vmrss_mb) + if (index(line, "VmPeak:") == 1) call get_mem_mb(line, pstat%vmpeak_mb) + if (index(line, "VmStk:") == 1) call get_mem_mb(line, pstat%vmstk_mb) + end do + +10 close(unit) + pstat%ok = .True. + pstat%iomsg = "" + +contains + +subroutine get_mem_mb(str, mem_mb) + character(len=*),intent(in) :: str + real(dp),intent(out) :: mem_mb + + ! Generic mem entry has format: + !VmRSS: 2492 kB + real(dp) :: mem_fact + istart = index(str, ":") + 1 + istop = find_and_select(str, & + ["kB", "mB"], & + [one/1024._dp, one], mem_fact, pstat%iomsg) !default=one, + ABI_CHECK(istop /= -1, pstat%iomsg) + read(str(istart+1:istop-1), fmt=*, iostat=iostat, iomsg=pstat%iomsg) mem_mb + ABI_CHECK(iostat == 0, pstat%iomsg) + mem_mb = mem_mb * mem_fact +end subroutine get_mem_mb + +subroutine get_int(str, out_ival) + character(len=*),intent(in) :: str + integer,intent(out) :: out_ival + istart = index(str, ":") + 1 + read(str(istart+1:), fmt=*, iostat=iostat, iomsg=pstat%iomsg) out_ival + ABI_CHECK(iostat == 0, pstat%iomsg) +end subroutine get_int + +end subroutine pstat_from_file +!!*** + +!!****f* m_pstat/pstat_print +!! NAME +!! pstat_print +!! +!! FUNCTION +!! Print object in Yaml format. +!! +!! SOURCE + +subroutine pstat_print(pstat, units, header, reload) + + class(pstat_t),intent(inout) :: pstat + integer,intent(in) :: units(:) + character(len=*),optional,intent(in) :: header + logical,optional,intent(in) :: reload + +!Local variables------------------------------- + character(len=500) :: header__ + type(yamldoc_t) :: ydoc +! ************************************************************************* + + if (present(reload)) then + if (reload) call pstat%from_file(pstat%filepath) + end if + + header__ = "unknown"; if (present(header)) header__ = header + ydoc = yamldoc_open(header__) !, width=11, real_fmt='(3f8.3)') + + call ydoc%add_int("pid", pstat%pid) + call ydoc%add_int("threads", pstat%threads) !, comment="") + call ydoc%add_int("fdsize", pstat%fdsize) !, comment="") + call ydoc%add_real("vmrss_mb", pstat%vmrss_mb) !, comment="") + call ydoc%add_real("vmpeak_mb", pstat%vmpeak_mb) !, comment="") + call ydoc%add_real("vmstk_mb", pstat%vmstk_mb) !, comment="") + if (len_trim(pstat%iomsg) > 0) call ydoc%add_string("iomsg", trim(pstat%iomsg)) + + call ydoc%write_units_and_free(units) + +end subroutine pstat_print +!!*** + +!!****f* m_pstat/pstat_mpi_max +!! NAME +!! pstat_mpi_max +!! +!! FUNCTION +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +#if 0 + +subroutine pstat_mpi_max(pstat, vmrss_mb, comm) + + class(pstat_t),intent(inout) :: pstat + real(dp),intent(out) :: vmrss_mb + integer,intent(in) :: comm + !logical,optional,intent(in) :: reload + + !integer :: ierr, int_list(5) + real(dp) :: real_list(3) + + call pstat%from_file(pstat%filepath) + + real_list = [pstat%vmrss_mb, pstat%vmpeak_mb, pstat%vmstk_mb] + !call xmpi_max_ip(real_list, comm, ierr) + + pstat%vmrss_mb = real_list(1) + pstat%vmpeak_mb = real_list(2) + pstat%vmstk_mb = real_list(3) + +end subroutine pstat_mpi_max +!!*** +#endif + +end module m_pstat +!!*** diff --git a/GX-PAW/common/src/32_util/m_pstat.o b/GX-PAW/common/src/32_util/m_pstat.o new file mode 100644 index 00000000..7b564df9 Binary files /dev/null and b/GX-PAW/common/src/32_util/m_pstat.o differ diff --git a/GX-PAW/common/src/32_util/m_special_funcs.F90 b/GX-PAW/common/src/32_util/m_special_funcs.F90 new file mode 100644 index 00000000..2775cbf7 --- /dev/null +++ b/GX-PAW/common/src/32_util/m_special_funcs.F90 @@ -0,0 +1,2188 @@ +!!****m* ABINIT/m_special_funcs +!! NAME +!! m_special_funcs +!! +!! FUNCTION +!! This module contains routines and functions used to +!! evaluate special functions frequently needed in Abinit. +!! +!! COPYRIGHT +!! Copyright (C) 2008-2024 ABINIT group (MG, MT, FB, XG, MVer, FJ, NH, GZ, DRH) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" + +module m_special_funcs + + use defs_basis + use m_abicore + use m_errors + use m_splines + + use m_fstrings, only : sjoin, ftoa + use m_numeric_tools, only : arth, simpson + + implicit none + + private + + public :: clp ! x-1, if x>1/2, x+1, if x<-1/2 + public :: factorial ! Calculates N! returning a real. + public :: permutations ! Returns N!/(N-k) if N>=0 and N-k>0 else 0. + public :: binomcoeff ! Binominal coefficient n!/(n-k)! + public :: laguerre ! Laguerre Polynomial(x,n,a). + public :: RadFnH ! Atomic radial function(r,n,l,Z). + public :: iradfnh ! Norm of atomic radial function(a,b,n,l,Z). + public :: gaussian ! Normalized Gaussian distribution. + public :: lorentzian ! Approximate Dirac Delta with lorentzian + public :: abi_derf ! Evaluates the error function in real(dp). + public :: abi_derfc ! Evaluates the complementary error function in real(dp). + public :: gamma_function ! Computes the gamma function + public :: besjm ! Spherical bessel function of order nn. Handles nn=0,1,2,3,4, or 5 only. + public :: sbf8 ! Computes set of spherical bessel functions using accurate algorithm + public :: k_fermi ! Fermi wave vector corresponding to the local value of the real space density rhor. + public :: k_thfermi ! Thomas-Fermi wave vector corresponding to the local value of the real space density rhor + public :: levi_civita_3 ! Return Levi-Civita tensor of rank 3 + public :: fermi_dirac ! Fermi Dirac distribution + public :: bose_einstein ! Bose Einstein distribution + public :: dip12 ! Complete Fermi integral of order 1/2 + public :: dip32 ! Complete Fermi integral of order 3/2 + public :: djp12 ! Incomplete Fermi integral of order 1/2 + public :: djp32 ! Incomplete Fermi integral of order 3/2 +!!*** + +!!****t* m_special_funcs/jlspline_t +!! NAME +!! jlspline_t +!! +!! FUNCTION +!! Object used to interpolate Bessel functions +!! +!! SOURCE + + type,public :: jlspline_t + + integer :: nx + ! number of points on linear mesh used in spline. + + integer :: mlang + ! mlang= max angular momentum + 1 + + real(dp) :: delta + ! Step of linear mesh. + + real(dp) :: maxarg + ! max arg value. + + real(dp),allocatable :: xx(:) + ! xx(nx) + ! coordinates of points belonging to the grid + + real(dp),allocatable :: bess_spl(:,:) + ! bess_spl(nx,mlang) + ! bessel functions computed on the linear mesh + + real(dp),allocatable :: bess_spl_der(:,:) + ! bess_spl_der(nx,mlang) + ! the second derivatives of the cubic spline. + + end type jlspline_t +!!*** + + public :: jlspline_new ! Create new object. + public :: jlspline_free ! Free memory. + public :: jlspline_integral ! Compute integral. + +!!****t* m_special_funcs/gspline_t +!! NAME +!! gspline_t +!! +!! FUNCTION +!! Object used to interpolate the gaussian approximant and its primitive with cubic spline. +!! Particularly useful if we are computing DOSes with many k-points/bands +!! because one can significantly decrease the number of calls to exponential functions. +!! +!! SOURCE + + type,public :: gspline_t + + integer :: nspline + ! Number of points used in spline table. + + real(dp) :: sigma + ! Broadening parameter. + + real(dp) :: xmin,xmax + ! Min and max x in spline mesh. Only positive xs are stored in memory + ! The values at -x are reconstructed by symmetry. + ! xmin is usually zero, xmax is the point where the gaussian == tol16. + ! g(x) is set to zero if x > xmin. + + real(dp) :: step, stepm1, step2div6 + ! Step of the linear mesh used in spline and associated coeffients. + + real(dp),allocatable :: xvals(:) + ! xvals(nspline) + ! The xvalues used in the spline + + real(dp),allocatable :: svals(:,:) + ! svals(nspline,4) + ! Internal tables with spline data. + + end type gspline_t +!!*** + + public :: gspline_new ! Creation method. + public :: gspline_eval ! Evaluate interpolant + public :: gspline_free ! Free memory. + +CONTAINS !=========================================================== +!!*** + +!!****f* m_special_funcs/clp +!! NAME +!! clp +!! +!! FUNCTION +!! clp(x)= x-1, if x>1/2 +!! x+1, if x<-1/2 +!! +!! INPUTS +!! x= input variable +!! +!! OUTPUT +!! clp= resulting function +!! +!! SOURCE + +pure function clp(x) + +!Arguments ------------------------------------ +!scalars + real(dp) :: clp + real(dp),intent(in) :: x + +! ********************************************************************** + + if(x > half) then + clp=x-one + elseif(x < -half) then + clp=x+one + else + clp=x + end if + +end function clp +!!*** + +!!****f* m_special_funcs/factorial +!! NAME +!! factorial +!! +!! FUNCTION +!! Calculates N!. Returns a (dp) real. +!! +!! INPUTS +!! nn=number to use +!! +!! OUTPUT +!! factorial= n! (real) +!! +!! SOURCE + +elemental function factorial(nn) + +!Arguments --------------------------------------------- +!scalars + integer,intent(in) :: nn + real(dp) :: factorial + +!Local variables --------------------------------------- +!scalars + integer :: ii + real(dp) :: ff + +! ********************************************************************* + + ff=one + do ii=2,nn + ff=ff*ii + end do + + factorial=ff + +end function factorial +!!*** + +!!****f* m_special_funcs/permutations +!! NAME +!! permutations +!! +!! FUNCTION +!! Returns N!/(N-k)! if N>=0 and N-k>0 +!! otherwise 0 is returned +!! Output is real +!! +!! INPUTS +!! kk=number k to use +!! nn=number N to use +!! +!! OUTPUT +!! permutations= n!/(n-k)! (real) +!! +!! SOURCE + +pure function permutations(nn,kk) + +!Arguments --------------------------------------------- +!scalars + integer,intent(in) :: kk,nn + real(dp) :: permutations + +!Local variables --------------------------------------- +!scalars + integer :: ii + real(dp) :: pp + +! ********************************************************************* + + if ((nn>=0).and.((nn-kk)>=0)) then + pp=one + do ii=nn-kk+1,nn + pp=pp*ii + end do + else + pp=zero + end if + + permutations=pp + +end function permutations +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_special_funcs/binomcoeff +!! NAME +!! factorial +!! +!! FUNCTION +!! Calculates n!/( k!* (n-k)!). Returns a real (dp) +!! +!! INPUTS +!! nn=number to use +!! +!! OUTPUT +!! binomcoeff= n!/( k!* (n-k)!) (real dp) +!! +!! +!! SOURCE + +elemental function binomcoeff(n,k) + +!Arguments --------------------------------------------- +!scalars + integer,intent(in) :: n,k + real(dp) :: binomcoeff + +! ********************************************************************* + + binomcoeff=factorial(n)/(factorial(k)*factorial(n-k)) + +end function binomcoeff +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_special_funcs/laguerre +!! NAME +!! laguerre +!! +!! FUNCTION +!! Laguerre(x,n,a). Returns a (dp) real. +!! +!! INPUTS +!! x position +!! n order of laguerre polynomial +!! a +!! +!! OUTPUT +!! Laguerre(x,n,a) (dp) +!! +!! +!! SOURCE + +function laguerre(x,n,a) + +!Arguments --------------------------------------------- +!scalars + integer,intent(in),optional :: n,a + real(dp) :: laguerre + real(dp),intent(in) :: x + +!Local variables --------------------------------------- +!scalars + integer :: ii, nn, aa + +!arrays + real(dp),allocatable :: ff(:) + +! ********************************************************************* + + if (present(n)) then + nn=n + else + nn=1 + end if + + if (present(a)) then + aa=a + else + aa=0 + end if + ABI_MALLOC(ff,(nn+1)) + ff=0.0_dp + ff=(/ (binomcoeff(nn+aa,nn-ii)*((-1.0_dp)*x)**ii/factorial(ii) ,ii=0,nn) /) + laguerre=sum(ff) + + ABI_FREE(ff) + +end function laguerre +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_special_funcs/RadFnH +!! NAME +!! RadFnH +!! +!! FUNCTION +!! RadFnH(r,n,l,Z) radial function of atomic wavefunction with nuclear charge Z. +!! for quantum number n, and l. +!! Default: Fe 3d function. Returns a (dp) real. +!! +!! INPUTS +!! r radius +!! n principal quantum number +!! l quantum number +!! +!! OUTPUT +!! RadFnH(r,n,l,Z) (dp) +!! +!! +!! SOURCE + + +function RadFnH(r,n,l,Z) + +!Arguments --------------------------------------------- +!scalars + integer,intent(in),optional :: n,l + real(dp) :: RadFnH + real(dp),intent(in) :: r + real(dp),intent(in),optional :: Z + +!Local variables --------------------------------------- +!scalars + integer :: nn,ll + real(dp) :: ff,rr,ZZ + +! ********************************************************************* + + if (present(n)) then + nn=n + else + nn=3 + end if + + if (present(l)) then + ll=l + else + ll=2 + end if + + if (present(Z)) then + ZZ=Z + else + ZZ=28.0_dp + end if + + rr=ZZ*r/nn + ff=exp(log(ZZ*1.0_dp)*(3.0_dp/2.0_dp))*2/nn**2 + ff=ff*sqrt(factorial(nn-ll-1)/factorial(nn+ll))*(2*rr)**ll + RadFnH=ff*exp(-1*rr)*laguerre(2*rr,nn-ll-1,2*ll+1) + +end function RadFnH +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_special_funcs/IRadFnH +!! NAME +!! IRadFnH +!! +!! FUNCTION +!! IRadFnH(a,b,n,l,Z): Integral of radial function of atomic wavefunction between a and b. +!! recursive programming using simpson's rule +!! iteration depth of m=8 corresponds to relative error of 10^(-12). +!! +!! INPUTS +!! a lower limit for integration +!! b upper limit for integration +!! n principal quantum number +!! l quantum number +! Z nuclear charge +!! +!! OUTPUT +!! IRadFnH(a,b,n,l,Z) (dp) +!! +!! +!! SOURCE + +recursive function IRadFnH(a,b,n,l,Z,m) result(x) + +!Arguments --------------------------------------------- +!scalars + integer,intent(in),optional :: n,l,m + real(dp),intent(in):: a + real(dp),intent(in),optional :: b,Z + +!Local variables --------------------------------------- +!scalars + integer :: nn,ll,mm + real(dp) :: h,bb,ZZ,x + +! ********************************************************************* + + if (present(n)) then + nn=n + else + nn=3 + end if + + if (present(l)) then + ll=l + else + ll=2 + end if + + if (present(Z)) then + ZZ=Z + else + ZZ=28 + end if + + if (present(b)) then + bb=b + else + bb=100.0_dp + end if + + if (present(m)) then + mm=m + else + mm=0 + end if + + h=(bb-a)/2.0_dp + if (mm<8) then + !h=2*h/exp(1.0_dp) + x=IRadFnH(a,a+h,nn,ll,ZZ,mm+1)+IRadFnH(a+h,bb,nn,ll,ZZ,mm+1) + else + x=RadFnH(a,nn,ll,ZZ)**2*a**2+4.0_dp*RadFnH(a+h,nn,ll,ZZ)**2*(a+h)**2 + x=h/3.0_dp*(x+RadFnH(bb,nn,ll,ZZ)**2*bb**2) + end if + +end function IRadFnH +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_special_funcs/gaussian +!! NAME +!! gaussian +!! +!! FUNCTION +!! Return the values of the normalized Gaussian distribution: +!! +!! Gauss(arg,sigma) = 1/(sigma SQRT(2*pi)) e^{-arg**2/(2*sigma**2)} +!! +!! INPUTS +!! arg=Argument of the Gaussian. +!! sigma=Standard deviation +!! +!! SOURCE + +elemental function gaussian(arg, sigma) + +!Arguments --------------------------------------------- +!scalars + real(dp),intent(in) :: arg,sigma + real(dp) :: gaussian + +!Local variables --------------------------------------- +!scalars + real(dp) :: xx + +! ********************************************************************* + + xx = arg / (sqrt2 * sigma) + gaussian = exp(-xx*xx) / (sigma * sqrt(two_pi)) + +end function gaussian +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_special_funcs/lorentzian +!! NAME +!! lorentzian +!! +!! FUNCTION +!! Lorentzian function. +!! +!! INPUTS +!! arg=Argument of the lorentzian. +!! sigma=Broadening factor +!! +!! SOURCE + +elemental function lorentzian(arg, sigma) + +!Arguments --------------------------------------------- +!scalars + real(dp),intent(in) :: arg, sigma + real(dp) :: lorentzian + +! ********************************************************************* + + lorentzian = piinv * sigma / (arg ** 2 + sigma ** 2) + +end function lorentzian +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_special_funcs/abi_derf +!! NAME +!! abi_derf +!! +!! FUNCTION +!! Evaluates the error function in real(dp). +!! Same implementation as imsl. +!! Simple mod of derfc.F90 +!! +!! INPUTS +!! yy +!! +!! OUTPUT +!! derf_yy= error function of yy +!! +!! SOURCE + +elemental function abi_derf(yy) result(derf_yy) + +!Arguments ------------------------------------ +!scalars + real(dp),intent(in) :: yy + real(dp) :: derf_yy + +!Local variables------------------------------- + integer :: done,ii,isw +! coefficients for 0.0 <= yy < .477 + real(dp), parameter :: & +& pp(5)=(/ 113.8641541510502e0_dp, 377.4852376853020e0_dp, & +& 3209.377589138469e0_dp, .1857777061846032e0_dp, & +& 3.161123743870566e0_dp /) + real(dp), parameter :: & +& qq(4)=(/ 244.0246379344442e0_dp, 1282.616526077372e0_dp, & +& 2844.236833439171e0_dp, 23.60129095234412e0_dp/) +! coefficients for .477 <= yy <= 4.0 + real(dp), parameter :: & +& p1(9)=(/ 8.883149794388376e0_dp, 66.11919063714163e0_dp, & +& 298.6351381974001e0_dp, 881.9522212417691e0_dp, & +& 1712.047612634071e0_dp, 2051.078377826071e0_dp, & +& 1230.339354797997e0_dp, 2.153115354744038e-8_dp, & +& .5641884969886701e0_dp /) + real(dp), parameter :: & +& q1(8)=(/ 117.6939508913125e0_dp, 537.1811018620099e0_dp, & +& 1621.389574566690e0_dp, 3290.799235733460e0_dp, & +& 4362.619090143247e0_dp, 3439.367674143722e0_dp, & +& 1230.339354803749e0_dp, 15.74492611070983e0_dp/) + ! coefficients for 4.0 < y, + real(dp), parameter :: & +& p2(6)=(/ -3.603448999498044e-01_dp, -1.257817261112292e-01_dp, & +& -1.608378514874228e-02_dp, -6.587491615298378e-04_dp, & +& -1.631538713730210e-02_dp, -3.053266349612323e-01_dp/) + real(dp), parameter :: & +& q2(5)=(/ 1.872952849923460e0_dp , 5.279051029514284e-01_dp, & +& 6.051834131244132e-02_dp , 2.335204976268692e-03_dp, & +& 2.568520192289822e0_dp /) + real(dp), parameter :: & +& sqrpi=.5641895835477563e0_dp, xbig=13.3e0_dp, xlarge=6.375e0_dp, xmin=1.0e-10_dp + real(dp) :: res,xden,xi,xnum,xsq,xx + +! ****************************************************************** + + xx = yy + isw = 1 +!Here change the sign of xx, and keep track of it thanks to isw + if (xx<0.0e0_dp) then + isw = -1 + xx = -xx + end if + + done=0 + +!Residual value, if yy < -6.375e0_dp + res=-1.0e0_dp + +!abs(yy) < .477, evaluate approximation for erfc + if (xx<0.477e0_dp) then +! xmin is a very small number + if (xx 13.3e0_dp + if (isw > 0 .and. xx > xbig .and. done==0 ) then + res = 1.0e0_dp + done=1 + end if + +!4.0 < yy < 13.3e0_dp .or. -6.375e0_dp < yy < -4.0 +!evaluate minimax approximation for erfc + if ( ( isw > 0 .or. xx < xlarge ) .and. done==0 ) then + xsq = xx*xx + xi = 1.0e0_dp/xsq + xnum= p2(5)*xi+p2(6) + xden = xi+q2(5) + do ii = 1,4 + xnum = xnum*xi+p2(ii) + xden = xden*xi+q2(ii) + end do + res = (sqrpi+xi*xnum/xden)/xx + res = res* exp(-xsq) + if (isw.eq.-1) then + res = res-1.0e0_dp + else + res=1.0e0_dp-res + end if + end if + +!All cases have been investigated + derf_yy = res + +end function abi_derf +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_special_funcs/abi_derfc +!! NAME +!! abi_derfc +!! +!! FUNCTION +!! Evaluates the complementary error function in real(dp). +!! Same implementation as imsl. +!! +!! INPUTS +!! yy +!! +!! OUTPUT +!! derfc_yy=complementary error function of yy +!! +!! SOURCE + +elemental function abi_derfc(yy) result(derfc_yy) + +!Arguments ------------------------------------ +!scalars + real(dp),intent(in) :: yy + real(dp) :: derfc_yy + +!Local variables------------------------------- + integer :: done,ii,isw +! coefficients for 0.0 <= yy < .477 + real(dp), parameter :: & +& pp(5)=(/ 113.8641541510502e0_dp, 377.4852376853020e0_dp, & +& 3209.377589138469e0_dp, .1857777061846032e0_dp, & +& 3.161123743870566e0_dp /) + real(dp), parameter :: & +& qq(4)=(/ 244.0246379344442e0_dp, 1282.616526077372e0_dp, & +& 2844.236833439171e0_dp, 23.60129095234412e0_dp/) +! coefficients for .477 <= yy <= 4.0 + real(dp), parameter :: & +& p1(9)=(/ 8.883149794388376e0_dp, 66.11919063714163e0_dp, & +& 298.6351381974001e0_dp, 881.9522212417691e0_dp, & +& 1712.047612634071e0_dp, 2051.078377826071e0_dp, & +& 1230.339354797997e0_dp, 2.153115354744038e-8_dp, & +& .5641884969886701e0_dp /) + real(dp), parameter :: & +& q1(8)=(/ 117.6939508913125e0_dp, 537.1811018620099e0_dp, & +& 1621.389574566690e0_dp, 3290.799235733460e0_dp, & +& 4362.619090143247e0_dp, 3439.367674143722e0_dp, & +& 1230.339354803749e0_dp, 15.74492611070983e0_dp/) + ! coefficients for 4.0 < y, + real(dp), parameter :: & +& p2(6)=(/ -3.603448999498044e-01_dp, -1.257817261112292e-01_dp, & +& -1.608378514874228e-02_dp, -6.587491615298378e-04_dp, & +& -1.631538713730210e-02_dp, -3.053266349612323e-01_dp/) + real(dp), parameter :: & +& q2(5)=(/ 1.872952849923460e0_dp , 5.279051029514284e-01_dp, & +& 6.051834131244132e-02_dp , 2.335204976268692e-03_dp, & +& 2.568520192289822e0_dp /) + real(dp), parameter :: & +& sqrpi=.5641895835477563e0_dp, xbig=13.3e0_dp, xlarge=6.375e0_dp, xmin=1.0e-10_dp + real(dp) :: res,xden,xi,xnum,xsq,xx + +!****************************************************************** + + xx = yy + isw = 1 +!Here change the sign of xx, and keep track of it thanks to isw + if (xx<0.0e0_dp) then + isw = -1 + xx = -xx + end if + + done=0 + +!Residual value, if yy < -6.375e0_dp + res=2.0e0_dp + +!abs(yy) < .477, evaluate approximation for erfc + if (xx<0.477e0_dp) then +! xmin is a very small number + if (xx 13.3e0_dp + if (isw > 0 .and. xx > xbig .and. done==0 ) then + res = 0.0e0_dp + done=1 + end if + +!4.0 < yy < 13.3e0_dp .or. -6.375e0_dp < yy < -4.0 +!evaluate minimax approximation for erfc + if ( ( isw > 0 .or. xx < xlarge ) .and. done==0 ) then + xsq = xx*xx + xi = 1.0e0_dp/xsq + xnum= p2(5)*xi+p2(6) + xden = xi+q2(5) + do ii = 1,4 + xnum = xnum*xi+p2(ii) + xden = xden*xi+q2(ii) + end do + res = (sqrpi+xi*xnum/xden)/xx + res = res* exp(-xsq) + if (isw.eq.-1) res = 2.0e0_dp-res + end if + +!All cases have been investigated + derfc_yy = res + +end function abi_derfc +!!*** + +!!****f* ABINIT/GAMMA_FUNCTION +!! NAME +!! GAMMA_FUNCTION +!! +!! FUNCTION +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SIDE EFFECTS +!! +!! NOTES +!! +!! SOURCE + +subroutine GAMMA_FUNCTION(X,GA) + +! ==================================================== +! Purpose: This program computes the gamma function +! Gamma(x) using subroutine GAMMA +! Examples: +! x Gamma(x) +! ---------------------------- +! 1/3 2.678938534708 +! 0.5 1.772453850906 +! -0.5 -3.544907701811 +! -1.5 2.363271801207 +! 5.0 24.000000000000 +! ==================================================== +! +! This routine was downloaded from UIUC: +! http://jin.ece.uiuc.edu/routines/routines.html +! +! The programs appear to accompany a book "Computation of Special +! Functions" (1996) John Wiley and Sons, but are distributed online +! by the authors. Exact copyright should be checked. +! +! Authors / copyright: +! Shanjie Zhang and Jianming Jin +! Proposed contact is: j-jin1@uiuc.edu +! +! 20 October 2008: +! Incorporated into ABINIT by M. Verstraete +! +! +! +! ================================================== +! Purpose: Compute the gamma function Gamma(x) +! Input : x --- Argument of Gamma(x) +! ( x is not equal to 0,-1,-2, etc ) +! Output: GA --- Gamma(x) +! ================================================== +! + + ! arguments + + real(dp),intent(in) :: x + real(dp),intent(out) :: ga + + ! local variables + integer :: k,m + real(dp) :: m1,z,r,gr + real(dp) :: G(26) + + ! source code: + + ! initialization of reference data + G=(/1.0D0,0.5772156649015329D0, & + & -0.6558780715202538D0, -0.420026350340952D-1, & + & 0.1665386113822915D0,-.421977345555443D-1, & + & -.96219715278770D-2, .72189432466630D-2, & + & -.11651675918591D-2, -.2152416741149D-3, & + & .1280502823882D-3, -.201348547807D-4, & + & -.12504934821D-5, .11330272320D-5, & + & -.2056338417D-6, .61160950D-8, & + & .50020075D-8, -.11812746D-8, & + & .1043427D-9, .77823D-11, & + & -.36968D-11, .51D-12, & + & -.206D-13, -.54D-14, .14D-14, .1D-15/) + + + ! for the integer case, do explicit factorial + if (X==int(X)) then + if (X > 0.0D0) then + GA=1.0D0 + M1=X-1 + do K=2,int(M1) + GA=GA*K + end do + else + GA=1.0D+300 + end if + ! for the integer case, do explicit factorial + else + if (abs(X) > 1.0D0) then + Z=abs(X) + M=int(Z) + R=1.0D0 + do K=1,M + R=R*(Z-K) + end do + Z=Z-M + else + Z=X + end if + GR=G(26) + do K=25,1,-1 + GR=GR*Z+G(K) + end do + GA=1.0D0/(GR*Z) + if (abs(X) > 1.0D0) then + GA=GA*R + if (X < 0.0D0) GA=-PI/(X*GA*SIN(PI*X)) + end if + end if + return + +end subroutine GAMMA_FUNCTION +!!*** + +!!****f* m_special_funcs/besjm +!! NAME +!! besjm +!! +!! FUNCTION +!! Spherical bessel function of order nn. Handles nn=0,1,2,3,4, or 5 only. +!! +!! INPUTS +!! arg= scaling to be applied to xx(nx) +!! nn=order of spherical bessel function (only 0 through 5 allowed) +!! cosx(1:nx)=cosines of arg*xx(1:nx) +!! xx(1:nx)=set of dimensionless arguments of function +!! nx=number of arguments +!! sinx(1:nx)=sines of arg*xx(1:nx) +!! +!! OUTPUT +!! besjx(1:nx)=returned values +!! +!! NOTES +!! besj(nn,y)=$ j_{nn}(y) =(\frac{\pi}{2y})^{\frac{1}{2}}J(nn+\frac{1}{2},y)$ +!! where J=Bessel function of the first kind. +!! besjm compute multiple values, and relies on precomputed values of sin and cos of y. +!! The argument y is arg*xx(ix), for ix from 1 to nx +!! The values of xx must be positive, and ordered by increasing order +!! At small arg, the higher orders have so much cancellation that the +!! analytic expression is very poor computationally. In that case we +!! use a rational polynomial approximation. +!! +!! SOURCE + +subroutine besjm(arg,besjx,cosx,nn,nx,sinx,xx) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: nn,nx + real(dp),intent(in) :: arg +!arrays + real(dp),intent(in) :: cosx(nx),sinx(nx),xx(nx) + real(dp),intent(out) :: besjx(nx) + +!Local variables------------------------------- +!scalars + integer :: ix,switchx +!Series or rational polynomial coefficients + real(dp),parameter :: b01=1.d0/6.d0,b02=1.d0/120.d0,b03=1.d0/5040.d0 + real(dp),parameter :: b04=1.d0/362880.d0,b11=0.8331251468724171d-1 + real(dp),parameter :: b12=0.2036961284395412d-2,b13=0.1932970379901801d-4 + real(dp),parameter :: b14=0.6526053169009489d-7,b21=0.5867824627555163d-1 + real(dp),parameter :: b22=0.1152501878595934d-2,b23=0.1011071389414764d-4 + real(dp),parameter :: b24=0.4172322111421287d-7,b25=0.6790616688656543d-10 + real(dp),parameter :: b31=0.439131885807176d-1,b32=0.6813139609887099d-3 + real(dp),parameter :: b33=0.4899103784264755d-5,b34=0.17025590795625d-7 + real(dp),parameter :: b35=0.2382642910613347d-10,b41=0.3587477991030971d-1 + real(dp),parameter :: b42=0.4833719855268907d-3,b43=0.3238388977796242d-5 + real(dp),parameter :: b44=0.1171802513125112d-7,b45=0.223261650431992d-10 + real(dp),parameter :: b46=.1800045587335951d-13,b51=0.295232406376567d-1 + real(dp),parameter :: b52=0.3359864457080573d-3,b53=0.19394750603618d-5 + real(dp),parameter :: b54=0.6143166228216219d-8,b55=0.10378501636108d-10 + real(dp),parameter :: b56=.749975122872713d-14 + real(dp),parameter :: c11=0.1668748531275829d-1,c12=0.1342812442426702d-3 + real(dp),parameter :: c13=0.6378249315355233d-6,c14=0.1573564527360138d-8 + real(dp),parameter :: c21=0.127503251530198d-1,c22=0.7911240539893565d-4 + real(dp),parameter :: c23=0.3044380758068054d-6,c24=0.7439837832363479d-9 + real(dp),parameter :: c25=0.9515065658793124d-12,c31=0.1164236697483795d-1 + real(dp),parameter :: c32=0.654858636312224d-4,c33=0.2265576367562734d-6 + real(dp),parameter :: c34=0.4929905563217352d-9,c35=0.555120465710914d-12 + real(dp),parameter :: c41=0.9579765544235745d-2,c42=0.4468999977536864d-4 + real(dp),parameter :: c43=0.1315634305905896d-6,c44=0.2615492488301639d-9 + real(dp),parameter :: c45=0.3387473312408129d-12,c46=.2280866204624012d-15 + real(dp),parameter :: c51=0.8938297823881763d-2,c52=0.3874149021633025d-4 + real(dp),parameter :: c53=0.1054692715135225d-6,c54=0.192879620987602d-9 + real(dp),parameter :: c55=0.2284469423833734d-12,c56=0.139729234332572d-15 + real(dp),parameter :: ffnth=1.d0/15.d0,o10395=1.d0/10395d0,oo105=1.d0/105.d0 + real(dp),parameter :: oo945=1.d0/945.d0 + real(dp) :: bot,rr,rsq,top + character(len=500) :: message + +! ************************************************************************* + + if (nn==0) then + + switchx=nx+1 + do ix=1,nx + rr=arg*xx(ix) + if (rr<=1.d-1) then + rsq=rr*rr + besjx(ix)=1.d0-rsq*(b01-rsq*(b02-rsq*(b03-rsq*b04))) + else + switchx=ix + exit + end if + end do + + do ix=switchx,nx + rr=arg*xx(ix) + besjx(ix)=sinx(ix)/rr + end do + + else if (nn==1) then + + switchx=nx+1 + do ix=1,nx + rr=arg*xx(ix) + if (rr<=1.d0) then + rsq=rr*rr + top=1.d0-rsq*(b11-rsq*(b12-rsq*(b13-rsq*b14))) + bot=1.d0+rsq*(c11+rsq*(c12+rsq*(c13+rsq*c14))) + besjx(ix)=third*rr*top/bot + else + switchx=ix + exit + end if + end do + + do ix=switchx,nx + rr=arg*xx(ix) + rsq=rr*rr + besjx(ix)=(sinx(ix)-rr*cosx(ix))/rsq + end do + + else if (nn==2) then + + switchx=nx+1 + do ix=1,nx + rr=arg*xx(ix) + if (rr<=2.d0) then + rsq=rr*rr + top=1.d0-rsq*(b21-rsq*(b22-rsq*(b23-rsq*(b24-rsq*b25)))) + bot=1.d0+rsq*(c21+rsq*(c22+rsq*(c23+rsq*(c24+rsq*c25)))) + besjx(ix)=ffnth*rsq*top/bot + else + switchx=ix + exit + end if + end do + + do ix=switchx,nx + rr=arg*xx(ix) + rsq=rr*rr + besjx(ix)=((3.d0-rsq)*sinx(ix)-3.d0*rr*cosx(ix))/(rr*rsq) + end do + + else if (nn==3) then + + switchx=nx+1 + do ix=1,nx + rr=arg*xx(ix) + if (rr<=2.d0) then + rsq=rr*rr + top=1.d0-rsq*(b31-rsq*(b32-rsq*(b33-rsq*(b34-rsq*b35)))) + bot=1.d0+rsq*(c31+rsq*(c32+rsq*(c33+rsq*(c34+rsq*c35)))) + besjx(ix)=rr*rsq*oo105*top/bot + else + switchx=ix + exit + end if + end do + + do ix=switchx,nx + rr=arg*xx(ix) + rsq=rr*rr + besjx(ix)=( (15.d0-6.d0*rsq)*sinx(ix)& +& + rr*(rsq-15.d0) *cosx(ix) ) /(rsq*rsq) + end do + + else if (nn==4) then + + switchx=nx+1 + do ix=1,nx + rr=arg*xx(ix) + if (rr<=4.d0) then + rsq=rr*rr + top=1.d0-rsq*(b41-rsq*(b42-rsq*(b43-rsq*(b44-rsq*(b45-rsq*b46))))) + bot=1.d0+rsq*(c41+rsq*(c42+rsq*(c43+rsq*(c44+rsq*(c45+rsq*c46))))) + besjx(ix)=rsq*rsq*oo945*top/bot + else + switchx=ix + exit + end if + end do + + do ix=switchx,nx + rr=arg*xx(ix) + rsq=rr*rr + besjx(ix)=( (105.d0-rsq*(45.d0-rsq)) *sinx(ix)& +& + rr * (10.d0*rsq-105.d0) *cosx(ix) ) /(rsq*rsq*rr) + end do + + else if (nn==5) then + + switchx=nx+1 + do ix=1,nx + rr=arg*xx(ix) + if (rr<=4.d0) then + rsq=rr*rr + top=1.d0-rsq*(b51-rsq*(b52-rsq*(b53-rsq*(b54-rsq*(b55-rsq*b56))))) + bot=1.d0+rsq*(c51+rsq*(c52+rsq*(c53+rsq*(c54+rsq*(c55+rsq*c56))))) + besjx(ix)=rsq*rsq*rr*o10395*top/bot + else + switchx=ix + exit + end if + end do + + do ix=switchx,nx + rr=arg*xx(ix) + rsq=rr*rr + besjx(ix)=( (945.d0-rsq*(420.d0-rsq*15.d0)) *sinx(ix)& +& + rr * (945.d0-rsq*(105.d0-rsq)) *cosx(ix) ) /(rsq*rsq*rr) + end do + + else + write(message, '(a,i0,a)' )' besjm only defined for nn in [0,5]; input was nn=',nn,'.' + ABI_BUG(message) + end if + +end subroutine besjm +!!*** + +!!****f* m_special_funcs/sbf8 +!! NAME +!! sbf8 +!! +!! FUNCTION +!! Computes set of spherical bessel functions using accurate algorithm +!! based on downward recursion in order and normalization sum. +!! Power series used at small arguments. +!! +!! INPUTS +!! nm=maximum angular momentum wanted + one +!! xx=argument of sbf +!! +!! OUTPUT +!! sb_out(nm)=values of spherical bessel functions for l=0,nm-1 +!! +!! SOURCE + +subroutine sbf8(nm,xx,sb_out) + +!Arguments---------------------------------------------------------- +!scalars + integer,intent(in) :: nm + real(dp),intent(in) :: xx +!arrays + real(dp),intent(out) :: sb_out(nm) + +!Local variables------------------------------- +!scalars + integer :: nlim,nn + real(dp) :: fn,sn,xi,xn,xs +!arrays + real(dp),allocatable :: sb(:) + +! ************************************************************************* + + if(xx<= 1.0e-36_dp) then +! zero argument section + sb_out(:)=zero + sb_out(1)=one + else if(xx<1.e-3_dp) then +! small argument section + xn=one + xs=half*xx**2 + do nn=1,nm + sb_out(nn)=xn*(one - xs*(one - xs/(4*nn+6))/(2*nn+1)) + xn=xx*xn/(2*nn+1) + end do + else +! recursion method + if(xx tol12) then + arg = (energy-mu)/temperature + if(arg < -600._dp)then ! far below Ef + fermi_dirac = one + else if (arg < 600._dp)then ! around Ef + fermi_dirac = one / (exp(arg) + one) + end if + else ! T is too small - just step function + if (mu-energy > tol12) fermi_dirac = one + end if + +end function fermi_dirac +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_special_funcs/bose_einstein +!! NAME +!! bose_einstein +!! +!! FUNCTION +!! Returns the Bose Einstein distribution for T and energy +!! presumes everything is in Hartree!!!! Not Kelvin for T +!! +!! INPUTS +!! energy = electron energy level +!! temperature = T +!! +!! SOURCE + +function bose_einstein(energy, temperature) + +!Arguments ------------------------------------ +!scalars + real(dp),intent(in) :: energy, temperature + real(dp) :: bose_einstein + +!Local variables------------------------------- +!scalars + real(dp) :: arg + character(len=500) :: message + +! ************************************************************************* + + bose_einstein = zero + if (temperature > tol12) then + arg = energy/temperature + if(arg > tol12 .and. arg < 600._dp)then + bose_einstein = one / (exp(arg) - one) + else if (arg < tol12) then + write(message,'(a)') 'No Bose Einstein for negative energies' + ABI_WARNING(message) + end if + else + write(message,'(a)') 'No Bose Einstein for negative or 0 T' + ABI_WARNING(message) + end if + + +end function bose_einstein +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_special_funcs/dip12 +!! NAME +!! dip12 +!! +!! FUNCTION +!! Returns the complete Fermi integral of order 1/2. +!! Based on an analytical approximation. +!! +!! INPUTS +!! gamma=complete Fermi integral argument +!! +!! OUTPUT +!! dip12=resulting function +!! +!! SOURCE +function dip12(gamma) +! Arguments ------------------------------- +! Scalars + real(dp),intent(in) :: gamma + +! Local variables ------------------------- +! Scalars + real(dp) :: d,dip12,dy + +! ********************************************************************* + + if (gamma.lt.3.) then + dy=exp(gamma) + if (gamma+1.9375.LE.0) then + dip12=dy*& + & (1.-dy*(0.35355283-dy*(0.19242767-dy*(0.12456909-dy*& + & (8.5114507E-02-dy*4.551794E-02))))) + else + d=gamma-0.5 + dip12=dy*(0.677695804-d*(0.187773135+d*(2.16197521E-02-d*& + & (9.23703807E-03+d*& + & (1.71735167E-03-d*(6.07913775E-04+d*& + & (1.1448629E-04-d*& + & (4.544432E-05+d*(6.4719368E-06-d*(3.794983E-06+d*& + & (1.7338029E-07-d*& + & (3.5546516E-07-d*(3.7329191E-08+d*& + & (3.3097822E-08-d*& + & (8.3190193E-09+d*(2.2752769E-09-d*(7.836005E-10+d*& + & (7.519551E-11-d*2.960006E-11)))))))))))))))))) + end if + else if (gamma.lt.20.) then + if (gamma.lt.10.) then + d=gamma-6.5 + dip12=12.839811+d*& + & (2.844774+d*(0.114920926-d*(3.43733039E-03-d*& + & (2.3980356E-04-d*& + & (2.0201888E-05-d*(1.5219883E-06-d*& + & (6.2770524E-08+d*& + & (4.8830336E-09-d*(2.1031164E-09-d*(5.785753E-10-d*& + & (7.233066E-11-d*1.230727E-12))))))))))) + else + d=gamma-14.5 + dip12=41.7799227+d*& + & (4.2881461+d*(7.45407825E-02-d*(8.79243296E-04-d*& + & (2.38288861E-05-d*& + & (8.82474867E-07-d*(3.82865217E-08-d*& + & (1.9274292E-09-d*(1.42248669E-10-d*8.17019813E-12)))))))) + end if + else + d=1./gamma + dy=gamma*sqrt(gamma)/1.329340388 + dip12=dy*(1.-d*(9.354E-07-d*(1.2338391-d*(6.77931E-03-d*& + & 1.17871643)))) + end if + dip12=dip12*0.88622692 +end function dip12 +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_special_funcs/dip32 +!! NAME +!! dip32 +!! +!! FUNCTION +!! Returns the complete Fermi integral of order 3/2. +!! Based on an analytical approximation. +!! +!! INPUTS +!! gamma=complete Fermi integral argument +!! +!! OUTPUT +!! dip32=resulting function +!! +!! SOURCE +function dip32(gamma) +! Arguments ------------------------------- +! Scalars + real(dp),intent(in) :: gamma + +! Local variables ------------------------- +! Scalars + real(dp) :: d,dip32,dval + +! ********************************************************************* + + if (gamma.GT.1.75) then + dval=gamma*gamma*SQRT(gamma) + if (gamma.LT.4.5) then + d=gamma-3.125 + dip32=(1.27623+0.596065*gamma+0.3*dval)*& + & (1.0055558385-d*(5.23889494E-03+d*& + & (3.13523144E-03-d*(3.06124286E-03-d*& + & (1.3644667E-03-d*& + & (4.1528384E-04-d*(8.901188E-05-d*(1.079979E-05+d*& + & (2.29058E-06-d*(2.58985E-06-d*7.30909E-07)))))))))) + else if (gamma.LT.12.) then + if (gamma.LT.8.) then + d=gamma-6.25 + dip32=(2.01508+0.425775*gamma+0.3*dval)*& + & (1.000387131-d*(3.93626295E-04+d*& + & (2.55710115E-04-d*& + & (1.57383494E-04-d*(5.0286036E-05-d*& + & (1.2073559865E-05-d*& + & (2.4909523213E-06-d*(5.244328548E-07-d*& + & 8.0884033896E-08)))))))) + else + d=gamma-10. + dip32=0.3*dval*& + & (1.064687247-d*(1.22972303E-02-d*(1.8362121E-03-d*& + & (2.433558E-04-d*(3.018186E-05-d*(3.5694E-06-d*& + & (4.11212E-07-d*(5.2151E-08-d*5.8424E-09)))))))) + end if + else + d=1./gamma + dip32=0.30090111127*dval*& + & (1.-d*(2.863E-06-d*(6.168876549-d*& + & (1.740553E-02+d*(1.425257+d*2.95887))))) + end if + else if (gamma+0.75.LE.0) then + d=EXP(gamma) + dip32=d*& + & (1.-d*(1.76775246E-01-d*(6.4124584E-02-d*& + & (3.1027055E-02-d*(1.6797637E-02-d*& + & (8.212636E-03-d*(2.384106E-03))))))) + else + d=gamma-0.5 + dip32=EXP(gamma)*(0.846691-0.128948*gamma)*& + & (1.034064158+d*(2.778947E-03-d*& + & (3.572502805E-02+d*(3.0411645E-03-d*& + & (1.7380548E-03+d*(2.7756776E-04-d*& + & (8.08302E-05+d*(1.59606E-05-d*& + & (3.8144E-06+d*7.4446E-07))))))))) + end if + dip32=dip32*1.32934038 +end function dip32 +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_special_funcs/djp12 +!! NAME +!! djp12 +!! +!! FUNCTION +!! Returns the incomplete Fermi integral of order 1/2. +!! Based on an analytical approximation. +!! +!! INPUTS +!! xcut=lower bound of the incomplete Fermi integral +!! gamma=incomplete Fermi integral argument +!! +!! OUTPUT +!! djp12=resulting function +!! +!! SOURCE +function djp12(xcut,gamma) +! Arguments ------------------------------- +! Scalars + real(dp),intent(in) :: xcut,gamma + real(dp) :: djp12 + +! Local variables ------------------------- +! Scalars + real(dp) :: d2h,db,dc,dd,de,df1,df2,df3,dh + real(dp) :: ds,dt,dv,dw,dxm,dxp + integer :: i,ind,iq,k,nm,np,nq +! Arrays + real(dp) :: dq(5),df(101),dy(101) + +! ********************************************************************* + + dh=0.2D+0 + d2h=0.4D+0 + nm=101 + ind=0 + dq=(/1.D+0,2.828427124D+0,5.196152423D+0,8.D+0,1.118033989D+1/) + + djp12=0.D+0 + dxm=gamma-1.5D+1 + if (xcut.gt.dxm) then + if (ind.eq.0) then + do i=1,nm + dy(i)=-1.5D+1+(i-1)*dh + df(i)=1.D+0+dexp(dy(i)) + end do + ind=1 + end if + dxp=gamma+5.D+0 + if (xcut.lt.dxp) then + dc=dxp + else + dc=xcut + end if + db=dexp(gamma-dc) + dt=db + do iq=1,5 + dd=iq*dc + ds=dsqrt(dd) + dw=1.+.3275911*ds + dw=1.D+0/dw + dv=dw*(.2258368458D+0+& + & dw*(-.2521286676D+0+dw*(1.2596951294D+0+& + & dw*(-1.2878224530D+0+dw*(.9406460699D+0))))) + dv=dv+ds + de=dt*dv/dq(iq) + djp12=djp12+de + if (dabs(de).lt.(1.D-07*djp12)) exit + dt=-dt*db + end do + if (xcut.ge.dxp) return + np=(dxp-xcut)/dh + np=2*(np/2) + np=nm-np + nq=(15.-gamma)/dh + nq=1+2*(nq/2) + if (np.lt.nq) np=nq + if (np.le.nm) then + df3=0.D+0 + dt=dy(np)+gamma + dv=(dt-xcut)/2.D+0 + df3=0.D0 + if (dt.ge.1.D-13) df3=dsqrt(dt) + if (dabs(dv).ge.1.D-13) then + df1=dsqrt(xcut) + dt=df1+df3 + dw=(dv+dv)/(dt*dt) + df2=dw*dw + df2=df2+df2 + db=df2*(df2+7.D+0)+7.D+1 + dc=7.D+0*(1.D+1-df2) + dc=dc*dw + dd=-df2*(df2-2.8D+1)+1.4D+2 + dd=dd+dd + ds=dt*((db-dc)/(1.D+0+dexp(xcut-gamma))+& + & dd/(1.D+0+dexp(xcut+dv-gamma))+(db+dc)/df(np)) + ds=ds*dv/4.2D+2 + djp12=djp12+ds + end if + if (np.ne.nm) then + ds=0.D+0 + np=np+2 + do k=np,nm,2 + df1=df3 + df3=dsqrt(dy(k)+gamma) + dt=df1+df3 + dw=d2h/(dt*dt) + df2=dw*dw + df2=df2+df2 + db=df2*(df2+7.D+0)+7.D+1 + dc=7.D+0*(1.D+1-df2) + dc=dc*dw + dd=-df2*(df2-2.8D+1)+1.4D+2 + dd=dd+dd + ds=ds+dt*((db-dc)/df(k-2)+dd/df(k-1)+(db+dc)/df(k)) + end do + ds=ds*dh/4.2D+2 + djp12=djp12+ds + end if + if (xcut.ge.dxm) return + end if + end if + djp12=dip12(gamma)-xcut*dsqrt(xcut)/1.5D+0 +end function djp12 +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_special_funcs/djp32 +!! NAME +!! djp32 +!! +!! FUNCTION +!! Returns the incomplete Fermi integral of order 3/2. +!! Based on an analytical approximation. +!! +!! INPUTS +!! xcut=lower bound of the incomplete Fermi integral +!! gamma=incomplete Fermi integral argument +!! +!! OUTPUT +!! djp32=resulting function +!! +!! SOURCE +function djp32(xcut,gamma) +! Arguments ------------------------------- +! Scalars + real(dp),intent(in) :: xcut,gamma + real(dp) :: djp32 + +! Local variables ------------------------- +! Scalars + real(dp) :: d2h,db,dc,dd,de,df1,df2,df3,dh + real(dp) :: ds,dt,dv,dw,dx1,dx2 + real(dp) :: dx3,dxm,dxp + integer :: i,ind,iq,k,nm,np,nq +! Arrays + real(dp) :: dq(5),df(101),dy(101) + +! ********************************************************************* + + dh=0.2D+0 + d2h=0.4D+0 + nm=101 + ind=0 + dq=(/1.D+0,5.656854228D+0,1.558845727D+1,3.2D+1,5.590169945D+0/) + + djp32=0.D+0 + dxm=gamma-1.5D+1 + if (xcut.GT.dxm) then + if (ind.EQ.0) then + do i=1,nm + dy(i)=-1.5D+1+(i-1)*dh + df(i)=1.D+0+DEXP(dy(i)) + end do + ind=1 + end if + dxp=gamma+5.D+0 + if (xcut.LT.dxp) then + dc=dxp + else + dc=xcut + end if + db=DEXP(gamma-dc) + dt=db + do iq=1,5 + dd=iq*dc + ds=DSQRT(dd) + dw=1.+.3275911*ds + dw=1.D+0/dw + dv=dw*(.2258368458D+0+& + & dw*(-.2521286676D+0+dw*(1.2596951294D+0+& + & dw*(-1.2878224530D+0+dw*(.9406460699D+0))))) + dv=dv+ds + dv=1.5D+0*dv+ds*dd + de=dt*dv/dq(iq) + djp32=djp32+de + if (DABS(de).LT.(1.D-07*djp32)) exit + dt=-dt*db + end do + if (xcut.GE.dxp) return + np=(dxp-xcut)/dh + np=2*(np/2) + np=nm-np + nq=(15.-gamma)/dh + nq=1+2*(nq/2) + if (np.LT.nq) np=nq + if (np.LE.nm) then + df3=0.D+0 + dt=dy(np)+gamma + dv=(dt-xcut)/2.D+0 + df3=DSQRT(dt) + dx3=dt + if (DABS(dv).GE.1.D-13) then + df1=DSQRT(xcut) + dt=df1+df3 + dw=(dv+dv)/(dt*dt) + df2=dw*dw + df2=df2+df2 + db=df2*(df2+7.D+0)+7.D+1 + dc=7.D+0*(1.D+1-df2) + dc=dc*dw + dd=-df2*(df2-2.8D+1)+1.4D+2 + dd=dd+dd + ds=dt*((db-dc)*xcut/(1.D+0+DEXP(xcut-gamma))+dd*(xcut+dv)& + & /(1.D+0+DEXP(xcut+dv-gamma))+(db+dc)*(dy(np)+gamma)/df(np)) + ds=ds*dv/4.2D+2 + djp32=djp32+ds + end if + if (np.NE.nm) then + ds=0.D+0 + np=np+2 + do k=np,nm,2 + dx1=dx3 + df1=df3 + dx2=dy(k-1)+gamma + dx3=dy(k)+gamma + df3=DSQRT(dx3) + dt=df1+df3 + dw=d2h/(dt*dt) + df2=dw*dw + df2=df2+df2 + db=df2*(df2+7.D+0)+7.D+1 + dc=7.D+0*(1.D+1-df2) + dc=dc*dw + dd=-df2*(df2-2.8D+1)+1.4D+2 + dd=dd+dd + ds=ds+dt*((db-dc)*dx1/df(k-2)+dd*dx2/df(k-1)& + & +(db+dc)*dx3/df(k)) + end do + ds=ds*dh/4.2D+2 + djp32=djp32+ds + end if + if (xcut.GE.dxm) return + end if + end if + djp32=dip32(gamma)-xcut*xcut*DSQRT(xcut)/2.5D+0 +end function djp32 +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_special_funcs/k_fermi +!! NAME +!! k_fermi +!! +!! FUNCTION +!! Returns the Fermi wave vector corresponding to the local value of the real space density rhor. +!! +!! INPUTS +!! rhor=Local density in real space. +!! +!! SOURCE + +elemental function k_fermi(rhor) + +!Arguments ------------------------------------ +!scalars + real(dp),intent(in) :: rhor + real(dp) :: k_fermi + +!Local variables------------------------------- +!scalars + real(dp),parameter :: pisq=pi**2 + +! ************************************************************************* + + k_fermi = (three*pisq*rhor)**third + +end function k_fermi +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_special_funcs/k_thfermi +!! NAME +!! k_thfermi +!! +!! FUNCTION +!! Returns the Thomas-Fermi wave vector corresponding to the local value of the real space density rhor. +!! +!! INPUTS +!! rhor=Local density in real space. +!! +!! SOURCE + +elemental function k_thfermi(rhor) + +!Arguments ------------------------------------ +!scalars + real(dp),intent(in) :: rhor + real(dp) :: k_thfermi + +!Local variables------------------------------- +!scalars + real(dp),parameter :: pisq=pi**2 + +! ************************************************************************* + + k_thfermi = SQRT(four*k_fermi(rhor)*piinv) + +end function k_thfermi +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_special_funcs/levi_civita_3 +!! NAME +!! levi_civita_3 +!! +!! FUNCTION + !! Return Levi-Civita tensor of rank 3 +!! +!! SOURCE + +pure function levi_civita_3() result(ee) + +!Arguments ------------------------------------ + integer :: ee(3,3,3) + +! ************************************************************************* + + ee = 0 + ee(1,2,3) = 1 + ee(2,3,1) = 1 + ee(3,1,2) = 1 + ! + ee(3,2,1) = -1 + ee(1,3,2) = -1 + ee(2,1,3) = -1 + +end function levi_civita_3 +!!*** + +!!****f* m_special_funcs/jlspline_new +!! NAME +!! jlspline_new +!! +!! FUNCTION +!! Pre-calculate the j_v(y) for recip_ylm on regular grid +!! NOTE: spherical Bessel function small j! +!! +!! INPUTS +!! nx = max number of points on grid for integral +!! delta = space between integral arguments +!! mlang= max angular momentum +!! +!! OUTPUT +!! bess_spl=array of integrals +!! bess_spl_der=array of derivatives of integrals +!! xx=coordinates of points belonging to the grid +!! +!! SOURCE + +type(jlspline_t) function jlspline_new(nx, delta, mlang) result(new) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: nx,mlang + real(dp),intent(in) :: delta + +!Local variables ------------------------- +!scalars + integer :: ix,ll + real(dp) :: yp1,ypn +!arrays + real(dp),allocatable :: cosbessx(:),sinbessx(:) + +! ********************************************************************* + + if (nx < 2) then + ABI_ERROR('need more than one point for the interpolation routines') + end if + + new%nx = nx; new%mlang = mlang; new%delta = delta; new%maxarg = (nx-1) * delta + ABI_MALLOC(new%xx, (nx)) + ABI_MALLOC(new%bess_spl, (nx, mlang)) + ABI_MALLOC(new%bess_spl_der, (nx, mlang)) + + !----------------------------------------------------------------- + !Bessel function into array + !----------------------------------------------------------------- + ! integration grid is nfiner times finer than the interpolation grid + ABI_MALLOC(sinbessx, (nx)) + ABI_MALLOC(cosbessx, (nx)) + + ! could be done by chain rule for cos sin (is it worth it?) but + ! precision problems as numerical errors are propagated. + do ix=1,nx + new%xx(ix) = (ix-1) * delta + sinbessx(ix) = sin(new%xx(ix)) + cosbessx(ix) = cos(new%xx(ix)) + end do + + ! fill bess_spl array + do ll=0,mlang-1 + call besjm(one,new%bess_spl(:,ll+1),cosbessx,ll,nx,sinbessx,new%xx) + + ! call spline to get 2nd derivative (reuse in splint later) + yp1 = zero; ypn = zero + call spline(new%xx, new%bess_spl(:,ll+1), nx, yp1, ypn, new%bess_spl_der(:,ll+1)) + end do + +!write(std_out,*) ' bess funct 0 1 2 3 4' +!do ix=1,nx +!write(std_out,*) xx(ix), (new%bess_spl(ix,ll),ll=1,mlang) +!end do + + ABI_FREE(sinbessx) + ABI_FREE(cosbessx) + +end function jlspline_new +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_special_funcs/jlspline_free +!! NAME +!! jlspline_free +!! +!! FUNCTION +!! deallocate memory +!! +!! SOURCE + +subroutine jlspline_free(jlspl) + +!Arguments ------------------------------------ + type(jlspline_t),intent(inout) :: jlspl + +! ********************************************************************* + + if (allocated(jlspl%xx)) then + ABI_FREE(jlspl%xx) + end if + if (allocated(jlspl%bess_spl)) then + ABI_FREE(jlspl%bess_spl) + end if + if (allocated(jlspl%bess_spl_der)) then + ABI_FREE(jlspl%bess_spl_der) + end if + +end subroutine jlspline_free +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_special_funcs/jlspline_integral +!! NAME +!! jlspline_integral +!! +!! INPUTS +!! +!! OUTPUT +!! +!! FUNCTION +!! +!! SOURCE + +real(dp) function jlspline_integral(jlspl, il, qq, powr, nr, rcut) result(res) + +!Arguments ------------------------------------ + integer,intent(in) :: il,nr,powr + real(dp),intent(in) :: qq, rcut + type(jlspline_t),intent(in) :: jlspl + +!Local variables --------------------------------------- + integer :: ierr + real(dp) :: step +!arrays + real(dp):: xfit(nr),yfit(nr),rr(nr) +! ********************************************************************* + + step = rcut / (nr - 1) + rr = arth(zero, step, nr) + xfit = qq * rr + call splint(jlspl%nx, jlspl%xx, jlspl%bess_spl(:,il), jlspl%bess_spl_der(:,il), nr, xfit, yfit, ierr=ierr) + + if (ierr /= 0) then + write(std_out,*)"qq, rcut, qq*rcut, maxarg", qq, rcut, qq*rcut, jlspl%maxarg + write(std_out,*)"x[0], x[-1]",jlspl%xx(1),jlspl%xx(jlspl%nx) + write(std_out,*)"minval xfit: ",minval(xfit) + write(std_out,*)"maxval xfit: ",maxval(xfit) + ABI_ERROR("splint returned ierr != 0") + end if + + if (powr /= 1) yfit = yfit * (rr ** powr) + res = simpson(step, yfit) + +end function jlspline_integral +!!*** + +!!****f* m_special_funcs/gspline_new +!! NAME +!! gspline_new +!! +!! FUNCTION +!! Build object to spline the gaussian approximant and its primitive. +!! +!! INPUTS +!! sigma=Broadening parameter. +!! +!! SOURCE + +type (gspline_t) function gspline_new(sigma) result(new) + +!Arguments ------------------------------------ +!scalars + real(dp),intent(in) :: sigma + +!Local variables ------------------------------ +!scalars + integer :: ii + real(dp) :: ybcbeg, ybcend +! ************************************************************************* + + new%nspline = 5 * 1024; new%sigma = sigma + ABI_CHECK(sigma > zero, sjoin("invalid sigma:", ftoa(sigma))) + new%xmin = zero + new%xmax = sigma * sqrt(-log(sigma * sqrt(pi) * tol12)) ! gauss(xmax) = tol12 + new%step = (new%xmax - new%xmin) / (new%nspline - 1) + new%stepm1 = one / new%step; new%step2div6 = new%step**2 / six + + ABI_MALLOC(new%xvals, (new%nspline)) + do ii=1,new%nspline + new%xvals(ii) = new%xmin + (ii-1) * new%step + end do + new%xmax = new%xvals(new%nspline) + + ! Spline the gaussian approximant. + ABI_MALLOC(new%svals, (new%nspline, 4)) + new%svals(:, 1) = gaussian(new%xvals, sigma) + ybcbeg = - (two * new%xmin / sigma**2) * new%svals(1,1) + ybcend = - (two * new%xmax / sigma**2) * new%svals(new%nspline,1) + call spline(new%xvals, new%svals(:,1), new%nspline, ybcbeg, ybcend, new%svals(:,2)) + + ! Spline the primitive: 1/2 [1 + erf(x/sigma)] + new%svals(:, 3) = half * (one + abi_derf(new%xvals / new%sigma)) + call spline(new%xvals, new%svals(:,3), new%nspline, new%svals(1,1), new%svals(new%nspline, 1), new%svals(:,4)) + !do ii=1,new%nspline; write(98,*)new%xvals(ii),new%svals(ii,3),new%svals(ii,4); end do + +end function gspline_new +!!*** + +!!****f* m_special_funcs/gspline_eval +!! NAME +!! gspline_eval +!! +!! FUNCTION +!! Evaluate the gaussian approximant and its primitive at (xmesh - x0) +!! +!! INPUTS +!! self=Object used to spline the gaussian approximant +!! x0=Shift to be given to xmesh +!! nx=Number of points in input mesh. +!! xmesh(nx)=Frequency points (not necessarly linear). +!! +!! OUTPUT +!! weights(nx,2)=First slice contains the gaussian approximant on xmesh. +!! The second slice stores the primitive. +!! +!! SOURCE + +pure subroutine gspline_eval(self, x0, nx, xmesh, weights) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: nx + real(dp),intent(in) :: x0 + type(gspline_t),intent(in) :: self +!arrays + real(dp),intent(in) :: xmesh(nx) + real(dp),intent(out) :: weights(nx,2) + +!Local variables ------------------------------ +!scalars + integer :: ix,jspl + real(dp) :: xx,absx,aa,bb,cc,dd + logical :: isneg + !real(dp) :: int_values(nx) + +! ************************************************************************* + + do ix=1,nx + xx = xmesh(ix) - x0; absx = abs(xx); isneg = xx < zero + if (absx >= self%xmax) then + ! Region in which gauss(x) is negligible. + weights(ix,1) = zero + if (isneg) then + weights(ix,2) = zero + else + weights(ix,2) = one + end if + else + ! Spline functions at |x| and recover the value at x: + ! g(x) = g(-x); G(-x) = 1 - G(x) + jspl = 1 + int((absx - self%xmin) * self%stepm1); dd = absx - self%xvals(jspl) + bb = dd * self%stepm1 + aa = one - bb + cc = aa*(aa**2-one) * self%step2div6 + dd = bb*(bb**2-one) * self%step2div6 + + weights(ix,1) = aa*self%svals(jspl,1) + bb*self%svals(jspl+1,1) + cc*self%svals(jspl,2) + dd*self%svals(jspl+1,2) + weights(ix,2) = aa*self%svals(jspl,3) + bb*self%svals(jspl+1,3) + cc*self%svals(jspl,4) + dd*self%svals(jspl+1,4) + if (isneg) weights(ix,2) = one - weights(ix,2) + end if + end do + + !call simpson_int(nx,xmesh(2) - xmesh(1),weights(:,1),int_values) + !do ix=1,nx + ! write(99,*)xmesh(ix), weights(ix,1), gaussian(xx, self%sigma), weights(ix,2), int_values(ix) + !end do + +end subroutine gspline_eval +!!*** + +!!****f* m_special_funcs/gspline_free +!! NAME +!! gspline_free +!! +!! FUNCTION +!! Free dynamic memory +!! +!! INPUTS +!! self=Object used to spline the gaussian approximant +!! +!! SOURCE + +subroutine gspline_free(self) + +!Arguments ------------------------------------ +!scalars + type(gspline_t),intent(inout) :: self + +! ************************************************************************* + + if (allocated(self%xvals)) then + ABI_FREE(self%xvals) + end if + if (allocated(self%svals)) then + ABI_FREE(self%svals) + end if + +end subroutine gspline_free +!!*** + +end module m_special_funcs +!!*** diff --git a/GX-PAW/common/src/32_util/m_special_funcs.o b/GX-PAW/common/src/32_util/m_special_funcs.o new file mode 100644 index 00000000..88fed924 Binary files /dev/null and b/GX-PAW/common/src/32_util/m_special_funcs.o differ diff --git a/GX-PAW/common/src/32_util/m_symtk.F90 b/GX-PAW/common/src/32_util/m_symtk.F90 new file mode 100644 index 00000000..906f84d0 --- /dev/null +++ b/GX-PAW/common/src/32_util/m_symtk.F90 @@ -0,0 +1,3464 @@ +!!****m* ABINIT/m_symtk +!! NAME +!! m_symtk +!! +!! FUNCTION +!! Low-level tools related to symmetries +!! +!! COPYRIGHT +!! Copyright (C) 1998-2024 ABINIT group (RC, XG, GMR, MG, JWZ) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" + +module m_symtk + + use defs_basis + use m_errors + use m_abicore + + use m_numeric_tools, only : isinteger, wrap2_pmhalf + use m_hide_lapack, only : matrginv + + implicit none + + private +!!*** + + public :: mati3inv ! Invert and transpose orthogonal 3x3 matrix of INTEGER elements. + public :: mati3det ! Compute the determinant of a 3x3 matrix of INTEGER elements. + public :: matr3inv ! Invert and TRANSPOSE general 3x3 matrix of real*8 elements. + public :: symdet ! Compute determinant of each input symmetry matrix sym(3,3,i) + public :: chkgrp ! Checks that a set of input symmetries constitutes a group. + public :: sg_multable ! Checks that a set of input symmetries constitutes a group. + ! TODO: This improved version should replace chkgrp. + public :: chkorthsy ! Check the orthogonality of the symmetry operations + public :: chkprimit ! Check whether the cell is primitive or not. + public :: symrelrot ! Transform symmetry matrices to new coordinate system. + public :: littlegroup_q ! Determines the symmetry operations by which reciprocal vector q is preserved. + public :: matpointsym ! Symmetrizes a 3x3 input matrix using the point symmetry of the input atom + public :: holocell ! Examine whether the trial conventional cell described by cell_base + ! is coherent with the required holohedral group. + public :: symmetrize_rprimd ! Generate new rprimd on the basis of the expected characteristics of the conventional cell + public :: symmetrize_tnons ! Enforce accurate tnons for glide and screw symmetries + public :: symmetrize_xred ! Symmetrize atomic coordinates using input symmetry matrices symrel + public :: symchk ! Symmetry checker for atomic coordinates. + public :: symatm ! Build indsym table describing the action of the symmetry operations on the atomic positions. + public :: symcharac ! Get the type of axis for the symmetry. + public :: smallprim ! Find the smallest possible primitive vectors for an input lattice + public :: print_symmetries ! Helper function to print symmetries in a nice format. +!!*** + +contains +!!*** + +!!****f* m_symtk/mati3inv +!! NAME +!! mati3inv +!! +!! FUNCTION +!! Invert and transpose orthogonal 3x3 matrix of INTEGER elements. +!! +!! INPUTS +!! mm = integer matrix to be inverted +!! +!! OUTPUT +!! mit = inverse of mm input matrix +!! +!! NOTES +!! Used for symmetry operations. +!! This routine applies to ORTHOGONAL matrices only. +!! Since these form a group, inverses are also integer arrays. +!! Returned array is TRANSPOSE of inverse, as needed. +!! Note use of integer arithmetic. +!! +!! SOURCE + +subroutine mati3inv(mm, mit) + +!Arguments ------------------------------------ +!arrays + integer,intent(in) :: mm(3,3) + integer,intent(out) :: mit(3,3) + +!Local variables------------------------------- +!scalars + integer :: dd + character(len=500) :: msg +!arrays + integer :: tt(3,3) + +! ************************************************************************* + + tt(1,1) = mm(2,2) * mm(3,3) - mm(3,2) * mm(2,3) + tt(2,1) = mm(3,2) * mm(1,3) - mm(1,2) * mm(3,3) + tt(3,1) = mm(1,2) * mm(2,3) - mm(2,2) * mm(1,3) + tt(1,2) = mm(3,1) * mm(2,3) - mm(2,1) * mm(3,3) + tt(2,2) = mm(1,1) * mm(3,3) - mm(3,1) * mm(1,3) + tt(3,2) = mm(2,1) * mm(1,3) - mm(1,1) * mm(2,3) + tt(1,3) = mm(2,1) * mm(3,2) - mm(3,1) * mm(2,2) + tt(2,3) = mm(3,1) * mm(1,2) - mm(1,1) * mm(3,2) + tt(3,3) = mm(1,1) * mm(2,2) - mm(2,1) * mm(1,2) + dd = mm(1,1) * tt(1,1) + mm(2,1) * tt(2,1) + mm(3,1) * tt(3,1) + + ! Make sure matrix is not singular + if (dd /= 0) then + mit(:,:)=tt(:,:)/dd + else + write(msg, '(2a,2x,9(i0,1x),a)' )'Attempting to invert integer array',ch10,mm,' ==> determinant is zero.' + ABI_ERROR(msg) + end if + + ! If matrix is orthogonal, determinant must be 1 or -1 + if (abs(dd) /= 1) then + write(msg, '(3a,i0)' )'Absolute value of determinant should be one',ch10,'but determinant= ',dd + ABI_ERROR(msg) + end if + +end subroutine mati3inv +!!*** + +!!****f* m_symtk/mati3det +!! NAME +!! mati3det +!! +!! FUNCTION +!! Compute the determinant of a 3x3 matrix of INTEGER elements. +!! +!! INPUTS +!! mm = integer matrix +!! +!! OUTPUT +!! det = determinant of the matrix +!! +!! SOURCE + +subroutine mati3det(mm, det) + +!Arguments ------------------------------------ +!arrays + integer,intent(in) :: mm(3,3) + integer,intent(out) :: det + +! ************************************************************************* + det=mm(1,1)*(mm(2,2) * mm(3,3) - mm(3,2) * mm(2,3)) & + + mm(2,1)*(mm(3,2) * mm(1,3) - mm(1,2) * mm(3,3)) & + + mm(3,1)*(mm(1,2) * mm(2,3) - mm(2,2) * mm(1,3)) + +end subroutine mati3det +!!*** + +!!****f* m_symtk/matr3inv +!! NAME +!! matr3inv +!! +!! FUNCTION +!! Invert and transpose general 3x3 matrix of real*8 elements. +!! +!! INPUTS +!! aa = 3x3 matrix to be inverted +!! +!! OUTPUT +!! ait = inverse of aa input matrix +!! +!! NOTES +!! Returned array is TRANSPOSE of inverse, as needed to get g from r. +!! +!! SOURCE + +subroutine matr3inv(aa, ait) + +!Arguments ------------------------------------ +!arrays + real(dp),intent(in) :: aa(3,3) + real(dp),intent(out) :: ait(3,3) + +!Local variables------------------------------- +!scalars + real(dp) :: dd,det,t1,t2,t3 + character(len=500) :: msg + +! ************************************************************************* + + t1 = aa(2,2) * aa(3,3) - aa(3,2) * aa(2,3) + t2 = aa(3,2) * aa(1,3) - aa(1,2) * aa(3,3) + t3 = aa(1,2) * aa(2,3) - aa(2,2) * aa(1,3) + det = aa(1,1) * t1 + aa(2,1) * t2 + aa(3,1) * t3 + +!Make sure matrix is not singular + if (abs(det)>tol16) then + dd=one/det + else + write(msg, '(2a,2x,9es16.8,a,a,es16.8,a)' )& + 'Attempting to invert real(8) 3x3 array',ch10,aa(:,:),ch10,' ==> determinant=',det,' is zero.' + ABI_BUG(msg) + end if + + ait(1,1) = t1 * dd + ait(2,1) = t2 * dd + ait(3,1) = t3 * dd + ait(1,2) = (aa(3,1)*aa(2,3)-aa(2,1)*aa(3,3)) * dd + ait(2,2) = (aa(1,1)*aa(3,3)-aa(3,1)*aa(1,3)) * dd + ait(3,2) = (aa(2,1)*aa(1,3)-aa(1,1)*aa(2,3)) * dd + ait(1,3) = (aa(2,1)*aa(3,2)-aa(3,1)*aa(2,2)) * dd + ait(2,3) = (aa(3,1)*aa(1,2)-aa(1,1)*aa(3,2)) * dd + ait(3,3) = (aa(1,1)*aa(2,2)-aa(2,1)*aa(1,2)) * dd + +end subroutine matr3inv +!!*** + +!!****f* m_symtk/symdet +!! NAME +!! symdet +!! +!! FUNCTION +!! Compute determinant of each input symmetry matrix sym(3,3,i) +!! and check that the determinant is always +/- 1. Integer arithmetic. +!! +!! INPUTS +!! nsym=number of symmetry operations +!! sym(3,3,nsym)=integer symmetry array +!! +!! OUTPUT +!! determinant(nsym)=determinant of each symmetry operation +!! +!! SOURCE + +subroutine symdet(determinant, nsym, sym) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: nsym +!arrays + integer,intent(in) :: sym(3,3,nsym) + integer,intent(out) :: determinant(nsym) + +!Local variables------------------------------- +!scalars + integer :: det,isym + character(len=500) :: msg + +! ************************************************************************* + + do isym=1,nsym + call mati3det(sym(:,:,isym),det) + determinant(isym)=det + if (abs(det)/=1) then + write(msg,'(2(a,i0), 5a)')& + 'Abs(determinant) for symmetry number ',isym,' is ',det,' .',ch10,& + 'For a legitimate symmetry, abs(determinant) must be 1.',ch10,& + 'Action: check your symmetry operations (symrel) in input file.' + ABI_ERROR(msg) + end if + end do + +end subroutine symdet +!!*** + +!!****f* m_symtk/chkgrp +!! NAME +!! chkgrp +!! +!! FUNCTION +!! Checks that a set of input symmetries constitutes a group. +!! +!! INPUTS +!! nsym = number of symmetry operations +!! symafm = (anti)ferromagnetic part of symmetry operations +!! symrel = 3D matrix containg symmetry operations +!! +!! OUTPUT +!! ierr=Status error. +!! +!! TODO +!! SHOULD ALSO CHECK THE tnons ! +!! +!! SOURCE + +subroutine chkgrp(nsym, symafm, symrel, ierr) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: nsym + integer,intent(out) :: ierr +!arrays + integer,intent(in) :: symafm(nsym),symrel(3,3,nsym) + +!Local variables------------------------------- +!scalars + integer :: isym, jsym, ksym, symafmchk, testeq, print_warning + logical :: found_inv + character(len=500) :: msg +!arrays + integer :: chk(3,3) + +! ************************************************************************* + +!DEBUG +!write(std_out,*)' chkgrp : enter' +!write(std_out,*)' isym symrel symafm ' +!do isym=1,nsym +!write(std_out,'(i3,a,9i3,a,i3)' )isym,' ',symrel(:,:,isym),' ',symafm(isym) +!end do +!ENDDEBUG + + ierr = 0 + print_warning = 1 + + ! 1) Identity must be the first symmetry. + if (ANY(symrel(:,:,1) /= identity_3d .or. symafm(1)/=1 )) then + ABI_WARNING("First operation must be the identity operator") + ierr = ierr + 1 + end if + + ! 2) The inverse of each element must belong to the group. + do isym=1,nsym + call mati3inv(symrel(:,:,isym), chk) + chk = transpose(chk) + found_inv = .FALSE. + do jsym=1,nsym + if (all(symrel(:,:,jsym) == chk) .and. (symafm(jsym) * symafm(isym) == 1)) then + found_inv = .TRUE.; EXIT + end if + end do + + if (.not. found_inv) then + write(msg,'(a,i0,2a)')& + "Cannot find the inverse of symmetry operation ",isym,ch10,& + "Input symmetries do not form a group!" + ABI_WARNING(msg) + ierr = ierr + 1 + end if + end do + + ! Check closure under composition. + do isym=1,nsym + do jsym=1,nsym + + ! Compute the product of the two symmetries + chk = MATMUL(symrel(:,:,jsym), symrel(:,:,isym)) + symafmchk = symafm(jsym) * symafm(isym) + + ! Check that product array is one of the original symmetries. + do ksym=1,nsym + testeq = 1 + if ( ANY(chk/=symrel(:,:,ksym) )) testeq = 0 +#if 0 + ! FIXME this check make v4/t26 and v4/t27 fails. + ! The rotational part is in the group but with different magnetic part! + if (symafmchk /= symafm(ksym)) testeq=0 +#endif + if (testeq==1) exit ! The test is positive + end do + + if (testeq == 0 .and. print_warning == 1) then + ! The test is negative + write(msg, '(a,2i3,a,9a)' )& + 'Product of symmetries',isym,jsym,' is not in group.',ch10,& + 'This indicates that the input symmetry elements',ch10,& + 'do not possess closure under group composition.',ch10,& + 'ABINIT might stop with an ERROR after trying to correct and making a few more checks.',ch10,& + 'Action: check symrel, symafm and possibly atomic positions, and fix them.' + ABI_WARNING(msg) + ierr = ierr + 1 + print_warning = 0 + end if + + end do ! jsym + end do ! isym + +end subroutine chkgrp +!!*** + +!!****f* m_symtk/sg_multable +!! NAME +!! sg_multable +!! +!! FUNCTION +!! Checks that a set of input symmetries constitutes a group. +!! Treat reasonably well large set of symmetries, where pure translations are present. +!! The translations are optional. This allows to test symrec. +!! +!! INPUTS +!! nsym=number of symmetry operations +!! symafm(nsym)=(anti)ferromagnetic part of symmetry operations +!! symrel(3,3,nsym)=symmetry operations in real space. +!! tnons(3,nsym) [optional]=Fractional translations. +!! tnons_tol [optional]= tolerance on the match for tnons +!! +!! OUTPUT +!! ierr=Status error. A non-zero value signals failure. +!! [multable(4,nsym,nsym)]= Optional output. +!! multable(1,sym1,sym2) gives the index of the symmetry product S1 * S2 in the symrel array. 0 if not found. +!! multable(2:4,sym1,sym2)= the lattice vector that has to added to the fractional translation +!! of the operation of index multable(1,sym1,sym2) to obtain the fractional translation of the product S1 * S2. +!! [toinv(4,nsym)]= Optional output. +!! toinv(1,sym1)=Gives the index of the inverse of the symmetry operation. +!! S1 * S1^{-1} = {E, L} with E the identity and L a real-space lattice vector. +!! toinv(2:4,sym1)=The lattice vector L +!! Note that toinv can be easily obtained from multable but sometimes we do not need the full table. +!! +!! TODO +!! This improved version should replace chkgrp. +!! +!! SOURCE + + subroutine sg_multable(nsym, symafm, symrel, ierr, & +& tnons, tnons_tol, multable, toinv) ! optional + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: nsym + integer,intent(out) :: ierr + real(dp),optional,intent(in) :: tnons_tol +!arrays + integer,intent(in) :: symafm(nsym),symrel(3,3,nsym) + integer,optional,intent(out) :: multable(4,nsym,nsym), toinv(4,nsym) + real(dp),optional,intent(in) :: tnons(3,nsym) + +!Local variables------------------------------- +!scalars + integer :: echo,found,ilist_symrel,nptsymm,prd_symafm,prd_ptsymm,ptsymm1,ptsymm2,ptsymm3 + integer :: sym1,sym2,sym3 + !integer :: isym + real(dp) :: tnons_tol_ + logical :: found_inv,iseq + character(len=500) :: msg +!arrays + integer :: nlist_symrel(48),prd_symrel(3,3),ptmultable(48,48),ptsymrel(3,3,48) + integer,allocatable :: ptsymm(:),list_symrel(:,:) + real(dp) :: prd_tnons(3) + real(dp),allocatable :: tnons_(:,:) + +! ************************************************************************* + +!DEBUG +!write(std_out,*)' m_symtk%sg_multable : enter, nsym= ',nsym +!ENDDEBUG + + ierr = 0 + + ABI_MALLOC(tnons_,(3,nsym)) + if(present(tnons))then + tnons_=tnons + else + tnons_=zero + endif + if(present(tnons_tol))then + tnons_tol_=tnons_tol + else + tnons_tol_=tol5 + endif + + ! 1) Identity must be the first symmetry. Do not check if tnons_ == 0 as cell might not be primitive. + if (any(symrel(:,:,1) /= identity_3d .or. symafm(1) /= 1)) then + ABI_WARNING("First operation must be the identity operator") + ierr = ierr + 1 + end if + + ! 2) The inverse of each element must belong to the group. + echo = 1 + do sym1=1,nsym + found_inv = .FALSE. + do sym2=1,nsym + prd_symrel = matmul(symrel(:,:,sym1), symrel(:,:,sym2)) + prd_tnons = tnons_(:,sym1) + matmul(symrel(:,:,sym1), tnons_(:,sym2)) + prd_symafm = symafm(sym1)*symafm(sym2) + if ( all(prd_symrel == identity_3d) .and. isinteger(prd_tnons, tnons_tol_) .and. prd_symafm == 1 ) then + found_inv = .TRUE. + if (present(toinv)) then + toinv(1, sym1) = sym2; toinv(2:4, sym1) = nint(prd_tnons) + end if + exit + end if + end do + + if (.not. found_inv) then + if(echo == 1) then + write(msg,'(a,i0,2a)')& + "Cannot find the inverse of symmetry operation ",sym1,ch10,& + "Input symmetries do not form a group " + ABI_WARNING(msg) + echo = 0 + endif + ierr = ierr + 1 + exit + end if + end do + + ! 3) + !In order to avoid potential cubic scaling with number of atoms, in exotic cases, with large prefactor, + !set up lookup table for the point symmetry part of the symmetry operations. + !Still cubic, but with a reduced prefactor. To fully eliminate cubic scaling, should + !set up lookup table for the tnons_ as well. + + ABI_MALLOC(list_symrel,(nsym,48)) + ABI_MALLOC(ptsymm,(nsym)) + + nlist_symrel(:)=0 + ! Initialize with the first symmetry operation + ptsymrel(1:3,1:3,1)=symrel(:,:,1) + ptsymm(1)=1 + nptsymm=1 + list_symrel(1,1)=1 + nlist_symrel(1)=1 + !If more than one symmetry operation, then loop on the other ones, find whether the ptsymm has already been found, + !or create one new item in the list + if(nsym/=1)then + do sym1=2,nsym + found=0 + do ptsymm2=1,nptsymm + if(all(symrel(:,:,list_symrel(1,ptsymm2)) == symrel(:,:,sym1)))then + ptsymm(sym1)=ptsymm2 ; found=1 + nlist_symrel(ptsymm2)=nlist_symrel(ptsymm2)+1 + list_symrel(nlist_symrel(ptsymm2),ptsymm2)=sym1 + cycle + endif + enddo + if(found==0)then + nptsymm=nptsymm+1 +!DEBUG +! write(std_out,*)' current value of nptsymm, sym1=',nptsymm, sym1 +!ENDDEBUG + ptsymrel(1:3,1:3,nptsymm)=symrel(:,:,sym1) + ptsymm(sym1)=nptsymm + nlist_symrel(nptsymm)=1 + list_symrel(1,nptsymm)=sym1 + endif + enddo + endif + + !Check that each point symmetry is associated to the same number of translations + if(nptsymm/=1)then + do ptsymm1=1,nptsymm + if(nlist_symrel(ptsymm1)/=nlist_symrel(1))then + write(msg, '(9a)' )& +& 'The number of translations (and possibly symafm) associated to the same symrel',ch10,& +& 'is not the same for all point symmetries',ch10,& +& 'This indicates that the input symmetry elements',ch10,& +& 'do not possess closure under group composition.',ch10,& +& 'Action: check symrel, symafm and fix them.' + ABI_WARNING(msg) + echo = 0 + ierr = ierr + 1 + if (present(multable)) then + multable(1,:,:) = 0; multable(2:4,:,:) = huge(0) + end if + exit + endif + enddo + endif + +!DEBUG +! write(std_out,*)' final value of nptsymm=',nptsymm +!ENDDEBUG + + ! 4) + !Check closure under composition and construct multiplication table of ptsymrel + echo = 1 + do ptsymm1=1,nptsymm + sym1=list_symrel(1,ptsymm1) + do ptsymm2=1,nptsymm + sym2=list_symrel(1,ptsymm2) + ! Compute the product of the two symmetries. + prd_symrel = matmul(symrel(:,:,sym1), symrel(:,:,sym2)) + ! Check that product array is one of the original point symmetries. + iseq= .false. + do ptsymm3=1,nptsymm + iseq= all(prd_symrel == symrel(:,:,list_symrel(1,ptsymm3) )) + if(iseq)then + ptmultable(ptsymm1,ptsymm2) = ptsymm3 + exit + endif + end do + if (.not. iseq .and. echo == 1) then + if (echo == 1)then + ! The test is negative + prd_symafm = symafm(sym1) * symafm(sym2) + prd_tnons = tnons_(:, sym1) + matmul(symrel(:,:,sym1), tnons_(:,sym2)) + write(msg, '(a,2(i0,1x),2a,3i3,f11.6,i3,a,2(3i3,f11.6,a),5a)' )& + 'Product of symmetries:',sym1,sym2,' is not in group.',ch10,& + prd_symrel(1,1:3),prd_tnons(1),prd_symafm,ch10,& + prd_symrel(2,1:3),prd_tnons(2),ch10,& + prd_symrel(3,1:3),prd_tnons(3),ch10,& + 'This indicates that the input symmetry elements',ch10,& + 'do not possess closure under group composition.',ch10,& + 'Action: check symrel, symafm and fix them.' + ABI_WARNING(msg) + echo = 0 + endif + ierr = ierr + 1 + if (present(multable)) then + multable(1, sym1, sym2) = 0; multable(2:4, sym1, sym2) = huge(0) + end if + exit + end if + + end do ! ptsymm2 + +!DEBUG +! write(std_out,*)' ptmultable for ptsymm1=',ptsymm1,' by batch of 16 values ' +! write(std_out,'(16i3)')ptmultable(ptsymm1,1:16) +! write(std_out,'(16i3)')ptmultable(ptsymm1,17:32) +! write(std_out,'(16i3)')ptmultable(ptsymm1,33:48) +!ENDDEBUG + + if (echo == 0) exit + end do ! ptsymm1 + + ! 5) + ! Check closure under composition and construct multiplication table. + ! However, does this only if the ptgroup has been successfull. + if(echo/=0 .and. ierr==0)then + do sym1=1,nsym + ptsymm1=ptsymm(sym1) + do sym2=1,nsym + ptsymm2=ptsymm(sym2) + + !The equal number of translations for each point symmetry has been checked earlier. + !If the full table is not requested, it is now sufficient to check that + !the product of all symmetry operations sym1 with a pure translation (ptsymm=1), or with one of the instances + !for each point symmetries is indeed present in the table. + !This is done to save CPU time when the number of symmetry operations is bigger than 384. + + if (nsym>384 .and. .not.(present(multable))) then + if(ptsymm2/=1 .and. sym2/=list_symrel(1,ptsymm2))then + cycle + endif + end if + + !DEBUG + !if(ptsymm2<1 .or. ptsymm2>48)then + !write(std_out,*)' sym1,sym2,ptsymm1,ptsymm2=',sym1,sym2,ptsymm1,ptsymm2 + !endif + !ENDDEBUG + + ! Compute the product of the two symmetries. Convention {A,a} {B,b} = {AB, a + Ab} +! prd_symrel = matmul(symrel(:,:,sym1), symrel(:,:,sym2)) + prd_ptsymm=ptmultable(ptsymm1,ptsymm2) + prd_symrel=ptsymrel(:,:,prd_ptsymm) + prd_symafm = symafm(sym1) * symafm(sym2) + prd_tnons = tnons_(:, sym1) + matmul(symrel(:,:,sym1), tnons_(:,sym2)) + !DEBUG + !write(std_out,*)' prd_ptsymm,prdsymrel=',prd_ptsymm,prd_symrel + !DEBUG + + ! Check that product array is one of the original symmetries. + ! Only explore those symmetries that have a symrel that is the product of the two symrel of sym1 and sym2. + iseq = .False. + do ilist_symrel=1,nlist_symrel(prd_ptsymm) + sym3=list_symrel(ilist_symrel,prd_ptsymm) + iseq = isinteger(prd_tnons(1) - tnons_(1,sym3), tnons_tol_) + if(iseq)then + iseq = isinteger(prd_tnons(2) - tnons_(2,sym3), tnons_tol_) + if(iseq)then + iseq = isinteger(prd_tnons(3) - tnons_(3,sym3), tnons_tol_) + if(iseq)then + iseq = (prd_symafm == symafm(sym3)) + if(iseq)then + ! The test is positive + if (present(multable)) then + multable(1,sym1,sym2) = sym3; multable(2:4,sym1,sym2) = nint(prd_tnons - tnons_(:,sym3)) + end if + exit + endif + endif + endif + endif + end do + if (.not. iseq .and. echo == 1) then + if (echo == 1)then + ! The test is negative + write(msg, '(a,2(i0,1x),2a,3i3,f11.6,i3,a,2(3i3,f11.6,a),5a)' )& + 'Product of symmetries:',sym1,sym2,' is not in group.',ch10,& + prd_symrel(1,1:3),prd_tnons(1),prd_symafm,ch10,& + prd_symrel(2,1:3),prd_tnons(2),ch10,& + prd_symrel(3,1:3),prd_tnons(3),ch10,& + 'This indicates that the input symmetry elements',ch10,& + 'do not possess closure under group composition.',ch10,& + 'Action: check symrel, symafm and fix them.' + ABI_WARNING(msg) + echo = 0 + endif + ierr = ierr + 1 + if (present(multable)) then + multable(1, sym1, sym2) = 0; multable(2:4, sym1, sym2) = huge(0) + end if + exit + end if + end do ! sym2 + if (echo == 0) exit + end do ! sym1 + else + if (present(multable)) then + do sym1=1,nsym + do sym2=1,nsym + multable(1, sym1, sym2) = 0; multable(2:4, sym1, sym2) = huge(0) + enddo + enddo + endif + endif + + ABI_FREE(list_symrel) + ABI_FREE(ptsymm) + ABI_FREE(tnons_) + +!DEBUG +!write(std_out,*)' m_symtk%sg_multable : exit ' +!ENDDEBUG + + end subroutine sg_multable +!!*** + +!!****f* m_symtk/chkorthsy +!! NAME +!! chkorthsy +!! +!! FUNCTION +!! Check the orthogonality of the symmetry operations +!! (lengths and absolute values of scalar products should be preserved) +!! +!! INPUTS +!! gprimd(3,3)=dimensional primitive transl. for reciprocal space (bohr**-1) +!! rmet=Real space metric. +!! nsym=actual number of symmetries +!! rprimd(3,3)=dimensional primitive translations for real space (bohr) +!! symrel(3,3,1:nsym)=symmetry operations in real space in terms of primitive translations +!! tolsym=defines the tolerance on the orthogonality, after multiplication by 2. +!! +!! SIDE EFFECTS +!! iexit= if 0 at input, will do the check, and stop if there is a problem, return 0 if no problem +!! if 1 at input, will always output, return 0 if no problem, -1 if there is a problem, +!! also, suppresses printing of problem +!! +!! SOURCE + +subroutine chkorthsy(gprimd,iexit,nsym,rmet,rprimd,symrel,tolsym) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: nsym + integer,intent(inout) :: iexit + real(dp),intent(in) :: tolsym +!arrays + integer,intent(in) :: symrel(3,3,nsym) + real(dp),intent(in) :: gprimd(3,3),rmet(3,3),rprimd(3,3) + +!Local variables------------------------------- +!scalars + integer :: ii,isym,jj + real(dp) :: residual,rmet2 + character(len=500) :: msg +!arrays + real(dp) :: prods(3,3),rmet_sym(3,3),rprimd_sym(3,3) + +! ************************************************************************* + +!DEBUG +!write(std_out,'(a,i3)') ' chkorthsy : enter, iexit= ',iexit +!write(std_out,'(a,i3)') ' nsym=',nsym +!do isym=1,nsym +! write(std_out,'(9i4)')symrel(:,:,isym) +!enddo +!write(std_out, '(a)') ' Matrix rprimd :' +!do ii=1,3 +! write(std_out, '(3es16.8)')rprimd(:,ii) +!enddo +!write(std_out, '(a)') ' Matrix rmet :' +!do ii=1,3 +! write(std_out, '(3es16.8)')rmet(:,ii) +!enddo +!ENDDEBUG + + rmet2=zero + do ii=1,3 + do jj=1,3 + rmet2=rmet2+rmet(ii,jj)**2 + end do + end do + +!Loop over all symmetry operations + do isym=1,nsym + +!DEBUG +!write(std_out,'(a,a,i4)') ch10,' Check for isym=',isym +!ENDDEBUG + +! Compute symmetric of primitive vectors under point symmetry operations + do ii=1,3 + rprimd_sym(:,ii)=symrel(1,ii,isym)*rprimd(:,1)+& + symrel(2,ii,isym)*rprimd(:,2)+& + symrel(3,ii,isym)*rprimd(:,3) + end do + +! If the new lattice is the same as the original one, +! the lengths and angles are preserved + do ii=1,3 + rmet_sym(ii,:)=rprimd_sym(1,ii)*rprimd_sym(1,:)+& + rprimd_sym(2,ii)*rprimd_sym(2,:)+& + rprimd_sym(3,ii)*rprimd_sym(3,:) + end do + + residual=zero + do ii=1,3 + do jj=1,3 + residual=residual+(rmet_sym(ii,jj)-rmet(ii,jj))**2 + end do + end do + + if(sqrt(residual) > four*tolsym*sqrt(rmet2))then + if(iexit==0)then + write(std_out, '(a)') ' Matrix rprimd :' + do ii=1,3 + write(std_out, '(3es16.8)')rprimd(:,ii) + enddo + write(std_out, '(a)') ' Matrix rmet :' + do ii=1,3 + write(std_out, '(3es16.8)')rmet(:,ii) + enddo + write(std_out, '(a)') ' Matrix rprimd_sym :' + do ii=1,3 + write(std_out, '(3es16.8)')rprimd_sym(:,ii) + enddo + write(std_out, '(a)') ' Matrix rmet_sym :' + do ii=1,3 + write(std_out, '(3es16.8)')rmet_sym(:,ii) + enddo + write(std_out, '(a)') ' Matrix rmet_sym-rmet :' + do ii=1,3 + write(std_out, '(3es16.8)')(rmet_sym(:,ii)-rmet(:,ii)) + enddo + write(msg, '(a,i0,5a,es12.4,a,es12.4,6a)' )& + 'The symmetry operation number ',isym,' does not preserve',ch10,& + 'vector lengths and angles.',ch10,& + 'The value of the square root of residual is: ',sqrt(residual),& +& ' that is greater than threshold:', four*tolsym*sqrt(rmet2),ch10,& + 'Action: modify rprim, acell and/or symrel so that',ch10,& + 'vector lengths and angles are preserved.',ch10,& + 'Beware, the tolerance on symmetry operations is very small.' + ABI_ERROR(msg) + else + iexit=-1 + end if + end if + +! Also, the scalar product of rprimd_sym and gprimd must give integer numbers + do ii=1,3 + prods(ii,:)=rprimd_sym(1,ii)*gprimd(1,:)+ & + rprimd_sym(2,ii)*gprimd(2,:)+ & + rprimd_sym(3,ii)*gprimd(3,:) + end do + + do ii=1,3 + do jj=1,3 + residual=prods(ii,jj)-anint(prods(ii,jj)) + if(abs(residual)>two*tolsym)then + if(iexit==0)then + write(msg, '(a,i0,5a,es12.4,a,es12.4,4a)' )& + 'The symmetry operation number ',isym,' generates',ch10,& + 'a different lattice.',ch10,& + 'The value of the residual is: ',residual, 'that is greater than the threshold:', two*tolsym, ch10,& + 'Action: modify rprim, acell and/or symrel so that',ch10,& + 'the lattice is preserved.' + ABI_ERROR(msg) + else + iexit=-1 + end if + end if + end do + end do + + if(iexit==-1) exit + end do ! isym + + if(iexit==1)iexit=0 + +!DEBUG +!write(std_out,'(a)') ' chkorthsy : exit ' +!ENDDEBUG + +end subroutine chkorthsy +!!*** + +!!****f* m_symtk/chkprimit +!! NAME +!! chkprimit +!! +!! FUNCTION +!! Check whether the cell is primitive or not. +!! If chkprim/=0 and the cell is non-primitive, stops. +!! +!! INPUTS +!! chkprim= if non-zero, check that the unit cell is primitive. +!! nsym=actual number of symmetries +!! symafm(nsym)= (anti)ferromagnetic part of symmetry operations +!! symrel(3,3,nsym)= nsym symmetry operations in real space in terms +!! of primitive translations +!! +!! OUTPUT +!! multi=multiplicity of the unit cell +!! translation(nsym)= (optional) set to 1 if the symetry operation is a pure translation +!! +!! SOURCE + +subroutine chkprimit(chkprim, multi, nsym, symafm, symrel, is_translation) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: chkprim,nsym + integer,intent(out) :: multi +!arrays + integer,intent(in) :: symafm(nsym),symrel(3,3,nsym) + integer,intent(out),optional :: is_translation(nsym) + +!Local variables------------------------------- +!scalars + integer :: isym + character(len=500) :: msg + +!************************************************************************** + + if(present(is_translation))then + is_translation(:)=0 + endif + +!Loop over each symmetry operation of the Bravais lattice +!Find whether it is the identity, or a pure translation, +!without change of sign of the spin + multi=0 + do isym=1,nsym + if( abs(symrel(1,1,isym)-1)+& +& abs(symrel(2,2,isym)-1)+& +& abs(symrel(3,3,isym)-1)+& +& abs(symrel(1,2,isym))+abs(symrel(2,1,isym))+& +& abs(symrel(2,3,isym))+abs(symrel(3,2,isym))+& +& abs(symrel(3,1,isym))+abs(symrel(1,3,isym))+& +& abs(symafm(isym)-1) == 0 )then + multi=multi+1 + if(present(is_translation))then + is_translation(isym)=1 + endif + end if + end do + +!Check whether the cell is primitive + if(multi>1)then + if(chkprim>0)then + write(msg,'(a,a,a,i0,a,a,a,a,a,a,a,a,a)')& + 'According to the symmetry finder, the unit cell is',ch10,& + 'NOT primitive. The multiplicity is ',multi,' .',ch10,& + 'The use of non-primitive unit cells is allowed',ch10,& + 'only when the current chkprim is 0.',ch10,& + 'Action: either change your unit cell (rprim or angdeg),',ch10,& + 'or set chkprim to 0.' + ABI_ERROR(msg) + else if(chkprim==0)then + write(msg,'(3a,i0,a,a,a)')& + 'According to the symmetry finder, the unit cell is',ch10,& + 'not primitive, with multiplicity= ',multi,'.',ch10,& + 'This is allowed, as the current chkprim is 0.' + ABI_COMMENT(msg) + end if + end if + +end subroutine chkprimit +!!*** + +!!****f* m_symtk/symrelrot +!! NAME +!! symrelrot +!! +!! FUNCTION +!! Transform the symmetry matrices symrel expressed in the coordinate system rprimd, +!! to symmetry matrices symrel expressed in the new coordinate system rprimd_new +!! +!! INPUTS +!! nsym=number of symmetries +!! rprimd(3,3)=dimensional primitive translations for real space (bohr) +!! rprimd_new(3,3)=new dimensional primitive translations for real space (bohr) +!! +!! OUTPUT +!! (see side effects) +!! +!! SIDE EFFECTS +!! Input/Output +!! ierr= (at input) if present, will deal with error code outside of the routine. +!! (at output) return 0 if no problem, 1 otherwise +!! symrel(3,3,nsym)=symmetry operations in real space in terms +!! of primitive translations rprimd at input and rprimd_new at output +!! +!! SOURCE + +subroutine symrelrot(nsym, rprimd, rprimd_new, symrel, tolsym, ierr) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: nsym + integer,intent(inout),optional :: ierr + real(dp),intent(in) :: tolsym +!arrays + integer,intent(inout) :: symrel(3,3,nsym) + real(dp),intent(in) :: rprimd(3,3),rprimd_new(3,3) + +!Local variables------------------------------- +!scalars + integer :: ierr_,ii,isym,jj + real(dp) :: val + character(len=500) :: msg +!arrays + integer :: symrel_tmp(3,3,nsym) + real(dp) :: coord(3,3),coordinvt(3,3),matr1(3,3),matr2(3,3),rprimd_invt(3,3) + +!************************************************************************** + + ierr_=0 + +!Compute the coordinates of rprimd_new in the system defined by rprimd(:,:) + call matr3inv(rprimd,rprimd_invt) + do ii=1,3 + coord(:,ii)=rprimd_new(1,ii)*rprimd_invt(1,:)+ & +& rprimd_new(2,ii)*rprimd_invt(2,:)+ & +& rprimd_new(3,ii)*rprimd_invt(3,:) + end do + +!Transform symmetry matrices in the system defined by rprimd_new + call matr3inv(coord,coordinvt) + do isym=1,nsym + do ii=1,3 + matr1(:,ii)=symrel(:,1,isym)*coord(1,ii)+& +& symrel(:,2,isym)*coord(2,ii)+& +& symrel(:,3,isym)*coord(3,ii) + end do + do ii=1,3 + matr2(:,ii)=coordinvt(1,:)*matr1(1,ii)+& +& coordinvt(2,:)*matr1(2,ii)+& +& coordinvt(3,:)*matr1(3,ii) + end do + +!DEBUG +! write(std_out, '(a,10i4)')' symrelrot : isym, symrel=',isym,symrel(:,:,isym) +! write(std_out, '(a,9es16.6)')' transformed to ', matr2(:,:) +!ENDDEBUG + +! Check that the new symmetry matrices are made of integers, and store them + do ii=1,3 + do jj=1,3 + val=matr2(ii,jj) +! Need to allow for ten times tolsym, in case of centered Bravais lattices (but do it for all lattices ...) + if(abs(val-nint(val))>ten*tolsym)then + ierr_=1 + if(.not.(present(ierr))) then + write(msg,'(2a,a,i3,a,a,3es14.6,a,a,3es14.6,a,a,3es14.6)')& + 'One of the components of symrel is non-integer within 10*tolsym,',ch10,& + ' for isym=',isym,ch10,& + ' symrel=',matr2(:,1),ch10,& + ' ',matr2(:,2),ch10,& + ' ',matr2(:,3) + ABI_ERROR_CLASS(msg, "TolSymError") + endif + end if + symrel_tmp(ii,jj,isym)=nint(val) + end do + end do + end do ! isym + + if(ierr_==0)then +! Upgrade symrel only if there is no error + symrel(:,:,:)=symrel_tmp(:,:,:) + endif + + if(present(ierr))then + ierr=ierr_ + endif + +end subroutine symrelrot +!!*** + +!!****f* m_symtk/littlegroup_q +!! NAME +!! littlegroup_q +!! +!! FUNCTION +!! Determines the symmetry operations by which reciprocal vector q is preserved, +!! modulo a primitive reciprocal lattice vector, and the time-reversal symmetry. +!! +!! INPUTS +!! nsym=number of space group symmetries +!! qpt(3)= vector in reciprocal space +!! symrec(3,3,nsym)=3x3 matrices of the group symmetries (reciprocal space) +!! [prtvol]=integer flag defining the verbosity of output. =0 if no output is provided. +!! prtgkk= integer flag. If 1 provide output of electron-phonon "gkk" matrix elements, for further +!! treatment by mrggkk utility or anaddb utility. If 0 no output is provided. +!! +!! OUTPUT +!! symq(4,2,nsym)= three first numbers define the G vector; +!! fourth number is zero if the q-vector is not preserved, 1 otherwise +!! second index is one without time-reversal symmetry, two with time-reversal symmetry +!! timrev=1 if the time-reversal symmetry preserves the wavevector, +!! modulo a reciprocal lattice vector (in principle, see below). +!! +!! NOTES +!! The condition is: +!! +!! $q = O S(q) - G$ +!! +!! with O being either the identity or the time reversal symmetry (= inversion in reciprocal space) +!! and G being a primitive vector of the reciprocal lattice. +!! If the time-reversal (alone) also preserves q, modulo a lattice vector, then timrev is set to 1, otherwise 0. +!! +!! TODO +!! timrev is put to 1 only for Gamma. +!! Better handling should be provided in further version. +!! +!! SOURCE + +subroutine littlegroup_q(nsym,qpt,symq,symrec,symafm,timrev,prtvol,use_sym) + +!Arguments ------------------------------- +!scalars + integer,intent(in) :: nsym + integer,intent(in),optional :: prtvol,use_sym + integer,intent(out) :: timrev +!arrays + integer,intent(in) :: symrec(3,3,nsym), symafm(nsym) + integer,intent(out) :: symq(4,2,nsym) + real(dp),intent(in) :: qpt(3) + +!Local variables ------------------------- +!scalars + integer :: ii,isign,isym,itirev,my_prtvol + real(dp),parameter :: tol=2.d-8 + real(dp) :: reduce + character(len=500) :: msg +!arrays + real(dp) :: difq(3),qsym(3),shift(3) + +! ********************************************************************* + + my_prtvol=0; if (PRESENT(prtvol)) my_prtvol=prtvol + +! Initialise the array symq + symq = 0 + + isym = symafm(1) ! just to fool abirules and use symafm for the moment + + do isym=1,nsym + ! if (symafm(isym) /= 1) cycle ! skip afm symops + ! TODO: check how much of the afm syms are coded in the rf part of the code. cf + ! test v3 / 12 + do itirev=1,2 + isign=3-2*itirev ! isign is 1 without time-reversal, -1 with time-reversal + + ! Get the symmetric of the vector + do ii=1,3 + qsym(ii)=qpt(1)*isign*symrec(ii,1,isym)& + +qpt(2)*isign*symrec(ii,2,isym)& + +qpt(3)*isign*symrec(ii,3,isym) + end do + + ! Get the difference between the symmetric and the original vector + symq(4,itirev,isym)=1 + do ii=1,3 + difq(ii)=qsym(ii)-qpt(ii) + ! Project modulo 1 in the interval ]-1/2,1/2] such that difq = reduce + shift + call wrap2_pmhalf(difq(ii),reduce,shift(ii)) + if(abs(reduce)>tol)symq(4,itirev,isym)=0 + end do + + ! SP: When prtgkk is asked (GKK matrix element will be output), one has to + ! disable symmetries. There is otherwise a gauge problem with the unperturbed + ! and the perturbed wavefunctions. This leads to a +- 5% increase in computational + ! cost but provide the correct GKKs (i.e. the same as without the use of symmetries.) + + if (PRESENT(use_sym)) then + if (use_sym == 0) then + symq(4,itirev,isym)=0 + symq(4,itirev,1)=1 + end if + end if + + ! If the operation succeded, change shift from real(dp) to integer, then exit loop + if(symq(4,itirev,isym)/=0)then + if (my_prtvol>0) then + if(itirev==1)write(msg,'(a,i4,a)')' littlegroup_q : found symmetry',isym,' preserves q ' + if(itirev==2)write(msg,'(a,i4,a)')' littlegroup_q : found symmetry ',isym,' + TimeReversal preserves q ' + call wrtout(std_out,msg) + end if + ! Uses the mathematical function NINT = nearest integer + do ii=1,3 + symq(ii,itirev,isym)=nint(shift(ii)) + end do + end if + + end do !itirev + end do !isym + + ! Test time-reversal symmetry + timrev=1 + do ii=1,3 + ! Unfortunately, this version does not work yet ... + ! call wrap2_pmhalf(2*qpt(ii),reduce,shift(ii)) + ! if(abs(reduce)>tol)timrev=0 + ! So, this is left ... + if(abs(qpt(ii))>tol)timrev=0 + end do + + if(timrev==1.and.my_prtvol>0)then + write(msg, '(3a)' )& + ' littlegroup_q: able to use time-reversal symmetry. ',ch10,& + ' (except for gamma, not yet able to use time-reversal symmetry)' + call wrtout(std_out,msg) + end if + +end subroutine littlegroup_q +!!*** + +!!****f* m_symtk/matpointsym +!! NAME +!! matpointsym +!! +!! FUNCTION +!! For given order of point group, symmetrizes a 3x3 input matrix using the +!! point symmetry of the input atom +!! +!! INPUTS +!! iatom=index of atom to symmetrize around +!! natom=number of atoms in cell +!! nsym=order of group +!! rprimd(3,3)= real space primitive vectors +!! symrel(3,3,nsym)=symmetry operators in terms of action on primitive translations +!! tnons(3,nsym) = nonsymmorphic translations +!! xred(3,natom)=locations of atoms in reduced coordinates +!! +!! OUTPUT +!! +!! SIDE EFFECTS +!! mat3(3,3) = matrix to be symmetrized, in cartesian frame +!! +!! SOURCE + +subroutine matpointsym(iatom,mat3,natom,nsym,rprimd,symrel,tnons,xred) + + use m_linalg_interfaces + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: iatom,natom,nsym +!arrays + integer,intent(in) :: symrel(3,3,nsym) + real(dp),intent(in) :: rprimd(3,3),tnons(3,nsym),xred(3,natom) + real(dp),intent(inout) :: mat3(3,3) + +!Local variables------------------------------- +!scalars + integer :: cell_index,cell_indexp,ii,isym,nsym_point + real(dp) :: xreddiff +!arrays + integer :: symrel_it(3,3) + real(dp) :: mat3_tri(3,3),mat3_tri_sym(3,3),rprimd_inv(3,3),tmp_mat(3,3) + real(dp) :: xredp(3) + +!************************************************************************** + +!copy rprimd input and construct inverse + rprimd_inv = rprimd + call matrginv(rprimd_inv,3,3) + +!transform input mat3 to triclinic frame with rprimd^{-1} * mat3 * rprimd + call dgemm('N','N',3,3,3,one,rprimd_inv,3,mat3,3,zero,tmp_mat,3) + call dgemm('N','N',3,3,3,one,tmp_mat,3,rprimd,3,zero,mat3_tri,3) + +!loop over symmetry elements to obtain symmetrized input matrix + mat3_tri_sym = zero + nsym_point = 0 + do isym = 1, nsym + +! skip any nonsymmorphic symmetry elements, want to consider point elements only + if(dot_product(tnons(:,isym),tnons(:,isym))>tol8) cycle + +! for current symmetry element, find transformed reduced coordinates of target atom +! via xredp = symrel * xred + call dgemv('N',3,3,one,dble(symrel(:,:,isym)),3,xred(:,iatom),1,zero,xredp,1) + + +! shift xredp into the same unit cell as xred, for comparison +! label cells as 0..1:0 1..2:1 2..3:2 and -1..0:-1 -2..-1:-2 and so forth + do ii = 1, 3 + + cell_index = int(xred(ii,iatom)) + if(xred(ii,iatom) < zero) cell_index = cell_index - 1 + cell_indexp = int(xredp(ii)) + if(xredp(ii) < zero) cell_indexp = cell_indexp - 1 + + do while (cell_indexp < cell_index) + xredp(ii) = xredp(ii)+one + cell_indexp = cell_indexp + 1 + end do + do while (cell_indexp > cell_index) + xredp(ii) = xredp(ii)-one + cell_indexp = cell_indexp - 1 + end do + + end do + +! now compare xredp to xred + xreddiff = dot_product(xredp-xred(:,iatom),xredp-xred(:,iatom)) + + if (xreddiff < tol8) then + +! accumulate symrel^{-1}*mat3_tri*symrel into mat3_tri_sym iff xredp = xred + L, +! where is a lattice vector, so symrel leaves the target atom invariant + +! mati3inv gives the inverse transpose of symrel + call mati3inv(symrel(:,:,isym),symrel_it) + call dgemm('N','N',3,3,3,one,mat3_tri,3,dble(symrel(:,:,isym)),3,zero,tmp_mat,3) + call dgemm('T','N',3,3,3,one,dble(symrel_it),3,tmp_mat,3,one,mat3_tri_sym,3) + nsym_point = nsym_point + 1 + end if + + end do + +!normalize by number of point symmetry operations + mat3_tri_sym = mat3_tri_sym/dble(nsym_point) + +!transform mat3_tri_sym to cartesian frame with rprimd * mat3_tri_sym * rprimd^{-1} + + call dgemm('N','N',3,3,3,one,mat3_tri_sym,3,rprimd_inv,3,zero,tmp_mat,3) + call dgemm('N','N',3,3,3,one,rprimd,3,tmp_mat,3,zero,mat3,3) + +end subroutine matpointsym +!!*** + +!!****f* m_symtk/holocell +!! NAME +!! holocell +!! +!! FUNCTION +!! Examine whether the trial conventional cell described by cell_base +!! is coherent with the required holohedral group. +!! Possibly enforce the holohedry and modify the basis vectors. +!! Note: for iholohedry=4, the tetragonal axis is not required to be along the C axis. +!! +!! INPUTS +!! enforce= if 0, only check; if =1, enforce exactly the holohedry +!! iholohedry=required holohegral group (uses its absolute value, since when the multiplicity of the cell is +!! more than one, the sign of iholohedry is changed). +!! iholohedry=1 triclinic 1bar +!! iholohedry=2 monoclinic 2/m +!! iholohedry=3 orthorhombic mmm +!! iholohedry=4 tetragonal 4/mmm +!! iholohedry=5 trigonal 3bar m +!! iholohedry=6 hexagonal 6/mmm +!! iholohedry=7 cubic m3bar m +!! tolsym=tolerance for the symmetry operations +!! +!! OUTPUT +!! foundc=1 if the basis vectors supports the required holohedry ; =0 otherwise +!! +!! SIDE EFFECTS +!! cell_base(3,3)=basis vectors of the conventional cell (changed if enforce==1, otherwise unchanged) +!! +!! SOURCE + +subroutine holocell(cell_base,enforce,foundc,iholohedry,tolsym) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: enforce,iholohedry + integer,intent(out) :: foundc + real(dp),intent(in) :: tolsym +!arrays + real(dp),intent(inout) :: cell_base(3,3) + +!Local variables ------------------------------ +!scalars + integer :: allequal,ii,orth + real(dp):: aa,scprod1 + character(len=500) :: msg +!arrays + integer :: ang90(3),equal(3) + real(dp) :: length(3),metric(3,3),norm(3),rbasis(3,3),rconv(3,3),rconv_new(3,3) + real(dp) :: rnormalized(3,3),symmetrized_length(3) + +!************************************************************************** + + if(abs(iholohedry)<1 .or. abs(iholohedry)>7)then + write(msg, '(a,i0)' )& +& 'Abs(iholohedry) should be between 1 and 7, while iholohedry=',iholohedry + ABI_BUG(msg) + end if + + do ii=1,3 + metric(:,ii)=cell_base(1,:)*cell_base(1,ii)+& +& cell_base(2,:)*cell_base(2,ii)+& +& cell_base(3,:)*cell_base(3,ii) + end do + +!Examine the angles and vector lengths + ang90(:)=0 + if(metric(1,2)**21) then + +!DEBUG +! write(std_out,*) +! write(std_out,'(a,i4)') 'symmetrize_xred: enter, nsym=',nsym +! do iatom=1,natom +! write(std_out,'(a,i4,3es16.6)') 'iatom,xred=',iatom,xred(:,iatom) +! enddo +! do isym=1,nsym +! write(std_out,'(a,i4,9i3,3es16.6)') 'isym,symrel,tnons',isym,symrel(:,:,isym),tnons(:,isym) +! enddo +! write(std_out,*)' present(tnons_new),present(tolsym)=',present(tnons_new),present(tolsym) +! write(std_out,*) +!ENDDEBUG + + ABI_MALLOC(xredsym,(3,natom)) + xredsym(:,:)=xred(:,1:natom) + + if(present(indsym))then + +! Loop over atoms to determine new, symmetrized positions. + do iatom=1,natom + tsum(:)=0.0d0 +! +! Loop over symmetries + do isym=1,nsym +! atom ib is atom into which iatom is rotated by inverse of +! symmetry isym (inverse of symrel(mu,nu,isym)) + ib=indsym(4,isym,iatom) +! Find the reduced coordinates after translation=t(indsym)+transl + fc(:)=xred(:,ib)+dble(indsym(1:3,isym,iatom)) +! Compute [S * (x(indsym)+transl) ] + tnonsymmorphic + tt(:)=dble(symrel(:,1,isym))*fc(1)+& +& dble(symrel(:,2,isym))*fc(2)+& +& dble(symrel(:,3,isym))*fc(3)+ tnons(:,isym) + +! Average over nominally equivalent atomic positions + tsum(:)=tsum(:)+tt(:) + end do ! isym +! +! Set symmetrized result to sum over number of terms + xredsym(:,iatom)=tsum(:)/dble(nsym) + + end do ! iatom + endif ! present(indsym) + +!DEBUG +!do iatom=1,natom +! write(std_out,'(a,i4,3es20.10)') 'iatom,xredsym=',iatom,xredsym(:,iatom) +!enddo +!ENDDEBUG + +! Loop over symmetry operations to determine possibly new tnons, as well as symmetrized positions. + if(present(tolsym) .and. present(tnons_new) .and. present(fixed_mismatch) .and. present(mismatch_fft_tnons))then + fixed_mismatch=0 + mismatch_fft_tnons=0 + !The use of tolsym here is only to favor 0.5 over -0.5 + tnons_new(:,:)=tnons(:,:)-nint(tnons(:,:)-tolsym) + do isym=1,nsym + mismatch_fft_tnons_current=0 + do ii=1,3 + delta(:)=tnons(ii,isym)*mult(:) + delta(:)=delta(:)-nint(delta(:)) + ! Is there is a mismatch between FFT and isym for all multipliers ? + if( all(abs(delta(:))>tol8*mult(:)) ) mismatch_fft_tnons_current=1 + enddo + !Declare the first symmetry operation that induces a problem + if(mismatch_fft_tnons_current>0 .and. (mismatch_fft_tnons==0)) mismatch_fft_tnons=isym + + ! However, also try to propose a solution. + if(mismatch_fft_tnons_current==1)then + ! Compute the pseudo-inverse of symrel-1, then multiply tnons + mat(:,:)=zero; mat(1,1)=one; mat(2,2)=one; mat(3,3)=one + ! This is symrel-1 + mat(:,:)=symrel(:,:,isym)-mat(:,:) + do ii=1,3 + !Select the smallest modification tnons + delta(:)=tnons(ii,isym)*mult(:) + delta(:)=(delta(:)-nint(delta(:)))/mult(:) + xredshift(ii,1)=delta(1) + do jj=2,4 + if(abs(delta(jj))tol8*mult(:)) ) fixed_mismatch=0 + enddo + if(fixed_mismatch==0)exit + enddo + endif + if(fixed_mismatch==1)exit + endif ! mismatch_fft_tnons_current==1 + end do ! isym + if(mismatch_fft_tnons/=0)then + if(fixed_mismatch==1)then + do iatom=1,natom + xredsym(:,iatom)=xredsym(:,iatom)+xredshift(:,1) + enddo + endif + endif + +!DEBUG +! write(std_out,*) ' ' +! write(std_out,*) ' mismatch_fft_tnons, fixed_mismatch=',mismatch_fft_tnons, fixed_mismatch +! do iatom=1,natom +! write(std_out,'(a,i4,3es20.10)') ' iatom,xredsym=',iatom,xredsym(:,iatom) +! enddo +!ENDDEBUG + + endif ! present(tolsym) .and. present(tnons_new) + +! -------------------------------------------------------------- +! Will update the atomic positions only if it is worth to do so. + + transl(:)=xredsym(:,1)-nint(xredsym(:,1)) + +! Compute the smallest translation to an integer + do jj=2,natom + do ii=1,3 + diff=xredsym(ii,jj)-nint(xredsym(ii,jj)) + if (diff1e-13) transl(ii)=0.0 + end do + +! Execute translation + do jj=1,natom + do ii=1,3 + xredsym(ii,jj)=xredsym(ii,jj)-transl(ii) + end do + end do + +! Test if xredsym is too similar to xred +! Tolerance 1E-15 + dissimilar=.FALSE. + do jj=1,natom + do ii=1,3 + if (abs(xredsym(ii,jj)-xred(ii,jj))>1E-15) dissimilar=.TRUE. + end do + end do + + if (dissimilar) xred(:,:)=xredsym(:,:) + ABI_FREE(xredsym) + +! End condition of nsym/=1 + end if + +!DEBUG +!write(std_out,*) +!write(std_out,'(a)') 'symmetrize_xred : exit' +!do iatom=1,natom +! write(std_out,'(a,i4,3es20.10)') 'iatom,xred=',iatom,xred(:,iatom) +!enddo +!if(present(tnons_new))then +! do isym=1,nsym +! write(std_out,'(a,i4,9i3,3es20.10)') 'isym,symrel,tnons_new',isym,symrel(:,:,isym),tnons_new(:,isym) +! enddo +!endif +!write(std_out,*) +!ENDDEBUG + +end subroutine symmetrize_xred +!!*** + +!!****f* m_symtk/symchk +!! NAME +!! symchk +!! +!! FUNCTION +!! Symmetry checker for atomic coordinates. +!! Checks for translated atomic coordinate tratom(3) to agree +!! with some coordinate xred(3,iatom) where atomic types agree too. +!! All coordinates are "reduced", i.e. given in terms of primitive +!! reciprocal translations. +!! +!! INPUTS +!! natom=number of atoms in unit cell +!! tratom(3)=reduced coordinates for a single atom which presumably +!! result from the application of a symmetry operation to an atomic +!! coordinate +!! trtypat=type of atom (integer) translated to tratom +!! typat(natom)=types of all atoms in unit cell (integer) +!! xred(3,natom)=reduced coordinates for all atoms in unit cell +!! +!! OUTPUT +!! difmin(3)=minimum difference between apparently equivalent atoms +!! (give value separately for each coordinate)--note that value +!! may be NEGATIVE so take abs later if needed +!! eatom=atom label of atom which is SAME as tratom to within a primitive +!! cell translation ("equivalent atom") +!! transl(3)=primitive cell translation to make iatom same as tratom (integers) +!! +!! SOURCE + +subroutine symchk(difmin,eatom,natom,tratom,transl,trtypat,typat,xred) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: natom,trtypat + integer,intent(out) :: eatom +!arrays + integer,intent(in) :: typat(natom) + integer,intent(out) :: transl(3) + real(dp),intent(in) :: tratom(3),xred(3,natom) + real(dp),intent(out) :: difmin(3) + +!Local variables------------------------------- +!scalars + integer :: iatom,jatom,trans1,trans2,trans3 + real(dp) :: test,test1,test2,test3,testmn + +! ************************************************************************* + +!DEBUG +! write(std_out,'(a,a,i4,3f18.12)') ch10,' symchk : enter, trtypat,tratom=',trtypat,tratom +!ENDDEBUG + +!Start testmn out at large value + testmn=1000000.d0 + +!Loop through atoms-- +!when types agree, check for agreement after primitive translation + jatom=1 + do iatom=1,natom + if (trtypat/=typat(iatom)) cycle + +! Check all three components + test1=tratom(1)-xred(1,iatom) + test2=tratom(2)-xred(2,iatom) + test3=tratom(3)-xred(3,iatom) +! Find nearest integer part of difference + trans1=nint(test1) + trans2=nint(test2) + trans3=nint(test3) +! Check whether, after translation, they agree + test1=test1-dble(trans1) + test2=test2-dble(trans2) + test3=test3-dble(trans3) + test=abs(test1)+abs(test2)+abs(test3) + if (testtolsym .and. errout<3) then ! Print warnings if differences exceed tolerance + write(msg, '(3a,i3,a,i6,a,i3,a,a,3f18.12,3a,es12.4)' )& + ' Trouble finding symmetrically equivalent atoms',ch10,& + ' Applying inv of symm number',isym,' to atom number',iatom,' of typat',typat(iatom),ch10,& + ' gives tratom=',tratom(1:3),'.',ch10,& + ' This is further away from every atom in crystal than the allowed tolerance, tolsym=',tolsym + ABI_WARNING(msg) + + write(msg, '(a,3i3,a,a,3i3,a,a,3i3)' ) & + ' The inverse symmetry matrix is',symrec(1,1:3,isym),ch10,& + ' ',symrec(2,1:3,isym),ch10,& + ' ',symrec(3,1:3,isym) + call wrtout(std_out,msg) + write(msg, '(a,3f18.12)' )' and the nonsymmorphic transl. tnons =',(tnons(mu,isym),mu=1,3) + + call wrtout(std_out,msg) + write(msg, '(a,1p,3es12.4,a,a,i5)' ) & + ' The nearest coordinate differs by',difmin(1:3),ch10,& + ' for indsym(nearest atom)=',indsym(4,isym,iatom) + call wrtout(std_out,msg) +! +! Use errout to reduce volume of error diagnostic output + if (errout==0) then + write(msg,'(6a)') ch10,& + ' This indicates that when symatm attempts to find atoms symmetrically',ch10, & + ' related to a given atom, the nearest candidate is further away than some',ch10,& + ' tolerance. Should check atomic coordinates and symmetry group input data.' + call wrtout(std_out,msg) + end if + errout=errout+1 + + end if !difmax>tol + end do !iatom + end do !isym + + ! MG: Do not change this behaviour. symatm is called many times in the EPH code in which we have tons of q-points + ! and it's really annoying to see this output repeated over and over again. + ! If you need to print the indsym table at the beginning of the calculation, find the call to symatm + ! and pass the optional argument print_indsym_ or use `abitk crystal_print FILE --prtvol 1` + print_indsym_ = -1; if (present(print_indsym)) print_indsym_ = print_indsym + if (natom <= print_indsym_) then + do iatom=1,natom + write(msg, '(a,i0,a)' )' symatm: atom number ',iatom,' is reached starting at atom' + call wrtout(std_out,msg) + do ii=1,(nsym-1)/24+1 + if(natom<100)then + write(msg, '(1x,24i3)' ) (indsym(4,isym,iatom),isym=1+(ii-1)*24,min(nsym,ii*24)) + else + write(msg, '(1x,24i6)' ) (indsym(4,isym,iatom),isym=1+(ii-1)*24,min(nsym,ii*24)) + end if + call wrtout(std_out,msg) + end do + end do + end if + + if (err>tolsym) then + write(msg, '(1x,a,1p,e14.5,a,e12.4)' )'symatm: maximum (delta t)=',err,' is larger than tol=',tolsym + ABI_WARNING(msg) + end if + +!Stop execution if error is really big + if (err>0.01d0) then + write(msg,'(5a)')& + 'Largest error (above) is so large (0.01) that either input atomic coordinates (xred)',ch10,& + 'are wrong or space group symmetry data is wrong.',ch10,& + 'Action: correct your input file.' + ABI_ERROR(msg) + end if + +end subroutine symatm +!!*** + +!!****f* m_symtk/symcharac +!! NAME +!! symcharac +!! +!! FUNCTION +!! Get the type of axis for the symmetry. +!! +!! INPUTS +!! center=bravais(2) +!! determinant=the value of the determinant of sym +!! iholohedry=bravais(1) +!! isym=number of the symmetry operation that is currently analyzed +!! order=the order of the symmetry +!! symrel(3,3)= the symmetry matrix +!! tnons(3)=nonsymmorphic translations +!! +!! OUTPUT +!! label=a human readable text for the characteristic of the symmetry +!! type_axis=an identifier for the type of symmetry +!! +!! SOURCE + +subroutine symcharac(center, determinant, iholohedry, isym, label, symrel, tnons, type_axis) + +!Arguments ------------------------------------ +!scalars + integer, intent(in) :: determinant, center, iholohedry, isym + integer, intent(out) :: type_axis + character(len = 128), intent(out) :: label + !arrays + integer,intent(in) :: symrel(3,3) + real(dp),intent(in) :: tnons(3) + + !Local variables------------------------------- + !scalars + logical,parameter :: verbose=.FALSE. + integer :: tnons_order, identified, ii, order, iorder + character(len=500) :: msg + !arrays + integer :: identity(3,3),matrix(3,3),trial(3,3) + real(dp) :: reduced(3),trialt(3) + + !************************************************************************** + + identity(:,:)=0 + identity(1,1)=1 ; identity(2,2)=1 ; identity(3,3)=1 + trial(:,:)=identity(:,:) + matrix(:,:)=symrel(:,:) + + order=0 + do iorder=1,6 + trial=matmul(matrix,trial) + if(sum((trial-identity)**2)==0)then + order=iorder + exit + end if + if(sum((trial+identity)**2)==0)then + order=iorder + exit + end if + end do + + if(order==0)then + type_axis = -2 + return + end if + +!Determination of the characteristics of proper symmetries (rotations) + if(determinant==1)then + +! Determine the translation vector associated to the rotations +! and its order : apply the symmetry operation +! then analyse the resulting vector. + identified=0 + trialt(:)=zero + do ii=1,order + trialt(:)=matmul(symrel(:,:),trialt(:))+tnons(:) + end do +! Gives the associated translation, with components in the +! interval [-0.5,0.5] . + reduced(:)=trialt(:)-nint(trialt(:)-tol6) + + if(sum(abs(reduced(:))) 15 , (a, b or c) -> 16, +!! d -> 17, n -> 18 , g -> 19 +!! However, there is the same problem as for binary axes, +!! namely, for parallel mirror planes, one can find different +!! translation vectors, and these might be found at random, +!! depending on the input tnons. +!! (1) In the tP case, one will distinguish tertiary +!! mirror plane, for which it is important to know whether they are +!! m or c (for tertiary planes in tP, g is equivalent to m and n is equivalent to c). +!! On the other hand, it is important to distinguish among +!! primary and secondary mirror planes, those that are m,(a or b),c, or n. +!! To summarize, the number of the symmetry will be : +!! m (primary, secondary or tertiary) -> 15 , +!! secondary (a or b) -> 16, secondary c -> 17, +!! primary or secondary n -> 18 , tertiary c -> 19 +!! (2) In the tI case, one will distinguish tertiary +!! mirror plane, for which it is important to know whether they are +!! m or d (for tertiary planes in tI, c is equivalent to m. +!! On the other hand, it is important to distinguish among +!! primary and secondary mirror planes, those that are m (equivalent to n), +!! or a,b or c. +!! To summarize, the number of the symmetry will be : +!! m (primary, secondary, tertiary) -> 15 , +!! a,b or c (primary or secondary) -> 16, tertiary d -> 17 +!! (3) For hP and hR, a m plane is always coupled to a a or b plane, +!! while a c plane is always coupled to an n plane. On the other +!! hand, it is important to distinguish between primary or secondary +!! mirror planes, and tertiary mirror planes. So we will keep the +!! following sets : m non-tertiary (that includes a or b non-tertiary) -> 15, +!! c non-tertiary (that includes n non-tertiary) -> 16, +!! m tertiary (that includes a or b non-tertiary) -> 17, +!! c tertiary (that includes n non-tertiary) -> 18. +!! For hR, all mirror planes are secondary. +!! (4) For the cP lattice, in the same spirit, one can see that +!! the tertiary m and g mirror planes are to be classified as "m" -> 15, +!! while n, a and c are to be classified as "n" -> 18. There is no need +!! to distinguish between primary, secondary or tertiary axes. +!! +!! SOURCE + +subroutine symplanes(center,iholohedry,isym,isymrelconv,itnonsconv,label,type_axis) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: center,iholohedry,isym + integer,intent(out) :: type_axis + character(len = 128), intent(out) :: label +!arrays + integer,intent(in) :: isymrelconv(3,3) + real(dp),intent(in) :: itnonsconv(3) + +!Local variables------------------------------- +!scalars + logical,parameter :: verbose=.FALSE. + character(len=500) :: msg + integer :: directiontype,sum_elements + real(dp),parameter :: nzero=1.0d-6 +!arrays + integer :: identity(3,3),mirrormxy(3,3),mirrormyz(3,3),mirrormzx(3,3) + integer :: mirrorx(3,3),mirrorxy(3,3),mirrory(3,3),mirroryz(3,3),mirrorz(3,3) + integer :: mirrorzx(3,3) + real(dp) :: trialt(3) +! real(dp) :: itnonsconv2(3),trialt2(3) + +!************************************************************************** + +!write(std_out,*)' symplanes : enter' +!write(std_out,*)' center,iholohedry,isym,isymrelconv,itnonsconv=',center,iholohedry,isym,isymrelconv,itnonsconv + + identity(:,:)=0 + identity(1,1)=1 ; identity(2,2)=1 ; identity(3,3)=1 + +!Will be a mirror plane, but one must characterize +!(1) the type of plane (primary, secondary or tertiary) +!(2) the gliding vector. One now defines a few matrices. + mirrorx(:,:)=identity(:,:) ; mirrorx(1,1)=-1 + mirrory(:,:)=identity(:,:) ; mirrory(2,2)=-1 + mirrorz(:,:)=identity(:,:) ; mirrorz(3,3)=-1 + mirrorxy(:,:)=0 ; mirrorxy(1,2)=1 ; mirrorxy(2,1)=1 ; mirrorxy(3,3)=1 + mirrorzx(:,:)=0 ; mirrorzx(1,3)=1 ; mirrorzx(3,1)=1 ; mirrorzx(2,2)=1 + mirroryz(:,:)=0 ; mirroryz(2,3)=1 ; mirroryz(3,2)=1 ; mirroryz(1,1)=1 + mirrormxy(:,:)=0 ; mirrormxy(1,2)=-1 ; mirrormxy(2,1)=-1 ; mirrormxy(3,3)=1 + mirrormzx(:,:)=0 ; mirrormzx(1,3)=-1 ; mirrormzx(3,1)=-1 ; mirrormzx(2,2)=1 + mirrormyz(:,:)=0 ; mirrormyz(2,3)=-1 ; mirrormyz(3,2)=-1 ; mirrormyz(1,1)=1 + +!Determine the type of plane. At the end, +!directiontype=1 will correspond to a primary axis (or equivalent +!axes for orthorhombic) +!directiontype=2 will correspond to a secondary axis +!directiontype=3 will correspond to a tertiary axis +!See table 2.4.1, 11.2 and 11.3 of the international tables for crystallography + directiontype=0 +!The sum of elements of the matrices allow to characterize them + sum_elements=sum(isymrelconv(:,:)) + + if(sum_elements==1)then +! The mirror plane perpendicular to the c axis is always primary + if( sum(abs(isymrelconv(:,:)-mirrorz(:,:)))==0 )then + directiontype=1 +! All the other planes with a symrel matrix whose sum of elements is 1 +! are a or b planes. They are primary or +! secondary planes, depending the holohedry. + else if(sum(isymrelconv(:,:))==1)then + if( iholohedry==2 .or. iholohedry==3 .or. iholohedry==7 )then + directiontype=1 + else if(iholohedry==4 .or. iholohedry==6)then + directiontype=2 + end if + end if + end if + +!All the planes with a symrel matrix whose sum of elements +!is 2 are secondary planes (table 11.3). + if( sum_elements==2 ) directiontype=2 + +!The planes with a symrel matrix whose sum of elements +!is 3 or 0 are tertiary planes + if( sum_elements==3 .or. sum_elements==0 )directiontype=3 + +!One is left with sum_elements=-1, tertiary for tetragonal +!or cubic, secondary for hexagonal + if( sum_elements==-1)then + if(iholohedry==4 .or. iholohedry==7)directiontype=3 + if(iholohedry==6)directiontype=2 + end if + + +!Now, determine the gliding vector +!First, apply the symmetry operation +!to itnonsconv, in order to get the translation vector +!under the application of twice the symmetry operation + trialt(:)=matmul(isymrelconv(:,:),itnonsconv(:)) +itnonsconv(:) +!Get the translation associated with one application, +!and force its components to be in the interval ]-0.5,0.5] . + trialt(:)=trialt(:)*half + trialt(:)=trialt(:)-nint(trialt(:)-nzero) + +!If there is a glide vector for the initial choice of itnonsconv, +!it might be that it disappears if itnonsconv is translated by a +!lattice vector of the conventional cell +!if(trialt(1)**2+trialt(2)**2+trialt(3)**2>tol5)then +!do ii=1,3 +!itnonsconv2(:)=itnonsconv(:) +!itnonsconv2(ii)=itnonsconv(ii)+one +!trialt2(:)=matmul(isymrelconv(:,:),itnonsconv2(:)) +itnonsconv2(:) +!trialt2(:)=trialt2(:)*half +!trialt2(:)=trialt2(:)-nint(trialt2(:)-nzero) +!if(trialt2(1)**2+trialt2(2)**2+trialt2(3)**2tol8)then + minim(:,ia)=-minim(:,ia) + metmin(ia,ib)=-metmin(ia,ib) ; metmin(ib,ia)=-metmin(ib,ia) + metmin(ia,itrial)=-metmin(ia,itrial) + metmin(itrial,ia)=-metmin(itrial,ia) + end if +! Compute the length of the sum vector + length2=metmin(ia,ia)+2*metmin(ia,ib)+metmin(ib,ib) +! Replace the first vector by the sum vector if the latter is smaller + if(length2/metmin(ia,ia) < one-tol8)then + minim(:,ia)=minim(:,ia)+minim(:,ib) + metmin(ia,ia)=length2 + metmin(ia,ib)=metmin(ia,ib)+metmin(ib,ib) + metmin(ia,itrial)=metmin(ia,itrial)+metmin(ib,itrial) + metmin(ib,ia)=metmin(ia,ib) + metmin(itrial,ia)=metmin(ia,itrial) + minimal=0 +! Replace the second vector by the sum vector if the latter is smaller + else if(length2/metmin(ib,ib) < one-tol8)then + minim(:,ib)=minim(:,ia)+minim(:,ib) + metmin(ib,ib)=length2 + metmin(ia,ib)=metmin(ia,ib)+metmin(ia,ia) + metmin(itrial,ib)=metmin(itrial,ib)+metmin(itrial,ia) + metmin(ib,ia)=metmin(ia,ib) + metmin(ib,itrial)=metmin(itrial,ib) + minimal=0 + end if + + end do + + if(minimal==1)exit + end do + + if (iiter >= maxiter) then + write(msg,'(a,i0,a)') 'the loop has failed to find a set of minimal vectors in ',maxiter,' iterations.' + ABI_BUG(msg) + end if + +!DEBUG +!write(std_out,*)' smallprim : after pair optimization ' +!write(std_out,'(2a,3es16.8,a,3es16.8,a,3es16.8)')' minim =',ch10,minim(:,1),ch10,minim(:,2),ch10,minim(:,3) +!write(std_out,'(2a,3es16.8,a,3es16.8,a,3es16.8)')' metmin =',ch10,metmin(:,1),ch10,metmin(:,2),ch10,metmin(:,3) +!write(std_out,*)' smallprim : will start triplet optimization ',ch10 +!call flush(std_out) +!ENDDEBUG + +!At this stage, the three vectors have angles between each other that are +!comprised between 90 and 120 degrees. It might still be that minus the vector +!that is the sum of the three vectors is smaller than the longest of these vectors + do iiter = 1, maxiter + +! Will exit if minimal=1 is still valid after a trial +! to replace the longest of the three vectors by one of the triplet sum of the three vectors, with plus or minus sign + +! Find longest of the three vectors + ilong=1 + if( metmin(2,2)/metmin(1,1) > one + tol8 )ilong=2 + if( metmin(3,3)/metmin(ilong,ilong) > one + tol8)ilong=3 + +! Try combination with all same signs + minimal=1 + metsum=sum(metmin(:,:)) + itrial=0 + if( metsum/metmin(ilong,ilong) < one - tol8)then +! Better combination indeed ... + minim(:,ilong)=minim(:,1)+minim(:,2)+minim(:,3) + metmin=MATMUL(TRANSPOSE(minim),minim) + minimal=0 + else +! Try combinations with sign of itrial different from others + metsum=two*(metmin(1,1)+metmin(2,2)+metmin(3,3))-metsum + do itrial=1,3 + ia=nvecta(itrial) ; ib=nvectb(itrial) + if( (metsum+four*metmin(ia,ib))/metmin(ilong,ilong) < one - tol8)then +! Better combination indeed ... + metsum=metsum+four*metmin(ia,ib) + minim(:,ilong)=-minim(:,itrial)+minim(:,ia)+minim(:,ib) + metmin=MATMUL(TRANSPOSE(minim),minim) + minimal=0 + exit + endif + enddo + endif + +!DEBUG +!write(std_out,*)' smallprim : triplet optimization, iiter,ilong,itrial= ',iiter,ilong,itrial +!write(std_out,*)' smallprim : predict met for the new vector=',metsum +!call flush(std_out) +!ENDDEBUG + +! do itrial=1,3 +! ia=nvecta(itrial) ; ib=nvectb(itrial) +! if(metmin(ia,ia)/metsum > one + tol8)then +! minim(:,ia)=-minim(:,1)-minim(:,2)-minim(:,3) +! metmin(ia,ib)=-sum(metmin(:,ib)) +! metmin(ia,itrial)=-sum(metmin(:,itrial)) +! metmin(ia,ia)=metsum +! metmin(ib,ia)=metmin(ia,ib) +! metmin(itrial,ia)=metmin(ia,itrial) +! minimal=0 +! end if +! end do + +!DEBUG +!write(std_out,*)' smallprim : found better primitive vector using triplets, itrial= ',itrial +!write(std_out,'(2a,3es16.8,a,3es16.8,a,3es16.8)')' minim =',ch10,minim(:,1),ch10,minim(:,2),ch10,minim(:,3) +!write(std_out,'(2a,3es16.8,a,3es16.8,a,3es16.8)')' metmin =',ch10,metmin(:,1),ch10,metmin(:,2),ch10,metmin(:,3) +!write(std_out,*)' smallprim : will continue triplet optimization ',ch10 +!call flush(std_out) +!ENDDEBUG + + if(minimal==1)exit + + end do + + if (iiter >= maxiter) then + write(msg, '(a,i0,a)') 'the second loop has failed to find a set of minimal vectors in ',maxiter, 'iterations.' + ABI_BUG(msg) + end if + +!DEBUG +!write(std_out,'(a,3es14.6,a,3es14.6,a,3es14.6)')' rprimd=',rprimd(:,1),ch10,rprimd(:,2),ch10,rprimd(:,3) +!write(std_out,'(a,3es14.6,a,3es14.6,a,3es14.6)')' minim =',minim(:,1),ch10,minim(:,2),ch10,minim(:,3) +!ENDDEBUG + +!DEBUG +!Change sign of the third vector if not right-handed basis +!determinant=minim(1,1)*(minim(2,2)*minim(3,3)-minim(3,2)*minim(2,3))+& +!& minim(2,1)*(minim(3,2)*minim(1,3)-minim(1,2)*minim(3,3))+& +!& minim(3,1)*(minim(1,2)*minim(2,3)-minim(2,2)*minim(1,3)) +!write(std_out,*)' smallprim: determinant=',determinant +!ENDDEBUG + +!Choose the first vector +!Compute the scalar product of the three minimal vectors with the first original vector + scprod(:)=zero + do ii=1,3 + scprod(:)=scprod(:)+minim(ii,:)*rprimd(ii,1) + end do +!Determine the vector with the maximal absolute overlap + itrial=1 + if(abs(scprod(2))>abs(scprod(1))+tol8)itrial=2 + if(abs(scprod(3))>abs(scprod(itrial))+tol8)itrial=3 +!Switch the vectors if needed + if(itrial/=1)then + tmpvect(:)=minim(:,1) + minim(:,1)=minim(:,itrial) + minim(:,itrial)=tmpvect(:) + end if +!Choose the sign + if(scprod(itrial)nsym) isymend=nsym + do ii=1,3 + write(msg,'(4(3i3,f11.6,i3,3x))')((symrel(ii,jj,isym),jj=1,3),tnons(ii,isym),symafm(isym),isym=isymin,isymend) + call wrtout(my_unt,msg,my_mode) + end do + write(msg,'(a)')ch10 + call wrtout(my_unt,msg,my_mode) + end do + +end subroutine print_symmetries +!!*** + +end module m_symtk +!!*** diff --git a/GX-PAW/common/src/32_util/m_symtk.o b/GX-PAW/common/src/32_util/m_symtk.o new file mode 100644 index 00000000..ba4e3595 Binary files /dev/null and b/GX-PAW/common/src/32_util/m_symtk.o differ diff --git a/GX-PAW/common/src/33_xc_lowlevel/.deps/libxc_tools.Po b/GX-PAW/common/src/33_xc_lowlevel/.deps/libxc_tools.Po new file mode 100644 index 00000000..6511ffd3 --- /dev/null +++ b/GX-PAW/common/src/33_xc_lowlevel/.deps/libxc_tools.Po @@ -0,0 +1,232 @@ +libxc_tools.o: libxc_tools.c ../../../../config.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdlib.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/Availability.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/AvailabilityInternal.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_symbol_aliasing.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_posix_availability.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/wait.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_pid_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_id_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/signal.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/appleapiopts.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/signal.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/signal.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_mcontext.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/_mcontext.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/machine/_structs.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/i386/_structs.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int8_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int16_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int32_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int64_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int8_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int16_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int32_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int64_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_intptr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uintptr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_attr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_sigaltstack.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ucontext.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_sigset_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_size_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uid_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/resource.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include/stdint.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/stdint.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint8_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint16_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint32_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint64_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_intmax_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uintmax_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_timeval.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/endian.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/endian.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_endian.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/_OSByteOrder.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/i386/_OSByteOrder.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/alloca.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ct_rune_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_rune_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_wchar_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_null.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/malloc/_malloc.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_dev_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_mode_t.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/stdio.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include/stdarg.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_stdio.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_va_list.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/stdio.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_off_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ssize_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_stdio.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_common.h \ + /opt/local/include/xc.h /opt/local/include/xc_version.h \ + /opt/local/include/xc_funcs.h /opt/local/include/xc_funcs_removed.h \ + /opt/local/include/xc_funcs.h + +../../../../config.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdlib.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/Availability.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/AvailabilityInternal.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_symbol_aliasing.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_posix_availability.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/wait.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_pid_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_id_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/signal.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/appleapiopts.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/signal.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/signal.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_mcontext.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/_mcontext.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/machine/_structs.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/i386/_structs.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int8_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int16_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int32_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int64_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int8_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int16_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int32_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int64_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_intptr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uintptr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_attr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_sigaltstack.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ucontext.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_sigset_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_size_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uid_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/resource.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include/stdint.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/stdint.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint8_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint16_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint32_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint64_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_intmax_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uintmax_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_timeval.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/endian.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/endian.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_endian.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/_OSByteOrder.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/i386/_OSByteOrder.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/alloca.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ct_rune_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_rune_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_wchar_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_null.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/malloc/_malloc.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_dev_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_mode_t.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/stdio.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include/stdarg.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_stdio.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_va_list.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/stdio.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_off_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ssize_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_stdio.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_common.h: + +/opt/local/include/xc.h: + +/opt/local/include/xc_version.h: + +/opt/local/include/xc_funcs.h: + +/opt/local/include/xc_funcs_removed.h: + +/opt/local/include/xc_funcs.h: diff --git a/GX-PAW/common/src/33_xc_lowlevel/Makefile b/GX-PAW/common/src/33_xc_lowlevel/Makefile new file mode 100644 index 00000000..9d235485 --- /dev/null +++ b/GX-PAW/common/src/33_xc_lowlevel/Makefile @@ -0,0 +1,1519 @@ +# Makefile.in generated by automake 1.16.3 from Makefile.am. +# shared/common/src/33_xc_lowlevel/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994-2020 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-corelibs on 2024/03/16 21:07:38 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-corelibs script or its config file instead. +# + + +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/abinit +pkgincludedir = $(includedir)/abinit +pkglibdir = $(libdir)/abinit +pkglibexecdir = $(libexecdir)/abinit +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = x86_64-apple-darwin18.7.0 +host_triplet = x86_64-apple-darwin18.7.0 +target_triplet = x86_64-apple-darwin18.7.0 +subdir = shared/common/src/33_xc_lowlevel +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/m4/arch-gpu.m4 \ + $(top_srcdir)/config/m4/arch-mpi.m4 \ + $(top_srcdir)/config/m4/auto-autotools.m4 \ + $(top_srcdir)/config/m4/auto-corelibs.m4 \ + $(top_srcdir)/config/m4/auto-debug.m4 \ + $(top_srcdir)/config/m4/auto-dirflags.m4 \ + $(top_srcdir)/config/m4/auto-env.m4 \ + $(top_srcdir)/config/m4/auto-hints.m4 \ + $(top_srcdir)/config/m4/auto-optim.m4 \ + $(top_srcdir)/config/m4/auto-options.m4 \ + $(top_srcdir)/config/m4/auto-output.m4 \ + $(top_srcdir)/config/m4/auto-triggers.m4 \ + $(top_srcdir)/config/m4/conf-atompaw.m4 \ + $(top_srcdir)/config/m4/conf-debug.m4 \ + $(top_srcdir)/config/m4/conf-fallbacks.m4 \ + $(top_srcdir)/config/m4/conf-files.m4 \ + $(top_srcdir)/config/m4/conf-init.m4 \ + $(top_srcdir)/config/m4/conf-openmp.m4 \ + $(top_srcdir)/config/m4/conf-optim.m4 \ + $(top_srcdir)/config/m4/lang-c++.m4 \ + $(top_srcdir)/config/m4/lang-c.m4 \ + $(top_srcdir)/config/m4/lang-fortran-import.m4 \ + $(top_srcdir)/config/m4/lang-fortran.m4 \ + $(top_srcdir)/config/m4/lang-python.m4 \ + $(top_srcdir)/config/m4/libxml2.m4 \ + $(top_srcdir)/config/m4/misc-display.m4 \ + $(top_srcdir)/config/m4/sd_abinit_common.m4 \ + $(top_srcdir)/config/m4/sd_arch_gpu.m4 \ + $(top_srcdir)/config/m4/sd_arch_mpi.m4 \ + $(top_srcdir)/config/m4/sd_bigdft.m4 \ + $(top_srcdir)/config/m4/sd_core.m4 \ + $(top_srcdir)/config/m4/sd_esl.m4 \ + $(top_srcdir)/config/m4/sd_fftw3.m4 \ + $(top_srcdir)/config/m4/sd_gpu_kokkos.m4 \ + $(top_srcdir)/config/m4/sd_gpu_yakl.m4 \ + $(top_srcdir)/config/m4/sd_io_hdf5.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf_fortran.m4 \ + $(top_srcdir)/config/m4/sd_levmar.m4 \ + $(top_srcdir)/config/m4/sd_libpaw.m4 \ + $(top_srcdir)/config/m4/sd_libpsml.m4 \ + $(top_srcdir)/config/m4/sd_libxc.m4 \ + $(top_srcdir)/config/m4/sd_math_fft.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_core.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_util.m4 \ + $(top_srcdir)/config/m4/sd_papi.m4 \ + $(top_srcdir)/config/m4/sd_pfft.m4 \ + $(top_srcdir)/config/m4/sd_triqs.m4 \ + $(top_srcdir)/config/m4/sd_wannier90.m4 \ + $(top_srcdir)/config/m4/sd_xmlf90.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +AM_V_AR = $(am__v_AR_$(V)) +am__v_AR_ = $(am__v_AR_$(AM_DEFAULT_VERBOSITY)) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = +lib33_xc_lowlevel_a_AR = $(AR) $(ARFLAGS) +lib33_xc_lowlevel_a_LIBADD = +am__objects_1 = libxc_tools.$(OBJEXT) m_libxc_functionals.$(OBJEXT) \ + m_drivexc.$(OBJEXT) m_xc_noncoll.$(OBJEXT) m_xchcth.$(OBJEXT) \ + m_xciit.$(OBJEXT) m_xcpbe.$(OBJEXT) m_xcpositron.$(OBJEXT) \ + m_xclda.$(OBJEXT) +am_lib33_xc_lowlevel_a_OBJECTS = $(am__objects_1) +lib33_xc_lowlevel_a_OBJECTS = $(am_lib33_xc_lowlevel_a_OBJECTS) +AM_V_P = $(am__v_P_$(V)) +am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY)) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I. -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/config/gnu/depcomp +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/libxc_tools.Po +am__mv = mv -f +PPFCCOMPILE = $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) +AM_V_PPFC = $(am__v_PPFC_$(V)) +am__v_PPFC_ = $(am__v_PPFC_$(AM_DEFAULT_VERBOSITY)) +am__v_PPFC_0 = @echo " PPFC " $@; +am__v_PPFC_1 = +FCLD = $(FC) +FCLINK = $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \ + $@ +AM_V_FCLD = $(am__v_FCLD_$(V)) +am__v_FCLD_ = $(am__v_FCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_FCLD_0 = @echo " FCLD " $@; +am__v_FCLD_1 = +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(lib33_xc_lowlevel_a_SOURCES) +DIST_SOURCES = $(lib33_xc_lowlevel_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in \ + $(top_srcdir)/config/gnu/depcomp README +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ABINIT_BINARY_PACKAGE = abinit-10.0.0.83-58be4d_x86_64_darwin18.7.0_gnu9.4 +ABINIT_COMMON_CPPFLAGS = +ABINIT_COMMON_FCFLAGS = +ABINIT_COMMON_LDFLAGS = +ABINIT_COMMON_LIBS = +ABINIT_TARGET = x86_64_darwin18.7.0_gnu9.4 +ABINIT_VERSION = 10.0.0.83-58be4d +ABINIT_VERSION_BASE = 10.0 +ABINIT_VERSION_BUILD = 20240316 +ABINIT_VERSION_MAJOR = 10 +ABINIT_VERSION_MICRO = 0 +ABINIT_VERSION_MINOR = 0 +ABI_CPPFLAGS = -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include +ACLOCAL = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' aclocal-1.16 +AMTAR = $${TAR-tar} +AM_DEFAULT_VERBOSITY = 1 +AR = ar +ARFLAGS = rc +ARFLAGS_CMD = rc +ARFLAGS_DEBUG = +ARFLAGS_EXTRA = +ARFLAGS_HINTS = +ARFLAGS_OPTIM = +ATOMPAW_BIN = +AUTOCONF = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' autoconf +AUTOHEADER = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' autoheader +AUTOMAKE = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' automake-1.16 +AWK = awk +BIGDFT_CPPFLAGS = +BIGDFT_FCFLAGS = +BIGDFT_LDFLAGS = +BIGDFT_LIBS = +BOURNE_SHELL = /bin/sh +CC = /opt/local/bin/mpicc +CCDEPMODE = depmode=gcc3 +CC_LDFLAGS = +CC_LDFLAGS_DEBUG = +CC_LDFLAGS_EXTRA = +CC_LDFLAGS_GPU = +CC_LDFLAGS_HINTS = +CC_LDFLAGS_OPTIM = +CC_LIBS = +CC_LIBS_DEBUG = +CC_LIBS_EXTRA = +CC_LIBS_GPU = +CC_LIBS_HINTS = +CC_LIBS_OPTIM = +CFLAGS = -O2 -g +CFLAGS_DEBUG = +CFLAGS_EXTRA = +CFLAGS_GPU = +CFLAGS_HINTS = +CFLAGS_OPTIM = +CPP = /opt/local/bin/mpicc -E +CPPFLAGS = +CPPFLAGS_DEBUG = +CPPFLAGS_EXTRA = +CPPFLAGS_GPU = +CPPFLAGS_HINTS = +CPPFLAGS_HINTS_EXT = -P -std=c99 +CPPFLAGS_OPTIM = +CXX = /opt/local/bin/mpicxx +CXXDEPMODE = depmode=gcc3 +CXXFLAGS = -O2 -g +CXXFLAGS_DEBUG = +CXXFLAGS_EXTRA = +CXXFLAGS_GPU = +CXXFLAGS_HINTS = +CXXFLAGS_OPTIM = +CXX_LDFLAGS = +CXX_LDFLAGS_DEBUG = +CXX_LDFLAGS_EXTRA = +CXX_LDFLAGS_GPU = +CXX_LDFLAGS_HINTS = +CXX_LDFLAGS_OPTIM = +CXX_LIBS = +CXX_LIBS_DEBUG = +CXX_LIBS_EXTRA = +CXX_LIBS_GPU = +CXX_LIBS_HINTS = +CXX_LIBS_OPTIM = +CYGPATH_W = echo +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +ECHO_C = \c +ECHO_N = +ECHO_T = +EGREP = /usr/bin/grep -E +EXEEXT = +F77 = /opt/local/bin/mpif90 +FC = /opt/local/bin/mpif90 +FCFLAGS = -O2 -g -ffree-line-length-none -I/opt/local/include -I/opt/local/include -I/opt/local/include +FCFLAGS_DEBUG = +FCFLAGS_EXTRA = +FCFLAGS_F90 = +FCFLAGS_FIXEDFORM = -ffixed-form +FCFLAGS_FREEFORM = -ffree-form +FCFLAGS_HINTS = -ffree-line-length-none +FCFLAGS_MODDIR = -J../mods +FCFLAGS_OPENMP = +FCFLAGS_OPENMP_OFFLOAD = +FCFLAGS_OPTIM = +FCLIBS = -L/opt/local/lib -L/opt/local/lib/openmpi-gcc9 -L/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0 -L/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/../../.. -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi -lgfortran -lquadmath -lm +FC_LDFLAGS = +FC_LDFLAGS_DEBUG = +FC_LDFLAGS_EXTRA = +FC_LDFLAGS_HINTS = +FC_LDFLAGS_OPTIM = +FC_LIBS = +FC_LIBS_DEBUG = +FC_LIBS_EXTRA = +FC_LIBS_HINTS = +FC_LIBS_OPTIM = +FC_NOWRAP = /opt/local/bin/mpif90 +FFLAGS = -O2 -g -ffree-line-length-none -I/opt/local/include -I/opt/local/include -I/opt/local/include +FFTW3_CFLAGS = +FFTW3_CPPFLAGS = -I/opt/local/include +FFTW3_FCFLAGS = -I/opt/local/include +FFTW3_LDFLAGS = +FFTW3_LIBS = -L/opt/local/lib -lfftw3 -lfftw3f +FFT_CFLAGS = +FFT_FCFLAGS = +FPP = +FPPFLAGS = +FPPFLAGS_DEBUG = +FPPFLAGS_EXTRA = +FPPFLAGS_HINTS = +FPPFLAGS_OPTIM = +GPU_ARCH = +GPU_CFLAGS = +GPU_CPPFLAGS = +GPU_CXXFLAGS = +GPU_FCFLAGS = +GPU_LDFLAGS = +GPU_LIBS = +GRAPHATOM_BIN = +GREP = /usr/bin/grep +H5CC = +HDF5_CFLAGS = +HDF5_CPPFLAGS = +HDF5_CXXFLAGS = +HDF5_FCFLAGS = +HDF5_LDFLAGS = +HDF5_LIBS = +INSTALL = /opt/local/libexec/gnubin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +KOKKOS_CPPFLAGS = +KOKKOS_CXXFLAGS = +KOKKOS_LDFLAGS = +KOKKOS_LIBS = +LDFLAGS = +LEVMAR_CFLAGS = +LEVMAR_CPPFLAGS = +LEVMAR_LDFLAGS = +LEVMAR_LIBS = +LIBOBJS = +LIBPAW_CPPFLAGS = +LIBPAW_FCFLAGS = +LIBPAW_LDFLAGS = +LIBPAW_LIBS = +LIBPSML_CPPFLAGS = +LIBPSML_FCFLAGS = +LIBPSML_LDFLAGS = +LIBPSML_LIBS = +LIBS = -L/opt/local/lib -lwannier -L/opt/local/lib -lxc -L/opt/local/lib -lnetcdff -L/opt/local/lib -lnetcdf -L/opt/local/lib -L/opt/local/lib -lhdf5_hl -L/opt/local/lib -lhdf5 -lz -ldl -lm -L/opt/local/lib -lfftw3 -lfftw3f +LIBXC_CFLAGS = +LIBXC_CPPFLAGS = +LIBXC_FCFLAGS = +LIBXC_LDFLAGS = +LIBXC_LIBS = +LIBXML2_CPPFLAGS = +LIBXML2_FCFLAGS = +LIBXML2_LIBS = +LINALG_CFLAGS = +LINALG_CPPFLAGS = +LINALG_CXXFLAGS = +LINALG_FCFLAGS = -I/opt/local/include +LINALG_LDFLAGS = +LINALG_LIBS = -L/opt/local/lib -lopenblas +LN_S = ln -s +LTLIBOBJS = +MAKEINFO = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' makeinfo +MKDIR_P = /opt/local/libexec/gnubin/mkdir -p +MODEXT = mod +MPI_CFLAGS = +MPI_CPPFLAGS = +MPI_CXXFLAGS = +MPI_FCFLAGS = +MPI_LDFLAGS = +MPI_LIBS = +MV = /opt/local/libexec/gnubin/mv +NETCDF_CFLAGS = +NETCDF_CPPFLAGS = +NETCDF_CXXFLAGS = +NETCDF_FCFLAGS = +NETCDF_FORTRAN_CFLAGS = +NETCDF_FORTRAN_CPPFLAGS = +NETCDF_FORTRAN_CXXFLAGS = +NETCDF_FORTRAN_FCFLAGS = +NETCDF_FORTRAN_LDFLAGS = +NETCDF_FORTRAN_LIBS = +NETCDF_LDFLAGS = +NETCDF_LIBS = +NVCC = +NVCC_CFLAGS = +NVCC_CPPFLAGS = +NVCC_LDFLAGS = +NVCC_LIBS = +OBJEXT = o +PACKAGE = abinit +PACKAGE_BUGREPORT = https://bugs.launchpad.net/abinit/ +PACKAGE_NAME = ABINIT +PACKAGE_STRING = ABINIT 10.0.0.83-58be4d +PACKAGE_TARNAME = abinit +PACKAGE_URL = +PACKAGE_VERSION = 10.0.0.83-58be4d +PAPI_CFLAGS = +PAPI_CPPFLAGS = +PAPI_LDFLAGS = +PAPI_LIBS = +PATCH = patch +PATH_SEPARATOR = : +PERL = /usr/bin/perl +PFFT_CFLAGS = +PFFT_CPPFLAGS = +PFFT_LDFLAGS = +PFFT_LIBS = +PYFLAGS = +PYTHON = python3.9 +PYTHON_CONFIG = python3.9-config +PYTHON_CPPFLAGS = -I/opt/local/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -I/opt/local/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 +RANLIB = ranlib +REALPATH = realpath +RM = /opt/local/libexec/gnubin/rm +SED = /usr/bin/sed +SET_MAKE = +SHELL = /bin/sh +STRIP = +TAR = tar +TRIQS_CFLAGS = +TRIQS_CPPFLAGS = +TRIQS_CXXFLAGS = +TRIQS_LDFLAGS = +TRIQS_LIBS = +TRUE_CPP = cpp +VERSION = 10.0.0.83-58be4d +WANNIER90_CPPFLAGS = +WANNIER90_FCFLAGS = -I/opt/local/include +WANNIER90_LDFLAGS = +WANNIER90_LIBS = -L/opt/local/lib -lwannier +XML2_CONFIG = +XMLF90_CPPFLAGS = +XMLF90_FCFLAGS = +XMLF90_LDFLAGS = +XMLF90_LIBS = +XML_CPPFLAGS = +XML_LIBS = +XPP = +XPPFLAGS = +XPPFLAGS_DEBUG = +XPPFLAGS_EXTRA = +XPPFLAGS_OPTIM = +YAKL_CPPFLAGS = +YAKL_FCFLAGS = +YAKL_LDFLAGS = +YAKL_LIBS = +abi_ac_distcheck = --with-config-file="/Users/gonze/_Research/ABINIT_git/gonze/mac-1P0-225.ac9" +abi_ac_version = 027100 +abi_am_version = 011603 +abi_avx_safe_mode_enable = no +abi_bse_unpacked_enable = no +abi_cc_path = +abi_cc_vendor = gnu +abi_cc_version = 9.4 +abi_cclock_enable = no +abi_cpp_path = +abi_cpu_64bits = yes +abi_cpu_bits = 64 +abi_cpu_model = unknown +abi_cpu_platform = apple +abi_cpu_spec = unknown_unknown +abi_cpu_vendor = unknown +abi_crpa_optim_enable = no +abi_cxx_path = +abi_cxx_vendor = gnu +abi_cxx_version = 9.4 +abi_debug_flavor = basic +abi_exports_enable = no +abi_fbk_abinit_common_ok = no +abi_fbk_bigdft_ok = disabled +abi_fbk_config = +abi_fbk_enable = no +abi_fbk_fft_ok = no +abi_fbk_fftw3_ok = no +abi_fbk_gpu_ok = no +abi_fbk_hdf5_ok = disabled +abi_fbk_init = def +abi_fbk_kokkos_ok = no +abi_fbk_levmar_ok = no +abi_fbk_libpaw_ok = no +abi_fbk_libpsml_ok = disabled +abi_fbk_libxc_ok = disabled +abi_fbk_libxml2_ok = no +abi_fbk_linalg_ok = disabled +abi_fbk_list = +abi_fbk_mpi_ok = no +abi_fbk_netcdf_fortran_ok = disabled +abi_fbk_netcdf_ok = disabled +abi_fbk_papi_ok = no +abi_fbk_pfft_ok = no +abi_fbk_prefix = +abi_fbk_required = +abi_fbk_triqs_ok = no +abi_fbk_wannier90_ok = disabled +abi_fbk_xmlf90_ok = disabled +abi_fbk_yakl_ok = no +abi_fc_path = +abi_fc_vendor = gnu +abi_fc_version = 9.4 +abi_fc_wrap = no +abi_fc_wrapper_enable = no +abi_fpp_path = +abi_gpu_arch = +abi_gpu_fcflags = +abi_gpu_flavor = none +abi_gpu_hip_libdir = +abi_gpu_incs = +abi_gpu_ldflags = +abi_gpu_libs = +abi_gpu_nvtx_v3 = +abi_gpu_roctx = +abi_gw_dpc_enable = yes +abi_hints_enable = yes +abi_libtetra_enable = yes +abi_libxml2_cppflags = +abi_libxml2_enable = no +abi_libxml2_fcflags = +abi_libxml2_init = def +abi_libxml2_ldflags = +abi_libxml2_libs = +abi_libxml2_ok = unknown +abi_libxml2_prefix = +abi_lotf_enable = no +abi_lt_version = 020406 +abi_m4_version = 010419 +abi_memory_profiling_enable = no +abi_mpi_cflags = +abi_mpi_cppflags = +abi_mpi_cxxflags = +abi_mpi_enable = yes +abi_mpi_fcflags = +abi_mpi_flavor = auto +abi_mpi_gpu_aware_enable = no +abi_mpi_incs = +abi_mpi_inplace_enable = yes +abi_mpi_interfaces_bugfix_enable = no +abi_mpi_io_default_enable = no +abi_mpi_io_enable = yes +abi_mpi_ldflags = +abi_mpi_level = 2 +abi_mpi_libs = +abi_netcdf_default_enable = no +abi_openmp_enable = no +abi_openmp_offload_enable = no +abi_optim_flavor = standard +abi_python_invocation_enable = no +abi_source_debug_enable = no +abi_stdin_enable = yes +abi_sys_spec = darwin-x86_64 +abi_timer_enable = yes +abi_triqs_v1_4_enable = no +abi_triqs_v2_0_enable = no +abi_zdot_bugfix_enable = no +abinit_bindir = /usr/local/bin +abinit_builddir = /Users/gonze/_Research/ABINIT_git/gonze +abinit_chkdir = /usr/local/share/abinit/tests +abinit_datdir = /usr/local/share/abinit +abinit_docdir = /usr/local/doc/abinit +abinit_incdir = /usr/local/include +abinit_libdir = /usr/local/lib +abinit_mandir = /usr/local/share/man +abinit_prefix = /usr/local +abinit_srcdir = /Users/gonze/_Research/ABINIT_git/gonze +abs_builddir = /Users/gonze/_Research/ABINIT_git/gonze/shared/common/src/33_xc_lowlevel +abs_srcdir = /Users/gonze/_Research/ABINIT_git/gonze/shared/common/src/33_xc_lowlevel +abs_top_builddir = /Users/gonze/_Research/ABINIT_git/gonze +abs_top_srcdir = /Users/gonze/_Research/ABINIT_git/gonze +ac_ct_CC = +ac_ct_CXX = +ac_ct_FC = +am__include = include +am__leading_dot = . +am__quote = +am__tar = tar --format=ustar -chf - "$$tardir" +am__untar = tar -xf - +bindir = ${exec_prefix}/bin +build = x86_64-apple-darwin18.7.0 +build_alias = +build_cpu = x86_64 +build_os = darwin18.7.0 +build_vendor = apple +builddir = . +cc_info_string = gcc-mp-9 (MacPorts gcc9 9.4.0_0) 9.4.0 +cxx_info_string = g++-mp-9 (MacPorts gcc9 9.4.0_0) 9.4.0 +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +enable_avx_safe_mode = +enable_bse_unpacked = +enable_cclock = +enable_crpa_optim = +enable_exports = +enable_fc_wrapper = +enable_gw_dpc = yes +enable_hints = +enable_libtetra = +enable_lotf = +enable_memory_profiling = +enable_mpi_gpu_aware = +enable_mpi_inplace = +enable_mpi_interfaces_bugfix = +enable_mpi_io = yes +enable_mpi_io_default = +enable_netcdf_default = +enable_openmp = +enable_openmp_offload = +enable_python_invocation = +enable_shared = +enable_source_debug = +enable_static = +enable_stdin = +enable_timer = +enable_triqs_v1_4 = +enable_triqs_v2_0 = +enable_zdot_bugfix = +exec_prefix = ${prefix} +fc_info_string = GNU Fortran (MacPorts gcc9 9.4.0_0) 9.4.0 +fc_mod_fcflags = +fc_timing = standard +fcflags_opt_02_clib = +fcflags_opt_10_defs = +fcflags_opt_11_memory_mpi = +fcflags_opt_12_hide_mpi = +fcflags_opt_14_hidewrite = +fcflags_opt_16_hideleave = +fcflags_opt_16_kokkos_toolbox = +fcflags_opt_17_gpu_toolbox = +fcflags_opt_17_libtetra_ext = +fcflags_opt_17_minimax = +fcflags_opt_17_yaml_out = +fcflags_opt_18_timing = +fcflags_opt_21_hashfuncs = +fcflags_opt_27_toolbox_oop = +fcflags_opt_28_numeric_noabirule = +fcflags_opt_29_kpoints = +fcflags_opt_32_util = +fcflags_opt_33_xc_lowlevel = +fcflags_opt_39_libpaw = +fcflags_opt_41_geometry = +fcflags_opt_42_nlstrain = +fcflags_opt_42_parser = +fcflags_opt_43_ptgroups = -O0 +fcflags_opt_43_wvl_wrappers = +fcflags_opt_44_abitools = +fcflags_opt_44_abitypes_defs = +fcflags_opt_44_manage_kokkos = +fcflags_opt_45_geomoptim = +fcflags_opt_45_xgTools = +fcflags_opt_46_ghc_omp = +fcflags_opt_46_manage_cuda = +fcflags_opt_48_diago = +fcflags_opt_49_gw_toolbox_oop = +fcflags_opt_51_manage_mpi = +fcflags_opt_52_fft_mpi_noabirule = +fcflags_opt_53_ffts = +fcflags_opt_54_spacepar = +fcflags_opt_55_abiutil = +fcflags_opt_56_io_mpi = +fcflags_opt_56_mixing = +fcflags_opt_56_recipspace = +fcflags_opt_56_xc = +fcflags_opt_57_iopsp_parser = +fcflags_opt_57_iovars = +fcflags_opt_61_occeig = +fcflags_opt_62_cg_noabirule = +fcflags_opt_62_ctqmc = +fcflags_opt_62_iowfdenpot = +fcflags_opt_62_poisson = +fcflags_opt_62_wvl_wfs = +fcflags_opt_64_psp = +fcflags_opt_65_lotf_base = +fcflags_opt_65_paw = +fcflags_opt_66_nonlocal = +fcflags_opt_66_vdwxc = +fcflags_opt_66_wfs = +fcflags_opt_67_common = +fcflags_opt_67_python_invocation_ext = +fcflags_opt_67_triqs_ext = +fcflags_opt_68_dmft = +fcflags_opt_68_lotf = +fcflags_opt_68_recursion = +fcflags_opt_68_rsprc = +fcflags_opt_69_wfdesc = +fcflags_opt_70_gw = +fcflags_opt_71_bse = +fcflags_opt_71_wannier = +fcflags_opt_72_response = +fcflags_opt_77_ddb = +fcflags_opt_77_suscep = +fcflags_opt_78_effpot = +fcflags_opt_78_eph = +fcflags_opt_79_seqpar_mpi = +fcflags_opt_80_rttddft = +fcflags_opt_80_tdep = +fcflags_opt_94_scfcv = +fcflags_opt_95_drive = +fcflags_opt_98_main = +fcflags_opt_bigdft = +fcflags_opt_default = +fcflags_opt_hdf5 = +fcflags_opt_levmar = +fcflags_opt_libpsml = +fcflags_opt_libxc = +fcflags_opt_libxml2 = +fcflags_opt_linalg = +fcflags_opt_netcdf = +fcflags_opt_netcdf_fortran = +fcflags_opt_papi = +fcflags_opt_triqs = +fcflags_opt_wannier90 = +fcflags_opt_xmlf90 = +host = x86_64-apple-darwin18.7.0 +host_alias = +host_cpu = x86_64 +host_os = darwin18.7.0 +host_vendor = apple +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = ${SHELL} /Users/gonze/_Research/ABINIT_git/gonze/config/gnu/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = ${datarootdir}/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = $(MKDIR_P) +oldincludedir = /usr/include +pdfdir = ${docdir} +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +runstatedir = ${localstatedir}/run +sbindir = ${exec_prefix}/sbin +sd_abinit_common_cppflags = +sd_abinit_common_enable = no +sd_abinit_common_enable_def = no +sd_abinit_common_fcflags = +sd_abinit_common_init = def +sd_abinit_common_ldflags = +sd_abinit_common_libs = +sd_abinit_common_ok = unknown +sd_abinit_common_options = optional skip +sd_abinit_common_policy = skip +sd_abinit_common_status = optional +sd_bigdft_cppflags = +sd_bigdft_enable = no +sd_bigdft_enable_def = no +sd_bigdft_fcflags = +sd_bigdft_init = def +sd_bigdft_ldflags = +sd_bigdft_libs = +sd_bigdft_ok = unknown +sd_bigdft_options = optional warn +sd_bigdft_policy = warn +sd_bigdft_status = optional +sd_fft_cflags = +sd_fft_choices = +sd_fft_cppflags = -I/opt/local/include +sd_fft_cxxflags = +sd_fft_enable = yes +sd_fft_fcflags = -I/opt/local/include +sd_fft_flavor = fftw3 +sd_fft_init = kwd +sd_fft_ldflags = +sd_fft_libs = -L/opt/local/lib -lfftw3 -lfftw3f +sd_fft_ok = yes +sd_fftw3_cflags = +sd_fftw3_cppflags = -I/opt/local/include +sd_fftw3_enable = yes +sd_fftw3_enable_def = no +sd_fftw3_fcflags = -I/opt/local/include +sd_fftw3_init = env +sd_fftw3_ldflags = +sd_fftw3_libs = -L/opt/local/lib -lfftw3 -lfftw3f +sd_fftw3_ok = yes +sd_fftw3_options = optional skip +sd_fftw3_policy = skip +sd_fftw3_status = optional +sd_gpu_cflags = +sd_gpu_cppflags = +sd_gpu_cxxflags = +sd_gpu_enable = no +sd_gpu_enable_def = no +sd_gpu_fcflags = +sd_gpu_init = def +sd_gpu_ldflags = +sd_gpu_libs = +sd_gpu_ok = no +sd_gpu_options = optional warn +sd_gpu_policy = warn +sd_gpu_prefix = +sd_gpu_status = optional +sd_hdf5_cflags = +sd_hdf5_cppflags = -I/opt/local/include -I/opt/local/include +sd_hdf5_cxxflags = +sd_hdf5_enable = yes +sd_hdf5_enable_def = yes +sd_hdf5_enable_fc = no +sd_hdf5_fcflags = +sd_hdf5_h5cc = /opt/local/bin/h5cc +sd_hdf5_h5fc = +sd_hdf5_init = dir +sd_hdf5_ldflags = +sd_hdf5_libs = -L/opt/local/lib -L/opt/local/lib -lhdf5_hl -L/opt/local/lib -lhdf5 -lz -ldl -lm +sd_hdf5_ok = yes +sd_hdf5_options = required no-fortran warn +sd_hdf5_policy = warn +sd_hdf5_status = required +sd_kokkos_cppflags = +sd_kokkos_cxxflags = +sd_kokkos_enable = no +sd_kokkos_enable_def = no +sd_kokkos_init = def +sd_kokkos_ldflags = +sd_kokkos_libs = +sd_kokkos_ok = unknown +sd_kokkos_options = optional fail +sd_kokkos_policy = fail +sd_kokkos_status = optional +sd_levmar_cflags = +sd_levmar_cppflags = +sd_levmar_enable = no +sd_levmar_enable_def = no +sd_levmar_init = def +sd_levmar_ldflags = +sd_levmar_libs = +sd_levmar_ok = unknown +sd_levmar_options = optional fail +sd_levmar_policy = fail +sd_levmar_status = optional +sd_libpaw_cppflags = +sd_libpaw_enable = no +sd_libpaw_enable_def = no +sd_libpaw_fcflags = +sd_libpaw_init = def +sd_libpaw_ldflags = +sd_libpaw_libs = +sd_libpaw_ok = unknown +sd_libpaw_options = optional skip +sd_libpaw_policy = skip +sd_libpaw_status = optional +sd_libpsml_cppflags = +sd_libpsml_enable = no +sd_libpsml_enable_def = no +sd_libpsml_fcflags = +sd_libpsml_init = def +sd_libpsml_ldflags = +sd_libpsml_libs = +sd_libpsml_ok = unknown +sd_libpsml_options = optional warn +sd_libpsml_policy = warn +sd_libpsml_status = optional +sd_libxc_cflags = +sd_libxc_cppflags = -I/opt/local/include +sd_libxc_enable = yes +sd_libxc_enable_def = yes +sd_libxc_enable_fc = no +sd_libxc_fcflags = +sd_libxc_init = dir +sd_libxc_ldflags = +sd_libxc_libs = -L/opt/local/lib -lxc +sd_libxc_ok = yes +sd_libxc_options = required no-fortran warn +sd_libxc_policy = warn +sd_libxc_status = required +sd_linalg_cflags = +sd_linalg_choices = +sd_linalg_cppflags = +sd_linalg_cxxflags = +sd_linalg_enable = yes +sd_linalg_fcflags = -I/opt/local/include +sd_linalg_flavor = openblas +sd_linalg_has_elpa = no +sd_linalg_has_scalapack = no +sd_linalg_init = env +sd_linalg_ldflags = +sd_linalg_libs = -L/opt/local/lib -lopenblas +sd_linalg_ok = yes +sd_mpi_cc = /opt/local/bin/mpicc +sd_mpi_cflags = +sd_mpi_cppflags = -I/opt/local/include +sd_mpi_cxx = /opt/local/bin/mpicxx +sd_mpi_enable = yes +sd_mpi_enable_cxx = yes +sd_mpi_enable_def = auto +sd_mpi_enable_fc = yes +sd_mpi_fc = /opt/local/bin/mpif90 +sd_mpi_fcflags = -I/opt/local/include +sd_mpi_init = dir +sd_mpi_ldflags = +sd_mpi_libs = +sd_mpi_ok = yes +sd_mpi_options = auto optional fail +sd_mpi_policy = fail +sd_mpi_status = optional +sd_netcdf_cflags = +sd_netcdf_cppflags = -I/opt/local/include +sd_netcdf_enable = yes +sd_netcdf_enable_def = yes +sd_netcdf_fcflags = -I/opt/local/include +sd_netcdf_fortran_cflags = +sd_netcdf_fortran_cppflags = -I/opt/local/include +sd_netcdf_fortran_enable = yes +sd_netcdf_fortran_enable_def = yes +sd_netcdf_fortran_fcflags = -I/opt/local/include +sd_netcdf_fortran_init = dir +sd_netcdf_fortran_ldflags = +sd_netcdf_fortran_libs = -L/opt/local/lib -lnetcdff +sd_netcdf_fortran_ok = yes +sd_netcdf_fortran_options = required warn +sd_netcdf_fortran_policy = warn +sd_netcdf_fortran_status = required +sd_netcdf_init = dir +sd_netcdf_ldflags = +sd_netcdf_libs = -L/opt/local/lib -lnetcdf +sd_netcdf_ok = yes +sd_netcdf_options = required warn +sd_netcdf_policy = warn +sd_netcdf_status = required +sd_papi_cflags = +sd_papi_cppflags = +sd_papi_enable = no +sd_papi_enable_def = no +sd_papi_init = def +sd_papi_ldflags = +sd_papi_libs = +sd_papi_ok = unknown +sd_papi_options = optional fail +sd_papi_policy = fail +sd_papi_sd_papi_fcflags = +sd_papi_status = optional +sd_pfft_cflags = +sd_pfft_cppflags = +sd_pfft_enable = no +sd_pfft_enable_def = no +sd_pfft_init = def +sd_pfft_ldflags = +sd_pfft_libs = +sd_pfft_ok = unknown +sd_pfft_options = optional skip +sd_pfft_policy = skip +sd_pfft_status = optional +sd_sys_fcflags = +sd_triqs_cflags = +sd_triqs_cppflags = +sd_triqs_cxxflags = +sd_triqs_enable = no +sd_triqs_enable_def = no +sd_triqs_fcflags = +sd_triqs_init = def +sd_triqs_ldflags = +sd_triqs_libs = +sd_triqs_ok = unknown +sd_triqs_options = optional fail +sd_triqs_policy = fail +sd_triqs_status = optional +sd_wannier90_cppflags = +sd_wannier90_enable = yes +sd_wannier90_enable_def = no +sd_wannier90_fcflags = -I/opt/local/include +sd_wannier90_init = env +sd_wannier90_ldflags = +sd_wannier90_libs = -L/opt/local/lib -lwannier +sd_wannier90_ok = yes +sd_wannier90_options = optional warn +sd_wannier90_policy = warn +sd_wannier90_status = optional +sd_xmlf90_cppflags = +sd_xmlf90_enable = no +sd_xmlf90_enable_def = no +sd_xmlf90_fcflags = +sd_xmlf90_init = def +sd_xmlf90_ldflags = +sd_xmlf90_libs = +sd_xmlf90_ok = unknown +sd_xmlf90_options = optional warn +sd_xmlf90_policy = warn +sd_xmlf90_status = optional +sd_yakl_cppflags = +sd_yakl_enable = no +sd_yakl_enable_def = no +sd_yakl_fcflags = +sd_yakl_init = def +sd_yakl_ldflags = +sd_yakl_libs = +sd_yakl_ok = unknown +sd_yakl_options = optional fail +sd_yakl_policy = fail +sd_yakl_status = optional +sharedstatedir = ${prefix}/com +src_02_clib_fcflags = -I$(top_builddir)/shared/common/src/02_clib -I$(top_srcdir)/shared/common/src/02_clib +src_10_defs_fcflags = -I$(top_builddir)/shared/common/src/10_defs -I$(top_srcdir)/shared/common/src/10_defs +src_11_memory_mpi_fcflags = -I$(top_builddir)/shared/common/src/11_memory_mpi -I$(top_srcdir)/shared/common/src/11_memory_mpi +src_12_hide_mpi_fcflags = -I$(top_builddir)/shared/common/src/12_hide_mpi -I$(top_srcdir)/shared/common/src/12_hide_mpi +src_14_hidewrite_fcflags = -I$(top_builddir)/shared/common/src/14_hidewrite -I$(top_srcdir)/shared/common/src/14_hidewrite +src_16_hideleave_fcflags = -I$(top_builddir)/shared/common/src/16_hideleave -I$(top_srcdir)/shared/common/src/16_hideleave +src_16_kokkos_toolbox_fcflags = -I$(top_builddir)/shared/common/src/16_kokkos_toolbox -I$(top_srcdir)/shared/common/src/16_kokkos_toolbox +src_17_gpu_toolbox_fcflags = -I$(top_builddir)/shared/common/src/17_gpu_toolbox -I$(top_srcdir)/shared/common/src/17_gpu_toolbox +src_17_libtetra_ext_fcflags = -I$(top_builddir)/shared/common/src/17_libtetra_ext -I$(top_srcdir)/shared/common/src/17_libtetra_ext +src_17_minimax_fcflags = -I$(top_builddir)/shared/common/src/17_minimax -I$(top_srcdir)/shared/common/src/17_minimax +src_17_yaml_out_fcflags = -I$(top_builddir)/shared/common/src/17_yaml_out -I$(top_srcdir)/shared/common/src/17_yaml_out +src_18_timing_fcflags = -I$(top_builddir)/shared/common/src/18_timing -I$(top_srcdir)/shared/common/src/18_timing +src_21_hashfuncs_fcflags = -I$(top_builddir)/shared/common/src/21_hashfuncs -I$(top_srcdir)/shared/common/src/21_hashfuncs +src_27_toolbox_oop_fcflags = -I$(top_builddir)/shared/common/src/27_toolbox_oop -I$(top_srcdir)/shared/common/src/27_toolbox_oop +src_28_numeric_noabirule_fcflags = -I$(top_builddir)/shared/common/src/28_numeric_noabirule -I$(top_srcdir)/shared/common/src/28_numeric_noabirule +src_29_kpoints_fcflags = -I$(top_builddir)/shared/common/src/29_kpoints -I$(top_srcdir)/shared/common/src/29_kpoints +src_32_util_fcflags = -I$(top_builddir)/shared/common/src/32_util -I$(top_srcdir)/shared/common/src/32_util +src_33_xc_lowlevel_fcflags = -I$(top_builddir)/shared/common/src/33_xc_lowlevel -I$(top_srcdir)/shared/common/src/33_xc_lowlevel +src_39_libpaw_fcflags = -I$(top_builddir)/shared/libpaw/src -I$(top_srcdir)/shared/libpaw/src +src_41_geometry_fcflags = -I$(top_builddir)/src/41_geometry -I$(top_srcdir)/src/41_geometry +src_42_nlstrain_fcflags = -I$(top_builddir)/src/42_nlstrain -I$(top_srcdir)/src/42_nlstrain +src_42_parser_fcflags = -I$(top_builddir)/src/42_parser -I$(top_srcdir)/src/42_parser +src_43_ptgroups_fcflags = -I$(top_builddir)/src/43_ptgroups -I$(top_srcdir)/src/43_ptgroups +src_43_wvl_wrappers_fcflags = -I$(top_builddir)/src/43_wvl_wrappers -I$(top_srcdir)/src/43_wvl_wrappers +src_44_abitools_fcflags = -I$(top_builddir)/src/44_abitools -I$(top_srcdir)/src/44_abitools +src_44_abitypes_defs_fcflags = -I$(top_builddir)/src/44_abitypes_defs -I$(top_srcdir)/src/44_abitypes_defs +src_44_manage_kokkos_fcflags = -I$(top_builddir)/src/44_manage_kokkos -I$(top_srcdir)/src/44_manage_kokkos +src_45_geomoptim_fcflags = -I$(top_builddir)/src/45_geomoptim -I$(top_srcdir)/src/45_geomoptim +src_45_xgTools_fcflags = -I$(top_builddir)/src/45_xgTools -I$(top_srcdir)/src/45_xgTools +src_46_ghc_omp_fcflags = -I$(top_builddir)/src/46_ghc_omp -I$(top_srcdir)/src/46_ghc_omp +src_46_manage_cuda_fcflags = -I$(top_builddir)/src/46_manage_cuda -I$(top_srcdir)/src/46_manage_cuda +src_48_diago_fcflags = -I$(top_builddir)/src/48_diago -I$(top_srcdir)/src/48_diago +src_49_gw_toolbox_oop_fcflags = -I$(top_builddir)/src/49_gw_toolbox_oop -I$(top_srcdir)/src/49_gw_toolbox_oop +src_51_manage_mpi_fcflags = -I$(top_builddir)/src/51_manage_mpi -I$(top_srcdir)/src/51_manage_mpi +src_52_fft_mpi_noabirule_fcflags = -I$(top_builddir)/src/52_fft_mpi_noabirule -I$(top_srcdir)/src/52_fft_mpi_noabirule +src_53_ffts_fcflags = -I$(top_builddir)/src/53_ffts -I$(top_srcdir)/src/53_ffts +src_54_spacepar_fcflags = -I$(top_builddir)/src/54_spacepar -I$(top_srcdir)/src/54_spacepar +src_55_abiutil_fcflags = -I$(top_builddir)/src/55_abiutil -I$(top_srcdir)/src/55_abiutil +src_56_io_mpi_fcflags = -I$(top_builddir)/src/56_io_mpi -I$(top_srcdir)/src/56_io_mpi +src_56_mixing_fcflags = -I$(top_builddir)/src/56_mixing -I$(top_srcdir)/src/56_mixing +src_56_recipspace_fcflags = -I$(top_builddir)/src/56_recipspace -I$(top_srcdir)/src/56_recipspace +src_56_xc_fcflags = -I$(top_builddir)/src/56_xc -I$(top_srcdir)/src/56_xc +src_57_iopsp_parser_fcflags = -I$(top_builddir)/src/57_iopsp_parser -I$(top_srcdir)/src/57_iopsp_parser +src_57_iovars_fcflags = -I$(top_builddir)/src/57_iovars -I$(top_srcdir)/src/57_iovars +src_61_occeig_fcflags = -I$(top_builddir)/src/61_occeig -I$(top_srcdir)/src/61_occeig +src_62_cg_noabirule_fcflags = -I$(top_builddir)/src/62_cg_noabirule -I$(top_srcdir)/src/62_cg_noabirule +src_62_ctqmc_fcflags = -I$(top_builddir)/src/62_ctqmc -I$(top_srcdir)/src/62_ctqmc +src_62_iowfdenpot_fcflags = -I$(top_builddir)/src/62_iowfdenpot -I$(top_srcdir)/src/62_iowfdenpot +src_62_poisson_fcflags = -I$(top_builddir)/src/62_poisson -I$(top_srcdir)/src/62_poisson +src_62_wvl_wfs_fcflags = -I$(top_builddir)/src/62_wvl_wfs -I$(top_srcdir)/src/62_wvl_wfs +src_64_psp_fcflags = -I$(top_builddir)/src/64_psp -I$(top_srcdir)/src/64_psp +src_65_lotf_base_fcflags = -I$(top_builddir)/src/65_lotf_base -I$(top_srcdir)/src/65_lotf_base +src_65_paw_fcflags = -I$(top_builddir)/src/65_paw -I$(top_srcdir)/src/65_paw +src_66_nonlocal_fcflags = -I$(top_builddir)/src/66_nonlocal -I$(top_srcdir)/src/66_nonlocal +src_66_vdwxc_fcflags = -I$(top_builddir)/src/66_vdwxc -I$(top_srcdir)/src/66_vdwxc +src_66_wfs_fcflags = -I$(top_builddir)/src/66_wfs -I$(top_srcdir)/src/66_wfs +src_67_common_fcflags = -I$(top_builddir)/src/67_common -I$(top_srcdir)/src/67_common +src_67_python_invocation_ext_fcflags = -I$(top_builddir)/src/67_python_invocation_ext -I$(top_srcdir)/src/67_python_invocation_ext +src_67_triqs_ext_fcflags = -I$(top_builddir)/src/67_triqs_ext -I$(top_srcdir)/src/67_triqs_ext +src_68_dmft_fcflags = -I$(top_builddir)/src/68_dmft -I$(top_srcdir)/src/68_dmft +src_68_lotf_fcflags = -I$(top_builddir)/src/68_lotf -I$(top_srcdir)/src/68_lotf +src_68_recursion_fcflags = -I$(top_builddir)/src/68_recursion -I$(top_srcdir)/src/68_recursion +src_68_rsprc_fcflags = -I$(top_builddir)/src/68_rsprc -I$(top_srcdir)/src/68_rsprc +src_69_wfdesc_fcflags = -I$(top_builddir)/src/69_wfdesc -I$(top_srcdir)/src/69_wfdesc +src_70_gw_fcflags = -I$(top_builddir)/src/70_gw -I$(top_srcdir)/src/70_gw +src_71_bse_fcflags = -I$(top_builddir)/src/71_bse -I$(top_srcdir)/src/71_bse +src_71_wannier_fcflags = -I$(top_builddir)/src/71_wannier -I$(top_srcdir)/src/71_wannier +src_72_response_fcflags = -I$(top_builddir)/src/72_response -I$(top_srcdir)/src/72_response +src_77_ddb_fcflags = -I$(top_builddir)/src/77_ddb -I$(top_srcdir)/src/77_ddb +src_77_suscep_fcflags = -I$(top_builddir)/src/77_suscep -I$(top_srcdir)/src/77_suscep +src_78_effpot_fcflags = -I$(top_builddir)/src/78_effpot -I$(top_srcdir)/src/78_effpot +src_78_eph_fcflags = -I$(top_builddir)/src/78_eph -I$(top_srcdir)/src/78_eph +src_79_seqpar_mpi_fcflags = -I$(top_builddir)/src/79_seqpar_mpi -I$(top_srcdir)/src/79_seqpar_mpi +src_80_rttddft_fcflags = -I$(top_builddir)/src/80_rttddft -I$(top_srcdir)/src/80_rttddft +src_80_tdep_fcflags = -I$(top_builddir)/src/80_tdep -I$(top_srcdir)/src/80_tdep +src_94_scfcv_fcflags = -I$(top_builddir)/src/94_scfcv -I$(top_srcdir)/src/94_scfcv +src_95_drive_fcflags = -I$(top_builddir)/src/95_drive -I$(top_srcdir)/src/95_drive +src_common_fcflags = -I$(top_builddir)/shared/common/src/incs -I$(top_srcdir)/shared/common/src/incs -I$(top_builddir)/shared/common/src/mods -I$(top_srcdir)/shared/common/src/mods +src_core_fcflags = -I$(top_builddir)/src/incs -I$(top_srcdir)/src/incs -I$(top_builddir)/src/mods -I$(top_srcdir)/src/mods +src_libpaw_fcflags = -I$(top_builddir)/shared/libpaw/incs -I$(top_srcdir)/shared/libpaw/incs -I$(top_builddir)/shared/libpaw/mods -I$(top_srcdir)/shared/libpaw/mods +srcdir = . +sysconfdir = ${prefix}/etc +target = x86_64-apple-darwin18.7.0 +target_alias = +target_cpu = x86_64 +target_os = darwin18.7.0 +target_vendor = apple +top_build_prefix = ../../../../ +top_builddir = ../../../.. +top_srcdir = ../../../.. +with_abinit_common = +with_bigdft = +with_config_file = +with_debug_flavor = +with_fallbacks = +with_fc_vendor = +with_fc_version = +with_fft_flavor = fftw3 +with_fftw3 = +with_gnu_ld = +with_gpu = +with_hdf5 = /opt/local +with_kokkos = +with_levmar = +with_libpaw = +with_libpsml = +with_libxc = /opt/local +with_libxml2 = +with_linalg_flavor = openblas +with_mpi = /opt/local +with_mpi_level = +with_netcdf = /opt/local +with_optim_flavor = +with_papi = +with_pfft = +with_triqs = +with_wannier90 = +with_xmlf90 = +with_yakl = +AM_CFLAGS = -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include +AM_CXXFLAGS = $(sd_triqs_cxxflags) +AM_FCFLAGS = -ffree-form -J../mods +AM_CPPFLAGS = \ + -I$(top_builddir)/shared/common/src/10_defs -I$(top_srcdir)/shared/common/src/10_defs \ + -I$(top_builddir)/shared/common/src/14_hidewrite -I$(top_srcdir)/shared/common/src/14_hidewrite \ + -I$(top_builddir)/shared/common/src/16_hideleave -I$(top_srcdir)/shared/common/src/16_hideleave \ + -I$(top_builddir)/shared/common/src/28_numeric_noabirule -I$(top_srcdir)/shared/common/src/28_numeric_noabirule \ + -I$(top_builddir)/shared/common/src/33_xc_lowlevel -I$(top_srcdir)/shared/common/src/33_xc_lowlevel \ + -I$(top_builddir)/shared/common/src/incs -I$(top_srcdir)/shared/common/src/incs -I$(top_builddir)/shared/common/src/mods -I$(top_srcdir)/shared/common/src/mods \ + -I$(top_builddir)/src/incs -I$(top_srcdir)/src/incs -I$(top_builddir)/src/mods -I$(top_srcdir)/src/mods \ + -I$(top_builddir)/shared/libpaw/incs -I$(top_srcdir)/shared/libpaw/incs -I$(top_builddir)/shared/libpaw/mods -I$(top_srcdir)/shared/libpaw/mods \ + -I/opt/local/include \ + -I/opt/local/include \ + -I/opt/local/include \ + \ + + + +# Regular source files +lib33_xc_lowlevel_srcs = \ + libxc_tools.c \ + m_libxc_functionals.F90 \ + m_drivexc.F90 \ + m_xc_noncoll.F90 \ + m_xchcth.F90 \ + m_xciit.F90 \ + m_xcpbe.F90 \ + m_xcpositron.F90 \ + m_xclda.F90 + + +# Source files depending on conditionals + +# Library description +noinst_LIBRARIES = lib33_xc_lowlevel.a +lib33_xc_lowlevel_a_SOURCES = $(lib33_xc_lowlevel_srcs) + +# Dependencies (inside the directory) of directory 33_xc_lowlevel +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. +CLEANFILES = libxc_tools_cpp.c m_libxc_functionals_cpp.f90 \ + m_drivexc_cpp.f90 m_xc_noncoll_cpp.f90 m_xchcth_cpp.f90 \ + m_xciit_cpp.f90 m_xcpbe_cpp.f90 m_xcpositron_cpp.f90 \ + m_xclda_cpp.f90 m_drivexc.$(MODEXT) \ + m_libxc_functionals.$(MODEXT) m_xc_noncoll.$(MODEXT) \ + m_xchcth.$(MODEXT) m_xciit.$(MODEXT) m_xclda.$(MODEXT) \ + m_xcpbe.$(MODEXT) m_xcpositron.$(MODEXT) +EXTRA_DIST = abinit.src abinit.dep _33_xc_lowlevel_ +all: all-am + +.SUFFIXES: +.SUFFIXES: .F90 .c .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu shared/common/src/33_xc_lowlevel/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu shared/common/src/33_xc_lowlevel/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) + +lib33_xc_lowlevel.a: $(lib33_xc_lowlevel_a_OBJECTS) $(lib33_xc_lowlevel_a_DEPENDENCIES) $(EXTRA_lib33_xc_lowlevel_a_DEPENDENCIES) + $(AM_V_at)-rm -f lib33_xc_lowlevel.a + $(AM_V_AR)$(lib33_xc_lowlevel_a_AR) lib33_xc_lowlevel.a $(lib33_xc_lowlevel_a_OBJECTS) $(lib33_xc_lowlevel_a_LIBADD) + $(AM_V_at)$(RANLIB) lib33_xc_lowlevel.a + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +include ./$(DEPDIR)/libxc_tools.Po # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) + +.F90.o: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ $< + +.F90.obj: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.c.o: + $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< + $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# $(AM_V_CC)source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(COMPILE) -c -o $@ $< + +.c.obj: + $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` + $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# $(AM_V_CC)source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -f ./$(DEPDIR)/libxc_tools.Po + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f ./$(DEPDIR)/libxc_tools.Po + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ + clean-generic clean-noinstLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am + +.PRECIOUS: Makefile + + +m_drivexc.$(OBJEXT): m_xchcth.$(OBJEXT) m_xciit.$(OBJEXT) m_xclda.$(OBJEXT) m_xcpbe.$(OBJEXT) + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/GX-PAW/common/src/33_xc_lowlevel/Makefile.am b/GX-PAW/common/src/33_xc_lowlevel/Makefile.am new file mode 100644 index 00000000..b7770d91 --- /dev/null +++ b/GX-PAW/common/src/33_xc_lowlevel/Makefile.am @@ -0,0 +1,83 @@ +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-corelibs on 2024/03/16 21:07:38 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-corelibs script or its config file instead. +# + +AM_CFLAGS = @ABI_CPPFLAGS@ +AM_CXXFLAGS = $(sd_triqs_cxxflags) +AM_FCFLAGS = @FPPFLAGS@ @FCFLAGS_FREEFORM@ @FCFLAGS_MODDIR@ @sd_sys_fcflags@ @fcflags_opt_33_xc_lowlevel@ + +AM_CPPFLAGS = \ + @src_10_defs_fcflags@ \ + @src_14_hidewrite_fcflags@ \ + @src_16_hideleave_fcflags@ \ + @src_28_numeric_noabirule_fcflags@ \ + @src_33_xc_lowlevel_fcflags@ \ + @src_common_fcflags@ \ + @src_core_fcflags@ \ + @src_libpaw_fcflags@ \ + @sd_fft_cppflags@ \ + @sd_fft_fcflags@ \ + @sd_libxc_cppflags@ \ + @sd_libxc_fcflags@ \ + @fc_mod_fcflags@ + +# Regular source files +lib33_xc_lowlevel_srcs = \ + libxc_tools.c \ + m_libxc_functionals.F90 \ + m_drivexc.F90 \ + m_xc_noncoll.F90 \ + m_xchcth.F90 \ + m_xciit.F90 \ + m_xcpbe.F90 \ + m_xcpositron.F90 \ + m_xclda.F90 + +# Source files depending on conditionals + + +# Library description +noinst_LIBRARIES = lib33_xc_lowlevel.a + +lib33_xc_lowlevel_a_SOURCES= $(lib33_xc_lowlevel_srcs) + +CLEANFILES = \ + libxc_tools_cpp.c \ + m_libxc_functionals_cpp.f90 \ + m_drivexc_cpp.f90 \ + m_xc_noncoll_cpp.f90 \ + m_xchcth_cpp.f90 \ + m_xciit_cpp.f90 \ + m_xcpbe_cpp.f90 \ + m_xcpositron_cpp.f90 \ + m_xclda_cpp.f90 + +EXTRA_DIST = abinit.src + +EXTRA_DIST += abinit.dep + +# Dependencies (inside the directory) of directory 33_xc_lowlevel +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. + +CLEANFILES += \ + m_drivexc.$(MODEXT) \ + m_libxc_functionals.$(MODEXT) \ + m_xc_noncoll.$(MODEXT) \ + m_xchcth.$(MODEXT) \ + m_xciit.$(MODEXT) \ + m_xclda.$(MODEXT) \ + m_xcpbe.$(MODEXT) \ + m_xcpositron.$(MODEXT) + +m_drivexc.$(OBJEXT): m_xchcth.$(OBJEXT) m_xciit.$(OBJEXT) m_xclda.$(OBJEXT) m_xcpbe.$(OBJEXT) +EXTRA_DIST += _33_xc_lowlevel_ diff --git a/GX-PAW/common/src/33_xc_lowlevel/Makefile.in b/GX-PAW/common/src/33_xc_lowlevel/Makefile.in new file mode 100644 index 00000000..3cd66f29 --- /dev/null +++ b/GX-PAW/common/src/33_xc_lowlevel/Makefile.in @@ -0,0 +1,1519 @@ +# Makefile.in generated by automake 1.16.3 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2020 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-corelibs on 2024/03/16 21:07:38 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-corelibs script or its config file instead. +# + +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = shared/common/src/33_xc_lowlevel +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/m4/arch-gpu.m4 \ + $(top_srcdir)/config/m4/arch-mpi.m4 \ + $(top_srcdir)/config/m4/auto-autotools.m4 \ + $(top_srcdir)/config/m4/auto-corelibs.m4 \ + $(top_srcdir)/config/m4/auto-debug.m4 \ + $(top_srcdir)/config/m4/auto-dirflags.m4 \ + $(top_srcdir)/config/m4/auto-env.m4 \ + $(top_srcdir)/config/m4/auto-hints.m4 \ + $(top_srcdir)/config/m4/auto-optim.m4 \ + $(top_srcdir)/config/m4/auto-options.m4 \ + $(top_srcdir)/config/m4/auto-output.m4 \ + $(top_srcdir)/config/m4/auto-triggers.m4 \ + $(top_srcdir)/config/m4/conf-atompaw.m4 \ + $(top_srcdir)/config/m4/conf-debug.m4 \ + $(top_srcdir)/config/m4/conf-fallbacks.m4 \ + $(top_srcdir)/config/m4/conf-files.m4 \ + $(top_srcdir)/config/m4/conf-init.m4 \ + $(top_srcdir)/config/m4/conf-openmp.m4 \ + $(top_srcdir)/config/m4/conf-optim.m4 \ + $(top_srcdir)/config/m4/lang-c++.m4 \ + $(top_srcdir)/config/m4/lang-c.m4 \ + $(top_srcdir)/config/m4/lang-fortran-import.m4 \ + $(top_srcdir)/config/m4/lang-fortran.m4 \ + $(top_srcdir)/config/m4/lang-python.m4 \ + $(top_srcdir)/config/m4/libxml2.m4 \ + $(top_srcdir)/config/m4/misc-display.m4 \ + $(top_srcdir)/config/m4/sd_abinit_common.m4 \ + $(top_srcdir)/config/m4/sd_arch_gpu.m4 \ + $(top_srcdir)/config/m4/sd_arch_mpi.m4 \ + $(top_srcdir)/config/m4/sd_bigdft.m4 \ + $(top_srcdir)/config/m4/sd_core.m4 \ + $(top_srcdir)/config/m4/sd_esl.m4 \ + $(top_srcdir)/config/m4/sd_fftw3.m4 \ + $(top_srcdir)/config/m4/sd_gpu_kokkos.m4 \ + $(top_srcdir)/config/m4/sd_gpu_yakl.m4 \ + $(top_srcdir)/config/m4/sd_io_hdf5.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf_fortran.m4 \ + $(top_srcdir)/config/m4/sd_levmar.m4 \ + $(top_srcdir)/config/m4/sd_libpaw.m4 \ + $(top_srcdir)/config/m4/sd_libpsml.m4 \ + $(top_srcdir)/config/m4/sd_libxc.m4 \ + $(top_srcdir)/config/m4/sd_math_fft.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_core.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_util.m4 \ + $(top_srcdir)/config/m4/sd_papi.m4 \ + $(top_srcdir)/config/m4/sd_pfft.m4 \ + $(top_srcdir)/config/m4/sd_triqs.m4 \ + $(top_srcdir)/config/m4/sd_wannier90.m4 \ + $(top_srcdir)/config/m4/sd_xmlf90.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = +lib33_xc_lowlevel_a_AR = $(AR) $(ARFLAGS) +lib33_xc_lowlevel_a_LIBADD = +am__objects_1 = libxc_tools.$(OBJEXT) m_libxc_functionals.$(OBJEXT) \ + m_drivexc.$(OBJEXT) m_xc_noncoll.$(OBJEXT) m_xchcth.$(OBJEXT) \ + m_xciit.$(OBJEXT) m_xcpbe.$(OBJEXT) m_xcpositron.$(OBJEXT) \ + m_xclda.$(OBJEXT) +am_lib33_xc_lowlevel_a_OBJECTS = $(am__objects_1) +lib33_xc_lowlevel_a_OBJECTS = $(am_lib33_xc_lowlevel_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/config/gnu/depcomp +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/libxc_tools.Po +am__mv = mv -f +PPFCCOMPILE = $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) +AM_V_PPFC = $(am__v_PPFC_@AM_V@) +am__v_PPFC_ = $(am__v_PPFC_@AM_DEFAULT_V@) +am__v_PPFC_0 = @echo " PPFC " $@; +am__v_PPFC_1 = +FCLD = $(FC) +FCLINK = $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \ + $@ +AM_V_FCLD = $(am__v_FCLD_@AM_V@) +am__v_FCLD_ = $(am__v_FCLD_@AM_DEFAULT_V@) +am__v_FCLD_0 = @echo " FCLD " $@; +am__v_FCLD_1 = +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(lib33_xc_lowlevel_a_SOURCES) +DIST_SOURCES = $(lib33_xc_lowlevel_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in \ + $(top_srcdir)/config/gnu/depcomp README +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ABINIT_BINARY_PACKAGE = @ABINIT_BINARY_PACKAGE@ +ABINIT_COMMON_CPPFLAGS = @ABINIT_COMMON_CPPFLAGS@ +ABINIT_COMMON_FCFLAGS = @ABINIT_COMMON_FCFLAGS@ +ABINIT_COMMON_LDFLAGS = @ABINIT_COMMON_LDFLAGS@ +ABINIT_COMMON_LIBS = @ABINIT_COMMON_LIBS@ +ABINIT_TARGET = @ABINIT_TARGET@ +ABINIT_VERSION = @ABINIT_VERSION@ +ABINIT_VERSION_BASE = @ABINIT_VERSION_BASE@ +ABINIT_VERSION_BUILD = @ABINIT_VERSION_BUILD@ +ABINIT_VERSION_MAJOR = @ABINIT_VERSION_MAJOR@ +ABINIT_VERSION_MICRO = @ABINIT_VERSION_MICRO@ +ABINIT_VERSION_MINOR = @ABINIT_VERSION_MINOR@ +ABI_CPPFLAGS = @ABI_CPPFLAGS@ +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +ARFLAGS = @ARFLAGS@ +ARFLAGS_CMD = @ARFLAGS_CMD@ +ARFLAGS_DEBUG = @ARFLAGS_DEBUG@ +ARFLAGS_EXTRA = @ARFLAGS_EXTRA@ +ARFLAGS_HINTS = @ARFLAGS_HINTS@ +ARFLAGS_OPTIM = @ARFLAGS_OPTIM@ +ATOMPAW_BIN = @ATOMPAW_BIN@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BIGDFT_CPPFLAGS = @BIGDFT_CPPFLAGS@ +BIGDFT_FCFLAGS = @BIGDFT_FCFLAGS@ +BIGDFT_LDFLAGS = @BIGDFT_LDFLAGS@ +BIGDFT_LIBS = @BIGDFT_LIBS@ +BOURNE_SHELL = @BOURNE_SHELL@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CC_LDFLAGS = @CC_LDFLAGS@ +CC_LDFLAGS_DEBUG = @CC_LDFLAGS_DEBUG@ +CC_LDFLAGS_EXTRA = @CC_LDFLAGS_EXTRA@ +CC_LDFLAGS_GPU = @CC_LDFLAGS_GPU@ +CC_LDFLAGS_HINTS = @CC_LDFLAGS_HINTS@ +CC_LDFLAGS_OPTIM = @CC_LDFLAGS_OPTIM@ +CC_LIBS = @CC_LIBS@ +CC_LIBS_DEBUG = @CC_LIBS_DEBUG@ +CC_LIBS_EXTRA = @CC_LIBS_EXTRA@ +CC_LIBS_GPU = @CC_LIBS_GPU@ +CC_LIBS_HINTS = @CC_LIBS_HINTS@ +CC_LIBS_OPTIM = @CC_LIBS_OPTIM@ +CFLAGS = @CFLAGS@ +CFLAGS_DEBUG = @CFLAGS_DEBUG@ +CFLAGS_EXTRA = @CFLAGS_EXTRA@ +CFLAGS_GPU = @CFLAGS_GPU@ +CFLAGS_HINTS = @CFLAGS_HINTS@ +CFLAGS_OPTIM = @CFLAGS_OPTIM@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CPPFLAGS_DEBUG = @CPPFLAGS_DEBUG@ +CPPFLAGS_EXTRA = @CPPFLAGS_EXTRA@ +CPPFLAGS_GPU = @CPPFLAGS_GPU@ +CPPFLAGS_HINTS = @CPPFLAGS_HINTS@ +CPPFLAGS_HINTS_EXT = @CPPFLAGS_HINTS_EXT@ +CPPFLAGS_OPTIM = @CPPFLAGS_OPTIM@ +CXX = @CXX@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CXXFLAGS_DEBUG = @CXXFLAGS_DEBUG@ +CXXFLAGS_EXTRA = @CXXFLAGS_EXTRA@ +CXXFLAGS_GPU = @CXXFLAGS_GPU@ +CXXFLAGS_HINTS = @CXXFLAGS_HINTS@ +CXXFLAGS_OPTIM = @CXXFLAGS_OPTIM@ +CXX_LDFLAGS = @CXX_LDFLAGS@ +CXX_LDFLAGS_DEBUG = @CXX_LDFLAGS_DEBUG@ +CXX_LDFLAGS_EXTRA = @CXX_LDFLAGS_EXTRA@ +CXX_LDFLAGS_GPU = @CXX_LDFLAGS_GPU@ +CXX_LDFLAGS_HINTS = @CXX_LDFLAGS_HINTS@ +CXX_LDFLAGS_OPTIM = @CXX_LDFLAGS_OPTIM@ +CXX_LIBS = @CXX_LIBS@ +CXX_LIBS_DEBUG = @CXX_LIBS_DEBUG@ +CXX_LIBS_EXTRA = @CXX_LIBS_EXTRA@ +CXX_LIBS_GPU = @CXX_LIBS_GPU@ +CXX_LIBS_HINTS = @CXX_LIBS_HINTS@ +CXX_LIBS_OPTIM = @CXX_LIBS_OPTIM@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ +FCFLAGS = @FCFLAGS@ +FCFLAGS_DEBUG = @FCFLAGS_DEBUG@ +FCFLAGS_EXTRA = @FCFLAGS_EXTRA@ +FCFLAGS_F90 = @FCFLAGS_F90@ +FCFLAGS_FIXEDFORM = @FCFLAGS_FIXEDFORM@ +FCFLAGS_FREEFORM = @FCFLAGS_FREEFORM@ +FCFLAGS_HINTS = @FCFLAGS_HINTS@ +FCFLAGS_MODDIR = @FCFLAGS_MODDIR@ +FCFLAGS_OPENMP = @FCFLAGS_OPENMP@ +FCFLAGS_OPENMP_OFFLOAD = @FCFLAGS_OPENMP_OFFLOAD@ +FCFLAGS_OPTIM = @FCFLAGS_OPTIM@ +FCLIBS = @FCLIBS@ +FC_LDFLAGS = @FC_LDFLAGS@ +FC_LDFLAGS_DEBUG = @FC_LDFLAGS_DEBUG@ +FC_LDFLAGS_EXTRA = @FC_LDFLAGS_EXTRA@ +FC_LDFLAGS_HINTS = @FC_LDFLAGS_HINTS@ +FC_LDFLAGS_OPTIM = @FC_LDFLAGS_OPTIM@ +FC_LIBS = @FC_LIBS@ +FC_LIBS_DEBUG = @FC_LIBS_DEBUG@ +FC_LIBS_EXTRA = @FC_LIBS_EXTRA@ +FC_LIBS_HINTS = @FC_LIBS_HINTS@ +FC_LIBS_OPTIM = @FC_LIBS_OPTIM@ +FC_NOWRAP = @FC_NOWRAP@ +FFLAGS = @FFLAGS@ +FFTW3_CFLAGS = @FFTW3_CFLAGS@ +FFTW3_CPPFLAGS = @FFTW3_CPPFLAGS@ +FFTW3_FCFLAGS = @FFTW3_FCFLAGS@ +FFTW3_LDFLAGS = @FFTW3_LDFLAGS@ +FFTW3_LIBS = @FFTW3_LIBS@ +FFT_CFLAGS = @FFT_CFLAGS@ +FFT_FCFLAGS = @FFT_FCFLAGS@ +FPP = @FPP@ +FPPFLAGS = @FPPFLAGS@ +FPPFLAGS_DEBUG = @FPPFLAGS_DEBUG@ +FPPFLAGS_EXTRA = @FPPFLAGS_EXTRA@ +FPPFLAGS_HINTS = @FPPFLAGS_HINTS@ +FPPFLAGS_OPTIM = @FPPFLAGS_OPTIM@ +GPU_ARCH = @GPU_ARCH@ +GPU_CFLAGS = @GPU_CFLAGS@ +GPU_CPPFLAGS = @GPU_CPPFLAGS@ +GPU_CXXFLAGS = @GPU_CXXFLAGS@ +GPU_FCFLAGS = @GPU_FCFLAGS@ +GPU_LDFLAGS = @GPU_LDFLAGS@ +GPU_LIBS = @GPU_LIBS@ +GRAPHATOM_BIN = @GRAPHATOM_BIN@ +GREP = @GREP@ +H5CC = @H5CC@ +HDF5_CFLAGS = @HDF5_CFLAGS@ +HDF5_CPPFLAGS = @HDF5_CPPFLAGS@ +HDF5_CXXFLAGS = @HDF5_CXXFLAGS@ +HDF5_FCFLAGS = @HDF5_FCFLAGS@ +HDF5_LDFLAGS = @HDF5_LDFLAGS@ +HDF5_LIBS = @HDF5_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +LDFLAGS = @LDFLAGS@ +LEVMAR_CFLAGS = @LEVMAR_CFLAGS@ +LEVMAR_CPPFLAGS = @LEVMAR_CPPFLAGS@ +LEVMAR_LDFLAGS = @LEVMAR_LDFLAGS@ +LEVMAR_LIBS = @LEVMAR_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPAW_CPPFLAGS = @LIBPAW_CPPFLAGS@ +LIBPAW_FCFLAGS = @LIBPAW_FCFLAGS@ +LIBPAW_LDFLAGS = @LIBPAW_LDFLAGS@ +LIBPAW_LIBS = @LIBPAW_LIBS@ +LIBPSML_CPPFLAGS = @LIBPSML_CPPFLAGS@ +LIBPSML_FCFLAGS = @LIBPSML_FCFLAGS@ +LIBPSML_LDFLAGS = @LIBPSML_LDFLAGS@ +LIBPSML_LIBS = @LIBPSML_LIBS@ +LIBS = @LIBS@ +LIBXC_CFLAGS = @LIBXC_CFLAGS@ +LIBXC_CPPFLAGS = @LIBXC_CPPFLAGS@ +LIBXC_FCFLAGS = @LIBXC_FCFLAGS@ +LIBXC_LDFLAGS = @LIBXC_LDFLAGS@ +LIBXC_LIBS = @LIBXC_LIBS@ +LIBXML2_CPPFLAGS = @LIBXML2_CPPFLAGS@ +LIBXML2_FCFLAGS = @LIBXML2_FCFLAGS@ +LIBXML2_LIBS = @LIBXML2_LIBS@ +LINALG_CFLAGS = @LINALG_CFLAGS@ +LINALG_CPPFLAGS = @LINALG_CPPFLAGS@ +LINALG_CXXFLAGS = @LINALG_CXXFLAGS@ +LINALG_FCFLAGS = @LINALG_FCFLAGS@ +LINALG_LDFLAGS = @LINALG_LDFLAGS@ +LINALG_LIBS = @LINALG_LIBS@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODEXT = @MODEXT@ +MPI_CFLAGS = @MPI_CFLAGS@ +MPI_CPPFLAGS = @MPI_CPPFLAGS@ +MPI_CXXFLAGS = @MPI_CXXFLAGS@ +MPI_FCFLAGS = @MPI_FCFLAGS@ +MPI_LDFLAGS = @MPI_LDFLAGS@ +MPI_LIBS = @MPI_LIBS@ +MV = @MV@ +NETCDF_CFLAGS = @NETCDF_CFLAGS@ +NETCDF_CPPFLAGS = @NETCDF_CPPFLAGS@ +NETCDF_CXXFLAGS = @NETCDF_CXXFLAGS@ +NETCDF_FCFLAGS = @NETCDF_FCFLAGS@ +NETCDF_FORTRAN_CFLAGS = @NETCDF_FORTRAN_CFLAGS@ +NETCDF_FORTRAN_CPPFLAGS = @NETCDF_FORTRAN_CPPFLAGS@ +NETCDF_FORTRAN_CXXFLAGS = @NETCDF_FORTRAN_CXXFLAGS@ +NETCDF_FORTRAN_FCFLAGS = @NETCDF_FORTRAN_FCFLAGS@ +NETCDF_FORTRAN_LDFLAGS = @NETCDF_FORTRAN_LDFLAGS@ +NETCDF_FORTRAN_LIBS = @NETCDF_FORTRAN_LIBS@ +NETCDF_LDFLAGS = @NETCDF_LDFLAGS@ +NETCDF_LIBS = @NETCDF_LIBS@ +NVCC = @NVCC@ +NVCC_CFLAGS = @NVCC_CFLAGS@ +NVCC_CPPFLAGS = @NVCC_CPPFLAGS@ +NVCC_LDFLAGS = @NVCC_LDFLAGS@ +NVCC_LIBS = @NVCC_LIBS@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PAPI_CFLAGS = @PAPI_CFLAGS@ +PAPI_CPPFLAGS = @PAPI_CPPFLAGS@ +PAPI_LDFLAGS = @PAPI_LDFLAGS@ +PAPI_LIBS = @PAPI_LIBS@ +PATCH = @PATCH@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PFFT_CFLAGS = @PFFT_CFLAGS@ +PFFT_CPPFLAGS = @PFFT_CPPFLAGS@ +PFFT_LDFLAGS = @PFFT_LDFLAGS@ +PFFT_LIBS = @PFFT_LIBS@ +PYFLAGS = @PYFLAGS@ +PYTHON = @PYTHON@ +PYTHON_CONFIG = @PYTHON_CONFIG@ +PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ +RANLIB = @RANLIB@ +REALPATH = @REALPATH@ +RM = @RM@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +TAR = @TAR@ +TRIQS_CFLAGS = @TRIQS_CFLAGS@ +TRIQS_CPPFLAGS = @TRIQS_CPPFLAGS@ +TRIQS_CXXFLAGS = @TRIQS_CXXFLAGS@ +TRIQS_LDFLAGS = @TRIQS_LDFLAGS@ +TRIQS_LIBS = @TRIQS_LIBS@ +TRUE_CPP = @TRUE_CPP@ +VERSION = @VERSION@ +WANNIER90_CPPFLAGS = @WANNIER90_CPPFLAGS@ +WANNIER90_FCFLAGS = @WANNIER90_FCFLAGS@ +WANNIER90_LDFLAGS = @WANNIER90_LDFLAGS@ +WANNIER90_LIBS = @WANNIER90_LIBS@ +XML2_CONFIG = @XML2_CONFIG@ +XMLF90_CPPFLAGS = @XMLF90_CPPFLAGS@ +XMLF90_FCFLAGS = @XMLF90_FCFLAGS@ +XMLF90_LDFLAGS = @XMLF90_LDFLAGS@ +XMLF90_LIBS = @XMLF90_LIBS@ +XML_CPPFLAGS = @XML_CPPFLAGS@ +XML_LIBS = @XML_LIBS@ +XPP = @XPP@ +XPPFLAGS = @XPPFLAGS@ +XPPFLAGS_DEBUG = @XPPFLAGS_DEBUG@ +XPPFLAGS_EXTRA = @XPPFLAGS_EXTRA@ +XPPFLAGS_OPTIM = @XPPFLAGS_OPTIM@ +YAKL_CPPFLAGS = @YAKL_CPPFLAGS@ +YAKL_FCFLAGS = @YAKL_FCFLAGS@ +YAKL_LDFLAGS = @YAKL_LDFLAGS@ +YAKL_LIBS = @YAKL_LIBS@ +abi_ac_distcheck = @abi_ac_distcheck@ +abi_ac_version = @abi_ac_version@ +abi_am_version = @abi_am_version@ +abi_avx_safe_mode_enable = @abi_avx_safe_mode_enable@ +abi_bse_unpacked_enable = @abi_bse_unpacked_enable@ +abi_cc_path = @abi_cc_path@ +abi_cc_vendor = @abi_cc_vendor@ +abi_cc_version = @abi_cc_version@ +abi_cclock_enable = @abi_cclock_enable@ +abi_cpp_path = @abi_cpp_path@ +abi_cpu_64bits = @abi_cpu_64bits@ +abi_cpu_bits = @abi_cpu_bits@ +abi_cpu_model = @abi_cpu_model@ +abi_cpu_platform = @abi_cpu_platform@ +abi_cpu_spec = @abi_cpu_spec@ +abi_cpu_vendor = @abi_cpu_vendor@ +abi_crpa_optim_enable = @abi_crpa_optim_enable@ +abi_cxx_path = @abi_cxx_path@ +abi_cxx_vendor = @abi_cxx_vendor@ +abi_cxx_version = @abi_cxx_version@ +abi_debug_flavor = @abi_debug_flavor@ +abi_exports_enable = @abi_exports_enable@ +abi_fbk_abinit_common_ok = @abi_fbk_abinit_common_ok@ +abi_fbk_bigdft_ok = @abi_fbk_bigdft_ok@ +abi_fbk_config = @abi_fbk_config@ +abi_fbk_enable = @abi_fbk_enable@ +abi_fbk_fft_ok = @abi_fbk_fft_ok@ +abi_fbk_fftw3_ok = @abi_fbk_fftw3_ok@ +abi_fbk_gpu_ok = @abi_fbk_gpu_ok@ +abi_fbk_hdf5_ok = @abi_fbk_hdf5_ok@ +abi_fbk_init = @abi_fbk_init@ +abi_fbk_kokkos_ok = @abi_fbk_kokkos_ok@ +abi_fbk_levmar_ok = @abi_fbk_levmar_ok@ +abi_fbk_libpaw_ok = @abi_fbk_libpaw_ok@ +abi_fbk_libpsml_ok = @abi_fbk_libpsml_ok@ +abi_fbk_libxc_ok = @abi_fbk_libxc_ok@ +abi_fbk_libxml2_ok = @abi_fbk_libxml2_ok@ +abi_fbk_linalg_ok = @abi_fbk_linalg_ok@ +abi_fbk_list = @abi_fbk_list@ +abi_fbk_mpi_ok = @abi_fbk_mpi_ok@ +abi_fbk_netcdf_fortran_ok = @abi_fbk_netcdf_fortran_ok@ +abi_fbk_netcdf_ok = @abi_fbk_netcdf_ok@ +abi_fbk_papi_ok = @abi_fbk_papi_ok@ +abi_fbk_pfft_ok = @abi_fbk_pfft_ok@ +abi_fbk_prefix = @abi_fbk_prefix@ +abi_fbk_required = @abi_fbk_required@ +abi_fbk_triqs_ok = @abi_fbk_triqs_ok@ +abi_fbk_wannier90_ok = @abi_fbk_wannier90_ok@ +abi_fbk_xmlf90_ok = @abi_fbk_xmlf90_ok@ +abi_fbk_yakl_ok = @abi_fbk_yakl_ok@ +abi_fc_path = @abi_fc_path@ +abi_fc_vendor = @abi_fc_vendor@ +abi_fc_version = @abi_fc_version@ +abi_fc_wrap = @abi_fc_wrap@ +abi_fc_wrapper_enable = @abi_fc_wrapper_enable@ +abi_fpp_path = @abi_fpp_path@ +abi_gpu_arch = @abi_gpu_arch@ +abi_gpu_fcflags = @abi_gpu_fcflags@ +abi_gpu_flavor = @abi_gpu_flavor@ +abi_gpu_hip_libdir = @abi_gpu_hip_libdir@ +abi_gpu_incs = @abi_gpu_incs@ +abi_gpu_ldflags = @abi_gpu_ldflags@ +abi_gpu_libs = @abi_gpu_libs@ +abi_gpu_nvtx_v3 = @abi_gpu_nvtx_v3@ +abi_gpu_roctx = @abi_gpu_roctx@ +abi_gw_dpc_enable = @abi_gw_dpc_enable@ +abi_hints_enable = @abi_hints_enable@ +abi_libtetra_enable = @abi_libtetra_enable@ +abi_libxml2_cppflags = @abi_libxml2_cppflags@ +abi_libxml2_enable = @abi_libxml2_enable@ +abi_libxml2_fcflags = @abi_libxml2_fcflags@ +abi_libxml2_init = @abi_libxml2_init@ +abi_libxml2_ldflags = @abi_libxml2_ldflags@ +abi_libxml2_libs = @abi_libxml2_libs@ +abi_libxml2_ok = @abi_libxml2_ok@ +abi_libxml2_prefix = @abi_libxml2_prefix@ +abi_lotf_enable = @abi_lotf_enable@ +abi_lt_version = @abi_lt_version@ +abi_m4_version = @abi_m4_version@ +abi_memory_profiling_enable = @abi_memory_profiling_enable@ +abi_mpi_cflags = @abi_mpi_cflags@ +abi_mpi_cppflags = @abi_mpi_cppflags@ +abi_mpi_cxxflags = @abi_mpi_cxxflags@ +abi_mpi_enable = @abi_mpi_enable@ +abi_mpi_fcflags = @abi_mpi_fcflags@ +abi_mpi_flavor = @abi_mpi_flavor@ +abi_mpi_gpu_aware_enable = @abi_mpi_gpu_aware_enable@ +abi_mpi_incs = @abi_mpi_incs@ +abi_mpi_inplace_enable = @abi_mpi_inplace_enable@ +abi_mpi_interfaces_bugfix_enable = @abi_mpi_interfaces_bugfix_enable@ +abi_mpi_io_default_enable = @abi_mpi_io_default_enable@ +abi_mpi_io_enable = @abi_mpi_io_enable@ +abi_mpi_ldflags = @abi_mpi_ldflags@ +abi_mpi_level = @abi_mpi_level@ +abi_mpi_libs = @abi_mpi_libs@ +abi_netcdf_default_enable = @abi_netcdf_default_enable@ +abi_openmp_enable = @abi_openmp_enable@ +abi_openmp_offload_enable = @abi_openmp_offload_enable@ +abi_optim_flavor = @abi_optim_flavor@ +abi_python_invocation_enable = @abi_python_invocation_enable@ +abi_source_debug_enable = @abi_source_debug_enable@ +abi_stdin_enable = @abi_stdin_enable@ +abi_sys_spec = @abi_sys_spec@ +abi_timer_enable = @abi_timer_enable@ +abi_triqs_v1_4_enable = @abi_triqs_v1_4_enable@ +abi_triqs_v2_0_enable = @abi_triqs_v2_0_enable@ +abi_zdot_bugfix_enable = @abi_zdot_bugfix_enable@ +abinit_bindir = @abinit_bindir@ +abinit_builddir = @abinit_builddir@ +abinit_chkdir = @abinit_chkdir@ +abinit_datdir = @abinit_datdir@ +abinit_docdir = @abinit_docdir@ +abinit_incdir = @abinit_incdir@ +abinit_libdir = @abinit_libdir@ +abinit_mandir = @abinit_mandir@ +abinit_prefix = @abinit_prefix@ +abinit_srcdir = @abinit_srcdir@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_FC = @ac_ct_FC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cc_info_string = @cc_info_string@ +cxx_info_string = @cxx_info_string@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +enable_avx_safe_mode = @enable_avx_safe_mode@ +enable_bse_unpacked = @enable_bse_unpacked@ +enable_cclock = @enable_cclock@ +enable_crpa_optim = @enable_crpa_optim@ +enable_exports = @enable_exports@ +enable_fc_wrapper = @enable_fc_wrapper@ +enable_gw_dpc = @enable_gw_dpc@ +enable_hints = @enable_hints@ +enable_libtetra = @enable_libtetra@ +enable_lotf = @enable_lotf@ +enable_memory_profiling = @enable_memory_profiling@ +enable_mpi_gpu_aware = @enable_mpi_gpu_aware@ +enable_mpi_inplace = @enable_mpi_inplace@ +enable_mpi_interfaces_bugfix = @enable_mpi_interfaces_bugfix@ +enable_mpi_io = @enable_mpi_io@ +enable_mpi_io_default = @enable_mpi_io_default@ +enable_netcdf_default = @enable_netcdf_default@ +enable_openmp = @enable_openmp@ +enable_openmp_offload = @enable_openmp_offload@ +enable_python_invocation = @enable_python_invocation@ +enable_shared = @enable_shared@ +enable_source_debug = @enable_source_debug@ +enable_static = @enable_static@ +enable_stdin = @enable_stdin@ +enable_timer = @enable_timer@ +enable_triqs_v1_4 = @enable_triqs_v1_4@ +enable_triqs_v2_0 = @enable_triqs_v2_0@ +enable_zdot_bugfix = @enable_zdot_bugfix@ +exec_prefix = @exec_prefix@ +fc_info_string = @fc_info_string@ +fc_mod_fcflags = @fc_mod_fcflags@ +fc_timing = @fc_timing@ +fcflags_opt_02_clib = @fcflags_opt_02_clib@ +fcflags_opt_10_defs = @fcflags_opt_10_defs@ +fcflags_opt_11_memory_mpi = @fcflags_opt_11_memory_mpi@ +fcflags_opt_12_hide_mpi = @fcflags_opt_12_hide_mpi@ +fcflags_opt_14_hidewrite = @fcflags_opt_14_hidewrite@ +fcflags_opt_16_hideleave = @fcflags_opt_16_hideleave@ +fcflags_opt_16_kokkos_toolbox = @fcflags_opt_16_kokkos_toolbox@ +fcflags_opt_17_gpu_toolbox = @fcflags_opt_17_gpu_toolbox@ +fcflags_opt_17_libtetra_ext = @fcflags_opt_17_libtetra_ext@ +fcflags_opt_17_minimax = @fcflags_opt_17_minimax@ +fcflags_opt_17_yaml_out = @fcflags_opt_17_yaml_out@ +fcflags_opt_18_timing = @fcflags_opt_18_timing@ +fcflags_opt_21_hashfuncs = @fcflags_opt_21_hashfuncs@ +fcflags_opt_27_toolbox_oop = @fcflags_opt_27_toolbox_oop@ +fcflags_opt_28_numeric_noabirule = @fcflags_opt_28_numeric_noabirule@ +fcflags_opt_29_kpoints = @fcflags_opt_29_kpoints@ +fcflags_opt_32_util = @fcflags_opt_32_util@ +fcflags_opt_33_xc_lowlevel = @fcflags_opt_33_xc_lowlevel@ +fcflags_opt_39_libpaw = @fcflags_opt_39_libpaw@ +fcflags_opt_41_geometry = @fcflags_opt_41_geometry@ +fcflags_opt_42_nlstrain = @fcflags_opt_42_nlstrain@ +fcflags_opt_42_parser = @fcflags_opt_42_parser@ +fcflags_opt_43_ptgroups = @fcflags_opt_43_ptgroups@ +fcflags_opt_43_wvl_wrappers = @fcflags_opt_43_wvl_wrappers@ +fcflags_opt_44_abitools = @fcflags_opt_44_abitools@ +fcflags_opt_44_abitypes_defs = @fcflags_opt_44_abitypes_defs@ +fcflags_opt_44_manage_kokkos = @fcflags_opt_44_manage_kokkos@ +fcflags_opt_45_geomoptim = @fcflags_opt_45_geomoptim@ +fcflags_opt_45_xgTools = @fcflags_opt_45_xgTools@ +fcflags_opt_46_ghc_omp = @fcflags_opt_46_ghc_omp@ +fcflags_opt_46_manage_cuda = @fcflags_opt_46_manage_cuda@ +fcflags_opt_48_diago = @fcflags_opt_48_diago@ +fcflags_opt_49_gw_toolbox_oop = @fcflags_opt_49_gw_toolbox_oop@ +fcflags_opt_51_manage_mpi = @fcflags_opt_51_manage_mpi@ +fcflags_opt_52_fft_mpi_noabirule = @fcflags_opt_52_fft_mpi_noabirule@ +fcflags_opt_53_ffts = @fcflags_opt_53_ffts@ +fcflags_opt_54_spacepar = @fcflags_opt_54_spacepar@ +fcflags_opt_55_abiutil = @fcflags_opt_55_abiutil@ +fcflags_opt_56_io_mpi = @fcflags_opt_56_io_mpi@ +fcflags_opt_56_mixing = @fcflags_opt_56_mixing@ +fcflags_opt_56_recipspace = @fcflags_opt_56_recipspace@ +fcflags_opt_56_xc = @fcflags_opt_56_xc@ +fcflags_opt_57_iopsp_parser = @fcflags_opt_57_iopsp_parser@ +fcflags_opt_57_iovars = @fcflags_opt_57_iovars@ +fcflags_opt_61_occeig = @fcflags_opt_61_occeig@ +fcflags_opt_62_cg_noabirule = @fcflags_opt_62_cg_noabirule@ +fcflags_opt_62_ctqmc = @fcflags_opt_62_ctqmc@ +fcflags_opt_62_iowfdenpot = @fcflags_opt_62_iowfdenpot@ +fcflags_opt_62_poisson = @fcflags_opt_62_poisson@ +fcflags_opt_62_wvl_wfs = @fcflags_opt_62_wvl_wfs@ +fcflags_opt_64_psp = @fcflags_opt_64_psp@ +fcflags_opt_65_lotf_base = @fcflags_opt_65_lotf_base@ +fcflags_opt_65_paw = @fcflags_opt_65_paw@ +fcflags_opt_66_nonlocal = @fcflags_opt_66_nonlocal@ +fcflags_opt_66_vdwxc = @fcflags_opt_66_vdwxc@ +fcflags_opt_66_wfs = @fcflags_opt_66_wfs@ +fcflags_opt_67_common = @fcflags_opt_67_common@ +fcflags_opt_67_python_invocation_ext = @fcflags_opt_67_python_invocation_ext@ +fcflags_opt_67_triqs_ext = @fcflags_opt_67_triqs_ext@ +fcflags_opt_68_dmft = @fcflags_opt_68_dmft@ +fcflags_opt_68_lotf = @fcflags_opt_68_lotf@ +fcflags_opt_68_recursion = @fcflags_opt_68_recursion@ +fcflags_opt_68_rsprc = @fcflags_opt_68_rsprc@ +fcflags_opt_69_wfdesc = @fcflags_opt_69_wfdesc@ +fcflags_opt_70_gw = @fcflags_opt_70_gw@ +fcflags_opt_71_bse = @fcflags_opt_71_bse@ +fcflags_opt_71_wannier = @fcflags_opt_71_wannier@ +fcflags_opt_72_response = @fcflags_opt_72_response@ +fcflags_opt_77_ddb = @fcflags_opt_77_ddb@ +fcflags_opt_77_suscep = @fcflags_opt_77_suscep@ +fcflags_opt_78_effpot = @fcflags_opt_78_effpot@ +fcflags_opt_78_eph = @fcflags_opt_78_eph@ +fcflags_opt_79_seqpar_mpi = @fcflags_opt_79_seqpar_mpi@ +fcflags_opt_80_rttddft = @fcflags_opt_80_rttddft@ +fcflags_opt_80_tdep = @fcflags_opt_80_tdep@ +fcflags_opt_94_scfcv = @fcflags_opt_94_scfcv@ +fcflags_opt_95_drive = @fcflags_opt_95_drive@ +fcflags_opt_98_main = @fcflags_opt_98_main@ +fcflags_opt_bigdft = @fcflags_opt_bigdft@ +fcflags_opt_default = @fcflags_opt_default@ +fcflags_opt_hdf5 = @fcflags_opt_hdf5@ +fcflags_opt_levmar = @fcflags_opt_levmar@ +fcflags_opt_libpsml = @fcflags_opt_libpsml@ +fcflags_opt_libxc = @fcflags_opt_libxc@ +fcflags_opt_libxml2 = @fcflags_opt_libxml2@ +fcflags_opt_linalg = @fcflags_opt_linalg@ +fcflags_opt_netcdf = @fcflags_opt_netcdf@ +fcflags_opt_netcdf_fortran = @fcflags_opt_netcdf_fortran@ +fcflags_opt_papi = @fcflags_opt_papi@ +fcflags_opt_triqs = @fcflags_opt_triqs@ +fcflags_opt_wannier90 = @fcflags_opt_wannier90@ +fcflags_opt_xmlf90 = @fcflags_opt_xmlf90@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sd_abinit_common_cppflags = @sd_abinit_common_cppflags@ +sd_abinit_common_enable = @sd_abinit_common_enable@ +sd_abinit_common_enable_def = @sd_abinit_common_enable_def@ +sd_abinit_common_fcflags = @sd_abinit_common_fcflags@ +sd_abinit_common_init = @sd_abinit_common_init@ +sd_abinit_common_ldflags = @sd_abinit_common_ldflags@ +sd_abinit_common_libs = @sd_abinit_common_libs@ +sd_abinit_common_ok = @sd_abinit_common_ok@ +sd_abinit_common_options = @sd_abinit_common_options@ +sd_abinit_common_policy = @sd_abinit_common_policy@ +sd_abinit_common_status = @sd_abinit_common_status@ +sd_bigdft_cppflags = @sd_bigdft_cppflags@ +sd_bigdft_enable = @sd_bigdft_enable@ +sd_bigdft_enable_def = @sd_bigdft_enable_def@ +sd_bigdft_fcflags = @sd_bigdft_fcflags@ +sd_bigdft_init = @sd_bigdft_init@ +sd_bigdft_ldflags = @sd_bigdft_ldflags@ +sd_bigdft_libs = @sd_bigdft_libs@ +sd_bigdft_ok = @sd_bigdft_ok@ +sd_bigdft_options = @sd_bigdft_options@ +sd_bigdft_policy = @sd_bigdft_policy@ +sd_bigdft_status = @sd_bigdft_status@ +sd_fft_cflags = @sd_fft_cflags@ +sd_fft_choices = @sd_fft_choices@ +sd_fft_cppflags = @sd_fft_cppflags@ +sd_fft_cxxflags = @sd_fft_cxxflags@ +sd_fft_enable = @sd_fft_enable@ +sd_fft_fcflags = @sd_fft_fcflags@ +sd_fft_flavor = @sd_fft_flavor@ +sd_fft_init = @sd_fft_init@ +sd_fft_ldflags = @sd_fft_ldflags@ +sd_fft_libs = @sd_fft_libs@ +sd_fft_ok = @sd_fft_ok@ +sd_fftw3_cflags = @sd_fftw3_cflags@ +sd_fftw3_cppflags = @sd_fftw3_cppflags@ +sd_fftw3_enable = @sd_fftw3_enable@ +sd_fftw3_enable_def = @sd_fftw3_enable_def@ +sd_fftw3_fcflags = @sd_fftw3_fcflags@ +sd_fftw3_init = @sd_fftw3_init@ +sd_fftw3_ldflags = @sd_fftw3_ldflags@ +sd_fftw3_libs = @sd_fftw3_libs@ +sd_fftw3_ok = @sd_fftw3_ok@ +sd_fftw3_options = @sd_fftw3_options@ +sd_fftw3_policy = @sd_fftw3_policy@ +sd_fftw3_status = @sd_fftw3_status@ +sd_gpu_cflags = @sd_gpu_cflags@ +sd_gpu_cppflags = @sd_gpu_cppflags@ +sd_gpu_cxxflags = @sd_gpu_cxxflags@ +sd_gpu_enable = @sd_gpu_enable@ +sd_gpu_enable_def = @sd_gpu_enable_def@ +sd_gpu_fcflags = @sd_gpu_fcflags@ +sd_gpu_init = @sd_gpu_init@ +sd_gpu_ldflags = @sd_gpu_ldflags@ +sd_gpu_libs = @sd_gpu_libs@ +sd_gpu_ok = @sd_gpu_ok@ +sd_gpu_options = @sd_gpu_options@ +sd_gpu_policy = @sd_gpu_policy@ +sd_gpu_prefix = @sd_gpu_prefix@ +sd_gpu_status = @sd_gpu_status@ +sd_hdf5_cflags = @sd_hdf5_cflags@ +sd_hdf5_cppflags = @sd_hdf5_cppflags@ +sd_hdf5_cxxflags = @sd_hdf5_cxxflags@ +sd_hdf5_enable = @sd_hdf5_enable@ +sd_hdf5_enable_def = @sd_hdf5_enable_def@ +sd_hdf5_enable_fc = @sd_hdf5_enable_fc@ +sd_hdf5_fcflags = @sd_hdf5_fcflags@ +sd_hdf5_h5cc = @sd_hdf5_h5cc@ +sd_hdf5_h5fc = @sd_hdf5_h5fc@ +sd_hdf5_init = @sd_hdf5_init@ +sd_hdf5_ldflags = @sd_hdf5_ldflags@ +sd_hdf5_libs = @sd_hdf5_libs@ +sd_hdf5_ok = @sd_hdf5_ok@ +sd_hdf5_options = @sd_hdf5_options@ +sd_hdf5_policy = @sd_hdf5_policy@ +sd_hdf5_status = @sd_hdf5_status@ +sd_kokkos_cppflags = @sd_kokkos_cppflags@ +sd_kokkos_cxxflags = @sd_kokkos_cxxflags@ +sd_kokkos_enable = @sd_kokkos_enable@ +sd_kokkos_enable_def = @sd_kokkos_enable_def@ +sd_kokkos_init = @sd_kokkos_init@ +sd_kokkos_ldflags = @sd_kokkos_ldflags@ +sd_kokkos_libs = @sd_kokkos_libs@ +sd_kokkos_ok = @sd_kokkos_ok@ +sd_kokkos_options = @sd_kokkos_options@ +sd_kokkos_policy = @sd_kokkos_policy@ +sd_kokkos_status = @sd_kokkos_status@ +sd_levmar_cflags = @sd_levmar_cflags@ +sd_levmar_cppflags = @sd_levmar_cppflags@ +sd_levmar_enable = @sd_levmar_enable@ +sd_levmar_enable_def = @sd_levmar_enable_def@ +sd_levmar_init = @sd_levmar_init@ +sd_levmar_ldflags = @sd_levmar_ldflags@ +sd_levmar_libs = @sd_levmar_libs@ +sd_levmar_ok = @sd_levmar_ok@ +sd_levmar_options = @sd_levmar_options@ +sd_levmar_policy = @sd_levmar_policy@ +sd_levmar_status = @sd_levmar_status@ +sd_libpaw_cppflags = @sd_libpaw_cppflags@ +sd_libpaw_enable = @sd_libpaw_enable@ +sd_libpaw_enable_def = @sd_libpaw_enable_def@ +sd_libpaw_fcflags = @sd_libpaw_fcflags@ +sd_libpaw_init = @sd_libpaw_init@ +sd_libpaw_ldflags = @sd_libpaw_ldflags@ +sd_libpaw_libs = @sd_libpaw_libs@ +sd_libpaw_ok = @sd_libpaw_ok@ +sd_libpaw_options = @sd_libpaw_options@ +sd_libpaw_policy = @sd_libpaw_policy@ +sd_libpaw_status = @sd_libpaw_status@ +sd_libpsml_cppflags = @sd_libpsml_cppflags@ +sd_libpsml_enable = @sd_libpsml_enable@ +sd_libpsml_enable_def = @sd_libpsml_enable_def@ +sd_libpsml_fcflags = @sd_libpsml_fcflags@ +sd_libpsml_init = @sd_libpsml_init@ +sd_libpsml_ldflags = @sd_libpsml_ldflags@ +sd_libpsml_libs = @sd_libpsml_libs@ +sd_libpsml_ok = @sd_libpsml_ok@ +sd_libpsml_options = @sd_libpsml_options@ +sd_libpsml_policy = @sd_libpsml_policy@ +sd_libpsml_status = @sd_libpsml_status@ +sd_libxc_cflags = @sd_libxc_cflags@ +sd_libxc_cppflags = @sd_libxc_cppflags@ +sd_libxc_enable = @sd_libxc_enable@ +sd_libxc_enable_def = @sd_libxc_enable_def@ +sd_libxc_enable_fc = @sd_libxc_enable_fc@ +sd_libxc_fcflags = @sd_libxc_fcflags@ +sd_libxc_init = @sd_libxc_init@ +sd_libxc_ldflags = @sd_libxc_ldflags@ +sd_libxc_libs = @sd_libxc_libs@ +sd_libxc_ok = @sd_libxc_ok@ +sd_libxc_options = @sd_libxc_options@ +sd_libxc_policy = @sd_libxc_policy@ +sd_libxc_status = @sd_libxc_status@ +sd_linalg_cflags = @sd_linalg_cflags@ +sd_linalg_choices = @sd_linalg_choices@ +sd_linalg_cppflags = @sd_linalg_cppflags@ +sd_linalg_cxxflags = @sd_linalg_cxxflags@ +sd_linalg_enable = @sd_linalg_enable@ +sd_linalg_fcflags = @sd_linalg_fcflags@ +sd_linalg_flavor = @sd_linalg_flavor@ +sd_linalg_has_elpa = @sd_linalg_has_elpa@ +sd_linalg_has_scalapack = @sd_linalg_has_scalapack@ +sd_linalg_init = @sd_linalg_init@ +sd_linalg_ldflags = @sd_linalg_ldflags@ +sd_linalg_libs = @sd_linalg_libs@ +sd_linalg_ok = @sd_linalg_ok@ +sd_mpi_cc = @sd_mpi_cc@ +sd_mpi_cflags = @sd_mpi_cflags@ +sd_mpi_cppflags = @sd_mpi_cppflags@ +sd_mpi_cxx = @sd_mpi_cxx@ +sd_mpi_enable = @sd_mpi_enable@ +sd_mpi_enable_cxx = @sd_mpi_enable_cxx@ +sd_mpi_enable_def = @sd_mpi_enable_def@ +sd_mpi_enable_fc = @sd_mpi_enable_fc@ +sd_mpi_fc = @sd_mpi_fc@ +sd_mpi_fcflags = @sd_mpi_fcflags@ +sd_mpi_init = @sd_mpi_init@ +sd_mpi_ldflags = @sd_mpi_ldflags@ +sd_mpi_libs = @sd_mpi_libs@ +sd_mpi_ok = @sd_mpi_ok@ +sd_mpi_options = @sd_mpi_options@ +sd_mpi_policy = @sd_mpi_policy@ +sd_mpi_status = @sd_mpi_status@ +sd_netcdf_cflags = @sd_netcdf_cflags@ +sd_netcdf_cppflags = @sd_netcdf_cppflags@ +sd_netcdf_enable = @sd_netcdf_enable@ +sd_netcdf_enable_def = @sd_netcdf_enable_def@ +sd_netcdf_fcflags = @sd_netcdf_fcflags@ +sd_netcdf_fortran_cflags = @sd_netcdf_fortran_cflags@ +sd_netcdf_fortran_cppflags = @sd_netcdf_fortran_cppflags@ +sd_netcdf_fortran_enable = @sd_netcdf_fortran_enable@ +sd_netcdf_fortran_enable_def = @sd_netcdf_fortran_enable_def@ +sd_netcdf_fortran_fcflags = @sd_netcdf_fortran_fcflags@ +sd_netcdf_fortran_init = @sd_netcdf_fortran_init@ +sd_netcdf_fortran_ldflags = @sd_netcdf_fortran_ldflags@ +sd_netcdf_fortran_libs = @sd_netcdf_fortran_libs@ +sd_netcdf_fortran_ok = @sd_netcdf_fortran_ok@ +sd_netcdf_fortran_options = @sd_netcdf_fortran_options@ +sd_netcdf_fortran_policy = @sd_netcdf_fortran_policy@ +sd_netcdf_fortran_status = @sd_netcdf_fortran_status@ +sd_netcdf_init = @sd_netcdf_init@ +sd_netcdf_ldflags = @sd_netcdf_ldflags@ +sd_netcdf_libs = @sd_netcdf_libs@ +sd_netcdf_ok = @sd_netcdf_ok@ +sd_netcdf_options = @sd_netcdf_options@ +sd_netcdf_policy = @sd_netcdf_policy@ +sd_netcdf_status = @sd_netcdf_status@ +sd_papi_cflags = @sd_papi_cflags@ +sd_papi_cppflags = @sd_papi_cppflags@ +sd_papi_enable = @sd_papi_enable@ +sd_papi_enable_def = @sd_papi_enable_def@ +sd_papi_init = @sd_papi_init@ +sd_papi_ldflags = @sd_papi_ldflags@ +sd_papi_libs = @sd_papi_libs@ +sd_papi_ok = @sd_papi_ok@ +sd_papi_options = @sd_papi_options@ +sd_papi_policy = @sd_papi_policy@ +sd_papi_sd_papi_fcflags = @sd_papi_sd_papi_fcflags@ +sd_papi_status = @sd_papi_status@ +sd_pfft_cflags = @sd_pfft_cflags@ +sd_pfft_cppflags = @sd_pfft_cppflags@ +sd_pfft_enable = @sd_pfft_enable@ +sd_pfft_enable_def = @sd_pfft_enable_def@ +sd_pfft_init = @sd_pfft_init@ +sd_pfft_ldflags = @sd_pfft_ldflags@ +sd_pfft_libs = @sd_pfft_libs@ +sd_pfft_ok = @sd_pfft_ok@ +sd_pfft_options = @sd_pfft_options@ +sd_pfft_policy = @sd_pfft_policy@ +sd_pfft_status = @sd_pfft_status@ +sd_sys_fcflags = @sd_sys_fcflags@ +sd_triqs_cflags = @sd_triqs_cflags@ +sd_triqs_cppflags = @sd_triqs_cppflags@ +sd_triqs_cxxflags = @sd_triqs_cxxflags@ +sd_triqs_enable = @sd_triqs_enable@ +sd_triqs_enable_def = @sd_triqs_enable_def@ +sd_triqs_fcflags = @sd_triqs_fcflags@ +sd_triqs_init = @sd_triqs_init@ +sd_triqs_ldflags = @sd_triqs_ldflags@ +sd_triqs_libs = @sd_triqs_libs@ +sd_triqs_ok = @sd_triqs_ok@ +sd_triqs_options = @sd_triqs_options@ +sd_triqs_policy = @sd_triqs_policy@ +sd_triqs_status = @sd_triqs_status@ +sd_wannier90_cppflags = @sd_wannier90_cppflags@ +sd_wannier90_enable = @sd_wannier90_enable@ +sd_wannier90_enable_def = @sd_wannier90_enable_def@ +sd_wannier90_fcflags = @sd_wannier90_fcflags@ +sd_wannier90_init = @sd_wannier90_init@ +sd_wannier90_ldflags = @sd_wannier90_ldflags@ +sd_wannier90_libs = @sd_wannier90_libs@ +sd_wannier90_ok = @sd_wannier90_ok@ +sd_wannier90_options = @sd_wannier90_options@ +sd_wannier90_policy = @sd_wannier90_policy@ +sd_wannier90_status = @sd_wannier90_status@ +sd_xmlf90_cppflags = @sd_xmlf90_cppflags@ +sd_xmlf90_enable = @sd_xmlf90_enable@ +sd_xmlf90_enable_def = @sd_xmlf90_enable_def@ +sd_xmlf90_fcflags = @sd_xmlf90_fcflags@ +sd_xmlf90_init = @sd_xmlf90_init@ +sd_xmlf90_ldflags = @sd_xmlf90_ldflags@ +sd_xmlf90_libs = @sd_xmlf90_libs@ +sd_xmlf90_ok = @sd_xmlf90_ok@ +sd_xmlf90_options = @sd_xmlf90_options@ +sd_xmlf90_policy = @sd_xmlf90_policy@ +sd_xmlf90_status = @sd_xmlf90_status@ +sd_yakl_cppflags = @sd_yakl_cppflags@ +sd_yakl_enable = @sd_yakl_enable@ +sd_yakl_enable_def = @sd_yakl_enable_def@ +sd_yakl_fcflags = @sd_yakl_fcflags@ +sd_yakl_init = @sd_yakl_init@ +sd_yakl_ldflags = @sd_yakl_ldflags@ +sd_yakl_libs = @sd_yakl_libs@ +sd_yakl_ok = @sd_yakl_ok@ +sd_yakl_options = @sd_yakl_options@ +sd_yakl_policy = @sd_yakl_policy@ +sd_yakl_status = @sd_yakl_status@ +sharedstatedir = @sharedstatedir@ +src_02_clib_fcflags = @src_02_clib_fcflags@ +src_10_defs_fcflags = @src_10_defs_fcflags@ +src_11_memory_mpi_fcflags = @src_11_memory_mpi_fcflags@ +src_12_hide_mpi_fcflags = @src_12_hide_mpi_fcflags@ +src_14_hidewrite_fcflags = @src_14_hidewrite_fcflags@ +src_16_hideleave_fcflags = @src_16_hideleave_fcflags@ +src_16_kokkos_toolbox_fcflags = @src_16_kokkos_toolbox_fcflags@ +src_17_gpu_toolbox_fcflags = @src_17_gpu_toolbox_fcflags@ +src_17_libtetra_ext_fcflags = @src_17_libtetra_ext_fcflags@ +src_17_minimax_fcflags = @src_17_minimax_fcflags@ +src_17_yaml_out_fcflags = @src_17_yaml_out_fcflags@ +src_18_timing_fcflags = @src_18_timing_fcflags@ +src_21_hashfuncs_fcflags = @src_21_hashfuncs_fcflags@ +src_27_toolbox_oop_fcflags = @src_27_toolbox_oop_fcflags@ +src_28_numeric_noabirule_fcflags = @src_28_numeric_noabirule_fcflags@ +src_29_kpoints_fcflags = @src_29_kpoints_fcflags@ +src_32_util_fcflags = @src_32_util_fcflags@ +src_33_xc_lowlevel_fcflags = @src_33_xc_lowlevel_fcflags@ +src_39_libpaw_fcflags = @src_39_libpaw_fcflags@ +src_41_geometry_fcflags = @src_41_geometry_fcflags@ +src_42_nlstrain_fcflags = @src_42_nlstrain_fcflags@ +src_42_parser_fcflags = @src_42_parser_fcflags@ +src_43_ptgroups_fcflags = @src_43_ptgroups_fcflags@ +src_43_wvl_wrappers_fcflags = @src_43_wvl_wrappers_fcflags@ +src_44_abitools_fcflags = @src_44_abitools_fcflags@ +src_44_abitypes_defs_fcflags = @src_44_abitypes_defs_fcflags@ +src_44_manage_kokkos_fcflags = @src_44_manage_kokkos_fcflags@ +src_45_geomoptim_fcflags = @src_45_geomoptim_fcflags@ +src_45_xgTools_fcflags = @src_45_xgTools_fcflags@ +src_46_ghc_omp_fcflags = @src_46_ghc_omp_fcflags@ +src_46_manage_cuda_fcflags = @src_46_manage_cuda_fcflags@ +src_48_diago_fcflags = @src_48_diago_fcflags@ +src_49_gw_toolbox_oop_fcflags = @src_49_gw_toolbox_oop_fcflags@ +src_51_manage_mpi_fcflags = @src_51_manage_mpi_fcflags@ +src_52_fft_mpi_noabirule_fcflags = @src_52_fft_mpi_noabirule_fcflags@ +src_53_ffts_fcflags = @src_53_ffts_fcflags@ +src_54_spacepar_fcflags = @src_54_spacepar_fcflags@ +src_55_abiutil_fcflags = @src_55_abiutil_fcflags@ +src_56_io_mpi_fcflags = @src_56_io_mpi_fcflags@ +src_56_mixing_fcflags = @src_56_mixing_fcflags@ +src_56_recipspace_fcflags = @src_56_recipspace_fcflags@ +src_56_xc_fcflags = @src_56_xc_fcflags@ +src_57_iopsp_parser_fcflags = @src_57_iopsp_parser_fcflags@ +src_57_iovars_fcflags = @src_57_iovars_fcflags@ +src_61_occeig_fcflags = @src_61_occeig_fcflags@ +src_62_cg_noabirule_fcflags = @src_62_cg_noabirule_fcflags@ +src_62_ctqmc_fcflags = @src_62_ctqmc_fcflags@ +src_62_iowfdenpot_fcflags = @src_62_iowfdenpot_fcflags@ +src_62_poisson_fcflags = @src_62_poisson_fcflags@ +src_62_wvl_wfs_fcflags = @src_62_wvl_wfs_fcflags@ +src_64_psp_fcflags = @src_64_psp_fcflags@ +src_65_lotf_base_fcflags = @src_65_lotf_base_fcflags@ +src_65_paw_fcflags = @src_65_paw_fcflags@ +src_66_nonlocal_fcflags = @src_66_nonlocal_fcflags@ +src_66_vdwxc_fcflags = @src_66_vdwxc_fcflags@ +src_66_wfs_fcflags = @src_66_wfs_fcflags@ +src_67_common_fcflags = @src_67_common_fcflags@ +src_67_python_invocation_ext_fcflags = @src_67_python_invocation_ext_fcflags@ +src_67_triqs_ext_fcflags = @src_67_triqs_ext_fcflags@ +src_68_dmft_fcflags = @src_68_dmft_fcflags@ +src_68_lotf_fcflags = @src_68_lotf_fcflags@ +src_68_recursion_fcflags = @src_68_recursion_fcflags@ +src_68_rsprc_fcflags = @src_68_rsprc_fcflags@ +src_69_wfdesc_fcflags = @src_69_wfdesc_fcflags@ +src_70_gw_fcflags = @src_70_gw_fcflags@ +src_71_bse_fcflags = @src_71_bse_fcflags@ +src_71_wannier_fcflags = @src_71_wannier_fcflags@ +src_72_response_fcflags = @src_72_response_fcflags@ +src_77_ddb_fcflags = @src_77_ddb_fcflags@ +src_77_suscep_fcflags = @src_77_suscep_fcflags@ +src_78_effpot_fcflags = @src_78_effpot_fcflags@ +src_78_eph_fcflags = @src_78_eph_fcflags@ +src_79_seqpar_mpi_fcflags = @src_79_seqpar_mpi_fcflags@ +src_80_rttddft_fcflags = @src_80_rttddft_fcflags@ +src_80_tdep_fcflags = @src_80_tdep_fcflags@ +src_94_scfcv_fcflags = @src_94_scfcv_fcflags@ +src_95_drive_fcflags = @src_95_drive_fcflags@ +src_common_fcflags = @src_common_fcflags@ +src_core_fcflags = @src_core_fcflags@ +src_libpaw_fcflags = @src_libpaw_fcflags@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +with_abinit_common = @with_abinit_common@ +with_bigdft = @with_bigdft@ +with_config_file = @with_config_file@ +with_debug_flavor = @with_debug_flavor@ +with_fallbacks = @with_fallbacks@ +with_fc_vendor = @with_fc_vendor@ +with_fc_version = @with_fc_version@ +with_fft_flavor = @with_fft_flavor@ +with_fftw3 = @with_fftw3@ +with_gnu_ld = @with_gnu_ld@ +with_gpu = @with_gpu@ +with_hdf5 = @with_hdf5@ +with_kokkos = @with_kokkos@ +with_levmar = @with_levmar@ +with_libpaw = @with_libpaw@ +with_libpsml = @with_libpsml@ +with_libxc = @with_libxc@ +with_libxml2 = @with_libxml2@ +with_linalg_flavor = @with_linalg_flavor@ +with_mpi = @with_mpi@ +with_mpi_level = @with_mpi_level@ +with_netcdf = @with_netcdf@ +with_optim_flavor = @with_optim_flavor@ +with_papi = @with_papi@ +with_pfft = @with_pfft@ +with_triqs = @with_triqs@ +with_wannier90 = @with_wannier90@ +with_xmlf90 = @with_xmlf90@ +with_yakl = @with_yakl@ +AM_CFLAGS = @ABI_CPPFLAGS@ +AM_CXXFLAGS = $(sd_triqs_cxxflags) +AM_FCFLAGS = @FPPFLAGS@ @FCFLAGS_FREEFORM@ @FCFLAGS_MODDIR@ @sd_sys_fcflags@ @fcflags_opt_33_xc_lowlevel@ +AM_CPPFLAGS = \ + @src_10_defs_fcflags@ \ + @src_14_hidewrite_fcflags@ \ + @src_16_hideleave_fcflags@ \ + @src_28_numeric_noabirule_fcflags@ \ + @src_33_xc_lowlevel_fcflags@ \ + @src_common_fcflags@ \ + @src_core_fcflags@ \ + @src_libpaw_fcflags@ \ + @sd_fft_cppflags@ \ + @sd_fft_fcflags@ \ + @sd_libxc_cppflags@ \ + @sd_libxc_fcflags@ \ + @fc_mod_fcflags@ + + +# Regular source files +lib33_xc_lowlevel_srcs = \ + libxc_tools.c \ + m_libxc_functionals.F90 \ + m_drivexc.F90 \ + m_xc_noncoll.F90 \ + m_xchcth.F90 \ + m_xciit.F90 \ + m_xcpbe.F90 \ + m_xcpositron.F90 \ + m_xclda.F90 + + +# Source files depending on conditionals + +# Library description +noinst_LIBRARIES = lib33_xc_lowlevel.a +lib33_xc_lowlevel_a_SOURCES = $(lib33_xc_lowlevel_srcs) + +# Dependencies (inside the directory) of directory 33_xc_lowlevel +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. +CLEANFILES = libxc_tools_cpp.c m_libxc_functionals_cpp.f90 \ + m_drivexc_cpp.f90 m_xc_noncoll_cpp.f90 m_xchcth_cpp.f90 \ + m_xciit_cpp.f90 m_xcpbe_cpp.f90 m_xcpositron_cpp.f90 \ + m_xclda_cpp.f90 m_drivexc.$(MODEXT) \ + m_libxc_functionals.$(MODEXT) m_xc_noncoll.$(MODEXT) \ + m_xchcth.$(MODEXT) m_xciit.$(MODEXT) m_xclda.$(MODEXT) \ + m_xcpbe.$(MODEXT) m_xcpositron.$(MODEXT) +EXTRA_DIST = abinit.src abinit.dep _33_xc_lowlevel_ +all: all-am + +.SUFFIXES: +.SUFFIXES: .F90 .c .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu shared/common/src/33_xc_lowlevel/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu shared/common/src/33_xc_lowlevel/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) + +lib33_xc_lowlevel.a: $(lib33_xc_lowlevel_a_OBJECTS) $(lib33_xc_lowlevel_a_DEPENDENCIES) $(EXTRA_lib33_xc_lowlevel_a_DEPENDENCIES) + $(AM_V_at)-rm -f lib33_xc_lowlevel.a + $(AM_V_AR)$(lib33_xc_lowlevel_a_AR) lib33_xc_lowlevel.a $(lib33_xc_lowlevel_a_OBJECTS) $(lib33_xc_lowlevel_a_LIBADD) + $(AM_V_at)$(RANLIB) lib33_xc_lowlevel.a + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxc_tools.Po@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) + +.F90.o: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ $< + +.F90.obj: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -f ./$(DEPDIR)/libxc_tools.Po + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f ./$(DEPDIR)/libxc_tools.Po + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ + clean-generic clean-noinstLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am + +.PRECIOUS: Makefile + + +m_drivexc.$(OBJEXT): m_xchcth.$(OBJEXT) m_xciit.$(OBJEXT) m_xclda.$(OBJEXT) m_xcpbe.$(OBJEXT) + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/GX-PAW/common/src/33_xc_lowlevel/README b/GX-PAW/common/src/33_xc_lowlevel/README new file mode 100644 index 00000000..35cec49b --- /dev/null +++ b/GX-PAW/common/src/33_xc_lowlevel/README @@ -0,0 +1,15 @@ +Adding a new source file inside a directory "dirname" +===================================================== + +In order to be treated properly by the ABINIT build system, +a new source file should be declared in the file abinit.src +of the same directory (just one line to be added +per new file, rather self-explanatory). + +Then, in order for the make to work : +(1) if the developer has the autotools working on his computer, he should + issue */*/makemake, then configure and make +(2) otherwise, the developer should modify by hand the Makefile.am file + of the directory in which the file is placed (just one line to be added also), + then issue make. + diff --git a/GX-PAW/common/src/33_xc_lowlevel/_33_xc_lowlevel_ b/GX-PAW/common/src/33_xc_lowlevel/_33_xc_lowlevel_ new file mode 100644 index 00000000..d97138be --- /dev/null +++ b/GX-PAW/common/src/33_xc_lowlevel/_33_xc_lowlevel_ @@ -0,0 +1,25 @@ +!!****d* ABINIT/33_xc_lowlevel +!! NAME +!! 33_xc_lowlevel +!! +!! DESCRIPTION +!! FIXME: Description is missing +!! +!! COPYRIGHT +!! Copyright (C) 1998-2024 ABINIT group +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! For the initials of contributors, see ~abinit/doc/developers/contributors.txt . +!! +!! CHILDREN +!! m_drivexc.F90 +!! m_libxc_functionals.F90 +!! m_xc_noncoll.F90 +!! m_xchcth.F90 +!! m_xciit.F90 +!! m_xclda.F90 +!! m_xcpbe.F90 +!! m_xcpositron.F90 +!! +!!*** diff --git a/GX-PAW/common/src/33_xc_lowlevel/__pycache__/abinit.cpython-36.pyc b/GX-PAW/common/src/33_xc_lowlevel/__pycache__/abinit.cpython-36.pyc new file mode 100644 index 00000000..1ca90866 Binary files /dev/null and b/GX-PAW/common/src/33_xc_lowlevel/__pycache__/abinit.cpython-36.pyc differ diff --git a/GX-PAW/common/src/33_xc_lowlevel/abinit.dep b/GX-PAW/common/src/33_xc_lowlevel/abinit.dep new file mode 100644 index 00000000..90a9a0b9 --- /dev/null +++ b/GX-PAW/common/src/33_xc_lowlevel/abinit.dep @@ -0,0 +1,17 @@ +# Dependencies (inside the directory) of directory 33_xc_lowlevel +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. + +CLEANFILES += \ + m_drivexc.$(MODEXT) \ + m_libxc_functionals.$(MODEXT) \ + m_xc_noncoll.$(MODEXT) \ + m_xchcth.$(MODEXT) \ + m_xciit.$(MODEXT) \ + m_xclda.$(MODEXT) \ + m_xcpbe.$(MODEXT) \ + m_xcpositron.$(MODEXT) + +m_drivexc.$(OBJEXT): m_xchcth.$(OBJEXT) m_xciit.$(OBJEXT) m_xclda.$(OBJEXT) m_xcpbe.$(OBJEXT) \ No newline at end of file diff --git a/GX-PAW/common/src/33_xc_lowlevel/abinit.dir b/GX-PAW/common/src/33_xc_lowlevel/abinit.dir new file mode 100644 index 00000000..bfc5c458 --- /dev/null +++ b/GX-PAW/common/src/33_xc_lowlevel/abinit.dir @@ -0,0 +1,12 @@ +# Dependencies (outside the directory) of directory 33_xc_lowlevel +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. + +include_dirs = \ +['10_defs', + '14_hidewrite', + '16_hideleave', + '28_numeric_noabirule', + '33_xc_lowlevel'] \ No newline at end of file diff --git a/GX-PAW/common/src/33_xc_lowlevel/abinit.src b/GX-PAW/common/src/33_xc_lowlevel/abinit.src new file mode 100644 index 00000000..1c8afa07 --- /dev/null +++ b/GX-PAW/common/src/33_xc_lowlevel/abinit.src @@ -0,0 +1,32 @@ +# -*- Python -*- +# +# Copyright (C) 2005-2024 ABINIT Group (Yann Pouillon) +# +# This file is part of the ABINIT software package. For license information, +# please see the COPYING file in the top-level directory of the ABINIT source +# distribution. +# + +# +# Source files making up the 3xc library +# + +# Source file attributes +ABI_SRC_NIL = 0 # No attribute +ABI_SRC_BLT = 1 # The file is built by a script +ABI_SRC_DEP = 2 # The file depends on other files + +# Source files +sources = [ +"libxc_tools.c", +"m_libxc_functionals.F90", +"m_drivexc.F90", +"m_xc_noncoll.F90", +"m_xchcth.F90", +"m_xciit.F90", +"m_xcpbe.F90", +"m_xcpositron.F90", +"m_xclda.F90", +] +# IMPORTANT : please use the alphabetic order in the previous list. Do NOT add the new routine names at the end of the list. +# This is important to avoid numerous conflicts at merge time. Thank you very much. Xavier. diff --git a/GX-PAW/common/src/33_xc_lowlevel/lib33_xc_lowlevel.a b/GX-PAW/common/src/33_xc_lowlevel/lib33_xc_lowlevel.a new file mode 100644 index 00000000..cf7173fe Binary files /dev/null and b/GX-PAW/common/src/33_xc_lowlevel/lib33_xc_lowlevel.a differ diff --git a/GX-PAW/common/src/33_xc_lowlevel/libxc_tools.c b/GX-PAW/common/src/33_xc_lowlevel/libxc_tools.c new file mode 100644 index 00000000..e9a433b1 --- /dev/null +++ b/GX-PAW/common/src/33_xc_lowlevel/libxc_tools.c @@ -0,0 +1,423 @@ +/* + * Copyright (C) 2015-2024 ABINIT group (MT) + * + * 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 2 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. + * + */ + +/* =============================================================== + * Set of C functions interfacing the LibXC library. + * (see http://www.tddft.org/programs/Libxc) + * =============================================================== + */ + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include + +#if defined HAVE_LIBXC + +#include "xc.h" +#include "xc_version.h" +#include "xc_funcs.h" + +/* if version before 4 get config file */ +#if ( XC_MAJOR_VERSION < 4 ) +# include "xc_config.h" +#else +# define FLOAT double +# define XC(func) xc_ ## func +#endif + +/* =============================================================== + * Get the SINGLE_PRECISION constant + * =============================================================== + */ +void xc_get_singleprecision_constant(int *xc_cst_singleprecision) +{ + if (sizeof(FLOAT) 5 ) +/* ==== libXC v6.0 and later ==== */ + *xc_cst_family_hyb_lda = XC_FAMILY_HYB_LDA; +#else +/* ==== Before libXC v6.0 ==== */ + *xc_cst_family_hyb_lda = -11; +#endif +} + +/* =============================================================== + * Get the FLAGS constants + * =============================================================== + */ +void xc_get_flags_constants(int *xc_cst_flags_have_exc, + int *xc_cst_flags_have_vxc, + int *xc_cst_flags_have_fxc, + int *xc_cst_flags_have_kxc, + int *xc_cst_flags_have_lxc, + int *xc_cst_flags_needs_laplacian) +{ + *xc_cst_flags_have_exc = XC_FLAGS_HAVE_EXC; + *xc_cst_flags_have_vxc = XC_FLAGS_HAVE_VXC; + *xc_cst_flags_have_fxc = XC_FLAGS_HAVE_FXC; + *xc_cst_flags_have_kxc = XC_FLAGS_HAVE_KXC; + *xc_cst_flags_have_lxc = XC_FLAGS_HAVE_LXC; +#if ( XC_MAJOR_VERSION > 3 ) + *xc_cst_flags_needs_laplacian = XC_FLAGS_NEEDS_LAPLACIAN; +#else + *xc_cst_flags_needs_laplacian = 1; +#endif +} + +/* =============================================================== + * Get the KIND constants + * =============================================================== + */ +void xc_get_kind_constants(int *xc_cst_exchange, + int *xc_cst_correlation, + int *xc_cst_exchange_correlation, + int *xc_cst_kinetic) +{ + *xc_cst_exchange = XC_EXCHANGE; + *xc_cst_correlation = XC_CORRELATION; + *xc_cst_exchange_correlation = XC_EXCHANGE_CORRELATION; + *xc_cst_kinetic = XC_KINETIC; +} + +/* =============================================================== + * Get the HYBRID constants + * This routine was only useful for a temporary version of LibXC + * (between v5.x and v6.x) + * It is kept here for historical reasons + * =============================================================== + */ +/*void xc_get_hybrid_constants(int *xc_cst_hyb_none, + int *xc_cst_hyb_fock, + int *xc_cst_hyb_pt2, + int *xc_cst_hyb_erf_sr, + int *xc_cst_hyb_yukawa_sr, + int *xc_cst_hyb_gaussian_sr, + int *xc_cst_hyb_semilocal, + int *xc_cst_hyb_hybrid, + int *xc_cst_hyb_cam, + int *xc_cst_hyb_camy, + int *xc_cst_hyb_camg, + int *xc_cst_hyb_double_hybrid, + int *xc_cst_hyb_mixture) +{*/ +//#if ( XC_MAJOR_VERSION > 7 ) +/* ==== libXC vx.0 and later ==== */ +/* *xc_cst_hyb_none = XC_HYB_NONE; + *xc_cst_hyb_fock = XC_HYB_FOCK; + *xc_cst_hyb_pt2 = XC_HYB_PT2; + *xc_cst_hyb_erf_sr = XC_HYB_ERF_SR; + *xc_cst_hyb_yukawa_sr = XC_HYB_YUKAWA_SR; + *xc_cst_hyb_gaussian_sr = XC_HYB_GAUSSIAN_SR; + *xc_cst_hyb_semilocal = XC_HYB_SEMILOCAL; + *xc_cst_hyb_hybrid = XC_HYB_HYBRID; + *xc_cst_hyb_cam = XC_HYB_CAM; + *xc_cst_hyb_camy = XC_HYB_CAMY; + *xc_cst_hyb_camg = XC_HYB_CAMG; + *xc_cst_hyb_double_hybrid = XC_HYB_DOUBLE_HYBRID; + *xc_cst_hyb_mixture = XC_HYB_MIXTURE;*/ +//#else +/* ==== Before libXC vx.0 ==== */ +/* *xc_cst_hyb_none = -11; *xc_cst_hyb_fock = -11; + *xc_cst_hyb_pt2 = -11; *xc_cst_hyb_erf_sr = -11; + *xc_cst_hyb_yukawa_sr = -11; *xc_cst_hyb_gaussian_sr = -11; + *xc_cst_hyb_semilocal = -11; *xc_cst_hyb_hybrid = -11; + *xc_cst_hyb_cam = -11; *xc_cst_hyb_camy = -11; + *xc_cst_hyb_camg = -11; *xc_cst_hyb_double_hybrid = -11; + *xc_cst_hyb_mixture = -11; +#endif +}*/ + +/* =============================================================== + * Allocate/free xc_func_type pointer + * =============================================================== + */ +XC(func_type) * xc_func_type_malloc() + {return (XC(func_type) *) malloc(sizeof(XC(func_type)));} + +void xc_func_type_free(XC(func_type) **xc_func) + {free(*xc_func);*xc_func = NULL;} + +/* =============================================================== + * Wrappers to the LDA/GGA/MGGA functionals + * =============================================================== + */ +/* --------------------------------------------------------------- + ----- LDA ----- */ +void xc_get_lda(const XC(func_type) *xc_func, int np, const double *rho, + double *zk, double *vrho, double *v2rho2, double *v3rho3) +#if ( XC_MAJOR_VERSION > 4 ) +/* ==== libXC v5.0 and later ==== */ + {xc_lda(xc_func, np, rho, zk, vrho, v2rho2, v3rho3, NULL);} +#else +/* ==== Before libXC v5.0 ==== */ + {xc_lda(xc_func, np, rho, zk, vrho, v2rho2, v3rho3);} +#endif +/* --------------------------------------------------------------- + ----- GGA ----- */ +void xc_get_gga(const XC(func_type) *xc_func, int np, + const double *rho, const double *sigma, + double *zk, double *vrho, double *vsigma, + double *v2rho2, double *v2rhosigma, double *v2sigma2, + double *v3rho3, double *v3rho2sigma, double *v3rhosigma2, double *v3sigma3) +#if ( XC_MAJOR_VERSION > 4 ) +/* ==== libXC v5.0 and later ==== */ + {xc_gga(xc_func, np, rho, sigma, zk, vrho, vsigma, v2rho2, v2rhosigma, v2sigma2, + v3rho3, v3rho2sigma, v3rhosigma2, v3sigma3, + NULL, NULL, NULL, NULL, NULL);} +#else +/* ==== Before libXC v5.0 ==== */ + {xc_gga(xc_func, np, rho, sigma, zk, vrho, vsigma, v2rho2, v2rhosigma, v2sigma2, + v3rho3, v3rho2sigma, v3rhosigma2, v3sigma3);} +#endif +/* --------------------------------------------------------------- + ----- meta-GGA ----- */ +void xc_get_mgga(const XC(func_type) *xc_func, int np, + const double *rho, const double *sigma, const double *lapl, const double *tau, + double *zk, double *vrho, double *vsigma, double *vlapl, double *vtau, + double *v2rho2, double *v2rhosigma, double *v2rholapl, double *v2rhotau, + double *v2sigma2, double *v2sigmalapl, double *v2sigmatau, double *v2lapl2, + double *v2lapltau, double *v2tau2) +#if ( XC_MAJOR_VERSION > 4 ) +/* ==== libXC v5.0 and later ==== */ + {xc_mgga(xc_func, np, rho, sigma, lapl, tau, zk, vrho, vsigma, vlapl, vtau, + v2rho2, v2rhosigma, v2rholapl, v2rhotau, v2sigma2, + v2sigmalapl, v2sigmatau, v2lapl2, v2lapltau, v2tau2, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);} +#else +/* ==== Before libXC v5.0 ==== */ + {xc_mgga(xc_func, np, rho, sigma, lapl, tau, zk, vrho, vsigma, vlapl, vtau, + v2rho2, v2sigma2, v2lapl2, v2tau2, v2rhosigma, v2rholapl, v2rhotau, + v2sigmalapl, v2sigmatau, v2lapltau);} +#endif + +/* =============================================================== + * Get properties from a xc_func_info_type pointer + * These accessors where not provided before libXC v3 + * =============================================================== + */ +#if ( XC_MAJOR_VERSION > 3 ) +/* ==== libXC v4.0 and later ==== */ +char const *xc_get_info_name(XC(func_type) *xc_func) + {return xc_func_info_get_name(xc_func->info);} +int xc_get_info_flags(XC(func_type) *xc_func) + {return xc_func_info_get_flags(xc_func->info);} +int xc_get_info_kind(XC(func_type) *xc_func) + {return xc_func_info_get_kind(xc_func->info);} +char const *xc_get_info_refs(XC(func_type) *xc_func, const int *number) + {if (*number>=0&&*numberinfo,*number) != NULL) + {return xc_func_info_get_references(xc_func->info,*number)->ref;}} + else {return NULL;} + return NULL;} + +#elif ( XC_MAJOR_VERSION > 2 ) +/* ==== libXC v3.0 ==== */ +char const *xc_get_info_name(XC(func_type) *xc_func) + {return xc_func_info_get_name(xc_func->info);} +int xc_get_info_flags(XC(func_type) *xc_func) + {return xc_func_info_get_flags(xc_func->info);} +int xc_get_info_kind(XC(func_type) *xc_func) + {return xc_func_info_get_kind(xc_func->info);} +char const *xc_get_info_refs(XC(func_type) *xc_func, const int *number) + {if (*number>=0&&*number<=4) + {if (xc_func_info_get_ref(xc_func->info,*number) != NULL) + {return xc_func_info_get_ref(xc_func->info,*number);}} + else {return NULL;} + return NULL;} + +#else +/* ==== Before libXC v3.0 ==== */ +char const *xc_get_info_name(XC(func_type) *xc_func) + {return xc_func->info->name;} +int xc_get_info_flags(XC(func_type) *xc_func) + {return xc_func->info->flags;} +int xc_get_info_kind(XC(func_type) *xc_func) + {return xc_func->info->kind;} +char const *xc_get_info_refs(XC(func_type) *xc_func, const int *number) + {if (*number==0) {return xc_func->info->refs;} else {return NULL;} + return NULL;} +#endif + +/* =============================================================== + * Wrapper to xc_func_set_ext_params + * Allows to change the parameters of a XC functional + * For backward compatibility + * =============================================================== + */ +void xc_func_set_params(XC(func_type) *xc_func, double *ext_params, int n_ext_params) +#if ( XC_MAJOR_VERSION > 4 ) +/* ==== libXC v5.0 and later ==== */ + {if (n_ext_params == xc_func->info->ext_params.n) + {xc_func_set_ext_params(xc_func, ext_params);} +#elif ( XC_MAJOR_VERSION > 3 ) +/* ==== libXC v4.0 ==== */ + {if (xc_func->info->number == XC_HYB_GGA_XC_PBEH && n_ext_params == 1) + /* set_ext_params function is missing for PBE0 */ + {xc_func->cam_alpha=ext_params[0];xc_func->mix_coef[0]=1.0-ext_params[0];} + else if (xc_func->info->number == XC_MGGA_X_TB09 && n_ext_params >= 1) + /* XC_MGGA_X_TB09 has only one parameter */ + {XC(func_set_ext_params)(xc_func, ext_params);} + else if (n_ext_params == xc_func->info->n_ext_params) + {XC(func_set_ext_params)(xc_func, ext_params);} + +#else +/* ==== Before libXC v4.0 ==== */ + {if (xc_func->info->number == XC_LDA_C_XALPHA && n_ext_params == 1) + {XC(lda_c_xalpha_set_params)(xc_func, *ext_params);} + else if (xc_func->info->number == XC_MGGA_X_TB09 && n_ext_params >= 1) + {XC(mgga_x_tb09_set_params)(xc_func, *ext_params);} +#if ( XC_MAJOR_VERSION > 2 || ( XC_MAJOR_VERSION > 1 && XC_MINOR_VERSION > 0 ) ) + else if (xc_func->info->number == XC_HYB_GGA_XC_PBEH && n_ext_params == 1) + {XC(hyb_gga_xc_pbeh_set_params)(xc_func, *ext_params);} + else if (xc_func->info->number == XC_HYB_GGA_XC_HSE03 && n_ext_params == 3) + {XC(hyb_gga_xc_hse_set_params)(xc_func, ext_params[0], ext_params[2]); + xc_func->cam_omega=ext_params[1];} + else if (xc_func->info->number == XC_HYB_GGA_XC_HSE06 && n_ext_params == 3) + {XC(hyb_gga_xc_hse_set_params)(xc_func, ext_params[0], ext_params[2]); + xc_func->cam_omega=ext_params[1];} +#else + else if (xc_func->info->number == XC_HYB_GGA_XC_HSE03 && n_ext_params == 3) + {XC(hyb_gga_xc_hse_set_params)(xc_func, ext_params[2]); + xc_func->cam_omega=ext_params[1];} + else if (xc_func->info->number == XC_HYB_GGA_XC_HSE06 && n_ext_params == 3) + {XC(hyb_gga_xc_hse_set_params)(xc_func, ext_params[2]); + xc_func->cam_omega=ext_params[1];} +#endif +#endif + else + {fprintf(stderr, "BUG: invalid entry in set_params!\n");abort();} + } + +/* =============================================================== + * Wrappers to: + * xc_func_get_ext_params_name: get name of a functional parameter + * xc_func_get_ext_params_description: get description of a parameter + * xc_func_set_ext_params_name: set a functional parameter by name + * For backward compatibility + * These accessors where not provided before libXC v5 + * =============================================================== + */ +char const *xc_func_get_params_name(XC(func_type) *xc_func, const int *number) +#if ( XC_MAJOR_VERSION > 4 ) +/* ==== libXC v5.0 and later ==== */ + {if (*number>=0&&*numberinfo->ext_params.n) + {return xc_func_info_get_ext_params_name(xc_func->info,*number);} + else {return NULL;}} +#else +/* ==== Before libXC v5.0, was not available ==== */ + {return NULL;} +#endif + +char const *xc_func_get_params_description(XC(func_type) *xc_func, int *number) +#if ( XC_MAJOR_VERSION > 4 ) +/* ==== libXC v5.0 and later ==== */ + {if (*number>=0&&*numberinfo->ext_params.n) + {return xc_func_info_get_ext_params_description(xc_func->info,*number);} + else {return NULL;}} +#else +/* ==== Before libXC v5.0, was not available ==== */ + {return NULL;} +#endif + +int xc_func_set_params_name(XC(func_type) *xc_func, const char *name, double *par) +#if ( XC_MAJOR_VERSION > 4 ) +/* ==== libXC v5.0 and later ==== */ + {xc_func_set_ext_params_name(xc_func, name, *par);return 0;} +#else + {return -1;} +#endif + +/* =============================================================== + * Wrapper to xc_func_set_dens_threshold + * and xc_func_set_sigma_threshold for backward compatibility + * Allows to change the zero-density (zero-gradient) threshold + * of a XC functional + * Only available from libXC v4 + * =============================================================== + */ +void xc_func_set_density_threshold(XC(func_type) *xc_func, double *dens_threshold) +#if ( XC_MAJOR_VERSION > 3 ) +/* ==== libXC v4.0 and later ==== */ + {xc_func_set_dens_threshold(xc_func, *dens_threshold);} +#else + {fprintf(stderr, "WARNING: setting density threshold not available for libXC<4.0!\n");} +#endif + +void xc_func_set_grad_sig_threshold(XC(func_type) *xc_func, double *sigma_threshold) +#if ( XC_MAJOR_VERSION > 4 ) +/* ==== libXC v5.0 and later ==== */ + {xc_func_set_sigma_threshold(xc_func, *sigma_threshold);} +#else + {fprintf(stderr, "WARNING: setting sigma threshold not available for libXC<4.0!\n");} +#endif + +/* =============================================================== + * Missing function: + * Return 1 if the functional is hybrid, from its id + * =============================================================== + */ +int xc_func_is_hybrid_from_id(int func_id) +/* ==== Before libXC v6.0 ==== */ + {int family; family=xc_family_from_id(func_id, NULL, NULL); +#if ( XC_MAJOR_VERSION > 5 ) +/* ==== libXC v6.0 and later ==== */ + if (family==XC_FAMILY_HYB_GGA || family==XC_FAMILY_HYB_MGGA || family==XC_FAMILY_HYB_LDA) + {return 1;} + else + {return 0;} +#else +/* ==== Before libXC v6.0 ==== */ + if (family==XC_FAMILY_HYB_GGA || family==XC_FAMILY_HYB_MGGA ) + {return 1;} + else + {return 0;} +#endif + } + +#endif diff --git a/GX-PAW/common/src/33_xc_lowlevel/libxc_tools.o b/GX-PAW/common/src/33_xc_lowlevel/libxc_tools.o new file mode 100644 index 00000000..2d31a6b5 Binary files /dev/null and b/GX-PAW/common/src/33_xc_lowlevel/libxc_tools.o differ diff --git a/GX-PAW/common/src/33_xc_lowlevel/m_drivexc.F90 b/GX-PAW/common/src/33_xc_lowlevel/m_drivexc.F90 new file mode 100644 index 00000000..3e37784f --- /dev/null +++ b/GX-PAW/common/src/33_xc_lowlevel/m_drivexc.F90 @@ -0,0 +1,1699 @@ +!!****m* ABINIT/m_drivexc +!! NAME +!! m_drivexc +!! +!! FUNCTION +!! Driver of XC functionals. Optionally, deliver the XC kernel, or even the derivative +!! of the XC kernel (the third derivative of the XC energy) +!! +!! COPYRIGHT +!! Copyright (C) 2012-2024 ABINIT group (MT, MJV, CE, TD, XG) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" + +module m_drivexc + + use defs_basis + use m_abicore + use m_errors + use libxc_functionals + use m_numeric_tools, only : invcb + use m_xciit, only : xciit + use m_xcpbe, only : xcpbe + use m_xchcth, only : xchcth + use m_xclda, only : xcpzca, xcspol, xctetr, xcwign, xchelu, xcxalp, xclb + + implicit none + + private +!!*** + + public :: drivexc ! Driver of XC functionals. Optionally, deliver the XC kernel, or even the derivative + public :: echo_xc_name ! Write to log and output the xc functional which will be used for this dataset + public :: has_kxc ! Given a XC functional (defined by ixc), return TRUE if Kxc (dVxc/drho) is avalaible. + public :: has_k3xc ! Given a XC functional (defined by ixc), return TRUE if K3xc (d2Vxc/drho2) is avalaible. + public :: check_kxc ! Given a XC functional (defined by ixc), check if Kxc and/or K3xc is avalaible. + public :: size_dvxc ! Give the size of the array dvxc(npts,ndvxc) and the second dimension of the d2vxc(npts,nd2vxc) + public :: xcmult ! (GGA) Multiply the different gradient of spin-density by the derivative of the XC functional + ! with respect to the norm of the gradient, then divide it by the norm of the gradient + public :: mkdenpos ! Make a ground-state density positive everywhere. +!!*** + +contains +!!*** + +!!****f* m_drivexc/echo_xc_name +!! NAME +!! echo_xc_name +!! +!! FUNCTION +!! Write to log and output the xc functional which will be used for this dataset +!! +!! INPUTS +!! ixc = internal code for xc functional +!! +!! SOURCE + +subroutine echo_xc_name (ixc) + +!Arguments ------------------------------- + integer, intent(in) :: ixc + +!Local variables ------------------------- + integer :: l_citation + character(len=500) :: message, citation + +! ********************************************************************* + + message ='' + citation ='' + +!normal case (not libxc) + if (ixc >= 0) then + + select case (ixc) + case (0) + message = 'No xc applied (usually for testing) - ixc=0' + citation = '' +! LDA,LSD + case (1) + message = 'LDA: new Teter (4/93) with spin-polarized option - ixc=1' + citation = 'S. Goedecker, M. Teter, J. Huetter, PRB 54, 1703 (1996)' ! [[cite:Goedecker1996]] + case (2) + message = 'LDA: Perdew-Zunger-Ceperley-Alder - ixc=2' + citation = 'J.P.Perdew and A.Zunger, PRB 23, 5048 (1981) ' ! [[cite:Perdew1981]] + case (3) + message = 'LDA: old Teter (4/91) fit to Ceperley-Alder data - ixc=3' + citation = '' + case (4) + message = 'LDA: Wigner - ixc=4' + citation = 'E.P.Wigner, Trans. Faraday Soc. 34, 67 (1938)' ! [[cite:Wigner1938]] + case (5) + message = 'LDA: Hedin-Lundqvist - ixc=5' + citation = 'L.Hedin and B.I.Lundqvist, J. Phys. C4, 2064 (1971)' ! [[cite:Hedin1971]] + case (6) + message = 'LDA: "X-alpha" xc - ixc=6' + citation = 'Slater J. C., Phys. Rev. 81, 385 (1951)' ! [[cite:Slater1951]] + case (7) + message = 'LDA: Perdew-Wang 92 LSD fit to Ceperley-Alder data - ixc=7' + citation = 'J.P.Perdew and Y.Wang, PRB 45, 13244 (1992)' ! [[cite:Perdew1992a]] + case (8) + message = 'LDA: Perdew-Wang 92 LSD , exchange-only - ixc=8' + citation = 'J.P.Perdew and Y.Wang, PRB 45, 13244 (1992)' ! [[cite:Perdew1992a]] + case (9) + message = 'LDA: Perdew-Wang 92 Ex+Ec_RPA energy - ixc=9' + citation = 'J.P.Perdew and Y.Wang, PRB 45, 13244 (1992)' ! [[cite:Perdew1992]] + case (10) + message = 'LDA: RPA LSD energy (only the energy !!) - ixc=10' + citation = '' +! GGA + case (11) + message = 'GGA: Perdew-Burke-Ernzerhof functional - ixc=11' + citation = 'J.P.Perdew, K.Burke, M.Ernzerhof, PRL 77, 3865 (1996)' ! [[cite:Perdew1996]] + case (12) + message = 'GGA: x-only Perdew-Burke-Ernzerhof functional - ixc=12' + citation = 'J.P.Perdew, K.Burke, M.Ernzerhof, PRL 77, 3865 (1996)' ! [[cite:Perdew1996]] + case (13) + message = 'GGA: LDA (ixc==7) energy, and the xc _potential_ is given by van Leeuwen-Baerends GGA - ixc=13' + citation = 'R. van Leeuwen and E. J. Baerends PRA 49, 2421 (1994)' ! [[cite:VanLeeuwen1994]] + case (14) + message = 'GGA: revPBE functional - ixc=14' + citation = 'Zhang and Yang, PRL 80, 890 (1998)' ! [[cite:Zhang1998]] + case (15) + message = 'GGA: RPBE functional - ixc=15' + citation = 'Hammer, L. B. Hansen, and J. K. Norskov, PRB 59, 7413 (1999)' ! [[cite:Hammer1999]] + case (16) + message = 'GGA: HCTH93 functional - ixc=16' + citation = 'F.A. Hamprecht, A.J. Cohen, D.J. Tozer, N.C. Handy, JCP 109, 6264 (1998)' ! [[cite:Hamprecht1998]] + case (17) + message = 'GGA: HCTH120 functional - ixc=17' + citation = 'A.D. Boese, N.L. Doltsinis, N.C. Handy, and M. Sprik, JCP 112, 1670 (2000)' ! [[cite:Boese2000]] + case (23) + message = 'GGA: Wu Cohen functional - ixc=23' + citation = 'Z. Wu and R. E. Cohen, PRB 73, 235116 (2006)' ! [[cite:Wu2006]] + case (24) + message = 'GGA: C09x exchange functional - ixc=24' + citation = 'Valentino R. Cooper, PRB 81, 161104(R) (2010)' ! [[cite:Cooper2010]] + case (26) + message = 'GGA: HCTH147 functional - ixc=26' + citation = 'A.D. Boese, N.L. Doltsinis, N.C. Handy, and M. Sprik, JCP 112, 1670 (2000)' ! [[cite:Boese2000]] + case (27) + message = 'GGA: HCTH407 functional - ixc=27' + citation = 'A.D. Boese, and N.C. Handy, JCP 114, 5497 (2001)' ! [[cite:Boese2001]] +! Fermi-Amaldi + case (20) + message = 'Fermi-Amaldi correction - ixc=20' + citation = '' + case (21) + message = 'Fermi-Amaldi correction with LDA(ixc=1) kernel - ixc=21' + citation = '' + case (22) + message = 'Fermi-Amaldi correction with hybrid BPG kernel - ixc=22' + citation = '' + case (31) + message = 'Meta-GGA fake1 - ixc=31' + citation = '' + case (32) + message = 'Meta-GGA fake2 - ixc=32' + citation = '' + case (33) + message = 'Meta-GGA fake3 - ixc=33' + citation = '' + case (34) + message = 'Meta-GGA fake4 - ixc=34' + citation = '' + case (35) + message = 'Meta-GGA fake5 - ixc=35' + citation = '' + case (40) + message = 'Hartree-Fock with mixing coefficient alpha=1' + citation = '' + case (41) + message = 'PBE0 with alpha=0.25' + citation = '' + case (42) + message = 'modified PBE0 with alpha=0.33' + citation = '' + case (50) + message = 'LDA at finite T Ichimaru-Iyetomy-Tanaka - ixc=50' + citation = 'Ichimaru S., Iyetomi H., Tanaka S., Phys. Rep. 149, 91-205 (1987) ' ! [[cite:Ichimaru1987]] + case default + write(message,'(a,i0)')" echo_xc_name does not know how to handle ixc = ",ixc + ABI_WARNING(message) + end select + + message = " Exchange-correlation functional for the present dataset will be:" // ch10 & +& // " " // trim(message) + + l_citation=len_trim(citation) + citation = " Citation for XC functional:" // ch10 // " " // trim(citation) + + call wrtout(ab_out,message,'COLL') + call wrtout(std_out,message,'COLL') + + if(l_citation/=0)then + call wrtout(ab_out,citation,'COLL') + call wrtout(std_out,citation,'COLL') + end if + + message =' ' + call wrtout(ab_out,message,'COLL') + call wrtout(std_out,message,'COLL') + + end if ! end libxc if + +end subroutine echo_xc_name +!!*** + +!!****f* m_drivexc/has_kxc +!! NAME +!! has_kxc +!! +!! FUNCTION +!! Given a XC functional (defined by ixc), return TRUE if Kxc (dVxc/drho) is avalaible. +!! +!! INPUTS +!! ixc = internal code for xc functional +!! [xc_funcs(2)]= = optional - libXC set of functionals +!! +!! OUTPUT +!! +!! SOURCE + +logical function has_kxc(ixc,xc_funcs) + +!Arguments ------------------------------- + integer, intent(in) :: ixc + type(libxc_functional_type),intent(in),optional :: xc_funcs(2) + +!Local variables ------------------------- + +! ********************************************************************* + + has_kxc=.false. + + if (ixc>=0) then + has_kxc=(ixc/=16.and.ixc/=17.and.ixc/=26.and.ixc/=27) + else if (ixc==-406.or.ixc==-427.or.ixc==-428.or.ixc==-456)then + has_kxc=.true. + else ! ixc<0 and not one of the allowed hybrids + if (present(xc_funcs)) then + has_kxc=libxc_functionals_has_kxc(xc_funcs) + else + has_kxc=libxc_functionals_has_kxc() + end if + end if + +end function has_kxc +!!*** + +!!****f* m_drivexc/has_k3xc +!! NAME +!! has_k3xc +!! +!! FUNCTION +!! Given a XC functional (defined by ixc), return TRUE if K3xc (d2Vxc/drho2) is avalaible. +!! +!! INPUTS +!! ixc = internal code for xc functional +!! [xc_funcs(2)]= = optional - libXC set of functionals +!! +!! +!! OUTPUT +!! +!! SOURCE + +logical function has_k3xc(ixc,xc_funcs) + +!Arguments ------------------------------- + integer, intent(in) :: ixc + type(libxc_functional_type),intent(in),optional :: xc_funcs(2) + +!Local variables ------------------------- + +! ********************************************************************* + + has_k3xc=.false. + + if (ixc>=0) then + has_k3xc=(ixc==0.or.ixc==3.or.(ixc>=7.and.ixc<=15).or. & +& ixc==23.or.ixc==24.or.ixc==41.or.ixc==42.or.ixc==1402000) + else if (ixc==-406.or.ixc==-427.or.ixc==-428.or.ixc==-456)then + has_k3xc=.false. + else ! ixc<0 and not one of the allowed hybrids + if (present(xc_funcs)) then + has_k3xc=libxc_functionals_has_k3xc(xc_funcs) + else + has_k3xc=libxc_functionals_has_k3xc() + end if + end if + +end function has_k3xc +!!*** + +!!****f* m_drivexc/check_kxc +!! NAME +!! check_kxc +!! +!! FUNCTION +!! Given a XC functional (defined by ixc), check if Kxc and/or K3xc is avalaible. +!! +!! INPUTS +!! ixc = internal code for xc functional +!! optdriver=type of calculation (ground-state, response function, GW, ...) +!! [check_k3xc]= optional ; check also k3xc availability +!! +!! OUTPUT +!! +!! SOURCE + +subroutine check_kxc(ixc,optdriver,check_k3xc) + +!Arguments ------------------------------- + integer, intent(in) :: ixc,optdriver + logical,intent(in),optional :: check_k3xc + +!Local variables ------------------------- + logical :: check_k3xc_,kxc_available,k3xc_available + character(len=500) :: msg + +! ********************************************************************* + + check_k3xc_=.false. ; if (present(check_k3xc)) check_k3xc_=check_k3xc + + kxc_available=has_kxc(ixc) + k3xc_available=has_k3xc(ixc) + + if (ixc>=0) then + if (.not.kxc_available) then + write(msg,'(a,i0,3a)') & +& 'The selected XC functional (ixc=',ixc,')',ch10,& +& 'does not provide Kxc (dVxc/drho) !' + end if + if (check_k3xc_.and.(.not.k3xc_available)) then + write(msg,'(a,i0,3a)') & +& 'The selected XC functional (ixc=',ixc,')',ch10,& +& 'does not provide K3xc (d^2Vxc/drho^2) !' + end if + else ! ixc<0 + if (.not.kxc_available) then + write(msg,'(a,i0,7a)') & +& 'The selected XC functional (ixc=',ixc,'):',ch10,& +& ' <<',trim(libxc_functionals_fullname()),'>>',ch10,& +& 'does not provide Kxc (dVxc/drho) !' + end if + if (check_k3xc_.and.(.not.k3xc_available)) then + write(msg,'(a,i0,7a)') & +& 'The selected XC functional (ixc=',ixc,'):',ch10,& +& ' <<',trim(libxc_functionals_fullname()),'>>',ch10,& +& 'does not provide K3xc (d^2Vxc/d^2rho) !' + end if + end if + + if (.not.kxc_available) then + write(msg,'(7a)') trim(msg),ch10,& +& 'However, with the current input options, ABINIT needs Kxc.',ch10,& +& '>Possible action:',ch10,& +& 'Change the XC functional in psp file or input file.' + if (optdriver==0) then + write(msg,'(13a)') trim(msg),ch10,& +& '>Possible action (2):',ch10,& +& 'If you are using density mixing for the SCF cycle',ch10,& +& '(iscf>=10, which is the default for PAW),',ch10,& +& 'change to potential mixing (iscf=7, for instance).',ch10,& +& '>Possible action (3):',ch10,& +& 'Switch to another value of densfor_pred (=5, for instance).' + end if + ABI_ERROR(msg) + else if (check_k3xc_.and.(.not.k3xc_available)) then + write(msg,'(13a)') trim(msg),ch10,& +& 'However, with the current input options, ABINIT needs K3xc.',ch10,& +& '>Possible actions:',ch10,& +& '- Recompile libXC using --enable-kxc.',ch10,& +& ' or',ch10,& +& '- Change the XC functional in psp file or input file:',ch10,& +& ' use one of the internal LDA (ixc=3, 7 to 15, 23, 24).' + ABI_ERROR(msg) + end if + +end subroutine check_kxc +!!*** + +!!****f* m_drivexc/size_dvxc +!! NAME +!! size_dvxc +!! +!! FUNCTION +!! Give the sizes of the several arrays involved in exchange-correlation calculation +!! needed to allocated them for the drivexc routine +!! +!! INPUTS +!! ixc= choice of exchange-correlation scheme +!! order= gives the maximal derivative of Exc computed. +!! 1=usual value (return exc and vxc) +!! 2=also computes the kernel (return exc,vxc,kxc) +!! -2=like 2, except (to be described) +!! 3=also computes the derivative of the kernel (return exc,vxc,kxc,k3xc) +!! nspden= number of spin components +!! [xc_funcs(2)]= +!! [add_tfw]= optional flag controling the addition of Weiszacker gradient correction to Thomas-Fermi XC energy +!! +!! OUTPUT +!! --- All optionals +!! [usegradient]= [flag] 1 if the XC functional needs the gradient of the density (grho2_updn) +!! [uselaplacian]= [flag] 1 if the XC functional needs the laplacian of the density (lrho_updn) +!! [usekden]= [flag] 1 if the XC functional needs the kinetic energy density (lrho_updn) +!! [nvxcgrho]= size of the array dvxcdgr(npts,nvxcgrho) (derivative of Exc wrt to gradient) +!! [nvxclrho]= size of the array dvxclpl(npts,nvxclrho) (derivative of Exc wrt to laplacian) +!! [nvxctau]= size of the array dvxctau(npts,nvxctau) (derivative of Exc wrt to kin. ener. density) +!! [ndvxc]= size of the array dvxc(npts,ndvxc) (second derivatives of Exc wrt to density and gradient) +!! [nd2vxc]= size of the array d2vxc(npts,nd2vxc) (third derivatives of Exc wrt density) +!! +!! SOURCE + +subroutine size_dvxc(ixc,order,nspden,& +& usegradient,uselaplacian,usekden,& +& nvxcgrho,nvxclrho,nvxctau,ndvxc,nd2vxc,& +& add_tfw,xc_funcs) ! Optional + +!Arguments---------------------- + integer,intent(in) :: ixc,nspden,order + integer,intent(out),optional :: nvxcgrho,nvxclrho,nvxctau,ndvxc,nd2vxc + integer,intent(out),optional :: usegradient,uselaplacian,usekden + logical, intent(in),optional :: add_tfw + type(libxc_functional_type),intent(in),optional :: xc_funcs(2) + +!Local variables---------------- + logical :: libxc_has_kxc,libxc_has_k3xc,libxc_isgga,libxc_ismgga,libxc_ishybrid,my_add_tfw + logical :: need_gradient,need_laplacian,need_kden + +! ************************************************************************* + +!Several flags + my_add_tfw=.false.;if (present(add_tfw)) my_add_tfw=add_tfw + libxc_isgga=.false. ; libxc_ismgga=.false. ; libxc_ishybrid=.false. + if(ixc<0)then + if(present(xc_funcs))then + libxc_has_kxc=libxc_functionals_has_kxc(xc_funcs) + libxc_has_k3xc=libxc_functionals_has_k3xc(xc_funcs) + libxc_isgga=libxc_functionals_isgga(xc_functionals=xc_funcs) + libxc_ismgga=libxc_functionals_ismgga(xc_functionals=xc_funcs) + libxc_ishybrid=libxc_functionals_is_hybrid(xc_functionals=xc_funcs) + else + libxc_has_kxc=libxc_functionals_has_kxc() + libxc_has_k3xc=libxc_functionals_has_k3xc() + libxc_isgga=libxc_functionals_isgga() + libxc_ismgga=libxc_functionals_ismgga() + libxc_ishybrid=libxc_functionals_is_hybrid() + end if + end if + +!Do we use the gradient? + need_gradient=((ixc>=11.and.ixc<=17).or.(ixc==23.or.ixc==24).or. & +& (ixc==26.or.ixc==27).or.(ixc>=31.and.ixc<=35).or. & +& (ixc==41.or.ixc==42).or.ixc==1402000) + if (ixc<0.and.(libxc_isgga.or.libxc_ismgga.or.libxc_ishybrid)) need_gradient=.true. + if (my_add_tfw) need_gradient=.true. + if (present(usegradient)) usegradient=merge(1,0,need_gradient) + +!Do we use the laplacian? + need_laplacian=(ixc==32.or.ixc==35) + if (ixc<0) then + if(present(xc_funcs)) need_laplacian=libxc_functionals_needs_laplacian(xc_functionals=xc_funcs) + if(.not.present(xc_funcs)) need_laplacian=libxc_functionals_needs_laplacian() + end if + if (present(uselaplacian)) uselaplacian=merge(1,0,need_laplacian) + +!Do we use the kinetic energy density? + need_kden=(ixc==31.or.ixc==34.or.ixc==35) + if (ixc<0) need_kden=libxc_ismgga + if (present(usekden)) usekden=merge(1,0,need_kden) + +!First derivative(s) of XC functional wrt gradient of density + if (present(nvxcgrho)) then + nvxcgrho=0 + if (abs(order)>=1) then + if (need_gradient) nvxcgrho=3 + if (ixc==13) nvxcgrho=0 + if (ixc==16.or.ixc==17.or.ixc==26.or.ixc==27) nvxcgrho=2 + end if + end if + +!First derivative(s) of XC functional wrt laplacian of density + if (present(nvxclrho)) then + nvxclrho=0 + if (abs(order)>=1) then + if (need_laplacian) nvxclrho=min(nspden,2) + end if + end if + +!First derivative(s) of XC functional wrt kinetic energy density + if (present(nvxctau)) then + nvxctau=0 + if (abs(order)>=1) then + if (need_kden) nvxctau=min(nspden,2) + end if + end if + +!Second derivative(s) of XC functional wrt density + if (present(ndvxc)) then + ndvxc=0 + if (abs(order)>=2) then + if (ixc==1.or.ixc==7.or.ixc==8.or.ixc==9.or.ixc==10.or.ixc==13.or. & +& ixc==21.or.ixc==22) then + ndvxc=min(nspden,2)+1 + else if ((ixc>=2.and.ixc<=6).or.(ixc>=31.and.ixc<=35).or.ixc==50) then + ndvxc=1 + else if (ixc==12.or.ixc==24) then + ndvxc=8 + else if (ixc==11.or.ixc==12.or.ixc==14.or.ixc==15.or. & +& ixc==23.or.ixc==41.or.ixc==42.or.ixc==1402000) then + ndvxc=15 + else if (ixc<0) then + if (libxc_has_kxc.or.ixc==-406.or.ixc==-427.or.ixc==-428.or.ixc==-456) then + ndvxc=2*min(nspden,2)+1 ; if (order==-2) ndvxc=2 + if (need_gradient) ndvxc=15 ! This is for GGA, but also for mGGA + ! (we dont consider derivatives wrt Tau or Laplacian) + end if + end if + end if + end if + +!Third derivative(s) of XC functional wrt density + if (present(nd2vxc)) then + nd2vxc=0 + if (abs(order)>=3) then + if (ixc==3.or.(ixc>=11.and.ixc<=15.and.ixc/=13).or. & +& ixc==23.or.ixc==24.or.ixc==41.or.ixc==42) then + nd2vxc=1 + else if ((ixc>=7.and.ixc<=10).or.ixc==13.or.ixc==1402000) then + nd2vxc=3*min(nspden,2)-2 + else if (ixc<0) then + if (libxc_has_k3xc) then + if (.not.need_gradient) nd2vxc=3*min(nspden,2)-2 + end if + end if + end if + end if + +end subroutine size_dvxc +!!*** + +!!****f* m_drivexc/xcmult +!! NAME +!! xcmult +!! +!! FUNCTION +!! In the case of GGA, multiply the different gradient of spin-density +!! by the derivative of the XC functional with respect +!! to the norm of the gradient, then divide it by the norm of the gradient +!! +!! INPUTS +!! depsxc(nfft,nspgrad)=derivative of Exc with respect to the (spin-)density, +!! or to the norm of the gradient of the (spin-)density, +!! further divided by the norm of the gradient of the (spin-)density +!! The different components of depsxc will be +!! for nspden=1, depsxc(:,1)=d(rho.exc)/d(rho) +!! and if ngrad=2, depsxc(:,2)=1/2*1/|grad rho_up|*d(rho.exc)/d(|grad rho_up|) +!! + 1/|grad rho|*d(rho.exc)/d(|grad rho|) +!! (do not forget : |grad rho| /= |grad rho_up| + |grad rho_down| +!! for nspden=2, depsxc(:,1)=d(rho.exc)/d(rho_up) +!! depsxc(:,2)=d(rho.exc)/d(rho_down) +!! and if ngrad=2, depsxc(:,3)=1/|grad rho_up|*d(rho.exc)/d(|grad rho_up|) +!! depsxc(:,4)=1/|grad rho_down|*d(rho.exc)/d(|grad rho_down|) +!! depsxc(:,5)=1/|grad rho|*d(rho.exc)/d(|grad rho|) +!! nfft=(effective) number of FFT grid points (for this processor) +!! ngrad = must be 2 +!! nspden=number of spin-density components +!! nspgrad=number of spin-density and spin-density-gradient components +!! +!! OUTPUT +!! (see side effects) +!! +!! SIDE EFFECTS +!! rhonow(nfft,nspden,ngrad*ngrad)= +!! at input : +!! electron (spin)-density in real space and its gradient, +!! either on the unshifted grid (if ishift==0, +!! then equal to rhor), or on the shifted grid +!! rhonow(:,:,1)=electron density in electrons/bohr**3 +!! rhonow(:,:,2:4)=gradient of electron density in el./bohr**4 +!! at output : +!! rhonow(:,:,2:4) has been multiplied by the proper factor, +!! described above. +!! +!! SOURCE + +subroutine xcmult (depsxc,nfft,ngrad,nspden,nspgrad,rhonow) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: nfft,ngrad,nspden,nspgrad +!arrays + real(dp),intent(in) :: depsxc(nfft,nspgrad) + real(dp),intent(inout) :: rhonow(nfft,nspden,ngrad*ngrad) + +!Local variables------------------------------- +!scalars + integer :: idir,ifft + real(dp) :: rho_tot,rho_up + +! ************************************************************************* + + do idir=1,3 + + if(nspden==1)then +!$OMP PARALLEL DO PRIVATE(ifft) SHARED(depsxc,idir,nfft,rhonow) + do ifft=1,nfft + rhonow(ifft,1,1+idir)=rhonow(ifft,1,1+idir)*depsxc(ifft,2) + end do + + else + +! In the spin-polarized case, there are more factors to take into account +!$OMP PARALLEL DO PRIVATE(ifft,rho_tot,rho_up) SHARED(depsxc,idir,nfft,rhonow) + do ifft=1,nfft + rho_tot=rhonow(ifft,1,1+idir) + rho_up =rhonow(ifft,2,1+idir) + rhonow(ifft,1,1+idir)=rho_up *depsxc(ifft,3) + rho_tot*depsxc(ifft,5) + rhonow(ifft,2,1+idir)=(rho_tot-rho_up)*depsxc(ifft,4)+ rho_tot*depsxc(ifft,5) + end do + + end if ! nspden==1 + + end do ! End loop on directions + +end subroutine xcmult +!!*** + +!!****f* m_drivexc/mkdenpos +!! NAME +!! mkdenpos +!! +!! FUNCTION +!! Make a density positive everywhere: +!! when the density (or spin-density) is smaller than xc_denpos, +!! set it to the value of xc_denpos +!! +!! INPUTS +!! nfft=(effective) number of FFT grid points (for this processor) +!! nspden=number of spin-density components (max. 2) +!! option=0 if density rhonow is stored as (up,dn) +!! 1 if density rhonow is stored as (up+dn,up) +!! Active only when nspden=2 +!! xc_denpos= lowest allowed density (usually for the computation of the XC functionals) +!! +!! OUTPUT +!! (see side effects) +!! +!! SIDE EFFECTS +!! Input/output +!! iwarn=At input: iwarn=0 a warning will be printed when rho is negative +!! iwarn>0 no warning will be printed out +!! At output: iwarn is increased by 1 +!! rhonow(nfft,nspden)=electron (spin)-density in real space, +!! either on the unshifted grid (if ishift==0, +!! then equal to rhor),or on the shifted grid +!! +!! NOTES +!! At this stage, rhonow(:,1:nspden) contains the density in real space, +!! on the unshifted or shifted grid. Now test for negative densities +!! Note that, ignoring model core charge, as long as boxcut>=2 +!! the shifted density is derivable from the square of a Fourier +!! interpolated charge density => CANNOT go < 0. +!! However, actually can go < 0 to within machine precision; +!! do not print useless warnings in this case, just fix it. +!! Fourier interpolated core charge can go < 0 due to Gibbs +!! oscillations; could avoid this by recomputing the model core +!! charge at the new real space grid points (future work). +!! +!! SOURCE + +subroutine mkdenpos(iwarn,nfft,nspden,option,rhonow,xc_denpos) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: nfft,nspden,option + integer,intent(inout) :: iwarn + real(dp),intent(in) :: xc_denpos +!arrays + real(dp),intent(inout) :: rhonow(nfft,nspden) + +!Local variables------------------------------- +!scalars + integer :: ifft,ispden,numneg + real(dp) :: rhotmp,worst + character(len=600) :: message +!arrays + real(dp) :: rho(2) + +! ************************************************************************* + + numneg=0 + worst=zero + + if(nspden==1)then + +! Non spin-polarized +!$OMP PARALLEL DO PRIVATE(ifft,rhotmp) REDUCTION(MIN:worst) REDUCTION(+:numneg) SHARED(nfft,rhonow) + do ifft=1,nfft + rhotmp=rhonow(ifft,1) + if(rhotmp2 not allowed !') + end if ! End choice between non-spin polarized and spin-polarized. + + if (numneg>0) then + if (iwarn==0) then + write(message,'(a,i0,a,a,a,es10.2,a,e10.2,11a)')& +& 'Density went too small (lower than xc_denpos) at ',numneg,' points',ch10,& +& 'and was set to xc_denpos = ',xc_denpos,'. Lowest was ',worst,'.',ch10,& +& 'This might be due to (1) too low boxcut or (2) too low ecut for',ch10,& +& ' pseudopotential core charge, or (3) too low ecut for estimated initial density.',ch10,& +& ' Possible workarounds : increase ecut, or define the input variable densty,',ch10,& +& ' with a value larger than the guess for the decay length, or initialize your,',ch10,& +& ' density with a preliminary LDA or GGA-PBE if you are using a more exotic xc functional.' + ABI_WARNING(message) + end if + iwarn=iwarn+1 + end if + +end subroutine mkdenpos +!!*** + +!!****f* m_drivexc/drivexc +!! NAME +!! drivexc +!! +!! FUNCTION +!! Driver of XC functionals. Treat spin-polarized as well as non-spin-polarized. +!! Treat local approximations, GGAs, meta-GGAs or hybrid functionals. +!! Optionally, deliver the XC kernel, or even the derivative +!! of the XC kernel (the third derivative of the XC energy) +!! +!! INPUTS +!! ixc=index of the XC functional +!! xclevel=XC functional level (lda, gga, etc...) +!! usegradient=[flag] 1 if the XC functional depends on density gradient (grho2_updn) +!! uselaplacian=[flag] 1 if the XC functional depends on density laplacian (lrho_updn) +!! usekden=[flag] 1 if the XC functional depends on kinetic energy density (tau_updn) +!! order=gives the maximal derivative of Exc computed. +!! 1=usual value (return exc and vxc) +!! 2=also computes the kernel (return exc,vxc,kxc) +!! -2=like 2, except (to be described) +!! 3=also computes the derivative of the kernel (return exc,vxc,kxc,k3xc) +!! npts=number of real space points on which the density is provided +!! nspden=number of spin-density components (1 or 2) +!! nvxcgrho=number of components of 1st-derivative of Exc wrt density gradient (nvxcgrho) +!! nvxclrho=number of components of 1st-derivative of Exc wrt density laplacian (nvxclrho) +!! nvxctau=number of components of 1st-derivative of Exc wrt kinetic energy density (nvxctau) +!! ndvxc=number of components of 1st-derivative of Vxc (dvxc) +!! nd2vxc=number of components of 2nd-derivative of Vxc (d2vxc) +!! rho_updn(npts,nspden)=spin-up and spin-down densities +!! In the calling routine, spin-down density must be equal to spin-up density. +!! If nspden=1, only spin-up density must be given (half the total density). +!! If nspden=2, spin-up and spin-down densities must be given. +!! === Optional input arguments === +!! [grho2_updn(npts,(2*nspden-1)*usegradient)]=the square of the gradients +!! of spin-up, spin-down, and total density. +!! If nspden=1, only the square of the gradient of the spin-up density must be given. +!! In the calling routine, the square of the gradient of the spin-down density must be equal +!! to the square of the gradient of the spin-up density, and both must be equal to +!! one-quarter of the square of the gradient of the total density. +!! If nspden=2, the square of the gradients of spin-up, spin-down, and total density must be given. +!! Note that the square of the gradient of the total density is usually NOT related to +!! the square of the gradient of the spin-up and spin-down densities, because the gradients +!! are not usually aligned. This is not the case when nspden=1. +!! [lrho_updn(npts,nspden*uselaplacian)]=the Laplacian of spin-up and spin-down densities. +!! If nspden=1, only the spin-up Laplacian density must be given and must +!! be equal to the spin-up Laplacian density. +!! If nspden=2, the Laplacian of spin-up and spin-down densities must be given. +!! [tau_updn(npts,nspden*usekden)]=the spin-up and spin-down kinetic energy densities. +!! If nspden=1, only the spin-up kinetic energy density must be given and must +!! be equal to the half the total kinetic energy density. +!! If nspden=2, the spin-up and spin-down kinetic energy densities must be given. +!! [exexch]=choice of <<>> exact exchange. Active if exexch=3 (only for GGA, and NOT for libxc) +!! [el_temp]= electronic temperature (to be used for finite temperature XC functionals) +!! [hyb_mixing]= mixing parameter for the native PBEx functionals (ixc=41 and 42) +!! [xc_funcs(2)]= : libxc XC functionals. +!! +!! OUTPUT +!! exc(npts)=exchange-correlation energy density (hartree) +!! vxcrho(npts,nspden)= (d($\rho$*exc)/d($\rho_up$)) (hartree) +!! and (d($\rho$*exc)/d($\rho_down$)) (hartree) +!! === Optional output arguments === +!! [vxcgrho(npts,nvxcgrho)]=1st-derivative of the xc energy wrt density gradient> +!! = 1/$|grad \rho_up|$ (d($\rho$*exc)/d($|grad \rho_up|$)) +!! 1/$|grad \rho_dn|$ (d($\rho$*exc)/d($|grad \rho_dn|$)) +!! 1/$|grad \rho|$ (d($\rho$*exc)/d($|grad \rho|$)) +!! [vxclrho(npts,nvxclrho)]=1st-derivative of the xc energy wrt density laplacian. +!! = d($\rho$*exc)/d($\lrho_up$) +!! d($\rho$*exc)/d($\lrho_down$) +!! [vxctau(npts,nvxctau)]=1st-derivative of the xc energy wrt kinetic energy density. +!! = d($\rho$*exc)/d($\tau_up$) +!! d($\rho$*exc)/d($\tau_down$) +!! [dvxc(npts,ndvxc)]=partial second derivatives of the XC energy +!! === Only if abs(order)>1 === +!! In case of local energy functional (option=1,-1 or 3): +!! dvxc(npts,1+nspden)= +!! if(nspden=1 .and. order==2): dvxci(:,1)=dvxc/d$\rho$ , dvxc(:,2) empty +!! if(nspden=1 .and. order==-2): also compute dvxci(:,2)=dvxc($\uparrow$)/d$\rho(\downarrow)$ +!! if(nspden=2): dvxc(:,1)=dvxc($\uparrow$)/d$\rho(\downarrow)$, +!! dvxc(:,2)=dvxc($\uparrow$)/d$\rho(\downarrow)$, +!! dvxc(:,3)=dvxc($\downarrow$)/d$\rho(\downarrow)$ +!! In case of gradient corrected functional (option=2,-2, 4, -4, 5, 6, 7): +!! dvxc(npts,15)= +!! dvxc(:,1)= d2Ex/drho_up drho_up +!! dvxc(:,2)= d2Ex/drho_dn drho_dn +!! dvxc(:,3)= dEx/d(abs(grad(rho_up))) / abs(grad(rho_up)) +!! dvxc(:,4)= dEx/d(abs(grad(rho_dn))) / abs(grad(rho_dn)) +!! dvxc(:,5)= d2Ex/d(abs(grad(rho_up))) drho_up / abs(grad(rho_up)) +!! dvxc(:,6)= d2Ex/d(abs(grad(rho_dn))) drho_dn / abs(grad(rho_dn)) +!! dvxc(:,7)= 1/abs(grad(rho_up)) * d/d(abs(grad(rho_up)) (dEx/d(abs(grad(rho_up))) /abs(grad(rho_up))) +!! dvxc(:,8)= 1/abs(grad(rho_dn)) * d/d(abs(grad(rho_dn)) (dEx/d(abs(grad(rho_dn))) /abs(grad(rho_dn))) +!! dvxc(:,9)= d2Ec/drho_up drho_up +!! dvxc(:,10)=d2Ec/drho_up drho_dn +!! dvxc(:,11)=d2Ec/drho_dn drho_dn +!! dvxc(:,12)=dEc/d(abs(grad(rho))) / abs(grad(rho)) +!! dvxc(:,13)=d2Ec/d(abs(grad(rho))) drho_up / abs(grad(rho)) +!! dvxc(:,14)=d2Ec/d(abs(grad(rho))) drho_dn / abs(grad(rho)) +!! dvxc(:,15)=1/abs(grad(rho)) * d/d(abs(grad(rho)) (dEc/d(abs(grad(rho))) /abs(grad(rho))) +!! Note about mGGA: 2nd derivatives involving Tau or Laplacian are not output +!! [d2vxc(npts,nd2vxc)]=second derivative of the XC potential=3rd order derivative of XC energy +!! === Only if abs(order)>1 === +!! === At present only available for LDA === +!! if nspden=1 d2vxc(npts,1)=second derivative of the XC potential=3rd order derivative of energy +!! if nspden=2 d2vxc(npts,1), d2vxc(npts,2), d2vxc(npts,3), d2vxc(npts,4) (3rd derivative of energy) +!! [fxcT(npts)]=XC free energy of the electron gaz at finite temperature (to be used for plasma systems) +!! +!! SOURCE + +subroutine drivexc(ixc,order,npts,nspden,usegradient,uselaplacian,usekden,& +& rho_updn,exc,vxcrho,nvxcgrho,nvxclrho,nvxctau,ndvxc,nd2vxc, & ! mandatory arguments +& grho2_updn,vxcgrho,lrho_updn,vxclrho,tau_updn,vxctau,dvxc,d2vxc, & ! optional arguments +& exexch,el_temp,fxcT,hyb_mixing,xc_funcs) ! optional parameters + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: ixc,npts,nspden + integer,intent(in) :: ndvxc,nd2vxc,nvxcgrho,nvxclrho,nvxctau,order + integer,intent(in) :: usegradient,uselaplacian,usekden + integer,intent(in),optional :: exexch + real(dp),intent(in),optional :: el_temp,hyb_mixing +!arrays + real(dp),intent(in) :: rho_updn(npts,nspden) + real(dp),intent(in),optional :: grho2_updn(npts,(2*nspden-1)*usegradient) + real(dp),intent(in),optional :: lrho_updn(npts,nspden*uselaplacian),tau_updn(npts,nspden*usekden) + real(dp),intent(out) :: exc(npts),vxcrho(npts,nspden) + real(dp),intent(out),optional :: dvxc(npts,ndvxc),d2vxc(npts,nd2vxc),fxcT(:) + real(dp),intent(out),optional :: vxcgrho(npts,nvxcgrho),vxclrho(npts,nvxclrho),vxctau(npts,nvxctau) + type(libxc_functional_type),intent(inout),optional :: xc_funcs(2) + +!Local variables------------------------------- +!scalars + integer :: ispden,ixc_from_lib,ixc1,ixc2,ndvxc_x + integer :: my_exexch,need_ndvxc,need_nd2vxc,need_nvxcgrho,need_nvxclrho,need_nvxctau + integer :: need_gradient,need_laplacian,need_kden,optpbe + logical :: has_gradient,has_laplacian,has_kden,libxc_test + real(dp) :: alpha,beta,my_hyb_mixing + real(dp),parameter :: rsfac=0.6203504908994000e0_dp + character(len=500) :: message +!arrays + real(dp),allocatable :: exci_rpa(:),rhotot(:),rspts(:),vxci_rpa(:,:),zeta(:) + real(dp),allocatable :: exc_c(:),exc_x(:),vxcrho_c(:,:),vxcrho_x(:,:) + real(dp),allocatable :: d2vxc_c(:,:),d2vxc_x(:,:),dvxc_c(:,:),dvxc_x(:,:) + real(dp),allocatable :: vxcgrho_x(:,:) + type(libxc_functional_type) :: xc_funcs_vwn3(2),xc_funcs_lyp(2) + +! ************************************************************************* + +!optional arguments + my_exexch=0;if(present(exexch)) my_exexch=exexch + my_hyb_mixing=0 + if (ixc==41) my_hyb_mixing=quarter + if (ixc==42) my_hyb_mixing=third + if (present(hyb_mixing)) my_hyb_mixing=hyb_mixing + +! ================================================= +! == Compatibility tests == +! ================================================= + +!Check libXC initialization + if (ixc<0 .or. ixc==1402) then + libxc_test=libxc_functionals_check(stop_if_error=.true.) + end if + +! Check libXC consistency between ixc passed in input +! and the one used to initialize the libXC library + if (ixc<0) then + ixc_from_lib=libxc_functionals_ixc() + if (present(xc_funcs)) then + ixc_from_lib=libxc_functionals_ixc(xc_functionals=xc_funcs) + else + ixc_from_lib=libxc_functionals_ixc() + end if + if (ixc/=ixc_from_lib) then + write(message, '(a,i0,2a,i0)')& +& 'The value of ixc specified in input, ixc = ',ixc,ch10,& +& 'differs from the one used to initialize the functional ',ixc_from_lib + ABI_BUG(message) + end if + end if + +!Check value of order + if( (order<1.and.order/=-2).or.order>4)then + write(message, '(a,i0)' )& +& 'The only allowed values for order are 1, 2, -2 or 3, while it is found to be ',order + ABI_BUG(message) + end if + +!Determine quantities available in input arguments + has_gradient=.false.;has_laplacian=.false.;has_kden=.false. + if (usegradient==1) then + if (.not.present(grho2_updn)) then + ABI_BUG('missing grho2_updn argument!') + end if + if (nvxcgrho>0) then + if (.not.present(vxcgrho)) then + ABI_BUG('missing vxcgrho argument!') + end if + has_gradient=.true. + end if + else if (nvxcgrho>0) then + ABI_BUG('nvxcgrho>0 and usegradient=0!') + end if + if (uselaplacian==1) then + if (.not.present(lrho_updn)) then + ABI_BUG('missing lrho_updn argument!') + end if + if (nvxclrho>0) then + if (.not.present(vxclrho)) then + ABI_BUG('missing vxclrho argument!') + end if + has_laplacian=.true. + end if + else if (nvxclrho>0) then + ABI_BUG('nvxclrho>0 and uselaplacian=0!') + end if + if (usekden==1) then + if (.not.present(tau_updn)) then + ABI_BUG('missing tau_updn argument!') + end if + if (nvxctau>0) then + if (.not.present(vxctau)) then + ABI_BUG('missing vxctau argument!') + end if + has_kden=.true. + end if + else if (nvxctau>0) then + ABI_BUG('nvxctau>0 and usekden=0!') + end if + if (abs(order)>=2) then + if (.not.present(dvxc)) then + message='order>=2 needs argument dvxc!' + ABI_BUG(message) + else if (ndvxc==0) then + message='order>=2 needs ndvxc>0!' + ABI_BUG(message) + end if + end if + if (abs(order)>=3) then + if (.not.present(d2vxc)) then + message='order>=3 needs argument d2vxc!' + ABI_BUG(message) + else if (nd2vxc==0) then + message='order>=3 needs nd2vxc>0!' + ABI_BUG(message) + end if + end if + +!Determine quantities needed by XC functional + if (present(xc_funcs)) then + call size_dvxc(ixc,order,nspden,usegradient=need_gradient,& +& uselaplacian=need_laplacian,usekden=need_kden,& +& nvxcgrho=need_nvxcgrho,nvxclrho=need_nvxclrho,& +& nvxctau=need_nvxctau,ndvxc=need_ndvxc,nd2vxc=need_nd2vxc,& +& xc_funcs=xc_funcs) + else + call size_dvxc(ixc,order,nspden,usegradient=need_gradient,& +& uselaplacian=need_laplacian,usekden=need_kden,& +& nvxcgrho=need_nvxcgrho,nvxclrho=need_nvxclrho,& +& nvxctau=need_nvxctau,ndvxc=need_ndvxc,nd2vxc=need_nd2vxc) + end if + if ((has_gradient.and.need_gradient>usegradient).or.& +& (has_laplacian.and.need_laplacian>uselaplacian).or.& +& (has_kden.and.need_kden>usekden)) then + write(message, '(3a)' )& +& 'one of the arguments usegradient/uselaplacian/usesekden',ch10,& +& 'doesnt match the requirements of the XC functional!' + ABI_BUG(message) + end if + if ((has_gradient.and.need_nvxcgrho>nvxcgrho).or.& +& (has_laplacian.and.need_nvxclrho>nvxclrho).or.& +& (has_kden.and.need_nvxctau>nvxctau).or.& +& need_ndvxc>ndvxc.or.need_nd2vxc>nd2vxc) then + write(message, '(3a)' )& +& 'one of the arguments nvxcgrho/nvxclrho/nvxctau/ndvxc/nd2vxc',ch10,& +& 'doesnt match the requirements of the XC functional!' + ABI_BUG(message) + end if + !Deactivate this test because, in case of mGGA, we can output derivatives involving + ! the density and its gradient. Derivatives involving tau or Laplacian will not be output. + !if (abs(order)>1.and.ixc<0.and.(need_laplacian==1.or.need_kden==1)) then + ! message='Derivatives of XC potential are not available in mGGA!' + ! ABI_BUG(message) + !end if + +!Check other optional arguments + if (my_exexch/=0.and.usegradient==0) then + message='exexch argument only valid for GGA!' + ABI_BUG(message) + end if + if(ixc==50) then + if(.not.(present(el_temp)).or.(.not.present(fxcT)))then + message = 'el_temp or fxcT is not present but are needed for IIT XC functional.' + ABI_BUG(message) + end if + if (size(fxcT)/=npts) then + ABI_BUG('fxcT size must be npts!') + end if + end if + +! ================================================= +! == Intermediate quantities computation == +! ================================================= + +!If needed, compute rhotot and rs + if (ixc==1.or.ixc==2.or.ixc==3.or.ixc==4.or.ixc==5.or.& +& ixc==6.or.ixc==21.or.ixc==22.or.ixc==50) then + ABI_MALLOC(rhotot,(npts)) + ABI_MALLOC(rspts,(npts)) + if(nspden==1)then + rhotot(:)=two*rho_updn(:,1) + else + rhotot(:)=rho_updn(:,1)+rho_updn(:,2) + end if + call invcb(rhotot,rspts,npts) + rspts(:)=rsfac*rspts(:) + end if + +!If needed, compute zeta + if (ixc==1.or.ixc==21.or.ixc==22) then + ABI_MALLOC(zeta,(npts)) + if(nspden==1)then + zeta(:)=zero + else + zeta(:)=two*rho_updn(:,1)/rhotot(:)-one + end if + end if + +! ================================================= +! == XC energy, potentiel, ... computation == +! ================================================= + +!>>>>> No exchange-correlation + if (ixc==0.or.ixc==40) then + exc=zero ; vxcrho=zero + if (present(dvxc).and.ndvxc>0) dvxc(:,:)=zero + if (present(d2vxc).and.nd2vxc>0) d2vxc(:,:)=zero + if (present(vxcgrho).and.nvxcgrho>0) vxcgrho(:,:)=zero + if (present(vxclrho).and.nvxclrho>0) vxclrho(:,:)=zero + if (present(vxctau).and.nvxctau>0) vxctau(:,:)=zero + +!>>>>> New Teter fit (4/93) to Ceperley-Alder data, with spin-pol option + else if (ixc==1 .or. ixc==21 .or. ixc==22) then +! new Teter fit (4/93) to Ceperley-Alder data, with spin-pol option + if (order**2 <= 1) then + call xcspol(exc,npts,nspden,order,rspts,vxcrho,zeta,ndvxc) + else + call xcspol(exc,npts,nspden,order,rspts,vxcrho,zeta,ndvxc,dvxc) + end if + +!>>>>> Perdew-Zunger fit to Ceperly-Alder data (no spin-pol) + else if (ixc==2) then + if (order**2 <= 1) then + call xcpzca(exc,npts,order,rhotot,rspts,vxcrho(:,1)) + else + call xcpzca(exc,npts,order,rhotot,rspts,vxcrho(:,1),dvxc) + end if + +!>>>>> Teter fit (4/91) to Ceperley-Alder values (no spin-pol) + else if (ixc==3) then + if (order**2 <= 1) then + call xctetr(exc,npts,order,rhotot,rspts,vxcrho(:,1)) + else if (order == 2) then + call xctetr(exc,npts,order,rhotot,rspts,vxcrho(:,1),dvxc=dvxc) + else if (order == 3) then + call xctetr(exc,npts,order,rhotot,rspts,vxcrho(:,1),d2vxc=d2vxc,dvxc=dvxc) + end if + +!>>>>> Wigner xc (no spin-pol) + else if (ixc==4) then + if (order**2 <= 1) then + call xcwign(exc,npts,order,rspts,vxcrho(:,1)) + else + call xcwign(exc,npts,order,rspts,vxcrho(:,1),dvxc) + end if + +!>>>>> Hedin-Lundqvist xc (no spin-pol) + else if (ixc==5) then + if (order**2 <= 1) then + call xchelu(exc,npts,order,rspts,vxcrho(:,1)) + else + call xchelu(exc,npts,order,rspts,vxcrho(:,1),dvxc) + end if + +!>>>>> X-alpha (no spin-pol) + else if (ixc==6) then + if (order**2 <= 1) then + call xcxalp(exc,npts,order,rspts,vxcrho(:,1)) + else + call xcxalp(exc,npts,order,rspts,vxcrho(:,1),dvxc) + end if + +!>>>>> PBE and alternatives + else if (((ixc>=7.and.ixc<=15).or.(ixc>=23.and.ixc<=24)).and.ixc/=10.and.ixc/=13) then +! Perdew-Wang LSD is coded in Perdew-Burke-Ernzerhof GGA, with optpbe=1 + if(ixc==7)optpbe=1 +! x-only part of Perdew-Wang + if(ixc==8)optpbe=-1 +! Exchange + RPA correlation from Perdew-Wang + if(ixc==9)optpbe=3 +! Perdew-Burke-Ernzerhof GGA + if(ixc==11)optpbe=2 +! x-only part of PBE + if(ixc==12)optpbe=-2 +! C09x exchange of V. R. Cooper + if(ixc==24)optpbe=-4 +! revPBE of Zhang and Yang + if(ixc==14)optpbe=5 +! RPBE of Hammer, Hansen and Norskov + if(ixc==15)optpbe=6 +! Wu and Cohen + if(ixc==23)optpbe=7 + if (ixc >=7.and.ixc<=9) then + if (order**2 <= 1) then + call xcpbe(exc,npts,nspden,optpbe,order,rho_updn,vxcrho,ndvxc,nd2vxc) + else if (order /=3) then + call xcpbe(exc,npts,nspden,optpbe,order,rho_updn,vxcrho,ndvxc,nd2vxc,dvxci=dvxc) + else if (order ==3) then + call xcpbe(exc,npts,nspden,optpbe,order,rho_updn,vxcrho,ndvxc,nd2vxc,d2vxci=d2vxc,dvxci=dvxc) + end if + else if ((ixc >= 11 .and. ixc <= 15) .or. (ixc>=23 .and. ixc<=24)) then + if (order**2 <= 1) then + call xcpbe(exc,npts,nspden,optpbe,order,rho_updn,vxcrho,ndvxc,nd2vxc,& +& dvxcdgr=vxcgrho,exexch=my_exexch,grho2_updn=grho2_updn) + else if (order /=3) then + if(ixc==12 .or. ixc==24)then + call xcpbe(exc,npts,nspden,optpbe,order,rho_updn,vxcrho,ndvxc,nd2vxc,& +& dvxcdgr=vxcgrho,dvxci=dvxc,grho2_updn=grho2_updn) + else if(ixc/=12 .or. ixc/=24) then + call xcpbe(exc,npts,nspden,optpbe,order,rho_updn,vxcrho,ndvxc,nd2vxc,& +& dvxcdgr=vxcgrho,dvxci=dvxc,grho2_updn=grho2_updn) + end if + else if (order ==3) then + if(ixc==12 .or. ixc==24)then + call xcpbe(exc,npts,nspden,optpbe,order,rho_updn,vxcrho,ndvxc,nd2vxc,& +& d2vxci=d2vxc,dvxcdgr=vxcgrho,dvxci=dvxc,grho2_updn=grho2_updn) + else if(ixc/=12 .or. ixc/=24) then + call xcpbe(exc,npts,nspden,optpbe,order,rho_updn,vxcrho,ndvxc,nd2vxc,& +& d2vxci=d2vxc,dvxcdgr=vxcgrho,dvxci=dvxc,grho2_updn=grho2_updn) + end if + end if + end if + +!>>>>> RPA correlation from Perdew-Wang + else if (ixc==10) then + if (order**2 <= 1) then + ABI_MALLOC(exci_rpa,(npts)) + ABI_MALLOC(vxci_rpa,(npts,2)) + optpbe=3 + call xcpbe(exci_rpa,npts,nspden,optpbe,order,rho_updn,vxci_rpa,ndvxc,nd2vxc) + optpbe=1 + call xcpbe(exc,npts,nspden,optpbe,order,rho_updn,vxcrho,ndvxc,nd2vxc) + exc(:)=exc(:)-exci_rpa(:) +! PMA: second index of vxcrho is nspden while that of rpa is 2 they can mismatch + vxcrho(:,1:min(nspden,2))=vxcrho(:,1:min(nspden,2))-vxci_rpa(:,1:min(nspden,2)) + ABI_FREE(exci_rpa) + ABI_FREE(vxci_rpa) + else if (order /=3) then + ABI_MALLOC(exci_rpa,(npts)) + ABI_MALLOC(vxci_rpa,(npts,2)) + optpbe=3 + call xcpbe(exci_rpa,npts,nspden,optpbe,order,rho_updn,vxci_rpa,ndvxc,nd2vxc,dvxci=dvxc) + optpbe=1 + call xcpbe(exc,npts,nspden,optpbe,order,rho_updn,vxcrho,ndvxc,nd2vxc,dvxci=dvxc) + exc(:)=exc(:)-exci_rpa(:) + vxcrho(:,:)=vxcrho(:,:)-vxci_rpa(:,:) + ABI_FREE(exci_rpa) + ABI_FREE(vxci_rpa) + else if (order ==3) then + ABI_MALLOC(exci_rpa,(npts)) + ABI_MALLOC(vxci_rpa,(npts,2)) + optpbe=3 + call xcpbe(exci_rpa,npts,nspden,optpbe,order,rho_updn,vxci_rpa,ndvxc,nd2vxc,& +& d2vxci=d2vxc,dvxci=dvxc) + optpbe=1 + call xcpbe(exc,npts,nspden,optpbe,order,rho_updn,vxcrho,ndvxc,nd2vxc,& +& d2vxci=d2vxc,dvxci=dvxc) + exc(:)=exc(:)-exci_rpa(:) + vxcrho(:,:)=vxcrho(:,:)-vxci_rpa(:,:) + ABI_FREE(exci_rpa) + ABI_FREE(vxci_rpa) + end if + +!>>>>> LDA xc energy like ixc==7, and Leeuwen-Baerends GGA xc potential + else if(ixc==13) then + if (order**2 <= 1) then + optpbe=1 + call xcpbe(exc,npts,nspden,optpbe,order,rho_updn,vxcrho,ndvxc,nd2vxc) + call xclb(grho2_updn,npts,nspden,rho_updn,vxcrho) + else if (order /=3) then + optpbe=1 + call xcpbe(exc,npts,nspden,optpbe,order,rho_updn,vxcrho,ndvxc,nd2vxc,dvxci=dvxc) + call xclb(grho2_updn,npts,nspden,rho_updn,vxcrho) + else if (order ==3) then + optpbe=1 + call xcpbe(exc,npts,nspden,optpbe,order,rho_updn,vxcrho,ndvxc,nd2vxc,d2vxci=d2vxc,dvxci=dvxc) + call xclb(grho2_updn,npts,nspden,rho_updn,vxcrho) + end if + +!>>>>> HTCH93, HTCH120, HTCH107, HTCH147 + else if(ixc==16 .or. ixc==17 .or. ixc==26 .or. ixc==27) then + call xchcth(vxcgrho,exc,grho2_updn,ixc,npts,nspden,order,rho_updn,vxcrho) + +!>>>>> Only for test purpose (test various part of MGGA implementation) + else if(ixc==31 .or. ixc==32 .or. ixc==33 .or. ixc==34 .or. ixc==35) then + exc(:)=zero ; vxcrho(:,:)=zero + if (present(vxcgrho).and.nvxcgrho>0) vxcgrho(:,:)=zero + if (present(vxclrho).and.nvxclrho>0) vxclrho(:,:)=zero + if (present(vxctau).and.nvxctau>0) vxctau(:,:)=zero + if (present(dvxc).and.ndvxc>0) dvxc(:,:)=zero + if (present(d2vxc).and.nd2vxc>0) d2vxc(:,:)=zero + +!>>>>> Perdew-Wang LSD is coded in Perdew-Burke-Ernzerhof GGA, with optpbe=1 + optpbe=1 + select case(ixc) + case (31) + alpha=1.00d0-(1.00d0/1.01d0) +! Compute first LDA XC (exc,vxc) and then add fake MGGA XC (exc,vxc) + call xcpbe(exc,npts,nspden,optpbe,1,rho_updn,vxcrho,0,0) + if (nspden==1) then + exc(:)=exc(:)+alpha*tau_updn(:,1)/rho_updn(:,1) + else +! It should be : exc_tot= exc_spin up + exc_spin down = 2*exc_spin up +! but this applies to tau and rho (so it cancels) + do ispden=1,nspden + exc(:)=exc(:)+alpha*tau_updn(:,ispden)/(rho_updn(:,1)+rho_updn(:,2)) + end do + end if + vxctau(:,:)=alpha + case (32) + alpha=0.01d0 +! Compute first LDA XC (exc,vxc) and then add fake MGGA XC (exc,vxc) + call xcpbe(exc,npts,nspden,optpbe,1,rho_updn,vxcrho,0,0) + if (nspden==1) then + exc(:)=exc(:)+2.0d0*alpha*lrho_updn(:,1) + vxcrho(:,1) =vxcrho(:,1)+2.0d0*alpha*lrho_updn(:,1) + vxclrho(:,1)=alpha*2.0d0*rho_updn(:,1) + else + do ispden=1,nspden + exc(:)=exc(:)+alpha*lrho_updn(:,ispden) + vxcrho(:,ispden) =vxcrho(:,ispden)+alpha*(lrho_updn(:,1)+lrho_updn(:,2)) + vxclrho(:,ispden)=alpha*(rho_updn(:,1)+rho_updn(:,2)) + end do + end if + case (33) + alpha=-0.010d0 +! Compute first LDA XC (exc,vxc) and then add fake MGGA XC (exc,vxc) + call xcpbe(exc,npts,nspden,optpbe,1,rho_updn,vxcrho,0,0) + if (nspden==1) then +! it should be : exc_tot= exc_spin up + exc_spin down = 2*exc_spin up but this applies to grho2 and rho +! (for grho2 it is a factor 4 to have total energy and for rho it is just a factor 2. So we end with factor 2 only) + exc(:)=exc(:)+alpha*2.0d0*grho2_updn(:,1)/rho_updn(:,1) + if(nvxcgrho==2)vxcgrho(:,1:2)=2.0d0*alpha + if(nvxcgrho==3)vxcgrho(:,3)=2.0d0*alpha + else + exc(:)=exc(:)+alpha*grho2_updn(:,3)/(rho_updn(:,1)+rho_updn(:,2)) + if(nvxcgrho==2)vxcgrho(:,1:2)=2.0d0*alpha + if(nvxcgrho==3)vxcgrho(:,3)=2.0d0*alpha + end if + case (34) + alpha=-0.010d0 +! Compute first LDA XC (exc,vxc) and then add fake MGGA XC (exc,vxc) + call xcpbe(exc,npts,nspden,optpbe,1,rho_updn,vxcrho,0,0) + if (nspden==1) then + exc(:)=exc(:)+16.0d0*alpha*tau_updn(:,1) + vxcrho(:,1)=vxcrho(:,1)+16.0d0*alpha*tau_updn(:,1) + vxctau(:,1)=16.0d0*alpha*rho_updn(:,1) + else + do ispden=1,nspden + exc(:)=exc(:)+8.0d0*alpha*tau_updn(:,ispden) + vxcrho(:,ispden)=vxcrho(:,ispden)+8.0d0*alpha*(tau_updn(:,1)+tau_updn(:,2)) + vxctau(:,ispden)=8.0d0*alpha*(rho_updn(:,1)+rho_updn(:,2)) + end do + end if + case (35) + alpha=0.01d0 ; beta=1.00d0-(1.00d0/1.01d0) +! Compute first LDA XC (exc,vxc) and then add fake MGGA XC (exc,vxc) + call xcpbe(exc,npts,nspden,optpbe,1,rho_updn,vxcrho,0,0) + if (nspden==1) then + exc(:)=exc(:)+2.0d0*alpha*lrho_updn(:,1)+beta*tau_updn(:,1)/rho_updn(:,1) + vxcrho(:,1) =vxcrho(:,1)+2.0d0*alpha*lrho_updn(:,1) + vxclrho(:,1)=alpha*2.0d0*rho_updn(:,1) + else + do ispden=1,nspden + exc(:)=exc(:)+alpha*lrho_updn(:,ispden) & +& +beta*tau_updn(:,ispden)/(rho_updn(:,1)+rho_updn(:,2)) + vxcrho(:,ispden) =vxcrho(:,ispden)+alpha*(lrho_updn(:,1)+lrho_updn(:,2)) + vxclrho(:,ispden)=alpha*(rho_updn(:,1)+rho_updn(:,2)) + end do + end if + vxctau(:,:)=beta + end select + +!>>>>> Hybrid PBE0 (1/4 and 1/3) + else if(ixc>=41.and.ixc<=42) then +! Requires to evaluate exchange-correlation with PBE (optpbe=2) +! minus hyb_mixing*exchange with PBE (optpbe=-2) + ndvxc_x=8 + ABI_MALLOC(exc_x,(npts)) + ABI_MALLOC(vxcrho_x,(npts,nspden)) + ABI_MALLOC(vxcgrho_x,(npts,nvxcgrho)) + exc_x=zero;vxcrho_x=zero;vxcgrho_x=zero + if (order**2 <= 1) then + optpbe=2 !PBE exchange correlation + call xcpbe(exc,npts,nspden,optpbe,order,rho_updn,vxcrho,ndvxc,nd2vxc,& +& dvxcdgr=vxcgrho,exexch=my_exexch,grho2_updn=grho2_updn) + optpbe=-2 !PBE exchange-only + call xcpbe(exc_x,npts,nspden,optpbe,order,rho_updn,vxcrho_x,ndvxc,nd2vxc,& +& dvxcdgr=vxcgrho_x,exexch=my_exexch,grho2_updn=grho2_updn) + exc=exc-exc_x*my_hyb_mixing + vxcrho=vxcrho-vxcrho_x*my_hyb_mixing + vxcgrho=vxcgrho-vxcgrho_x*my_hyb_mixing + else if (order /=3) then + ABI_MALLOC(dvxc_x,(npts,ndvxc_x)) + optpbe=2 !PBE exchange correlation + call xcpbe(exc,npts,nspden,optpbe,order,rho_updn,vxcrho,ndvxc,nd2vxc,& + dvxcdgr=vxcgrho,dvxci=dvxc,grho2_updn=grho2_updn) + optpbe=-2 !PBE exchange-only + call xcpbe(exc_x,npts,nspden,optpbe,order,rho_updn,vxcrho_x,ndvxc_x,nd2vxc,& +& dvxcdgr=vxcgrho_x,dvxci=dvxc_x,grho2_updn=grho2_updn) + exc=exc-exc_x*my_hyb_mixing + vxcrho=vxcrho-vxcrho_x*my_hyb_mixing + vxcgrho=vxcgrho-vxcgrho_x*my_hyb_mixing + dvxc(:,1:ndvxc_x)=dvxc(:,1:ndvxc_x)-dvxc_x(:,1:ndvxc_x)*my_hyb_mixing + ABI_FREE(dvxc_x) + else if (order ==3) then +! The size of exchange-correlation with PBE (optpbe=2) +! is the one which defines the size for ndvxc. + ABI_MALLOC(dvxc_x,(npts,ndvxc_x)) + ABI_MALLOC(d2vxc_x,(npts,nd2vxc)) + optpbe=2 !PBE exchange correlation + call xcpbe(exc,npts,nspden,optpbe,order,rho_updn,vxcrho,ndvxc,nd2vxc,& +& d2vxci=d2vxc,dvxcdgr=vxcgrho,dvxci=dvxc,grho2_updn=grho2_updn) + optpbe=-2 !PBE exchange-only + call xcpbe(exc_x,npts,nspden,optpbe,order,rho_updn,vxcrho_x,ndvxc_x,nd2vxc,& +& d2vxci=d2vxc_x,dvxcdgr=vxcgrho_x,dvxci=dvxc_x,grho2_updn=grho2_updn) + exc=exc-exc_x*my_hyb_mixing + vxcrho=vxcrho-vxcrho_x*my_hyb_mixing + vxcgrho=vxcgrho-vxcgrho_x*my_hyb_mixing + d2vxc=d2vxc-d2vxc_x*my_hyb_mixing + dvxc(:,1:ndvxc_x)=dvxc(:,1:ndvxc_x)-dvxc_x(:,1:ndvxc_x)*my_hyb_mixing + ABI_FREE(dvxc_x) + ABI_FREE(d2vxc_x) + end if + ABI_FREE(exc_x) + ABI_FREE(vxcrho_x) + ABI_FREE(vxcgrho_x) + +!>>>>> Ichimaru,Iyetomi,Tanaka, XC at finite temp (e- gaz) + else if (ixc==50) then + if (order**2 <= 1) then + call xciit(exc,fxcT,npts,order,rspts,el_temp,vxcrho(:,1)) + else + call xciit(exc,fxcT,npts,order,rspts,el_temp,vxcrho(:,1),dvxc) + end if + +!>>>>> GGA counterpart of the B3LYP functional + else if(ixc==1402000) then +! Requires to evaluate exchange-correlation +! with 5/4 B3LYP - 1/4 B3LYPc, where +! B3LYPc = (0.19 Ec VWN3 + 0.81 Ec LYP) + +! First evaluate B3LYP. + if(present(xc_funcs))then + if (abs(order)==1) then + call libxc_functionals_getvxc(ndvxc,nd2vxc,npts,nspden,order,rho_updn,exc,& +& vxcrho,grho2=grho2_updn,vxcgr=vxcgrho,xc_functionals=xc_funcs) + else if (abs(order)==2) then + call libxc_functionals_getvxc(ndvxc,nd2vxc,npts,nspden,order,rho_updn,exc,& +& vxcrho,grho2=grho2_updn,vxcgr=vxcgrho,dvxc=dvxc,xc_functionals=xc_funcs) + else + call libxc_functionals_getvxc(ndvxc,nd2vxc,npts,nspden,order,rho_updn,exc,& +& vxcrho,grho2=grho2_updn,vxcgr=vxcgrho,dvxc=dvxc,d2vxc=d2vxc,xc_functionals=xc_funcs) + end if + else + if (abs(order)==1) then + call libxc_functionals_getvxc(ndvxc,nd2vxc,npts,nspden,order,rho_updn,exc,& +& vxcrho,grho2=grho2_updn,vxcgr=vxcgrho) + else if (abs(order)==2) then + call libxc_functionals_getvxc(ndvxc,nd2vxc,npts,nspden,order,rho_updn,exc,& +& vxcrho,grho2=grho2_updn,vxcgr=vxcgrho,dvxc=dvxc) + else + call libxc_functionals_getvxc(ndvxc,nd2vxc,npts,nspden,order,rho_updn,exc,& +& vxcrho,grho2=grho2_updn,vxcgr=vxcgrho,dvxc=dvxc,d2vxc=d2vxc) + end if + end if + +! Then renormalize B3LYP and subtract VWN3 contribution + ABI_MALLOC(exc_c,(npts)) + ABI_MALLOC(vxcrho_c,(npts,nspden)) + if(order**2>1)then + ABI_MALLOC(dvxc_c,(npts,ndvxc)) + end if + if(order**2>4)then + ABI_MALLOC(d2vxc_c,(npts,nd2vxc)) + end if + exc_c=zero;vxcrho_c=zero + call libxc_functionals_init(-30,nspden,xc_functionals=xc_funcs_vwn3) + if (order**2 <= 1) then + call libxc_functionals_getvxc(ndvxc,nd2vxc,npts,nspden,order,rho_updn,exc_c,& +& vxcrho_c,xc_functionals=xc_funcs_vwn3) + elseif (order**2 <= 4) then + dvxc_c=zero + call libxc_functionals_getvxc(ndvxc,nd2vxc,npts,nspden,order,rho_updn,exc_c,& +& vxcrho_c,dvxc=dvxc_c,xc_functionals=xc_funcs_vwn3) + else + dvxc_c=zero + d2vxc_c=zero + call libxc_functionals_getvxc(ndvxc,nd2vxc,npts,nspden,order,rho_updn,exc_c,& +& vxcrho_c,dvxc=dvxc_c,d2vxc=d2vxc,xc_functionals=xc_funcs_vwn3) + end if + exc=1.25d0*exc-quarter*0.19d0*exc_c + vxcrho=1.25d0*vxcrho-quarter*0.19d0*vxcrho_c + if(order**2>1)dvxc=1.25d0*dvxc-quarter*0.19d0*dvxc_c + if(order**2>4)d2vxc=1.25d0*d2vxc-quarter*0.19d0*d2vxc_c + call libxc_functionals_end(xc_functionals=xc_funcs_vwn3) + +! Then subtract LYP contribution + call libxc_functionals_init(-131,nspden,xc_functionals=xc_funcs_lyp) + if (order**2 <= 1) then + call libxc_functionals_getvxc(ndvxc,nd2vxc,npts,nspden,order,rho_updn,exc_c,& +& vxcrho_c,grho2=grho2_updn,vxcgr=vxcgrho,xc_functionals=xc_funcs_lyp) + elseif (order**2 <= 4) then + dvxc_c=zero + call libxc_functionals_getvxc(ndvxc,nd2vxc,npts,nspden,order,rho_updn,exc_c,& +& vxcrho_c,grho2=grho2_updn,vxcgr=vxcgrho,dvxc=dvxc_c,xc_functionals=xc_funcs_lyp) + else + dvxc_c=zero + d2vxc_c=zero + call libxc_functionals_getvxc(ndvxc,nd2vxc,npts,nspden,order,rho_updn,exc_c,& +& vxcrho_c,grho2=grho2_updn,vxcgr=vxcgrho,dvxc=dvxc_c,d2vxc=d2vxc,xc_functionals=xc_funcs_lyp) + end if + exc=exc-quarter*0.81d0*exc_c + vxcrho=vxcrho-quarter*0.81d0*vxcrho_c + if(order**2>1)dvxc=dvxc-quarter*0.81d0*dvxc_c + if(order**2>4)d2vxc=d2vxc-quarter*0.81d0*d2vxc_c + call libxc_functionals_end(xc_functionals=xc_funcs_lyp) + + ABI_FREE(exc_c) + ABI_FREE(vxcrho_c) + if(allocated(dvxc_c))then + ABI_FREE(dvxc_c) + end if + if(allocated(d2vxc_c))then + ABI_FREE(d2vxc_c) + end if + +!>>>>> All libXC functionals + else if( ixc<0 ) then + +! ===== meta-GGA ===== + if (need_laplacian==1.or.need_kden==1) then + if (need_laplacian==1.and.need_kden==1) then + if (abs(order)<=1) then + if (present(xc_funcs)) then + call libxc_functionals_getvxc(ndvxc,nd2vxc,npts,nspden,order,rho_updn,exc,vxcrho,& +& grho2=grho2_updn,vxcgr=vxcgrho,& +& lrho=lrho_updn,vxclrho=vxclrho,& +& tau=tau_updn,vxctau=vxctau,& +& xc_functionals=xc_funcs) + else + call libxc_functionals_getvxc(ndvxc,nd2vxc,npts,nspden,order,rho_updn,exc,vxcrho,& +& grho2=grho2_updn,vxcgr=vxcgrho,& +& lrho=lrho_updn,vxclrho=vxclrho,& +& tau=tau_updn,vxctau=vxctau) + end if + else + if (present(xc_funcs)) then + call libxc_functionals_getvxc(ndvxc,nd2vxc,npts,nspden,order,rho_updn,exc,vxcrho,& +& grho2=grho2_updn,vxcgr=vxcgrho,dvxc=dvxc,& +& lrho=lrho_updn,vxclrho=vxclrho,& +& tau=tau_updn,vxctau=vxctau,& +& xc_functionals=xc_funcs) + else + call libxc_functionals_getvxc(ndvxc,nd2vxc,npts,nspden,order,rho_updn,exc,vxcrho,& +& grho2=grho2_updn,vxcgr=vxcgrho,dvxc=dvxc,& +& lrho=lrho_updn,vxclrho=vxclrho,& +& tau=tau_updn,vxctau=vxctau) + end if + end if + else if (need_laplacian==1) then + if (abs(order)<=1) then + if (present(xc_funcs)) then + call libxc_functionals_getvxc(ndvxc,nd2vxc,npts,nspden,order,rho_updn,exc,vxcrho,& +& grho2=grho2_updn,vxcgr=vxcgrho,& +& lrho=lrho_updn,vxclrho=vxclrho,& +& xc_functionals=xc_funcs) + else + call libxc_functionals_getvxc(ndvxc,nd2vxc,npts,nspden,order,rho_updn,exc,vxcrho,& +& grho2=grho2_updn,vxcgr=vxcgrho,& +& lrho=lrho_updn,vxclrho=vxclrho) + end if + else + if (present(xc_funcs)) then + call libxc_functionals_getvxc(ndvxc,nd2vxc,npts,nspden,order,rho_updn,exc,vxcrho,& +& grho2=grho2_updn,vxcgr=vxcgrho,dvxc=dvxc,& +& lrho=lrho_updn,vxclrho=vxclrho,& +& xc_functionals=xc_funcs) + else + call libxc_functionals_getvxc(ndvxc,nd2vxc,npts,nspden,order,rho_updn,exc,vxcrho,& +& grho2=grho2_updn,vxcgr=vxcgrho,dvxc=dvxc,& +& lrho=lrho_updn,vxclrho=vxclrho) + end if + end if + else if (need_kden==1) then + if (abs(order)<=1) then + if (present(xc_funcs)) then + call libxc_functionals_getvxc(ndvxc,nd2vxc,npts,nspden,order,rho_updn,exc,vxcrho,& +& grho2=grho2_updn,vxcgr=vxcgrho,& +& tau=tau_updn,vxctau=vxctau,& +& xc_functionals=xc_funcs) + else + call libxc_functionals_getvxc(ndvxc,nd2vxc,npts,nspden,order,rho_updn,exc,vxcrho,& +& grho2=grho2_updn,vxcgr=vxcgrho,& +& tau=tau_updn,vxctau=vxctau) + end if + else + if (present(xc_funcs)) then + call libxc_functionals_getvxc(ndvxc,nd2vxc,npts,nspden,order,rho_updn,exc,vxcrho,& +& grho2=grho2_updn,vxcgr=vxcgrho,dvxc=dvxc,& +& tau=tau_updn,vxctau=vxctau,& +& xc_functionals=xc_funcs) + else + call libxc_functionals_getvxc(ndvxc,nd2vxc,npts,nspden,order,rho_updn,exc,vxcrho,& +& grho2=grho2_updn,vxcgr=vxcgrho,dvxc=dvxc,& +& tau=tau_updn,vxctau=vxctau) + end if + end if + end if + !Some meta-GGAs can only be used with a LDA correlation (see doc) + ixc1=(-ixc)/1000;ixc2=(-ixc)-ixc1*1000 + if (ixc1==206 .or. ixc1==207 .or. ixc1==208 .or. ixc1==209 .or. & +& ixc2==206 .or. ixc2==207 .or. ixc2==208 .or. ixc2==209 )then + if (present(vxcgrho)) vxcgrho(:,:)=zero + if (present(vxclrho)) vxclrho(:,:)=zero + if (present(vxctau)) vxctau(:,:)=zero + if (present(dvxc)) dvxc(:,:)=zero + end if + +! ===== GGA ===== + else if (need_gradient==1) then + if (abs(order)<=1) then + if (present(xc_funcs)) then + call libxc_functionals_getvxc(ndvxc,nd2vxc,npts,nspden,order,rho_updn,exc,vxcrho,& +& grho2=grho2_updn,vxcgr=vxcgrho,& +& xc_functionals=xc_funcs) + else + call libxc_functionals_getvxc(ndvxc,nd2vxc,npts,nspden,order,rho_updn,exc,vxcrho,& +& grho2=grho2_updn,vxcgr=vxcgrho) + end if + else + if (present(xc_funcs)) then + call libxc_functionals_getvxc(ndvxc,nd2vxc,npts,nspden,order,rho_updn,exc,vxcrho,& +& grho2=grho2_updn,vxcgr=vxcgrho,dvxc=dvxc,& +& xc_functionals=xc_funcs) + else + call libxc_functionals_getvxc(ndvxc,nd2vxc,npts,nspden,order,rho_updn,exc,vxcrho,& +& grho2=grho2_updn,vxcgr=vxcgrho,dvxc=dvxc) + end if + end if + +! ===== LDA ===== + else + if (abs(order)<=1) then + if (present(xc_funcs)) then + call libxc_functionals_getvxc(ndvxc,nd2vxc,npts,nspden,order,rho_updn,exc,vxcrho,& +& xc_functionals=xc_funcs) + else + call libxc_functionals_getvxc(ndvxc,nd2vxc,npts,nspden,order,rho_updn,exc,vxcrho) + end if + else if (abs(order)<=2) then + if (present(xc_funcs)) then + call libxc_functionals_getvxc(ndvxc,nd2vxc,npts,nspden,order,rho_updn,exc,vxcrho,& +& dvxc=dvxc,xc_functionals=xc_funcs) + else + call libxc_functionals_getvxc(ndvxc,nd2vxc,npts,nspden,order,rho_updn,exc,vxcrho,& +& dvxc=dvxc) + end if + else if (abs(order)<=3) then + if (present(xc_funcs)) then + call libxc_functionals_getvxc(ndvxc,nd2vxc,npts,nspden,order,rho_updn,exc,vxcrho,& +& dvxc=dvxc,d2vxc=d2vxc,xc_functionals=xc_funcs) + else + call libxc_functionals_getvxc(ndvxc,nd2vxc,npts,nspden,order,rho_updn,exc,vxcrho,& +& dvxc=dvxc,d2vxc=d2vxc) + end if + end if + + end if ! mGGA, GGA, LDA + end if ! libXC + +! ================================================= +! == Finalization == +! ================================================= +!Deallocate arrays + if(allocated(rhotot)) then + ABI_FREE(rhotot) + end if + if(allocated(rspts)) then + ABI_FREE(rspts) + end if + if(allocated(zeta)) then + ABI_FREE(zeta) + end if + +end subroutine drivexc +!!*** + +end module m_drivexc +!!*** diff --git a/GX-PAW/common/src/33_xc_lowlevel/m_drivexc.o b/GX-PAW/common/src/33_xc_lowlevel/m_drivexc.o new file mode 100644 index 00000000..0ca1d8a4 Binary files /dev/null and b/GX-PAW/common/src/33_xc_lowlevel/m_drivexc.o differ diff --git a/GX-PAW/common/src/33_xc_lowlevel/m_libxc_functionals.F90 b/GX-PAW/common/src/33_xc_lowlevel/m_libxc_functionals.F90 new file mode 100644 index 00000000..4d76e80b --- /dev/null +++ b/GX-PAW/common/src/33_xc_lowlevel/m_libxc_functionals.F90 @@ -0,0 +1,2516 @@ +!!****m* ABINIT/libxc_functionals +!! NAME +!! libxc_functionals +!! +!! FUNCTION +!! Module containing interfaces to the LibXC library, for exchange +!! correlation potentials and energies. The interfacing between +!! the ABINIT and LibXC formats and datastructures happens here. +!! Also contains basic container datatype for LibXC interfacing. +!! +!! COPYRIGHT +!! Copyright (C) 2008-2024 ABINIT group (MOliveira,LHH,FL,GMR,MT) +!! This file is distributed under the terms of the +!! GNU Gener_al Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! NOTES +!! libxc_functionals.F90 defines a structured datatype (libxc_functional_type) +!! and associated methods to initialize/finalize it and get properties from it. +!! Abinit used a global variable (xc_global, libxc_functional_type) which is +!! initialized in the driving routine (driver) with the value of ixc specified +!! by the user in the input file. +!! * It is possible to change the value of ixc at run-time; for that we have +!! to reinitialize the global structure with the new value of ixc before +!! computing XC quantities. Moreover one has to reinstate the old functional +!! before returning so that the other routines will continue to used the +!! previous ixc. This task can be accomplished with the following pseudocode: +!! !!!!! if (old_ixc<0) call libxc_functionals_end() +!! !!!!! if (new_ixc<0) call libxc_functionals_init(new_ixc,nspden) +!! !!!!! >>>> Compute XC stuff here. +!! !!!!! if (new_ixc<0) call libxc_functionals_end() +!! !!!!! if (old_ixc<0) call libxc_functionals_init(old_ixc,nspden) +!! * It is also possible to define a local (private) variable of type libxc_functional_type. +!! For that, the different methods have to be called with an extra optional +!! argument (called xc_funcs in this example): +!! !!!!! call libxc_functionals_init(ixc,nspden,xc_funcs) +!! !!!!! call libxc_functionals_end(xc_funcs) +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" + +module libxc_functionals + + use defs_basis + use m_abicore + use m_errors + +!ISO C bindings are mandatory +#ifdef HAVE_FC_ISO_C_BINDING + use, intrinsic :: iso_c_binding +#endif + + implicit none + private + +!Public functions + public :: libxc_functionals_check ! Check if the code has been compiled with libXC + public :: libxc_functionals_init ! Initialize a set of XC functional(s), from libXC + public :: libxc_functionals_end ! End usage of a set of libXC functional(s) + public :: libxc_functionals_fullname ! Return full name of a set of XC functional(s) + public :: libxc_functionals_getid ! Return identifer of a XC functional, from its name + public :: libxc_functionals_family_from_id ! Retrieve family of a XC functional, from its id + public :: libxc_functionals_ixc ! The value of ixc used to initialize the XC functional(s) + public :: libxc_functionals_islda ! Return TRUE if the set of XC functional(s) is LDA + public :: libxc_functionals_isgga ! Return TRUE if the set of XC functional(s) is GGA or meta-GGA + public :: libxc_functionals_ismgga ! Return TRUE if the set of XC functional(s) set is meta-GGA + public :: libxc_functionals_is_tb09 ! Return TRUE if the XC functional is Tran-Blaha 2009. + public :: libxc_functionals_set_c_tb09 ! Set c parameter for Tran-Blaha 2009 functional + public :: libxc_functionals_needs_laplacian ! Return TRUE if the set of XC functional(s) uses LAPLACIAN + public :: libxc_functionals_needs_temperature ! Return TRUE if the set of XC functional(s) uses the elec. temperature + public :: libxc_functionals_set_temperature ! Set electronic temperature in a set of XC functional(s) + public :: libxc_functionals_has_kxc ! Return TRUE if Kxc (3rd der) is available for a set of XC functional(s) set + public :: libxc_functionals_has_k3xc ! Return TRUE if K3xc (4th der) is available for a set of XC functional(s) set + public :: libxc_functionals_nspin ! The number of spin components for the set of XC functional(s) + public :: libxc_functionals_is_hybrid ! Return TRUE if a set of XC functional(s) is hybrid + public :: libxc_functionals_is_hybrid_from_id ! Return TRUE if a XC functional is hybrid, from its id + public :: libxc_functionals_get_hybridparams ! Retrieve parameter(s) of hybrid functional(s) + public :: libxc_functionals_set_hybridparams ! Change parameter(s) of hybrid functional(s) + public :: libxc_functionals_gga_from_hybrid ! Return the id of the XC-GGA used for the hybrid + public :: libxc_functionals_getvxc ! Return XC potential and energy, from input density + +!Private functions + private :: libxc_functionals_compute_tb09 ! Compute c parameter for Tran-Blaha 2009 functional + private :: libxc_functionals_getrefs ! Get references of a single XC functional + private :: libxc_functionals_depends_on_temp ! TRUE if a single functional depends on elec. temperature + private :: libxc_functionals_set_temp ! Set electronic temperature in a single XC functional + private :: libxc_functionals_constants_load ! Load libXC constants from C headers +#ifdef HAVE_FC_ISO_C_BINDING + private :: xc_char_to_c ! Convert a string from Fortran to C + private :: xc_char_to_f ! Convert a string from C to Fortran +#endif + +!Public constants (use libxc_functionals_constants_load to init them) + integer,public,save :: XC_FAMILY_UNKNOWN = -1 + integer,public,save :: XC_FAMILY_LDA = 1 + integer,public,save :: XC_FAMILY_GGA = 2 + integer,public,save :: XC_FAMILY_MGGA = 4 + integer,public,save :: XC_FAMILY_LCA = 8 + integer,public,save :: XC_FAMILY_OEP = 16 + integer,public,save :: XC_FAMILY_HYB_GGA = 32 + integer,public,save :: XC_FAMILY_HYB_MGGA = 64 + integer,public,save :: XC_FAMILY_HYB_LDA =128 + integer,public,save :: XC_FLAGS_HAVE_EXC = 1 + integer,public,save :: XC_FLAGS_HAVE_VXC = 2 + integer,public,save :: XC_FLAGS_HAVE_FXC = 4 + integer,public,save :: XC_FLAGS_HAVE_KXC = 8 + integer,public,save :: XC_FLAGS_HAVE_LXC = 16 + integer,public,save :: XC_FLAGS_NEEDS_LAPLACIAN= 32768 + integer,public,save :: XC_EXCHANGE = 0 + integer,public,save :: XC_CORRELATION = 1 + integer,public,save :: XC_EXCHANGE_CORRELATION = 2 + integer,public,save :: XC_KINETIC = 3 + integer,public,save :: XC_SINGLE_PRECISION = 0 + logical,private,save :: libxc_constants_initialized=.false. + +!XC functional public type + type,public :: libxc_functional_type + integer :: id ! identifier + integer :: family ! LDA, GGA, etc. + integer :: kind ! EXCHANGE, CORRELATION, etc. + integer :: nspin ! # of spin components + integer :: abi_ixc ! Abinit IXC id for this functional + logical :: has_exc ! TRUE is exc is available for the functional + logical :: has_vxc ! TRUE is vxc is available for the functional + logical :: has_fxc ! TRUE is fxc is available for the functional + logical :: has_kxc ! TRUE is kxc is available for the functional + logical :: needs_laplacian ! TRUE is functional needs laplacian of density + logical :: is_hybrid ! TRUE is functional is a hybrid functional + real(dp) :: hyb_mixing ! Hybrid functional: mixing factor of Fock contribution (default=0) + real(dp) :: hyb_mixing_sr ! Hybrid functional: mixing factor of SR Fock contribution (default=0) + real(dp) :: hyb_range ! Range (for separation) for a hybrid functional (default=0) + real(dp) :: temperature ! Electronic temperature; if <=0, the functional doesnt depend on it + real(dp) :: xc_tb09_c ! Special TB09 functional parameter + real(dp) :: sigma_threshold ! Value of a threshold to be applied on density gradient (sigma) + ! (temporary dur to a libxc bug) - If <0, apply no filter +#ifdef HAVE_FC_ISO_C_BINDING + type(C_PTR),pointer :: conf => null() ! C pointer to the functional itself +#endif + end type libxc_functional_type + +!List of functionals on which a filter has to be applied on sigma (density gradient) +! This should be done by libXC via _set_sigma_threshold but this is not (libXC 6) +! This threshold has been evaluated from pbeh functional... + real(dp),parameter :: sigma_threshold_def = 1.0e-25_dp + integer,parameter :: n_sigma_filtered = 17 + character(len=28) :: sigma_filtered(n_sigma_filtered) = & +& ['XC_HYB_GGA_XC_HSE03 ','XC_HYB_GGA_XC_HSE06 ','XC_HYB_GGA_XC_HJS_PBE ',& +& 'XC_HYB_GGA_XC_HJS_PBE_SOL ','XC_HYB_GGA_XC_HJS_B88 ','XC_HYB_GGA_XC_HJS_B97X ',& +& 'XC_HYB_GGA_XC_LRC_WPBEH ','XC_HYB_GGA_XC_LRC_WPBE ','XC_HYB_GGA_XC_LC_WPBE ',& +& 'XC_HYB_GGA_XC_HSE12 ','XC_HYB_GGA_XC_HSE12S ','XC_HYB_GGA_XC_HSE_SOL ',& +& 'XC_HYB_GGA_XC_LC_WPBE_WHS ','XC_HYB_GGA_XC_LC_WPBEH_WHS ','XC_HYB_GGA_XC_LC_WPBE08_WHS ',& +& 'XC_HYB_GGA_XC_LC_WPBESOL_WHS','XC_HYB_GGA_XC_WHPBE0 '] + +!---------------------------------------------------------------------- + +!Private global XC functional + type(libxc_functional_type),target,save :: xc_global(2) + +!---------------------------------------------------------------------- + +!Interfaces for C bindings +#ifdef HAVE_FC_ISO_C_BINDING + interface + integer(C_INT) function xc_func_init(xc_func,functional,nspin) bind(C) + use, intrinsic :: iso_c_binding, only : C_INT,C_PTR + integer(C_INT),value :: functional,nspin + type(C_PTR) :: xc_func + end function xc_func_init + end interface +! + interface + subroutine xc_func_end(xc_func) bind(C) + use, intrinsic :: iso_c_binding, only : C_PTR + type(C_PTR) :: xc_func + end subroutine xc_func_end + end interface +! + interface + integer(C_INT) function xc_functional_get_number(name) bind(C) + use, intrinsic :: iso_c_binding, only : C_INT,C_PTR + type(C_PTR),value :: name + end function xc_functional_get_number + end interface +! + interface + type(C_PTR) function xc_functional_get_name(number) bind(C) + use, intrinsic :: iso_c_binding, only : C_INT,C_PTR + integer(C_INT),value :: number + end function xc_functional_get_name + end interface +! + interface + integer(C_INT) function xc_family_from_id(id,family,number) bind(C) + use, intrinsic :: iso_c_binding, only : C_INT,C_PTR + integer(C_INT),value :: id + type(C_PTR),value :: family,number + end function xc_family_from_id + end interface +! + interface + subroutine xc_hyb_cam_coef(xc_func,omega,alpha,beta) bind(C) + use, intrinsic :: iso_c_binding, only : C_DOUBLE,C_PTR + real(C_DOUBLE) :: omega,alpha,beta + type(C_PTR) :: xc_func + end subroutine xc_hyb_cam_coef + end interface +! + interface + subroutine xc_get_lda(xc_func,np,rho,zk,vrho,v2rho2,v3rho3) bind(C) + use, intrinsic :: iso_c_binding, only : C_INT,C_PTR + integer(C_INT),value :: np + type(C_PTR),value :: rho,zk,vrho,v2rho2,v3rho3 + type(C_PTR) :: xc_func + end subroutine xc_get_lda + end interface +! + interface + subroutine xc_get_gga(xc_func,np,rho,sigma,zk,vrho,vsigma,v2rho2,v2rhosigma,v2sigma2, & +& v3rho3,v3rho2sigma,v3rhosigma2,v3sigma3) bind(C) + use, intrinsic :: iso_c_binding, only : C_INT,C_PTR + integer(C_INT),value :: np + type(C_PTR),value :: rho,sigma,zk,vrho,vsigma,v2rho2,v2rhosigma,v2sigma2, & +& v3rho3,v3rho2sigma,v3rhosigma2,v3sigma3 + type(C_PTR) :: xc_func + end subroutine xc_get_gga + end interface +! + interface + subroutine xc_get_mgga(xc_func,np,rho,sigma,lapl,tau,zk,vrho,vsigma,vlapl,vtau, & +& v2rho2,v2rhosigma,v2rholapl,v2rhotau,v2sigma2,v2sigmalapl, & +& v2sigmatau,v2lapl2,v2lapltau,v2tau2) bind(C) + use, intrinsic :: iso_c_binding, only : C_INT,C_PTR + integer(C_INT),value :: np + type(C_PTR),value :: rho,sigma,lapl,tau,zk,vrho,vsigma,vlapl,vtau, & +& v2rho2,v2sigma2,v2lapl2,v2tau2,v2rhosigma,v2rholapl,v2rhotau, & +& v2sigmalapl,v2sigmatau,v2lapltau + type(C_PTR) :: xc_func + end subroutine xc_get_mgga + end interface +! + interface + subroutine xc_func_set_params(xc_func,params,n_params) bind(C) + use, intrinsic :: iso_c_binding, only : C_INT,C_DOUBLE,C_PTR + integer(C_INT),value :: n_params + real(C_DOUBLE) :: params(*) + type(C_PTR) :: xc_func + end subroutine xc_func_set_params + end interface +! + interface + integer(C_INT) function xc_func_set_params_name(xc_func,name,param) bind(C) + use, intrinsic :: iso_c_binding, only : C_INT,C_DOUBLE,C_PTR + real(C_DOUBLE) :: param + type(C_PTR) :: xc_func + type(C_PTR),value :: name + end function xc_func_set_params_name + end interface +! + interface + type(C_PTR) function xc_func_get_params_name(xc_func,ipar) bind(C) + use, intrinsic :: iso_c_binding, only : C_INT,C_PTR + type(C_PTR) :: xc_func + integer(C_INT) :: ipar + end function xc_func_get_params_name + end interface +! + interface + type(C_PTR) function xc_func_get_params_description(xc_func,ipar) bind(C) + use, intrinsic :: iso_c_binding, only : C_INT,C_PTR + type(C_PTR) :: xc_func + integer(C_INT) :: ipar + end function xc_func_get_params_description + end interface +! + interface + subroutine xc_func_set_density_threshold(xc_func,dens_threshold) bind(C) + use, intrinsic :: iso_c_binding, only : C_DOUBLE,C_PTR + real(C_DOUBLE) :: dens_threshold + type(C_PTR) :: xc_func + end subroutine xc_func_set_density_threshold + end interface +! + interface + subroutine xc_func_set_sig_threshold(xc_func,sigma_threshold) bind(C) + use, intrinsic :: iso_c_binding, only : C_DOUBLE,C_PTR + real(C_DOUBLE) :: sigma_threshold + type(C_PTR) :: xc_func + end subroutine xc_func_set_sig_threshold + end interface +! + interface + integer(C_INT) function xc_func_is_hybrid_from_id(func_id) bind(C) + use, intrinsic :: iso_c_binding, only : C_INT + integer(C_INT),value :: func_id + end function xc_func_is_hybrid_from_id + end interface +! + interface + subroutine xc_get_singleprecision_constant(xc_cst_singleprecision) bind(C) + use, intrinsic :: iso_c_binding, only : C_INT + integer(C_INT) :: xc_cst_singleprecision + end subroutine xc_get_singleprecision_constant + end interface +! + interface + subroutine xc_get_family_constants(xc_cst_unknown,xc_cst_lda,xc_cst_gga,xc_cst_mgga, & +& xc_cst_lca,xc_cst_oep,xc_cst_hyb_gga, & +& xc_cst_hyb_mgga,xc_cst_hyb_lda) bind(C) + use, intrinsic :: iso_c_binding, only : C_INT + integer(C_INT) :: xc_cst_unknown,xc_cst_lda,xc_cst_gga,xc_cst_mgga, & +& xc_cst_lca,xc_cst_oep,xc_cst_hyb_gga,xc_cst_hyb_mgga, & +& xc_cst_hyb_lda + end subroutine xc_get_family_constants + end interface +! + interface + subroutine xc_get_flags_constants(xc_cst_flags_have_exc,xc_cst_flags_have_vxc, & + xc_cst_flags_have_fxc,xc_cst_flags_have_kxc,xc_cst_flags_have_lxc,& +& xc_cxt_flags_needs_lapl) bind(C) + use, intrinsic :: iso_c_binding, only : C_INT + integer(C_INT) :: xc_cst_flags_have_exc,xc_cst_flags_have_vxc,xc_cst_flags_have_fxc, & +& xc_cst_flags_have_kxc,xc_cst_flags_have_lxc,xc_cxt_flags_needs_lapl + end subroutine xc_get_flags_constants + end interface +! + interface + subroutine xc_get_kind_constants(xc_cst_exchange,xc_cst_correlation, & +& xc_cst_exchange_correlation,xc_cst_kinetic) bind(C) + use, intrinsic :: iso_c_binding, only : C_INT + integer(C_INT) :: xc_cst_exchange,xc_cst_correlation, & +& xc_cst_exchange_correlation,xc_cst_kinetic + end subroutine xc_get_kind_constants + end interface +! + interface + type(C_PTR) function xc_func_type_malloc() bind(C) + use, intrinsic :: iso_c_binding, only : C_PTR + end function xc_func_type_malloc + end interface +! + interface + subroutine xc_func_type_free(xc_func) bind(C) + use, intrinsic :: iso_c_binding, only : C_PTR + type(C_PTR) :: xc_func + end subroutine xc_func_type_free + end interface +! + interface + type(C_PTR) function xc_get_info_name(xc_func) bind(C) + use, intrinsic :: iso_c_binding, only : C_PTR + type(C_PTR) :: xc_func + end function xc_get_info_name + end interface +! + interface + type(C_PTR) function xc_get_info_refs(xc_func,iref) bind(C) + use, intrinsic :: iso_c_binding, only : C_INT,C_PTR + type(C_PTR) :: xc_func + integer(C_INT) :: iref + end function xc_get_info_refs + end interface +! + interface + integer(C_INT) function xc_get_info_flags(xc_func) bind(C) + use, intrinsic :: iso_c_binding, only : C_INT,C_PTR + type(C_PTR) :: xc_func + end function xc_get_info_flags + end interface +! + interface + integer(C_INT) function xc_get_info_kind(xc_func) bind(C) + use, intrinsic :: iso_c_binding, only : C_INT,C_PTR + type(C_PTR) :: xc_func + end function xc_get_info_kind + end interface +#endif + +contains +!!*** + +!---------------------------------------------------------------------- + +!!****f* libxc_functionals/libxc_functionals_check +!! NAME +!! libxc_functionals_check +!! +!! FUNCTION +!! Check if the code has been compiled with libXC +!! +!! INPUTS +!! [stop_if_error]=optional flag; if TRUE the code stops if libXC is not correctly used +!! +!! SOURCE + + function libxc_functionals_check(stop_if_error) + +!Arguments ------------------------------------ + logical :: libxc_functionals_check + logical,intent(in),optional :: stop_if_error +!Local variables------------------------------- + character(len=100) :: msg + +! ************************************************************************* + + libxc_functionals_check=.true. ; msg="" + +#if defined HAVE_LIBXC +#if defined HAVE_FC_ISO_C_BINDING + if (.not.libxc_constants_initialized) call libxc_functionals_constants_load() + if (XC_SINGLE_PRECISION==1) then + libxc_functionals_check=.false. + msg='LibXC should be compiled with double precision!' + end if +#else + libxc_functionals_check=.false. + msg='LibXC cannot be used without ISO_C_BINDING support by the Fortran compiler!' +#endif +#else + libxc_functionals_check=.false. + msg='ABINIT was not compiled with LibXC support.' +#endif + + if (present(stop_if_error)) then + if (stop_if_error.and.trim(msg)/="") then + ABI_ERROR(msg) + end if + end if + + end function libxc_functionals_check +!!*** + +!---------------------------------------------------------------------- + +!!****f* libxc_functionals/libxc_functionals_init +!! NAME +!! libxc_functionals_init +!! +!! FUNCTION +!! Initialize the desired (set of) XC functional(s), from LibXC. +!! * Call the LibXC initializer +!! * Fill preliminary fields in module structures. +!! +!! INPUTS +!! ixc=XC code for Abinit +!! nspden=number of spin-density components +!! [el_temp]=electronic temperature (optional, only for specific functionals) +!! [xc_tb09_c]=special argument for the Tran-Blaha 2009 functional +!! +!! OUTPUT +!! +!! SIDE EFFECTS +!! [xc_functionals(2)]=, optional argument +!! Handle for XC functionals +!! +!! SOURCE + + subroutine libxc_functionals_init(ixc,nspden,xc_functionals,& +& el_temp,xc_tb09_c) ! optional arguments + +!Arguments ------------------------------------ + integer, intent(in) :: nspden + integer, intent(in) :: ixc + real(dp),intent(in),optional :: el_temp,xc_tb09_c + type(libxc_functional_type),intent(inout),optional,target :: xc_functionals(2) +!Local variables------------------------------- + integer :: ii,jj,nspden_eff + character(len=500) :: msg + type(libxc_functional_type),pointer :: xc_func +#if defined HAVE_LIBXC && defined HAVE_FC_ISO_C_BINDING + integer :: flags + integer(C_INT) :: func_id_c,iref_c,npar_c,nspin_c,success_c + real(C_DOUBLE) :: alpha_c,beta_c,omega_c,param_c(1) + character(kind=C_CHAR,len=1),pointer :: strg_c + type(C_PTR) :: func_ptr_c +#endif + +! ************************************************************************* + +!Check libXC + if (.not.libxc_functionals_check(stop_if_error=.true.)) return + if (.not.libxc_constants_initialized)then + call libxc_functionals_constants_load() + endif + + nspden_eff=min(nspden,2) + +!Select XC functional(s) identifiers + if (present(xc_functionals)) then + xc_functionals(1)%id = -ixc/1000 + xc_functionals(2)%id = -ixc + (ixc/1000)*1000 + else + xc_global(1)%id = -ixc/1000 + xc_global(2)%id = -ixc + (ixc/1000)*1000 + end if + + do ii = 1,2 + +! Select XC functional + if (present(xc_functionals)) then + xc_func => xc_functionals(ii) + else + xc_func => xc_global(ii) + end if + + xc_func%abi_ixc=ixc !Save abinit value for reference + + xc_func%family=XC_FAMILY_UNKNOWN + xc_func%kind=-1 + xc_func%nspin=nspden_eff + xc_func%has_exc=.false. + xc_func%has_vxc=.false. + xc_func%has_fxc=.false. + xc_func%has_kxc=.false. + xc_func%needs_laplacian=.false. + xc_func%is_hybrid=.false. + xc_func%hyb_mixing=zero + xc_func%hyb_mixing_sr=zero + xc_func%hyb_range=zero + xc_func%temperature=-one + xc_func%xc_tb09_c=99.99_dp + xc_func%sigma_threshold=-one + + if (xc_func%id<=0) cycle + +! Get XC functional family + xc_func%family=libxc_functionals_family_from_id(xc_func%id) + if (xc_func%family/=XC_FAMILY_LDA .and. & +& xc_func%family/=XC_FAMILY_GGA .and. & +& xc_func%family/=XC_FAMILY_MGGA.and. & +& xc_func%family/=XC_FAMILY_HYB_GGA) then + write(msg, '(a,i8,2a,i8,a,i8,3a,i8,6a)' )& +& 'Invalid IXC = ',ixc,ch10,& +& 'Current xc_func%id=',xc_func%id,', (ii=',ii,')',ch10,& +& 'The associated LibXC functional family ',xc_func%family,& +& ' is currently unsupported by ABINIT',ch10,& +& '(-1 means the family is unknown to the LibXC itself)',ch10,& +& 'Please consult the LibXC documentation',ch10 + ABI_ERROR(msg) + end if + +#if defined HAVE_LIBXC && defined HAVE_FC_ISO_C_BINDING + +! Allocate functional + func_ptr_c=xc_func_type_malloc() + call c_f_pointer(func_ptr_c,xc_func%conf) + +! Initialize functional + func_id_c=int(xc_func%id,kind=C_INT) + nspin_c=int(nspden_eff,kind=C_INT) + success_c=xc_func_init(xc_func%conf,func_id_c,nspin_c) + if (success_c/=0) then + msg='Error in libXC functional initialization!' + ABI_ERROR(msg) + end if + +! Special treatment for LDA_C_XALPHA functional + if (xc_func%id==libxc_functionals_getid('XC_LDA_C_XALPHA')) then + param_c(1)=real(zero,kind=C_DOUBLE);npar_c=int(1,kind=C_INT) + call xc_func_set_params(xc_func%conf,param_c,npar_c) + end if + +! Special treatment for XC_MGGA_X_TB09 functional + if (xc_func%id==libxc_functionals_getid('XC_MGGA_X_TB09')) then + if (.not.present(xc_tb09_c)) then + msg='xc_tb09_c argument is mandatory for TB09 functional!' + ABI_BUG(msg) + end if + xc_func%xc_tb09_c=xc_tb09_c + end if + +! Get functional kind + xc_func%kind=int(xc_get_info_kind(xc_func%conf)) + +! Get functional flags + flags=int(xc_get_info_flags(xc_func%conf)) + xc_func%has_exc=(iand(flags,XC_FLAGS_HAVE_EXC)>0) + xc_func%has_vxc=(iand(flags,XC_FLAGS_HAVE_VXC)>0) + xc_func%has_fxc=(iand(flags,XC_FLAGS_HAVE_FXC)>0) + xc_func%has_kxc=(iand(flags,XC_FLAGS_HAVE_KXC)>0) + +! Retrieve parameters for metaGGA functionals + if (xc_func%family==XC_FAMILY_MGGA.or. & +& xc_func%family==XC_FAMILY_HYB_MGGA) then + xc_func%needs_laplacian=(iand(flags,XC_FLAGS_NEEDS_LAPLACIAN)>0) + end if + +! Retrieve parameters for hybrid functionals + xc_func%is_hybrid=(xc_func_is_hybrid_from_id(xc_func%id)==1) + if (xc_func%is_hybrid) then + call xc_hyb_cam_coef(xc_func%conf,omega_c,alpha_c,beta_c) + xc_func%hyb_mixing=real(alpha_c,kind=dp) + xc_func%hyb_mixing_sr=real(beta_c,kind=dp) + xc_func%hyb_range=real(omega_c,kind=dp) + end if + +! Possible temperature dependence + if (present(el_temp)) then + if (el_temp>tol10) then + if (libxc_functionals_depends_on_temp(xc_func)) then + xc_func%temperature=el_temp + call libxc_functionals_set_temp(xc_func,el_temp) + end if + end if + end if + +! Some functionals need a filter to be applied on sigma (density gradient) +! because libXC v6 doesn't implement sigma_threshold + if (xc_func%is_hybrid) then + do jj=1,n_sigma_filtered + if (xc_func%id==libxc_functionals_getid(trim(sigma_filtered(jj)))) then + xc_func%sigma_threshold=sigma_threshold_def + end if + end do + end if + +! Dump functional information + call c_f_pointer(xc_get_info_name(xc_func%conf),strg_c) + call xc_char_to_f(strg_c,msg);msg=' '//trim(msg) + call wrtout(std_out,msg,'COLL') + iref_c=0 + do while (iref_c>=0) + call c_f_pointer(xc_get_info_refs(xc_func%conf,iref_c),strg_c) + if (associated(strg_c)) then + call xc_char_to_f(strg_c,msg);msg=' '//trim(msg) + call wrtout(std_out,msg,'COLL') + iref_c=iref_c+1 + else + iref_c=-1 + end if + end do + +#else + ABI_UNUSED(xc_tb09_c) +#endif + + end do + + msg='';call wrtout(std_out,msg,'COLL') + +end subroutine libxc_functionals_init +!!*** + +!---------------------------------------------------------------------- + +!!****f* libxc_functionals/libxc_functionals_end +!! NAME +!! libxc_functionals_end +!! +!! FUNCTION +!! End usage of a (set of) XC functional(s). +!! Call LibXC end function and deallocate module contents. +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SIDE EFFECTS +!! [xc_functionals(2)]=, optional argument +!! Handle for XC functionals +!! +!! SOURCE + + subroutine libxc_functionals_end(xc_functionals) + +!Arguments ------------------------------------ + type(libxc_functional_type),intent(inout),optional,target :: xc_functionals(2) +!Local variables------------------------------- + integer :: ii + type(libxc_functional_type),pointer :: xc_func + +! ************************************************************************* + + do ii = 1,2 + +! Select XC functional + if (present(xc_functionals)) then + xc_func => xc_functionals(ii) + else + xc_func => xc_global(ii) + end if + + if (xc_func%id <= 0) cycle + xc_func%id=-1 + xc_func%family=-1 + xc_func%kind=-1 + xc_func%nspin=1 + xc_func%abi_ixc=huge(0) + xc_func%has_exc=.false. + xc_func%has_vxc=.false. + xc_func%has_fxc=.false. + xc_func%has_kxc=.false. + xc_func%needs_laplacian=.false. + xc_func%is_hybrid=.false. + xc_func%hyb_mixing=zero + xc_func%hyb_mixing_sr=zero + xc_func%hyb_range=zero + xc_func%temperature=-one + xc_func%xc_tb09_c=99.99_dp + xc_func%sigma_threshold=-one +#if defined HAVE_LIBXC && defined HAVE_FC_ISO_C_BINDING + if (associated(xc_func%conf)) then + call xc_func_end(xc_func%conf) + call xc_func_type_free(c_loc(xc_func%conf)) + end if +#endif + + end do + + end subroutine libxc_functionals_end +!!*** + +!---------------------------------------------------------------------- + +!!****f* libxc_functionals/libxc_functionals_fullname +!! NAME +!! libxc_functionals_fullname +!! +!! FUNCTION +!! Return full name of a (set of) XC functional(s) +!! +!! INPUTS +!! [xc_functionals(2)]=, optional argument +!! Handle for XC functionals +!! +!! OUTPUT +!! +!! SOURCE + + function libxc_functionals_fullname(xc_functionals) + +!Arguments ------------------------------------ + character(len=100) :: libxc_functionals_fullname + type(libxc_functional_type),intent(in),optional,target :: xc_functionals(2) +!Local variables------------------------------- + integer :: nxc + type(libxc_functional_type),pointer :: xc_funcs(:) +#if defined HAVE_LIBXC && defined HAVE_FC_ISO_C_BINDING + character(len=100) :: xcname + character(kind=C_CHAR,len=1),pointer :: strg_c +#endif + +! ************************************************************************* + + libxc_functionals_fullname='No XC functional' + + if (present(xc_functionals)) then + xc_funcs => xc_functionals + else + xc_funcs => xc_global + end if + + nxc=size(xc_funcs) + if (nxc<1) return + +#if defined HAVE_LIBXC && defined HAVE_FC_ISO_C_BINDING + if (nxc<2) then + if (xc_funcs(1)%id /= 0) then + call c_f_pointer(xc_functional_get_name(xc_funcs(1)%id),strg_c) + call xc_char_to_f(strg_c,libxc_functionals_fullname) + end if + else if (xc_funcs(1)%id <= 0) then + if (xc_funcs(2)%id /= 0) then + call c_f_pointer(xc_functional_get_name(xc_funcs(2)%id),strg_c) + call xc_char_to_f(strg_c,libxc_functionals_fullname) + end if + else if (xc_funcs(2)%id <= 0) then + if (xc_funcs(1)%id /= 0) then + call c_f_pointer(xc_functional_get_name(xc_funcs(1)%id),strg_c) + call xc_char_to_f(strg_c,libxc_functionals_fullname) + end if + else + call c_f_pointer(xc_functional_get_name(xc_funcs(1)%id),strg_c) + call xc_char_to_f(strg_c,libxc_functionals_fullname) + call c_f_pointer(xc_functional_get_name(xc_funcs(2)%id),strg_c) + call xc_char_to_f(strg_c,xcname) + libxc_functionals_fullname=trim(libxc_functionals_fullname)//'+'//trim(xcname) + end if + libxc_functionals_fullname=trim(libxc_functionals_fullname) +#endif + + end function libxc_functionals_fullname +!!*** + +!---------------------------------------------------------------------- + +!!****f* libxc_functionals/libxc_functionals_getid +!! NAME +!! libxc_functionals_getid +!! +!! FUNCTION +!! Return identifer of a XC functional from its name +!! Return -1 if undefined +!! +!! INPUTS +!! xcname= string containing the name of a XC functional +!! +!! SOURCE + + function libxc_functionals_getid(xcname) + +!Arguments ------------------------------------ + integer :: libxc_functionals_getid + character(len=*),intent(in) :: xcname +!Local variables------------------------------- +#if defined HAVE_LIBXC && defined HAVE_FC_ISO_C_BINDING + character(len=256) :: str + character(kind=C_CHAR,len=1),target :: name_c(len_trim(xcname)+1) + character(kind=C_CHAR,len=1),target :: name_c_xc(len_trim(xcname)-2) + type(C_PTR) :: name_c_ptr +#endif + +! ************************************************************************* + +#if defined HAVE_LIBXC && defined HAVE_FC_ISO_C_BINDING + str=trim(xcname) + if (xcname(1:3)=="XC_".or.xcname(1:3)=="xc_") then + str=xcname(4:);name_c_xc=xc_char_to_c(str) + name_c_ptr=c_loc(name_c_xc) + else + name_c=xc_char_to_c(str) + name_c_ptr=c_loc(name_c) + end if + libxc_functionals_getid=int(xc_functional_get_number(name_c_ptr)) +#else + libxc_functionals_getid=-1 + if (.false.) write(std_out,*) xcname +#endif + +end function libxc_functionals_getid +!!*** + +!---------------------------------------------------------------------- + +!!****f* libxc_functionals/libxc_functionals_family_from_id +!! NAME +!! libxc_functionals_family_from_id +!! +!! FUNCTION +!! Return family of a XC functional from its id +!! +!! INPUTS +!! xcid= id of a LibXC functional +!! +!! SOURCE + + function libxc_functionals_family_from_id(xcid) + +!Arguments ------------------------------------ + integer :: libxc_functionals_family_from_id + integer,intent(in) :: xcid +!Local variables------------------------------- +#if defined HAVE_LIBXC && defined HAVE_FC_ISO_C_BINDING + integer(C_INT) :: xcid_c +#endif + +! ************************************************************************* + +#if defined HAVE_LIBXC && defined HAVE_FC_ISO_C_BINDING + xcid_c=int(xcid,kind=C_INT) + libxc_functionals_family_from_id=int(xc_family_from_id(xcid_c,C_NULL_PTR,C_NULL_PTR)) +#else + libxc_functionals_family_from_id=-1 + if (.false.) write(std_out,*) xcid +#endif + +end function libxc_functionals_family_from_id +!!*** + +!---------------------------------------------------------------------- + +!!****f* libxc_functionals/libxc_functionals_ixc +!! NAME +!! libxc_functionals_ixc +!! +!! FUNCTION +!! Return the value of ixc used to initialize the XC structure +!! +!! INPUTS +!! [xc_functionals(2)]=, optional argument +!! Handle for XC functionals +!! +!! SOURCE + + function libxc_functionals_ixc(xc_functionals) + +!Arguments ------------------------------------ + integer :: libxc_functionals_ixc + type(libxc_functional_type),intent(in),optional :: xc_functionals(2) + +! ************************************************************************* + + if (present(xc_functionals)) then + libxc_functionals_ixc=xc_functionals(1)%abi_ixc + else + libxc_functionals_ixc=xc_global(1)%abi_ixc + end if + +end function libxc_functionals_ixc +!!*** + +!---------------------------------------------------------------------- + +!!****f* libxc_functionals/libxc_functionals_islda +!! NAME +!! libxc_functionals_islda +!! +!! FUNCTION +!! Test function to identify whether the presently used (set of) functional(s) +!! is a LDA or not +!! +!! INPUTS +!! [xc_functionals(2)]=, optional argument +!! Handle for XC functionals +!! +!! SOURCE + + function libxc_functionals_islda(xc_functionals) + +!Arguments ------------------------------------ + logical :: libxc_functionals_islda + type(libxc_functional_type),intent(in),optional :: xc_functionals(2) + +! ************************************************************************* + + libxc_functionals_islda = .false. + if (.not.libxc_constants_initialized) call libxc_functionals_constants_load() + + if (present(xc_functionals)) then + libxc_functionals_islda=(any(xc_functionals%family==XC_FAMILY_LDA) .or. & +& any(xc_functionals%family==XC_FAMILY_HYB_LDA)) + else + libxc_functionals_islda=(any(xc_global%family==XC_FAMILY_LDA) .or. & +& any(xc_global%family==XC_FAMILY_HYB_LDA)) + end if + +end function libxc_functionals_islda +!!*** + +!---------------------------------------------------------------------- + +!!****f* libxc_functionals/libxc_functionals_isgga +!! NAME +!! libxc_functionals_isgga +!! +!! FUNCTION +!! Test function to identify whether the presently used (set of) functional(s) +!! is a GGA or not +!! +!! INPUTS +!! [xc_functionals(2)]=, optional argument +!! Handle for XC functionals +!! +!! SOURCE + + function libxc_functionals_isgga(xc_functionals) + +!Arguments ------------------------------------ + logical :: libxc_functionals_isgga + type(libxc_functional_type),intent(in),optional :: xc_functionals(2) + +! ************************************************************************* + + libxc_functionals_isgga = .false. + if (.not.libxc_constants_initialized) call libxc_functionals_constants_load() + + if (present(xc_functionals)) then + libxc_functionals_isgga=(any(xc_functionals%family==XC_FAMILY_GGA) .or. & +& any(xc_functionals%family==XC_FAMILY_HYB_GGA)) + else + libxc_functionals_isgga=(any(xc_global%family==XC_FAMILY_GGA) .or. & +& any(xc_global%family==XC_FAMILY_HYB_GGA)) + end if + +end function libxc_functionals_isgga +!!*** + +!---------------------------------------------------------------------- + +!!****f* libxc_functionals/libxc_functionals_ismgga +!! NAME +!! libxc_functionals_ismgga +!! +!! FUNCTION +!! Test function to identify whether the presently used (set of) functional(s) +!! is a Meta-GGA or not +!! +!! INPUTS +!! [xc_functionals(2)]=, optional argument +!! Handle for XC functionals +!! +!! SOURCE + +function libxc_functionals_ismgga(xc_functionals) + +!Arguments ------------------------------------ + logical :: libxc_functionals_ismgga + type(libxc_functional_type),intent(in),optional :: xc_functionals(2) + +! ************************************************************************* + + libxc_functionals_ismgga = .false. + if (.not.libxc_constants_initialized) call libxc_functionals_constants_load() + + if (present(xc_functionals)) then + libxc_functionals_ismgga=(any(xc_functionals%family==XC_FAMILY_MGGA) .or. & +& any(xc_functionals%family==XC_FAMILY_HYB_MGGA)) + else + libxc_functionals_ismgga=(any(xc_global%family==XC_FAMILY_MGGA) .or. & +& any(xc_global%family==XC_FAMILY_HYB_MGGA)) + end if + +end function libxc_functionals_ismgga +!!*** + +!---------------------------------------------------------------------- + +!!****f* libxc_functionals/libxc_functionals_is_tb09 +!! NAME +!! libxc_functionals_is_tb09 +!! +!! FUNCTION +!! Test function to identify whether the presently used functional +!! is Tran-Blaha 2009 or not +!! +!! INPUTS +!! [xc_functionals(2)]=, optional argument +!! Handle for XC functionals +!! +!! SOURCE + +logical function libxc_functionals_is_tb09(xc_functionals) result(ans) + +!Arguments ------------------------------------ + type(libxc_functional_type),intent(in),optional :: xc_functionals(2) + +! ************************************************************************* + + ans = .false. + + if (present(xc_functionals)) then + ans = any(xc_functionals%id == libxc_functionals_getid('XC_MGGA_X_TB09')) + else + ans = any(xc_global%id == libxc_functionals_getid('XC_MGGA_X_TB09')) + end if + +end function libxc_functionals_is_tb09 +!!*** + +!---------------------------------------------------------------------- + +!!****f* libxc_functionals/libxc_functionals_set_c_tb09 +!! NAME +!! libxc_functionals_set_c_tb09 +!! +!! FUNCTION +!! Set c parameter for the Tran-Blaha 2009 functional +!! +!! INPUTS +!! xc_c_tb09= value of the c parameter to set for the TB09 functional +!! [xc_functionals(2)]=, optional argument +!! Handle for XC functionals +!! +!! SOURCE + +subroutine libxc_functionals_set_c_tb09(xc_tb09_c,xc_functionals) + +!Arguments ------------------------------------ + real(dp),intent(in) :: xc_tb09_c + type(libxc_functional_type),intent(inout),optional :: xc_functionals(2) +!Local variables ------------------------------- + integer :: ii + +! ************************************************************************* + + if (present(xc_functionals)) then + do ii=1,2 + if (xc_functionals(ii)%id == libxc_functionals_getid('XC_MGGA_X_TB09')) then + xc_functionals(ii)%xc_tb09_c = xc_tb09_c + end if + end do + else + do ii=1,2 + if (xc_global(ii)%id == libxc_functionals_getid('XC_MGGA_X_TB09')) then + xc_global(ii)%xc_tb09_c = xc_tb09_c + end if + end do + end if + +end subroutine libxc_functionals_set_c_tb09 +!!*** + +!---------------------------------------------------------------------- + +!!****f* libxc_functionals/libxc_functionals_needs_laplacian +!! NAME +!! libxc_functionals_needs_laplacian +!! +!! FUNCTION +!! Test function to identify whether the presently used (set of) functional(s) +!! needs the laplacian of the density or not +!! +!! INPUTS +!! [xc_functionals(2)]=, optional argument +!! Handle for XC functionals +!! +!! SOURCE + + function libxc_functionals_needs_laplacian(xc_functionals) + +!Arguments ------------------------------------ + implicit none + logical :: libxc_functionals_needs_laplacian + type(libxc_functional_type),intent(in),optional :: xc_functionals(2) + +! ************************************************************************* + + libxc_functionals_needs_laplacian = .false. + + if (present(xc_functionals)) then + libxc_functionals_needs_laplacian=(any(xc_functionals%needs_laplacian)) + else + libxc_functionals_needs_laplacian=(any(xc_global%needs_laplacian)) + end if + + end function libxc_functionals_needs_laplacian +!!*** + +!---------------------------------------------------------------------- + +!!****f* libxc_functionals/libxc_functionals_needs_temperature +!! NAME +!! libxc_functionals_needs_temperature +!! +!! FUNCTION +!! Test function to identify whether the presently used (set of) functional(s) +!! needs the electronic temperature or not +!! +!! INPUTS +!! [xc_functionals(2)]=, optional argument +!! Handle for XC functionals +!! +!! SOURCE + + function libxc_functionals_needs_temperature(xc_functionals) + +!Arguments ------------------------------------ + implicit none + logical :: libxc_functionals_needs_temperature + type(libxc_functional_type),intent(in),optional :: xc_functionals(2) + +! ************************************************************************* + + libxc_functionals_needs_temperature = .false. + + if (present(xc_functionals)) then + libxc_functionals_needs_temperature=(any(xc_functionals%temperature>tol8)) + else + libxc_functionals_needs_temperature=(any(xc_global%temperature>tol8)) + end if + + end function libxc_functionals_needs_temperature +!!*** + +!---------------------------------------------------------------------- + +!!****f* libxc_functionals/libxc_functionals_set_temperature +!! NAME +!! libxc_functionals_set_temperature +!! +!! FUNCTION +!! Set the electronic temperature in a (set of) of XC functional(s) +!! No action when no temperature dependence +!! +!! INPUTS +!! temperature=electronic temperature (in Kelvin units) +!! [xc_functionals(2)]=, optional argument +!! Handle for XC functionals +!! +!! OUTPUT +!! +!! SOURCE + +subroutine libxc_functionals_set_temperature(temperature,xc_functionals) + +!Arguments ------------------------------------ + real(dp),intent(in) :: temperature + type(libxc_functional_type),intent(in),optional,target :: xc_functionals(2) +!Local variables ------------------------------- + integer :: ii + type(libxc_functional_type),pointer :: xc_func + +! ************************************************************************* + + do ii = 1, 2 + +! Select XC functional + if (present(xc_functionals)) then + xc_func => xc_functionals(ii) + else + xc_func => xc_global(ii) + end if + + if (xc_func%id>0) then + call libxc_functionals_set_temp(xc_func,temperature) + end if + + end do + +end subroutine libxc_functionals_set_temperature +!!*** + +!---------------------------------------------------------------------- + +!!****f* libxc_functionals/libxc_functionals_has_kxc +!! NAME +!! libxc_functionals_has_kxc +!! +!! FUNCTION +!! Test function to identify whether the presently used (set of) functional(s) +!! provides Kxc or not (fxc in the libXC convention) +!! +!! INPUTS +!! [xc_functionals(2)]=, optional argument +!! Handle for XC functionals +!! +!! SOURCE + +function libxc_functionals_has_kxc(xc_functionals) + +!Arguments ------------------------------------ + logical :: libxc_functionals_has_kxc + type(libxc_functional_type),intent(in),optional,target :: xc_functionals(2) +!Local variables------------------------------- + integer :: ii + +! ************************************************************************* + + libxc_functionals_has_kxc=.true. + + do ii=1,2 + if (present(xc_functionals)) then + if (.not.xc_functionals(ii)%has_fxc) libxc_functionals_has_kxc=.false. + else + if (.not.xc_global(ii)%has_fxc) libxc_functionals_has_kxc=.false. + end if + end do + +end function libxc_functionals_has_kxc +!!*** + +!---------------------------------------------------------------------- + +!!****f* libxc_functionals/libxc_functionals_has_k3xc +!! NAME +!! libxc_functionals_has_k3xc +!! +!! FUNCTION +!! Test function to identify whether the presently used (set of) functional(s) +!! provides K3xc or not (kxc in the libXC convention) +!! +!! INPUTS +!! [xc_functionals(2)]=, optional argument +!! Handle for XC functionals +!! +!! SOURCE + +function libxc_functionals_has_k3xc(xc_functionals) + +!Arguments ------------------------------------ + logical :: libxc_functionals_has_k3xc + type(libxc_functional_type),intent(in),optional,target :: xc_functionals(2) +!Local variables------------------------------- + integer :: ii + +! ************************************************************************* + + libxc_functionals_has_k3xc=.true. + + do ii=1,2 + if (present(xc_functionals)) then + if (.not.xc_functionals(ii)%has_kxc) libxc_functionals_has_k3xc=.false. + else + if (.not.xc_global(ii)%has_kxc) libxc_functionals_has_k3xc=.false. + end if + end do + +end function libxc_functionals_has_k3xc +!!*** + +!---------------------------------------------------------------------- + +!!****f* libxc_functionals/libxc_functionals_nspin +!! NAME +!! libxc_functionals_nspin +!! +!! FUNCTION +!! Returns the number of spin components for the (set of) XC functional(s) +!! +!! INPUTS +!! [xc_functionals(2)]=, optional argument +!! Handle for XC functionals +!! +!! SOURCE + +function libxc_functionals_nspin(xc_functionals) + +!Arguments ------------------------------------ + integer :: libxc_functionals_nspin + type(libxc_functional_type),intent(in),optional :: xc_functionals(2) + +! ************************************************************************* + + libxc_functionals_nspin = 1 + + if (present(xc_functionals)) then + if (any(xc_functionals%nspin==2)) libxc_functionals_nspin=2 + else + if (any(xc_global%nspin==2)) libxc_functionals_nspin=2 + end if + +end function libxc_functionals_nspin +!!*** + +!---------------------------------------------------------------------- + +!!****f* libxc_functionals/libxc_functionals_is_hybrid +!! NAME +!! libxc_functionals_is_hybrid +!! +!! FUNCTION +!! Test function to identify whether the presently used (set of) functional(s) +!! is hybrid or not +!! +!! INPUTS +!! [xc_functionals(2)]=, optional argument +!! Handle for XC functionals +!! +!! SOURCE + + function libxc_functionals_is_hybrid(xc_functionals) + +!Arguments ------------------------------------ + logical :: libxc_functionals_is_hybrid + type(libxc_functional_type),intent(in),optional :: xc_functionals(2) + +! ************************************************************************* + + libxc_functionals_is_hybrid = .false. + + if (present(xc_functionals)) then + libxc_functionals_is_hybrid=(any(xc_functionals%is_hybrid)) + else + libxc_functionals_is_hybrid=(any(xc_global%is_hybrid)) + end if + +end function libxc_functionals_is_hybrid +!!*** + +!---------------------------------------------------------------------- + +!!****f* libxc_functionals/libxc_functionals_is_hybrid_from_id +!! NAME +!! libxc_functionals_is_hybrid_from_id +!! +!! FUNCTION +!! Test function to identify whether a functional is hybrid or not, from its id +!! +!! INPUTS +!! xcid= id of a LibXC functional +!! +!! SOURCE + + function libxc_functionals_is_hybrid_from_id(xcid) + +!Arguments ------------------------------------ + logical :: libxc_functionals_is_hybrid_from_id + integer,intent(in) :: xcid +!Local variables------------------------------- +#if defined HAVE_LIBXC && defined HAVE_FC_ISO_C_BINDING + integer(C_INT) :: xcid_c +#endif + +! ************************************************************************* + +#if defined HAVE_LIBXC && defined HAVE_FC_ISO_C_BINDING + xcid_c=int(xcid,kind=C_INT) + libxc_functionals_is_hybrid_from_id =(xc_func_is_hybrid_from_id(xcid_c)==1) +#else + libxc_functionals_is_hybrid_from_id = .false. + if (.false.) write(std_out,*) xcid +#endif + +end function libxc_functionals_is_hybrid_from_id +!!*** + +!---------------------------------------------------------------------- + +!!****f* libxc_functionals/libxc_functionals_get_hybridparams +!! NAME +!! libxc_functionals_get_hybridparams +!! +!! FUNCTION +!! Returns the parameters of an hybrid functional (mixing coefficient(s) and range separation) +!! Applies on a (set of) functional(s) +!! +!! INPUTS +!! [xc_functionals(2)]=, optional argument +!! Handle for XC functionals +!! +!! OUTPUT +!! [hyb_mixing] = mixing factor of Fock contribution +!! [hyb_mixing_sr]= mixing factor of short-range Fock contribution +!! [hyb_range] = Range (for separation) +!! +!! SOURCE + +subroutine libxc_functionals_get_hybridparams(hyb_mixing,hyb_mixing_sr,hyb_range,xc_functionals) + +!Arguments ------------------------------------ + real(dp),intent(out),optional :: hyb_mixing,hyb_mixing_sr,hyb_range + type(libxc_functional_type),intent(in),optional,target :: xc_functionals(2) +!Local variables ------------------------------- + integer :: ii + character(len=500) :: msg + type(libxc_functional_type),pointer :: xc_func + +! ************************************************************************* + + if (present(hyb_mixing )) hyb_mixing =zero + if (present(hyb_mixing_sr)) hyb_mixing_sr=zero + if (present(hyb_range )) hyb_range =zero + + do ii = 1, 2 + +! Select XC functional + if (present(xc_functionals)) then + xc_func => xc_functionals(ii) + else + xc_func => xc_global(ii) + end if + +! Mixing coefficient for the Fock contribution + if (present(hyb_mixing)) then + if (abs(xc_func%hyb_mixing) > tol8) then + if (abs(hyb_mixing) <= tol8) then + hyb_mixing=xc_func%hyb_mixing + else + msg='Invalid XC functional: contains 2 hybrid exchange functionals!' + ABI_ERROR(msg) + end if + end if + end if + +! Mixing coefficient for the short-range Fock contribution + if (present(hyb_mixing_sr)) then + if (abs(xc_func%hyb_mixing_sr) > tol8) then + if (abs(hyb_mixing_sr) <= tol8) then + hyb_mixing_sr=xc_func%hyb_mixing_sr + else + msg='Invalid XC functional: contains 2 hybrid exchange functionals!' + ABI_ERROR(msg) + end if + end if + end if + +! Range separation + if (present(hyb_range)) then + if (abs(xc_func%hyb_range) > tol8) then + if (abs(hyb_range) <= tol8) then + hyb_range=xc_func%hyb_range + else + msg='Invalid XC functional: contains 2 hybrid exchange functionals!' + ABI_ERROR(msg) + end if + end if + end if + + end do + +end subroutine libxc_functionals_get_hybridparams +!!*** + +!---------------------------------------------------------------------- + +!!****f* libxc_functionals/libxc_functionals_set_hybridparams +!! NAME +!! libxc_functionals_set_hybridparams +!! +!! FUNCTION +!! Set the parameters of an hybrid functional (mixing coefficient(s) and range separation) +!! Applies on a (set of) functional(s) +!! +!! INPUTS +!! [hyb_mixing] = mixing factor of Fock contribution +!! [hyb_mixing_sr] = mixing factor of short-range Fock contribution +!! [hyb_range] = Range (for separation) +!! [xc_functionals(2)]=, optional argument +!! Handle for XC functionals +!! +!! OUTPUT +!! +!! SOURCE + +subroutine libxc_functionals_set_hybridparams(hyb_mixing,hyb_mixing_sr,hyb_range,xc_functionals) + +!Arguments ------------------------------------ + real(dp),intent(in),optional :: hyb_mixing,hyb_mixing_sr,hyb_range + type(libxc_functional_type),intent(in),optional,target :: xc_functionals(2) +!Local variables ------------------------------- + integer :: ii,id_pbe0,id_hse03,id_hse06 + logical :: is_pbe0,is_hse + integer :: func_id(2) + character(len=500) :: msg + type(libxc_functional_type),pointer :: xc_func +#if defined HAVE_LIBXC && defined HAVE_FC_ISO_C_BINDING + integer(C_INT) :: npar_c + real(C_DOUBLE) :: alpha_c,beta_c,omega_c,param_c(3) +#endif + +! ************************************************************************* + + is_pbe0=.false. + is_hse =.false. + id_pbe0=libxc_functionals_getid('HYB_GGA_XC_PBEH') + id_hse03=libxc_functionals_getid('HYB_GGA_XC_HSE03') + id_hse06=libxc_functionals_getid('HYB_GGA_XC_HSE06') + + do ii = 1, 2 + +! Select XC functional + if (present(xc_functionals)) then + xc_func => xc_functionals(ii) + else + xc_func => xc_global(ii) + end if + func_id(ii)=xc_func%id + +! Doesnt work with all hybrid functionals + if (is_pbe0.or.is_hse) then + msg='Invalid XC functional: contains 2 hybrid exchange functionals!' + ABI_ERROR(msg) + end if + is_pbe0=(xc_func%id==id_pbe0) + is_hse=((xc_func%id==id_hse03).or.(xc_func%id==id_hse06)) + if ((.not.is_pbe0).and.(.not.is_hse)) cycle + +#if defined HAVE_LIBXC && defined HAVE_FC_ISO_C_BINDING +! New values for parameters + +! PBE0 type functionals + if (present(hyb_mixing))then + xc_func%hyb_mixing=hyb_mixing + alpha_c=real(xc_func%hyb_mixing,kind=C_DOUBLE) + if (is_pbe0) then + npar_c=int(1,kind=C_INT) ; param_c(1)=alpha_c + call xc_func_set_params(xc_func%conf,param_c,npar_c) + endif + endif + +! HSE type functionals + if(present(hyb_mixing_sr).or.present(hyb_range)) then + if (present(hyb_mixing_sr)) xc_func%hyb_mixing_sr=hyb_mixing_sr + if (present(hyb_range)) xc_func%hyb_range=hyb_range + beta_c =real(xc_func%hyb_mixing_sr,kind=C_DOUBLE) + omega_c=real(xc_func%hyb_range,kind=C_DOUBLE) + if (is_hse) then + npar_c=int(3,kind=C_INT) + param_c(1)=beta_c;param_c(2:3)=omega_c + call xc_func_set_params(xc_func%conf,param_c,npar_c) + endif + end if + +#else + ABI_UNUSED(hyb_mixing) + ABI_UNUSED(hyb_mixing_sr) + ABI_UNUSED(hyb_range) +#endif + + end do + + if ((.not.is_pbe0).and.(.not.is_hse)) then + write(msg,'(3a,2i6,a,a,i6,a,i6,a,i6,a)')'Invalid XC functional: not able to change parameters for this functional !',ch10,& +& 'The IDs are ',func_id(:),ch10,& +& 'Allowed HYB_GGA_XC_PBEH, HYB_GGA_XC_HSE03, and HYB_GGA_XC_HSE06 with IDs =',id_pbe0,',',id_hse03,',',id_hse06,'.' + ABI_ERROR(msg) + end if + +end subroutine libxc_functionals_set_hybridparams +!!*** + +!---------------------------------------------------------------------- + +!!****f* libxc_functionals/libxc_functionals_gga_from_hybrid +!! NAME +!! libxc_functionals_gga_from_hybrid +!! +!! FUNCTION +!! Returns a logical flag: TRUE if one can deduce, from the id of a hybrid functional set, +!! the id(s) of the GGA functional on which it is based. +!! Optionally returns the id of the GGA functional on which the hybrid functional is based +!! (2 integers defining the GGA X and C functionals). +!! - If an id is provided as input argument, it is used as input id; +!! - If not, the input id is taken from the optional xc_functionals datastructure; +!! - If no input argument is given, the input id is taken from the global xc_global datastructure. +!! +!! INPUTS +!! [hybrid_id]=, optional : id of an input hybrid functional +!! [xc_functionals(2)]=, optional : XC functionals from which +!! the id(s) can be used +!! +!! OUTPUT +!! [gga_id(2)]=array that contains the GGA libXC id(s) +!! libxc_functionals_gga_from_hybrid=.true. if the GGA has been found from the input id +!! +!! SOURCE + +function libxc_functionals_gga_from_hybrid(gga_id,hybrid_id,xc_functionals) + +!Arguments ------------------------------------ +!scalars + integer,intent(in),optional :: hybrid_id + logical :: libxc_functionals_gga_from_hybrid +!arrays + integer,intent(out),optional :: gga_id(2) + type(libxc_functional_type),intent(inout),optional,target :: xc_functionals(2) +!Local variables ------------------------------- +!scalars + integer :: ii + logical :: is_hybrid + character(len=100) :: c_name,x_name,msg +#if defined HAVE_LIBXC && defined HAVE_FC_ISO_C_BINDING + character(len=100) :: xc_name + character(kind=C_CHAR,len=1),pointer :: strg_c +#endif +!arrays + integer :: trial_id(2) + +! ************************************************************************* + + libxc_functionals_gga_from_hybrid=.false. + + is_hybrid=.false. + if (present(hybrid_id)) then + trial_id(1)=hybrid_id + trial_id(2)=0 + is_hybrid=libxc_functionals_is_hybrid_from_id(trial_id(1)) + else if (present(xc_functionals)) then + trial_id(1)=xc_functionals(1)%id + trial_id(2)=xc_functionals(2)%id + is_hybrid=libxc_functionals_is_hybrid(xc_functionals) + else + trial_id(1)=xc_global(1)%id + trial_id(2)=xc_global(2)%id + is_hybrid=libxc_functionals_is_hybrid(xc_global) + end if + + c_name="unknown" ; x_name="unknown" + +!Specific treatment of the B3LYP functional, whose GGA counterpart does not exist in LibXC + if (trial_id(1)==402 .or. trial_id(2)==402) then + libxc_functionals_gga_from_hybrid=.true. + if (present(gga_id)) then + gga_id(1)=0 + gga_id(2)=-1402 ! This corresponds to a native ABINIT functional, + ! actually a composite from different LibXC functionals! + write(std_out,*)' libxc_functionals_gga_from_hybrid, return with gga_id=',gga_id + endif + return + endif + + do ii = 1, 2 + + if ((trial_id(ii)<=0).or.(.not.is_hybrid)) cycle + + if (libxc_functionals_gga_from_hybrid) then + msg='Invalid XC functional setup: contains 2 hybrid functionals!' + ABI_ERROR(msg) + end if + +#if defined HAVE_LIBXC && defined HAVE_FC_ISO_C_BINDING + + call c_f_pointer(xc_functional_get_name(trial_id(ii)),strg_c) + call xc_char_to_f(strg_c,xc_name) + +! AVAILABLE FUNCTIONALS + +! ===== PBE0 ===== + if (xc_name=="hyb_gga_xc_pbeh" .or. & +& xc_name=="hyb_gga_xc_pbe0_13") then + c_name="GGA_C_PBE" + x_name="GGA_X_PBE" + libxc_functionals_gga_from_hybrid=.true. + +! ===== HSE ===== + else if (xc_name=="hyb_gga_xc_hse03" .or. & +& xc_name=="hyb_gga_xc_hse06" ) then + c_name="GGA_C_PBE" + x_name="GGA_X_PBE" + libxc_functionals_gga_from_hybrid=.true. + end if + + +#endif + + enddo ! ii + + if (present(gga_id)) then + if (libxc_functionals_gga_from_hybrid) then + gga_id(1)=libxc_functionals_getid(c_name) + gga_id(2)=libxc_functionals_getid(x_name) + else + gga_id(:)=-1 + end if + end if + +!Note that in the case of B3LYP functional, the return happened immediately after the setup of B3LYP parameters. + +end function libxc_functionals_gga_from_hybrid +!!*** + +!---------------------------------------------------------------------- + +!!****f* libxc_functionals/libxc_functionals_getvxc +!! NAME +!! libxc_functionals_getvxc +!! +!! FUNCTION +!! Return XC potential and energy, from input density (gradient etc...) +!! +!! INPUTS +!! ndvxc=size of dvxc +!! nd2vxc=size of d2vxc +!! npts=number of of points for the density +!! nspden=number of spin-density components +!! order=requested order of derivation +!! rho(npts,nspden)=electronic density +!! [grho2(npts,nspden)]=squared gradient of the density +!! [lrho(npts,nspden)]=laplacian of the density +!! [tau(npts,nspden)]= kinetic energy density +!! +!! OUTPUT +!! exc(npts)=XC energy density +!! vxc(npts,nspden)=derivative of the energy density wrt to the density +!! [vxclrho(npts,nspden)]=derivative of the energy density wrt to the density laplacian +!! [vxctau(npts,nspden)]=derivative of the energy density wrt to the kinetic energy density +!! [dvxc(npts,ndvxc)]=2nd derivative of the energy density wrt to the density +!! [vxcgr(npts,3)]=2nd derivative of the energy density wrt to the gradient +!! 2nd derivative of the energy density wrt to the density and the gradient +!! [d2vxc(npts,nd2vxc)]=3rd derivative of the energy density wrt to the density +!! +!! SIDE EFFECTS +!! [xc_functionals(2)]=, optional argument +!! Handle for XC functionals +!! +!! SOURCE + + subroutine libxc_functionals_getvxc(ndvxc,nd2vxc,npts,nspden,order,rho,exc,vxc,& +& grho2,vxcgr,lrho,vxclrho,tau,vxctau,dvxc,d2vxc,xc_functionals) ! Optional arguments + +!Arguments ------------------------------------ + integer, intent(in) :: ndvxc,nd2vxc,npts,nspden,order + real(dp),intent(in) :: rho(npts,nspden) + real(dp),intent(out) :: vxc(npts,nspden),exc(npts) + real(dp),intent(in),optional :: grho2(npts,2*min(nspden,2)-1) + real(dp),intent(out),optional :: vxcgr(npts,3) + real(dp),intent(in),optional :: lrho(npts,nspden) + real(dp),intent(out),optional :: vxclrho(npts,nspden) + real(dp),intent(in),optional :: tau(npts,nspden) + real(dp),intent(out),optional :: vxctau(npts,nspden) + real(dp),intent(out),optional :: dvxc(npts,ndvxc) + real(dp),intent(out),optional :: d2vxc(npts,nd2vxc) + type(libxc_functional_type),intent(inout),optional,target :: xc_functionals(2) +!Local variables ------------------------------- +!scalars + integer :: ii,ipts + logical :: is_gga,is_mgga,needs_laplacian,has_sigma_threshold + real(dp),target :: exctmp + character(len=500) :: msg + real(dp) :: sigma_threshold_max +#if defined HAVE_LIBXC && defined HAVE_FC_ISO_C_BINDING + type(C_PTR) :: rho_c,sigma_c,lrho_c,tau_c +#endif +!arrays + real(dp),target :: rhotmp(nspden),sigma(3),vxctmp(nspden),vsigma(3) + real(dp),target :: v2rho2(3),v2rhosigma(6),v2sigma2(6) + real(dp),target :: v2rholapl(3),v2sigmalapl(6),v2lapl2(3) + real(dp),target :: v2rhotau(3),v2sigmatau(6),v2lapltau(3),v2tau2(3) + real(dp),target :: v3rho3(4),v3rho2sigma(9),v3rhosigma2(12),v3sigma3(10) + real(dp),target :: lrhotmp(nspden),tautmp(nspden),vlrho(nspden),vtau(nspden) + type(libxc_functional_type),pointer :: xc_funcs(:) +#if defined HAVE_LIBXC && defined HAVE_FC_ISO_C_BINDING + type(C_PTR) :: exc_c(2),vxc_c(2),vsigma_c(2),vlrho_c(2),vtau_c(2) + type(C_PTR) :: v2rho2_c(2),v2rhosigma_c(2),v2sigma2_c(2) + type(C_PTR) :: v2rholapl_c(2),v2sigmalapl_c(2),v2lapl2_c(2) + type(C_PTR) :: v2rhotau_c(2),v2sigmatau_c(2),v2lapltau_c(2),v2tau2_c(2) + type(C_PTR) :: v3rho3_c(2),v3rho2sigma_c(2),v3rhosigma2_c(2),v3sigma3_c(2) +#endif + +! ************************************************************************* + + if (.not.libxc_constants_initialized) call libxc_functionals_constants_load() + +!Select XC functional(s) + if (present(xc_functionals)) then + xc_funcs => xc_functionals + else + xc_funcs => xc_global + end if + + is_gga =libxc_functionals_isgga (xc_funcs) + is_mgga=libxc_functionals_ismgga(xc_funcs) + needs_laplacian=(libxc_functionals_needs_laplacian(xc_funcs).and.present(lrho)) + + sigma_threshold_max=maxval(xc_funcs(:)%sigma_threshold,mask=(xc_funcs(:)%id>0)) + has_sigma_threshold=(sigma_threshold_max>zero) + + if (is_gga.and.(.not.present(grho2))) then + msg='GGA needs gradient of density!' + ABI_BUG(msg) + end if + if (is_mgga) then + if (present(vxctau).and.(.not.present(tau))) then + msg='meta-GGA needs tau!' + ABI_BUG(msg) + end if + if (needs_laplacian) then + if (present(vxclrho).and.(.not.present(lrho))) then + msg='meta-GGA needs lrho!' + ABI_BUG(msg) + end if + end if + endif + +!Inititalize all output arrays to zero + exc=zero ; vxc=zero + if (present(dvxc)) dvxc=zero + if (present(d2vxc)) d2vxc=zero + if ((is_gga.or.is_mgga).and.present(vxcgr)) vxcgr=zero + if (is_mgga.and.present(vxclrho)) vxclrho=zero + if (is_mgga.and.present(vxctau)) vxctau=zero + +!Determine which XC outputs can be computed +#if defined HAVE_LIBXC && defined HAVE_FC_ISO_C_BINDING + do ii = 1,2 + if (xc_funcs(ii)%has_exc) then + exc_c(ii)=c_loc(exctmp) + else + exc_c(ii)=C_NULL_PTR + end if + if (xc_funcs(ii)%has_vxc) then + vxc_c(ii)=c_loc(vxctmp) + vsigma_c(ii)=c_loc(vsigma) + vtau_c(ii)=c_loc(vtau) + vlrho_c(ii)=c_loc(vlrho) + else + vxc_c(ii)=C_NULL_PTR + vsigma_c(ii)=c_NULL_PTR + vtau_c(ii)=C_NULL_PTR + vlrho_c(ii)=C_NULL_PTR + end if + if ((xc_funcs(ii)%has_fxc).and.(abs(order)>1)) then + v2rho2_c(ii)=c_loc(v2rho2) + v2sigma2_c(ii)=c_loc(v2sigma2) + v2rhosigma_c(ii)=c_loc(v2rhosigma) + if (is_mgga) then + v2rholapl_c(ii)=c_loc(v2rholapl) + v2sigmalapl_c(ii)=c_loc(v2sigmalapl) + v2lapl2_c(ii)=c_loc(v2lapl2) + v2rhotau_c(ii)=c_loc(v2rhotau) + v2sigmatau_c(ii)=c_loc(v2sigmatau) + v2lapltau_c(ii)=c_loc(v2lapltau) + v2tau2_c(ii)=c_loc(v2tau2) + end if + else + v2rho2_c(ii)=C_NULL_PTR + v2sigma2_c(ii)=C_NULL_PTR + v2rhosigma_c(ii)=C_NULL_PTR + if (is_mgga) then + v2rholapl_c(ii)=C_NULL_PTR + v2sigmalapl_c(ii)=C_NULL_PTR + v2lapl2_c(ii)=C_NULL_PTR + v2rhotau_c(ii)=C_NULL_PTR + v2sigmatau_c(ii)=C_NULL_PTR + v2lapltau_c(ii)=C_NULL_PTR + v2tau2_c(ii)=C_NULL_PTR + end if + end if + if ((xc_funcs(ii)%has_kxc).and.(abs(order)>2)) then + v3rho3_c(ii)=c_loc(v3rho3) + v3sigma3_c(ii)=c_loc(v3sigma3) + v3rho2sigma_c(ii)=c_loc(v3rho2sigma) + v3rhosigma2_c(ii)=c_loc(v3rhosigma2) + else + v3rho3_c(ii)=C_NULL_PTR + v3sigma3_c(ii)=C_NULL_PTR + v3rho2sigma_c(ii)=C_NULL_PTR + v3rhosigma2_c(ii)=C_NULL_PTR + end if + end do +#endif + +!Initialize temporary arrays +#if defined HAVE_LIBXC && defined HAVE_FC_ISO_C_BINDING + rhotmp=zero ; rho_c=c_loc(rhotmp) + if (is_gga.or.is_mgga) then + sigma=zero ; sigma_c=c_loc(sigma) + end if + if (is_mgga) then + tautmp=zero ; tau_c=c_loc(tautmp) + lrhotmp=zero ;lrho_c=c_loc(lrhotmp) + end if +#endif + +!Some mGGA functionals require a special treatment + if (is_mgga) then + !TB09 functional requires the c parameter to be set + call libxc_functionals_compute_tb09(npts,nspden,rho,grho2,xc_funcs) + end if + +!Loop over points + do ipts=1,npts + +! Convert the quantities provided by ABINIT to the ones needed by libxc + if (nspden == 1) then + ! ABINIT passes rho_up in the spin-unpolarized case, while the libxc + ! expects the total density + rhotmp(1:nspden) = two*rho(ipts,1:nspden) + else + rhotmp(1:nspden) = rho(ipts,1:nspden) + end if + if (is_gga.or.is_mgga) then + if (nspden==1) then + ! ABINIT passes |grho_up|^2 while Libxc needs |grho_tot|^2 + sigma(1) = four*grho2(ipts,1) + else + ! ABINIT passes |grho_up|^2, |grho_dn|^2, and |grho_tot|^2 + ! while Libxc needs |grho_up|^2, grho_up.grho_dn, and |grho_dn|^2 + sigma(1) = grho2(ipts,1) + sigma(2) = (grho2(ipts,3) - grho2(ipts,1) - grho2(ipts,2))/two + sigma(3) = grho2(ipts,2) + end if + ! Apply a threshold on sigma (cannot be done in libxc6, at present) + if (has_sigma_threshold) then + do ii=1,2*nspden-1 + if (abs(sigma(ii))<=sigma_threshold_max) sigma(ii)=sigma_threshold_max + end do + end if + end if + if (is_mgga) then + if (nspden==1) then + tautmp(1:nspden) = two*tau(ipts,1:nspden) + if (needs_laplacian) lrhotmp(1:nspden) = two*lrho(ipts,1:nspden) + else + tautmp(1:nspden) = tau(ipts,1:nspden) + if (needs_laplacian) lrhotmp(1:nspden) = lrho(ipts,1:nspden) + end if + end if + +! Loop over functionals + do ii = 1,2 + if (xc_funcs(ii)%id<=0) cycle + +! Get the energy and the potential (and possibly the other derivatives) +#if defined HAVE_LIBXC && defined HAVE_FC_ISO_C_BINDING + exctmp=zero ; vxctmp=zero +! ===== LDA ===== + if (xc_funcs(ii)%family==XC_FAMILY_LDA) then + exctmp=zero ; vxctmp=zero ; v2rho2=zero ; v3rho3=zero + call xc_get_lda(xc_funcs(ii)%conf,1,rho_c, & +& exc_c(ii),vxc_c(ii),v2rho2_c(ii),v3rho3_c(ii)) +! ===== GGA ===== + else if (xc_funcs(ii)%family==XC_FAMILY_GGA.or. & +& xc_funcs(ii)%family==XC_FAMILY_HYB_GGA) then + exctmp=zero ; vxctmp=zero ; vsigma=zero + v2rho2=zero ; v2sigma2=zero ; v2rhosigma=zero + v3rho3=zero ; v3rho2sigma=zero ; v3rhosigma2=zero ; v3sigma3=zero + call xc_get_gga(xc_funcs(ii)%conf,1,rho_c,sigma_c, & +& exc_c(ii),vxc_c(ii),vsigma_c(ii), & +& v2rho2_c(ii),v2rhosigma_c(ii),v2sigma2_c(ii), & +& v3rho3_c(ii),v3rho2sigma_c(ii),v3rhosigma2_c(ii),v3sigma3_c(ii)) +! ===== mGGA ===== + else if (xc_funcs(ii)%family==XC_FAMILY_MGGA.or. & +& xc_funcs(ii)%family==XC_FAMILY_HYB_MGGA) then + exctmp=zero ; vxctmp=zero ; vsigma=zero ; vlrho=zero ; vtau=zero + v2rho2=zero ; v2sigma2=zero ; v2rhosigma=zero + ! At present, we don't use 2nd derivatives involving Tau or Laplacian + call xc_get_mgga(xc_funcs(ii)%conf,1,rho_c,sigma_c,lrho_c,tau_c, & +& exc_c(ii),vxc_c(ii),vsigma_c(ii),vlrho_c(ii),vtau_c(ii), & +& v2rho2_c(ii),v2rhosigma_c(ii),v2rholapl_c(ii),v2rhotau_c(ii),v2sigma2_c(ii), & +& v2sigmalapl_c(ii),v2sigmatau_c(ii),v2lapl2_c(ii),v2lapltau_c(ii),v2tau2_c(ii)) + end if +#endif + + exc(ipts) = exc(ipts) + exctmp + vxc(ipts,1:nspden) = vxc(ipts,1:nspden) + vxctmp(1:nspden) + +! Deal with fxc and kxc + if (abs(order)>1) then +! ----- LDA ----- + if (xc_funcs(ii)%family==XC_FAMILY_LDA) then + if (nspden==1) then + if(order>=2) then + dvxc(ipts,1)=dvxc(ipts,1)+v2rho2(1) + if(order>2) then + d2vxc(ipts,1)=d2vxc(ipts,1)+v3rho3(1) + endif + else if (order==-2) then + dvxc(ipts,1)=dvxc(ipts,1)+v2rho2(1) + dvxc(ipts,2)=dvxc(ipts,2)+v2rho2(1) + endif + else + dvxc(ipts,1)=dvxc(ipts,1)+v2rho2(1) + dvxc(ipts,2)=dvxc(ipts,2)+v2rho2(2) + dvxc(ipts,3)=dvxc(ipts,3)+v2rho2(3) + if(abs(order)>2) then + d2vxc(ipts,1)=d2vxc(ipts,1)+v3rho3(1) + d2vxc(ipts,2)=d2vxc(ipts,2)+v3rho3(2) + d2vxc(ipts,3)=d2vxc(ipts,3)+v3rho3(3) + d2vxc(ipts,4)=d2vxc(ipts,4)+v3rho3(4) + endif + endif +! ----- GGA or mGGA ----- + else if (xc_funcs(ii)%family==XC_FAMILY_GGA.or. & +& xc_funcs(ii)%family==XC_FAMILY_HYB_GGA.or. & +& xc_funcs(ii)%family==XC_FAMILY_MGGA.or. & +& xc_funcs(ii)%family==XC_FAMILY_HYB_MGGA) then + if (xc_funcs(ii)%kind==XC_EXCHANGE) then + if (nspden==1) then + dvxc(ipts,1)=v2rho2(1)*two + dvxc(ipts,2)=dvxc(ipts,1) + dvxc(ipts,3)=two*two*vsigma(1) + dvxc(ipts,4)=dvxc(ipts,3) + dvxc(ipts,5)=four*two*v2rhosigma(1) + dvxc(ipts,6)=dvxc(ipts,5) + dvxc(ipts,7)=two*four*four*v2sigma2(1) + dvxc(ipts,8)=dvxc(ipts,7) + else + dvxc(ipts,1)=v2rho2(1) + dvxc(ipts,2)=v2rho2(3) + dvxc(ipts,3)=two*vsigma(1) + dvxc(ipts,4)=two*vsigma(3) + dvxc(ipts,5)=two*v2rhosigma(1) + dvxc(ipts,6)=two*v2rhosigma(6) + dvxc(ipts,7)=four*v2sigma2(1) + dvxc(ipts,8)=four*v2sigma2(6) + end if + else if (xc_funcs(ii)%kind==XC_CORRELATION) then + if (nspden==1) then + dvxc(ipts,9)=v2rho2(1) + dvxc(ipts,10)=dvxc(ipts,9) + dvxc(ipts,11)=dvxc(ipts,9) + dvxc(ipts,12)=two*vsigma(1) + dvxc(ipts,13)=two*v2rhosigma(1) + dvxc(ipts,14)=dvxc(ipts,13) + dvxc(ipts,15)=four*v2sigma2(1) + else + dvxc(ipts,9)=v2rho2(1) + dvxc(ipts,10)=v2rho2(2) + dvxc(ipts,11)=v2rho2(3) + dvxc(ipts,12)=two*vsigma(1) + dvxc(ipts,13)=two*v2rhosigma(1) + dvxc(ipts,14)=two*v2rhosigma(6) + dvxc(ipts,15)=four*v2sigma2(1) + end if + end if + end if + end if + +! Convert the quantities returned by Libxc to the ones needed by ABINIT + if ((is_gga.or.is_mgga).and.present(vxcgr)) then + if (nspden==1) then + vxcgr(ipts,3) = vxcgr(ipts,3) + vsigma(1)*two + else + vxcgr(ipts,1) = vxcgr(ipts,1) + two*vsigma(1) - vsigma(2) + vxcgr(ipts,2) = vxcgr(ipts,2) + two*vsigma(3) - vsigma(2) + vxcgr(ipts,3) = vxcgr(ipts,3) + vsigma(2) + end if + end if + if (is_mgga.and.present(vxctau)) then + vxctau(ipts,1:nspden) = vxctau(ipts,1:nspden) + vtau(1:nspden) + end if + if (is_mgga.and.needs_laplacian.and.present(vxclrho)) then + vxclrho(ipts,1:nspden) = vxclrho(ipts,1:nspden) + vlrho(1:nspden) + end if + + end do ! ii + end do ! ipts + +end subroutine libxc_functionals_getvxc +!!*** + +!====================================================================== +! HEREAFTER ARE PRIVATE FUNCTIONS +!====================================================================== + +!---------------------------------------------------------------------- + +!!****f* libxc_functionals/libxc_functionals_compute_tb09 +!! NAME +!! libxc_functionals_compute_tb09 +!! +!! FUNCTION +!! Compute c parameter for Tran-Blaha 2009 functional and set it +!! Applies on a (set of) functional(s) +!! +!! INPUTS +!! npts=number of of points for the density +!! nspden=number of spin-density components +!! rho(npts,nspden)=electronic density +!! grho2(npts,nspden)=squared gradient of the density +!! +!! OUTPUT +!! +!! SIDE EFFECTS +!! [xc_functionals(2)]=, optional argument +!! Handle for XC functionals +!! +!! SOURCE + + subroutine libxc_functionals_compute_tb09(npts,nspden,rho,grho2,xc_functionals) + +!Arguments ------------------------------------ + integer, intent(in) :: npts,nspden + real(dp),intent(in) :: rho(npts,nspden),grho2(npts,2*min(nspden,2)-1) + type(libxc_functional_type),intent(inout),optional,target :: xc_functionals(2) +!Local variables ------------------------------- +!scalars + integer :: ii,ipts + logical :: fixed_c_tb09,is_mgga_tb09 + real(dp) :: cc +!arrays + type(libxc_functional_type),pointer :: xc_funcs(:) + real(dp),allocatable :: gnon(:) +#if defined HAVE_LIBXC && defined HAVE_FC_ISO_C_BINDING + integer(C_INT) :: npar_c=int(2,kind=C_INT) + real(C_DOUBLE) :: param_c(2) +#endif + +! ************************************************************************* + + if (.not.libxc_constants_initialized) call libxc_functionals_constants_load() + +!Select XC functional(s) + if (present(xc_functionals)) then + xc_funcs => xc_functionals + else + xc_funcs => xc_global + end if + + is_mgga_tb09=(any(xc_funcs%id==libxc_functionals_getid('XC_MGGA_X_TB09'))) + fixed_c_tb09=(any(abs(xc_funcs%xc_tb09_c-99.99_dp)>tol12)) + + if (is_mgga_tb09) then + +! C is fixed by the user + if (fixed_c_tb09) then + cc=zero + do ii=1,2 + if (abs(xc_funcs(ii)%xc_tb09_c-99.99_dp)>tol12) cc=xc_funcs(ii)%xc_tb09_c + end do +! write(msg,'(2a,f9.6)' ) ch10,& +!& 'In the mGGA functional TB09, c is fixed by the user and is equal to ',cc + !call wrtout(std_out,msg,'COLL') +! C is computed + else + ABI_MALLOC(gnon,(npts)) + do ipts=1,npts + if (sum(rho(ipts,:))<=1e-7_dp) then + gnon(ipts)=zero + else + if (nspden==1) then + gnon(ipts)=sqrt(grho2(ipts,1))/rho(ipts,1) + else + gnon(ipts)=sqrt(grho2(ipts,3))/sum(rho(ipts,:)) + end if + end if + end do + cc= -0.012_dp + 1.023_dp*sqrt(sum(gnon)/npts) + ABI_FREE(gnon) +! write(msg,'(2a,f9.6)' ) ch10,'In the mGGA functional TB09, c = ',cc +! call wrtout(std_out,msg,'COLL') + end if + +! Set c in XC data structure + do ii=1,2 + if (xc_funcs(ii)%id==libxc_functionals_getid('XC_MGGA_X_TB09')) then +#if defined HAVE_LIBXC && defined HAVE_FC_ISO_C_BINDING + param_c(1)=real(cc,kind=C_DOUBLE) ; param_c(2)=real(0._dp,kind=C_DOUBLE) + call xc_func_set_params(xc_funcs(ii)%conf,param_c,npar_c) +#endif + end if + end do + end if + +end subroutine libxc_functionals_compute_tb09 +!!*** + +!---------------------------------------------------------------------- + +!!****f* libxc_functionals/libxc_functionals_getrefs +!! NAME +!! libxc_functionals_getrefs +!! +!! FUNCTION +!! Return the reference(s) of a single XC functional +!! +!! INPUTS +!! xc_functional=, handle for XC functional +!! +!! OUTPUT +!! xcrefs(:)= references(s) of the functional +!! +!! SOURCE + +subroutine libxc_functionals_getrefs(xcrefs,xc_functional) + +!Arguments ------------------------------------ + character(len=*),intent(out) :: xcrefs(:) + type(libxc_functional_type),intent(in) :: xc_functional +!Local variables------------------------------- +#if defined HAVE_LIBXC && defined HAVE_FC_ISO_C_BINDING + integer(C_INT) :: iref_c + character(kind=C_CHAR,len=1),pointer :: strg_c +#endif + +! ************************************************************************* + + xcrefs(:)='' + +#if defined HAVE_LIBXC && defined HAVE_FC_ISO_C_BINDING + iref_c=0 + do while (iref_c>=0.and.iref_c, handle for XC functional +!! +!! SOURCE + +function libxc_functionals_depends_on_temp(xc_functional) + +!Arguments ------------------------------------ + logical :: libxc_functionals_depends_on_temp + type(libxc_functional_type),intent(in) :: xc_functional +!Local variables------------------------------- +#if defined HAVE_LIBXC && defined HAVE_FC_ISO_C_BINDING + integer(C_INT) :: ipar_c + character(len=50) :: par_name + character(kind=C_CHAR,len=1),pointer :: strg_c +#endif + +! ************************************************************************* + + libxc_functionals_depends_on_temp = .false. + +#if defined HAVE_LIBXC && defined HAVE_FC_ISO_C_BINDING + ipar_c=0 + do while (ipar_c>=0) + call c_f_pointer(xc_func_get_params_name(xc_functional%conf,ipar_c),strg_c) + if (associated(strg_c)) then + call xc_char_to_f(strg_c,par_name) + if (trim(par_name)=="T") then + libxc_functionals_depends_on_temp=.true. ; exit + end if + ipar_c=ipar_c+1 + else + ipar_c=-1 + end if + end do + + if (.not.libxc_functionals_depends_on_temp) then +! For libXC_version<5, these three functional were T-dependent + libxc_functionals_depends_on_temp = & +& (xc_functional%id==libxc_functionals_getid('XC_LDA_XC_KSDT') .or. & +& xc_functional%id==libxc_functionals_getid('XC_LDA_XC_GDSMFB') .or. & +& xc_functional%id==libxc_functionals_getid('XC_LDA_XC_CORRKSDT')) + end if + +#else + if (.False.) write(std_out,*) xc_functional%id +#endif + +end function libxc_functionals_depends_on_temp +!!*** + +!---------------------------------------------------------------------- + +!!****f* libxc_functionals/libxc_functionals_set_temp +!! NAME +!! libxc_functionals_set_temp +!! +!! FUNCTION +!! Set the electronic temperature in a single XC functional +!! No action if functional doesnt depend on temperature +!! +!! INPUTS +!! xc_functional=, handle for XC functional +!! temperature=electronic temperature (in Ha units, i.e. T_kelvin * k_B_in_Ha/K ) +!! +!! SOURCE + +subroutine libxc_functionals_set_temp(xc_functional,temperature) + +!Arguments ------------------------------------ + real(dp),intent(in) :: temperature + type(libxc_functional_type),intent(in) :: xc_functional +!Local variables------------------------------- +#if defined HAVE_LIBXC && defined HAVE_FC_ISO_C_BINDING + integer(C_INT) :: iset_c,npar_c + real(C_DOUBLE) :: temp_c,param_c(1) + character(len=50) :: par_name + character(kind=C_CHAR,len=1),target :: name_c(2) +#endif + +! ************************************************************************* + +#if defined HAVE_LIBXC && defined HAVE_FC_ISO_C_BINDING + if (xc_functional%temperature>zero) then + + par_name="T" ; name_c=xc_char_to_c(trim(par_name)) + temp_c=real(temperature,kind=C_DOUBLE) + iset_c = xc_func_set_params_name(xc_functional%conf,c_loc(name_c),temp_c) + if (iset_c /= 0) then + !Try this when set_params_name method is not available (libXC<5) + if (xc_functional%id==libxc_functionals_getid('XC_LDA_XC_KSDT') .or. & +& xc_functional%id==libxc_functionals_getid('XC_LDA_XC_GDSMFB') .or. & +& xc_functional%id==libxc_functionals_getid('XC_LDA_XC_CORRKSDT')) then + param_c(1)=real(zero,kind=C_DOUBLE);npar_c=int(1,kind=C_INT) + call xc_func_set_params(xc_functional%conf,param_c,npar_c) + end if + end if + + end if + +#else + if (.False.) write(std_out,*) xc_functional%id +#endif + +end subroutine libxc_functionals_set_temp +!!*** + +!---------------------------------------------------------------------- + +!!****f* libxc_functionals/libxc_functionals_constants_load +!! NAME +!! libxc_functionals_constants_load +!! +!! FUNCTION +!! Load libXC constants from C headers +!! +!! SOURCE + + subroutine libxc_functionals_constants_load() + +!Local variables------------------------------- +#if defined HAVE_LIBXC && defined HAVE_FC_ISO_C_BINDING + integer(C_INT) :: i1,i2,i3,i4,i5,i6,i7,i8,i9 +#endif + +! ************************************************************************* + +#if defined HAVE_LIBXC && defined HAVE_FC_ISO_C_BINDING + call xc_get_singleprecision_constant(i1) + XC_SINGLE_PRECISION = int(i1) + call xc_get_family_constants(i1,i2,i3,i4,i5,i6,i7,i8,i9) + XC_FAMILY_UNKNOWN = int(i1) + XC_FAMILY_LDA = int(i2) + XC_FAMILY_GGA = int(i3) + XC_FAMILY_MGGA = int(i4) + XC_FAMILY_LCA = int(i5) + XC_FAMILY_OEP = int(i6) + XC_FAMILY_HYB_GGA = int(i7) + XC_FAMILY_HYB_MGGA = int(i8) + XC_FAMILY_HYB_LDA = int(i9) + call xc_get_flags_constants(i1,i2,i3,i4,i5,i6) + XC_FLAGS_HAVE_EXC = int(i1) + XC_FLAGS_HAVE_VXC = int(i2) + XC_FLAGS_HAVE_FXC = int(i3) + XC_FLAGS_HAVE_KXC = int(i4) + XC_FLAGS_HAVE_LXC = int(i5) + XC_FLAGS_NEEDS_LAPLACIAN= int(i6) + call xc_get_kind_constants(i1,i2,i3,i4) + XC_EXCHANGE = int(i1) + XC_CORRELATION = int(i2) + XC_EXCHANGE_CORRELATION = int(i3) + XC_KINETIC = int(i4) + libxc_constants_initialized=.true. +#endif + + end subroutine libxc_functionals_constants_load +!!*** + +!---------------------------------------------------------------------- + +!!****f* libxc_functionals/xc_char_to_c +!! NAME +!! xc_char_to_c +!! +!! FUNCTION +!! Helper function to convert a Fortran string to a C string +!! Based on a routine by Joseph M. Krahn +!! +!! INPUTS +!! f_string=Fortran string +!! +!! OUTPUT +!! c_string=C string +!! +!! SOURCE + +#if defined HAVE_FC_ISO_C_BINDING +function xc_char_to_c(f_string) result(c_string) + +!Arguments ------------------------------------ + character(len=*),intent(in) :: f_string + character(kind=C_CHAR,len=1) :: c_string(len_trim(f_string)+1) +!Local variables ------------------------------- + integer :: ii,strlen + +!! ************************************************************************* + + strlen=len_trim(f_string) + forall(ii=1:strlen) + c_string(ii)=f_string(ii:ii) + end forall + c_string(strlen+1)=C_NULL_CHAR +end function xc_char_to_c +#endif +!!*** + +!---------------------------------------------------------------------- + +!!****f* libxc_functionals/xc_char_to_f +!! NAME +!! xc_char_to_f +!! +!! FUNCTION +!! Helper function to convert a C string to a Fortran string +!! Based on a routine by Joseph M. Krahn +!! +!! NOTES +!! non-ascii chars are replaced by "?" as outputting strings containing non-ascii entries +!! can lead to IO error with ifort when running in parallel (don't know why sequential execution is OK, though) +!! +!! forrtl: severe (38): error during write, unit 6, file /proc/3478/fd/1 +!! Image PC Routine Line Source +!! libifcoremt.so.5 00007FEA9BA95F46 for__io_return Unknown Unknown +!! libifcoremt.so.5 00007FEA9BB03A99 for_write_seq_fmt Unknown Unknown +!! libifcoremt.so.5 00007FEA9BB0193A for_write_seq_fmt Unknown Unknown +!! abinit 000000000285EB7A m_io_tools_mp_wri 1218 m_io_tools.F90 +!! +!! INPUTS +!! c_string=C string +!! +!! OUTPUT +!! f_string=Fortran string +!! +!! SOURCE + +#if defined HAVE_FC_ISO_C_BINDING +subroutine xc_char_to_f(c_string,f_string) + +!Arguments ------------------------------------ + character(kind=C_CHAR,len=1),intent(in) :: c_string(*) + character(len=*),intent(out) :: f_string +!Local variables ------------------------------- + integer :: ii + +!! ************************************************************************* + + ii=1 + do while(c_string(ii)/=C_NULL_CHAR.and.ii<=len(f_string)) + if (iachar(c_string(ii)) <= 127) then + f_string(ii:ii)=c_string(ii) + else + f_string(ii:ii)="?" + end if + ii=ii+1 + end do + if (iim_norm_min)then + mm=rhoin_dot_mag/m_norm + rho_out(ipt,1)=half*(rho_in(ipt,1)+mm) + rho_out(ipt,2)=half*(rho_in(ipt,1)-mm) + else + rho_out(ipt,1)=half*rho_in(ipt,1) + rho_out(ipt,2)=half*rho_in(ipt,1) + end if + + if (out_mag_norm) then + if (m_norm >m_norm_min) mag_norm_out(ipt)=m_norm + if (m_norm<=m_norm_min) mag_norm_out(ipt)=zero + end if + + end do + + else ! cplex==2 + + do ipt=1,vectsize + if (has_mag_norm) then + m_norm=mag_norm_in(ipt) + else + m_norm=dsqrt(mag(ipt,1)**2+mag(ipt,2)**2+mag(ipt,3)**2) + end if + + ! real part of m.m^(1) + rhoin_dot_mag_re=rho_in(2*ipt-1,2)*mag(ipt,1)+rho_in(2*ipt-1,3)*mag(ipt,2) & +& +rho_in(2*ipt-1,4)*mag(ipt,3) + ! imaginary part of m.m^(1) + rhoin_dot_mag_im=rho_in(2*ipt ,2)*mag(ipt,1)+rho_in(2*ipt ,3)*mag(ipt,2) & +& +rho_in(2*ipt ,4)*mag(ipt,3) + if(m_norm>m_norm_min)then + mm=rhoin_dot_mag_re/m_norm + rho_out(2*ipt-1,1)=half*(rho_in(2*ipt-1,1)+mm) + rho_out(2*ipt-1,2)=half*(rho_in(2*ipt-1,1)-mm) + mm=rhoin_dot_mag_im/m_norm + rho_out(2*ipt ,1)=half*(rho_in(2*ipt ,1)+mm) + rho_out(2*ipt ,2)=half*(rho_in(2*ipt ,1)-mm) + else + rho_out(2*ipt-1,1)=half*rho_in(2*ipt-1,1) + rho_out(2*ipt-1,2)=half*rho_in(2*ipt-1,2) + rho_out(2*ipt ,1)=half*rho_in(2*ipt ,1) + rho_out(2*ipt ,2)=half*rho_in(2*ipt ,2) + end if + + if (out_mag_norm) then + if (m_norm >m_norm_min) mag_norm_out(ipt)=m_norm + if (m_norm<=m_norm_min) mag_norm_out(ipt)=zero + end if + + end do + + end if + + if (present(rho_out_format)) then + if (rho_out_format==2) then + do ipt=1,cplex*vectsize + rho_up=rho_out(ipt,1) + rho_out(ipt,1)=rho_up+rho_out(ipt,2) + rho_out(ipt,2)=rho_up + end do + end if + end if + +!DBG_EXIT("COLL") + +end subroutine rotate_mag +!!*** + +!---------------------------------------------------------------------- + +!!****t* m_xc_noncoll/rotate_back_mag +!! NAME +!! rotate_back_mag +!! +!! FUNCTION +!! Rotate back a collinear XC potential (stored as up+dn) with respect to +!! a magnetization and give a non-collinear XC potential +!! (stored as up_up, dn_dn, Re[up_dn], Im[up_dn]) +!! Note: works only for cplex=1 +!! +!! INPUTS +!! vxc_in(vectsize,2)=input collinear XC potential +!! mag(vectsize,3)=gs magnetization used for projection +!! vectsize=size of vector fields +!! [mag_norm_in(vectsize)]= --optional-- norm of mag(:) at each point of the grid +!! +!! OUTPUT +!! vxc_out(vectsize,4)=output non-collinear XC potential +!! +!! SOURCE + +subroutine rotate_back_mag(vxc_in,vxc_out,mag,vectsize,& +& mag_norm_in) ! optional argument + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: vectsize +!arrays + real(dp),intent(in) :: vxc_in(vectsize,2),mag(vectsize,3) + real(dp),intent(out) :: vxc_out(vectsize,4) + real(dp),intent(in),optional :: mag_norm_in(vectsize) + +!Local variables------------------------------- +!scalars + integer :: ipt + logical :: has_mag_norm + real(dp) :: dvdn,dvdz,m_norm +!arrays + +! ************************************************************************* + +!DBG_ENTER("COLL") + + has_mag_norm=present(mag_norm_in) + + do ipt=1,vectsize + if (has_mag_norm) then + m_norm=mag_norm_in(ipt) + else + m_norm=dsqrt(mag(ipt,1)**2+mag(ipt,2)**2+mag(ipt,3)**2) + end if + + dvdn=half*(vxc_in(ipt,1)+vxc_in(ipt,2)) + + if (m_norm>m_norm_min) then + dvdz=half*(vxc_in(ipt,1)-vxc_in(ipt,2))/m_norm + vxc_out(ipt,1)=dvdn+mag(ipt,3)*dvdz + vxc_out(ipt,2)=dvdn-mag(ipt,3)*dvdz + vxc_out(ipt,3)= mag(ipt,1)*dvdz + vxc_out(ipt,4)=-mag(ipt,2)*dvdz + else + vxc_out(ipt,1:2)=dvdn + vxc_out(ipt,3:4)=zero + end if + end do + +!DBG_EXIT("COLL") + +end subroutine rotate_back_mag +!!*** + +!!****t* m_xc_noncoll/rotate_back_mag_dfpt +!! NAME +!! rotate_back_mag_dfpt +!! +!! FUNCTION +!! Rotate back a 1st-order collinear XC potential (stored as up+dn) with respect to +!! a magnetization and give a 1st-order non-collinear XC potential +!! (stored as up_up, dn_dn, Re{up_dn}, Im{up_dn}). +!! +!! INPUTS +!! mag(vectsize,3)=0-order magnetization used for projection +!! rho1(vectsize,4)=1st-order non-collinear density and magnetization +!! vxc(vectsize,4)=0-order non-collinear XC potential +!! kxc(vectsize,nkxc)=0-order XC kernel (associated to vxc) +!! vxc1_in(vectsize,2)=input 1st-order collinear XC potential +!! vectsize=size of vector fields +!! [mag_norm_in(vectsize)]= --optional-- norm of 0-order mag(:) at each point of the grid +!! [rot_method]=Select method used to compute rotation matrix (1, 2 or 3) +!! option=if 0, compute only the U^0 vxc^(1) U^0 part +!! if 1, full first order xc potential +!! +!! NOTES +!! cplex=1: +!! V is stored as : V^11, V^22, Re[V^12], Im[V^12] (complex, hermitian) +!! N is stored as : n, m_x, m_y, m_z (real) +!! cplex=2: +!! V is stored as : V^11, V^22, V^12, i.V^21 (complex) +!! N is stored as : n, m_x, m_y, mZ (complex) +!! +!! OUTPUT +!! vxc1_out(vectsize,4)=output 1st-order non-collinear XC potential +!! +!! SOURCE + +subroutine rotate_back_mag_dfpt(option,vxc1_in,vxc1_out,vxc,kxc,rho1,mag,vectsize,cplex,& +& mag_norm_in,rot_method) ! optional arguments + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: vectsize + integer,intent(in) :: cplex + integer,intent(in) :: option + integer,intent(in),optional :: rot_method +!arrays + real(dp),intent(in) :: kxc(:,:),mag(vectsize,3),vxc(vectsize,4) + real(dp),intent(in) :: rho1(cplex*vectsize,4) + real(dp),intent(in) :: vxc1_in(cplex*vectsize,2) + real(dp),intent(in),optional :: mag_norm_in(vectsize) + real(dp),intent(out) :: vxc1_out(cplex*vectsize,4) + +!Local variables------------------------------- +!scalars + integer :: ipt,rotation_method + logical :: has_mag_norm + logical :: small_angle + real(dp) :: bxc_over_m,d1,d2,d3,d4,dvdn,dvdz,fact,m_dot_m1,m_norm + real(dp) :: dvdn_re,dvdn_im,dvdz_re,dvdz_im + complex(dpc) :: rho_updn + real(dp) :: mdirx,mdiry,mdirz,mxy,mx1,my1,mz1,wx,wy,wx1,wy1 + real(dp) :: theta0,theta1,theta1_re,theta1_im + real(dp) :: wx1_re,wx1_im + real(dp) :: wy1_re,wy1_im + real(dp) :: mx1_re,mx1_im,my1_re,my1_im,mz1_re,mz1_im + real(dp) :: m_dot_m1_re,m_dot_m1_im + real(dp) :: bxc +!arrays + real(dp) :: vxc_diag(2),v21tmp(2) + complex(dpc) :: r1tmp(2,2),u0(2,2),u0_1(2,2),u0_1r1(2,2),u0v1(2,2) + complex(dpc) :: rho1_updn(2,2),v1tmp(2,2),vxc1tmp(2,2) + complex(dpc) :: rho1_offdiag(2) + +! ************************************************************************* + +!DBG_ENTER("COLL") + +!Optional arguments + has_mag_norm=present(mag_norm_in) + rotation_method=rotation_method_default + if (present(rot_method)) rotation_method=rot_method + +!Check Kxc + if (size(kxc)>3*vectsize) then + ABI_ERROR('Cannot use Kxc from GGA!') + end if + + if((rotation_method==1.or.rotation_method==2).and.cplex==2) then + ABI_ERROR('rotation_method=1 and 2 are not available for cplex=2 case! use ixcrot=3') + endif + + + select case (rotation_method) + +!---------------------------------------- +! Taylor expansion of U rotation matrix +!---------------------------------------- + case (1) + + do ipt=1,vectsize + + if (has_mag_norm) then + m_norm=mag_norm_in(ipt) + else + m_norm=sqrt(mag(ipt,1)**2+mag(ipt,2)**2+mag(ipt,3)**2) + end if + + if(m_norm>m_norm_min) then + +! Define the U^(0) transformation matrix + rho_updn=(mag(ipt,1)+(zero,one)*mag(ipt,2)) + d1=sqrt(( m_norm+mag(ipt,3))**2+abs(rho_updn)**2) + d2=sqrt((-m_norm+mag(ipt,3))**2+abs(rho_updn)**2) + d3=sqrt(( m_norm-mag(ipt,3))**2+abs(rho_updn)**2) + d4=sqrt(( m_norm+mag(ipt,3))**2-abs(rho_updn)**2) + u0(1,1)=( m_norm+mag(ipt,3))/d1 ! ( m + mz)/d1 + u0(2,2)=rho_updn/d2 ! ( mx +imy)/d2 + u0(1,2)=(-m_norm+mag(ipt,3))/d2 ! (-m + mz)/d2 + u0(2,1)=rho_updn/d1 ! ( mx +imy)/d1 + +! Define the inverse of U^(0): U^(0)^-1 + if (abs(rho_updn) > m_norm_min) then + u0_1(1,1)= half*d1/m_norm + u0_1(2,2)= half*d2*(m_norm+mag(ipt,3))/(m_norm*rho_updn) + u0_1(1,2)= half*d1*(m_norm-mag(ipt,3))/(m_norm*rho_updn) + u0_1(2,1)=-half*d2/m_norm + else + u0 = zero + u0(1,1) = one + u0(2,2) = one + u0_1 = zero + u0_1(1,1) = one + u0_1(2,2) = one + end if + +! Diagonalize the GS Vxc^(0): U^(0)^-1 Vxc^(0) U^(0) +! (Remember the abinit notation for vxc!) + vxc_diag(1)=half*(vxc(ipt,1)+vxc(ipt,2) & +& -sqrt((vxc(ipt,1)-vxc(ipt,2))**2 & +& +four*(vxc(ipt,3)**2+vxc(ipt,4)**2))) + vxc_diag(2)=half*(vxc(ipt,1)+vxc(ipt,2) & +& +sqrt((vxc(ipt,1)-vxc(ipt,2))**2 & +& +four*(vxc(ipt,3)**2+vxc(ipt,4)**2))) + v1tmp(1,1)=cmplx(real(vxc1_in(ipt,1),kind=dp),zero) + v1tmp(2,2)=cmplx(real(vxc1_in(ipt,2),kind=dp),zero) + + !Tranforming the rhor1 with U0 + rho1_updn(1,1)=half*(rho1(ipt,1)+rho1(ipt,4)) + rho1_updn(2,2)=half*(rho1(ipt,1)-rho1(ipt,4)) + rho1_updn(1,2)=half*(rho1(ipt,2)-(zero,one)*rho1(ipt,3)) + rho1_updn(2,1)=half*(rho1(ipt,2)+(zero,one)*rho1(ipt,3)) + u0_1r1=matmul(u0_1,rho1_updn) + r1tmp=matmul(u0_1r1,u0) + rho1_offdiag(1)=r1tmp(1,2) ; rho1_offdiag(2)=r1tmp(2,1) + + if (option==0) then ! for xccc alone + v1tmp(1,2)=cmplx(zero,zero) + v1tmp(2,1)=cmplx(zero,zero) + else + v1tmp(1,2)=-(rho1_offdiag(1)/m_norm)*(vxc_diag(2)-vxc_diag(1)) + v1tmp(2,1)= (rho1_offdiag(2)/m_norm)*(vxc_diag(1)-vxc_diag(2)) + endif + + !Rotate back the "diagonal" xc computing the term U^(0) Vxc1_^(1) U^(0)^-1 + u0v1=matmul(u0,v1tmp) + vxc1tmp=matmul(u0v1,u0_1) + vxc1_out(ipt,1)=real(vxc1tmp(1,1),kind=dp) + vxc1_out(ipt,2)=real(vxc1tmp(2,2),kind=dp) + vxc1_out(ipt,3)=real( real(vxc1tmp(1,2)),kind=dp) + vxc1_out(ipt,4)=real(aimag(vxc1tmp(1,2)),kind=dp) + + else ! Magnetization is zero + dvdn=(vxc1_in(ipt,1)+vxc1_in(ipt,2))*half + mx1=rho1(ipt,2) ; my1=rho1(ipt,3) ; mz1=rho1(ipt,4) +! Compute Bxc/|m| from Kxc (zero limit) + bxc_over_m = half*(half*(kxc(ipt,1)+kxc(ipt,3))-kxc(ipt,2)) + vxc1_out(ipt,1)= dvdn + bxc_over_m*mz1 + vxc1_out(ipt,2)= dvdn - bxc_over_m*mz1 + vxc1_out(ipt,3)= bxc_over_m*mx1 + vxc1_out(ipt,4)=-bxc_over_m*my1 + end if + + end do ! ipt + +!---------------------------------------- +! Analytical expression of U rotation matrix +!---------------------------------------- + case (2) + !Alternative method (explicitely calculated rotation matrices) + !Vxc^(1) = phixc^(1).Id + // <= change of "electrostatic" XC potential (phixc^(1) is denoted dvdn) + ! + bxc^(1)*( Udag^(0).sigma_z.U^(0) ) + // <= this part describes the change of XC magnetic field magnitude bxc^(1) + ! + bxc^(0)*( Udag^(1).sigma_z.U^(0) + Udag^(0).sigma_z.U^(1) ) // <= remaining terms describe the cost of magnetization rotation + + select case(cplex) + case(1) + do ipt=1,vectsize + + if (has_mag_norm) then + m_norm=mag_norm_in(ipt) + else + m_norm=dsqrt(mag(ipt,1)**2+mag(ipt,2)**2+mag(ipt,3)**2) + end if + + + mx1 =rho1(ipt,2); + my1 =rho1(ipt,3); + mz1 =rho1(ipt,4) + + dvdn=(vxc1_in(ipt,1)+vxc1_in(ipt,2))*half !phixc^(1) + dvdz=(vxc1_in(ipt,1)-vxc1_in(ipt,2))*half !bxc^(1) + + if (m_norm>m_norm_min) then + + mxy = dsqrt(mag(ipt,1)**2+mag(ipt,2)**2) + small_angle=(mxy/m_normm_norm_min) then + + mdirx=mag(ipt,1)/m_norm + mdiry=mag(ipt,2)/m_norm + mdirz=mag(ipt,3)/m_norm + + mxy = dsqrt(mag(ipt,1)**2+mag(ipt,2)**2) + small_angle=(mxy/m_normm_norm_min) then + + mdirx=mag(ipt,1)/m_norm; mdiry=mag(ipt,2)/m_norm; mdirz=mag(ipt,3)/m_norm + + !This part describes the change of the magnitude of the xc magnetic field + !and the change of the scalar part of the xc electrostatic potential, 1st + 2nd term in Eq.A + !phixc^(1).Id + bxc^(1) (sigma,m^(0))/|m^(0)| + vxc1_out(ipt,1)= dvdn+dvdz*mdirz + vxc1_out(ipt,2)= dvdn-dvdz*mdirz + vxc1_out(ipt,3)= dvdz*mdirx ! Real part + vxc1_out(ipt,4)=-dvdz*mdiry ! Imaginary part, minus sign comes from sigma_y + + if (option/=0) then + !Add remaining contributions comming from the change of magnetization direction + !projection of m^(1) on gs magnetization direction + m_dot_m1=(mdirx*rho1(ipt,2)+mdiry*rho1(ipt,3)+mdirz*rho1(ipt,4)) + + bxc_over_m =-dsqrt(((vxc(ipt,1)-vxc(ipt,2))*half)**2+vxc(ipt,3)**2+vxc(ipt,4)**2) !this is bxc^(0) + bxc_over_m = bxc_over_m/m_norm + vxc1_out(ipt,1) = vxc1_out(ipt,1) + bxc_over_m*( mz1 - mdirz*m_dot_m1 ) ! + vxc1_out(ipt,2) = vxc1_out(ipt,2) + bxc_over_m*(-mz1 + mdirz*m_dot_m1 ) ! + vxc1_out(ipt,3) = vxc1_out(ipt,3) + bxc_over_m*( mx1 - mdirx*m_dot_m1 ) ! + vxc1_out(ipt,4) = vxc1_out(ipt,4) + bxc_over_m*(-my1 + mdiry*m_dot_m1 ) ! + endif + + else + if (option/=0) then + !Compute bxc^(0)/|m| from kxc (|m^(0)| -> zero limit) + bxc_over_m = half*(half*(kxc(ipt,1)+kxc(ipt,3))-kxc(ipt,2)) + vxc1_out(ipt,1)= dvdn + bxc_over_m*mz1 + vxc1_out(ipt,2)= dvdn - bxc_over_m*mz1 + vxc1_out(ipt,3)= bxc_over_m*mx1 + vxc1_out(ipt,4)=-bxc_over_m*my1 + else + vxc1_out(ipt,1)= dvdn + vxc1_out(ipt,2)= dvdn + vxc1_out(ipt,3)= zero + vxc1_out(ipt,4)= zero + endif + end if + + end do ! ipt + + case(2) + !cplex=2 case + + do ipt=1,vectsize + + if (has_mag_norm) then + m_norm=mag_norm_in(ipt) + else + m_norm=sqrt(mag(ipt,1)**2+mag(ipt,2)**2+mag(ipt,3)**2) + end if + +! see cplex=1 case for details + dvdn_re=(vxc1_in(2*ipt-1,1)+vxc1_in(2*ipt-1,2))*half + dvdn_im=(vxc1_in(2*ipt ,1)+vxc1_in(2*ipt ,2))*half + dvdz_re=(vxc1_in(2*ipt-1,1)-vxc1_in(2*ipt-1,2))*half + dvdz_im=(vxc1_in(2*ipt ,1)-vxc1_in(2*ipt ,2))*half + + mx1_re=rho1(2*ipt-1,2); mx1_im=rho1(2*ipt,2) + my1_re=rho1(2*ipt-1,3); my1_im=rho1(2*ipt,3) + mz1_re=rho1(2*ipt-1,4); mz1_im=rho1(2*ipt,4) + + if(m_norm>m_norm_min) then + + mdirx=mag(ipt,1)/m_norm; mdiry=mag(ipt,2)/m_norm; mdirz=mag(ipt,3)/m_norm + + !first two terms: + vxc1_out(2*ipt-1,1)= dvdn_re+dvdz_re*mdirz + vxc1_out(2*ipt ,1)= dvdn_im+dvdz_im*mdirz + vxc1_out(2*ipt-1,2)= dvdn_re-dvdz_re*mdirz + vxc1_out(2*ipt ,2)= dvdn_im-dvdz_im*mdirz + !NOTE: change of definition of the potential matrix components + ! vxc1_out(:,3) = V_updn + ! vxc1_out(:,4) = i.V_dnup + + ! V^12 = dvdz*mx/|m| - i.dvdz*my/|m| = (Re[dvdz]*mx/|m| + Im[dvdz]*my/|m|) + i.(Im[dvdz]*mx/|m| - Re[dvdz]*my/|m|) => vxc1(:,3) + ! V^21 = dvdz*mx/|m| + i.dvdz*my/|m| = (Re[dvdz]*mx/|m| - Im[dvdz]*my/|m|) + i.(Im[dvdz]*mx/|m| + Re[dvdz]*my/|m|) + vxc1_out(2*ipt-1,3)= dvdz_re*mdirx + dvdz_im*mdiry !Re[V^12] + vxc1_out(2*ipt ,3)= dvdz_im*mdirx - dvdz_re*mdiry !Im[V^12] + vxc1_out(2*ipt-1,4)= dvdz_re*mdirx - dvdz_im*mdiry !Re[V^21] + vxc1_out(2*ipt ,4)= dvdz_im*mdirx + dvdz_re*mdiry !Im[V^21] + if (option/=0) then + + !remaining contributions: + m_dot_m1_re= mdirx*mx1_re + mdiry*my1_re + mdirz*mz1_re + m_dot_m1_im= mdirx*mx1_im + mdiry*my1_im + mdirz*mz1_im + + bxc_over_m =-dsqrt(((vxc(ipt,1)-vxc(ipt,2))*half)**2+vxc(ipt,3)**2+vxc(ipt,4)**2) !this is bxc^(0) + bxc_over_m = bxc_over_m/m_norm + !bxc_over_m = (vxc(ipt,1)-vxc(ipt,2))*half/mag(ipt,3) + + vxc1_out(2*ipt-1,1) = vxc1_out(2*ipt-1,1) + bxc_over_m*( mz1_re - mdirz*m_dot_m1_re ) ! Re[V^11] + vxc1_out(2*ipt ,1) = vxc1_out(2*ipt ,1) + bxc_over_m*( mz1_im - mdirz*m_dot_m1_im ) ! Im[V^11] + vxc1_out(2*ipt-1,2) = vxc1_out(2*ipt-1,2) + bxc_over_m*(-mz1_re + mdirz*m_dot_m1_re ) ! Re[V^22] + vxc1_out(2*ipt ,2) = vxc1_out(2*ipt ,2) + bxc_over_m*(-mz1_im + mdirz*m_dot_m1_im ) ! Im[V^22] + + ! v12 += bxc_over_m*( (mx1 - mdirx*m_dot_m1 ) - i.( my1 - mdiry*m_dot_m1 ) ) <= see cplex=1 + ! Re[v12] += bxc_over_m*( (mx1_re - mdirx*m_dot_m1_re) + ( my1_im - mdiry*m_dot_m1_im) ) + ! Im[v12] += bxc_over_m*( (mx1_im - mdirx*m_dot_m1_im) + (-my1_re + mdiry*m_dot_m1_re) ) + vxc1_out(2*ipt-1,3) = vxc1_out(2*ipt-1,3) + bxc_over_m*( mx1_re - mdirx*m_dot_m1_re ) ! Re[V^12] + vxc1_out(2*ipt-1,3) = vxc1_out(2*ipt-1,3) + bxc_over_m*( my1_im - mdiry*m_dot_m1_im ) ! Re[V^12] + vxc1_out(2*ipt ,3) = vxc1_out(2*ipt ,3) + bxc_over_m*( mx1_im - mdirx*m_dot_m1_im ) ! Im[V^12] + vxc1_out(2*ipt ,3) = vxc1_out(2*ipt ,3) + bxc_over_m*(-my1_re + mdiry*m_dot_m1_re ) ! Im[V^12] + + ! v21 += bxc_over_m*( (mx1 - mdirx*m_dot_m1 ) + i.( my1 - mdiry*m_dot_m1 ) ) + ! Re[v21] += bxc_over_m*( (mx1_re - mdirx*m_dot_m1_re) + (-my1_im + mdiry*m_dot_m1_im) ) + ! Im[v21] += bxc_over_m*( (mx1_im - mdirx*m_dot_m1_im) + ( my1_re - mdiry*m_dot_m1_re) ) + ! the 4th component is actually not v21, but rather i.v21, this will be adjusted later + vxc1_out(2*ipt-1,4) = vxc1_out(2*ipt-1,4) + bxc_over_m*( mx1_re - mdirx*m_dot_m1_re ) ! Re[V^21] + vxc1_out(2*ipt-1,4) = vxc1_out(2*ipt-1,4) + bxc_over_m*(-my1_im + mdiry*m_dot_m1_im ) ! Re[V^21] + vxc1_out(2*ipt ,4) = vxc1_out(2*ipt ,4) + bxc_over_m*( mx1_im - mdirx*m_dot_m1_im ) ! Im[V^21] + vxc1_out(2*ipt ,4) = vxc1_out(2*ipt ,4) + bxc_over_m*( my1_re - mdiry*m_dot_m1_re ) ! Im[V^21] + endif + else + if(option/=0) then + !Compute Bxc/|m| from Kxc (|m^(0)| -> zero limit) + bxc_over_m = half*(half*(kxc(ipt,1)+kxc(ipt,3))-kxc(ipt,2)) + vxc1_out(2*ipt-1,1)= dvdn_re + bxc_over_m*mz1_re + vxc1_out(2*ipt-1,2)= dvdn_re - bxc_over_m*mz1_re + vxc1_out(2*ipt ,1)= dvdn_im + bxc_over_m*mz1_im + vxc1_out(2*ipt ,2)= dvdn_im - bxc_over_m*mz1_im + + vxc1_out(2*ipt-1,3)= bxc_over_m*(mx1_re+my1_im) + vxc1_out(2*ipt ,3)= bxc_over_m*(mx1_im-my1_re) + vxc1_out(2*ipt-1,4)= bxc_over_m*(mx1_re-my1_im) + vxc1_out(2*ipt ,4)= bxc_over_m*(mx1_im+my1_re) + else + vxc1_out(2*ipt-1,1)= dvdn_re + vxc1_out(2*ipt-1,2)= dvdn_re + vxc1_out(2*ipt ,1)= dvdn_im + vxc1_out(2*ipt ,2)= dvdn_im + + vxc1_out(2*ipt-1,3)= zero + vxc1_out(2*ipt ,3)= zero + vxc1_out(2*ipt-1,4)= zero + vxc1_out(2*ipt ,4)= zero + endif + end if + + !finally reconstruct i.V^21 from V^21 + v21tmp(1) = vxc1_out(2*ipt-1,4) !Re[V^21] + v21tmp(2) = vxc1_out(2*ipt ,4) !Im[V^21] + + vxc1_out(2*ipt-1,4) =-v21tmp(2) ! Re[i.V^21]=-Im[V^21] + vxc1_out(2*ipt ,4) = v21tmp(1) ! Im[i.V^21]= Re[V^21] + + end do ! ipt + + end select !cplex + + end select ! rotation_method + +!DBG_EXIT("COLL") + +end subroutine rotate_back_mag_dfpt +!!*** + + +!!****f* ABINIT/m_xc_noncoll/test_rotations +!! NAME +!! test_rotations +!! +!! FUNCTION +!! Test three different methods in rotate_back_mag_dfpt +!! +!! INPUTS +!! option= types of tests to perform +!! 0=> only quick tests +!! 1=> quick and slow tests +!! cplex = complex or real potential and first order magnetization +!! +!! OUTPUT +!! +!! SIDE EFFECTS +!! +!! NOTES +!! +!! For debug purposes +!! +!! SOURCE + +subroutine test_rotations(option,cplex) + +!Arguments ------------------------------------ + integer , intent(in) :: option + integer , intent(in) :: cplex + +!Local variables------------------------------- + real(dp) :: m0(1,3),vxc0(1,4),kxc(1,3) + real(dp) :: n1(cplex,4),vxc1_in(cplex,4),vxc1_out(cplex,4) + real(dp) :: delta_23(cplex,4) !,delta_12(cplex,4) + real(dp) :: m0_norm,dvdn,dvdz,err23 !,wrong_comp!,err12 + real(dp) :: theta0,phi0,theta1,phi1,err,m1_norm + integer :: dir0,dir1 +! ************************************************************************* + + DBG_ENTER("COLL") + +! if (option/=1 .and. option/=2 ) then +! write(msg,'(3a,i0)')& +!& 'The argument option should be 1 or 2,',ch10,& +!& 'however, option=',option +! ABI_BUG(msg) +! end if +! +! if (sizein<1) then +! write(msg,'(3a,i0)')& +!& ' The argument sizein should be a positive number,',ch10,& +!& ' however, sizein=',sizein +! ABI_ERROR(msg) +! end if + + DBG_EXIT("COLL") + + !write(*,*) 'VXC_NONCOLL TESTS================================================================' + if (cplex==1) then + !write(*,*) ' cplex=1------------------------------------------------------------------------' + + !write(*,*) ' TEST: simple m* orietnations, bxc^(1) part' + dvdn=zero;dvdz=1.0! + err23=zero + do dir0=1,3 + m0=zero; n1=zero + do dir1=2,4 + m0(1,dir0)=0.1 + m0_norm=sqrt(m0(1,1)**2+m0(1,2)**2+m0(1,3)**2) + n1(1,dir1)=0.8 ! any number would do here + + vxc0=zero; ! no bxc^(0) part at all + + vxc1_in(1,1)= dvdn+dvdz + vxc1_in(1,2)= dvdn-dvdz + + call rotate_back_mag_dfpt(1,vxc1_in,vxc1_out,vxc0,kxc,n1,m0,1,1,rot_method=1) + call rotate_back_mag_dfpt(1,vxc1_in,vxc1_out,vxc0,kxc,n1,m0,1,1,rot_method=2) + delta_23=vxc1_out + call rotate_back_mag_dfpt(1,vxc1_in,vxc1_out,vxc0,kxc,n1,m0,1,1,rot_method=3) + delta_23=abs(delta_23-vxc1_out) + err=max(delta_23(1,1),delta_23(1,2),delta_23(1,3),delta_23(1,4)) + if (err23 energy and potential, or 2 => also XC kernel ) +!! Warning : order=2 not yet available +!! rho_updn(npts,nspden)=spin-up and spin-down density (Hartree/bohr**3) +!! +!! OUTPUT +!! +!! dvxcdgr(npts,3)=partial derivative of the exchange-correlation +!! energy (exci*$\rho$) with respect to the spin-up (dvxcdgr(:,1)), +!! spin-down (dvxcdgr(:,2)) square of gradients of the density +!! +!! exci(npts)=exchange-correlation energy density (hartree) +!! vxci(npts,nspden)=partial derivative of the exchange-correlation energy (exci*$\rho$) +!! with respect to the spin-down (vxci(:,1)) and spin-up (vxci(:,2) densities +!! Normalization: Exc=$\int (exc(r)*\rho (r) d^3 r)$ for $\rho$(r)=electron density. +!! +!! TODO +!! Response function not coded yet, but part of it are already present +!! +!! SOURCE + +subroutine xchcth(dvxcdgr,exci,grho2_updn,ixc,npts,nspden,order,rho_updn,vxci) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: ixc,npts,nspden,order +!arrays + real(dp),intent(in) :: grho2_updn(npts,2*nspden-1),rho_updn(npts,nspden) + real(dp),intent(out) :: dvxcdgr(npts,2),exci(npts),vxci(npts,nspden) + +!Local variables------------------------------- +!scalars + integer,save :: initialized=0 + integer :: ipts,ispden + real(dp),parameter :: alpha_zeta2=one-1e-6_dp,alpha_zeta=one-1e-6_dp + real(dp),parameter :: fsec_inv=one/1.709921_dp,gammacab=0.006_dp + real(dp),parameter :: gammacsig=0.2_dp,gammax=0.004_dp + real(dp),parameter :: rsfac=0.6203504908994000_dp + real(dp),save :: factf_zeta,factfp_zeta,sixpi2_1_3,sixpi2m1_3,sq_rsfac + real(dp),save :: sq_rsfac_inv,threefourth_divpi,twom1_3 + real(dp) :: ccab0,ccab1,ccab2,ccab3,ccab4,ccsig0,ccsig1,ccsig2,ccsig3,ccsig4 + real(dp) :: coeffss,cxsig0,cxsig1,cxsig2,cxsig3,cxsig4,d2ecrs0_drs2 + real(dp) :: d2ecrs1_drs2,d2ecrs_drs2,d2ecrs_drsdzeta,d2ecrs_dzeta2 + real(dp) :: d2fzeta4_dzeta2,d2gcrs_drs2,d2macrs_drs2,decrs0_drs,decrs1_drho + real(dp) :: decrs1_drs,decrs_drs,decrs_dzeta,dfzeta4_dzeta,dgcabdss + real(dp) :: dgcrs_drs,dgcsigdss,dgxsigdss,divcab,divcsig,divx,dmacrs_drs + real(dp) :: drhoecab_drhodn,drhoecab_drhoup,drhoecrs1_drhodn,drhoecrs1_drhoup + real(dp) :: drsdrho,dssdg,dssdndg,dssdndrho,dssdrho,dssupdg,dssupdrho,ducabdss + real(dp) :: ducsigdss,duxsigdss,ec0_a1,ec0_aa,ec0_b1,ec0_b2,ec0_b3,ec0_b4 + real(dp) :: ec0_den,ec0_log,ec0_q0,ec0_q1,ec0_q1p,ec0_q1pp,ec1_a1,ec1_aa + real(dp) :: ec1_b1,ec1_b2,ec1_b3,ec1_b4,ec1_den,ec1_log,ec1_q0,ec1_q1,ec1_q1p + real(dp) :: ec1_q1pp,ecrs,ecrs0,ecrs1,ex_lsd,exc,f_zeta,factfpp_zeta + real(dp) :: fp_zeta,fpp_zeta,gcab,gcrs,gcsig,gxsig,mac_a1,mac_aa,mac_b1 + real(dp) :: mac_b2,mac_b3,mac_b4,mac_den,mac_log,mac_q0,mac_q1,mac_q1p + real(dp) :: mac_q1pp,macrs,rho,rho_inv + real(dp) :: rhoecab,rhoecrs1_dn,rhoecrs1_up,rhomo6,rhomot,rhoo6 + real(dp) :: rhotmo6,rhotmot,rhoto6,rhotot,rhotot_inv,rs,rsm1_2,sqr_rs,ss,ss_dn + real(dp) :: ss_up,ssavg,ucab,ucsig,uxsig,vxcadd,zeta,zeta4,zetm_1_3 + real(dp) :: zetp_1_3 + character(len=500) :: message +!arrays + real(dp),allocatable :: rho_updnm1_3(:,:),rhoarr(:),rhom1_3(:),zetm(:) + real(dp),allocatable :: zetmm1_3(:),zetp(:),zetpm1_3(:) +!no_abirules +!real(dp) :: delta,factor,grr,rho_dn,rho_dnm,rho_dnp,rho_up,rho_upm,rho_upp,zeta_mean + +! ************************************************************************* + +!DEBUG +!write(std_out,*)' xchcth : enter' +!write(std_out,*)' nspden=',nspden +!ENDDEBUG + + if (order/=1) then + write(message, '(a,i0)' )' Order must be 1 ; argument was ',order + ABI_BUG(message) + end if + + if(initialized==0)then + twom1_3=two**(-third) + sixpi2_1_3=(six*pi**2)**third + sixpi2m1_3=one/sixpi2_1_3 + threefourth_divpi=three_quarters*piinv + factf_zeta= one / ( two**(four/three)-two ) + factfp_zeta= four_thirds * factf_zeta * alpha_zeta2 + sq_rsfac=sqrt(rsfac) + sq_rsfac_inv=one/sq_rsfac + initialized=1 + end if + + if(ixc==16)then +! HCTH-93 parameters from table II of JCP 109, 6264 (1998). Note that there is +! an error in tables III of JCP 112, 1670 (2000) and JCP 114, 5497 (2001) for the coefficient ccab1 + cxsig0=1.09320_dp ; cxsig1=-0.744056_dp ; cxsig2=5.59920_dp ; cxsig3=-6.78549_dp ; cxsig4=4.49357_dp + ccsig0=0.222601_dp; ccsig1=-0.0338622_dp; ccsig2=-0.0125170_dp; ccsig3=-0.802496_dp; ccsig4=1.55396_dp + ccab0=0.729974_dp ; ccab1=3.35287_dp ; ccab2=-11.543_dp ; ccab3=8.08564_dp ; ccab4=-4.47857_dp + else if(ixc==17)then +! HCTH-120 parameters from table III of JCP 112, 1670 (2000) +! Note the correction of the sign of cxsig1 and ccsig1, as there is a misprint in the HCTH paper ! +! see the exchange of mail with MMarques 23 Dec 2008, and 6 Jan 2009. +! Now, the functional agrees with the libXC results + cxsig0=1.09163_dp; cxsig1=-0.7472_dp; cxsig2=5.0783_dp; cxsig3=-4.1075_dp; cxsig4=1.1717_dp + ccsig0=0.48951_dp; ccsig1=-0.2607_dp; ccsig2=0.4329_dp; ccsig3=-1.9925_dp; ccsig4=2.4853_dp + ccab0=0.51473_dp ; ccab1=6.9298_dp ; ccab2=-24.707_dp; ccab3=23.110_dp ; ccab4=-11.323_dp +! Exactly same values than in lib_xc + cxsig0=1.09163_dp; cxsig1=-0.747215_dp; cxsig2=5.07833_dp; cxsig3=-4.10746_dp; cxsig4=1.17173_dp + ccsig0=0.489508_dp; ccsig1=-0.260699_dp; ccsig2=0.432917_dp; ccsig3=-1.99247_dp; ccsig4=2.48531_dp + ccab0=0.51473_dp ; ccab1=6.92982_dp ; ccab2=-24.7073_dp; ccab3=23.1098_dp ; ccab4=-11.3234_dp + else if(ixc==26)then +! HCTH-147 parameters from table III of JCP 112, 1670 (2000) + cxsig0=1.09025_dp; cxsig1=-0.7992_dp; cxsig2=5.5721_dp ; cxsig3=-5.8676_dp; cxsig4=3.0454_dp + ccsig0=0.56258_dp; ccsig1=-0.0171_dp; ccsig2=-1.3064_dp; ccsig3= 1.0575_dp; ccsig4=0.8854_dp + ccab0=0.54235_dp ; ccab1=7.0146_dp ; ccab2=-28.382_dp ; ccab3=35.033_dp ; ccab4=-20.428_dp +! Exactly same values than in lib_xc + cxsig0=1.09025_dp; cxsig1=-0.799194_dp; cxsig2=5.57212_dp ; cxsig3=-5.86760_dp; cxsig4=3.04544_dp + ccsig0=0.562576_dp; ccsig1= 0.0171436_dp; ccsig2=-1.30636_dp; ccsig3= 1.05747_dp; ccsig4=0.885429_dp + ccab0=0.542352_dp ; ccab1=7.01464_dp ; ccab2=-28.3822_dp ; ccab3=35.0329_dp ; ccab4=-20.4284_dp + else if(ixc==27)then +! HCTH-407 parameters from table IV of JCP 114, 5497 (2001) + cxsig0=1.08184_dp; cxsig1=-0.5183_dp; cxsig2=3.4256_dp; cxsig3=-2.6290_dp; cxsig4=2.2886_dp + ccsig0=1.18777_dp; ccsig1=-2.4029_dp; ccsig2=5.6174_dp; ccsig3=-9.1792_dp; ccsig4=6.2480_dp + ccab0=0.58908_dp ; ccab1=4.4237_dp ; ccab2=-19.222_dp; ccab3=42.572_dp ; ccab4=-42.005_dp +! Exactly same values than in lib_xc + cxsig0=1.08184_dp; cxsig1=-0.518339_dp; cxsig2=3.42562_dp; cxsig3=-2.62901_dp; cxsig4=2.28855_dp + ccsig0=1.18777_dp; ccsig1=-2.40292_dp; ccsig2=5.61741_dp; ccsig3=-9.17923_dp; ccsig4=6.24798_dp + ccab0=0.589076_dp ; ccab1=4.42374_dp ; ccab2=-19.2218_dp; ccab3=42.5721_dp ; ccab4=-42.0052_dp + else + write(message, '(a,i0)' )' xchcth : ixc must be 16, 17, 26, or 27 ; argument was ',ixc + ABI_BUG(message) + end if + +!Parameters for the Perdew-Wang 92 LSD as well as LSD-RPA, +!see Table I of Phys.Rev.B 45,13244 (1992) [[cite:Perdew1992a]] + ec0_aa=0.031091_dp ; ec1_aa=0.015545_dp ; mac_aa=0.016887_dp + ec0_a1=0.21370_dp ; ec1_a1=0.20548_dp ; mac_a1=0.11125_dp + ec0_b1=7.5957_dp ; ec1_b1=14.1189_dp ; mac_b1=10.357_dp + ec0_b2=3.5876_dp ; ec1_b2=6.1977_dp ; mac_b2=3.6231_dp + ec0_b3=1.6382_dp ; ec1_b3=3.3662_dp ; mac_b3=0.88026_dp + ec0_b4=0.49294_dp ; ec1_b4=0.62517_dp ; mac_b4=0.49671_dp + +!DEBUG +!Finite-difference debugging, do not take away +!Note : here work with collinear gradients. Might be generalized ... +!debug=2 ! Choose 1 (rho grads) or 2 (grho grads) +!factor=one +!zeta_mean=0.98_dp +!zeta_mean=zero +!delta=0.000025*factor +!delta=0.0000125*factor +!if(debug/=0)then +!do ipts=1,npts,5 +!rho=ipts*0.zero*factor +!rho_up=rho*(one+zeta_mean)*half +!rho_dn=rho*(one-zeta_mean)*half +!rho_upp=rho_up+delta +!rho_upm=rho_up-delta +!rho_dnp=rho_dn+delta +!rho_dnm=rho_dn-delta +!! Here, vary rho +!if(debug==1)then +!rho_updn(ipts ,1)=rho_up ; rho_updn(ipts ,2)=rho_dn +!rho_updn(ipts+1,1)=rho_upp; rho_updn(ipts+1,2)=rho_dn +!rho_updn(ipts+2,1)=rho_upm; rho_updn(ipts+2,2)=rho_dn +!rho_updn(ipts+3,1)=rho_up ; rho_updn(ipts+3,2)=rho_dnp +!rho_updn(ipts+4,1)=rho_up ; rho_updn(ipts+4,2)=rho_dnm +!grho2_updn(ipts:ipts+4,1)=(0.2_dp*factor)**2 ! grad2 of spin up density +!grho2_updn(ipts:ipts+4,2)=(0.2_dp*factor)**2 ! grad2 of spin down density +!grho2_updn(ipts:ipts+4,3)=(0.3_dp*factor)**2 ! grad2 of total density +!else +!! Here, vary grho (interchange rho and grho) +!grho2_updn(ipts ,1)=rho_up**2 ; grho2_updn(ipts ,2)=rho_dn**2 +!grho2_updn(ipts+1,1)=rho_upp**2; grho2_updn(ipts+1,2)=rho_dn**2 +!grho2_updn(ipts+2,1)=rho_upm**2; grho2_updn(ipts+2,2)=rho_dn**2 +!grho2_updn(ipts+3,1)=rho_up**2 ; grho2_updn(ipts+3,2)=rho_dnp**2 +!grho2_updn(ipts+4,1)=rho_up**2 ; grho2_updn(ipts+4,2)=rho_dnm**2 +!grho2_updn(ipts ,3)=(ipts*0.zero*factor)**2 +!grho2_updn(ipts+1,3)=(ipts*0.zero*factor+delta)**2 +!grho2_updn(ipts+2,3)=(ipts*0.zero*factor-delta)**2 +!grho2_updn(ipts+3,3)=(ipts*0.zero*factor+delta)**2 ! identical to ipts+1 +!grho2_updn(ipts+4,3)=(ipts*0.zero*factor-delta)**2 ! identical to ipts+2 +!rho_updn(ipts:ipts+4,1)=0.2_dp*factor*(one+zeta_mean)*half ! spin up density +!rho_updn(ipts:ipts+4,2)=0.2_dp*factor*(one-zeta_mean)*half ! spin down density +!end if +!end do +!end if +!Usual option : +!nspden=2 ; order=2 +!GGA +!nspden=2 ; order=1 +!Might take also, although finite difference later is meaningless +!nspden=1 ; order=-2 +!ENDDEBUG + + if(order**2 >1)then + factfpp_zeta= third * factfp_zeta * alpha_zeta2 + end if + + ABI_MALLOC(rhoarr,(npts)) + ABI_MALLOC(rhom1_3,(npts)) + ABI_MALLOC(rho_updnm1_3,(npts,2)) + do ispden=1,nspden + call invcb(rho_updn(:,ispden),rho_updnm1_3(:,ispden),npts) + end do + if(nspden==1)then + rhoarr(:)=two*rho_updn(:,1) + rhom1_3(:)=twom1_3*rho_updnm1_3(:,1) + rho_updnm1_3(:,2)=rho_updnm1_3(:,1) + else + rhoarr(:)=rho_updn(:,1)+rho_updn(:,2) + call invcb(rhoarr,rhom1_3,npts) + ABI_MALLOC(zetm,(npts)) + ABI_MALLOC(zetmm1_3,(npts)) + ABI_MALLOC(zetp,(npts)) + ABI_MALLOC(zetpm1_3,(npts)) + do ipts=1,npts + rhotmot=rhom1_3(ipts) + rhotot_inv=rhotmot*rhotmot*rhotmot + zeta=(rho_updn(ipts,1)-rho_updn(ipts,2))*rhotot_inv + zetp(ipts)=one+zeta*alpha_zeta + zetm(ipts)=one-zeta*alpha_zeta + end do + call invcb(zetp,zetpm1_3,npts) + call invcb(zetm,zetmm1_3,npts) + end if + + if (nspden==1) then + + if(order==-2) then + + do ipts=1,npts + +! ----------------------------------------------------------------------- +! First take care of the spin-split part of the functional + exc=zero + ispden=1 + rho =rho_updn(ipts,ispden) + rhomot=rho_updnm1_3(ipts,ispden) + rho_inv=rhomot*rhomot*rhomot + +! Exchange part + ex_lsd= - threefourth_divpi * sixpi2_1_3*rhomot*rhomot*rho +! Note that this definition differs from the PBE one + coeffss=rho_inv*rho_inv*rhomot*rhomot + ss=grho2_updn(ipts,ispden)*coeffss + dssdrho=-eight*third*ss*rho_inv + dssdg=two*coeffss + + divx=one/(one+gammax*ss) + uxsig=gammax*ss*divx + duxsigdss=gammax*divx*(one-ss*gammax*divx) + + gxsig=cxsig0+uxsig*(cxsig1+uxsig*(cxsig2+uxsig*(cxsig3+uxsig*cxsig4))) + dgxsigdss=(cxsig1+uxsig*(two*cxsig2+uxsig*(three*cxsig3+uxsig*four*cxsig4)))& +& *duxsigdss + + exc=exc+ex_lsd*rho*gxsig + vxci(ipts,ispden)=ex_lsd*(four_thirds*gxsig+rho*dgxsigdss*dssdrho) + dvxcdgr(ipts,ispden)=ex_lsd*rho*dgxsigdss*dssdg + +! Spin parallel correlation part +! Note that this definition is for fully spin-polarized quantities + rs=rsfac*rhomot + rhomo6=sqrt(rhomot) + sqr_rs=sq_rsfac*rhomo6 + rhoo6=rho*rhomot*rhomot*rhomo6 + rsm1_2=sq_rsfac_inv*rhoo6 + drsdrho=-third*rs*rho_inv + + ec1_q0=-two*ec1_aa*(one+ec1_a1*rs) + ec1_q1=two*ec1_aa*(ec1_b1*sqr_rs+ec1_b2*rs+ec1_b3*rs*sqr_rs+ec1_b4*rs*rs) + ec1_q1p=ec1_aa*(ec1_b1*rsm1_2+two*ec1_b2+three*ec1_b3*sqr_rs+four*ec1_b4*rs) + ec1_den=one/(ec1_q1*ec1_q1+ec1_q1) +! ec1_log=log( one + one / ec1_q1 ) + ec1_log=-log( ec1_q1*ec1_q1*ec1_den ) + ecrs1=ec1_q0*ec1_log + decrs1_drs= -two*ec1_aa*ec1_a1*ec1_log - ec1_q0*ec1_q1p *ec1_den + decrs1_drho=ecrs1+decrs1_drs*drsdrho*rho + +! Store the LSDA corr energy and density derivative + rhoecrs1_up=rho*ecrs1 + drhoecrs1_drhoup=decrs1_drho + ss_up=ss + dssupdrho=dssdrho + dssupdg=dssdg + + divcsig=one/(one+gammacsig*ss) + ucsig=gammacsig*ss*divcsig + ducsigdss=gammacsig*divcsig*(one-ss*gammacsig*divcsig) + + gcsig=ccsig0+ucsig*(ccsig1+ucsig*(ccsig2+ucsig*(ccsig3+ucsig*ccsig4))) + dgcsigdss=(ccsig1+ucsig*(two*ccsig2+ucsig*(three*ccsig3+ucsig*four*ccsig4)))& +& *ducsigdss + +! DEBUG +! gcsig=zero +! dgcsigdss=zero +! ENDDEBUG + exc=exc+ecrs1*rho*gcsig + vxci(ipts,ispden)=vxci(ipts,ispden)+decrs1_drho*gcsig+& +& ecrs1*rho*dgcsigdss*dssdrho + dvxcdgr(ipts,ispden)=dvxcdgr(ipts,ispden)+ecrs1*rho*dgcsigdss*dssdg + + rhoecrs1_dn=rhoecrs1_up + drhoecrs1_drhodn=drhoecrs1_drhoup + ss_dn=ss_up + dssdndrho=dssupdrho + dssdndg=dssupdg + exc=exc*2 + +! ----------------------------------------------------------------------------- +! Then takes care of the LSD correlation part of the functional + + rhotot=rhoarr(ipts) + rhotmot=rhom1_3(ipts) + rhotot_inv=rhotmot*rhotmot*rhotmot + rhotmo6=sqrt(rhotmot) + rhoto6=rhotot*rhotmot*rhotmot*rhotmo6 + +! From now, the coding of the PW92 functional start. It is identical in xcpbe.f + rs=rsfac*rhotmot + sqr_rs=sq_rsfac*rhotmo6 + rsm1_2=sq_rsfac_inv*rhoto6 + +! Formulas A6-A8 of PW92LSD + ec0_q0=-2.0d0*ec0_aa*(one+ec0_a1*rs) + ec0_q1=2.0d0*ec0_aa*(ec0_b1*sqr_rs+ec0_b2*rs+ec0_b3*rs*sqr_rs+ec0_b4*rs*rs) + ec0_q1p=ec0_aa*(ec0_b1*rsm1_2+2.d0*ec0_b2+3.d0*ec0_b3*sqr_rs+4.d0*ec0_b4*rs) + ec0_den=one/(ec0_q1*ec0_q1+ec0_q1) +! ec0_log=log( one + one / ec0_q1 ) + ec0_log=-log( ec0_q1*ec0_q1*ec0_den ) + ecrs0=ec0_q0*ec0_log + decrs0_drs= -2.0d0*ec0_aa*ec0_a1*ec0_log - ec0_q0*ec0_q1p *ec0_den + + ec0_q1pp=half*ec0_aa*(-ec0_b1*rsm1_2**3+3.d0*ec0_b3*rsm1_2+8.d0*ec0_b4) + d2ecrs0_drs2= 4.0d0*ec0_aa*ec0_a1*ec0_q1p*ec0_den & +& -ec0_q0*ec0_q1pp*ec0_den & +& +ec0_q0*ec0_q1p**2*ec0_den**2*(2.d0*ec0_q1+one) + + + + mac_q0=-2.0d0*mac_aa*(one+mac_a1*rs) + mac_q1=2.0d0*mac_aa*(mac_b1*sqr_rs+mac_b2*rs+mac_b3*rs*sqr_rs+mac_b4*rs*rs) + mac_q1p=mac_aa*(mac_b1*rsm1_2+2.d0*mac_b2+3.d0*mac_b3*sqr_rs+4.d0*mac_b4*rs) + mac_den=one/(mac_q1*mac_q1+mac_q1) + mac_log=-log( mac_q1*mac_q1*mac_den ) + macrs=mac_q0*mac_log + dmacrs_drs= -2.0d0*mac_aa*mac_a1*mac_log - mac_q0*mac_q1p*mac_den + + + ecrs=ecrs0 + decrs_drs=decrs0_drs + decrs_dzeta=zero + + d2ecrs_drs2=d2ecrs0_drs2 + + d2ecrs_dzeta2=alpha_zeta**2*(-macrs) + + zeta=zero + +! At this point, the coding of the PW92 functional finishes. + +! The correlation between different spin from HCTH is now computed +! First, the part without gradient correction factor + rhoecab=ecrs*rhotot-rhoecrs1_dn-rhoecrs1_up + vxcadd=ecrs-rs*third*decrs_drs-zeta*decrs_dzeta + drhoecab_drhoup=vxcadd+decrs_dzeta-drhoecrs1_drhoup + drhoecab_drhodn=vxcadd-decrs_dzeta-drhoecrs1_drhodn + +! Now, the gradient correction factor + ssavg=half*(ss_up+ss_dn) + divcab=one/(one+gammacab*ssavg) + ucab=gammacab*ssavg*divcab + ducabdss=gammacab*divcab*(one-ssavg*gammacab*divcab) + + gcab=ccab0+ucab*(ccab1+ucab*(ccab2+ucab*(ccab3+ucab*ccab4))) + dgcabdss=(ccab1+ucab*(two*ccab2+ucab*(three*ccab3+ucab*four*ccab4)))& +& *ducabdss + + exc=exc+rhoecab*gcab + + vxci(ipts,1)=vxci(ipts,1)+drhoecab_drhoup*gcab+rhoecab*dgcabdss*half*dssupdrho + dvxcdgr(ipts,1)=dvxcdgr(ipts,1)+rhoecab*dgcabdss*half*dssupdg +! If non spin-polarized, treat spin down contribution now, similar to spin up +! vxci(ipts,2)=vxci(ipts,1) + dvxcdgr(ipts,2)=dvxcdgr(ipts,1) + +! Final division by the total density, to give the energy density + exci(ipts)=exc*rhotot_inv + + end do ! ipts=1,npts + + else if(order**2>1) then + + do ipts=1,npts + +! ----------------------------------------------------------------------- +! First take care of the spin-split part of the functional + exc=zero + ispden=1 + rho =rho_updn(ipts,ispden) + rhomot=rho_updnm1_3(ipts,ispden) + rho_inv=rhomot*rhomot*rhomot + +! Exchange part + ex_lsd= - threefourth_divpi * sixpi2_1_3*rhomot*rhomot*rho +! Note that this definition differs from the PBE one + coeffss=rho_inv*rho_inv*rhomot*rhomot + ss=grho2_updn(ipts,ispden)*coeffss + dssdrho=-eight*third*ss*rho_inv + dssdg=two*coeffss + + divx=one/(one+gammax*ss) + uxsig=gammax*ss*divx + duxsigdss=gammax*divx*(one-ss*gammax*divx) + + gxsig=cxsig0+uxsig*(cxsig1+uxsig*(cxsig2+uxsig*(cxsig3+uxsig*cxsig4))) + dgxsigdss=(cxsig1+uxsig*(two*cxsig2+uxsig*(three*cxsig3+uxsig*four*cxsig4)))& +& *duxsigdss + + exc=exc+ex_lsd*rho*gxsig + vxci(ipts,ispden)=ex_lsd*(four_thirds*gxsig+rho*dgxsigdss*dssdrho) + dvxcdgr(ipts,ispden)=ex_lsd*rho*dgxsigdss*dssdg + +! Spin parallel correlation part +! Note that this definition is for fully spin-polarized quantities + rs=rsfac*rhomot + rhomo6=sqrt(rhomot) + sqr_rs=sq_rsfac*rhomo6 + rhoo6=rho*rhomot*rhomot*rhomo6 + rsm1_2=sq_rsfac_inv*rhoo6 + drsdrho=-third*rs*rho_inv + + ec1_q0=-two*ec1_aa*(one+ec1_a1*rs) + ec1_q1=two*ec1_aa*(ec1_b1*sqr_rs+ec1_b2*rs+ec1_b3*rs*sqr_rs+ec1_b4*rs*rs) + ec1_q1p=ec1_aa*(ec1_b1*rsm1_2+two*ec1_b2+three*ec1_b3*sqr_rs+four*ec1_b4*rs) + ec1_den=one/(ec1_q1*ec1_q1+ec1_q1) +! ec1_log=log( one + one / ec1_q1 ) + ec1_log=-log( ec1_q1*ec1_q1*ec1_den ) + ecrs1=ec1_q0*ec1_log + decrs1_drs= -two*ec1_aa*ec1_a1*ec1_log - ec1_q0*ec1_q1p *ec1_den + decrs1_drho=ecrs1+decrs1_drs*drsdrho*rho + +! Store the LSDA corr energy and density derivative + rhoecrs1_up=rho*ecrs1 + drhoecrs1_drhoup=decrs1_drho + ss_up=ss + dssupdrho=dssdrho + dssupdg=dssdg + + divcsig=one/(one+gammacsig*ss) + ucsig=gammacsig*ss*divcsig + ducsigdss=gammacsig*divcsig*(one-ss*gammacsig*divcsig) + + gcsig=ccsig0+ucsig*(ccsig1+ucsig*(ccsig2+ucsig*(ccsig3+ucsig*ccsig4))) + dgcsigdss=(ccsig1+ucsig*(two*ccsig2+ucsig*(three*ccsig3+ucsig*four*ccsig4)))& +& *ducsigdss + +! DEBUG +! gcsig=zero +! dgcsigdss=zero +! ENDDEBUG + exc=exc+ecrs1*rho*gcsig + vxci(ipts,ispden)=vxci(ipts,ispden)+decrs1_drho*gcsig+& +& ecrs1*rho*dgcsigdss*dssdrho + dvxcdgr(ipts,ispden)=dvxcdgr(ipts,ispden)+ecrs1*rho*dgcsigdss*dssdg + + rhoecrs1_dn=rhoecrs1_up + drhoecrs1_drhodn=drhoecrs1_drhoup + ss_dn=ss_up + dssdndrho=dssupdrho + dssdndg=dssupdg + exc=exc*2 + +! ----------------------------------------------------------------------------- +! Then takes care of the LSD correlation part of the functional + + rhotot=rhoarr(ipts) + rhotmot=rhom1_3(ipts) + rhotot_inv=rhotmot*rhotmot*rhotmot + rhotmo6=sqrt(rhotmot) + rhoto6=rhotot*rhotmot*rhotmot*rhotmo6 + +! From now, the coding of the PW92 functional start. It is identical in xcpbe.f + rs=rsfac*rhotmot + sqr_rs=sq_rsfac*rhotmo6 + rsm1_2=sq_rsfac_inv*rhoto6 + +! Formulas A6-A8 of PW92LSD + ec0_q0=-2.0d0*ec0_aa*(one+ec0_a1*rs) + ec0_q1=2.0d0*ec0_aa*(ec0_b1*sqr_rs+ec0_b2*rs+ec0_b3*rs*sqr_rs+ec0_b4*rs*rs) + ec0_q1p=ec0_aa*(ec0_b1*rsm1_2+2.d0*ec0_b2+3.d0*ec0_b3*sqr_rs+4.d0*ec0_b4*rs) + ec0_den=one/(ec0_q1*ec0_q1+ec0_q1) +! ec0_log=log( one + one / ec0_q1 ) + ec0_log=-log( ec0_q1*ec0_q1*ec0_den ) + ecrs0=ec0_q0*ec0_log + decrs0_drs= -2.0d0*ec0_aa*ec0_a1*ec0_log - ec0_q0*ec0_q1p *ec0_den + ec0_q1pp=half*ec0_aa*(-ec0_b1*rsm1_2**3+3.d0*ec0_b3*rsm1_2+8.d0*ec0_b4) + d2ecrs0_drs2= 4.0d0*ec0_aa*ec0_a1*ec0_q1p*ec0_den & +& -ec0_q0*ec0_q1pp*ec0_den & +& +ec0_q0*ec0_q1p**2*ec0_den**2*(2.d0*ec0_q1+one) + + + ecrs=ecrs0 + decrs_drs=decrs0_drs + decrs_dzeta=zero + d2ecrs_drs2=d2ecrs0_drs2 + zeta=zero + +! At this point, the coding of the PW92 functional finishes. + +! The correlation between different spin from HCTH is now computed +! First, the part without gradient correction factor + rhoecab=ecrs*rhotot-rhoecrs1_dn-rhoecrs1_up + vxcadd=ecrs-rs*third*decrs_drs-zeta*decrs_dzeta + drhoecab_drhoup=vxcadd+decrs_dzeta-drhoecrs1_drhoup + drhoecab_drhodn=vxcadd-decrs_dzeta-drhoecrs1_drhodn + +! Now, the gradient correction factor + ssavg=half*(ss_up+ss_dn) + divcab=one/(one+gammacab*ssavg) + ucab=gammacab*ssavg*divcab + ducabdss=gammacab*divcab*(one-ssavg*gammacab*divcab) + + gcab=ccab0+ucab*(ccab1+ucab*(ccab2+ucab*(ccab3+ucab*ccab4))) + dgcabdss=(ccab1+ucab*(two*ccab2+ucab*(three*ccab3+ucab*four*ccab4)))& +& *ducabdss + + exc=exc+rhoecab*gcab + + vxci(ipts,1)=vxci(ipts,1)+drhoecab_drhoup*gcab+rhoecab*dgcabdss*half*dssupdrho + dvxcdgr(ipts,1)=dvxcdgr(ipts,1)+rhoecab*dgcabdss*half*dssupdg +! If non spin-polarized, treat spin down contribution now, similar to spin up +! vxci(ipts,2)=vxci(ipts,1) + dvxcdgr(ipts,2)=dvxcdgr(ipts,1) + +! Final division by the total density, to give the energy density + exci(ipts)=exc*rhotot_inv + + end do ! ipts=1,npts + else + + do ipts=1,npts + +! ----------------------------------------------------------------------- +! First take care of the spin-split part of the functional + exc=zero + ispden=1 + rho =rho_updn(ipts,ispden) + rhomot=rho_updnm1_3(ipts,ispden) + rho_inv=rhomot*rhomot*rhomot + +! Exchange part + ex_lsd= - threefourth_divpi * sixpi2_1_3*rhomot*rhomot*rho +! Note that this definition differs from the PBE one + coeffss=rho_inv*rho_inv*rhomot*rhomot + ss=grho2_updn(ipts,ispden)*coeffss + dssdrho=-eight*third*ss*rho_inv + dssdg=two*coeffss + + divx=one/(one+gammax*ss) + uxsig=gammax*ss*divx + duxsigdss=gammax*divx*(one-ss*gammax*divx) + + gxsig=cxsig0+uxsig*(cxsig1+uxsig*(cxsig2+uxsig*(cxsig3+uxsig*cxsig4))) + dgxsigdss=(cxsig1+uxsig*(two*cxsig2+uxsig*(three*cxsig3+uxsig*four*cxsig4)))& +& *duxsigdss + + exc=exc+ex_lsd*rho*gxsig + vxci(ipts,ispden)=ex_lsd*(four_thirds*gxsig+rho*dgxsigdss*dssdrho) + dvxcdgr(ipts,ispden)=ex_lsd*rho*dgxsigdss*dssdg + +! Spin parallel correlation part +! Note that this definition is for fully spin-polarized quantities + rs=rsfac*rhomot + rhomo6=sqrt(rhomot) + sqr_rs=sq_rsfac*rhomo6 + rhoo6=rho*rhomot*rhomot*rhomo6 + rsm1_2=sq_rsfac_inv*rhoo6 + drsdrho=-third*rs*rho_inv + + ec1_q0=-two*ec1_aa*(one+ec1_a1*rs) + ec1_q1=two*ec1_aa*(ec1_b1*sqr_rs+ec1_b2*rs+ec1_b3*rs*sqr_rs+ec1_b4*rs*rs) + ec1_q1p=ec1_aa*(ec1_b1*rsm1_2+two*ec1_b2+three*ec1_b3*sqr_rs+four*ec1_b4*rs) + ec1_den=one/(ec1_q1*ec1_q1+ec1_q1) +! ec1_log=log( one + one / ec1_q1 ) + ec1_log=-log( ec1_q1*ec1_q1*ec1_den ) + ecrs1=ec1_q0*ec1_log + decrs1_drs= -two*ec1_aa*ec1_a1*ec1_log - ec1_q0*ec1_q1p *ec1_den + decrs1_drho=ecrs1+decrs1_drs*drsdrho*rho + +! Store the LSDA corr energy and density derivative + rhoecrs1_up=rho*ecrs1 + drhoecrs1_drhoup=decrs1_drho + ss_up=ss + dssupdrho=dssdrho + dssupdg=dssdg + + divcsig=one/(one+gammacsig*ss) + ucsig=gammacsig*ss*divcsig + ducsigdss=gammacsig*divcsig*(one-ss*gammacsig*divcsig) + + gcsig=ccsig0+ucsig*(ccsig1+ucsig*(ccsig2+ucsig*(ccsig3+ucsig*ccsig4))) + dgcsigdss=(ccsig1+ucsig*(two*ccsig2+ucsig*(three*ccsig3+ucsig*four*ccsig4)))& +& *ducsigdss + +! DEBUG +! gcsig=zero +! dgcsigdss=zero +! ENDDEBUG + exc=exc+ecrs1*rho*gcsig + vxci(ipts,ispden)=vxci(ipts,ispden)+decrs1_drho*gcsig+& +& ecrs1*rho*dgcsigdss*dssdrho + dvxcdgr(ipts,ispden)=dvxcdgr(ipts,ispden)+ecrs1*rho*dgcsigdss*dssdg + + rhoecrs1_dn=rhoecrs1_up + drhoecrs1_drhodn=drhoecrs1_drhoup + ss_dn=ss_up + dssdndrho=dssupdrho + dssdndg=dssupdg + exc=exc*2 + +! ----------------------------------------------------------------------------- +! Then takes care of the LSD correlation part of the functional + + rhotot=rhoarr(ipts) + rhotmot=rhom1_3(ipts) + rhotot_inv=rhotmot*rhotmot*rhotmot + rhotmo6=sqrt(rhotmot) + rhoto6=rhotot*rhotmot*rhotmot*rhotmo6 + +! From now, the coding of the PW92 functional start. It is identical in xcpbe.f + rs=rsfac*rhotmot + sqr_rs=sq_rsfac*rhotmo6 + rsm1_2=sq_rsfac_inv*rhoto6 + +! Formulas A6-A8 of PW92LSD + ec0_q0=-2.0d0*ec0_aa*(one+ec0_a1*rs) + ec0_q1=2.0d0*ec0_aa*(ec0_b1*sqr_rs+ec0_b2*rs+ec0_b3*rs*sqr_rs+ec0_b4*rs*rs) + ec0_q1p=ec0_aa*(ec0_b1*rsm1_2+2.d0*ec0_b2+3.d0*ec0_b3*sqr_rs+4.d0*ec0_b4*rs) + ec0_den=one/(ec0_q1*ec0_q1+ec0_q1) +! ec0_log=log( one + one / ec0_q1 ) + ec0_log=-log( ec0_q1*ec0_q1*ec0_den ) + ecrs0=ec0_q0*ec0_log + decrs0_drs= -2.0d0*ec0_aa*ec0_a1*ec0_log - ec0_q0*ec0_q1p *ec0_den + + ecrs=ecrs0 + decrs_drs=decrs0_drs + decrs_dzeta=zero + zeta=zero + +! At this point, the coding of the PW92 functional finishes. + +! The correlation between different spin from HCTH is now computed +! First, the part without gradient correction factor + rhoecab=ecrs*rhotot-rhoecrs1_dn-rhoecrs1_up + vxcadd=ecrs-rs*third*decrs_drs-zeta*decrs_dzeta + drhoecab_drhoup=vxcadd+decrs_dzeta-drhoecrs1_drhoup + drhoecab_drhodn=vxcadd-decrs_dzeta-drhoecrs1_drhodn + +! Now, the gradient correction factor + ssavg=half*(ss_up+ss_dn) + divcab=one/(one+gammacab*ssavg) + ucab=gammacab*ssavg*divcab + ducabdss=gammacab*divcab*(one-ssavg*gammacab*divcab) + + gcab=ccab0+ucab*(ccab1+ucab*(ccab2+ucab*(ccab3+ucab*ccab4))) + dgcabdss=(ccab1+ucab*(two*ccab2+ucab*(three*ccab3+ucab*four*ccab4)))& +& *ducabdss + + exc=exc+rhoecab*gcab + + vxci(ipts,1)=vxci(ipts,1)+drhoecab_drhoup*gcab+rhoecab*dgcabdss*half*dssupdrho + dvxcdgr(ipts,1)=dvxcdgr(ipts,1)+rhoecab*dgcabdss*half*dssupdg +! If non spin-polarized, treat spin down contribution now, similar to spin up +! vxci(ipts,2)=vxci(ipts,1) + dvxcdgr(ipts,2)=dvxcdgr(ipts,1) + +! Final division by the total density, to give the energy density + exci(ipts)=exc*rhotot_inv + + end do ! ipts=1,npts + end if + + else if(nspden==2) then + + if(order**2>1) then + + do ipts=1,npts + +! ----------------------------------------------------------------------- +! First take care of the spin-split part of the functional + exc=zero + do ispden=1,nspden + rho =rho_updn(ipts,ispden) + rhomot=rho_updnm1_3(ipts,ispden) + rho_inv=rhomot*rhomot*rhomot + +! Exchange part + ex_lsd= - threefourth_divpi * sixpi2_1_3*rhomot*rhomot*rho +! Note that this definition differs from the PBE one + coeffss=rho_inv*rho_inv*rhomot*rhomot + ss=grho2_updn(ipts,ispden)*coeffss + dssdrho=-eight*third*ss*rho_inv + dssdg=two*coeffss + + divx=one/(one+gammax*ss) + uxsig=gammax*ss*divx + duxsigdss=gammax*divx*(one-ss*gammax*divx) + + gxsig=cxsig0+uxsig*(cxsig1+uxsig*(cxsig2+uxsig*(cxsig3+uxsig*cxsig4))) + dgxsigdss=(cxsig1+uxsig*(two*cxsig2+uxsig*(three*cxsig3+uxsig*four*cxsig4)))& +& *duxsigdss + + exc=exc+ex_lsd*rho*gxsig + vxci(ipts,ispden)=ex_lsd*(four_thirds*gxsig+rho*dgxsigdss*dssdrho) + dvxcdgr(ipts,ispden)=ex_lsd*rho*dgxsigdss*dssdg + +! Spin parallel correlation part +! Note that this definition is for fully spin-polarized quantities + rs=rsfac*rhomot + rhomo6=sqrt(rhomot) + sqr_rs=sq_rsfac*rhomo6 + rhoo6=rho*rhomot*rhomot*rhomo6 + rsm1_2=sq_rsfac_inv*rhoo6 + drsdrho=-third*rs*rho_inv + + ec1_q0=-two*ec1_aa*(one+ec1_a1*rs) + ec1_q1=two*ec1_aa*(ec1_b1*sqr_rs+ec1_b2*rs+ec1_b3*rs*sqr_rs+ec1_b4*rs*rs) + ec1_q1p=ec1_aa*(ec1_b1*rsm1_2+two*ec1_b2+three*ec1_b3*sqr_rs+four*ec1_b4*rs) + ec1_den=one/(ec1_q1*ec1_q1+ec1_q1) +! ec1_log=log( one + one / ec1_q1 ) + ec1_log=-log( ec1_q1*ec1_q1*ec1_den ) + ecrs1=ec1_q0*ec1_log + decrs1_drs= -two*ec1_aa*ec1_a1*ec1_log - ec1_q0*ec1_q1p *ec1_den + decrs1_drho=ecrs1+decrs1_drs*drsdrho*rho + +! Store the LSDA corr energy and density derivative + if(ispden==1)then + rhoecrs1_up=rho*ecrs1 + drhoecrs1_drhoup=decrs1_drho + ss_up=ss + dssupdrho=dssdrho + dssupdg=dssdg + else + rhoecrs1_dn=rho*ecrs1 + drhoecrs1_drhodn=decrs1_drho + ss_dn=ss + dssdndrho=dssdrho + dssdndg=dssdg + end if + + divcsig=one/(one+gammacsig*ss) + ucsig=gammacsig*ss*divcsig + ducsigdss=gammacsig*divcsig*(one-ss*gammacsig*divcsig) + + gcsig=ccsig0+ucsig*(ccsig1+ucsig*(ccsig2+ucsig*(ccsig3+ucsig*ccsig4))) + dgcsigdss=(ccsig1+ucsig*(two*ccsig2+ucsig*(three*ccsig3+ucsig*four*ccsig4)))& +& *ducsigdss + +! DEBUG +! gcsig=zero +! dgcsigdss=zero +! ENDDEBUG + exc=exc+ecrs1*rho*gcsig + vxci(ipts,ispden)=vxci(ipts,ispden)+decrs1_drho*gcsig+& +& ecrs1*rho*dgcsigdss*dssdrho + dvxcdgr(ipts,ispden)=dvxcdgr(ipts,ispden)+ecrs1*rho*dgcsigdss*dssdg + + end do + +! ----------------------------------------------------------------------------- +! Then takes care of the LSD correlation part of the functional + + rhotot=rhoarr(ipts) + rhotmot=rhom1_3(ipts) + rhotot_inv=rhotmot*rhotmot*rhotmot + rhotmo6=sqrt(rhotmot) + rhoto6=rhotot*rhotmot*rhotmot*rhotmo6 + +! From now, the coding of the PW92 functional start. It is identical in xcpbe.f + rs=rsfac*rhotmot + sqr_rs=sq_rsfac*rhotmo6 + rsm1_2=sq_rsfac_inv*rhoto6 + +! Formulas A6-A8 of PW92LSD + ec0_q0=-2.0d0*ec0_aa*(one+ec0_a1*rs) + ec0_q1=2.0d0*ec0_aa*(ec0_b1*sqr_rs+ec0_b2*rs+ec0_b3*rs*sqr_rs+ec0_b4*rs*rs) + ec0_q1p=ec0_aa*(ec0_b1*rsm1_2+2.d0*ec0_b2+3.d0*ec0_b3*sqr_rs+4.d0*ec0_b4*rs) + ec0_den=one/(ec0_q1*ec0_q1+ec0_q1) +! ec0_log=log( one + one / ec0_q1 ) + ec0_log=-log( ec0_q1*ec0_q1*ec0_den ) + ecrs0=ec0_q0*ec0_log + decrs0_drs= -2.0d0*ec0_aa*ec0_a1*ec0_log - ec0_q0*ec0_q1p *ec0_den + ec0_q1pp=half*ec0_aa*(-ec0_b1*rsm1_2**3+3.d0*ec0_b3*rsm1_2+8.d0*ec0_b4) + d2ecrs0_drs2= 4.0d0*ec0_aa*ec0_a1*ec0_q1p*ec0_den & +& -ec0_q0*ec0_q1pp*ec0_den & +& +ec0_q0*ec0_q1p**2*ec0_den**2*(2.d0*ec0_q1+one) + + mac_q0=-2.0d0*mac_aa*(one+mac_a1*rs) + mac_q1=2.0d0*mac_aa*(mac_b1*sqr_rs+mac_b2*rs+mac_b3*rs*sqr_rs+mac_b4*rs*rs) + mac_q1p=mac_aa*(mac_b1*rsm1_2+2.d0*mac_b2+3.d0*mac_b3*sqr_rs+4.d0*mac_b4*rs) + mac_den=one/(mac_q1*mac_q1+mac_q1) + mac_log=-log( mac_q1*mac_q1*mac_den ) + macrs=mac_q0*mac_log + dmacrs_drs= -2.0d0*mac_aa*mac_a1*mac_log - mac_q0*mac_q1p*mac_den + + zeta=(rho_updn(ipts,1)-rho_updn(ipts,2))*rhotot_inv + ec1_q0=-two*ec1_aa*(one+ec1_a1*rs) + ec1_q1=two*ec1_aa*(ec1_b1*sqr_rs+ec1_b2*rs+ec1_b3*rs*sqr_rs+ec1_b4*rs*rs) + ec1_q1p=ec1_aa*(ec1_b1*rsm1_2+two*ec1_b2+three*ec1_b3*sqr_rs+four*ec1_b4*rs) + ec1_den=one/(ec1_q1*ec1_q1+ec1_q1) +! ec1_log=log( one + one / ec1_q1 ) + ec1_log=-log( ec1_q1*ec1_q1*ec1_den ) + ecrs1=ec1_q0*ec1_log + decrs1_drs= -two*ec1_aa*ec1_a1*ec1_log - ec1_q0*ec1_q1p *ec1_den + +! alpha_zeta is introduced in order to remove singularities for fully +! polarized systems. + zetp_1_3=(one+zeta*alpha_zeta)*zetpm1_3(ipts)**2 + zetm_1_3=(one-zeta*alpha_zeta)*zetmm1_3(ipts)**2 + + f_zeta=( (one+zeta*alpha_zeta2)*zetp_1_3 + & +& (one-zeta*alpha_zeta2)*zetm_1_3 - 2.0d0 ) * factf_zeta + fp_zeta=( zetp_1_3 - zetm_1_3 ) * factfp_zeta + zeta4=zeta**4 + gcrs=ecrs1-ecrs0+macrs*fsec_inv +! ecrs=ecrs0+f_zeta*(-macrs*(one-zeta4)*fsec_inv+(ecrs1-ecrs0)*zeta4) + ecrs=ecrs0+f_zeta*(zeta4*gcrs-macrs*fsec_inv) + + dgcrs_drs=decrs1_drs-decrs0_drs+dmacrs_drs*fsec_inv +! decrs_drs=decrs0_drs+f_zeta*& +! & (-dmacrs_drs*(one-zeta4)*fsec_inv+(decrs1_drs-decrs0_drs)*zeta4) + decrs_drs=decrs0_drs+f_zeta*(zeta4*dgcrs_drs-dmacrs_drs*fsec_inv) + dfzeta4_dzeta=4.0d0*zeta**3*f_zeta+fp_zeta*zeta4 + decrs_dzeta=dfzeta4_dzeta*gcrs-fp_zeta*macrs*fsec_inv + + ec1_q1pp=half*ec1_aa*(-ec1_b1*rsm1_2**3+3.d0*ec1_b3*rsm1_2+8.d0*ec1_b4) + d2ecrs1_drs2= 4.0d0*ec1_aa*ec1_a1*ec1_q1p*ec1_den & +& -ec1_q0*ec1_q1pp*ec1_den & +& +ec1_q0*ec1_q1p**2*ec1_den**2*(2.d0*ec1_q1+one) + + mac_q1pp=half*mac_aa*(-mac_b1*rsm1_2**3+3.d0*mac_b3*rsm1_2+8.d0*mac_b4) + d2macrs_drs2= 4.0d0*mac_aa*mac_a1*mac_q1p*mac_den & +& -mac_q0*mac_q1pp*mac_den & +& +mac_q0*mac_q1p**2*mac_den**2*(2.d0*mac_q1+one) + + d2gcrs_drs2=d2ecrs1_drs2-d2ecrs0_drs2+d2macrs_drs2*fsec_inv + fpp_zeta=(zetpm1_3(ipts)**2+zetmm1_3(ipts)**2) * factfpp_zeta + d2fzeta4_dzeta2=12.0d0*zeta**2*f_zeta & +& + 8.0d0*zeta**3*fp_zeta & +& + zeta4 *fpp_zeta + + d2ecrs_drs2=d2ecrs0_drs2+& +& f_zeta*(zeta4*d2gcrs_drs2-d2macrs_drs2*fsec_inv) + d2ecrs_drsdzeta=dfzeta4_dzeta*dgcrs_drs-fp_zeta*dmacrs_drs*fsec_inv + d2ecrs_dzeta2=d2fzeta4_dzeta2*gcrs-fpp_zeta*macrs*fsec_inv + + +! At this point, the coding of the PW92 functional finishes. + +! The correlation between different spin from HCTH is now computed +! First, the part without gradient correction factor + rhoecab=ecrs*rhotot-rhoecrs1_dn-rhoecrs1_up + vxcadd=ecrs-rs*third*decrs_drs-zeta*decrs_dzeta + drhoecab_drhoup=vxcadd+decrs_dzeta-drhoecrs1_drhoup + drhoecab_drhodn=vxcadd-decrs_dzeta-drhoecrs1_drhodn + +! Now, the gradient correction factor + ssavg=half*(ss_up+ss_dn) + divcab=one/(one+gammacab*ssavg) + ucab=gammacab*ssavg*divcab + ducabdss=gammacab*divcab*(one-ssavg*gammacab*divcab) + + gcab=ccab0+ucab*(ccab1+ucab*(ccab2+ucab*(ccab3+ucab*ccab4))) + dgcabdss=(ccab1+ucab*(two*ccab2+ucab*(three*ccab3+ucab*four*ccab4)))& +& *ducabdss + + exc=exc+rhoecab*gcab + + vxci(ipts,1)=vxci(ipts,1)+drhoecab_drhoup*gcab+rhoecab*dgcabdss*half*dssupdrho + dvxcdgr(ipts,1)=dvxcdgr(ipts,1)+rhoecab*dgcabdss*half*dssupdg + vxci(ipts,2)=vxci(ipts,2)+drhoecab_drhodn*gcab+rhoecab*dgcabdss*half*dssdndrho + dvxcdgr(ipts,2)=dvxcdgr(ipts,2)+rhoecab*dgcabdss*half*dssdndg + +! Final division by the total density, to give the energy density + exci(ipts)=exc*rhotot_inv + + end do ! ipts=1,npts + + else + + do ipts=1,npts + +! ----------------------------------------------------------------------- +! First take care of the spin-split part of the functional + exc=zero + do ispden=1,nspden + rho =rho_updn(ipts,ispden) + rhomot=rho_updnm1_3(ipts,ispden) + rho_inv=rhomot*rhomot*rhomot + +! Exchange part + ex_lsd= - threefourth_divpi * sixpi2_1_3*rhomot*rhomot*rho +! Note that this definition differs from the PBE one + coeffss=rho_inv*rho_inv*rhomot*rhomot + ss=grho2_updn(ipts,ispden)*coeffss + dssdrho=-eight*third*ss*rho_inv + dssdg=two*coeffss + + divx=one/(one+gammax*ss) + uxsig=gammax*ss*divx + duxsigdss=gammax*divx*(one-ss*gammax*divx) + + gxsig=cxsig0+uxsig*(cxsig1+uxsig*(cxsig2+uxsig*(cxsig3+uxsig*cxsig4))) + dgxsigdss=(cxsig1+uxsig*(two*cxsig2+uxsig*(three*cxsig3+uxsig*four*cxsig4)))& +& *duxsigdss + + exc=exc+ex_lsd*rho*gxsig + vxci(ipts,ispden)=ex_lsd*(four_thirds*gxsig+rho*dgxsigdss*dssdrho) + dvxcdgr(ipts,ispden)=ex_lsd*rho*dgxsigdss*dssdg + +! Spin parallel correlation part +! Note that this definition is for fully spin-polarized quantities + rs=rsfac*rhomot + rhomo6=sqrt(rhomot) + sqr_rs=sq_rsfac*rhomo6 + rhoo6=rho*rhomot*rhomot*rhomo6 + rsm1_2=sq_rsfac_inv*rhoo6 + drsdrho=-third*rs*rho_inv + + ec1_q0=-two*ec1_aa*(one+ec1_a1*rs) + ec1_q1=two*ec1_aa*(ec1_b1*sqr_rs+ec1_b2*rs+ec1_b3*rs*sqr_rs+ec1_b4*rs*rs) + ec1_q1p=ec1_aa*(ec1_b1*rsm1_2+two*ec1_b2+three*ec1_b3*sqr_rs+four*ec1_b4*rs) + ec1_den=one/(ec1_q1*ec1_q1+ec1_q1) +! ec1_log=log( one + one / ec1_q1 ) + ec1_log=-log( ec1_q1*ec1_q1*ec1_den ) + ecrs1=ec1_q0*ec1_log + decrs1_drs= -two*ec1_aa*ec1_a1*ec1_log - ec1_q0*ec1_q1p *ec1_den + decrs1_drho=ecrs1+decrs1_drs*drsdrho*rho + +! Store the LSDA corr energy and density derivative + if(ispden==1)then + rhoecrs1_up=rho*ecrs1 + drhoecrs1_drhoup=decrs1_drho + ss_up=ss + dssupdrho=dssdrho + dssupdg=dssdg + else + rhoecrs1_dn=rho*ecrs1 + drhoecrs1_drhodn=decrs1_drho + ss_dn=ss + dssdndrho=dssdrho + dssdndg=dssdg + end if + + divcsig=one/(one+gammacsig*ss) + ucsig=gammacsig*ss*divcsig + ducsigdss=gammacsig*divcsig*(one-ss*gammacsig*divcsig) + + gcsig=ccsig0+ucsig*(ccsig1+ucsig*(ccsig2+ucsig*(ccsig3+ucsig*ccsig4))) + dgcsigdss=(ccsig1+ucsig*(two*ccsig2+ucsig*(three*ccsig3+ucsig*four*ccsig4)))& +& *ducsigdss + +! DEBUG +! gcsig=zero +! dgcsigdss=zero +! ENDDEBUG + exc=exc+ecrs1*rho*gcsig + vxci(ipts,ispden)=vxci(ipts,ispden)+decrs1_drho*gcsig+& +& ecrs1*rho*dgcsigdss*dssdrho + dvxcdgr(ipts,ispden)=dvxcdgr(ipts,ispden)+ecrs1*rho*dgcsigdss*dssdg + + end do + +! ----------------------------------------------------------------------------- +! Then takes care of the LSD correlation part of the functional + + rhotot=rhoarr(ipts) + rhotmot=rhom1_3(ipts) + rhotot_inv=rhotmot*rhotmot*rhotmot + rhotmo6=sqrt(rhotmot) + rhoto6=rhotot*rhotmot*rhotmot*rhotmo6 + +! From now, the coding of the PW92 functional start. It is identical in xcpbe.f + rs=rsfac*rhotmot + sqr_rs=sq_rsfac*rhotmo6 + rsm1_2=sq_rsfac_inv*rhoto6 + +! Formulas A6-A8 of PW92LSD + ec0_q0=-2.0d0*ec0_aa*(one+ec0_a1*rs) + ec0_q1=2.0d0*ec0_aa*(ec0_b1*sqr_rs+ec0_b2*rs+ec0_b3*rs*sqr_rs+ec0_b4*rs*rs) + ec0_q1p=ec0_aa*(ec0_b1*rsm1_2+2.d0*ec0_b2+3.d0*ec0_b3*sqr_rs+4.d0*ec0_b4*rs) + ec0_den=one/(ec0_q1*ec0_q1+ec0_q1) +! ec0_log=log( one + one / ec0_q1 ) + ec0_log=-log( ec0_q1*ec0_q1*ec0_den ) + ecrs0=ec0_q0*ec0_log + decrs0_drs= -2.0d0*ec0_aa*ec0_a1*ec0_log - ec0_q0*ec0_q1p *ec0_den + + mac_q0=-2.0d0*mac_aa*(one+mac_a1*rs) + mac_q1=2.0d0*mac_aa*(mac_b1*sqr_rs+mac_b2*rs+mac_b3*rs*sqr_rs+mac_b4*rs*rs) + mac_q1p=mac_aa*(mac_b1*rsm1_2+2.d0*mac_b2+3.d0*mac_b3*sqr_rs+4.d0*mac_b4*rs) + mac_den=one/(mac_q1*mac_q1+mac_q1) + mac_log=-log( mac_q1*mac_q1*mac_den ) + macrs=mac_q0*mac_log + dmacrs_drs= -2.0d0*mac_aa*mac_a1*mac_log - mac_q0*mac_q1p*mac_den + + zeta=(rho_updn(ipts,1)-rho_updn(ipts,2))*rhotot_inv + ec1_q0=-two*ec1_aa*(one+ec1_a1*rs) + ec1_q1=two*ec1_aa*(ec1_b1*sqr_rs+ec1_b2*rs+ec1_b3*rs*sqr_rs+ec1_b4*rs*rs) + ec1_q1p=ec1_aa*(ec1_b1*rsm1_2+two*ec1_b2+three*ec1_b3*sqr_rs+four*ec1_b4*rs) + ec1_den=one/(ec1_q1*ec1_q1+ec1_q1) +! ec1_log=log( one + one / ec1_q1 ) + ec1_log=-log( ec1_q1*ec1_q1*ec1_den ) + ecrs1=ec1_q0*ec1_log + decrs1_drs= -two*ec1_aa*ec1_a1*ec1_log - ec1_q0*ec1_q1p *ec1_den + +! alpha_zeta is introduced in order to remove singularities for fully +! polarized systems. + zetp_1_3=(one+zeta*alpha_zeta)*zetpm1_3(ipts)**2 + zetm_1_3=(one-zeta*alpha_zeta)*zetmm1_3(ipts)**2 + + f_zeta=( (one+zeta*alpha_zeta2)*zetp_1_3 + & +& (one-zeta*alpha_zeta2)*zetm_1_3 - 2.0d0 ) * factf_zeta + fp_zeta=( zetp_1_3 - zetm_1_3 ) * factfp_zeta + zeta4=zeta**4 + gcrs=ecrs1-ecrs0+macrs*fsec_inv +! ecrs=ecrs0+f_zeta*(-macrs*(one-zeta4)*fsec_inv+(ecrs1-ecrs0)*zeta4) + ecrs=ecrs0+f_zeta*(zeta4*gcrs-macrs*fsec_inv) + + dgcrs_drs=decrs1_drs-decrs0_drs+dmacrs_drs*fsec_inv +! decrs_drs=decrs0_drs+f_zeta*& +! & (-dmacrs_drs*(one-zeta4)*fsec_inv+(decrs1_drs-decrs0_drs)*zeta4) + decrs_drs=decrs0_drs+f_zeta*(zeta4*dgcrs_drs-dmacrs_drs*fsec_inv) + dfzeta4_dzeta=4.0d0*zeta**3*f_zeta+fp_zeta*zeta4 + decrs_dzeta=dfzeta4_dzeta*gcrs-fp_zeta*macrs*fsec_inv + +! At this point, the coding of the PW92 functional finishes. + +! The correlation between different spin from HCTH is now computed +! First, the part without gradient correction factor + rhoecab=ecrs*rhotot-rhoecrs1_dn-rhoecrs1_up + vxcadd=ecrs-rs*third*decrs_drs-zeta*decrs_dzeta + drhoecab_drhoup=vxcadd+decrs_dzeta-drhoecrs1_drhoup + drhoecab_drhodn=vxcadd-decrs_dzeta-drhoecrs1_drhodn + +! Now, the gradient correction factor + ssavg=half*(ss_up+ss_dn) + divcab=one/(one+gammacab*ssavg) + ucab=gammacab*ssavg*divcab + ducabdss=gammacab*divcab*(one-ssavg*gammacab*divcab) + + gcab=ccab0+ucab*(ccab1+ucab*(ccab2+ucab*(ccab3+ucab*ccab4))) + dgcabdss=(ccab1+ucab*(two*ccab2+ucab*(three*ccab3+ucab*four*ccab4)))& +& *ducabdss + + exc=exc+rhoecab*gcab + + vxci(ipts,1)=vxci(ipts,1)+drhoecab_drhoup*gcab+rhoecab*dgcabdss*half*dssupdrho + dvxcdgr(ipts,1)=dvxcdgr(ipts,1)+rhoecab*dgcabdss*half*dssupdg + vxci(ipts,2)=vxci(ipts,2)+drhoecab_drhodn*gcab+rhoecab*dgcabdss*half*dssdndrho + dvxcdgr(ipts,2)=dvxcdgr(ipts,2)+rhoecab*dgcabdss*half*dssdndg + +! Final division by the total density, to give the energy density + exci(ipts)=exc*rhotot_inv + + end do ! ipts=1,npts + + end if + + else +! Disallowed value for nspden + write(message, '(3a,i0)' )& +& ' Argument nspden must be 1 or 2; ',ch10,& +& ' Value provided as argument was ',nspden + ABI_BUG(message) + end if + +!DEBUG +!Finite-difference debugging, do not take away +!Beware that dvxcdgr(:,3) no longer exists +!if(debug/=0)then +!do ipts=1,npts,5 + +!rho=rho_updn(ipts,1)+rho_updn(ipts,2) +!write(std_out,'(a,i5,a,es16.8)' ) ' Point number',ipts,' with rho=',rho + +!! For rho +!if(debug==1)then +!write(std_out,'(3es16.8)' )exci(ipts)*rho,vxci(ipts,1),vxci(ipts,2) +!else +!! For grho2 +!write(std_out,'(4es16.8)' )exci(ipts)*rho,dvxcdgr(ipts,1),& +!& dvxcdgr(ipts,2),dvxcdgr(ipts,3) +!end if + +!if(debug==1)then +!! For rho +!write(std_out,'(3es16.8)' )exci(ipts)*rho,& +!& ( exci(ipts+1)*(rho+delta) - exci(ipts+2)*(rho-delta) )/2.d0/delta,& +!& ( exci(ipts+3)*(rho+delta) - exci(ipts+4)*(rho-delta) )/2.d0/delta +!write(std_out,'(3es16.8)' )& +!& ( vxci(ipts+1,1) - vxci(ipts+2,1) )/2.d0/delta,& +!& ( vxci(ipts+3,1) - vxci(ipts+4,1) )/2.d0/delta,& +!& ( vxci(ipts+3,2) - vxci(ipts+4,2) )/2.d0/delta +!write(std_out,'(4es16.8)' )& +!& ( dvxcdgr(ipts+1,1) - dvxcdgr(ipts+2,1) )/2.d0/delta,& +!& ( dvxcdgr(ipts+3,2) - dvxcdgr(ipts+4,2) )/2.d0/delta,& +!& ( dvxcdgr(ipts+1,3) - dvxcdgr(ipts+2,3) )/2.d0/delta,& +!& ( dvxcdgr(ipts+3,3) - dvxcdgr(ipts+4,3) )/2.d0/delta +!else +!! For grho2 (should distinguish exchange and correlation ...) +!grr=sqrt(grho2_updn(ipts,1)) ! Analysis of exchange +!grr=sqrt(grho2_updn(ipts,3)) ! Analysis of correlation +!write(std_out,'(3es16.8)' )exci(ipts)*rho,& +!& ( exci(ipts+1)*rho - exci(ipts+2)*rho )/2.d0/delta/grr,& +!& ( exci(ipts+3)*rho - exci(ipts+4)*rho )/2.d0/delta/grr +!write(std_out,'(3es16.8)' )& +!& ( vxci(ipts+1,1) - vxci(ipts+2,1) )/2.d0/delta/grr,& +!& ( vxci(ipts+3,1) - vxci(ipts+4,1) )/2.d0/delta/grr,& +!& ( vxci(ipts+3,2) - vxci(ipts+4,2) )/2.d0/delta/grr +!write(std_out,'(4es16.8)' )& +!& ( dvxcdgr(ipts+1,1) - dvxcdgr(ipts+2,1) )/2.d0/delta/grr,& +!& ( dvxcdgr(ipts+3,2) - dvxcdgr(ipts+4,2) )/2.d0/delta/grr,& +!& ( dvxcdgr(ipts+1,3) - dvxcdgr(ipts+2,3) )/2.d0/delta/grr,& +!& ( dvxcdgr(ipts+3,3) - dvxcdgr(ipts+4,3) )/2.d0/delta/grr +!end if +!end do +!stop +!end if +!ENDDEBUG + + ABI_FREE(rhoarr) + ABI_FREE(rhom1_3) + ABI_FREE(rho_updnm1_3) + if(nspden==2) then + ABI_FREE(zetm) + ABI_FREE(zetmm1_3) + ABI_FREE(zetp) + ABI_FREE(zetpm1_3) + end if + +!DEBUG +!write(std_out,*)' xchcth : exit' +!write(std_out,*)' nspden=',nspden +!if(order==2)stop +!ENDDEBUG + +end subroutine xchcth +!!*** + +end module m_xchcth +!!*** diff --git a/GX-PAW/common/src/33_xc_lowlevel/m_xchcth.o b/GX-PAW/common/src/33_xc_lowlevel/m_xchcth.o new file mode 100644 index 00000000..80f1eeb0 Binary files /dev/null and b/GX-PAW/common/src/33_xc_lowlevel/m_xchcth.o differ diff --git a/GX-PAW/common/src/33_xc_lowlevel/m_xciit.F90 b/GX-PAW/common/src/33_xc_lowlevel/m_xciit.F90 new file mode 100644 index 00000000..d91cee63 --- /dev/null +++ b/GX-PAW/common/src/33_xc_lowlevel/m_xciit.F90 @@ -0,0 +1,249 @@ +!!****m* ABINIT/m_xciit +!! NAME +!! m_xciit +!! +!! FUNCTION +!! Exchange-correlation at finite temperature of an electron gas +!! Ichimaru S., Iyetomi H., Tanaka S., Phys. Rep. 149, 91-205 (1987) [[cite:Ichimaru1987]] +!! +!! COPYRIGHT +!! Copyright (C) 2002-2024 ABINIT group (JFD,LK) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" + +module m_xciit + + use defs_basis + use m_errors + + implicit none + + private +!!*** + + public :: xciit +!!*** + +contains +!!*** + +!!****f* ABINIT/xciit +!! NAME +!! xciit +!! +!! FUNCTION +!! Exchange-correlation at finite temperature of an electron gas +!! Ichimaru S., Iyetomi H., Tanaka S., Phys. Rep. 149, 91-205 (1987) [[cite:Ichimaru1987]] +!! +!! INPUTS +!! temp= (electronic) temperature +!! npt=number of real space points +!! order=gives the maximal derivative of Exc computed. +!! rspts(npt)=Wigner-Seitz radii at each point +!! +!! OUTPUT +!! exc(npt)=exchange-correlation energy density +!! fxc(npt)=exchange-correlation free energy at finite temperature +!! vxc(npt)=exchange-correlation potential +!! --- optional output --- +!! [dvxc(npt)]=partial second derivatives of the xc energy +!! +!! SOURCE + +subroutine xciit(exc,fxc,npt,order,rspts,temp,vxc, & +& dvxc)!Optional argument + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: npt,order + real(dp),intent(in) :: temp +!arrays + real(dp),intent(in) :: rspts(npt) + real(dp),intent(out) :: exc(npt),fxc(npt),vxc(npt) + real(dp),intent(out),optional :: dvxc(npt) + +!Local variables------------------------------- +!scalars + integer :: ipt + real(dp) :: ef,deltavxc,Gamma,rs,rsm1,tt + character(len=500) :: msg + +! ************************************************************************* + +!Checks the values of order + if(order<0.or.order>2)then + write(msg, '(4a,i3,a)' ) ch10,& +& 'With Ishimaru-Iyetomi-Tanka xc functional, the only',ch10,& +& 'allowed values for order are 0, 1 or 2, while it is found to be ',order,'.' + ABI_BUG(msg) + end if + +!Loop over grid points + do ipt=1,npt + + rs=rspts(ipt) + rsm1=one/rs +! Step for the Vxc computation + deltavxc=0.01_dp +! Compute ef + ef=0.5_dp*(9.0_dp*pi/4.0_dp)**(2.0_dp/3.0_dp)*rsm1**2 +! Compute temperature + tt=max(temp/ef,tol12) +! Compute Gamma + Gamma=one/(tt*ef)/rs + +! Exchange-correlation of Ichimaru functional + fxc(ipt)= fexsGamma(Gamma,tt)*rsm1 + exc(ipt)=fxc(ipt) - tdexcsdtiit(rs,tt); + vxc(ipt)=(8.0_dp*(Fxc_iit(rs,tt,deltavxc)-Fxc_iit(rs,tt,-deltavxc)) & +& -(Fxc_iit(rs,tt,two*deltavxc)-Fxc_iit(rs,tt,-two*deltavxc)))/ & +& (12.0_dp*deltavxc*3.0_dp/(4.0_dp*pi)/rs**3) + if (order==2) then + dvxc(ipt)=(-30.0_dp*Fxc_iit(rs,tt,zero)+16.0_dp*(Fxc_iit(rs,tt,deltavxc)+Fxc_iit(rs,tt,-deltavxc)) & +& -(Fxc_iit(rs,tt,two*deltavxc)+Fxc_iit(rs,tt,two*deltavxc)))/ & +& (12.0_dp*(deltavxc*3.0_dp/(4.0_dp*pi)/rs**3)**2) + end if + end do + + CONTAINS +!!*** + +!!****f* ABINIT/fexsGamma +!! +!! NAME +!! fexsGamma +!! +!! FUNCTION +!! Free energy for the IIT finite temperautre XC functional +!! +!! INPUTS +!! Gamma= ? +!! t=temperature +!! +!! OUTPUT +!! fexsGamma=free energy +!! +!! SOURCE + + function fexsGamma(Gamma,t) + +!Arguments ------------------------------------ + real(dp) :: fexsGamma + real(dp),intent(in) :: Gamma,t +!Local variables------------------------------- + real(dp) :: lambda + real(dp) :: tanht,tanhst + real(dp) :: a,b,c,d,e + real(dp) :: bmcdse,amcse,sqrt4emd2 + +! ************************************************************************* + + lambda=(4.0_dp/(9.0_dp*pi))**(one/3.0_dp) + tanht=tanh(one/t) + tanhst=tanh(one/sqrt(t)) + + a=one/(pi*lambda)*(0.75_dp+3.04363_dp*t**2-0.09227_dp*t**3+1.7035_dp*t**4)/(one+8.31051_dp*t**2+5.1105_dp*t**4)*tanht + b=(0.341308_dp+12.070873_dp*t**2+1.148889_dp*t**4)/(one+10.495346_dp*t**2+1.326623_dp*t**4)*sqrt(t)*tanhst + e=(0.539409_dp+2.522206_dp*t**2+0.178484_dp*t**4)/(one+2.555501_dp*t**2+0.146319_dp*t**4)*t*tanht + c=(0.872496_dp+0.025248_dp*exp(-1./t))*e + d=(0.614925_dp+16.996055_dp*t**2+1.489056_dp*t**4)/(one+10.10935_dp*t**2+1.22184_dp*t**4)*sqrt(t)*tanhst + + bmcdse=b-c*d/e + amcse=a-c/e + sqrt4emd2=sqrt(4.0_dp*e-d**2) + + fexsGamma=-one/Gamma*(c/e*Gamma+2.0_dp/e*bmcdse*sqrt(Gamma)+one/e*(amcse-d/e*bmcdse)*log(e*Gamma+d*sqrt(Gamma)+one)- & +& 2.0_dp/(e*sqrt4emd2)*(d*amcse+(2.0_dp-d**2/e)*bmcdse)*(atan((2.0_dp*e*sqrt(Gamma)+d)/sqrt4emd2)-atan(d/sqrt4emd2))) + + end function fexsGamma +!!*** + +!!****f* ABINIT/Fxc_iit +!! +!! NAME +!! Fxc_iit +!! +!! FUNCTION +!! Auxiliary function for the IIT finite temperature XC functional +!! +!! INPUTS +!! deltavxc= ? +!! rs=Wigner-Seitz radius +!! t=temperature +!! +!! OUTPUT +!! Fxc_iit=auxiliary function +!! +!! SOURCE + + function Fxc_iit(rs,t,deltavxc) + +!Arguments ------------------------------------ + real(dp) :: Fxc_iit + real(dp),intent(in) :: rs,t,deltavxc +!Local variables------------------------------- + real(dp) :: newrs,newt,newGamma + +! ************************************************************************* + + newrs=rs/(one+deltavxc)**(one/3.0_dp) + newt=t/(one+deltavxc)**(2.0_dp/3.0_dp) + newGamma=2.0_dp*(4.0_dp/(9.0_dp*pi))**(2.0_dp/3.0_dp)*newrs/newt + Fxc_iit=3.0_dp/(4.0_dp*pi)*fexsGamma(newGamma,newt)/newrs**4 + + end function Fxc_iit +!!*** + +!!****f* ABINIT/tdexcsdtiit +!! +!! NAME +!! tdexcsdtiit +!! +!! FUNCTION +!! Auxiliary function for the IIT finite temperature XC functional +!! +!! INPUTS +!! rs=Wigner-Seitz radius +!! t=temperature +!! +!! OUTPUT +!! tdexcsdtiit=auxiliary function +!! +!! SOURCE + + function tdexcsdtiit(rs,t) + +!Arguments ------------------------------------ + real(dp) :: tdexcsdtiit + real(dp),intent(in) :: rs,t +!Local variables------------------------------- + real(dp) :: ef,Gamma + real(dp) :: deltat=1.0d-2 + +! ************************************************************************* + + ef=half*(9.0_dp*pi/4.0_dp)**(2.0_dp/3.0_dp)/rs**2 + Gamma=one/(t*ef)/rs + tdexcsdtiit=8.0_dp*(fexsGamma(Gamma/(one+deltat),(one+deltat)*t) & +& -fexsGamma(Gamma/(one-deltat),(one-deltat)*t)) & +& -(fexsGamma(Gamma/(one+2.0_dp*deltat),(one+2.0_dp*deltat)*t) & +& -fexsGamma(Gamma/(one-2.0_dp*deltat),(one-2.0_dp*deltat)*t)) + tdexcsdtiit=t*tdexcsdtiit/(12.0_dp*deltat*t)/rs + + end function tdexcsdtiit +!!*** + +end subroutine xciit +!!*** + +end module m_xciit +!!*** diff --git a/GX-PAW/common/src/33_xc_lowlevel/m_xciit.o b/GX-PAW/common/src/33_xc_lowlevel/m_xciit.o new file mode 100644 index 00000000..83894ef7 Binary files /dev/null and b/GX-PAW/common/src/33_xc_lowlevel/m_xciit.o differ diff --git a/GX-PAW/common/src/33_xc_lowlevel/m_xclda.F90 b/GX-PAW/common/src/33_xc_lowlevel/m_xclda.F90 new file mode 100644 index 00000000..6f051483 --- /dev/null +++ b/GX-PAW/common/src/33_xc_lowlevel/m_xclda.F90 @@ -0,0 +1,1347 @@ +!!****m* ABINIT/m_xclda +!! NAME +!! m_xclda +!! +!! FUNCTION +!! LDA or LDA-like XC functionals. +!! +!! COPYRIGHT +!! Copyright (C) 1998-2024 ABINIT group (DCA, XG, GMR, LG, MF, JFD, LK) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" + +module m_xclda + + use defs_basis + use m_errors + use m_abicore + + use m_numeric_tools, only : invcb + + implicit none + + private +!!*** + + public :: xcpzca ! Perdew-Zunger parameterization of Ceperly-Alder electron gas energy data. + public :: xcspol ! Spin-polarized exchange and correlation, parameterized by Mike Teter + public :: xctetr ! Teter exchange and correlation --Mike Teter s fit + public :: xcwign ! Wigner exchange and correlation. + public :: xchelu ! Hedin-Lundqvist exchange and correlation + public :: xcxalp ! X$\alpha$ method. + public :: xclb ! GGA like part (vx_lb) of the Leeuwen-Baerends XC potential. + public :: xctfw ! Thomas-Fermi-Weizsacker functional +!!*** + +contains +!!*** + +!!****f* ABINIT/xcpzca +!! NAME +!! xcpzca +!! +!! FUNCTION +!! Returns exc, vxc, and d(vxc)/d($\rho$) from input rho. +!! +!! NOTE +!! Perdew-Zunger parameterization of Ceperly-Alder electron gas energy data. +!! J. Perdew and A. Zunger, Phys. Rev. B 23, 5048 (1981) [[cite:Perdew1981]] +!! D.M. Ceperley and B.J. Alder, Phys. Rev. Lett. 45, 566 (1980) [[cite:Ceperley1980]] +!! +!! INPUTS +!! npt=number of real space points on which density is provided +!! order=gives the maximal derivative of Exc computed. +!! rhor(npt)=electron number density (bohr^-3) +!! rspts(npt)=corresponding Wigner-Seitz radii, precomputed +!! +!! OUTPUT +!! exc(npt)=exchange-correlation energy density (hartree) +!! vxc(npt)=xc potential (d($\rho$*exc)/d($\rho$)) (hartree) +!! if(order>1) dvxc(npt)=derivative d(vxc)/d($\rho$) (hartree*bohr^3) +!! +!! SOURCE + +subroutine xcpzca(exc,npt,order,rhor,rspts,vxc,& !Mandatory arguments +& dvxc) !Optional arguments + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: npt,order +!arrays + real(dp),intent(in) :: rhor(npt),rspts(npt) + real(dp),intent(out) :: exc(npt),vxc(npt) + real(dp),intent(out),optional :: dvxc(npt) + +!Local variables------------------------------- +!Perdew-Zunger parameters a, b, b1, b2, c, d, gamma +!scalars + integer :: ipt + real(dp),parameter :: aa=0.0311_dp,b1=1.0529_dp,b2=0.3334_dp,bb=-0.048_dp + real(dp),parameter :: c4_3=4.0_dp/3.0_dp,c7_6=7.0_dp/6.0_dp,cc=0.0020_dp + real(dp),parameter :: dd=-0.0116_dp,ga=-0.1423_dp + real(dp) :: den,den3,dfac,efac,logrs,rs,rsm1,t1,t2,vfac + character(len=500) :: message + +! ************************************************************************* + +!Compute vfac=(3/(2*Pi))^(2/3) + vfac=(1.5_dp/pi)**(2.0_dp/3.0_dp) +!Compute efac=(3/4)*vfac + efac=0.75_dp*vfac +!Compute dfac=(4*Pi/9)*vfac + dfac=(4.0_dp*pi/9.0_dp)*vfac + +!Checks the values of order + if(order<0 .or. order>2)then + write(message, '(a,a,a,i0)' )& +& 'With Perdew-Zunger Ceperley-Alder xc functional, the only',ch10,& +& 'allowed values for order are 0, 1 or 2, while it is found to be',order + ABI_BUG(message) + end if + +!Checks the compatibility between the order and the presence of the optional arguments + if(order <= 1 .and. present(dvxc))then + write(message, '(a,a,a,i0)' )& +& 'The order chosen does not need the presence',ch10,& +& 'of the vector dvxc, that is needed only with order=2 , while we have',order + ABI_BUG(message) + end if + +!separate cases with respect to order + if(order==2) then +! Loop over grid points + do ipt=1,npt + rs=rspts(ipt) + rsm1=1.0_dp/rs +! Consider two regimes: rs<1 or rs>=1 + if (rs<1._dp) then + logrs=log(rs) +! compute energy density exc (hartree) + exc(ipt)=(aa+cc*rs)*logrs+dd*rs+bb-efac*rsm1 +! compute potential vxc=d(rho*exc)/d(rho) (hartree) + vxc(ipt)=(aa+two_thirds*cc*rs)*logrs+(dd+dd-cc)*rs*third+& +& (bb-aa*third)-vfac*rsm1 +! compute d(vxc)/d(rho) (hartree*bohr^3) + dvxc(ipt)=-(3._dp*aa+(cc+dd+dd)*rs+2._dp*cc*rs*logrs)& +& /(9._dp*rhor(ipt))-dfac*rs**2 + else if (rs<1000._dp) then + t1=b1*sqrt(rs) + t2=b2*rs + den=1._dp/(1._dp+t1+t2) + exc(ipt)=ga*den-efac*rsm1 + vxc(ipt)=ga*(1._dp+c7_6*t1+c4_3*t2)*den**2-vfac*rsm1 + den3=den**3 + dvxc(ipt)=(ga*den3/(36._dp*rhor(ipt)))*(5._dp*t1+8._dp*t2+& +& 7._dp*t1**2+16._dp*t2**2+21._dp*t1*t2)-dfac*rs**2 + else + t1=b1*sqrt(rs) + t2=b2*rs + den=1._dp/(1._dp+t1+t2) + exc(ipt)=ga*den-efac*rsm1 + vxc(ipt)=ga*(1._dp+c7_6*t1+c4_3*t2)*den**2-vfac*rsm1 + dvxc(ipt)=0._dp + end if + end do + else +! Loop over grid points + do ipt=1,npt + rs=rspts(ipt) + rsm1=1.0_dp/rs +! Consider two regimes: rs<1 or rs>=1 + if (rs<1._dp) then + logrs=log(rs) +! compute energy density exc (hartree) + exc(ipt)=(aa+cc*rs)*logrs+dd*rs+bb-efac*rsm1 +! compute potential vxc=d(rho*exc)/d(rho) (hartree) + vxc(ipt)=(aa+two_thirds*cc*rs)*logrs+(dd+dd-cc)*rs*third+& +& (bb-aa*third)-vfac*rsm1 +! compute d(vxc)/d(rho) (hartree*bohr^3) + else + t1=b1*sqrt(rs) + t2=b2*rs + den=1._dp/(1._dp+t1+t2) + exc(ipt)=ga*den-efac*rsm1 + vxc(ipt)=ga*(1._dp+c7_6*t1+c4_3*t2)*den**2-vfac*rsm1 + end if + end do + end if +! +end subroutine xcpzca +!!*** + +!!****f* ABINIT/xcspol +!! NAME +!! xcspol +!! +!! FUNCTION +!! Spin-polarized exchange and correlation, parameterized by Mike Teter of Corning Incorporated. +!! +!! INPUTS +!! nspden=number of spin-density components +!! npts= number of points to be computed +!! order=its absolute value gives the maximal derivative of Exc to be computed. +!! rspts(npts)=Seitz electron radius (bohr) +!! zeta(npts)=$(\rho\uparrow-\rho\downarrow)/(\rho\uparrow+\rho\downarrow)$=degree of polarization +!! (ignored if nspden=1, in which case zeta should be 0) +!! +!! OUTPUT +!! if(abs(order)>1) dvxc(npts,1+nspden)= (Hartree*bohr^3) +!! if(nspden=1 .and. order==2): dvxc(:,1)=dvxc/d$\rho$ , dvxc(:,2) empty +!! if(nspden=1 .and. order==-2): also compute dvxc(:,2)=dvxc($\uparrow$)/d$\rho(\downarrow)$ +!! if(nspden=2): dvxc(:,1)=dvxc($\uparrow$)/d$\rho(\uparrow)$, +!! dvxc(:,2)=dvxc($\uparrow$)/d$\rho(\downarrow)$, dvxc(:,3)=dvxc($\downarrow$)/d$\rho(\downarrow)$ +!! +!! exc(npts)=exchange-correlation energy density (hartree) +!! vxc(npts,nspden)=xc potent. (d($\rho$*exc)/d($\rho\uparrow$)) and d/d($\rho\downarrow$) (ha) +!! (only overall potential d($\rho$*exc)/d($\rho$) returned in vxc(1) for nspden=1) +!! ndvxc= size of dvxc(npts,ndvxc) +!! +!! Normalization: Exc=$\int(exc(r)*\rho(r) d^3 r)$ for $\rho$(r)=electron density. +!! +!! TODO +!! To be added later +!! d2vxc=derivative $d^2 (Vxc)/d(rho)^2$ (hartree*bohr^6) +!! +!! NOTES +!! This form is based on Mike Teter s rational polynomial +!! exc=-(a0+a1*rs+a2*rs**2+a3*rs**3)/(b1*rs+b2*rs**2+b3*rs**3+b4*rs**4) +!! where the parameters are fit to reproduce +!! (in this case) the Perdew-Wang parameterization of the correlation +!! energy given in Phys. Rev. B 45, 13244-13249 (1992) [[cite:Perdew1992]]. +!! +!! Each parameter is interpolated between zeta=0 and 1 by +!! a_i(zeta)=a_i(0)+(a_i(1)-a_i(0))*f_x(zeta) and +!! f_x(zeta)=[(1+zeta)$^{4/3}$+(1-zeta)$^{4/3}$-2]/(2*(2$^{1/3}$-1)). +!! +!! Beware : in this expression, zeta is actually replaced by zeta*alpha_zeta, +!! where alpha_zeta is very close to 1, but slightly lower. +!! This is to remove the singularity in the derivatives when abs(zeta) is 1 +!! Below, a_i(1)-a_i(0) is called "da" for delta a, same for b s. +!! +!! rs = $(3/(4\pi))^{1/3} * \rho(r)^{-1/3}$ +!! zeta = $(\rho\uparrow-\rho\downarrow)/(\rho\uparrow+\rho\downarrow)$ +!! b1 must be 1 and a0 must be $(3/4)(3/(2\pi))^{2/3}$. +!! +!! SOURCE + +subroutine xcspol(exc,npts,nspden,order,rspts,vxc,zeta,ndvxc,& !Mandatory arguments +& dvxc) !Optional arguments + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: ndvxc,npts,nspden,order +!arrays + real(dp),intent(in) :: rspts(npts),zeta(npts) + real(dp),intent(out) :: exc(npts),vxc(npts,nspden) + real(dp),intent(out),optional :: dvxc(npts,ndvxc) + +!Local variables------------------------------- +!The generation of density from rs needs rsfac and rsfac^(-3) : +!rsfac=(3/(4 Pi))^(1/3) ; rsfacm3=4pi/3 +!Mike Teter s parameters of 8 April 1993. +!New parameters which accomodate spin polarization (fit to P-W) +!Paramagnetic limit:a0p,...b4p +!(a0=(3/4)(3/(2 Pi))^(2/3)) (note that b1=1 is fixed) +!Differences, ferromagnetic - paramagnetic (delta params):da1,da2,da3,db1,db2,db3,db4 +!scalars + integer :: ipts + real(dp),parameter :: a0p=.4581652932831429_dp,a1p=2.217058676663745_dp + real(dp),parameter :: a2p=0.7405551735357053_dp,a3p=0.01968227878617998_dp + real(dp),parameter :: alpha_zeta=one-1.0d-6,b1p=one,b2p=4.504130959426697_dp + real(dp),parameter :: b3p=1.110667363742916_dp,b4p=0.02359291751427506_dp + real(dp),parameter :: da0=.119086804055547_dp,da1=0.6157402568883345_dp + real(dp),parameter :: da2=0.1574201515892867_dp,da3=0.003532336663397157_dp + real(dp),parameter :: db1=zero,db2=0.2673612973836267_dp + real(dp),parameter :: db3=0.2052004607777787_dp,db4=0.004200005045691381_dp + real(dp),parameter :: ft=4._dp/3._dp,rsfac=0.6203504908994000_dp + real(dp),parameter :: rsfacm3=rsfac**(-3) + real(dp) :: a0,a1,a2,a3,b1,b2,b3,b4,d1,d1m1,d2d1drs2,d2d1drsdf,d2excdf2 + real(dp) :: d2excdrs2,d2excdrsdf,d2excdz2,d2fxcdz2,d2n1drs2,d2n1drsdf,dd1df + real(dp) :: dd1drs,dexcdf,dexcdrs,dexcdz,dfxcdz,dn1df,dn1drs,dvxcdrs + real(dp) :: dvxcpdrho,dvxcpdz,excipt,fact,fxc,n1 + real(dp) :: rhom1,rs,vxcp,zet,zetm,zetm_third + real(dp) :: zetp,zetp_third + character(len=500) :: message +!no_abirules +!Set a minimum rho below which terms are 0 + real(dp),parameter :: rhotol=1.d-28 +!real(dp) :: delta,rho,rho_dn,rho_dnm,rho_dnp,rho_up,rho_upm,rho_upp,zeta_mean + +! ************************************************************************* + +!Checks the compatibility between the presence of dvxc and ndvxc + if(ndvxc /=0 .neqv. present(dvxc))then + message = 'If ndvxc/=0 there must be the optional argument dvxc' + ABI_BUG(message) + end if + +!Checks the compatibility between the inputs and the presence of the optional arguments + if(abs(order) <= 1 .and. ndvxc /= 0)then + write(message, '(4a,i0)' )ch10,& +& 'The order chosen does not need the presence',ch10,& +& 'of the vector dvxc, that is needed only with |order|>1 , while we have',order + ABI_BUG(message) + end if + + if(nspden == 1 .and. ndvxc /=0 .and. ndvxc /= 2)then + write(message,'(a,i0)')' Once nspden=1 we must have ndvxc=2, while we have',ndvxc + ABI_BUG(message) + end if + + if(nspden == 2 .and. ndvxc /=0 .and. ndvxc /= 3)then + write(message, '(a,i0)' )' Once nspden=2 we must have ndvxc=3, while we have',ndvxc + ABI_BUG(message) + end if + + +!Although fact is parameter value, some compilers are not able to evaluate +!it at compile time. + fact=one/(two**(four*third)-two) + +!DEBUG +!Finite-difference debugging, do not take away +!debug=1 +!zeta_mean=0.1_dp +!delta=0.0001 +!if(debug==1)then +!do ipts=1,npts,5 +!rho=ipts*0.01_dp +!rho_up=rho*(one+zeta_mean)*half +!rho_dn=rho*(one-zeta_mean)*half +!rho_upp=rho_up+delta +!rho_upm=rho_up-delta +!rho_dnp=rho_dn+delta +!rho_dnm=rho_dn-delta +!First possibility : vary rho up , and then rho down +!zeta(ipts )=(rho_up -rho_dn )/(rho_up +rho_dn ) +!zeta(ipts+1)=(rho_upp-rho_dn )/(rho_upp+rho_dn ) +!zeta(ipts+2)=(rho_upm-rho_dn )/(rho_upm+rho_dn ) +!zeta(ipts+3)=(rho_up -rho_dnp)/(rho_up +rho_dnp) +!zeta(ipts+4)=(rho_up -rho_dnm)/(rho_up +rho_dnm) +!rspts(ipts )=rsfac*(rho_up +rho_dn )**(-third) +!rspts(ipts+1)=rsfac*(rho_upp+rho_dn )**(-third) +!rspts(ipts+2)=rsfac*(rho_upm+rho_dn )**(-third) +!rspts(ipts+3)=rsfac*(rho_up +rho_dnp)**(-third) +!rspts(ipts+4)=rsfac*(rho_up +rho_dnm)**(-third) +!DEBUGBUG : another possibility : vary rho and zeta +!zeta(ipts+1)=zeta(ipts ) +!zeta(ipts+2)=zeta(ipts ) +!zeta(ipts+3)=zeta(ipts )+delta +!zeta(ipts+4)=zeta(ipts )-delta +!rspts(ipts+1)=rsfac*(rho+delta)**(-third) +!rspts(ipts+2)=rsfac*(rho-delta )**(-third) +!rspts(ipts+3)=rspts(ipts ) +!rspts(ipts+4)=rspts(ipts ) +!ENDDEBUGBUG +!end do +!end if +!nspden=2 +!order=2 +!ENDDEBUG + + if (nspden==1) then +! separate cases with respect to order + if(order==-2) then +! No spin-polarization so skip steps related to zeta not 0 + do ipts=1,npts + + rs=rspts(ipts) + n1=a0p+rs*(a1p+rs*(a2p+rs*a3p)) + d1=rs*(b1p+rs*(b2p+rs*(b3p+rs*b4p))) + d1m1=one/d1 + +! Exchange-correlation energy + excipt=-n1*d1m1 + exc(ipts)=excipt + +! Exchange-correlation potential + dn1drs=a1p+rs*(2._dp*a2p+rs*(3._dp*a3p)) + dd1drs=b1p+rs*(2._dp*b2p+rs*(3._dp*b3p+rs*(4._dp*b4p))) + +! dexcdrs is d(exc)/d(rs) + dexcdrs=-(dn1drs+excipt*dd1drs)*d1m1 + vxc(ipts,1)=excipt-third*rs*dexcdrs + +! If the exchange-correlation kernel is needed + + d2n1drs2=2._dp*a2p+rs*(6._dp*a3p) + d2d1drs2=2._dp*b2p+rs*(6._dp*b3p+rs*(12._dp*b4p)) +! d2excdrs2 is d2(exc)/d(rs)2 + d2excdrs2=-(d2n1drs2+2._dp*dexcdrs*dd1drs+excipt*d2d1drs2)*d1m1 + dvxcdrs=third*(2.0_dp*dexcdrs-rs*d2excdrs2) +! And d(vxc)/d(rho)=(-rs/(3*rho))*d(vxc)/d(rs) + dvxc(ipts,1)= -rs**4*rsfacm3*third*dvxcdrs + +! dn1df=d(n1)/d(fxc) and dd1df=d(d1)/d(fxc) + dn1df=da0+rs*(da1+rs*(da2+rs*da3)) + dd1df=rs*(db1+rs*(db2+rs*(db3+rs*db4))) + dexcdf=-(dn1df+excipt*dd1df)*d1m1 +! d2(fxc)/d(zeta)2 + d2fxcdz2=ft*third*(alpha_zeta**2)*2._dp*fact +! d2(exc)/d(zeta)2 + d2excdz2=d2fxcdz2*dexcdf + rhom1=rsfacm3*rs**3 + dvxc(ipts,2)= dvxc(ipts,1) - d2excdz2*rhom1 + end do + else if(order**2>1) then +! No spin-polarization so skip steps related to zeta not 0 + do ipts=1,npts + + rs=rspts(ipts) + n1=a0p+rs*(a1p+rs*(a2p+rs*a3p)) + d1=rs*(b1p+rs*(b2p+rs*(b3p+rs*b4p))) + d1m1=one/d1 + +! Exchange-correlation energy + excipt=-n1*d1m1 + exc(ipts)=excipt + +! Exchange-correlation potential + dn1drs=a1p+rs*(2._dp*a2p+rs*(3._dp*a3p)) + dd1drs=b1p+rs*(2._dp*b2p+rs*(3._dp*b3p+rs*(4._dp*b4p))) + +! dexcdrs is d(exc)/d(rs) + dexcdrs=-(dn1drs+excipt*dd1drs)*d1m1 + vxc(ipts,1)=excipt-third*rs*dexcdrs + +! If the exchange-correlation kernel is needed + d2n1drs2=2._dp*a2p+rs*(6._dp*a3p) + d2d1drs2=2._dp*b2p+rs*(6._dp*b3p+rs*(12._dp*b4p)) +! d2excdrs2 is d2(exc)/d(rs)2 + d2excdrs2=-(d2n1drs2+2._dp*dexcdrs*dd1drs+excipt*d2d1drs2)*d1m1 + dvxcdrs=third*(2.0_dp*dexcdrs-rs*d2excdrs2) +! And d(vxc)/d(rho)=(-rs/(3*rho))*d(vxc)/d(rs) + dvxc(ipts,1)= -rs**4*rsfacm3*third*dvxcdrs + + end do + else +! No spin-polarization so skip steps related to zeta not 0 + do ipts=1,npts + + rs=rspts(ipts) + n1=a0p+rs*(a1p+rs*(a2p+rs*a3p)) + d1=rs*(b1p+rs*(b2p+rs*(b3p+rs*b4p))) + d1m1=one/d1 + +! Exchange-correlation energy + excipt=-n1*d1m1 + exc(ipts)=excipt + +! Exchange-correlation potential + dn1drs=a1p+rs*(2._dp*a2p+rs*(3._dp*a3p)) + dd1drs=b1p+rs*(2._dp*b2p+rs*(3._dp*b3p+rs*(4._dp*b4p))) + +! dexcdrs is d(exc)/d(rs) + dexcdrs=-(dn1drs+excipt*dd1drs)*d1m1 + vxc(ipts,1)=excipt-third*rs*dexcdrs + end do + + end if + + +! Allows for nspden==1, in the case of testing nspden=1 against nspden=2 + else if (nspden<=2) then + + +! DEBUG +! do not take away : allows to compare nspden=1 and nspden=2 coding +! if (nspden==1)then +! zeta(:)=zero +! end if +! ENDDEBUG +! separate cases with respect to order + if(abs(order)>1) then +! Allow for spin polarization. This part could be optimized for speed. + do ipts=1,npts + + rs=rspts(ipts) + zet=zeta(ipts) + zetp=one+zet*alpha_zeta + zetm=one-zet*alpha_zeta + zetp_third=zetp**third + zetm_third=zetm**third +! Exchange energy spin interpolation function f(zeta) + fxc=( zetp*zetp_third + zetm*zetm_third - two ) *fact + + a0=a0p+fxc*da0 + a1=a1p+fxc*da1 + a2=a2p+fxc*da2 + a3=a3p+fxc*da3 + b1=b1p+fxc*db1 + b2=b2p+fxc*db2 + b3=b3p+fxc*db3 + b4=b4p+fxc*db4 + + n1= a0+rs*(a1+rs*(a2+rs*a3)) + d1=rs*(b1+rs*(b2+rs*(b3+rs*b4))) + d1m1=one/d1 + +! Exchange-correlation energy + excipt=-n1*d1m1 + exc(ipts)=excipt + +! Exchange-correlation potential + dn1drs=a1+rs*(2._dp*a2+rs*(3._dp*a3)) + dd1drs=b1+rs*(2._dp*b2+rs*(3._dp*b3+rs*(4._dp*b4))) +! dexcdrs is d(exc)/d(rs) + dexcdrs=-(dn1drs+excipt*dd1drs)*d1m1 + +! Only vxcp contributes when paramagnetic + vxcp=excipt-third*rs*dexcdrs + +! d(fxc)/d(zeta) (which is 0 at zeta=0) + dfxcdz=ft*alpha_zeta*(zetp_third-zetm_third)*fact + +! dn1df=d(n1)/d(fxc) and dd1df=d(d1)/d(fxc) + dn1df=da0+rs*(da1+rs*(da2+rs*da3)) + dd1df=rs*(db1+rs*(db2+rs*(db3+rs*db4))) + +! dexcdz is d(exc)/d(zeta) + dexcdf=-(dn1df+excipt*dd1df)*d1m1 + dexcdz=dfxcdz*dexcdf + +! Compute Vxc for both spin channels + + vxc(ipts,1)=vxcp - (zet-one)*dexcdz + vxc(ipts,2)=vxcp - (zet+one)*dexcdz + +! DEBUG Allow to check the variation of rho and zeta +! vxc(ipts,1)=vxcp +! vxc(ipts,2)=dexcdz +! ENDDEBUG +! Compute second derivative with respect to rho + d2n1drs2=2._dp*a2+rs*(6._dp*a3) + d2d1drs2=2._dp*b2+rs*(6._dp*b3+rs*(12._dp*b4)) +! d2excdrs2 is d2(exc)/d(rs)2 + d2excdrs2=-(d2n1drs2+two*dexcdrs*dd1drs+excipt*d2d1drs2)*d1m1 + dvxcdrs=third*(two*dexcdrs-rs*d2excdrs2) +! And d(vxc)/d(rho) paramagnetic =(-rs/(3*rho))*d(vxcp)/d(rs) +! remember : 1/rho=(4pi/3)*rs**3=rsfacm3*rs**3 + rhom1=rsfacm3*rs**3 + dvxcpdrho= -rs*rhom1*third * dvxcdrs + +! Compute mixed second derivative with respect to rho and zeta + d2n1drsdf=da1+rs*(2._dp*da2+rs*(3._dp*da3)) + d2d1drsdf=db1+rs*(2._dp*db2+rs*(3._dp*db3+rs*(4._dp*db4))) +! d2excdrsdf is d2(exc)/d(rs)df + d2excdrsdf=-(d2n1drsdf+dexcdrs*dd1df+dexcdf*dd1drs+excipt*d2d1drsdf)*d1m1 +! d(vxc)/d(zeta) paramagnetic + dvxcpdz=dexcdz-third*rs*dfxcdz*d2excdrsdf + +! Compute second derivative with respect to zeta +! the second derivative of n1 and d1 wrt f vanishes + d2excdf2=-(two*dexcdf*dd1df)*d1m1 +! d2(fxc)/d(zeta)2 + d2fxcdz2=ft*third*(alpha_zeta**2)*(zetp_third**(-2)+zetm_third**(-2))*fact +! d2(exc)/d(zeta)2 + d2excdz2=d2fxcdz2*dexcdf+dfxcdz**2*d2excdf2 + +! Compute now the three second derivatives of the Exc energy with respect +! to : wrt twice spin-up ; wrt spin-up and spin-dn ; wrt twice spin-down + dvxc(ipts,1)= dvxcpdrho & +& +two*rhom1*( one-zet)*(dvxcpdz-dexcdz) & +& +d2excdz2*rhom1*(one-zet)**2 + dvxc(ipts,2)= dvxcpdrho & +& +two*rhom1*( -zet)*(dvxcpdz-dexcdz) & +& +d2excdz2*rhom1*(one-zet)*(-one-zet) +! if(nspden==2)then + dvxc(ipts,3)= dvxcpdrho & +& +two*rhom1*(-one-zet)*(dvxcpdz-dexcdz) & +& +d2excdz2*rhom1*(-one-zet)**2 +! else +! ! For testing purposes, need the spin-averaged quantity +! dvxc(ipts,1)= ( dvxc(ipts,1) + dvxc(ipts,2) ) * half +! end if + +! DEBUG Allow to check the variation of rho and zeta +! dvxc(ipts,1)=dvxcpdrho +! dvxc(ipts,2)=d2excdz2 +! dvxc(ipts,3)=dvxcpdz +! ENDDEBUG + end do + else +! Allow for spin polarization. This part could be optimized for speed. + do ipts=1,npts + + rs=rspts(ipts) + zet=zeta(ipts) + zetp=one+zet*alpha_zeta + zetm=one-zet*alpha_zeta + zetp_third=zetp**third + zetm_third=zetm**third +! Exchange energy spin interpolation function f(zeta) + fxc=( zetp*zetp_third + zetm*zetm_third - two ) *fact + + a0=a0p+fxc*da0 + a1=a1p+fxc*da1 + a2=a2p+fxc*da2 + a3=a3p+fxc*da3 + b1=b1p+fxc*db1 + b2=b2p+fxc*db2 + b3=b3p+fxc*db3 + b4=b4p+fxc*db4 + + n1= a0+rs*(a1+rs*(a2+rs*a3)) + d1=rs*(b1+rs*(b2+rs*(b3+rs*b4))) + d1m1=one/d1 + +! Exchange-correlation energy + excipt=-n1*d1m1 + exc(ipts)=excipt + +! Exchange-correlation potential + dn1drs=a1+rs*(2._dp*a2+rs*(3._dp*a3)) + dd1drs=b1+rs*(2._dp*b2+rs*(3._dp*b3+rs*(4._dp*b4))) +! dexcdrs is d(exc)/d(rs) + dexcdrs=-(dn1drs+excipt*dd1drs)*d1m1 + +! Only vxcp contributes when paramagnetic + vxcp=excipt-third*rs*dexcdrs + +! d(fxc)/d(zeta) (which is 0 at zeta=0) + dfxcdz=ft*alpha_zeta*(zetp_third-zetm_third)*fact + +! dn1df=d(n1)/d(fxc) and dd1df=d(d1)/d(fxc) + dn1df=da0+rs*(da1+rs*(da2+rs*da3)) + dd1df=rs*(db1+rs*(db2+rs*(db3+rs*db4))) + +! dexcdz is d(exc)/d(zeta) + dexcdf=-(dn1df+excipt*dd1df)*d1m1 + dexcdz=dfxcdz*dexcdf + +! Compute Vxc for both spin channels + + vxc(ipts,1)=vxcp - (zet-one)*dexcdz + vxc(ipts,2)=vxcp - (zet+one)*dexcdz + +! DEBUG Allow to check the variation of rho and zeta +! vxc(ipts,1)=vxcp +! vxc(ipts,2)=dexcdz +! ENDDEBUG + end do + end if + else + +! Disallowed value for nspden + write(message, '(3a,i0)' )& +& ' Argument nspden must be 1 or 2; ',ch10,& +& ' Value provided as argument was ',nspden + ABI_BUG(message) + end if + +!DEBUG +!Finite-difference debugging, do not take away +!if(debug==1)then +!write(std_out,*)' delta =',delta +!do ipts=1,npts,5 +!rho=(rspts(ipts)/rsfac)**(-3) +!write(std_out,'(a,i5,a,2es16.8)' ) ' Point number',ipts,' with rho,zeta=',rho,zeta(ipts) +!write(std_out,'(3es16.8)' )exc(ipts)*rho,vxc(ipts,1),vxc(ipts,2) +!write(std_out,'(3es16.8)' )dvxc(ipts,1),dvxc(ipts,3),dvxc(ipts,2) +!write(std_out,'(3es16.8)' )exc(ipts)*rho,& +!& ( exc(ipts+1)*(rho+delta) - exc(ipts+2)*(rho-delta) )/2._dp/delta,& +!& ( exc(ipts+3)*(rho+delta) - exc(ipts+4)*(rho-delta) )/2._dp/delta +!write(std_out,'(4es16.8)' )& +!& ( vxc(ipts+1,1) - vxc(ipts+2,1) )/2._dp/delta,& +!& ( vxc(ipts+3,2) - vxc(ipts+4,2) )/2._dp/delta,& +!& ( vxc(ipts+3,1) - vxc(ipts+4,1) )/2._dp/delta,& +!& ( vxc(ipts+1,2) - vxc(ipts+2,2) )/2._dp/delta +!end do +!stop +!end if +!ENDDEBUG + +!DEBUG +!if(order==-2)then +!write(std_out,*)' xcspol : ipts,npts ',ipts,npts +!write(std_out,*)dvxcdrs,d2excdz2,d2fxcdz2,dexcdf +!write(std_out,*)rhom1 +!write(std_out,*)dvxc(1000,1),dvxc(1000,2) +!stop +!end if +!ENDDEBUG + +end subroutine xcspol +!!*** + + +!!****f* ABINIT/xctetr +!! NAME +!! xctetr +!! +!! FUNCTION +!! Returns exc, vxc, and d(vxc)/d($\rho$) from input $\rho$. +!! Also returns $d^2(Vxc)/d(\rho)^2$ as needed for third-order DFPT +!! +!! INPUTS +!! npt=number of real space points on which density is provided +!! order=gives the maximal derivative of Exc computed. +!! rhor(npt)=electron number density (bohr^-3) +!! rspts(npt)=corresponding Wigner-Seitz radii, precomputed +!! +!! OUTPUT +!! exc(npt)=exchange-correlation energy density (hartree) +!! vxc(npt)=xc potential (d(rho*exc)/d(rho)) (hartree) +!! if(order>1) dvxc(npt)=derivative d(vxc)/d($\rho$) (hartree*bohr^3) +!! if(order>2) d2vxc(npt)=derivative d$^2$(Vxc)/d$(\rho)^2$ (hartree*bohr^6) +!! +!! NOTES +!! Teter exchange and correlation (xc)--Mike Teter s fit +!! to Ceperly-Alder electron gas energy data. Data from +!! D.M. Ceperley and B.J. Alder, Phys. Rev. Lett. 45, 566 (1980) [[cite:Ceperley1980]] +!! and private communication from authors. +!! This form is based on Mike Teter s rational polynomial +!! exc=-(a0+a1*rs+a2*rs**2+a3*rs**3)/(b1*rs+b2*rs**2+b3*rs**3+b4*rs**4) +!! where the parameters of the fit are fit to reproduce +!! Ceperley-Alder data and the high density limit (rs->0) +!! of the electron gas (pure exchange). +!! rs = $(3/(4\pi))^{1/3} * \rho(r)^{-1/3}$. +!! b1 must be 1 and a0 must be $(3/4)(3/(2\pi))^{2/3}$. +!! Fit is by Mike Teter, Corning Incorporated. +!! Note that d(vxc)/d($\rho$) gets a little wild at small rho. +!! d$^2$(Vxc)/d$(\rho)^2$ is probably wilder. +!! +!! Some notation: (XG 990224, sign convention should be changed, see xcspol.f) +!! $Exc = N1/D1$ with $N1=-(a0+a1*rs+...)$ given above and +!! $D1= (b1*rs+b2*rs^2+...)$ also given above. +!! $Vxc = N2/D1^2$ with $N2=d(N1)/d(rs)$. +!! $d(Vxc)/d(rs)=(N3-D3*(2*N2/D1))/D1^2 with N3=d(N2)/d(rs)$ and +!! $D3=d(D1)/d(rs)$. +!! $d(Vxc)/d(\rho) = (-rs/(3*\rho))* d(Vxc)/d(rs)$. +!! $d^2(Vxc)/d(rs)^2 = (N4-2*(2*N3*D3+N2*D4-3*N2*D3^2/D1)/D1)/D1^2$ +!! with $N4=d(N3)/d(rs), D4=d(D3)/d(rs)$. +!! $d^2(Vxc)/d(\rho)^2= rs/(3*\rho)^2)*(4*d(Vxc)/d(rs)+rs*d^2(Vxc)/d(rs)^2)$. +!! +!! SOURCE + +subroutine xctetr(exc,npt,order,rhor,rspts,vxc,& !Mandatory arguments +& d2vxc,dvxc) !Optional arguments + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: npt,order +!arrays + real(dp),intent(in) :: rhor(npt),rspts(npt) + real(dp),intent(out) :: exc(npt),vxc(npt) + real(dp),intent(out),optional :: d2vxc(npt),dvxc(npt) + +!Local variables------------------------------- +!rsfac=(3/(4 Pi))^(1/3) +!Mike Teter s parameters: (keep 8 digits after decimal) +!(a0=(3/4)(3/(2 Pi))^(2/3) +!scalars + integer :: ipt + real(dp),parameter :: a0=.4581652932831429_dp,a1=2.40875407_dp,a2=.88642404_dp + real(dp),parameter :: a3=.02600342_dp,b1=1.0_dp,b2=4.91962865_dp + real(dp),parameter :: b3=1.34799453_dp,b4=.03120453_dp,c1=4._dp*a0*b1/3.0_dp + real(dp),parameter :: c2=5.0_dp*a0*b2/3.0_dp+a1*b1 + real(dp),parameter :: c3=2.0_dp*a0*b3+4.0_dp*a1*b2/3.0_dp+2.0_dp*a2*b1/3.0_dp + real(dp),parameter :: c4=7.0_dp*a0*b4/3.0_dp+5.0_dp*a1*b3/3.0_dp+a2*b2+a3*b1/3.0_dp + real(dp),parameter :: c5=2.0_dp*a1*b4+4.0_dp*a2*b3/3.0_dp+2.0_dp*a3*b2/3.0_dp + real(dp),parameter :: c6=5.0_dp*a2*b4/3.0_dp+a3*b3,c7=4.0_dp*a3*b4/3.0_dp + real(dp),parameter :: rsfac=0.6203504908994000_dp + real(dp) :: d1,d1m1,d2vxcr,d3,d4,dvxcdr,n1,n2,n3,n4,rhom1,rs + character(len=500) :: message + +! ************************************************************************* +! +!Checks the values of order + if(order<0 .or. order>3)then + write(message, '(a,a,a,i6)' )& +& 'With Teter 91 Ceperley-Alder xc functional, the only',ch10,& +& 'allowed values for order are 0, 1, 2 or 3, while it is found to be',order + ABI_BUG(message) + end if + +!Checks the compatibility between the order and the presence of the optional arguments + if(order /=3 .and. present(d2vxc))then + write(message, '(a,a,a,i6)' )& +& 'The order chosen does not need the presence',ch10,& +& 'of the vector d2vxc, that is needed only with order=3, while we have',order + ABI_BUG(message) + end if + + if(order <= 1 .and. present(dvxc))then + write(message, '(a,a,a,i6)' )& +& 'The order chosen does not need the presence',ch10,& +& 'of the vector dvxc, that is needed with order > 1, while we have',order + ABI_BUG(message) + end if + +!separated cases with respect to order + + if (order<=1) then +! Loop over grid points + do ipt=1,npt + rs=rspts(ipt) + n1=-(a0+rs*(a1+rs*(a2+rs*a3))) + d1=rs*(b1+rs*(b2+rs*(b3+rs*b4))) + d1m1=1.0_dp/d1 + n2=-rs*(c1+rs*(c2+rs*(c3+rs*(c4+rs*(c5+rs*(c6+rs*c7)))))) +! +! Exchange-correlation energy + exc(ipt)=n1*d1m1 +! +! Exchange-correlation potential + vxc(ipt)=n2*d1m1**2 + end do + else if (order>2) then +! Loop over grid points + do ipt=1,npt + rs=rspts(ipt) + n1=-(a0+rs*(a1+rs*(a2+rs*a3))) + d1=rs*(b1+rs*(b2+rs*(b3+rs*b4))) + d1m1=1.0_dp/d1 + n2=-rs*(c1+rs*(c2+rs*(c3+rs*(c4+rs*(c5+rs*(c6+rs*c7)))))) +! +! Exchange-correlation energy + exc(ipt)=n1*d1m1 +! +! Exchange-correlation potential + vxc(ipt)=n2*d1m1**2 +! Assemble derivative of vxc wrt rs + n3=-(c1+rs*(2._dp*c2+rs*(3._dp*c3+rs*(4._dp*c4+rs*(5._dp*c5+& +& rs*(6._dp*c6+rs*(7._dp*c7))))))) + d3=b1+rs*(2._dp*b2+rs*(3._dp*b3+rs*(4._dp*b4))) + dvxcdr=(n3-d3*(2._dp*n2*d1m1))*d1m1**2 + rhom1=1.0_dp/rhor(ipt) +! +! derivative of vxc wrt rho + dvxc(ipt)=-dvxcdr*rs*third*rhom1 +! + +! Assemble derivative d^2(Vxc)/d(rs)^2 + n4=-(2.0_dp*c2+rs*(6.0_dp*c3+rs*(12.0_dp*c4+rs*(20.0_dp*c5+& +& rs*(30.0_dp*c6+rs*(42.0_dp*c7)))))) + d4=2.0_dp*b2+rs*(6.0_dp*b3+rs*(12.0_dp*b4)) + d2vxcr=(n4-2.0_dp*(2.0_dp*n3*d3+n2*d4-3.0_dp*n2*d3**2*d1m1)*d1m1)*d1m1**2 + +! Derivative d^2(Vxc)/d(rho)^2 + d2vxc(ipt)=(rs*third*rhom1)*(4.0_dp*dvxcdr+rs*d2vxcr)*third*rhom1 + + end do + else if (order>1) then +! Loop over grid points + do ipt=1,npt + rs=rspts(ipt) + n1=-(a0+rs*(a1+rs*(a2+rs*a3))) + d1=rs*(b1+rs*(b2+rs*(b3+rs*b4))) + d1m1=1.0_dp/d1 + n2=-rs*(c1+rs*(c2+rs*(c3+rs*(c4+rs*(c5+rs*(c6+rs*c7)))))) +! +! Exchange-correlation energy + exc(ipt)=n1*d1m1 +! +! Exchange-correlation potential + vxc(ipt)=n2*d1m1**2 +! Assemble derivative of vxc wrt rs + n3=-(c1+rs*(2._dp*c2+rs*(3._dp*c3+rs*(4._dp*c4+rs*(5._dp*c5+& +& rs*(6._dp*c6+rs*(7._dp*c7))))))) + d3=b1+rs*(2._dp*b2+rs*(3._dp*b3+rs*(4._dp*b4))) + dvxcdr=(n3-d3*(2._dp*n2*d1m1))*d1m1**2 + rhom1=1.0_dp/rhor(ipt) +! +! derivative of vxc wrt rho + dvxc(ipt)=-dvxcdr*rs*third*rhom1 +! + end do + end if +end subroutine xctetr +!!*** + +!!****f* ABINIT/xcwign +!! NAME +!! xcwign +!! +!! FUNCTION +!! Returns exc, vxc, and eventually d(vxc)/d($\rho$) from input $\rho$. +!! Wigner exchange and correlation (xc)--see e.g. David Pines, +!! Elementary Excitations in Solids, p. 94, NY 1964. +!! Expression is exc=-(0.44)/(rs+7.8)-efac/rs (hartree), efac below. +!! rs = $(3/(4\pi))^{1/3}* \rho (r)^{-1/3}$. +!! +!! INPUTS +!! npt=number of real space points on which density is provided +!! order=gives the maximal derivative of Exc computed. +!! rspts(npt)=corresponding Wigner-Seitz radii, precomputed +!! +!! OUTPUT +!! exc(npt)=exchange-correlation energy density (hartree) +!! vxc(npt)=xc potential (d($\rho$*exc)/d($\rho$)) (hartree) +!! if(order>1) dvxc(npt)=derivative d(vxc)/d($\rho$) (hartree*bohr^3) +!! +!! SOURCE + +subroutine xcwign(exc,npt,order,rspts,vxc,& !Mandatory arguments +& dvxc) !Optional arguments + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: npt,order +!arrays + real(dp),intent(in) :: rspts(npt) + real(dp),intent(out) :: exc(npt),vxc(npt) + real(dp),intent(out),optional :: dvxc(npt) + +!Local variables------------------------------- +!c1 and c2 are the Wigner parameters in hartree and bohr resp. +!scalars + integer :: ipt + real(dp),parameter :: c1=0.44_dp,c2=7.8_dp,c4_3=4.0_dp/3.0_dp + real(dp),parameter :: c8_27=8.0_dp/27.0_dp + real(dp) :: dfac,efac,rs,rsc2m1,rsm1,vfac,vxcnum + character(len=500) :: message + +! ************************************************************************* + +!Checks the values of order + if(order<0 .or. order>2)then + write(message, '(a,a,a,i0)' )& +& 'With Wigner xc functional, the only',ch10,& +& 'allowed values for order are 0, 1 or 2, while it is found to be',order + ABI_BUG(message) + end if + +!Checks the compatibility between the order and the presence of the optional arguments + if(order <= 1 .and. present(dvxc))then + write(message, '(a,a,a,i3)' )& +& 'The order chosen does not need the presence',ch10,& +& 'of the vector dvxc, that is needed only with order=2 , while we have',order + ABI_BUG(message) + end if + +!Compute vfac=(3/(2*Pi))^(2/3) + vfac=(1.5_dp/pi)**(2.0_dp/3.0_dp) +!Compute efac=(3/4)*vfac + efac=0.75_dp*vfac +!Compute dfac=(4*Pi/9)*vfac + dfac=(4.0_dp*pi/9.0_dp)*vfac + +!separate cases with respect to order + if (order==2) then + +! Loop over grid points + do ipt=1,npt + rs=rspts(ipt) + rsm1=1.0_dp/rs + rsc2m1=1.0_dp/(rs+c2) +! compute energy density (hartree) + exc(ipt)=-c1*rsc2m1-efac*rsm1 + vxcnum=-(c4_3*rs+c2)*c1 +! compute potential (hartree) + vxc(ipt)=vxcnum*rsc2m1**2-vfac*rsm1 +! compute d(vxc)/d(rho) (hartree*bohr^3) + dvxc(ipt)=-(c8_27*pi)*(c1*rs**4)*(rs+rs+c2)*rsc2m1**3-dfac*rs**2 + end do + else + +! Loop over grid points + do ipt=1,npt + rs=rspts(ipt) + rsm1=1.0_dp/rs + rsc2m1=1.0_dp/(rs+c2) +! compute energy density (hartree) + exc(ipt)=-c1*rsc2m1-efac*rsm1 + vxcnum=-(c4_3*rs+c2)*c1 +! compute potential (hartree) + vxc(ipt)=vxcnum*rsc2m1**2-vfac*rsm1 + end do + + end if +! +end subroutine xcwign +!!*** + + +!!****f* ABINIT/xchelu +!! NAME +!! xchelu +!! +!! FUNCTION +!! Returns exc, vxc, and eventually d(vxc)/d($\rho$) from input rho. +!! +!! NOTES +!! Hedin-Lundqvist exchange and correlation (xc)-- +!! L. Hedin and B.I. Lundqvist, J. Phys. C. 4, 2064 (1971) [[cite:Hedin1971]] +!! +!! INPUTS +!! npt=number of real space points on which density is provided +!! order=gives the maximal derivative of Exc computed. +!! rspts(npt)=Wigner-Seitz radii at each point +!! +!! OUTPUT +!! exc(npt)=exchange-correlation energy density (hartree) +!! vxc(npt)=xc potential (d($\rho$*exc)/d($\rho$)) (hartree) +!! if(order>1) dvxc(npt)=derivative d(vxc)/d($\rho$) (hartree*bohr^3) +!! +!! SOURCE + +subroutine xchelu(exc,npt,order,rspts,vxc,dvxc) ! dvxc is optional + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: npt,order +!arrays + real(dp),intent(in) :: rspts(npt) + real(dp),intent(out) :: exc(npt),vxc(npt) + real(dp),intent(out),optional :: dvxc(npt) + +!Local variables------------------------------- +!aa and cc are H-L fitting parameters A and C (C in hartree) +!rs = (3/(4 Pi))**(1/3) * rho(r)**(-1/3). +!scalars + integer :: ipt + real(dp),parameter :: aa=21_dp,c1_21=one/21_dp,c4_9=4.0_dp/9.0_dp,cc=0.0225_dp + real(dp) :: dfac,efac,rs,rsm1,vfac,xx + character(len=500) :: message + +! ************************************************************************* + +!Checks the values of order + if(order<0 .or. order>2)then + write(message, '(a,a,a,i0)' )& +& 'With Hedin-Lundqvist xc functional, the only',ch10,& +& 'allowed values for order are 0, 1 or 2, while it is found to be',order + ABI_BUG(message) + end if + +!Compute vfac=(3/(2*Pi))^(2/3) + vfac=(1.5_dp/pi)**(2.0_dp/3.0_dp) +!Compute efac=(3/4)*vfac + efac=0.75_dp*vfac +!Compute dfac=(4*Pi/9)*vfac + dfac=(4.0_dp*pi/9.0_dp)*vfac +!separate cases with respect to order + if (order==2) then +! Loop over grid points + do ipt=1,npt + rs=rspts(ipt) + rsm1=one/rs +! compute energy density exc (hartree) + xx=rs*c1_21 + exc(ipt)=-cc*((one+xx**3)*log(one+one/xx)+& +& half*xx-xx*xx-third) - efac*rsm1 +! compute xc potential d(rho*exc)/d(rho) (hartree) + vxc(ipt)=-cc*log(one+aa*rsm1)-vfac*rsm1 +! compute d(vxc)/d(rho) (hartree*bohr^3) + dvxc(ipt)=-(rs**2)*((c4_9*pi)*cc*rs/(one+xx) + dfac) + end do + else +! Loop over grid points + do ipt=1,npt + rs=rspts(ipt) + rsm1=one/rs +! compute energy density exc (hartree) + xx=rs*c1_21 + exc(ipt)=-cc*((one+xx**3)*log(one+one/xx)+& +& half*xx-xx*xx-third) - efac*rsm1 +! compute xc potential d(rho*exc)/d(rho) (hartree) + vxc(ipt)=-cc*log(one+aa*rsm1)-vfac*rsm1 + end do + end if +! +end subroutine xchelu +!!*** + +!!****f* ABINIT/xcxalp +!! NAME +!! xcxalp +!! +!! FUNCTION +!! Returns exc, vxc, and eventually d(vxc)/d($\rho$) from input $\rho$. +!! "X$\alpha$" method is used in this subroutine: +!! a single fixed value is chosen for "alpha", set below. +!! Expression is exc=-alpha*efac/rs (hartree), efac below. +!! rs = $(3/(4\pi))^{1/3}* \rho (r)^{-1/3}$. +!! +!! INPUTS +!! npt=number of real space points on which density is provided +!! order=gives the maximal derivative of Exc computed. +!! rspts(npt)=Wigner-Seitz radii, at each point +!! +!! OUTPUT +!! exc(npt)=exchange-correlation energy density (hartree) +!! vxc(npt)=xc potential (d($\rho$*exc)/d($\rho$)) (hartree) +!! if(order>1) dvxc(npt)=derivative d(vxc)/d($\rho$) (hartree*bohr^3) +!! +!! SOURCE + +subroutine xcxalp(exc,npt,order,rspts,vxc, dvxc) ! dvxc is optional + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: npt,order +!arrays + real(dp),intent(in) :: rspts(npt) + real(dp),intent(out) :: exc(npt),vxc(npt) + real(dp),intent(out),optional :: dvxc(npt) + +!Local variables------------------------------- +!Set value of alpha in "X-alpha" method +!scalars + integer :: ipt + real(dp),parameter :: alpha=1.0_dp + real(dp) :: dfac,efac,rs,rsm1,vfac + character(len=500) :: message + +! ************************************************************************* + +!Checks the values of order + if(order<0 .or. order>2)then + write(message, '(a,a,a,i3)' )& +& 'With X-alpha xc functional, the only',ch10,& +& 'allowed values for order are 0, 1 or 2, while it is found to be',order + ABI_BUG(message) + end if + +!Compute vfac=(3/(2*Pi))^(2/3) + vfac=(1.5_dp/pi)**(2.0_dp/3.0_dp) +!Compute efac=(3/4)*vfac + efac=0.75_dp*vfac +!Compute dfac=(4*Pi/9)*vfac + dfac=(4.0_dp*pi/9.0_dp)*vfac + +!separate cases with respect to order + if(order==2) then +! Loop over grid points + do ipt=1,npt + rs=rspts(ipt) + rsm1=1.0_dp/rs +! compute energy density (hartree) + exc(ipt)=-alpha*efac*rsm1 +! compute potential (hartree) + vxc(ipt)=-alpha*vfac*rsm1 +! compute d(vxc)/d(rho) (hartree*bohr^3) + dvxc(ipt)=-alpha*dfac*rs**2 + end do + else +! Loop over grid points + do ipt=1,npt + rs=rspts(ipt) + rsm1=1.0_dp/rs +! compute energy density (hartree) + exc(ipt)=-alpha*efac*rsm1 +! compute potential (hartree) + vxc(ipt)=-alpha*vfac*rsm1 + end do + end if +! +end subroutine xcxalp +!!*** + +!!****f* ABINIT/xclb +!! NAME +!! xclb +!! +!! FUNCTION +!! Computes the GGA like part (vx_lb) of the Leeuwen-Baerends +!! exchange-correlation potential (vxc_lb) and adds it to the +!! lda exchange-correlation potential (vxc_lda) which +!! must be provided as input, +!! vxci <-- vxc_lb =: vxc_lda + vx_lb +!! +!! R van Leeuwen and EJ Baerends, Phys Rev A 49, 2421 (1994) [[cite:VanLeeuwen1994]] +!! +!! With respect to spin, the van Leeuwen-Baerends +!! potential is "exchange-like" : separate contributions from +!! spin up and spin down. +!! +!! INPUTS +!! npts= number of points to be computed +!! nspden=1 for unpolarized, 2 for spin-polarized +!! grho2_updn(npts,2*nspden-1)=square of the gradient of the spin-up, +!! and, if nspden==2, spin-down, and total density (Hartree/Bohr**2) +!! rho_updn(npts,nspden)=spin-up and spin-down density (Hartree/bohr**3) +!! +!! OUTPUT +!! (see side effects) +!! +!! SIDE EFFECTS +!! Input/Output: +!! vxci(npts,nspden)=input xc potential to which Leeuwen-Baerends correction +!! is added at output. +!! +!! SOURCE + +subroutine xclb(grho2_updn,npts,nspden,rho_updn,vxci) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: npts,nspden +!arrays + real(dp),intent(in) :: grho2_updn(npts,2*nspden-1),rho_updn(npts,nspden) + real(dp),intent(inout) :: vxci(npts,nspden) + +!Local variables------------------------------- +!scalars + integer :: ipts,ispden + real(dp),parameter :: beta=0.05_dp + real(dp) :: density,density_gradient,density_t13,s_g_sq,scaled_gradient + real(dp) :: scaling_factor,vx_lb + +! ************************************************************************* + +!DEBUG +!write(std_out,*) ' %xclb: enter' +!ENDDEBUG + +!scale the spin densities for evaluating spin up or down exchange + scaling_factor=one + if(nspden == 2) scaling_factor=two + + do ispden=1,nspden + + do ipts=1,npts + + density= scaling_factor * rho_updn(ipts,ispden) + density_gradient= scaling_factor * sqrt(grho2_updn(ipts,ispden)) + + density_t13= density**third + scaled_gradient= density_gradient/max(density*density_t13,1.e-12_dp) + + s_g_sq= scaled_gradient*scaled_gradient + + vx_lb= -beta*density_t13 * s_g_sq/ & +& (one+3.d0*beta* scaled_gradient*log(scaled_gradient+sqrt(one+s_g_sq*s_g_sq))) + + vxci(ipts,ispden)=vxci(ipts,ispden)+vx_lb + end do + + end do + +end subroutine xclb +!!*** + +!!****f* ABINIT/xctfw +!! NAME +!! xctfw +!! +!! FUNCTION +!! Add gradient part of the Thomas-Fermi-Weizsacker functional +!! Perrot F., Phys. Rev. A20, 586-594 (1979) [[cite:Perrot1979]] +!! +!! INPUTS +!! ndvxcdgr= size of dvxcdgr(npts,ndvxcdgr) +!! npts= number of points to be computed +!! nspden=number if spin density component (necessarily 1 here) +!! grho2_updn(npts,2*nspden-1)=square of the gradient of the spin-up, +!! and, if nspden==2, spin-down, and total density (Hartree/Bohr**2), +!! only used if gradient corrected functional (option=2,-2,-4 and 4 or beyond) +!! rho_updn(npts,nspden)=spin-up and spin-down density (Hartree/bohr**3) +!! temp= electronic temperature +!! usefxc=1 if free energy fxc is used +!! +!! SIDE EFFECTS +!! The following arrays are modified (gradient correction added): +!! dvxcdgr(npts,3)=partial derivative of the XC energy divided by the norm of the gradient +!! exci(npts)=exchange-correlation energy density +!! fxci(npts)=free energy energy density +!! vxci(npts,nspden)=exchange-correlation potential +!! +!! SOURCE + +subroutine xctfw(temp,exci,fxci,usefxc,rho_updn,vxci,npts,nspden,dvxcdgr,ndvxcdgr,grho2_updn) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: ndvxcdgr,npts,nspden,usefxc + real(dp),intent(in) :: temp +!arrays + real(dp),intent(in) :: grho2_updn(npts,2*nspden-1),rho_updn(npts,nspden) + real(dp),intent(inout) :: dvxcdgr(npts,ndvxcdgr),fxci(npts*usefxc),exci(npts),vxci(npts,nspden) + +!Local variables------------------------------- +!scalars + integer :: iperrot,ipts + logical :: has_fxc,has_dvxcdgr + real(dp) :: etfw,rho,rho_inv,rhomot,yperrot0,vtfw + real(dp) :: yperrot,uperrot,dyperrotdn,duperrotdyperrot + real(dp) :: hperrot,dhperrotdyperrot,dhperrotdn,dhperrotduperrot +!arrays + real(dp) :: wpy(0:7), wpu(0:7) + real(dp),allocatable :: rho_updnm1_3(:,:) + +! ************************************************************************* + + has_fxc=(usefxc/=0) + has_dvxcdgr=(ndvxcdgr/=0) + + yperrot0=1.666081101_dp + + wpy(0)=0.5_dp; wpy(1)=-0.1999176316_dp + wpy(2)=0.09765615709_dp; wpy(3)=-0.06237609924_dp + wpy(4)=0.05801466322_dp; wpy(5)=-0.04449287774_dp + wpy(6)=0.01903211697_dp; wpy(7)=-0.003284096926_dp + + wpu(0)=one/6._dp; wpu(1)=0.311590799_dp + wpu(2)=3.295662439_dp; wpu(3)=-29.22038326_dp + wpu(4)=116.1084531_dp; wpu(5)=-250.4543147_dp + wpu(6)=281.433688_dp; wpu(7)=-128.8784806_dp + + ABI_MALLOC(rho_updnm1_3,(npts,2)) + + call invcb(rho_updn(:,1),rho_updnm1_3(:,1),npts) + + do ipts=1,npts + + rho =rho_updn(ipts,1) + rhomot=rho_updnm1_3(ipts,1) + rho_inv=rhomot*rhomot*rhomot + + yperrot=pi*pi/sqrt2/temp**1.5*two*rho + uperrot=yperrot**(2./3.) + + dyperrotdn=pi*pi/sqrt2/temp**1.5*2.0_dp + + hperrot=zero + dhperrotdyperrot=zero + dhperrotduperrot=zero + if(yperrot<=yperrot0)then + do iperrot=0,7 + hperrot=hperrot+wpy(iperrot)*yperrot**iperrot + dhperrotdyperrot=dhperrotdyperrot+iperrot*wpy(iperrot)*yperrot**(iperrot-1) + end do + hperrot=one/12.0_dp*hperrot + dhperrotdyperrot=one/12.0_dp*dhperrotdyperrot + dhperrotdn=dhperrotdyperrot*dyperrotdn + else + do iperrot=0,7 + hperrot=hperrot+wpu(iperrot)/uperrot**(2*iperrot) + dhperrotduperrot=dhperrotduperrot-2.*iperrot*wpu(iperrot)/uperrot**(2*iperrot+1) + end do + hperrot=one/12.0_dp*hperrot + dhperrotduperrot=one/12.0_dp*dhperrotduperrot + duperrotdyperrot=two/3._dp/yperrot**(1./3.) + dhperrotdn=dhperrotduperrot*duperrotdyperrot*dyperrotdn + end if + + etfw=hperrot*grho2_updn(ipts,1)*rho_inv*rho_inv + vtfw=-etfw + rho/hperrot*dhperrotdn*etfw + + if(yperrot<=yperrot0)then + exci(ipts) = exci(ipts) + etfw + 1.5_dp*yperrot*dhperrotdyperrot*grho2_updn(ipts,1)*rho_inv*rho_inv + else + exci(ipts) = exci(ipts) + etfw + uperrot*dhperrotduperrot*grho2_updn(ipts,1)*rho_inv*rho_inv + end if + vxci(ipts,1) = vxci(ipts,1) + vtfw + if (has_fxc) fxci(ipts) = fxci(ipts) + etfw + if (has_dvxcdgr) dvxcdgr(ipts,1)= dvxcdgr(ipts,1)+two*hperrot*rho_inv + + end do + + ABI_FREE(rho_updnm1_3) + +end subroutine xctfw +!!*** + +end module m_xclda +!!*** diff --git a/GX-PAW/common/src/33_xc_lowlevel/m_xclda.o b/GX-PAW/common/src/33_xc_lowlevel/m_xclda.o new file mode 100644 index 00000000..48b2d6a7 Binary files /dev/null and b/GX-PAW/common/src/33_xc_lowlevel/m_xclda.o differ diff --git a/GX-PAW/common/src/33_xc_lowlevel/m_xcpbe.F90 b/GX-PAW/common/src/33_xc_lowlevel/m_xcpbe.F90 new file mode 100644 index 00000000..a1f31411 --- /dev/null +++ b/GX-PAW/common/src/33_xc_lowlevel/m_xcpbe.F90 @@ -0,0 +1,5153 @@ +!!****m* ABINIT/m_xcpbe +!! NAME +!! m_xcpbe +!! +!! FUNCTION +!! Treat XC functionals closely linked with the Perdew-Wang 92 LSD and the PBE GGA. +!! +!! COPYRIGHT +!! Copyright (C) 1998-2024 ABINIT group (XG,MF,LG,CE) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" + +module m_xcpbe + + use defs_basis + use m_abicore + use m_errors + + use m_numeric_tools, only : invcb + + implicit none + + private +!!*** + + public :: xcpbe +!!*** + +contains +!!*** + +!!****f* ABINIT/xcpbe +!! NAME +!! xcpbe +!! +!! FUNCTION +!! Treat XC functionals closely linked with the Perdew-Wang 92 LSD and the PBE GGA. +!! +!! For a series of values of the density and, if GGA, the square of the +!! gradient of the density, return the associated Exc energy, +!! potential, and, in case of response-function, functions needed +!! to build the XC kernel. +!! +!! If option==2, Exchange-correlation functional from Perdew-Burke-Ernzerhof, +!! Phys.Rev.Lett. 77, 3866 (1996) [[cite:Perdew1996]]. +!! If option==1, Reduces to Perdew-Wang LSD , PRB45,13244 (1992) [[cite:Perdew1992]]. +!! If option==-1 or -2, take only exchange part of PW (-1) or PBE (-2) functionals. +!! If option==-4, C09x exchange functional of V. R. Cooper, PRB 81, 161104(R) (2010) [[cite:Cooper2010]]. +!! If option==3 or 4, take exchange plus RPA correlation +!! part of LSD PW (3) or GGA PBE (4) functionals. +!! If option==5, revPBE functional of Zhang and Yang, PRL 80, 890 (1998) [[cite:Zhang1998]] +!! If option==6, RPBE functional of Hammer, Hansen and Norskov, PRB 59, 7413 (1999) [[cite:Hammer1999]] +!! If option==7, WC functional of Wu and Cohen, PRB 73, 235116 (2006) [[cite:Wu2006]] +!! +!! INPUTS +!! exexch= choice of local exact exchange. Active if exexch=1 +!! npts= number of points to be computed +!! nspden=1 for unpolarized, 2 for spin-polarized +!! grho2_updn(npts,2*nspden-1)=square of the gradient of the spin-up, +!! and, if nspden==2, spin-down, and total density (Hartree/Bohr**2), +!! only used if gradient corrected functional (option=2,-2,-4 and 4 or beyond) +!! option= see above +!! order=its absolute value gives the maximal derivative of Exc to be computed. +!! rho_updn(npts,nspden)=spin-up and spin-down density (Hartree/bohr**3) +!! ndvxci= size of dvxci(npts,ndvxci) +!! nd2vxci=size of d2vxci(npts,nd2vxci) +!! +!! OUTPUT +!! d2vxci=third derivative of the xc energy with respect to the density, only +!! only if local-density approximation +!! calculated if order==3 +!! In case of local energy functional (option=1,-1 or 3): +!! d2vxci(npts,nd2vxc)= (Hartree*bohr^3) +!! if(nspden=1): d2vxci(:,1)=-(2/3)*dvxci/d$\rho$ +!! (dvxci is the second derivative, see below) +!! if(nspden=2): d2vxci(:,1)=3rd order derivative of XC energy with respect to rhouprhouprhoup, +!! d2vxci(:,2)=3rd order derivative of XC energy with respect to rhouprhouprhodn +!! d2vxci(:,3)=3rd order derivative of XC energy with respect to rhodnrhouprhodn +!! d2vxci(:,4)=3rd order derivative of XC energy with respect to rhodnrhodnrhodn +!! dvxcdgr(npts,3)=partial derivative of the exchange-correlation +!! energy (exci*$\rho$) with respect to the spin-up (dvxcdgr(:,1)), +!! spin-down (dvxcdgr(:,2)), or total spin (dvxcdgr(:,3)) gradients of the density +!! divided by the norm of the gradient (the definition changed in v3.3) +!! +!! dvxci=partial second derivatives of the xc energy, only if abs(order)>1 +!! In case of local energy functional (option=1,-1 or 3): +!! dvxci(npts,1+nspden)= (Hartree*bohr^3) +!! if(nspden=1 .and. order==2): dvxci(:,1)=dvxc/d$\rho$ , dvxc(:,2) empty +!! if(nspden=1 .and. order==-2): also compute dvxci(:,2)=dvxc($\uparrow$)/d$\rho(\downarrow)$ +!! if(nspden=2): dvxci(:,1)=dvxc($\uparrow$)/d$\rho(\uparrow)$, +!! dvxci(:,2)=dvxc($\uparrow$)/d$\rho(\downarrow)$, +!! dvxci(:,3)=dvxc($\downarrow$)/d$\rho(\downarrow)$ +!! In case of gradient corrected functional (option=2,-2, 4, 5, 6, -4): +!! dvxci(npts,15)= +!! dvxci(:,1)= d2Ex/drho_up drho_up +!! dvxci(:,2)= d2Ex/drho_dn drho_dn +!! dvxci(:,3)= dEx/d(abs(grad(rho_up))) / abs(grad(rho_up)) +!! dvxci(:,4)= dEx/d(abs(grad(rho_dn))) / abs(grad(rho_dn)) +!! dvxci(:,5)= d2Ex/d(abs(grad(rho_up))) drho_up / abs(grad(rho_up)) +!! dvxci(:,6)= d2Ex/d(abs(grad(rho_dn))) drho_dn / abs(grad(rho_dn)) +!! dvxci(:,7)= 1/abs(grad(rho_up)) * d/drho_up (dEx/d(abs(grad(rho_up))) /abs(grad(rho_up))) +!! dvxci(:,8)= 1/abs(grad(rho_dn)) * d/drho_dn (dEx/d(abs(grad(rho_dn))) /abs(grad(rho_dn))) +!! dvxci(:,9)= d2Ec/drho_up drho_up +!! dvxci(:,10)=d2Ec/drho_up drho_dn +!! dvxci(:,11)=d2Ec/drho_dn drho_dn +!! dvxci(:,12)=dEc/d(abs(grad(rho))) / abs(grad(rho)) +!! dvxci(:,13)=d2Ec/d(abs(grad(rho))) drho_up / abs(grad(rho)) +!! dvxci(:,14)=d2Ec/d(abs(grad(rho))) drho_dn / abs(grad(rho)) +!! dvxci(:,15)=1/abs(grad(rho)) * d/drho (dEc/d(abs(grad(rho))) /abs(grad(rho))) +!! +!! exci(npts)=exchange-correlation energy density (hartree) +!! vxci(npts,nspden)=partial derivative of the exchange-correlation energy (exci*$\rho$) +!! with respect to the spin-down (vxci(:,1)) and spin-up (vxci(:,2) densities +!! Normalization: Exc=$\int (exc(r)*\rho (r) d^3 r)$ for $\rho$(r)=electron density. +!! +!! TODO +!! WARNING: option=4 not yet implemented. +!! +!! SOURCE + +subroutine xcpbe(exci,npts,nspden,option,order,rho_updn,vxci,ndvxci,nd2vxci, & !Mandatory Arguments +& d2vxci,dvxcdgr,dvxci,exexch,grho2_updn) !Optional Arguments + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: ndvxci,nd2vxci,npts,nspden,option,order + integer,intent(in),optional :: exexch +!arrays + real(dp),intent(in) :: rho_updn(npts,nspden) + real(dp),intent(in),optional :: grho2_updn(npts,2*nspden-1) + real(dp),intent(out) :: exci(npts),vxci(npts,nspden) + real(dp),intent(out),optional :: d2vxci(npts,nd2vxci),dvxcdgr(npts,3) + real(dp),intent(out),optional :: dvxci(npts,ndvxci) + +!Local variables------------------------------- +! The "accurate" value of mu is taken from the PBE code. +! The value of mu_c09 is taken from the paper (see above) in order to recover +! the GEA behaviour of the enhancement factor for small values of s rather than +! the LSD linear response limit used in revPBE. +!scalars + integer,save :: initialized=0 + integer :: exexch_,ipts,ispden + real(dp),parameter :: alpha_c09=0.0483_dp +!GMR (to match Libxc one should comment the next line and uncomment the following ) + real(dp),parameter :: alpha_zeta2=1.0_dp-1.0e-6_dp,alpha_zeta=1.0_dp-1.0e-6_dp +!real(dp),parameter :: alpha_zeta2=1.0_dp,alpha_zeta=1.0_dp +!GMR +!GMR (to match Libxc one should comment the next line and uncomment the following ) + real(dp),parameter :: b_wc=0.123456790123_dp,beta=0.066725_dp +!real(dp),parameter :: b_wc=0.123456790123_dp,beta=0.06672455060314922_dp +!GMR + real(dp),parameter :: beta_inv=1.0_dp/beta,c_wc=0.00793746933516_dp +!GMR (to match Libxc one should comment the next line and uncomment the following two) + real(dp),parameter :: fsec_inv=1.0_dp/1.709921_dp,kappa_pbe=0.804_dp +!real(dp),parameter :: fsec_inv=1.0_dp/1.709920934161365617563962776245_dp +!real(dp),parameter :: kappa_pbe=0.804_dp +!GMR + real(dp),parameter :: kappa_revpbe=1.245_dp,mu=0.2195149727645171_dp + real(dp),parameter :: kappa_c09=1.245_dp, mu_c09=0.0617_dp + real(dp),parameter :: mu_divkappa_pbe=mu/kappa_pbe + real(dp),parameter :: mu_divkappa_revpbe=mu/kappa_revpbe + real(dp),parameter :: rsfac=0.6203504908994000_dp,tolgrad=tol10 + real(dp),save :: beta_gamma,coeff_tt,factf_zeta,factfp_zeta,gamma,gamma_inv + real(dp),save :: sixpi2_1_3,sixpi2m1_3,sq_rsfac,sq_rsfac_inv,threefourth_divpi,twom1_3 + real(dp) :: aa,arg_rr,bb,cc,coeff_aa,alphs2,alphmu,coeff_qq,coeffss,d2aa_drs2,d2aa_drsdzeta + real(dp) :: d2aa_dzeta2,d2bb_drs2,d2bb_drsdzeta,d2bb_dzeta2,d2cc_dbb2 + real(dp) :: d2cc_drs2,d2cc_drsdzeta,d2cc_dzeta2,d2ecrs0_drs2,d2ecrs1_drs2 + real(dp) :: d2ecrs_drdn2,d2ecrs_drdndrup,d2ecrs_drho2,d2ecrs_drs2 + real(dp) :: d2ecrs_drsdzeta,d2ecrs_drup2,d2ecrs_dzeta2,d2fxdg2,d2fxdn2 + real(dp) :: d2fxdndg,d2fxdss2,d2fzeta4_dzeta2,d2gcrs_drs2,d2hh_drs2 + real(dp) :: d2hh_drsdtt,d2hh_drsdzeta,d2hh_dtt2,d2hh_dttdzeta,d2hh_dzeta2 + real(dp) :: d2macrs_drs2,d2pade_drs2,d2pade_drsdtt,d2pade_drsdzeta,d2pade_dtt2 + real(dp) :: d2pade_dttdzeta,d2pade_dxx2,d2pade_dzeta2,d2qq_drs2,d2qq_drsdtt + real(dp) :: d2qq_drsdzeta,d2qq_dtt2,d2qq_dttdzeta,d2qq_dzeta2,d2rhohh_drho2 + real(dp) :: d2rhohh_drhodg,d2rr_dqq2,d2rr_drs2,d2rr_drsdtt,d2rr_drsdzeta + real(dp) :: d2rr_dtt2,d2rr_dttdzeta,d2rr_dzeta2,d2rs_dn2,d2ssdn2,d2ssdndg + real(dp) :: d2vcrs_drs2,d2xx_drs2,d2xx_drsdtt,d2xx_drsdzeta,d2xx_dttdzeta + real(dp) :: d2xx_dzeta2,d3ecrs0_drs3,d3ecrs_drup3,d3ecrs_drup2drdn + real(dp) :: d3ecrs_drupdrdn2,d3ecrs_drdn3,d3ecrs_dzeta3 + real(dp) :: d3ecrs_drs2dzeta,d3ecrs_dzeta2drs,d3ecrs1_drs3,d3gcrs_drs3 + real(dp) :: d3ecrs_drs3,d3macrs_drs3 + real(dp) :: d_wc,daa_drs,daa_dzeta,dbb_drs,dbb_dzeta + real(dp) :: dcc_dbb,dcc_drs,dcc_dzeta,decrs0_drs,decrs1_drs,decrs_drs + real(dp) :: decrs_dzeta,dfxdg,dfxdn,dfxdss,dfzeta4_dzeta,dgcrs_drs + real(dp) :: dhh_drs,dhh_dtt,dhh_dzeta,div_rr,divss,dmacrs_drs,dpade_drs + real(dp) :: dpade_dtt,dpade_dxx,dpade_dzeta,dqq_drs,dqq_dtt,dqq_dzeta + real(dp) :: drhohh_drho,drr_dqq,drr_drs,drr_dtt,drr_dzeta,drs_dn,dssdg,dssdn + real(dp) :: dtt_dg,dvcrs_drs,dxx_drs,dxx_dtt,dxx_dzeta,ec0_a1,ec0_aa,ec0_b1 + real(dp) :: ec0_b2,ec0_b3,ec0_b4,ec0_den,ec0_f1,ec0_f2,ec0_log,ec0_q0,ec0_q1 + real(dp) :: ec0_q1p,ec0_q1pp,ec0_q1ppp,ec1_a1,ec1_aa,ec1_b1,ec1_b2,ec1_b3 + real(dp) :: ec1_b4,ec1_den,ec1_f1,ec1_f2,ec1_log,ec1_q0,ec1_q1,ec1_q1p,ec1_q1pp + real(dp) :: ec1_q1ppp,ecrs,ecrs0,factfppp_zeta + real(dp) :: ecrs1,ex_gga,ex_lsd,exc,exp_pbe,expss,f_zeta,factfpp_zeta + real(dp) :: fp_zeta,fpp_zeta,fppp_zeta,fx,gamphi3inv,gcrs,grrho2,hh,kappa + real(dp) :: mac_a1,mac_aa,mac_b1,mac_b2,mac_b3,mac_b4,mac_den,mac_f1,mac_f2,mac_log,mac_q0 + real(dp) :: mac_q1,mac_q1ppp + real(dp) :: mac_q1p,mac_q1pp,macrs,mu_divkappa,p1_wc,p2_wc,pade,pade_den + real(dp) :: phi3_zeta,phi_logder,phi_zeta,phi_zeta_inv,phip_zeta,phipp_zeta,qq + real(dp) :: rho,rho_inv,rhomot + real(dp) :: rhotmo6,rhotmot,rhoto6,rhotot,rhotot_inv,rr,rs,rsm1_2,sqr_rs + real(dp) :: sqr_sqr_rs,ss,tt,vxcadd,xx,zeta,zeta4,zetm_1_3,zetp_1_3 + real(dp) :: a1fa,a2fa,b1fa,b2fa,c1fa,c2fa,e1fa,e2fa,f1fa,f2fa,g1fa,g2fa,h1fa,h2fa + real(dp) :: i1fa,i2fa,m1fa,m2fa,n1fa,n2fa + real(dp) :: sp1_up3,sp1_up2dn,sp1_updn2,sp1_dn3 + real(dp) :: sp2_up3,sp2_up2dn,sp2_updn2,sp2_dn3 + real(dp) :: sp3_up3,sp3_up2dn,sp3_updn2,sp3_dn3 + real(dp) :: d3ecrs_sp0,d3ecrs_sp1,d3ecrs_sp2,d3ecrs_sp3 + character(len=500) :: message +!arrays + real(dp),allocatable :: rho_updnm1_3(:,:),rhoarr(:),rhom1_3(:),zetm(:) + real(dp),allocatable :: zetmm1_3(:),zetp(:),zetpm1_3(:) +!no_abirules +!integer :: debug +!real(dp) :: delta,factor,grr,rho_dn,rho_dnm,rho_dnp,rho_up,rho_upm,rho_upp,zeta_mean +!real(dp), allocatable :: wecrsz(:,:),d1wecrsz(:,:),d2wecrsz(:,:),d3wecrsz(:,:) +!real(dp) :: d3ecrs_drho3,d3ecrs_drhodndrho2,d3ecrs_drhoupdrho2 +!real(dp) :: ec1_q0p,mac_q0p,sigma1,sigma2,sigma3 + +! ************************************************************************* + +!DEBUG +!write(std_out,*)' xcpbe : enter' +!ENDDEBUG + + d_wc=mu-b_wc + exexch_=0;if(present(exexch)) exexch_=exexch + +!DEBUG +!allocate(wecrsz(npts,8),d1wecrsz(npts,8),d2wecrsz(npts,8),d3wecrsz(npts,8)) +!ENDDEBUG + + if (option<=-4 .or. option==0 .or. option==4 .or. option>=8 ) then + write(message, '(a,a,a,a,i12,a)' ) ch10,& +& ' xcpbe : BUG -',ch10,& +& ' Option must be 1, 2, 3, 5, 6, 7, 8, -1 or -2 ; argument was ',option,'.' +! ABI_BUG(message) + end if + +!Checks the compatibility between the presence of dvxci and ndvxci + if(ndvxci /=0 .neqv. present(dvxci))then + message = ' If ndvxci/=0 there must the optional argument dvxci' + ABI_BUG(message) + end if + +!Checks the compatibility between the inputs and the presence of the optional arguments + if(ndvxci /= 0 .and. abs(order) <= 1)then + write(message, '(3a,i8,a)' )& +& 'The order does not require the presence of dvxci',ch10,& +& 'that is allowed when |order|>1, while we have',order,'.' + ABI_BUG(message) + end if + + if(ndvxci /= 0 .and. (& +& ((option == 1 .or. option == -1 .or. option == 3) .and. ndvxci /= nspden + 1)& +& .or. (option == -2 .and. ndvxci /= 8)& +& .or. ((option == 2 .or. option == 5 .or. option == 6 .or. option == 7 .or. option == 8) .and. ndvxci /= 15)& +& ))then + write(message, '(12a,4(a,i5))' )& +& ' The option is not consistent with the value of ndvxci',ch10,& +& ' Allowed values are:',ch10,& +& ' ndvxci option',ch10,& +& ' nspden+1 1,-1,3',ch10,& +& ' 8 -2',ch10,& +& ' 15 2, 5,6,7',ch10,& +& ' While we have: ndvxc=',ndvxci,', option=',option,', nspden=',nspden,', order=',order + ABI_BUG(message) + end if + + if ((option == 1 .or. option == -1 .or. option ==3) .and. (present(grho2_updn) .or. present(dvxcdgr))) then + write(message, '(a,a,a,i6,a)' )& +& 'The option chosen does not need the presence',ch10,& +& 'of the gradient, or of the array dvxcdgr in the input, needed if option/=1,-1,3 , while we have',option,'.' + ABI_BUG(message) + end if + + if (order /= 3 .and. present(d2vxci)) then + write(message, '(a,a,a,i6,a)' )& +& 'The order chosen does not need the presence',ch10,& +& 'of the array d2vxci, needed if order=3 , while we have',order,'.' + ABI_BUG(message) + end if + + if(initialized==0)then + twom1_3=two**(-third) + sixpi2_1_3=(six*pi**2)**third + sixpi2m1_3=one/sixpi2_1_3 + threefourth_divpi=three_quarters*piinv + gamma=(one-log(two))*piinv**2 + gamma_inv=one/gamma + beta_gamma=beta*gamma_inv + factf_zeta= one / ( two**(four/three)-two ) + factfp_zeta= four_thirds * factf_zeta * alpha_zeta2 + coeff_tt= one/ (four*four*piinv*(three*pi**2)**third) +! coeff_tt= two * sqrt(four*piinv*(three*pi**2)**third) + sq_rsfac=sqrt(rsfac) + sq_rsfac_inv=one/sq_rsfac + initialized=1 + end if + +!Parameters for the Perdew-Wang 92 LSD as well as LSD-RPA, +!see Table I of Phys.Rev.B 45,13244 (1992) [[cite:Perdew1992]] +!GMR (to match Libxc one should comment the next line and uncomment the following two) + ec0_aa=0.031091_dp ; ec1_aa=0.015545_dp ; mac_aa=0.016887_dp +!ec0_aa=0.0310907_dp ; ec1_aa=0.01554535_dp ; mac_aa=0.0168869_dp +!GMR + if(option/=3 .and. option/=4)then + ec0_a1=0.21370_dp ; ec1_a1=0.20548_dp ; mac_a1=0.11125_dp + ec0_b1=7.5957_dp ; ec1_b1=14.1189_dp ; mac_b1=10.357_dp + ec0_b2=3.5876_dp ; ec1_b2=6.1977_dp ; mac_b2=3.6231_dp + ec0_b3=1.6382_dp ; ec1_b3=3.3662_dp ; mac_b3=0.88026_dp + ec0_b4=0.49294_dp ; ec1_b4=0.62517_dp ; mac_b4=0.49671_dp + else ! RPA values + ec0_a1=0.082477_dp ; ec1_a1=0.035374_dp ; mac_a1=0.028829_dp + ec0_b1=5.1486_dp ; ec1_b1=6.4869_dp ; mac_b1=10.357_dp + ec0_b2=1.6483_dp ; ec1_b2=1.3083_dp ; mac_b2=3.6231_dp + ec0_b3=0.23647_dp ; ec1_b3=0.11518_dp ; mac_b3=0.479_dp + ec0_b4=0.20614_dp ; ec1_b4=0.082349_dp ; mac_b4=0.112279_dp + end if + + if(option/=5 .and. option/=-4)then + kappa=kappa_pbe + mu_divkappa=mu_divkappa_pbe + end if + if(option==5)then + kappa=kappa_revpbe + mu_divkappa=mu_divkappa_revpbe + end if + if(option==-4)then + kappa=kappa_c09 + end if +!DEBUG +!Finite-difference debugging, do not take away +!Note : here work with collinear gradients. Might be generalized ... +!debug=2 ! Choose 1 (rho grads) or 2 (grho grads) +!if(order==3)debug=1 +!factor=1.0_dp +!zeta_mean=0.98_dp +!!zeta_mean=zero +!delta=0.000025*factor +!delta=0.0000125*factor +!if(debug/=0)then +!do ipts=1,npts-4,5 +!rho=ipts*0.01_dp*factor +!rho_up=rho*(1.0_dp+zeta_mean)*0.5_dp +!rho_dn=rho*(1.0_dp-zeta_mean)*0.5_dp +!rho_upp=rho_up+delta +!rho_upm=rho_up-delta +!rho_dnp=rho_dn+delta +!rho_dnm=rho_dn-delta +!! Here, vary rho +!if(debug==1)then +!rho_updn(ipts ,1)=rho_up ; rho_updn(ipts ,2)=rho_dn +!rho_updn(ipts+1,1)=rho_upp; rho_updn(ipts+1,2)=rho_dn +!rho_updn(ipts+2,1)=rho_upm; rho_updn(ipts+2,2)=rho_dn +!rho_updn(ipts+3,1)=rho_up ; rho_updn(ipts+3,2)=rho_dnp +!rho_updn(ipts+4,1)=rho_up ; rho_updn(ipts+4,2)=rho_dnm +!grho2_updn(ipts:ipts+4,1)=(0.2_dp*factor)**2 ! grad2 of spin up density +!grho2_updn(ipts:ipts+4,2)=(0.2_dp*factor)**2 ! grad2 of spin down density +!grho2_updn(ipts:ipts+4,3)=(0.3_dp*factor)**2 ! grad2 of total density +!else +!! Here, vary grho (interchange rho and grho) +!grho2_updn(ipts ,1)=rho_up**2 ; grho2_updn(ipts ,2)=rho_dn**2 +!grho2_updn(ipts+1,1)=rho_upp**2; grho2_updn(ipts+1,2)=rho_dn**2 +!grho2_updn(ipts+2,1)=rho_upm**2; grho2_updn(ipts+2,2)=rho_dn**2 +!grho2_updn(ipts+3,1)=rho_up**2 ; grho2_updn(ipts+3,2)=rho_dnp**2 +!grho2_updn(ipts+4,1)=rho_up**2 ; grho2_updn(ipts+4,2)=rho_dnm**2 +!grho2_updn(ipts ,3)=(ipts*0.01_dp*factor)**2 +!grho2_updn(ipts+1,3)=(ipts*0.01_dp*factor+delta)**2 +!grho2_updn(ipts+2,3)=(ipts*0.01_dp*factor-delta)**2 +!grho2_updn(ipts+3,3)=(ipts*0.01_dp*factor+delta)**2 ! identical to ipts+1 +!grho2_updn(ipts+4,3)=(ipts*0.01_dp*factor-delta)**2 ! identical to ipts+2 +!rho_updn(ipts:ipts+4,1)=0.2_dp*factor*(1.0_dp+zeta_mean)*0.5_dp ! spin up density +!rho_updn(ipts:ipts+4,2)=0.2_dp*factor*(1.0_dp-zeta_mean)*0.5_dp ! spin down density +!end if +!end do +!end if +!Usual option : +!nspden=2 ; order=2 +!GGA +!nspden=2 ; order=1 +!Might take also, although finite difference later is meaningless +!nspden=1 ; order=-2 +!Here, alternative specification, in terms of defined rs and zeta +!do ipts=1,5 +!if(ipts==1)then ;rs=0.01_dp ; zeta=0.98_dp ; endif +!if(ipts==2)then ;rs=0.01_dp+delta ; zeta=0.98_dp ; endif +!if(ipts==3)then ;rs=0.01_dp-delta ; zeta=0.98_dp ; endif +!if(ipts==4)then ;rs=0.01_dp ; zeta=0.98_dp+delta ; endif +!if(ipts==5)then ;rs=0.01_dp ; zeta=0.98_dp-delta ; endif +!rho=(rsfac/rs)**3 +!rho_up=rho*(1.0_dp+zeta)*0.5_dp +!rho_dn=rho*(1.0_dp-zeta)*0.5_dp +!rho_updn(ipts ,1)=rho_up ; rho_updn(ipts ,2)=rho_dn +!enddo +!ENDDEBUG + + if(order**2 >1)then + factfpp_zeta= third * factfp_zeta * alpha_zeta2 + end if + + + ABI_MALLOC(rhoarr,(npts)) + ABI_MALLOC(rhom1_3,(npts)) + ABI_MALLOC(rho_updnm1_3,(npts,2)) + ABI_MALLOC(zetm,(npts)) + ABI_MALLOC(zetmm1_3,(npts)) + ABI_MALLOC(zetp,(npts)) + ABI_MALLOC(zetpm1_3,(npts)) + + do ispden=1,nspden + call invcb(rho_updn(:,ispden),rho_updnm1_3(:,ispden),npts) + end do + + + if(nspden==1)then + rhoarr(:)=two*rho_updn(:,1) + rhom1_3(:)=twom1_3*rho_updnm1_3(:,1) + rho_updnm1_3(:,2)=rho_updnm1_3(:,1) + else + rhoarr(:)=rho_updn(:,1)+rho_updn(:,2) + call invcb(rhoarr,rhom1_3,npts) + do ipts=1,npts + rhotmot=rhom1_3(ipts) + rhotot_inv=rhotmot*rhotmot*rhotmot + zeta=(rho_updn(ipts,1)-rho_updn(ipts,2))*rhotot_inv + zetp(ipts)=1.0_dp+zeta*alpha_zeta + zetm(ipts)=1.0_dp-zeta*alpha_zeta + end do + call invcb(zetp,zetpm1_3,npts) + call invcb(zetm,zetmm1_3,npts) + end if + + +!fab: eliminate the following restriction + +!if (order==3 .and. nspden == 1) d2vxci(:,:)=0._dp + + + if (order==3) d2vxci(:,:)=0._dp + +!!!Loop unrolling summary +!Completely unrolled for spin non-polarized case +!To be optimized for spin-polarized cases +!The loops are unrolled as follows: +!nspden=1 (line 433) +!order^2<=1 (line 460) +!option=2,5 (line 462) +!option=6,7 (line 630) +!option=-1 (line 825) +!option=-2 (line 853) +!option=1 (line 904) +!option=3 (line 963) +!order=3 (line 1024) +!option=2,5 +!option=6,7 +!option=-1 +!option=-2 +!option=1 +!option=3 +!order=-2 (line 1983) +!option=2,5 +!option=6,7 +!option=-1 +!option=-2 +!option=1 +!option=3 +!order^2>1 (line 2875) +!option=2,5 +!option=6,7 +!option=-1 +!option=-2 +!option=1 +!option=3 +!nspden=2 (line 3750) +!order^2<=1 (line 3754) +!order^2>1 (with if statements inside distinguishing between order=3 or -2) (line 4000) +!!!End loop unrolling summary + +!we separate different cases, depending on nspden + if (nspden==1) then +! we separate different cases, depending on order + if (order**2<=1) then +! we separate different cases, depending on option + if(option==2 .or. option==5)then + + do ipts=1,npts + + rhotot=rhoarr(ipts) + rhotmot=rhom1_3(ipts) + rhotot_inv=rhotmot*rhotmot*rhotmot + rhotmo6=sqrt(rhotmot) + rhoto6=rhotot*rhotmot*rhotmot*rhotmo6 +! ----------------------------------------------------------------------- +! First take care of the exchange part of the functional + + exc=zero + dvxcdgr(ipts,3)=zero +! loop over the spin + ispden=1 + rho =rho_updn(ipts,ispden) + rhomot=rho_updnm1_3(ipts,ispden) + ex_lsd= - threefourth_divpi * sixpi2_1_3*rhomot*rhomot*rho +! Perdew-Burke-Ernzerhof GGA, exchange part + rho_inv=rhomot*rhomot*rhomot + coeffss=quarter*sixpi2m1_3*sixpi2m1_3*rho_inv*rho_inv*rhomot*rhomot + ss=grho2_updn(ipts,ispden)*coeffss + divss=one/(one+mu_divkappa*ss) + dfxdss= mu*divss*divss + d2fxdss2=-mu*two*mu_divkappa*divss*divss*divss + fx = one+kappa*(one-divss) + ex_gga= ex_lsd*fx + dssdn=-eight*third*ss*rho_inv + dfxdn = dfxdss*dssdn + vxci(ipts,ispden)=ex_lsd*(four_thirds*fx+rho*dfxdn) +! The new definition (v3.3) includes the division by the norm of the gradient + dssdg =two*coeffss + dfxdg=dfxdss*dssdg + dvxcdgr(ipts,ispden)=ex_lsd*rho*dfxdg + exc=exc+ex_gga*rho + +! end of loop over the spin +! If non spin-polarized, treat spin down contribution now, similar to spin up + exc=exc*2 + exci(ipts)=exc*rhotot_inv + if(exexch_==1) cycle +! ----------------------------------------------------------------------------- +! Then takes care of the LSD correlation part of the functional + + + rs=rsfac*rhotmot + sqr_rs=sq_rsfac*rhotmo6 + rsm1_2=sq_rsfac_inv*rhoto6 + +! Formulas A6-A8 of PW92LSD + ec0_q0=-2.0_dp*ec0_aa*(1.0_dp+ec0_a1*rs) + ec0_q1=2.0_dp*ec0_aa*(ec0_b1*sqr_rs+ec0_b2*rs+ec0_b3*rs*sqr_rs+ec0_b4*rs*rs) + ec0_q1p=ec0_aa*(ec0_b1*rsm1_2+2._dp*ec0_b2+3._dp*ec0_b3*sqr_rs+4._dp*ec0_b4*rs) + ec0_den=1.0_dp/(ec0_q1*ec0_q1+ec0_q1) +! ec0_log=log( 1.0_dp + 1.0_dp / ec0_q1 ) + ec0_log=-log( ec0_q1*ec0_q1*ec0_den ) + ecrs0=ec0_q0*ec0_log + decrs0_drs= -2.0_dp*ec0_aa*ec0_a1*ec0_log - ec0_q0*ec0_q1p *ec0_den + + ecrs=ecrs0 + decrs_drs=decrs0_drs + decrs_dzeta=0.0_dp + zeta=0.0_dp + +! Add LSD correlation functional to GGA exchange functional + exci(ipts)=exci(ipts)+ecrs + vxci(ipts,1)=vxci(ipts,1)+ecrs-rs*third*decrs_drs + + +! ----------------------------------------------------------------------------- +! Eventually add the GGA correlation part of the PBE functional +! Note : the computation of the potential in the spin-unpolarized +! case could be optimized much further. Other optimizations are left to do. + + phi_zeta=1.0_dp + phip_zeta=0.0_dp + phi_zeta_inv=1.0_dp + phi_logder=0.0_dp + phi3_zeta=1.0_dp + gamphi3inv=gamma_inv + phipp_zeta=-two*ninth*alpha_zeta*alpha_zeta + +! From ec to bb + bb=ecrs*gamphi3inv + dbb_drs=decrs_drs*gamphi3inv + dbb_dzeta=gamphi3inv*(decrs_dzeta-three*ecrs*phi_logder) + +! From bb to cc + exp_pbe=exp(-bb) + cc=one/(exp_pbe-one) + dcc_dbb=cc*cc*exp_pbe + dcc_drs=dcc_dbb*dbb_drs + dcc_dzeta=dcc_dbb*dbb_dzeta + +! From cc to aa + coeff_aa=beta*gamma_inv*phi_zeta_inv*phi_zeta_inv + aa=coeff_aa*cc + daa_drs=coeff_aa*dcc_drs + daa_dzeta=-two*aa*phi_logder+coeff_aa*dcc_dzeta + +! Introduce tt : do not assume that the spin-dependent gradients are collinear + grrho2=four*grho2_updn(ipts,1) + dtt_dg=two*rhotot_inv*rhotot_inv*rhotmot*coeff_tt +! Note that tt is (the t variable of PBE divided by phi) squared + tt=half*grrho2*dtt_dg + +! Get xx from aa and tt + xx=aa*tt + dxx_drs=daa_drs*tt + dxx_dzeta=daa_dzeta*tt + dxx_dtt=aa + +! From xx to pade + pade_den=one/(one+xx*(one+xx)) + pade=(one+xx)*pade_den + dpade_dxx=-xx*(two+xx)*pade_den**2 + dpade_drs=dpade_dxx*dxx_drs + dpade_dtt=dpade_dxx*dxx_dtt + dpade_dzeta=dpade_dxx*dxx_dzeta + +! From pade to qq + coeff_qq=tt*phi_zeta_inv*phi_zeta_inv + qq=coeff_qq*pade + dqq_drs=coeff_qq*dpade_drs + dqq_dtt=pade*phi_zeta_inv*phi_zeta_inv+coeff_qq*dpade_dtt + dqq_dzeta=coeff_qq*(dpade_dzeta-two*pade*phi_logder) + +! From qq to rr + arg_rr=one+beta*gamma_inv*qq + div_rr=one/arg_rr + rr=gamma*log(arg_rr) + drr_dqq=beta*div_rr + drr_drs=drr_dqq*dqq_drs + drr_dtt=drr_dqq*dqq_dtt + drr_dzeta=drr_dqq*dqq_dzeta + +! From rr to hh + hh=phi3_zeta*rr + dhh_drs=phi3_zeta*drr_drs + dhh_dtt=phi3_zeta*drr_dtt + dhh_dzeta=phi3_zeta*(drr_dzeta+three*rr*phi_logder) + +! The GGA correlation energy is added + exci(ipts)=exci(ipts)+hh + +! Change of variables : from (rs,zeta,tt) to (rhoup,rhodn,grrho) + +! From hh to the derivative of the energy wrt the density + drhohh_drho=hh-third*rs*dhh_drs-zeta*dhh_dzeta-seven*third*tt*dhh_dtt + vxci(ipts,1)=vxci(ipts,1)+drhohh_drho + +! From hh to the derivative of the energy wrt to the gradient of the +! density, divided by the gradient of the density +! (The v3.3 definition includes the division by the norm of the gradient) + dvxcdgr(ipts,3)=rhotot*dtt_dg*dhh_dtt + +! End condition of GGA + +! Correlation has been added +! ----------------------------------------------------------------------------- + +! vxci(ipts,2)=vxci(ipts,1) + dvxcdgr(ipts,2)=dvxcdgr(ipts,1) + + end do + else if((option==6) .or. (option==7)) then + + do ipts=1,npts + + rhotot=rhoarr(ipts) + rhotmot=rhom1_3(ipts) + rhotot_inv=rhotmot*rhotmot*rhotmot + rhotmo6=sqrt(rhotmot) + rhoto6=rhotot*rhotmot*rhotmot*rhotmo6 +! ----------------------------------------------------------------------- +! First take care of the exchange part of the functional + + exc=zero + dvxcdgr(ipts,3)=zero +! loop over the spin + ispden=1 + rho =rho_updn(ipts,ispden) + rhomot=rho_updnm1_3(ipts,ispden) + ex_lsd= - threefourth_divpi * sixpi2_1_3*rhomot*rhomot*rho +! Perdew-Burke-Ernzerhof GGA, exchange part + rho_inv=rhomot*rhomot*rhomot + coeffss=quarter*sixpi2m1_3*sixpi2m1_3*rho_inv*rho_inv*rhomot*rhomot + ss=grho2_updn(ipts,ispden)*coeffss + +! This is RPBE modification + if (option==6) then + divss=exp(-mu_divkappa*ss) + dfxdss= mu*divss + d2fxdss2=-mu*mu_divkappa*divss + + fx = one+kappa*(one-divss) + ex_gga= ex_lsd*fx + dssdn=-eight*third*ss*rho_inv + dfxdn = dfxdss*dssdn + vxci(ipts,ispden)=ex_lsd*(four_thirds*fx+rho*dfxdn) +! The new definition (v3.3) includes the division by the norm of the gradient + dssdg =two*coeffss + dfxdg=dfxdss*dssdg + dvxcdgr(ipts,ispden)=ex_lsd*rho*dfxdg + exc=exc+ex_gga*rho +! This is the Wu and Cohen modification + else + expss=exp(-ss) + p1_wc=b_wc+(mu-b_wc)*(one-ss)*expss+two*c_wc*ss/(one+c_wc*ss*ss) + p2_wc=d_wc*(ss-two)*expss+two*c_wc/(one+c_wc*ss*ss)-& +& four*c_wc*c_wc*ss*ss/((one+c_wc*ss*ss)*(one+c_wc*ss*ss)) + divss=one/(one+(b_wc*ss+d_wc*ss*expss+log(one+c_wc*ss*ss))/kappa) + dfxdss=p1_wc*divss*divss + d2fxdss2=p2_wc*divss*divss-two*divss*divss*divss*p1_wc*p1_wc/kappa + + fx = one+kappa*(one-divss) + ex_gga= ex_lsd*fx + dssdn=-eight*third*ss*rho_inv + dfxdn = dfxdss*dssdn + vxci(ipts,ispden)=ex_lsd*(four_thirds*fx+rho*dfxdn) +! The new definition (v3.3) includes the division by the norm of the gradient + dssdg =two*coeffss + dfxdg=dfxdss*dssdg + dvxcdgr(ipts,ispden)=ex_lsd*rho*dfxdg + exc=exc+ex_gga*rho + end if + +! end of loop over the spin +! If non spin-polarized, treat spin down contribution now, similar to spin up + exc=exc*2 + exci(ipts)=exc*rhotot_inv + if(exexch_==1) cycle +! ----------------------------------------------------------------------------- +! Then takes care of the LSD correlation part of the functional + + + rs=rsfac*rhotmot + sqr_rs=sq_rsfac*rhotmo6 + rsm1_2=sq_rsfac_inv*rhoto6 + +! Formulas A6-A8 of PW92LSD + ec0_q0=-2.0_dp*ec0_aa*(1.0_dp+ec0_a1*rs) + ec0_q1=2.0_dp*ec0_aa*(ec0_b1*sqr_rs+ec0_b2*rs+ec0_b3*rs*sqr_rs+ec0_b4*rs*rs) + ec0_q1p=ec0_aa*(ec0_b1*rsm1_2+2._dp*ec0_b2+3._dp*ec0_b3*sqr_rs+4._dp*ec0_b4*rs) + ec0_den=1.0_dp/(ec0_q1*ec0_q1+ec0_q1) +! ec0_log=log( 1.0_dp + 1.0_dp / ec0_q1 ) + ec0_log=-log( ec0_q1*ec0_q1*ec0_den ) + ecrs0=ec0_q0*ec0_log + decrs0_drs= -2.0_dp*ec0_aa*ec0_a1*ec0_log - ec0_q0*ec0_q1p *ec0_den + + ecrs=ecrs0 + decrs_drs=decrs0_drs + decrs_dzeta=0.0_dp + zeta=0.0_dp + +! Add LSD correlation functional to GGA exchange functional + exci(ipts)=exci(ipts)+ecrs + vxci(ipts,1)=vxci(ipts,1)+ecrs-rs*third*decrs_drs + + +! ----------------------------------------------------------------------------- +! Eventually add the GGA correlation part of the PBE functional +! Note : the computation of the potential in the spin-unpolarized +! case could be optimized much further. Other optimizations are left to do. + + phi_zeta=1.0_dp + phip_zeta=0.0_dp + phi_zeta_inv=1.0_dp + phi_logder=0.0_dp + phi3_zeta=1.0_dp + gamphi3inv=gamma_inv + phipp_zeta=-two*ninth*alpha_zeta*alpha_zeta + +! From ec to bb + bb=ecrs*gamphi3inv + dbb_drs=decrs_drs*gamphi3inv + dbb_dzeta=gamphi3inv*(decrs_dzeta-three*ecrs*phi_logder) + +! From bb to cc + exp_pbe=exp(-bb) + cc=one/(exp_pbe-one) + dcc_dbb=cc*cc*exp_pbe + dcc_drs=dcc_dbb*dbb_drs + dcc_dzeta=dcc_dbb*dbb_dzeta + +! From cc to aa + coeff_aa=beta*gamma_inv*phi_zeta_inv*phi_zeta_inv + aa=coeff_aa*cc + daa_drs=coeff_aa*dcc_drs + daa_dzeta=-two*aa*phi_logder+coeff_aa*dcc_dzeta + +! Introduce tt : do not assume that the spin-dependent gradients are collinear + grrho2=four*grho2_updn(ipts,1) + dtt_dg=two*rhotot_inv*rhotot_inv*rhotmot*coeff_tt +! Note that tt is (the t variable of PBE divided by phi) squared + tt=half*grrho2*dtt_dg + +! Get xx from aa and tt + xx=aa*tt + dxx_drs=daa_drs*tt + dxx_dzeta=daa_dzeta*tt + dxx_dtt=aa + +! From xx to pade + pade_den=one/(one+xx*(one+xx)) + pade=(one+xx)*pade_den + dpade_dxx=-xx*(two+xx)*pade_den**2 + dpade_drs=dpade_dxx*dxx_drs + dpade_dtt=dpade_dxx*dxx_dtt + dpade_dzeta=dpade_dxx*dxx_dzeta + +! From pade to qq + coeff_qq=tt*phi_zeta_inv*phi_zeta_inv + qq=coeff_qq*pade + dqq_drs=coeff_qq*dpade_drs + dqq_dtt=pade*phi_zeta_inv*phi_zeta_inv+coeff_qq*dpade_dtt + dqq_dzeta=coeff_qq*(dpade_dzeta-two*pade*phi_logder) + +! From qq to rr + arg_rr=one+beta*gamma_inv*qq + div_rr=one/arg_rr + rr=gamma*log(arg_rr) + drr_dqq=beta*div_rr + drr_drs=drr_dqq*dqq_drs + drr_dtt=drr_dqq*dqq_dtt + drr_dzeta=drr_dqq*dqq_dzeta + +! From rr to hh + hh=phi3_zeta*rr + dhh_drs=phi3_zeta*drr_drs + dhh_dtt=phi3_zeta*drr_dtt + dhh_dzeta=phi3_zeta*(drr_dzeta+three*rr*phi_logder) + +! The GGA correlation energy is added + exci(ipts)=exci(ipts)+hh + +! Change of variables : from (rs,zeta,tt) to (rhoup,rhodn,grrho) + +! From hh to the derivative of the energy wrt the density + drhohh_drho=hh-third*rs*dhh_drs-zeta*dhh_dzeta-seven*third*tt*dhh_dtt + vxci(ipts,1)=vxci(ipts,1)+drhohh_drho + +! From hh to the derivative of the energy wrt to the gradient of the +! density, divided by the gradient of the density +! (The v3.3 definition includes the division by the norm of the gradient) + dvxcdgr(ipts,3)=rhotot*dtt_dg*dhh_dtt + +! End condition of GGA + +! Correlation has been added +! ----------------------------------------------------------------------------- + +! vxci(ipts,2)=vxci(ipts,1) + dvxcdgr(ipts,2)=dvxcdgr(ipts,1) + + end do + + + else if (option==-1) then + + do ipts=1,npts + + rhotot=rhoarr(ipts) + rhotmot=rhom1_3(ipts) + rhotot_inv=rhotmot*rhotmot*rhotmot + rhotmo6=sqrt(rhotmot) + rhoto6=rhotot*rhotmot*rhotmot*rhotmo6 +! ----------------------------------------------------------------------- +! First take care of the exchange part of the functional + + exc=zero +! loop over the spin + ispden=1 + rho =rho_updn(ipts,ispden) + rhomot=rho_updnm1_3(ipts,ispden) + ex_lsd= - threefourth_divpi * sixpi2_1_3*rhomot*rhomot*rho +! Perdew_Wang 91 LSD + vxci(ipts,ispden)=four_thirds*ex_lsd + exc=exc+ex_lsd*rho + +! end of loop over the spin +! If non spin-polarized, treat spin down contribution now, similar to spin up + exc=exc*2 + exci(ipts)=exc*rhotot_inv + end do + + else if(option==-2) then + + + do ipts=1,npts + + rhotot=rhoarr(ipts) + rhotmot=rhom1_3(ipts) + rhotot_inv=rhotmot*rhotmot*rhotmot + rhotmo6=sqrt(rhotmot) + rhoto6=rhotot*rhotmot*rhotmot*rhotmo6 +! ----------------------------------------------------------------------- +! First take care of the exchange part of the functional + + exc=zero + dvxcdgr(ipts,3)=zero +! loop over the spin + ispden=1 + rho =rho_updn(ipts,ispden) + rhomot=rho_updnm1_3(ipts,ispden) + ex_lsd= - threefourth_divpi * sixpi2_1_3*rhomot*rhomot*rho +! Perdew-Burke-Ernzerhof GGA, exchange part + rho_inv=rhomot*rhomot*rhomot + coeffss=quarter*sixpi2m1_3*sixpi2m1_3*rho_inv*rho_inv*rhomot*rhomot + ss=grho2_updn(ipts,ispden)*coeffss + divss=one/(one+mu_divkappa*ss) + dfxdss= mu*divss*divss + d2fxdss2=-mu*two*mu_divkappa*divss*divss*divss + fx = one+kappa*(one-divss) + ex_gga= ex_lsd*fx + dssdn=-eight*third*ss*rho_inv + dfxdn = dfxdss*dssdn + vxci(ipts,ispden)=ex_lsd*(four_thirds*fx+rho*dfxdn) +! The new definition (v3.3) includes the division by the norm of the gradient + dssdg =two*coeffss + dfxdg=dfxdss*dssdg + dvxcdgr(ipts,ispden)=ex_lsd*rho*dfxdg + exc=exc+ex_gga*rho + +! end of loop over the spin +! If non spin-polarized, treat spin down contribution now, similar to spin up + exc=exc*2 + exci(ipts)=exc*rhotot_inv + +! Correlation has been added +! ----------------------------------------------------------------------------- + +! vxci(ipts,2)=vxci(ipts,1) + dvxcdgr(ipts,2)=dvxcdgr(ipts,1) + + end do + + + else if(option==-4) then + + + do ipts=1,npts + + rhotot=rhoarr(ipts) + rhotmot=rhom1_3(ipts) + rhotot_inv=rhotmot*rhotmot*rhotmot + rhotmo6=sqrt(rhotmot) + rhoto6=rhotot*rhotmot*rhotmot*rhotmo6 +! ----------------------------------------------------------------------- +! First take care of the exchange part of the functional + + exc=zero + dvxcdgr(ipts,3)=zero +! loop over the spin + ispden=1 + rho =rho_updn(ipts,ispden) + rhomot=rho_updnm1_3(ipts,ispden) + ex_lsd= - threefourth_divpi * sixpi2_1_3*rhomot*rhomot*rho +! VALENTINO R. COOPER C09x GGA, This is an exchange term proposed +! to use together with vdw-DF (see above). + rho_inv=rhomot*rhomot*rhomot + coeffss=quarter*sixpi2m1_3*sixpi2m1_3*rho_inv*rho_inv*rhomot*rhomot +! the quarter that is lacking is compensated by the grho2_updn in the +! next line. + ss=grho2_updn(ipts,ispden)*coeffss + alphs2=alpha_c09*ss +! jmb : overflow if alphs2 > 100 + if (alphs2 > 100.0 ) alphs2=100.0 + alphmu=alpha_c09*mu_c09 + dfxdss= mu_c09*exp(-alphs2)*(one-alphs2)+& +& kappa*alpha_c09*exp(-alphs2/two)/two + d2fxdss2=-alphmu*exp(-alphs2)*(two-alphs2)-& +& kappa*(alpha_c09**two)*exp(alphs2/two)/four + fx = one+mu_c09*ss*exp(-alphs2)+kappa*(one-exp(-alphs2/two)) + ex_gga= ex_lsd*fx + dssdn=-eight*third*ss*rho_inv + dfxdn = dfxdss*dssdn + vxci(ipts,ispden)=ex_lsd*(four_thirds*fx+rho*dfxdn) +! +! The new definition (v3.3) includes the division by the norm of the gradient + dssdg =two*coeffss + dfxdg=dfxdss*dssdg + dvxcdgr(ipts,ispden)=ex_lsd*rho*dfxdg !here also + exc=exc+ex_gga*rho + +! end of loop over the spin +! If non spin-polarized, treat spin down contribution now, similar to spin up + exc=exc*2 + exci(ipts)=exc*rhotot_inv + +! Correlation has been added +! ----------------------------------------------------------------------------- + +! vxci(ipts,2)=vxci(ipts,1) + dvxcdgr(ipts,2)=dvxcdgr(ipts,1) + + end do + + + else if(option==1)then + + + do ipts=1,npts + + rhotot=rhoarr(ipts) + rhotmot=rhom1_3(ipts) + rhotot_inv=rhotmot*rhotmot*rhotmot + rhotmo6=sqrt(rhotmot) + rhoto6=rhotot*rhotmot*rhotmot*rhotmo6 +! ----------------------------------------------------------------------- +! First take care of the exchange part of the functional + + exc=zero +! loop over the spin + ispden=1 + rho =rho_updn(ipts,ispden) + rhomot=rho_updnm1_3(ipts,ispden) + ex_lsd= - threefourth_divpi * sixpi2_1_3*rhomot*rhomot*rho +! Perdew_Wang 91 LSD + vxci(ipts,ispden)=four_thirds*ex_lsd + exc=exc+ex_lsd*rho + +! end of loop over the spin +! If non spin-polarized, treat spin down contribution now, similar to spin up + exc=exc*2 + exci(ipts)=exc*rhotot_inv +! ----------------------------------------------------------------------------- +! Then takes care of the LSD correlation part of the functional + + + rs=rsfac*rhotmot + sqr_rs=sq_rsfac*rhotmo6 + rsm1_2=sq_rsfac_inv*rhoto6 + +! Formulas A6-A8 of PW92LSD + ec0_q0=-2.0_dp*ec0_aa*(1.0_dp+ec0_a1*rs) + ec0_q1=2.0_dp*ec0_aa*(ec0_b1*sqr_rs+ec0_b2*rs+ec0_b3*rs*sqr_rs+ec0_b4*rs*rs) + ec0_q1p=ec0_aa*(ec0_b1*rsm1_2+2._dp*ec0_b2+3._dp*ec0_b3*sqr_rs+4._dp*ec0_b4*rs) + ec0_den=1.0_dp/(ec0_q1*ec0_q1+ec0_q1) +! ec0_log=log( 1.0_dp + 1.0_dp / ec0_q1 ) + ec0_log=-log( ec0_q1*ec0_q1*ec0_den ) + ecrs0=ec0_q0*ec0_log + decrs0_drs= -2.0_dp*ec0_aa*ec0_a1*ec0_log - ec0_q0*ec0_q1p *ec0_den + + ecrs=ecrs0 + decrs_drs=decrs0_drs + decrs_dzeta=0.0_dp + zeta=0.0_dp + +! Add LSD correlation functional to GGA exchange functional + exci(ipts)=exci(ipts)+ecrs + vxci(ipts,1)=vxci(ipts,1)+ecrs-rs*third*decrs_drs + +! Correlation has been added +! ----------------------------------------------------------------------------- + + end do + + else if (option==3) then + do ipts=1,npts + + rhotot=rhoarr(ipts) + rhotmot=rhom1_3(ipts) + rhotot_inv=rhotmot*rhotmot*rhotmot + rhotmo6=sqrt(rhotmot) + rhoto6=rhotot*rhotmot*rhotmot*rhotmo6 +! ----------------------------------------------------------------------- +! First take care of the exchange part of the functional + + exc=zero +! loop over the spin + ispden=1 + rho =rho_updn(ipts,ispden) + rhomot=rho_updnm1_3(ipts,ispden) + ex_lsd= - threefourth_divpi * sixpi2_1_3*rhomot*rhomot*rho +! Perdew_Wang 91 LSD + vxci(ipts,ispden)=four_thirds*ex_lsd + exc=exc+ex_lsd*rho + +! end of loop over the spin +! If non spin-polarized, treat spin down contribution now, similar to spin up + exc=exc*2 + exci(ipts)=exc*rhotot_inv +! ----------------------------------------------------------------------------- +! Then takes care of the LSD correlation part of the functional + + + rs=rsfac*rhotmot + sqr_rs=sq_rsfac*rhotmo6 + rsm1_2=sq_rsfac_inv*rhoto6 + +! Formulas A6-A8 of PW92LSD + ec0_q0=-2.0_dp*ec0_aa*(1.0_dp+ec0_a1*rs) + sqr_sqr_rs=max(1.e-15_dp,sqrt(sqr_rs)) + ec0_q1=2.0_dp*ec0_aa*(ec0_b1*sqr_rs+ec0_b2*rs+ec0_b3*rs*sqr_rs+ec0_b4*rs*rs/sqr_sqr_rs) + ec0_q1p=ec0_aa*(ec0_b1*rsm1_2+2._dp*ec0_b2+3._dp*ec0_b3*sqr_rs+3.5_dp*ec0_b4*rs/sqr_sqr_rs) + ec0_den=1.0_dp/(ec0_q1*ec0_q1+ec0_q1) +! ec0_log=log( 1.0_dp + 1.0_dp / ec0_q1 ) + ec0_log=-log( ec0_q1*ec0_q1*ec0_den ) + ecrs0=ec0_q0*ec0_log + decrs0_drs= -2.0_dp*ec0_aa*ec0_a1*ec0_log - ec0_q0*ec0_q1p *ec0_den + + ecrs=ecrs0 + decrs_drs=decrs0_drs + decrs_dzeta=0.0_dp + zeta=0.0_dp + +! Add LSD correlation functional to GGA exchange functional + exci(ipts)=exci(ipts)+ecrs + vxci(ipts,1)=vxci(ipts,1)+ecrs-rs*third*decrs_drs + +! Correlation has been added +! ----------------------------------------------------------------------------- + + end do + + + end if + + else if (order==3) then +! separate cases with respect to option + if(option==2 .or. option==5) then + + do ipts=1,npts + + rhotot=rhoarr(ipts) + rhotmot=rhom1_3(ipts) + rhotot_inv=rhotmot*rhotmot*rhotmot + rhotmo6=sqrt(rhotmot) + rhoto6=rhotot*rhotmot*rhotmot*rhotmo6 +! ----------------------------------------------------------------------- +! First take care of the exchange part of the functional + + exc=zero + dvxcdgr(ipts,3)=zero +! loop over the spin + ispden=1 + rho =rho_updn(ipts,ispden) + rhomot=rho_updnm1_3(ipts,ispden) + ex_lsd= - threefourth_divpi * sixpi2_1_3*rhomot*rhomot*rho +! Perdew-Burke-Ernzerhof GGA, exchange part + rho_inv=rhomot*rhomot*rhomot + coeffss=quarter*sixpi2m1_3*sixpi2m1_3*rho_inv*rho_inv*rhomot*rhomot + ss=grho2_updn(ipts,ispden)*coeffss + divss=one/(one+mu_divkappa*ss) + dfxdss= mu*divss*divss + d2fxdss2=-mu*two*mu_divkappa*divss*divss*divss + fx = one+kappa*(one-divss) + ex_gga= ex_lsd*fx + dssdn=-eight*third*ss*rho_inv + dfxdn = dfxdss*dssdn + vxci(ipts,ispden)=ex_lsd*(four_thirds*fx+rho*dfxdn) +! The new definition (v3.3) includes the division by the norm of the gradient + dssdg =two*coeffss + dfxdg=dfxdss*dssdg + dvxcdgr(ipts,ispden)=ex_lsd*rho*dfxdg + exc=exc+ex_gga*rho + +! Perdew-Burke-Ernzerhof GGA, exchange part +! Components 3 or 4 + dvxci(ipts,2+ispden)=dvxcdgr(ipts,ispden) +! Components 1 or 2 + d2ssdn2=-11.0_dp*third*dssdn*rho_inv + d2fxdn2=d2fxdss2*dssdn**2+dfxdss*d2ssdn2 + dvxci(ipts,ispden)=third*rho_inv*vxci(ipts,ispden)+& +& ex_lsd*(seven*third*dfxdn+rho*d2fxdn2) +! Components 5 or 6 + d2ssdndg=-eight*third*dssdg*rho_inv + d2fxdndg=d2fxdss2*dssdn*dssdg+dfxdss*d2ssdndg + dvxci(ipts,4+ispden)=ex_lsd*(four_thirds*dfxdg+rho*d2fxdndg) +! Components 7 or 8 + d2fxdg2=d2fxdss2*dssdg**2 + dvxci(ipts,6+ispden)=ex_lsd*rho*d2fxdg2 +! For the time being, treat non-spin-polarized like spin-polarized + dvxci(ipts,2)=dvxci(ipts,1) + dvxci(ipts,4)=dvxci(ipts,3) + dvxci(ipts,6)=dvxci(ipts,5) + dvxci(ipts,8)=dvxci(ipts,7) + +! end of loop over the spin +! If non spin-polarized, treat spin down contribution now, similar to spin up + exc=exc*2 + exci(ipts)=exc*rhotot_inv +! ----------------------------------------------------------------------------- +! Then takes care of the LSD correlation part of the functional + + + rs=rsfac*rhotmot + sqr_rs=sq_rsfac*rhotmo6 + rsm1_2=sq_rsfac_inv*rhoto6 + +! Formulas A6-A8 of PW92LSD + ec0_q0=-2.0_dp*ec0_aa*(1.0_dp+ec0_a1*rs) + ec0_q1=2.0_dp*ec0_aa*(ec0_b1*sqr_rs+ec0_b2*rs+ec0_b3*rs*sqr_rs+ec0_b4*rs*rs) + ec0_q1p=ec0_aa*(ec0_b1*rsm1_2+2._dp*ec0_b2+3._dp*ec0_b3*sqr_rs+4._dp*ec0_b4*rs) + ec0_den=1.0_dp/(ec0_q1*ec0_q1+ec0_q1) +! ec0_log=log( 1.0_dp + 1.0_dp / ec0_q1 ) + ec0_log=-log( ec0_q1*ec0_q1*ec0_den ) + ecrs0=ec0_q0*ec0_log + decrs0_drs= -2.0_dp*ec0_aa*ec0_a1*ec0_log - ec0_q0*ec0_q1p *ec0_den + ec0_q1pp=0.5_dp*ec0_aa*(-ec0_b1*rsm1_2**3+3._dp*ec0_b3*rsm1_2+8._dp*ec0_b4) + d2ecrs0_drs2= 4.0_dp*ec0_aa*ec0_a1*ec0_q1p*ec0_den & +& -ec0_q0*ec0_q1pp*ec0_den & +& +ec0_q0*ec0_q1p**2*ec0_den**2*(2._dp*ec0_q1+1.0_dp) + ec0_q1ppp = 0.75_dp*ec0_aa*(rsm1_2**5)*(ec0_b1-ec0_b3*rs) + ec0_f1 = 1._dp/(ec0_q1*ec0_q1*(1._dp + ec0_q1)) + ec0_f2 = 1._dp/(ec0_q1*(1+ec0_q1)) + d3ecrs0_drs3 = 6._dp*ec0_q1p*ec0_f1*(-2._dp*ec0_aa*ec0_a1*ec0_q1p + & +& ec0_q0*ec0_q1pp) - & +& ec0_f2*(-6._dp*ec0_aa*ec0_a1*ec0_q1pp + ec0_q0*ec0_q1ppp + & +& ec0_f2*(3._dp*ec0_q1p*(-2._dp*ec0_aa*ec0_a1*ec0_q1p + ec0_q0*ec0_q1pp) + & +& ec0_f2*2._dp*ec0_q0*(ec0_q1p**3)*(1._dp + 3._dp*ec0_q1*(1._dp + ec0_q1)))) + + mac_q0=-2.0_dp*mac_aa*(1.0_dp+mac_a1*rs) + mac_q1=2.0_dp*mac_aa*(mac_b1*sqr_rs+mac_b2*rs+mac_b3*rs*sqr_rs+mac_b4*rs*rs) + mac_q1p=mac_aa*(mac_b1*rsm1_2+2._dp*mac_b2+3._dp*mac_b3*sqr_rs+4._dp*mac_b4*rs) + mac_den=1.0_dp/(mac_q1*mac_q1+mac_q1) + mac_log=-log( mac_q1*mac_q1*mac_den ) + macrs=mac_q0*mac_log + dmacrs_drs= -2.0_dp*mac_aa*mac_a1*mac_log - mac_q0*mac_q1p*mac_den + + ecrs=ecrs0 + decrs_drs=decrs0_drs + decrs_dzeta=0.0_dp + d2ecrs_drs2=d2ecrs0_drs2 + d2ecrs_dzeta2=alpha_zeta**2*(-macrs) + d2ecrs_drsdzeta=zero + zeta=0.0_dp + + +! Add LSD correlation functional to GGA exchange functional + exci(ipts)=exci(ipts)+ecrs + vxci(ipts,1)=vxci(ipts,1)+ecrs-rs*third*decrs_drs + + dvcrs_drs=third*(2._dp*decrs_drs-rs*d2ecrs_drs2) +! And d(vxc)/d(rho)=(-rs/(3*rho))*d(vxc)/d(rs) + d2ecrs_drho2= -rs**4*(four_pi*third)*third*dvcrs_drs + dvxci(ipts,9)=d2ecrs_drho2 + dvxci(ipts,10)=d2ecrs_drho2 + dvxci(ipts,11)=d2ecrs_drho2 + +! ----------------------------------------------------------------------------- +! Eventually add the GGA correlation part of the PBE functional +! Note : the computation of the potential in the spin-unpolarized +! case could be optimized much further. Other optimizations are left to do. + + phi_zeta=1.0_dp + phip_zeta=0.0_dp + phi_zeta_inv=1.0_dp + phi_logder=0.0_dp + phi3_zeta=1.0_dp + gamphi3inv=gamma_inv + phipp_zeta=-two*ninth*alpha_zeta*alpha_zeta + +! From ec to bb + bb=ecrs*gamphi3inv + dbb_drs=decrs_drs*gamphi3inv + dbb_dzeta=gamphi3inv*(decrs_dzeta-three*ecrs*phi_logder) + d2bb_drs2=d2ecrs_drs2*gamphi3inv + d2bb_drsdzeta=gamphi3inv*(d2ecrs_drsdzeta-three*decrs_drs*phi_logder) + d2bb_dzeta2=gamphi3inv*(d2ecrs_dzeta2-six*decrs_dzeta*phi_logder+& +& 12.0_dp*ecrs*phi_logder*phi_logder-three*ecrs*phi_zeta_inv*phipp_zeta) + +! From bb to cc + exp_pbe=exp(-bb) + cc=one/(exp_pbe-one) + dcc_dbb=cc*cc*exp_pbe + dcc_drs=dcc_dbb*dbb_drs + dcc_dzeta=dcc_dbb*dbb_dzeta + d2cc_dbb2=cc*cc*exp_pbe*(two*cc*exp_pbe-one) + d2cc_drs2=d2cc_dbb2*dbb_drs*dbb_drs+dcc_dbb*d2bb_drs2 + d2cc_drsdzeta=d2cc_dbb2*dbb_drs*dbb_dzeta+dcc_dbb*d2bb_drsdzeta + d2cc_dzeta2=d2cc_dbb2*dbb_dzeta*dbb_dzeta+dcc_dbb*d2bb_dzeta2 + +! From cc to aa + coeff_aa=beta*gamma_inv*phi_zeta_inv*phi_zeta_inv + aa=coeff_aa*cc + daa_drs=coeff_aa*dcc_drs + daa_dzeta=-two*aa*phi_logder+coeff_aa*dcc_dzeta + d2aa_drs2=coeff_aa*d2cc_drs2 + d2aa_drsdzeta=-two*daa_drs*phi_logder+coeff_aa*d2cc_drsdzeta + d2aa_dzeta2=aa*(-two*phi_zeta_inv*phipp_zeta+six*phi_logder*phi_logder)+& +& coeff_aa*(-four*dcc_dzeta*phi_logder+d2cc_dzeta2) + +! Introduce tt : do not assume that the spin-dependent gradients are collinear + grrho2=four*grho2_updn(ipts,1) + dtt_dg=two*rhotot_inv*rhotot_inv*rhotmot*coeff_tt +! Note that tt is (the t variable of PBE divided by phi) squared + tt=half*grrho2*dtt_dg + +! Get xx from aa and tt + xx=aa*tt + dxx_drs=daa_drs*tt + dxx_dzeta=daa_dzeta*tt + dxx_dtt=aa + d2xx_drs2=d2aa_drs2*tt + d2xx_drsdzeta=d2aa_drsdzeta*tt + d2xx_drsdtt=daa_drs + d2xx_dttdzeta=daa_dzeta + d2xx_dzeta2=d2aa_dzeta2*tt + +! From xx to pade + pade_den=one/(one+xx*(one+xx)) + pade=(one+xx)*pade_den + dpade_dxx=-xx*(two+xx)*pade_den**2 + dpade_drs=dpade_dxx*dxx_drs + dpade_dtt=dpade_dxx*dxx_dtt + dpade_dzeta=dpade_dxx*dxx_dzeta + d2pade_dxx2=two*(-one+xx*xx*(three+xx))*pade_den*pade_den*pade_den + d2pade_drs2=d2pade_dxx2*dxx_drs*dxx_drs+dpade_dxx*d2xx_drs2 + d2pade_drsdtt=d2pade_dxx2*dxx_drs*dxx_dtt+dpade_dxx*d2xx_drsdtt + d2pade_drsdzeta=d2pade_dxx2*dxx_drs*dxx_dzeta+dpade_dxx*d2xx_drsdzeta + d2pade_dtt2=d2pade_dxx2*dxx_dtt*dxx_dtt + d2pade_dttdzeta=d2pade_dxx2*dxx_dtt*dxx_dzeta+dpade_dxx*d2xx_dttdzeta + d2pade_dzeta2=d2pade_dxx2*dxx_dzeta*dxx_dzeta+dpade_dxx*d2xx_dzeta2 + +! From pade to qq + coeff_qq=tt*phi_zeta_inv*phi_zeta_inv + qq=coeff_qq*pade + dqq_drs=coeff_qq*dpade_drs + dqq_dtt=pade*phi_zeta_inv*phi_zeta_inv+coeff_qq*dpade_dtt + dqq_dzeta=coeff_qq*(dpade_dzeta-two*pade*phi_logder) + d2qq_drs2=coeff_qq*d2pade_drs2 + d2qq_drsdtt=phi_zeta_inv*phi_zeta_inv*(dpade_drs+tt*d2pade_drsdtt) + d2qq_drsdzeta=coeff_qq*(d2pade_drsdzeta-two*dpade_drs*phi_logder) + d2qq_dtt2=phi_zeta_inv*phi_zeta_inv*(two*dpade_dtt+tt*d2pade_dtt2) + d2qq_dttdzeta=phi_zeta_inv*phi_zeta_inv*(dpade_dzeta-two*pade*phi_logder)+& +& coeff_qq*(d2pade_dttdzeta-two*dpade_dtt*phi_logder) + d2qq_dzeta2=coeff_qq*( d2pade_dzeta2-four*dpade_dzeta*phi_logder & +& +six*pade*phi_logder*phi_logder & +& -two*pade*phi_zeta_inv*phipp_zeta) + +! From qq to rr + arg_rr=one+beta*gamma_inv*qq + div_rr=one/arg_rr + rr=gamma*log(arg_rr) + drr_dqq=beta*div_rr + drr_drs=drr_dqq*dqq_drs + drr_dtt=drr_dqq*dqq_dtt + drr_dzeta=drr_dqq*dqq_dzeta + d2rr_dqq2=-div_rr**2*beta*beta*gamma_inv + d2rr_drs2=d2rr_dqq2*dqq_drs*dqq_drs+drr_dqq*d2qq_drs2 + d2rr_drsdtt=d2rr_dqq2*dqq_drs*dqq_dtt+drr_dqq*d2qq_drsdtt + d2rr_drsdzeta=d2rr_dqq2*dqq_drs*dqq_dzeta+drr_dqq*d2qq_drsdzeta + d2rr_dtt2=d2rr_dqq2*dqq_dtt*dqq_dtt+drr_dqq*d2qq_dtt2 + d2rr_dttdzeta=d2rr_dqq2*dqq_dtt*dqq_dzeta+drr_dqq*d2qq_dttdzeta + d2rr_dzeta2=d2rr_dqq2*dqq_dzeta*dqq_dzeta+drr_dqq*d2qq_dzeta2 + +! From rr to hh + hh=phi3_zeta*rr + dhh_drs=phi3_zeta*drr_drs + dhh_dtt=phi3_zeta*drr_dtt + dhh_dzeta=phi3_zeta*(drr_dzeta+three*rr*phi_logder) + d2hh_drs2=phi3_zeta*d2rr_drs2 + d2hh_drsdtt=phi3_zeta*d2rr_drsdtt + d2hh_drsdzeta=phi3_zeta*(d2rr_drsdzeta+three*drr_drs*phi_logder) + d2hh_dtt2=phi3_zeta*d2rr_dtt2 + d2hh_dttdzeta=phi3_zeta*(d2rr_dttdzeta+three*drr_dtt*phi_logder) + d2hh_dzeta2=phi3_zeta*(six*rr*phi_logder*phi_logder+& +& six*phi_logder*drr_dzeta+d2rr_dzeta2) & +& +three*phi_zeta*phi_zeta*rr*phipp_zeta + + +! The GGA correlation energy is added + exci(ipts)=exci(ipts)+hh + +! Change of variables : from (rs,zeta,tt) to (rhoup,rhodn,grrho) + + + +! From hh to the derivative of the energy wrt the density + drhohh_drho=hh-third*rs*dhh_drs-zeta*dhh_dzeta-seven*third*tt*dhh_dtt + vxci(ipts,1)=vxci(ipts,1)+drhohh_drho + +! From hh to the derivative of the energy wrt to the gradient of the +! density, divided by the gradient of the density +! (The v3.3 definition includes the division by the norm of the gradient) + dvxcdgr(ipts,3)=rhotot*dtt_dg*dhh_dtt + + d2rhohh_drho2=rhotot_inv*& +& (-two*ninth*rs*dhh_drs +seven*four*ninth*tt*dhh_dtt & +& +ninth*rs*rs*d2hh_drs2+zeta*zeta*d2hh_dzeta2+(seven*third*tt)**2*d2hh_dtt2 & +& +two*third*rs*zeta*d2hh_drsdzeta+two*seven*ninth*rs*tt*d2hh_drsdtt & +& +two*seven*third*tt*zeta*d2hh_dttdzeta) + d2rhohh_drhodg=dtt_dg*(-four*third*dhh_dtt-third*rs*d2hh_drsdtt & +& -zeta*d2hh_dttdzeta-seven*third*tt*d2hh_dtt2) + +! Component 12 : first derivative with respect to the gradient +! of the density, div by the grad of the density + dvxci(ipts,12)=dvxcdgr(ipts,3) +! Components 9, 10 and 11 : second derivatives with respect to the spin-density +! Note that there is already a contribution from LSDA + dvxci(ipts,9)=dvxci(ipts,9)+d2rhohh_drho2+rhotot_inv* & +& ( d2hh_dzeta2*(one-two*zeta) & +& -two*third*rs*d2hh_drsdzeta-14.0_dp*third*tt*d2hh_dttdzeta) + dvxci(ipts,10)=dvxci(ipts,10)+d2rhohh_drho2-rhotot_inv*d2hh_dzeta2 + dvxci(ipts,11)=dvxci(ipts,11)+d2rhohh_drho2+rhotot_inv* & +& ( d2hh_dzeta2*(one+two*zeta) & +& +two*third*rs*d2hh_drsdzeta+14.0_dp*third*tt*d2hh_dttdzeta) +! Components 13 and 14 : second derivatives with respect to spin density +! and gradient, divided by the gradient + dvxci(ipts,13)=d2rhohh_drhodg+dtt_dg*d2hh_dttdzeta + dvxci(ipts,14)=d2rhohh_drhodg-dtt_dg*d2hh_dttdzeta +! Component 15 : derivative of the (derivative wrt the gradient div by the grad), +! divided by the grad + dvxci(ipts,15)=rhotot*d2hh_dtt2*dtt_dg*dtt_dg + + +! End condition of GGA + +! Correlation has been added +! ----------------------------------------------------------------------------- + +! vxci(ipts,2)=vxci(ipts,1) + dvxcdgr(ipts,2)=dvxcdgr(ipts,1) + + end do + else if ((option==6) .or. (option==7)) then + + do ipts=1,npts + + rhotot=rhoarr(ipts) + rhotmot=rhom1_3(ipts) + rhotot_inv=rhotmot*rhotmot*rhotmot + rhotmo6=sqrt(rhotmot) + rhoto6=rhotot*rhotmot*rhotmot*rhotmo6 +! ----------------------------------------------------------------------- +! First take care of the exchange part of the functional + + exc=zero + dvxcdgr(ipts,3)=zero +! loop over the spin + ispden=1 + rho =rho_updn(ipts,ispden) + rhomot=rho_updnm1_3(ipts,ispden) + ex_lsd= - threefourth_divpi * sixpi2_1_3*rhomot*rhomot*rho +! Perdew-Burke-Ernzerhof GGA, exchange part + rho_inv=rhomot*rhomot*rhomot + coeffss=quarter*sixpi2m1_3*sixpi2m1_3*rho_inv*rho_inv*rhomot*rhomot + ss=grho2_updn(ipts,ispden)*coeffss + + if (option==6) then + divss=exp(-mu_divkappa*ss) + dfxdss= mu*divss + d2fxdss2=-mu*mu_divkappa*divss + + fx = one+kappa*(one-divss) + ex_gga= ex_lsd*fx + dssdn=-eight*third*ss*rho_inv + dfxdn = dfxdss*dssdn + vxci(ipts,ispden)=ex_lsd*(four_thirds*fx+rho*dfxdn) +! The new definition (v3.3) includes the division by the norm of the gradient + dssdg =two*coeffss + dfxdg=dfxdss*dssdg + dvxcdgr(ipts,ispden)=ex_lsd*rho*dfxdg + exc=exc+ex_gga*rho +! This is the Wu and Cohen modification + else + expss=exp(-ss) + p1_wc=b_wc+(mu-b_wc)*(one-ss)*expss+two*c_wc*ss/(one+c_wc*ss*ss) + p2_wc=d_wc*(ss-two)*expss+two*c_wc/(one+c_wc*ss*ss)-& +& four*c_wc*c_wc*ss*ss/((one+c_wc*ss*ss)*(one+c_wc*ss*ss)) + divss=one/(one+(b_wc*ss+d_wc*ss*expss+log(one+c_wc*ss*ss))/kappa) + dfxdss=p1_wc*divss*divss + d2fxdss2=p2_wc*divss*divss-two*divss*divss*divss*p1_wc*p1_wc/kappa + + fx = one+kappa*(one-divss) + ex_gga= ex_lsd*fx + dssdn=-eight*third*ss*rho_inv + dfxdn = dfxdss*dssdn + vxci(ipts,ispden)=ex_lsd*(four_thirds*fx+rho*dfxdn) +! The new definition (v3.3) includes the division by the norm of the gradient + dssdg =two*coeffss + dfxdg=dfxdss*dssdg + dvxcdgr(ipts,ispden)=ex_lsd*rho*dfxdg + exc=exc+ex_gga*rho + end if + +! Perdew-Burke-Ernzerhof GGA, exchange part +! Components 3 or 4 + dvxci(ipts,2+ispden)=dvxcdgr(ipts,ispden) +! Components 1 or 2 + d2ssdn2=-11.0_dp*third*dssdn*rho_inv + d2fxdn2=d2fxdss2*dssdn**2+dfxdss*d2ssdn2 + dvxci(ipts,ispden)=third*rho_inv*vxci(ipts,ispden)+& +& ex_lsd*(seven*third*dfxdn+rho*d2fxdn2) +! Components 5 or 6 + d2ssdndg=-eight*third*dssdg*rho_inv + d2fxdndg=d2fxdss2*dssdn*dssdg+dfxdss*d2ssdndg + dvxci(ipts,4+ispden)=ex_lsd*(four_thirds*dfxdg+rho*d2fxdndg) +! Components 7 or 8 + d2fxdg2=d2fxdss2*dssdg**2 + dvxci(ipts,6+ispden)=ex_lsd*rho*d2fxdg2 +! For the time being, treat non-spin-polarized like spin-polarized + dvxci(ipts,2)=dvxci(ipts,1) + dvxci(ipts,4)=dvxci(ipts,3) + dvxci(ipts,6)=dvxci(ipts,5) + dvxci(ipts,8)=dvxci(ipts,7) + +! end of loop over the spin +! If non spin-polarized, treat spin down contribution now, similar to spin up + exc=exc*2 + exci(ipts)=exc*rhotot_inv +! ----------------------------------------------------------------------------- +! Then takes care of the LSD correlation part of the functional + + + rs=rsfac*rhotmot + sqr_rs=sq_rsfac*rhotmo6 + rsm1_2=sq_rsfac_inv*rhoto6 + +! Formulas A6-A8 of PW92LSD + ec0_q0=-2.0_dp*ec0_aa*(1.0_dp+ec0_a1*rs) + ec0_q1=2.0_dp*ec0_aa*(ec0_b1*sqr_rs+ec0_b2*rs+ec0_b3*rs*sqr_rs+ec0_b4*rs*rs) + ec0_q1p=ec0_aa*(ec0_b1*rsm1_2+2._dp*ec0_b2+3._dp*ec0_b3*sqr_rs+4._dp*ec0_b4*rs) + ec0_den=1.0_dp/(ec0_q1*ec0_q1+ec0_q1) +! ec0_log=log( 1.0_dp + 1.0_dp / ec0_q1 ) + ec0_log=-log( ec0_q1*ec0_q1*ec0_den ) + ecrs0=ec0_q0*ec0_log + decrs0_drs= -2.0_dp*ec0_aa*ec0_a1*ec0_log - ec0_q0*ec0_q1p *ec0_den + ec0_q1pp=0.5_dp*ec0_aa*(-ec0_b1*rsm1_2**3+3._dp*ec0_b3*rsm1_2+8._dp*ec0_b4) + d2ecrs0_drs2= 4.0_dp*ec0_aa*ec0_a1*ec0_q1p*ec0_den & +& -ec0_q0*ec0_q1pp*ec0_den & +& +ec0_q0*ec0_q1p**2*ec0_den**2*(2._dp*ec0_q1+1.0_dp) + ec0_q1ppp = 0.75_dp*ec0_aa*(rsm1_2**5)*(ec0_b1-ec0_b3*rs) + ec0_f1 = 1._dp/(ec0_q1*ec0_q1*(1._dp + ec0_q1)) + ec0_f2 = 1._dp/(ec0_q1*(1+ec0_q1)) + d3ecrs0_drs3 = 6._dp*ec0_q1p*ec0_f1*(-2._dp*ec0_aa*ec0_a1*ec0_q1p + & +& ec0_q0*ec0_q1pp) - & +& ec0_f2*(-6._dp*ec0_aa*ec0_a1*ec0_q1pp + ec0_q0*ec0_q1ppp + & +& ec0_f2*(3._dp*ec0_q1p*(-2._dp*ec0_aa*ec0_a1*ec0_q1p + ec0_q0*ec0_q1pp) + & +& ec0_f2*2._dp*ec0_q0*(ec0_q1p**3)*(1._dp + 3._dp*ec0_q1*(1._dp + ec0_q1)))) + + mac_q0=-2.0_dp*mac_aa*(1.0_dp+mac_a1*rs) + mac_q1=2.0_dp*mac_aa*(mac_b1*sqr_rs+mac_b2*rs+mac_b3*rs*sqr_rs+mac_b4*rs*rs) + mac_q1p=mac_aa*(mac_b1*rsm1_2+2._dp*mac_b2+3._dp*mac_b3*sqr_rs+4._dp*mac_b4*rs) + mac_den=1.0_dp/(mac_q1*mac_q1+mac_q1) + mac_log=-log( mac_q1*mac_q1*mac_den ) + macrs=mac_q0*mac_log + dmacrs_drs= -2.0_dp*mac_aa*mac_a1*mac_log - mac_q0*mac_q1p*mac_den + + ecrs=ecrs0 + decrs_drs=decrs0_drs + decrs_dzeta=0.0_dp + d2ecrs_drs2=d2ecrs0_drs2 + d2ecrs_dzeta2=alpha_zeta**2*(-macrs) + d2ecrs_drsdzeta=zero + zeta=0.0_dp + + +! Add LSD correlation functional to GGA exchange functional + exci(ipts)=exci(ipts)+ecrs + vxci(ipts,1)=vxci(ipts,1)+ecrs-rs*third*decrs_drs + + dvcrs_drs=third*(2._dp*decrs_drs-rs*d2ecrs_drs2) +! And d(vxc)/d(rho)=(-rs/(3*rho))*d(vxc)/d(rs) + d2ecrs_drho2= -rs**4*(four_pi*third)*third*dvcrs_drs + dvxci(ipts,9)=d2ecrs_drho2 + dvxci(ipts,10)=d2ecrs_drho2 + dvxci(ipts,11)=d2ecrs_drho2 + +! ----------------------------------------------------------------------------- +! Eventually add the GGA correlation part of the PBE functional +! Note : the computation of the potential in the spin-unpolarized +! case could be optimized much further. Other optimizations are left to do. + + phi_zeta=1.0_dp + phip_zeta=0.0_dp + phi_zeta_inv=1.0_dp + phi_logder=0.0_dp + phi3_zeta=1.0_dp + gamphi3inv=gamma_inv + phipp_zeta=-two*ninth*alpha_zeta*alpha_zeta + +! From ec to bb + bb=ecrs*gamphi3inv + dbb_drs=decrs_drs*gamphi3inv + dbb_dzeta=gamphi3inv*(decrs_dzeta-three*ecrs*phi_logder) + d2bb_drs2=d2ecrs_drs2*gamphi3inv + d2bb_drsdzeta=gamphi3inv*(d2ecrs_drsdzeta-three*decrs_drs*phi_logder) + d2bb_dzeta2=gamphi3inv*(d2ecrs_dzeta2-six*decrs_dzeta*phi_logder+& +& 12.0_dp*ecrs*phi_logder*phi_logder-three*ecrs*phi_zeta_inv*phipp_zeta) + +! From bb to cc + exp_pbe=exp(-bb) + cc=one/(exp_pbe-one) + dcc_dbb=cc*cc*exp_pbe + dcc_drs=dcc_dbb*dbb_drs + dcc_dzeta=dcc_dbb*dbb_dzeta + d2cc_dbb2=cc*cc*exp_pbe*(two*cc*exp_pbe-one) + d2cc_drs2=d2cc_dbb2*dbb_drs*dbb_drs+dcc_dbb*d2bb_drs2 + d2cc_drsdzeta=d2cc_dbb2*dbb_drs*dbb_dzeta+dcc_dbb*d2bb_drsdzeta + d2cc_dzeta2=d2cc_dbb2*dbb_dzeta*dbb_dzeta+dcc_dbb*d2bb_dzeta2 + +! From cc to aa + coeff_aa=beta*gamma_inv*phi_zeta_inv*phi_zeta_inv + aa=coeff_aa*cc + daa_drs=coeff_aa*dcc_drs + daa_dzeta=-two*aa*phi_logder+coeff_aa*dcc_dzeta + d2aa_drs2=coeff_aa*d2cc_drs2 + d2aa_drsdzeta=-two*daa_drs*phi_logder+coeff_aa*d2cc_drsdzeta + d2aa_dzeta2=aa*(-two*phi_zeta_inv*phipp_zeta+six*phi_logder*phi_logder)+& +& coeff_aa*(-four*dcc_dzeta*phi_logder+d2cc_dzeta2) + +! Introduce tt : do not assume that the spin-dependent gradients are collinear + grrho2=four*grho2_updn(ipts,1) + dtt_dg=two*rhotot_inv*rhotot_inv*rhotmot*coeff_tt +! Note that tt is (the t variable of PBE divided by phi) squared + tt=half*grrho2*dtt_dg + +! Get xx from aa and tt + xx=aa*tt + dxx_drs=daa_drs*tt + dxx_dzeta=daa_dzeta*tt + dxx_dtt=aa + d2xx_drs2=d2aa_drs2*tt + d2xx_drsdzeta=d2aa_drsdzeta*tt + d2xx_drsdtt=daa_drs + d2xx_dttdzeta=daa_dzeta + d2xx_dzeta2=d2aa_dzeta2*tt + +! From xx to pade + pade_den=one/(one+xx*(one+xx)) + pade=(one+xx)*pade_den + dpade_dxx=-xx*(two+xx)*pade_den**2 + dpade_drs=dpade_dxx*dxx_drs + dpade_dtt=dpade_dxx*dxx_dtt + dpade_dzeta=dpade_dxx*dxx_dzeta + d2pade_dxx2=two*(-one+xx*xx*(three+xx))*pade_den*pade_den*pade_den + d2pade_drs2=d2pade_dxx2*dxx_drs*dxx_drs+dpade_dxx*d2xx_drs2 + d2pade_drsdtt=d2pade_dxx2*dxx_drs*dxx_dtt+dpade_dxx*d2xx_drsdtt + d2pade_drsdzeta=d2pade_dxx2*dxx_drs*dxx_dzeta+dpade_dxx*d2xx_drsdzeta + d2pade_dtt2=d2pade_dxx2*dxx_dtt*dxx_dtt + d2pade_dttdzeta=d2pade_dxx2*dxx_dtt*dxx_dzeta+dpade_dxx*d2xx_dttdzeta + d2pade_dzeta2=d2pade_dxx2*dxx_dzeta*dxx_dzeta+dpade_dxx*d2xx_dzeta2 + +! From pade to qq + coeff_qq=tt*phi_zeta_inv*phi_zeta_inv + qq=coeff_qq*pade + dqq_drs=coeff_qq*dpade_drs + dqq_dtt=pade*phi_zeta_inv*phi_zeta_inv+coeff_qq*dpade_dtt + dqq_dzeta=coeff_qq*(dpade_dzeta-two*pade*phi_logder) + d2qq_drs2=coeff_qq*d2pade_drs2 + d2qq_drsdtt=phi_zeta_inv*phi_zeta_inv*(dpade_drs+tt*d2pade_drsdtt) + d2qq_drsdzeta=coeff_qq*(d2pade_drsdzeta-two*dpade_drs*phi_logder) + d2qq_dtt2=phi_zeta_inv*phi_zeta_inv*(two*dpade_dtt+tt*d2pade_dtt2) + d2qq_dttdzeta=phi_zeta_inv*phi_zeta_inv*(dpade_dzeta-two*pade*phi_logder)+& +& coeff_qq*(d2pade_dttdzeta-two*dpade_dtt*phi_logder) + d2qq_dzeta2=coeff_qq*( d2pade_dzeta2-four*dpade_dzeta*phi_logder & +& +six*pade*phi_logder*phi_logder & +& -two*pade*phi_zeta_inv*phipp_zeta) + +! From qq to rr + arg_rr=one+beta*gamma_inv*qq + div_rr=one/arg_rr + rr=gamma*log(arg_rr) + drr_dqq=beta*div_rr + drr_drs=drr_dqq*dqq_drs + drr_dtt=drr_dqq*dqq_dtt + drr_dzeta=drr_dqq*dqq_dzeta + d2rr_dqq2=-div_rr**2*beta*beta*gamma_inv + d2rr_drs2=d2rr_dqq2*dqq_drs*dqq_drs+drr_dqq*d2qq_drs2 + d2rr_drsdtt=d2rr_dqq2*dqq_drs*dqq_dtt+drr_dqq*d2qq_drsdtt + d2rr_drsdzeta=d2rr_dqq2*dqq_drs*dqq_dzeta+drr_dqq*d2qq_drsdzeta + d2rr_dtt2=d2rr_dqq2*dqq_dtt*dqq_dtt+drr_dqq*d2qq_dtt2 + d2rr_dttdzeta=d2rr_dqq2*dqq_dtt*dqq_dzeta+drr_dqq*d2qq_dttdzeta + d2rr_dzeta2=d2rr_dqq2*dqq_dzeta*dqq_dzeta+drr_dqq*d2qq_dzeta2 + +! From rr to hh + hh=phi3_zeta*rr + dhh_drs=phi3_zeta*drr_drs + dhh_dtt=phi3_zeta*drr_dtt + dhh_dzeta=phi3_zeta*(drr_dzeta+three*rr*phi_logder) + d2hh_drs2=phi3_zeta*d2rr_drs2 + d2hh_drsdtt=phi3_zeta*d2rr_drsdtt + d2hh_drsdzeta=phi3_zeta*(d2rr_drsdzeta+three*drr_drs*phi_logder) + d2hh_dtt2=phi3_zeta*d2rr_dtt2 + d2hh_dttdzeta=phi3_zeta*(d2rr_dttdzeta+three*drr_dtt*phi_logder) + d2hh_dzeta2=phi3_zeta*(six*rr*phi_logder*phi_logder+& +& six*phi_logder*drr_dzeta+d2rr_dzeta2) & +& +three*phi_zeta*phi_zeta*rr*phipp_zeta + + +! The GGA correlation energy is added + exci(ipts)=exci(ipts)+hh + +! Change of variables : from (rs,zeta,tt) to (rhoup,rhodn,grrho) + +! From hh to the derivative of the energy wrt the density + drhohh_drho=hh-third*rs*dhh_drs-zeta*dhh_dzeta-seven*third*tt*dhh_dtt + vxci(ipts,1)=vxci(ipts,1)+drhohh_drho + +! From hh to the derivative of the energy wrt to the gradient of the +! density, divided by the gradient of the density +! (The v3.3 definition includes the division by the norm of the gradient) + dvxcdgr(ipts,3)=rhotot*dtt_dg*dhh_dtt + + d2rhohh_drho2=rhotot_inv*& +& (-two*ninth*rs*dhh_drs +seven*four*ninth*tt*dhh_dtt & +& +ninth*rs*rs*d2hh_drs2+zeta*zeta*d2hh_dzeta2+(seven*third*tt)**2*d2hh_dtt2 & +& +two*third*rs*zeta*d2hh_drsdzeta+two*seven*ninth*rs*tt*d2hh_drsdtt & +& +two*seven*third*tt*zeta*d2hh_dttdzeta) + d2rhohh_drhodg=dtt_dg*(-four*third*dhh_dtt-third*rs*d2hh_drsdtt & +& -zeta*d2hh_dttdzeta-seven*third*tt*d2hh_dtt2) + +! Component 12 : first derivative with respect to the gradient +! of the density, div by the grad of the density + dvxci(ipts,12)=dvxcdgr(ipts,3) +! Components 9, 10 and 11 : second derivatives with respect to the spin-density +! Note that there is already a contribution from LSDA + dvxci(ipts,9)=dvxci(ipts,9)+d2rhohh_drho2+rhotot_inv* & +& ( d2hh_dzeta2*(one-two*zeta) & +& -two*third*rs*d2hh_drsdzeta-14.0_dp*third*tt*d2hh_dttdzeta) + dvxci(ipts,10)=dvxci(ipts,10)+d2rhohh_drho2-rhotot_inv*d2hh_dzeta2 + dvxci(ipts,11)=dvxci(ipts,11)+d2rhohh_drho2+rhotot_inv* & +& ( d2hh_dzeta2*(one+two*zeta) & +& +two*third*rs*d2hh_drsdzeta+14.0_dp*third*tt*d2hh_dttdzeta) +! Components 13 and 14 : second derivatives with respect to spin density +! and gradient, divided by the gradient + dvxci(ipts,13)=d2rhohh_drhodg+dtt_dg*d2hh_dttdzeta + dvxci(ipts,14)=d2rhohh_drhodg-dtt_dg*d2hh_dttdzeta +! Component 15 : derivative of the (derivative wrt the gradient div by the grad), +! divided by the grad + dvxci(ipts,15)=rhotot*d2hh_dtt2*dtt_dg*dtt_dg + + +! End condition of GGA + + +! Correlation has been added +! ----------------------------------------------------------------------------- + +! vxci(ipts,2)=vxci(ipts,1) + dvxcdgr(ipts,2)=dvxcdgr(ipts,1) + end do + + else if (option==-1) then + + do ipts=1,npts + + rhotot=rhoarr(ipts) + rhotmot=rhom1_3(ipts) + rhotot_inv=rhotmot*rhotmot*rhotmot + rhotmo6=sqrt(rhotmot) + rhoto6=rhotot*rhotmot*rhotmot*rhotmo6 +! ----------------------------------------------------------------------- +! First take care of the exchange part of the functional + + exc=zero +! loop over the spin + ispden=1 + rho =rho_updn(ipts,ispden) + rhomot=rho_updnm1_3(ipts,ispden) + ex_lsd= - threefourth_divpi * sixpi2_1_3*rhomot*rhomot*rho +! Perdew_Wang 91 LSD + vxci(ipts,ispden)=four_thirds*ex_lsd + exc=exc+ex_lsd*rho +! Perdew_Wang 91 LSD + dvxci(ipts,2*ispden-1)=-four_thirds*third*& +& threefourth_divpi*sixpi2_1_3*rhomot*rhomot + dvxci(ipts,2)=zero +! If non-spin-polarized, first component of dvxci is second +! derivative with respect to TOTAL density. + dvxci(ipts,1)=dvxci(ipts,1)*half + if(order==3)then +! Compute the second derivative of vx +! vx^(2) = -2*vx^(1)/(3*rhotot) + d2vxci(ipts,1) = -2._dp*dvxci(ipts,1)/(3._dp*rhotot) + end if +! end of loop over the spin +! If non spin-polarized, treat spin down contribution now, similar to spin up + exc=exc*2 + exci(ipts)=exc*rhotot_inv +! ----------------------------------------------------------------------------- +! Then takes care of the LSD correlation part of the functional + +! Correlation has been added +! ----------------------------------------------------------------------------- + + end do + else if (option==-2) then + + do ipts=1,npts + + rhotot=rhoarr(ipts) + rhotmot=rhom1_3(ipts) + rhotot_inv=rhotmot*rhotmot*rhotmot + rhotmo6=sqrt(rhotmot) + rhoto6=rhotot*rhotmot*rhotmot*rhotmo6 +! ----------------------------------------------------------------------- +! First take care of the exchange part of the functional + + exc=zero + dvxcdgr(ipts,3)=zero +! loop over the spin + ispden=1 + rho =rho_updn(ipts,ispden) + rhomot=rho_updnm1_3(ipts,ispden) + ex_lsd= - threefourth_divpi * sixpi2_1_3*rhomot*rhomot*rho +! Perdew-Burke-Ernzerhof GGA, exchange part + rho_inv=rhomot*rhomot*rhomot + coeffss=quarter*sixpi2m1_3*sixpi2m1_3*rho_inv*rho_inv*rhomot*rhomot + ss=grho2_updn(ipts,ispden)*coeffss + divss=one/(one+mu_divkappa*ss) + dfxdss= mu*divss*divss + d2fxdss2=-mu*two*mu_divkappa*divss*divss*divss + fx = one+kappa*(one-divss) + ex_gga= ex_lsd*fx + dssdn=-eight*third*ss*rho_inv + dfxdn = dfxdss*dssdn + vxci(ipts,ispden)=ex_lsd*(four_thirds*fx+rho*dfxdn) +! The new definition (v3.3) includes the division by the norm of the gradient + dssdg =two*coeffss + dfxdg=dfxdss*dssdg + dvxcdgr(ipts,ispden)=ex_lsd*rho*dfxdg + exc=exc+ex_gga*rho + +! Perdew-Burke-Ernzerhof GGA, exchange part +! Components 3 or 4 + dvxci(ipts,2+ispden)=dvxcdgr(ipts,ispden) +! Components 1 or 2 + d2ssdn2=-11.0_dp*third*dssdn*rho_inv + d2fxdn2=d2fxdss2*dssdn**2+dfxdss*d2ssdn2 + dvxci(ipts,ispden)=third*rho_inv*vxci(ipts,ispden)+& +& ex_lsd*(seven*third*dfxdn+rho*d2fxdn2) +! Components 5 or 6 + d2ssdndg=-eight*third*dssdg*rho_inv + d2fxdndg=d2fxdss2*dssdn*dssdg+dfxdss*d2ssdndg + dvxci(ipts,4+ispden)=ex_lsd*(four_thirds*dfxdg+rho*d2fxdndg) +! Components 7 or 8 + d2fxdg2=d2fxdss2*dssdg**2 + dvxci(ipts,6+ispden)=ex_lsd*rho*d2fxdg2 +! For the time being, treat non-spin-polarized like spin-polarized + dvxci(ipts,2)=dvxci(ipts,1) + dvxci(ipts,4)=dvxci(ipts,3) + dvxci(ipts,6)=dvxci(ipts,5) + dvxci(ipts,8)=dvxci(ipts,7) + +! end of loop over the spin +! If non spin-polarized, treat spin down contribution now, similar to spin up + exc=exc*2 + exci(ipts)=exc*rhotot_inv +! ----------------------------------------------------------------------------- +! Then takes care of the LSD correlation part of the functional + +! Correlation has been added +! ----------------------------------------------------------------------------- + +! vxci(ipts,2)=vxci(ipts,1) + dvxcdgr(ipts,2)=dvxcdgr(ipts,1) + + end do + + + else if(option==-4) then + + + do ipts=1,npts + + rhotot=rhoarr(ipts) + rhotmot=rhom1_3(ipts) + rhotot_inv=rhotmot*rhotmot*rhotmot + rhotmo6=sqrt(rhotmot) + rhoto6=rhotot*rhotmot*rhotmot*rhotmo6 +! ----------------------------------------------------------------------- +! First take care of the exchange part of the functional + + exc=zero + dvxcdgr(ipts,3)=zero +! loop over the spin + ispden=1 + rho =rho_updn(ipts,ispden) + rhomot=rho_updnm1_3(ipts,ispden) + ex_lsd= - threefourth_divpi * sixpi2_1_3*rhomot*rhomot*rho +! VALENTINO R. COOPER C09x GGA, This is an exchange term proposed +! to use together with vdw-DF (see above). + rho_inv=rhomot*rhomot*rhomot + coeffss=quarter*sixpi2m1_3*sixpi2m1_3*rho_inv*rho_inv*rhomot*rhomot +! the quarter that is lacking is compensated by the grho2_updn in the +! next line. + ss=grho2_updn(ipts,ispden)*coeffss + alphs2=alpha_c09*ss + alphmu=alpha_c09*mu_c09 + dfxdss= mu_c09*exp(-alphs2)*(one-alphs2)+& +& kappa*alpha_c09*exp(-alphs2/two)/two + d2fxdss2=-alphmu*exp(-alphs2)*(two-alphs2)-& +& kappa*(alpha_c09**two)*exp(alphs2/two)/four + fx = one+mu_c09*ss*exp(-alphs2)+kappa*(one-exp(-alphs2/two)) + ex_gga= ex_lsd*fx + dssdn=-eight*third*ss*rho_inv + dfxdn = dfxdss*dssdn + vxci(ipts,ispden)=ex_lsd*(four_thirds*fx+rho*dfxdn) +! The new definition (v3.3) includes the division by the norm of the gradient + dssdg =two*coeffss + dfxdg=dfxdss*dssdg + dvxcdgr(ipts,ispden)=ex_lsd*rho*dfxdg + exc=exc+ex_gga*rho + +! Cooper C09x GGA exchange +! Components 3 or 4 + dvxci(ipts,2+ispden)=dvxcdgr(ipts,ispden) +! Components 1 or 2 + d2ssdn2=-11.0_dp*third*dssdn*rho_inv + d2fxdn2=d2fxdss2*dssdn**2+dfxdss*d2ssdn2 + dvxci(ipts,ispden)=third*rho_inv*vxci(ipts,ispden)+& +& ex_lsd*(seven*third*dfxdn+rho*d2fxdn2) +! Components 5 or 6 + d2ssdndg=-eight*third*dssdg*rho_inv + d2fxdndg=d2fxdss2*dssdn*dssdg+dfxdss*d2ssdndg + dvxci(ipts,4+ispden)=ex_lsd*(four_thirds*dfxdg+rho*d2fxdndg) +! Components 7 or 8 + d2fxdg2=d2fxdss2*dssdg**2 + dvxci(ipts,6+ispden)=ex_lsd*rho*d2fxdg2 +! For the time being, treat non-spin-polarized like spin-polarized + dvxci(ipts,2)=dvxci(ipts,1) + dvxci(ipts,4)=dvxci(ipts,3) + dvxci(ipts,6)=dvxci(ipts,5) + dvxci(ipts,8)=dvxci(ipts,7) + +! end of loop over the spin +! If non spin-polarized, treat spin down contribution now, similar to spin up + exc=exc*2 + exci(ipts)=exc*rhotot_inv +! ----------------------------------------------------------------------------- +! Then takes care of the LSD correlation part of the functional + +! Correlation has been added +! ----------------------------------------------------------------------------- + +! vxci(ipts,2)=vxci(ipts,1) + dvxcdgr(ipts,2)=dvxcdgr(ipts,1) + + end do + + + else if(option==1) then + + do ipts=1,npts + + + rhotot=rhoarr(ipts) + rhotmot=rhom1_3(ipts) + rhotot_inv=rhotmot*rhotmot*rhotmot + rhotmo6=sqrt(rhotmot) + rhoto6=rhotot*rhotmot*rhotmot*rhotmo6 +! ----------------------------------------------------------------------- +! First take care of the exchange part of the functional + + exc=zero +! loop over the spin + ispden=1 + rho =rho_updn(ipts,ispden) + rhomot=rho_updnm1_3(ipts,ispden) + ex_lsd= - threefourth_divpi * sixpi2_1_3*rhomot*rhomot*rho +! Perdew_Wang 91 LSD + vxci(ipts,ispden)=four_thirds*ex_lsd + exc=exc+ex_lsd*rho + +! Perdew_Wang 91 LSD + dvxci(ipts,2*ispden-1)=-four_thirds*third*& +& threefourth_divpi*sixpi2_1_3*rhomot*rhomot + dvxci(ipts,2)=zero +! If non-spin-polarized, first component of dvxci is second +! derivative with respect to TOTAL density. + dvxci(ipts,1)=dvxci(ipts,1)*half + if(order==3)then +! Compute the second derivative of vx +! vx^(2) = -2*vx^(1)/(3*rhotot) + d2vxci(ipts,1) = -2._dp*dvxci(ipts,1)/(3._dp*rhotot) + end if +! end of loop over the spin +! If non spin-polarized, treat spin down contribution now, similar to spin up + exc=exc*2 + exci(ipts)=exc*rhotot_inv +! ----------------------------------------------------------------------------- +! Then takes care of the LSD correlation part of the functional + + rs=rsfac*rhotmot + sqr_rs=sq_rsfac*rhotmo6 + rsm1_2=sq_rsfac_inv*rhoto6 + +! Formulas A6-A8 of PW92LSD + ec0_q0=-2.0_dp*ec0_aa*(1.0_dp+ec0_a1*rs) + ec0_q1=2.0_dp*ec0_aa*(ec0_b1*sqr_rs+ec0_b2*rs+ec0_b3*rs*sqr_rs+ec0_b4*rs*rs) + ec0_q1p=ec0_aa*(ec0_b1*rsm1_2+2._dp*ec0_b2+3._dp*ec0_b3*sqr_rs+4._dp*ec0_b4*rs) + ec0_den=1.0_dp/(ec0_q1*ec0_q1+ec0_q1) +! ec0_log=log( 1.0_dp + 1.0_dp / ec0_q1 ) + ec0_log=-log( ec0_q1*ec0_q1*ec0_den ) + ecrs0=ec0_q0*ec0_log + decrs0_drs= -2.0_dp*ec0_aa*ec0_a1*ec0_log - ec0_q0*ec0_q1p *ec0_den + ec0_q1pp=0.5_dp*ec0_aa*(-ec0_b1*rsm1_2**3+3._dp*ec0_b3*rsm1_2+8._dp*ec0_b4) + d2ecrs0_drs2= 4.0_dp*ec0_aa*ec0_a1*ec0_q1p*ec0_den & +& -ec0_q0*ec0_q1pp*ec0_den & +& +ec0_q0*ec0_q1p**2*ec0_den**2*(2._dp*ec0_q1+1.0_dp) + ec0_q1ppp = 0.75_dp*ec0_aa*(rsm1_2**5)*(ec0_b1-ec0_b3*rs) + ec0_f1 = 1._dp/(ec0_q1*ec0_q1*(1._dp + ec0_q1)) + ec0_f2 = 1._dp/(ec0_q1*(1+ec0_q1)) + d3ecrs0_drs3 = 6._dp*ec0_q1p*ec0_f1*(-2._dp*ec0_aa*ec0_a1*ec0_q1p + & +& ec0_q0*ec0_q1pp) - & +& ec0_f2*(-6._dp*ec0_aa*ec0_a1*ec0_q1pp + ec0_q0*ec0_q1ppp + & +& ec0_f2*(3._dp*ec0_q1p*(-2._dp*ec0_aa*ec0_a1*ec0_q1p + ec0_q0*ec0_q1pp) + & +& ec0_f2*2._dp*ec0_q0*(ec0_q1p**3)*(1._dp + 3._dp*ec0_q1*(1._dp + ec0_q1)))) + + mac_q0=-2.0_dp*mac_aa*(1.0_dp+mac_a1*rs) + mac_q1=2.0_dp*mac_aa*(mac_b1*sqr_rs+mac_b2*rs+mac_b3*rs*sqr_rs+mac_b4*rs*rs) + mac_q1p=mac_aa*(mac_b1*rsm1_2+2._dp*mac_b2+3._dp*mac_b3*sqr_rs+4._dp*mac_b4*rs) + mac_den=1.0_dp/(mac_q1*mac_q1+mac_q1) + mac_log=-log( mac_q1*mac_q1*mac_den ) + macrs=mac_q0*mac_log + dmacrs_drs= -2.0_dp*mac_aa*mac_a1*mac_log - mac_q0*mac_q1p*mac_den + + ecrs=ecrs0 + decrs_drs=decrs0_drs + decrs_dzeta=0.0_dp + d2ecrs_drs2=d2ecrs0_drs2 + d2ecrs_dzeta2=alpha_zeta**2*(-macrs) + d2ecrs_drsdzeta=zero + zeta=0.0_dp + + +! Add LSD correlation functional to GGA exchange functional + exci(ipts)=exci(ipts)+ecrs + vxci(ipts,1)=vxci(ipts,1)+ecrs-rs*third*decrs_drs + + dvcrs_drs=third*(2._dp*decrs_drs-rs*d2ecrs_drs2) +! And d(vxc)/d(rho)=(-rs/(3*rho))*d(vxc)/d(rs) + d2ecrs_drho2= -rs**4*(four_pi*third)*third*dvcrs_drs + dvxci(ipts,1)=dvxci(ipts,1)+d2ecrs_drho2 + d2vcrs_drs2 = third*(d2ecrs_drs2 - rs*d3ecrs0_drs3) + drs_dn = -1._dp*four_pi*ninth*rs**4 + d2rs_dn2 = 64._dp*pi*pi*(rs**7)/81._dp + if(order==3)then + d2vxci(ipts,1) = d2vxci(ipts,1) + d2vcrs_drs2*drs_dn*drs_dn + & +& dvcrs_drs*d2rs_dn2 + + + + + + end if + +! ----------------------------------------------------------------------------- +! Eventually add the GGA correlation part of the PBE functional +! Note : the computation of the potential in the spin-unpolarized +! case could be optimized much further. Other optimizations are left to do. + + +! Correlation has been added +! ----------------------------------------------------------------------------- + end do + else if (option==3) then + + do ipts=1,npts + + rhotot=rhoarr(ipts) + rhotmot=rhom1_3(ipts) + rhotot_inv=rhotmot*rhotmot*rhotmot + rhotmo6=sqrt(rhotmot) + rhoto6=rhotot*rhotmot*rhotmot*rhotmo6 +! ----------------------------------------------------------------------- +! First take care of the exchange part of the functional + + exc=zero +! loop over the spin + ispden=1 + rho =rho_updn(ipts,ispden) + rhomot=rho_updnm1_3(ipts,ispden) + ex_lsd= - threefourth_divpi * sixpi2_1_3*rhomot*rhomot*rho +! Perdew_Wang 91 LSD + vxci(ipts,ispden)=four_thirds*ex_lsd + exc=exc+ex_lsd*rho + + +! Perdew_Wang 91 LSD + dvxci(ipts,2*ispden-1)=-four_thirds*third*& +& threefourth_divpi*sixpi2_1_3*rhomot*rhomot + dvxci(ipts,2)=zero +! If non-spin-polarized, first component of dvxci is second +! derivative with respect to TOTAL density. + dvxci(ipts,1)=dvxci(ipts,1)*half + if(order==3)then +! Compute the second derivative of vx +! vx^(2) = -2*vx^(1)/(3*rhotot) + d2vxci(ipts,1) = -2._dp*dvxci(ipts,1)/(3._dp*rhotot) + end if +! end of loop over the spin +! If non spin-polarized, treat spin down contribution now, similar to spin up + exc=exc*2 + exci(ipts)=exc*rhotot_inv +! ----------------------------------------------------------------------------- +! Then takes care of the LSD correlation part of the functional + + rs=rsfac*rhotmot + sqr_rs=sq_rsfac*rhotmo6 + rsm1_2=sq_rsfac_inv*rhoto6 + +! Formulas A6-A8 of PW92LSD + ec0_q0=-2.0_dp*ec0_aa*(1.0_dp+ec0_a1*rs) + sqr_sqr_rs=max(1.e-15_dp,sqrt(sqr_rs)) + ec0_q1=2.0_dp*ec0_aa*(ec0_b1*sqr_rs+ec0_b2*rs+ec0_b3*rs*sqr_rs+ec0_b4*rs*rs/sqr_sqr_rs) + ec0_q1p=ec0_aa*(ec0_b1*rsm1_2+2._dp*ec0_b2+3._dp*ec0_b3*sqr_rs+3.5_dp*ec0_b4*rs/sqr_sqr_rs) + ec0_den=1.0_dp/(ec0_q1*ec0_q1+ec0_q1) +! ec0_log=log( 1.0_dp + 1.0_dp / ec0_q1 ) + ec0_log=-log( ec0_q1*ec0_q1*ec0_den ) + ecrs0=ec0_q0*ec0_log + decrs0_drs= -2.0_dp*ec0_aa*ec0_a1*ec0_log - ec0_q0*ec0_q1p *ec0_den + ec0_q1pp=0.5_dp*ec0_aa*(-ec0_b1*rsm1_2**3+3._dp*ec0_b3*rsm1_2+8._dp*ec0_b4) + d2ecrs0_drs2= 4.0_dp*ec0_aa*ec0_a1*ec0_q1p*ec0_den & +& -ec0_q0*ec0_q1pp*ec0_den & +& +ec0_q0*ec0_q1p**2*ec0_den**2*(2._dp*ec0_q1+1.0_dp) + ec0_q1ppp = 0.75_dp*ec0_aa*(rsm1_2**5)*(ec0_b1-ec0_b3*rs) + ec0_f1 = 1._dp/(ec0_q1*ec0_q1*(1._dp + ec0_q1)) + ec0_f2 = 1._dp/(ec0_q1*(1+ec0_q1)) + d3ecrs0_drs3 = 6._dp*ec0_q1p*ec0_f1*(-2._dp*ec0_aa*ec0_a1*ec0_q1p + & +& ec0_q0*ec0_q1pp) - & +& ec0_f2*(-6._dp*ec0_aa*ec0_a1*ec0_q1pp + ec0_q0*ec0_q1ppp + & +& ec0_f2*(3._dp*ec0_q1p*(-2._dp*ec0_aa*ec0_a1*ec0_q1p + ec0_q0*ec0_q1pp) + & +& ec0_f2*2._dp*ec0_q0*(ec0_q1p**3)*(1._dp + 3._dp*ec0_q1*(1._dp + ec0_q1)))) + + mac_q0=-2.0_dp*mac_aa*(1.0_dp+mac_a1*rs) + mac_q1=2.0_dp*mac_aa*(mac_b1*sqr_rs+mac_b2*rs+mac_b3*rs*sqr_rs+mac_b4*rs*rs) + mac_q1p=mac_aa*(mac_b1*rsm1_2+2._dp*mac_b2+3._dp*mac_b3*sqr_rs+4._dp*mac_b4*rs) + mac_den=1.0_dp/(mac_q1*mac_q1+mac_q1) + mac_log=-log( mac_q1*mac_q1*mac_den ) + macrs=mac_q0*mac_log + dmacrs_drs= -2.0_dp*mac_aa*mac_a1*mac_log - mac_q0*mac_q1p*mac_den + + ecrs=ecrs0 + decrs_drs=decrs0_drs + decrs_dzeta=0.0_dp + d2ecrs_drs2=d2ecrs0_drs2 + d2ecrs_dzeta2=alpha_zeta**2*(-macrs) + d2ecrs_drsdzeta=zero + zeta=0.0_dp + + +! Add LSD correlation functional to GGA exchange functional + exci(ipts)=exci(ipts)+ecrs + vxci(ipts,1)=vxci(ipts,1)+ecrs-rs*third*decrs_drs + + dvcrs_drs=third*(2._dp*decrs_drs-rs*d2ecrs_drs2) +! And d(vxc)/d(rho)=(-rs/(3*rho))*d(vxc)/d(rs) + d2ecrs_drho2= -rs**4*(four_pi*third)*third*dvcrs_drs + + dvxci(ipts,1)=dvxci(ipts,1)+d2ecrs_drho2 + d2vcrs_drs2 = third*(d2ecrs_drs2 - rs*d3ecrs0_drs3) + drs_dn = -1._dp*four_pi*ninth*rs**4 + d2rs_dn2 = 64._dp*pi*pi*(rs**7)/81._dp + if(order==3)then + d2vxci(ipts,1) = d2vxci(ipts,1) + d2vcrs_drs2*drs_dn*drs_dn + & +& dvcrs_drs*d2rs_dn2 + + + + end if + + + end do + + end if + + else if(order==-2) then + if(option==2 .or. option==5) then + do ipts=1,npts + + rhotot=rhoarr(ipts) + rhotmot=rhom1_3(ipts) + rhotot_inv=rhotmot*rhotmot*rhotmot + rhotmo6=sqrt(rhotmot) + rhoto6=rhotot*rhotmot*rhotmot*rhotmo6 +! ----------------------------------------------------------------------- +! First take care of the exchange part of the functional + + exc=zero + dvxcdgr(ipts,3)=zero +! loop over the spin + ispden=1 + rho =rho_updn(ipts,ispden) + rhomot=rho_updnm1_3(ipts,ispden) + ex_lsd= - threefourth_divpi * sixpi2_1_3*rhomot*rhomot*rho +! Perdew-Burke-Ernzerhof GGA, exchange part + rho_inv=rhomot*rhomot*rhomot + coeffss=quarter*sixpi2m1_3*sixpi2m1_3*rho_inv*rho_inv*rhomot*rhomot + ss=grho2_updn(ipts,ispden)*coeffss + divss=one/(one+mu_divkappa*ss) + dfxdss= mu*divss*divss + d2fxdss2=-mu*two*mu_divkappa*divss*divss*divss + fx = one+kappa*(one-divss) + ex_gga= ex_lsd*fx + dssdn=-eight*third*ss*rho_inv + dfxdn = dfxdss*dssdn + vxci(ipts,ispden)=ex_lsd*(four_thirds*fx+rho*dfxdn) +! The new definition (v3.3) includes the division by the norm of the gradient + dssdg =two*coeffss + dfxdg=dfxdss*dssdg + dvxcdgr(ipts,ispden)=ex_lsd*rho*dfxdg + exc=exc+ex_gga*rho + +! Perdew-Burke-Ernzerhof GGA, exchange part +! Components 3 or 4 + dvxci(ipts,2+ispden)=dvxcdgr(ipts,ispden) +! Components 1 or 2 + d2ssdn2=-11.0_dp*third*dssdn*rho_inv + d2fxdn2=d2fxdss2*dssdn**2+dfxdss*d2ssdn2 + dvxci(ipts,ispden)=third*rho_inv*vxci(ipts,ispden)+& +& ex_lsd*(seven*third*dfxdn+rho*d2fxdn2) +! Components 5 or 6 + d2ssdndg=-eight*third*dssdg*rho_inv + d2fxdndg=d2fxdss2*dssdn*dssdg+dfxdss*d2ssdndg + dvxci(ipts,4+ispden)=ex_lsd*(four_thirds*dfxdg+rho*d2fxdndg) +! Components 7 or 8 + d2fxdg2=d2fxdss2*dssdg**2 + dvxci(ipts,6+ispden)=ex_lsd*rho*d2fxdg2 +! For the time being, treat non-spin-polarized like spin-polarized + dvxci(ipts,2)=dvxci(ipts,1) + dvxci(ipts,4)=dvxci(ipts,3) + dvxci(ipts,6)=dvxci(ipts,5) + dvxci(ipts,8)=dvxci(ipts,7) +! end of loop over the spin +! If non spin-polarized, treat spin down contribution now, similar to spin up + exc=exc*2 + exci(ipts)=exc*rhotot_inv +! ----------------------------------------------------------------------------- +! Then takes care of the LSD correlation part of the functional + + + rs=rsfac*rhotmot + sqr_rs=sq_rsfac*rhotmo6 + rsm1_2=sq_rsfac_inv*rhoto6 + +! Formulas A6-A8 of PW92LSD + ec0_q0=-2.0_dp*ec0_aa*(1.0_dp+ec0_a1*rs) + ec0_q1=2.0_dp*ec0_aa*(ec0_b1*sqr_rs+ec0_b2*rs+ec0_b3*rs*sqr_rs+ec0_b4*rs*rs) + ec0_q1p=ec0_aa*(ec0_b1*rsm1_2+2._dp*ec0_b2+3._dp*ec0_b3*sqr_rs+4._dp*ec0_b4*rs) + ec0_den=1.0_dp/(ec0_q1*ec0_q1+ec0_q1) +! ec0_log=log( 1.0_dp + 1.0_dp / ec0_q1 ) + ec0_log=-log( ec0_q1*ec0_q1*ec0_den ) + ecrs0=ec0_q0*ec0_log + decrs0_drs= -2.0_dp*ec0_aa*ec0_a1*ec0_log - ec0_q0*ec0_q1p *ec0_den + ec0_q1pp=0.5_dp*ec0_aa*(-ec0_b1*rsm1_2**3+3._dp*ec0_b3*rsm1_2+8._dp*ec0_b4) + d2ecrs0_drs2= 4.0_dp*ec0_aa*ec0_a1*ec0_q1p*ec0_den & +& -ec0_q0*ec0_q1pp*ec0_den & +& +ec0_q0*ec0_q1p**2*ec0_den**2*(2._dp*ec0_q1+1.0_dp) + + mac_q0=-2.0_dp*mac_aa*(1.0_dp+mac_a1*rs) + mac_q1=2.0_dp*mac_aa*(mac_b1*sqr_rs+mac_b2*rs+mac_b3*rs*sqr_rs+mac_b4*rs*rs) + mac_q1p=mac_aa*(mac_b1*rsm1_2+2._dp*mac_b2+3._dp*mac_b3*sqr_rs+4._dp*mac_b4*rs) + mac_den=1.0_dp/(mac_q1*mac_q1+mac_q1) + mac_log=-log( mac_q1*mac_q1*mac_den ) + macrs=mac_q0*mac_log + dmacrs_drs= -2.0_dp*mac_aa*mac_a1*mac_log - mac_q0*mac_q1p*mac_den + + ecrs=ecrs0 + decrs_drs=decrs0_drs + decrs_dzeta=0.0_dp + d2ecrs_drs2=d2ecrs0_drs2 + d2ecrs_dzeta2=alpha_zeta**2*(-macrs) + d2ecrs_drsdzeta=zero + zeta=0.0_dp + + +! Add LSD correlation functional to GGA exchange functional + exci(ipts)=exci(ipts)+ecrs + vxci(ipts,1)=vxci(ipts,1)+ecrs-rs*third*decrs_drs + + dvcrs_drs=third*(2._dp*decrs_drs-rs*d2ecrs_drs2) +! And d(vxc)/d(rho)=(-rs/(3*rho))*d(vxc)/d(rs) + d2ecrs_drho2= -rs**4*(four_pi*third)*third*dvcrs_drs + dvxci(ipts,9)=d2ecrs_drho2 + dvxci(ipts,10)=d2ecrs_drho2 + dvxci(ipts,11)=d2ecrs_drho2 + +! ----------------------------------------------------------------------------- +! Eventually add the GGA correlation part of the PBE functional +! Note : the computation of the potential in the spin-unpolarized +! case could be optimized much further. Other optimizations are left to do. + + phi_zeta=1.0_dp + phip_zeta=0.0_dp + phi_zeta_inv=1.0_dp + phi_logder=0.0_dp + phi3_zeta=1.0_dp + gamphi3inv=gamma_inv + phipp_zeta=-two*ninth*alpha_zeta*alpha_zeta + +! From ec to bb + bb=ecrs*gamphi3inv + dbb_drs=decrs_drs*gamphi3inv + dbb_dzeta=gamphi3inv*(decrs_dzeta-three*ecrs*phi_logder) + d2bb_drs2=d2ecrs_drs2*gamphi3inv + d2bb_drsdzeta=gamphi3inv*(d2ecrs_drsdzeta-three*decrs_drs*phi_logder) + d2bb_dzeta2=gamphi3inv*(d2ecrs_dzeta2-six*decrs_dzeta*phi_logder+& +& 12.0_dp*ecrs*phi_logder*phi_logder-three*ecrs*phi_zeta_inv*phipp_zeta) + +! From bb to cc + exp_pbe=exp(-bb) + cc=one/(exp_pbe-one) + dcc_dbb=cc*cc*exp_pbe + dcc_drs=dcc_dbb*dbb_drs + dcc_dzeta=dcc_dbb*dbb_dzeta + d2cc_dbb2=cc*cc*exp_pbe*(two*cc*exp_pbe-one) + d2cc_drs2=d2cc_dbb2*dbb_drs*dbb_drs+dcc_dbb*d2bb_drs2 + d2cc_drsdzeta=d2cc_dbb2*dbb_drs*dbb_dzeta+dcc_dbb*d2bb_drsdzeta + d2cc_dzeta2=d2cc_dbb2*dbb_dzeta*dbb_dzeta+dcc_dbb*d2bb_dzeta2 + +! From cc to aa + coeff_aa=beta*gamma_inv*phi_zeta_inv*phi_zeta_inv + aa=coeff_aa*cc + daa_drs=coeff_aa*dcc_drs + daa_dzeta=-two*aa*phi_logder+coeff_aa*dcc_dzeta + d2aa_drs2=coeff_aa*d2cc_drs2 + d2aa_drsdzeta=-two*daa_drs*phi_logder+coeff_aa*d2cc_drsdzeta + d2aa_dzeta2=aa*(-two*phi_zeta_inv*phipp_zeta+six*phi_logder*phi_logder)+& +& coeff_aa*(-four*dcc_dzeta*phi_logder+d2cc_dzeta2) + +! Introduce tt : do not assume that the spin-dependent gradients are collinear + grrho2=four*grho2_updn(ipts,1) + dtt_dg=two*rhotot_inv*rhotot_inv*rhotmot*coeff_tt +! Note that tt is (the t variable of PBE divided by phi) squared + tt=half*grrho2*dtt_dg + +! Get xx from aa and tt + xx=aa*tt + dxx_drs=daa_drs*tt + dxx_dzeta=daa_dzeta*tt + dxx_dtt=aa + d2xx_drs2=d2aa_drs2*tt + d2xx_drsdzeta=d2aa_drsdzeta*tt + d2xx_drsdtt=daa_drs + d2xx_dttdzeta=daa_dzeta + d2xx_dzeta2=d2aa_dzeta2*tt + +! From xx to pade + pade_den=one/(one+xx*(one+xx)) + pade=(one+xx)*pade_den + dpade_dxx=-xx*(two+xx)*pade_den**2 + dpade_drs=dpade_dxx*dxx_drs + dpade_dtt=dpade_dxx*dxx_dtt + dpade_dzeta=dpade_dxx*dxx_dzeta + d2pade_dxx2=two*(-one+xx*xx*(three+xx))*pade_den*pade_den*pade_den + d2pade_drs2=d2pade_dxx2*dxx_drs*dxx_drs+dpade_dxx*d2xx_drs2 + d2pade_drsdtt=d2pade_dxx2*dxx_drs*dxx_dtt+dpade_dxx*d2xx_drsdtt + d2pade_drsdzeta=d2pade_dxx2*dxx_drs*dxx_dzeta+dpade_dxx*d2xx_drsdzeta + d2pade_dtt2=d2pade_dxx2*dxx_dtt*dxx_dtt + d2pade_dttdzeta=d2pade_dxx2*dxx_dtt*dxx_dzeta+dpade_dxx*d2xx_dttdzeta + d2pade_dzeta2=d2pade_dxx2*dxx_dzeta*dxx_dzeta+dpade_dxx*d2xx_dzeta2 + +! From pade to qq + coeff_qq=tt*phi_zeta_inv*phi_zeta_inv + qq=coeff_qq*pade + dqq_drs=coeff_qq*dpade_drs + dqq_dtt=pade*phi_zeta_inv*phi_zeta_inv+coeff_qq*dpade_dtt + dqq_dzeta=coeff_qq*(dpade_dzeta-two*pade*phi_logder) + d2qq_drs2=coeff_qq*d2pade_drs2 + d2qq_drsdtt=phi_zeta_inv*phi_zeta_inv*(dpade_drs+tt*d2pade_drsdtt) + d2qq_drsdzeta=coeff_qq*(d2pade_drsdzeta-two*dpade_drs*phi_logder) + d2qq_dtt2=phi_zeta_inv*phi_zeta_inv*(two*dpade_dtt+tt*d2pade_dtt2) + d2qq_dttdzeta=phi_zeta_inv*phi_zeta_inv*(dpade_dzeta-two*pade*phi_logder)+& +& coeff_qq*(d2pade_dttdzeta-two*dpade_dtt*phi_logder) + d2qq_dzeta2=coeff_qq*( d2pade_dzeta2-four*dpade_dzeta*phi_logder & +& +six*pade*phi_logder*phi_logder & +& -two*pade*phi_zeta_inv*phipp_zeta) + +! From qq to rr + arg_rr=one+beta*gamma_inv*qq + div_rr=one/arg_rr + rr=gamma*log(arg_rr) + drr_dqq=beta*div_rr + drr_drs=drr_dqq*dqq_drs + drr_dtt=drr_dqq*dqq_dtt + drr_dzeta=drr_dqq*dqq_dzeta + d2rr_dqq2=-div_rr**2*beta*beta*gamma_inv + d2rr_drs2=d2rr_dqq2*dqq_drs*dqq_drs+drr_dqq*d2qq_drs2 + d2rr_drsdtt=d2rr_dqq2*dqq_drs*dqq_dtt+drr_dqq*d2qq_drsdtt + d2rr_drsdzeta=d2rr_dqq2*dqq_drs*dqq_dzeta+drr_dqq*d2qq_drsdzeta + d2rr_dtt2=d2rr_dqq2*dqq_dtt*dqq_dtt+drr_dqq*d2qq_dtt2 + d2rr_dttdzeta=d2rr_dqq2*dqq_dtt*dqq_dzeta+drr_dqq*d2qq_dttdzeta + d2rr_dzeta2=d2rr_dqq2*dqq_dzeta*dqq_dzeta+drr_dqq*d2qq_dzeta2 + +! From rr to hh + hh=phi3_zeta*rr + dhh_drs=phi3_zeta*drr_drs + dhh_dtt=phi3_zeta*drr_dtt + dhh_dzeta=phi3_zeta*(drr_dzeta+three*rr*phi_logder) + d2hh_drs2=phi3_zeta*d2rr_drs2 + d2hh_drsdtt=phi3_zeta*d2rr_drsdtt + d2hh_drsdzeta=phi3_zeta*(d2rr_drsdzeta+three*drr_drs*phi_logder) + d2hh_dtt2=phi3_zeta*d2rr_dtt2 + d2hh_dttdzeta=phi3_zeta*(d2rr_dttdzeta+three*drr_dtt*phi_logder) + d2hh_dzeta2=phi3_zeta*(six*rr*phi_logder*phi_logder+& +& six*phi_logder*drr_dzeta+d2rr_dzeta2) & +& +three*phi_zeta*phi_zeta*rr*phipp_zeta + +! The GGA correlation energy is added + exci(ipts)=exci(ipts)+hh + +! Change of variables : from (rs,zeta,tt) to (rhoup,rhodn,grrho) + +! From hh to the derivative of the energy wrt the density + drhohh_drho=hh-third*rs*dhh_drs-zeta*dhh_dzeta-seven*third*tt*dhh_dtt + vxci(ipts,1)=vxci(ipts,1)+drhohh_drho + +! From hh to the derivative of the energy wrt to the gradient of the +! density, divided by the gradient of the density +! (The v3.3 definition includes the division by the norm of the gradient) + dvxcdgr(ipts,3)=rhotot*dtt_dg*dhh_dtt + + d2rhohh_drho2=rhotot_inv*& +& (-two*ninth*rs*dhh_drs +seven*four*ninth*tt*dhh_dtt & +& +ninth*rs*rs*d2hh_drs2+zeta*zeta*d2hh_dzeta2+(seven*third*tt)**2*d2hh_dtt2 & +& +two*third*rs*zeta*d2hh_drsdzeta+two*seven*ninth*rs*tt*d2hh_drsdtt & +& +two*seven*third*tt*zeta*d2hh_dttdzeta) + d2rhohh_drhodg=dtt_dg*(-four*third*dhh_dtt-third*rs*d2hh_drsdtt & +& -zeta*d2hh_dttdzeta-seven*third*tt*d2hh_dtt2) + +! Component 12 : first derivative with respect to the gradient +! of the density, div by the grad of the density + dvxci(ipts,12)=dvxcdgr(ipts,3) +! Components 9, 10 and 11 : second derivatives with respect to the spin-density +! Note that there is already a contribution from LSDA + dvxci(ipts,9)=dvxci(ipts,9)+d2rhohh_drho2+rhotot_inv* & +& ( d2hh_dzeta2*(one-two*zeta) & +& -two*third*rs*d2hh_drsdzeta-14.0_dp*third*tt*d2hh_dttdzeta) + dvxci(ipts,10)=dvxci(ipts,10)+d2rhohh_drho2-rhotot_inv*d2hh_dzeta2 + dvxci(ipts,11)=dvxci(ipts,11)+d2rhohh_drho2+rhotot_inv* & +& ( d2hh_dzeta2*(one+two*zeta) & +& +two*third*rs*d2hh_drsdzeta+14.0_dp*third*tt*d2hh_dttdzeta) +! Components 13 and 14 : second derivatives with respect to spin density +! and gradient, divided by the gradient + dvxci(ipts,13)=d2rhohh_drhodg+dtt_dg*d2hh_dttdzeta + dvxci(ipts,14)=d2rhohh_drhodg-dtt_dg*d2hh_dttdzeta +! Component 15 : derivative of the (derivative wrt the gradient div by the grad), +! divided by the grad + dvxci(ipts,15)=rhotot*d2hh_dtt2*dtt_dg*dtt_dg + + +! End condition of GGA + + +! Correlation has been added +! ----------------------------------------------------------------------------- + +! vxci(ipts,2)=vxci(ipts,1) + dvxcdgr(ipts,2)=dvxcdgr(ipts,1) + + end do + + else if ((option==6) .or. (option==7)) then + do ipts=1,npts + + rhotot=rhoarr(ipts) + rhotmot=rhom1_3(ipts) + rhotot_inv=rhotmot*rhotmot*rhotmot + rhotmo6=sqrt(rhotmot) + rhoto6=rhotot*rhotmot*rhotmot*rhotmo6 +! ----------------------------------------------------------------------- +! First take care of the exchange part of the functional + + exc=zero + dvxcdgr(ipts,3)=zero +! loop over the spin + ispden=1 + rho =rho_updn(ipts,ispden) + rhomot=rho_updnm1_3(ipts,ispden) + ex_lsd= - threefourth_divpi * sixpi2_1_3*rhomot*rhomot*rho +! Perdew-Burke-Ernzerhof GGA, exchange part + rho_inv=rhomot*rhomot*rhomot + coeffss=quarter*sixpi2m1_3*sixpi2m1_3*rho_inv*rho_inv*rhomot*rhomot + ss=grho2_updn(ipts,ispden)*coeffss + + if (option==6) then + divss=exp(-mu_divkappa*ss) + dfxdss= mu*divss + d2fxdss2=-mu*mu_divkappa*divss + + fx = one+kappa*(one-divss) + ex_gga= ex_lsd*fx + dssdn=-eight*third*ss*rho_inv + dfxdn = dfxdss*dssdn + vxci(ipts,ispden)=ex_lsd*(four_thirds*fx+rho*dfxdn) +! The new definition (v3.3) includes the division by the norm of the gradient + dssdg =two*coeffss + dfxdg=dfxdss*dssdg + dvxcdgr(ipts,ispden)=ex_lsd*rho*dfxdg + exc=exc+ex_gga*rho +! This is the Wu and Cohen modification + else + expss=exp(-ss) + p1_wc=b_wc+(mu-b_wc)*(one-ss)*expss+two*c_wc*ss/(one+c_wc*ss*ss) + p2_wc=d_wc*(ss-two)*expss+two*c_wc/(one+c_wc*ss*ss)-& +& four*c_wc*c_wc*ss*ss/((one+c_wc*ss*ss)*(one+c_wc*ss*ss)) + divss=one/(one+(b_wc*ss+d_wc*ss*expss+log(one+c_wc*ss*ss))/kappa) + dfxdss=p1_wc*divss*divss + d2fxdss2=p2_wc*divss*divss-two*divss*divss*divss*p1_wc*p1_wc/kappa + + fx = one+kappa*(one-divss) + ex_gga= ex_lsd*fx + dssdn=-eight*third*ss*rho_inv + dfxdn = dfxdss*dssdn + vxci(ipts,ispden)=ex_lsd*(four_thirds*fx+rho*dfxdn) +! The new definition (v3.3) includes the division by the norm of the gradient + dssdg =two*coeffss + dfxdg=dfxdss*dssdg + dvxcdgr(ipts,ispden)=ex_lsd*rho*dfxdg + exc=exc+ex_gga*rho + end if + +! Perdew-Burke-Ernzerhof GGA, exchange part +! Components 3 or 4 + dvxci(ipts,2+ispden)=dvxcdgr(ipts,ispden) +! Components 1 or 2 + d2ssdn2=-11.0_dp*third*dssdn*rho_inv + d2fxdn2=d2fxdss2*dssdn**2+dfxdss*d2ssdn2 + dvxci(ipts,ispden)=third*rho_inv*vxci(ipts,ispden)+& +& ex_lsd*(seven*third*dfxdn+rho*d2fxdn2) +! Components 5 or 6 + d2ssdndg=-eight*third*dssdg*rho_inv + d2fxdndg=d2fxdss2*dssdn*dssdg+dfxdss*d2ssdndg + dvxci(ipts,4+ispden)=ex_lsd*(four_thirds*dfxdg+rho*d2fxdndg) +! Components 7 or 8 + d2fxdg2=d2fxdss2*dssdg**2 + dvxci(ipts,6+ispden)=ex_lsd*rho*d2fxdg2 +! For the time being, treat non-spin-polarized like spin-polarized + dvxci(ipts,2)=dvxci(ipts,1) + dvxci(ipts,4)=dvxci(ipts,3) + dvxci(ipts,6)=dvxci(ipts,5) + dvxci(ipts,8)=dvxci(ipts,7) +! end of loop over the spin +! If non spin-polarized, treat spin down contribution now, similar to spin up + exc=exc*2 + exci(ipts)=exc*rhotot_inv +! ----------------------------------------------------------------------------- +! Then takes care of the LSD correlation part of the functional + + + rs=rsfac*rhotmot + sqr_rs=sq_rsfac*rhotmo6 + rsm1_2=sq_rsfac_inv*rhoto6 + +! Formulas A6-A8 of PW92LSD + ec0_q0=-2.0_dp*ec0_aa*(1.0_dp+ec0_a1*rs) + ec0_q1=2.0_dp*ec0_aa*(ec0_b1*sqr_rs+ec0_b2*rs+ec0_b3*rs*sqr_rs+ec0_b4*rs*rs) + ec0_q1p=ec0_aa*(ec0_b1*rsm1_2+2._dp*ec0_b2+3._dp*ec0_b3*sqr_rs+4._dp*ec0_b4*rs) + ec0_den=1.0_dp/(ec0_q1*ec0_q1+ec0_q1) +! ec0_log=log( 1.0_dp + 1.0_dp / ec0_q1 ) + ec0_log=-log( ec0_q1*ec0_q1*ec0_den ) + ecrs0=ec0_q0*ec0_log + decrs0_drs= -2.0_dp*ec0_aa*ec0_a1*ec0_log - ec0_q0*ec0_q1p *ec0_den + ec0_q1pp=0.5_dp*ec0_aa*(-ec0_b1*rsm1_2**3+3._dp*ec0_b3*rsm1_2+8._dp*ec0_b4) + d2ecrs0_drs2= 4.0_dp*ec0_aa*ec0_a1*ec0_q1p*ec0_den & +& -ec0_q0*ec0_q1pp*ec0_den & +& +ec0_q0*ec0_q1p**2*ec0_den**2*(2._dp*ec0_q1+1.0_dp) + + mac_q0=-2.0_dp*mac_aa*(1.0_dp+mac_a1*rs) + mac_q1=2.0_dp*mac_aa*(mac_b1*sqr_rs+mac_b2*rs+mac_b3*rs*sqr_rs+mac_b4*rs*rs) + mac_q1p=mac_aa*(mac_b1*rsm1_2+2._dp*mac_b2+3._dp*mac_b3*sqr_rs+4._dp*mac_b4*rs) + mac_den=1.0_dp/(mac_q1*mac_q1+mac_q1) + mac_log=-log( mac_q1*mac_q1*mac_den ) + macrs=mac_q0*mac_log + dmacrs_drs= -2.0_dp*mac_aa*mac_a1*mac_log - mac_q0*mac_q1p*mac_den + + ecrs=ecrs0 + decrs_drs=decrs0_drs + decrs_dzeta=0.0_dp + d2ecrs_drs2=d2ecrs0_drs2 + d2ecrs_dzeta2=alpha_zeta**2*(-macrs) + d2ecrs_drsdzeta=zero + zeta=0.0_dp + + +! Add LSD correlation functional to GGA exchange functional + exci(ipts)=exci(ipts)+ecrs + vxci(ipts,1)=vxci(ipts,1)+ecrs-rs*third*decrs_drs + + dvcrs_drs=third*(2._dp*decrs_drs-rs*d2ecrs_drs2) +! And d(vxc)/d(rho)=(-rs/(3*rho))*d(vxc)/d(rs) + d2ecrs_drho2= -rs**4*(four_pi*third)*third*dvcrs_drs + dvxci(ipts,9)=d2ecrs_drho2 + dvxci(ipts,10)=d2ecrs_drho2 + dvxci(ipts,11)=d2ecrs_drho2 + +! ----------------------------------------------------------------------------- +! Eventually add the GGA correlation part of the PBE functional +! Note : the computation of the potential in the spin-unpolarized +! case could be optimized much further. Other optimizations are left to do. + + phi_zeta=1.0_dp + phip_zeta=0.0_dp + phi_zeta_inv=1.0_dp + phi_logder=0.0_dp + phi3_zeta=1.0_dp + gamphi3inv=gamma_inv + phipp_zeta=-two*ninth*alpha_zeta*alpha_zeta + +! From ec to bb + bb=ecrs*gamphi3inv + dbb_drs=decrs_drs*gamphi3inv + dbb_dzeta=gamphi3inv*(decrs_dzeta-three*ecrs*phi_logder) + d2bb_drs2=d2ecrs_drs2*gamphi3inv + d2bb_drsdzeta=gamphi3inv*(d2ecrs_drsdzeta-three*decrs_drs*phi_logder) + d2bb_dzeta2=gamphi3inv*(d2ecrs_dzeta2-six*decrs_dzeta*phi_logder+& +& 12.0_dp*ecrs*phi_logder*phi_logder-three*ecrs*phi_zeta_inv*phipp_zeta) + +! From bb to cc + exp_pbe=exp(-bb) + cc=one/(exp_pbe-one) + dcc_dbb=cc*cc*exp_pbe + dcc_drs=dcc_dbb*dbb_drs + dcc_dzeta=dcc_dbb*dbb_dzeta + d2cc_dbb2=cc*cc*exp_pbe*(two*cc*exp_pbe-one) + d2cc_drs2=d2cc_dbb2*dbb_drs*dbb_drs+dcc_dbb*d2bb_drs2 + d2cc_drsdzeta=d2cc_dbb2*dbb_drs*dbb_dzeta+dcc_dbb*d2bb_drsdzeta + d2cc_dzeta2=d2cc_dbb2*dbb_dzeta*dbb_dzeta+dcc_dbb*d2bb_dzeta2 + +! From cc to aa + coeff_aa=beta*gamma_inv*phi_zeta_inv*phi_zeta_inv + aa=coeff_aa*cc + daa_drs=coeff_aa*dcc_drs + daa_dzeta=-two*aa*phi_logder+coeff_aa*dcc_dzeta + d2aa_drs2=coeff_aa*d2cc_drs2 + d2aa_drsdzeta=-two*daa_drs*phi_logder+coeff_aa*d2cc_drsdzeta + d2aa_dzeta2=aa*(-two*phi_zeta_inv*phipp_zeta+six*phi_logder*phi_logder)+& +& coeff_aa*(-four*dcc_dzeta*phi_logder+d2cc_dzeta2) + +! Introduce tt : do not assume that the spin-dependent gradients are collinear + grrho2=four*grho2_updn(ipts,1) + dtt_dg=two*rhotot_inv*rhotot_inv*rhotmot*coeff_tt +! Note that tt is (the t variable of PBE divided by phi) squared + tt=half*grrho2*dtt_dg + +! Get xx from aa and tt + xx=aa*tt + dxx_drs=daa_drs*tt + dxx_dzeta=daa_dzeta*tt + dxx_dtt=aa + d2xx_drs2=d2aa_drs2*tt + d2xx_drsdzeta=d2aa_drsdzeta*tt + d2xx_drsdtt=daa_drs + d2xx_dttdzeta=daa_dzeta + d2xx_dzeta2=d2aa_dzeta2*tt + +! From xx to pade + pade_den=one/(one+xx*(one+xx)) + pade=(one+xx)*pade_den + dpade_dxx=-xx*(two+xx)*pade_den**2 + dpade_drs=dpade_dxx*dxx_drs + dpade_dtt=dpade_dxx*dxx_dtt + dpade_dzeta=dpade_dxx*dxx_dzeta + d2pade_dxx2=two*(-one+xx*xx*(three+xx))*pade_den*pade_den*pade_den + d2pade_drs2=d2pade_dxx2*dxx_drs*dxx_drs+dpade_dxx*d2xx_drs2 + d2pade_drsdtt=d2pade_dxx2*dxx_drs*dxx_dtt+dpade_dxx*d2xx_drsdtt + d2pade_drsdzeta=d2pade_dxx2*dxx_drs*dxx_dzeta+dpade_dxx*d2xx_drsdzeta + d2pade_dtt2=d2pade_dxx2*dxx_dtt*dxx_dtt + d2pade_dttdzeta=d2pade_dxx2*dxx_dtt*dxx_dzeta+dpade_dxx*d2xx_dttdzeta + d2pade_dzeta2=d2pade_dxx2*dxx_dzeta*dxx_dzeta+dpade_dxx*d2xx_dzeta2 + +! From pade to qq + coeff_qq=tt*phi_zeta_inv*phi_zeta_inv + qq=coeff_qq*pade + dqq_drs=coeff_qq*dpade_drs + dqq_dtt=pade*phi_zeta_inv*phi_zeta_inv+coeff_qq*dpade_dtt + dqq_dzeta=coeff_qq*(dpade_dzeta-two*pade*phi_logder) + d2qq_drs2=coeff_qq*d2pade_drs2 + d2qq_drsdtt=phi_zeta_inv*phi_zeta_inv*(dpade_drs+tt*d2pade_drsdtt) + d2qq_drsdzeta=coeff_qq*(d2pade_drsdzeta-two*dpade_drs*phi_logder) + d2qq_dtt2=phi_zeta_inv*phi_zeta_inv*(two*dpade_dtt+tt*d2pade_dtt2) + d2qq_dttdzeta=phi_zeta_inv*phi_zeta_inv*(dpade_dzeta-two*pade*phi_logder)+& +& coeff_qq*(d2pade_dttdzeta-two*dpade_dtt*phi_logder) + d2qq_dzeta2=coeff_qq*( d2pade_dzeta2-four*dpade_dzeta*phi_logder & +& +six*pade*phi_logder*phi_logder & +& -two*pade*phi_zeta_inv*phipp_zeta) + +! From qq to rr + arg_rr=one+beta*gamma_inv*qq + div_rr=one/arg_rr + rr=gamma*log(arg_rr) + drr_dqq=beta*div_rr + drr_drs=drr_dqq*dqq_drs + drr_dtt=drr_dqq*dqq_dtt + drr_dzeta=drr_dqq*dqq_dzeta + d2rr_dqq2=-div_rr**2*beta*beta*gamma_inv + d2rr_drs2=d2rr_dqq2*dqq_drs*dqq_drs+drr_dqq*d2qq_drs2 + d2rr_drsdtt=d2rr_dqq2*dqq_drs*dqq_dtt+drr_dqq*d2qq_drsdtt + d2rr_drsdzeta=d2rr_dqq2*dqq_drs*dqq_dzeta+drr_dqq*d2qq_drsdzeta + d2rr_dtt2=d2rr_dqq2*dqq_dtt*dqq_dtt+drr_dqq*d2qq_dtt2 + d2rr_dttdzeta=d2rr_dqq2*dqq_dtt*dqq_dzeta+drr_dqq*d2qq_dttdzeta + d2rr_dzeta2=d2rr_dqq2*dqq_dzeta*dqq_dzeta+drr_dqq*d2qq_dzeta2 + +! From rr to hh + hh=phi3_zeta*rr + dhh_drs=phi3_zeta*drr_drs + dhh_dtt=phi3_zeta*drr_dtt + dhh_dzeta=phi3_zeta*(drr_dzeta+three*rr*phi_logder) + d2hh_drs2=phi3_zeta*d2rr_drs2 + d2hh_drsdtt=phi3_zeta*d2rr_drsdtt + d2hh_drsdzeta=phi3_zeta*(d2rr_drsdzeta+three*drr_drs*phi_logder) + d2hh_dtt2=phi3_zeta*d2rr_dtt2 + d2hh_dttdzeta=phi3_zeta*(d2rr_dttdzeta+three*drr_dtt*phi_logder) + d2hh_dzeta2=phi3_zeta*(six*rr*phi_logder*phi_logder+& +& six*phi_logder*drr_dzeta+d2rr_dzeta2) & +& +three*phi_zeta*phi_zeta*rr*phipp_zeta + +! The GGA correlation energy is added + exci(ipts)=exci(ipts)+hh + +! Change of variables : from (rs,zeta,tt) to (rhoup,rhodn,grrho) + +! From hh to the derivative of the energy wrt the density + drhohh_drho=hh-third*rs*dhh_drs-zeta*dhh_dzeta-seven*third*tt*dhh_dtt + vxci(ipts,1)=vxci(ipts,1)+drhohh_drho + +! From hh to the derivative of the energy wrt to the gradient of the +! density, divided by the gradient of the density +! (The v3.3 definition includes the division by the norm of the gradient) + dvxcdgr(ipts,3)=rhotot*dtt_dg*dhh_dtt + + d2rhohh_drho2=rhotot_inv*& +& (-two*ninth*rs*dhh_drs +seven*four*ninth*tt*dhh_dtt & +& +ninth*rs*rs*d2hh_drs2+zeta*zeta*d2hh_dzeta2+(seven*third*tt)**2*d2hh_dtt2 & +& +two*third*rs*zeta*d2hh_drsdzeta+two*seven*ninth*rs*tt*d2hh_drsdtt & +& +two*seven*third*tt*zeta*d2hh_dttdzeta) + d2rhohh_drhodg=dtt_dg*(-four*third*dhh_dtt-third*rs*d2hh_drsdtt & +& -zeta*d2hh_dttdzeta-seven*third*tt*d2hh_dtt2) + +! Component 12 : first derivative with respect to the gradient +! of the density, div by the grad of the density + dvxci(ipts,12)=dvxcdgr(ipts,3) +! Components 9, 10 and 11 : second derivatives with respect to the spin-density +! Note that there is already a contribution from LSDA + dvxci(ipts,9)=dvxci(ipts,9)+d2rhohh_drho2+rhotot_inv* & +& ( d2hh_dzeta2*(one-two*zeta) & +& -two*third*rs*d2hh_drsdzeta-14.0_dp*third*tt*d2hh_dttdzeta) + dvxci(ipts,10)=dvxci(ipts,10)+d2rhohh_drho2-rhotot_inv*d2hh_dzeta2 + dvxci(ipts,11)=dvxci(ipts,11)+d2rhohh_drho2+rhotot_inv* & +& ( d2hh_dzeta2*(one+two*zeta) & +& +two*third*rs*d2hh_drsdzeta+14.0_dp*third*tt*d2hh_dttdzeta) +! Components 13 and 14 : second derivatives with respect to spin density +! and gradient, divided by the gradient + dvxci(ipts,13)=d2rhohh_drhodg+dtt_dg*d2hh_dttdzeta + dvxci(ipts,14)=d2rhohh_drhodg-dtt_dg*d2hh_dttdzeta +! Component 15 : derivative of the (derivative wrt the gradient div by the grad), +! divided by the grad + dvxci(ipts,15)=rhotot*d2hh_dtt2*dtt_dg*dtt_dg + + +! End condition of GGA + + +! Correlation has been added +! ----------------------------------------------------------------------------- + +! vxci(ipts,2)=vxci(ipts,1) + dvxcdgr(ipts,2)=dvxcdgr(ipts,1) + + end do + + else if (option==-1) then + do ipts=1,npts + + rhotot=rhoarr(ipts) + rhotmot=rhom1_3(ipts) + rhotot_inv=rhotmot*rhotmot*rhotmot + rhotmo6=sqrt(rhotmot) + rhoto6=rhotot*rhotmot*rhotmot*rhotmo6 +! ----------------------------------------------------------------------- +! First take care of the exchange part of the functional + + exc=zero +! loop over the spin + ispden=1 + rho =rho_updn(ipts,ispden) + rhomot=rho_updnm1_3(ipts,ispden) + ex_lsd= - threefourth_divpi * sixpi2_1_3*rhomot*rhomot*rho +! Perdew_Wang 91 LSD + vxci(ipts,ispden)=four_thirds*ex_lsd + exc=exc+ex_lsd*rho + +! Perdew_Wang 91 LSD + dvxci(ipts,2*ispden-1)=-four_thirds*third*& +& threefourth_divpi*sixpi2_1_3*rhomot*rhomot + dvxci(ipts,2)=zero +! If non-spin-polarized, first component of dvxci is second +! derivative with respect to TOTAL density. + dvxci(ipts,1)=dvxci(ipts,1)*half +! Compute the second derivative of vx +! vx^(2) = -2*vx^(1)/(3*rhotot) +! end of loop over the spin +! If non spin-polarized, treat spin down contribution now, similar to spin up + exc=exc*2 + exci(ipts)=exc*rhotot_inv + + +! Correlation has been added +! ----------------------------------------------------------------------------- + + + end do + + else if (option==-2) then + do ipts=1,npts + + rhotot=rhoarr(ipts) + rhotmot=rhom1_3(ipts) + rhotot_inv=rhotmot*rhotmot*rhotmot + rhotmo6=sqrt(rhotmot) + rhoto6=rhotot*rhotmot*rhotmot*rhotmo6 +! ----------------------------------------------------------------------- +! First take care of the exchange part of the functional + + exc=zero + dvxcdgr(ipts,3)=zero +! loop over the spin + ispden=1 + rho =rho_updn(ipts,ispden) + rhomot=rho_updnm1_3(ipts,ispden) + ex_lsd= - threefourth_divpi * sixpi2_1_3*rhomot*rhomot*rho +! Perdew-Burke-Ernzerhof GGA, exchange part + rho_inv=rhomot*rhomot*rhomot + coeffss=quarter*sixpi2m1_3*sixpi2m1_3*rho_inv*rho_inv*rhomot*rhomot + ss=grho2_updn(ipts,ispden)*coeffss + divss=one/(one+mu_divkappa*ss) + dfxdss= mu*divss*divss + d2fxdss2=-mu*two*mu_divkappa*divss*divss*divss + fx = one+kappa*(one-divss) + ex_gga= ex_lsd*fx + dssdn=-eight*third*ss*rho_inv + dfxdn = dfxdss*dssdn + vxci(ipts,ispden)=ex_lsd*(four_thirds*fx+rho*dfxdn) +! The new definition (v3.3) includes the division by the norm of the gradient + dssdg =two*coeffss + dfxdg=dfxdss*dssdg + dvxcdgr(ipts,ispden)=ex_lsd*rho*dfxdg + exc=exc+ex_gga*rho + +! Perdew-Burke-Ernzerhof GGA, exchange part +! Components 3 or 4 + dvxci(ipts,2+ispden)=dvxcdgr(ipts,ispden) +! Components 1 or 2 + d2ssdn2=-11.0_dp*third*dssdn*rho_inv + d2fxdn2=d2fxdss2*dssdn**2+dfxdss*d2ssdn2 + dvxci(ipts,ispden)=third*rho_inv*vxci(ipts,ispden)+& +& ex_lsd*(seven*third*dfxdn+rho*d2fxdn2) +! Components 5 or 6 + d2ssdndg=-eight*third*dssdg*rho_inv + d2fxdndg=d2fxdss2*dssdn*dssdg+dfxdss*d2ssdndg + dvxci(ipts,4+ispden)=ex_lsd*(four_thirds*dfxdg+rho*d2fxdndg) +! Components 7 or 8 + d2fxdg2=d2fxdss2*dssdg**2 + dvxci(ipts,6+ispden)=ex_lsd*rho*d2fxdg2 +! For the time being, treat non-spin-polarized like spin-polarized + dvxci(ipts,2)=dvxci(ipts,1) + dvxci(ipts,4)=dvxci(ipts,3) + dvxci(ipts,6)=dvxci(ipts,5) + dvxci(ipts,8)=dvxci(ipts,7) +! end of loop over the spin +! If non spin-polarized, treat spin down contribution now, similar to spin up + exc=exc*2 + exci(ipts)=exc*rhotot_inv +! ----------------------------------------------------------------------------- +! Then takes care of the LSD correlation part of the functional + + +! Correlation has been added +! ----------------------------------------------------------------------------- + +! vxci(ipts,2)=vxci(ipts,1) + dvxcdgr(ipts,2)=dvxcdgr(ipts,1) + + end do + + else if(option==-4) then + + + do ipts=1,npts + + rhotot=rhoarr(ipts) + rhotmot=rhom1_3(ipts) + rhotot_inv=rhotmot*rhotmot*rhotmot + rhotmo6=sqrt(rhotmot) + rhoto6=rhotot*rhotmot*rhotmot*rhotmo6 +! ----------------------------------------------------------------------- +! First take care of the exchange part of the functional + + exc=zero + dvxcdgr(ipts,3)=zero +! loop over the spin + ispden=1 + rho =rho_updn(ipts,ispden) + rhomot=rho_updnm1_3(ipts,ispden) + ex_lsd= - threefourth_divpi * sixpi2_1_3*rhomot*rhomot*rho +! VALENTINO R. COOPER C09x GGA, This is an exchange term proposed +! to use together with vdw-DF (see above). + rho_inv=rhomot*rhomot*rhomot + coeffss=quarter*sixpi2m1_3*sixpi2m1_3*rho_inv*rho_inv*rhomot*rhomot +! the quarter that is lacking is compensated by the grho2_updn in the +! next line. + ss=grho2_updn(ipts,ispden)*coeffss + alphs2=alpha_c09*ss + alphmu=alpha_c09*mu_c09 + dfxdss= mu_c09*exp(-alphs2)*(one-alphs2)+& +& kappa*alpha_c09*exp(-alphs2/two)/two + d2fxdss2=-alphmu*exp(-alphs2)*(two-alphs2)-& +& kappa*(alpha_c09**two)*exp(alphs2/two)/four + fx = one+mu_c09*ss*exp(-alphs2)+kappa*(one-exp(-alphs2/two)) + ex_gga= ex_lsd*fx + dssdn=-eight*third*ss*rho_inv + dfxdn = dfxdss*dssdn + vxci(ipts,ispden)=ex_lsd*(four_thirds*fx+rho*dfxdn) +! The new definition (v3.3) includes the division by the norm of the gradient + dssdg =two*coeffss + dfxdg=dfxdss*dssdg + dvxcdgr(ipts,ispden)=ex_lsd*rho*dfxdg + exc=exc+ex_gga*rho + +! Cooper C09x GGA exchange +! Components 3 or 4 + dvxci(ipts,2+ispden)=dvxcdgr(ipts,ispden) +! Components 1 or 2 + d2ssdn2=-11.0_dp*third*dssdn*rho_inv + d2fxdn2=d2fxdss2*dssdn**2+dfxdss*d2ssdn2 + dvxci(ipts,ispden)=third*rho_inv*vxci(ipts,ispden)+& +& ex_lsd*(seven*third*dfxdn+rho*d2fxdn2) +! Components 5 or 6 + d2ssdndg=-eight*third*dssdg*rho_inv + d2fxdndg=d2fxdss2*dssdn*dssdg+dfxdss*d2ssdndg + dvxci(ipts,4+ispden)=ex_lsd*(four_thirds*dfxdg+rho*d2fxdndg) +! Components 7 or 8 + d2fxdg2=d2fxdss2*dssdg**2 + dvxci(ipts,6+ispden)=ex_lsd*rho*d2fxdg2 +! For the time being, treat non-spin-polarized like spin-polarized + dvxci(ipts,2)=dvxci(ipts,1) + dvxci(ipts,4)=dvxci(ipts,3) + dvxci(ipts,6)=dvxci(ipts,5) + dvxci(ipts,8)=dvxci(ipts,7) + +! end of loop over the spin +! If non spin-polarized, treat spin down contribution now, similar to spin up + exc=exc*2 + exci(ipts)=exc*rhotot_inv +! ----------------------------------------------------------------------------- +! Then takes care of the LSD correlation part of the functional + +! Correlation has been added +! ----------------------------------------------------------------------------- + +! vxci(ipts,2)=vxci(ipts,1) + dvxcdgr(ipts,2)=dvxcdgr(ipts,1) + + end do + + + else if (option==1) then + do ipts=1,npts + + rhotot=rhoarr(ipts) + rhotmot=rhom1_3(ipts) + rhotot_inv=rhotmot*rhotmot*rhotmot + rhotmo6=sqrt(rhotmot) + rhoto6=rhotot*rhotmot*rhotmot*rhotmo6 +! ----------------------------------------------------------------------- +! First take care of the exchange part of the functional + + exc=zero +! loop over the spin + ispden=1 + rho =rho_updn(ipts,ispden) + rhomot=rho_updnm1_3(ipts,ispden) + ex_lsd= - threefourth_divpi * sixpi2_1_3*rhomot*rhomot*rho +! Perdew_Wang 91 LSD + vxci(ipts,ispden)=four_thirds*ex_lsd + exc=exc+ex_lsd*rho + + +! Perdew_Wang 91 LSD + dvxci(ipts,2*ispden-1)=-four_thirds*third*& +& threefourth_divpi*sixpi2_1_3*rhomot*rhomot + dvxci(ipts,2)=zero +! If non-spin-polarized, first component of dvxci is second +! derivative with respect to TOTAL density. + dvxci(ipts,1)=dvxci(ipts,1)*half +! Compute the second derivative of vx +! vx^(2) = -2*vx^(1)/(3*rhotot) +! end of loop over the spin +! If non spin-polarized, treat spin down contribution now, similar to spin up + exc=exc*2 + exci(ipts)=exc*rhotot_inv +! ----------------------------------------------------------------------------- +! Then takes care of the LSD correlation part of the functional + + rs=rsfac*rhotmot + sqr_rs=sq_rsfac*rhotmo6 + rsm1_2=sq_rsfac_inv*rhoto6 + +! Formulas A6-A8 of PW92LSD + ec0_q0=-2.0_dp*ec0_aa*(1.0_dp+ec0_a1*rs) + + ec0_q1=2.0_dp*ec0_aa*(ec0_b1*sqr_rs+ec0_b2*rs+ec0_b3*rs*sqr_rs+ec0_b4*rs*rs) + ec0_q1p=ec0_aa*(ec0_b1*rsm1_2+2._dp*ec0_b2+3._dp*ec0_b3*sqr_rs+4._dp*ec0_b4*rs) + ec0_den=1.0_dp/(ec0_q1*ec0_q1+ec0_q1) +! ec0_log=log( 1.0_dp + 1.0_dp / ec0_q1 ) + ec0_log=-log( ec0_q1*ec0_q1*ec0_den ) + ecrs0=ec0_q0*ec0_log + decrs0_drs= -2.0_dp*ec0_aa*ec0_a1*ec0_log - ec0_q0*ec0_q1p *ec0_den + ec0_q1pp=0.5_dp*ec0_aa*(-ec0_b1*rsm1_2**3+3._dp*ec0_b3*rsm1_2+8._dp*ec0_b4) + d2ecrs0_drs2= 4.0_dp*ec0_aa*ec0_a1*ec0_q1p*ec0_den & +& -ec0_q0*ec0_q1pp*ec0_den & +& +ec0_q0*ec0_q1p**2*ec0_den**2*(2._dp*ec0_q1+1.0_dp) + + mac_q0=-2.0_dp*mac_aa*(1.0_dp+mac_a1*rs) + mac_q1=2.0_dp*mac_aa*(mac_b1*sqr_rs+mac_b2*rs+mac_b3*rs*sqr_rs+mac_b4*rs*rs) + mac_q1p=mac_aa*(mac_b1*rsm1_2+2._dp*mac_b2+3._dp*mac_b3*sqr_rs+4._dp*mac_b4*rs) + mac_den=1.0_dp/(mac_q1*mac_q1+mac_q1) + mac_log=-log( mac_q1*mac_q1*mac_den ) + macrs=mac_q0*mac_log + dmacrs_drs= -2.0_dp*mac_aa*mac_a1*mac_log - mac_q0*mac_q1p*mac_den + + ecrs=ecrs0 + decrs_drs=decrs0_drs + decrs_dzeta=0.0_dp + d2ecrs_drs2=d2ecrs0_drs2 + d2ecrs_dzeta2=alpha_zeta**2*(-macrs) + d2ecrs_drsdzeta=zero + zeta=0.0_dp + + +! Add LSD correlation functional to GGA exchange functional + exci(ipts)=exci(ipts)+ecrs + vxci(ipts,1)=vxci(ipts,1)+ecrs-rs*third*decrs_drs + + dvcrs_drs=third*(2._dp*decrs_drs-rs*d2ecrs_drs2) +! And d(vxc)/d(rho)=(-rs/(3*rho))*d(vxc)/d(rs) + d2ecrs_drho2= -rs**4*(four_pi*third)*third*dvcrs_drs + + dvxci(ipts,1)=dvxci(ipts,1)+d2ecrs_drho2 + dvxci(ipts,2)=dvxci(ipts,2)+d2ecrs_drho2-d2ecrs_dzeta2*rhotot_inv + + +! Correlation has been added +! ----------------------------------------------------------------------------- + + end do + + else if (option==3) then + do ipts=1,npts + + rhotot=rhoarr(ipts) + rhotmot=rhom1_3(ipts) + rhotot_inv=rhotmot*rhotmot*rhotmot + rhotmo6=sqrt(rhotmot) + rhoto6=rhotot*rhotmot*rhotmot*rhotmo6 +! ----------------------------------------------------------------------- +! First take care of the exchange part of the functional + + exc=zero +! loop over the spin + ispden=1 + rho =rho_updn(ipts,ispden) + rhomot=rho_updnm1_3(ipts,ispden) + ex_lsd= - threefourth_divpi * sixpi2_1_3*rhomot*rhomot*rho +! Perdew_Wang 91 LSD + vxci(ipts,ispden)=four_thirds*ex_lsd + exc=exc+ex_lsd*rho + +! Perdew_Wang 91 LSD + dvxci(ipts,2*ispden-1)=-four_thirds*third*& +& threefourth_divpi*sixpi2_1_3*rhomot*rhomot + dvxci(ipts,2)=zero +! If non-spin-polarized, first component of dvxci is second +! derivative with respect to TOTAL density. + dvxci(ipts,1)=dvxci(ipts,1)*half +! Compute the second derivative of vx +! vx^(2) = -2*vx^(1)/(3*rhotot) +! end of loop over the spin +! If non spin-polarized, treat spin down contribution now, similar to spin up + exc=exc*2 + exci(ipts)=exc*rhotot_inv +! ----------------------------------------------------------------------------- +! Then takes care of the LSD correlation part of the functional + + + rs=rsfac*rhotmot + sqr_rs=sq_rsfac*rhotmo6 + rsm1_2=sq_rsfac_inv*rhoto6 + +! Formulas A6-A8 of PW92LSD + ec0_q0=-2.0_dp*ec0_aa*(1.0_dp+ec0_a1*rs) + sqr_sqr_rs=max(1.e-15_dp,sqrt(sqr_rs)) + ec0_q1=2.0_dp*ec0_aa*(ec0_b1*sqr_rs+ec0_b2*rs+ec0_b3*rs*sqr_rs+ec0_b4*rs*rs/sqr_sqr_rs) + ec0_q1p=ec0_aa*(ec0_b1*rsm1_2+2._dp*ec0_b2+3._dp*ec0_b3*sqr_rs+3.5_dp*ec0_b4*rs/sqr_sqr_rs) + ec0_den=1.0_dp/(ec0_q1*ec0_q1+ec0_q1) +! ec0_log=log( 1.0_dp + 1.0_dp / ec0_q1 ) + ec0_log=-log( ec0_q1*ec0_q1*ec0_den ) + ecrs0=ec0_q0*ec0_log + decrs0_drs= -2.0_dp*ec0_aa*ec0_a1*ec0_log - ec0_q0*ec0_q1p *ec0_den + ec0_q1pp=0.5_dp*ec0_aa*(-ec0_b1*rsm1_2**3+3._dp*ec0_b3*rsm1_2+8._dp*ec0_b4) + d2ecrs0_drs2= 4.0_dp*ec0_aa*ec0_a1*ec0_q1p*ec0_den & +& -ec0_q0*ec0_q1pp*ec0_den & +& +ec0_q0*ec0_q1p**2*ec0_den**2*(2._dp*ec0_q1+1.0_dp) + + mac_q0=-2.0_dp*mac_aa*(1.0_dp+mac_a1*rs) + mac_q1=2.0_dp*mac_aa*(mac_b1*sqr_rs+mac_b2*rs+mac_b3*rs*sqr_rs+mac_b4*rs*rs) + mac_q1p=mac_aa*(mac_b1*rsm1_2+2._dp*mac_b2+3._dp*mac_b3*sqr_rs+4._dp*mac_b4*rs) + mac_den=1.0_dp/(mac_q1*mac_q1+mac_q1) + mac_log=-log( mac_q1*mac_q1*mac_den ) + macrs=mac_q0*mac_log + dmacrs_drs= -2.0_dp*mac_aa*mac_a1*mac_log - mac_q0*mac_q1p*mac_den + + ecrs=ecrs0 + decrs_drs=decrs0_drs + decrs_dzeta=0.0_dp + d2ecrs_drs2=d2ecrs0_drs2 + d2ecrs_dzeta2=alpha_zeta**2*(-macrs) + d2ecrs_drsdzeta=zero + zeta=0.0_dp + + +! Add LSD correlation functional to GGA exchange functional + exci(ipts)=exci(ipts)+ecrs + vxci(ipts,1)=vxci(ipts,1)+ecrs-rs*third*decrs_drs + + dvcrs_drs=third*(2._dp*decrs_drs-rs*d2ecrs_drs2) +! And d(vxc)/d(rho)=(-rs/(3*rho))*d(vxc)/d(rs) + d2ecrs_drho2= -rs**4*(four_pi*third)*third*dvcrs_drs + dvxci(ipts,1)=dvxci(ipts,1)+d2ecrs_drho2 + dvxci(ipts,2)=dvxci(ipts,2)+d2ecrs_drho2-d2ecrs_dzeta2*rhotot_inv + +! Correlation has been added +! ----------------------------------------------------------------------------- + + end do + + end if + + + else if (order**2>1) then +! separate cases depending to option + if(option==2 .or. option==5) then + do ipts=1,npts + + rhotot=rhoarr(ipts) + rhotmot=rhom1_3(ipts) + rhotot_inv=rhotmot*rhotmot*rhotmot + rhotmo6=sqrt(rhotmot) + rhoto6=rhotot*rhotmot*rhotmot*rhotmo6 +! ----------------------------------------------------------------------- +! First take care of the exchange part of the functional + + exc=zero + dvxcdgr(ipts,3)=zero +! loop over the spin + ispden=1 + rho =rho_updn(ipts,ispden) + rhomot=rho_updnm1_3(ipts,ispden) + ex_lsd= - threefourth_divpi * sixpi2_1_3*rhomot*rhomot*rho +! Perdew-Burke-Ernzerhof GGA, exchange part + rho_inv=rhomot*rhomot*rhomot + coeffss=quarter*sixpi2m1_3*sixpi2m1_3*rho_inv*rho_inv*rhomot*rhomot + ss=grho2_updn(ipts,ispden)*coeffss + + divss=one/(one+mu_divkappa*ss) + dfxdss= mu*divss*divss + d2fxdss2=-mu*two*mu_divkappa*divss*divss*divss + + fx = one+kappa*(one-divss) + ex_gga= ex_lsd*fx + dssdn=-eight*third*ss*rho_inv + dfxdn = dfxdss*dssdn + vxci(ipts,ispden)=ex_lsd*(four_thirds*fx+rho*dfxdn) +! The new definition (v3.3) includes the division by the norm of the gradient + dssdg =two*coeffss + dfxdg=dfxdss*dssdg + dvxcdgr(ipts,ispden)=ex_lsd*rho*dfxdg + exc=exc+ex_gga*rho + +! Perdew-Burke-Ernzerhof GGA, exchange part +! Components 3 or 4 + dvxci(ipts,2+ispden)=dvxcdgr(ipts,ispden) +! Components 1 or 2 + d2ssdn2=-11.0_dp*third*dssdn*rho_inv + d2fxdn2=d2fxdss2*dssdn**2+dfxdss*d2ssdn2 + dvxci(ipts,ispden)=third*rho_inv*vxci(ipts,ispden)+& +& ex_lsd*(seven*third*dfxdn+rho*d2fxdn2) +! Components 5 or 6 + d2ssdndg=-eight*third*dssdg*rho_inv + d2fxdndg=d2fxdss2*dssdn*dssdg+dfxdss*d2ssdndg + dvxci(ipts,4+ispden)=ex_lsd*(four_thirds*dfxdg+rho*d2fxdndg) +! Components 7 or 8 + d2fxdg2=d2fxdss2*dssdg**2 + dvxci(ipts,6+ispden)=ex_lsd*rho*d2fxdg2 +! For the time being, treat non-spin-polarized like spin-polarized + dvxci(ipts,2)=dvxci(ipts,1) + dvxci(ipts,4)=dvxci(ipts,3) + dvxci(ipts,6)=dvxci(ipts,5) + dvxci(ipts,8)=dvxci(ipts,7) +! end of loop over the spin +! If non spin-polarized, treat spin down contribution now, similar to spin up + exc=exc*2 + exci(ipts)=exc*rhotot_inv +! ----------------------------------------------------------------------------- +! Then takes care of the LSD correlation part of the functional + + rs=rsfac*rhotmot + sqr_rs=sq_rsfac*rhotmo6 + rsm1_2=sq_rsfac_inv*rhoto6 + +! Formulas A6-A8 of PW92LSD + ec0_q0=-2.0_dp*ec0_aa*(1.0_dp+ec0_a1*rs) + ec0_q1=2.0_dp*ec0_aa*(ec0_b1*sqr_rs+ec0_b2*rs+ec0_b3*rs*sqr_rs+ec0_b4*rs*rs) + ec0_q1p=ec0_aa*(ec0_b1*rsm1_2+2._dp*ec0_b2+3._dp*ec0_b3*sqr_rs+4._dp*ec0_b4*rs) + ec0_den=1.0_dp/(ec0_q1*ec0_q1+ec0_q1) +! ec0_log=log( 1.0_dp + 1.0_dp / ec0_q1 ) + ec0_log=-log( ec0_q1*ec0_q1*ec0_den ) + ecrs0=ec0_q0*ec0_log + decrs0_drs= -2.0_dp*ec0_aa*ec0_a1*ec0_log - ec0_q0*ec0_q1p *ec0_den + ec0_q1pp=0.5_dp*ec0_aa*(-ec0_b1*rsm1_2**3+3._dp*ec0_b3*rsm1_2+8._dp*ec0_b4) + d2ecrs0_drs2= 4.0_dp*ec0_aa*ec0_a1*ec0_q1p*ec0_den & +& -ec0_q0*ec0_q1pp*ec0_den & +& +ec0_q0*ec0_q1p**2*ec0_den**2*(2._dp*ec0_q1+1.0_dp) + mac_q0=-2.0_dp*mac_aa*(1.0_dp+mac_a1*rs) + mac_q1=2.0_dp*mac_aa*(mac_b1*sqr_rs+mac_b2*rs+mac_b3*rs*sqr_rs+mac_b4*rs*rs) + mac_q1p=mac_aa*(mac_b1*rsm1_2+2._dp*mac_b2+3._dp*mac_b3*sqr_rs+4._dp*mac_b4*rs) + mac_den=1.0_dp/(mac_q1*mac_q1+mac_q1) + mac_log=-log( mac_q1*mac_q1*mac_den ) + macrs=mac_q0*mac_log + dmacrs_drs= -2.0_dp*mac_aa*mac_a1*mac_log - mac_q0*mac_q1p*mac_den + ecrs=ecrs0 + decrs_drs=decrs0_drs + decrs_dzeta=0.0_dp + d2ecrs_drs2=d2ecrs0_drs2 + d2ecrs_dzeta2=alpha_zeta**2*(-macrs) + d2ecrs_drsdzeta=zero + zeta=0.0_dp + +! Add LSD correlation functional to GGA exchange functional + exci(ipts)=exci(ipts)+ecrs + vxci(ipts,1)=vxci(ipts,1)+ecrs-rs*third*decrs_drs + + dvcrs_drs=third*(2._dp*decrs_drs-rs*d2ecrs_drs2) +! And d(vxc)/d(rho)=(-rs/(3*rho))*d(vxc)/d(rs) + d2ecrs_drho2= -rs**4*(four_pi*third)*third*dvcrs_drs + dvxci(ipts,9)=d2ecrs_drho2 + dvxci(ipts,10)=d2ecrs_drho2 + dvxci(ipts,11)=d2ecrs_drho2 + + +! ----------------------------------------------------------------------------- +! Eventually add the GGA correlation part of the PBE functional +! Note : the computation of the potential in the spin-unpolarized +! case could be optimized much further. Other optimizations are left to do. + + phi_zeta=1.0_dp + phip_zeta=0.0_dp + phi_zeta_inv=1.0_dp + phi_logder=0.0_dp + phi3_zeta=1.0_dp + gamphi3inv=gamma_inv + phipp_zeta=-two*ninth*alpha_zeta*alpha_zeta + +! From ec to bb + bb=ecrs*gamphi3inv + dbb_drs=decrs_drs*gamphi3inv + dbb_dzeta=gamphi3inv*(decrs_dzeta-three*ecrs*phi_logder) + d2bb_drs2=d2ecrs_drs2*gamphi3inv + d2bb_drsdzeta=gamphi3inv*(d2ecrs_drsdzeta-three*decrs_drs*phi_logder) + d2bb_dzeta2=gamphi3inv*(d2ecrs_dzeta2-six*decrs_dzeta*phi_logder+& +& 12.0_dp*ecrs*phi_logder*phi_logder-three*ecrs*phi_zeta_inv*phipp_zeta) + +! From bb to cc + exp_pbe=exp(-bb) + cc=one/(exp_pbe-one) + dcc_dbb=cc*cc*exp_pbe + dcc_drs=dcc_dbb*dbb_drs + dcc_dzeta=dcc_dbb*dbb_dzeta + d2cc_dbb2=cc*cc*exp_pbe*(two*cc*exp_pbe-one) + d2cc_drs2=d2cc_dbb2*dbb_drs*dbb_drs+dcc_dbb*d2bb_drs2 + d2cc_drsdzeta=d2cc_dbb2*dbb_drs*dbb_dzeta+dcc_dbb*d2bb_drsdzeta + d2cc_dzeta2=d2cc_dbb2*dbb_dzeta*dbb_dzeta+dcc_dbb*d2bb_dzeta2 + +! From cc to aa + coeff_aa=beta*gamma_inv*phi_zeta_inv*phi_zeta_inv + aa=coeff_aa*cc + daa_drs=coeff_aa*dcc_drs + daa_dzeta=-two*aa*phi_logder+coeff_aa*dcc_dzeta + d2aa_drs2=coeff_aa*d2cc_drs2 + d2aa_drsdzeta=-two*daa_drs*phi_logder+coeff_aa*d2cc_drsdzeta + d2aa_dzeta2=aa*(-two*phi_zeta_inv*phipp_zeta+six*phi_logder*phi_logder)+& +& coeff_aa*(-four*dcc_dzeta*phi_logder+d2cc_dzeta2) + +! Introduce tt : do not assume that the spin-dependent gradients are collinear + grrho2=four*grho2_updn(ipts,1) + dtt_dg=two*rhotot_inv*rhotot_inv*rhotmot*coeff_tt +! Note that tt is (the t variable of PBE divided by phi) squared + tt=half*grrho2*dtt_dg + +! Get xx from aa and tt + xx=aa*tt + dxx_drs=daa_drs*tt + dxx_dzeta=daa_dzeta*tt + dxx_dtt=aa + d2xx_drs2=d2aa_drs2*tt + d2xx_drsdzeta=d2aa_drsdzeta*tt + d2xx_drsdtt=daa_drs + d2xx_dttdzeta=daa_dzeta + d2xx_dzeta2=d2aa_dzeta2*tt + +! From xx to pade + pade_den=one/(one+xx*(one+xx)) + pade=(one+xx)*pade_den + dpade_dxx=-xx*(two+xx)*pade_den**2 + dpade_drs=dpade_dxx*dxx_drs + dpade_dtt=dpade_dxx*dxx_dtt + dpade_dzeta=dpade_dxx*dxx_dzeta + d2pade_dxx2=two*(-one+xx*xx*(three+xx))*pade_den*pade_den*pade_den + d2pade_drs2=d2pade_dxx2*dxx_drs*dxx_drs+dpade_dxx*d2xx_drs2 + d2pade_drsdtt=d2pade_dxx2*dxx_drs*dxx_dtt+dpade_dxx*d2xx_drsdtt + d2pade_drsdzeta=d2pade_dxx2*dxx_drs*dxx_dzeta+dpade_dxx*d2xx_drsdzeta + d2pade_dtt2=d2pade_dxx2*dxx_dtt*dxx_dtt + d2pade_dttdzeta=d2pade_dxx2*dxx_dtt*dxx_dzeta+dpade_dxx*d2xx_dttdzeta + d2pade_dzeta2=d2pade_dxx2*dxx_dzeta*dxx_dzeta+dpade_dxx*d2xx_dzeta2 + + +! From pade to qq + coeff_qq=tt*phi_zeta_inv*phi_zeta_inv + qq=coeff_qq*pade + dqq_drs=coeff_qq*dpade_drs + dqq_dtt=pade*phi_zeta_inv*phi_zeta_inv+coeff_qq*dpade_dtt + dqq_dzeta=coeff_qq*(dpade_dzeta-two*pade*phi_logder) + d2qq_drs2=coeff_qq*d2pade_drs2 + d2qq_drsdtt=phi_zeta_inv*phi_zeta_inv*(dpade_drs+tt*d2pade_drsdtt) + d2qq_drsdzeta=coeff_qq*(d2pade_drsdzeta-two*dpade_drs*phi_logder) + d2qq_dtt2=phi_zeta_inv*phi_zeta_inv*(two*dpade_dtt+tt*d2pade_dtt2) + d2qq_dttdzeta=phi_zeta_inv*phi_zeta_inv*(dpade_dzeta-two*pade*phi_logder)+& +& coeff_qq*(d2pade_dttdzeta-two*dpade_dtt*phi_logder) + d2qq_dzeta2=coeff_qq*( d2pade_dzeta2-four*dpade_dzeta*phi_logder & +& +six*pade*phi_logder*phi_logder & +& -two*pade*phi_zeta_inv*phipp_zeta) + +! From qq to rr + arg_rr=one+beta*gamma_inv*qq + div_rr=one/arg_rr + rr=gamma*log(arg_rr) + drr_dqq=beta*div_rr + drr_drs=drr_dqq*dqq_drs + drr_dtt=drr_dqq*dqq_dtt + drr_dzeta=drr_dqq*dqq_dzeta + d2rr_dqq2=-div_rr**2*beta*beta*gamma_inv + d2rr_drs2=d2rr_dqq2*dqq_drs*dqq_drs+drr_dqq*d2qq_drs2 + d2rr_drsdtt=d2rr_dqq2*dqq_drs*dqq_dtt+drr_dqq*d2qq_drsdtt + d2rr_drsdzeta=d2rr_dqq2*dqq_drs*dqq_dzeta+drr_dqq*d2qq_drsdzeta + d2rr_dtt2=d2rr_dqq2*dqq_dtt*dqq_dtt+drr_dqq*d2qq_dtt2 + d2rr_dttdzeta=d2rr_dqq2*dqq_dtt*dqq_dzeta+drr_dqq*d2qq_dttdzeta + d2rr_dzeta2=d2rr_dqq2*dqq_dzeta*dqq_dzeta+drr_dqq*d2qq_dzeta2 + +! From rr to hh + hh=phi3_zeta*rr + dhh_drs=phi3_zeta*drr_drs + dhh_dtt=phi3_zeta*drr_dtt + dhh_dzeta=phi3_zeta*(drr_dzeta+three*rr*phi_logder) + d2hh_drs2=phi3_zeta*d2rr_drs2 + d2hh_drsdtt=phi3_zeta*d2rr_drsdtt + d2hh_drsdzeta=phi3_zeta*(d2rr_drsdzeta+three*drr_drs*phi_logder) + d2hh_dtt2=phi3_zeta*d2rr_dtt2 + d2hh_dttdzeta=phi3_zeta*(d2rr_dttdzeta+three*drr_dtt*phi_logder) + d2hh_dzeta2=phi3_zeta*(six*rr*phi_logder*phi_logder+& +& six*phi_logder*drr_dzeta+d2rr_dzeta2) & +& +three*phi_zeta*phi_zeta*rr*phipp_zeta + + +! The GGA correlation energy is added + exci(ipts)=exci(ipts)+hh + +! Change of variables : from (rs,zeta,tt) to (rhoup,rhodn,grrho) + + +! From hh to the derivative of the energy wrt the density + drhohh_drho=hh-third*rs*dhh_drs-zeta*dhh_dzeta-seven*third*tt*dhh_dtt + vxci(ipts,1)=vxci(ipts,1)+drhohh_drho + +! From hh to the derivative of the energy wrt to the gradient of the +! density, divided by the gradient of the density +! (The v3.3 definition includes the division by the norm of the gradient) + dvxcdgr(ipts,3)=rhotot*dtt_dg*dhh_dtt + + d2rhohh_drho2=rhotot_inv*& +& (-two*ninth*rs*dhh_drs +seven*four*ninth*tt*dhh_dtt & +& +ninth*rs*rs*d2hh_drs2+zeta*zeta*d2hh_dzeta2+(seven*third*tt)**2*d2hh_dtt2 & +& +two*third*rs*zeta*d2hh_drsdzeta+two*seven*ninth*rs*tt*d2hh_drsdtt & +& +two*seven*third*tt*zeta*d2hh_dttdzeta) + d2rhohh_drhodg=dtt_dg*(-four*third*dhh_dtt-third*rs*d2hh_drsdtt & +& -zeta*d2hh_dttdzeta-seven*third*tt*d2hh_dtt2) + +! Component 12 : first derivative with respect to the gradient +! of the density, div by the grad of the density + dvxci(ipts,12)=dvxcdgr(ipts,3) +! Components 9, 10 and 11 : second derivatives with respect to the spin-density +! Note that there is already a contribution from LSDA + dvxci(ipts,9)=dvxci(ipts,9)+d2rhohh_drho2+rhotot_inv* & +& ( d2hh_dzeta2*(one-two*zeta) & +& -two*third*rs*d2hh_drsdzeta-14.0_dp*third*tt*d2hh_dttdzeta) + dvxci(ipts,10)=dvxci(ipts,10)+d2rhohh_drho2-rhotot_inv*d2hh_dzeta2 + dvxci(ipts,11)=dvxci(ipts,11)+d2rhohh_drho2+rhotot_inv* & +& ( d2hh_dzeta2*(one+two*zeta) & +& +two*third*rs*d2hh_drsdzeta+14.0_dp*third*tt*d2hh_dttdzeta) +! Components 13 and 14 : second derivatives with respect to spin density +! and gradient, divided by the gradient + dvxci(ipts,13)=d2rhohh_drhodg+dtt_dg*d2hh_dttdzeta + dvxci(ipts,14)=d2rhohh_drhodg-dtt_dg*d2hh_dttdzeta +! Component 15 : derivative of the (derivative wrt the gradient div by the grad), +! divided by the grad + dvxci(ipts,15)=rhotot*d2hh_dtt2*dtt_dg*dtt_dg + + +! End condition of GGA + +! Correlation has been added +! ----------------------------------------------------------------------------- + +! vxci(ipts,2)=vxci(ipts,1) + dvxcdgr(ipts,2)=dvxcdgr(ipts,1) + + end do + + else if ((option==6) .or. (option==7)) then + do ipts=1,npts + + rhotot=rhoarr(ipts) + rhotmot=rhom1_3(ipts) + rhotot_inv=rhotmot*rhotmot*rhotmot + rhotmo6=sqrt(rhotmot) + rhoto6=rhotot*rhotmot*rhotmot*rhotmo6 +! ----------------------------------------------------------------------- +! First take care of the exchange part of the functional + + exc=zero + dvxcdgr(ipts,3)=zero +! loop over the spin + ispden=1 + rho =rho_updn(ipts,ispden) + rhomot=rho_updnm1_3(ipts,ispden) + ex_lsd= - threefourth_divpi * sixpi2_1_3*rhomot*rhomot*rho +! Perdew-Burke-Ernzerhof GGA, exchange part + rho_inv=rhomot*rhomot*rhomot + coeffss=quarter*sixpi2m1_3*sixpi2m1_3*rho_inv*rho_inv*rhomot*rhomot + ss=grho2_updn(ipts,ispden)*coeffss + + if (option==6) then + divss=exp(-mu_divkappa*ss) + dfxdss= mu*divss + d2fxdss2=-mu*mu_divkappa*divss + + fx = one+kappa*(one-divss) + ex_gga= ex_lsd*fx + dssdn=-eight*third*ss*rho_inv + dfxdn = dfxdss*dssdn + vxci(ipts,ispden)=ex_lsd*(four_thirds*fx+rho*dfxdn) +! The new definition (v3.3) includes the division by the norm of the gradient + dssdg =two*coeffss + dfxdg=dfxdss*dssdg + dvxcdgr(ipts,ispden)=ex_lsd*rho*dfxdg + exc=exc+ex_gga*rho +! This is the Wu and Cohen modification + else + expss=exp(-ss) + p1_wc=b_wc+(mu-b_wc)*(one-ss)*expss+two*c_wc*ss/(one+c_wc*ss*ss) + p2_wc=d_wc*(ss-two)*expss+two*c_wc/(one+c_wc*ss*ss)-& +& four*c_wc*c_wc*ss*ss/((one+c_wc*ss*ss)*(one+c_wc*ss*ss)) + divss=one/(one+(b_wc*ss+d_wc*ss*expss+log(one+c_wc*ss*ss))/kappa) + dfxdss=p1_wc*divss*divss + d2fxdss2=p2_wc*divss*divss-two*divss*divss*divss*p1_wc*p1_wc/kappa + + fx = one+kappa*(one-divss) + ex_gga= ex_lsd*fx + dssdn=-eight*third*ss*rho_inv + dfxdn = dfxdss*dssdn + vxci(ipts,ispden)=ex_lsd*(four_thirds*fx+rho*dfxdn) +! The new definition (v3.3) includes the division by the norm of the gradient + dssdg =two*coeffss + dfxdg=dfxdss*dssdg + dvxcdgr(ipts,ispden)=ex_lsd*rho*dfxdg + exc=exc+ex_gga*rho + end if + +! Perdew-Burke-Ernzerhof GGA, exchange part +! Components 3 or 4 + dvxci(ipts,2+ispden)=dvxcdgr(ipts,ispden) +! Components 1 or 2 + d2ssdn2=-11.0_dp*third*dssdn*rho_inv + d2fxdn2=d2fxdss2*dssdn**2+dfxdss*d2ssdn2 + dvxci(ipts,ispden)=third*rho_inv*vxci(ipts,ispden)+& +& ex_lsd*(seven*third*dfxdn+rho*d2fxdn2) +! Components 5 or 6 + d2ssdndg=-eight*third*dssdg*rho_inv + d2fxdndg=d2fxdss2*dssdn*dssdg+dfxdss*d2ssdndg + dvxci(ipts,4+ispden)=ex_lsd*(four_thirds*dfxdg+rho*d2fxdndg) +! Components 7 or 8 + d2fxdg2=d2fxdss2*dssdg**2 + dvxci(ipts,6+ispden)=ex_lsd*rho*d2fxdg2 +! For the time being, treat non-spin-polarized like spin-polarized + dvxci(ipts,2)=dvxci(ipts,1) + dvxci(ipts,4)=dvxci(ipts,3) + dvxci(ipts,6)=dvxci(ipts,5) + dvxci(ipts,8)=dvxci(ipts,7) +! end of loop over the spin +! If non spin-polarized, treat spin down contribution now, similar to spin up + exc=exc*2 + exci(ipts)=exc*rhotot_inv +! ----------------------------------------------------------------------------- +! Then takes care of the LSD correlation part of the functional + + + rs=rsfac*rhotmot + sqr_rs=sq_rsfac*rhotmo6 + rsm1_2=sq_rsfac_inv*rhoto6 + +! Formulas A6-A8 of PW92LSD + ec0_q0=-2.0_dp*ec0_aa*(1.0_dp+ec0_a1*rs) + ec0_q1=2.0_dp*ec0_aa*(ec0_b1*sqr_rs+ec0_b2*rs+ec0_b3*rs*sqr_rs+ec0_b4*rs*rs) + ec0_q1p=ec0_aa*(ec0_b1*rsm1_2+2._dp*ec0_b2+3._dp*ec0_b3*sqr_rs+4._dp*ec0_b4*rs) + ec0_den=1.0_dp/(ec0_q1*ec0_q1+ec0_q1) +! ec0_log=log( 1.0_dp + 1.0_dp / ec0_q1 ) + ec0_log=-log( ec0_q1*ec0_q1*ec0_den ) + ecrs0=ec0_q0*ec0_log + decrs0_drs= -2.0_dp*ec0_aa*ec0_a1*ec0_log - ec0_q0*ec0_q1p *ec0_den + ec0_q1pp=0.5_dp*ec0_aa*(-ec0_b1*rsm1_2**3+3._dp*ec0_b3*rsm1_2+8._dp*ec0_b4) + d2ecrs0_drs2= 4.0_dp*ec0_aa*ec0_a1*ec0_q1p*ec0_den & +& -ec0_q0*ec0_q1pp*ec0_den & +& +ec0_q0*ec0_q1p**2*ec0_den**2*(2._dp*ec0_q1+1.0_dp) + mac_q0=-2.0_dp*mac_aa*(1.0_dp+mac_a1*rs) + mac_q1=2.0_dp*mac_aa*(mac_b1*sqr_rs+mac_b2*rs+mac_b3*rs*sqr_rs+mac_b4*rs*rs) + mac_q1p=mac_aa*(mac_b1*rsm1_2+2._dp*mac_b2+3._dp*mac_b3*sqr_rs+4._dp*mac_b4*rs) + mac_den=1.0_dp/(mac_q1*mac_q1+mac_q1) + mac_log=-log( mac_q1*mac_q1*mac_den ) + macrs=mac_q0*mac_log + dmacrs_drs= -2.0_dp*mac_aa*mac_a1*mac_log - mac_q0*mac_q1p*mac_den + ecrs=ecrs0 + decrs_drs=decrs0_drs + decrs_dzeta=0.0_dp + d2ecrs_drs2=d2ecrs0_drs2 + d2ecrs_dzeta2=alpha_zeta**2*(-macrs) + d2ecrs_drsdzeta=zero + zeta=0.0_dp + +! Add LSD correlation functional to GGA exchange functional + exci(ipts)=exci(ipts)+ecrs + vxci(ipts,1)=vxci(ipts,1)+ecrs-rs*third*decrs_drs + + dvcrs_drs=third*(2._dp*decrs_drs-rs*d2ecrs_drs2) +! And d(vxc)/d(rho)=(-rs/(3*rho))*d(vxc)/d(rs) + d2ecrs_drho2= -rs**4*(four_pi*third)*third*dvcrs_drs + dvxci(ipts,9)=d2ecrs_drho2 + dvxci(ipts,10)=d2ecrs_drho2 + dvxci(ipts,11)=d2ecrs_drho2 + + +! ----------------------------------------------------------------------------- +! Eventually add the GGA correlation part of the PBE functional +! Note : the computation of the potential in the spin-unpolarized +! case could be optimized much further. Other optimizations are left to do. + + phi_zeta=1.0_dp + phip_zeta=0.0_dp + phi_zeta_inv=1.0_dp + phi_logder=0.0_dp + phi3_zeta=1.0_dp + gamphi3inv=gamma_inv + phipp_zeta=-two*ninth*alpha_zeta*alpha_zeta + +! From ec to bb + bb=ecrs*gamphi3inv + dbb_drs=decrs_drs*gamphi3inv + dbb_dzeta=gamphi3inv*(decrs_dzeta-three*ecrs*phi_logder) + d2bb_drs2=d2ecrs_drs2*gamphi3inv + d2bb_drsdzeta=gamphi3inv*(d2ecrs_drsdzeta-three*decrs_drs*phi_logder) + d2bb_dzeta2=gamphi3inv*(d2ecrs_dzeta2-six*decrs_dzeta*phi_logder+& +& 12.0_dp*ecrs*phi_logder*phi_logder-three*ecrs*phi_zeta_inv*phipp_zeta) + +! From bb to cc + exp_pbe=exp(-bb) + cc=one/(exp_pbe-one) + dcc_dbb=cc*cc*exp_pbe + dcc_drs=dcc_dbb*dbb_drs + dcc_dzeta=dcc_dbb*dbb_dzeta + d2cc_dbb2=cc*cc*exp_pbe*(two*cc*exp_pbe-one) + d2cc_drs2=d2cc_dbb2*dbb_drs*dbb_drs+dcc_dbb*d2bb_drs2 + d2cc_drsdzeta=d2cc_dbb2*dbb_drs*dbb_dzeta+dcc_dbb*d2bb_drsdzeta + d2cc_dzeta2=d2cc_dbb2*dbb_dzeta*dbb_dzeta+dcc_dbb*d2bb_dzeta2 + +! From cc to aa + coeff_aa=beta*gamma_inv*phi_zeta_inv*phi_zeta_inv + aa=coeff_aa*cc + daa_drs=coeff_aa*dcc_drs + daa_dzeta=-two*aa*phi_logder+coeff_aa*dcc_dzeta + d2aa_drs2=coeff_aa*d2cc_drs2 + d2aa_drsdzeta=-two*daa_drs*phi_logder+coeff_aa*d2cc_drsdzeta + d2aa_dzeta2=aa*(-two*phi_zeta_inv*phipp_zeta+six*phi_logder*phi_logder)+& +& coeff_aa*(-four*dcc_dzeta*phi_logder+d2cc_dzeta2) + +! Introduce tt : do not assume that the spin-dependent gradients are collinear + grrho2=four*grho2_updn(ipts,1) + dtt_dg=two*rhotot_inv*rhotot_inv*rhotmot*coeff_tt +! Note that tt is (the t variable of PBE divided by phi) squared + tt=half*grrho2*dtt_dg + +! Get xx from aa and tt + xx=aa*tt + dxx_drs=daa_drs*tt + dxx_dzeta=daa_dzeta*tt + dxx_dtt=aa + d2xx_drs2=d2aa_drs2*tt + d2xx_drsdzeta=d2aa_drsdzeta*tt + d2xx_drsdtt=daa_drs + d2xx_dttdzeta=daa_dzeta + d2xx_dzeta2=d2aa_dzeta2*tt + +! From xx to pade + pade_den=one/(one+xx*(one+xx)) + pade=(one+xx)*pade_den + dpade_dxx=-xx*(two+xx)*pade_den**2 + dpade_drs=dpade_dxx*dxx_drs + dpade_dtt=dpade_dxx*dxx_dtt + dpade_dzeta=dpade_dxx*dxx_dzeta + d2pade_dxx2=two*(-one+xx*xx*(three+xx))*pade_den*pade_den*pade_den + d2pade_drs2=d2pade_dxx2*dxx_drs*dxx_drs+dpade_dxx*d2xx_drs2 + d2pade_drsdtt=d2pade_dxx2*dxx_drs*dxx_dtt+dpade_dxx*d2xx_drsdtt + d2pade_drsdzeta=d2pade_dxx2*dxx_drs*dxx_dzeta+dpade_dxx*d2xx_drsdzeta + d2pade_dtt2=d2pade_dxx2*dxx_dtt*dxx_dtt + d2pade_dttdzeta=d2pade_dxx2*dxx_dtt*dxx_dzeta+dpade_dxx*d2xx_dttdzeta + d2pade_dzeta2=d2pade_dxx2*dxx_dzeta*dxx_dzeta+dpade_dxx*d2xx_dzeta2 + + +! From pade to qq + coeff_qq=tt*phi_zeta_inv*phi_zeta_inv + qq=coeff_qq*pade + dqq_drs=coeff_qq*dpade_drs + dqq_dtt=pade*phi_zeta_inv*phi_zeta_inv+coeff_qq*dpade_dtt + dqq_dzeta=coeff_qq*(dpade_dzeta-two*pade*phi_logder) + d2qq_drs2=coeff_qq*d2pade_drs2 + d2qq_drsdtt=phi_zeta_inv*phi_zeta_inv*(dpade_drs+tt*d2pade_drsdtt) + d2qq_drsdzeta=coeff_qq*(d2pade_drsdzeta-two*dpade_drs*phi_logder) + d2qq_dtt2=phi_zeta_inv*phi_zeta_inv*(two*dpade_dtt+tt*d2pade_dtt2) + d2qq_dttdzeta=phi_zeta_inv*phi_zeta_inv*(dpade_dzeta-two*pade*phi_logder)+& +& coeff_qq*(d2pade_dttdzeta-two*dpade_dtt*phi_logder) + d2qq_dzeta2=coeff_qq*( d2pade_dzeta2-four*dpade_dzeta*phi_logder & +& +six*pade*phi_logder*phi_logder & +& -two*pade*phi_zeta_inv*phipp_zeta) + +! From qq to rr + arg_rr=one+beta*gamma_inv*qq + div_rr=one/arg_rr + rr=gamma*log(arg_rr) + drr_dqq=beta*div_rr + drr_drs=drr_dqq*dqq_drs + drr_dtt=drr_dqq*dqq_dtt + drr_dzeta=drr_dqq*dqq_dzeta + d2rr_dqq2=-div_rr**2*beta*beta*gamma_inv + d2rr_drs2=d2rr_dqq2*dqq_drs*dqq_drs+drr_dqq*d2qq_drs2 + d2rr_drsdtt=d2rr_dqq2*dqq_drs*dqq_dtt+drr_dqq*d2qq_drsdtt + d2rr_drsdzeta=d2rr_dqq2*dqq_drs*dqq_dzeta+drr_dqq*d2qq_drsdzeta + d2rr_dtt2=d2rr_dqq2*dqq_dtt*dqq_dtt+drr_dqq*d2qq_dtt2 + d2rr_dttdzeta=d2rr_dqq2*dqq_dtt*dqq_dzeta+drr_dqq*d2qq_dttdzeta + d2rr_dzeta2=d2rr_dqq2*dqq_dzeta*dqq_dzeta+drr_dqq*d2qq_dzeta2 + +! From rr to hh + hh=phi3_zeta*rr + dhh_drs=phi3_zeta*drr_drs + dhh_dtt=phi3_zeta*drr_dtt + dhh_dzeta=phi3_zeta*(drr_dzeta+three*rr*phi_logder) + d2hh_drs2=phi3_zeta*d2rr_drs2 + d2hh_drsdtt=phi3_zeta*d2rr_drsdtt + d2hh_drsdzeta=phi3_zeta*(d2rr_drsdzeta+three*drr_drs*phi_logder) + d2hh_dtt2=phi3_zeta*d2rr_dtt2 + d2hh_dttdzeta=phi3_zeta*(d2rr_dttdzeta+three*drr_dtt*phi_logder) + d2hh_dzeta2=phi3_zeta*(six*rr*phi_logder*phi_logder+& +& six*phi_logder*drr_dzeta+d2rr_dzeta2) & +& +three*phi_zeta*phi_zeta*rr*phipp_zeta + + +! The GGA correlation energy is added + exci(ipts)=exci(ipts)+hh + +! Change of variables : from (rs,zeta,tt) to (rhoup,rhodn,grrho) + + +! From hh to the derivative of the energy wrt the density + drhohh_drho=hh-third*rs*dhh_drs-zeta*dhh_dzeta-seven*third*tt*dhh_dtt + vxci(ipts,1)=vxci(ipts,1)+drhohh_drho + +! From hh to the derivative of the energy wrt to the gradient of the +! density, divided by the gradient of the density +! (The v3.3 definition includes the division by the norm of the gradient) + dvxcdgr(ipts,3)=rhotot*dtt_dg*dhh_dtt + + d2rhohh_drho2=rhotot_inv*& +& (-two*ninth*rs*dhh_drs +seven*four*ninth*tt*dhh_dtt & +& +ninth*rs*rs*d2hh_drs2+zeta*zeta*d2hh_dzeta2+(seven*third*tt)**2*d2hh_dtt2 & +& +two*third*rs*zeta*d2hh_drsdzeta+two*seven*ninth*rs*tt*d2hh_drsdtt & +& +two*seven*third*tt*zeta*d2hh_dttdzeta) + d2rhohh_drhodg=dtt_dg*(-four*third*dhh_dtt-third*rs*d2hh_drsdtt & +& -zeta*d2hh_dttdzeta-seven*third*tt*d2hh_dtt2) + +! Component 12 : first derivative with respect to the gradient +! of the density, div by the grad of the density + dvxci(ipts,12)=dvxcdgr(ipts,3) +! Components 9, 10 and 11 : second derivatives with respect to the spin-density +! Note that there is already a contribution from LSDA + dvxci(ipts,9)=dvxci(ipts,9)+d2rhohh_drho2+rhotot_inv* & +& ( d2hh_dzeta2*(one-two*zeta) & +& -two*third*rs*d2hh_drsdzeta-14.0_dp*third*tt*d2hh_dttdzeta) + dvxci(ipts,10)=dvxci(ipts,10)+d2rhohh_drho2-rhotot_inv*d2hh_dzeta2 + dvxci(ipts,11)=dvxci(ipts,11)+d2rhohh_drho2+rhotot_inv* & +& ( d2hh_dzeta2*(one+two*zeta) & +& +two*third*rs*d2hh_drsdzeta+14.0_dp*third*tt*d2hh_dttdzeta) +! Components 13 and 14 : second derivatives with respect to spin density +! and gradient, divided by the gradient + dvxci(ipts,13)=d2rhohh_drhodg+dtt_dg*d2hh_dttdzeta + dvxci(ipts,14)=d2rhohh_drhodg-dtt_dg*d2hh_dttdzeta +! Component 15 : derivative of the (derivative wrt the gradient div by the grad), +! divided by the grad + dvxci(ipts,15)=rhotot*d2hh_dtt2*dtt_dg*dtt_dg + + +! End condition of GGA + +! Correlation has been added +! ----------------------------------------------------------------------------- + +! vxci(ipts,2)=vxci(ipts,1) + dvxcdgr(ipts,2)=dvxcdgr(ipts,1) + + end do + + else if (option==-1) then + do ipts=1,npts + + rhotot=rhoarr(ipts) + rhotmot=rhom1_3(ipts) + rhotot_inv=rhotmot*rhotmot*rhotmot + rhotmo6=sqrt(rhotmot) + rhoto6=rhotot*rhotmot*rhotmot*rhotmo6 +! ----------------------------------------------------------------------- +! First take care of the exchange part of the functional + + exc=zero +! loop over the spin + ispden=1 + rho =rho_updn(ipts,ispden) + rhomot=rho_updnm1_3(ipts,ispden) + ex_lsd= - threefourth_divpi * sixpi2_1_3*rhomot*rhomot*rho +! Perdew_Wang 91 LSD + vxci(ipts,ispden)=four_thirds*ex_lsd + exc=exc+ex_lsd*rho + +! Perdew_Wang 91 LSD + dvxci(ipts,2*ispden-1)=-four_thirds*third*& +& threefourth_divpi*sixpi2_1_3*rhomot*rhomot + dvxci(ipts,2)=zero +! If non-spin-polarized, first component of dvxci is second +! derivative with respect to TOTAL density. + dvxci(ipts,1)=dvxci(ipts,1)*half +! Compute the second derivative of vx +! vx^(2) = -2*vx^(1)/(3*rhotot) +! end of loop over the spin +! If non spin-polarized, treat spin down contribution now, similar to spin up + exc=exc*2 + exci(ipts)=exc*rhotot_inv +! ----------------------------------------------------------------------------- +! Then takes care of the LSD correlation part of the functional + + end do + + else if (option==-2) then + do ipts=1,npts + + rhotot=rhoarr(ipts) + rhotmot=rhom1_3(ipts) + rhotot_inv=rhotmot*rhotmot*rhotmot + rhotmo6=sqrt(rhotmot) + rhoto6=rhotot*rhotmot*rhotmot*rhotmo6 +! ----------------------------------------------------------------------- +! First take care of the exchange part of the functional + + exc=zero + dvxcdgr(ipts,3)=zero +! loop over the spin + ispden=1 + rho =rho_updn(ipts,ispden) + rhomot=rho_updnm1_3(ipts,ispden) + ex_lsd= - threefourth_divpi * sixpi2_1_3*rhomot*rhomot*rho +! Perdew-Burke-Ernzerhof GGA, exchange part + rho_inv=rhomot*rhomot*rhomot + coeffss=quarter*sixpi2m1_3*sixpi2m1_3*rho_inv*rho_inv*rhomot*rhomot + ss=grho2_updn(ipts,ispden)*coeffss + divss=one/(one+mu_divkappa*ss) + dfxdss= mu*divss*divss + d2fxdss2=-mu*two*mu_divkappa*divss*divss*divss + fx = one+kappa*(one-divss) + ex_gga= ex_lsd*fx + dssdn=-eight*third*ss*rho_inv + dfxdn = dfxdss*dssdn + vxci(ipts,ispden)=ex_lsd*(four_thirds*fx+rho*dfxdn) +! The new definition (v3.3) includes the division by the norm of the gradient + dssdg =two*coeffss + dfxdg=dfxdss*dssdg + dvxcdgr(ipts,ispden)=ex_lsd*rho*dfxdg + exc=exc+ex_gga*rho + +! Perdew-Burke-Ernzerhof GGA, exchange part +! Components 3 or 4 + dvxci(ipts,2+ispden)=dvxcdgr(ipts,ispden) +! Components 1 or 2 + d2ssdn2=-11.0_dp*third*dssdn*rho_inv + d2fxdn2=d2fxdss2*dssdn**2+dfxdss*d2ssdn2 + dvxci(ipts,ispden)=third*rho_inv*vxci(ipts,ispden)+& +& ex_lsd*(seven*third*dfxdn+rho*d2fxdn2) +! Components 5 or 6 + d2ssdndg=-eight*third*dssdg*rho_inv + d2fxdndg=d2fxdss2*dssdn*dssdg+dfxdss*d2ssdndg + dvxci(ipts,4+ispden)=ex_lsd*(four_thirds*dfxdg+rho*d2fxdndg) +! Components 7 or 8 + d2fxdg2=d2fxdss2*dssdg**2 + dvxci(ipts,6+ispden)=ex_lsd*rho*d2fxdg2 +! For the time being, treat non-spin-polarized like spin-polarized + dvxci(ipts,2)=dvxci(ipts,1) + dvxci(ipts,4)=dvxci(ipts,3) + dvxci(ipts,6)=dvxci(ipts,5) + dvxci(ipts,8)=dvxci(ipts,7) +! end of loop over the spin +! If non spin-polarized, treat spin down contribution now, similar to spin up + exc=exc*2 + exci(ipts)=exc*rhotot_inv +! ----------------------------------------------------------------------------- +! Then takes care of the LSD correlation part of the functional + +! Correlation has been added +! ----------------------------------------------------------------------------- + +! vxci(ipts,2)=vxci(ipts,1) + dvxcdgr(ipts,2)=dvxcdgr(ipts,1) + + end do + + + else if(option==-4) then + + + do ipts=1,npts + + rhotot=rhoarr(ipts) + rhotmot=rhom1_3(ipts) + rhotot_inv=rhotmot*rhotmot*rhotmot + rhotmo6=sqrt(rhotmot) + rhoto6=rhotot*rhotmot*rhotmot*rhotmo6 +! ----------------------------------------------------------------------- +! First take care of the exchange part of the functional + + exc=zero + dvxcdgr(ipts,3)=zero +! loop over the spin + ispden=1 + rho =rho_updn(ipts,ispden) + rhomot=rho_updnm1_3(ipts,ispden) + ex_lsd= - threefourth_divpi * sixpi2_1_3*rhomot*rhomot*rho +! VALENTINO R. COOPER C09x GGA, This is an exchange term proposed +! to use together with vdw-DF (see above). + rho_inv=rhomot*rhomot*rhomot + coeffss=quarter*sixpi2m1_3*sixpi2m1_3*rho_inv*rho_inv*rhomot*rhomot +! the quarter that is lacking is compensated by the grho2_updn in the +! next line. + ss=grho2_updn(ipts,ispden)*coeffss + alphs2=alpha_c09*ss + alphmu=alpha_c09*mu_c09 + dfxdss= mu_c09*exp(-alphs2)*(one-alphs2)+& +& kappa*alpha_c09*exp(-alphs2/two)/two + d2fxdss2=-alphmu*exp(-alphs2)*(two-alphs2)-& +& kappa*(alpha_c09**two)*exp(alphs2/two)/four + fx = one+mu_c09*ss*exp(-alphs2)+kappa*(one-exp(-alphs2/two)) + ex_gga= ex_lsd*fx + dssdn=-eight*third*ss*rho_inv + dfxdn = dfxdss*dssdn + vxci(ipts,ispden)=ex_lsd*(four_thirds*fx+rho*dfxdn) +! The new definition (v3.3) includes the division by the norm of the gradient + dssdg =two*coeffss + dfxdg=dfxdss*dssdg + dvxcdgr(ipts,ispden)=ex_lsd*rho*dfxdg + exc=exc+ex_gga*rho + +! Cooper C09x GGA exchange +! Components 3 or 4 + dvxci(ipts,2+ispden)=dvxcdgr(ipts,ispden) +! Components 1 or 2 + d2ssdn2=-11.0_dp*third*dssdn*rho_inv + d2fxdn2=d2fxdss2*dssdn**2+dfxdss*d2ssdn2 + dvxci(ipts,ispden)=third*rho_inv*vxci(ipts,ispden)+& +& ex_lsd*(seven*third*dfxdn+rho*d2fxdn2) +! Components 5 or 6 + d2ssdndg=-eight*third*dssdg*rho_inv + d2fxdndg=d2fxdss2*dssdn*dssdg+dfxdss*d2ssdndg + dvxci(ipts,4+ispden)=ex_lsd*(four_thirds*dfxdg+rho*d2fxdndg) +! Components 7 or 8 + d2fxdg2=d2fxdss2*dssdg**2 + dvxci(ipts,6+ispden)=ex_lsd*rho*d2fxdg2 +! For the time being, treat non-spin-polarized like spin-polarized + dvxci(ipts,2)=dvxci(ipts,1) + dvxci(ipts,4)=dvxci(ipts,3) + dvxci(ipts,6)=dvxci(ipts,5) + dvxci(ipts,8)=dvxci(ipts,7) + +! end of loop over the spin +! If non spin-polarized, treat spin down contribution now, similar to spin up + exc=exc*2 + exci(ipts)=exc*rhotot_inv +! ----------------------------------------------------------------------------- +! Then takes care of the LSD correlation part of the functional + +! Correlation has been added +! ----------------------------------------------------------------------------- + +! vxci(ipts,2)=vxci(ipts,1) + dvxcdgr(ipts,2)=dvxcdgr(ipts,1) + + end do + + + else if (option==1) then + do ipts=1,npts + + rhotot=rhoarr(ipts) + rhotmot=rhom1_3(ipts) + rhotot_inv=rhotmot*rhotmot*rhotmot + rhotmo6=sqrt(rhotmot) + rhoto6=rhotot*rhotmot*rhotmot*rhotmo6 +! ----------------------------------------------------------------------- +! First take care of the exchange part of the functional + + exc=zero +! loop over the spin + ispden=1 + rho =rho_updn(ipts,ispden) + rhomot=rho_updnm1_3(ipts,ispden) + ex_lsd= - threefourth_divpi * sixpi2_1_3*rhomot*rhomot*rho +! Perdew_Wang 91 LSD + vxci(ipts,ispden)=four_thirds*ex_lsd + exc=exc+ex_lsd*rho + +! Perdew_Wang 91 LSD + dvxci(ipts,2*ispden-1)=-four_thirds*third*& +& threefourth_divpi*sixpi2_1_3*rhomot*rhomot + dvxci(ipts,2)=zero +! If non-spin-polarized, first component of dvxci is second +! derivative with respect to TOTAL density. + dvxci(ipts,1)=dvxci(ipts,1)*half +! Compute the second derivative of vx +! vx^(2) = -2*vx^(1)/(3*rhotot) +! end of loop over the spin +! If non spin-polarized, treat spin down contribution now, similar to spin up + exc=exc*2 + exci(ipts)=exc*rhotot_inv +! ----------------------------------------------------------------------------- +! Then takes care of the LSD correlation part of the functional + + + rs=rsfac*rhotmot + sqr_rs=sq_rsfac*rhotmo6 + rsm1_2=sq_rsfac_inv*rhoto6 + +! Formulas A6-A8 of PW92LSD + ec0_q0=-2.0_dp*ec0_aa*(1.0_dp+ec0_a1*rs) + ec0_q1=2.0_dp*ec0_aa*(ec0_b1*sqr_rs+ec0_b2*rs+ec0_b3*rs*sqr_rs+ec0_b4*rs*rs) + ec0_q1p=ec0_aa*(ec0_b1*rsm1_2+2._dp*ec0_b2+3._dp*ec0_b3*sqr_rs+4._dp*ec0_b4*rs) + ec0_den=1.0_dp/(ec0_q1*ec0_q1+ec0_q1) +! ec0_log=log( 1.0_dp + 1.0_dp / ec0_q1 ) + ec0_log=-log( ec0_q1*ec0_q1*ec0_den ) + ecrs0=ec0_q0*ec0_log + decrs0_drs= -2.0_dp*ec0_aa*ec0_a1*ec0_log - ec0_q0*ec0_q1p *ec0_den + ec0_q1pp=0.5_dp*ec0_aa*(-ec0_b1*rsm1_2**3+3._dp*ec0_b3*rsm1_2+8._dp*ec0_b4) + d2ecrs0_drs2= 4.0_dp*ec0_aa*ec0_a1*ec0_q1p*ec0_den & +& -ec0_q0*ec0_q1pp*ec0_den & +& +ec0_q0*ec0_q1p**2*ec0_den**2*(2._dp*ec0_q1+1.0_dp) + mac_q0=-2.0_dp*mac_aa*(1.0_dp+mac_a1*rs) + mac_q1=2.0_dp*mac_aa*(mac_b1*sqr_rs+mac_b2*rs+mac_b3*rs*sqr_rs+mac_b4*rs*rs) + mac_q1p=mac_aa*(mac_b1*rsm1_2+2._dp*mac_b2+3._dp*mac_b3*sqr_rs+4._dp*mac_b4*rs) + mac_den=1.0_dp/(mac_q1*mac_q1+mac_q1) + mac_log=-log( mac_q1*mac_q1*mac_den ) + macrs=mac_q0*mac_log + dmacrs_drs= -2.0_dp*mac_aa*mac_a1*mac_log - mac_q0*mac_q1p*mac_den + ecrs=ecrs0 + decrs_drs=decrs0_drs + decrs_dzeta=0.0_dp + d2ecrs_drs2=d2ecrs0_drs2 + d2ecrs_dzeta2=alpha_zeta**2*(-macrs) + d2ecrs_drsdzeta=zero + zeta=0.0_dp + +! Add LSD correlation functional to GGA exchange functional + exci(ipts)=exci(ipts)+ecrs + vxci(ipts,1)=vxci(ipts,1)+ecrs-rs*third*decrs_drs + + dvcrs_drs=third*(2._dp*decrs_drs-rs*d2ecrs_drs2) +! And d(vxc)/d(rho)=(-rs/(3*rho))*d(vxc)/d(rs) + d2ecrs_drho2= -rs**4*(four_pi*third)*third*dvcrs_drs + + dvxci(ipts,1)=dvxci(ipts,1)+d2ecrs_drho2 + + end do + else if (option==3) then + do ipts=1,npts + + rhotot=rhoarr(ipts) + rhotmot=rhom1_3(ipts) + rhotot_inv=rhotmot*rhotmot*rhotmot + rhotmo6=sqrt(rhotmot) + rhoto6=rhotot*rhotmot*rhotmot*rhotmo6 +! ----------------------------------------------------------------------- +! First take care of the exchange part of the functional + + exc=zero +! loop over the spin + ispden=1 + rho =rho_updn(ipts,ispden) + rhomot=rho_updnm1_3(ipts,ispden) + ex_lsd= - threefourth_divpi * sixpi2_1_3*rhomot*rhomot*rho +! Perdew_Wang 91 LSD + vxci(ipts,ispden)=four_thirds*ex_lsd + exc=exc+ex_lsd*rho + +! Perdew_Wang 91 LSD + dvxci(ipts,2*ispden-1)=-four_thirds*third*& +& threefourth_divpi*sixpi2_1_3*rhomot*rhomot + dvxci(ipts,2)=zero +! If non-spin-polarized, first component of dvxci is second +! derivative with respect to TOTAL density. + dvxci(ipts,1)=dvxci(ipts,1)*half +! Compute the second derivative of vx +! vx^(2) = -2*vx^(1)/(3*rhotot) +! end of loop over the spin +! If non spin-polarized, treat spin down contribution now, similar to spin up + exc=exc*2 + exci(ipts)=exc*rhotot_inv +! ----------------------------------------------------------------------------- +! Then takes care of the LSD correlation part of the functional + + + rs=rsfac*rhotmot + sqr_rs=sq_rsfac*rhotmo6 + rsm1_2=sq_rsfac_inv*rhoto6 + +! Formulas A6-A8 of PW92LSD + ec0_q0=-2.0_dp*ec0_aa*(1.0_dp+ec0_a1*rs) + sqr_sqr_rs=max(1.e-15_dp,sqrt(sqr_rs)) + ec0_q1=2.0_dp*ec0_aa*(ec0_b1*sqr_rs+ec0_b2*rs+ec0_b3*rs*sqr_rs+ec0_b4*rs*rs/sqr_sqr_rs) + ec0_q1p=ec0_aa*(ec0_b1*rsm1_2+2._dp*ec0_b2+3._dp*ec0_b3*sqr_rs+3.5_dp*ec0_b4*rs/sqr_sqr_rs) + ec0_den=1.0_dp/(ec0_q1*ec0_q1+ec0_q1) +! ec0_log=log( 1.0_dp + 1.0_dp / ec0_q1 ) + ec0_log=-log( ec0_q1*ec0_q1*ec0_den ) + ecrs0=ec0_q0*ec0_log + decrs0_drs= -2.0_dp*ec0_aa*ec0_a1*ec0_log - ec0_q0*ec0_q1p *ec0_den + ec0_q1pp=0.5_dp*ec0_aa*(-ec0_b1*rsm1_2**3+3._dp*ec0_b3*rsm1_2+8._dp*ec0_b4) + d2ecrs0_drs2= 4.0_dp*ec0_aa*ec0_a1*ec0_q1p*ec0_den & +& -ec0_q0*ec0_q1pp*ec0_den & +& +ec0_q0*ec0_q1p**2*ec0_den**2*(2._dp*ec0_q1+1.0_dp) + mac_q0=-2.0_dp*mac_aa*(1.0_dp+mac_a1*rs) + mac_q1=2.0_dp*mac_aa*(mac_b1*sqr_rs+mac_b2*rs+mac_b3*rs*sqr_rs+mac_b4*rs*rs) + mac_q1p=mac_aa*(mac_b1*rsm1_2+2._dp*mac_b2+3._dp*mac_b3*sqr_rs+4._dp*mac_b4*rs) + mac_den=1.0_dp/(mac_q1*mac_q1+mac_q1) + mac_log=-log( mac_q1*mac_q1*mac_den ) + macrs=mac_q0*mac_log + dmacrs_drs= -2.0_dp*mac_aa*mac_a1*mac_log - mac_q0*mac_q1p*mac_den + ecrs=ecrs0 + decrs_drs=decrs0_drs + decrs_dzeta=0.0_dp + d2ecrs_drs2=d2ecrs0_drs2 + d2ecrs_dzeta2=alpha_zeta**2*(-macrs) + d2ecrs_drsdzeta=zero + zeta=0.0_dp + +! Add LSD correlation functional to GGA exchange functional + exci(ipts)=exci(ipts)+ecrs + vxci(ipts,1)=vxci(ipts,1)+ecrs-rs*third*decrs_drs + + dvcrs_drs=third*(2._dp*decrs_drs-rs*d2ecrs_drs2) +! And d(vxc)/d(rho)=(-rs/(3*rho))*d(vxc)/d(rs) + d2ecrs_drho2= -rs**4*(four_pi*third)*third*dvcrs_drs + dvxci(ipts,1)=dvxci(ipts,1)+d2ecrs_drho2 + + end do + end if + + end if + + +! fab: here it starts the spin polarized case + + else if(nspden==2) then + +! we separate different cases depending on order + + if (order**2<=1) then + + do ipts=1,npts + + rhotot=rhoarr(ipts) + rhotmot=rhom1_3(ipts) + rhotot_inv=rhotmot*rhotmot*rhotmot + rhotmo6=sqrt(rhotmot) + rhoto6=rhotot*rhotmot*rhotmot*rhotmo6 +! ----------------------------------------------------------------------- +! First take care of the exchange part of the functional + + exc=zero + if (present(dvxcdgr)) dvxcdgr(ipts,3)=zero + do ispden=1,nspden + rho =rho_updn(ipts,ispden) + rhomot=rho_updnm1_3(ipts,ispden) + ex_lsd= - threefourth_divpi * sixpi2_1_3*rhomot*rhomot*rho + if(option==1 .or. option==-1 .or. option==3)then +! Perdew_Wang 91 LSD + vxci(ipts,ispden)=four_thirds*ex_lsd + if(present(dvxcdgr)) dvxcdgr(ipts,ispden)=0.0_dp + exc=exc+ex_lsd*rho + else + rho_inv=rhomot*rhomot*rhomot + coeffss=quarter*sixpi2m1_3*sixpi2m1_3*rho_inv*rho_inv*rhomot*rhomot + ss=grho2_updn(ipts,ispden)*coeffss + if(option==7) then ! This is WC + expss=exp(-ss) + p1_wc=b_wc+(mu-b_wc)*(one-ss)*expss+two*c_wc*ss/(one+c_wc*ss*ss) + p2_wc=d_wc*(ss-two)*expss+two*c_wc/(one+c_wc*ss*ss)-& +& four*c_wc*c_wc*ss*ss/((one+c_wc*ss*ss)*(one+c_wc*ss*ss)) + divss=one/(one+(b_wc*ss+d_wc*ss*expss+log(one+c_wc*ss*ss))/kappa) + dfxdss=p1_wc*divss*divss + d2fxdss2=p2_wc*divss*divss-two*divss*divss*divss*p1_wc*p1_wc/kappa + else + if(option/=6)then ! This is Perdew-Burke-Ernzerhof GGA, exchange part + divss=one/(one+mu_divkappa*ss) + dfxdss= mu*divss*divss + d2fxdss2=-mu*two*mu_divkappa*divss*divss*divss + else ! This is RPBE modification + divss=exp(-mu_divkappa*ss) + dfxdss= mu*divss + d2fxdss2=-mu*mu_divkappa*divss + end if + end if + fx = one+kappa*(one-divss) + ex_gga= ex_lsd*fx + dssdn=-eight*third*ss*rho_inv + dfxdn = dfxdss*dssdn + vxci(ipts,ispden)=ex_lsd*(four_thirds*fx+rho*dfxdn) +! The new definition (v3.3) includes the division by the norm of the gradient + dssdg =two*coeffss + dfxdg=dfxdss*dssdg + dvxcdgr(ipts,ispden)=ex_lsd*rho*dfxdg + exc=exc+ex_gga*rho + end if + + end do + exci(ipts)=exc*rhotot_inv + if(exexch_==1)cycle + +! ----------------------------------------------------------------------------- +! Then takes care of the LSD correlation part of the functional + + if(option>0)then + + rs=rsfac*rhotmot + sqr_rs=sq_rsfac*rhotmo6 + rsm1_2=sq_rsfac_inv*rhoto6 + +! Formulas A6-A8 of PW92LSD + ec0_q0=-2.0_dp*ec0_aa*(1.0_dp+ec0_a1*rs) + if(option/=3 .and. option/=4)then + ec0_q1=2.0_dp*ec0_aa*(ec0_b1*sqr_rs+ec0_b2*rs+ec0_b3*rs*sqr_rs+ec0_b4*rs*rs) + ec0_q1p=ec0_aa*(ec0_b1*rsm1_2+2._dp*ec0_b2+3._dp*ec0_b3*sqr_rs+4._dp*ec0_b4*rs) + else + sqr_sqr_rs=max(1.e-15_dp,sqrt(sqr_rs)) + ec0_q1=2.0_dp*ec0_aa*(ec0_b1*sqr_rs+ec0_b2*rs+ec0_b3*rs*sqr_rs+ec0_b4*rs*rs/sqr_sqr_rs) + ec0_q1p=ec0_aa*(ec0_b1*rsm1_2+2._dp*ec0_b2+3._dp*ec0_b3*sqr_rs+3.5_dp*ec0_b4*rs/sqr_sqr_rs) + end if + ec0_den=1.0_dp/(ec0_q1*ec0_q1+ec0_q1) +! ec0_log=log( 1.0_dp + 1.0_dp / ec0_q1 ) + ec0_log=-log( ec0_q1*ec0_q1*ec0_den ) + ecrs0=ec0_q0*ec0_log + decrs0_drs= -2.0_dp*ec0_aa*ec0_a1*ec0_log - ec0_q0*ec0_q1p *ec0_den + + mac_q0=-2.0_dp*mac_aa*(1.0_dp+mac_a1*rs) + mac_q1=2.0_dp*mac_aa*(mac_b1*sqr_rs+mac_b2*rs+mac_b3*rs*sqr_rs+mac_b4*rs*rs) + mac_q1p=mac_aa*(mac_b1*rsm1_2+2._dp*mac_b2+3._dp*mac_b3*sqr_rs+4._dp*mac_b4*rs) + mac_den=1.0_dp/(mac_q1*mac_q1+mac_q1) + mac_log=-log( mac_q1*mac_q1*mac_den ) + macrs=mac_q0*mac_log + dmacrs_drs= -2.0_dp*mac_aa*mac_a1*mac_log - mac_q0*mac_q1p*mac_den + + zeta=(rho_updn(ipts,1)-rho_updn(ipts,2))*rhotot_inv + ec1_q0=-2.0_dp*ec1_aa*(1.0_dp+ec1_a1*rs) + if(option/=3 .and. option/=4)then + ec1_q1=2.0_dp*ec1_aa*(ec1_b1*sqr_rs+ec1_b2*rs+ec1_b3*rs*sqr_rs+ec1_b4*rs*rs) + ec1_q1p=ec1_aa*(ec1_b1*rsm1_2+2._dp*ec1_b2+3._dp*ec1_b3*sqr_rs+4._dp*ec1_b4*rs) + else + ec1_q1=2.0_dp*ec1_aa*(ec1_b1*sqr_rs+ec1_b2*rs+ec1_b3*rs*sqr_rs+ec1_b4*rs*rs/sqr_sqr_rs) + ec1_q1p=ec1_aa*(ec1_b1*rsm1_2+2._dp*ec1_b2+3._dp*ec1_b3*sqr_rs+3.5_dp*ec1_b4*rs/sqr_sqr_rs) + end if + ec1_den=1.0_dp/(ec1_q1*ec1_q1+ec1_q1) +! ec1_log=log( 1.0_dp + 1.0_dp / ec1_q1 ) + ec1_log=-log( ec1_q1*ec1_q1*ec1_den ) + ecrs1=ec1_q0*ec1_log + decrs1_drs= -2.0_dp*ec1_aa*ec1_a1*ec1_log - ec1_q0*ec1_q1p *ec1_den + +! alpha_zeta is introduced in order to remove singularities for fully +! polarized systems. + zetp_1_3=(1.0_dp+zeta*alpha_zeta)*zetpm1_3(ipts)**2 + zetm_1_3=(1.0_dp-zeta*alpha_zeta)*zetmm1_3(ipts)**2 + + f_zeta=( (1.0_dp+zeta*alpha_zeta2)*zetp_1_3 + & +& (1.0_dp-zeta*alpha_zeta2)*zetm_1_3 - 2.0_dp ) * factf_zeta + fp_zeta=( zetp_1_3 - zetm_1_3 ) * factfp_zeta + zeta4=zeta**4 + + gcrs=ecrs1-ecrs0+macrs*fsec_inv +! ecrs=ecrs0+f_zeta*(-macrs*(1.0_dp-zeta4)*fsec_inv+(ecrs1-ecrs0)*zeta4) + ecrs=ecrs0+f_zeta*(zeta4*gcrs-macrs*fsec_inv) + + dgcrs_drs=decrs1_drs-decrs0_drs+dmacrs_drs*fsec_inv +! decrs_drs=decrs0_drs+f_zeta*& +! & (-dmacrs_drs*(1.0_dp-zeta4)*fsec_inv+(decrs1_drs-decrs0_drs)*zeta4) + decrs_drs=decrs0_drs+f_zeta*(zeta4*dgcrs_drs-dmacrs_drs*fsec_inv) + dfzeta4_dzeta=4.0_dp*zeta**3*f_zeta+fp_zeta*zeta4 + decrs_dzeta=dfzeta4_dzeta*gcrs-fp_zeta*macrs*fsec_inv + +! Add LSD correlation functional to GGA exchange functional + exci(ipts)=exci(ipts)+ecrs + vxcadd=ecrs-rs*third*decrs_drs-zeta*decrs_dzeta + vxci(ipts,1)=vxci(ipts,1)+vxcadd+decrs_dzeta + vxci(ipts,2)=vxci(ipts,2)+vxcadd-decrs_dzeta + +! ----------------------------------------------------------------------------- +! Eventually add the GGA correlation part of the PBE functional +! Note : the computation of the potential in the spin-unpolarized +! case could be optimized much further. Other optimizations are left to do. + + if(option==2 .or. option==5 .or. option==6 .or. option==7)then +! The definition of phi has been slightly changed, because +! the original PBE one gives divergent behaviour for fully +! polarized points +! zetpm1_3=(1.0_dp+zeta*alpha_zeta)**(-third) +! zetmm1_3=(1.0_dp-zeta*alpha_zeta)**(-third) + phi_zeta=( zetpm1_3(ipts)*(1.0_dp+zeta*alpha_zeta)+ & +& zetmm1_3(ipts)*(1.0_dp-zeta*alpha_zeta) )*0.5_dp + phip_zeta=(zetpm1_3(ipts)-zetmm1_3(ipts))*third*alpha_zeta + phi_zeta_inv=1.0_dp/phi_zeta + phi_logder=phip_zeta*phi_zeta_inv + phi3_zeta=phi_zeta*phi_zeta*phi_zeta + gamphi3inv=gamma_inv*phi_zeta_inv*phi_zeta_inv*phi_zeta_inv + +! From ec to bb + bb=ecrs*gamphi3inv + dbb_drs=decrs_drs*gamphi3inv + dbb_dzeta=gamphi3inv*(decrs_dzeta-three*ecrs*phi_logder) +! From bb to cc + exp_pbe=exp(-bb) + cc=one/(exp_pbe-one) + dcc_dbb=cc*cc*exp_pbe + dcc_drs=dcc_dbb*dbb_drs + dcc_dzeta=dcc_dbb*dbb_dzeta + +! From cc to aa + coeff_aa=beta*gamma_inv*phi_zeta_inv*phi_zeta_inv + aa=coeff_aa*cc + daa_drs=coeff_aa*dcc_drs + daa_dzeta=-two*aa*phi_logder+coeff_aa*dcc_dzeta +! Introduce tt : do not assume that the spin-dependent gradients are collinear + grrho2=grho2_updn(ipts,3) + dtt_dg=two*rhotot_inv*rhotot_inv*rhotmot*coeff_tt +! Note that tt is (the t variable of PBE divided by phi) squared + tt=half*grrho2*dtt_dg + +! Get xx from aa and tt + xx=aa*tt + dxx_drs=daa_drs*tt + dxx_dzeta=daa_dzeta*tt + dxx_dtt=aa +! From xx to pade + pade_den=one/(one+xx*(one+xx)) + pade=(one+xx)*pade_den + dpade_dxx=-xx*(two+xx)*pade_den**2 + dpade_drs=dpade_dxx*dxx_drs + dpade_dtt=dpade_dxx*dxx_dtt + dpade_dzeta=dpade_dxx*dxx_dzeta + +! From pade to qq + coeff_qq=tt*phi_zeta_inv*phi_zeta_inv + qq=coeff_qq*pade + dqq_drs=coeff_qq*dpade_drs + dqq_dtt=pade*phi_zeta_inv*phi_zeta_inv+coeff_qq*dpade_dtt + dqq_dzeta=coeff_qq*(dpade_dzeta-two*pade*phi_logder) + +! From qq to rr + arg_rr=one+beta*gamma_inv*qq + div_rr=one/arg_rr + rr=gamma*log(arg_rr) + drr_dqq=beta*div_rr + drr_drs=drr_dqq*dqq_drs + drr_dtt=drr_dqq*dqq_dtt + drr_dzeta=drr_dqq*dqq_dzeta + +! From rr to hh + hh=phi3_zeta*rr + dhh_drs=phi3_zeta*drr_drs + dhh_dtt=phi3_zeta*drr_dtt + dhh_dzeta=phi3_zeta*(drr_dzeta+three*rr*phi_logder) + +! The GGA correlation energy is added + exci(ipts)=exci(ipts)+hh + +! Change of variables : from (rs,zeta,tt) to (rhoup,rhodn,grrho) + +! From hh to the derivative of the energy wrt the density + drhohh_drho=hh-third*rs*dhh_drs-zeta*dhh_dzeta-seven*third*tt*dhh_dtt + vxci(ipts,1)=vxci(ipts,1)+drhohh_drho+dhh_dzeta + vxci(ipts,2)=vxci(ipts,2)+drhohh_drho-dhh_dzeta + + +! From hh to the derivative of the energy wrt to the gradient of the +! density, divided by the gradient of the density +! (The v3.3 definition includes the division by the norm of the gradient) + dvxcdgr(ipts,3)=rhotot*dtt_dg*dhh_dtt + +! End condition of GGA + end if + + else ! no correlation + +! End condition of including correlation, and not only exchange + end if + +! Correlation has been added +! ----------------------------------------------------------------------------- + + end do + +! fab: the following is the "else" on order !!! + + else + + do ipts=1,npts + + rhotot=rhoarr(ipts) + rhotmot=rhom1_3(ipts) + rhotot_inv=rhotmot*rhotmot*rhotmot + rhotmo6=sqrt(rhotmot) + rhoto6=rhotot*rhotmot*rhotmot*rhotmo6 +! ----------------------------------------------------------------------- +! First take care of the exchange part of the functional + + exc=zero + if (present(dvxcdgr)) dvxcdgr(ipts,3)=zero + do ispden=1,nspden + rho =rho_updn(ipts,ispden) + rhomot=rho_updnm1_3(ipts,ispden) + ex_lsd= - threefourth_divpi * sixpi2_1_3*rhomot*rhomot*rho + if(option==1 .or. option==-1 .or. option==3)then +! Perdew_Wang 91 LSD + vxci(ipts,ispden)=four_thirds*ex_lsd + if(present(dvxcdgr)) dvxcdgr(ipts,ispden)=0.0_dp + exc=exc+ex_lsd*rho + else + rho_inv=rhomot*rhomot*rhomot + coeffss=quarter*sixpi2m1_3*sixpi2m1_3*rho_inv*rho_inv*rhomot*rhomot + ss=grho2_updn(ipts,ispden)*coeffss + if(option==7) then ! This is WC + expss=exp(-ss) + p1_wc=b_wc+(mu-b_wc)*(one-ss)*expss+two*c_wc*ss/(one+c_wc*ss*ss) + p2_wc=d_wc*(ss-two)*expss+two*c_wc/(one+c_wc*ss*ss)-& +& four*c_wc*c_wc*ss*ss/((one+c_wc*ss*ss)*(one+c_wc*ss*ss)) + divss=one/(one+(b_wc*ss+d_wc*ss*expss+log(one+c_wc*ss*ss))/kappa) + dfxdss=p1_wc*divss*divss + d2fxdss2=p2_wc*divss*divss-two*divss*divss*divss*p1_wc*p1_wc/kappa + else + if(option/=6)then ! This is Perdew-Burke-Ernzerhof GGA, exchange part + divss=one/(one+mu_divkappa*ss) + dfxdss= mu*divss*divss + d2fxdss2=-mu*two*mu_divkappa*divss*divss*divss + else ! This is RPBE modification + divss=exp(-mu_divkappa*ss) + dfxdss= mu*divss + d2fxdss2=-mu*mu_divkappa*divss + end if + end if + fx = one+kappa*(one-divss) + ex_gga= ex_lsd*fx + dssdn=-eight*third*ss*rho_inv + dfxdn = dfxdss*dssdn + vxci(ipts,ispden)=ex_lsd*(four_thirds*fx+rho*dfxdn) +! The new definition (v3.3) includes the division by the norm of the gradient + dssdg =two*coeffss + dfxdg=dfxdss*dssdg + dvxcdgr(ipts,ispden)=ex_lsd*rho*dfxdg + exc=exc+ex_gga*rho + end if + + if(option==1 .or. option==-1 .or. option==3)then + +! Perdew_Wang 91 LSD + dvxci(ipts,2*ispden-1)=-four_thirds*third*& +& threefourth_divpi*sixpi2_1_3*rhomot*rhomot + dvxci(ipts,2)=zero + if(order==3)then +! If non-spin-polarized, first component of dvxci is second +! derivative with respect to TOTAL density. +! Compute the second derivative of vx +! vx^(2) = -2*vx^(1)/(3*rhotot) + +! fab: third order derivatives of the exchange part in the spin polarized case + + d2vxci(ipts,3*ispden-2) = -2._dp*dvxci(ipts,2*ispden-1)*(rhomot*rhomot*rhomot)/3._dp + +! mixed thir order derivatives of the exchange energy with respect to rho of +! different spin polarization are zero + d2vxci(ipts,2)=zero + d2vxci(ipts,3)=zero + + end if + + else +! Perdew-Burke-Ernzerhof GGA, exchange part +! Components 3 or 4 + dvxci(ipts,2+ispden)=dvxcdgr(ipts,ispden) +! Components 1 or 2 + d2ssdn2=-11.0_dp*third*dssdn*rho_inv + d2fxdn2=d2fxdss2*dssdn**2+dfxdss*d2ssdn2 + dvxci(ipts,ispden)=third*rho_inv*vxci(ipts,ispden)+& +& ex_lsd*(seven*third*dfxdn+rho*d2fxdn2) +! Components 5 or 6 + d2ssdndg=-eight*third*dssdg*rho_inv + d2fxdndg=d2fxdss2*dssdn*dssdg+dfxdss*d2ssdndg + dvxci(ipts,4+ispden)=ex_lsd*(four_thirds*dfxdg+rho*d2fxdndg) +! Components 7 or 8 + d2fxdg2=d2fxdss2*dssdg**2 + dvxci(ipts,6+ispden)=ex_lsd*rho*d2fxdg2 +! For the time being, treat non-spin-polarized like spin-polarized + end if + end do + exci(ipts)=exc*rhotot_inv +! ----------------------------------------------------------------------------- +! Then takes care of the LSD correlation part of the functional + + if(option>0)then + + rs=rsfac*rhotmot + sqr_rs=sq_rsfac*rhotmo6 + rsm1_2=sq_rsfac_inv*rhoto6 + +! Formulas A6-A8 of PW92LSD + ec0_q0=-2.0_dp*ec0_aa*(1.0_dp+ec0_a1*rs) + if(option/=3 .and. option/=4)then + ec0_q1=2.0_dp*ec0_aa*(ec0_b1*sqr_rs+ec0_b2*rs+ec0_b3*rs*sqr_rs+ec0_b4*rs*rs) + ec0_q1p=ec0_aa*(ec0_b1*rsm1_2+2._dp*ec0_b2+3._dp*ec0_b3*sqr_rs+4._dp*ec0_b4*rs) + else + sqr_sqr_rs=max(1.e-15_dp,sqrt(sqr_rs)) + ec0_q1=2.0_dp*ec0_aa*(ec0_b1*sqr_rs+ec0_b2*rs+ec0_b3*rs*sqr_rs+ec0_b4*rs*rs/sqr_sqr_rs) + ec0_q1p=ec0_aa*(ec0_b1*rsm1_2+2._dp*ec0_b2+3._dp*ec0_b3*sqr_rs+3.5_dp*ec0_b4*rs/sqr_sqr_rs) + end if + ec0_den=1.0_dp/(ec0_q1*ec0_q1+ec0_q1) +! ec0_log=log( 1.0_dp + 1.0_dp / ec0_q1 ) + ec0_log=-log( ec0_q1*ec0_q1*ec0_den ) + ecrs0=ec0_q0*ec0_log + decrs0_drs= -2.0_dp*ec0_aa*ec0_a1*ec0_log - ec0_q0*ec0_q1p *ec0_den + ec0_q1pp=0.5_dp*ec0_aa*(-ec0_b1*rsm1_2**3+3._dp*ec0_b3*rsm1_2+8._dp*ec0_b4) + d2ecrs0_drs2= 4.0_dp*ec0_aa*ec0_a1*ec0_q1p*ec0_den & +& -ec0_q0*ec0_q1pp*ec0_den & +& +ec0_q0*ec0_q1p**2*ec0_den**2*(2._dp*ec0_q1+1.0_dp) + if (order==3) then + ec0_q1ppp = 0.75_dp*ec0_aa*(rsm1_2**5)*(ec0_b1-ec0_b3*rs) + ec0_f1 = 1._dp/(ec0_q1*ec0_q1*(1._dp + ec0_q1)) + ec0_f2 = 1._dp/(ec0_q1*(1+ec0_q1)) + d3ecrs0_drs3 = 6._dp*ec0_q1p*ec0_f1*(-2._dp*ec0_aa*ec0_a1*ec0_q1p + & +& ec0_q0*ec0_q1pp) - & +& ec0_f2*(-6._dp*ec0_aa*ec0_a1*ec0_q1pp + ec0_q0*ec0_q1ppp + & +& ec0_f2*(3._dp*ec0_q1p*(-2._dp*ec0_aa*ec0_a1*ec0_q1p + ec0_q0*ec0_q1pp) + & +& ec0_f2*2._dp*ec0_q0*(ec0_q1p**3)*(1._dp + 3._dp*ec0_q1*(1._dp + ec0_q1)))) + end if + + mac_q0=-2.0_dp*mac_aa*(1.0_dp+mac_a1*rs) + mac_q1=2.0_dp*mac_aa*(mac_b1*sqr_rs+mac_b2*rs+mac_b3*rs*sqr_rs+mac_b4*rs*rs) + mac_q1p=mac_aa*(mac_b1*rsm1_2+2._dp*mac_b2+3._dp*mac_b3*sqr_rs+4._dp*mac_b4*rs) + mac_den=1.0_dp/(mac_q1*mac_q1+mac_q1) + mac_log=-log( mac_q1*mac_q1*mac_den ) + macrs=mac_q0*mac_log + dmacrs_drs= -2.0_dp*mac_aa*mac_a1*mac_log - mac_q0*mac_q1p*mac_den + + zeta=(rho_updn(ipts,1)-rho_updn(ipts,2))*rhotot_inv + ec1_q0=-2.0_dp*ec1_aa*(1.0_dp+ec1_a1*rs) + if(option/=3 .and. option/=4)then + ec1_q1=2.0_dp*ec1_aa*(ec1_b1*sqr_rs+ec1_b2*rs+ec1_b3*rs*sqr_rs+ec1_b4*rs*rs) + ec1_q1p=ec1_aa*(ec1_b1*rsm1_2+2._dp*ec1_b2+3._dp*ec1_b3*sqr_rs+4._dp*ec1_b4*rs) + else + ec1_q1=2.0_dp*ec1_aa*(ec1_b1*sqr_rs+ec1_b2*rs+ec1_b3*rs*sqr_rs+ec1_b4*rs*rs/sqr_sqr_rs) + ec1_q1p=ec1_aa*(ec1_b1*rsm1_2+2._dp*ec1_b2+3._dp*ec1_b3*sqr_rs+3.5_dp*ec1_b4*rs/sqr_sqr_rs) + end if + ec1_den=1.0_dp/(ec1_q1*ec1_q1+ec1_q1) +! ec1_log=log( 1.0_dp + 1.0_dp / ec1_q1 ) + ec1_log=-log( ec1_q1*ec1_q1*ec1_den ) + ecrs1=ec1_q0*ec1_log + decrs1_drs= -2.0_dp*ec1_aa*ec1_a1*ec1_log - ec1_q0*ec1_q1p *ec1_den + +! alpha_zeta is introduced in order to remove singularities for fully +! polarized systems. + zetp_1_3=(1.0_dp+zeta*alpha_zeta)*zetpm1_3(ipts)**2 + zetm_1_3=(1.0_dp-zeta*alpha_zeta)*zetmm1_3(ipts)**2 + + f_zeta=( (1.0_dp+zeta*alpha_zeta2)*zetp_1_3 + & +& (1.0_dp-zeta*alpha_zeta2)*zetm_1_3 - 2.0_dp ) * factf_zeta + fp_zeta=( zetp_1_3 - zetm_1_3 ) * factfp_zeta + zeta4=zeta**4 + + gcrs=ecrs1-ecrs0+macrs*fsec_inv +! ecrs=ecrs0+f_zeta*(-macrs*(1.0_dp-zeta4)*fsec_inv+(ecrs1-ecrs0)*zeta4) + ecrs=ecrs0+f_zeta*(zeta4*gcrs-macrs*fsec_inv) + + dgcrs_drs=decrs1_drs-decrs0_drs+dmacrs_drs*fsec_inv +! decrs_drs=decrs0_drs+f_zeta*& +! & (-dmacrs_drs*(1.0_dp-zeta4)*fsec_inv+(decrs1_drs-decrs0_drs)*zeta4) + decrs_drs=decrs0_drs+f_zeta*(zeta4*dgcrs_drs-dmacrs_drs*fsec_inv) + dfzeta4_dzeta=4.0_dp*zeta**3*f_zeta+fp_zeta*zeta4 + decrs_dzeta=dfzeta4_dzeta*gcrs-fp_zeta*macrs*fsec_inv + + ec1_q1pp=0.5_dp*ec1_aa*(-ec1_b1*rsm1_2**3+3._dp*ec1_b3*rsm1_2+8._dp*ec1_b4) + + d2ecrs1_drs2= 4.0_dp*ec1_aa*ec1_a1*ec1_q1p*ec1_den & +& -ec1_q0*ec1_q1pp*ec1_den & +& +ec1_q0*ec1_q1p**2*ec1_den**2*(2._dp*ec1_q1+1.0_dp) + + + mac_q1pp=0.5_dp*mac_aa*(-mac_b1*rsm1_2**3+3._dp*mac_b3*rsm1_2+8._dp*mac_b4) + d2macrs_drs2= 4.0_dp*mac_aa*mac_a1*mac_q1p*mac_den & +& -mac_q0*mac_q1pp*mac_den & +& +mac_q0*mac_q1p**2*mac_den**2*(2._dp*mac_q1+1.0_dp) + + d2gcrs_drs2=d2ecrs1_drs2-d2ecrs0_drs2+d2macrs_drs2*fsec_inv + fpp_zeta=(zetpm1_3(ipts)**2+zetmm1_3(ipts)**2) * factfpp_zeta + d2fzeta4_dzeta2=12.0_dp*zeta**2*f_zeta & +& + 8.0_dp*zeta**3*fp_zeta & +& + zeta4 *fpp_zeta + + d2ecrs_drs2=d2ecrs0_drs2+& +& f_zeta*(zeta4*d2gcrs_drs2-d2macrs_drs2*fsec_inv) + d2ecrs_drsdzeta=dfzeta4_dzeta*dgcrs_drs-fp_zeta*dmacrs_drs*fsec_inv + d2ecrs_dzeta2=d2fzeta4_dzeta2*gcrs-fpp_zeta*macrs*fsec_inv + +! End condition of abs(order)>1 +! Add LSD correlation functional to GGA exchange functional + exci(ipts)=exci(ipts)+ecrs + vxcadd=ecrs-rs*third*decrs_drs-zeta*decrs_dzeta +! decrs_drup=vxcadd+decrs_dzeta +! decrs_drdn=vxcadd-decrs_dzeta + vxci(ipts,1)=vxci(ipts,1)+vxcadd+decrs_dzeta + vxci(ipts,2)=vxci(ipts,2)+vxcadd-decrs_dzeta + + + + dvcrs_drs=third*(2._dp*decrs_drs-rs*d2ecrs_drs2) +! And d(vxc)/d(rho)=(-rs/(3*rho))*d(vxc)/d(rs) + d2ecrs_drho2= -rs**4*(four_pi*third)*third*dvcrs_drs + d2ecrs_drup2=d2ecrs_drho2+& +& two*(-third*rs*d2ecrs_drsdzeta)*(1._dp-zeta)*rhotot_inv+ & +& d2ecrs_dzeta2*(1._dp-zeta)**2*rhotot_inv + d2ecrs_drdndrup=d2ecrs_drho2+& +& 2.0_dp*(-third*rs*d2ecrs_drsdzeta)*(-zeta)*rhotot_inv+ & +& d2ecrs_dzeta2*(1._dp-zeta)*(-1._dp-zeta)*rhotot_inv + d2ecrs_drdn2=d2ecrs_drho2+& +& 2.0_dp*(-third*rs*d2ecrs_drsdzeta)*(-1._dp-zeta)*rhotot_inv+ & +& d2ecrs_dzeta2*(-1._dp-zeta)**2*rhotot_inv + + + + + if (order==3) then + + +! fab : INGREDIENTS NEEDED + + a1fa=-third*(threefourth_divpi**(third))*((rhotot)**(-4._dp/3._dp)) + a2fa=(1._dp-zeta)/rhotot + b2fa=(-2._dp/3._dp)*((threefourth_divpi)**(third))*((7._dp/3._dp)*(-1._dp+zeta)/((rhotot)**(7._dp/3._dp))) + b1fa=a2fa + c2fa=((1._dp-zeta)**2)*(-3._dp*(1._dp/((rhotot)**2))) + c1fa=((1._dp-zeta)*(1._dp-zeta))/rhotot + e2fa=(2._dp/3._dp)*((threefourth_divpi)**(third))*((1._dp-(7._dp/3._dp)*zeta)/((rhotot)**(7._dp/3._dp))) + e1fa=-zeta/rhotot + f2fa=(2._dp*zeta)*(1._dp/((rhotot)**2))-(3._dp*zeta*zeta)*(1._dp/((rhotot)**2))+1._dp/(((rhotot)**2)) + f1fa=(zeta*zeta-1._dp)/rhotot + g1fa=a1fa + g2fa=(-1._dp-zeta)/rhotot + h2fa=(2._dp/3._dp)*((threefourth_divpi)**(third))*((-1._dp-(7._dp/3._dp)*zeta)/((rhotot)**(7._dp/3._dp))) + h1fa=e1fa + i2fa=((-2._dp*zeta)-(3*zeta*zeta)+1)/((rhotot)**2) + i1fa=f1fa + m2fa=(-2._dp/3._dp)*((threefourth_divpi)**(third))*(((7._dp/3._dp)*(zeta+1._dp))/((rhotot)**(7._dp/3._dp))) + m1fa=g2fa + n2fa=(-3._dp*(1._dp+zeta)*(1._dp+zeta))/(rhotot*rhotot) + n1fa=((-1._dp-zeta)**2)/rhotot + + +! TERMS APPEARING IN THE THIRD ORDER DERIVATIVES +! terms appearing in the third order derivatives of the spin polarized +! correlation energy with respect to spin densities + + +! ec1_q0p=-2.0_dp*ec1_aa*ec1_a1 +! ec1_q1ppp=(3._dp/4._dp)*ec1_aa*(ec1_b1*(rsm1_2**5)-ec1_b3*(rsm1_2**3)) +! This must be erroneous ... +! d3ecrs1_drs3=(ec1_q1pp*(4._dp*ec1_aa*ec1_a1-ec1_q0p)-ec1_q0*ec1_q1ppp)*ec1_den+ & +! & ((-ec1_q1p**2)*(4._dp*ec1_aa*ec1_a1)+ec1_q0*ec1_q1pp*ec1_q1+ec1_q0p*(ec1_q1p**2)+ & +! & 2._dp*ec1_q0*ec1_q1p*ec1_q1pp)*(ec1_den**2)*(2._dp*ec1_q1+1._dp)- & +! & (2._dp*ec1_q0*(ec1_q1p**3)*((2._dp*ec1_q1+1._dp)**2))*(ec1_den**3)+ & +! & (2._dp*ec1_q0*(ec1_q1p**3))*(ec1_den**2) + + ec1_q1ppp = 0.75_dp*ec1_aa*(rsm1_2**5)*(ec1_b1-ec1_b3*rs) + ec1_f1 = 1._dp/(ec1_q1*ec1_q1*(1._dp + ec1_q1)) + ec1_f2 = 1._dp/(ec1_q1*(1+ec1_q1)) + d3ecrs1_drs3 = 6._dp*ec1_q1p*ec1_f1*(-2._dp*ec1_aa*ec1_a1*ec1_q1p + & +& ec1_q0*ec1_q1pp) - & +& ec1_f2*(-6._dp*ec1_aa*ec1_a1*ec1_q1pp + ec1_q0*ec1_q1ppp + & +& ec1_f2*(3._dp*ec1_q1p*(-2._dp*ec1_aa*ec1_a1*ec1_q1p + ec1_q0*ec1_q1pp) + & +& ec1_f2*2._dp*ec1_q0*(ec1_q1p**3)*(1._dp + 3._dp*ec1_q1*(1._dp + ec1_q1)))) + + +! mac_q0p=-2.0_dp*mac_aa*mac_a1 +! mac_q1ppp=(3._dp/4._dp)*mac_aa*(mac_b1*((rsm1_2)**5)-mac_b3*((rsm1_2)**3)) +! This must be erroneous ... +! d3macrs_drs3=(mac_q1pp*(4._dp*mac_aa*mac_a1-mac_q0p)-mac_q0*mac_q1ppp)*mac_den+ & +! & ((-mac_q1p**2)*(4._dp*mac_aa*mac_a1)+mac_q0*mac_q1pp*mac_q1+mac_q0p*(mac_q1p**2)+ & +! & 2._dp*mac_q0*mac_q1p*mac_q1pp)*(mac_den**2)*(2._dp*mac_q1+1._dp)- & +! & (2._dp*mac_q0*(mac_q1p**3)*((2._dp*mac_q1+1._dp)**2))*(mac_den**3)+ & +! & (2._dp*mac_q0*(mac_q1p**3))*(mac_den**2) + + mac_q1ppp = 0.75_dp*mac_aa*(rsm1_2**5)*(mac_b1-mac_b3*rs) + mac_f1 = 1._dp/(mac_q1*mac_q1*(1._dp + mac_q1)) + mac_f2 = 1._dp/(mac_q1*(1+mac_q1)) + d3macrs_drs3 = 6._dp*mac_q1p*mac_f1*(-2._dp*mac_aa*mac_a1*mac_q1p + & +& mac_q0*mac_q1pp) - & +& mac_f2*(-6._dp*mac_aa*mac_a1*mac_q1pp + mac_q0*mac_q1ppp + & +& mac_f2*(3._dp*mac_q1p*(-2._dp*mac_aa*mac_a1*mac_q1p + mac_q0*mac_q1pp) + & +& mac_f2*2._dp*mac_q0*(mac_q1p**3)*(1._dp + 3._dp*mac_q1*(1._dp + mac_q1)))) + + d3gcrs_drs3=d3ecrs1_drs3-d3ecrs0_drs3+d3macrs_drs3*fsec_inv + d3ecrs_drs3=d3ecrs0_drs3+f_zeta*(zeta4*d3gcrs_drs3-d3macrs_drs3*fsec_inv) + factfppp_zeta=-two*third*factfpp_zeta*alpha_zeta2 + fppp_zeta=factfppp_zeta*(((zetpm1_3(ipts))**5)-((zetmm1_3(ipts))**5)) + + d3ecrs_dzeta3=(24._dp*zeta*f_zeta+36._dp*(zeta**2)*fp_zeta+ & +& 12._dp*(zeta**3)*fpp_zeta+(zeta**4)*fppp_zeta)*gcrs+ & +& fppp_zeta*(-macrs)*fsec_inv + + d3ecrs_drs2dzeta=dfzeta4_dzeta*(d2gcrs_drs2)+ & +& fp_zeta*(-d2macrs_drs2)*fsec_inv + + d3ecrs_dzeta2drs=d2fzeta4_dzeta2*dgcrs_drs+ & +& fpp_zeta*(-dmacrs_drs)*fsec_inv + + + + +! ***************** all this part has been commented following the suggestion by xavier + +! The following is the calculations of only a part of the third order derivatives. +! the term d3ecrs_drho3 is the part which remains in the +! non spin polarized limit +! THIS CODING IS CORRECT, but the alternative one is also correct ... + +! d3ecrs_drho3=(128._dp*pi*pi/243._dp)*(rs**7)*(decrs_drs)- & +! & (48._dp*pi*pi/243._dp)*(rs**8)*d2ecrs_drs2- & +! & (16._dp*pi*pi/243._dp)*(rs**9)*d3ecrs_drs3 + +! d3ecrs_drhoupdrho2=d3ecrs_drho3+ & +! & a2fa*((-8._dp*pi/27._dp)*(rs**4)*d2ecrs_drsdzeta+ & +! & (4._dp*pi/27._dp)*(rs**5)*d3ecrs_drs2dzeta) + + +! d3ecrs_drhodndrho2=d3ecrs_drho3+ & +! & g2fa*((-8._dp*pi/27._dp)*(rs**4)*d2ecrs_drsdzeta+ & +! & (4._dp*pi/27._dp)*(rs**5)*d3ecrs_drs2dzeta) + + +! third order derivatives of the exchange-correlation part + +! d3ecrs_drup3=d3ecrs_drhoupdrho2+b2fa*d2ecrs_drsdzeta- & +! & (2._dp/3._dp)*rs*b1fa*a1fa*d3ecrs_drs2dzeta- & +! & (2._dp/3._dp)*rs*b1fa*b1fa*d3ecrs_dzeta2drs+ & +! & c2fa*d2ecrs_dzeta2+c1fa*(a1fa*d3ecrs_dzeta2drs+a2fa*d3ecrs_dzeta3) + + +! d3ecrs_drup2drdn=d3ecrs_drhoupdrho2+e2fa*d2ecrs_drsdzeta- & +! & (2._dp/3._dp)*rs*e1fa*a1fa*d3ecrs_drs2dzeta- & +! & (2._dp/3._dp)*rs*e1fa*b1fa*d3ecrs_dzeta2drs+ & +! & f2fa*d2ecrs_dzeta2+f1fa*(a1fa*d3ecrs_dzeta2drs+a2fa*d3ecrs_dzeta3) + +! d3ecrs_drupdrdn2=d3ecrs_drhodndrho2+h2fa*d2ecrs_drsdzeta- & +! & (2._dp/3._dp)*rs*h1fa*g1fa*d3ecrs_drs2dzeta- & +! & (2._dp/3._dp)*rs*h1fa*g2fa*d3ecrs_dzeta2drs+ & +! & i2fa*d2ecrs_dzeta2+i1fa*(g1fa*d3ecrs_dzeta2drs+g2fa*d3ecrs_dzeta3) + + +! d3ecrs_drdn3=d3ecrs_drhodndrho2+m2fa*d2ecrs_drsdzeta- & +! & (2._dp/3._dp)*rs*m1fa*g1fa*d3ecrs_drs2dzeta- & +! & (2._dp/3._dp)*rs*m1fa*g2fa*d3ecrs_dzeta2drs+ & +! & n2fa*d2ecrs_dzeta2+n1fa*(g1fa*d3ecrs_dzeta2drs+g2fa*d3ecrs_dzeta3) + + +! ********* suggested by xavier (now corrected, XG100524) + + sp1_up3=three-three*zeta + sp1_up2dn=one-three*zeta + sp1_updn2=-one-three*zeta + sp1_dn3=-three-three*zeta + + sp2_up3=three-six*zeta+three*zeta*zeta + sp2_up2dn=-one-two*zeta+three*zeta*zeta + sp2_updn2=-one+two*zeta+three*zeta*zeta + sp2_dn3=three+six*zeta+three*zeta*zeta + + sp3_up3=(one-zeta)**3 + sp3_up2dn=-one+zeta+zeta**2-zeta**3 + sp3_updn2=one+zeta-zeta**2-zeta**3 + sp3_dn3=-(one+zeta)**3 + + d3ecrs_sp0=(eight*rs*decrs_drs-three*rs*rs*d2ecrs_drs2-rs*rs*rs*d3ecrs_drs3)/(rhotot*rhotot*27.0_dp) + d3ecrs_sp1=(four*rs*d2ecrs_drsdzeta+rs*rs*d3ecrs_drs2dzeta)/(rhotot*rhotot*nine) + d3ecrs_sp2=(-three*d2ecrs_dzeta2-rs*d3ecrs_dzeta2drs)/(rhotot*rhotot*three) + d3ecrs_sp3=d3ecrs_dzeta3/(rhotot*rhotot) + + d3ecrs_drup3=d3ecrs_sp0+d3ecrs_sp1*sp1_up3+d3ecrs_sp2*sp2_up3+d3ecrs_sp3*sp3_up3 + d3ecrs_drup2drdn=d3ecrs_sp0+d3ecrs_sp1*sp1_up2dn+d3ecrs_sp2*sp2_up2dn+d3ecrs_sp3*sp3_up2dn + d3ecrs_drupdrdn2=d3ecrs_sp0+d3ecrs_sp1*sp1_updn2+d3ecrs_sp2*sp2_updn2+d3ecrs_sp3*sp3_updn2 + d3ecrs_drdn3=d3ecrs_sp0+d3ecrs_sp1*sp1_dn3+d3ecrs_sp2*sp2_dn3+d3ecrs_sp3*sp3_dn3 + +! **** end of the section suggested by xavier... + + +! fab: this is the end of the if over order==3 + + + end if + +! fab: I think the following lines are wrong..indeed we are in the case option>0, so option cannot be -1 +! I comment them and I put the if only for option 1 and 3 + +! if(option==1 .or. option==-1 .or. option==3)then +! dvxci(ipts,1)=dvxci(ipts,1)+d2ecrs_drup2 +! dvxci(ipts,2)=dvxci(ipts,2)+d2ecrs_drdndrup +! dvxci(ipts,3)=dvxci(ipts,3)+d2ecrs_drdn2 + + +! fab: however, here the thing seems a bit strange...option=3 doesn't seem to be completely implemented +! (the second derivatives of ec1_q and ec0_q are the derived only in correspondance of the first derivative in the case option !=3 and !=4) +! so..I think that here the case "or option==3 should be cancelled + + if(option==1 .or. option==3)then + dvxci(ipts,1)=dvxci(ipts,1)+d2ecrs_drup2 + dvxci(ipts,2)=dvxci(ipts,2)+d2ecrs_drdndrup + dvxci(ipts,3)=dvxci(ipts,3)+d2ecrs_drdn2 + + if(order==3) then +! third order derivatives of the spin polarized exchange+correlation energy + d2vxci(ipts,1)=d2vxci(ipts,1)+d3ecrs_drup3 + d2vxci(ipts,2)=d2vxci(ipts,2)+d3ecrs_drup2drdn + d2vxci(ipts,3)=d2vxci(ipts,3)+d3ecrs_drupdrdn2 + d2vxci(ipts,4)=d2vxci(ipts,4)+d3ecrs_drdn3 +! DEBUG +! wecrsz(ipts,1)=ecrs +! wecrsz(ipts,1)=ecrs*rhotot +! wecrsz(ipts,2)=rs +! wecrsz(ipts,2)=rho_updn(ipts,1) +! wecrsz(ipts,3)=zeta +! wecrsz(ipts,3)=rho_updn(ipts,2) +! wecrsz(ipts,5)=ecrs0 +! wecrsz(ipts,6)=gcrs +! wecrsz(ipts,7)=macrs +! wecrsz(ipts,8)=ecrs1 +! d1wecrsz(ipts,1)=decrs_drs +! d1wecrsz(ipts,1)=decrs_drup +! d1wecrsz(ipts,2)=decrs_dzeta +! d1wecrsz(ipts,2)=decrs_drdn +! d1wecrsz(ipts,5)=decrs0_drs +! d1wecrsz(ipts,6)=dgcrs_drs +! d1wecrsz(ipts,7)=dmacrs_drs +! d1wecrsz(ipts,8)=decrs1_drs +! d2wecrsz(ipts,1)=d2ecrs_drs2 +! d2wecrsz(ipts,1)=d2ecrs_drup2 +! d2wecrsz(ipts,2)=d2ecrs_drsdzeta +! d2wecrsz(ipts,2)=d2ecrs_drdndrup +! d2wecrsz(ipts,3)=d2ecrs_dzeta2 +! d2wecrsz(ipts,3)=d2ecrs_drdn2 +! d2wecrsz(ipts,5)=d2ecrs0_drs2 +! d2wecrsz(ipts,6)=d2gcrs_drs2 +! d2wecrsz(ipts,7)=d2macrs_drs2 +! d2wecrsz(ipts,8)=d2ecrs1_drs2 +! d3wecrsz(ipts,1)=d3ecrs_drs3 +! d3wecrsz(ipts,1)=d3ecrs_drup3 +! d3wecrsz(ipts,2)=d3ecrs_drs2dzeta +! d3wecrsz(ipts,2)=d3ecrs_drup2drdn +! d3wecrsz(ipts,3)=d3ecrs_dzeta2drs +! d3wecrsz(ipts,3)=d3ecrs_drupdrdn2 +! d3wecrsz(ipts,4)=d3ecrs_dzeta3 +! d3wecrsz(ipts,4)=d3ecrs_drdn3 +! d3wecrsz(ipts,5)=d3ecrs0_drs3 +! d3wecrsz(ipts,6)=d3gcrs_drs3 +! d3wecrsz(ipts,7)=d3macrs_drs3 +! d3wecrsz(ipts,8)=d3ecrs1_drs3 +! ENDDEBUG + end if + + + else + dvxci(ipts,9)=d2ecrs_drup2 + dvxci(ipts,10)=d2ecrs_drdndrup + dvxci(ipts,11)=d2ecrs_drdn2 + end if + + + + +! ----------------------------------------------------------------------------- +! Eventually add the GGA correlation part of the PBE functional +! Note : the computation of the potential in the spin-unpolarized +! case could be optimized much further. Other optimizations are left to do. + + if(option==2 .or. option==5 .or. option==6 .or. option==7)then +! The definition of phi has been slightly changed, because +! the original PBE one gives divergent behaviour for fully +! polarized points +! zetpm1_3=(1.0_dp+zeta*alpha_zeta)**(-third) +! zetmm1_3=(1.0_dp-zeta*alpha_zeta)**(-third) + phi_zeta=( zetpm1_3(ipts)*(1.0_dp+zeta*alpha_zeta)+ & +& zetmm1_3(ipts)*(1.0_dp-zeta*alpha_zeta) )*0.5_dp + phip_zeta=(zetpm1_3(ipts)-zetmm1_3(ipts))*third*alpha_zeta + phi_zeta_inv=1.0_dp/phi_zeta + phi_logder=phip_zeta*phi_zeta_inv + phi3_zeta=phi_zeta*phi_zeta*phi_zeta + gamphi3inv=gamma_inv*phi_zeta_inv*phi_zeta_inv*phi_zeta_inv + phipp_zeta=-alpha_zeta*alpha_zeta*ninth*& +& (zetpm1_3(ipts)*zetpm1_3(ipts)*zetpm1_3(ipts)*zetpm1_3(ipts) + & +& zetmm1_3(ipts)*zetmm1_3(ipts)*zetmm1_3(ipts)*zetmm1_3(ipts) ) + +! From ec to bb + bb=ecrs*gamphi3inv + dbb_drs=decrs_drs*gamphi3inv + dbb_dzeta=gamphi3inv*(decrs_dzeta-three*ecrs*phi_logder) + d2bb_drs2=d2ecrs_drs2*gamphi3inv + d2bb_drsdzeta=gamphi3inv*(d2ecrs_drsdzeta-three*decrs_drs*phi_logder) + d2bb_dzeta2=gamphi3inv*(d2ecrs_dzeta2-six*decrs_dzeta*phi_logder+& +& 12.0_dp*ecrs*phi_logder*phi_logder-three*ecrs*phi_zeta_inv*phipp_zeta) + +! From bb to cc + exp_pbe=exp(-bb) + cc=one/(exp_pbe-one) + dcc_dbb=cc*cc*exp_pbe + dcc_drs=dcc_dbb*dbb_drs + dcc_dzeta=dcc_dbb*dbb_dzeta + d2cc_dbb2=cc*cc*exp_pbe*(two*cc*exp_pbe-one) + d2cc_drs2=d2cc_dbb2*dbb_drs*dbb_drs+dcc_dbb*d2bb_drs2 + d2cc_drsdzeta=d2cc_dbb2*dbb_drs*dbb_dzeta+dcc_dbb*d2bb_drsdzeta + d2cc_dzeta2=d2cc_dbb2*dbb_dzeta*dbb_dzeta+dcc_dbb*d2bb_dzeta2 + +! From cc to aa + coeff_aa=beta*gamma_inv*phi_zeta_inv*phi_zeta_inv + aa=coeff_aa*cc + daa_drs=coeff_aa*dcc_drs + daa_dzeta=-two*aa*phi_logder+coeff_aa*dcc_dzeta + d2aa_drs2=coeff_aa*d2cc_drs2 + d2aa_drsdzeta=-two*daa_drs*phi_logder+coeff_aa*d2cc_drsdzeta + d2aa_dzeta2=aa*(-two*phi_zeta_inv*phipp_zeta+six*phi_logder*phi_logder)+& +& coeff_aa*(-four*dcc_dzeta*phi_logder+d2cc_dzeta2) + +! Introduce tt : do not assume that the spin-dependent gradients are collinear + grrho2=grho2_updn(ipts,3) + dtt_dg=two*rhotot_inv*rhotot_inv*rhotmot*coeff_tt +! Note that tt is (the t variable of PBE divided by phi) squared + tt=half*grrho2*dtt_dg + +! Get xx from aa and tt + xx=aa*tt + dxx_drs=daa_drs*tt + dxx_dzeta=daa_dzeta*tt + dxx_dtt=aa + d2xx_drs2=d2aa_drs2*tt + d2xx_drsdzeta=d2aa_drsdzeta*tt + d2xx_drsdtt=daa_drs + d2xx_dttdzeta=daa_dzeta + d2xx_dzeta2=d2aa_dzeta2*tt + +! From xx to pade + pade_den=one/(one+xx*(one+xx)) + pade=(one+xx)*pade_den + dpade_dxx=-xx*(two+xx)*pade_den**2 + dpade_drs=dpade_dxx*dxx_drs + dpade_dtt=dpade_dxx*dxx_dtt + dpade_dzeta=dpade_dxx*dxx_dzeta + d2pade_dxx2=two*(-one+xx*xx*(three+xx))*pade_den*pade_den*pade_den + d2pade_drs2=d2pade_dxx2*dxx_drs*dxx_drs+dpade_dxx*d2xx_drs2 + d2pade_drsdtt=d2pade_dxx2*dxx_drs*dxx_dtt+dpade_dxx*d2xx_drsdtt + d2pade_drsdzeta=d2pade_dxx2*dxx_drs*dxx_dzeta+dpade_dxx*d2xx_drsdzeta + d2pade_dtt2=d2pade_dxx2*dxx_dtt*dxx_dtt + d2pade_dttdzeta=d2pade_dxx2*dxx_dtt*dxx_dzeta+dpade_dxx*d2xx_dttdzeta + d2pade_dzeta2=d2pade_dxx2*dxx_dzeta*dxx_dzeta+dpade_dxx*d2xx_dzeta2 + +! From pade to qq + coeff_qq=tt*phi_zeta_inv*phi_zeta_inv + qq=coeff_qq*pade + dqq_drs=coeff_qq*dpade_drs + dqq_dtt=pade*phi_zeta_inv*phi_zeta_inv+coeff_qq*dpade_dtt + dqq_dzeta=coeff_qq*(dpade_dzeta-two*pade*phi_logder) + d2qq_drs2=coeff_qq*d2pade_drs2 + d2qq_drsdtt=phi_zeta_inv*phi_zeta_inv*(dpade_drs+tt*d2pade_drsdtt) + d2qq_drsdzeta=coeff_qq*(d2pade_drsdzeta-two*dpade_drs*phi_logder) + d2qq_dtt2=phi_zeta_inv*phi_zeta_inv*(two*dpade_dtt+tt*d2pade_dtt2) + d2qq_dttdzeta=phi_zeta_inv*phi_zeta_inv*(dpade_dzeta-two*pade*phi_logder)+& +& coeff_qq*(d2pade_dttdzeta-two*dpade_dtt*phi_logder) + d2qq_dzeta2=coeff_qq*( d2pade_dzeta2-four*dpade_dzeta*phi_logder & +& +six*pade*phi_logder*phi_logder & +& -two*pade*phi_zeta_inv*phipp_zeta) + +! From qq to rr + arg_rr=one+beta*gamma_inv*qq + div_rr=one/arg_rr + rr=gamma*log(arg_rr) + drr_dqq=beta*div_rr + drr_drs=drr_dqq*dqq_drs + drr_dtt=drr_dqq*dqq_dtt + drr_dzeta=drr_dqq*dqq_dzeta + d2rr_dqq2=-div_rr**2*beta*beta*gamma_inv + d2rr_drs2=d2rr_dqq2*dqq_drs*dqq_drs+drr_dqq*d2qq_drs2 + d2rr_drsdtt=d2rr_dqq2*dqq_drs*dqq_dtt+drr_dqq*d2qq_drsdtt + d2rr_drsdzeta=d2rr_dqq2*dqq_drs*dqq_dzeta+drr_dqq*d2qq_drsdzeta + d2rr_dtt2=d2rr_dqq2*dqq_dtt*dqq_dtt+drr_dqq*d2qq_dtt2 + d2rr_dttdzeta=d2rr_dqq2*dqq_dtt*dqq_dzeta+drr_dqq*d2qq_dttdzeta + d2rr_dzeta2=d2rr_dqq2*dqq_dzeta*dqq_dzeta+drr_dqq*d2qq_dzeta2 + +! From rr to hh + hh=phi3_zeta*rr + dhh_drs=phi3_zeta*drr_drs + dhh_dtt=phi3_zeta*drr_dtt + dhh_dzeta=phi3_zeta*(drr_dzeta+three*rr*phi_logder) + d2hh_drs2=phi3_zeta*d2rr_drs2 + d2hh_drsdtt=phi3_zeta*d2rr_drsdtt + d2hh_drsdzeta=phi3_zeta*(d2rr_drsdzeta+three*drr_drs*phi_logder) + d2hh_dtt2=phi3_zeta*d2rr_dtt2 + d2hh_dttdzeta=phi3_zeta*(d2rr_dttdzeta+three*drr_dtt*phi_logder) + d2hh_dzeta2=phi3_zeta*(six*rr*phi_logder*phi_logder+& +& six*phi_logder*drr_dzeta+d2rr_dzeta2) & +& +three*phi_zeta*phi_zeta*rr*phipp_zeta + +! The GGA correlation energy is added + exci(ipts)=exci(ipts)+hh + +! Change of variables : from (rs,zeta,tt) to (rhoup,rhodn,grrho) + + +! From hh to the derivative of the energy wrt the density + drhohh_drho=hh-third*rs*dhh_drs-zeta*dhh_dzeta-seven*third*tt*dhh_dtt + vxci(ipts,1)=vxci(ipts,1)+drhohh_drho+dhh_dzeta + vxci(ipts,2)=vxci(ipts,2)+drhohh_drho-dhh_dzeta + + +! From hh to the derivative of the energy wrt to the gradient of the +! density, divided by the gradient of the density +! (The v3.3 definition includes the division by the norm of the gradient) + dvxcdgr(ipts,3)=rhotot*dtt_dg*dhh_dtt + + d2rhohh_drho2=rhotot_inv*& +& (-two*ninth*rs*dhh_drs +seven*four*ninth*tt*dhh_dtt & +& +ninth*rs*rs*d2hh_drs2+zeta*zeta*d2hh_dzeta2+(seven*third*tt)**2*d2hh_dtt2 & +& +two*third*rs*zeta*d2hh_drsdzeta+two*seven*ninth*rs*tt*d2hh_drsdtt & +& +two*seven*third*tt*zeta*d2hh_dttdzeta) + d2rhohh_drhodg=dtt_dg*(-four*third*dhh_dtt-third*rs*d2hh_drsdtt & +& -zeta*d2hh_dttdzeta-seven*third*tt*d2hh_dtt2) + +! Component 12 : first derivative with respect to the gradient +! of the density, div by the grad of the density + dvxci(ipts,12)=dvxcdgr(ipts,3) +! Components 9, 10 and 11 : second derivatives with respect to the spin-density +! Note that there is already a contribution from LSDA + dvxci(ipts,9)=dvxci(ipts,9)+d2rhohh_drho2+rhotot_inv* & +& ( d2hh_dzeta2*(one-two*zeta) & +& -two*third*rs*d2hh_drsdzeta-14.0_dp*third*tt*d2hh_dttdzeta) + dvxci(ipts,10)=dvxci(ipts,10)+d2rhohh_drho2-rhotot_inv*d2hh_dzeta2 + dvxci(ipts,11)=dvxci(ipts,11)+d2rhohh_drho2+rhotot_inv* & +& ( d2hh_dzeta2*(one+two*zeta) & +& +two*third*rs*d2hh_drsdzeta+14.0_dp*third*tt*d2hh_dttdzeta) +! Components 13 and 14 : second derivatives with respect to spin density +! and gradient, divided by the gradient + dvxci(ipts,13)=d2rhohh_drhodg+dtt_dg*d2hh_dttdzeta + dvxci(ipts,14)=d2rhohh_drhodg-dtt_dg*d2hh_dttdzeta +! Component 15 : derivative of the (derivative wrt the gradient div by the grad), +! divided by the grad + dvxci(ipts,15)=rhotot*d2hh_dtt2*dtt_dg*dtt_dg + +! End condition of GGA + end if + + else ! no correlation + + if(ndvxci > 8)then +! Must zero the correlation part of the xc kernel + dvxci(:,9:15)=zero + end if + +! End condition of including correlation, and not only exchange + end if + +! Correlation has been added +! ----------------------------------------------------------------------------- + + end do + end if + +! fab: this should be the else on nspden + else +! Disallowed value for nspden + write(message, '(a,a,a,i12,a)' )& +& ' Argument nspden must be 1 or 2; ',ch10,& +& ' Value provided as argument was ',nspden,'.' + ABI_BUG(message) + end if + +!DEBUG +!Finite-difference debugging, do not take away +!if(debug/=0)then +!do ipts=1,5,5 + +!rho=rho_updn(ipts,1)+rho_updn(ipts,2) +!write(std_out,'(a,i5,a,2es16.8)' ) ' Point number',ipts,' with rhoup,rhodn=',rho_updn(ipts,1),rho_updn(ipts,2) +!write(std_out,'(a,i5,a,2es16.8)' ) ' Point number',ipts+1,' with rhoup,rhodn=',rho_updn(ipts+1,1),rho_updn(ipts+1,2) +!write(std_out,'(a,i5,a,2es16.8)' ) ' Point number',ipts+2,' with rhoup,rhodn=',rho_updn(ipts+2,1),rho_updn(ipts+2,2) +!write(std_out,'(a,i5,a,2es16.8)' ) ' Point number',ipts+3,' with rhoup,rhodn=',rho_updn(ipts+3,1),rho_updn(ipts+3,2) +!write(std_out,'(a,i5,a,2es16.8)' ) ' Point number',ipts+4,' with rhoup,rhodn=',rho_updn(ipts+4,1),rho_updn(ipts+4,2) + +!! For rho +!if(debug==1)then +!write(std_out,'(a)' )' Direct values :' +!write(std_out,'(3es16.8)' )exci(ipts)*rho,vxci(ipts,1),vxci(ipts,2) +!else +!! For grho2 +!write(std_out,'(4es16.8)' )exci(ipts)*rho,dvxcdgr(ipts,1),& +!& dvxcdgr(ipts,2),dvxcdgr(ipts,3) +!end if + +!write(std_out,'(4es16.8)' )dvxci(ipts,1:3) ! For LDA +!write(std_out,'(a)' )' 3rd-order ' +!write(std_out,'(4es16.8)' )d2vxci(ipts,1:4) ! For LDA + +!write(std_out,'(4es16.8)' )dvxci(ipts,1:4) ! For exchange +!write(std_out,'(4es16.8)' )dvxci(ipts,5:8) ! For exchange +!write(std_out,'(4es16.8)' )dvxci(ipts,9:12) ! For correlation +!write(std_out,'(4es16.8)' )dvxci(ipts,13:15) ! For correlation + +!if(debug==1)then +!! For rho +!write(std_out,'(a)' )' Finite-difference values :' +!write(std_out,'(3es16.8)' )exci(ipts)*rho,& +!& ( exci(ipts+1)*(rho+delta) - exci(ipts+2)*(rho-delta) )/2._dp/delta,& +!& ( exci(ipts+3)*(rho+delta) - exci(ipts+4)*(rho-delta) )/2._dp/delta +!write(std_out,'(3es16.8)' )& +!& ( vxci(ipts+1,1) - vxci(ipts+2,1) )/2._dp/delta,& +!& ( vxci(ipts+3,1) - vxci(ipts+4,1) )/2._dp/delta,& +!& ( vxci(ipts+3,2) - vxci(ipts+4,2) )/2._dp/delta +!!This is for order 3 +!write(std_out,'(a)' )' 3rd-order by two methods, giving components 1, 2, 3, then on the next line 2, 3, 4 ' +!write(std_out,'(3es16.8)' )& +!& ( dvxci(ipts+1,1) - dvxci(ipts+2,1) )/2._dp/delta,& +!& ( dvxci(ipts+1,2) - dvxci(ipts+2,2) )/2._dp/delta,& +!& ( dvxci(ipts+1,3) - dvxci(ipts+2,3) )/2._dp/delta +!write(std_out,'(3es16.8)' )& +!& ( dvxci(ipts+3,1) - dvxci(ipts+4,1) )/2._dp/delta,& +!& ( dvxci(ipts+3,2) - dvxci(ipts+4,2) )/2._dp/delta,& +!& ( dvxci(ipts+3,3) - dvxci(ipts+4,3) )/2._dp/delta + +!write(std_out,*) +!write(std_out,*)' Now for ecrs and derivatives ' +!write(std_out,'(a)' )' ecrs, rs, zeta =' +!write(std_out,'(3es16.8)' )wecrsz(ipts,1:3) +!write(std_out,'(3es16.8)' )wecrsz(ipts+1,1:3) +!write(std_out,'(3es16.8)' )wecrsz(ipts+2,1:3) +!write(std_out,'(3es16.8)' )wecrsz(ipts+3,1:3) +!write(std_out,'(3es16.8)' )wecrsz(ipts+4,1:3) +!write(std_out,'(a)' )' ecrs derivatives :' +!write(std_out,'(3es16.8)' )d1wecrsz(ipts,1:2) +!write(std_out,'(3es16.8)' )d2wecrsz(ipts,1:3) +!write(std_out,'(4es16.8)' )d3wecrsz(ipts,1:4) +!write(std_out,'(a)' )' Finite-differences :' +!write(std_out,'(3es16.8)' )& +!& ( wecrsz(ipts+1,1) - wecrsz(ipts+2,1) )/( wecrsz(ipts+1,2) - wecrsz(ipts+2,2) ),& +!& ( wecrsz(ipts+3,1) - wecrsz(ipts+4,1) )/( wecrsz(ipts+3,3) - wecrsz(ipts+4,3) ) +!write(std_out,'(3es16.8)' )& +!& ( d1wecrsz(ipts+1,1) - d1wecrsz(ipts+2,1) )/( wecrsz(ipts+1,2) - wecrsz(ipts+2,2) ),& +!& ( d1wecrsz(ipts+1,2) - d1wecrsz(ipts+2,2) )/( wecrsz(ipts+1,2) - wecrsz(ipts+2,2) ) +!write(std_out,'(3es16.8)' )& +!& ( d1wecrsz(ipts+3,1) - d1wecrsz(ipts+4,1) )/( wecrsz(ipts+3,3) - wecrsz(ipts+4,3) ),& +!& ( d1wecrsz(ipts+3,2) - d1wecrsz(ipts+4,2) )/( wecrsz(ipts+3,3) - wecrsz(ipts+4,3) ) +!write(std_out,'(a)' )' Finite-differences, 3rd order :' +!write(std_out,'(3es16.8)' )& +!& ( d2wecrsz(ipts+1,1) - d2wecrsz(ipts+2,1) )/( wecrsz(ipts+1,2) - wecrsz(ipts+2,2) ),& +!& ( d2wecrsz(ipts+1,2) - d2wecrsz(ipts+2,2) )/( wecrsz(ipts+1,2) - wecrsz(ipts+2,2) ),& +!& ( d2wecrsz(ipts+1,3) - d2wecrsz(ipts+2,3) )/( wecrsz(ipts+1,2) - wecrsz(ipts+2,2) ) +!write(std_out,'(3es16.8)' )& +!& ( d2wecrsz(ipts+3,1) - d2wecrsz(ipts+4,1) )/( wecrsz(ipts+3,3) - wecrsz(ipts+4,3) ),& +!& ( d2wecrsz(ipts+3,2) - d2wecrsz(ipts+4,2) )/( wecrsz(ipts+3,3) - wecrsz(ipts+4,3) ),& +!& ( d2wecrsz(ipts+3,3) - d2wecrsz(ipts+4,3) )/( wecrsz(ipts+3,3) - wecrsz(ipts+4,3) ) + + +!!This is for GGA + +!write(std_out,'(4es16.8)' )& +!& ( dvxcdgr(ipts+1,1) - dvxcdgr(ipts+2,1) )/2._dp/delta,& +!& ( dvxcdgr(ipts+3,2) - dvxcdgr(ipts+4,2) )/2._dp/delta,& +!& ( dvxcdgr(ipts+1,3) - dvxcdgr(ipts+2,3) )/2._dp/delta,& +!& ( dvxcdgr(ipts+3,3) - dvxcdgr(ipts+4,3) )/2._dp/delta +!else +!! For grho2 (should distinguish exchange and correlation ...) +!grr=sqrt(grho2_updn(ipts,1)) ! Analysis of exchange +!grr=sqrt(grho2_updn(ipts,3)) ! Analysis of correlation +!write(std_out,'(3es16.8)' )exci(ipts)*rho,& +!& ( exci(ipts+1)*rho - exci(ipts+2)*rho )/2._dp/delta/grr,& +!& ( exci(ipts+3)*rho - exci(ipts+4)*rho )/2._dp/delta/grr +!write(std_out,'(3es16.8)' )& +!& ( vxci(ipts+1,1) - vxci(ipts+2,1) )/2._dp/delta/grr,& +!& ( vxci(ipts+3,1) - vxci(ipts+4,1) )/2._dp/delta/grr,& +!& ( vxci(ipts+3,2) - vxci(ipts+4,2) )/2._dp/delta/grr +!write(std_out,'(4es16.8)' )& +!& ( dvxcdgr(ipts+1,1) - dvxcdgr(ipts+2,1) )/2._dp/delta/grr,& +!& ( dvxcdgr(ipts+3,2) - dvxcdgr(ipts+4,2) )/2._dp/delta/grr,& +!& ( dvxcdgr(ipts+1,3) - dvxcdgr(ipts+2,3) )/2._dp/delta/grr,& +!& ( dvxcdgr(ipts+3,3) - dvxcdgr(ipts+4,3) )/2._dp/delta/grr +!end if +!end do +!stop +!end if +!ENDDEBUG + + ABI_FREE(rhoarr) + ABI_FREE(rhom1_3) + ABI_FREE(rho_updnm1_3) + ABI_FREE(zetm) + ABI_FREE(zetmm1_3) + ABI_FREE(zetp) + ABI_FREE(zetpm1_3) + +!DEBUG +!deallocate(wecrsz,d1wecrsz,d2wecrsz,d3wecrsz) +!ENDDEBUG + +!DEBUG +!write(std_out,*)' xcpbe : exit' +!write(std_out,*)' nspden=',nspden +!if(order==2)stop +!ENDDEBUG + +end subroutine xcpbe +!!*** + +end module m_xcpbe +!!*** diff --git a/GX-PAW/common/src/33_xc_lowlevel/m_xcpbe.o b/GX-PAW/common/src/33_xc_lowlevel/m_xcpbe.o new file mode 100644 index 00000000..da653cee Binary files /dev/null and b/GX-PAW/common/src/33_xc_lowlevel/m_xcpbe.o differ diff --git a/GX-PAW/common/src/33_xc_lowlevel/m_xcpositron.F90 b/GX-PAW/common/src/33_xc_lowlevel/m_xcpositron.F90 new file mode 100644 index 00000000..01a7e13c --- /dev/null +++ b/GX-PAW/common/src/33_xc_lowlevel/m_xcpositron.F90 @@ -0,0 +1,371 @@ +!!****m* ABINIT/m_xcpositron +!! NAME +!! m_xcpositron +!! +!! FUNCTION +!! Compute electron-positron correlation potentials and energy density. +!! +!! COPYRIGHT +!! Copyright (C) 1998-2024 ABINIT group (GJ,MT) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! SOURCE + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include "abi_common.h" + +module m_xcpositron + + use defs_basis + use m_errors + use m_abicore + + use m_numeric_tools, only : invcb + + implicit none + + private +!!*** + + public :: xcpositron +!!*** + +contains +!!*** + +!!****f* ABINIT/xcpositron +!! NAME +!! xcpositron +!! +!! FUNCTION +!! Compute electron-positron correlation potentials and energy density. +!! Used electron-positron correlation functional is controlled by ixcpositron argument. +!! Returns Fxc, Vxc_pos, Vxc_el from input rhor_pos and rhor_el for positron and electrons. +!! +!! INPUTS +!! grhoe2(ngr)=square of the gradient of electronic density rhoe (needed for GGA) +!! ixcpositron=type of electron-positron correlation functional: +!! 1: LDA zero positron density limit parametrized by Arponen & Pajanne +!! and provided by Boronski & Nieminen [1,2] +!! 11: LDA zero positron density limit parametrized by Arponen & Pajanne +!! and fitted by Sterne & Kaiser [1,3] +!! 2: LDA electron-positron correlation +!! provided by Puska, Seitsonen, and Nieminen [1,4] +!! 3: GGA zero positron density limit parametrized by Arponen & Pajanne +!! and provided by Boronski & Nieminen [1,2,5] +!! 31: GGA zero positron density limit parametrized by Arponen & Pajanne +!! and fitted by Sterne & Kaiser [1,3,5] +!! See references below +!! ngr=size of grho2 array (0 if LDA, npt if GGA) +!! npt=number of real space points on which density is provided +!! posdensity0_limit=True if we are in the zero positron density limit +!! rhoer(npt)=electron density (bohr^-3) +!! rhopr(npt)=positron density (bohr^-3) +!! +!! OUTPUT +!! fnxc(npt)=correlation energy per unit volume fxc +!! vxce(npt)=correlation potential for electron dfxc/drhoe (hartree) +!! vxcp(npt)=correlation potential for positron dfxc/drhop (hartree) +!! vxcegr(ngr)= 1/|gradRhoe| dfxc/d|gradRhoe| (empty if LDA, i.e. ngr=0) +!! Optional outputs: +!! dvxce(npt)=partial second derivatives of the xc energy wr to the electronic density +!! dvxce(:)=dVxce/dRhoe +!! dvxcp(npt)=partial second derivatives of the xc energy wr to the positronic density +!! dvxcp(:)=dVxcp/drhop +!! +!! NOTES +!! References for electron-positron correlation functionals: +!! [1] J. Arponen and E. Pajanne, Ann. Phys. (N.Y.) 121, 343 (1979) [[cite:Arponen1979a]]. +!! [2] E. Boronski and R.M. Nieminen, Phys. Rev. B 34, 3820 (1986) [[cite:Boronski1986]]. +!! [3] P.A. Sterne and J.H. Kaiser, Phys. Rev. B 43, 13892 (1991) [[cite:Sterne1991]]. +!! [4] M.J. Puska, A.P. Seitsonen and R.M. Nieminen, Phys. Rev. B 52, 10947 (1994) [[cite:Puska1994]]. +!! [5] B. Barbiellini, M.J. Puska, T. Torsti and R.M.Nieminen, Phys. Rev. B 51, 7341 (1995) [[cite:Barbiellini1995]] +!! +!! SOURCE + +subroutine xcpositron(fnxc,grhoe2,ixcpositron,ngr,npt,posdensity0_limit,rhoer,rhopr,vxce,vxcegr,vxcp,& +& dvxce,dvxcp) ! optional arguments + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: ixcpositron,ngr,npt + logical,intent(in) :: posdensity0_limit +!arrays + real(dp),intent(in) :: grhoe2(ngr),rhoer(npt),rhopr(npt) + real(dp),intent(out) :: fnxc(npt),vxce(npt),vxcegr(ngr),vxcp(npt) + real(dp),intent(out),optional :: dvxce(npt),dvxcp(npt) + +!Local variables------------------------------- +!scalars + integer,parameter :: idebug=0 + integer :: ipt + logical :: gga,need_dvxce,need_dvxcp + real(dp),parameter :: alpha_gga=0.22_dp + real(dp),parameter :: ap_a1=-1.56_dp,ap_b1=0.051_dp,ap_c1=-0.081_dp,ap_d1=1.14_dp + real(dp),parameter :: ap_a2=-0.92305_dp,ap_b2=-0.05459_dp + real(dp),parameter :: ap_a3=-0.6298_dp,ap_b3=-13.15111_dp,ap_c3=2.8655_dp + real(dp),parameter :: ap_a4=-179856.2768_dp,ap_b4=186.4207_dp,ap_c4=-0.524_dp + real(dp),parameter :: ap_psn_limit=0.7_dp + real(dp),parameter :: ap_psn_1=0.9_dp*ap_psn_limit,ap_psn_2=1.1_dp*ap_psn_limit + real(dp),parameter :: fpi3=third*four_pi + real(dp),parameter :: psn_aa=69.7029_dp,psn_ba=-107.4927_dp,psn_bb=141.8458_dp + real(dp),parameter :: psn_ca=23.7182_dp,psn_cb=-33.6472_dp ,psn_cc=5.21152_dp + real(dp),parameter :: sk_a=-1.56_dp,sk_b=0.1324_dp,sk_c=-4.092_dp,sk_d=51.96_dp,sk_e=0.7207_dp + real(dp),parameter :: rsfac=0.6203504908994000_dp + real(dp) :: arse,brse,crse,darse,dbrse,dcrse,d2arse,d2brse,d2crse + real(dp) :: d2eps,deps,dexc,dexcdg,dexc_p,d2expgga,dexpgga,d2invrs,dinvrs,d2kf,dkf,d2nqtf2,dnqtf2 + real(dp) :: drse,drsp,d2exc,d2exc_p,d2rse,d2rsp,d2sqr,dsqr + real(dp) :: eexp,eps,exc,exc_p,expgga,invf,dinvf,d2invf,invrhoe,invrhop,invrs,invsqr + real(dp) :: kf,logrs,nqtf2,opr2,ratio_ap,ratio_psn,rhoe,rhop,rse,rsp,sqr + character(len=500) :: msg +!arrays + real(dp),allocatable :: rsepts(:),rsppts(:) + +! ************************************************************************* + + gga=(ngr==npt) + need_dvxce=present(dvxce) + need_dvxcp=present(dvxcp) + + if (gga.and.ixcpositron==2) then + msg = 'xcpositron: GGA not yet implemented for ixcpositron=2 !' + ABI_ERROR(msg) + end if + if (posdensity0_limit.and.ixcpositron==2) then + msg = 'xcpositron: ixcpositron=2 cannot be treated in the zero positron density limit !' + ABI_ERROR(msg) + end if + if (abs(ixcpositron)/=1.and.ixcpositron/=11.and.ixcpositron/=2.and.ixcpositron/=3.and.ixcpositron/=31) then + msg = 'xcpositron: unknown electron-positron correlation !' + ABI_ERROR(msg) + end if + +!Compute density radii for rhor_el, rhor_pos + ABI_MALLOC(rsepts,(npt)) + call invcb(rhoer(:),rsepts,npt) + rsepts(:)=rsfac*rsepts(:) + if (ixcpositron==2) then + ABI_MALLOC(rsppts,(npt)) + call invcb(rhopr(:),rsppts,npt) + rsppts(:)=rsfac*rsppts(:) + end if + +!Loop over grid points +!---------------------------------------------------- + do ipt=1,npt + + rhoe=rhoer(ipt) + rhop=rhopr(ipt) + exc=zero;dexc=zero;d2exc=zero;dexcdg=zero + + rse=rsepts(ipt) + invrhoe=one/rhoe + drse=-third*rse*invrhoe + if (need_dvxce) d2rse= four/nine*rse*invrhoe**2 + +! Arponen & Pajane parametrization for electron + if (ixcpositron/=11.and.ixcpositron/=31) then + if (rse<0.302_dp) then + invrs=one/rse;invsqr=sqrt(invrs);logrs=log(rse) + exc =ap_a1*invsqr+(ap_b1*logrs+ap_c1)*logrs+ap_d1 + dexc=drse*invrs*(-half*ap_a1*invsqr+two*ap_b1*logrs+ap_c1) + if (need_dvxce) d2exc=(d2rse/drse-drse*invrs)*dexc+drse**2*invrs**2*(quarter*ap_a1*invsqr+two*ap_b1) + else if (rse>=0.302_dp.and.rse<=0.56_dp) then + invrs=one/rse + exc =ap_a2+ap_b2*invrs**2 + dexc=-drse*ap_b2*two*invrs**3 + if (need_dvxce) d2exc=d2rse/drse*dexc+six*drse**2*ap_b2*invrs**4 + else if (rse>0.56_dp.and.rse<=8.0_dp) then + invrs=one/(rse+2.5_dp) + dinvrs=-drse*invrs**2 +! jmb : d2rse initialized only if need_dvxce = .True. + if (need_dvxce) d2invrs=-d2rse*invrs**2-two*invrs*drse**2 + exc =ap_a3+ap_b3*invrs**2+ap_c3*invrs + dexc=two*ap_b3*invrs*dinvrs+ap_c3*dinvrs + if (need_dvxce) d2exc=two*ap_b3*dinvrs**2+(two*ap_b3*invrs+ap_c3)*d2invrs + else + exc =ap_a4*rhoe**2+ap_b4*rhoe+ap_c4 + dexc =two*ap_a4*rhoe+ap_b4 + if (need_dvxce) d2exc=two*ap_a4 + end if + +! Sterne & Kaiser parametrization for electron + else + eexp=exp(-(rse+sk_c)**2/sk_d) + opr2=(one+rse**2) + arse=atan(rse) + exc = sk_a/sqrt(arse)+sk_b*eexp+sk_e + dexc= -(two*sk_b*eexp*(sk_c+rse)/sk_d + sk_a/(two*opr2*sqrt(arse)**3))*drse + if (need_dvxce) d2exc=-(two*sk_b*eexp*(sk_c+rse)/sk_d + sk_a/(two*opr2*arse**1.5_dp))*d2rse & +& +(two*sk_b*eexp*(two*sk_c**2-sk_d+four*sk_c*rse+two*rse**2)/sk_d**2 & +& +sk_a*(three+four*rse*arse)/(four*opr2**2*sqrt(arse)**5))*drse**2 + end if + +! Puska, Seitsonen and Nieminen parametrization for positron + if (ixcpositron==2.and.rse>=ap_psn_1) then + rsp=rsppts(ipt) + invrhop=one/rhop + drsp=-third*rsp*invrhop + if (need_dvxcp) d2rsp= four/nine*rsp*invrhop**2 + exc_p=zero;dexc_p=zero;d2exc_p=zero + if (rsp<0.302_dp) then + invrs=one/rsp;invsqr=sqrt(invrs);logrs=log(rsp) + exc_p =ap_a1*invsqr+(ap_b1*logrs+ap_c1)*logrs+ap_d1 + dexc_p=drsp*invrs*(-half*ap_a1*invsqr+two*ap_b1*logrs+ap_c1) + if (need_dvxcp) d2exc_p=(d2rsp/drsp-drsp*invrs)*dexc_p+drsp**2*invrs**2*(quarter*ap_a1*invsqr+two*ap_b1) + else if (rsp>=0.302_dp.and.rsp<=0.56_dp) then + invrs=one/rsp + exc_p =ap_a2+ap_b2*invrs**2 + dexc_p=-drsp*ap_b2*two*invrs**3 + if (need_dvxcp) d2exc_p=d2rsp/drsp*dexc_p+six*drsp**2*ap_b2*invrs**4 + else if (rsp>0.56_dp.and.rsp<=8.0_dp) then + invrs=one/(rsp+2.5_dp) + dinvrs=-drsp*invrs**2 +! jmb : d2rsp initialized only if need_dvxcp = .True.* + if (need_dvxcp) d2invrs=-d2rsp*invrs**2-two*invrs*drsp**2 + exc_p =ap_a3+ap_b3*invrs**2+ap_c3*invrs + dexc_p=two*ap_b3*invrs*dinvrs+ap_c3*dinvrs + if (need_dvxcp) d2exc_p=two*ap_b3*dinvrs**2+(two*ap_b3*invrs+ap_c3)*d2invrs + else + exc_p =ap_a4*rhop**2+ap_b4*rhop+ap_c4 + dexc_p =two*ap_a4*rhop+ap_b4 + if (need_dvxcp) d2exc_p=two*ap_a4 + end if + end if + +! GGA correction + if (gga) then + kf=(three*pi*pi*rhoe)**third + nqtf2=(rhoe*sqrt(four*kf/pi))**2 + eps=grhoe2(ipt)/nqtf2 + if (eps=ap_psn_1.and.rse<=ap_psn_2) then + ratio_psn=(rse-ap_psn_1)/(ap_psn_2-ap_psn_1);ratio_ap=one-ratio_psn + fnxc(ipt)=ratio_psn*fnxc(ipt)+ratio_ap*rhop*exc + vxce(ipt)=ratio_psn*vxce(ipt)+ratio_ap*rhop*dexc + vxcp(ipt)=ratio_psn*vxcp(ipt)+ratio_ap*exc + if (need_dvxce) dvxce(ipt)=ratio_psn*dvxce(ipt)+ratio_ap*rhop*d2exc + if (need_dvxcp) dvxcp(ipt)=ratio_psn*dvxcp(ipt) + end if + end if + +! Debug statements: use polynomial functionals + if (idebug>0) then + if (idebug==4) then ! order 4 + fnxc(ipt)=tol3*((rhop**4+rhoe**4)/12._dp+(rhop**3*rhoe+rhop*rhoe**3)/3._dp+rhop**2*rhoe**2) + vxce(ipt)=tol3*((rhop**3*rhoe+rhop*rhoe**3)/3._dp+rhop**2*rhoe+rhop*rhoe**2) + vxcp(ipt)=tol3*((rhop**3*rhoe+rhop*rhoe**3)/3._dp+rhop**2*rhoe+rhop*rhoe**2) + if (need_dvxce) dvxce(ipt)=tol3*(rhop**3/3._dp+rhop*rhoe**2+rhop**2+two*rhop*rhoe) + if (need_dvxcp) dvxcp(ipt)=tol3*(rhoe**3/3._dp+rhoe*rhop**2+rhoe**2+two*rhop*rhoe) + end if + if (idebug==3) then ! order 3 + fnxc(ipt)=tol3*((rhop**3+rhoe**3)*third+rhop**2*rhoe+rhop*rhoe**2) + vxce(ipt)=tol3*(rhop+rhoe)**2 + vxcp(ipt)=tol3*(rhop+rhoe)**2 + if (need_dvxce) dvxce(ipt)=tol3*two*rhoe + if (need_dvxcp) dvxcp(ipt)=tol3*two*rhop + end if + if (idebug==2) then ! order 2 + fnxc(ipt)=tol3*(rhop+rhoe)**2 + vxce(ipt)=tol3*two*(rhop+rhoe) + vxcp(ipt)=tol3*two*(rhop+rhoe) + if (need_dvxce) dvxce(ipt)=tol3*two + if (need_dvxcp) dvxcp(ipt)=tol3*two + end if + if (idebug==1) then ! order 1 + fnxc(ipt)=tol3*(rhop+rhoe) + vxce(ipt)=tol3 + vxcp(ipt)=tol3 + if (need_dvxce) dvxce(ipt)=zero + if (need_dvxcp) dvxcp(ipt)=zero + end if + end if + + end do ! ipt + + ABI_FREE(rsepts) + if (ixcpositron==2) then + ABI_FREE(rsppts) + end if + +!Convert everything in Hartree units + fnxc(:)=half*fnxc(:) + vxce(:)=half*vxce(:) + vxcp(:)=half*vxcp(:) + if (need_dvxce) dvxce(:)=half*dvxce(:) + if (need_dvxcp) dvxcp(:)=half*dvxcp(:) + if (gga) vxcegr(:)=half*vxcegr(:) + +end subroutine xcpositron +!!*** + +end module m_xcpositron +!!*** diff --git a/GX-PAW/common/src/33_xc_lowlevel/m_xcpositron.o b/GX-PAW/common/src/33_xc_lowlevel/m_xcpositron.o new file mode 100644 index 00000000..e0dcd017 Binary files /dev/null and b/GX-PAW/common/src/33_xc_lowlevel/m_xcpositron.o differ diff --git a/GX-PAW/common/src/39_libpaw b/GX-PAW/common/src/39_libpaw new file mode 120000 index 00000000..4d96dc9d --- /dev/null +++ b/GX-PAW/common/src/39_libpaw @@ -0,0 +1 @@ +../../libpaw/src \ No newline at end of file diff --git a/GX-PAW/common/src/Makefile b/GX-PAW/common/src/Makefile new file mode 100644 index 00000000..f68d0e0c --- /dev/null +++ b/GX-PAW/common/src/Makefile @@ -0,0 +1,1560 @@ +# Makefile.in generated by automake 1.16.3 from Makefile.am. +# shared/common/src/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994-2020 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-inter on 2024/03/16 21:07:39 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-inter script or its config file instead. +# + +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/abinit +pkgincludedir = $(includedir)/abinit +pkglibdir = $(libdir)/abinit +pkglibexecdir = $(libexecdir)/abinit +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = x86_64-apple-darwin18.7.0 +host_triplet = x86_64-apple-darwin18.7.0 +target_triplet = x86_64-apple-darwin18.7.0 +subdir = shared/common/src +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/m4/arch-gpu.m4 \ + $(top_srcdir)/config/m4/arch-mpi.m4 \ + $(top_srcdir)/config/m4/auto-autotools.m4 \ + $(top_srcdir)/config/m4/auto-corelibs.m4 \ + $(top_srcdir)/config/m4/auto-debug.m4 \ + $(top_srcdir)/config/m4/auto-dirflags.m4 \ + $(top_srcdir)/config/m4/auto-env.m4 \ + $(top_srcdir)/config/m4/auto-hints.m4 \ + $(top_srcdir)/config/m4/auto-optim.m4 \ + $(top_srcdir)/config/m4/auto-options.m4 \ + $(top_srcdir)/config/m4/auto-output.m4 \ + $(top_srcdir)/config/m4/auto-triggers.m4 \ + $(top_srcdir)/config/m4/conf-atompaw.m4 \ + $(top_srcdir)/config/m4/conf-debug.m4 \ + $(top_srcdir)/config/m4/conf-fallbacks.m4 \ + $(top_srcdir)/config/m4/conf-files.m4 \ + $(top_srcdir)/config/m4/conf-init.m4 \ + $(top_srcdir)/config/m4/conf-openmp.m4 \ + $(top_srcdir)/config/m4/conf-optim.m4 \ + $(top_srcdir)/config/m4/lang-c++.m4 \ + $(top_srcdir)/config/m4/lang-c.m4 \ + $(top_srcdir)/config/m4/lang-fortran-import.m4 \ + $(top_srcdir)/config/m4/lang-fortran.m4 \ + $(top_srcdir)/config/m4/lang-python.m4 \ + $(top_srcdir)/config/m4/libxml2.m4 \ + $(top_srcdir)/config/m4/misc-display.m4 \ + $(top_srcdir)/config/m4/sd_abinit_common.m4 \ + $(top_srcdir)/config/m4/sd_arch_gpu.m4 \ + $(top_srcdir)/config/m4/sd_arch_mpi.m4 \ + $(top_srcdir)/config/m4/sd_bigdft.m4 \ + $(top_srcdir)/config/m4/sd_core.m4 \ + $(top_srcdir)/config/m4/sd_esl.m4 \ + $(top_srcdir)/config/m4/sd_fftw3.m4 \ + $(top_srcdir)/config/m4/sd_gpu_kokkos.m4 \ + $(top_srcdir)/config/m4/sd_gpu_yakl.m4 \ + $(top_srcdir)/config/m4/sd_io_hdf5.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf_fortran.m4 \ + $(top_srcdir)/config/m4/sd_levmar.m4 \ + $(top_srcdir)/config/m4/sd_libpaw.m4 \ + $(top_srcdir)/config/m4/sd_libpsml.m4 \ + $(top_srcdir)/config/m4/sd_libxc.m4 \ + $(top_srcdir)/config/m4/sd_math_fft.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_core.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_util.m4 \ + $(top_srcdir)/config/m4/sd_papi.m4 \ + $(top_srcdir)/config/m4/sd_pfft.m4 \ + $(top_srcdir)/config/m4/sd_triqs.m4 \ + $(top_srcdir)/config/m4/sd_wannier90.m4 \ + $(top_srcdir)/config/m4/sd_xmlf90.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_$(V)) +am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY)) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +am__v_at_1 = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + distdir distdir-am +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = incs mods 02_clib 10_defs 11_memory_mpi 12_hide_mpi \ + 14_hidewrite 16_hideleave 16_kokkos_toolbox 17_gpu_toolbox \ + 17_libtetra_ext 17_minimax 17_yaml_out 18_timing 21_hashfuncs \ + 27_toolbox_oop 28_numeric_noabirule 29_kpoints 32_util \ + 33_xc_lowlevel +am__DIST_COMMON = $(srcdir)/Makefile.in +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ABINIT_BINARY_PACKAGE = abinit-10.0.0.83-58be4d_x86_64_darwin18.7.0_gnu9.4 +ABINIT_COMMON_CPPFLAGS = +ABINIT_COMMON_FCFLAGS = +ABINIT_COMMON_LDFLAGS = +ABINIT_COMMON_LIBS = +ABINIT_TARGET = x86_64_darwin18.7.0_gnu9.4 +ABINIT_VERSION = 10.0.0.83-58be4d +ABINIT_VERSION_BASE = 10.0 +ABINIT_VERSION_BUILD = 20240316 +ABINIT_VERSION_MAJOR = 10 +ABINIT_VERSION_MICRO = 0 +ABINIT_VERSION_MINOR = 0 +ABI_CPPFLAGS = -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include +ACLOCAL = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' aclocal-1.16 +AMTAR = $${TAR-tar} +AM_DEFAULT_VERBOSITY = 1 +AR = ar +ARFLAGS = rc +ARFLAGS_CMD = rc +ARFLAGS_DEBUG = +ARFLAGS_EXTRA = +ARFLAGS_HINTS = +ARFLAGS_OPTIM = +ATOMPAW_BIN = +AUTOCONF = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' autoconf +AUTOHEADER = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' autoheader +AUTOMAKE = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' automake-1.16 +AWK = awk +BIGDFT_CPPFLAGS = +BIGDFT_FCFLAGS = +BIGDFT_LDFLAGS = +BIGDFT_LIBS = +BOURNE_SHELL = /bin/sh +CC = /opt/local/bin/mpicc +CCDEPMODE = depmode=gcc3 +CC_LDFLAGS = +CC_LDFLAGS_DEBUG = +CC_LDFLAGS_EXTRA = +CC_LDFLAGS_GPU = +CC_LDFLAGS_HINTS = +CC_LDFLAGS_OPTIM = +CC_LIBS = +CC_LIBS_DEBUG = +CC_LIBS_EXTRA = +CC_LIBS_GPU = +CC_LIBS_HINTS = +CC_LIBS_OPTIM = +CFLAGS = -O2 -g +CFLAGS_DEBUG = +CFLAGS_EXTRA = +CFLAGS_GPU = +CFLAGS_HINTS = +CFLAGS_OPTIM = +CPP = /opt/local/bin/mpicc -E +CPPFLAGS = +CPPFLAGS_DEBUG = +CPPFLAGS_EXTRA = +CPPFLAGS_GPU = +CPPFLAGS_HINTS = +CPPFLAGS_HINTS_EXT = -P -std=c99 +CPPFLAGS_OPTIM = +CXX = /opt/local/bin/mpicxx +CXXDEPMODE = depmode=gcc3 +CXXFLAGS = -O2 -g +CXXFLAGS_DEBUG = +CXXFLAGS_EXTRA = +CXXFLAGS_GPU = +CXXFLAGS_HINTS = +CXXFLAGS_OPTIM = +CXX_LDFLAGS = +CXX_LDFLAGS_DEBUG = +CXX_LDFLAGS_EXTRA = +CXX_LDFLAGS_GPU = +CXX_LDFLAGS_HINTS = +CXX_LDFLAGS_OPTIM = +CXX_LIBS = +CXX_LIBS_DEBUG = +CXX_LIBS_EXTRA = +CXX_LIBS_GPU = +CXX_LIBS_HINTS = +CXX_LIBS_OPTIM = +CYGPATH_W = echo +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +ECHO_C = \c +ECHO_N = +ECHO_T = +EGREP = /usr/bin/grep -E +EXEEXT = +F77 = /opt/local/bin/mpif90 +FC = /opt/local/bin/mpif90 +FCFLAGS = -O2 -g -ffree-line-length-none -I/opt/local/include -I/opt/local/include -I/opt/local/include +FCFLAGS_DEBUG = +FCFLAGS_EXTRA = +FCFLAGS_F90 = +FCFLAGS_FIXEDFORM = -ffixed-form +FCFLAGS_FREEFORM = -ffree-form +FCFLAGS_HINTS = -ffree-line-length-none +FCFLAGS_MODDIR = -J../mods +FCFLAGS_OPENMP = +FCFLAGS_OPENMP_OFFLOAD = +FCFLAGS_OPTIM = +FCLIBS = -L/opt/local/lib -L/opt/local/lib/openmpi-gcc9 -L/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0 -L/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/../../.. -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi -lgfortran -lquadmath -lm +FC_LDFLAGS = +FC_LDFLAGS_DEBUG = +FC_LDFLAGS_EXTRA = +FC_LDFLAGS_HINTS = +FC_LDFLAGS_OPTIM = +FC_LIBS = +FC_LIBS_DEBUG = +FC_LIBS_EXTRA = +FC_LIBS_HINTS = +FC_LIBS_OPTIM = +FC_NOWRAP = /opt/local/bin/mpif90 +FFLAGS = -O2 -g -ffree-line-length-none -I/opt/local/include -I/opt/local/include -I/opt/local/include +FFTW3_CFLAGS = +FFTW3_CPPFLAGS = -I/opt/local/include +FFTW3_FCFLAGS = -I/opt/local/include +FFTW3_LDFLAGS = +FFTW3_LIBS = -L/opt/local/lib -lfftw3 -lfftw3f +FFT_CFLAGS = +FFT_FCFLAGS = +FPP = +FPPFLAGS = +FPPFLAGS_DEBUG = +FPPFLAGS_EXTRA = +FPPFLAGS_HINTS = +FPPFLAGS_OPTIM = +GPU_ARCH = +GPU_CFLAGS = +GPU_CPPFLAGS = +GPU_CXXFLAGS = +GPU_FCFLAGS = +GPU_LDFLAGS = +GPU_LIBS = +GRAPHATOM_BIN = +GREP = /usr/bin/grep +H5CC = +HDF5_CFLAGS = +HDF5_CPPFLAGS = +HDF5_CXXFLAGS = +HDF5_FCFLAGS = +HDF5_LDFLAGS = +HDF5_LIBS = +INSTALL = /opt/local/libexec/gnubin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +KOKKOS_CPPFLAGS = +KOKKOS_CXXFLAGS = +KOKKOS_LDFLAGS = +KOKKOS_LIBS = +LDFLAGS = +LEVMAR_CFLAGS = +LEVMAR_CPPFLAGS = +LEVMAR_LDFLAGS = +LEVMAR_LIBS = +LIBOBJS = +LIBPAW_CPPFLAGS = +LIBPAW_FCFLAGS = +LIBPAW_LDFLAGS = +LIBPAW_LIBS = +LIBPSML_CPPFLAGS = +LIBPSML_FCFLAGS = +LIBPSML_LDFLAGS = +LIBPSML_LIBS = +LIBS = -L/opt/local/lib -lwannier -L/opt/local/lib -lxc -L/opt/local/lib -lnetcdff -L/opt/local/lib -lnetcdf -L/opt/local/lib -L/opt/local/lib -lhdf5_hl -L/opt/local/lib -lhdf5 -lz -ldl -lm -L/opt/local/lib -lfftw3 -lfftw3f +LIBXC_CFLAGS = +LIBXC_CPPFLAGS = +LIBXC_FCFLAGS = +LIBXC_LDFLAGS = +LIBXC_LIBS = +LIBXML2_CPPFLAGS = +LIBXML2_FCFLAGS = +LIBXML2_LIBS = +LINALG_CFLAGS = +LINALG_CPPFLAGS = +LINALG_CXXFLAGS = +LINALG_FCFLAGS = -I/opt/local/include +LINALG_LDFLAGS = +LINALG_LIBS = -L/opt/local/lib -lopenblas +LN_S = ln -s +LTLIBOBJS = +MAKEINFO = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' makeinfo +MKDIR_P = /opt/local/libexec/gnubin/mkdir -p +MODEXT = mod +MPI_CFLAGS = +MPI_CPPFLAGS = +MPI_CXXFLAGS = +MPI_FCFLAGS = +MPI_LDFLAGS = +MPI_LIBS = +MV = /opt/local/libexec/gnubin/mv +NETCDF_CFLAGS = +NETCDF_CPPFLAGS = +NETCDF_CXXFLAGS = +NETCDF_FCFLAGS = +NETCDF_FORTRAN_CFLAGS = +NETCDF_FORTRAN_CPPFLAGS = +NETCDF_FORTRAN_CXXFLAGS = +NETCDF_FORTRAN_FCFLAGS = +NETCDF_FORTRAN_LDFLAGS = +NETCDF_FORTRAN_LIBS = +NETCDF_LDFLAGS = +NETCDF_LIBS = +NVCC = +NVCC_CFLAGS = +NVCC_CPPFLAGS = +NVCC_LDFLAGS = +NVCC_LIBS = +OBJEXT = o +PACKAGE = abinit +PACKAGE_BUGREPORT = https://bugs.launchpad.net/abinit/ +PACKAGE_NAME = ABINIT +PACKAGE_STRING = ABINIT 10.0.0.83-58be4d +PACKAGE_TARNAME = abinit +PACKAGE_URL = +PACKAGE_VERSION = 10.0.0.83-58be4d +PAPI_CFLAGS = +PAPI_CPPFLAGS = +PAPI_LDFLAGS = +PAPI_LIBS = +PATCH = patch +PATH_SEPARATOR = : +PERL = /usr/bin/perl +PFFT_CFLAGS = +PFFT_CPPFLAGS = +PFFT_LDFLAGS = +PFFT_LIBS = +PYFLAGS = +PYTHON = python3.9 +PYTHON_CONFIG = python3.9-config +PYTHON_CPPFLAGS = -I/opt/local/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -I/opt/local/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 +RANLIB = ranlib +REALPATH = realpath +RM = /opt/local/libexec/gnubin/rm +SED = /usr/bin/sed +SET_MAKE = +SHELL = /bin/sh +STRIP = +TAR = tar +TRIQS_CFLAGS = +TRIQS_CPPFLAGS = +TRIQS_CXXFLAGS = +TRIQS_LDFLAGS = +TRIQS_LIBS = +TRUE_CPP = cpp +VERSION = 10.0.0.83-58be4d +WANNIER90_CPPFLAGS = +WANNIER90_FCFLAGS = -I/opt/local/include +WANNIER90_LDFLAGS = +WANNIER90_LIBS = -L/opt/local/lib -lwannier +XML2_CONFIG = +XMLF90_CPPFLAGS = +XMLF90_FCFLAGS = +XMLF90_LDFLAGS = +XMLF90_LIBS = +XML_CPPFLAGS = +XML_LIBS = +XPP = +XPPFLAGS = +XPPFLAGS_DEBUG = +XPPFLAGS_EXTRA = +XPPFLAGS_OPTIM = +YAKL_CPPFLAGS = +YAKL_FCFLAGS = +YAKL_LDFLAGS = +YAKL_LIBS = +abi_ac_distcheck = --with-config-file="/Users/gonze/_Research/ABINIT_git/gonze/mac-1P0-225.ac9" +abi_ac_version = 027100 +abi_am_version = 011603 +abi_avx_safe_mode_enable = no +abi_bse_unpacked_enable = no +abi_cc_path = +abi_cc_vendor = gnu +abi_cc_version = 9.4 +abi_cclock_enable = no +abi_cpp_path = +abi_cpu_64bits = yes +abi_cpu_bits = 64 +abi_cpu_model = unknown +abi_cpu_platform = apple +abi_cpu_spec = unknown_unknown +abi_cpu_vendor = unknown +abi_crpa_optim_enable = no +abi_cxx_path = +abi_cxx_vendor = gnu +abi_cxx_version = 9.4 +abi_debug_flavor = basic +abi_exports_enable = no +abi_fbk_abinit_common_ok = no +abi_fbk_bigdft_ok = disabled +abi_fbk_config = +abi_fbk_enable = no +abi_fbk_fft_ok = no +abi_fbk_fftw3_ok = no +abi_fbk_gpu_ok = no +abi_fbk_hdf5_ok = disabled +abi_fbk_init = def +abi_fbk_kokkos_ok = no +abi_fbk_levmar_ok = no +abi_fbk_libpaw_ok = no +abi_fbk_libpsml_ok = disabled +abi_fbk_libxc_ok = disabled +abi_fbk_libxml2_ok = no +abi_fbk_linalg_ok = disabled +abi_fbk_list = +abi_fbk_mpi_ok = no +abi_fbk_netcdf_fortran_ok = disabled +abi_fbk_netcdf_ok = disabled +abi_fbk_papi_ok = no +abi_fbk_pfft_ok = no +abi_fbk_prefix = +abi_fbk_required = +abi_fbk_triqs_ok = no +abi_fbk_wannier90_ok = disabled +abi_fbk_xmlf90_ok = disabled +abi_fbk_yakl_ok = no +abi_fc_path = +abi_fc_vendor = gnu +abi_fc_version = 9.4 +abi_fc_wrap = no +abi_fc_wrapper_enable = no +abi_fpp_path = +abi_gpu_arch = +abi_gpu_fcflags = +abi_gpu_flavor = none +abi_gpu_hip_libdir = +abi_gpu_incs = +abi_gpu_ldflags = +abi_gpu_libs = +abi_gpu_nvtx_v3 = +abi_gpu_roctx = +abi_gw_dpc_enable = yes +abi_hints_enable = yes +abi_libtetra_enable = yes +abi_libxml2_cppflags = +abi_libxml2_enable = no +abi_libxml2_fcflags = +abi_libxml2_init = def +abi_libxml2_ldflags = +abi_libxml2_libs = +abi_libxml2_ok = unknown +abi_libxml2_prefix = +abi_lotf_enable = no +abi_lt_version = 020406 +abi_m4_version = 010419 +abi_memory_profiling_enable = no +abi_mpi_cflags = +abi_mpi_cppflags = +abi_mpi_cxxflags = +abi_mpi_enable = yes +abi_mpi_fcflags = +abi_mpi_flavor = auto +abi_mpi_gpu_aware_enable = no +abi_mpi_incs = +abi_mpi_inplace_enable = yes +abi_mpi_interfaces_bugfix_enable = no +abi_mpi_io_default_enable = no +abi_mpi_io_enable = yes +abi_mpi_ldflags = +abi_mpi_level = 2 +abi_mpi_libs = +abi_netcdf_default_enable = no +abi_openmp_enable = no +abi_openmp_offload_enable = no +abi_optim_flavor = standard +abi_python_invocation_enable = no +abi_source_debug_enable = no +abi_stdin_enable = yes +abi_sys_spec = darwin-x86_64 +abi_timer_enable = yes +abi_triqs_v1_4_enable = no +abi_triqs_v2_0_enable = no +abi_zdot_bugfix_enable = no +abinit_bindir = /usr/local/bin +abinit_builddir = /Users/gonze/_Research/ABINIT_git/gonze +abinit_chkdir = /usr/local/share/abinit/tests +abinit_datdir = /usr/local/share/abinit +abinit_docdir = /usr/local/doc/abinit +abinit_incdir = /usr/local/include +abinit_libdir = /usr/local/lib +abinit_mandir = /usr/local/share/man +abinit_prefix = /usr/local +abinit_srcdir = /Users/gonze/_Research/ABINIT_git/gonze +abs_builddir = /Users/gonze/_Research/ABINIT_git/gonze/shared/common/src +abs_srcdir = /Users/gonze/_Research/ABINIT_git/gonze/shared/common/src +abs_top_builddir = /Users/gonze/_Research/ABINIT_git/gonze +abs_top_srcdir = /Users/gonze/_Research/ABINIT_git/gonze +ac_ct_CC = +ac_ct_CXX = +ac_ct_FC = +am__include = include +am__leading_dot = . +am__quote = +am__tar = tar --format=ustar -chf - "$$tardir" +am__untar = tar -xf - +bindir = ${exec_prefix}/bin +build = x86_64-apple-darwin18.7.0 +build_alias = +build_cpu = x86_64 +build_os = darwin18.7.0 +build_vendor = apple +builddir = . +cc_info_string = gcc-mp-9 (MacPorts gcc9 9.4.0_0) 9.4.0 +cxx_info_string = g++-mp-9 (MacPorts gcc9 9.4.0_0) 9.4.0 +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +enable_avx_safe_mode = +enable_bse_unpacked = +enable_cclock = +enable_crpa_optim = +enable_exports = +enable_fc_wrapper = +enable_gw_dpc = yes +enable_hints = +enable_libtetra = +enable_lotf = +enable_memory_profiling = +enable_mpi_gpu_aware = +enable_mpi_inplace = +enable_mpi_interfaces_bugfix = +enable_mpi_io = yes +enable_mpi_io_default = +enable_netcdf_default = +enable_openmp = +enable_openmp_offload = +enable_python_invocation = +enable_shared = +enable_source_debug = +enable_static = +enable_stdin = +enable_timer = +enable_triqs_v1_4 = +enable_triqs_v2_0 = +enable_zdot_bugfix = +exec_prefix = ${prefix} +fc_info_string = GNU Fortran (MacPorts gcc9 9.4.0_0) 9.4.0 +fc_mod_fcflags = +fc_timing = standard +fcflags_opt_02_clib = +fcflags_opt_10_defs = +fcflags_opt_11_memory_mpi = +fcflags_opt_12_hide_mpi = +fcflags_opt_14_hidewrite = +fcflags_opt_16_hideleave = +fcflags_opt_16_kokkos_toolbox = +fcflags_opt_17_gpu_toolbox = +fcflags_opt_17_libtetra_ext = +fcflags_opt_17_minimax = +fcflags_opt_17_yaml_out = +fcflags_opt_18_timing = +fcflags_opt_21_hashfuncs = +fcflags_opt_27_toolbox_oop = +fcflags_opt_28_numeric_noabirule = +fcflags_opt_29_kpoints = +fcflags_opt_32_util = +fcflags_opt_33_xc_lowlevel = +fcflags_opt_39_libpaw = +fcflags_opt_41_geometry = +fcflags_opt_42_nlstrain = +fcflags_opt_42_parser = +fcflags_opt_43_ptgroups = -O0 +fcflags_opt_43_wvl_wrappers = +fcflags_opt_44_abitools = +fcflags_opt_44_abitypes_defs = +fcflags_opt_44_manage_kokkos = +fcflags_opt_45_geomoptim = +fcflags_opt_45_xgTools = +fcflags_opt_46_ghc_omp = +fcflags_opt_46_manage_cuda = +fcflags_opt_48_diago = +fcflags_opt_49_gw_toolbox_oop = +fcflags_opt_51_manage_mpi = +fcflags_opt_52_fft_mpi_noabirule = +fcflags_opt_53_ffts = +fcflags_opt_54_spacepar = +fcflags_opt_55_abiutil = +fcflags_opt_56_io_mpi = +fcflags_opt_56_mixing = +fcflags_opt_56_recipspace = +fcflags_opt_56_xc = +fcflags_opt_57_iopsp_parser = +fcflags_opt_57_iovars = +fcflags_opt_61_occeig = +fcflags_opt_62_cg_noabirule = +fcflags_opt_62_ctqmc = +fcflags_opt_62_iowfdenpot = +fcflags_opt_62_poisson = +fcflags_opt_62_wvl_wfs = +fcflags_opt_64_psp = +fcflags_opt_65_lotf_base = +fcflags_opt_65_paw = +fcflags_opt_66_nonlocal = +fcflags_opt_66_vdwxc = +fcflags_opt_66_wfs = +fcflags_opt_67_common = +fcflags_opt_67_python_invocation_ext = +fcflags_opt_67_triqs_ext = +fcflags_opt_68_dmft = +fcflags_opt_68_lotf = +fcflags_opt_68_recursion = +fcflags_opt_68_rsprc = +fcflags_opt_69_wfdesc = +fcflags_opt_70_gw = +fcflags_opt_71_bse = +fcflags_opt_71_wannier = +fcflags_opt_72_response = +fcflags_opt_77_ddb = +fcflags_opt_77_suscep = +fcflags_opt_78_effpot = +fcflags_opt_78_eph = +fcflags_opt_79_seqpar_mpi = +fcflags_opt_80_rttddft = +fcflags_opt_80_tdep = +fcflags_opt_94_scfcv = +fcflags_opt_95_drive = +fcflags_opt_98_main = +fcflags_opt_bigdft = +fcflags_opt_default = +fcflags_opt_hdf5 = +fcflags_opt_levmar = +fcflags_opt_libpsml = +fcflags_opt_libxc = +fcflags_opt_libxml2 = +fcflags_opt_linalg = +fcflags_opt_netcdf = +fcflags_opt_netcdf_fortran = +fcflags_opt_papi = +fcflags_opt_triqs = +fcflags_opt_wannier90 = +fcflags_opt_xmlf90 = +host = x86_64-apple-darwin18.7.0 +host_alias = +host_cpu = x86_64 +host_os = darwin18.7.0 +host_vendor = apple +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = ${SHELL} /Users/gonze/_Research/ABINIT_git/gonze/config/gnu/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = ${datarootdir}/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = $(MKDIR_P) +oldincludedir = /usr/include +pdfdir = ${docdir} +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +runstatedir = ${localstatedir}/run +sbindir = ${exec_prefix}/sbin +sd_abinit_common_cppflags = +sd_abinit_common_enable = no +sd_abinit_common_enable_def = no +sd_abinit_common_fcflags = +sd_abinit_common_init = def +sd_abinit_common_ldflags = +sd_abinit_common_libs = +sd_abinit_common_ok = unknown +sd_abinit_common_options = optional skip +sd_abinit_common_policy = skip +sd_abinit_common_status = optional +sd_bigdft_cppflags = +sd_bigdft_enable = no +sd_bigdft_enable_def = no +sd_bigdft_fcflags = +sd_bigdft_init = def +sd_bigdft_ldflags = +sd_bigdft_libs = +sd_bigdft_ok = unknown +sd_bigdft_options = optional warn +sd_bigdft_policy = warn +sd_bigdft_status = optional +sd_fft_cflags = +sd_fft_choices = +sd_fft_cppflags = -I/opt/local/include +sd_fft_cxxflags = +sd_fft_enable = yes +sd_fft_fcflags = -I/opt/local/include +sd_fft_flavor = fftw3 +sd_fft_init = kwd +sd_fft_ldflags = +sd_fft_libs = -L/opt/local/lib -lfftw3 -lfftw3f +sd_fft_ok = yes +sd_fftw3_cflags = +sd_fftw3_cppflags = -I/opt/local/include +sd_fftw3_enable = yes +sd_fftw3_enable_def = no +sd_fftw3_fcflags = -I/opt/local/include +sd_fftw3_init = env +sd_fftw3_ldflags = +sd_fftw3_libs = -L/opt/local/lib -lfftw3 -lfftw3f +sd_fftw3_ok = yes +sd_fftw3_options = optional skip +sd_fftw3_policy = skip +sd_fftw3_status = optional +sd_gpu_cflags = +sd_gpu_cppflags = +sd_gpu_cxxflags = +sd_gpu_enable = no +sd_gpu_enable_def = no +sd_gpu_fcflags = +sd_gpu_init = def +sd_gpu_ldflags = +sd_gpu_libs = +sd_gpu_ok = no +sd_gpu_options = optional warn +sd_gpu_policy = warn +sd_gpu_prefix = +sd_gpu_status = optional +sd_hdf5_cflags = +sd_hdf5_cppflags = -I/opt/local/include -I/opt/local/include +sd_hdf5_cxxflags = +sd_hdf5_enable = yes +sd_hdf5_enable_def = yes +sd_hdf5_enable_fc = no +sd_hdf5_fcflags = +sd_hdf5_h5cc = /opt/local/bin/h5cc +sd_hdf5_h5fc = +sd_hdf5_init = dir +sd_hdf5_ldflags = +sd_hdf5_libs = -L/opt/local/lib -L/opt/local/lib -lhdf5_hl -L/opt/local/lib -lhdf5 -lz -ldl -lm +sd_hdf5_ok = yes +sd_hdf5_options = required no-fortran warn +sd_hdf5_policy = warn +sd_hdf5_status = required +sd_kokkos_cppflags = +sd_kokkos_cxxflags = +sd_kokkos_enable = no +sd_kokkos_enable_def = no +sd_kokkos_init = def +sd_kokkos_ldflags = +sd_kokkos_libs = +sd_kokkos_ok = unknown +sd_kokkos_options = optional fail +sd_kokkos_policy = fail +sd_kokkos_status = optional +sd_levmar_cflags = +sd_levmar_cppflags = +sd_levmar_enable = no +sd_levmar_enable_def = no +sd_levmar_init = def +sd_levmar_ldflags = +sd_levmar_libs = +sd_levmar_ok = unknown +sd_levmar_options = optional fail +sd_levmar_policy = fail +sd_levmar_status = optional +sd_libpaw_cppflags = +sd_libpaw_enable = no +sd_libpaw_enable_def = no +sd_libpaw_fcflags = +sd_libpaw_init = def +sd_libpaw_ldflags = +sd_libpaw_libs = +sd_libpaw_ok = unknown +sd_libpaw_options = optional skip +sd_libpaw_policy = skip +sd_libpaw_status = optional +sd_libpsml_cppflags = +sd_libpsml_enable = no +sd_libpsml_enable_def = no +sd_libpsml_fcflags = +sd_libpsml_init = def +sd_libpsml_ldflags = +sd_libpsml_libs = +sd_libpsml_ok = unknown +sd_libpsml_options = optional warn +sd_libpsml_policy = warn +sd_libpsml_status = optional +sd_libxc_cflags = +sd_libxc_cppflags = -I/opt/local/include +sd_libxc_enable = yes +sd_libxc_enable_def = yes +sd_libxc_enable_fc = no +sd_libxc_fcflags = +sd_libxc_init = dir +sd_libxc_ldflags = +sd_libxc_libs = -L/opt/local/lib -lxc +sd_libxc_ok = yes +sd_libxc_options = required no-fortran warn +sd_libxc_policy = warn +sd_libxc_status = required +sd_linalg_cflags = +sd_linalg_choices = +sd_linalg_cppflags = +sd_linalg_cxxflags = +sd_linalg_enable = yes +sd_linalg_fcflags = -I/opt/local/include +sd_linalg_flavor = openblas +sd_linalg_has_elpa = no +sd_linalg_has_scalapack = no +sd_linalg_init = env +sd_linalg_ldflags = +sd_linalg_libs = -L/opt/local/lib -lopenblas +sd_linalg_ok = yes +sd_mpi_cc = /opt/local/bin/mpicc +sd_mpi_cflags = +sd_mpi_cppflags = -I/opt/local/include +sd_mpi_cxx = /opt/local/bin/mpicxx +sd_mpi_enable = yes +sd_mpi_enable_cxx = yes +sd_mpi_enable_def = auto +sd_mpi_enable_fc = yes +sd_mpi_fc = /opt/local/bin/mpif90 +sd_mpi_fcflags = -I/opt/local/include +sd_mpi_init = dir +sd_mpi_ldflags = +sd_mpi_libs = +sd_mpi_ok = yes +sd_mpi_options = auto optional fail +sd_mpi_policy = fail +sd_mpi_status = optional +sd_netcdf_cflags = +sd_netcdf_cppflags = -I/opt/local/include +sd_netcdf_enable = yes +sd_netcdf_enable_def = yes +sd_netcdf_fcflags = -I/opt/local/include +sd_netcdf_fortran_cflags = +sd_netcdf_fortran_cppflags = -I/opt/local/include +sd_netcdf_fortran_enable = yes +sd_netcdf_fortran_enable_def = yes +sd_netcdf_fortran_fcflags = -I/opt/local/include +sd_netcdf_fortran_init = dir +sd_netcdf_fortran_ldflags = +sd_netcdf_fortran_libs = -L/opt/local/lib -lnetcdff +sd_netcdf_fortran_ok = yes +sd_netcdf_fortran_options = required warn +sd_netcdf_fortran_policy = warn +sd_netcdf_fortran_status = required +sd_netcdf_init = dir +sd_netcdf_ldflags = +sd_netcdf_libs = -L/opt/local/lib -lnetcdf +sd_netcdf_ok = yes +sd_netcdf_options = required warn +sd_netcdf_policy = warn +sd_netcdf_status = required +sd_papi_cflags = +sd_papi_cppflags = +sd_papi_enable = no +sd_papi_enable_def = no +sd_papi_init = def +sd_papi_ldflags = +sd_papi_libs = +sd_papi_ok = unknown +sd_papi_options = optional fail +sd_papi_policy = fail +sd_papi_sd_papi_fcflags = +sd_papi_status = optional +sd_pfft_cflags = +sd_pfft_cppflags = +sd_pfft_enable = no +sd_pfft_enable_def = no +sd_pfft_init = def +sd_pfft_ldflags = +sd_pfft_libs = +sd_pfft_ok = unknown +sd_pfft_options = optional skip +sd_pfft_policy = skip +sd_pfft_status = optional +sd_sys_fcflags = +sd_triqs_cflags = +sd_triqs_cppflags = +sd_triqs_cxxflags = +sd_triqs_enable = no +sd_triqs_enable_def = no +sd_triqs_fcflags = +sd_triqs_init = def +sd_triqs_ldflags = +sd_triqs_libs = +sd_triqs_ok = unknown +sd_triqs_options = optional fail +sd_triqs_policy = fail +sd_triqs_status = optional +sd_wannier90_cppflags = +sd_wannier90_enable = yes +sd_wannier90_enable_def = no +sd_wannier90_fcflags = -I/opt/local/include +sd_wannier90_init = env +sd_wannier90_ldflags = +sd_wannier90_libs = -L/opt/local/lib -lwannier +sd_wannier90_ok = yes +sd_wannier90_options = optional warn +sd_wannier90_policy = warn +sd_wannier90_status = optional +sd_xmlf90_cppflags = +sd_xmlf90_enable = no +sd_xmlf90_enable_def = no +sd_xmlf90_fcflags = +sd_xmlf90_init = def +sd_xmlf90_ldflags = +sd_xmlf90_libs = +sd_xmlf90_ok = unknown +sd_xmlf90_options = optional warn +sd_xmlf90_policy = warn +sd_xmlf90_status = optional +sd_yakl_cppflags = +sd_yakl_enable = no +sd_yakl_enable_def = no +sd_yakl_fcflags = +sd_yakl_init = def +sd_yakl_ldflags = +sd_yakl_libs = +sd_yakl_ok = unknown +sd_yakl_options = optional fail +sd_yakl_policy = fail +sd_yakl_status = optional +sharedstatedir = ${prefix}/com +src_02_clib_fcflags = -I$(top_builddir)/shared/common/src/02_clib -I$(top_srcdir)/shared/common/src/02_clib +src_10_defs_fcflags = -I$(top_builddir)/shared/common/src/10_defs -I$(top_srcdir)/shared/common/src/10_defs +src_11_memory_mpi_fcflags = -I$(top_builddir)/shared/common/src/11_memory_mpi -I$(top_srcdir)/shared/common/src/11_memory_mpi +src_12_hide_mpi_fcflags = -I$(top_builddir)/shared/common/src/12_hide_mpi -I$(top_srcdir)/shared/common/src/12_hide_mpi +src_14_hidewrite_fcflags = -I$(top_builddir)/shared/common/src/14_hidewrite -I$(top_srcdir)/shared/common/src/14_hidewrite +src_16_hideleave_fcflags = -I$(top_builddir)/shared/common/src/16_hideleave -I$(top_srcdir)/shared/common/src/16_hideleave +src_16_kokkos_toolbox_fcflags = -I$(top_builddir)/shared/common/src/16_kokkos_toolbox -I$(top_srcdir)/shared/common/src/16_kokkos_toolbox +src_17_gpu_toolbox_fcflags = -I$(top_builddir)/shared/common/src/17_gpu_toolbox -I$(top_srcdir)/shared/common/src/17_gpu_toolbox +src_17_libtetra_ext_fcflags = -I$(top_builddir)/shared/common/src/17_libtetra_ext -I$(top_srcdir)/shared/common/src/17_libtetra_ext +src_17_minimax_fcflags = -I$(top_builddir)/shared/common/src/17_minimax -I$(top_srcdir)/shared/common/src/17_minimax +src_17_yaml_out_fcflags = -I$(top_builddir)/shared/common/src/17_yaml_out -I$(top_srcdir)/shared/common/src/17_yaml_out +src_18_timing_fcflags = -I$(top_builddir)/shared/common/src/18_timing -I$(top_srcdir)/shared/common/src/18_timing +src_21_hashfuncs_fcflags = -I$(top_builddir)/shared/common/src/21_hashfuncs -I$(top_srcdir)/shared/common/src/21_hashfuncs +src_27_toolbox_oop_fcflags = -I$(top_builddir)/shared/common/src/27_toolbox_oop -I$(top_srcdir)/shared/common/src/27_toolbox_oop +src_28_numeric_noabirule_fcflags = -I$(top_builddir)/shared/common/src/28_numeric_noabirule -I$(top_srcdir)/shared/common/src/28_numeric_noabirule +src_29_kpoints_fcflags = -I$(top_builddir)/shared/common/src/29_kpoints -I$(top_srcdir)/shared/common/src/29_kpoints +src_32_util_fcflags = -I$(top_builddir)/shared/common/src/32_util -I$(top_srcdir)/shared/common/src/32_util +src_33_xc_lowlevel_fcflags = -I$(top_builddir)/shared/common/src/33_xc_lowlevel -I$(top_srcdir)/shared/common/src/33_xc_lowlevel +src_39_libpaw_fcflags = -I$(top_builddir)/shared/libpaw/src -I$(top_srcdir)/shared/libpaw/src +src_41_geometry_fcflags = -I$(top_builddir)/src/41_geometry -I$(top_srcdir)/src/41_geometry +src_42_nlstrain_fcflags = -I$(top_builddir)/src/42_nlstrain -I$(top_srcdir)/src/42_nlstrain +src_42_parser_fcflags = -I$(top_builddir)/src/42_parser -I$(top_srcdir)/src/42_parser +src_43_ptgroups_fcflags = -I$(top_builddir)/src/43_ptgroups -I$(top_srcdir)/src/43_ptgroups +src_43_wvl_wrappers_fcflags = -I$(top_builddir)/src/43_wvl_wrappers -I$(top_srcdir)/src/43_wvl_wrappers +src_44_abitools_fcflags = -I$(top_builddir)/src/44_abitools -I$(top_srcdir)/src/44_abitools +src_44_abitypes_defs_fcflags = -I$(top_builddir)/src/44_abitypes_defs -I$(top_srcdir)/src/44_abitypes_defs +src_44_manage_kokkos_fcflags = -I$(top_builddir)/src/44_manage_kokkos -I$(top_srcdir)/src/44_manage_kokkos +src_45_geomoptim_fcflags = -I$(top_builddir)/src/45_geomoptim -I$(top_srcdir)/src/45_geomoptim +src_45_xgTools_fcflags = -I$(top_builddir)/src/45_xgTools -I$(top_srcdir)/src/45_xgTools +src_46_ghc_omp_fcflags = -I$(top_builddir)/src/46_ghc_omp -I$(top_srcdir)/src/46_ghc_omp +src_46_manage_cuda_fcflags = -I$(top_builddir)/src/46_manage_cuda -I$(top_srcdir)/src/46_manage_cuda +src_48_diago_fcflags = -I$(top_builddir)/src/48_diago -I$(top_srcdir)/src/48_diago +src_49_gw_toolbox_oop_fcflags = -I$(top_builddir)/src/49_gw_toolbox_oop -I$(top_srcdir)/src/49_gw_toolbox_oop +src_51_manage_mpi_fcflags = -I$(top_builddir)/src/51_manage_mpi -I$(top_srcdir)/src/51_manage_mpi +src_52_fft_mpi_noabirule_fcflags = -I$(top_builddir)/src/52_fft_mpi_noabirule -I$(top_srcdir)/src/52_fft_mpi_noabirule +src_53_ffts_fcflags = -I$(top_builddir)/src/53_ffts -I$(top_srcdir)/src/53_ffts +src_54_spacepar_fcflags = -I$(top_builddir)/src/54_spacepar -I$(top_srcdir)/src/54_spacepar +src_55_abiutil_fcflags = -I$(top_builddir)/src/55_abiutil -I$(top_srcdir)/src/55_abiutil +src_56_io_mpi_fcflags = -I$(top_builddir)/src/56_io_mpi -I$(top_srcdir)/src/56_io_mpi +src_56_mixing_fcflags = -I$(top_builddir)/src/56_mixing -I$(top_srcdir)/src/56_mixing +src_56_recipspace_fcflags = -I$(top_builddir)/src/56_recipspace -I$(top_srcdir)/src/56_recipspace +src_56_xc_fcflags = -I$(top_builddir)/src/56_xc -I$(top_srcdir)/src/56_xc +src_57_iopsp_parser_fcflags = -I$(top_builddir)/src/57_iopsp_parser -I$(top_srcdir)/src/57_iopsp_parser +src_57_iovars_fcflags = -I$(top_builddir)/src/57_iovars -I$(top_srcdir)/src/57_iovars +src_61_occeig_fcflags = -I$(top_builddir)/src/61_occeig -I$(top_srcdir)/src/61_occeig +src_62_cg_noabirule_fcflags = -I$(top_builddir)/src/62_cg_noabirule -I$(top_srcdir)/src/62_cg_noabirule +src_62_ctqmc_fcflags = -I$(top_builddir)/src/62_ctqmc -I$(top_srcdir)/src/62_ctqmc +src_62_iowfdenpot_fcflags = -I$(top_builddir)/src/62_iowfdenpot -I$(top_srcdir)/src/62_iowfdenpot +src_62_poisson_fcflags = -I$(top_builddir)/src/62_poisson -I$(top_srcdir)/src/62_poisson +src_62_wvl_wfs_fcflags = -I$(top_builddir)/src/62_wvl_wfs -I$(top_srcdir)/src/62_wvl_wfs +src_64_psp_fcflags = -I$(top_builddir)/src/64_psp -I$(top_srcdir)/src/64_psp +src_65_lotf_base_fcflags = -I$(top_builddir)/src/65_lotf_base -I$(top_srcdir)/src/65_lotf_base +src_65_paw_fcflags = -I$(top_builddir)/src/65_paw -I$(top_srcdir)/src/65_paw +src_66_nonlocal_fcflags = -I$(top_builddir)/src/66_nonlocal -I$(top_srcdir)/src/66_nonlocal +src_66_vdwxc_fcflags = -I$(top_builddir)/src/66_vdwxc -I$(top_srcdir)/src/66_vdwxc +src_66_wfs_fcflags = -I$(top_builddir)/src/66_wfs -I$(top_srcdir)/src/66_wfs +src_67_common_fcflags = -I$(top_builddir)/src/67_common -I$(top_srcdir)/src/67_common +src_67_python_invocation_ext_fcflags = -I$(top_builddir)/src/67_python_invocation_ext -I$(top_srcdir)/src/67_python_invocation_ext +src_67_triqs_ext_fcflags = -I$(top_builddir)/src/67_triqs_ext -I$(top_srcdir)/src/67_triqs_ext +src_68_dmft_fcflags = -I$(top_builddir)/src/68_dmft -I$(top_srcdir)/src/68_dmft +src_68_lotf_fcflags = -I$(top_builddir)/src/68_lotf -I$(top_srcdir)/src/68_lotf +src_68_recursion_fcflags = -I$(top_builddir)/src/68_recursion -I$(top_srcdir)/src/68_recursion +src_68_rsprc_fcflags = -I$(top_builddir)/src/68_rsprc -I$(top_srcdir)/src/68_rsprc +src_69_wfdesc_fcflags = -I$(top_builddir)/src/69_wfdesc -I$(top_srcdir)/src/69_wfdesc +src_70_gw_fcflags = -I$(top_builddir)/src/70_gw -I$(top_srcdir)/src/70_gw +src_71_bse_fcflags = -I$(top_builddir)/src/71_bse -I$(top_srcdir)/src/71_bse +src_71_wannier_fcflags = -I$(top_builddir)/src/71_wannier -I$(top_srcdir)/src/71_wannier +src_72_response_fcflags = -I$(top_builddir)/src/72_response -I$(top_srcdir)/src/72_response +src_77_ddb_fcflags = -I$(top_builddir)/src/77_ddb -I$(top_srcdir)/src/77_ddb +src_77_suscep_fcflags = -I$(top_builddir)/src/77_suscep -I$(top_srcdir)/src/77_suscep +src_78_effpot_fcflags = -I$(top_builddir)/src/78_effpot -I$(top_srcdir)/src/78_effpot +src_78_eph_fcflags = -I$(top_builddir)/src/78_eph -I$(top_srcdir)/src/78_eph +src_79_seqpar_mpi_fcflags = -I$(top_builddir)/src/79_seqpar_mpi -I$(top_srcdir)/src/79_seqpar_mpi +src_80_rttddft_fcflags = -I$(top_builddir)/src/80_rttddft -I$(top_srcdir)/src/80_rttddft +src_80_tdep_fcflags = -I$(top_builddir)/src/80_tdep -I$(top_srcdir)/src/80_tdep +src_94_scfcv_fcflags = -I$(top_builddir)/src/94_scfcv -I$(top_srcdir)/src/94_scfcv +src_95_drive_fcflags = -I$(top_builddir)/src/95_drive -I$(top_srcdir)/src/95_drive +src_common_fcflags = -I$(top_builddir)/shared/common/src/incs -I$(top_srcdir)/shared/common/src/incs -I$(top_builddir)/shared/common/src/mods -I$(top_srcdir)/shared/common/src/mods +src_core_fcflags = -I$(top_builddir)/src/incs -I$(top_srcdir)/src/incs -I$(top_builddir)/src/mods -I$(top_srcdir)/src/mods +src_libpaw_fcflags = -I$(top_builddir)/shared/libpaw/incs -I$(top_srcdir)/shared/libpaw/incs -I$(top_builddir)/shared/libpaw/mods -I$(top_srcdir)/shared/libpaw/mods +srcdir = . +sysconfdir = ${prefix}/etc +target = x86_64-apple-darwin18.7.0 +target_alias = +target_cpu = x86_64 +target_os = darwin18.7.0 +target_vendor = apple +top_build_prefix = ../../../ +top_builddir = ../../.. +top_srcdir = ../../.. +with_abinit_common = +with_bigdft = +with_config_file = +with_debug_flavor = +with_fallbacks = +with_fc_vendor = +with_fc_version = +with_fft_flavor = fftw3 +with_fftw3 = +with_gnu_ld = +with_gpu = +with_hdf5 = /opt/local +with_kokkos = +with_levmar = +with_libpaw = +with_libpsml = +with_libxc = /opt/local +with_libxml2 = +with_linalg_flavor = openblas +with_mpi = /opt/local +with_mpi_level = +with_netcdf = /opt/local +with_optim_flavor = +with_papi = +with_pfft = +with_triqs = +with_wannier90 = +with_xmlf90 = +with_yakl = +common_16_kokkos_toolbox = + +# Optional subdirectories +#common_16_kokkos_toolbox = 16_kokkos_toolbox +common_17_gpu_toolbox = +#common_17_gpu_toolbox = 17_gpu_toolbox + +# Registered subdirectories +SUBDIRS = \ + incs \ + mods \ + 02_clib \ + 10_defs \ + 11_memory_mpi \ + 12_hide_mpi \ + 14_hidewrite \ + 16_hideleave \ + $(common_16_kokkos_toolbox) \ + $(common_17_gpu_toolbox) \ + 17_libtetra_ext \ + 17_minimax \ + 17_yaml_out \ + 18_timing \ + 21_hashfuncs \ + 27_toolbox_oop \ + 28_numeric_noabirule \ + 29_kpoints \ + 32_util \ + 33_xc_lowlevel + +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu shared/common/src/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu shared/common/src/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +# This directory's subdirectories are mostly independent; you can cd +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic \ + maintainer-clean-local + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(am__recursive_targets) install-am install-strip + +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ + check-am clean clean-generic cscopelist-am ctags ctags-am \ + distclean distclean-generic distclean-tags distdir dvi dvi-am \ + html html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic maintainer-clean-local mostlyclean \ + mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am + +.PRECIOUS: Makefile + + +# ---------------------------------------------------------------------------- # + +# Enforce ABINIT Coding Style (the so-called ABIRULES) +# +# Note concerning abirules (as of 5.8.0) +# The order of config.h vs abi_common.h is not preserved. +# This should be corrected by hand. It is to be done, at present, +# in get_irredg, merge_kgirr, setshells, sigma +abirules: + @echo 'Reporting possible errors in the abirules procedure' >tmp-abirules.log + @$(PERL) ../developers/maintainers/abirules.pl -d 17_yaml_out >>tmp-abirules.log + @$(PERL) ../developers/maintainers/abirules.pl -d 29_kpoints >>tmp-abirules.log + @grep 'Error' tmp-abirules.log + +# ---------------------------------------------------------------------------- # + +# Help +help: + @cat $(top_srcdir)/doc/help_make/help_make_common.txt + +# ---------------------------------------------------------------------------- # + +# Creation of parent subroutines +parents: + $(PERL) $(top_srcdir)/developers/maintainers/parents.pl -s + rm -f *.old */*.old + +# ---------------------------------------------------------------------------- # + +# Thorough clean-up +maintainer-clean-local: + rm -f tmp-abirules.log + find . -name '*.old' -exec rm {} \; + find . -name '*.orig' -exec rm {} \; + find . -name '*.rej' -exec rm {} \; + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/GX-PAW/common/src/Makefile.am b/GX-PAW/common/src/Makefile.am new file mode 100644 index 00000000..a9fff0cb --- /dev/null +++ b/GX-PAW/common/src/Makefile.am @@ -0,0 +1,81 @@ +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-inter on 2024/03/16 21:07:39 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-inter script or its config file instead. +# + +# Optional subdirectories +if DO_BUILD_16_KOKKOS_TOOLBOX + common_16_kokkos_toolbox = 16_kokkos_toolbox +else + common_16_kokkos_toolbox = +endif +if DO_BUILD_17_GPU_TOOLBOX + common_17_gpu_toolbox = 17_gpu_toolbox +else + common_17_gpu_toolbox = +endif + +# Registered subdirectories +SUBDIRS = \ + incs \ + mods \ + 02_clib \ + 10_defs \ + 11_memory_mpi \ + 12_hide_mpi \ + 14_hidewrite \ + 16_hideleave \ + $(common_16_kokkos_toolbox) \ + $(common_17_gpu_toolbox) \ + 17_libtetra_ext \ + 17_minimax \ + 17_yaml_out \ + 18_timing \ + 21_hashfuncs \ + 27_toolbox_oop \ + 28_numeric_noabirule \ + 29_kpoints \ + 32_util \ + 33_xc_lowlevel + +# ---------------------------------------------------------------------------- # + +# Enforce ABINIT Coding Style (the so-called ABIRULES) +# +# Note concerning abirules (as of 5.8.0) +# The order of config.h vs abi_common.h is not preserved. +# This should be corrected by hand. It is to be done, at present, +# in get_irredg, merge_kgirr, setshells, sigma +abirules: + @echo 'Reporting possible errors in the abirules procedure' >tmp-abirules.log + @$(PERL) ../developers/maintainers/abirules.pl -d 17_yaml_out >>tmp-abirules.log + @$(PERL) ../developers/maintainers/abirules.pl -d 29_kpoints >>tmp-abirules.log + @grep 'Error' tmp-abirules.log + +# ---------------------------------------------------------------------------- # + +# Help +help: + @cat $(top_srcdir)/doc/help_make/help_make_common.txt + +# ---------------------------------------------------------------------------- # + +# Creation of parent subroutines +parents: + $(PERL) $(top_srcdir)/developers/maintainers/parents.pl -s + rm -f *.old */*.old + +# ---------------------------------------------------------------------------- # + +# Thorough clean-up +maintainer-clean-local: + rm -f tmp-abirules.log + find . -name '*.old' -exec rm {} \; + find . -name '*.orig' -exec rm {} \; + find . -name '*.rej' -exec rm {} \; diff --git a/GX-PAW/common/src/Makefile.in b/GX-PAW/common/src/Makefile.in new file mode 100644 index 00000000..b7af3aff --- /dev/null +++ b/GX-PAW/common/src/Makefile.in @@ -0,0 +1,1560 @@ +# Makefile.in generated by automake 1.16.3 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2020 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-inter on 2024/03/16 21:07:39 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-inter script or its config file instead. +# +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = shared/common/src +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/m4/arch-gpu.m4 \ + $(top_srcdir)/config/m4/arch-mpi.m4 \ + $(top_srcdir)/config/m4/auto-autotools.m4 \ + $(top_srcdir)/config/m4/auto-corelibs.m4 \ + $(top_srcdir)/config/m4/auto-debug.m4 \ + $(top_srcdir)/config/m4/auto-dirflags.m4 \ + $(top_srcdir)/config/m4/auto-env.m4 \ + $(top_srcdir)/config/m4/auto-hints.m4 \ + $(top_srcdir)/config/m4/auto-optim.m4 \ + $(top_srcdir)/config/m4/auto-options.m4 \ + $(top_srcdir)/config/m4/auto-output.m4 \ + $(top_srcdir)/config/m4/auto-triggers.m4 \ + $(top_srcdir)/config/m4/conf-atompaw.m4 \ + $(top_srcdir)/config/m4/conf-debug.m4 \ + $(top_srcdir)/config/m4/conf-fallbacks.m4 \ + $(top_srcdir)/config/m4/conf-files.m4 \ + $(top_srcdir)/config/m4/conf-init.m4 \ + $(top_srcdir)/config/m4/conf-openmp.m4 \ + $(top_srcdir)/config/m4/conf-optim.m4 \ + $(top_srcdir)/config/m4/lang-c++.m4 \ + $(top_srcdir)/config/m4/lang-c.m4 \ + $(top_srcdir)/config/m4/lang-fortran-import.m4 \ + $(top_srcdir)/config/m4/lang-fortran.m4 \ + $(top_srcdir)/config/m4/lang-python.m4 \ + $(top_srcdir)/config/m4/libxml2.m4 \ + $(top_srcdir)/config/m4/misc-display.m4 \ + $(top_srcdir)/config/m4/sd_abinit_common.m4 \ + $(top_srcdir)/config/m4/sd_arch_gpu.m4 \ + $(top_srcdir)/config/m4/sd_arch_mpi.m4 \ + $(top_srcdir)/config/m4/sd_bigdft.m4 \ + $(top_srcdir)/config/m4/sd_core.m4 \ + $(top_srcdir)/config/m4/sd_esl.m4 \ + $(top_srcdir)/config/m4/sd_fftw3.m4 \ + $(top_srcdir)/config/m4/sd_gpu_kokkos.m4 \ + $(top_srcdir)/config/m4/sd_gpu_yakl.m4 \ + $(top_srcdir)/config/m4/sd_io_hdf5.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf_fortran.m4 \ + $(top_srcdir)/config/m4/sd_levmar.m4 \ + $(top_srcdir)/config/m4/sd_libpaw.m4 \ + $(top_srcdir)/config/m4/sd_libpsml.m4 \ + $(top_srcdir)/config/m4/sd_libxc.m4 \ + $(top_srcdir)/config/m4/sd_math_fft.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_core.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_util.m4 \ + $(top_srcdir)/config/m4/sd_papi.m4 \ + $(top_srcdir)/config/m4/sd_pfft.m4 \ + $(top_srcdir)/config/m4/sd_triqs.m4 \ + $(top_srcdir)/config/m4/sd_wannier90.m4 \ + $(top_srcdir)/config/m4/sd_xmlf90.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + distdir distdir-am +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = incs mods 02_clib 10_defs 11_memory_mpi 12_hide_mpi \ + 14_hidewrite 16_hideleave 16_kokkos_toolbox 17_gpu_toolbox \ + 17_libtetra_ext 17_minimax 17_yaml_out 18_timing 21_hashfuncs \ + 27_toolbox_oop 28_numeric_noabirule 29_kpoints 32_util \ + 33_xc_lowlevel +am__DIST_COMMON = $(srcdir)/Makefile.in +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ABINIT_BINARY_PACKAGE = @ABINIT_BINARY_PACKAGE@ +ABINIT_COMMON_CPPFLAGS = @ABINIT_COMMON_CPPFLAGS@ +ABINIT_COMMON_FCFLAGS = @ABINIT_COMMON_FCFLAGS@ +ABINIT_COMMON_LDFLAGS = @ABINIT_COMMON_LDFLAGS@ +ABINIT_COMMON_LIBS = @ABINIT_COMMON_LIBS@ +ABINIT_TARGET = @ABINIT_TARGET@ +ABINIT_VERSION = @ABINIT_VERSION@ +ABINIT_VERSION_BASE = @ABINIT_VERSION_BASE@ +ABINIT_VERSION_BUILD = @ABINIT_VERSION_BUILD@ +ABINIT_VERSION_MAJOR = @ABINIT_VERSION_MAJOR@ +ABINIT_VERSION_MICRO = @ABINIT_VERSION_MICRO@ +ABINIT_VERSION_MINOR = @ABINIT_VERSION_MINOR@ +ABI_CPPFLAGS = @ABI_CPPFLAGS@ +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +ARFLAGS = @ARFLAGS@ +ARFLAGS_CMD = @ARFLAGS_CMD@ +ARFLAGS_DEBUG = @ARFLAGS_DEBUG@ +ARFLAGS_EXTRA = @ARFLAGS_EXTRA@ +ARFLAGS_HINTS = @ARFLAGS_HINTS@ +ARFLAGS_OPTIM = @ARFLAGS_OPTIM@ +ATOMPAW_BIN = @ATOMPAW_BIN@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BIGDFT_CPPFLAGS = @BIGDFT_CPPFLAGS@ +BIGDFT_FCFLAGS = @BIGDFT_FCFLAGS@ +BIGDFT_LDFLAGS = @BIGDFT_LDFLAGS@ +BIGDFT_LIBS = @BIGDFT_LIBS@ +BOURNE_SHELL = @BOURNE_SHELL@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CC_LDFLAGS = @CC_LDFLAGS@ +CC_LDFLAGS_DEBUG = @CC_LDFLAGS_DEBUG@ +CC_LDFLAGS_EXTRA = @CC_LDFLAGS_EXTRA@ +CC_LDFLAGS_GPU = @CC_LDFLAGS_GPU@ +CC_LDFLAGS_HINTS = @CC_LDFLAGS_HINTS@ +CC_LDFLAGS_OPTIM = @CC_LDFLAGS_OPTIM@ +CC_LIBS = @CC_LIBS@ +CC_LIBS_DEBUG = @CC_LIBS_DEBUG@ +CC_LIBS_EXTRA = @CC_LIBS_EXTRA@ +CC_LIBS_GPU = @CC_LIBS_GPU@ +CC_LIBS_HINTS = @CC_LIBS_HINTS@ +CC_LIBS_OPTIM = @CC_LIBS_OPTIM@ +CFLAGS = @CFLAGS@ +CFLAGS_DEBUG = @CFLAGS_DEBUG@ +CFLAGS_EXTRA = @CFLAGS_EXTRA@ +CFLAGS_GPU = @CFLAGS_GPU@ +CFLAGS_HINTS = @CFLAGS_HINTS@ +CFLAGS_OPTIM = @CFLAGS_OPTIM@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CPPFLAGS_DEBUG = @CPPFLAGS_DEBUG@ +CPPFLAGS_EXTRA = @CPPFLAGS_EXTRA@ +CPPFLAGS_GPU = @CPPFLAGS_GPU@ +CPPFLAGS_HINTS = @CPPFLAGS_HINTS@ +CPPFLAGS_HINTS_EXT = @CPPFLAGS_HINTS_EXT@ +CPPFLAGS_OPTIM = @CPPFLAGS_OPTIM@ +CXX = @CXX@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CXXFLAGS_DEBUG = @CXXFLAGS_DEBUG@ +CXXFLAGS_EXTRA = @CXXFLAGS_EXTRA@ +CXXFLAGS_GPU = @CXXFLAGS_GPU@ +CXXFLAGS_HINTS = @CXXFLAGS_HINTS@ +CXXFLAGS_OPTIM = @CXXFLAGS_OPTIM@ +CXX_LDFLAGS = @CXX_LDFLAGS@ +CXX_LDFLAGS_DEBUG = @CXX_LDFLAGS_DEBUG@ +CXX_LDFLAGS_EXTRA = @CXX_LDFLAGS_EXTRA@ +CXX_LDFLAGS_GPU = @CXX_LDFLAGS_GPU@ +CXX_LDFLAGS_HINTS = @CXX_LDFLAGS_HINTS@ +CXX_LDFLAGS_OPTIM = @CXX_LDFLAGS_OPTIM@ +CXX_LIBS = @CXX_LIBS@ +CXX_LIBS_DEBUG = @CXX_LIBS_DEBUG@ +CXX_LIBS_EXTRA = @CXX_LIBS_EXTRA@ +CXX_LIBS_GPU = @CXX_LIBS_GPU@ +CXX_LIBS_HINTS = @CXX_LIBS_HINTS@ +CXX_LIBS_OPTIM = @CXX_LIBS_OPTIM@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ +FCFLAGS = @FCFLAGS@ +FCFLAGS_DEBUG = @FCFLAGS_DEBUG@ +FCFLAGS_EXTRA = @FCFLAGS_EXTRA@ +FCFLAGS_F90 = @FCFLAGS_F90@ +FCFLAGS_FIXEDFORM = @FCFLAGS_FIXEDFORM@ +FCFLAGS_FREEFORM = @FCFLAGS_FREEFORM@ +FCFLAGS_HINTS = @FCFLAGS_HINTS@ +FCFLAGS_MODDIR = @FCFLAGS_MODDIR@ +FCFLAGS_OPENMP = @FCFLAGS_OPENMP@ +FCFLAGS_OPENMP_OFFLOAD = @FCFLAGS_OPENMP_OFFLOAD@ +FCFLAGS_OPTIM = @FCFLAGS_OPTIM@ +FCLIBS = @FCLIBS@ +FC_LDFLAGS = @FC_LDFLAGS@ +FC_LDFLAGS_DEBUG = @FC_LDFLAGS_DEBUG@ +FC_LDFLAGS_EXTRA = @FC_LDFLAGS_EXTRA@ +FC_LDFLAGS_HINTS = @FC_LDFLAGS_HINTS@ +FC_LDFLAGS_OPTIM = @FC_LDFLAGS_OPTIM@ +FC_LIBS = @FC_LIBS@ +FC_LIBS_DEBUG = @FC_LIBS_DEBUG@ +FC_LIBS_EXTRA = @FC_LIBS_EXTRA@ +FC_LIBS_HINTS = @FC_LIBS_HINTS@ +FC_LIBS_OPTIM = @FC_LIBS_OPTIM@ +FC_NOWRAP = @FC_NOWRAP@ +FFLAGS = @FFLAGS@ +FFTW3_CFLAGS = @FFTW3_CFLAGS@ +FFTW3_CPPFLAGS = @FFTW3_CPPFLAGS@ +FFTW3_FCFLAGS = @FFTW3_FCFLAGS@ +FFTW3_LDFLAGS = @FFTW3_LDFLAGS@ +FFTW3_LIBS = @FFTW3_LIBS@ +FFT_CFLAGS = @FFT_CFLAGS@ +FFT_FCFLAGS = @FFT_FCFLAGS@ +FPP = @FPP@ +FPPFLAGS = @FPPFLAGS@ +FPPFLAGS_DEBUG = @FPPFLAGS_DEBUG@ +FPPFLAGS_EXTRA = @FPPFLAGS_EXTRA@ +FPPFLAGS_HINTS = @FPPFLAGS_HINTS@ +FPPFLAGS_OPTIM = @FPPFLAGS_OPTIM@ +GPU_ARCH = @GPU_ARCH@ +GPU_CFLAGS = @GPU_CFLAGS@ +GPU_CPPFLAGS = @GPU_CPPFLAGS@ +GPU_CXXFLAGS = @GPU_CXXFLAGS@ +GPU_FCFLAGS = @GPU_FCFLAGS@ +GPU_LDFLAGS = @GPU_LDFLAGS@ +GPU_LIBS = @GPU_LIBS@ +GRAPHATOM_BIN = @GRAPHATOM_BIN@ +GREP = @GREP@ +H5CC = @H5CC@ +HDF5_CFLAGS = @HDF5_CFLAGS@ +HDF5_CPPFLAGS = @HDF5_CPPFLAGS@ +HDF5_CXXFLAGS = @HDF5_CXXFLAGS@ +HDF5_FCFLAGS = @HDF5_FCFLAGS@ +HDF5_LDFLAGS = @HDF5_LDFLAGS@ +HDF5_LIBS = @HDF5_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +LDFLAGS = @LDFLAGS@ +LEVMAR_CFLAGS = @LEVMAR_CFLAGS@ +LEVMAR_CPPFLAGS = @LEVMAR_CPPFLAGS@ +LEVMAR_LDFLAGS = @LEVMAR_LDFLAGS@ +LEVMAR_LIBS = @LEVMAR_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPAW_CPPFLAGS = @LIBPAW_CPPFLAGS@ +LIBPAW_FCFLAGS = @LIBPAW_FCFLAGS@ +LIBPAW_LDFLAGS = @LIBPAW_LDFLAGS@ +LIBPAW_LIBS = @LIBPAW_LIBS@ +LIBPSML_CPPFLAGS = @LIBPSML_CPPFLAGS@ +LIBPSML_FCFLAGS = @LIBPSML_FCFLAGS@ +LIBPSML_LDFLAGS = @LIBPSML_LDFLAGS@ +LIBPSML_LIBS = @LIBPSML_LIBS@ +LIBS = @LIBS@ +LIBXC_CFLAGS = @LIBXC_CFLAGS@ +LIBXC_CPPFLAGS = @LIBXC_CPPFLAGS@ +LIBXC_FCFLAGS = @LIBXC_FCFLAGS@ +LIBXC_LDFLAGS = @LIBXC_LDFLAGS@ +LIBXC_LIBS = @LIBXC_LIBS@ +LIBXML2_CPPFLAGS = @LIBXML2_CPPFLAGS@ +LIBXML2_FCFLAGS = @LIBXML2_FCFLAGS@ +LIBXML2_LIBS = @LIBXML2_LIBS@ +LINALG_CFLAGS = @LINALG_CFLAGS@ +LINALG_CPPFLAGS = @LINALG_CPPFLAGS@ +LINALG_CXXFLAGS = @LINALG_CXXFLAGS@ +LINALG_FCFLAGS = @LINALG_FCFLAGS@ +LINALG_LDFLAGS = @LINALG_LDFLAGS@ +LINALG_LIBS = @LINALG_LIBS@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODEXT = @MODEXT@ +MPI_CFLAGS = @MPI_CFLAGS@ +MPI_CPPFLAGS = @MPI_CPPFLAGS@ +MPI_CXXFLAGS = @MPI_CXXFLAGS@ +MPI_FCFLAGS = @MPI_FCFLAGS@ +MPI_LDFLAGS = @MPI_LDFLAGS@ +MPI_LIBS = @MPI_LIBS@ +MV = @MV@ +NETCDF_CFLAGS = @NETCDF_CFLAGS@ +NETCDF_CPPFLAGS = @NETCDF_CPPFLAGS@ +NETCDF_CXXFLAGS = @NETCDF_CXXFLAGS@ +NETCDF_FCFLAGS = @NETCDF_FCFLAGS@ +NETCDF_FORTRAN_CFLAGS = @NETCDF_FORTRAN_CFLAGS@ +NETCDF_FORTRAN_CPPFLAGS = @NETCDF_FORTRAN_CPPFLAGS@ +NETCDF_FORTRAN_CXXFLAGS = @NETCDF_FORTRAN_CXXFLAGS@ +NETCDF_FORTRAN_FCFLAGS = @NETCDF_FORTRAN_FCFLAGS@ +NETCDF_FORTRAN_LDFLAGS = @NETCDF_FORTRAN_LDFLAGS@ +NETCDF_FORTRAN_LIBS = @NETCDF_FORTRAN_LIBS@ +NETCDF_LDFLAGS = @NETCDF_LDFLAGS@ +NETCDF_LIBS = @NETCDF_LIBS@ +NVCC = @NVCC@ +NVCC_CFLAGS = @NVCC_CFLAGS@ +NVCC_CPPFLAGS = @NVCC_CPPFLAGS@ +NVCC_LDFLAGS = @NVCC_LDFLAGS@ +NVCC_LIBS = @NVCC_LIBS@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PAPI_CFLAGS = @PAPI_CFLAGS@ +PAPI_CPPFLAGS = @PAPI_CPPFLAGS@ +PAPI_LDFLAGS = @PAPI_LDFLAGS@ +PAPI_LIBS = @PAPI_LIBS@ +PATCH = @PATCH@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PFFT_CFLAGS = @PFFT_CFLAGS@ +PFFT_CPPFLAGS = @PFFT_CPPFLAGS@ +PFFT_LDFLAGS = @PFFT_LDFLAGS@ +PFFT_LIBS = @PFFT_LIBS@ +PYFLAGS = @PYFLAGS@ +PYTHON = @PYTHON@ +PYTHON_CONFIG = @PYTHON_CONFIG@ +PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ +RANLIB = @RANLIB@ +REALPATH = @REALPATH@ +RM = @RM@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +TAR = @TAR@ +TRIQS_CFLAGS = @TRIQS_CFLAGS@ +TRIQS_CPPFLAGS = @TRIQS_CPPFLAGS@ +TRIQS_CXXFLAGS = @TRIQS_CXXFLAGS@ +TRIQS_LDFLAGS = @TRIQS_LDFLAGS@ +TRIQS_LIBS = @TRIQS_LIBS@ +TRUE_CPP = @TRUE_CPP@ +VERSION = @VERSION@ +WANNIER90_CPPFLAGS = @WANNIER90_CPPFLAGS@ +WANNIER90_FCFLAGS = @WANNIER90_FCFLAGS@ +WANNIER90_LDFLAGS = @WANNIER90_LDFLAGS@ +WANNIER90_LIBS = @WANNIER90_LIBS@ +XML2_CONFIG = @XML2_CONFIG@ +XMLF90_CPPFLAGS = @XMLF90_CPPFLAGS@ +XMLF90_FCFLAGS = @XMLF90_FCFLAGS@ +XMLF90_LDFLAGS = @XMLF90_LDFLAGS@ +XMLF90_LIBS = @XMLF90_LIBS@ +XML_CPPFLAGS = @XML_CPPFLAGS@ +XML_LIBS = @XML_LIBS@ +XPP = @XPP@ +XPPFLAGS = @XPPFLAGS@ +XPPFLAGS_DEBUG = @XPPFLAGS_DEBUG@ +XPPFLAGS_EXTRA = @XPPFLAGS_EXTRA@ +XPPFLAGS_OPTIM = @XPPFLAGS_OPTIM@ +YAKL_CPPFLAGS = @YAKL_CPPFLAGS@ +YAKL_FCFLAGS = @YAKL_FCFLAGS@ +YAKL_LDFLAGS = @YAKL_LDFLAGS@ +YAKL_LIBS = @YAKL_LIBS@ +abi_ac_distcheck = @abi_ac_distcheck@ +abi_ac_version = @abi_ac_version@ +abi_am_version = @abi_am_version@ +abi_avx_safe_mode_enable = @abi_avx_safe_mode_enable@ +abi_bse_unpacked_enable = @abi_bse_unpacked_enable@ +abi_cc_path = @abi_cc_path@ +abi_cc_vendor = @abi_cc_vendor@ +abi_cc_version = @abi_cc_version@ +abi_cclock_enable = @abi_cclock_enable@ +abi_cpp_path = @abi_cpp_path@ +abi_cpu_64bits = @abi_cpu_64bits@ +abi_cpu_bits = @abi_cpu_bits@ +abi_cpu_model = @abi_cpu_model@ +abi_cpu_platform = @abi_cpu_platform@ +abi_cpu_spec = @abi_cpu_spec@ +abi_cpu_vendor = @abi_cpu_vendor@ +abi_crpa_optim_enable = @abi_crpa_optim_enable@ +abi_cxx_path = @abi_cxx_path@ +abi_cxx_vendor = @abi_cxx_vendor@ +abi_cxx_version = @abi_cxx_version@ +abi_debug_flavor = @abi_debug_flavor@ +abi_exports_enable = @abi_exports_enable@ +abi_fbk_abinit_common_ok = @abi_fbk_abinit_common_ok@ +abi_fbk_bigdft_ok = @abi_fbk_bigdft_ok@ +abi_fbk_config = @abi_fbk_config@ +abi_fbk_enable = @abi_fbk_enable@ +abi_fbk_fft_ok = @abi_fbk_fft_ok@ +abi_fbk_fftw3_ok = @abi_fbk_fftw3_ok@ +abi_fbk_gpu_ok = @abi_fbk_gpu_ok@ +abi_fbk_hdf5_ok = @abi_fbk_hdf5_ok@ +abi_fbk_init = @abi_fbk_init@ +abi_fbk_kokkos_ok = @abi_fbk_kokkos_ok@ +abi_fbk_levmar_ok = @abi_fbk_levmar_ok@ +abi_fbk_libpaw_ok = @abi_fbk_libpaw_ok@ +abi_fbk_libpsml_ok = @abi_fbk_libpsml_ok@ +abi_fbk_libxc_ok = @abi_fbk_libxc_ok@ +abi_fbk_libxml2_ok = @abi_fbk_libxml2_ok@ +abi_fbk_linalg_ok = @abi_fbk_linalg_ok@ +abi_fbk_list = @abi_fbk_list@ +abi_fbk_mpi_ok = @abi_fbk_mpi_ok@ +abi_fbk_netcdf_fortran_ok = @abi_fbk_netcdf_fortran_ok@ +abi_fbk_netcdf_ok = @abi_fbk_netcdf_ok@ +abi_fbk_papi_ok = @abi_fbk_papi_ok@ +abi_fbk_pfft_ok = @abi_fbk_pfft_ok@ +abi_fbk_prefix = @abi_fbk_prefix@ +abi_fbk_required = @abi_fbk_required@ +abi_fbk_triqs_ok = @abi_fbk_triqs_ok@ +abi_fbk_wannier90_ok = @abi_fbk_wannier90_ok@ +abi_fbk_xmlf90_ok = @abi_fbk_xmlf90_ok@ +abi_fbk_yakl_ok = @abi_fbk_yakl_ok@ +abi_fc_path = @abi_fc_path@ +abi_fc_vendor = @abi_fc_vendor@ +abi_fc_version = @abi_fc_version@ +abi_fc_wrap = @abi_fc_wrap@ +abi_fc_wrapper_enable = @abi_fc_wrapper_enable@ +abi_fpp_path = @abi_fpp_path@ +abi_gpu_arch = @abi_gpu_arch@ +abi_gpu_fcflags = @abi_gpu_fcflags@ +abi_gpu_flavor = @abi_gpu_flavor@ +abi_gpu_hip_libdir = @abi_gpu_hip_libdir@ +abi_gpu_incs = @abi_gpu_incs@ +abi_gpu_ldflags = @abi_gpu_ldflags@ +abi_gpu_libs = @abi_gpu_libs@ +abi_gpu_nvtx_v3 = @abi_gpu_nvtx_v3@ +abi_gpu_roctx = @abi_gpu_roctx@ +abi_gw_dpc_enable = @abi_gw_dpc_enable@ +abi_hints_enable = @abi_hints_enable@ +abi_libtetra_enable = @abi_libtetra_enable@ +abi_libxml2_cppflags = @abi_libxml2_cppflags@ +abi_libxml2_enable = @abi_libxml2_enable@ +abi_libxml2_fcflags = @abi_libxml2_fcflags@ +abi_libxml2_init = @abi_libxml2_init@ +abi_libxml2_ldflags = @abi_libxml2_ldflags@ +abi_libxml2_libs = @abi_libxml2_libs@ +abi_libxml2_ok = @abi_libxml2_ok@ +abi_libxml2_prefix = @abi_libxml2_prefix@ +abi_lotf_enable = @abi_lotf_enable@ +abi_lt_version = @abi_lt_version@ +abi_m4_version = @abi_m4_version@ +abi_memory_profiling_enable = @abi_memory_profiling_enable@ +abi_mpi_cflags = @abi_mpi_cflags@ +abi_mpi_cppflags = @abi_mpi_cppflags@ +abi_mpi_cxxflags = @abi_mpi_cxxflags@ +abi_mpi_enable = @abi_mpi_enable@ +abi_mpi_fcflags = @abi_mpi_fcflags@ +abi_mpi_flavor = @abi_mpi_flavor@ +abi_mpi_gpu_aware_enable = @abi_mpi_gpu_aware_enable@ +abi_mpi_incs = @abi_mpi_incs@ +abi_mpi_inplace_enable = @abi_mpi_inplace_enable@ +abi_mpi_interfaces_bugfix_enable = @abi_mpi_interfaces_bugfix_enable@ +abi_mpi_io_default_enable = @abi_mpi_io_default_enable@ +abi_mpi_io_enable = @abi_mpi_io_enable@ +abi_mpi_ldflags = @abi_mpi_ldflags@ +abi_mpi_level = @abi_mpi_level@ +abi_mpi_libs = @abi_mpi_libs@ +abi_netcdf_default_enable = @abi_netcdf_default_enable@ +abi_openmp_enable = @abi_openmp_enable@ +abi_openmp_offload_enable = @abi_openmp_offload_enable@ +abi_optim_flavor = @abi_optim_flavor@ +abi_python_invocation_enable = @abi_python_invocation_enable@ +abi_source_debug_enable = @abi_source_debug_enable@ +abi_stdin_enable = @abi_stdin_enable@ +abi_sys_spec = @abi_sys_spec@ +abi_timer_enable = @abi_timer_enable@ +abi_triqs_v1_4_enable = @abi_triqs_v1_4_enable@ +abi_triqs_v2_0_enable = @abi_triqs_v2_0_enable@ +abi_zdot_bugfix_enable = @abi_zdot_bugfix_enable@ +abinit_bindir = @abinit_bindir@ +abinit_builddir = @abinit_builddir@ +abinit_chkdir = @abinit_chkdir@ +abinit_datdir = @abinit_datdir@ +abinit_docdir = @abinit_docdir@ +abinit_incdir = @abinit_incdir@ +abinit_libdir = @abinit_libdir@ +abinit_mandir = @abinit_mandir@ +abinit_prefix = @abinit_prefix@ +abinit_srcdir = @abinit_srcdir@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_FC = @ac_ct_FC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cc_info_string = @cc_info_string@ +cxx_info_string = @cxx_info_string@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +enable_avx_safe_mode = @enable_avx_safe_mode@ +enable_bse_unpacked = @enable_bse_unpacked@ +enable_cclock = @enable_cclock@ +enable_crpa_optim = @enable_crpa_optim@ +enable_exports = @enable_exports@ +enable_fc_wrapper = @enable_fc_wrapper@ +enable_gw_dpc = @enable_gw_dpc@ +enable_hints = @enable_hints@ +enable_libtetra = @enable_libtetra@ +enable_lotf = @enable_lotf@ +enable_memory_profiling = @enable_memory_profiling@ +enable_mpi_gpu_aware = @enable_mpi_gpu_aware@ +enable_mpi_inplace = @enable_mpi_inplace@ +enable_mpi_interfaces_bugfix = @enable_mpi_interfaces_bugfix@ +enable_mpi_io = @enable_mpi_io@ +enable_mpi_io_default = @enable_mpi_io_default@ +enable_netcdf_default = @enable_netcdf_default@ +enable_openmp = @enable_openmp@ +enable_openmp_offload = @enable_openmp_offload@ +enable_python_invocation = @enable_python_invocation@ +enable_shared = @enable_shared@ +enable_source_debug = @enable_source_debug@ +enable_static = @enable_static@ +enable_stdin = @enable_stdin@ +enable_timer = @enable_timer@ +enable_triqs_v1_4 = @enable_triqs_v1_4@ +enable_triqs_v2_0 = @enable_triqs_v2_0@ +enable_zdot_bugfix = @enable_zdot_bugfix@ +exec_prefix = @exec_prefix@ +fc_info_string = @fc_info_string@ +fc_mod_fcflags = @fc_mod_fcflags@ +fc_timing = @fc_timing@ +fcflags_opt_02_clib = @fcflags_opt_02_clib@ +fcflags_opt_10_defs = @fcflags_opt_10_defs@ +fcflags_opt_11_memory_mpi = @fcflags_opt_11_memory_mpi@ +fcflags_opt_12_hide_mpi = @fcflags_opt_12_hide_mpi@ +fcflags_opt_14_hidewrite = @fcflags_opt_14_hidewrite@ +fcflags_opt_16_hideleave = @fcflags_opt_16_hideleave@ +fcflags_opt_16_kokkos_toolbox = @fcflags_opt_16_kokkos_toolbox@ +fcflags_opt_17_gpu_toolbox = @fcflags_opt_17_gpu_toolbox@ +fcflags_opt_17_libtetra_ext = @fcflags_opt_17_libtetra_ext@ +fcflags_opt_17_minimax = @fcflags_opt_17_minimax@ +fcflags_opt_17_yaml_out = @fcflags_opt_17_yaml_out@ +fcflags_opt_18_timing = @fcflags_opt_18_timing@ +fcflags_opt_21_hashfuncs = @fcflags_opt_21_hashfuncs@ +fcflags_opt_27_toolbox_oop = @fcflags_opt_27_toolbox_oop@ +fcflags_opt_28_numeric_noabirule = @fcflags_opt_28_numeric_noabirule@ +fcflags_opt_29_kpoints = @fcflags_opt_29_kpoints@ +fcflags_opt_32_util = @fcflags_opt_32_util@ +fcflags_opt_33_xc_lowlevel = @fcflags_opt_33_xc_lowlevel@ +fcflags_opt_39_libpaw = @fcflags_opt_39_libpaw@ +fcflags_opt_41_geometry = @fcflags_opt_41_geometry@ +fcflags_opt_42_nlstrain = @fcflags_opt_42_nlstrain@ +fcflags_opt_42_parser = @fcflags_opt_42_parser@ +fcflags_opt_43_ptgroups = @fcflags_opt_43_ptgroups@ +fcflags_opt_43_wvl_wrappers = @fcflags_opt_43_wvl_wrappers@ +fcflags_opt_44_abitools = @fcflags_opt_44_abitools@ +fcflags_opt_44_abitypes_defs = @fcflags_opt_44_abitypes_defs@ +fcflags_opt_44_manage_kokkos = @fcflags_opt_44_manage_kokkos@ +fcflags_opt_45_geomoptim = @fcflags_opt_45_geomoptim@ +fcflags_opt_45_xgTools = @fcflags_opt_45_xgTools@ +fcflags_opt_46_ghc_omp = @fcflags_opt_46_ghc_omp@ +fcflags_opt_46_manage_cuda = @fcflags_opt_46_manage_cuda@ +fcflags_opt_48_diago = @fcflags_opt_48_diago@ +fcflags_opt_49_gw_toolbox_oop = @fcflags_opt_49_gw_toolbox_oop@ +fcflags_opt_51_manage_mpi = @fcflags_opt_51_manage_mpi@ +fcflags_opt_52_fft_mpi_noabirule = @fcflags_opt_52_fft_mpi_noabirule@ +fcflags_opt_53_ffts = @fcflags_opt_53_ffts@ +fcflags_opt_54_spacepar = @fcflags_opt_54_spacepar@ +fcflags_opt_55_abiutil = @fcflags_opt_55_abiutil@ +fcflags_opt_56_io_mpi = @fcflags_opt_56_io_mpi@ +fcflags_opt_56_mixing = @fcflags_opt_56_mixing@ +fcflags_opt_56_recipspace = @fcflags_opt_56_recipspace@ +fcflags_opt_56_xc = @fcflags_opt_56_xc@ +fcflags_opt_57_iopsp_parser = @fcflags_opt_57_iopsp_parser@ +fcflags_opt_57_iovars = @fcflags_opt_57_iovars@ +fcflags_opt_61_occeig = @fcflags_opt_61_occeig@ +fcflags_opt_62_cg_noabirule = @fcflags_opt_62_cg_noabirule@ +fcflags_opt_62_ctqmc = @fcflags_opt_62_ctqmc@ +fcflags_opt_62_iowfdenpot = @fcflags_opt_62_iowfdenpot@ +fcflags_opt_62_poisson = @fcflags_opt_62_poisson@ +fcflags_opt_62_wvl_wfs = @fcflags_opt_62_wvl_wfs@ +fcflags_opt_64_psp = @fcflags_opt_64_psp@ +fcflags_opt_65_lotf_base = @fcflags_opt_65_lotf_base@ +fcflags_opt_65_paw = @fcflags_opt_65_paw@ +fcflags_opt_66_nonlocal = @fcflags_opt_66_nonlocal@ +fcflags_opt_66_vdwxc = @fcflags_opt_66_vdwxc@ +fcflags_opt_66_wfs = @fcflags_opt_66_wfs@ +fcflags_opt_67_common = @fcflags_opt_67_common@ +fcflags_opt_67_python_invocation_ext = @fcflags_opt_67_python_invocation_ext@ +fcflags_opt_67_triqs_ext = @fcflags_opt_67_triqs_ext@ +fcflags_opt_68_dmft = @fcflags_opt_68_dmft@ +fcflags_opt_68_lotf = @fcflags_opt_68_lotf@ +fcflags_opt_68_recursion = @fcflags_opt_68_recursion@ +fcflags_opt_68_rsprc = @fcflags_opt_68_rsprc@ +fcflags_opt_69_wfdesc = @fcflags_opt_69_wfdesc@ +fcflags_opt_70_gw = @fcflags_opt_70_gw@ +fcflags_opt_71_bse = @fcflags_opt_71_bse@ +fcflags_opt_71_wannier = @fcflags_opt_71_wannier@ +fcflags_opt_72_response = @fcflags_opt_72_response@ +fcflags_opt_77_ddb = @fcflags_opt_77_ddb@ +fcflags_opt_77_suscep = @fcflags_opt_77_suscep@ +fcflags_opt_78_effpot = @fcflags_opt_78_effpot@ +fcflags_opt_78_eph = @fcflags_opt_78_eph@ +fcflags_opt_79_seqpar_mpi = @fcflags_opt_79_seqpar_mpi@ +fcflags_opt_80_rttddft = @fcflags_opt_80_rttddft@ +fcflags_opt_80_tdep = @fcflags_opt_80_tdep@ +fcflags_opt_94_scfcv = @fcflags_opt_94_scfcv@ +fcflags_opt_95_drive = @fcflags_opt_95_drive@ +fcflags_opt_98_main = @fcflags_opt_98_main@ +fcflags_opt_bigdft = @fcflags_opt_bigdft@ +fcflags_opt_default = @fcflags_opt_default@ +fcflags_opt_hdf5 = @fcflags_opt_hdf5@ +fcflags_opt_levmar = @fcflags_opt_levmar@ +fcflags_opt_libpsml = @fcflags_opt_libpsml@ +fcflags_opt_libxc = @fcflags_opt_libxc@ +fcflags_opt_libxml2 = @fcflags_opt_libxml2@ +fcflags_opt_linalg = @fcflags_opt_linalg@ +fcflags_opt_netcdf = @fcflags_opt_netcdf@ +fcflags_opt_netcdf_fortran = @fcflags_opt_netcdf_fortran@ +fcflags_opt_papi = @fcflags_opt_papi@ +fcflags_opt_triqs = @fcflags_opt_triqs@ +fcflags_opt_wannier90 = @fcflags_opt_wannier90@ +fcflags_opt_xmlf90 = @fcflags_opt_xmlf90@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sd_abinit_common_cppflags = @sd_abinit_common_cppflags@ +sd_abinit_common_enable = @sd_abinit_common_enable@ +sd_abinit_common_enable_def = @sd_abinit_common_enable_def@ +sd_abinit_common_fcflags = @sd_abinit_common_fcflags@ +sd_abinit_common_init = @sd_abinit_common_init@ +sd_abinit_common_ldflags = @sd_abinit_common_ldflags@ +sd_abinit_common_libs = @sd_abinit_common_libs@ +sd_abinit_common_ok = @sd_abinit_common_ok@ +sd_abinit_common_options = @sd_abinit_common_options@ +sd_abinit_common_policy = @sd_abinit_common_policy@ +sd_abinit_common_status = @sd_abinit_common_status@ +sd_bigdft_cppflags = @sd_bigdft_cppflags@ +sd_bigdft_enable = @sd_bigdft_enable@ +sd_bigdft_enable_def = @sd_bigdft_enable_def@ +sd_bigdft_fcflags = @sd_bigdft_fcflags@ +sd_bigdft_init = @sd_bigdft_init@ +sd_bigdft_ldflags = @sd_bigdft_ldflags@ +sd_bigdft_libs = @sd_bigdft_libs@ +sd_bigdft_ok = @sd_bigdft_ok@ +sd_bigdft_options = @sd_bigdft_options@ +sd_bigdft_policy = @sd_bigdft_policy@ +sd_bigdft_status = @sd_bigdft_status@ +sd_fft_cflags = @sd_fft_cflags@ +sd_fft_choices = @sd_fft_choices@ +sd_fft_cppflags = @sd_fft_cppflags@ +sd_fft_cxxflags = @sd_fft_cxxflags@ +sd_fft_enable = @sd_fft_enable@ +sd_fft_fcflags = @sd_fft_fcflags@ +sd_fft_flavor = @sd_fft_flavor@ +sd_fft_init = @sd_fft_init@ +sd_fft_ldflags = @sd_fft_ldflags@ +sd_fft_libs = @sd_fft_libs@ +sd_fft_ok = @sd_fft_ok@ +sd_fftw3_cflags = @sd_fftw3_cflags@ +sd_fftw3_cppflags = @sd_fftw3_cppflags@ +sd_fftw3_enable = @sd_fftw3_enable@ +sd_fftw3_enable_def = @sd_fftw3_enable_def@ +sd_fftw3_fcflags = @sd_fftw3_fcflags@ +sd_fftw3_init = @sd_fftw3_init@ +sd_fftw3_ldflags = @sd_fftw3_ldflags@ +sd_fftw3_libs = @sd_fftw3_libs@ +sd_fftw3_ok = @sd_fftw3_ok@ +sd_fftw3_options = @sd_fftw3_options@ +sd_fftw3_policy = @sd_fftw3_policy@ +sd_fftw3_status = @sd_fftw3_status@ +sd_gpu_cflags = @sd_gpu_cflags@ +sd_gpu_cppflags = @sd_gpu_cppflags@ +sd_gpu_cxxflags = @sd_gpu_cxxflags@ +sd_gpu_enable = @sd_gpu_enable@ +sd_gpu_enable_def = @sd_gpu_enable_def@ +sd_gpu_fcflags = @sd_gpu_fcflags@ +sd_gpu_init = @sd_gpu_init@ +sd_gpu_ldflags = @sd_gpu_ldflags@ +sd_gpu_libs = @sd_gpu_libs@ +sd_gpu_ok = @sd_gpu_ok@ +sd_gpu_options = @sd_gpu_options@ +sd_gpu_policy = @sd_gpu_policy@ +sd_gpu_prefix = @sd_gpu_prefix@ +sd_gpu_status = @sd_gpu_status@ +sd_hdf5_cflags = @sd_hdf5_cflags@ +sd_hdf5_cppflags = @sd_hdf5_cppflags@ +sd_hdf5_cxxflags = @sd_hdf5_cxxflags@ +sd_hdf5_enable = @sd_hdf5_enable@ +sd_hdf5_enable_def = @sd_hdf5_enable_def@ +sd_hdf5_enable_fc = @sd_hdf5_enable_fc@ +sd_hdf5_fcflags = @sd_hdf5_fcflags@ +sd_hdf5_h5cc = @sd_hdf5_h5cc@ +sd_hdf5_h5fc = @sd_hdf5_h5fc@ +sd_hdf5_init = @sd_hdf5_init@ +sd_hdf5_ldflags = @sd_hdf5_ldflags@ +sd_hdf5_libs = @sd_hdf5_libs@ +sd_hdf5_ok = @sd_hdf5_ok@ +sd_hdf5_options = @sd_hdf5_options@ +sd_hdf5_policy = @sd_hdf5_policy@ +sd_hdf5_status = @sd_hdf5_status@ +sd_kokkos_cppflags = @sd_kokkos_cppflags@ +sd_kokkos_cxxflags = @sd_kokkos_cxxflags@ +sd_kokkos_enable = @sd_kokkos_enable@ +sd_kokkos_enable_def = @sd_kokkos_enable_def@ +sd_kokkos_init = @sd_kokkos_init@ +sd_kokkos_ldflags = @sd_kokkos_ldflags@ +sd_kokkos_libs = @sd_kokkos_libs@ +sd_kokkos_ok = @sd_kokkos_ok@ +sd_kokkos_options = @sd_kokkos_options@ +sd_kokkos_policy = @sd_kokkos_policy@ +sd_kokkos_status = @sd_kokkos_status@ +sd_levmar_cflags = @sd_levmar_cflags@ +sd_levmar_cppflags = @sd_levmar_cppflags@ +sd_levmar_enable = @sd_levmar_enable@ +sd_levmar_enable_def = @sd_levmar_enable_def@ +sd_levmar_init = @sd_levmar_init@ +sd_levmar_ldflags = @sd_levmar_ldflags@ +sd_levmar_libs = @sd_levmar_libs@ +sd_levmar_ok = @sd_levmar_ok@ +sd_levmar_options = @sd_levmar_options@ +sd_levmar_policy = @sd_levmar_policy@ +sd_levmar_status = @sd_levmar_status@ +sd_libpaw_cppflags = @sd_libpaw_cppflags@ +sd_libpaw_enable = @sd_libpaw_enable@ +sd_libpaw_enable_def = @sd_libpaw_enable_def@ +sd_libpaw_fcflags = @sd_libpaw_fcflags@ +sd_libpaw_init = @sd_libpaw_init@ +sd_libpaw_ldflags = @sd_libpaw_ldflags@ +sd_libpaw_libs = @sd_libpaw_libs@ +sd_libpaw_ok = @sd_libpaw_ok@ +sd_libpaw_options = @sd_libpaw_options@ +sd_libpaw_policy = @sd_libpaw_policy@ +sd_libpaw_status = @sd_libpaw_status@ +sd_libpsml_cppflags = @sd_libpsml_cppflags@ +sd_libpsml_enable = @sd_libpsml_enable@ +sd_libpsml_enable_def = @sd_libpsml_enable_def@ +sd_libpsml_fcflags = @sd_libpsml_fcflags@ +sd_libpsml_init = @sd_libpsml_init@ +sd_libpsml_ldflags = @sd_libpsml_ldflags@ +sd_libpsml_libs = @sd_libpsml_libs@ +sd_libpsml_ok = @sd_libpsml_ok@ +sd_libpsml_options = @sd_libpsml_options@ +sd_libpsml_policy = @sd_libpsml_policy@ +sd_libpsml_status = @sd_libpsml_status@ +sd_libxc_cflags = @sd_libxc_cflags@ +sd_libxc_cppflags = @sd_libxc_cppflags@ +sd_libxc_enable = @sd_libxc_enable@ +sd_libxc_enable_def = @sd_libxc_enable_def@ +sd_libxc_enable_fc = @sd_libxc_enable_fc@ +sd_libxc_fcflags = @sd_libxc_fcflags@ +sd_libxc_init = @sd_libxc_init@ +sd_libxc_ldflags = @sd_libxc_ldflags@ +sd_libxc_libs = @sd_libxc_libs@ +sd_libxc_ok = @sd_libxc_ok@ +sd_libxc_options = @sd_libxc_options@ +sd_libxc_policy = @sd_libxc_policy@ +sd_libxc_status = @sd_libxc_status@ +sd_linalg_cflags = @sd_linalg_cflags@ +sd_linalg_choices = @sd_linalg_choices@ +sd_linalg_cppflags = @sd_linalg_cppflags@ +sd_linalg_cxxflags = @sd_linalg_cxxflags@ +sd_linalg_enable = @sd_linalg_enable@ +sd_linalg_fcflags = @sd_linalg_fcflags@ +sd_linalg_flavor = @sd_linalg_flavor@ +sd_linalg_has_elpa = @sd_linalg_has_elpa@ +sd_linalg_has_scalapack = @sd_linalg_has_scalapack@ +sd_linalg_init = @sd_linalg_init@ +sd_linalg_ldflags = @sd_linalg_ldflags@ +sd_linalg_libs = @sd_linalg_libs@ +sd_linalg_ok = @sd_linalg_ok@ +sd_mpi_cc = @sd_mpi_cc@ +sd_mpi_cflags = @sd_mpi_cflags@ +sd_mpi_cppflags = @sd_mpi_cppflags@ +sd_mpi_cxx = @sd_mpi_cxx@ +sd_mpi_enable = @sd_mpi_enable@ +sd_mpi_enable_cxx = @sd_mpi_enable_cxx@ +sd_mpi_enable_def = @sd_mpi_enable_def@ +sd_mpi_enable_fc = @sd_mpi_enable_fc@ +sd_mpi_fc = @sd_mpi_fc@ +sd_mpi_fcflags = @sd_mpi_fcflags@ +sd_mpi_init = @sd_mpi_init@ +sd_mpi_ldflags = @sd_mpi_ldflags@ +sd_mpi_libs = @sd_mpi_libs@ +sd_mpi_ok = @sd_mpi_ok@ +sd_mpi_options = @sd_mpi_options@ +sd_mpi_policy = @sd_mpi_policy@ +sd_mpi_status = @sd_mpi_status@ +sd_netcdf_cflags = @sd_netcdf_cflags@ +sd_netcdf_cppflags = @sd_netcdf_cppflags@ +sd_netcdf_enable = @sd_netcdf_enable@ +sd_netcdf_enable_def = @sd_netcdf_enable_def@ +sd_netcdf_fcflags = @sd_netcdf_fcflags@ +sd_netcdf_fortran_cflags = @sd_netcdf_fortran_cflags@ +sd_netcdf_fortran_cppflags = @sd_netcdf_fortran_cppflags@ +sd_netcdf_fortran_enable = @sd_netcdf_fortran_enable@ +sd_netcdf_fortran_enable_def = @sd_netcdf_fortran_enable_def@ +sd_netcdf_fortran_fcflags = @sd_netcdf_fortran_fcflags@ +sd_netcdf_fortran_init = @sd_netcdf_fortran_init@ +sd_netcdf_fortran_ldflags = @sd_netcdf_fortran_ldflags@ +sd_netcdf_fortran_libs = @sd_netcdf_fortran_libs@ +sd_netcdf_fortran_ok = @sd_netcdf_fortran_ok@ +sd_netcdf_fortran_options = @sd_netcdf_fortran_options@ +sd_netcdf_fortran_policy = @sd_netcdf_fortran_policy@ +sd_netcdf_fortran_status = @sd_netcdf_fortran_status@ +sd_netcdf_init = @sd_netcdf_init@ +sd_netcdf_ldflags = @sd_netcdf_ldflags@ +sd_netcdf_libs = @sd_netcdf_libs@ +sd_netcdf_ok = @sd_netcdf_ok@ +sd_netcdf_options = @sd_netcdf_options@ +sd_netcdf_policy = @sd_netcdf_policy@ +sd_netcdf_status = @sd_netcdf_status@ +sd_papi_cflags = @sd_papi_cflags@ +sd_papi_cppflags = @sd_papi_cppflags@ +sd_papi_enable = @sd_papi_enable@ +sd_papi_enable_def = @sd_papi_enable_def@ +sd_papi_init = @sd_papi_init@ +sd_papi_ldflags = @sd_papi_ldflags@ +sd_papi_libs = @sd_papi_libs@ +sd_papi_ok = @sd_papi_ok@ +sd_papi_options = @sd_papi_options@ +sd_papi_policy = @sd_papi_policy@ +sd_papi_sd_papi_fcflags = @sd_papi_sd_papi_fcflags@ +sd_papi_status = @sd_papi_status@ +sd_pfft_cflags = @sd_pfft_cflags@ +sd_pfft_cppflags = @sd_pfft_cppflags@ +sd_pfft_enable = @sd_pfft_enable@ +sd_pfft_enable_def = @sd_pfft_enable_def@ +sd_pfft_init = @sd_pfft_init@ +sd_pfft_ldflags = @sd_pfft_ldflags@ +sd_pfft_libs = @sd_pfft_libs@ +sd_pfft_ok = @sd_pfft_ok@ +sd_pfft_options = @sd_pfft_options@ +sd_pfft_policy = @sd_pfft_policy@ +sd_pfft_status = @sd_pfft_status@ +sd_sys_fcflags = @sd_sys_fcflags@ +sd_triqs_cflags = @sd_triqs_cflags@ +sd_triqs_cppflags = @sd_triqs_cppflags@ +sd_triqs_cxxflags = @sd_triqs_cxxflags@ +sd_triqs_enable = @sd_triqs_enable@ +sd_triqs_enable_def = @sd_triqs_enable_def@ +sd_triqs_fcflags = @sd_triqs_fcflags@ +sd_triqs_init = @sd_triqs_init@ +sd_triqs_ldflags = @sd_triqs_ldflags@ +sd_triqs_libs = @sd_triqs_libs@ +sd_triqs_ok = @sd_triqs_ok@ +sd_triqs_options = @sd_triqs_options@ +sd_triqs_policy = @sd_triqs_policy@ +sd_triqs_status = @sd_triqs_status@ +sd_wannier90_cppflags = @sd_wannier90_cppflags@ +sd_wannier90_enable = @sd_wannier90_enable@ +sd_wannier90_enable_def = @sd_wannier90_enable_def@ +sd_wannier90_fcflags = @sd_wannier90_fcflags@ +sd_wannier90_init = @sd_wannier90_init@ +sd_wannier90_ldflags = @sd_wannier90_ldflags@ +sd_wannier90_libs = @sd_wannier90_libs@ +sd_wannier90_ok = @sd_wannier90_ok@ +sd_wannier90_options = @sd_wannier90_options@ +sd_wannier90_policy = @sd_wannier90_policy@ +sd_wannier90_status = @sd_wannier90_status@ +sd_xmlf90_cppflags = @sd_xmlf90_cppflags@ +sd_xmlf90_enable = @sd_xmlf90_enable@ +sd_xmlf90_enable_def = @sd_xmlf90_enable_def@ +sd_xmlf90_fcflags = @sd_xmlf90_fcflags@ +sd_xmlf90_init = @sd_xmlf90_init@ +sd_xmlf90_ldflags = @sd_xmlf90_ldflags@ +sd_xmlf90_libs = @sd_xmlf90_libs@ +sd_xmlf90_ok = @sd_xmlf90_ok@ +sd_xmlf90_options = @sd_xmlf90_options@ +sd_xmlf90_policy = @sd_xmlf90_policy@ +sd_xmlf90_status = @sd_xmlf90_status@ +sd_yakl_cppflags = @sd_yakl_cppflags@ +sd_yakl_enable = @sd_yakl_enable@ +sd_yakl_enable_def = @sd_yakl_enable_def@ +sd_yakl_fcflags = @sd_yakl_fcflags@ +sd_yakl_init = @sd_yakl_init@ +sd_yakl_ldflags = @sd_yakl_ldflags@ +sd_yakl_libs = @sd_yakl_libs@ +sd_yakl_ok = @sd_yakl_ok@ +sd_yakl_options = @sd_yakl_options@ +sd_yakl_policy = @sd_yakl_policy@ +sd_yakl_status = @sd_yakl_status@ +sharedstatedir = @sharedstatedir@ +src_02_clib_fcflags = @src_02_clib_fcflags@ +src_10_defs_fcflags = @src_10_defs_fcflags@ +src_11_memory_mpi_fcflags = @src_11_memory_mpi_fcflags@ +src_12_hide_mpi_fcflags = @src_12_hide_mpi_fcflags@ +src_14_hidewrite_fcflags = @src_14_hidewrite_fcflags@ +src_16_hideleave_fcflags = @src_16_hideleave_fcflags@ +src_16_kokkos_toolbox_fcflags = @src_16_kokkos_toolbox_fcflags@ +src_17_gpu_toolbox_fcflags = @src_17_gpu_toolbox_fcflags@ +src_17_libtetra_ext_fcflags = @src_17_libtetra_ext_fcflags@ +src_17_minimax_fcflags = @src_17_minimax_fcflags@ +src_17_yaml_out_fcflags = @src_17_yaml_out_fcflags@ +src_18_timing_fcflags = @src_18_timing_fcflags@ +src_21_hashfuncs_fcflags = @src_21_hashfuncs_fcflags@ +src_27_toolbox_oop_fcflags = @src_27_toolbox_oop_fcflags@ +src_28_numeric_noabirule_fcflags = @src_28_numeric_noabirule_fcflags@ +src_29_kpoints_fcflags = @src_29_kpoints_fcflags@ +src_32_util_fcflags = @src_32_util_fcflags@ +src_33_xc_lowlevel_fcflags = @src_33_xc_lowlevel_fcflags@ +src_39_libpaw_fcflags = @src_39_libpaw_fcflags@ +src_41_geometry_fcflags = @src_41_geometry_fcflags@ +src_42_nlstrain_fcflags = @src_42_nlstrain_fcflags@ +src_42_parser_fcflags = @src_42_parser_fcflags@ +src_43_ptgroups_fcflags = @src_43_ptgroups_fcflags@ +src_43_wvl_wrappers_fcflags = @src_43_wvl_wrappers_fcflags@ +src_44_abitools_fcflags = @src_44_abitools_fcflags@ +src_44_abitypes_defs_fcflags = @src_44_abitypes_defs_fcflags@ +src_44_manage_kokkos_fcflags = @src_44_manage_kokkos_fcflags@ +src_45_geomoptim_fcflags = @src_45_geomoptim_fcflags@ +src_45_xgTools_fcflags = @src_45_xgTools_fcflags@ +src_46_ghc_omp_fcflags = @src_46_ghc_omp_fcflags@ +src_46_manage_cuda_fcflags = @src_46_manage_cuda_fcflags@ +src_48_diago_fcflags = @src_48_diago_fcflags@ +src_49_gw_toolbox_oop_fcflags = @src_49_gw_toolbox_oop_fcflags@ +src_51_manage_mpi_fcflags = @src_51_manage_mpi_fcflags@ +src_52_fft_mpi_noabirule_fcflags = @src_52_fft_mpi_noabirule_fcflags@ +src_53_ffts_fcflags = @src_53_ffts_fcflags@ +src_54_spacepar_fcflags = @src_54_spacepar_fcflags@ +src_55_abiutil_fcflags = @src_55_abiutil_fcflags@ +src_56_io_mpi_fcflags = @src_56_io_mpi_fcflags@ +src_56_mixing_fcflags = @src_56_mixing_fcflags@ +src_56_recipspace_fcflags = @src_56_recipspace_fcflags@ +src_56_xc_fcflags = @src_56_xc_fcflags@ +src_57_iopsp_parser_fcflags = @src_57_iopsp_parser_fcflags@ +src_57_iovars_fcflags = @src_57_iovars_fcflags@ +src_61_occeig_fcflags = @src_61_occeig_fcflags@ +src_62_cg_noabirule_fcflags = @src_62_cg_noabirule_fcflags@ +src_62_ctqmc_fcflags = @src_62_ctqmc_fcflags@ +src_62_iowfdenpot_fcflags = @src_62_iowfdenpot_fcflags@ +src_62_poisson_fcflags = @src_62_poisson_fcflags@ +src_62_wvl_wfs_fcflags = @src_62_wvl_wfs_fcflags@ +src_64_psp_fcflags = @src_64_psp_fcflags@ +src_65_lotf_base_fcflags = @src_65_lotf_base_fcflags@ +src_65_paw_fcflags = @src_65_paw_fcflags@ +src_66_nonlocal_fcflags = @src_66_nonlocal_fcflags@ +src_66_vdwxc_fcflags = @src_66_vdwxc_fcflags@ +src_66_wfs_fcflags = @src_66_wfs_fcflags@ +src_67_common_fcflags = @src_67_common_fcflags@ +src_67_python_invocation_ext_fcflags = @src_67_python_invocation_ext_fcflags@ +src_67_triqs_ext_fcflags = @src_67_triqs_ext_fcflags@ +src_68_dmft_fcflags = @src_68_dmft_fcflags@ +src_68_lotf_fcflags = @src_68_lotf_fcflags@ +src_68_recursion_fcflags = @src_68_recursion_fcflags@ +src_68_rsprc_fcflags = @src_68_rsprc_fcflags@ +src_69_wfdesc_fcflags = @src_69_wfdesc_fcflags@ +src_70_gw_fcflags = @src_70_gw_fcflags@ +src_71_bse_fcflags = @src_71_bse_fcflags@ +src_71_wannier_fcflags = @src_71_wannier_fcflags@ +src_72_response_fcflags = @src_72_response_fcflags@ +src_77_ddb_fcflags = @src_77_ddb_fcflags@ +src_77_suscep_fcflags = @src_77_suscep_fcflags@ +src_78_effpot_fcflags = @src_78_effpot_fcflags@ +src_78_eph_fcflags = @src_78_eph_fcflags@ +src_79_seqpar_mpi_fcflags = @src_79_seqpar_mpi_fcflags@ +src_80_rttddft_fcflags = @src_80_rttddft_fcflags@ +src_80_tdep_fcflags = @src_80_tdep_fcflags@ +src_94_scfcv_fcflags = @src_94_scfcv_fcflags@ +src_95_drive_fcflags = @src_95_drive_fcflags@ +src_common_fcflags = @src_common_fcflags@ +src_core_fcflags = @src_core_fcflags@ +src_libpaw_fcflags = @src_libpaw_fcflags@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +with_abinit_common = @with_abinit_common@ +with_bigdft = @with_bigdft@ +with_config_file = @with_config_file@ +with_debug_flavor = @with_debug_flavor@ +with_fallbacks = @with_fallbacks@ +with_fc_vendor = @with_fc_vendor@ +with_fc_version = @with_fc_version@ +with_fft_flavor = @with_fft_flavor@ +with_fftw3 = @with_fftw3@ +with_gnu_ld = @with_gnu_ld@ +with_gpu = @with_gpu@ +with_hdf5 = @with_hdf5@ +with_kokkos = @with_kokkos@ +with_levmar = @with_levmar@ +with_libpaw = @with_libpaw@ +with_libpsml = @with_libpsml@ +with_libxc = @with_libxc@ +with_libxml2 = @with_libxml2@ +with_linalg_flavor = @with_linalg_flavor@ +with_mpi = @with_mpi@ +with_mpi_level = @with_mpi_level@ +with_netcdf = @with_netcdf@ +with_optim_flavor = @with_optim_flavor@ +with_papi = @with_papi@ +with_pfft = @with_pfft@ +with_triqs = @with_triqs@ +with_wannier90 = @with_wannier90@ +with_xmlf90 = @with_xmlf90@ +with_yakl = @with_yakl@ +@DO_BUILD_16_KOKKOS_TOOLBOX_FALSE@common_16_kokkos_toolbox = + +# Optional subdirectories +@DO_BUILD_16_KOKKOS_TOOLBOX_TRUE@common_16_kokkos_toolbox = 16_kokkos_toolbox +@DO_BUILD_17_GPU_TOOLBOX_FALSE@common_17_gpu_toolbox = +@DO_BUILD_17_GPU_TOOLBOX_TRUE@common_17_gpu_toolbox = 17_gpu_toolbox + +# Registered subdirectories +SUBDIRS = \ + incs \ + mods \ + 02_clib \ + 10_defs \ + 11_memory_mpi \ + 12_hide_mpi \ + 14_hidewrite \ + 16_hideleave \ + $(common_16_kokkos_toolbox) \ + $(common_17_gpu_toolbox) \ + 17_libtetra_ext \ + 17_minimax \ + 17_yaml_out \ + 18_timing \ + 21_hashfuncs \ + 27_toolbox_oop \ + 28_numeric_noabirule \ + 29_kpoints \ + 32_util \ + 33_xc_lowlevel + +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu shared/common/src/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu shared/common/src/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +# This directory's subdirectories are mostly independent; you can cd +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic \ + maintainer-clean-local + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(am__recursive_targets) install-am install-strip + +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ + check-am clean clean-generic cscopelist-am ctags ctags-am \ + distclean distclean-generic distclean-tags distdir dvi dvi-am \ + html html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic maintainer-clean-local mostlyclean \ + mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am + +.PRECIOUS: Makefile + + +# ---------------------------------------------------------------------------- # + +# Enforce ABINIT Coding Style (the so-called ABIRULES) +# +# Note concerning abirules (as of 5.8.0) +# The order of config.h vs abi_common.h is not preserved. +# This should be corrected by hand. It is to be done, at present, +# in get_irredg, merge_kgirr, setshells, sigma +abirules: + @echo 'Reporting possible errors in the abirules procedure' >tmp-abirules.log + @$(PERL) ../developers/maintainers/abirules.pl -d 17_yaml_out >>tmp-abirules.log + @$(PERL) ../developers/maintainers/abirules.pl -d 29_kpoints >>tmp-abirules.log + @grep 'Error' tmp-abirules.log + +# ---------------------------------------------------------------------------- # + +# Help +help: + @cat $(top_srcdir)/doc/help_make/help_make_common.txt + +# ---------------------------------------------------------------------------- # + +# Creation of parent subroutines +parents: + $(PERL) $(top_srcdir)/developers/maintainers/parents.pl -s + rm -f *.old */*.old + +# ---------------------------------------------------------------------------- # + +# Thorough clean-up +maintainer-clean-local: + rm -f tmp-abirules.log + find . -name '*.old' -exec rm {} \; + find . -name '*.orig' -exec rm {} \; + find . -name '*.rej' -exec rm {} \; + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/GX-PAW/common/src/incs/Makefile b/GX-PAW/common/src/incs/Makefile new file mode 100644 index 00000000..0c7a20eb --- /dev/null +++ b/GX-PAW/common/src/incs/Makefile @@ -0,0 +1,1317 @@ +# Makefile.in generated by automake 1.16.3 from Makefile.am. +# shared/common/src/incs/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994-2020 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-inter on 2024/03/16 21:07:39 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-inter script or its config file instead. +# + +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/abinit +pkgincludedir = $(includedir)/abinit +pkglibdir = $(libdir)/abinit +pkglibexecdir = $(libexecdir)/abinit +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = x86_64-apple-darwin18.7.0 +host_triplet = x86_64-apple-darwin18.7.0 +target_triplet = x86_64-apple-darwin18.7.0 +subdir = shared/common/src/incs +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/m4/arch-gpu.m4 \ + $(top_srcdir)/config/m4/arch-mpi.m4 \ + $(top_srcdir)/config/m4/auto-autotools.m4 \ + $(top_srcdir)/config/m4/auto-corelibs.m4 \ + $(top_srcdir)/config/m4/auto-debug.m4 \ + $(top_srcdir)/config/m4/auto-dirflags.m4 \ + $(top_srcdir)/config/m4/auto-env.m4 \ + $(top_srcdir)/config/m4/auto-hints.m4 \ + $(top_srcdir)/config/m4/auto-optim.m4 \ + $(top_srcdir)/config/m4/auto-options.m4 \ + $(top_srcdir)/config/m4/auto-output.m4 \ + $(top_srcdir)/config/m4/auto-triggers.m4 \ + $(top_srcdir)/config/m4/conf-atompaw.m4 \ + $(top_srcdir)/config/m4/conf-debug.m4 \ + $(top_srcdir)/config/m4/conf-fallbacks.m4 \ + $(top_srcdir)/config/m4/conf-files.m4 \ + $(top_srcdir)/config/m4/conf-init.m4 \ + $(top_srcdir)/config/m4/conf-openmp.m4 \ + $(top_srcdir)/config/m4/conf-optim.m4 \ + $(top_srcdir)/config/m4/lang-c++.m4 \ + $(top_srcdir)/config/m4/lang-c.m4 \ + $(top_srcdir)/config/m4/lang-fortran-import.m4 \ + $(top_srcdir)/config/m4/lang-fortran.m4 \ + $(top_srcdir)/config/m4/lang-python.m4 \ + $(top_srcdir)/config/m4/libxml2.m4 \ + $(top_srcdir)/config/m4/misc-display.m4 \ + $(top_srcdir)/config/m4/sd_abinit_common.m4 \ + $(top_srcdir)/config/m4/sd_arch_gpu.m4 \ + $(top_srcdir)/config/m4/sd_arch_mpi.m4 \ + $(top_srcdir)/config/m4/sd_bigdft.m4 \ + $(top_srcdir)/config/m4/sd_core.m4 \ + $(top_srcdir)/config/m4/sd_esl.m4 \ + $(top_srcdir)/config/m4/sd_fftw3.m4 \ + $(top_srcdir)/config/m4/sd_gpu_kokkos.m4 \ + $(top_srcdir)/config/m4/sd_gpu_yakl.m4 \ + $(top_srcdir)/config/m4/sd_io_hdf5.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf_fortran.m4 \ + $(top_srcdir)/config/m4/sd_levmar.m4 \ + $(top_srcdir)/config/m4/sd_libpaw.m4 \ + $(top_srcdir)/config/m4/sd_libpsml.m4 \ + $(top_srcdir)/config/m4/sd_libxc.m4 \ + $(top_srcdir)/config/m4/sd_math_fft.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_core.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_util.m4 \ + $(top_srcdir)/config/m4/sd_papi.m4 \ + $(top_srcdir)/config/m4/sd_pfft.m4 \ + $(top_srcdir)/config/m4/sd_triqs.m4 \ + $(top_srcdir)/config/m4/sd_wannier90.m4 \ + $(top_srcdir)/config/m4/sd_xmlf90.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_$(V)) +am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY)) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +am__v_at_1 = +SOURCES = +DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(srcdir)/Makefile.in +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ABINIT_BINARY_PACKAGE = abinit-10.0.0.83-58be4d_x86_64_darwin18.7.0_gnu9.4 +ABINIT_COMMON_CPPFLAGS = +ABINIT_COMMON_FCFLAGS = +ABINIT_COMMON_LDFLAGS = +ABINIT_COMMON_LIBS = +ABINIT_TARGET = x86_64_darwin18.7.0_gnu9.4 +ABINIT_VERSION = 10.0.0.83-58be4d +ABINIT_VERSION_BASE = 10.0 +ABINIT_VERSION_BUILD = 20240316 +ABINIT_VERSION_MAJOR = 10 +ABINIT_VERSION_MICRO = 0 +ABINIT_VERSION_MINOR = 0 +ABI_CPPFLAGS = -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include +ACLOCAL = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' aclocal-1.16 +AMTAR = $${TAR-tar} +AM_DEFAULT_VERBOSITY = 1 +AR = ar +ARFLAGS = rc +ARFLAGS_CMD = rc +ARFLAGS_DEBUG = +ARFLAGS_EXTRA = +ARFLAGS_HINTS = +ARFLAGS_OPTIM = +ATOMPAW_BIN = +AUTOCONF = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' autoconf +AUTOHEADER = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' autoheader +AUTOMAKE = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' automake-1.16 +AWK = awk +BIGDFT_CPPFLAGS = +BIGDFT_FCFLAGS = +BIGDFT_LDFLAGS = +BIGDFT_LIBS = +BOURNE_SHELL = /bin/sh +CC = /opt/local/bin/mpicc +CCDEPMODE = depmode=gcc3 +CC_LDFLAGS = +CC_LDFLAGS_DEBUG = +CC_LDFLAGS_EXTRA = +CC_LDFLAGS_GPU = +CC_LDFLAGS_HINTS = +CC_LDFLAGS_OPTIM = +CC_LIBS = +CC_LIBS_DEBUG = +CC_LIBS_EXTRA = +CC_LIBS_GPU = +CC_LIBS_HINTS = +CC_LIBS_OPTIM = +CFLAGS = -O2 -g +CFLAGS_DEBUG = +CFLAGS_EXTRA = +CFLAGS_GPU = +CFLAGS_HINTS = +CFLAGS_OPTIM = +CPP = /opt/local/bin/mpicc -E +CPPFLAGS = +CPPFLAGS_DEBUG = +CPPFLAGS_EXTRA = +CPPFLAGS_GPU = +CPPFLAGS_HINTS = +CPPFLAGS_HINTS_EXT = -P -std=c99 +CPPFLAGS_OPTIM = +CXX = /opt/local/bin/mpicxx +CXXDEPMODE = depmode=gcc3 +CXXFLAGS = -O2 -g +CXXFLAGS_DEBUG = +CXXFLAGS_EXTRA = +CXXFLAGS_GPU = +CXXFLAGS_HINTS = +CXXFLAGS_OPTIM = +CXX_LDFLAGS = +CXX_LDFLAGS_DEBUG = +CXX_LDFLAGS_EXTRA = +CXX_LDFLAGS_GPU = +CXX_LDFLAGS_HINTS = +CXX_LDFLAGS_OPTIM = +CXX_LIBS = +CXX_LIBS_DEBUG = +CXX_LIBS_EXTRA = +CXX_LIBS_GPU = +CXX_LIBS_HINTS = +CXX_LIBS_OPTIM = +CYGPATH_W = echo +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +ECHO_C = \c +ECHO_N = +ECHO_T = +EGREP = /usr/bin/grep -E +EXEEXT = +F77 = /opt/local/bin/mpif90 +FC = /opt/local/bin/mpif90 +FCFLAGS = -O2 -g -ffree-line-length-none -I/opt/local/include -I/opt/local/include -I/opt/local/include +FCFLAGS_DEBUG = +FCFLAGS_EXTRA = +FCFLAGS_F90 = +FCFLAGS_FIXEDFORM = -ffixed-form +FCFLAGS_FREEFORM = -ffree-form +FCFLAGS_HINTS = -ffree-line-length-none +FCFLAGS_MODDIR = -J../mods +FCFLAGS_OPENMP = +FCFLAGS_OPENMP_OFFLOAD = +FCFLAGS_OPTIM = +FCLIBS = -L/opt/local/lib -L/opt/local/lib/openmpi-gcc9 -L/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0 -L/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/../../.. -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi -lgfortran -lquadmath -lm +FC_LDFLAGS = +FC_LDFLAGS_DEBUG = +FC_LDFLAGS_EXTRA = +FC_LDFLAGS_HINTS = +FC_LDFLAGS_OPTIM = +FC_LIBS = +FC_LIBS_DEBUG = +FC_LIBS_EXTRA = +FC_LIBS_HINTS = +FC_LIBS_OPTIM = +FC_NOWRAP = /opt/local/bin/mpif90 +FFLAGS = -O2 -g -ffree-line-length-none -I/opt/local/include -I/opt/local/include -I/opt/local/include +FFTW3_CFLAGS = +FFTW3_CPPFLAGS = -I/opt/local/include +FFTW3_FCFLAGS = -I/opt/local/include +FFTW3_LDFLAGS = +FFTW3_LIBS = -L/opt/local/lib -lfftw3 -lfftw3f +FFT_CFLAGS = +FFT_FCFLAGS = +FPP = +FPPFLAGS = +FPPFLAGS_DEBUG = +FPPFLAGS_EXTRA = +FPPFLAGS_HINTS = +FPPFLAGS_OPTIM = +GPU_ARCH = +GPU_CFLAGS = +GPU_CPPFLAGS = +GPU_CXXFLAGS = +GPU_FCFLAGS = +GPU_LDFLAGS = +GPU_LIBS = +GRAPHATOM_BIN = +GREP = /usr/bin/grep +H5CC = +HDF5_CFLAGS = +HDF5_CPPFLAGS = +HDF5_CXXFLAGS = +HDF5_FCFLAGS = +HDF5_LDFLAGS = +HDF5_LIBS = +INSTALL = /opt/local/libexec/gnubin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +KOKKOS_CPPFLAGS = +KOKKOS_CXXFLAGS = +KOKKOS_LDFLAGS = +KOKKOS_LIBS = +LDFLAGS = +LEVMAR_CFLAGS = +LEVMAR_CPPFLAGS = +LEVMAR_LDFLAGS = +LEVMAR_LIBS = +LIBOBJS = +LIBPAW_CPPFLAGS = +LIBPAW_FCFLAGS = +LIBPAW_LDFLAGS = +LIBPAW_LIBS = +LIBPSML_CPPFLAGS = +LIBPSML_FCFLAGS = +LIBPSML_LDFLAGS = +LIBPSML_LIBS = +LIBS = -L/opt/local/lib -lwannier -L/opt/local/lib -lxc -L/opt/local/lib -lnetcdff -L/opt/local/lib -lnetcdf -L/opt/local/lib -L/opt/local/lib -lhdf5_hl -L/opt/local/lib -lhdf5 -lz -ldl -lm -L/opt/local/lib -lfftw3 -lfftw3f +LIBXC_CFLAGS = +LIBXC_CPPFLAGS = +LIBXC_FCFLAGS = +LIBXC_LDFLAGS = +LIBXC_LIBS = +LIBXML2_CPPFLAGS = +LIBXML2_FCFLAGS = +LIBXML2_LIBS = +LINALG_CFLAGS = +LINALG_CPPFLAGS = +LINALG_CXXFLAGS = +LINALG_FCFLAGS = -I/opt/local/include +LINALG_LDFLAGS = +LINALG_LIBS = -L/opt/local/lib -lopenblas +LN_S = ln -s +LTLIBOBJS = +MAKEINFO = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' makeinfo +MKDIR_P = /opt/local/libexec/gnubin/mkdir -p +MODEXT = mod +MPI_CFLAGS = +MPI_CPPFLAGS = +MPI_CXXFLAGS = +MPI_FCFLAGS = +MPI_LDFLAGS = +MPI_LIBS = +MV = /opt/local/libexec/gnubin/mv +NETCDF_CFLAGS = +NETCDF_CPPFLAGS = +NETCDF_CXXFLAGS = +NETCDF_FCFLAGS = +NETCDF_FORTRAN_CFLAGS = +NETCDF_FORTRAN_CPPFLAGS = +NETCDF_FORTRAN_CXXFLAGS = +NETCDF_FORTRAN_FCFLAGS = +NETCDF_FORTRAN_LDFLAGS = +NETCDF_FORTRAN_LIBS = +NETCDF_LDFLAGS = +NETCDF_LIBS = +NVCC = +NVCC_CFLAGS = +NVCC_CPPFLAGS = +NVCC_LDFLAGS = +NVCC_LIBS = +OBJEXT = o +PACKAGE = abinit +PACKAGE_BUGREPORT = https://bugs.launchpad.net/abinit/ +PACKAGE_NAME = ABINIT +PACKAGE_STRING = ABINIT 10.0.0.83-58be4d +PACKAGE_TARNAME = abinit +PACKAGE_URL = +PACKAGE_VERSION = 10.0.0.83-58be4d +PAPI_CFLAGS = +PAPI_CPPFLAGS = +PAPI_LDFLAGS = +PAPI_LIBS = +PATCH = patch +PATH_SEPARATOR = : +PERL = /usr/bin/perl +PFFT_CFLAGS = +PFFT_CPPFLAGS = +PFFT_LDFLAGS = +PFFT_LIBS = +PYFLAGS = +PYTHON = python3.9 +PYTHON_CONFIG = python3.9-config +PYTHON_CPPFLAGS = -I/opt/local/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -I/opt/local/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 +RANLIB = ranlib +REALPATH = realpath +RM = /opt/local/libexec/gnubin/rm +SED = /usr/bin/sed +SET_MAKE = +SHELL = /bin/sh +STRIP = +TAR = tar +TRIQS_CFLAGS = +TRIQS_CPPFLAGS = +TRIQS_CXXFLAGS = +TRIQS_LDFLAGS = +TRIQS_LIBS = +TRUE_CPP = cpp +VERSION = 10.0.0.83-58be4d +WANNIER90_CPPFLAGS = +WANNIER90_FCFLAGS = -I/opt/local/include +WANNIER90_LDFLAGS = +WANNIER90_LIBS = -L/opt/local/lib -lwannier +XML2_CONFIG = +XMLF90_CPPFLAGS = +XMLF90_FCFLAGS = +XMLF90_LDFLAGS = +XMLF90_LIBS = +XML_CPPFLAGS = +XML_LIBS = +XPP = +XPPFLAGS = +XPPFLAGS_DEBUG = +XPPFLAGS_EXTRA = +XPPFLAGS_OPTIM = +YAKL_CPPFLAGS = +YAKL_FCFLAGS = +YAKL_LDFLAGS = +YAKL_LIBS = +abi_ac_distcheck = --with-config-file="/Users/gonze/_Research/ABINIT_git/gonze/mac-1P0-225.ac9" +abi_ac_version = 027100 +abi_am_version = 011603 +abi_avx_safe_mode_enable = no +abi_bse_unpacked_enable = no +abi_cc_path = +abi_cc_vendor = gnu +abi_cc_version = 9.4 +abi_cclock_enable = no +abi_cpp_path = +abi_cpu_64bits = yes +abi_cpu_bits = 64 +abi_cpu_model = unknown +abi_cpu_platform = apple +abi_cpu_spec = unknown_unknown +abi_cpu_vendor = unknown +abi_crpa_optim_enable = no +abi_cxx_path = +abi_cxx_vendor = gnu +abi_cxx_version = 9.4 +abi_debug_flavor = basic +abi_exports_enable = no +abi_fbk_abinit_common_ok = no +abi_fbk_bigdft_ok = disabled +abi_fbk_config = +abi_fbk_enable = no +abi_fbk_fft_ok = no +abi_fbk_fftw3_ok = no +abi_fbk_gpu_ok = no +abi_fbk_hdf5_ok = disabled +abi_fbk_init = def +abi_fbk_kokkos_ok = no +abi_fbk_levmar_ok = no +abi_fbk_libpaw_ok = no +abi_fbk_libpsml_ok = disabled +abi_fbk_libxc_ok = disabled +abi_fbk_libxml2_ok = no +abi_fbk_linalg_ok = disabled +abi_fbk_list = +abi_fbk_mpi_ok = no +abi_fbk_netcdf_fortran_ok = disabled +abi_fbk_netcdf_ok = disabled +abi_fbk_papi_ok = no +abi_fbk_pfft_ok = no +abi_fbk_prefix = +abi_fbk_required = +abi_fbk_triqs_ok = no +abi_fbk_wannier90_ok = disabled +abi_fbk_xmlf90_ok = disabled +abi_fbk_yakl_ok = no +abi_fc_path = +abi_fc_vendor = gnu +abi_fc_version = 9.4 +abi_fc_wrap = no +abi_fc_wrapper_enable = no +abi_fpp_path = +abi_gpu_arch = +abi_gpu_fcflags = +abi_gpu_flavor = none +abi_gpu_hip_libdir = +abi_gpu_incs = +abi_gpu_ldflags = +abi_gpu_libs = +abi_gpu_nvtx_v3 = +abi_gpu_roctx = +abi_gw_dpc_enable = yes +abi_hints_enable = yes +abi_libtetra_enable = yes +abi_libxml2_cppflags = +abi_libxml2_enable = no +abi_libxml2_fcflags = +abi_libxml2_init = def +abi_libxml2_ldflags = +abi_libxml2_libs = +abi_libxml2_ok = unknown +abi_libxml2_prefix = +abi_lotf_enable = no +abi_lt_version = 020406 +abi_m4_version = 010419 +abi_memory_profiling_enable = no +abi_mpi_cflags = +abi_mpi_cppflags = +abi_mpi_cxxflags = +abi_mpi_enable = yes +abi_mpi_fcflags = +abi_mpi_flavor = auto +abi_mpi_gpu_aware_enable = no +abi_mpi_incs = +abi_mpi_inplace_enable = yes +abi_mpi_interfaces_bugfix_enable = no +abi_mpi_io_default_enable = no +abi_mpi_io_enable = yes +abi_mpi_ldflags = +abi_mpi_level = 2 +abi_mpi_libs = +abi_netcdf_default_enable = no +abi_openmp_enable = no +abi_openmp_offload_enable = no +abi_optim_flavor = standard +abi_python_invocation_enable = no +abi_source_debug_enable = no +abi_stdin_enable = yes +abi_sys_spec = darwin-x86_64 +abi_timer_enable = yes +abi_triqs_v1_4_enable = no +abi_triqs_v2_0_enable = no +abi_zdot_bugfix_enable = no +abinit_bindir = /usr/local/bin +abinit_builddir = /Users/gonze/_Research/ABINIT_git/gonze +abinit_chkdir = /usr/local/share/abinit/tests +abinit_datdir = /usr/local/share/abinit +abinit_docdir = /usr/local/doc/abinit +abinit_incdir = /usr/local/include +abinit_libdir = /usr/local/lib +abinit_mandir = /usr/local/share/man +abinit_prefix = /usr/local +abinit_srcdir = /Users/gonze/_Research/ABINIT_git/gonze +abs_builddir = /Users/gonze/_Research/ABINIT_git/gonze/shared/common/src/incs +abs_srcdir = /Users/gonze/_Research/ABINIT_git/gonze/shared/common/src/incs +abs_top_builddir = /Users/gonze/_Research/ABINIT_git/gonze +abs_top_srcdir = /Users/gonze/_Research/ABINIT_git/gonze +ac_ct_CC = +ac_ct_CXX = +ac_ct_FC = +am__include = include +am__leading_dot = . +am__quote = +am__tar = tar --format=ustar -chf - "$$tardir" +am__untar = tar -xf - +bindir = ${exec_prefix}/bin +build = x86_64-apple-darwin18.7.0 +build_alias = +build_cpu = x86_64 +build_os = darwin18.7.0 +build_vendor = apple +builddir = . +cc_info_string = gcc-mp-9 (MacPorts gcc9 9.4.0_0) 9.4.0 +cxx_info_string = g++-mp-9 (MacPorts gcc9 9.4.0_0) 9.4.0 +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +enable_avx_safe_mode = +enable_bse_unpacked = +enable_cclock = +enable_crpa_optim = +enable_exports = +enable_fc_wrapper = +enable_gw_dpc = yes +enable_hints = +enable_libtetra = +enable_lotf = +enable_memory_profiling = +enable_mpi_gpu_aware = +enable_mpi_inplace = +enable_mpi_interfaces_bugfix = +enable_mpi_io = yes +enable_mpi_io_default = +enable_netcdf_default = +enable_openmp = +enable_openmp_offload = +enable_python_invocation = +enable_shared = +enable_source_debug = +enable_static = +enable_stdin = +enable_timer = +enable_triqs_v1_4 = +enable_triqs_v2_0 = +enable_zdot_bugfix = +exec_prefix = ${prefix} +fc_info_string = GNU Fortran (MacPorts gcc9 9.4.0_0) 9.4.0 +fc_mod_fcflags = +fc_timing = standard +fcflags_opt_02_clib = +fcflags_opt_10_defs = +fcflags_opt_11_memory_mpi = +fcflags_opt_12_hide_mpi = +fcflags_opt_14_hidewrite = +fcflags_opt_16_hideleave = +fcflags_opt_16_kokkos_toolbox = +fcflags_opt_17_gpu_toolbox = +fcflags_opt_17_libtetra_ext = +fcflags_opt_17_minimax = +fcflags_opt_17_yaml_out = +fcflags_opt_18_timing = +fcflags_opt_21_hashfuncs = +fcflags_opt_27_toolbox_oop = +fcflags_opt_28_numeric_noabirule = +fcflags_opt_29_kpoints = +fcflags_opt_32_util = +fcflags_opt_33_xc_lowlevel = +fcflags_opt_39_libpaw = +fcflags_opt_41_geometry = +fcflags_opt_42_nlstrain = +fcflags_opt_42_parser = +fcflags_opt_43_ptgroups = -O0 +fcflags_opt_43_wvl_wrappers = +fcflags_opt_44_abitools = +fcflags_opt_44_abitypes_defs = +fcflags_opt_44_manage_kokkos = +fcflags_opt_45_geomoptim = +fcflags_opt_45_xgTools = +fcflags_opt_46_ghc_omp = +fcflags_opt_46_manage_cuda = +fcflags_opt_48_diago = +fcflags_opt_49_gw_toolbox_oop = +fcflags_opt_51_manage_mpi = +fcflags_opt_52_fft_mpi_noabirule = +fcflags_opt_53_ffts = +fcflags_opt_54_spacepar = +fcflags_opt_55_abiutil = +fcflags_opt_56_io_mpi = +fcflags_opt_56_mixing = +fcflags_opt_56_recipspace = +fcflags_opt_56_xc = +fcflags_opt_57_iopsp_parser = +fcflags_opt_57_iovars = +fcflags_opt_61_occeig = +fcflags_opt_62_cg_noabirule = +fcflags_opt_62_ctqmc = +fcflags_opt_62_iowfdenpot = +fcflags_opt_62_poisson = +fcflags_opt_62_wvl_wfs = +fcflags_opt_64_psp = +fcflags_opt_65_lotf_base = +fcflags_opt_65_paw = +fcflags_opt_66_nonlocal = +fcflags_opt_66_vdwxc = +fcflags_opt_66_wfs = +fcflags_opt_67_common = +fcflags_opt_67_python_invocation_ext = +fcflags_opt_67_triqs_ext = +fcflags_opt_68_dmft = +fcflags_opt_68_lotf = +fcflags_opt_68_recursion = +fcflags_opt_68_rsprc = +fcflags_opt_69_wfdesc = +fcflags_opt_70_gw = +fcflags_opt_71_bse = +fcflags_opt_71_wannier = +fcflags_opt_72_response = +fcflags_opt_77_ddb = +fcflags_opt_77_suscep = +fcflags_opt_78_effpot = +fcflags_opt_78_eph = +fcflags_opt_79_seqpar_mpi = +fcflags_opt_80_rttddft = +fcflags_opt_80_tdep = +fcflags_opt_94_scfcv = +fcflags_opt_95_drive = +fcflags_opt_98_main = +fcflags_opt_bigdft = +fcflags_opt_default = +fcflags_opt_hdf5 = +fcflags_opt_levmar = +fcflags_opt_libpsml = +fcflags_opt_libxc = +fcflags_opt_libxml2 = +fcflags_opt_linalg = +fcflags_opt_netcdf = +fcflags_opt_netcdf_fortran = +fcflags_opt_papi = +fcflags_opt_triqs = +fcflags_opt_wannier90 = +fcflags_opt_xmlf90 = +host = x86_64-apple-darwin18.7.0 +host_alias = +host_cpu = x86_64 +host_os = darwin18.7.0 +host_vendor = apple +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = ${SHELL} /Users/gonze/_Research/ABINIT_git/gonze/config/gnu/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = ${datarootdir}/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = $(MKDIR_P) +oldincludedir = /usr/include +pdfdir = ${docdir} +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +runstatedir = ${localstatedir}/run +sbindir = ${exec_prefix}/sbin +sd_abinit_common_cppflags = +sd_abinit_common_enable = no +sd_abinit_common_enable_def = no +sd_abinit_common_fcflags = +sd_abinit_common_init = def +sd_abinit_common_ldflags = +sd_abinit_common_libs = +sd_abinit_common_ok = unknown +sd_abinit_common_options = optional skip +sd_abinit_common_policy = skip +sd_abinit_common_status = optional +sd_bigdft_cppflags = +sd_bigdft_enable = no +sd_bigdft_enable_def = no +sd_bigdft_fcflags = +sd_bigdft_init = def +sd_bigdft_ldflags = +sd_bigdft_libs = +sd_bigdft_ok = unknown +sd_bigdft_options = optional warn +sd_bigdft_policy = warn +sd_bigdft_status = optional +sd_fft_cflags = +sd_fft_choices = +sd_fft_cppflags = -I/opt/local/include +sd_fft_cxxflags = +sd_fft_enable = yes +sd_fft_fcflags = -I/opt/local/include +sd_fft_flavor = fftw3 +sd_fft_init = kwd +sd_fft_ldflags = +sd_fft_libs = -L/opt/local/lib -lfftw3 -lfftw3f +sd_fft_ok = yes +sd_fftw3_cflags = +sd_fftw3_cppflags = -I/opt/local/include +sd_fftw3_enable = yes +sd_fftw3_enable_def = no +sd_fftw3_fcflags = -I/opt/local/include +sd_fftw3_init = env +sd_fftw3_ldflags = +sd_fftw3_libs = -L/opt/local/lib -lfftw3 -lfftw3f +sd_fftw3_ok = yes +sd_fftw3_options = optional skip +sd_fftw3_policy = skip +sd_fftw3_status = optional +sd_gpu_cflags = +sd_gpu_cppflags = +sd_gpu_cxxflags = +sd_gpu_enable = no +sd_gpu_enable_def = no +sd_gpu_fcflags = +sd_gpu_init = def +sd_gpu_ldflags = +sd_gpu_libs = +sd_gpu_ok = no +sd_gpu_options = optional warn +sd_gpu_policy = warn +sd_gpu_prefix = +sd_gpu_status = optional +sd_hdf5_cflags = +sd_hdf5_cppflags = -I/opt/local/include -I/opt/local/include +sd_hdf5_cxxflags = +sd_hdf5_enable = yes +sd_hdf5_enable_def = yes +sd_hdf5_enable_fc = no +sd_hdf5_fcflags = +sd_hdf5_h5cc = /opt/local/bin/h5cc +sd_hdf5_h5fc = +sd_hdf5_init = dir +sd_hdf5_ldflags = +sd_hdf5_libs = -L/opt/local/lib -L/opt/local/lib -lhdf5_hl -L/opt/local/lib -lhdf5 -lz -ldl -lm +sd_hdf5_ok = yes +sd_hdf5_options = required no-fortran warn +sd_hdf5_policy = warn +sd_hdf5_status = required +sd_kokkos_cppflags = +sd_kokkos_cxxflags = +sd_kokkos_enable = no +sd_kokkos_enable_def = no +sd_kokkos_init = def +sd_kokkos_ldflags = +sd_kokkos_libs = +sd_kokkos_ok = unknown +sd_kokkos_options = optional fail +sd_kokkos_policy = fail +sd_kokkos_status = optional +sd_levmar_cflags = +sd_levmar_cppflags = +sd_levmar_enable = no +sd_levmar_enable_def = no +sd_levmar_init = def +sd_levmar_ldflags = +sd_levmar_libs = +sd_levmar_ok = unknown +sd_levmar_options = optional fail +sd_levmar_policy = fail +sd_levmar_status = optional +sd_libpaw_cppflags = +sd_libpaw_enable = no +sd_libpaw_enable_def = no +sd_libpaw_fcflags = +sd_libpaw_init = def +sd_libpaw_ldflags = +sd_libpaw_libs = +sd_libpaw_ok = unknown +sd_libpaw_options = optional skip +sd_libpaw_policy = skip +sd_libpaw_status = optional +sd_libpsml_cppflags = +sd_libpsml_enable = no +sd_libpsml_enable_def = no +sd_libpsml_fcflags = +sd_libpsml_init = def +sd_libpsml_ldflags = +sd_libpsml_libs = +sd_libpsml_ok = unknown +sd_libpsml_options = optional warn +sd_libpsml_policy = warn +sd_libpsml_status = optional +sd_libxc_cflags = +sd_libxc_cppflags = -I/opt/local/include +sd_libxc_enable = yes +sd_libxc_enable_def = yes +sd_libxc_enable_fc = no +sd_libxc_fcflags = +sd_libxc_init = dir +sd_libxc_ldflags = +sd_libxc_libs = -L/opt/local/lib -lxc +sd_libxc_ok = yes +sd_libxc_options = required no-fortran warn +sd_libxc_policy = warn +sd_libxc_status = required +sd_linalg_cflags = +sd_linalg_choices = +sd_linalg_cppflags = +sd_linalg_cxxflags = +sd_linalg_enable = yes +sd_linalg_fcflags = -I/opt/local/include +sd_linalg_flavor = openblas +sd_linalg_has_elpa = no +sd_linalg_has_scalapack = no +sd_linalg_init = env +sd_linalg_ldflags = +sd_linalg_libs = -L/opt/local/lib -lopenblas +sd_linalg_ok = yes +sd_mpi_cc = /opt/local/bin/mpicc +sd_mpi_cflags = +sd_mpi_cppflags = -I/opt/local/include +sd_mpi_cxx = /opt/local/bin/mpicxx +sd_mpi_enable = yes +sd_mpi_enable_cxx = yes +sd_mpi_enable_def = auto +sd_mpi_enable_fc = yes +sd_mpi_fc = /opt/local/bin/mpif90 +sd_mpi_fcflags = -I/opt/local/include +sd_mpi_init = dir +sd_mpi_ldflags = +sd_mpi_libs = +sd_mpi_ok = yes +sd_mpi_options = auto optional fail +sd_mpi_policy = fail +sd_mpi_status = optional +sd_netcdf_cflags = +sd_netcdf_cppflags = -I/opt/local/include +sd_netcdf_enable = yes +sd_netcdf_enable_def = yes +sd_netcdf_fcflags = -I/opt/local/include +sd_netcdf_fortran_cflags = +sd_netcdf_fortran_cppflags = -I/opt/local/include +sd_netcdf_fortran_enable = yes +sd_netcdf_fortran_enable_def = yes +sd_netcdf_fortran_fcflags = -I/opt/local/include +sd_netcdf_fortran_init = dir +sd_netcdf_fortran_ldflags = +sd_netcdf_fortran_libs = -L/opt/local/lib -lnetcdff +sd_netcdf_fortran_ok = yes +sd_netcdf_fortran_options = required warn +sd_netcdf_fortran_policy = warn +sd_netcdf_fortran_status = required +sd_netcdf_init = dir +sd_netcdf_ldflags = +sd_netcdf_libs = -L/opt/local/lib -lnetcdf +sd_netcdf_ok = yes +sd_netcdf_options = required warn +sd_netcdf_policy = warn +sd_netcdf_status = required +sd_papi_cflags = +sd_papi_cppflags = +sd_papi_enable = no +sd_papi_enable_def = no +sd_papi_init = def +sd_papi_ldflags = +sd_papi_libs = +sd_papi_ok = unknown +sd_papi_options = optional fail +sd_papi_policy = fail +sd_papi_sd_papi_fcflags = +sd_papi_status = optional +sd_pfft_cflags = +sd_pfft_cppflags = +sd_pfft_enable = no +sd_pfft_enable_def = no +sd_pfft_init = def +sd_pfft_ldflags = +sd_pfft_libs = +sd_pfft_ok = unknown +sd_pfft_options = optional skip +sd_pfft_policy = skip +sd_pfft_status = optional +sd_sys_fcflags = +sd_triqs_cflags = +sd_triqs_cppflags = +sd_triqs_cxxflags = +sd_triqs_enable = no +sd_triqs_enable_def = no +sd_triqs_fcflags = +sd_triqs_init = def +sd_triqs_ldflags = +sd_triqs_libs = +sd_triqs_ok = unknown +sd_triqs_options = optional fail +sd_triqs_policy = fail +sd_triqs_status = optional +sd_wannier90_cppflags = +sd_wannier90_enable = yes +sd_wannier90_enable_def = no +sd_wannier90_fcflags = -I/opt/local/include +sd_wannier90_init = env +sd_wannier90_ldflags = +sd_wannier90_libs = -L/opt/local/lib -lwannier +sd_wannier90_ok = yes +sd_wannier90_options = optional warn +sd_wannier90_policy = warn +sd_wannier90_status = optional +sd_xmlf90_cppflags = +sd_xmlf90_enable = no +sd_xmlf90_enable_def = no +sd_xmlf90_fcflags = +sd_xmlf90_init = def +sd_xmlf90_ldflags = +sd_xmlf90_libs = +sd_xmlf90_ok = unknown +sd_xmlf90_options = optional warn +sd_xmlf90_policy = warn +sd_xmlf90_status = optional +sd_yakl_cppflags = +sd_yakl_enable = no +sd_yakl_enable_def = no +sd_yakl_fcflags = +sd_yakl_init = def +sd_yakl_ldflags = +sd_yakl_libs = +sd_yakl_ok = unknown +sd_yakl_options = optional fail +sd_yakl_policy = fail +sd_yakl_status = optional +sharedstatedir = ${prefix}/com +src_02_clib_fcflags = -I$(top_builddir)/shared/common/src/02_clib -I$(top_srcdir)/shared/common/src/02_clib +src_10_defs_fcflags = -I$(top_builddir)/shared/common/src/10_defs -I$(top_srcdir)/shared/common/src/10_defs +src_11_memory_mpi_fcflags = -I$(top_builddir)/shared/common/src/11_memory_mpi -I$(top_srcdir)/shared/common/src/11_memory_mpi +src_12_hide_mpi_fcflags = -I$(top_builddir)/shared/common/src/12_hide_mpi -I$(top_srcdir)/shared/common/src/12_hide_mpi +src_14_hidewrite_fcflags = -I$(top_builddir)/shared/common/src/14_hidewrite -I$(top_srcdir)/shared/common/src/14_hidewrite +src_16_hideleave_fcflags = -I$(top_builddir)/shared/common/src/16_hideleave -I$(top_srcdir)/shared/common/src/16_hideleave +src_16_kokkos_toolbox_fcflags = -I$(top_builddir)/shared/common/src/16_kokkos_toolbox -I$(top_srcdir)/shared/common/src/16_kokkos_toolbox +src_17_gpu_toolbox_fcflags = -I$(top_builddir)/shared/common/src/17_gpu_toolbox -I$(top_srcdir)/shared/common/src/17_gpu_toolbox +src_17_libtetra_ext_fcflags = -I$(top_builddir)/shared/common/src/17_libtetra_ext -I$(top_srcdir)/shared/common/src/17_libtetra_ext +src_17_minimax_fcflags = -I$(top_builddir)/shared/common/src/17_minimax -I$(top_srcdir)/shared/common/src/17_minimax +src_17_yaml_out_fcflags = -I$(top_builddir)/shared/common/src/17_yaml_out -I$(top_srcdir)/shared/common/src/17_yaml_out +src_18_timing_fcflags = -I$(top_builddir)/shared/common/src/18_timing -I$(top_srcdir)/shared/common/src/18_timing +src_21_hashfuncs_fcflags = -I$(top_builddir)/shared/common/src/21_hashfuncs -I$(top_srcdir)/shared/common/src/21_hashfuncs +src_27_toolbox_oop_fcflags = -I$(top_builddir)/shared/common/src/27_toolbox_oop -I$(top_srcdir)/shared/common/src/27_toolbox_oop +src_28_numeric_noabirule_fcflags = -I$(top_builddir)/shared/common/src/28_numeric_noabirule -I$(top_srcdir)/shared/common/src/28_numeric_noabirule +src_29_kpoints_fcflags = -I$(top_builddir)/shared/common/src/29_kpoints -I$(top_srcdir)/shared/common/src/29_kpoints +src_32_util_fcflags = -I$(top_builddir)/shared/common/src/32_util -I$(top_srcdir)/shared/common/src/32_util +src_33_xc_lowlevel_fcflags = -I$(top_builddir)/shared/common/src/33_xc_lowlevel -I$(top_srcdir)/shared/common/src/33_xc_lowlevel +src_39_libpaw_fcflags = -I$(top_builddir)/shared/libpaw/src -I$(top_srcdir)/shared/libpaw/src +src_41_geometry_fcflags = -I$(top_builddir)/src/41_geometry -I$(top_srcdir)/src/41_geometry +src_42_nlstrain_fcflags = -I$(top_builddir)/src/42_nlstrain -I$(top_srcdir)/src/42_nlstrain +src_42_parser_fcflags = -I$(top_builddir)/src/42_parser -I$(top_srcdir)/src/42_parser +src_43_ptgroups_fcflags = -I$(top_builddir)/src/43_ptgroups -I$(top_srcdir)/src/43_ptgroups +src_43_wvl_wrappers_fcflags = -I$(top_builddir)/src/43_wvl_wrappers -I$(top_srcdir)/src/43_wvl_wrappers +src_44_abitools_fcflags = -I$(top_builddir)/src/44_abitools -I$(top_srcdir)/src/44_abitools +src_44_abitypes_defs_fcflags = -I$(top_builddir)/src/44_abitypes_defs -I$(top_srcdir)/src/44_abitypes_defs +src_44_manage_kokkos_fcflags = -I$(top_builddir)/src/44_manage_kokkos -I$(top_srcdir)/src/44_manage_kokkos +src_45_geomoptim_fcflags = -I$(top_builddir)/src/45_geomoptim -I$(top_srcdir)/src/45_geomoptim +src_45_xgTools_fcflags = -I$(top_builddir)/src/45_xgTools -I$(top_srcdir)/src/45_xgTools +src_46_ghc_omp_fcflags = -I$(top_builddir)/src/46_ghc_omp -I$(top_srcdir)/src/46_ghc_omp +src_46_manage_cuda_fcflags = -I$(top_builddir)/src/46_manage_cuda -I$(top_srcdir)/src/46_manage_cuda +src_48_diago_fcflags = -I$(top_builddir)/src/48_diago -I$(top_srcdir)/src/48_diago +src_49_gw_toolbox_oop_fcflags = -I$(top_builddir)/src/49_gw_toolbox_oop -I$(top_srcdir)/src/49_gw_toolbox_oop +src_51_manage_mpi_fcflags = -I$(top_builddir)/src/51_manage_mpi -I$(top_srcdir)/src/51_manage_mpi +src_52_fft_mpi_noabirule_fcflags = -I$(top_builddir)/src/52_fft_mpi_noabirule -I$(top_srcdir)/src/52_fft_mpi_noabirule +src_53_ffts_fcflags = -I$(top_builddir)/src/53_ffts -I$(top_srcdir)/src/53_ffts +src_54_spacepar_fcflags = -I$(top_builddir)/src/54_spacepar -I$(top_srcdir)/src/54_spacepar +src_55_abiutil_fcflags = -I$(top_builddir)/src/55_abiutil -I$(top_srcdir)/src/55_abiutil +src_56_io_mpi_fcflags = -I$(top_builddir)/src/56_io_mpi -I$(top_srcdir)/src/56_io_mpi +src_56_mixing_fcflags = -I$(top_builddir)/src/56_mixing -I$(top_srcdir)/src/56_mixing +src_56_recipspace_fcflags = -I$(top_builddir)/src/56_recipspace -I$(top_srcdir)/src/56_recipspace +src_56_xc_fcflags = -I$(top_builddir)/src/56_xc -I$(top_srcdir)/src/56_xc +src_57_iopsp_parser_fcflags = -I$(top_builddir)/src/57_iopsp_parser -I$(top_srcdir)/src/57_iopsp_parser +src_57_iovars_fcflags = -I$(top_builddir)/src/57_iovars -I$(top_srcdir)/src/57_iovars +src_61_occeig_fcflags = -I$(top_builddir)/src/61_occeig -I$(top_srcdir)/src/61_occeig +src_62_cg_noabirule_fcflags = -I$(top_builddir)/src/62_cg_noabirule -I$(top_srcdir)/src/62_cg_noabirule +src_62_ctqmc_fcflags = -I$(top_builddir)/src/62_ctqmc -I$(top_srcdir)/src/62_ctqmc +src_62_iowfdenpot_fcflags = -I$(top_builddir)/src/62_iowfdenpot -I$(top_srcdir)/src/62_iowfdenpot +src_62_poisson_fcflags = -I$(top_builddir)/src/62_poisson -I$(top_srcdir)/src/62_poisson +src_62_wvl_wfs_fcflags = -I$(top_builddir)/src/62_wvl_wfs -I$(top_srcdir)/src/62_wvl_wfs +src_64_psp_fcflags = -I$(top_builddir)/src/64_psp -I$(top_srcdir)/src/64_psp +src_65_lotf_base_fcflags = -I$(top_builddir)/src/65_lotf_base -I$(top_srcdir)/src/65_lotf_base +src_65_paw_fcflags = -I$(top_builddir)/src/65_paw -I$(top_srcdir)/src/65_paw +src_66_nonlocal_fcflags = -I$(top_builddir)/src/66_nonlocal -I$(top_srcdir)/src/66_nonlocal +src_66_vdwxc_fcflags = -I$(top_builddir)/src/66_vdwxc -I$(top_srcdir)/src/66_vdwxc +src_66_wfs_fcflags = -I$(top_builddir)/src/66_wfs -I$(top_srcdir)/src/66_wfs +src_67_common_fcflags = -I$(top_builddir)/src/67_common -I$(top_srcdir)/src/67_common +src_67_python_invocation_ext_fcflags = -I$(top_builddir)/src/67_python_invocation_ext -I$(top_srcdir)/src/67_python_invocation_ext +src_67_triqs_ext_fcflags = -I$(top_builddir)/src/67_triqs_ext -I$(top_srcdir)/src/67_triqs_ext +src_68_dmft_fcflags = -I$(top_builddir)/src/68_dmft -I$(top_srcdir)/src/68_dmft +src_68_lotf_fcflags = -I$(top_builddir)/src/68_lotf -I$(top_srcdir)/src/68_lotf +src_68_recursion_fcflags = -I$(top_builddir)/src/68_recursion -I$(top_srcdir)/src/68_recursion +src_68_rsprc_fcflags = -I$(top_builddir)/src/68_rsprc -I$(top_srcdir)/src/68_rsprc +src_69_wfdesc_fcflags = -I$(top_builddir)/src/69_wfdesc -I$(top_srcdir)/src/69_wfdesc +src_70_gw_fcflags = -I$(top_builddir)/src/70_gw -I$(top_srcdir)/src/70_gw +src_71_bse_fcflags = -I$(top_builddir)/src/71_bse -I$(top_srcdir)/src/71_bse +src_71_wannier_fcflags = -I$(top_builddir)/src/71_wannier -I$(top_srcdir)/src/71_wannier +src_72_response_fcflags = -I$(top_builddir)/src/72_response -I$(top_srcdir)/src/72_response +src_77_ddb_fcflags = -I$(top_builddir)/src/77_ddb -I$(top_srcdir)/src/77_ddb +src_77_suscep_fcflags = -I$(top_builddir)/src/77_suscep -I$(top_srcdir)/src/77_suscep +src_78_effpot_fcflags = -I$(top_builddir)/src/78_effpot -I$(top_srcdir)/src/78_effpot +src_78_eph_fcflags = -I$(top_builddir)/src/78_eph -I$(top_srcdir)/src/78_eph +src_79_seqpar_mpi_fcflags = -I$(top_builddir)/src/79_seqpar_mpi -I$(top_srcdir)/src/79_seqpar_mpi +src_80_rttddft_fcflags = -I$(top_builddir)/src/80_rttddft -I$(top_srcdir)/src/80_rttddft +src_80_tdep_fcflags = -I$(top_builddir)/src/80_tdep -I$(top_srcdir)/src/80_tdep +src_94_scfcv_fcflags = -I$(top_builddir)/src/94_scfcv -I$(top_srcdir)/src/94_scfcv +src_95_drive_fcflags = -I$(top_builddir)/src/95_drive -I$(top_srcdir)/src/95_drive +src_common_fcflags = -I$(top_builddir)/shared/common/src/incs -I$(top_srcdir)/shared/common/src/incs -I$(top_builddir)/shared/common/src/mods -I$(top_srcdir)/shared/common/src/mods +src_core_fcflags = -I$(top_builddir)/src/incs -I$(top_srcdir)/src/incs -I$(top_builddir)/src/mods -I$(top_srcdir)/src/mods +src_libpaw_fcflags = -I$(top_builddir)/shared/libpaw/incs -I$(top_srcdir)/shared/libpaw/incs -I$(top_builddir)/shared/libpaw/mods -I$(top_srcdir)/shared/libpaw/mods +srcdir = . +sysconfdir = ${prefix}/etc +target = x86_64-apple-darwin18.7.0 +target_alias = +target_cpu = x86_64 +target_os = darwin18.7.0 +target_vendor = apple +top_build_prefix = ../../../../ +top_builddir = ../../../.. +top_srcdir = ../../../.. +with_abinit_common = +with_bigdft = +with_config_file = +with_debug_flavor = +with_fallbacks = +with_fc_vendor = +with_fc_version = +with_fft_flavor = fftw3 +with_fftw3 = +with_gnu_ld = +with_gpu = +with_hdf5 = /opt/local +with_kokkos = +with_levmar = +with_libpaw = +with_libpsml = +with_libxc = /opt/local +with_libxml2 = +with_linalg_flavor = openblas +with_mpi = /opt/local +with_mpi_level = +with_netcdf = /opt/local +with_optim_flavor = +with_papi = +with_pfft = +with_triqs = +with_wannier90 = +with_xmlf90 = +with_yakl = +EXTRA_DIST = \ + abi_clib.h \ + abi_common.h \ + cuda_common.h \ + string_f.h + +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu shared/common/src/incs/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu shared/common/src/incs/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +tags TAGS: + +ctags CTAGS: + +cscope cscopelist: + + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile all-local +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am all-local check check-am clean clean-generic \ + cscopelist-am ctags-am distclean distclean-generic distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ + pdf-am ps ps-am tags-am uninstall uninstall-am + +.PRECIOUS: Makefile + + +all-local: + @echo "There is no buildable file here" + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/GX-PAW/common/src/incs/Makefile.am b/GX-PAW/common/src/incs/Makefile.am new file mode 100644 index 00000000..33e8441a --- /dev/null +++ b/GX-PAW/common/src/incs/Makefile.am @@ -0,0 +1,19 @@ +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-inter on 2024/03/16 21:07:39 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-inter script or its config file instead. +# + +all-local: + @echo "There is no buildable file here" + +EXTRA_DIST = \ + abi_clib.h \ + abi_common.h \ + cuda_common.h \ + string_f.h diff --git a/GX-PAW/common/src/incs/Makefile.in b/GX-PAW/common/src/incs/Makefile.in new file mode 100644 index 00000000..25046e13 --- /dev/null +++ b/GX-PAW/common/src/incs/Makefile.in @@ -0,0 +1,1317 @@ +# Makefile.in generated by automake 1.16.3 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2020 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-inter on 2024/03/16 21:07:39 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-inter script or its config file instead. +# +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = shared/common/src/incs +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/m4/arch-gpu.m4 \ + $(top_srcdir)/config/m4/arch-mpi.m4 \ + $(top_srcdir)/config/m4/auto-autotools.m4 \ + $(top_srcdir)/config/m4/auto-corelibs.m4 \ + $(top_srcdir)/config/m4/auto-debug.m4 \ + $(top_srcdir)/config/m4/auto-dirflags.m4 \ + $(top_srcdir)/config/m4/auto-env.m4 \ + $(top_srcdir)/config/m4/auto-hints.m4 \ + $(top_srcdir)/config/m4/auto-optim.m4 \ + $(top_srcdir)/config/m4/auto-options.m4 \ + $(top_srcdir)/config/m4/auto-output.m4 \ + $(top_srcdir)/config/m4/auto-triggers.m4 \ + $(top_srcdir)/config/m4/conf-atompaw.m4 \ + $(top_srcdir)/config/m4/conf-debug.m4 \ + $(top_srcdir)/config/m4/conf-fallbacks.m4 \ + $(top_srcdir)/config/m4/conf-files.m4 \ + $(top_srcdir)/config/m4/conf-init.m4 \ + $(top_srcdir)/config/m4/conf-openmp.m4 \ + $(top_srcdir)/config/m4/conf-optim.m4 \ + $(top_srcdir)/config/m4/lang-c++.m4 \ + $(top_srcdir)/config/m4/lang-c.m4 \ + $(top_srcdir)/config/m4/lang-fortran-import.m4 \ + $(top_srcdir)/config/m4/lang-fortran.m4 \ + $(top_srcdir)/config/m4/lang-python.m4 \ + $(top_srcdir)/config/m4/libxml2.m4 \ + $(top_srcdir)/config/m4/misc-display.m4 \ + $(top_srcdir)/config/m4/sd_abinit_common.m4 \ + $(top_srcdir)/config/m4/sd_arch_gpu.m4 \ + $(top_srcdir)/config/m4/sd_arch_mpi.m4 \ + $(top_srcdir)/config/m4/sd_bigdft.m4 \ + $(top_srcdir)/config/m4/sd_core.m4 \ + $(top_srcdir)/config/m4/sd_esl.m4 \ + $(top_srcdir)/config/m4/sd_fftw3.m4 \ + $(top_srcdir)/config/m4/sd_gpu_kokkos.m4 \ + $(top_srcdir)/config/m4/sd_gpu_yakl.m4 \ + $(top_srcdir)/config/m4/sd_io_hdf5.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf_fortran.m4 \ + $(top_srcdir)/config/m4/sd_levmar.m4 \ + $(top_srcdir)/config/m4/sd_libpaw.m4 \ + $(top_srcdir)/config/m4/sd_libpsml.m4 \ + $(top_srcdir)/config/m4/sd_libxc.m4 \ + $(top_srcdir)/config/m4/sd_math_fft.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_core.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_util.m4 \ + $(top_srcdir)/config/m4/sd_papi.m4 \ + $(top_srcdir)/config/m4/sd_pfft.m4 \ + $(top_srcdir)/config/m4/sd_triqs.m4 \ + $(top_srcdir)/config/m4/sd_wannier90.m4 \ + $(top_srcdir)/config/m4/sd_xmlf90.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +SOURCES = +DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(srcdir)/Makefile.in +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ABINIT_BINARY_PACKAGE = @ABINIT_BINARY_PACKAGE@ +ABINIT_COMMON_CPPFLAGS = @ABINIT_COMMON_CPPFLAGS@ +ABINIT_COMMON_FCFLAGS = @ABINIT_COMMON_FCFLAGS@ +ABINIT_COMMON_LDFLAGS = @ABINIT_COMMON_LDFLAGS@ +ABINIT_COMMON_LIBS = @ABINIT_COMMON_LIBS@ +ABINIT_TARGET = @ABINIT_TARGET@ +ABINIT_VERSION = @ABINIT_VERSION@ +ABINIT_VERSION_BASE = @ABINIT_VERSION_BASE@ +ABINIT_VERSION_BUILD = @ABINIT_VERSION_BUILD@ +ABINIT_VERSION_MAJOR = @ABINIT_VERSION_MAJOR@ +ABINIT_VERSION_MICRO = @ABINIT_VERSION_MICRO@ +ABINIT_VERSION_MINOR = @ABINIT_VERSION_MINOR@ +ABI_CPPFLAGS = @ABI_CPPFLAGS@ +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +ARFLAGS = @ARFLAGS@ +ARFLAGS_CMD = @ARFLAGS_CMD@ +ARFLAGS_DEBUG = @ARFLAGS_DEBUG@ +ARFLAGS_EXTRA = @ARFLAGS_EXTRA@ +ARFLAGS_HINTS = @ARFLAGS_HINTS@ +ARFLAGS_OPTIM = @ARFLAGS_OPTIM@ +ATOMPAW_BIN = @ATOMPAW_BIN@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BIGDFT_CPPFLAGS = @BIGDFT_CPPFLAGS@ +BIGDFT_FCFLAGS = @BIGDFT_FCFLAGS@ +BIGDFT_LDFLAGS = @BIGDFT_LDFLAGS@ +BIGDFT_LIBS = @BIGDFT_LIBS@ +BOURNE_SHELL = @BOURNE_SHELL@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CC_LDFLAGS = @CC_LDFLAGS@ +CC_LDFLAGS_DEBUG = @CC_LDFLAGS_DEBUG@ +CC_LDFLAGS_EXTRA = @CC_LDFLAGS_EXTRA@ +CC_LDFLAGS_GPU = @CC_LDFLAGS_GPU@ +CC_LDFLAGS_HINTS = @CC_LDFLAGS_HINTS@ +CC_LDFLAGS_OPTIM = @CC_LDFLAGS_OPTIM@ +CC_LIBS = @CC_LIBS@ +CC_LIBS_DEBUG = @CC_LIBS_DEBUG@ +CC_LIBS_EXTRA = @CC_LIBS_EXTRA@ +CC_LIBS_GPU = @CC_LIBS_GPU@ +CC_LIBS_HINTS = @CC_LIBS_HINTS@ +CC_LIBS_OPTIM = @CC_LIBS_OPTIM@ +CFLAGS = @CFLAGS@ +CFLAGS_DEBUG = @CFLAGS_DEBUG@ +CFLAGS_EXTRA = @CFLAGS_EXTRA@ +CFLAGS_GPU = @CFLAGS_GPU@ +CFLAGS_HINTS = @CFLAGS_HINTS@ +CFLAGS_OPTIM = @CFLAGS_OPTIM@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CPPFLAGS_DEBUG = @CPPFLAGS_DEBUG@ +CPPFLAGS_EXTRA = @CPPFLAGS_EXTRA@ +CPPFLAGS_GPU = @CPPFLAGS_GPU@ +CPPFLAGS_HINTS = @CPPFLAGS_HINTS@ +CPPFLAGS_HINTS_EXT = @CPPFLAGS_HINTS_EXT@ +CPPFLAGS_OPTIM = @CPPFLAGS_OPTIM@ +CXX = @CXX@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CXXFLAGS_DEBUG = @CXXFLAGS_DEBUG@ +CXXFLAGS_EXTRA = @CXXFLAGS_EXTRA@ +CXXFLAGS_GPU = @CXXFLAGS_GPU@ +CXXFLAGS_HINTS = @CXXFLAGS_HINTS@ +CXXFLAGS_OPTIM = @CXXFLAGS_OPTIM@ +CXX_LDFLAGS = @CXX_LDFLAGS@ +CXX_LDFLAGS_DEBUG = @CXX_LDFLAGS_DEBUG@ +CXX_LDFLAGS_EXTRA = @CXX_LDFLAGS_EXTRA@ +CXX_LDFLAGS_GPU = @CXX_LDFLAGS_GPU@ +CXX_LDFLAGS_HINTS = @CXX_LDFLAGS_HINTS@ +CXX_LDFLAGS_OPTIM = @CXX_LDFLAGS_OPTIM@ +CXX_LIBS = @CXX_LIBS@ +CXX_LIBS_DEBUG = @CXX_LIBS_DEBUG@ +CXX_LIBS_EXTRA = @CXX_LIBS_EXTRA@ +CXX_LIBS_GPU = @CXX_LIBS_GPU@ +CXX_LIBS_HINTS = @CXX_LIBS_HINTS@ +CXX_LIBS_OPTIM = @CXX_LIBS_OPTIM@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ +FCFLAGS = @FCFLAGS@ +FCFLAGS_DEBUG = @FCFLAGS_DEBUG@ +FCFLAGS_EXTRA = @FCFLAGS_EXTRA@ +FCFLAGS_F90 = @FCFLAGS_F90@ +FCFLAGS_FIXEDFORM = @FCFLAGS_FIXEDFORM@ +FCFLAGS_FREEFORM = @FCFLAGS_FREEFORM@ +FCFLAGS_HINTS = @FCFLAGS_HINTS@ +FCFLAGS_MODDIR = @FCFLAGS_MODDIR@ +FCFLAGS_OPENMP = @FCFLAGS_OPENMP@ +FCFLAGS_OPENMP_OFFLOAD = @FCFLAGS_OPENMP_OFFLOAD@ +FCFLAGS_OPTIM = @FCFLAGS_OPTIM@ +FCLIBS = @FCLIBS@ +FC_LDFLAGS = @FC_LDFLAGS@ +FC_LDFLAGS_DEBUG = @FC_LDFLAGS_DEBUG@ +FC_LDFLAGS_EXTRA = @FC_LDFLAGS_EXTRA@ +FC_LDFLAGS_HINTS = @FC_LDFLAGS_HINTS@ +FC_LDFLAGS_OPTIM = @FC_LDFLAGS_OPTIM@ +FC_LIBS = @FC_LIBS@ +FC_LIBS_DEBUG = @FC_LIBS_DEBUG@ +FC_LIBS_EXTRA = @FC_LIBS_EXTRA@ +FC_LIBS_HINTS = @FC_LIBS_HINTS@ +FC_LIBS_OPTIM = @FC_LIBS_OPTIM@ +FC_NOWRAP = @FC_NOWRAP@ +FFLAGS = @FFLAGS@ +FFTW3_CFLAGS = @FFTW3_CFLAGS@ +FFTW3_CPPFLAGS = @FFTW3_CPPFLAGS@ +FFTW3_FCFLAGS = @FFTW3_FCFLAGS@ +FFTW3_LDFLAGS = @FFTW3_LDFLAGS@ +FFTW3_LIBS = @FFTW3_LIBS@ +FFT_CFLAGS = @FFT_CFLAGS@ +FFT_FCFLAGS = @FFT_FCFLAGS@ +FPP = @FPP@ +FPPFLAGS = @FPPFLAGS@ +FPPFLAGS_DEBUG = @FPPFLAGS_DEBUG@ +FPPFLAGS_EXTRA = @FPPFLAGS_EXTRA@ +FPPFLAGS_HINTS = @FPPFLAGS_HINTS@ +FPPFLAGS_OPTIM = @FPPFLAGS_OPTIM@ +GPU_ARCH = @GPU_ARCH@ +GPU_CFLAGS = @GPU_CFLAGS@ +GPU_CPPFLAGS = @GPU_CPPFLAGS@ +GPU_CXXFLAGS = @GPU_CXXFLAGS@ +GPU_FCFLAGS = @GPU_FCFLAGS@ +GPU_LDFLAGS = @GPU_LDFLAGS@ +GPU_LIBS = @GPU_LIBS@ +GRAPHATOM_BIN = @GRAPHATOM_BIN@ +GREP = @GREP@ +H5CC = @H5CC@ +HDF5_CFLAGS = @HDF5_CFLAGS@ +HDF5_CPPFLAGS = @HDF5_CPPFLAGS@ +HDF5_CXXFLAGS = @HDF5_CXXFLAGS@ +HDF5_FCFLAGS = @HDF5_FCFLAGS@ +HDF5_LDFLAGS = @HDF5_LDFLAGS@ +HDF5_LIBS = @HDF5_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +LDFLAGS = @LDFLAGS@ +LEVMAR_CFLAGS = @LEVMAR_CFLAGS@ +LEVMAR_CPPFLAGS = @LEVMAR_CPPFLAGS@ +LEVMAR_LDFLAGS = @LEVMAR_LDFLAGS@ +LEVMAR_LIBS = @LEVMAR_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPAW_CPPFLAGS = @LIBPAW_CPPFLAGS@ +LIBPAW_FCFLAGS = @LIBPAW_FCFLAGS@ +LIBPAW_LDFLAGS = @LIBPAW_LDFLAGS@ +LIBPAW_LIBS = @LIBPAW_LIBS@ +LIBPSML_CPPFLAGS = @LIBPSML_CPPFLAGS@ +LIBPSML_FCFLAGS = @LIBPSML_FCFLAGS@ +LIBPSML_LDFLAGS = @LIBPSML_LDFLAGS@ +LIBPSML_LIBS = @LIBPSML_LIBS@ +LIBS = @LIBS@ +LIBXC_CFLAGS = @LIBXC_CFLAGS@ +LIBXC_CPPFLAGS = @LIBXC_CPPFLAGS@ +LIBXC_FCFLAGS = @LIBXC_FCFLAGS@ +LIBXC_LDFLAGS = @LIBXC_LDFLAGS@ +LIBXC_LIBS = @LIBXC_LIBS@ +LIBXML2_CPPFLAGS = @LIBXML2_CPPFLAGS@ +LIBXML2_FCFLAGS = @LIBXML2_FCFLAGS@ +LIBXML2_LIBS = @LIBXML2_LIBS@ +LINALG_CFLAGS = @LINALG_CFLAGS@ +LINALG_CPPFLAGS = @LINALG_CPPFLAGS@ +LINALG_CXXFLAGS = @LINALG_CXXFLAGS@ +LINALG_FCFLAGS = @LINALG_FCFLAGS@ +LINALG_LDFLAGS = @LINALG_LDFLAGS@ +LINALG_LIBS = @LINALG_LIBS@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODEXT = @MODEXT@ +MPI_CFLAGS = @MPI_CFLAGS@ +MPI_CPPFLAGS = @MPI_CPPFLAGS@ +MPI_CXXFLAGS = @MPI_CXXFLAGS@ +MPI_FCFLAGS = @MPI_FCFLAGS@ +MPI_LDFLAGS = @MPI_LDFLAGS@ +MPI_LIBS = @MPI_LIBS@ +MV = @MV@ +NETCDF_CFLAGS = @NETCDF_CFLAGS@ +NETCDF_CPPFLAGS = @NETCDF_CPPFLAGS@ +NETCDF_CXXFLAGS = @NETCDF_CXXFLAGS@ +NETCDF_FCFLAGS = @NETCDF_FCFLAGS@ +NETCDF_FORTRAN_CFLAGS = @NETCDF_FORTRAN_CFLAGS@ +NETCDF_FORTRAN_CPPFLAGS = @NETCDF_FORTRAN_CPPFLAGS@ +NETCDF_FORTRAN_CXXFLAGS = @NETCDF_FORTRAN_CXXFLAGS@ +NETCDF_FORTRAN_FCFLAGS = @NETCDF_FORTRAN_FCFLAGS@ +NETCDF_FORTRAN_LDFLAGS = @NETCDF_FORTRAN_LDFLAGS@ +NETCDF_FORTRAN_LIBS = @NETCDF_FORTRAN_LIBS@ +NETCDF_LDFLAGS = @NETCDF_LDFLAGS@ +NETCDF_LIBS = @NETCDF_LIBS@ +NVCC = @NVCC@ +NVCC_CFLAGS = @NVCC_CFLAGS@ +NVCC_CPPFLAGS = @NVCC_CPPFLAGS@ +NVCC_LDFLAGS = @NVCC_LDFLAGS@ +NVCC_LIBS = @NVCC_LIBS@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PAPI_CFLAGS = @PAPI_CFLAGS@ +PAPI_CPPFLAGS = @PAPI_CPPFLAGS@ +PAPI_LDFLAGS = @PAPI_LDFLAGS@ +PAPI_LIBS = @PAPI_LIBS@ +PATCH = @PATCH@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PFFT_CFLAGS = @PFFT_CFLAGS@ +PFFT_CPPFLAGS = @PFFT_CPPFLAGS@ +PFFT_LDFLAGS = @PFFT_LDFLAGS@ +PFFT_LIBS = @PFFT_LIBS@ +PYFLAGS = @PYFLAGS@ +PYTHON = @PYTHON@ +PYTHON_CONFIG = @PYTHON_CONFIG@ +PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ +RANLIB = @RANLIB@ +REALPATH = @REALPATH@ +RM = @RM@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +TAR = @TAR@ +TRIQS_CFLAGS = @TRIQS_CFLAGS@ +TRIQS_CPPFLAGS = @TRIQS_CPPFLAGS@ +TRIQS_CXXFLAGS = @TRIQS_CXXFLAGS@ +TRIQS_LDFLAGS = @TRIQS_LDFLAGS@ +TRIQS_LIBS = @TRIQS_LIBS@ +TRUE_CPP = @TRUE_CPP@ +VERSION = @VERSION@ +WANNIER90_CPPFLAGS = @WANNIER90_CPPFLAGS@ +WANNIER90_FCFLAGS = @WANNIER90_FCFLAGS@ +WANNIER90_LDFLAGS = @WANNIER90_LDFLAGS@ +WANNIER90_LIBS = @WANNIER90_LIBS@ +XML2_CONFIG = @XML2_CONFIG@ +XMLF90_CPPFLAGS = @XMLF90_CPPFLAGS@ +XMLF90_FCFLAGS = @XMLF90_FCFLAGS@ +XMLF90_LDFLAGS = @XMLF90_LDFLAGS@ +XMLF90_LIBS = @XMLF90_LIBS@ +XML_CPPFLAGS = @XML_CPPFLAGS@ +XML_LIBS = @XML_LIBS@ +XPP = @XPP@ +XPPFLAGS = @XPPFLAGS@ +XPPFLAGS_DEBUG = @XPPFLAGS_DEBUG@ +XPPFLAGS_EXTRA = @XPPFLAGS_EXTRA@ +XPPFLAGS_OPTIM = @XPPFLAGS_OPTIM@ +YAKL_CPPFLAGS = @YAKL_CPPFLAGS@ +YAKL_FCFLAGS = @YAKL_FCFLAGS@ +YAKL_LDFLAGS = @YAKL_LDFLAGS@ +YAKL_LIBS = @YAKL_LIBS@ +abi_ac_distcheck = @abi_ac_distcheck@ +abi_ac_version = @abi_ac_version@ +abi_am_version = @abi_am_version@ +abi_avx_safe_mode_enable = @abi_avx_safe_mode_enable@ +abi_bse_unpacked_enable = @abi_bse_unpacked_enable@ +abi_cc_path = @abi_cc_path@ +abi_cc_vendor = @abi_cc_vendor@ +abi_cc_version = @abi_cc_version@ +abi_cclock_enable = @abi_cclock_enable@ +abi_cpp_path = @abi_cpp_path@ +abi_cpu_64bits = @abi_cpu_64bits@ +abi_cpu_bits = @abi_cpu_bits@ +abi_cpu_model = @abi_cpu_model@ +abi_cpu_platform = @abi_cpu_platform@ +abi_cpu_spec = @abi_cpu_spec@ +abi_cpu_vendor = @abi_cpu_vendor@ +abi_crpa_optim_enable = @abi_crpa_optim_enable@ +abi_cxx_path = @abi_cxx_path@ +abi_cxx_vendor = @abi_cxx_vendor@ +abi_cxx_version = @abi_cxx_version@ +abi_debug_flavor = @abi_debug_flavor@ +abi_exports_enable = @abi_exports_enable@ +abi_fbk_abinit_common_ok = @abi_fbk_abinit_common_ok@ +abi_fbk_bigdft_ok = @abi_fbk_bigdft_ok@ +abi_fbk_config = @abi_fbk_config@ +abi_fbk_enable = @abi_fbk_enable@ +abi_fbk_fft_ok = @abi_fbk_fft_ok@ +abi_fbk_fftw3_ok = @abi_fbk_fftw3_ok@ +abi_fbk_gpu_ok = @abi_fbk_gpu_ok@ +abi_fbk_hdf5_ok = @abi_fbk_hdf5_ok@ +abi_fbk_init = @abi_fbk_init@ +abi_fbk_kokkos_ok = @abi_fbk_kokkos_ok@ +abi_fbk_levmar_ok = @abi_fbk_levmar_ok@ +abi_fbk_libpaw_ok = @abi_fbk_libpaw_ok@ +abi_fbk_libpsml_ok = @abi_fbk_libpsml_ok@ +abi_fbk_libxc_ok = @abi_fbk_libxc_ok@ +abi_fbk_libxml2_ok = @abi_fbk_libxml2_ok@ +abi_fbk_linalg_ok = @abi_fbk_linalg_ok@ +abi_fbk_list = @abi_fbk_list@ +abi_fbk_mpi_ok = @abi_fbk_mpi_ok@ +abi_fbk_netcdf_fortran_ok = @abi_fbk_netcdf_fortran_ok@ +abi_fbk_netcdf_ok = @abi_fbk_netcdf_ok@ +abi_fbk_papi_ok = @abi_fbk_papi_ok@ +abi_fbk_pfft_ok = @abi_fbk_pfft_ok@ +abi_fbk_prefix = @abi_fbk_prefix@ +abi_fbk_required = @abi_fbk_required@ +abi_fbk_triqs_ok = @abi_fbk_triqs_ok@ +abi_fbk_wannier90_ok = @abi_fbk_wannier90_ok@ +abi_fbk_xmlf90_ok = @abi_fbk_xmlf90_ok@ +abi_fbk_yakl_ok = @abi_fbk_yakl_ok@ +abi_fc_path = @abi_fc_path@ +abi_fc_vendor = @abi_fc_vendor@ +abi_fc_version = @abi_fc_version@ +abi_fc_wrap = @abi_fc_wrap@ +abi_fc_wrapper_enable = @abi_fc_wrapper_enable@ +abi_fpp_path = @abi_fpp_path@ +abi_gpu_arch = @abi_gpu_arch@ +abi_gpu_fcflags = @abi_gpu_fcflags@ +abi_gpu_flavor = @abi_gpu_flavor@ +abi_gpu_hip_libdir = @abi_gpu_hip_libdir@ +abi_gpu_incs = @abi_gpu_incs@ +abi_gpu_ldflags = @abi_gpu_ldflags@ +abi_gpu_libs = @abi_gpu_libs@ +abi_gpu_nvtx_v3 = @abi_gpu_nvtx_v3@ +abi_gpu_roctx = @abi_gpu_roctx@ +abi_gw_dpc_enable = @abi_gw_dpc_enable@ +abi_hints_enable = @abi_hints_enable@ +abi_libtetra_enable = @abi_libtetra_enable@ +abi_libxml2_cppflags = @abi_libxml2_cppflags@ +abi_libxml2_enable = @abi_libxml2_enable@ +abi_libxml2_fcflags = @abi_libxml2_fcflags@ +abi_libxml2_init = @abi_libxml2_init@ +abi_libxml2_ldflags = @abi_libxml2_ldflags@ +abi_libxml2_libs = @abi_libxml2_libs@ +abi_libxml2_ok = @abi_libxml2_ok@ +abi_libxml2_prefix = @abi_libxml2_prefix@ +abi_lotf_enable = @abi_lotf_enable@ +abi_lt_version = @abi_lt_version@ +abi_m4_version = @abi_m4_version@ +abi_memory_profiling_enable = @abi_memory_profiling_enable@ +abi_mpi_cflags = @abi_mpi_cflags@ +abi_mpi_cppflags = @abi_mpi_cppflags@ +abi_mpi_cxxflags = @abi_mpi_cxxflags@ +abi_mpi_enable = @abi_mpi_enable@ +abi_mpi_fcflags = @abi_mpi_fcflags@ +abi_mpi_flavor = @abi_mpi_flavor@ +abi_mpi_gpu_aware_enable = @abi_mpi_gpu_aware_enable@ +abi_mpi_incs = @abi_mpi_incs@ +abi_mpi_inplace_enable = @abi_mpi_inplace_enable@ +abi_mpi_interfaces_bugfix_enable = @abi_mpi_interfaces_bugfix_enable@ +abi_mpi_io_default_enable = @abi_mpi_io_default_enable@ +abi_mpi_io_enable = @abi_mpi_io_enable@ +abi_mpi_ldflags = @abi_mpi_ldflags@ +abi_mpi_level = @abi_mpi_level@ +abi_mpi_libs = @abi_mpi_libs@ +abi_netcdf_default_enable = @abi_netcdf_default_enable@ +abi_openmp_enable = @abi_openmp_enable@ +abi_openmp_offload_enable = @abi_openmp_offload_enable@ +abi_optim_flavor = @abi_optim_flavor@ +abi_python_invocation_enable = @abi_python_invocation_enable@ +abi_source_debug_enable = @abi_source_debug_enable@ +abi_stdin_enable = @abi_stdin_enable@ +abi_sys_spec = @abi_sys_spec@ +abi_timer_enable = @abi_timer_enable@ +abi_triqs_v1_4_enable = @abi_triqs_v1_4_enable@ +abi_triqs_v2_0_enable = @abi_triqs_v2_0_enable@ +abi_zdot_bugfix_enable = @abi_zdot_bugfix_enable@ +abinit_bindir = @abinit_bindir@ +abinit_builddir = @abinit_builddir@ +abinit_chkdir = @abinit_chkdir@ +abinit_datdir = @abinit_datdir@ +abinit_docdir = @abinit_docdir@ +abinit_incdir = @abinit_incdir@ +abinit_libdir = @abinit_libdir@ +abinit_mandir = @abinit_mandir@ +abinit_prefix = @abinit_prefix@ +abinit_srcdir = @abinit_srcdir@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_FC = @ac_ct_FC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cc_info_string = @cc_info_string@ +cxx_info_string = @cxx_info_string@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +enable_avx_safe_mode = @enable_avx_safe_mode@ +enable_bse_unpacked = @enable_bse_unpacked@ +enable_cclock = @enable_cclock@ +enable_crpa_optim = @enable_crpa_optim@ +enable_exports = @enable_exports@ +enable_fc_wrapper = @enable_fc_wrapper@ +enable_gw_dpc = @enable_gw_dpc@ +enable_hints = @enable_hints@ +enable_libtetra = @enable_libtetra@ +enable_lotf = @enable_lotf@ +enable_memory_profiling = @enable_memory_profiling@ +enable_mpi_gpu_aware = @enable_mpi_gpu_aware@ +enable_mpi_inplace = @enable_mpi_inplace@ +enable_mpi_interfaces_bugfix = @enable_mpi_interfaces_bugfix@ +enable_mpi_io = @enable_mpi_io@ +enable_mpi_io_default = @enable_mpi_io_default@ +enable_netcdf_default = @enable_netcdf_default@ +enable_openmp = @enable_openmp@ +enable_openmp_offload = @enable_openmp_offload@ +enable_python_invocation = @enable_python_invocation@ +enable_shared = @enable_shared@ +enable_source_debug = @enable_source_debug@ +enable_static = @enable_static@ +enable_stdin = @enable_stdin@ +enable_timer = @enable_timer@ +enable_triqs_v1_4 = @enable_triqs_v1_4@ +enable_triqs_v2_0 = @enable_triqs_v2_0@ +enable_zdot_bugfix = @enable_zdot_bugfix@ +exec_prefix = @exec_prefix@ +fc_info_string = @fc_info_string@ +fc_mod_fcflags = @fc_mod_fcflags@ +fc_timing = @fc_timing@ +fcflags_opt_02_clib = @fcflags_opt_02_clib@ +fcflags_opt_10_defs = @fcflags_opt_10_defs@ +fcflags_opt_11_memory_mpi = @fcflags_opt_11_memory_mpi@ +fcflags_opt_12_hide_mpi = @fcflags_opt_12_hide_mpi@ +fcflags_opt_14_hidewrite = @fcflags_opt_14_hidewrite@ +fcflags_opt_16_hideleave = @fcflags_opt_16_hideleave@ +fcflags_opt_16_kokkos_toolbox = @fcflags_opt_16_kokkos_toolbox@ +fcflags_opt_17_gpu_toolbox = @fcflags_opt_17_gpu_toolbox@ +fcflags_opt_17_libtetra_ext = @fcflags_opt_17_libtetra_ext@ +fcflags_opt_17_minimax = @fcflags_opt_17_minimax@ +fcflags_opt_17_yaml_out = @fcflags_opt_17_yaml_out@ +fcflags_opt_18_timing = @fcflags_opt_18_timing@ +fcflags_opt_21_hashfuncs = @fcflags_opt_21_hashfuncs@ +fcflags_opt_27_toolbox_oop = @fcflags_opt_27_toolbox_oop@ +fcflags_opt_28_numeric_noabirule = @fcflags_opt_28_numeric_noabirule@ +fcflags_opt_29_kpoints = @fcflags_opt_29_kpoints@ +fcflags_opt_32_util = @fcflags_opt_32_util@ +fcflags_opt_33_xc_lowlevel = @fcflags_opt_33_xc_lowlevel@ +fcflags_opt_39_libpaw = @fcflags_opt_39_libpaw@ +fcflags_opt_41_geometry = @fcflags_opt_41_geometry@ +fcflags_opt_42_nlstrain = @fcflags_opt_42_nlstrain@ +fcflags_opt_42_parser = @fcflags_opt_42_parser@ +fcflags_opt_43_ptgroups = @fcflags_opt_43_ptgroups@ +fcflags_opt_43_wvl_wrappers = @fcflags_opt_43_wvl_wrappers@ +fcflags_opt_44_abitools = @fcflags_opt_44_abitools@ +fcflags_opt_44_abitypes_defs = @fcflags_opt_44_abitypes_defs@ +fcflags_opt_44_manage_kokkos = @fcflags_opt_44_manage_kokkos@ +fcflags_opt_45_geomoptim = @fcflags_opt_45_geomoptim@ +fcflags_opt_45_xgTools = @fcflags_opt_45_xgTools@ +fcflags_opt_46_ghc_omp = @fcflags_opt_46_ghc_omp@ +fcflags_opt_46_manage_cuda = @fcflags_opt_46_manage_cuda@ +fcflags_opt_48_diago = @fcflags_opt_48_diago@ +fcflags_opt_49_gw_toolbox_oop = @fcflags_opt_49_gw_toolbox_oop@ +fcflags_opt_51_manage_mpi = @fcflags_opt_51_manage_mpi@ +fcflags_opt_52_fft_mpi_noabirule = @fcflags_opt_52_fft_mpi_noabirule@ +fcflags_opt_53_ffts = @fcflags_opt_53_ffts@ +fcflags_opt_54_spacepar = @fcflags_opt_54_spacepar@ +fcflags_opt_55_abiutil = @fcflags_opt_55_abiutil@ +fcflags_opt_56_io_mpi = @fcflags_opt_56_io_mpi@ +fcflags_opt_56_mixing = @fcflags_opt_56_mixing@ +fcflags_opt_56_recipspace = @fcflags_opt_56_recipspace@ +fcflags_opt_56_xc = @fcflags_opt_56_xc@ +fcflags_opt_57_iopsp_parser = @fcflags_opt_57_iopsp_parser@ +fcflags_opt_57_iovars = @fcflags_opt_57_iovars@ +fcflags_opt_61_occeig = @fcflags_opt_61_occeig@ +fcflags_opt_62_cg_noabirule = @fcflags_opt_62_cg_noabirule@ +fcflags_opt_62_ctqmc = @fcflags_opt_62_ctqmc@ +fcflags_opt_62_iowfdenpot = @fcflags_opt_62_iowfdenpot@ +fcflags_opt_62_poisson = @fcflags_opt_62_poisson@ +fcflags_opt_62_wvl_wfs = @fcflags_opt_62_wvl_wfs@ +fcflags_opt_64_psp = @fcflags_opt_64_psp@ +fcflags_opt_65_lotf_base = @fcflags_opt_65_lotf_base@ +fcflags_opt_65_paw = @fcflags_opt_65_paw@ +fcflags_opt_66_nonlocal = @fcflags_opt_66_nonlocal@ +fcflags_opt_66_vdwxc = @fcflags_opt_66_vdwxc@ +fcflags_opt_66_wfs = @fcflags_opt_66_wfs@ +fcflags_opt_67_common = @fcflags_opt_67_common@ +fcflags_opt_67_python_invocation_ext = @fcflags_opt_67_python_invocation_ext@ +fcflags_opt_67_triqs_ext = @fcflags_opt_67_triqs_ext@ +fcflags_opt_68_dmft = @fcflags_opt_68_dmft@ +fcflags_opt_68_lotf = @fcflags_opt_68_lotf@ +fcflags_opt_68_recursion = @fcflags_opt_68_recursion@ +fcflags_opt_68_rsprc = @fcflags_opt_68_rsprc@ +fcflags_opt_69_wfdesc = @fcflags_opt_69_wfdesc@ +fcflags_opt_70_gw = @fcflags_opt_70_gw@ +fcflags_opt_71_bse = @fcflags_opt_71_bse@ +fcflags_opt_71_wannier = @fcflags_opt_71_wannier@ +fcflags_opt_72_response = @fcflags_opt_72_response@ +fcflags_opt_77_ddb = @fcflags_opt_77_ddb@ +fcflags_opt_77_suscep = @fcflags_opt_77_suscep@ +fcflags_opt_78_effpot = @fcflags_opt_78_effpot@ +fcflags_opt_78_eph = @fcflags_opt_78_eph@ +fcflags_opt_79_seqpar_mpi = @fcflags_opt_79_seqpar_mpi@ +fcflags_opt_80_rttddft = @fcflags_opt_80_rttddft@ +fcflags_opt_80_tdep = @fcflags_opt_80_tdep@ +fcflags_opt_94_scfcv = @fcflags_opt_94_scfcv@ +fcflags_opt_95_drive = @fcflags_opt_95_drive@ +fcflags_opt_98_main = @fcflags_opt_98_main@ +fcflags_opt_bigdft = @fcflags_opt_bigdft@ +fcflags_opt_default = @fcflags_opt_default@ +fcflags_opt_hdf5 = @fcflags_opt_hdf5@ +fcflags_opt_levmar = @fcflags_opt_levmar@ +fcflags_opt_libpsml = @fcflags_opt_libpsml@ +fcflags_opt_libxc = @fcflags_opt_libxc@ +fcflags_opt_libxml2 = @fcflags_opt_libxml2@ +fcflags_opt_linalg = @fcflags_opt_linalg@ +fcflags_opt_netcdf = @fcflags_opt_netcdf@ +fcflags_opt_netcdf_fortran = @fcflags_opt_netcdf_fortran@ +fcflags_opt_papi = @fcflags_opt_papi@ +fcflags_opt_triqs = @fcflags_opt_triqs@ +fcflags_opt_wannier90 = @fcflags_opt_wannier90@ +fcflags_opt_xmlf90 = @fcflags_opt_xmlf90@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sd_abinit_common_cppflags = @sd_abinit_common_cppflags@ +sd_abinit_common_enable = @sd_abinit_common_enable@ +sd_abinit_common_enable_def = @sd_abinit_common_enable_def@ +sd_abinit_common_fcflags = @sd_abinit_common_fcflags@ +sd_abinit_common_init = @sd_abinit_common_init@ +sd_abinit_common_ldflags = @sd_abinit_common_ldflags@ +sd_abinit_common_libs = @sd_abinit_common_libs@ +sd_abinit_common_ok = @sd_abinit_common_ok@ +sd_abinit_common_options = @sd_abinit_common_options@ +sd_abinit_common_policy = @sd_abinit_common_policy@ +sd_abinit_common_status = @sd_abinit_common_status@ +sd_bigdft_cppflags = @sd_bigdft_cppflags@ +sd_bigdft_enable = @sd_bigdft_enable@ +sd_bigdft_enable_def = @sd_bigdft_enable_def@ +sd_bigdft_fcflags = @sd_bigdft_fcflags@ +sd_bigdft_init = @sd_bigdft_init@ +sd_bigdft_ldflags = @sd_bigdft_ldflags@ +sd_bigdft_libs = @sd_bigdft_libs@ +sd_bigdft_ok = @sd_bigdft_ok@ +sd_bigdft_options = @sd_bigdft_options@ +sd_bigdft_policy = @sd_bigdft_policy@ +sd_bigdft_status = @sd_bigdft_status@ +sd_fft_cflags = @sd_fft_cflags@ +sd_fft_choices = @sd_fft_choices@ +sd_fft_cppflags = @sd_fft_cppflags@ +sd_fft_cxxflags = @sd_fft_cxxflags@ +sd_fft_enable = @sd_fft_enable@ +sd_fft_fcflags = @sd_fft_fcflags@ +sd_fft_flavor = @sd_fft_flavor@ +sd_fft_init = @sd_fft_init@ +sd_fft_ldflags = @sd_fft_ldflags@ +sd_fft_libs = @sd_fft_libs@ +sd_fft_ok = @sd_fft_ok@ +sd_fftw3_cflags = @sd_fftw3_cflags@ +sd_fftw3_cppflags = @sd_fftw3_cppflags@ +sd_fftw3_enable = @sd_fftw3_enable@ +sd_fftw3_enable_def = @sd_fftw3_enable_def@ +sd_fftw3_fcflags = @sd_fftw3_fcflags@ +sd_fftw3_init = @sd_fftw3_init@ +sd_fftw3_ldflags = @sd_fftw3_ldflags@ +sd_fftw3_libs = @sd_fftw3_libs@ +sd_fftw3_ok = @sd_fftw3_ok@ +sd_fftw3_options = @sd_fftw3_options@ +sd_fftw3_policy = @sd_fftw3_policy@ +sd_fftw3_status = @sd_fftw3_status@ +sd_gpu_cflags = @sd_gpu_cflags@ +sd_gpu_cppflags = @sd_gpu_cppflags@ +sd_gpu_cxxflags = @sd_gpu_cxxflags@ +sd_gpu_enable = @sd_gpu_enable@ +sd_gpu_enable_def = @sd_gpu_enable_def@ +sd_gpu_fcflags = @sd_gpu_fcflags@ +sd_gpu_init = @sd_gpu_init@ +sd_gpu_ldflags = @sd_gpu_ldflags@ +sd_gpu_libs = @sd_gpu_libs@ +sd_gpu_ok = @sd_gpu_ok@ +sd_gpu_options = @sd_gpu_options@ +sd_gpu_policy = @sd_gpu_policy@ +sd_gpu_prefix = @sd_gpu_prefix@ +sd_gpu_status = @sd_gpu_status@ +sd_hdf5_cflags = @sd_hdf5_cflags@ +sd_hdf5_cppflags = @sd_hdf5_cppflags@ +sd_hdf5_cxxflags = @sd_hdf5_cxxflags@ +sd_hdf5_enable = @sd_hdf5_enable@ +sd_hdf5_enable_def = @sd_hdf5_enable_def@ +sd_hdf5_enable_fc = @sd_hdf5_enable_fc@ +sd_hdf5_fcflags = @sd_hdf5_fcflags@ +sd_hdf5_h5cc = @sd_hdf5_h5cc@ +sd_hdf5_h5fc = @sd_hdf5_h5fc@ +sd_hdf5_init = @sd_hdf5_init@ +sd_hdf5_ldflags = @sd_hdf5_ldflags@ +sd_hdf5_libs = @sd_hdf5_libs@ +sd_hdf5_ok = @sd_hdf5_ok@ +sd_hdf5_options = @sd_hdf5_options@ +sd_hdf5_policy = @sd_hdf5_policy@ +sd_hdf5_status = @sd_hdf5_status@ +sd_kokkos_cppflags = @sd_kokkos_cppflags@ +sd_kokkos_cxxflags = @sd_kokkos_cxxflags@ +sd_kokkos_enable = @sd_kokkos_enable@ +sd_kokkos_enable_def = @sd_kokkos_enable_def@ +sd_kokkos_init = @sd_kokkos_init@ +sd_kokkos_ldflags = @sd_kokkos_ldflags@ +sd_kokkos_libs = @sd_kokkos_libs@ +sd_kokkos_ok = @sd_kokkos_ok@ +sd_kokkos_options = @sd_kokkos_options@ +sd_kokkos_policy = @sd_kokkos_policy@ +sd_kokkos_status = @sd_kokkos_status@ +sd_levmar_cflags = @sd_levmar_cflags@ +sd_levmar_cppflags = @sd_levmar_cppflags@ +sd_levmar_enable = @sd_levmar_enable@ +sd_levmar_enable_def = @sd_levmar_enable_def@ +sd_levmar_init = @sd_levmar_init@ +sd_levmar_ldflags = @sd_levmar_ldflags@ +sd_levmar_libs = @sd_levmar_libs@ +sd_levmar_ok = @sd_levmar_ok@ +sd_levmar_options = @sd_levmar_options@ +sd_levmar_policy = @sd_levmar_policy@ +sd_levmar_status = @sd_levmar_status@ +sd_libpaw_cppflags = @sd_libpaw_cppflags@ +sd_libpaw_enable = @sd_libpaw_enable@ +sd_libpaw_enable_def = @sd_libpaw_enable_def@ +sd_libpaw_fcflags = @sd_libpaw_fcflags@ +sd_libpaw_init = @sd_libpaw_init@ +sd_libpaw_ldflags = @sd_libpaw_ldflags@ +sd_libpaw_libs = @sd_libpaw_libs@ +sd_libpaw_ok = @sd_libpaw_ok@ +sd_libpaw_options = @sd_libpaw_options@ +sd_libpaw_policy = @sd_libpaw_policy@ +sd_libpaw_status = @sd_libpaw_status@ +sd_libpsml_cppflags = @sd_libpsml_cppflags@ +sd_libpsml_enable = @sd_libpsml_enable@ +sd_libpsml_enable_def = @sd_libpsml_enable_def@ +sd_libpsml_fcflags = @sd_libpsml_fcflags@ +sd_libpsml_init = @sd_libpsml_init@ +sd_libpsml_ldflags = @sd_libpsml_ldflags@ +sd_libpsml_libs = @sd_libpsml_libs@ +sd_libpsml_ok = @sd_libpsml_ok@ +sd_libpsml_options = @sd_libpsml_options@ +sd_libpsml_policy = @sd_libpsml_policy@ +sd_libpsml_status = @sd_libpsml_status@ +sd_libxc_cflags = @sd_libxc_cflags@ +sd_libxc_cppflags = @sd_libxc_cppflags@ +sd_libxc_enable = @sd_libxc_enable@ +sd_libxc_enable_def = @sd_libxc_enable_def@ +sd_libxc_enable_fc = @sd_libxc_enable_fc@ +sd_libxc_fcflags = @sd_libxc_fcflags@ +sd_libxc_init = @sd_libxc_init@ +sd_libxc_ldflags = @sd_libxc_ldflags@ +sd_libxc_libs = @sd_libxc_libs@ +sd_libxc_ok = @sd_libxc_ok@ +sd_libxc_options = @sd_libxc_options@ +sd_libxc_policy = @sd_libxc_policy@ +sd_libxc_status = @sd_libxc_status@ +sd_linalg_cflags = @sd_linalg_cflags@ +sd_linalg_choices = @sd_linalg_choices@ +sd_linalg_cppflags = @sd_linalg_cppflags@ +sd_linalg_cxxflags = @sd_linalg_cxxflags@ +sd_linalg_enable = @sd_linalg_enable@ +sd_linalg_fcflags = @sd_linalg_fcflags@ +sd_linalg_flavor = @sd_linalg_flavor@ +sd_linalg_has_elpa = @sd_linalg_has_elpa@ +sd_linalg_has_scalapack = @sd_linalg_has_scalapack@ +sd_linalg_init = @sd_linalg_init@ +sd_linalg_ldflags = @sd_linalg_ldflags@ +sd_linalg_libs = @sd_linalg_libs@ +sd_linalg_ok = @sd_linalg_ok@ +sd_mpi_cc = @sd_mpi_cc@ +sd_mpi_cflags = @sd_mpi_cflags@ +sd_mpi_cppflags = @sd_mpi_cppflags@ +sd_mpi_cxx = @sd_mpi_cxx@ +sd_mpi_enable = @sd_mpi_enable@ +sd_mpi_enable_cxx = @sd_mpi_enable_cxx@ +sd_mpi_enable_def = @sd_mpi_enable_def@ +sd_mpi_enable_fc = @sd_mpi_enable_fc@ +sd_mpi_fc = @sd_mpi_fc@ +sd_mpi_fcflags = @sd_mpi_fcflags@ +sd_mpi_init = @sd_mpi_init@ +sd_mpi_ldflags = @sd_mpi_ldflags@ +sd_mpi_libs = @sd_mpi_libs@ +sd_mpi_ok = @sd_mpi_ok@ +sd_mpi_options = @sd_mpi_options@ +sd_mpi_policy = @sd_mpi_policy@ +sd_mpi_status = @sd_mpi_status@ +sd_netcdf_cflags = @sd_netcdf_cflags@ +sd_netcdf_cppflags = @sd_netcdf_cppflags@ +sd_netcdf_enable = @sd_netcdf_enable@ +sd_netcdf_enable_def = @sd_netcdf_enable_def@ +sd_netcdf_fcflags = @sd_netcdf_fcflags@ +sd_netcdf_fortran_cflags = @sd_netcdf_fortran_cflags@ +sd_netcdf_fortran_cppflags = @sd_netcdf_fortran_cppflags@ +sd_netcdf_fortran_enable = @sd_netcdf_fortran_enable@ +sd_netcdf_fortran_enable_def = @sd_netcdf_fortran_enable_def@ +sd_netcdf_fortran_fcflags = @sd_netcdf_fortran_fcflags@ +sd_netcdf_fortran_init = @sd_netcdf_fortran_init@ +sd_netcdf_fortran_ldflags = @sd_netcdf_fortran_ldflags@ +sd_netcdf_fortran_libs = @sd_netcdf_fortran_libs@ +sd_netcdf_fortran_ok = @sd_netcdf_fortran_ok@ +sd_netcdf_fortran_options = @sd_netcdf_fortran_options@ +sd_netcdf_fortran_policy = @sd_netcdf_fortran_policy@ +sd_netcdf_fortran_status = @sd_netcdf_fortran_status@ +sd_netcdf_init = @sd_netcdf_init@ +sd_netcdf_ldflags = @sd_netcdf_ldflags@ +sd_netcdf_libs = @sd_netcdf_libs@ +sd_netcdf_ok = @sd_netcdf_ok@ +sd_netcdf_options = @sd_netcdf_options@ +sd_netcdf_policy = @sd_netcdf_policy@ +sd_netcdf_status = @sd_netcdf_status@ +sd_papi_cflags = @sd_papi_cflags@ +sd_papi_cppflags = @sd_papi_cppflags@ +sd_papi_enable = @sd_papi_enable@ +sd_papi_enable_def = @sd_papi_enable_def@ +sd_papi_init = @sd_papi_init@ +sd_papi_ldflags = @sd_papi_ldflags@ +sd_papi_libs = @sd_papi_libs@ +sd_papi_ok = @sd_papi_ok@ +sd_papi_options = @sd_papi_options@ +sd_papi_policy = @sd_papi_policy@ +sd_papi_sd_papi_fcflags = @sd_papi_sd_papi_fcflags@ +sd_papi_status = @sd_papi_status@ +sd_pfft_cflags = @sd_pfft_cflags@ +sd_pfft_cppflags = @sd_pfft_cppflags@ +sd_pfft_enable = @sd_pfft_enable@ +sd_pfft_enable_def = @sd_pfft_enable_def@ +sd_pfft_init = @sd_pfft_init@ +sd_pfft_ldflags = @sd_pfft_ldflags@ +sd_pfft_libs = @sd_pfft_libs@ +sd_pfft_ok = @sd_pfft_ok@ +sd_pfft_options = @sd_pfft_options@ +sd_pfft_policy = @sd_pfft_policy@ +sd_pfft_status = @sd_pfft_status@ +sd_sys_fcflags = @sd_sys_fcflags@ +sd_triqs_cflags = @sd_triqs_cflags@ +sd_triqs_cppflags = @sd_triqs_cppflags@ +sd_triqs_cxxflags = @sd_triqs_cxxflags@ +sd_triqs_enable = @sd_triqs_enable@ +sd_triqs_enable_def = @sd_triqs_enable_def@ +sd_triqs_fcflags = @sd_triqs_fcflags@ +sd_triqs_init = @sd_triqs_init@ +sd_triqs_ldflags = @sd_triqs_ldflags@ +sd_triqs_libs = @sd_triqs_libs@ +sd_triqs_ok = @sd_triqs_ok@ +sd_triqs_options = @sd_triqs_options@ +sd_triqs_policy = @sd_triqs_policy@ +sd_triqs_status = @sd_triqs_status@ +sd_wannier90_cppflags = @sd_wannier90_cppflags@ +sd_wannier90_enable = @sd_wannier90_enable@ +sd_wannier90_enable_def = @sd_wannier90_enable_def@ +sd_wannier90_fcflags = @sd_wannier90_fcflags@ +sd_wannier90_init = @sd_wannier90_init@ +sd_wannier90_ldflags = @sd_wannier90_ldflags@ +sd_wannier90_libs = @sd_wannier90_libs@ +sd_wannier90_ok = @sd_wannier90_ok@ +sd_wannier90_options = @sd_wannier90_options@ +sd_wannier90_policy = @sd_wannier90_policy@ +sd_wannier90_status = @sd_wannier90_status@ +sd_xmlf90_cppflags = @sd_xmlf90_cppflags@ +sd_xmlf90_enable = @sd_xmlf90_enable@ +sd_xmlf90_enable_def = @sd_xmlf90_enable_def@ +sd_xmlf90_fcflags = @sd_xmlf90_fcflags@ +sd_xmlf90_init = @sd_xmlf90_init@ +sd_xmlf90_ldflags = @sd_xmlf90_ldflags@ +sd_xmlf90_libs = @sd_xmlf90_libs@ +sd_xmlf90_ok = @sd_xmlf90_ok@ +sd_xmlf90_options = @sd_xmlf90_options@ +sd_xmlf90_policy = @sd_xmlf90_policy@ +sd_xmlf90_status = @sd_xmlf90_status@ +sd_yakl_cppflags = @sd_yakl_cppflags@ +sd_yakl_enable = @sd_yakl_enable@ +sd_yakl_enable_def = @sd_yakl_enable_def@ +sd_yakl_fcflags = @sd_yakl_fcflags@ +sd_yakl_init = @sd_yakl_init@ +sd_yakl_ldflags = @sd_yakl_ldflags@ +sd_yakl_libs = @sd_yakl_libs@ +sd_yakl_ok = @sd_yakl_ok@ +sd_yakl_options = @sd_yakl_options@ +sd_yakl_policy = @sd_yakl_policy@ +sd_yakl_status = @sd_yakl_status@ +sharedstatedir = @sharedstatedir@ +src_02_clib_fcflags = @src_02_clib_fcflags@ +src_10_defs_fcflags = @src_10_defs_fcflags@ +src_11_memory_mpi_fcflags = @src_11_memory_mpi_fcflags@ +src_12_hide_mpi_fcflags = @src_12_hide_mpi_fcflags@ +src_14_hidewrite_fcflags = @src_14_hidewrite_fcflags@ +src_16_hideleave_fcflags = @src_16_hideleave_fcflags@ +src_16_kokkos_toolbox_fcflags = @src_16_kokkos_toolbox_fcflags@ +src_17_gpu_toolbox_fcflags = @src_17_gpu_toolbox_fcflags@ +src_17_libtetra_ext_fcflags = @src_17_libtetra_ext_fcflags@ +src_17_minimax_fcflags = @src_17_minimax_fcflags@ +src_17_yaml_out_fcflags = @src_17_yaml_out_fcflags@ +src_18_timing_fcflags = @src_18_timing_fcflags@ +src_21_hashfuncs_fcflags = @src_21_hashfuncs_fcflags@ +src_27_toolbox_oop_fcflags = @src_27_toolbox_oop_fcflags@ +src_28_numeric_noabirule_fcflags = @src_28_numeric_noabirule_fcflags@ +src_29_kpoints_fcflags = @src_29_kpoints_fcflags@ +src_32_util_fcflags = @src_32_util_fcflags@ +src_33_xc_lowlevel_fcflags = @src_33_xc_lowlevel_fcflags@ +src_39_libpaw_fcflags = @src_39_libpaw_fcflags@ +src_41_geometry_fcflags = @src_41_geometry_fcflags@ +src_42_nlstrain_fcflags = @src_42_nlstrain_fcflags@ +src_42_parser_fcflags = @src_42_parser_fcflags@ +src_43_ptgroups_fcflags = @src_43_ptgroups_fcflags@ +src_43_wvl_wrappers_fcflags = @src_43_wvl_wrappers_fcflags@ +src_44_abitools_fcflags = @src_44_abitools_fcflags@ +src_44_abitypes_defs_fcflags = @src_44_abitypes_defs_fcflags@ +src_44_manage_kokkos_fcflags = @src_44_manage_kokkos_fcflags@ +src_45_geomoptim_fcflags = @src_45_geomoptim_fcflags@ +src_45_xgTools_fcflags = @src_45_xgTools_fcflags@ +src_46_ghc_omp_fcflags = @src_46_ghc_omp_fcflags@ +src_46_manage_cuda_fcflags = @src_46_manage_cuda_fcflags@ +src_48_diago_fcflags = @src_48_diago_fcflags@ +src_49_gw_toolbox_oop_fcflags = @src_49_gw_toolbox_oop_fcflags@ +src_51_manage_mpi_fcflags = @src_51_manage_mpi_fcflags@ +src_52_fft_mpi_noabirule_fcflags = @src_52_fft_mpi_noabirule_fcflags@ +src_53_ffts_fcflags = @src_53_ffts_fcflags@ +src_54_spacepar_fcflags = @src_54_spacepar_fcflags@ +src_55_abiutil_fcflags = @src_55_abiutil_fcflags@ +src_56_io_mpi_fcflags = @src_56_io_mpi_fcflags@ +src_56_mixing_fcflags = @src_56_mixing_fcflags@ +src_56_recipspace_fcflags = @src_56_recipspace_fcflags@ +src_56_xc_fcflags = @src_56_xc_fcflags@ +src_57_iopsp_parser_fcflags = @src_57_iopsp_parser_fcflags@ +src_57_iovars_fcflags = @src_57_iovars_fcflags@ +src_61_occeig_fcflags = @src_61_occeig_fcflags@ +src_62_cg_noabirule_fcflags = @src_62_cg_noabirule_fcflags@ +src_62_ctqmc_fcflags = @src_62_ctqmc_fcflags@ +src_62_iowfdenpot_fcflags = @src_62_iowfdenpot_fcflags@ +src_62_poisson_fcflags = @src_62_poisson_fcflags@ +src_62_wvl_wfs_fcflags = @src_62_wvl_wfs_fcflags@ +src_64_psp_fcflags = @src_64_psp_fcflags@ +src_65_lotf_base_fcflags = @src_65_lotf_base_fcflags@ +src_65_paw_fcflags = @src_65_paw_fcflags@ +src_66_nonlocal_fcflags = @src_66_nonlocal_fcflags@ +src_66_vdwxc_fcflags = @src_66_vdwxc_fcflags@ +src_66_wfs_fcflags = @src_66_wfs_fcflags@ +src_67_common_fcflags = @src_67_common_fcflags@ +src_67_python_invocation_ext_fcflags = @src_67_python_invocation_ext_fcflags@ +src_67_triqs_ext_fcflags = @src_67_triqs_ext_fcflags@ +src_68_dmft_fcflags = @src_68_dmft_fcflags@ +src_68_lotf_fcflags = @src_68_lotf_fcflags@ +src_68_recursion_fcflags = @src_68_recursion_fcflags@ +src_68_rsprc_fcflags = @src_68_rsprc_fcflags@ +src_69_wfdesc_fcflags = @src_69_wfdesc_fcflags@ +src_70_gw_fcflags = @src_70_gw_fcflags@ +src_71_bse_fcflags = @src_71_bse_fcflags@ +src_71_wannier_fcflags = @src_71_wannier_fcflags@ +src_72_response_fcflags = @src_72_response_fcflags@ +src_77_ddb_fcflags = @src_77_ddb_fcflags@ +src_77_suscep_fcflags = @src_77_suscep_fcflags@ +src_78_effpot_fcflags = @src_78_effpot_fcflags@ +src_78_eph_fcflags = @src_78_eph_fcflags@ +src_79_seqpar_mpi_fcflags = @src_79_seqpar_mpi_fcflags@ +src_80_rttddft_fcflags = @src_80_rttddft_fcflags@ +src_80_tdep_fcflags = @src_80_tdep_fcflags@ +src_94_scfcv_fcflags = @src_94_scfcv_fcflags@ +src_95_drive_fcflags = @src_95_drive_fcflags@ +src_common_fcflags = @src_common_fcflags@ +src_core_fcflags = @src_core_fcflags@ +src_libpaw_fcflags = @src_libpaw_fcflags@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +with_abinit_common = @with_abinit_common@ +with_bigdft = @with_bigdft@ +with_config_file = @with_config_file@ +with_debug_flavor = @with_debug_flavor@ +with_fallbacks = @with_fallbacks@ +with_fc_vendor = @with_fc_vendor@ +with_fc_version = @with_fc_version@ +with_fft_flavor = @with_fft_flavor@ +with_fftw3 = @with_fftw3@ +with_gnu_ld = @with_gnu_ld@ +with_gpu = @with_gpu@ +with_hdf5 = @with_hdf5@ +with_kokkos = @with_kokkos@ +with_levmar = @with_levmar@ +with_libpaw = @with_libpaw@ +with_libpsml = @with_libpsml@ +with_libxc = @with_libxc@ +with_libxml2 = @with_libxml2@ +with_linalg_flavor = @with_linalg_flavor@ +with_mpi = @with_mpi@ +with_mpi_level = @with_mpi_level@ +with_netcdf = @with_netcdf@ +with_optim_flavor = @with_optim_flavor@ +with_papi = @with_papi@ +with_pfft = @with_pfft@ +with_triqs = @with_triqs@ +with_wannier90 = @with_wannier90@ +with_xmlf90 = @with_xmlf90@ +with_yakl = @with_yakl@ +EXTRA_DIST = \ + abi_clib.h \ + abi_common.h \ + cuda_common.h \ + string_f.h + +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu shared/common/src/incs/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu shared/common/src/incs/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +tags TAGS: + +ctags CTAGS: + +cscope cscopelist: + + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile all-local +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am all-local check check-am clean clean-generic \ + cscopelist-am ctags-am distclean distclean-generic distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ + pdf-am ps ps-am tags-am uninstall uninstall-am + +.PRECIOUS: Makefile + + +all-local: + @echo "There is no buildable file here" + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/GX-PAW/common/src/incs/__pycache__/abinit.cpython-36.pyc b/GX-PAW/common/src/incs/__pycache__/abinit.cpython-36.pyc new file mode 100644 index 00000000..f9e5a815 Binary files /dev/null and b/GX-PAW/common/src/incs/__pycache__/abinit.cpython-36.pyc differ diff --git a/GX-PAW/common/src/incs/abi_clib.h b/GX-PAW/common/src/incs/abi_clib.h new file mode 100644 index 00000000..b5024dba --- /dev/null +++ b/GX-PAW/common/src/incs/abi_clib.h @@ -0,0 +1,133 @@ +/* + * Copyright (C) 2009-2024 ABINIT group (MG) + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + + +/* ABINIT internal header file */ +#ifndef _ABINIT_CLIB_H +#define _ABINIT_CLIB_H + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#ifdef HAVE_STDIO_H +#include +#endif + +#ifdef HAVE_STDLIB_H +#include /* size_t */ +#endif + +#ifdef HAVE_STDARG_H +#include /* va_list */ +#endif + +#ifdef HAVE_STDDEF_H +#include /* ptrdiff_t and size_t */ +#endif + +#ifdef HAVE_SYS_TYPES_H +#include +#endif + +#ifdef HAVE_STDINT_H +#include /* uintptr_t, maybe */ +#endif + +#ifdef HAVE_INTTYPES_H +#include /* uintptr_t, maybe. C99 */ +#endif + +#ifdef HAVE_STRING_H +#include +#endif + +#ifdef HAVE_ERRNO_H +#include +#endif + +#ifdef HAVE_MALLOC_H +#include +#elif HAVE_SYS_MALLOC_H +#include +#endif + +#ifdef HAVE_MATH_H +#include +#endif + +#ifdef HAVE_SYS_STAT_H +#include +#endif + +#ifdef HAVE_UNISTD_H +#include +#endif + +#define STRINGIZEx(x) #x +#define STRINGIZE(x) STRINGIZEx(x) +#define CONCAT(prefix, name) prefix ## name + +/* determine precision */ +#if defined(ABINIT_SINGLE) + typedef float R; +#elif defined(ABINIT_LDOUBLE) + typedef long double R; +#else + typedef double R; +#endif + +/* dummy use of unused parameters to silence compiler warnings */ +#define UNUSED(x) (void)x + +#if 0 +/* inline version */ +#define IABS(x) (((x) < 0) ? (0 - (x)) : (x)) + +/*-----------------------------------------------------------------------*/ +/* assert.c: */ +void assertion_failed (const char *s, const int line, const char *file); + +/* always check */ +#define ASSERT(ex) \ + (void) ( (ex) || (assertion_failed (#ex, __LINE__, __FILE__), 0) ) + +#ifdef DEBUG_MODE /* check only if debug enabled */ +#define DBG_ASSERT(ex) \ + (void)( (ex) || (assertion_failed (#ex, __LINE__, __FILE__), 0) ) +#else +#define DBG_ASSERT(ex) /* nothing */ +#endif + +extern void debug(const char *format, ...); +#define DBG debug +#endif + +/*-----------------------------------------------------------------------*/ +/* xmalloc.c: */ + +void* xmalloc(size_t bytes); +/* void* xrealloc(void* pointer, size_t bytes); */ +void xfree(void *ptr); + +/*-----------------------------------------------------------------------*/ +/* xexit.c */ +void xexit(int code); + +#endif /* _ABINIT_CLIB_H */ diff --git a/GX-PAW/common/src/incs/abi_common.h b/GX-PAW/common/src/incs/abi_common.h new file mode 100644 index 00000000..f66d2f5d --- /dev/null +++ b/GX-PAW/common/src/incs/abi_common.h @@ -0,0 +1,401 @@ +/* abi_common.h */ + +/* + * Copyright (C) 2008-2024 ABINIT Group (MG) + * + * This file is part of the ABINIT software package. For license information, + * please see the COPYING file in the top-level directory of the ABINIT source + * distribution. + * + */ + +#ifndef _ABINIT_COMMON_H +#define _ABINIT_COMMON_H + +/* + * Language standards requires the existance of pre-defined macros + * Microsoft Visual C++ does not define __STDC__, + * Sun Workshop 4.2 supports C94 without setting __STDC_VERSION__ to the proper value + */ + +#if defined (__STDC__) +# define PREDEF_STANDARD_C_1989 /** ANSI X3.159-1989 **/ +# if defined (__STDC_VERSION__) +# define PREDEF_STANDARD_C_1990 /** ISO/IEC 9899:1990 **/ +# if (__STDC_VERSION__ >= 199409L) +# define PREDEF_STANDARD_C_1994 /** ISO/IEC 9899-1:1994 **/ +# endif +# if (__STDC_VERSION__ >= 199901L) +# define PREDEF_STANDARD_C_1999 /** ISO/IEC 9899:1999 **/ +# endif +# endif +#endif + +#if defined(HAVE_FC_LONG_LINES) || defined(__INTEL_COMPILER) || defined(FC_NAG) || !defined(HAVE_FC_MACRO_NEWLINE) +# define NEWLINE ; +#else +# define NEWLINE \newline +#endif + +/* + * These macros are used to pass information on the file and the line to the children if the compiler supports long lines. + * Remember, indeed, that ISO doesn't define any standard and __FILE__ could expand to the full path name. + * This can lead to compilation errors if the compiler does not accept statements longer than 132 columns. + */ +#ifdef HAVE_FC_LONG_LINES +#define _FILE_LINE_ARGS_ ,file=__FILE__, line=__LINE__ +#define _FILE_ABIFUNC_LINE_ARGS_ ,file=__FILE__, line=__LINE__ +#else +#define _FILE_LINE_ARGS_ +#define _FILE_ABIFUNC_LINE_ARGS_ +#endif + +/** this does not work with gfort, pgi, **/ +#if defined (FC_GNU) || defined (FC_PGI) +#define QUOTE(x) 'x' +#else +#define QUOTE(x) #x +#endif + + +/** Token concatenation + 1) ANSI CPP + 2) Traditional CPP +**/ + +#if defined (FC_INTEL) || defined (FC_AOCC) || defined (FC_LLVM) || defined (FC_NVHPC) +#define CONCAT(x,y) x ## y +#else +#define CONCAT(x,y) x/**/y +#endif + +#define BYTE_SIZE(array) PRODUCT(SHAPE(array)) * DBLE(KIND(array)) + +/* var = var + increment + * Because Fortran does not provide inplace add. + * but NAG does not like this CPP macro so we cannot use it! + * +#define IADD(var, increment) var = var + increment +*/ + +/* + * ABI_ abinit macros. + * DBG_ macros for debugging. Defined only if abinit is compiled in DEBUG_MODE. + * MSG_ macros for logging. +*/ + +/* Stop execution with message `msg` if not expr */ +#define ABI_CHECK(expr, msg) if (.not.(expr)) call assert(.FALSE., msg _FILE_LINE_ARGS_) + +/* Stop execution with message `msg` if the two integers int1 and int2 are not equal */ +#define ABI_CHECK_IEQ(int1, int2, msg) if (int1 /= int2) ABI_ERROR(sjoin(msg, ": ", itoa(int1), "vs", itoa(int2))) +#define ABI_CHECK_IEQ_IERR(int1, int2, msg, ierr) if (int1 /= int2) then NEWLINE ierr = ierr + 1; ABI_WARNING(sjoin(msg, itoa(int1), "vs", itoa(int2))) NEWLINE endif + +/* Stop execution with message `msg` if the two doubles double1 and double2 are not equal */ +#define ABI_CHECK_DEQ(double1, double2, msg) if (double1 /= double2) ABI_ERROR(sjoin(msg, ": ", ftoa(double1), "vs", ftoa(double2))) + +/* Stop execution with message `msg` if int1 > int2 */ +#define ABI_CHECK_ILEQ(int1, int2, msg) if (int1 > int2) ABI_ERROR(sjoin(msg, ": ", itoa(int1), "vs", itoa(int2))) + +/* Stop execution with message `msg` if int1 < int2 */ +#define ABI_CHECK_IGEQ(int1, int2, msg) if (int1 < int2) ABI_ERROR(sjoin(msg, ": ", itoa(int1), "vs", itoa(int2))) + +/* Stop execution with message `msg` if double1 < double2 */ +#define ABI_CHECK_DGEQ(double1, double2, msg) if (double1 < double2) ABI_ERROR(sjoin(msg, ftoa(double1), "vs", ftoa(double2))) + +/* Stop execution with message `msg` if int not in [start, stop] */ +#define ABI_CHECK_IRANGE(int, start, stop, msg) if (int < start .or. int > stop) ABI_ERROR(sjoin(msg, itoa(int), "not in [", itoa(start), itoa(stop), "]")) + +#define ABI_CHECK_NOSTOP(expr, msg, ierr) \ + if (.not. (expr)) then NEWLINE ierr = ierr + 1; call msg_hndl(msg, "ERROR", "PERS", NOSTOP=.TRUE. _FILE_LINE_ARGS_) NEWLINE endif + +/* Stop execution with message if MPI call returned error exit code */ +#define ABI_CHECK_MPI(ierr, msg) call check_mpi_ierr(ierr, msg _FILE_LINE_ARGS_) + +/* This macro is used in low-level MPI wrappers to return mpierr to the caller + * so that one can locate the problematic call. Use it wisely since it may cause memory leaks. + * #define ABI_HANDLE_MPIERR(mpierr) ABI_CHECK_MPI(mpierr, "ABI_HANDLE: Fatal error") + */ +#define ABI_HANDLE_MPIERR(mpierr) if (mpierr /= MPI_SUCCESS) RETURN + +/* Macros for memory checking and profiling + * TODO + * Add option to check automatically the exit status of allocate so that we can abort gracefully if oom. + * and abipy can detect the problem. + * + * ABI_MALLOC --> Allocate memory for intrinsic datatypes (real, integer, complex). + * ABI_CALLOC --> Clear alloc: same as ABI_MALLOC but initializes memory with zeros + * ABI_FREE --> Free memory allocated by ABI_MALLOC + * + * To allocate scalars, use: + * + * ABI_MALLOC_SCALAR + * ABI_FREE_SCALAR + * +*/ + +#define ABI_MEM_BITS(arr) product(int(shape(arr), kind=8)) * storage_size(arr, kind=8) +#define ABI_MEM_MB(arr) ABI_MEM_BITS(arr) / (8.0_dp * 1024 ** 2) + +#ifdef HAVE_MEM_PROFILING + +/* + These macros are used to get the memory address of the objet and the memory allocated. + + - loc returns the address and is a language extension supported by gfortran and ifort. + - storage_size was introduced in F2003 and returns the size in bits. + + Both loc and storage_size are polymorphic so one can use it with intrinsic types as well + as user-defined datatypes. scalar types require a special treatment (MALLOC_SCALAR, FREE_SCALAR) + because shape == 0 thus it's not possible to discern with ABI_MEM between zero-sized arrays and scalar +*/ +# define _LOC(x) int(loc(x), kind=8) + +/* and now the debugging macros */ +# define ABI_MALLOC(ARR, SIZE) \ + allocate(ARR SIZE) NEWLINE \ + call abimem_record(0, QUOTE(ARR), _LOC(ARR), "A", ABI_MEM_BITS(ARR), __FILE__, __LINE__) + +# define ABI_MALLOC_SCALAR(scalar) \ + allocate(scalar) NEWLINE \ + call abimem_record(0, QUOTE(scalar), _LOC(scalar), "A", storage_size(scalar, kind=8), __FILE__, __LINE__) + +# define ABI_FREE_SCALAR(scalar) \ + call abimem_record(0, QUOTE(scalar), _LOC(scalar), "D", -storage_size(scalar, kind=8), __FILE__, __LINE__) NEWLINE \ + deallocate(scalar) + +# define ABI_FREE(ARR) \ + call abimem_record(0, QUOTE(ARR), _LOC(ARR), "D", - ABI_MEM_BITS(ARR), __FILE__, __LINE__) NEWLINE \ + deallocate(ARR) + +# define ABI_STAT_MALLOC(ARR,SIZE,ierr) \ + allocate(ARR SIZE, stat=ierr) NEWLINE \ + call abimem_record(0, QUOTE(ARR), _LOC(ARR), "A", ABI_MEM_BITS(ARR), __FILE__, __LINE__) + +# define ABI_MALLOC_OR_DIE(ARR,SIZE,ierr) \ + allocate(ARR SIZE, stat=ierr) NEWLINE \ + call abimem_record(0, QUOTE(ARR), _LOC(ARR), "A", ABI_MEM_BITS(ARR), __FILE__, __LINE__) NEWLINE \ + ABI_CHECK(ierr == 0, "out-of-memory") + +# define ABI_MOVE_ALLOC(from, to) \ + call abimem_record(0, QUOTE(from), _LOC(from), "D", -ABI_MEM_BITS(from), __FILE__, __LINE__) NEWLINE \ + if (allocated(to)) call abimem_record(0, QUOTE(to), _LOC(to), "D", - ABI_MEM_BITS(to), __FILE__, __LINE__) NEWLINE \ + call move_alloc(from, to) NEWLINE \ + call abimem_record(0, QUOTE(to), _LOC(to), "A", ABI_MEM_BITS(to), __FILE__, __LINE__) + + +/* Allocate a polymophic scalar that is: allocate(datatype:: scalar) */ +# define ABI_MALLOC_TYPE_SCALAR(type, scalar) \ + allocate(type::scalar) NEWLINE \ + call abimem_record(0, QUOTE(scalar), _LOC(scalar), "A", storage_size(scalar, kind=8), __FILE__, __LINE__) + +#else +/* macros used in production */ +# define ABI_MALLOC(ARR,SIZE) allocate(ARR SIZE) +# define ABI_FREE(ARR) deallocate(ARR) +# define ABI_STAT_MALLOC(ARR,SIZE,ierr) allocate(ARR SIZE, stat=ierr) +# define ABI_MALLOC_OR_DIE(ARR,SIZE,ierr) \ + allocate(ARR SIZE, stat=ierr) NEWLINE \ + ABI_CHECK(ierr == 0, "out-of-memory") +# define ABI_MALLOC_SCALAR(scalar) allocate(scalar) +# define ABI_FREE_SCALAR(scalar) deallocate(scalar) +# define ABI_MOVE_ALLOC(from, to) call move_alloc(from, to) + +# define ABI_MALLOC_TYPE_SCALAR(type,scalar) allocate(type::scalar) + +#endif + +#define ABI_MALLOC_CUDA(array,size) call alloc_on_gpu(array,size) +#define ABI_FREE_CUDA(array) call dealloc_on_gpu(array) + +/* these routine should only be use when HAVE_YAKL is defined. + * They provide acces to memory available in both host and device + * (cuda/hip/openacc) code. The final goal would be to always use managed memory + * when HAVE_GPU is defined */ + +/* gator_allocate can have 2 or 3 args, here is a trick to define a macro + * that make sure gator_allocate have 2 or 3 arguments */ + +#define ABI_MALLOC_MANAGED(array,size) call gator_allocate(array,size) +#define ABI_MALLOC_MANAGED_BOUNDS(array,size,lbounds) call gator_allocate(array,size,lbounds) + +#define ABI_FREE_MANAGED(array) call gator_deallocate(array) +#define ABI_SFREE_MANAGED(array) if (associated(array)) then NEWLINE ABI_FREE_MANAGED(array) NEWLINE endif + + +/* Macros to allocate zero-initialized arrays. */ +#define ABI_CALLOC(ARR, SIZE) ABI_MALLOC(ARR, SIZE) NEWLINE ARR = zero +#define ABI_ICALLOC(ARR, SIZE) ABI_MALLOC(ARR, SIZE) NEWLINE ARR = 0 +#define ABI_CALLOC_OR_DIE(ARR,SIZE,ierr) ABI_MALLOC_OR_DIE(ARR, SIZE, ierr) NEWLINE ARR = zero + +/* Macro used to deallocate memory allocated by Fortran libraries that do not use m_profiling_abi.F90 + * or allocate arrays before calling MOVE_ALLOC. + In this case, indeed, we should not count the deallocation +#define ABI_MALLOC_NOCOUNT(arr, size) allocate(arr size) +*/ +#define ABI_FREE_NOCOUNT(arr) deallocate(arr) +#define ABI_SFREE_NOCOUNT(arr) if (allocated(arr)) deallocate(arr) + +/* + * Macros to allocate/deallocate depending on the allocation (association) status of the variable (pointer). + * SFREE stands for SAFE FREE + * Caveat: pointers must use ABI_PTR_FREE_IF + * +*/ +#define ABI_MALLOC_IFNOT(ARR, SIZE) if (.not. allocated(ARR)) then NEWLINE ABI_MALLOC(ARR, SIZE) NEWLINE endif +#define ABI_SFREE(ARR) if (allocated(ARR)) then NEWLINE ABI_FREE(ARR) NEWLINE endif +#define ABI_SFREE_PTR(PTR) if (associated(PTR)) then NEWLINE ABI_FREE(PTR) NEWLINE endif +#define ABI_REMALLOC(ARR, SIZE) ABI_SFREE(ARR) NEWLINE ABI_MALLOC(ARR, SIZE) +#define ABI_RECALLOC(ARR, SIZE) ABI_SFREE(ARR) NEWLINE ABI_CALLOC(ARR, SIZE) + +/* Allocate and fill with random numbers */ +#define ABI_MALLOC_RAND(ARR, SIZE) ABI_MALLOC(ARR, SIZE) NEWLINE call random_number(ARR) + +/* Macros used in debug mode */ +#ifdef DEBUG_MODE + +# define ASSERT(expr) if (.not.expr) call assert((expr), "Assertion failed" _FILE_LINE_ARGS_) +# define ASSERT_IF(condition, expr) if (condition) call assert((expr), "Assertion failed" _FILE_LINE_ARGS_) + +# define DBG_CHECK(expr,str) if (.not.expr) call assert((expr), str _FILE_LINE_ARGS_) +# define DBG_ENTER(mode) call sentinel(1,mode _FILE_ABIFUNC_LINE_ARGS_) +# define DBG_EXIT(mode) call sentinel(2,mode _FILE_ABIFUNC_LINE_ARGS_) +/* Stop if two arrays have different shape */ +# define DBG_EQSHAPE(arr1, arr2) if (any(shape(arr1)/=shape(arr2))) ABI_ERROR("Different shape") + +#else +/* nops */ +# define ASSERT(expr) +# define ASSERT_IF(condition, expr) + +# define DBG_CHECK(expr,str) +# define DBG_ENTER(mode) +# define DBG_EXIT(mode) +# define DBG_EQSHAPE(arr1, arr2) +#endif + +/* Macro for basic messages */ +#define ABI_COMMENT(msg) call msg_hndl(msg, "COMMENT", "PERS" _FILE_LINE_ARGS_) +#define ABI_WARNING(msg) call msg_hndl(msg, "WARNING", "PERS" _FILE_LINE_ARGS_) +#define ABI_COMMENT_UNIT(msg, unt) call msg_hndl(msg, "COMMENT", "PERS" _FILE_LINE_ARGS_, unit=unt) +#define ABI_WARNING_UNIT(msg, unt) call msg_hndl(msg, "WARNING", "PERS" _FILE_LINE_ARGS_, unit=unt) +#define ABI_ERROR(msg) call msg_hndl(msg, "ERROR", "PERS" _FILE_LINE_ARGS_) +#define ABI_ERROR_CLASS(msg, cls) call msg_hndl(msg, cls , "PERS" _FILE_LINE_ARGS_) +#define ABI_BUG(msg) call msg_hndl(msg, "BUG", "PERS" _FILE_LINE_ARGS_) +#define ABI_STOP(msg) call msg_hndl(msg, "STOP", "PERS") + +#define ABI_ERROR_NODUMP(msg) call msg_hndl(msg, "ERROR", "PERS", NODUMP=.TRUE. _FILE_LINE_ARGS_) +#define ABI_ERROR_NOSTOP(msg, ierr) \ + ierr=ierr+1; call msg_hndl(msg, "ERROR", "PERS", NOSTOP=.TRUE. _FILE_LINE_ARGS_) +#define MSG_ERROR_NOSTOP_IF(condition, msg, ierr) \ + if (condition) then NEWLINE ABI_ERROR_NOSTOP(msg, ierr) NEWLINE endif + +#define NCF_CHECK(ncerr) if (ncerr/=nf90_noerr) call netcdf_check(ncerr,"No msg from caller" _FILE_LINE_ARGS_) +#define NCF_CHECK_MSG(ncerr,msg) if (ncerr/=nf90_noerr) call netcdf_check(ncerr,msg _FILE_LINE_ARGS_) + +#define NOT_IMPLEMENTED_ERROR() ABI_ERROR("Not Implemented Error") + +/* Macros used for stopping the code if external libraries have not been enabled */ +#define NETCDF_NOTENABLED_ERROR() ABI_ERROR("netcdf is not activated. Use configure --enable-netcdf") + +#ifdef HAVE_FC_LONG_LINES +#define BIGDFT_NOTENABLED_ERROR() call bigdft_lib_error(__FILE__, __LINE__) +#else +#define BIGDFT_NOTENABLED_ERROR() call bigdft_lib_error() +#endif + +/* Write a warning if condition */ +#define ABI_WARNING_IF(expr, msg) if ((expr)) ABI_WARNING(msg) + +/* Dummy use of unused arguments to silence compiler warnings */ +#define ABI_UNUSED(var) if (.FALSE.) call unused_var(var) +/* + * The method above work for basic types (integer, real, etc...). + * For types, arrays, we can use associate (F03 feature) + * Does not work for character(*) with gfortran <=5.x (>7.x is fine. No 6.x data) + * character with fixed length is fine. + * */ +#define ABI_UNUSED_A(var) associate( var => var ) NEWLINE end associate + +/* Macro to set the default the value of a local variable when optional arguments are used. +Use if statement instead of Fortran merge. See https://software.intel.com/en-us/forums/intel-fortran-compiler/topic/640598 +*/ + +#define ABI_DEFAULT(value, optional, default) value = default; if (present(optional)) value = optional + +#ifdef HAVE_PAPI +# define XPAPI_CHECK(check,msg) if (check/=PAPI_OK) call xpapi_handle_error(check, msg _FILE_LINE_ARGS_) +#else +# define XPAPI_CHECK(check,msg) +#endif + +/* Portable support for /dev/null */ +#if defined HAVE_OS_WINDOWS +#define NULL_FILE "NUL" +#else +#define NULL_FILE "/dev/null" +#endif + + +/* F2003 support */ +#define ABI_CHECK_CNULL(cptr,msg) if (.not.C_ASSOCIATED(cptr)) ABI_ERROR(msg) + +#ifdef HAVE_FC_ASYNC +#define ABI_ASYNC ,asynchronous +#else +#define ABI_ASYNC +#endif + +#ifdef HAVE_FC_PRIVATE +#define ABI_PRIVATE ,private +#else +#define ABI_PRIVATE +#endif + +#ifdef HAVE_FC_PROTECTED +#define ABI_PROTECTED ,protected +#else +#define ABI_PROTECTED +#endif + + +/* F2008 support */ +#ifdef HAVE_FC_CONTIGUOUS +#define ABI_CONTIGUOUS contiguous, +#else +#define ABI_CONTIGUOUS +#endif + +/* + * Temporary trick used to pass contiguous array descriptors to F90 routines + * Mainly used to avoid copy-in copy-out in m_abi_linalg +#define DEV_CONTARRD contiguous, +*/ +#define DEV_CONTARRD + +/* OpenMP support */ +#ifndef HAVE_OMP_COLLAPSE +#define COLLAPSE(x) +#endif + +/* DFTI macros (should be declared in m_dfti but build-sys tests complain */ +#define DFTI_CHECK(status) if (status /= 0) call dfti_check_status(status _FILE_LINE_ARGS_) + + +/* Macros used in the GW/GWR code */ +#ifdef HAVE_GW_DPC +# define GWPC_CONJG(cvar) DCONJG(cvar) +# define GWPC_CMPLX(re,im) DCMPLX(re,im) +# define __slkmat_t matrix_scalapack +#else +# define GWPC_CONJG(cvar) CONJG(cvar) +# define GWPC_CMPLX(re,im) CMPLX(re,im) +# define __slkmat_t slkmat_sp_t +#endif + +#define __HAVE_GREENX +/* Temporary hack to use GREENX library +*/ + +#endif +/* _ABINIT_COMMON_H */ diff --git a/GX-PAW/common/src/incs/abi_common_kokkos.h b/GX-PAW/common/src/incs/abi_common_kokkos.h new file mode 100644 index 00000000..3b72e717 --- /dev/null +++ b/GX-PAW/common/src/incs/abi_common_kokkos.h @@ -0,0 +1,99 @@ +// abi_common_kokkos.h + +/* + * Copyright (C) 2022-2024 ABINIT Group + * + * This file is part of the ABINIT software package. For license information, + * please see the COPYING file in the top-level directory of the ABINIT source + * distribution. + * + */ + +#ifndef _ABINIT_COMMON_KOKKOS_H +#define _ABINIT_COMMON_KOKKOS_H + +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include + +#include // for printf +#include // for EXIT_SUCCESS +#include +#include +#include + +// Use (void) to silence unused warnings. +#define assertm(exp, msg) assert(((void)msg, exp)) + +#ifndef STR +#define STR(x) #x +#endif + +#define MY_ASSERT(x) + +#ifndef ABI_CHECK +#define ABI_CHECK(expr, msg) if (!(expr)) { printf("Abinit failed: (%s), in file %s, line %d : %s.\n", STR(expr), __FILE__, __LINE__, msg); abort(); } +#endif + +using memory_space = Kokkos::DefaultExecutionSpace::memory_space; +using memory_trait = Kokkos::MemoryTraits; + +// generic template aliases for multidimensional views +template +using AbiView_1d = Kokkos::View; +template +using AbiView_2d = Kokkos::View; +template +using AbiView_3d = Kokkos::View; +template +using AbiView_4d = Kokkos::View; + +// generic template aliases for multidimensional const views +template +using AbiView_1d_const = Kokkos::View; +template +using AbiView_2d_const = Kokkos::View; +template +using AbiView_3d_const = Kokkos::View; +template +using AbiView_4d_const = Kokkos::View; + +//! device views types for array of doubles, unmanaged memory (allocated on fortran side) +using AbiView_r64_1d = AbiView_1d; +using AbiView_r64_2d = AbiView_2d; +using AbiView_r64_3d = AbiView_3d; +using AbiView_r64_4d = AbiView_4d; + +//! device views types for array of doubles, unmanaged memory (allocated on fortran side), const +using AbiView_r64_1d_const = AbiView_1d_const; +using AbiView_r64_2d_const = AbiView_2d_const; +using AbiView_r64_3d_const = AbiView_3d_const; +using AbiView_r64_4d_const = AbiView_4d_const; + +//! device views types for array of doubles, managed memory +using AbiView_r64_3d_managed = Kokkos::View; + + +//! device views types for array of integers, unmanaged memory (allocated on fortran side) +using AbiView_i32_1d = AbiView_1d; +using AbiView_i32_2d = AbiView_2d; +using AbiView_i32_3d = AbiView_3d; +using AbiView_i32_4d = AbiView_4d; + +//! device views types for array of complex doubles, unmanaged memory (allocated on fortran side) +using cplx_t = Kokkos::complex; +using AbiView_c64_1d = AbiView_1d; +using AbiView_c64_2d = AbiView_2d; +using AbiView_c64_3d = AbiView_3d; +using AbiView_c64_4d = AbiView_4d; + +//! device views types for array of complex doubles, unmanaged memory (allocated on fortran side), const +using AbiView_c64_1d_const = AbiView_1d_const; +using AbiView_c64_2d_const = AbiView_2d_const; +using AbiView_c64_3d_const = AbiView_3d_const; +using AbiView_c64_4d_const = AbiView_4d_const; + +#endif // _ABINIT_COMMON_KOKKOS_H diff --git a/GX-PAW/common/src/incs/abinit.src b/GX-PAW/common/src/incs/abinit.src new file mode 100644 index 00000000..5f65d0ff --- /dev/null +++ b/GX-PAW/common/src/incs/abinit.src @@ -0,0 +1,29 @@ +# -*- Python -*- +# +# Copyright (C) 2014-2024 ABINIT Group (Yann Pouillon) +# +# This file is part of the ABINIT software package. For license information, +# please see the COPYING file in the top-level directory of the ABINIT source +# distribution. +# + +# +# Source files making up the dumpinfo library +# + +# Source file attributes +ABI_SRC_NIL = 0 # No attribute +ABI_SRC_BLT = 1 # The file is built by a script +ABI_SRC_DEP = 2 # The file depends on other files + +# Source files +sources = [] +# IMPORTANT : please use the alphabetic order in the previous list. Do NOT add the new routine names at the end of the list. +# This is important to avoid numerous conflicts at merge time. Thank you very much. Xavier. + +includes = [ + "abi_clib.h", + "abi_common.h", + "cuda_common.h", + "string_f.h", +] diff --git a/GX-PAW/common/src/incs/cuda_common.h b/GX-PAW/common/src/incs/cuda_common.h new file mode 100644 index 00000000..5b85f357 --- /dev/null +++ b/GX-PAW/common/src/incs/cuda_common.h @@ -0,0 +1,71 @@ +/* cuda_common.h */ + +/* + * Copyright (C) 2008-2024 ABINIT Group (MMancini) + * + * This file is part of the ABINIT software package. For license information, + * please see the COPYING file in the top-level directory of the ABINIT source + * distribution. + * + */ + + +/** + * Language standards requires the existance of pre-defined macros + * TODO + * Microsoft Visual C++ does not define __STDC__, + * Sun Workshop 4.2 supports C94 without setting __STDC_VERSION__ to the proper value +**/ + + +#ifndef CUDA_COMMON_H +#define CUDA_COMMON_H + +#include "config.h" + +#undef HAVE_VARMACROS + +#ifdef HAVE_GPU_CUDA_DP +# define CUDA_KIND (1.0_dp) +# define cuzero 0.0 +# define cuone 1.0 + +# define FFT_R2C CUFFT_D2Z +# define FFT_C2R CUFFT_Z2D +# define FFT_C2C CUFFT_Z2Z + +# if defined HAVE_VARMACROS /**|| (__STDC_VERSION__ >= 199901L)**/ +# define FFTEXECR2C(args...) cufftExecD2Z(args) +# define FFTEXECC2R(args...) cufftExecZ2D(args) +# define FFTEXECC2C(args...) cufftExecZ2Z(args) +# else +# define FFTEXECR2C cufftExecD2Z +# define FFTEXECC2R cufftExecZ2D +# define FFTEXECC2C cufftExecZ2Z +# endif /** defined(HAVE_VARMACROS) || (__STDC_VERSION__ >= 199901L) **/ + + +#else +# define CUDA_KIND (1.0) +# define cuzero 0.0f +# define cuone 1.0f + +# define FFT_R2C CUFFT_R2C +# define FFT_C2R CUFFT_C2R +# define FFT_C2C CUFFT_C2C + +# if defined HAVE_VARMACROS /**|| (__STDC_VERSION__ >= 199901L)**/ +# define FFTEXECR2C(args...) cufftExecR2C(args) +# define FFTEXECC2R(args...) cufftExecC2R(args) +# define FFTEXECC2C(args...) cufftExecC2C(args) +# else +# define FFTEXECR2C cufftExecR2C +# define FFTEXECC2R cufftExecC2R +# define FFTEXECC2C cufftExecC2C +# endif /** defined(HAVE_VARMACROS) || (__STDC_VERSION__ >= 199901L) **/ + + +#endif + + +#endif diff --git a/GX-PAW/common/src/incs/string_f.h b/GX-PAW/common/src/incs/string_f.h new file mode 100644 index 00000000..03156a46 --- /dev/null +++ b/GX-PAW/common/src/incs/string_f.h @@ -0,0 +1,116 @@ +/* + Copyright (C) 2003 M. Marques, A. Castro, A. Rubio, G. Bertsch + + This program 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, 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. + + $Id: string_f.h 3341 2007-10-12 15:47:30Z marques $ +*/ + +/* --------------------- Fortran to C string compatibility ---------------------- */ +#include + +#if defined(_CRAY) +#include + +#define to_c_str(f, c) { \ + char *fc; int slen; \ + fc = _fcdtocp(f); \ + for(slen=_fcdlen(f)-1; slen>=0 && fc[slen]==' '; slen--); \ + slen++; \ + c = (char *)malloc(slen+1); \ + strncpy(c, _fcdtocp(f), slen); \ + c[slen] = '\0'; \ +} + +#define to_c_str_notrim(f, c) { \ + char *fc; int slen; \ + slen=_fcdlen(f) \ + c = (char *)malloc(slen+1); \ + strncpy(c, _fcdtocp(f), slen); \ + c[slen] = '\0'; \ +} + +#define to_f_str(c, f) { \ + char *fc; int flen, clen, i; \ + flen = _fcdlen(f); \ + fc = _fcdtocp(f); \ + clen = strlen(c); \ + for(i=0; i=0; ll--) \ + if(f[ll] != ' ') break; \ + ll++; \ + c = (char *)malloc((ll+1)*sizeof(char)); \ + for(i=0; i&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/abinit +pkgincludedir = $(includedir)/abinit +pkglibdir = $(libdir)/abinit +pkglibexecdir = $(libexecdir)/abinit +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = x86_64-apple-darwin18.7.0 +host_triplet = x86_64-apple-darwin18.7.0 +target_triplet = x86_64-apple-darwin18.7.0 +subdir = shared/common/src/mods +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/m4/arch-gpu.m4 \ + $(top_srcdir)/config/m4/arch-mpi.m4 \ + $(top_srcdir)/config/m4/auto-autotools.m4 \ + $(top_srcdir)/config/m4/auto-corelibs.m4 \ + $(top_srcdir)/config/m4/auto-debug.m4 \ + $(top_srcdir)/config/m4/auto-dirflags.m4 \ + $(top_srcdir)/config/m4/auto-env.m4 \ + $(top_srcdir)/config/m4/auto-hints.m4 \ + $(top_srcdir)/config/m4/auto-optim.m4 \ + $(top_srcdir)/config/m4/auto-options.m4 \ + $(top_srcdir)/config/m4/auto-output.m4 \ + $(top_srcdir)/config/m4/auto-triggers.m4 \ + $(top_srcdir)/config/m4/conf-atompaw.m4 \ + $(top_srcdir)/config/m4/conf-debug.m4 \ + $(top_srcdir)/config/m4/conf-fallbacks.m4 \ + $(top_srcdir)/config/m4/conf-files.m4 \ + $(top_srcdir)/config/m4/conf-init.m4 \ + $(top_srcdir)/config/m4/conf-openmp.m4 \ + $(top_srcdir)/config/m4/conf-optim.m4 \ + $(top_srcdir)/config/m4/lang-c++.m4 \ + $(top_srcdir)/config/m4/lang-c.m4 \ + $(top_srcdir)/config/m4/lang-fortran-import.m4 \ + $(top_srcdir)/config/m4/lang-fortran.m4 \ + $(top_srcdir)/config/m4/lang-python.m4 \ + $(top_srcdir)/config/m4/libxml2.m4 \ + $(top_srcdir)/config/m4/misc-display.m4 \ + $(top_srcdir)/config/m4/sd_abinit_common.m4 \ + $(top_srcdir)/config/m4/sd_arch_gpu.m4 \ + $(top_srcdir)/config/m4/sd_arch_mpi.m4 \ + $(top_srcdir)/config/m4/sd_bigdft.m4 \ + $(top_srcdir)/config/m4/sd_core.m4 \ + $(top_srcdir)/config/m4/sd_esl.m4 \ + $(top_srcdir)/config/m4/sd_fftw3.m4 \ + $(top_srcdir)/config/m4/sd_gpu_kokkos.m4 \ + $(top_srcdir)/config/m4/sd_gpu_yakl.m4 \ + $(top_srcdir)/config/m4/sd_io_hdf5.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf_fortran.m4 \ + $(top_srcdir)/config/m4/sd_levmar.m4 \ + $(top_srcdir)/config/m4/sd_libpaw.m4 \ + $(top_srcdir)/config/m4/sd_libpsml.m4 \ + $(top_srcdir)/config/m4/sd_libxc.m4 \ + $(top_srcdir)/config/m4/sd_math_fft.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_core.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_util.m4 \ + $(top_srcdir)/config/m4/sd_papi.m4 \ + $(top_srcdir)/config/m4/sd_pfft.m4 \ + $(top_srcdir)/config/m4/sd_triqs.m4 \ + $(top_srcdir)/config/m4/sd_wannier90.m4 \ + $(top_srcdir)/config/m4/sd_xmlf90.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_$(V)) +am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY)) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +am__v_at_1 = +SOURCES = +DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(srcdir)/Makefile.in +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ABINIT_BINARY_PACKAGE = abinit-10.0.0.83-58be4d_x86_64_darwin18.7.0_gnu9.4 +ABINIT_COMMON_CPPFLAGS = +ABINIT_COMMON_FCFLAGS = +ABINIT_COMMON_LDFLAGS = +ABINIT_COMMON_LIBS = +ABINIT_TARGET = x86_64_darwin18.7.0_gnu9.4 +ABINIT_VERSION = 10.0.0.83-58be4d +ABINIT_VERSION_BASE = 10.0 +ABINIT_VERSION_BUILD = 20240316 +ABINIT_VERSION_MAJOR = 10 +ABINIT_VERSION_MICRO = 0 +ABINIT_VERSION_MINOR = 0 +ABI_CPPFLAGS = -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include +ACLOCAL = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' aclocal-1.16 +AMTAR = $${TAR-tar} +AM_DEFAULT_VERBOSITY = 1 +AR = ar +ARFLAGS = rc +ARFLAGS_CMD = rc +ARFLAGS_DEBUG = +ARFLAGS_EXTRA = +ARFLAGS_HINTS = +ARFLAGS_OPTIM = +ATOMPAW_BIN = +AUTOCONF = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' autoconf +AUTOHEADER = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' autoheader +AUTOMAKE = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' automake-1.16 +AWK = awk +BIGDFT_CPPFLAGS = +BIGDFT_FCFLAGS = +BIGDFT_LDFLAGS = +BIGDFT_LIBS = +BOURNE_SHELL = /bin/sh +CC = /opt/local/bin/mpicc +CCDEPMODE = depmode=gcc3 +CC_LDFLAGS = +CC_LDFLAGS_DEBUG = +CC_LDFLAGS_EXTRA = +CC_LDFLAGS_GPU = +CC_LDFLAGS_HINTS = +CC_LDFLAGS_OPTIM = +CC_LIBS = +CC_LIBS_DEBUG = +CC_LIBS_EXTRA = +CC_LIBS_GPU = +CC_LIBS_HINTS = +CC_LIBS_OPTIM = +CFLAGS = -O2 -g +CFLAGS_DEBUG = +CFLAGS_EXTRA = +CFLAGS_GPU = +CFLAGS_HINTS = +CFLAGS_OPTIM = +CPP = /opt/local/bin/mpicc -E +CPPFLAGS = +CPPFLAGS_DEBUG = +CPPFLAGS_EXTRA = +CPPFLAGS_GPU = +CPPFLAGS_HINTS = +CPPFLAGS_HINTS_EXT = -P -std=c99 +CPPFLAGS_OPTIM = +CXX = /opt/local/bin/mpicxx +CXXDEPMODE = depmode=gcc3 +CXXFLAGS = -O2 -g +CXXFLAGS_DEBUG = +CXXFLAGS_EXTRA = +CXXFLAGS_GPU = +CXXFLAGS_HINTS = +CXXFLAGS_OPTIM = +CXX_LDFLAGS = +CXX_LDFLAGS_DEBUG = +CXX_LDFLAGS_EXTRA = +CXX_LDFLAGS_GPU = +CXX_LDFLAGS_HINTS = +CXX_LDFLAGS_OPTIM = +CXX_LIBS = +CXX_LIBS_DEBUG = +CXX_LIBS_EXTRA = +CXX_LIBS_GPU = +CXX_LIBS_HINTS = +CXX_LIBS_OPTIM = +CYGPATH_W = echo +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +ECHO_C = \c +ECHO_N = +ECHO_T = +EGREP = /usr/bin/grep -E +EXEEXT = +F77 = /opt/local/bin/mpif90 +FC = /opt/local/bin/mpif90 +FCFLAGS = -O2 -g -ffree-line-length-none -I/opt/local/include -I/opt/local/include -I/opt/local/include +FCFLAGS_DEBUG = +FCFLAGS_EXTRA = +FCFLAGS_F90 = +FCFLAGS_FIXEDFORM = -ffixed-form +FCFLAGS_FREEFORM = -ffree-form +FCFLAGS_HINTS = -ffree-line-length-none +FCFLAGS_MODDIR = -J../mods +FCFLAGS_OPENMP = +FCFLAGS_OPENMP_OFFLOAD = +FCFLAGS_OPTIM = +FCLIBS = -L/opt/local/lib -L/opt/local/lib/openmpi-gcc9 -L/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0 -L/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/../../.. -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi -lgfortran -lquadmath -lm +FC_LDFLAGS = +FC_LDFLAGS_DEBUG = +FC_LDFLAGS_EXTRA = +FC_LDFLAGS_HINTS = +FC_LDFLAGS_OPTIM = +FC_LIBS = +FC_LIBS_DEBUG = +FC_LIBS_EXTRA = +FC_LIBS_HINTS = +FC_LIBS_OPTIM = +FC_NOWRAP = /opt/local/bin/mpif90 +FFLAGS = -O2 -g -ffree-line-length-none -I/opt/local/include -I/opt/local/include -I/opt/local/include +FFTW3_CFLAGS = +FFTW3_CPPFLAGS = -I/opt/local/include +FFTW3_FCFLAGS = -I/opt/local/include +FFTW3_LDFLAGS = +FFTW3_LIBS = -L/opt/local/lib -lfftw3 -lfftw3f +FFT_CFLAGS = +FFT_FCFLAGS = +FPP = +FPPFLAGS = +FPPFLAGS_DEBUG = +FPPFLAGS_EXTRA = +FPPFLAGS_HINTS = +FPPFLAGS_OPTIM = +GPU_ARCH = +GPU_CFLAGS = +GPU_CPPFLAGS = +GPU_CXXFLAGS = +GPU_FCFLAGS = +GPU_LDFLAGS = +GPU_LIBS = +GRAPHATOM_BIN = +GREP = /usr/bin/grep +H5CC = +HDF5_CFLAGS = +HDF5_CPPFLAGS = +HDF5_CXXFLAGS = +HDF5_FCFLAGS = +HDF5_LDFLAGS = +HDF5_LIBS = +INSTALL = /opt/local/libexec/gnubin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +KOKKOS_CPPFLAGS = +KOKKOS_CXXFLAGS = +KOKKOS_LDFLAGS = +KOKKOS_LIBS = +LDFLAGS = +LEVMAR_CFLAGS = +LEVMAR_CPPFLAGS = +LEVMAR_LDFLAGS = +LEVMAR_LIBS = +LIBOBJS = +LIBPAW_CPPFLAGS = +LIBPAW_FCFLAGS = +LIBPAW_LDFLAGS = +LIBPAW_LIBS = +LIBPSML_CPPFLAGS = +LIBPSML_FCFLAGS = +LIBPSML_LDFLAGS = +LIBPSML_LIBS = +LIBS = -L/opt/local/lib -lwannier -L/opt/local/lib -lxc -L/opt/local/lib -lnetcdff -L/opt/local/lib -lnetcdf -L/opt/local/lib -L/opt/local/lib -lhdf5_hl -L/opt/local/lib -lhdf5 -lz -ldl -lm -L/opt/local/lib -lfftw3 -lfftw3f +LIBXC_CFLAGS = +LIBXC_CPPFLAGS = +LIBXC_FCFLAGS = +LIBXC_LDFLAGS = +LIBXC_LIBS = +LIBXML2_CPPFLAGS = +LIBXML2_FCFLAGS = +LIBXML2_LIBS = +LINALG_CFLAGS = +LINALG_CPPFLAGS = +LINALG_CXXFLAGS = +LINALG_FCFLAGS = -I/opt/local/include +LINALG_LDFLAGS = +LINALG_LIBS = -L/opt/local/lib -lopenblas +LN_S = ln -s +LTLIBOBJS = +MAKEINFO = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' makeinfo +MKDIR_P = /opt/local/libexec/gnubin/mkdir -p +MODEXT = mod +MPI_CFLAGS = +MPI_CPPFLAGS = +MPI_CXXFLAGS = +MPI_FCFLAGS = +MPI_LDFLAGS = +MPI_LIBS = +MV = /opt/local/libexec/gnubin/mv +NETCDF_CFLAGS = +NETCDF_CPPFLAGS = +NETCDF_CXXFLAGS = +NETCDF_FCFLAGS = +NETCDF_FORTRAN_CFLAGS = +NETCDF_FORTRAN_CPPFLAGS = +NETCDF_FORTRAN_CXXFLAGS = +NETCDF_FORTRAN_FCFLAGS = +NETCDF_FORTRAN_LDFLAGS = +NETCDF_FORTRAN_LIBS = +NETCDF_LDFLAGS = +NETCDF_LIBS = +NVCC = +NVCC_CFLAGS = +NVCC_CPPFLAGS = +NVCC_LDFLAGS = +NVCC_LIBS = +OBJEXT = o +PACKAGE = abinit +PACKAGE_BUGREPORT = https://bugs.launchpad.net/abinit/ +PACKAGE_NAME = ABINIT +PACKAGE_STRING = ABINIT 10.0.0.83-58be4d +PACKAGE_TARNAME = abinit +PACKAGE_URL = +PACKAGE_VERSION = 10.0.0.83-58be4d +PAPI_CFLAGS = +PAPI_CPPFLAGS = +PAPI_LDFLAGS = +PAPI_LIBS = +PATCH = patch +PATH_SEPARATOR = : +PERL = /usr/bin/perl +PFFT_CFLAGS = +PFFT_CPPFLAGS = +PFFT_LDFLAGS = +PFFT_LIBS = +PYFLAGS = +PYTHON = python3.9 +PYTHON_CONFIG = python3.9-config +PYTHON_CPPFLAGS = -I/opt/local/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -I/opt/local/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 +RANLIB = ranlib +REALPATH = realpath +RM = /opt/local/libexec/gnubin/rm +SED = /usr/bin/sed +SET_MAKE = +SHELL = /bin/sh +STRIP = +TAR = tar +TRIQS_CFLAGS = +TRIQS_CPPFLAGS = +TRIQS_CXXFLAGS = +TRIQS_LDFLAGS = +TRIQS_LIBS = +TRUE_CPP = cpp +VERSION = 10.0.0.83-58be4d +WANNIER90_CPPFLAGS = +WANNIER90_FCFLAGS = -I/opt/local/include +WANNIER90_LDFLAGS = +WANNIER90_LIBS = -L/opt/local/lib -lwannier +XML2_CONFIG = +XMLF90_CPPFLAGS = +XMLF90_FCFLAGS = +XMLF90_LDFLAGS = +XMLF90_LIBS = +XML_CPPFLAGS = +XML_LIBS = +XPP = +XPPFLAGS = +XPPFLAGS_DEBUG = +XPPFLAGS_EXTRA = +XPPFLAGS_OPTIM = +YAKL_CPPFLAGS = +YAKL_FCFLAGS = +YAKL_LDFLAGS = +YAKL_LIBS = +abi_ac_distcheck = --with-config-file="/Users/gonze/_Research/ABINIT_git/gonze/mac-1P0-225.ac9" +abi_ac_version = 027100 +abi_am_version = 011603 +abi_avx_safe_mode_enable = no +abi_bse_unpacked_enable = no +abi_cc_path = +abi_cc_vendor = gnu +abi_cc_version = 9.4 +abi_cclock_enable = no +abi_cpp_path = +abi_cpu_64bits = yes +abi_cpu_bits = 64 +abi_cpu_model = unknown +abi_cpu_platform = apple +abi_cpu_spec = unknown_unknown +abi_cpu_vendor = unknown +abi_crpa_optim_enable = no +abi_cxx_path = +abi_cxx_vendor = gnu +abi_cxx_version = 9.4 +abi_debug_flavor = basic +abi_exports_enable = no +abi_fbk_abinit_common_ok = no +abi_fbk_bigdft_ok = disabled +abi_fbk_config = +abi_fbk_enable = no +abi_fbk_fft_ok = no +abi_fbk_fftw3_ok = no +abi_fbk_gpu_ok = no +abi_fbk_hdf5_ok = disabled +abi_fbk_init = def +abi_fbk_kokkos_ok = no +abi_fbk_levmar_ok = no +abi_fbk_libpaw_ok = no +abi_fbk_libpsml_ok = disabled +abi_fbk_libxc_ok = disabled +abi_fbk_libxml2_ok = no +abi_fbk_linalg_ok = disabled +abi_fbk_list = +abi_fbk_mpi_ok = no +abi_fbk_netcdf_fortran_ok = disabled +abi_fbk_netcdf_ok = disabled +abi_fbk_papi_ok = no +abi_fbk_pfft_ok = no +abi_fbk_prefix = +abi_fbk_required = +abi_fbk_triqs_ok = no +abi_fbk_wannier90_ok = disabled +abi_fbk_xmlf90_ok = disabled +abi_fbk_yakl_ok = no +abi_fc_path = +abi_fc_vendor = gnu +abi_fc_version = 9.4 +abi_fc_wrap = no +abi_fc_wrapper_enable = no +abi_fpp_path = +abi_gpu_arch = +abi_gpu_fcflags = +abi_gpu_flavor = none +abi_gpu_hip_libdir = +abi_gpu_incs = +abi_gpu_ldflags = +abi_gpu_libs = +abi_gpu_nvtx_v3 = +abi_gpu_roctx = +abi_gw_dpc_enable = yes +abi_hints_enable = yes +abi_libtetra_enable = yes +abi_libxml2_cppflags = +abi_libxml2_enable = no +abi_libxml2_fcflags = +abi_libxml2_init = def +abi_libxml2_ldflags = +abi_libxml2_libs = +abi_libxml2_ok = unknown +abi_libxml2_prefix = +abi_lotf_enable = no +abi_lt_version = 020406 +abi_m4_version = 010419 +abi_memory_profiling_enable = no +abi_mpi_cflags = +abi_mpi_cppflags = +abi_mpi_cxxflags = +abi_mpi_enable = yes +abi_mpi_fcflags = +abi_mpi_flavor = auto +abi_mpi_gpu_aware_enable = no +abi_mpi_incs = +abi_mpi_inplace_enable = yes +abi_mpi_interfaces_bugfix_enable = no +abi_mpi_io_default_enable = no +abi_mpi_io_enable = yes +abi_mpi_ldflags = +abi_mpi_level = 2 +abi_mpi_libs = +abi_netcdf_default_enable = no +abi_openmp_enable = no +abi_openmp_offload_enable = no +abi_optim_flavor = standard +abi_python_invocation_enable = no +abi_source_debug_enable = no +abi_stdin_enable = yes +abi_sys_spec = darwin-x86_64 +abi_timer_enable = yes +abi_triqs_v1_4_enable = no +abi_triqs_v2_0_enable = no +abi_zdot_bugfix_enable = no +abinit_bindir = /usr/local/bin +abinit_builddir = /Users/gonze/_Research/ABINIT_git/gonze +abinit_chkdir = /usr/local/share/abinit/tests +abinit_datdir = /usr/local/share/abinit +abinit_docdir = /usr/local/doc/abinit +abinit_incdir = /usr/local/include +abinit_libdir = /usr/local/lib +abinit_mandir = /usr/local/share/man +abinit_prefix = /usr/local +abinit_srcdir = /Users/gonze/_Research/ABINIT_git/gonze +abs_builddir = /Users/gonze/_Research/ABINIT_git/gonze/shared/common/src/mods +abs_srcdir = /Users/gonze/_Research/ABINIT_git/gonze/shared/common/src/mods +abs_top_builddir = /Users/gonze/_Research/ABINIT_git/gonze +abs_top_srcdir = /Users/gonze/_Research/ABINIT_git/gonze +ac_ct_CC = +ac_ct_CXX = +ac_ct_FC = +am__include = include +am__leading_dot = . +am__quote = +am__tar = tar --format=ustar -chf - "$$tardir" +am__untar = tar -xf - +bindir = ${exec_prefix}/bin +build = x86_64-apple-darwin18.7.0 +build_alias = +build_cpu = x86_64 +build_os = darwin18.7.0 +build_vendor = apple +builddir = . +cc_info_string = gcc-mp-9 (MacPorts gcc9 9.4.0_0) 9.4.0 +cxx_info_string = g++-mp-9 (MacPorts gcc9 9.4.0_0) 9.4.0 +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +enable_avx_safe_mode = +enable_bse_unpacked = +enable_cclock = +enable_crpa_optim = +enable_exports = +enable_fc_wrapper = +enable_gw_dpc = yes +enable_hints = +enable_libtetra = +enable_lotf = +enable_memory_profiling = +enable_mpi_gpu_aware = +enable_mpi_inplace = +enable_mpi_interfaces_bugfix = +enable_mpi_io = yes +enable_mpi_io_default = +enable_netcdf_default = +enable_openmp = +enable_openmp_offload = +enable_python_invocation = +enable_shared = +enable_source_debug = +enable_static = +enable_stdin = +enable_timer = +enable_triqs_v1_4 = +enable_triqs_v2_0 = +enable_zdot_bugfix = +exec_prefix = ${prefix} +fc_info_string = GNU Fortran (MacPorts gcc9 9.4.0_0) 9.4.0 +fc_mod_fcflags = +fc_timing = standard +fcflags_opt_02_clib = +fcflags_opt_10_defs = +fcflags_opt_11_memory_mpi = +fcflags_opt_12_hide_mpi = +fcflags_opt_14_hidewrite = +fcflags_opt_16_hideleave = +fcflags_opt_16_kokkos_toolbox = +fcflags_opt_17_gpu_toolbox = +fcflags_opt_17_libtetra_ext = +fcflags_opt_17_minimax = +fcflags_opt_17_yaml_out = +fcflags_opt_18_timing = +fcflags_opt_21_hashfuncs = +fcflags_opt_27_toolbox_oop = +fcflags_opt_28_numeric_noabirule = +fcflags_opt_29_kpoints = +fcflags_opt_32_util = +fcflags_opt_33_xc_lowlevel = +fcflags_opt_39_libpaw = +fcflags_opt_41_geometry = +fcflags_opt_42_nlstrain = +fcflags_opt_42_parser = +fcflags_opt_43_ptgroups = -O0 +fcflags_opt_43_wvl_wrappers = +fcflags_opt_44_abitools = +fcflags_opt_44_abitypes_defs = +fcflags_opt_44_manage_kokkos = +fcflags_opt_45_geomoptim = +fcflags_opt_45_xgTools = +fcflags_opt_46_ghc_omp = +fcflags_opt_46_manage_cuda = +fcflags_opt_48_diago = +fcflags_opt_49_gw_toolbox_oop = +fcflags_opt_51_manage_mpi = +fcflags_opt_52_fft_mpi_noabirule = +fcflags_opt_53_ffts = +fcflags_opt_54_spacepar = +fcflags_opt_55_abiutil = +fcflags_opt_56_io_mpi = +fcflags_opt_56_mixing = +fcflags_opt_56_recipspace = +fcflags_opt_56_xc = +fcflags_opt_57_iopsp_parser = +fcflags_opt_57_iovars = +fcflags_opt_61_occeig = +fcflags_opt_62_cg_noabirule = +fcflags_opt_62_ctqmc = +fcflags_opt_62_iowfdenpot = +fcflags_opt_62_poisson = +fcflags_opt_62_wvl_wfs = +fcflags_opt_64_psp = +fcflags_opt_65_lotf_base = +fcflags_opt_65_paw = +fcflags_opt_66_nonlocal = +fcflags_opt_66_vdwxc = +fcflags_opt_66_wfs = +fcflags_opt_67_common = +fcflags_opt_67_python_invocation_ext = +fcflags_opt_67_triqs_ext = +fcflags_opt_68_dmft = +fcflags_opt_68_lotf = +fcflags_opt_68_recursion = +fcflags_opt_68_rsprc = +fcflags_opt_69_wfdesc = +fcflags_opt_70_gw = +fcflags_opt_71_bse = +fcflags_opt_71_wannier = +fcflags_opt_72_response = +fcflags_opt_77_ddb = +fcflags_opt_77_suscep = +fcflags_opt_78_effpot = +fcflags_opt_78_eph = +fcflags_opt_79_seqpar_mpi = +fcflags_opt_80_rttddft = +fcflags_opt_80_tdep = +fcflags_opt_94_scfcv = +fcflags_opt_95_drive = +fcflags_opt_98_main = +fcflags_opt_bigdft = +fcflags_opt_default = +fcflags_opt_hdf5 = +fcflags_opt_levmar = +fcflags_opt_libpsml = +fcflags_opt_libxc = +fcflags_opt_libxml2 = +fcflags_opt_linalg = +fcflags_opt_netcdf = +fcflags_opt_netcdf_fortran = +fcflags_opt_papi = +fcflags_opt_triqs = +fcflags_opt_wannier90 = +fcflags_opt_xmlf90 = +host = x86_64-apple-darwin18.7.0 +host_alias = +host_cpu = x86_64 +host_os = darwin18.7.0 +host_vendor = apple +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = ${SHELL} /Users/gonze/_Research/ABINIT_git/gonze/config/gnu/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = ${datarootdir}/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = $(MKDIR_P) +oldincludedir = /usr/include +pdfdir = ${docdir} +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +runstatedir = ${localstatedir}/run +sbindir = ${exec_prefix}/sbin +sd_abinit_common_cppflags = +sd_abinit_common_enable = no +sd_abinit_common_enable_def = no +sd_abinit_common_fcflags = +sd_abinit_common_init = def +sd_abinit_common_ldflags = +sd_abinit_common_libs = +sd_abinit_common_ok = unknown +sd_abinit_common_options = optional skip +sd_abinit_common_policy = skip +sd_abinit_common_status = optional +sd_bigdft_cppflags = +sd_bigdft_enable = no +sd_bigdft_enable_def = no +sd_bigdft_fcflags = +sd_bigdft_init = def +sd_bigdft_ldflags = +sd_bigdft_libs = +sd_bigdft_ok = unknown +sd_bigdft_options = optional warn +sd_bigdft_policy = warn +sd_bigdft_status = optional +sd_fft_cflags = +sd_fft_choices = +sd_fft_cppflags = -I/opt/local/include +sd_fft_cxxflags = +sd_fft_enable = yes +sd_fft_fcflags = -I/opt/local/include +sd_fft_flavor = fftw3 +sd_fft_init = kwd +sd_fft_ldflags = +sd_fft_libs = -L/opt/local/lib -lfftw3 -lfftw3f +sd_fft_ok = yes +sd_fftw3_cflags = +sd_fftw3_cppflags = -I/opt/local/include +sd_fftw3_enable = yes +sd_fftw3_enable_def = no +sd_fftw3_fcflags = -I/opt/local/include +sd_fftw3_init = env +sd_fftw3_ldflags = +sd_fftw3_libs = -L/opt/local/lib -lfftw3 -lfftw3f +sd_fftw3_ok = yes +sd_fftw3_options = optional skip +sd_fftw3_policy = skip +sd_fftw3_status = optional +sd_gpu_cflags = +sd_gpu_cppflags = +sd_gpu_cxxflags = +sd_gpu_enable = no +sd_gpu_enable_def = no +sd_gpu_fcflags = +sd_gpu_init = def +sd_gpu_ldflags = +sd_gpu_libs = +sd_gpu_ok = no +sd_gpu_options = optional warn +sd_gpu_policy = warn +sd_gpu_prefix = +sd_gpu_status = optional +sd_hdf5_cflags = +sd_hdf5_cppflags = -I/opt/local/include -I/opt/local/include +sd_hdf5_cxxflags = +sd_hdf5_enable = yes +sd_hdf5_enable_def = yes +sd_hdf5_enable_fc = no +sd_hdf5_fcflags = +sd_hdf5_h5cc = /opt/local/bin/h5cc +sd_hdf5_h5fc = +sd_hdf5_init = dir +sd_hdf5_ldflags = +sd_hdf5_libs = -L/opt/local/lib -L/opt/local/lib -lhdf5_hl -L/opt/local/lib -lhdf5 -lz -ldl -lm +sd_hdf5_ok = yes +sd_hdf5_options = required no-fortran warn +sd_hdf5_policy = warn +sd_hdf5_status = required +sd_kokkos_cppflags = +sd_kokkos_cxxflags = +sd_kokkos_enable = no +sd_kokkos_enable_def = no +sd_kokkos_init = def +sd_kokkos_ldflags = +sd_kokkos_libs = +sd_kokkos_ok = unknown +sd_kokkos_options = optional fail +sd_kokkos_policy = fail +sd_kokkos_status = optional +sd_levmar_cflags = +sd_levmar_cppflags = +sd_levmar_enable = no +sd_levmar_enable_def = no +sd_levmar_init = def +sd_levmar_ldflags = +sd_levmar_libs = +sd_levmar_ok = unknown +sd_levmar_options = optional fail +sd_levmar_policy = fail +sd_levmar_status = optional +sd_libpaw_cppflags = +sd_libpaw_enable = no +sd_libpaw_enable_def = no +sd_libpaw_fcflags = +sd_libpaw_init = def +sd_libpaw_ldflags = +sd_libpaw_libs = +sd_libpaw_ok = unknown +sd_libpaw_options = optional skip +sd_libpaw_policy = skip +sd_libpaw_status = optional +sd_libpsml_cppflags = +sd_libpsml_enable = no +sd_libpsml_enable_def = no +sd_libpsml_fcflags = +sd_libpsml_init = def +sd_libpsml_ldflags = +sd_libpsml_libs = +sd_libpsml_ok = unknown +sd_libpsml_options = optional warn +sd_libpsml_policy = warn +sd_libpsml_status = optional +sd_libxc_cflags = +sd_libxc_cppflags = -I/opt/local/include +sd_libxc_enable = yes +sd_libxc_enable_def = yes +sd_libxc_enable_fc = no +sd_libxc_fcflags = +sd_libxc_init = dir +sd_libxc_ldflags = +sd_libxc_libs = -L/opt/local/lib -lxc +sd_libxc_ok = yes +sd_libxc_options = required no-fortran warn +sd_libxc_policy = warn +sd_libxc_status = required +sd_linalg_cflags = +sd_linalg_choices = +sd_linalg_cppflags = +sd_linalg_cxxflags = +sd_linalg_enable = yes +sd_linalg_fcflags = -I/opt/local/include +sd_linalg_flavor = openblas +sd_linalg_has_elpa = no +sd_linalg_has_scalapack = no +sd_linalg_init = env +sd_linalg_ldflags = +sd_linalg_libs = -L/opt/local/lib -lopenblas +sd_linalg_ok = yes +sd_mpi_cc = /opt/local/bin/mpicc +sd_mpi_cflags = +sd_mpi_cppflags = -I/opt/local/include +sd_mpi_cxx = /opt/local/bin/mpicxx +sd_mpi_enable = yes +sd_mpi_enable_cxx = yes +sd_mpi_enable_def = auto +sd_mpi_enable_fc = yes +sd_mpi_fc = /opt/local/bin/mpif90 +sd_mpi_fcflags = -I/opt/local/include +sd_mpi_init = dir +sd_mpi_ldflags = +sd_mpi_libs = +sd_mpi_ok = yes +sd_mpi_options = auto optional fail +sd_mpi_policy = fail +sd_mpi_status = optional +sd_netcdf_cflags = +sd_netcdf_cppflags = -I/opt/local/include +sd_netcdf_enable = yes +sd_netcdf_enable_def = yes +sd_netcdf_fcflags = -I/opt/local/include +sd_netcdf_fortran_cflags = +sd_netcdf_fortran_cppflags = -I/opt/local/include +sd_netcdf_fortran_enable = yes +sd_netcdf_fortran_enable_def = yes +sd_netcdf_fortran_fcflags = -I/opt/local/include +sd_netcdf_fortran_init = dir +sd_netcdf_fortran_ldflags = +sd_netcdf_fortran_libs = -L/opt/local/lib -lnetcdff +sd_netcdf_fortran_ok = yes +sd_netcdf_fortran_options = required warn +sd_netcdf_fortran_policy = warn +sd_netcdf_fortran_status = required +sd_netcdf_init = dir +sd_netcdf_ldflags = +sd_netcdf_libs = -L/opt/local/lib -lnetcdf +sd_netcdf_ok = yes +sd_netcdf_options = required warn +sd_netcdf_policy = warn +sd_netcdf_status = required +sd_papi_cflags = +sd_papi_cppflags = +sd_papi_enable = no +sd_papi_enable_def = no +sd_papi_init = def +sd_papi_ldflags = +sd_papi_libs = +sd_papi_ok = unknown +sd_papi_options = optional fail +sd_papi_policy = fail +sd_papi_sd_papi_fcflags = +sd_papi_status = optional +sd_pfft_cflags = +sd_pfft_cppflags = +sd_pfft_enable = no +sd_pfft_enable_def = no +sd_pfft_init = def +sd_pfft_ldflags = +sd_pfft_libs = +sd_pfft_ok = unknown +sd_pfft_options = optional skip +sd_pfft_policy = skip +sd_pfft_status = optional +sd_sys_fcflags = +sd_triqs_cflags = +sd_triqs_cppflags = +sd_triqs_cxxflags = +sd_triqs_enable = no +sd_triqs_enable_def = no +sd_triqs_fcflags = +sd_triqs_init = def +sd_triqs_ldflags = +sd_triqs_libs = +sd_triqs_ok = unknown +sd_triqs_options = optional fail +sd_triqs_policy = fail +sd_triqs_status = optional +sd_wannier90_cppflags = +sd_wannier90_enable = yes +sd_wannier90_enable_def = no +sd_wannier90_fcflags = -I/opt/local/include +sd_wannier90_init = env +sd_wannier90_ldflags = +sd_wannier90_libs = -L/opt/local/lib -lwannier +sd_wannier90_ok = yes +sd_wannier90_options = optional warn +sd_wannier90_policy = warn +sd_wannier90_status = optional +sd_xmlf90_cppflags = +sd_xmlf90_enable = no +sd_xmlf90_enable_def = no +sd_xmlf90_fcflags = +sd_xmlf90_init = def +sd_xmlf90_ldflags = +sd_xmlf90_libs = +sd_xmlf90_ok = unknown +sd_xmlf90_options = optional warn +sd_xmlf90_policy = warn +sd_xmlf90_status = optional +sd_yakl_cppflags = +sd_yakl_enable = no +sd_yakl_enable_def = no +sd_yakl_fcflags = +sd_yakl_init = def +sd_yakl_ldflags = +sd_yakl_libs = +sd_yakl_ok = unknown +sd_yakl_options = optional fail +sd_yakl_policy = fail +sd_yakl_status = optional +sharedstatedir = ${prefix}/com +src_02_clib_fcflags = -I$(top_builddir)/shared/common/src/02_clib -I$(top_srcdir)/shared/common/src/02_clib +src_10_defs_fcflags = -I$(top_builddir)/shared/common/src/10_defs -I$(top_srcdir)/shared/common/src/10_defs +src_11_memory_mpi_fcflags = -I$(top_builddir)/shared/common/src/11_memory_mpi -I$(top_srcdir)/shared/common/src/11_memory_mpi +src_12_hide_mpi_fcflags = -I$(top_builddir)/shared/common/src/12_hide_mpi -I$(top_srcdir)/shared/common/src/12_hide_mpi +src_14_hidewrite_fcflags = -I$(top_builddir)/shared/common/src/14_hidewrite -I$(top_srcdir)/shared/common/src/14_hidewrite +src_16_hideleave_fcflags = -I$(top_builddir)/shared/common/src/16_hideleave -I$(top_srcdir)/shared/common/src/16_hideleave +src_16_kokkos_toolbox_fcflags = -I$(top_builddir)/shared/common/src/16_kokkos_toolbox -I$(top_srcdir)/shared/common/src/16_kokkos_toolbox +src_17_gpu_toolbox_fcflags = -I$(top_builddir)/shared/common/src/17_gpu_toolbox -I$(top_srcdir)/shared/common/src/17_gpu_toolbox +src_17_libtetra_ext_fcflags = -I$(top_builddir)/shared/common/src/17_libtetra_ext -I$(top_srcdir)/shared/common/src/17_libtetra_ext +src_17_minimax_fcflags = -I$(top_builddir)/shared/common/src/17_minimax -I$(top_srcdir)/shared/common/src/17_minimax +src_17_yaml_out_fcflags = -I$(top_builddir)/shared/common/src/17_yaml_out -I$(top_srcdir)/shared/common/src/17_yaml_out +src_18_timing_fcflags = -I$(top_builddir)/shared/common/src/18_timing -I$(top_srcdir)/shared/common/src/18_timing +src_21_hashfuncs_fcflags = -I$(top_builddir)/shared/common/src/21_hashfuncs -I$(top_srcdir)/shared/common/src/21_hashfuncs +src_27_toolbox_oop_fcflags = -I$(top_builddir)/shared/common/src/27_toolbox_oop -I$(top_srcdir)/shared/common/src/27_toolbox_oop +src_28_numeric_noabirule_fcflags = -I$(top_builddir)/shared/common/src/28_numeric_noabirule -I$(top_srcdir)/shared/common/src/28_numeric_noabirule +src_29_kpoints_fcflags = -I$(top_builddir)/shared/common/src/29_kpoints -I$(top_srcdir)/shared/common/src/29_kpoints +src_32_util_fcflags = -I$(top_builddir)/shared/common/src/32_util -I$(top_srcdir)/shared/common/src/32_util +src_33_xc_lowlevel_fcflags = -I$(top_builddir)/shared/common/src/33_xc_lowlevel -I$(top_srcdir)/shared/common/src/33_xc_lowlevel +src_39_libpaw_fcflags = -I$(top_builddir)/shared/libpaw/src -I$(top_srcdir)/shared/libpaw/src +src_41_geometry_fcflags = -I$(top_builddir)/src/41_geometry -I$(top_srcdir)/src/41_geometry +src_42_nlstrain_fcflags = -I$(top_builddir)/src/42_nlstrain -I$(top_srcdir)/src/42_nlstrain +src_42_parser_fcflags = -I$(top_builddir)/src/42_parser -I$(top_srcdir)/src/42_parser +src_43_ptgroups_fcflags = -I$(top_builddir)/src/43_ptgroups -I$(top_srcdir)/src/43_ptgroups +src_43_wvl_wrappers_fcflags = -I$(top_builddir)/src/43_wvl_wrappers -I$(top_srcdir)/src/43_wvl_wrappers +src_44_abitools_fcflags = -I$(top_builddir)/src/44_abitools -I$(top_srcdir)/src/44_abitools +src_44_abitypes_defs_fcflags = -I$(top_builddir)/src/44_abitypes_defs -I$(top_srcdir)/src/44_abitypes_defs +src_44_manage_kokkos_fcflags = -I$(top_builddir)/src/44_manage_kokkos -I$(top_srcdir)/src/44_manage_kokkos +src_45_geomoptim_fcflags = -I$(top_builddir)/src/45_geomoptim -I$(top_srcdir)/src/45_geomoptim +src_45_xgTools_fcflags = -I$(top_builddir)/src/45_xgTools -I$(top_srcdir)/src/45_xgTools +src_46_ghc_omp_fcflags = -I$(top_builddir)/src/46_ghc_omp -I$(top_srcdir)/src/46_ghc_omp +src_46_manage_cuda_fcflags = -I$(top_builddir)/src/46_manage_cuda -I$(top_srcdir)/src/46_manage_cuda +src_48_diago_fcflags = -I$(top_builddir)/src/48_diago -I$(top_srcdir)/src/48_diago +src_49_gw_toolbox_oop_fcflags = -I$(top_builddir)/src/49_gw_toolbox_oop -I$(top_srcdir)/src/49_gw_toolbox_oop +src_51_manage_mpi_fcflags = -I$(top_builddir)/src/51_manage_mpi -I$(top_srcdir)/src/51_manage_mpi +src_52_fft_mpi_noabirule_fcflags = -I$(top_builddir)/src/52_fft_mpi_noabirule -I$(top_srcdir)/src/52_fft_mpi_noabirule +src_53_ffts_fcflags = -I$(top_builddir)/src/53_ffts -I$(top_srcdir)/src/53_ffts +src_54_spacepar_fcflags = -I$(top_builddir)/src/54_spacepar -I$(top_srcdir)/src/54_spacepar +src_55_abiutil_fcflags = -I$(top_builddir)/src/55_abiutil -I$(top_srcdir)/src/55_abiutil +src_56_io_mpi_fcflags = -I$(top_builddir)/src/56_io_mpi -I$(top_srcdir)/src/56_io_mpi +src_56_mixing_fcflags = -I$(top_builddir)/src/56_mixing -I$(top_srcdir)/src/56_mixing +src_56_recipspace_fcflags = -I$(top_builddir)/src/56_recipspace -I$(top_srcdir)/src/56_recipspace +src_56_xc_fcflags = -I$(top_builddir)/src/56_xc -I$(top_srcdir)/src/56_xc +src_57_iopsp_parser_fcflags = -I$(top_builddir)/src/57_iopsp_parser -I$(top_srcdir)/src/57_iopsp_parser +src_57_iovars_fcflags = -I$(top_builddir)/src/57_iovars -I$(top_srcdir)/src/57_iovars +src_61_occeig_fcflags = -I$(top_builddir)/src/61_occeig -I$(top_srcdir)/src/61_occeig +src_62_cg_noabirule_fcflags = -I$(top_builddir)/src/62_cg_noabirule -I$(top_srcdir)/src/62_cg_noabirule +src_62_ctqmc_fcflags = -I$(top_builddir)/src/62_ctqmc -I$(top_srcdir)/src/62_ctqmc +src_62_iowfdenpot_fcflags = -I$(top_builddir)/src/62_iowfdenpot -I$(top_srcdir)/src/62_iowfdenpot +src_62_poisson_fcflags = -I$(top_builddir)/src/62_poisson -I$(top_srcdir)/src/62_poisson +src_62_wvl_wfs_fcflags = -I$(top_builddir)/src/62_wvl_wfs -I$(top_srcdir)/src/62_wvl_wfs +src_64_psp_fcflags = -I$(top_builddir)/src/64_psp -I$(top_srcdir)/src/64_psp +src_65_lotf_base_fcflags = -I$(top_builddir)/src/65_lotf_base -I$(top_srcdir)/src/65_lotf_base +src_65_paw_fcflags = -I$(top_builddir)/src/65_paw -I$(top_srcdir)/src/65_paw +src_66_nonlocal_fcflags = -I$(top_builddir)/src/66_nonlocal -I$(top_srcdir)/src/66_nonlocal +src_66_vdwxc_fcflags = -I$(top_builddir)/src/66_vdwxc -I$(top_srcdir)/src/66_vdwxc +src_66_wfs_fcflags = -I$(top_builddir)/src/66_wfs -I$(top_srcdir)/src/66_wfs +src_67_common_fcflags = -I$(top_builddir)/src/67_common -I$(top_srcdir)/src/67_common +src_67_python_invocation_ext_fcflags = -I$(top_builddir)/src/67_python_invocation_ext -I$(top_srcdir)/src/67_python_invocation_ext +src_67_triqs_ext_fcflags = -I$(top_builddir)/src/67_triqs_ext -I$(top_srcdir)/src/67_triqs_ext +src_68_dmft_fcflags = -I$(top_builddir)/src/68_dmft -I$(top_srcdir)/src/68_dmft +src_68_lotf_fcflags = -I$(top_builddir)/src/68_lotf -I$(top_srcdir)/src/68_lotf +src_68_recursion_fcflags = -I$(top_builddir)/src/68_recursion -I$(top_srcdir)/src/68_recursion +src_68_rsprc_fcflags = -I$(top_builddir)/src/68_rsprc -I$(top_srcdir)/src/68_rsprc +src_69_wfdesc_fcflags = -I$(top_builddir)/src/69_wfdesc -I$(top_srcdir)/src/69_wfdesc +src_70_gw_fcflags = -I$(top_builddir)/src/70_gw -I$(top_srcdir)/src/70_gw +src_71_bse_fcflags = -I$(top_builddir)/src/71_bse -I$(top_srcdir)/src/71_bse +src_71_wannier_fcflags = -I$(top_builddir)/src/71_wannier -I$(top_srcdir)/src/71_wannier +src_72_response_fcflags = -I$(top_builddir)/src/72_response -I$(top_srcdir)/src/72_response +src_77_ddb_fcflags = -I$(top_builddir)/src/77_ddb -I$(top_srcdir)/src/77_ddb +src_77_suscep_fcflags = -I$(top_builddir)/src/77_suscep -I$(top_srcdir)/src/77_suscep +src_78_effpot_fcflags = -I$(top_builddir)/src/78_effpot -I$(top_srcdir)/src/78_effpot +src_78_eph_fcflags = -I$(top_builddir)/src/78_eph -I$(top_srcdir)/src/78_eph +src_79_seqpar_mpi_fcflags = -I$(top_builddir)/src/79_seqpar_mpi -I$(top_srcdir)/src/79_seqpar_mpi +src_80_rttddft_fcflags = -I$(top_builddir)/src/80_rttddft -I$(top_srcdir)/src/80_rttddft +src_80_tdep_fcflags = -I$(top_builddir)/src/80_tdep -I$(top_srcdir)/src/80_tdep +src_94_scfcv_fcflags = -I$(top_builddir)/src/94_scfcv -I$(top_srcdir)/src/94_scfcv +src_95_drive_fcflags = -I$(top_builddir)/src/95_drive -I$(top_srcdir)/src/95_drive +src_common_fcflags = -I$(top_builddir)/shared/common/src/incs -I$(top_srcdir)/shared/common/src/incs -I$(top_builddir)/shared/common/src/mods -I$(top_srcdir)/shared/common/src/mods +src_core_fcflags = -I$(top_builddir)/src/incs -I$(top_srcdir)/src/incs -I$(top_builddir)/src/mods -I$(top_srcdir)/src/mods +src_libpaw_fcflags = -I$(top_builddir)/shared/libpaw/incs -I$(top_srcdir)/shared/libpaw/incs -I$(top_builddir)/shared/libpaw/mods -I$(top_srcdir)/shared/libpaw/mods +srcdir = . +sysconfdir = ${prefix}/etc +target = x86_64-apple-darwin18.7.0 +target_alias = +target_cpu = x86_64 +target_os = darwin18.7.0 +target_vendor = apple +top_build_prefix = ../../../../ +top_builddir = ../../../.. +top_srcdir = ../../../.. +with_abinit_common = +with_bigdft = +with_config_file = +with_debug_flavor = +with_fallbacks = +with_fc_vendor = +with_fc_version = +with_fft_flavor = fftw3 +with_fftw3 = +with_gnu_ld = +with_gpu = +with_hdf5 = /opt/local +with_kokkos = +with_levmar = +with_libpaw = +with_libpsml = +with_libxc = /opt/local +with_libxml2 = +with_linalg_flavor = openblas +with_mpi = /opt/local +with_mpi_level = +with_netcdf = /opt/local +with_optim_flavor = +with_papi = +with_pfft = +with_triqs = +with_wannier90 = +with_xmlf90 = +with_yakl = +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu shared/common/src/mods/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu shared/common/src/mods/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +tags TAGS: + +ctags CTAGS: + +cscope cscopelist: + + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile all-local +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-local + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am all-local check check-am clean clean-generic \ + cscopelist-am ctags-am distclean distclean-generic distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-local pdf pdf-am ps ps-am tags-am uninstall \ + uninstall-am + +.PRECIOUS: Makefile + + +all-local: + @echo "There is no buildable file here" + +mostlyclean-local: + rm -f *.$(MODEXT) *.h + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/GX-PAW/common/src/mods/Makefile.am b/GX-PAW/common/src/mods/Makefile.am new file mode 100644 index 00000000..3ad7d00c --- /dev/null +++ b/GX-PAW/common/src/mods/Makefile.am @@ -0,0 +1,16 @@ +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-inter on 2024/03/16 21:07:39 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-inter script or its config file instead. +# + +all-local: + @echo "There is no buildable file here" + +mostlyclean-local: + rm -f *.$(MODEXT) *.h diff --git a/GX-PAW/common/src/mods/Makefile.in b/GX-PAW/common/src/mods/Makefile.in new file mode 100644 index 00000000..1304333a --- /dev/null +++ b/GX-PAW/common/src/mods/Makefile.in @@ -0,0 +1,1315 @@ +# Makefile.in generated by automake 1.16.3 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2020 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-inter on 2024/03/16 21:07:39 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-inter script or its config file instead. +# +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = shared/common/src/mods +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/m4/arch-gpu.m4 \ + $(top_srcdir)/config/m4/arch-mpi.m4 \ + $(top_srcdir)/config/m4/auto-autotools.m4 \ + $(top_srcdir)/config/m4/auto-corelibs.m4 \ + $(top_srcdir)/config/m4/auto-debug.m4 \ + $(top_srcdir)/config/m4/auto-dirflags.m4 \ + $(top_srcdir)/config/m4/auto-env.m4 \ + $(top_srcdir)/config/m4/auto-hints.m4 \ + $(top_srcdir)/config/m4/auto-optim.m4 \ + $(top_srcdir)/config/m4/auto-options.m4 \ + $(top_srcdir)/config/m4/auto-output.m4 \ + $(top_srcdir)/config/m4/auto-triggers.m4 \ + $(top_srcdir)/config/m4/conf-atompaw.m4 \ + $(top_srcdir)/config/m4/conf-debug.m4 \ + $(top_srcdir)/config/m4/conf-fallbacks.m4 \ + $(top_srcdir)/config/m4/conf-files.m4 \ + $(top_srcdir)/config/m4/conf-init.m4 \ + $(top_srcdir)/config/m4/conf-openmp.m4 \ + $(top_srcdir)/config/m4/conf-optim.m4 \ + $(top_srcdir)/config/m4/lang-c++.m4 \ + $(top_srcdir)/config/m4/lang-c.m4 \ + $(top_srcdir)/config/m4/lang-fortran-import.m4 \ + $(top_srcdir)/config/m4/lang-fortran.m4 \ + $(top_srcdir)/config/m4/lang-python.m4 \ + $(top_srcdir)/config/m4/libxml2.m4 \ + $(top_srcdir)/config/m4/misc-display.m4 \ + $(top_srcdir)/config/m4/sd_abinit_common.m4 \ + $(top_srcdir)/config/m4/sd_arch_gpu.m4 \ + $(top_srcdir)/config/m4/sd_arch_mpi.m4 \ + $(top_srcdir)/config/m4/sd_bigdft.m4 \ + $(top_srcdir)/config/m4/sd_core.m4 \ + $(top_srcdir)/config/m4/sd_esl.m4 \ + $(top_srcdir)/config/m4/sd_fftw3.m4 \ + $(top_srcdir)/config/m4/sd_gpu_kokkos.m4 \ + $(top_srcdir)/config/m4/sd_gpu_yakl.m4 \ + $(top_srcdir)/config/m4/sd_io_hdf5.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf_fortran.m4 \ + $(top_srcdir)/config/m4/sd_levmar.m4 \ + $(top_srcdir)/config/m4/sd_libpaw.m4 \ + $(top_srcdir)/config/m4/sd_libpsml.m4 \ + $(top_srcdir)/config/m4/sd_libxc.m4 \ + $(top_srcdir)/config/m4/sd_math_fft.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_core.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_util.m4 \ + $(top_srcdir)/config/m4/sd_papi.m4 \ + $(top_srcdir)/config/m4/sd_pfft.m4 \ + $(top_srcdir)/config/m4/sd_triqs.m4 \ + $(top_srcdir)/config/m4/sd_wannier90.m4 \ + $(top_srcdir)/config/m4/sd_xmlf90.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +SOURCES = +DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(srcdir)/Makefile.in +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ABINIT_BINARY_PACKAGE = @ABINIT_BINARY_PACKAGE@ +ABINIT_COMMON_CPPFLAGS = @ABINIT_COMMON_CPPFLAGS@ +ABINIT_COMMON_FCFLAGS = @ABINIT_COMMON_FCFLAGS@ +ABINIT_COMMON_LDFLAGS = @ABINIT_COMMON_LDFLAGS@ +ABINIT_COMMON_LIBS = @ABINIT_COMMON_LIBS@ +ABINIT_TARGET = @ABINIT_TARGET@ +ABINIT_VERSION = @ABINIT_VERSION@ +ABINIT_VERSION_BASE = @ABINIT_VERSION_BASE@ +ABINIT_VERSION_BUILD = @ABINIT_VERSION_BUILD@ +ABINIT_VERSION_MAJOR = @ABINIT_VERSION_MAJOR@ +ABINIT_VERSION_MICRO = @ABINIT_VERSION_MICRO@ +ABINIT_VERSION_MINOR = @ABINIT_VERSION_MINOR@ +ABI_CPPFLAGS = @ABI_CPPFLAGS@ +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +ARFLAGS = @ARFLAGS@ +ARFLAGS_CMD = @ARFLAGS_CMD@ +ARFLAGS_DEBUG = @ARFLAGS_DEBUG@ +ARFLAGS_EXTRA = @ARFLAGS_EXTRA@ +ARFLAGS_HINTS = @ARFLAGS_HINTS@ +ARFLAGS_OPTIM = @ARFLAGS_OPTIM@ +ATOMPAW_BIN = @ATOMPAW_BIN@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BIGDFT_CPPFLAGS = @BIGDFT_CPPFLAGS@ +BIGDFT_FCFLAGS = @BIGDFT_FCFLAGS@ +BIGDFT_LDFLAGS = @BIGDFT_LDFLAGS@ +BIGDFT_LIBS = @BIGDFT_LIBS@ +BOURNE_SHELL = @BOURNE_SHELL@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CC_LDFLAGS = @CC_LDFLAGS@ +CC_LDFLAGS_DEBUG = @CC_LDFLAGS_DEBUG@ +CC_LDFLAGS_EXTRA = @CC_LDFLAGS_EXTRA@ +CC_LDFLAGS_GPU = @CC_LDFLAGS_GPU@ +CC_LDFLAGS_HINTS = @CC_LDFLAGS_HINTS@ +CC_LDFLAGS_OPTIM = @CC_LDFLAGS_OPTIM@ +CC_LIBS = @CC_LIBS@ +CC_LIBS_DEBUG = @CC_LIBS_DEBUG@ +CC_LIBS_EXTRA = @CC_LIBS_EXTRA@ +CC_LIBS_GPU = @CC_LIBS_GPU@ +CC_LIBS_HINTS = @CC_LIBS_HINTS@ +CC_LIBS_OPTIM = @CC_LIBS_OPTIM@ +CFLAGS = @CFLAGS@ +CFLAGS_DEBUG = @CFLAGS_DEBUG@ +CFLAGS_EXTRA = @CFLAGS_EXTRA@ +CFLAGS_GPU = @CFLAGS_GPU@ +CFLAGS_HINTS = @CFLAGS_HINTS@ +CFLAGS_OPTIM = @CFLAGS_OPTIM@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CPPFLAGS_DEBUG = @CPPFLAGS_DEBUG@ +CPPFLAGS_EXTRA = @CPPFLAGS_EXTRA@ +CPPFLAGS_GPU = @CPPFLAGS_GPU@ +CPPFLAGS_HINTS = @CPPFLAGS_HINTS@ +CPPFLAGS_HINTS_EXT = @CPPFLAGS_HINTS_EXT@ +CPPFLAGS_OPTIM = @CPPFLAGS_OPTIM@ +CXX = @CXX@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CXXFLAGS_DEBUG = @CXXFLAGS_DEBUG@ +CXXFLAGS_EXTRA = @CXXFLAGS_EXTRA@ +CXXFLAGS_GPU = @CXXFLAGS_GPU@ +CXXFLAGS_HINTS = @CXXFLAGS_HINTS@ +CXXFLAGS_OPTIM = @CXXFLAGS_OPTIM@ +CXX_LDFLAGS = @CXX_LDFLAGS@ +CXX_LDFLAGS_DEBUG = @CXX_LDFLAGS_DEBUG@ +CXX_LDFLAGS_EXTRA = @CXX_LDFLAGS_EXTRA@ +CXX_LDFLAGS_GPU = @CXX_LDFLAGS_GPU@ +CXX_LDFLAGS_HINTS = @CXX_LDFLAGS_HINTS@ +CXX_LDFLAGS_OPTIM = @CXX_LDFLAGS_OPTIM@ +CXX_LIBS = @CXX_LIBS@ +CXX_LIBS_DEBUG = @CXX_LIBS_DEBUG@ +CXX_LIBS_EXTRA = @CXX_LIBS_EXTRA@ +CXX_LIBS_GPU = @CXX_LIBS_GPU@ +CXX_LIBS_HINTS = @CXX_LIBS_HINTS@ +CXX_LIBS_OPTIM = @CXX_LIBS_OPTIM@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ +FCFLAGS = @FCFLAGS@ +FCFLAGS_DEBUG = @FCFLAGS_DEBUG@ +FCFLAGS_EXTRA = @FCFLAGS_EXTRA@ +FCFLAGS_F90 = @FCFLAGS_F90@ +FCFLAGS_FIXEDFORM = @FCFLAGS_FIXEDFORM@ +FCFLAGS_FREEFORM = @FCFLAGS_FREEFORM@ +FCFLAGS_HINTS = @FCFLAGS_HINTS@ +FCFLAGS_MODDIR = @FCFLAGS_MODDIR@ +FCFLAGS_OPENMP = @FCFLAGS_OPENMP@ +FCFLAGS_OPENMP_OFFLOAD = @FCFLAGS_OPENMP_OFFLOAD@ +FCFLAGS_OPTIM = @FCFLAGS_OPTIM@ +FCLIBS = @FCLIBS@ +FC_LDFLAGS = @FC_LDFLAGS@ +FC_LDFLAGS_DEBUG = @FC_LDFLAGS_DEBUG@ +FC_LDFLAGS_EXTRA = @FC_LDFLAGS_EXTRA@ +FC_LDFLAGS_HINTS = @FC_LDFLAGS_HINTS@ +FC_LDFLAGS_OPTIM = @FC_LDFLAGS_OPTIM@ +FC_LIBS = @FC_LIBS@ +FC_LIBS_DEBUG = @FC_LIBS_DEBUG@ +FC_LIBS_EXTRA = @FC_LIBS_EXTRA@ +FC_LIBS_HINTS = @FC_LIBS_HINTS@ +FC_LIBS_OPTIM = @FC_LIBS_OPTIM@ +FC_NOWRAP = @FC_NOWRAP@ +FFLAGS = @FFLAGS@ +FFTW3_CFLAGS = @FFTW3_CFLAGS@ +FFTW3_CPPFLAGS = @FFTW3_CPPFLAGS@ +FFTW3_FCFLAGS = @FFTW3_FCFLAGS@ +FFTW3_LDFLAGS = @FFTW3_LDFLAGS@ +FFTW3_LIBS = @FFTW3_LIBS@ +FFT_CFLAGS = @FFT_CFLAGS@ +FFT_FCFLAGS = @FFT_FCFLAGS@ +FPP = @FPP@ +FPPFLAGS = @FPPFLAGS@ +FPPFLAGS_DEBUG = @FPPFLAGS_DEBUG@ +FPPFLAGS_EXTRA = @FPPFLAGS_EXTRA@ +FPPFLAGS_HINTS = @FPPFLAGS_HINTS@ +FPPFLAGS_OPTIM = @FPPFLAGS_OPTIM@ +GPU_ARCH = @GPU_ARCH@ +GPU_CFLAGS = @GPU_CFLAGS@ +GPU_CPPFLAGS = @GPU_CPPFLAGS@ +GPU_CXXFLAGS = @GPU_CXXFLAGS@ +GPU_FCFLAGS = @GPU_FCFLAGS@ +GPU_LDFLAGS = @GPU_LDFLAGS@ +GPU_LIBS = @GPU_LIBS@ +GRAPHATOM_BIN = @GRAPHATOM_BIN@ +GREP = @GREP@ +H5CC = @H5CC@ +HDF5_CFLAGS = @HDF5_CFLAGS@ +HDF5_CPPFLAGS = @HDF5_CPPFLAGS@ +HDF5_CXXFLAGS = @HDF5_CXXFLAGS@ +HDF5_FCFLAGS = @HDF5_FCFLAGS@ +HDF5_LDFLAGS = @HDF5_LDFLAGS@ +HDF5_LIBS = @HDF5_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +LDFLAGS = @LDFLAGS@ +LEVMAR_CFLAGS = @LEVMAR_CFLAGS@ +LEVMAR_CPPFLAGS = @LEVMAR_CPPFLAGS@ +LEVMAR_LDFLAGS = @LEVMAR_LDFLAGS@ +LEVMAR_LIBS = @LEVMAR_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPAW_CPPFLAGS = @LIBPAW_CPPFLAGS@ +LIBPAW_FCFLAGS = @LIBPAW_FCFLAGS@ +LIBPAW_LDFLAGS = @LIBPAW_LDFLAGS@ +LIBPAW_LIBS = @LIBPAW_LIBS@ +LIBPSML_CPPFLAGS = @LIBPSML_CPPFLAGS@ +LIBPSML_FCFLAGS = @LIBPSML_FCFLAGS@ +LIBPSML_LDFLAGS = @LIBPSML_LDFLAGS@ +LIBPSML_LIBS = @LIBPSML_LIBS@ +LIBS = @LIBS@ +LIBXC_CFLAGS = @LIBXC_CFLAGS@ +LIBXC_CPPFLAGS = @LIBXC_CPPFLAGS@ +LIBXC_FCFLAGS = @LIBXC_FCFLAGS@ +LIBXC_LDFLAGS = @LIBXC_LDFLAGS@ +LIBXC_LIBS = @LIBXC_LIBS@ +LIBXML2_CPPFLAGS = @LIBXML2_CPPFLAGS@ +LIBXML2_FCFLAGS = @LIBXML2_FCFLAGS@ +LIBXML2_LIBS = @LIBXML2_LIBS@ +LINALG_CFLAGS = @LINALG_CFLAGS@ +LINALG_CPPFLAGS = @LINALG_CPPFLAGS@ +LINALG_CXXFLAGS = @LINALG_CXXFLAGS@ +LINALG_FCFLAGS = @LINALG_FCFLAGS@ +LINALG_LDFLAGS = @LINALG_LDFLAGS@ +LINALG_LIBS = @LINALG_LIBS@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODEXT = @MODEXT@ +MPI_CFLAGS = @MPI_CFLAGS@ +MPI_CPPFLAGS = @MPI_CPPFLAGS@ +MPI_CXXFLAGS = @MPI_CXXFLAGS@ +MPI_FCFLAGS = @MPI_FCFLAGS@ +MPI_LDFLAGS = @MPI_LDFLAGS@ +MPI_LIBS = @MPI_LIBS@ +MV = @MV@ +NETCDF_CFLAGS = @NETCDF_CFLAGS@ +NETCDF_CPPFLAGS = @NETCDF_CPPFLAGS@ +NETCDF_CXXFLAGS = @NETCDF_CXXFLAGS@ +NETCDF_FCFLAGS = @NETCDF_FCFLAGS@ +NETCDF_FORTRAN_CFLAGS = @NETCDF_FORTRAN_CFLAGS@ +NETCDF_FORTRAN_CPPFLAGS = @NETCDF_FORTRAN_CPPFLAGS@ +NETCDF_FORTRAN_CXXFLAGS = @NETCDF_FORTRAN_CXXFLAGS@ +NETCDF_FORTRAN_FCFLAGS = @NETCDF_FORTRAN_FCFLAGS@ +NETCDF_FORTRAN_LDFLAGS = @NETCDF_FORTRAN_LDFLAGS@ +NETCDF_FORTRAN_LIBS = @NETCDF_FORTRAN_LIBS@ +NETCDF_LDFLAGS = @NETCDF_LDFLAGS@ +NETCDF_LIBS = @NETCDF_LIBS@ +NVCC = @NVCC@ +NVCC_CFLAGS = @NVCC_CFLAGS@ +NVCC_CPPFLAGS = @NVCC_CPPFLAGS@ +NVCC_LDFLAGS = @NVCC_LDFLAGS@ +NVCC_LIBS = @NVCC_LIBS@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PAPI_CFLAGS = @PAPI_CFLAGS@ +PAPI_CPPFLAGS = @PAPI_CPPFLAGS@ +PAPI_LDFLAGS = @PAPI_LDFLAGS@ +PAPI_LIBS = @PAPI_LIBS@ +PATCH = @PATCH@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PFFT_CFLAGS = @PFFT_CFLAGS@ +PFFT_CPPFLAGS = @PFFT_CPPFLAGS@ +PFFT_LDFLAGS = @PFFT_LDFLAGS@ +PFFT_LIBS = @PFFT_LIBS@ +PYFLAGS = @PYFLAGS@ +PYTHON = @PYTHON@ +PYTHON_CONFIG = @PYTHON_CONFIG@ +PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ +RANLIB = @RANLIB@ +REALPATH = @REALPATH@ +RM = @RM@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +TAR = @TAR@ +TRIQS_CFLAGS = @TRIQS_CFLAGS@ +TRIQS_CPPFLAGS = @TRIQS_CPPFLAGS@ +TRIQS_CXXFLAGS = @TRIQS_CXXFLAGS@ +TRIQS_LDFLAGS = @TRIQS_LDFLAGS@ +TRIQS_LIBS = @TRIQS_LIBS@ +TRUE_CPP = @TRUE_CPP@ +VERSION = @VERSION@ +WANNIER90_CPPFLAGS = @WANNIER90_CPPFLAGS@ +WANNIER90_FCFLAGS = @WANNIER90_FCFLAGS@ +WANNIER90_LDFLAGS = @WANNIER90_LDFLAGS@ +WANNIER90_LIBS = @WANNIER90_LIBS@ +XML2_CONFIG = @XML2_CONFIG@ +XMLF90_CPPFLAGS = @XMLF90_CPPFLAGS@ +XMLF90_FCFLAGS = @XMLF90_FCFLAGS@ +XMLF90_LDFLAGS = @XMLF90_LDFLAGS@ +XMLF90_LIBS = @XMLF90_LIBS@ +XML_CPPFLAGS = @XML_CPPFLAGS@ +XML_LIBS = @XML_LIBS@ +XPP = @XPP@ +XPPFLAGS = @XPPFLAGS@ +XPPFLAGS_DEBUG = @XPPFLAGS_DEBUG@ +XPPFLAGS_EXTRA = @XPPFLAGS_EXTRA@ +XPPFLAGS_OPTIM = @XPPFLAGS_OPTIM@ +YAKL_CPPFLAGS = @YAKL_CPPFLAGS@ +YAKL_FCFLAGS = @YAKL_FCFLAGS@ +YAKL_LDFLAGS = @YAKL_LDFLAGS@ +YAKL_LIBS = @YAKL_LIBS@ +abi_ac_distcheck = @abi_ac_distcheck@ +abi_ac_version = @abi_ac_version@ +abi_am_version = @abi_am_version@ +abi_avx_safe_mode_enable = @abi_avx_safe_mode_enable@ +abi_bse_unpacked_enable = @abi_bse_unpacked_enable@ +abi_cc_path = @abi_cc_path@ +abi_cc_vendor = @abi_cc_vendor@ +abi_cc_version = @abi_cc_version@ +abi_cclock_enable = @abi_cclock_enable@ +abi_cpp_path = @abi_cpp_path@ +abi_cpu_64bits = @abi_cpu_64bits@ +abi_cpu_bits = @abi_cpu_bits@ +abi_cpu_model = @abi_cpu_model@ +abi_cpu_platform = @abi_cpu_platform@ +abi_cpu_spec = @abi_cpu_spec@ +abi_cpu_vendor = @abi_cpu_vendor@ +abi_crpa_optim_enable = @abi_crpa_optim_enable@ +abi_cxx_path = @abi_cxx_path@ +abi_cxx_vendor = @abi_cxx_vendor@ +abi_cxx_version = @abi_cxx_version@ +abi_debug_flavor = @abi_debug_flavor@ +abi_exports_enable = @abi_exports_enable@ +abi_fbk_abinit_common_ok = @abi_fbk_abinit_common_ok@ +abi_fbk_bigdft_ok = @abi_fbk_bigdft_ok@ +abi_fbk_config = @abi_fbk_config@ +abi_fbk_enable = @abi_fbk_enable@ +abi_fbk_fft_ok = @abi_fbk_fft_ok@ +abi_fbk_fftw3_ok = @abi_fbk_fftw3_ok@ +abi_fbk_gpu_ok = @abi_fbk_gpu_ok@ +abi_fbk_hdf5_ok = @abi_fbk_hdf5_ok@ +abi_fbk_init = @abi_fbk_init@ +abi_fbk_kokkos_ok = @abi_fbk_kokkos_ok@ +abi_fbk_levmar_ok = @abi_fbk_levmar_ok@ +abi_fbk_libpaw_ok = @abi_fbk_libpaw_ok@ +abi_fbk_libpsml_ok = @abi_fbk_libpsml_ok@ +abi_fbk_libxc_ok = @abi_fbk_libxc_ok@ +abi_fbk_libxml2_ok = @abi_fbk_libxml2_ok@ +abi_fbk_linalg_ok = @abi_fbk_linalg_ok@ +abi_fbk_list = @abi_fbk_list@ +abi_fbk_mpi_ok = @abi_fbk_mpi_ok@ +abi_fbk_netcdf_fortran_ok = @abi_fbk_netcdf_fortran_ok@ +abi_fbk_netcdf_ok = @abi_fbk_netcdf_ok@ +abi_fbk_papi_ok = @abi_fbk_papi_ok@ +abi_fbk_pfft_ok = @abi_fbk_pfft_ok@ +abi_fbk_prefix = @abi_fbk_prefix@ +abi_fbk_required = @abi_fbk_required@ +abi_fbk_triqs_ok = @abi_fbk_triqs_ok@ +abi_fbk_wannier90_ok = @abi_fbk_wannier90_ok@ +abi_fbk_xmlf90_ok = @abi_fbk_xmlf90_ok@ +abi_fbk_yakl_ok = @abi_fbk_yakl_ok@ +abi_fc_path = @abi_fc_path@ +abi_fc_vendor = @abi_fc_vendor@ +abi_fc_version = @abi_fc_version@ +abi_fc_wrap = @abi_fc_wrap@ +abi_fc_wrapper_enable = @abi_fc_wrapper_enable@ +abi_fpp_path = @abi_fpp_path@ +abi_gpu_arch = @abi_gpu_arch@ +abi_gpu_fcflags = @abi_gpu_fcflags@ +abi_gpu_flavor = @abi_gpu_flavor@ +abi_gpu_hip_libdir = @abi_gpu_hip_libdir@ +abi_gpu_incs = @abi_gpu_incs@ +abi_gpu_ldflags = @abi_gpu_ldflags@ +abi_gpu_libs = @abi_gpu_libs@ +abi_gpu_nvtx_v3 = @abi_gpu_nvtx_v3@ +abi_gpu_roctx = @abi_gpu_roctx@ +abi_gw_dpc_enable = @abi_gw_dpc_enable@ +abi_hints_enable = @abi_hints_enable@ +abi_libtetra_enable = @abi_libtetra_enable@ +abi_libxml2_cppflags = @abi_libxml2_cppflags@ +abi_libxml2_enable = @abi_libxml2_enable@ +abi_libxml2_fcflags = @abi_libxml2_fcflags@ +abi_libxml2_init = @abi_libxml2_init@ +abi_libxml2_ldflags = @abi_libxml2_ldflags@ +abi_libxml2_libs = @abi_libxml2_libs@ +abi_libxml2_ok = @abi_libxml2_ok@ +abi_libxml2_prefix = @abi_libxml2_prefix@ +abi_lotf_enable = @abi_lotf_enable@ +abi_lt_version = @abi_lt_version@ +abi_m4_version = @abi_m4_version@ +abi_memory_profiling_enable = @abi_memory_profiling_enable@ +abi_mpi_cflags = @abi_mpi_cflags@ +abi_mpi_cppflags = @abi_mpi_cppflags@ +abi_mpi_cxxflags = @abi_mpi_cxxflags@ +abi_mpi_enable = @abi_mpi_enable@ +abi_mpi_fcflags = @abi_mpi_fcflags@ +abi_mpi_flavor = @abi_mpi_flavor@ +abi_mpi_gpu_aware_enable = @abi_mpi_gpu_aware_enable@ +abi_mpi_incs = @abi_mpi_incs@ +abi_mpi_inplace_enable = @abi_mpi_inplace_enable@ +abi_mpi_interfaces_bugfix_enable = @abi_mpi_interfaces_bugfix_enable@ +abi_mpi_io_default_enable = @abi_mpi_io_default_enable@ +abi_mpi_io_enable = @abi_mpi_io_enable@ +abi_mpi_ldflags = @abi_mpi_ldflags@ +abi_mpi_level = @abi_mpi_level@ +abi_mpi_libs = @abi_mpi_libs@ +abi_netcdf_default_enable = @abi_netcdf_default_enable@ +abi_openmp_enable = @abi_openmp_enable@ +abi_openmp_offload_enable = @abi_openmp_offload_enable@ +abi_optim_flavor = @abi_optim_flavor@ +abi_python_invocation_enable = @abi_python_invocation_enable@ +abi_source_debug_enable = @abi_source_debug_enable@ +abi_stdin_enable = @abi_stdin_enable@ +abi_sys_spec = @abi_sys_spec@ +abi_timer_enable = @abi_timer_enable@ +abi_triqs_v1_4_enable = @abi_triqs_v1_4_enable@ +abi_triqs_v2_0_enable = @abi_triqs_v2_0_enable@ +abi_zdot_bugfix_enable = @abi_zdot_bugfix_enable@ +abinit_bindir = @abinit_bindir@ +abinit_builddir = @abinit_builddir@ +abinit_chkdir = @abinit_chkdir@ +abinit_datdir = @abinit_datdir@ +abinit_docdir = @abinit_docdir@ +abinit_incdir = @abinit_incdir@ +abinit_libdir = @abinit_libdir@ +abinit_mandir = @abinit_mandir@ +abinit_prefix = @abinit_prefix@ +abinit_srcdir = @abinit_srcdir@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_FC = @ac_ct_FC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cc_info_string = @cc_info_string@ +cxx_info_string = @cxx_info_string@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +enable_avx_safe_mode = @enable_avx_safe_mode@ +enable_bse_unpacked = @enable_bse_unpacked@ +enable_cclock = @enable_cclock@ +enable_crpa_optim = @enable_crpa_optim@ +enable_exports = @enable_exports@ +enable_fc_wrapper = @enable_fc_wrapper@ +enable_gw_dpc = @enable_gw_dpc@ +enable_hints = @enable_hints@ +enable_libtetra = @enable_libtetra@ +enable_lotf = @enable_lotf@ +enable_memory_profiling = @enable_memory_profiling@ +enable_mpi_gpu_aware = @enable_mpi_gpu_aware@ +enable_mpi_inplace = @enable_mpi_inplace@ +enable_mpi_interfaces_bugfix = @enable_mpi_interfaces_bugfix@ +enable_mpi_io = @enable_mpi_io@ +enable_mpi_io_default = @enable_mpi_io_default@ +enable_netcdf_default = @enable_netcdf_default@ +enable_openmp = @enable_openmp@ +enable_openmp_offload = @enable_openmp_offload@ +enable_python_invocation = @enable_python_invocation@ +enable_shared = @enable_shared@ +enable_source_debug = @enable_source_debug@ +enable_static = @enable_static@ +enable_stdin = @enable_stdin@ +enable_timer = @enable_timer@ +enable_triqs_v1_4 = @enable_triqs_v1_4@ +enable_triqs_v2_0 = @enable_triqs_v2_0@ +enable_zdot_bugfix = @enable_zdot_bugfix@ +exec_prefix = @exec_prefix@ +fc_info_string = @fc_info_string@ +fc_mod_fcflags = @fc_mod_fcflags@ +fc_timing = @fc_timing@ +fcflags_opt_02_clib = @fcflags_opt_02_clib@ +fcflags_opt_10_defs = @fcflags_opt_10_defs@ +fcflags_opt_11_memory_mpi = @fcflags_opt_11_memory_mpi@ +fcflags_opt_12_hide_mpi = @fcflags_opt_12_hide_mpi@ +fcflags_opt_14_hidewrite = @fcflags_opt_14_hidewrite@ +fcflags_opt_16_hideleave = @fcflags_opt_16_hideleave@ +fcflags_opt_16_kokkos_toolbox = @fcflags_opt_16_kokkos_toolbox@ +fcflags_opt_17_gpu_toolbox = @fcflags_opt_17_gpu_toolbox@ +fcflags_opt_17_libtetra_ext = @fcflags_opt_17_libtetra_ext@ +fcflags_opt_17_minimax = @fcflags_opt_17_minimax@ +fcflags_opt_17_yaml_out = @fcflags_opt_17_yaml_out@ +fcflags_opt_18_timing = @fcflags_opt_18_timing@ +fcflags_opt_21_hashfuncs = @fcflags_opt_21_hashfuncs@ +fcflags_opt_27_toolbox_oop = @fcflags_opt_27_toolbox_oop@ +fcflags_opt_28_numeric_noabirule = @fcflags_opt_28_numeric_noabirule@ +fcflags_opt_29_kpoints = @fcflags_opt_29_kpoints@ +fcflags_opt_32_util = @fcflags_opt_32_util@ +fcflags_opt_33_xc_lowlevel = @fcflags_opt_33_xc_lowlevel@ +fcflags_opt_39_libpaw = @fcflags_opt_39_libpaw@ +fcflags_opt_41_geometry = @fcflags_opt_41_geometry@ +fcflags_opt_42_nlstrain = @fcflags_opt_42_nlstrain@ +fcflags_opt_42_parser = @fcflags_opt_42_parser@ +fcflags_opt_43_ptgroups = @fcflags_opt_43_ptgroups@ +fcflags_opt_43_wvl_wrappers = @fcflags_opt_43_wvl_wrappers@ +fcflags_opt_44_abitools = @fcflags_opt_44_abitools@ +fcflags_opt_44_abitypes_defs = @fcflags_opt_44_abitypes_defs@ +fcflags_opt_44_manage_kokkos = @fcflags_opt_44_manage_kokkos@ +fcflags_opt_45_geomoptim = @fcflags_opt_45_geomoptim@ +fcflags_opt_45_xgTools = @fcflags_opt_45_xgTools@ +fcflags_opt_46_ghc_omp = @fcflags_opt_46_ghc_omp@ +fcflags_opt_46_manage_cuda = @fcflags_opt_46_manage_cuda@ +fcflags_opt_48_diago = @fcflags_opt_48_diago@ +fcflags_opt_49_gw_toolbox_oop = @fcflags_opt_49_gw_toolbox_oop@ +fcflags_opt_51_manage_mpi = @fcflags_opt_51_manage_mpi@ +fcflags_opt_52_fft_mpi_noabirule = @fcflags_opt_52_fft_mpi_noabirule@ +fcflags_opt_53_ffts = @fcflags_opt_53_ffts@ +fcflags_opt_54_spacepar = @fcflags_opt_54_spacepar@ +fcflags_opt_55_abiutil = @fcflags_opt_55_abiutil@ +fcflags_opt_56_io_mpi = @fcflags_opt_56_io_mpi@ +fcflags_opt_56_mixing = @fcflags_opt_56_mixing@ +fcflags_opt_56_recipspace = @fcflags_opt_56_recipspace@ +fcflags_opt_56_xc = @fcflags_opt_56_xc@ +fcflags_opt_57_iopsp_parser = @fcflags_opt_57_iopsp_parser@ +fcflags_opt_57_iovars = @fcflags_opt_57_iovars@ +fcflags_opt_61_occeig = @fcflags_opt_61_occeig@ +fcflags_opt_62_cg_noabirule = @fcflags_opt_62_cg_noabirule@ +fcflags_opt_62_ctqmc = @fcflags_opt_62_ctqmc@ +fcflags_opt_62_iowfdenpot = @fcflags_opt_62_iowfdenpot@ +fcflags_opt_62_poisson = @fcflags_opt_62_poisson@ +fcflags_opt_62_wvl_wfs = @fcflags_opt_62_wvl_wfs@ +fcflags_opt_64_psp = @fcflags_opt_64_psp@ +fcflags_opt_65_lotf_base = @fcflags_opt_65_lotf_base@ +fcflags_opt_65_paw = @fcflags_opt_65_paw@ +fcflags_opt_66_nonlocal = @fcflags_opt_66_nonlocal@ +fcflags_opt_66_vdwxc = @fcflags_opt_66_vdwxc@ +fcflags_opt_66_wfs = @fcflags_opt_66_wfs@ +fcflags_opt_67_common = @fcflags_opt_67_common@ +fcflags_opt_67_python_invocation_ext = @fcflags_opt_67_python_invocation_ext@ +fcflags_opt_67_triqs_ext = @fcflags_opt_67_triqs_ext@ +fcflags_opt_68_dmft = @fcflags_opt_68_dmft@ +fcflags_opt_68_lotf = @fcflags_opt_68_lotf@ +fcflags_opt_68_recursion = @fcflags_opt_68_recursion@ +fcflags_opt_68_rsprc = @fcflags_opt_68_rsprc@ +fcflags_opt_69_wfdesc = @fcflags_opt_69_wfdesc@ +fcflags_opt_70_gw = @fcflags_opt_70_gw@ +fcflags_opt_71_bse = @fcflags_opt_71_bse@ +fcflags_opt_71_wannier = @fcflags_opt_71_wannier@ +fcflags_opt_72_response = @fcflags_opt_72_response@ +fcflags_opt_77_ddb = @fcflags_opt_77_ddb@ +fcflags_opt_77_suscep = @fcflags_opt_77_suscep@ +fcflags_opt_78_effpot = @fcflags_opt_78_effpot@ +fcflags_opt_78_eph = @fcflags_opt_78_eph@ +fcflags_opt_79_seqpar_mpi = @fcflags_opt_79_seqpar_mpi@ +fcflags_opt_80_rttddft = @fcflags_opt_80_rttddft@ +fcflags_opt_80_tdep = @fcflags_opt_80_tdep@ +fcflags_opt_94_scfcv = @fcflags_opt_94_scfcv@ +fcflags_opt_95_drive = @fcflags_opt_95_drive@ +fcflags_opt_98_main = @fcflags_opt_98_main@ +fcflags_opt_bigdft = @fcflags_opt_bigdft@ +fcflags_opt_default = @fcflags_opt_default@ +fcflags_opt_hdf5 = @fcflags_opt_hdf5@ +fcflags_opt_levmar = @fcflags_opt_levmar@ +fcflags_opt_libpsml = @fcflags_opt_libpsml@ +fcflags_opt_libxc = @fcflags_opt_libxc@ +fcflags_opt_libxml2 = @fcflags_opt_libxml2@ +fcflags_opt_linalg = @fcflags_opt_linalg@ +fcflags_opt_netcdf = @fcflags_opt_netcdf@ +fcflags_opt_netcdf_fortran = @fcflags_opt_netcdf_fortran@ +fcflags_opt_papi = @fcflags_opt_papi@ +fcflags_opt_triqs = @fcflags_opt_triqs@ +fcflags_opt_wannier90 = @fcflags_opt_wannier90@ +fcflags_opt_xmlf90 = @fcflags_opt_xmlf90@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sd_abinit_common_cppflags = @sd_abinit_common_cppflags@ +sd_abinit_common_enable = @sd_abinit_common_enable@ +sd_abinit_common_enable_def = @sd_abinit_common_enable_def@ +sd_abinit_common_fcflags = @sd_abinit_common_fcflags@ +sd_abinit_common_init = @sd_abinit_common_init@ +sd_abinit_common_ldflags = @sd_abinit_common_ldflags@ +sd_abinit_common_libs = @sd_abinit_common_libs@ +sd_abinit_common_ok = @sd_abinit_common_ok@ +sd_abinit_common_options = @sd_abinit_common_options@ +sd_abinit_common_policy = @sd_abinit_common_policy@ +sd_abinit_common_status = @sd_abinit_common_status@ +sd_bigdft_cppflags = @sd_bigdft_cppflags@ +sd_bigdft_enable = @sd_bigdft_enable@ +sd_bigdft_enable_def = @sd_bigdft_enable_def@ +sd_bigdft_fcflags = @sd_bigdft_fcflags@ +sd_bigdft_init = @sd_bigdft_init@ +sd_bigdft_ldflags = @sd_bigdft_ldflags@ +sd_bigdft_libs = @sd_bigdft_libs@ +sd_bigdft_ok = @sd_bigdft_ok@ +sd_bigdft_options = @sd_bigdft_options@ +sd_bigdft_policy = @sd_bigdft_policy@ +sd_bigdft_status = @sd_bigdft_status@ +sd_fft_cflags = @sd_fft_cflags@ +sd_fft_choices = @sd_fft_choices@ +sd_fft_cppflags = @sd_fft_cppflags@ +sd_fft_cxxflags = @sd_fft_cxxflags@ +sd_fft_enable = @sd_fft_enable@ +sd_fft_fcflags = @sd_fft_fcflags@ +sd_fft_flavor = @sd_fft_flavor@ +sd_fft_init = @sd_fft_init@ +sd_fft_ldflags = @sd_fft_ldflags@ +sd_fft_libs = @sd_fft_libs@ +sd_fft_ok = @sd_fft_ok@ +sd_fftw3_cflags = @sd_fftw3_cflags@ +sd_fftw3_cppflags = @sd_fftw3_cppflags@ +sd_fftw3_enable = @sd_fftw3_enable@ +sd_fftw3_enable_def = @sd_fftw3_enable_def@ +sd_fftw3_fcflags = @sd_fftw3_fcflags@ +sd_fftw3_init = @sd_fftw3_init@ +sd_fftw3_ldflags = @sd_fftw3_ldflags@ +sd_fftw3_libs = @sd_fftw3_libs@ +sd_fftw3_ok = @sd_fftw3_ok@ +sd_fftw3_options = @sd_fftw3_options@ +sd_fftw3_policy = @sd_fftw3_policy@ +sd_fftw3_status = @sd_fftw3_status@ +sd_gpu_cflags = @sd_gpu_cflags@ +sd_gpu_cppflags = @sd_gpu_cppflags@ +sd_gpu_cxxflags = @sd_gpu_cxxflags@ +sd_gpu_enable = @sd_gpu_enable@ +sd_gpu_enable_def = @sd_gpu_enable_def@ +sd_gpu_fcflags = @sd_gpu_fcflags@ +sd_gpu_init = @sd_gpu_init@ +sd_gpu_ldflags = @sd_gpu_ldflags@ +sd_gpu_libs = @sd_gpu_libs@ +sd_gpu_ok = @sd_gpu_ok@ +sd_gpu_options = @sd_gpu_options@ +sd_gpu_policy = @sd_gpu_policy@ +sd_gpu_prefix = @sd_gpu_prefix@ +sd_gpu_status = @sd_gpu_status@ +sd_hdf5_cflags = @sd_hdf5_cflags@ +sd_hdf5_cppflags = @sd_hdf5_cppflags@ +sd_hdf5_cxxflags = @sd_hdf5_cxxflags@ +sd_hdf5_enable = @sd_hdf5_enable@ +sd_hdf5_enable_def = @sd_hdf5_enable_def@ +sd_hdf5_enable_fc = @sd_hdf5_enable_fc@ +sd_hdf5_fcflags = @sd_hdf5_fcflags@ +sd_hdf5_h5cc = @sd_hdf5_h5cc@ +sd_hdf5_h5fc = @sd_hdf5_h5fc@ +sd_hdf5_init = @sd_hdf5_init@ +sd_hdf5_ldflags = @sd_hdf5_ldflags@ +sd_hdf5_libs = @sd_hdf5_libs@ +sd_hdf5_ok = @sd_hdf5_ok@ +sd_hdf5_options = @sd_hdf5_options@ +sd_hdf5_policy = @sd_hdf5_policy@ +sd_hdf5_status = @sd_hdf5_status@ +sd_kokkos_cppflags = @sd_kokkos_cppflags@ +sd_kokkos_cxxflags = @sd_kokkos_cxxflags@ +sd_kokkos_enable = @sd_kokkos_enable@ +sd_kokkos_enable_def = @sd_kokkos_enable_def@ +sd_kokkos_init = @sd_kokkos_init@ +sd_kokkos_ldflags = @sd_kokkos_ldflags@ +sd_kokkos_libs = @sd_kokkos_libs@ +sd_kokkos_ok = @sd_kokkos_ok@ +sd_kokkos_options = @sd_kokkos_options@ +sd_kokkos_policy = @sd_kokkos_policy@ +sd_kokkos_status = @sd_kokkos_status@ +sd_levmar_cflags = @sd_levmar_cflags@ +sd_levmar_cppflags = @sd_levmar_cppflags@ +sd_levmar_enable = @sd_levmar_enable@ +sd_levmar_enable_def = @sd_levmar_enable_def@ +sd_levmar_init = @sd_levmar_init@ +sd_levmar_ldflags = @sd_levmar_ldflags@ +sd_levmar_libs = @sd_levmar_libs@ +sd_levmar_ok = @sd_levmar_ok@ +sd_levmar_options = @sd_levmar_options@ +sd_levmar_policy = @sd_levmar_policy@ +sd_levmar_status = @sd_levmar_status@ +sd_libpaw_cppflags = @sd_libpaw_cppflags@ +sd_libpaw_enable = @sd_libpaw_enable@ +sd_libpaw_enable_def = @sd_libpaw_enable_def@ +sd_libpaw_fcflags = @sd_libpaw_fcflags@ +sd_libpaw_init = @sd_libpaw_init@ +sd_libpaw_ldflags = @sd_libpaw_ldflags@ +sd_libpaw_libs = @sd_libpaw_libs@ +sd_libpaw_ok = @sd_libpaw_ok@ +sd_libpaw_options = @sd_libpaw_options@ +sd_libpaw_policy = @sd_libpaw_policy@ +sd_libpaw_status = @sd_libpaw_status@ +sd_libpsml_cppflags = @sd_libpsml_cppflags@ +sd_libpsml_enable = @sd_libpsml_enable@ +sd_libpsml_enable_def = @sd_libpsml_enable_def@ +sd_libpsml_fcflags = @sd_libpsml_fcflags@ +sd_libpsml_init = @sd_libpsml_init@ +sd_libpsml_ldflags = @sd_libpsml_ldflags@ +sd_libpsml_libs = @sd_libpsml_libs@ +sd_libpsml_ok = @sd_libpsml_ok@ +sd_libpsml_options = @sd_libpsml_options@ +sd_libpsml_policy = @sd_libpsml_policy@ +sd_libpsml_status = @sd_libpsml_status@ +sd_libxc_cflags = @sd_libxc_cflags@ +sd_libxc_cppflags = @sd_libxc_cppflags@ +sd_libxc_enable = @sd_libxc_enable@ +sd_libxc_enable_def = @sd_libxc_enable_def@ +sd_libxc_enable_fc = @sd_libxc_enable_fc@ +sd_libxc_fcflags = @sd_libxc_fcflags@ +sd_libxc_init = @sd_libxc_init@ +sd_libxc_ldflags = @sd_libxc_ldflags@ +sd_libxc_libs = @sd_libxc_libs@ +sd_libxc_ok = @sd_libxc_ok@ +sd_libxc_options = @sd_libxc_options@ +sd_libxc_policy = @sd_libxc_policy@ +sd_libxc_status = @sd_libxc_status@ +sd_linalg_cflags = @sd_linalg_cflags@ +sd_linalg_choices = @sd_linalg_choices@ +sd_linalg_cppflags = @sd_linalg_cppflags@ +sd_linalg_cxxflags = @sd_linalg_cxxflags@ +sd_linalg_enable = @sd_linalg_enable@ +sd_linalg_fcflags = @sd_linalg_fcflags@ +sd_linalg_flavor = @sd_linalg_flavor@ +sd_linalg_has_elpa = @sd_linalg_has_elpa@ +sd_linalg_has_scalapack = @sd_linalg_has_scalapack@ +sd_linalg_init = @sd_linalg_init@ +sd_linalg_ldflags = @sd_linalg_ldflags@ +sd_linalg_libs = @sd_linalg_libs@ +sd_linalg_ok = @sd_linalg_ok@ +sd_mpi_cc = @sd_mpi_cc@ +sd_mpi_cflags = @sd_mpi_cflags@ +sd_mpi_cppflags = @sd_mpi_cppflags@ +sd_mpi_cxx = @sd_mpi_cxx@ +sd_mpi_enable = @sd_mpi_enable@ +sd_mpi_enable_cxx = @sd_mpi_enable_cxx@ +sd_mpi_enable_def = @sd_mpi_enable_def@ +sd_mpi_enable_fc = @sd_mpi_enable_fc@ +sd_mpi_fc = @sd_mpi_fc@ +sd_mpi_fcflags = @sd_mpi_fcflags@ +sd_mpi_init = @sd_mpi_init@ +sd_mpi_ldflags = @sd_mpi_ldflags@ +sd_mpi_libs = @sd_mpi_libs@ +sd_mpi_ok = @sd_mpi_ok@ +sd_mpi_options = @sd_mpi_options@ +sd_mpi_policy = @sd_mpi_policy@ +sd_mpi_status = @sd_mpi_status@ +sd_netcdf_cflags = @sd_netcdf_cflags@ +sd_netcdf_cppflags = @sd_netcdf_cppflags@ +sd_netcdf_enable = @sd_netcdf_enable@ +sd_netcdf_enable_def = @sd_netcdf_enable_def@ +sd_netcdf_fcflags = @sd_netcdf_fcflags@ +sd_netcdf_fortran_cflags = @sd_netcdf_fortran_cflags@ +sd_netcdf_fortran_cppflags = @sd_netcdf_fortran_cppflags@ +sd_netcdf_fortran_enable = @sd_netcdf_fortran_enable@ +sd_netcdf_fortran_enable_def = @sd_netcdf_fortran_enable_def@ +sd_netcdf_fortran_fcflags = @sd_netcdf_fortran_fcflags@ +sd_netcdf_fortran_init = @sd_netcdf_fortran_init@ +sd_netcdf_fortran_ldflags = @sd_netcdf_fortran_ldflags@ +sd_netcdf_fortran_libs = @sd_netcdf_fortran_libs@ +sd_netcdf_fortran_ok = @sd_netcdf_fortran_ok@ +sd_netcdf_fortran_options = @sd_netcdf_fortran_options@ +sd_netcdf_fortran_policy = @sd_netcdf_fortran_policy@ +sd_netcdf_fortran_status = @sd_netcdf_fortran_status@ +sd_netcdf_init = @sd_netcdf_init@ +sd_netcdf_ldflags = @sd_netcdf_ldflags@ +sd_netcdf_libs = @sd_netcdf_libs@ +sd_netcdf_ok = @sd_netcdf_ok@ +sd_netcdf_options = @sd_netcdf_options@ +sd_netcdf_policy = @sd_netcdf_policy@ +sd_netcdf_status = @sd_netcdf_status@ +sd_papi_cflags = @sd_papi_cflags@ +sd_papi_cppflags = @sd_papi_cppflags@ +sd_papi_enable = @sd_papi_enable@ +sd_papi_enable_def = @sd_papi_enable_def@ +sd_papi_init = @sd_papi_init@ +sd_papi_ldflags = @sd_papi_ldflags@ +sd_papi_libs = @sd_papi_libs@ +sd_papi_ok = @sd_papi_ok@ +sd_papi_options = @sd_papi_options@ +sd_papi_policy = @sd_papi_policy@ +sd_papi_sd_papi_fcflags = @sd_papi_sd_papi_fcflags@ +sd_papi_status = @sd_papi_status@ +sd_pfft_cflags = @sd_pfft_cflags@ +sd_pfft_cppflags = @sd_pfft_cppflags@ +sd_pfft_enable = @sd_pfft_enable@ +sd_pfft_enable_def = @sd_pfft_enable_def@ +sd_pfft_init = @sd_pfft_init@ +sd_pfft_ldflags = @sd_pfft_ldflags@ +sd_pfft_libs = @sd_pfft_libs@ +sd_pfft_ok = @sd_pfft_ok@ +sd_pfft_options = @sd_pfft_options@ +sd_pfft_policy = @sd_pfft_policy@ +sd_pfft_status = @sd_pfft_status@ +sd_sys_fcflags = @sd_sys_fcflags@ +sd_triqs_cflags = @sd_triqs_cflags@ +sd_triqs_cppflags = @sd_triqs_cppflags@ +sd_triqs_cxxflags = @sd_triqs_cxxflags@ +sd_triqs_enable = @sd_triqs_enable@ +sd_triqs_enable_def = @sd_triqs_enable_def@ +sd_triqs_fcflags = @sd_triqs_fcflags@ +sd_triqs_init = @sd_triqs_init@ +sd_triqs_ldflags = @sd_triqs_ldflags@ +sd_triqs_libs = @sd_triqs_libs@ +sd_triqs_ok = @sd_triqs_ok@ +sd_triqs_options = @sd_triqs_options@ +sd_triqs_policy = @sd_triqs_policy@ +sd_triqs_status = @sd_triqs_status@ +sd_wannier90_cppflags = @sd_wannier90_cppflags@ +sd_wannier90_enable = @sd_wannier90_enable@ +sd_wannier90_enable_def = @sd_wannier90_enable_def@ +sd_wannier90_fcflags = @sd_wannier90_fcflags@ +sd_wannier90_init = @sd_wannier90_init@ +sd_wannier90_ldflags = @sd_wannier90_ldflags@ +sd_wannier90_libs = @sd_wannier90_libs@ +sd_wannier90_ok = @sd_wannier90_ok@ +sd_wannier90_options = @sd_wannier90_options@ +sd_wannier90_policy = @sd_wannier90_policy@ +sd_wannier90_status = @sd_wannier90_status@ +sd_xmlf90_cppflags = @sd_xmlf90_cppflags@ +sd_xmlf90_enable = @sd_xmlf90_enable@ +sd_xmlf90_enable_def = @sd_xmlf90_enable_def@ +sd_xmlf90_fcflags = @sd_xmlf90_fcflags@ +sd_xmlf90_init = @sd_xmlf90_init@ +sd_xmlf90_ldflags = @sd_xmlf90_ldflags@ +sd_xmlf90_libs = @sd_xmlf90_libs@ +sd_xmlf90_ok = @sd_xmlf90_ok@ +sd_xmlf90_options = @sd_xmlf90_options@ +sd_xmlf90_policy = @sd_xmlf90_policy@ +sd_xmlf90_status = @sd_xmlf90_status@ +sd_yakl_cppflags = @sd_yakl_cppflags@ +sd_yakl_enable = @sd_yakl_enable@ +sd_yakl_enable_def = @sd_yakl_enable_def@ +sd_yakl_fcflags = @sd_yakl_fcflags@ +sd_yakl_init = @sd_yakl_init@ +sd_yakl_ldflags = @sd_yakl_ldflags@ +sd_yakl_libs = @sd_yakl_libs@ +sd_yakl_ok = @sd_yakl_ok@ +sd_yakl_options = @sd_yakl_options@ +sd_yakl_policy = @sd_yakl_policy@ +sd_yakl_status = @sd_yakl_status@ +sharedstatedir = @sharedstatedir@ +src_02_clib_fcflags = @src_02_clib_fcflags@ +src_10_defs_fcflags = @src_10_defs_fcflags@ +src_11_memory_mpi_fcflags = @src_11_memory_mpi_fcflags@ +src_12_hide_mpi_fcflags = @src_12_hide_mpi_fcflags@ +src_14_hidewrite_fcflags = @src_14_hidewrite_fcflags@ +src_16_hideleave_fcflags = @src_16_hideleave_fcflags@ +src_16_kokkos_toolbox_fcflags = @src_16_kokkos_toolbox_fcflags@ +src_17_gpu_toolbox_fcflags = @src_17_gpu_toolbox_fcflags@ +src_17_libtetra_ext_fcflags = @src_17_libtetra_ext_fcflags@ +src_17_minimax_fcflags = @src_17_minimax_fcflags@ +src_17_yaml_out_fcflags = @src_17_yaml_out_fcflags@ +src_18_timing_fcflags = @src_18_timing_fcflags@ +src_21_hashfuncs_fcflags = @src_21_hashfuncs_fcflags@ +src_27_toolbox_oop_fcflags = @src_27_toolbox_oop_fcflags@ +src_28_numeric_noabirule_fcflags = @src_28_numeric_noabirule_fcflags@ +src_29_kpoints_fcflags = @src_29_kpoints_fcflags@ +src_32_util_fcflags = @src_32_util_fcflags@ +src_33_xc_lowlevel_fcflags = @src_33_xc_lowlevel_fcflags@ +src_39_libpaw_fcflags = @src_39_libpaw_fcflags@ +src_41_geometry_fcflags = @src_41_geometry_fcflags@ +src_42_nlstrain_fcflags = @src_42_nlstrain_fcflags@ +src_42_parser_fcflags = @src_42_parser_fcflags@ +src_43_ptgroups_fcflags = @src_43_ptgroups_fcflags@ +src_43_wvl_wrappers_fcflags = @src_43_wvl_wrappers_fcflags@ +src_44_abitools_fcflags = @src_44_abitools_fcflags@ +src_44_abitypes_defs_fcflags = @src_44_abitypes_defs_fcflags@ +src_44_manage_kokkos_fcflags = @src_44_manage_kokkos_fcflags@ +src_45_geomoptim_fcflags = @src_45_geomoptim_fcflags@ +src_45_xgTools_fcflags = @src_45_xgTools_fcflags@ +src_46_ghc_omp_fcflags = @src_46_ghc_omp_fcflags@ +src_46_manage_cuda_fcflags = @src_46_manage_cuda_fcflags@ +src_48_diago_fcflags = @src_48_diago_fcflags@ +src_49_gw_toolbox_oop_fcflags = @src_49_gw_toolbox_oop_fcflags@ +src_51_manage_mpi_fcflags = @src_51_manage_mpi_fcflags@ +src_52_fft_mpi_noabirule_fcflags = @src_52_fft_mpi_noabirule_fcflags@ +src_53_ffts_fcflags = @src_53_ffts_fcflags@ +src_54_spacepar_fcflags = @src_54_spacepar_fcflags@ +src_55_abiutil_fcflags = @src_55_abiutil_fcflags@ +src_56_io_mpi_fcflags = @src_56_io_mpi_fcflags@ +src_56_mixing_fcflags = @src_56_mixing_fcflags@ +src_56_recipspace_fcflags = @src_56_recipspace_fcflags@ +src_56_xc_fcflags = @src_56_xc_fcflags@ +src_57_iopsp_parser_fcflags = @src_57_iopsp_parser_fcflags@ +src_57_iovars_fcflags = @src_57_iovars_fcflags@ +src_61_occeig_fcflags = @src_61_occeig_fcflags@ +src_62_cg_noabirule_fcflags = @src_62_cg_noabirule_fcflags@ +src_62_ctqmc_fcflags = @src_62_ctqmc_fcflags@ +src_62_iowfdenpot_fcflags = @src_62_iowfdenpot_fcflags@ +src_62_poisson_fcflags = @src_62_poisson_fcflags@ +src_62_wvl_wfs_fcflags = @src_62_wvl_wfs_fcflags@ +src_64_psp_fcflags = @src_64_psp_fcflags@ +src_65_lotf_base_fcflags = @src_65_lotf_base_fcflags@ +src_65_paw_fcflags = @src_65_paw_fcflags@ +src_66_nonlocal_fcflags = @src_66_nonlocal_fcflags@ +src_66_vdwxc_fcflags = @src_66_vdwxc_fcflags@ +src_66_wfs_fcflags = @src_66_wfs_fcflags@ +src_67_common_fcflags = @src_67_common_fcflags@ +src_67_python_invocation_ext_fcflags = @src_67_python_invocation_ext_fcflags@ +src_67_triqs_ext_fcflags = @src_67_triqs_ext_fcflags@ +src_68_dmft_fcflags = @src_68_dmft_fcflags@ +src_68_lotf_fcflags = @src_68_lotf_fcflags@ +src_68_recursion_fcflags = @src_68_recursion_fcflags@ +src_68_rsprc_fcflags = @src_68_rsprc_fcflags@ +src_69_wfdesc_fcflags = @src_69_wfdesc_fcflags@ +src_70_gw_fcflags = @src_70_gw_fcflags@ +src_71_bse_fcflags = @src_71_bse_fcflags@ +src_71_wannier_fcflags = @src_71_wannier_fcflags@ +src_72_response_fcflags = @src_72_response_fcflags@ +src_77_ddb_fcflags = @src_77_ddb_fcflags@ +src_77_suscep_fcflags = @src_77_suscep_fcflags@ +src_78_effpot_fcflags = @src_78_effpot_fcflags@ +src_78_eph_fcflags = @src_78_eph_fcflags@ +src_79_seqpar_mpi_fcflags = @src_79_seqpar_mpi_fcflags@ +src_80_rttddft_fcflags = @src_80_rttddft_fcflags@ +src_80_tdep_fcflags = @src_80_tdep_fcflags@ +src_94_scfcv_fcflags = @src_94_scfcv_fcflags@ +src_95_drive_fcflags = @src_95_drive_fcflags@ +src_common_fcflags = @src_common_fcflags@ +src_core_fcflags = @src_core_fcflags@ +src_libpaw_fcflags = @src_libpaw_fcflags@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +with_abinit_common = @with_abinit_common@ +with_bigdft = @with_bigdft@ +with_config_file = @with_config_file@ +with_debug_flavor = @with_debug_flavor@ +with_fallbacks = @with_fallbacks@ +with_fc_vendor = @with_fc_vendor@ +with_fc_version = @with_fc_version@ +with_fft_flavor = @with_fft_flavor@ +with_fftw3 = @with_fftw3@ +with_gnu_ld = @with_gnu_ld@ +with_gpu = @with_gpu@ +with_hdf5 = @with_hdf5@ +with_kokkos = @with_kokkos@ +with_levmar = @with_levmar@ +with_libpaw = @with_libpaw@ +with_libpsml = @with_libpsml@ +with_libxc = @with_libxc@ +with_libxml2 = @with_libxml2@ +with_linalg_flavor = @with_linalg_flavor@ +with_mpi = @with_mpi@ +with_mpi_level = @with_mpi_level@ +with_netcdf = @with_netcdf@ +with_optim_flavor = @with_optim_flavor@ +with_papi = @with_papi@ +with_pfft = @with_pfft@ +with_triqs = @with_triqs@ +with_wannier90 = @with_wannier90@ +with_xmlf90 = @with_xmlf90@ +with_yakl = @with_yakl@ +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu shared/common/src/mods/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu shared/common/src/mods/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +tags TAGS: + +ctags CTAGS: + +cscope cscopelist: + + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile all-local +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-local + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am all-local check check-am clean clean-generic \ + cscopelist-am ctags-am distclean distclean-generic distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-local pdf pdf-am ps ps-am tags-am uninstall \ + uninstall-am + +.PRECIOUS: Makefile + + +all-local: + @echo "There is no buildable file here" + +mostlyclean-local: + rm -f *.$(MODEXT) *.h + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/GX-PAW/common/src/mods/defs_basis.mod b/GX-PAW/common/src/mods/defs_basis.mod new file mode 100644 index 00000000..5e65cc86 Binary files /dev/null and b/GX-PAW/common/src/mods/defs_basis.mod differ diff --git a/GX-PAW/common/src/mods/defs_datatypes.mod b/GX-PAW/common/src/mods/defs_datatypes.mod new file mode 100644 index 00000000..aac0d4a8 Binary files /dev/null and b/GX-PAW/common/src/mods/defs_datatypes.mod differ diff --git a/GX-PAW/common/src/mods/libtetrabz.mod b/GX-PAW/common/src/mods/libtetrabz.mod new file mode 100644 index 00000000..7560a23b Binary files /dev/null and b/GX-PAW/common/src/mods/libtetrabz.mod differ diff --git a/GX-PAW/common/src/mods/libtetrabz_common.mod b/GX-PAW/common/src/mods/libtetrabz_common.mod new file mode 100644 index 00000000..b8854dbf Binary files /dev/null and b/GX-PAW/common/src/mods/libtetrabz_common.mod differ diff --git a/GX-PAW/common/src/mods/libtetrabz_dbldelta_mod.mod b/GX-PAW/common/src/mods/libtetrabz_dbldelta_mod.mod new file mode 100644 index 00000000..16195a0f Binary files /dev/null and b/GX-PAW/common/src/mods/libtetrabz_dbldelta_mod.mod differ diff --git a/GX-PAW/common/src/mods/libtetrabz_dblstep_mod.mod b/GX-PAW/common/src/mods/libtetrabz_dblstep_mod.mod new file mode 100644 index 00000000..1f3838bf Binary files /dev/null and b/GX-PAW/common/src/mods/libtetrabz_dblstep_mod.mod differ diff --git a/GX-PAW/common/src/mods/libtetrabz_dos_mod.mod b/GX-PAW/common/src/mods/libtetrabz_dos_mod.mod new file mode 100644 index 00000000..55cb99f7 Binary files /dev/null and b/GX-PAW/common/src/mods/libtetrabz_dos_mod.mod differ diff --git a/GX-PAW/common/src/mods/libtetrabz_fermigr_mod.mod b/GX-PAW/common/src/mods/libtetrabz_fermigr_mod.mod new file mode 100644 index 00000000..d5ebc992 Binary files /dev/null and b/GX-PAW/common/src/mods/libtetrabz_fermigr_mod.mod differ diff --git a/GX-PAW/common/src/mods/libtetrabz_occ_mod.mod b/GX-PAW/common/src/mods/libtetrabz_occ_mod.mod new file mode 100644 index 00000000..26def37e Binary files /dev/null and b/GX-PAW/common/src/mods/libtetrabz_occ_mod.mod differ diff --git a/GX-PAW/common/src/mods/libtetrabz_polcmplx_mod.mod b/GX-PAW/common/src/mods/libtetrabz_polcmplx_mod.mod new file mode 100644 index 00000000..63edb3a5 Binary files /dev/null and b/GX-PAW/common/src/mods/libtetrabz_polcmplx_mod.mod differ diff --git a/GX-PAW/common/src/mods/libtetrabz_polstat_mod.mod b/GX-PAW/common/src/mods/libtetrabz_polstat_mod.mod new file mode 100644 index 00000000..013c1723 Binary files /dev/null and b/GX-PAW/common/src/mods/libtetrabz_polstat_mod.mod differ diff --git a/GX-PAW/common/src/mods/libxc_functionals.mod b/GX-PAW/common/src/mods/libxc_functionals.mod new file mode 100644 index 00000000..cc1e6ca9 Binary files /dev/null and b/GX-PAW/common/src/mods/libxc_functionals.mod differ diff --git a/GX-PAW/common/src/mods/m_abi_linalg.mod b/GX-PAW/common/src/mods/m_abi_linalg.mod new file mode 100644 index 00000000..ea10e593 Binary files /dev/null and b/GX-PAW/common/src/mods/m_abi_linalg.mod differ diff --git a/GX-PAW/common/src/mods/m_abicore.mod b/GX-PAW/common/src/mods/m_abicore.mod new file mode 100644 index 00000000..68018982 Binary files /dev/null and b/GX-PAW/common/src/mods/m_abicore.mod differ diff --git a/GX-PAW/common/src/mods/m_array.mod b/GX-PAW/common/src/mods/m_array.mod new file mode 100644 index 00000000..ed7971ee Binary files /dev/null and b/GX-PAW/common/src/mods/m_array.mod differ diff --git a/GX-PAW/common/src/mods/m_atomdata.mod b/GX-PAW/common/src/mods/m_atomdata.mod new file mode 100644 index 00000000..7b860cce Binary files /dev/null and b/GX-PAW/common/src/mods/m_atomdata.mod differ diff --git a/GX-PAW/common/src/mods/m_bessel.mod b/GX-PAW/common/src/mods/m_bessel.mod new file mode 100644 index 00000000..571f920a Binary files /dev/null and b/GX-PAW/common/src/mods/m_bessel.mod differ diff --git a/GX-PAW/common/src/mods/m_bspline.mod b/GX-PAW/common/src/mods/m_bspline.mod new file mode 100644 index 00000000..2ea1ef43 Binary files /dev/null and b/GX-PAW/common/src/mods/m_bspline.mod differ diff --git a/GX-PAW/common/src/mods/m_build_info.mod b/GX-PAW/common/src/mods/m_build_info.mod new file mode 100644 index 00000000..418d96df Binary files /dev/null and b/GX-PAW/common/src/mods/m_build_info.mod differ diff --git a/GX-PAW/common/src/mods/m_clib.mod b/GX-PAW/common/src/mods/m_clib.mod new file mode 100644 index 00000000..c3af93fb Binary files /dev/null and b/GX-PAW/common/src/mods/m_clib.mod differ diff --git a/GX-PAW/common/src/mods/m_copy.mod b/GX-PAW/common/src/mods/m_copy.mod new file mode 100644 index 00000000..508b1423 Binary files /dev/null and b/GX-PAW/common/src/mods/m_copy.mod differ diff --git a/GX-PAW/common/src/mods/m_cplxtools.mod b/GX-PAW/common/src/mods/m_cplxtools.mod new file mode 100644 index 00000000..4c6bc0a6 Binary files /dev/null and b/GX-PAW/common/src/mods/m_cplxtools.mod differ diff --git a/GX-PAW/common/src/mods/m_cppopts_dumper.mod b/GX-PAW/common/src/mods/m_cppopts_dumper.mod new file mode 100644 index 00000000..d708cafb Binary files /dev/null and b/GX-PAW/common/src/mods/m_cppopts_dumper.mod differ diff --git a/GX-PAW/common/src/mods/m_drivexc.mod b/GX-PAW/common/src/mods/m_drivexc.mod new file mode 100644 index 00000000..4ec64fd5 Binary files /dev/null and b/GX-PAW/common/src/mods/m_drivexc.mod differ diff --git a/GX-PAW/common/src/mods/m_dummy_tests.mod b/GX-PAW/common/src/mods/m_dummy_tests.mod new file mode 100644 index 00000000..4b16832f Binary files /dev/null and b/GX-PAW/common/src/mods/m_dummy_tests.mod differ diff --git a/GX-PAW/common/src/mods/m_elpa.mod b/GX-PAW/common/src/mods/m_elpa.mod new file mode 100644 index 00000000..f9357be4 Binary files /dev/null and b/GX-PAW/common/src/mods/m_elpa.mod differ diff --git a/GX-PAW/common/src/mods/m_errors.mod b/GX-PAW/common/src/mods/m_errors.mod new file mode 100644 index 00000000..3f3e6d37 Binary files /dev/null and b/GX-PAW/common/src/mods/m_errors.mod differ diff --git a/GX-PAW/common/src/mods/m_exp_mat.mod b/GX-PAW/common/src/mods/m_exp_mat.mod new file mode 100644 index 00000000..95072719 Binary files /dev/null and b/GX-PAW/common/src/mods/m_exp_mat.mod differ diff --git a/GX-PAW/common/src/mods/m_fsockets.mod b/GX-PAW/common/src/mods/m_fsockets.mod new file mode 100644 index 00000000..3f4661e8 Binary files /dev/null and b/GX-PAW/common/src/mods/m_fsockets.mod differ diff --git a/GX-PAW/common/src/mods/m_fstrings.mod b/GX-PAW/common/src/mods/m_fstrings.mod new file mode 100644 index 00000000..ab57e9c0 Binary files /dev/null and b/GX-PAW/common/src/mods/m_fstrings.mod differ diff --git a/GX-PAW/common/src/mods/m_gaussian_quadrature.mod b/GX-PAW/common/src/mods/m_gaussian_quadrature.mod new file mode 100644 index 00000000..e491c59e Binary files /dev/null and b/GX-PAW/common/src/mods/m_gaussian_quadrature.mod differ diff --git a/GX-PAW/common/src/mods/m_hash_md5.mod b/GX-PAW/common/src/mods/m_hash_md5.mod new file mode 100644 index 00000000..9ee03d9e Binary files /dev/null and b/GX-PAW/common/src/mods/m_hash_md5.mod differ diff --git a/GX-PAW/common/src/mods/m_hashtable.mod b/GX-PAW/common/src/mods/m_hashtable.mod new file mode 100644 index 00000000..2d66ed1d Binary files /dev/null and b/GX-PAW/common/src/mods/m_hashtable.mod differ diff --git a/GX-PAW/common/src/mods/m_hide_blas.mod b/GX-PAW/common/src/mods/m_hide_blas.mod new file mode 100644 index 00000000..e0c6066c Binary files /dev/null and b/GX-PAW/common/src/mods/m_hide_blas.mod differ diff --git a/GX-PAW/common/src/mods/m_hide_lapack.mod b/GX-PAW/common/src/mods/m_hide_lapack.mod new file mode 100644 index 00000000..fd1dad56 Binary files /dev/null and b/GX-PAW/common/src/mods/m_hide_lapack.mod differ diff --git a/GX-PAW/common/src/mods/m_htetra.mod b/GX-PAW/common/src/mods/m_htetra.mod new file mode 100644 index 00000000..8c965046 Binary files /dev/null and b/GX-PAW/common/src/mods/m_htetra.mod differ diff --git a/GX-PAW/common/src/mods/m_io_tools.mod b/GX-PAW/common/src/mods/m_io_tools.mod new file mode 100644 index 00000000..5e2d7ba5 Binary files /dev/null and b/GX-PAW/common/src/mods/m_io_tools.mod differ diff --git a/GX-PAW/common/src/mods/m_iterators.mod b/GX-PAW/common/src/mods/m_iterators.mod new file mode 100644 index 00000000..9c064f87 Binary files /dev/null and b/GX-PAW/common/src/mods/m_iterators.mod differ diff --git a/GX-PAW/common/src/mods/m_krank.mod b/GX-PAW/common/src/mods/m_krank.mod new file mode 100644 index 00000000..e493d1cc Binary files /dev/null and b/GX-PAW/common/src/mods/m_krank.mod differ diff --git a/GX-PAW/common/src/mods/m_lebedev.mod b/GX-PAW/common/src/mods/m_lebedev.mod new file mode 100644 index 00000000..38f7e24d Binary files /dev/null and b/GX-PAW/common/src/mods/m_lebedev.mod differ diff --git a/GX-PAW/common/src/mods/m_levenberg_marquardt.mod b/GX-PAW/common/src/mods/m_levenberg_marquardt.mod new file mode 100644 index 00000000..43cd5ceb Binary files /dev/null and b/GX-PAW/common/src/mods/m_levenberg_marquardt.mod differ diff --git a/GX-PAW/common/src/mods/m_lib_four.mod b/GX-PAW/common/src/mods/m_lib_four.mod new file mode 100644 index 00000000..d766d83b Binary files /dev/null and b/GX-PAW/common/src/mods/m_lib_four.mod differ diff --git a/GX-PAW/common/src/mods/m_linalg_interfaces.mod b/GX-PAW/common/src/mods/m_linalg_interfaces.mod new file mode 100644 index 00000000..712f8f69 Binary files /dev/null and b/GX-PAW/common/src/mods/m_linalg_interfaces.mod differ diff --git a/GX-PAW/common/src/mods/m_matrix.mod b/GX-PAW/common/src/mods/m_matrix.mod new file mode 100644 index 00000000..56aeb63b Binary files /dev/null and b/GX-PAW/common/src/mods/m_matrix.mod differ diff --git a/GX-PAW/common/src/mods/m_mpiotk.mod b/GX-PAW/common/src/mods/m_mpiotk.mod new file mode 100644 index 00000000..734748fe Binary files /dev/null and b/GX-PAW/common/src/mods/m_mpiotk.mod differ diff --git a/GX-PAW/common/src/mods/m_nctk.mod b/GX-PAW/common/src/mods/m_nctk.mod new file mode 100644 index 00000000..86206eb1 Binary files /dev/null and b/GX-PAW/common/src/mods/m_nctk.mod differ diff --git a/GX-PAW/common/src/mods/m_numeric_tools.mod b/GX-PAW/common/src/mods/m_numeric_tools.mod new file mode 100644 index 00000000..32a0b023 Binary files /dev/null and b/GX-PAW/common/src/mods/m_numeric_tools.mod differ diff --git a/GX-PAW/common/src/mods/m_octree.mod b/GX-PAW/common/src/mods/m_octree.mod new file mode 100644 index 00000000..5cdbbf61 Binary files /dev/null and b/GX-PAW/common/src/mods/m_octree.mod differ diff --git a/GX-PAW/common/src/mods/m_optim_dumper.mod b/GX-PAW/common/src/mods/m_optim_dumper.mod new file mode 100644 index 00000000..61d47e2f Binary files /dev/null and b/GX-PAW/common/src/mods/m_optim_dumper.mod differ diff --git a/GX-PAW/common/src/mods/m_pair_list.mod b/GX-PAW/common/src/mods/m_pair_list.mod new file mode 100644 index 00000000..c1e3ed43 Binary files /dev/null and b/GX-PAW/common/src/mods/m_pair_list.mod differ diff --git a/GX-PAW/common/src/mods/m_per_cond.mod b/GX-PAW/common/src/mods/m_per_cond.mod new file mode 100644 index 00000000..b7b9df79 Binary files /dev/null and b/GX-PAW/common/src/mods/m_per_cond.mod differ diff --git a/GX-PAW/common/src/mods/m_pptools.mod b/GX-PAW/common/src/mods/m_pptools.mod new file mode 100644 index 00000000..c92c52ec Binary files /dev/null and b/GX-PAW/common/src/mods/m_pptools.mod differ diff --git a/GX-PAW/common/src/mods/m_profiling_abi.mod b/GX-PAW/common/src/mods/m_profiling_abi.mod new file mode 100644 index 00000000..a75b0dd2 Binary files /dev/null and b/GX-PAW/common/src/mods/m_profiling_abi.mod differ diff --git a/GX-PAW/common/src/mods/m_pstat.mod b/GX-PAW/common/src/mods/m_pstat.mod new file mode 100644 index 00000000..2d0c498f Binary files /dev/null and b/GX-PAW/common/src/mods/m_pstat.mod differ diff --git a/GX-PAW/common/src/mods/m_random_xoroshiro128plus.mod b/GX-PAW/common/src/mods/m_random_xoroshiro128plus.mod new file mode 100644 index 00000000..6ffbd301 Binary files /dev/null and b/GX-PAW/common/src/mods/m_random_xoroshiro128plus.mod differ diff --git a/GX-PAW/common/src/mods/m_random_zbq.mod b/GX-PAW/common/src/mods/m_random_zbq.mod new file mode 100644 index 00000000..6b484228 Binary files /dev/null and b/GX-PAW/common/src/mods/m_random_zbq.mod differ diff --git a/GX-PAW/common/src/mods/m_simtet.mod b/GX-PAW/common/src/mods/m_simtet.mod new file mode 100644 index 00000000..4a0a43c3 Binary files /dev/null and b/GX-PAW/common/src/mods/m_simtet.mod differ diff --git a/GX-PAW/common/src/mods/m_slk.mod b/GX-PAW/common/src/mods/m_slk.mod new file mode 100644 index 00000000..39291ad2 Binary files /dev/null and b/GX-PAW/common/src/mods/m_slk.mod differ diff --git a/GX-PAW/common/src/mods/m_sort.mod b/GX-PAW/common/src/mods/m_sort.mod new file mode 100644 index 00000000..bc5d19bd Binary files /dev/null and b/GX-PAW/common/src/mods/m_sort.mod differ diff --git a/GX-PAW/common/src/mods/m_special_funcs.mod b/GX-PAW/common/src/mods/m_special_funcs.mod new file mode 100644 index 00000000..860b9b11 Binary files /dev/null and b/GX-PAW/common/src/mods/m_special_funcs.mod differ diff --git a/GX-PAW/common/src/mods/m_specialmsg.mod b/GX-PAW/common/src/mods/m_specialmsg.mod new file mode 100644 index 00000000..50ead31b Binary files /dev/null and b/GX-PAW/common/src/mods/m_specialmsg.mod differ diff --git a/GX-PAW/common/src/mods/m_splines.mod b/GX-PAW/common/src/mods/m_splines.mod new file mode 100644 index 00000000..71e964af Binary files /dev/null and b/GX-PAW/common/src/mods/m_splines.mod differ diff --git a/GX-PAW/common/src/mods/m_stream_string.mod b/GX-PAW/common/src/mods/m_stream_string.mod new file mode 100644 index 00000000..e7acfa1b Binary files /dev/null and b/GX-PAW/common/src/mods/m_stream_string.mod differ diff --git a/GX-PAW/common/src/mods/m_symkpt.mod b/GX-PAW/common/src/mods/m_symkpt.mod new file mode 100644 index 00000000..95c2e6c6 Binary files /dev/null and b/GX-PAW/common/src/mods/m_symkpt.mod differ diff --git a/GX-PAW/common/src/mods/m_symtk.mod b/GX-PAW/common/src/mods/m_symtk.mod new file mode 100644 index 00000000..955e8403 Binary files /dev/null and b/GX-PAW/common/src/mods/m_symtk.mod differ diff --git a/GX-PAW/common/src/mods/m_tetrahedron.mod b/GX-PAW/common/src/mods/m_tetrahedron.mod new file mode 100644 index 00000000..4ee759fb Binary files /dev/null and b/GX-PAW/common/src/mods/m_tetrahedron.mod differ diff --git a/GX-PAW/common/src/mods/m_time.mod b/GX-PAW/common/src/mods/m_time.mod new file mode 100644 index 00000000..1cba1617 Binary files /dev/null and b/GX-PAW/common/src/mods/m_time.mod differ diff --git a/GX-PAW/common/src/mods/m_type_pair_list.mod b/GX-PAW/common/src/mods/m_type_pair_list.mod new file mode 100644 index 00000000..a5e1c49d Binary files /dev/null and b/GX-PAW/common/src/mods/m_type_pair_list.mod differ diff --git a/GX-PAW/common/src/mods/m_xc_noncoll.mod b/GX-PAW/common/src/mods/m_xc_noncoll.mod new file mode 100644 index 00000000..569e44bb Binary files /dev/null and b/GX-PAW/common/src/mods/m_xc_noncoll.mod differ diff --git a/GX-PAW/common/src/mods/m_xchcth.mod b/GX-PAW/common/src/mods/m_xchcth.mod new file mode 100644 index 00000000..457d1713 Binary files /dev/null and b/GX-PAW/common/src/mods/m_xchcth.mod differ diff --git a/GX-PAW/common/src/mods/m_xciit.mod b/GX-PAW/common/src/mods/m_xciit.mod new file mode 100644 index 00000000..be538bef Binary files /dev/null and b/GX-PAW/common/src/mods/m_xciit.mod differ diff --git a/GX-PAW/common/src/mods/m_xclda.mod b/GX-PAW/common/src/mods/m_xclda.mod new file mode 100644 index 00000000..0a2d3b8a Binary files /dev/null and b/GX-PAW/common/src/mods/m_xclda.mod differ diff --git a/GX-PAW/common/src/mods/m_xcpbe.mod b/GX-PAW/common/src/mods/m_xcpbe.mod new file mode 100644 index 00000000..72bacf38 Binary files /dev/null and b/GX-PAW/common/src/mods/m_xcpbe.mod differ diff --git a/GX-PAW/common/src/mods/m_xcpositron.mod b/GX-PAW/common/src/mods/m_xcpositron.mod new file mode 100644 index 00000000..97fbfa2c Binary files /dev/null and b/GX-PAW/common/src/mods/m_xcpositron.mod differ diff --git a/GX-PAW/common/src/mods/m_xieee.mod b/GX-PAW/common/src/mods/m_xieee.mod new file mode 100644 index 00000000..53b0356b Binary files /dev/null and b/GX-PAW/common/src/mods/m_xieee.mod differ diff --git a/GX-PAW/common/src/mods/m_xmpi.mod b/GX-PAW/common/src/mods/m_xmpi.mod new file mode 100644 index 00000000..3081ca83 Binary files /dev/null and b/GX-PAW/common/src/mods/m_xmpi.mod differ diff --git a/GX-PAW/common/src/mods/m_xomp.mod b/GX-PAW/common/src/mods/m_xomp.mod new file mode 100644 index 00000000..d0897510 Binary files /dev/null and b/GX-PAW/common/src/mods/m_xomp.mod differ diff --git a/GX-PAW/common/src/mods/m_xpapi.mod b/GX-PAW/common/src/mods/m_xpapi.mod new file mode 100644 index 00000000..fbf55dec Binary files /dev/null and b/GX-PAW/common/src/mods/m_xpapi.mod differ diff --git a/GX-PAW/common/src/mods/m_yaml.mod b/GX-PAW/common/src/mods/m_yaml.mod new file mode 100644 index 00000000..15fbbbf9 Binary files /dev/null and b/GX-PAW/common/src/mods/m_yaml.mod differ diff --git a/GX-PAW/common/src/mods/minimax_grids.mod b/GX-PAW/common/src/mods/minimax_grids.mod new file mode 100644 index 00000000..6e92d3b7 Binary files /dev/null and b/GX-PAW/common/src/mods/minimax_grids.mod differ diff --git a/GX-PAW/common/src/mods/minimax_omega.mod b/GX-PAW/common/src/mods/minimax_omega.mod new file mode 100644 index 00000000..b351b917 Binary files /dev/null and b/GX-PAW/common/src/mods/minimax_omega.mod differ diff --git a/GX-PAW/common/src/mods/minimax_tau.mod b/GX-PAW/common/src/mods/minimax_tau.mod new file mode 100644 index 00000000..6b145d50 Binary files /dev/null and b/GX-PAW/common/src/mods/minimax_tau.mod differ diff --git a/GX-PAW/common/src/mods/minimax_utils.mod b/GX-PAW/common/src/mods/minimax_utils.mod new file mode 100644 index 00000000..12441e8a Binary files /dev/null and b/GX-PAW/common/src/mods/minimax_utils.mod differ diff --git a/GX-PAW/libpaw/AUTHORS b/GX-PAW/libpaw/AUTHORS new file mode 100644 index 00000000..7d605ee8 --- /dev/null +++ b/GX-PAW/libpaw/AUTHORS @@ -0,0 +1,15 @@ +Maintainers: + + * Marc Torrent (marc[DOT]torrent[AT]cea[DOT]fr) + + +Contributors: + + * François Jollet (francois[DOT]jollet[AT]cea[DOT]fr) + * ... + + +Build system: + + * Yann Pouillon (yann[DOT]pouillon[AT]materialsevolution[DOT]es) + diff --git a/GX-PAW/libpaw/COPYING b/GX-PAW/libpaw/COPYING new file mode 100644 index 00000000..a612ad98 --- /dev/null +++ b/GX-PAW/libpaw/COPYING @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/GX-PAW/libpaw/ChangeLog b/GX-PAW/libpaw/ChangeLog new file mode 100644 index 00000000..e69de29b diff --git a/GX-PAW/libpaw/INSTALL b/GX-PAW/libpaw/INSTALL new file mode 100644 index 00000000..20998407 --- /dev/null +++ b/GX-PAW/libpaw/INSTALL @@ -0,0 +1,370 @@ +Installation Instructions +************************* + +Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation, +Inc. + + Copying and distribution of this file, with or without modification, +are permitted in any medium without royalty provided the copyright +notice and this notice are preserved. This file is offered as-is, +without warranty of any kind. + +Basic Installation +================== + + Briefly, the shell command `./configure && make && make install' +should configure, build, and install this package. The following +more-detailed instructions are generic; see the `README' file for +instructions specific to this package. Some packages provide this +`INSTALL' file but do not implement all of the features documented +below. The lack of an optional feature in a given package is not +necessarily a bug. More recommendations for GNU packages can be found +in *note Makefile Conventions: (standards)Makefile Conventions. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, and a +file `config.log' containing compiler output (useful mainly for +debugging `configure'). + + It can also use an optional file (typically called `config.cache' +and enabled with `--cache-file=config.cache' or simply `-C') that saves +the results of its tests to speed up reconfiguring. Caching is +disabled by default to prevent problems with accidental use of stale +cache files. + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If you are using the cache, and at +some point `config.cache' contains results you don't want to keep, you +may remove or edit it. + + The file `configure.ac' (or `configure.in') is used to create +`configure' by a program called `autoconf'. You need `configure.ac' if +you want to change it or regenerate `configure' using a newer version +of `autoconf'. + + The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. + + Running `configure' might take a while. While running, it prints + some messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package, generally using the just-built uninstalled binaries. + + 4. Type `make install' to install the programs and any data files and + documentation. When installing into a prefix owned by root, it is + recommended that the package be configured and built as a regular + user, and only the `make install' phase executed with root + privileges. + + 5. Optionally, type `make installcheck' to repeat any self-tests, but + this time using the binaries in their final installed location. + This target does not install anything. Running this target as a + regular user, particularly if the prior `make install' required + root privileges, verifies that the installation completed + correctly. + + 6. You can remove the program binaries and object files from the + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + + 7. Often, you can also type `make uninstall' to remove the installed + files again. In practice, not all packages have tested that + uninstallation works correctly, even though it is required by the + GNU Coding Standards. + + 8. Some packages, particularly those that use Automake, provide `make + distcheck', which can by used by developers to test that all other + targets like `make install' and `make uninstall' work correctly. + This target is generally not run by end users. + +Compilers and Options +===================== + + Some systems require unusual options for compilation or linking that +the `configure' script does not know about. Run `./configure --help' +for details on some of the pertinent environment variables. + + You can give `configure' initial values for configuration parameters +by setting variables in the command line or in the environment. Here +is an example: + + ./configure CC=c99 CFLAGS=-g LIBS=-lposix + + *Note Defining Variables::, for more details. + +Compiling For Multiple Architectures +==================================== + + You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you can use GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. This +is known as a "VPATH" build. + + With a non-GNU `make', it is safer to compile the package for one +architecture at a time in the source code directory. After you have +installed the package for one architecture, use `make distclean' before +reconfiguring for another architecture. + + On MacOS X 10.5 and later systems, you can create libraries and +executables that work on multiple system types--known as "fat" or +"universal" binaries--by specifying multiple `-arch' options to the +compiler but only a single `-arch' option to the preprocessor. Like +this: + + ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ + CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ + CPP="gcc -E" CXXCPP="g++ -E" + + This is not guaranteed to produce working output in all cases, you +may have to build one architecture at a time and combine the results +using the `lipo' tool if you have problems. + +Installation Names +================== + + By default, `make install' installs the package's commands under +`/usr/local/bin', include files under `/usr/local/include', etc. You +can specify an installation prefix other than `/usr/local' by giving +`configure' the option `--prefix=PREFIX', where PREFIX must be an +absolute file name. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +pass the option `--exec-prefix=PREFIX' to `configure', the package uses +PREFIX as the prefix for installing programs and libraries. +Documentation and other data files still use the regular prefix. + + In addition, if you use an unusual directory layout you can give +options like `--bindir=DIR' to specify different values for particular +kinds of files. Run `configure --help' for a list of the directories +you can set and what kinds of files go in them. In general, the +default for these options is expressed in terms of `${prefix}', so that +specifying just `--prefix' will affect all of the other directory +specifications that were not explicitly provided. + + The most portable way to affect installation locations is to pass the +correct locations to `configure'; however, many packages provide one or +both of the following shortcuts of passing variable assignments to the +`make install' command line to change installation locations without +having to reconfigure or recompile. + + The first method involves providing an override variable for each +affected directory. For example, `make install +prefix=/alternate/directory' will choose an alternate location for all +directory configuration variables that were expressed in terms of +`${prefix}'. Any directories that were specified during `configure', +but not in terms of `${prefix}', must each be overridden at install +time for the entire installation to be relocated. The approach of +makefile variable overrides for each directory variable is required by +the GNU Coding Standards, and ideally causes no recompilation. +However, some platforms have known limitations with the semantics of +shared libraries that end up requiring recompilation when using this +method, particularly noticeable in packages that use GNU Libtool. + + The second method involves providing the `DESTDIR' variable. For +example, `make install DESTDIR=/alternate/directory' will prepend +`/alternate/directory' before all installation names. The approach of +`DESTDIR' overrides is not required by the GNU Coding Standards, and +does not work on platforms that have drive letters. On the other hand, +it does better at avoiding recompilation issues, and works well even +when some directory options were not specified in terms of `${prefix}' +at `configure' time. + +Optional Features +================= + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + + Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + + Some packages offer the ability to configure how verbose the +execution of `make' will be. For these packages, running `./configure +--enable-silent-rules' sets the default to minimal output, which can be +overridden with `make V=1'; while running `./configure +--disable-silent-rules' sets the default to verbose, which can be +overridden with `make V=0'. + +Particular systems +================== + + On HP-UX, the default C compiler is not ANSI C compatible. If GNU +CC is not installed, it is recommended to use the following options in +order to use an ANSI C compiler: + + ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" + +and if that doesn't work, install pre-built binaries of GCC for HP-UX. + + HP-UX `make' updates targets which have the same time stamps as +their prerequisites, which makes it generally unusable when shipped +generated files such as `configure' are involved. Use GNU `make' +instead. + + On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot +parse its `' header file. The option `-nodtk' can be used as +a workaround. If GNU CC is not installed, it is therefore recommended +to try + + ./configure CC="cc" + +and if that doesn't work, try + + ./configure CC="cc -nodtk" + + On Solaris, don't put `/usr/ucb' early in your `PATH'. This +directory contains several dysfunctional programs; working variants of +these programs are available in `/usr/bin'. So, if you need `/usr/ucb' +in your `PATH', put it _after_ `/usr/bin'. + + On Haiku, software installed for all users goes in `/boot/common', +not `/usr/local'. It is recommended to use the following options: + + ./configure --prefix=/boot/common + +Specifying the System Type +========================== + + There may be some features `configure' cannot figure out +automatically, but needs to determine by the type of machine the package +will run on. Usually, assuming the package is built to be run on the +_same_ architectures, `configure' can figure that out, but if it prints +a message saying it cannot guess the machine type, give it the +`--build=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name which has the form: + + CPU-COMPANY-SYSTEM + +where SYSTEM can have one of these forms: + + OS + KERNEL-OS + + See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the machine type. + + If you are _building_ compiler tools for cross-compiling, you should +use the option `--target=TYPE' to select the type of system they will +produce code for. + + If you want to _use_ a cross compiler, that generates code for a +platform different from the build platform, you should specify the +"host" platform (i.e., that on which the generated programs will +eventually be run) with `--host=TYPE'. + +Sharing Defaults +================ + + If you want to set default values for `configure' scripts to share, +you can create a site shell script called `config.site' that gives +default values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + +Defining Variables +================== + + Variables not defined in a site shell script can be set in the +environment passed to `configure'. However, some packages may run +configure again during the build, and the customized values of these +variables may be lost. In order to avoid this problem, you should set +them in the `configure' command line, using `VAR=value'. For example: + + ./configure CC=/usr/local2/bin/gcc + +causes the specified `gcc' to be used as the C compiler (unless it is +overridden in the site shell script). + +Unfortunately, this technique does not work for `CONFIG_SHELL' due to +an Autoconf limitation. Until the limitation is lifted, you can use +this workaround: + + CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash + +`configure' Invocation +====================== + + `configure' recognizes the following options to control how it +operates. + +`--help' +`-h' + Print a summary of all of the options to `configure', and exit. + +`--help=short' +`--help=recursive' + Print a summary of the options unique to this package's + `configure', and exit. The `short' variant lists options used + only in the top level, while the `recursive' variant lists options + also present in any nested packages. + +`--version' +`-V' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`--cache-file=FILE' + Enable the cache: use and save the results of the tests in FILE, + traditionally `config.cache'. FILE defaults to `/dev/null' to + disable caching. + +`--config-cache' +`-C' + Alias for `--cache-file=config.cache'. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. To + suppress all normal output, redirect it to `/dev/null' (any error + messages will still be shown). + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`--prefix=DIR' + Use DIR as the installation prefix. *note Installation Names:: + for more details, including other options available for fine-tuning + the installation locations. + +`--no-create' +`-n' + Run the configure checks, but stop before creating any output + files. + +`configure' also accepts some other, not widely useful, options. Run +`configure --help' for more details. diff --git a/GX-PAW/libpaw/Makefile b/GX-PAW/libpaw/Makefile new file mode 100644 index 00000000..50de0578 --- /dev/null +++ b/GX-PAW/libpaw/Makefile @@ -0,0 +1,1533 @@ +# Makefile.in generated by automake 1.16.3 from Makefile.am. +# shared/libpaw/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994-2020 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-inter on 2024/03/16 21:07:39 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-inter script or its config file instead. +# + +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/abinit +pkgincludedir = $(includedir)/abinit +pkglibdir = $(libdir)/abinit +pkglibexecdir = $(libexecdir)/abinit +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = x86_64-apple-darwin18.7.0 +host_triplet = x86_64-apple-darwin18.7.0 +target_triplet = x86_64-apple-darwin18.7.0 +subdir = shared/libpaw +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/m4/arch-gpu.m4 \ + $(top_srcdir)/config/m4/arch-mpi.m4 \ + $(top_srcdir)/config/m4/auto-autotools.m4 \ + $(top_srcdir)/config/m4/auto-corelibs.m4 \ + $(top_srcdir)/config/m4/auto-debug.m4 \ + $(top_srcdir)/config/m4/auto-dirflags.m4 \ + $(top_srcdir)/config/m4/auto-env.m4 \ + $(top_srcdir)/config/m4/auto-hints.m4 \ + $(top_srcdir)/config/m4/auto-optim.m4 \ + $(top_srcdir)/config/m4/auto-options.m4 \ + $(top_srcdir)/config/m4/auto-output.m4 \ + $(top_srcdir)/config/m4/auto-triggers.m4 \ + $(top_srcdir)/config/m4/conf-atompaw.m4 \ + $(top_srcdir)/config/m4/conf-debug.m4 \ + $(top_srcdir)/config/m4/conf-fallbacks.m4 \ + $(top_srcdir)/config/m4/conf-files.m4 \ + $(top_srcdir)/config/m4/conf-init.m4 \ + $(top_srcdir)/config/m4/conf-openmp.m4 \ + $(top_srcdir)/config/m4/conf-optim.m4 \ + $(top_srcdir)/config/m4/lang-c++.m4 \ + $(top_srcdir)/config/m4/lang-c.m4 \ + $(top_srcdir)/config/m4/lang-fortran-import.m4 \ + $(top_srcdir)/config/m4/lang-fortran.m4 \ + $(top_srcdir)/config/m4/lang-python.m4 \ + $(top_srcdir)/config/m4/libxml2.m4 \ + $(top_srcdir)/config/m4/misc-display.m4 \ + $(top_srcdir)/config/m4/sd_abinit_common.m4 \ + $(top_srcdir)/config/m4/sd_arch_gpu.m4 \ + $(top_srcdir)/config/m4/sd_arch_mpi.m4 \ + $(top_srcdir)/config/m4/sd_bigdft.m4 \ + $(top_srcdir)/config/m4/sd_core.m4 \ + $(top_srcdir)/config/m4/sd_esl.m4 \ + $(top_srcdir)/config/m4/sd_fftw3.m4 \ + $(top_srcdir)/config/m4/sd_gpu_kokkos.m4 \ + $(top_srcdir)/config/m4/sd_gpu_yakl.m4 \ + $(top_srcdir)/config/m4/sd_io_hdf5.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf_fortran.m4 \ + $(top_srcdir)/config/m4/sd_levmar.m4 \ + $(top_srcdir)/config/m4/sd_libpaw.m4 \ + $(top_srcdir)/config/m4/sd_libpsml.m4 \ + $(top_srcdir)/config/m4/sd_libxc.m4 \ + $(top_srcdir)/config/m4/sd_math_fft.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_core.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_util.m4 \ + $(top_srcdir)/config/m4/sd_papi.m4 \ + $(top_srcdir)/config/m4/sd_pfft.m4 \ + $(top_srcdir)/config/m4/sd_triqs.m4 \ + $(top_srcdir)/config/m4/sd_wannier90.m4 \ + $(top_srcdir)/config/m4/sd_xmlf90.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_$(V)) +am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY)) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +am__v_at_1 = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + distdir distdir-am +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +am__DIST_COMMON = $(srcdir)/Makefile.in AUTHORS COPYING ChangeLog \ + INSTALL NEWS README +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ABINIT_BINARY_PACKAGE = abinit-10.0.0.83-58be4d_x86_64_darwin18.7.0_gnu9.4 +ABINIT_COMMON_CPPFLAGS = +ABINIT_COMMON_FCFLAGS = +ABINIT_COMMON_LDFLAGS = +ABINIT_COMMON_LIBS = +ABINIT_TARGET = x86_64_darwin18.7.0_gnu9.4 +ABINIT_VERSION = 10.0.0.83-58be4d +ABINIT_VERSION_BASE = 10.0 +ABINIT_VERSION_BUILD = 20240316 +ABINIT_VERSION_MAJOR = 10 +ABINIT_VERSION_MICRO = 0 +ABINIT_VERSION_MINOR = 0 +ABI_CPPFLAGS = -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include +ACLOCAL = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' aclocal-1.16 +AMTAR = $${TAR-tar} +AM_DEFAULT_VERBOSITY = 1 +AR = ar +ARFLAGS = rc +ARFLAGS_CMD = rc +ARFLAGS_DEBUG = +ARFLAGS_EXTRA = +ARFLAGS_HINTS = +ARFLAGS_OPTIM = +ATOMPAW_BIN = +AUTOCONF = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' autoconf +AUTOHEADER = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' autoheader +AUTOMAKE = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' automake-1.16 +AWK = awk +BIGDFT_CPPFLAGS = +BIGDFT_FCFLAGS = +BIGDFT_LDFLAGS = +BIGDFT_LIBS = +BOURNE_SHELL = /bin/sh +CC = /opt/local/bin/mpicc +CCDEPMODE = depmode=gcc3 +CC_LDFLAGS = +CC_LDFLAGS_DEBUG = +CC_LDFLAGS_EXTRA = +CC_LDFLAGS_GPU = +CC_LDFLAGS_HINTS = +CC_LDFLAGS_OPTIM = +CC_LIBS = +CC_LIBS_DEBUG = +CC_LIBS_EXTRA = +CC_LIBS_GPU = +CC_LIBS_HINTS = +CC_LIBS_OPTIM = +CFLAGS = -O2 -g +CFLAGS_DEBUG = +CFLAGS_EXTRA = +CFLAGS_GPU = +CFLAGS_HINTS = +CFLAGS_OPTIM = +CPP = /opt/local/bin/mpicc -E +CPPFLAGS = +CPPFLAGS_DEBUG = +CPPFLAGS_EXTRA = +CPPFLAGS_GPU = +CPPFLAGS_HINTS = +CPPFLAGS_HINTS_EXT = -P -std=c99 +CPPFLAGS_OPTIM = +CXX = /opt/local/bin/mpicxx +CXXDEPMODE = depmode=gcc3 +CXXFLAGS = -O2 -g +CXXFLAGS_DEBUG = +CXXFLAGS_EXTRA = +CXXFLAGS_GPU = +CXXFLAGS_HINTS = +CXXFLAGS_OPTIM = +CXX_LDFLAGS = +CXX_LDFLAGS_DEBUG = +CXX_LDFLAGS_EXTRA = +CXX_LDFLAGS_GPU = +CXX_LDFLAGS_HINTS = +CXX_LDFLAGS_OPTIM = +CXX_LIBS = +CXX_LIBS_DEBUG = +CXX_LIBS_EXTRA = +CXX_LIBS_GPU = +CXX_LIBS_HINTS = +CXX_LIBS_OPTIM = +CYGPATH_W = echo +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +ECHO_C = \c +ECHO_N = +ECHO_T = +EGREP = /usr/bin/grep -E +EXEEXT = +F77 = /opt/local/bin/mpif90 +FC = /opt/local/bin/mpif90 +FCFLAGS = -O2 -g -ffree-line-length-none -I/opt/local/include -I/opt/local/include -I/opt/local/include +FCFLAGS_DEBUG = +FCFLAGS_EXTRA = +FCFLAGS_F90 = +FCFLAGS_FIXEDFORM = -ffixed-form +FCFLAGS_FREEFORM = -ffree-form +FCFLAGS_HINTS = -ffree-line-length-none +FCFLAGS_MODDIR = -J../mods +FCFLAGS_OPENMP = +FCFLAGS_OPENMP_OFFLOAD = +FCFLAGS_OPTIM = +FCLIBS = -L/opt/local/lib -L/opt/local/lib/openmpi-gcc9 -L/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0 -L/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/../../.. -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi -lgfortran -lquadmath -lm +FC_LDFLAGS = +FC_LDFLAGS_DEBUG = +FC_LDFLAGS_EXTRA = +FC_LDFLAGS_HINTS = +FC_LDFLAGS_OPTIM = +FC_LIBS = +FC_LIBS_DEBUG = +FC_LIBS_EXTRA = +FC_LIBS_HINTS = +FC_LIBS_OPTIM = +FC_NOWRAP = /opt/local/bin/mpif90 +FFLAGS = -O2 -g -ffree-line-length-none -I/opt/local/include -I/opt/local/include -I/opt/local/include +FFTW3_CFLAGS = +FFTW3_CPPFLAGS = -I/opt/local/include +FFTW3_FCFLAGS = -I/opt/local/include +FFTW3_LDFLAGS = +FFTW3_LIBS = -L/opt/local/lib -lfftw3 -lfftw3f +FFT_CFLAGS = +FFT_FCFLAGS = +FPP = +FPPFLAGS = +FPPFLAGS_DEBUG = +FPPFLAGS_EXTRA = +FPPFLAGS_HINTS = +FPPFLAGS_OPTIM = +GPU_ARCH = +GPU_CFLAGS = +GPU_CPPFLAGS = +GPU_CXXFLAGS = +GPU_FCFLAGS = +GPU_LDFLAGS = +GPU_LIBS = +GRAPHATOM_BIN = +GREP = /usr/bin/grep +H5CC = +HDF5_CFLAGS = +HDF5_CPPFLAGS = +HDF5_CXXFLAGS = +HDF5_FCFLAGS = +HDF5_LDFLAGS = +HDF5_LIBS = +INSTALL = /opt/local/libexec/gnubin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +KOKKOS_CPPFLAGS = +KOKKOS_CXXFLAGS = +KOKKOS_LDFLAGS = +KOKKOS_LIBS = +LDFLAGS = +LEVMAR_CFLAGS = +LEVMAR_CPPFLAGS = +LEVMAR_LDFLAGS = +LEVMAR_LIBS = +LIBOBJS = +LIBPAW_CPPFLAGS = +LIBPAW_FCFLAGS = +LIBPAW_LDFLAGS = +LIBPAW_LIBS = +LIBPSML_CPPFLAGS = +LIBPSML_FCFLAGS = +LIBPSML_LDFLAGS = +LIBPSML_LIBS = +LIBS = -L/opt/local/lib -lwannier -L/opt/local/lib -lxc -L/opt/local/lib -lnetcdff -L/opt/local/lib -lnetcdf -L/opt/local/lib -L/opt/local/lib -lhdf5_hl -L/opt/local/lib -lhdf5 -lz -ldl -lm -L/opt/local/lib -lfftw3 -lfftw3f +LIBXC_CFLAGS = +LIBXC_CPPFLAGS = +LIBXC_FCFLAGS = +LIBXC_LDFLAGS = +LIBXC_LIBS = +LIBXML2_CPPFLAGS = +LIBXML2_FCFLAGS = +LIBXML2_LIBS = +LINALG_CFLAGS = +LINALG_CPPFLAGS = +LINALG_CXXFLAGS = +LINALG_FCFLAGS = -I/opt/local/include +LINALG_LDFLAGS = +LINALG_LIBS = -L/opt/local/lib -lopenblas +LN_S = ln -s +LTLIBOBJS = +MAKEINFO = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' makeinfo +MKDIR_P = /opt/local/libexec/gnubin/mkdir -p +MODEXT = mod +MPI_CFLAGS = +MPI_CPPFLAGS = +MPI_CXXFLAGS = +MPI_FCFLAGS = +MPI_LDFLAGS = +MPI_LIBS = +MV = /opt/local/libexec/gnubin/mv +NETCDF_CFLAGS = +NETCDF_CPPFLAGS = +NETCDF_CXXFLAGS = +NETCDF_FCFLAGS = +NETCDF_FORTRAN_CFLAGS = +NETCDF_FORTRAN_CPPFLAGS = +NETCDF_FORTRAN_CXXFLAGS = +NETCDF_FORTRAN_FCFLAGS = +NETCDF_FORTRAN_LDFLAGS = +NETCDF_FORTRAN_LIBS = +NETCDF_LDFLAGS = +NETCDF_LIBS = +NVCC = +NVCC_CFLAGS = +NVCC_CPPFLAGS = +NVCC_LDFLAGS = +NVCC_LIBS = +OBJEXT = o +PACKAGE = abinit +PACKAGE_BUGREPORT = https://bugs.launchpad.net/abinit/ +PACKAGE_NAME = ABINIT +PACKAGE_STRING = ABINIT 10.0.0.83-58be4d +PACKAGE_TARNAME = abinit +PACKAGE_URL = +PACKAGE_VERSION = 10.0.0.83-58be4d +PAPI_CFLAGS = +PAPI_CPPFLAGS = +PAPI_LDFLAGS = +PAPI_LIBS = +PATCH = patch +PATH_SEPARATOR = : +PERL = /usr/bin/perl +PFFT_CFLAGS = +PFFT_CPPFLAGS = +PFFT_LDFLAGS = +PFFT_LIBS = +PYFLAGS = +PYTHON = python3.9 +PYTHON_CONFIG = python3.9-config +PYTHON_CPPFLAGS = -I/opt/local/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -I/opt/local/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 +RANLIB = ranlib +REALPATH = realpath +RM = /opt/local/libexec/gnubin/rm +SED = /usr/bin/sed +SET_MAKE = +SHELL = /bin/sh +STRIP = +TAR = tar +TRIQS_CFLAGS = +TRIQS_CPPFLAGS = +TRIQS_CXXFLAGS = +TRIQS_LDFLAGS = +TRIQS_LIBS = +TRUE_CPP = cpp +VERSION = 10.0.0.83-58be4d +WANNIER90_CPPFLAGS = +WANNIER90_FCFLAGS = -I/opt/local/include +WANNIER90_LDFLAGS = +WANNIER90_LIBS = -L/opt/local/lib -lwannier +XML2_CONFIG = +XMLF90_CPPFLAGS = +XMLF90_FCFLAGS = +XMLF90_LDFLAGS = +XMLF90_LIBS = +XML_CPPFLAGS = +XML_LIBS = +XPP = +XPPFLAGS = +XPPFLAGS_DEBUG = +XPPFLAGS_EXTRA = +XPPFLAGS_OPTIM = +YAKL_CPPFLAGS = +YAKL_FCFLAGS = +YAKL_LDFLAGS = +YAKL_LIBS = +abi_ac_distcheck = --with-config-file="/Users/gonze/_Research/ABINIT_git/gonze/mac-1P0-225.ac9" +abi_ac_version = 027100 +abi_am_version = 011603 +abi_avx_safe_mode_enable = no +abi_bse_unpacked_enable = no +abi_cc_path = +abi_cc_vendor = gnu +abi_cc_version = 9.4 +abi_cclock_enable = no +abi_cpp_path = +abi_cpu_64bits = yes +abi_cpu_bits = 64 +abi_cpu_model = unknown +abi_cpu_platform = apple +abi_cpu_spec = unknown_unknown +abi_cpu_vendor = unknown +abi_crpa_optim_enable = no +abi_cxx_path = +abi_cxx_vendor = gnu +abi_cxx_version = 9.4 +abi_debug_flavor = basic +abi_exports_enable = no +abi_fbk_abinit_common_ok = no +abi_fbk_bigdft_ok = disabled +abi_fbk_config = +abi_fbk_enable = no +abi_fbk_fft_ok = no +abi_fbk_fftw3_ok = no +abi_fbk_gpu_ok = no +abi_fbk_hdf5_ok = disabled +abi_fbk_init = def +abi_fbk_kokkos_ok = no +abi_fbk_levmar_ok = no +abi_fbk_libpaw_ok = no +abi_fbk_libpsml_ok = disabled +abi_fbk_libxc_ok = disabled +abi_fbk_libxml2_ok = no +abi_fbk_linalg_ok = disabled +abi_fbk_list = +abi_fbk_mpi_ok = no +abi_fbk_netcdf_fortran_ok = disabled +abi_fbk_netcdf_ok = disabled +abi_fbk_papi_ok = no +abi_fbk_pfft_ok = no +abi_fbk_prefix = +abi_fbk_required = +abi_fbk_triqs_ok = no +abi_fbk_wannier90_ok = disabled +abi_fbk_xmlf90_ok = disabled +abi_fbk_yakl_ok = no +abi_fc_path = +abi_fc_vendor = gnu +abi_fc_version = 9.4 +abi_fc_wrap = no +abi_fc_wrapper_enable = no +abi_fpp_path = +abi_gpu_arch = +abi_gpu_fcflags = +abi_gpu_flavor = none +abi_gpu_hip_libdir = +abi_gpu_incs = +abi_gpu_ldflags = +abi_gpu_libs = +abi_gpu_nvtx_v3 = +abi_gpu_roctx = +abi_gw_dpc_enable = yes +abi_hints_enable = yes +abi_libtetra_enable = yes +abi_libxml2_cppflags = +abi_libxml2_enable = no +abi_libxml2_fcflags = +abi_libxml2_init = def +abi_libxml2_ldflags = +abi_libxml2_libs = +abi_libxml2_ok = unknown +abi_libxml2_prefix = +abi_lotf_enable = no +abi_lt_version = 020406 +abi_m4_version = 010419 +abi_memory_profiling_enable = no +abi_mpi_cflags = +abi_mpi_cppflags = +abi_mpi_cxxflags = +abi_mpi_enable = yes +abi_mpi_fcflags = +abi_mpi_flavor = auto +abi_mpi_gpu_aware_enable = no +abi_mpi_incs = +abi_mpi_inplace_enable = yes +abi_mpi_interfaces_bugfix_enable = no +abi_mpi_io_default_enable = no +abi_mpi_io_enable = yes +abi_mpi_ldflags = +abi_mpi_level = 2 +abi_mpi_libs = +abi_netcdf_default_enable = no +abi_openmp_enable = no +abi_openmp_offload_enable = no +abi_optim_flavor = standard +abi_python_invocation_enable = no +abi_source_debug_enable = no +abi_stdin_enable = yes +abi_sys_spec = darwin-x86_64 +abi_timer_enable = yes +abi_triqs_v1_4_enable = no +abi_triqs_v2_0_enable = no +abi_zdot_bugfix_enable = no +abinit_bindir = /usr/local/bin +abinit_builddir = /Users/gonze/_Research/ABINIT_git/gonze +abinit_chkdir = /usr/local/share/abinit/tests +abinit_datdir = /usr/local/share/abinit +abinit_docdir = /usr/local/doc/abinit +abinit_incdir = /usr/local/include +abinit_libdir = /usr/local/lib +abinit_mandir = /usr/local/share/man +abinit_prefix = /usr/local +abinit_srcdir = /Users/gonze/_Research/ABINIT_git/gonze +abs_builddir = /Users/gonze/_Research/ABINIT_git/gonze/shared/libpaw +abs_srcdir = /Users/gonze/_Research/ABINIT_git/gonze/shared/libpaw +abs_top_builddir = /Users/gonze/_Research/ABINIT_git/gonze +abs_top_srcdir = /Users/gonze/_Research/ABINIT_git/gonze +ac_ct_CC = +ac_ct_CXX = +ac_ct_FC = +am__include = include +am__leading_dot = . +am__quote = +am__tar = tar --format=ustar -chf - "$$tardir" +am__untar = tar -xf - +bindir = ${exec_prefix}/bin +build = x86_64-apple-darwin18.7.0 +build_alias = +build_cpu = x86_64 +build_os = darwin18.7.0 +build_vendor = apple +builddir = . +cc_info_string = gcc-mp-9 (MacPorts gcc9 9.4.0_0) 9.4.0 +cxx_info_string = g++-mp-9 (MacPorts gcc9 9.4.0_0) 9.4.0 +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +enable_avx_safe_mode = +enable_bse_unpacked = +enable_cclock = +enable_crpa_optim = +enable_exports = +enable_fc_wrapper = +enable_gw_dpc = yes +enable_hints = +enable_libtetra = +enable_lotf = +enable_memory_profiling = +enable_mpi_gpu_aware = +enable_mpi_inplace = +enable_mpi_interfaces_bugfix = +enable_mpi_io = yes +enable_mpi_io_default = +enable_netcdf_default = +enable_openmp = +enable_openmp_offload = +enable_python_invocation = +enable_shared = +enable_source_debug = +enable_static = +enable_stdin = +enable_timer = +enable_triqs_v1_4 = +enable_triqs_v2_0 = +enable_zdot_bugfix = +exec_prefix = ${prefix} +fc_info_string = GNU Fortran (MacPorts gcc9 9.4.0_0) 9.4.0 +fc_mod_fcflags = +fc_timing = standard +fcflags_opt_02_clib = +fcflags_opt_10_defs = +fcflags_opt_11_memory_mpi = +fcflags_opt_12_hide_mpi = +fcflags_opt_14_hidewrite = +fcflags_opt_16_hideleave = +fcflags_opt_16_kokkos_toolbox = +fcflags_opt_17_gpu_toolbox = +fcflags_opt_17_libtetra_ext = +fcflags_opt_17_minimax = +fcflags_opt_17_yaml_out = +fcflags_opt_18_timing = +fcflags_opt_21_hashfuncs = +fcflags_opt_27_toolbox_oop = +fcflags_opt_28_numeric_noabirule = +fcflags_opt_29_kpoints = +fcflags_opt_32_util = +fcflags_opt_33_xc_lowlevel = +fcflags_opt_39_libpaw = +fcflags_opt_41_geometry = +fcflags_opt_42_nlstrain = +fcflags_opt_42_parser = +fcflags_opt_43_ptgroups = -O0 +fcflags_opt_43_wvl_wrappers = +fcflags_opt_44_abitools = +fcflags_opt_44_abitypes_defs = +fcflags_opt_44_manage_kokkos = +fcflags_opt_45_geomoptim = +fcflags_opt_45_xgTools = +fcflags_opt_46_ghc_omp = +fcflags_opt_46_manage_cuda = +fcflags_opt_48_diago = +fcflags_opt_49_gw_toolbox_oop = +fcflags_opt_51_manage_mpi = +fcflags_opt_52_fft_mpi_noabirule = +fcflags_opt_53_ffts = +fcflags_opt_54_spacepar = +fcflags_opt_55_abiutil = +fcflags_opt_56_io_mpi = +fcflags_opt_56_mixing = +fcflags_opt_56_recipspace = +fcflags_opt_56_xc = +fcflags_opt_57_iopsp_parser = +fcflags_opt_57_iovars = +fcflags_opt_61_occeig = +fcflags_opt_62_cg_noabirule = +fcflags_opt_62_ctqmc = +fcflags_opt_62_iowfdenpot = +fcflags_opt_62_poisson = +fcflags_opt_62_wvl_wfs = +fcflags_opt_64_psp = +fcflags_opt_65_lotf_base = +fcflags_opt_65_paw = +fcflags_opt_66_nonlocal = +fcflags_opt_66_vdwxc = +fcflags_opt_66_wfs = +fcflags_opt_67_common = +fcflags_opt_67_python_invocation_ext = +fcflags_opt_67_triqs_ext = +fcflags_opt_68_dmft = +fcflags_opt_68_lotf = +fcflags_opt_68_recursion = +fcflags_opt_68_rsprc = +fcflags_opt_69_wfdesc = +fcflags_opt_70_gw = +fcflags_opt_71_bse = +fcflags_opt_71_wannier = +fcflags_opt_72_response = +fcflags_opt_77_ddb = +fcflags_opt_77_suscep = +fcflags_opt_78_effpot = +fcflags_opt_78_eph = +fcflags_opt_79_seqpar_mpi = +fcflags_opt_80_rttddft = +fcflags_opt_80_tdep = +fcflags_opt_94_scfcv = +fcflags_opt_95_drive = +fcflags_opt_98_main = +fcflags_opt_bigdft = +fcflags_opt_default = +fcflags_opt_hdf5 = +fcflags_opt_levmar = +fcflags_opt_libpsml = +fcflags_opt_libxc = +fcflags_opt_libxml2 = +fcflags_opt_linalg = +fcflags_opt_netcdf = +fcflags_opt_netcdf_fortran = +fcflags_opt_papi = +fcflags_opt_triqs = +fcflags_opt_wannier90 = +fcflags_opt_xmlf90 = +host = x86_64-apple-darwin18.7.0 +host_alias = +host_cpu = x86_64 +host_os = darwin18.7.0 +host_vendor = apple +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = ${SHELL} /Users/gonze/_Research/ABINIT_git/gonze/config/gnu/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = ${datarootdir}/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = $(MKDIR_P) +oldincludedir = /usr/include +pdfdir = ${docdir} +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +runstatedir = ${localstatedir}/run +sbindir = ${exec_prefix}/sbin +sd_abinit_common_cppflags = +sd_abinit_common_enable = no +sd_abinit_common_enable_def = no +sd_abinit_common_fcflags = +sd_abinit_common_init = def +sd_abinit_common_ldflags = +sd_abinit_common_libs = +sd_abinit_common_ok = unknown +sd_abinit_common_options = optional skip +sd_abinit_common_policy = skip +sd_abinit_common_status = optional +sd_bigdft_cppflags = +sd_bigdft_enable = no +sd_bigdft_enable_def = no +sd_bigdft_fcflags = +sd_bigdft_init = def +sd_bigdft_ldflags = +sd_bigdft_libs = +sd_bigdft_ok = unknown +sd_bigdft_options = optional warn +sd_bigdft_policy = warn +sd_bigdft_status = optional +sd_fft_cflags = +sd_fft_choices = +sd_fft_cppflags = -I/opt/local/include +sd_fft_cxxflags = +sd_fft_enable = yes +sd_fft_fcflags = -I/opt/local/include +sd_fft_flavor = fftw3 +sd_fft_init = kwd +sd_fft_ldflags = +sd_fft_libs = -L/opt/local/lib -lfftw3 -lfftw3f +sd_fft_ok = yes +sd_fftw3_cflags = +sd_fftw3_cppflags = -I/opt/local/include +sd_fftw3_enable = yes +sd_fftw3_enable_def = no +sd_fftw3_fcflags = -I/opt/local/include +sd_fftw3_init = env +sd_fftw3_ldflags = +sd_fftw3_libs = -L/opt/local/lib -lfftw3 -lfftw3f +sd_fftw3_ok = yes +sd_fftw3_options = optional skip +sd_fftw3_policy = skip +sd_fftw3_status = optional +sd_gpu_cflags = +sd_gpu_cppflags = +sd_gpu_cxxflags = +sd_gpu_enable = no +sd_gpu_enable_def = no +sd_gpu_fcflags = +sd_gpu_init = def +sd_gpu_ldflags = +sd_gpu_libs = +sd_gpu_ok = no +sd_gpu_options = optional warn +sd_gpu_policy = warn +sd_gpu_prefix = +sd_gpu_status = optional +sd_hdf5_cflags = +sd_hdf5_cppflags = -I/opt/local/include -I/opt/local/include +sd_hdf5_cxxflags = +sd_hdf5_enable = yes +sd_hdf5_enable_def = yes +sd_hdf5_enable_fc = no +sd_hdf5_fcflags = +sd_hdf5_h5cc = /opt/local/bin/h5cc +sd_hdf5_h5fc = +sd_hdf5_init = dir +sd_hdf5_ldflags = +sd_hdf5_libs = -L/opt/local/lib -L/opt/local/lib -lhdf5_hl -L/opt/local/lib -lhdf5 -lz -ldl -lm +sd_hdf5_ok = yes +sd_hdf5_options = required no-fortran warn +sd_hdf5_policy = warn +sd_hdf5_status = required +sd_kokkos_cppflags = +sd_kokkos_cxxflags = +sd_kokkos_enable = no +sd_kokkos_enable_def = no +sd_kokkos_init = def +sd_kokkos_ldflags = +sd_kokkos_libs = +sd_kokkos_ok = unknown +sd_kokkos_options = optional fail +sd_kokkos_policy = fail +sd_kokkos_status = optional +sd_levmar_cflags = +sd_levmar_cppflags = +sd_levmar_enable = no +sd_levmar_enable_def = no +sd_levmar_init = def +sd_levmar_ldflags = +sd_levmar_libs = +sd_levmar_ok = unknown +sd_levmar_options = optional fail +sd_levmar_policy = fail +sd_levmar_status = optional +sd_libpaw_cppflags = +sd_libpaw_enable = no +sd_libpaw_enable_def = no +sd_libpaw_fcflags = +sd_libpaw_init = def +sd_libpaw_ldflags = +sd_libpaw_libs = +sd_libpaw_ok = unknown +sd_libpaw_options = optional skip +sd_libpaw_policy = skip +sd_libpaw_status = optional +sd_libpsml_cppflags = +sd_libpsml_enable = no +sd_libpsml_enable_def = no +sd_libpsml_fcflags = +sd_libpsml_init = def +sd_libpsml_ldflags = +sd_libpsml_libs = +sd_libpsml_ok = unknown +sd_libpsml_options = optional warn +sd_libpsml_policy = warn +sd_libpsml_status = optional +sd_libxc_cflags = +sd_libxc_cppflags = -I/opt/local/include +sd_libxc_enable = yes +sd_libxc_enable_def = yes +sd_libxc_enable_fc = no +sd_libxc_fcflags = +sd_libxc_init = dir +sd_libxc_ldflags = +sd_libxc_libs = -L/opt/local/lib -lxc +sd_libxc_ok = yes +sd_libxc_options = required no-fortran warn +sd_libxc_policy = warn +sd_libxc_status = required +sd_linalg_cflags = +sd_linalg_choices = +sd_linalg_cppflags = +sd_linalg_cxxflags = +sd_linalg_enable = yes +sd_linalg_fcflags = -I/opt/local/include +sd_linalg_flavor = openblas +sd_linalg_has_elpa = no +sd_linalg_has_scalapack = no +sd_linalg_init = env +sd_linalg_ldflags = +sd_linalg_libs = -L/opt/local/lib -lopenblas +sd_linalg_ok = yes +sd_mpi_cc = /opt/local/bin/mpicc +sd_mpi_cflags = +sd_mpi_cppflags = -I/opt/local/include +sd_mpi_cxx = /opt/local/bin/mpicxx +sd_mpi_enable = yes +sd_mpi_enable_cxx = yes +sd_mpi_enable_def = auto +sd_mpi_enable_fc = yes +sd_mpi_fc = /opt/local/bin/mpif90 +sd_mpi_fcflags = -I/opt/local/include +sd_mpi_init = dir +sd_mpi_ldflags = +sd_mpi_libs = +sd_mpi_ok = yes +sd_mpi_options = auto optional fail +sd_mpi_policy = fail +sd_mpi_status = optional +sd_netcdf_cflags = +sd_netcdf_cppflags = -I/opt/local/include +sd_netcdf_enable = yes +sd_netcdf_enable_def = yes +sd_netcdf_fcflags = -I/opt/local/include +sd_netcdf_fortran_cflags = +sd_netcdf_fortran_cppflags = -I/opt/local/include +sd_netcdf_fortran_enable = yes +sd_netcdf_fortran_enable_def = yes +sd_netcdf_fortran_fcflags = -I/opt/local/include +sd_netcdf_fortran_init = dir +sd_netcdf_fortran_ldflags = +sd_netcdf_fortran_libs = -L/opt/local/lib -lnetcdff +sd_netcdf_fortran_ok = yes +sd_netcdf_fortran_options = required warn +sd_netcdf_fortran_policy = warn +sd_netcdf_fortran_status = required +sd_netcdf_init = dir +sd_netcdf_ldflags = +sd_netcdf_libs = -L/opt/local/lib -lnetcdf +sd_netcdf_ok = yes +sd_netcdf_options = required warn +sd_netcdf_policy = warn +sd_netcdf_status = required +sd_papi_cflags = +sd_papi_cppflags = +sd_papi_enable = no +sd_papi_enable_def = no +sd_papi_init = def +sd_papi_ldflags = +sd_papi_libs = +sd_papi_ok = unknown +sd_papi_options = optional fail +sd_papi_policy = fail +sd_papi_sd_papi_fcflags = +sd_papi_status = optional +sd_pfft_cflags = +sd_pfft_cppflags = +sd_pfft_enable = no +sd_pfft_enable_def = no +sd_pfft_init = def +sd_pfft_ldflags = +sd_pfft_libs = +sd_pfft_ok = unknown +sd_pfft_options = optional skip +sd_pfft_policy = skip +sd_pfft_status = optional +sd_sys_fcflags = +sd_triqs_cflags = +sd_triqs_cppflags = +sd_triqs_cxxflags = +sd_triqs_enable = no +sd_triqs_enable_def = no +sd_triqs_fcflags = +sd_triqs_init = def +sd_triqs_ldflags = +sd_triqs_libs = +sd_triqs_ok = unknown +sd_triqs_options = optional fail +sd_triqs_policy = fail +sd_triqs_status = optional +sd_wannier90_cppflags = +sd_wannier90_enable = yes +sd_wannier90_enable_def = no +sd_wannier90_fcflags = -I/opt/local/include +sd_wannier90_init = env +sd_wannier90_ldflags = +sd_wannier90_libs = -L/opt/local/lib -lwannier +sd_wannier90_ok = yes +sd_wannier90_options = optional warn +sd_wannier90_policy = warn +sd_wannier90_status = optional +sd_xmlf90_cppflags = +sd_xmlf90_enable = no +sd_xmlf90_enable_def = no +sd_xmlf90_fcflags = +sd_xmlf90_init = def +sd_xmlf90_ldflags = +sd_xmlf90_libs = +sd_xmlf90_ok = unknown +sd_xmlf90_options = optional warn +sd_xmlf90_policy = warn +sd_xmlf90_status = optional +sd_yakl_cppflags = +sd_yakl_enable = no +sd_yakl_enable_def = no +sd_yakl_fcflags = +sd_yakl_init = def +sd_yakl_ldflags = +sd_yakl_libs = +sd_yakl_ok = unknown +sd_yakl_options = optional fail +sd_yakl_policy = fail +sd_yakl_status = optional +sharedstatedir = ${prefix}/com +src_02_clib_fcflags = -I$(top_builddir)/shared/common/src/02_clib -I$(top_srcdir)/shared/common/src/02_clib +src_10_defs_fcflags = -I$(top_builddir)/shared/common/src/10_defs -I$(top_srcdir)/shared/common/src/10_defs +src_11_memory_mpi_fcflags = -I$(top_builddir)/shared/common/src/11_memory_mpi -I$(top_srcdir)/shared/common/src/11_memory_mpi +src_12_hide_mpi_fcflags = -I$(top_builddir)/shared/common/src/12_hide_mpi -I$(top_srcdir)/shared/common/src/12_hide_mpi +src_14_hidewrite_fcflags = -I$(top_builddir)/shared/common/src/14_hidewrite -I$(top_srcdir)/shared/common/src/14_hidewrite +src_16_hideleave_fcflags = -I$(top_builddir)/shared/common/src/16_hideleave -I$(top_srcdir)/shared/common/src/16_hideleave +src_16_kokkos_toolbox_fcflags = -I$(top_builddir)/shared/common/src/16_kokkos_toolbox -I$(top_srcdir)/shared/common/src/16_kokkos_toolbox +src_17_gpu_toolbox_fcflags = -I$(top_builddir)/shared/common/src/17_gpu_toolbox -I$(top_srcdir)/shared/common/src/17_gpu_toolbox +src_17_libtetra_ext_fcflags = -I$(top_builddir)/shared/common/src/17_libtetra_ext -I$(top_srcdir)/shared/common/src/17_libtetra_ext +src_17_minimax_fcflags = -I$(top_builddir)/shared/common/src/17_minimax -I$(top_srcdir)/shared/common/src/17_minimax +src_17_yaml_out_fcflags = -I$(top_builddir)/shared/common/src/17_yaml_out -I$(top_srcdir)/shared/common/src/17_yaml_out +src_18_timing_fcflags = -I$(top_builddir)/shared/common/src/18_timing -I$(top_srcdir)/shared/common/src/18_timing +src_21_hashfuncs_fcflags = -I$(top_builddir)/shared/common/src/21_hashfuncs -I$(top_srcdir)/shared/common/src/21_hashfuncs +src_27_toolbox_oop_fcflags = -I$(top_builddir)/shared/common/src/27_toolbox_oop -I$(top_srcdir)/shared/common/src/27_toolbox_oop +src_28_numeric_noabirule_fcflags = -I$(top_builddir)/shared/common/src/28_numeric_noabirule -I$(top_srcdir)/shared/common/src/28_numeric_noabirule +src_29_kpoints_fcflags = -I$(top_builddir)/shared/common/src/29_kpoints -I$(top_srcdir)/shared/common/src/29_kpoints +src_32_util_fcflags = -I$(top_builddir)/shared/common/src/32_util -I$(top_srcdir)/shared/common/src/32_util +src_33_xc_lowlevel_fcflags = -I$(top_builddir)/shared/common/src/33_xc_lowlevel -I$(top_srcdir)/shared/common/src/33_xc_lowlevel +src_39_libpaw_fcflags = -I$(top_builddir)/shared/libpaw/src -I$(top_srcdir)/shared/libpaw/src +src_41_geometry_fcflags = -I$(top_builddir)/src/41_geometry -I$(top_srcdir)/src/41_geometry +src_42_nlstrain_fcflags = -I$(top_builddir)/src/42_nlstrain -I$(top_srcdir)/src/42_nlstrain +src_42_parser_fcflags = -I$(top_builddir)/src/42_parser -I$(top_srcdir)/src/42_parser +src_43_ptgroups_fcflags = -I$(top_builddir)/src/43_ptgroups -I$(top_srcdir)/src/43_ptgroups +src_43_wvl_wrappers_fcflags = -I$(top_builddir)/src/43_wvl_wrappers -I$(top_srcdir)/src/43_wvl_wrappers +src_44_abitools_fcflags = -I$(top_builddir)/src/44_abitools -I$(top_srcdir)/src/44_abitools +src_44_abitypes_defs_fcflags = -I$(top_builddir)/src/44_abitypes_defs -I$(top_srcdir)/src/44_abitypes_defs +src_44_manage_kokkos_fcflags = -I$(top_builddir)/src/44_manage_kokkos -I$(top_srcdir)/src/44_manage_kokkos +src_45_geomoptim_fcflags = -I$(top_builddir)/src/45_geomoptim -I$(top_srcdir)/src/45_geomoptim +src_45_xgTools_fcflags = -I$(top_builddir)/src/45_xgTools -I$(top_srcdir)/src/45_xgTools +src_46_ghc_omp_fcflags = -I$(top_builddir)/src/46_ghc_omp -I$(top_srcdir)/src/46_ghc_omp +src_46_manage_cuda_fcflags = -I$(top_builddir)/src/46_manage_cuda -I$(top_srcdir)/src/46_manage_cuda +src_48_diago_fcflags = -I$(top_builddir)/src/48_diago -I$(top_srcdir)/src/48_diago +src_49_gw_toolbox_oop_fcflags = -I$(top_builddir)/src/49_gw_toolbox_oop -I$(top_srcdir)/src/49_gw_toolbox_oop +src_51_manage_mpi_fcflags = -I$(top_builddir)/src/51_manage_mpi -I$(top_srcdir)/src/51_manage_mpi +src_52_fft_mpi_noabirule_fcflags = -I$(top_builddir)/src/52_fft_mpi_noabirule -I$(top_srcdir)/src/52_fft_mpi_noabirule +src_53_ffts_fcflags = -I$(top_builddir)/src/53_ffts -I$(top_srcdir)/src/53_ffts +src_54_spacepar_fcflags = -I$(top_builddir)/src/54_spacepar -I$(top_srcdir)/src/54_spacepar +src_55_abiutil_fcflags = -I$(top_builddir)/src/55_abiutil -I$(top_srcdir)/src/55_abiutil +src_56_io_mpi_fcflags = -I$(top_builddir)/src/56_io_mpi -I$(top_srcdir)/src/56_io_mpi +src_56_mixing_fcflags = -I$(top_builddir)/src/56_mixing -I$(top_srcdir)/src/56_mixing +src_56_recipspace_fcflags = -I$(top_builddir)/src/56_recipspace -I$(top_srcdir)/src/56_recipspace +src_56_xc_fcflags = -I$(top_builddir)/src/56_xc -I$(top_srcdir)/src/56_xc +src_57_iopsp_parser_fcflags = -I$(top_builddir)/src/57_iopsp_parser -I$(top_srcdir)/src/57_iopsp_parser +src_57_iovars_fcflags = -I$(top_builddir)/src/57_iovars -I$(top_srcdir)/src/57_iovars +src_61_occeig_fcflags = -I$(top_builddir)/src/61_occeig -I$(top_srcdir)/src/61_occeig +src_62_cg_noabirule_fcflags = -I$(top_builddir)/src/62_cg_noabirule -I$(top_srcdir)/src/62_cg_noabirule +src_62_ctqmc_fcflags = -I$(top_builddir)/src/62_ctqmc -I$(top_srcdir)/src/62_ctqmc +src_62_iowfdenpot_fcflags = -I$(top_builddir)/src/62_iowfdenpot -I$(top_srcdir)/src/62_iowfdenpot +src_62_poisson_fcflags = -I$(top_builddir)/src/62_poisson -I$(top_srcdir)/src/62_poisson +src_62_wvl_wfs_fcflags = -I$(top_builddir)/src/62_wvl_wfs -I$(top_srcdir)/src/62_wvl_wfs +src_64_psp_fcflags = -I$(top_builddir)/src/64_psp -I$(top_srcdir)/src/64_psp +src_65_lotf_base_fcflags = -I$(top_builddir)/src/65_lotf_base -I$(top_srcdir)/src/65_lotf_base +src_65_paw_fcflags = -I$(top_builddir)/src/65_paw -I$(top_srcdir)/src/65_paw +src_66_nonlocal_fcflags = -I$(top_builddir)/src/66_nonlocal -I$(top_srcdir)/src/66_nonlocal +src_66_vdwxc_fcflags = -I$(top_builddir)/src/66_vdwxc -I$(top_srcdir)/src/66_vdwxc +src_66_wfs_fcflags = -I$(top_builddir)/src/66_wfs -I$(top_srcdir)/src/66_wfs +src_67_common_fcflags = -I$(top_builddir)/src/67_common -I$(top_srcdir)/src/67_common +src_67_python_invocation_ext_fcflags = -I$(top_builddir)/src/67_python_invocation_ext -I$(top_srcdir)/src/67_python_invocation_ext +src_67_triqs_ext_fcflags = -I$(top_builddir)/src/67_triqs_ext -I$(top_srcdir)/src/67_triqs_ext +src_68_dmft_fcflags = -I$(top_builddir)/src/68_dmft -I$(top_srcdir)/src/68_dmft +src_68_lotf_fcflags = -I$(top_builddir)/src/68_lotf -I$(top_srcdir)/src/68_lotf +src_68_recursion_fcflags = -I$(top_builddir)/src/68_recursion -I$(top_srcdir)/src/68_recursion +src_68_rsprc_fcflags = -I$(top_builddir)/src/68_rsprc -I$(top_srcdir)/src/68_rsprc +src_69_wfdesc_fcflags = -I$(top_builddir)/src/69_wfdesc -I$(top_srcdir)/src/69_wfdesc +src_70_gw_fcflags = -I$(top_builddir)/src/70_gw -I$(top_srcdir)/src/70_gw +src_71_bse_fcflags = -I$(top_builddir)/src/71_bse -I$(top_srcdir)/src/71_bse +src_71_wannier_fcflags = -I$(top_builddir)/src/71_wannier -I$(top_srcdir)/src/71_wannier +src_72_response_fcflags = -I$(top_builddir)/src/72_response -I$(top_srcdir)/src/72_response +src_77_ddb_fcflags = -I$(top_builddir)/src/77_ddb -I$(top_srcdir)/src/77_ddb +src_77_suscep_fcflags = -I$(top_builddir)/src/77_suscep -I$(top_srcdir)/src/77_suscep +src_78_effpot_fcflags = -I$(top_builddir)/src/78_effpot -I$(top_srcdir)/src/78_effpot +src_78_eph_fcflags = -I$(top_builddir)/src/78_eph -I$(top_srcdir)/src/78_eph +src_79_seqpar_mpi_fcflags = -I$(top_builddir)/src/79_seqpar_mpi -I$(top_srcdir)/src/79_seqpar_mpi +src_80_rttddft_fcflags = -I$(top_builddir)/src/80_rttddft -I$(top_srcdir)/src/80_rttddft +src_80_tdep_fcflags = -I$(top_builddir)/src/80_tdep -I$(top_srcdir)/src/80_tdep +src_94_scfcv_fcflags = -I$(top_builddir)/src/94_scfcv -I$(top_srcdir)/src/94_scfcv +src_95_drive_fcflags = -I$(top_builddir)/src/95_drive -I$(top_srcdir)/src/95_drive +src_common_fcflags = -I$(top_builddir)/shared/common/src/incs -I$(top_srcdir)/shared/common/src/incs -I$(top_builddir)/shared/common/src/mods -I$(top_srcdir)/shared/common/src/mods +src_core_fcflags = -I$(top_builddir)/src/incs -I$(top_srcdir)/src/incs -I$(top_builddir)/src/mods -I$(top_srcdir)/src/mods +src_libpaw_fcflags = -I$(top_builddir)/shared/libpaw/incs -I$(top_srcdir)/shared/libpaw/incs -I$(top_builddir)/shared/libpaw/mods -I$(top_srcdir)/shared/libpaw/mods +srcdir = . +sysconfdir = ${prefix}/etc +target = x86_64-apple-darwin18.7.0 +target_alias = +target_cpu = x86_64 +target_os = darwin18.7.0 +target_vendor = apple +top_build_prefix = ../../ +top_builddir = ../.. +top_srcdir = ../.. +with_abinit_common = +with_bigdft = +with_config_file = +with_debug_flavor = +with_fallbacks = +with_fc_vendor = +with_fc_version = +with_fft_flavor = fftw3 +with_fftw3 = +with_gnu_ld = +with_gpu = +with_hdf5 = /opt/local +with_kokkos = +with_levmar = +with_libpaw = +with_libpsml = +with_libxc = /opt/local +with_libxml2 = +with_linalg_flavor = openblas +with_mpi = /opt/local +with_mpi_level = +with_netcdf = /opt/local +with_optim_flavor = +with_papi = +with_pfft = +with_triqs = +with_wannier90 = +with_xmlf90 = +with_yakl = + +# Registered subdirectories +SUBDIRS = \ + incs \ + mods \ + src + +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu shared/libpaw/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu shared/libpaw/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +# This directory's subdirectories are mostly independent; you can cd +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic \ + maintainer-clean-local + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(am__recursive_targets) install-am install-strip + +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ + check-am clean clean-generic cscopelist-am ctags ctags-am \ + distclean distclean-generic distclean-tags distdir dvi dvi-am \ + html html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic maintainer-clean-local mostlyclean \ + mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am + +.PRECIOUS: Makefile + + +# ---------------------------------------------------------------------------- # + +# Enforce ABINIT Coding Style (the so-called ABIRULES) +# +# Note concerning abirules (as of 5.8.0) +# The order of config.h vs abi_common.h is not preserved. +# This should be corrected by hand. It is to be done, at present, +# in get_irredg, merge_kgirr, setshells, sigma +abirules: + @echo 'Reporting possible errors in the abirules procedure' >tmp-abirules.log + @$(PERL) ../developers/maintainers/abirules.pl -d src >>tmp-abirules.log + @grep 'Error' tmp-abirules.log + +# ---------------------------------------------------------------------------- # + +# Help +help: + @cat $(top_srcdir)/doc/help_make/help_make_libpaw.txt + +# ---------------------------------------------------------------------------- # + +# Creation of parent subroutines +parents: + $(PERL) $(top_srcdir)/developers/maintainers/parents.pl -s + rm -f *.old */*.old + +# ---------------------------------------------------------------------------- # + +# Thorough clean-up +maintainer-clean-local: + rm -f tmp-abirules.log + find . -name '*.old' -exec rm {} \; + find . -name '*.orig' -exec rm {} \; + find . -name '*.rej' -exec rm {} \; + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/GX-PAW/libpaw/Makefile.am b/GX-PAW/libpaw/Makefile.am new file mode 100644 index 00000000..9d53da63 --- /dev/null +++ b/GX-PAW/libpaw/Makefile.am @@ -0,0 +1,52 @@ +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-inter on 2024/03/16 21:07:39 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-inter script or its config file instead. +# + + +# Registered subdirectories +SUBDIRS = \ + incs \ + mods \ + src + +# ---------------------------------------------------------------------------- # + +# Enforce ABINIT Coding Style (the so-called ABIRULES) +# +# Note concerning abirules (as of 5.8.0) +# The order of config.h vs abi_common.h is not preserved. +# This should be corrected by hand. It is to be done, at present, +# in get_irredg, merge_kgirr, setshells, sigma +abirules: + @echo 'Reporting possible errors in the abirules procedure' >tmp-abirules.log + @$(PERL) ../developers/maintainers/abirules.pl -d src >>tmp-abirules.log + @grep 'Error' tmp-abirules.log + +# ---------------------------------------------------------------------------- # + +# Help +help: + @cat $(top_srcdir)/doc/help_make/help_make_libpaw.txt + +# ---------------------------------------------------------------------------- # + +# Creation of parent subroutines +parents: + $(PERL) $(top_srcdir)/developers/maintainers/parents.pl -s + rm -f *.old */*.old + +# ---------------------------------------------------------------------------- # + +# Thorough clean-up +maintainer-clean-local: + rm -f tmp-abirules.log + find . -name '*.old' -exec rm {} \; + find . -name '*.orig' -exec rm {} \; + find . -name '*.rej' -exec rm {} \; diff --git a/GX-PAW/libpaw/Makefile.in b/GX-PAW/libpaw/Makefile.in new file mode 100644 index 00000000..81cb8cec --- /dev/null +++ b/GX-PAW/libpaw/Makefile.in @@ -0,0 +1,1533 @@ +# Makefile.in generated by automake 1.16.3 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2020 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-inter on 2024/03/16 21:07:39 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-inter script or its config file instead. +# +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = shared/libpaw +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/m4/arch-gpu.m4 \ + $(top_srcdir)/config/m4/arch-mpi.m4 \ + $(top_srcdir)/config/m4/auto-autotools.m4 \ + $(top_srcdir)/config/m4/auto-corelibs.m4 \ + $(top_srcdir)/config/m4/auto-debug.m4 \ + $(top_srcdir)/config/m4/auto-dirflags.m4 \ + $(top_srcdir)/config/m4/auto-env.m4 \ + $(top_srcdir)/config/m4/auto-hints.m4 \ + $(top_srcdir)/config/m4/auto-optim.m4 \ + $(top_srcdir)/config/m4/auto-options.m4 \ + $(top_srcdir)/config/m4/auto-output.m4 \ + $(top_srcdir)/config/m4/auto-triggers.m4 \ + $(top_srcdir)/config/m4/conf-atompaw.m4 \ + $(top_srcdir)/config/m4/conf-debug.m4 \ + $(top_srcdir)/config/m4/conf-fallbacks.m4 \ + $(top_srcdir)/config/m4/conf-files.m4 \ + $(top_srcdir)/config/m4/conf-init.m4 \ + $(top_srcdir)/config/m4/conf-openmp.m4 \ + $(top_srcdir)/config/m4/conf-optim.m4 \ + $(top_srcdir)/config/m4/lang-c++.m4 \ + $(top_srcdir)/config/m4/lang-c.m4 \ + $(top_srcdir)/config/m4/lang-fortran-import.m4 \ + $(top_srcdir)/config/m4/lang-fortran.m4 \ + $(top_srcdir)/config/m4/lang-python.m4 \ + $(top_srcdir)/config/m4/libxml2.m4 \ + $(top_srcdir)/config/m4/misc-display.m4 \ + $(top_srcdir)/config/m4/sd_abinit_common.m4 \ + $(top_srcdir)/config/m4/sd_arch_gpu.m4 \ + $(top_srcdir)/config/m4/sd_arch_mpi.m4 \ + $(top_srcdir)/config/m4/sd_bigdft.m4 \ + $(top_srcdir)/config/m4/sd_core.m4 \ + $(top_srcdir)/config/m4/sd_esl.m4 \ + $(top_srcdir)/config/m4/sd_fftw3.m4 \ + $(top_srcdir)/config/m4/sd_gpu_kokkos.m4 \ + $(top_srcdir)/config/m4/sd_gpu_yakl.m4 \ + $(top_srcdir)/config/m4/sd_io_hdf5.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf_fortran.m4 \ + $(top_srcdir)/config/m4/sd_levmar.m4 \ + $(top_srcdir)/config/m4/sd_libpaw.m4 \ + $(top_srcdir)/config/m4/sd_libpsml.m4 \ + $(top_srcdir)/config/m4/sd_libxc.m4 \ + $(top_srcdir)/config/m4/sd_math_fft.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_core.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_util.m4 \ + $(top_srcdir)/config/m4/sd_papi.m4 \ + $(top_srcdir)/config/m4/sd_pfft.m4 \ + $(top_srcdir)/config/m4/sd_triqs.m4 \ + $(top_srcdir)/config/m4/sd_wannier90.m4 \ + $(top_srcdir)/config/m4/sd_xmlf90.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + distdir distdir-am +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +am__DIST_COMMON = $(srcdir)/Makefile.in AUTHORS COPYING ChangeLog \ + INSTALL NEWS README +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ABINIT_BINARY_PACKAGE = @ABINIT_BINARY_PACKAGE@ +ABINIT_COMMON_CPPFLAGS = @ABINIT_COMMON_CPPFLAGS@ +ABINIT_COMMON_FCFLAGS = @ABINIT_COMMON_FCFLAGS@ +ABINIT_COMMON_LDFLAGS = @ABINIT_COMMON_LDFLAGS@ +ABINIT_COMMON_LIBS = @ABINIT_COMMON_LIBS@ +ABINIT_TARGET = @ABINIT_TARGET@ +ABINIT_VERSION = @ABINIT_VERSION@ +ABINIT_VERSION_BASE = @ABINIT_VERSION_BASE@ +ABINIT_VERSION_BUILD = @ABINIT_VERSION_BUILD@ +ABINIT_VERSION_MAJOR = @ABINIT_VERSION_MAJOR@ +ABINIT_VERSION_MICRO = @ABINIT_VERSION_MICRO@ +ABINIT_VERSION_MINOR = @ABINIT_VERSION_MINOR@ +ABI_CPPFLAGS = @ABI_CPPFLAGS@ +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +ARFLAGS = @ARFLAGS@ +ARFLAGS_CMD = @ARFLAGS_CMD@ +ARFLAGS_DEBUG = @ARFLAGS_DEBUG@ +ARFLAGS_EXTRA = @ARFLAGS_EXTRA@ +ARFLAGS_HINTS = @ARFLAGS_HINTS@ +ARFLAGS_OPTIM = @ARFLAGS_OPTIM@ +ATOMPAW_BIN = @ATOMPAW_BIN@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BIGDFT_CPPFLAGS = @BIGDFT_CPPFLAGS@ +BIGDFT_FCFLAGS = @BIGDFT_FCFLAGS@ +BIGDFT_LDFLAGS = @BIGDFT_LDFLAGS@ +BIGDFT_LIBS = @BIGDFT_LIBS@ +BOURNE_SHELL = @BOURNE_SHELL@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CC_LDFLAGS = @CC_LDFLAGS@ +CC_LDFLAGS_DEBUG = @CC_LDFLAGS_DEBUG@ +CC_LDFLAGS_EXTRA = @CC_LDFLAGS_EXTRA@ +CC_LDFLAGS_GPU = @CC_LDFLAGS_GPU@ +CC_LDFLAGS_HINTS = @CC_LDFLAGS_HINTS@ +CC_LDFLAGS_OPTIM = @CC_LDFLAGS_OPTIM@ +CC_LIBS = @CC_LIBS@ +CC_LIBS_DEBUG = @CC_LIBS_DEBUG@ +CC_LIBS_EXTRA = @CC_LIBS_EXTRA@ +CC_LIBS_GPU = @CC_LIBS_GPU@ +CC_LIBS_HINTS = @CC_LIBS_HINTS@ +CC_LIBS_OPTIM = @CC_LIBS_OPTIM@ +CFLAGS = @CFLAGS@ +CFLAGS_DEBUG = @CFLAGS_DEBUG@ +CFLAGS_EXTRA = @CFLAGS_EXTRA@ +CFLAGS_GPU = @CFLAGS_GPU@ +CFLAGS_HINTS = @CFLAGS_HINTS@ +CFLAGS_OPTIM = @CFLAGS_OPTIM@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CPPFLAGS_DEBUG = @CPPFLAGS_DEBUG@ +CPPFLAGS_EXTRA = @CPPFLAGS_EXTRA@ +CPPFLAGS_GPU = @CPPFLAGS_GPU@ +CPPFLAGS_HINTS = @CPPFLAGS_HINTS@ +CPPFLAGS_HINTS_EXT = @CPPFLAGS_HINTS_EXT@ +CPPFLAGS_OPTIM = @CPPFLAGS_OPTIM@ +CXX = @CXX@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CXXFLAGS_DEBUG = @CXXFLAGS_DEBUG@ +CXXFLAGS_EXTRA = @CXXFLAGS_EXTRA@ +CXXFLAGS_GPU = @CXXFLAGS_GPU@ +CXXFLAGS_HINTS = @CXXFLAGS_HINTS@ +CXXFLAGS_OPTIM = @CXXFLAGS_OPTIM@ +CXX_LDFLAGS = @CXX_LDFLAGS@ +CXX_LDFLAGS_DEBUG = @CXX_LDFLAGS_DEBUG@ +CXX_LDFLAGS_EXTRA = @CXX_LDFLAGS_EXTRA@ +CXX_LDFLAGS_GPU = @CXX_LDFLAGS_GPU@ +CXX_LDFLAGS_HINTS = @CXX_LDFLAGS_HINTS@ +CXX_LDFLAGS_OPTIM = @CXX_LDFLAGS_OPTIM@ +CXX_LIBS = @CXX_LIBS@ +CXX_LIBS_DEBUG = @CXX_LIBS_DEBUG@ +CXX_LIBS_EXTRA = @CXX_LIBS_EXTRA@ +CXX_LIBS_GPU = @CXX_LIBS_GPU@ +CXX_LIBS_HINTS = @CXX_LIBS_HINTS@ +CXX_LIBS_OPTIM = @CXX_LIBS_OPTIM@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ +FCFLAGS = @FCFLAGS@ +FCFLAGS_DEBUG = @FCFLAGS_DEBUG@ +FCFLAGS_EXTRA = @FCFLAGS_EXTRA@ +FCFLAGS_F90 = @FCFLAGS_F90@ +FCFLAGS_FIXEDFORM = @FCFLAGS_FIXEDFORM@ +FCFLAGS_FREEFORM = @FCFLAGS_FREEFORM@ +FCFLAGS_HINTS = @FCFLAGS_HINTS@ +FCFLAGS_MODDIR = @FCFLAGS_MODDIR@ +FCFLAGS_OPENMP = @FCFLAGS_OPENMP@ +FCFLAGS_OPENMP_OFFLOAD = @FCFLAGS_OPENMP_OFFLOAD@ +FCFLAGS_OPTIM = @FCFLAGS_OPTIM@ +FCLIBS = @FCLIBS@ +FC_LDFLAGS = @FC_LDFLAGS@ +FC_LDFLAGS_DEBUG = @FC_LDFLAGS_DEBUG@ +FC_LDFLAGS_EXTRA = @FC_LDFLAGS_EXTRA@ +FC_LDFLAGS_HINTS = @FC_LDFLAGS_HINTS@ +FC_LDFLAGS_OPTIM = @FC_LDFLAGS_OPTIM@ +FC_LIBS = @FC_LIBS@ +FC_LIBS_DEBUG = @FC_LIBS_DEBUG@ +FC_LIBS_EXTRA = @FC_LIBS_EXTRA@ +FC_LIBS_HINTS = @FC_LIBS_HINTS@ +FC_LIBS_OPTIM = @FC_LIBS_OPTIM@ +FC_NOWRAP = @FC_NOWRAP@ +FFLAGS = @FFLAGS@ +FFTW3_CFLAGS = @FFTW3_CFLAGS@ +FFTW3_CPPFLAGS = @FFTW3_CPPFLAGS@ +FFTW3_FCFLAGS = @FFTW3_FCFLAGS@ +FFTW3_LDFLAGS = @FFTW3_LDFLAGS@ +FFTW3_LIBS = @FFTW3_LIBS@ +FFT_CFLAGS = @FFT_CFLAGS@ +FFT_FCFLAGS = @FFT_FCFLAGS@ +FPP = @FPP@ +FPPFLAGS = @FPPFLAGS@ +FPPFLAGS_DEBUG = @FPPFLAGS_DEBUG@ +FPPFLAGS_EXTRA = @FPPFLAGS_EXTRA@ +FPPFLAGS_HINTS = @FPPFLAGS_HINTS@ +FPPFLAGS_OPTIM = @FPPFLAGS_OPTIM@ +GPU_ARCH = @GPU_ARCH@ +GPU_CFLAGS = @GPU_CFLAGS@ +GPU_CPPFLAGS = @GPU_CPPFLAGS@ +GPU_CXXFLAGS = @GPU_CXXFLAGS@ +GPU_FCFLAGS = @GPU_FCFLAGS@ +GPU_LDFLAGS = @GPU_LDFLAGS@ +GPU_LIBS = @GPU_LIBS@ +GRAPHATOM_BIN = @GRAPHATOM_BIN@ +GREP = @GREP@ +H5CC = @H5CC@ +HDF5_CFLAGS = @HDF5_CFLAGS@ +HDF5_CPPFLAGS = @HDF5_CPPFLAGS@ +HDF5_CXXFLAGS = @HDF5_CXXFLAGS@ +HDF5_FCFLAGS = @HDF5_FCFLAGS@ +HDF5_LDFLAGS = @HDF5_LDFLAGS@ +HDF5_LIBS = @HDF5_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +LDFLAGS = @LDFLAGS@ +LEVMAR_CFLAGS = @LEVMAR_CFLAGS@ +LEVMAR_CPPFLAGS = @LEVMAR_CPPFLAGS@ +LEVMAR_LDFLAGS = @LEVMAR_LDFLAGS@ +LEVMAR_LIBS = @LEVMAR_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPAW_CPPFLAGS = @LIBPAW_CPPFLAGS@ +LIBPAW_FCFLAGS = @LIBPAW_FCFLAGS@ +LIBPAW_LDFLAGS = @LIBPAW_LDFLAGS@ +LIBPAW_LIBS = @LIBPAW_LIBS@ +LIBPSML_CPPFLAGS = @LIBPSML_CPPFLAGS@ +LIBPSML_FCFLAGS = @LIBPSML_FCFLAGS@ +LIBPSML_LDFLAGS = @LIBPSML_LDFLAGS@ +LIBPSML_LIBS = @LIBPSML_LIBS@ +LIBS = @LIBS@ +LIBXC_CFLAGS = @LIBXC_CFLAGS@ +LIBXC_CPPFLAGS = @LIBXC_CPPFLAGS@ +LIBXC_FCFLAGS = @LIBXC_FCFLAGS@ +LIBXC_LDFLAGS = @LIBXC_LDFLAGS@ +LIBXC_LIBS = @LIBXC_LIBS@ +LIBXML2_CPPFLAGS = @LIBXML2_CPPFLAGS@ +LIBXML2_FCFLAGS = @LIBXML2_FCFLAGS@ +LIBXML2_LIBS = @LIBXML2_LIBS@ +LINALG_CFLAGS = @LINALG_CFLAGS@ +LINALG_CPPFLAGS = @LINALG_CPPFLAGS@ +LINALG_CXXFLAGS = @LINALG_CXXFLAGS@ +LINALG_FCFLAGS = @LINALG_FCFLAGS@ +LINALG_LDFLAGS = @LINALG_LDFLAGS@ +LINALG_LIBS = @LINALG_LIBS@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODEXT = @MODEXT@ +MPI_CFLAGS = @MPI_CFLAGS@ +MPI_CPPFLAGS = @MPI_CPPFLAGS@ +MPI_CXXFLAGS = @MPI_CXXFLAGS@ +MPI_FCFLAGS = @MPI_FCFLAGS@ +MPI_LDFLAGS = @MPI_LDFLAGS@ +MPI_LIBS = @MPI_LIBS@ +MV = @MV@ +NETCDF_CFLAGS = @NETCDF_CFLAGS@ +NETCDF_CPPFLAGS = @NETCDF_CPPFLAGS@ +NETCDF_CXXFLAGS = @NETCDF_CXXFLAGS@ +NETCDF_FCFLAGS = @NETCDF_FCFLAGS@ +NETCDF_FORTRAN_CFLAGS = @NETCDF_FORTRAN_CFLAGS@ +NETCDF_FORTRAN_CPPFLAGS = @NETCDF_FORTRAN_CPPFLAGS@ +NETCDF_FORTRAN_CXXFLAGS = @NETCDF_FORTRAN_CXXFLAGS@ +NETCDF_FORTRAN_FCFLAGS = @NETCDF_FORTRAN_FCFLAGS@ +NETCDF_FORTRAN_LDFLAGS = @NETCDF_FORTRAN_LDFLAGS@ +NETCDF_FORTRAN_LIBS = @NETCDF_FORTRAN_LIBS@ +NETCDF_LDFLAGS = @NETCDF_LDFLAGS@ +NETCDF_LIBS = @NETCDF_LIBS@ +NVCC = @NVCC@ +NVCC_CFLAGS = @NVCC_CFLAGS@ +NVCC_CPPFLAGS = @NVCC_CPPFLAGS@ +NVCC_LDFLAGS = @NVCC_LDFLAGS@ +NVCC_LIBS = @NVCC_LIBS@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PAPI_CFLAGS = @PAPI_CFLAGS@ +PAPI_CPPFLAGS = @PAPI_CPPFLAGS@ +PAPI_LDFLAGS = @PAPI_LDFLAGS@ +PAPI_LIBS = @PAPI_LIBS@ +PATCH = @PATCH@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PFFT_CFLAGS = @PFFT_CFLAGS@ +PFFT_CPPFLAGS = @PFFT_CPPFLAGS@ +PFFT_LDFLAGS = @PFFT_LDFLAGS@ +PFFT_LIBS = @PFFT_LIBS@ +PYFLAGS = @PYFLAGS@ +PYTHON = @PYTHON@ +PYTHON_CONFIG = @PYTHON_CONFIG@ +PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ +RANLIB = @RANLIB@ +REALPATH = @REALPATH@ +RM = @RM@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +TAR = @TAR@ +TRIQS_CFLAGS = @TRIQS_CFLAGS@ +TRIQS_CPPFLAGS = @TRIQS_CPPFLAGS@ +TRIQS_CXXFLAGS = @TRIQS_CXXFLAGS@ +TRIQS_LDFLAGS = @TRIQS_LDFLAGS@ +TRIQS_LIBS = @TRIQS_LIBS@ +TRUE_CPP = @TRUE_CPP@ +VERSION = @VERSION@ +WANNIER90_CPPFLAGS = @WANNIER90_CPPFLAGS@ +WANNIER90_FCFLAGS = @WANNIER90_FCFLAGS@ +WANNIER90_LDFLAGS = @WANNIER90_LDFLAGS@ +WANNIER90_LIBS = @WANNIER90_LIBS@ +XML2_CONFIG = @XML2_CONFIG@ +XMLF90_CPPFLAGS = @XMLF90_CPPFLAGS@ +XMLF90_FCFLAGS = @XMLF90_FCFLAGS@ +XMLF90_LDFLAGS = @XMLF90_LDFLAGS@ +XMLF90_LIBS = @XMLF90_LIBS@ +XML_CPPFLAGS = @XML_CPPFLAGS@ +XML_LIBS = @XML_LIBS@ +XPP = @XPP@ +XPPFLAGS = @XPPFLAGS@ +XPPFLAGS_DEBUG = @XPPFLAGS_DEBUG@ +XPPFLAGS_EXTRA = @XPPFLAGS_EXTRA@ +XPPFLAGS_OPTIM = @XPPFLAGS_OPTIM@ +YAKL_CPPFLAGS = @YAKL_CPPFLAGS@ +YAKL_FCFLAGS = @YAKL_FCFLAGS@ +YAKL_LDFLAGS = @YAKL_LDFLAGS@ +YAKL_LIBS = @YAKL_LIBS@ +abi_ac_distcheck = @abi_ac_distcheck@ +abi_ac_version = @abi_ac_version@ +abi_am_version = @abi_am_version@ +abi_avx_safe_mode_enable = @abi_avx_safe_mode_enable@ +abi_bse_unpacked_enable = @abi_bse_unpacked_enable@ +abi_cc_path = @abi_cc_path@ +abi_cc_vendor = @abi_cc_vendor@ +abi_cc_version = @abi_cc_version@ +abi_cclock_enable = @abi_cclock_enable@ +abi_cpp_path = @abi_cpp_path@ +abi_cpu_64bits = @abi_cpu_64bits@ +abi_cpu_bits = @abi_cpu_bits@ +abi_cpu_model = @abi_cpu_model@ +abi_cpu_platform = @abi_cpu_platform@ +abi_cpu_spec = @abi_cpu_spec@ +abi_cpu_vendor = @abi_cpu_vendor@ +abi_crpa_optim_enable = @abi_crpa_optim_enable@ +abi_cxx_path = @abi_cxx_path@ +abi_cxx_vendor = @abi_cxx_vendor@ +abi_cxx_version = @abi_cxx_version@ +abi_debug_flavor = @abi_debug_flavor@ +abi_exports_enable = @abi_exports_enable@ +abi_fbk_abinit_common_ok = @abi_fbk_abinit_common_ok@ +abi_fbk_bigdft_ok = @abi_fbk_bigdft_ok@ +abi_fbk_config = @abi_fbk_config@ +abi_fbk_enable = @abi_fbk_enable@ +abi_fbk_fft_ok = @abi_fbk_fft_ok@ +abi_fbk_fftw3_ok = @abi_fbk_fftw3_ok@ +abi_fbk_gpu_ok = @abi_fbk_gpu_ok@ +abi_fbk_hdf5_ok = @abi_fbk_hdf5_ok@ +abi_fbk_init = @abi_fbk_init@ +abi_fbk_kokkos_ok = @abi_fbk_kokkos_ok@ +abi_fbk_levmar_ok = @abi_fbk_levmar_ok@ +abi_fbk_libpaw_ok = @abi_fbk_libpaw_ok@ +abi_fbk_libpsml_ok = @abi_fbk_libpsml_ok@ +abi_fbk_libxc_ok = @abi_fbk_libxc_ok@ +abi_fbk_libxml2_ok = @abi_fbk_libxml2_ok@ +abi_fbk_linalg_ok = @abi_fbk_linalg_ok@ +abi_fbk_list = @abi_fbk_list@ +abi_fbk_mpi_ok = @abi_fbk_mpi_ok@ +abi_fbk_netcdf_fortran_ok = @abi_fbk_netcdf_fortran_ok@ +abi_fbk_netcdf_ok = @abi_fbk_netcdf_ok@ +abi_fbk_papi_ok = @abi_fbk_papi_ok@ +abi_fbk_pfft_ok = @abi_fbk_pfft_ok@ +abi_fbk_prefix = @abi_fbk_prefix@ +abi_fbk_required = @abi_fbk_required@ +abi_fbk_triqs_ok = @abi_fbk_triqs_ok@ +abi_fbk_wannier90_ok = @abi_fbk_wannier90_ok@ +abi_fbk_xmlf90_ok = @abi_fbk_xmlf90_ok@ +abi_fbk_yakl_ok = @abi_fbk_yakl_ok@ +abi_fc_path = @abi_fc_path@ +abi_fc_vendor = @abi_fc_vendor@ +abi_fc_version = @abi_fc_version@ +abi_fc_wrap = @abi_fc_wrap@ +abi_fc_wrapper_enable = @abi_fc_wrapper_enable@ +abi_fpp_path = @abi_fpp_path@ +abi_gpu_arch = @abi_gpu_arch@ +abi_gpu_fcflags = @abi_gpu_fcflags@ +abi_gpu_flavor = @abi_gpu_flavor@ +abi_gpu_hip_libdir = @abi_gpu_hip_libdir@ +abi_gpu_incs = @abi_gpu_incs@ +abi_gpu_ldflags = @abi_gpu_ldflags@ +abi_gpu_libs = @abi_gpu_libs@ +abi_gpu_nvtx_v3 = @abi_gpu_nvtx_v3@ +abi_gpu_roctx = @abi_gpu_roctx@ +abi_gw_dpc_enable = @abi_gw_dpc_enable@ +abi_hints_enable = @abi_hints_enable@ +abi_libtetra_enable = @abi_libtetra_enable@ +abi_libxml2_cppflags = @abi_libxml2_cppflags@ +abi_libxml2_enable = @abi_libxml2_enable@ +abi_libxml2_fcflags = @abi_libxml2_fcflags@ +abi_libxml2_init = @abi_libxml2_init@ +abi_libxml2_ldflags = @abi_libxml2_ldflags@ +abi_libxml2_libs = @abi_libxml2_libs@ +abi_libxml2_ok = @abi_libxml2_ok@ +abi_libxml2_prefix = @abi_libxml2_prefix@ +abi_lotf_enable = @abi_lotf_enable@ +abi_lt_version = @abi_lt_version@ +abi_m4_version = @abi_m4_version@ +abi_memory_profiling_enable = @abi_memory_profiling_enable@ +abi_mpi_cflags = @abi_mpi_cflags@ +abi_mpi_cppflags = @abi_mpi_cppflags@ +abi_mpi_cxxflags = @abi_mpi_cxxflags@ +abi_mpi_enable = @abi_mpi_enable@ +abi_mpi_fcflags = @abi_mpi_fcflags@ +abi_mpi_flavor = @abi_mpi_flavor@ +abi_mpi_gpu_aware_enable = @abi_mpi_gpu_aware_enable@ +abi_mpi_incs = @abi_mpi_incs@ +abi_mpi_inplace_enable = @abi_mpi_inplace_enable@ +abi_mpi_interfaces_bugfix_enable = @abi_mpi_interfaces_bugfix_enable@ +abi_mpi_io_default_enable = @abi_mpi_io_default_enable@ +abi_mpi_io_enable = @abi_mpi_io_enable@ +abi_mpi_ldflags = @abi_mpi_ldflags@ +abi_mpi_level = @abi_mpi_level@ +abi_mpi_libs = @abi_mpi_libs@ +abi_netcdf_default_enable = @abi_netcdf_default_enable@ +abi_openmp_enable = @abi_openmp_enable@ +abi_openmp_offload_enable = @abi_openmp_offload_enable@ +abi_optim_flavor = @abi_optim_flavor@ +abi_python_invocation_enable = @abi_python_invocation_enable@ +abi_source_debug_enable = @abi_source_debug_enable@ +abi_stdin_enable = @abi_stdin_enable@ +abi_sys_spec = @abi_sys_spec@ +abi_timer_enable = @abi_timer_enable@ +abi_triqs_v1_4_enable = @abi_triqs_v1_4_enable@ +abi_triqs_v2_0_enable = @abi_triqs_v2_0_enable@ +abi_zdot_bugfix_enable = @abi_zdot_bugfix_enable@ +abinit_bindir = @abinit_bindir@ +abinit_builddir = @abinit_builddir@ +abinit_chkdir = @abinit_chkdir@ +abinit_datdir = @abinit_datdir@ +abinit_docdir = @abinit_docdir@ +abinit_incdir = @abinit_incdir@ +abinit_libdir = @abinit_libdir@ +abinit_mandir = @abinit_mandir@ +abinit_prefix = @abinit_prefix@ +abinit_srcdir = @abinit_srcdir@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_FC = @ac_ct_FC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cc_info_string = @cc_info_string@ +cxx_info_string = @cxx_info_string@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +enable_avx_safe_mode = @enable_avx_safe_mode@ +enable_bse_unpacked = @enable_bse_unpacked@ +enable_cclock = @enable_cclock@ +enable_crpa_optim = @enable_crpa_optim@ +enable_exports = @enable_exports@ +enable_fc_wrapper = @enable_fc_wrapper@ +enable_gw_dpc = @enable_gw_dpc@ +enable_hints = @enable_hints@ +enable_libtetra = @enable_libtetra@ +enable_lotf = @enable_lotf@ +enable_memory_profiling = @enable_memory_profiling@ +enable_mpi_gpu_aware = @enable_mpi_gpu_aware@ +enable_mpi_inplace = @enable_mpi_inplace@ +enable_mpi_interfaces_bugfix = @enable_mpi_interfaces_bugfix@ +enable_mpi_io = @enable_mpi_io@ +enable_mpi_io_default = @enable_mpi_io_default@ +enable_netcdf_default = @enable_netcdf_default@ +enable_openmp = @enable_openmp@ +enable_openmp_offload = @enable_openmp_offload@ +enable_python_invocation = @enable_python_invocation@ +enable_shared = @enable_shared@ +enable_source_debug = @enable_source_debug@ +enable_static = @enable_static@ +enable_stdin = @enable_stdin@ +enable_timer = @enable_timer@ +enable_triqs_v1_4 = @enable_triqs_v1_4@ +enable_triqs_v2_0 = @enable_triqs_v2_0@ +enable_zdot_bugfix = @enable_zdot_bugfix@ +exec_prefix = @exec_prefix@ +fc_info_string = @fc_info_string@ +fc_mod_fcflags = @fc_mod_fcflags@ +fc_timing = @fc_timing@ +fcflags_opt_02_clib = @fcflags_opt_02_clib@ +fcflags_opt_10_defs = @fcflags_opt_10_defs@ +fcflags_opt_11_memory_mpi = @fcflags_opt_11_memory_mpi@ +fcflags_opt_12_hide_mpi = @fcflags_opt_12_hide_mpi@ +fcflags_opt_14_hidewrite = @fcflags_opt_14_hidewrite@ +fcflags_opt_16_hideleave = @fcflags_opt_16_hideleave@ +fcflags_opt_16_kokkos_toolbox = @fcflags_opt_16_kokkos_toolbox@ +fcflags_opt_17_gpu_toolbox = @fcflags_opt_17_gpu_toolbox@ +fcflags_opt_17_libtetra_ext = @fcflags_opt_17_libtetra_ext@ +fcflags_opt_17_minimax = @fcflags_opt_17_minimax@ +fcflags_opt_17_yaml_out = @fcflags_opt_17_yaml_out@ +fcflags_opt_18_timing = @fcflags_opt_18_timing@ +fcflags_opt_21_hashfuncs = @fcflags_opt_21_hashfuncs@ +fcflags_opt_27_toolbox_oop = @fcflags_opt_27_toolbox_oop@ +fcflags_opt_28_numeric_noabirule = @fcflags_opt_28_numeric_noabirule@ +fcflags_opt_29_kpoints = @fcflags_opt_29_kpoints@ +fcflags_opt_32_util = @fcflags_opt_32_util@ +fcflags_opt_33_xc_lowlevel = @fcflags_opt_33_xc_lowlevel@ +fcflags_opt_39_libpaw = @fcflags_opt_39_libpaw@ +fcflags_opt_41_geometry = @fcflags_opt_41_geometry@ +fcflags_opt_42_nlstrain = @fcflags_opt_42_nlstrain@ +fcflags_opt_42_parser = @fcflags_opt_42_parser@ +fcflags_opt_43_ptgroups = @fcflags_opt_43_ptgroups@ +fcflags_opt_43_wvl_wrappers = @fcflags_opt_43_wvl_wrappers@ +fcflags_opt_44_abitools = @fcflags_opt_44_abitools@ +fcflags_opt_44_abitypes_defs = @fcflags_opt_44_abitypes_defs@ +fcflags_opt_44_manage_kokkos = @fcflags_opt_44_manage_kokkos@ +fcflags_opt_45_geomoptim = @fcflags_opt_45_geomoptim@ +fcflags_opt_45_xgTools = @fcflags_opt_45_xgTools@ +fcflags_opt_46_ghc_omp = @fcflags_opt_46_ghc_omp@ +fcflags_opt_46_manage_cuda = @fcflags_opt_46_manage_cuda@ +fcflags_opt_48_diago = @fcflags_opt_48_diago@ +fcflags_opt_49_gw_toolbox_oop = @fcflags_opt_49_gw_toolbox_oop@ +fcflags_opt_51_manage_mpi = @fcflags_opt_51_manage_mpi@ +fcflags_opt_52_fft_mpi_noabirule = @fcflags_opt_52_fft_mpi_noabirule@ +fcflags_opt_53_ffts = @fcflags_opt_53_ffts@ +fcflags_opt_54_spacepar = @fcflags_opt_54_spacepar@ +fcflags_opt_55_abiutil = @fcflags_opt_55_abiutil@ +fcflags_opt_56_io_mpi = @fcflags_opt_56_io_mpi@ +fcflags_opt_56_mixing = @fcflags_opt_56_mixing@ +fcflags_opt_56_recipspace = @fcflags_opt_56_recipspace@ +fcflags_opt_56_xc = @fcflags_opt_56_xc@ +fcflags_opt_57_iopsp_parser = @fcflags_opt_57_iopsp_parser@ +fcflags_opt_57_iovars = @fcflags_opt_57_iovars@ +fcflags_opt_61_occeig = @fcflags_opt_61_occeig@ +fcflags_opt_62_cg_noabirule = @fcflags_opt_62_cg_noabirule@ +fcflags_opt_62_ctqmc = @fcflags_opt_62_ctqmc@ +fcflags_opt_62_iowfdenpot = @fcflags_opt_62_iowfdenpot@ +fcflags_opt_62_poisson = @fcflags_opt_62_poisson@ +fcflags_opt_62_wvl_wfs = @fcflags_opt_62_wvl_wfs@ +fcflags_opt_64_psp = @fcflags_opt_64_psp@ +fcflags_opt_65_lotf_base = @fcflags_opt_65_lotf_base@ +fcflags_opt_65_paw = @fcflags_opt_65_paw@ +fcflags_opt_66_nonlocal = @fcflags_opt_66_nonlocal@ +fcflags_opt_66_vdwxc = @fcflags_opt_66_vdwxc@ +fcflags_opt_66_wfs = @fcflags_opt_66_wfs@ +fcflags_opt_67_common = @fcflags_opt_67_common@ +fcflags_opt_67_python_invocation_ext = @fcflags_opt_67_python_invocation_ext@ +fcflags_opt_67_triqs_ext = @fcflags_opt_67_triqs_ext@ +fcflags_opt_68_dmft = @fcflags_opt_68_dmft@ +fcflags_opt_68_lotf = @fcflags_opt_68_lotf@ +fcflags_opt_68_recursion = @fcflags_opt_68_recursion@ +fcflags_opt_68_rsprc = @fcflags_opt_68_rsprc@ +fcflags_opt_69_wfdesc = @fcflags_opt_69_wfdesc@ +fcflags_opt_70_gw = @fcflags_opt_70_gw@ +fcflags_opt_71_bse = @fcflags_opt_71_bse@ +fcflags_opt_71_wannier = @fcflags_opt_71_wannier@ +fcflags_opt_72_response = @fcflags_opt_72_response@ +fcflags_opt_77_ddb = @fcflags_opt_77_ddb@ +fcflags_opt_77_suscep = @fcflags_opt_77_suscep@ +fcflags_opt_78_effpot = @fcflags_opt_78_effpot@ +fcflags_opt_78_eph = @fcflags_opt_78_eph@ +fcflags_opt_79_seqpar_mpi = @fcflags_opt_79_seqpar_mpi@ +fcflags_opt_80_rttddft = @fcflags_opt_80_rttddft@ +fcflags_opt_80_tdep = @fcflags_opt_80_tdep@ +fcflags_opt_94_scfcv = @fcflags_opt_94_scfcv@ +fcflags_opt_95_drive = @fcflags_opt_95_drive@ +fcflags_opt_98_main = @fcflags_opt_98_main@ +fcflags_opt_bigdft = @fcflags_opt_bigdft@ +fcflags_opt_default = @fcflags_opt_default@ +fcflags_opt_hdf5 = @fcflags_opt_hdf5@ +fcflags_opt_levmar = @fcflags_opt_levmar@ +fcflags_opt_libpsml = @fcflags_opt_libpsml@ +fcflags_opt_libxc = @fcflags_opt_libxc@ +fcflags_opt_libxml2 = @fcflags_opt_libxml2@ +fcflags_opt_linalg = @fcflags_opt_linalg@ +fcflags_opt_netcdf = @fcflags_opt_netcdf@ +fcflags_opt_netcdf_fortran = @fcflags_opt_netcdf_fortran@ +fcflags_opt_papi = @fcflags_opt_papi@ +fcflags_opt_triqs = @fcflags_opt_triqs@ +fcflags_opt_wannier90 = @fcflags_opt_wannier90@ +fcflags_opt_xmlf90 = @fcflags_opt_xmlf90@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sd_abinit_common_cppflags = @sd_abinit_common_cppflags@ +sd_abinit_common_enable = @sd_abinit_common_enable@ +sd_abinit_common_enable_def = @sd_abinit_common_enable_def@ +sd_abinit_common_fcflags = @sd_abinit_common_fcflags@ +sd_abinit_common_init = @sd_abinit_common_init@ +sd_abinit_common_ldflags = @sd_abinit_common_ldflags@ +sd_abinit_common_libs = @sd_abinit_common_libs@ +sd_abinit_common_ok = @sd_abinit_common_ok@ +sd_abinit_common_options = @sd_abinit_common_options@ +sd_abinit_common_policy = @sd_abinit_common_policy@ +sd_abinit_common_status = @sd_abinit_common_status@ +sd_bigdft_cppflags = @sd_bigdft_cppflags@ +sd_bigdft_enable = @sd_bigdft_enable@ +sd_bigdft_enable_def = @sd_bigdft_enable_def@ +sd_bigdft_fcflags = @sd_bigdft_fcflags@ +sd_bigdft_init = @sd_bigdft_init@ +sd_bigdft_ldflags = @sd_bigdft_ldflags@ +sd_bigdft_libs = @sd_bigdft_libs@ +sd_bigdft_ok = @sd_bigdft_ok@ +sd_bigdft_options = @sd_bigdft_options@ +sd_bigdft_policy = @sd_bigdft_policy@ +sd_bigdft_status = @sd_bigdft_status@ +sd_fft_cflags = @sd_fft_cflags@ +sd_fft_choices = @sd_fft_choices@ +sd_fft_cppflags = @sd_fft_cppflags@ +sd_fft_cxxflags = @sd_fft_cxxflags@ +sd_fft_enable = @sd_fft_enable@ +sd_fft_fcflags = @sd_fft_fcflags@ +sd_fft_flavor = @sd_fft_flavor@ +sd_fft_init = @sd_fft_init@ +sd_fft_ldflags = @sd_fft_ldflags@ +sd_fft_libs = @sd_fft_libs@ +sd_fft_ok = @sd_fft_ok@ +sd_fftw3_cflags = @sd_fftw3_cflags@ +sd_fftw3_cppflags = @sd_fftw3_cppflags@ +sd_fftw3_enable = @sd_fftw3_enable@ +sd_fftw3_enable_def = @sd_fftw3_enable_def@ +sd_fftw3_fcflags = @sd_fftw3_fcflags@ +sd_fftw3_init = @sd_fftw3_init@ +sd_fftw3_ldflags = @sd_fftw3_ldflags@ +sd_fftw3_libs = @sd_fftw3_libs@ +sd_fftw3_ok = @sd_fftw3_ok@ +sd_fftw3_options = @sd_fftw3_options@ +sd_fftw3_policy = @sd_fftw3_policy@ +sd_fftw3_status = @sd_fftw3_status@ +sd_gpu_cflags = @sd_gpu_cflags@ +sd_gpu_cppflags = @sd_gpu_cppflags@ +sd_gpu_cxxflags = @sd_gpu_cxxflags@ +sd_gpu_enable = @sd_gpu_enable@ +sd_gpu_enable_def = @sd_gpu_enable_def@ +sd_gpu_fcflags = @sd_gpu_fcflags@ +sd_gpu_init = @sd_gpu_init@ +sd_gpu_ldflags = @sd_gpu_ldflags@ +sd_gpu_libs = @sd_gpu_libs@ +sd_gpu_ok = @sd_gpu_ok@ +sd_gpu_options = @sd_gpu_options@ +sd_gpu_policy = @sd_gpu_policy@ +sd_gpu_prefix = @sd_gpu_prefix@ +sd_gpu_status = @sd_gpu_status@ +sd_hdf5_cflags = @sd_hdf5_cflags@ +sd_hdf5_cppflags = @sd_hdf5_cppflags@ +sd_hdf5_cxxflags = @sd_hdf5_cxxflags@ +sd_hdf5_enable = @sd_hdf5_enable@ +sd_hdf5_enable_def = @sd_hdf5_enable_def@ +sd_hdf5_enable_fc = @sd_hdf5_enable_fc@ +sd_hdf5_fcflags = @sd_hdf5_fcflags@ +sd_hdf5_h5cc = @sd_hdf5_h5cc@ +sd_hdf5_h5fc = @sd_hdf5_h5fc@ +sd_hdf5_init = @sd_hdf5_init@ +sd_hdf5_ldflags = @sd_hdf5_ldflags@ +sd_hdf5_libs = @sd_hdf5_libs@ +sd_hdf5_ok = @sd_hdf5_ok@ +sd_hdf5_options = @sd_hdf5_options@ +sd_hdf5_policy = @sd_hdf5_policy@ +sd_hdf5_status = @sd_hdf5_status@ +sd_kokkos_cppflags = @sd_kokkos_cppflags@ +sd_kokkos_cxxflags = @sd_kokkos_cxxflags@ +sd_kokkos_enable = @sd_kokkos_enable@ +sd_kokkos_enable_def = @sd_kokkos_enable_def@ +sd_kokkos_init = @sd_kokkos_init@ +sd_kokkos_ldflags = @sd_kokkos_ldflags@ +sd_kokkos_libs = @sd_kokkos_libs@ +sd_kokkos_ok = @sd_kokkos_ok@ +sd_kokkos_options = @sd_kokkos_options@ +sd_kokkos_policy = @sd_kokkos_policy@ +sd_kokkos_status = @sd_kokkos_status@ +sd_levmar_cflags = @sd_levmar_cflags@ +sd_levmar_cppflags = @sd_levmar_cppflags@ +sd_levmar_enable = @sd_levmar_enable@ +sd_levmar_enable_def = @sd_levmar_enable_def@ +sd_levmar_init = @sd_levmar_init@ +sd_levmar_ldflags = @sd_levmar_ldflags@ +sd_levmar_libs = @sd_levmar_libs@ +sd_levmar_ok = @sd_levmar_ok@ +sd_levmar_options = @sd_levmar_options@ +sd_levmar_policy = @sd_levmar_policy@ +sd_levmar_status = @sd_levmar_status@ +sd_libpaw_cppflags = @sd_libpaw_cppflags@ +sd_libpaw_enable = @sd_libpaw_enable@ +sd_libpaw_enable_def = @sd_libpaw_enable_def@ +sd_libpaw_fcflags = @sd_libpaw_fcflags@ +sd_libpaw_init = @sd_libpaw_init@ +sd_libpaw_ldflags = @sd_libpaw_ldflags@ +sd_libpaw_libs = @sd_libpaw_libs@ +sd_libpaw_ok = @sd_libpaw_ok@ +sd_libpaw_options = @sd_libpaw_options@ +sd_libpaw_policy = @sd_libpaw_policy@ +sd_libpaw_status = @sd_libpaw_status@ +sd_libpsml_cppflags = @sd_libpsml_cppflags@ +sd_libpsml_enable = @sd_libpsml_enable@ +sd_libpsml_enable_def = @sd_libpsml_enable_def@ +sd_libpsml_fcflags = @sd_libpsml_fcflags@ +sd_libpsml_init = @sd_libpsml_init@ +sd_libpsml_ldflags = @sd_libpsml_ldflags@ +sd_libpsml_libs = @sd_libpsml_libs@ +sd_libpsml_ok = @sd_libpsml_ok@ +sd_libpsml_options = @sd_libpsml_options@ +sd_libpsml_policy = @sd_libpsml_policy@ +sd_libpsml_status = @sd_libpsml_status@ +sd_libxc_cflags = @sd_libxc_cflags@ +sd_libxc_cppflags = @sd_libxc_cppflags@ +sd_libxc_enable = @sd_libxc_enable@ +sd_libxc_enable_def = @sd_libxc_enable_def@ +sd_libxc_enable_fc = @sd_libxc_enable_fc@ +sd_libxc_fcflags = @sd_libxc_fcflags@ +sd_libxc_init = @sd_libxc_init@ +sd_libxc_ldflags = @sd_libxc_ldflags@ +sd_libxc_libs = @sd_libxc_libs@ +sd_libxc_ok = @sd_libxc_ok@ +sd_libxc_options = @sd_libxc_options@ +sd_libxc_policy = @sd_libxc_policy@ +sd_libxc_status = @sd_libxc_status@ +sd_linalg_cflags = @sd_linalg_cflags@ +sd_linalg_choices = @sd_linalg_choices@ +sd_linalg_cppflags = @sd_linalg_cppflags@ +sd_linalg_cxxflags = @sd_linalg_cxxflags@ +sd_linalg_enable = @sd_linalg_enable@ +sd_linalg_fcflags = @sd_linalg_fcflags@ +sd_linalg_flavor = @sd_linalg_flavor@ +sd_linalg_has_elpa = @sd_linalg_has_elpa@ +sd_linalg_has_scalapack = @sd_linalg_has_scalapack@ +sd_linalg_init = @sd_linalg_init@ +sd_linalg_ldflags = @sd_linalg_ldflags@ +sd_linalg_libs = @sd_linalg_libs@ +sd_linalg_ok = @sd_linalg_ok@ +sd_mpi_cc = @sd_mpi_cc@ +sd_mpi_cflags = @sd_mpi_cflags@ +sd_mpi_cppflags = @sd_mpi_cppflags@ +sd_mpi_cxx = @sd_mpi_cxx@ +sd_mpi_enable = @sd_mpi_enable@ +sd_mpi_enable_cxx = @sd_mpi_enable_cxx@ +sd_mpi_enable_def = @sd_mpi_enable_def@ +sd_mpi_enable_fc = @sd_mpi_enable_fc@ +sd_mpi_fc = @sd_mpi_fc@ +sd_mpi_fcflags = @sd_mpi_fcflags@ +sd_mpi_init = @sd_mpi_init@ +sd_mpi_ldflags = @sd_mpi_ldflags@ +sd_mpi_libs = @sd_mpi_libs@ +sd_mpi_ok = @sd_mpi_ok@ +sd_mpi_options = @sd_mpi_options@ +sd_mpi_policy = @sd_mpi_policy@ +sd_mpi_status = @sd_mpi_status@ +sd_netcdf_cflags = @sd_netcdf_cflags@ +sd_netcdf_cppflags = @sd_netcdf_cppflags@ +sd_netcdf_enable = @sd_netcdf_enable@ +sd_netcdf_enable_def = @sd_netcdf_enable_def@ +sd_netcdf_fcflags = @sd_netcdf_fcflags@ +sd_netcdf_fortran_cflags = @sd_netcdf_fortran_cflags@ +sd_netcdf_fortran_cppflags = @sd_netcdf_fortran_cppflags@ +sd_netcdf_fortran_enable = @sd_netcdf_fortran_enable@ +sd_netcdf_fortran_enable_def = @sd_netcdf_fortran_enable_def@ +sd_netcdf_fortran_fcflags = @sd_netcdf_fortran_fcflags@ +sd_netcdf_fortran_init = @sd_netcdf_fortran_init@ +sd_netcdf_fortran_ldflags = @sd_netcdf_fortran_ldflags@ +sd_netcdf_fortran_libs = @sd_netcdf_fortran_libs@ +sd_netcdf_fortran_ok = @sd_netcdf_fortran_ok@ +sd_netcdf_fortran_options = @sd_netcdf_fortran_options@ +sd_netcdf_fortran_policy = @sd_netcdf_fortran_policy@ +sd_netcdf_fortran_status = @sd_netcdf_fortran_status@ +sd_netcdf_init = @sd_netcdf_init@ +sd_netcdf_ldflags = @sd_netcdf_ldflags@ +sd_netcdf_libs = @sd_netcdf_libs@ +sd_netcdf_ok = @sd_netcdf_ok@ +sd_netcdf_options = @sd_netcdf_options@ +sd_netcdf_policy = @sd_netcdf_policy@ +sd_netcdf_status = @sd_netcdf_status@ +sd_papi_cflags = @sd_papi_cflags@ +sd_papi_cppflags = @sd_papi_cppflags@ +sd_papi_enable = @sd_papi_enable@ +sd_papi_enable_def = @sd_papi_enable_def@ +sd_papi_init = @sd_papi_init@ +sd_papi_ldflags = @sd_papi_ldflags@ +sd_papi_libs = @sd_papi_libs@ +sd_papi_ok = @sd_papi_ok@ +sd_papi_options = @sd_papi_options@ +sd_papi_policy = @sd_papi_policy@ +sd_papi_sd_papi_fcflags = @sd_papi_sd_papi_fcflags@ +sd_papi_status = @sd_papi_status@ +sd_pfft_cflags = @sd_pfft_cflags@ +sd_pfft_cppflags = @sd_pfft_cppflags@ +sd_pfft_enable = @sd_pfft_enable@ +sd_pfft_enable_def = @sd_pfft_enable_def@ +sd_pfft_init = @sd_pfft_init@ +sd_pfft_ldflags = @sd_pfft_ldflags@ +sd_pfft_libs = @sd_pfft_libs@ +sd_pfft_ok = @sd_pfft_ok@ +sd_pfft_options = @sd_pfft_options@ +sd_pfft_policy = @sd_pfft_policy@ +sd_pfft_status = @sd_pfft_status@ +sd_sys_fcflags = @sd_sys_fcflags@ +sd_triqs_cflags = @sd_triqs_cflags@ +sd_triqs_cppflags = @sd_triqs_cppflags@ +sd_triqs_cxxflags = @sd_triqs_cxxflags@ +sd_triqs_enable = @sd_triqs_enable@ +sd_triqs_enable_def = @sd_triqs_enable_def@ +sd_triqs_fcflags = @sd_triqs_fcflags@ +sd_triqs_init = @sd_triqs_init@ +sd_triqs_ldflags = @sd_triqs_ldflags@ +sd_triqs_libs = @sd_triqs_libs@ +sd_triqs_ok = @sd_triqs_ok@ +sd_triqs_options = @sd_triqs_options@ +sd_triqs_policy = @sd_triqs_policy@ +sd_triqs_status = @sd_triqs_status@ +sd_wannier90_cppflags = @sd_wannier90_cppflags@ +sd_wannier90_enable = @sd_wannier90_enable@ +sd_wannier90_enable_def = @sd_wannier90_enable_def@ +sd_wannier90_fcflags = @sd_wannier90_fcflags@ +sd_wannier90_init = @sd_wannier90_init@ +sd_wannier90_ldflags = @sd_wannier90_ldflags@ +sd_wannier90_libs = @sd_wannier90_libs@ +sd_wannier90_ok = @sd_wannier90_ok@ +sd_wannier90_options = @sd_wannier90_options@ +sd_wannier90_policy = @sd_wannier90_policy@ +sd_wannier90_status = @sd_wannier90_status@ +sd_xmlf90_cppflags = @sd_xmlf90_cppflags@ +sd_xmlf90_enable = @sd_xmlf90_enable@ +sd_xmlf90_enable_def = @sd_xmlf90_enable_def@ +sd_xmlf90_fcflags = @sd_xmlf90_fcflags@ +sd_xmlf90_init = @sd_xmlf90_init@ +sd_xmlf90_ldflags = @sd_xmlf90_ldflags@ +sd_xmlf90_libs = @sd_xmlf90_libs@ +sd_xmlf90_ok = @sd_xmlf90_ok@ +sd_xmlf90_options = @sd_xmlf90_options@ +sd_xmlf90_policy = @sd_xmlf90_policy@ +sd_xmlf90_status = @sd_xmlf90_status@ +sd_yakl_cppflags = @sd_yakl_cppflags@ +sd_yakl_enable = @sd_yakl_enable@ +sd_yakl_enable_def = @sd_yakl_enable_def@ +sd_yakl_fcflags = @sd_yakl_fcflags@ +sd_yakl_init = @sd_yakl_init@ +sd_yakl_ldflags = @sd_yakl_ldflags@ +sd_yakl_libs = @sd_yakl_libs@ +sd_yakl_ok = @sd_yakl_ok@ +sd_yakl_options = @sd_yakl_options@ +sd_yakl_policy = @sd_yakl_policy@ +sd_yakl_status = @sd_yakl_status@ +sharedstatedir = @sharedstatedir@ +src_02_clib_fcflags = @src_02_clib_fcflags@ +src_10_defs_fcflags = @src_10_defs_fcflags@ +src_11_memory_mpi_fcflags = @src_11_memory_mpi_fcflags@ +src_12_hide_mpi_fcflags = @src_12_hide_mpi_fcflags@ +src_14_hidewrite_fcflags = @src_14_hidewrite_fcflags@ +src_16_hideleave_fcflags = @src_16_hideleave_fcflags@ +src_16_kokkos_toolbox_fcflags = @src_16_kokkos_toolbox_fcflags@ +src_17_gpu_toolbox_fcflags = @src_17_gpu_toolbox_fcflags@ +src_17_libtetra_ext_fcflags = @src_17_libtetra_ext_fcflags@ +src_17_minimax_fcflags = @src_17_minimax_fcflags@ +src_17_yaml_out_fcflags = @src_17_yaml_out_fcflags@ +src_18_timing_fcflags = @src_18_timing_fcflags@ +src_21_hashfuncs_fcflags = @src_21_hashfuncs_fcflags@ +src_27_toolbox_oop_fcflags = @src_27_toolbox_oop_fcflags@ +src_28_numeric_noabirule_fcflags = @src_28_numeric_noabirule_fcflags@ +src_29_kpoints_fcflags = @src_29_kpoints_fcflags@ +src_32_util_fcflags = @src_32_util_fcflags@ +src_33_xc_lowlevel_fcflags = @src_33_xc_lowlevel_fcflags@ +src_39_libpaw_fcflags = @src_39_libpaw_fcflags@ +src_41_geometry_fcflags = @src_41_geometry_fcflags@ +src_42_nlstrain_fcflags = @src_42_nlstrain_fcflags@ +src_42_parser_fcflags = @src_42_parser_fcflags@ +src_43_ptgroups_fcflags = @src_43_ptgroups_fcflags@ +src_43_wvl_wrappers_fcflags = @src_43_wvl_wrappers_fcflags@ +src_44_abitools_fcflags = @src_44_abitools_fcflags@ +src_44_abitypes_defs_fcflags = @src_44_abitypes_defs_fcflags@ +src_44_manage_kokkos_fcflags = @src_44_manage_kokkos_fcflags@ +src_45_geomoptim_fcflags = @src_45_geomoptim_fcflags@ +src_45_xgTools_fcflags = @src_45_xgTools_fcflags@ +src_46_ghc_omp_fcflags = @src_46_ghc_omp_fcflags@ +src_46_manage_cuda_fcflags = @src_46_manage_cuda_fcflags@ +src_48_diago_fcflags = @src_48_diago_fcflags@ +src_49_gw_toolbox_oop_fcflags = @src_49_gw_toolbox_oop_fcflags@ +src_51_manage_mpi_fcflags = @src_51_manage_mpi_fcflags@ +src_52_fft_mpi_noabirule_fcflags = @src_52_fft_mpi_noabirule_fcflags@ +src_53_ffts_fcflags = @src_53_ffts_fcflags@ +src_54_spacepar_fcflags = @src_54_spacepar_fcflags@ +src_55_abiutil_fcflags = @src_55_abiutil_fcflags@ +src_56_io_mpi_fcflags = @src_56_io_mpi_fcflags@ +src_56_mixing_fcflags = @src_56_mixing_fcflags@ +src_56_recipspace_fcflags = @src_56_recipspace_fcflags@ +src_56_xc_fcflags = @src_56_xc_fcflags@ +src_57_iopsp_parser_fcflags = @src_57_iopsp_parser_fcflags@ +src_57_iovars_fcflags = @src_57_iovars_fcflags@ +src_61_occeig_fcflags = @src_61_occeig_fcflags@ +src_62_cg_noabirule_fcflags = @src_62_cg_noabirule_fcflags@ +src_62_ctqmc_fcflags = @src_62_ctqmc_fcflags@ +src_62_iowfdenpot_fcflags = @src_62_iowfdenpot_fcflags@ +src_62_poisson_fcflags = @src_62_poisson_fcflags@ +src_62_wvl_wfs_fcflags = @src_62_wvl_wfs_fcflags@ +src_64_psp_fcflags = @src_64_psp_fcflags@ +src_65_lotf_base_fcflags = @src_65_lotf_base_fcflags@ +src_65_paw_fcflags = @src_65_paw_fcflags@ +src_66_nonlocal_fcflags = @src_66_nonlocal_fcflags@ +src_66_vdwxc_fcflags = @src_66_vdwxc_fcflags@ +src_66_wfs_fcflags = @src_66_wfs_fcflags@ +src_67_common_fcflags = @src_67_common_fcflags@ +src_67_python_invocation_ext_fcflags = @src_67_python_invocation_ext_fcflags@ +src_67_triqs_ext_fcflags = @src_67_triqs_ext_fcflags@ +src_68_dmft_fcflags = @src_68_dmft_fcflags@ +src_68_lotf_fcflags = @src_68_lotf_fcflags@ +src_68_recursion_fcflags = @src_68_recursion_fcflags@ +src_68_rsprc_fcflags = @src_68_rsprc_fcflags@ +src_69_wfdesc_fcflags = @src_69_wfdesc_fcflags@ +src_70_gw_fcflags = @src_70_gw_fcflags@ +src_71_bse_fcflags = @src_71_bse_fcflags@ +src_71_wannier_fcflags = @src_71_wannier_fcflags@ +src_72_response_fcflags = @src_72_response_fcflags@ +src_77_ddb_fcflags = @src_77_ddb_fcflags@ +src_77_suscep_fcflags = @src_77_suscep_fcflags@ +src_78_effpot_fcflags = @src_78_effpot_fcflags@ +src_78_eph_fcflags = @src_78_eph_fcflags@ +src_79_seqpar_mpi_fcflags = @src_79_seqpar_mpi_fcflags@ +src_80_rttddft_fcflags = @src_80_rttddft_fcflags@ +src_80_tdep_fcflags = @src_80_tdep_fcflags@ +src_94_scfcv_fcflags = @src_94_scfcv_fcflags@ +src_95_drive_fcflags = @src_95_drive_fcflags@ +src_common_fcflags = @src_common_fcflags@ +src_core_fcflags = @src_core_fcflags@ +src_libpaw_fcflags = @src_libpaw_fcflags@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +with_abinit_common = @with_abinit_common@ +with_bigdft = @with_bigdft@ +with_config_file = @with_config_file@ +with_debug_flavor = @with_debug_flavor@ +with_fallbacks = @with_fallbacks@ +with_fc_vendor = @with_fc_vendor@ +with_fc_version = @with_fc_version@ +with_fft_flavor = @with_fft_flavor@ +with_fftw3 = @with_fftw3@ +with_gnu_ld = @with_gnu_ld@ +with_gpu = @with_gpu@ +with_hdf5 = @with_hdf5@ +with_kokkos = @with_kokkos@ +with_levmar = @with_levmar@ +with_libpaw = @with_libpaw@ +with_libpsml = @with_libpsml@ +with_libxc = @with_libxc@ +with_libxml2 = @with_libxml2@ +with_linalg_flavor = @with_linalg_flavor@ +with_mpi = @with_mpi@ +with_mpi_level = @with_mpi_level@ +with_netcdf = @with_netcdf@ +with_optim_flavor = @with_optim_flavor@ +with_papi = @with_papi@ +with_pfft = @with_pfft@ +with_triqs = @with_triqs@ +with_wannier90 = @with_wannier90@ +with_xmlf90 = @with_xmlf90@ +with_yakl = @with_yakl@ + +# Registered subdirectories +SUBDIRS = \ + incs \ + mods \ + src + +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu shared/libpaw/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu shared/libpaw/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +# This directory's subdirectories are mostly independent; you can cd +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic \ + maintainer-clean-local + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(am__recursive_targets) install-am install-strip + +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ + check-am clean clean-generic cscopelist-am ctags ctags-am \ + distclean distclean-generic distclean-tags distdir dvi dvi-am \ + html html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic maintainer-clean-local mostlyclean \ + mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am + +.PRECIOUS: Makefile + + +# ---------------------------------------------------------------------------- # + +# Enforce ABINIT Coding Style (the so-called ABIRULES) +# +# Note concerning abirules (as of 5.8.0) +# The order of config.h vs abi_common.h is not preserved. +# This should be corrected by hand. It is to be done, at present, +# in get_irredg, merge_kgirr, setshells, sigma +abirules: + @echo 'Reporting possible errors in the abirules procedure' >tmp-abirules.log + @$(PERL) ../developers/maintainers/abirules.pl -d src >>tmp-abirules.log + @grep 'Error' tmp-abirules.log + +# ---------------------------------------------------------------------------- # + +# Help +help: + @cat $(top_srcdir)/doc/help_make/help_make_libpaw.txt + +# ---------------------------------------------------------------------------- # + +# Creation of parent subroutines +parents: + $(PERL) $(top_srcdir)/developers/maintainers/parents.pl -s + rm -f *.old */*.old + +# ---------------------------------------------------------------------------- # + +# Thorough clean-up +maintainer-clean-local: + rm -f tmp-abirules.log + find . -name '*.old' -exec rm {} \; + find . -name '*.orig' -exec rm {} \; + find . -name '*.rej' -exec rm {} \; + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/GX-PAW/libpaw/NEWS b/GX-PAW/libpaw/NEWS new file mode 100644 index 00000000..e69de29b diff --git a/GX-PAW/libpaw/README b/GX-PAW/libpaw/README new file mode 100644 index 00000000..1e9fd2df --- /dev/null +++ b/GX-PAW/libpaw/README @@ -0,0 +1,116 @@ +========================================================================== +== Note for libPAW developers == +== Coding rules == +========================================================================== + M.T. Jan 2015, rev April 2015 + +Copyright (C) 2012-2024 ABINIT group. This file is distributed under the +terms of the GNU General Public License, see or gnu.org/copyleft/gpl.txt. + +The following coding rules are mandatory in order to preserve portability +of libPAW library. Only files in src/??_libpaw are covered by these rules. + + +-------------------------------------------------------------------------- +How to check libPAW coding +-------------------------------------------------------------------------- +First, compile ABINIT. + +Then, execute libPAW special test: + cd ~abinit_build_dir + ~abinit_top_dir/special/scripts/check-libpaw.py "" + + +-------------------------------------------------------------------------- +Dependencies and portability +-------------------------------------------------------------------------- +IMPORTANT: LibPAW files should not depend on modules/routines outside +src/??_libpaw folder!! + +The libpaw.h file contain a set of cpp macros intended to integrate libPAW +files into a host code. + +Compiled in ABINIT, libPAW files use some low level routines and +constants from: defs_basis, wrtout, m_xmpi + +Compiled in another code, libPAW files use low level routines from the +2 following modules: m_libpaw_defs, m_libpaw_tools, m_libpaw_mpi + +m_libpaw_defs is an excerpt of defs_basis. + + +-------------------------------------------------------------------------- +Allocation/deallocation of allocatable arrays and pointers +-------------------------------------------------------------------------- +Avoid direct use of allocate/Deallocate Fortran statements! + +For standard arrays (basic Fortran types), using only sizes, use: + LIBPAW_ALLOCATE(array,(sizes)) + LIBPAW_DEALLOCATE(array) + +For standard pointers (basic Fortran types), using only sizes, use: + LIBPAW_POINTER_ALLOCATE(pointer,(sizes)) + LIBPAW_POINTER_DEALLOCATE(pointer) + +For standard arrays (basic Fortran types), using explicit bounds use: +For 1D-array allocation + LIBPAW_BOUND1_ALLOCATE(array,BOUNDS(lbound,ubound)) +For 2D-array allocation + LIBPAW_BOUND2_ALLOCATE(array,BOUNDS(lbnd1,ubnd1),BOUNDS(lbnd2,ubnd2)) +For array deallocation + LIBPAW_DEALLOCATE(array) + +For user-defined datatype arrays or pointers, using sizes or bounds, use: + LIBPAW_DATATYPE_ALLOCATE(array,(sizes)) + LIBPAW_DATATYPE_DEALLOCATE(array) + +Other cases are not covered (but could be on demand) + + +-------------------------------------------------------------------------- +Input/output in text files +-------------------------------------------------------------------------- +Use wrtout routine (see m_libpaw_tools.F90) to print message. + +Use following macros to print messages: + MSG_COMMENT(msg) + MSG_WARNING(msg) + +Use following macros to print messages and then stop: + MSG_ERROR(msg) + MSG_BUG(msg) + + +-------------------------------------------------------------------------- +MPI wrappers +-------------------------------------------------------------------------- +This section is not yet relevant. +For MPI wrappers, use m_xmpi routines + +#MPI functions used in libPAW have to be wrapped. +# +#The wrappers are defined in the m_libpaw_mpi.F90 module. +#The all have the "xpaw_mpi_" prefix. +# +#m_libpaw_mpi is an excerpt of m_xmpi. +#If a new object from m_xmpi is needed, it is mandatory to add it +#in m_libpaw_mpi, replacing "xmpi_" prefix by "xpaw_mpi_". + + +-------------------------------------------------------------------------- +Adding a new file in libPAW +-------------------------------------------------------------------------- +libPAW should only contain Fortran modules! + +The header of the new file should look like this: + +| #include "libpaw.h" +| +| MODULE m_newmodule +| +| USE_DEFS +| USE_MSG_HANDLING [if messages have to be printed] +| USE_MPI_WRAPPERS [if MPI has to be used] +| USE_MEMORY_PROFILING + +Note this use of cpp macros instead of "use module" statements. diff --git a/GX-PAW/libpaw/autogen.sh b/GX-PAW/libpaw/autogen.sh new file mode 100755 index 00000000..0b07171e --- /dev/null +++ b/GX-PAW/libpaw/autogen.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# +## Copyright (C) 2017-2024 ABINIT group (Yann Pouillon ) + +# Stop at first error encountered +set -e + +# Check that we are in the right directory +if test ! -s "./configure.ac" -o ! -s "src/m_paw_atom.F90"; then + echo "This is not a LibPAW source tree - aborting now" + exit 1 +fi + +# Make sure the directory tree is writable +chmod -R u+w . + +# Create possibly missing directories +mkdir -p config/gnu config/m4 + +# Generate makefiles for Automake +# FIXME: lists of source files are not automatically updated +echo "[pawbuild] Generating makefiles for Automake (FIXME: update source lists)" +cp config/makefiles/doc.am doc/Makefile.am +cp config/makefiles/libxc.am libxc/Makefile.am +cp config/makefiles/src.am src/Makefile.am +cp config/makefiles/top.am Makefile.am + +# Generate libtool scripts +echo "[pawbuild] Generating libtool scripts" +my_libtoolize="libtoolize" +${my_libtoolize} --version >/dev/null 2>&1 +if test "${?}" != "0"; then + my_libtoolize="glibtoolize" +fi +${my_libtoolize} --version >/dev/null 2>&1 +if test "${?}" != "0"; then + echo "Error: could not find a working version of libtoolize" >&2 + exit 1 +fi +${my_libtoolize} --automake --copy --force + +# Generate M4 includes +echo "[pawbuild] Generating aclocal.m4" +aclocal -I config/m4 + +# Generate configure auxiliary files +echo "[pawbuild] Generating config.h.in" +autoheader + +# Generate configure +echo "[pawbuild] Generating configure script" +autoconf + +# Generate makefile inputs +# Do not use "automake --force-missing", as it overwrites the INSTALL file. +echo "[pawbuild] Generating Makefile.in for each directory" +automake --add-missing --copy diff --git a/GX-PAW/libpaw/config/abinit/__init__.py b/GX-PAW/libpaw/config/abinit/__init__.py new file mode 100644 index 00000000..3dc1f76b --- /dev/null +++ b/GX-PAW/libpaw/config/abinit/__init__.py @@ -0,0 +1 @@ +__version__ = "0.1.0" diff --git a/GX-PAW/libpaw/config/abinit/automake/library.py b/GX-PAW/libpaw/config/abinit/automake/library.py new file mode 100644 index 00000000..9c6441ee --- /dev/null +++ b/GX-PAW/libpaw/config/abinit/automake/library.py @@ -0,0 +1 @@ +lib{name}_{suffix}_{BUILT_PREFIX}SOURCES = {sources} diff --git a/GX-PAW/libpaw/config/abinit/buildsys/__init__.py b/GX-PAW/libpaw/config/abinit/buildsys/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/GX-PAW/libpaw/config/abinit/buildsys/helpers.py b/GX-PAW/libpaw/config/abinit/buildsys/helpers.py new file mode 100644 index 00000000..4d830fc6 --- /dev/null +++ b/GX-PAW/libpaw/config/abinit/buildsys/helpers.py @@ -0,0 +1,24 @@ +import os + +import yaml +try: + from yaml import CLoader as Loader, CDumper as Dumper +except ImportError: + from yaml import Loader, Dumper + + +class LibraryBuilder(object): + + + def __init__(self, cfg_path): + + with open(yaml_path, "r") as yaml_file: + self.specs = load(yaml_file, Loader=Loader) + + if ( not "entity" in self.specs.keys() ): + raise KeyError("Missing entity description in {}".format(cfg_path)) + if ( self.specs["entity"] != "srcdir" ): + raise ValueError("Invalid entity description in {}".format(cfg_path)) + + + def get_automake(self): diff --git a/GX-PAW/libpaw/config/data/libpaw-config.yml.in b/GX-PAW/libpaw/config/data/libpaw-config.yml.in new file mode 100644 index 00000000..d5a1c2ce --- /dev/null +++ b/GX-PAW/libpaw/config/data/libpaw-config.yml.in @@ -0,0 +1,60 @@ +%YAML 1.2 +--- +timestamp: "@paw_timestamp@" + +info: + version: "@PACKAGE_VERSION@" + +target: + cpu: "@target_cpu@" + vendor: "@target_vendor@" + os: "@target_os@" + +compilers: + CPP: "@CPP@" + CPPFLAGS: "@CPPFLAGS@" + CC: "@CC@" + CFLAGS: "@CFLAGS@" + FC: "@FC@" + FCFLAGS: "@FCFLAGS@" + LDFLAGS: "@LDFLAGS@" + LIBS: "@LIBS@" + +envvars: + LIBPAW_EMBED: "@LIBPAW_EMBED@" + +defaults: + blocksize: "@paw_blocksize_def@" + debug_enable: "@paw_blocking_enable_def@" + debug_enable: "@paw_cluster_enable_def@" + debug_enable: "@paw_debug_enable_def@" + mpi_enable: "@paw_mpi_enable_def@" + +options: + blocksize: "@paw_blocksize@" + enable_debug: "@enable_blocking@" + enable_debug: "@enable_cluster@" + enable_debug: "@enable_debug@" + with_mpi: "@with_mpi@" + +triggers: + debug_enable: "@paw_debug_enable@" + debug_enable: "@paw_blocking_enable@" + debug_enable: "@paw_cluster_enable@" + mpi_enable: "@paw_mpi_enable@" + +inits: + debug: "@paw_blocking_init@" + debug: "@paw_cluster_init@" + debug: "@paw_debug_init@" + mpi: "@paw_mpi_init@" + +mpi_internals: + cc_set: "@paw_mpi_cc_set@" + fc_set: "@paw_mpi_fc_set@" + +internals: + ARCH_SUFFIX: "@LIBPAW_ARCH_SUFFIX@" + MCFG_SUFFIX: "@LIBPAW_MCFG_SUFFIX@" + +... diff --git a/GX-PAW/libpaw/config/data/libpaw.pc.in b/GX-PAW/libpaw/config/data/libpaw.pc.in new file mode 100644 index 00000000..93dc469e --- /dev/null +++ b/GX-PAW/libpaw/config/data/libpaw.pc.in @@ -0,0 +1,10 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: libpaw +Description: Projector-Augmented Wave Library +Version: @VERSION@ +Libs: -L${libdir} -lpaw +Cflags: -I${includedir} diff --git a/GX-PAW/libpaw/config/m4/ax_f90_module_case.m4 b/GX-PAW/libpaw/config/m4/ax_f90_module_case.m4 new file mode 100644 index 00000000..cd6472ae --- /dev/null +++ b/GX-PAW/libpaw/config/m4/ax_f90_module_case.m4 @@ -0,0 +1,71 @@ +# =========================================================================== +# ax_f90_module_case.m4 +# =========================================================================== +# +# SYNOPSIS +# +# AX_F90_MODULE_CASE +# +# DESCRIPTION +# +# Find Fortran 90 modules file case. The module case is stored +# in the cached variable ax_f90_mod_case, or "unknown" if the case +# cannot be found. Two additional cache variables, containing "yes", +# "no", or "unknown", are created as well: ax_f90_mod_lowercase and +# ax_f90_mod_uppercase. +# +# LAST MODIFICATION +# +# 2011-08-31 +# +# COPYLEFT +# +# Copyright (C) 2011-2024 ABINIT group (Yann Pouillon ) +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. + +AC_DEFUN([AX_F90_MODULE_CASE],[ +AC_REQUIRE([AX_F90_MODULE_EXTENSION]) +AC_CACHE_CHECK([fortran 90 modules case], +ax_cv_f90_mod_case, +[AC_LANG_PUSH([Fortran]) +i=0 +while test \( -f tmpdir_$i \) -o \( -d tmpdir_$i \) ; do + i=`expr $i + 1` +done +mkdir tmpdir_$i +cd tmpdir_$i +AC_COMPILE_IFELSE([ +!234567 + module conftest_module + contains + subroutine conftest_routine + write(*,'(a)') 'gotcha!' + end subroutine conftest_routine + end module conftest_module + ], + [ax_cv_f90_mod_case=`ls | sed -n "s,conftest_module\.$ax_cv_f90_modext,,p"` + if test x$ax_cv_f90_mod_case = x ; then + ax_cv_f90_mod_case=`ls | sed -n "s,CONFTEST_MODULE\.$ax_cv_f90_modext,,p"` + if test x$ax_cv_f90_mod_case = x ; then + ax_cv_f90_mod_case="unknown" + ax_cv_f90_mod_lowercase="unknown" + ax_cv_f90_mod_uppercase="unknown" + else + ax_cv_f90_mod_case="upper" + ax_cv_f90_mod_lowercase="no" + ax_cv_f90_mod_uppercase="yes" + fi + else + ax_cv_f90_mod_case="lower" + ax_cv_f90_mod_lowercase="yes" + ax_cv_f90_mod_uppercase="no" + fi + ], + [ax_cv_f90_mod_case=""; ax_cv_f90_mod_lowercase=""; ax_cv_mod_uppercase=""]) +cd .. +rm -fr tmpdir_$i +AC_LANG_POP([Fortran]) +])]) # AX_F90_MODULE_CASE diff --git a/GX-PAW/libpaw/config/m4/ax_f90_module_extension.m4 b/GX-PAW/libpaw/config/m4/ax_f90_module_extension.m4 new file mode 100644 index 00000000..01e18c2c --- /dev/null +++ b/GX-PAW/libpaw/config/m4/ax_f90_module_extension.m4 @@ -0,0 +1,60 @@ +# =========================================================================== +# http://autoconf-archive.cryp.to/ax_f90_module_extension.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_F90_MODULE_EXTENSION +# +# DESCRIPTION +# +# Find Fortran 90 modules file extension. The module extension is stored +# in the cached variable ax_f90_modext, or "unknown" if the extension +# cannot be found. +# +# LAST MODIFICATION +# +# 2009-04-19 +# +# COPYLEFT +# +# Copyright (C) 2009 Luc Maisonobe +# Copyright (C) 2009 Alexander Pletzer +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. + +AC_DEFUN([AX_F90_MODULE_EXTENSION],[ +AC_CACHE_CHECK([fortran 90 modules extension], +ax_cv_f90_modext, +[AC_LANG_PUSH(Fortran) +i=0 +while test \( -f tmpdir_$i \) -o \( -d tmpdir_$i \) ; do + i=`expr $i + 1` +done +mkdir tmpdir_$i +cd tmpdir_$i +AC_COMPILE_IFELSE([ +!234567 + module conftest_module + contains + subroutine conftest_routine + write(*,'(a)') 'gotcha!' + end subroutine conftest_routine + end module conftest_module + ], + [ax_cv_f90_modext=`ls | sed -n 's,conftest_module\.,,p'` + if test x$ax_cv_f90_modext = x ; then +dnl Some F90 compilers put module filename in uppercase letters + ax_cv_f90_modext=`ls | sed -n 's,CONFTEST_MODULE\.,,p'` + if test x$ax_cv_f90_modext = x ; then + ax_cv_f90_modext="" + fi + fi + ], + [ax_cv_f90_modext=""]) +cd .. +rm -fr tmpdir_$i +AC_LANG_POP(Fortran) +])]) # AX_F90_MODULE_EXTENSION diff --git a/GX-PAW/libpaw/config/m4/ax_pthread.m4 b/GX-PAW/libpaw/config/m4/ax_pthread.m4 new file mode 100644 index 00000000..d90de34d --- /dev/null +++ b/GX-PAW/libpaw/config/m4/ax_pthread.m4 @@ -0,0 +1,309 @@ +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_pthread.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) +# +# DESCRIPTION +# +# This macro figures out how to build C programs using POSIX threads. It +# sets the PTHREAD_LIBS output variable to the threads library and linker +# flags, and the PTHREAD_CFLAGS output variable to any special C compiler +# flags that are needed. (The user can also force certain compiler +# flags/libs to be tested by setting these environment variables.) +# +# Also sets PTHREAD_CC to any special C compiler that is needed for +# multi-threaded programs (defaults to the value of CC otherwise). (This +# is necessary on AIX to use the special cc_r compiler alias.) +# +# NOTE: You are assumed to not only compile your program with these flags, +# but also link it with them as well. e.g. you should link with +# $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS +# +# If you are only building threads programs, you may wish to use these +# variables in your default LIBS, CFLAGS, and CC: +# +# LIBS="$PTHREAD_LIBS $LIBS" +# CFLAGS="$CFLAGS $PTHREAD_CFLAGS" +# CC="$PTHREAD_CC" +# +# In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant +# has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to that name +# (e.g. PTHREAD_CREATE_UNDETACHED on AIX). +# +# Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the +# PTHREAD_PRIO_INHERIT symbol is defined when compiling with +# PTHREAD_CFLAGS. +# +# ACTION-IF-FOUND is a list of shell commands to run if a threads library +# is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it +# is not found. If ACTION-IF-FOUND is not specified, the default action +# will define HAVE_PTHREAD. +# +# Please let the authors know if this macro fails on any platform, or if +# you have any other suggestions or comments. This macro was based on work +# by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help +# from M. Frigo), as well as ac_pthread and hb_pthread macros posted by +# Alejandro Forero Cuervo to the autoconf macro repository. We are also +# grateful for the helpful feedback of numerous users. +# +# Updated for Autoconf 2.68 by Daniel Richard G. +# +# LICENSE +# +# Copyright (c) 2008 Steven G. Johnson +# Copyright (c) 2011 Daniel Richard G. +# +# 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 . +# +# As a special exception, the respective Autoconf Macro's copyright owner +# gives unlimited permission to copy, distribute and modify the configure +# scripts that are the output of Autoconf when processing the Macro. You +# need not follow the terms of the GNU General Public License when using +# or distributing such scripts, even though portions of the text of the +# Macro appear in them. The GNU General Public License (GPL) does govern +# all other use of the material that constitutes the Autoconf Macro. +# +# This special exception to the GPL applies to versions of the Autoconf +# Macro released by the Autoconf Archive. When you make and distribute a +# modified version of the Autoconf Macro, you may extend this special +# exception to the GPL to apply to your modified version as well. + +#serial 18 + +AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD]) +AC_DEFUN([AX_PTHREAD], [ +AC_REQUIRE([AC_CANONICAL_HOST]) +AC_LANG_PUSH([C]) +ax_pthread_ok=no + +# We used to check for pthread.h first, but this fails if pthread.h +# requires special compiler flags (e.g. on True64 or Sequent). +# It gets checked for in the link test anyway. + +# First of all, check if the user has set any of the PTHREAD_LIBS, +# etcetera environment variables, and if threads linking works using +# them: +if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + save_LIBS="$LIBS" + LIBS="$PTHREAD_LIBS $LIBS" + AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS]) + AC_TRY_LINK_FUNC(pthread_join, ax_pthread_ok=yes) + AC_MSG_RESULT($ax_pthread_ok) + if test x"$ax_pthread_ok" = xno; then + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" + fi + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" +fi + +# We must check for the threads library under a number of different +# names; the ordering is very important because some systems +# (e.g. DEC) have both -lpthread and -lpthreads, where one of the +# libraries is broken (non-POSIX). + +# Create a list of thread flags to try. Items starting with a "-" are +# C compiler flags, and other items are library names, except for "none" +# which indicates that we try without any flags at all, and "pthread-config" +# which is a program returning the flags for the Pth emulation library. + +ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" + +# The ordering *is* (sometimes) important. Some notes on the +# individual items follow: + +# pthreads: AIX (must check this before -lpthread) +# none: in case threads are in libc; should be tried before -Kthread and +# other compiler flags to prevent continual compiler warnings +# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) +# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) +# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) +# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) +# -pthreads: Solaris/gcc +# -mthreads: Mingw32/gcc, Lynx/gcc +# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it +# doesn't hurt to check since this sometimes defines pthreads too; +# also defines -D_REENTRANT) +# ... -mt is also the pthreads flag for HP/aCC +# pthread: Linux, etcetera +# --thread-safe: KAI C++ +# pthread-config: use pthread-config program (for GNU Pth library) + +case ${host_os} in + solaris*) + + # On Solaris (at least, for some versions), libc contains stubbed + # (non-functional) versions of the pthreads routines, so link-based + # tests will erroneously succeed. (We need to link with -pthreads/-mt/ + # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather + # a function called by this macro, so we could check for that, but + # who knows whether they'll stub that too in a future libc.) So, + # we'll just look for -pthreads and -lpthread first: + + ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags" + ;; + + darwin*) + ax_pthread_flags="-pthread $ax_pthread_flags" + ;; +esac + +if test x"$ax_pthread_ok" = xno; then +for flag in $ax_pthread_flags; do + + case $flag in + none) + AC_MSG_CHECKING([whether pthreads work without any flags]) + ;; + + -*) + AC_MSG_CHECKING([whether pthreads work with $flag]) + PTHREAD_CFLAGS="$flag" + ;; + + pthread-config) + AC_CHECK_PROG(ax_pthread_config, pthread-config, yes, no) + if test x"$ax_pthread_config" = xno; then continue; fi + PTHREAD_CFLAGS="`pthread-config --cflags`" + PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" + ;; + + *) + AC_MSG_CHECKING([for the pthreads library -l$flag]) + PTHREAD_LIBS="-l$flag" + ;; + esac + + save_LIBS="$LIBS" + save_CFLAGS="$CFLAGS" + LIBS="$PTHREAD_LIBS $LIBS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + + # Check for various functions. We must include pthread.h, + # since some functions may be macros. (On the Sequent, we + # need a special flag -Kthread to make this header compile.) + # We check for pthread_join because it is in -lpthread on IRIX + # while pthread_create is in libc. We check for pthread_attr_init + # due to DEC craziness with -lpthreads. We check for + # pthread_cleanup_push because it is one of the few pthread + # functions on Solaris that doesn't have a non-functional libc stub. + # We try pthread_create on general principles. + AC_LINK_IFELSE([AC_LANG_PROGRAM([#include + static void routine(void *a) { a = 0; } + static void *start_routine(void *a) { return a; }], + [pthread_t th; pthread_attr_t attr; + pthread_create(&th, 0, start_routine, 0); + pthread_join(th, 0); + pthread_attr_init(&attr); + pthread_cleanup_push(routine, 0); + pthread_cleanup_pop(0) /* ; */])], + [ax_pthread_ok=yes], + []) + + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" + + AC_MSG_RESULT($ax_pthread_ok) + if test "x$ax_pthread_ok" = xyes; then + break; + fi + + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" +done +fi + +# Various other checks: +if test "x$ax_pthread_ok" = xyes; then + save_LIBS="$LIBS" + LIBS="$PTHREAD_LIBS $LIBS" + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + + # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. + AC_MSG_CHECKING([for joinable pthread attribute]) + attr_name=unknown + for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do + AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ], + [int attr = $attr; return attr /* ; */])], + [attr_name=$attr; break], + []) + done + AC_MSG_RESULT($attr_name) + if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then + AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name, + [Define to necessary symbol if this constant + uses a non-standard name on your system.]) + fi + + AC_MSG_CHECKING([if more special flags are required for pthreads]) + flag=no + case ${host_os} in + aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";; + osf* | hpux*) flag="-D_REENTRANT";; + solaris*) + if test "$GCC" = "yes"; then + flag="-D_REENTRANT" + else + flag="-mt -D_REENTRANT" + fi + ;; + esac + AC_MSG_RESULT(${flag}) + if test "x$flag" != xno; then + PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" + fi + + AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT], + ax_cv_PTHREAD_PRIO_INHERIT, [ + AC_LINK_IFELSE([ + AC_LANG_PROGRAM([[#include ]], [[int i = PTHREAD_PRIO_INHERIT;]])], + [ax_cv_PTHREAD_PRIO_INHERIT=yes], + [ax_cv_PTHREAD_PRIO_INHERIT=no]) + ]) + AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"], + AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], 1, [Have PTHREAD_PRIO_INHERIT.])) + + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" + + # More AIX lossage: must compile with xlc_r or cc_r + if test x"$GCC" != xyes; then + AC_CHECK_PROGS(PTHREAD_CC, xlc_r cc_r, ${CC}) + else + PTHREAD_CC=$CC + fi +else + PTHREAD_CC="$CC" +fi + +AC_SUBST(PTHREAD_LIBS) +AC_SUBST(PTHREAD_CFLAGS) +AC_SUBST(PTHREAD_CC) + +# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: +if test x"$ax_pthread_ok" = xyes; then + ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1]) + : +else + ax_pthread_ok=no + $2 +fi +AC_LANG_POP +])dnl AX_PTHREAD diff --git a/GX-PAW/libpaw/config/m4/sd_arch_mpi.m4 b/GX-PAW/libpaw/config/m4/sd_arch_mpi.m4 new file mode 100644 index 00000000..81cfed8b --- /dev/null +++ b/GX-PAW/libpaw/config/m4/sd_arch_mpi.m4 @@ -0,0 +1,759 @@ +## Copyright (C) 2019-2024 ABINIT group (Yann Pouillon) + +# +# MPI detection with Steredeg +# + + + # ------------------------------------ # + # ------------------------------------ # + + +# +# Public macros +# + + +AC_DEFUN([SD_MPI_INIT], [ + # Init + sd_mpi_cppflags="" + sd_mpi_cflags="" + sd_mpi_fcflags="" + sd_mpi_ldflags="" + sd_mpi_libs="" + sd_mpi_cc="" + sd_mpi_cc_ok="unknown" + sd_mpi_cc_set="no" + sd_mpi_cxx="" + sd_mpi_cxx_ok="unknown" + sd_mpi_cxx_set="no" + sd_mpi_fc="" + sd_mpi_fc_ok="unknown" + sd_mpi_fc_set="no" + sd_mpi_enable="" + sd_mpi_init="unknown" + sd_mpi_ok="unknown" + + # Set adjustable parameters + sd_mpi_options="$1" + sd_mpi_libs_def="$2" + sd_mpi_cppflags_def="$3" + sd_mpi_cflags_def="$4" + sd_mpi_cxxflags_def="$5" + sd_mpi_fcflags_def="$6" + sd_mpi_ldflags_def="$7" + sd_mpi_enable_cxx="" + sd_mpi_enable_def="" + sd_mpi_enable_fc="" + sd_mpi_policy="" + sd_mpi_status="" + + # Process options + for kwd in ${sd_mpi_options}; do + case "${kwd}" in + auto) + sd_mpi_enable_def="${kwd}" + ;; + implicit|required|optional) + sd_mpi_status="${kwd}" + ;; + fail|skip|warn) + sd_mpi_policy="${kwd}" + ;; + no-cxx) + sd_mpi_enable_cxx="no" + ;; + no-fortran) + sd_mpi_enable_fc="no" + ;; + *) + AC_MSG_ERROR([invalid Steredeg MPI option: '${kwd}']) + ;; + esac + done + + # Set reasonable defaults if not provided + test -z "${sd_mpi_libs_def}" && sd_mpi_libs_def="-lmpi" + test -z "${sd_mpi_policy}" && sd_mpi_policy="fail" + test -z "${sd_mpi_status}" && sd_mpi_status="optional" + test -z "${sd_mpi_enable_def}" && sd_mpi_enable_def="no" + case "${sd_mpi_status}" in + implicit|required) + sd_mpi_enable_def="yes" + ;; + esac + test -z "${sd_mpi_enable_cxx}" && sd_mpi_enable_cxx="yes" + test -z "${sd_mpi_enable_fc}" && sd_mpi_enable_fc="yes" + + # Declare configure option + AC_ARG_WITH([mpi], + [AS_HELP_STRING( + [--with-mpi], + [Install prefix of MPI (e.g. /usr/local). The default behaviour is to detect whether the specified compilers properly support MPI and to fall back to serial mode if not. You may use --with-mpi without argument to force MPI detection, in which case detection failures will result in errors, and --without-mpi to disable MPI support completely.])], + [ if test "${withval}" = "no" -o "${withval}" = "yes"; then + sd_mpi_enable="${withval}" + sd_mpi_init="yon" + else + sd_mpi_enable="yes" + sd_mpi_init="dir" + fi], + [ sd_mpi_enable="${sd_mpi_enable_def}"; sd_mpi_init="def"]) + + # Declare environment variables + AC_ARG_VAR([MPI_CPPFLAGS], [C preprocessing flags for MPI.]) + AC_ARG_VAR([MPI_CFLAGS], [C flags for MPI.]) + AC_ARG_VAR([MPI_CXXFLAGS], [C++ flags for MPI.]) + AC_ARG_VAR([MPI_FCFLAGS], [Fortran flags for MPI.]) + AC_ARG_VAR([MPI_LDFLAGS], [Linker flags for MPI.]) + AC_ARG_VAR([MPI_LIBS], [Library flags for MPI.]) + + # Detect use of environment variables + if test "${sd_mpi_enable}" = "yes" -o "${sd_mpi_enable}" = "auto"; then + tmp_mpi_vars="${MPI_CPPFLAGS}${MPI_CFLAGS}${MPI_LDFLAGS}${MPI_LIBS}" + if test "${sd_mpi_enable_cxx}" = "yes"; then + tmp_mpi_vars="${tmp_mpi_vars}${MPI_CXXFLAGS}" + fi + if test "${sd_mpi_enable_fc}" = "yes"; then + tmp_mpi_vars="${tmp_mpi_vars}${MPI_FCFLAGS}" + fi + if test "${sd_mpi_init}" = "def" -a ! -z "${tmp_mpi_vars}"; then + sd_mpi_enable="yes" + sd_mpi_init="env" + fi + fi + + # Make sure configuration is correct + if test "${STEREDEG_CONFIG_BYPASS_CHECKS}" != "yes"; then + _SD_MPI_CHECK_CONFIG + fi + + # Adjust configuration depending on init type + if test "${sd_mpi_enable}" = "yes" -o "${sd_mpi_enable}" = "auto"; then + + # Set MPI-specific flags + case "${sd_mpi_init}" in + + def|yon) + sd_mpi_cppflags="${sd_mpi_cppflags_def}" + sd_mpi_cflags="${sd_mpi_cflags_def}" + test "${sd_mpi_enable_cxx}" = "yes" && \ + sd_mpi_cxxflags="${sd_mpi_cxxflags_def}" + test "${sd_mpi_enable_fc}" = "yes" && \ + sd_mpi_fcflags="${sd_mpi_fcflags_def}" + sd_mpi_ldflags="${sd_mpi_ldflags_def}" + sd_mpi_libs="${sd_mpi_libs_def}" + ;; + + dir) + sd_mpi_cppflags="-I${with_mpi}/include" + sd_mpi_cflags="${sd_mpi_cflags_def}" + test "${sd_mpi_enable_cxx}" = "yes" && \ + sd_mpi_cxxflags="${sd_mpi_cxxflags_def}" + test "${sd_mpi_enable_fc}" = "yes" && \ + sd_mpi_fcflags="${sd_mpi_fcflags_def} -I${with_mpi}/include" + sd_mpi_ldflags="${sd_mpi_ldflags_def}" + sd_mpi_libs="-L${with_mpi}/lib ${sd_mpi_libs_def}" + ;; + + env) + sd_mpi_cppflags="${sd_mpi_cppflags_def}" + sd_mpi_cflags="${sd_mpi_cflags_def}" + test "${sd_mpi_enable_cxx}" = "yes" && \ + sd_mpi_cxxflags="${sd_mpi_cxxflags_def}" + test "${sd_mpi_enable_fc}" = "yes" && \ + sd_mpi_fcflags="${sd_mpi_fcflags_def}" + sd_mpi_ldflags="${sd_mpi_ldflags_def}" + sd_mpi_libs="${sd_mpi_libs_def}" + test ! -z "${MPI_CPPFLAGS}" && sd_mpi_cppflags="${MPI_CPPFLAGS}" + test ! -z "${MPI_CFLAGS}" && sd_mpi_cflags="${MPI_CFLAGS}" + if test "${sd_mpi_enable_cxx}" = "yes"; then + test ! -z "${MPI_CXXFLAGS}" && sd_mpi_cxxflags="${MPI_CXXFLAGS}" + fi + if test "${sd_mpi_enable_fc}" = "yes"; then + test ! -z "${MPI_FCFLAGS}" && sd_mpi_fcflags="${MPI_FCFLAGS}" + fi + test ! -z "${MPI_LDFLAGS}" && sd_mpi_ldflags="${MPI_LDFLAGS}" + test ! -z "${MPI_LIBS}" && sd_mpi_libs="${MPI_LIBS}" + ;; + + *) + AC_MSG_ERROR([invalid init type for MPI: '${sd_mpi_init}']) + ;; + + esac + + # Look for MPI compilers + if test "${sd_mpi_init}" != "env"; then + _SD_MPI_INIT_CC + if test "${sd_mpi_enable_cxx}" = "yes"; then + _SD_MPI_INIT_CXX + fi + if test "${sd_mpi_enable_fc}" = "yes"; then + _SD_MPI_INIT_FC + fi + fi + + fi + + # Display configuration + if test "${STEREDEG_CONFIG_BYPASS_CHECKS}" != "yes"; then + _SD_MPI_DUMP_CONFIG + fi + + # Export configuration + AC_SUBST(sd_mpi_options) + AC_SUBST(sd_mpi_enable_def) + AC_SUBST(sd_mpi_enable_cxx) + AC_SUBST(sd_mpi_enable_fc) + AC_SUBST(sd_mpi_policy) + AC_SUBST(sd_mpi_status) + AC_SUBST(sd_mpi_enable) + AC_SUBST(sd_mpi_init) + AC_SUBST(sd_mpi_ok) + AC_SUBST(sd_mpi_cppflags) + AC_SUBST(sd_mpi_cflags) + AC_SUBST(sd_mpi_fcflags) + AC_SUBST(sd_mpi_ldflags) + AC_SUBST(sd_mpi_libs) + AC_SUBST(with_mpi) + + # Clean-up + unset tmp_mpi_vars +]) # SD_MPI_INIT + + +AC_DEFUN([SD_MPI_DETECT], [ + # Display configuration + if test "${STEREDEG_CONFIG_BYPASS_CHECKS}" != "yes"; then + _SD_MPI_DUMP_CONFIG + fi + + # Check compilers or APIs + if test "${sd_mpi_enable}" = "yes" -o "${sd_mpi_enable}" = "auto"; then + + _SD_MPI_CHECK_CC + if test "${sd_mpi_cc_ok}" = "yes"; then + if test "${sd_mpi_enable_cxx}" = "yes"; then + _SD_MPI_CHECK_CXX + fi + if test "${sd_mpi_enable_fc}" = "yes"; then + _SD_MPI_CHECK_FC + fi + fi + + # Validate implementation status + tmp_mpi_ok="yes" + if test "${sd_mpi_cc_ok}" = "yes"; then + if test "${sd_mpi_enable_cxx}" = "yes" -a "${sd_mpi_cxx_ok}" != "yes"; then + tmp_mpi_ok="no" + fi + if test "${sd_mpi_enable_fc}" = "yes" -a "${sd_mpi_fc_ok}" != "yes"; then + tmp_mpi_ok="no" + fi + sd_mpi_ok="${tmp_mpi_ok}" + else + sd_mpi_ok="no" + fi + + # Take decision according to policy + if test "${sd_mpi_ok}" = "yes"; then + sd_mpi_enable="yes" + else + if test "${sd_mpi_enable}" = "yes"; then + case "${sd_mpi_policy}" in + fail) + AC_MSG_FAILURE([MPI support does not work]) + ;; + skip) + sd_mpi_enable="no" + ;; + warn) + sd_mpi_enable="no" + AC_MSG_WARN([MPI support does not work and has been disabled]) + ;; + esac + else + sd_mpi_enable="no" + fi + fi + + fi + + # Make MPI status available to the source code + if test "${sd_mpi_enable}" = "yes" -a "${sd_mpi_ok}" = "yes"; then + AC_DEFINE([HAVE_MPI], 1, + [Define to 1 if you have a working MPI installation.]) + fi +]) # SD_MPI_DETECT + + + # ------------------------------------ # + # ------------------------------------ # + + +# +# Private macros for C +# + + +AC_DEFUN([_SD_MPI_INIT_CC], [ + dnl Look for a MPI C compiler + case "${sd_mpi_init}" in + + dir) + if test -z "${CC}"; then + sd_mpi_cc="${with_mpi}/bin/mpicc" + else + tmp_cc_has_path=`echo "${CC}" | grep '/'` + if test -z "${tmp_cc_has_path}"; then + sd_mpi_cc="${with_mpi}/bin/${CC}" + else + sd_mpi_libs="-L${with_mpi}/lib ${sd_mpi_libs_def}" + AC_MSG_NOTICE([user-defined MPI library flags: ${sd_mpi_libs}]) + fi + fi + + if test ! -z "${sd_mpi_cc}"; then + AC_MSG_NOTICE([user-defined MPI C compiler: ${sd_mpi_cc}]) + AC_MSG_CHECKING([for an executable MPI C compiler]) + if test -x "${sd_mpi_cc}"; then + AC_MSG_RESULT([yes]) + AC_MSG_NOTICE([setting CC to ${sd_mpi_cc}]) + CC="${sd_mpi_cc}" + sd_mpi_cc_set="yes" + else + AC_MSG_RESULT([not found]) + AC_MSG_ERROR([invalid MPI settings + Please adjust --with-mpi and/or CC and re-run configure]) + fi + fi + ;; + + def|env|yon) + sd_mpi_cc="${CC}" + if test ! -z "${sd_mpi_cc}"; then + sd_mpi_cc_set="yes" + else + AC_CHECK_PROGS([sd_mpi_cc], [mpicc]) + if test ! -z "${sd_mpi_cc}"; then + AC_MSG_NOTICE([setting CC to '${sd_mpi_cc}']) + CC="${sd_mpi_cc}" + sd_mpi_cc_set="yes" + fi + fi + ;; + + esac +]) # _SD_MPI_INIT_CC + + +AC_DEFUN([_SD_MPI_CHECK_CC], [ + # Init + sd_mpi_cc_ok="unknown" + sd_mpi_cc_api_ok="unknown" + + # Prepare environment + SD_ESL_SAVE_FLAGS + CPPFLAGS="${CPPFLAGS} ${sd_mpi_cppflags}" + CFLAGS="${CFLAGS} ${sd_mpi_cflags}" + LDFLAGS="${LDFLAGS} ${sd_mpi_ldflags}" + LIBS="${sd_mpi_libs} ${LIBS}" + + # Check the MPI implementation + _SD_MPI_CHECK_CC_API + + # Validate C support + AC_MSG_CHECKING([whether the MPI C environment works]) + if test "${sd_mpi_cc_api_ok}" = "yes"; then + sd_mpi_cc_ok="yes" + else + sd_mpi_cc_ok="no" + fi + AC_MSG_RESULT([${sd_mpi_cc_ok}]) + + # Restore environment + SD_ESL_RESTORE_FLAGS +]) # _SD_MPI_CHECK_CC + + +AC_DEFUN([_SD_MPI_CHECK_CC_API], [ + # Check MPI C API + AC_MSG_CHECKING([whether the MPI C API works]) + AC_LANG_PUSH([C]) + AC_LINK_IFELSE([AC_LANG_PROGRAM( + [[ +#include + ]], + [[ + int *argc; + char **argv; + MPI_Init(argc, argv); + ]])], [sd_mpi_cc_api_ok="yes"], [sd_mpi_cc_api_ok="no"]) + AC_LANG_POP([C]) + AC_MSG_RESULT([${sd_mpi_cc_api_ok}]) +]) + + + # ------------------------------------ # + + +# +# Private macros for C++ +# + + +AC_DEFUN([_SD_MPI_INIT_CXX], [ + # Look for a MPI C compiler + case "${sd_mpi_init}" in + + dir) + if test -z "${CXX}"; then + sd_mpi_cxx="${with_mpi}/bin/mpic++" + else + tmp_cxx_has_path=`echo "${CXX}" | grep '/'` + if test -z "${tmp_cxx_has_path}"; then + sd_mpi_cxx="${with_mpi}/bin/${CXX}" + else + sd_mpi_libs="-L${with_mpi}/lib ${sd_mpi_libs_def}" + AC_MSG_NOTICE([user-defined MPI library flags: ${sd_mpi_libs}]) + fi + fi + + if test ! -z "${sd_mpi_cxx}"; then + AC_MSG_NOTICE([user-defined MPI C compiler: ${sd_mpi_cxx}]) + AC_MSG_CHECKING([for an executable MPI C compiler]) + if test -x "${sd_mpi_cxx}"; then + AC_MSG_RESULT([yes]) + AC_MSG_NOTICE([setting CXX to ${sd_mpi_cxx}]) + CXX="${sd_mpi_cxx}" + sd_mpi_cxx_set="yes" + else + AC_MSG_RESULT([not found]) + AC_MSG_ERROR([invalid MPI settings + Please adjust --with-mpi and/or CXX and re-run configure]) + fi + fi + ;; + + def|env|yon) + sd_mpi_cxx="${CXX}" + if test ! -z "${sd_mpi_cxx}"; then + sd_mpi_cxx_set="yes" + else + AC_CHECK_PROGS([sd_mpi_cxx], [mpic++ mpicxx]) + if test ! -z "${sd_mpi_cxx}"; then + AC_MSG_NOTICE([setting CXX to '${sd_mpi_cxx}']) + CXX="${sd_mpi_cxx}" + sd_mpi_cxx_set="yes" + fi + fi + ;; + + esac +]) # _SD_MPI_INIT_CXX + + +AC_DEFUN([_SD_MPI_CHECK_CXX], [ + # Init + sd_mpi_cxx_ok="unknown" + sd_mpi_cxx_api_ok="unknown" + + # Prepare environment + SD_ESL_SAVE_FLAGS + CPPFLAGS="${CPPFLAGS} ${sd_mpi_cppflags}" + CXXFLAGS="${CXXFLAGS} ${sd_mpi_cxxflags}" + LDFLAGS="${LDFLAGS} ${sd_mpi_ldflags}" + LIBS="${sd_mpi_libs} ${LIBS}" + + # Check the MPI implementation + _SD_MPI_CHECK_CXX_API + + # Validate C++ support + AC_MSG_CHECKING([whether the MPI C++ environment works]) + if test "${sd_mpi_cxx_api_ok}" = "yes"; then + sd_mpi_cxx_ok="yes" + else + sd_mpi_cxx_ok="no" + fi + AC_MSG_RESULT([${sd_mpi_cxx_ok}]) + + # Restore environment + SD_ESL_RESTORE_FLAGS +]) # _SD_MPI_CHECK_CXX + + +AC_DEFUN([_SD_MPI_CHECK_CXX_API], [ + # Check MPI C++ API + AC_MSG_CHECKING([whether the MPI C++ API works]) + AC_LANG_PUSH([C++]) + AC_LINK_IFELSE([AC_LANG_PROGRAM( + [[ +#include + ]], + [[ + MPI::Init() + ]])], [sd_mpi_cxx_api_ok="yes"], [sd_mpi_cxx_api_ok="no"]) + AC_LANG_POP([C++]) + AC_MSG_RESULT([${sd_mpi_cxx_api_ok}]) +]) + + + # ------------------------------------ # + + +# +# Private macros for Fortran +# + + +AC_DEFUN([_SD_MPI_INIT_FC], [ + # Look for a MPI Fortran compiler + case "${sd_mpi_init}" in + + dir) + if test -z "${FC}"; then + sd_mpi_fc="${with_mpi}/bin/mpif90" + else + tmp_fc_has_path=`echo "${FC}" | grep '/'` + if test -z "${tmp_fc_has_path}"; then + sd_mpi_fc="${with_mpi}/bin/${FC}" + else + sd_mpi_libs="-L${with_mpi}/lib ${sd_mpi_libs_def}" + AC_MSG_NOTICE([user-defined MPI library flags: ${sd_mpi_libs}]) + fi + fi + + if test ! -z "${sd_mpi_fc}"; then + AC_MSG_NOTICE([user-defined MPI Fortran compiler: ${sd_mpi_fc}]) + AC_MSG_CHECKING([for an executable MPI Fortran compiler]) + if test -x "${sd_mpi_fc}"; then + AC_MSG_RESULT([yes]) + AC_MSG_NOTICE([setting FC to ${sd_mpi_fc}]) + FC="${sd_mpi_fc}" + sd_mpi_fc_set="yes" + else + AC_MSG_RESULT([not found]) + AC_MSG_ERROR([invalid MPI settings for Fortran + Please adjust --with-mpi and/or FC and re-run configure]) + fi + fi + ;; + + def|env|yon) + sd_mpi_fc="${FC}" + if test ! -z "${sd_mpi_fc}"; then + sd_mpi_fc_set="yes" + else + AC_CHECK_PROGS([sd_mpi_fc], [mpifort mpif90 mpif95]) + if test ! -z "${sd_mpi_fc}"; then + AC_MSG_NOTICE([setting FC to '${sd_mpi_fc}']) + FC="${sd_mpi_fc}" + sd_mpi_fc_set="yes" + fi + fi + ;; + + esac +]) # _SD_MPI_INIT_FC + + +AC_DEFUN([_SD_MPI_CHECK_FC], [ + # Init + sd_mpi_fc_ok="unknown" + sd_mpi_fc_api_ok="unknown" + + # Prepare environment + SD_ESL_SAVE_FLAGS + CPPFLAGS="${CPPFLAGS} ${sd_mpi_cppflags}" + FCFLAGS="${FCFLAGS} ${sd_mpi_fcflags}" + LDFLAGS="${LDFLAGS} ${sd_mpi_ldflags}" + LIBS="${sd_mpi_libs} ${LIBS}" + + # Check the MPI implementation + _SD_MPI_CHECK_FC_API + + # Validate Fortran support + AC_MSG_CHECKING([whether the MPI Fortran environment works]) + if test "${sd_mpi_fc_api_ok}" = "yes"; then + sd_mpi_fc_ok="yes" + else + sd_mpi_fc_ok="no" + fi + AC_MSG_RESULT([${sd_mpi_fc_ok}]) + + # Restore environment + SD_ESL_RESTORE_FLAGS +]) # _SD_MPI_CHECK_FC + + +AC_DEFUN([_SD_MPI_CHECK_FC_API], [ + # Check MPI C API + AC_MSG_CHECKING([whether the MPI Fortran API works]) + AC_LANG_PUSH([Fortran]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([], + [[ + use mpi + integer :: ierr + call mpi_init(ierr) + ]])], [sd_mpi_fc_api_ok="yes"], [sd_mpi_fc_api_ok="no"]) + AC_LANG_POP([Fortran]) + AC_MSG_RESULT([${sd_mpi_fc_api_ok}]) +]) + + + # ------------------------------------ # + # ------------------------------------ # + + +# +# Utility macros +# + + +AC_DEFUN([_SD_MPI_CHECK_CONFIG], [ + # Main trigger must be yes, no, or auto + tmp_mpi_invalid="no" + if test "${sd_mpi_enable}" != "auto" -a \ + "${sd_mpi_enable}" != "no" -a \ + "${sd_mpi_enable}" != "yes"; then + case "${sd_mpi_policy}" in + fail) + AC_MSG_ERROR([invalid trigger value: sd_mpi_enable = '${sd_mpi_enable}']) + ;; + skip) + tmp_mpi_invalid="yes" + ;; + warn) + AC_MSG_WARN([invalid trigger value: sd_mpi_enable = '${sd_mpi_enable}']) + tmp_mpi_invalid="yes" + ;; + esac + fi + + # Fix wrong trigger default + if test "${tmp_mpi_invalid}" = "yes"; then + if test "${sd_mpi_status}" = "required"; then + sd_mpi_enable="yes" + else + sd_mpi_enable="no" + fi + tmp_mpi_invalid="no" + AC_MSG_NOTICE([setting sd_mpi_enable to '${sd_mpi_enable}']) + fi + + # Check consistency between trigger value and package status + tmp_mpi_invalid="no" + if test "${sd_mpi_status}" = "implicit" -o \ + "${sd_mpi_status}" = "required"; then + if test "${sd_mpi_enable}" = "no"; then + case "${sd_mpi_policy}" in + fail) + AC_MSG_ERROR([The MPI package is required and cannot be disabled.]) + ;; + skip) + tmp_mpi_invalid="yes" + ;; + warn) + AC_MSG_WARN([The MPI package is required and cannot be disabled.]) + tmp_mpi_invalid="yes" + ;; + esac + fi + if test "${sd_mpi_enable}" = "auto"; then + AC_MSG_NOTICE([setting MPI trigger to yes]) + sd_mpi_enable="yes" + fi + fi + + # Fix wrong trigger value + if test "${tmp_mpi_invalid}" = "yes"; then + case "${sd_mpi_status}" in + implicit|required) + sd_mpi_enable="yes" + ;; + optional) + sd_mpi_enable="no" + ;; + esac + tmp_mpi_invalid="no" + AC_MSG_NOTICE([setting sd_mpi_enable to '${sd_mpi_enable}']) + fi + + # When using environment variables, triggers must be set to yes + if test "${sd_mpi_init}" = "env" -a "${sd_mpi_enable}" = "no"; then + if test "${sd_mpi_policy}" != "skip"; then + AC_MSG_WARN([MPI environment variables will be ignored]) + fi + fi + + # Implicit status overrides everything + if test "${sd_mpi_status}" = "implicit"; then + sd_mpi_enable="yes" + if test "${sd_mpi_cppflags}" != ""; then + sd_mpi_cppflags="" + AC_MSG_NOTICE([resetting MPI CPP flags (implicit package)]) + fi + if test "${sd_mpi_cflags}" != ""; then + sd_mpi_cflags="" + AC_MSG_NOTICE([resetting MPI C flags (implicit package)]) + fi + if test "${sd_mpi_cxxflags}" != ""; then + sd_mpi_cxxflags="" + AC_MSG_NOTICE([resetting MPI C++ flags (implicit package)]) + fi + if test "${sd_mpi_fcflags}" != ""; then + sd_mpi_fcflags="" + AC_MSG_NOTICE([resetting MPI Fortran flags (implicit package)]) + fi + if test "${sd_mpi_ldflags}" != ""; then + sd_mpi_ldflags="" + AC_MSG_NOTICE([resetting MPI linker flags (implicit package)]) + fi + if test "${sd_mpi_libs}" != ""; then + sd_mpi_libs="" + AC_MSG_NOTICE([resetting MPI library flags (implicit package)]) + fi + fi + + # Reset build parameters if disabled + if test "${sd_mpi_enable}" = "no"; then + sd_mpi_cppflags="" + sd_mpi_cflags="" + sd_mpi_cxxflags="" + sd_mpi_fcflags="" + sd_mpi_ldflags="" + sd_mpi_libs="" + sd_mpi_ok="no" + fi + + # Clean-up + unset tmp_mpi_invalid +]) # _SD_MPI_CHECK_CONFIG + + +AC_DEFUN([_SD_MPI_DUMP_CONFIG], [ + AC_MSG_CHECKING([whether to enable MPI]) + AC_MSG_RESULT([${sd_mpi_enable}]) + if test "${sd_mpi_enable}" != "no"; then + AC_MSG_CHECKING([how MPI parameters have been set]) + AC_MSG_RESULT([${sd_mpi_init}]) + AC_MSG_CHECKING([whether the MPI C compiler is set]) + AC_MSG_RESULT([${sd_mpi_cc_set}]) + AC_MSG_CHECKING([whether the MPI C++ compiler is set]) + AC_MSG_RESULT([${sd_mpi_cxx_set}]) + AC_MSG_CHECKING([whether the MPI Fortran compiler is set]) + AC_MSG_RESULT([${sd_mpi_fc_set}]) + AC_MSG_CHECKING([for MPI C preprocessing flags]) + AC_MSG_RESULT([${sd_mpi_cppflags}]) + AC_MSG_CHECKING([for MPI C flags]) + AC_MSG_RESULT([${sd_mpi_cflags}]) + AC_MSG_CHECKING([for MPI C++ flags]) + AC_MSG_RESULT([${sd_mpi_cxxflags}]) + AC_MSG_CHECKING([for MPI Fortran flags]) + AC_MSG_RESULT([${sd_mpi_fcflags}]) + AC_MSG_CHECKING([for MPI linker flags]) + AC_MSG_RESULT([${sd_mpi_ldflags}]) + AC_MSG_CHECKING([for MPI library flags]) + AC_MSG_RESULT([${sd_mpi_libs}]) + fi +]) # _SD_MPI_DUMP_CONFIG diff --git a/GX-PAW/libpaw/config/m4/sd_core.m4 b/GX-PAW/libpaw/config/m4/sd_core.m4 new file mode 100644 index 00000000..1c49fb02 --- /dev/null +++ b/GX-PAW/libpaw/config/m4/sd_core.m4 @@ -0,0 +1,22 @@ +## Copyright (C) 2019-2024 ABINIT group (Yann Pouillon) + +# +# Steredeg core features +# + + + # ------------------------------------ # + + +# +# Public macros +# + + +AC_DEFUN([SD_CORE_INIT], [ + # Init internal Fortran-related variables + sd_sys_fcflags="" + + # Substitute Steredeg core variables + AC_SUBST(sd_sys_fcflags) +]) # SD_CORE_INIT diff --git a/GX-PAW/libpaw/config/m4/sd_esl.m4 b/GX-PAW/libpaw/config/m4/sd_esl.m4 new file mode 100644 index 00000000..d390e8b7 --- /dev/null +++ b/GX-PAW/libpaw/config/m4/sd_esl.m4 @@ -0,0 +1,82 @@ +## Copyright (C) 2019-2024 ABINIT group (Yann Pouillon) + +# +# Steredeg support for the ESL +# + + + # ------------------------------------ # + + +# +# Public macros +# + + +AC_DEFUN([SD_ESL_INIT], [ + # Declare relevant environment variables + AC_ARG_VAR([ESL_BUNDLE_PREFIX], + [Install prefix of the ESL Bundle]) + + # Init internal ESL-related variables + sd_esl_bundle_cppflags="" + sd_esl_bundle_cflags="" + sd_esl_bundle_cxxflags="" + sd_esl_bundle_fcflags="" + sd_esl_bundle_ldflags="" + sd_esl_bundle_libdirs="" + sd_esl_bundle_libs="" + sd_esl_saved_CPPFLAGS="" + sd_esl_saved_CFLAGS="" + sd_esl_saved_CXXFLAGS="" + sd_esl_saved_FCFLAGS="" + sd_esl_saved_LDFLAGS="" + sd_esl_saved_LIBS="" + sd_esl_saved_bundle_status="" + + # Translate the available ESL configuration + if test ! -z "${ESL_BUNDLE_PREFIX}"; then + sd_esl_bundle_cppflags="-I${ESL_BUNDLE_PREFIX}/include" + sd_esl_bundle_fcflags="-I${ESL_BUNDLE_PREFIX}/include" + sd_esl_bundle_libdirs="-L${ESL_BUNDLE_PREFIX}/lib" + fi +]) # SD_ESL_INIT + + +AC_DEFUN([SD_ESL_ADD_FLAGS], [ + CPPFLAGS="${CPPFLAGS} ${sd_esl_bundle_cppflags}" + CFLAGS="${CFLAGS} ${sd_esl_bundle_cflags}" + CXXFLAGS="${CXXFLAGS} ${sd_esl_bundle_cxxflags}" + FCFLAGS="${FCFLAGS} ${sd_esl_bundle_fcflags}" + LDFLAGS="${LDFLAGS} ${sd_esl_bundle_ldflags}" + if test ! -z "$1"; then + CPPFLAGS="${CPPFLAGS} -I${ESL_BUNDLE_PREFIX}/include/$1" + FCFLAGS="${FCFLAGS} -I${ESL_BUNDLE_PREFIX}/include/$1" + fi + FCFLAGS="${FCFLAGS} -I/usr/include" +]) # SD_ESL_ADD_INCLUDES + + +AC_DEFUN([SD_ESL_ADD_LIBS], [ + LIBS="${sd_esl_bundle_libdirs} $1 ${sd_esl_bundle_libs} ${LIBS}" +]) # SD_ESL_ADD_LIBS + + +AC_DEFUN([SD_ESL_RESTORE_FLAGS], [ + CPPFLAGS="${sd_esl_saved_CPPFLAGS}" + CFLAGS="${sd_esl_saved_CFLAGS}" + CXXFLAGS="${sd_esl_saved_CXXFLAGS}" + FCFLAGS="${sd_esl_saved_FCFLAGS}" + LDFLAGS="${sd_esl_saved_LDFLAGS}" + LIBS="${sd_esl_saved_LIBS}" +]) + + +AC_DEFUN([SD_ESL_SAVE_FLAGS], [ + sd_esl_saved_CPPFLAGS="${CPPFLAGS}" + sd_esl_saved_CFLAGS="${CFLAGS}" + sd_esl_saved_CXXFLAGS="${CXXFLAGS}" + sd_esl_saved_FCFLAGS="${FCFLAGS}" + sd_esl_saved_LDFLAGS="${LDFLAGS}" + sd_esl_saved_LIBS="${LIBS}" +]) diff --git a/GX-PAW/libpaw/config/m4/sd_libxc.m4 b/GX-PAW/libpaw/config/m4/sd_libxc.m4 new file mode 100644 index 00000000..86cc3e0d --- /dev/null +++ b/GX-PAW/libpaw/config/m4/sd_libxc.m4 @@ -0,0 +1,510 @@ +## Copyright (C) 2019-2024 ABINIT group (Yann Pouillon) + +# +# Exchange-Correlation functionals library (LibXC) +# + + + # ------------------------------------ # + + +# +# Public macros +# + + +AC_DEFUN([SD_LIBXC_INIT], [ + # Init + sd_libxc_cppflags="" + sd_libxc_cflags="" + sd_libxc_cxxflags="" + sd_libxc_fcflags="" + sd_libxc_ldflags="" + sd_libxc_libs="" + sd_libxc_enable="" + sd_libxc_init="unknown" + sd_libxc_c_ok="unknown" + sd_libxc_fortran_ok="unknown" + sd_libxc_ok="unknown" + + # Set adjustable parameters + sd_libxc_options="$1" + sd_libxc_libs_def="$2" + sd_libxc_cppflags_def="$3" + sd_libxc_cflags_def="$4" + sd_libxc_cxxflags_def="$5" + sd_libxc_fcflags_def="$6" + sd_libxc_ldflags_def="$7" + sd_libxc_enable_def="" + sd_libxc_enable_fc="" + sd_libxc_policy="" + sd_libxc_status="" + + # Process options + for kwd in ${sd_libxc_options}; do + case "${kwd}" in + auto) + sd_libxc_enable_def="${kwd}" + ;; + implicit|required|optional) + sd_libxc_status="${kwd}" + ;; + fail|skip|warn) + sd_libxc_policy="${kwd}" + ;; + no-fortran) + sd_libxc_enable_fc="no" + ;; + *) + AC_MSG_ERROR([invalid Steredeg LibXC option: '${kwd}']) + ;; + esac + done + + # Set reasonable defaults if not provided + test -z "${sd_libxc_enable_fc}" && sd_libxc_enable_fc="yes" + if test "${sd_libxc_enable_fc}" = "yes"; then + test -z "${sd_libxc_libs_def}" && sd_libxc_libs_def="-lxcf90 -lxc" + else + test -z "${sd_libxc_libs_def}" && sd_libxc_libs_def="-lxc" + fi + test -z "${sd_libxc_policy}" && sd_libxc_policy="fail" + test -z "${sd_libxc_status}" && sd_libxc_status="optional" + test -z "${sd_libxc_enable_def}" && sd_libxc_enable_def="no" + case "${sd_libxc_status}" in + implicit|required) + sd_libxc_enable_def="yes" + ;; + esac + + # Declare configure option + # TODO: make it switchable for the implicit case + AC_ARG_WITH([libxc], + [AS_HELP_STRING([--with-libxc], + [Install prefix of the LibXC library (e.g. /usr/local).])], + [ if test "${withval}" = "no" -o "${withval}" = "yes"; then + sd_libxc_enable="${withval}" + sd_libxc_init="yon" + else + sd_libxc_enable="yes" + sd_libxc_init="dir" + fi], + [ sd_libxc_enable="${sd_libxc_enable_def}"; sd_libxc_init="def"]) + + # Declare environment variables + AC_ARG_VAR([LIBXC_CPPFLAGS], [C preprocessing flags for LibXC.]) + AC_ARG_VAR([LIBXC_CFLAGS], [C flags for LibXC.]) + AC_ARG_VAR([LIBXC_FCFLAGS], [Fortran flags for LibXC.]) + AC_ARG_VAR([LIBXC_LDFLAGS], [Linker flags for LibXC.]) + AC_ARG_VAR([LIBXC_LIBS], [Library flags for LibXC.]) + + # Detect use of environment variables + if test "${sd_libxc_enable}" = "yes" -o "${sd_libxc_enable}" = "auto"; then + tmp_libxc_vars="${LIBXC_CPPFLAGS}${LIBXC_CFLAGS}${LIBXC_LDFLAGS}${LIBXC_LIBS}" + if test "${sd_libxc_enable_fc}" = "yes"; then + tmp_libxc_vars="${tmp_libxc_vars}${LIBXC_FCFLAGS}" + fi + if test "${sd_libxc_init}" = "def" -a ! -z "${tmp_libxc_vars}"; then + sd_libxc_enable="yes" + sd_libxc_init="env" + fi + fi + + # Make sure configuration is correct + if test "${STEREDEG_BYPASS_CONSISTENCY}" != "yes"; then + _SD_LIBXC_CHECK_CONFIG + fi + # Adjust configuration depending on init type + if test "${sd_libxc_enable}" = "yes" -o "${sd_libxc_enable}" = "auto"; then + + # Set LibXC-specific flags + case "${sd_libxc_init}" in + + def|yon) + sd_libxc_cppflags="${sd_libxc_cppflags_def}" + sd_libxc_cflags="${sd_libxc_cflags_def}" + test "${sd_libxc_enable_fc}" = "yes" && \ + sd_libxc_fcflags="${sd_libxc_fcflags_def}" + sd_libxc_ldflags="${sd_libxc_ldflags_def}" + sd_libxc_libs="${sd_libxc_libs_def}" + ;; + + dir) + sd_libxc_cppflags="-I${with_libxc}/include" + sd_libxc_cflags="${sd_libxc_cflags_def}" + test "${sd_libxc_enable_fc}" = "yes" && \ + sd_libxc_fcflags="${sd_libxc_fcflags_def} -I${with_libxc}/include" + sd_libxc_ldflags="${sd_libxc_ldflags_def}" + sd_libxc_libs="-L${with_libxc}/lib ${sd_libxc_libs_def}" + ;; + + env) + sd_libxc_cppflags="${sd_libxc_cppflags_def}" + sd_libxc_cflags="${sd_libxc_cflags_def}" + test "${sd_libxc_enable_fc}" = "yes" && \ + sd_libxc_fcflags="${sd_libxc_fcflags_def}" + sd_libxc_ldflags="${sd_libxc_ldflags_def}" + sd_libxc_libs="${sd_libxc_libs_def}" + test ! -z "${LIBXC_CPPFLAGS}" && sd_libxc_cppflags="${LIBXC_CPPFLAGS}" + test ! -z "${LIBXC_CFLAGS}" && sd_libxc_cflags="${LIBXC_CFLAGS}" + if test "${sd_libxc_enable_fc}" = "yes"; then + test ! -z "${LIBXC_FCFLAGS}" && sd_libxc_fcflags="${LIBXC_FCFLAGS}" + fi + test ! -z "${LIBXC_LDFLAGS}" && sd_libxc_ldflags="${LIBXC_LDFLAGS}" + test ! -z "${LIBXC_LIBS}" && sd_libxc_libs="${LIBXC_LIBS}" + ;; + + *) + AC_MSG_ERROR([invalid init type for LibXC: '${sd_libxc_init}']) + ;; + + esac + + fi + + # Override the default configuration if the ESL Bundle is available + # Note: The setting of the build flags is done once for all + # ESL-bundled packages + if test "${sd_libxc_init}" = "def" -a ! -z "${ESL_BUNDLE_PREFIX}"; then + sd_libxc_init="esl" + sd_libxc_cppflags="" + sd_libxc_cflags="" + sd_libxc_fcflags="" + sd_libxc_ldflags="" + sd_libxc_libs="" + fi + + # Display configuration + _SD_LIBXC_DUMP_CONFIG + + # Export configuration + AC_SUBST(sd_libxc_options) + AC_SUBST(sd_libxc_enable_def) + AC_SUBST(sd_libxc_enable_fc) + AC_SUBST(sd_libxc_policy) + AC_SUBST(sd_libxc_status) + AC_SUBST(sd_libxc_enable) + AC_SUBST(sd_libxc_init) + AC_SUBST(sd_libxc_ok) + AC_SUBST(sd_libxc_cppflags) + AC_SUBST(sd_libxc_cflags) + AC_SUBST(sd_libxc_fcflags) + AC_SUBST(sd_libxc_ldflags) + AC_SUBST(sd_libxc_libs) + AC_SUBST(with_libxc) + + # Clean-up + unset tmp_libxc_vars +]) # SD_LIBXC_INIT + + +AC_DEFUN([SD_LIBXC_DETECT], [ + # Display configuration + _SD_LIBXC_DUMP_CONFIG + + # Check whether we can compile and link a simple program + # and update build flags if successful + if test "${sd_libxc_enable}" = "auto" -o "${sd_libxc_enable}" = "yes"; then + _SD_LIBXC_CHECK_USE + + if test "${sd_libxc_ok}" = "yes"; then + if test "${sd_libxc_init}" = "esl"; then + sd_esl_bundle_libs="${sd_libxc_libs_def} ${sd_esl_bundle_libs}" + else + FCFLAGS="${FCFLAGS} ${sd_libxc_fcflags}" + LIBS="${sd_libxc_libs} ${LIBS}" + fi + LDFLAGS="${LDFLAGS} ${sd_libxc_ldflags}" + + AC_DEFINE([HAVE_LIBXC], 1, + [Define to 1 if you have the LibXC library.]) + else + if test "${sd_libxc_status}" = "optional" -a \ + "${sd_libxc_init}" = "def"; then + sd_libxc_enable="no" + sd_libxc_cppflags="" + sd_libxc_cflags="" + sd_libxc_fcflags="" + sd_libxc_ldflags="" + sd_libxc_libs="" + else + AC_MSG_FAILURE([invalid LibXC configuration]) + fi + fi + fi +]) + + + # ------------------------------------ # + + +# +# Private macros +# + + +AC_DEFUN([_SD_LIBXC_CHECK_USE], [ + # Prepare environment + SD_ESL_SAVE_FLAGS + if test "${sd_libxc_init}" = "esl"; then + AC_MSG_NOTICE([will look for LibXC in the installed ESL Bundle]) + SD_ESL_ADD_FLAGS + SD_ESL_ADD_LIBS([${sd_libxc_libs_def}]) + else + CPPFLAGS="${CPPFLAGS} ${sd_libxc_cppflags}" + CFLAGS="${CFLAGS} ${sd_libxc_cflags}" + FCFLAGS="${FCFLAGS} ${sd_libxc_fcflags}" + LDFLAGS="${LDFLAGS} ${sd_libxc_ldflags}" + LIBS="${sd_libxc_libs} ${LIBS}" + fi + + # Check LibXC C API + AC_MSG_CHECKING([whether the LibXC library works]) + AC_LANG_PUSH([C]) + AC_LINK_IFELSE([AC_LANG_PROGRAM( + [[ +#include + ]], + [[ + int ma, mi, mu; + xc_version(&ma, &mi, &mu); + ]])], [sd_libxc_c_ok="yes"], [sd_libxc_c_ok="no"]) + AC_LANG_POP([C]) + AC_MSG_RESULT([${sd_libxc_c_ok}]) + + # Check old LibXC C API + if test "${sd_libxc_c_ok}" != "yes"; then + AC_MSG_CHECKING([whether the LibXC library has an old API]) + AC_LANG_PUSH([C]) + AC_LINK_IFELSE([AC_LANG_PROGRAM( + [[ +#include + ]], + [[ + int ma, mi; + xc_version(&ma, &mi); + ]])], [sd_libxc_c_ok="yes"], [sd_libxc_c_ok="no"]) + AC_LANG_POP([C]) + AC_MSG_RESULT([${sd_libxc_c_ok}]) + fi + + # Check LibXC Fortran API + if test "${sd_libxc_c_ok}" = "yes" -a "${sd_libxc_enable_fc}" = "yes"; then + AC_MSG_CHECKING([whether the LibXC Fortran interface works]) + for tmp_incs in "" "-I/usr/include"; do + FCFLAGS="${FCFLAGS} ${tmp_incs}" + AC_LANG_PUSH([Fortran]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([], + [[ + use libxc_m + implicit none + integer :: ma, mi, mu + call xc_f90_version(ma, mi, mu) + ]])], [sd_libxc_fortran_ok="yes"], [sd_libxc_fortran_ok="no"]) + AC_LANG_POP([Fortran]) + if test "${sd_libxc_fortran_ok}" = "yes"; then + test "${sd_fc_sys_incpath}" = "" && sd_fc_sys_incpath="${tmp_incs}" + break + fi + done + AC_MSG_RESULT([${sd_libxc_fortran_ok}]) + fi + unset tmp_incs + + # Combine the available results + sd_libxc_ok="no" + if test "${sd_libxc_enable_fc}" = "yes"; then + if test "${sd_libxc_c_ok}" = "yes" -a \ + "${sd_libxc_fortran_ok}" = "yes"; then + sd_libxc_ok="yes" + fi + else + if test "${sd_libxc_c_ok}" = "yes"; then + sd_libxc_ok="yes" + fi + fi + + # Restore environment + SD_ESL_RESTORE_FLAGS +]) # _SD_LIBXC_CHECK_USE + + + # ------------------------------------ # + # ------------------------------------ # + + +# +# Utility macros +# + + +AC_DEFUN([_SD_LIBXC_CHECK_CONFIG], [ + # Default trigger must be yes, no, or auto + tmp_libxc_invalid="no" + if test "${sd_libxc_enable_def}" != "auto" -a \ + "${sd_libxc_enable_def}" != "no" -a \ + "${sd_libxc_enable_def}" != "yes"; then + case "${sd_libxc_policy}" in + fail) + AC_MSG_ERROR([invalid default value: sd_libxc_enable_def = '${sd_libxc_enable_def}']) + ;; + skip) + tmp_libxc_invalid="yes" + ;; + warn) + AC_MSG_WARN([invalid default value: sd_libxc_enable_def = '${sd_libxc_enable_def}']) + tmp_libxc_invalid="yes" + ;; + esac + fi + + # Fix wrong trigger default + if test "${tmp_libxc_invalid}" = "yes"; then + if test "${sd_libxc_status}" = "required"; then + sd_libxc_enable_def="yes" + else + sd_libxc_enable_def="no" + fi + tmp_libxc_invalid="no" + AC_MSG_NOTICE([setting sd_libxc_enable_def to '${sd_libxc_enable_def}']) + fi + + # Check consistency between trigger value and package status + tmp_libxc_invalid="no" + if test "${sd_libxc_status}" = "implicit" -o \ + "${sd_libxc_status}" = "required"; then + if test "${sd_libxc_enable}" = "no"; then + case "${sd_libxc_policy}" in + fail) + AC_MSG_ERROR([The LibXC package is required and cannot be disabled + See https://tddft.org/programs/libxc/ for details on how to + install it.]) + ;; + skip) + tmp_libxc_invalid="yes" + ;; + warn) + AC_MSG_WARN([The LibXC package is required and cannot be disabled]) + tmp_libxc_invalid="yes" + ;; + esac + fi + if test "${sd_libxc_enable}" = "auto"; then + AC_MSG_NOTICE([setting LibXC trigger to yes]) + sd_libxc_enable="yes" + fi + fi + + # Fix wrong trigger value + if test "${tmp_libxc_invalid}" = "yes"; then + case "${sd_libxc_status}" in + implicit|required) + sd_libxc_enable="yes" + ;; + optional) + sd_libxc_enable="no" + ;; + esac + tmp_libxc_invalid="no" + AC_MSG_NOTICE([setting sd_libxc_enable to '${sd_libxc_enable}']) + fi + + # Environment variables conflict with --with-* options + tmp_libxc_vars="${LIBXC_CPPFLAGS}${LIBXC_CFLAGS}${LIBXC_FCFLAGS}${LIBXC_LDFLAGS}${LIBXC_LIBS}" + tmp_libxc_invalid="no" + if test ! -z "${tmp_libxc_vars}" -a ! -z "${with_libxc}"; then + case "${sd_libxc_policy}" in + fail) + AC_MSG_ERROR([conflicting option settings for LibXC + Please use LIBXC_FCFLAGS + LIBXC_LIBS or --with-libxc, + not both.]) + ;; + skip) + tmp_libxc_invalid="yes" + ;; + warn) + AC_MSG_WARN([conflicting option settings for LibXC]) + tmp_libxc_invalid="yes" + ;; + esac + fi + + # When using environment variables, triggers must be set to yes + if test -n "${tmp_libxc_vars}"; then + sd_libxc_enable="yes" + sd_libxc_init="env" + if test "${tmp_libxc_invalid}" = "yes"; then + tmp_libxc_invalid="no" + AC_MSG_NOTICE([overriding --with-libxc with LIBXC_{FCFLAGS,LDFLAGS,LIBS}]) + fi + fi + + # Implicit status overrides everything + if test "${sd_libxc_status}" = "implicit"; then + if test "${sd_libxc_fcflags}" != ""; then + sd_libxc_fcflags="" + AC_MSG_NOTICE([resetting LibXC Fortran flags (implicit package)]) + fi + if test "${sd_libxc_ldflags}" != ""; then + sd_libxc_ldflags="" + AC_MSG_NOTICE([resetting LibXC linker flags (implicit package)]) + fi + if test "${sd_libxc_libs}" != ""; then + sd_libxc_libs="" + AC_MSG_NOTICE([resetting LibXC library flags (implicit package)]) + fi + fi + + # Reset build parameters if disabled + if test "${sd_libxc_enable}" = "implicit"; then + sd_libxc_fcflags="" + sd_libxc_ldflags="" + sd_libxc_libs="" + fi + + # Clean-up + unset tmp_libxc_invalid + unset tmp_libxc_vars +]) # _SD_LIBXC_CHECK_CONFIG + + +AC_DEFUN([_SD_LIBXC_DUMP_CONFIG], [ + AC_MSG_CHECKING([whether to enable LibXC]) + AC_MSG_RESULT([${sd_libxc_enable}]) + if test "${sd_libxc_enable}" != "no"; then + AC_MSG_CHECKING([how LibXC parameters have been set]) + AC_MSG_RESULT([${sd_libxc_init}]) + AC_MSG_CHECKING([for LibXC C preprocessing flags]) + if test "${sd_libxc_cppflags}" = ""; then + AC_MSG_RESULT([none]) + else + AC_MSG_RESULT([${sd_libxc_cppflags}]) + fi + AC_MSG_CHECKING([for LibXC C flags]) + if test "${sd_libxc_cflags}" = ""; then + AC_MSG_RESULT([none]) + else + AC_MSG_RESULT([${sd_libxc_cflags}]) + fi + if test "${sd_libxc_enable_fc}" = "yes"; then + AC_MSG_CHECKING([for LibXC Fortran flags]) + if test "${sd_libxc_fcflags}" = ""; then + AC_MSG_RESULT([none]) + else + AC_MSG_RESULT([${sd_libxc_fcflags}]) + fi + fi + AC_MSG_CHECKING([for LibXC linker flags]) + if test "${sd_libxc_ldflags}" = ""; then + AC_MSG_RESULT([none]) + else + AC_MSG_RESULT([${sd_libxc_ldflags}]) + fi + AC_MSG_CHECKING([for LibXC library flags]) + if test "${sd_libxc_libs}" = ""; then + AC_MSG_RESULT([none]) + else + AC_MSG_RESULT([${sd_libxc_libs}]) + fi + fi +]) # _SD_LIBXC_DUMP_CONFIG diff --git a/GX-PAW/libpaw/config/m4/workarounds.m4 b/GX-PAW/libpaw/config/m4/workarounds.m4 new file mode 100644 index 00000000..391b9283 --- /dev/null +++ b/GX-PAW/libpaw/config/m4/workarounds.m4 @@ -0,0 +1,28 @@ +# +# M4 macros for LibPAW (imported from Abinit) +# +# Copyright (C) 2006-2024 ABINIT Group (Yann Pouillon) + + + +# +# Workarounds for portability issues +# + + + +# AX_PROG_MKDIR_P() +# ----------------- +# +# Wrapper for the bugged AC_PROG_MKDIR_P macro. +# +AC_DEFUN([AX_PROG_MKDIR_P],[ + _AC_SRCDIRS([.]) + AC_PROG_MKDIR_P + ax_tmp_mkdir_p=`echo "${MKDIR_P}" | awk '{print [$]1}'` + if test "${ax_tmp_mkdir_p}" = "config/gnu/install-sh"; then + AC_MSG_NOTICE([fixing wrong path to mkdir replacement]) + MKDIR_P="${ac_abs_top_srcdir}/${MKDIR_P}" + fi + unset ax_tmp_mkdir_p +]) # AX_PROG_MKDIR_P diff --git a/GX-PAW/libpaw/config/makefiles/doc.am b/GX-PAW/libpaw/config/makefiles/doc.am new file mode 100644 index 00000000..c3d87367 --- /dev/null +++ b/GX-PAW/libpaw/config/makefiles/doc.am @@ -0,0 +1,10 @@ +## Copyright (C) 2018-2024 ABINIT group (Yann Pouillon ) + +# +# Makefile for the documentation of LibPAW +# + +# Additional files +EXTRA_DIST = \ + logo-libpaw-500x500.png \ + logo-libpaw.svg diff --git a/GX-PAW/libpaw/config/makefiles/libxc.am b/GX-PAW/libpaw/config/makefiles/libxc.am new file mode 100644 index 00000000..514e6027 --- /dev/null +++ b/GX-PAW/libpaw/config/makefiles/libxc.am @@ -0,0 +1,29 @@ +## Copyright (C) 2018-2024 ABINIT group (Yann Pouillon ) + +# +# Makefile for the LibXC bindings of LibPAW +# + + # ------------------------------------ # + +# +# Source files +# + +# C source - keep this in alphabetical order +pawxc_core_srcs = \ + libpaw_libxc.c + + # ------------------------------------ # + +# +# Build targets +# + +# Essential build parameters +AM_CPPFLAGS = -I$(top_srcdir) -I$(top_builddir) + +# Libraries +noinst_LIBRARIES = libpaw_libxc.a + +libpaw_libxc_a_SOURCES = $(pawxc_core_srcs) diff --git a/GX-PAW/libpaw/config/makefiles/src.am b/GX-PAW/libpaw/config/makefiles/src.am new file mode 100644 index 00000000..b7f54fb7 --- /dev/null +++ b/GX-PAW/libpaw/config/makefiles/src.am @@ -0,0 +1,262 @@ +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-corelibs on 2018/06/20 16:22:31 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-corelibs script or its config file instead. +# + +# Build parameters +#AM_CPPFLAGS = \ +# @src_12_hide_mpi_incs@ \ +# @src_41_xc_lowlevel_incs@ \ +# @src_14_hidewrite_incs@ \ +# @lib_libxc_incs@ \ +# @lib_netcdf_incs@ + +# Regular source files +libpaw_srcs = \ + m_libpaw_mpi.F90 \ + m_libpaw_tools.F90 \ + m_libpaw_libxc.F90 \ + m_paral_atom.F90 \ + m_paw_numeric.F90 \ + m_paw_sphharm.F90 \ + m_paw_io.F90 \ + m_pawang.F90 \ + m_pawrad.F90 \ + m_pawtab.F90 \ + m_paw_an.F90 \ + m_paw_ij.F90 \ + m_pawfgrtab.F90 \ + m_paw_finegrid.F90 \ + m_pawcprj.F90 \ + m_pawrhoij.F90 \ + m_pawdij.F90 \ + m_pawxc.F90 \ + m_paw_atom.F90 \ + m_paw_gaussfit.F90 \ + m_paw_onsite.F90 \ + m_pawxmlps.F90 \ + m_pawpsp.F90 + +# Optional source files +libpaw_opt_srcs = \ + m_libpaw_defs.F90 + +# Regular Fortran modules +if FORTRAN_MOD_UPPERCASE +libpaw_mods = \ + M_LIBPAW_DEFS.$(FMODEXT) \ + M_LIBPAW_LIBXC.$(FMODEXT) \ + M_LIBPAW_LIBXC_FUNCS.$(FMODEXT) \ + M_LIBPAW_MPI.$(FMODEXT) \ + M_LIBPAW_TOOLS.$(FMODEXT) \ + M_PARAL_ATOM.$(FMODEXT) \ + M_PAW_AN.$(FMODEXT) \ + M_PAW_ATOM.$(FMODEXT) \ + M_PAW_FINEGRID.$(FMODEXT) \ + M_PAW_GAUSSFIT.$(FMODEXT) \ + M_PAW_IJ.$(FMODEXT) \ + M_PAW_IO.$(FMODEXT) \ + M_PAW_NUMERIC.$(FMODEXT) \ + M_PAW_ONSITE.$(FMODEXT) \ + M_PAW_SPHHARM.$(FMODEXT) \ + M_PAWANG.$(FMODEXT) \ + M_PAWCPRJ.$(FMODEXT) \ + M_PAWDIJ.$(FMODEXT) \ + M_PAWFGRTAB.$(FMODEXT) \ + M_PAWPSP.$(FMODEXT) \ + M_PAWRAD.$(FMODEXT) \ + M_PAWRHOIJ.$(FMODEXT) \ + M_PAWTAB.$(FMODEXT) \ + M_PAWXC.$(FMODEXT) \ + M_PAWXMLPS.$(FMODEXT) +else +libpaw_mods = \ + m_libpaw_defs.$(FMODEXT) \ + m_libpaw_libxc.$(FMODEXT) \ + m_libpaw_libxc_funcs.$(FMODEXT) \ + m_libpaw_mpi.$(FMODEXT) \ + m_libpaw_tools.$(FMODEXT) \ + m_paral_atom.$(FMODEXT) \ + m_paw_an.$(FMODEXT) \ + m_paw_atom.$(FMODEXT) \ + m_paw_finegrid.$(FMODEXT) \ + m_paw_gaussfit.$(FMODEXT) \ + m_paw_ij.$(FMODEXT) \ + m_paw_io.$(FMODEXT) \ + m_paw_numeric.$(FMODEXT) \ + m_paw_onsite.$(FMODEXT) \ + m_paw_sphharm.$(FMODEXT) \ + m_pawang.$(FMODEXT) \ + m_pawcprj.$(FMODEXT) \ + m_pawdij.$(FMODEXT) \ + m_pawfgrtab.$(FMODEXT) \ + m_pawpsp.$(FMODEXT) \ + m_pawrad.$(FMODEXT) \ + m_pawrhoij.$(FMODEXT) \ + m_pawtab.$(FMODEXT) \ + m_pawxc.$(FMODEXT) \ + m_pawxmlps.$(FMODEXT) +endif + +# Optional Fortran modules +libpaw_opt_mods = \ + m_libpaw_defs.$(FMODEXT) + +# Library description +lib_LIBRARIES = libpaw.a + +libpaw_a_SOURCES = $(libpaw_srcs) +libpaw_a_LIBADD = ../libxc/libpaw_libxc.a + +# Make sure optional source files are distributed +EXTRA_DIST = $(libpaw_opt_srcs) + + # ------------------------------------ # + +# Clean explicitly preprocessed files +CLEANFILES = \ + m_libpaw_mpi_cpp.f90 \ + m_libpaw_tools_cpp.f90 \ + m_libpaw_libxc_cpp.f90 \ + m_paral_atom_cpp.f90 \ + m_paw_numeric_cpp.f90 \ + m_paw_onsite_cpp.f90 \ + m_paw_sphharm_cpp.f90 \ + m_paw_io_cpp.f90 \ + m_pawang_cpp.f90 \ + m_pawrad_cpp.f90 \ + m_pawtab_cpp.f90 \ + m_paw_an_cpp.f90 \ + m_paw_ij_cpp.f90 \ + m_pawfgrtab_cpp.f90 \ + m_paw_finegrid_cpp.f90 \ + m_pawcprj_cpp.f90 \ + m_pawrhoij_cpp.f90 \ + m_pawdij_cpp.f90 \ + m_pawxc_cpp.f90 \ + m_paw_atom_cpp.f90 \ + m_paw_gaussfit_cpp.f90 \ + m_pawxmlps_cpp.f90 \ + m_pawpsp_cpp.f90 + +# Clean Fortran modules +CLEANFILES += $(libpaw_mods) $(libpaw_opt_mods) + + # ------------------------------------ # + +# Explicit dependencies +m_libpaw_libxc.$(OBJEXT): \ + m_libpaw_defs.$(OBJEXT) \ + m_libpaw_tools.$(OBJEXT) + +m_libpaw_mpi.$(OBJEXT): \ + m_libpaw_defs.$(OBJEXT) + +m_libpaw_tools.$(OBJEXT): \ + m_libpaw_mpi.$(OBJEXT) + +m_paw_an.$(OBJEXT): \ + m_paral_atom.$(OBJEXT) \ + m_pawang.$(OBJEXT) \ + m_pawtab.$(OBJEXT) + +m_paral_atom.$(OBJEXT): \ + m_libpaw_defs.$(OBJEXT) \ + m_libpaw_tools.$(OBJEXT) + +m_paw_atom.$(OBJEXT): \ + m_paw_numeric.$(OBJEXT) \ + m_pawrad.$(OBJEXT) \ + m_pawtab.$(OBJEXT) + +m_paw_finegrid.$(OBJEXT): \ + m_paw_numeric.$(OBJEXT) \ + m_paw_sphharm.$(OBJEXT) \ + m_pawtab.$(OBJEXT) + +m_paw_gaussfit.$(OBJEXT): \ + m_paw_numeric.$(OBJEXT) \ + m_pawrad.$(OBJEXT) + +m_paw_ij.$(OBJEXT): \ + m_paral_atom.$(OBJEXT) \ + m_paw_io.$(OBJEXT) \ + m_pawtab.$(OBJEXT) + +m_paw_io.$(OBJEXT): \ + m_libpaw_defs.$(OBJEXT) \ + m_libpaw_tools.$(OBJEXT) + +m_paw_numeric.$(OBJEXT): \ + m_libpaw_defs.$(OBJEXT) \ + m_libpaw_tools.$(OBJEXT) + +m_paw_onsite.$(OBJEXT): \ + m_paw_sphharm.$(OBJEXT) \ + m_pawrad.$(OBJEXT) \ + m_pawtab.$(OBJEXT) + +m_paw_sphharm.$(OBJEXT): \ + m_libpaw_tools.$(OBJEXT) + +m_pawang.$(OBJEXT): \ + m_paw_sphharm.$(OBJEXT) + +m_pawcprj.$(OBJEXT): \ + m_pawtab.$(OBJEXT) + +m_pawdij.$(OBJEXT): \ + m_paral_atom.$(OBJEXT) \ + m_paw_an.$(OBJEXT) \ + m_paw_finegrid.$(OBJEXT) \ + m_paw_ij.$(OBJEXT) \ + m_paw_io.$(OBJEXT) \ + m_paw_sphharm.$(OBJEXT) \ + m_pawang.$(OBJEXT) \ + m_pawfgrtab.$(OBJEXT) \ + m_pawrad.$(OBJEXT) \ + m_pawrhoij.$(OBJEXT) \ + m_pawtab.$(OBJEXT) + +m_pawfgrtab.$(OBJEXT): \ + m_paral_atom.$(OBJEXT) + +m_pawpsp.$(OBJEXT): \ + m_libpaw_libxc.$(OBJEXT) \ + m_libpaw_tools.$(OBJEXT) \ + m_paw_atom.$(OBJEXT) \ + m_paw_gaussfit.$(OBJEXT) \ + m_paw_numeric.$(OBJEXT) \ + m_pawang.$(OBJEXT) \ + m_pawrad.$(OBJEXT) \ + m_pawtab.$(OBJEXT) \ + m_pawxc.$(OBJEXT) \ + m_pawxmlps.$(OBJEXT) + +m_pawrad.$(OBJEXT): \ + m_paw_numeric.$(OBJEXT) + +m_pawrhoij.$(OBJEXT): \ + m_libpaw_tools.$(OBJEXT) \ + m_paral_atom.$(OBJEXT) \ + m_paw_io.$(OBJEXT) \ + m_pawang.$(OBJEXT) \ + m_pawtab.$(OBJEXT) + +m_pawtab.$(OBJEXT): \ + m_libpaw_tools.$(OBJEXT) + +m_pawxc.$(OBJEXT): \ + m_libpaw_libxc.$(OBJEXT) \ + m_pawang.$(OBJEXT) \ + m_pawrad.$(OBJEXT) + +m_pawxmlps.$(OBJEXT): \ + m_paw_numeric.$(OBJEXT) \ + m_pawrad.$(OBJEXT) diff --git a/GX-PAW/libpaw/config/makefiles/top.am b/GX-PAW/libpaw/config/makefiles/top.am new file mode 100644 index 00000000..f93a031f --- /dev/null +++ b/GX-PAW/libpaw/config/makefiles/top.am @@ -0,0 +1,42 @@ +## Copyright (C) 2018-2024 ABINIT group (Yann Pouillon ) + +# +# Top Makefile for LibPAW +# + +# Information for aclocal, to rebuild makefiles on the fly when needed +ACLOCAL_AMFLAGS = -I config/m4 + +# Make sure that 'make distcheck' performs a minimal build +AM_DISTCHECK_CONFIGURE_FLAGS = \ + --disable-debug \ + --without-libxc \ + --without-mpi + +# Delegate all build tasks to subdirectories +SUBDIRS = libxc src doc + +# Files to install for pkg-config +# See http://www.freedesktop.org/wiki/Software/pkg-config/ for details +pkgconfigdir = $(libdir)/pkgconfig +nodist_pkgconfig_DATA = config/data/libpaw.pc + +# Some files are not removed by default and cause "make distcleancheck" to fail +DISTCLEANFILES = \ + config/data/libpaw.pc \ + libpaw-*.tar.bz2 \ + libpaw-*.tar.gz \ + libpaw-*.tar.xz + +# We use our own version of Markdown to build Markdown documentation +EXTRA_DIST = config/scripts/markdown + +FIND = find + +# Rename MPI objects beginning with xmpi +export: distdir + $(FIND) $(distdir)/src -name '*.F90' -exec \ + $(SED) -i'.orig' -e 's/xmpi_/xpaw_mpi_/g' {} \; + rm -rf $(distdir)/src/*.orig + tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz + $(am__post_remove_distdir) diff --git a/GX-PAW/libpaw/config/scripts/markdown b/GX-PAW/libpaw/config/scripts/markdown new file mode 100755 index 00000000..e4c8469d --- /dev/null +++ b/GX-PAW/libpaw/config/scripts/markdown @@ -0,0 +1,1450 @@ +#!/usr/bin/perl + +# +# Markdown -- A text-to-HTML conversion tool for web writers +# +# Copyright (c) 2004 John Gruber +# +# + + +package Markdown; +require 5.006_000; +use strict; +use warnings; + +use Digest::MD5 qw(md5_hex); +use vars qw($VERSION); +$VERSION = '1.0.1'; +# Tue 14 Dec 2004 + +## Disabled; causes problems under Perl 5.6.1: +# use utf8; +# binmode( STDOUT, ":utf8" ); # c.f.: http://acis.openlib.org/dev/perl-unicode-struggle.html + + +# +# Global default settings: +# +my $g_empty_element_suffix = " />"; # Change to ">" for HTML output +my $g_tab_width = 4; + + +# +# Globals: +# + +# Regex to match balanced [brackets]. See Friedl's +# "Mastering Regular Expressions", 2nd Ed., pp. 328-331. +my $g_nested_brackets; +$g_nested_brackets = qr{ + (?> # Atomic matching + [^\[\]]+ # Anything other than brackets + | + \[ + (??{ $g_nested_brackets }) # Recursive set of nested brackets + \] + )* +}x; + + +# Table of hash values for escaped characters: +my %g_escape_table; +foreach my $char (split //, '\\`*_{}[]()>#+-.!') { + $g_escape_table{$char} = md5_hex($char); +} + + +# Global hashes, used by various utility routines +my %g_urls; +my %g_titles; +my %g_html_blocks; + +# Used to track when we're inside an ordered or unordered list +# (see _ProcessListItems() for details): +my $g_list_level = 0; + + +#### Blosxom plug-in interface ########################################## + +# Set $g_blosxom_use_meta to 1 to use Blosxom's meta plug-in to determine +# which posts Markdown should process, using a "meta-markup: markdown" +# header. If it's set to 0 (the default), Markdown will process all +# entries. +my $g_blosxom_use_meta = 0; + +sub start { 1; } +sub story { + my($pkg, $path, $filename, $story_ref, $title_ref, $body_ref) = @_; + + if ( (! $g_blosxom_use_meta) or + (defined($meta::markup) and ($meta::markup =~ /^\s*markdown\s*$/i)) + ){ + $$body_ref = Markdown($$body_ref); + } + 1; +} + + +#### Movable Type plug-in interface ##################################### +eval {require MT}; # Test to see if we're running in MT. +unless ($@) { + require MT; + import MT; + require MT::Template::Context; + import MT::Template::Context; + + eval {require MT::Plugin}; # Test to see if we're running >= MT 3.0. + unless ($@) { + require MT::Plugin; + import MT::Plugin; + my $plugin = new MT::Plugin({ + name => "Markdown", + description => "A plain-text-to-HTML formatting plugin. (Version: $VERSION)", + doc_link => 'http://daringfireball.net/projects/markdown/' + }); + MT->add_plugin( $plugin ); + } + + MT::Template::Context->add_container_tag(MarkdownOptions => sub { + my $ctx = shift; + my $args = shift; + my $builder = $ctx->stash('builder'); + my $tokens = $ctx->stash('tokens'); + + if (defined ($args->{'output'}) ) { + $ctx->stash('markdown_output', lc $args->{'output'}); + } + + defined (my $str = $builder->build($ctx, $tokens) ) + or return $ctx->error($builder->errstr); + $str; # return value + }); + + MT->add_text_filter('markdown' => { + label => 'Markdown', + docs => 'http://daringfireball.net/projects/markdown/', + on_format => sub { + my $text = shift; + my $ctx = shift; + my $raw = 0; + if (defined $ctx) { + my $output = $ctx->stash('markdown_output'); + if (defined $output && $output =~ m/^html/i) { + $g_empty_element_suffix = ">"; + $ctx->stash('markdown_output', ''); + } + elsif (defined $output && $output eq 'raw') { + $raw = 1; + $ctx->stash('markdown_output', ''); + } + else { + $raw = 0; + $g_empty_element_suffix = " />"; + } + } + $text = $raw ? $text : Markdown($text); + $text; + }, + }); + + # If SmartyPants is loaded, add a combo Markdown/SmartyPants text filter: + my $smartypants; + + { + no warnings "once"; + $smartypants = $MT::Template::Context::Global_filters{'smarty_pants'}; + } + + if ($smartypants) { + MT->add_text_filter('markdown_with_smartypants' => { + label => 'Markdown With SmartyPants', + docs => 'http://daringfireball.net/projects/markdown/', + on_format => sub { + my $text = shift; + my $ctx = shift; + if (defined $ctx) { + my $output = $ctx->stash('markdown_output'); + if (defined $output && $output eq 'html') { + $g_empty_element_suffix = ">"; + } + else { + $g_empty_element_suffix = " />"; + } + } + $text = Markdown($text); + $text = $smartypants->($text, '1'); + }, + }); + } +} +else { +#### BBEdit/command-line text filter interface ########################## +# Needs to be hidden from MT (and Blosxom when running in static mode). + + # We're only using $blosxom::version once; tell Perl not to warn us: + no warnings 'once'; + unless ( defined($blosxom::version) ) { + use warnings; + + #### Check for command-line switches: ################# + my %cli_opts; + use Getopt::Long; + Getopt::Long::Configure('pass_through'); + GetOptions(\%cli_opts, + 'version', + 'shortversion', + 'html4tags', + ); + if ($cli_opts{'version'}) { # Version info + print "\nThis is Markdown, version $VERSION.\n"; + print "Copyright 2004 John Gruber\n"; + print "http://daringfireball.net/projects/markdown/\n\n"; + exit 0; + } + if ($cli_opts{'shortversion'}) { # Just the version number string. + print $VERSION; + exit 0; + } + if ($cli_opts{'html4tags'}) { # Use HTML tag style instead of XHTML + $g_empty_element_suffix = ">"; + } + + + #### Process incoming text: ########################### + my $text; + { + local $/; # Slurp the whole file + $text = <>; + } + print Markdown($text); + } +} + + + +sub Markdown { +# +# Main function. The order in which other subs are called here is +# essential. Link and image substitutions need to happen before +# _EscapeSpecialChars(), so that any *'s or _'s in the +# and tags get encoded. +# + my $text = shift; + + # Clear the global hashes. If we don't clear these, you get conflicts + # from other articles when generating a page which contains more than + # one article (e.g. an index page that shows the N most recent + # articles): + %g_urls = (); + %g_titles = (); + %g_html_blocks = (); + + + # Standardize line endings: + $text =~ s{\r\n}{\n}g; # DOS to Unix + $text =~ s{\r}{\n}g; # Mac to Unix + + # Make sure $text ends with a couple of newlines: + $text .= "\n\n"; + + # Convert all tabs to spaces. + $text = _Detab($text); + + # Strip any lines consisting only of spaces and tabs. + # This makes subsequent regexen easier to write, because we can + # match consecutive blank lines with /\n+/ instead of something + # contorted like /[ \t]*\n+/ . + $text =~ s/^[ \t]+$//mg; + + # Turn block-level HTML blocks into hash entries + $text = _HashHTMLBlocks($text); + + # Strip link definitions, store in hashes. + $text = _StripLinkDefinitions($text); + + $text = _RunBlockGamut($text); + + $text = _UnescapeSpecialChars($text); + + return $text . "\n"; +} + + +sub _StripLinkDefinitions { +# +# Strips link definitions from text, stores the URLs and titles in +# hash references. +# + my $text = shift; + my $less_than_tab = $g_tab_width - 1; + + # Link defs are in the form: ^[id]: url "optional title" + while ($text =~ s{ + ^[ ]{0,$less_than_tab}\[(.+)\]: # id = $1 + [ \t]* + \n? # maybe *one* newline + [ \t]* + ? # url = $2 + [ \t]* + \n? # maybe one newline + [ \t]* + (?: + (?<=\s) # lookbehind for whitespace + ["(] + (.+?) # title = $3 + [")] + [ \t]* + )? # title is optional + (?:\n+|\Z) + } + {}mx) { + $g_urls{lc $1} = _EncodeAmpsAndAngles( $2 ); # Link IDs are case-insensitive + if ($3) { + $g_titles{lc $1} = $3; + $g_titles{lc $1} =~ s/"/"/g; + } + } + + return $text; +} + + +sub _HashHTMLBlocks { + my $text = shift; + my $less_than_tab = $g_tab_width - 1; + + # Hashify HTML blocks: + # We only want to do this for block-level HTML tags, such as headers, + # lists, and tables. That's because we still want to wrap

s around + # "paragraphs" that are wrapped in non-block-level tags, such as anchors, + # phrase emphasis, and spans. The list of tags we're looking for is + # hard-coded: + my $block_tags_a = qr/p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del/; + my $block_tags_b = qr/p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math/; + + # First, look for nested blocks, e.g.: + #

+ #
+ # tags for inner block must be indented. + #
+ #
+ # + # The outermost tags must start at the left margin for this to match, and + # the inner nested divs must be indented. + # We need to do this before the next, more liberal match, because the next + # match will start at the first `
` and stop at the first `
`. + $text =~ s{ + ( # save in $1 + ^ # start of line (with /m) + <($block_tags_a) # start tag = $2 + \b # word break + (.*\n)*? # any number of lines, minimally matching + # the matching end tag + [ \t]* # trailing spaces/tabs + (?=\n+|\Z) # followed by a newline or end of document + ) + }{ + my $key = md5_hex($1); + $g_html_blocks{$key} = $1; + "\n\n" . $key . "\n\n"; + }egmx; + + + # + # Now match more liberally, simply from `\n` to `\n` + # + $text =~ s{ + ( # save in $1 + ^ # start of line (with /m) + <($block_tags_b) # start tag = $2 + \b # word break + (.*\n)*? # any number of lines, minimally matching + .* # the matching end tag + [ \t]* # trailing spaces/tabs + (?=\n+|\Z) # followed by a newline or end of document + ) + }{ + my $key = md5_hex($1); + $g_html_blocks{$key} = $1; + "\n\n" . $key . "\n\n"; + }egmx; + # Special case just for
. It was easier to make a special case than + # to make the other regex more complicated. + $text =~ s{ + (?: + (?<=\n\n) # Starting after a blank line + | # or + \A\n? # the beginning of the doc + ) + ( # save in $1 + [ ]{0,$less_than_tab} + <(hr) # start tag = $2 + \b # word break + ([^<>])*? # + /?> # the matching end tag + [ \t]* + (?=\n{2,}|\Z) # followed by a blank line or end of document + ) + }{ + my $key = md5_hex($1); + $g_html_blocks{$key} = $1; + "\n\n" . $key . "\n\n"; + }egx; + + # Special case for standalone HTML comments: + $text =~ s{ + (?: + (?<=\n\n) # Starting after a blank line + | # or + \A\n? # the beginning of the doc + ) + ( # save in $1 + [ ]{0,$less_than_tab} + (?s: + + ) + [ \t]* + (?=\n{2,}|\Z) # followed by a blank line or end of document + ) + }{ + my $key = md5_hex($1); + $g_html_blocks{$key} = $1; + "\n\n" . $key . "\n\n"; + }egx; + + + return $text; +} + + +sub _RunBlockGamut { +# +# These are all the transformations that form block-level +# tags like paragraphs, headers, and list items. +# + my $text = shift; + + $text = _DoHeaders($text); + + # Do Horizontal Rules: + $text =~ s{^[ ]{0,2}([ ]?\*[ ]?){3,}[ \t]*$}{\n tags around block-level tags. + $text = _HashHTMLBlocks($text); + + $text = _FormParagraphs($text); + + return $text; +} + + +sub _RunSpanGamut { +# +# These are all the transformations that occur *within* block-level +# tags like paragraphs, headers, and list items. +# + my $text = shift; + + $text = _DoCodeSpans($text); + + $text = _EscapeSpecialChars($text); + + # Process anchor and image tags. Images must come first, + # because ![foo][f] looks like an anchor. + $text = _DoImages($text); + $text = _DoAnchors($text); + + # Make links out of things like `` + # Must come after _DoAnchors(), because you can use < and > + # delimiters in inline links like [this](). + $text = _DoAutoLinks($text); + + $text = _EncodeAmpsAndAngles($text); + + $text = _DoItalicsAndBold($text); + + # Do hard breaks: + $text =~ s/ {2,}\n/ or tags. +# my $tags_to_skip = qr!<(/?)(?:pre|code|kbd|script|math)[\s>]!; + + foreach my $cur_token (@$tokens) { + if ($cur_token->[0] eq "tag") { + # Within tags, encode * and _ so they don't conflict + # with their use in Markdown for italics and strong. + # We're replacing each such character with its + # corresponding MD5 checksum value; this is likely + # overkill, but it should prevent us from colliding + # with the escape values by accident. + $cur_token->[1] =~ s! \* !$g_escape_table{'*'}!gx; + $cur_token->[1] =~ s! _ !$g_escape_table{'_'}!gx; + $text .= $cur_token->[1]; + } else { + my $t = $cur_token->[1]; + $t = _EncodeBackslashEscapes($t); + $text .= $t; + } + } + return $text; +} + + +sub _DoAnchors { +# +# Turn Markdown link shortcuts into XHTML
tags. +# + my $text = shift; + + # + # First, handle reference-style links: [link text] [id] + # + $text =~ s{ + ( # wrap whole match in $1 + \[ + ($g_nested_brackets) # link text = $2 + \] + + [ ]? # one optional space + (?:\n[ ]*)? # one optional newline followed by spaces + + \[ + (.*?) # id = $3 + \] + ) + }{ + my $result; + my $whole_match = $1; + my $link_text = $2; + my $link_id = lc $3; + + if ($link_id eq "") { + $link_id = lc $link_text; # for shortcut links like [this][]. + } + + if (defined $g_urls{$link_id}) { + my $url = $g_urls{$link_id}; + $url =~ s! \* !$g_escape_table{'*'}!gx; # We've got to encode these to avoid + $url =~ s! _ !$g_escape_table{'_'}!gx; # conflicting with italics/bold. + $result = "? # href = $3 + [ \t]* + ( # $4 + (['"]) # quote char = $5 + (.*?) # Title = $6 + \5 # matching quote + )? # title is optional + \) + ) + }{ + my $result; + my $whole_match = $1; + my $link_text = $2; + my $url = $3; + my $title = $6; + + $url =~ s! \* !$g_escape_table{'*'}!gx; # We've got to encode these to avoid + $url =~ s! _ !$g_escape_table{'_'}!gx; # conflicting with italics/bold. + $result = " tags. +# + my $text = shift; + + # + # First, handle reference-style labeled images: ![alt text][id] + # + $text =~ s{ + ( # wrap whole match in $1 + !\[ + (.*?) # alt text = $2 + \] + + [ ]? # one optional space + (?:\n[ ]*)? # one optional newline followed by spaces + + \[ + (.*?) # id = $3 + \] + + ) + }{ + my $result; + my $whole_match = $1; + my $alt_text = $2; + my $link_id = lc $3; + + if ($link_id eq "") { + $link_id = lc $alt_text; # for shortcut links like ![this][]. + } + + $alt_text =~ s/"/"/g; + if (defined $g_urls{$link_id}) { + my $url = $g_urls{$link_id}; + $url =~ s! \* !$g_escape_table{'*'}!gx; # We've got to encode these to avoid + $url =~ s! _ !$g_escape_table{'_'}!gx; # conflicting with italics/bold. + $result = "\"$alt_text\"";? # src url = $3 + [ \t]* + ( # $4 + (['"]) # quote char = $5 + (.*?) # title = $6 + \5 # matching quote + [ \t]* + )? # title is optional + \) + ) + }{ + my $result; + my $whole_match = $1; + my $alt_text = $2; + my $url = $3; + my $title = ''; + if (defined($6)) { + $title = $6; + } + + $alt_text =~ s/"/"/g; + $title =~ s/"/"/g; + $url =~ s! \* !$g_escape_table{'*'}!gx; # We've got to encode these to avoid + $url =~ s! _ !$g_escape_table{'_'}!gx; # conflicting with italics/bold. + $result = "\"$alt_text\"";" . _RunSpanGamut($1) . "\n\n"; + }egmx; + + $text =~ s{ ^(.+)[ \t]*\n-+[ \t]*\n+ }{ + "

" . _RunSpanGamut($1) . "

\n\n"; + }egmx; + + + # atx-style headers: + # # Header 1 + # ## Header 2 + # ## Header 2 with closing hashes ## + # ... + # ###### Header 6 + # + $text =~ s{ + ^(\#{1,6}) # $1 = string of #'s + [ \t]* + (.+?) # $2 = Header text + [ \t]* + \#* # optional closing #'s (not counted) + \n+ + }{ + my $h_level = length($1); + "" . _RunSpanGamut($2) . "\n\n"; + }egmx; + + return $text; +} + + +sub _DoLists { +# +# Form HTML ordered (numbered) and unordered (bulleted) lists. +# + my $text = shift; + my $less_than_tab = $g_tab_width - 1; + + # Re-usable patterns to match list item bullets and number markers: + my $marker_ul = qr/[*+-]/; + my $marker_ol = qr/\d+[.]/; + my $marker_any = qr/(?:$marker_ul|$marker_ol)/; + + # Re-usable pattern to match any entirel ul or ol list: + my $whole_list = qr{ + ( # $1 = whole list + ( # $2 + [ ]{0,$less_than_tab} + (${marker_any}) # $3 = first list item marker + [ \t]+ + ) + (?s:.+?) + ( # $4 + \z + | + \n{2,} + (?=\S) + (?! # Negative lookahead for another list item marker + [ \t]* + ${marker_any}[ \t]+ + ) + ) + ) + }mx; + + # We use a different prefix before nested lists than top-level lists. + # See extended comment in _ProcessListItems(). + # + # Note: There's a bit of duplication here. My original implementation + # created a scalar regex pattern as the conditional result of the test on + # $g_list_level, and then only ran the $text =~ s{...}{...}egmx + # substitution once, using the scalar as the pattern. This worked, + # everywhere except when running under MT on my hosting account at Pair + # Networks. There, this caused all rebuilds to be killed by the reaper (or + # perhaps they crashed, but that seems incredibly unlikely given that the + # same script on the same server ran fine *except* under MT. I've spent + # more time trying to figure out why this is happening than I'd like to + # admit. My only guess, backed up by the fact that this workaround works, + # is that Perl optimizes the substition when it can figure out that the + # pattern will never change, and when this optimization isn't on, we run + # afoul of the reaper. Thus, the slightly redundant code to that uses two + # static s/// patterns rather than one conditional pattern. + + if ($g_list_level) { + $text =~ s{ + ^ + $whole_list + }{ + my $list = $1; + my $list_type = ($3 =~ m/$marker_ul/) ? "ul" : "ol"; + # Turn double returns into triple returns, so that we can make a + # paragraph for the last item in a list, if necessary: + $list =~ s/\n{2,}/\n\n\n/g; + my $result = _ProcessListItems($list, $marker_any); + $result = "<$list_type>\n" . $result . "\n"; + $result; + }egmx; + } + else { + $text =~ s{ + (?:(?<=\n\n)|\A\n?) + $whole_list + }{ + my $list = $1; + my $list_type = ($3 =~ m/$marker_ul/) ? "ul" : "ol"; + # Turn double returns into triple returns, so that we can make a + # paragraph for the last item in a list, if necessary: + $list =~ s/\n{2,}/\n\n\n/g; + my $result = _ProcessListItems($list, $marker_any); + $result = "<$list_type>\n" . $result . "\n"; + $result; + }egmx; + } + + + return $text; +} + + +sub _ProcessListItems { +# +# Process the contents of a single ordered or unordered list, splitting it +# into individual list items. +# + + my $list_str = shift; + my $marker_any = shift; + + + # The $g_list_level global keeps track of when we're inside a list. + # Each time we enter a list, we increment it; when we leave a list, + # we decrement. If it's zero, we're not in a list anymore. + # + # We do this because when we're not inside a list, we want to treat + # something like this: + # + # I recommend upgrading to version + # 8. Oops, now this line is treated + # as a sub-list. + # + # As a single paragraph, despite the fact that the second line starts + # with a digit-period-space sequence. + # + # Whereas when we're inside a list (or sub-list), that line will be + # treated as the start of a sub-list. What a kludge, huh? This is + # an aspect of Markdown's syntax that's hard to parse perfectly + # without resorting to mind-reading. Perhaps the solution is to + # change the syntax rules such that sub-lists must start with a + # starting cardinal number; e.g. "1." or "a.". + + $g_list_level++; + + # trim trailing blank lines: + $list_str =~ s/\n{2,}\z/\n/; + + + $list_str =~ s{ + (\n)? # leading line = $1 + (^[ \t]*) # leading whitespace = $2 + ($marker_any) [ \t]+ # list marker = $3 + ((?s:.+?) # list item text = $4 + (\n{1,2})) + (?= \n* (\z | \2 ($marker_any) [ \t]+)) + }{ + my $item = $4; + my $leading_line = $1; + my $leading_space = $2; + + if ($leading_line or ($item =~ m/\n{2,}/)) { + $item = _RunBlockGamut(_Outdent($item)); + } + else { + # Recursion for sub-lists: + $item = _DoLists(_Outdent($item)); + chomp $item; + $item = _RunSpanGamut($item); + } + + "
  • " . $item . "
  • \n"; + }egmx; + + $g_list_level--; + return $list_str; +} + + + +sub _DoCodeBlocks { +# +# Process Markdown `
    ` blocks.
    +#	
    +
    +	my $text = shift;
    +
    +	$text =~ s{
    +			(?:\n\n|\A)
    +			(	            # $1 = the code block -- one or more lines, starting with a space/tab
    +			  (?:
    +			    (?:[ ]{$g_tab_width} | \t)  # Lines must start with a tab or a tab-width of spaces
    +			    .*\n+
    +			  )+
    +			)
    +			((?=^[ ]{0,$g_tab_width}\S)|\Z)	# Lookahead for non-space at line-start, or end of doc
    +		}{
    +			my $codeblock = $1;
    +			my $result; # return value
    +
    +			$codeblock = _EncodeCode(_Outdent($codeblock));
    +			$codeblock = _Detab($codeblock);
    +			$codeblock =~ s/\A\n+//; # trim leading newlines
    +			$codeblock =~ s/\s+\z//; # trim trailing whitespace
    +
    +			$result = "\n\n
    " . $codeblock . "\n
    \n\n"; + + $result; + }egmx; + + return $text; +} + + +sub _DoCodeSpans { +# +# * Backtick quotes are used for spans. +# +# * You can use multiple backticks as the delimiters if you want to +# include literal backticks in the code span. So, this input: +# +# Just type ``foo `bar` baz`` at the prompt. +# +# Will translate to: +# +#

    Just type foo `bar` baz at the prompt.

    +# +# There's no arbitrary limit to the number of backticks you +# can use as delimters. If you need three consecutive backticks +# in your code, use four for delimiters, etc. +# +# * You can use spaces to get literal backticks at the edges: +# +# ... type `` `bar` `` ... +# +# Turns to: +# +# ... type `bar` ... +# + + my $text = shift; + + $text =~ s@ + (`+) # $1 = Opening run of ` + (.+?) # $2 = The code block + (?$c
    "; + @egsx; + + return $text; +} + + +sub _EncodeCode { +# +# Encode/escape certain characters inside Markdown code runs. +# The point is that in code, these characters are literals, +# and lose their special Markdown meanings. +# + local $_ = shift; + + # Encode all ampersands; HTML entities are not + # entities within a Markdown code span. + s/&/&/g; + + # Encode $'s, but only if we're running under Blosxom. + # (Blosxom interpolates Perl variables in article bodies.) + { + no warnings 'once'; + if (defined($blosxom::version)) { + s/\$/$/g; + } + } + + + # Do the angle bracket song and dance: + s! < !<!gx; + s! > !>!gx; + + # Now, escape characters that are magic in Markdown: + s! \* !$g_escape_table{'*'}!gx; + s! _ !$g_escape_table{'_'}!gx; + s! { !$g_escape_table{'{'}!gx; + s! } !$g_escape_table{'}'}!gx; + s! \[ !$g_escape_table{'['}!gx; + s! \] !$g_escape_table{']'}!gx; + s! \\ !$g_escape_table{'\\'}!gx; + + return $_; +} + + +sub _DoItalicsAndBold { + my $text = shift; + + # must go first: + $text =~ s{ (\*\*|__) (?=\S) (.+?[*_]*) (?<=\S) \1 } + {$2}gsx; + + $text =~ s{ (\*|_) (?=\S) (.+?) (?<=\S) \1 } + {$2}gsx; + + return $text; +} + + +sub _DoBlockQuotes { + my $text = shift; + + $text =~ s{ + ( # Wrap whole match in $1 + ( + ^[ \t]*>[ \t]? # '>' at the start of a line + .+\n # rest of the first line + (.+\n)* # subsequent consecutive lines + \n* # blanks + )+ + ) + }{ + my $bq = $1; + $bq =~ s/^[ \t]*>[ \t]?//gm; # trim one level of quoting + $bq =~ s/^[ \t]+$//mg; # trim whitespace-only lines + $bq = _RunBlockGamut($bq); # recurse + + $bq =~ s/^/ /g; + # These leading spaces screw with
     content, so we need to fix that:
    +			$bq =~ s{
    +					(\s*
    .+?
    ) + }{ + my $pre = $1; + $pre =~ s/^ //mg; + $pre; + }egsx; + + "
    \n$bq\n
    \n\n"; + }egmx; + + + return $text; +} + + +sub _FormParagraphs { +# +# Params: +# $text - string to process with html

    tags +# + my $text = shift; + + # Strip leading and trailing lines: + $text =~ s/\A\n+//; + $text =~ s/\n+\z//; + + my @grafs = split(/\n{2,}/, $text); + + # + # Wrap

    tags. + # + foreach (@grafs) { + unless (defined( $g_html_blocks{$_} )) { + $_ = _RunSpanGamut($_); + s/^([ \t]*)/

    /; + $_ .= "

    "; + } + } + + # + # Unhashify HTML blocks + # + foreach (@grafs) { + if (defined( $g_html_blocks{$_} )) { + $_ = $g_html_blocks{$_}; + } + } + + return join "\n\n", @grafs; +} + + +sub _EncodeAmpsAndAngles { +# Smart processing for ampersands and angle brackets that need to be encoded. + + my $text = shift; + + # Ampersand-encoding based entirely on Nat Irons's Amputator MT plugin: + # http://bumppo.net/projects/amputator/ + $text =~ s/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/&/g; + + # Encode naked <'s + $text =~ s{<(?![a-z/?\$!])}{<}gi; + + return $text; +} + + +sub _EncodeBackslashEscapes { +# +# Parameter: String. +# Returns: The string, with after processing the following backslash +# escape sequences. +# + local $_ = shift; + + s! \\\\ !$g_escape_table{'\\'}!gx; # Must process escaped backslashes first. + s! \\` !$g_escape_table{'`'}!gx; + s! \\\* !$g_escape_table{'*'}!gx; + s! \\_ !$g_escape_table{'_'}!gx; + s! \\\{ !$g_escape_table{'{'}!gx; + s! \\\} !$g_escape_table{'}'}!gx; + s! \\\[ !$g_escape_table{'['}!gx; + s! \\\] !$g_escape_table{']'}!gx; + s! \\\( !$g_escape_table{'('}!gx; + s! \\\) !$g_escape_table{')'}!gx; + s! \\> !$g_escape_table{'>'}!gx; + s! \\\# !$g_escape_table{'#'}!gx; + s! \\\+ !$g_escape_table{'+'}!gx; + s! \\\- !$g_escape_table{'-'}!gx; + s! \\\. !$g_escape_table{'.'}!gx; + s{ \\! }{$g_escape_table{'!'}}gx; + + return $_; +} + + +sub _DoAutoLinks { + my $text = shift; + + $text =~ s{<((https?|ftp):[^'">\s]+)>}{
    $1}gi; + + # Email addresses: + $text =~ s{ + < + (?:mailto:)? + ( + [-.\w]+ + \@ + [-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+ + ) + > + }{ + _EncodeEmailAddress( _UnescapeSpecialChars($1) ); + }egix; + + return $text; +} + + +sub _EncodeEmailAddress { +# +# Input: an email address, e.g. "foo@example.com" +# +# Output: the email address as a mailto link, with each character +# of the address encoded as either a decimal or hex entity, in +# the hopes of foiling most address harvesting spam bots. E.g.: +# +# foo +# @example.com +# +# Based on a filter by Matthew Wickline, posted to the BBEdit-Talk +# mailing list: +# + + my $addr = shift; + + srand; + my @encode = ( + sub { '&#' . ord(shift) . ';' }, + sub { '&#x' . sprintf( "%X", ord(shift) ) . ';' }, + sub { shift }, + ); + + $addr = "mailto:" . $addr; + + $addr =~ s{(.)}{ + my $char = $1; + if ( $char eq '@' ) { + # this *must* be encoded. I insist. + $char = $encode[int rand 1]->($char); + } elsif ( $char ne ':' ) { + # leave ':' alone (to spot mailto: later) + my $r = rand; + # roughly 10% raw, 45% hex, 45% dec + $char = ( + $r > .9 ? $encode[2]->($char) : + $r < .45 ? $encode[1]->($char) : + $encode[0]->($char) + ); + } + $char; + }gex; + + $addr = qq{$addr}; + $addr =~ s{">.+?:}{">}; # strip the mailto: from the visible part + + return $addr; +} + + +sub _UnescapeSpecialChars { +# +# Swap back in all the special characters we've hidden. +# + my $text = shift; + + while( my($char, $hash) = each(%g_escape_table) ) { + $text =~ s/$hash/$char/g; + } + return $text; +} + + +sub _TokenizeHTML { +# +# Parameter: String containing HTML markup. +# Returns: Reference to an array of the tokens comprising the input +# string. Each token is either a tag (possibly with nested, +# tags contained therein, such as , or a +# run of text between tags. Each element of the array is a +# two-element array; the first is either 'tag' or 'text'; +# the second is the actual value. +# +# +# Derived from the _tokenize() subroutine from Brad Choate's MTRegex plugin. +# +# + + my $str = shift; + my $pos = 0; + my $len = length $str; + my @tokens; + + my $depth = 6; + my $nested_tags = join('|', ('(?:<[a-z/!$](?:[^<>]') x $depth) . (')*>)' x $depth); + my $match = qr/(?s: ) | # comment + (?s: <\? .*? \?> ) | # processing instruction + $nested_tags/ix; # nested tags + + while ($str =~ m/($match)/g) { + my $whole_tag = $1; + my $sec_start = pos $str; + my $tag_start = $sec_start - length $whole_tag; + if ($pos < $tag_start) { + push @tokens, ['text', substr($str, $pos, $tag_start - $pos)]; + } + push @tokens, ['tag', $whole_tag]; + $pos = pos $str; + } + push @tokens, ['text', substr($str, $pos, $len - $pos)] if $pos < $len; + \@tokens; +} + + +sub _Outdent { +# +# Remove one level of line-leading tabs or spaces +# + my $text = shift; + + $text =~ s/^(\t|[ ]{1,$g_tab_width})//gm; + return $text; +} + + +sub _Detab { +# +# Cribbed from a post by Bart Lateur: +# +# + my $text = shift; + + $text =~ s{(.*?)\t}{$1.(' ' x ($g_tab_width - length($1) % $g_tab_width))}ge; + return $text; +} + + +1; + +__END__ + + +=pod + +=head1 NAME + +B + + +=head1 SYNOPSIS + +B [ B<--html4tags> ] [ B<--version> ] [ B<-shortversion> ] + [ I ... ] + + +=head1 DESCRIPTION + +Markdown is a text-to-HTML filter; it translates an easy-to-read / +easy-to-write structured text format into HTML. Markdown's text format +is most similar to that of plain text email, and supports features such +as headers, *emphasis*, code blocks, blockquotes, and links. + +Markdown's syntax is designed not as a generic markup language, but +specifically to serve as a front-end to (X)HTML. You can use span-level +HTML tags anywhere in a Markdown document, and you can use block level +HTML tags (like
    and as well). + +For more information about Markdown's syntax, see: + + http://daringfireball.net/projects/markdown/ + + +=head1 OPTIONS + +Use "--" to end switch parsing. For example, to open a file named "-z", use: + + Markdown.pl -- -z + +=over 4 + + +=item B<--html4tags> + +Use HTML 4 style for empty element tags, e.g.: + +
    + +instead of Markdown's default XHTML style tags, e.g.: + +
    + + +=item B<-v>, B<--version> + +Display Markdown's version number and copyright information. + + +=item B<-s>, B<--shortversion> + +Display the short-form version number. + + +=back + + + +=head1 BUGS + +To file bug reports or feature requests (other than topics listed in the +Caveats section above) please send email to: + + support@daringfireball.net + +Please include with your report: (1) the example input; (2) the output +you expected; (3) the output Markdown actually produced. + + +=head1 VERSION HISTORY + +See the readme file for detailed release notes for this version. + +1.0.1 - 14 Dec 2004 + +1.0 - 28 Aug 2004 + + +=head1 AUTHOR + + John Gruber + http://daringfireball.net + + PHP port and other contributions by Michel Fortin + http://michelf.com + + +=head1 COPYRIGHT AND LICENSE + +Copyright (c) 2003-2004 John Gruber + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +* Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +* Neither the name "Markdown" nor the names of its contributors may + be used to endorse or promote products derived from this software + without specific prior written permission. + +This software is provided by the copyright holders and contributors "as +is" and any express or implied warranties, including, but not limited +to, the implied warranties of merchantability and fitness for a +particular purpose are disclaimed. In no event shall the copyright owner +or contributors be liable for any direct, indirect, incidental, special, +exemplary, or consequential damages (including, but not limited to, +procurement of substitute goods or services; loss of use, data, or +profits; or business interruption) however caused and on any theory of +liability, whether in contract, strict liability, or tort (including +negligence or otherwise) arising in any way out of the use of this +software, even if advised of the possibility of such damage. + +=cut diff --git a/GX-PAW/libpaw/configure.ac b/GX-PAW/libpaw/configure.ac new file mode 100644 index 00000000..801f3f45 --- /dev/null +++ b/GX-PAW/libpaw/configure.ac @@ -0,0 +1,571 @@ +# Copyright (C) 2017-2024 ABINIT group (Yann Pouillon ) + +# +# Process this file with autoconf to produce a configure script. +# + +# Enhance help message (must be set before anything else) +m4_divert_text([HELP_END], [ +More information on how to configure the build of LibPAW and to contribute +is available in the README file from the top source directory of LibPAW.]) + +# Init Autoconf +AC_PREREQ([2.69]) +AC_INIT([LibPAW], [0.5.0], + [https://gitlab.abinit.org/builders/libpaw/issues], + [libpaw], + [https://gitlab.abinit.org/builders/libpaw]) +AC_CONFIG_AUX_DIR([config/gnu]) +AC_CONFIG_MACRO_DIR([config/m4]) +AC_CONFIG_SRCDIR([src/m_paw_atom.F90]) + +# Init Automake (assume GNU Make for now) +AC_CANONICAL_TARGET +AM_INIT_AUTOMAKE([1.13 parallel-tests color-tests]) +AM_CONFIG_HEADER([config.h]) + +# Generate timestamp +paw_timestamp=`date '+%Y%m%dT%H%M%S%z'` +AC_SUBST(paw_timestamp) + + # ------------------------------------ # + +# +# LibPAW-specific preprocessing macros +# + +AH_BOTTOM([ +/* The following was previously provided through libpaw.h */ + +/* + * This file is part of the libPAW library. + * It has to be customized according to the host code. + * For the time being there are 2 known host codes: + * ABINIT (www.abinit.org) and BigDFT (bigdft.org). + */ + +/* + * Copyright (C) 2014-2024 Marc Torrent + * + * This file is part of the LibPAW software package. For license information, + * please see the COPYING file in the top-level directory of the LibPAW source + * distribution. + */ + +/* ============================= + * ========= ABINIT ============ + * ============================= */ +#if defined HAVE_LIBPAW_ABINIT + +/* ABINIT specific macros */ +# include "abi_common.h" + +/* Constants and defs */ +# define USE_DEFS use defs_basis + +/* MPI wrappers */ +# define USE_MPI_WRAPPERS use m_xmpi + +/* Messages, errors */ +/* Other macros already defined in abi_common.h */ +# define USE_MSG_HANDLING use m_errors, only : msg_hndl, netcdf_check; use m_abicore +# undef HAVE_YAML + +/* Allocation/deallocation with memory profiling */ +# define USE_MEMORY_PROFILING use m_profiling_abi +/* Use this to allocate/deallocate basic-type arrays with sizes */ +# define LIBPAW_ALLOCATE(ARR,SIZE) ABI_ALLOCATE(ARR,SIZE) +# define LIBPAW_DEALLOCATE(ARR) ABI_DEALLOCATE(ARR) +/* Use this to allocate/deallocate basic-type pointers with sizes */ +# define LIBPAW_POINTER_ALLOCATE(ARR,SIZE) ABI_ALLOCATE(ARR,SIZE) +# define LIBPAW_POINTER_DEALLOCATE(ARR) ABI_DEALLOCATE(ARR) +/* Use this to allocate/deallocate user-defined-type arrays with sizes */ +# define LIBPAW_DATATYPE_ALLOCATE(ARR,SIZE) ABI_DATATYPE_ALLOCATE(ARR,SIZE) +# define LIBPAW_DATATYPE_DEALLOCATE(ARR) ABI_DATATYPE_DEALLOCATE(ARR) +/* Use this to allocate basic-type arrays with explicit bounds */ +# define LIBPAW_BOUND1_ALLOCATE(ARR,BND1) ABI_ALLOCATE(ARR,(BND1)) +# define LIBPAW_BOUND2_ALLOCATE(ARR,BND1,BND2) ABI_ALLOCATE(ARR,(BND1,BND2)) +# define BOUNDS(LBND,UBND) LBND : UBND + +/* ============================= + * ========= BIGDFT ============ + * ============================= */ +#elif defined HAVE_LIBPAW_BIGDFT + +/* Constants and defs */ +# define USE_DEFS use m_libpaw_defs + +/* MPI wrappers */ +# define USE_MPI_WRAPPERS use m_libpaw_mpi + +/* Messages, errors */ +# define USE_MSG_HANDLING use m_libpaw_tools, only : wrtout => libpaw_wrtout, libpaw_msg_hndl +# define MSG_COMMENT(msg) call libpaw_msg_hndl(msg,"COMMENT","PERS") +# define MSG_WARNING(msg) call libpaw_msg_hndl(msg,"WARNING","PERS") +# define MSG_ERROR(msg) call libpaw_msg_hndl(msg,"ERROR" ,"PERS") +# define MSG_BUG(msg) call libpaw_msg_hndl(msg,"BUG" ,"PERS") +/*BigDFT should accept long lines...*/ +/*#define MSG_ERROR(msg) call libpaw_msg_hndl(msg,"ERROR","PERS",__FILE__,__LINE__)*/ +# define HAVE_YAML 1 + +/* Allocation/deallocation with memory profiling */ +# define USE_MEMORY_PROFILING use dynamic_memory +/* Use this to allocate/deallocate basic-type arrays with sizes */ +# define LIBPAW_ALLOCATE(ARR,SIZE) ARR=f_malloc(to_array SIZE ) +# define LIBPAW_DEALLOCATE(ARR) call f_free(ARR) +/* Use this to allocate/deallocate basic-type pointers with sizes */ +# define LIBPAW_POINTER_ALLOCATE(ARR,SIZE) ARR=f_malloc_ptr(to_array SIZE ) +# define LIBPAW_POINTER_DEALLOCATE(ARR) call f_free_ptr(ARR) +/* Use this to allocate/deallocate user-defined-type arrays or pointers with sizes */ +# define LIBPAW_DATATYPE_ALLOCATE(ARR,SIZE) allocate(ARR SIZE) +# define LIBPAW_DATATYPE_DEALLOCATE(ARR) deallocate(ARR) +/* Use this to allocate user-defined-type arrays with explicit bounds */ +# define LIBPAW_BOUND1_ALLOCATE(ARR,BND1) ARR=f_malloc((/ BND1 /)) +# define LIBPAW_BOUND2_ALLOCATE(ARR,BND1,BND2) ARR=f_malloc((/ BND1 , BND2 /)) +# define BOUNDS(LBND,UBND) LBND .to. UBND + +/* ============================= + * ========= DEFAULT =========== + * ============================= */ +#else + +/* Constants and defs */ +# define USE_DEFS use m_libpaw_defs + +/* MPI wrappers */ +# define USE_MPI_WRAPPERS use m_libpaw_mpi + +/* Messages, errors */ +# define USE_MSG_HANDLING use m_libpaw_tools, only : wrtout => libpaw_wrtout, libpaw_msg_hndl +# define MSG_COMMENT(msg) call libpaw_msg_hndl(msg,"COMMENT","PERS") +# define MSG_WARNING(msg) call libpaw_msg_hndl(msg,"WARNING","PERS") +# define MSG_ERROR(msg) call libpaw_msg_hndl(msg,"ERROR" ,"PERS") +# define MSG_BUG(msg) call libpaw_msg_hndl(msg,"BUG" ,"PERS") +# undef HAVE_YAML + +/* Allocation/deallocation */ +# define USE_MEMORY_PROFILING +/* Use this to allocate/deallocate basic-type arrays with sizes */ +# define LIBPAW_ALLOCATE(ARR,SIZE) allocate(ARR SIZE) +# define LIBPAW_DEALLOCATE(ARR) deallocate(ARR) +/* Use this to allocate/deallocate basic-type pointers with sizes */ +# define LIBPAW_POINTER_ALLOCATE(ARR,SIZE) allocate(ARR SIZE) +# define LIBPAW_POINTER_DEALLOCATE(ARR) deallocate(ARR) +/* Use this to allocate/deallocate user-defined-type arrays with sizes */ +# define LIBPAW_DATATYPE_ALLOCATE(ARR,SIZE) allocate(ARR SIZE) +# define LIBPAW_DATATYPE_DEALLOCATE(ARR) deallocate(ARR) +/* Use this to allocate user-defined-type arrays with explicit bounds */ +# define LIBPAW_BOUND1_ALLOCATE(ARR,BND1) allocate(ARR(BND1)) +# define LIBPAW_BOUND2_ALLOCATE(ARR,BND1,BND2) allocate(ARR(BND1,BND2)) +# define BOUNDS(LBND,UBND) LBND : UBND + +/* ============================= + * =========== END ============= + * ============================= */ +#endif + + + +/* ============================= + * ===== COMMON DEFINITIONS ==== + * ============================= */ + +/* F2008 support */ +# define LIBPAW_CONTIGUOUS +# define LIBPAW_ISO_C_BINDING + +/* LibXC support */ +# if defined HAVE_LIBXC +# define LIBPAW_HAVE_LIBXC HAVE_LIBXC +# else +# undef LIBPAW_HAVE_LIBXC +# endif + +/* Netcdf support */ +# if defined HAVE_NETCDF +# define LIBPAW_HAVE_NETCDF HAVE_NETCDF +# else +# undef LIBPAW_HAVE_NETCDF +# endif + +/* FoX support */ +# if defined HAVE_FOX +# define LIBPAW_HAVE_FOX HAVE_FOX +# else +# undef LIBPAW_HAVE_FOX +# endif + +/* Error handlers for netcdf; libpaw_netcdf_check is defined in m_libpaw_tools */ +#ifndef NCF_CHECK +# define NCF_CHECK(ncerr) if (ncerr/=nf90_noerr) call libpaw_netcdf_check(ncerr, "ncf_check") +#endif +]) + + # ------------------------------------ # + +# +# System utilities +# + +# Check for common programs and features +AC_PROG_AWK +AC_PROG_GREP +AC_PROG_INSTALL +AC_PROG_LN_S +AC_PROG_MAKE_SET +AC_PROG_SED + +# Workaround for the wrong path to install-sh on Mac systems +AX_PROG_MKDIR_P + + # ------------------------------------ # + +# +# Default settings +# + +# Note for developers: you may edit these parameters to tune the behaviour +# of the build system. Please do it with care. + +# Optional features +paw_debug_enable_def="no" +paw_multiconfig_enable_def="no" + +# Internal variables +LIBPAW_ARCH_SUFFIX="" +LIBPAW_MCFG_MODPFX="" + + # ------------------------------------ # + +# +# Check consistency of defaults +# + +# Default triggers for optional features must be yes or no, and not empty +for paw_cfg_default in debug multiconfig; do + tmp_default=`eval echo \$\{paw_${paw_cfg_default}_enable_def\}` + if test "${tmp_default}" != "no" -a \ + "${tmp_default}" != "yes"; then + AC_MSG_ERROR([invalid default value: paw_${paw_cfg_default}_enable_def = ${tmp_default}]) + fi +done + +# Clean-up +unset tmp_default + + # ------------------------------------ # + +# +# Optional features +# + +# Debugging +AC_ARG_ENABLE([debug], + [AS_HELP_STRING([--enable-debug], + [Enable verbose function output (default: ${paw_debug_enable_def})])], + [paw_debug_enable="${enableval}"; paw_debug_type="yon"], + [paw_debug_enable="${paw_debug_enable_def}"; paw_debug_type="def"]) +AC_SUBST(enable_debug) + +# Concurrent installation of multiple configurations +AC_ARG_ENABLE([multiconfig], + [AS_HELP_STRING([--enable-multiconfig], + [Change library name depending on configuration, a la FFTW, when multiple build flavors are installed concurrently on the system (default: ${paw_multiconfig_enable_def})])], + [paw_multiconfig_enable="${enableval}"; paw_multiconfig_type="yon"], + [paw_multiconfig_enable="${paw_multiconfig_enable_def}"; paw_multiconfig_type="def"]) +AC_SUBST(enable_multiconfig) + + # ------------------------------------ # + +# +# External dependencies +# + +# Init Steredeg core features +SD_CORE_INIT + +# Init LibXC +SD_LIBXC_INIT([auto no-fortran]) + +# Init MPI +SD_MPI_INIT([auto]) + + # ------------------------------------ # + +# +# Environment variables +# + +# Information about where LibPAW is embedded +AC_ARG_VAR([LIBPAW_EMBED], + [External program in which to optionally embed LibPAW (abinit or bigdft)]) + + # ------------------------------------ # + +# +# Check option consistency +# + +# All --enable-* options must be yes or no +for paw_cfg_option in debug; do + tmp_option=`eval echo \$\{enable_${paw_cfg_option}\}` + if test "${tmp_option}" != "" -a \ + "${tmp_option}" != "no" -a \ + "${tmp_option}" != "yes"; then + AC_MSG_ERROR([--enable-${paw_cfg_option} must be "yes" or "no"]) + fi +done +unset tmp_option + + # ------------------------------------ # + +# +# Substitute build-system variables +# + +# Defaults +AC_SUBST(paw_debug_enable_def) +AC_SUBST(paw_multiconfig_enable_def) + +# Triggers +AC_SUBST(paw_debug_enable) +AC_SUBST(paw_multiconfig_enable) + +# Initialization types +AC_SUBST(paw_debug_type) +AC_SUBST(paw_multiconfig_type) + +# Internal variables +AC_SUBST(LIBPAW_ARCH_SUFFIX) +AC_SUBST(LIBPAW_MCFG_MODPFX) + + # ------------------------------------ # + +# +# C language support +# + +# Init C compiler and preprocessor +if test "${CC}" != "" -a ! -x "${CC}"; then + paw_cc_probe=`echo "${CC}" | sed -e 's/ .*//'` + if test ! -x "${paw_cc_probe}"; then + AC_PATH_PROG([paw_cc_path],[${paw_cc_probe}]) + if test "${paw_cc_path}" = ""; then + AC_MSG_ERROR([could not run C compiler "${CC}"]) + fi + fi +fi +AC_PROG_CC +AC_PROG_CPP + + # ------------------------------------ # + +# +# C++ language support +# + +# Init C++ compiler +AC_PROG_CXX + + # ------------------------------------ # + +# +# Fortran language support +# + +# Init Fortran compiler +if test "${FC}" != "" -a ! -x "${FC}"; then + paw_fc_probe=`echo "${FC}" | sed -e 's/ .*//'` + if test ! -x "${paw_fc_probe}"; then + AC_PATH_PROG([paw_fc_path], [${paw_fc_probe}]) + if test "${paw_fc_path}" = ""; then + AC_MSG_ERROR([could not run Fortran compiler "${FC}"]) + fi + fi +fi +AC_PROG_FC + +# Enforce strict file extensions +paw_fc_src_ok="unknown" +AC_FC_SRCEXT([F90], [paw_fc_src_ok="yes"], [paw_fc_src_ok="no"]) +if test "${paw_fc_src_ok}" != "yes"; then + AC_MSG_WARN([Fortran file extension could not be changed]) + AC_MSG_WARN([Fortran tests may fail]) +fi + +# Look for the iso_c_binding module +paw_fc_iso_c_binding="unknown" +AC_MSG_CHECKING([for the ISO_C_BINDING Fortran module]) +AC_LANG_PUSH([Fortran]) +AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([], [[use iso_c_binding]])], + [paw_fc_iso_c_binding="yes"], + [paw_fc_iso_c_binding="no"]) +AC_LANG_POP([Fortran]) +AC_MSG_RESULT([${paw_fc_iso_c_binding}]) +if test "${paw_fc_iso_c_binding}" != "yes"; then + AC_MSG_ERROR([the Fortran compiler does not provide the iso_c_binding module. + This probably happens because this compiler is an antiquity. + Please use a reasonably recent Fortran compiler.]) +fi + +# Fortran compiler peculiarities +AX_F90_MODULE_EXTENSION +AX_F90_MODULE_CASE +FMODEXT="${ax_cv_f90_modext}" +AC_SUBST(FMODEXT) + +# Inform Automake +AM_CONDITIONAL([FORTRAN_MOD_UPPERCASE], + [test "${ax_cv_f90_mod_uppercase}" = "yes"]) + + # ------------------------------------ # + +# +# Libtool configuration +# + +# Init Libtool (must be done once compilers are fully set) +LT_INIT +LT_PREREQ([2.4]) +LT_LANG([Fortran]) +LTOBJEXT="lo" +AC_SUBST(LTOBJEXT) + + # ------------------------------------ # + +# +# Multicore architecture support +# + +# Look for MPI +SD_MPI_DETECT + + # ------------------------------------ # + +# +# External dependencies +# + +# LibXC +SD_LIBXC_DETECT + + # ------------------------------------ # + +# +# Concurrent installations support +# + +# Set include directory for Fortran modules and +# architecture suffix for library name +if test "${paw_multiconfig_enable}" = "yes"; then + LIBPAW_MCFG_MODPFX="/libpaw" + if test "${sd_mpi_enable}" = "yes"; then + LIBPAW_ARCH_SUFFIX="_mpi" + fi +fi + + # ------------------------------------ # + +# +# Build parameters for embedded configurations +# + +# Check if we are embedded in ABINIT +paw_abinit_common_incs="-I${ac_top_srcdir}/../../common/src/incs -I${ac_top_srcdir}/../../common/src/mods" +if test -s "${ac_top_srcdir}/../common/src/10_defs/defs_basis.F90" -o \ + "${LIBPAW_EMBED}" = "abinit"; then + FCFLAGS="${FCFLAGS} ${paw_abinit_common_incs}" +fi + + # ------------------------------------ # + +# +# Build-system configuration checkpoint +# + +# Write down YAML configuration before any final check +AC_OUTPUT([config/data/libpaw-config.yml]) + + # ------------------------------------ # + +# +# Adjust build parameters according to configure options +# + +# Debugging support +if test "${paw_debug_enable}" = "yes"; then + AC_DEFINE([LIBPAW_DEBUG], 1, [Define to 1 to enable internal debugging.]) +fi + +# FIXME: Remove MPI1/MPI2 distinction +if test "${sd_mpi_ok}" = "yes"; then + AC_DEFINE([HAVE_MPI2], 1, [Define to 1 if you have modern MPI support.]) +fi + +# FIXME: Unsupported CPP options +# +# FC_G95 +# FC_NAG +# HAVE_AVX_SAFE_MODE +# HAVE_FC_FLUSH +# HAVE_ISO_C_BINDING +# HAVE MPI2_INPLACE +# HAVE_OS_WINDOWS +# HAVE_YAML +# LIBPAW_HAVE_FOX +# LIBPAW_HAVE_LIBXC +# LIBPAW_HAVE_NETCDF +# LIBPAW_ISO_C_BINDING + + # ------------------------------------ # + +# Output configuration +AC_CONFIG_FILES([ + Makefile + config/data/libpaw.pc + doc/Makefile + libxc/Makefile + src/Makefile]) +AC_OUTPUT + +# Report configuration +if test -z "${LIBPAW_EMBED}"; then + tmp_embed_show="no" +else + tmp_embed_show="${LIBPAW_EMBED}" +fi +if test -z "${LIBPAW_MCFG_MODPFX}"; then + tmp_moddir_show="${includedir}" +else + tmp_moddir_show="${includedir}${LIBPAW_MCFG_MODPFX}${LIBPAW_ARCH_SUFFIX}" +fi +AC_MSG_NOTICE([ +Final build parameters +---------------------- + + TSTAMP = ${paw_timestamp} + + DEBUG = ${paw_debug_enable} (init: ${paw_debug_type}) + MULTICONFIG = ${paw_multiconfig_enable} (init: ${paw_multiconfig_type}) + + MPI = ${sd_mpi_enable} (init: ${sd_mpi_init}) + + CPP = ${CPP} + CPPFLAGS = ${CPPFLAGS} + CC = ${CC} + CFLAGS = ${CFLAGS} + FC = ${FC} + FCFLAGS = ${FCFLAGS} + LDFLAGS = ${LDFLAGS} + LIBS = ${LIBS} + + Embedded : ${tmp_embed_show} + Module dir : ${tmp_moddir_show} + Library name : libpaw${LIBPAW_ARCH_SUFFIX}.(a|so) +]) +if test ! -z "${PAW_EMBED}"; then + AC_MSG_NOTICE([ + *** Please remember to build the ABINIT Common Library before LibPAW *** +]) +fi diff --git a/GX-PAW/libpaw/doc/logo-libpaw-500x500.png b/GX-PAW/libpaw/doc/logo-libpaw-500x500.png new file mode 100644 index 00000000..1a5f80d7 Binary files /dev/null and b/GX-PAW/libpaw/doc/logo-libpaw-500x500.png differ diff --git a/GX-PAW/libpaw/doc/logo-libpaw.svg b/GX-PAW/libpaw/doc/logo-libpaw.svg new file mode 100644 index 00000000..a8a96eaf --- /dev/null +++ b/GX-PAW/libpaw/doc/logo-libpaw.svg @@ -0,0 +1,292 @@ + + + + + LibPAW Logo + + + + + + + + + + + + + + + + + + + image/svg+xml + + LibPAW Logo + 2018/06/29 16:26 + + + Yann Pouillon + + + + + + + + + + Atom + Library + PAW + + + + + ABINIT Group + + + Public-domain atom vector clipart + Atom model + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/GX-PAW/libpaw/incs/.gitkeep b/GX-PAW/libpaw/incs/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/GX-PAW/libpaw/incs/Makefile b/GX-PAW/libpaw/incs/Makefile new file mode 100644 index 00000000..de9ef691 --- /dev/null +++ b/GX-PAW/libpaw/incs/Makefile @@ -0,0 +1,1311 @@ +# Makefile.in generated by automake 1.16.3 from Makefile.am. +# shared/libpaw/incs/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994-2020 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-inter on 2024/03/16 21:07:39 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-inter script or its config file instead. +# + +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/abinit +pkgincludedir = $(includedir)/abinit +pkglibdir = $(libdir)/abinit +pkglibexecdir = $(libexecdir)/abinit +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = x86_64-apple-darwin18.7.0 +host_triplet = x86_64-apple-darwin18.7.0 +target_triplet = x86_64-apple-darwin18.7.0 +subdir = shared/libpaw/incs +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/m4/arch-gpu.m4 \ + $(top_srcdir)/config/m4/arch-mpi.m4 \ + $(top_srcdir)/config/m4/auto-autotools.m4 \ + $(top_srcdir)/config/m4/auto-corelibs.m4 \ + $(top_srcdir)/config/m4/auto-debug.m4 \ + $(top_srcdir)/config/m4/auto-dirflags.m4 \ + $(top_srcdir)/config/m4/auto-env.m4 \ + $(top_srcdir)/config/m4/auto-hints.m4 \ + $(top_srcdir)/config/m4/auto-optim.m4 \ + $(top_srcdir)/config/m4/auto-options.m4 \ + $(top_srcdir)/config/m4/auto-output.m4 \ + $(top_srcdir)/config/m4/auto-triggers.m4 \ + $(top_srcdir)/config/m4/conf-atompaw.m4 \ + $(top_srcdir)/config/m4/conf-debug.m4 \ + $(top_srcdir)/config/m4/conf-fallbacks.m4 \ + $(top_srcdir)/config/m4/conf-files.m4 \ + $(top_srcdir)/config/m4/conf-init.m4 \ + $(top_srcdir)/config/m4/conf-openmp.m4 \ + $(top_srcdir)/config/m4/conf-optim.m4 \ + $(top_srcdir)/config/m4/lang-c++.m4 \ + $(top_srcdir)/config/m4/lang-c.m4 \ + $(top_srcdir)/config/m4/lang-fortran-import.m4 \ + $(top_srcdir)/config/m4/lang-fortran.m4 \ + $(top_srcdir)/config/m4/lang-python.m4 \ + $(top_srcdir)/config/m4/libxml2.m4 \ + $(top_srcdir)/config/m4/misc-display.m4 \ + $(top_srcdir)/config/m4/sd_abinit_common.m4 \ + $(top_srcdir)/config/m4/sd_arch_gpu.m4 \ + $(top_srcdir)/config/m4/sd_arch_mpi.m4 \ + $(top_srcdir)/config/m4/sd_bigdft.m4 \ + $(top_srcdir)/config/m4/sd_core.m4 \ + $(top_srcdir)/config/m4/sd_esl.m4 \ + $(top_srcdir)/config/m4/sd_fftw3.m4 \ + $(top_srcdir)/config/m4/sd_gpu_kokkos.m4 \ + $(top_srcdir)/config/m4/sd_gpu_yakl.m4 \ + $(top_srcdir)/config/m4/sd_io_hdf5.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf_fortran.m4 \ + $(top_srcdir)/config/m4/sd_levmar.m4 \ + $(top_srcdir)/config/m4/sd_libpaw.m4 \ + $(top_srcdir)/config/m4/sd_libpsml.m4 \ + $(top_srcdir)/config/m4/sd_libxc.m4 \ + $(top_srcdir)/config/m4/sd_math_fft.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_core.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_util.m4 \ + $(top_srcdir)/config/m4/sd_papi.m4 \ + $(top_srcdir)/config/m4/sd_pfft.m4 \ + $(top_srcdir)/config/m4/sd_triqs.m4 \ + $(top_srcdir)/config/m4/sd_wannier90.m4 \ + $(top_srcdir)/config/m4/sd_xmlf90.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_$(V)) +am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY)) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +am__v_at_1 = +SOURCES = +DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(srcdir)/Makefile.in +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ABINIT_BINARY_PACKAGE = abinit-10.0.0.83-58be4d_x86_64_darwin18.7.0_gnu9.4 +ABINIT_COMMON_CPPFLAGS = +ABINIT_COMMON_FCFLAGS = +ABINIT_COMMON_LDFLAGS = +ABINIT_COMMON_LIBS = +ABINIT_TARGET = x86_64_darwin18.7.0_gnu9.4 +ABINIT_VERSION = 10.0.0.83-58be4d +ABINIT_VERSION_BASE = 10.0 +ABINIT_VERSION_BUILD = 20240316 +ABINIT_VERSION_MAJOR = 10 +ABINIT_VERSION_MICRO = 0 +ABINIT_VERSION_MINOR = 0 +ABI_CPPFLAGS = -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include +ACLOCAL = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' aclocal-1.16 +AMTAR = $${TAR-tar} +AM_DEFAULT_VERBOSITY = 1 +AR = ar +ARFLAGS = rc +ARFLAGS_CMD = rc +ARFLAGS_DEBUG = +ARFLAGS_EXTRA = +ARFLAGS_HINTS = +ARFLAGS_OPTIM = +ATOMPAW_BIN = +AUTOCONF = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' autoconf +AUTOHEADER = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' autoheader +AUTOMAKE = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' automake-1.16 +AWK = awk +BIGDFT_CPPFLAGS = +BIGDFT_FCFLAGS = +BIGDFT_LDFLAGS = +BIGDFT_LIBS = +BOURNE_SHELL = /bin/sh +CC = /opt/local/bin/mpicc +CCDEPMODE = depmode=gcc3 +CC_LDFLAGS = +CC_LDFLAGS_DEBUG = +CC_LDFLAGS_EXTRA = +CC_LDFLAGS_GPU = +CC_LDFLAGS_HINTS = +CC_LDFLAGS_OPTIM = +CC_LIBS = +CC_LIBS_DEBUG = +CC_LIBS_EXTRA = +CC_LIBS_GPU = +CC_LIBS_HINTS = +CC_LIBS_OPTIM = +CFLAGS = -O2 -g +CFLAGS_DEBUG = +CFLAGS_EXTRA = +CFLAGS_GPU = +CFLAGS_HINTS = +CFLAGS_OPTIM = +CPP = /opt/local/bin/mpicc -E +CPPFLAGS = +CPPFLAGS_DEBUG = +CPPFLAGS_EXTRA = +CPPFLAGS_GPU = +CPPFLAGS_HINTS = +CPPFLAGS_HINTS_EXT = -P -std=c99 +CPPFLAGS_OPTIM = +CXX = /opt/local/bin/mpicxx +CXXDEPMODE = depmode=gcc3 +CXXFLAGS = -O2 -g +CXXFLAGS_DEBUG = +CXXFLAGS_EXTRA = +CXXFLAGS_GPU = +CXXFLAGS_HINTS = +CXXFLAGS_OPTIM = +CXX_LDFLAGS = +CXX_LDFLAGS_DEBUG = +CXX_LDFLAGS_EXTRA = +CXX_LDFLAGS_GPU = +CXX_LDFLAGS_HINTS = +CXX_LDFLAGS_OPTIM = +CXX_LIBS = +CXX_LIBS_DEBUG = +CXX_LIBS_EXTRA = +CXX_LIBS_GPU = +CXX_LIBS_HINTS = +CXX_LIBS_OPTIM = +CYGPATH_W = echo +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +ECHO_C = \c +ECHO_N = +ECHO_T = +EGREP = /usr/bin/grep -E +EXEEXT = +F77 = /opt/local/bin/mpif90 +FC = /opt/local/bin/mpif90 +FCFLAGS = -O2 -g -ffree-line-length-none -I/opt/local/include -I/opt/local/include -I/opt/local/include +FCFLAGS_DEBUG = +FCFLAGS_EXTRA = +FCFLAGS_F90 = +FCFLAGS_FIXEDFORM = -ffixed-form +FCFLAGS_FREEFORM = -ffree-form +FCFLAGS_HINTS = -ffree-line-length-none +FCFLAGS_MODDIR = -J../mods +FCFLAGS_OPENMP = +FCFLAGS_OPENMP_OFFLOAD = +FCFLAGS_OPTIM = +FCLIBS = -L/opt/local/lib -L/opt/local/lib/openmpi-gcc9 -L/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0 -L/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/../../.. -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi -lgfortran -lquadmath -lm +FC_LDFLAGS = +FC_LDFLAGS_DEBUG = +FC_LDFLAGS_EXTRA = +FC_LDFLAGS_HINTS = +FC_LDFLAGS_OPTIM = +FC_LIBS = +FC_LIBS_DEBUG = +FC_LIBS_EXTRA = +FC_LIBS_HINTS = +FC_LIBS_OPTIM = +FC_NOWRAP = /opt/local/bin/mpif90 +FFLAGS = -O2 -g -ffree-line-length-none -I/opt/local/include -I/opt/local/include -I/opt/local/include +FFTW3_CFLAGS = +FFTW3_CPPFLAGS = -I/opt/local/include +FFTW3_FCFLAGS = -I/opt/local/include +FFTW3_LDFLAGS = +FFTW3_LIBS = -L/opt/local/lib -lfftw3 -lfftw3f +FFT_CFLAGS = +FFT_FCFLAGS = +FPP = +FPPFLAGS = +FPPFLAGS_DEBUG = +FPPFLAGS_EXTRA = +FPPFLAGS_HINTS = +FPPFLAGS_OPTIM = +GPU_ARCH = +GPU_CFLAGS = +GPU_CPPFLAGS = +GPU_CXXFLAGS = +GPU_FCFLAGS = +GPU_LDFLAGS = +GPU_LIBS = +GRAPHATOM_BIN = +GREP = /usr/bin/grep +H5CC = +HDF5_CFLAGS = +HDF5_CPPFLAGS = +HDF5_CXXFLAGS = +HDF5_FCFLAGS = +HDF5_LDFLAGS = +HDF5_LIBS = +INSTALL = /opt/local/libexec/gnubin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +KOKKOS_CPPFLAGS = +KOKKOS_CXXFLAGS = +KOKKOS_LDFLAGS = +KOKKOS_LIBS = +LDFLAGS = +LEVMAR_CFLAGS = +LEVMAR_CPPFLAGS = +LEVMAR_LDFLAGS = +LEVMAR_LIBS = +LIBOBJS = +LIBPAW_CPPFLAGS = +LIBPAW_FCFLAGS = +LIBPAW_LDFLAGS = +LIBPAW_LIBS = +LIBPSML_CPPFLAGS = +LIBPSML_FCFLAGS = +LIBPSML_LDFLAGS = +LIBPSML_LIBS = +LIBS = -L/opt/local/lib -lwannier -L/opt/local/lib -lxc -L/opt/local/lib -lnetcdff -L/opt/local/lib -lnetcdf -L/opt/local/lib -L/opt/local/lib -lhdf5_hl -L/opt/local/lib -lhdf5 -lz -ldl -lm -L/opt/local/lib -lfftw3 -lfftw3f +LIBXC_CFLAGS = +LIBXC_CPPFLAGS = +LIBXC_FCFLAGS = +LIBXC_LDFLAGS = +LIBXC_LIBS = +LIBXML2_CPPFLAGS = +LIBXML2_FCFLAGS = +LIBXML2_LIBS = +LINALG_CFLAGS = +LINALG_CPPFLAGS = +LINALG_CXXFLAGS = +LINALG_FCFLAGS = -I/opt/local/include +LINALG_LDFLAGS = +LINALG_LIBS = -L/opt/local/lib -lopenblas +LN_S = ln -s +LTLIBOBJS = +MAKEINFO = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' makeinfo +MKDIR_P = /opt/local/libexec/gnubin/mkdir -p +MODEXT = mod +MPI_CFLAGS = +MPI_CPPFLAGS = +MPI_CXXFLAGS = +MPI_FCFLAGS = +MPI_LDFLAGS = +MPI_LIBS = +MV = /opt/local/libexec/gnubin/mv +NETCDF_CFLAGS = +NETCDF_CPPFLAGS = +NETCDF_CXXFLAGS = +NETCDF_FCFLAGS = +NETCDF_FORTRAN_CFLAGS = +NETCDF_FORTRAN_CPPFLAGS = +NETCDF_FORTRAN_CXXFLAGS = +NETCDF_FORTRAN_FCFLAGS = +NETCDF_FORTRAN_LDFLAGS = +NETCDF_FORTRAN_LIBS = +NETCDF_LDFLAGS = +NETCDF_LIBS = +NVCC = +NVCC_CFLAGS = +NVCC_CPPFLAGS = +NVCC_LDFLAGS = +NVCC_LIBS = +OBJEXT = o +PACKAGE = abinit +PACKAGE_BUGREPORT = https://bugs.launchpad.net/abinit/ +PACKAGE_NAME = ABINIT +PACKAGE_STRING = ABINIT 10.0.0.83-58be4d +PACKAGE_TARNAME = abinit +PACKAGE_URL = +PACKAGE_VERSION = 10.0.0.83-58be4d +PAPI_CFLAGS = +PAPI_CPPFLAGS = +PAPI_LDFLAGS = +PAPI_LIBS = +PATCH = patch +PATH_SEPARATOR = : +PERL = /usr/bin/perl +PFFT_CFLAGS = +PFFT_CPPFLAGS = +PFFT_LDFLAGS = +PFFT_LIBS = +PYFLAGS = +PYTHON = python3.9 +PYTHON_CONFIG = python3.9-config +PYTHON_CPPFLAGS = -I/opt/local/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -I/opt/local/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 +RANLIB = ranlib +REALPATH = realpath +RM = /opt/local/libexec/gnubin/rm +SED = /usr/bin/sed +SET_MAKE = +SHELL = /bin/sh +STRIP = +TAR = tar +TRIQS_CFLAGS = +TRIQS_CPPFLAGS = +TRIQS_CXXFLAGS = +TRIQS_LDFLAGS = +TRIQS_LIBS = +TRUE_CPP = cpp +VERSION = 10.0.0.83-58be4d +WANNIER90_CPPFLAGS = +WANNIER90_FCFLAGS = -I/opt/local/include +WANNIER90_LDFLAGS = +WANNIER90_LIBS = -L/opt/local/lib -lwannier +XML2_CONFIG = +XMLF90_CPPFLAGS = +XMLF90_FCFLAGS = +XMLF90_LDFLAGS = +XMLF90_LIBS = +XML_CPPFLAGS = +XML_LIBS = +XPP = +XPPFLAGS = +XPPFLAGS_DEBUG = +XPPFLAGS_EXTRA = +XPPFLAGS_OPTIM = +YAKL_CPPFLAGS = +YAKL_FCFLAGS = +YAKL_LDFLAGS = +YAKL_LIBS = +abi_ac_distcheck = --with-config-file="/Users/gonze/_Research/ABINIT_git/gonze/mac-1P0-225.ac9" +abi_ac_version = 027100 +abi_am_version = 011603 +abi_avx_safe_mode_enable = no +abi_bse_unpacked_enable = no +abi_cc_path = +abi_cc_vendor = gnu +abi_cc_version = 9.4 +abi_cclock_enable = no +abi_cpp_path = +abi_cpu_64bits = yes +abi_cpu_bits = 64 +abi_cpu_model = unknown +abi_cpu_platform = apple +abi_cpu_spec = unknown_unknown +abi_cpu_vendor = unknown +abi_crpa_optim_enable = no +abi_cxx_path = +abi_cxx_vendor = gnu +abi_cxx_version = 9.4 +abi_debug_flavor = basic +abi_exports_enable = no +abi_fbk_abinit_common_ok = no +abi_fbk_bigdft_ok = disabled +abi_fbk_config = +abi_fbk_enable = no +abi_fbk_fft_ok = no +abi_fbk_fftw3_ok = no +abi_fbk_gpu_ok = no +abi_fbk_hdf5_ok = disabled +abi_fbk_init = def +abi_fbk_kokkos_ok = no +abi_fbk_levmar_ok = no +abi_fbk_libpaw_ok = no +abi_fbk_libpsml_ok = disabled +abi_fbk_libxc_ok = disabled +abi_fbk_libxml2_ok = no +abi_fbk_linalg_ok = disabled +abi_fbk_list = +abi_fbk_mpi_ok = no +abi_fbk_netcdf_fortran_ok = disabled +abi_fbk_netcdf_ok = disabled +abi_fbk_papi_ok = no +abi_fbk_pfft_ok = no +abi_fbk_prefix = +abi_fbk_required = +abi_fbk_triqs_ok = no +abi_fbk_wannier90_ok = disabled +abi_fbk_xmlf90_ok = disabled +abi_fbk_yakl_ok = no +abi_fc_path = +abi_fc_vendor = gnu +abi_fc_version = 9.4 +abi_fc_wrap = no +abi_fc_wrapper_enable = no +abi_fpp_path = +abi_gpu_arch = +abi_gpu_fcflags = +abi_gpu_flavor = none +abi_gpu_hip_libdir = +abi_gpu_incs = +abi_gpu_ldflags = +abi_gpu_libs = +abi_gpu_nvtx_v3 = +abi_gpu_roctx = +abi_gw_dpc_enable = yes +abi_hints_enable = yes +abi_libtetra_enable = yes +abi_libxml2_cppflags = +abi_libxml2_enable = no +abi_libxml2_fcflags = +abi_libxml2_init = def +abi_libxml2_ldflags = +abi_libxml2_libs = +abi_libxml2_ok = unknown +abi_libxml2_prefix = +abi_lotf_enable = no +abi_lt_version = 020406 +abi_m4_version = 010419 +abi_memory_profiling_enable = no +abi_mpi_cflags = +abi_mpi_cppflags = +abi_mpi_cxxflags = +abi_mpi_enable = yes +abi_mpi_fcflags = +abi_mpi_flavor = auto +abi_mpi_gpu_aware_enable = no +abi_mpi_incs = +abi_mpi_inplace_enable = yes +abi_mpi_interfaces_bugfix_enable = no +abi_mpi_io_default_enable = no +abi_mpi_io_enable = yes +abi_mpi_ldflags = +abi_mpi_level = 2 +abi_mpi_libs = +abi_netcdf_default_enable = no +abi_openmp_enable = no +abi_openmp_offload_enable = no +abi_optim_flavor = standard +abi_python_invocation_enable = no +abi_source_debug_enable = no +abi_stdin_enable = yes +abi_sys_spec = darwin-x86_64 +abi_timer_enable = yes +abi_triqs_v1_4_enable = no +abi_triqs_v2_0_enable = no +abi_zdot_bugfix_enable = no +abinit_bindir = /usr/local/bin +abinit_builddir = /Users/gonze/_Research/ABINIT_git/gonze +abinit_chkdir = /usr/local/share/abinit/tests +abinit_datdir = /usr/local/share/abinit +abinit_docdir = /usr/local/doc/abinit +abinit_incdir = /usr/local/include +abinit_libdir = /usr/local/lib +abinit_mandir = /usr/local/share/man +abinit_prefix = /usr/local +abinit_srcdir = /Users/gonze/_Research/ABINIT_git/gonze +abs_builddir = /Users/gonze/_Research/ABINIT_git/gonze/shared/libpaw/incs +abs_srcdir = /Users/gonze/_Research/ABINIT_git/gonze/shared/libpaw/incs +abs_top_builddir = /Users/gonze/_Research/ABINIT_git/gonze +abs_top_srcdir = /Users/gonze/_Research/ABINIT_git/gonze +ac_ct_CC = +ac_ct_CXX = +ac_ct_FC = +am__include = include +am__leading_dot = . +am__quote = +am__tar = tar --format=ustar -chf - "$$tardir" +am__untar = tar -xf - +bindir = ${exec_prefix}/bin +build = x86_64-apple-darwin18.7.0 +build_alias = +build_cpu = x86_64 +build_os = darwin18.7.0 +build_vendor = apple +builddir = . +cc_info_string = gcc-mp-9 (MacPorts gcc9 9.4.0_0) 9.4.0 +cxx_info_string = g++-mp-9 (MacPorts gcc9 9.4.0_0) 9.4.0 +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +enable_avx_safe_mode = +enable_bse_unpacked = +enable_cclock = +enable_crpa_optim = +enable_exports = +enable_fc_wrapper = +enable_gw_dpc = yes +enable_hints = +enable_libtetra = +enable_lotf = +enable_memory_profiling = +enable_mpi_gpu_aware = +enable_mpi_inplace = +enable_mpi_interfaces_bugfix = +enable_mpi_io = yes +enable_mpi_io_default = +enable_netcdf_default = +enable_openmp = +enable_openmp_offload = +enable_python_invocation = +enable_shared = +enable_source_debug = +enable_static = +enable_stdin = +enable_timer = +enable_triqs_v1_4 = +enable_triqs_v2_0 = +enable_zdot_bugfix = +exec_prefix = ${prefix} +fc_info_string = GNU Fortran (MacPorts gcc9 9.4.0_0) 9.4.0 +fc_mod_fcflags = +fc_timing = standard +fcflags_opt_02_clib = +fcflags_opt_10_defs = +fcflags_opt_11_memory_mpi = +fcflags_opt_12_hide_mpi = +fcflags_opt_14_hidewrite = +fcflags_opt_16_hideleave = +fcflags_opt_16_kokkos_toolbox = +fcflags_opt_17_gpu_toolbox = +fcflags_opt_17_libtetra_ext = +fcflags_opt_17_minimax = +fcflags_opt_17_yaml_out = +fcflags_opt_18_timing = +fcflags_opt_21_hashfuncs = +fcflags_opt_27_toolbox_oop = +fcflags_opt_28_numeric_noabirule = +fcflags_opt_29_kpoints = +fcflags_opt_32_util = +fcflags_opt_33_xc_lowlevel = +fcflags_opt_39_libpaw = +fcflags_opt_41_geometry = +fcflags_opt_42_nlstrain = +fcflags_opt_42_parser = +fcflags_opt_43_ptgroups = -O0 +fcflags_opt_43_wvl_wrappers = +fcflags_opt_44_abitools = +fcflags_opt_44_abitypes_defs = +fcflags_opt_44_manage_kokkos = +fcflags_opt_45_geomoptim = +fcflags_opt_45_xgTools = +fcflags_opt_46_ghc_omp = +fcflags_opt_46_manage_cuda = +fcflags_opt_48_diago = +fcflags_opt_49_gw_toolbox_oop = +fcflags_opt_51_manage_mpi = +fcflags_opt_52_fft_mpi_noabirule = +fcflags_opt_53_ffts = +fcflags_opt_54_spacepar = +fcflags_opt_55_abiutil = +fcflags_opt_56_io_mpi = +fcflags_opt_56_mixing = +fcflags_opt_56_recipspace = +fcflags_opt_56_xc = +fcflags_opt_57_iopsp_parser = +fcflags_opt_57_iovars = +fcflags_opt_61_occeig = +fcflags_opt_62_cg_noabirule = +fcflags_opt_62_ctqmc = +fcflags_opt_62_iowfdenpot = +fcflags_opt_62_poisson = +fcflags_opt_62_wvl_wfs = +fcflags_opt_64_psp = +fcflags_opt_65_lotf_base = +fcflags_opt_65_paw = +fcflags_opt_66_nonlocal = +fcflags_opt_66_vdwxc = +fcflags_opt_66_wfs = +fcflags_opt_67_common = +fcflags_opt_67_python_invocation_ext = +fcflags_opt_67_triqs_ext = +fcflags_opt_68_dmft = +fcflags_opt_68_lotf = +fcflags_opt_68_recursion = +fcflags_opt_68_rsprc = +fcflags_opt_69_wfdesc = +fcflags_opt_70_gw = +fcflags_opt_71_bse = +fcflags_opt_71_wannier = +fcflags_opt_72_response = +fcflags_opt_77_ddb = +fcflags_opt_77_suscep = +fcflags_opt_78_effpot = +fcflags_opt_78_eph = +fcflags_opt_79_seqpar_mpi = +fcflags_opt_80_rttddft = +fcflags_opt_80_tdep = +fcflags_opt_94_scfcv = +fcflags_opt_95_drive = +fcflags_opt_98_main = +fcflags_opt_bigdft = +fcflags_opt_default = +fcflags_opt_hdf5 = +fcflags_opt_levmar = +fcflags_opt_libpsml = +fcflags_opt_libxc = +fcflags_opt_libxml2 = +fcflags_opt_linalg = +fcflags_opt_netcdf = +fcflags_opt_netcdf_fortran = +fcflags_opt_papi = +fcflags_opt_triqs = +fcflags_opt_wannier90 = +fcflags_opt_xmlf90 = +host = x86_64-apple-darwin18.7.0 +host_alias = +host_cpu = x86_64 +host_os = darwin18.7.0 +host_vendor = apple +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = ${SHELL} /Users/gonze/_Research/ABINIT_git/gonze/config/gnu/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = ${datarootdir}/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = $(MKDIR_P) +oldincludedir = /usr/include +pdfdir = ${docdir} +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +runstatedir = ${localstatedir}/run +sbindir = ${exec_prefix}/sbin +sd_abinit_common_cppflags = +sd_abinit_common_enable = no +sd_abinit_common_enable_def = no +sd_abinit_common_fcflags = +sd_abinit_common_init = def +sd_abinit_common_ldflags = +sd_abinit_common_libs = +sd_abinit_common_ok = unknown +sd_abinit_common_options = optional skip +sd_abinit_common_policy = skip +sd_abinit_common_status = optional +sd_bigdft_cppflags = +sd_bigdft_enable = no +sd_bigdft_enable_def = no +sd_bigdft_fcflags = +sd_bigdft_init = def +sd_bigdft_ldflags = +sd_bigdft_libs = +sd_bigdft_ok = unknown +sd_bigdft_options = optional warn +sd_bigdft_policy = warn +sd_bigdft_status = optional +sd_fft_cflags = +sd_fft_choices = +sd_fft_cppflags = -I/opt/local/include +sd_fft_cxxflags = +sd_fft_enable = yes +sd_fft_fcflags = -I/opt/local/include +sd_fft_flavor = fftw3 +sd_fft_init = kwd +sd_fft_ldflags = +sd_fft_libs = -L/opt/local/lib -lfftw3 -lfftw3f +sd_fft_ok = yes +sd_fftw3_cflags = +sd_fftw3_cppflags = -I/opt/local/include +sd_fftw3_enable = yes +sd_fftw3_enable_def = no +sd_fftw3_fcflags = -I/opt/local/include +sd_fftw3_init = env +sd_fftw3_ldflags = +sd_fftw3_libs = -L/opt/local/lib -lfftw3 -lfftw3f +sd_fftw3_ok = yes +sd_fftw3_options = optional skip +sd_fftw3_policy = skip +sd_fftw3_status = optional +sd_gpu_cflags = +sd_gpu_cppflags = +sd_gpu_cxxflags = +sd_gpu_enable = no +sd_gpu_enable_def = no +sd_gpu_fcflags = +sd_gpu_init = def +sd_gpu_ldflags = +sd_gpu_libs = +sd_gpu_ok = no +sd_gpu_options = optional warn +sd_gpu_policy = warn +sd_gpu_prefix = +sd_gpu_status = optional +sd_hdf5_cflags = +sd_hdf5_cppflags = -I/opt/local/include -I/opt/local/include +sd_hdf5_cxxflags = +sd_hdf5_enable = yes +sd_hdf5_enable_def = yes +sd_hdf5_enable_fc = no +sd_hdf5_fcflags = +sd_hdf5_h5cc = /opt/local/bin/h5cc +sd_hdf5_h5fc = +sd_hdf5_init = dir +sd_hdf5_ldflags = +sd_hdf5_libs = -L/opt/local/lib -L/opt/local/lib -lhdf5_hl -L/opt/local/lib -lhdf5 -lz -ldl -lm +sd_hdf5_ok = yes +sd_hdf5_options = required no-fortran warn +sd_hdf5_policy = warn +sd_hdf5_status = required +sd_kokkos_cppflags = +sd_kokkos_cxxflags = +sd_kokkos_enable = no +sd_kokkos_enable_def = no +sd_kokkos_init = def +sd_kokkos_ldflags = +sd_kokkos_libs = +sd_kokkos_ok = unknown +sd_kokkos_options = optional fail +sd_kokkos_policy = fail +sd_kokkos_status = optional +sd_levmar_cflags = +sd_levmar_cppflags = +sd_levmar_enable = no +sd_levmar_enable_def = no +sd_levmar_init = def +sd_levmar_ldflags = +sd_levmar_libs = +sd_levmar_ok = unknown +sd_levmar_options = optional fail +sd_levmar_policy = fail +sd_levmar_status = optional +sd_libpaw_cppflags = +sd_libpaw_enable = no +sd_libpaw_enable_def = no +sd_libpaw_fcflags = +sd_libpaw_init = def +sd_libpaw_ldflags = +sd_libpaw_libs = +sd_libpaw_ok = unknown +sd_libpaw_options = optional skip +sd_libpaw_policy = skip +sd_libpaw_status = optional +sd_libpsml_cppflags = +sd_libpsml_enable = no +sd_libpsml_enable_def = no +sd_libpsml_fcflags = +sd_libpsml_init = def +sd_libpsml_ldflags = +sd_libpsml_libs = +sd_libpsml_ok = unknown +sd_libpsml_options = optional warn +sd_libpsml_policy = warn +sd_libpsml_status = optional +sd_libxc_cflags = +sd_libxc_cppflags = -I/opt/local/include +sd_libxc_enable = yes +sd_libxc_enable_def = yes +sd_libxc_enable_fc = no +sd_libxc_fcflags = +sd_libxc_init = dir +sd_libxc_ldflags = +sd_libxc_libs = -L/opt/local/lib -lxc +sd_libxc_ok = yes +sd_libxc_options = required no-fortran warn +sd_libxc_policy = warn +sd_libxc_status = required +sd_linalg_cflags = +sd_linalg_choices = +sd_linalg_cppflags = +sd_linalg_cxxflags = +sd_linalg_enable = yes +sd_linalg_fcflags = -I/opt/local/include +sd_linalg_flavor = openblas +sd_linalg_has_elpa = no +sd_linalg_has_scalapack = no +sd_linalg_init = env +sd_linalg_ldflags = +sd_linalg_libs = -L/opt/local/lib -lopenblas +sd_linalg_ok = yes +sd_mpi_cc = /opt/local/bin/mpicc +sd_mpi_cflags = +sd_mpi_cppflags = -I/opt/local/include +sd_mpi_cxx = /opt/local/bin/mpicxx +sd_mpi_enable = yes +sd_mpi_enable_cxx = yes +sd_mpi_enable_def = auto +sd_mpi_enable_fc = yes +sd_mpi_fc = /opt/local/bin/mpif90 +sd_mpi_fcflags = -I/opt/local/include +sd_mpi_init = dir +sd_mpi_ldflags = +sd_mpi_libs = +sd_mpi_ok = yes +sd_mpi_options = auto optional fail +sd_mpi_policy = fail +sd_mpi_status = optional +sd_netcdf_cflags = +sd_netcdf_cppflags = -I/opt/local/include +sd_netcdf_enable = yes +sd_netcdf_enable_def = yes +sd_netcdf_fcflags = -I/opt/local/include +sd_netcdf_fortran_cflags = +sd_netcdf_fortran_cppflags = -I/opt/local/include +sd_netcdf_fortran_enable = yes +sd_netcdf_fortran_enable_def = yes +sd_netcdf_fortran_fcflags = -I/opt/local/include +sd_netcdf_fortran_init = dir +sd_netcdf_fortran_ldflags = +sd_netcdf_fortran_libs = -L/opt/local/lib -lnetcdff +sd_netcdf_fortran_ok = yes +sd_netcdf_fortran_options = required warn +sd_netcdf_fortran_policy = warn +sd_netcdf_fortran_status = required +sd_netcdf_init = dir +sd_netcdf_ldflags = +sd_netcdf_libs = -L/opt/local/lib -lnetcdf +sd_netcdf_ok = yes +sd_netcdf_options = required warn +sd_netcdf_policy = warn +sd_netcdf_status = required +sd_papi_cflags = +sd_papi_cppflags = +sd_papi_enable = no +sd_papi_enable_def = no +sd_papi_init = def +sd_papi_ldflags = +sd_papi_libs = +sd_papi_ok = unknown +sd_papi_options = optional fail +sd_papi_policy = fail +sd_papi_sd_papi_fcflags = +sd_papi_status = optional +sd_pfft_cflags = +sd_pfft_cppflags = +sd_pfft_enable = no +sd_pfft_enable_def = no +sd_pfft_init = def +sd_pfft_ldflags = +sd_pfft_libs = +sd_pfft_ok = unknown +sd_pfft_options = optional skip +sd_pfft_policy = skip +sd_pfft_status = optional +sd_sys_fcflags = +sd_triqs_cflags = +sd_triqs_cppflags = +sd_triqs_cxxflags = +sd_triqs_enable = no +sd_triqs_enable_def = no +sd_triqs_fcflags = +sd_triqs_init = def +sd_triqs_ldflags = +sd_triqs_libs = +sd_triqs_ok = unknown +sd_triqs_options = optional fail +sd_triqs_policy = fail +sd_triqs_status = optional +sd_wannier90_cppflags = +sd_wannier90_enable = yes +sd_wannier90_enable_def = no +sd_wannier90_fcflags = -I/opt/local/include +sd_wannier90_init = env +sd_wannier90_ldflags = +sd_wannier90_libs = -L/opt/local/lib -lwannier +sd_wannier90_ok = yes +sd_wannier90_options = optional warn +sd_wannier90_policy = warn +sd_wannier90_status = optional +sd_xmlf90_cppflags = +sd_xmlf90_enable = no +sd_xmlf90_enable_def = no +sd_xmlf90_fcflags = +sd_xmlf90_init = def +sd_xmlf90_ldflags = +sd_xmlf90_libs = +sd_xmlf90_ok = unknown +sd_xmlf90_options = optional warn +sd_xmlf90_policy = warn +sd_xmlf90_status = optional +sd_yakl_cppflags = +sd_yakl_enable = no +sd_yakl_enable_def = no +sd_yakl_fcflags = +sd_yakl_init = def +sd_yakl_ldflags = +sd_yakl_libs = +sd_yakl_ok = unknown +sd_yakl_options = optional fail +sd_yakl_policy = fail +sd_yakl_status = optional +sharedstatedir = ${prefix}/com +src_02_clib_fcflags = -I$(top_builddir)/shared/common/src/02_clib -I$(top_srcdir)/shared/common/src/02_clib +src_10_defs_fcflags = -I$(top_builddir)/shared/common/src/10_defs -I$(top_srcdir)/shared/common/src/10_defs +src_11_memory_mpi_fcflags = -I$(top_builddir)/shared/common/src/11_memory_mpi -I$(top_srcdir)/shared/common/src/11_memory_mpi +src_12_hide_mpi_fcflags = -I$(top_builddir)/shared/common/src/12_hide_mpi -I$(top_srcdir)/shared/common/src/12_hide_mpi +src_14_hidewrite_fcflags = -I$(top_builddir)/shared/common/src/14_hidewrite -I$(top_srcdir)/shared/common/src/14_hidewrite +src_16_hideleave_fcflags = -I$(top_builddir)/shared/common/src/16_hideleave -I$(top_srcdir)/shared/common/src/16_hideleave +src_16_kokkos_toolbox_fcflags = -I$(top_builddir)/shared/common/src/16_kokkos_toolbox -I$(top_srcdir)/shared/common/src/16_kokkos_toolbox +src_17_gpu_toolbox_fcflags = -I$(top_builddir)/shared/common/src/17_gpu_toolbox -I$(top_srcdir)/shared/common/src/17_gpu_toolbox +src_17_libtetra_ext_fcflags = -I$(top_builddir)/shared/common/src/17_libtetra_ext -I$(top_srcdir)/shared/common/src/17_libtetra_ext +src_17_minimax_fcflags = -I$(top_builddir)/shared/common/src/17_minimax -I$(top_srcdir)/shared/common/src/17_minimax +src_17_yaml_out_fcflags = -I$(top_builddir)/shared/common/src/17_yaml_out -I$(top_srcdir)/shared/common/src/17_yaml_out +src_18_timing_fcflags = -I$(top_builddir)/shared/common/src/18_timing -I$(top_srcdir)/shared/common/src/18_timing +src_21_hashfuncs_fcflags = -I$(top_builddir)/shared/common/src/21_hashfuncs -I$(top_srcdir)/shared/common/src/21_hashfuncs +src_27_toolbox_oop_fcflags = -I$(top_builddir)/shared/common/src/27_toolbox_oop -I$(top_srcdir)/shared/common/src/27_toolbox_oop +src_28_numeric_noabirule_fcflags = -I$(top_builddir)/shared/common/src/28_numeric_noabirule -I$(top_srcdir)/shared/common/src/28_numeric_noabirule +src_29_kpoints_fcflags = -I$(top_builddir)/shared/common/src/29_kpoints -I$(top_srcdir)/shared/common/src/29_kpoints +src_32_util_fcflags = -I$(top_builddir)/shared/common/src/32_util -I$(top_srcdir)/shared/common/src/32_util +src_33_xc_lowlevel_fcflags = -I$(top_builddir)/shared/common/src/33_xc_lowlevel -I$(top_srcdir)/shared/common/src/33_xc_lowlevel +src_39_libpaw_fcflags = -I$(top_builddir)/shared/libpaw/src -I$(top_srcdir)/shared/libpaw/src +src_41_geometry_fcflags = -I$(top_builddir)/src/41_geometry -I$(top_srcdir)/src/41_geometry +src_42_nlstrain_fcflags = -I$(top_builddir)/src/42_nlstrain -I$(top_srcdir)/src/42_nlstrain +src_42_parser_fcflags = -I$(top_builddir)/src/42_parser -I$(top_srcdir)/src/42_parser +src_43_ptgroups_fcflags = -I$(top_builddir)/src/43_ptgroups -I$(top_srcdir)/src/43_ptgroups +src_43_wvl_wrappers_fcflags = -I$(top_builddir)/src/43_wvl_wrappers -I$(top_srcdir)/src/43_wvl_wrappers +src_44_abitools_fcflags = -I$(top_builddir)/src/44_abitools -I$(top_srcdir)/src/44_abitools +src_44_abitypes_defs_fcflags = -I$(top_builddir)/src/44_abitypes_defs -I$(top_srcdir)/src/44_abitypes_defs +src_44_manage_kokkos_fcflags = -I$(top_builddir)/src/44_manage_kokkos -I$(top_srcdir)/src/44_manage_kokkos +src_45_geomoptim_fcflags = -I$(top_builddir)/src/45_geomoptim -I$(top_srcdir)/src/45_geomoptim +src_45_xgTools_fcflags = -I$(top_builddir)/src/45_xgTools -I$(top_srcdir)/src/45_xgTools +src_46_ghc_omp_fcflags = -I$(top_builddir)/src/46_ghc_omp -I$(top_srcdir)/src/46_ghc_omp +src_46_manage_cuda_fcflags = -I$(top_builddir)/src/46_manage_cuda -I$(top_srcdir)/src/46_manage_cuda +src_48_diago_fcflags = -I$(top_builddir)/src/48_diago -I$(top_srcdir)/src/48_diago +src_49_gw_toolbox_oop_fcflags = -I$(top_builddir)/src/49_gw_toolbox_oop -I$(top_srcdir)/src/49_gw_toolbox_oop +src_51_manage_mpi_fcflags = -I$(top_builddir)/src/51_manage_mpi -I$(top_srcdir)/src/51_manage_mpi +src_52_fft_mpi_noabirule_fcflags = -I$(top_builddir)/src/52_fft_mpi_noabirule -I$(top_srcdir)/src/52_fft_mpi_noabirule +src_53_ffts_fcflags = -I$(top_builddir)/src/53_ffts -I$(top_srcdir)/src/53_ffts +src_54_spacepar_fcflags = -I$(top_builddir)/src/54_spacepar -I$(top_srcdir)/src/54_spacepar +src_55_abiutil_fcflags = -I$(top_builddir)/src/55_abiutil -I$(top_srcdir)/src/55_abiutil +src_56_io_mpi_fcflags = -I$(top_builddir)/src/56_io_mpi -I$(top_srcdir)/src/56_io_mpi +src_56_mixing_fcflags = -I$(top_builddir)/src/56_mixing -I$(top_srcdir)/src/56_mixing +src_56_recipspace_fcflags = -I$(top_builddir)/src/56_recipspace -I$(top_srcdir)/src/56_recipspace +src_56_xc_fcflags = -I$(top_builddir)/src/56_xc -I$(top_srcdir)/src/56_xc +src_57_iopsp_parser_fcflags = -I$(top_builddir)/src/57_iopsp_parser -I$(top_srcdir)/src/57_iopsp_parser +src_57_iovars_fcflags = -I$(top_builddir)/src/57_iovars -I$(top_srcdir)/src/57_iovars +src_61_occeig_fcflags = -I$(top_builddir)/src/61_occeig -I$(top_srcdir)/src/61_occeig +src_62_cg_noabirule_fcflags = -I$(top_builddir)/src/62_cg_noabirule -I$(top_srcdir)/src/62_cg_noabirule +src_62_ctqmc_fcflags = -I$(top_builddir)/src/62_ctqmc -I$(top_srcdir)/src/62_ctqmc +src_62_iowfdenpot_fcflags = -I$(top_builddir)/src/62_iowfdenpot -I$(top_srcdir)/src/62_iowfdenpot +src_62_poisson_fcflags = -I$(top_builddir)/src/62_poisson -I$(top_srcdir)/src/62_poisson +src_62_wvl_wfs_fcflags = -I$(top_builddir)/src/62_wvl_wfs -I$(top_srcdir)/src/62_wvl_wfs +src_64_psp_fcflags = -I$(top_builddir)/src/64_psp -I$(top_srcdir)/src/64_psp +src_65_lotf_base_fcflags = -I$(top_builddir)/src/65_lotf_base -I$(top_srcdir)/src/65_lotf_base +src_65_paw_fcflags = -I$(top_builddir)/src/65_paw -I$(top_srcdir)/src/65_paw +src_66_nonlocal_fcflags = -I$(top_builddir)/src/66_nonlocal -I$(top_srcdir)/src/66_nonlocal +src_66_vdwxc_fcflags = -I$(top_builddir)/src/66_vdwxc -I$(top_srcdir)/src/66_vdwxc +src_66_wfs_fcflags = -I$(top_builddir)/src/66_wfs -I$(top_srcdir)/src/66_wfs +src_67_common_fcflags = -I$(top_builddir)/src/67_common -I$(top_srcdir)/src/67_common +src_67_python_invocation_ext_fcflags = -I$(top_builddir)/src/67_python_invocation_ext -I$(top_srcdir)/src/67_python_invocation_ext +src_67_triqs_ext_fcflags = -I$(top_builddir)/src/67_triqs_ext -I$(top_srcdir)/src/67_triqs_ext +src_68_dmft_fcflags = -I$(top_builddir)/src/68_dmft -I$(top_srcdir)/src/68_dmft +src_68_lotf_fcflags = -I$(top_builddir)/src/68_lotf -I$(top_srcdir)/src/68_lotf +src_68_recursion_fcflags = -I$(top_builddir)/src/68_recursion -I$(top_srcdir)/src/68_recursion +src_68_rsprc_fcflags = -I$(top_builddir)/src/68_rsprc -I$(top_srcdir)/src/68_rsprc +src_69_wfdesc_fcflags = -I$(top_builddir)/src/69_wfdesc -I$(top_srcdir)/src/69_wfdesc +src_70_gw_fcflags = -I$(top_builddir)/src/70_gw -I$(top_srcdir)/src/70_gw +src_71_bse_fcflags = -I$(top_builddir)/src/71_bse -I$(top_srcdir)/src/71_bse +src_71_wannier_fcflags = -I$(top_builddir)/src/71_wannier -I$(top_srcdir)/src/71_wannier +src_72_response_fcflags = -I$(top_builddir)/src/72_response -I$(top_srcdir)/src/72_response +src_77_ddb_fcflags = -I$(top_builddir)/src/77_ddb -I$(top_srcdir)/src/77_ddb +src_77_suscep_fcflags = -I$(top_builddir)/src/77_suscep -I$(top_srcdir)/src/77_suscep +src_78_effpot_fcflags = -I$(top_builddir)/src/78_effpot -I$(top_srcdir)/src/78_effpot +src_78_eph_fcflags = -I$(top_builddir)/src/78_eph -I$(top_srcdir)/src/78_eph +src_79_seqpar_mpi_fcflags = -I$(top_builddir)/src/79_seqpar_mpi -I$(top_srcdir)/src/79_seqpar_mpi +src_80_rttddft_fcflags = -I$(top_builddir)/src/80_rttddft -I$(top_srcdir)/src/80_rttddft +src_80_tdep_fcflags = -I$(top_builddir)/src/80_tdep -I$(top_srcdir)/src/80_tdep +src_94_scfcv_fcflags = -I$(top_builddir)/src/94_scfcv -I$(top_srcdir)/src/94_scfcv +src_95_drive_fcflags = -I$(top_builddir)/src/95_drive -I$(top_srcdir)/src/95_drive +src_common_fcflags = -I$(top_builddir)/shared/common/src/incs -I$(top_srcdir)/shared/common/src/incs -I$(top_builddir)/shared/common/src/mods -I$(top_srcdir)/shared/common/src/mods +src_core_fcflags = -I$(top_builddir)/src/incs -I$(top_srcdir)/src/incs -I$(top_builddir)/src/mods -I$(top_srcdir)/src/mods +src_libpaw_fcflags = -I$(top_builddir)/shared/libpaw/incs -I$(top_srcdir)/shared/libpaw/incs -I$(top_builddir)/shared/libpaw/mods -I$(top_srcdir)/shared/libpaw/mods +srcdir = . +sysconfdir = ${prefix}/etc +target = x86_64-apple-darwin18.7.0 +target_alias = +target_cpu = x86_64 +target_os = darwin18.7.0 +target_vendor = apple +top_build_prefix = ../../../ +top_builddir = ../../.. +top_srcdir = ../../.. +with_abinit_common = +with_bigdft = +with_config_file = +with_debug_flavor = +with_fallbacks = +with_fc_vendor = +with_fc_version = +with_fft_flavor = fftw3 +with_fftw3 = +with_gnu_ld = +with_gpu = +with_hdf5 = /opt/local +with_kokkos = +with_levmar = +with_libpaw = +with_libpsml = +with_libxc = /opt/local +with_libxml2 = +with_linalg_flavor = openblas +with_mpi = /opt/local +with_mpi_level = +with_netcdf = /opt/local +with_optim_flavor = +with_papi = +with_pfft = +with_triqs = +with_wannier90 = +with_xmlf90 = +with_yakl = +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu shared/libpaw/incs/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu shared/libpaw/incs/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +tags TAGS: + +ctags CTAGS: + +cscope cscopelist: + + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile all-local +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am all-local check check-am clean clean-generic \ + cscopelist-am ctags-am distclean distclean-generic distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ + pdf-am ps ps-am tags-am uninstall uninstall-am + +.PRECIOUS: Makefile + + +all-local: + @echo "There is no buildable file here" + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/GX-PAW/libpaw/incs/Makefile.am b/GX-PAW/libpaw/incs/Makefile.am new file mode 100644 index 00000000..9bf3f2ac --- /dev/null +++ b/GX-PAW/libpaw/incs/Makefile.am @@ -0,0 +1,14 @@ +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-inter on 2024/03/16 21:07:39 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-inter script or its config file instead. +# + +all-local: + @echo "There is no buildable file here" + diff --git a/GX-PAW/libpaw/incs/Makefile.in b/GX-PAW/libpaw/incs/Makefile.in new file mode 100644 index 00000000..929eac65 --- /dev/null +++ b/GX-PAW/libpaw/incs/Makefile.in @@ -0,0 +1,1311 @@ +# Makefile.in generated by automake 1.16.3 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2020 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-inter on 2024/03/16 21:07:39 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-inter script or its config file instead. +# +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = shared/libpaw/incs +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/m4/arch-gpu.m4 \ + $(top_srcdir)/config/m4/arch-mpi.m4 \ + $(top_srcdir)/config/m4/auto-autotools.m4 \ + $(top_srcdir)/config/m4/auto-corelibs.m4 \ + $(top_srcdir)/config/m4/auto-debug.m4 \ + $(top_srcdir)/config/m4/auto-dirflags.m4 \ + $(top_srcdir)/config/m4/auto-env.m4 \ + $(top_srcdir)/config/m4/auto-hints.m4 \ + $(top_srcdir)/config/m4/auto-optim.m4 \ + $(top_srcdir)/config/m4/auto-options.m4 \ + $(top_srcdir)/config/m4/auto-output.m4 \ + $(top_srcdir)/config/m4/auto-triggers.m4 \ + $(top_srcdir)/config/m4/conf-atompaw.m4 \ + $(top_srcdir)/config/m4/conf-debug.m4 \ + $(top_srcdir)/config/m4/conf-fallbacks.m4 \ + $(top_srcdir)/config/m4/conf-files.m4 \ + $(top_srcdir)/config/m4/conf-init.m4 \ + $(top_srcdir)/config/m4/conf-openmp.m4 \ + $(top_srcdir)/config/m4/conf-optim.m4 \ + $(top_srcdir)/config/m4/lang-c++.m4 \ + $(top_srcdir)/config/m4/lang-c.m4 \ + $(top_srcdir)/config/m4/lang-fortran-import.m4 \ + $(top_srcdir)/config/m4/lang-fortran.m4 \ + $(top_srcdir)/config/m4/lang-python.m4 \ + $(top_srcdir)/config/m4/libxml2.m4 \ + $(top_srcdir)/config/m4/misc-display.m4 \ + $(top_srcdir)/config/m4/sd_abinit_common.m4 \ + $(top_srcdir)/config/m4/sd_arch_gpu.m4 \ + $(top_srcdir)/config/m4/sd_arch_mpi.m4 \ + $(top_srcdir)/config/m4/sd_bigdft.m4 \ + $(top_srcdir)/config/m4/sd_core.m4 \ + $(top_srcdir)/config/m4/sd_esl.m4 \ + $(top_srcdir)/config/m4/sd_fftw3.m4 \ + $(top_srcdir)/config/m4/sd_gpu_kokkos.m4 \ + $(top_srcdir)/config/m4/sd_gpu_yakl.m4 \ + $(top_srcdir)/config/m4/sd_io_hdf5.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf_fortran.m4 \ + $(top_srcdir)/config/m4/sd_levmar.m4 \ + $(top_srcdir)/config/m4/sd_libpaw.m4 \ + $(top_srcdir)/config/m4/sd_libpsml.m4 \ + $(top_srcdir)/config/m4/sd_libxc.m4 \ + $(top_srcdir)/config/m4/sd_math_fft.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_core.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_util.m4 \ + $(top_srcdir)/config/m4/sd_papi.m4 \ + $(top_srcdir)/config/m4/sd_pfft.m4 \ + $(top_srcdir)/config/m4/sd_triqs.m4 \ + $(top_srcdir)/config/m4/sd_wannier90.m4 \ + $(top_srcdir)/config/m4/sd_xmlf90.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +SOURCES = +DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(srcdir)/Makefile.in +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ABINIT_BINARY_PACKAGE = @ABINIT_BINARY_PACKAGE@ +ABINIT_COMMON_CPPFLAGS = @ABINIT_COMMON_CPPFLAGS@ +ABINIT_COMMON_FCFLAGS = @ABINIT_COMMON_FCFLAGS@ +ABINIT_COMMON_LDFLAGS = @ABINIT_COMMON_LDFLAGS@ +ABINIT_COMMON_LIBS = @ABINIT_COMMON_LIBS@ +ABINIT_TARGET = @ABINIT_TARGET@ +ABINIT_VERSION = @ABINIT_VERSION@ +ABINIT_VERSION_BASE = @ABINIT_VERSION_BASE@ +ABINIT_VERSION_BUILD = @ABINIT_VERSION_BUILD@ +ABINIT_VERSION_MAJOR = @ABINIT_VERSION_MAJOR@ +ABINIT_VERSION_MICRO = @ABINIT_VERSION_MICRO@ +ABINIT_VERSION_MINOR = @ABINIT_VERSION_MINOR@ +ABI_CPPFLAGS = @ABI_CPPFLAGS@ +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +ARFLAGS = @ARFLAGS@ +ARFLAGS_CMD = @ARFLAGS_CMD@ +ARFLAGS_DEBUG = @ARFLAGS_DEBUG@ +ARFLAGS_EXTRA = @ARFLAGS_EXTRA@ +ARFLAGS_HINTS = @ARFLAGS_HINTS@ +ARFLAGS_OPTIM = @ARFLAGS_OPTIM@ +ATOMPAW_BIN = @ATOMPAW_BIN@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BIGDFT_CPPFLAGS = @BIGDFT_CPPFLAGS@ +BIGDFT_FCFLAGS = @BIGDFT_FCFLAGS@ +BIGDFT_LDFLAGS = @BIGDFT_LDFLAGS@ +BIGDFT_LIBS = @BIGDFT_LIBS@ +BOURNE_SHELL = @BOURNE_SHELL@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CC_LDFLAGS = @CC_LDFLAGS@ +CC_LDFLAGS_DEBUG = @CC_LDFLAGS_DEBUG@ +CC_LDFLAGS_EXTRA = @CC_LDFLAGS_EXTRA@ +CC_LDFLAGS_GPU = @CC_LDFLAGS_GPU@ +CC_LDFLAGS_HINTS = @CC_LDFLAGS_HINTS@ +CC_LDFLAGS_OPTIM = @CC_LDFLAGS_OPTIM@ +CC_LIBS = @CC_LIBS@ +CC_LIBS_DEBUG = @CC_LIBS_DEBUG@ +CC_LIBS_EXTRA = @CC_LIBS_EXTRA@ +CC_LIBS_GPU = @CC_LIBS_GPU@ +CC_LIBS_HINTS = @CC_LIBS_HINTS@ +CC_LIBS_OPTIM = @CC_LIBS_OPTIM@ +CFLAGS = @CFLAGS@ +CFLAGS_DEBUG = @CFLAGS_DEBUG@ +CFLAGS_EXTRA = @CFLAGS_EXTRA@ +CFLAGS_GPU = @CFLAGS_GPU@ +CFLAGS_HINTS = @CFLAGS_HINTS@ +CFLAGS_OPTIM = @CFLAGS_OPTIM@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CPPFLAGS_DEBUG = @CPPFLAGS_DEBUG@ +CPPFLAGS_EXTRA = @CPPFLAGS_EXTRA@ +CPPFLAGS_GPU = @CPPFLAGS_GPU@ +CPPFLAGS_HINTS = @CPPFLAGS_HINTS@ +CPPFLAGS_HINTS_EXT = @CPPFLAGS_HINTS_EXT@ +CPPFLAGS_OPTIM = @CPPFLAGS_OPTIM@ +CXX = @CXX@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CXXFLAGS_DEBUG = @CXXFLAGS_DEBUG@ +CXXFLAGS_EXTRA = @CXXFLAGS_EXTRA@ +CXXFLAGS_GPU = @CXXFLAGS_GPU@ +CXXFLAGS_HINTS = @CXXFLAGS_HINTS@ +CXXFLAGS_OPTIM = @CXXFLAGS_OPTIM@ +CXX_LDFLAGS = @CXX_LDFLAGS@ +CXX_LDFLAGS_DEBUG = @CXX_LDFLAGS_DEBUG@ +CXX_LDFLAGS_EXTRA = @CXX_LDFLAGS_EXTRA@ +CXX_LDFLAGS_GPU = @CXX_LDFLAGS_GPU@ +CXX_LDFLAGS_HINTS = @CXX_LDFLAGS_HINTS@ +CXX_LDFLAGS_OPTIM = @CXX_LDFLAGS_OPTIM@ +CXX_LIBS = @CXX_LIBS@ +CXX_LIBS_DEBUG = @CXX_LIBS_DEBUG@ +CXX_LIBS_EXTRA = @CXX_LIBS_EXTRA@ +CXX_LIBS_GPU = @CXX_LIBS_GPU@ +CXX_LIBS_HINTS = @CXX_LIBS_HINTS@ +CXX_LIBS_OPTIM = @CXX_LIBS_OPTIM@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ +FCFLAGS = @FCFLAGS@ +FCFLAGS_DEBUG = @FCFLAGS_DEBUG@ +FCFLAGS_EXTRA = @FCFLAGS_EXTRA@ +FCFLAGS_F90 = @FCFLAGS_F90@ +FCFLAGS_FIXEDFORM = @FCFLAGS_FIXEDFORM@ +FCFLAGS_FREEFORM = @FCFLAGS_FREEFORM@ +FCFLAGS_HINTS = @FCFLAGS_HINTS@ +FCFLAGS_MODDIR = @FCFLAGS_MODDIR@ +FCFLAGS_OPENMP = @FCFLAGS_OPENMP@ +FCFLAGS_OPENMP_OFFLOAD = @FCFLAGS_OPENMP_OFFLOAD@ +FCFLAGS_OPTIM = @FCFLAGS_OPTIM@ +FCLIBS = @FCLIBS@ +FC_LDFLAGS = @FC_LDFLAGS@ +FC_LDFLAGS_DEBUG = @FC_LDFLAGS_DEBUG@ +FC_LDFLAGS_EXTRA = @FC_LDFLAGS_EXTRA@ +FC_LDFLAGS_HINTS = @FC_LDFLAGS_HINTS@ +FC_LDFLAGS_OPTIM = @FC_LDFLAGS_OPTIM@ +FC_LIBS = @FC_LIBS@ +FC_LIBS_DEBUG = @FC_LIBS_DEBUG@ +FC_LIBS_EXTRA = @FC_LIBS_EXTRA@ +FC_LIBS_HINTS = @FC_LIBS_HINTS@ +FC_LIBS_OPTIM = @FC_LIBS_OPTIM@ +FC_NOWRAP = @FC_NOWRAP@ +FFLAGS = @FFLAGS@ +FFTW3_CFLAGS = @FFTW3_CFLAGS@ +FFTW3_CPPFLAGS = @FFTW3_CPPFLAGS@ +FFTW3_FCFLAGS = @FFTW3_FCFLAGS@ +FFTW3_LDFLAGS = @FFTW3_LDFLAGS@ +FFTW3_LIBS = @FFTW3_LIBS@ +FFT_CFLAGS = @FFT_CFLAGS@ +FFT_FCFLAGS = @FFT_FCFLAGS@ +FPP = @FPP@ +FPPFLAGS = @FPPFLAGS@ +FPPFLAGS_DEBUG = @FPPFLAGS_DEBUG@ +FPPFLAGS_EXTRA = @FPPFLAGS_EXTRA@ +FPPFLAGS_HINTS = @FPPFLAGS_HINTS@ +FPPFLAGS_OPTIM = @FPPFLAGS_OPTIM@ +GPU_ARCH = @GPU_ARCH@ +GPU_CFLAGS = @GPU_CFLAGS@ +GPU_CPPFLAGS = @GPU_CPPFLAGS@ +GPU_CXXFLAGS = @GPU_CXXFLAGS@ +GPU_FCFLAGS = @GPU_FCFLAGS@ +GPU_LDFLAGS = @GPU_LDFLAGS@ +GPU_LIBS = @GPU_LIBS@ +GRAPHATOM_BIN = @GRAPHATOM_BIN@ +GREP = @GREP@ +H5CC = @H5CC@ +HDF5_CFLAGS = @HDF5_CFLAGS@ +HDF5_CPPFLAGS = @HDF5_CPPFLAGS@ +HDF5_CXXFLAGS = @HDF5_CXXFLAGS@ +HDF5_FCFLAGS = @HDF5_FCFLAGS@ +HDF5_LDFLAGS = @HDF5_LDFLAGS@ +HDF5_LIBS = @HDF5_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +LDFLAGS = @LDFLAGS@ +LEVMAR_CFLAGS = @LEVMAR_CFLAGS@ +LEVMAR_CPPFLAGS = @LEVMAR_CPPFLAGS@ +LEVMAR_LDFLAGS = @LEVMAR_LDFLAGS@ +LEVMAR_LIBS = @LEVMAR_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPAW_CPPFLAGS = @LIBPAW_CPPFLAGS@ +LIBPAW_FCFLAGS = @LIBPAW_FCFLAGS@ +LIBPAW_LDFLAGS = @LIBPAW_LDFLAGS@ +LIBPAW_LIBS = @LIBPAW_LIBS@ +LIBPSML_CPPFLAGS = @LIBPSML_CPPFLAGS@ +LIBPSML_FCFLAGS = @LIBPSML_FCFLAGS@ +LIBPSML_LDFLAGS = @LIBPSML_LDFLAGS@ +LIBPSML_LIBS = @LIBPSML_LIBS@ +LIBS = @LIBS@ +LIBXC_CFLAGS = @LIBXC_CFLAGS@ +LIBXC_CPPFLAGS = @LIBXC_CPPFLAGS@ +LIBXC_FCFLAGS = @LIBXC_FCFLAGS@ +LIBXC_LDFLAGS = @LIBXC_LDFLAGS@ +LIBXC_LIBS = @LIBXC_LIBS@ +LIBXML2_CPPFLAGS = @LIBXML2_CPPFLAGS@ +LIBXML2_FCFLAGS = @LIBXML2_FCFLAGS@ +LIBXML2_LIBS = @LIBXML2_LIBS@ +LINALG_CFLAGS = @LINALG_CFLAGS@ +LINALG_CPPFLAGS = @LINALG_CPPFLAGS@ +LINALG_CXXFLAGS = @LINALG_CXXFLAGS@ +LINALG_FCFLAGS = @LINALG_FCFLAGS@ +LINALG_LDFLAGS = @LINALG_LDFLAGS@ +LINALG_LIBS = @LINALG_LIBS@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODEXT = @MODEXT@ +MPI_CFLAGS = @MPI_CFLAGS@ +MPI_CPPFLAGS = @MPI_CPPFLAGS@ +MPI_CXXFLAGS = @MPI_CXXFLAGS@ +MPI_FCFLAGS = @MPI_FCFLAGS@ +MPI_LDFLAGS = @MPI_LDFLAGS@ +MPI_LIBS = @MPI_LIBS@ +MV = @MV@ +NETCDF_CFLAGS = @NETCDF_CFLAGS@ +NETCDF_CPPFLAGS = @NETCDF_CPPFLAGS@ +NETCDF_CXXFLAGS = @NETCDF_CXXFLAGS@ +NETCDF_FCFLAGS = @NETCDF_FCFLAGS@ +NETCDF_FORTRAN_CFLAGS = @NETCDF_FORTRAN_CFLAGS@ +NETCDF_FORTRAN_CPPFLAGS = @NETCDF_FORTRAN_CPPFLAGS@ +NETCDF_FORTRAN_CXXFLAGS = @NETCDF_FORTRAN_CXXFLAGS@ +NETCDF_FORTRAN_FCFLAGS = @NETCDF_FORTRAN_FCFLAGS@ +NETCDF_FORTRAN_LDFLAGS = @NETCDF_FORTRAN_LDFLAGS@ +NETCDF_FORTRAN_LIBS = @NETCDF_FORTRAN_LIBS@ +NETCDF_LDFLAGS = @NETCDF_LDFLAGS@ +NETCDF_LIBS = @NETCDF_LIBS@ +NVCC = @NVCC@ +NVCC_CFLAGS = @NVCC_CFLAGS@ +NVCC_CPPFLAGS = @NVCC_CPPFLAGS@ +NVCC_LDFLAGS = @NVCC_LDFLAGS@ +NVCC_LIBS = @NVCC_LIBS@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PAPI_CFLAGS = @PAPI_CFLAGS@ +PAPI_CPPFLAGS = @PAPI_CPPFLAGS@ +PAPI_LDFLAGS = @PAPI_LDFLAGS@ +PAPI_LIBS = @PAPI_LIBS@ +PATCH = @PATCH@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PFFT_CFLAGS = @PFFT_CFLAGS@ +PFFT_CPPFLAGS = @PFFT_CPPFLAGS@ +PFFT_LDFLAGS = @PFFT_LDFLAGS@ +PFFT_LIBS = @PFFT_LIBS@ +PYFLAGS = @PYFLAGS@ +PYTHON = @PYTHON@ +PYTHON_CONFIG = @PYTHON_CONFIG@ +PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ +RANLIB = @RANLIB@ +REALPATH = @REALPATH@ +RM = @RM@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +TAR = @TAR@ +TRIQS_CFLAGS = @TRIQS_CFLAGS@ +TRIQS_CPPFLAGS = @TRIQS_CPPFLAGS@ +TRIQS_CXXFLAGS = @TRIQS_CXXFLAGS@ +TRIQS_LDFLAGS = @TRIQS_LDFLAGS@ +TRIQS_LIBS = @TRIQS_LIBS@ +TRUE_CPP = @TRUE_CPP@ +VERSION = @VERSION@ +WANNIER90_CPPFLAGS = @WANNIER90_CPPFLAGS@ +WANNIER90_FCFLAGS = @WANNIER90_FCFLAGS@ +WANNIER90_LDFLAGS = @WANNIER90_LDFLAGS@ +WANNIER90_LIBS = @WANNIER90_LIBS@ +XML2_CONFIG = @XML2_CONFIG@ +XMLF90_CPPFLAGS = @XMLF90_CPPFLAGS@ +XMLF90_FCFLAGS = @XMLF90_FCFLAGS@ +XMLF90_LDFLAGS = @XMLF90_LDFLAGS@ +XMLF90_LIBS = @XMLF90_LIBS@ +XML_CPPFLAGS = @XML_CPPFLAGS@ +XML_LIBS = @XML_LIBS@ +XPP = @XPP@ +XPPFLAGS = @XPPFLAGS@ +XPPFLAGS_DEBUG = @XPPFLAGS_DEBUG@ +XPPFLAGS_EXTRA = @XPPFLAGS_EXTRA@ +XPPFLAGS_OPTIM = @XPPFLAGS_OPTIM@ +YAKL_CPPFLAGS = @YAKL_CPPFLAGS@ +YAKL_FCFLAGS = @YAKL_FCFLAGS@ +YAKL_LDFLAGS = @YAKL_LDFLAGS@ +YAKL_LIBS = @YAKL_LIBS@ +abi_ac_distcheck = @abi_ac_distcheck@ +abi_ac_version = @abi_ac_version@ +abi_am_version = @abi_am_version@ +abi_avx_safe_mode_enable = @abi_avx_safe_mode_enable@ +abi_bse_unpacked_enable = @abi_bse_unpacked_enable@ +abi_cc_path = @abi_cc_path@ +abi_cc_vendor = @abi_cc_vendor@ +abi_cc_version = @abi_cc_version@ +abi_cclock_enable = @abi_cclock_enable@ +abi_cpp_path = @abi_cpp_path@ +abi_cpu_64bits = @abi_cpu_64bits@ +abi_cpu_bits = @abi_cpu_bits@ +abi_cpu_model = @abi_cpu_model@ +abi_cpu_platform = @abi_cpu_platform@ +abi_cpu_spec = @abi_cpu_spec@ +abi_cpu_vendor = @abi_cpu_vendor@ +abi_crpa_optim_enable = @abi_crpa_optim_enable@ +abi_cxx_path = @abi_cxx_path@ +abi_cxx_vendor = @abi_cxx_vendor@ +abi_cxx_version = @abi_cxx_version@ +abi_debug_flavor = @abi_debug_flavor@ +abi_exports_enable = @abi_exports_enable@ +abi_fbk_abinit_common_ok = @abi_fbk_abinit_common_ok@ +abi_fbk_bigdft_ok = @abi_fbk_bigdft_ok@ +abi_fbk_config = @abi_fbk_config@ +abi_fbk_enable = @abi_fbk_enable@ +abi_fbk_fft_ok = @abi_fbk_fft_ok@ +abi_fbk_fftw3_ok = @abi_fbk_fftw3_ok@ +abi_fbk_gpu_ok = @abi_fbk_gpu_ok@ +abi_fbk_hdf5_ok = @abi_fbk_hdf5_ok@ +abi_fbk_init = @abi_fbk_init@ +abi_fbk_kokkos_ok = @abi_fbk_kokkos_ok@ +abi_fbk_levmar_ok = @abi_fbk_levmar_ok@ +abi_fbk_libpaw_ok = @abi_fbk_libpaw_ok@ +abi_fbk_libpsml_ok = @abi_fbk_libpsml_ok@ +abi_fbk_libxc_ok = @abi_fbk_libxc_ok@ +abi_fbk_libxml2_ok = @abi_fbk_libxml2_ok@ +abi_fbk_linalg_ok = @abi_fbk_linalg_ok@ +abi_fbk_list = @abi_fbk_list@ +abi_fbk_mpi_ok = @abi_fbk_mpi_ok@ +abi_fbk_netcdf_fortran_ok = @abi_fbk_netcdf_fortran_ok@ +abi_fbk_netcdf_ok = @abi_fbk_netcdf_ok@ +abi_fbk_papi_ok = @abi_fbk_papi_ok@ +abi_fbk_pfft_ok = @abi_fbk_pfft_ok@ +abi_fbk_prefix = @abi_fbk_prefix@ +abi_fbk_required = @abi_fbk_required@ +abi_fbk_triqs_ok = @abi_fbk_triqs_ok@ +abi_fbk_wannier90_ok = @abi_fbk_wannier90_ok@ +abi_fbk_xmlf90_ok = @abi_fbk_xmlf90_ok@ +abi_fbk_yakl_ok = @abi_fbk_yakl_ok@ +abi_fc_path = @abi_fc_path@ +abi_fc_vendor = @abi_fc_vendor@ +abi_fc_version = @abi_fc_version@ +abi_fc_wrap = @abi_fc_wrap@ +abi_fc_wrapper_enable = @abi_fc_wrapper_enable@ +abi_fpp_path = @abi_fpp_path@ +abi_gpu_arch = @abi_gpu_arch@ +abi_gpu_fcflags = @abi_gpu_fcflags@ +abi_gpu_flavor = @abi_gpu_flavor@ +abi_gpu_hip_libdir = @abi_gpu_hip_libdir@ +abi_gpu_incs = @abi_gpu_incs@ +abi_gpu_ldflags = @abi_gpu_ldflags@ +abi_gpu_libs = @abi_gpu_libs@ +abi_gpu_nvtx_v3 = @abi_gpu_nvtx_v3@ +abi_gpu_roctx = @abi_gpu_roctx@ +abi_gw_dpc_enable = @abi_gw_dpc_enable@ +abi_hints_enable = @abi_hints_enable@ +abi_libtetra_enable = @abi_libtetra_enable@ +abi_libxml2_cppflags = @abi_libxml2_cppflags@ +abi_libxml2_enable = @abi_libxml2_enable@ +abi_libxml2_fcflags = @abi_libxml2_fcflags@ +abi_libxml2_init = @abi_libxml2_init@ +abi_libxml2_ldflags = @abi_libxml2_ldflags@ +abi_libxml2_libs = @abi_libxml2_libs@ +abi_libxml2_ok = @abi_libxml2_ok@ +abi_libxml2_prefix = @abi_libxml2_prefix@ +abi_lotf_enable = @abi_lotf_enable@ +abi_lt_version = @abi_lt_version@ +abi_m4_version = @abi_m4_version@ +abi_memory_profiling_enable = @abi_memory_profiling_enable@ +abi_mpi_cflags = @abi_mpi_cflags@ +abi_mpi_cppflags = @abi_mpi_cppflags@ +abi_mpi_cxxflags = @abi_mpi_cxxflags@ +abi_mpi_enable = @abi_mpi_enable@ +abi_mpi_fcflags = @abi_mpi_fcflags@ +abi_mpi_flavor = @abi_mpi_flavor@ +abi_mpi_gpu_aware_enable = @abi_mpi_gpu_aware_enable@ +abi_mpi_incs = @abi_mpi_incs@ +abi_mpi_inplace_enable = @abi_mpi_inplace_enable@ +abi_mpi_interfaces_bugfix_enable = @abi_mpi_interfaces_bugfix_enable@ +abi_mpi_io_default_enable = @abi_mpi_io_default_enable@ +abi_mpi_io_enable = @abi_mpi_io_enable@ +abi_mpi_ldflags = @abi_mpi_ldflags@ +abi_mpi_level = @abi_mpi_level@ +abi_mpi_libs = @abi_mpi_libs@ +abi_netcdf_default_enable = @abi_netcdf_default_enable@ +abi_openmp_enable = @abi_openmp_enable@ +abi_openmp_offload_enable = @abi_openmp_offload_enable@ +abi_optim_flavor = @abi_optim_flavor@ +abi_python_invocation_enable = @abi_python_invocation_enable@ +abi_source_debug_enable = @abi_source_debug_enable@ +abi_stdin_enable = @abi_stdin_enable@ +abi_sys_spec = @abi_sys_spec@ +abi_timer_enable = @abi_timer_enable@ +abi_triqs_v1_4_enable = @abi_triqs_v1_4_enable@ +abi_triqs_v2_0_enable = @abi_triqs_v2_0_enable@ +abi_zdot_bugfix_enable = @abi_zdot_bugfix_enable@ +abinit_bindir = @abinit_bindir@ +abinit_builddir = @abinit_builddir@ +abinit_chkdir = @abinit_chkdir@ +abinit_datdir = @abinit_datdir@ +abinit_docdir = @abinit_docdir@ +abinit_incdir = @abinit_incdir@ +abinit_libdir = @abinit_libdir@ +abinit_mandir = @abinit_mandir@ +abinit_prefix = @abinit_prefix@ +abinit_srcdir = @abinit_srcdir@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_FC = @ac_ct_FC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cc_info_string = @cc_info_string@ +cxx_info_string = @cxx_info_string@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +enable_avx_safe_mode = @enable_avx_safe_mode@ +enable_bse_unpacked = @enable_bse_unpacked@ +enable_cclock = @enable_cclock@ +enable_crpa_optim = @enable_crpa_optim@ +enable_exports = @enable_exports@ +enable_fc_wrapper = @enable_fc_wrapper@ +enable_gw_dpc = @enable_gw_dpc@ +enable_hints = @enable_hints@ +enable_libtetra = @enable_libtetra@ +enable_lotf = @enable_lotf@ +enable_memory_profiling = @enable_memory_profiling@ +enable_mpi_gpu_aware = @enable_mpi_gpu_aware@ +enable_mpi_inplace = @enable_mpi_inplace@ +enable_mpi_interfaces_bugfix = @enable_mpi_interfaces_bugfix@ +enable_mpi_io = @enable_mpi_io@ +enable_mpi_io_default = @enable_mpi_io_default@ +enable_netcdf_default = @enable_netcdf_default@ +enable_openmp = @enable_openmp@ +enable_openmp_offload = @enable_openmp_offload@ +enable_python_invocation = @enable_python_invocation@ +enable_shared = @enable_shared@ +enable_source_debug = @enable_source_debug@ +enable_static = @enable_static@ +enable_stdin = @enable_stdin@ +enable_timer = @enable_timer@ +enable_triqs_v1_4 = @enable_triqs_v1_4@ +enable_triqs_v2_0 = @enable_triqs_v2_0@ +enable_zdot_bugfix = @enable_zdot_bugfix@ +exec_prefix = @exec_prefix@ +fc_info_string = @fc_info_string@ +fc_mod_fcflags = @fc_mod_fcflags@ +fc_timing = @fc_timing@ +fcflags_opt_02_clib = @fcflags_opt_02_clib@ +fcflags_opt_10_defs = @fcflags_opt_10_defs@ +fcflags_opt_11_memory_mpi = @fcflags_opt_11_memory_mpi@ +fcflags_opt_12_hide_mpi = @fcflags_opt_12_hide_mpi@ +fcflags_opt_14_hidewrite = @fcflags_opt_14_hidewrite@ +fcflags_opt_16_hideleave = @fcflags_opt_16_hideleave@ +fcflags_opt_16_kokkos_toolbox = @fcflags_opt_16_kokkos_toolbox@ +fcflags_opt_17_gpu_toolbox = @fcflags_opt_17_gpu_toolbox@ +fcflags_opt_17_libtetra_ext = @fcflags_opt_17_libtetra_ext@ +fcflags_opt_17_minimax = @fcflags_opt_17_minimax@ +fcflags_opt_17_yaml_out = @fcflags_opt_17_yaml_out@ +fcflags_opt_18_timing = @fcflags_opt_18_timing@ +fcflags_opt_21_hashfuncs = @fcflags_opt_21_hashfuncs@ +fcflags_opt_27_toolbox_oop = @fcflags_opt_27_toolbox_oop@ +fcflags_opt_28_numeric_noabirule = @fcflags_opt_28_numeric_noabirule@ +fcflags_opt_29_kpoints = @fcflags_opt_29_kpoints@ +fcflags_opt_32_util = @fcflags_opt_32_util@ +fcflags_opt_33_xc_lowlevel = @fcflags_opt_33_xc_lowlevel@ +fcflags_opt_39_libpaw = @fcflags_opt_39_libpaw@ +fcflags_opt_41_geometry = @fcflags_opt_41_geometry@ +fcflags_opt_42_nlstrain = @fcflags_opt_42_nlstrain@ +fcflags_opt_42_parser = @fcflags_opt_42_parser@ +fcflags_opt_43_ptgroups = @fcflags_opt_43_ptgroups@ +fcflags_opt_43_wvl_wrappers = @fcflags_opt_43_wvl_wrappers@ +fcflags_opt_44_abitools = @fcflags_opt_44_abitools@ +fcflags_opt_44_abitypes_defs = @fcflags_opt_44_abitypes_defs@ +fcflags_opt_44_manage_kokkos = @fcflags_opt_44_manage_kokkos@ +fcflags_opt_45_geomoptim = @fcflags_opt_45_geomoptim@ +fcflags_opt_45_xgTools = @fcflags_opt_45_xgTools@ +fcflags_opt_46_ghc_omp = @fcflags_opt_46_ghc_omp@ +fcflags_opt_46_manage_cuda = @fcflags_opt_46_manage_cuda@ +fcflags_opt_48_diago = @fcflags_opt_48_diago@ +fcflags_opt_49_gw_toolbox_oop = @fcflags_opt_49_gw_toolbox_oop@ +fcflags_opt_51_manage_mpi = @fcflags_opt_51_manage_mpi@ +fcflags_opt_52_fft_mpi_noabirule = @fcflags_opt_52_fft_mpi_noabirule@ +fcflags_opt_53_ffts = @fcflags_opt_53_ffts@ +fcflags_opt_54_spacepar = @fcflags_opt_54_spacepar@ +fcflags_opt_55_abiutil = @fcflags_opt_55_abiutil@ +fcflags_opt_56_io_mpi = @fcflags_opt_56_io_mpi@ +fcflags_opt_56_mixing = @fcflags_opt_56_mixing@ +fcflags_opt_56_recipspace = @fcflags_opt_56_recipspace@ +fcflags_opt_56_xc = @fcflags_opt_56_xc@ +fcflags_opt_57_iopsp_parser = @fcflags_opt_57_iopsp_parser@ +fcflags_opt_57_iovars = @fcflags_opt_57_iovars@ +fcflags_opt_61_occeig = @fcflags_opt_61_occeig@ +fcflags_opt_62_cg_noabirule = @fcflags_opt_62_cg_noabirule@ +fcflags_opt_62_ctqmc = @fcflags_opt_62_ctqmc@ +fcflags_opt_62_iowfdenpot = @fcflags_opt_62_iowfdenpot@ +fcflags_opt_62_poisson = @fcflags_opt_62_poisson@ +fcflags_opt_62_wvl_wfs = @fcflags_opt_62_wvl_wfs@ +fcflags_opt_64_psp = @fcflags_opt_64_psp@ +fcflags_opt_65_lotf_base = @fcflags_opt_65_lotf_base@ +fcflags_opt_65_paw = @fcflags_opt_65_paw@ +fcflags_opt_66_nonlocal = @fcflags_opt_66_nonlocal@ +fcflags_opt_66_vdwxc = @fcflags_opt_66_vdwxc@ +fcflags_opt_66_wfs = @fcflags_opt_66_wfs@ +fcflags_opt_67_common = @fcflags_opt_67_common@ +fcflags_opt_67_python_invocation_ext = @fcflags_opt_67_python_invocation_ext@ +fcflags_opt_67_triqs_ext = @fcflags_opt_67_triqs_ext@ +fcflags_opt_68_dmft = @fcflags_opt_68_dmft@ +fcflags_opt_68_lotf = @fcflags_opt_68_lotf@ +fcflags_opt_68_recursion = @fcflags_opt_68_recursion@ +fcflags_opt_68_rsprc = @fcflags_opt_68_rsprc@ +fcflags_opt_69_wfdesc = @fcflags_opt_69_wfdesc@ +fcflags_opt_70_gw = @fcflags_opt_70_gw@ +fcflags_opt_71_bse = @fcflags_opt_71_bse@ +fcflags_opt_71_wannier = @fcflags_opt_71_wannier@ +fcflags_opt_72_response = @fcflags_opt_72_response@ +fcflags_opt_77_ddb = @fcflags_opt_77_ddb@ +fcflags_opt_77_suscep = @fcflags_opt_77_suscep@ +fcflags_opt_78_effpot = @fcflags_opt_78_effpot@ +fcflags_opt_78_eph = @fcflags_opt_78_eph@ +fcflags_opt_79_seqpar_mpi = @fcflags_opt_79_seqpar_mpi@ +fcflags_opt_80_rttddft = @fcflags_opt_80_rttddft@ +fcflags_opt_80_tdep = @fcflags_opt_80_tdep@ +fcflags_opt_94_scfcv = @fcflags_opt_94_scfcv@ +fcflags_opt_95_drive = @fcflags_opt_95_drive@ +fcflags_opt_98_main = @fcflags_opt_98_main@ +fcflags_opt_bigdft = @fcflags_opt_bigdft@ +fcflags_opt_default = @fcflags_opt_default@ +fcflags_opt_hdf5 = @fcflags_opt_hdf5@ +fcflags_opt_levmar = @fcflags_opt_levmar@ +fcflags_opt_libpsml = @fcflags_opt_libpsml@ +fcflags_opt_libxc = @fcflags_opt_libxc@ +fcflags_opt_libxml2 = @fcflags_opt_libxml2@ +fcflags_opt_linalg = @fcflags_opt_linalg@ +fcflags_opt_netcdf = @fcflags_opt_netcdf@ +fcflags_opt_netcdf_fortran = @fcflags_opt_netcdf_fortran@ +fcflags_opt_papi = @fcflags_opt_papi@ +fcflags_opt_triqs = @fcflags_opt_triqs@ +fcflags_opt_wannier90 = @fcflags_opt_wannier90@ +fcflags_opt_xmlf90 = @fcflags_opt_xmlf90@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sd_abinit_common_cppflags = @sd_abinit_common_cppflags@ +sd_abinit_common_enable = @sd_abinit_common_enable@ +sd_abinit_common_enable_def = @sd_abinit_common_enable_def@ +sd_abinit_common_fcflags = @sd_abinit_common_fcflags@ +sd_abinit_common_init = @sd_abinit_common_init@ +sd_abinit_common_ldflags = @sd_abinit_common_ldflags@ +sd_abinit_common_libs = @sd_abinit_common_libs@ +sd_abinit_common_ok = @sd_abinit_common_ok@ +sd_abinit_common_options = @sd_abinit_common_options@ +sd_abinit_common_policy = @sd_abinit_common_policy@ +sd_abinit_common_status = @sd_abinit_common_status@ +sd_bigdft_cppflags = @sd_bigdft_cppflags@ +sd_bigdft_enable = @sd_bigdft_enable@ +sd_bigdft_enable_def = @sd_bigdft_enable_def@ +sd_bigdft_fcflags = @sd_bigdft_fcflags@ +sd_bigdft_init = @sd_bigdft_init@ +sd_bigdft_ldflags = @sd_bigdft_ldflags@ +sd_bigdft_libs = @sd_bigdft_libs@ +sd_bigdft_ok = @sd_bigdft_ok@ +sd_bigdft_options = @sd_bigdft_options@ +sd_bigdft_policy = @sd_bigdft_policy@ +sd_bigdft_status = @sd_bigdft_status@ +sd_fft_cflags = @sd_fft_cflags@ +sd_fft_choices = @sd_fft_choices@ +sd_fft_cppflags = @sd_fft_cppflags@ +sd_fft_cxxflags = @sd_fft_cxxflags@ +sd_fft_enable = @sd_fft_enable@ +sd_fft_fcflags = @sd_fft_fcflags@ +sd_fft_flavor = @sd_fft_flavor@ +sd_fft_init = @sd_fft_init@ +sd_fft_ldflags = @sd_fft_ldflags@ +sd_fft_libs = @sd_fft_libs@ +sd_fft_ok = @sd_fft_ok@ +sd_fftw3_cflags = @sd_fftw3_cflags@ +sd_fftw3_cppflags = @sd_fftw3_cppflags@ +sd_fftw3_enable = @sd_fftw3_enable@ +sd_fftw3_enable_def = @sd_fftw3_enable_def@ +sd_fftw3_fcflags = @sd_fftw3_fcflags@ +sd_fftw3_init = @sd_fftw3_init@ +sd_fftw3_ldflags = @sd_fftw3_ldflags@ +sd_fftw3_libs = @sd_fftw3_libs@ +sd_fftw3_ok = @sd_fftw3_ok@ +sd_fftw3_options = @sd_fftw3_options@ +sd_fftw3_policy = @sd_fftw3_policy@ +sd_fftw3_status = @sd_fftw3_status@ +sd_gpu_cflags = @sd_gpu_cflags@ +sd_gpu_cppflags = @sd_gpu_cppflags@ +sd_gpu_cxxflags = @sd_gpu_cxxflags@ +sd_gpu_enable = @sd_gpu_enable@ +sd_gpu_enable_def = @sd_gpu_enable_def@ +sd_gpu_fcflags = @sd_gpu_fcflags@ +sd_gpu_init = @sd_gpu_init@ +sd_gpu_ldflags = @sd_gpu_ldflags@ +sd_gpu_libs = @sd_gpu_libs@ +sd_gpu_ok = @sd_gpu_ok@ +sd_gpu_options = @sd_gpu_options@ +sd_gpu_policy = @sd_gpu_policy@ +sd_gpu_prefix = @sd_gpu_prefix@ +sd_gpu_status = @sd_gpu_status@ +sd_hdf5_cflags = @sd_hdf5_cflags@ +sd_hdf5_cppflags = @sd_hdf5_cppflags@ +sd_hdf5_cxxflags = @sd_hdf5_cxxflags@ +sd_hdf5_enable = @sd_hdf5_enable@ +sd_hdf5_enable_def = @sd_hdf5_enable_def@ +sd_hdf5_enable_fc = @sd_hdf5_enable_fc@ +sd_hdf5_fcflags = @sd_hdf5_fcflags@ +sd_hdf5_h5cc = @sd_hdf5_h5cc@ +sd_hdf5_h5fc = @sd_hdf5_h5fc@ +sd_hdf5_init = @sd_hdf5_init@ +sd_hdf5_ldflags = @sd_hdf5_ldflags@ +sd_hdf5_libs = @sd_hdf5_libs@ +sd_hdf5_ok = @sd_hdf5_ok@ +sd_hdf5_options = @sd_hdf5_options@ +sd_hdf5_policy = @sd_hdf5_policy@ +sd_hdf5_status = @sd_hdf5_status@ +sd_kokkos_cppflags = @sd_kokkos_cppflags@ +sd_kokkos_cxxflags = @sd_kokkos_cxxflags@ +sd_kokkos_enable = @sd_kokkos_enable@ +sd_kokkos_enable_def = @sd_kokkos_enable_def@ +sd_kokkos_init = @sd_kokkos_init@ +sd_kokkos_ldflags = @sd_kokkos_ldflags@ +sd_kokkos_libs = @sd_kokkos_libs@ +sd_kokkos_ok = @sd_kokkos_ok@ +sd_kokkos_options = @sd_kokkos_options@ +sd_kokkos_policy = @sd_kokkos_policy@ +sd_kokkos_status = @sd_kokkos_status@ +sd_levmar_cflags = @sd_levmar_cflags@ +sd_levmar_cppflags = @sd_levmar_cppflags@ +sd_levmar_enable = @sd_levmar_enable@ +sd_levmar_enable_def = @sd_levmar_enable_def@ +sd_levmar_init = @sd_levmar_init@ +sd_levmar_ldflags = @sd_levmar_ldflags@ +sd_levmar_libs = @sd_levmar_libs@ +sd_levmar_ok = @sd_levmar_ok@ +sd_levmar_options = @sd_levmar_options@ +sd_levmar_policy = @sd_levmar_policy@ +sd_levmar_status = @sd_levmar_status@ +sd_libpaw_cppflags = @sd_libpaw_cppflags@ +sd_libpaw_enable = @sd_libpaw_enable@ +sd_libpaw_enable_def = @sd_libpaw_enable_def@ +sd_libpaw_fcflags = @sd_libpaw_fcflags@ +sd_libpaw_init = @sd_libpaw_init@ +sd_libpaw_ldflags = @sd_libpaw_ldflags@ +sd_libpaw_libs = @sd_libpaw_libs@ +sd_libpaw_ok = @sd_libpaw_ok@ +sd_libpaw_options = @sd_libpaw_options@ +sd_libpaw_policy = @sd_libpaw_policy@ +sd_libpaw_status = @sd_libpaw_status@ +sd_libpsml_cppflags = @sd_libpsml_cppflags@ +sd_libpsml_enable = @sd_libpsml_enable@ +sd_libpsml_enable_def = @sd_libpsml_enable_def@ +sd_libpsml_fcflags = @sd_libpsml_fcflags@ +sd_libpsml_init = @sd_libpsml_init@ +sd_libpsml_ldflags = @sd_libpsml_ldflags@ +sd_libpsml_libs = @sd_libpsml_libs@ +sd_libpsml_ok = @sd_libpsml_ok@ +sd_libpsml_options = @sd_libpsml_options@ +sd_libpsml_policy = @sd_libpsml_policy@ +sd_libpsml_status = @sd_libpsml_status@ +sd_libxc_cflags = @sd_libxc_cflags@ +sd_libxc_cppflags = @sd_libxc_cppflags@ +sd_libxc_enable = @sd_libxc_enable@ +sd_libxc_enable_def = @sd_libxc_enable_def@ +sd_libxc_enable_fc = @sd_libxc_enable_fc@ +sd_libxc_fcflags = @sd_libxc_fcflags@ +sd_libxc_init = @sd_libxc_init@ +sd_libxc_ldflags = @sd_libxc_ldflags@ +sd_libxc_libs = @sd_libxc_libs@ +sd_libxc_ok = @sd_libxc_ok@ +sd_libxc_options = @sd_libxc_options@ +sd_libxc_policy = @sd_libxc_policy@ +sd_libxc_status = @sd_libxc_status@ +sd_linalg_cflags = @sd_linalg_cflags@ +sd_linalg_choices = @sd_linalg_choices@ +sd_linalg_cppflags = @sd_linalg_cppflags@ +sd_linalg_cxxflags = @sd_linalg_cxxflags@ +sd_linalg_enable = @sd_linalg_enable@ +sd_linalg_fcflags = @sd_linalg_fcflags@ +sd_linalg_flavor = @sd_linalg_flavor@ +sd_linalg_has_elpa = @sd_linalg_has_elpa@ +sd_linalg_has_scalapack = @sd_linalg_has_scalapack@ +sd_linalg_init = @sd_linalg_init@ +sd_linalg_ldflags = @sd_linalg_ldflags@ +sd_linalg_libs = @sd_linalg_libs@ +sd_linalg_ok = @sd_linalg_ok@ +sd_mpi_cc = @sd_mpi_cc@ +sd_mpi_cflags = @sd_mpi_cflags@ +sd_mpi_cppflags = @sd_mpi_cppflags@ +sd_mpi_cxx = @sd_mpi_cxx@ +sd_mpi_enable = @sd_mpi_enable@ +sd_mpi_enable_cxx = @sd_mpi_enable_cxx@ +sd_mpi_enable_def = @sd_mpi_enable_def@ +sd_mpi_enable_fc = @sd_mpi_enable_fc@ +sd_mpi_fc = @sd_mpi_fc@ +sd_mpi_fcflags = @sd_mpi_fcflags@ +sd_mpi_init = @sd_mpi_init@ +sd_mpi_ldflags = @sd_mpi_ldflags@ +sd_mpi_libs = @sd_mpi_libs@ +sd_mpi_ok = @sd_mpi_ok@ +sd_mpi_options = @sd_mpi_options@ +sd_mpi_policy = @sd_mpi_policy@ +sd_mpi_status = @sd_mpi_status@ +sd_netcdf_cflags = @sd_netcdf_cflags@ +sd_netcdf_cppflags = @sd_netcdf_cppflags@ +sd_netcdf_enable = @sd_netcdf_enable@ +sd_netcdf_enable_def = @sd_netcdf_enable_def@ +sd_netcdf_fcflags = @sd_netcdf_fcflags@ +sd_netcdf_fortran_cflags = @sd_netcdf_fortran_cflags@ +sd_netcdf_fortran_cppflags = @sd_netcdf_fortran_cppflags@ +sd_netcdf_fortran_enable = @sd_netcdf_fortran_enable@ +sd_netcdf_fortran_enable_def = @sd_netcdf_fortran_enable_def@ +sd_netcdf_fortran_fcflags = @sd_netcdf_fortran_fcflags@ +sd_netcdf_fortran_init = @sd_netcdf_fortran_init@ +sd_netcdf_fortran_ldflags = @sd_netcdf_fortran_ldflags@ +sd_netcdf_fortran_libs = @sd_netcdf_fortran_libs@ +sd_netcdf_fortran_ok = @sd_netcdf_fortran_ok@ +sd_netcdf_fortran_options = @sd_netcdf_fortran_options@ +sd_netcdf_fortran_policy = @sd_netcdf_fortran_policy@ +sd_netcdf_fortran_status = @sd_netcdf_fortran_status@ +sd_netcdf_init = @sd_netcdf_init@ +sd_netcdf_ldflags = @sd_netcdf_ldflags@ +sd_netcdf_libs = @sd_netcdf_libs@ +sd_netcdf_ok = @sd_netcdf_ok@ +sd_netcdf_options = @sd_netcdf_options@ +sd_netcdf_policy = @sd_netcdf_policy@ +sd_netcdf_status = @sd_netcdf_status@ +sd_papi_cflags = @sd_papi_cflags@ +sd_papi_cppflags = @sd_papi_cppflags@ +sd_papi_enable = @sd_papi_enable@ +sd_papi_enable_def = @sd_papi_enable_def@ +sd_papi_init = @sd_papi_init@ +sd_papi_ldflags = @sd_papi_ldflags@ +sd_papi_libs = @sd_papi_libs@ +sd_papi_ok = @sd_papi_ok@ +sd_papi_options = @sd_papi_options@ +sd_papi_policy = @sd_papi_policy@ +sd_papi_sd_papi_fcflags = @sd_papi_sd_papi_fcflags@ +sd_papi_status = @sd_papi_status@ +sd_pfft_cflags = @sd_pfft_cflags@ +sd_pfft_cppflags = @sd_pfft_cppflags@ +sd_pfft_enable = @sd_pfft_enable@ +sd_pfft_enable_def = @sd_pfft_enable_def@ +sd_pfft_init = @sd_pfft_init@ +sd_pfft_ldflags = @sd_pfft_ldflags@ +sd_pfft_libs = @sd_pfft_libs@ +sd_pfft_ok = @sd_pfft_ok@ +sd_pfft_options = @sd_pfft_options@ +sd_pfft_policy = @sd_pfft_policy@ +sd_pfft_status = @sd_pfft_status@ +sd_sys_fcflags = @sd_sys_fcflags@ +sd_triqs_cflags = @sd_triqs_cflags@ +sd_triqs_cppflags = @sd_triqs_cppflags@ +sd_triqs_cxxflags = @sd_triqs_cxxflags@ +sd_triqs_enable = @sd_triqs_enable@ +sd_triqs_enable_def = @sd_triqs_enable_def@ +sd_triqs_fcflags = @sd_triqs_fcflags@ +sd_triqs_init = @sd_triqs_init@ +sd_triqs_ldflags = @sd_triqs_ldflags@ +sd_triqs_libs = @sd_triqs_libs@ +sd_triqs_ok = @sd_triqs_ok@ +sd_triqs_options = @sd_triqs_options@ +sd_triqs_policy = @sd_triqs_policy@ +sd_triqs_status = @sd_triqs_status@ +sd_wannier90_cppflags = @sd_wannier90_cppflags@ +sd_wannier90_enable = @sd_wannier90_enable@ +sd_wannier90_enable_def = @sd_wannier90_enable_def@ +sd_wannier90_fcflags = @sd_wannier90_fcflags@ +sd_wannier90_init = @sd_wannier90_init@ +sd_wannier90_ldflags = @sd_wannier90_ldflags@ +sd_wannier90_libs = @sd_wannier90_libs@ +sd_wannier90_ok = @sd_wannier90_ok@ +sd_wannier90_options = @sd_wannier90_options@ +sd_wannier90_policy = @sd_wannier90_policy@ +sd_wannier90_status = @sd_wannier90_status@ +sd_xmlf90_cppflags = @sd_xmlf90_cppflags@ +sd_xmlf90_enable = @sd_xmlf90_enable@ +sd_xmlf90_enable_def = @sd_xmlf90_enable_def@ +sd_xmlf90_fcflags = @sd_xmlf90_fcflags@ +sd_xmlf90_init = @sd_xmlf90_init@ +sd_xmlf90_ldflags = @sd_xmlf90_ldflags@ +sd_xmlf90_libs = @sd_xmlf90_libs@ +sd_xmlf90_ok = @sd_xmlf90_ok@ +sd_xmlf90_options = @sd_xmlf90_options@ +sd_xmlf90_policy = @sd_xmlf90_policy@ +sd_xmlf90_status = @sd_xmlf90_status@ +sd_yakl_cppflags = @sd_yakl_cppflags@ +sd_yakl_enable = @sd_yakl_enable@ +sd_yakl_enable_def = @sd_yakl_enable_def@ +sd_yakl_fcflags = @sd_yakl_fcflags@ +sd_yakl_init = @sd_yakl_init@ +sd_yakl_ldflags = @sd_yakl_ldflags@ +sd_yakl_libs = @sd_yakl_libs@ +sd_yakl_ok = @sd_yakl_ok@ +sd_yakl_options = @sd_yakl_options@ +sd_yakl_policy = @sd_yakl_policy@ +sd_yakl_status = @sd_yakl_status@ +sharedstatedir = @sharedstatedir@ +src_02_clib_fcflags = @src_02_clib_fcflags@ +src_10_defs_fcflags = @src_10_defs_fcflags@ +src_11_memory_mpi_fcflags = @src_11_memory_mpi_fcflags@ +src_12_hide_mpi_fcflags = @src_12_hide_mpi_fcflags@ +src_14_hidewrite_fcflags = @src_14_hidewrite_fcflags@ +src_16_hideleave_fcflags = @src_16_hideleave_fcflags@ +src_16_kokkos_toolbox_fcflags = @src_16_kokkos_toolbox_fcflags@ +src_17_gpu_toolbox_fcflags = @src_17_gpu_toolbox_fcflags@ +src_17_libtetra_ext_fcflags = @src_17_libtetra_ext_fcflags@ +src_17_minimax_fcflags = @src_17_minimax_fcflags@ +src_17_yaml_out_fcflags = @src_17_yaml_out_fcflags@ +src_18_timing_fcflags = @src_18_timing_fcflags@ +src_21_hashfuncs_fcflags = @src_21_hashfuncs_fcflags@ +src_27_toolbox_oop_fcflags = @src_27_toolbox_oop_fcflags@ +src_28_numeric_noabirule_fcflags = @src_28_numeric_noabirule_fcflags@ +src_29_kpoints_fcflags = @src_29_kpoints_fcflags@ +src_32_util_fcflags = @src_32_util_fcflags@ +src_33_xc_lowlevel_fcflags = @src_33_xc_lowlevel_fcflags@ +src_39_libpaw_fcflags = @src_39_libpaw_fcflags@ +src_41_geometry_fcflags = @src_41_geometry_fcflags@ +src_42_nlstrain_fcflags = @src_42_nlstrain_fcflags@ +src_42_parser_fcflags = @src_42_parser_fcflags@ +src_43_ptgroups_fcflags = @src_43_ptgroups_fcflags@ +src_43_wvl_wrappers_fcflags = @src_43_wvl_wrappers_fcflags@ +src_44_abitools_fcflags = @src_44_abitools_fcflags@ +src_44_abitypes_defs_fcflags = @src_44_abitypes_defs_fcflags@ +src_44_manage_kokkos_fcflags = @src_44_manage_kokkos_fcflags@ +src_45_geomoptim_fcflags = @src_45_geomoptim_fcflags@ +src_45_xgTools_fcflags = @src_45_xgTools_fcflags@ +src_46_ghc_omp_fcflags = @src_46_ghc_omp_fcflags@ +src_46_manage_cuda_fcflags = @src_46_manage_cuda_fcflags@ +src_48_diago_fcflags = @src_48_diago_fcflags@ +src_49_gw_toolbox_oop_fcflags = @src_49_gw_toolbox_oop_fcflags@ +src_51_manage_mpi_fcflags = @src_51_manage_mpi_fcflags@ +src_52_fft_mpi_noabirule_fcflags = @src_52_fft_mpi_noabirule_fcflags@ +src_53_ffts_fcflags = @src_53_ffts_fcflags@ +src_54_spacepar_fcflags = @src_54_spacepar_fcflags@ +src_55_abiutil_fcflags = @src_55_abiutil_fcflags@ +src_56_io_mpi_fcflags = @src_56_io_mpi_fcflags@ +src_56_mixing_fcflags = @src_56_mixing_fcflags@ +src_56_recipspace_fcflags = @src_56_recipspace_fcflags@ +src_56_xc_fcflags = @src_56_xc_fcflags@ +src_57_iopsp_parser_fcflags = @src_57_iopsp_parser_fcflags@ +src_57_iovars_fcflags = @src_57_iovars_fcflags@ +src_61_occeig_fcflags = @src_61_occeig_fcflags@ +src_62_cg_noabirule_fcflags = @src_62_cg_noabirule_fcflags@ +src_62_ctqmc_fcflags = @src_62_ctqmc_fcflags@ +src_62_iowfdenpot_fcflags = @src_62_iowfdenpot_fcflags@ +src_62_poisson_fcflags = @src_62_poisson_fcflags@ +src_62_wvl_wfs_fcflags = @src_62_wvl_wfs_fcflags@ +src_64_psp_fcflags = @src_64_psp_fcflags@ +src_65_lotf_base_fcflags = @src_65_lotf_base_fcflags@ +src_65_paw_fcflags = @src_65_paw_fcflags@ +src_66_nonlocal_fcflags = @src_66_nonlocal_fcflags@ +src_66_vdwxc_fcflags = @src_66_vdwxc_fcflags@ +src_66_wfs_fcflags = @src_66_wfs_fcflags@ +src_67_common_fcflags = @src_67_common_fcflags@ +src_67_python_invocation_ext_fcflags = @src_67_python_invocation_ext_fcflags@ +src_67_triqs_ext_fcflags = @src_67_triqs_ext_fcflags@ +src_68_dmft_fcflags = @src_68_dmft_fcflags@ +src_68_lotf_fcflags = @src_68_lotf_fcflags@ +src_68_recursion_fcflags = @src_68_recursion_fcflags@ +src_68_rsprc_fcflags = @src_68_rsprc_fcflags@ +src_69_wfdesc_fcflags = @src_69_wfdesc_fcflags@ +src_70_gw_fcflags = @src_70_gw_fcflags@ +src_71_bse_fcflags = @src_71_bse_fcflags@ +src_71_wannier_fcflags = @src_71_wannier_fcflags@ +src_72_response_fcflags = @src_72_response_fcflags@ +src_77_ddb_fcflags = @src_77_ddb_fcflags@ +src_77_suscep_fcflags = @src_77_suscep_fcflags@ +src_78_effpot_fcflags = @src_78_effpot_fcflags@ +src_78_eph_fcflags = @src_78_eph_fcflags@ +src_79_seqpar_mpi_fcflags = @src_79_seqpar_mpi_fcflags@ +src_80_rttddft_fcflags = @src_80_rttddft_fcflags@ +src_80_tdep_fcflags = @src_80_tdep_fcflags@ +src_94_scfcv_fcflags = @src_94_scfcv_fcflags@ +src_95_drive_fcflags = @src_95_drive_fcflags@ +src_common_fcflags = @src_common_fcflags@ +src_core_fcflags = @src_core_fcflags@ +src_libpaw_fcflags = @src_libpaw_fcflags@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +with_abinit_common = @with_abinit_common@ +with_bigdft = @with_bigdft@ +with_config_file = @with_config_file@ +with_debug_flavor = @with_debug_flavor@ +with_fallbacks = @with_fallbacks@ +with_fc_vendor = @with_fc_vendor@ +with_fc_version = @with_fc_version@ +with_fft_flavor = @with_fft_flavor@ +with_fftw3 = @with_fftw3@ +with_gnu_ld = @with_gnu_ld@ +with_gpu = @with_gpu@ +with_hdf5 = @with_hdf5@ +with_kokkos = @with_kokkos@ +with_levmar = @with_levmar@ +with_libpaw = @with_libpaw@ +with_libpsml = @with_libpsml@ +with_libxc = @with_libxc@ +with_libxml2 = @with_libxml2@ +with_linalg_flavor = @with_linalg_flavor@ +with_mpi = @with_mpi@ +with_mpi_level = @with_mpi_level@ +with_netcdf = @with_netcdf@ +with_optim_flavor = @with_optim_flavor@ +with_papi = @with_papi@ +with_pfft = @with_pfft@ +with_triqs = @with_triqs@ +with_wannier90 = @with_wannier90@ +with_xmlf90 = @with_xmlf90@ +with_yakl = @with_yakl@ +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu shared/libpaw/incs/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu shared/libpaw/incs/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +tags TAGS: + +ctags CTAGS: + +cscope cscopelist: + + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile all-local +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am all-local check check-am clean clean-generic \ + cscopelist-am ctags-am distclean distclean-generic distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ + pdf-am ps ps-am tags-am uninstall uninstall-am + +.PRECIOUS: Makefile + + +all-local: + @echo "There is no buildable file here" + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/GX-PAW/libpaw/incs/abinit.src b/GX-PAW/libpaw/incs/abinit.src new file mode 100644 index 00000000..e69de29b diff --git a/GX-PAW/libpaw/mods/.gitkeep b/GX-PAW/libpaw/mods/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/GX-PAW/libpaw/mods/Makefile b/GX-PAW/libpaw/mods/Makefile new file mode 100644 index 00000000..bb35bd2d --- /dev/null +++ b/GX-PAW/libpaw/mods/Makefile @@ -0,0 +1,1315 @@ +# Makefile.in generated by automake 1.16.3 from Makefile.am. +# shared/libpaw/mods/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994-2020 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-inter on 2024/03/16 21:07:39 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-inter script or its config file instead. +# + +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/abinit +pkgincludedir = $(includedir)/abinit +pkglibdir = $(libdir)/abinit +pkglibexecdir = $(libexecdir)/abinit +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = x86_64-apple-darwin18.7.0 +host_triplet = x86_64-apple-darwin18.7.0 +target_triplet = x86_64-apple-darwin18.7.0 +subdir = shared/libpaw/mods +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/m4/arch-gpu.m4 \ + $(top_srcdir)/config/m4/arch-mpi.m4 \ + $(top_srcdir)/config/m4/auto-autotools.m4 \ + $(top_srcdir)/config/m4/auto-corelibs.m4 \ + $(top_srcdir)/config/m4/auto-debug.m4 \ + $(top_srcdir)/config/m4/auto-dirflags.m4 \ + $(top_srcdir)/config/m4/auto-env.m4 \ + $(top_srcdir)/config/m4/auto-hints.m4 \ + $(top_srcdir)/config/m4/auto-optim.m4 \ + $(top_srcdir)/config/m4/auto-options.m4 \ + $(top_srcdir)/config/m4/auto-output.m4 \ + $(top_srcdir)/config/m4/auto-triggers.m4 \ + $(top_srcdir)/config/m4/conf-atompaw.m4 \ + $(top_srcdir)/config/m4/conf-debug.m4 \ + $(top_srcdir)/config/m4/conf-fallbacks.m4 \ + $(top_srcdir)/config/m4/conf-files.m4 \ + $(top_srcdir)/config/m4/conf-init.m4 \ + $(top_srcdir)/config/m4/conf-openmp.m4 \ + $(top_srcdir)/config/m4/conf-optim.m4 \ + $(top_srcdir)/config/m4/lang-c++.m4 \ + $(top_srcdir)/config/m4/lang-c.m4 \ + $(top_srcdir)/config/m4/lang-fortran-import.m4 \ + $(top_srcdir)/config/m4/lang-fortran.m4 \ + $(top_srcdir)/config/m4/lang-python.m4 \ + $(top_srcdir)/config/m4/libxml2.m4 \ + $(top_srcdir)/config/m4/misc-display.m4 \ + $(top_srcdir)/config/m4/sd_abinit_common.m4 \ + $(top_srcdir)/config/m4/sd_arch_gpu.m4 \ + $(top_srcdir)/config/m4/sd_arch_mpi.m4 \ + $(top_srcdir)/config/m4/sd_bigdft.m4 \ + $(top_srcdir)/config/m4/sd_core.m4 \ + $(top_srcdir)/config/m4/sd_esl.m4 \ + $(top_srcdir)/config/m4/sd_fftw3.m4 \ + $(top_srcdir)/config/m4/sd_gpu_kokkos.m4 \ + $(top_srcdir)/config/m4/sd_gpu_yakl.m4 \ + $(top_srcdir)/config/m4/sd_io_hdf5.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf_fortran.m4 \ + $(top_srcdir)/config/m4/sd_levmar.m4 \ + $(top_srcdir)/config/m4/sd_libpaw.m4 \ + $(top_srcdir)/config/m4/sd_libpsml.m4 \ + $(top_srcdir)/config/m4/sd_libxc.m4 \ + $(top_srcdir)/config/m4/sd_math_fft.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_core.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_util.m4 \ + $(top_srcdir)/config/m4/sd_papi.m4 \ + $(top_srcdir)/config/m4/sd_pfft.m4 \ + $(top_srcdir)/config/m4/sd_triqs.m4 \ + $(top_srcdir)/config/m4/sd_wannier90.m4 \ + $(top_srcdir)/config/m4/sd_xmlf90.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_$(V)) +am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY)) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +am__v_at_1 = +SOURCES = +DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(srcdir)/Makefile.in +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ABINIT_BINARY_PACKAGE = abinit-10.0.0.83-58be4d_x86_64_darwin18.7.0_gnu9.4 +ABINIT_COMMON_CPPFLAGS = +ABINIT_COMMON_FCFLAGS = +ABINIT_COMMON_LDFLAGS = +ABINIT_COMMON_LIBS = +ABINIT_TARGET = x86_64_darwin18.7.0_gnu9.4 +ABINIT_VERSION = 10.0.0.83-58be4d +ABINIT_VERSION_BASE = 10.0 +ABINIT_VERSION_BUILD = 20240316 +ABINIT_VERSION_MAJOR = 10 +ABINIT_VERSION_MICRO = 0 +ABINIT_VERSION_MINOR = 0 +ABI_CPPFLAGS = -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include +ACLOCAL = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' aclocal-1.16 +AMTAR = $${TAR-tar} +AM_DEFAULT_VERBOSITY = 1 +AR = ar +ARFLAGS = rc +ARFLAGS_CMD = rc +ARFLAGS_DEBUG = +ARFLAGS_EXTRA = +ARFLAGS_HINTS = +ARFLAGS_OPTIM = +ATOMPAW_BIN = +AUTOCONF = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' autoconf +AUTOHEADER = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' autoheader +AUTOMAKE = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' automake-1.16 +AWK = awk +BIGDFT_CPPFLAGS = +BIGDFT_FCFLAGS = +BIGDFT_LDFLAGS = +BIGDFT_LIBS = +BOURNE_SHELL = /bin/sh +CC = /opt/local/bin/mpicc +CCDEPMODE = depmode=gcc3 +CC_LDFLAGS = +CC_LDFLAGS_DEBUG = +CC_LDFLAGS_EXTRA = +CC_LDFLAGS_GPU = +CC_LDFLAGS_HINTS = +CC_LDFLAGS_OPTIM = +CC_LIBS = +CC_LIBS_DEBUG = +CC_LIBS_EXTRA = +CC_LIBS_GPU = +CC_LIBS_HINTS = +CC_LIBS_OPTIM = +CFLAGS = -O2 -g +CFLAGS_DEBUG = +CFLAGS_EXTRA = +CFLAGS_GPU = +CFLAGS_HINTS = +CFLAGS_OPTIM = +CPP = /opt/local/bin/mpicc -E +CPPFLAGS = +CPPFLAGS_DEBUG = +CPPFLAGS_EXTRA = +CPPFLAGS_GPU = +CPPFLAGS_HINTS = +CPPFLAGS_HINTS_EXT = -P -std=c99 +CPPFLAGS_OPTIM = +CXX = /opt/local/bin/mpicxx +CXXDEPMODE = depmode=gcc3 +CXXFLAGS = -O2 -g +CXXFLAGS_DEBUG = +CXXFLAGS_EXTRA = +CXXFLAGS_GPU = +CXXFLAGS_HINTS = +CXXFLAGS_OPTIM = +CXX_LDFLAGS = +CXX_LDFLAGS_DEBUG = +CXX_LDFLAGS_EXTRA = +CXX_LDFLAGS_GPU = +CXX_LDFLAGS_HINTS = +CXX_LDFLAGS_OPTIM = +CXX_LIBS = +CXX_LIBS_DEBUG = +CXX_LIBS_EXTRA = +CXX_LIBS_GPU = +CXX_LIBS_HINTS = +CXX_LIBS_OPTIM = +CYGPATH_W = echo +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +ECHO_C = \c +ECHO_N = +ECHO_T = +EGREP = /usr/bin/grep -E +EXEEXT = +F77 = /opt/local/bin/mpif90 +FC = /opt/local/bin/mpif90 +FCFLAGS = -O2 -g -ffree-line-length-none -I/opt/local/include -I/opt/local/include -I/opt/local/include +FCFLAGS_DEBUG = +FCFLAGS_EXTRA = +FCFLAGS_F90 = +FCFLAGS_FIXEDFORM = -ffixed-form +FCFLAGS_FREEFORM = -ffree-form +FCFLAGS_HINTS = -ffree-line-length-none +FCFLAGS_MODDIR = -J../mods +FCFLAGS_OPENMP = +FCFLAGS_OPENMP_OFFLOAD = +FCFLAGS_OPTIM = +FCLIBS = -L/opt/local/lib -L/opt/local/lib/openmpi-gcc9 -L/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0 -L/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/../../.. -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi -lgfortran -lquadmath -lm +FC_LDFLAGS = +FC_LDFLAGS_DEBUG = +FC_LDFLAGS_EXTRA = +FC_LDFLAGS_HINTS = +FC_LDFLAGS_OPTIM = +FC_LIBS = +FC_LIBS_DEBUG = +FC_LIBS_EXTRA = +FC_LIBS_HINTS = +FC_LIBS_OPTIM = +FC_NOWRAP = /opt/local/bin/mpif90 +FFLAGS = -O2 -g -ffree-line-length-none -I/opt/local/include -I/opt/local/include -I/opt/local/include +FFTW3_CFLAGS = +FFTW3_CPPFLAGS = -I/opt/local/include +FFTW3_FCFLAGS = -I/opt/local/include +FFTW3_LDFLAGS = +FFTW3_LIBS = -L/opt/local/lib -lfftw3 -lfftw3f +FFT_CFLAGS = +FFT_FCFLAGS = +FPP = +FPPFLAGS = +FPPFLAGS_DEBUG = +FPPFLAGS_EXTRA = +FPPFLAGS_HINTS = +FPPFLAGS_OPTIM = +GPU_ARCH = +GPU_CFLAGS = +GPU_CPPFLAGS = +GPU_CXXFLAGS = +GPU_FCFLAGS = +GPU_LDFLAGS = +GPU_LIBS = +GRAPHATOM_BIN = +GREP = /usr/bin/grep +H5CC = +HDF5_CFLAGS = +HDF5_CPPFLAGS = +HDF5_CXXFLAGS = +HDF5_FCFLAGS = +HDF5_LDFLAGS = +HDF5_LIBS = +INSTALL = /opt/local/libexec/gnubin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +KOKKOS_CPPFLAGS = +KOKKOS_CXXFLAGS = +KOKKOS_LDFLAGS = +KOKKOS_LIBS = +LDFLAGS = +LEVMAR_CFLAGS = +LEVMAR_CPPFLAGS = +LEVMAR_LDFLAGS = +LEVMAR_LIBS = +LIBOBJS = +LIBPAW_CPPFLAGS = +LIBPAW_FCFLAGS = +LIBPAW_LDFLAGS = +LIBPAW_LIBS = +LIBPSML_CPPFLAGS = +LIBPSML_FCFLAGS = +LIBPSML_LDFLAGS = +LIBPSML_LIBS = +LIBS = -L/opt/local/lib -lwannier -L/opt/local/lib -lxc -L/opt/local/lib -lnetcdff -L/opt/local/lib -lnetcdf -L/opt/local/lib -L/opt/local/lib -lhdf5_hl -L/opt/local/lib -lhdf5 -lz -ldl -lm -L/opt/local/lib -lfftw3 -lfftw3f +LIBXC_CFLAGS = +LIBXC_CPPFLAGS = +LIBXC_FCFLAGS = +LIBXC_LDFLAGS = +LIBXC_LIBS = +LIBXML2_CPPFLAGS = +LIBXML2_FCFLAGS = +LIBXML2_LIBS = +LINALG_CFLAGS = +LINALG_CPPFLAGS = +LINALG_CXXFLAGS = +LINALG_FCFLAGS = -I/opt/local/include +LINALG_LDFLAGS = +LINALG_LIBS = -L/opt/local/lib -lopenblas +LN_S = ln -s +LTLIBOBJS = +MAKEINFO = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' makeinfo +MKDIR_P = /opt/local/libexec/gnubin/mkdir -p +MODEXT = mod +MPI_CFLAGS = +MPI_CPPFLAGS = +MPI_CXXFLAGS = +MPI_FCFLAGS = +MPI_LDFLAGS = +MPI_LIBS = +MV = /opt/local/libexec/gnubin/mv +NETCDF_CFLAGS = +NETCDF_CPPFLAGS = +NETCDF_CXXFLAGS = +NETCDF_FCFLAGS = +NETCDF_FORTRAN_CFLAGS = +NETCDF_FORTRAN_CPPFLAGS = +NETCDF_FORTRAN_CXXFLAGS = +NETCDF_FORTRAN_FCFLAGS = +NETCDF_FORTRAN_LDFLAGS = +NETCDF_FORTRAN_LIBS = +NETCDF_LDFLAGS = +NETCDF_LIBS = +NVCC = +NVCC_CFLAGS = +NVCC_CPPFLAGS = +NVCC_LDFLAGS = +NVCC_LIBS = +OBJEXT = o +PACKAGE = abinit +PACKAGE_BUGREPORT = https://bugs.launchpad.net/abinit/ +PACKAGE_NAME = ABINIT +PACKAGE_STRING = ABINIT 10.0.0.83-58be4d +PACKAGE_TARNAME = abinit +PACKAGE_URL = +PACKAGE_VERSION = 10.0.0.83-58be4d +PAPI_CFLAGS = +PAPI_CPPFLAGS = +PAPI_LDFLAGS = +PAPI_LIBS = +PATCH = patch +PATH_SEPARATOR = : +PERL = /usr/bin/perl +PFFT_CFLAGS = +PFFT_CPPFLAGS = +PFFT_LDFLAGS = +PFFT_LIBS = +PYFLAGS = +PYTHON = python3.9 +PYTHON_CONFIG = python3.9-config +PYTHON_CPPFLAGS = -I/opt/local/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -I/opt/local/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 +RANLIB = ranlib +REALPATH = realpath +RM = /opt/local/libexec/gnubin/rm +SED = /usr/bin/sed +SET_MAKE = +SHELL = /bin/sh +STRIP = +TAR = tar +TRIQS_CFLAGS = +TRIQS_CPPFLAGS = +TRIQS_CXXFLAGS = +TRIQS_LDFLAGS = +TRIQS_LIBS = +TRUE_CPP = cpp +VERSION = 10.0.0.83-58be4d +WANNIER90_CPPFLAGS = +WANNIER90_FCFLAGS = -I/opt/local/include +WANNIER90_LDFLAGS = +WANNIER90_LIBS = -L/opt/local/lib -lwannier +XML2_CONFIG = +XMLF90_CPPFLAGS = +XMLF90_FCFLAGS = +XMLF90_LDFLAGS = +XMLF90_LIBS = +XML_CPPFLAGS = +XML_LIBS = +XPP = +XPPFLAGS = +XPPFLAGS_DEBUG = +XPPFLAGS_EXTRA = +XPPFLAGS_OPTIM = +YAKL_CPPFLAGS = +YAKL_FCFLAGS = +YAKL_LDFLAGS = +YAKL_LIBS = +abi_ac_distcheck = --with-config-file="/Users/gonze/_Research/ABINIT_git/gonze/mac-1P0-225.ac9" +abi_ac_version = 027100 +abi_am_version = 011603 +abi_avx_safe_mode_enable = no +abi_bse_unpacked_enable = no +abi_cc_path = +abi_cc_vendor = gnu +abi_cc_version = 9.4 +abi_cclock_enable = no +abi_cpp_path = +abi_cpu_64bits = yes +abi_cpu_bits = 64 +abi_cpu_model = unknown +abi_cpu_platform = apple +abi_cpu_spec = unknown_unknown +abi_cpu_vendor = unknown +abi_crpa_optim_enable = no +abi_cxx_path = +abi_cxx_vendor = gnu +abi_cxx_version = 9.4 +abi_debug_flavor = basic +abi_exports_enable = no +abi_fbk_abinit_common_ok = no +abi_fbk_bigdft_ok = disabled +abi_fbk_config = +abi_fbk_enable = no +abi_fbk_fft_ok = no +abi_fbk_fftw3_ok = no +abi_fbk_gpu_ok = no +abi_fbk_hdf5_ok = disabled +abi_fbk_init = def +abi_fbk_kokkos_ok = no +abi_fbk_levmar_ok = no +abi_fbk_libpaw_ok = no +abi_fbk_libpsml_ok = disabled +abi_fbk_libxc_ok = disabled +abi_fbk_libxml2_ok = no +abi_fbk_linalg_ok = disabled +abi_fbk_list = +abi_fbk_mpi_ok = no +abi_fbk_netcdf_fortran_ok = disabled +abi_fbk_netcdf_ok = disabled +abi_fbk_papi_ok = no +abi_fbk_pfft_ok = no +abi_fbk_prefix = +abi_fbk_required = +abi_fbk_triqs_ok = no +abi_fbk_wannier90_ok = disabled +abi_fbk_xmlf90_ok = disabled +abi_fbk_yakl_ok = no +abi_fc_path = +abi_fc_vendor = gnu +abi_fc_version = 9.4 +abi_fc_wrap = no +abi_fc_wrapper_enable = no +abi_fpp_path = +abi_gpu_arch = +abi_gpu_fcflags = +abi_gpu_flavor = none +abi_gpu_hip_libdir = +abi_gpu_incs = +abi_gpu_ldflags = +abi_gpu_libs = +abi_gpu_nvtx_v3 = +abi_gpu_roctx = +abi_gw_dpc_enable = yes +abi_hints_enable = yes +abi_libtetra_enable = yes +abi_libxml2_cppflags = +abi_libxml2_enable = no +abi_libxml2_fcflags = +abi_libxml2_init = def +abi_libxml2_ldflags = +abi_libxml2_libs = +abi_libxml2_ok = unknown +abi_libxml2_prefix = +abi_lotf_enable = no +abi_lt_version = 020406 +abi_m4_version = 010419 +abi_memory_profiling_enable = no +abi_mpi_cflags = +abi_mpi_cppflags = +abi_mpi_cxxflags = +abi_mpi_enable = yes +abi_mpi_fcflags = +abi_mpi_flavor = auto +abi_mpi_gpu_aware_enable = no +abi_mpi_incs = +abi_mpi_inplace_enable = yes +abi_mpi_interfaces_bugfix_enable = no +abi_mpi_io_default_enable = no +abi_mpi_io_enable = yes +abi_mpi_ldflags = +abi_mpi_level = 2 +abi_mpi_libs = +abi_netcdf_default_enable = no +abi_openmp_enable = no +abi_openmp_offload_enable = no +abi_optim_flavor = standard +abi_python_invocation_enable = no +abi_source_debug_enable = no +abi_stdin_enable = yes +abi_sys_spec = darwin-x86_64 +abi_timer_enable = yes +abi_triqs_v1_4_enable = no +abi_triqs_v2_0_enable = no +abi_zdot_bugfix_enable = no +abinit_bindir = /usr/local/bin +abinit_builddir = /Users/gonze/_Research/ABINIT_git/gonze +abinit_chkdir = /usr/local/share/abinit/tests +abinit_datdir = /usr/local/share/abinit +abinit_docdir = /usr/local/doc/abinit +abinit_incdir = /usr/local/include +abinit_libdir = /usr/local/lib +abinit_mandir = /usr/local/share/man +abinit_prefix = /usr/local +abinit_srcdir = /Users/gonze/_Research/ABINIT_git/gonze +abs_builddir = /Users/gonze/_Research/ABINIT_git/gonze/shared/libpaw/mods +abs_srcdir = /Users/gonze/_Research/ABINIT_git/gonze/shared/libpaw/mods +abs_top_builddir = /Users/gonze/_Research/ABINIT_git/gonze +abs_top_srcdir = /Users/gonze/_Research/ABINIT_git/gonze +ac_ct_CC = +ac_ct_CXX = +ac_ct_FC = +am__include = include +am__leading_dot = . +am__quote = +am__tar = tar --format=ustar -chf - "$$tardir" +am__untar = tar -xf - +bindir = ${exec_prefix}/bin +build = x86_64-apple-darwin18.7.0 +build_alias = +build_cpu = x86_64 +build_os = darwin18.7.0 +build_vendor = apple +builddir = . +cc_info_string = gcc-mp-9 (MacPorts gcc9 9.4.0_0) 9.4.0 +cxx_info_string = g++-mp-9 (MacPorts gcc9 9.4.0_0) 9.4.0 +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +enable_avx_safe_mode = +enable_bse_unpacked = +enable_cclock = +enable_crpa_optim = +enable_exports = +enable_fc_wrapper = +enable_gw_dpc = yes +enable_hints = +enable_libtetra = +enable_lotf = +enable_memory_profiling = +enable_mpi_gpu_aware = +enable_mpi_inplace = +enable_mpi_interfaces_bugfix = +enable_mpi_io = yes +enable_mpi_io_default = +enable_netcdf_default = +enable_openmp = +enable_openmp_offload = +enable_python_invocation = +enable_shared = +enable_source_debug = +enable_static = +enable_stdin = +enable_timer = +enable_triqs_v1_4 = +enable_triqs_v2_0 = +enable_zdot_bugfix = +exec_prefix = ${prefix} +fc_info_string = GNU Fortran (MacPorts gcc9 9.4.0_0) 9.4.0 +fc_mod_fcflags = +fc_timing = standard +fcflags_opt_02_clib = +fcflags_opt_10_defs = +fcflags_opt_11_memory_mpi = +fcflags_opt_12_hide_mpi = +fcflags_opt_14_hidewrite = +fcflags_opt_16_hideleave = +fcflags_opt_16_kokkos_toolbox = +fcflags_opt_17_gpu_toolbox = +fcflags_opt_17_libtetra_ext = +fcflags_opt_17_minimax = +fcflags_opt_17_yaml_out = +fcflags_opt_18_timing = +fcflags_opt_21_hashfuncs = +fcflags_opt_27_toolbox_oop = +fcflags_opt_28_numeric_noabirule = +fcflags_opt_29_kpoints = +fcflags_opt_32_util = +fcflags_opt_33_xc_lowlevel = +fcflags_opt_39_libpaw = +fcflags_opt_41_geometry = +fcflags_opt_42_nlstrain = +fcflags_opt_42_parser = +fcflags_opt_43_ptgroups = -O0 +fcflags_opt_43_wvl_wrappers = +fcflags_opt_44_abitools = +fcflags_opt_44_abitypes_defs = +fcflags_opt_44_manage_kokkos = +fcflags_opt_45_geomoptim = +fcflags_opt_45_xgTools = +fcflags_opt_46_ghc_omp = +fcflags_opt_46_manage_cuda = +fcflags_opt_48_diago = +fcflags_opt_49_gw_toolbox_oop = +fcflags_opt_51_manage_mpi = +fcflags_opt_52_fft_mpi_noabirule = +fcflags_opt_53_ffts = +fcflags_opt_54_spacepar = +fcflags_opt_55_abiutil = +fcflags_opt_56_io_mpi = +fcflags_opt_56_mixing = +fcflags_opt_56_recipspace = +fcflags_opt_56_xc = +fcflags_opt_57_iopsp_parser = +fcflags_opt_57_iovars = +fcflags_opt_61_occeig = +fcflags_opt_62_cg_noabirule = +fcflags_opt_62_ctqmc = +fcflags_opt_62_iowfdenpot = +fcflags_opt_62_poisson = +fcflags_opt_62_wvl_wfs = +fcflags_opt_64_psp = +fcflags_opt_65_lotf_base = +fcflags_opt_65_paw = +fcflags_opt_66_nonlocal = +fcflags_opt_66_vdwxc = +fcflags_opt_66_wfs = +fcflags_opt_67_common = +fcflags_opt_67_python_invocation_ext = +fcflags_opt_67_triqs_ext = +fcflags_opt_68_dmft = +fcflags_opt_68_lotf = +fcflags_opt_68_recursion = +fcflags_opt_68_rsprc = +fcflags_opt_69_wfdesc = +fcflags_opt_70_gw = +fcflags_opt_71_bse = +fcflags_opt_71_wannier = +fcflags_opt_72_response = +fcflags_opt_77_ddb = +fcflags_opt_77_suscep = +fcflags_opt_78_effpot = +fcflags_opt_78_eph = +fcflags_opt_79_seqpar_mpi = +fcflags_opt_80_rttddft = +fcflags_opt_80_tdep = +fcflags_opt_94_scfcv = +fcflags_opt_95_drive = +fcflags_opt_98_main = +fcflags_opt_bigdft = +fcflags_opt_default = +fcflags_opt_hdf5 = +fcflags_opt_levmar = +fcflags_opt_libpsml = +fcflags_opt_libxc = +fcflags_opt_libxml2 = +fcflags_opt_linalg = +fcflags_opt_netcdf = +fcflags_opt_netcdf_fortran = +fcflags_opt_papi = +fcflags_opt_triqs = +fcflags_opt_wannier90 = +fcflags_opt_xmlf90 = +host = x86_64-apple-darwin18.7.0 +host_alias = +host_cpu = x86_64 +host_os = darwin18.7.0 +host_vendor = apple +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = ${SHELL} /Users/gonze/_Research/ABINIT_git/gonze/config/gnu/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = ${datarootdir}/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = $(MKDIR_P) +oldincludedir = /usr/include +pdfdir = ${docdir} +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +runstatedir = ${localstatedir}/run +sbindir = ${exec_prefix}/sbin +sd_abinit_common_cppflags = +sd_abinit_common_enable = no +sd_abinit_common_enable_def = no +sd_abinit_common_fcflags = +sd_abinit_common_init = def +sd_abinit_common_ldflags = +sd_abinit_common_libs = +sd_abinit_common_ok = unknown +sd_abinit_common_options = optional skip +sd_abinit_common_policy = skip +sd_abinit_common_status = optional +sd_bigdft_cppflags = +sd_bigdft_enable = no +sd_bigdft_enable_def = no +sd_bigdft_fcflags = +sd_bigdft_init = def +sd_bigdft_ldflags = +sd_bigdft_libs = +sd_bigdft_ok = unknown +sd_bigdft_options = optional warn +sd_bigdft_policy = warn +sd_bigdft_status = optional +sd_fft_cflags = +sd_fft_choices = +sd_fft_cppflags = -I/opt/local/include +sd_fft_cxxflags = +sd_fft_enable = yes +sd_fft_fcflags = -I/opt/local/include +sd_fft_flavor = fftw3 +sd_fft_init = kwd +sd_fft_ldflags = +sd_fft_libs = -L/opt/local/lib -lfftw3 -lfftw3f +sd_fft_ok = yes +sd_fftw3_cflags = +sd_fftw3_cppflags = -I/opt/local/include +sd_fftw3_enable = yes +sd_fftw3_enable_def = no +sd_fftw3_fcflags = -I/opt/local/include +sd_fftw3_init = env +sd_fftw3_ldflags = +sd_fftw3_libs = -L/opt/local/lib -lfftw3 -lfftw3f +sd_fftw3_ok = yes +sd_fftw3_options = optional skip +sd_fftw3_policy = skip +sd_fftw3_status = optional +sd_gpu_cflags = +sd_gpu_cppflags = +sd_gpu_cxxflags = +sd_gpu_enable = no +sd_gpu_enable_def = no +sd_gpu_fcflags = +sd_gpu_init = def +sd_gpu_ldflags = +sd_gpu_libs = +sd_gpu_ok = no +sd_gpu_options = optional warn +sd_gpu_policy = warn +sd_gpu_prefix = +sd_gpu_status = optional +sd_hdf5_cflags = +sd_hdf5_cppflags = -I/opt/local/include -I/opt/local/include +sd_hdf5_cxxflags = +sd_hdf5_enable = yes +sd_hdf5_enable_def = yes +sd_hdf5_enable_fc = no +sd_hdf5_fcflags = +sd_hdf5_h5cc = /opt/local/bin/h5cc +sd_hdf5_h5fc = +sd_hdf5_init = dir +sd_hdf5_ldflags = +sd_hdf5_libs = -L/opt/local/lib -L/opt/local/lib -lhdf5_hl -L/opt/local/lib -lhdf5 -lz -ldl -lm +sd_hdf5_ok = yes +sd_hdf5_options = required no-fortran warn +sd_hdf5_policy = warn +sd_hdf5_status = required +sd_kokkos_cppflags = +sd_kokkos_cxxflags = +sd_kokkos_enable = no +sd_kokkos_enable_def = no +sd_kokkos_init = def +sd_kokkos_ldflags = +sd_kokkos_libs = +sd_kokkos_ok = unknown +sd_kokkos_options = optional fail +sd_kokkos_policy = fail +sd_kokkos_status = optional +sd_levmar_cflags = +sd_levmar_cppflags = +sd_levmar_enable = no +sd_levmar_enable_def = no +sd_levmar_init = def +sd_levmar_ldflags = +sd_levmar_libs = +sd_levmar_ok = unknown +sd_levmar_options = optional fail +sd_levmar_policy = fail +sd_levmar_status = optional +sd_libpaw_cppflags = +sd_libpaw_enable = no +sd_libpaw_enable_def = no +sd_libpaw_fcflags = +sd_libpaw_init = def +sd_libpaw_ldflags = +sd_libpaw_libs = +sd_libpaw_ok = unknown +sd_libpaw_options = optional skip +sd_libpaw_policy = skip +sd_libpaw_status = optional +sd_libpsml_cppflags = +sd_libpsml_enable = no +sd_libpsml_enable_def = no +sd_libpsml_fcflags = +sd_libpsml_init = def +sd_libpsml_ldflags = +sd_libpsml_libs = +sd_libpsml_ok = unknown +sd_libpsml_options = optional warn +sd_libpsml_policy = warn +sd_libpsml_status = optional +sd_libxc_cflags = +sd_libxc_cppflags = -I/opt/local/include +sd_libxc_enable = yes +sd_libxc_enable_def = yes +sd_libxc_enable_fc = no +sd_libxc_fcflags = +sd_libxc_init = dir +sd_libxc_ldflags = +sd_libxc_libs = -L/opt/local/lib -lxc +sd_libxc_ok = yes +sd_libxc_options = required no-fortran warn +sd_libxc_policy = warn +sd_libxc_status = required +sd_linalg_cflags = +sd_linalg_choices = +sd_linalg_cppflags = +sd_linalg_cxxflags = +sd_linalg_enable = yes +sd_linalg_fcflags = -I/opt/local/include +sd_linalg_flavor = openblas +sd_linalg_has_elpa = no +sd_linalg_has_scalapack = no +sd_linalg_init = env +sd_linalg_ldflags = +sd_linalg_libs = -L/opt/local/lib -lopenblas +sd_linalg_ok = yes +sd_mpi_cc = /opt/local/bin/mpicc +sd_mpi_cflags = +sd_mpi_cppflags = -I/opt/local/include +sd_mpi_cxx = /opt/local/bin/mpicxx +sd_mpi_enable = yes +sd_mpi_enable_cxx = yes +sd_mpi_enable_def = auto +sd_mpi_enable_fc = yes +sd_mpi_fc = /opt/local/bin/mpif90 +sd_mpi_fcflags = -I/opt/local/include +sd_mpi_init = dir +sd_mpi_ldflags = +sd_mpi_libs = +sd_mpi_ok = yes +sd_mpi_options = auto optional fail +sd_mpi_policy = fail +sd_mpi_status = optional +sd_netcdf_cflags = +sd_netcdf_cppflags = -I/opt/local/include +sd_netcdf_enable = yes +sd_netcdf_enable_def = yes +sd_netcdf_fcflags = -I/opt/local/include +sd_netcdf_fortran_cflags = +sd_netcdf_fortran_cppflags = -I/opt/local/include +sd_netcdf_fortran_enable = yes +sd_netcdf_fortran_enable_def = yes +sd_netcdf_fortran_fcflags = -I/opt/local/include +sd_netcdf_fortran_init = dir +sd_netcdf_fortran_ldflags = +sd_netcdf_fortran_libs = -L/opt/local/lib -lnetcdff +sd_netcdf_fortran_ok = yes +sd_netcdf_fortran_options = required warn +sd_netcdf_fortran_policy = warn +sd_netcdf_fortran_status = required +sd_netcdf_init = dir +sd_netcdf_ldflags = +sd_netcdf_libs = -L/opt/local/lib -lnetcdf +sd_netcdf_ok = yes +sd_netcdf_options = required warn +sd_netcdf_policy = warn +sd_netcdf_status = required +sd_papi_cflags = +sd_papi_cppflags = +sd_papi_enable = no +sd_papi_enable_def = no +sd_papi_init = def +sd_papi_ldflags = +sd_papi_libs = +sd_papi_ok = unknown +sd_papi_options = optional fail +sd_papi_policy = fail +sd_papi_sd_papi_fcflags = +sd_papi_status = optional +sd_pfft_cflags = +sd_pfft_cppflags = +sd_pfft_enable = no +sd_pfft_enable_def = no +sd_pfft_init = def +sd_pfft_ldflags = +sd_pfft_libs = +sd_pfft_ok = unknown +sd_pfft_options = optional skip +sd_pfft_policy = skip +sd_pfft_status = optional +sd_sys_fcflags = +sd_triqs_cflags = +sd_triqs_cppflags = +sd_triqs_cxxflags = +sd_triqs_enable = no +sd_triqs_enable_def = no +sd_triqs_fcflags = +sd_triqs_init = def +sd_triqs_ldflags = +sd_triqs_libs = +sd_triqs_ok = unknown +sd_triqs_options = optional fail +sd_triqs_policy = fail +sd_triqs_status = optional +sd_wannier90_cppflags = +sd_wannier90_enable = yes +sd_wannier90_enable_def = no +sd_wannier90_fcflags = -I/opt/local/include +sd_wannier90_init = env +sd_wannier90_ldflags = +sd_wannier90_libs = -L/opt/local/lib -lwannier +sd_wannier90_ok = yes +sd_wannier90_options = optional warn +sd_wannier90_policy = warn +sd_wannier90_status = optional +sd_xmlf90_cppflags = +sd_xmlf90_enable = no +sd_xmlf90_enable_def = no +sd_xmlf90_fcflags = +sd_xmlf90_init = def +sd_xmlf90_ldflags = +sd_xmlf90_libs = +sd_xmlf90_ok = unknown +sd_xmlf90_options = optional warn +sd_xmlf90_policy = warn +sd_xmlf90_status = optional +sd_yakl_cppflags = +sd_yakl_enable = no +sd_yakl_enable_def = no +sd_yakl_fcflags = +sd_yakl_init = def +sd_yakl_ldflags = +sd_yakl_libs = +sd_yakl_ok = unknown +sd_yakl_options = optional fail +sd_yakl_policy = fail +sd_yakl_status = optional +sharedstatedir = ${prefix}/com +src_02_clib_fcflags = -I$(top_builddir)/shared/common/src/02_clib -I$(top_srcdir)/shared/common/src/02_clib +src_10_defs_fcflags = -I$(top_builddir)/shared/common/src/10_defs -I$(top_srcdir)/shared/common/src/10_defs +src_11_memory_mpi_fcflags = -I$(top_builddir)/shared/common/src/11_memory_mpi -I$(top_srcdir)/shared/common/src/11_memory_mpi +src_12_hide_mpi_fcflags = -I$(top_builddir)/shared/common/src/12_hide_mpi -I$(top_srcdir)/shared/common/src/12_hide_mpi +src_14_hidewrite_fcflags = -I$(top_builddir)/shared/common/src/14_hidewrite -I$(top_srcdir)/shared/common/src/14_hidewrite +src_16_hideleave_fcflags = -I$(top_builddir)/shared/common/src/16_hideleave -I$(top_srcdir)/shared/common/src/16_hideleave +src_16_kokkos_toolbox_fcflags = -I$(top_builddir)/shared/common/src/16_kokkos_toolbox -I$(top_srcdir)/shared/common/src/16_kokkos_toolbox +src_17_gpu_toolbox_fcflags = -I$(top_builddir)/shared/common/src/17_gpu_toolbox -I$(top_srcdir)/shared/common/src/17_gpu_toolbox +src_17_libtetra_ext_fcflags = -I$(top_builddir)/shared/common/src/17_libtetra_ext -I$(top_srcdir)/shared/common/src/17_libtetra_ext +src_17_minimax_fcflags = -I$(top_builddir)/shared/common/src/17_minimax -I$(top_srcdir)/shared/common/src/17_minimax +src_17_yaml_out_fcflags = -I$(top_builddir)/shared/common/src/17_yaml_out -I$(top_srcdir)/shared/common/src/17_yaml_out +src_18_timing_fcflags = -I$(top_builddir)/shared/common/src/18_timing -I$(top_srcdir)/shared/common/src/18_timing +src_21_hashfuncs_fcflags = -I$(top_builddir)/shared/common/src/21_hashfuncs -I$(top_srcdir)/shared/common/src/21_hashfuncs +src_27_toolbox_oop_fcflags = -I$(top_builddir)/shared/common/src/27_toolbox_oop -I$(top_srcdir)/shared/common/src/27_toolbox_oop +src_28_numeric_noabirule_fcflags = -I$(top_builddir)/shared/common/src/28_numeric_noabirule -I$(top_srcdir)/shared/common/src/28_numeric_noabirule +src_29_kpoints_fcflags = -I$(top_builddir)/shared/common/src/29_kpoints -I$(top_srcdir)/shared/common/src/29_kpoints +src_32_util_fcflags = -I$(top_builddir)/shared/common/src/32_util -I$(top_srcdir)/shared/common/src/32_util +src_33_xc_lowlevel_fcflags = -I$(top_builddir)/shared/common/src/33_xc_lowlevel -I$(top_srcdir)/shared/common/src/33_xc_lowlevel +src_39_libpaw_fcflags = -I$(top_builddir)/shared/libpaw/src -I$(top_srcdir)/shared/libpaw/src +src_41_geometry_fcflags = -I$(top_builddir)/src/41_geometry -I$(top_srcdir)/src/41_geometry +src_42_nlstrain_fcflags = -I$(top_builddir)/src/42_nlstrain -I$(top_srcdir)/src/42_nlstrain +src_42_parser_fcflags = -I$(top_builddir)/src/42_parser -I$(top_srcdir)/src/42_parser +src_43_ptgroups_fcflags = -I$(top_builddir)/src/43_ptgroups -I$(top_srcdir)/src/43_ptgroups +src_43_wvl_wrappers_fcflags = -I$(top_builddir)/src/43_wvl_wrappers -I$(top_srcdir)/src/43_wvl_wrappers +src_44_abitools_fcflags = -I$(top_builddir)/src/44_abitools -I$(top_srcdir)/src/44_abitools +src_44_abitypes_defs_fcflags = -I$(top_builddir)/src/44_abitypes_defs -I$(top_srcdir)/src/44_abitypes_defs +src_44_manage_kokkos_fcflags = -I$(top_builddir)/src/44_manage_kokkos -I$(top_srcdir)/src/44_manage_kokkos +src_45_geomoptim_fcflags = -I$(top_builddir)/src/45_geomoptim -I$(top_srcdir)/src/45_geomoptim +src_45_xgTools_fcflags = -I$(top_builddir)/src/45_xgTools -I$(top_srcdir)/src/45_xgTools +src_46_ghc_omp_fcflags = -I$(top_builddir)/src/46_ghc_omp -I$(top_srcdir)/src/46_ghc_omp +src_46_manage_cuda_fcflags = -I$(top_builddir)/src/46_manage_cuda -I$(top_srcdir)/src/46_manage_cuda +src_48_diago_fcflags = -I$(top_builddir)/src/48_diago -I$(top_srcdir)/src/48_diago +src_49_gw_toolbox_oop_fcflags = -I$(top_builddir)/src/49_gw_toolbox_oop -I$(top_srcdir)/src/49_gw_toolbox_oop +src_51_manage_mpi_fcflags = -I$(top_builddir)/src/51_manage_mpi -I$(top_srcdir)/src/51_manage_mpi +src_52_fft_mpi_noabirule_fcflags = -I$(top_builddir)/src/52_fft_mpi_noabirule -I$(top_srcdir)/src/52_fft_mpi_noabirule +src_53_ffts_fcflags = -I$(top_builddir)/src/53_ffts -I$(top_srcdir)/src/53_ffts +src_54_spacepar_fcflags = -I$(top_builddir)/src/54_spacepar -I$(top_srcdir)/src/54_spacepar +src_55_abiutil_fcflags = -I$(top_builddir)/src/55_abiutil -I$(top_srcdir)/src/55_abiutil +src_56_io_mpi_fcflags = -I$(top_builddir)/src/56_io_mpi -I$(top_srcdir)/src/56_io_mpi +src_56_mixing_fcflags = -I$(top_builddir)/src/56_mixing -I$(top_srcdir)/src/56_mixing +src_56_recipspace_fcflags = -I$(top_builddir)/src/56_recipspace -I$(top_srcdir)/src/56_recipspace +src_56_xc_fcflags = -I$(top_builddir)/src/56_xc -I$(top_srcdir)/src/56_xc +src_57_iopsp_parser_fcflags = -I$(top_builddir)/src/57_iopsp_parser -I$(top_srcdir)/src/57_iopsp_parser +src_57_iovars_fcflags = -I$(top_builddir)/src/57_iovars -I$(top_srcdir)/src/57_iovars +src_61_occeig_fcflags = -I$(top_builddir)/src/61_occeig -I$(top_srcdir)/src/61_occeig +src_62_cg_noabirule_fcflags = -I$(top_builddir)/src/62_cg_noabirule -I$(top_srcdir)/src/62_cg_noabirule +src_62_ctqmc_fcflags = -I$(top_builddir)/src/62_ctqmc -I$(top_srcdir)/src/62_ctqmc +src_62_iowfdenpot_fcflags = -I$(top_builddir)/src/62_iowfdenpot -I$(top_srcdir)/src/62_iowfdenpot +src_62_poisson_fcflags = -I$(top_builddir)/src/62_poisson -I$(top_srcdir)/src/62_poisson +src_62_wvl_wfs_fcflags = -I$(top_builddir)/src/62_wvl_wfs -I$(top_srcdir)/src/62_wvl_wfs +src_64_psp_fcflags = -I$(top_builddir)/src/64_psp -I$(top_srcdir)/src/64_psp +src_65_lotf_base_fcflags = -I$(top_builddir)/src/65_lotf_base -I$(top_srcdir)/src/65_lotf_base +src_65_paw_fcflags = -I$(top_builddir)/src/65_paw -I$(top_srcdir)/src/65_paw +src_66_nonlocal_fcflags = -I$(top_builddir)/src/66_nonlocal -I$(top_srcdir)/src/66_nonlocal +src_66_vdwxc_fcflags = -I$(top_builddir)/src/66_vdwxc -I$(top_srcdir)/src/66_vdwxc +src_66_wfs_fcflags = -I$(top_builddir)/src/66_wfs -I$(top_srcdir)/src/66_wfs +src_67_common_fcflags = -I$(top_builddir)/src/67_common -I$(top_srcdir)/src/67_common +src_67_python_invocation_ext_fcflags = -I$(top_builddir)/src/67_python_invocation_ext -I$(top_srcdir)/src/67_python_invocation_ext +src_67_triqs_ext_fcflags = -I$(top_builddir)/src/67_triqs_ext -I$(top_srcdir)/src/67_triqs_ext +src_68_dmft_fcflags = -I$(top_builddir)/src/68_dmft -I$(top_srcdir)/src/68_dmft +src_68_lotf_fcflags = -I$(top_builddir)/src/68_lotf -I$(top_srcdir)/src/68_lotf +src_68_recursion_fcflags = -I$(top_builddir)/src/68_recursion -I$(top_srcdir)/src/68_recursion +src_68_rsprc_fcflags = -I$(top_builddir)/src/68_rsprc -I$(top_srcdir)/src/68_rsprc +src_69_wfdesc_fcflags = -I$(top_builddir)/src/69_wfdesc -I$(top_srcdir)/src/69_wfdesc +src_70_gw_fcflags = -I$(top_builddir)/src/70_gw -I$(top_srcdir)/src/70_gw +src_71_bse_fcflags = -I$(top_builddir)/src/71_bse -I$(top_srcdir)/src/71_bse +src_71_wannier_fcflags = -I$(top_builddir)/src/71_wannier -I$(top_srcdir)/src/71_wannier +src_72_response_fcflags = -I$(top_builddir)/src/72_response -I$(top_srcdir)/src/72_response +src_77_ddb_fcflags = -I$(top_builddir)/src/77_ddb -I$(top_srcdir)/src/77_ddb +src_77_suscep_fcflags = -I$(top_builddir)/src/77_suscep -I$(top_srcdir)/src/77_suscep +src_78_effpot_fcflags = -I$(top_builddir)/src/78_effpot -I$(top_srcdir)/src/78_effpot +src_78_eph_fcflags = -I$(top_builddir)/src/78_eph -I$(top_srcdir)/src/78_eph +src_79_seqpar_mpi_fcflags = -I$(top_builddir)/src/79_seqpar_mpi -I$(top_srcdir)/src/79_seqpar_mpi +src_80_rttddft_fcflags = -I$(top_builddir)/src/80_rttddft -I$(top_srcdir)/src/80_rttddft +src_80_tdep_fcflags = -I$(top_builddir)/src/80_tdep -I$(top_srcdir)/src/80_tdep +src_94_scfcv_fcflags = -I$(top_builddir)/src/94_scfcv -I$(top_srcdir)/src/94_scfcv +src_95_drive_fcflags = -I$(top_builddir)/src/95_drive -I$(top_srcdir)/src/95_drive +src_common_fcflags = -I$(top_builddir)/shared/common/src/incs -I$(top_srcdir)/shared/common/src/incs -I$(top_builddir)/shared/common/src/mods -I$(top_srcdir)/shared/common/src/mods +src_core_fcflags = -I$(top_builddir)/src/incs -I$(top_srcdir)/src/incs -I$(top_builddir)/src/mods -I$(top_srcdir)/src/mods +src_libpaw_fcflags = -I$(top_builddir)/shared/libpaw/incs -I$(top_srcdir)/shared/libpaw/incs -I$(top_builddir)/shared/libpaw/mods -I$(top_srcdir)/shared/libpaw/mods +srcdir = . +sysconfdir = ${prefix}/etc +target = x86_64-apple-darwin18.7.0 +target_alias = +target_cpu = x86_64 +target_os = darwin18.7.0 +target_vendor = apple +top_build_prefix = ../../../ +top_builddir = ../../.. +top_srcdir = ../../.. +with_abinit_common = +with_bigdft = +with_config_file = +with_debug_flavor = +with_fallbacks = +with_fc_vendor = +with_fc_version = +with_fft_flavor = fftw3 +with_fftw3 = +with_gnu_ld = +with_gpu = +with_hdf5 = /opt/local +with_kokkos = +with_levmar = +with_libpaw = +with_libpsml = +with_libxc = /opt/local +with_libxml2 = +with_linalg_flavor = openblas +with_mpi = /opt/local +with_mpi_level = +with_netcdf = /opt/local +with_optim_flavor = +with_papi = +with_pfft = +with_triqs = +with_wannier90 = +with_xmlf90 = +with_yakl = +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu shared/libpaw/mods/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu shared/libpaw/mods/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +tags TAGS: + +ctags CTAGS: + +cscope cscopelist: + + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile all-local +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-local + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am all-local check check-am clean clean-generic \ + cscopelist-am ctags-am distclean distclean-generic distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-local pdf pdf-am ps ps-am tags-am uninstall \ + uninstall-am + +.PRECIOUS: Makefile + + +all-local: + @echo "There is no buildable file here" + +mostlyclean-local: + rm -f *.$(MODEXT) *.h + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/GX-PAW/libpaw/mods/Makefile.am b/GX-PAW/libpaw/mods/Makefile.am new file mode 100644 index 00000000..3ad7d00c --- /dev/null +++ b/GX-PAW/libpaw/mods/Makefile.am @@ -0,0 +1,16 @@ +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-inter on 2024/03/16 21:07:39 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-inter script or its config file instead. +# + +all-local: + @echo "There is no buildable file here" + +mostlyclean-local: + rm -f *.$(MODEXT) *.h diff --git a/GX-PAW/libpaw/mods/Makefile.in b/GX-PAW/libpaw/mods/Makefile.in new file mode 100644 index 00000000..ac229469 --- /dev/null +++ b/GX-PAW/libpaw/mods/Makefile.in @@ -0,0 +1,1315 @@ +# Makefile.in generated by automake 1.16.3 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2020 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-inter on 2024/03/16 21:07:39 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-inter script or its config file instead. +# +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = shared/libpaw/mods +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/m4/arch-gpu.m4 \ + $(top_srcdir)/config/m4/arch-mpi.m4 \ + $(top_srcdir)/config/m4/auto-autotools.m4 \ + $(top_srcdir)/config/m4/auto-corelibs.m4 \ + $(top_srcdir)/config/m4/auto-debug.m4 \ + $(top_srcdir)/config/m4/auto-dirflags.m4 \ + $(top_srcdir)/config/m4/auto-env.m4 \ + $(top_srcdir)/config/m4/auto-hints.m4 \ + $(top_srcdir)/config/m4/auto-optim.m4 \ + $(top_srcdir)/config/m4/auto-options.m4 \ + $(top_srcdir)/config/m4/auto-output.m4 \ + $(top_srcdir)/config/m4/auto-triggers.m4 \ + $(top_srcdir)/config/m4/conf-atompaw.m4 \ + $(top_srcdir)/config/m4/conf-debug.m4 \ + $(top_srcdir)/config/m4/conf-fallbacks.m4 \ + $(top_srcdir)/config/m4/conf-files.m4 \ + $(top_srcdir)/config/m4/conf-init.m4 \ + $(top_srcdir)/config/m4/conf-openmp.m4 \ + $(top_srcdir)/config/m4/conf-optim.m4 \ + $(top_srcdir)/config/m4/lang-c++.m4 \ + $(top_srcdir)/config/m4/lang-c.m4 \ + $(top_srcdir)/config/m4/lang-fortran-import.m4 \ + $(top_srcdir)/config/m4/lang-fortran.m4 \ + $(top_srcdir)/config/m4/lang-python.m4 \ + $(top_srcdir)/config/m4/libxml2.m4 \ + $(top_srcdir)/config/m4/misc-display.m4 \ + $(top_srcdir)/config/m4/sd_abinit_common.m4 \ + $(top_srcdir)/config/m4/sd_arch_gpu.m4 \ + $(top_srcdir)/config/m4/sd_arch_mpi.m4 \ + $(top_srcdir)/config/m4/sd_bigdft.m4 \ + $(top_srcdir)/config/m4/sd_core.m4 \ + $(top_srcdir)/config/m4/sd_esl.m4 \ + $(top_srcdir)/config/m4/sd_fftw3.m4 \ + $(top_srcdir)/config/m4/sd_gpu_kokkos.m4 \ + $(top_srcdir)/config/m4/sd_gpu_yakl.m4 \ + $(top_srcdir)/config/m4/sd_io_hdf5.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf_fortran.m4 \ + $(top_srcdir)/config/m4/sd_levmar.m4 \ + $(top_srcdir)/config/m4/sd_libpaw.m4 \ + $(top_srcdir)/config/m4/sd_libpsml.m4 \ + $(top_srcdir)/config/m4/sd_libxc.m4 \ + $(top_srcdir)/config/m4/sd_math_fft.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_core.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_util.m4 \ + $(top_srcdir)/config/m4/sd_papi.m4 \ + $(top_srcdir)/config/m4/sd_pfft.m4 \ + $(top_srcdir)/config/m4/sd_triqs.m4 \ + $(top_srcdir)/config/m4/sd_wannier90.m4 \ + $(top_srcdir)/config/m4/sd_xmlf90.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +SOURCES = +DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(srcdir)/Makefile.in +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ABINIT_BINARY_PACKAGE = @ABINIT_BINARY_PACKAGE@ +ABINIT_COMMON_CPPFLAGS = @ABINIT_COMMON_CPPFLAGS@ +ABINIT_COMMON_FCFLAGS = @ABINIT_COMMON_FCFLAGS@ +ABINIT_COMMON_LDFLAGS = @ABINIT_COMMON_LDFLAGS@ +ABINIT_COMMON_LIBS = @ABINIT_COMMON_LIBS@ +ABINIT_TARGET = @ABINIT_TARGET@ +ABINIT_VERSION = @ABINIT_VERSION@ +ABINIT_VERSION_BASE = @ABINIT_VERSION_BASE@ +ABINIT_VERSION_BUILD = @ABINIT_VERSION_BUILD@ +ABINIT_VERSION_MAJOR = @ABINIT_VERSION_MAJOR@ +ABINIT_VERSION_MICRO = @ABINIT_VERSION_MICRO@ +ABINIT_VERSION_MINOR = @ABINIT_VERSION_MINOR@ +ABI_CPPFLAGS = @ABI_CPPFLAGS@ +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +ARFLAGS = @ARFLAGS@ +ARFLAGS_CMD = @ARFLAGS_CMD@ +ARFLAGS_DEBUG = @ARFLAGS_DEBUG@ +ARFLAGS_EXTRA = @ARFLAGS_EXTRA@ +ARFLAGS_HINTS = @ARFLAGS_HINTS@ +ARFLAGS_OPTIM = @ARFLAGS_OPTIM@ +ATOMPAW_BIN = @ATOMPAW_BIN@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BIGDFT_CPPFLAGS = @BIGDFT_CPPFLAGS@ +BIGDFT_FCFLAGS = @BIGDFT_FCFLAGS@ +BIGDFT_LDFLAGS = @BIGDFT_LDFLAGS@ +BIGDFT_LIBS = @BIGDFT_LIBS@ +BOURNE_SHELL = @BOURNE_SHELL@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CC_LDFLAGS = @CC_LDFLAGS@ +CC_LDFLAGS_DEBUG = @CC_LDFLAGS_DEBUG@ +CC_LDFLAGS_EXTRA = @CC_LDFLAGS_EXTRA@ +CC_LDFLAGS_GPU = @CC_LDFLAGS_GPU@ +CC_LDFLAGS_HINTS = @CC_LDFLAGS_HINTS@ +CC_LDFLAGS_OPTIM = @CC_LDFLAGS_OPTIM@ +CC_LIBS = @CC_LIBS@ +CC_LIBS_DEBUG = @CC_LIBS_DEBUG@ +CC_LIBS_EXTRA = @CC_LIBS_EXTRA@ +CC_LIBS_GPU = @CC_LIBS_GPU@ +CC_LIBS_HINTS = @CC_LIBS_HINTS@ +CC_LIBS_OPTIM = @CC_LIBS_OPTIM@ +CFLAGS = @CFLAGS@ +CFLAGS_DEBUG = @CFLAGS_DEBUG@ +CFLAGS_EXTRA = @CFLAGS_EXTRA@ +CFLAGS_GPU = @CFLAGS_GPU@ +CFLAGS_HINTS = @CFLAGS_HINTS@ +CFLAGS_OPTIM = @CFLAGS_OPTIM@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CPPFLAGS_DEBUG = @CPPFLAGS_DEBUG@ +CPPFLAGS_EXTRA = @CPPFLAGS_EXTRA@ +CPPFLAGS_GPU = @CPPFLAGS_GPU@ +CPPFLAGS_HINTS = @CPPFLAGS_HINTS@ +CPPFLAGS_HINTS_EXT = @CPPFLAGS_HINTS_EXT@ +CPPFLAGS_OPTIM = @CPPFLAGS_OPTIM@ +CXX = @CXX@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CXXFLAGS_DEBUG = @CXXFLAGS_DEBUG@ +CXXFLAGS_EXTRA = @CXXFLAGS_EXTRA@ +CXXFLAGS_GPU = @CXXFLAGS_GPU@ +CXXFLAGS_HINTS = @CXXFLAGS_HINTS@ +CXXFLAGS_OPTIM = @CXXFLAGS_OPTIM@ +CXX_LDFLAGS = @CXX_LDFLAGS@ +CXX_LDFLAGS_DEBUG = @CXX_LDFLAGS_DEBUG@ +CXX_LDFLAGS_EXTRA = @CXX_LDFLAGS_EXTRA@ +CXX_LDFLAGS_GPU = @CXX_LDFLAGS_GPU@ +CXX_LDFLAGS_HINTS = @CXX_LDFLAGS_HINTS@ +CXX_LDFLAGS_OPTIM = @CXX_LDFLAGS_OPTIM@ +CXX_LIBS = @CXX_LIBS@ +CXX_LIBS_DEBUG = @CXX_LIBS_DEBUG@ +CXX_LIBS_EXTRA = @CXX_LIBS_EXTRA@ +CXX_LIBS_GPU = @CXX_LIBS_GPU@ +CXX_LIBS_HINTS = @CXX_LIBS_HINTS@ +CXX_LIBS_OPTIM = @CXX_LIBS_OPTIM@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ +FCFLAGS = @FCFLAGS@ +FCFLAGS_DEBUG = @FCFLAGS_DEBUG@ +FCFLAGS_EXTRA = @FCFLAGS_EXTRA@ +FCFLAGS_F90 = @FCFLAGS_F90@ +FCFLAGS_FIXEDFORM = @FCFLAGS_FIXEDFORM@ +FCFLAGS_FREEFORM = @FCFLAGS_FREEFORM@ +FCFLAGS_HINTS = @FCFLAGS_HINTS@ +FCFLAGS_MODDIR = @FCFLAGS_MODDIR@ +FCFLAGS_OPENMP = @FCFLAGS_OPENMP@ +FCFLAGS_OPENMP_OFFLOAD = @FCFLAGS_OPENMP_OFFLOAD@ +FCFLAGS_OPTIM = @FCFLAGS_OPTIM@ +FCLIBS = @FCLIBS@ +FC_LDFLAGS = @FC_LDFLAGS@ +FC_LDFLAGS_DEBUG = @FC_LDFLAGS_DEBUG@ +FC_LDFLAGS_EXTRA = @FC_LDFLAGS_EXTRA@ +FC_LDFLAGS_HINTS = @FC_LDFLAGS_HINTS@ +FC_LDFLAGS_OPTIM = @FC_LDFLAGS_OPTIM@ +FC_LIBS = @FC_LIBS@ +FC_LIBS_DEBUG = @FC_LIBS_DEBUG@ +FC_LIBS_EXTRA = @FC_LIBS_EXTRA@ +FC_LIBS_HINTS = @FC_LIBS_HINTS@ +FC_LIBS_OPTIM = @FC_LIBS_OPTIM@ +FC_NOWRAP = @FC_NOWRAP@ +FFLAGS = @FFLAGS@ +FFTW3_CFLAGS = @FFTW3_CFLAGS@ +FFTW3_CPPFLAGS = @FFTW3_CPPFLAGS@ +FFTW3_FCFLAGS = @FFTW3_FCFLAGS@ +FFTW3_LDFLAGS = @FFTW3_LDFLAGS@ +FFTW3_LIBS = @FFTW3_LIBS@ +FFT_CFLAGS = @FFT_CFLAGS@ +FFT_FCFLAGS = @FFT_FCFLAGS@ +FPP = @FPP@ +FPPFLAGS = @FPPFLAGS@ +FPPFLAGS_DEBUG = @FPPFLAGS_DEBUG@ +FPPFLAGS_EXTRA = @FPPFLAGS_EXTRA@ +FPPFLAGS_HINTS = @FPPFLAGS_HINTS@ +FPPFLAGS_OPTIM = @FPPFLAGS_OPTIM@ +GPU_ARCH = @GPU_ARCH@ +GPU_CFLAGS = @GPU_CFLAGS@ +GPU_CPPFLAGS = @GPU_CPPFLAGS@ +GPU_CXXFLAGS = @GPU_CXXFLAGS@ +GPU_FCFLAGS = @GPU_FCFLAGS@ +GPU_LDFLAGS = @GPU_LDFLAGS@ +GPU_LIBS = @GPU_LIBS@ +GRAPHATOM_BIN = @GRAPHATOM_BIN@ +GREP = @GREP@ +H5CC = @H5CC@ +HDF5_CFLAGS = @HDF5_CFLAGS@ +HDF5_CPPFLAGS = @HDF5_CPPFLAGS@ +HDF5_CXXFLAGS = @HDF5_CXXFLAGS@ +HDF5_FCFLAGS = @HDF5_FCFLAGS@ +HDF5_LDFLAGS = @HDF5_LDFLAGS@ +HDF5_LIBS = @HDF5_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +LDFLAGS = @LDFLAGS@ +LEVMAR_CFLAGS = @LEVMAR_CFLAGS@ +LEVMAR_CPPFLAGS = @LEVMAR_CPPFLAGS@ +LEVMAR_LDFLAGS = @LEVMAR_LDFLAGS@ +LEVMAR_LIBS = @LEVMAR_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPAW_CPPFLAGS = @LIBPAW_CPPFLAGS@ +LIBPAW_FCFLAGS = @LIBPAW_FCFLAGS@ +LIBPAW_LDFLAGS = @LIBPAW_LDFLAGS@ +LIBPAW_LIBS = @LIBPAW_LIBS@ +LIBPSML_CPPFLAGS = @LIBPSML_CPPFLAGS@ +LIBPSML_FCFLAGS = @LIBPSML_FCFLAGS@ +LIBPSML_LDFLAGS = @LIBPSML_LDFLAGS@ +LIBPSML_LIBS = @LIBPSML_LIBS@ +LIBS = @LIBS@ +LIBXC_CFLAGS = @LIBXC_CFLAGS@ +LIBXC_CPPFLAGS = @LIBXC_CPPFLAGS@ +LIBXC_FCFLAGS = @LIBXC_FCFLAGS@ +LIBXC_LDFLAGS = @LIBXC_LDFLAGS@ +LIBXC_LIBS = @LIBXC_LIBS@ +LIBXML2_CPPFLAGS = @LIBXML2_CPPFLAGS@ +LIBXML2_FCFLAGS = @LIBXML2_FCFLAGS@ +LIBXML2_LIBS = @LIBXML2_LIBS@ +LINALG_CFLAGS = @LINALG_CFLAGS@ +LINALG_CPPFLAGS = @LINALG_CPPFLAGS@ +LINALG_CXXFLAGS = @LINALG_CXXFLAGS@ +LINALG_FCFLAGS = @LINALG_FCFLAGS@ +LINALG_LDFLAGS = @LINALG_LDFLAGS@ +LINALG_LIBS = @LINALG_LIBS@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODEXT = @MODEXT@ +MPI_CFLAGS = @MPI_CFLAGS@ +MPI_CPPFLAGS = @MPI_CPPFLAGS@ +MPI_CXXFLAGS = @MPI_CXXFLAGS@ +MPI_FCFLAGS = @MPI_FCFLAGS@ +MPI_LDFLAGS = @MPI_LDFLAGS@ +MPI_LIBS = @MPI_LIBS@ +MV = @MV@ +NETCDF_CFLAGS = @NETCDF_CFLAGS@ +NETCDF_CPPFLAGS = @NETCDF_CPPFLAGS@ +NETCDF_CXXFLAGS = @NETCDF_CXXFLAGS@ +NETCDF_FCFLAGS = @NETCDF_FCFLAGS@ +NETCDF_FORTRAN_CFLAGS = @NETCDF_FORTRAN_CFLAGS@ +NETCDF_FORTRAN_CPPFLAGS = @NETCDF_FORTRAN_CPPFLAGS@ +NETCDF_FORTRAN_CXXFLAGS = @NETCDF_FORTRAN_CXXFLAGS@ +NETCDF_FORTRAN_FCFLAGS = @NETCDF_FORTRAN_FCFLAGS@ +NETCDF_FORTRAN_LDFLAGS = @NETCDF_FORTRAN_LDFLAGS@ +NETCDF_FORTRAN_LIBS = @NETCDF_FORTRAN_LIBS@ +NETCDF_LDFLAGS = @NETCDF_LDFLAGS@ +NETCDF_LIBS = @NETCDF_LIBS@ +NVCC = @NVCC@ +NVCC_CFLAGS = @NVCC_CFLAGS@ +NVCC_CPPFLAGS = @NVCC_CPPFLAGS@ +NVCC_LDFLAGS = @NVCC_LDFLAGS@ +NVCC_LIBS = @NVCC_LIBS@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PAPI_CFLAGS = @PAPI_CFLAGS@ +PAPI_CPPFLAGS = @PAPI_CPPFLAGS@ +PAPI_LDFLAGS = @PAPI_LDFLAGS@ +PAPI_LIBS = @PAPI_LIBS@ +PATCH = @PATCH@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PFFT_CFLAGS = @PFFT_CFLAGS@ +PFFT_CPPFLAGS = @PFFT_CPPFLAGS@ +PFFT_LDFLAGS = @PFFT_LDFLAGS@ +PFFT_LIBS = @PFFT_LIBS@ +PYFLAGS = @PYFLAGS@ +PYTHON = @PYTHON@ +PYTHON_CONFIG = @PYTHON_CONFIG@ +PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ +RANLIB = @RANLIB@ +REALPATH = @REALPATH@ +RM = @RM@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +TAR = @TAR@ +TRIQS_CFLAGS = @TRIQS_CFLAGS@ +TRIQS_CPPFLAGS = @TRIQS_CPPFLAGS@ +TRIQS_CXXFLAGS = @TRIQS_CXXFLAGS@ +TRIQS_LDFLAGS = @TRIQS_LDFLAGS@ +TRIQS_LIBS = @TRIQS_LIBS@ +TRUE_CPP = @TRUE_CPP@ +VERSION = @VERSION@ +WANNIER90_CPPFLAGS = @WANNIER90_CPPFLAGS@ +WANNIER90_FCFLAGS = @WANNIER90_FCFLAGS@ +WANNIER90_LDFLAGS = @WANNIER90_LDFLAGS@ +WANNIER90_LIBS = @WANNIER90_LIBS@ +XML2_CONFIG = @XML2_CONFIG@ +XMLF90_CPPFLAGS = @XMLF90_CPPFLAGS@ +XMLF90_FCFLAGS = @XMLF90_FCFLAGS@ +XMLF90_LDFLAGS = @XMLF90_LDFLAGS@ +XMLF90_LIBS = @XMLF90_LIBS@ +XML_CPPFLAGS = @XML_CPPFLAGS@ +XML_LIBS = @XML_LIBS@ +XPP = @XPP@ +XPPFLAGS = @XPPFLAGS@ +XPPFLAGS_DEBUG = @XPPFLAGS_DEBUG@ +XPPFLAGS_EXTRA = @XPPFLAGS_EXTRA@ +XPPFLAGS_OPTIM = @XPPFLAGS_OPTIM@ +YAKL_CPPFLAGS = @YAKL_CPPFLAGS@ +YAKL_FCFLAGS = @YAKL_FCFLAGS@ +YAKL_LDFLAGS = @YAKL_LDFLAGS@ +YAKL_LIBS = @YAKL_LIBS@ +abi_ac_distcheck = @abi_ac_distcheck@ +abi_ac_version = @abi_ac_version@ +abi_am_version = @abi_am_version@ +abi_avx_safe_mode_enable = @abi_avx_safe_mode_enable@ +abi_bse_unpacked_enable = @abi_bse_unpacked_enable@ +abi_cc_path = @abi_cc_path@ +abi_cc_vendor = @abi_cc_vendor@ +abi_cc_version = @abi_cc_version@ +abi_cclock_enable = @abi_cclock_enable@ +abi_cpp_path = @abi_cpp_path@ +abi_cpu_64bits = @abi_cpu_64bits@ +abi_cpu_bits = @abi_cpu_bits@ +abi_cpu_model = @abi_cpu_model@ +abi_cpu_platform = @abi_cpu_platform@ +abi_cpu_spec = @abi_cpu_spec@ +abi_cpu_vendor = @abi_cpu_vendor@ +abi_crpa_optim_enable = @abi_crpa_optim_enable@ +abi_cxx_path = @abi_cxx_path@ +abi_cxx_vendor = @abi_cxx_vendor@ +abi_cxx_version = @abi_cxx_version@ +abi_debug_flavor = @abi_debug_flavor@ +abi_exports_enable = @abi_exports_enable@ +abi_fbk_abinit_common_ok = @abi_fbk_abinit_common_ok@ +abi_fbk_bigdft_ok = @abi_fbk_bigdft_ok@ +abi_fbk_config = @abi_fbk_config@ +abi_fbk_enable = @abi_fbk_enable@ +abi_fbk_fft_ok = @abi_fbk_fft_ok@ +abi_fbk_fftw3_ok = @abi_fbk_fftw3_ok@ +abi_fbk_gpu_ok = @abi_fbk_gpu_ok@ +abi_fbk_hdf5_ok = @abi_fbk_hdf5_ok@ +abi_fbk_init = @abi_fbk_init@ +abi_fbk_kokkos_ok = @abi_fbk_kokkos_ok@ +abi_fbk_levmar_ok = @abi_fbk_levmar_ok@ +abi_fbk_libpaw_ok = @abi_fbk_libpaw_ok@ +abi_fbk_libpsml_ok = @abi_fbk_libpsml_ok@ +abi_fbk_libxc_ok = @abi_fbk_libxc_ok@ +abi_fbk_libxml2_ok = @abi_fbk_libxml2_ok@ +abi_fbk_linalg_ok = @abi_fbk_linalg_ok@ +abi_fbk_list = @abi_fbk_list@ +abi_fbk_mpi_ok = @abi_fbk_mpi_ok@ +abi_fbk_netcdf_fortran_ok = @abi_fbk_netcdf_fortran_ok@ +abi_fbk_netcdf_ok = @abi_fbk_netcdf_ok@ +abi_fbk_papi_ok = @abi_fbk_papi_ok@ +abi_fbk_pfft_ok = @abi_fbk_pfft_ok@ +abi_fbk_prefix = @abi_fbk_prefix@ +abi_fbk_required = @abi_fbk_required@ +abi_fbk_triqs_ok = @abi_fbk_triqs_ok@ +abi_fbk_wannier90_ok = @abi_fbk_wannier90_ok@ +abi_fbk_xmlf90_ok = @abi_fbk_xmlf90_ok@ +abi_fbk_yakl_ok = @abi_fbk_yakl_ok@ +abi_fc_path = @abi_fc_path@ +abi_fc_vendor = @abi_fc_vendor@ +abi_fc_version = @abi_fc_version@ +abi_fc_wrap = @abi_fc_wrap@ +abi_fc_wrapper_enable = @abi_fc_wrapper_enable@ +abi_fpp_path = @abi_fpp_path@ +abi_gpu_arch = @abi_gpu_arch@ +abi_gpu_fcflags = @abi_gpu_fcflags@ +abi_gpu_flavor = @abi_gpu_flavor@ +abi_gpu_hip_libdir = @abi_gpu_hip_libdir@ +abi_gpu_incs = @abi_gpu_incs@ +abi_gpu_ldflags = @abi_gpu_ldflags@ +abi_gpu_libs = @abi_gpu_libs@ +abi_gpu_nvtx_v3 = @abi_gpu_nvtx_v3@ +abi_gpu_roctx = @abi_gpu_roctx@ +abi_gw_dpc_enable = @abi_gw_dpc_enable@ +abi_hints_enable = @abi_hints_enable@ +abi_libtetra_enable = @abi_libtetra_enable@ +abi_libxml2_cppflags = @abi_libxml2_cppflags@ +abi_libxml2_enable = @abi_libxml2_enable@ +abi_libxml2_fcflags = @abi_libxml2_fcflags@ +abi_libxml2_init = @abi_libxml2_init@ +abi_libxml2_ldflags = @abi_libxml2_ldflags@ +abi_libxml2_libs = @abi_libxml2_libs@ +abi_libxml2_ok = @abi_libxml2_ok@ +abi_libxml2_prefix = @abi_libxml2_prefix@ +abi_lotf_enable = @abi_lotf_enable@ +abi_lt_version = @abi_lt_version@ +abi_m4_version = @abi_m4_version@ +abi_memory_profiling_enable = @abi_memory_profiling_enable@ +abi_mpi_cflags = @abi_mpi_cflags@ +abi_mpi_cppflags = @abi_mpi_cppflags@ +abi_mpi_cxxflags = @abi_mpi_cxxflags@ +abi_mpi_enable = @abi_mpi_enable@ +abi_mpi_fcflags = @abi_mpi_fcflags@ +abi_mpi_flavor = @abi_mpi_flavor@ +abi_mpi_gpu_aware_enable = @abi_mpi_gpu_aware_enable@ +abi_mpi_incs = @abi_mpi_incs@ +abi_mpi_inplace_enable = @abi_mpi_inplace_enable@ +abi_mpi_interfaces_bugfix_enable = @abi_mpi_interfaces_bugfix_enable@ +abi_mpi_io_default_enable = @abi_mpi_io_default_enable@ +abi_mpi_io_enable = @abi_mpi_io_enable@ +abi_mpi_ldflags = @abi_mpi_ldflags@ +abi_mpi_level = @abi_mpi_level@ +abi_mpi_libs = @abi_mpi_libs@ +abi_netcdf_default_enable = @abi_netcdf_default_enable@ +abi_openmp_enable = @abi_openmp_enable@ +abi_openmp_offload_enable = @abi_openmp_offload_enable@ +abi_optim_flavor = @abi_optim_flavor@ +abi_python_invocation_enable = @abi_python_invocation_enable@ +abi_source_debug_enable = @abi_source_debug_enable@ +abi_stdin_enable = @abi_stdin_enable@ +abi_sys_spec = @abi_sys_spec@ +abi_timer_enable = @abi_timer_enable@ +abi_triqs_v1_4_enable = @abi_triqs_v1_4_enable@ +abi_triqs_v2_0_enable = @abi_triqs_v2_0_enable@ +abi_zdot_bugfix_enable = @abi_zdot_bugfix_enable@ +abinit_bindir = @abinit_bindir@ +abinit_builddir = @abinit_builddir@ +abinit_chkdir = @abinit_chkdir@ +abinit_datdir = @abinit_datdir@ +abinit_docdir = @abinit_docdir@ +abinit_incdir = @abinit_incdir@ +abinit_libdir = @abinit_libdir@ +abinit_mandir = @abinit_mandir@ +abinit_prefix = @abinit_prefix@ +abinit_srcdir = @abinit_srcdir@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_FC = @ac_ct_FC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cc_info_string = @cc_info_string@ +cxx_info_string = @cxx_info_string@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +enable_avx_safe_mode = @enable_avx_safe_mode@ +enable_bse_unpacked = @enable_bse_unpacked@ +enable_cclock = @enable_cclock@ +enable_crpa_optim = @enable_crpa_optim@ +enable_exports = @enable_exports@ +enable_fc_wrapper = @enable_fc_wrapper@ +enable_gw_dpc = @enable_gw_dpc@ +enable_hints = @enable_hints@ +enable_libtetra = @enable_libtetra@ +enable_lotf = @enable_lotf@ +enable_memory_profiling = @enable_memory_profiling@ +enable_mpi_gpu_aware = @enable_mpi_gpu_aware@ +enable_mpi_inplace = @enable_mpi_inplace@ +enable_mpi_interfaces_bugfix = @enable_mpi_interfaces_bugfix@ +enable_mpi_io = @enable_mpi_io@ +enable_mpi_io_default = @enable_mpi_io_default@ +enable_netcdf_default = @enable_netcdf_default@ +enable_openmp = @enable_openmp@ +enable_openmp_offload = @enable_openmp_offload@ +enable_python_invocation = @enable_python_invocation@ +enable_shared = @enable_shared@ +enable_source_debug = @enable_source_debug@ +enable_static = @enable_static@ +enable_stdin = @enable_stdin@ +enable_timer = @enable_timer@ +enable_triqs_v1_4 = @enable_triqs_v1_4@ +enable_triqs_v2_0 = @enable_triqs_v2_0@ +enable_zdot_bugfix = @enable_zdot_bugfix@ +exec_prefix = @exec_prefix@ +fc_info_string = @fc_info_string@ +fc_mod_fcflags = @fc_mod_fcflags@ +fc_timing = @fc_timing@ +fcflags_opt_02_clib = @fcflags_opt_02_clib@ +fcflags_opt_10_defs = @fcflags_opt_10_defs@ +fcflags_opt_11_memory_mpi = @fcflags_opt_11_memory_mpi@ +fcflags_opt_12_hide_mpi = @fcflags_opt_12_hide_mpi@ +fcflags_opt_14_hidewrite = @fcflags_opt_14_hidewrite@ +fcflags_opt_16_hideleave = @fcflags_opt_16_hideleave@ +fcflags_opt_16_kokkos_toolbox = @fcflags_opt_16_kokkos_toolbox@ +fcflags_opt_17_gpu_toolbox = @fcflags_opt_17_gpu_toolbox@ +fcflags_opt_17_libtetra_ext = @fcflags_opt_17_libtetra_ext@ +fcflags_opt_17_minimax = @fcflags_opt_17_minimax@ +fcflags_opt_17_yaml_out = @fcflags_opt_17_yaml_out@ +fcflags_opt_18_timing = @fcflags_opt_18_timing@ +fcflags_opt_21_hashfuncs = @fcflags_opt_21_hashfuncs@ +fcflags_opt_27_toolbox_oop = @fcflags_opt_27_toolbox_oop@ +fcflags_opt_28_numeric_noabirule = @fcflags_opt_28_numeric_noabirule@ +fcflags_opt_29_kpoints = @fcflags_opt_29_kpoints@ +fcflags_opt_32_util = @fcflags_opt_32_util@ +fcflags_opt_33_xc_lowlevel = @fcflags_opt_33_xc_lowlevel@ +fcflags_opt_39_libpaw = @fcflags_opt_39_libpaw@ +fcflags_opt_41_geometry = @fcflags_opt_41_geometry@ +fcflags_opt_42_nlstrain = @fcflags_opt_42_nlstrain@ +fcflags_opt_42_parser = @fcflags_opt_42_parser@ +fcflags_opt_43_ptgroups = @fcflags_opt_43_ptgroups@ +fcflags_opt_43_wvl_wrappers = @fcflags_opt_43_wvl_wrappers@ +fcflags_opt_44_abitools = @fcflags_opt_44_abitools@ +fcflags_opt_44_abitypes_defs = @fcflags_opt_44_abitypes_defs@ +fcflags_opt_44_manage_kokkos = @fcflags_opt_44_manage_kokkos@ +fcflags_opt_45_geomoptim = @fcflags_opt_45_geomoptim@ +fcflags_opt_45_xgTools = @fcflags_opt_45_xgTools@ +fcflags_opt_46_ghc_omp = @fcflags_opt_46_ghc_omp@ +fcflags_opt_46_manage_cuda = @fcflags_opt_46_manage_cuda@ +fcflags_opt_48_diago = @fcflags_opt_48_diago@ +fcflags_opt_49_gw_toolbox_oop = @fcflags_opt_49_gw_toolbox_oop@ +fcflags_opt_51_manage_mpi = @fcflags_opt_51_manage_mpi@ +fcflags_opt_52_fft_mpi_noabirule = @fcflags_opt_52_fft_mpi_noabirule@ +fcflags_opt_53_ffts = @fcflags_opt_53_ffts@ +fcflags_opt_54_spacepar = @fcflags_opt_54_spacepar@ +fcflags_opt_55_abiutil = @fcflags_opt_55_abiutil@ +fcflags_opt_56_io_mpi = @fcflags_opt_56_io_mpi@ +fcflags_opt_56_mixing = @fcflags_opt_56_mixing@ +fcflags_opt_56_recipspace = @fcflags_opt_56_recipspace@ +fcflags_opt_56_xc = @fcflags_opt_56_xc@ +fcflags_opt_57_iopsp_parser = @fcflags_opt_57_iopsp_parser@ +fcflags_opt_57_iovars = @fcflags_opt_57_iovars@ +fcflags_opt_61_occeig = @fcflags_opt_61_occeig@ +fcflags_opt_62_cg_noabirule = @fcflags_opt_62_cg_noabirule@ +fcflags_opt_62_ctqmc = @fcflags_opt_62_ctqmc@ +fcflags_opt_62_iowfdenpot = @fcflags_opt_62_iowfdenpot@ +fcflags_opt_62_poisson = @fcflags_opt_62_poisson@ +fcflags_opt_62_wvl_wfs = @fcflags_opt_62_wvl_wfs@ +fcflags_opt_64_psp = @fcflags_opt_64_psp@ +fcflags_opt_65_lotf_base = @fcflags_opt_65_lotf_base@ +fcflags_opt_65_paw = @fcflags_opt_65_paw@ +fcflags_opt_66_nonlocal = @fcflags_opt_66_nonlocal@ +fcflags_opt_66_vdwxc = @fcflags_opt_66_vdwxc@ +fcflags_opt_66_wfs = @fcflags_opt_66_wfs@ +fcflags_opt_67_common = @fcflags_opt_67_common@ +fcflags_opt_67_python_invocation_ext = @fcflags_opt_67_python_invocation_ext@ +fcflags_opt_67_triqs_ext = @fcflags_opt_67_triqs_ext@ +fcflags_opt_68_dmft = @fcflags_opt_68_dmft@ +fcflags_opt_68_lotf = @fcflags_opt_68_lotf@ +fcflags_opt_68_recursion = @fcflags_opt_68_recursion@ +fcflags_opt_68_rsprc = @fcflags_opt_68_rsprc@ +fcflags_opt_69_wfdesc = @fcflags_opt_69_wfdesc@ +fcflags_opt_70_gw = @fcflags_opt_70_gw@ +fcflags_opt_71_bse = @fcflags_opt_71_bse@ +fcflags_opt_71_wannier = @fcflags_opt_71_wannier@ +fcflags_opt_72_response = @fcflags_opt_72_response@ +fcflags_opt_77_ddb = @fcflags_opt_77_ddb@ +fcflags_opt_77_suscep = @fcflags_opt_77_suscep@ +fcflags_opt_78_effpot = @fcflags_opt_78_effpot@ +fcflags_opt_78_eph = @fcflags_opt_78_eph@ +fcflags_opt_79_seqpar_mpi = @fcflags_opt_79_seqpar_mpi@ +fcflags_opt_80_rttddft = @fcflags_opt_80_rttddft@ +fcflags_opt_80_tdep = @fcflags_opt_80_tdep@ +fcflags_opt_94_scfcv = @fcflags_opt_94_scfcv@ +fcflags_opt_95_drive = @fcflags_opt_95_drive@ +fcflags_opt_98_main = @fcflags_opt_98_main@ +fcflags_opt_bigdft = @fcflags_opt_bigdft@ +fcflags_opt_default = @fcflags_opt_default@ +fcflags_opt_hdf5 = @fcflags_opt_hdf5@ +fcflags_opt_levmar = @fcflags_opt_levmar@ +fcflags_opt_libpsml = @fcflags_opt_libpsml@ +fcflags_opt_libxc = @fcflags_opt_libxc@ +fcflags_opt_libxml2 = @fcflags_opt_libxml2@ +fcflags_opt_linalg = @fcflags_opt_linalg@ +fcflags_opt_netcdf = @fcflags_opt_netcdf@ +fcflags_opt_netcdf_fortran = @fcflags_opt_netcdf_fortran@ +fcflags_opt_papi = @fcflags_opt_papi@ +fcflags_opt_triqs = @fcflags_opt_triqs@ +fcflags_opt_wannier90 = @fcflags_opt_wannier90@ +fcflags_opt_xmlf90 = @fcflags_opt_xmlf90@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sd_abinit_common_cppflags = @sd_abinit_common_cppflags@ +sd_abinit_common_enable = @sd_abinit_common_enable@ +sd_abinit_common_enable_def = @sd_abinit_common_enable_def@ +sd_abinit_common_fcflags = @sd_abinit_common_fcflags@ +sd_abinit_common_init = @sd_abinit_common_init@ +sd_abinit_common_ldflags = @sd_abinit_common_ldflags@ +sd_abinit_common_libs = @sd_abinit_common_libs@ +sd_abinit_common_ok = @sd_abinit_common_ok@ +sd_abinit_common_options = @sd_abinit_common_options@ +sd_abinit_common_policy = @sd_abinit_common_policy@ +sd_abinit_common_status = @sd_abinit_common_status@ +sd_bigdft_cppflags = @sd_bigdft_cppflags@ +sd_bigdft_enable = @sd_bigdft_enable@ +sd_bigdft_enable_def = @sd_bigdft_enable_def@ +sd_bigdft_fcflags = @sd_bigdft_fcflags@ +sd_bigdft_init = @sd_bigdft_init@ +sd_bigdft_ldflags = @sd_bigdft_ldflags@ +sd_bigdft_libs = @sd_bigdft_libs@ +sd_bigdft_ok = @sd_bigdft_ok@ +sd_bigdft_options = @sd_bigdft_options@ +sd_bigdft_policy = @sd_bigdft_policy@ +sd_bigdft_status = @sd_bigdft_status@ +sd_fft_cflags = @sd_fft_cflags@ +sd_fft_choices = @sd_fft_choices@ +sd_fft_cppflags = @sd_fft_cppflags@ +sd_fft_cxxflags = @sd_fft_cxxflags@ +sd_fft_enable = @sd_fft_enable@ +sd_fft_fcflags = @sd_fft_fcflags@ +sd_fft_flavor = @sd_fft_flavor@ +sd_fft_init = @sd_fft_init@ +sd_fft_ldflags = @sd_fft_ldflags@ +sd_fft_libs = @sd_fft_libs@ +sd_fft_ok = @sd_fft_ok@ +sd_fftw3_cflags = @sd_fftw3_cflags@ +sd_fftw3_cppflags = @sd_fftw3_cppflags@ +sd_fftw3_enable = @sd_fftw3_enable@ +sd_fftw3_enable_def = @sd_fftw3_enable_def@ +sd_fftw3_fcflags = @sd_fftw3_fcflags@ +sd_fftw3_init = @sd_fftw3_init@ +sd_fftw3_ldflags = @sd_fftw3_ldflags@ +sd_fftw3_libs = @sd_fftw3_libs@ +sd_fftw3_ok = @sd_fftw3_ok@ +sd_fftw3_options = @sd_fftw3_options@ +sd_fftw3_policy = @sd_fftw3_policy@ +sd_fftw3_status = @sd_fftw3_status@ +sd_gpu_cflags = @sd_gpu_cflags@ +sd_gpu_cppflags = @sd_gpu_cppflags@ +sd_gpu_cxxflags = @sd_gpu_cxxflags@ +sd_gpu_enable = @sd_gpu_enable@ +sd_gpu_enable_def = @sd_gpu_enable_def@ +sd_gpu_fcflags = @sd_gpu_fcflags@ +sd_gpu_init = @sd_gpu_init@ +sd_gpu_ldflags = @sd_gpu_ldflags@ +sd_gpu_libs = @sd_gpu_libs@ +sd_gpu_ok = @sd_gpu_ok@ +sd_gpu_options = @sd_gpu_options@ +sd_gpu_policy = @sd_gpu_policy@ +sd_gpu_prefix = @sd_gpu_prefix@ +sd_gpu_status = @sd_gpu_status@ +sd_hdf5_cflags = @sd_hdf5_cflags@ +sd_hdf5_cppflags = @sd_hdf5_cppflags@ +sd_hdf5_cxxflags = @sd_hdf5_cxxflags@ +sd_hdf5_enable = @sd_hdf5_enable@ +sd_hdf5_enable_def = @sd_hdf5_enable_def@ +sd_hdf5_enable_fc = @sd_hdf5_enable_fc@ +sd_hdf5_fcflags = @sd_hdf5_fcflags@ +sd_hdf5_h5cc = @sd_hdf5_h5cc@ +sd_hdf5_h5fc = @sd_hdf5_h5fc@ +sd_hdf5_init = @sd_hdf5_init@ +sd_hdf5_ldflags = @sd_hdf5_ldflags@ +sd_hdf5_libs = @sd_hdf5_libs@ +sd_hdf5_ok = @sd_hdf5_ok@ +sd_hdf5_options = @sd_hdf5_options@ +sd_hdf5_policy = @sd_hdf5_policy@ +sd_hdf5_status = @sd_hdf5_status@ +sd_kokkos_cppflags = @sd_kokkos_cppflags@ +sd_kokkos_cxxflags = @sd_kokkos_cxxflags@ +sd_kokkos_enable = @sd_kokkos_enable@ +sd_kokkos_enable_def = @sd_kokkos_enable_def@ +sd_kokkos_init = @sd_kokkos_init@ +sd_kokkos_ldflags = @sd_kokkos_ldflags@ +sd_kokkos_libs = @sd_kokkos_libs@ +sd_kokkos_ok = @sd_kokkos_ok@ +sd_kokkos_options = @sd_kokkos_options@ +sd_kokkos_policy = @sd_kokkos_policy@ +sd_kokkos_status = @sd_kokkos_status@ +sd_levmar_cflags = @sd_levmar_cflags@ +sd_levmar_cppflags = @sd_levmar_cppflags@ +sd_levmar_enable = @sd_levmar_enable@ +sd_levmar_enable_def = @sd_levmar_enable_def@ +sd_levmar_init = @sd_levmar_init@ +sd_levmar_ldflags = @sd_levmar_ldflags@ +sd_levmar_libs = @sd_levmar_libs@ +sd_levmar_ok = @sd_levmar_ok@ +sd_levmar_options = @sd_levmar_options@ +sd_levmar_policy = @sd_levmar_policy@ +sd_levmar_status = @sd_levmar_status@ +sd_libpaw_cppflags = @sd_libpaw_cppflags@ +sd_libpaw_enable = @sd_libpaw_enable@ +sd_libpaw_enable_def = @sd_libpaw_enable_def@ +sd_libpaw_fcflags = @sd_libpaw_fcflags@ +sd_libpaw_init = @sd_libpaw_init@ +sd_libpaw_ldflags = @sd_libpaw_ldflags@ +sd_libpaw_libs = @sd_libpaw_libs@ +sd_libpaw_ok = @sd_libpaw_ok@ +sd_libpaw_options = @sd_libpaw_options@ +sd_libpaw_policy = @sd_libpaw_policy@ +sd_libpaw_status = @sd_libpaw_status@ +sd_libpsml_cppflags = @sd_libpsml_cppflags@ +sd_libpsml_enable = @sd_libpsml_enable@ +sd_libpsml_enable_def = @sd_libpsml_enable_def@ +sd_libpsml_fcflags = @sd_libpsml_fcflags@ +sd_libpsml_init = @sd_libpsml_init@ +sd_libpsml_ldflags = @sd_libpsml_ldflags@ +sd_libpsml_libs = @sd_libpsml_libs@ +sd_libpsml_ok = @sd_libpsml_ok@ +sd_libpsml_options = @sd_libpsml_options@ +sd_libpsml_policy = @sd_libpsml_policy@ +sd_libpsml_status = @sd_libpsml_status@ +sd_libxc_cflags = @sd_libxc_cflags@ +sd_libxc_cppflags = @sd_libxc_cppflags@ +sd_libxc_enable = @sd_libxc_enable@ +sd_libxc_enable_def = @sd_libxc_enable_def@ +sd_libxc_enable_fc = @sd_libxc_enable_fc@ +sd_libxc_fcflags = @sd_libxc_fcflags@ +sd_libxc_init = @sd_libxc_init@ +sd_libxc_ldflags = @sd_libxc_ldflags@ +sd_libxc_libs = @sd_libxc_libs@ +sd_libxc_ok = @sd_libxc_ok@ +sd_libxc_options = @sd_libxc_options@ +sd_libxc_policy = @sd_libxc_policy@ +sd_libxc_status = @sd_libxc_status@ +sd_linalg_cflags = @sd_linalg_cflags@ +sd_linalg_choices = @sd_linalg_choices@ +sd_linalg_cppflags = @sd_linalg_cppflags@ +sd_linalg_cxxflags = @sd_linalg_cxxflags@ +sd_linalg_enable = @sd_linalg_enable@ +sd_linalg_fcflags = @sd_linalg_fcflags@ +sd_linalg_flavor = @sd_linalg_flavor@ +sd_linalg_has_elpa = @sd_linalg_has_elpa@ +sd_linalg_has_scalapack = @sd_linalg_has_scalapack@ +sd_linalg_init = @sd_linalg_init@ +sd_linalg_ldflags = @sd_linalg_ldflags@ +sd_linalg_libs = @sd_linalg_libs@ +sd_linalg_ok = @sd_linalg_ok@ +sd_mpi_cc = @sd_mpi_cc@ +sd_mpi_cflags = @sd_mpi_cflags@ +sd_mpi_cppflags = @sd_mpi_cppflags@ +sd_mpi_cxx = @sd_mpi_cxx@ +sd_mpi_enable = @sd_mpi_enable@ +sd_mpi_enable_cxx = @sd_mpi_enable_cxx@ +sd_mpi_enable_def = @sd_mpi_enable_def@ +sd_mpi_enable_fc = @sd_mpi_enable_fc@ +sd_mpi_fc = @sd_mpi_fc@ +sd_mpi_fcflags = @sd_mpi_fcflags@ +sd_mpi_init = @sd_mpi_init@ +sd_mpi_ldflags = @sd_mpi_ldflags@ +sd_mpi_libs = @sd_mpi_libs@ +sd_mpi_ok = @sd_mpi_ok@ +sd_mpi_options = @sd_mpi_options@ +sd_mpi_policy = @sd_mpi_policy@ +sd_mpi_status = @sd_mpi_status@ +sd_netcdf_cflags = @sd_netcdf_cflags@ +sd_netcdf_cppflags = @sd_netcdf_cppflags@ +sd_netcdf_enable = @sd_netcdf_enable@ +sd_netcdf_enable_def = @sd_netcdf_enable_def@ +sd_netcdf_fcflags = @sd_netcdf_fcflags@ +sd_netcdf_fortran_cflags = @sd_netcdf_fortran_cflags@ +sd_netcdf_fortran_cppflags = @sd_netcdf_fortran_cppflags@ +sd_netcdf_fortran_enable = @sd_netcdf_fortran_enable@ +sd_netcdf_fortran_enable_def = @sd_netcdf_fortran_enable_def@ +sd_netcdf_fortran_fcflags = @sd_netcdf_fortran_fcflags@ +sd_netcdf_fortran_init = @sd_netcdf_fortran_init@ +sd_netcdf_fortran_ldflags = @sd_netcdf_fortran_ldflags@ +sd_netcdf_fortran_libs = @sd_netcdf_fortran_libs@ +sd_netcdf_fortran_ok = @sd_netcdf_fortran_ok@ +sd_netcdf_fortran_options = @sd_netcdf_fortran_options@ +sd_netcdf_fortran_policy = @sd_netcdf_fortran_policy@ +sd_netcdf_fortran_status = @sd_netcdf_fortran_status@ +sd_netcdf_init = @sd_netcdf_init@ +sd_netcdf_ldflags = @sd_netcdf_ldflags@ +sd_netcdf_libs = @sd_netcdf_libs@ +sd_netcdf_ok = @sd_netcdf_ok@ +sd_netcdf_options = @sd_netcdf_options@ +sd_netcdf_policy = @sd_netcdf_policy@ +sd_netcdf_status = @sd_netcdf_status@ +sd_papi_cflags = @sd_papi_cflags@ +sd_papi_cppflags = @sd_papi_cppflags@ +sd_papi_enable = @sd_papi_enable@ +sd_papi_enable_def = @sd_papi_enable_def@ +sd_papi_init = @sd_papi_init@ +sd_papi_ldflags = @sd_papi_ldflags@ +sd_papi_libs = @sd_papi_libs@ +sd_papi_ok = @sd_papi_ok@ +sd_papi_options = @sd_papi_options@ +sd_papi_policy = @sd_papi_policy@ +sd_papi_sd_papi_fcflags = @sd_papi_sd_papi_fcflags@ +sd_papi_status = @sd_papi_status@ +sd_pfft_cflags = @sd_pfft_cflags@ +sd_pfft_cppflags = @sd_pfft_cppflags@ +sd_pfft_enable = @sd_pfft_enable@ +sd_pfft_enable_def = @sd_pfft_enable_def@ +sd_pfft_init = @sd_pfft_init@ +sd_pfft_ldflags = @sd_pfft_ldflags@ +sd_pfft_libs = @sd_pfft_libs@ +sd_pfft_ok = @sd_pfft_ok@ +sd_pfft_options = @sd_pfft_options@ +sd_pfft_policy = @sd_pfft_policy@ +sd_pfft_status = @sd_pfft_status@ +sd_sys_fcflags = @sd_sys_fcflags@ +sd_triqs_cflags = @sd_triqs_cflags@ +sd_triqs_cppflags = @sd_triqs_cppflags@ +sd_triqs_cxxflags = @sd_triqs_cxxflags@ +sd_triqs_enable = @sd_triqs_enable@ +sd_triqs_enable_def = @sd_triqs_enable_def@ +sd_triqs_fcflags = @sd_triqs_fcflags@ +sd_triqs_init = @sd_triqs_init@ +sd_triqs_ldflags = @sd_triqs_ldflags@ +sd_triqs_libs = @sd_triqs_libs@ +sd_triqs_ok = @sd_triqs_ok@ +sd_triqs_options = @sd_triqs_options@ +sd_triqs_policy = @sd_triqs_policy@ +sd_triqs_status = @sd_triqs_status@ +sd_wannier90_cppflags = @sd_wannier90_cppflags@ +sd_wannier90_enable = @sd_wannier90_enable@ +sd_wannier90_enable_def = @sd_wannier90_enable_def@ +sd_wannier90_fcflags = @sd_wannier90_fcflags@ +sd_wannier90_init = @sd_wannier90_init@ +sd_wannier90_ldflags = @sd_wannier90_ldflags@ +sd_wannier90_libs = @sd_wannier90_libs@ +sd_wannier90_ok = @sd_wannier90_ok@ +sd_wannier90_options = @sd_wannier90_options@ +sd_wannier90_policy = @sd_wannier90_policy@ +sd_wannier90_status = @sd_wannier90_status@ +sd_xmlf90_cppflags = @sd_xmlf90_cppflags@ +sd_xmlf90_enable = @sd_xmlf90_enable@ +sd_xmlf90_enable_def = @sd_xmlf90_enable_def@ +sd_xmlf90_fcflags = @sd_xmlf90_fcflags@ +sd_xmlf90_init = @sd_xmlf90_init@ +sd_xmlf90_ldflags = @sd_xmlf90_ldflags@ +sd_xmlf90_libs = @sd_xmlf90_libs@ +sd_xmlf90_ok = @sd_xmlf90_ok@ +sd_xmlf90_options = @sd_xmlf90_options@ +sd_xmlf90_policy = @sd_xmlf90_policy@ +sd_xmlf90_status = @sd_xmlf90_status@ +sd_yakl_cppflags = @sd_yakl_cppflags@ +sd_yakl_enable = @sd_yakl_enable@ +sd_yakl_enable_def = @sd_yakl_enable_def@ +sd_yakl_fcflags = @sd_yakl_fcflags@ +sd_yakl_init = @sd_yakl_init@ +sd_yakl_ldflags = @sd_yakl_ldflags@ +sd_yakl_libs = @sd_yakl_libs@ +sd_yakl_ok = @sd_yakl_ok@ +sd_yakl_options = @sd_yakl_options@ +sd_yakl_policy = @sd_yakl_policy@ +sd_yakl_status = @sd_yakl_status@ +sharedstatedir = @sharedstatedir@ +src_02_clib_fcflags = @src_02_clib_fcflags@ +src_10_defs_fcflags = @src_10_defs_fcflags@ +src_11_memory_mpi_fcflags = @src_11_memory_mpi_fcflags@ +src_12_hide_mpi_fcflags = @src_12_hide_mpi_fcflags@ +src_14_hidewrite_fcflags = @src_14_hidewrite_fcflags@ +src_16_hideleave_fcflags = @src_16_hideleave_fcflags@ +src_16_kokkos_toolbox_fcflags = @src_16_kokkos_toolbox_fcflags@ +src_17_gpu_toolbox_fcflags = @src_17_gpu_toolbox_fcflags@ +src_17_libtetra_ext_fcflags = @src_17_libtetra_ext_fcflags@ +src_17_minimax_fcflags = @src_17_minimax_fcflags@ +src_17_yaml_out_fcflags = @src_17_yaml_out_fcflags@ +src_18_timing_fcflags = @src_18_timing_fcflags@ +src_21_hashfuncs_fcflags = @src_21_hashfuncs_fcflags@ +src_27_toolbox_oop_fcflags = @src_27_toolbox_oop_fcflags@ +src_28_numeric_noabirule_fcflags = @src_28_numeric_noabirule_fcflags@ +src_29_kpoints_fcflags = @src_29_kpoints_fcflags@ +src_32_util_fcflags = @src_32_util_fcflags@ +src_33_xc_lowlevel_fcflags = @src_33_xc_lowlevel_fcflags@ +src_39_libpaw_fcflags = @src_39_libpaw_fcflags@ +src_41_geometry_fcflags = @src_41_geometry_fcflags@ +src_42_nlstrain_fcflags = @src_42_nlstrain_fcflags@ +src_42_parser_fcflags = @src_42_parser_fcflags@ +src_43_ptgroups_fcflags = @src_43_ptgroups_fcflags@ +src_43_wvl_wrappers_fcflags = @src_43_wvl_wrappers_fcflags@ +src_44_abitools_fcflags = @src_44_abitools_fcflags@ +src_44_abitypes_defs_fcflags = @src_44_abitypes_defs_fcflags@ +src_44_manage_kokkos_fcflags = @src_44_manage_kokkos_fcflags@ +src_45_geomoptim_fcflags = @src_45_geomoptim_fcflags@ +src_45_xgTools_fcflags = @src_45_xgTools_fcflags@ +src_46_ghc_omp_fcflags = @src_46_ghc_omp_fcflags@ +src_46_manage_cuda_fcflags = @src_46_manage_cuda_fcflags@ +src_48_diago_fcflags = @src_48_diago_fcflags@ +src_49_gw_toolbox_oop_fcflags = @src_49_gw_toolbox_oop_fcflags@ +src_51_manage_mpi_fcflags = @src_51_manage_mpi_fcflags@ +src_52_fft_mpi_noabirule_fcflags = @src_52_fft_mpi_noabirule_fcflags@ +src_53_ffts_fcflags = @src_53_ffts_fcflags@ +src_54_spacepar_fcflags = @src_54_spacepar_fcflags@ +src_55_abiutil_fcflags = @src_55_abiutil_fcflags@ +src_56_io_mpi_fcflags = @src_56_io_mpi_fcflags@ +src_56_mixing_fcflags = @src_56_mixing_fcflags@ +src_56_recipspace_fcflags = @src_56_recipspace_fcflags@ +src_56_xc_fcflags = @src_56_xc_fcflags@ +src_57_iopsp_parser_fcflags = @src_57_iopsp_parser_fcflags@ +src_57_iovars_fcflags = @src_57_iovars_fcflags@ +src_61_occeig_fcflags = @src_61_occeig_fcflags@ +src_62_cg_noabirule_fcflags = @src_62_cg_noabirule_fcflags@ +src_62_ctqmc_fcflags = @src_62_ctqmc_fcflags@ +src_62_iowfdenpot_fcflags = @src_62_iowfdenpot_fcflags@ +src_62_poisson_fcflags = @src_62_poisson_fcflags@ +src_62_wvl_wfs_fcflags = @src_62_wvl_wfs_fcflags@ +src_64_psp_fcflags = @src_64_psp_fcflags@ +src_65_lotf_base_fcflags = @src_65_lotf_base_fcflags@ +src_65_paw_fcflags = @src_65_paw_fcflags@ +src_66_nonlocal_fcflags = @src_66_nonlocal_fcflags@ +src_66_vdwxc_fcflags = @src_66_vdwxc_fcflags@ +src_66_wfs_fcflags = @src_66_wfs_fcflags@ +src_67_common_fcflags = @src_67_common_fcflags@ +src_67_python_invocation_ext_fcflags = @src_67_python_invocation_ext_fcflags@ +src_67_triqs_ext_fcflags = @src_67_triqs_ext_fcflags@ +src_68_dmft_fcflags = @src_68_dmft_fcflags@ +src_68_lotf_fcflags = @src_68_lotf_fcflags@ +src_68_recursion_fcflags = @src_68_recursion_fcflags@ +src_68_rsprc_fcflags = @src_68_rsprc_fcflags@ +src_69_wfdesc_fcflags = @src_69_wfdesc_fcflags@ +src_70_gw_fcflags = @src_70_gw_fcflags@ +src_71_bse_fcflags = @src_71_bse_fcflags@ +src_71_wannier_fcflags = @src_71_wannier_fcflags@ +src_72_response_fcflags = @src_72_response_fcflags@ +src_77_ddb_fcflags = @src_77_ddb_fcflags@ +src_77_suscep_fcflags = @src_77_suscep_fcflags@ +src_78_effpot_fcflags = @src_78_effpot_fcflags@ +src_78_eph_fcflags = @src_78_eph_fcflags@ +src_79_seqpar_mpi_fcflags = @src_79_seqpar_mpi_fcflags@ +src_80_rttddft_fcflags = @src_80_rttddft_fcflags@ +src_80_tdep_fcflags = @src_80_tdep_fcflags@ +src_94_scfcv_fcflags = @src_94_scfcv_fcflags@ +src_95_drive_fcflags = @src_95_drive_fcflags@ +src_common_fcflags = @src_common_fcflags@ +src_core_fcflags = @src_core_fcflags@ +src_libpaw_fcflags = @src_libpaw_fcflags@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +with_abinit_common = @with_abinit_common@ +with_bigdft = @with_bigdft@ +with_config_file = @with_config_file@ +with_debug_flavor = @with_debug_flavor@ +with_fallbacks = @with_fallbacks@ +with_fc_vendor = @with_fc_vendor@ +with_fc_version = @with_fc_version@ +with_fft_flavor = @with_fft_flavor@ +with_fftw3 = @with_fftw3@ +with_gnu_ld = @with_gnu_ld@ +with_gpu = @with_gpu@ +with_hdf5 = @with_hdf5@ +with_kokkos = @with_kokkos@ +with_levmar = @with_levmar@ +with_libpaw = @with_libpaw@ +with_libpsml = @with_libpsml@ +with_libxc = @with_libxc@ +with_libxml2 = @with_libxml2@ +with_linalg_flavor = @with_linalg_flavor@ +with_mpi = @with_mpi@ +with_mpi_level = @with_mpi_level@ +with_netcdf = @with_netcdf@ +with_optim_flavor = @with_optim_flavor@ +with_papi = @with_papi@ +with_pfft = @with_pfft@ +with_triqs = @with_triqs@ +with_wannier90 = @with_wannier90@ +with_xmlf90 = @with_xmlf90@ +with_yakl = @with_yakl@ +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu shared/libpaw/mods/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu shared/libpaw/mods/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +tags TAGS: + +ctags CTAGS: + +cscope cscopelist: + + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile all-local +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-local + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am all-local check check-am clean clean-generic \ + cscopelist-am ctags-am distclean distclean-generic distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-local pdf pdf-am ps ps-am tags-am uninstall \ + uninstall-am + +.PRECIOUS: Makefile + + +all-local: + @echo "There is no buildable file here" + +mostlyclean-local: + rm -f *.$(MODEXT) *.h + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/GX-PAW/libpaw/mods/m_libpaw_libxc.mod b/GX-PAW/libpaw/mods/m_libpaw_libxc.mod new file mode 100644 index 00000000..d22d6144 Binary files /dev/null and b/GX-PAW/libpaw/mods/m_libpaw_libxc.mod differ diff --git a/GX-PAW/libpaw/mods/m_libpaw_libxc_funcs.mod b/GX-PAW/libpaw/mods/m_libpaw_libxc_funcs.mod new file mode 100644 index 00000000..963de5d0 Binary files /dev/null and b/GX-PAW/libpaw/mods/m_libpaw_libxc_funcs.mod differ diff --git a/GX-PAW/libpaw/mods/m_libpaw_mpi.mod b/GX-PAW/libpaw/mods/m_libpaw_mpi.mod new file mode 100644 index 00000000..9db48877 Binary files /dev/null and b/GX-PAW/libpaw/mods/m_libpaw_mpi.mod differ diff --git a/GX-PAW/libpaw/mods/m_libpaw_tools.mod b/GX-PAW/libpaw/mods/m_libpaw_tools.mod new file mode 100644 index 00000000..605f1897 Binary files /dev/null and b/GX-PAW/libpaw/mods/m_libpaw_tools.mod differ diff --git a/GX-PAW/libpaw/mods/m_paral_atom.mod b/GX-PAW/libpaw/mods/m_paral_atom.mod new file mode 100644 index 00000000..5dab0680 Binary files /dev/null and b/GX-PAW/libpaw/mods/m_paral_atom.mod differ diff --git a/GX-PAW/libpaw/mods/m_paw_an.mod b/GX-PAW/libpaw/mods/m_paw_an.mod new file mode 100644 index 00000000..0baf2fcf Binary files /dev/null and b/GX-PAW/libpaw/mods/m_paw_an.mod differ diff --git a/GX-PAW/libpaw/mods/m_paw_atom.mod b/GX-PAW/libpaw/mods/m_paw_atom.mod new file mode 100644 index 00000000..ac64c1f4 Binary files /dev/null and b/GX-PAW/libpaw/mods/m_paw_atom.mod differ diff --git a/GX-PAW/libpaw/mods/m_paw_finegrid.mod b/GX-PAW/libpaw/mods/m_paw_finegrid.mod new file mode 100644 index 00000000..389ccfd4 Binary files /dev/null and b/GX-PAW/libpaw/mods/m_paw_finegrid.mod differ diff --git a/GX-PAW/libpaw/mods/m_paw_gaussfit.mod b/GX-PAW/libpaw/mods/m_paw_gaussfit.mod new file mode 100644 index 00000000..33ab3262 Binary files /dev/null and b/GX-PAW/libpaw/mods/m_paw_gaussfit.mod differ diff --git a/GX-PAW/libpaw/mods/m_paw_ij.mod b/GX-PAW/libpaw/mods/m_paw_ij.mod new file mode 100644 index 00000000..a17ac413 Binary files /dev/null and b/GX-PAW/libpaw/mods/m_paw_ij.mod differ diff --git a/GX-PAW/libpaw/mods/m_paw_io.mod b/GX-PAW/libpaw/mods/m_paw_io.mod new file mode 100644 index 00000000..87745169 Binary files /dev/null and b/GX-PAW/libpaw/mods/m_paw_io.mod differ diff --git a/GX-PAW/libpaw/mods/m_paw_numeric.mod b/GX-PAW/libpaw/mods/m_paw_numeric.mod new file mode 100644 index 00000000..55ce443b Binary files /dev/null and b/GX-PAW/libpaw/mods/m_paw_numeric.mod differ diff --git a/GX-PAW/libpaw/mods/m_paw_onsite.mod b/GX-PAW/libpaw/mods/m_paw_onsite.mod new file mode 100644 index 00000000..a74cd77c Binary files /dev/null and b/GX-PAW/libpaw/mods/m_paw_onsite.mod differ diff --git a/GX-PAW/libpaw/mods/m_paw_sphharm.mod b/GX-PAW/libpaw/mods/m_paw_sphharm.mod new file mode 100644 index 00000000..254adf86 Binary files /dev/null and b/GX-PAW/libpaw/mods/m_paw_sphharm.mod differ diff --git a/GX-PAW/libpaw/mods/m_pawang.mod b/GX-PAW/libpaw/mods/m_pawang.mod new file mode 100644 index 00000000..2860d495 Binary files /dev/null and b/GX-PAW/libpaw/mods/m_pawang.mod differ diff --git a/GX-PAW/libpaw/mods/m_pawcprj.mod b/GX-PAW/libpaw/mods/m_pawcprj.mod new file mode 100644 index 00000000..639d8bec Binary files /dev/null and b/GX-PAW/libpaw/mods/m_pawcprj.mod differ diff --git a/GX-PAW/libpaw/mods/m_pawdij.mod b/GX-PAW/libpaw/mods/m_pawdij.mod new file mode 100644 index 00000000..b3035005 Binary files /dev/null and b/GX-PAW/libpaw/mods/m_pawdij.mod differ diff --git a/GX-PAW/libpaw/mods/m_pawfgrtab.mod b/GX-PAW/libpaw/mods/m_pawfgrtab.mod new file mode 100644 index 00000000..ec67472e Binary files /dev/null and b/GX-PAW/libpaw/mods/m_pawfgrtab.mod differ diff --git a/GX-PAW/libpaw/mods/m_pawpsp.mod b/GX-PAW/libpaw/mods/m_pawpsp.mod new file mode 100644 index 00000000..d017ab86 Binary files /dev/null and b/GX-PAW/libpaw/mods/m_pawpsp.mod differ diff --git a/GX-PAW/libpaw/mods/m_pawrad.mod b/GX-PAW/libpaw/mods/m_pawrad.mod new file mode 100644 index 00000000..3e55f1b1 Binary files /dev/null and b/GX-PAW/libpaw/mods/m_pawrad.mod differ diff --git a/GX-PAW/libpaw/mods/m_pawrhoij.mod b/GX-PAW/libpaw/mods/m_pawrhoij.mod new file mode 100644 index 00000000..3e8500b8 Binary files /dev/null and b/GX-PAW/libpaw/mods/m_pawrhoij.mod differ diff --git a/GX-PAW/libpaw/mods/m_pawtab.mod b/GX-PAW/libpaw/mods/m_pawtab.mod new file mode 100644 index 00000000..72a9e4c4 Binary files /dev/null and b/GX-PAW/libpaw/mods/m_pawtab.mod differ diff --git a/GX-PAW/libpaw/mods/m_pawxc.mod b/GX-PAW/libpaw/mods/m_pawxc.mod new file mode 100644 index 00000000..e4efa53d Binary files /dev/null and b/GX-PAW/libpaw/mods/m_pawxc.mod differ diff --git a/GX-PAW/libpaw/mods/m_pawxmlps.mod b/GX-PAW/libpaw/mods/m_pawxmlps.mod new file mode 100644 index 00000000..2e198d1e Binary files /dev/null and b/GX-PAW/libpaw/mods/m_pawxmlps.mod differ diff --git a/GX-PAW/libpaw/quickcheck.sh b/GX-PAW/libpaw/quickcheck.sh new file mode 100755 index 00000000..187680a2 --- /dev/null +++ b/GX-PAW/libpaw/quickcheck.sh @@ -0,0 +1,122 @@ +#!/bin/bash +# +## Copyright (C) 2017-2024 ABINIT group (Yann Pouillon ) + +# Note: this script is for maintainers and testers working with GCC + +# Decide whether to check configure options +do_check_config="no" + +# Stop at first error and echo commands +set -ev + +# Check that we are in the right directory +if test ! -s "./configure.ac" -o ! -s "src/m_paw_atom.F90"; then + echo "This is not a LibPAW source tree - aborting now" + exit 1 +fi + +# Make sure the directory tree is writable +chmod -R u+w . + +# Check that we are in the correct directory +test -s "configure.ac" -a -s "src/m_paw_atom.F90" || exit 0 + +# Init build parameters +export DBGFLAGS="-O0 -g3 -ggdb -Wall -Wextra -fbounds-check -fno-inline" + +# Prepare source tree +./wipeout.sh +./autogen.sh + +# Check configure script +if test "${do_check_config}" = "yes"; then + mkdir tmp-config + cd tmp-config + echo "" + echo "### BASIC ###" + ../configure + sleep 1 + echo "" + echo "### SERIAL ###" + ../configure \ + CC="gcc" CFLAGS="${DBGFLAGS}" FC="gfortran" FCFLAGS="${DBGFLAGS}" + sleep 1 + echo "" + echo "### MPI(env) ###" + ../configure \ + CC="mpicc" CFLAGS="${DBGFLAGS}" FC="mpif90" FCFLAGS="${DBGFLAGS}" + sleep 1 + echo "" + echo "### MPI(dir) ###" + ../configure \ + --with-mpi=/usr CFLAGS="${DBGFLAGS}" FCFLAGS="${DBGFLAGS}" + sleep 1 + echo "" + echo "### MPI(yon) ###" + ../configure \ + --with-mpi CFLAGS="${DBGFLAGS}" FCFLAGS="${DBGFLAGS}" + sleep 1 + echo "" + echo "### MPI(yon) + MULTICONFIG ###" + ../configure \ + --enable-multiconfig --with-mpi CFLAGS="${DBGFLAGS}" FCFLAGS="${DBGFLAGS}" + sleep 1 + cd .. +fi + +# Check export +mkdir tmp-export +cd tmp-export +../configure +make export +tar xvzf libpaw-[0-9].[0-9].[0-9].tar.gz +cd libpaw-[0-9].[0-9].[0-9] + + +# Check default build (requires ABINIT to build due to symbol names) +abinit_common_libs="../common/src/libabinit_common.a" +if test -s "${abinit_common_libs}"; then + mkdir tmp-minimal + cd tmp-minimal + ../configure \ + CC="gcc" CFLAGS="${DBGFLAGS}" FC="gfortran" FCFLAGS="${DBGFLAGS}" + sleep 1 + make dist + make + make check + make clean + make -j4 + mkdir install-minimal + make install DESTDIR="${PWD}/install-minimal" + ls -lR install-minimal | tee install-minimal.log + cd .. +fi + +# Check parallel build +mkdir tmp-mpi +cd tmp-mpi +../configure \ + CC="mpicc" CFLAGS="${DBGFLAGS}" FC="mpif90" FCFLAGS="${DBGFLAGS}" +sleep 1 +make +make clean && make -j4 +make check +cd .. + +# Make distcheck +mkdir tmp-distcheck +cd tmp-distcheck +../configure \ + CC="gcc" CFLAGS="${DBGFLAGS}" FC="gfortran" FCFLAGS="${DBGFLAGS}" +sleep 1 +make distcheck -j4 +make distcleancheck +cd .. + +# Go back to the top +cd .. +cd .. + +# Clean-up the mess +rm -rf tmp-config tmp-export diff --git a/GX-PAW/libpaw/src/.deps/libpaw_libxc.Po b/GX-PAW/libpaw/src/.deps/libpaw_libxc.Po new file mode 100644 index 00000000..ef624cb8 --- /dev/null +++ b/GX-PAW/libpaw/src/.deps/libpaw_libxc.Po @@ -0,0 +1,237 @@ +libpaw_libxc.o: libpaw_libxc.c libpaw.h ../../../config.h \ + ../../../shared/common/src/incs/abi_common.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdlib.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/Availability.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/AvailabilityInternal.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_symbol_aliasing.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_posix_availability.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/wait.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_pid_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_id_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/signal.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/appleapiopts.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/signal.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/signal.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_mcontext.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/_mcontext.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/machine/_structs.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/i386/_structs.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/types.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int8_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int16_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int32_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int64_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int8_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int16_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int32_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int64_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_intptr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uintptr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_attr_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_sigaltstack.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ucontext.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_sigset_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_size_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uid_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/resource.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include/stdint.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/stdint.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint8_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint16_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint32_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint64_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_intmax_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uintmax_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_timeval.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/endian.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/endian.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_endian.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/_OSByteOrder.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/i386/_OSByteOrder.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/alloca.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ct_rune_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_rune_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_wchar_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_null.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/malloc/_malloc.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_dev_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_mode_t.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/stdio.h \ + /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include/stdarg.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_stdio.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_va_list.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/stdio.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_off_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ssize_t.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_stdio.h \ + /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_common.h \ + /opt/local/include/xc.h /opt/local/include/xc_version.h \ + /opt/local/include/xc_funcs.h /opt/local/include/xc_funcs_removed.h \ + /opt/local/include/xc_funcs.h + +libpaw.h: + +../../../config.h: + +../../../shared/common/src/incs/abi_common.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdlib.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/Availability.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/AvailabilityInternal.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_symbol_aliasing.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_posix_availability.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/wait.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_pid_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_id_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/signal.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/appleapiopts.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/signal.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/signal.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_mcontext.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/_mcontext.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/machine/_structs.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/i386/_structs.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/types.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int8_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int16_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int32_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int64_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int8_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int16_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int32_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_u_int64_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_intptr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uintptr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_attr_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_sigaltstack.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ucontext.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_sigset_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_size_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uid_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/resource.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include/stdint.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/stdint.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint8_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint16_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint32_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint64_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_intmax_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uintmax_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_timeval.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/endian.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/endian.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_endian.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/_OSByteOrder.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/i386/_OSByteOrder.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/alloca.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ct_rune_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_rune_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_wchar_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_null.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/malloc/_malloc.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_dev_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_mode_t.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include-fixed/stdio.h: + +/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/include/stdarg.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_stdio.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_va_list.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/stdio.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_off_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ssize_t.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_stdio.h: + +/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_common.h: + +/opt/local/include/xc.h: + +/opt/local/include/xc_version.h: + +/opt/local/include/xc_funcs.h: + +/opt/local/include/xc_funcs_removed.h: + +/opt/local/include/xc_funcs.h: diff --git a/GX-PAW/libpaw/src/Makefile b/GX-PAW/libpaw/src/Makefile new file mode 100644 index 00000000..0ef8fa97 --- /dev/null +++ b/GX-PAW/libpaw/src/Makefile @@ -0,0 +1,1594 @@ +# Makefile.in generated by automake 1.16.3 from Makefile.am. +# shared/libpaw/src/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994-2020 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-corelibs on 2024/03/16 21:07:38 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-corelibs script or its config file instead. +# + + + +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/abinit +pkgincludedir = $(includedir)/abinit +pkglibdir = $(libdir)/abinit +pkglibexecdir = $(libexecdir)/abinit +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = x86_64-apple-darwin18.7.0 +host_triplet = x86_64-apple-darwin18.7.0 +target_triplet = x86_64-apple-darwin18.7.0 +subdir = shared/libpaw/src +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/m4/arch-gpu.m4 \ + $(top_srcdir)/config/m4/arch-mpi.m4 \ + $(top_srcdir)/config/m4/auto-autotools.m4 \ + $(top_srcdir)/config/m4/auto-corelibs.m4 \ + $(top_srcdir)/config/m4/auto-debug.m4 \ + $(top_srcdir)/config/m4/auto-dirflags.m4 \ + $(top_srcdir)/config/m4/auto-env.m4 \ + $(top_srcdir)/config/m4/auto-hints.m4 \ + $(top_srcdir)/config/m4/auto-optim.m4 \ + $(top_srcdir)/config/m4/auto-options.m4 \ + $(top_srcdir)/config/m4/auto-output.m4 \ + $(top_srcdir)/config/m4/auto-triggers.m4 \ + $(top_srcdir)/config/m4/conf-atompaw.m4 \ + $(top_srcdir)/config/m4/conf-debug.m4 \ + $(top_srcdir)/config/m4/conf-fallbacks.m4 \ + $(top_srcdir)/config/m4/conf-files.m4 \ + $(top_srcdir)/config/m4/conf-init.m4 \ + $(top_srcdir)/config/m4/conf-openmp.m4 \ + $(top_srcdir)/config/m4/conf-optim.m4 \ + $(top_srcdir)/config/m4/lang-c++.m4 \ + $(top_srcdir)/config/m4/lang-c.m4 \ + $(top_srcdir)/config/m4/lang-fortran-import.m4 \ + $(top_srcdir)/config/m4/lang-fortran.m4 \ + $(top_srcdir)/config/m4/lang-python.m4 \ + $(top_srcdir)/config/m4/libxml2.m4 \ + $(top_srcdir)/config/m4/misc-display.m4 \ + $(top_srcdir)/config/m4/sd_abinit_common.m4 \ + $(top_srcdir)/config/m4/sd_arch_gpu.m4 \ + $(top_srcdir)/config/m4/sd_arch_mpi.m4 \ + $(top_srcdir)/config/m4/sd_bigdft.m4 \ + $(top_srcdir)/config/m4/sd_core.m4 \ + $(top_srcdir)/config/m4/sd_esl.m4 \ + $(top_srcdir)/config/m4/sd_fftw3.m4 \ + $(top_srcdir)/config/m4/sd_gpu_kokkos.m4 \ + $(top_srcdir)/config/m4/sd_gpu_yakl.m4 \ + $(top_srcdir)/config/m4/sd_io_hdf5.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf_fortran.m4 \ + $(top_srcdir)/config/m4/sd_levmar.m4 \ + $(top_srcdir)/config/m4/sd_libpaw.m4 \ + $(top_srcdir)/config/m4/sd_libpsml.m4 \ + $(top_srcdir)/config/m4/sd_libxc.m4 \ + $(top_srcdir)/config/m4/sd_math_fft.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_core.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_util.m4 \ + $(top_srcdir)/config/m4/sd_papi.m4 \ + $(top_srcdir)/config/m4/sd_pfft.m4 \ + $(top_srcdir)/config/m4/sd_triqs.m4 \ + $(top_srcdir)/config/m4/sd_wannier90.m4 \ + $(top_srcdir)/config/m4/sd_xmlf90.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +AM_V_AR = $(am__v_AR_$(V)) +am__v_AR_ = $(am__v_AR_$(AM_DEFAULT_VERBOSITY)) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = +lib39_libpaw_a_AR = $(AR) $(ARFLAGS) +lib39_libpaw_a_LIBADD = +am__objects_1 = libpaw_libxc.$(OBJEXT) m_libpaw_mpi.$(OBJEXT) \ + m_libpaw_tools.$(OBJEXT) m_libpaw_libxc.$(OBJEXT) \ + m_paral_atom.$(OBJEXT) m_paw_numeric.$(OBJEXT) \ + m_paw_sphharm.$(OBJEXT) m_paw_io.$(OBJEXT) m_pawang.$(OBJEXT) \ + m_pawrad.$(OBJEXT) m_pawtab.$(OBJEXT) m_paw_an.$(OBJEXT) \ + m_paw_ij.$(OBJEXT) m_pawfgrtab.$(OBJEXT) \ + m_paw_finegrid.$(OBJEXT) m_paw_onsite.$(OBJEXT) \ + m_pawcprj.$(OBJEXT) m_pawrhoij.$(OBJEXT) m_pawdij.$(OBJEXT) \ + m_pawxc.$(OBJEXT) m_paw_atom.$(OBJEXT) \ + m_paw_gaussfit.$(OBJEXT) m_pawxmlps.$(OBJEXT) \ + m_pawpsp.$(OBJEXT) +am_lib39_libpaw_a_OBJECTS = $(am__objects_1) +lib39_libpaw_a_OBJECTS = $(am_lib39_libpaw_a_OBJECTS) +AM_V_P = $(am__v_P_$(V)) +am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY)) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I. -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/config/gnu/depcomp +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/libpaw_libxc.Po +am__mv = mv -f +PPFCCOMPILE = $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) +AM_V_PPFC = $(am__v_PPFC_$(V)) +am__v_PPFC_ = $(am__v_PPFC_$(AM_DEFAULT_VERBOSITY)) +am__v_PPFC_0 = @echo " PPFC " $@; +am__v_PPFC_1 = +FCLD = $(FC) +FCLINK = $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \ + $@ +AM_V_FCLD = $(am__v_FCLD_$(V)) +am__v_FCLD_ = $(am__v_FCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_FCLD_0 = @echo " FCLD " $@; +am__v_FCLD_1 = +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(lib39_libpaw_a_SOURCES) +DIST_SOURCES = $(lib39_libpaw_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +HEADERS = $(noinst_HEADERS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in \ + $(top_srcdir)/config/gnu/depcomp +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ABINIT_BINARY_PACKAGE = abinit-10.0.0.83-58be4d_x86_64_darwin18.7.0_gnu9.4 +ABINIT_COMMON_CPPFLAGS = +ABINIT_COMMON_FCFLAGS = +ABINIT_COMMON_LDFLAGS = +ABINIT_COMMON_LIBS = +ABINIT_TARGET = x86_64_darwin18.7.0_gnu9.4 +ABINIT_VERSION = 10.0.0.83-58be4d +ABINIT_VERSION_BASE = 10.0 +ABINIT_VERSION_BUILD = 20240316 +ABINIT_VERSION_MAJOR = 10 +ABINIT_VERSION_MICRO = 0 +ABINIT_VERSION_MINOR = 0 +ABI_CPPFLAGS = -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include +ACLOCAL = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' aclocal-1.16 +AMTAR = $${TAR-tar} +AM_DEFAULT_VERBOSITY = 1 +AR = ar +ARFLAGS = rc +ARFLAGS_CMD = rc +ARFLAGS_DEBUG = +ARFLAGS_EXTRA = +ARFLAGS_HINTS = +ARFLAGS_OPTIM = +ATOMPAW_BIN = +AUTOCONF = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' autoconf +AUTOHEADER = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' autoheader +AUTOMAKE = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' automake-1.16 +AWK = awk +BIGDFT_CPPFLAGS = +BIGDFT_FCFLAGS = +BIGDFT_LDFLAGS = +BIGDFT_LIBS = +BOURNE_SHELL = /bin/sh +CC = /opt/local/bin/mpicc +CCDEPMODE = depmode=gcc3 +CC_LDFLAGS = +CC_LDFLAGS_DEBUG = +CC_LDFLAGS_EXTRA = +CC_LDFLAGS_GPU = +CC_LDFLAGS_HINTS = +CC_LDFLAGS_OPTIM = +CC_LIBS = +CC_LIBS_DEBUG = +CC_LIBS_EXTRA = +CC_LIBS_GPU = +CC_LIBS_HINTS = +CC_LIBS_OPTIM = +CFLAGS = -O2 -g +CFLAGS_DEBUG = +CFLAGS_EXTRA = +CFLAGS_GPU = +CFLAGS_HINTS = +CFLAGS_OPTIM = +CPP = /opt/local/bin/mpicc -E +CPPFLAGS = +CPPFLAGS_DEBUG = +CPPFLAGS_EXTRA = +CPPFLAGS_GPU = +CPPFLAGS_HINTS = +CPPFLAGS_HINTS_EXT = -P -std=c99 +CPPFLAGS_OPTIM = +CXX = /opt/local/bin/mpicxx +CXXDEPMODE = depmode=gcc3 +CXXFLAGS = -O2 -g +CXXFLAGS_DEBUG = +CXXFLAGS_EXTRA = +CXXFLAGS_GPU = +CXXFLAGS_HINTS = +CXXFLAGS_OPTIM = +CXX_LDFLAGS = +CXX_LDFLAGS_DEBUG = +CXX_LDFLAGS_EXTRA = +CXX_LDFLAGS_GPU = +CXX_LDFLAGS_HINTS = +CXX_LDFLAGS_OPTIM = +CXX_LIBS = +CXX_LIBS_DEBUG = +CXX_LIBS_EXTRA = +CXX_LIBS_GPU = +CXX_LIBS_HINTS = +CXX_LIBS_OPTIM = +CYGPATH_W = echo +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +ECHO_C = \c +ECHO_N = +ECHO_T = +EGREP = /usr/bin/grep -E +EXEEXT = +F77 = /opt/local/bin/mpif90 +FC = /opt/local/bin/mpif90 +FCFLAGS = -O2 -g -ffree-line-length-none -I/opt/local/include -I/opt/local/include -I/opt/local/include +FCFLAGS_DEBUG = +FCFLAGS_EXTRA = +FCFLAGS_F90 = +FCFLAGS_FIXEDFORM = -ffixed-form +FCFLAGS_FREEFORM = -ffree-form +FCFLAGS_HINTS = -ffree-line-length-none +FCFLAGS_MODDIR = -J../mods +FCFLAGS_OPENMP = +FCFLAGS_OPENMP_OFFLOAD = +FCFLAGS_OPTIM = +FCLIBS = -L/opt/local/lib -L/opt/local/lib/openmpi-gcc9 -L/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0 -L/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.4.0/../../.. -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi -lgfortran -lquadmath -lm +FC_LDFLAGS = +FC_LDFLAGS_DEBUG = +FC_LDFLAGS_EXTRA = +FC_LDFLAGS_HINTS = +FC_LDFLAGS_OPTIM = +FC_LIBS = +FC_LIBS_DEBUG = +FC_LIBS_EXTRA = +FC_LIBS_HINTS = +FC_LIBS_OPTIM = +FC_NOWRAP = /opt/local/bin/mpif90 +FFLAGS = -O2 -g -ffree-line-length-none -I/opt/local/include -I/opt/local/include -I/opt/local/include +FFTW3_CFLAGS = +FFTW3_CPPFLAGS = -I/opt/local/include +FFTW3_FCFLAGS = -I/opt/local/include +FFTW3_LDFLAGS = +FFTW3_LIBS = -L/opt/local/lib -lfftw3 -lfftw3f +FFT_CFLAGS = +FFT_FCFLAGS = +FPP = +FPPFLAGS = +FPPFLAGS_DEBUG = +FPPFLAGS_EXTRA = +FPPFLAGS_HINTS = +FPPFLAGS_OPTIM = +GPU_ARCH = +GPU_CFLAGS = +GPU_CPPFLAGS = +GPU_CXXFLAGS = +GPU_FCFLAGS = +GPU_LDFLAGS = +GPU_LIBS = +GRAPHATOM_BIN = +GREP = /usr/bin/grep +H5CC = +HDF5_CFLAGS = +HDF5_CPPFLAGS = +HDF5_CXXFLAGS = +HDF5_FCFLAGS = +HDF5_LDFLAGS = +HDF5_LIBS = +INSTALL = /opt/local/libexec/gnubin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +KOKKOS_CPPFLAGS = +KOKKOS_CXXFLAGS = +KOKKOS_LDFLAGS = +KOKKOS_LIBS = +LDFLAGS = +LEVMAR_CFLAGS = +LEVMAR_CPPFLAGS = +LEVMAR_LDFLAGS = +LEVMAR_LIBS = +LIBOBJS = +LIBPAW_CPPFLAGS = +LIBPAW_FCFLAGS = +LIBPAW_LDFLAGS = +LIBPAW_LIBS = +LIBPSML_CPPFLAGS = +LIBPSML_FCFLAGS = +LIBPSML_LDFLAGS = +LIBPSML_LIBS = +LIBS = -L/opt/local/lib -lwannier -L/opt/local/lib -lxc -L/opt/local/lib -lnetcdff -L/opt/local/lib -lnetcdf -L/opt/local/lib -L/opt/local/lib -lhdf5_hl -L/opt/local/lib -lhdf5 -lz -ldl -lm -L/opt/local/lib -lfftw3 -lfftw3f +LIBXC_CFLAGS = +LIBXC_CPPFLAGS = +LIBXC_FCFLAGS = +LIBXC_LDFLAGS = +LIBXC_LIBS = +LIBXML2_CPPFLAGS = +LIBXML2_FCFLAGS = +LIBXML2_LIBS = +LINALG_CFLAGS = +LINALG_CPPFLAGS = +LINALG_CXXFLAGS = +LINALG_FCFLAGS = -I/opt/local/include +LINALG_LDFLAGS = +LINALG_LIBS = -L/opt/local/lib -lopenblas +LN_S = ln -s +LTLIBOBJS = +MAKEINFO = ${SHELL} '/Users/gonze/_Research/ABINIT_git/gonze/config/gnu/missing' makeinfo +MKDIR_P = /opt/local/libexec/gnubin/mkdir -p +MODEXT = mod +MPI_CFLAGS = +MPI_CPPFLAGS = +MPI_CXXFLAGS = +MPI_FCFLAGS = +MPI_LDFLAGS = +MPI_LIBS = +MV = /opt/local/libexec/gnubin/mv +NETCDF_CFLAGS = +NETCDF_CPPFLAGS = +NETCDF_CXXFLAGS = +NETCDF_FCFLAGS = +NETCDF_FORTRAN_CFLAGS = +NETCDF_FORTRAN_CPPFLAGS = +NETCDF_FORTRAN_CXXFLAGS = +NETCDF_FORTRAN_FCFLAGS = +NETCDF_FORTRAN_LDFLAGS = +NETCDF_FORTRAN_LIBS = +NETCDF_LDFLAGS = +NETCDF_LIBS = +NVCC = +NVCC_CFLAGS = +NVCC_CPPFLAGS = +NVCC_LDFLAGS = +NVCC_LIBS = +OBJEXT = o +PACKAGE = abinit +PACKAGE_BUGREPORT = https://bugs.launchpad.net/abinit/ +PACKAGE_NAME = ABINIT +PACKAGE_STRING = ABINIT 10.0.0.83-58be4d +PACKAGE_TARNAME = abinit +PACKAGE_URL = +PACKAGE_VERSION = 10.0.0.83-58be4d +PAPI_CFLAGS = +PAPI_CPPFLAGS = +PAPI_LDFLAGS = +PAPI_LIBS = +PATCH = patch +PATH_SEPARATOR = : +PERL = /usr/bin/perl +PFFT_CFLAGS = +PFFT_CPPFLAGS = +PFFT_LDFLAGS = +PFFT_LIBS = +PYFLAGS = +PYTHON = python3.9 +PYTHON_CONFIG = python3.9-config +PYTHON_CPPFLAGS = -I/opt/local/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -I/opt/local/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 +RANLIB = ranlib +REALPATH = realpath +RM = /opt/local/libexec/gnubin/rm +SED = /usr/bin/sed +SET_MAKE = +SHELL = /bin/sh +STRIP = +TAR = tar +TRIQS_CFLAGS = +TRIQS_CPPFLAGS = +TRIQS_CXXFLAGS = +TRIQS_LDFLAGS = +TRIQS_LIBS = +TRUE_CPP = cpp +VERSION = 10.0.0.83-58be4d +WANNIER90_CPPFLAGS = +WANNIER90_FCFLAGS = -I/opt/local/include +WANNIER90_LDFLAGS = +WANNIER90_LIBS = -L/opt/local/lib -lwannier +XML2_CONFIG = +XMLF90_CPPFLAGS = +XMLF90_FCFLAGS = +XMLF90_LDFLAGS = +XMLF90_LIBS = +XML_CPPFLAGS = +XML_LIBS = +XPP = +XPPFLAGS = +XPPFLAGS_DEBUG = +XPPFLAGS_EXTRA = +XPPFLAGS_OPTIM = +YAKL_CPPFLAGS = +YAKL_FCFLAGS = +YAKL_LDFLAGS = +YAKL_LIBS = +abi_ac_distcheck = --with-config-file="/Users/gonze/_Research/ABINIT_git/gonze/mac-1P0-225.ac9" +abi_ac_version = 027100 +abi_am_version = 011603 +abi_avx_safe_mode_enable = no +abi_bse_unpacked_enable = no +abi_cc_path = +abi_cc_vendor = gnu +abi_cc_version = 9.4 +abi_cclock_enable = no +abi_cpp_path = +abi_cpu_64bits = yes +abi_cpu_bits = 64 +abi_cpu_model = unknown +abi_cpu_platform = apple +abi_cpu_spec = unknown_unknown +abi_cpu_vendor = unknown +abi_crpa_optim_enable = no +abi_cxx_path = +abi_cxx_vendor = gnu +abi_cxx_version = 9.4 +abi_debug_flavor = basic +abi_exports_enable = no +abi_fbk_abinit_common_ok = no +abi_fbk_bigdft_ok = disabled +abi_fbk_config = +abi_fbk_enable = no +abi_fbk_fft_ok = no +abi_fbk_fftw3_ok = no +abi_fbk_gpu_ok = no +abi_fbk_hdf5_ok = disabled +abi_fbk_init = def +abi_fbk_kokkos_ok = no +abi_fbk_levmar_ok = no +abi_fbk_libpaw_ok = no +abi_fbk_libpsml_ok = disabled +abi_fbk_libxc_ok = disabled +abi_fbk_libxml2_ok = no +abi_fbk_linalg_ok = disabled +abi_fbk_list = +abi_fbk_mpi_ok = no +abi_fbk_netcdf_fortran_ok = disabled +abi_fbk_netcdf_ok = disabled +abi_fbk_papi_ok = no +abi_fbk_pfft_ok = no +abi_fbk_prefix = +abi_fbk_required = +abi_fbk_triqs_ok = no +abi_fbk_wannier90_ok = disabled +abi_fbk_xmlf90_ok = disabled +abi_fbk_yakl_ok = no +abi_fc_path = +abi_fc_vendor = gnu +abi_fc_version = 9.4 +abi_fc_wrap = no +abi_fc_wrapper_enable = no +abi_fpp_path = +abi_gpu_arch = +abi_gpu_fcflags = +abi_gpu_flavor = none +abi_gpu_hip_libdir = +abi_gpu_incs = +abi_gpu_ldflags = +abi_gpu_libs = +abi_gpu_nvtx_v3 = +abi_gpu_roctx = +abi_gw_dpc_enable = yes +abi_hints_enable = yes +abi_libtetra_enable = yes +abi_libxml2_cppflags = +abi_libxml2_enable = no +abi_libxml2_fcflags = +abi_libxml2_init = def +abi_libxml2_ldflags = +abi_libxml2_libs = +abi_libxml2_ok = unknown +abi_libxml2_prefix = +abi_lotf_enable = no +abi_lt_version = 020406 +abi_m4_version = 010419 +abi_memory_profiling_enable = no +abi_mpi_cflags = +abi_mpi_cppflags = +abi_mpi_cxxflags = +abi_mpi_enable = yes +abi_mpi_fcflags = +abi_mpi_flavor = auto +abi_mpi_gpu_aware_enable = no +abi_mpi_incs = +abi_mpi_inplace_enable = yes +abi_mpi_interfaces_bugfix_enable = no +abi_mpi_io_default_enable = no +abi_mpi_io_enable = yes +abi_mpi_ldflags = +abi_mpi_level = 2 +abi_mpi_libs = +abi_netcdf_default_enable = no +abi_openmp_enable = no +abi_openmp_offload_enable = no +abi_optim_flavor = standard +abi_python_invocation_enable = no +abi_source_debug_enable = no +abi_stdin_enable = yes +abi_sys_spec = darwin-x86_64 +abi_timer_enable = yes +abi_triqs_v1_4_enable = no +abi_triqs_v2_0_enable = no +abi_zdot_bugfix_enable = no +abinit_bindir = /usr/local/bin +abinit_builddir = /Users/gonze/_Research/ABINIT_git/gonze +abinit_chkdir = /usr/local/share/abinit/tests +abinit_datdir = /usr/local/share/abinit +abinit_docdir = /usr/local/doc/abinit +abinit_incdir = /usr/local/include +abinit_libdir = /usr/local/lib +abinit_mandir = /usr/local/share/man +abinit_prefix = /usr/local +abinit_srcdir = /Users/gonze/_Research/ABINIT_git/gonze +abs_builddir = /Users/gonze/_Research/ABINIT_git/gonze/shared/libpaw/src +abs_srcdir = /Users/gonze/_Research/ABINIT_git/gonze/shared/libpaw/src +abs_top_builddir = /Users/gonze/_Research/ABINIT_git/gonze +abs_top_srcdir = /Users/gonze/_Research/ABINIT_git/gonze +ac_ct_CC = +ac_ct_CXX = +ac_ct_FC = +am__include = include +am__leading_dot = . +am__quote = +am__tar = tar --format=ustar -chf - "$$tardir" +am__untar = tar -xf - +bindir = ${exec_prefix}/bin +build = x86_64-apple-darwin18.7.0 +build_alias = +build_cpu = x86_64 +build_os = darwin18.7.0 +build_vendor = apple +builddir = . +cc_info_string = gcc-mp-9 (MacPorts gcc9 9.4.0_0) 9.4.0 +cxx_info_string = g++-mp-9 (MacPorts gcc9 9.4.0_0) 9.4.0 +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +enable_avx_safe_mode = +enable_bse_unpacked = +enable_cclock = +enable_crpa_optim = +enable_exports = +enable_fc_wrapper = +enable_gw_dpc = yes +enable_hints = +enable_libtetra = +enable_lotf = +enable_memory_profiling = +enable_mpi_gpu_aware = +enable_mpi_inplace = +enable_mpi_interfaces_bugfix = +enable_mpi_io = yes +enable_mpi_io_default = +enable_netcdf_default = +enable_openmp = +enable_openmp_offload = +enable_python_invocation = +enable_shared = +enable_source_debug = +enable_static = +enable_stdin = +enable_timer = +enable_triqs_v1_4 = +enable_triqs_v2_0 = +enable_zdot_bugfix = +exec_prefix = ${prefix} +fc_info_string = GNU Fortran (MacPorts gcc9 9.4.0_0) 9.4.0 +fc_mod_fcflags = +fc_timing = standard +fcflags_opt_02_clib = +fcflags_opt_10_defs = +fcflags_opt_11_memory_mpi = +fcflags_opt_12_hide_mpi = +fcflags_opt_14_hidewrite = +fcflags_opt_16_hideleave = +fcflags_opt_16_kokkos_toolbox = +fcflags_opt_17_gpu_toolbox = +fcflags_opt_17_libtetra_ext = +fcflags_opt_17_minimax = +fcflags_opt_17_yaml_out = +fcflags_opt_18_timing = +fcflags_opt_21_hashfuncs = +fcflags_opt_27_toolbox_oop = +fcflags_opt_28_numeric_noabirule = +fcflags_opt_29_kpoints = +fcflags_opt_32_util = +fcflags_opt_33_xc_lowlevel = +fcflags_opt_39_libpaw = +fcflags_opt_41_geometry = +fcflags_opt_42_nlstrain = +fcflags_opt_42_parser = +fcflags_opt_43_ptgroups = -O0 +fcflags_opt_43_wvl_wrappers = +fcflags_opt_44_abitools = +fcflags_opt_44_abitypes_defs = +fcflags_opt_44_manage_kokkos = +fcflags_opt_45_geomoptim = +fcflags_opt_45_xgTools = +fcflags_opt_46_ghc_omp = +fcflags_opt_46_manage_cuda = +fcflags_opt_48_diago = +fcflags_opt_49_gw_toolbox_oop = +fcflags_opt_51_manage_mpi = +fcflags_opt_52_fft_mpi_noabirule = +fcflags_opt_53_ffts = +fcflags_opt_54_spacepar = +fcflags_opt_55_abiutil = +fcflags_opt_56_io_mpi = +fcflags_opt_56_mixing = +fcflags_opt_56_recipspace = +fcflags_opt_56_xc = +fcflags_opt_57_iopsp_parser = +fcflags_opt_57_iovars = +fcflags_opt_61_occeig = +fcflags_opt_62_cg_noabirule = +fcflags_opt_62_ctqmc = +fcflags_opt_62_iowfdenpot = +fcflags_opt_62_poisson = +fcflags_opt_62_wvl_wfs = +fcflags_opt_64_psp = +fcflags_opt_65_lotf_base = +fcflags_opt_65_paw = +fcflags_opt_66_nonlocal = +fcflags_opt_66_vdwxc = +fcflags_opt_66_wfs = +fcflags_opt_67_common = +fcflags_opt_67_python_invocation_ext = +fcflags_opt_67_triqs_ext = +fcflags_opt_68_dmft = +fcflags_opt_68_lotf = +fcflags_opt_68_recursion = +fcflags_opt_68_rsprc = +fcflags_opt_69_wfdesc = +fcflags_opt_70_gw = +fcflags_opt_71_bse = +fcflags_opt_71_wannier = +fcflags_opt_72_response = +fcflags_opt_77_ddb = +fcflags_opt_77_suscep = +fcflags_opt_78_effpot = +fcflags_opt_78_eph = +fcflags_opt_79_seqpar_mpi = +fcflags_opt_80_rttddft = +fcflags_opt_80_tdep = +fcflags_opt_94_scfcv = +fcflags_opt_95_drive = +fcflags_opt_98_main = +fcflags_opt_bigdft = +fcflags_opt_default = +fcflags_opt_hdf5 = +fcflags_opt_levmar = +fcflags_opt_libpsml = +fcflags_opt_libxc = +fcflags_opt_libxml2 = +fcflags_opt_linalg = +fcflags_opt_netcdf = +fcflags_opt_netcdf_fortran = +fcflags_opt_papi = +fcflags_opt_triqs = +fcflags_opt_wannier90 = +fcflags_opt_xmlf90 = +host = x86_64-apple-darwin18.7.0 +host_alias = +host_cpu = x86_64 +host_os = darwin18.7.0 +host_vendor = apple +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = ${SHELL} /Users/gonze/_Research/ABINIT_git/gonze/config/gnu/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = ${datarootdir}/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = $(MKDIR_P) +oldincludedir = /usr/include +pdfdir = ${docdir} +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +runstatedir = ${localstatedir}/run +sbindir = ${exec_prefix}/sbin +sd_abinit_common_cppflags = +sd_abinit_common_enable = no +sd_abinit_common_enable_def = no +sd_abinit_common_fcflags = +sd_abinit_common_init = def +sd_abinit_common_ldflags = +sd_abinit_common_libs = +sd_abinit_common_ok = unknown +sd_abinit_common_options = optional skip +sd_abinit_common_policy = skip +sd_abinit_common_status = optional +sd_bigdft_cppflags = +sd_bigdft_enable = no +sd_bigdft_enable_def = no +sd_bigdft_fcflags = +sd_bigdft_init = def +sd_bigdft_ldflags = +sd_bigdft_libs = +sd_bigdft_ok = unknown +sd_bigdft_options = optional warn +sd_bigdft_policy = warn +sd_bigdft_status = optional +sd_fft_cflags = +sd_fft_choices = +sd_fft_cppflags = -I/opt/local/include +sd_fft_cxxflags = +sd_fft_enable = yes +sd_fft_fcflags = -I/opt/local/include +sd_fft_flavor = fftw3 +sd_fft_init = kwd +sd_fft_ldflags = +sd_fft_libs = -L/opt/local/lib -lfftw3 -lfftw3f +sd_fft_ok = yes +sd_fftw3_cflags = +sd_fftw3_cppflags = -I/opt/local/include +sd_fftw3_enable = yes +sd_fftw3_enable_def = no +sd_fftw3_fcflags = -I/opt/local/include +sd_fftw3_init = env +sd_fftw3_ldflags = +sd_fftw3_libs = -L/opt/local/lib -lfftw3 -lfftw3f +sd_fftw3_ok = yes +sd_fftw3_options = optional skip +sd_fftw3_policy = skip +sd_fftw3_status = optional +sd_gpu_cflags = +sd_gpu_cppflags = +sd_gpu_cxxflags = +sd_gpu_enable = no +sd_gpu_enable_def = no +sd_gpu_fcflags = +sd_gpu_init = def +sd_gpu_ldflags = +sd_gpu_libs = +sd_gpu_ok = no +sd_gpu_options = optional warn +sd_gpu_policy = warn +sd_gpu_prefix = +sd_gpu_status = optional +sd_hdf5_cflags = +sd_hdf5_cppflags = -I/opt/local/include -I/opt/local/include +sd_hdf5_cxxflags = +sd_hdf5_enable = yes +sd_hdf5_enable_def = yes +sd_hdf5_enable_fc = no +sd_hdf5_fcflags = +sd_hdf5_h5cc = /opt/local/bin/h5cc +sd_hdf5_h5fc = +sd_hdf5_init = dir +sd_hdf5_ldflags = +sd_hdf5_libs = -L/opt/local/lib -L/opt/local/lib -lhdf5_hl -L/opt/local/lib -lhdf5 -lz -ldl -lm +sd_hdf5_ok = yes +sd_hdf5_options = required no-fortran warn +sd_hdf5_policy = warn +sd_hdf5_status = required +sd_kokkos_cppflags = +sd_kokkos_cxxflags = +sd_kokkos_enable = no +sd_kokkos_enable_def = no +sd_kokkos_init = def +sd_kokkos_ldflags = +sd_kokkos_libs = +sd_kokkos_ok = unknown +sd_kokkos_options = optional fail +sd_kokkos_policy = fail +sd_kokkos_status = optional +sd_levmar_cflags = +sd_levmar_cppflags = +sd_levmar_enable = no +sd_levmar_enable_def = no +sd_levmar_init = def +sd_levmar_ldflags = +sd_levmar_libs = +sd_levmar_ok = unknown +sd_levmar_options = optional fail +sd_levmar_policy = fail +sd_levmar_status = optional +sd_libpaw_cppflags = +sd_libpaw_enable = no +sd_libpaw_enable_def = no +sd_libpaw_fcflags = +sd_libpaw_init = def +sd_libpaw_ldflags = +sd_libpaw_libs = +sd_libpaw_ok = unknown +sd_libpaw_options = optional skip +sd_libpaw_policy = skip +sd_libpaw_status = optional +sd_libpsml_cppflags = +sd_libpsml_enable = no +sd_libpsml_enable_def = no +sd_libpsml_fcflags = +sd_libpsml_init = def +sd_libpsml_ldflags = +sd_libpsml_libs = +sd_libpsml_ok = unknown +sd_libpsml_options = optional warn +sd_libpsml_policy = warn +sd_libpsml_status = optional +sd_libxc_cflags = +sd_libxc_cppflags = -I/opt/local/include +sd_libxc_enable = yes +sd_libxc_enable_def = yes +sd_libxc_enable_fc = no +sd_libxc_fcflags = +sd_libxc_init = dir +sd_libxc_ldflags = +sd_libxc_libs = -L/opt/local/lib -lxc +sd_libxc_ok = yes +sd_libxc_options = required no-fortran warn +sd_libxc_policy = warn +sd_libxc_status = required +sd_linalg_cflags = +sd_linalg_choices = +sd_linalg_cppflags = +sd_linalg_cxxflags = +sd_linalg_enable = yes +sd_linalg_fcflags = -I/opt/local/include +sd_linalg_flavor = openblas +sd_linalg_has_elpa = no +sd_linalg_has_scalapack = no +sd_linalg_init = env +sd_linalg_ldflags = +sd_linalg_libs = -L/opt/local/lib -lopenblas +sd_linalg_ok = yes +sd_mpi_cc = /opt/local/bin/mpicc +sd_mpi_cflags = +sd_mpi_cppflags = -I/opt/local/include +sd_mpi_cxx = /opt/local/bin/mpicxx +sd_mpi_enable = yes +sd_mpi_enable_cxx = yes +sd_mpi_enable_def = auto +sd_mpi_enable_fc = yes +sd_mpi_fc = /opt/local/bin/mpif90 +sd_mpi_fcflags = -I/opt/local/include +sd_mpi_init = dir +sd_mpi_ldflags = +sd_mpi_libs = +sd_mpi_ok = yes +sd_mpi_options = auto optional fail +sd_mpi_policy = fail +sd_mpi_status = optional +sd_netcdf_cflags = +sd_netcdf_cppflags = -I/opt/local/include +sd_netcdf_enable = yes +sd_netcdf_enable_def = yes +sd_netcdf_fcflags = -I/opt/local/include +sd_netcdf_fortran_cflags = +sd_netcdf_fortran_cppflags = -I/opt/local/include +sd_netcdf_fortran_enable = yes +sd_netcdf_fortran_enable_def = yes +sd_netcdf_fortran_fcflags = -I/opt/local/include +sd_netcdf_fortran_init = dir +sd_netcdf_fortran_ldflags = +sd_netcdf_fortran_libs = -L/opt/local/lib -lnetcdff +sd_netcdf_fortran_ok = yes +sd_netcdf_fortran_options = required warn +sd_netcdf_fortran_policy = warn +sd_netcdf_fortran_status = required +sd_netcdf_init = dir +sd_netcdf_ldflags = +sd_netcdf_libs = -L/opt/local/lib -lnetcdf +sd_netcdf_ok = yes +sd_netcdf_options = required warn +sd_netcdf_policy = warn +sd_netcdf_status = required +sd_papi_cflags = +sd_papi_cppflags = +sd_papi_enable = no +sd_papi_enable_def = no +sd_papi_init = def +sd_papi_ldflags = +sd_papi_libs = +sd_papi_ok = unknown +sd_papi_options = optional fail +sd_papi_policy = fail +sd_papi_sd_papi_fcflags = +sd_papi_status = optional +sd_pfft_cflags = +sd_pfft_cppflags = +sd_pfft_enable = no +sd_pfft_enable_def = no +sd_pfft_init = def +sd_pfft_ldflags = +sd_pfft_libs = +sd_pfft_ok = unknown +sd_pfft_options = optional skip +sd_pfft_policy = skip +sd_pfft_status = optional +sd_sys_fcflags = +sd_triqs_cflags = +sd_triqs_cppflags = +sd_triqs_cxxflags = +sd_triqs_enable = no +sd_triqs_enable_def = no +sd_triqs_fcflags = +sd_triqs_init = def +sd_triqs_ldflags = +sd_triqs_libs = +sd_triqs_ok = unknown +sd_triqs_options = optional fail +sd_triqs_policy = fail +sd_triqs_status = optional +sd_wannier90_cppflags = +sd_wannier90_enable = yes +sd_wannier90_enable_def = no +sd_wannier90_fcflags = -I/opt/local/include +sd_wannier90_init = env +sd_wannier90_ldflags = +sd_wannier90_libs = -L/opt/local/lib -lwannier +sd_wannier90_ok = yes +sd_wannier90_options = optional warn +sd_wannier90_policy = warn +sd_wannier90_status = optional +sd_xmlf90_cppflags = +sd_xmlf90_enable = no +sd_xmlf90_enable_def = no +sd_xmlf90_fcflags = +sd_xmlf90_init = def +sd_xmlf90_ldflags = +sd_xmlf90_libs = +sd_xmlf90_ok = unknown +sd_xmlf90_options = optional warn +sd_xmlf90_policy = warn +sd_xmlf90_status = optional +sd_yakl_cppflags = +sd_yakl_enable = no +sd_yakl_enable_def = no +sd_yakl_fcflags = +sd_yakl_init = def +sd_yakl_ldflags = +sd_yakl_libs = +sd_yakl_ok = unknown +sd_yakl_options = optional fail +sd_yakl_policy = fail +sd_yakl_status = optional +sharedstatedir = ${prefix}/com +src_02_clib_fcflags = -I$(top_builddir)/shared/common/src/02_clib -I$(top_srcdir)/shared/common/src/02_clib +src_10_defs_fcflags = -I$(top_builddir)/shared/common/src/10_defs -I$(top_srcdir)/shared/common/src/10_defs +src_11_memory_mpi_fcflags = -I$(top_builddir)/shared/common/src/11_memory_mpi -I$(top_srcdir)/shared/common/src/11_memory_mpi +src_12_hide_mpi_fcflags = -I$(top_builddir)/shared/common/src/12_hide_mpi -I$(top_srcdir)/shared/common/src/12_hide_mpi +src_14_hidewrite_fcflags = -I$(top_builddir)/shared/common/src/14_hidewrite -I$(top_srcdir)/shared/common/src/14_hidewrite +src_16_hideleave_fcflags = -I$(top_builddir)/shared/common/src/16_hideleave -I$(top_srcdir)/shared/common/src/16_hideleave +src_16_kokkos_toolbox_fcflags = -I$(top_builddir)/shared/common/src/16_kokkos_toolbox -I$(top_srcdir)/shared/common/src/16_kokkos_toolbox +src_17_gpu_toolbox_fcflags = -I$(top_builddir)/shared/common/src/17_gpu_toolbox -I$(top_srcdir)/shared/common/src/17_gpu_toolbox +src_17_libtetra_ext_fcflags = -I$(top_builddir)/shared/common/src/17_libtetra_ext -I$(top_srcdir)/shared/common/src/17_libtetra_ext +src_17_minimax_fcflags = -I$(top_builddir)/shared/common/src/17_minimax -I$(top_srcdir)/shared/common/src/17_minimax +src_17_yaml_out_fcflags = -I$(top_builddir)/shared/common/src/17_yaml_out -I$(top_srcdir)/shared/common/src/17_yaml_out +src_18_timing_fcflags = -I$(top_builddir)/shared/common/src/18_timing -I$(top_srcdir)/shared/common/src/18_timing +src_21_hashfuncs_fcflags = -I$(top_builddir)/shared/common/src/21_hashfuncs -I$(top_srcdir)/shared/common/src/21_hashfuncs +src_27_toolbox_oop_fcflags = -I$(top_builddir)/shared/common/src/27_toolbox_oop -I$(top_srcdir)/shared/common/src/27_toolbox_oop +src_28_numeric_noabirule_fcflags = -I$(top_builddir)/shared/common/src/28_numeric_noabirule -I$(top_srcdir)/shared/common/src/28_numeric_noabirule +src_29_kpoints_fcflags = -I$(top_builddir)/shared/common/src/29_kpoints -I$(top_srcdir)/shared/common/src/29_kpoints +src_32_util_fcflags = -I$(top_builddir)/shared/common/src/32_util -I$(top_srcdir)/shared/common/src/32_util +src_33_xc_lowlevel_fcflags = -I$(top_builddir)/shared/common/src/33_xc_lowlevel -I$(top_srcdir)/shared/common/src/33_xc_lowlevel +src_39_libpaw_fcflags = -I$(top_builddir)/shared/libpaw/src -I$(top_srcdir)/shared/libpaw/src +src_41_geometry_fcflags = -I$(top_builddir)/src/41_geometry -I$(top_srcdir)/src/41_geometry +src_42_nlstrain_fcflags = -I$(top_builddir)/src/42_nlstrain -I$(top_srcdir)/src/42_nlstrain +src_42_parser_fcflags = -I$(top_builddir)/src/42_parser -I$(top_srcdir)/src/42_parser +src_43_ptgroups_fcflags = -I$(top_builddir)/src/43_ptgroups -I$(top_srcdir)/src/43_ptgroups +src_43_wvl_wrappers_fcflags = -I$(top_builddir)/src/43_wvl_wrappers -I$(top_srcdir)/src/43_wvl_wrappers +src_44_abitools_fcflags = -I$(top_builddir)/src/44_abitools -I$(top_srcdir)/src/44_abitools +src_44_abitypes_defs_fcflags = -I$(top_builddir)/src/44_abitypes_defs -I$(top_srcdir)/src/44_abitypes_defs +src_44_manage_kokkos_fcflags = -I$(top_builddir)/src/44_manage_kokkos -I$(top_srcdir)/src/44_manage_kokkos +src_45_geomoptim_fcflags = -I$(top_builddir)/src/45_geomoptim -I$(top_srcdir)/src/45_geomoptim +src_45_xgTools_fcflags = -I$(top_builddir)/src/45_xgTools -I$(top_srcdir)/src/45_xgTools +src_46_ghc_omp_fcflags = -I$(top_builddir)/src/46_ghc_omp -I$(top_srcdir)/src/46_ghc_omp +src_46_manage_cuda_fcflags = -I$(top_builddir)/src/46_manage_cuda -I$(top_srcdir)/src/46_manage_cuda +src_48_diago_fcflags = -I$(top_builddir)/src/48_diago -I$(top_srcdir)/src/48_diago +src_49_gw_toolbox_oop_fcflags = -I$(top_builddir)/src/49_gw_toolbox_oop -I$(top_srcdir)/src/49_gw_toolbox_oop +src_51_manage_mpi_fcflags = -I$(top_builddir)/src/51_manage_mpi -I$(top_srcdir)/src/51_manage_mpi +src_52_fft_mpi_noabirule_fcflags = -I$(top_builddir)/src/52_fft_mpi_noabirule -I$(top_srcdir)/src/52_fft_mpi_noabirule +src_53_ffts_fcflags = -I$(top_builddir)/src/53_ffts -I$(top_srcdir)/src/53_ffts +src_54_spacepar_fcflags = -I$(top_builddir)/src/54_spacepar -I$(top_srcdir)/src/54_spacepar +src_55_abiutil_fcflags = -I$(top_builddir)/src/55_abiutil -I$(top_srcdir)/src/55_abiutil +src_56_io_mpi_fcflags = -I$(top_builddir)/src/56_io_mpi -I$(top_srcdir)/src/56_io_mpi +src_56_mixing_fcflags = -I$(top_builddir)/src/56_mixing -I$(top_srcdir)/src/56_mixing +src_56_recipspace_fcflags = -I$(top_builddir)/src/56_recipspace -I$(top_srcdir)/src/56_recipspace +src_56_xc_fcflags = -I$(top_builddir)/src/56_xc -I$(top_srcdir)/src/56_xc +src_57_iopsp_parser_fcflags = -I$(top_builddir)/src/57_iopsp_parser -I$(top_srcdir)/src/57_iopsp_parser +src_57_iovars_fcflags = -I$(top_builddir)/src/57_iovars -I$(top_srcdir)/src/57_iovars +src_61_occeig_fcflags = -I$(top_builddir)/src/61_occeig -I$(top_srcdir)/src/61_occeig +src_62_cg_noabirule_fcflags = -I$(top_builddir)/src/62_cg_noabirule -I$(top_srcdir)/src/62_cg_noabirule +src_62_ctqmc_fcflags = -I$(top_builddir)/src/62_ctqmc -I$(top_srcdir)/src/62_ctqmc +src_62_iowfdenpot_fcflags = -I$(top_builddir)/src/62_iowfdenpot -I$(top_srcdir)/src/62_iowfdenpot +src_62_poisson_fcflags = -I$(top_builddir)/src/62_poisson -I$(top_srcdir)/src/62_poisson +src_62_wvl_wfs_fcflags = -I$(top_builddir)/src/62_wvl_wfs -I$(top_srcdir)/src/62_wvl_wfs +src_64_psp_fcflags = -I$(top_builddir)/src/64_psp -I$(top_srcdir)/src/64_psp +src_65_lotf_base_fcflags = -I$(top_builddir)/src/65_lotf_base -I$(top_srcdir)/src/65_lotf_base +src_65_paw_fcflags = -I$(top_builddir)/src/65_paw -I$(top_srcdir)/src/65_paw +src_66_nonlocal_fcflags = -I$(top_builddir)/src/66_nonlocal -I$(top_srcdir)/src/66_nonlocal +src_66_vdwxc_fcflags = -I$(top_builddir)/src/66_vdwxc -I$(top_srcdir)/src/66_vdwxc +src_66_wfs_fcflags = -I$(top_builddir)/src/66_wfs -I$(top_srcdir)/src/66_wfs +src_67_common_fcflags = -I$(top_builddir)/src/67_common -I$(top_srcdir)/src/67_common +src_67_python_invocation_ext_fcflags = -I$(top_builddir)/src/67_python_invocation_ext -I$(top_srcdir)/src/67_python_invocation_ext +src_67_triqs_ext_fcflags = -I$(top_builddir)/src/67_triqs_ext -I$(top_srcdir)/src/67_triqs_ext +src_68_dmft_fcflags = -I$(top_builddir)/src/68_dmft -I$(top_srcdir)/src/68_dmft +src_68_lotf_fcflags = -I$(top_builddir)/src/68_lotf -I$(top_srcdir)/src/68_lotf +src_68_recursion_fcflags = -I$(top_builddir)/src/68_recursion -I$(top_srcdir)/src/68_recursion +src_68_rsprc_fcflags = -I$(top_builddir)/src/68_rsprc -I$(top_srcdir)/src/68_rsprc +src_69_wfdesc_fcflags = -I$(top_builddir)/src/69_wfdesc -I$(top_srcdir)/src/69_wfdesc +src_70_gw_fcflags = -I$(top_builddir)/src/70_gw -I$(top_srcdir)/src/70_gw +src_71_bse_fcflags = -I$(top_builddir)/src/71_bse -I$(top_srcdir)/src/71_bse +src_71_wannier_fcflags = -I$(top_builddir)/src/71_wannier -I$(top_srcdir)/src/71_wannier +src_72_response_fcflags = -I$(top_builddir)/src/72_response -I$(top_srcdir)/src/72_response +src_77_ddb_fcflags = -I$(top_builddir)/src/77_ddb -I$(top_srcdir)/src/77_ddb +src_77_suscep_fcflags = -I$(top_builddir)/src/77_suscep -I$(top_srcdir)/src/77_suscep +src_78_effpot_fcflags = -I$(top_builddir)/src/78_effpot -I$(top_srcdir)/src/78_effpot +src_78_eph_fcflags = -I$(top_builddir)/src/78_eph -I$(top_srcdir)/src/78_eph +src_79_seqpar_mpi_fcflags = -I$(top_builddir)/src/79_seqpar_mpi -I$(top_srcdir)/src/79_seqpar_mpi +src_80_rttddft_fcflags = -I$(top_builddir)/src/80_rttddft -I$(top_srcdir)/src/80_rttddft +src_80_tdep_fcflags = -I$(top_builddir)/src/80_tdep -I$(top_srcdir)/src/80_tdep +src_94_scfcv_fcflags = -I$(top_builddir)/src/94_scfcv -I$(top_srcdir)/src/94_scfcv +src_95_drive_fcflags = -I$(top_builddir)/src/95_drive -I$(top_srcdir)/src/95_drive +src_common_fcflags = -I$(top_builddir)/shared/common/src/incs -I$(top_srcdir)/shared/common/src/incs -I$(top_builddir)/shared/common/src/mods -I$(top_srcdir)/shared/common/src/mods +src_core_fcflags = -I$(top_builddir)/src/incs -I$(top_srcdir)/src/incs -I$(top_builddir)/src/mods -I$(top_srcdir)/src/mods +src_libpaw_fcflags = -I$(top_builddir)/shared/libpaw/incs -I$(top_srcdir)/shared/libpaw/incs -I$(top_builddir)/shared/libpaw/mods -I$(top_srcdir)/shared/libpaw/mods +srcdir = . +sysconfdir = ${prefix}/etc +target = x86_64-apple-darwin18.7.0 +target_alias = +target_cpu = x86_64 +target_os = darwin18.7.0 +target_vendor = apple +top_build_prefix = ../../../ +top_builddir = ../../.. +top_srcdir = ../../.. +with_abinit_common = +with_bigdft = +with_config_file = +with_debug_flavor = +with_fallbacks = +with_fc_vendor = +with_fc_version = +with_fft_flavor = fftw3 +with_fftw3 = +with_gnu_ld = +with_gpu = +with_hdf5 = /opt/local +with_kokkos = +with_levmar = +with_libpaw = +with_libpsml = +with_libxc = /opt/local +with_libxml2 = +with_linalg_flavor = openblas +with_mpi = /opt/local +with_mpi_level = +with_netcdf = /opt/local +with_optim_flavor = +with_papi = +with_pfft = +with_triqs = +with_wannier90 = +with_xmlf90 = +with_yakl = +AM_CFLAGS = -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include +AM_CXXFLAGS = $(sd_triqs_cxxflags) +AM_FCFLAGS = -ffree-form -J../mods +AM_CPPFLAGS = \ + -I$(top_builddir)/shared/common/src/10_defs -I$(top_srcdir)/shared/common/src/10_defs \ + -I$(top_builddir)/shared/common/src/11_memory_mpi -I$(top_srcdir)/shared/common/src/11_memory_mpi \ + -I$(top_builddir)/shared/common/src/12_hide_mpi -I$(top_srcdir)/shared/common/src/12_hide_mpi \ + -I$(top_builddir)/shared/common/src/14_hidewrite -I$(top_srcdir)/shared/common/src/14_hidewrite \ + -I$(top_builddir)/shared/common/src/16_hideleave -I$(top_srcdir)/shared/common/src/16_hideleave \ + -I$(top_builddir)/shared/common/src/33_xc_lowlevel -I$(top_srcdir)/shared/common/src/33_xc_lowlevel \ + -I$(top_builddir)/shared/libpaw/src -I$(top_srcdir)/shared/libpaw/src \ + -I$(top_builddir)/shared/common/src/incs -I$(top_srcdir)/shared/common/src/incs -I$(top_builddir)/shared/common/src/mods -I$(top_srcdir)/shared/common/src/mods \ + -I$(top_builddir)/src/incs -I$(top_srcdir)/src/incs -I$(top_builddir)/src/mods -I$(top_srcdir)/src/mods \ + -I$(top_builddir)/shared/libpaw/incs -I$(top_srcdir)/shared/libpaw/incs -I$(top_builddir)/shared/libpaw/mods -I$(top_srcdir)/shared/libpaw/mods \ + -I/opt/local/include \ + \ + -I/opt/local/include -I/opt/local/include \ + -I/opt/local/include \ + -I/opt/local/include \ + -I/opt/local/include \ + -I/opt/local/include \ + + + +# Regular source files +lib39_libpaw_srcs = \ + libpaw_libxc.c \ + m_libpaw_mpi.F90 \ + m_libpaw_tools.F90 \ + m_libpaw_libxc.F90 \ + m_paral_atom.F90 \ + m_paw_numeric.F90 \ + m_paw_sphharm.F90 \ + m_paw_io.F90 \ + m_pawang.F90 \ + m_pawrad.F90 \ + m_pawtab.F90 \ + m_paw_an.F90 \ + m_paw_ij.F90 \ + m_pawfgrtab.F90 \ + m_paw_finegrid.F90 \ + m_paw_onsite.F90 \ + m_pawcprj.F90 \ + m_pawrhoij.F90 \ + m_pawdij.F90 \ + m_pawxc.F90 \ + m_paw_atom.F90 \ + m_paw_gaussfit.F90 \ + m_pawxmlps.F90 \ + m_pawpsp.F90 + + +# Source files depending on conditionals + +# Library description +noinst_LIBRARIES = lib39_libpaw.a +lib39_libpaw_a_SOURCES = $(lib39_libpaw_srcs) + +# Dependencies (inside the directory) of directory 39_libpaw +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. +CLEANFILES = libpaw_libxc_cpp.c m_libpaw_mpi_cpp.f90 \ + m_libpaw_tools_cpp.f90 m_libpaw_libxc_cpp.f90 \ + m_paral_atom_cpp.f90 m_paw_numeric_cpp.f90 \ + m_paw_sphharm_cpp.f90 m_paw_io_cpp.f90 m_pawang_cpp.f90 \ + m_pawrad_cpp.f90 m_pawtab_cpp.f90 m_paw_an_cpp.f90 \ + m_paw_ij_cpp.f90 m_pawfgrtab_cpp.f90 m_paw_finegrid_cpp.f90 \ + m_paw_onsite_cpp.f90 m_pawcprj_cpp.f90 m_pawrhoij_cpp.f90 \ + m_pawdij_cpp.f90 m_pawxc_cpp.f90 m_paw_atom_cpp.f90 \ + m_paw_gaussfit_cpp.f90 m_pawxmlps_cpp.f90 m_pawpsp_cpp.f90 \ + m_libpaw_libxc.$(MODEXT) m_libpaw_mpi.$(MODEXT) \ + m_libpaw_tools.$(MODEXT) m_paral_atom.$(MODEXT) \ + m_paw_an.$(MODEXT) m_paw_atom.$(MODEXT) \ + m_paw_finegrid.$(MODEXT) m_paw_gaussfit.$(MODEXT) \ + m_paw_ij.$(MODEXT) m_paw_io.$(MODEXT) m_paw_numeric.$(MODEXT) \ + m_paw_onsite.$(MODEXT) m_paw_sphharm.$(MODEXT) \ + m_pawang.$(MODEXT) m_pawcprj.$(MODEXT) m_pawdij.$(MODEXT) \ + m_pawfgrtab.$(MODEXT) m_pawpsp.$(MODEXT) m_pawrad.$(MODEXT) \ + m_pawrhoij.$(MODEXT) m_pawtab.$(MODEXT) m_pawxc.$(MODEXT) \ + m_pawxmlps.$(MODEXT) +EXTRA_DIST = abinit.src abinit.dep abinit.amf m_libpaw_defs.F90 \ + _39_libpaw_ +noinst_HEADERS = \ + libpaw.h \ + libpaw-coding-rules.txt + +all: all-am + +.SUFFIXES: +.SUFFIXES: .F90 .c .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu shared/libpaw/src/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu shared/libpaw/src/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) + +lib39_libpaw.a: $(lib39_libpaw_a_OBJECTS) $(lib39_libpaw_a_DEPENDENCIES) $(EXTRA_lib39_libpaw_a_DEPENDENCIES) + $(AM_V_at)-rm -f lib39_libpaw.a + $(AM_V_AR)$(lib39_libpaw_a_AR) lib39_libpaw.a $(lib39_libpaw_a_OBJECTS) $(lib39_libpaw_a_LIBADD) + $(AM_V_at)$(RANLIB) lib39_libpaw.a + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +include ./$(DEPDIR)/libpaw_libxc.Po # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) + +.F90.o: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ $< + +.F90.obj: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.c.o: + $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< + $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# $(AM_V_CC)source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(COMPILE) -c -o $@ $< + +.c.obj: + $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` + $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# $(AM_V_CC)source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LIBRARIES) $(HEADERS) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -f ./$(DEPDIR)/libpaw_libxc.Po + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f ./$(DEPDIR)/libpaw_libxc.Po + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ + clean-generic clean-noinstLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am + +.PRECIOUS: Makefile + + +m_paw_an.$(OBJEXT): m_paral_atom.$(OBJEXT) m_pawang.$(OBJEXT) m_pawtab.$(OBJEXT) + +m_paw_atom.$(OBJEXT): m_paw_numeric.$(OBJEXT) m_pawrad.$(OBJEXT) m_pawtab.$(OBJEXT) + +m_paw_finegrid.$(OBJEXT): m_paw_numeric.$(OBJEXT) m_paw_sphharm.$(OBJEXT) m_pawtab.$(OBJEXT) + +m_paw_gaussfit.$(OBJEXT): m_paw_numeric.$(OBJEXT) m_pawrad.$(OBJEXT) + +m_paw_ij.$(OBJEXT): m_paral_atom.$(OBJEXT) m_paw_io.$(OBJEXT) m_pawtab.$(OBJEXT) + +m_paw_onsite.$(OBJEXT): m_paw_sphharm.$(OBJEXT) m_pawrad.$(OBJEXT) m_pawtab.$(OBJEXT) + +m_pawang.$(OBJEXT): m_paw_sphharm.$(OBJEXT) + +m_pawcprj.$(OBJEXT): m_pawtab.$(OBJEXT) + +m_pawdij.$(OBJEXT): m_paral_atom.$(OBJEXT) m_paw_an.$(OBJEXT) m_paw_finegrid.$(OBJEXT) m_paw_ij.$(OBJEXT) m_paw_io.$(OBJEXT) m_paw_sphharm.$(OBJEXT) m_pawang.$(OBJEXT) m_pawfgrtab.$(OBJEXT) m_pawrad.$(OBJEXT) m_pawrhoij.$(OBJEXT) m_pawtab.$(OBJEXT) + +m_pawfgrtab.$(OBJEXT): m_paral_atom.$(OBJEXT) + +m_pawpsp.$(OBJEXT): m_libpaw_libxc.$(OBJEXT) m_libpaw_tools.$(OBJEXT) m_paw_atom.$(OBJEXT) m_paw_gaussfit.$(OBJEXT) m_paw_numeric.$(OBJEXT) m_pawang.$(OBJEXT) m_pawrad.$(OBJEXT) m_pawtab.$(OBJEXT) m_pawxc.$(OBJEXT) m_pawxmlps.$(OBJEXT) + +m_pawrad.$(OBJEXT): m_paw_numeric.$(OBJEXT) + +m_pawrhoij.$(OBJEXT): m_libpaw_tools.$(OBJEXT) m_paral_atom.$(OBJEXT) m_paw_io.$(OBJEXT) m_pawang.$(OBJEXT) m_pawtab.$(OBJEXT) + +m_pawxc.$(OBJEXT): m_libpaw_libxc.$(OBJEXT) m_pawang.$(OBJEXT) m_pawrad.$(OBJEXT) + +m_pawxmlps.$(OBJEXT): m_paw_numeric.$(OBJEXT) m_pawrad.$(OBJEXT) + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/GX-PAW/libpaw/src/Makefile.am b/GX-PAW/libpaw/src/Makefile.am new file mode 100644 index 00000000..4b96318c --- /dev/null +++ b/GX-PAW/libpaw/src/Makefile.am @@ -0,0 +1,170 @@ +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-corelibs on 2024/03/16 21:07:38 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-corelibs script or its config file instead. +# + +AM_CFLAGS = @ABI_CPPFLAGS@ +AM_CXXFLAGS = $(sd_triqs_cxxflags) +AM_FCFLAGS = @FPPFLAGS@ @FCFLAGS_FREEFORM@ @FCFLAGS_MODDIR@ @sd_sys_fcflags@ @fcflags_opt_39_libpaw@ + +AM_CPPFLAGS = \ + @src_10_defs_fcflags@ \ + @src_11_memory_mpi_fcflags@ \ + @src_12_hide_mpi_fcflags@ \ + @src_14_hidewrite_fcflags@ \ + @src_16_hideleave_fcflags@ \ + @src_33_xc_lowlevel_fcflags@ \ + @src_39_libpaw_fcflags@ \ + @src_common_fcflags@ \ + @src_core_fcflags@ \ + @src_libpaw_fcflags@ \ + @sd_libxc_cppflags@ \ + @sd_libxc_fcflags@ \ + @sd_hdf5_cppflags@ \ + @sd_netcdf_cppflags@ \ + @sd_netcdf_fcflags@ \ + @sd_netcdf_fortran_cppflags@ \ + @sd_netcdf_fortran_fcflags@ \ + @fc_mod_fcflags@ + +# Regular source files +lib39_libpaw_srcs = \ + libpaw_libxc.c \ + m_libpaw_mpi.F90 \ + m_libpaw_tools.F90 \ + m_libpaw_libxc.F90 \ + m_paral_atom.F90 \ + m_paw_numeric.F90 \ + m_paw_sphharm.F90 \ + m_paw_io.F90 \ + m_pawang.F90 \ + m_pawrad.F90 \ + m_pawtab.F90 \ + m_paw_an.F90 \ + m_paw_ij.F90 \ + m_pawfgrtab.F90 \ + m_paw_finegrid.F90 \ + m_paw_onsite.F90 \ + m_pawcprj.F90 \ + m_pawrhoij.F90 \ + m_pawdij.F90 \ + m_pawxc.F90 \ + m_paw_atom.F90 \ + m_paw_gaussfit.F90 \ + m_pawxmlps.F90 \ + m_pawpsp.F90 + +# Source files depending on conditionals + + +# Library description +noinst_LIBRARIES = lib39_libpaw.a + +lib39_libpaw_a_SOURCES= $(lib39_libpaw_srcs) + +CLEANFILES = \ + libpaw_libxc_cpp.c \ + m_libpaw_mpi_cpp.f90 \ + m_libpaw_tools_cpp.f90 \ + m_libpaw_libxc_cpp.f90 \ + m_paral_atom_cpp.f90 \ + m_paw_numeric_cpp.f90 \ + m_paw_sphharm_cpp.f90 \ + m_paw_io_cpp.f90 \ + m_pawang_cpp.f90 \ + m_pawrad_cpp.f90 \ + m_pawtab_cpp.f90 \ + m_paw_an_cpp.f90 \ + m_paw_ij_cpp.f90 \ + m_pawfgrtab_cpp.f90 \ + m_paw_finegrid_cpp.f90 \ + m_paw_onsite_cpp.f90 \ + m_pawcprj_cpp.f90 \ + m_pawrhoij_cpp.f90 \ + m_pawdij_cpp.f90 \ + m_pawxc_cpp.f90 \ + m_paw_atom_cpp.f90 \ + m_paw_gaussfit_cpp.f90 \ + m_pawxmlps_cpp.f90 \ + m_pawpsp_cpp.f90 + +EXTRA_DIST = abinit.src + +EXTRA_DIST += abinit.dep + +# Dependencies (inside the directory) of directory 39_libpaw +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. + +CLEANFILES += \ + m_libpaw_libxc.$(MODEXT) \ + m_libpaw_mpi.$(MODEXT) \ + m_libpaw_tools.$(MODEXT) \ + m_paral_atom.$(MODEXT) \ + m_paw_an.$(MODEXT) \ + m_paw_atom.$(MODEXT) \ + m_paw_finegrid.$(MODEXT) \ + m_paw_gaussfit.$(MODEXT) \ + m_paw_ij.$(MODEXT) \ + m_paw_io.$(MODEXT) \ + m_paw_numeric.$(MODEXT) \ + m_paw_onsite.$(MODEXT) \ + m_paw_sphharm.$(MODEXT) \ + m_pawang.$(MODEXT) \ + m_pawcprj.$(MODEXT) \ + m_pawdij.$(MODEXT) \ + m_pawfgrtab.$(MODEXT) \ + m_pawpsp.$(MODEXT) \ + m_pawrad.$(MODEXT) \ + m_pawrhoij.$(MODEXT) \ + m_pawtab.$(MODEXT) \ + m_pawxc.$(MODEXT) \ + m_pawxmlps.$(MODEXT) + +m_paw_an.$(OBJEXT): m_paral_atom.$(OBJEXT) m_pawang.$(OBJEXT) m_pawtab.$(OBJEXT) + +m_paw_atom.$(OBJEXT): m_paw_numeric.$(OBJEXT) m_pawrad.$(OBJEXT) m_pawtab.$(OBJEXT) + +m_paw_finegrid.$(OBJEXT): m_paw_numeric.$(OBJEXT) m_paw_sphharm.$(OBJEXT) m_pawtab.$(OBJEXT) + +m_paw_gaussfit.$(OBJEXT): m_paw_numeric.$(OBJEXT) m_pawrad.$(OBJEXT) + +m_paw_ij.$(OBJEXT): m_paral_atom.$(OBJEXT) m_paw_io.$(OBJEXT) m_pawtab.$(OBJEXT) + +m_paw_onsite.$(OBJEXT): m_paw_sphharm.$(OBJEXT) m_pawrad.$(OBJEXT) m_pawtab.$(OBJEXT) + +m_pawang.$(OBJEXT): m_paw_sphharm.$(OBJEXT) + +m_pawcprj.$(OBJEXT): m_pawtab.$(OBJEXT) + +m_pawdij.$(OBJEXT): m_paral_atom.$(OBJEXT) m_paw_an.$(OBJEXT) m_paw_finegrid.$(OBJEXT) m_paw_ij.$(OBJEXT) m_paw_io.$(OBJEXT) m_paw_sphharm.$(OBJEXT) m_pawang.$(OBJEXT) m_pawfgrtab.$(OBJEXT) m_pawrad.$(OBJEXT) m_pawrhoij.$(OBJEXT) m_pawtab.$(OBJEXT) + +m_pawfgrtab.$(OBJEXT): m_paral_atom.$(OBJEXT) + +m_pawpsp.$(OBJEXT): m_libpaw_libxc.$(OBJEXT) m_libpaw_tools.$(OBJEXT) m_paw_atom.$(OBJEXT) m_paw_gaussfit.$(OBJEXT) m_paw_numeric.$(OBJEXT) m_pawang.$(OBJEXT) m_pawrad.$(OBJEXT) m_pawtab.$(OBJEXT) m_pawxc.$(OBJEXT) m_pawxmlps.$(OBJEXT) + +m_pawrad.$(OBJEXT): m_paw_numeric.$(OBJEXT) + +m_pawrhoij.$(OBJEXT): m_libpaw_tools.$(OBJEXT) m_paral_atom.$(OBJEXT) m_paw_io.$(OBJEXT) m_pawang.$(OBJEXT) m_pawtab.$(OBJEXT) + +m_pawxc.$(OBJEXT): m_libpaw_libxc.$(OBJEXT) m_pawang.$(OBJEXT) m_pawrad.$(OBJEXT) + +m_pawxmlps.$(OBJEXT): m_paw_numeric.$(OBJEXT) m_pawrad.$(OBJEXT) +EXTRA_DIST += abinit.amf + +noinst_HEADERS = \ + libpaw.h \ + libpaw-coding-rules.txt + +EXTRA_DIST += \ + m_libpaw_defs.F90 + +EXTRA_DIST += _39_libpaw_ diff --git a/GX-PAW/libpaw/src/Makefile.in b/GX-PAW/libpaw/src/Makefile.in new file mode 100644 index 00000000..638e8603 --- /dev/null +++ b/GX-PAW/libpaw/src/Makefile.in @@ -0,0 +1,1594 @@ +# Makefile.in generated by automake 1.16.3 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2020 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# +# Makefile for ABINIT -*- Automake -*- +# Generated by make-makefiles-corelibs on 2024/03/16 21:07:38 +0000 + +# +# IMPORTANT NOTE +# +# Any manual change to this file will systematically be overwritten. +# Please modify the make-makefiles-corelibs script or its config file instead. +# + + +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = shared/libpaw/src +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/m4/arch-gpu.m4 \ + $(top_srcdir)/config/m4/arch-mpi.m4 \ + $(top_srcdir)/config/m4/auto-autotools.m4 \ + $(top_srcdir)/config/m4/auto-corelibs.m4 \ + $(top_srcdir)/config/m4/auto-debug.m4 \ + $(top_srcdir)/config/m4/auto-dirflags.m4 \ + $(top_srcdir)/config/m4/auto-env.m4 \ + $(top_srcdir)/config/m4/auto-hints.m4 \ + $(top_srcdir)/config/m4/auto-optim.m4 \ + $(top_srcdir)/config/m4/auto-options.m4 \ + $(top_srcdir)/config/m4/auto-output.m4 \ + $(top_srcdir)/config/m4/auto-triggers.m4 \ + $(top_srcdir)/config/m4/conf-atompaw.m4 \ + $(top_srcdir)/config/m4/conf-debug.m4 \ + $(top_srcdir)/config/m4/conf-fallbacks.m4 \ + $(top_srcdir)/config/m4/conf-files.m4 \ + $(top_srcdir)/config/m4/conf-init.m4 \ + $(top_srcdir)/config/m4/conf-openmp.m4 \ + $(top_srcdir)/config/m4/conf-optim.m4 \ + $(top_srcdir)/config/m4/lang-c++.m4 \ + $(top_srcdir)/config/m4/lang-c.m4 \ + $(top_srcdir)/config/m4/lang-fortran-import.m4 \ + $(top_srcdir)/config/m4/lang-fortran.m4 \ + $(top_srcdir)/config/m4/lang-python.m4 \ + $(top_srcdir)/config/m4/libxml2.m4 \ + $(top_srcdir)/config/m4/misc-display.m4 \ + $(top_srcdir)/config/m4/sd_abinit_common.m4 \ + $(top_srcdir)/config/m4/sd_arch_gpu.m4 \ + $(top_srcdir)/config/m4/sd_arch_mpi.m4 \ + $(top_srcdir)/config/m4/sd_bigdft.m4 \ + $(top_srcdir)/config/m4/sd_core.m4 \ + $(top_srcdir)/config/m4/sd_esl.m4 \ + $(top_srcdir)/config/m4/sd_fftw3.m4 \ + $(top_srcdir)/config/m4/sd_gpu_kokkos.m4 \ + $(top_srcdir)/config/m4/sd_gpu_yakl.m4 \ + $(top_srcdir)/config/m4/sd_io_hdf5.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf.m4 \ + $(top_srcdir)/config/m4/sd_io_netcdf_fortran.m4 \ + $(top_srcdir)/config/m4/sd_levmar.m4 \ + $(top_srcdir)/config/m4/sd_libpaw.m4 \ + $(top_srcdir)/config/m4/sd_libpsml.m4 \ + $(top_srcdir)/config/m4/sd_libxc.m4 \ + $(top_srcdir)/config/m4/sd_math_fft.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_core.m4 \ + $(top_srcdir)/config/m4/sd_math_linalg_util.m4 \ + $(top_srcdir)/config/m4/sd_papi.m4 \ + $(top_srcdir)/config/m4/sd_pfft.m4 \ + $(top_srcdir)/config/m4/sd_triqs.m4 \ + $(top_srcdir)/config/m4/sd_wannier90.m4 \ + $(top_srcdir)/config/m4/sd_xmlf90.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = +lib39_libpaw_a_AR = $(AR) $(ARFLAGS) +lib39_libpaw_a_LIBADD = +am__objects_1 = libpaw_libxc.$(OBJEXT) m_libpaw_mpi.$(OBJEXT) \ + m_libpaw_tools.$(OBJEXT) m_libpaw_libxc.$(OBJEXT) \ + m_paral_atom.$(OBJEXT) m_paw_numeric.$(OBJEXT) \ + m_paw_sphharm.$(OBJEXT) m_paw_io.$(OBJEXT) m_pawang.$(OBJEXT) \ + m_pawrad.$(OBJEXT) m_pawtab.$(OBJEXT) m_paw_an.$(OBJEXT) \ + m_paw_ij.$(OBJEXT) m_pawfgrtab.$(OBJEXT) \ + m_paw_finegrid.$(OBJEXT) m_paw_onsite.$(OBJEXT) \ + m_pawcprj.$(OBJEXT) m_pawrhoij.$(OBJEXT) m_pawdij.$(OBJEXT) \ + m_pawxc.$(OBJEXT) m_paw_atom.$(OBJEXT) \ + m_paw_gaussfit.$(OBJEXT) m_pawxmlps.$(OBJEXT) \ + m_pawpsp.$(OBJEXT) +am_lib39_libpaw_a_OBJECTS = $(am__objects_1) +lib39_libpaw_a_OBJECTS = $(am_lib39_libpaw_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/config/gnu/depcomp +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/libpaw_libxc.Po +am__mv = mv -f +PPFCCOMPILE = $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) +AM_V_PPFC = $(am__v_PPFC_@AM_V@) +am__v_PPFC_ = $(am__v_PPFC_@AM_DEFAULT_V@) +am__v_PPFC_0 = @echo " PPFC " $@; +am__v_PPFC_1 = +FCLD = $(FC) +FCLINK = $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \ + $@ +AM_V_FCLD = $(am__v_FCLD_@AM_V@) +am__v_FCLD_ = $(am__v_FCLD_@AM_DEFAULT_V@) +am__v_FCLD_0 = @echo " FCLD " $@; +am__v_FCLD_1 = +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(lib39_libpaw_a_SOURCES) +DIST_SOURCES = $(lib39_libpaw_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +HEADERS = $(noinst_HEADERS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in \ + $(top_srcdir)/config/gnu/depcomp +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ABINIT_BINARY_PACKAGE = @ABINIT_BINARY_PACKAGE@ +ABINIT_COMMON_CPPFLAGS = @ABINIT_COMMON_CPPFLAGS@ +ABINIT_COMMON_FCFLAGS = @ABINIT_COMMON_FCFLAGS@ +ABINIT_COMMON_LDFLAGS = @ABINIT_COMMON_LDFLAGS@ +ABINIT_COMMON_LIBS = @ABINIT_COMMON_LIBS@ +ABINIT_TARGET = @ABINIT_TARGET@ +ABINIT_VERSION = @ABINIT_VERSION@ +ABINIT_VERSION_BASE = @ABINIT_VERSION_BASE@ +ABINIT_VERSION_BUILD = @ABINIT_VERSION_BUILD@ +ABINIT_VERSION_MAJOR = @ABINIT_VERSION_MAJOR@ +ABINIT_VERSION_MICRO = @ABINIT_VERSION_MICRO@ +ABINIT_VERSION_MINOR = @ABINIT_VERSION_MINOR@ +ABI_CPPFLAGS = @ABI_CPPFLAGS@ +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +ARFLAGS = @ARFLAGS@ +ARFLAGS_CMD = @ARFLAGS_CMD@ +ARFLAGS_DEBUG = @ARFLAGS_DEBUG@ +ARFLAGS_EXTRA = @ARFLAGS_EXTRA@ +ARFLAGS_HINTS = @ARFLAGS_HINTS@ +ARFLAGS_OPTIM = @ARFLAGS_OPTIM@ +ATOMPAW_BIN = @ATOMPAW_BIN@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BIGDFT_CPPFLAGS = @BIGDFT_CPPFLAGS@ +BIGDFT_FCFLAGS = @BIGDFT_FCFLAGS@ +BIGDFT_LDFLAGS = @BIGDFT_LDFLAGS@ +BIGDFT_LIBS = @BIGDFT_LIBS@ +BOURNE_SHELL = @BOURNE_SHELL@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CC_LDFLAGS = @CC_LDFLAGS@ +CC_LDFLAGS_DEBUG = @CC_LDFLAGS_DEBUG@ +CC_LDFLAGS_EXTRA = @CC_LDFLAGS_EXTRA@ +CC_LDFLAGS_GPU = @CC_LDFLAGS_GPU@ +CC_LDFLAGS_HINTS = @CC_LDFLAGS_HINTS@ +CC_LDFLAGS_OPTIM = @CC_LDFLAGS_OPTIM@ +CC_LIBS = @CC_LIBS@ +CC_LIBS_DEBUG = @CC_LIBS_DEBUG@ +CC_LIBS_EXTRA = @CC_LIBS_EXTRA@ +CC_LIBS_GPU = @CC_LIBS_GPU@ +CC_LIBS_HINTS = @CC_LIBS_HINTS@ +CC_LIBS_OPTIM = @CC_LIBS_OPTIM@ +CFLAGS = @CFLAGS@ +CFLAGS_DEBUG = @CFLAGS_DEBUG@ +CFLAGS_EXTRA = @CFLAGS_EXTRA@ +CFLAGS_GPU = @CFLAGS_GPU@ +CFLAGS_HINTS = @CFLAGS_HINTS@ +CFLAGS_OPTIM = @CFLAGS_OPTIM@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CPPFLAGS_DEBUG = @CPPFLAGS_DEBUG@ +CPPFLAGS_EXTRA = @CPPFLAGS_EXTRA@ +CPPFLAGS_GPU = @CPPFLAGS_GPU@ +CPPFLAGS_HINTS = @CPPFLAGS_HINTS@ +CPPFLAGS_HINTS_EXT = @CPPFLAGS_HINTS_EXT@ +CPPFLAGS_OPTIM = @CPPFLAGS_OPTIM@ +CXX = @CXX@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CXXFLAGS_DEBUG = @CXXFLAGS_DEBUG@ +CXXFLAGS_EXTRA = @CXXFLAGS_EXTRA@ +CXXFLAGS_GPU = @CXXFLAGS_GPU@ +CXXFLAGS_HINTS = @CXXFLAGS_HINTS@ +CXXFLAGS_OPTIM = @CXXFLAGS_OPTIM@ +CXX_LDFLAGS = @CXX_LDFLAGS@ +CXX_LDFLAGS_DEBUG = @CXX_LDFLAGS_DEBUG@ +CXX_LDFLAGS_EXTRA = @CXX_LDFLAGS_EXTRA@ +CXX_LDFLAGS_GPU = @CXX_LDFLAGS_GPU@ +CXX_LDFLAGS_HINTS = @CXX_LDFLAGS_HINTS@ +CXX_LDFLAGS_OPTIM = @CXX_LDFLAGS_OPTIM@ +CXX_LIBS = @CXX_LIBS@ +CXX_LIBS_DEBUG = @CXX_LIBS_DEBUG@ +CXX_LIBS_EXTRA = @CXX_LIBS_EXTRA@ +CXX_LIBS_GPU = @CXX_LIBS_GPU@ +CXX_LIBS_HINTS = @CXX_LIBS_HINTS@ +CXX_LIBS_OPTIM = @CXX_LIBS_OPTIM@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ +FCFLAGS = @FCFLAGS@ +FCFLAGS_DEBUG = @FCFLAGS_DEBUG@ +FCFLAGS_EXTRA = @FCFLAGS_EXTRA@ +FCFLAGS_F90 = @FCFLAGS_F90@ +FCFLAGS_FIXEDFORM = @FCFLAGS_FIXEDFORM@ +FCFLAGS_FREEFORM = @FCFLAGS_FREEFORM@ +FCFLAGS_HINTS = @FCFLAGS_HINTS@ +FCFLAGS_MODDIR = @FCFLAGS_MODDIR@ +FCFLAGS_OPENMP = @FCFLAGS_OPENMP@ +FCFLAGS_OPENMP_OFFLOAD = @FCFLAGS_OPENMP_OFFLOAD@ +FCFLAGS_OPTIM = @FCFLAGS_OPTIM@ +FCLIBS = @FCLIBS@ +FC_LDFLAGS = @FC_LDFLAGS@ +FC_LDFLAGS_DEBUG = @FC_LDFLAGS_DEBUG@ +FC_LDFLAGS_EXTRA = @FC_LDFLAGS_EXTRA@ +FC_LDFLAGS_HINTS = @FC_LDFLAGS_HINTS@ +FC_LDFLAGS_OPTIM = @FC_LDFLAGS_OPTIM@ +FC_LIBS = @FC_LIBS@ +FC_LIBS_DEBUG = @FC_LIBS_DEBUG@ +FC_LIBS_EXTRA = @FC_LIBS_EXTRA@ +FC_LIBS_HINTS = @FC_LIBS_HINTS@ +FC_LIBS_OPTIM = @FC_LIBS_OPTIM@ +FC_NOWRAP = @FC_NOWRAP@ +FFLAGS = @FFLAGS@ +FFTW3_CFLAGS = @FFTW3_CFLAGS@ +FFTW3_CPPFLAGS = @FFTW3_CPPFLAGS@ +FFTW3_FCFLAGS = @FFTW3_FCFLAGS@ +FFTW3_LDFLAGS = @FFTW3_LDFLAGS@ +FFTW3_LIBS = @FFTW3_LIBS@ +FFT_CFLAGS = @FFT_CFLAGS@ +FFT_FCFLAGS = @FFT_FCFLAGS@ +FPP = @FPP@ +FPPFLAGS = @FPPFLAGS@ +FPPFLAGS_DEBUG = @FPPFLAGS_DEBUG@ +FPPFLAGS_EXTRA = @FPPFLAGS_EXTRA@ +FPPFLAGS_HINTS = @FPPFLAGS_HINTS@ +FPPFLAGS_OPTIM = @FPPFLAGS_OPTIM@ +GPU_ARCH = @GPU_ARCH@ +GPU_CFLAGS = @GPU_CFLAGS@ +GPU_CPPFLAGS = @GPU_CPPFLAGS@ +GPU_CXXFLAGS = @GPU_CXXFLAGS@ +GPU_FCFLAGS = @GPU_FCFLAGS@ +GPU_LDFLAGS = @GPU_LDFLAGS@ +GPU_LIBS = @GPU_LIBS@ +GRAPHATOM_BIN = @GRAPHATOM_BIN@ +GREP = @GREP@ +H5CC = @H5CC@ +HDF5_CFLAGS = @HDF5_CFLAGS@ +HDF5_CPPFLAGS = @HDF5_CPPFLAGS@ +HDF5_CXXFLAGS = @HDF5_CXXFLAGS@ +HDF5_FCFLAGS = @HDF5_FCFLAGS@ +HDF5_LDFLAGS = @HDF5_LDFLAGS@ +HDF5_LIBS = @HDF5_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KOKKOS_CPPFLAGS = @KOKKOS_CPPFLAGS@ +KOKKOS_CXXFLAGS = @KOKKOS_CXXFLAGS@ +KOKKOS_LDFLAGS = @KOKKOS_LDFLAGS@ +KOKKOS_LIBS = @KOKKOS_LIBS@ +LDFLAGS = @LDFLAGS@ +LEVMAR_CFLAGS = @LEVMAR_CFLAGS@ +LEVMAR_CPPFLAGS = @LEVMAR_CPPFLAGS@ +LEVMAR_LDFLAGS = @LEVMAR_LDFLAGS@ +LEVMAR_LIBS = @LEVMAR_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPAW_CPPFLAGS = @LIBPAW_CPPFLAGS@ +LIBPAW_FCFLAGS = @LIBPAW_FCFLAGS@ +LIBPAW_LDFLAGS = @LIBPAW_LDFLAGS@ +LIBPAW_LIBS = @LIBPAW_LIBS@ +LIBPSML_CPPFLAGS = @LIBPSML_CPPFLAGS@ +LIBPSML_FCFLAGS = @LIBPSML_FCFLAGS@ +LIBPSML_LDFLAGS = @LIBPSML_LDFLAGS@ +LIBPSML_LIBS = @LIBPSML_LIBS@ +LIBS = @LIBS@ +LIBXC_CFLAGS = @LIBXC_CFLAGS@ +LIBXC_CPPFLAGS = @LIBXC_CPPFLAGS@ +LIBXC_FCFLAGS = @LIBXC_FCFLAGS@ +LIBXC_LDFLAGS = @LIBXC_LDFLAGS@ +LIBXC_LIBS = @LIBXC_LIBS@ +LIBXML2_CPPFLAGS = @LIBXML2_CPPFLAGS@ +LIBXML2_FCFLAGS = @LIBXML2_FCFLAGS@ +LIBXML2_LIBS = @LIBXML2_LIBS@ +LINALG_CFLAGS = @LINALG_CFLAGS@ +LINALG_CPPFLAGS = @LINALG_CPPFLAGS@ +LINALG_CXXFLAGS = @LINALG_CXXFLAGS@ +LINALG_FCFLAGS = @LINALG_FCFLAGS@ +LINALG_LDFLAGS = @LINALG_LDFLAGS@ +LINALG_LIBS = @LINALG_LIBS@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODEXT = @MODEXT@ +MPI_CFLAGS = @MPI_CFLAGS@ +MPI_CPPFLAGS = @MPI_CPPFLAGS@ +MPI_CXXFLAGS = @MPI_CXXFLAGS@ +MPI_FCFLAGS = @MPI_FCFLAGS@ +MPI_LDFLAGS = @MPI_LDFLAGS@ +MPI_LIBS = @MPI_LIBS@ +MV = @MV@ +NETCDF_CFLAGS = @NETCDF_CFLAGS@ +NETCDF_CPPFLAGS = @NETCDF_CPPFLAGS@ +NETCDF_CXXFLAGS = @NETCDF_CXXFLAGS@ +NETCDF_FCFLAGS = @NETCDF_FCFLAGS@ +NETCDF_FORTRAN_CFLAGS = @NETCDF_FORTRAN_CFLAGS@ +NETCDF_FORTRAN_CPPFLAGS = @NETCDF_FORTRAN_CPPFLAGS@ +NETCDF_FORTRAN_CXXFLAGS = @NETCDF_FORTRAN_CXXFLAGS@ +NETCDF_FORTRAN_FCFLAGS = @NETCDF_FORTRAN_FCFLAGS@ +NETCDF_FORTRAN_LDFLAGS = @NETCDF_FORTRAN_LDFLAGS@ +NETCDF_FORTRAN_LIBS = @NETCDF_FORTRAN_LIBS@ +NETCDF_LDFLAGS = @NETCDF_LDFLAGS@ +NETCDF_LIBS = @NETCDF_LIBS@ +NVCC = @NVCC@ +NVCC_CFLAGS = @NVCC_CFLAGS@ +NVCC_CPPFLAGS = @NVCC_CPPFLAGS@ +NVCC_LDFLAGS = @NVCC_LDFLAGS@ +NVCC_LIBS = @NVCC_LIBS@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PAPI_CFLAGS = @PAPI_CFLAGS@ +PAPI_CPPFLAGS = @PAPI_CPPFLAGS@ +PAPI_LDFLAGS = @PAPI_LDFLAGS@ +PAPI_LIBS = @PAPI_LIBS@ +PATCH = @PATCH@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PFFT_CFLAGS = @PFFT_CFLAGS@ +PFFT_CPPFLAGS = @PFFT_CPPFLAGS@ +PFFT_LDFLAGS = @PFFT_LDFLAGS@ +PFFT_LIBS = @PFFT_LIBS@ +PYFLAGS = @PYFLAGS@ +PYTHON = @PYTHON@ +PYTHON_CONFIG = @PYTHON_CONFIG@ +PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ +RANLIB = @RANLIB@ +REALPATH = @REALPATH@ +RM = @RM@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +TAR = @TAR@ +TRIQS_CFLAGS = @TRIQS_CFLAGS@ +TRIQS_CPPFLAGS = @TRIQS_CPPFLAGS@ +TRIQS_CXXFLAGS = @TRIQS_CXXFLAGS@ +TRIQS_LDFLAGS = @TRIQS_LDFLAGS@ +TRIQS_LIBS = @TRIQS_LIBS@ +TRUE_CPP = @TRUE_CPP@ +VERSION = @VERSION@ +WANNIER90_CPPFLAGS = @WANNIER90_CPPFLAGS@ +WANNIER90_FCFLAGS = @WANNIER90_FCFLAGS@ +WANNIER90_LDFLAGS = @WANNIER90_LDFLAGS@ +WANNIER90_LIBS = @WANNIER90_LIBS@ +XML2_CONFIG = @XML2_CONFIG@ +XMLF90_CPPFLAGS = @XMLF90_CPPFLAGS@ +XMLF90_FCFLAGS = @XMLF90_FCFLAGS@ +XMLF90_LDFLAGS = @XMLF90_LDFLAGS@ +XMLF90_LIBS = @XMLF90_LIBS@ +XML_CPPFLAGS = @XML_CPPFLAGS@ +XML_LIBS = @XML_LIBS@ +XPP = @XPP@ +XPPFLAGS = @XPPFLAGS@ +XPPFLAGS_DEBUG = @XPPFLAGS_DEBUG@ +XPPFLAGS_EXTRA = @XPPFLAGS_EXTRA@ +XPPFLAGS_OPTIM = @XPPFLAGS_OPTIM@ +YAKL_CPPFLAGS = @YAKL_CPPFLAGS@ +YAKL_FCFLAGS = @YAKL_FCFLAGS@ +YAKL_LDFLAGS = @YAKL_LDFLAGS@ +YAKL_LIBS = @YAKL_LIBS@ +abi_ac_distcheck = @abi_ac_distcheck@ +abi_ac_version = @abi_ac_version@ +abi_am_version = @abi_am_version@ +abi_avx_safe_mode_enable = @abi_avx_safe_mode_enable@ +abi_bse_unpacked_enable = @abi_bse_unpacked_enable@ +abi_cc_path = @abi_cc_path@ +abi_cc_vendor = @abi_cc_vendor@ +abi_cc_version = @abi_cc_version@ +abi_cclock_enable = @abi_cclock_enable@ +abi_cpp_path = @abi_cpp_path@ +abi_cpu_64bits = @abi_cpu_64bits@ +abi_cpu_bits = @abi_cpu_bits@ +abi_cpu_model = @abi_cpu_model@ +abi_cpu_platform = @abi_cpu_platform@ +abi_cpu_spec = @abi_cpu_spec@ +abi_cpu_vendor = @abi_cpu_vendor@ +abi_crpa_optim_enable = @abi_crpa_optim_enable@ +abi_cxx_path = @abi_cxx_path@ +abi_cxx_vendor = @abi_cxx_vendor@ +abi_cxx_version = @abi_cxx_version@ +abi_debug_flavor = @abi_debug_flavor@ +abi_exports_enable = @abi_exports_enable@ +abi_fbk_abinit_common_ok = @abi_fbk_abinit_common_ok@ +abi_fbk_bigdft_ok = @abi_fbk_bigdft_ok@ +abi_fbk_config = @abi_fbk_config@ +abi_fbk_enable = @abi_fbk_enable@ +abi_fbk_fft_ok = @abi_fbk_fft_ok@ +abi_fbk_fftw3_ok = @abi_fbk_fftw3_ok@ +abi_fbk_gpu_ok = @abi_fbk_gpu_ok@ +abi_fbk_hdf5_ok = @abi_fbk_hdf5_ok@ +abi_fbk_init = @abi_fbk_init@ +abi_fbk_kokkos_ok = @abi_fbk_kokkos_ok@ +abi_fbk_levmar_ok = @abi_fbk_levmar_ok@ +abi_fbk_libpaw_ok = @abi_fbk_libpaw_ok@ +abi_fbk_libpsml_ok = @abi_fbk_libpsml_ok@ +abi_fbk_libxc_ok = @abi_fbk_libxc_ok@ +abi_fbk_libxml2_ok = @abi_fbk_libxml2_ok@ +abi_fbk_linalg_ok = @abi_fbk_linalg_ok@ +abi_fbk_list = @abi_fbk_list@ +abi_fbk_mpi_ok = @abi_fbk_mpi_ok@ +abi_fbk_netcdf_fortran_ok = @abi_fbk_netcdf_fortran_ok@ +abi_fbk_netcdf_ok = @abi_fbk_netcdf_ok@ +abi_fbk_papi_ok = @abi_fbk_papi_ok@ +abi_fbk_pfft_ok = @abi_fbk_pfft_ok@ +abi_fbk_prefix = @abi_fbk_prefix@ +abi_fbk_required = @abi_fbk_required@ +abi_fbk_triqs_ok = @abi_fbk_triqs_ok@ +abi_fbk_wannier90_ok = @abi_fbk_wannier90_ok@ +abi_fbk_xmlf90_ok = @abi_fbk_xmlf90_ok@ +abi_fbk_yakl_ok = @abi_fbk_yakl_ok@ +abi_fc_path = @abi_fc_path@ +abi_fc_vendor = @abi_fc_vendor@ +abi_fc_version = @abi_fc_version@ +abi_fc_wrap = @abi_fc_wrap@ +abi_fc_wrapper_enable = @abi_fc_wrapper_enable@ +abi_fpp_path = @abi_fpp_path@ +abi_gpu_arch = @abi_gpu_arch@ +abi_gpu_fcflags = @abi_gpu_fcflags@ +abi_gpu_flavor = @abi_gpu_flavor@ +abi_gpu_hip_libdir = @abi_gpu_hip_libdir@ +abi_gpu_incs = @abi_gpu_incs@ +abi_gpu_ldflags = @abi_gpu_ldflags@ +abi_gpu_libs = @abi_gpu_libs@ +abi_gpu_nvtx_v3 = @abi_gpu_nvtx_v3@ +abi_gpu_roctx = @abi_gpu_roctx@ +abi_gw_dpc_enable = @abi_gw_dpc_enable@ +abi_hints_enable = @abi_hints_enable@ +abi_libtetra_enable = @abi_libtetra_enable@ +abi_libxml2_cppflags = @abi_libxml2_cppflags@ +abi_libxml2_enable = @abi_libxml2_enable@ +abi_libxml2_fcflags = @abi_libxml2_fcflags@ +abi_libxml2_init = @abi_libxml2_init@ +abi_libxml2_ldflags = @abi_libxml2_ldflags@ +abi_libxml2_libs = @abi_libxml2_libs@ +abi_libxml2_ok = @abi_libxml2_ok@ +abi_libxml2_prefix = @abi_libxml2_prefix@ +abi_lotf_enable = @abi_lotf_enable@ +abi_lt_version = @abi_lt_version@ +abi_m4_version = @abi_m4_version@ +abi_memory_profiling_enable = @abi_memory_profiling_enable@ +abi_mpi_cflags = @abi_mpi_cflags@ +abi_mpi_cppflags = @abi_mpi_cppflags@ +abi_mpi_cxxflags = @abi_mpi_cxxflags@ +abi_mpi_enable = @abi_mpi_enable@ +abi_mpi_fcflags = @abi_mpi_fcflags@ +abi_mpi_flavor = @abi_mpi_flavor@ +abi_mpi_gpu_aware_enable = @abi_mpi_gpu_aware_enable@ +abi_mpi_incs = @abi_mpi_incs@ +abi_mpi_inplace_enable = @abi_mpi_inplace_enable@ +abi_mpi_interfaces_bugfix_enable = @abi_mpi_interfaces_bugfix_enable@ +abi_mpi_io_default_enable = @abi_mpi_io_default_enable@ +abi_mpi_io_enable = @abi_mpi_io_enable@ +abi_mpi_ldflags = @abi_mpi_ldflags@ +abi_mpi_level = @abi_mpi_level@ +abi_mpi_libs = @abi_mpi_libs@ +abi_netcdf_default_enable = @abi_netcdf_default_enable@ +abi_openmp_enable = @abi_openmp_enable@ +abi_openmp_offload_enable = @abi_openmp_offload_enable@ +abi_optim_flavor = @abi_optim_flavor@ +abi_python_invocation_enable = @abi_python_invocation_enable@ +abi_source_debug_enable = @abi_source_debug_enable@ +abi_stdin_enable = @abi_stdin_enable@ +abi_sys_spec = @abi_sys_spec@ +abi_timer_enable = @abi_timer_enable@ +abi_triqs_v1_4_enable = @abi_triqs_v1_4_enable@ +abi_triqs_v2_0_enable = @abi_triqs_v2_0_enable@ +abi_zdot_bugfix_enable = @abi_zdot_bugfix_enable@ +abinit_bindir = @abinit_bindir@ +abinit_builddir = @abinit_builddir@ +abinit_chkdir = @abinit_chkdir@ +abinit_datdir = @abinit_datdir@ +abinit_docdir = @abinit_docdir@ +abinit_incdir = @abinit_incdir@ +abinit_libdir = @abinit_libdir@ +abinit_mandir = @abinit_mandir@ +abinit_prefix = @abinit_prefix@ +abinit_srcdir = @abinit_srcdir@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_FC = @ac_ct_FC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cc_info_string = @cc_info_string@ +cxx_info_string = @cxx_info_string@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +enable_avx_safe_mode = @enable_avx_safe_mode@ +enable_bse_unpacked = @enable_bse_unpacked@ +enable_cclock = @enable_cclock@ +enable_crpa_optim = @enable_crpa_optim@ +enable_exports = @enable_exports@ +enable_fc_wrapper = @enable_fc_wrapper@ +enable_gw_dpc = @enable_gw_dpc@ +enable_hints = @enable_hints@ +enable_libtetra = @enable_libtetra@ +enable_lotf = @enable_lotf@ +enable_memory_profiling = @enable_memory_profiling@ +enable_mpi_gpu_aware = @enable_mpi_gpu_aware@ +enable_mpi_inplace = @enable_mpi_inplace@ +enable_mpi_interfaces_bugfix = @enable_mpi_interfaces_bugfix@ +enable_mpi_io = @enable_mpi_io@ +enable_mpi_io_default = @enable_mpi_io_default@ +enable_netcdf_default = @enable_netcdf_default@ +enable_openmp = @enable_openmp@ +enable_openmp_offload = @enable_openmp_offload@ +enable_python_invocation = @enable_python_invocation@ +enable_shared = @enable_shared@ +enable_source_debug = @enable_source_debug@ +enable_static = @enable_static@ +enable_stdin = @enable_stdin@ +enable_timer = @enable_timer@ +enable_triqs_v1_4 = @enable_triqs_v1_4@ +enable_triqs_v2_0 = @enable_triqs_v2_0@ +enable_zdot_bugfix = @enable_zdot_bugfix@ +exec_prefix = @exec_prefix@ +fc_info_string = @fc_info_string@ +fc_mod_fcflags = @fc_mod_fcflags@ +fc_timing = @fc_timing@ +fcflags_opt_02_clib = @fcflags_opt_02_clib@ +fcflags_opt_10_defs = @fcflags_opt_10_defs@ +fcflags_opt_11_memory_mpi = @fcflags_opt_11_memory_mpi@ +fcflags_opt_12_hide_mpi = @fcflags_opt_12_hide_mpi@ +fcflags_opt_14_hidewrite = @fcflags_opt_14_hidewrite@ +fcflags_opt_16_hideleave = @fcflags_opt_16_hideleave@ +fcflags_opt_16_kokkos_toolbox = @fcflags_opt_16_kokkos_toolbox@ +fcflags_opt_17_gpu_toolbox = @fcflags_opt_17_gpu_toolbox@ +fcflags_opt_17_libtetra_ext = @fcflags_opt_17_libtetra_ext@ +fcflags_opt_17_minimax = @fcflags_opt_17_minimax@ +fcflags_opt_17_yaml_out = @fcflags_opt_17_yaml_out@ +fcflags_opt_18_timing = @fcflags_opt_18_timing@ +fcflags_opt_21_hashfuncs = @fcflags_opt_21_hashfuncs@ +fcflags_opt_27_toolbox_oop = @fcflags_opt_27_toolbox_oop@ +fcflags_opt_28_numeric_noabirule = @fcflags_opt_28_numeric_noabirule@ +fcflags_opt_29_kpoints = @fcflags_opt_29_kpoints@ +fcflags_opt_32_util = @fcflags_opt_32_util@ +fcflags_opt_33_xc_lowlevel = @fcflags_opt_33_xc_lowlevel@ +fcflags_opt_39_libpaw = @fcflags_opt_39_libpaw@ +fcflags_opt_41_geometry = @fcflags_opt_41_geometry@ +fcflags_opt_42_nlstrain = @fcflags_opt_42_nlstrain@ +fcflags_opt_42_parser = @fcflags_opt_42_parser@ +fcflags_opt_43_ptgroups = @fcflags_opt_43_ptgroups@ +fcflags_opt_43_wvl_wrappers = @fcflags_opt_43_wvl_wrappers@ +fcflags_opt_44_abitools = @fcflags_opt_44_abitools@ +fcflags_opt_44_abitypes_defs = @fcflags_opt_44_abitypes_defs@ +fcflags_opt_44_manage_kokkos = @fcflags_opt_44_manage_kokkos@ +fcflags_opt_45_geomoptim = @fcflags_opt_45_geomoptim@ +fcflags_opt_45_xgTools = @fcflags_opt_45_xgTools@ +fcflags_opt_46_ghc_omp = @fcflags_opt_46_ghc_omp@ +fcflags_opt_46_manage_cuda = @fcflags_opt_46_manage_cuda@ +fcflags_opt_48_diago = @fcflags_opt_48_diago@ +fcflags_opt_49_gw_toolbox_oop = @fcflags_opt_49_gw_toolbox_oop@ +fcflags_opt_51_manage_mpi = @fcflags_opt_51_manage_mpi@ +fcflags_opt_52_fft_mpi_noabirule = @fcflags_opt_52_fft_mpi_noabirule@ +fcflags_opt_53_ffts = @fcflags_opt_53_ffts@ +fcflags_opt_54_spacepar = @fcflags_opt_54_spacepar@ +fcflags_opt_55_abiutil = @fcflags_opt_55_abiutil@ +fcflags_opt_56_io_mpi = @fcflags_opt_56_io_mpi@ +fcflags_opt_56_mixing = @fcflags_opt_56_mixing@ +fcflags_opt_56_recipspace = @fcflags_opt_56_recipspace@ +fcflags_opt_56_xc = @fcflags_opt_56_xc@ +fcflags_opt_57_iopsp_parser = @fcflags_opt_57_iopsp_parser@ +fcflags_opt_57_iovars = @fcflags_opt_57_iovars@ +fcflags_opt_61_occeig = @fcflags_opt_61_occeig@ +fcflags_opt_62_cg_noabirule = @fcflags_opt_62_cg_noabirule@ +fcflags_opt_62_ctqmc = @fcflags_opt_62_ctqmc@ +fcflags_opt_62_iowfdenpot = @fcflags_opt_62_iowfdenpot@ +fcflags_opt_62_poisson = @fcflags_opt_62_poisson@ +fcflags_opt_62_wvl_wfs = @fcflags_opt_62_wvl_wfs@ +fcflags_opt_64_psp = @fcflags_opt_64_psp@ +fcflags_opt_65_lotf_base = @fcflags_opt_65_lotf_base@ +fcflags_opt_65_paw = @fcflags_opt_65_paw@ +fcflags_opt_66_nonlocal = @fcflags_opt_66_nonlocal@ +fcflags_opt_66_vdwxc = @fcflags_opt_66_vdwxc@ +fcflags_opt_66_wfs = @fcflags_opt_66_wfs@ +fcflags_opt_67_common = @fcflags_opt_67_common@ +fcflags_opt_67_python_invocation_ext = @fcflags_opt_67_python_invocation_ext@ +fcflags_opt_67_triqs_ext = @fcflags_opt_67_triqs_ext@ +fcflags_opt_68_dmft = @fcflags_opt_68_dmft@ +fcflags_opt_68_lotf = @fcflags_opt_68_lotf@ +fcflags_opt_68_recursion = @fcflags_opt_68_recursion@ +fcflags_opt_68_rsprc = @fcflags_opt_68_rsprc@ +fcflags_opt_69_wfdesc = @fcflags_opt_69_wfdesc@ +fcflags_opt_70_gw = @fcflags_opt_70_gw@ +fcflags_opt_71_bse = @fcflags_opt_71_bse@ +fcflags_opt_71_wannier = @fcflags_opt_71_wannier@ +fcflags_opt_72_response = @fcflags_opt_72_response@ +fcflags_opt_77_ddb = @fcflags_opt_77_ddb@ +fcflags_opt_77_suscep = @fcflags_opt_77_suscep@ +fcflags_opt_78_effpot = @fcflags_opt_78_effpot@ +fcflags_opt_78_eph = @fcflags_opt_78_eph@ +fcflags_opt_79_seqpar_mpi = @fcflags_opt_79_seqpar_mpi@ +fcflags_opt_80_rttddft = @fcflags_opt_80_rttddft@ +fcflags_opt_80_tdep = @fcflags_opt_80_tdep@ +fcflags_opt_94_scfcv = @fcflags_opt_94_scfcv@ +fcflags_opt_95_drive = @fcflags_opt_95_drive@ +fcflags_opt_98_main = @fcflags_opt_98_main@ +fcflags_opt_bigdft = @fcflags_opt_bigdft@ +fcflags_opt_default = @fcflags_opt_default@ +fcflags_opt_hdf5 = @fcflags_opt_hdf5@ +fcflags_opt_levmar = @fcflags_opt_levmar@ +fcflags_opt_libpsml = @fcflags_opt_libpsml@ +fcflags_opt_libxc = @fcflags_opt_libxc@ +fcflags_opt_libxml2 = @fcflags_opt_libxml2@ +fcflags_opt_linalg = @fcflags_opt_linalg@ +fcflags_opt_netcdf = @fcflags_opt_netcdf@ +fcflags_opt_netcdf_fortran = @fcflags_opt_netcdf_fortran@ +fcflags_opt_papi = @fcflags_opt_papi@ +fcflags_opt_triqs = @fcflags_opt_triqs@ +fcflags_opt_wannier90 = @fcflags_opt_wannier90@ +fcflags_opt_xmlf90 = @fcflags_opt_xmlf90@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sd_abinit_common_cppflags = @sd_abinit_common_cppflags@ +sd_abinit_common_enable = @sd_abinit_common_enable@ +sd_abinit_common_enable_def = @sd_abinit_common_enable_def@ +sd_abinit_common_fcflags = @sd_abinit_common_fcflags@ +sd_abinit_common_init = @sd_abinit_common_init@ +sd_abinit_common_ldflags = @sd_abinit_common_ldflags@ +sd_abinit_common_libs = @sd_abinit_common_libs@ +sd_abinit_common_ok = @sd_abinit_common_ok@ +sd_abinit_common_options = @sd_abinit_common_options@ +sd_abinit_common_policy = @sd_abinit_common_policy@ +sd_abinit_common_status = @sd_abinit_common_status@ +sd_bigdft_cppflags = @sd_bigdft_cppflags@ +sd_bigdft_enable = @sd_bigdft_enable@ +sd_bigdft_enable_def = @sd_bigdft_enable_def@ +sd_bigdft_fcflags = @sd_bigdft_fcflags@ +sd_bigdft_init = @sd_bigdft_init@ +sd_bigdft_ldflags = @sd_bigdft_ldflags@ +sd_bigdft_libs = @sd_bigdft_libs@ +sd_bigdft_ok = @sd_bigdft_ok@ +sd_bigdft_options = @sd_bigdft_options@ +sd_bigdft_policy = @sd_bigdft_policy@ +sd_bigdft_status = @sd_bigdft_status@ +sd_fft_cflags = @sd_fft_cflags@ +sd_fft_choices = @sd_fft_choices@ +sd_fft_cppflags = @sd_fft_cppflags@ +sd_fft_cxxflags = @sd_fft_cxxflags@ +sd_fft_enable = @sd_fft_enable@ +sd_fft_fcflags = @sd_fft_fcflags@ +sd_fft_flavor = @sd_fft_flavor@ +sd_fft_init = @sd_fft_init@ +sd_fft_ldflags = @sd_fft_ldflags@ +sd_fft_libs = @sd_fft_libs@ +sd_fft_ok = @sd_fft_ok@ +sd_fftw3_cflags = @sd_fftw3_cflags@ +sd_fftw3_cppflags = @sd_fftw3_cppflags@ +sd_fftw3_enable = @sd_fftw3_enable@ +sd_fftw3_enable_def = @sd_fftw3_enable_def@ +sd_fftw3_fcflags = @sd_fftw3_fcflags@ +sd_fftw3_init = @sd_fftw3_init@ +sd_fftw3_ldflags = @sd_fftw3_ldflags@ +sd_fftw3_libs = @sd_fftw3_libs@ +sd_fftw3_ok = @sd_fftw3_ok@ +sd_fftw3_options = @sd_fftw3_options@ +sd_fftw3_policy = @sd_fftw3_policy@ +sd_fftw3_status = @sd_fftw3_status@ +sd_gpu_cflags = @sd_gpu_cflags@ +sd_gpu_cppflags = @sd_gpu_cppflags@ +sd_gpu_cxxflags = @sd_gpu_cxxflags@ +sd_gpu_enable = @sd_gpu_enable@ +sd_gpu_enable_def = @sd_gpu_enable_def@ +sd_gpu_fcflags = @sd_gpu_fcflags@ +sd_gpu_init = @sd_gpu_init@ +sd_gpu_ldflags = @sd_gpu_ldflags@ +sd_gpu_libs = @sd_gpu_libs@ +sd_gpu_ok = @sd_gpu_ok@ +sd_gpu_options = @sd_gpu_options@ +sd_gpu_policy = @sd_gpu_policy@ +sd_gpu_prefix = @sd_gpu_prefix@ +sd_gpu_status = @sd_gpu_status@ +sd_hdf5_cflags = @sd_hdf5_cflags@ +sd_hdf5_cppflags = @sd_hdf5_cppflags@ +sd_hdf5_cxxflags = @sd_hdf5_cxxflags@ +sd_hdf5_enable = @sd_hdf5_enable@ +sd_hdf5_enable_def = @sd_hdf5_enable_def@ +sd_hdf5_enable_fc = @sd_hdf5_enable_fc@ +sd_hdf5_fcflags = @sd_hdf5_fcflags@ +sd_hdf5_h5cc = @sd_hdf5_h5cc@ +sd_hdf5_h5fc = @sd_hdf5_h5fc@ +sd_hdf5_init = @sd_hdf5_init@ +sd_hdf5_ldflags = @sd_hdf5_ldflags@ +sd_hdf5_libs = @sd_hdf5_libs@ +sd_hdf5_ok = @sd_hdf5_ok@ +sd_hdf5_options = @sd_hdf5_options@ +sd_hdf5_policy = @sd_hdf5_policy@ +sd_hdf5_status = @sd_hdf5_status@ +sd_kokkos_cppflags = @sd_kokkos_cppflags@ +sd_kokkos_cxxflags = @sd_kokkos_cxxflags@ +sd_kokkos_enable = @sd_kokkos_enable@ +sd_kokkos_enable_def = @sd_kokkos_enable_def@ +sd_kokkos_init = @sd_kokkos_init@ +sd_kokkos_ldflags = @sd_kokkos_ldflags@ +sd_kokkos_libs = @sd_kokkos_libs@ +sd_kokkos_ok = @sd_kokkos_ok@ +sd_kokkos_options = @sd_kokkos_options@ +sd_kokkos_policy = @sd_kokkos_policy@ +sd_kokkos_status = @sd_kokkos_status@ +sd_levmar_cflags = @sd_levmar_cflags@ +sd_levmar_cppflags = @sd_levmar_cppflags@ +sd_levmar_enable = @sd_levmar_enable@ +sd_levmar_enable_def = @sd_levmar_enable_def@ +sd_levmar_init = @sd_levmar_init@ +sd_levmar_ldflags = @sd_levmar_ldflags@ +sd_levmar_libs = @sd_levmar_libs@ +sd_levmar_ok = @sd_levmar_ok@ +sd_levmar_options = @sd_levmar_options@ +sd_levmar_policy = @sd_levmar_policy@ +sd_levmar_status = @sd_levmar_status@ +sd_libpaw_cppflags = @sd_libpaw_cppflags@ +sd_libpaw_enable = @sd_libpaw_enable@ +sd_libpaw_enable_def = @sd_libpaw_enable_def@ +sd_libpaw_fcflags = @sd_libpaw_fcflags@ +sd_libpaw_init = @sd_libpaw_init@ +sd_libpaw_ldflags = @sd_libpaw_ldflags@ +sd_libpaw_libs = @sd_libpaw_libs@ +sd_libpaw_ok = @sd_libpaw_ok@ +sd_libpaw_options = @sd_libpaw_options@ +sd_libpaw_policy = @sd_libpaw_policy@ +sd_libpaw_status = @sd_libpaw_status@ +sd_libpsml_cppflags = @sd_libpsml_cppflags@ +sd_libpsml_enable = @sd_libpsml_enable@ +sd_libpsml_enable_def = @sd_libpsml_enable_def@ +sd_libpsml_fcflags = @sd_libpsml_fcflags@ +sd_libpsml_init = @sd_libpsml_init@ +sd_libpsml_ldflags = @sd_libpsml_ldflags@ +sd_libpsml_libs = @sd_libpsml_libs@ +sd_libpsml_ok = @sd_libpsml_ok@ +sd_libpsml_options = @sd_libpsml_options@ +sd_libpsml_policy = @sd_libpsml_policy@ +sd_libpsml_status = @sd_libpsml_status@ +sd_libxc_cflags = @sd_libxc_cflags@ +sd_libxc_cppflags = @sd_libxc_cppflags@ +sd_libxc_enable = @sd_libxc_enable@ +sd_libxc_enable_def = @sd_libxc_enable_def@ +sd_libxc_enable_fc = @sd_libxc_enable_fc@ +sd_libxc_fcflags = @sd_libxc_fcflags@ +sd_libxc_init = @sd_libxc_init@ +sd_libxc_ldflags = @sd_libxc_ldflags@ +sd_libxc_libs = @sd_libxc_libs@ +sd_libxc_ok = @sd_libxc_ok@ +sd_libxc_options = @sd_libxc_options@ +sd_libxc_policy = @sd_libxc_policy@ +sd_libxc_status = @sd_libxc_status@ +sd_linalg_cflags = @sd_linalg_cflags@ +sd_linalg_choices = @sd_linalg_choices@ +sd_linalg_cppflags = @sd_linalg_cppflags@ +sd_linalg_cxxflags = @sd_linalg_cxxflags@ +sd_linalg_enable = @sd_linalg_enable@ +sd_linalg_fcflags = @sd_linalg_fcflags@ +sd_linalg_flavor = @sd_linalg_flavor@ +sd_linalg_has_elpa = @sd_linalg_has_elpa@ +sd_linalg_has_scalapack = @sd_linalg_has_scalapack@ +sd_linalg_init = @sd_linalg_init@ +sd_linalg_ldflags = @sd_linalg_ldflags@ +sd_linalg_libs = @sd_linalg_libs@ +sd_linalg_ok = @sd_linalg_ok@ +sd_mpi_cc = @sd_mpi_cc@ +sd_mpi_cflags = @sd_mpi_cflags@ +sd_mpi_cppflags = @sd_mpi_cppflags@ +sd_mpi_cxx = @sd_mpi_cxx@ +sd_mpi_enable = @sd_mpi_enable@ +sd_mpi_enable_cxx = @sd_mpi_enable_cxx@ +sd_mpi_enable_def = @sd_mpi_enable_def@ +sd_mpi_enable_fc = @sd_mpi_enable_fc@ +sd_mpi_fc = @sd_mpi_fc@ +sd_mpi_fcflags = @sd_mpi_fcflags@ +sd_mpi_init = @sd_mpi_init@ +sd_mpi_ldflags = @sd_mpi_ldflags@ +sd_mpi_libs = @sd_mpi_libs@ +sd_mpi_ok = @sd_mpi_ok@ +sd_mpi_options = @sd_mpi_options@ +sd_mpi_policy = @sd_mpi_policy@ +sd_mpi_status = @sd_mpi_status@ +sd_netcdf_cflags = @sd_netcdf_cflags@ +sd_netcdf_cppflags = @sd_netcdf_cppflags@ +sd_netcdf_enable = @sd_netcdf_enable@ +sd_netcdf_enable_def = @sd_netcdf_enable_def@ +sd_netcdf_fcflags = @sd_netcdf_fcflags@ +sd_netcdf_fortran_cflags = @sd_netcdf_fortran_cflags@ +sd_netcdf_fortran_cppflags = @sd_netcdf_fortran_cppflags@ +sd_netcdf_fortran_enable = @sd_netcdf_fortran_enable@ +sd_netcdf_fortran_enable_def = @sd_netcdf_fortran_enable_def@ +sd_netcdf_fortran_fcflags = @sd_netcdf_fortran_fcflags@ +sd_netcdf_fortran_init = @sd_netcdf_fortran_init@ +sd_netcdf_fortran_ldflags = @sd_netcdf_fortran_ldflags@ +sd_netcdf_fortran_libs = @sd_netcdf_fortran_libs@ +sd_netcdf_fortran_ok = @sd_netcdf_fortran_ok@ +sd_netcdf_fortran_options = @sd_netcdf_fortran_options@ +sd_netcdf_fortran_policy = @sd_netcdf_fortran_policy@ +sd_netcdf_fortran_status = @sd_netcdf_fortran_status@ +sd_netcdf_init = @sd_netcdf_init@ +sd_netcdf_ldflags = @sd_netcdf_ldflags@ +sd_netcdf_libs = @sd_netcdf_libs@ +sd_netcdf_ok = @sd_netcdf_ok@ +sd_netcdf_options = @sd_netcdf_options@ +sd_netcdf_policy = @sd_netcdf_policy@ +sd_netcdf_status = @sd_netcdf_status@ +sd_papi_cflags = @sd_papi_cflags@ +sd_papi_cppflags = @sd_papi_cppflags@ +sd_papi_enable = @sd_papi_enable@ +sd_papi_enable_def = @sd_papi_enable_def@ +sd_papi_init = @sd_papi_init@ +sd_papi_ldflags = @sd_papi_ldflags@ +sd_papi_libs = @sd_papi_libs@ +sd_papi_ok = @sd_papi_ok@ +sd_papi_options = @sd_papi_options@ +sd_papi_policy = @sd_papi_policy@ +sd_papi_sd_papi_fcflags = @sd_papi_sd_papi_fcflags@ +sd_papi_status = @sd_papi_status@ +sd_pfft_cflags = @sd_pfft_cflags@ +sd_pfft_cppflags = @sd_pfft_cppflags@ +sd_pfft_enable = @sd_pfft_enable@ +sd_pfft_enable_def = @sd_pfft_enable_def@ +sd_pfft_init = @sd_pfft_init@ +sd_pfft_ldflags = @sd_pfft_ldflags@ +sd_pfft_libs = @sd_pfft_libs@ +sd_pfft_ok = @sd_pfft_ok@ +sd_pfft_options = @sd_pfft_options@ +sd_pfft_policy = @sd_pfft_policy@ +sd_pfft_status = @sd_pfft_status@ +sd_sys_fcflags = @sd_sys_fcflags@ +sd_triqs_cflags = @sd_triqs_cflags@ +sd_triqs_cppflags = @sd_triqs_cppflags@ +sd_triqs_cxxflags = @sd_triqs_cxxflags@ +sd_triqs_enable = @sd_triqs_enable@ +sd_triqs_enable_def = @sd_triqs_enable_def@ +sd_triqs_fcflags = @sd_triqs_fcflags@ +sd_triqs_init = @sd_triqs_init@ +sd_triqs_ldflags = @sd_triqs_ldflags@ +sd_triqs_libs = @sd_triqs_libs@ +sd_triqs_ok = @sd_triqs_ok@ +sd_triqs_options = @sd_triqs_options@ +sd_triqs_policy = @sd_triqs_policy@ +sd_triqs_status = @sd_triqs_status@ +sd_wannier90_cppflags = @sd_wannier90_cppflags@ +sd_wannier90_enable = @sd_wannier90_enable@ +sd_wannier90_enable_def = @sd_wannier90_enable_def@ +sd_wannier90_fcflags = @sd_wannier90_fcflags@ +sd_wannier90_init = @sd_wannier90_init@ +sd_wannier90_ldflags = @sd_wannier90_ldflags@ +sd_wannier90_libs = @sd_wannier90_libs@ +sd_wannier90_ok = @sd_wannier90_ok@ +sd_wannier90_options = @sd_wannier90_options@ +sd_wannier90_policy = @sd_wannier90_policy@ +sd_wannier90_status = @sd_wannier90_status@ +sd_xmlf90_cppflags = @sd_xmlf90_cppflags@ +sd_xmlf90_enable = @sd_xmlf90_enable@ +sd_xmlf90_enable_def = @sd_xmlf90_enable_def@ +sd_xmlf90_fcflags = @sd_xmlf90_fcflags@ +sd_xmlf90_init = @sd_xmlf90_init@ +sd_xmlf90_ldflags = @sd_xmlf90_ldflags@ +sd_xmlf90_libs = @sd_xmlf90_libs@ +sd_xmlf90_ok = @sd_xmlf90_ok@ +sd_xmlf90_options = @sd_xmlf90_options@ +sd_xmlf90_policy = @sd_xmlf90_policy@ +sd_xmlf90_status = @sd_xmlf90_status@ +sd_yakl_cppflags = @sd_yakl_cppflags@ +sd_yakl_enable = @sd_yakl_enable@ +sd_yakl_enable_def = @sd_yakl_enable_def@ +sd_yakl_fcflags = @sd_yakl_fcflags@ +sd_yakl_init = @sd_yakl_init@ +sd_yakl_ldflags = @sd_yakl_ldflags@ +sd_yakl_libs = @sd_yakl_libs@ +sd_yakl_ok = @sd_yakl_ok@ +sd_yakl_options = @sd_yakl_options@ +sd_yakl_policy = @sd_yakl_policy@ +sd_yakl_status = @sd_yakl_status@ +sharedstatedir = @sharedstatedir@ +src_02_clib_fcflags = @src_02_clib_fcflags@ +src_10_defs_fcflags = @src_10_defs_fcflags@ +src_11_memory_mpi_fcflags = @src_11_memory_mpi_fcflags@ +src_12_hide_mpi_fcflags = @src_12_hide_mpi_fcflags@ +src_14_hidewrite_fcflags = @src_14_hidewrite_fcflags@ +src_16_hideleave_fcflags = @src_16_hideleave_fcflags@ +src_16_kokkos_toolbox_fcflags = @src_16_kokkos_toolbox_fcflags@ +src_17_gpu_toolbox_fcflags = @src_17_gpu_toolbox_fcflags@ +src_17_libtetra_ext_fcflags = @src_17_libtetra_ext_fcflags@ +src_17_minimax_fcflags = @src_17_minimax_fcflags@ +src_17_yaml_out_fcflags = @src_17_yaml_out_fcflags@ +src_18_timing_fcflags = @src_18_timing_fcflags@ +src_21_hashfuncs_fcflags = @src_21_hashfuncs_fcflags@ +src_27_toolbox_oop_fcflags = @src_27_toolbox_oop_fcflags@ +src_28_numeric_noabirule_fcflags = @src_28_numeric_noabirule_fcflags@ +src_29_kpoints_fcflags = @src_29_kpoints_fcflags@ +src_32_util_fcflags = @src_32_util_fcflags@ +src_33_xc_lowlevel_fcflags = @src_33_xc_lowlevel_fcflags@ +src_39_libpaw_fcflags = @src_39_libpaw_fcflags@ +src_41_geometry_fcflags = @src_41_geometry_fcflags@ +src_42_nlstrain_fcflags = @src_42_nlstrain_fcflags@ +src_42_parser_fcflags = @src_42_parser_fcflags@ +src_43_ptgroups_fcflags = @src_43_ptgroups_fcflags@ +src_43_wvl_wrappers_fcflags = @src_43_wvl_wrappers_fcflags@ +src_44_abitools_fcflags = @src_44_abitools_fcflags@ +src_44_abitypes_defs_fcflags = @src_44_abitypes_defs_fcflags@ +src_44_manage_kokkos_fcflags = @src_44_manage_kokkos_fcflags@ +src_45_geomoptim_fcflags = @src_45_geomoptim_fcflags@ +src_45_xgTools_fcflags = @src_45_xgTools_fcflags@ +src_46_ghc_omp_fcflags = @src_46_ghc_omp_fcflags@ +src_46_manage_cuda_fcflags = @src_46_manage_cuda_fcflags@ +src_48_diago_fcflags = @src_48_diago_fcflags@ +src_49_gw_toolbox_oop_fcflags = @src_49_gw_toolbox_oop_fcflags@ +src_51_manage_mpi_fcflags = @src_51_manage_mpi_fcflags@ +src_52_fft_mpi_noabirule_fcflags = @src_52_fft_mpi_noabirule_fcflags@ +src_53_ffts_fcflags = @src_53_ffts_fcflags@ +src_54_spacepar_fcflags = @src_54_spacepar_fcflags@ +src_55_abiutil_fcflags = @src_55_abiutil_fcflags@ +src_56_io_mpi_fcflags = @src_56_io_mpi_fcflags@ +src_56_mixing_fcflags = @src_56_mixing_fcflags@ +src_56_recipspace_fcflags = @src_56_recipspace_fcflags@ +src_56_xc_fcflags = @src_56_xc_fcflags@ +src_57_iopsp_parser_fcflags = @src_57_iopsp_parser_fcflags@ +src_57_iovars_fcflags = @src_57_iovars_fcflags@ +src_61_occeig_fcflags = @src_61_occeig_fcflags@ +src_62_cg_noabirule_fcflags = @src_62_cg_noabirule_fcflags@ +src_62_ctqmc_fcflags = @src_62_ctqmc_fcflags@ +src_62_iowfdenpot_fcflags = @src_62_iowfdenpot_fcflags@ +src_62_poisson_fcflags = @src_62_poisson_fcflags@ +src_62_wvl_wfs_fcflags = @src_62_wvl_wfs_fcflags@ +src_64_psp_fcflags = @src_64_psp_fcflags@ +src_65_lotf_base_fcflags = @src_65_lotf_base_fcflags@ +src_65_paw_fcflags = @src_65_paw_fcflags@ +src_66_nonlocal_fcflags = @src_66_nonlocal_fcflags@ +src_66_vdwxc_fcflags = @src_66_vdwxc_fcflags@ +src_66_wfs_fcflags = @src_66_wfs_fcflags@ +src_67_common_fcflags = @src_67_common_fcflags@ +src_67_python_invocation_ext_fcflags = @src_67_python_invocation_ext_fcflags@ +src_67_triqs_ext_fcflags = @src_67_triqs_ext_fcflags@ +src_68_dmft_fcflags = @src_68_dmft_fcflags@ +src_68_lotf_fcflags = @src_68_lotf_fcflags@ +src_68_recursion_fcflags = @src_68_recursion_fcflags@ +src_68_rsprc_fcflags = @src_68_rsprc_fcflags@ +src_69_wfdesc_fcflags = @src_69_wfdesc_fcflags@ +src_70_gw_fcflags = @src_70_gw_fcflags@ +src_71_bse_fcflags = @src_71_bse_fcflags@ +src_71_wannier_fcflags = @src_71_wannier_fcflags@ +src_72_response_fcflags = @src_72_response_fcflags@ +src_77_ddb_fcflags = @src_77_ddb_fcflags@ +src_77_suscep_fcflags = @src_77_suscep_fcflags@ +src_78_effpot_fcflags = @src_78_effpot_fcflags@ +src_78_eph_fcflags = @src_78_eph_fcflags@ +src_79_seqpar_mpi_fcflags = @src_79_seqpar_mpi_fcflags@ +src_80_rttddft_fcflags = @src_80_rttddft_fcflags@ +src_80_tdep_fcflags = @src_80_tdep_fcflags@ +src_94_scfcv_fcflags = @src_94_scfcv_fcflags@ +src_95_drive_fcflags = @src_95_drive_fcflags@ +src_common_fcflags = @src_common_fcflags@ +src_core_fcflags = @src_core_fcflags@ +src_libpaw_fcflags = @src_libpaw_fcflags@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +with_abinit_common = @with_abinit_common@ +with_bigdft = @with_bigdft@ +with_config_file = @with_config_file@ +with_debug_flavor = @with_debug_flavor@ +with_fallbacks = @with_fallbacks@ +with_fc_vendor = @with_fc_vendor@ +with_fc_version = @with_fc_version@ +with_fft_flavor = @with_fft_flavor@ +with_fftw3 = @with_fftw3@ +with_gnu_ld = @with_gnu_ld@ +with_gpu = @with_gpu@ +with_hdf5 = @with_hdf5@ +with_kokkos = @with_kokkos@ +with_levmar = @with_levmar@ +with_libpaw = @with_libpaw@ +with_libpsml = @with_libpsml@ +with_libxc = @with_libxc@ +with_libxml2 = @with_libxml2@ +with_linalg_flavor = @with_linalg_flavor@ +with_mpi = @with_mpi@ +with_mpi_level = @with_mpi_level@ +with_netcdf = @with_netcdf@ +with_optim_flavor = @with_optim_flavor@ +with_papi = @with_papi@ +with_pfft = @with_pfft@ +with_triqs = @with_triqs@ +with_wannier90 = @with_wannier90@ +with_xmlf90 = @with_xmlf90@ +with_yakl = @with_yakl@ +AM_CFLAGS = @ABI_CPPFLAGS@ +AM_CXXFLAGS = $(sd_triqs_cxxflags) +AM_FCFLAGS = @FPPFLAGS@ @FCFLAGS_FREEFORM@ @FCFLAGS_MODDIR@ @sd_sys_fcflags@ @fcflags_opt_39_libpaw@ +AM_CPPFLAGS = \ + @src_10_defs_fcflags@ \ + @src_11_memory_mpi_fcflags@ \ + @src_12_hide_mpi_fcflags@ \ + @src_14_hidewrite_fcflags@ \ + @src_16_hideleave_fcflags@ \ + @src_33_xc_lowlevel_fcflags@ \ + @src_39_libpaw_fcflags@ \ + @src_common_fcflags@ \ + @src_core_fcflags@ \ + @src_libpaw_fcflags@ \ + @sd_libxc_cppflags@ \ + @sd_libxc_fcflags@ \ + @sd_hdf5_cppflags@ \ + @sd_netcdf_cppflags@ \ + @sd_netcdf_fcflags@ \ + @sd_netcdf_fortran_cppflags@ \ + @sd_netcdf_fortran_fcflags@ \ + @fc_mod_fcflags@ + + +# Regular source files +lib39_libpaw_srcs = \ + libpaw_libxc.c \ + m_libpaw_mpi.F90 \ + m_libpaw_tools.F90 \ + m_libpaw_libxc.F90 \ + m_paral_atom.F90 \ + m_paw_numeric.F90 \ + m_paw_sphharm.F90 \ + m_paw_io.F90 \ + m_pawang.F90 \ + m_pawrad.F90 \ + m_pawtab.F90 \ + m_paw_an.F90 \ + m_paw_ij.F90 \ + m_pawfgrtab.F90 \ + m_paw_finegrid.F90 \ + m_paw_onsite.F90 \ + m_pawcprj.F90 \ + m_pawrhoij.F90 \ + m_pawdij.F90 \ + m_pawxc.F90 \ + m_paw_atom.F90 \ + m_paw_gaussfit.F90 \ + m_pawxmlps.F90 \ + m_pawpsp.F90 + + +# Source files depending on conditionals + +# Library description +noinst_LIBRARIES = lib39_libpaw.a +lib39_libpaw_a_SOURCES = $(lib39_libpaw_srcs) + +# Dependencies (inside the directory) of directory 39_libpaw +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. +CLEANFILES = libpaw_libxc_cpp.c m_libpaw_mpi_cpp.f90 \ + m_libpaw_tools_cpp.f90 m_libpaw_libxc_cpp.f90 \ + m_paral_atom_cpp.f90 m_paw_numeric_cpp.f90 \ + m_paw_sphharm_cpp.f90 m_paw_io_cpp.f90 m_pawang_cpp.f90 \ + m_pawrad_cpp.f90 m_pawtab_cpp.f90 m_paw_an_cpp.f90 \ + m_paw_ij_cpp.f90 m_pawfgrtab_cpp.f90 m_paw_finegrid_cpp.f90 \ + m_paw_onsite_cpp.f90 m_pawcprj_cpp.f90 m_pawrhoij_cpp.f90 \ + m_pawdij_cpp.f90 m_pawxc_cpp.f90 m_paw_atom_cpp.f90 \ + m_paw_gaussfit_cpp.f90 m_pawxmlps_cpp.f90 m_pawpsp_cpp.f90 \ + m_libpaw_libxc.$(MODEXT) m_libpaw_mpi.$(MODEXT) \ + m_libpaw_tools.$(MODEXT) m_paral_atom.$(MODEXT) \ + m_paw_an.$(MODEXT) m_paw_atom.$(MODEXT) \ + m_paw_finegrid.$(MODEXT) m_paw_gaussfit.$(MODEXT) \ + m_paw_ij.$(MODEXT) m_paw_io.$(MODEXT) m_paw_numeric.$(MODEXT) \ + m_paw_onsite.$(MODEXT) m_paw_sphharm.$(MODEXT) \ + m_pawang.$(MODEXT) m_pawcprj.$(MODEXT) m_pawdij.$(MODEXT) \ + m_pawfgrtab.$(MODEXT) m_pawpsp.$(MODEXT) m_pawrad.$(MODEXT) \ + m_pawrhoij.$(MODEXT) m_pawtab.$(MODEXT) m_pawxc.$(MODEXT) \ + m_pawxmlps.$(MODEXT) +EXTRA_DIST = abinit.src abinit.dep abinit.amf m_libpaw_defs.F90 \ + _39_libpaw_ +noinst_HEADERS = \ + libpaw.h \ + libpaw-coding-rules.txt + +all: all-am + +.SUFFIXES: +.SUFFIXES: .F90 .c .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu shared/libpaw/src/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu shared/libpaw/src/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) + +lib39_libpaw.a: $(lib39_libpaw_a_OBJECTS) $(lib39_libpaw_a_DEPENDENCIES) $(EXTRA_lib39_libpaw_a_DEPENDENCIES) + $(AM_V_at)-rm -f lib39_libpaw.a + $(AM_V_AR)$(lib39_libpaw_a_AR) lib39_libpaw.a $(lib39_libpaw_a_OBJECTS) $(lib39_libpaw_a_LIBADD) + $(AM_V_at)$(RANLIB) lib39_libpaw.a + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpaw_libxc.Po@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) + +.F90.o: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ $< + +.F90.obj: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LIBRARIES) $(HEADERS) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -f ./$(DEPDIR)/libpaw_libxc.Po + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f ./$(DEPDIR)/libpaw_libxc.Po + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ + clean-generic clean-noinstLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am + +.PRECIOUS: Makefile + + +m_paw_an.$(OBJEXT): m_paral_atom.$(OBJEXT) m_pawang.$(OBJEXT) m_pawtab.$(OBJEXT) + +m_paw_atom.$(OBJEXT): m_paw_numeric.$(OBJEXT) m_pawrad.$(OBJEXT) m_pawtab.$(OBJEXT) + +m_paw_finegrid.$(OBJEXT): m_paw_numeric.$(OBJEXT) m_paw_sphharm.$(OBJEXT) m_pawtab.$(OBJEXT) + +m_paw_gaussfit.$(OBJEXT): m_paw_numeric.$(OBJEXT) m_pawrad.$(OBJEXT) + +m_paw_ij.$(OBJEXT): m_paral_atom.$(OBJEXT) m_paw_io.$(OBJEXT) m_pawtab.$(OBJEXT) + +m_paw_onsite.$(OBJEXT): m_paw_sphharm.$(OBJEXT) m_pawrad.$(OBJEXT) m_pawtab.$(OBJEXT) + +m_pawang.$(OBJEXT): m_paw_sphharm.$(OBJEXT) + +m_pawcprj.$(OBJEXT): m_pawtab.$(OBJEXT) + +m_pawdij.$(OBJEXT): m_paral_atom.$(OBJEXT) m_paw_an.$(OBJEXT) m_paw_finegrid.$(OBJEXT) m_paw_ij.$(OBJEXT) m_paw_io.$(OBJEXT) m_paw_sphharm.$(OBJEXT) m_pawang.$(OBJEXT) m_pawfgrtab.$(OBJEXT) m_pawrad.$(OBJEXT) m_pawrhoij.$(OBJEXT) m_pawtab.$(OBJEXT) + +m_pawfgrtab.$(OBJEXT): m_paral_atom.$(OBJEXT) + +m_pawpsp.$(OBJEXT): m_libpaw_libxc.$(OBJEXT) m_libpaw_tools.$(OBJEXT) m_paw_atom.$(OBJEXT) m_paw_gaussfit.$(OBJEXT) m_paw_numeric.$(OBJEXT) m_pawang.$(OBJEXT) m_pawrad.$(OBJEXT) m_pawtab.$(OBJEXT) m_pawxc.$(OBJEXT) m_pawxmlps.$(OBJEXT) + +m_pawrad.$(OBJEXT): m_paw_numeric.$(OBJEXT) + +m_pawrhoij.$(OBJEXT): m_libpaw_tools.$(OBJEXT) m_paral_atom.$(OBJEXT) m_paw_io.$(OBJEXT) m_pawang.$(OBJEXT) m_pawtab.$(OBJEXT) + +m_pawxc.$(OBJEXT): m_libpaw_libxc.$(OBJEXT) m_pawang.$(OBJEXT) m_pawrad.$(OBJEXT) + +m_pawxmlps.$(OBJEXT): m_paw_numeric.$(OBJEXT) m_pawrad.$(OBJEXT) + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/GX-PAW/libpaw/src/_39_libpaw_ b/GX-PAW/libpaw/src/_39_libpaw_ new file mode 100644 index 00000000..a1044f6b --- /dev/null +++ b/GX-PAW/libpaw/src/_39_libpaw_ @@ -0,0 +1,41 @@ +!!****d* ABINIT/39_libpaw +!! NAME +!! 39_libpaw +!! +!! DESCRIPTION +!! FIXME: Description is missing +!! +!! COPYRIGHT +!! Copyright (C) 1998-2024 ABINIT group +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! For the initials of contributors, see ~abinit/doc/developers/contributors.txt . +!! +!! CHILDREN +!! m_libpaw_defs.F90 +!! m_libpaw_libxc.F90 +!! m_libpaw_mpi.F90 +!! m_libpaw_tools.F90 +!! m_paral_atom.F90 +!! m_paw_an.F90 +!! m_paw_atom.F90 +!! m_paw_finegrid.F90 +!! m_paw_gaussfit.F90 +!! m_paw_ij.F90 +!! m_paw_io.F90 +!! m_paw_numeric.F90 +!! m_paw_onsite.F90 +!! m_paw_sphharm.F90 +!! m_pawang.F90 +!! m_pawcprj.F90 +!! m_pawdij.F90 +!! m_pawfgrtab.F90 +!! m_pawpsp.F90 +!! m_pawrad.F90 +!! m_pawrhoij.F90 +!! m_pawtab.F90 +!! m_pawxc.F90 +!! m_pawxmlps.F90 +!! +!!*** diff --git a/GX-PAW/libpaw/src/__pycache__/abinit.cpython-36.pyc b/GX-PAW/libpaw/src/__pycache__/abinit.cpython-36.pyc new file mode 100644 index 00000000..a53bfed2 Binary files /dev/null and b/GX-PAW/libpaw/src/__pycache__/abinit.cpython-36.pyc differ diff --git a/GX-PAW/libpaw/src/abinit.amf b/GX-PAW/libpaw/src/abinit.amf new file mode 100644 index 00000000..7ddd7c95 --- /dev/null +++ b/GX-PAW/libpaw/src/abinit.amf @@ -0,0 +1,6 @@ +noinst_HEADERS = \ + libpaw.h \ + libpaw-coding-rules.txt + +EXTRA_DIST += \ + m_libpaw_defs.F90 diff --git a/GX-PAW/libpaw/src/abinit.dep b/GX-PAW/libpaw/src/abinit.dep new file mode 100644 index 00000000..600cafe6 --- /dev/null +++ b/GX-PAW/libpaw/src/abinit.dep @@ -0,0 +1,60 @@ +# Dependencies (inside the directory) of directory 39_libpaw +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. + +CLEANFILES += \ + m_libpaw_libxc.$(MODEXT) \ + m_libpaw_mpi.$(MODEXT) \ + m_libpaw_tools.$(MODEXT) \ + m_paral_atom.$(MODEXT) \ + m_paw_an.$(MODEXT) \ + m_paw_atom.$(MODEXT) \ + m_paw_finegrid.$(MODEXT) \ + m_paw_gaussfit.$(MODEXT) \ + m_paw_ij.$(MODEXT) \ + m_paw_io.$(MODEXT) \ + m_paw_numeric.$(MODEXT) \ + m_paw_onsite.$(MODEXT) \ + m_paw_sphharm.$(MODEXT) \ + m_pawang.$(MODEXT) \ + m_pawcprj.$(MODEXT) \ + m_pawdij.$(MODEXT) \ + m_pawfgrtab.$(MODEXT) \ + m_pawpsp.$(MODEXT) \ + m_pawrad.$(MODEXT) \ + m_pawrhoij.$(MODEXT) \ + m_pawtab.$(MODEXT) \ + m_pawxc.$(MODEXT) \ + m_pawxmlps.$(MODEXT) + +m_paw_an.$(OBJEXT): m_paral_atom.$(OBJEXT) m_pawang.$(OBJEXT) m_pawtab.$(OBJEXT) + +m_paw_atom.$(OBJEXT): m_paw_numeric.$(OBJEXT) m_pawrad.$(OBJEXT) m_pawtab.$(OBJEXT) + +m_paw_finegrid.$(OBJEXT): m_paw_numeric.$(OBJEXT) m_paw_sphharm.$(OBJEXT) m_pawtab.$(OBJEXT) + +m_paw_gaussfit.$(OBJEXT): m_paw_numeric.$(OBJEXT) m_pawrad.$(OBJEXT) + +m_paw_ij.$(OBJEXT): m_paral_atom.$(OBJEXT) m_paw_io.$(OBJEXT) m_pawtab.$(OBJEXT) + +m_paw_onsite.$(OBJEXT): m_paw_sphharm.$(OBJEXT) m_pawrad.$(OBJEXT) m_pawtab.$(OBJEXT) + +m_pawang.$(OBJEXT): m_paw_sphharm.$(OBJEXT) + +m_pawcprj.$(OBJEXT): m_pawtab.$(OBJEXT) + +m_pawdij.$(OBJEXT): m_paral_atom.$(OBJEXT) m_paw_an.$(OBJEXT) m_paw_finegrid.$(OBJEXT) m_paw_ij.$(OBJEXT) m_paw_io.$(OBJEXT) m_paw_sphharm.$(OBJEXT) m_pawang.$(OBJEXT) m_pawfgrtab.$(OBJEXT) m_pawrad.$(OBJEXT) m_pawrhoij.$(OBJEXT) m_pawtab.$(OBJEXT) + +m_pawfgrtab.$(OBJEXT): m_paral_atom.$(OBJEXT) + +m_pawpsp.$(OBJEXT): m_libpaw_libxc.$(OBJEXT) m_libpaw_tools.$(OBJEXT) m_paw_atom.$(OBJEXT) m_paw_gaussfit.$(OBJEXT) m_paw_numeric.$(OBJEXT) m_pawang.$(OBJEXT) m_pawrad.$(OBJEXT) m_pawtab.$(OBJEXT) m_pawxc.$(OBJEXT) m_pawxmlps.$(OBJEXT) + +m_pawrad.$(OBJEXT): m_paw_numeric.$(OBJEXT) + +m_pawrhoij.$(OBJEXT): m_libpaw_tools.$(OBJEXT) m_paral_atom.$(OBJEXT) m_paw_io.$(OBJEXT) m_pawang.$(OBJEXT) m_pawtab.$(OBJEXT) + +m_pawxc.$(OBJEXT): m_libpaw_libxc.$(OBJEXT) m_pawang.$(OBJEXT) m_pawrad.$(OBJEXT) + +m_pawxmlps.$(OBJEXT): m_paw_numeric.$(OBJEXT) m_pawrad.$(OBJEXT) \ No newline at end of file diff --git a/GX-PAW/libpaw/src/abinit.dir b/GX-PAW/libpaw/src/abinit.dir new file mode 100644 index 00000000..94014550 --- /dev/null +++ b/GX-PAW/libpaw/src/abinit.dir @@ -0,0 +1,14 @@ +# Dependencies (outside the directory) of directory 39_libpaw +# +# This file has been generated by abisrc.py. +# DO NOT edit this file. All changes will be lost. +# Use `abisrc.py makemake` to regenerate the file. + +include_dirs = \ +['10_defs', + '11_memory_mpi', + '12_hide_mpi', + '14_hidewrite', + '16_hideleave', + '33_xc_lowlevel', + '39_libpaw'] \ No newline at end of file diff --git a/GX-PAW/libpaw/src/abinit.src b/GX-PAW/libpaw/src/abinit.src new file mode 100644 index 00000000..acae4d7f --- /dev/null +++ b/GX-PAW/libpaw/src/abinit.src @@ -0,0 +1,49 @@ +# -*- Python -*- +# +# Copyright (C) 2005-2024 ABINIT Group (MT, TRangel) +# +# This file is part of the ABINIT software package. For license information, +# please see the COPYING file in the top-level directory of the ABINIT source +# distribution. +# + +# +# Source files making up the 39_libpaw library +# + +# Source file attributes +ABI_SRC_NIL = 0 # No attribute +ABI_SRC_BLT = 1 # The file is built by a script +ABI_SRC_DEP = 2 # The file depends on other files + +# Source files +sources = [ + "libpaw_libxc.c", + "m_libpaw_mpi.F90", + "m_libpaw_tools.F90", + "m_libpaw_libxc.F90", + "m_paral_atom.F90", + "m_paw_numeric.F90", + "m_paw_sphharm.F90", + "m_paw_io.F90", + "m_pawang.F90", + "m_pawrad.F90", + "m_pawtab.F90", + "m_paw_an.F90", + "m_paw_ij.F90", + "m_pawfgrtab.F90", + "m_paw_finegrid.F90", + "m_paw_onsite.F90", + "m_pawcprj.F90", + "m_pawrhoij.F90", + "m_pawdij.F90", + "m_pawxc.F90", + "m_paw_atom.F90", + "m_paw_gaussfit.F90", + "m_pawxmlps.F90", + "m_pawpsp.F90" + ] +# IMPORTANT : please DO NOT use the alphabetic order in the previous list. +# They are placed in compilation order. +# If module A depends on module B, put first module B and then module A. +# This is important to compile libpaw in standalone mode. diff --git a/GX-PAW/libpaw/src/lib39_libpaw.a b/GX-PAW/libpaw/src/lib39_libpaw.a new file mode 100644 index 00000000..6f6c6e9e Binary files /dev/null and b/GX-PAW/libpaw/src/lib39_libpaw.a differ diff --git a/GX-PAW/libpaw/src/libpaw-coding-rules.txt b/GX-PAW/libpaw/src/libpaw-coding-rules.txt new file mode 100644 index 00000000..708f2999 --- /dev/null +++ b/GX-PAW/libpaw/src/libpaw-coding-rules.txt @@ -0,0 +1,116 @@ +========================================================================== +== Note for libPAW developers == +== Coding rules == +========================================================================== + M.T. Jan 2015, rev April 2015 + +Copyright (C) 2012-2024 ABINIT group. This file is distributed under the +terms of the GNU General Public License, see or gnu.org/copyleft/gpl.txt. + +The following coding rules are mandatory in order to preserve portability +of libPAW library. Only files in src/??_libpaw are covered by these rules. + + +-------------------------------------------------------------------------- +How to check libPAW coding +-------------------------------------------------------------------------- +First, compile ABINIT. + +Then, execute libPAW special test: + cd ~abinit_build_dir + ~abinit_top_dir/special/scripts/check-libpaw.py "" + + +-------------------------------------------------------------------------- +Dependencies and portability +-------------------------------------------------------------------------- +IMPORTANT: LibPAW files should not depend on modules/routines outside +src/??_libpaw folder!! + +The libpaw.h file contain a set of cpp macros intended to integrate libPAW +files into a host code. + +Compiled in ABINIT, libPAW files use some low level routines and +constants from: defs_basis, wrtout, m_xmpi + +Compiled in another code, libPAW files use low level routines from the +2 following modules: m_libpaw_defs, m_libpaw_tools, m_libpaw_mpi + +m_libpaw_defs is an excerpt of defs_basis. + + +-------------------------------------------------------------------------- +Allocation/deallocation of allocatable arrays and pointers +-------------------------------------------------------------------------- +Avoid direct use of allocate/Deallocate Fortran statements! + +For standard arrays (basic Fortran types), using only sizes, use: + LIBPAW_ALLOCATE(array,(sizes)) + LIBPAW_DEALLOCATE(array) + +For standard pointers (basic Fortran types), using only sizes, use: + LIBPAW_POINTER_ALLOCATE(pointer,(sizes)) + LIBPAW_POINTER_DEALLOCATE(pointer) + +For standard arrays (basic Fortran types), using explicit bounds use: +For 1D-array allocation + LIBPAW_BOUND1_ALLOCATE(array,BOUNDS(lbound,ubound)) +For 2D-array allocation + LIBPAW_BOUND2_ALLOCATE(array,BOUNDS(lbnd1,ubnd1),BOUNDS(lbnd2,ubnd2)) +For array deallocation + LIBPAW_DEALLOCATE(array) + +For user-defined datatype arrays or pointers, using sizes or bounds, use: + LIBPAW_DATATYPE_ALLOCATE(array,(sizes)) + LIBPAW_DATATYPE_DEALLOCATE(array) + +Other cases are not covered (but could be on demand) + + +-------------------------------------------------------------------------- +Input/output in text files +-------------------------------------------------------------------------- +Use wrtout routine (see m_libpaw_tools.F90) to print message. + +Use following macros to print messages: + MSG_COMMENT(msg) + MSG_WARNING(msg) + +Use following macros to print messages and then stop: + MSG_ERROR(msg) + MSG_BUG(msg) + + +-------------------------------------------------------------------------- +MPI wrappers +-------------------------------------------------------------------------- +This section is not yet relevant. +For MPI wrappers, use m_xmpi routines + +#MPI functions used in libPAW have to be wrapped. +# +#The wrappers are defined in the m_libpaw_mpi.F90 module. +#The all have the "xpaw_mpi_" prefix. +# +#m_libpaw_mpi is an excerpt of m_xmpi. +#If a new object from m_xmpi is needed, it is mandatory to add it +#in m_libpaw_mpi, replacing "xmpi_" prefix by "xpaw_mpi_". + + +-------------------------------------------------------------------------- +Adding a new file in libPAW +-------------------------------------------------------------------------- +libPAW should only contain Fortran modules! + +The header of the new file should look like this: + +| #include "libpaw.h" +| +| MODULE m_newmodule +| +| USE_DEFS +| USE_MSG_HANDLING [if messages have to be printed] +| USE_MPI_WRAPPERS [if MPI has to be used] +| USE_MEMORY_PROFILING + +Note this use of cpp macros instead of "use module" statements. diff --git a/GX-PAW/libpaw/src/libpaw.h b/GX-PAW/libpaw/src/libpaw.h new file mode 100644 index 00000000..429a94ee --- /dev/null +++ b/GX-PAW/libpaw/src/libpaw.h @@ -0,0 +1,199 @@ +/* libpaw.h */ + +/* + * This file is part of the libPAW library. + * It has to be customized according to the host code. + * For the time being there are 2 known host codes: + * ABINIT (www.abinit.org) and BigDFT (bigdft.org). + */ + +/* + * Copyright (C) 2014-2024 ABINIT Group (MT) + * This file is part of the ABINIT software package. For license information, + * please see the COPYING file in the top-level directory of the ABINIT source + * distribution. + */ + +/* config.h should contain all preprocessing directives */ +#if defined HAVE_CONFIG_H +#include "config.h" +#endif + +/* ============================= + * ========= ABINIT ============ + * ============================= */ +#if defined HAVE_LIBPAW_ABINIT + +/* ABINIT specific macros */ +# include "abi_common.h" + +/* Constants and defs */ +# define USE_DEFS use defs_basis + +/* MPI wrappers */ +# define USE_MPI_WRAPPERS use m_xmpi + +/* Messages, errors */ +/* Other macros already defined in abi_common.h */ +# define USE_MSG_HANDLING use m_errors, only : msg_hndl, netcdf_check; use m_abicore +# undef HAVE_YAML + +# define LIBPAW_COMMENT(msg) ABI_COMMENT(msg) +# define LIBPAW_WARNING(msg) ABI_WARNING(msg) +# define LIBPAW_ERROR(msg) ABI_ERROR(msg) +# define LIBPAW_BUG(msg) ABI_BUG(msg) + +/* Allocation/deallocation with memory profiling */ +# define USE_MEMORY_PROFILING use m_profiling_abi +/* Use this to allocate/deallocate basic-type arrays with sizes */ +# define LIBPAW_ALLOCATE(ARR,SIZE) ABI_MALLOC(ARR,SIZE) +# define LIBPAW_DEALLOCATE(ARR) ABI_FREE(ARR) +/* Use this to allocate/deallocate basic-type pointers with sizes */ +# define LIBPAW_POINTER_ALLOCATE(ARR,SIZE) ABI_MALLOC(ARR,SIZE) +# define LIBPAW_POINTER_DEALLOCATE(ARR) ABI_FREE(ARR) +/* Use this to allocate/deallocate user-defined-type arrays with sizes */ +# define LIBPAW_DATATYPE_ALLOCATE(ARR,SIZE) ABI_MALLOC(ARR,SIZE) +# define LIBPAW_DATATYPE_DEALLOCATE(ARR) ABI_FREE(ARR) +/* Use this to allocate basic-type arrays with explicit bounds */ +# define LIBPAW_BOUND1_ALLOCATE(ARR,BND1) ABI_MALLOC(ARR,(BND1)) +# define LIBPAW_BOUND2_ALLOCATE(ARR,BND1,BND2) ABI_MALLOC(ARR,(BND1,BND2)) +# define BOUNDS(LBND,UBND) LBND : UBND + +/* libXC support */ +# if defined HAVE_LIBXC +# define LIBPAW_HAVE_LIBXC HAVE_LIBXC +# else +# undef LIBPAW_HAVE_LIBXC +# endif + +/* Netcdf support */ +# if defined HAVE_NETCDF +# define LIBPAW_HAVE_NETCDF HAVE_NETCDF +# else +# undef LIBPAW_HAVE_NETCDF +# endif + +/* FoX support */ +# undef LIBPAW_HAVE_FOX + +/* F2008 support */ +# define LIBPAW_CONTIGUOUS ABI_CONTIGUOUS +# define LIBPAW_ISO_C_BINDING 1 + +/* ============================= + * ========= BIGDFT ============ + * ============================= */ +#elif defined HAVE_LIBPAW_BIGDFT + +/* Constants and defs */ +# define USE_DEFS use m_libpaw_defs + +/* MPI wrappers */ +# define USE_MPI_WRAPPERS use m_libpaw_mpi + +/* Messages, errors */ +# define USE_MSG_HANDLING use m_libpaw_tools, only : wrtout => libpaw_wrtout, libpaw_msg_hndl +# define LIBPAW_COMMENT(msg) call libpaw_msg_hndl(msg,"COMMENT","PERS") +# define LIBPAW_WARNING(msg) call libpaw_msg_hndl(msg,"WARNING","PERS") +# define LIBPAW_ERROR(msg) call libpaw_msg_hndl(msg,"ERROR" ,"PERS") +# define LIBPAW_BUG(msg) call libpaw_msg_hndl(msg,"BUG" ,"PERS") +/*BigDFT should accept long lines...*/ +/*#define ABI_ERROR(msg) call libpaw_msg_hndl(msg,"ERROR","PERS",__FILE__,__LINE__)*/ +# define HAVE_YAML + +/* Allocation/deallocation with memory profiling */ +# define USE_MEMORY_PROFILING use dynamic_memory +/* Use this to allocate/deallocate basic-type arrays with sizes */ +# define LIBPAW_ALLOCATE(ARR,SIZE) ARR=f_malloc(to_array SIZE ) +# define LIBPAW_DEALLOCATE(ARR) call f_free(ARR) +/* Use this to allocate/deallocate basic-type pointers with sizes */ +# define LIBPAW_POINTER_ALLOCATE(ARR,SIZE) ARR=f_malloc_ptr(to_array SIZE ) +# define LIBPAW_POINTER_DEALLOCATE(ARR) call f_free_ptr(ARR) +/* Use this to allocate/deallocate user-defined-type arrays or pointers with sizes */ +# define LIBPAW_DATATYPE_ALLOCATE(ARR,SIZE) allocate(ARR SIZE) +# define LIBPAW_DATATYPE_DEALLOCATE(ARR) deallocate(ARR) +/* Use this to allocate user-defined-type arrays with explicit bounds */ +# define LIBPAW_BOUND1_ALLOCATE(ARR,BND1) ARR=f_malloc((/ BND1 /)) +# define LIBPAW_BOUND2_ALLOCATE(ARR,BND1,BND2) ARR=f_malloc((/ BND1 , BND2 /)) +# define BOUNDS(LBND,UBND) LBND .to. UBND + +/* libXC support */ +# if (defined HAVE_LIBXC) +# define LIBPAW_HAVE_LIBXC HAVE_LIBXC +# else +# undef LIBPAW_HAVE_LIBXC +# endif + +/* Netcdf support */ +# undef LIBPAW_HAVE_NETCDF + +/* FoX support */ +# undef LIBPAW_HAVE_FOX + +/* F2008 support */ +# define LIBPAW_CONTIGUOUS +# define LIBPAW_ISO_C_BINDING 1 + +/* ============================= + * ========= DEFAULT =========== + * ============================= */ +#else + +/* Constants and defs */ +# define USE_DEFS use m_libpaw_defs + +/* MPI wrappers */ +# define USE_MPI_WRAPPERS use m_libpaw_mpi + +/* Messages, errors */ +# define USE_MSG_HANDLING use m_libpaw_tools, only : wrtout => libpaw_wrtout, libpaw_msg_hndl +# define LIBPAW_COMMENT(msg) call libpaw_msg_hndl(msg,"COMMENT","PERS") +# define LIBPAW_WARNING(msg) call libpaw_msg_hndl(msg,"WARNING","PERS") +# define LIBPAW_ERROR(msg) call libpaw_msg_hndl(msg,"ERROR" ,"PERS") +# define LIBPAW_BUG(msg) call libpaw_msg_hndl(msg,"BUG" ,"PERS") +# undef HAVE_YAML + +/* Allocation/deallocation */ +# define USE_MEMORY_PROFILING +/* Use this to allocate/deallocate basic-type arrays with sizes */ +# define LIBPAW_ALLOCATE(ARR,SIZE) allocate(ARR SIZE) +# define LIBPAW_DEALLOCATE(ARR) deallocate(ARR) +/* Use this to allocate/deallocate basic-type pointers with sizes */ +# define LIBPAW_POINTER_ALLOCATE(ARR,SIZE) allocate(ARR SIZE) +# define LIBPAW_POINTER_DEALLOCATE(ARR) deallocate(ARR) +/* Use this to allocate/deallocate user-defined-type arrays with sizes */ +# define LIBPAW_DATATYPE_ALLOCATE(ARR,SIZE) allocate(ARR SIZE) +# define LIBPAW_DATATYPE_DEALLOCATE(ARR) deallocate(ARR) +/* Use this to allocate user-defined-type arrays with explicit bounds */ +# define LIBPAW_BOUND1_ALLOCATE(ARR,BND1) allocate(ARR(BND1)) +# define LIBPAW_BOUND2_ALLOCATE(ARR,BND1,BND2) allocate(ARR(BND1,BND2)) +# define BOUNDS(LBND,UBND) LBND : UBND + +/* libXC support */ +# undef LIBPAW_HAVE_LIBXC + +/* Netcdf support */ +# undef LIBPAW_HAVE_NETCDF + +/* FoX support */ +# undef LIBPAW_HAVE_FOX + +/* F2008 support */ +# define LIBPAW_CONTIGUOUS +# define LIBPAW_ISO_C_BINDING 1 + +/* ============================= + * =========== END ============= + * ============================= */ +#endif + + + +/* ============================= + * ===== COMMON DEFINITIONS ==== + * ============================= */ + +/* Error handlers for netcdf; libpaw_netcdf_check is defined in m_libpaw_tools */ +#ifndef NCF_CHECK +# define NCF_CHECK(ncerr) if (ncerr/=nf90_noerr) call libpaw_netcdf_check(ncerr, "ncf_check") +#endif diff --git a/GX-PAW/libpaw/src/libpaw_libxc.c b/GX-PAW/libpaw/src/libpaw_libxc.c new file mode 100644 index 00000000..f58287a3 --- /dev/null +++ b/GX-PAW/libpaw/src/libpaw_libxc.c @@ -0,0 +1,371 @@ +/* + * Copyright (C) 2015-2024 ABINIT group (MT) + * + * 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 2 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. + * + */ + +/* =============================================================== + * Set of C functions interfacing the LibXC library. + * (see http://www.tddft.org/programs/Libxc) + * =============================================================== + */ + +#include "libpaw.h" +#include +#include + +#if defined LIBPAW_HAVE_LIBXC + +#include "xc.h" +#include "xc_version.h" +#include "xc_funcs.h" + +/* if version before 4 get config file */ +#if ( XC_MAJOR_VERSION < 4 ) +# include "xc_config.h" +#else +# define FLOAT double +# define XC(func) xc_ ## func +#endif + +/* =============================================================== + * Get the SINGLE_PRECISION constant + * =============================================================== + */ +void libpaw_xc_get_singleprecision_constant(int *xc_cst_singleprecision) +{ + if (sizeof(FLOAT) 5 ) + /* ==== libXC v6.0 and later ==== */ + *xc_cst_family_hyb_lda = XC_FAMILY_HYB_LDA; +#else + /* ==== Before libXC v6.0 ==== */ + *xc_cst_family_hyb_lda = -11; +#endif +} + +/* =============================================================== + * Get the FLAGS constants + * =============================================================== + */ +void libpaw_xc_get_flags_constants(int *xc_cst_flags_have_exc, + int *xc_cst_flags_have_vxc, + int *xc_cst_flags_have_fxc, + int *xc_cst_flags_have_kxc, + int *xc_cst_flags_have_lxc, + int *xc_cst_flags_needs_laplacian) +{ + *xc_cst_flags_have_exc = XC_FLAGS_HAVE_EXC; + *xc_cst_flags_have_vxc = XC_FLAGS_HAVE_VXC; + *xc_cst_flags_have_fxc = XC_FLAGS_HAVE_FXC; + *xc_cst_flags_have_kxc = XC_FLAGS_HAVE_KXC; + *xc_cst_flags_have_lxc = XC_FLAGS_HAVE_LXC; +#if ( XC_MAJOR_VERSION > 3 ) + *xc_cst_flags_needs_laplacian = XC_FLAGS_NEEDS_LAPLACIAN; +#else + *xc_cst_flags_needs_laplacian = 1; +#endif +} + +/* =============================================================== + * Get the KIND constants + * =============================================================== + */ +void libpaw_xc_get_kind_constants(int *xc_cst_exchange, + int *xc_cst_correlation, + int *xc_cst_exchange_correlation, + int *xc_cst_kinetic) +{ + *xc_cst_exchange = XC_EXCHANGE; + *xc_cst_correlation = XC_CORRELATION; + *xc_cst_exchange_correlation = XC_EXCHANGE_CORRELATION; + *xc_cst_kinetic = XC_KINETIC; +} + +/* =============================================================== + * Allocate/free xc_func_type pointer + * =============================================================== + */ +XC(func_type) * libpaw_xc_func_type_malloc() + {return (XC(func_type) *) malloc(sizeof(XC(func_type)));} + +void libpaw_xc_func_type_free(XC(func_type) **xc_func) + {free(*xc_func);*xc_func = NULL;} + +/* =============================================================== + * Wrappers to the LDA/GGA/MGGA functionals + * =============================================================== + */ +/* --------------------------------------------------------------- + ----- LDA ----- */ +void libpaw_xc_get_lda(const XC(func_type) *xc_func, int np, const double *rho, + double *zk, double *vrho, double *v2rho2, double *v3rho3) +#if ( XC_MAJOR_VERSION > 4 ) +/* ==== libXC v5.0 and later ==== */ + {xc_lda(xc_func, np, rho, zk, vrho, v2rho2, v3rho3, NULL);} +#else +/* ==== Before libXC v5.0 ==== */ + {xc_lda(xc_func, np, rho, zk, vrho, v2rho2, v3rho3);} +#endif +/* --------------------------------------------------------------- + ----- GGA ----- */ +void libpaw_xc_get_gga(const XC(func_type) *xc_func, int np, + const double *rho, const double *sigma, + double *zk, double *vrho, double *vsigma, + double *v2rho2, double *v2rhosigma, double *v2sigma2, + double *v3rho3, double *v3rho2sigma, double *v3rhosigma2, double *v3sigma3) +#if ( XC_MAJOR_VERSION > 4 ) +/* ==== libXC v5.0 and later ==== */ + {xc_gga(xc_func, np, rho, sigma, zk, vrho, vsigma, v2rho2, v2rhosigma, v2sigma2, + v3rho3, v3rho2sigma, v3rhosigma2, v3sigma3, + NULL, NULL, NULL, NULL, NULL);} +#else +/* ==== Before libXC v5.0 ==== */ + {xc_gga(xc_func, np, rho, sigma, zk, vrho, vsigma, v2rho2, v2rhosigma, v2sigma2, + v3rho3, v3rho2sigma, v3rhosigma2, v3sigma3);} +#endif +/* --------------------------------------------------------------- + ----- meta-GGA ----- */ +void libpaw_xc_get_mgga(const XC(func_type) *xc_func, int np, + const double *rho, const double *sigma, const double *lapl, const double *tau, + double *zk, double *vrho, double *vsigma, double *vlapl, double *vtau, + double *v2rho2, double *v2rhosigma, double *v2rholapl, double *v2rhotau, + double *v2sigma2, double *v2sigmalapl, double *v2sigmatau, double *v2lapl2, + double *v2lapltau, double *v2tau2) +#if ( XC_MAJOR_VERSION > 4 ) +/* ==== libXC v5.0 and later ==== */ + {xc_mgga(xc_func, np, rho, sigma, lapl, tau, zk, vrho, vsigma, vlapl, vtau, + v2rho2, v2rhosigma, v2rholapl, v2rhotau, v2sigma2, + v2sigmalapl, v2sigmatau, v2lapl2, v2lapltau, v2tau2, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);} +#else +/* ==== Before libXC v5.0 ==== */ + {xc_mgga(xc_func, np, rho, sigma, lapl, tau, zk, vrho, vsigma, vlapl, vtau, + v2rho2, v2sigma2, v2lapl2, v2tau2, v2rhosigma, v2rholapl, v2rhotau, + v2sigmalapl, v2sigmatau, v2lapltau);} +#endif + +/* =============================================================== + * Get properties from a xc_func_info_type pointer + * These accessors where not provided before libXC v3 + * =============================================================== + */ + #if ( XC_MAJOR_VERSION > 3 ) +/* ==== libXC v4.0 and later ==== */ +char const *libpaw_xc_get_info_name(XC(func_type) *xc_func) + {return xc_func_info_get_name(xc_func->info);} +int libpaw_xc_get_info_flags(XC(func_type) *xc_func) + {return xc_func_info_get_flags(xc_func->info);} +int libpaw_xc_get_info_kind(XC(func_type) *xc_func) + {return xc_func_info_get_kind(xc_func->info);} +char const *libpaw_xc_get_info_refs(XC(func_type) *xc_func, const int *number) + {if (*number>=0&&*numberinfo,*number) != NULL) + {return xc_func_info_get_references(xc_func->info,*number)->ref;}} + else {return NULL;} + return NULL;} + +#elif ( XC_MAJOR_VERSION > 2 ) +/* ==== libXC v3.0 ==== */ +char const *libpaw_xc_get_info_name(XC(func_type) *xc_func) + {return xc_func_info_get_name(xc_func->info);} +int libpaw_xc_get_info_flags(XC(func_type) *xc_func) + {return xc_func_info_get_flags(xc_func->info);} +int libpaw_xc_get_info_kind(XC(func_type) *xc_func) + {return xc_func_info_get_kind(xc_func->info);} +char const *libpaw_xc_get_info_refs(XC(func_type) *xc_func, const int *number) + {if (*number>=0&&*number<=4) + {if (xc_func_info_get_ref(xc_func->info,*number) != NULL) + {return xc_func_info_get_ref(xc_func->info,*number);}} + else {return NULL;} + return NULL;} + +#else +/* ==== Before libXC v3.0 ==== */ +char const *libpaw_xc_get_info_name(XC(func_type) *xc_func) + {return xc_func->info->name;} +int libpaw_xc_get_info_flags(XC(func_type) *xc_func) + {return xc_func->info->flags;} +int libpaw_xc_get_info_kind(XC(func_type) *xc_func) + {return xc_func->info->kind;} +char const *libpaw_xc_get_info_refs(XC(func_type) *xc_func, const int *number) + {if (*number==0) {return xc_func->info->refs;} else {return NULL;} + return NULL;} +#endif + +/* =============================================================== + * Wrapper to xc_func_set_ext_params + * Allows to change the parameters of a XC functional + * For backward compatibility + * =============================================================== + */ +void libpaw_xc_func_set_params(XC(func_type) *xc_func, double *ext_params, int n_ext_params) +#if ( XC_MAJOR_VERSION > 4 ) +/* ==== libXC v5.0 and later ==== */ + {if (n_ext_params == xc_func->info->ext_params.n) + {xc_func_set_ext_params(xc_func, ext_params);} +#elif ( XC_MAJOR_VERSION > 3 ) +/* ==== libXC v4.0 ==== */ + {if (xc_func->info->number == XC_HYB_GGA_XC_PBEH && n_ext_params == 1) + /* set_ext_params function is missing for PBE0 */ + {xc_func->cam_alpha=ext_params[0];xc_func->mix_coef[0]=1.0-ext_params[0];} + else if (xc_func->info->number == XC_MGGA_X_TB09 && n_ext_params >=1) + /* XC_MGGA_X_TB09 has only one parameter */ + {XC(func_set_ext_params)(xc_func, ext_params);} + else if (n_ext_params == xc_func->info->n_ext_params) + {XC(func_set_ext_params)(xc_func, ext_params);} + +#else +/* ==== Before libXC v4.0 ==== */ + {if (xc_func->info->number == XC_LDA_C_XALPHA && n_ext_params == 1) + {XC(lda_c_xalpha_set_params)(xc_func, *ext_params);} + else if (xc_func->info->number == XC_MGGA_X_TB09 && n_ext_params >= 1) + {XC(mgga_x_tb09_set_params)(xc_func, ext_params[0]);} +#if ( XC_MAJOR_VERSION > 2 || ( XC_MAJOR_VERSION > 1 && XC_MINOR_VERSION > 0 ) ) + else if (xc_func->info->number == XC_HYB_GGA_XC_PBEH && n_ext_params == 1) + {XC(hyb_gga_xc_pbeh_set_params)(xc_func, *ext_params);} + else if (xc_func->info->number == XC_HYB_GGA_XC_HSE03 && n_ext_params == 3) + {XC(hyb_gga_xc_hse_set_params)(xc_func, ext_params[0], ext_params[2]); + xc_func->cam_omega=ext_params[1];} + else if (xc_func->info->number == XC_HYB_GGA_XC_HSE06 && n_ext_params == 3) + {XC(hyb_gga_xc_hse_set_params)(xc_func, ext_params[0], ext_params[2]); + xc_func->cam_omega=ext_params[1];} +#else + else if (xc_func->info->number == XC_HYB_GGA_XC_HSE03 && n_ext_params == 3) + {XC(hyb_gga_xc_hse_set_params)(xc_func, ext_params[2]); + xc_func->cam_omega=ext_params[1];} + else if (xc_func->info->number == XC_HYB_GGA_XC_HSE06 && n_ext_params == 3) + {XC(hyb_gga_xc_hse_set_params)(xc_func, ext_params[2]); + xc_func->cam_omega=ext_params[1];} +#endif +#endif + else + {fprintf(stderr, "BUG: invalid entry in set_params!\n");abort();} + } + +/* =============================================================== + * Wrappers to: + * xc_func_get_ext_params_name: get name of a functional parameter + * xc_func_get_ext_params_description: get description of a parameter + * xc_func_set_ext_params_name: set a functional parameter by name + * For backward compatibility + * These accessors where not provided before libXC v5 + * =============================================================== + */ +char const *libpaw_xc_func_get_params_name(XC(func_type) *xc_func, const int *number) +#if ( XC_MAJOR_VERSION > 4 ) +/* ==== libXC v5.0 and later ==== */ + {if (*number>=0&&*numberinfo->ext_params.n) + {return xc_func_info_get_ext_params_name(xc_func->info,*number);} + else {return NULL;}} +#else +/* ==== Before libXC v5.0, was not available ==== */ + {return NULL;} +#endif + +char const *libpaw_xc_func_get_params_description(XC(func_type) *xc_func, int *number) +#if ( XC_MAJOR_VERSION > 4 ) +/* ==== libXC v5.0 and later ==== */ + {if (*number>=0&&*numberinfo->ext_params.n) + {return xc_func_info_get_ext_params_description(xc_func->info,*number);} + else {return NULL;}} +#else +/* ==== Before libXC v5.0, was not available ==== */ + {return NULL;} +#endif + +int libpaw_xc_func_set_params_name(XC(func_type) *xc_func, const char *name, double *par) +#if ( XC_MAJOR_VERSION > 4 ) +/* ==== libXC v5.0 and later ==== */ + {xc_func_set_ext_params_name(xc_func, name, *par);return 0;} +#else + {return -1;} +#endif + +/* =============================================================== + * Wrapper to xc_func_set_dens_threshold + * and xc_func_set_sigma_threshold for backward compatibility + * Allows to change the zero-density (zero-gradient) threshold + * of a XC functional + * Only available from libXC v4 + * =============================================================== + */ +void libpaw_xc_func_set_density_threshold(XC(func_type) *xc_func, double *dens_threshold) +#if ( XC_MAJOR_VERSION > 3 ) +/* ==== libXC v4.0 and later ==== */ + {XC(func_set_dens_threshold)(xc_func, *dens_threshold);} +#else + {fprintf(stderr, "WARNING: setting density threshold not available for libXC<4.0!\n");} +#endif + +void libpaw_xc_func_set_sig_threshold(XC(func_type) *xc_func, double *sigma_threshold) +#if ( XC_MAJOR_VERSION > 4 ) +/* ==== libXC v5.0 and later ==== */ + {XC(func_set_sigma_threshold)(xc_func, *sigma_threshold);} +#else + {fprintf(stderr, "WARNING: setting sigma threshold not available for libXC<4.0!\n");} +#endif + +/* =============================================================== + * Missing function: + * Return 1 if the functional is hybrid, from its id + * =============================================================== + */ +int libpaw_xc_func_is_hybrid_from_id(int func_id) + {int family; family=xc_family_from_id(func_id, NULL, NULL); +#if ( XC_MAJOR_VERSION > 5 ) +/* ==== libXC v6.0 and later ==== */ + if (family==XC_FAMILY_HYB_GGA || family==XC_FAMILY_HYB_MGGA || family==XC_FAMILY_HYB_LDA) + {return 1;} + else + {return 0;} +#else +/* ==== Before libXC v6.0 ==== */ + if (family==XC_FAMILY_HYB_GGA || family==XC_FAMILY_HYB_MGGA ) + {return 1;} + else + {return 0;} +#endif + } + +#endif diff --git a/GX-PAW/libpaw/src/libpaw_libxc.o b/GX-PAW/libpaw/src/libpaw_libxc.o new file mode 100644 index 00000000..db989402 Binary files /dev/null and b/GX-PAW/libpaw/src/libpaw_libxc.o differ diff --git a/GX-PAW/libpaw/src/m_libpaw_defs.F90 b/GX-PAW/libpaw/src/m_libpaw_defs.F90 new file mode 100644 index 00000000..2995b6a8 --- /dev/null +++ b/GX-PAW/libpaw/src/m_libpaw_defs.F90 @@ -0,0 +1,148 @@ +!!****m* ABINIT/m_libpaw_defs +!! NAME +!! m_libpaw_defs +!! +!! FUNCTION +!! Several definitions used in libPAW: named constants, physical constants, datatypes +!! +!! COPYRIGHT +!! Copyright (C) 2000-2024 ABINIT group +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! NOTES +!! This file comes directly from defs_basis.F90 module delivered with ABINIT. +!! +!! FOR DEVELOPPERS: in order to preserve the portability of libPAW library, +!! please consult ~abinit/src/??_libpaw/libpaw-coding-rules.txt +!! +!! SOURCE + +module m_libpaw_defs + + implicit none + +!Double precision real/complex subtypes +!----------------------------------------------- + integer, parameter :: dp=kind(1.0d0) !Nb of bytes related to DP real numbers + integer, parameter :: dpc=kind((1.0_dp,1.0_dp)) !Nb of bytes related to DP complex numbers + +!Real constants +!----------------------------------------------- + real(dp), parameter :: zero=0._dp + real(dp), parameter :: one=1._dp + real(dp), parameter :: two=2._dp + real(dp), parameter :: three=3._dp + real(dp), parameter :: four=4._dp + real(dp), parameter :: half=0.50_dp + real(dp), parameter :: third=one/three + real(dp), parameter :: quarter=0.25_dp + real(dp), parameter :: eighth=0.125_dp + real(dp), parameter :: sqrt2=1.4142135623730950488016887242096939_dp + real(dp), parameter :: sqrt3=1.7320508075688772935274463415058739_dp + real(dp), parameter :: sqrthalf=0.70710678118654752440084436210484697_dp + real(dp), parameter :: pi=3.141592653589793238462643383279502884197_dp + real(dp), parameter :: two_pi=two*pi + real(dp), parameter :: four_pi=four*pi + real(dp), parameter :: tol3= 0.001_dp + real(dp), parameter :: tol6= 0.000001_dp + real(dp), parameter :: tol8= 0.00000001_dp + real(dp), parameter :: tol9= 0.000000001_dp + real(dp), parameter :: tol10=0.0000000001_dp + real(dp), parameter :: tol12=0.000000000001_dp + real(dp), parameter :: tol14=0.00000000000001_dp + real(dp), parameter :: tol16=0.0000000000000001_dp + +!Complex constants +!----------------------------------------------- + complex(dpc), parameter :: czero=(0._dp,0._dp) ! 0 (complex) + complex(dpc), parameter :: cone =(1._dp,0._dp) ! 1 (complex) + +!Character constants +!----------------------------------------------- + character(len=1), parameter :: ch10 = char(10) ! carriage return + integer, parameter :: fnlen=264 ! maximum length of file name variables + integer, parameter :: strlen=2000000 ! maximum length of input string + +!UNIX unit numbers +!----------------------------------------------- + integer, save :: ab_out= 7 ! output file + integer, save :: std_out=6 ! standard output + integer, parameter :: std_err=0 ! standard error + integer, parameter :: tmp_unit=9,tmp_unit2=10 ! units for temporary files + +!Real physical constants +!----------------------------------------------- + real(dp), parameter :: Bohr_Ang=0.52917720859_dp ! 1 Bohr, in Angstrom + real(dp), parameter :: Ha_eV=27.21138386_dp ! 1 Hartree, in eV + real(dp), parameter :: InvFineStruct=137.035999679_dp ! Inverse of fine structure constant + real(dp), parameter :: FineStructureConstant2=0.000053251354478_dp ! Square of fine structure + +!A collection of small datatypes for ragged arrays +!----------------------------------------------- + type coeffi1_type !A small datatype for ragged integer 1D-arrays + integer, allocatable :: value(:) + end type coeffi1_type + type coeff1_type !A small datatype for ragged real 1D-arrays + real(dp), allocatable :: value(:) + end type coeff1_type + type coeff2_type !A small datatype for ragged real 2D-arrays + real(dp), allocatable :: value(:,:) + end type coeff2_type + type coeff3_type !A small datatype for ragged real 3D-arrays + real(dp), allocatable :: value(:,:,:) + end type coeff3_type + +!Small functions used in cpp macros +!----------------------------------------------- + public :: to_array + interface to_array + module procedure to_array1 + module procedure to_array2 + module procedure to_array3 + module procedure to_array4 + module procedure to_array5 + module procedure to_array6 + end interface to_array + + contains + + function to_array1(i1) result(arr) + + integer :: i1,arr(1) + arr=(/i1/) + end function to_array1 + + function to_array2(i1,i2) result(arr) + + integer :: i1,i2,arr(2) + arr=(/i1,i2/) + end function to_array2 + + function to_array3(i1,i2,i3) result(arr) + + integer :: i1,i2,i3,arr(3) + arr=(/i1,i2,i3/) + end function to_array3 + + function to_array4(i1,i2,i3,i4) result(arr) + + integer :: i1,i2,i3,i4,arr(4) + arr=(/i1,i2,i3,i4/) + end function to_array4 + + function to_array5(i1,i2,i3,i4,i5) result(arr) + + integer :: i1,i2,i3,i4,i5,arr(5) + arr=(/i1,i2,i3,i4,i5/) + end function to_array5 + + function to_array6(i1,i2,i3,i4,i5,i6) result(arr) + + integer :: i1,i2,i3,i4,i5,i6,arr(6) + arr=(/i1,i2,i3,i4,i5,i6/) + end function to_array6 + +end module m_libpaw_defs +!!*** diff --git a/GX-PAW/libpaw/src/m_libpaw_libxc.F90 b/GX-PAW/libpaw/src/m_libpaw_libxc.F90 new file mode 100644 index 00000000..4aaad802 --- /dev/null +++ b/GX-PAW/libpaw/src/m_libpaw_libxc.F90 @@ -0,0 +1,2535 @@ +!!****m* ABINIT/m_libpaw_libxc_funcs +!! NAME +!! m_libpaw_libxc_funcs +!! +!! FUNCTION +!! Module containing interfaces to the LibXC library, for exchange +!! correlation potentials and energies. +!! +!! COPYRIGHT +!! Copyright (C) 2015-2024 ABINIT group (MO, MT) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! +!! NOTES +!! This file comes directly from m_libpaw_libxc.F90 module delivered with ABINIT. +!! It defines a structured datatype (libpaw_libxc_type) and associated methods +!! to initialize/finalize it and get properties from it. +!! * It uses by default a global variable (paw_xc_global, libpaw_libxc_type) which has +!! to be initialized/finalized with the libpaw_libxc_init and libpaw_libxc_end methods. +!! * It is also possible to define a local (private) variable of type libpaw_libxc_type. +!! For that, the different methods have to be called with an extra optional +!! argument (called xc_funcs in this example): +!! !!!!! call libpaw_libxc_init(ixc,nspden,xc_funcs) +!! !!!!! call libpaw_libxc_end(xc_funcs) +!! +!! SOURCE + +!Need iso C bindings provided by the compiler +#define LIBPAW_ISO_C_BINDING 1 + +#include "libpaw.h" + +module m_libpaw_libxc_funcs + + USE_DEFS + USE_MSG_HANDLING + USE_MEMORY_PROFILING + +!ISO C bindings are mandatory +#ifdef LIBPAW_ISO_C_BINDING + use, intrinsic :: iso_c_binding +#endif + + implicit none + private + +!Public functions + public :: libpaw_libxc_check ! Check if the code has been compiled with libXC + public :: libpaw_libxc_init ! Initialize a set of XC functional(s), from libXC + public :: libpaw_libxc_end ! End usage of a set of libXC functional(s) + public :: libpaw_libxc_fullname ! Return full name of a set of XC functional(s) + public :: libpaw_libxc_getid ! Return identifer of a XC functional, from its name + public :: libpaw_libxc_family_from_id ! Retrieve family of a XC functional, from its id + public :: libpaw_libxc_ixc ! The value of ixc used to initialize the XC functional(s) + public :: libpaw_libxc_islda ! Return TRUE if the set of XC functional(s) is LDA + public :: libpaw_libxc_isgga ! Return TRUE if the set of XC functional(s) is GGA or meta-GGA + public :: libpaw_libxc_ismgga ! Return TRUE if the set of XC functional(s) is meta-GGA + public :: libpaw_libxc_is_tb09 ! Return TRUE if the XC functional is Tran-Blaha 2009. + public :: libpaw_libxc_set_c_tb09 ! Set c parameter for Tran-Blaha 2009 functional + public :: libpaw_libxc_needs_laplacian ! Return TRUE if the set of XC functional uses LAPLACIAN + public :: libpaw_libxc_needs_temperature ! Return TRUE if the set of XC functional(s) uses the elec. temperature + public :: libpaw_libxc_set_temperature ! Set electronic temperature in a set of XC functional(s) + public :: libpaw_libxc_has_kxc ! Return TRUE if Kxc (3rd der) is available for a set of XC functional(s) + public :: libpaw_libxc_has_k3xc ! Return TRUE if K3xc (4th der) is available for a set of XC functional(s) + public :: libpaw_libxc_nspin ! The number of spin components for a set of XC functional(s) + public :: libpaw_libxc_is_hybrid ! Return TRUE if a set of XC functional(s) is hybrid + public :: libpaw_libxc_is_hybrid_from_id ! Return TRUE if a XC functional is hybrid, from its id + public :: libpaw_libxc_get_hybridparams ! Retrieve parameter(s) hybrid functional(s) + public :: libpaw_libxc_set_hybridparams ! Change parameter(s) of hybrid functional(s) + public :: libpaw_libxc_gga_from_hybrid ! Return the id of the XC-GGA used for the hybrid + public :: libpaw_libxc_getvxc ! Return XC potential and energy, from input density + +!Private functions + private :: libpaw_libxc_compute_tb09 ! Compute c parameter for Tran-Blaha 2009 functional + private :: libpaw_libxc_getrefs ! Get references of a single XC functional + private :: libpaw_libxc_depends_on_temp ! TRUE if a single functional depends on elec. temperature + private :: libpaw_libxc_set_temp ! Set electronic temperature in a single XC functional + private :: libpaw_libxc_constants_load ! Load libXC constants from C headers +#ifdef LIBPAW_ISO_C_BINDING + private :: char_f_to_c ! Convert a string from Fortran to C + private :: char_c_to_f ! Convert a string from C to Fortran +#endif + +!Public constants (use libpaw_libxc_constants_load to init them) + integer,public,save :: LIBPAW_XC_FAMILY_UNKNOWN = -1 + integer,public,save :: LIBPAW_XC_FAMILY_LDA = 1 + integer,public,save :: LIBPAW_XC_FAMILY_GGA = 2 + integer,public,save :: LIBPAW_XC_FAMILY_MGGA = 4 + integer,public,save :: LIBPAW_XC_FAMILY_LCA = 8 + integer,public,save :: LIBPAW_XC_FAMILY_OEP = 16 + integer,public,save :: LIBPAW_XC_FAMILY_HYB_GGA = 32 + integer,public,save :: LIBPAW_XC_FAMILY_HYB_MGGA = 64 + integer,public,save :: LIBPAW_XC_FAMILY_HYB_LDA =128 + integer,public,save :: LIBPAW_XC_FLAGS_HAVE_EXC = 1 + integer,public,save :: LIBPAW_XC_FLAGS_HAVE_VXC = 2 + integer,public,save :: LIBPAW_XC_FLAGS_HAVE_FXC = 4 + integer,public,save :: LIBPAW_XC_FLAGS_HAVE_KXC = 8 + integer,public,save :: LIBPAW_XC_FLAGS_HAVE_LXC = 16 + integer,public,save :: LIBPAW_XC_FLAGS_NEEDS_LAPLACIAN= 32768 + integer,public,save :: LIBPAW_XC_EXCHANGE = 0 + integer,public,save :: LIBPAW_XC_CORRELATION = 1 + integer,public,save :: LIBPAW_XC_EXCHANGE_CORRELATION = 2 + integer,public,save :: LIBPAW_XC_KINETIC = 3 + integer,public,save :: LIBPAW_XC_SINGLE_PRECISION = 0 + logical,private,save :: libpaw_xc_constants_initialized=.false. + +!XC functional public type + type,public :: libpaw_libxc_type + integer :: id ! identifier + integer :: family ! LDA, GGA, etc. + integer :: kind ! EXCHANGE, CORRELATION, etc. + integer :: nspin ! # of spin components + integer :: abi_ixc ! Abinit IXC id for this functional + logical :: has_exc ! TRUE is exc is available for the functional + logical :: has_vxc ! TRUE is vxc is available for the functional + logical :: has_fxc ! TRUE is fxc is available for the functional + logical :: has_kxc ! TRUE is kxc is available for the functional + logical :: needs_laplacian ! TRUE is functional needs laplacian of density + logical :: is_hybrid ! TRUE is functional is a hybrid functional + real(dp) :: hyb_mixing ! Hybrid functional: mixing factor of Fock contribution (default=0) + real(dp) :: hyb_mixing_sr ! Hybrid functional: mixing factor of SR Fock contribution (default=0) + real(dp) :: hyb_range ! Range (for separation) for a hybrid functional (default=0) + real(dp) :: temperature ! Electronic temperature; if <=0, the functional doesnt depend on it + real(dp) :: xc_tb09_c ! Special TB09 functional parameter + real(dp) :: sigma_threshold ! Value of a threshold to be applied on density gradient (sigma) + ! (temporary dur to a libxc bug) - If <0, apply no filter +#ifdef LIBPAW_ISO_C_BINDING + type(C_PTR),pointer :: conf => null() ! C pointer to the functional itself +#endif + end type libpaw_libxc_type + +!List of functionals on which a filter has to be applied on sigma (density gradient) +! This should be done by libXC via _set_sigma_threshold but this is not (libXC 6) + real(dp),parameter :: libpaw_sigma_threshold_def = 1.0e-25_dp + integer,parameter :: libpaw_n_sigma_filtered = 17 + character(len=28) :: libpaw_sigma_filtered(libpaw_n_sigma_filtered) = & +& ['XC_HYB_GGA_XC_HSE03 ','XC_HYB_GGA_XC_HSE06 ','XC_HYB_GGA_XC_HJS_PBE ',& +& 'XC_HYB_GGA_XC_HJS_PBE_SOL ','XC_HYB_GGA_XC_HJS_B88 ','XC_HYB_GGA_XC_HJS_B97X ',& +& 'XC_HYB_GGA_XC_LRC_WPBEH ','XC_HYB_GGA_XC_LRC_WPBE ','XC_HYB_GGA_XC_LC_WPBE ',& +& 'XC_HYB_GGA_XC_HSE12 ','XC_HYB_GGA_XC_HSE12S ','XC_HYB_GGA_XC_HSE_SOL ',& +& 'XC_HYB_GGA_XC_LC_WPBE_WHS ','XC_HYB_GGA_XC_LC_WPBEH_WHS ','XC_HYB_GGA_XC_LC_WPBE08_WHS ',& +& 'XC_HYB_GGA_XC_LC_WPBESOL_WHS','XC_HYB_GGA_XC_WHPBE0 '] + +!---------------------------------------------------------------------- + +!Private global XC functional + type(libpaw_libxc_type),target,save :: paw_xc_global(2) + +!---------------------------------------------------------------------- + +!Interfaces for C bindings +#ifdef LIBPAW_ISO_C_BINDING + interface + integer(C_INT) function xc_func_init(xc_func,functional,nspin) bind(C,name="xc_func_init") + use, intrinsic :: iso_c_binding, only : C_INT,C_PTR + integer(C_INT),value :: functional,nspin + type(C_PTR) :: xc_func + end function xc_func_init + end interface +! + interface + subroutine xc_func_end(xc_func) bind(C,name="xc_func_end") + use, intrinsic :: iso_c_binding, only : C_PTR + type(C_PTR) :: xc_func + end subroutine xc_func_end + end interface +! + interface + integer(C_INT) function xc_functional_get_number(name) & +& bind(C,name="xc_functional_get_number") + use, intrinsic :: iso_c_binding, only : C_INT,C_PTR + type(C_PTR),value :: name + end function xc_functional_get_number + end interface +! + interface + type(C_PTR) function xc_functional_get_name(number) & +& bind(C,name="xc_functional_get_name") + use, intrinsic :: iso_c_binding, only : C_INT,C_PTR + integer(C_INT),value :: number + end function xc_functional_get_name + end interface +! + interface + integer(C_INT) function xc_family_from_id(id,family,number) & +& bind(C,name="xc_family_from_id") + use, intrinsic :: iso_c_binding, only : C_INT,C_PTR + integer(C_INT),value :: id + type(C_PTR),value :: family,number + end function xc_family_from_id + end interface +! + interface + subroutine xc_hyb_cam_coef(xc_func,omega,alpha,beta) & +& bind(C,name="xc_hyb_cam_coef") + use, intrinsic :: iso_c_binding, only : C_DOUBLE,C_PTR + real(C_DOUBLE) :: omega,alpha,beta + type(C_PTR) :: xc_func + end subroutine xc_hyb_cam_coef + end interface +! + interface + subroutine libpaw_xc_get_lda(xc_func,np,rho,zk,vrho,v2rho2,v3rho3) & +& bind(C,name="libpaw_xc_get_lda") + use, intrinsic :: iso_c_binding, only : C_INT,C_PTR + integer(C_INT),value :: np + type(C_PTR),value :: rho,zk,vrho,v2rho2,v3rho3 + type(C_PTR) :: xc_func + end subroutine libpaw_xc_get_lda + end interface +! + interface + subroutine libpaw_xc_get_gga(xc_func,np,rho,sigma,zk,vrho,vsigma, & +& v2rho2,v2rhosigma,v2sigma2,v3rho3,v3rho2sigma,v3rhosigma2,v3sigma3) & +& bind(C,name="libpaw_xc_get_gga") + use, intrinsic :: iso_c_binding, only : C_INT,C_PTR + integer(C_INT),value :: np + type(C_PTR),value :: rho,sigma,zk,vrho,vsigma,v2rho2,v2rhosigma,v2sigma2, & +& v3rho3,v3rho2sigma,v3rhosigma2,v3sigma3 + type(C_PTR) :: xc_func + end subroutine libpaw_xc_get_gga + end interface +! + interface + subroutine libpaw_xc_get_mgga(xc_func,np,rho,sigma,lapl,tau,zk,vrho,vsigma,vlapl,vtau, & +& v2rho2,v2rhosigma,v2rholapl,v2rhotau,v2sigma2,v2sigmalapl, & +& v2sigmatau,v2lapl2,v2lapltau,v2tau2) & +& bind(C,name="libpaw_xc_get_mgga") + use, intrinsic :: iso_c_binding, only : C_INT,C_PTR + integer(C_INT),value :: np + type(C_PTR),value :: rho,sigma,lapl,tau,zk,vrho,vsigma,vlapl,vtau, & +& v2rho2,v2sigma2,v2lapl2,v2tau2,v2rhosigma,v2rholapl,v2rhotau, & +& v2sigmalapl,v2sigmatau,v2lapltau + type(C_PTR) :: xc_func + end subroutine libpaw_xc_get_mgga + end interface +! + interface + subroutine libpaw_xc_func_set_params(xc_func,params,n_params) bind(C) + use, intrinsic :: iso_c_binding, only : C_INT,C_DOUBLE,C_PTR + integer(C_INT),value :: n_params + real(C_DOUBLE) :: params(*) + type(C_PTR) :: xc_func + end subroutine libpaw_xc_func_set_params + end interface +! + interface + integer(C_INT) function libpaw_xc_func_set_params_name(xc_func,name,param) bind(C) + use, intrinsic :: iso_c_binding, only : C_INT,C_DOUBLE,C_PTR + real(C_DOUBLE) :: param + type(C_PTR) :: xc_func + type(C_PTR),value :: name + end function libpaw_xc_func_set_params_name + end interface +! + interface + type(C_PTR) function libpaw_xc_func_get_params_name(xc_func,ipar) bind(C) + use, intrinsic :: iso_c_binding, only : C_INT,C_PTR + type(C_PTR) :: xc_func + integer(C_INT) :: ipar + end function libpaw_xc_func_get_params_name + end interface +! + interface + type(C_PTR) function libpaw_xc_func_get_params_description(xc_func,ipar) bind(C) + use, intrinsic :: iso_c_binding, only : C_INT,C_PTR + type(C_PTR) :: xc_func + integer(C_INT) :: ipar + end function libpaw_xc_func_get_params_description + end interface +! + interface + subroutine libpaw_xc_func_set_density_threshold(xc_func,dens_threshold) bind(C) + use, intrinsic :: iso_c_binding, only : C_DOUBLE,C_PTR + real(C_DOUBLE) :: dens_threshold + type(C_PTR) :: xc_func + end subroutine libpaw_xc_func_set_density_threshold + end interface +! + interface + subroutine libpaw_xc_func_set_sig_threshold(xc_func,sigma_threshold) bind(C) + use, intrinsic :: iso_c_binding, only : C_DOUBLE,C_PTR + real(C_DOUBLE) :: sigma_threshold + type(C_PTR) :: xc_func + end subroutine libpaw_xc_func_set_sig_threshold + end interface +! + interface + integer(C_INT) function libpaw_xc_func_is_hybrid_from_id(func_id) bind(C) + use, intrinsic :: iso_c_binding, only : C_INT + integer(C_INT),value :: func_id + end function libpaw_xc_func_is_hybrid_from_id + end interface +! + interface + subroutine libpaw_xc_get_singleprecision_constant(xc_cst_singleprecision) & +& bind(C,name="libpaw_xc_get_singleprecision_constant") + use, intrinsic :: iso_c_binding, only : C_INT + integer(C_INT) :: xc_cst_singleprecision + end subroutine libpaw_xc_get_singleprecision_constant + end interface +! + interface + subroutine libpaw_xc_get_family_constants(xc_cst_unknown,xc_cst_lda,xc_cst_gga, & +& xc_cst_mgga,xc_cst_lca,xc_cst_oep,xc_cst_hyb_gga,xc_cst_hyb_mgga, & +& xc_cst_hyb_lda) & +& bind(C,name="libpaw_xc_get_family_constants") + use, intrinsic :: iso_c_binding, only : C_INT + integer(C_INT) :: xc_cst_unknown,xc_cst_lda,xc_cst_gga,xc_cst_mgga, & +& xc_cst_lca,xc_cst_oep,xc_cst_hyb_gga,xc_cst_hyb_mgga, & +& xc_cst_hyb_lda + end subroutine libpaw_xc_get_family_constants + end interface +! + interface + subroutine libpaw_xc_get_flags_constants(xc_cst_flags_have_exc,xc_cst_flags_have_vxc, & + xc_cst_flags_have_fxc,xc_cst_flags_have_kxc,xc_cst_flags_have_lxc, & +& xc_cst_flags_needs_lapl) & +& bind(C,name="libpaw_xc_get_flags_constants") + use, intrinsic :: iso_c_binding, only : C_INT + integer(C_INT) :: xc_cst_flags_have_exc,xc_cst_flags_have_vxc,xc_cst_flags_have_fxc, & +& xc_cst_flags_have_kxc,xc_cst_flags_have_lxc,xc_cst_flags_needs_lapl + end subroutine libpaw_xc_get_flags_constants + end interface +! + interface + subroutine libpaw_xc_get_kind_constants(xc_cst_exchange,xc_cst_correlation, & +& xc_cst_exchange_correlation,xc_cst_kinetic) & +& bind(C,name="libpaw_xc_get_kind_constants") + use, intrinsic :: iso_c_binding, only : C_INT + integer(C_INT) :: xc_cst_exchange,xc_cst_correlation, & +& xc_cst_exchange_correlation,xc_cst_kinetic + end subroutine libpaw_xc_get_kind_constants + end interface +! + interface + type(C_PTR) function libpaw_xc_func_type_malloc() & +& bind(C,name="libpaw_xc_func_type_malloc") + use, intrinsic :: iso_c_binding, only : C_PTR + end function libpaw_xc_func_type_malloc + end interface +! + interface + subroutine libpaw_xc_func_type_free(xc_func) & +& bind(C,name="libpaw_xc_func_type_free") + use, intrinsic :: iso_c_binding, only : C_PTR + type(C_PTR) :: xc_func + end subroutine libpaw_xc_func_type_free + end interface +! + interface + type(C_PTR) function libpaw_xc_get_info_name(xc_func) & +& bind(C,name="libpaw_xc_get_info_name") + use, intrinsic :: iso_c_binding, only : C_PTR + type(C_PTR) :: xc_func + end function libpaw_xc_get_info_name + end interface +! + interface + type(C_PTR) function libpaw_xc_get_info_refs(xc_func,iref) & +& bind(C,name="libpaw_xc_get_info_refs") + use, intrinsic :: iso_c_binding, only : C_INT,C_PTR + type(C_PTR) :: xc_func + integer(C_INT) :: iref + end function libpaw_xc_get_info_refs + end interface +! + interface + integer(C_INT) function libpaw_xc_get_info_flags(xc_func) & +& bind(C,name="libpaw_xc_get_info_flags") + use, intrinsic :: iso_c_binding, only : C_INT,C_PTR + type(C_PTR) :: xc_func + end function libpaw_xc_get_info_flags + end interface +! + interface + integer(C_INT) function libpaw_xc_get_info_kind(xc_func) & +& bind(C,name="libpaw_xc_get_info_kind") + use, intrinsic :: iso_c_binding, only : C_INT,C_PTR + type(C_PTR) :: xc_func + end function libpaw_xc_get_info_kind + end interface +#endif + +contains +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_libpaw_libxc_funcs/libpaw_libxc_check +!! NAME +!! libpaw_libxc_check +!! +!! FUNCTION +!! Check if the code has been compiled with an usable version of libXC +!! +!! INPUTS +!! [stop_if_error]=optional flag; if TRUE the code stops if libXC is not correctly used +!! +!! SOURCE + + function libpaw_libxc_check(stop_if_error) + +!Arguments ------------------------------------ + logical :: libpaw_libxc_check + logical,intent(in),optional :: stop_if_error +!Local variables------------------------------- + character(len=100) :: msg + +! ************************************************************************* + +#if defined LIBPAW_HAVE_LIBXC +#if defined LIBPAW_ISO_C_BINDING + if (.not.libpaw_xc_constants_initialized) call libpaw_libxc_constants_load() + if (LIBPAW_XC_SINGLE_PRECISION==1) then + libpaw_libxc_check=.false. + msg='LibXC should be compiled with double precision!' + end if +#else + libpaw_libxc_check=.false. + msg='LibXC cannot be used without ISO_C_BINDING support by the Fortran compiler!' +#endif +#else + libpaw_libxc_check=.false. + msg='LibPAW was not compiled with LibXC support.' +#endif + + if (present(stop_if_error)) then + if (stop_if_error.and.trim(msg)/="") then + LIBPAW_ERROR(msg) + end if + end if + + end function libpaw_libxc_check +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_libpaw_libxc_funcs/libpaw_libxc_init +!! NAME +!! libpaw_libxc_init +!! +!! FUNCTION +!! Initialize the desired (set of) XC functional(s), from LibXC. +!! * Call the LibXC initializer +!! * Fill preliminary fields in module structures. +!! +!! INPUTS +!! ixc=XC code for Abinit +!! nspden=number of spin-density components +!! [el_temp]=electronic temperature (optional, only for specific functionals) +!! [xc_tb09_c]=special argument for the Tran-Blaha 2009 functional +!! +!! SIDE EFFECTS +!! [xc_functionals(2)]=, optional argument +!! XC functionals to initialize +!! +!! SOURCE + + subroutine libpaw_libxc_init(ixc,nspden,xc_functionals,& +& el_temp,xc_tb09_c) ! optional argument + + +!Arguments ------------------------------------ + integer, intent(in) :: nspden + integer, intent(in) :: ixc + real(dp),intent(in),optional :: el_temp,xc_tb09_c + type(libpaw_libxc_type),intent(inout),optional,target :: xc_functionals(2) +!Local variables------------------------------- + integer :: ii,jj,nspden_eff + character(len=500) :: msg + type(libpaw_libxc_type),pointer :: xc_func +#if defined LIBPAW_HAVE_LIBXC && defined LIBPAW_ISO_C_BINDING + integer :: flags + integer(C_INT) :: func_id_c,iref_c,npar_c,nspin_c,success_c + real(C_DOUBLE) :: alpha_c,beta_c,omega_c,param_c(1) + character(kind=C_CHAR,len=1),pointer :: strg_c + type(C_PTR) :: func_ptr_c +#endif + +! ************************************************************************* + +!Check libXC + if (.not.libpaw_libxc_check(stop_if_error=.true.)) return + if (.not.libpaw_xc_constants_initialized) call libpaw_libxc_constants_load() + + nspden_eff=min(nspden,2) + +!Select XC functional(s) identifiers + if (present(xc_functionals)) then + xc_functionals(1)%id = -ixc/1000 + xc_functionals(2)%id = -ixc + (ixc/1000)*1000 + else + paw_xc_global(1)%id = -ixc/1000 + paw_xc_global(2)%id = -ixc + (ixc/1000)*1000 + end if + + do ii = 1,2 + +! Select XC functional + if (present(xc_functionals)) then + xc_func => xc_functionals(ii) + else + xc_func => paw_xc_global(ii) + end if + + xc_func%abi_ixc=ixc !Save abinit value for reference + + xc_func%family=LIBPAW_XC_FAMILY_UNKNOWN + xc_func%kind=-1 + xc_func%nspin=nspden_eff + xc_func%has_exc=.false. + xc_func%has_vxc=.false. + xc_func%has_fxc=.false. + xc_func%has_kxc=.false. + xc_func%needs_laplacian=.false. + xc_func%is_hybrid=.false. + xc_func%hyb_mixing=zero + xc_func%hyb_mixing_sr=zero + xc_func%hyb_range=zero + xc_func%xc_tb09_c=99.99_dp + xc_func%sigma_threshold=-one + + if (xc_func%id<=0) cycle + +! Get XC functional family + xc_func%family=libpaw_libxc_family_from_id(xc_func%id) + if (xc_func%family/=LIBPAW_XC_FAMILY_LDA .and. & +& xc_func%family/=LIBPAW_XC_FAMILY_GGA .and. & +& xc_func%family/=LIBPAW_XC_FAMILY_MGGA.and. & +& xc_func%family/=LIBPAW_XC_FAMILY_HYB_GGA) then + write(msg, '(a,i8,2a,i8,6a)' )& +& 'Invalid IXC = ',ixc,ch10,& +& 'The LibXC functional family ',xc_func%family,& +& 'is currently unsupported by LibPAW',ch10,& +& '(-1 means the family is unknown to the LibXC itself)',ch10,& +& 'Please consult the LibXC documentation',ch10 + LIBPAW_ERROR(msg) + end if + +#if defined LIBPAW_HAVE_LIBXC && defined LIBPAW_ISO_C_BINDING + +! Allocate functional + func_ptr_c=libpaw_xc_func_type_malloc() + call c_f_pointer(func_ptr_c,xc_func%conf) + +! Initialize functional + func_id_c=int(xc_func%id,kind=C_INT) + nspin_c=int(nspden_eff,kind=C_INT) + success_c=xc_func_init(xc_func%conf,func_id_c,nspin_c) + if (success_c/=0) then + msg='Error in libXC functional initialization!' + LIBPAW_ERROR(msg) + end if + +! Special treatment for LDA_C_XALPHA functional + if (xc_func%id==libpaw_libxc_getid('XC_LDA_C_XALPHA')) then + param_c(1)=real(zero,kind=C_DOUBLE);npar_c=int(1,kind=C_INT) + call libpaw_xc_func_set_params(xc_func%conf,param_c,npar_c) + end if + +! Special treatment for XC_MGGA_X_TB09 functional + if (xc_func%id==libpaw_libxc_getid('XC_MGGA_X_TB09')) then + if (.not.present(xc_tb09_c)) then + msg='xc_tb09_c argument is mandatory for TB09 functional!' + LIBPAW_BUG(msg) + end if + xc_func%xc_tb09_c=xc_tb09_c + end if + +! Get functional kind + xc_func%kind=int(libpaw_xc_get_info_kind(xc_func%conf)) + +! Get functional flags + flags=int(libpaw_xc_get_info_flags(xc_func%conf)) + xc_func%has_exc=(iand(flags,LIBPAW_XC_FLAGS_HAVE_EXC)>0) + xc_func%has_vxc=(iand(flags,LIBPAW_XC_FLAGS_HAVE_VXC)>0) + xc_func%has_fxc=(iand(flags,LIBPAW_XC_FLAGS_HAVE_FXC)>0) + xc_func%has_kxc=(iand(flags,LIBPAW_XC_FLAGS_HAVE_KXC)>0) + +! Retrieve parameters for metaGGA functionals + if (xc_func%family==LIBPAW_XC_FAMILY_MGGA.or. & +& xc_func%family==LIBPAW_XC_FAMILY_HYB_MGGA) then + xc_func%needs_laplacian=(iand(flags,LIBPAW_XC_FLAGS_NEEDS_LAPLACIAN)>0) + end if + +! Retrieve parameters for hybrid functionals + xc_func%is_hybrid=(libpaw_xc_func_is_hybrid_from_id(xc_func%id)==1) + if (xc_func%is_hybrid) then + call xc_hyb_cam_coef(xc_func%conf,omega_c,alpha_c,beta_c) + xc_func%hyb_mixing=real(alpha_c,kind=dp) + xc_func%hyb_mixing_sr=real(beta_c,kind=dp) + xc_func%hyb_range=real(omega_c,kind=dp) + end if + +! Possible temperature dependence + if (present(el_temp)) then + if (el_temp>tol10) then + if (libpaw_libxc_depends_on_temp(xc_func)) then + xc_func%temperature=el_temp + call libpaw_libxc_set_temp(xc_func,el_temp) + end if + end if + end if + +! Some functionals need a filter to be applied on sigma (density gradient) +! because libXC v6 doesn't implement sigma_threshold + if (xc_func%is_hybrid) then + do jj=1,libpaw_n_sigma_filtered + if (xc_func%id==libpaw_libxc_getid(trim(libpaw_sigma_filtered(jj)))) then + xc_func%sigma_threshold=libpaw_sigma_threshold_def + end if + end do + end if + +! Dump functional information + call c_f_pointer(libpaw_xc_get_info_name(xc_func%conf),strg_c) + call char_c_to_f(strg_c,msg) + call wrtout(std_out,msg,'COLL') + iref_c=0 + do while (iref_c>=0) + call c_f_pointer(libpaw_xc_get_info_refs(xc_func%conf,iref_c),strg_c) + if (associated(strg_c)) then + call char_c_to_f(strg_c,msg) + call wrtout(std_out,msg,'COLL') + iref_c=iref_c+1 + else + iref_c=-1 + end if + end do + +#else + if (.False.) write(std_out,*)xc_tb09_c +#endif + + end do + +end subroutine libpaw_libxc_init +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_libpaw_libxc_funcs/libpaw_libxc_end +!! NAME +!! libpaw_libxc_end +!! +!! FUNCTION +!! End usage of a (set of) XC functional(s). +!! Call LibXC end function and deallocate module contents. +!! +!! SIDE EFFECTS +!! [xc_functionals(2)]=, optional argument +!! XC functionals to initialize +!! +!! SOURCE + + subroutine libpaw_libxc_end(xc_functionals) + +!Arguments ------------------------------------ + type(libpaw_libxc_type),intent(inout),optional,target :: xc_functionals(2) +!Local variables------------------------------- + integer :: ii + type(libpaw_libxc_type),pointer :: xc_func + +! ************************************************************************* + + do ii = 1,2 + +! Select XC functional + if (present(xc_functionals)) then + xc_func => xc_functionals(ii) + else + xc_func => paw_xc_global(ii) + end if + + if (xc_func%id <= 0) cycle + xc_func%id=-1 + xc_func%family=-1 + xc_func%kind=-1 + xc_func%nspin=1 + xc_func%abi_ixc=huge(0) + xc_func%has_exc=.false. + xc_func%has_vxc=.false. + xc_func%has_fxc=.false. + xc_func%has_kxc=.false. + xc_func%needs_laplacian=.false. + xc_func%is_hybrid=.false. + xc_func%hyb_mixing_sr=zero + xc_func%hyb_range=zero + xc_func%xc_tb09_c=99.99_dp + xc_func%sigma_threshold=-one +#if defined LIBPAW_HAVE_LIBXC && defined LIBPAW_ISO_C_BINDING + if (associated(xc_func%conf)) then + call xc_func_end(xc_func%conf) + call libpaw_xc_func_type_free(c_loc(xc_func%conf)) + end if +#endif + + end do + + end subroutine libpaw_libxc_end +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_libpaw_libxc_funcs/libpaw_libxc_fullname +!! NAME +!! libpaw_libxc_fullname +!! +!! FUNCTION +!! Return full name of a (set of) XC functional(s) +!! +!! INPUTS +!! [xc_functionals(2)]=, optional argument +!! XC functionals to initialize +!! +!! SOURCE + + function libpaw_libxc_fullname(xc_functionals) + +!Arguments ------------------------------------ + character(len=100) :: libpaw_libxc_fullname + type(libpaw_libxc_type),intent(in),optional,target :: xc_functionals(2) +!Local variables------------------------------- + integer :: nxc + type(libpaw_libxc_type),pointer :: xc_funcs(:) +#if defined LIBPAW_HAVE_LIBXC && defined LIBPAW_ISO_C_BINDING + character(len=100) :: xcname + character(kind=C_CHAR,len=1),pointer :: strg_c +#endif + +! ************************************************************************* + + libpaw_libxc_fullname='No XC functional' + + if (present(xc_functionals)) then + xc_funcs => xc_functionals + else + xc_funcs => paw_xc_global + end if + + nxc=size(xc_funcs) + if (nxc<1) return + +#if defined LIBPAW_HAVE_LIBXC && defined LIBPAW_ISO_C_BINDING + if (nxc<2) then + if (xc_funcs(1)%id /= 0) then + call c_f_pointer(xc_functional_get_name(xc_funcs(1)%id),strg_c) + call char_c_to_f(strg_c,libpaw_libxc_fullname) + end if + else if (xc_funcs(1)%id <= 0) then + if (xc_funcs(2)%id /= 0) then + call c_f_pointer(xc_functional_get_name(xc_funcs(2)%id),strg_c) + call char_c_to_f(strg_c,libpaw_libxc_fullname) + end if + else if (xc_funcs(2)%id <= 0) then + if (xc_funcs(1)%id /= 0) then + call c_f_pointer(xc_functional_get_name(xc_funcs(1)%id),strg_c) + call char_c_to_f(strg_c,libpaw_libxc_fullname) + end if + else + call c_f_pointer(xc_functional_get_name(xc_funcs(1)%id),strg_c) + call char_c_to_f(strg_c,libpaw_libxc_fullname) + call c_f_pointer(xc_functional_get_name(xc_funcs(2)%id),strg_c) + call char_c_to_f(strg_c,xcname) + libpaw_libxc_fullname=trim(libpaw_libxc_fullname)//'+'//trim(xcname) + end if + libpaw_libxc_fullname=trim(libpaw_libxc_fullname) +#endif + +end function libpaw_libxc_fullname +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_libpaw_libxc_funcs/libpaw_libxc_getid +!! NAME +!! libpaw_libxc_getid +!! +!! FUNCTION +!! Return identifer of a XC functional from its name +!! Return -1 if undefined +!! +!! INPUTS +!! xcname= string containing the name of a XC functional +!! +!! SOURCE + + function libpaw_libxc_getid(xcname) + +!Arguments ------------------------------------ + integer :: libpaw_libxc_getid + character(len=*),intent(in) :: xcname +!Local variables------------------------------- +#if defined LIBPAW_HAVE_LIBXC && defined LIBPAW_ISO_C_BINDING + character(len=256) :: str + character(kind=C_CHAR,len=1),target :: name_c(len_trim(xcname)+1) + character(kind=C_CHAR,len=1),target :: name_c_xc(len_trim(xcname)-2) + type(C_PTR) :: name_c_ptr +#endif + +! ************************************************************************* + +#if defined LIBPAW_HAVE_LIBXC && defined LIBPAW_ISO_C_BINDING + str=trim(xcname) + if (xcname(1:3)=="XC_".or.xcname(1:3)=="xc_") then + str=xcname(4:);name_c_xc=char_f_to_c(str) + name_c_ptr=c_loc(name_c_xc) + else + name_c=char_f_to_c(str) + name_c_ptr=c_loc(name_c) + end if + libpaw_libxc_getid=int(xc_functional_get_number(name_c_ptr)) +#else + libpaw_libxc_getid=-1 + if (.false.) write(std_out,*) xcname +#endif + +end function libpaw_libxc_getid +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_libpaw_libxc_funcs/libpaw_libxc_family_from_id +!! NAME +!! libpaw_libxc_family_from_id +!! +!! FUNCTION +!! Return family of a XC functional from its id +!! +!! INPUTS +!! xcid= id of a LibXC functional +!! +!! SOURCE + + function libpaw_libxc_family_from_id(xcid) + +!Arguments ------------------------------------ + integer :: libpaw_libxc_family_from_id + integer,intent(in) :: xcid +!Local variables------------------------------- +#if defined LIBPAW_HAVE_LIBXC && defined LIBPAW_ISO_C_BINDING + integer(C_INT) :: xcid_c +#endif + +! ************************************************************************* + +#if defined LIBPAW_HAVE_LIBXC && defined LIBPAW_ISO_C_BINDING + xcid_c=int(xcid,kind=C_INT) + libpaw_libxc_family_from_id=int(xc_family_from_id(xcid_c,C_NULL_PTR,C_NULL_PTR)) +#else + libpaw_libxc_family_from_id=-1 + if (.false.) write(std_out,*) xcid +#endif + +end function libpaw_libxc_family_from_id +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_libpaw_libxc_funcs/libpaw_libxc_ixc +!! NAME +!! libpaw_libxc_ixc +!! +!! FUNCTION +!! Return the value of ixc used to initialize the XC structure +!! +!! INPUTS +!! [xc_functionals(2)]=, optional argument +!! XC functionals to initialize +!! +!! SOURCE + + function libpaw_libxc_ixc(xc_functionals) + +!Arguments ------------------------------------ + integer :: libpaw_libxc_ixc + type(libpaw_libxc_type),intent(in),optional :: xc_functionals(2) + +! ************************************************************************* + + if (present(xc_functionals)) then + libpaw_libxc_ixc=xc_functionals(1)%abi_ixc + else + libpaw_libxc_ixc=paw_xc_global(1)%abi_ixc + end if + +end function libpaw_libxc_ixc +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_libpaw_libxc_funcs/libpaw_libxc_islda +!! NAME +!! libpaw_libxc_islda +!! +!! FUNCTION +!! Test function to identify whether the presently used (set of) functional(s) +!! is a LDA or not +!! +!! INPUTS +!! [xc_functionals(2)]=, optional argument +!! XC functionals to initialize +!! +!! SOURCE + + function libpaw_libxc_islda(xc_functionals) + +!Arguments ------------------------------------ + logical :: libpaw_libxc_islda + type(libpaw_libxc_type),intent(in),optional :: xc_functionals(2) + +! ************************************************************************* + + libpaw_libxc_islda = .false. + if (.not.libpaw_xc_constants_initialized) call libpaw_libxc_constants_load() + + if (present(xc_functionals)) then + libpaw_libxc_islda=(any(xc_functionals%family==LIBPAW_XC_FAMILY_LDA) .or. & +& any(xc_functionals%family==LIBPAW_XC_FAMILY_HYB_LDA)) + else + libpaw_libxc_islda=(any(paw_xc_global%family==LIBPAW_XC_FAMILY_LDA) .or. & +& any(paw_xc_global%family==LIBPAW_XC_FAMILY_HYB_LDA)) + end if + +end function libpaw_libxc_islda +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_libpaw_libxc_funcs/libpaw_libxc_isgga +!! NAME +!! libpaw_libxc_isgga +!! +!! FUNCTION +!! Test function to identify whether the presently used (set of) functional(s) +!! is a GGA or not +!! +!! INPUTS +!! [xc_functionals(2)]=, optional argument +!! XC functionals to initialize +!! +!! SOURCE + + function libpaw_libxc_isgga(xc_functionals) + +!Arguments ------------------------------------ + logical :: libpaw_libxc_isgga + type(libpaw_libxc_type),intent(in),optional :: xc_functionals(2) + +! ************************************************************************* + + libpaw_libxc_isgga = .false. + if (.not.libpaw_xc_constants_initialized) call libpaw_libxc_constants_load() + + if (present(xc_functionals)) then + libpaw_libxc_isgga=(any(xc_functionals%family==LIBPAW_XC_FAMILY_GGA) .or. & +& any(xc_functionals%family==LIBPAW_XC_FAMILY_HYB_GGA)) + else + libpaw_libxc_isgga=(any(paw_xc_global%family==LIBPAW_XC_FAMILY_GGA) .or. & +& any(paw_xc_global%family==LIBPAW_XC_FAMILY_HYB_GGA)) + end if + +end function libpaw_libxc_isgga +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_libpaw_libxc_funcs/libpaw_libxc_ismgga +!! NAME +!! libpaw_libxc_ismgga +!! +!! FUNCTION +!! Test function to identify whether the presently used (set of) functional(s) +!! is a Meta-GGA or not +!! +!! INPUTS +!! [xc_functionals(2)]=, optional argument +!! XC functionals to initialize +!! +!! SOURCE + +function libpaw_libxc_ismgga(xc_functionals) + +!Arguments ------------------------------------ + logical :: libpaw_libxc_ismgga + type(libpaw_libxc_type),intent(in),optional :: xc_functionals(2) + +! ************************************************************************* + + libpaw_libxc_ismgga = .false. + if (.not.libpaw_xc_constants_initialized) call libpaw_libxc_constants_load() + + if (present(xc_functionals)) then + libpaw_libxc_ismgga=(any(xc_functionals%family==LIBPAW_XC_FAMILY_MGGA) .or. & +& any(xc_functionals%family==LIBPAW_XC_FAMILY_HYB_MGGA)) + else + libpaw_libxc_ismgga=(any(paw_xc_global%family==LIBPAW_XC_FAMILY_MGGA) .or. & +& any(paw_xc_global%family==LIBPAW_XC_FAMILY_HYB_MGGA)) + end if + +end function libpaw_libxc_ismgga +!!*** + +!---------------------------------------------------------------------- + +!!****f* libpaw_libxc_funcs/libpaw_libxc_is_tb09 +!! NAME +!! libpaw_libxc_is_tb09 +!! +!! FUNCTION +!! Test function to identify whether the presently used functional +!! is Tran-Blaha 2009 or not +!! +!! INPUTS +!! [xc_functionals(2)]=, optional argument +!! Handle for XC functionals +!! +!! SOURCE + +logical function libpaw_libxc_is_tb09(xc_functionals) result(ans) + +!Arguments ------------------------------------ + type(libpaw_libxc_type),intent(in),optional :: xc_functionals(2) + +! ************************************************************************* + + ans = .false. + if (.not.libpaw_xc_constants_initialized) call libpaw_libxc_constants_load() + + if (present(xc_functionals)) then + ans = any(xc_functionals%id == libpaw_libxc_getid('XC_MGGA_X_TB09')) + else + ans = any(paw_xc_global%id == libpaw_libxc_getid('XC_MGGA_X_TB09')) + end if + +end function libpaw_libxc_is_tb09 +!!*** + +!---------------------------------------------------------------------- + +!!****f* libpaw_libxc_funcs/libpaw_libxcset_c_tb09 +!! NAME +!! libpaw_libxc_set_c_tb09 +!! +!! FUNCTION +!! Set c parameter for the Tran-Blaha 2009 functional +!! +!! INPUTS +!! xc_c_tb09= value of the c parameter to set for the TB09 functional +!! [xc_functionals(2)]=, optional argument +!! Handle for XC functionals +!! +!! SOURCE + +subroutine libpaw_libxc_set_c_tb09(xc_tb09_c,xc_functionals) + +!Arguments ------------------------------------ + real(dp),intent(in) :: xc_tb09_c + type(libpaw_libxc_type),intent(inout),optional :: xc_functionals(2) +!Local variables ------------------------------- + integer :: ii + +! ************************************************************************* + + if (present(xc_functionals)) then + do ii=1,2 + if (xc_functionals(ii)%id == libpaw_libxc_getid('XC_MGGA_X_TB09')) then + xc_functionals(ii)%xc_tb09_c = xc_tb09_c + end if + end do + else + do ii=1,2 + if (paw_xc_global(ii)%id == libpaw_libxc_getid('XC_MGGA_X_TB09')) then + paw_xc_global(ii)%xc_tb09_c = xc_tb09_c + end if + end do + end if + +end subroutine libpaw_libxc_set_c_tb09 +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_libpaw_libxc_funcs/libpaw_libxc_needs_laplacian +!! NAME +!! libpaw_libxc_needs_laplacian +!! +!! FUNCTION +!! Test function to identify whether the presently used (set of) functional(s) +!! needs the laplacian of the density or not +!! +!! INPUTS +!! [xc_functionals(2)]=, optional argument +!! Handle for XC functionals +!! +!! SOURCE + + function libpaw_libxc_needs_laplacian(xc_functionals) + +!Arguments ------------------------------------ + implicit none + logical :: libpaw_libxc_needs_laplacian + type(libpaw_libxc_type),intent(in),optional :: xc_functionals(2) + +! ************************************************************************* + + libpaw_libxc_needs_laplacian = .false. + + if (present(xc_functionals)) then + libpaw_libxc_needs_laplacian=(any(xc_functionals%needs_laplacian)) + else + libpaw_libxc_needs_laplacian=(any(paw_xc_global%needs_laplacian)) + end if + + end function libpaw_libxc_needs_laplacian +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_libpaw_libxc_funcs/libpaw_libxc_needs_temperature +!! NAME +!! libpaw_libxc_needs_temperature +!! +!! FUNCTION +!! Test function to identify whether the presently used (set of) functional(s) +!! needs the electronic temperature or not +!! +!! INPUTS +!! [xc_functionals(2)]=, optional argument +!! Handle for XC functionals +!! +!! SOURCE + + function libpaw_libxc_needs_temperature(xc_functionals) + +!Arguments ------------------------------------ + implicit none + logical :: libpaw_libxc_needs_temperature + type(libpaw_libxc_type),intent(in),optional :: xc_functionals(2) + +! ************************************************************************* + + libpaw_libxc_needs_temperature = .false. + + if (present(xc_functionals)) then + libpaw_libxc_needs_temperature=(any(xc_functionals%temperature>tol8)) + else + libpaw_libxc_needs_temperature=(any(paw_xc_global%temperature>tol8)) + end if + + end function libpaw_libxc_needs_temperature +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_libpaw_libxc_funcs/libpaw_libxc_set_temperature +!! NAME +!! libpaw_libxc_set_temperature +!! +!! FUNCTION +!! Set the electronic temperature in a (set of) of XC functional(s) +!! No action when no temperature dependence +!! +!! INPUTS +!! temperature=electronic temperature (in Kelvin units) +!! [xc_functionals(2)]=, optional argument +!! Handle for XC functionals +!! +!! OUTPUT +!! +!! SOURCE + +subroutine libpaw_libxc_set_temperature(temperature,xc_functionals) + +!Arguments ------------------------------------ + real(dp),intent(in) :: temperature + type(libpaw_libxc_type),intent(in),optional,target :: xc_functionals(2) +!Local variables ------------------------------- + integer :: ii + type(libpaw_libxc_type),pointer :: xc_func + +! ************************************************************************* + + do ii = 1, 2 + +! Select XC functional + if (present(xc_functionals)) then + xc_func => xc_functionals(ii) + else + xc_func => paw_xc_global(ii) + end if + + if (xc_func%id>0) then + call libpaw_libxc_set_temp(xc_func,temperature) + end if + + end do + +end subroutine libpaw_libxc_set_temperature +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_libpaw_libxc_funcs/libpaw_libxc_has_kxc +!! NAME +!! libpaw_libxc_has_kxc +!! +!! FUNCTION +!! Test function to identify whether the presently used (set of) functional(s) +!! provides Kxc or not (fxc in the libXC convention) +!! +!! INPUTS +!! [xc_functionals(2)]=, optional argument +!! XC functionals +!! +!! SOURCE + +function libpaw_libxc_has_kxc(xc_functionals) + +!Arguments ------------------------------------ + logical :: libpaw_libxc_has_kxc + type(libpaw_libxc_type),intent(in),optional,target :: xc_functionals(2) +!Local variables------------------------------- + integer :: ii + +! ************************************************************************* + + libpaw_libxc_has_kxc=.true. + + do ii=1,2 + if (present(xc_functionals)) then + if (.not.xc_functionals(ii)%has_fxc) libpaw_libxc_has_kxc=.false. + else + if (.not.paw_xc_global(ii)%has_fxc) libpaw_libxc_has_kxc=.false. + end if + end do + +end function libpaw_libxc_has_kxc +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_libpaw_libxc_funcs/libpaw_libxc_has_k3xc +!! NAME +!! libpaw_libxc_has_k3xc +!! +!! FUNCTION +!! Test function to identify whether the presently used (set of) functional(s) +!! provides K3xc or not (kxc in the libXC convention) +!! +!! INPUTS +!! [xc_functionals(2)]=, optional argument +!! Handle for XC functionals +!! +!! SOURCE + +function libpaw_libxc_has_k3xc(xc_functionals) + +!Arguments ------------------------------------ + logical :: libpaw_libxc_has_k3xc + type(libpaw_libxc_type),intent(in),optional,target :: xc_functionals(2) +!Local variables------------------------------- + integer :: ii + +! ************************************************************************* + + libpaw_libxc_has_k3xc=.true. + + do ii=1,2 + if (present(xc_functionals)) then + if (.not.xc_functionals(ii)%has_kxc) libpaw_libxc_has_k3xc=.false. + else + if (.not.paw_xc_global(ii)%has_kxc) libpaw_libxc_has_k3xc=.false. + end if + end do + +end function libpaw_libxc_has_k3xc +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_libpaw_libxc_funcs/libpaw_libxc_nspin +!! NAME +!! libpaw_libxc_nspin +!! +!! FUNCTION +!! Returns the number of spin components for the (set of) XC functional(s) +!! +!! INPUTS +!! [xc_functionals(2)]=, optional argument +!! XC functionals to initialize +!! +!! SOURCE + +function libpaw_libxc_nspin(xc_functionals) + +!Arguments ------------------------------------ + integer :: libpaw_libxc_nspin + type(libpaw_libxc_type),intent(in),optional :: xc_functionals(2) + +! ************************************************************************* + + libpaw_libxc_nspin = 1 + + if (present(xc_functionals)) then + if (any(xc_functionals%nspin==2)) libpaw_libxc_nspin=2 + else + if (any(paw_xc_global%nspin==2)) libpaw_libxc_nspin=2 + end if + +end function libpaw_libxc_nspin +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_libpaw_libxc_funcs/libpaw_libxc_is_hybrid +!! NAME +!! libpaw_libxc_is_hybrid +!! +!! FUNCTION +!! Test function to identify whether the presently used (set of) functional(s) +!! is hybrid or not +!! +!! INPUTS +!! [xc_functionals(2)]=, optional argument +!! XC functionals to initialize +!! +!! SOURCE + + function libpaw_libxc_is_hybrid(xc_functionals) + +!Arguments ------------------------------------ + logical :: libpaw_libxc_is_hybrid + type(libpaw_libxc_type),intent(in),optional :: xc_functionals(2) + +! ************************************************************************* + + libpaw_libxc_is_hybrid = .false. + + if (present(xc_functionals)) then + libpaw_libxc_is_hybrid=(any(xc_functionals%is_hybrid)) + else + libpaw_libxc_is_hybrid=(any(paw_xc_global%is_hybrid)) + end if + +end function libpaw_libxc_is_hybrid +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_libpaw_libxc_funcs/libpaw_libxc_is_hybrid_from_id +!! NAME +!! libpaw_libxc_is_hybrid_from_id +!! +!! FUNCTION +!! Test function to identify whether a functional is hybrid or not, from its id +!! +!! INPUTS +!! xcid= id of a LibXC functional +!! +!! SOURCE + + function libpaw_libxc_is_hybrid_from_id(xcid) + +!Arguments ------------------------------------ + logical :: libpaw_libxc_is_hybrid_from_id + integer,intent(in) :: xcid +!Local variables------------------------------- +#if defined LIBPAW_HAVE_LIBXC && defined LIBPAW_ISO_C_BINDING + integer(C_INT) :: xcid_c +#endif + +! ************************************************************************* + +#if defined LIBPAW_HAVE_LIBXC && defined LIBPAW_ISO_C_BINDING + xcid_c=int(xcid,kind=C_INT) + libpaw_libxc_is_hybrid_from_id =(libpaw_xc_func_is_hybrid_from_id(xcid_c)==1) +#else + libpaw_libxc_is_hybrid_from_id = .false. + if (.false.) write(std_out,*) xcid +#endif + +end function libpaw_libxc_is_hybrid_from_id +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_libpaw_libxc_funcs/libpaw_libxc_get_hybridparams +!! NAME +!! libpaw_libxc_get_hybridparams +!! +!! FUNCTION +!! Returns the parameters of an hybrid functional (mixing coefficient(s) and range separation) +!! Applies on a (set of) functional(s) +!! +!! INPUTS +!! [xc_functionals(2)]=, optional argument +!! XC functionals to initialize +!! +!! OUTPUT +!! [hyb_mixing] = mixing factor of Fock contribution +!! [hyb_mixing_sr]= mixing factor of short-range Fock contribution +!! [hyb_range] = Range (for separation) +!! +!! SOURCE + +subroutine libpaw_libxc_get_hybridparams(hyb_mixing,hyb_mixing_sr,hyb_range,xc_functionals) + +!Arguments ------------------------------------ + real(dp),intent(out),optional :: hyb_mixing,hyb_mixing_sr,hyb_range + type(libpaw_libxc_type),intent(in),optional,target :: xc_functionals(2) +!Local variables ------------------------------- + integer :: ii + character(len=500) :: msg + type(libpaw_libxc_type),pointer :: xc_func + +! ************************************************************************* + + if (present(hyb_mixing )) hyb_mixing =zero + if (present(hyb_mixing_sr)) hyb_mixing_sr=zero + if (present(hyb_range )) hyb_range =zero + + do ii = 1, 2 + +! Select XC functional + if (present(xc_functionals)) then + xc_func => xc_functionals(ii) + else + xc_func => paw_xc_global(ii) + end if + +! Mixing coefficient for the Fock contribution + if (present(hyb_mixing)) then + if (abs(xc_func%hyb_mixing) > tol8) then + if (abs(hyb_mixing) <= tol8) then + hyb_mixing=xc_func%hyb_mixing + else + msg='Invalid XC functional: contains 2 hybrid exchange functionals!' + LIBPAW_ERROR(msg) + end if + end if + end if + +! Mixing coefficient for the short-range Fock contribution + if (present(hyb_mixing_sr)) then + if (abs(xc_func%hyb_mixing_sr) > tol8) then + if (abs(hyb_mixing_sr) <= tol8) then + hyb_mixing_sr=xc_func%hyb_mixing_sr + else + msg='Invalid XC functional: contains 2 hybrid exchange functionals!' + LIBPAW_ERROR(msg) + end if + end if + end if + +! Range separation + if (present(hyb_range)) then + if (abs(xc_func%hyb_range) > tol8) then + if (abs(hyb_range) <= tol8) then + hyb_range=xc_func%hyb_range + else + msg='Invalid XC functional: contains 2 hybrid exchange functionals!' + LIBPAW_ERROR(msg) + end if + end if + end if + + end do + +end subroutine libpaw_libxc_get_hybridparams +!!*** + +!---------------------------------------------------------------------- + +!!****f* libpaw_libxc_funcs/libpaw_libxc_set_hybridparams +!! NAME +!! libpaw_libxc_set_hybridparams +!! +!! FUNCTION +!! Set the parameters of an hybrid functional (mixing coefficient(s) and range separation) +!! Applies on a (set of) functional(s) +!! +!! INPUTS +!! [hyb_mixing] = mixing factor of Fock contribution +!! [hyb_mixing_sr] = mixing factor of short-range Fock contribution +!! [hyb_range] = Range (for separation) +!! [xc_functionals(2)]=, optional argument +!! XC functionals to initialize +!! +!! OUTPUT +!! +!! SOURCE + +subroutine libpaw_libxc_set_hybridparams(hyb_mixing,hyb_mixing_sr,hyb_range,xc_functionals) + +!Arguments ------------------------------------ + real(dp),intent(in),optional :: hyb_mixing,hyb_mixing_sr,hyb_range + type(libpaw_libxc_type),intent(in),optional,target :: xc_functionals(2) +!Local variables ------------------------------- + integer :: ii,id_pbe0,id_hse03,id_hse06 + logical :: is_pbe0,is_hse + character(len=500) :: msg + type(libpaw_libxc_type),pointer :: xc_func +#if defined LIBPAW_HAVE_LIBXC && defined LIBPAW_ISO_C_BINDING + integer(C_INT) :: npar_c + real(C_DOUBLE) :: alpha_c,beta_c,omega_c,param_c(3) +#endif + +! ************************************************************************* + + is_pbe0=.false. + is_hse =.false. + id_pbe0=libpaw_libxc_getid('HYB_GGA_XC_PBEH') + id_hse03=libpaw_libxc_getid('HYB_GGA_XC_HSE03') + id_hse06=libpaw_libxc_getid('HYB_GGA_XC_HSE06') + + do ii = 1, 2 + +! Select XC functional + if (present(xc_functionals)) then + xc_func => xc_functionals(ii) + else + xc_func => paw_xc_global(ii) + end if + +! Doesnt work with all hybrid functionals + if (is_pbe0.or.is_hse) then + msg='Invalid XC functional: contains 2 hybrid exchange functionals!' + LIBPAW_ERROR(msg) + end if + is_pbe0=(xc_func%id==id_pbe0) + is_hse=((xc_func%id==id_hse03).or.(xc_func%id==id_hse06)) + if ((.not.is_pbe0).and.(.not.is_hse)) cycle + +#if defined LIBPAW_HAVE_LIBXC && defined LIBPAW_ISO_C_BINDING +! First retrieve current values of parameters + call xc_hyb_cam_coef(xc_func%conf,omega_c,alpha_c,beta_c) + +! New values for parameters + if (present(hyb_mixing)) alpha_c=real(hyb_mixing,kind=C_DOUBLE) + if (present(hyb_mixing_sr)) beta_c=real(hyb_mixing_sr,kind=C_DOUBLE) + if (present(hyb_range)) omega_c=real(hyb_range,kind=C_DOUBLE) + +! PBE0: set parameters + if (is_pbe0) then + npar_c=int(1,kind=C_INT) ; param_c(1)=alpha_c + call libpaw_xc_func_set_params(xc_func%conf,param_c,npar_c) + end if + +! HSE: set parameters + if (is_hse) then + npar_c=int(3,kind=C_INT) + param_c(1)=beta_c;param_c(2:3)=omega_c + call libpaw_xc_func_set_params(xc_func%conf,param_c,npar_c) + end if + +#else +! This is to avoid unused arguments + if(.false. .and. present(hyb_mixing) .and. present(hyb_mixing_sr) .and. present(hyb_range))then + msg='One should not be here' + endif +#endif + + end do + + if ((.not.is_pbe0).and.(.not.is_hse)) then + msg='Invalid XC functional: not able to change parameters for this functional!' + LIBPAW_WARNING(msg) + end if + +end subroutine libpaw_libxc_set_hybridparams +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_libpaw_libxc_funcs/libpaw_libxc_gga_from_hybrid +!! NAME +!! libpaw_libxc_gga_from_hybrid +!! +!! FUNCTION +!! Returns a logical flag: TRUE if one can deduce, from the id of a hybrid functional set, +!! the id(s) of the GGA functional on which it is based. +!! Optionally returns the id of the GGA functional on which the hybrid functional is based +!! (2 integers defining the GGA X and C functionals). +!! - If an id is provided as input argument, it is used as input id; +!! - If not, the input id is taken from the optional xc_functionals datastructure; +!! - If no input argument is given, the input id is taken from the global paw_xc_global datastructure. +!! +!! INPUTS +!! [hybrid_id]=, optional : id of an input hybrid functional +!! [xc_functionals(2)]=, optional : XC functionals from which +!! the id(s) can to be used +!! +!! OUTPUT +!! [gga_id(2)]=array that contains the GGA libXC id(s) +!! libpaw_libxc_gga_from_hybrid=.true. if the GGA has been found from the input id +!! +!! SOURCE + +function libpaw_libxc_gga_from_hybrid(gga_id,hybrid_id,xc_functionals) + +!Arguments ------------------------------------ +!scalars + integer,intent(in),optional :: hybrid_id + logical :: libpaw_libxc_gga_from_hybrid +!arrays + integer,intent(out),optional :: gga_id(2) + type(libpaw_libxc_type),intent(inout),optional,target :: xc_functionals(2) +!Local variables ------------------------------- +!scalars + integer :: ii + logical :: is_hybrid + character(len=100) :: c_name,x_name,msg +#if defined LIBPAW_HAVE_LIBXC && defined LIBPAW_ISO_C_BINDING + character(len=100) :: xc_name + character(kind=C_CHAR,len=1),pointer :: strg_c +#endif +!arrays + integer :: trial_id(2) + +! ************************************************************************* + + libpaw_libxc_gga_from_hybrid=.false. + + is_hybrid=.false. + if (present(hybrid_id)) then + trial_id(1)=hybrid_id + trial_id(2)=0 + is_hybrid=libpaw_libxc_is_hybrid_from_id(trial_id(1)) + else if (present(xc_functionals)) then + trial_id(1)=xc_functionals(1)%id + trial_id(2)=xc_functionals(2)%id + is_hybrid=libpaw_libxc_is_hybrid(xc_functionals) + else + trial_id(1)=paw_xc_global(1)%id + trial_id(2)=paw_xc_global(2)%id + is_hybrid=libpaw_libxc_is_hybrid(paw_xc_global) + end if + + c_name="unknown" ; x_name="unknown" + +!Specific treatment of the B3LYP functional, whose GGA counterpart does not exist in LibXC + if (trial_id(1)==402 .or. trial_id(2)==402) then + libpaw_libxc_gga_from_hybrid=.true. + if (present(gga_id)) then + gga_id(1)=0 + gga_id(2)=-1402 ! This corresponds to a native ABINIT functional, + ! actually a composite from different LibXC functionals! + write(std_out,*)' libpaw_libxc_gga_from_hybrid, return with gga_id=',gga_id + endif + return + endif + + do ii = 1, 2 + + if ((trial_id(ii)<=0).or.(.not.is_hybrid)) cycle + + if (libpaw_libxc_gga_from_hybrid) then + msg='Invalid XC functional setup: contains 2 hybrid functionals!' + LIBPAW_ERROR(msg) + end if + +#if defined LIBPAW_HAVE_LIBXC && defined LIBPAW_ISO_C_BINDING + + call c_f_pointer(xc_functional_get_name(trial_id(ii)),strg_c) + call char_c_to_f(strg_c,xc_name) + +! AVAILABLE FUNCTIONALS + +! ===== PBE0 ===== + if (xc_name=="hyb_gga_xc_pbeh" .or. & +& xc_name=="hyb_gga_xc_pbe0_13") then + c_name="GGA_C_PBE" + x_name="GGA_X_PBE" + libpaw_libxc_gga_from_hybrid=.true. + +! ===== HSE ===== + else if (xc_name=="hyb_gga_xc_hse03" .or. & +& xc_name=="hyb_gga_xc_hse06" ) then + c_name="GGA_C_PBE" + x_name="GGA_X_PBE" + libpaw_libxc_gga_from_hybrid=.true. + end if + +#endif + + enddo ! ii + + if (present(gga_id)) then + if (libpaw_libxc_gga_from_hybrid) then + gga_id(1)=libpaw_libxc_getid(c_name) + gga_id(2)=libpaw_libxc_getid(x_name) + else + gga_id(:)=-1 + end if + end if + + if (.not.libpaw_libxc_gga_from_hybrid) then + msg='Unable to find a GGA functional for this hybrid!' + LIBPAW_ERROR(msg) + end if + +!Note that in the case of B3LYP functional, the return happened immediately after the setup of B3LYP parameters. + +end function libpaw_libxc_gga_from_hybrid +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_libpaw_libxc_funcs/libpaw_libxc_getvxc +!! NAME +!! libpaw_libxc_getvxc +!! +!! FUNCTION +!! Return XC potential and energy, from input density (gradient etc...) +!! +!! INPUTS +!! ndvxc=size of dvxc +!! nd2vxc=size of d2vxc +!! npts=number of of points for the density +!! nspden=number of spin-density components +!! order=requested order of derivation +!! rho(npts,nspden)=electronic density +!! [grho2(npts,nspden)]=squared gradient of the density +!! [lrho(npts,nspden)]=laplacian of the density +!! [tau(npts,nspden)]= kinetic energy density +!! +!! OUTPUT +!! exc(npts)=XC energy density +!! vxc(npts,nspden)=derivative of the energy density wrt to the density +!! [vxclrho(npts,nspden)]=derivative of the energy density wrt to the density laplacian +!! [vxctau(npts,nspden)]=derivative of the energy density wrt to the kinetic energy density +!! [dvxc(npts,ndvxc)]=2nd derivative of the energy density wrt to the density +!! [vxcgr(npts,3)]=2nd derivative of the energy density wrt to the gradient +!! 2nd derivative of the energy density wrt to the density and the gradient +!! [d2vxc(npts,nd2vxc)]=3rd derivative of the energy density wrt to the density +!! +!! SIDE EFFECTS +!! [xc_functionals(2)]=, optional argument +!! XC functionals to initialize +!! +!! SOURCE + + subroutine libpaw_libxc_getvxc(ndvxc,nd2vxc,npts,nspden,order,rho,exc,vxc,& +& grho2,vxcgr,lrho,vxclrho,tau,vxctau,dvxc,d2vxc,xc_functionals) ! Optional arguments + +!Arguments ------------------------------------ + integer, intent(in) :: ndvxc,nd2vxc,npts,nspden,order + real(dp),intent(in) :: rho(npts,nspden) + real(dp),intent(out) :: vxc(npts,nspden),exc(npts) + real(dp),intent(in),optional :: grho2(npts,2*min(nspden,2)-1) + real(dp),intent(out),optional :: vxcgr(npts,3) + real(dp),intent(in),optional :: lrho(npts,nspden) + real(dp),intent(out),optional :: vxclrho(npts,nspden) + real(dp),intent(in),optional :: tau(npts,nspden) + real(dp),intent(out),optional :: vxctau(npts,nspden) + real(dp),intent(out),optional :: dvxc(npts,ndvxc) + real(dp),intent(out),optional :: d2vxc(npts,nd2vxc) + type(libpaw_libxc_type),intent(inout),optional,target :: xc_functionals(2) +!Local variables ------------------------------- +!scalars + integer :: ii,ipts + logical :: is_gga,is_mgga,needs_laplacian,has_sigma_threshold + character(len=500) :: msg + real(dp) :: sigma_threshold_max +#if defined LIBPAW_HAVE_LIBXC && defined LIBPAW_ISO_C_BINDING + type(C_PTR) :: rho_c,sigma_c,lrho_c,tau_c +#endif +!arrays + real(dp),target :: rhotmp(nspden),sigma(3),exctmp,vxctmp(nspden),vsigma(3) + real(dp),target :: v2rho2(3),v2rhosigma(6),v2sigma2(6) + real(dp),target :: v2rholapl(3),v2sigmalapl(6),v2lapl2(3) + real(dp),target :: v2rhotau(3),v2sigmatau(6),v2lapltau(3),v2tau2(3) + real(dp),target :: v3rho3(4),v3rho2sigma(9),v3rhosigma2(12),v3sigma3(10) + real(dp),target :: lrhotmp(nspden),tautmp(nspden),vlrho(nspden),vtau(nspden) + type(libpaw_libxc_type),pointer :: xc_funcs(:) +#if defined LIBPAW_HAVE_LIBXC && defined LIBPAW_ISO_C_BINDING + type(C_PTR) :: exc_c(2),vxc_c(2),vsigma_c(2),vlrho_c(2),vtau_c(2) + type(C_PTR) :: v2rho2_c(2),v2rhosigma_c(2),v2sigma2_c(2) + type(C_PTR) :: v2rholapl_c(2),v2sigmalapl_c(2),v2lapl2_c(2) + type(C_PTR) :: v2rhotau_c(2),v2sigmatau_c(2),v2lapltau_c(2),v2tau2_c(2) +type(C_PTR) :: v3rho3_c(2),v3rho2sigma_c(2),v3rhosigma2_c(2),v3sigma3_c(2) +#endif + +! ************************************************************************* + + if (.not.libpaw_xc_constants_initialized) call libpaw_libxc_constants_load() + +!Select XC functional(s) + if (present(xc_functionals)) then + xc_funcs => xc_functionals + else + xc_funcs => paw_xc_global + end if + + is_gga =libpaw_libxc_isgga (xc_funcs) + is_mgga=libpaw_libxc_ismgga(xc_funcs) + needs_laplacian=(libpaw_libxc_needs_laplacian(xc_funcs).and.present(lrho)) + + sigma_threshold_max=maxval(xc_funcs(:)%sigma_threshold,mask=(xc_funcs(:)%id>0)) + has_sigma_threshold=(sigma_threshold_max>zero) + + if (is_gga.and.(.not.present(grho2))) then + msg='GGA needs gradient of density!' + LIBPAW_BUG(msg) + end if + if (is_mgga) then + if (present(vxctau).and.(.not.present(tau))) then + msg='meta-GGA needs tau!' + LIBPAW_BUG(msg) + end if + if (needs_laplacian) then + if (present(vxclrho).and.(.not.present(lrho))) then + msg='meta-GGA needs lrho!' + LIBPAW_BUG(msg) + end if + end if + endif + +!Inititalize all output arrays to zero + exc=zero ; vxc=zero + if (present(dvxc)) dvxc=zero + if (present(d2vxc)) d2vxc=zero + if (is_gga.or.is_mgga.and.present(vxcgr)) vxcgr=zero + if (is_mgga.and.present(vxclrho)) vxclrho=zero + if (is_mgga.and.present(vxctau)) vxctau=zero + +!Determine which XC outputs can be computed +#if defined LIBPAW_HAVE_LIBXC && defined LIBPAW_ISO_C_BINDING + do ii = 1,2 + if (xc_funcs(ii)%has_exc) then + exc_c(ii)=c_loc(exctmp) + else + exc_c(ii)=C_NULL_PTR + end if + if (xc_funcs(ii)%has_vxc) then + vxc_c(ii)=c_loc(vxctmp) + vsigma_c(ii)=c_loc(vsigma) + vtau_c(ii)=c_loc(vtau) + vlrho_c(ii)=c_loc(vlrho) + else + vxc_c(ii)=C_NULL_PTR + vsigma_c(ii)=c_NULL_PTR + vtau_c(ii)=C_NULL_PTR + vlrho_c(ii)=C_NULL_PTR + end if + if ((xc_funcs(ii)%has_fxc).and.(abs(order)>1)) then + v2rho2_c(ii)=c_loc(v2rho2) + v2sigma2_c(ii)=c_loc(v2sigma2) + v2rhosigma_c(ii)=c_loc(v2rhosigma) + if (is_mgga) then + v2rholapl_c(ii)=c_loc(v2rholapl) + v2sigmalapl_c(ii)=c_loc(v2sigmalapl) + v2lapl2_c(ii)=c_loc(v2lapl2) + v2rhotau_c(ii)=c_loc(v2rhotau) + v2sigmatau_c(ii)=c_loc(v2sigmatau) + v2lapltau_c(ii)=c_loc(v2lapltau) + v2tau2_c(ii)=c_loc(v2tau2) + end if + else + v2rho2_c(ii)=C_NULL_PTR + v2sigma2_c(ii)=C_NULL_PTR + v2rhosigma_c(ii)=C_NULL_PTR + if (is_mgga) then + v2rholapl_c(ii)=C_NULL_PTR + v2sigmalapl_c(ii)=C_NULL_PTR + v2lapl2_c(ii)=C_NULL_PTR + v2rhotau_c(ii)=C_NULL_PTR + v2sigmatau_c(ii)=C_NULL_PTR + v2lapltau_c(ii)=C_NULL_PTR + v2tau2_c(ii)=C_NULL_PTR + end if + end if + if ((xc_funcs(ii)%has_kxc).and.(abs(order)>2)) then + v3rho3_c(ii)=c_loc(v3rho3) + v3sigma3_c(ii)=c_loc(v3sigma3) + v3rho2sigma_c(ii)=c_loc(v3rho2sigma) + v3rhosigma2_c(ii)=c_loc(v3rhosigma2) + else + v3rho3_c(ii)=C_NULL_PTR + v3sigma3_c(ii)=C_NULL_PTR + v3rho2sigma_c(ii)=C_NULL_PTR + v3rhosigma2_c(ii)=C_NULL_PTR + end if + end do +#endif + +!Initialize temporary arrays +#if defined LIBPAW_HAVE_LIBXC && defined LIBPAW_ISO_C_BINDING + rhotmp=zero ; rho_c=c_loc(rhotmp) + if (is_gga.or.is_mgga) then + sigma=zero ; sigma_c=c_loc(sigma) + end if + if (is_mgga) then + tautmp=zero ; tau_c=c_loc(tautmp) + lrhotmp=zero ; lrho_c=c_loc(lrhotmp) + end if +#endif + +!Some mGGA functionals require a special treatment + if (is_mgga) then + !TB09 functional requires the c parameter to be set + call libpaw_libxc_compute_tb09(npts,nspden,rho,grho2,xc_funcs) + end if + +!Loop over points + do ipts=1,npts + +! Convert the quantities provided to the ones needed by libxc + if (nspden == 1) then + ! rho_up is passed in the spin-unpolarized case, while the libxc + ! expects the total density + rhotmp(1:nspden) = two*rho(ipts,1:nspden) + else + rhotmp(1:nspden) = rho(ipts,1:nspden) + end if + if (is_gga.or.is_mgga) then + if (nspden==1) then + ! |grho_up|^2 is passed while Libxc needs |grho_tot|^2 + sigma(1) = four*grho2(ipts,1) + else + ! |grho_up|^2, |grho_dn|^2, and |grho_tot|^2 are passed + ! while Libxc needs |grho_up|^2, grho_up.grho_dn, and |grho_dn|^2 + sigma(1) = grho2(ipts,1) + sigma(2) = (grho2(ipts,3) - grho2(ipts,1) - grho2(ipts,2))/two + sigma(3) = grho2(ipts,2) + end if + ! Apply a threshold on sigma (cannot be done in libxc6, at present) + if (has_sigma_threshold) then + do ii=1,2*nspden-1 + if (abs(sigma(ii))<=sigma_threshold_max) sigma(ii)=sigma_threshold_max + end do + end if + end if + if (is_mgga) then + if (nspden==1) then + tautmp(1:nspden) = two*tau(ipts,1:nspden) + if (needs_laplacian) lrhotmp(1:nspden) = two*lrho(ipts,1:nspden) + else + tautmp(1:nspden) = tau(ipts,1:nspden) + if (needs_laplacian) lrhotmp(1:nspden) = lrho(ipts,1:nspden) + end if + end if + +! Loop over functionals + do ii = 1,2 + if (xc_funcs(ii)%id<=0) cycle + +! Get the energy and the potential (and possibly the other derivatives) +#if defined LIBPAW_HAVE_LIBXC && defined LIBPAW_ISO_C_BINDING + exctmp=zero ; vxctmp=zero +! ===== LDA ===== + if (xc_funcs(ii)%family==LIBPAW_XC_FAMILY_LDA) then + exctmp=zero ; vxctmp=zero ; v2rho2=zero ; v3rho3=zero + call libpaw_xc_get_lda(xc_funcs(ii)%conf,1,rho_c, & +& exc_c(ii),vxc_c(ii),v2rho2_c(ii),v3rho3_c(ii)) +! ===== GGA ===== + else if (xc_funcs(ii)%family==LIBPAW_XC_FAMILY_GGA.or. & +& xc_funcs(ii)%family==LIBPAW_XC_FAMILY_HYB_GGA) then + exctmp=zero ; vxctmp=zero ; vsigma=zero + v2rho2=zero ; v2sigma2=zero ; v2rhosigma=zero + v3rho3=zero ; v3rho2sigma=zero ; v3rhosigma2=zero ; v3sigma3=zero + call libpaw_xc_get_gga(xc_funcs(ii)%conf,1,rho_c,sigma_c, & +& exc_c(ii),vxc_c(ii),vsigma_c(ii), & +& v2rho2_c(ii),v2rhosigma_c(ii),v2sigma2_c(ii), & +& v3rho3_c(ii),v3rho2sigma_c(ii),v3rhosigma2_c(ii),v3sigma3_c(ii)) +! ===== mGGA ===== + else if (xc_funcs(ii)%family==LIBPAW_XC_FAMILY_MGGA.or. & +& xc_funcs(ii)%family==LIBPAW_XC_FAMILY_HYB_GGA) then + exctmp=zero ; vxctmp=zero ; vsigma=zero ; vlrho=zero ; vtau=zero + v2rho2=zero ; v2sigma2=zero ; v2rhosigma=zero + ! At present, we don't use 2nd derivatives involving Tau or Laplacian + call libpaw_xc_get_mgga(xc_funcs(ii)%conf,1,rho_c,sigma_c,lrho_c,tau_c, & +& exc_c(ii),vxc_c(ii),vsigma_c(ii),vlrho_c(ii),vtau_c(ii), & +& v2rho2_c(ii),v2rhosigma_c(ii),v2rholapl_c(ii),v2rhotau_c(ii),v2sigma2_c(ii), & +& v2sigmalapl_c(ii),v2sigmatau_c(ii),v2lapl2_c(ii),v2lapltau_c(ii),v2tau2_c(ii)) + end if +#endif + + exc(ipts) = exc(ipts) + exctmp + vxc(ipts,1:nspden) = vxc(ipts,1:nspden) + vxctmp(1:nspden) + +! Deal with fxc and kxc + if (abs(order)>1) then +! ----- LDA ----- + if (xc_funcs(ii)%family==LIBPAW_XC_FAMILY_LDA) then + if (nspden==1) then + if(order>=2) then + dvxc(ipts,1)=dvxc(ipts,1)+v2rho2(1) + if(order>2) then + d2vxc(ipts,1)=d2vxc(ipts,1)+v3rho3(1) + endif + else if (order==-2) then + dvxc(ipts,1)=dvxc(ipts,1)+v2rho2(1) + dvxc(ipts,2)=dvxc(ipts,2)+v2rho2(1) + endif + else + dvxc(ipts,1)=dvxc(ipts,1)+v2rho2(1) + dvxc(ipts,2)=dvxc(ipts,2)+v2rho2(2) + dvxc(ipts,3)=dvxc(ipts,3)+v2rho2(3) + if(abs(order)>2) then + d2vxc(ipts,1)=d2vxc(ipts,1)+v3rho3(1) + d2vxc(ipts,2)=d2vxc(ipts,2)+v3rho3(2) + d2vxc(ipts,3)=d2vxc(ipts,3)+v3rho3(3) + d2vxc(ipts,4)=d2vxc(ipts,4)+v3rho3(4) + endif + endif +! ----- GGA or mGGA ----- + else if (xc_funcs(ii)%family==LIBPAW_XC_FAMILY_GGA.or. & +& xc_funcs(ii)%family==LIBPAW_XC_FAMILY_HYB_GGA.or. & +& xc_funcs(ii)%family==LIBPAW_XC_FAMILY_MGGA.or. & +& xc_funcs(ii)%family==LIBPAW_XC_FAMILY_HYB_MGGA) then + if (xc_funcs(ii)%kind==LIBPAW_XC_EXCHANGE) then + if (nspden==1) then + dvxc(ipts,1)=v2rho2(1)*two + dvxc(ipts,2)=dvxc(ipts,1) + dvxc(ipts,3)=two*two*vsigma(1) + dvxc(ipts,4)=dvxc(ipts,3) + dvxc(ipts,5)=four*two*v2rhosigma(1) + dvxc(ipts,6)=dvxc(ipts,5) + dvxc(ipts,7)=two*four*four*v2sigma2(1) + dvxc(ipts,8)=dvxc(ipts,7) + else + dvxc(ipts,1)=v2rho2(1) + dvxc(ipts,2)=v2rho2(3) + dvxc(ipts,3)=two*vsigma(1) + dvxc(ipts,4)=two*vsigma(3) + dvxc(ipts,5)=two*v2rhosigma(1) + dvxc(ipts,6)=two*v2rhosigma(6) + dvxc(ipts,7)=four*v2sigma2(1) + dvxc(ipts,8)=four*v2sigma2(6) + end if + else if (xc_funcs(ii)%kind==LIBPAW_XC_CORRELATION) then + if (nspden==1) then + dvxc(ipts,9)=v2rho2(1) + dvxc(ipts,10)=dvxc(ipts,9) + dvxc(ipts,11)=dvxc(ipts,9) + dvxc(ipts,12)=two*vsigma(1) + dvxc(ipts,13)=two*v2rhosigma(1) + dvxc(ipts,14)=dvxc(ipts,13) + dvxc(ipts,15)=four*v2sigma2(1) + else + dvxc(ipts,9)=v2rho2(1) + dvxc(ipts,10)=v2rho2(2) + dvxc(ipts,11)=v2rho2(3) + dvxc(ipts,12)=two*vsigma(1) + dvxc(ipts,13)=two*v2rhosigma(1) + dvxc(ipts,14)=two*v2rhosigma(6) + dvxc(ipts,15)=four*v2sigma2(1) + end if + end if + end if + end if + +! Convert the quantities returned by Libxc + if ((is_gga.or.is_mgga).and.present(vxcgr)) then + if (nspden==1) then + vxcgr(ipts,3) = vxcgr(ipts,3) + vsigma(1)*two + else + vxcgr(ipts,1) = vxcgr(ipts,1) + two*vsigma(1) - vsigma(2) + vxcgr(ipts,2) = vxcgr(ipts,2) + two*vsigma(3) - vsigma(2) + vxcgr(ipts,3) = vxcgr(ipts,3) + vsigma(2) + end if + end if + if (is_mgga.and.present(vxctau)) then + vxctau(ipts,1:nspden) = vxctau(ipts,1:nspden) + vtau(1:nspden) + end if + if (is_mgga.and.needs_laplacian.and.present(vxclrho)) then + vxclrho(ipts,1:nspden) = vxclrho(ipts,1:nspden) + vlrho(1:nspden) + end if + + end do ! ii + end do ! ipts + +end subroutine libpaw_libxc_getvxc +!!*** + +!====================================================================== +! HEREAFTER ARE PRIVATE FUNCTIONS +!====================================================================== + +!---------------------------------------------------------------------- + +!!****f* m_libpaw_libxc_funcs/libpaw_libxc_compute_tb09 +!! NAME +!! libpaw_libxc_compute_tb09 +!! +!! FUNCTION +!! Compute c parameter for Tran-Blaha 2009 functional and set it +!! +!! INPUTS +!! npts=number of of points for the density +!! nspden=number of spin-density components +!! rho(npts,nspden)=electronic density +!! grho2(npts,nspden)=squared gradient of the density +!! +!! OUTPUT +!! +!! SIDE EFFECTS +!! [xc_functionals(2)]=, optional argument +!! XC functionals to initialize +!! +!! SOURCE + + subroutine libpaw_libxc_compute_tb09(npts,nspden,rho,grho2,xc_functionals) + +!Arguments ------------------------------------ + integer, intent(in) :: npts,nspden + real(dp),intent(in) :: rho(npts,nspden),grho2(npts,2*min(nspden,2)-1) + type(libpaw_libxc_type),intent(inout),optional,target :: xc_functionals(2) +!Local variables ------------------------------- +!scalars + integer :: ii,ipts + logical :: fixed_c_tb09,is_mgga_tb09 + real(dp) :: cc +!arrays + type(libpaw_libxc_type),pointer :: xc_funcs(:) + real(dp),allocatable :: gnon(:) +#if defined LIBPAW_HAVE_LIBXC && defined LIBPAW_ISO_C_BINDING + integer(C_INT) :: npar_c=int(2,kind=C_INT) + real(C_DOUBLE) :: param_c(2) +#endif + +! ************************************************************************* + + if (.not.libpaw_xc_constants_initialized) call libpaw_libxc_constants_load() + +!Select XC functional(s) + if (present(xc_functionals)) then + xc_funcs => xc_functionals + else + xc_funcs => paw_xc_global + end if + + is_mgga_tb09=(any(xc_funcs%id==libpaw_libxc_getid('XC_MGGA_X_TB09'))) + fixed_c_tb09=(any(abs(xc_funcs%xc_tb09_c-99.99_dp)>tol12)) + + if (is_mgga_tb09) then + +! C is fixed by the user + if (fixed_c_tb09) then + cc=zero + do ii=1,2 + if (abs(xc_funcs(ii)%xc_tb09_c-99.99_dp)>tol12) cc=xc_funcs(ii)%xc_tb09_c + end do + !write(msg,'(2a,f9.6)' ) ch10,& + !& 'In the mGGA functional TB09, c is fixed by the user and is equal to ',cc + !call wrtout(std_out,msg,'COLL') +! C is computed + else + LIBPAW_ALLOCATE(gnon,(npts)) + do ipts=1,npts + if (sum(rho(ipts,:))<=1e-7_dp) then + gnon(ipts)=zero + else + if (nspden==1) then + gnon(ipts)=sqrt(grho2(ipts,1))/rho(ipts,1) + else + gnon(ipts)=sqrt(grho2(ipts,3))/sum(rho(ipts,:)) + end if + end if + end do + cc= -0.012_dp + 1.023_dp*sqrt(sum(gnon)/npts) + LIBPAW_DEALLOCATE(gnon) + !write(msg,'(2a,f9.6)' ) ch10,'In the mGGA functional TB09, c = ',cc + !call wrtout(std_out,msg,'COLL') + end if + +! Set c in XC data structure + do ii=1,2 + if (xc_funcs(ii)%id==libpaw_libxc_getid('XC_MGGA_X_TB09')) then +#if defined LIBPAW_HAVE_LIBXC && defined LIBPAW_ISO_C_BINDING + param_c(1)=real(cc,kind=C_DOUBLE) ; param_c(2)=real(0._dp,kind=C_DOUBLE) + call libpaw_xc_func_set_params(xc_funcs(ii)%conf,param_c,npar_c) +#endif + end if + end do + end if + +end subroutine libpaw_libxc_compute_tb09 +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_libpaw_libxc_funcs/libpaw_libxc_getrefs +!! NAME +!! libpaw_libxc_getrefs +!! +!! FUNCTION +!! Return the reference(s) of a single XC functional +!! +!! INPUTS +!! xc_functional=, handle for XC functional +!! +!! OUTPUT +!! xcrefs(:)= references(s) of the functional +!! +!! SOURCE + +subroutine libpaw_libxc_getrefs(xcrefs,xc_functional) + +!Arguments ------------------------------------ + character(len=*),intent(out) :: xcrefs(:) + type(libpaw_libxc_type),intent(in) :: xc_functional + +!Local variables------------------------------- +#if defined LIBPAW_HAVE_LIBXC && defined HAVE_FC_ISO_C_BINDING + integer(C_INT) :: iref_c + character(kind=C_CHAR,len=1),pointer :: strg_c +#endif + +! ************************************************************************* + + xcrefs(:)='' + +#if defined LIBPAW_HAVE_LIBXC && defined HAVE_FC_ISO_C_BINDING + iref_c=0 + do while (iref_c>=0.and.iref_c, handle for XC functional +!! +!! SOURCE + +function libpaw_libxc_depends_on_temp(xc_functional) + +!Arguments ------------------------------------ + logical :: libpaw_libxc_depends_on_temp + type(libpaw_libxc_type),intent(in) :: xc_functional +!Local variables------------------------------- +#if defined HAVE_LIBXC && defined HAVE_FC_ISO_C_BINDING + integer(C_INT) :: ipar_c + character(len=50) :: par_name + character(kind=C_CHAR,len=1),pointer :: strg_c +#endif + +! ************************************************************************* + + libpaw_libxc_depends_on_temp = .false. + +#if defined HAVE_LIBXC && defined HAVE_FC_ISO_C_BINDING + ipar_c=0 + do while (ipar_c>=0) + call c_f_pointer(libpaw_xc_func_get_params_name(xc_functional%conf,ipar_c),strg_c) + if (associated(strg_c)) then + call char_c_to_f(strg_c,par_name) + if (trim(par_name)=="T") then + libpaw_libxc_depends_on_temp=.true. ; exit + end if + ipar_c=ipar_c+1 + else + ipar_c=-1 + end if + end do + + if (.not.libpaw_libxc_depends_on_temp) then +! For libXC_version<5, these three functional were T-dependent + libpaw_libxc_depends_on_temp = & +& (xc_functional%id==libpaw_libxc_getid('XC_LDA_XC_KSDT') .or. & +& xc_functional%id==libpaw_libxc_getid('XC_LDA_XC_GDSMFB') .or. & +& xc_functional%id==libpaw_libxc_getid('XC_LDA_XC_CORRKSDT')) + end if + +#else + if (.False.) write(std_out,*) xc_functional%id +#endif + +end function libpaw_libxc_depends_on_temp +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_libpaw_libxc_funcs/libpaw_libxc_set_temp +!! NAME +!! libpaw_libxc_set_temp +!! +!! FUNCTION +!! Set the electronic temperature in a single XC functional +!! No action if functional doesnt depend on temperature +!! +!! INPUTS +!! xc_functional=, handle for XC functional +!! temperature=electronic temperature (in Ha units, i.e. T_kelvin * k_B_in_Ha/K ) +!! +!! SOURCE + +subroutine libpaw_libxc_set_temp(xc_functional,temperature) + +!Arguments ------------------------------------ + real(dp),intent(in) :: temperature + type(libpaw_libxc_type),intent(in) :: xc_functional +!Local variables------------------------------- +#if defined HAVE_LIBXC && defined HAVE_FC_ISO_C_BINDING + integer(C_INT) :: iset_c,npar_c + real(C_DOUBLE) :: temp_c,param_c(1) + character(len=50) :: par_name + character(kind=C_CHAR,len=1),target :: name_c(2) +#endif + +! ************************************************************************* + +#if defined HAVE_LIBXC && defined HAVE_FC_ISO_C_BINDING + if (xc_functional%temperature>zero) then + + par_name="T" ; name_c=char_f_to_c(trim(par_name)) + temp_c=real(temperature,kind=C_DOUBLE) + iset_c = libpaw_xc_func_set_params_name(xc_functional%conf,c_loc(name_c),temp_c) + if (iset_c /= 0) then + !Try this when set_params_name method is not available (libXC<5) + if (xc_functional%id==libpaw_libxc_getid('XC_LDA_XC_KSDT') .or. & +& xc_functional%id==libpaw_libxc_getid('XC_LDA_XC_GDSMFB') .or. & +& xc_functional%id==libpaw_libxc_getid('XC_LDA_XC_CORRKSDT')) then + param_c(1)=real(zero,kind=C_DOUBLE);npar_c=int(1,kind=C_INT) + call libpaw_xc_func_set_params(xc_functional%conf,param_c,npar_c) + end if + end if + + end if + +#else + if (.False.) write(std_out,*) xc_functional%id +#endif + +end subroutine libpaw_libxc_set_temp +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_libpaw_libxc_funcs/libpaw_libxc_constants_load +!! NAME +!! libpaw_libxc_constants_load +!! +!! FUNCTION +!! Load libXC constants from C headers +!! +!! SOURCE + + subroutine libpaw_libxc_constants_load() + +!Local variables------------------------------- +#if defined LIBPAW_HAVE_LIBXC && defined LIBPAW_ISO_C_BINDING + integer(C_INT) :: i1,i2,i3,i4,i5,i6,i7,i8,i9 +#endif + +! ************************************************************************* + +#if defined LIBPAW_HAVE_LIBXC && defined LIBPAW_ISO_C_BINDING + call libpaw_xc_get_singleprecision_constant(i1) + LIBPAW_XC_SINGLE_PRECISION = int(i1) + call libpaw_xc_get_family_constants(i1,i2,i3,i4,i5,i6,i7,i8,i9) + LIBPAW_XC_FAMILY_UNKNOWN = int(i1) + LIBPAW_XC_FAMILY_LDA = int(i2) + LIBPAW_XC_FAMILY_GGA = int(i3) + LIBPAW_XC_FAMILY_MGGA = int(i4) + LIBPAW_XC_FAMILY_LCA = int(i5) + LIBPAW_XC_FAMILY_OEP = int(i6) + LIBPAW_XC_FAMILY_HYB_GGA = int(i7) + LIBPAW_XC_FAMILY_HYB_MGGA = int(i8) + LIBPAW_XC_FAMILY_HYB_LDA = int(i9) + call libpaw_xc_get_flags_constants(i1,i2,i3,i4,i5,i6) + LIBPAW_XC_FLAGS_HAVE_EXC = int(i1) + LIBPAW_XC_FLAGS_HAVE_VXC = int(i2) + LIBPAW_XC_FLAGS_HAVE_FXC = int(i3) + LIBPAW_XC_FLAGS_HAVE_KXC = int(i4) + LIBPAW_XC_FLAGS_HAVE_LXC = int(i5) + LIBPAW_XC_FLAGS_NEEDS_LAPLACIAN= int(i6) + call libpaw_xc_get_kind_constants(i1,i2,i3,i4) + LIBPAW_XC_EXCHANGE = int(i1) + LIBPAW_XC_CORRELATION = int(i2) + LIBPAW_XC_EXCHANGE_CORRELATION = int(i3) + LIBPAW_XC_KINETIC = int(i4) + libpaw_xc_constants_initialized=.true. +#endif + + end subroutine libpaw_libxc_constants_load +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_libpaw_libxc_funcs/char_f_to_c +!! NAME +!! char_f_to_c +!! +!! FUNCTION +!! Helper function to convert a Fortran string to a C string +!! Based on a routine by Joseph M. Krahn +!! +!! INPUTS +!! f_string=Fortran string +!! +!! OUTPUT +!! c_string=C string +!! +!! SOURCE + +#if defined LIBPAW_ISO_C_BINDING +function char_f_to_c(f_string) result(c_string) +!Arguments ------------------------------------ + character(len=*),intent(in) :: f_string + character(kind=C_CHAR,len=1) :: c_string(len_trim(f_string)+1) +!Local variables ------------------------------- + integer :: ii,strlen +!! ************************************************************************* + strlen=len_trim(f_string) + forall(ii=1:strlen) + c_string(ii)=f_string(ii:ii) + end forall + c_string(strlen+1)=C_NULL_CHAR + end function char_f_to_c +#endif +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_libpaw_libxc_funcs/char_c_to_f +!! NAME +!! char_c_to_f +!! +!! FUNCTION +!! Helper function to convert a C string to a Fortran string +!! Based on a routine by Joseph M. Krahn +!! +!! INPUTS +!! c_string=C string +!! +!! OUTPUT +!! f_string=Fortran string +!! +!! SOURCE + +#if defined LIBPAW_ISO_C_BINDING +subroutine char_c_to_f(c_string,f_string) +!Arguments ------------------------------------ + character(kind=C_CHAR,len=1),intent(in) :: c_string(*) + character(len=*),intent(out) :: f_string +!Local variables ------------------------------- + integer :: ii +!! ************************************************************************* + ii=1 + do while(c_string(ii)/=C_NULL_CHAR.and.ii<=len(f_string)) + f_string(ii:ii)=c_string(ii) ; ii=ii+1 + end do + if (ii libpaw_libxc_check, & +& libxc_functionals_init => libpaw_libxc_init, & +& libxc_functionals_end => libpaw_libxc_end, & +& libxc_functionals_fullname => libpaw_libxc_fullname, & +& libxc_functionals_getid => libpaw_libxc_getid, & +& libxc_functionals_family_from_id => libpaw_libxc_family_from_id, & +& libxc_functionals_ixc => libpaw_libxc_ixc, & +& libxc_functionals_isgga => libpaw_libxc_isgga, & +& libxc_functionals_ismgga => libpaw_libxc_ismgga, & +& libxc_functionals_is_tb09 => libpaw_libxc_is_tb09, & +& libxc_functionals_needs_laplacian => libpaw_libxc_needs_laplacian, & +& libxc_functionals_needs_temperature => libpaw_libxc_needs_temperature, & +& libxc_functionals_set_temperature => libpaw_libxc_set_temperature, & +& libxc_functionals_has_kxc => libpaw_libxc_has_kxc, & +& libxc_functionals_has_k3xc => libpaw_libxc_has_k3xc, & +& libxc_functionals_nspin => libpaw_libxc_nspin, & +& libxc_functionals_is_hybrid => libpaw_libxc_is_hybrid, & +& libxc_functionals_is_hybrid_from_id => libpaw_libxc_is_hybrid_from_id, & +& libxc_functionals_get_hybridparams => libpaw_libxc_get_hybridparams, & +& libxc_functionals_set_hybridparams => libpaw_libxc_set_hybridparams, & +& libxc_functionals_gga_from_hybrid => libpaw_libxc_gga_from_hybrid, & +& libxc_functionals_getvxc => libpaw_libxc_getvxc +#endif + + implicit none + +end module m_libpaw_libxc +!!*** diff --git a/GX-PAW/libpaw/src/m_libpaw_libxc.o b/GX-PAW/libpaw/src/m_libpaw_libxc.o new file mode 100644 index 00000000..e7b00080 Binary files /dev/null and b/GX-PAW/libpaw/src/m_libpaw_libxc.o differ diff --git a/GX-PAW/libpaw/src/m_libpaw_mpi.F90 b/GX-PAW/libpaw/src/m_libpaw_mpi.F90 new file mode 100644 index 00000000..43d90235 --- /dev/null +++ b/GX-PAW/libpaw/src/m_libpaw_mpi.F90 @@ -0,0 +1,2959 @@ +!!****m* ABINIT/m_libpaw_mpi +!! NAME +!! m_libpaw_mpi +!! +!! FUNCTION +!! libPAW wrappers for MPI library. +!! Provides MPI named constants or tools as well as +!! a set of generic interfaces wrapping MPI primitives. +!! +!! COPYRIGHT +!! Copyright (C) 2014-2024 ABINIT group (MT, MG, ...) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! NOTES +!! This file comes directly from m_xmpi.F90 module delivered with ABINIT. +!! +!! FOR DEVELOPPERS: in order to preserve the portability of libPAW library, +!! please consult ~abinit/src/??_libpaw/libpaw-coding-rules.txt +!! +!! SOURCE + +#include "libpaw.h" + +module m_libpaw_mpi + + USE_DEFS + +#ifdef HAVE_MPI2 + use mpi +#endif + + implicit none + + private +!!*** + +#ifdef HAVE_MPI1 + include 'mpif.h' +#endif + +!---------------------------------------------------------------------- +!Some MPI constants + +#ifdef HAVE_MPI + integer,public,parameter :: xpaw_mpi_world = MPI_COMM_WORLD + integer,public,parameter :: xpaw_mpi_comm_self = MPI_COMM_SELF + integer,public,parameter :: xpaw_mpi_comm_null = MPI_COMM_NULL +#else + integer,public,parameter :: xpaw_mpi_world = 0 + integer,public,parameter :: xpaw_mpi_comm_self = 0 + integer,public,parameter :: xpaw_mpi_comm_null = 0 +#endif + +!---------------------------------------------------------------------- +!MPI public procedures + + public :: xpaw_mpi_abort ! Wrapper for MPI_ABORT + public :: xpaw_mpi_comm_rank ! Wrapper for MPI_COMM_RANK + public :: xpaw_mpi_comm_size ! Wrapper for MPI_COMM_SIZE + public :: xpaw_mpi_barrier ! Wrapper for MPI_BARRIER + public :: xpaw_mpi_wait ! Wrapper for MPI_WAIT + public :: xpaw_mpi_waitall ! Wrapper for MPI_WAITALL + public :: xpaw_mpi_iprobe ! Wrapper for MPI_IPROBE + +!---------------------------------------------------------------------- +!MPI private procedures + private :: xpaw_mpi_get_tag_ub ! Get MPI_TAG_UB attribute + +!---------------------------------------------------------------------- +!MPI generic interfaces + + public :: xpaw_mpi_allgather ! Wrapper for MPI_ALLGATHER + interface xpaw_mpi_allgather + module procedure xpaw_mpi_allgather_int1d + module procedure xpaw_mpi_allgather_dp1d + module procedure xpaw_mpi_allgather_dp2d + module procedure xpaw_mpi_allgather_dp3d + end interface xpaw_mpi_allgather + + public :: xpaw_mpi_allgatherv ! Wrapper for MPI_ALLGATHERV + interface xpaw_mpi_allgatherv + module procedure xpaw_mpi_allgatherv_int1d + module procedure xpaw_mpi_allgatherv_dp1d + module procedure xpaw_mpi_allgatherv_dp2d + end interface xpaw_mpi_allgatherv + + public :: xpaw_mpi_scatterv ! Wrapper for MPI_SCATTERV + interface xpaw_mpi_scatterv + module procedure xpaw_mpi_scatterv_int1d + module procedure xpaw_mpi_scatterv_dp1d + module procedure xpaw_mpi_scatterv_dp2d + end interface xpaw_mpi_scatterv + + public :: xpaw_mpi_alltoall ! Wrapper for MPI_ALLTOALL + interface xpaw_mpi_alltoall + module procedure xpaw_mpi_alltoall_int1d + module procedure xpaw_mpi_alltoall_dp1d + module procedure xpaw_mpi_alltoall_dp2d + end interface xpaw_mpi_alltoall + + public :: xpaw_mpi_alltoallv ! Wrapper for MPI_ALLTOALLV + interface xpaw_mpi_alltoallv + module procedure xpaw_mpi_alltoallv_int1d + module procedure xpaw_mpi_alltoallv_dp1d + module procedure xpaw_mpi_alltoallv_dp2d + end interface xpaw_mpi_alltoallv + + public :: xpaw_mpi_bcast ! Wrapper for MPI_BCAST + interface xpaw_mpi_bcast + module procedure xpaw_mpi_bcast_int + module procedure xpaw_mpi_bcast_int1d + module procedure xpaw_mpi_bcast_dp1d + module procedure xpaw_mpi_bcast_dp2d + module procedure xpaw_mpi_bcast_dp3d + end interface xpaw_mpi_bcast + + public :: xpaw_mpi_gather ! Wrapper for MPI_GATHER + interface xpaw_mpi_gather + module procedure xpaw_mpi_gather_int1d + module procedure xpaw_mpi_gather_dp1d + module procedure xpaw_mpi_gather_dp2d + end interface xpaw_mpi_gather + + public :: xpaw_mpi_gatherv ! Wrapper for MPI_GATHERV + interface xpaw_mpi_gatherv + module procedure xpaw_mpi_gatherv_int1d + module procedure xpaw_mpi_gatherv_dp1d + module procedure xpaw_mpi_gatherv_dp2d + end interface xpaw_mpi_gatherv + + public :: xpaw_mpi_recv ! Wrapper for MPI_RECV + interface xpaw_mpi_recv + module procedure xpaw_mpi_recv_int1d + module procedure xpaw_mpi_recv_dp1d + module procedure xpaw_mpi_recv_dp2d + module procedure xpaw_mpi_recv_dp3d + end interface xpaw_mpi_recv + + public :: xpaw_mpi_irecv ! Wrapper for MPI_IRECV + interface xpaw_mpi_irecv + module procedure xpaw_mpi_irecv_int1d + module procedure xpaw_mpi_irecv_dp1d + module procedure xpaw_mpi_irecv_dp2d + end interface xpaw_mpi_irecv + + public :: xpaw_mpi_send ! Wrapper for MPI_SEND + interface xpaw_mpi_send + module procedure xpaw_mpi_send_int1d + module procedure xpaw_mpi_send_dp1d + module procedure xpaw_mpi_send_dp2d + module procedure xpaw_mpi_send_dp3d + end interface xpaw_mpi_send + + public :: xpaw_mpi_isend ! Wrapper for MPI_ISEND + interface xpaw_mpi_isend + module procedure xpaw_mpi_isend_int1d + module procedure xpaw_mpi_isend_dp1d + module procedure xpaw_mpi_isend_dp2d + end interface xpaw_mpi_isend + + public :: xpaw_mpi_exch ! Wrapper for MPI_SEND/MPI_RECV + interface xpaw_mpi_exch + module procedure xpaw_mpi_exch_int1d + module procedure xpaw_mpi_exch_dp1d + module procedure xpaw_mpi_exch_dp2d + module procedure xpaw_mpi_exch_dp3d + end interface xpaw_mpi_exch + + public :: xpaw_mpi_sum ! Wrapper for MPI_ALLREDUCE(SUM) + interface xpaw_mpi_sum + module procedure xpaw_mpi_sum_int + module procedure xpaw_mpi_sum_int1d + module procedure xpaw_mpi_sum_dp1d + module procedure xpaw_mpi_sum_dp2d + module procedure xpaw_mpi_sum_dp3d + end interface xpaw_mpi_sum +!!*** + +!---------------------------------------------------------------------- + +CONTAINS !=========================================================== +!!*** + +!!****f* m_libpaw_mpi/xpaw_mpi_abort +!! NAME +!! xpaw_mpi_abort +!! +!! FUNCTION +!! Wrapper for MPI_ABORT +!! +!! INPUTS +!! [comm]=communicator of tasks to abort. +!! [mpierr]=Error code to return to invoking environment. +!! [msg]=User message +!! [exit_status]=optional, shell return code, default 1 +!! +!! SOURCE + +subroutine xpaw_mpi_abort(comm,mpierr,msg,exit_status) + +!Arguments------------------------- + integer,optional,intent(in) :: comm,mpierr,exit_status + character(len=*),optional,intent(in) :: msg + +!Local variables------------------- + integer :: ilen,ierr,ierr2,my_comm,my_errorcode,my_exit_status + logical :: testopen +#ifdef HAVE_MPI + character(len=MPI_MAX_ERROR_STRING) :: mpi_msg_error +#endif + +! ************************************************************************* + + ierr=0 + my_comm = xpaw_mpi_world; if (PRESENT(comm)) my_comm = comm + my_exit_status = 1; if (PRESENT(exit_status)) my_exit_status=exit_status + + if (PRESENT(msg)) then + write(std_out,'(2a)')"User message: ",TRIM(msg) + end if + + ! Close std_out and ab_out + inquire(std_out,opened=testopen) + if (testopen) close(std_out) + inquire(ab_out,opened=testopen) + if (testopen) close(ab_out) + +#ifdef HAVE_MPI + my_errorcode=MPI_ERR_UNKNOWN; if (PRESENT(mpierr)) my_errorcode=mpierr + call MPI_ERROR_STRING(my_errorcode, mpi_msg_error, ilen, ierr2) + call MPI_ABORT(my_comm,my_errorcode,ierr) +#endif + +#if defined FC_NAG + call exit(exit_status) +#elif defined HAVE_FC_EXIT + call exit(exit_status) +#else + if (exit_status== 0) stop "0" + if (exit_status== 1) stop "1" + if (exit_status==-1) stop "-1" +#endif + stop "1" + +end subroutine xpaw_mpi_abort +!!*** + + +!---------------------------------------------------------------------- + +!!****f* m_libpaw_mpi/xpaw_mpi_comm_rank +!! NAME +!! xpaw_mpi_comm_rank +!! +!! FUNCTION +!! Wrapper for MPI_COMM_RANK +!! +!! INPUTS +!! comm=MPI communicator. +!! +!! OUTPUT +!! xpaw_mpi_comm_rank=The rank of the node inside comm +!! +!! SOURCE + +function xpaw_mpi_comm_rank(comm) + +!Arguments------------------------- + integer,intent(in) :: comm + integer :: xpaw_mpi_comm_rank + +!Local variables------------------- + integer :: mpierr + +! ************************************************************************* + + mpierr=0 +#ifdef HAVE_MPI + xpaw_mpi_comm_rank=-1 ! Return non-sense value if the proc does not belong to the comm + if (comm/=xpaw_mpi_comm_null) then + call MPI_COMM_RANK(comm,xpaw_mpi_comm_rank,mpierr) + end if +#else + xpaw_mpi_comm_rank=0 +#endif + +end function xpaw_mpi_comm_rank +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_libpaw_mpi/xpaw_mpi_comm_size +!! NAME +!! xpaw_mpi_comm_size +!! +!! FUNCTION +!! Wrapper for MPI_COMM_SIZE +!! +!! INPUTS +!! comm=MPI communicator. +!! +!! OUTPUT +!! xpaw_mpi_comm_size=The number of processors inside comm. +!! +!! SOURCE + +function xpaw_mpi_comm_size(comm) + +!Arguments------------------------- + integer,intent(in) :: comm + integer :: xpaw_mpi_comm_size + +!Local variables------------------------------- +!scalars + integer :: mpierr + +! ************************************************************************* + + mpierr=0; xpaw_mpi_comm_size=1 +#ifdef HAVE_MPI + if (comm/=xpaw_mpi_comm_null) then + call MPI_COMM_SIZE(comm,xpaw_mpi_comm_size,mpierr) + end if +#endif + +end function xpaw_mpi_comm_size +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_libpaw_mpi/xpaw_mpi_barrier +!! NAME +!! xpaw_mpi_barrier +!! +!! FUNCTION +!! Wrapper for MPI_BARRIER +!! +!! INPUTS +!! comm=MPI communicator +!! +!! SOURCE + +subroutine xpaw_mpi_barrier(comm) + +!Arguments------------------------- + integer,intent(in) :: comm + +!Local variables------------------- + integer :: ier +#ifdef HAVE_MPI + integer :: nprocs +#endif + +! ************************************************************************* + + ier = 0 +#ifdef HAVE_MPI + if (comm/=xpaw_mpi_comm_null) then + call MPI_COMM_SIZE(comm,nprocs,ier) + if(nprocs>1)then + call MPI_BARRIER(comm,ier) + end if + end if +#endif + +end subroutine xpaw_mpi_barrier +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_libpaw_mpi/xpaw_mpi_wait +!! NAME +!! xpaw_mpi_wait +!! +!! FUNCTION +!! Wrapper for MPI_WAIT +!! +!! INPUTS +!! request= MPI request handle to wait for +!! +!! OUTPUT +!! mpierr= status error +!! +!! SOURCE + +subroutine xpaw_mpi_wait(request,mpierr) + +!Arguments------------------------- + integer,intent(out) :: mpierr + integer,intent(inout) :: request + +!Local variables------------------- +#ifdef HAVE_MPI + integer :: ier,status(MPI_STATUS_SIZE) +#endif + +! ************************************************************************* + + mpierr = 0 +#ifdef HAVE_MPI + call MPI_WAIT(request,status,ier) + mpierr=ier +#endif + +end subroutine xpaw_mpi_wait +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_libpaw_mpi/xpaw_mpi_waitall +!! NAME +!! xpaw_mpi_waitall +!! +!! FUNCTION +!! Wrapper for MPI_WAITALL +!! +!! INPUTS +!! array_of_requests= array of request handles +!! +!! OUTPUT +!! mpierr= status error +!! +!! SOURCE + +subroutine xpaw_mpi_waitall(array_of_requests,mpierr) + +!Arguments------------------------- + integer,intent(inout) :: array_of_requests(:) + integer,intent(out) :: mpierr + +!Local variables------------------- +#ifdef HAVE_MPI + integer :: ier,status(MPI_STATUS_SIZE,size(array_of_requests)) +#endif + +! ************************************************************************* + + mpierr = 0 +#ifdef HAVE_MPI + call MPI_WAITALL(size(array_of_requests),array_of_requests,status,ier) + mpierr=ier +#endif + +end subroutine xpaw_mpi_waitall +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_libpaw_mpi/xpaw_mpi_iprobe +!! NAME +!! xpaw_mpi_iprobe +!! +!! FUNCTION +!! Wrapper for MPI_IPROBE +!! +!! INPUTS +!! source= source processes +!! tag= tag value +!! mpicomm= communicator +!! +!! OUTPUT +!! flag= True if a message with the specified source, tag, and communicator is available +!! mpierr= status error +!! +!! SOURCE + +subroutine xpaw_mpi_iprobe(source,tag,mpicomm,flag,mpierr) + +!Arguments------------------------- + integer,intent(in) :: mpicomm,source,tag + integer,intent(out) :: mpierr + logical,intent(out) :: flag + +!Local variables------------------- +#ifdef HAVE_MPI + integer :: ier,status(MPI_STATUS_SIZE) +#endif + +! ************************************************************************* + + mpierr = 0 +#ifdef HAVE_MPI + call MPI_IPROBE(source,tag,mpicomm,flag,status,ier) + mpierr=ier +#endif + +end subroutine xpaw_mpi_iprobe +!!*** + +!---------------------------------------------------------------------- + +!!****f* ABINIT/xpaw_mpi_allgather_int1d +!! NAME +!! xpaw_mpi_allgather_int1d +!! +!! FUNCTION +!! MPI_ALLGATHER for 1D integer arrays +!! +!! INPUTS +!! xval= buffer array +!! nelem= number of elements +!! spaceComm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! recvbuf= received elements +!! +!! SOURCE + +subroutine xpaw_mpi_allgather_int1d(xval,nelem,recvbuf,spaceComm,ier) + +!Arguments------------------------- + integer, intent(in) :: xval(:) + integer, intent(inout) :: recvbuf(:) + integer, intent(in) :: nelem,spaceComm + integer, intent(out) :: ier + +! ************************************************************************* + ier=0 +#if defined HAVE_MPI + if (spaceComm /= xpaw_mpi_comm_self .and. spaceComm /= xpaw_mpi_comm_null) then + call MPI_ALLGATHER(xval,nelem,MPI_INTEGER,recvbuf,nelem,MPI_INTEGER,spaceComm,ier) + else if (spaceComm == xpaw_mpi_comm_self) then + recvbuf(1:nelem)=xval(1:nelem) + end if +#else + recvbuf(1:nelem)=xval(1:nelem) +#endif +end subroutine xpaw_mpi_allgather_int1d +!!*** + +!!****f* ABINIT/xpaw_mpi_allgather_dp1d +!! NAME +!! xpaw_mpi_allgather_dp1d +!! +!! FUNCTION +!! MPI_ALLGATHER for 1D double precision arrays +!! +!! INPUTS +!! xval= buffer array +!! nelem= number of elements +!! spaceComm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! recvbuf= received elements +!! +!! SOURCE + +subroutine xpaw_mpi_allgather_dp1d(xval,nelem,recvbuf,spaceComm,ier) + +!Arguments------------------------- + real(dp), intent(in) :: xval(:) + real(dp), intent(inout) :: recvbuf(:) + integer, intent(in) :: nelem,spaceComm + integer, intent(out) :: ier + +! ************************************************************************* + ier=0 +#if defined HAVE_MPI + if (spaceComm /= xpaw_mpi_comm_self .and. spaceComm /= xpaw_mpi_comm_null) then + call MPI_ALLGATHER(xval,nelem,MPI_DOUBLE_PRECISION,recvbuf,nelem,MPI_DOUBLE_PRECISION,spaceComm,ier) + else if (spaceComm == xpaw_mpi_comm_self) then + recvbuf(1:nelem)=xval(1:nelem) + end if +#else + recvbuf(1:nelem)=xval(1:nelem) +#endif +end subroutine xpaw_mpi_allgather_dp1d +!!*** + +!!****f* ABINIT/xpaw_mpi_allgather_dp2d +!! NAME +!! xpaw_mpi_allgather_dp2d +!! +!! FUNCTION +!! MPI_ALLGATHER for 2D double precision arrays +!! +!! INPUTS +!! xval= buffer array +!! nelem= number of elements +!! spaceComm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! recvbuf= received elements +!! +!! SOURCE + +subroutine xpaw_mpi_allgather_dp2d(xval,nelem,recvbuf,spaceComm,ier) + +!Arguments------------------------- + real(dp), intent(in) :: xval(:,:) + real(dp), intent(inout) :: recvbuf(:,:) + integer, intent(in) :: nelem,spaceComm + integer, intent(out) :: ier + +! ************************************************************************* + ier=0 +#if defined HAVE_MPI + if (spaceComm /= xpaw_mpi_comm_self .and. spaceComm /= xpaw_mpi_comm_null) then + call MPI_ALLGATHER(xval,nelem,MPI_DOUBLE_PRECISION,recvbuf,nelem,MPI_DOUBLE_PRECISION,spaceComm,ier) + else if (spaceComm == xpaw_mpi_comm_self) then + recvbuf(:,:)=xval(:,:) + end if +#else + recvbuf(:,:)=xval(:,:) +#endif +end subroutine xpaw_mpi_allgather_dp2d +!!*** + +!!****f* ABINIT/xpaw_mpi_allgather_dp3d +!! NAME +!! xpaw_mpi_allgather_dp3d +!! +!! FUNCTION +!! MPI_ALLGATHER for 3D double precision arrays +!! +!! INPUTS +!! xval= buffer array +!! nelem= number of elements +!! spaceComm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! recvbuf= received elements +!! +!! SOURCE + +subroutine xpaw_mpi_allgather_dp3d(xval,nelem,recvbuf,spaceComm,ier) + +!Arguments------------------------- + real(dp), intent(in) :: xval(:,:,:) + real(dp), intent(inout) :: recvbuf(:,:,:) + integer, intent(in) :: nelem,spaceComm + integer, intent(out) :: ier + +! ************************************************************************* + ier=0 +#if defined HAVE_MPI + if (spaceComm /= xpaw_mpi_comm_self .and. spaceComm /= xpaw_mpi_comm_null) then + call MPI_ALLGATHER(xval,nelem,MPI_DOUBLE_PRECISION,recvbuf,nelem,MPI_DOUBLE_PRECISION,spaceComm,ier) + else if (spaceComm == xpaw_mpi_comm_self) then + recvbuf(:,:,:)=xval(:,:,:) + end if +#else + recvbuf(:,:,:)=xval(:,:,:) +#endif +end subroutine xpaw_mpi_allgather_dp3d +!!*** + +!---------------------------------------------------------------------- + +!!****f* ABINIT/xpaw_mpi_allgatherv_int1d +!! NAME +!! xpaw_mpi_allgatherv_int1d +!! +!! FUNCTION +!! MPI_ALLGATHERV for 1D integer arrays +!! +!! INPUTS +!! xval= buffer array +!! recvcounts= number of received elements +!! displs= relative offsets for incoming data +!! nelem= number of elements +!! spaceComm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! recvbuf= received buffer +!! +!! SOURCE + +subroutine xpaw_mpi_allgatherv_int1d(xval,nelem,recvbuf,recvcounts,displs,spaceComm,ier) + +!Arguments------------------------- + integer, intent(in) :: xval(:) + integer, intent(inout) :: recvbuf(:) + integer, intent(in) :: recvcounts(:),displs(:) + integer, intent(in) :: nelem,spaceComm + integer, intent(out) :: ier + +!Local variables------------------- + integer :: cc,dd + +! ************************************************************************* + ier=0 +#if defined HAVE_MPI + if (spaceComm /= xpaw_mpi_comm_self .and. spaceComm /= xpaw_mpi_comm_null) then + call MPI_ALLGATHERV(xval,nelem,MPI_INTEGER,recvbuf,recvcounts,displs,& +& MPI_INTEGER,spaceComm,ier) + else if (spaceComm == xpaw_mpi_comm_self) then +#endif + dd=0;if (size(displs)>0) dd=displs(1) + cc=size(xval);if (size(recvcounts)>0) cc=recvcounts(1) + recvbuf(dd+1:dd+cc)=xval(1:cc) +#if defined HAVE_MPI + end if +#endif +end subroutine xpaw_mpi_allgatherv_int1d +!!*** + +!!****f* ABINIT/xpaw_mpi_allgatherv_dp1d +!! NAME +!! xpaw_mpi_allgatherv_dp1d +!! +!! FUNCTION +!! MPI_ALLGATHERV for 1D double precision arrays +!! +!! INPUTS +!! xval= buffer array +!! recvcounts= number of received elements +!! displs= relative offsets for incoming data +!! nelem= number of elements +!! spaceComm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! recvbuf= received buffer +!! +!! SOURCE + +subroutine xpaw_mpi_allgatherv_dp1d(xval,nelem,recvbuf,recvcounts,displs,spaceComm,ier) + +!Arguments------------------------- + real(dp), intent(in) :: xval(:) + real(dp), intent(inout) :: recvbuf(:) + integer, intent(in) :: recvcounts(:),displs(:) + integer, intent(in) :: nelem,spaceComm + integer, intent(out) :: ier + +!Local variables-------------- + integer :: cc,dd + +! ************************************************************************* + ier=0 +#if defined HAVE_MPI + if (spaceComm /= xpaw_mpi_comm_self .and. spaceComm /= xpaw_mpi_comm_null) then + call MPI_ALLGATHERV(xval,nelem,MPI_DOUBLE_PRECISION,recvbuf,recvcounts,displs,& +& MPI_DOUBLE_PRECISION,spaceComm,ier) + else if (spaceComm == xpaw_mpi_comm_self) then +#endif + dd=0;if (size(displs)>0) dd=displs(1) + cc=size(xval);if (size(recvcounts)>0) cc=recvcounts(1) + recvbuf(dd+1:dd+cc)=xval(1:cc) +#if defined HAVE_MPI + end if +#endif +end subroutine xpaw_mpi_allgatherv_dp1d +!!*** + +!!****f* ABINIT/xpaw_mpi_allgatherv_dp2d +!! NAME +!! xpaw_mpi_allgatherv_dp2d +!! +!! FUNCTION +!! MPI_ALLGATHERV for 2D double precision arrays +!! +!! INPUTS +!! xval= buffer array +!! recvcounts= number of received elements +!! displs= relative offsets for incoming data +!! nelem= number of elements +!! spaceComm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! recvbuf= received buffer +!! +!! SOURCE + +subroutine xpaw_mpi_allgatherv_dp2d(xval,nelem,recvbuf,recvcounts,displs,spaceComm,ier) + +!Arguments------------------------- + real(dp), intent(in) :: xval(:,:) + real(dp), intent(inout) :: recvbuf(:,:) + integer, intent(in) :: recvcounts(:),displs(:) + integer, intent(in) :: nelem,spaceComm + integer, intent(out) :: ier + +!Local variables-------------- + integer :: cc,dd,sz1 + +! ************************************************************************* + ier=0 +#if defined HAVE_MPI + if (spaceComm /= xpaw_mpi_comm_self .and. spaceComm /= xpaw_mpi_comm_null) then + call MPI_ALLGATHERV(xval,nelem,MPI_DOUBLE_PRECISION,recvbuf,recvcounts,displs,& +& MPI_DOUBLE_PRECISION,spaceComm,ier) + else if (spaceComm == xpaw_mpi_comm_self) then +#endif + sz1=size(xval,1) + dd=0;if (size(displs)>0) dd=displs(1)/sz1 + cc=size(xval,2);if (size(recvcounts)>0) cc=recvcounts(1)/sz1 + recvbuf(:,dd+1:dd+cc)=xval(:,1:cc) +#if defined HAVE_MPI + end if +#endif +end subroutine xpaw_mpi_allgatherv_dp2d +!!*** + +!---------------------------------------------------------------------- + +!!****f* ABINIT/xpaw_mpi_scatterv_int1d +!! NAME +!! xpaw_mpi_scatterv_int1d +!! +!! FUNCTION +!! MPI_SCATTERV for 1D integer arrays +!! +!! INPUTS +!! xval= buffer array +!! recvcount= number of received elements +!! displs= relative offsets for incoming data (array) +!! sendcounts= number of sent elements (array) +!! root= rank of receiving process +!! spaceComm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! recvbuf= received buffer +!! +!! SOURCE + +subroutine xpaw_mpi_scatterv_int1d(xval,sendcounts,displs,recvbuf,recvcount,root,spaceComm,ier) + +!Arguments------------------------- + integer, intent(in) :: xval(:) + integer, intent(inout) :: recvbuf(:) + integer, intent(in) :: sendcounts(:),displs(:) + integer, intent(in) :: recvcount,root,spaceComm + integer, intent(out) :: ier + +!Local variables------------------- + integer :: dd + +! ************************************************************************* + ier=0 +#if defined HAVE_MPI + if (spaceComm /= xpaw_mpi_comm_self .and. spaceComm /= xpaw_mpi_comm_null) then + call MPI_SCATTERV(xval,sendcounts,displs,MPI_INTEGER,recvbuf,recvcount,& +& MPI_INTEGER,root,spaceComm,ier) + else if (spaceComm == xpaw_mpi_comm_self) then +#endif + dd=0;if (size(displs)>0) dd=displs(1) + recvbuf(1:recvcount)=xval(dd+1:dd+recvcount) +#if defined HAVE_MPI + end if +#endif +end subroutine xpaw_mpi_scatterv_int1d +!!*** + +!!****f* ABINIT/xpaw_mpi_scatterv_dp1d +!! NAME +!! xpaw_mpi_scatterv_dp1d +!! +!! FUNCTION +!! MPI_SCATTERV for 1D double precision arrays +!! +!! INPUTS +!! xval= buffer array +!! recvcount= number of received elements +!! displs= relative offsets for incoming data (array) +!! sendcounts= number of sent elements (array) +!! root= rank of receiving process +!! spaceComm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! recvbuf= received buffer +!! +!! SOURCE + +subroutine xpaw_mpi_scatterv_dp1d(xval,sendcounts,displs,recvbuf,recvcount,root,spaceComm,ier) + +!Arguments------------------------- + real(dp), intent(in) :: xval(:) + real(dp), intent(inout) :: recvbuf(:) + integer, intent(in) :: sendcounts(:),displs(:) + integer, intent(in) :: recvcount,root,spaceComm + integer, intent(out) :: ier + +!Local variables------------------- + integer :: dd + +! ************************************************************************* + ier=0 +#if defined HAVE_MPI + if (spaceComm /= xpaw_mpi_comm_self .and. spaceComm /= xpaw_mpi_comm_null) then + call MPI_SCATTERV(xval,sendcounts,displs,MPI_DOUBLE_PRECISION,recvbuf,recvcount,& +& MPI_DOUBLE_PRECISION,root,spaceComm,ier) + else if (spaceComm == xpaw_mpi_comm_self) then +#endif + dd=0;if (size(displs)>0) dd=displs(1) + recvbuf(1:recvcount)=xval(dd+1:dd+recvcount) +#if defined HAVE_MPI + end if +#endif +end subroutine xpaw_mpi_scatterv_dp1d +!!*** + +!!****f* ABINIT/xpaw_mpi_scatterv_dp2d +!! NAME +!! xpaw_mpi_scatterv_dp2d +!! +!! FUNCTION +!! MPI_SCATTERV for 2D double precision arrays +!! +!! INPUTS +!! xval= buffer array +!! recvcount= number of received elements +!! displs= relative offsets for incoming data (array) +!! sendcounts= number of sent elements (array) +!! root= rank of receiving process +!! spaceComm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! recvbuf= received buffer +!! +!! SOURCE + +subroutine xpaw_mpi_scatterv_dp2d(xval,sendcounts,displs,recvbuf,recvcount,root,spaceComm,ier) + +!Arguments------------------------- + real(dp), intent(in) :: xval(:,:) + real(dp), intent(inout) :: recvbuf(:,:) + integer, intent(in) :: sendcounts(:),displs(:) + integer, intent(in) :: recvcount,root,spaceComm + integer, intent(out) :: ier + +!Local variables------------------- + integer :: cc,dd,sz1 + +! ************************************************************************* + ier=0 +#if defined HAVE_MPI + if (spaceComm /= xpaw_mpi_comm_self .and. spaceComm /= xpaw_mpi_comm_null) then + call MPI_SCATTERV(xval,sendcounts,displs,MPI_DOUBLE_PRECISION,recvbuf,recvcount,& +& MPI_DOUBLE_PRECISION,root,spaceComm,ier) + else if (spaceComm == xpaw_mpi_comm_self) then +#endif + sz1=size(recvbuf,1);cc=recvcount/sz1 + dd=0;if (size(displs)>0) dd=displs(1)/sz1 + recvbuf(:,1:cc)=xval(:,dd+1:dd+cc) +#if defined HAVE_MPI + end if +#endif +end subroutine xpaw_mpi_scatterv_dp2d +!!*** + +!---------------------------------------------------------------------- + +!!****f* ABINIT/xpaw_mpi_alltoall_int1d +!! NAME +!! xpaw_mpi_alltoall_int1d +!! +!! FUNCTION +!! MPI_ALLTOALL for 1D integer arrays +!! +!! INPUTS +!! xval= buffer array +!! sendsize= size of sent buffer +!! recvsize= size of received buffer +!! spaceComm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! recvbuf= received buffer +!! +!! SOURCE + +subroutine xpaw_mpi_alltoall_int1d(xval,sendsize,recvbuf,recvsize,spaceComm,ier) + +!Arguments------------------------- + integer, intent(in) :: xval(:) + integer, intent(inout) :: recvbuf(:) + integer, intent(in) :: sendsize, recvsize + integer, intent(in) :: spaceComm + integer, intent(out) :: ier + +!Local variables------------------- + +! ************************************************************************* + ier=0 +#if defined HAVE_MPI + if (spaceComm /= xpaw_mpi_comm_self .and. spaceComm /= xpaw_mpi_comm_null) then + call MPI_ALLTOALL(xval, sendsize, MPI_INTEGER, recvbuf, & +& recvsize, MPI_INTEGER, spaceComm, ier) + else if (spaceComm == xpaw_mpi_comm_self) then + recvbuf=xval + end if +#else + recvbuf=xval +#endif +end subroutine xpaw_mpi_alltoall_int1d +!!*** + +!!****f* ABINIT/xpaw_mpi_alltoall_dp1d +!! NAME +!! xpaw_mpi_alltoall_dp1d +!! +!! FUNCTION +!! MPI_ALLTOALL for 1D double precision arrays +!! +!! INPUTS +!! xval= buffer array +!! sendsize= size of sent buffer +!! recvsize= size of received buffer +!! spaceComm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! recvbuf= received buffer +!! +!! SOURCE + +subroutine xpaw_mpi_alltoall_dp1d(xval,sendsize,recvbuf,recvsize,spaceComm,ier) + +!Arguments------------------------- + real(dp), intent(in) :: xval(:) + real(dp), intent(inout) :: recvbuf(:) + integer, intent(in) :: sendsize, recvsize + integer, intent(in) :: spaceComm + integer, intent(out) :: ier + +! ************************************************************************* + ier=0 +#if defined HAVE_MPI + if (spaceComm /= xpaw_mpi_comm_self .and. spaceComm /= xpaw_mpi_comm_null) then + call MPI_ALLTOALL(xval, sendsize, MPI_DOUBLE_PRECISION, recvbuf, & +& recvsize, MPI_DOUBLE_PRECISION, spaceComm, ier) + else if (spaceComm == xpaw_mpi_comm_self) then + recvbuf=xval + end if +#else + recvbuf=xval +#endif +end subroutine xpaw_mpi_alltoall_dp1d +!!*** + +!!****f* ABINIT/xpaw_mpi_alltoall_dp2d +!! NAME +!! xpaw_mpi_alltoall_dp2d +!! +!! FUNCTION +!! MPI_ALLTOALL for 2D double precision arrays +!! +!! INPUTS +!! xval= buffer array +!! sendsize= size of sent buffer +!! recvsize= size of received buffer +!! spaceComm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! recvbuf= received buffer +!! +!! SOURCE + +subroutine xpaw_mpi_alltoall_dp2d(xval,sendsize,recvbuf,recvsize,spaceComm,ier) + +!Arguments------------------------- + real(dp), intent(in) :: xval(:,:) + real(dp), intent(inout) :: recvbuf(:,:) + integer, intent(in) :: sendsize, recvsize + integer, intent(in) :: spaceComm + integer, intent(out) :: ier + +! ************************************************************************* + ier=0 +#if defined HAVE_MPI + if (spaceComm /= xpaw_mpi_comm_self .and. spaceComm /= xpaw_mpi_comm_null) then + call MPI_ALLTOALL(xval, sendsize, MPI_DOUBLE_PRECISION, recvbuf, & +& recvsize, MPI_DOUBLE_PRECISION, spaceComm, ier) + else if (spaceComm == xpaw_mpi_comm_self) then + recvbuf=xval + end if +#else + recvbuf=xval +#endif +end subroutine xpaw_mpi_alltoall_dp2d +!!*** + +!---------------------------------------------------------------------- + +!!****f* ABINIT/xpaw_mpi_alltoallv_int1d +!! NAME +!! xpaw_mpi_alltoallv_int1d +!! +!! FUNCTION +!! MPI_ALLTOALLV for 1D integer arrays +!! +!! INPUTS +!! xval= buffer array +!! sendcnts= number of elements to send to each processor +!! sdispls= displacements from which to take the outgoing data +!! recvcnts= number of elements that can be received from each processor +!! rdispls= displacement at which to place the incoming data from each processor +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! recvbuf= received buffer +!! +!! SOURCE + +subroutine xpaw_mpi_alltoallv_int1d(xval,sendcnts,sdispls,recvbuf,recvcnts,rdispls,comm,ier) + +!Arguments------------------------- + integer, intent(in) :: xval(:) + integer, intent(inout) :: recvbuf(:) + integer, intent(in) :: sendcnts(:),sdispls(:),recvcnts(:) + integer, intent(in) :: comm, rdispls + integer, intent(out) :: ier + +!Local variables------------------- + integer :: sc,sds,sdr +#if defined HAVE_MPI + integer :: rdispls_on(size(sendcnts)) +#endif + +! ********************************************************************* + ier=0 +#if defined HAVE_MPI + if (comm /= xpaw_mpi_comm_self .and. comm /= xpaw_mpi_comm_null) then + rdispls_on = 0 + call MPI_ALLTOALLV(xval,sendcnts,sdispls,MPI_INTEGER,recvbuf,& +& recvcnts,rdispls_on,MPI_INTEGER,comm,ier) + else if (comm == xpaw_mpi_comm_self) then +#endif + sdr=rdispls;sds=0;if (size(sdispls)>0) sds=sdispls(1) + sc=size(xval);if (size(sendcnts)>0) sc=sendcnts(1) + recvbuf(1:sc)=xval(sds+1:sds+sc) +#if defined HAVE_MPI + end if +#endif +end subroutine xpaw_mpi_alltoallv_int1d +!!*** + +!!****f* ABINIT/xpaw_mpi_alltoallv_dp1d +!! NAME +!! xpaw_mpi_alltoallv_dp1d +!! +!! FUNCTION +!! MPI_ALLTOALLV for 1D double precision arrays +!! +!! INPUTS +!! xval= buffer array +!! sendcnts= number of elements to send to each processor +!! sdispls= displacements from which to take the outgoing data +!! recvcnts= number of elements that can be received from each processor +!! rdispls= displacement at which to place the incoming data from each processor +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! recvbuf= received buffer +!! +!! SOURCE + +subroutine xpaw_mpi_alltoallv_dp1d(xval,sendcnts,sdispls,recvbuf,recvcnts,rdispls,comm,ier) + +!Arguments------------------------- + real(dp), intent(in) :: xval(:) + real(dp), intent(inout) :: recvbuf(:) + integer, intent(in) :: sendcnts(:),sdispls(:),recvcnts(:),rdispls(:) + integer, intent(in) :: comm + integer, intent(out) :: ier + +!Local variables------------------- + integer :: sc,sds,sdr + +! ********************************************************************* + ier=0 +#if defined HAVE_MPI + if (comm /= xpaw_mpi_comm_self .and. comm /= xpaw_mpi_comm_null) then + call MPI_ALLTOALLV(xval,sendcnts,sdispls,MPI_DOUBLE_PRECISION,recvbuf,& +& recvcnts,rdispls,MPI_DOUBLE_PRECISION,comm,ier) + else if (comm == MPI_COMM_SELF) then +#endif + sds=0;if (size(sdispls)>0) sds=sdispls(1) + sdr=0;if (size(rdispls)>0) sdr=rdispls(1) + sc=size(xval);if (size(sendcnts)>0) sc=sendcnts(1) + recvbuf(sdr+1:sdr+sc)=xval(sds+1:sds+sc) +#if defined HAVE_MPI + end if +#endif +end subroutine xpaw_mpi_alltoallv_dp1d +!!*** + +!!****f* ABINIT/xpaw_mpi_alltoallv_dp2d +!! NAME +!! xpaw_mpi_alltoallv_dp2d +!! +!! FUNCTION +!! MPI_ALLTOALLV for 2D double precision arrays +!! +!! INPUTS +!! xval= buffer array +!! sendcnts= number of elements to send to each processor +!! sdispls= displacements from which to take the outgoing data +!! recvcnts= number of elements that can be received from each processor +!! rdispls= displacement at which to place the incoming data from each processor +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! recvbuf= received buffer +!! +!! SOURCE + +subroutine xpaw_mpi_alltoallv_dp2d(xval,sendcnts,sdispls,recvbuf,recvcnts,rdispls,comm,ier) + +!Arguments------------------------- + real(dp), intent(in) :: xval(:,:) + real(dp), intent(inout) :: recvbuf(:,:) + integer, intent(in) :: sendcnts(:),sdispls(:),rdispls(:),recvcnts(:) + integer,intent(in) :: comm + integer,intent(out) :: ier + +!Local variables------------------- + integer :: sc,sds,sdr,sz1 + +! ********************************************************************* + ier=0 +#if defined HAVE_MPI + if (comm /= xpaw_mpi_comm_self .and. comm /= xpaw_mpi_comm_null) then + call MPI_ALLTOALLV(xval,sendcnts,sdispls,MPI_DOUBLE_PRECISION,recvbuf,& +& recvcnts,rdispls,MPI_DOUBLE_PRECISION,comm,ier) + else if (comm == xpaw_mpi_comm_self) then +#endif + sz1=size(xval,1) + sds=0;if (size(sdispls)>0) sds=sdispls(1)/sz1 + sdr=0;if (size(rdispls)>0) sdr=rdispls(1)/sz1 + sc=size(xval,2);if (size(sendcnts)>0) sc=sendcnts(1)/sz1 + recvbuf(:,sdr+1:sdr+sc)=xval(:,sds+1:sds+sc) +#if defined HAVE_MPI + end if +#endif +end subroutine xpaw_mpi_alltoallv_dp2d +!!*** + +!---------------------------------------------------------------------- + +!!****f* ABINIT/xpaw_mpi_bcast_int +!! NAME +!! xpaw_mpi_bcast_int +!! +!! FUNCTION +!! MPI_BCAST for integers +!! +!! INPUTS +!! spaceComm= MPI communicator +!! master= master MPI node +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer +!! +!! SOURCE + +subroutine xpaw_mpi_bcast_int(xval,master,spaceComm,ier) + +!Arguments ------------------------------------ + integer, intent(inout) :: xval + integer, intent(in) :: spaceComm,master + integer, intent(out) :: ier + +!Local variables------------------------------- +#if defined HAVE_MPI + integer :: arr_xval(1) +#endif + +! ************************************************************************* + ier=0 +#if defined HAVE_MPI + if (spaceComm /= xpaw_mpi_comm_self .and. spaceComm /= xpaw_mpi_comm_null) then + arr_xval(1)=xval + call MPI_BCAST(arr_xval,1,MPI_INTEGER,master,spaceComm,ier) + xval=arr_xval(1) + end if +#endif +end subroutine xpaw_mpi_bcast_int +!!*** + +!!****f* ABINIT/xpaw_mpi_bcast_int1d +!! NAME +!! xpaw_mpi_bcast_int1d +!! +!! FUNCTION +!! MPI_BCAST for 1D integer arrays +!! +!! INPUTS +!! spaceComm= MPI communicator +!! master= master MPI node +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xpaw_mpi_bcast_int1d(xval,master,spaceComm,ier) + +!Arguments ------------------------------------ + integer, intent(inout) :: xval(:) + integer, intent(in) :: spaceComm,master + integer, intent(out) :: ier + +!Local variables------------------------------- + integer :: n + +! ************************************************************************* + ier=0 +#if defined HAVE_MPI + if (spaceComm /= xpaw_mpi_comm_self .and. spaceComm /= xpaw_mpi_comm_null) then + n=size(xval) + call MPI_BCAST(xval,n,MPI_INTEGER,master,spaceComm,ier) + end if +#endif +end subroutine xpaw_mpi_bcast_int1d +!!*** + +!!****f* ABINIT/xpaw_mpi_bcast_dp1d +!! NAME +!! xpaw_mpi_bcast_dp1d +!! +!! FUNCTION +!! MPI_BCAST for 1D double precision arrays +!! +!! INPUTS +!! spaceComm= MPI communicator +!! master= master MPI node +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE +subroutine xpaw_mpi_bcast_dp1d(xval,master,spaceComm,ier) + +!Arguments------------------------- + real(dp), intent(inout) :: xval(:) + integer, intent(in) :: spaceComm,master + integer, intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: n +#endif + +! ************************************************************************* + ier=0 +#if defined HAVE_MPI + if (spaceComm /= xpaw_mpi_comm_self .and. spaceComm /= xpaw_mpi_comm_null) then + n=size(xval,dim=1) + call MPI_BCAST(xval,n,MPI_DOUBLE_PRECISION,master,spaceComm,ier) + end if +#endif +end subroutine xpaw_mpi_bcast_dp1d +!!*** + +!!****f* ABINIT/xpaw_mpi_bcast_dp2d +!! NAME +!! xpaw_mpi_bcast_dp2d +!! +!! FUNCTION +!! MPI_BCAST for 2D double precision arrays +!! +!! INPUTS +!! spaceComm= MPI communicator +!! master= master MPI node +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xpaw_mpi_bcast_dp2d(xval,master,spaceComm,ier) + +!Arguments------------------------- + real(dp), intent(inout) :: xval(:,:) + integer, intent(in) :: spaceComm,master + integer, intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: n1,n2 +#endif + +! ************************************************************************* + ier=0 +#if defined HAVE_MPI + if (spaceComm /= xpaw_mpi_comm_self .and. spaceComm /= xpaw_mpi_comm_null) then + n1=size(xval,dim=1) ; n2=size(xval,dim=2) + call MPI_BCAST(xval,n1*n2,MPI_DOUBLE_PRECISION,master,spaceComm,ier) + end if +#endif +end subroutine xpaw_mpi_bcast_dp2d +!!*** + +!!****f* ABINIT/xpaw_mpi_bcast_dp3d +!! NAME +!! xpaw_mpi_bcast_dp3d +!! +!! FUNCTION +!! MPI_BCAST for 3D double precision arrays +!! +!! INPUTS +!! spaceComm= MPI communicator +!! master= master MPI node +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xpaw_mpi_bcast_dp3d(xval,master,spaceComm,ier) + +!Arguments------------------------- + real(dp), intent(inout) :: xval(:,:,:) + integer, intent(in) :: spaceComm,master + integer, intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: n1,n2,n3 +#endif + +! ************************************************************************* + ier=0 +#if defined HAVE_MPI + if (spaceComm /= xpaw_mpi_comm_self .and. spaceComm /= xpaw_mpi_comm_null) then + n1=size(xval,dim=1) ; n2=size(xval,dim=2) ; n3=size(xval,dim=3) + call MPI_BCAST(xval,n1*n2*n3,MPI_DOUBLE_PRECISION,master,spaceComm,ier) + end if +#endif +end subroutine xpaw_mpi_bcast_dp3d +!!*** + +!---------------------------------------------------------------------- + +!!****f* ABINIT/xpaw_mpi_gather_int1d +!! NAME +!! xpaw_mpi_gather_int1d +!! +!! FUNCTION +!! MPI_GATHER for 1D integer arrays +!! +!! INPUTS +!! xval= buffer array +!! sendcont= number of sent elements +!! recvcount= number of received elements +!! root= rank of receiving process +!! spaceComm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! recvbuf= received buffer +!! +!! SOURCE + +subroutine xpaw_mpi_gather_int1d(xval,sendcount,recvbuf,recvcount,root,spaceComm,ier) + +!Arguments------------------------- + integer, intent(in) :: sendcount,recvcount + integer, intent(in) :: xval(:) + integer, intent(inout) :: recvbuf(:) + integer, intent(in) :: root,spaceComm + integer, intent(out) :: ier + +! ************************************************************************* + ier=0 +#if defined HAVE_MPI + if (spaceComm /= xpaw_mpi_comm_self .and. spaceComm /= xpaw_mpi_comm_null) then + call MPI_gather(xval,sendcount,MPI_INTEGER,recvbuf,recvcount,MPI_INTEGER,root,spaceComm,ier) + else if (spaceComm == xpaw_mpi_comm_self) then + recvbuf=xval + end if +#else + recvbuf=xval +#endif +end subroutine xpaw_mpi_gather_int1d +!!*** + +!!****f* ABINIT/xpaw_mpi_gather_dp1d +!! NAME +!! xpaw_mpi_gather_dp1d +!! +!! FUNCTION +!! MPI_GATHER for 1D double precision arrays +!! +!! INPUTS +!! xval= buffer array +!! sendcont= number of sent elements +!! recvcount= number of received elements +!! root= rank of receiving process +!! spaceComm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! recvbuf= received buffer +!! +!! SOURCE + +subroutine xpaw_mpi_gather_dp1d(xval,sendcount,recvbuf,recvcount,root,spaceComm,ier) + +!Arguments------------------------- + integer, intent(in) :: sendcount,recvcount + real(dp), intent(in) :: xval(:) + real(dp), intent(inout) :: recvbuf(:) + integer, intent(in) :: root,spaceComm + integer, intent(out) :: ier + +! ************************************************************************* + ier=0 +#if defined HAVE_MPI + if (spaceComm /= xpaw_mpi_comm_self .and. spaceComm /= xpaw_mpi_comm_null) then + call MPI_gather(xval,sendcount,MPI_DOUBLE_PRECISION,recvbuf,recvcount,MPI_DOUBLE_PRECISION,& +& root,spaceComm,ier) + else if (spaceComm == xpaw_mpi_comm_self) then + recvbuf=xval + end if +#else + recvbuf=xval +#endif +end subroutine xpaw_mpi_gather_dp1d +!!*** + +!!****f* ABINIT/xpaw_mpi_gather_dp2d +!! NAME +!! xpaw_mpi_gather_dp2d +!! +!! FUNCTION +!! MPI_GATHER for 2D double precision arrays +!! +!! INPUTS +!! xval= buffer array +!! sendcont= number of sent elements +!! recvcount= number of received elements +!! root= rank of receiving process +!! spaceComm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! recvbuf= received buffer +!! +!! SOURCE + +subroutine xpaw_mpi_gather_dp2d(xval,sendcount,recvbuf,recvcount,root,spaceComm,ier) + +!Arguments------------------------- + integer, intent(in) :: sendcount,recvcount + real(dp), intent(in) :: xval(:,:) + real(dp), intent(inout) :: recvbuf(:,:) + integer, intent(in) :: root,spaceComm + integer, intent(out) :: ier + +! ************************************************************************* + ier=0 +#if defined HAVE_MPI + if (spaceComm /= xpaw_mpi_comm_self .and. spaceComm /= xpaw_mpi_comm_null) then + call MPI_gather(xval,sendcount,MPI_DOUBLE_PRECISION,recvbuf,recvcount,MPI_DOUBLE_PRECISION,& +& root,spaceComm,ier) + else if (spaceComm == xpaw_mpi_comm_self) then + recvbuf=xval + end if +#else + recvbuf=xval +#endif +end subroutine xpaw_mpi_gather_dp2d +!!*** + +!---------------------------------------------------------------------- + +!!****f* ABINIT/xpaw_mpi_gatherv_int1d +!! NAME +!! xpaw_mpi_gatherv_int1d +!! +!! FUNCTION +!! MPI_GATHERV for 1D integer arrays +!! +!! INPUTS +!! xval= buffer array +!! recvcounts= number of received elements +!! displs= relative offsets for incoming data +!! nelem= number of elements +!! root= rank of receiving process +!! spaceComm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! recvbuf= received buffer +!! +!! SOURCE + +subroutine xpaw_mpi_gatherv_int1d(xval,nelem,recvbuf,recvcounts,displs,root,spaceComm,ier) + +!Arguments------------------------- + integer, intent(in) :: xval(:) + integer, intent(inout) :: recvbuf(:) + integer, intent(in) :: recvcounts(:),displs(:) + integer, intent(in) :: nelem,root,spaceComm + integer, intent(out) :: ier + +!Local variables------------------- + integer :: cc,dd + +! ************************************************************************* + ier=0 +#if defined HAVE_MPI + if (spaceComm /=xpaw_mpi_comm_self .and. spaceComm /=xpaw_mpi_comm_null) then + call MPI_gatherV(xval,nelem,MPI_INTEGER,recvbuf,recvcounts,displs,& +& MPI_INTEGER,root,spaceComm,ier) + else if (spaceComm ==xpaw_mpi_comm_self) then +#endif + dd=0;if (size(displs)>0) dd=displs(1) + cc=size(xval);if (size(recvcounts)>0) cc=recvcounts(1) + recvbuf(dd+1:dd+cc)=xval(1:cc) +#if defined HAVE_MPI + end if +#endif +end subroutine xpaw_mpi_gatherv_int1d +!!*** + +!!****f* ABINIT/xpaw_mpi_gatherv_dp1d +!! NAME +!! xpaw_mpi_gatherv_dp1d +!! +!! FUNCTION +!! MPI_GATHERV for 1D double precision arrays +!! +!! INPUTS +!! xval= buffer array +!! recvcounts= number of received elements +!! displs= relative offsets for incoming data +!! nelem= number of elements +!! root= rank of receiving process +!! spaceComm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! recvbuf= received buffer +!! +!! SOURCE + +subroutine xpaw_mpi_gatherv_dp1d(xval,nelem,recvbuf,recvcounts,displs,root,spaceComm,ier) + +!Arguments------------------------- + real(dp), intent(in) :: xval(:) + real(dp), intent(inout) :: recvbuf(:) + integer, intent(in) :: recvcounts(:),displs(:) + integer, intent(in) :: nelem,root,spaceComm + integer, intent(out) :: ier + +!Local variables-------------- + integer :: cc,dd + +! ************************************************************************* + ier=0 +#if defined HAVE_MPI + if (spaceComm /=xpaw_mpi_comm_self .and. spaceComm /=xpaw_mpi_comm_null) then + call MPI_gatherV(xval,nelem,MPI_DOUBLE_PRECISION,recvbuf,recvcounts,displs,& +& MPI_DOUBLE_PRECISION,root,spaceComm,ier) + else if (spaceComm ==xpaw_mpi_comm_self) then +#endif + dd=0;if (size(displs)>0) dd=displs(1) + cc=size(xval);if (size(recvcounts)>0) cc=recvcounts(1) + recvbuf(dd+1:dd+cc)=xval(1:cc) +#if defined HAVE_MPI + end if +#endif +end subroutine xpaw_mpi_gatherv_dp1d +!!*** + +!!****f* ABINIT/xpaw_mpi_gatherv_dp2d +!! NAME +!! xpaw_mpi_gatherv_dp2d +!! +!! FUNCTION +!! MPI_GATHERV for 2D double precision arrays +!! +!! INPUTS +!! xval= buffer array +!! recvcounts= number of received elements +!! displs= relative offsets for incoming data +!! nelem= number of elements +!! root= rank of receiving process +!! spaceComm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! recvbuf= received buffer +!! +!! SOURCE + +subroutine xpaw_mpi_gatherv_dp2d(xval,nelem,recvbuf,recvcounts,displs,root,spaceComm,ier) + +!Arguments------------------------- + real(dp), intent(in) :: xval(:,:) + real(dp), intent(inout) :: recvbuf(:,:) + integer, intent(in) :: recvcounts(:),displs(:) + integer, intent(in) :: nelem,root,spaceComm + integer, intent(out) :: ier + +!Local variables-------------- + integer :: cc,dd,sz1 + +! ************************************************************************* + ier=0 +#if defined HAVE_MPI + if (spaceComm /=xpaw_mpi_comm_self .and. spaceComm /=xpaw_mpi_comm_null) then + call MPI_gatherV(xval,nelem,MPI_DOUBLE_PRECISION,recvbuf,recvcounts,displs,& +& MPI_DOUBLE_PRECISION,root,spaceComm,ier) + else if (spaceComm ==xpaw_mpi_comm_self) then +#endif + sz1=size(xval,1) + dd=0;if (size(displs)>0) dd=displs(1)/sz1 + cc=size(xval,2);if (size(recvcounts)>0) cc=recvcounts(1)/sz1 + recvbuf(:,dd+1:dd+cc)=xval(:,1:cc) +#if defined HAVE_MPI + end if +#endif +end subroutine xpaw_mpi_gatherv_dp2d +!!*** + +!---------------------------------------------------------------------- + +!!****f* ABINIT/xpaw_mpi_recv_int1d +!! NAME +!! xpaw_mpi_recv_int1d +!! +!! FUNCTION +!! MPI_RECV for 1D integer arrays +!! +!! INPUTS +!! source :: rank of source process +!! tag :: integer message tag +!! spaceComm :: MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! NOTES +!! status of MPI_RECV is explicitly ignored +!! +!! SOURCE + +subroutine xpaw_mpi_recv_int1d(xval,source,tag,spaceComm,ier) + +!Arguments------------------------- + integer, intent(inout) :: xval(:) + integer, intent(in) :: source,tag,spaceComm + integer, intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_tag, n1 +#endif + +! ************************************************************************* + ier=0 +#if defined HAVE_MPI + if (spaceComm /= xpaw_mpi_comm_self .and. spaceComm /= xpaw_mpi_comm_null) then + n1=size(xval,dim=1) + my_tag = MOD(tag,xpaw_mpi_get_tag_ub(spaceComm)) + call MPI_RECV(xval,n1,MPI_INTEGER,source,my_tag,spaceComm,MPI_STATUS_IGNORE,ier) + end if +#endif + end subroutine xpaw_mpi_recv_int1d +!!*** + +!!****f* ABINIT/xpaw_mpi_recv_dp1d +!! NAME +!! xpaw_mpi_recv_dp1d +!! +!! FUNCTION +!! MPI_RECV for 1D double precision arrays +!! +!! INPUTS +!! source :: rank of source process +!! tag :: integer message tag +!! spaceComm :: MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! NOTES +!! status of MPI_RECV is explicitly ignored +!! +!! SOURCE + +subroutine xpaw_mpi_recv_dp1d(xval,source,tag,spaceComm,ier) + +!Arguments------------------------- + real(dp), intent(inout) :: xval(:) + integer, intent(in) :: source,tag,spaceComm + integer, intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: n1,my_tag +#endif + +! ************************************************************************* + ier=0 +#if defined HAVE_MPI + if (spaceComm /= xpaw_mpi_comm_self .and. spaceComm /= xpaw_mpi_comm_null) then + n1=size(xval,dim=1) + my_tag = MOD(tag,xpaw_mpi_get_tag_ub(spaceComm)) + call MPI_RECV(xval,n1,MPI_DOUBLE_PRECISION,source,my_tag,spaceComm,MPI_STATUS_IGNORE,ier) + end if +#endif +end subroutine xpaw_mpi_recv_dp1d +!!*** + +!!****f* ABINIT/xpaw_mpi_recv_dp2d +!! NAME +!! xpaw_mpi_recv_dp2d +!! +!! FUNCTION +!! MPI_RECV for 2D double precision arrays +!! +!! INPUTS +!! source :: rank of source process +!! tag :: integer message tag +!! spaceComm :: MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! NOTES +!! status of MPI_RECV is explicitly ignored +!! +!! SOURCE + +subroutine xpaw_mpi_recv_dp2d(xval,source,tag,spaceComm,ier) + +!Arguments------------------------- + real(dp), intent(inout) :: xval(:,:) + integer, intent(in) :: source,tag,spaceComm + integer, intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: n1,n2,my_tag +#endif + +! ************************************************************************* + ier=0 +#if defined HAVE_MPI + if (spaceComm /= xpaw_mpi_comm_self .and. spaceComm /= xpaw_mpi_comm_null) then + n1=size(xval,dim=1) ; n2=size(xval,dim=2) + my_tag = MOD(tag,xpaw_mpi_get_tag_ub(spaceComm)) + call MPI_RECV(xval,n1*n2,MPI_DOUBLE_PRECISION,source,my_tag,spaceComm,MPI_STATUS_IGNORE,ier) + end if +#endif +end subroutine xpaw_mpi_recv_dp2d +!!*** + +!!****f* ABINIT/xpaw_mpi_recv_dp3d +!! NAME +!! xpaw_mpi_recv_dp3d +!! +!! FUNCTION +!! MPI_RECV for 3D double precision arrays +!! +!! INPUTS +!! source :: rank of source process +!! tag :: integer message tag +!! spaceComm :: MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! NOTES +!! status of MPI_RECV is explicitly ignored +!! +!! SOURCE + +subroutine xpaw_mpi_recv_dp3d(xval,source,tag,spaceComm,ier) + +!Arguments------------------------- + real(dp), intent(inout) :: xval(:,:,:) + integer, intent(in) :: source,tag,spaceComm + integer, intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: n1,n2,n3,my_tag +#endif + +! ************************************************************************* + ier=0 +#if defined HAVE_MPI + if (spaceComm /= xpaw_mpi_comm_self .and. spaceComm /= xpaw_mpi_comm_null) then + n1=size(xval,dim=1) ; n2=size(xval,dim=2) ; n3=size(xval,dim=3) + my_tag = MOD(tag,xpaw_mpi_get_tag_ub(spaceComm)) + call MPI_RECV(xval,n1*n2*n3,MPI_DOUBLE_PRECISION,source,my_tag,spaceComm,MPI_STATUS_IGNORE,ier) + end if +#endif +end subroutine xpaw_mpi_recv_dp3d +!!*** + +!---------------------------------------------------------------------- + +!!****f* ABINIT/xpaw_mpi_irecv_int1d +!! NAME +!! xpaw_mpi_irecv_int1d +!! +!! FUNCTION +!! MPI_IRECV for 1D integer arrays +!! +!! INPUTS +!! dest :: rank of destination process +!! tag :: integer message tag +!! spaceComm :: MPI communicator +!! +!! OUTPUT +!! ierr= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFETS +!! xval= buffer array +!! +!! NOTES +!! status of MPI_IRECV is explicitly ignored +!! +!! SOURCE + +subroutine xpaw_mpi_irecv_int1d(xval,source,tag,spaceComm,request,ierr) + +!Arguments------------------------- + integer, intent(inout) :: xval(:) + integer, intent(in) :: source,tag,spaceComm + integer, intent(out) :: request,ierr +!Local variables------------------- +#if defined HAVE_MPI + integer :: ier,n1,my_tag +#endif + +! ************************************************************************* + ierr=0 +#if defined HAVE_MPI + if (spaceComm /= xpaw_mpi_comm_self .and. spaceComm /= xpaw_mpi_comm_null) then + n1=size(xval) + my_tag = MOD(tag,xpaw_mpi_get_tag_ub(spaceComm)) + call MPI_IRECV(xval,n1,MPI_INTEGER,source,my_tag,spaceComm,request,ier) + ierr=ier + end if +#endif + end subroutine xpaw_mpi_irecv_int1d +!!*** + +!!****f* ABINIT/xpaw_mpi_irecv_dp1d +!! NAME +!! xpaw_mpi_irecv_dp1d +!! +!! FUNCTION +!! MPI_IRECV for 1D double precision arrays +!! +!! INPUTS +!! source :: rank of source process +!! tag :: integer message tag +!! spaceComm :: MPI communicator +!! +!! OUTPUT +!! ierr= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! NOTES +!! status of MPI_IRECV is explicitly ignored +!! +!! SOURCE + +subroutine xpaw_mpi_irecv_dp1d(xval,source,tag,spaceComm,request,ierr) + +!Arguments------------------------- + real(dp), intent(inout) :: xval(:) + integer, intent(in) :: source,tag,spaceComm + integer, intent(out) :: request, ierr + +!Local variables------------------- +#if defined HAVE_MPI + integer :: ier,my_tag,n1 +#endif + +! ************************************************************************* + ierr=0 +#if defined HAVE_MPI + if (spaceComm /= xpaw_mpi_comm_self .and. spaceComm /= xpaw_mpi_comm_null) then + n1=size(xval,dim=1) + my_tag = MOD(tag,xpaw_mpi_get_tag_ub(spaceComm)) + call MPI_IRECV(xval,n1,MPI_DOUBLE_PRECISION,source,my_tag,spaceComm,request,ier) + ierr=ier + end if +#endif +end subroutine xpaw_mpi_irecv_dp1d +!!*** + +!!****f* ABINIT/xpaw_mpi_irecv_dp2d +!! NAME +!! xpaw_mpi_irecv_dp2d +!! +!! FUNCTION +!! MPI_IRECV for 2D double precision arrays +!! +!! INPUTS +!! source :: rank of source process +!! tag :: integer message tag +!! spaceComm :: MPI communicator +!! +!! OUTPUT +!! ierr= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! NOTES +!! status of MPI_IRECV is explicitly ignored +!! +!! SOURCE + +subroutine xpaw_mpi_irecv_dp2d(xval,source,tag,spaceComm,request,ierr) + +!Arguments------------------------- + real(dp), intent(inout) :: xval(:,:) + integer, intent(in) :: source,tag,spaceComm + integer, intent(out) :: request, ierr + +!Local variables------------------- +#if defined HAVE_MPI + integer :: ier,my_tag,n1,n2 +#endif + +! ************************************************************************* + ierr=0 +#if defined HAVE_MPI + if (spaceComm /= xpaw_mpi_comm_self .and. spaceComm /= xpaw_mpi_comm_null) then + n1=size(xval,dim=1);n2=size(xval,dim=2) + my_tag = MOD(tag,xpaw_mpi_get_tag_ub(spaceComm)) + call MPI_IRECV(xval,n1*n2,MPI_DOUBLE_PRECISION,source,my_tag,spaceComm,request,ier) + ierr=ier + end if +#endif +end subroutine xpaw_mpi_irecv_dp2d +!!*** + +!---------------------------------------------------------------------- + +!!****f* ABINIT/xpaw_mpi_send_int1d +!! NAME +!! xpaw_mpi_send_int1d +!! +!! FUNCTION +!! MPI_ISEND for 1D integer arrays +!! +!! INPUTS +!! dest= rank of destination process +!! tag= integer message tag +!! spaceComm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xpaw_mpi_send_int1d(xval,dest,tag,spaceComm,ier) + +!Arguments------------------------- + integer, intent(inout) :: xval(:) + integer, intent(in) :: dest,tag,spaceComm + integer, intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: my_tag, n1 +#endif + +! ************************************************************************* + ier=0 +#if defined HAVE_MPI + if (spaceComm /= xpaw_mpi_comm_self .and. spaceComm /= xpaw_mpi_comm_null) then + n1=size(xval,dim=1) + my_tag = MOD(tag,xpaw_mpi_get_tag_ub(spaceComm)) + call MPI_SEND(xval,n1,MPI_INTEGER,dest,my_tag,spaceComm,ier) + end if +#endif + end subroutine xpaw_mpi_send_int1d +!!*** + +!!****f* ABINIT/xpaw_mpi_send_dp1d +!! NAME +!! xpaw_mpi_send_dp1d +!! +!! FUNCTION +!! MPI_SEND for 1D double precision arrays +!! +!! INPUTS +!! dest= rank of destination process +!! tag= integer message tag +!! spaceComm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xpaw_mpi_send_dp1d(xval,dest,tag,spaceComm,ier) + +!Arguments------------------------- + real(dp), intent(inout) :: xval(:) + integer, intent(in) :: dest,tag,spaceComm + integer, intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: n1,my_tag +#endif + +! ************************************************************************* + ier=0 +#if defined HAVE_MPI + if (spaceComm /= xpaw_mpi_comm_self .and. spaceComm /= xpaw_mpi_comm_null) then + n1=size(xval,dim=1) + my_tag = MOD(tag,xpaw_mpi_get_tag_ub(spaceComm)) + call MPI_SEND(xval,n1,MPI_DOUBLE_PRECISION,dest,my_tag,spaceComm,ier) + end if +#endif +end subroutine xpaw_mpi_send_dp1d +!!*** + +!!****f* ABINIT/xpaw_mpi_send_dp2d +!! NAME +!! xpaw_mpi_send_dp2d +!! +!! FUNCTION +!! MPI_SEND for 2D double precision arrays +!! +!! INPUTS +!! dest= rank of destination process +!! tag= integer message tag +!! spaceComm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xpaw_mpi_send_dp2d(xval,dest,tag,spaceComm,ier) + +!Arguments------------------------- + real(dp), intent(inout) :: xval(:,:) + integer, intent(in) :: dest,tag,spaceComm + integer, intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: n1,n2,my_tag +#endif + +! ************************************************************************* + ier=0 +#if defined HAVE_MPI + if (spaceComm /= xpaw_mpi_comm_self .and. spaceComm /= xpaw_mpi_comm_null) then + n1=size(xval,dim=1) ; n2=size(xval,dim=2) + my_tag = MOD(tag,xpaw_mpi_get_tag_ub(spaceComm)) + call MPI_SEND(xval,n1*n2,MPI_DOUBLE_PRECISION,dest,my_tag,spaceComm,ier) + end if +#endif +end subroutine xpaw_mpi_send_dp2d +!!*** + +!!****f* ABINIT/xpaw_mpi_send_dp3d +!! NAME +!! xpaw_mpi_send_dp3d +!! +!! FUNCTION +!! MPI_SEND for 3D double precision arrays +!! +!! INPUTS +!! dest= rank of destination process +!! tag= integer message tag +!! spaceComm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xpaw_mpi_send_dp3d(xval,dest,tag,spaceComm,ier) + +!Arguments------------------------- + real(dp), intent(inout) :: xval(:,:,:) + integer, intent(in) :: dest,tag,spaceComm + integer, intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: n1,n2,n3,my_tag +#endif + +! ************************************************************************* + ier=0 +#if defined HAVE_MPI + if (spaceComm /= xpaw_mpi_comm_self .and. spaceComm /= xpaw_mpi_comm_null) then + n1=size(xval,dim=1) ; n2=size(xval,dim=2) ; n3=size(xval,dim=3) + my_tag = MOD(tag,xpaw_mpi_get_tag_ub(spaceComm)) + call MPI_SEND(xval,n1*n2*n3,MPI_DOUBLE_PRECISION,dest,my_tag,spaceComm,ier) + end if +#endif +end subroutine xpaw_mpi_send_dp3d +!!*** + +!---------------------------------------------------------------------- + +!!****f* ABINIT/xpaw_mpi_isend_int1d +!! NAME +!! xpaw_mpi_isend_int1d +!! +!! FUNCTION +!! MPI_ISEND for 1D integer arrays +!! +!! INPUTS +!! dest= rank of destination process +!! tag= integer message tag +!! spaceComm= MPI communicator +!! +!! OUTPUT +!! ierr= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xpaw_mpi_isend_int1d(xval,dest,tag,spaceComm,request,ierr) + +!Arguments------------------------- + integer, intent(inout) :: xval(:) + integer, intent(in) :: dest,tag,spaceComm + integer, intent(out) :: request,ierr + +!Local variables------------------- +#if defined HAVE_MPI + integer :: ier,my_tag,n1 +#endif + +! ************************************************************************* + ierr=0 +#if defined HAVE_MPI + if (spaceComm /= xpaw_mpi_comm_self .and. spaceComm /= xpaw_mpi_comm_null) then + n1=size(xval,dim=1) + my_tag = MOD(tag,xpaw_mpi_get_tag_ub(spaceComm)) + call MPI_ISEND(xval,n1,MPI_INTEGER,dest,my_tag,spaceComm,request,ier) + ierr=ier + end if +#endif + end subroutine xpaw_mpi_isend_int1d +!!*** + +!!****f* ABINIT/xpaw_mpi_isend_dp1d +!! NAME +!! xpaw_mpi_isend_dp1d +!! +!! FUNCTION +!! MPI_ISEND for 1D double precision arrays +!! +!! INPUTS +!! dest= rank of destination process +!! tag= integer message tag +!! spaceComm= MPI communicator +!! +!! OUTPUT +!! ierr= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xpaw_mpi_isend_dp1d(xval,dest,tag,spaceComm,request,ierr) + +!Arguments------------------------- + real(dp), intent(inout) :: xval(:) + integer, intent(in) :: dest,tag,spaceComm + integer, intent(out) :: request,ierr + +!Local variables------------------- +#if defined HAVE_MPI + integer :: ier,my_tag,n1 +#endif + +! ************************************************************************* + ierr=0 +#if defined HAVE_MPI + if (spaceComm /= xpaw_mpi_comm_self .and. spaceComm /= xpaw_mpi_comm_null) then + n1=size(xval,dim=1) + my_tag = MOD(tag,xpaw_mpi_get_tag_ub(spaceComm)) + call MPI_ISEND(xval,n1,MPI_DOUBLE_PRECISION,dest,my_tag,spaceComm,request,ier) + ierr=ier + end if +#endif +end subroutine xpaw_mpi_isend_dp1d +!!*** + +!!****f* ABINIT/xpaw_mpi_isend_dp2d +!! NAME +!! xpaw_mpi_isend_dp2d +!! +!! FUNCTION +!! MPI_ISEND for 2D double precision arrays +!! +!! INPUTS +!! dest= rank of destination process +!! tag= integer message tag +!! spaceComm= MPI communicator +!! +!! OUTPUT +!! ierr= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xpaw_mpi_isend_dp2d(xval,dest,tag,spaceComm,request,ierr) + +!Arguments------------------------- + real(dp), intent(inout) :: xval(:,:) + integer, intent(in) :: dest,tag,spaceComm + integer, intent(out) :: request,ierr + +!Local variables------------------- +#if defined HAVE_MPI + integer :: ier,my_tag,n1,n2 +#endif + +! ************************************************************************* + ierr=0 +#if defined HAVE_MPI + if (spaceComm /= xpaw_mpi_comm_self .and. spaceComm /= xpaw_mpi_comm_null) then + n1=size(xval,dim=1) ; n1=size(xval,dim=2) + my_tag = MOD(tag,xpaw_mpi_get_tag_ub(spaceComm)) + call MPI_ISEND(xval,n1*n2,MPI_DOUBLE_PRECISION,dest,my_tag,spaceComm,request,ier) + ierr=ier + end if +#endif +end subroutine xpaw_mpi_isend_dp2d +!!*** + +!---------------------------------------------------------------------- + +!!****f* ABINIT/xpaw_mpi_exch_int1d +!! NAME +!! xpaw_mpi_exch_int1d +!! +!! FUNCTION +!! MPI_SEND/MPI_RECV for 1D integer arrays +!! +!! INPUTS +!! mtag= message tag +!! n1= vector length +!! vsend= sent buffer +!! sender= node sending the data +!! recever= node receiving the data +!! spaceComm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! vrecv= received buffer +!! +!! SOURCE + +subroutine xpaw_mpi_exch_int1d(vsend,n1,sender,vrecv,recever,spaceComm,mtag,ier) + +!Arguments---------------- + integer, intent(in) :: mtag,n1 + integer, intent(in) :: vsend(:) + integer, intent(inout) :: vrecv(:) + integer, intent(in) :: sender,recever,spaceComm + integer, intent(out) :: ier + +!Local variables-------------- +#if defined HAVE_MPI + integer :: status(MPI_STATUS_SIZE) + integer :: tag,me +#endif + +! ************************************************************************* + ier=0 +#if defined HAVE_MPI + if (sender==recever.or.spaceComm==xpaw_mpi_comm_null.or.(n1==0)) return + call MPI_COMM_RANK(spaceComm,me,ier) + tag = MOD(mtag,xpaw_mpi_get_tag_ub(spaceComm)) + if (recever==me) then + call MPI_RECV(vrecv,n1,MPI_INTEGER,sender,tag,spaceComm,status,ier) + end if + if (sender==me) then + call MPI_SEND(vsend,n1,MPI_INTEGER,recever,tag,spaceComm,ier) + end if +#endif +end subroutine xpaw_mpi_exch_int1d +!!*** + +!!****f* ABINIT/xpaw_mpi_exch_dp1d +!! NAME +!! xpaw_mpi_exch_dp1d +!! +!! FUNCTION +!! MPI_SEND/MPI_RECV for 1D double precision arrays +!! +!! INPUTS +!! mtag= message tag +!! n1= first dimension of the array +!! vsend= send buffer +!! sender= node sending the data +!! recever= node receiving the data +!! spaceComm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! vrecv= receive buffer +!! +!! SOURCE + +subroutine xpaw_mpi_exch_dp1d(vsend,n1,sender,vrecv,recever,spaceComm,mtag,ier) + +!Arguments---------------- + integer,intent(in) :: mtag,n1 + real(dp), intent(in) :: vsend(:) + real(dp), intent(inout) :: vrecv(:) + integer, intent(in) :: sender,recever,spaceComm + integer, intent(out) :: ier + +!Local variables-------------- +#if defined HAVE_MPI + integer :: status(MPI_STATUS_SIZE) + integer :: tag,me +#endif + +! ************************************************************************* + ier=0 +#if defined HAVE_MPI + if (sender==recever.or.spaceComm==xpaw_mpi_comm_null.or.(n1==0)) return + call MPI_COMM_RANK(spaceComm,me,ier) + tag = MOD(mtag,xpaw_mpi_get_tag_ub(spaceComm)) + if (recever==me) then + call MPI_RECV(vrecv,n1,MPI_DOUBLE_PRECISION,sender,tag,spaceComm,status,ier) + end if + if (sender==me) then + call MPI_SEND(vsend,n1,MPI_DOUBLE_PRECISION,recever,tag,spaceComm,ier) + end if +#endif +end subroutine xpaw_mpi_exch_dp1d +!!*** + +!!****f* ABINIT/xpaw_mpi_exch_dp2d +!! NAME +!! xpaw_mpi_exch_dp2d +!! +!! FUNCTION +!! MPI_SEND/MPI_RECV for 2D double precision arrays +!! +!! INPUTS +!! mtag= message tag +!! nt= vector length +!! vsend= sent buffer +!! sender= node sending the data +!! recever= node receiving the data +!! spaceComm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! vrecv= received buffer +!! +!! SOURCE + +subroutine xpaw_mpi_exch_dp2d(vsend,nt,sender,vrecv,recever,spaceComm,mtag,ier) + +!Arguments---------------- + integer,intent(in) :: mtag,nt + real(dp), intent(in) :: vsend(:,:) + real(dp), intent(inout) :: vrecv(:,:) + integer, intent(in) :: sender,recever,spaceComm + integer, intent(out) :: ier + +!Local variables-------------- +#if defined HAVE_MPI + integer :: status(MPI_STATUS_SIZE) + integer :: tag,me +#endif + +! ************************************************************************* + ier=0 +#if defined HAVE_MPI + if (sender==recever.or.spaceComm==xpaw_mpi_comm_null.or.(nt==0)) return + call MPI_COMM_RANK(spaceComm,me,ier) + tag = MOD(mtag,xpaw_mpi_get_tag_ub(spaceComm)) + if (recever==me) then + call MPI_RECV(vrecv,nt,MPI_DOUBLE_PRECISION,sender,tag,spaceComm,status,ier) + end if + if (sender==me) then + call MPI_SEND(vsend,nt,MPI_DOUBLE_PRECISION,recever,tag,spaceComm,ier) + end if +#endif +end subroutine xpaw_mpi_exch_dp2d +!!*** + +!!****f* ABINIT/xpaw_mpi_exch_dp3d +!! NAME +!! mtag= message tag +!! xpaw_mpi_exch_dp3d +!! +!! FUNCTION +!! MPI_SEND/MPI_RECV for 3D double precision arrays +!! +!! INPUTS +!! mtag= message tag +!! nt= vector length +!! vsend= sent buffer +!! sender= node sending the data +!! recever= node receiving the data +!! spaceComm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! vrecv= received buffer +!! +!! SOURCE + +subroutine xpaw_mpi_exch_dp3d(vsend,nt,sender,vrecv,recever,spaceComm,mtag,ier) + +!Arguments---------------- + integer,intent(in) :: mtag,nt + real(dp), intent(in) :: vsend(:,:,:) + real(dp), intent(inout) :: vrecv(:,:,:) + integer, intent(in) :: sender,recever,spaceComm + integer, intent(out) :: ier + +!Local variables-------------- +#if defined HAVE_MPI + integer :: status(MPI_STATUS_SIZE) + integer :: tag,me +#endif + +! ************************************************************************* + ier=0 +#if defined HAVE_MPI + if (sender==recever.or.spaceComm==xpaw_mpi_comm_null.or.(nt==0)) return + call MPI_COMM_RANK(spaceComm,me,ier) + tag = MOD(mtag,xpaw_mpi_get_tag_ub(spaceComm)) + if (recever==me) then + call MPI_RECV(vrecv,nt,MPI_DOUBLE_PRECISION,sender,tag,spaceComm,status,ier) + end if + if (sender==me) then + call MPI_SEND(vsend,nt,MPI_DOUBLE_PRECISION,recever,tag,spaceComm,ier) + end if +#endif +end subroutine xpaw_mpi_exch_dp3d +!!*** + +!---------------------------------------------------------------------- + +!!****f* ABINIT/xpaw_mpi_sum_int +!! NAME +!! xpaw_mpi_sum_int +!! +!! FUNCTION +!! MPI_ALLREDUCE(SUM) for integers +!! +!! INPUTS +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer +!! +!! SOURCE + +subroutine xpaw_mpi_sum_int(xval,comm,ier) + +!Arguments------------------------- + integer, intent(inout) :: xval + integer, intent(in) :: comm + integer, intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: nproc + integer :: arr_xval(1),arr_xsum(1) +#endif + +! ************************************************************************* + ier=0 +#if defined HAVE_MPI + if (comm /= xpaw_mpi_comm_self .and. comm /= xpaw_mpi_comm_null) then + call MPI_COMM_SIZE(comm,nproc,ier) + if (nproc /= 1) then + arr_xval(1)=xval + call MPI_ALLREDUCE(arr_xval,arr_xsum,1,MPI_INTEGER,MPI_SUM,comm,ier) + xval=arr_xsum(1) + end if + end if +#endif +end subroutine xpaw_mpi_sum_int +!!*** + +!!****f* ABINIT/xpaw_mpi_sum_int1d +!! NAME +!! xpaw_mpi_sum_int1d +!! +!! FUNCTION +!! MPI_ALLREDUCE(SUM) for 1D integer arrays +!! +!! INPUTS +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xpaw_mpi_sum_int1d(xval,comm,ier) + +!Arguments------------------------- + integer, intent(inout) :: xval(:) + integer, intent(in) :: comm + integer, intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: n1,nproc +#if !defined HAVE_MPI2_INPLACE + integer :: xsum(size(xval,dim=1)) +#endif +#endif + +! ************************************************************************* + ier=0 +#if defined HAVE_MPI + if (comm /= xpaw_mpi_comm_self .and. comm /= xpaw_mpi_comm_null) then + call MPI_COMM_SIZE(comm,nproc,ier) + if (nproc /= 1) then + n1=size(xval,dim=1) +#if defined HAVE_MPI2_INPLACE + call MPI_ALLREDUCE(MPI_IN_PLACE,xval,n1,MPI_INTEGER,MPI_SUM,comm,ier) +#else + call MPI_ALLREDUCE(xval,xsum,n1,MPI_INTEGER,MPI_SUM,comm,ier) + xval(:)=xsum(:) +#endif + end if + end if +#endif +end subroutine xpaw_mpi_sum_int1d +!!*** + +!!****f* ABINIT/xpaw_mpi_sum_dp1d +!! NAME +!! xpaw_mpi_sum_dp1d +!! +!! FUNCTION +!! MPI_ALLREDUCE(SUM) for 1D double precision arrays +!! +!! INPUTS +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xpaw_mpi_sum_dp1d(xval,comm,ier) + +!Arguments------------------------- + real(dp), intent(inout) :: xval(:) + integer, intent(in) :: comm + integer, intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: n1,nproc +#if !defined HAVE_MPI2_INPLACE + real(dp) :: xsum(size(xval,dim=1)) +#endif +#endif + +! ************************************************************************* + ier=0 +#if defined HAVE_MPI + if (comm /= xpaw_mpi_comm_self .and. comm /= xpaw_mpi_comm_null) then + call MPI_COMM_SIZE(comm,nproc,ier) + if (nproc /= 1) then + n1=size(xval,dim=1) +#if defined HAVE_MPI2_INPLACE + call MPI_ALLREDUCE(MPI_IN_PLACE,xval,n1,MPI_DOUBLE_PRECISION,MPI_SUM,comm,ier) +#else + call MPI_ALLREDUCE(xval,xsum,n1,MPI_DOUBLE_PRECISION,MPI_SUM,comm,ier) + xval(:)=xsum(:) +#endif + end if + end if +#endif +end subroutine xpaw_mpi_sum_dp1d +!!*** + +!!****f* ABINIT/xpaw_mpi_sum_dp2d +!! NAME +!! xpaw_mpi_sum_dp2d +!! +!! FUNCTION +!! MPI_ALLREDUCE(SUM) for 2D double precision arrays +!! +!! INPUTS +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xpaw_mpi_sum_dp2d(xval,comm,ier) + +!Arguments------------------------- + real(dp), intent(inout) :: xval(:,:) + integer, intent(in) :: comm + integer, intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: n1,n2,nproc +#if !defined HAVE_MPI2_INPLACE + real(dp) :: xsum(size(xval,dim=1),size(xval,dim=2)) +#endif +#endif + +! ************************************************************************* + ier=0 +#if defined HAVE_MPI + if (comm /= xpaw_mpi_comm_self .and. comm /= xpaw_mpi_comm_null) then + call MPI_COMM_SIZE(comm,nproc,ier) + if (nproc /= 1) then + n1=size(xval,dim=1) ; n2=size(xval,dim=2) +#if defined HAVE_MPI2_INPLACE + call MPI_ALLREDUCE(MPI_IN_PLACE,xval,n1*n2,MPI_DOUBLE_PRECISION,MPI_SUM,comm,ier) +#else + call MPI_ALLREDUCE(xval,xsum,n1*n2,MPI_DOUBLE_PRECISION,MPI_SUM,comm,ier) + xval(:,:)=xsum(:,:) +#endif + end if + end if +#endif +end subroutine xpaw_mpi_sum_dp2d +!!*** + +!!****f* ABINIT/xpaw_mpi_sum_dp3d +!! NAME +!! xpaw_mpi_sum_dp3d +!! +!! FUNCTION +!! MPI_ALLREDUCE(SUM) for 3D double precision arrays +!! +!! INPUTS +!! comm= MPI communicator +!! +!! OUTPUT +!! ier= exit status, a non-zero value meaning there is an error +!! +!! SIDE EFFECTS +!! xval= buffer array +!! +!! SOURCE + +subroutine xpaw_mpi_sum_dp3d(xval,comm,ier) + +!Arguments------------------------- + real(dp), intent(inout) :: xval(:,:,:) + integer, intent(in) :: comm + integer, intent(out) :: ier + +!Local variables------------------- +#if defined HAVE_MPI + integer :: n1,n2,n3,nproc +#if !defined HAVE_MPI2_INPLACE + real(dp) :: xsum(size(xval,dim=1),size(xval,dim=2),size(xval,dim=3)) +#endif +#endif + +! ************************************************************************* + ier=0 +#if defined HAVE_MPI + if (comm /= xpaw_mpi_comm_self .and. comm /= xpaw_mpi_comm_null) then + call MPI_COMM_SIZE(comm,nproc,ier) + if (nproc /= 1) then + n1=size(xval,dim=1) ; n2=size(xval,dim=2) ; n3=size(xval,dim=3) +#if defined HAVE_MPI2_INPLACE + call MPI_ALLREDUCE(MPI_IN_PLACE,xval,n1*n2*n3,MPI_DOUBLE_PRECISION,MPI_SUM,comm,ier) +#else + call MPI_ALLREDUCE(xval,xsum,n1*n2*n3,MPI_DOUBLE_PRECISION,MPI_SUM,comm,ier) + xval(:,:,:)=xsum(:,:,:) +#endif + end if + end if +#endif +end subroutine xpaw_mpi_sum_dp3d +!!*** + +!---------------------------------------------------------------------- + +!!****f* ABINIT/xpaw_mpi_get_tag_ub +!! NAME +!! xpaw_mpi_get_tag_ub +!! +!! FUNCTION +!! Get MPI_TAG_UB attribute +!! +!! INPUTS +!! comm= MPI communicator +!! +!! OUTPUT +!! xpaw_mpi_get_tag_ub=value for the MPI_TAG_UB attribute attached to comm +!! +!! SOURCE + +function xpaw_mpi_get_tag_ub(comm) + +!Arguments------------------------- + integer, intent(in) :: comm + integer :: xpaw_mpi_get_tag_ub + +!Local variables------------------- +#if defined HAVE_MPI + integer :: attribute_val,ier + logical :: lflag +#endif + +! ************************************************************************* + +#if defined HAVE_MPI + !Deprecated in MPI2 but not all MPI2 implementations provide MPI_Comm_get_attr ! + call MPI_ATTR_GET(comm,MPI_TAG_UB,attribute_val,lflag,ier) +!call MPI_Comm_get_attr(comm MPI_TAG_UB,attribute_val,lflag,ier) + + if (lflag) xpaw_mpi_get_tag_ub = attribute_val + +#else + xpaw_mpi_get_tag_ub=32767 +#endif + +end function xpaw_mpi_get_tag_ub +!!*** + +!---------------------------------------------------------------------- + +end module m_libpaw_mpi +!!*** diff --git a/GX-PAW/libpaw/src/m_libpaw_mpi.o b/GX-PAW/libpaw/src/m_libpaw_mpi.o new file mode 100644 index 00000000..1cb4ef51 Binary files /dev/null and b/GX-PAW/libpaw/src/m_libpaw_mpi.o differ diff --git a/GX-PAW/libpaw/src/m_libpaw_tools.F90 b/GX-PAW/libpaw/src/m_libpaw_tools.F90 new file mode 100644 index 00000000..e6e82930 --- /dev/null +++ b/GX-PAW/libpaw/src/m_libpaw_tools.F90 @@ -0,0 +1,995 @@ +!!****m* ABINIT/m_libpaw_tools +!! NAME +!! m_libpaw_tools +!! +!! FUNCTION +!! Several libPAW tools: message printing, error handling, string handling... +!! +!! COPYRIGHT +!! Copyright (C) 2014-2024 ABINIT group (MT, MG, ...) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! NOTES +!! Parts of this module come directly from hide_write & hide_leave src files delivered with ABINIT. +!! +!! FOR DEVELOPPERS: in order to preserve the portability of libPAW library, +!! please consult ~abinit/src/??_libpaw/libpaw-coding-rules.txt +!! +!! SOURCE + +#include "libpaw.h" + +module m_libpaw_tools + + USE_DEFS + USE_MPI_WRAPPERS + +#if defined HAVE_YAML + use yaml_output +#endif +#ifdef LIBPAW_HAVE_NETCDF + use netcdf +#endif + + implicit none + + private + +!PUBLIC FUNCTIONS - MESSAGE HANDLING + public :: libpaw_wrtout ! Parallel output of messages + public :: libpaw_msg_hndl ! Basic error handler + public :: libpaw_flush ! Wrapper for the standard flush routine + public :: libpaw_spmsg_getcount ! Get number of special messages (WARNING/COMMENT) already printed + public :: libpaw_spmsg_mpisum ! Reduce number of special messages (WARNING/COMMENT) over MPI comm + public :: libpaw_write_comm_set ! Set the MPI communicator used for parallel write + public :: libpaw_log_flag_set ! Set the flag controlling the filling of the LOG file + public :: libpaw_netcdf_check ! Stop execution after a NetCDF I/O error + +!PUBLIC FUNCTIONS - STRING HANDLING + public :: libpaw_basename ! String, base name extraction from path + public :: libpaw_to_upper ! String conversion to uppercase + public :: libpaw_lstrip ! String right blanks removal + public :: libpaw_indent ! String indentation + +!PUBLIC FUNCTIONS - IO TOOLS + public :: libpaw_get_free_unit ! Get a free I/O unit + +!PRIVATE FUNCTIONS + private :: libpaw_wrtout_myproc ! Sequential output of messages + private :: libpaw_write_lines ! OS-compatible string output + private :: libpaw_leave ! Clean exit of F90 routines + private :: libpaw_die ! Clean exit + private :: libpaw_lock_and_write ! Write a string to a file with locking mechanism + +!PRIVATE VARIABLES + integer,save :: LIBPAW_WRITE_COMM=xmpi_world ! Communicator used for the parallel write + integer,save :: LIBPAW_COMMENT_COUNT=0 ! Number of COMMENTs printed in log file + integer,save :: LIBPAW_WARNING_COUNT=0 ! Number of WARNINGs printed in log file + integer,save :: LIBPAW_EXIT_FLAG=0 ! Flag set to 1 if an exit is requested + logical,save :: LIBPAW_HAS_LOG_FILE=.TRUE. ! Flag: True if std output exists + +!PRIVATE PARAMETERS + integer,parameter :: LIBPAW_NULL_UNIT=-1 ! Fake null unit + character(len=25),parameter :: LIBPAW_MPIABORTFILE="__LIBPAW_MPIABORTFILE__" +#if defined HAVE_OS_WINDOWS + character(len=3),parameter :: LIBPAW_NULL_FILE="NUL" +#else + character(len=9),parameter :: LIBPAW_NULL_FILE="/dev/null" +#endif + +!!*** + +CONTAINS !=========================================================== + +!!****f* m_libpaw_tools/libpaw_wrtout +!! NAME +!! libpaw_wrtout +!! +!! FUNCTION +!! Organizes the sequential or parallel version of the write intrinsic +!! +!! INPUTS +!! msg=(character(len=*)) message to be written +!! unit=unit number for writing. The named constant dev_null defined in defs_basis can be used to avoid any printing. +!! [mode_paral]= --optional argument-- +!! 'COLL' if all procs are calling the routine with the same message to be written once only. Default. +!! 'PERS' if the procs are calling the routine with different messages each to be written, +!! or if one proc is calling the routine +!! "INIT" to change the rank of the master node that prints the message if "COLL" is used. +!! +!! OUTPUT +!! (only writing) +!! +!! NOTES +!! This routine comes directly from the WRTOUT routine delivered with ABINIT. +!! +!! SOURCE + +subroutine libpaw_wrtout(unit,msg,mode_paral) + +!Arguments ------------------------------------ + integer,intent(in) :: unit + character(len=*),intent(in) :: msg + character(len=*),optional,intent(in) :: mode_paral + +!Local variables ------------------------------ + integer :: comm,me,nproc + integer,save :: master=0 + character(len=len(msg)+50) :: string + character(len=500) :: my_mode_paral + +!****************************************************************** + + if ((unit==std_out).and.(.not.LIBPAW_HAS_LOG_FILE)) RETURN + if (unit==LIBPAW_NULL_UNIT) RETURN + + my_mode_paral = "COLL"; if (PRESENT(mode_paral)) my_mode_paral = mode_paral + +!Communicator used for the parallel write + comm=LIBPAW_WRITE_COMM + nproc = xmpi_comm_size(comm) + me = xmpi_comm_rank(comm) + + if ((my_mode_paral=='COLL').or.(nproc==1)) then + if (me==master) then + call libpaw_wrtout_myproc(unit,msg) + end if + else if (my_mode_paral=='PERS') then + call libpaw_write_lines(unit,msg) + else if (my_mode_paral=='INIT') then + master=unit + else + write(string,'(7a)')ch10,& +& 'libpaw_wrtout: ERROR -',ch10,& +& ' Unknown write mode: ',my_mode_paral,ch10,& +& ' Continuing anyway ...' + write(unit,'(A)') trim(string) + end if + +end subroutine libpaw_wrtout +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_libpaw_tools/libpaw_wrtout_myproc +!! NAME +!! libpaw_wrtout_myproc +!! +!! FUNCTION +!! Do the output for one proc. +!! +!! INPUTS +!! unit=unit number for writing +!! msg=(character(len=*)) message to be written +!! +!! OUTPUT +!! (only writing) +!! +!! NOTES +!! This routine comes directly from the WRTOUT_MYPROC routine delivered with ABINIT. +!! +!! SOURCE + +subroutine libpaw_wrtout_myproc(unit,msg) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: unit + character(len=*),intent(in) :: msg + +!Local variables ------------------------------ +!scalars + logical :: print_std_err +!arrays + +!****************************************************************** + + print_std_err=(unit==std_out.and.(index(trim(msg),'BUG')/=0.or.index(trim(msg),'ERROR')/=0)) + +!Print message + call libpaw_write_lines(unit,msg) + if (print_std_err) then + call libpaw_write_lines(std_err,msg) + end if + +!Append "Contact Abinit group" to BUG messages + if (index(trim(msg),'BUG')/=0) then + write(unit,'(a)') ' Action: contact libPAW developers.' + if (print_std_err) write(std_err, '(a)' ) ' Action: contact libPAW developers.' + write(unit,*); if (print_std_err) write(std_err,*) + end if + +!Count the number of warnings and comments. Only take into +!account unit std_out, in order not to duplicate these numbers. + if (index(trim(msg),'WARNING')/=0 .and. unit==std_out) LIBPAW_WARNING_COUNT=LIBPAW_WARNING_COUNT+1 + if (index(trim(msg),'COMMENT')/=0 .and. unit==std_out) LIBPAW_COMMENT_COUNT=LIBPAW_COMMENT_COUNT+1 + if (index(trim(msg),'Exit' )/=0) LIBPAW_EXIT_FLAG=1 + +end subroutine libpaw_wrtout_myproc +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_libpaw_tools/libpaw_write_lines +!! NAME +!! libpaw_write_lines +!! +!! FUNCTION +!! This routine receives a string, split the message in lines according to the +!! ch10 character and output the text to the specified unit. +!! Allows to treat correctly the write operations for Unix (+DOS) and MacOS. +!! +!! INPUTS +!! unit=unit number for writing +!! msg=(character(len=*)) message to be written +!! +!! OUTPUT +!! (only writing) +!! +!! NOTES +!! This routine comes directly from the WRITE_LINES routine delivered with ABINIT. +!! +!! SOURCE + +subroutine libpaw_write_lines(unit,msg) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: unit + character(len=*),intent(in) :: msg + +!Local variables ------------------------------ +!scalars + integer :: msg_size,ii,jj,rtnpos +#if defined HAVE_YAML + character(len = len_trim(msg)) :: msg_out +#endif + +!****************************************************************** + + msg_size=len_trim(msg) + +#if defined HAVE_YAML + if (msg_size>0 .and. unit==std_out) then + ! Change any carriage return into space. + do ii = 1, msg_size + if (msg(ii:ii) /= char(10)) then + msg_out(ii:ii) = msg(ii:ii) + else + msg_out(ii:ii) = " " + end if + end do + call yaml_comment(msg_out) + end if + return +#endif + + if (msg_size==0) then + write(unit,*) ; return + end if + +!Here, split the message, according to the char(10) characters (carriage return). +!This technique is portable accross different OS. + rtnpos=index(msg,ch10) + if (rtnpos==0) then + write(unit,"(a)") msg(1:msg_size) ; return + end if + + ii=1; jj=rtnpos + do + if (ii==jj) then + write(unit,*) + else + write(unit,'(a)') msg(ii:jj-1) + end if + ii=jj+1 ; if (ii>msg_size) exit + jj=index(msg(ii:msg_size),ch10) + if (jj==0) then + jj=msg_size+1 + else + jj=jj+ii-1 + end if + end do + + if (msg(msg_size:msg_size)==ch10) write(unit,*) + +end subroutine libpaw_write_lines +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_libpaw_tools/libpaw_msg_hndl +!! NAME +!! libpaw_msg_hndl +!! +!! FUNCTION +!! Basic error handler. +!! +!! INPUTS +!! msg=string containing additional information on the nature of the problem +!! level=string defining the type of problem. Possible values are: +!! COMMENT, WARNING, ERROR,BUG +!! mode_paral=Either "COLL" or "PERS". +!! [line]=line number of the file where problem occurred (optional) +!! [file]=name of the f90 file containing the caller (optional) +!! +!! OUTPUT +!! (only writing) +!! +!! NOTES +!! This routine comes directly from the MSG_HNDL routine delivered with ABINIT. +!! +!! SOURCE + +subroutine libpaw_msg_hndl(msg,level,mode_paral,file,line) + +!Arguments ------------------------------------ + integer,optional,intent(in) :: line + character(len=*),intent(in) :: level,msg,mode_paral + character(len=*),optional,intent(in) :: file + +!Local variables ------------------------------ + logical :: file_exists + character(len=500) :: f90name='Unknown' + character(len=LEN(msg)) :: my_msg + character(len=MAX(4*LEN(msg),2000)) :: sbuf + +! ********************************************************************* + + my_msg=libpaw_lstrip(msg) + + write(sbuf,'(3a)') ch10,"--- !",TRIM(level) + if (PRESENT(file)) then + f90name=libpaw_basename(file) + write(sbuf,'(4a)') trim(sbuf),ch10,"src_file: ",TRIM(f90name) + end if + if (PRESENT(line)) then + write(sbuf,'(3a,i0)') trim(sbuf),ch10,"src_line: ",line + end if + write(sbuf,'(8a)') trim(sbuf),ch10,& +& "message: |",ch10,trim(libpaw_indent(my_msg)),ch10,& +& "...",ch10 + + select case (libpaw_to_upper(level)) + case ('COMMENT','WARNING') + call libpaw_wrtout(std_out,sbuf,mode_paral) + case ('ERROR','BUG') + call libpaw_wrtout(std_out,sbuf,mode_paral) + inquire(file=LIBPAW_MPIABORTFILE,exist=file_exists) + if ((.not.file_exists).and.xmpi_comm_size(xmpi_world)>1) then + call libpaw_lock_and_write(LIBPAW_MPIABORTFILE,sbuf) + end if + call libpaw_leave(mode_paral) + case default + write(sbuf,'(4a)') ch10,' libpaw_msg_hndl: BUG**2 - ',ch10,' Wrong value for level!' + call libpaw_die(sbuf) + end select + +end subroutine libpaw_msg_hndl +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_libpaw_tools/libpaw_spmsg_getcount +!! NAME +!! libpaw_spmsg_getcount +!! +!! FUNCTION +!! Get the values of the counters of special messages (WARNING, COMMENT) +!! +!! INPUTS +!! ncomment= number of COMMENTs in log file +!! nwarning= number of WARNINGs in log file +!! nexit= 1 if exit requested +!! +!! OUTPUT +!! (only counters updated) +!! +!! NOTES +!! This routine comes directly from the SPECIALMSG_GETCOUNT routine delivered with ABINIT. +!! +!! SOURCE + +subroutine libpaw_spmsg_getcount(ncomment,nwarning,nexit) + +!Arguments ------------------------------------ + integer,intent(out) :: ncomment,nexit,nwarning + +!Local variables ------------------------------ + +! ********************************************************************** + + ncomment=LIBPAW_COMMENT_COUNT + nwarning=LIBPAW_WARNING_COUNT + nexit =LIBPAW_EXIT_FLAG + +end subroutine libpaw_spmsg_getcount +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_libpaw_tools/libpaw_spmsg_mpisum +!! NAME +!! libpaw_spmsg_mpisum +!! +!! FUNCTION +!! Reduce the counters of special messages (WARNING, COMMENTS, EXIT) over a MPI communicator +!! +!! INPUTS +!! mpicomm= MPI communicator +!! +!! OUTPUT +!! (only counters updated) +!! +!! NOTES +!! This routine comes directly from the SPECIALMSG_MPISUM routine delivered with ABINIT. +!! +!! SOURCE + +subroutine libpaw_spmsg_mpisum(mpicomm) + +!Arguments ------------------------------------ + integer,intent(in) :: mpicomm + +!Local variables ------------------------------ + integer :: ierr + integer :: buf(3) + +! ********************************************************************** + + buf(1)=LIBPAW_COMMENT_COUNT;buf(2)=LIBPAW_WARNING_COUNT;buf(3)=LIBPAW_EXIT_FLAG + + call xmpi_sum(buf,mpicomm,ierr) + + LIBPAW_COMMENT_COUNT=buf(1) + LIBPAW_WARNING_COUNT=buf(2) + LIBPAW_EXIT_FLAG=buf(3) ; if (LIBPAW_EXIT_FLAG/=0) LIBPAW_EXIT_FLAG=1 + +end subroutine libpaw_spmsg_mpisum +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_libpaw_tools/libpaw_write_comm_set +!! NAME +!! libpaw_write_comm_set +!! +!! FUNCTION +!! Set the MPI communicator used for parallel write +!! +!! INPUTS +!! new_write_comm= new value for the parallel write MPI communicator +!! +!! OUTPUT +!! +!! SOURCE + +subroutine libpaw_write_comm_set(new_write_comm) + +!Arguments ------------------------------------ + integer,intent(in) :: new_write_comm + +!Local variables ------------------------------ + +! ********************************************************************** + + LIBPAW_WRITE_COMM=new_write_comm + +end subroutine libpaw_write_comm_set +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_libpaw_tools/libpaw_log_flag_set +!! NAME +!! libpaw_log_flag_set +!! +!! FUNCTION +!! Set the flag controlling the filling of the LOG file +!! +!! INPUTS +!! log_flag= new value for LOG file flag +!! True: the log file is filled; False: no the log file +!! +!! OUTPUT +!! +!! SOURCE + +subroutine libpaw_log_flag_set(log_flag) + +!Arguments ------------------------------------ + logical,intent(in) :: log_flag + +!Local variables ------------------------------ + +! ********************************************************************** + + LIBPAW_HAS_LOG_FILE=log_flag + +end subroutine libpaw_log_flag_set +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_libpaw_tool/libpaw_netcdf_check +!! NAME +!! libpaw_netcdf_check +!! +!! FUNCTION +!! Error handler for Netcdf calls. +!! +!! INPUTS +!! ncerr=Status error returned by the Netcdf library. +!! msg=User-defined string with info on the action that was performed +!! file= name of the file. +!! line= line number. +!! +!! NOTES +!! This routine is usually interfaced with the macros defined in libpaw.h +!! +!! SOURCE + +subroutine libpaw_netcdf_check(ncerr,msg,file,line) + +!Arguments ------------------------------------ + integer,intent(in) :: ncerr + character(len=*),intent(in) :: msg + character(len=*),optional,intent(in) :: file + integer,optional,intent(in) :: line + +!Local variables------------------------------- + integer :: f90line + character(len=500) :: f90name + character(len=1024) :: nc_msg + character(len=2048) :: my_msg + +! ************************************************************************* + +#ifdef LIBPAW_HAVE_NETCDF + if (ncerr /= NF90_NOERR) then + if (PRESENT(line)) then + f90line=line + else + f90line=0 + end if + if (PRESENT(file)) then + f90name = libpaw_basename(file) + else + f90name='Subroutine Unknown' + end if + ! + ! Append Netcdf string to user-defined message. + write(nc_msg,'(a,3x,a)')' - NetCDF library returned:',TRIM(nf90_strerror(ncerr)) + my_msg = TRIM(msg) // TRIM(nc_msg) + + call libpaw_msg_hndl(my_msg,"ERROR","PERS",f90name,f90line) + end if +#else + call libpaw_die("LIBPAW_HAVE_NETCDF is not defined!") +#endif + +end subroutine libpaw_netcdf_check +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_libpaw_tools/libpaw_leave +!! NAME +!! libpaw_leave +!! +!! FUNCTION +!! Routine for clean exit of f90 code, taking into account possible parallelization. +!! +!! INPUTS +!! mode_paral= +!! 'COLL' if all procs are calling the routine with the same msg to be written once only +!! 'PERS' if the procs are calling the routine with different msgs each to be written, +!! or if one proc is calling the routine +!! [exit_status]=(optional, default=1 or -1, see below) the return code of the routine +!! +!! OUTPUT +!! (only writing) +!! +!! NOTES +!! This routine comes directly from the LEAVE_NEW routine delivered with ABINIT. +!! By default, it uses "call exit(1)", that is not completely portable. +!! +!! SOURCE + +subroutine libpaw_leave(mode_paral,exit_status) + +!Arguments ------------------------------------ + integer,intent(in),optional :: exit_status + character(len=4),intent(in) :: mode_paral + +!Local variables ------------------------------ + +! ********************************************************************** + + call libpaw_wrtout(std_out,ch10//' leave_new : decision taken to exit ...','PERS') + +!Caveat: Do not use MPI collective calls! + if (mode_paral=="COLL") then + call libpaw_wrtout(std_out,"Why COLL? Are you sure that ALL the processors are calling leave_new?") + end if + + if (present(exit_status)) then + call xmpi_abort(exit_status=exit_status) + else + call xmpi_abort() + end if + +end subroutine libpaw_leave +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_libpaw_tools/libpaw_die +!! NAME +!! libpaw_die +!! +!! FUNCTION +!! Stop smoothly the execution in case of unexpected events reporting the +!! line number and the file name where the error occurred as well as the +!! MPI rank of the processor. +!! +!! INPUTS +!! msg=String containing additional information on the nature of the problem +!! [file]=Name of the f90 file containing the caller +!! [line]=Line number of the file where problem occurred +!! +!! NOTES +!! This routine comes directly from the DIE routine delivered with ABINIT. +!! +!! SOURCE + +subroutine libpaw_die(message,file,line) + +!Arguments ------------------------------------ + integer,optional,intent(in) :: line + character(len=*),intent(in) :: message + character(len=*),optional,intent(in) :: file + +!Local variables ------------------------------ + integer :: rank + integer :: f90line=0 + character(len=10) :: lnum,strank + character(len=500) :: f90name='Subroutine Unknown' + character(len=500) :: msg + +! ********************************************************************* + + if (PRESENT(line)) f90line=line + if (PRESENT(file)) f90name= libpaw_basename(file) + + rank=xmpi_comm_rank(xmpi_world) !Determine my rank inside world communicator + + write(lnum,"(i0)") f90line + write(strank,"(i0)") rank + msg=TRIM(f90name)//':'//TRIM(lnum)//' P'//TRIM(strank) + write(msg,'(a,2x,2a,2x,a)') ch10,TRIM(msg),ch10,TRIM(message) + + call libpaw_wrtout(std_out,msg,'PERS') + call libpaw_leave('PERS') + +end subroutine libpaw_die +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_libpaw_tools/libpaw_lock_and_write +!! NAME +!! libpaw_lock_and_write +!! +!! FUNCTION +!! Writes a string to filename with locking mechanism. +!! +!! INPUTS +!! filename= Name of the file. +!! string= Input string. +!! +!! SOURCE + +subroutine libpaw_lock_and_write(filename,string) + +!Arguments ------------------------------------ + character(len=*),intent(in) :: filename,string + +!Local variables------------------------------- + integer :: lock_unit,file_unit + character(len=len(filename)+5) :: lock + +! ********************************************************************* + + !Try to acquire the lock. + lock=trim(filename)//".lock" + lock_unit=libpaw_get_free_unit() + open(unit=lock_unit,file=trim(lock),status='new',err=99) + + file_unit=libpaw_get_free_unit() + open(unit=file_unit,file=trim(filename),form="formatted") + call libpaw_write_lines(file_unit,string) + close(lock_unit,status="delete") + close(file_unit) + return + +99 continue + +end subroutine libpaw_lock_and_write +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_libpaw_tools/libpaw_get_free_unit +!! NAME +!! libpaw_get_free_unit +!! +!! FUNCTION +!! Obtain a free logical Fortran unit. +!! +!! OUTPUT +!! The unit number (free unit) +!! Raises: +!! -1 if no logical unit is free (!) +!! +!! SOURCE + +integer function libpaw_get_free_unit() + +!Local variables------------------------------- + integer,parameter :: MIN_UNIT_NUMBER=10 +#ifdef FC_NAG + integer,parameter :: MAX_UNIT_NUMBER=64 ! There's a serious problem in Nag6.0. In principle + ! Maximum unit number: 2147483647 +#else + integer,parameter :: MAX_UNIT_NUMBER=1024 +#endif + integer :: iunt + logical :: isopen + +! ********************************************************************* + + do iunt=MAX_UNIT_NUMBER,MIN_UNIT_NUMBER,-1 + inquire(unit=iunt,opened=isopen) + if (.not.isopen) then + libpaw_get_free_unit=iunt; return + end if + end do + libpaw_get_free_unit=-1 + +end function libpaw_get_free_unit +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_libpaw_tools/libpaw_flush +!! NAME +!! libpaw_flush +!! +!! FUNCTION +!! Wrapper for the standard flush routine +!! Available only if the compiler implements this intrinsic procedure. +!! +!! INPUTS +!! unit=Fortran logical Unit number +!! +!! NOTES +!! This routine comes directly from the FLUSH_UNIT routine delivered with ABINIT. +!! +!! SOURCE + +subroutine libpaw_flush(unit) + +!Arguments ------------------------------------ + integer,intent(in) :: unit + +!Local variables ------------------------------ + integer, parameter :: dev_null=-1 + logical :: isopen + +!************************************************************************ + + if (unit==dev_null) return + +!FLUSH on unconnected unit is illegal: F95 std., 9.3.5. + inquire(unit=unit,opened=isopen) + +#if defined HAVE_FC_FLUSH + if (isopen) then + call flush(unit) + endif +#elif defined HAVE_FC_FLUSH_ + if (isopen) then + call flush_(unit) + end if +#endif + +end subroutine libpaw_flush +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_libpaw_tools/libpaw_basename +!! NAME +!! libpaw_basename +!! +!! FUNCTION +!! Returns the final component of a pathname (function version). +!! +!! INPUTS +!! string=The input string +!! +!! NOTES +!! This routine comes directly from the BASENAME routine delivered with ABINIT. +!! If the input string in not a valid path to a file, a blank strink is returned +!! +!! SOURCE + +pure function libpaw_basename(istr) result(ostr) + +!Arguments ------------------------------------ + character(len=*),intent(in) :: istr + character(len=LEN_TRIM(istr)) :: ostr + +!Local variables ------------------------------ + integer :: ic,nch_trim,nch + character(len=1),parameter :: BLANK=' ' + character(len=1),parameter :: DIR_SEPARATOR = '/' + +!************************************************************************ + + nch =LEN (istr) + nch_trim=LEN_TRIM(istr) + + ic = INDEX (TRIM(istr), DIR_SEPARATOR, back=.TRUE.) + if (ic >= 1 .and. ic <= nch_trim-1) then ! there is stuff after the separator. + ostr = istr(ic+1:nch_trim) + else if (ic==0 .or. ic == nch_trim+1) then ! no separator in string or zero length string, + ostr = TRIM(istr) ! return trimmed string. + else ! (ic == nch_trim) separator is the last char. + ostr = BLANK ! This is not a valid path to a file, return blank. + end if + return + +end function libpaw_basename +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_libpaw_tools/to_upper +!! NAME +!! libpaw_to_upper +!! +!! FUNCTION +!! Convert a string to UPPER CASE (function version). +!! +!! INPUTS +!! istr=Input string +!! +!! NOTES +!! This routine comes directly from the TOUPPER routine delivered with ABINIT. +!! +!! SOURCE + +pure function libpaw_to_upper(istr) result(ostr) + +!Arguments ------------------------------------ + character(len=*),intent(in) :: istr + character(len=LEN_TRIM(istr)) :: ostr + +!Local variables ------------------------------ + integer,parameter :: ASCII_aa=ICHAR('a') + integer,parameter :: ASCII_zz=ICHAR('z') + integer,parameter :: SHIFT=ICHAR('a')-ICHAR('A') + integer :: ic,iasc + +! ********************************************************************* + + do ic=1,LEN_TRIM(istr) + iasc=IACHAR(istr(ic:ic)) + if (iasc>=ASCII_aa.and.iasc<=ASCII_zz) then + ostr(ic:ic)=ACHAR(iasc-SHIFT) + else + ostr(ic:ic)=istr(ic:ic) + end if + end do + +end function libpaw_to_upper +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_libpaw_tools/libpaw_lstrip +!! NAME +!! libpaw_lstrip +!! +!! FUNCTION +!! Removes leading spaces from the input string. +!! +!! NOTES +!! This routine comes directly from the LSTRIP routine delivered with ABINIT. +!! +!! SOURCE + +pure function libpaw_lstrip(istr) result(ostr) + +!Arguments ------------------------------------ + character(len=*),intent(in) :: istr + character(len=len(istr)) :: ostr + +!Local variables ------------------------------ + integer :: ii,jj,lg + character(len=1),parameter :: BLANK=' ' + +! ********************************************************************* + + lg=LEN(istr) + do ii=1,lg + if (istr(ii:ii)/=BLANK) EXIT + end do + + ostr = " " + do jj=1,lg-ii+1 + ostr(jj:jj) = istr(ii:ii) + ii=ii+1 + end do + +end function libpaw_lstrip +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_libpaw_tools/libpaw_indent +!! NAME +!! libpaw_indent +!! +!! FUNCTION +!! Indent text (function version). +!! +!! INPUTS +!! istr=Input string +!! +!! NOTES +!! This routine comes directly from the INDENT routine delivered with ABINIT. +!! +!! SOURCE + +pure function libpaw_indent(istr) result(ostr) + +!Arguments ------------------------------------ + character(len=*),intent(in) :: istr + character(len=len(istr)*4+4) :: ostr + +!Local variables------------------------------- + character(len=1),parameter :: NCHAR = char(10) + integer,parameter :: n=4 + integer :: ii,jj,kk + character(len=1) :: ch + +! ********************************************************************* + + ostr=" " + jj=n + do ii=1,LEN_TRIM(istr) + ch=istr(ii:ii) + jj=jj+1 + if (ch==NCHAR) then + ostr(jj:jj)=NCHAR + do kk=jj+1,jj+n + ostr(kk:kk)=" " + end do + jj=jj+n + else + ostr(jj:jj)=ch + end if + end do + +end function libpaw_indent +!!*** + +!---------------------------------------------------------------------- + +end module m_libpaw_tools +!!*** diff --git a/GX-PAW/libpaw/src/m_libpaw_tools.o b/GX-PAW/libpaw/src/m_libpaw_tools.o new file mode 100644 index 00000000..c0a16074 Binary files /dev/null and b/GX-PAW/libpaw/src/m_libpaw_tools.o differ diff --git a/GX-PAW/libpaw/src/m_paral_atom.F90 b/GX-PAW/libpaw/src/m_paral_atom.F90 new file mode 100644 index 00000000..774b3bcc --- /dev/null +++ b/GX-PAW/libpaw/src/m_paral_atom.F90 @@ -0,0 +1,375 @@ +!!****m* ABINIT/m_paral_atom +!! NAME +!! m_paral_atom +!! +!! FUNCTION +!! This module provides routines and methods used to manage the parallelisation/distribution +!! of PAW data over atomic sites +!! +!! COPYRIGHT +!! Copyright (C) 2012-2024 ABINIT group (MT, MD) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! For the initials of contributors, see ~abinit/doc/developers/contributors.txt. +!! +!! NOTES +!! FOR DEVELOPPERS: in order to preserve the portability of libPAW library, +!! please consult ~abinit/src/??_libpaw/libpaw-coding-rules.txt +!! +!! SOURCE + +#include "libpaw.h" + +MODULE m_paral_atom + + USE_DEFS + USE_MSG_HANDLING + USE_MPI_WRAPPERS + USE_MEMORY_PROFILING + + implicit none + + private + +!public procedures. + public :: get_my_natom + public :: get_my_atmtab + public :: free_my_atmtab + public :: get_proc_atmtab + public :: get_atm_proc +!!*** + +CONTAINS +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paral_atom/get_my_natom +!! NAME +!! get_my_natom +!! +!! FUNCTION +!! Given the total number of atoms, return the number of atoms treated by current process +!! +!! INPUTS +!! comm_atom=communicator over atoms +!! natom=total number of atoms +!! +!! OUTPUT +!! my_natom=number of atoms treated by current process +!! +!! SOURCE + + +subroutine get_my_natom(comm_atom,my_natom,natom) + +!Arguments --------------------------------------------- +!scalars + integer,intent(in) :: comm_atom,natom + integer,intent(out) :: my_natom +!arrays + +!Local variables --------------------------------------- +!scalars + integer :: me,nproc +!arrays + +! ************************************************************************* + + my_natom=natom + if (comm_atom/=xmpi_comm_self.and.comm_atom/=xmpi_comm_null) then + nproc=xmpi_comm_size(comm_atom) + me=xmpi_comm_rank(comm_atom) + my_natom=natom/nproc + if (me<=(mod(natom,nproc)-1)) my_natom=natom/nproc + 1 + endif + +end subroutine get_my_natom +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paral_atom/get_my_atmtab +!! NAME +!! get_my_atmtab +!! +!! FUNCTION +!! Given the total number of atoms and a MPI communicator return a table +!! containing the indexes of atoms treated by current processor. +!! +!! INPUTS +!! comm_atom=communicator over atoms +!! my_natom_ref= --optional-- a reference value for the local number of atoms +!! (just for checking purposes) +!! natom=total number of atoms +!! +!! OUTPUT +!! +!! SIDE EFFECTS +!! my_atmtab(:)=indexes of atoms treated by current process +!! nothing is done if my_atmtab(:) is already associated to a target +!! my_atmtab_allocated=true if my_atmtab is allocated +!! paral_atom=flag controlling parallelism over atoms +!! +!! SOURCE + + +subroutine get_my_atmtab(comm_atom,my_atmtab,my_atmtab_allocated,paral_atom,natom,& +& my_natom_ref) ! optional argument + +!Arguments --------------------------------------------- +!scalars + integer,intent(in) :: comm_atom,natom + integer,intent(in),optional :: my_natom_ref + logical,intent(inout) :: my_atmtab_allocated,paral_atom +!arrays + integer,pointer :: my_atmtab(:) +!Local variables --------------------------------------- +!scalars + integer :: iatom,me,my_natom,natom_bef,nmod,nproc + character(len=500) :: msg +!arrays + +! ************************************************************************* + + my_atmtab_allocated=.false. + if (.not.paral_atom) return + + if (comm_atom==xmpi_comm_self.or.comm_atom==xmpi_comm_null) paral_atom=.false. + if (paral_atom) then + nproc=xmpi_comm_size(comm_atom) + paral_atom=(nproc>1) + if (paral_atom) then + if (.not.associated(my_atmtab)) then +! Get local number of atoms + me=xmpi_comm_rank(comm_atom) + my_natom=natom/nproc + if (me<=(mod(natom,nproc)-1)) my_natom=natom/nproc + 1 +! Get table of atoms + if (my_natom>0) then + LIBPAW_POINTER_ALLOCATE(my_atmtab,(my_natom)) + my_atmtab_allocated=.true. + if (my_natom==natom) then + my_atmtab(1:my_natom)=(/(iatom,iatom=1,natom)/) + else +! The atoms are distributed contigously by egal part +! (the rest is distributed on all the procs) + nmod=mod(natom,nproc) + if (me<=(nmod-1)) then + natom_bef=me*(natom/nproc)+me + else + natom_bef=me*(natom/nproc)+nmod + endif + do iatom=1,my_natom + my_atmtab(iatom)=iatom+natom_bef + enddo + end if + end if + else + my_natom=size(my_atmtab) + end if + if (present(my_natom_ref).and.(my_natom>0)) then + if (my_natom_ref/=size(my_atmtab)) then + msg='my_atmtab should have a size equal to my_natom !' + LIBPAW_BUG(msg) + end if + end if + end if + endif + +end subroutine get_my_atmtab +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paral_atom/free_my_atmtab +!! NAME +!! free_my_atmtab +!! +!! FUNCTION +!! Cleanly deallocate a table of atom indexes (my_atmtab) +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SIDE EFFECTS +!! my_atmtab_allocated=true if my_atmtab is allocated +!! my_atmtab(:)=indexes of atoms treated by current process +!! nothing is done if my_atmtab(:) is already associated to a target +!! +!! SOURCE + +subroutine free_my_atmtab(my_atmtab,my_atmtab_allocated) + +!Arguments --------------------------------------------- +!scalars + logical,intent(inout) :: my_atmtab_allocated +!arrays + integer,pointer :: my_atmtab(:) +!Local variables --------------------------------------- +!scalars +!arrays + +! ************************************************************************* + + if (my_atmtab_allocated) then + LIBPAW_POINTER_DEALLOCATE(my_atmtab) + nullify(my_atmtab) + my_atmtab_allocated=.false. + end if + +end subroutine free_my_atmtab +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paral_atom/get_proc_atmtab +!! NAME +!! get_proc_atmtab +!! +!! FUNCTION +!! Given the total number of atoms and the size of a communicator, +!! return a table containing the indexes of atoms treated by a processor (with index iproc) +!! +!! INPUTS +!! comm_atom_size= size of communicator (over atoms) +!! iproc= rank of the processor +!! natom= total number of atoms +!! +!! OUTPUT +!! atmtab(natom_out)= indexes of atoms treated by process iproc +!! natom_out= number of atoms treated by process iproc +!! +!! NOTES +!! In case of modification of the distribution of atom over proc, +!! get_atmtab must be modified accordingly +!! +!! SOURCE + + subroutine get_proc_atmtab(iproc,atmtab,natom_out,natom,comm_atom_size) + +!Arguments --------------------------------------------- +!scalars + integer, intent(in) :: comm_atom_size,iproc,natom +!arrays + integer,intent(out) :: natom_out + integer,allocatable, intent(out):: atmtab(:) + +!Local variables --------------------------------------- +!scalars + integer :: iatom,natom_bef,nmod,nproc +!arrays + +! ************************************************************************* + + nproc=comm_atom_size + + natom_out=natom/nproc ; if (iproc<=(mod(natom,nproc)-1)) natom_out=natom/nproc+1 + +! Get table of atoms + if (natom_out>0) then + LIBPAW_ALLOCATE(atmtab,(natom_out)) +! The atoms are distributed contigously by egal part +! The rest is distributed on all the procs +! (see get_my_atmtab) + nmod=mod(natom,nproc) + if (iproc<=(nmod-1)) then + natom_bef=iproc*(natom/nproc)+iproc + else + natom_bef=iproc*(natom/nproc)+nmod + end if + do iatom=1,natom_out + atmtab(iatom)=iatom+natom_bef + end do + + else + natom_out=0 + LIBPAW_ALLOCATE(atmtab,(0)) + end if + +end subroutine get_proc_atmtab +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paral_atom/get_atm_proc +!! NAME +!! get_atm_proc +!! +!! FUNCTION +!! Given a list of atoms and a MPI communicator size, return a table +!! containing the corresponding processor indexes. +!! +!! COPYRIGHT +!! Copyright (C) 2012-2024 ABINIT group (MD) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! For the initials of contributors, see ~abinit/doc/developers/contributors.txt. +!! +!! INPUTS +!! atom_list(:)= index of atoms +!! nproc=size of communicator over atoms +!! natom=total number of atoms +!! +!! OUTPUT +!! proc_list(:) = index of procs +!! +!! NOTES +!! The atoms are distributed contigously by egal part; the rest is distributed +!! on all the procs (see get_my_atmtab). +!! In case of modification of the distribution of atom over proc, this routine +!! must be modified accordingly. +!! +!! SOURCE + + subroutine get_atm_proc(atom_list,natom,nproc,proc_list) + +!Arguments --------------------------------------------- +!scalars + integer, intent(in) :: natom,nproc +!arrays + integer, intent(in) :: atom_list(:) + integer, intent(out) :: proc_list(:) + +!Local variables --------------------------------------- +!scalars + integer :: nb_atom,dn,dn1,iatom,natomlim,iatm,jproclim,nmod +!arrays + +! ************************************************************************* + + nmod=mod(natom,nproc);nb_atom=size(atom_list) + + if (nmod==0) then + dn=natom/nproc + do iatm =1, nb_atom + iatom=atom_list(iatm) + proc_list(iatm)=(iatom-1)/dn + end do + else + dn=natom/nproc + dn1=natom/nproc + 1 +! Under (jproclim+1), 1 atome by proc is added +! The rest nmod is distributed among jproclim+1 first procs + jproclim=nmod -1 + natomlim=dn1*(jproclim+1) + do iatm=1,nb_atom + iatom=atom_list(iatm) + if (iatom<=natomlim) then + proc_list(iatm)=(iatom -1 )/dn1 + else + proc_list(iatm)=jproclim + 1 + (iatom - 1 -(natomlim))/dn + end if + enddo + end if + +end subroutine get_atm_proc +!!*** + +!---------------------------------------------------------------------- + +END MODULE m_paral_atom +!!*** diff --git a/GX-PAW/libpaw/src/m_paral_atom.o b/GX-PAW/libpaw/src/m_paral_atom.o new file mode 100644 index 00000000..c5d2112f Binary files /dev/null and b/GX-PAW/libpaw/src/m_paral_atom.o differ diff --git a/GX-PAW/libpaw/src/m_paw_an.F90 b/GX-PAW/libpaw/src/m_paw_an.F90 new file mode 100644 index 00000000..f8074412 --- /dev/null +++ b/GX-PAW/libpaw/src/m_paw_an.F90 @@ -0,0 +1,2267 @@ +!!****m* ABINIT/m_paw_an +!! NAME +!! m_paw_an +!! +!! FUNCTION +!! This module contains the definition of the paw_an_type structured datatype, +!! as well as related functions and methods. +!! paw_an_type variables contain various arrays given on ANgular mesh or ANgular moments +!! for a given atom. +!! +!! COPYRIGHT +!! Copyright (C) 2013-2024 ABINIT group (MT, FJ) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! NOTES +!! FOR DEVELOPPERS: in order to preserve the portability of libPAW library, +!! please consult ~abinit/src/??_libpaw/libpaw-coding-rules.txt +!! +!! SOURCE + +#include "libpaw.h" + +MODULE m_paw_an + + USE_DEFS + USE_MSG_HANDLING + USE_MPI_WRAPPERS + USE_MEMORY_PROFILING + + use m_paral_atom, only : get_my_atmtab, free_my_atmtab, get_my_natom + use m_pawang, only : pawang_type + use m_pawtab, only : pawtab_type + + implicit none + + private + +!public procedures. + public :: paw_an_init + public :: paw_an_free + public :: paw_an_nullify + public :: paw_an_copy + public :: paw_an_print + public :: paw_an_gather + public :: paw_an_redistribute + public :: paw_an_reset_flags + +!private procedures. + private :: paw_an_isendreceive_getbuffer + private :: paw_an_isendreceive_fillbuffer +!!*** + +!---------------------------------------------------------------------- + +!!****t* m_paw_an/paw_an_type +!! NAME +!! paw_an_type +!! +!! FUNCTION +!! For PAW, various arrays given on ANgular mesh or ANgular moments +!! +!! SOURCE + + type,public :: paw_an_type + +! WARNING : if you modify this datatype, please check whether there might be creation/destruction/copy routines, +! declared in another part of ABINIT, that might need to take into account your modification. + +!Integer scalars + + integer :: angl_size + ! Dimension of paw angular mesh (angl_size=ntheta*nphi) + + integer :: cplex + ! cplex=1 if potentials/densities are real, 2 if they are complex + + integer :: has_kxc + ! set to 1 if xc kernels kxc1 and kxct1 are allocated and used + ! 2 if they are already computed + + integer :: has_k3xc + ! set to 1 if xc kernel derivatives k3xc1 and k3xct1 are allocated and used + ! 2 if it is already computed + + integer :: has_vhartree + ! set to 1 if vh1 and vht1 are allocated and used + ! 2 if they are already computed + + integer :: has_vxc + ! set to 1 if vxc1 and vxct1 are allocated and used + ! 2 if they are already computed + + integer :: has_vxctau + ! set to 1 if vxctau1 and vxcttau1 are allocated and used + ! 2 if they are already computed + + integer :: has_vxcval + ! set to 1 if vxc1_val and vxct1_val are allocated and used + ! 2 if they are already computed + + integer :: has_vxc_ex + ! set to 1 if vxc_ex and is allocated and used + ! 2 if it is already computed + + integer :: itypat + ! itypat=type of the atom + + integer :: lm_size + ! lm_size=(l_size)**2 + ! l is Maximum value of l+1 leading to non zero Gaunt coeffs (l_size=2*l_max+1) + + integer :: mesh_size + ! Dimension of radial mesh for arrays contained in this paw_an datastructure + ! May be different from pawrad%mesh_size + + integer :: nkxc1 + ! number of independent components of Kxc1 and Kxct1 + ! (usually 3 for LDA, 23 for GGA) + + integer :: nk3xc1 + ! number of independent components of K3xc1 and K3xct1 + ! (usually 4 for LDA, not available for GGA) + + integer :: nspden + ! Number of spin-density components + +!Logical arrays + + logical, allocatable :: lmselect(:) + ! lmselect(lm_size) + ! lmselect(ilm)=select the non-zero LM-moments of "one-center" densities/potentials + +!Real (real(dp)) arrays + + real(dp), allocatable :: kxc1 (:,:,:) + ! kxc1(cplex*mesh_size,lm_size or angl_size,nkxc1) + ! Gives xc kernel inside the sphere + ! (theta,phi) values of kernel if pawxcdev=0 + ! LM-moments of kernel if pawxcdev/=0 + + real(dp), allocatable :: kxct1 (:,:,:) + ! kxct1(cplex*mesh_size,lm_size or angl_size,nkxc1) + ! Gives xc pseudo kernel inside the sphere + ! (theta,phi) values of kernel if pawxcdev=0 + ! LM-moments of kernel if pawxcdev/=0 + + real(dp), allocatable :: k3xc1 (:,:,:) + ! k3xc1(cplex*mesh_size,lm_size or angl_size,nk3xc1) + ! Gives xc kernel derivative inside the sphere + ! (theta,phi) values of kernel derivative if pawxcdev=0 + ! LM-moments of kernel derivative if pawxcdev/=0 => NOT AVAILABLE YET + + real(dp), allocatable :: k3xct1 (:,:,:) + ! k3xct1(cplex*mesh_size,lm_size or angl_size,nk3xc1) + ! Gives xc pseudo kernel derivative inside the sphere + ! (theta,phi) values of kernel derivative if pawxcdev=0 + ! LM-moments of kernel derivative if pawxcdev/=0 => NOT AVAILABLE YET + + real(dp), allocatable :: vh1 (:,:,:) + ! vh1(cplex*mesh_size,lm_size,nspden) + ! Gives Hartree potential LM-moments inside the sphere + + real(dp), allocatable :: vht1 (:,:,:) + ! vht1(cplex*mesh_size,lm_size,nspden) + ! Gives Hartree tilde potential LM-moments inside the sphere + + real(dp), allocatable :: vxc1 (:,:,:) + ! vxc1(cplex*mesh_size,lm_size or angl_size,nspden) + ! Gives xc potential inside the sphere + ! (theta,phi) values of potential if pawxcdev=0 + ! LM-moments of potential if pawxcdev/=0 + + real(dp), allocatable :: vxctau1 (:,:,:) + ! vxctau1(cplex*mesh_size,lm_size or angl_size,nspden) + ! Gives xc potential inside the sphere + ! (theta,phi) values of potential if pawxcdev=0 + ! LM-moments of potential if pawxcdev/=0 + + real(dp), allocatable :: vxc1_val (:,:,:) + ! vxc1_val(cplex*mesh_size,lm_size or angl_size,nspden) (Usually real, Mainly used for GW) + ! Gives xc potential inside the sphere arising from valence only electrons + ! (theta,phi) values of potential if pawxcdev=0 + ! LM-moments of potential if pawxcdev/=0 + + real(dp), allocatable :: vxct1 (:,:,:) + ! vxct1(cplex*mesh_size,angl_size,nspden) + ! Gives xc pseudo potential inside the sphere + ! (theta,phi) values of potential if pawxcdev=0 + ! LM-moments of potential if pawxcdev/=0 + + real(dp), allocatable :: vxcttau1 (:,:,:) + ! vxcttau1(cplex*mesh_size,angl_size,nspden) + ! Gives xc pseudo potential inside the sphere + ! (theta,phi) values of potential if pawxcdev=0 + ! LM-moments of potential if pawxcdev/=0 + + real(dp), allocatable :: vxct1_val (:,:,:) + ! vxct1_val(cplex*mesh_size,angl_size,nspden) (Usually real, Mainly used for GW) + ! Gives xc pseudo potential inside the sphere + ! (theta,phi) values of potential if pawxcdev=0 + ! LM-moments of potential if pawxcdev/=0 + + real(dp), allocatable :: vxc_ex (:,:,:) + ! vxc_ex(cplex*mesh_size,angl_size,nspden) + ! Gives xc potential for local exact exchange inside the sphere + ! (theta,phi) values of potential if pawxcdev=0 + ! LM-moments of potential if pawxcdev/=0 + + end type paw_an_type +!!*** + +CONTAINS + +!=========================================================== +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_an/paw_an_init +!! NAME +!! paw_an_init +!! +!! FUNCTION +!! Initialize a paw_an data type. +!! +!! INPUTS +!! mpi_atmtab(:)=--optional-- indexes of the atoms treated by current proc +!! comm_atom=--optional-- MPI communicator over atoms +!! +!! SIDE EFFECTS +!! Paw_an(:)=PAW arrays given on ANgular mesh or ANgular moments. +!! Initialized in output +!! +!! SOURCE + +subroutine paw_an_init(Paw_an,natom,ntypat,nkxc1,nk3xc1,nspden,cplex,pawxcdev,typat,Pawang,Pawtab,& +& has_vhartree,has_vxc,has_vxctau,has_vxcval,has_kxc,has_k3xc,has_vxc_ex, & ! optional arguments +& mpi_atmtab,comm_atom) ! optional arguments (parallelism) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: natom,nkxc1,nk3xc1,ntypat,cplex,nspden,pawxcdev + integer,optional,intent(in) :: has_vhartree,has_vxc,has_vxctau,has_vxcval,has_kxc,has_k3xc,has_vxc_ex + integer,optional,intent(in) :: comm_atom +!arrays + integer,intent(in) :: typat(natom) + integer,optional,target,intent(in) :: mpi_atmtab(:) + type(Pawang_type),intent(in) :: Pawang + type(Pawtab_type),intent(in) :: Pawtab(ntypat) + type(Paw_an_type),intent(inout) :: Paw_an(:) + +!Local variables------------------------------- +!scalars + integer :: iat,iat1,itypat,lm_size,my_comm_atom,my_natom,v_size + logical :: my_atmtab_allocated,paral_atom +!arrays + integer,pointer :: my_atmtab(:) + +! ************************************************************************* + +!@Paw_an_type + +!Set up parallelism over atoms + my_natom=size(Paw_an);if (my_natom==0) return + paral_atom=(present(comm_atom).and.(my_natom/=natom)) + nullify(my_atmtab);if (present(mpi_atmtab)) my_atmtab => mpi_atmtab + my_comm_atom=xmpi_comm_self;if (present(comm_atom)) my_comm_atom=comm_atom + call get_my_atmtab(my_comm_atom,my_atmtab,my_atmtab_allocated,paral_atom,natom,my_natom_ref=my_natom) + + do iat=1,my_natom + iat1=iat;if (paral_atom) iat1=my_atmtab(iat) + itypat=typat(iat1) + + lm_size =Pawtab(itypat)%lcut_size**2 + Paw_an(iat)%angl_size =Pawang%angl_size + Paw_an(iat)%cplex =cplex + Paw_an(iat)%itypat =itypat + Paw_an(iat)%lm_size =lm_size + Paw_an(iat)%mesh_size =Pawtab(itypat)%mesh_size + Paw_an(iat)%nkxc1 =nkxc1 + Paw_an(iat)%nk3xc1 =nk3xc1 + Paw_an(iat)%nspden =nspden + + ! === Non-zero LM-moments of "one-center" densities/potentials === + ! * Filled in pawdenpot. + LIBPAW_ALLOCATE(Paw_an(iat)%lmselect,(lm_size)) + + v_size=Paw_an(iat)%lm_size ; if (pawxcdev==0) v_size=Paw_an(iat)%angl_size + + ! === XC potential inside the sphere === + ! * LM-moments of potential if pawxcdev/=0 + ! * (theta,phi) values of potential if pawxcdev=0 + Paw_an(iat)%has_vxc=0 + if (PRESENT(has_vxc)) then + if (has_vxc>0) then + Paw_an(iat)%has_vxc=1 + LIBPAW_ALLOCATE(Paw_an(iat)%vxc1 ,(cplex*Paw_an(iat)%mesh_size,v_size,nspden)) + LIBPAW_ALLOCATE(Paw_an(iat)%vxct1,(cplex*Paw_an(iat)%mesh_size,v_size,nspden)) + Paw_an(iat)%vxc1=zero;Paw_an(iat)%vxct1=zero + end if + end if + + Paw_an(iat)%has_vxctau=0 + if (PRESENT(has_vxctau)) then + if (has_vxctau>0) then + Paw_an(iat)%has_vxctau=1 + LIBPAW_ALLOCATE(Paw_an(iat)%vxctau1 ,(cplex*Paw_an(iat)%mesh_size,v_size,nspden)) + LIBPAW_ALLOCATE(Paw_an(iat)%vxcttau1,(cplex*Paw_an(iat)%mesh_size,v_size,nspden)) + Paw_an(iat)%vxctau1=zero;Paw_an(iat)%vxcttau1=zero + end if + end if + + ! ========================== + ! === Optional arguments === + ! ========================== + + ! * XC potential inside PAW spheres generated by valence electrons + Paw_an(iat)%has_vxcval=0 + if (PRESENT(has_vxcval)) then + if (has_vxcval>0) then + Paw_an(iat)%has_vxcval=1 + LIBPAW_ALLOCATE(Paw_an(iat)%vxc1_val ,(cplex*Paw_an(iat)%mesh_size,v_size,nspden)) + LIBPAW_ALLOCATE(Paw_an(iat)%vxct1_val,(cplex*Paw_an(iat)%mesh_size,v_size,nspden)) + Paw_an(iat)%vxc1_val=zero;Paw_an(iat)%vxct1_val=zero + end if + end if + + ! * Hartree potential LM-moments inside the sphere + Paw_an(iat)%has_vhartree=0 + if (PRESENT(has_vhartree)) then + if (has_vhartree>0) then + Paw_an(iat)%has_vhartree=1 + LIBPAW_ALLOCATE(Paw_an(iat)%vh1,(cplex*Paw_an(iat)%mesh_size,v_size,nspden)) + LIBPAW_ALLOCATE(Paw_an(iat)%vht1,(cplex*Paw_an(iat)%mesh_size,v_size,nspden)) + Paw_an(iat)%vh1=zero;Paw_an(iat)%vht1=zero + end if + end if + + ! xc kernels inside the sphere + Paw_an(iat)%has_kxc=0 + if (PRESENT(has_kxc)) then + if (has_kxc>0) then + Paw_an(iat)%has_kxc=1 + LIBPAW_ALLOCATE(Paw_an(iat)%kxc1 ,(cplex*Paw_an(iat)%mesh_size,v_size,nkxc1)) + LIBPAW_ALLOCATE(Paw_an(iat)%kxct1,(cplex*Paw_an(iat)%mesh_size,v_size,nkxc1)) + if (nkxc1>0) then + Paw_an(iat)%kxc1=zero;Paw_an(iat)%kxct1=zero + end if + end if + end if + + ! xc kernel derivatives inside the sphere + Paw_an(iat)%has_k3xc=0 + if (PRESENT(has_k3xc)) then + if (has_k3xc>0) then + Paw_an(iat)%has_k3xc=1 + LIBPAW_ALLOCATE(Paw_an(iat)%k3xc1 ,(cplex*Paw_an(iat)%mesh_size,v_size,nk3xc1)) + LIBPAW_ALLOCATE(Paw_an(iat)%k3xct1,(cplex*Paw_an(iat)%mesh_size,v_size,nk3xc1)) + if (nk3xc1>0) then + Paw_an(iat)%k3xc1=zero;Paw_an(iat)%k3xct1=zero + end if + end if + end if + + ! local exact-exchange potential inside the sphere + Paw_an(iat)%has_vxc_ex=0 + if (PRESENT(has_vxc_ex)) then + if (has_vxc_ex>0.and.Pawtab(itypat)%useexexch/=0) then + Paw_an(iat)%has_vxc_ex=1 + LIBPAW_ALLOCATE(Paw_an(iat)%vxc_ex,(cplex*Paw_an(iat)%mesh_size,v_size,nspden)) + Paw_an(iat)%vxc_ex=zero + end if + end if + + end do !iat + +!Destroy atom table used for parallelism + call free_my_atmtab(my_atmtab,my_atmtab_allocated) + +end subroutine paw_an_init +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_an/paw_an_free +!! NAME +!! paw_an_free +!! +!! FUNCTION +!! Deallocate pointers and nullify flags in a paw_an structure +!! +!! SIDE EFFECTS +!! Paw_an(:)=various arrays given on ANgular mesh or ANgular moments +!! +!! All associated pointers in Paw_an(:) are deallocated +!! +!! SOURCE + +subroutine paw_an_free(Paw_an) + +!Arguments ------------------------------------ +!arrays + type(Paw_an_type),intent(inout) :: Paw_an(:) + +!Local variables------------------------------- + integer :: iat,natom + +! ************************************************************************* + + !@Paw_an_type + + natom=SIZE(Paw_an);if (natom==0) return + + do iat=1,natom + if (allocated(Paw_an(iat)%lmselect )) then + LIBPAW_DEALLOCATE(Paw_an(iat)%lmselect) + end if + if (allocated(Paw_an(iat)%vh1 )) then + LIBPAW_DEALLOCATE(Paw_an(iat)%vh1) + end if + if (allocated(Paw_an(iat)%vht1 )) then + LIBPAW_DEALLOCATE(Paw_an(iat)%vht1) + end if + if (allocated(Paw_an(iat)%vxc1 )) then + LIBPAW_DEALLOCATE(Paw_an(iat)%vxc1) + end if + if (allocated(Paw_an(iat)%vxctau1 )) then + LIBPAW_DEALLOCATE(Paw_an(iat)%vxctau1) + end if + if (allocated(Paw_an(iat)%vxc1_val )) then + LIBPAW_DEALLOCATE(Paw_an(iat)%vxc1_val) + end if + if (allocated(Paw_an(iat)%vxct1 )) then + LIBPAW_DEALLOCATE(Paw_an(iat)%vxct1) + end if + if (allocated(Paw_an(iat)%vxcttau1 )) then + LIBPAW_DEALLOCATE(Paw_an(iat)%vxcttau1) + end if + if (allocated(Paw_an(iat)%vxct1_val)) then + LIBPAW_DEALLOCATE(Paw_an(iat)%vxct1_val) + end if + if (allocated(Paw_an(iat)%kxc1 )) then + LIBPAW_DEALLOCATE(Paw_an(iat)%kxc1) + end if + if (allocated(Paw_an(iat)%kxct1 )) then + LIBPAW_DEALLOCATE(Paw_an(iat)%kxct1) + end if + if (allocated(Paw_an(iat)%k3xc1 )) then + LIBPAW_DEALLOCATE(Paw_an(iat)%k3xc1) + end if + if (allocated(Paw_an(iat)%k3xct1 )) then + LIBPAW_DEALLOCATE(Paw_an(iat)%k3xct1) + end if + if (allocated(Paw_an(iat)%vxc_ex )) then + LIBPAW_DEALLOCATE(Paw_an(iat)%vxc_ex) + end if + + ! === Reset all has_* flags === + Paw_an(iat)%has_kxc =0 + Paw_an(iat)%has_k3xc =0 + Paw_an(iat)%has_vhartree=0 + Paw_an(iat)%has_vxc =0 + Paw_an(iat)%has_vxctau =0 + Paw_an(iat)%has_vxcval =0 + Paw_an(iat)%has_vxc_ex =0 + end do !iat + +end subroutine paw_an_free +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_an/paw_an_nullify +!! NAME +!! paw_an_nullify +!! +!! FUNCTION +!! Nullify pointers and flags in a paw_an structure +!! +!! INPUTS +!! +!! SIDE EFFECTS +!! Paw_an(:)=PAW arrays given on ANgular mesh or ANgular moments. +!! Nullified in output +!! +!! SOURCE + +subroutine paw_an_nullify(Paw_an) + +!Arguments ------------------------------------ + type(Paw_an_type),intent(inout) :: Paw_an(:) + +!Local variables------------------------------- + integer :: iat,natom + +! ************************************************************************* + + !@Paw_an_type + ! MGPAW: This one could be removed/renamed, + ! variables can be initialized in the datatype declaration + ! Do we need to expose this in the public API? + + natom=SIZE(Paw_an(:));if (natom==0) return + + do iat=1,natom + ! Set all has_* flags to zero. + Paw_an(iat)%has_kxc =0 + Paw_an(iat)%has_k3xc =0 + Paw_an(iat)%has_vhartree =0 + Paw_an(iat)%has_vxc =0 + Paw_an(iat)%has_vxctau =0 + Paw_an(iat)%has_vxcval =0 + Paw_an(iat)%has_vxc_ex =0 + end do + +end subroutine paw_an_nullify +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_an/paw_an_copy +!! NAME +!! paw_an_copy +!! +!! FUNCTION +!! Copy one paw_an datastructure into another +!! Can take into accound changes of dimensions +!! Can copy a shared paw_an into distributed ones (when parallelism is activated) +!! +!! INPUTS +!! mpi_atmtab(:)=--optional-- indexes of the atoms treated by current proc +!! comm_atom=--optional-- MPI communicator over atoms +!! paw_an_in(:)= input paw_an datastructure +!! +!! SIDE EFFECTS +!! paw_an_cpy(:)= output paw_an datastructure +!! +!! NOTES +!! paw_an_cpy must have been allocated in the calling function. +!! +!! SOURCE + +subroutine paw_an_copy(paw_an_in,paw_an_cpy,& +& mpi_atmtab,comm_atom) ! optional arguments (parallelism) + +!Arguments ------------------------------------ +!scalars + integer,optional,intent(in) :: comm_atom +!arrays + integer,optional,target,intent(in) :: mpi_atmtab(:) + type(Paw_an_type),intent(in),target :: paw_an_in(:) + type(Paw_an_type),intent(inout),target :: paw_an_cpy(:) + +!Local variables------------------------------- +!scalars + integer :: cplx_mesh_size,ij,ij1,lm_size,my_comm_atom,my_natom,nkxc1,nk3xc1,npaw_an_in + integer :: npaw_an_max,npaw_an_out,nspden,paral_case,v_size,sz1 + logical :: my_atmtab_allocated,paral_atom + character(len=500) :: msg + type(Paw_an_type),pointer :: paw_an_in1, paw_an_out1 +!arrays + integer,pointer :: my_atmtab(:) + type(Paw_an_type), pointer :: paw_an_out(:) + +! ************************************************************************* + +!@Paw_an_type + +!Retrieve sizes + npaw_an_in=size(paw_an_in);npaw_an_out=size(paw_an_cpy) + +!Set up parallelism over atoms + paral_atom=(present(comm_atom));if (paral_atom) paral_atom=(xmpi_comm_size(comm_atom)>1) + nullify(my_atmtab);if (present(mpi_atmtab)) my_atmtab => mpi_atmtab + my_comm_atom=xmpi_comm_self;if (present(comm_atom)) my_comm_atom=comm_atom + my_atmtab_allocated=.false. + +!Determine in which case we are (parallelism, ...) +!No parallelism: a single copy operation + paral_case=0;npaw_an_max=npaw_an_in + paw_an_out => paw_an_cpy + if (paral_atom) then + if (npaw_an_out paw_an_cpy + else + msg=' npaw_an_out should be equal to my_natom !' + LIBPAW_BUG(msg) + end if + else ! Parallelism: the copy operation is a gather + call get_my_natom(my_comm_atom,my_natom,npaw_an_out) + if (my_natom==npaw_an_in) then + paral_case=2;npaw_an_max=npaw_an_in + else + msg=' npaw_ij_in should be equal to my_natom !' + LIBPAW_BUG(msg) + end if + end if + end if + +!First case: a simple copy or a scatter + if (npaw_an_max>0.and.((paral_case==0).or.(paral_case==1))) then + call paw_an_free(paw_an_cpy) + call paw_an_nullify(paw_an_cpy) + +! Loop on paw_ij components + do ij1=1,npaw_an_max + ij=ij1; if (paral_case==1) ij=my_atmtab(ij1) + + paw_an_in1=>paw_an_in(ij) + paw_an_out1=>paw_an_out(ij1) + paw_an_out1%angl_size =paw_an_in1%angl_size + paw_an_out1%cplex =paw_an_in1%cplex + paw_an_out1%has_kxc =paw_an_in1%has_kxc + paw_an_out1%has_k3xc =paw_an_in1%has_k3xc + paw_an_out1%has_vhartree =paw_an_in1%has_vhartree + paw_an_out1%has_vxc =paw_an_in1%has_vxc + paw_an_out1%has_vxctau =paw_an_in1%has_vxctau + paw_an_out1%has_vxcval =paw_an_in1%has_vxcval + paw_an_out1%has_vxc_ex =paw_an_in1%has_vxc_ex + paw_an_out1%itypat =paw_an_in1%itypat + paw_an_out1%lm_size =paw_an_in1%lm_size + paw_an_out1%mesh_size =paw_an_in1%mesh_size + paw_an_out1%nkxc1 =paw_an_in1%nkxc1 + paw_an_out1%nk3xc1 =paw_an_in1%nk3xc1 + paw_an_out1%nspden =paw_an_in1%nspden + if (allocated(paw_an_in1%lmselect)) then + sz1=size(paw_an_in1%lmselect) + LIBPAW_ALLOCATE(paw_an_out1%lmselect,(sz1)) + paw_an_out1%lmselect(:)=paw_an_in1%lmselect(:) + end if + v_size=0 + if (paw_an_in1%has_vxc>0) then + v_size=size(paw_an_in1%vxc1,2) + else if (paw_an_in1%has_vxctau>0) then + v_size=size(paw_an_in1%vxctau1,2) + else if (paw_an_in1%has_kxc>0) then + v_size=size(paw_an_in1%kxc1,2) + else if (paw_an_in1%has_k3xc>0) then + v_size=size(paw_an_in1%k3xc1,2) + else if (paw_an_in1%has_vxcval>0) then + v_size=size(paw_an_in1%vxc1_val,2) + else if (paw_an_in1%has_vxc_ex>0) then + v_size=size(paw_an_in1%vxc_ex,2) + else if (paw_an_in1%has_vhartree>0) then + v_size=size(paw_an_in1%vh1,2) + end if + nspden=paw_an_in1%nspden + lm_size=paw_an_in1%lm_size + cplx_mesh_size=paw_an_in1%cplex*paw_an_in1%mesh_size + nkxc1=paw_an_in1%nkxc1 + if (paw_an_in1%has_kxc>0) then + LIBPAW_ALLOCATE(paw_an_out1%kxc1,(cplx_mesh_size,v_size,nkxc1)) + LIBPAW_ALLOCATE(paw_an_out1%kxct1,(cplx_mesh_size,v_size,nkxc1)) + if (paw_an_in1%has_kxc==2.and.nkxc1>0) then + paw_an_out1%kxc1(:,:,:)=paw_an_in1%kxc1(:,:,:) + paw_an_out1%kxct1(:,:,:)=paw_an_in1%kxct1(:,:,:) + end if + end if + nk3xc1=paw_an_in1%nk3xc1 + if (paw_an_in1%has_k3xc>0) then + LIBPAW_ALLOCATE(paw_an_out1%k3xc1,(cplx_mesh_size,v_size,nk3xc1)) + LIBPAW_ALLOCATE(paw_an_out1%k3xct1,(cplx_mesh_size,v_size,nk3xc1)) + if (paw_an_in1%has_k3xc==2.and.nk3xc1>0) then + paw_an_out1%k3xc1(:,:,:)=paw_an_in1%k3xc1(:,:,:) + paw_an_out1%k3xct1(:,:,:)=paw_an_in1%k3xct1(:,:,:) + end if + end if + if (paw_an_in1%has_vhartree>0) then + LIBPAW_ALLOCATE(paw_an_out1%vh1,(cplx_mesh_size,lm_size,nspden)) + LIBPAW_ALLOCATE(paw_an_out1%vht1,(cplx_mesh_size,lm_size,nspden)) + if (paw_an_in1%has_vhartree==2) then + paw_an_out1%vh1(:,:,:)=paw_an_in1%vh1(:,:,:) + paw_an_out1%vht1(:,:,:)=paw_an_in1%vht1(:,:,:) + end if + end if + if (paw_an_in1%has_vxc>0) then + LIBPAW_ALLOCATE(paw_an_out1%vxc1,(cplx_mesh_size,v_size,nspden)) + LIBPAW_ALLOCATE(paw_an_out1%vxct1,(cplx_mesh_size,v_size,nspden)) + if (paw_an_in1%has_vxc==2) then + paw_an_out1%vxc1(:,:,:)=paw_an_in1%vxc1(:,:,:) + paw_an_out1%vxct1(:,:,:)=paw_an_in1%vxct1(:,:,:) + end if + end if + if (paw_an_in1%has_vxctau>0) then + LIBPAW_ALLOCATE(paw_an_out1%vxctau1,(cplx_mesh_size,v_size,nspden)) + LIBPAW_ALLOCATE(paw_an_out1%vxcttau1,(cplx_mesh_size,v_size,nspden)) + if (paw_an_in1%has_vxc==2) then + paw_an_out1%vxctau1(:,:,:)=paw_an_in1%vxctau1(:,:,:) + paw_an_out1%vxcttau1(:,:,:)=paw_an_in1%vxcttau1(:,:,:) + end if + end if + if (paw_an_in1%has_vxcval>0) then + LIBPAW_ALLOCATE(paw_an_out1%vxc1_val,(cplx_mesh_size,v_size,nspden)) + LIBPAW_ALLOCATE(paw_an_out1%vxct1_val,(cplx_mesh_size,v_size,nspden)) + if (paw_an_in1%has_vxcval==2) then + paw_an_out1%vxc1_val(:,:,:)=paw_an_in1%vxc1_val(:,:,:) + paw_an_out1%vxct1_val(:,:,:)=paw_an_in1%vxct1_val(:,:,:) + end if + end if + if (paw_an_in1%has_vxc_ex>0) then + LIBPAW_ALLOCATE(paw_an_out1%vxc_ex,(cplx_mesh_size,v_size,nspden)) + if (paw_an_in1%has_vxc_ex==2) then + paw_an_out1%vxc_ex(:,:,:)=paw_an_in1%vxc_ex(:,:,:) + end if + end if + end do + end if + +!Second case: a gather + if (paral_case==2) then + call paw_an_gather(paw_an_in,paw_an_cpy,-1,my_comm_atom,my_atmtab) + end if + +!Destroy atom table used for parallelism + call free_my_atmtab(my_atmtab,my_atmtab_allocated) + + end subroutine paw_an_copy +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_an/paw_an_print +!! NAME +!! paw_an_print +!! +!! FUNCTION +!! Reports basic info on a paw_an datastructure +!! +!! INPUTS +!! [unit]=the unit number for output +!! [mode_paral]=either "COLL" or "PERS" +!! [mpi_atmtab(:)]=indexes of the atoms treated by current proc (can be computed here) +!! [comm_atom]=MPI communicator over atoms (needed if parallelism over atoms is activated) +!! [natom]=total number of atom (needed if parallelism over atoms is activated) +!! if Paw_an is distributed, natom is different from size(Paw_an). +!! +!! OUTPUT +!! (only writing) +!! +!! SOURCE + +subroutine paw_an_print(Paw_an,unit,mode_paral, & +& mpi_atmtab,comm_atom,natom) + +!Arguments ------------------------------------ +!scalars + integer,optional,intent(in) :: comm_atom,natom,unit + character(len=4),optional,intent(in) :: mode_paral +!arrays + integer,optional,target,intent(in) :: mpi_atmtab(:) + type(Paw_an_type),intent(in) :: Paw_an(:) + +!Local variables------------------------------- +!scalars + integer :: iatom,iatom_tot,my_comm_atom,my_natom,my_unt,size_paw_an + logical :: my_atmtab_allocated,paral_atom + character(len=4) :: my_mode + character(len=500) :: msg +!arrays + integer,pointer :: my_atmtab(:) + +! ************************************************************************* + +!@Paw_an_type + + size_paw_an=SIZE(Paw_an) + my_unt =std_out; if (PRESENT(unit )) my_unt =unit + my_mode ='PERS' ; if (PRESENT(mode_paral)) my_mode =mode_paral + my_natom=size_paw_an; if (PRESENT(natom)) my_natom=natom + +!Set up parallelism over atoms + paral_atom=(present(comm_atom).and.my_natom/=size_paw_an) + nullify(my_atmtab);if (present(mpi_atmtab)) my_atmtab => mpi_atmtab + my_comm_atom=xmpi_comm_self;if (present(comm_atom)) my_comm_atom=comm_atom + call get_my_atmtab(my_comm_atom,my_atmtab,my_atmtab_allocated,paral_atom,my_natom,my_natom_ref=size_paw_an) + + write(msg,'(3a)')ch10,' === Content of the pawfgrtab datatype === ',ch10 + call wrtout(my_unt,msg,my_mode) + + do iatom=1,my_natom + iatom_tot=iatom;if (paral_atom) iatom_tot=my_atmtab(iatom) + write(msg,'(a)')' ' + call wrtout(my_unt,msg,my_mode) + write(msg,'(a,i4)')' ****************************** iatom= ' , iatom_tot + call wrtout(my_unt,msg,my_mode) + write(msg,'(a,i4)')' Dimension of paw angular mesh= ',paw_an(iatom)%angl_size + call wrtout(my_unt,msg,my_mode) + write(msg,'(a,i4)')' cplex (1 if potentials/densities are real, 2 if they are complex)= ',& +& paw_an(iatom)%cplex + call wrtout(my_unt,msg,my_mode) + write(msg,'(a,i4)')' has_kxc = ',paw_an(iatom)%has_kxc + call wrtout(my_unt,msg,my_mode) + write(msg,'(a,i4)')' has_k3xc = ',paw_an(iatom)%has_k3xc + call wrtout(my_unt,msg,my_mode) + write(msg,'(a,i4)')' has_vhartree= ',paw_an(iatom)%has_vhartree + call wrtout(my_unt,msg,my_mode) + write(msg,'(a,i4)')' has_vxc = ',paw_an(iatom)%has_vxc + call wrtout(my_unt,msg,my_mode) + write(msg,'(a,i4)')' has_vxctau = ',paw_an(iatom)%has_vxctau + call wrtout(my_unt,msg,my_mode) + write(msg,'(a,i4)')' has_vxcval = ',paw_an(iatom)%has_vxcval + call wrtout(my_unt,msg,my_mode) + write(msg,'(a,i4)')' has_vxc_ex = ',paw_an(iatom)%has_vxc_ex + call wrtout(my_unt,msg,my_mode) + write(msg,'(a,i4)')' Atome type = ',paw_an(iatom)%itypat + call wrtout(my_unt,msg,my_mode) + write(msg,'(a,i4)')' lm_size = ',paw_an(iatom)%lm_size + call wrtout(my_unt,msg,my_mode) + write(msg,'(a,i4)')' mesh_size = ',paw_an(iatom)%mesh_size + call wrtout(my_unt,msg,my_mode) + write(msg,'(a,i4)')' nkxc1 = ',paw_an(iatom)%nkxc1 + call wrtout(my_unt,msg,my_mode) + write(msg,'(a,i4)')' nk3xc1 = ',paw_an(iatom)%nk3xc1 + call wrtout(my_unt,msg,my_mode) + write(msg,'(a,i4)')' nspden = ',paw_an(iatom)%nspden + call wrtout(my_unt,msg,my_mode) + end do + +end subroutine paw_an_print +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_an/paw_an_gather +!! NAME +!! paw_an_gather +!! +!! FUNCTION +!! (All)Gather paw_an datastructures +!! +!! INPUTS +!! master=master communicator receiving data ; if -1 do a ALLGATHER +!! comm_atom= communicator over atom +!! mpi_atmtab(:)=--optional-- indexes of the atoms treated by current calling proc +!! paw_an_in(:)= input paw_an datastructures on every process +!! +!! OUTPUT +!! paw_an_gathered(:)= output paw_an datastructure +!! +!! SOURCE + +subroutine paw_an_gather(Paw_an_in,paw_an_gathered,master,comm_atom,mpi_atmtab) + +!Arguments ------------------------------------ + integer,intent(in) :: master,comm_atom +!arrays + integer,optional,target,intent(in) :: mpi_atmtab(:) + type(Paw_an_type),target,intent(in) :: Paw_an_in(:) + type(Paw_an_type),target,intent(inout) :: Paw_an_gathered(:) + +!Local variables------------------------------- +!scalars + integer :: buf_dp_size,buf_dp_size_all,buf_int_size,buf_int_size_all,cplx_mesh_size + integer :: iat,iatot,ierr,has_lm_select,i1,i2,ij,indx_int,indx_dp + integer :: lm_size,me_atom + integer :: my_natom,natom,nkxc1,nk3xc1,npaw_an_in_sum,nproc_atom,nspden,v_size,sz1,sz2,sz3 + logical :: my_atmtab_allocated,paral_atom + character(len=500) :: msg + type(Paw_an_type),pointer :: paw_an_in1,paw_an_gathered1 +!arrays + integer :: bufsz(2) + integer,allocatable :: buf_int(:),buf_int_all(:) + integer,allocatable :: count_dp(:),count_int(:),count_tot(:),displ_dp(:),displ_int(:) + integer,pointer :: my_atmtab(:) + real(dp),allocatable :: buf_dp(:),buf_dp_all(:) + +! ************************************************************************* + +!@Paw_an_type + + if (master/=-1) then + msg='simple gather (master/=-1) not yet implemented !' + LIBPAW_BUG(msg) + end if + + my_natom=size(paw_an_in);natom=size(paw_an_gathered) + +!Set up parallelism over atoms + paral_atom=(my_natom/=natom) + nullify(my_atmtab);if (present(mpi_atmtab)) my_atmtab => mpi_atmtab + call get_my_atmtab(comm_atom,my_atmtab,my_atmtab_allocated,paral_atom,natom,my_natom_ref=my_natom) + nproc_atom=xmpi_comm_size(comm_atom) + me_atom=xmpi_comm_rank(comm_atom) + +!Special case: one process (simple copy) + if (nproc_atom==1) then + if (master==-1.or.me_atom==master) then + call paw_an_free(paw_an_gathered) + call paw_an_nullify(paw_an_gathered) + do iat=1,my_natom + paw_an_in1=>paw_an_in(iat) + paw_an_gathered1%itypat =paw_an_in1%itypat + paw_an_gathered1%nspden =paw_an_in1%nspden + paw_an_gathered1%cplex =paw_an_in1%cplex + paw_an_gathered1%mesh_size =paw_an_in1%mesh_size + paw_an_gathered1%angl_size =paw_an_in1%angl_size + paw_an_gathered1%lm_size =paw_an_in1%lm_size + paw_an_gathered1%nkxc1 =paw_an_in1%nkxc1 + paw_an_gathered1%nk3xc1 =paw_an_in1%nk3xc1 + paw_an_gathered1%has_vxc =paw_an_in1%has_vxc + paw_an_gathered1%has_vxctau =paw_an_in1%has_vxctau + paw_an_gathered1%has_kxc =paw_an_in1%has_kxc + paw_an_gathered1%has_k3xc =paw_an_in1%has_k3xc + paw_an_gathered1%has_vxcval =paw_an_in1%has_vxcval + paw_an_gathered1%has_vxc_ex =paw_an_in1%has_vxc_ex + paw_an_gathered1%has_vhartree =paw_an_in1%has_vhartree + if (allocated(paw_an_in1%lmselect)) then + sz1=size(paw_an_in1%lmselect) + LIBPAW_ALLOCATE(paw_an_gathered1%lmselect,(sz1)) + paw_an_gathered1%lmselect(:)=paw_an_in1%lmselect(:) + end if + if (allocated(paw_an_in1%vxc1)) then + sz1=size(paw_an_in1%vxc1,1);sz2=size(paw_an_in1%vxc1,2) + sz3=size(paw_an_in1%vxc1,3) + LIBPAW_ALLOCATE(paw_an_gathered1%vxc1,(sz1,sz2,sz3)) + paw_an_gathered1%vxc1(:,:,:)=paw_an_in1%vxc1(:,:,:) + end if + if (allocated(paw_an_in1%vxctau1)) then + sz1=size(paw_an_in1%vxctau1,1);sz2=size(paw_an_in1%vxctau1,2) + sz3=size(paw_an_in1%vxctau1,3) + LIBPAW_ALLOCATE(paw_an_gathered1%vxctau1,(sz1,sz2,sz3)) + paw_an_gathered1%vxctau1(:,:,:)=paw_an_in1%vxctau1(:,:,:) + end if + if (allocated(paw_an_in1%vxcttau1)) then + sz1=size(paw_an_in1%vxcttau1,1);sz2=size(paw_an_in1%vxcttau1,2) + sz3=size(paw_an_in1%vxcttau1,3) + LIBPAW_ALLOCATE(paw_an_gathered1%vxcttau1,(sz1,sz2,sz3)) + paw_an_gathered1%vxcttau1(:,:,:)=paw_an_in1%vxcttau1(:,:,:) + end if + if (allocated(paw_an_in1%kxc1)) then + sz1=size(paw_an_in1%kxc1,1);sz2=size(paw_an_in1%kxc1,2) + sz3=size(paw_an_in1%kxc1,3) + LIBPAW_ALLOCATE(paw_an_gathered1%kxc1,(sz1,sz2,sz3)) + if (sz3>0) paw_an_gathered1%kxc1(:,:,:)=paw_an_in1%kxc1(:,:,:) + end if + if (allocated(paw_an_in1%k3xc1)) then + sz1=size(paw_an_in1%k3xc1,1);sz2=size(paw_an_in1%k3xc1,2) + sz3=size(paw_an_in1%k3xc1,3) + LIBPAW_ALLOCATE(paw_an_gathered1%k3xc1,(sz1,sz2,sz3)) + if (sz3>0) paw_an_gathered1%k3xc1(:,:,:)=paw_an_in1%k3xc1(:,:,:) + end if + if (allocated(paw_an_in1%kxct1)) then + sz1=size(paw_an_in1%kxct1,1);sz2=size(paw_an_in1%kxct1,2) + sz3=size(paw_an_in1%kxct1,3) + LIBPAW_ALLOCATE(paw_an_gathered1%kxct1,(sz1,sz2,sz3)) + if (sz3>0) paw_an_gathered1%kxct1(:,:,:)=paw_an_in1%kxct1(:,:,:) + end if + if (allocated(paw_an_in1%k3xct1)) then + sz1=size(paw_an_in1%k3xct1,1);sz2=size(paw_an_in1%k3xct1,2) + sz3=size(paw_an_in1%k3xct1,3) + LIBPAW_ALLOCATE(paw_an_gathered1%k3xct1,(sz1,sz2,sz3)) + if (sz3>0) paw_an_gathered1%k3xct1(:,:,:)=paw_an_in1%k3xct1(:,:,:) + end if + if (allocated(paw_an_in1%vxc1_val)) then + sz1=size(paw_an_in1%vxc1_val,1);sz2=size(paw_an_in1%vxc1_val,2) + sz3=size(paw_an_in1%vxc1_val,3) + LIBPAW_ALLOCATE(paw_an_gathered1%vxc1_val,(sz1,sz2,sz3)) + paw_an_gathered1%vxc1_val(:,:,:)=paw_an_in1%vxc1_val(:,:,:) + end if + if (allocated(paw_an_in1%vxct1_val)) then + sz1=size(paw_an_in1%vxct1_val,1);sz2=size(paw_an_in1%vxct1_val,2) + sz3=size(paw_an_in1%vxct1_val,3) + LIBPAW_ALLOCATE(paw_an_gathered1%vxct1_val,(sz1,sz2,sz3)) + paw_an_gathered1%vxct1_val(:,:,:)=paw_an_in1%vxct1_val(:,:,:) + end if + if (allocated(paw_an_in1%vxc_ex)) then + sz1=size(paw_an_in1%vxc_ex,1);sz2=size(paw_an_in1%vxc_ex,2) + sz3=size(paw_an_in1%vxc_ex,3) + LIBPAW_ALLOCATE(paw_an_gathered1%vxc_ex,(sz1,sz2,sz3)) + paw_an_gathered1%vxc_ex(:,:,:)=paw_an_in1%vxc_ex(:,:,:) + end if + if (allocated(paw_an_in1%vh1)) then + sz1=size(paw_an_in1%vh1,1);sz2=size(paw_an_in1%vh1,2) + sz3=size(paw_an_in1%vh1,3) + LIBPAW_ALLOCATE(paw_an_gathered1%vh1,(sz1,sz2,sz3)) + paw_an_gathered1%vh1(:,:,:)=paw_an_in1%vh1(:,:,:) + end if + if (allocated(paw_an_in1%vht1)) then + sz1=size(paw_an_in1%vht1,1);sz2=size(paw_an_in1%vht1,2) + sz3=size(paw_an_in1%vht1,3) + LIBPAW_ALLOCATE(paw_an_gathered1%vht1,(sz1,sz2,sz3)) + paw_an_gathered1%vht1(:,:,:)=paw_an_in1%vht1(:,:,:) + end if + end do + end if + return + end if + +!Test on sizes + npaw_an_in_sum=my_natom + call xmpi_sum(npaw_an_in_sum,comm_atom,ierr) + if (master==-1) then + if (natom/=npaw_an_in_sum) then + msg='Wrong sizes sum[npaw_an_in]/=natom !' + LIBPAW_BUG(msg) + end if + else + if (me_atom==master.and.natom/=npaw_an_in_sum) then + msg='(2) paw_an_gathered wrongly allocated !' + LIBPAW_BUG(msg) + end if + end if + +!Compute sizes of buffers + buf_int_size=0;buf_dp_size=0 + do ij=1,my_natom + buf_int_size=buf_int_size+18+size(paw_an_in(ij)%lmselect) + end do + do ij=1,my_natom + paw_an_in1=>paw_an_in(ij) + if (paw_an_in1%has_vxc==2) then + buf_dp_size=buf_dp_size+size(paw_an_in1%vxc1) + buf_dp_size=buf_dp_size+size(paw_an_in1%vxct1) + end if + if (paw_an_in1%has_vxctau==2) then + buf_dp_size=buf_dp_size+size(paw_an_in1%vxctau1) + buf_dp_size=buf_dp_size+size(paw_an_in1%vxcttau1) + end if + if (paw_an_in1%has_kxc==2) then + buf_dp_size=buf_dp_size+size(paw_an_in1%kxc1) + buf_dp_size=buf_dp_size+size(paw_an_in1%kxct1) + end if + if (paw_an_in1%has_k3xc==2) then + buf_dp_size=buf_dp_size+size(paw_an_in1%k3xc1) + buf_dp_size=buf_dp_size+size(paw_an_in1%k3xct1) + end if + if (paw_an_in1%has_vxcval==2) then + buf_dp_size=buf_dp_size+size(paw_an_in1%vxc1_val) + buf_dp_size=buf_dp_size+size(paw_an_in1%vxct1_val) + end if + if (paw_an_in1%has_vxc_ex==2) then + buf_dp_size=buf_dp_size+size(paw_an_in1%vxc_ex) + end if + if (paw_an_in1%has_vhartree==2) then + buf_dp_size=buf_dp_size+size(paw_an_in1%vh1) + buf_dp_size=buf_dp_size+size(paw_an_in1%vht1) + end if + end do + +!Fill in input buffers + LIBPAW_ALLOCATE(buf_int,(buf_int_size)) + LIBPAW_ALLOCATE(buf_dp ,(buf_dp_size)) + indx_int=1;indx_dp=1 + do ij=1, my_natom + paw_an_in1=>paw_an_in(ij) + buf_int(indx_int)=my_atmtab(ij); indx_int=indx_int+1 + buf_int(indx_int)=paw_an_in1%itypat; indx_int=indx_int+1 + buf_int(indx_int)=paw_an_in1%nspden; indx_int=indx_int+1 + buf_int(indx_int)=paw_an_in1%cplex; indx_int=indx_int+1 + buf_int(indx_int)=paw_an_in1%mesh_size; indx_int=indx_int+1 + buf_int(indx_int)=paw_an_in1%angl_size; indx_int=indx_int+1 + buf_int(indx_int)=paw_an_in1%lm_size; indx_int=indx_int+1 + buf_int(indx_int)=paw_an_in1%nkxc1; indx_int=indx_int+1 + buf_int(indx_int)=paw_an_in1%nk3xc1; indx_int=indx_int+1 + buf_int(indx_int)=paw_an_in1%has_vxc; indx_int=indx_int+1 + buf_int(indx_int)=paw_an_in1%has_vxctau; indx_int=indx_int+1 + buf_int(indx_int)=paw_an_in1%has_kxc; indx_int=indx_int+1 + buf_int(indx_int)=paw_an_in1%has_k3xc; indx_int=indx_int+1 + buf_int(indx_int)=paw_an_in1%has_vxcval; indx_int=indx_int+1 + buf_int(indx_int)=paw_an_in1%has_vxc_ex; indx_int=indx_int+1 + buf_int(indx_int)=paw_an_in1%has_vhartree; indx_int=indx_int+1 + v_size=0 + if (paw_an_in1%has_vxc>0) then + v_size=size(paw_an_in1%vxc1,2) + else if (paw_an_in1%has_vxctau>0) then + v_size=size(paw_an_in1%vxctau1,2) + else if (paw_an_in1%has_kxc>0) then + v_size=size(paw_an_in1%kxc1,2) + else if (paw_an_in1%has_k3xc>0) then + v_size=size(paw_an_in1%k3xc1,2) + else if (paw_an_in1%has_vxcval>0) then + v_size=size(paw_an_in1%vxc1_val,2) + else if (paw_an_in1%has_vxc_ex>0) then + v_size=size(paw_an_in1%vxc_ex,2) + else if (paw_an_in1%has_vhartree>0) then + v_size=size(paw_an_in1%vh1,2) + end if + buf_int(indx_int)=v_size;indx_int=indx_int+1 + if (allocated(paw_an_in1%lmselect)) then + buf_int(indx_int)=1;indx_int=indx_int+1 + else + buf_int(indx_int)=0;indx_int=indx_int+1 + end if + nspden=paw_an_in1%nspden + lm_size=paw_an_in1%lm_size + cplx_mesh_size=paw_an_in1%cplex*paw_an_in1%mesh_size + if (lm_size>0) then + if (allocated(paw_an_in1%lmselect)) then + do i1=1,lm_size + if (paw_an_in1%lmselect(i1)) then + buf_int(indx_int)=1 + else + buf_int(indx_int)=0 + end if + indx_int=indx_int+1 + end do + end if + end if + if (paw_an_in1%has_vxc==2) then + do i1=1,nspden + do i2=1,v_size + buf_dp(indx_dp:indx_dp+cplx_mesh_size-1)=paw_an_in1%vxc1(:,i2,i1) + indx_dp=indx_dp+cplx_mesh_size + end do + end do + do i1=1,nspden + do i2=1,v_size + buf_dp(indx_dp:indx_dp+cplx_mesh_size-1)=paw_an_in1%vxct1(:,i2,i1) + indx_dp=indx_dp+cplx_mesh_size + end do + end do + end if + if (paw_an_in1%has_vxctau==2) then + do i1=1,nspden + do i2=1,v_size + buf_dp(indx_dp:indx_dp+cplx_mesh_size-1)=paw_an_in1%vxctau1(:,i2,i1) + indx_dp=indx_dp+cplx_mesh_size + end do + end do + do i1=1,nspden + do i2=1,v_size + buf_dp(indx_dp:indx_dp+cplx_mesh_size-1)=paw_an_in1%vxcttau1(:,i2,i1) + indx_dp=indx_dp+cplx_mesh_size + end do + end do + end if + if (paw_an_in1%has_kxc==2.and.paw_an_in1%nkxc1>0) then + do i1=1,paw_an_in1%nkxc1 + do i2=1,v_size + buf_dp(indx_dp:indx_dp+cplx_mesh_size-1)=paw_an_in1%kxc1(:,i2,i1) + indx_dp=indx_dp+cplx_mesh_size + end do + end do + do i1=1,paw_an_in1%nkxc1 + do i2=1,v_size + buf_dp(indx_dp:indx_dp+cplx_mesh_size-1)=paw_an_in1%kxct1(:,i2,i1) + indx_dp=indx_dp+cplx_mesh_size + end do + end do + end if + if (paw_an_in1%has_k3xc==2.and.paw_an_in1%nk3xc1>0) then + do i1=1,paw_an_in1%nk3xc1 + do i2=1,v_size + buf_dp(indx_dp:indx_dp+cplx_mesh_size-1)=paw_an_in1%k3xc1(:,i2,i1) + indx_dp=indx_dp+cplx_mesh_size + end do + end do + do i1=1,paw_an_in1%nk3xc1 + do i2=1,v_size + buf_dp(indx_dp:indx_dp+cplx_mesh_size-1)=paw_an_in1%k3xct1(:,i2,i1) + indx_dp=indx_dp+cplx_mesh_size + end do + end do + end if + if (paw_an_in1%has_vxcval==2) then + do i1=1,nspden + do i2=1,v_size + buf_dp(indx_dp:indx_dp+cplx_mesh_size-1)=paw_an_in1%vxc1_val(:,i2,i1) + indx_dp=indx_dp+cplx_mesh_size + end do + end do + do i1=1,nspden + do i2=1,v_size + buf_dp(indx_dp:indx_dp+cplx_mesh_size-1)=paw_an_in1%vxct1_val(:,i2,i1) + indx_dp=indx_dp+cplx_mesh_size + end do + end do + end if + if (paw_an_in1%has_vxc_ex==2) then + do i1=1,nspden + do i2=1,v_size + buf_dp(indx_dp:indx_dp+cplx_mesh_size-1)=paw_an_in1%vxc_ex(:,i2,i1) + indx_dp=indx_dp+cplx_mesh_size + end do + end do + end if + if (paw_an_in1%has_vhartree==2) then + do i1=1,nspden + do i2=1,lm_size + buf_dp(indx_dp:indx_dp+cplx_mesh_size-1)=paw_an_in1%vh1(:,i2,i1) + indx_dp=indx_dp+cplx_mesh_size + end do + end do + do i1=1,nspden + do i2=1,lm_size + buf_dp(indx_dp:indx_dp+cplx_mesh_size-1)=paw_an_in1%vht1(:,i2,i1) + indx_dp=indx_dp+cplx_mesh_size + end do + end do + end if + end do + if (indx_int/=1+buf_int_size) then + msg='Error (1) in paw_an_gather: wrong buffer sizes !' + LIBPAW_BUG(msg) + end if + if (indx_dp/=1+buf_dp_size) then + msg='Error (2) in paw_an_gather: wrong buffer sizes !' + LIBPAW_BUG(msg) + end if + +!Communicate (1 gather for integers, 1 gather for reals) + LIBPAW_ALLOCATE(count_int,(nproc_atom)) + LIBPAW_ALLOCATE(displ_int,(nproc_atom)) + LIBPAW_ALLOCATE(count_dp ,(nproc_atom)) + LIBPAW_ALLOCATE(displ_dp ,(nproc_atom)) + LIBPAW_ALLOCATE(count_tot,(2*nproc_atom)) + bufsz(1)=buf_int_size; bufsz(2)=buf_dp_size + call xmpi_allgather(bufsz,2,count_tot,comm_atom,ierr) + do ij=1,nproc_atom + count_int(ij)=count_tot(2*ij-1) + count_dp (ij)=count_tot(2*ij) + end do + displ_int(1)=0;displ_dp(1)=0 + do ij=2,nproc_atom + displ_int(ij)=displ_int(ij-1)+count_int(ij-1) + displ_dp (ij)=displ_dp (ij-1)+count_dp (ij-1) + end do + buf_int_size_all=sum(count_int) + buf_dp_size_all =sum(count_dp) + LIBPAW_DEALLOCATE(count_tot) + LIBPAW_ALLOCATE(buf_int_all,(buf_int_size_all)) + LIBPAW_ALLOCATE(buf_dp_all ,(buf_dp_size_all)) + call xmpi_allgatherv(buf_int,buf_int_size,buf_int_all,count_int,displ_int,comm_atom,ierr) + call xmpi_allgatherv(buf_dp ,buf_dp_size ,buf_dp_all ,count_dp ,displ_dp ,comm_atom,ierr) + LIBPAW_DEALLOCATE(count_int) + LIBPAW_DEALLOCATE(displ_int) + LIBPAW_DEALLOCATE(count_dp) + LIBPAW_DEALLOCATE(displ_dp) + +!Fill in output datastructure + indx_int=1; indx_dp=1 + call paw_an_free(paw_an_gathered) + call paw_an_nullify(paw_an_gathered) + do iat=1,natom + iatot=buf_int_all(indx_int); indx_int=indx_int+1 + paw_an_gathered1=>paw_an_gathered(iatot) + paw_an_gathered1%itypat=buf_int_all(indx_int); indx_int=indx_int+1 + paw_an_gathered1%nspden=buf_int_all(indx_int); indx_int=indx_int+1 + paw_an_gathered1%cplex=buf_int_all(indx_int); indx_int=indx_int+1 + paw_an_gathered1%mesh_size=buf_int_all(indx_int); indx_int=indx_int+1 + paw_an_gathered1%angl_size=buf_int_all(indx_int); indx_int=indx_int+1 + paw_an_gathered1%lm_size=buf_int_all(indx_int); indx_int=indx_int+1 + paw_an_gathered1%nkxc1=buf_int_all(indx_int); indx_int=indx_int+1 + paw_an_gathered1%nk3xc1=buf_int_all(indx_int); indx_int=indx_int+1 + paw_an_gathered1%has_vxc=buf_int_all(indx_int); indx_int=indx_int+1 + paw_an_gathered1%has_vxctau=buf_int_all(indx_int); indx_int=indx_int+1 + paw_an_gathered1%has_kxc=buf_int_all(indx_int); indx_int=indx_int+1 + paw_an_gathered1%has_k3xc=buf_int_all(indx_int); indx_int=indx_int+1 + paw_an_gathered1%has_vxcval=buf_int_all(indx_int); indx_int=indx_int+1 + paw_an_gathered1%has_vxc_ex=buf_int_all(indx_int); indx_int=indx_int+1 + paw_an_gathered1%has_vhartree=buf_int_all(indx_int); indx_int=indx_int+1 + v_size=buf_int_all(indx_int); indx_int=indx_int+1 + has_lm_select=buf_int_all(indx_int); indx_int=indx_int+1 + nspden=paw_an_gathered1%nspden + lm_size=paw_an_gathered1%lm_size + nkxc1=paw_an_gathered1%nkxc1 + nk3xc1=paw_an_gathered1%nk3xc1 + cplx_mesh_size=paw_an_gathered1%cplex*paw_an_gathered1%mesh_size + if (has_lm_select==1) then + LIBPAW_ALLOCATE(paw_an_gathered1%lmselect,(lm_size)) + if (lm_size>0) then + do i1=1,lm_size + if (buf_int_all(indx_int)==1) then + paw_an_gathered1%lmselect(i1)=.TRUE.;indx_int=indx_int+1 + else + paw_an_gathered1%lmselect(i1)=.FALSE.;indx_int=indx_int+1 + end if + end do + end if + end if + if (paw_an_gathered1%has_vxc>0) then + LIBPAW_ALLOCATE(paw_an_gathered1%vxc1,(cplx_mesh_size,v_size,nspden)) + LIBPAW_ALLOCATE(paw_an_gathered1%vxct1,(cplx_mesh_size,v_size,nspden)) + if (paw_an_gathered1%has_vxc==2) then + do i1=1,nspden + do i2=1,v_size + paw_an_gathered1%vxc1(:,i2,i1)=buf_dp_all(indx_dp:indx_dp+cplx_mesh_size-1) + indx_dp=indx_dp+cplx_mesh_size + end do + end do + do i1=1,nspden + do i2=1,v_size + paw_an_gathered1%vxct1(:,i2,i1)=buf_dp_all(indx_dp:indx_dp+cplx_mesh_size-1) + indx_dp=indx_dp+cplx_mesh_size + end do + end do + end if + end if + if (paw_an_gathered1%has_vxctau>0) then + LIBPAW_ALLOCATE(paw_an_gathered1%vxctau1,(cplx_mesh_size,v_size,nspden)) + LIBPAW_ALLOCATE(paw_an_gathered1%vxcttau1,(cplx_mesh_size,v_size,nspden)) + if (paw_an_gathered1%has_vxctau==2) then + do i1=1,nspden + do i2=1,v_size + paw_an_gathered1%vxctau1(:,i2,i1)=buf_dp_all(indx_dp:indx_dp+cplx_mesh_size-1) + indx_dp=indx_dp+cplx_mesh_size + end do + end do + do i1=1,nspden + do i2=1,v_size + paw_an_gathered1%vxcttau1(:,i2,i1)=buf_dp_all(indx_dp:indx_dp+cplx_mesh_size-1) + indx_dp=indx_dp+cplx_mesh_size + end do + end do + end if + end if + if (paw_an_gathered1%has_kxc>0) then + LIBPAW_ALLOCATE(paw_an_gathered1%kxc1,(cplx_mesh_size,v_size,nkxc1)) + LIBPAW_ALLOCATE(paw_an_gathered1%kxct1,(cplx_mesh_size,v_size,nkxc1)) + if (paw_an_gathered1%has_kxc==2.and.nkxc1>0) then + do i1=1,nkxc1 + do i2=1,v_size + paw_an_gathered1%kxc1(:,i2,i1)=buf_dp_all(indx_dp:indx_dp+cplx_mesh_size-1) + indx_dp=indx_dp+cplx_mesh_size + end do + end do + do i1=1,nkxc1 + do i2=1,v_size + paw_an_gathered1%kxct1(:,i2,i1)=buf_dp_all(indx_dp:indx_dp+cplx_mesh_size-1) + indx_dp=indx_dp+cplx_mesh_size + end do + end do + end if + end if + if (paw_an_gathered1%has_k3xc>0) then + LIBPAW_ALLOCATE(paw_an_gathered1%k3xc1,(cplx_mesh_size,v_size,nk3xc1)) + LIBPAW_ALLOCATE(paw_an_gathered1%k3xct1,(cplx_mesh_size,v_size,nk3xc1)) + if (paw_an_gathered1%has_k3xc==2.and.nk3xc1>0) then + do i1=1,nk3xc1 + do i2=1,v_size + paw_an_gathered1%k3xc1(:,i2,i1)=buf_dp_all(indx_dp:indx_dp+cplx_mesh_size-1) + indx_dp=indx_dp+cplx_mesh_size + end do + end do + do i1=1,nk3xc1 + do i2=1,v_size + paw_an_gathered1%k3xct1(:,i2,i1)=buf_dp_all(indx_dp:indx_dp+cplx_mesh_size-1) + indx_dp=indx_dp+cplx_mesh_size + end do + end do + end if + end if + if (paw_an_gathered1%has_vxcval>0) then + LIBPAW_ALLOCATE(paw_an_gathered1%vxc1_val,(cplx_mesh_size,v_size,nspden)) + LIBPAW_ALLOCATE(paw_an_gathered1%vxct1_val,(cplx_mesh_size,v_size,nspden)) + if (paw_an_gathered1%has_vxcval==2) then + do i1=1,nspden + do i2=1,v_size + paw_an_gathered1%vxc1_val(:,i2,i1)=buf_dp_all(indx_dp:indx_dp+cplx_mesh_size-1) + indx_dp=indx_dp+cplx_mesh_size + end do + end do + do i1=1,nspden + do i2=1,v_size + paw_an_gathered1%vxct1_val(:,i2,i1)=buf_dp_all(indx_dp:indx_dp+cplx_mesh_size-1) + indx_dp=indx_dp+cplx_mesh_size + end do + end do + end if + end if + if (paw_an_gathered1%has_vxc_ex>0) then + LIBPAW_ALLOCATE(paw_an_gathered1%vxc_ex,(cplx_mesh_size,v_size,nspden)) + if (paw_an_gathered1%has_vxc_ex==2) then + do i1=1,nspden + do i2=1,v_size + paw_an_gathered1%vxc_ex(:,i2,i1)=buf_dp_all(indx_dp:indx_dp+cplx_mesh_size-1) + indx_dp=indx_dp+cplx_mesh_size + end do + end do + end if + end if + if (paw_an_gathered1%has_vhartree>0) then + LIBPAW_ALLOCATE(paw_an_gathered1%vh1,(cplx_mesh_size,lm_size,nspden)) + LIBPAW_ALLOCATE(paw_an_gathered1%vht1,(cplx_mesh_size,lm_size,nspden)) + if (paw_an_gathered1%has_vhartree==2) then + do i1=1,nspden + do i2=1,lm_size + paw_an_gathered1%vh1(:,i2,i1)=buf_dp_all(indx_dp:indx_dp+cplx_mesh_size-1) + indx_dp=indx_dp+cplx_mesh_size + end do + end do + do i1=1,nspden + do i2=1,lm_size + paw_an_gathered1%vht1(:,i2,i1)=buf_dp_all(indx_dp:indx_dp+cplx_mesh_size-1) + indx_dp=indx_dp+cplx_mesh_size + end do + end do + end if + end if + end do ! iat + +!Free buffers + LIBPAW_DEALLOCATE(buf_int) + LIBPAW_DEALLOCATE(buf_int_all) + LIBPAW_DEALLOCATE(buf_dp) + LIBPAW_DEALLOCATE(buf_dp_all) + +!Destroy atom table + call free_my_atmtab(my_atmtab,my_atmtab_allocated) + +end subroutine paw_an_gather +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_an/paw_an_redistribute +!! NAME +!! paw_an_redistribute +!! +!! FUNCTION +!! Redistribute an array of paw_an datastructures +!! Input paw_an is given on a MPI communicator +!! Output paw_an is redistributed on another MPI communicator +!! +!! INPUTS +!! mpi_comm_in= input MPI (atom) communicator +!! mpi_comm_out= output MPI (atom) communicator +!! mpi_atmtab_in= --optional-- indexes of the input paw_an treated by current proc +!! if not present, will be calculated in the present routine +!! mpi_atmtab_out= --optional-- indexes of the output paw_an treated by current proc +!! if not present, will be calculated in the present routine +!! natom= --optional-- total number of atoms +!! ----- Optional arguments used only for asynchronous communications ----- +!! RecvAtomProc(:)= rank of processor from which I expect atom (in mpi_comm_in) +!! RecvAtomList(:)= indexes of atoms to be received by me +!! RecvAtomList(irecv) are the atoms I expect from RecvAtomProc(irecv) +!! SendAtomProc(:)= ranks of process destination of atom (in mpi_comm_in) +!! SendAtomList(:)= indexes of atoms to be sent by me +!! SendAtomList(isend) are the atoms sent to SendAtomProc(isend) +!! +!! OUTPUT +!! [paw_an_out(:)]= --optional-- +!! if present, the redistributed datastructure does not replace +!! the input one but is delivered in paw_an_out +!! if not present, input and output datastructure are the same. +!! +!! SIDE EFFECTS +!! paw_an(:)= input (and eventually output) paw_an datastructures +!! +!! SOURCE + +subroutine paw_an_redistribute(paw_an,mpi_comm_in,mpi_comm_out,& +& natom,mpi_atmtab_in,mpi_atmtab_out,paw_an_out,& +& SendAtomProc,SendAtomList,RecvAtomProc,RecvAtomList) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: mpi_comm_in,mpi_comm_out + integer,optional,intent(in) :: natom +!arrays + integer,intent(in),optional,target :: mpi_atmtab_in(:),mpi_atmtab_out(:) + type(paw_an_type),allocatable,intent(inout) :: paw_an(:) + type(paw_an_type),pointer,optional :: paw_an_out(:) !vz_i + integer,intent(in),optional :: SendAtomProc(:),SendAtomList(:),RecvAtomProc(:),RecvAtomList(:) + +!Local variables------------------------------- +!scalars + + integer :: algo_option,i1,iat_in,iat_out,iatom,ierr,iircv,iisend,imsg,imsg_current,imsg1 + integer :: iproc_rcv,iproc_send,ireq,me_exch,mpi_comm_exch,my_natom_in,my_natom_out,my_tag,natom_tot,nb_msg + integer :: nb_dp,nb_int,nbmsg_incoming,nbrecvmsg,nbsend,nbsendreq,nbsent,nbrecv,next,npaw_an_sent + integer :: nproc_in,nproc_out + logical :: flag,in_place,message_yet_prepared,my_atmtab_in_allocated,my_atmtab_out_allocated,paral_atom +!arrays + integer :: buf_size(3),request1(3) + integer,pointer :: my_atmtab_in(:),my_atmtab_out(:) + integer,allocatable :: atmtab_send(:),atm_indx_in(:),atm_indx_out(:),buf_int1(:),From(:),request(:) + integer,allocatable,target:: buf_int(:) + integer,pointer :: buf_ints(:) + logical, allocatable :: msg_pick(:) + real(dp),allocatable :: buf_dp1(:) + real(dp),allocatable,target :: buf_dp(:) + real(dp),pointer :: buf_dps(:) + type(coeffi1_type),target,allocatable :: tab_buf_int(:),tab_buf_atom(:) + type(coeff1_type),target,allocatable :: tab_buf_dp(:) + type(paw_an_type),allocatable :: paw_an_all(:) + type(paw_an_type),pointer :: paw_an_out1(:) + +! ************************************************************************* + +!@paw_an_type + + in_place=(.not.present(paw_an_out)) + my_natom_in=size(paw_an) + +!If not "in_place", destroy the output datastructure + if (.not.in_place) then + if (associated(paw_an_out)) then + call paw_an_free(paw_an_out) + LIBPAW_DATATYPE_DEALLOCATE(paw_an_out) + end if + end if + +!Special sequential case + if (mpi_comm_in==xmpi_comm_self.and.mpi_comm_out==xmpi_comm_self) then + if ((.not.in_place).and.(my_natom_in>0)) then + LIBPAW_DATATYPE_ALLOCATE(paw_an_out,(my_natom_in)) + call paw_an_nullify(paw_an_out) + call paw_an_copy(paw_an,paw_an_out) + end if + return + end if + +!Get total natom + if (present(natom)) then + natom_tot=natom + else + natom_tot=my_natom_in + call xmpi_sum(natom_tot,mpi_comm_in,ierr) + end if + +!Select input distribution + if (present(mpi_atmtab_in)) then + my_atmtab_in => mpi_atmtab_in + my_atmtab_in_allocated=.false. + else + call get_my_atmtab(mpi_comm_in,my_atmtab_in,my_atmtab_in_allocated,& +& paral_atom,natom_tot,my_natom_in) + end if + +!Select output distribution + if (present(mpi_atmtab_out)) then + my_natom_out=size(mpi_atmtab_out) + my_atmtab_out => mpi_atmtab_out + my_atmtab_out_allocated=.false. + else + call get_my_natom(mpi_comm_out,my_natom_out,natom_tot) + call get_my_atmtab(mpi_comm_out,my_atmtab_out,my_atmtab_out_allocated,& +& paral_atom,natom_tot) + end if + +!Select algo according to optional input arguments + algo_option=1 + if (present(SendAtomProc).and.present(SendAtomList).and.& +& present(RecvAtomProc).and.present(RecvAtomList)) algo_option=2 + + +!Brute force algorithm (allgather + scatter) +!--------------------------------------------------------- + if (algo_option==1) then + + LIBPAW_DATATYPE_ALLOCATE(paw_an_all,(natom_tot)) + call paw_an_nullify(paw_an_all) + call paw_an_copy(paw_an,paw_an_all,comm_atom=mpi_comm_in,mpi_atmtab=my_atmtab_in) + if (in_place) then + call paw_an_free(paw_an) + LIBPAW_DATATYPE_DEALLOCATE(paw_an) + LIBPAW_DATATYPE_ALLOCATE(paw_an,(my_natom_out)) + call paw_an_nullify(paw_an) + call paw_an_copy(paw_an_all,paw_an,comm_atom=mpi_comm_out,mpi_atmtab=my_atmtab_out) + else + LIBPAW_DATATYPE_ALLOCATE(paw_an_out,(my_natom_out)) + call paw_an_nullify(paw_an_out) + call paw_an_copy(paw_an_all,paw_an_out,comm_atom=mpi_comm_out,mpi_atmtab=my_atmtab_out) + end if + call paw_an_free(paw_an_all) + LIBPAW_DATATYPE_DEALLOCATE(paw_an_all) + + +!Asynchronous algorithm (asynchronous communications) +!--------------------------------------------------------- + else if (algo_option==2) then + + nbsend=size(SendAtomProc) ; nbrecv=size(RecvAtomProc) + + if (in_place) then + if (my_natom_out > 0) then + LIBPAW_DATATYPE_ALLOCATE(paw_an_out1,(my_natom_out)) + call paw_an_nullify(paw_an_out1) + else + LIBPAW_DATATYPE_ALLOCATE(paw_an_out1,(0)) + end if + else + LIBPAW_DATATYPE_ALLOCATE(paw_an_out,(my_natom_out)) + call paw_an_nullify(paw_an_out) + paw_an_out1=>paw_an_out + end if + + nproc_in=xmpi_comm_size(mpi_comm_in) + nproc_out=xmpi_comm_size(mpi_comm_out) + if (nproc_in<=nproc_out) mpi_comm_exch=mpi_comm_out + if (nproc_in>nproc_out) mpi_comm_exch=mpi_comm_in + me_exch=xmpi_comm_rank(mpi_comm_exch) + +! Dimension put to the maximum to send + LIBPAW_ALLOCATE(atmtab_send,(nbsend)) + LIBPAW_ALLOCATE(atm_indx_in,(natom_tot)) + atm_indx_in=-1 + do iatom=1,my_natom_in + atm_indx_in(my_atmtab_in(iatom))=iatom + end do + LIBPAW_ALLOCATE(atm_indx_out,(natom_tot)) + atm_indx_out=-1 + do iatom=1,my_natom_out + atm_indx_out(my_atmtab_out(iatom))=iatom + end do + + LIBPAW_DATATYPE_ALLOCATE(tab_buf_int,(nbsend)) + LIBPAW_DATATYPE_ALLOCATE(tab_buf_dp,(nbsend)) + LIBPAW_DATATYPE_ALLOCATE(tab_buf_atom,(nbsend)) + LIBPAW_ALLOCATE(request,(3*nbsend)) + +! A send buffer in an asynchrone communication couldn't be deallocate before it has been receive + nbsent=0 ; ireq=0 ; iisend=0 ; nbsendreq=0 ; nb_msg=0 + do iisend=1,nbsend + iproc_rcv=SendAtomProc(iisend) + next=-1 + if (iisend < nbsend) next=SendAtomProc(iisend+1) + if (iproc_rcv /= me_exch) then + nbsent=nbsent+1 + atmtab_send(nbsent)=SendAtomList(iisend) ! we groups the atoms sends to the same process + if (iproc_rcv /= next) then + if (nbsent > 0) then +! Check if message has been yet prepared + message_yet_prepared=.false. + do imsg=1,nb_msg + if (size(tab_buf_atom(imsg)%value) /= nbsent) then + cycle + else + do imsg1=1,nbsent + if (tab_buf_atom(imsg)%value(imsg1)/=atmtab_send(imsg1)) exit + message_yet_prepared=.true. + imsg_current=imsg + end do + end if + end do +! Create the message + if (.not.message_yet_prepared) then + nb_msg=nb_msg+1 + call paw_an_isendreceive_fillbuffer( & +& paw_an,atmtab_send,atm_indx_in,nbsent,buf_int,nb_int,buf_dp,nb_dp) + LIBPAW_ALLOCATE(tab_buf_int(nb_msg)%value,(nb_int)) + LIBPAW_ALLOCATE(tab_buf_dp(nb_msg)%value,(nb_dp)) + tab_buf_int(nb_msg)%value(1:nb_int)=buf_int(1:nb_int) + tab_buf_dp(nb_msg)%value(1:nb_dp)=buf_dp(1:nb_dp) + LIBPAW_DEALLOCATE(buf_int) + LIBPAW_DEALLOCATE(buf_dp) + LIBPAW_ALLOCATE(tab_buf_atom(nb_msg)%value, (nbsent)) + tab_buf_atom(nb_msg)%value(1:nbsent)=atmtab_send(1:nbsent) + imsg_current=nb_msg + end if +! Communicate + buf_size(1)=size(tab_buf_int(imsg_current)%value) + buf_size(2)=size(tab_buf_dp(imsg_current)%value) + buf_size(3)=nbsent + buf_ints=>tab_buf_int(imsg_current)%value + buf_dps=>tab_buf_dp(imsg_current)%value + my_tag=300 + ireq=ireq+1 + call xmpi_isend(buf_size,iproc_rcv,my_tag,mpi_comm_exch,request(ireq),ierr) + my_tag=301 + ireq=ireq+1 + call xmpi_isend(buf_ints,iproc_rcv,my_tag,mpi_comm_exch,request(ireq),ierr) + my_tag=302 + ireq=ireq+1 + call xmpi_isend(buf_dps,iproc_rcv,my_tag,mpi_comm_exch,request(ireq),ierr) + nbsendreq=ireq + nbsent=0 + end if + end if + else ! Just a renumbering, not a sending + iat_in=atm_indx_in(SendAtomList(iisend)) + iat_out=atm_indx_out(my_atmtab_in(iat_in)) + call paw_an_copy(paw_an(iat_in:iat_in),paw_an_out1(iat_out:iat_out)) + nbsent=0 + end if + end do + + LIBPAW_ALLOCATE(From,(nbrecv)) + From(:)=-1 ; nbrecvmsg=0 + do iircv=1,nbrecv + iproc_send=RecvAtomProc(iircv) !receive from ( RcvAtomProc is sorted by growing process ) + next=-1 + if (iircv < nbrecv) next=RecvAtomProc(iircv+1) + if (iproc_send /= me_exch .and. iproc_send/=next) then + nbrecvmsg=nbrecvmsg+1 + From(nbrecvmsg)=iproc_send + end if + end do + + LIBPAW_ALLOCATE(msg_pick,(nbrecvmsg)) + msg_pick=.false. + nbmsg_incoming=nbrecvmsg + do while (nbmsg_incoming > 0) + do i1=1,nbrecvmsg + if (.not.msg_pick(i1)) then + iproc_send=From(i1) + flag=.false. + my_tag=300 + call xmpi_iprobe(iproc_send,my_tag,mpi_comm_exch,flag,ierr) + if (flag) then + msg_pick(i1)=.true. + call xmpi_irecv(buf_size,iproc_send,my_tag,mpi_comm_exch,request1(1),ierr) + call xmpi_wait(request1(1),ierr) + nb_int=buf_size(1) + nb_dp=buf_size(2) + npaw_an_sent=buf_size(3) + LIBPAW_ALLOCATE(buf_int1,(nb_int)) + LIBPAW_ALLOCATE(buf_dp1 ,(nb_dp)) + my_tag=301 + call xmpi_irecv(buf_int1,iproc_send,my_tag,mpi_comm_exch,request1(2),ierr) + my_tag=302 + call xmpi_irecv(buf_dp1,iproc_send,my_tag,mpi_comm_exch,request1(3),ierr) + call xmpi_waitall(request1(2:3),ierr) + call paw_an_isendreceive_getbuffer(paw_an_out1,npaw_an_sent,atm_indx_out,buf_int1,buf_dp1) + nbmsg_incoming=nbmsg_incoming-1 + LIBPAW_DEALLOCATE(buf_int1) + LIBPAW_DEALLOCATE(buf_dp1) + end if + end if + end do + end do + LIBPAW_DEALLOCATE(msg_pick) + + if (in_place) then + call paw_an_free(paw_an) + LIBPAW_DATATYPE_DEALLOCATE(paw_an) + LIBPAW_DATATYPE_ALLOCATE(paw_an,(my_natom_out)) + call paw_an_nullify(paw_an) + call paw_an_copy(paw_an_out1,paw_an) + call paw_an_free(paw_an_out1) + LIBPAW_DATATYPE_DEALLOCATE(paw_an_out1) + end if + +! Wait for deallocating arrays that all sending operations has been realized + if (nbsendreq > 0) then + call xmpi_waitall(request(1:nbsendreq),ierr) + end if + +! Deallocate buffers + do i1=1,nb_msg + LIBPAW_DEALLOCATE(tab_buf_int(i1)%value) + LIBPAW_DEALLOCATE(tab_buf_dp(i1)%value) + LIBPAW_DEALLOCATE(tab_buf_atom(i1)%value) + end do + LIBPAW_DATATYPE_DEALLOCATE(tab_buf_int) + LIBPAW_DATATYPE_DEALLOCATE(tab_buf_dp) + LIBPAW_DATATYPE_DEALLOCATE(tab_buf_atom) + LIBPAW_DEALLOCATE(From) + LIBPAW_DEALLOCATE(request) + LIBPAW_DEALLOCATE(atmtab_send) + LIBPAW_DEALLOCATE(atm_indx_in) + LIBPAW_DEALLOCATE(atm_indx_out) + + end if !algo_option + +!Eventually release temporary pointers + call free_my_atmtab(my_atmtab_in,my_atmtab_in_allocated) + call free_my_atmtab(my_atmtab_out,my_atmtab_out_allocated) + +end subroutine paw_an_redistribute +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_an/paw_an_reset_flags +!! NAME +!! paw_an_reset_flags +!! +!! FUNCTION +!! Set all paw_an flags to 1 (force the recomputation of all arrays) +!! +!! SIDE EFFECTS +!! Paw_an=paw_an datastructure +!! +!! SOURCE + +subroutine paw_an_reset_flags(Paw_an) + +!Arguments ------------------------------------ +!arrays + type(Paw_an_type),intent(inout) :: Paw_an(:) + +!Local variables------------------------------- + integer :: iat,natom + +! ************************************************************************* + +!@Paw_an_type + + natom=SIZE(Paw_an);if (natom==0) return + do iat=1,natom + if (Paw_an(iat)%has_kxc >0) Paw_an(iat)%has_kxc =1 + if (Paw_an(iat)%has_k3xc >0) Paw_an(iat)%has_k3xc =1 + if (Paw_an(iat)%has_vhartree>0) Paw_an(iat)%has_vhartree=1 + if (Paw_an(iat)%has_vxc >0) Paw_an(iat)%has_vxc =1 + if (Paw_an(iat)%has_vxctau >0) Paw_an(iat)%has_vxctau =1 + if (Paw_an(iat)%has_vxcval >0) Paw_an(iat)%has_vxcval =1 + if (Paw_an(iat)%has_vxc_ex >0) Paw_an(iat)%has_vxc_ex =1 + end do + +end subroutine paw_an_reset_flags +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_an/paw_an_isendreceive_getbuffer +!! NAME +!! paw_an_isendreceive_getbuffer +!! +!! FUNCTION +!! Fill a paw_an structure with the buffers received in a receive operation +!! This buffer should have been first extracted by a call to paw_an_isendreceive_fillbuffer +!! +!! INPUTS +!! atm_indx_recv(1:total number of atoms)= array for receive operation +!! Given an index of atom in global numbering, give its index +!! in the table of atoms treated by current processor +!! or -1 if the atoms is not treated by current processor +!! buf_int= buffer of receive integers +!! buf_dp= buffer of receive double precision numbers +!! npaw_an_send= number of sent atoms +!! +!! OUTPUT +!! paw_an= output datastructure filled with buffers receive in a receive operation +!! +!! SOURCE + +subroutine paw_an_isendreceive_getbuffer(paw_an,npaw_an_send,atm_indx_recv,buf_int,buf_dp) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: npaw_an_send +!arrays + integer,intent(in) ::atm_indx_recv(:),buf_int(:) + real(dp),intent(in):: buf_dp(:) + type(paw_an_type),target,intent(inout) :: paw_an(:) + +!Local variables------------------------------- +!scalars + integer :: buf_int_size,buf_dp_size,cplx_mesh_size,has_lm_select,i1,i2 + integer :: iat,iatot,ij,indx_int,indx_dp,lm_size,nkxc1,nk3xc1,nspden,v_size + character(len=500) :: msg + type(paw_an_type),pointer :: paw_an1 +!arrays + +! ********************************************************************* + + buf_int_size=size(buf_int) + buf_dp_size=size(buf_dp) + indx_int=1; indx_dp=1 + + do ij=1,npaw_an_send + iatot=buf_int(indx_int); indx_int=indx_int+1 + iat= atm_indx_recv(iatot) + paw_an1=>paw_an(iat) + paw_an1%itypat=buf_int(indx_int); indx_int=indx_int+1 + paw_an1%nspden=buf_int(indx_int); indx_int=indx_int+1 + paw_an1%cplex=buf_int(indx_int); indx_int=indx_int+1 + paw_an1%mesh_size=buf_int(indx_int); indx_int=indx_int+1 + paw_an1%angl_size=buf_int(indx_int); indx_int=indx_int+1 + paw_an1%lm_size=buf_int(indx_int); indx_int=indx_int+1 + paw_an1%nkxc1=buf_int(indx_int); indx_int=indx_int+1 + paw_an1%nk3xc1=buf_int(indx_int); indx_int=indx_int+1 + paw_an1%has_vxc=buf_int(indx_int); indx_int=indx_int+1 + paw_an1%has_vxctau=buf_int(indx_int); indx_int=indx_int+1 + paw_an1%has_kxc=buf_int(indx_int); indx_int=indx_int+1 + paw_an1%has_k3xc=buf_int(indx_int); indx_int=indx_int+1 + paw_an1%has_vxcval=buf_int(indx_int); indx_int=indx_int+1 + paw_an1%has_vxc_ex=buf_int(indx_int); indx_int=indx_int+1 + paw_an1%has_vhartree=buf_int(indx_int); indx_int=indx_int+1 + v_size=buf_int(indx_int); indx_int=indx_int+1 + has_lm_select=buf_int(indx_int); indx_int=indx_int+1 + nspden=paw_an1%nspden + lm_size=paw_an1%lm_size + nkxc1=paw_an1%nkxc1 + nk3xc1=paw_an1%nk3xc1 + cplx_mesh_size=paw_an1%cplex*paw_an1%mesh_size + if (has_lm_select==1) then + LIBPAW_ALLOCATE(paw_an1%lmselect,(lm_size)) + if (lm_size>0) then + do i1=1,lm_size + if (buf_int(indx_int)==1) then + paw_an1%lmselect(i1)=.TRUE.;indx_int=indx_int+1 + else + paw_an1%lmselect(i1)=.FALSE.;indx_int=indx_int+1 + end if + end do + end if + end if + if (paw_an1%has_vxc>0) then + LIBPAW_ALLOCATE(paw_an1%vxc1,(cplx_mesh_size,v_size,nspden)) + LIBPAW_ALLOCATE(paw_an1%vxct1,(cplx_mesh_size,v_size,nspden)) + if (paw_an1%has_vxc==2) then + do i1=1,nspden + do i2=1,v_size + paw_an1%vxc1(:,i2,i1)=buf_dp(indx_dp:indx_dp+cplx_mesh_size-1) + indx_dp=indx_dp+cplx_mesh_size + end do + end do + do i1=1,nspden + do i2=1,v_size + paw_an1%vxct1(:,i2,i1)=buf_dp(indx_dp:indx_dp+cplx_mesh_size-1) + indx_dp=indx_dp+cplx_mesh_size + end do + end do + end if + end if + if (paw_an1%has_vxctau>0) then + LIBPAW_ALLOCATE(paw_an1%vxctau1,(cplx_mesh_size,v_size,nspden)) + LIBPAW_ALLOCATE(paw_an1%vxcttau1,(cplx_mesh_size,v_size,nspden)) + if (paw_an1%has_vxctau==2) then + do i1=1,nspden + do i2=1,v_size + paw_an1%vxctau1(:,i2,i1)=buf_dp(indx_dp:indx_dp+cplx_mesh_size-1) + indx_dp=indx_dp+cplx_mesh_size + end do + end do + do i1=1,nspden + do i2=1,v_size + paw_an1%vxcttau1(:,i2,i1)=buf_dp(indx_dp:indx_dp+cplx_mesh_size-1) + indx_dp=indx_dp+cplx_mesh_size + end do + end do + end if + end if + if (paw_an1%has_kxc>0) then + LIBPAW_ALLOCATE(paw_an1%kxc1,(cplx_mesh_size,v_size,nkxc1)) + LIBPAW_ALLOCATE(paw_an1%kxct1,(cplx_mesh_size,v_size,nkxc1)) + if (paw_an1%has_kxc==2.and.nkxc1>0) then + do i1=1,nkxc1 + do i2=1,v_size + paw_an1%kxc1(:,i2,i1)=buf_dp(indx_dp:indx_dp+cplx_mesh_size-1) + indx_dp=indx_dp+cplx_mesh_size + end do + end do + do i1=1,nkxc1 + do i2=1,v_size + paw_an1%kxct1(:,i2,i1)=buf_dp(indx_dp:indx_dp+cplx_mesh_size-1) + indx_dp=indx_dp+cplx_mesh_size + end do + end do + end if + end if + if (paw_an1%has_k3xc>0) then + LIBPAW_ALLOCATE(paw_an1%k3xc1,(cplx_mesh_size,v_size,nk3xc1)) + LIBPAW_ALLOCATE(paw_an1%k3xct1,(cplx_mesh_size,v_size,nk3xc1)) + if (paw_an1%has_k3xc==2.and.nk3xc1>0) then + do i1=1,nk3xc1 + do i2=1,v_size + paw_an1%k3xc1(:,i2,i1)=buf_dp(indx_dp:indx_dp+cplx_mesh_size-1) + indx_dp=indx_dp+cplx_mesh_size + end do + end do + do i1=1,nk3xc1 + do i2=1,v_size + paw_an1%k3xct1(:,i2,i1)=buf_dp(indx_dp:indx_dp+cplx_mesh_size-1) + indx_dp=indx_dp+cplx_mesh_size + end do + end do + end if + end if + if (paw_an1%has_vxcval>0) then + LIBPAW_ALLOCATE(paw_an1%vxc1_val,(cplx_mesh_size,v_size,nspden)) + LIBPAW_ALLOCATE(paw_an1%vxct1_val,(cplx_mesh_size,v_size,nspden)) + if (paw_an1%has_vxcval==2) then + do i1=1,nspden + do i2=1,v_size + paw_an1%vxc1_val(:,i2,i1)=buf_dp(indx_dp:indx_dp+cplx_mesh_size-1) + indx_dp=indx_dp+cplx_mesh_size + end do + end do + do i1=1,nspden + do i2=1,v_size + paw_an1%vxct1_val(:,i2,i1)=buf_dp(indx_dp:indx_dp+cplx_mesh_size-1) + indx_dp=indx_dp+cplx_mesh_size + end do + end do + end if + end if + if (paw_an1%has_vxc_ex>0) then + LIBPAW_ALLOCATE(paw_an1%vxc_ex,(cplx_mesh_size,v_size,nspden)) + if (paw_an1%has_vxc_ex==2) then + do i1=1,nspden + do i2=1,v_size + paw_an1%vxc_ex(:,i2,i1)=buf_dp(indx_dp:indx_dp+cplx_mesh_size-1) + indx_dp=indx_dp+cplx_mesh_size + end do + end do + end if + end if + if (paw_an1%has_vhartree>0) then + LIBPAW_ALLOCATE(paw_an1%vh1,(cplx_mesh_size,lm_size,nspden)) + LIBPAW_ALLOCATE(paw_an1%vht1,(cplx_mesh_size,lm_size,nspden)) + if (paw_an1%has_vhartree==2) then + do i1=1,nspden + do i2=1,lm_size + paw_an1%vh1(:,i2,i1)=buf_dp(indx_dp:indx_dp+cplx_mesh_size-1) + indx_dp=indx_dp+cplx_mesh_size + end do + end do + do i1=1,nspden + do i2=1,lm_size + paw_an1%vht1(:,i2,i1)=buf_dp(indx_dp:indx_dp+cplx_mesh_size-1) + indx_dp=indx_dp+cplx_mesh_size + end do + end do + end if + end if + end do ! iat + if ((indx_int/=1+buf_int_size).or.(indx_dp/=1+buf_dp_size)) then + write(msg,'(a,i10,a,i10)') 'Wrong buffer sizes: buf_int_size=',buf_int_size,' buf_dp_size=',buf_dp_size + LIBPAW_BUG(msg) + end if + +end subroutine paw_an_isendreceive_getbuffer +!!*** + +!---------------------------------------------------------------------- + + +!!****f* m_paw_an/paw_an_isendreceive_fillbuffer +!! NAME +!! paw_an_isendreceive_fillbuffer +!! +!! FUNCTION +!! Extract from paw_an and from the global index of atoms +!! the buffers to send in a sending operation +!! This function has to be coupled with a call to paw_ij_isendreceive_getbuffer +!! INPUTS +!! atm_indx_send(1:total number of atoms)= array for send operation, +!! Given an index of atom in global numbering, give its index +!! in the table of atoms treated by current processor +!! or -1 if the atoms is not treated by current processor +!! npaw_an_send= number of sent atoms +!! paw_an= data structure from which are extract buffer int and buffer dp +!! +!! OUTPUT +!! buf_int : buffer of integers to be send in a send operation +!! buf_int_size : size of buffer of integers to be send in a send operation +!! buf_dp : buffer of double precision numbers to be send in a send operation +!! buf_dp_size : size of buffer of double precision numbers to be send in a send operation +!! +!! SOURCE + +subroutine paw_an_isendreceive_fillbuffer(paw_an, atmtab_send,atm_indx_send,npaw_an_send,& +& buf_int,buf_int_size,buf_dp,buf_dp_size) + +!Arguments ------------------------------------ +!scalars + integer,intent(out) :: buf_int_size,buf_dp_size + integer,intent(in) :: npaw_an_send +!arrays + integer,intent(in) :: atmtab_send(:),atm_indx_send(:) + integer,allocatable,intent(out) :: buf_int(:) + real(dp),allocatable,intent(out):: buf_dp(:) + type(paw_an_type),target,intent(in) :: paw_an(:) + +!Local variables------------------------------- +!scalars + integer :: cplx_mesh_size,i1,i2,iatom_tot,ij,indx_int,indx_dp + integer :: ipaw_an_send,lm_size,nspden,v_size + character(len=500) :: msg + type(Paw_an_type),pointer :: paw_an1 +!arrays + +! ********************************************************************* + +!Compute sizes of buffers + buf_int_size=0 ; buf_dp_size=0 + do ipaw_an_send=1,npaw_an_send + iatom_tot=atmtab_send(ipaw_an_send) + ij = atm_indx_send(iatom_tot) + paw_an1=>paw_an(ij) + buf_int_size=buf_int_size+18+size(paw_an1%lmselect) + if (paw_an1%has_vxc==2) then + buf_dp_size=buf_dp_size+size(paw_an1%vxc1) + buf_dp_size=buf_dp_size+size(paw_an1%vxct1) + end if + if (paw_an1%has_vxctau==2) then + buf_dp_size=buf_dp_size+size(paw_an1%vxctau1) + buf_dp_size=buf_dp_size+size(paw_an1%vxcttau1) + end if + if (paw_an1%has_kxc==2) then + buf_dp_size=buf_dp_size+size(paw_an1%kxc1) + buf_dp_size=buf_dp_size+size(paw_an1%kxct1) + end if + if (paw_an1%has_k3xc==2) then + buf_dp_size=buf_dp_size+size(paw_an1%k3xc1) + buf_dp_size=buf_dp_size+size(paw_an1%k3xct1) + end if + if (paw_an1%has_vxcval==2) then + buf_dp_size=buf_dp_size+size(paw_an1%vxc1_val) + buf_dp_size=buf_dp_size+size(paw_an1%vxct1_val) + end if + if (paw_an1%has_vxc_ex==2) then + buf_dp_size=buf_dp_size+size(paw_an1%vxc_ex) + end if + if (paw_an1%has_vhartree==2) then + buf_dp_size=buf_dp_size+size(paw_an1%vh1) + buf_dp_size=buf_dp_size+size(paw_an1%vht1) + end if + end do + +!Fill in input buffers + LIBPAW_ALLOCATE(buf_int,(buf_int_size)) + LIBPAW_ALLOCATE(buf_dp ,(buf_dp_size)) + indx_int=1;indx_dp=1 + do ipaw_an_send=1,npaw_an_send + iatom_tot=atmtab_send(ipaw_an_send) + ij = atm_indx_send(iatom_tot) + paw_an1=>paw_an(ij) + buf_int(indx_int)=iatom_tot; indx_int=indx_int+1 + buf_int(indx_int)=paw_an1%itypat; indx_int=indx_int+1 + buf_int(indx_int)=paw_an1%nspden; indx_int=indx_int+1 + buf_int(indx_int)=paw_an1%cplex; indx_int=indx_int+1 + buf_int(indx_int)=paw_an1%mesh_size; indx_int=indx_int+1 + buf_int(indx_int)=paw_an1%angl_size; indx_int=indx_int+1 + buf_int(indx_int)=paw_an1%lm_size; indx_int=indx_int+1 + buf_int(indx_int)=paw_an1%nkxc1; indx_int=indx_int+1 + buf_int(indx_int)=paw_an1%nk3xc1; indx_int=indx_int+1 + buf_int(indx_int)=paw_an1%has_vxc; indx_int=indx_int+1 + buf_int(indx_int)=paw_an1%has_vxctau; indx_int=indx_int+1 + buf_int(indx_int)=paw_an1%has_kxc; indx_int=indx_int+1 + buf_int(indx_int)=paw_an1%has_k3xc; indx_int=indx_int+1 + buf_int(indx_int)=paw_an1%has_vxcval; indx_int=indx_int+1 + buf_int(indx_int)=paw_an1%has_vxc_ex; indx_int=indx_int+1 + buf_int(indx_int)=paw_an1%has_vhartree; indx_int=indx_int+1 + v_size=0 + if (paw_an1%has_vxc>0) then + v_size=size(paw_an1%vxc1,2) + else if (paw_an1%has_vxctau>0) then + v_size=size(paw_an1%vxctau1,2) + else if (paw_an1%has_kxc>0) then + v_size=size(paw_an1%kxc1,2) + else if (paw_an1%has_k3xc>0) then + v_size=size(paw_an1%k3xc1,2) + else if (paw_an1%has_vxcval>0) then + v_size=size(paw_an1%vxc1_val,2) + else if (paw_an1%has_vxc_ex>0) then + v_size=size(paw_an1%vxc_ex,2) + else if (paw_an1%has_vhartree>0) then + v_size=size(paw_an1%vh1,2) + end if + buf_int(indx_int)=v_size;indx_int=indx_int+1 + if (allocated(paw_an1%lmselect)) then + buf_int(indx_int)=1;indx_int=indx_int+1 + else + buf_int(indx_int)=0;indx_int=indx_int+1 + end if + nspden=paw_an1%nspden + lm_size=paw_an1%lm_size + cplx_mesh_size=paw_an1%cplex*paw_an1%mesh_size + if (lm_size>0) then + if (allocated(paw_an1%lmselect)) then + do i1=1,lm_size + if (paw_an1%lmselect(i1)) then + buf_int(indx_int)=1 + else + buf_int(indx_int)=0 + end if + indx_int=indx_int+1 + end do + end if + end if + if (paw_an1%has_vxc==2) then + do i1=1,nspden + do i2=1,v_size + buf_dp(indx_dp:indx_dp+cplx_mesh_size-1)=paw_an1%vxc1(:,i2,i1) + indx_dp=indx_dp+cplx_mesh_size + end do + end do + do i1=1,nspden + do i2=1,v_size + buf_dp(indx_dp:indx_dp+cplx_mesh_size-1)=paw_an1%vxct1(:,i2,i1) + indx_dp=indx_dp+cplx_mesh_size + end do + end do + end if + if (paw_an1%has_vxctau==2) then + do i1=1,nspden + do i2=1,v_size + buf_dp(indx_dp:indx_dp+cplx_mesh_size-1)=paw_an1%vxctau1(:,i2,i1) + indx_dp=indx_dp+cplx_mesh_size + end do + end do + do i1=1,nspden + do i2=1,v_size + buf_dp(indx_dp:indx_dp+cplx_mesh_size-1)=paw_an1%vxcttau1(:,i2,i1) + indx_dp=indx_dp+cplx_mesh_size + end do + end do + end if + if (paw_an1%has_kxc==2.and.paw_an1%nkxc1>0) then + do i1=1,paw_an1%nkxc1 + do i2=1,v_size + buf_dp(indx_dp:indx_dp+cplx_mesh_size-1)=paw_an1%kxc1(:,i2,i1) + indx_dp=indx_dp+cplx_mesh_size + end do + end do + do i1=1,paw_an1%nkxc1 + do i2=1,v_size + buf_dp(indx_dp:indx_dp+cplx_mesh_size-1)=paw_an1%kxct1(:,i2,i1) + indx_dp=indx_dp+cplx_mesh_size + end do + end do + end if + if (paw_an1%has_k3xc==2.and.paw_an1%nk3xc1>0) then + do i1=1,paw_an1%nk3xc1 + do i2=1,v_size + buf_dp(indx_dp:indx_dp+cplx_mesh_size-1)=paw_an1%k3xc1(:,i2,i1) + indx_dp=indx_dp+cplx_mesh_size + end do + end do + do i1=1,paw_an1%nk3xc1 + do i2=1,v_size + buf_dp(indx_dp:indx_dp+cplx_mesh_size-1)=paw_an1%k3xct1(:,i2,i1) + indx_dp=indx_dp+cplx_mesh_size + end do + end do + end if + if (paw_an1%has_vxcval==2) then + do i1=1,nspden + do i2=1,v_size + buf_dp(indx_dp:indx_dp+cplx_mesh_size-1)=paw_an1%vxc1_val(:,i2,i1) + indx_dp=indx_dp+cplx_mesh_size + end do + end do + do i1=1,nspden + do i2=1,v_size + buf_dp(indx_dp:indx_dp+cplx_mesh_size-1)=paw_an1%vxct1_val(:,i2,i1) + indx_dp=indx_dp+cplx_mesh_size + end do + end do + end if + if (paw_an1%has_vxc_ex==2) then + do i1=1,nspden + do i2=1,v_size + buf_dp(indx_dp:indx_dp+cplx_mesh_size-1)=paw_an1%vxc_ex(:,i2,i1) + indx_dp=indx_dp+cplx_mesh_size + end do + end do + end if + if (paw_an1%has_vhartree==2) then + do i1=1,nspden + do i2=1,lm_size + buf_dp(indx_dp:indx_dp+cplx_mesh_size-1)=paw_an1%vh1(:,i2,i1) + indx_dp=indx_dp+cplx_mesh_size + end do + end do + do i1=1,nspden + do i2=1,lm_size + buf_dp(indx_dp:indx_dp+cplx_mesh_size-1)=paw_an1%vht1(:,i2,i1) + indx_dp=indx_dp+cplx_mesh_size + end do + end do + end if + end do + if ((indx_int-1/=buf_int_size).or.(indx_dp-1/=buf_dp_size)) then + write(msg,'(4(a,i10))') 'Wrong buffer sizes: buf_int =',buf_int_size,'/',indx_int-1,& + & ' buf_dp =',buf_dp_size ,'/',indx_dp-1 + LIBPAW_BUG(msg) + end if + +end subroutine paw_an_isendreceive_fillbuffer +!!*** + +!---------------------------------------------------------------------- + +END MODULE m_paw_an +!!*** diff --git a/GX-PAW/libpaw/src/m_paw_an.o b/GX-PAW/libpaw/src/m_paw_an.o new file mode 100644 index 00000000..eb25dad9 Binary files /dev/null and b/GX-PAW/libpaw/src/m_paw_an.o differ diff --git a/GX-PAW/libpaw/src/m_paw_atom.F90 b/GX-PAW/libpaw/src/m_paw_atom.F90 new file mode 100644 index 00000000..c4af117e --- /dev/null +++ b/GX-PAW/libpaw/src/m_paw_atom.F90 @@ -0,0 +1,668 @@ +!!****m* ABINIT/m_paw_atom +!! NAME +!! m_paw_atom +!! +!! FUNCTION +!! atompaw related operations +!! +!! COPYRIGHT +!! Copyright (C) 2012-2024 ABINIT group (T. Rangel, MT, JWZ, GJ) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! NOTES +!! FOR DEVELOPPERS: in order to preserve the portability of libPAW library, +!! please consult ~abinit/src/??_libpaw/libpaw-coding-rules.txt +!! +!! SOURCE + +#include "libpaw.h" + +module m_paw_atom + + USE_DEFS + USE_MSG_HANDLING + USE_MEMORY_PROFILING + + use m_paw_numeric, only : paw_jbessel, paw_solvbes, paw_spline, paw_splint + use m_pawrad, only : pawrad_type, simp_gen, poisson, pawrad_deducer0, bound_deriv, pawrad_ifromr + use m_pawtab, only : pawtab_type + + implicit none + + private + + public:: atompaw_shpfun + public:: atompaw_shapebes + public:: atompaw_vhnzc + public:: atompaw_dij0 + public:: atompaw_kij +!!*** + +CONTAINS !=========================================================== +!!*** + +!!****f* m_paw_atom/atompaw_shpfun +!! NAME +!! atompaw_shpfun +!! +!! FUNCTION +!! Compute shape function used in the definition +!! of compensation density (PAW) +!! +!! INPUTS +!! ll= l quantum number +!! mesh =data containing radial grid information +!! pawtab =paw tabulated starting data +!! +!! OUTPUT +!! norm= factor for shape function normalization +!! +!! SIDE effects +!! shapefunc(:)=shape function g(r) +!! In case of numerical shape function (shape_type=-1), shapefunc +!! array contains the shape function read in psp file at input. +!! +!! NOTES +!! Types of shape functions: +!! type -1: numerical shape function, given in psp file +!! type 1: g(r)=k(r).r^l; k(r)=exp(-(r/sigma)^lambda) +!! type 2: g(r)=k(r).r^l; k(r)=[sin(Pi.r/rshp)/(Pi.r/rshp)]^2 +!! type 3: g(r)=alpha1.jl(q1.r)+alpha2.jl(q2.r) +!! +!! SOURCE + +subroutine atompaw_shpfun(ll,mesh,norm,pawtab,shapefunc) + +!Arguments --------------------------------------------- +!scalars + integer,intent(in) :: ll + real(dp),intent(out) :: norm + type(pawrad_type),intent(in) :: mesh + type(pawtab_type),intent(in) :: pawtab +!arrays + real(dp),intent(inout) :: shapefunc(:) + +!Local variables ------------------------------ +!scalars + integer :: ir,ishp,mesh_size + real(dp) :: arg,besp,bespp,jbes1,jbes2 +!arrays + real(dp) :: alpha(2),qq(2) + real(dp),allocatable :: r2k(:) +!no_abirules + +!*************************************************************************** + + mesh_size=size(shapefunc) + if (mesh_size>mesh%mesh_size) then + LIBPAW_BUG('wrong size!') + end if + +!Index for shape function cut-off radius + ishp=pawrad_ifromr(mesh,pawtab%rshp)-1 + +!Computation of non-normalized shape function + if (pawtab%shape_type==-1) then + shapefunc(1:ishp)=pawtab%shapefunc(1:ishp,1+ll) + else if (pawtab%shape_type==1) then + if (ll==0) then + shapefunc(1)=one + do ir=2,ishp + shapefunc(ir)=exp(-(mesh%rad(ir)/pawtab%shape_sigma)**pawtab%shape_lambda) + end do + else + shapefunc(1)=zero + do ir=2,ishp + shapefunc(ir)=exp(-(mesh%rad(ir)/pawtab%shape_sigma)**pawtab%shape_lambda)*mesh%rad(ir)**ll + end do + end if + else if (pawtab%shape_type==2) then + if (ll==0) then + shapefunc(1)=one + do ir=2,ishp + arg=pi*mesh%rad(ir)/pawtab%rshp + shapefunc(ir)=(sin(arg)/arg)**2 + end do + else + shapefunc(1)=zero + do ir=2,ishp + arg=pi*mesh%rad(ir)/pawtab%rshp + shapefunc(ir)=(sin(arg)/(arg))**2 *mesh%rad(ir)**ll + end do + end if + else if (pawtab%shape_type==3) then + alpha(1:2)=pawtab%shape_alpha(1:2,1+ll) + qq(1:2)=pawtab%shape_q(1:2,1+ll) + do ir=1,ishp + call paw_jbessel(jbes1,besp,bespp,ll,0,qq(1)*mesh%rad(ir)) + call paw_jbessel(jbes2,besp,bespp,ll,0,qq(2)*mesh%rad(ir)) + shapefunc(ir)=alpha(1)*jbes1+alpha(2)*jbes2 + end do + end if + + if (ishp=radial mesh (and related data) for the core densities +!! znucl= valence and total charge of the atomic species +!! +!! OUTPUT +!! vhnzc(:)=Hartree potential due to Z_nc +!! +!! SOURCE + + subroutine atompaw_vhnzc(ncore,radmesh_core,vhnzc,znucl) + +!Arguments --------------------------------------------- +!scalars + real(dp),intent(in) :: znucl + type(pawrad_type),intent(in) :: radmesh_core +!arrays + real(dp),intent(in) :: ncore(:) + real(dp), intent(out) :: vhnzc(:) + +!Local variables --------------------------------------- + integer :: mesh_size + real(dp),allocatable :: nwk(:) + +! ********************************************************************* + + mesh_size=size(ncore) + if (mesh_size/=size(vhnzc).or.mesh_size>radmesh_core%mesh_size) then + LIBPAW_BUG('wrong sizes!') + end if + + LIBPAW_ALLOCATE(nwk,(mesh_size)) + + nwk(:)=ncore(:)*four_pi*radmesh_core%rad(:)**2 + call poisson(nwk,0,radmesh_core,vhnzc) + vhnzc(2:mesh_size)=(vhnzc(2:mesh_size)-znucl)/radmesh_core%rad(2:mesh_size) + call pawrad_deducer0(vhnzc,mesh_size,radmesh_core) + + LIBPAW_DEALLOCATE(nwk) + + end subroutine atompaw_vhnzc +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_atom/atompaw_dij0 +!! NAME +!! atompaw_dij0 +!! +!! FUNCTION +!! PAW: Compute "frozen" values of pseudopotential strengths Dij = Dij0 +!! +!! INPUTS +!! indlmn(6,lmnmax)= array giving l,m,n,lm,ln,s for i=lmn +!! kij(pawtab%lmn2_size)= kinetic part of Dij +!! lmnmax=max number of (l,m,n) components over all type of psps +!! ncore(:)=atomic core density +!! opt_init=flag defining the storage of PAW atomic data +!! 0: PAW atomic data have not been initialized (in pawtab) +!! 1: PAW atomic data have been initialized (in pawtab) +!! pawtab =paw tabulated starting data +!! radmesh =paw radial mesh (and related data) +!! radmesh_core =radial mesh (and related data) for the core densities +!! radmesh_vloc =radial mesh (and related data) for the local potential (VH(tnZc)) +!! vhtnzc(:)= local potential VH(tnZc) +!! znucl= valence and total charge of the atomic species +!! +!! OUTPUT +!! pawtab%dij0(pawtab%lmn2_size)= Frozen part of the Dij term +!! +!! SOURCE + + + subroutine atompaw_dij0(indlmn,kij,lmnmax,ncore,opt_init,pawtab,& +& radmesh,radmesh_core,radmesh_vloc,vhtnzc,znucl) + +!Arguments --------------------------------------------- +!scalars + integer,intent(in) :: lmnmax,opt_init + real(dp),intent(in) :: znucl + type(pawrad_type),intent(in) :: radmesh,radmesh_core,radmesh_vloc + type(pawtab_type),intent(inout) :: pawtab +!arrays + integer,intent(in) :: indlmn(6,lmnmax) + real(dp),intent(in) :: kij(pawtab%lmn2_size) + real(dp),intent(in) :: ncore(:),vhtnzc(:) +!real(dp),optional,intent(in) :: vminushalf(:) + +!Local variables --------------------------------------- + integer :: il,ilm,iln,ilmn,j0lmn,jl,jlm,jln,jlmn,klmn,lmn2_size,meshsz,meshsz_core + integer :: meshsz_vhtnzc,meshsz_vmh + real(dp) :: intg,intvh,yp1,ypn + real(dp),allocatable :: ff(:),r2k(:),shpf(:),vhnzc(:),vhtnzc_sph(:),work1(:),work2(:) + +! ********************************************************************* + + lmn2_size=pawtab%lmn2_size + meshsz_vhtnzc=size(vhtnzc) + meshsz=min(radmesh%mesh_size,radmesh_core%mesh_size,radmesh_vloc%mesh_size,meshsz_vhtnzc) + LIBPAW_ALLOCATE(ff,(meshsz)) + +!Retrieve VH(tnZc) on the correct radial mesh + LIBPAW_ALLOCATE(vhtnzc_sph,(meshsz)) + if ((radmesh%mesh_type/=radmesh_vloc%mesh_type).or.& +& (radmesh%rstep /=radmesh_vloc%rstep) .or.& +& (radmesh%lstep /=radmesh_vloc%lstep)) then + call bound_deriv(vhtnzc,radmesh_vloc,meshsz_vhtnzc,yp1,ypn) + LIBPAW_ALLOCATE(work1,(meshsz_vhtnzc)) + LIBPAW_ALLOCATE(work2,(meshsz_vhtnzc)) + call paw_spline(radmesh_vloc%rad,vhtnzc,meshsz_vhtnzc,yp1,ypn,work1) + call paw_splint(meshsz_vhtnzc,radmesh_vloc%rad,vhtnzc,work1,meshsz,radmesh%rad(1:meshsz),vhtnzc_sph) + LIBPAW_DEALLOCATE(work1) + LIBPAW_DEALLOCATE(work2) + else + vhtnzc_sph(1:meshsz)=vhtnzc(1:meshsz) + end if + +!Kinetic part of Dij0 +!==================== + pawtab%dij0(1:lmn2_size)=kij(1:lmn2_size) + +!Computation of on the PAW sphere +!====================================================== + meshsz_core=size(ncore) + LIBPAW_ALLOCATE(vhnzc,(meshsz_core)) + call atompaw_vhnzc(ncore,radmesh_core,vhnzc,znucl) + do jlmn=1,pawtab%lmn_size + j0lmn=jlmn*(jlmn-1)/2 + jlm=indlmn(4,jlmn);jln=indlmn(5,jlmn) + do ilmn=1,jlmn + klmn=j0lmn+ilmn + ilm=indlmn(4,ilmn);iln=indlmn(5,ilmn) + if (jlm==ilm) then + ff(1:meshsz)=pawtab%phi(1:meshsz,iln)*pawtab%phi(1:meshsz,jln)*vhnzc(1:meshsz) + call simp_gen(intg,ff,radmesh) + pawtab%dij0(klmn)=pawtab%dij0(klmn)+intg + end if + end do + end do + LIBPAW_DEALLOCATE(vhnzc) + +!Computation of - on the PAW sphere +!========================================================== + do jlmn=1,pawtab%lmn_size + j0lmn=jlmn*(jlmn-1)/2 + jlm=indlmn(4,jlmn);jln=indlmn(5,jlmn) + do ilmn=1,jlmn + klmn=j0lmn+ilmn + ilm=indlmn(4,ilmn);iln=indlmn(5,ilmn) + if (jlm==ilm) then + ff(1:meshsz)=pawtab%tphi(1:meshsz,iln)*pawtab%tphi(1:meshsz,jln)*vhtnzc_sph(1:meshsz) + call simp_gen(intg,ff,radmesh) + pawtab%dij0(klmn)=pawtab%dij0(klmn)-intg + end if + end do + end do + +!Computation of (if any) +!================================================= + if(pawtab%has_vminushalf==1) then + if(size(pawtab%vminushalf)>=1) then + meshsz_vmh=min(meshsz,size(pawtab%vminushalf)) + do jlmn=1,pawtab%lmn_size + j0lmn=jlmn*(jlmn-1)/2 + jlm=indlmn(4,jlmn);jln=indlmn(5,jlmn) + do ilmn=1,jlmn + klmn=j0lmn+ilmn + ilm=indlmn(4,ilmn);iln=indlmn(5,ilmn) + if (jlm==ilm) then + ff(1:meshsz_vmh)=pawtab%phi(1:meshsz_vmh,iln)*pawtab%phi(1:meshsz_vmh,jln)*pawtab%vminushalf(1:meshsz_vmh) + call simp_gen(intg,ff(1:meshsz_vmh),radmesh) + pawtab%dij0(klmn)=pawtab%dij0(klmn)+intg + end if + end do + end do + end if + end if + +!Computation of -int[vh(tnzc)*Qijhat(r)dr] +!========================================= + if (opt_init==0) then + LIBPAW_ALLOCATE(shpf,(radmesh%mesh_size)) + call atompaw_shpfun(0,radmesh,intg,pawtab,shpf) + if (pawtab%shape_type==3) then + LIBPAW_ALLOCATE(r2k,(radmesh%int_meshsz)) + r2k=zero + r2k(2:radmesh%int_meshsz)=shpf(2:radmesh%int_meshsz)*radmesh%rad(2:radmesh%int_meshsz)**2 + if(radmesh%mesh_type==5) then + call simp_gen(intg,r2k,radmesh) + else + call simp_gen(intg,r2k,radmesh,r_for_intg=pawtab%rshp) + end if + shpf(1:meshsz)=shpf(1:meshsz)/intg + LIBPAW_DEALLOCATE(r2k) + end if + ff(1:meshsz)=vhtnzc_sph(1:meshsz)*shpf(1:meshsz)*radmesh%rad(1:meshsz)**2 + LIBPAW_DEALLOCATE(shpf) + call simp_gen(intvh,ff,radmesh) + do jlmn=1,pawtab%lmn_size + j0lmn=jlmn*(jlmn-1)/2 + jl=indlmn(1,jlmn);jln=indlmn(5,jlmn);jlm=indlmn(4,jlmn) + do ilmn=1,jlmn + klmn=j0lmn+ilmn + il=indlmn(1,ilmn);iln=indlmn(5,ilmn);ilm=indlmn(4,ilmn) + if (ilm==jlm) then + ff(1:meshsz)=(pawtab%phi (1:meshsz,iln)*pawtab%phi (1:meshsz,jln)& +& -pawtab%tphi(1:meshsz,iln)*pawtab%tphi(1:meshsz,jln)) + call simp_gen(intg,ff,radmesh) + pawtab%dij0(klmn)=pawtab%dij0(klmn)-intvh*intg + end if + end do + end do + else + ff(1:meshsz)=vhtnzc_sph(1:meshsz)*pawtab%shapefunc(1:meshsz,1)*radmesh%rad(1:meshsz)**2 + call simp_gen(intvh,ff,radmesh) + do jlmn=1,pawtab%lmn_size + j0lmn=jlmn*(jlmn-1)/2 + jl=indlmn(1,jlmn);jln=indlmn(5,jlmn);jlm=indlmn(4,jlmn) + do ilmn=1,jlmn + klmn=j0lmn+ilmn + il=indlmn(1,ilmn);iln=indlmn(5,ilmn);ilm=indlmn(4,ilmn) + if (ilm==jlm) then + intg=pawtab%qijl(1,klmn)*sqrt(four_pi) + pawtab%dij0(klmn)=pawtab%dij0(klmn)-intvh*intg + end if + end do + end do + end if + + LIBPAW_DEALLOCATE(ff) + LIBPAW_DEALLOCATE(vhtnzc_sph) + + end subroutine atompaw_dij0 +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_atom/atompaw_kij +!! NAME +!! atompaw_kij +!! +!! FUNCTION +!! PAW: deduce kinetic part of psp strength (Dij) from the knowledge of frozen Dij (Dij0) +!! +!! INPUTS +!! indlmn(6,lmnmax)= array giving l,m,n,lm,ln,s for i=lmn +!! lmnmax=max number of (l,m,n) components over all type of psps +!! ncore(:)=atomic core density +!! opt_init=flag defining the storage of PAW atomic data +!! 0: PAW atomic data have not been initialized (in pawtab) +!! 1: PAW atomic data have been initialized (in pawtab) +!! opt_vhnzc=flag defining the inclusion of VH(nZc) in computation +!! 0: VH(nZc) is not taken into account +!! 1: VH(nZc) is taken into account +!! pawtab =paw tabulated starting data +!! radmesh =paw radial mesh (and related data) +!! radmesh_core =radial mesh (and related data) for the core densities +!! radmesh_vloc =radial mesh (and related data) for the local potential (VH(tnZc)) +!! vhtnzc(:)= local potential VH(tnZc) +!! znucl= valence and total charge of the atomic species +!! +!! OUTPUT +!! kij(pawtab%lmn2_size)= kinetic part of Dij +!! +!! SOURCE + + subroutine atompaw_kij(indlmn,kij,lmnmax,ncore,opt_init,opt_vhnzc,pawtab, & +& radmesh,radmesh_core,radmesh_vloc,vhtnzc,znucl) + +!Arguments --------------------------------------------- +!scalars + integer,intent(in) :: lmnmax,opt_init,opt_vhnzc + real(dp),intent(in) :: znucl + type(pawrad_type),intent(in) :: radmesh,radmesh_core,radmesh_vloc + type(pawtab_type),intent(in) :: pawtab +!arrays + integer,intent(in) :: indlmn(6,lmnmax) + real(dp),intent(out) :: kij(pawtab%lmn2_size) + real(dp),intent(in) :: ncore(:) + real(dp),intent(in) :: vhtnzc(:) + +!Local variables --------------------------------------- + integer :: il,ilm,iln,ilmn,j0lmn,jl,jlm,jln,jlmn,klmn,lmn2_size + integer :: meshsz,meshsz_core,meshsz_vhtnzc,meshsz_vmh + real(dp) :: intg,intvh,yp1,ypn + real(dp),allocatable :: ff(:),r2k(:),shpf(:),vhnzc(:),vhtnzc_sph(:),work1(:),work2(:) + +! ********************************************************************* + + lmn2_size=pawtab%lmn2_size + meshsz_vhtnzc=size(vhtnzc) + meshsz=min(radmesh%mesh_size,radmesh_core%mesh_size,radmesh_vloc%mesh_size,meshsz_vhtnzc) + LIBPAW_ALLOCATE(ff,(meshsz)) + +!Retrieve VH(tnZc) on the correct radial mesh + LIBPAW_ALLOCATE(vhtnzc_sph,(meshsz)) + if ((radmesh%mesh_type/=radmesh_vloc%mesh_type).or.& +& (radmesh%rstep /=radmesh_vloc%rstep) .or.& +& (radmesh%lstep /=radmesh_vloc%lstep)) then + call bound_deriv(vhtnzc,radmesh_vloc,meshsz_vhtnzc,yp1,ypn) + LIBPAW_ALLOCATE(work1,(meshsz_vhtnzc)) + LIBPAW_ALLOCATE(work2,(meshsz_vhtnzc)) + call paw_spline(radmesh_vloc%rad,vhtnzc,meshsz_vhtnzc,yp1,ypn,work1) + call paw_splint(meshsz_vhtnzc,radmesh_vloc%rad,vhtnzc,work1,meshsz,radmesh%rad(1:meshsz),vhtnzc_sph) + LIBPAW_DEALLOCATE(work1) + LIBPAW_DEALLOCATE(work2) + else + vhtnzc_sph(1:meshsz)=vhtnzc(1:meshsz) + end if + +!Initialize Kij with Dij0 +!========================= + kij(1:lmn2_size)=pawtab%dij0(1:lmn2_size) + +!Substraction of - on the PAW sphere +!======================================================== + if (opt_vhnzc/=0) then + meshsz_core=size(ncore) + LIBPAW_ALLOCATE(vhnzc,(meshsz_core)) + call atompaw_vhnzc(ncore,radmesh_core,vhnzc,znucl) + do jlmn=1,pawtab%lmn_size + j0lmn=jlmn*(jlmn-1)/2 + jlm=indlmn(4,jlmn);jln=indlmn(5,jlmn) + do ilmn=1,jlmn + klmn=j0lmn+ilmn + ilm=indlmn(4,ilmn);iln=indlmn(5,ilmn) + if (jlm==ilm) then + ff(1:meshsz)=pawtab%phi(1:meshsz,iln)*pawtab%phi(1:meshsz,jln)*vhnzc(1:meshsz) + call simp_gen(intg,ff,radmesh) + kij(klmn)=kij(klmn)-intg + end if + end do + end do + LIBPAW_DEALLOCATE(vhnzc) + end if + +!Substraction of on the PAW sphere +!========================================================== + do jlmn=1,pawtab%lmn_size + j0lmn=jlmn*(jlmn-1)/2 + jlm=indlmn(4,jlmn);jln=indlmn(5,jlmn) + do ilmn=1,jlmn + klmn=j0lmn+ilmn + ilm=indlmn(4,ilmn);iln=indlmn(5,ilmn) + if (jlm==ilm) then + ff(1:meshsz)=pawtab%tphi(1:meshsz,iln)*pawtab%tphi(1:meshsz,jln)*vhtnzc_sph(1:meshsz) + call simp_gen(intg,ff,radmesh) + kij(klmn)=kij(klmn)+intg + end if + end do + end do + +!Computation of (if any) +!================================================= + if(pawtab%has_vminushalf==1) then + if(size(pawtab%vminushalf)>=1) then + meshsz_vmh=min(meshsz,size(pawtab%vminushalf)) + do jlmn=1,pawtab%lmn_size + j0lmn=jlmn*(jlmn-1)/2 + jlm=indlmn(4,jlmn);jln=indlmn(5,jlmn) + do ilmn=1,jlmn + klmn=j0lmn+ilmn + ilm=indlmn(4,ilmn);iln=indlmn(5,ilmn) + if (jlm==ilm) then + ff(1:meshsz_vmh)=pawtab%phi(1:meshsz_vmh,iln)*pawtab%phi(1:meshsz_vmh,jln)*pawtab%vminushalf(1:meshsz_vmh) + call simp_gen(intg,ff(1:meshsz_vmh),radmesh) + kij(klmn)=kij(klmn)-intg + end if + end do + end do + end if + end if + +!Computation of int[vh(tnzc)*Qijhat(r)dr] +!========================================== + if (opt_init==0) then + LIBPAW_ALLOCATE(shpf,(radmesh%mesh_size)) + call atompaw_shpfun(0,radmesh,intg,pawtab,shpf) + if (pawtab%shape_type==3) then + LIBPAW_ALLOCATE(r2k,(radmesh%int_meshsz)) + r2k=zero + r2k(2:radmesh%int_meshsz)=shpf(2:radmesh%int_meshsz)*radmesh%rad(2:radmesh%int_meshsz)**2 + if(radmesh%mesh_type==5) then + call simp_gen(intg,r2k,radmesh) + else + call simp_gen(intg,r2k,radmesh,r_for_intg=pawtab%rshp) + end if + shpf(1:meshsz)=shpf(1:meshsz)/intg + LIBPAW_DEALLOCATE(r2k) + end if + ff(1:meshsz)=vhtnzc_sph(1:meshsz)*shpf(1:meshsz)*radmesh%rad(1:meshsz)**2 + LIBPAW_DEALLOCATE(shpf) + call simp_gen(intvh,ff,radmesh) + do jlmn=1,pawtab%lmn_size + j0lmn=jlmn*(jlmn-1)/2 + jl=indlmn(1,jlmn);jln=indlmn(5,jlmn);jlm=indlmn(4,jlmn) + do ilmn=1,jlmn + klmn=j0lmn+ilmn + il=indlmn(1,ilmn);iln=indlmn(5,ilmn);ilm=indlmn(4,ilmn) + if (ilm==jlm) then + ff(1:meshsz)=(pawtab%phi (1:meshsz,iln)*pawtab%phi (1:meshsz,jln)& +& -pawtab%tphi(1:meshsz,iln)*pawtab%tphi(1:meshsz,jln)) + call simp_gen(intg,ff,radmesh) + kij(klmn)=kij(klmn)+intvh*intg + end if + end do + end do + else + ff(1:meshsz)=vhtnzc_sph(1:meshsz)*pawtab%shapefunc(1:meshsz,1)*radmesh%rad(1:meshsz)**2 + call simp_gen(intvh,ff,radmesh) + do jlmn=1,pawtab%lmn_size + j0lmn=jlmn*(jlmn-1)/2 + jl=indlmn(1,jlmn);jln=indlmn(5,jlmn);jlm=indlmn(4,jlmn) + do ilmn=1,jlmn + klmn=j0lmn+ilmn + il=indlmn(1,ilmn);iln=indlmn(5,ilmn);ilm=indlmn(4,ilmn) + if (ilm==jlm) then + intg=pawtab%qijl(1,klmn)*sqrt(four_pi) + kij(klmn)=kij(klmn)+intvh*intg + end if + end do + end do + end if + + LIBPAW_DEALLOCATE(ff) + LIBPAW_DEALLOCATE(vhtnzc_sph) + + end subroutine atompaw_kij +!!*** + +end module m_paw_atom +!!*** diff --git a/GX-PAW/libpaw/src/m_paw_atom.o b/GX-PAW/libpaw/src/m_paw_atom.o new file mode 100644 index 00000000..98160a6c Binary files /dev/null and b/GX-PAW/libpaw/src/m_paw_atom.o differ diff --git a/GX-PAW/libpaw/src/m_paw_finegrid.F90 b/GX-PAW/libpaw/src/m_paw_finegrid.F90 new file mode 100644 index 00000000..dcdef71f --- /dev/null +++ b/GX-PAW/libpaw/src/m_paw_finegrid.F90 @@ -0,0 +1,1427 @@ +!!****m* ABINIT/m_paw_finegrid +!! NAME +!! m_paw_finegrid +!! +!! FUNCTION +!! This module contains a set of routines to compute various quantities +!! on the fine grid around a given atom. +!! +!! COPYRIGHT +!! Copyright (C) 2013-2024 ABINIT group (MT,FJ) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! NOTES +!! FOR DEVELOPPERS: in order to preserve the portability of libPAW library, +!! please consult ~abinit/src/??_libpaw/libpaw-coding-rules.txt +!! +!! SOURCE + +#include "libpaw.h" + +MODULE m_paw_finegrid + + USE_DEFS + USE_MSG_HANDLING + USE_MEMORY_PROFILING + + use m_pawtab, only : pawtab_type + use m_paw_sphharm, only : initylmr + use m_paw_numeric, only : paw_jbessel,paw_splint,paw_uniform_splfit,paw_sort_dp + + implicit none + + private + +!public procedures. + public :: pawgylm ! g_l(r-R)*Y_lm(r-R) (and derivatives) + public :: pawgylmg ! Fourier transform of g_l(r-R)*Y_lm(r-R), plane-waves case + public :: pawrfgd_fft ! r-R, plane-waves case + public :: pawrfgd_wvl ! r-R, wavelets case + public :: pawexpiqr ! exp(i.q.(r-R)) + +!declarations for the whole module (were needed to replace the statement functions) +!MG: Why this? Global variables are powerful but extremely DANGEROUS +integer,private,save :: lambda +real(dp),private,save :: pi_over_rshp,sigma +real(dp),private,save,allocatable :: alpha(:,:),qq(:,:) +!!*** + +CONTAINS + +!=========================================================== +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_finegrid/pawgylm +!! NAME +!! pawgylm +!! +!! FUNCTION +!! Compute g_l(r-R)*Y_lm(r-R) (and derivatives) on the fine (rectangular) grid +!! around one atom (g_l=radial shape function). +!! R is the position of the atom +!! +!! INPUTS +!! lm_size=number of lm components to be calculated +!! nfgd= number of (fine grid) FFT points in the paw sphere around current atom +!! optgr0= 1 if g_l(r-R)*Y_lm(r-R) are computed +!! optgr1= 1 if first derivatives of g_l(r-R)*Y_lm(r-R) are computed +!! optgr2= 1 if second derivatives of g_l(r-R)*Y_lm(r-R) are computed +!! pawtab =paw tabulated starting data for current atom +!! rfgd(3,nfgd)= coordinates of r-R on the fine rect. grid around current atom +!! +!! OUTPUT +!! if (optgr0==1) +!! gylm(nfgd,lm_size)= g_l(r-R)*Y_lm(r-R) around current atom +!! if (optgr1==1) +!! gylmgr(3,nfgd,lm_size)= derivatives of g_l(r-R)*Y_lm(r-R) wrt cart. coordinates +!! if (optgr2==1) +!! gylmgr2(6,nfgd,lm_size)= second derivatives of g_l(r-R)*Y_lm(r-R) wrt cart. coordinates +!! +!! SOURCE + +subroutine pawgylm(gylm,gylmgr,gylmgr2,lm_size,nfgd,optgr0,optgr1,optgr2,pawtab,rfgd) + +!Arguments --------------------------------------------- +!scalars + integer,intent(in) :: lm_size,nfgd,optgr0,optgr1,optgr2 + type(pawtab_type),intent(in) :: pawtab +!arrays + real(dp),intent(in) :: rfgd(:,:) + real(dp),intent(out) :: gylm(nfgd,optgr0*lm_size) + real(dp),intent(out) :: gylmgr(3,nfgd,optgr1*lm_size) + real(dp),intent(out) :: gylmgr2(6,nfgd,optgr2*lm_size) + +!Local variables ------------------------------ +!scalars + integer :: ic,ilm,izero,l_size,ll,normchoice,option,shape_type + real(dp) :: arg + real(dp) :: jbes1,jbes2,jbesp1,jbesp2,jbespp1,jbespp2,rcut + real(dp) :: splfact + logical :: compute_gr0,compute_gr1,compute_gr2 + character(len=500) :: msg +!arrays + integer,allocatable :: isort(:) + real(dp),parameter :: ffact(1:9)=(/1._dp,3._dp,15._dp,105._dp,945._dp,10395._dp,& +& 135135._dp,2027025._dp,34459425._dp/) + real(dp),parameter :: toldev=tol3 + real(dp) :: ss(3) + real(dp),allocatable :: cc(:,:),d2gfact(:,:),d2shpfuncnum(:,:),dgfact(:,:) + real(dp),allocatable :: dshpfuncnum(:,:),gfact(:,:) + real(dp),allocatable :: rnrm(:),rnrm_inv(:),rnrm_sort(:) + real(dp),allocatable :: shpfuncnum(:,:),work(:),ylmr(:,:),ylmrgr(:,:,:) + +! ************************************************************************* + + if (optgr0==0.and.optgr1==0.and.optgr2==0) return + if (nfgd==0) return + +!Compatibility test +!========================================================== + if (size(rfgd)/=3*nfgd) then + msg='rfgd array must be allocated at rfgd(3,nfgd)!' + LIBPAW_BUG(msg) + end if + if (pawtab%lcut_size>9) then + msg='l_size>10 forbidden!' + LIBPAW_BUG(msg) + end if + if (pawtab%shape_type==1.and.pawtab%shape_lambda<2) then + msg='Exponent lambda of gaussian shape function must be > 1!' + LIBPAW_ERROR(msg) + end if + +!Initializations +!========================================================== +!Options for computation + compute_gr0=(optgr0==1.or.optgr1==1.or.optgr2==1) + compute_gr1=(optgr1==1.or.optgr2==1) + compute_gr2=(optgr2==1) + l_size=pawtab%lcut_size + +!Norms of vectors around the atom + LIBPAW_ALLOCATE(rnrm,(nfgd)) + izero=-1 + do ic=1,nfgd + rnrm(ic)=sqrt(rfgd(1,ic)**2+rfgd(2,ic)**2+rfgd(3,ic)**2) + if (rnrm(ic)<=tol10) izero=ic ! Has to be consistent with initylmr !! + end do + +!Initializations + if (optgr0==1) gylm=zero + if (optgr1==1) gylmgr=zero + if (optgr2==1) gylmgr2=zero + +!Some definitions concerning shape function g_l(r) + shape_type=pawtab%shape_type + sigma=pawtab%shape_sigma;lambda=pawtab%shape_lambda + pi_over_rshp=pi/pawtab%rshp + rcut=tol12+pawtab%rshp + if (shape_type==3) then + LIBPAW_ALLOCATE(alpha,(2,l_size)) + LIBPAW_ALLOCATE(qq,(2,l_size)) + do ll=1,l_size + alpha(1:2,ll)=pawtab%shape_alpha(1:2,ll) + qq(1:2,ll)=pawtab%shape_q(1:2,ll) + end do + end if + +!If needed, sort selected radii by increasing norm + if (shape_type==-1) then + LIBPAW_ALLOCATE(isort,(nfgd)) + LIBPAW_ALLOCATE(rnrm_sort,(nfgd)) + do ic=1,nfgd + isort(ic)=ic + end do + rnrm_sort(1:nfgd)=rnrm(1:nfgd) + call paw_sort_dp(nfgd,rnrm_sort,isort,tol16) + end if + +!If shape function is "numeric", spline it onto selected radii + if (shape_type==-1) then + LIBPAW_ALLOCATE(work,(nfgd)) + if (compute_gr0) then + LIBPAW_ALLOCATE(shpfuncnum,(nfgd,l_size)) + do ll=1,l_size + call paw_splint(pawtab%mesh_size,pawtab%rad_for_spline,pawtab%shapefunc(:,ll),& +& pawtab%dshpfunc(:,ll,2),nfgd,rnrm_sort,work) + do ic=1,nfgd + shpfuncnum(isort(ic),ll)=work(ic) + end do + end do + end if + if(compute_gr1) then + LIBPAW_ALLOCATE(dshpfuncnum,(nfgd,l_size)) + do ll=1,l_size + call paw_splint(pawtab%mesh_size,pawtab%rad_for_spline,pawtab%dshpfunc(:,ll,1),& +& pawtab%dshpfunc(:,ll,3),nfgd,rnrm_sort,work) + do ic=1,nfgd + dshpfuncnum(isort(ic),ll)=work(ic) + end do + end do + end if + if(compute_gr2) then + LIBPAW_ALLOCATE(d2shpfuncnum,(nfgd,l_size)) + do ll=1,l_size + call paw_splint(pawtab%mesh_size,pawtab%rad_for_spline,pawtab%dshpfunc(:,ll,2),& +& pawtab%dshpfunc(:,ll,4),nfgd,rnrm_sort,work) + do ic=1,nfgd + d2shpfuncnum(isort(ic),ll)=work(ic) + end do + end do + end if + LIBPAW_DEALLOCATE(work) + end if + + if (shape_type==-1) then + LIBPAW_DEALLOCATE(isort) + LIBPAW_DEALLOCATE(rnrm_sort) + end if + +!If needed, compute limits at r=0 of shape function and derivatives + if (izero>0) then + LIBPAW_ALLOCATE(cc,(3,min(l_size,3))) + cc=zero + if (shape_type==-1) then + splfact=(pawtab%rad_for_spline(4)-pawtab%rad_for_spline(1))& +& /(pawtab%rad_for_spline(3)-pawtab%rad_for_spline(2)) + end if + do ll=1,min(l_size,3) +! cc(2,l) is g_prime(0) + if (optgr0==1.or.optgr1==1.or.optgr2==1) then + if (shape_type==-1) then + ss(1:3)=pawtab%shapefunc(2:4,ll)/pawtab%rad_for_spline(2:4)**(ll-1) + cc(1,ll)=ss(3)+(ss(1)-ss(2))*splfact + else if (shape_type==1.or.shape_type==2) then + cc(1,ll)=one + else if (shape_type==3) then + cc(1,ll)=(alpha(1,ll)*qq(1,ll)**(ll-1) & +& +alpha(2,ll)*qq(2,ll)**(ll-1))/ffact(ll) + end if + cc(1,ll)=cc(1,ll)*pawtab%gnorm(ll) + end if +! cc(2,l) is g_prime(0) + if (optgr1==1.or.optgr2==1) then + if (shape_type==-1) then + ss(1:3)=(ss(1:3)-cc(1,ll))/pawtab%rad_for_spline(2:4) + cc(2,ll)=ss(3)+(ss(1)-ss(2))*splfact + else if (shape_type==1.and.lambda==1) then + cc(2,ll)=-one/sigma + else + cc(2,ll)=zero + end if + cc(2,ll)=cc(2,ll)*pawtab%gnorm(ll) + end if +! cc(3,l) is g_prime_prime(0) + if (optgr2==1) then + if (shape_type==-1) then + ss(1:3)=(ss(1:3)-cc(2,ll))/pawtab%rad_for_spline(2:4) + cc(3,ll)=two*(ss(3)+(ss(1)-ss(2))*splfact) + else if (shape_type==1) then + if (lambda==1) cc(3,ll)=one/sigma**2 + if (lambda==2) cc(3,ll)=-two/sigma**2 + if (lambda >2) cc(3,ll)=zero + else if (shape_type==2) then + cc(3,ll)=-(two/three)*pi_over_rshp**2 + else if (shape_type==3) then + cc(3,ll)=-(alpha(1,ll)*qq(1,ll)**(ll+1) & +& +alpha(2,ll)*qq(2,ll)**(ll+1))/ffact(ll+1) + end if + cc(3,ll)=cc(3,ll)*pawtab%gnorm(ll) + end if + end do + end if + +!Y_lm(r-R) calculation +!========================================================== + normchoice=1 ; option=max(optgr0,2*optgr1,3*optgr2) + if(compute_gr0) then + LIBPAW_ALLOCATE(ylmr,(l_size**2,nfgd)) + end if + if(compute_gr1.and.(.not.compute_gr2)) then + LIBPAW_ALLOCATE(ylmrgr,(3,l_size**2,nfgd)) + end if + if(compute_gr2) then + LIBPAW_ALLOCATE(ylmrgr,(9,l_size**2,nfgd)) + end if + if (compute_gr0.and.(.not.compute_gr1).and.(.not.compute_gr2)) then + call initylmr(l_size,normchoice,nfgd,rnrm,option,rfgd,ylmr) + else + call initylmr(l_size,normchoice,nfgd,rnrm,option,rfgd,ylmr,ylmrgr) + end if + +!gl(r) and derivatives calculation for l>=0 +!========================================================== +!Compute gl(r), gl_prime(r)/r and (gl_prime_prime(r)-gl_prime(r)/r)/r**2 + if (compute_gr0) then + LIBPAW_BOUND2_ALLOCATE(gfact,BOUNDS(1,nfgd),BOUNDS(0,l_size-1)) + gfact(:,:)=zero + end if + if (compute_gr1) then + LIBPAW_BOUND2_ALLOCATE(dgfact,BOUNDS(1,nfgd),BOUNDS(0,l_size-1)) + dgfact(:,:)=zero + end if + if (compute_gr2) then + LIBPAW_BOUND2_ALLOCATE(d2gfact,BOUNDS(1,nfgd),BOUNDS(0,l_size-1)) + d2gfact(:,:)=zero + end if + if(compute_gr1) then + LIBPAW_ALLOCATE(rnrm_inv,(nfgd)) + do ic=1,nfgd + if (ic/=izero) rnrm_inv(ic)=one/rnrm(ic) + end do + if (izero>0) rnrm_inv(izero)=zero + end if + +!----- type -1 ----- + if (shape_type==-1) then + if (compute_gr0) then + do ll=0,l_size-1 + do ic=1,nfgd + if (rnrm(ic)<=rcut) then + gfact(ic,ll)=shpfuncnum(ic,ll+1) + end if + end do + end do + end if + if (compute_gr1) then + do ll=0,l_size-1 + do ic=1,nfgd + if (rnrm(ic)<=rcut) then + dgfact(ic,ll)=dshpfuncnum(ic,ll+1)*rnrm_inv(ic) + end if + end do + end do + end if + if(compute_gr2) then + do ll=0,l_size-1 + do ic=1,nfgd + if (rnrm(ic)<=rcut) then + d2gfact(ic,ll)=(d2shpfuncnum(ic,ll+1)-dgfact(ic,ll))*rnrm_inv(ic)**2 + end if + end do + end do + end if + +! ----- type 1 or 2 ----- + else if (shape_type==1.or.shape_type==2) then +! FIRST COMPUTE FACTORS FOR l=0 + if (optgr0==1.and.optgr1==0.and.optgr2==0) then + if (shape_type==1) then + do ic=1,nfgd + arg=rnrm(ic) + if (arg2 + dgfact(ic,0)=dshpfunc1_ovr_0(arg) + end if + else if (arg<=rcut) then + gfact(ic,0)=shapefunc1(arg) + dgfact(ic,0)=dshpfunc1(arg)*rnrm_inv(ic) + end if + end do + else ! shape_type==2 + do ic=1,nfgd + arg=rnrm(ic) + if (arg4 + dgfact(ic,0)=dshpfunc1_ovr_0(arg) + d2gfact(ic,0)=d2shpfunc1_ovr2_0(arg) + end if + else if (arg<=rcut) then + gfact(ic,0)=shapefunc1(arg) + dgfact(ic,0)=dshpfunc1(arg)*rnrm_inv(ic) + d2gfact(ic,0)=(d2shpfunc1(arg)-dgfact(ic,0))*rnrm_inv(ic)**2 + end if + end do + else ! shape_type==2 + do ic=1,nfgd + arg=rnrm(ic) + if (arg0 (from l=0) + if (compute_gr0) then + if (l_size>1) then + do ll=1,l_size-1 + do ic=1,nfgd + gfact(ic,ll)=pawtab%gnorm(ll+1)*gfact(ic,0)*rnrm(ic)**ll + end do + end do + end if + end if + if (compute_gr1) then + if (l_size>1) then + do ic=1,nfgd + dgfact(ic,1)=pawtab%gnorm(2)*(gfact(ic,0)*rnrm_inv(ic)+dgfact(ic,0)*rnrm(ic)) + end do + end if + if (l_size>2) then + do ic=1,nfgd + dgfact(ic,2)=pawtab%gnorm(3)*(two*gfact(ic,0)+dgfact(ic,0)*rnrm(ic)**2) + end do + end if + if (l_size>3) then + do ll=3,l_size-1 + do ic=1,nfgd + dgfact(ic,ll)=pawtab%gnorm(ll+1) & +& *(dble(ll)*gfact(ic,0)*rnrm(ic)**(ll-2)+dgfact(ic,0)*rnrm(ic)**ll) + end do + end do + end if + end if + if (compute_gr2) then + if (l_size>1) then + do ic=1,nfgd + d2gfact(ic,1)=pawtab%gnorm(2) & +& *(-gfact(ic,0)*rnrm_inv(ic)**3+two*dgfact(ic,0)*rnrm_inv(ic)+d2gfact(ic,0)*rnrm(ic)) + end do + end if + if (l_size>2) then + do ic=1,nfgd + d2gfact(ic,2)=pawtab%gnorm(3)*(four*dgfact(ic,0)+d2gfact(ic,0)*rnrm(ic)**2) + end do + end if + if (l_size>3) then + do ic=1,nfgd + d2gfact(ic,3)=pawtab%gnorm(4) & +& *(three*gfact(ic,0)*rnrm_inv(ic)+6._dp*dgfact(ic,0)*rnrm(ic)+ d2gfact(ic,0)*rnrm(ic)**3) + end do + end if + if (l_size>4) then + do ic=1,nfgd + d2gfact(ic,4)=pawtab%gnorm(5) & +& *(8._dp*gfact(ic,0)+8._dp*dgfact(ic,0)*rnrm(ic)**2+d2gfact(ic,0)*rnrm(ic)**4) + end do + end if + if (l_size>5) then + do ll=5,l_size-1 + do ic=1,nfgd + d2gfact(ic,ll)=pawtab%gnorm(ll+1) & +& *(dble(ll*(ll-2))*gfact(ic,0)*rnrm(ic)**(ll-4) & +& +dble(2*ll)*dgfact(ic,0)*rnrm(ic)**(ll-2) & +& +d2gfact(ic,0)*rnrm(ic)**ll) + end do + end do + end if + end if + if (compute_gr0) gfact(:,0)=gfact(:,0)*pawtab%gnorm(1) + if (compute_gr1) dgfact(:,0)=dgfact(:,0)*pawtab%gnorm(1) + if (compute_gr2) d2gfact(:,0)=d2gfact(:,0)*pawtab%gnorm(1) + +! ----- type 3 ----- + else if (shape_type==3) then + if (optgr0==1.and.optgr1==0.and.optgr2==0) then + do ll=0,l_size-1 + do ic=1,nfgd + arg=rnrm(ic) + if (arg<=rcut) then + call paw_jbessel(jbes1,jbesp1,jbespp1,ll,0,qq(1,1+ll)*arg) + call paw_jbessel(jbes2,jbesp2,jbespp2,ll,0,qq(2,1+ll)*arg) + gfact(ic,ll)=shapefunc3(jbes1,jbes2,ll) + end if + end do + end do + else if (optgr1==1.and.optgr2==0) then + do ll=0,l_size-1 + do ic=1,nfgd + arg=rnrm(ic) + if (arg<=rcut) then + call paw_jbessel(jbes1,jbesp1,jbespp1,ll,1,qq(1,1+ll)*arg) + call paw_jbessel(jbes2,jbesp2,jbespp2,ll,1,qq(2,1+ll)*arg) + gfact(ic,ll)=shapefunc3(jbes1,jbes2,ll) + dgfact(ic,ll)=dshpfunc3(jbesp1,jbesp2,ll)*rnrm_inv(ic) + end if + end do + end do + if (izero>0.and.l_size>=1) dgfact(izero,0)=-(alpha(1,1)*qq(1,1)+alpha(2,1)*qq(2,1))/three + if (izero>0.and.l_size>=3) dgfact(izero,2)=two/15._dp*(alpha(1,1)*qq(1,1)+alpha(2,1)*qq(2,1)) +! Note: for l=1, dgfact is diverging - d2gfact is diverging for l<4 + else if (optgr2==1) then + do ll=0,l_size-1 + do ic=1,nfgd + arg=rnrm(ic) + if (arg<=rcut) then + call paw_jbessel(jbes1,jbesp1,jbespp1,ll,2,qq(1,1+ll)*arg) + call paw_jbessel(jbes2,jbesp2,jbespp2,ll,2,qq(2,1+ll)*arg) + gfact(ic,ll)=shapefunc3(jbes1,jbes2,ll) + dgfact(ic,ll)=dshpfunc3(jbesp1,jbesp2,ll)*rnrm_inv(ic) + d2gfact(ic,ll)=(d2shpfunc3(jbespp1,jbespp2,ll)-dgfact(ic,ll))*rnrm_inv(ic)**2 + end if + end do + end do + if (izero>0.and.l_size>=1) dgfact(izero,0)=-(alpha(1,1)*qq(1,1)+alpha(2,1)*qq(2,1))/three + if (izero>0.and.l_size>=3) dgfact(izero,2)=two/15._dp*(alpha(1,1)*qq(1,1)+alpha(2,1)*qq(2,1)) +! Note: for l=1, dgfact is diverging - d2gfact is diverging for l<4 + end if + end if + +!g_l(r-R)*Y_lm(r-R) calculation +!========================================================== + if (optgr0==1) then + + do ll=0,l_size-1 + do ilm=ll**2+1,min((ll+1)**2,lm_size) + do ic=1,nfgd + gylm(ic,ilm)=gfact(ic,ll)*ylmr(ilm,ic) + end do + end do + end do + +! Special value at r-R=0 (supposing shapefunc(r)->C.r**l when r->0) + if (izero>0) then + gylm(izero,1:lm_size)=zero + if (lm_size>=1) gylm(izero,1)=ylmr(1,izero)*cc(1,1) + end if + + end if + +!d/dr{g_l(r-R)*Y_lm(r-R)} calculation +!========================================================== + if(optgr1==1) then + + do ll=0,l_size-1 + do ilm=ll**2+1,min((ll+1)**2,lm_size) + do ic=1,nfgd + gylmgr(1:3,ic,ilm)=gfact(ic,ll)*ylmrgr(1:3,ilm,ic)& +& +dgfact(ic,ll)*rfgd(1:3,ic)*ylmr(ilm,ic) + end do + end do + end do + +! Special values at r-R=0 (supposing shapefunc(r)->C.r**l when r->0) + if (izero>0) then + gylmgr(1:3,izero,1:lm_size)=zero + if (lm_size>=1) then + arg=cc(2,1)/sqrt(four_pi) + gylmgr(1:3,izero,1)=arg + end if + if (lm_size>=2) then + arg=cc(1,2)*sqrt(three/four_pi) + gylmgr(2,izero,2)=arg + if (lm_size>=3) gylmgr(3,izero,3)=arg + if (lm_size>=4) gylmgr(1,izero,4)=arg + end if + end if + + end if + +!d2/dridrj{g_l(r-R)*Y_lm(r-R)} calculation +!========================================================== + if(optgr2==1) then + + do ll=0,l_size-1 + do ilm=ll**2+1,min((ll+1)**2,lm_size) + do ic=1,nfgd + gylmgr2(1,ic,ilm)=gfact(ic,ll)*ylmrgr(4,ilm,ic) & +& +dgfact(ic,ll)*(ylmr(ilm,ic)+two*rfgd(1,ic)*ylmrgr(1,ilm,ic)) & +& +d2gfact(ic,ll)*ylmr(ilm,ic)*rfgd(1,ic)*rfgd(1,ic) + gylmgr2(2,ic,ilm)=gfact(ic,ll)*ylmrgr(5,ilm,ic) & +& +dgfact(ic,ll)*(ylmr(ilm,ic)+two*rfgd(2,ic)*ylmrgr(2,ilm,ic)) & +& +d2gfact(ic,ll)*ylmr(ilm,ic)*rfgd(2,ic)*rfgd(2,ic) + gylmgr2(3,ic,ilm)=gfact(ic,ll)*ylmrgr(6,ilm,ic) & +& +dgfact(ic,ll)*(ylmr(ilm,ic)+two*rfgd(3,ic)*ylmrgr(3,ilm,ic)) & +& +d2gfact(ic,ll)*ylmr(ilm,ic)*rfgd(3,ic)*rfgd(3,ic) + gylmgr2(4,ic,ilm)=gfact(ic,ll)*ylmrgr(7,ilm,ic) & +& +dgfact(ic,ll)*(rfgd(3,ic)*ylmrgr(2,ilm,ic)+rfgd(2,ic)*ylmrgr(3,ilm,ic)) & +& +d2gfact(ic,ll)*ylmr(ilm,ic)*rfgd(3,ic)*rfgd(2,ic) + gylmgr2(5,ic,ilm)=gfact(ic,ll)*ylmrgr(8,ilm,ic) & +& +dgfact(ic,ll)*(rfgd(3,ic)*ylmrgr(1,ilm,ic)+rfgd(1,ic)*ylmrgr(3,ilm,ic)) & +& +d2gfact(ic,ll)*ylmr(ilm,ic)*rfgd(3,ic)*rfgd(1,ic) + gylmgr2(6,ic,ilm)=gfact(ic,ll)*ylmrgr(9,ilm,ic) & +& +dgfact(ic,ll)*(rfgd(1,ic)*ylmrgr(2,ilm,ic)+rfgd(2,ic)*ylmrgr(1,ilm,ic)) & +& +d2gfact(ic,ll)*ylmr(ilm,ic)*rfgd(1,ic)*rfgd(2,ic) + end do + end do + end do + +! Special values at r-R=0 (supposing shapefunc(r)->C.r**l when r->0) + if (izero>0) then + gylmgr2(1:6,izero,1:lm_size)=zero + if (lm_size>=1) then + arg=cc(3,1)/sqrt(four_pi) + gylmgr2(1:3,izero,1)=arg + end if + if (lm_size>=2) then + arg=cc(2,2)*sqrt(three/four_pi) + gylmgr2(2,izero,2)=two*arg + gylmgr2(4,izero,2)= arg + if (lm_size>=3) then + gylmgr2(1,izero,3)=two*arg + gylmgr2(3,izero,3)=two*arg + end if + if (lm_size>=4) then + gylmgr2(5,izero,4)=arg + gylmgr2(6,izero,4)=arg + end if + end if + if (lm_size>=5) then + arg=cc(1,3)*sqrt(15._dp/four_pi) + gylmgr2(6,izero,5)=arg + if (lm_size>=6) gylmgr2(4,izero,6)=arg + if (lm_size>=7) then + gylmgr2(1,izero,7)= -arg/sqrt3 + gylmgr2(2,izero,7)= -arg/sqrt3 + gylmgr2(3,izero,7)=two*arg/sqrt3 + end if + if (lm_size>=8) gylmgr2(5,izero,8)=arg + if (lm_size>=9) then + gylmgr2(1,izero,9)= arg + gylmgr2(2,izero,9)=-arg + end if + end if + end if + + end if + +!Memory deallocation +!========================================================== + LIBPAW_DEALLOCATE(rnrm) + if (allocated(cc)) then + LIBPAW_DEALLOCATE(cc) + end if + if (compute_gr0) then + LIBPAW_DEALLOCATE(gfact) + end if + if (compute_gr1) then + LIBPAW_DEALLOCATE(dgfact) + end if + if (compute_gr2) then + LIBPAW_DEALLOCATE(d2gfact) + end if + if (compute_gr1) then + LIBPAW_DEALLOCATE(rnrm_inv) + end if + if (shape_type==3) then + LIBPAW_DEALLOCATE(alpha) + LIBPAW_DEALLOCATE(qq) + end if + if (compute_gr0) then + LIBPAW_DEALLOCATE(ylmr) + end if + if (compute_gr1) then + LIBPAW_DEALLOCATE(ylmrgr) + end if + if (shape_type==-1) then + if (compute_gr0) then + LIBPAW_DEALLOCATE(shpfuncnum) + end if + if (compute_gr1) then + LIBPAW_DEALLOCATE(dshpfuncnum) + end if + if (compute_gr2) then + LIBPAW_DEALLOCATE(d2shpfuncnum) + end if + end if + +! ----------------------------------------------------------------- +!Small functions related to analytical expression of shape function + CONTAINS +!!*** +! ------------------------------------------------ +!!****f* m_paw_finegrid/shapefunc1 +! shapefunc1 is g(x) (gaussian) + function shapefunc1(arg) + + real(dp) :: shapefunc1 + real(dp),intent(in) :: arg + shapefunc1=exp(-(arg/sigma)**lambda) + end function shapefunc1 +!!*** +! ------------------------------------------------ +!!****f* m_paw_finegrid/shapefunc1_0 +! shapefunc1_0 is g(x) (gaussian) for small x + function shapefunc1_0(arg) + + real(dp) :: shapefunc1_0 + real(dp),intent(in) :: arg + shapefunc1_0=one-(arg/sigma)**lambda+half*(arg/sigma)**(2*lambda)-(arg/sigma)**(3*lambda)/6._dp + end function shapefunc1_0 +!!*** +! ------------------------------------------------ +!!****f* m_paw_finegrid/shapefunc2 +! shapefunc2 is g(x) (sinc2) + function shapefunc2(arg) + + real(dp) :: shapefunc2 + real(dp),intent(in) :: arg + shapefunc2=(sin(pi_over_rshp*arg)/(pi_over_rshp*arg))**2 + end function shapefunc2 +!!*** +! ------------------------------------------------ +!!****f* m_paw_finegrid/shapefunc2_0 +! shapefunc2_0 is g(x) (sinc2) for small x + function shapefunc2_0(arg) + + real(dp) :: shapefunc2_0 + real(dp),intent(in) :: arg + shapefunc2_0=one-(pi_over_rshp*arg)**2/three+two*(pi_over_rshp*arg)**4/45._dp + end function shapefunc2_0 +!!*** +! ------------------------------------------------ +!!****f* m_paw_finegrid/shapefunc3 +! shapefunc3 is g(x) (Bessel) + function shapefunc3(jbes1,jbes2,argl) + + integer,intent(in) :: argl + real(dp) :: shapefunc3 + real(dp),intent(in) :: jbes1,jbes2 + shapefunc3= alpha(1,1+argl)*jbes1+alpha(2,1+argl)*jbes2 + end function shapefunc3 +!!*** +! ------------------------------------------------ +!!****f* m_paw_finegrid/dshpfunc1 +! dshpfunc1(x) is g_prime(x) (gaussian) + function dshpfunc1(arg) + + real(dp) :: dshpfunc1 + real(dp),intent(in) :: arg + dshpfunc1=-lambda/sigma*(arg/sigma)**(lambda-1)*exp(-(arg/sigma)**lambda) + end function dshpfunc1 +!!*** +! ------------------------------------------------ +!!****f* m_paw_finegrid/dshpfunc1_ovr_0 +! dshpfunc1_ovr_0(x) is g_prime(x)/x (gaussian) for small x and lambda>2 + function dshpfunc1_ovr_0(arg) + + real(dp) :: dshpfunc1_ovr_0 + real(dp),intent(in) :: arg + dshpfunc1_ovr_0=-lambda/sigma**2*((arg/sigma)**(lambda-2)-(arg/sigma)**(2*lambda-2)) + end function dshpfunc1_ovr_0 +!!*** +! ------------------------------------------------ +!!****f* m_paw_finegrid/dshpfunc1_ovr_0_2 +! dshpfunc1_ovr_0_2(x) is g_prime(x)/x (gaussian) for small x and lambda=2 + function dshpfunc1_ovr_0_2(arg) + + real(dp) :: dshpfunc1_ovr_0_2 + real(dp),intent(in) :: arg + dshpfunc1_ovr_0_2=-two/sigma**2*(one-(arg/sigma)**2+half*(arg/sigma)**4) + end function dshpfunc1_ovr_0_2 +!!*** +! ------------------------------------------------ +!!****f* m_paw_finegrid/dshpfunc2 +! dshpfunc2(x) is g_prime(x) (sinc2) + function dshpfunc2(arg) + + real(dp) :: dshpfunc2 + real(dp),intent(in) :: arg + dshpfunc2=two*pi_over_rshp*sin(pi_over_rshp*arg)/(pi_over_rshp*arg)**3& +& *(pi_over_rshp*arg*cos(pi_over_rshp*arg)-sin(pi_over_rshp*arg)) + end function dshpfunc2 +!!*** +! ------------------------------------------------ +!!****f* m_paw_finegrid/dshpfunc2_ovr_0 +! dshpfunc2_ovr_0(x) is g_prime(x)/x (sinc2) for small x + function dshpfunc2_ovr_0(arg) + + real(dp) :: dshpfunc2_ovr_0 + real(dp),intent(in) :: arg + dshpfunc2_ovr_0=-two*pi_over_rshp**2/3._dp+8._dp*pi_over_rshp**4*arg**2/45._dp + end function dshpfunc2_ovr_0 +!!*** +! ------------------------------------------------ +!!****f* m_paw_finegrid/dshpfunc3 +! dshpfunc3(x) is g_prime(x) (Bessel) + function dshpfunc3(jbesp1,jbesp2,argl) + + integer :: argl + real(dp) :: dshpfunc3 + real(dp),intent(in) :: jbesp1,jbesp2 + dshpfunc3= alpha(1,1+argl)*qq(1,1+argl)*jbesp1 & +& +alpha(2,1+argl)*qq(2,1+argl)*jbesp2 + end function dshpfunc3 +!!*** +! ------------------------------------------------ +!!****f* m_paw_finegrid/d2shpfunc1 +! d2shpfunc1(x) is g_prime_prime(x) (gaussian) + function d2shpfunc1(arg) + + real(dp) :: d2shpfunc1 + real(dp),intent(in) :: arg + d2shpfunc1=lambda/(sigma**2)*(lambda*(arg/sigma)**(2*lambda-2) & +& -(lambda-1)*(arg/sigma)**(lambda-2))*exp(-(arg/sigma)**lambda) + end function d2shpfunc1 +!!*** +! ------------------------------------------------ +!!****f* m_paw_finegrid/d2shpfunc1_ovr2_0 +! d2shpfunc1_ovr2_0(x) is (g_prime_prime(x)-g_prime(x)/x)/x**2 (gaussian) for small x and lambda>4 + function d2shpfunc1_ovr2_0(arg) + + real(dp) :: d2shpfunc1_ovr2_0 + real(dp),intent(in) :: arg + d2shpfunc1_ovr2_0=-lambda/(sigma**4)*((lambda-2)*(arg/sigma)**(lambda-4) & +& -(lambda-1)*two*(arg/sigma)**(2*lambda-4)) + end function d2shpfunc1_ovr2_0 +!!*** +! ------------------------------------------------ +!!****f* m_paw_finegrid/d2shpfunc1_ovr2_0_2 +! d2shpfunc1_ovr2_0_2(x) is (g_prime_prime(x)-g_prime(x)/x)/x**2 (gaussian) for small x and lambda==2 + function d2shpfunc1_ovr2_0_2(arg) + + real(dp) :: d2shpfunc1_ovr2_0_2 + real(dp),intent(in) :: arg + d2shpfunc1_ovr2_0_2=four/(sigma**4)*(one-(arg/sigma)**2) + end function d2shpfunc1_ovr2_0_2 +!!*** +! ------------------------------------------------ +!!****f* m_paw_finegrid/d2shpfunc1_ovr2_0_3 +! d2shpfunc1_ovr2_0_3(x) is (g_prime_prime(x)-g_prime(x)/x)/x**2 (gaussian) for small x and lambda==3 + function d2shpfunc1_ovr2_0_3(arg) + + real(dp) :: d2shpfunc1_ovr2_0_3 + real(dp),intent(in) :: arg + d2shpfunc1_ovr2_0_3=-three/arg/sigma**3+12._dp*arg**2/sigma**6-half*21._dp*arg**5/sigma**9 + end function d2shpfunc1_ovr2_0_3 +!!*** +! ------------------------------------------------ +!!****f* m_paw_finegrid/d2shpfunc1_ovr2_0_4 +! d2shpfunc1_ovr2_0_4(x) is (g_prime_prime(x)-g_prime(x)/x)/x**2 (gaussian) for small x and lambda==4 + function d2shpfunc1_ovr2_0_4(arg) + + real(dp) :: d2shpfunc1_ovr2_0_4 + real(dp),intent(in) :: arg + d2shpfunc1_ovr2_0_4=-8._dp/(sigma**4)*(one-three*(arg/sigma)**4) + end function d2shpfunc1_ovr2_0_4 +!!*** +! ------------------------------------------------ +!!****f* m_paw_finegrid/d2shpfunc2 +! d2shpfunc2(x) is g_prime_prime(x) (sinc2) + function d2shpfunc2(arg) + + real(dp) :: d2shpfunc2 + real(dp),intent(in) :: arg + d2shpfunc2=two/(pi_over_rshp**2*arg**4)* & +& (pi_over_rshp**2*arg**2*(cos(pi_over_rshp*arg))**2 & +& +(three-pi_over_rshp**2*arg**2)*(sin(pi_over_rshp*arg))**2 & +& -four*pi_over_rshp*arg*cos(pi_over_rshp*arg)*sin(pi_over_rshp*arg)) + end function d2shpfunc2 +!!*** +! ------------------------------------------------ +!!****f* m_paw_finegrid/d2shpfunc2_ovr2_0 +! d2shpfunc2_ovr2_0(x) is (g_prime_prime(x)-g_prime(x)/x)/x**2 (sinc2) for small x + function d2shpfunc2_ovr2_0(arg) + + real(dp) :: d2shpfunc2_ovr2_0 + real(dp),intent(in) :: arg + d2shpfunc2_ovr2_0=16._dp/45._dp*pi_over_rshp**4-8._dp/105._dp*pi_over_rshp**6*arg**2 & +& +41._dp/6300._dp*pi_over_rshp**8*arg**4 + end function d2shpfunc2_ovr2_0 +!!*** +! ------------------------------------------------ +!!****f* m_paw_finegrid/d2shpfunc3 +! d2shpfunc3(x) is g_prime_prime(x) (Bessel) + function d2shpfunc3(jbespp1,jbespp2,argl) + + integer,intent(in) :: argl + real(dp) :: d2shpfunc3 + real(dp),intent(in) :: jbespp1,jbespp2 + d2shpfunc3= alpha(1,1+argl)*(qq(1,1+argl)**2)*jbespp1 & +& +alpha(2,1+argl)*(qq(2,1+argl)**2)*jbespp2 + end function d2shpfunc3 +! ------------------------------------------------ + +end subroutine pawgylm +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_finegrid/pawgylmg +!! NAME +!! pawgylmg +!! +!! FUNCTION +!! PAW: Compute Fourier transform of each g_l(r).Y_lm(r) function +!! +!! INPUTS +!! gprimd(3,3)=dimensional reciprocal space primitive translations +!! kg(3,npw)=integer coordinates of planewaves in basis sphere for this k point. +!! kpg(npw,nkpg)= (k+G) components (only if useylm=1) +!! kpt(3)=reduced coordinates of k point +!! lmax=1+max. value of l angular momentum +!! nkpg=second dimension of kpg_k (0 if useylm=0) +!! npw=number of planewaves in basis sphere +!! ntypat=number of types of atoms +!! pawtab(ntypat) =paw tabulated starting data +!! ylm(npw,lmax**2)=real spherical harmonics for each G and k point +!! +!! OUTPUT +!! gylmg(npw,lmax**2,ntypat)=Fourier transform of each g_l(r).Y_lm(r) function +!! +!! SOURCE + +subroutine pawgylmg(gprimd,gylmg,kg,kpg,kpt,lmax,nkpg,npw,ntypat,pawtab,ylm) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: lmax,nkpg,npw,ntypat +!arrays + integer,intent(in) :: kg(3,npw) + real(dp),intent(in) :: gprimd(3,3),kpg(npw,nkpg),kpt(3) + real(dp),intent(in) :: ylm(npw,lmax**2) + type(pawtab_type),intent(in) :: pawtab(ntypat) + + real(dp),intent(out) :: gylmg(npw,lmax**2,ntypat) + +!Local variables------------------------------- +!scalars + integer :: ig,ilm,itypat,ll,l0,mm,mqgrid + real(dp) :: kpg1,kpg2,kpg3,kpgc1,kpgc2,kpgc3 +!arrays + real(dp),allocatable :: glg(:),qgrid(:),kpgnorm(:),shpf(:,:),work(:) + +! ************************************************************************* + +!Get |k+G|: + LIBPAW_ALLOCATE(kpgnorm,(npw)) + if (nkpg<3) then + do ig=1,npw + kpg1=kpt(1)+dble(kg(1,ig));kpg2=kpt(2)+dble(kg(2,ig));kpg3=kpt(3)+dble(kg(3,ig)) + kpgc1=kpg1*gprimd(1,1)+kpg2*gprimd(1,2)+kpg3*gprimd(1,3) + kpgc2=kpg1*gprimd(2,1)+kpg2*gprimd(2,2)+kpg3*gprimd(2,3) + kpgc3=kpg1*gprimd(3,1)+kpg2*gprimd(3,2)+kpg3*gprimd(3,3) + kpgnorm(ig)=sqrt(kpgc1*kpgc1+kpgc2*kpgc2+kpgc3*kpgc3) + end do + else + do ig=1,npw + kpgc1=kpg(ig,1)*gprimd(1,1)+kpg(ig,2)*gprimd(1,2)+kpg(ig,3)*gprimd(1,3) + kpgc2=kpg(ig,1)*gprimd(2,1)+kpg(ig,2)*gprimd(2,2)+kpg(ig,3)*gprimd(2,3) + kpgc3=kpg(ig,1)*gprimd(3,1)+kpg(ig,2)*gprimd(3,2)+kpg(ig,3)*gprimd(3,3) + kpgnorm(ig)=sqrt(kpgc1*kpgc1+kpgc2*kpgc2+kpgc3*kpgc3) + end do + end if + + LIBPAW_ALLOCATE(glg,(npw)) + LIBPAW_ALLOCATE(work,(npw)) + +!Loop over types of atoms + do itypat=1,ntypat + + mqgrid=pawtab(itypat)%mqgrid_shp + LIBPAW_ALLOCATE(qgrid,(mqgrid)) + LIBPAW_ALLOCATE(shpf,(mqgrid,2)) + qgrid(1:mqgrid)=pawtab(itypat)%qgrid_shp(1:mqgrid) + +! Loops over (l,m) values + do ll=0,pawtab(itypat)%lcut_size-1 + l0=ll**2+ll+1 + + shpf(1:mqgrid,1:2)=pawtab(itypat)%shapefncg(1:mqgrid,1:2,1+ll) + call paw_uniform_splfit(qgrid,work,shpf,0,kpgnorm,glg,mqgrid,npw) + + do mm=-ll,ll + ilm=l0+mm + + gylmg(1:npw,ilm,itypat)=ylm(1:npw,ilm)*glg(1:npw) + +! End loops over (l,m) values + end do + end do + +! End loop over atom types + LIBPAW_DEALLOCATE(qgrid) + LIBPAW_DEALLOCATE(shpf) + end do + + LIBPAW_DEALLOCATE(kpgnorm) + LIBPAW_DEALLOCATE(glg) + LIBPAW_DEALLOCATE(work) + +end subroutine pawgylmg +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_finegrid/pawrfgd_fft +!! NAME +!! pawrfgd_fft +!! +!! FUNCTION +!! Determine each point of the (fine) rectangular grid +!! around a given atom and compute r-R vectors. +!! R is the position of the atom. +!! +!! INPUTS +!! [fft_distrib(n3)]= (optional) index of processes which own fft planes in 3rd dimension +!! [fft_index(n3)]= (optional) local fft indexes for current process +!! gmet(3,3)=reciprocal space metric tensor in bohr**-2 +!! [me_fft]= (optional) my rank in the FFT MPI communicator +!! n1,n2,n3= sizes of the FFT grid (entire simulation cell) +!! rcut= radius of the sphere around the atom +!! rprimd(3,3)=dimensional primitive translations in real space (bohr) +!! ucvol= unit cell volume +!! xred(3)= reduced coordinates of the atom +!! +!! OUTPUT +!! ifftsph(nfgd)= FFT index (fine grid) of the points in the sphere around current atom +!! nfgd= number of points in the sphere around current atom +!! rfgd(3,nfgd)= cartesian coordinates of r-R. +!! +!! SOURCE + +subroutine pawrfgd_fft(ifftsph,gmet,n1,n2,n3,nfgd,rcut,rfgd,rprimd,ucvol,xred, & +& fft_distrib,fft_index,me_fft) ! optional arguments + +!Arguments --------------------------------------------- +!scalars + integer,intent(in) :: n1,n2,n3 + integer,intent(out) :: nfgd + integer,optional,intent(in) :: me_fft + real(dp),intent(in) :: rcut,ucvol +!arrays + integer,target,optional,intent(in) :: fft_distrib(n3),fft_index(n3) + integer,allocatable,intent(out) :: ifftsph(:) + real(dp),intent(in) :: gmet(3,3),rprimd(3,3),xred(3) + real(dp),allocatable,intent(out) :: rfgd(:,:) + +!Local variables ------------------------------ +!scalars + integer,parameter :: ishift=15 + integer :: i1,i2,i3,ifft_local,ix,iy,iz,izloc,me_fft_,n1a,n1b,n2a,n2b,n3a,n3b,ncmax + real(dp),parameter :: delta=0.99_dp + real(dp) :: difx,dify,difz,rr1,rr2,rr3,r2,r2cut,rx,ry,rz + character(len=500) :: msg +!arrays + integer,allocatable :: ifftsph_tmp(:) + integer,pointer :: fft_distrib_(:),fft_index_(:) + real(dp),allocatable :: rfgd_tmp(:,:) + +! ************************************************************************* + +!Define a "box" around the atom + r2cut=1.0000001_dp*rcut**2 + rr1=sqrt(r2cut*gmet(1,1)) + rr2=sqrt(r2cut*gmet(2,2)) + rr3=sqrt(r2cut*gmet(3,3)) + n1a=int((xred(1)-rr1+ishift)*n1+delta)-ishift*n1 + n1b=int((xred(1)+rr1+ishift)*n1 )-ishift*n1 + n2a=int((xred(2)-rr2+ishift)*n2+delta)-ishift*n2 + n2b=int((xred(2)+rr2+ishift)*n2 )-ishift*n2 + n3a=int((xred(3)-rr3+ishift)*n3+delta)-ishift*n3 + n3b=int((xred(3)+rr3+ishift)*n3 )-ishift*n3 + +!Get the distrib associated with this fft_grid + if (present(fft_distrib).and.present(fft_index).and.present(me_fft)) then + me_fft_=me_fft ; fft_distrib_ => fft_distrib ; fft_index_ => fft_index + else + me_fft_=0 + LIBPAW_POINTER_ALLOCATE(fft_distrib_,(n3)) + LIBPAW_POINTER_ALLOCATE(fft_index_,(n3)) + fft_distrib_=0;fft_index_=(/(i3,i3=1,n3)/) + end if + +!Temporary allocate "large" arrays + ncmax=1+int(1.5_dp*(n1*n2*n3)*four_pi/(three*ucvol)*rcut**3) + LIBPAW_ALLOCATE(ifftsph_tmp,(ncmax)) + LIBPAW_ALLOCATE(rfgd_tmp,(3,ncmax)) + +!Set number of points to zero + nfgd=0 + +!Loop over FFT points + do i3=n3a,n3b + iz=mod(i3+ishift*n3,n3) + if (fft_distrib_(iz+1)==me_fft_) then + izloc=fft_index_(iz+1) - 1 + difz=dble(i3)/dble(n3)-xred(3) + do i2=n2a,n2b + iy=mod(i2+ishift*n2,n2) + dify=dble(i2)/dble(n2)-xred(2) + do i1=n1a,n1b + ix=mod(i1+ishift*n1,n1) + difx=dble(i1)/dble(n1)-xred(1) + +! Compute r-R + rx=difx*rprimd(1,1)+dify*rprimd(1,2)+difz*rprimd(1,3) + ry=difx*rprimd(2,1)+dify*rprimd(2,2)+difz*rprimd(2,3) + rz=difx*rprimd(3,1)+dify*rprimd(3,2)+difz*rprimd(3,3) + r2=rx**2+ry**2+rz**2 + +! Select matching points + if (r2 <= r2cut) then + ifft_local=1+ix+n1*(iy+n2*izloc) + if (ifft_local>0) then + nfgd=nfgd+1 + if (nfgd>ncmax) then + msg='Number of fft points around atom exceeds max. allowed!' + LIBPAW_BUG(msg) + end if + rfgd_tmp(1,nfgd)=rx + rfgd_tmp(2,nfgd)=ry + rfgd_tmp(3,nfgd)=rz + ifftsph_tmp(nfgd)=ifft_local + end if + end if + +! End of loops + end do + end do + end if + end do + +!Now fill output arrays + if (allocated(ifftsph)) then + LIBPAW_DEALLOCATE(ifftsph) + end if + if (allocated(rfgd)) then + LIBPAW_DEALLOCATE(rfgd) + end if + LIBPAW_ALLOCATE(ifftsph,(nfgd)) + LIBPAW_ALLOCATE(rfgd,(3,nfgd)) + ifftsph(1:nfgd)=ifftsph_tmp(1:nfgd) + rfgd(1:3,1:nfgd)=rfgd_tmp(1:3,1:nfgd) + +!Release temporary memory + LIBPAW_DEALLOCATE(ifftsph_tmp) + LIBPAW_DEALLOCATE(rfgd_tmp) + if (.not.present(fft_distrib).or..not.present(fft_index)) then + LIBPAW_POINTER_DEALLOCATE(fft_distrib_) + LIBPAW_POINTER_DEALLOCATE(fft_index_) + end if + +end subroutine pawrfgd_fft +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_finegrid/pawrfgd_wvl +!! NAME +!! pawrfgd_wvl +!! +!! FUNCTION +!! Determine each point of the (fine) rectangular grid +!! around a given atom and compute r-R vectors. +!! R is the position of the atom. +!! +!! INPUTS +!! geocode= code for geometry (boundary conditions) +!! hh(3)=fine grid spacing +!! i3s= TO BE COMPLETED +!! n1,n2,n3= TO BE COMPLETED +!! n1i,n2i,n3pi= TO BE COMPLETED +!! rcut= radius of the sphere around the atom +!! rloc= cut-off radius for local psp? +!! shift= TO BE COMPLETED +!! xred(3)= cartesian coordinates of the atom +!! +!! OUTPUT +!! ifftsph(nfgd)= FFT index (fine grid) of the points in the sphere around current atom +!! nfgd= number of points in the sphere around current atom +!! rfgd(3,nfgd)= cartesian coordinates of r-R. +!! +!! SOURCE + +subroutine pawrfgd_wvl(geocode,hh,ifftsph,i3s,n1,n1i,n2,n2i,n3,n3pi,& +& nfgd,rcut,rloc,rfgd,shift,xcart) + +!Arguments --------------------------------------------- +!scalars + integer,intent(in) :: i3s,n1,n1i,n2,n2i,n3,n3pi,shift + integer,intent(out) :: nfgd + real(dp),intent(in) :: rcut,rloc + character(1),intent(in) :: geocode +!arrays + integer,allocatable,intent(out) :: ifftsph(:) + real(dp),intent(in) :: hh(3),xcart(3) + real(dp),allocatable,intent(out) :: rfgd(:,:) + +!Local variables ------------------------------ +!scalars + integer :: i1,i2,i3,iex,iey,iez,ind,isx,isy,isz,j1,j2,j3 + integer :: nbl1,nbr1,nbl2,nbr2,nbl3,nbr3,ncmax + logical :: gox,goy,goz,perx,pery,perz + real(dp) :: cutoff,r2,r2cut,rx,ry,rz,xx,yy,zz +!arrays + integer,allocatable :: ifftsph_tmp(:) + real(dp),allocatable :: rfgd_tmp(:,:) + +! ************************************************************************* + +!Data for periodicity in the three directions + perx=(geocode/='F') + pery=(geocode=='P') + perz=(geocode/='F') + call my_ext_buffers(perx,nbl1,nbr1) + call my_ext_buffers(pery,nbl2,nbr2) + call my_ext_buffers(perz,nbl3,nbr3) + +!Define a "box" around the atom + cutoff=10.d0*rloc + r2cut=1.0000001_dp*rcut**2 + rx=xcart(1) + ry=xcart(2) + rz=xcart(3) + isx=floor((rx-cutoff)/hh(1)) + isy=floor((ry-cutoff)/hh(2)) + isz=floor((rz-cutoff)/hh(3)) + iex=ceiling((rx+cutoff)/hh(1)) + iey=ceiling((ry+cutoff)/hh(2)) + iez=ceiling((rz+cutoff)/hh(3)) + +!Temporary allocate "large" arrays +! use factor 1+int(1.1*, for safety reasons + ncmax=1 + if (n3pi>0) ncmax=1+int((rcut/hh(1)+1.0)*(rcut/hh(2)+1.0)*(rcut/hh(3)+1.0)*four_pi/three) + LIBPAW_ALLOCATE(ifftsph_tmp,(ncmax)) + LIBPAW_ALLOCATE(rfgd_tmp,(3,ncmax)) + +!Set number of points to zero + nfgd=0 + +!Loop over WVL points + do i3=isz,iez + zz=real(i3,kind=8)*hh(3)-rz + call my_ind_positions(perz,i3,n3,j3,goz) + j3=j3+nbl3+1 + do i2=isy,iey + yy=real(i2,kind=8)*hh(2)-ry + call my_ind_positions(pery,i2,n2,j2,goy) + do i1=isx,iex + xx=real(i1,kind=8)*hh(1)-rx + call my_ind_positions(perx,i1,n1,j1,gox) + r2=xx**2+yy**2+zz**2 + if (j3>=i3s.and.j3<=i3s+n3pi-1.and.goy.and.gox) then + +! Select matching points + if (r2<=r2cut) then + ind=j1+1+nbl1+(j2+nbl2)*n1i+(j3-i3s)*n1i*n2i + nfgd=nfgd+1 + rfgd_tmp(:,nfgd)=[xx,yy,zz] + ifftsph_tmp(nfgd)=shift+ind + end if + +! End of loops + end if + end do + end do + end do + +!Now fill output arrays + if (allocated(ifftsph)) then + LIBPAW_DEALLOCATE(ifftsph) + end if + if (allocated(rfgd)) then + LIBPAW_DEALLOCATE(rfgd) + end if + LIBPAW_ALLOCATE(ifftsph,(nfgd)) + LIBPAW_ALLOCATE(rfgd,(3,nfgd)) + ifftsph(1:nfgd)=ifftsph_tmp(1:nfgd) + rfgd(1:3,1:nfgd)=rfgd_tmp(1:3,1:nfgd) + +!Release temporary memory + LIBPAW_DEALLOCATE(ifftsph_tmp) + LIBPAW_DEALLOCATE(rfgd_tmp) + +!********************************************************************* +!Small functions related to boundary conditions + contains +!!*** +! ------------------------------------------------ +!!****f* m_paw_finegrid/my_ind_positions + subroutine my_ind_positions(periodic,i,n,j,go) + + integer,intent(in) :: i,n + logical,intent(in) :: periodic + integer,intent(out) :: j + logical,intent(out) :: go + if (periodic) then + j=modulo(i,2*n+2) ; go=.true. + else + j=i ; go=(i>=-14.and.i<=2*n+16) + end if + end subroutine my_ind_positions +!!*** +! ------------------------------------------------ +!!****f* m_paw_finegrid/my_ext_buffers + subroutine my_ext_buffers(periodic,nl,nr) + + logical, intent(in) :: periodic + integer, intent(out) :: nl,nr + if (periodic) then + nl=0 ; nr=0 + else + nl=14 ; nr=15 + end if + end subroutine my_ext_buffers +! ------------------------------------------------ + +end subroutine pawrfgd_wvl +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_finegrid/pawexpiqr +!! NAME +!! pawexpiqr +!! +!! FUNCTION +!! Compute exp(i.q.r) for each point of the (fine) rectangular grid +!! around a given atomic site. R is the position of the atom. +!! Used for the determination of phonons at non-zero q wavevector. +!! +!! INPUTS +!! gprimd(3,3)= dimensional primitive translations for reciprocal space +!! nfgd= number of (fine grid) FFT points in the paw sphere around current atom +!! qphon(3)= wavevector of the phonon +!! rfgd(3,nfgd)= coordinates of r-R on the fine grid around current atom +!! xred(3)= reduced atomic coordinates +!! +!! OUTPUT +!! expiqr(2,nfgd)= exp(i.q.r) around the current atom +!! Not allocated if q=0 ! +!! +!! SOURCE + +subroutine pawexpiqr(expiqr,gprimd,nfgd,qphon,rfgd,xred) + +!Arguments --------------------------------------------- +!scalars + integer,intent(in) :: nfgd +!arrays + real(dp),intent(in) :: gprimd(3,3),qphon(3),xred(3) + real(dp),intent(in) :: rfgd(:,:) + real(dp),intent(out) :: expiqr(2,nfgd) + +!Local variables ------------------------------ +!scalars + integer :: ic + logical :: qne0 + real(dp) :: phase,phase_xred,qx,qy,qz + character(len=500) :: msg +!arrays + +! ************************************************************************* + + if (size(rfgd)/=3*nfgd) then + msg='rfgd array must be allocated!' + LIBPAW_BUG(msg) + end if + + qne0=(qphon(1)**2+qphon(2)**2+qphon(3)**2>=1.d-15) + +!Compute q in cartesian coordinates + if (qne0) then + qx=gprimd(1,1)*qphon(1)+gprimd(1,2)*qphon(2)+gprimd(1,3)*qphon(3) + qy=gprimd(2,1)*qphon(1)+gprimd(2,2)*qphon(2)+gprimd(2,3)*qphon(3) + qz=gprimd(3,1)*qphon(1)+gprimd(3,2)*qphon(2)+gprimd(3,3)*qphon(3) + phase_xred=two_pi*(qphon(1)*xred(1)+qphon(2)*xred(2)+qphon(3)*xred(3)) + end if + +!Compute exp(i.q.r) + if (qne0) then + do ic=1,nfgd + phase=two_pi*(qx*rfgd(1,ic)+qy*rfgd(2,ic)+qz*rfgd(3,ic)) + phase_xred + expiqr(1,ic)=cos(phase) + expiqr(2,ic)=sin(phase) + end do + end if + +end subroutine pawexpiqr +!!*** + +!---------------------------------------------------------------------- + +END MODULE m_paw_finegrid +!!*** diff --git a/GX-PAW/libpaw/src/m_paw_finegrid.o b/GX-PAW/libpaw/src/m_paw_finegrid.o new file mode 100644 index 00000000..293faf99 Binary files /dev/null and b/GX-PAW/libpaw/src/m_paw_finegrid.o differ diff --git a/GX-PAW/libpaw/src/m_paw_gaussfit.F90 b/GX-PAW/libpaw/src/m_paw_gaussfit.F90 new file mode 100644 index 00000000..6054f36f --- /dev/null +++ b/GX-PAW/libpaw/src/m_paw_gaussfit.F90 @@ -0,0 +1,2215 @@ +!!****m* ABINIT/m_paw_gaussfit +!! NAME +!! m_paw_gaussfit +!! +!! FUNCTION +!! Module to fit PAW related data to sums of gaussians +!! +!! COPYRIGHT +!! Copyright (C) 2012-2024 ABINIT group (T. Rangel) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! NOTES +!! FOR DEVELOPPERS: in order to preserve the portability of libPAW library, +!! please consult ~abinit/src/??_libpaw/libpaw-coding-rules.txt +!! +!! SOURCE + +#include "libpaw.h" + +module m_paw_gaussfit + + USE_DEFS + USE_MSG_HANDLING + USE_MPI_WRAPPERS + USE_MEMORY_PROFILING + + use m_paw_numeric, only : paw_splint, paw_spline + use m_pawrad, only : pawrad_type, pawrad_init, pawrad_deducer0, pawrad_free, pawrad_ifromr + + implicit none + + private + + public:: gaussfit_projector !fit non-local projectors to a sum of gaussians + public:: gaussfit_main !main routine to fit +!Routines related to MPI: + private:: gaussfit_mpi_set_weight + private:: gaussfit_mpi_remove_item + private:: gaussfit_mpi_add_item + private:: gaussfit_mpi_assign + private:: gaussfit_mpi_main + private:: gaussfit_mpi_calc_deviation + private:: gaussfit_mpi_swap +!Routines related to fitting: + private:: gaussfit_fit !fit a function to gaussians + private:: gaussfit_calc_deriv_r !calc. derivatives for real gauss. + private:: gaussfit_calc_deriv_c !calc. derivatives for cplex. gauss. of form 1 + private:: gaussfit_calc_deriv_c2 !calc. derivatives for cplex. gauss. of form 2 + private:: gaussfit_calc_deriv_c3 !calc. derivatives for cplex. gauss. of form 3 + private:: gaussfit_calc_deriv_c4 !calc. derivatives for cplex. gauss. of form 4 + private:: gaussfit_rlsf !retreined least squares fit + private:: gaussfit_chisq_alpha_beta +!set parameters for LSF (for 5 different forms of gauss. sums): + private:: gaussfit_set_param1 + private:: gaussfit_set_param2 + private:: gaussfit_set_param3 + private:: gaussfit_set_param4 + private:: gaussfit_set_param5 + private:: gaussfit_constrains_init !initialize constrains + private:: gaussfit_apply_constrains !apply cons. to get new params. + +!!*** + integer,private,parameter:: positive=2 + integer,private,parameter:: restricted=3 + integer,private,parameter:: restricted_and_positive=4 + +CONTAINS +!=========================================================== +!!*** + +!!****f* m_paw_gaussfit/gaussfit_main +!! NAME +!! gaussfit_main +!! +!! FUNCTION +!! Fits a given input function f(r) to a sum of gaussians +!! +!! INPUTS +!! nterm_bounds= sets the minimum and maximum number of terms to be taken into account. +!! mparam= maximum number of parameters +!! if(option==1)mparam=nterm_bounds(2)*4 +!! if(option==2)mparam=nterm_bounds(2)*6 +!! if(option==3)mparam=nterm_bounds(2)*2 +!! if(option==4)mparam=nterm_bounds(2)*4 +!! nr= number of real space points +!! pawrad= pawrad type +!! option=1 fit to a1 cos(a2 x^2)+ a3 sin( a4 x^2) +!! 2 fit to a1 exp(-a2 x^2)*(a3 cos (a4 x^2) + a5 sin (a6 x^2) ) +!! 3 fit to a1 cos (k x^2) + a2 sin (k x^2) +!! 4 fit to a1 exp(-a2 x^2)* (a3 cos(k x^2)+ a4 sin (k x^2)) +!! Given these definitions, the number of complex gaussians are: +!! ngauss=4*nterm (for option=1,2) +!! ngauss=2*nterm (for option=3,4) +!! outfile= filename to write out fitted functions. +!! rpaw=paw radius +!! y(nr)= function to fit +!! +!! OUTPUT +!! nparam_out= number of parameters found. +!! param_out(nparam_out)= parameters (coefficients and factors of complex gaussians). +!! +!! SOURCE + + subroutine gaussfit_main(mparam,nparam_out,nterm_bounds,nr,& +& param_out,pawrad,option,outfile,rpaw,y,comm_mpi) + +!Arguments ------------------------------------ + integer,intent(in)::mparam,nr,nterm_bounds(2) + integer,intent(in)::option + integer,intent(in),optional:: comm_mpi + real(dp),intent(in)::rpaw + real(dp),intent(inout)::y(nr) + character(80),intent(in)::outfile + type(pawrad_type),intent(in) :: pawrad + integer,intent(out)::nparam_out + real(dp),intent(out)::param_out(mparam) + +!Local variables------------------------------- +!scalars + logical,parameter::modify_y=.false. !used only for plotting purposes + integer :: ichisq,ierr,ii,jj + integer :: master,me + integer :: maxiter,minterm,my_chisq_size,counts_all + integer :: ngauss,nparam,nproc,nterm + integer :: verbosity + real(dp) :: chisq,chisq_min +!real(dp) :: T1,T2 !uncomment for timming + !arrays + integer::constrains(mparam) + integer::proc_dist(nterm_bounds(1):nterm_bounds(2)) + integer,allocatable::counts(:),disp(:),map_nterm(:) + real(dp)::limit(mparam),param_tmp(mparam),weight(mparam) + real(dp),allocatable::chisq_array(:),recv_buf(:),send_buf(:) + real(dp),allocatable::y_out(:) + character(len=500) :: msg + +! ************************************************************************* + +!initialize variables + maxiter=200 +! +!initialize mpi quantities: + master=0; me=0; nproc=1; proc_dist=1; + if(present(comm_mpi)) then + me=xmpi_comm_rank(comm_mpi) + nproc=xmpi_comm_size(comm_mpi) + end if + if(nproc>1) then +! Find distribution (master) + if(me==master) then + call gaussfit_mpi_main(nproc,nterm_bounds,proc_dist) + end if +! send distribution to all processors + call xmpi_bcast(proc_dist(nterm_bounds(1):nterm_bounds(2)),& +& master,comm_mpi,ierr) + end if +!Set size of chisq treated by each proc + my_chisq_size=nterm_bounds(2)-nterm_bounds(1)+1 !all terms + if(nproc>1 .and. .not. me==master) then + do nterm=nterm_bounds(1),nterm_bounds(2) + if(.not. proc_dist(nterm)==me+1) cycle + my_chisq_size=my_chisq_size+1 + end do + end if + +! +!Allocate objects +! + LIBPAW_ALLOCATE(y_out,(nr)) + LIBPAW_ALLOCATE(chisq_array,(my_chisq_size)) + if(master==me ) then + LIBPAW_BOUND1_ALLOCATE(map_nterm,BOUNDS(nterm_bounds(1),nterm_bounds(2))) + jj=1 + do ii=1,nproc + do nterm=nterm_bounds(1),nterm_bounds(2) + if(proc_dist(nterm)==ii) then + map_nterm(nterm)=jj + jj=jj+1 + end if + end do + end do + end if +! +!fill with zeros +! + chisq_array=zero + nparam_out=0 + y_out=0.d0 + verbosity=1 !print the minimum at the terminal +! + ichisq=0 + do nterm=nterm_bounds(1),nterm_bounds(2) +! mpi distribution + if(.not. proc_dist(nterm)==me+1) cycle + ichisq=ichisq+1 + +! call CPU_TIME(T1) + + if(option==1) nparam=nterm*4 + if(option==2) nparam=nterm*6 + if(option==3) nparam=nterm*2 + if(option==4) nparam=nterm*4 +! set initial guess +! if(option==1) then +! call gaussfit_set_param3(nterm,nparam,param_tmp(1:nparam),sep(ii)) +! elseif(option==2) then +! call gaussfit_set_param1(nterm,nparam,nr,& +!& param_tmp(1:nparam),sep(ii),pawrad%rad(1:nr),y) + if(option==3) then + call gaussfit_set_param4(nparam,param_tmp(1:nparam)) + elseif(option==4) then + call gaussfit_set_param5(nterm,nparam,nr,& +& param_tmp(1:nparam),rpaw,y) + end if +! +! + call gaussfit_constrains_init(weight(1:nparam),constrains(1:nparam),& +& limit(1:nparam),nparam,nterm,nr,option,rpaw,y) +! + call gaussfit_fit(chisq,constrains(1:nparam),& +& limit(1:nparam),maxiter,nparam,nterm,nr,option,outfile,param_tmp,& +& verbosity,weight(1:nparam),pawrad%rad(1:nr),y,y_out) + +! if there was an error, set chisq to very high +! if there is an NaN, for instance: + if(abs(chisq+1.d0)1) then +! Prepare communications: + LIBPAW_ALLOCATE(counts,(nproc)) + counts(:)=0 + do nterm=nterm_bounds(1),nterm_bounds(2) + counts(proc_dist(nterm))=counts(proc_dist(nterm))+1 + end do + counts_all=sum(counts) + LIBPAW_ALLOCATE(send_buf,(counts(me+1))) + send_buf(:)=chisq_array(1:counts(me+1)) + if(me==master) then + LIBPAW_ALLOCATE(recv_buf,(counts_all)) + else + LIBPAW_ALLOCATE(recv_buf,(1)) + end if + LIBPAW_ALLOCATE(disp,(nproc)) + disp(1)=0 + do ii=2,nproc + disp(ii)=disp(ii-1)+counts(ii-1) + end do +! communicate all info to master + call xmpi_gatherv(send_buf,counts(me+1),recv_buf,& +& counts,disp,master,comm_mpi,ierr) +! fill in chisq_array with all received info: + if(master==me) then + do ii=1,counts_all + chisq_array(ii)=recv_buf(ii) + end do + end if +! Deallocate MPI arrays: + LIBPAW_DEALLOCATE(recv_buf) + LIBPAW_DEALLOCATE(counts) + LIBPAW_DEALLOCATE(disp) + LIBPAW_DEALLOCATE(send_buf) + end if + +!Print out info: + if(me==master) then + write(msg,'(3a)')'Preliminary results (with only 200 iter.):',ch10,' ngauss chisq' + call wrtout(std_out,msg,'COLL') + do nterm=nterm_bounds(1),nterm_bounds(2) + if(option==1) ngauss=nterm*4 + if(option==2) ngauss=nterm*4 + if(option==3) ngauss=nterm*2 + if(option==4) ngauss=nterm*2 + write(msg,'(i4,2x,e13.6,1x)')ngauss,& +& chisq_array(map_nterm(nterm)) + call wrtout(std_out,msg,'COLL') + end do + end if + +!get minterm for best accuracy: + if(me==master) then + chisq_min=999999999 + do nterm=nterm_bounds(1),nterm_bounds(2) + if(chisq_array(map_nterm(nterm))1) then + call xmpi_bcast(nparam_out,master,comm_mpi,ierr) + call xmpi_bcast(param_tmp(1:nparam_out),master,comm_mpi,ierr) + end if !nproc>1 + + param_out(:)=param_tmp + + if(modify_y) then +! call xmpi_scatterv(y_out,nr,mpi_displ,y_out,nr,0,comm_mpi,ierr) + y=y_out !at output modify y for the fitted y + end if + + LIBPAW_DEALLOCATE(y_out) + LIBPAW_DEALLOCATE(chisq_array) + if(me==master) then + LIBPAW_DEALLOCATE(map_nterm) + end if + +end subroutine gaussfit_main +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_gaussfit/gaussfit_mpi_set_weight +!! NAME +!! gaussfit_mpi_set_weight +!! +!! FUNCTION +!! It sets a weight to the number of +!! Gaussians used. +!! This was calculated by measuring the time +!! it takes to fit a projector with different +!! number of gaussians. +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + + subroutine gaussfit_mpi_set_weight(f,x) + +!Arguments ------------------------------------ + integer,intent(in)::x + integer,intent(out)::f + +!Local variables ------------------------------ + real(dp)::a,b,c,d,ff,xx + +!************************************************************************ + + !The following parameters were obtained + !from the time (in seconds) + !it takes to fit a given projector + !using from 1 to 100 gaussians. + a = -0.374137d0 ! +/- 2.013 (538.1%) + b = 0.207854d0 ! +/- 0.3385 (162.8%) + c = 0.0266371d0 ! +/- 0.01534 (57.59%) + d = 0.000152476d0 ! +/- 0.0001978 (129.7%) + + xx=real(x,dp) + ff=a+b*xx+c*xx**2+d*xx**3 + f=max(1,ceiling(ff)) + + end subroutine gaussfit_mpi_set_weight +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_gaussfit/gaussfit_mpi_remove_item +!! NAME +!! gaussfit_mpi_remove_item +!! +!! FUNCTION +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + + subroutine gaussfit_mpi_remove_item(iterm,pload) + +!Arguments ------------------------------------ + integer,intent(in)::iterm + integer,intent(inout)::pload + +!Local variables ------------------------------ + integer:: f_i + +!*********************************************************************** + + call gaussfit_mpi_set_weight(f_i,iterm) + pload=pload-f_i + + end subroutine gaussfit_mpi_remove_item +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_gaussfit/gaussfit_mpi_add_item +!! NAME +!! gaussfit_mpi_add_item +!! +!! FUNCTION +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + + subroutine gaussfit_mpi_add_item(iterm,pload) + +!Arguments ------------------------------------ + integer,intent(in)::iterm + integer,intent(inout)::pload + +!Local variables ------------------------------ + integer:: f_i + +!************************************************************************ + + call gaussfit_mpi_set_weight(f_i,iterm) + pload=pload+f_i + + end subroutine gaussfit_mpi_add_item +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_gaussfit/gaussfit_mpi_calc_deviation +!! NAME +!! gaussfit_mpi_calc_deviation +!! +!! FUNCTION +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + + subroutine gaussfit_mpi_calc_deviation(deviation,nproc,proc_load) + +!Arguments ------------------------------------ + integer,intent(in)::nproc + integer,intent(in)::proc_load(nproc) + integer,intent(out)::deviation + +!Local variables ------------------------------ + integer:: jproc,kproc,kload,jload + +!************************************************************************ + +! deviation=0 +! do jproc=1,nproc +! deviation=deviation+abs(proc_load(jproc)-ideal) +! end do + + deviation=0 + do jproc=1,nproc + jload=proc_load(jproc) + do kproc=1,jproc + kload=proc_load(kproc) + deviation=deviation+abs(kload-jload) + end do + end do + + end subroutine gaussfit_mpi_calc_deviation +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_gaussfit/gaussfit_mpi_swap +!! NAME +!! gaussfit_mpi_swap +!! +!! FUNCTION +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + + subroutine gaussfit_mpi_swap(iterm,jterm,& +& nproc,nterm_bounds,proc_dist,proc_load) + +!Arguments ------------------------------------ + integer,intent(in)::iterm,jterm,nproc,nterm_bounds(2) + integer,intent(inout)::proc_dist(nterm_bounds(1):nterm_bounds(2)),proc_load(nproc) + +!Local variables ------------------------------ + integer:: deviation1,deviation2 + integer:: iproc,jproc + +!************************************************************************ + +!Calculate initial state + call gaussfit_mpi_calc_deviation(deviation1,nproc,proc_load) + iproc=proc_dist(iterm) + jproc=proc_dist(jterm) +!Swap terms: + call gaussfit_mpi_add_item(jterm,proc_load(iproc)) + call gaussfit_mpi_remove_item(iterm,proc_load(iproc)) + call gaussfit_mpi_add_item(iterm,proc_load(jproc)) + call gaussfit_mpi_remove_item(jterm,proc_load(jproc)) +!Calculate final state + call gaussfit_mpi_calc_deviation(deviation2,nproc,proc_load) +!Swap them only if final state is better than the initial one + if(deviation21) +!! verbosity= controls output volume +!! weight(nparam)= weights for the fitting procedure +!! x(nx)= points along the x axis +!! y(nx)= function to be fitted +!! rpaw ,optional= paw radius +!! +!! OUTPUT +!! y_out(nx)= fitted function +!! +!! SIDE EFFECTS +!! if(verbosity>1) output files are written with y(x) and y_out(x) +!! +!! SOURCE + +subroutine gaussfit_fit(chisq,constrains,& +& limit,maxiter,nparam,nterm,nx,option,outfile,param,& +& verbosity,weight,x,y,y_out) + +!Arguments ------------------------------------ + integer, intent(in) :: maxiter,nparam + integer,intent(in) :: nterm,nx,option,verbosity + !real(dp),optional,intent(in)::rpaw + !arrays + integer,intent(in)::constrains(nparam) + real(dp),intent(in)::limit(nparam),weight(nparam) + real(dp),intent(in)::x(nx),y(nx) + real(dp),intent(inout)::param(nparam) + real(dp),intent(out)::chisq,y_out(nx) + character(80),intent(in)::outfile + +!Local variables ------------------------------ + integer, parameter :: wfn_unit=1007 + integer::ix + real(dp)::rerror + real(dp),allocatable::sy(:) + +! ************************************************************************* + + LIBPAW_ALLOCATE(sy,(nx)) + + sy(:)=1.0d0 + + call gaussfit_rlsf(& +& chisq,constrains,limit,maxiter,& +& nterm,nparam,nx,option,param(1:nparam),& +& verbosity,weight,x,y) +! + if(verbosity>=1) then + if(option==1) then + call gaussfit_calc_deriv_c2(nparam,nterm,nx,1,param,x,y_out) + elseif(option==2) then + call gaussfit_calc_deriv_c(nparam,nterm,nx,1,param,x,y_out) + elseif(option==3) then + call gaussfit_calc_deriv_c3(nparam,nterm,nx,1,param,x,y_out) + elseif(option==4) then + call gaussfit_calc_deriv_c4(nparam,nterm,nx,1,param,x,y_out) + end if +! +! + open(wfn_unit,file=outfile,form='formatted',status='unknown') +! per_error=0.d0 + do ix=1, nx + rerror=abs(y(ix)-y_out(ix)) + write(wfn_unit,'(6(e20.12,1x))')x(ix),y(ix),y_out(ix),rerror + end do + close(wfn_unit) + + end if + + LIBPAW_DEALLOCATE(sy) + +end subroutine gaussfit_fit +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_gaussfit/gaussfit_calc_deriv_r +!! NAME +!! gaussfit_calc_deriv_r +!! +!! FUNCTION +!! Calculate derivatives for Gaussians +!! Only relevant for fitting Gaussians algorithm. +!! The Gaussians expressions are defined in the comments of "gaussfit_main" +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +subroutine gaussfit_calc_deriv_r(nterm,nparam,nx,opt,param,x,y_out,& +& deriv) ! optional + +!Arguments ------------------------------- + integer,intent(in)::nx !number of point in the x grid + integer,intent(in)::nparam !number of parameters + integer,intent(in)::nterm !number of gaussian expressions + integer,intent(in)::opt !option: + !1) calculate only f(x) + !2) calculate f(x) and its derivatives + real(dp),intent(in)::param(nparam) !parameters + real(dp),intent(in)::x(nx) !xgrid + real(dp),intent(out)::y_out(nx) !f(x) + real(dp),optional,intent(out)::deriv(nx,nparam) !derivatives + +!Local variables------------------------------- + integer::iexp,ii + real(dp)::alpha1(nterm),alpha2(nterm),alpha3(nterm) + real(dp)::term1(nx,nterm) + real(dp)::aux1(nx) + !real(dp)::step + +! ********************************************************************* + +! +!Initialize +! + y_out(:)=0.d0 +! +!Get parameters from parameters array: +! + alpha1(:)=param(1:nterm) + alpha2(:)=param(nterm+1:2*nterm) + alpha3(:)=param(2*nterm+1:3*nterm) +! +!alpha3 +!set to constant values of x +!step=rpaw/real(nterm,dp) +!do ii=1,nterm +!raux=step*real(ii,dp) +!alpha3(ii)=raux +!end do +! +! +! +!calculate useful quantities +! + do iexp=1,nterm + aux1(:)=-alpha2(iexp)*(x(:)-alpha3(iexp))**2 + term1(:,iexp)=alpha1(iexp)*exp(aux1(:)) + end do +! + do iexp=1,nterm + y_out(:)=y_out(:)+term1(:,iexp) + end do +! +!Calculate derivatives: +! + if(opt==2) then +! +! alpha1 +! + do iexp=1,nterm + aux1(:)=term1(:,iexp)/alpha1(iexp) + deriv(:,iexp)=aux1(:) + end do +! +! alpha2 +! + do iexp=1,nterm + ii=nterm+iexp + aux1(:)=-term1(:,iexp)*(x(:)-alpha3(iexp)) + deriv(:,ii)=aux1(:) + deriv(:,ii)=0.1d0 + end do +! +! alpha3 +! + do iexp=1,nterm + ii=2*nterm+iexp + aux1(:)=term1(:,iexp)*2.d0*alpha2(iexp) + aux1(:)=aux1(:)*(x(:)-alpha3(iexp)) + deriv(:,ii)=aux1(:) + end do + end if + +end subroutine gaussfit_calc_deriv_r +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_gaussfit/gaussfit_calc_deriv_c3 +!! NAME +!! gaussfit_calc_deriv_c3 +!! +!! FUNCTION +!! Calculate expressions and derivatives for Gaussians fitting. +!! The Gaussians expressions are defined in the comments of "gaussfit_main" +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +subroutine gaussfit_calc_deriv_c3(nparam,nterm,nx,opt,param,x,y_out,& +& deriv) ! optional + +!Arguments ------------------------------- + integer,intent(in)::nparam !number of parameters + integer,intent(in)::nterm !number of gaussian expressions + integer,intent(in)::nx !number of point in the x grid + integer,intent(in)::opt !option: + !1) calculate only f(x) + !2) calculate f(x) and its derivatives + real(dp),intent(in)::param(nparam) !parameters + real(dp),intent(in)::x(nx) !xgrid + real(dp),intent(out)::y_out(nx) !f(x) + real(dp),optional,intent(out)::deriv(nx,nparam) !derivatives + +!Local variables------------------------------- + integer::iexp,ii + real(dp)::sep + real(dp)::alpha1(nterm),alpha2(nterm),alpha3(nterm) + real(dp)::term1(nx,nterm) + real(dp)::sin1(nx,nterm),cos1(nx,nterm) + real(dp)::aux1(nx),aux2(nx) + +! ********************************************************************* + +! +!Initialize +! + y_out(:)=0.d0 +! + sep=1.2d0 +! +!Get param from param array: +! + alpha1(:)=param(1:nterm) + alpha2(:)=param(nterm+1:2*nterm) +! + do ii=1,nterm + alpha3(ii)=sep**(ii) + end do +! +!calculate useful quantities +! + do iexp=1,nterm + aux1(:)=alpha3(iexp)*x(:)**2 +! + sin1(:,iexp)=sin(aux1(:)) + cos1(:,iexp)=cos(aux1(:)) + end do +! + do iexp=1,nterm + aux1(:)=alpha1(iexp)*sin1(:,iexp) + aux2(:)=alpha2(iexp)*cos1(:,iexp) + term1(:,iexp)=aux1(:)+aux2(:) + y_out(:)=y_out(:)+term1(:,iexp) + end do +! +!Calculate derivatives: +! + if(opt==2) then +! +! alpha1 +! + do iexp=1,nterm + deriv(:,iexp)=sin1(:,iexp) + end do +! +! alpha2 +! + do iexp=1,nterm + ii=nterm+iexp + deriv(:,ii)=cos1(:,iexp) + end do + end if + +end subroutine gaussfit_calc_deriv_c3 +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_gaussfit/gaussfit_calc_deriv_c2 +!! NAME +!! gaussfit_calc_deriv_c2 +!! +!! FUNCTION +!! Calculate expressions and derivatives for Gaussians fitting. +!! The Gaussians expressions are defined in the comments of "gaussfit_main" +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +subroutine gaussfit_calc_deriv_c2(nparam,nterm,nx,opt,param,x,y_out,& +& deriv) ! optional + +!Arguments ------------------------------- + integer,intent(in)::nparam !number of param + integer,intent(in)::nterm !number of gaussian expressions + integer,intent(in)::nx !number of point in the x grid + integer,intent(in)::opt !option: + !1) calculate only f(x) + !2) calculate f(x) and its derivatives + real(dp),intent(in)::param(nparam) !parameters + real(dp),intent(in)::x(nx) !xgrid + real(dp),intent(out)::y_out(nx) !f(x) + real(dp),optional,intent(out)::deriv(nx,nparam) !derivatives + +!Local variables------------------------------- + integer::iexp,ii + real(dp)::alpha1(nterm),alpha2(nterm),alpha3(nterm) + real(dp)::alpha4(nterm) + real(dp)::term1(nx,nterm) + real(dp)::sin1(nx,nterm),sin2(nx,nterm),cos1(nx,nterm),cos2(nx,nterm) + real(dp)::aux1(nx),aux2(nx) + +! ********************************************************************* + +! +!Initialize +! + y_out(:)=0.d0 +! +!Get param from param array: +! + alpha1(:)=param(1:nterm) + alpha2(:)=param(nterm+1:2*nterm) + alpha3(:)=param(2*nterm+1:3*nterm) + alpha4(:)=param(3*nterm+1:4*nterm) +! +!calculate useful quantities +! +! + do iexp=1,nterm + aux1(:)=alpha2(iexp)*x(:)**2 + sin1(:,iexp)=sin(aux1(:)) +! + aux1(:)=alpha4(iexp)*x(:)**2 + sin2(:,iexp)=sin(aux1(:)) +! + aux1(:)=alpha2(iexp)*x(:)**2 + cos1(:,iexp)=cos(aux1(:)) +! + aux1(:)=alpha4(iexp)*x(:)**2 + cos2(:,iexp)=cos(aux1(:)) + end do +! + do iexp=1,nterm + aux1(:)=alpha1(iexp)*sin1(:,iexp) + aux2(:)=alpha3(iexp)*cos2(:,iexp) + term1(:,iexp)=aux1(:)+aux2(:) + y_out(:)=y_out(:)+term1(:,iexp) + end do +! +!Calculate derivatives: +! + if(opt==2) then +! +! alpha1 +! + do iexp=1,nterm + deriv(:,iexp)=sin1(:,iexp) + end do +! +! alpha2 +! + do iexp=1,nterm + ii=nterm+iexp + aux1(:)=alpha1(iexp)*cos1(:,iexp)*x(:)**2 + deriv(:,ii)=aux1(:) + end do +! +! alpha3 +! + do iexp=1,nterm + ii=2*nterm+iexp + deriv(:,ii)=cos2(:,iexp) + end do +! +! alpha4 +! + do iexp=1,nterm + ii=3*nterm+iexp + aux1(:)=-alpha3(iexp)*sin2(:,iexp)*x(:)**2 + deriv(:,ii)=aux1(:) + end do + end if + +end subroutine gaussfit_calc_deriv_c2 +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_gaussfit/gaussfit_calc_deriv_c +!! NAME +!! gaussfit_calc_deriv_c +!! +!! FUNCTION +!! Calculate expressions and derivatives for Gaussians fitting. +!! The Gaussians expressions are defined in the comments of "gaussfit_main" +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +subroutine gaussfit_calc_deriv_c(nparam,nterm,nx,opt,param,x,y_out,& +& deriv) ! optional + +!Arguments ------------------------------- + integer,intent(in)::nparam !number of parameters + integer,intent(in)::nterm !number of gaussian expressions + integer,intent(in)::nx !number of point in the x grid + integer,intent(in)::opt !option: + !1) calculate only f(x) + !2) calculate f(x) and its derivatives + real(dp),intent(in)::param(nparam) !parameters + real(dp),intent(in)::x(nx) !xgrid + real(dp),intent(out)::y_out(nx) !f(x) + real(dp),optional,intent(out)::deriv(nx,nparam) !derivatives + +!Local variables------------------------------- + integer::iexp,ii + real(dp)::alpha1(nterm),alpha2(nterm),alpha3(nterm) + real(dp)::alpha4(nterm),alpha5(nterm),alpha6(nterm) + real(dp)::aux1(nx),aux2(nx) + real(dp)::cos1(nx,nterm),cos2(nx,nterm),sin1(nx,nterm),sin2(nx,nterm) + real(dp)::term1(nx,nterm),term2(nx,nterm) + +! ********************************************************************* + +! +!Initialize +! + y_out(:)=0.d0 +! +!Get parameters from param array: +! + alpha1(:)=param(1:nterm) + alpha2(:)=param(nterm+1:2*nterm) + alpha3(:)=param(2*nterm+1:3*nterm) + alpha4(:)=param(3*nterm+1:4*nterm) + alpha5(:)=param(4*nterm+1:5*nterm) + alpha6(:)=param(5*nterm+1:6*nterm) +! +!calculate useful quantities +! + do iexp=1,nterm + aux1(:)=-alpha2(iexp)*x(:)**2 + term1(:,iexp)=alpha1(iexp)*exp(aux1(:)) + end do +! + do iexp=1,nterm + aux1(:)=alpha4(iexp)*x(:)**2 + sin1(:,iexp)=sin(aux1(:)) +! + aux1(:)=alpha6(iexp)*x(:)**2 + sin2(:,iexp)=sin(aux1(:)) +! + aux1(:)=alpha4(iexp)*x(:)**2 + cos1(:,iexp)=cos(aux1(:)) +! + aux1(:)=alpha6(iexp)*x(:)**2 + cos2(:,iexp)=cos(aux1(:)) + end do +! + do iexp=1,nterm + aux1(:)=alpha3(iexp)*sin1(:,iexp) + aux2(:)=alpha5(iexp)*cos2(:,iexp) + term2(:,iexp)=aux1(:)+aux2(:) + y_out(:)=y_out(:)+term1(:,iexp)*term2(:,iexp) + end do +! +!Calculate derivatives: +! + if(opt==2) then +! +! alpha1 +! + do iexp=1,nterm + aux1(:)=term1(:,iexp)/alpha1(iexp) + aux2(:)=aux1(:)*term2(:,iexp) + deriv(:,iexp)=aux2(:) + end do +! +! alpha2 +! + do iexp=1,nterm + ii=nterm+iexp + aux1(:)=-term1(:,iexp)*term2(:,iexp) + aux2(:)=aux1(:)*x(:)**2 + deriv(:,ii)=aux2(:) + end do +! +! alpha3 +! + do iexp=1,nterm + ii=2*nterm+iexp + aux1(:)=term1(:,iexp)*sin1(:,iexp) + deriv(:,ii)=aux1(:) + end do +! +! alpha4 +! + do iexp=1,nterm + ii=3*nterm+iexp + aux1(:)=term1(:,iexp)*alpha3(iexp) + aux2(:)=cos1(:,iexp)*x(:)**2 + deriv(:,ii)=aux2(:)*aux1(:) + end do +! +! alpha5 +! + do iexp=1,nterm + ii=4*nterm+iexp + aux1(:)=term1(:,iexp)*cos2(:,iexp) + deriv(:,ii)=aux1(:) + end do +! +! alpha6 +! + do iexp=1,nterm + ii=5*nterm+iexp + aux1(:)=-term1(:,iexp)*alpha5(iexp) + aux2(:)=sin2(:,iexp)*x(:)**2 + deriv(:,ii)=aux1(:)*aux2(:) + end do + end if + +end subroutine gaussfit_calc_deriv_c +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_gaussfit/gaussfit_calc_deriv_c4 +!! NAME +!! gaussfit_calc_deriv_c4 +!! +!! FUNCTION +!! Calculate expressions and derivatives for Gaussians fitting. +!! The Gaussians expressions are defined in the comments of "gaussfit_main" +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +subroutine gaussfit_calc_deriv_c4(nparam,nterm,nx,opt,param,x,y_out,& +& deriv) ! optional + +!Arguments ------------------------------- + integer,intent(in)::nparam !number of parameters + integer,intent(in)::nterm !number of gaussian expressions + integer,intent(in)::nx !number of point in the x grid + integer,intent(in)::opt !option: + !1) calculate only f(x) + !2) calculate f(x) and its derivatives + real(dp),intent(in)::param(nparam) !parameters + real(dp),intent(in)::x(nx) !xgrid + real(dp),intent(out)::y_out(nx) !f(x) + real(dp),optional,intent(out)::deriv(nx,nparam) !derivatives + +!Local variables------------------------------- + integer::iexp,ii + real(dp)::raux,sep + real(dp)::alpha1(nterm),alpha2(nterm),alpha3(nterm) + real(dp)::alpha4(nterm),alpha5(nterm) + real(dp)::aux1(nx),aux2(nx) + real(dp)::cos1(nx,nterm),sin1(nx,nterm) + real(dp)::term1(nx,nterm),term2(nx,nterm) + +! ********************************************************************* + +! +!Initialize +! + sep=1.1d0 + y_out(:)=0.d0 + +!Get parameters from param array: +! + alpha1(:)=param(1:nterm) + alpha2(:)=param(nterm+1:2*nterm) + alpha3(:)=param(2*nterm+1:3*nterm) + alpha4(:)=param(3*nterm+1:4*nterm) +! +! + raux=(2.d0*pi)/real(nterm,dp) + do ii=1,nterm + alpha5(ii)=sep**(ii) +! alpha5(ii)=raux*real(ii-1,dp) + end do +! +!calculate useful quantities +! + do iexp=1,nterm + aux1(:)=-alpha2(iexp)*x(:)**2 + term1(:,iexp)=alpha1(iexp)*exp(aux1(:)) + end do +! + do iexp=1,nterm + aux1(:)=alpha5(iexp)*x(:)**2 +! + sin1(:,iexp)=sin(aux1(:)) + cos1(:,iexp)=cos(aux1(:)) + end do +! + do iexp=1,nterm + aux1(:)=alpha3(iexp)*sin1(:,iexp) + aux2(:)=alpha4(iexp)*cos1(:,iexp) + term2(:,iexp)=aux1(:)+aux2(:) + y_out(:)=y_out(:)+term1(:,iexp)*term2(:,iexp) + end do +! +!Calculate derivatives: +! + if(opt==2) then +! +! alpha1 +! + do iexp=1,nterm + aux1(:)=term1(:,iexp)/alpha1(iexp) + aux2(:)=aux1(:)*term2(:,iexp) + deriv(:,iexp)=aux2(:) + end do +! +! alpha2 +! + do iexp=1,nterm + ii=nterm+iexp + aux1(:)=-term1(:,iexp)*term2(:,iexp) + aux2(:)=aux1(:)*x(:)**2 + deriv(:,ii)=aux2(:) + end do +! +! alpha3 +! + do iexp=1,nterm + ii=2*nterm+iexp + aux1(:)=term1(:,iexp)*sin1(:,iexp) + deriv(:,ii)=aux1(:) + end do +! +! alpha4 +! + do iexp=1,nterm + ii=3*nterm+iexp + aux1(:)=term1(:,iexp)*cos1(:,iexp) + deriv(:,ii)=aux1(:) + end do + end if + +end subroutine gaussfit_calc_deriv_c4 +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_gaussfit/gaussfit_rlsf +!! NAME +!! gaussfit_rlsf +!! +!! FUNCTION +!! Fits a given function to a sum of Gaussians. +!! Uses the Levenberg-Marquardt algorithm. +!! +!! COPYRIGHT +!! Copyright (C) 2011-2024 ABINIT group (T. Rangel) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! The original Levemberg Marquardt routines were written by Armando Sole +!! These were modified for the ARPUS spectra in the BigDFT code by A. Mirone. +!! These were re-writen in Fortran and further modified in ABINIT for our particular needs. +!! +!! INPUTS +!! option=1 fit to a1 cos(a2 x^2)+ a3 sin( a4 x^2) +!! 2 fit to a1 exp(-a2 x^2)*(a3 cos (a4 x^2) + a5 sin (a6 x^2) ) +!! 3 fit to a1 cos (k x^2) + a2 sin (k x^2) +!! 4 fit to a1 exp(-a2 x^2)* (a3 cos(k x^2)+ a4 sin (k x^2)) +!! if(option==1)mparam=nterm_bounds(2)*4 +!! if(option==2)mparam=nterm_bounds(2)*6 +!! if(option==3)mparam=nterm_bounds(2)*2 +!! if(option==4)mparam=nterm_bounds(2)*4 +!! +!! OUTPUT +!! +!! SOURCE + +subroutine gaussfit_rlsf(& +&chisq,constrains,limit,maxiter,& +&nterm,nparam,nx,option,parameters,& +&verbosity,weight,x,y) + +!Arguments ------------------------------- + real(dp),parameter::deltachi=tol10 + integer, intent(in) ::maxiter,nparam,nterm,nx + integer, intent(in) ::option ,verbosity + integer, intent(in) ::constrains(nparam) + real(dp),intent(out)::chisq + !arrays + real(dp),intent(in)::limit(nparam),weight(nparam) + real(dp),intent(inout)::parameters(nparam) + real(dp),intent(in)::x(nx),y(nx) + +!Local variables------------------------------- + integer::flag,ii,info,iter,jj,niter + real(dp):: deltax + real(dp)::chisq0,flambda,eta,lastdeltachi + integer::ipvt(nparam) + real(dp)::alpha(nparam,nparam) + real(dp)::alpha0(nparam,nparam),beta(nparam) + real(dp)::deltapar(nparam) + real(dp)::tmp1(nparam,nparam) + real(dp)::work(nparam) + real(dp)::workpar(nparam) + real(dp)::yfit(nx) + character(len=500) :: msg + +! ********************************************************************* + +! + !flambda=1e-6 + flambda=1e-7 +!iter=maxiter !later it is changed + niter=0 + deltax=x(2)-x(1) !we assume this is a linear grid +! + iter_loop: do iter=1,maxiter +! + call gaussfit_chisq_alpha_beta(alpha0,beta,chisq0,& +& nparam,nterm,nx,option,parameters,x,y) +! + flag=0 + lastdeltachi=chisq0 +! +! + while_flag: do + if(flag .ne. 0) exit while_flag +! + tmp1=0.d0 + do ii=1,nparam + tmp1(ii,ii)=1.d0*flambda !identity matrix * flambda + end do + alpha=alpha0+tmp1*alpha0 +! Invert alpha matrix + tmp1=alpha + call dgetrf(nparam,nparam,tmp1,nparam,ipvt,info) + if (.not.info==0) then + if(verbosity>1) then + write(msg,'(a)')'Matrix is singular' + call wrtout(std_out,msg,'COLL') + end if + chisq=-1.d0 + exit iter_loop + end if + call dgetri(nparam,tmp1,nparam,ipvt,work,nparam,info) + deltapar=0.d0 + if (.not.info==0) then + if(verbosity>2) then + write(msg,'(a)')'Matrix is singular' + call wrtout(std_out,msg,'COLL') + end if + chisq=-1.d0 + exit iter_loop + end if +! + if(tmp1(1,1) .ne. tmp1(1,1)) then !If is NaN + chisq=-1.d0 + exit iter_loop + end if + if(abs(tmp1(1,1)) == tmp1(1,1)*tmp1(1,1)) then !If is infinity + chisq=-1.d0 + exit iter_loop + end if +! + do ii=1,nparam + do jj=1,nparam + deltapar(ii)=deltapar(ii)+beta(jj)*tmp1(jj,ii) + end do + end do +! apply constrains + workpar(1:nparam)=parameters(1:nparam)+deltapar(1:nparam)*weight(1:nparam) + call gaussfit_apply_constrains(constrains,limit,nparam,workpar) +! + if(option==1) then + call gaussfit_calc_deriv_c2(nparam,nterm,nx,1,workpar,x,yfit) + elseif(option==2) then + call gaussfit_calc_deriv_c(nparam,nterm,nx,1,workpar,x,yfit) + elseif(option==3) then + call gaussfit_calc_deriv_c3(nparam,nterm,nx,1,workpar,x,yfit) + elseif(option==4) then + call gaussfit_calc_deriv_c4(nparam,nterm,nx,1,workpar,x,yfit) + end if + chisq=0.d0 + do ii=1,nx + chisq=chisq + ((y(ii)-yfit(ii)))**2 + end do + chisq=chisq*deltax +! +! write(*,'("chisq ",f12.5," chisq0 ",f12.5)')chisq,chisq0 +! + if(chisq > chisq0) then + flambda=flambda*2.0d0 + if( flambda > 1000.d0) then + flag=1 +! iter=0 + if(verbosity>2) then + write(msg,'(a)')'flambda > 1000.d0' + call wrtout(std_out,msg,'COLL') + end if + exit iter_loop + end if + else + flag=1 + parameters=workpar + eta=0.d0 + lastdeltachi=(chisq0-chisq) !/(chisq0+eta) + if(lastdeltachi2) then + write(msg,'("iter = ",i4," chisq = ",e15.6)')iter,chisq + call wrtout(std_out,msg,'COLL') + end if + end if + end do while_flag + end do iter_loop + +end subroutine gaussfit_rlsf +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_gaussfit/gaussfit_chisq_alpha_beta +!! NAME +!! gaussfit_chisq_alpha_beta +!! +!! FUNCTION +!! Finds chisq, alpha and beta parameters for LSF using the Levenberg-Marquardt algorithm. +!! +!! COPYRIGHT +!! Copyright (C) 2011-2024 ABINIT group (T. Rangel) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! The original Levemberg Marquardt routines were written by Armando Sole +!! These were modified for the ARPUS spectra in the BigDFT code by A. Mirone. +!! These were re-writen in Fortran and further modified in ABINIT for our particular needs. +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +subroutine gaussfit_chisq_alpha_beta(alpha,beta,chisq,& +& nparam,nterm,nx,option,parameters,x,y) + +!Arguments ------------------------------- + integer,intent(in)::nparam,nterm,nx + integer,intent(in)::option + real(dp),intent(out)::chisq + real(dp),intent(in)::parameters(nparam),x(nx),y(nx) + real(dp),intent(out)::alpha(nparam,nparam),beta(nparam) + +!Local variables------------------------------- + integer::ii,jj,kk + real(dp)::deltax,help1 + !arrays + real(dp)::deltay(nx),deriv(nx,nparam),derivi(nx) + real(dp)::yfit(nx) + real(dp)::help0(nx),help2(nx),help3(nparam) + +! ********************************************************************* + + deltax=x(2)-x(1) !we assume a linear grid +! + if(option==1) then + call gaussfit_calc_deriv_c2(nparam,nterm,nx,2,parameters,x,yfit,deriv) + elseif(option==2) then + call gaussfit_calc_deriv_c(nparam,nterm,nx,2,parameters,x,yfit,deriv) + elseif(option==3) then + call gaussfit_calc_deriv_c3(nparam,nterm,nx,2,parameters,x,yfit,deriv) + elseif(option==4) then + call gaussfit_calc_deriv_c4(nparam,nterm,nx,2,parameters,x,yfit,deriv) + end if + deltay=y-yfit + help0=deltay +! + do ii=1,nparam + derivi(:)=deriv(:,ii) + help1=0.d0 + do jj=1,nx + help1=help1+help0(jj)*derivi(jj) + end do + beta(ii)=help1 +! help1 = innerproduct(deriv,weight*derivi) +! below I use help3 instead for the array dimenstions + help3=0.d0 + do kk=1,nparam + do jj=1,nx + help3(kk)=help3(kk)+deriv(jj,kk)*derivi(jj) + end do + end do +! ! + alpha(:,ii)=help3(:) + end do +! + help2(:)=help0(:)*deltay(:) + chisq=sum(help2) + chisq=chisq*deltax + +end subroutine gaussfit_chisq_alpha_beta +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_gaussfit/gaussfit_set_param1 +!! NAME +!! gaussfit_set_param1 +!! +!! FUNCTION +!! Sets parameters for LSF +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SOURCE + +subroutine gaussfit_set_param1(nterm,nparam,nx,param,sep,x,y) + +!Arguments ------------------------------- + integer,intent(in)::nterm,nparam,nx + real(dp),intent(in)::sep + real(dp),intent(in)::x(nx),y(nx) + real(dp),intent(out)::param(nparam) + +!Local variables------------------------------- + integer::ii,jj + real(dp)::raux + +! ********************************************************************* + +! + param(:)=1.0d0 +!exps=1.0/(x(nx)**2) +! +!alpha1 + +!raux=maxval( y(:),nx ) +!maxval gives problems in some architectures: + raux=-9999999 + do ii=1,nx + if(raux=paw radial mesh and related data +!! tproj= projectors +!! maxterm= maximum number of terms used to fit the projectors. +!! mparam= maximum number of parameters (Gaussian coefficients and factors) used. +!! +!! OUTPUT +!! nparam_array= number of parameters found. +!! param = parameters found (Gaussian coefficients and factors). +!! +!! NOTES +!! chisq=accuracy_p= sum_x abs(f(x)-y(x))/nx. +!! nx is the number of points, f(x) and y(x) are the fitted and original functions. +!! +!! SOURCE + +subroutine gaussfit_projector(basis_size,mparam,nparam_array,nterm_bounds,orbitals,param,pawrad,& +& rpaw,tproj,comm_mpi) + +!Arguments ------------------------------------ + integer,intent(in) :: basis_size + integer,intent(in) :: orbitals(basis_size) + integer, optional,intent(in) :: comm_mpi + real(dp),intent(in) :: rpaw + type(pawrad_type),intent(in) :: pawrad + real(dp),intent(in) :: tproj(:,:) + integer,intent(in) :: mparam,nterm_bounds(2) + integer,intent(out) :: nparam_array(basis_size) + real(dp),intent(out) :: param(mparam,basis_size) + type(pawrad_type)::mesh_tmp + +!Local variables ------------------------------ + integer :: ibasis,ierr,il,ir + integer :: msz1,msz2,option + real(dp) :: raux(1),rr(1) + real(dp),allocatable :: d2(:),tproj_tmp1(:),tproj_tmp2(:) + character(len=500) :: msg + character(80) :: outfile + !debug: uncomment + !integer::i,nterm ,unitp + !real(dp),allocatable::y(:) + !end debug + +!************************************************************************ + + if(size(tproj,2)=1 from atompaw, and phi=phi*r, alors proj=proj/r + + tproj_tmp1(2:msz1)=tproj_tmp1(2:msz1)/(pawrad%rad(2:msz1)) + call pawrad_deducer0(tproj_tmp1(1:msz1),msz1,pawrad) + +! splint to a different mesh: +! get second derivative of tproj and store it + call paw_spline(pawrad%rad,tproj_tmp1(:),msz1,& +& zero,zero,d2) + + do ir=2,msz2 + rr=mesh_tmp%rad(ir) + if( rr(1)-rpaw > tol8 ) then + !after rpaw projectors are zero + raux=zero + else + call paw_splint(msz1,pawrad%rad,& +& tproj_tmp1(:),d2(:),& +& 1,rr,raux,ierr=ierr) + end if + tproj_tmp2(ir)=raux(1) + end do + +! Obtain the name for the output file + if(ibasis<10) then + write(outfile,'("wfn",i1,".fit")')ibasis + elseif(ibasis<100) then + write(outfile,'("wfn",i2,".fit")')ibasis + write(msg,'(a,a,a,a)')ch10,& +& "ib (basis index) is too big!",ch10,& +& "Action: check your pseudopotentials" + LIBPAW_BUG(msg) + end if + + if(present(comm_mpi)) then + call gaussfit_main(mparam,nparam_array(ibasis),nterm_bounds,msz2,& +& param(:,ibasis),mesh_tmp,option,outfile,rpaw,tproj_tmp2,comm_mpi) + else + call gaussfit_main(mparam,nparam_array(ibasis),nterm_bounds,msz2,& +& param(:,ibasis),mesh_tmp,option,outfile,rpaw,tproj_tmp2) + end if + +! check +! LIBPAW_ALLOCATE(y,(mesh_tmp%mesh_size)) +! nterm=nparam_array(ibasis)/4 +! call calcgaussc4(nparam_array(ibasis),nterm,mesh_tmp%mesh_size,1,param(:,ibasis),& +! & mesh_tmp%rad,y) +! ! unitp=600+ibasis +! ! do ir=1,mesh_tmp%mesh_size +! ! write(unitp,'(2(f16.7,x,f16.7))')mesh_tmp%rad(ir),y(ir) +! ! end do +! LIBPAW_DEALLOCATE(y) + + end do + +!Deallocate + call pawrad_free(mesh_tmp) + LIBPAW_DEALLOCATE(tproj_tmp1) + LIBPAW_DEALLOCATE(tproj_tmp2) + LIBPAW_DEALLOCATE(d2) + +end subroutine gaussfit_projector +!!*** + +!---------------------------------------------------------------------- + +end module m_paw_gaussfit +!!*** diff --git a/GX-PAW/libpaw/src/m_paw_gaussfit.o b/GX-PAW/libpaw/src/m_paw_gaussfit.o new file mode 100644 index 00000000..9c2a7ed7 Binary files /dev/null and b/GX-PAW/libpaw/src/m_paw_gaussfit.o differ diff --git a/GX-PAW/libpaw/src/m_paw_ij.F90 b/GX-PAW/libpaw/src/m_paw_ij.F90 new file mode 100644 index 00000000..73a64083 --- /dev/null +++ b/GX-PAW/libpaw/src/m_paw_ij.F90 @@ -0,0 +1,2866 @@ +!!****m* ABINIT/m_paw_ij +!! NAME +!! m_paw_ij +!! +!! FUNCTION +!! This module contains the definition of the paw_ij_type structured datatype, +!! as well as related functions and methods. +!! paw_ij_type variables contain various arrays given on (i,j) (partial waves) channels +!! for a given atom. +!! +!! COPYRIGHT +!! Copyright (C) 2013-2024 ABINIT group (MT, FJ) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! NOTES +!! FOR DEVELOPPERS: in order to preserve the portability of libPAW library, +!! please consult ~abinit/src/??_libpaw/libpaw-coding-rules.txt +!! +!! SOURCE + +#include "libpaw.h" + +MODULE m_paw_ij + + USE_DEFS + USE_MSG_HANDLING + USE_MPI_WRAPPERS + USE_MEMORY_PROFILING + + use m_paral_atom, only : get_my_atmtab, free_my_atmtab, get_my_natom + use m_pawtab, only : pawtab_type + use m_paw_io, only : pawio_print_ij + + implicit none + + private +!!*** + +!---------------------------------------------------------------------- + +!!****t* m_paw_ij/paw_ij_type +!! NAME +!! paw_ij_type +!! +!! FUNCTION +!! For PAW, various arrays given on (i,j) (partial waves) channels +!! +!! SOURCE + + type,public :: paw_ij_type + +!Integer scalars + + integer :: cplex_dij + ! cplex_dij=1 if dij are real + ! cplex_dij=2 if dij are complex (spin-orbit, non-collinear magnetism, magnetic field, ...) + + integer :: has_dij=0 + ! 1 if dij is allocated + ! 2 if dij is already computed + + integer :: has_dij0=0 + ! 1 if dij0 is allocated + ! 2 if dij0 is already computed + + integer :: has_dijexxc=0 + ! 1 if dijexxc is associated and used, 0 otherwise + ! 2 if dijexxc is already computed + + integer :: has_dijfock=0 + ! 1 if dijfock is allocated + ! 2 if dijfock is already computed + + integer :: has_dijfr=0 + ! 1 if dijfr is allocated + ! 2 if dijfr is already computed + + integer :: has_dijhartree=0 + ! 1 if dijhartree is allocated + ! 2 if dijhartree is already computed + + integer :: has_dijhat=0 + ! 1 if dijhat is allocated + ! 2 if dijhat is already computed + + integer :: has_dijnd=0 + ! on site term due to nuclear dipole moment + ! 1 if dijnd is associated and used, 0 otherwise + ! 2 if dijnd is already computed + + integer :: has_dijso=0 + ! 1 if dijso is associated and used, 0 otherwise + ! 2 if dijso is already computed + + integer :: has_dijU=0 + ! 1 if dijU is associated and used, 0 otherwise + ! 2 if dijU is already computed + + integer :: has_dijxc=0 + ! 1 if dijxc is associated and used, 0 otherwise + ! 2 if dijxc is already computed + + integer :: has_dijxc_hat=0 + ! 1 if dijxc_hat is associated and used, 0 otherwise + ! 2 if dijxc_hat is already computed + + integer :: has_dijxc_val=0 + ! 1 if dijxc_val is associated and used, 0 otherwise + ! 2 if dijxc_val is already computed + + integer :: has_exexch_pot=0 + ! 1 if PAW+(local exact exchange) potential is allocated + + integer :: has_pawu_occ=0 + ! 1 if PAW+U occupations are allocated + + integer :: itypat + ! itypat=type of the atom + + integer :: lmn_size + ! Number of (l,m,n) elements for the paw basis + + integer :: lmn2_size + ! lmn2_size=lmn_size*(lmn_size+1)/2 + ! where lmn_size is the number of (l,m,n) elements for the paw basis + + integer :: ndij + ! Number of components of dij + ! Usually ndij=nspden, except for nspinor==2 (where ndij=nspinor**2) + + integer :: nspden + ! Number of spin-density components (may be different from dtset%nspden if spin-orbit) + + integer :: nsppol + ! Number of independant spin-components + + integer :: qphase + ! qphase=2 if dij contain a exp(-i.q.r) phase (as in the q<>0 RF case), 1 if not + ! (this may change the ij symmetry) + +!Real (real(dp)) arrays + + real(dp), allocatable :: dij(:,:) + ! dij(cplex_dij*qphase*lmn2_size,ndij) + ! Dij term (non-local operator) + ! May be complex if cplex_dij=2 or qphase=2 + ! ==== Storage for the 1st dimension ==== + ! For each klmn=ij: + ! When Dij is complex (cplex_dij=2): + ! dij(2*ij-1,:) contains the real part + ! dij(2*ij ,:) contains the imaginary part + ! When a exp(-i.q.r) phase is included (qphase=2): + ! dij(1:cplex_dij*lmn2_size,:) + ! contains the real part of the phase, i.e. D_ij*cos(q.r) + ! dij(cplex_dij*lmn2_size+1:2*cplex_dij*lmn2_size,:) + ! contains the imaginary part of the phase, i.e. D_ij*sin(q.r) + ! ==== Storage for the 2nd dimension ==== + ! dij(:,1) contains Dij^up-up + ! dij(:,2) contains Dij^dn-dn + ! dij(:,3) contains Dij^up-dn (only if nspinor=2) + ! dij(:,4) contains Dij^dn-up (only if nspinor=2) + + real(dp), allocatable :: dij0(:) + ! dij0(lmn2_size) + ! Atomic part of Dij (read from PAW dataset) + ! Same storage as Dij (see above); always real, spin independent + + real(dp), allocatable :: dijexxc(:,:) + ! dijexxc(cplex_dij*lmn2_size,ndij) + ! On-site matrix elements of the Fock operator (Local Exact exchange implementation) + ! Same storage as Dij (see above); not available for RF (i.e. qphase=2) + + real(dp), allocatable :: dijfock(:,:) + ! dijfock(cplex_dij*lmn2_size,ndij) + ! Dij_fock term + ! Contains all contributions to Dij from Fock exchange + ! Same storage as Dij (see above); not available for RF (i.e. qphase=2) + + real(dp), allocatable :: dijfr(:,:) + ! dijhat(cplex_dij*qphase*lmn2_size,ndij) + ! For response function calculation only + ! RF Frozen part of Dij (depends on q vector but not on 1st-order wave function) + ! Same storage as Dij (see above) + + real(dp), allocatable :: dijhartree(:) + ! dijhartree(qphase*lmn2_size) + ! Dij_hartree term; contains all contributions to Dij from hartree + ! Warning: dimensioned only by qphase (exp(-iqr)), not cplex_dij + ! Same storage as Dij (see above); spin independent + + real(dp), allocatable :: dijhat(:,:) + ! dijhat(cplex_dij*qphase*lmn2_size,ndij) + ! Dij_hat term (non-local operator) i.e \sum_LM \int_FFT Q_{ij}^{LM} vtrial + ! Same storage as Dij (see above) + ! Same storage as Dij (see above) + + real(dp), allocatable :: dijnd(:,:) + ! dijnd(cplex_dij*lmn2_size,ndij) + ! On-site matrix elements of -\frac{1}{c}\mu\cdot L/r^3 + ! Same storage as Dij (see above) + + real(dp), allocatable :: dijso(:,:) + ! dijso(cplex_dij*qphase*lmn2_size,ndij) + ! On-site matrix elements of L.S i.e + ! Same storage as Dij (see above) + ! Same storage as Dij (see above); not available for RF (i.e. qphase=2) + + real(dp), allocatable :: dijU(:,:) + ! dijU(cplex_dij*qphase*lmn2_size,ndij) + ! On-site matrix elements of the U part of the PAW Hamiltonian. + ! Same storage as Dij (see above); not available for RF (i.e. qphase=2) + + real(dp), allocatable :: dijxc(:,:) + ! dijxc(cplex_dij*qphase*lmn2_size,ndij) + ! On-site matrix elements of vxc i.e + ! - + ! Same storage as Dij (see above) + + real(dp), allocatable :: dijxc_hat(:,:) + ! dijxc_hat(cplex_dij*lmn2_size,ndij) + ! Dij_hat term i.e \sum_LM \int_FFT Q_{ij}^{LM} Vxc + ! Same storage as Dij (see above); not available for RF (i.e. qphase=2) + + real(dp), allocatable :: dijxc_val(:,:) + ! dijxc_val(cplex_dij*lmn2_size,ndij) + ! Onsite matrix elements of valence-only vxc i.e + ! - + ! Same storage as Dij (see above); not available for RF (i.e. qphase=2) + + real(dp), allocatable :: noccmmp(:,:,:,:) + ! noccmmp(cplex_dij,2*lpawu+1,2*lpawu+1,nocc_nspden) + ! cplex_dij=1 if collinear + ! cplex_dij=2 if spin orbit is used + ! cplex_dij=2 is used if non-collinear (for coherence, it is not necessary in this case, however) + ! gives occupation matrix for lda+u (computed in setnoccmmp) + ! Stored as: noccmmp(:,:,1)= n^{up,up}_{m,mp} + ! noccmmp(:,:,2)= n^{dn,dn}_{m,mp} + ! noccmmp(:,:,3)= n^{up,dn}_{m,mp} + ! noccmmp(:,:,4)= n^{dn,up}_{m,mp} + ! noccmmp(m,mp,:) is computed from rhoij(klmn) with m=klmntomn(2)>mp=klmntomn(1) + + real(dp), allocatable :: nocctot(:) + ! nocctot(ndij) + ! gives trace of occupation matrix for lda+u (computed in pawdenpot) + ! for each value of ispden (1 or 2) + + real(dp), allocatable :: vpawx(:,:,:) + ! vpawx(1,2*lexexch+1,nspden) + ! exact exchange potential + + end type paw_ij_type + +!public procedures. + public :: paw_ij_init ! Creation method + public :: paw_ij_free ! Free memory + public :: paw_ij_nullify + public :: paw_ij_copy ! Copy object + public :: paw_ij_print ! Printout of the object + public :: paw_ij_gather ! MPI gather + public :: paw_ij_redistribute ! MPI redistribute + public :: paw_ij_reset_flags ! Resent the internal flags. + +!private procedures. + private :: paw_ij_isendreceive_getbuffer + private :: paw_ij_isendreceive_fillbuffer +!!*** + +CONTAINS + +!=========================================================== +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_ij/paw_ij_init +!! NAME +!! paw_ij_init +!! +!! FUNCTION +!! Initialize a Paw_ij data type. +!! +!! INPUTS +!! cplex=1 if no phase is applied (GS), 2 if a exp(-iqr) phase is applied (Response Function at q<>0) +!! natom=Number of atoms. +!! ntypat=Number of types of atoms in cell. +!! nspinor=number of spinor components +!! nsppol=Number of independent spin polarizations. +!! nspden=Number of spin-density components +!! pawspnorb=1 if spin-orbit coupling is activated +!! typat(natom)=Type of each atom +!! Pawtab(ntypat)=PAW tabulated starting data +!! +!! OPTIONAL INPUTS +!! has_dij=1 to allocate Paw_ij%dij, 0 otherwise (default) +!! has_dij0=1 to allocate Paw_ij%dij0, 0 otherwise (default) +!! has_dijfr=1 to allocate Paw_ij%dijfr, 0 otherwise (default) +!! has_dijhat=1 to allocate Paw_ij%dijhat, 0 otherwise (default) +!! has_dijxc=1 to allocate Paw_ij%dijxc, 0 otherwise (default) +!! has_dijxc_hat=1 to allocate Paw_ij%dijxc_hat, 0 otherwise (default) +!! has_dijxc_val=1 to allocate Paw_ij%dijxc_val, 0 otherwise (default) +!! has_dijhartree=1 to allocate Paw_ij%dijhartree, 0 otherwise (default) +!! has_dijfock=1 to allocate Paw_ij%dijfock, 0 otherwise (default) +!! has_dijnd=1 to allocate Paw_ij%dijnd, used only if some nucdipmom /= 0; otherwise 0 (default) +!! has_dijso=1 to allocate Paw_ij%dijso, used only if pawspnorb>0. 0 otherwise (default) +!! has_dijU=1 to allocate Paw_ij%dijU, used only if Pawtab(itypat)%usepawu/=0. 0 otherwise (default). +!! has_dijexxc=to allocate Paw_ij%dijxx, 0 otherwise (default) +!! has_exexch_pot=1 to allocate potential used in PAW+(local exact exchange) formalism, 0 otherwise (default) +!! has_pawu_occ=1 to allocate occupations used in PAW+U formalism, 0 otherwise (default) +!! nucdipmom(3,natom)= (optional) array of nuclear dipole moments at atomic sites +!! mpi_atmtab(:)=indexes of the atoms treated by current proc +!! comm_atom=MPI communicator over atoms +!! +!! OUTPUT +!! Paw_ij(natom)=data structure containing PAW arrays given on (i,j) channels. +!! In output all the basic dimensions are defined and the arrays are allocated +!! according to the input variables. +!! +!! SOURCE + +subroutine paw_ij_init(Paw_ij,cplex,nspinor,nsppol,nspden,pawspnorb,natom,ntypat,typat,Pawtab,& +& has_dij,has_dij0,has_dijfock,has_dijfr,has_dijhartree,has_dijhat,& ! Optional +& has_dijxc,has_dijxc_hat,has_dijxc_val,has_dijnd,has_dijso,has_dijU,has_dijexxc,& ! Optional +& has_exexch_pot,has_pawu_occ,nucdipmom,& ! Optional +& mpi_atmtab,comm_atom) ! optional arguments (parallelism) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: cplex,nspinor,nspden,nsppol,natom,ntypat,pawspnorb + integer,optional,intent(in) :: has_dij,has_dij0,has_dijfr,has_dijhat,has_dijxc,has_dijxc_hat,has_dijxc_val + integer,optional,intent(in) :: has_dijnd,has_dijso,has_dijhartree,has_dijfock,has_dijU,has_dijexxc + integer,optional,intent(in) :: has_exexch_pot,has_pawu_occ + integer,optional,intent(in) :: comm_atom + +!arrays + integer,intent(in) :: typat(natom) + integer,optional,target,intent(in) :: mpi_atmtab(:) + real(dp),optional,intent(in) :: nucdipmom(3,natom) + type(Paw_ij_type),intent(inout) :: Paw_ij(:) + type(Pawtab_type),intent(in) :: Pawtab(ntypat) + +!Local variables------------------------------- +!scalars + integer :: cplex_dij,iat,iat_tot,itypat,lmn2_size,my_comm_atom,my_natom,ndij,qphase + logical :: my_atmtab_allocated,paral_atom,with_nucdipmom +!arrays + integer,pointer :: my_atmtab(:) + +! ************************************************************************* + +!@Paw_ij_type + + with_nucdipmom=.false.;if (present(nucdipmom)) with_nucdipmom=any(abs(nucdipmom)>tol8) + +!Set up parallelism over atoms + my_natom=size(paw_ij);if (my_natom==0) return + paral_atom=(present(comm_atom).and.(my_natom/=natom)) + nullify(my_atmtab);if (present(mpi_atmtab)) my_atmtab => mpi_atmtab + my_comm_atom=xmpi_comm_self;if (present(comm_atom)) my_comm_atom=comm_atom + call get_my_atmtab(my_comm_atom,my_atmtab,my_atmtab_allocated,paral_atom,natom,my_natom_ref=my_natom) + + do iat=1,my_natom + iat_tot=iat;if (paral_atom) iat_tot=my_atmtab(iat) + itypat=typat(iat_tot) + + cplex_dij=1;if ((nspinor==2).or.(with_nucdipmom)) cplex_dij=2 + qphase=cplex + + lmn2_size =Pawtab(itypat)%lmn2_size + Paw_ij(iat)%qphase =qphase + Paw_ij(iat)%cplex_dij =cplex_dij + Paw_ij(iat)%itypat =itypat + Paw_ij(iat)%nspden =nspden + Paw_ij(iat)%nsppol =nsppol + Paw_ij(iat)%lmn_size =Pawtab(itypat)%lmn_size + Paw_ij(iat)%lmn2_size =lmn2_size + Paw_ij(iat)%ndij =MAX(nspinor**2,nspden) + + ndij=Paw_ij(iat)%ndij + + ! ================================== + ! === Allocations (all optional) === + ! ================================== + + ! === Allocation for total Dij === + Paw_ij(iat)%has_dij=0 + if (PRESENT(has_dij)) then + if (has_dij/=0) then + Paw_ij(iat)%has_dij=1 + LIBPAW_ALLOCATE(Paw_ij(iat)%dij,(cplex_dij*qphase*lmn2_size,ndij)) + Paw_ij(iat)%dij(:,:)=zero + end if + end if + + ! === Allocation for atomic Dij === + Paw_ij(iat)%has_dij0=0 + if (PRESENT(has_dij0)) then + if (has_dij0/=0) then + Paw_ij(iat)%has_dij0=1 + LIBPAW_ALLOCATE(Paw_ij(iat)%dij0,(lmn2_size)) + Paw_ij(iat)%dij0(:)=zero + end if + end if + + ! === Allocation for Dij local exact exchange === + Paw_ij(iat)%has_dijexxc=0 + if (PRESENT(has_dijexxc)) then + if (has_dijexxc/=0.and.Pawtab(itypat)%useexexch/=0) then + Paw_ij(iat)%has_dijexxc=1 + LIBPAW_ALLOCATE(Paw_ij(iat)%dijexxc,(cplex_dij*lmn2_size,ndij)) + Paw_ij(iat)%dijexxc(:,:)=zero + end if + end if + + ! === Allocation for Dij_Fock === + Paw_ij(iat)%has_dijfock=0 + if (PRESENT(has_dijfock)) then + if (has_dijfock/=0) then + Paw_ij(iat)%has_dijfock=1 + LIBPAW_ALLOCATE(Paw_ij(iat)%dijfock,(cplex_dij*lmn2_size,ndij)) + Paw_ij(iat)%dijfock(:,:)=zero + end if + end if + + ! === Allocation for frozen part of 1st-order Dij === + Paw_ij(iat)%has_dijfr=0 + if (PRESENT(has_dijfr)) then + if (has_dijfr/=0) then + Paw_ij(iat)%has_dijfr=1 + LIBPAW_ALLOCATE(Paw_ij(iat)%dijfr,(cplex_dij*qphase*lmn2_size,ndij)) + Paw_ij(iat)%dijfr(:,:)=zero + end if + end if + + ! === Allocation for Dij_Hartree === + Paw_ij(iat)%has_dijhartree=0 + if (PRESENT(has_dijhartree)) then + if (has_dijhartree/=0) then + Paw_ij(iat)%has_dijhartree=1 + LIBPAW_ALLOCATE(Paw_ij(iat)%dijhartree,(qphase*lmn2_size)) + Paw_ij(iat)%dijhartree(:)=zero + end if + end if + + ! === Allocation for Dij_hat === + Paw_ij(iat)%has_dijhat=0 + if (PRESENT(has_dijhat)) then + if (has_dijhat/=0) then + Paw_ij(iat)%has_dijhat=1 + LIBPAW_ALLOCATE(Paw_ij(iat)%dijhat,(cplex_dij*qphase*lmn2_size,ndij)) + Paw_ij(iat)%dijhat(:,:)=zero + end if + end if + + ! === Allocation for Dij nuclear dipole moment === + Paw_ij(iat)%has_dijnd=0 + if (PRESENT(has_dijnd)) then + if (has_dijnd/=0.and.with_nucdipmom) then + Paw_ij(iat)%has_dijnd=1 + LIBPAW_ALLOCATE(Paw_ij(iat)%dijnd,(cplex_dij*lmn2_size,ndij)) + Paw_ij(iat)%dijnd(:,:)=zero + end if + end if + + ! === Allocation for Dij_SO === + Paw_ij(iat)%has_dijso=0 + if (PRESENT(has_dijso)) then + if (has_dijso/=0.and.pawspnorb>0) then + Paw_ij(iat)%has_dijso=1 + LIBPAW_ALLOCATE(Paw_ij(iat)%dijso,(cplex_dij*qphase*lmn2_size,ndij)) + Paw_ij(iat)%dijso(:,:)=zero + end if + end if + + ! === Allocation for Dij_U_val === + Paw_ij(iat)%has_dijU=0 + if (PRESENT(has_dijU)) then + if (has_dijU/=0) then + Paw_ij(iat)%has_dijU=1 + LIBPAW_ALLOCATE(Paw_ij(iat)%dijU,(cplex_dij*qphase*lmn2_size,ndij)) + Paw_ij(iat)%dijU(:,:)=zero + end if + end if + + ! === Allocation for total Dij_XC === + Paw_ij(iat)%has_dijxc=0 + if (PRESENT(has_dijxc)) then + if (has_dijxc/=0) then + Paw_ij(iat)%has_dijxc=1 + LIBPAW_ALLOCATE(Paw_ij(iat)%dijxc,(cplex_dij*qphase*lmn2_size,ndij)) + Paw_ij(iat)%dijxc(:,:)=zero + end if + end if + + ! === Allocation for total Dij_XC_hat === + Paw_ij(iat)%has_dijxc_hat=0 + if (PRESENT(has_dijxc_hat)) then + if (has_dijxc_hat/=0) then + Paw_ij(iat)%has_dijxc_hat=1 + LIBPAW_ALLOCATE(Paw_ij(iat)%dijxc_hat,(cplex_dij*lmn2_size,ndij)) + Paw_ij(iat)%dijxc_hat(:,:)=zero + end if + end if + + ! === Allocation for total Dij_XC_val === + Paw_ij(iat)%has_dijxc_val=0 + if (PRESENT(has_dijxc_val)) then + if (has_dijxc_val/=0) then + Paw_ij(iat)%has_dijxc_val=1 + LIBPAW_ALLOCATE(Paw_ij(iat)%dijxc_val,(cplex_dij*lmn2_size,ndij)) + Paw_ij(iat)%dijxc_val(:,:)=zero + end if + end if + + ! === Allocation for PAW+U occupations === + Paw_ij(iat)%has_pawu_occ=0 + if (PRESENT(has_pawu_occ)) then + if (has_pawu_occ/=0.and.Pawtab(itypat)%usepawu/=0) then + Paw_ij(iat)%has_pawu_occ=1 + LIBPAW_ALLOCATE(Paw_ij(iat)%noccmmp,(cplex_dij,2*Pawtab(itypat)%lpawu+1,2*Pawtab(itypat)%lpawu+1,ndij)) + LIBPAW_ALLOCATE(Paw_ij(iat)%nocctot,(ndij)) + Paw_ij(iat)%noccmmp(:,:,:,:)=zero + Paw_ij(iat)%nocctot(:)=zero + end if + end if + + ! === Allocation for PAW+LEXX potential === + Paw_ij(iat)%has_exexch_pot=0 + if (PRESENT(has_exexch_pot)) then + if (has_exexch_pot/=0.and.Pawtab(itypat)%useexexch/=0) then + Paw_ij(iat)%has_exexch_pot=1 + ! TODO solve issue with first dimension + LIBPAW_ALLOCATE(Paw_ij(iat)%vpawx,(1,lmn2_size,nspden)) + Paw_ij(iat)%vpawx(:,:,:)=zero + end if + end if + + end do + +!Destroy atom table used for parallelism + call free_my_atmtab(my_atmtab,my_atmtab_allocated) + +end subroutine paw_ij_init +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_ij/paw_ij_free +!! NAME +!! paw_ij_free +!! +!! FUNCTION +!! Deallocate pointers and nullify flags in a paw_ij structure +!! +!! SIDE EFFECTS +!! paw_ij(:)=paw arrays given on (i,j) channels +!! +!! SOURCE + +subroutine paw_ij_free(Paw_ij) + +!Arguments ------------------------------------ +!arrays + type(Paw_ij_type),intent(inout) :: Paw_ij(:) + +!Local variables------------------------------- + integer :: iat,natom + +! ************************************************************************* + +!@Paw_ij_type + + natom=SIZE(Paw_ij);if (natom==0) return + + do iat=1,natom + if (allocated(Paw_ij(iat)%dij )) then + LIBPAW_DEALLOCATE(Paw_ij(iat)%dij) + end if + if (allocated(Paw_ij(iat)%dij0 )) then + LIBPAW_DEALLOCATE(Paw_ij(iat)%dij0) + end if + if (allocated(Paw_ij(iat)%dijexxc )) then + LIBPAW_DEALLOCATE(Paw_ij(iat)%dijexxc) + end if + if (allocated(Paw_ij(iat)%dijfock )) then + LIBPAW_DEALLOCATE(Paw_ij(iat)%dijfock) + end if + if (allocated(Paw_ij(iat)%dijfr )) then + LIBPAW_DEALLOCATE(Paw_ij(iat)%dijfr) + end if + if (allocated(Paw_ij(iat)%dijhartree)) then + LIBPAW_DEALLOCATE(Paw_ij(iat)%dijhartree) + end if + if (allocated(Paw_ij(iat)%dijhat )) then + LIBPAW_DEALLOCATE(Paw_ij(iat)%dijhat) + end if + if (allocated(Paw_ij(iat)%dijnd )) then + LIBPAW_DEALLOCATE(Paw_ij(iat)%dijnd) + end if + if (allocated(Paw_ij(iat)%dijU )) then + LIBPAW_DEALLOCATE(Paw_ij(iat)%dijU) + end if + if (allocated(Paw_ij(iat)%dijso )) then + LIBPAW_DEALLOCATE(Paw_ij(iat)%dijso) + end if + if (allocated(Paw_ij(iat)%dijxc )) then + LIBPAW_DEALLOCATE(Paw_ij(iat)%dijxc) + end if + if (allocated(Paw_ij(iat)%dijxc_hat )) then + LIBPAW_DEALLOCATE(Paw_ij(iat)%dijxc_hat) + end if + if (allocated(Paw_ij(iat)%dijxc_val )) then + LIBPAW_DEALLOCATE(Paw_ij(iat)%dijxc_val) + end if + if (allocated(Paw_ij(iat)%noccmmp )) then + LIBPAW_DEALLOCATE(Paw_ij(iat)%noccmmp) + end if + if (allocated(Paw_ij(iat)%nocctot )) then + LIBPAW_DEALLOCATE(Paw_ij(iat)%nocctot) + end if + if (allocated(Paw_ij(iat)%vpawx )) then + LIBPAW_DEALLOCATE(Paw_ij(iat)%vpawx) + end if + + ! === Reset all has_* flags === + Paw_ij(iat)%has_dij =0 + Paw_ij(iat)%has_dij0 =0 + Paw_ij(iat)%has_dijexxc =0 + Paw_ij(iat)%has_dijfock =0 + Paw_ij(iat)%has_dijfr =0 + Paw_ij(iat)%has_dijhartree=0 + Paw_ij(iat)%has_dijhat =0 + Paw_ij(iat)%has_dijnd =0 + Paw_ij(iat)%has_dijso =0 + Paw_ij(iat)%has_dijU =0 + Paw_ij(iat)%has_dijxc =0 + Paw_ij(iat)%has_dijxc_hat =0 + Paw_ij(iat)%has_dijxc_val =0 + Paw_ij(iat)%has_exexch_pot=0 + Paw_ij(iat)%has_pawu_occ =0 + end do + + !call paw_ij_nullify(Paw_ij) + +end subroutine paw_ij_free +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_ij/paw_ij_nullify +!! NAME +!! paw_ij_nullify +!! +!! FUNCTION +!! Reset all flags in a paw_ij structure +!! +!! SIDE EFFECTS +!! Paw_ij(:)=PAW arrays given on (i,j) channels. +!! +!! SOURCE + +subroutine paw_ij_nullify(Paw_ij) + +!Arguments ------------------------------------ +!arrays + type(Paw_ij_type),intent(inout) :: Paw_ij(:) + +!Local variables------------------------------- + integer :: iat,natom + +! ************************************************************************* + + !@Paw_ij_type + + ! MGPAW: This one could be removed/renamed, + ! variables can be initialized in the datatype declaration + ! Do we need to expose this in the public API? + + natom=SIZE(Paw_ij(:));if (natom==0) return + + ! Set all has_* flags to zero. + do iat=1,natom + ! === Set all has_* flags to zero === + Paw_ij(iat)%has_dij =0 + Paw_ij(iat)%has_dij0 =0 + Paw_ij(iat)%has_dijexxc =0 + Paw_ij(iat)%has_dijfock =0 + Paw_ij(iat)%has_dijfr =0 + Paw_ij(iat)%has_dijhartree=0 + Paw_ij(iat)%has_dijhat =0 + Paw_ij(iat)%has_dijnd =0 + Paw_ij(iat)%has_dijso =0 + Paw_ij(iat)%has_dijU =0 + Paw_ij(iat)%has_dijxc =0 + Paw_ij(iat)%has_dijxc_hat =0 + Paw_ij(iat)%has_dijxc_val =0 + Paw_ij(iat)%has_exexch_pot=0 + Paw_ij(iat)%has_pawu_occ =0 + end do !iat + +end subroutine paw_ij_nullify +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_ij/paw_ij_copy +!! NAME +!! paw_ij_copy +!! +!! FUNCTION +!! Copy one paw_ij datastructure into another +!! Can take into accound changes of dimensions +!! Can copy a shared paw_ij into distributed ones (when parallelism is activated) +!! +!! INPUTS +!! mpi_atmtab(:)=--optional-- indexes of the atoms treated by current proc +!! comm_atom=--optional-- MPI communicator over atoms +!! paw_ij_in(:)= input paw_ij datastructure +!! +!! SIDE EFFECTS +!! paw_ij_cpy(:)= output paw_ij datastructure +!! +!! NOTES +!! paw_ij_cpy must have been allocated in the calling function. +!! +!! SOURCE + +subroutine paw_ij_copy(paw_ij_in,paw_ij_cpy, & +& mpi_atmtab,comm_atom) ! optional arguments (parallelism) + +!Arguments ------------------------------------ +!scalars + integer,optional,intent(in) :: comm_atom +!arrays + integer,optional,target,intent(in) :: mpi_atmtab(:) + type(paw_ij_type),intent(in) :: paw_ij_in(:) + type(paw_ij_type),intent(inout),target :: paw_ij_cpy(:) + +!Local variables------------------------------- +!scalars +integer :: ij,ij1,my_comm_atom,my_paw_ij,npaw_ij_in,npaw_ij_max,npaw_ij_out,paral_case,sz1,sz2,sz3,sz4 +logical :: my_atmtab_allocated,paral_atom +character(len=500) :: msg +!arrays + integer,pointer :: my_atmtab(:) + type(paw_ij_type),pointer :: paw_ij_out(:) + +! ************************************************************************* + +!@Paw_ij_type + +!Retrieve sizes + npaw_ij_in=size(paw_ij_in);npaw_ij_out=size(paw_ij_cpy) + +!Set up parallelism over atoms + paral_atom=(present(comm_atom));if (paral_atom) paral_atom=(xmpi_comm_size(comm_atom)>1) + nullify(my_atmtab);if (present(mpi_atmtab)) my_atmtab => mpi_atmtab + my_comm_atom=xmpi_comm_self;if (present(comm_atom)) my_comm_atom=comm_atom + my_atmtab_allocated=.false. + +!Determine in which case we are (parallelism, ...) +!No parallelism: a single copy operation + paral_case=0;npaw_ij_max=npaw_ij_in + paw_ij_out => paw_ij_cpy + if (paral_atom) then + if (npaw_ij_out paw_ij_cpy + else + msg=' npaw_ij_out should be equal to my_paw_ij !' + LIBPAW_BUG(msg) + end if + else ! Parallelism: the copy operation is a gather + call get_my_natom(my_comm_atom,my_paw_ij,npaw_ij_out) + if (my_paw_ij==npaw_ij_in) then + paral_case=2;npaw_ij_max=npaw_ij_in + else + msg=' npaw_ij_in should be equal to my_paw_ij !' + LIBPAW_BUG(msg) + end if + end if + end if + +!First case: a simple copy or a scatter + if (npaw_ij_max>0.and.((paral_case==0).or.(paral_case==1))) then + call paw_ij_nullify(paw_ij_out) + +! Loop on paw_ij components + do ij1=1,npaw_ij_max + ij=ij1; if (paral_case==1) ij=my_atmtab(ij1) + + paw_ij_out(ij1)%qphase=paw_ij_in(ij)%qphase + paw_ij_out(ij1)%cplex_dij=paw_ij_in(ij)%cplex_dij + paw_ij_out(ij1)%has_dij=paw_ij_in(ij)%has_dij + paw_ij_out(ij1)%has_dij0=paw_ij_in(ij)%has_dij0 + paw_ij_out(ij1)%has_dijexxc=paw_ij_in(ij)%has_dijexxc + paw_ij_out(ij1)%has_dijfock=paw_ij_in(ij)%has_dijfock + paw_ij_out(ij1)%has_dijfr=paw_ij_in(ij)%has_dijfr + paw_ij_out(ij1)%has_dijhartree=paw_ij_in(ij)%has_dijhartree + paw_ij_out(ij1)%has_dijhat=paw_ij_in(ij)%has_dijhat + paw_ij_out(ij1)%has_dijnd=paw_ij_in(ij)%has_dijnd + paw_ij_out(ij1)%has_dijso=paw_ij_in(ij)%has_dijso + paw_ij_out(ij1)%has_dijU=paw_ij_in(ij)%has_dijU + paw_ij_out(ij1)%has_dijxc=paw_ij_in(ij)%has_dijxc + paw_ij_out(ij1)%has_dijxc_hat=paw_ij_in(ij)%has_dijxc_hat + paw_ij_out(ij1)%has_dijxc_val=paw_ij_in(ij)%has_dijxc_val + paw_ij_out(ij1)%has_exexch_pot=paw_ij_in(ij)%has_exexch_pot + paw_ij_out(ij1)%has_pawu_occ=paw_ij_in(ij)%has_pawu_occ + paw_ij_out(ij1)%itypat=paw_ij_in(ij)%itypat + paw_ij_out(ij1)%lmn_size=paw_ij_in(ij)%lmn_size + paw_ij_out(ij1)%lmn2_size=paw_ij_in(ij)%lmn2_size + paw_ij_out(ij1)%ndij=paw_ij_in(ij)%ndij + paw_ij_out(ij1)%nspden=paw_ij_in(ij)%nspden + paw_ij_out(ij1)%nsppol=paw_ij_in(ij)%nsppol + if (paw_ij_in(ij)%has_dij>=1) then + sz1=size(paw_ij_in(ij)%dij,1);sz2=size(paw_ij_in(ij)%dij,2) + LIBPAW_ALLOCATE(paw_ij_out(ij1)%dij,(sz1,sz2)) + if (paw_ij_in(ij)%has_dij==2) & +& paw_ij_out(ij1)%dij(:,:)=paw_ij_in(ij)%dij(:,:) + end if + if (paw_ij_in(ij)%has_dij0>=1) then + sz1=size(paw_ij_in(ij)%dij0,1) + LIBPAW_ALLOCATE(paw_ij_out(ij1)%dij0,(sz1)) + if (paw_ij_in(ij)%has_dij0 ==2) & +& paw_ij_out(ij1)%dij0(:)=paw_ij_in(ij)%dij0(:) + end if + if (paw_ij_in(ij)%has_dijexxc>=1) then + sz1=size(paw_ij_in(ij)%dijexxc,1);sz2=size(paw_ij_in(ij)%dijexxc,2) + LIBPAW_ALLOCATE(paw_ij_out(ij1)%dijexxc,(sz1,sz2)) + if (paw_ij_in(ij)%has_dijexxc==2) & +& paw_ij_out(ij1)%dijexxc(:,:)=paw_ij_in(ij)%dijexxc(:,:) + end if + if (paw_ij_in(ij)%has_dijfock>=1) then + sz1=size(paw_ij_in(ij)%dijfock,1);sz2=size(paw_ij_in(ij)%dijfock,2) + LIBPAW_ALLOCATE(paw_ij_out(ij1)%dijfock,(sz1,sz2)) + if (paw_ij_in(ij)%has_dijfock==2) & +& paw_ij_out(ij1)%dijfock(:,:)=paw_ij_in(ij)%dijfock(:,:) + end if + if (paw_ij_in(ij)%has_dijfr>=1) then + sz1=size(paw_ij_in(ij)%dijfr,1);sz2=size(paw_ij_in(ij)%dijfr,2) + LIBPAW_ALLOCATE(paw_ij_out(ij1)%dijfr,(sz1,sz2)) + if (paw_ij_in(ij)%has_dijfr==2) & +& paw_ij_out(ij1)%dijfr(:,:)=paw_ij_in(ij)%dijfr(:,:) + end if + if (paw_ij_in(ij)%has_dijhartree>=1) then + sz1=size(paw_ij_in(ij)%dijhartree,1) + LIBPAW_ALLOCATE(paw_ij_out(ij1)%dijhartree,(sz1)) + if (paw_ij_in(ij)%has_dijhartree==2) & +& paw_ij_out(ij1)%dijhartree(:)=paw_ij_in(ij)%dijhartree(:) + end if + if (paw_ij_in(ij)%has_dijhat>=1) then + sz1=size(paw_ij_in(ij)%dijhat,1);sz2=size(paw_ij_in(ij)%dijhat,2) + LIBPAW_ALLOCATE(paw_ij_out(ij1)%dijhat,(sz1,sz2)) + if (paw_ij_in(ij)%has_dijhat==2) & + & paw_ij_out(ij1)%dijhat(:,:)=paw_ij_in(ij)%dijhat(:,:) + end if + if (paw_ij_in(ij)%has_dijnd>=1) then + sz1=size(paw_ij_in(ij)%dijnd,1);sz2=size(paw_ij_in(ij)%dijnd,2) + LIBPAW_ALLOCATE(paw_ij_out(ij1)%dijnd,(sz1,sz2)) + if (paw_ij_in(ij)%has_dijnd==2) & +& paw_ij_out(ij1)%dijnd(:,:)=paw_ij_in(ij)%dijnd(:,:) + end if + if (paw_ij_in(ij)%has_dijU>=1) then + sz1=size(paw_ij_in(ij)%dijU,1);sz2=size(paw_ij_in(ij)%dijU,2) + LIBPAW_ALLOCATE(paw_ij_out(ij1)%dijU,(sz1,sz2)) + if (paw_ij_in(ij)%has_dijU==2) & +& paw_ij_out(ij1)%dijU(:,:)=paw_ij_in(ij)%dijU(:,:) + end if + if (paw_ij_in(ij)%has_dijso>=1) then + sz1=size(paw_ij_in(ij)%dijso,1);sz2=size(paw_ij_in(ij)%dijso,2) + LIBPAW_ALLOCATE(paw_ij_out(ij1)%dijso,(sz1,sz2)) + if (paw_ij_in(ij)%has_dijso==2) & +& paw_ij_out(ij1)%dijso(:,:)=paw_ij_in(ij)%dijso(:,:) + end if + if (paw_ij_in(ij)%has_dijxc>=1) then + sz1=size(paw_ij_in(ij)%dijxc,1);sz2=size(paw_ij_in(ij)%dijxc,2) + LIBPAW_ALLOCATE(paw_ij_out(ij1)%dijxc,(sz1,sz2)) + if (paw_ij_in(ij)%has_dijxc==2) & +& paw_ij_out(ij1)%dijxc(:,:)=paw_ij_in(ij)%dijxc(:,:) + end if + if (paw_ij_in(ij)%has_dijxc_hat>=1) then + sz1=size(paw_ij_in(ij)%dijxc_hat,1);sz2=size(paw_ij_in(ij)%dijxc_hat,2) + LIBPAW_ALLOCATE(paw_ij_out(ij1)%dijxc_hat,(sz1,sz2)) + if (paw_ij_in(ij)%has_dijxc_hat==2) & +& paw_ij_out(ij1)%dijxc_hat(:,:)=paw_ij_in(ij)%dijxc_hat(:,:) + end if + if (paw_ij_in(ij)%has_dijxc_val>=1) then + sz1=size(paw_ij_in(ij)%dijxc_val,1);sz2=size(paw_ij_in(ij)%dijxc_val,2) + LIBPAW_ALLOCATE(paw_ij_out(ij1)%dijxc_val,(sz1,sz2)) + if (paw_ij_in(ij)%has_dijxc_val==2) & +& paw_ij_out(ij1)%dijxc_val(:,:)=paw_ij_in(ij)%dijxc_val(:,:) + end if + if (paw_ij_in(ij)%has_pawu_occ>=1) then + sz1=size(paw_ij_in(ij)%noccmmp,1);sz2=size(paw_ij_in(ij)%noccmmp,2) + sz3=size(paw_ij_in(ij)%noccmmp,3);sz4=size(paw_ij_in(ij)%noccmmp,4) + LIBPAW_ALLOCATE(paw_ij_out(ij1)%noccmmp,(sz1,sz2,sz3,sz4)) + sz1=size(paw_ij_in(ij)%nocctot,1) + LIBPAW_ALLOCATE(paw_ij_out(ij1)%nocctot,(sz1)) + if (paw_ij_in(ij)%has_pawu_occ==2) then + paw_ij_out(ij1)%noccmmp(:,:,:,:)=paw_ij_in(ij)%noccmmp(:,:,:,:) + paw_ij_out(ij1)%nocctot(:)=paw_ij_in(ij)%nocctot(:) + end if + end if + if (paw_ij_in(ij)%has_exexch_pot >= 1) then + sz1=size(paw_ij_in(ij)%vpawx,1);sz2=size(paw_ij_in(ij)%vpawx,2) + sz3=size(paw_ij_in(ij)%vpawx,3) + LIBPAW_ALLOCATE(paw_ij_out(ij1)%vpawx,(sz1,sz2,sz3)) + if (paw_ij_in(ij)%has_exexch_pot==2) & +& paw_ij_out(ij1)%vpawx(:,:,:)=paw_ij_in(ij)%vpawx(:,:,:) + end if + + end do + end if + +!Second case: a gather + if (paral_case==2) then + call paw_ij_gather(paw_ij_in,paw_ij_cpy,-1,my_comm_atom) + end if + +!Destroy atom table used for parallelism + call free_my_atmtab(my_atmtab,my_atmtab_allocated) + +end subroutine paw_ij_copy +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_ij/paw_ij_print +!! NAME +!! paw_ij_print +!! +!! FUNCTION +!! Print out the content of a paw_ij datastructure (Dij only) +!! +!! INPUTS +!! [enunit]=governs the units to be used for the output of total Dij (0:Ha, 1:Ha+eV) +!! [ipert]=only for DFPT: index of the perturbation (0 for ground state) +!! [unit]=the unit number for output +!! [pawprtvol]=verbosity level +!! [pawspnorb]=1 if spin-orbit coupling is activated +!! [mode_paral]=either "COLL" or "PERS" +!! [mpi_atmtab(:)]=indexes of the atoms treated by current proc (can be computed here) +!! [comm_atom]=MPI communicator over atoms (needed if parallelism over atoms is activated) +!! [natom]=total number of atom (needed if parallelism over atoms is activated) +!! if Paw_ij is distributed, natom is different from size(Paw_ij). +!! +!! OUTPUT +!! (Only writing) +!! +!! NOTES +!! +!! SOURCE + +subroutine paw_ij_print(Paw_ij,unit,pawprtvol,pawspnorb,mode_paral,enunit,ipert, & +& mpi_atmtab,comm_atom,natom) + +!Arguments ------------------------------------ +!scalars + integer,optional,intent(in) :: enunit,ipert + integer,optional,intent(in) :: comm_atom,natom + integer,optional,intent(in) :: pawprtvol,pawspnorb + integer,optional,intent(in) :: unit + character(len=4),optional,intent(in) :: mode_paral +!arrays + integer,optional,target,intent(in) :: mpi_atmtab(:) + type(Paw_ij_type),target,intent(in) :: Paw_ij(:) + +!Local variables------------------------------- + character(len=7),parameter :: dspin(6)=(/"up ","down ","up-up ","dwn-dwn","up-dwn ","dwn-up "/) +!scalars + integer :: cplex_dij,iatom,iatom_tot,idij,idij_sym,lmn2_size,lmn_size,my_comm_atom,my_natom,nspden !klmn, + integer :: nsploop,nsppol,my_unt,ndij,qphase,tmp_cplex_dij,my_ipert,my_enunit,my_prtvol,size_paw_ij + logical :: my_atmtab_allocated,paral_atom + character(len=4) :: my_mode + character(len=2000) :: msg +!arrays + integer :: idum(0) + integer,pointer :: my_atmtab(:) + real(dp),allocatable,target :: dij(:),dijs(:),dijh(:,:) + real(dp),pointer :: dij2p(:),dij2p_(:) + +! ************************************************************************* + + if (.False.) write(std_out,*)"pawspnorb:",pawspnorb + +!@Paw_ij_type + size_paw_ij=SIZE(Paw_ij);if (size_paw_ij==0) return + + my_unt =std_out ; if (PRESENT(unit )) my_unt =unit + my_prtvol=0 ; if (PRESENT(pawprtvol )) my_prtvol=pawprtvol + my_mode ='COLL' ; if (PRESENT(mode_paral)) my_mode =mode_paral + my_ipert =0 ; if (PRESENT(ipert)) my_ipert =ipert + my_enunit=0 ; if (PRESENT(enunit)) my_enunit=enunit + my_natom=size_paw_ij; if (PRESENT(natom)) my_natom=natom + +!Set up parallelism over atoms + paral_atom=(present(comm_atom).and.my_natom/=size_paw_ij) + nullify(my_atmtab);if (present(mpi_atmtab)) my_atmtab => mpi_atmtab + my_comm_atom=xmpi_comm_self;if (present(comm_atom)) my_comm_atom=comm_atom + call get_my_atmtab(my_comm_atom,my_atmtab,my_atmtab_allocated,paral_atom,my_natom,my_natom_ref=size_paw_ij) + + if (abs(my_prtvol)>=1) then + if (my_ipert==0) then + write(msg,'(4a)')ch10,' ==== Values of psp strength Dij (Hartree) ============' + else + write(msg,'(4a)')ch10,' ==== Values of psp strength Dij(1) (Hartree) =========' + end if + call wrtout(my_unt,msg,my_mode) + end if + + nsppol = Paw_ij(1)%nsppol + nspden = Paw_ij(1)%nspden + nsploop= nsppol; if (Paw_ij(1)%ndij==4) nsploop=4 + + do iatom=1,size_paw_ij + + iatom_tot=iatom;if (paral_atom) iatom_tot=my_atmtab(iatom) + + lmn_size = Paw_ij(iatom)%lmn_size + lmn2_size = Paw_ij(iatom)%lmn2_size + cplex_dij = Paw_ij(iatom)%cplex_dij + qphase = Paw_ij(iatom)%qphase + ndij = Paw_ij(iatom)%ndij + + ! ==================================== + ! === Loop over density components === + ! ==================================== + do idij=1,nsploop + + idij_sym=idij;if (ndij==4.and.idij>2) idij_sym=7-idij + if (qphase==2) then + LIBPAW_ALLOCATE(dij,(2*lmn2_size)) + LIBPAW_ALLOCATE(dijs,(2*lmn2_size)) + end if + +! =================== Detailed output ===================================== + if (ABS(my_prtvol)>=1.and.(iatom_tot==1.or.iatom_tot==my_natom.or.my_prtvol<0)) then + + !Title + if (nspden==2.and.nsppol==1) then + write(msg,'(2a,i3,3a)')ch10,& +& ' >>>>>>>>>> Atom ',iatom_tot,':',ch10,& +& ' (antiferromagnetism case: only one spin component)' + else if (paw_ij(iatom)%ndij==1) then + write(msg, '(2a,i3,a)') ch10,& +& ' >>>>>>>>>> Atom ',iatom_tot,':' + else + write(msg,'(2a,i3,3a)') ch10,& +& ' >>>>>>>>>> Atom ',iatom_tot,' (component ',TRIM(dspin(idij+2*(nsploop/4))),'):' + end if + call wrtout(my_unt,msg,my_mode) + + !Dij atomic + if (Paw_ij(iatom)%has_dij0/=0.and.idij<=2.and.my_ipert<=0) then + write(msg,'(a)') ' ************ Dij atomic (Dij0) ***********' + call wrtout(my_unt,msg,my_mode) + call pawio_print_ij(my_unt,Paw_ij(iatom)%dij0,lmn2_size,1,lmn_size,-1,idum,0,my_prtvol,idum,-1.d0,1,& +& opt_sym=2,mode_paral=my_mode) + end if + + !Dij Local Exact Exchange + if (Paw_ij(iatom)%has_dijexxc/=0.and.(idij<=2.or.nspden==4).and.my_ipert<=0) then + write(msg,'(a)') ' ************* Dij_Local Exact exchange **********' + call wrtout(my_unt,msg,my_mode) + call get_dij_parts(cplex_dij,1,Paw_ij(iatom)%dijexxc) + call pawio_print_ij(my_unt,dij2p,lmn2_size,tmp_cplex_dij,lmn_size,-1,idum,0,& +& my_prtvol,idum,-1.d0,1,opt_sym=2,asym_ij=dij2p_,mode_paral=my_mode) + end if + + !Dij Fock + if (Paw_ij(iatom)%has_dijfock/=0.and.(idij<=2.or.nspden==4).and.my_ipert<=0) then + write(msg,'(a)') ' ************* Dij_Fock **********' + call wrtout(my_unt,msg,my_mode) + call get_dij_parts(cplex_dij,1,Paw_ij(iatom)%dijfock) + call pawio_print_ij(my_unt,dij2p,lmn2_size,tmp_cplex_dij,lmn_size,-1,idum,0,& +& my_prtvol,idum,-1.d0,1,opt_sym=2,asym_ij=dij2p_,mode_paral=my_mode) + end if + + !Dij Frozen (RF) + if (Paw_ij(iatom)%has_dijfr/=0.and.(idij<=2.or.nspden==4).and.my_ipert>0) then + write(msg,'(a)') ' ************** Dij(1) Frozen **************' + call wrtout(my_unt,msg,my_mode) + call get_dij_parts(cplex_dij,qphase,Paw_ij(iatom)%dijfr) + call pawio_print_ij(my_unt,dij2p,lmn2_size,tmp_cplex_dij,lmn_size,-1,idum,0,& +& my_prtvol,idum,-1.d0,1,opt_sym=2,asym_ij=dij2p_,mode_paral=my_mode) + end if + + !Dij Hartree + if (Paw_ij(iatom)%has_dijhartree/=0.and.idij<=2) then + if (my_ipert==0) then + write(msg,'(a)') ' ************** Dij Hartree ***************' + else + write(msg,'(a)') ' ************* Dij(1) Hartree *************' + end if + call wrtout(my_unt,msg,my_mode) + LIBPAW_ALLOCATE(dijh,(qphase*lmn2_size,1)) + dijh(:,1)=Paw_ij(iatom)%dijhartree(:) + call get_dij_parts(1,qphase,dijh) + call pawio_print_ij(my_unt,dij2p,lmn2_size,tmp_cplex_dij,lmn_size,-1,idum,0, & +& my_prtvol,idum,-1.d0,1,opt_sym=2,asym_ij=dij2p_,mode_paral=my_mode) + LIBPAW_DEALLOCATE(dijh) + end if + + !Dij Hat + if (Paw_ij(iatom)%has_dijhat/=0.and.(idij<=2.or.nspden==4)) then + if (my_ipert==0) then + write(msg,'(a)') ' **************** Dij_hat *****************' + else + write(msg,'(a)') ' ***** Dij_hat(1) (incl. frozen Dij) ******' + end if + call wrtout(my_unt,msg,my_mode) + call get_dij_parts(cplex_dij,qphase,Paw_ij(iatom)%dijhat) + call pawio_print_ij(my_unt,dij2p,lmn2_size,tmp_cplex_dij,lmn_size,-1,idum,0,& +& my_prtvol,idum,-1.d0,1,opt_sym=2,asym_ij=dij2p_,mode_paral=my_mode) + end if + + !Dij nuclear dipole + if (Paw_ij(iatom)%has_dijnd/=0) then + write(msg,'(a)') ' *********** Dij Nuclear Dipole **********' + call wrtout(my_unt,msg,my_mode) + call get_dij_parts(cplex_dij,1,Paw_ij(iatom)%dijnd,always_img=.true.) + call pawio_print_ij(my_unt,dij2p,lmn2_size,tmp_cplex_dij,lmn_size,-1,idum,0,& +& my_prtvol,idum,-1.d0,1,opt_sym=2,asym_ij=dij2p_,mode_paral=my_mode) + end if + + !Dij spin-orbit + if (Paw_ij(iatom)%has_dijso/=0.and.my_ipert<=0) then + write(msg,'(a)') ' ************** Dij SpinOrbit ************' + call wrtout(my_unt,msg,my_mode) + call get_dij_parts(cplex_dij,qphase,Paw_ij(iatom)%dijso,always_img=.true.) + call pawio_print_ij(my_unt,dij2p,lmn2_size,tmp_cplex_dij,lmn_size,-1,idum,0,& +& my_prtvol,idum,-1.d0,1,opt_sym=2,asym_ij=dij2p_,mode_paral=my_mode) + end if + + !Dij DFT+U + if (Paw_ij(iatom)%has_dijU/=0.and.(idij<=2.or.nspden==4).and.my_ipert<=0) then + write(msg,'(a)') ' ************* Dij_DFT+U (dijpawu) **********' + call wrtout(my_unt,msg,my_mode) + call get_dij_parts(cplex_dij,qphase,Paw_ij(iatom)%diju) + call pawio_print_ij(my_unt,dij2p,lmn2_size,tmp_cplex_dij,lmn_size,-1,idum,0,& +& my_prtvol,idum,-1.d0,1,opt_sym=2,asym_ij=dij2p_,mode_paral=my_mode) + end if + + !Dij XC + if (Paw_ij(iatom)%has_dijxc/=0.and.(idij<=2.or.nspden==4)) then + if (my_ipert<=0) then + write(msg,'(a)') ' ***************** Dij_xc *****************' + else + write(msg,'(a)') ' **************** Dij(1)_xc ***************' + end if + call wrtout(my_unt,msg,my_mode) + call get_dij_parts(cplex_dij,qphase,Paw_ij(iatom)%dijxc) + call pawio_print_ij(my_unt,dij2p,lmn2_size,tmp_cplex_dij,lmn_size,-1,idum,0,& +& my_prtvol,idum,-1.d0,1,opt_sym=2,asym_ij=dij2p_,mode_paral=my_mode) + end if + + !Dij hat XC + if (Paw_ij(iatom)%has_dijxc_hat/=0.and.(idij<=2.or.nspden==4).and.my_ipert<=0) then + if (my_ipert<=0) then + write(msg,'(a)') ' *************** Dijhat_xc ****************' + else + write(msg,'(a)') ' ************** Dij(1)hat_xc **************' + end if + call wrtout(my_unt,msg,my_mode) + call get_dij_parts(cplex_dij,1,Paw_ij(iatom)%dijxc_hat) + call pawio_print_ij(my_unt,dij2p,lmn2_size,tmp_cplex_dij,lmn_size,-1,idum,0,& +& my_prtvol,idum,-1.d0,1,opt_sym=2,asym_ij=dij2p_,mode_paral=my_mode) + end if + + !Dij XC val + if (Paw_ij(iatom)%has_dijxc_val/=0.and.(idij<=2.or.nspden==4).and.my_ipert<=0) then + write(msg, '(a)') ' *************** Dij_xc_val ***************' + call wrtout(my_unt,msg,my_mode) + call get_dij_parts(cplex_dij,1,Paw_ij(iatom)%dijxc_val) + call pawio_print_ij(my_unt,dij2p,lmn2_size,tmp_cplex_dij,lmn_size,-1,idum,0,& +& my_prtvol,idum,-1.d0,1,opt_sym=2,asym_ij=dij2p_,mode_paral=my_mode) + end if + + !Dij TOTAL + if (Paw_ij(iatom)%has_dij/=0) then + if (my_ipert<=0) then + write(msg,'(a)') ' ********** TOTAL Dij in Ha **********' + else + write(msg,'(a)') ' ********** TOTAL Dij(1) in Ha **********' + end if + call wrtout(my_unt,msg,my_mode) + call get_dij_parts(cplex_dij,qphase,Paw_ij(iatom)%dij,always_img=.true.) + call pawio_print_ij(my_unt,dij2p,lmn2_size,tmp_cplex_dij,lmn_size,-1,idum,0,& +& my_prtvol,idum,50.d0*dble(3-2*idij),1,opt_sym=2,asym_ij=dij2p_,mode_paral=my_mode) + if (my_enunit>0) then + if (my_ipert<=0) then + write(msg,'(a)') ' ********** TOTAL Dij in eV **********' + else + write(msg,'(a)') ' ********** TOTAL Dij(1) in eV **********' + end if + call pawio_print_ij(my_unt,dij2p,lmn2_size,tmp_cplex_dij,lmn_size,-1,idum,0,& +& my_prtvol,idum,-1._dp,2,opt_sym=2,asym_ij=dij2p_,mode_paral=my_mode) + end if + end if + + if (allocated(dij)) then + LIBPAW_DEALLOCATE(dij) + end if + if (allocated(dijs)) then + LIBPAW_DEALLOCATE(dijs) + end if + + end if !(ABS(my_prtvol)>=1.and.(iatom_tot==1.or.iatom_tot==my_natom.or.my_prtvol<0) + +! =================== Standard output ===================================== + if ((abs(my_prtvol)==0).and.(iatom_tot==1.or.iatom_tot==my_natom)) then + + !Title + if (idij==1) then + if (my_ipert<=0) then + write(msg, '(2a,i6,a)') ch10,' ****** Psp strength Dij in Ha (atom ',iatom_tot,') *****' + else + write(msg, '(2a,i6,a)') ch10,' **** Psp strength Dij(1) in Ha (atom ',iatom_tot,') *****' + end if + if (nspden==2.and.nsppol==1) then + write(msg,'(4a)') trim(msg),') *****',ch10,' (antiferromagnetism case: only one spin component)' + end if + call wrtout(my_unt,msg,my_mode) + end if + if (paw_ij(iatom)%ndij/=1) then + write(msg,'(3a)') ' Component ',trim(dspin(idij+2*(nsploop/4))),':' + call wrtout(my_unt,msg,my_mode) + end if + + !Dij TOTAL + if (Paw_ij(iatom)%has_dij/=0) then + call get_dij_parts(cplex_dij,qphase,Paw_ij(iatom)%dij,always_img=.true.) + call pawio_print_ij(my_unt,dij2p,lmn2_size,tmp_cplex_dij,lmn_size,-1,idum,0,& +& my_prtvol,idum,50.d0*dble(3-2*idij),1,opt_sym=2,asym_ij=dij2p_,mode_paral=my_mode) + end if + + end if + +! =================== End main loops ===================================== + + if (allocated(dij)) then + LIBPAW_DEALLOCATE(dij) + end if + if (allocated(dijs)) then + LIBPAW_DEALLOCATE(dijs) + end if + + end do !idij + end do !iat + + call wrtout(my_unt,' ',my_mode) + +!Small helper function + contains + +!Real and imaginary parts of phase. + subroutine get_dij_parts(my_cplex_dij,my_qphase,my_dij,always_img) + + integer,intent(in) :: my_cplex_dij,my_qphase + logical,intent(in),optional :: always_img + real(dp),intent(in),target :: my_dij(:,:) + integer :: my_idij,my_idij_sym,kk + logical :: always_img_ + always_img_=.false.;if(present(always_img)) always_img_=always_img + my_idij=min(size(my_dij,2),idij) + my_idij_sym=min(size(my_dij,2),idij_sym) + if (my_qphase==1) then + if ((idij<=nsppol.or.idij==2).and.(.not.always_img_))then + tmp_cplex_dij=1 + dij2p => my_dij(1:my_cplex_dij*lmn2_size:my_cplex_dij,my_idij) + dij2p_ => dij2p + else + tmp_cplex_dij=my_cplex_dij + dij2p => my_dij(1:my_cplex_dij*lmn2_size:1,my_idij) + dij2p_ => my_dij(1:my_cplex_dij*lmn2_size:1,my_idij_sym) + end if + else + tmp_cplex_dij=2 + if (my_cplex_dij==1) then + do kk=1,lmn2_size + dij(2*kk-1)= my_dij(kk,my_idij) + dij(2*kk )= my_dij(kk+lmn2_size,my_idij) + dijs(2*kk-1)= my_dij(kk,my_idij) + dijs(2*kk )=-my_dij(kk+lmn2_size,my_idij) + end do + else + do kk=1,lmn2_size + dij(2*kk-1)= my_dij(2*kk-1,idij)-my_dij(2*kk +2*lmn2_size,my_idij) + dij(2*kk )= my_dij(2*kk ,idij)+my_dij(2*kk-1+2*lmn2_size,my_idij) + dijs(2*kk-1)= my_dij(2*kk-1,idij_sym)+my_dij(2*kk +2*lmn2_size,my_idij_sym) + dijs(2*kk )= my_dij(2*kk ,idij_sym)-my_dij(2*kk-1+2*lmn2_size,my_idij_sym) + end do + end if + dij2p => dij ; dij2p_ => dijs + end if + end subroutine get_dij_parts + +end subroutine paw_ij_print +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_ij/paw_ij_gather +!! NAME +!! paw_ij_gather +!! +!! FUNCTION +!! (All)Gather paw_ij datastructures +!! +!! INPUTS +!! master=master receiving data ; if -1 do a ALLGATHER +!! comm_atom= communicator +!! paw_ij_in(:)= input paw_ij datastructures on every process +!! +!! OUTPUT +!! paw_ij_gathered(:)= output paw_oij datastructure +!! +!! SOURCE + +subroutine paw_ij_gather(paw_ij_in,paw_ij_gathered,master,comm_atom) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: master,comm_atom +!arrays + type(paw_ij_type),intent(in) :: paw_ij_in(:) + type(paw_ij_type),intent(inout) :: paw_ij_gathered(:) + +!Local variables------------------------------- +!scalars + integer :: buf_dp_size,buf_dp_size_all,buf_int_size,buf_int_size_all + integer :: cplxdij_lmn2_size,cplxdijq_lmn2_size,cplxq_lmn2_size + integer :: iat,ii,ierr,ij,indx_dp,indx_int,lmn2_size + integer :: me_atom,ndij,nocc,nocc1,nocc2,nocc3,nocc4,npaw_ij_in,npaw_ij_in_sum + integer :: npaw_ij_out,nproc_atom,nspden,sz1,sz2,sz3,sz4 + logical :: my_atmtab_allocated,paral_atom + character(len=500) :: msg +!arrays + integer :: bufsz(2) + integer,allocatable :: buf_int(:),buf_int_all(:) + integer,allocatable :: count_dp(:),count_int(:),count_tot(:),displ_dp(:),displ_int(:) + integer,pointer :: my_atmtab(:) + real(dp),allocatable :: buf_dp(:),buf_dp_all(:) + +! ************************************************************************* + +!@Paw_ij_type + + npaw_ij_in=size(paw_ij_in);npaw_ij_out=size(paw_ij_gathered) + + nproc_atom=xmpi_comm_size(comm_atom) + me_atom=xmpi_comm_rank(comm_atom) + +!Special case 1 process + if (nproc_atom==1) then + if (master==-1.or.me_atom==master) then + call paw_ij_free(paw_ij_gathered) + call paw_ij_nullify(paw_ij_gathered) + do iat=1,npaw_ij_in + paw_ij_gathered(iat)%cplex_dij =paw_ij_in(iat)%cplex_dij + paw_ij_gathered(iat)%qphase =paw_ij_in(iat)%qphase + Paw_ij_gathered(iat)%has_dij =paw_ij_in(iat)%has_dij + Paw_ij_gathered(iat)%has_dij0 =paw_ij_in(iat)%has_dij0 + Paw_ij_gathered(iat)%has_dijexxc =paw_ij_in(iat)%has_dijexxc + Paw_ij_gathered(iat)%has_dijfock =paw_ij_in(iat)%has_dijfock + Paw_ij_gathered(iat)%has_dijfr =paw_ij_in(iat)%has_dijfr + Paw_ij_gathered(iat)%has_dijhartree=paw_ij_in(iat)%has_dijhartree + Paw_ij_gathered(iat)%has_dijhat =paw_ij_in(iat)%has_dijhat + Paw_ij_gathered(iat)%has_dijnd =paw_ij_in(iat)%has_dijnd + Paw_ij_gathered(iat)%has_dijso =paw_ij_in(iat)%has_dijso + Paw_ij_gathered(iat)%has_dijU =paw_ij_in(iat)%has_dijU + Paw_ij_gathered(iat)%has_dijxc =paw_ij_in(iat)%has_dijxc + Paw_ij_gathered(iat)%has_dijxc_hat =paw_ij_in(iat)%has_dijxc_hat + Paw_ij_gathered(iat)%has_dijxc_val =paw_ij_in(iat)%has_dijxc_val + Paw_ij_gathered(iat)%has_exexch_pot=paw_ij_in(iat)%has_exexch_pot + Paw_ij_gathered(iat)%has_pawu_occ =paw_ij_in(iat)%has_pawu_occ + paw_ij_gathered(iat)%itypat =paw_ij_in(iat)%itypat + paw_ij_gathered(iat)%lmn_size =paw_ij_in(iat)%lmn_size + paw_ij_gathered(iat)%lmn2_size =paw_ij_in(iat)%lmn2_size + paw_ij_gathered(iat)%ndij =paw_ij_in(iat)%ndij + paw_ij_gathered(iat)%nspden =paw_ij_in(iat)%nspden + paw_ij_gathered(iat)%nsppol =paw_ij_in(iat)%nsppol + lmn2_size=paw_ij_gathered(iat)%lmn2_size + cplxdij_lmn2_size=paw_ij_gathered(iat)%cplex_dij*lmn2_size + cplxq_lmn2_size=paw_ij_gathered(iat)%qphase*lmn2_size + cplxdijq_lmn2_size=cplxdij_lmn2_size*paw_ij_gathered(iat)%qphase + ndij=paw_ij_gathered(iat)%ndij + nspden=paw_ij_gathered(iat)%nspden + if (paw_ij_gathered(iat)%has_dij>=1) then + LIBPAW_ALLOCATE(paw_ij_gathered(iat)%dij,(cplxdijq_lmn2_size,ndij)) + if (paw_ij_in(iat)%has_dij==2) then + paw_ij_gathered(iat)%dij=paw_ij_in(iat)%dij + end if + end if + if (paw_ij_gathered(iat)%has_dij0 >=1) then + LIBPAW_ALLOCATE(paw_ij_gathered(iat)%dij0,(lmn2_size)) + if (paw_ij_in(iat)%has_dij0==2) then + paw_ij_gathered(iat)%dij0=paw_ij_in(iat)%dij0 + end if + end if + if (paw_ij_gathered(iat)%has_dijexxc >=1) then + LIBPAW_ALLOCATE(paw_ij_gathered(iat)%dijexxc,(cplxdij_lmn2_size,ndij)) + if (paw_ij_in(iat)%has_dijexxc==2) then + paw_ij_gathered(iat)%dijexxc(:,:)=paw_ij_in(iat)%dijexxc(:,:) + end if + end if + if (paw_ij_gathered(iat)%has_dijfock >=1) then + LIBPAW_ALLOCATE(paw_ij_gathered(iat)%dijfock,(cplxdij_lmn2_size,ndij)) + if (paw_ij_in(iat)%has_dijfock==2) then + paw_ij_gathered(iat)%dijfock(:,:)=paw_ij_in(iat)%dijfock(:,:) + end if + end if + if (paw_ij_gathered(iat)%has_dijfr >=1) then + LIBPAW_ALLOCATE(paw_ij_gathered(iat)%dijfr,(cplxdijq_lmn2_size,ndij)) + if (paw_ij_in(iat)%has_dijfr==2) then + paw_ij_gathered(iat)%dijfr(:,:)=paw_ij_in(iat)%dijfr(:,:) + end if + end if + if (paw_ij_gathered(iat)%has_dijhartree >=1) then + LIBPAW_ALLOCATE(paw_ij_gathered(iat)%dijhartree,(cplxq_lmn2_size)) + if (paw_ij_in(iat)%has_dijhartree==2) then + paw_ij_gathered(iat)%dijhartree(:)=paw_ij_in(iat)%dijhartree(:) + end if + end if + if (paw_ij_gathered(iat)%has_dijhat >=1) then + LIBPAW_ALLOCATE(paw_ij_gathered(iat)%dijhat,(cplxdijq_lmn2_size,ndij)) + if (paw_ij_in(iat)%has_dijhat==2) then + paw_ij_gathered(iat)%dijhat(:,:)=paw_ij_in(iat)%dijhat(:,:) + end if + end if + if (paw_ij_gathered(iat)%has_dijnd >=1) then + LIBPAW_ALLOCATE(paw_ij_gathered(iat)%dijnd,(cplxdij_lmn2_size,ndij)) + if (paw_ij_in(iat)%has_dijnd==2) then + paw_ij_gathered(iat)%dijnd(:,:)=paw_ij_in(iat)%dijnd(:,:) + end if + end if + if (paw_ij_gathered(iat)%has_dijU >=1) then + LIBPAW_ALLOCATE(paw_ij_gathered(iat)%dijU,(cplxdijq_lmn2_size,ndij)) + if (paw_ij_in(iat)%has_dijU==2) then + paw_ij_gathered(iat)%dijU(:,:)=paw_ij_in(iat)%dijU(:,:) + end if + end if + if (paw_ij_gathered(iat)%has_dijso >=1) then + LIBPAW_ALLOCATE(paw_ij_gathered(iat)%dijso,(cplxdijq_lmn2_size,ndij)) + if (paw_ij_in(iat)%has_dijso==2) then + paw_ij_gathered(iat)%dijso(:,:)=paw_ij_in(iat)%dijso(:,:) + end if + end if + if (paw_ij_gathered(iat)%has_dijxc >=1) then + LIBPAW_ALLOCATE(paw_ij_gathered(iat)%dijxc,(cplxdijq_lmn2_size,ndij)) + if (paw_ij_in(iat)%has_dijxc==2) then + paw_ij_gathered(iat)%dijxc(:,:)=paw_ij_in(iat)%dijxc(:,:) + end if + end if + if (paw_ij_gathered(iat)%has_dijxc_hat >=1) then + LIBPAW_ALLOCATE(paw_ij_gathered(iat)%dijxc_hat,(cplxdij_lmn2_size,ndij)) + if (paw_ij_in(iat)%has_dijxc_hat==2) then + paw_ij_gathered(iat)%dijxc_hat(:,:)=paw_ij_in(iat)%dijxc_hat(:,:) + end if + end if + if (paw_ij_gathered(iat)%has_dijxc_val >=1) then + LIBPAW_ALLOCATE(paw_ij_gathered(iat)%dijxc_val,(cplxdij_lmn2_size,ndij)) + if (paw_ij_in(iat)%has_dijxc_val==2) then + paw_ij_gathered(iat)%dijxc_val(:,:)=paw_ij_in(iat)%dijxc_val(:,:) + end if + end if + if (paw_ij_gathered(iat)%has_pawu_occ >=1) then + LIBPAW_ALLOCATE(paw_ij_gathered(iat)%nocctot,(ndij)) + if (paw_ij_gathered(iat)%has_pawu_occ==2) then + paw_ij_gathered(iat)%nocctot(:)=paw_ij_in(iat)%nocctot(:) + if (allocated(paw_ij_in(iat)%noccmmp)) then + sz1=size(paw_ij_in(iat)%noccmmp,1);sz2=size(paw_ij_in(iat)%noccmmp,2) + sz3=size(paw_ij_in(iat)%noccmmp,3);sz4=size(paw_ij_in(iat)%noccmmp,4) + LIBPAW_ALLOCATE(paw_ij_gathered(iat)%noccmmp,(sz1,sz2,sz3,sz4)) + paw_ij_gathered(iat)%noccmmp(:,:,:,:)=paw_ij_in(iat)%noccmmp(:,:,:,:) + end if + end if + end if + if (paw_ij_in(iat)%has_exexch_pot >=1) then + sz1=size(paw_ij_in(iat)%vpawx,1);sz2=size(paw_ij_in(iat)%vpawx,2) + sz3=size(paw_ij_in(iat)%vpawx,3) + LIBPAW_ALLOCATE(paw_ij_gathered(iat)%vpawx,(sz1,sz2,sz3)) + if (paw_ij_in(iat)%has_exexch_pot==2) then + paw_ij_gathered(iat)%vpawx(:,:,:)=paw_ij_in(iat)%vpawx(:,:,:) + end if + end if + end do ! iat + end if + return + end if !nproc_atom =1 + +!Test on sizes + npaw_ij_in_sum=npaw_ij_in + + call xmpi_sum(npaw_ij_in_sum,comm_atom,ierr) + if (master==-1) then + if (npaw_ij_out/=npaw_ij_in_sum) then + msg='Wrong sizes sum[npaw_ij_ij]/=npaw_ij_out !' + LIBPAW_BUG(msg) + end if + else + if (me_atom==master.and.npaw_ij_out/=npaw_ij_in_sum) then + msg='(2) paw_ij_gathered wrongly allocated !' + LIBPAW_BUG(msg) + end if + end if + +!Retrieve table of atoms + paral_atom=.true.;nullify(my_atmtab) + call get_my_atmtab(comm_atom,my_atmtab,my_atmtab_allocated,paral_atom,npaw_ij_in_sum) + +!Compute sizes of buffers + buf_int_size=0;buf_dp_size=0 + do ij=1,npaw_ij_in + lmn2_size=paw_ij_in(ij)%lmn2_size + cplxdij_lmn2_size=paw_ij_in(ij)%cplex_dij*lmn2_size + cplxq_lmn2_size=paw_ij_in(ij)%qphase*lmn2_size + cplxdijq_lmn2_size=cplxdij_lmn2_size*paw_ij_in(ij)%qphase + ndij=paw_ij_in(ij)%ndij + buf_int_size=buf_int_size+24 + if (paw_ij_in(ij)%has_dij==2) then + buf_dp_size=buf_dp_size +cplxdijq_lmn2_size*ndij + end if + if (paw_ij_in(ij)%has_dij0==2) then + buf_dp_size=buf_dp_size +lmn2_size + end if + if (paw_ij_in(ij)%has_dijexxc==2) then + buf_dp_size=buf_dp_size +cplxdij_lmn2_size*ndij + end if + if (paw_ij_in(ij)%has_dijfock==2) then + buf_dp_size=buf_dp_size +cplxdij_lmn2_size*ndij + end if + if (paw_ij_in(ij)%has_dijfr==2) then + buf_dp_size=buf_dp_size +cplxdijq_lmn2_size*ndij + end if + if (paw_ij_in(ij)%has_dijhartree==2) then + buf_dp_size=buf_dp_size +cplxq_lmn2_size + end if + if (paw_ij_in(ij)%has_dijhat==2) then + buf_dp_size=buf_dp_size +cplxdijq_lmn2_size*ndij + end if + if (paw_ij_in(ij)%has_dijnd==2) then + buf_dp_size=buf_dp_size +cplxdij_lmn2_size*ndij + end if + if (paw_ij_in(ij)%has_dijso==2) then + buf_dp_size=buf_dp_size +cplxdijq_lmn2_size*ndij + end if + if (paw_ij_in(ij)%has_dijU==2) then + buf_dp_size=buf_dp_size +cplxdijq_lmn2_size*ndij + end if + if (paw_ij_in(ij)%has_dijxc==2) then + buf_dp_size=buf_dp_size +cplxdijq_lmn2_size*ndij + end if + if (paw_ij_in(ij)%has_dijxc_hat==2) then + buf_dp_size=buf_dp_size +cplxdij_lmn2_size*ndij + end if + if (paw_ij_in(ij)%has_dijxc_val==2) then + buf_dp_size=buf_dp_size +cplxdij_lmn2_size*ndij + end if + if (paw_ij_in(ij)%has_pawu_occ>=1) then + buf_int_size=buf_int_size+4 + buf_dp_size=buf_dp_size & +& +size(paw_ij_in(ij)%nocctot) & +& +size(paw_ij_in(ij)%noccmmp) + end if + if (paw_ij_in(ij)%has_exexch_pot>=1) then + buf_int_size=buf_int_size+3 + buf_dp_size=buf_dp_size +size(paw_ij_in(ij)%vpawx) + end if + end do + +!Fill input buffers + LIBPAW_ALLOCATE(buf_int,(buf_int_size)) + LIBPAW_ALLOCATE(buf_dp ,(buf_dp_size)) + indx_int=1;indx_dp=1 + do ij=1,npaw_ij_in + nspden=paw_ij_in(ij)%nspden + buf_int(indx_int)=my_atmtab(ij) ;indx_int=indx_int+1 + buf_int(indx_int)=paw_ij_in(ij)%cplex_dij ;indx_int=indx_int+1 + buf_int(indx_int)=paw_ij_in(ij)%qphase ;indx_int=indx_int+1 + buf_int(indx_int)=paw_ij_in(ij)%itypat ;indx_int=indx_int+1 + buf_int(indx_int)=paw_ij_in(ij)%nspden ;indx_int=indx_int+1 + buf_int(indx_int)=paw_ij_in(ij)%nsppol ;indx_int=indx_int+1 + buf_int(indx_int)=paw_ij_in(ij)%lmn_size ;indx_int=indx_int+1 + buf_int(indx_int)=paw_ij_in(ij)%lmn2_size ;indx_int=indx_int+1 + buf_int(indx_int)=paw_ij_in(ij)%ndij ;indx_int=indx_int+1 + buf_int(indx_int)=paw_ij_in(ij)%has_dij ;indx_int=indx_int+1 + buf_int(indx_int)=paw_ij_in(ij)%has_dij0 ;indx_int=indx_int+1 + buf_int(indx_int)=paw_ij_in(ij)%has_dijexxc ;indx_int=indx_int+1 + buf_int(indx_int)=paw_ij_in(ij)%has_dijfock ;indx_int=indx_int+1 + buf_int(indx_int)=paw_ij_in(ij)%has_dijfr ;indx_int=indx_int+1 + buf_int(indx_int)=paw_ij_in(ij)%has_dijhartree ;indx_int=indx_int+1 + buf_int(indx_int)=paw_ij_in(ij)%has_dijhat ;indx_int=indx_int+1 + buf_int(indx_int)=paw_ij_in(ij)%has_dijnd ;indx_int=indx_int+1 + buf_int(indx_int)=paw_ij_in(ij)%has_dijso ;indx_int=indx_int+1 + buf_int(indx_int)=paw_ij_in(ij)%has_dijU ;indx_int=indx_int+1 + buf_int(indx_int)=paw_ij_in(ij)%has_dijxc ;indx_int=indx_int+1 + buf_int(indx_int)=paw_ij_in(ij)%has_dijxc_hat ;indx_int=indx_int+1 + buf_int(indx_int)=paw_ij_in(ij)%has_dijxc_val ;indx_int=indx_int+1 + buf_int(indx_int)=paw_ij_in(ij)%has_exexch_pot ;indx_int=indx_int+1 + buf_int(indx_int)=paw_ij_in(ij)%has_pawu_occ ;indx_int=indx_int+1 + lmn2_size=paw_ij_in(ij)%lmn2_size + cplxdij_lmn2_size=paw_ij_in(ij)%cplex_dij*lmn2_size + cplxq_lmn2_size=paw_ij_in(ij)%qphase*lmn2_size + cplxdijq_lmn2_size=cplxdij_lmn2_size*paw_ij_in(ij)%qphase + ndij=paw_ij_in(ij)%ndij + if (paw_ij_in(ij)%has_dij==2) then + ii=cplxdijq_lmn2_size*ndij + buf_dp(indx_dp:indx_dp+ii-1)=reshape(paw_ij_in(ij)%dij,(/ii/)) + indx_dp=indx_dp+ii + end if + if (paw_ij_in(ij)%has_dij0==2) then + ii=lmn2_size + buf_dp(indx_dp:indx_dp+ii-1)=paw_ij_in(ij)%dij0(1:ii) + indx_dp=indx_dp+ii + end if + if (paw_ij_in(ij)%has_dijexxc==2) then + ii=cplxdij_lmn2_size*ndij + buf_dp(indx_dp:indx_dp+ii-1)=reshape(paw_ij_in(ij)%dijexxc,(/ii/)) + indx_dp=indx_dp+ii + end if + if (paw_ij_in(ij)%has_dijfock==2) then + ii=cplxdij_lmn2_size*ndij + buf_dp(indx_dp:indx_dp+ii-1)=reshape(paw_ij_in(ij)%dijfock,(/ii/)) + indx_dp=indx_dp+ii + end if + if (paw_ij_in(ij)%has_dijfr==2) then + ii=cplxdijq_lmn2_size*ndij + buf_dp(indx_dp:indx_dp+ii-1)=reshape(paw_ij_in(ij)%dijfr,(/ii/)) + indx_dp=indx_dp+ii + end if + if (paw_ij_in(ij)%has_dijhartree==2) then + ii=cplxq_lmn2_size + buf_dp(indx_dp:indx_dp+ii-1)=paw_ij_in(ij)%dijhartree(1:ii) + indx_dp=indx_dp+ii + end if + if (paw_ij_in(ij)%has_dijhat==2) then + ii=cplxdijq_lmn2_size*ndij + buf_dp(indx_dp:indx_dp+ii-1)=reshape(paw_ij_in(ij)%dijhat,(/ii/)) + indx_dp=indx_dp+ii + end if + if (paw_ij_in(ij)%has_dijnd==2) then + ii=cplxdij_lmn2_size*ndij + buf_dp(indx_dp:indx_dp+ii-1)=reshape(paw_ij_in(ij)%dijnd,(/ii/)) + indx_dp=indx_dp+ii + end if + if (paw_ij_in(ij)%has_dijso==2) then + ii=cplxdijq_lmn2_size*ndij + buf_dp(indx_dp:indx_dp+ii-1)=reshape(paw_ij_in(ij)%dijso,(/ii/)) + indx_dp=indx_dp+ii + end if + if (paw_ij_in(ij)%has_dijU==2) then + ii=cplxdijq_lmn2_size*ndij + buf_dp(indx_dp:indx_dp+ii-1)=reshape(paw_ij_in(ij)%dijU,(/ii/)) + indx_dp=indx_dp+ii + end if + if (paw_ij_in(ij)%has_dijxc==2) then + ii=cplxdijq_lmn2_size*ndij + buf_dp(indx_dp:indx_dp+ii-1)=reshape(paw_ij_in(ij)%dijxc,(/ii/)) + indx_dp=indx_dp+ii + end if + if (paw_ij_in(ij)%has_dijxc_hat==2) then + ii=cplxdij_lmn2_size*ndij + buf_dp(indx_dp:indx_dp+ii-1)=reshape(paw_ij_in(ij)%dijxc_hat,(/ii/)) + indx_dp=indx_dp+ii + end if + if (paw_ij_in(ij)%has_dijxc_val==2) then + ii=cplxdij_lmn2_size*ndij + buf_dp(indx_dp:indx_dp+ii-1)=reshape(paw_ij_in(ij)%dijxc_val,(/ii/)) + indx_dp=indx_dp+ii + end if + if (paw_ij_in(ij)%has_pawu_occ>=1)then + buf_int(indx_int)=size(paw_ij_in(ij)%noccmmp,1) ;indx_int=indx_int+1 + buf_int(indx_int)=size(paw_ij_in(ij)%noccmmp,2) ;indx_int=indx_int+1 + buf_int(indx_int)=size(paw_ij_in(ij)%noccmmp,3) ;indx_int=indx_int+1 + buf_int(indx_int)=size(paw_ij_in(ij)%noccmmp,4) ;indx_int=indx_int+1 + nocc=paw_ij_in(ij)%ndij + buf_dp(indx_dp:indx_dp+nocc-1)=paw_ij_in(ij)%nocctot(1:nocc) + indx_dp=indx_dp+nocc + nocc=size(paw_ij_in(ij)%noccmmp) + buf_dp(indx_dp:indx_dp+nocc-1)=reshape(paw_ij_in(ij)%noccmmp,(/nocc/)) + indx_dp=indx_dp+nocc + end if + if (paw_ij_in(ij)%has_exexch_pot>=1) then + sz1=size(paw_ij_in(ij)%vpawx,1);sz2=size(paw_ij_in(ij)%vpawx,2) + sz3=size(paw_ij_in(ij)%vpawx,3) + buf_int(indx_int)=sz1; indx_int=indx_int+1 + buf_int(indx_int)=sz2; indx_int=indx_int+1 + buf_int(indx_int)=sz3; indx_int=indx_int+1 + ii=sz1*sz2*sz3 + buf_dp(indx_dp:indx_dp+ii-1)=reshape(paw_ij_in(ij)%vpawx,(/(ii)/)) + indx_dp=indx_dp+ii + end if + end do + +!Check + indx_int=indx_int-1;indx_dp=indx_dp-1 + if ((indx_int/=buf_int_size).or.(indx_dp/=buf_dp_size)) then + write(msg,*) 'Wrong buffer sizes: buf_int_size=',buf_int_size, & + ' indx_int_size=',indx_int,' buf_dp_size=',buf_dp_size , ' indx_dp=', indx_dp + LIBPAW_BUG(msg) + end if + +!Communicate (1 gather for integers, 1 gather for reals) + LIBPAW_ALLOCATE(count_int,(nproc_atom)) + LIBPAW_ALLOCATE(displ_int,(nproc_atom)) + LIBPAW_ALLOCATE(count_dp ,(nproc_atom)) + LIBPAW_ALLOCATE(displ_dp ,(nproc_atom)) + LIBPAW_ALLOCATE(count_tot,(2*nproc_atom)) + bufsz(1)=buf_int_size; bufsz(2)=buf_dp_size + call xmpi_allgather(bufsz,2,count_tot,comm_atom,ierr) + do ij=1,nproc_atom + count_int(ij)=count_tot(2*ij-1) + count_dp (ij)=count_tot(2*ij) + end do + displ_int(1)=0;displ_dp(1)=0 + do ij=2,nproc_atom + displ_int(ij)=displ_int(ij-1)+count_int(ij-1) + displ_dp (ij)=displ_dp (ij-1)+count_dp (ij-1) + end do + buf_int_size_all=sum(count_int) + buf_dp_size_all =sum(count_dp) + LIBPAW_DEALLOCATE(count_tot) + if (master==-1.or.me_atom==master) then + LIBPAW_ALLOCATE(buf_int_all,(buf_int_size_all)) + LIBPAW_ALLOCATE(buf_dp_all ,(buf_dp_size_all)) + else + LIBPAW_ALLOCATE(buf_int_all,(0)) + LIBPAW_ALLOCATE(buf_dp_all ,(0)) + end if + if (master==-1) then + call xmpi_allgatherv(buf_int,buf_int_size,buf_int_all,count_int,displ_int,comm_atom,ierr) + call xmpi_allgatherv(buf_dp ,buf_dp_size ,buf_dp_all ,count_dp ,displ_dp ,comm_atom,ierr) + else + call xmpi_gatherv(buf_int,buf_int_size,buf_int_all,count_int,displ_int,master,comm_atom,ierr) + call xmpi_gatherv(buf_dp ,buf_dp_size ,buf_dp_all ,count_dp ,displ_dp ,master,comm_atom,ierr) + end if + LIBPAW_DEALLOCATE(count_int) + LIBPAW_DEALLOCATE(displ_int) + LIBPAW_DEALLOCATE(count_dp) + LIBPAW_DEALLOCATE(displ_dp) + +!Retrieve data from output buffer + if (master==-1.or.me_atom==master) then + indx_int=1;indx_dp=1 + call paw_ij_free(paw_ij_gathered) + call paw_ij_nullify(paw_ij_gathered) + do ij=1,npaw_ij_out + iat=buf_int_all(indx_int) ;indx_int=indx_int+1 + paw_ij_gathered(iat)%cplex_dij=buf_int_all(indx_int) ;indx_int=indx_int+1 + paw_ij_gathered(iat)%qphase=buf_int_all(indx_int) ;indx_int=indx_int+1 + paw_ij_gathered(iat)%itypat=buf_int_all(indx_int) ;indx_int=indx_int+1 + paw_ij_gathered(iat)%nspden=buf_int_all(indx_int) ;indx_int=indx_int+1 + paw_ij_gathered(iat)%nsppol=buf_int_all(indx_int) ;indx_int=indx_int+1 + paw_ij_gathered(iat)%lmn_size=buf_int_all(indx_int) ;indx_int=indx_int+1 + paw_ij_gathered(iat)%lmn2_size=buf_int_all(indx_int) ;indx_int=indx_int+1 + paw_ij_gathered(iat)%ndij=buf_int_all(indx_int) ;indx_int=indx_int+1 + paw_ij_gathered(iat)%has_dij=buf_int_all(indx_int) ;indx_int=indx_int+1 + paw_ij_gathered(iat)%has_dij0=buf_int_all(indx_int) ;indx_int=indx_int+1 + paw_ij_gathered(iat)%has_dijexxc=buf_int_all(indx_int) ;indx_int=indx_int+1 + paw_ij_gathered(iat)%has_dijfock=buf_int_all(indx_int) ;indx_int=indx_int+1 + paw_ij_gathered(iat)%has_dijfr=buf_int_all(indx_int) ;indx_int=indx_int+1 + paw_ij_gathered(iat)%has_dijhartree=buf_int_all(indx_int) ;indx_int=indx_int+1 + paw_ij_gathered(iat)%has_dijhat=buf_int_all(indx_int) ;indx_int=indx_int+1 + paw_ij_gathered(iat)%has_dijnd=buf_int_all(indx_int) ;indx_int=indx_int+1 + paw_ij_gathered(iat)%has_dijso=buf_int_all(indx_int) ;indx_int=indx_int+1 + paw_ij_gathered(iat)%has_dijU=buf_int_all(indx_int) ;indx_int=indx_int+1 + paw_ij_gathered(iat)%has_dijxc=buf_int_all(indx_int) ;indx_int=indx_int+1 + paw_ij_gathered(iat)%has_dijxc_hat=buf_int_all(indx_int) ;indx_int=indx_int+1 + paw_ij_gathered(iat)%has_dijxc_val=buf_int_all(indx_int) ;indx_int=indx_int+1 + paw_ij_gathered(iat)%has_exexch_pot=buf_int_all(indx_int) ;indx_int=indx_int+1 + paw_ij_gathered(iat)%has_pawu_occ=buf_int_all(indx_int) ;indx_int=indx_int+1 + if (paw_ij_gathered(iat)%has_pawu_occ>=1) then + nocc1=buf_int_all(indx_int) ;indx_int=indx_int+1 + nocc2=buf_int_all(indx_int) ;indx_int=indx_int+1 + nocc3=buf_int_all(indx_int) ;indx_int=indx_int+1 + nocc4=buf_int_all(indx_int) ;indx_int=indx_int+1 + else + nocc1=0;nocc2=0;nocc3=0;nocc4=0 + end if + lmn2_size=paw_ij_gathered(iat)%lmn2_size + cplxdij_lmn2_size=paw_ij_gathered(iat)%cplex_dij*lmn2_size + cplxq_lmn2_size=paw_ij_gathered(iat)%qphase*lmn2_size + cplxdijq_lmn2_size=cplxdij_lmn2_size*paw_ij_gathered(iat)%qphase + ndij=paw_ij_gathered(iat)%ndij + + if (paw_ij_gathered(iat)%has_dij>=1) then + ii=cplxdijq_lmn2_size + LIBPAW_ALLOCATE(paw_ij_gathered(iat)%dij,(ii,ndij)) + if (paw_ij_gathered(iat)%has_dij==2) then + paw_ij_gathered(iat)%dij(:,:)= & + & reshape(buf_dp_all(indx_dp:indx_dp+ii*ndij-1),(/ii,ndij/)) + indx_dp=indx_dp+ii*ndij + end if + end if + if (paw_ij_gathered(iat)%has_dij0 >=1) then + ii=lmn2_size + LIBPAW_ALLOCATE(paw_ij_gathered(iat)%dij0,(ii)) + if (paw_ij_gathered(iat)%has_dij0==2) then + paw_ij_gathered(iat)%dij0(:)=buf_dp_all(indx_dp:indx_dp+ii-1) + indx_dp=indx_dp+ii + end if + end if + if (paw_ij_gathered(iat)%has_dijexxc >=1) then + ii=cplxdij_lmn2_size + LIBPAW_ALLOCATE(paw_ij_gathered(iat)%dijexxc,(ii,ndij)) + if (paw_ij_gathered(iat)%has_dijexxc==2) then + paw_ij_gathered(iat)%dijexxc(:,:)= & +& reshape(buf_dp_all(indx_dp:indx_dp+ii*ndij-1),(/ii,ndij/)) + indx_dp=indx_dp+ii*ndij + end if + end if + if (paw_ij_gathered(iat)%has_dijfock >=1) then + ii=cplxdij_lmn2_size + LIBPAW_ALLOCATE(paw_ij_gathered(iat)%dijfock,(ii,ndij)) + if (paw_ij_gathered(iat)%has_dijfock==2) then + paw_ij_gathered(iat)%dijfock(:,:)= & +& reshape(buf_dp_all(indx_dp:indx_dp+ii*ndij-1),(/ii,ndij/)) + indx_dp=indx_dp+ii*ndij + end if + end if + if (paw_ij_gathered(iat)%has_dijfr >=1) then + ii=cplxdijq_lmn2_size + LIBPAW_ALLOCATE(paw_ij_gathered(iat)%dijfr,(ii,ndij)) + if (paw_ij_gathered(iat)%has_dijfr==2) then + paw_ij_gathered(iat)%dijfr(:,:)= & +& reshape(buf_dp_all(indx_dp:indx_dp+ii*ndij-1),(/ii,ndij/)) + indx_dp=indx_dp+ii*ndij + end if + end if + if (paw_ij_gathered(iat)%has_dijhartree >=1) then + ii=cplxq_lmn2_size + LIBPAW_ALLOCATE(paw_ij_gathered(iat)%dijhartree,(ii)) + if (paw_ij_gathered(iat)%has_dijhartree==2) then + paw_ij_gathered(iat)%dijhartree(:)=buf_dp_all(indx_dp:indx_dp+ii-1) + indx_dp=indx_dp+ii + end if + end if + if (paw_ij_gathered(iat)%has_dijhat >=1) then + ii=cplxdijq_lmn2_size + LIBPAW_ALLOCATE(paw_ij_gathered(iat)%dijhat,(ii,ndij)) + if (paw_ij_gathered(iat)%has_dijhat==2) then + paw_ij_gathered(iat)%dijhat(:,:)= & +& reshape(buf_dp_all(indx_dp:indx_dp+ii*ndij-1),(/ii,ndij/)) + indx_dp=indx_dp+ii*ndij + end if + endif + if (paw_ij_gathered(iat)%has_dijnd >=1) then + ii=cplxdij_lmn2_size + LIBPAW_ALLOCATE(paw_ij_gathered(iat)%dijnd,(ii,ndij)) + if (paw_ij_gathered(iat)%has_dijnd==2) then + paw_ij_gathered(iat)%dijnd(:,:)= & +& reshape(buf_dp_all(indx_dp:indx_dp+ii*ndij-1),(/ii,ndij/)) + indx_dp=indx_dp+ii*ndij + end if + end if + if (paw_ij_gathered(iat)%has_dijso >=1) then + ii=cplxdijq_lmn2_size + LIBPAW_ALLOCATE(paw_ij_gathered(iat)%dijso,(ii,ndij)) + if (paw_ij_gathered(iat)%has_dijso==2) then + paw_ij_gathered(iat)%dijso(:,:)= & +& reshape(buf_dp_all(indx_dp:indx_dp+ii*ndij-1),(/ii,ndij/)) + indx_dp=indx_dp+ii*ndij + end if + end if + if (paw_ij_gathered(iat)%has_dijU >=1) then + ii=cplxdijq_lmn2_size + LIBPAW_ALLOCATE(paw_ij_gathered(iat)%dijU,(ii,ndij)) + if (paw_ij_gathered(iat)%has_dijU==2) then + paw_ij_gathered(iat)%dijU(:,:)= & +& reshape(buf_dp_all(indx_dp:indx_dp+ii*ndij-1),(/ii,ndij/)) + indx_dp=indx_dp+ii*ndij + end if + end if + if (paw_ij_gathered(iat)%has_dijxc >=1) then + ii=cplxdijq_lmn2_size + LIBPAW_ALLOCATE(paw_ij_gathered(iat)%dijxc,(ii,ndij)) + if (paw_ij_gathered(iat)%has_dijxc==2) then + paw_ij_gathered(iat)%dijxc(:,:)= & +& reshape(buf_dp_all(indx_dp:indx_dp+ii*ndij-1),(/ii,ndij/)) + indx_dp=indx_dp+ii*ndij + end if + end if + if (paw_ij_gathered(iat)%has_dijxc_hat >=1) then + ii=cplxdij_lmn2_size + LIBPAW_ALLOCATE(paw_ij_gathered(iat)%dijxc_hat,(ii,ndij)) + if (paw_ij_gathered(iat)%has_dijxc_hat==2) then + paw_ij_gathered(iat)%dijxc_hat(:,:)= & +& reshape(buf_dp_all(indx_dp:indx_dp+ii*ndij-1),(/ii,ndij/)) + indx_dp=indx_dp+ii*ndij + end if + end if + if (paw_ij_gathered(iat)%has_dijxc_val >=1) then + ii=cplxdij_lmn2_size + LIBPAW_ALLOCATE(paw_ij_gathered(iat)%dijxc_val,(ii,ndij)) + if (paw_ij_gathered(iat)%has_dijxc_val==2) then + paw_ij_gathered(iat)%dijxc_val(:,:)= & +& reshape(buf_dp_all(indx_dp:indx_dp+ii*ndij-1),(/ii,ndij/)) + indx_dp=indx_dp+ii*ndij + end if + end if + if (paw_ij_gathered(iat)%has_pawu_occ >=1) then + nocc=paw_ij_gathered(iat)%ndij + LIBPAW_ALLOCATE(paw_ij_gathered(iat)%nocctot,(nocc)) + paw_ij_gathered(iat)%nocctot(1:nocc)=buf_dp_all(indx_dp:indx_dp+nocc-1) + indx_dp=indx_dp+nocc + nocc=nocc1*nocc2*nocc3*nocc4 + LIBPAW_ALLOCATE(paw_ij_gathered(iat)%noccmmp,(nocc1,nocc2,nocc3,nocc4)) + paw_ij_gathered(iat)%noccmmp(1:nocc1,1:nocc2,1:nocc3,1:nocc4)= & +& reshape(buf_dp_all(indx_dp:indx_dp+nocc-1),(/nocc1,nocc2,nocc3,nocc4/)) + indx_dp=indx_dp+nocc + end if + if (paw_ij_gathered(iat)%has_exexch_pot >=1) then + sz1=buf_int_all(indx_int);indx_int=indx_int+1 + sz2=buf_int_all(indx_int);indx_int=indx_int+1 + sz3=buf_int_all(indx_int);indx_int=indx_int+1 + LIBPAW_ALLOCATE(paw_ij_gathered(iat)%vpawx,(sz1,sz2,sz3)) + if (paw_ij_gathered(iat)%has_exexch_pot == 2) then + paw_ij_gathered(iat)%vpawx(:,:,:)=& +& reshape(buf_dp_all(indx_dp:indx_dp+sz1*sz2*sz3-1),(/sz1,sz2,sz3/)) + indx_dp=indx_dp+sz1*sz2*sz3 + end if + end if + end do + indx_int=indx_int-1;indx_dp=indx_dp-1 + if ((indx_int/=buf_int_size_all).or.(indx_dp/=buf_dp_size_all)) then + write(msg,*) 'Wrong buffer sizes: buf_int_size_all=',buf_int_size_all, & +& ' indx_int=',indx_int, ' buf_dp_size_all=',buf_dp_size_all,' indx_dp=',indx_dp + LIBPAW_BUG(msg) + end if + end if + +!Free memory + call free_my_atmtab(my_atmtab,my_atmtab_allocated) + LIBPAW_DEALLOCATE(buf_int) + LIBPAW_DEALLOCATE(buf_dp) + LIBPAW_DEALLOCATE(buf_int_all) + LIBPAW_DEALLOCATE(buf_dp_all) + +end subroutine paw_ij_gather +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_ij/paw_ij_redistribute +!! NAME +!! paw_ij_redistribute +!! +!! FUNCTION +!! Redistribute an array of paw_ij datastructures +!! Input paw_ij is given on a MPI communicator +!! Output paw_ij is redistributed on another MPI communicator +!! +!! INPUTS +!! mpi_comm_in= input MPI (atom) communicator +!! mpi_comm_out= output MPI (atom) communicator +!! mpi_atmtab_in= --optional-- indexes of the input paw_ij treated by current proc +!! if not present, will be calculated in the present routine +!! mpi_atmtab_out= --optional-- indexes of the output paw_ij treated by current proc +!! if not present, will be calculated in the present routine +!! natom= --optional-- total number of atoms +!! ----- Optional arguments used only for asynchronous communications ----- +!! RecvAtomProc(:)= rank of processor from which I expect atom (in mpi_comm_in) +!! RecvAtomList(:)= indexes of atoms to be received by me +!! RecvAtomList(irecv) are the atoms I expect from RecvAtomProc(irecv) +!! SendAtomProc(:)= ranks of process destination of atom (in mpi_comm_in) +!! SendAtomList(:)= indexes of atoms to be sent by me +!! SendAtomList(isend) are the atoms sent to SendAtomProc(isend) +!! +!! OUTPUT +!! [paw_ij_out(:)]= --optional-- +!! if present, the redistributed datastructure does not replace +!! the input one but is delivered in paw_ij_out +!! if not present, input and output datastructure are the same. +!! +!! SIDE EFFECTS +!! paw_ij(:)= input (and eventually output) paw_ij datastructures +!! +!! SOURCE + +subroutine paw_ij_redistribute(paw_ij,mpi_comm_in,mpi_comm_out,& +& natom,mpi_atmtab_in,mpi_atmtab_out,paw_ij_out,& +& SendAtomProc,SendAtomList,RecvAtomProc,RecvAtomList) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: mpi_comm_in,mpi_comm_out + integer,optional,intent(in) :: natom +!arrays + integer,intent(in),optional,target :: mpi_atmtab_in(:),mpi_atmtab_out(:) + type(paw_ij_type),allocatable,intent(inout) :: paw_ij(:) + type(paw_ij_type),pointer,optional :: paw_ij_out(:) !vz_i + integer,intent(in),optional :: SendAtomProc(:),SendAtomList(:),RecvAtomProc(:),RecvAtomList(:) + +!Local variables------------------------------- +!scalars + integer :: algo_option,i1,iatom,iat_in,iat_out,ierr,iircv,iisend,imsg,imsg_current + integer :: imsg1,iproc_rcv,iproc_send,ireq,me_exch,mpi_comm_exch,my_natom_in,my_natom_out,my_tag,natom_tot + integer :: nb_dp,nb_int,nb_msg,nbmsg_incoming,nbrecv,nbrecvmsg,nbsendreq,nbsent,nbsend,next,npaw_ij_sent + integer :: nproc_in,nproc_out + logical :: flag,in_place,message_yet_prepared,my_atmtab_in_allocated,my_atmtab_out_allocated,paral_atom +!arrays + integer :: buf_size(3),request1(3) + integer,pointer :: my_atmtab_in(:),my_atmtab_out(:) + integer,allocatable :: atmtab_send(:),atm_indx_in(:),atm_indx_out(:),From(:),buf_int1(:),request(:) + integer,allocatable,target:: buf_int(:) + integer,pointer :: buf_ints(:) + logical,allocatable :: msg_pick(:) + real(dp),allocatable :: buf_dp1(:) + real(dp),allocatable,target :: buf_dp(:) + real(dp),pointer :: buf_dps(:) + type(coeffi1_type),target,allocatable :: tab_buf_int(:),tab_buf_atom(:) + type(coeff1_type),target,allocatable :: tab_buf_dp(:) + type(paw_ij_type),allocatable :: paw_ij_all(:) + type(paw_ij_type),pointer :: paw_ij_out1(:) + +! ************************************************************************* + +!@Paw_ij_type + + in_place=(.not.present(paw_ij_out)) + my_natom_in=size(paw_ij) + +!If not "in_place", destroy the output datastructure + if (.not.in_place) then + if (associated(paw_ij_out)) then + call paw_ij_free(paw_ij_out) + LIBPAW_DATATYPE_DEALLOCATE(paw_ij_out) + end if + end if + +!Special sequential case + if (mpi_comm_in==xmpi_comm_self.and.mpi_comm_out==xmpi_comm_self) then + if ((.not.in_place).and.(my_natom_in>0)) then + LIBPAW_DATATYPE_ALLOCATE(paw_ij_out,(my_natom_in)) + call paw_ij_nullify(paw_ij_out) + call paw_ij_copy(paw_ij,paw_ij_out) + end if + return + end if + +!Get total natom + if (present(natom)) then + natom_tot=natom + else + natom_tot=my_natom_in + call xmpi_sum(natom_tot,mpi_comm_in,ierr) + end if + +!Select input distribution + if (present(mpi_atmtab_in)) then + my_atmtab_in => mpi_atmtab_in + my_atmtab_in_allocated=.false. + else + call get_my_atmtab(mpi_comm_in,my_atmtab_in,my_atmtab_in_allocated,& +& paral_atom,natom_tot,my_natom_in) + end if + +!Select output distribution + if (present(mpi_atmtab_out)) then + my_natom_out=size(mpi_atmtab_out) + my_atmtab_out => mpi_atmtab_out + my_atmtab_out_allocated=.false. + else + call get_my_natom(mpi_comm_out,my_natom_out,natom_tot) + call get_my_atmtab(mpi_comm_out,my_atmtab_out,my_atmtab_out_allocated,& +& paral_atom,natom_tot) + end if + +!Select algo according to optional input arguments + algo_option=1 + if (present(SendAtomProc).and.present(SendAtomList).and.& +& present(RecvAtomProc).and.present(RecvAtomList)) algo_option=2 + + +!Brute force algorithm (allgather + scatter) +!--------------------------------------------------------- + if (algo_option==1) then + + LIBPAW_DATATYPE_ALLOCATE(paw_ij_all,(natom_tot)) + call paw_ij_nullify(paw_ij_all) + call paw_ij_copy(paw_ij,paw_ij_all,comm_atom=mpi_comm_in,mpi_atmtab=my_atmtab_in) + if (in_place) then + call paw_ij_free(paw_ij) + LIBPAW_DATATYPE_DEALLOCATE(paw_ij) + LIBPAW_DATATYPE_ALLOCATE(paw_ij,(my_natom_out)) + call paw_ij_nullify(paw_ij) + call paw_ij_copy(paw_ij_all,paw_ij,comm_atom=mpi_comm_out,mpi_atmtab=my_atmtab_out) + else + LIBPAW_DATATYPE_ALLOCATE(paw_ij_out,(my_natom_out)) + call paw_ij_nullify(paw_ij_out) + call paw_ij_copy(paw_ij_all,paw_ij_out,comm_atom=mpi_comm_out,mpi_atmtab=my_atmtab_out) + end if + call paw_ij_free(paw_ij_all) + LIBPAW_DATATYPE_DEALLOCATE(paw_ij_all) + + +!Asynchronous algorithm (asynchronous communications) +!--------------------------------------------------------- + else if (algo_option==2) then + + nbsend=size(SendAtomProc) ; nbrecv=size(RecvAtomProc) + + if (in_place) then + if (my_natom_out > 0) then + LIBPAW_DATATYPE_ALLOCATE(paw_ij_out1,(my_natom_out)) + call paw_ij_nullify(paw_ij_out1) + else + LIBPAW_DATATYPE_ALLOCATE(paw_ij_out1,(0)) + end if + else + LIBPAW_DATATYPE_ALLOCATE(paw_ij_out,(my_natom_out)) + call paw_ij_nullify(paw_ij_out) + paw_ij_out1=>paw_ij_out + end if + + nproc_in=xmpi_comm_size(mpi_comm_in) + nproc_out=xmpi_comm_size(mpi_comm_out) + if (nproc_in<=nproc_out) mpi_comm_exch=mpi_comm_out + if (nproc_in>nproc_out) mpi_comm_exch=mpi_comm_in + me_exch=xmpi_comm_rank(mpi_comm_exch) + + +! Dimension put to the maximum to send + LIBPAW_ALLOCATE(atmtab_send,(nbsend)) + LIBPAW_ALLOCATE(atm_indx_in,(natom_tot)) + atm_indx_in=-1 + do iatom=1,my_natom_in + atm_indx_in(my_atmtab_in(iatom))=iatom + end do + LIBPAW_ALLOCATE(atm_indx_out,(natom_tot)) + atm_indx_out=-1 + do iatom=1,my_natom_out + atm_indx_out(my_atmtab_out(iatom))=iatom + end do + + LIBPAW_DATATYPE_ALLOCATE(tab_buf_int,(nbsend)) + LIBPAW_DATATYPE_ALLOCATE(tab_buf_dp,(nbsend)) + LIBPAW_DATATYPE_ALLOCATE(tab_buf_atom,(nbsend)) + LIBPAW_ALLOCATE(request,(3*nbsend)) + +! A send buffer in an asynchrone communication couldn't be deallocate before it has been receive + nbsent=0 ; ireq=0 ; iisend=0 ; nbsendreq=0 ; nb_msg=0 + do iisend=1,nbsend + iproc_rcv=SendAtomProc(iisend) + next=-1 + if (iisend < nbsend) next=SendAtomProc(iisend+1) + if (iproc_rcv /= me_exch) then + nbsent=nbsent+1 + atmtab_send(nbsent)=SendAtomList(iisend) ! we groups the atoms sends to the same process + if (iproc_rcv /= next) then + if (nbsent > 0 ) then +! Check if message has been yet prepared + message_yet_prepared=.false. + do imsg=1,nb_msg + if (size(tab_buf_atom(imsg)%value) /= nbsent) then + cycle + else + do imsg1=1,nbsent + if (tab_buf_atom(imsg)%value(imsg1)/=atmtab_send(imsg1)) exit + message_yet_prepared=.true. + imsg_current=imsg + end do + end if + enddo +! Create the message + if (.not.message_yet_prepared) then + nb_msg=nb_msg+1 + call paw_ij_isendreceive_fillbuffer( & +& paw_ij,atmtab_send,atm_indx_in,nbsent,buf_int,nb_int,buf_dp,nb_dp) + LIBPAW_ALLOCATE(tab_buf_int(nb_msg)%value,(nb_int)) + LIBPAW_ALLOCATE(tab_buf_dp(nb_msg)%value,(nb_dp)) + tab_buf_int(nb_msg)%value(1:nb_int)=buf_int(1:nb_int) + tab_buf_dp(nb_msg)%value(1:nb_dp)=buf_dp(1:nb_dp) + LIBPAW_DEALLOCATE(buf_int) + LIBPAW_DEALLOCATE(buf_dp) + LIBPAW_ALLOCATE(tab_buf_atom(nb_msg)%value, (nbsent)) + tab_buf_atom(nb_msg)%value(1:nbsent)=atmtab_send(1:nbsent) + imsg_current=nb_msg + end if +! Communicate + buf_size(1)=size(tab_buf_int(imsg_current)%value) + buf_size(2)=size(tab_buf_dp(imsg_current)%value) + buf_size(3)=nbsent + buf_ints=>tab_buf_int(imsg_current)%value + buf_dps=>tab_buf_dp(imsg_current)%value + my_tag=200 + ireq=ireq+1 + call xmpi_isend(buf_size,iproc_rcv,my_tag,mpi_comm_exch,request(ireq),ierr) + my_tag=201 + ireq=ireq+1 + call xmpi_isend(buf_ints,iproc_rcv,my_tag,mpi_comm_exch,request(ireq),ierr) + my_tag=202 + ireq=ireq+1 + call xmpi_isend(buf_dps,iproc_rcv,my_tag,mpi_comm_exch,request(ireq),ierr) + nbsendreq=ireq + nbsent=0 + end if + end if + else ! Just a renumbering, not a sending + iat_in=atm_indx_in(SendAtomList(iisend)) + iat_out=atm_indx_out(my_atmtab_in(iat_in)) + call paw_ij_copy(paw_ij(iat_in:iat_in),paw_ij_out1(iat_out:iat_out)) + nbsent=0 + end if + end do + + LIBPAW_ALLOCATE(From,(nbrecv)) + From(:)=-1 ; nbrecvmsg=0 + do iircv=1,nbrecv + iproc_send=RecvAtomProc(iircv) !receive from (RcvAtomProc is sorted by growing process) + next=-1 + if (iircv < nbrecv) next=RecvAtomProc(iircv+1) + if (iproc_send /= me_exch .and. iproc_send/=next) then + nbrecvmsg=nbrecvmsg+1 + From(nbrecvmsg)=iproc_send + end if + end do + + LIBPAW_ALLOCATE(msg_pick,(nbrecvmsg)) + msg_pick=.false. + nbmsg_incoming=nbrecvmsg + do while (nbmsg_incoming > 0) + do i1=1,nbrecvmsg + if (.not.msg_pick(i1)) then + iproc_send=From(i1) + flag=.false. + my_tag=200 + call xmpi_iprobe(iproc_send,my_tag,mpi_comm_exch,flag,ierr) + if (flag) then + msg_pick(i1)=.true. + call xmpi_irecv(buf_size,iproc_send,my_tag,mpi_comm_exch,request1(1),ierr) + call xmpi_wait(request1(1),ierr) + nb_int=buf_size(1) + nb_dp=buf_size(2) + npaw_ij_sent=buf_size(3) + LIBPAW_ALLOCATE(buf_int1,(nb_int)) + LIBPAW_ALLOCATE(buf_dp1,(nb_dp)) + my_tag=201 + call xmpi_irecv(buf_int1,iproc_send,my_tag,mpi_comm_exch,request1(2),ierr) + my_tag=202 + call xmpi_irecv(buf_dp1,iproc_send,my_tag,mpi_comm_exch,request1(3),ierr) + call xmpi_waitall(request1(2:3),ierr) + call paw_ij_isendreceive_getbuffer(paw_ij_out1,npaw_ij_sent,atm_indx_out,buf_int1,buf_dp1) + nbmsg_incoming=nbmsg_incoming-1 + LIBPAW_DEALLOCATE(buf_int1) + LIBPAW_DEALLOCATE(buf_dp1) + end if + end if + end do + end do + LIBPAW_DEALLOCATE(msg_pick) + + if (in_place) then + call paw_ij_free(paw_ij) + LIBPAW_DATATYPE_DEALLOCATE(paw_ij) + LIBPAW_DATATYPE_ALLOCATE(paw_ij,(my_natom_out)) + call paw_ij_copy(paw_ij_out1,paw_ij) + call paw_ij_free(paw_ij_out1) + LIBPAW_DATATYPE_DEALLOCATE(paw_ij_out1) + end if + +! Wait for deallocating arrays that all sending operations has been realized + if (nbsendreq > 0) then + call xmpi_waitall(request(1:nbsendreq),ierr) + end if + +! Deallocate buffers + do i1=1,nb_msg + LIBPAW_DEALLOCATE(tab_buf_int(i1)%value) + LIBPAW_DEALLOCATE(tab_buf_dp(i1)%value) + LIBPAW_DEALLOCATE(tab_buf_atom(i1)%value) + end do + LIBPAW_DATATYPE_DEALLOCATE(tab_buf_int) + LIBPAW_DATATYPE_DEALLOCATE(tab_buf_dp) + LIBPAW_DATATYPE_DEALLOCATE(tab_buf_atom) + LIBPAW_DEALLOCATE(From) + LIBPAW_DEALLOCATE(request) + LIBPAW_DEALLOCATE(atmtab_send) + LIBPAW_DEALLOCATE(atm_indx_in) + LIBPAW_DEALLOCATE(atm_indx_out) + + end if !algo_option + +!Eventually release temporary pointers + call free_my_atmtab(my_atmtab_in,my_atmtab_in_allocated) + call free_my_atmtab(my_atmtab_out,my_atmtab_out_allocated) + +end subroutine paw_ij_redistribute +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_ij/paw_ij_reset_flags +!! NAME +!! paw_ij_reset_flags +!! +!! FUNCTION +!! Set all paw_ij flags to 1 (force the recomputation of all arrays) +!! +!! SIDE EFFECTS +!! Paw_ij=paw_ij structure +!! +!! SOURCE + +subroutine paw_ij_reset_flags(Paw_ij,all,dijhartree,self_consistent) + +!Arguments ------------------------------------ +!scalars + logical,optional,intent(in) :: all,dijhartree,self_consistent +!arrays + type(Paw_ij_type),intent(inout) :: Paw_ij(:) + +!Local variables------------------------------- + integer :: iat,natom + logical :: all_,dijhartree_,self_consistent_ + +! ************************************************************************* + +!@Paw_ij_type + + natom=SIZE(Paw_ij);if (natom==0) return + all_=.true.;if (present(all)) all_=all + dijhartree_=.false.;if (present(dijhartree)) dijhartree_=dijhartree + self_consistent_=.false.;if (present(self_consistent)) self_consistent_=self_consistent + + if (dijhartree_) then + do iat=1,natom + if (Paw_ij(iat)%has_dijhartree>0) Paw_ij(iat)%has_dijhartree=1 + end do + + else if (self_consistent_) then + do iat=1,natom + if (Paw_ij(iat)%has_dij >0) Paw_ij(iat)%has_dij =1 + if (Paw_ij(iat)%has_dijexxc >0) Paw_ij(iat)%has_dijexxc =1 + if (Paw_ij(iat)%has_dijfock >0) Paw_ij(iat)%has_dijfock =1 + if (Paw_ij(iat)%has_dijhartree>0) Paw_ij(iat)%has_dijhartree=1 + if (Paw_ij(iat)%has_dijhat >0) Paw_ij(iat)%has_dijhat =1 + if (Paw_ij(iat)%has_dijnd >0) Paw_ij(iat)%has_dijnd =1 + if (Paw_ij(iat)%has_dijso >0) Paw_ij(iat)%has_dijso =1 + if (Paw_ij(iat)%has_dijU >0) Paw_ij(iat)%has_dijU =1 + if (Paw_ij(iat)%has_dijxc >0) Paw_ij(iat)%has_dijxc =1 + if (Paw_ij(iat)%has_dijxc_hat >0) Paw_ij(iat)%has_dijxc_hat =1 + if (Paw_ij(iat)%has_dijxc_val >0) Paw_ij(iat)%has_dijxc_val =1 + if (Paw_ij(iat)%has_exexch_pot>0) Paw_ij(iat)%has_exexch_pot=1 + if (Paw_ij(iat)%has_pawu_occ >0) Paw_ij(iat)%has_pawu_occ =1 + end do + + else if (all_) then + do iat=1,natom + if (Paw_ij(iat)%has_dij >0) Paw_ij(iat)%has_dij =1 + if (Paw_ij(iat)%has_dij0 >0) Paw_ij(iat)%has_dij0 =1 + if (Paw_ij(iat)%has_dijexxc >0) Paw_ij(iat)%has_dijexxc =1 + if (Paw_ij(iat)%has_dijfock >0) Paw_ij(iat)%has_dijfock =1 + if (Paw_ij(iat)%has_dijfr >0) Paw_ij(iat)%has_dijfr =1 + if (Paw_ij(iat)%has_dijhartree>0) Paw_ij(iat)%has_dijhartree=1 + if (Paw_ij(iat)%has_dijhat >0) Paw_ij(iat)%has_dijhat =1 + if (Paw_ij(iat)%has_dijnd >0) Paw_ij(iat)%has_dijnd =1 + if (Paw_ij(iat)%has_dijso >0) Paw_ij(iat)%has_dijso =1 + if (Paw_ij(iat)%has_dijU >0) Paw_ij(iat)%has_dijU =1 + if (Paw_ij(iat)%has_dijxc >0) Paw_ij(iat)%has_dijxc =1 + if (Paw_ij(iat)%has_dijxc_hat >0) Paw_ij(iat)%has_dijxc_hat =1 + if (Paw_ij(iat)%has_dijxc_val >0) Paw_ij(iat)%has_dijxc_val =1 + if (Paw_ij(iat)%has_exexch_pot>0) Paw_ij(iat)%has_exexch_pot=1 + if (Paw_ij(iat)%has_pawu_occ >0) Paw_ij(iat)%has_pawu_occ =1 + end do + end if + +end subroutine paw_ij_reset_flags +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_ij/paw_ij_isendreceive_getbuffer +!! NAME +!! paw_ij_isendreceive_getbuffer +!! +!! FUNCTION +!! Fill a paw_ij structure with the buffers received in a receive operation +!! This buffer should have been first extracted by a call to paw_ij_isendreceive_fillbuffer +!! +!! INPUTS +!! atm_indx_recv(1:total number of atoms)= array for receive operation +!! Given an index of atom in global numbering, give its index +!! in the table of atoms treated by current processor +!! or -1 if the atoms is not treated by current processor +!! buf_int= buffer of receive integers +!! buf_dp= buffer of receive double precision numbers +!! npaw_ij_send= number of sent atoms +!! +!! OUTPUT +!! paw_ij= output datastructure filled with buffers receive in a receive operation +!! +!! SOURCE + +subroutine paw_ij_isendreceive_getbuffer(paw_ij,npaw_ij_send,atm_indx_recv,buf_int,buf_dp) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: npaw_ij_send +!arrays + integer,intent(in):: atm_indx_recv(:),buf_int(:) + real(dp),intent(in):: buf_dp(:) + type(paw_ij_type),target,intent(inout) :: paw_ij(:) + +!Local variables------------------------------- +!scalars + integer :: buf_dp_size,buf_int_size + integer :: cplxq_lmn2_size,cplxdij_lmn2_size,cplxdijq_lmn2_size + integer :: iat,iatom_tot,ii,ij,indx_dp,indx_int,ndij,nocc,nocc1,nocc2,nocc3,nocc4 + integer :: lmn2_size,sz1,sz2,sz3 + character(len=500) :: msg + type(Paw_ij_type),pointer :: paw_ij1 +!arrays + +! ********************************************************************* + + buf_int_size=size(buf_int) + buf_dp_size=size(buf_dp) + indx_int=1;indx_dp=1 + + do ij=1,npaw_ij_send + iatom_tot=buf_int(indx_int) ;indx_int=indx_int+1 + iat= atm_indx_recv(iatom_tot) + paw_ij1=>paw_ij(iat) + paw_ij1%cplex_dij=buf_int(indx_int) ;indx_int=indx_int+1 + paw_ij1%qphase=buf_int(indx_int) ;indx_int=indx_int+1 + paw_ij1%itypat=buf_int(indx_int) ;indx_int=indx_int+1 + paw_ij1%nspden=buf_int(indx_int) ;indx_int=indx_int+1 + paw_ij1%nsppol=buf_int(indx_int) ;indx_int=indx_int+1 + paw_ij1%lmn_size=buf_int(indx_int) ;indx_int=indx_int+1 + paw_ij1%lmn2_size=buf_int(indx_int) ;indx_int=indx_int+1 + paw_ij1%ndij=buf_int(indx_int) ;indx_int=indx_int+1 + paw_ij1%has_dij=buf_int(indx_int) ;indx_int=indx_int+1 + paw_ij1%has_dij0=buf_int(indx_int) ;indx_int=indx_int+1 + paw_ij1%has_dijexxc=buf_int(indx_int) ;indx_int=indx_int+1 + paw_ij1%has_dijfock=buf_int(indx_int) ;indx_int=indx_int+1 + paw_ij1%has_dijfr=buf_int(indx_int) ;indx_int=indx_int+1 + paw_ij1%has_dijhartree=buf_int(indx_int) ;indx_int=indx_int+1 + paw_ij1%has_dijhat=buf_int(indx_int) ;indx_int=indx_int+1 + paw_ij1%has_dijnd=buf_int(indx_int) ;indx_int=indx_int+1 + paw_ij1%has_dijso=buf_int(indx_int) ;indx_int=indx_int+1 + paw_ij1%has_dijU=buf_int(indx_int) ;indx_int=indx_int+1 + paw_ij1%has_dijxc=buf_int(indx_int) ;indx_int=indx_int+1 + paw_ij1%has_dijxc_hat=buf_int(indx_int) ;indx_int=indx_int+1 + paw_ij1%has_dijxc_val=buf_int(indx_int) ;indx_int=indx_int+1 + paw_ij1%has_exexch_pot=buf_int(indx_int) ;indx_int=indx_int+1 + paw_ij1%has_pawu_occ=buf_int(indx_int) ;indx_int=indx_int+1 + if (paw_ij1%has_pawu_occ>=1) then + nocc1=buf_int(indx_int) ;indx_int=indx_int+1 + nocc2=buf_int(indx_int) ;indx_int=indx_int+1 + nocc3=buf_int(indx_int) ;indx_int=indx_int+1 + nocc4=buf_int(indx_int) ;indx_int=indx_int+1 + else + nocc1=0;nocc2=0;nocc3=0;nocc4=0 + end if + lmn2_size=paw_ij1%lmn2_size + cplxdij_lmn2_size=paw_ij1%cplex_dij*lmn2_size + cplxq_lmn2_size=paw_ij1%qphase*lmn2_size + cplxdijq_lmn2_size=cplxq_lmn2_size*paw_ij1%qphase + ndij=paw_ij1%ndij + + if (paw_ij1%has_dij>=1) then + ii=cplxdijq_lmn2_size + LIBPAW_ALLOCATE(paw_ij1%dij,(ii,ndij)) + if (paw_ij1%has_dij==2) then + paw_ij1%dij(:,:)= & + & reshape(buf_dp(indx_dp:indx_dp+ii*ndij-1),(/ii,ndij/)) + indx_dp=indx_dp+ii*ndij + end if + end if + if (paw_ij1%has_dij0 >=1) then + ii=lmn2_size + LIBPAW_ALLOCATE(paw_ij1%dij0,(ii)) + if (paw_ij1%has_dij0==2) then + paw_ij1%dij0(:)=buf_dp(indx_dp:indx_dp+ii-1) + indx_dp=indx_dp+ii + end if + end if + if (paw_ij1%has_dijexxc >=1) then + ii=cplxdij_lmn2_size + LIBPAW_ALLOCATE(paw_ij1%dijexxc,(ii,ndij)) + if (paw_ij1%has_dijexxc==2) then + paw_ij1%dijexxc(:,:)= & +& reshape(buf_dp(indx_dp:indx_dp+ii*ndij-1),(/ii,ndij/)) + indx_dp=indx_dp+ii*ndij + end if + end if + if (paw_ij1%has_dijfock >=1) then + ii=cplxdij_lmn2_size + LIBPAW_ALLOCATE(paw_ij1%dijfock,(ii,ndij)) + if (paw_ij1%has_dijfock==2) then + paw_ij1%dijfock(:,:)= & +& reshape(buf_dp(indx_dp:indx_dp+ii*ndij-1),(/ii,ndij/)) + indx_dp=indx_dp+ii*ndij + end if + end if + if (paw_ij1%has_dijfr >=1) then + ii=cplxdijq_lmn2_size + LIBPAW_ALLOCATE(paw_ij1%dijfr,(ii,ndij)) + if (paw_ij1%has_dijfr==2) then + paw_ij1%dijfr(:,:)= & +& reshape(buf_dp(indx_dp:indx_dp+ii*ndij-1),(/ii,ndij/)) + indx_dp=indx_dp+ii*ndij + end if + end if + if (paw_ij1%has_dijhartree >=1) then + ii=cplxq_lmn2_size + LIBPAW_ALLOCATE(paw_ij1%dijhartree,(ii)) + if (paw_ij1%has_dijhartree==2) then + paw_ij1%dijhartree(:)=buf_dp(indx_dp:indx_dp+ii-1) + indx_dp=indx_dp+ii + end if + end if + if (paw_ij1%has_dijhat >=1) then + ii=cplxdijq_lmn2_size + LIBPAW_ALLOCATE(paw_ij1%dijhat,(ii,ndij)) + if (paw_ij1%has_dijhat==2) then + paw_ij1%dijhat(:,:)= & +& reshape(buf_dp(indx_dp:indx_dp+ii*ndij-1),(/ii,ndij/)) + indx_dp=indx_dp+ii*ndij + end if + end if + if (paw_ij1%has_dijnd >=1) then + ii=cplxdij_lmn2_size + LIBPAW_ALLOCATE(paw_ij1%dijnd,(ii,ndij)) + if (paw_ij1%has_dijnd==2) then + paw_ij1%dijnd(:,:)= & +& reshape(buf_dp(indx_dp:indx_dp+ii*ndij-1),(/ii,ndij/)) + indx_dp=indx_dp+ii*ndij + end if + end if + if (paw_ij1%has_dijso >=1) then + ii=cplxdijq_lmn2_size + LIBPAW_ALLOCATE(paw_ij1%dijso,(ii,ndij)) + if (paw_ij1%has_dijso==2) then + paw_ij1%dijso(:,:)= & +& reshape(buf_dp(indx_dp:indx_dp+ii*ndij-1),(/ii,ndij/)) + indx_dp=indx_dp+ii*ndij + end if + end if + if (paw_ij1%has_dijU >=1) then + ii=cplxdijq_lmn2_size + LIBPAW_ALLOCATE(paw_ij1%dijU,(ii,ndij)) + if (paw_ij1%has_dijU==2) then + paw_ij1%dijU(:,:)= & +& reshape(buf_dp(indx_dp:indx_dp+ii*ndij-1),(/ii,ndij/)) + indx_dp=indx_dp+ii*ndij + end if + end if + if (paw_ij1%has_dijxc >=1) then + ii=cplxdijq_lmn2_size + LIBPAW_ALLOCATE(paw_ij1%dijxc,(ii,ndij)) + if (paw_ij1%has_dijxc==2) then + paw_ij1%dijxc(:,:)= & +& reshape(buf_dp(indx_dp:indx_dp+ii*ndij-1),(/ii,ndij/)) + indx_dp=indx_dp+ii*ndij + end if + end if + if (paw_ij1%has_dijxc_hat >=1) then + ii=cplxdij_lmn2_size + LIBPAW_ALLOCATE(paw_ij1%dijxc_hat,(ii,ndij)) + if (paw_ij1%has_dijxc_hat==2) then + paw_ij1%dijxc_hat(:,:)= & +& reshape(buf_dp(indx_dp:indx_dp+ii*ndij-1),(/ii,ndij/)) + indx_dp=indx_dp+ii*ndij + end if + end if + if (paw_ij1%has_dijxc_val >=1) then + ii=cplxdij_lmn2_size + LIBPAW_ALLOCATE(paw_ij1%dijxc_val,(ii,ndij)) + if (paw_ij1%has_dijxc_val==2) then + paw_ij1%dijxc_val(:,:)= & +& reshape(buf_dp(indx_dp:indx_dp+ii*ndij-1),(/ii,ndij/)) + indx_dp=indx_dp+ii*ndij + end if + end if + if (paw_ij1%has_pawu_occ >=1) then + nocc=paw_ij1%ndij + LIBPAW_ALLOCATE(paw_ij1%nocctot,(nocc)) + paw_ij1%nocctot(1:nocc)=buf_dp(indx_dp:indx_dp+nocc-1) + indx_dp=indx_dp+nocc + nocc=nocc1*nocc2*nocc3*nocc4 + LIBPAW_ALLOCATE(paw_ij1%noccmmp,(nocc1,nocc2,nocc3,nocc4)) + paw_ij1%noccmmp(1:nocc1,1:nocc2,1:nocc3,1:nocc4)= & +& reshape(buf_dp(indx_dp:indx_dp+nocc-1),(/nocc1,nocc2,nocc3,nocc4/)) + indx_dp=indx_dp+nocc + end if + if (paw_ij1%has_exexch_pot >=1) then + sz1=buf_int(indx_int);indx_int=indx_int+1 + sz2=buf_int(indx_int);indx_int=indx_int+1 + sz3=buf_int(indx_int);indx_int=indx_int+1 + LIBPAW_ALLOCATE(paw_ij1%vpawx,(sz1,sz2,sz3)) + if (paw_ij1%has_exexch_pot == 2) then + paw_ij1%vpawx(:,:,:)=& +& reshape(buf_dp(indx_dp:indx_dp+sz1*sz2*sz3-1),(/sz1,sz2,sz3/)) + indx_dp=indx_dp+sz1*sz2*sz3 + end if + end if + end do + + if ((indx_int/=1+buf_int_size).or.(indx_dp /=1+buf_dp_size)) then + write(msg,'(a,i10,a,i10)') 'Wrong buffer sizes: buf_int_size=',buf_int_size,' buf_dp_size=',buf_dp_size + LIBPAW_BUG(msg) + end if + +end subroutine paw_ij_isendreceive_getbuffer +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_an/paw_ij_isendreceive_fillbuffer +!! NAME +!! paw_ij_isendreceive_fillbuffer +!! +!! FUNCTION +!! Extract from paw_ij and from the global index of atoms +!! the buffers to send in a sending operation +!! This function has to be coupled with a call to paw_ij_isendreceive_getbuffer +!! +!! INPUTS +!! atm_indx_send(1:total number of atoms)= array for send operation, +!! Given an index of atom in global numbering, give its index +!! in the table of atoms treated by current processor +!! or -1 if the atoms is not treated by current processor +!! npaw_ij_send= number of sent atoms +!! paw_ij= data structure from which are extract buffer int and buffer dp +!! +!! OUTPUT +!! buf_int= buffer of integers to be sent +!! buf_int_size= size of buffer of integers +!! buf_dp= buffer of double precision numbers to be sent +!! buf_dp_size= size of buffer of double precision numbers +!! +!! SOURCE + +subroutine paw_ij_isendreceive_fillbuffer(paw_ij,atmtab_send,atm_indx_send,npaw_ij_send,& +& buf_int,buf_int_size,buf_dp,buf_dp_size) + +!Arguments ------------------------------------ +!scalars + integer,intent(out) :: buf_int_size,buf_dp_size + integer,intent(in) :: npaw_ij_send +!arrays + integer,intent(in) :: atmtab_send(:),atm_indx_send(:) + integer,allocatable,intent(out) :: buf_int(:) + real(dp),allocatable,intent(out):: buf_dp(:) + type(paw_ij_type),target,intent(in) :: paw_ij(:) + +!Local variables------------------------------- +!scalars + integer :: cplxdij_lmn2_size,cplxdijq_lmn2_size,cplxq_lmn2_size + integer :: iatom_tot,ii,ij,indx_dp,indx_int,ipaw_ij_send + integer :: lmn2_size,ndij,nocc,nspden,sz1,sz2,sz3 + character(len=500) :: msg + type(Paw_ij_type),pointer :: paw_ij1 +!arrays + +! ********************************************************************* + +!Compute sizes of buffers + buf_int_size=0;buf_dp_size=0 + do ipaw_ij_send=1,npaw_ij_send + iatom_tot=atmtab_send(ipaw_ij_send) + ij = atm_indx_send(iatom_tot) + paw_ij1=>paw_ij(ij) + lmn2_size=paw_ij1%lmn2_size + cplxdij_lmn2_size=paw_ij1%cplex_dij*lmn2_size + cplxq_lmn2_size=paw_ij1%qphase*lmn2_size + cplxdijq_lmn2_size=cplxdij_lmn2_size*paw_ij1%qphase + ndij=paw_ij1%ndij + buf_int_size=buf_int_size+24 + if (paw_ij1%has_dij==2) then + buf_dp_size=buf_dp_size +cplxdijq_lmn2_size*ndij + end if + if (paw_ij1%has_dij0==2) then + buf_dp_size=buf_dp_size +lmn2_size + end if + if (paw_ij1%has_dijexxc==2) then + buf_dp_size=buf_dp_size +cplxdij_lmn2_size*ndij + end if + if (paw_ij1%has_dijfock==2) then + buf_dp_size=buf_dp_size +cplxdij_lmn2_size*ndij + end if + if (paw_ij1%has_dijfr==2) then + buf_dp_size=buf_dp_size +cplxdijq_lmn2_size*ndij + end if + if (paw_ij1%has_dijhartree==2) then + buf_dp_size=buf_dp_size +cplxq_lmn2_size + end if + if (paw_ij1%has_dijhat==2) then + buf_dp_size=buf_dp_size +cplxdijq_lmn2_size*ndij + end if + if (paw_ij1%has_dijnd==2) then + buf_dp_size=buf_dp_size +cplxdij_lmn2_size*ndij + end if + if (paw_ij1%has_dijso==2) then + buf_dp_size=buf_dp_size +cplxdijq_lmn2_size*ndij + end if + if (paw_ij1%has_dijU==2) then + buf_dp_size=buf_dp_size +cplxdijq_lmn2_size*ndij + end if + if (paw_ij1%has_dijxc==2) then + buf_dp_size=buf_dp_size +cplxdijq_lmn2_size*ndij + end if + if (paw_ij1%has_dijxc_hat==2) then + buf_dp_size=buf_dp_size +cplxdij_lmn2_size*ndij + end if + if (paw_ij1%has_dijxc_val==2) then + buf_dp_size=buf_dp_size +cplxdij_lmn2_size*ndij + end if + if (paw_ij1%has_pawu_occ>=1) then + buf_int_size=buf_int_size+4 + buf_dp_size=buf_dp_size & +& +size(paw_ij1%nocctot) & +& +size(paw_ij1%noccmmp) + end if + if (paw_ij1%has_exexch_pot>=1) then + buf_int_size=buf_int_size+3 + buf_dp_size=buf_dp_size +size(paw_ij1%vpawx) + end if + end do + +!Fill input buffers + LIBPAW_ALLOCATE(buf_int,(buf_int_size)) + LIBPAW_ALLOCATE(buf_dp,(buf_dp_size)) + indx_int=1;indx_dp=1 + do ipaw_ij_send=1,npaw_ij_send + iatom_tot=atmtab_send(ipaw_ij_send) + ij = atm_indx_send(iatom_tot) + paw_ij1=>paw_ij(ij) + nspden=paw_ij1%nspden + buf_int(indx_int)=iatom_tot ;indx_int=indx_int+1 + buf_int(indx_int)=paw_ij1%cplex_dij ;indx_int=indx_int+1 + buf_int(indx_int)=paw_ij1%qphase ;indx_int=indx_int+1 + buf_int(indx_int)=paw_ij1%itypat ;indx_int=indx_int+1 + buf_int(indx_int)=nspden ;indx_int=indx_int+1 + buf_int(indx_int)=paw_ij1%nsppol ;indx_int=indx_int+1 + buf_int(indx_int)=paw_ij1%lmn_size ;indx_int=indx_int+1 + buf_int(indx_int)=paw_ij1%lmn2_size ;indx_int=indx_int+1 + buf_int(indx_int)=paw_ij1%ndij ;indx_int=indx_int+1 + buf_int(indx_int)=paw_ij1%has_dij ;indx_int=indx_int+1 + buf_int(indx_int)=paw_ij1%has_dij0 ;indx_int=indx_int+1 + buf_int(indx_int)=paw_ij1%has_dijexxc ;indx_int=indx_int+1 + buf_int(indx_int)=paw_ij1%has_dijfock ;indx_int=indx_int+1 + buf_int(indx_int)=paw_ij1%has_dijfr ;indx_int=indx_int+1 + buf_int(indx_int)=paw_ij1%has_dijhartree ;indx_int=indx_int+1 + buf_int(indx_int)=paw_ij1%has_dijhat ;indx_int=indx_int+1 + buf_int(indx_int)=paw_ij1%has_dijnd ;indx_int=indx_int+1 + buf_int(indx_int)=paw_ij1%has_dijso ;indx_int=indx_int+1 + buf_int(indx_int)=paw_ij1%has_dijU ;indx_int=indx_int+1 + buf_int(indx_int)=paw_ij1%has_dijxc ;indx_int=indx_int+1 + buf_int(indx_int)=paw_ij1%has_dijxc_hat ;indx_int=indx_int+1 + buf_int(indx_int)=paw_ij1%has_dijxc_val ;indx_int=indx_int+1 + buf_int(indx_int)=paw_ij1%has_exexch_pot ;indx_int=indx_int+1 + buf_int(indx_int)=paw_ij1%has_pawu_occ ;indx_int=indx_int+1 + lmn2_size=paw_ij1%lmn2_size + cplxdij_lmn2_size=paw_ij1%cplex_dij*lmn2_size + cplxq_lmn2_size=paw_ij1%qphase*lmn2_size + cplxdijq_lmn2_size=cplxdij_lmn2_size*paw_ij1%qphase + ndij=paw_ij1%ndij + if (paw_ij1%has_dij==2) then + ii=cplxdijq_lmn2_size*ndij + buf_dp(indx_dp:indx_dp+ii-1)=reshape(paw_ij1%dij,(/ii/)) + indx_dp=indx_dp+ii + end if + if (paw_ij1%has_dij0==2) then + ii=lmn2_size + buf_dp(indx_dp:indx_dp+lmn2_size-1)=paw_ij1%dij0(:) + indx_dp=indx_dp+lmn2_size + end if + if (paw_ij1%has_dijexxc==2) then + ii=cplxdij_lmn2_size*ndij + buf_dp(indx_dp:indx_dp+ii-1)=reshape(paw_ij1%dijexxc,(/ii/)) + indx_dp=indx_dp+ii + end if + if (paw_ij1%has_dijfock==2) then + ii=cplxdij_lmn2_size*ndij + buf_dp(indx_dp:indx_dp+ii-1)=reshape(paw_ij1%dijfock,(/ii/)) + indx_dp=indx_dp+ii + end if + if (paw_ij1%has_dijfr==2) then + ii=cplxdijq_lmn2_size*ndij + buf_dp(indx_dp:indx_dp+ii-1)=reshape(paw_ij1%dijfr,(/ii/)) + indx_dp=indx_dp+ii + end if + if (paw_ij1%has_dijhartree==2) then + ii=cplxq_lmn2_size + buf_dp(indx_dp:indx_dp+ii-1)=paw_ij1%dijhartree(:) + indx_dp=indx_dp+ii + end if + if (paw_ij1%has_dijhat==2) then + ii=cplxdijq_lmn2_size*ndij + buf_dp(indx_dp:indx_dp+ii-1)=reshape(paw_ij1%dijhat,(/ii/)) + indx_dp=indx_dp+ii + end if + if (paw_ij1%has_dijnd==2) then + ii=cplxdij_lmn2_size*ndij + buf_dp(indx_dp:indx_dp+ii-1)=reshape(paw_ij1%dijnd,(/ii/)) + indx_dp=indx_dp+ii + end if + if (paw_ij1%has_dijso==2) then + ii=cplxdijq_lmn2_size*ndij + buf_dp(indx_dp:indx_dp+ii-1)=reshape(paw_ij1%dijso,(/ii/)) + indx_dp=indx_dp+ii + end if + if (paw_ij1%has_dijU==2) then + ii=cplxdijq_lmn2_size*ndij + buf_dp(indx_dp:indx_dp+ii-1)=reshape(paw_ij1%dijU,(/ii/)) + indx_dp=indx_dp+ii + end if + if (paw_ij1%has_dijxc==2) then + ii=cplxdijq_lmn2_size*ndij + buf_dp(indx_dp:indx_dp+ii-1)=reshape(paw_ij1%dijxc,(/ii/)) + indx_dp=indx_dp+ii + end if + if (paw_ij1%has_dijxc_hat==2) then + ii=cplxdij_lmn2_size*ndij + buf_dp(indx_dp:indx_dp+ii-1)=reshape(paw_ij1%dijxc_hat,(/ii/)) + indx_dp=indx_dp+ii + end if + if (paw_ij1%has_dijxc_val==2) then + ii=cplxdij_lmn2_size*ndij + buf_dp(indx_dp:indx_dp+ii-1)=reshape(paw_ij1%dijxc_val,(/ii/)) + indx_dp=indx_dp+ii + end if + if (paw_ij1%has_pawu_occ>=1)then + buf_int(indx_int)=size(paw_ij1%noccmmp,1) ;indx_int=indx_int+1 + buf_int(indx_int)=size(paw_ij1%noccmmp,2) ;indx_int=indx_int+1 + buf_int(indx_int)=size(paw_ij1%noccmmp,3) ;indx_int=indx_int+1 + buf_int(indx_int)=size(paw_ij1%noccmmp,4) ;indx_int=indx_int+1 + nocc=paw_ij1%ndij + buf_dp(indx_dp:indx_dp+nocc-1)=paw_ij1%nocctot(1:nocc) + indx_dp=indx_dp+nocc + nocc=size(paw_ij1%noccmmp) + buf_dp(indx_dp:indx_dp+nocc-1)=reshape(paw_ij1%noccmmp,(/nocc/)) + indx_dp=indx_dp+nocc + end if + if (paw_ij1%has_exexch_pot>=1) then + sz1=size(paw_ij1%vpawx,1);sz2=size(paw_ij1%vpawx,2) + sz3=size(paw_ij1%vpawx,3) + buf_int(indx_int)=sz1; indx_int=indx_int+1 + buf_int(indx_int)=sz2; indx_int=indx_int+1 + buf_int(indx_int)=sz3; indx_int=indx_int+1 + ii=sz1*sz2*sz3 + buf_dp(indx_dp:indx_dp+ii-1)=reshape(paw_ij1%vpawx,(/(ii)/)) + indx_dp=indx_dp+ii + end if + end do + indx_int=indx_int-1;indx_dp=indx_dp-1 + if ((indx_int/=buf_int_size).or.(indx_dp/=buf_dp_size)) then + write(msg,'(a,i10,a,i10)') 'Wrong buffer sizes: buf_int_size=',buf_int_size,' buf_dp_size=',buf_dp_size + LIBPAW_BUG(msg) + end if + +end subroutine paw_ij_isendreceive_fillbuffer +!!*** + +!---------------------------------------------------------------------- + +END MODULE m_paw_ij +!!*** diff --git a/GX-PAW/libpaw/src/m_paw_ij.o b/GX-PAW/libpaw/src/m_paw_ij.o new file mode 100644 index 00000000..8694e67b Binary files /dev/null and b/GX-PAW/libpaw/src/m_paw_ij.o differ diff --git a/GX-PAW/libpaw/src/m_paw_io.F90 b/GX-PAW/libpaw/src/m_paw_io.F90 new file mode 100644 index 00000000..33dfacca --- /dev/null +++ b/GX-PAW/libpaw/src/m_paw_io.F90 @@ -0,0 +1,326 @@ +!!****m* ABINIT/m_paw_io +!! NAME +!! m_paw_io +!! +!! FUNCTION +!! PAW I/O related operations +!! +!! COPYRIGHT +!! Copyright (C) 2012-2024 ABINIT group (MT, TR) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! NOTES +!! FOR DEVELOPPERS: in order to preserve the portability of libPAW library, +!! please consult ~abinit/src/??_libpaw/libpaw-coding-rules.txt +!! +!! SOURCE + +#include "libpaw.h" + +module m_paw_io + + USE_DEFS + USE_MSG_HANDLING + USE_MEMORY_PROFILING + + implicit none + + private + + public :: pawio_print_ij +!!*** + +CONTAINS !=========================================================== + +!!****f* m_paw_io/pawio_print_ij +!! NAME +!! pawio_print_ij +!! +!! FUNCTION +!! Print ij_ square matrixes in a "suitable" format. +!! Data are "energy-like" in Hartree units. +!! Devoted to the printing of rhoij, Dij -like PAW matrixes. +!! +!! INPUTS +!! a_ij(cplex*adim)= input square matrix +!! asym_ij(cplex*adim)= -OPTIONAL ARGUMENT- +!! When present, A(j,i) is deduced from asym_ij +!! instead of a_ij +!! adim= dimension of array a_ij: +!! adim=ndim*(ndim+1)/2 if opt_pack= 0 +!! adim=number of non-zero values of a_ij if opt_pack=+1 +!! cplex=1 if a_ij is real, 2 if it is complex +!! [mode_paral]= --optional argument, default='COLL'-- +!! 'COLL' if all procs are calling the routine with the same message to be written once only. +!! 'PERS' if the procs are calling the routine with different messages each to be written, +!! or if one proc is calling the routine +!! ndim= dimension of input square matrix +!! opt_l= if <0 all parts of a_ij are printed +!! if >=0 only parts of a_ij corresponding to li=lj=opt_l are printed +!! opt_l_index(ndim)= array giving l quantum number for each 1<=ilmn<=ndim +!! not used if opt_l<0 +!! opt_pack= 0 if a_ij is given as A(j(j-1)/2+i), i<=j +!! +1 if a_ij is given as A(j(j-1)/2+i) and is in "packed storage" +!! (i.e. only non-zero values are stored) +!! opt_prtvol= >=0 if up to 12 components of _ij matrix have to be printed +!! <0 if all components of ij_ matrix have to be printed +!! opt_sym= -OPTIONAL ARGUMENT- (default if not present: opt_sym=2) +!! Define the symmetry of a_ij matrix: +!! opt_sym=1 : A(j,i)= A(i,j) +!! opt_sym=2 : A(j,i)= Conjg[A(i,j)] +!! opt_sym=3 : A(j,i)=-A(i,j) +!! opt_sym=4 : A(j,i)=-Conjg[A(i,j)] +!! When asym_ij argument is present, A[i,j] is taken from it. +!! pack2ij(adim)= gives the (i,j) index of of packed value of rhoij +!! used only if opt_packed=+1 +!! test_value= (real number) if positive, print a warning when the +!! magnitude of a_ij is greater than opt_test +!! No test when test_value<0 +!! unit=the unit number for output +!! Ha_or_eV= 1: output in hartrees, 2: output in eV +!! +!! SOURCE + +subroutine pawio_print_ij(unit,a_ij,adim,cplex,ndim,opt_l,opt_l_index, & +& opt_pack,opt_prtvol,pack2ij,test_value,Ha_or_eV, & +& mode_paral,opt_sym,asym_ij) ! Optional arguments + +!Arguments --------------------------------------------- +!scalars + integer,intent(in) :: adim,cplex,ndim,opt_l,opt_pack,opt_prtvol,unit,Ha_or_eV + integer,intent(in),optional :: opt_sym + character(len=*),optional,intent(in) :: mode_paral + real(dp),intent(in) :: test_value +!arrays + integer,intent(in) :: opt_l_index(ndim*min(1+opt_l,1)),pack2ij(adim*opt_pack) + real(dp),intent(in) :: a_ij(cplex*adim) + real(dp),intent(in),optional :: asym_ij(cplex*adim) + +!Local variables --------------------------------------- +! Adjust format bellow according to maxprt +!scalars + integer,parameter :: maxprt_default=12 + integer :: dplex,ilmn,ilmn1,j0lmn,jlmn,jlmn1,klmn,klmn1,klmn2,maxprt,nhigh + integer :: nmin,optsym + real(dp) :: testval + logical :: use_asym + character(len=4) :: mode_paral_ + character(len=500) :: msg='' +!arrays + real(dp),parameter :: fact_re(4)=(/one,one,-one,-one/),fact_im(4)=(/one,-one,-one,one/) + real(dp) :: tabmax(cplex),tabmin(cplex) + real(dp),allocatable :: b_ij(:),bsym_ij(:),prtab(:,:,:) + +! ************************************************************************* + + 10 format(100(1x,f9.5)) + 11 format(12(1x,f9.5),a) !Change this format according to variable "maxprt" + + +!DEBUG +!write(std_out,*)' pawio_print_ij : enter ' +!ENDDEBUG + +!Optional arguments + mode_paral_='COLL';if (present(mode_paral)) mode_paral_=mode_paral + use_asym=present(asym_ij) + if (present(opt_sym)) then + optsym=opt_sym + else + optsym=2 + end if + +!Define size of square matrix + if (opt_prtvol>=0) then + maxprt=maxprt_default + else + maxprt=ndim + end if + nmin=min(ndim,maxprt) + + if (opt_l>=0) nmin=count(opt_l_index(:)==opt_l) + LIBPAW_ALLOCATE(prtab,(cplex,nmin,nmin)) + dplex=cplex-1 + +!Eventually unpack input matrix(es) + LIBPAW_ALLOCATE(b_ij,(cplex*ndim*(ndim+1)/2)) + if (opt_pack==0) then + b_ij=a_ij + else if (opt_pack==1) then + b_ij=zero + do klmn=1,adim + klmn1=cplex*klmn-dplex + klmn2=cplex*pack2ij(klmn)-dplex + b_ij(klmn2:klmn2+dplex)=a_ij(klmn1:klmn1+dplex) + end do + end if + if (opt_prtvol<0.and.opt_l<0) then + if (cplex==1) then + tabmax(1)=maxval(abs(b_ij)) + tabmin(1)=minval(abs(b_ij)) + else + tabmax(1:2)=zero;tabmin(1:2)=1.d20 + do klmn=1,size(b_ij)/cplex + klmn2=2*klmn + tabmax(1)=max(tabmax(1),b_ij(klmn2-1)) + tabmin(1)=min(tabmin(1),b_ij(klmn2-1)) + tabmax(2)=max(tabmax(2),b_ij(klmn2 )) + tabmin(2)=min(tabmin(2),b_ij(klmn2 )) + end do + end if + end if + if (use_asym) then + LIBPAW_ALLOCATE(bsym_ij,(cplex*ndim*(ndim+1)/2)) + if (opt_pack==0) then + bsym_ij=asym_ij + else if (opt_pack==1) then + bsym_ij=zero + do klmn=1,adim + klmn1=cplex*klmn-dplex + klmn2=cplex*pack2ij(klmn)-dplex + bsym_ij(klmn2:klmn2+dplex)=asym_ij(klmn1:klmn1+dplex) + end do + end if + if (opt_prtvol<0.and.opt_l<0) then + if (cplex==1) then + tabmax(1)=max(tabmax(1),maxval(abs(bsym_ij))) + tabmin(1)=min(tabmin(1),minval(abs(bsym_ij))) + else + do klmn=1,ndim + klmn2=2*klmn + tabmax(1)=max(tabmax(1),bsym_ij(klmn2-1)) + tabmin(1)=min(tabmin(1),bsym_ij(klmn2-1)) + tabmax(2)=max(tabmax(2),bsym_ij(klmn2 )) + tabmin(2)=min(tabmin(2),bsym_ij(klmn2 )) + end do + end if + end if + end if + +!Transfer triangular matrix to rectangular one + jlmn1=0 + do jlmn=1,ndim + if (opt_l<0) then + jlmn1=jlmn;if (jlmn1>nmin) cycle + else if (opt_l_index(jlmn)==opt_l) then + jlmn1=jlmn1+1 + else + cycle + end if + ilmn1=0;j0lmn=jlmn*(jlmn-1)/2 + do ilmn=1,jlmn + if (opt_l<0) then + ilmn1=ilmn + else if (opt_l_index(ilmn)==opt_l) then + ilmn1=ilmn1+1 + else + cycle + end if + klmn=j0lmn+ilmn + if (cplex==1) then + prtab(1,ilmn1,jlmn1)=b_ij(klmn) + if (use_asym) then + prtab(1,jlmn1,ilmn1)=fact_re(optsym)*bsym_ij(klmn) + else + prtab(1,jlmn1,ilmn1)=fact_re(optsym)*b_ij(klmn) + end if + else + klmn=2*klmn + prtab(1:2,ilmn1,jlmn1)=b_ij(klmn-1:klmn) + if (use_asym) then + prtab(1,jlmn1,ilmn1)=fact_re(optsym)*bsym_ij(klmn-1) + prtab(2,jlmn1,ilmn1)=fact_im(optsym)*bsym_ij(klmn ) + else + prtab(1,jlmn1,ilmn1)=fact_re(optsym)*b_ij(klmn-1) + prtab(2,jlmn1,ilmn1)=fact_im(optsym)*b_ij(klmn ) + end if + end if + end do + end do + LIBPAW_DEALLOCATE(b_ij) + + if (use_asym) then + LIBPAW_DEALLOCATE(bsym_ij) + end if + + if (Ha_or_eV==2) then + prtab=prtab*Ha_eV + if (opt_prtvol<0.and.opt_l<0) then + tabmax=tabmax*Ha_eV + tabmin=tabmin*Ha_eV + end if + end if + + if (cplex==2) then + write(msg,'(3x,a)') '=== REAL PART:' + call wrtout(unit,msg,mode_paral_) + end if + + if (ndim<=maxprt.or.opt_l>=0) then + do ilmn=1,nmin + write(msg,fmt=10) prtab(1,1:nmin,ilmn) + call wrtout(unit,msg,mode_paral_) + end do + else + do ilmn=1,nmin + write(msg,fmt=11) prtab(1,1:nmin,ilmn),' ...' + call wrtout(unit,msg,mode_paral_) + end do + write(msg,'(3x,a,i2,a)') '... only ',maxprt,' components have been written...' + call wrtout(unit,msg,mode_paral_) + end if + if (opt_prtvol<0.and.opt_l<0) then + write(msg,'(3x,2(a,es9.2))') 'max. value= ',tabmax(1),', min. value= ',tabmin(1) + call wrtout(unit,msg,mode_paral_) + end if + + if (cplex==2) then + write(msg,'(3x,a)') '=== IMAGINARY PART:' + call wrtout(unit,msg,mode_paral_) + if (ndim<=maxprt.or.opt_l>=0) then + do ilmn=1,nmin + write(msg,fmt=10) prtab(2,1:nmin,ilmn) + call wrtout(unit,msg,mode_paral_) + end do + else + do ilmn=1,nmin + write(msg,fmt=11) prtab(2,1:nmin,ilmn),' ...' + call wrtout(unit,msg,mode_paral_) + end do + write(msg,'(3x,a,i2,a)') '... only ',maxprt,' components have been written...' + call wrtout(unit,msg,mode_paral_) + end if + if (opt_prtvol<0.and.opt_l<0) then + write(msg,'(3x,2(a,es9.2))') 'max. value= ',tabmax(2),', min. value= ',tabmin(2) + call wrtout(unit,msg,mode_paral_) + end if + end if + + if (test_value>zero) then + testval=test_value;if (Ha_or_eV==2) testval=testval*Ha_eV + nhigh=0;nhigh=count(abs(prtab(:,:,:))>=testval) + if (nhigh>0) then + write(msg,'(5a,i3,a,f6.1,7a)')& +& ' pawio_print_ij: WARNING -',ch10,& +& ' The matrix seems to have high value(s) !',ch10,& +& ' (',nhigh,' components have a value greater than ',testval,').',ch10,& +& ' It can cause instabilities during SCF convergence.',ch10,& +& ' Action: you should check your atomic dataset (psp file)',ch10,& +& ' and look for "high" projector functions...' + call wrtout(unit,msg,mode_paral_) + end if + end if + + LIBPAW_DEALLOCATE(prtab) + +!DEBUG +!write(std_out,*)' pawio_print_ij : exit ' +!ENDDEBUG + +end subroutine pawio_print_ij +!!*** + +end module m_paw_io +!!*** diff --git a/GX-PAW/libpaw/src/m_paw_io.o b/GX-PAW/libpaw/src/m_paw_io.o new file mode 100644 index 00000000..ccd8e4a2 Binary files /dev/null and b/GX-PAW/libpaw/src/m_paw_io.o differ diff --git a/GX-PAW/libpaw/src/m_paw_numeric.F90 b/GX-PAW/libpaw/src/m_paw_numeric.F90 new file mode 100644 index 00000000..e2b61ad4 --- /dev/null +++ b/GX-PAW/libpaw/src/m_paw_numeric.F90 @@ -0,0 +1,1120 @@ +!!****m* ABINIT/m_paw_numeric +!! NAME +!! m_paw_numeric +!! +!! FUNCTION +!! Wrappers for various numeric operations (spline, sort, ...) +!! +!! COPYRIGHT +!! Copyright (C) 2012-2024 ABINIT group (MT,TR) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! NOTES +!! FOR DEVELOPPERS: in order to preserve the portability of libPAW library, +!! please consult ~abinit/src/??_libpaw/libpaw-coding-rules.txt +!! +!! SOURCE + +#include "libpaw.h" + +module m_paw_numeric + + USE_DEFS + USE_MSG_HANDLING + USE_MEMORY_PROFILING + + implicit none + + private + +!public procedures + public:: paw_spline + public:: paw_splint + public:: paw_splint_der + public:: paw_uniform_splfit + public:: paw_smooth + public:: paw_sort_dp + public:: paw_jbessel + public:: paw_solvbes + public:: paw_jbessel_4spline + public:: paw_derfc +!!*** + +CONTAINS +!=========================================================== +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_numeric/paw_spline +!! NAME +!! paw_spline +!! +!! FUNCTION +!! Computes the second derivatives of a cubic spline +!! +!! INPUTS +!! * Input, integer N, the number of data points; N must be at least 2. +!! In the special case where N = 2 and IBCBEG = IBCEND = 0, the +!! spline will actually be linear. +!! * Input, real(dp) T(N), the knot values, that is, the points where data +!! is specified. The knot values should be distinct, and increasing. +!! * Input, real(dp) Y(N), the data values to be interpolated. +!! * Input, real(dp) YBCBEG, YBCEND, the values to be used in the boundary +!! conditions if IBCBEG or IBCEND is equal to 1 or 2. +!! +!! OUTPUT +!! Output, real(dp) YPP(N), the second derivatives of the cubic spline. +!! Work space, real(dp) DIAG(N) - should be removed ... +!! +!! SOURCE + +subroutine paw_spline(t,y,n,ybcbeg,ybcend,ypp) + +!******************************************************************************* +! Discussion: +! For data interpolation, the user must call SPLINE_CUBIC_SET to +! determine the second derivative data, passing in the data to be +! interpolated, and the desired boundary conditions. +! The data to be interpolated, plus the SPLINE_CUBIC_SET output, +! defines the spline. The user may then call SPLINE_CUBIC_VAL to +! evaluate the spline at any point. +! The cubic spline is a piecewise cubic polynomial. The intervals +! are determined by the "knots" or abscissas of the data to be +! interpolated. The cubic spline has continous first and second +! derivatives over the entire interval of interpolation. +! For any point T in the interval T(IVAL), T(IVAL+1), the form of +! the spline is +! SPL(T) = A(IVAL) +! + B(IVAL) * ( T - T(IVAL) ) +! + C(IVAL) * ( T - T(IVAL) )**2 +! + D(IVAL) * ( T - T(IVAL) )**3 +! If we assume that we know the values Y(*) and YPP(*), which represent +! the values and second derivatives of the spline at each knot, then +! the coefficients can be computed as: +! A(IVAL) = Y(IVAL) +! B(IVAL) = ( Y(IVAL+1) - Y(IVAL) ) / ( T(IVAL+1) - T(IVAL) ) +! - ( YPP(IVAL+1) + 2 * YPP(IVAL) ) * ( T(IVAL+1) - T(IVAL) ) / 6 +! C(IVAL) = YPP(IVAL) / 2 +! D(IVAL) = ( YPP(IVAL+1) - YPP(IVAL) ) / ( 6 * ( T(IVAL+1) - T(IVAL) ) ) +! Since the first derivative of the spline is +! SPL'(T) = B(IVAL) +! + 2 * C(IVAL) * ( T - T(IVAL) ) +! + 3 * D(IVAL) * ( T - T(IVAL) )**2, +! the requirement that the first derivative be continuous at interior +! knot I results in a total of N-2 equations, of the form: +! B(IVAL-1) + 2 C(IVAL-1) * (T(IVAL)-T(IVAL-1)) +! + 3 * D(IVAL-1) * (T(IVAL) - T(IVAL-1))**2 = B(IVAL) +! or, setting H(IVAL) = T(IVAL+1) - T(IVAL) +! ( Y(IVAL) - Y(IVAL-1) ) / H(IVAL-1) +! - ( YPP(IVAL) + 2 * YPP(IVAL-1) ) * H(IVAL-1) / 6 +! + YPP(IVAL-1) * H(IVAL-1) +! + ( YPP(IVAL) - YPP(IVAL-1) ) * H(IVAL-1) / 2 +! = +! ( Y(IVAL+1) - Y(IVAL) ) / H(IVAL) +! - ( YPP(IVAL+1) + 2 * YPP(IVAL) ) * H(IVAL) / 6 +! or +! YPP(IVAL-1) * H(IVAL-1) + 2 * YPP(IVAL) * ( H(IVAL-1) + H(IVAL) ) +! + YPP(IVAL) * H(IVAL) +! = +! 6 * ( Y(IVAL+1) - Y(IVAL) ) / H(IVAL) +! - 6 * ( Y(IVAL) - Y(IVAL-1) ) / H(IVAL-1) +! Boundary conditions must be applied at the first and last knots. +! The resulting tridiagonal system can be solved for the YPP values. +! +! Author: +! John Burkardt, modified by Xavier Gonze + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: n + real(dp),intent(in) :: ybcbeg,ybcend +!arrays + real(dp),intent(in) :: t(n),y(n) + real(dp),intent(out) :: ypp(n) + +!Local variables------------------------------- +!scalars + integer :: ibcbeg,ibcend,i,k + real(dp) :: ratio,pinv + character(len=500) :: msg +!arrays + real(dp),allocatable :: tmp(:) + +! ************************************************************************* + +!Check + if (n<=1) then + write(msg,'(6a,i8)') ch10, & +& 'SPLINE_CUBIC_SET - Fatal error!',ch10, & +& ' The number of knots must be at least 2.',ch10, & +& ' The input value of N = ', n + LIBPAW_ERROR(msg) + end if + + LIBPAW_ALLOCATE(tmp,(n)) + + do i=1,n-1 + if (t(i)>=t(i+1)) then + write(msg,'(6a,i8,a,es19.12,2a,i8,a,es19.12)') ch10, & +& 'SPLINE_CUBIC_SET - Fatal error!',ch10, & +& ' The knots must be strictly increasing, but',ch10, & +& ' T(', i,') = ', t(i), ch10, & +& ' T(',i+1,') = ', t(i+1) + LIBPAW_ERROR(msg) + end if + end do + + ibcbeg=1;if(ybcbeg>1.0d+30)ibcbeg=0 + ibcend=1;if(ybcend>1.0d+30)ibcend=0 + +!Set the first and last equations + if (ibcbeg==0) then + ypp(1) = 0._dp + tmp(1) = 0._dp + else if ( ibcbeg == 1 ) then + ypp(1) = -0.5_dp + tmp(1) = (3._dp/(t(2)-t(1)))*((y(2)-y(1))/(t(2)-t(1))-ybcbeg) + end if + if (ibcend==0) then + ypp(n) = 0._dp + tmp(n) = 0._dp + else if ( ibcend == 1 ) then + ypp(n) = 0.5_dp + tmp(n) = (3._dp/(t(n)-t(n-1)))*(ybcend-(y(n)-y(n-1))/(t(n)-t(n-1))) + end if + +!Set the intermediate equations + do i=2,n-1 + ratio=(t(i)-t(i-1))/(t(i+1)-t(i-1)) + pinv = 1.0_dp/(ratio*ypp(i-1) + 2.0_dp) + ypp(i) = (ratio-1.0_dp)*pinv + tmp(i)=(6.0_dp*((y(i+1)-y(i))/(t(i+1)-t(i))-(y(i)-y(i-1)) & +& /(t(i)-t(i-1)))/(t(i+1)-t(i-1))-ratio*tmp(i-1))*pinv + if (abs(tmp(i))<1.d5*tiny(0._dp)) tmp(i)=0._dp + end do + +!Solve the equations + ypp(n) = (tmp(n)-ypp(n)*tmp(n-1))/(ypp(n)*ypp(n-1)+1.0_dp) + do k=n-1,1,-1 + ypp(k)=ypp(k)*ypp(k+1)+tmp(k) + end do + + LIBPAW_DEALLOCATE(tmp) + +end subroutine paw_spline +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_numeric/paw_splint +!! NAME +!! paw_splint +!! +!! FUNCTION +!! Compute spline interpolation of a tabulated function. +!! There is no hypothesis about the spacing of the input grid points. +!! +!! INPUTS +!! nspline: number of grid points of input mesh +!! xspline(nspline): input mesh +!! yspline(nspline): function on input mesh +!! ysplin2(nspline): second derivative of yspline on input mesh +!! nfit: number of points of output mesh +!! xfit(nfit): output mesh +!! +!! OUTPUT +!! yfit(nfit): function on output mesh +!! [ierr]=A non-zero value is used to signal that some points in xfit exceed xspline(nspline). +!! The input value is incremented by the number of such points. +!! +!! SOURCE + +subroutine paw_splint(nspline,xspline,yspline,ysplin2,nfit,xfit,yfit,ierr) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: nfit, nspline + integer,optional,intent(out) :: ierr +!arrays + real(dp),intent(in) :: xspline(nspline),yspline(nspline) + real(dp),intent(in) :: ysplin2(nspline),xfit(nfit) + real(dp),intent(out) :: yfit(nfit) + +!Local variables------------------------------- +!scalars + integer :: left,i,k,right,my_err + real(dp) :: delarg,invdelarg,aa,bb + character(len=50) :: msg +!arrays + +! ************************************************************************* + + my_err=0 + left=1 + do i=1,nfit + yfit(i)=0._dp ! Initialize for the unlikely event that rmax exceed r(mesh) + do k=left+1, nspline + if(xspline(k) >= xfit(i)) then + if(xspline(k-1) <= xfit(i)) then + right = k + left = k-1 + else + if (k-1.eq.1 .and. i.eq.1) then + msg='xfit(1) < xspline(1)' + else + msg='xfit not properly ordered' + end if + LIBPAW_ERROR(msg) + end if + delarg= xspline(right) - xspline(left) + invdelarg= 1.0_dp/delarg + aa= (xspline(right)-xfit(i))*invdelarg + bb= (xfit(i)-xspline(left))*invdelarg + yfit(i) = aa*yspline(left)+bb*yspline(right) & +& +( (aa*aa*aa-aa)*ysplin2(left) + & +& (bb*bb*bb-bb)*ysplin2(right) ) *delarg*delarg/6.0_dp + exit + end if + end do ! k + if (k==nspline+1) my_err=my_err+1 ! xfit not found + end do ! i + if (present(ierr)) ierr=my_err + +end subroutine paw_splint +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_numeric/paw_splint_der +!! NAME +!! paw_splint_der +!! +!! FUNCTION +!! Compute spline interpolation of the derivative of a tabulated function. +!! There is no hypothesis about the spacing of the input grid points. +!! +!! INPUTS +!! nspline: number of grid points of input mesh +!! xspline(nspline): input mesh +!! yspline(nspline): function on input mesh +!! ysplin2(nspline): second derivative of yspline on input mesh +!! nfit: number of points of output mesh +!! xfit(nfit): output mesh +!! +!! OUTPUT +!! dydxfit(nfit): 1st-derivative of function on output mesh +!! [ierr]=A non-zero value is used to signal that some points in xfit exceed xspline(nspline). +!! The input value is incremented by the number of such points. +!! +!! SOURCE + +subroutine paw_splint_der(nspline,xspline,yspline,ysplin2,nfit,xfit,dydxfit,ierr) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: nfit, nspline + integer,optional,intent(out) :: ierr +!arrays + real(dp),intent(in) :: xspline(nspline),yspline(nspline) + real(dp),intent(in) :: ysplin2(nspline),xfit(nfit) + real(dp),intent(out) :: dydxfit(nfit) + +!Local variables------------------------------- +!scalars + integer :: left,i,k,right,my_err + real(dp) :: delarg,invdelarg,aa,bb + character(len=50) :: msg +!arrays + +! ************************************************************************* + + my_err=0 + left=1 + do i=1,nfit + dydxfit(i)=0._dp ! Initialize for the unlikely event that rmax exceed r(mesh) + do k=left+1, nspline + if(xspline(k) >= xfit(i)) then + if(xspline(k-1) <= xfit(i)) then + right = k + left = k-1 + else + if (k-1.eq.1 .and. i.eq.1) then + msg='xfit(1) < xspline(1)' + else + msg='xfit not properly ordered' + end if + LIBPAW_ERROR(msg) + end if + delarg= xspline(right) - xspline(left) + invdelarg= 1.0_dp/delarg + aa= (xspline(right)-xfit(i))*invdelarg + bb= (xfit(i)-xspline(left))*invdelarg + dydxfit(i) = (yspline(right)-yspline(left))*invdelarg & +& -( (3.0_dp*(aa*aa)-1.0_dp) *ysplin2(left) & +& -(3.0_dp*(bb*bb)-1.0_dp) *ysplin2(right) ) *delarg/6.0_dp + exit + end if + end do ! k + if (k==nspline+1) my_err=my_err+1 ! xfit not found + end do ! i + if (present(ierr)) ierr=my_err + +end subroutine paw_splint_der +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_numeric/paw_uniform_splfit +!! NAME +!! paw_uniform_splfit +!! +!! FUNCTION +!! Evaluate cubic spline fit to get function values on input set +!! of ORDERED, UNIFORMLY SPACED points. +!! Optionally gives derivatives (first and second) at those points too. +!! If point lies outside the range of arg, assign the extremal +!! point values to these points, and zero derivative. +!! +!! INPUTS +!! arg(numarg)=equally spaced arguments (spacing delarg) for data +!! to which spline was fit. +!! fun(numarg,2)=function values to which spline was fit and spline +!! fit to second derivatives (from Numerical Recipes spline). +!! ider= see above +!! newarg(numnew)=new values of arguments at which function is desired. +!! numarg=number of arguments at which spline was fit. +!! numnew=number of arguments at which function values are desired. +!! +!! OUTPUT +!! derfun(numnew)=(optional) values of first or second derivative of function. +!! This is only computed for ider=1 or 2; otherwise derfun not used. +!! newfun(numnew)=values of function at newarg(numnew). +!! This is only computed for ider=0 or 1. +!! +!! NOTES +!! if ider=0, compute only the function (contained in fun) +!! if ider=1, compute the function (contained in fun) and its first derivative (in derfun) +!! if ider=2, compute only the second derivative of the function (in derfun) +!! +!! SOURCE + +subroutine paw_uniform_splfit(arg,derfun,fun,ider,newarg,newfun,numarg,numnew) + +!Arguments ------------------------------------ +!scalars + integer, intent(in) :: ider,numarg,numnew +!arrays + real(dp), intent(in) :: arg(numarg),fun(numarg,2),newarg(numnew) + real(dp), intent(out) :: derfun(numnew) + real(dp), intent(inout) :: newfun(numnew) + +!Local variables------------------------------- +!scalars + integer :: i,jspl + real(dp) :: argmin,delarg,d,aa,bb,cc,dd + character(len=500) :: msg +!arrays + +! ************************************************************************* + +!argmin is smallest x value in spline fit; delarg is uniform spacing of spline argument + argmin=arg(1) + delarg=(arg(numarg)-argmin)/dble(numarg-1) + + if(delarg1) then + l=l-1 + ap=list(l) + iap=iperm(l) + else ! l<=1 + ap=list(ir) + iap=iperm(ir) + list(ir)=list(1) + iperm(ir)=iperm(1) + ir=ir-1 + if (ir==1) then + list(1)=ap + iperm(1)=iap + exit ! This is the end of this algorithm + end if + end if ! l>1 + i=l + j=l+l + do while (j<=ir) + if (j=1) +!! bespp= second derivative of j_l at xx (only if order=2) +!! +!! SOURCE + +subroutine paw_jbessel(bes,besp,bespp,ll,order,xx) + +!Arguments --------------------------------------------- +!scalars + integer,intent(in) :: ll,order + real(dp),intent(in) :: xx + real(dp),intent(out) :: bes,besp,bespp + +!Local variables --------------------------------------- +!scalars + integer,parameter :: imax=40 + integer :: ii,il + real(dp),parameter :: prec=1.d-15 + real(dp) :: besp1,fact,factp,factpp,jn,jnp,jnpp,jr,xx2,xxinv + character(len=200) :: msg + +! ********************************************************************* + + if (order>2) then + msg='Wrong order in paw_jbessel!' + LIBPAW_ERROR(msg) + end if + + if (abs(xx)=1) then + besp=zero;if (ll==1) besp=third + end if + if (order==2) then + bespp=zero + if (ll==0) bespp=-third + if (ll==2) bespp=2._dp/15._dp + end if + return + end if + + xxinv=one/xx + if (order==0) then + factp=zero + factpp=zero + jnp=zero + jnpp=zero + end if + + if (xx=prec.and.iiprec) then + msg='Bessel function did not converge!' + LIBPAW_ERROR(msg) + end if + if (order>=1) then + factp=fact*xx/dble(2*ll+3) + jnp=one;jr=one;ii=0 + do while(abs(jr)>=prec.AND.iiprec) then + msg='1st der. of Bessel function did not converge!' + LIBPAW_ERROR(msg) + end if + end if + if (order==2) then + factpp=factp*xx/dble(2*ll+5) + jnpp=one;jr=one;ii=0 + do while(abs(jr)>=prec.AND.iiprec) then + msg='2nd der. of Bessel function did not converge !' + LIBPAW_ERROR(msg) + end if + end if + else + jn =sin(xx)*xxinv + jnp=(-cos(xx)+jn)*xxinv + do il=2,ll+1 + jr=-jn+dble(2*il-1)*jnp*xxinv + jn=jnp;jnp=jr + end do + bes=jn + if (order>=1) besp =-jnp+jn *xxinv*dble(ll) + if (order==2) besp1= jn -jnp*xxinv*dble(ll+2) + end if + + if (order==2) bespp=-besp1+besp*ll*xxinv-bes*ll*xxinv*xxinv + +end subroutine paw_jbessel +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_numeric/paw_solvbes +!! NAME +!! paw_solvbes +!! +!! FUNCTION +!! Find nq first roots of instrinsic equation: +!! alpha.jl(Q) + beta.Q.djl/dr(Q) = 0 +!! +!! INPUTS +!! alpha,beta= factors in intrinsic equation +!! ll= l quantum number +!! nq= number of roots to find +!! +!! OUTPUT +!! root(nq)= roots of instrinsic equation +!! +!! SOURCE + + subroutine paw_solvbes(root,alpha,beta,ll,nq) + +!Arguments ------------------------------------ +!scalars + integer :: ll,nq + real(dp) :: alpha,beta +!arrays + real(dp) :: root(nq) + +!Local variables------------------------------- +!scalars + integer :: nroot + real(dp),parameter :: dh=0.1_dp,tol=tol14 + real(dp) :: dum,hh,jbes,jbesp,qq,qx,y1,y2 + +! ************************************************************************* + + qq=dh;nroot=0 + + do while (nroot=zero) + qq=qq+dh + call paw_jbessel(jbes,jbesp,dum,ll,1,qq) + y2=alpha*jbes+beta*qq*jbesp + end do + + hh=dh;qx=qq + do while (hh>tol) + hh=half*hh + if (y1*y20. +!! +!! INPUTS +!! ll=l-order of the Bessel function +!! tol=tolerance below which a Polynomial approximation is employed +!! both for jl and its derivative (if required) +!! order=1 if only first derivative is requested +!! 2 if first and second derivatives are requested +!! xx=where to compute j_l +!! +!! OUTPUT +!! bes=Spherical Bessel function j_l at xx +!! besp= first derivative of j_l at xx (only if order>=1) +!! +!! TODO +!! Remove inline definitions, they are obsolete in F2003 +!! +!! SOURCE + +subroutine paw_jbessel_4spline(bes,besp,ll,order,xx,tol) + +!Arguments --------------------------------------------- +!scalars + integer,intent(in) :: ll,order + real(dp),intent(in) :: xx,tol + real(dp),intent(out) :: bes,besp + +!Local variables --------------------------------------- +!scalars + real(dp) :: bespp +!real(dp) :: arg,bes0a,bes0ap,bes0b,bes0bp,bes1a,bes1ap,bes1b,bes1bp +!real(dp) :: bes2a,bes2ap,bes2b,bes2bp,bes3a,bes3ap,bes3b,bes3bp + character(len=100) :: msg + +! ********************************************************************* + +! === l=0,1,2 and 3 spherical Bessel functions (and derivatives) === +! Statement functions are obsolete. Sorry ... +!bes0a(arg)=1.0_dp-arg**2/6.0_dp*(1.0_dp-arg**2/20.0_dp) +!bes0b(arg)=sin(arg)/arg +!bes1a(arg)=(10.0_dp-arg*arg)*arg/30.0_dp +!bes1b(arg)=(sin(arg)-arg*cos(arg))/arg**2 +!bes2a(arg)=arg*arg/15.0_dp-arg**4/210.0_dp +!bes2b(arg)=((3.0_dp-arg**2)*sin(arg)-3.0_dp*arg*cos(arg))/arg**3 +!bes3a(arg)=arg*arg*arg/105.0_dp-arg**5/1890.0_dp+arg**7/83160.0_dp +!bes3b(arg)=(15.0_dp*sin(arg)-15.0_dp*arg*cos(arg)-6.0_dp*arg**2*sin(arg)+arg**3*cos(arg))/arg**4 +!bes0ap(arg)=(-10.0_dp+arg*arg)*arg/30.0_dp +!bes0bp(arg)=-(sin(arg)-arg*cos(arg))/arg**2 +!bes1ap(arg)=(10.0_dp-3.0_dp*arg*arg)/30.0_dp +!bes1bp(arg)=((arg*arg-2.0_dp)*sin(arg)+2.0_dp*arg*cos(arg))/arg**3 +!bes2ap(arg)=(1.0_dp-arg*arg/7.0_dp)*2.0_dp*arg/15.0_dp +!bes2bp(arg)=((4.0_dp*arg*arg-9.0_dp)*sin(arg)+(9.0_dp-arg*arg)*arg*cos(arg))/arg**4 +!bes3ap(arg)=(1.0_dp/35-arg*arg/378.0_dp+arg**4/11880.0_dp)*arg*arg +!bes3bp(arg)=((-60.0_dp+27.0_dp*arg*arg-arg**4)*sin(arg)+(60.0_dp*arg-7.0_dp*arg**3)*cos(arg))/arg**5 + + ! This is to test paw_jbessel calculation without polynomial approximation for q-->0. + ! call paw_jbessel(bes,besp,bespp,ll,order,xx) + ! RETURN + + if (order>2) then + msg='Wrong order in paw_jbessel_4spline' + LIBPAW_ERROR(msg) + end if + + select case (ll) + case (0) + if (xx=1) besp=(-10.0_dp+xx*xx)*xx/30.0_dp + else + bes=sin(xx)/xx + if (order>=1) besp=-(sin(xx)-xx*cos(xx))/xx**2 + end if + + case (1) + if (xx=1) besp=(10.0_dp-3.0_dp*xx*xx)/30.0_dp + else + bes=(sin(xx)-xx*cos(xx))/xx**2 + if (order>=1) besp=((xx*xx-2.0_dp)*sin(xx)+2.0_dp*xx*cos(xx))/xx**3 + end if + + case (2) + if (xx=1) besp=(1.0_dp-xx*xx/7.0_dp)*2.0_dp*xx/15.0_dp + else + bes=((3.0_dp-xx**2)*sin(xx)-3.0_dp*xx*cos(xx))/xx**3 + if (order>=1) besp=((4.0_dp*xx*xx-9.0_dp)*sin(xx)+(9.0_dp-xx*xx)*xx*cos(xx))/xx**4 + end if + + case (3) + if (xx=1) besp=(1.0_dp/35-xx*xx/378.0_dp+xx**4/11880.0_dp)*xx*xx + else + bes=(15.0_dp*sin(xx)-15.0_dp*xx*cos(xx)-6.0_dp*xx**2*sin(xx)+xx**3*cos(xx))/xx**4 + if (order>=1) besp=((-60.0_dp+27.0_dp*xx*xx-xx**4)*sin(xx)+(60.0_dp*xx-7.0_dp*xx**3)*cos(xx))/xx**5 + end if + + case (4:) + call paw_jbessel(bes,besp,bespp,ll,order,xx) + + case default + write(msg,'(a,i4)')' wrong value for ll = ',ll + LIBPAW_BUG(msg) + end select + +end subroutine paw_jbessel_4spline +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_numeric/paw_derfc +!! NAME +!! paw_derfc +!! +!! FUNCTION +!! Evaluates the complementary error function in real(dp). +!! +!! INPUTS +!! yy +!! +!! OUTPUT +!! derfc_yy=complementary error function of yy +!! +!! SOURCE + +elemental function paw_derfc(yy) result(derfc_yy) + +!Arguments ------------------------------------ +!scalars + real(dp),intent(in) :: yy + real(dp) :: derfc_yy + +!Local variables------------------------------- + integer :: done,ii,isw +! coefficients for 0.0 <= yy < .477 + real(dp), parameter :: & +& pp(5)=(/ 113.8641541510502e0_dp, 377.4852376853020e0_dp, & +& 3209.377589138469e0_dp, .1857777061846032e0_dp, & +& 3.161123743870566e0_dp /) + real(dp), parameter :: & +& qq(4)=(/ 244.0246379344442e0_dp, 1282.616526077372e0_dp, & +& 2844.236833439171e0_dp, 23.60129095234412e0_dp/) +! coefficients for .477 <= yy <= 4.0 + real(dp), parameter :: & +& p1(9)=(/ 8.883149794388376e0_dp, 66.11919063714163e0_dp, & +& 298.6351381974001e0_dp, 881.9522212417691e0_dp, & +& 1712.047612634071e0_dp, 2051.078377826071e0_dp, & +& 1230.339354797997e0_dp, 2.153115354744038e-8_dp, & +& .5641884969886701e0_dp /) + real(dp), parameter :: & +& q1(8)=(/ 117.6939508913125e0_dp, 537.1811018620099e0_dp, & +& 1621.389574566690e0_dp, 3290.799235733460e0_dp, & +& 4362.619090143247e0_dp, 3439.367674143722e0_dp, & +& 1230.339354803749e0_dp, 15.74492611070983e0_dp/) + ! coefficients for 4.0 < y, + real(dp), parameter :: & +& p2(6)=(/ -3.603448999498044e-01_dp, -1.257817261112292e-01_dp, & +& -1.608378514874228e-02_dp, -6.587491615298378e-04_dp, & +& -1.631538713730210e-02_dp, -3.053266349612323e-01_dp/) + real(dp), parameter :: & +& q2(5)=(/ 1.872952849923460e0_dp , 5.279051029514284e-01_dp, & +& 6.051834131244132e-02_dp , 2.335204976268692e-03_dp, & +& 2.568520192289822e0_dp /) + real(dp), parameter :: & +& sqrpi=.5641895835477563e0_dp, xbig=13.3e0_dp, xlarge=6.375e0_dp, xmin=1.0e-10_dp + real(dp) :: res,xden,xi,xnum,xsq,xx + +!****************************************************************** + + xx = yy + isw = 1 +!Here change the sign of xx, and keep track of it thanks to isw + if (xx<0.0e0_dp) then + isw = -1 + xx = -xx + end if + + done=0 + +!Residual value, if yy < -6.375e0_dp + res=2.0e0_dp + +!abs(yy) < .477, evaluate approximation for erfc + if (xx<0.477e0_dp) then +! xmin is a very small number + if (xx 13.3e0_dp + if (isw > 0 .and. xx > xbig .and. done==0 ) then + res = 0.0e0_dp + done=1 + end if + +!4.0 < yy < 13.3e0_dp .or. -6.375e0_dp < yy < -4.0 +!evaluate minimax approximation for erfc + if ( ( isw > 0 .or. xx < xlarge ) .and. done==0 ) then + xsq = xx*xx + xi = 1.0e0_dp/xsq + xnum= p2(5)*xi+p2(6) + xden = xi+q2(5) + do ii = 1,4 + xnum = xnum*xi+p2(ii) + xden = xden*xi+q2(ii) + end do + res = (sqrpi+xi*xnum/xden)/xx + res = res* exp(-xsq) + if (isw.eq.-1) res = 2.0e0_dp-res + end if + +!All cases have been investigated + derfc_yy = res + +end function paw_derfc +!!*** + +!---------------------------------------------------------------------- + +end module m_paw_numeric +!!*** diff --git a/GX-PAW/libpaw/src/m_paw_numeric.o b/GX-PAW/libpaw/src/m_paw_numeric.o new file mode 100644 index 00000000..12630766 Binary files /dev/null and b/GX-PAW/libpaw/src/m_paw_numeric.o differ diff --git a/GX-PAW/libpaw/src/m_paw_onsite.F90 b/GX-PAW/libpaw/src/m_paw_onsite.F90 new file mode 100644 index 00000000..ffcd4da3 --- /dev/null +++ b/GX-PAW/libpaw/src/m_paw_onsite.F90 @@ -0,0 +1,552 @@ +!!****m* ABINIT/m_paw_onsite +!! NAME +!! m_paw_onsite +!! +!! FUNCTION +!! This module contains a set of routines to compute various PAW on-site quantities +!! i.e. quantities expressed with and/or . +!! +!! COPYRIGHT +!! Copyright (C) 2013-2024 ABINIT group (MT,FJ) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! NOTES +!! FOR DEVELOPPERS: in order to preserve the portability of libPAW library, +!! please consult ~abinit/src/??_libpaw/libpaw-coding-rules.txt +!! +!! SOURCE + +#include "libpaw.h" + +MODULE m_paw_onsite + + USE_DEFS + USE_MSG_HANDLING + USE_MEMORY_PROFILING + + use m_pawrad, only : pawrad_type, pawrad_deducer0, simp_gen, nderiv_gen + use m_pawtab, only : pawtab_type + use m_paw_sphharm, only : setnabla_ylm + + implicit none + + private + +!public procedures. + public :: pawnabla_init ! Evaluate valence-valence on-site contribs of the nabla operator in cart. coord. + public :: pawnabla_core_init ! Evaluate core-valence on-site contribs of the nabla operator in cart. coord. + +!!*** + +CONTAINS + +!=========================================================== +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_onsite/pawnabla_init +!! NAME +!! pawnabla_init +!! +!! FUNCTION +!! Evaluate all valence-valence onsite contributions of the nabla operator in cartesian coordinates, +!! i.e. -. +!! +!! INPUTS +!! mpsang=1+maximum angular momentum +!! ntypat=Number of types of atoms in cell +!! Pawrad(ntypat)=PAW radial mesh and related data: +!! %rad(mesh_size)=The coordinates of all the points of the radial mesh +!! Pawtab(ntypat) =PAW tabulated starting data: +!! %mesh_size=Dimension of radial mesh +!! %lmn_size=Number of (l,m,n) elements for the PAW basis +!! +!! OUTPUT +!! See side effects +!! +!! SIDE EFFECTS +!! Pawtab(ntypat) =PAW tabulated starting data: +!! %has_nabla=set to 1 in matrix elements are calculated and stored +!! %nabla_ij(3,lmn_size,lmn_size)= - +!! +!! NOTES +!! MG extracted this piece of code from optics_paw.F90 in order to have something more +!! reusable! Note however the storage mode of nabla_ij differs from optics_paw +!! (here Cartesian coordinates run faster). Besides nabla_ij contains the matrix +!! elements of \nabla instead of the elements of the momentum operator p. +!! +!! SOURCE + +subroutine pawnabla_init(mpsang,ntypat,pawrad,pawtab) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: mpsang,ntypat +!arrays + type(pawtab_type),target,intent(inout) :: pawtab(ntypat) + type(pawrad_type),intent(in) :: pawrad(ntypat) + +!Local variables------------------------------- +!scalars + integer :: ii,nln,il,ilm,ilmn,iln,itypat + integer :: jl,jlm,jlmn,jln,lmn_size,mesh_size + real(dp) :: avg,intg + character(len=500) :: msg +!arrays + integer, LIBPAW_CONTIGUOUS pointer :: indlmn(:,:) + real(dp) :: ang_phipphj(mpsang**2,mpsang**2,8) + real(dp),allocatable :: dphi(:),dtphi(:),ff(:),int1(:,:),int2(:,:),rad(:) + +! ************************************************************************* + + if (mpsang>4)then + write(msg,'(3a)')& +& 'Not designed for angular momentum greater than 3 ',ch10,& +& 'Modification in the table defined in routine setnabla_ylm is required.' + LIBPAW_BUG(msg) + end if + +!Integration of the angular part: all angular integrals have been computed +!outside Abinit and tabulated for each (l,m) value up to l=3 + call setnabla_ylm(ang_phipphj,mpsang) + + do itypat=1,ntypat + +! COMPUTE nabla_ij := - for this type + mesh_size=pawtab(itypat)%mesh_size + lmn_size=pawtab(itypat)%lmn_size + nln=pawtab(itypat)%basis_size + + if (allocated(pawtab(itypat)%nabla_ij)) then + LIBPAW_DEALLOCATE(pawtab(itypat)%nabla_ij) + end if + LIBPAW_ALLOCATE(pawtab(itypat)%nabla_ij,(3,lmn_size,lmn_size)) + pawtab(itypat)%has_nabla=1 + + LIBPAW_ALLOCATE(ff,(mesh_size)) + LIBPAW_ALLOCATE(rad,(mesh_size)) + LIBPAW_ALLOCATE(int1,(lmn_size,lmn_size)) + LIBPAW_ALLOCATE(int2,(lmn_size,lmn_size)) + LIBPAW_ALLOCATE(dphi,(mesh_size)) + LIBPAW_ALLOCATE(dtphi,(mesh_size)) + + indlmn => pawtab(itypat)%indlmn + rad(1:mesh_size)=pawrad(itypat)%rad(1:mesh_size) + +! int1= \int [ Phi d/dr(Phj) - tPhi d/dr(tPhj) ] r^2 dr +! = \int [ (phi d/dr(phj) - phi phj/r) - (tphi d/dr(tphj) - tphi tphj/r) ] dr +! with Phi=phi/r and tPhi=phi/r + do jln=1,nln + ff(1:mesh_size)=pawtab(itypat)%phi(1:mesh_size,jln) + call nderiv_gen(dphi,ff,pawrad(itypat)) + ff(1:mesh_size)=pawtab(itypat)%tphi(1:mesh_size,jln) + call nderiv_gen(dtphi,ff,pawrad(itypat)) + do iln=1,nln + ff(2:mesh_size)= & +& pawtab(itypat)%phi (2:mesh_size,iln)*dphi (2:mesh_size) & +& -pawtab(itypat)%phi (2:mesh_size,iln)*pawtab(itypat)%phi (2:mesh_size,jln)/rad(2:mesh_size) & +& -( pawtab(itypat)%tphi(2:mesh_size,iln)*dtphi(2:mesh_size) & +& -pawtab(itypat)%tphi(2:mesh_size,iln)*pawtab(itypat)%tphi(2:mesh_size,jln)/rad(2:mesh_size) ) + call pawrad_deducer0(ff,mesh_size,pawrad(itypat)) + call simp_gen(intg,ff,pawrad(itypat)) + int1(iln,jln)=intg + end do + end do + +! int2= \int [ Phi Phj /r - \int tPhi tPhj /r ] r^2 dr +! = \int [ phi phj /r - \int tphi tphj /r ] dr +! with Phi=phi/r and tPhi=phi/r + do jln=1,nln + do iln=1,nln + ff(2:mesh_size)= ( & +& pawtab(itypat)%phi (2:mesh_size,iln)*pawtab(itypat)%phi (2:mesh_size,jln) & +& -pawtab(itypat)%tphi(2:mesh_size,iln)*pawtab(itypat)%tphi(2:mesh_size,jln) ) /rad(2:mesh_size) + call pawrad_deducer0(ff,mesh_size,pawrad(itypat)) + call simp_gen(intg,ff,pawrad(itypat)) + int2(iln,jln)=intg + end do + end do + +! Integration of the radial part, Note unpacked loop + do jlmn=1,lmn_size + jlm=indlmn(4,jlmn) + jl =indlmn(5,jlmn) + do ilmn=1,lmn_size + ilm=indlmn(4,ilmn) + il =indlmn(5,ilmn) + + pawtab(itypat)%nabla_ij(1,ilmn,jlmn)= & +& int1(il,jl)* ang_phipphj(ilm,jlm,1) & +& +int2(il,jl)*(ang_phipphj(ilm,jlm,2)+ang_phipphj(ilm,jlm,3)) + + pawtab(itypat)%nabla_ij(2,ilmn,jlmn)= & +& int1(il,jl)* ang_phipphj(ilm,jlm,4) & +& +int2(il,jl)*(ang_phipphj(ilm,jlm,5)+ang_phipphj(ilm,jlm,6)) + + pawtab(itypat)%nabla_ij(3,ilmn,jlmn)= & +& int1(il,jl)* ang_phipphj(ilm,jlm,7) & +& +int2(il,jl)* ang_phipphj(ilm,jlm,8) + + end do !ilmn + end do !jlmn + +! Symetrization + if (lmn_size>1) then + do jlmn=2,lmn_size + do ilmn=1,jlmn-1 + do ii=1,3 + avg=half*(pawtab(itypat)%nabla_ij(ii,ilmn,jlmn)-pawtab(itypat)%nabla_ij(ii,jlmn,ilmn)) + pawtab(itypat)%nabla_ij(ii,ilmn,jlmn)= avg + pawtab(itypat)%nabla_ij(ii,jlmn,ilmn)=-avg + end do + end do + end do + end if + +! End + pawtab(itypat)%has_nabla=2 + LIBPAW_DEALLOCATE(ff) + LIBPAW_DEALLOCATE(rad) + LIBPAW_DEALLOCATE(int2) + LIBPAW_DEALLOCATE(int1) + LIBPAW_DEALLOCATE(dphi) + LIBPAW_DEALLOCATE(dtphi) + + end do !itypat + +end subroutine pawnabla_init +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_onsite/pawnabla_core_init +!! NAME +!! pawnabla_core_init +!! +!! FUNCTION +!! Evaluate core-valence onsite contributions of the nabla operator in cartesian coordinates, +!! i.e. -. +!! Core wave-functions are only given for one atom type. +!! +!! INPUTS +!! mpsang=1+maximum angular momentum +!! ntypat=Number of types of atoms in cell +!! Pawrad(ntypat)=PAW radial mesh and related data: +!! %rad(mesh_size)=The coordinates of all the points of the radial mesh +!! Pawtab(ntypat) =PAW tabulated starting data: +!! %mesh_size=Dimension of radial mesh +!! %lmn_size=Number of (l,m,n) elements for the PAW basis +!! phi_cor(mesh_size,nphicor)=core wave-functions for the current type of atoms. +!! indlmn_cor(6,nlmn_core)= array giving l,m,n,lm,ln,s for i=lmn, for the core wave functions. +!! +!! OUTPUT +!! See side effects +!! +!! SIDE EFFECTS +!! Pawtab(ntypat) =PAW tabulated starting data: +!! %has_nabla=set to 1 in matrix elements are calculated and stored +!! %nabla_ij(3,lmn_size,lmn_size)= - +!! +!! NOTES +!! MG extracted this piece of code from optics_paw.F90 in order to have something more +!! reusable! Note however the storage mode of nabla_ij differs from optics_paw +!! (here Cartesian coordinates run faster). Besides nabla_ij contains the matrix +!! elements of \nabla instead of the elements of the momentum operator p. +!! +!! SOURCE + +subroutine pawnabla_core_init(mpsang,ntypat,pawrad,pawtab,phi_cor,indlmn_cor,diracflag) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: mpsang,ntypat + integer,intent(in),optional :: diracflag +!arrays + integer,intent(in) :: indlmn_cor(:,:) + real(dp),intent(in) :: phi_cor(:,:) + type(pawtab_type),target,intent(inout) :: pawtab(ntypat) + type(pawrad_type),intent(in) :: pawrad(ntypat) + +!Local variables------------------------------- +!scalars + integer :: nln,nln_cor,ilm,ilmn,iln,itypat,sgnkappa + integer :: jl,jm,jlm,jlmn,jln,js,jlm_re,jlm_im,jm_re,jm_im + integer :: lmn_size,lmncmax,lcmax,ltmax,mesh_size,mesh_size_cor + real(dp) :: intg,jmj,cgc + logical :: dirac + character(len=500) :: msg +!arrays + integer, LIBPAW_CONTIGUOUS pointer :: indlmn(:,:) + real(dp) , allocatable:: ang_phipphj(:,:,:) + real(dp),allocatable :: dphi(:),ff(:),int1(:,:),int2(:,:),rad(:) + +! ************************************************************************* + + mesh_size_cor=size(phi_cor,1) + nln_cor=size(phi_cor,2) + + dirac=.false. + if(present(diracflag)) then + dirac=(diracflag==1) + if(diracflag==1.and.size(indlmn_cor,1)<8) then + msg='Wrong first dimension of indlmn_cor in pawnabla_core_init for diracrelativism!' + LIBPAW_BUG(msg) + endif + endif + +!To be checked + lmncmax=size(indlmn_cor,2) !Includes spinors if diracrel core wf are used + lcmax=maxval(indlmn_cor(1,:)) + ltmax=max(lcmax+1,mpsang) + LIBPAW_ALLOCATE(ang_phipphj,(ltmax**2,ltmax**2,8)) + + if (ltmax>4)then + write(msg,'(3a)')& +& 'Not designed for angular momentum greater than 3!',ch10,& +& 'Modification in the table defined in routine setnabla_ylm is required.' + LIBPAW_BUG(msg) + end if + +!if (mesh_size_cor/=pawrad(1)%mesh_size) then +! write(msg,'(a)') 'Wrong mesh_size_cor value (1)!' +! LIBPAW_BUG(msg) +!end if +!if (any(mesh_size_cor/=pawtab(:)%mesh_size)) then +! write(msg,'(3a)') 'Wrong mesh_size_cor value (2)!',ch10,& +!& 'Should have only one type of atom.' +! LIBPAW_ERROR(msg) +!end if + +!Integration of the angular part: all angular integrals have been computed +!outside Abinit and tabulated for each (l,m) value up to l=3 + call setnabla_ylm(ang_phipphj,ltmax) + + do itypat=1,ntypat + +! COMPUTE nabla_ij := for this type + mesh_size=min(pawtab(itypat)%partialwave_mesh_size,pawrad(itypat)%mesh_size) + mesh_size=min(mesh_size_cor,mesh_size) + lmn_size=pawtab(itypat)%lmn_size + nln=pawtab(itypat)%basis_size + + if (mesh_size_cor pawtab(itypat)%indlmn + rad(1:mesh_size)=pawrad(itypat)%rad(1:mesh_size) + +! int1= \int Phi d/dr(Phi_core) r^2 dr +! = \int (phi d/dr(phi_core) - phi phj_core/r) dr +! with Phi=phi/r and Phi_core=phi_core/r + do jln=1,nln_cor + ff(1:mesh_size)=phi_cor(1:mesh_size,jln) + call nderiv_gen(dphi,ff,pawrad(itypat)) + do iln=1,nln + ff(2:mesh_size)=pawtab(itypat)%phi(2:mesh_size,iln)*dphi(2:mesh_size) & +& -pawtab(itypat)%phi(2:mesh_size,iln)*phi_cor(2:mesh_size,jln)/rad(2:mesh_size) + call pawrad_deducer0(ff,mesh_size,pawrad(itypat)) + call simp_gen(intg,ff,pawrad(itypat)) + int1(iln,jln)=intg + end do + end do + +! int2= \int Phi Phi_core /r r^2 dr = \int phi phi_core /r dr +! with Phi=phi/r and Phi_core=phi_core/r + do jln=1,nln_cor + do iln=1,nln + ff(2:mesh_size)=(pawtab(itypat)%phi(2:mesh_size,iln)*phi_cor(2:mesh_size,jln))/rad(2:mesh_size) + call pawrad_deducer0(ff,mesh_size,pawrad(itypat)) + call simp_gen(intg,ff,pawrad(itypat)) + int2(iln,jln)=intg + end do + end do + +! ===== FULLY-RELATIVISTIC ===== + if(dirac) then + +! Integration of the radial part, Note unpacked loop + do jlmn=1,lmncmax + jl=indlmn_cor(1,jlmn) + jm=indlmn_cor(2,jlmn) + + sgnkappa=indlmn_cor(3,jlmn) + jmj=half*indlmn_cor(8,jlmn) ! 2mj is stored in indlmn_cor + js=indlmn_cor(6,jlmn) ! 1 is up, 2 is down + +! Calculate spinor dependend coeffs +! (Clebsch-Gordan, I guess) + cgc=one ! so nothing changes without core spinors + if (sgnkappa==1) then + if(js==1) then + cgc= sqrt((dble(jl)-jmj+half)/dble(2*jl+1)) + else + cgc=-sqrt((dble(jl)+jmj+half)/dble(2*jl+1)) + endif + else + if(js==1) then + cgc= sqrt((dble(jl)+jmj+half)/dble(2*jl+1)) + else + cgc= sqrt((dble(jl)-jmj+half)/dble(2*jl+1)) + endif + endif + + jlm=indlmn_cor(4,jlmn) + jln=indlmn_cor(5,jlmn) + + do ilmn=1,lmn_size + ilm=indlmn(4,ilmn) + iln=indlmn(5,ilmn) + +! jl was set as a flag for invalid combinations +! i.e. m=-(l+1) or m=(l+1) +! In these cases, cgc=0 ; so nabla_ij=0 + if(jl==-1) then + pawtab(itypat)%nabla_ij(1:3,ilmn,jlmn)= zero + pawtab(itypat)%nabla_im_ij(1:3,ilmn,jlmn) = zero + + else + +! if jm<>0, need to convert from complex +! to real spherical harmonics + if(jm<0) then + jm_re=abs(jm) + jm_im=-abs(jm) + jlm_re=jl*(jl+1)+jm_re+1 + jlm_im=jl*(jl+1)+jm_im+1 + pawtab(itypat)%nabla_ij(1,ilmn,jlmn)=half_sqrt2*cgc*( & +& int1(iln,jln)* ang_phipphj(ilm,jlm_re,1) & +& +int2(iln,jln)*(ang_phipphj(ilm,jlm_re,2)+ang_phipphj(ilm,jlm_re,3))) + pawtab(itypat)%nabla_ij(2,ilmn,jlmn)=half_sqrt2*cgc*( & +& int1(iln,jln)* ang_phipphj(ilm,jlm_re,4) & +& +int2(iln,jln)*(ang_phipphj(ilm,jlm_re,5)+ang_phipphj(ilm,jlm_re,6))) + pawtab(itypat)%nabla_ij(3,ilmn,jlmn)=half_sqrt2*cgc*( & +& int1(iln,jln)* ang_phipphj(ilm,jlm_re,7) & +& +int2(iln,jln)* ang_phipphj(ilm,jlm_re,8)) + pawtab(itypat)%nabla_im_ij(1,ilmn,jlmn)=-half_sqrt2*cgc*( & +& int1(iln,jln)* ang_phipphj(ilm,jlm_im,1) & +& +int2(iln,jln)*(ang_phipphj(ilm,jlm_im,2)+ang_phipphj(ilm,jlm_im,3))) + pawtab(itypat)%nabla_im_ij(2,ilmn,jlmn)=-half_sqrt2*cgc*( & +& int1(iln,jln)* ang_phipphj(ilm,jlm_im,4) & +& +int2(iln,jln)*(ang_phipphj(ilm,jlm_im,5)+ang_phipphj(ilm,jlm_im,6))) + pawtab(itypat)%nabla_im_ij(3,ilmn,jlmn)=-half_sqrt2*cgc*( & +& int1(iln,jln)* ang_phipphj(ilm,jlm_im,7) & +& +int2(iln,jln)* ang_phipphj(ilm,jlm_im,8)) + + else if (jm>0) then + jm_re=abs(jm) + jm_im=-abs(jm) + jlm_re=jl*(jl+1)+jm_re+1 + jlm_im=jl*(jl+1)+jm_im+1 + pawtab(itypat)%nabla_ij(1,ilmn,jlmn)=((-1)**jm)*half_sqrt2*cgc*( & +& int1(iln,jln)* ang_phipphj(ilm,jlm_re,1) & +& +int2(iln,jln)*(ang_phipphj(ilm,jlm_re,2)+ang_phipphj(ilm,jlm_re,3))) + pawtab(itypat)%nabla_ij(2,ilmn,jlmn)=((-1)**jm)*half_sqrt2*cgc*( & +& int1(iln,jln)* ang_phipphj(ilm,jlm_re,4) & +& +int2(iln,jln)*(ang_phipphj(ilm,jlm_re,5)+ang_phipphj(ilm,jlm_re,6))) + pawtab(itypat)%nabla_ij(3,ilmn,jlmn)=((-1)**jm)*half_sqrt2*cgc*( & +& int1(iln,jln)* ang_phipphj(ilm,jlm_re,7) & +& +int2(iln,jln)* ang_phipphj(ilm,jlm_re,8)) + pawtab(itypat)%nabla_im_ij(1,ilmn,jlmn)=((-1)**jm)*half_sqrt2*cgc*( & +& int1(iln,jln)* ang_phipphj(ilm,jlm_im,1) & +& +int2(iln,jln)*(ang_phipphj(ilm,jlm_im,2)+ang_phipphj(ilm,jlm_im,3))) + pawtab(itypat)%nabla_im_ij(2,ilmn,jlmn)=((-1)**jm)*half_sqrt2*cgc*( & +& int1(iln,jln)* ang_phipphj(ilm,jlm_im,4) & +& +int2(iln,jln)*(ang_phipphj(ilm,jlm_im,5)+ang_phipphj(ilm,jlm_im,6))) + pawtab(itypat)%nabla_im_ij(3,ilmn,jlmn)=((-1)**jm)*half_sqrt2*cgc*( & +& int1(iln,jln)* ang_phipphj(ilm,jlm_im,7) & +& +int2(iln,jln)* ang_phipphj(ilm,jlm_im,8)) + + else ! jm=0 : no conversion necessary if m=0 + pawtab(itypat)%nabla_ij(1,ilmn,jlmn)=cgc*( & +& int1(iln,jln)* ang_phipphj(ilm,jlm,1) & +& +int2(iln,jln)*(ang_phipphj(ilm,jlm,2)+ang_phipphj(ilm,jlm,3))) + pawtab(itypat)%nabla_ij(2,ilmn,jlmn)=cgc*( & +& int1(iln,jln)* ang_phipphj(ilm,jlm,4) & +& +int2(iln,jln)*(ang_phipphj(ilm,jlm,5)+ang_phipphj(ilm,jlm,6))) + pawtab(itypat)%nabla_ij(3,ilmn,jlmn)=cgc*( & +& int1(iln,jln)* ang_phipphj(ilm,jlm,7) & +& +int2(iln,jln)* ang_phipphj(ilm,jlm,8)) + pawtab(itypat)%nabla_im_ij(1,ilmn,jlmn)= zero + pawtab(itypat)%nabla_im_ij(2,ilmn,jlmn)= zero + pawtab(itypat)%nabla_im_ij(3,ilmn,jlmn)= zero + end if + + endif ! jl==-1? + + end do !ilmn + end do !jlmn + + pawtab(itypat)%has_nabla=4 + +! ===== NON-RELATIVISTIC OR SCALAR-RELATICISTIC ===== + else + +! Integration of the radial part, Note unpacked loop + do jlmn=1,lmncmax + jl=indlmn_cor(1,jlmn) + jlm=indlmn_cor(4,jlmn) + jln =indlmn_cor(5,jlmn) + do ilmn=1,lmn_size + ilm=indlmn(4,ilmn) + iln =indlmn(5,ilmn) + pawtab(itypat)%nabla_ij(1,ilmn,jlmn)=( & +& int1(iln,jln)* ang_phipphj(ilm,jlm,1) & +& +int2(iln,jln)*(ang_phipphj(ilm,jlm,2)+ang_phipphj(ilm,jlm,3))) + + pawtab(itypat)%nabla_ij(2,ilmn,jlmn)=( & +& int1(iln,jln)* ang_phipphj(ilm,jlm,4) & +& +int2(iln,jln)*(ang_phipphj(ilm,jlm,5)+ang_phipphj(ilm,jlm,6))) + + pawtab(itypat)%nabla_ij(3,ilmn,jlmn)=( & +& int1(iln,jln)* ang_phipphj(ilm,jlm,7) & +& +int2(iln,jln)* ang_phipphj(ilm,jlm,8)) + end do !ilmn + end do !jlmn + + pawtab(itypat)%has_nabla=3 + + end if ! Relativistic? + + LIBPAW_DEALLOCATE(ff) + LIBPAW_DEALLOCATE(rad) + LIBPAW_DEALLOCATE(int1) + LIBPAW_DEALLOCATE(int2) + LIBPAW_DEALLOCATE(dphi) + + end do !itypat + + LIBPAW_DEALLOCATE(ang_phipphj) + +end subroutine pawnabla_core_init +!!*** + +!---------------------------------------------------------------------- + +end module m_paw_onsite +!!*** + diff --git a/GX-PAW/libpaw/src/m_paw_onsite.o b/GX-PAW/libpaw/src/m_paw_onsite.o new file mode 100644 index 00000000..f0d4b4fb Binary files /dev/null and b/GX-PAW/libpaw/src/m_paw_onsite.o differ diff --git a/GX-PAW/libpaw/src/m_paw_sphharm.F90 b/GX-PAW/libpaw/src/m_paw_sphharm.F90 new file mode 100644 index 00000000..fec33ff4 --- /dev/null +++ b/GX-PAW/libpaw/src/m_paw_sphharm.F90 @@ -0,0 +1,3673 @@ +!!****m* ABINIT/m_paw_sphharm +!! NAME +!! m_paw_sphharm +!! +!! FUNCTION +!! This module contains a set of routines to compute the complex (resp. real) +!! spherical harmonics Ylm (resp. Slm) (and gradients). +!! +!! COPYRIGHT +!! Copyright (C) 2013-2024 ABINIT group (MT, FJ, NH, TRangel) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! NOTES +!! FOR DEVELOPPERS: in order to preserve the portability of libPAW library, +!! please consult ~abinit/src/??_libpaw/libpaw-coding-rules.txt +!! +!! SOURCE + +#include "libpaw.h" + +MODULE m_paw_sphharm + + USE_DEFS + USE_MSG_HANDLING + USE_MEMORY_PROFILING + + implicit none + + private + +!Public procedures. + public :: ylmc ! Complex Spherical harmonics for l<=3. + public :: ylmcd ! First derivative of complex Ylm wrt theta and phi up to l<=3 + public :: ylm_cmplx ! All (complex) spherical harmonics for lx<=4 + public :: initylmr ! Real Spherical Harmonics on a set of vectors + public :: ys ! Matrix element + public :: lxyz ! Matrix element + public :: slxyzs ! Matrix element + public :: lsylm ! Compute the LS operator in the real spherical harmonics basis + public :: plm_coeff ! Coefficients depending on Plm used to compute the 2nd der of Ylm + public :: ass_leg_pol ! Associated Legendre Polynomial Plm(x) + public :: plm_dphi ! m*P_lm(x)/sqrt((1-x^2) (P_lm= associatedLegendre polynomial) + public :: plm_dtheta ! -(1-x^2)^1/2*d/dx{P_lm(x)} (P_lm= associated Legendre polynomial) + public :: plm_d2theta ! d2(Plm (cos(theta)))/d(theta)2 (P_lm= associated Legendre polynomial) + public :: pl_deriv ! d2(Pl (x)))/d(x)2 where P_l is a Legendre polynomial + public :: ylm_angular_mesh ! Build (theta, phi) angular mesh + public :: mat_mlms2jmj ! Change a matrix from the Ylm basis to the J,M_J basis + public :: mat_slm2ylm ! Change a matrix from the Slm to the Ylm basis or from Ylm to Slm + public :: setsym_ylm ! Compute rotation matrices expressed in the basis of real spherical harmonics + public :: setnabla_ylm ! Evaluate several integrals involving spherical harmonics and their gradient + public :: gaunt ! Gaunt coeffients for complex Yml + public :: realgaunt ! Compute "real Gaunt coefficients" with "real spherical harmonics" + public :: nablarealgaunt ! Compute the integrals Grad(Slimi).Grad(Sjmj) Slkmk of real spherical harmonics + +!Private functions + private :: create_slm2ylm ! For a given angular momentum lcor, compute slm2ylm + private :: create_mlms2jmj ! For a given angular momentum lcor, give the rotation matrix msml2jmj + private :: mkeuler ! For a given symmetry operation, determines the corresponding Euler angles + private :: dbeta ! Calculate the rotation matrix d^l_{m{\prim}m}(beta) + private :: phim ! Computes Phi_m[t]=Sqrt2.cos[m.t] (m>0), Sqrt2.sin[|m|.t] (m<0), 1 (m=0) + private :: gauleg ! Compute the coefficients for Gauss-Legendre integration + private :: perms ! Returns N!/(N-k)! if N>=0 and N>k + private :: rfactorial ! Calculates N! as a double precision real +!!*** + +CONTAINS + +!=========================================================== +!!*** + +!!****f* m_paw_sphharm/ylmc +!! NAME +!! ylmc +!! +!! FUNCTION +!! Return a complex spherical harmonic with l <= 3 +!! +!! INPUTS +!! il=angular quantum number +!! im=magnetic quantum number +!! kcart=vector in cartesian coordinates defining the value of \theta and \psi +!! where calculate the spherical harmonic +!! +!! OUTPUT +!! ylm= spherical harmonic +!! +!! NOTES +!! Note the use of double precision complex. +!! Case l>3 not implemented. +!! +!! SOURCE + +function ylmc(il,im,kcart) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: il,im + complex(dpc) :: ylmc +!arrays + real(dp),intent(in) :: kcart(3) + +!Local variables------------------------------- +!scalars + integer,parameter :: LMAX=3 + real(dp),parameter :: PPAD=tol8 + real(dp) :: cosphi,costh,costhreephi,costwophi,r,rxy,sinphi,sinth,sinthreephi,sintwophi + !complex(dpc) :: new_ylmc + character(len=500) :: msg + complex(dpc) :: ctmp + +! ************************************************************************* + + if (ABS(im)>ABS(il)) then + write(msg,'(3(a,i0))') 'm is,',im,' however it should be between ',-il,' and ',il + LIBPAW_ERROR(msg) + end if + + ylmc = czero + + r=SQRT(kcart(1)**2+kcart(2)**2+kcart(3)**2) + if (rtol10) then + cosphi=kcart(1)/(r*sinth) + sinphi=kcart(2)/(r*sinth) + end if +#endif + + costwophi= two*cosphi**2 - one + sintwophi= two*sinphi*cosphi + costhreephi=cosphi*costwophi-sinphi*sintwophi + sinthreephi=cosphi*sintwophi+sinphi*costwophi + + select case (il) + + case (0) + ylmc= one/SQRT(four_pi) + + case (1) + if (ABS(im)==0) then + ylmc = SQRT(three/(four_pi))*costh + else if (ABS(im)==1) then + ylmc = -SQRT(three/(8._dp*pi))*sinth*CMPLX(cosphi,sinphi) + else + msg='wrong im' + LIBPAW_ERROR(msg) + end if + + case (2) + if (ABS(im)==0) then + ylmc = SQRT(5.d0/(16.d0*pi))*(three*costh**2-one) + else if (ABS(im)==1) then + ylmc = -SQRT(15.d0/(8.d0*pi))*sinth*costh*cmplx(cosphi,sinphi) + else if (ABS(im)==2) then + ylmc = SQRT(15.d0/(32.d0*pi))*(sinth)**2*CMPLX(costwophi,sintwophi) + else + msg='wrong im' + LIBPAW_ERROR(msg) + end if + + case (3) + if (ABS(im)==0) then + ylmc= SQRT(7.d0/(16.d0*pi))*(5.d0*costh**3 -3.d0*costh) + else if (ABS(im)==1) then + ylmc= -SQRT(21.d0/(64.d0*pi))*sinth*(5.d0*costh**2-one)*CMPLX(cosphi,sinphi) + else if (ABS(im)==2) then + ylmc= SQRT(105.d0/(32.d0*pi))*sinth**2*costh*CMPLX(costwophi,sintwophi) + else if (ABS(im)==3) then + ylmc=-SQRT(35.d0/(64.d0*pi))*sinth**3*CMPLX(costhreephi,sinthreephi) + else + msg='wrong im' + LIBPAW_ERROR(msg) + end if + + case default + !write(msg,'(a,i6,a,i6)')' The maximum allowed value for l is,',LMAX,' however l=',il + !LIBPAW_ERROR(msg) + end select +! +!=== Treat the case im < 0 === + if (im < 0) then + ctmp = (-one)**(im)*CONJG(ylmc) + ylmc = ctmp + end if + + ! FIXME: Use the piece of code below as it works for arbitrary (l,m) + ! the implementation above is buggy when the vector is along z! + ! +#if 0 +! Remember the expression of complex spherical harmonics: +! $Y_{lm}(\theta,\phi)=sqrt{{(2l+1) over (4\pi)} {fact(l-m)/fact(l+m)} } P_l^m(cos(\theta)) e^{i m\phi}$ + new_ylmc = SQRT((2*il+1)*rfactorial(il-ABS(im))/(rfactorial(il+ABS(im))*four_pi)) * & +& ass_leg_pol(il,ABS(im),costh) * CMPLX(cosphi,sinphi)**ABS(im) + if (im<0) new_ylmc=(-one)**(im)*CONJG(new_ylmc) + + if (ABS(new_ylmc-ylmc)>tol6) then + !LIBPAW_WARNING("Check new_ylmc") + !write(std_out,*)"il,im,new_ylmc, ylmc",il,im,new_ylmc,ylmc + !write(std_out,*)"fact",SQRT((2*il+1)*rfactorial(il-ABS(im))/(rfactorial(il+ABS(im))*four_pi)) + !write(std_out,*)"costh,sinth,ass_leg_pol",costh,sinth,ass_leg_pol(il,ABS(im),costh) + !write(std_out,*)"cosphi,sinphi,e^{imphi}",cosphi,sinphi,CMPLX(cosphi,sinphi)**ABS(im) + end if + ylmc = new_ylmc +#endif + +end function ylmc +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_sphharm/ylmcd +!! NAME +!! ylmcd +!! +!! FUNCTION +!! Computes dth and dphi, the first derivatives of complex Ylm as a function of +!! th and phi (the angles of the spherical coordinates) +!! It works for all spherical harmonics with l <= 3 +!! +!! INPUTS +!! il=angular quantum number +!! im=magnetic quantum number +!! kcart=cartesian coordinates of the vector where the first derivatives of Ylm are evaluated +!! +!! OUTPUT +!! dth =derivative of Y_lm with respect to \theta +!! dphi=derivative of Y_lm with respect to \phi +!! +!! NOTES +!! Note the use of double precision complex. +!! Case l>3 not implemented. +!! +!! SOURCE + +subroutine ylmcd(il,im,kcart,dth,dphi) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: il,im + complex(dpc),intent(out) :: dphi,dth +!arrays + real(dp),intent(in) :: kcart(3) + +!Local variables------------------------------- +!scalars + integer,parameter :: LMAX=3 + real(dp),parameter :: PPAD=tol8 + real(dp) :: cosphi,costh,costhreephi,costwophi,r,rxy,sinphi,sinth,sinthreephi,sintwophi,c + character(len=500) :: msg + complex(dpc) :: ctmp + +! ************************************************************************* + + if (ABS(im)>ABS(il))then + write(msg,'(3(a,i0))')' m is,',im,' however it should be between ',-il,' and ',il + LIBPAW_ERROR(msg) + end if + + dphi=czero; dth=czero + + r=SQRT(kcart(1)**2+kcart(2)**2+kcart(3)**2) + if (rtol10) then + cosphi=kcart(1)/(r*sinth) + sinphi=kcart(2)/(r*sinth) + end if +#endif + + costwophi= two*cosphi**2 - one + sintwophi= two*sinphi*cosphi + costhreephi=cosphi*costwophi-sinphi*sintwophi + sinthreephi=cosphi*sintwophi+sinphi*costwophi + + select case (il) + + case (0) + dth = czero + dphi = czero + + case (1) + if (ABS(im)==0) then + dth= -SQRT(three/(four_pi))*sinth + dphi= czero + else if (abs(im)==1) then + dth= -SQRT(3.d0/(8.d0*pi))*costh*CMPLX(cosphi,sinphi) + dphi=-SQRT(3.d0/(8.d0*pi))*sinth*CMPLX(-sinphi,cosphi) + end if + + case (2) + if (ABS(im)==0) then + dth= -SQRT(5.d0/(16.d0*pi))*6.d0*costh*sinth + dphi= czero + else if (ABS(im)==1) then + dth= -SQRT(15.d0/(8.d0*pi))*(costh**2-sinth**2)*CMPLX(cosphi,sinphi) + dphi= -SQRT(15.d0/(8.d0*pi))*costh*sinth*(0.d0,1.d0)*CMPLX(cosphi,sinphi) + else if (abs(im)==2) then + dth = SQRT(15.d0/(32.d0*pi))*2.d0*costh*sinth*CMPLX(costwophi,sintwophi) + dphi = SQRT(15.d0/(32.d0*pi))*sinth**2*(0.d0,2.d0)*CMPLX(costwophi,sintwophi) + end if + + case (3) + if (ABS(im)==0) then + dth = SQRT(7.d0/(16*pi))*(-15.d0*costh**2*sinth + 3.d0**sinth) + dphi= czero + else if (ABS(im)==1) then + c = SQRT(21.d0/(64.d0*pi)) + dth= -c* (15.d0*costh**3-11.d0*costh)* CMPLX(cosphi,sinphi) + dphi=-c*sinth*( 5.d0*costh**2-1 )*(0.d0,1.d0)*CMPLX(cosphi,sinphi) + else if (ABS(im)==2) then + c = SQRT(105.d0/(32.d0*pi)) + dth =c*(2.d0*sinth*costh**2-sinth**3) *CMPLX(costwophi,sintwophi) + dphi=c*(2.d0*sinth**2*costh)*(0.d0,1.d0)*CMPLX(costwophi,sintwophi) + else if (abs(im)==3) then + dth =-SQRT(35.d0/(64.d0*pi))*3.d0*sinth**2*costh*CMPLX(costhreephi,sinthreephi) + dphi=-SQRT(35.d0/(64.d0*pi))*sinth**3*(0.d0,3.d0)*CMPLX(costhreephi,sinthreephi) + end if + + case default + write(msg,'(2(a,i0))')' The maximum allowed value for l is,',LMAX,' however, l=',il + LIBPAW_ERROR(msg) + end select +! +!=== Treat the case im < 0 === + if (im<0) then + ctmp = (-one)**(im)*CONJG(dth) + dth = ctmp + ctmp= (-one)**(im)*CONJG(dphi) + dphi= ctmp + end if + +end subroutine ylmcd +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_sphharm/ylm_cmplx +!! NAME +!! ylm_cmplx +!! +!! FUNCTION +!! Calculate all (complex) spherical harmonics for lx<=4 +!! +!! INPUTS +!! lx= quantum numbers. +!! xx= cartesian coordinate in the x direction +!! yy= cartesian coordinate in the y direction +!! zz= cartesian coordinate in the z direction +!! +!! cartesian coordinates +!! OUTPUT +!! ylm((lx+1)*(lx+1)) complex spherical harmonics for all l<=lx and all +!! possible values of m. +!! +!! NOTES +!! We are supressing the so-called Condon-Shortley phase +!! +!! SOURCE + +subroutine ylm_cmplx(lx,ylm,xx,yy,zz) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: lx + real(dp),intent(in) :: xx,yy,zz +!arrays + complex(dpc),intent(out) :: ylm((lx+1)*(lx+1)) + +!Local variables------------------------------- +!scalars + integer :: ii,l1,m1,nc,nn + real(dp) :: dc,dl,dm,ds,rr,rrs,rs,sq2,w,x,xs,ya,yi,yr +!arrays + real(dp) :: cosa(lx+1),fact(2*(lx+1)),plm(lx+2,lx+2),qlm(lx+2,lx+2),sgn(lx+1) + real(dp) :: sina(lx+1) + +! ************************************************************************* + +!normalization coefficients + sq2=sqrt(2.0d0) + fact(1)=1.0d0 + do ii=2,2*lx+1 + fact(ii)=(ii-1)*fact(ii-1) + end do + do l1=1,lx+1 + sgn(l1)=(-1.d0)**(l1-1) + do m1=1,l1 + qlm(l1,m1)=sqrt((2*l1-1)*fact(l1-m1+1)/& +& (four_pi*fact(l1+m1-1))) + end do + end do + +!legendre polynomials + rs=xx**2 + yy**2 + zz**2 + if(rs > tol8) then + xs=zz**2/rs + x=zz/sqrt(rs) + w=sqrt(abs(1.0d0 - xs)) + else + x=0.0d0 + + w=1.0d0 + end if + plm(1,1)=1.0d0 + plm(2,1)=x + plm(2,2)=w + plm(3,2)=3.0d0*x*w + do m1=1,lx + dm=m1-1 + if(m1 > 1) then + plm(m1+1,m1)=x*plm(m1,m1) + 2*dm*w*plm(m1,m1-1) + end if + if(m1 < lx) then + do l1=m1+2,lx+1 + dl=l1-1 + plm(l1,m1)=((2*dl-1)*x*plm(l1-1,m1)& +& - (dl+dm-1)*plm(l1-2,m1))/(dl-dm) + end do + end if + plm(m1+1,m1+1)=(2*dm+1)*w*plm(m1,m1) + end do + +!azimuthal angle phase factors + rrs=xx**2 + yy**2 + if(rrs > tol8) then + rr=sqrt(rrs) + dc=xx/rr + ds=yy/rr + else + dc=1.0d0 + ds=0.0d0 + end if + cosa(1)=1.0d0 + sina(1)=0.0d0 + do m1=2,lx+1 + cosa(m1)=dc*cosa(m1-1) - ds*sina(m1-1) + sina(m1)=ds*cosa(m1-1) + dc*sina(m1-1) + end do + +!combine factors + do l1=1,lx+1 + do m1=2,l1 + nn=(l1-1)**2 + (l1-1) + (m1-1) + 1 + nc=(l1-1)**2 + (l1-1) - (m1-1) + 1 +! note that we are supressing the so-called Condon-Shortley phase +! ya=sgn(m1)*qlm(l1,m1)*plm(l1,m1) + ya=qlm(l1,m1)*plm(l1,m1) + yr=ya*cosa(m1) + yi=ya*sina(m1) + ylm(nc)=sgn(m1)*cmplx(yr,-yi) + ylm(nn)=cmplx(yr,yi) + end do + end do + do l1=1,lx+1 + nn=(l1-1)**2 + (l1-1) + 1 + ya=qlm(l1,1)*plm(l1,1) + ylm(nn)=cmplx(ya,0.d0) + end do + +end subroutine ylm_cmplx +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_sphharm/initylmr +!! NAME +!! initylmr +!! +!! FUNCTION +!! Calculate the real spherical harmonics Ylm (and gradients) +!! over a set of (r) vectors given in Cartesian coordinates. +!! +!! INPUTS +!! mpsang= 1+maximum angular momentum for nonlocal pseudopotential +!! normchoice=0 the input rr vectors are normalized +!! =1 the norm of the input vector is in nrm() array +!! nrm(npts) = Depending of normchoice, this array contains +!! either the weight of the point or the norm of rr. +!! npts = number of rr vectors +!! option= 1=compute Ylm(R), 2=compute Ylm(R) and dYlm/dRi (cartesian derivatives), +!! 3=compute Ylm(R), dYlm/dRi and d2Ylm/dRidRj (cartesian derivatives) +!! rr(3,npts)= vectors for which ylmr have to be calculated +!! For each point of the spherical mesh, gives the +!! Cartesian coordinates of the corresponding point. +!! +!! OUTPUT +!! if (option=1, 2 or 3) +!! ylm(mpsang*mpsang,npts) = real spherical harmonics for each r point +!! if (option=2 or 3) +!! ylmr_gr(1:3,mpsang*mpsang,npts)= gradients of real spherical harmonics +!! if (option=3) +!! ylmr_gr(4:9,mpsang*mpsang,npts)= first and second gradients of real spherical harmonics +!! +!! NOTES +!! Remember the expression of complex spherical harmonics: +!! $Y_{lm}(%theta ,%phi)=sqrt{{(2l+1) over (4 %pi)} {fact(l-m) over fact(l+m)} } P_l^m(cos(%theta)) func e^{i m %phi}$ +!! Remember the expression of real spherical harmonics as linear combination of imaginary spherical harmonics: +!! $Yr_{lm}(%theta ,%phi)=(Re{Y_{l-m}}+(-1)^m Re{Y_{lm}})/sqrt{2} +!! $Yr_{l-m}(%theta ,%phi)=(Im{Y_{l-m}}-(-1)^m Im{Y_{lm}})/sqrt{2} +!! +!! SOURCE + +subroutine initylmr(mpsang,normchoice,npts,nrm,option,rr,ylmr,ylmr_gr) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: mpsang,normchoice,npts,option +!arrays + real(dp),intent(in) :: nrm(npts),rr(3,npts) + real(dp),intent(out) :: ylmr(mpsang*mpsang,npts) + real(dp),optional,intent(out) :: ylmr_gr(3*(option/2)+6*(option/3),mpsang*mpsang,npts) + +!Local variables ------------------------------ +!scalars + integer :: dimgr,ilang,inpt,l0,ll,mm + real(dp) :: cphi,ctheta,fact,onem,rnorm,sphi,stheta,work1,work2,ylmcst,ylmcst2 + logical :: compute_ylm,compute_ylm2gr,compute_ylmgr +!arrays + real(dp) :: dphi(3),dtheta(3),iphase(mpsang-1),rphase(mpsang-1) + real(dp),allocatable :: blm(:,:) + +!************************************************************************ + +!What has to be computed ? + compute_ylm = (option==1.or.option==2.or.option==3) + compute_ylmgr =(( option==2.or.option==3).and.present(ylmr_gr)) + compute_ylm2gr=(( option==3).and.present(ylmr_gr)) + dimgr=3*(option/2)+6*(option/3) + +!Initialisation of spherical harmonics + if (compute_ylm ) ylmr (: ,1:npts)=zero + if (compute_ylmgr) ylmr_gr(:,:,1:npts)=zero + +!Special case for l=0 + if (compute_ylm ) ylmr(1,1:npts)=1._dp/sqrt(four_pi) + if (compute_ylmgr) ylmr_gr(1:dimgr,1,1:npts)=zero + if (mpsang>1) then + +! Loop over all rr + do inpt=1,npts + +! Load module of rr + rnorm=one + if (normchoice==1) rnorm=nrm(inpt) + +! Continue only for r<>0 + + if (rnorm>tol10) then + +! Determine theta and phi + cphi=one + sphi=zero + ctheta=rr(3,inpt)/rnorm +! MM030519 : abs is needed to prevent very small negative arg + stheta=sqrt(abs((one-ctheta)*(one+ctheta))) + if (stheta>tol10) then + cphi=rr(1,inpt)/(rnorm*stheta) + sphi=rr(2,inpt)/(rnorm*stheta) + end if + do mm=1,mpsang-1 + rphase(mm)=dreal(dcmplx(cphi,sphi)**mm) + iphase(mm)=aimag(dcmplx(cphi,sphi)**mm) + end do + +! Determine gradients of theta and phi + if (compute_ylmgr) then + dtheta(1)=ctheta*cphi + dtheta(2)=ctheta*sphi + dtheta(3)=-stheta + dphi(1)=-sphi + dphi(2)=cphi + dphi(3)=zero + end if + +! COMPUTE Ylm(R) + if (compute_ylm) then +! Loop over angular momentum l + do ilang=2,mpsang + ll=ilang-1 + l0=ll**2+ll+1 + fact=1._dp/real(ll*(ll+1),dp) + ylmcst=sqrt(real(2*ll+1,dp)/four_pi) +! Special case m=0 + ylmr(l0,inpt)=ylmcst*ass_leg_pol(ll,0,ctheta) +! Compute for m>0 + onem=one + do mm=1,ll + onem=-onem + work1=ylmcst*sqrt(fact)*onem*ass_leg_pol(ll,mm,ctheta)*sqrt(2._dp) + ylmr(l0+mm,inpt)=work1*rphase(mm) + ylmr(l0-mm,inpt)=work1*iphase(mm) + if (mm/=ll) fact=fact/real((ll+mm+1)*(ll-mm),dp) + end do ! End loop over m + end do ! End loop over l + end if + +! COMPUTE dYlm/dRi + if (compute_ylmgr) then +! Loop over angular momentum l + do ilang=2,mpsang + ll=ilang-1 + l0=ll**2+ll+1 + fact=1._dp/real(ll*(ll+1),dp) + ylmcst=sqrt(real(2*ll+1,dp)/four_pi)/rnorm +! Special case m=0 + work1=ylmcst*plm_dtheta(ll,0,ctheta) + ylmr_gr(1:3,l0,inpt)=work1*dtheta(1:3) +! Compute for m>0 + onem=one + do mm=1,ll + onem=-onem + work1=ylmcst*sqrt(fact)*onem*plm_dtheta(ll,mm,ctheta)*sqrt(2._dp) + work2=ylmcst*sqrt(fact)*onem*plm_dphi (ll,mm,ctheta)*sqrt(2._dp) + ylmr_gr(1:3,l0+mm,inpt)=rphase(mm)*work1*dtheta(1:3)-iphase(mm)*work2*dphi(1:3) + ylmr_gr(1:3,l0-mm,inpt)=iphase(mm)*work1*dtheta(1:3)+rphase(mm)*work2*dphi(1:3) + if (mm/=ll) fact=fact/real((ll+mm+1)*(ll-mm),dp) + end do ! End loop over m + end do ! End loop over l + end if + +! COMPUTE d2Ylm/dRidRj + if (compute_ylm2gr) then + LIBPAW_ALLOCATE(blm,(5,mpsang*mpsang)) + call plm_coeff(blm,mpsang,ctheta) + +! Loop over angular momentum l + do ilang=2,mpsang + ll=ilang-1 + l0=ll**2+ll+1 + fact=1._dp/real(ll*(ll+1),dp) + ylmcst=sqrt(real(2*ll+1,dp)/four_pi)/(rnorm**2) +! Special case m=0 + ylmr_gr(4,l0,inpt)=ylmcst*(-blm(3,l0)*sphi*sphi+blm(4,l0)*cphi*cphi) + ylmr_gr(5,l0,inpt)=ylmcst*(-blm(3,l0)*cphi*cphi+blm(4,l0)*sphi*sphi) + ylmr_gr(6,l0,inpt)=ylmcst*blm(1,l0) + ylmr_gr(7,l0,inpt)=ylmcst*blm(2,l0)*sphi + ylmr_gr(8,l0,inpt)=ylmcst*blm(2,l0)*cphi + ylmr_gr(9,l0,inpt)=ylmcst*(blm(3,l0)+blm(4,l0))*sphi*cphi +! Compute for m>0 + onem=one + do mm=1,ll + onem=-onem;ylmcst2=ylmcst*sqrt(fact)*sqrt(two) + ylmr_gr(4,l0+mm,inpt)=ylmcst2*((-blm(3,l0+mm)*sphi*sphi+blm(4,l0+mm)*cphi*cphi)*rphase(mm)-& +& blm(5,l0+mm)*2.d0*cphi*sphi*mm*iphase(mm)) + ylmr_gr(4,l0-mm,inpt)=ylmcst2*((-blm(3,l0+mm)*sphi*sphi+blm(4,l0+mm)*cphi*cphi)*iphase(mm)+& +& blm(5,l0+mm)*2.d0*cphi*sphi*mm*rphase(mm)) + ylmr_gr(5,l0+mm,inpt)=ylmcst2*((-blm(3,l0+mm)*cphi*cphi+blm(4,l0+mm)*sphi*sphi)*rphase(mm)+& +& blm(5,l0+mm)*2.d0*cphi*sphi*mm*iphase(mm)) + ylmr_gr(5,l0-mm,inpt)=ylmcst2*((-blm(3,l0+mm)*cphi*cphi+blm(4,l0+mm)*sphi*sphi)*iphase(mm)-& +& blm(5,l0+mm)*2.d0*cphi*sphi*mm*rphase(mm)) + ylmr_gr(6,l0+mm,inpt)=ylmcst2*blm(1,l0+mm)*rphase(mm) + ylmr_gr(6,l0-mm,inpt)=ylmcst2*blm(1,l0+mm)*iphase(mm) + ylmr_gr(7,l0+mm,inpt)=ylmcst2*(blm(2,l0+mm)*sphi*rphase(mm)+& +& mm*iphase(mm)*cphi*onem*plm_dtheta(ll,mm,ctheta)) + ylmr_gr(7,l0-mm,inpt)=ylmcst2*(blm(2,l0+mm)*sphi*iphase(mm)-& +& mm*rphase(mm)*cphi*onem*plm_dtheta(ll,mm,ctheta)) + ylmr_gr(8,l0+mm,inpt)=ylmcst2*(blm(2,l0+mm)*cphi*rphase(mm)-& +& mm*iphase(mm)*sphi*onem*plm_dtheta(ll,mm,ctheta)) + ylmr_gr(8,l0-mm,inpt)=ylmcst2*(blm(2,l0+mm)*cphi*iphase(mm)+& +& mm*rphase(mm)*sphi*onem*plm_dtheta(ll,mm,ctheta)) + ylmr_gr(9,l0+mm,inpt)=ylmcst2*((blm(3,l0+mm)+blm(4,l0+mm))*sphi*cphi*rphase(mm)-& +& blm(5,l0+mm)*(sphi*sphi-cphi*cphi)*mm*iphase(mm)) + ylmr_gr(9,l0-mm,inpt)=ylmcst2*((blm(3,l0+mm)+blm(4,l0+mm))*sphi*cphi*iphase(mm)+& +& blm(5,l0+mm)*(sphi*sphi-cphi*cphi)*mm*rphase(mm)) + if (mm/=ll) fact=fact/real((ll+mm+1)*(ll-mm),dp) + end do ! End loop over m + end do ! End loop over l + LIBPAW_DEALLOCATE(blm) + end if + +! End condition r<>0 + end if + +! End loop over rr + end do + +! End condition l<>0 + end if + +end subroutine initylmr +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_sphharm/ys +!! NAME +!! ys +!! +!! FUNCTION +!! Computes the matrix element +!! +!! INPUTS +!! integer :: l2,m2,l1,m1 +!! +!! OUTPUT +!! complex(dpc) :: ys_val +!! +!! NOTES +!! Ylm is the standard complex-valued spherical harmonic, Slm is the real spherical harmonic +!! used througout abinit. +!! +!! SOURCE + +subroutine ys(l2,m2,l1,m1,ys_val) + +!Arguments --------------------------------------------- +!scalars + integer,intent(in) :: l1,l2,m1,m2 + complex(dpc),intent(out) :: ys_val + +!Local variables --------------------------------------- + !scalars + integer :: mp1 + +! ********************************************************************* + +! See Blanco et al., J. Mol Struct. 419, 19-27 (1997) Eq. 19 +! is given by C^l_{m1,m2} where +! l1 == l2 and |m1| == |m2|, 0 otherwise + + ys_val = czero + + if ( l2 /= l1 ) return + if ( abs(m2) /= abs(m1) ) return + + mp1=(-1)**abs(m1) + + if(m1.EQ.0) then + ys_val=cone + else if((m1.GT.0).AND.(m2.GT.0)) then + ys_val=mp1*sqrthalf + else if((m1.GT.0).AND.(m2.LT.0)) then + ys_val=sqrthalf + else if((m1.LT.0).AND.(m2.GT.0)) then + ys_val=-j_dpc*mp1*sqrthalf + else if((m1.LT.0).AND.(m2.LT.0)) then + ys_val=j_dpc*sqrthalf + else + ys_val=czero + end if + +end subroutine ys +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_sphharm/lxyz.F90 +!! NAME +!! lxyz +!! +!! FUNCTION +!! Computes the matrix element +!! +!! INPUTS +!! integer :: lp,mp,idir,ll,mm +!! +!! OUTPUT +!! complex(dpc) :: lidir +!! +!! NOTES +!! Ylm is the standard complex-valued spherical harmonic, +!! idir is the direction in space of L +!! +!! SOURCE + +subroutine lxyz(lp,mp,idir,ll,mm,lidir) + +!Arguments --------------------------------------------- +!scalars + integer,intent(in) :: idir,ll,lp,mm,mp + complex(dpc),intent(out) :: lidir + +!Local variables --------------------------------------- +!scalars + complex(dpc) :: jme, jmme, jpme + +! ********************************************************************* + + lidir = czero + if ( lp /= ll ) return + + jpme=czero; jmme=czero; jme=czero + if (mp==mm) then + jme=cone*mm + else if (mp==mm+1) then + jpme=-cone*sqrt(half*((ll*(ll+1))-mm*(mm+1))) + else if (mp==mm-1) then + jmme= cone*sqrt(half*((ll*(ll+1))-mm*(mm-1))) + end if + + select case (idir) + case (1) ! Lx + lidir = -sqrthalf*(jpme - jmme) + case (2) ! Ly + lidir = j_dpc*sqrthalf*(jpme + jmme) + case (3) ! Lz + lidir = jme + end select + +end subroutine lxyz +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_sphharm/slxyzs +!! NAME +!! slxyzs +!! +!! FUNCTION +!! computes the matrix element +!! +!! INPUTS +!! integer :: lp,mp,idir,ll,mm +!! +!! OUTPUT +!! complex(dpc) :: sls_val +!! +!! NOTES +!! Slm is the real spherical harmonic used througout abinit, +!! L_idir is a component of the angular momentum operator. +!! The subroutine computes +!! +!! SOURCE + +subroutine slxyzs(lp,mp,idir,ll,mm,sls_val) + +!Arguments --------------------------------------------- +!scalars + integer,intent(in) :: idir,ll,lp,mm,mp + complex(dpc),intent(out) :: sls_val + +!Local variables --------------------------------------- +!scalars + integer :: mpp,mppp + complex(dpc) :: lidir,sy_val,ys_val + +! ********************************************************************* + + sls_val = czero + + if ( lp /= ll ) return + + do mpp = -ll, ll + call ys(ll,mpp,ll,mp,sy_val) + do mppp = -ll, ll + call lxyz(ll,mpp,idir,ll,mppp,lidir) + call ys(ll,mppp,ll,mm,ys_val) + sls_val = sls_val + conjg(sy_val)*lidir*ys_val + end do + end do + +end subroutine slxyzs +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_sphharm/lsylm +!! NAME +!! lsylm +!! +!! FUNCTION +!! Compute the LS operator in the real spherical harmonics basis +!! ls_ylm(ilm1,ilm2,ispin)= +!! ilm,1m2=(l,m1,m2) with -l<=m1<=l, -l<=m2<=l and 0 +!! ls_ylm(:,:,2)= +!! One can deduce: +!! =- +!! =-Conjg[] +!! Also, only ilm1<=ilm2 terms are stored, because: +!! =- +!! +!! SOURCE + +subroutine lsylm(ls_ylm,lmax) + +!Arguments --------------------------------------------- +!scalars + integer,intent(in) :: lmax +!arrays + real(dp),allocatable :: ls_ylm(:,:,:) + +!Local variables --------------------------------------- +!scalars + integer :: ii,ilm,im,j0lm,jj,jlm,jm,klm,ll,lm0,mm,ispden + real(dp),parameter :: invsqrt2=one/sqrt2 + real(dp) :: onem + character(len=500) :: msg + logical,parameter :: tso=.false. ! use true to Test Spin Orbit and +! write the matrix of L.S in different basis +!arrays + complex(dpc) :: tmp(2) + complex(dpc),allocatable :: ls_cplx(:,:,:),slm2ylm(:,:) + complex(dpc),allocatable :: mat_inp_c(:,:,:),mat_out_c(:,:,:) + complex(dpc),allocatable :: mat_ls_ylm(:,:,:),mat_jmj(:,:) + character(len=9),parameter :: dspin2(2)=(/"up-up ","up-dn "/) + character(len=9),parameter :: dspin6(6)=(/"dn ","up ","dn-dn ","up-up ","dn-up ","up-dn "/) + character(len=9),parameter :: dspinm(6)=(/"dn ","up ","n ","mx ","my ","mz "/) + +! ************************************************************************* + + if (.not.allocated(ls_ylm)) then + msg='ls_ylm is not allocated!' + LIBPAW_BUG(msg) + end if + if ( size(ls_ylm) < 2*(lmax+1)**2 * ((lmax+1)**2+1) ) then + msg='wrong size for ls_ylm!' + LIBPAW_BUG(msg) + end if + +!Initialization + ls_ylm=zero + +!Nothing to do if lmax=0 + if (lmax<=0) return + +!Loop on l quantum number + do ll=1,lmax + +! Transformation matrixes: real->complex spherical harmonics + LIBPAW_ALLOCATE(slm2ylm,(2*ll+1,2*ll+1)) + slm2ylm=czero + do im=1,2*ll+1 + mm=im-ll-1;jm=-mm+ll+1 + onem=dble((-1)**mm) + if (mm> 0) then + slm2ylm(im,im)= cmplx(onem*invsqrt2,zero,kind=dp) + slm2ylm(jm,im)= cmplx(invsqrt2, zero,kind=dp) + end if + if (mm==0) then + slm2ylm(im,im)=cone + end if + if (mm< 0) then + slm2ylm(im,im)= cmplx(zero, invsqrt2,kind=dp) + slm2ylm(jm,im)=-cmplx(zero,onem*invsqrt2,kind=dp) + end if + end do + +! Compute (Y_lm=complex spherical harmonics) +! 1= ; 2= + LIBPAW_ALLOCATE(ls_cplx,(2*ll+1,2*ll+1,2)) + ls_cplx=czero + if(tso) then + LIBPAW_ALLOCATE(mat_ls_ylm,(2*ll+1,2*ll+1,4)) + if(tso) mat_ls_ylm=czero + end if + if(tso) then + LIBPAW_ALLOCATE(mat_jmj,(2*(2*ll+1),2*(2*ll+1))) + if(tso) mat_jmj=czero + end if + do im=1,2*ll+1 + mm=im-ll-1 + ls_cplx(im,im,1)=half*mm + if(tso) mat_ls_ylm(im,im,1)=-half*mm ! dn dn + if(tso) mat_ls_ylm(im,im,2)=half*mm ! up up + if ((mm+1)<= ll) then + ls_cplx(im,im+1,2)=half*sqrt(real((ll-mm)*(ll+mm+1),kind=dp)) + if(tso) mat_ls_ylm(im,im+1,4)=half*sqrt(real((ll-mm)*(ll+mm+1),kind=dp)) ! up dn + if(tso) mat_ls_ylm(im+1,im,3)=half*sqrt(real((ll-mm)*(ll+mm+1),kind=dp)) ! dn up + end if + if ((mm-1)>=-ll) then + ls_cplx(im-1,im,2)=half*sqrt(real((ll+mm)*(ll-mm+1),kind=dp)) + if(tso) mat_ls_ylm(im-1,im,4)=half*sqrt(real((ll+mm)*(ll-mm+1),kind=dp)) ! up dn + if(tso) mat_ls_ylm(im,im-1,3)=half*sqrt(real((ll+mm)*(ll-mm+1),kind=dp)) ! dn up + end if + end do + +! test : print LS in J,M_J basis + if(tso) then + do ispden=1,4 + write(msg,'(3a)') ch10,"value of LS in the Ylm basis for " ,trim(dspin6(ispden+2*(4/4))) + call wrtout(std_out,msg,'COLL') + do im=1,ll*2+1 + write(msg,'(12(1x,9(1x,"(",f7.3,",",f7.3,")")))') (mat_ls_ylm(im,jm,ispden),jm=1,ll*2+1) + call wrtout(std_out,msg,'COLL') + end do + end do + call mat_mlms2jmj(ll,mat_ls_ylm,mat_jmj,4,1,2,3,std_out,'COLL') ! optspin=2 : dn spin are first + end if + +! Compute (S_lm=real spherical harmonics) +! 1= ; 2= + if(tso) then + LIBPAW_ALLOCATE(mat_inp_c,(2*ll+1,2*ll+1,4)) + LIBPAW_ALLOCATE(mat_out_c,(2*ll+1,2*ll+1,4)) + end if + lm0=ll**2 + do jm=1,2*ll+1 + jlm=lm0+jm;j0lm=jlm*(jlm-1)/2 + do im=1,jm + ilm=lm0+im;klm=j0lm+ilm + tmp(:)=czero + do ii=1,2*ll+1 + do jj=1,2*ll+1 + tmp(:)=tmp(:)+ls_cplx(ii,jj,:)*CONJG(slm2ylm(ii,im))*slm2ylm(jj,jm) + end do + end do + ls_ylm(1,klm,:)=REAL(tmp(:),kind=dp) + ls_ylm(2,klm,:)=AIMAG(tmp(:)) + end do + end do + +! Test: print LS in Slm basis + if(tso) then + call mat_slm2ylm(ll,mat_ls_ylm,mat_inp_c,4,2,2,3,std_out,'COLL') ! from Ylm to Slm, and dn spin are first + do ispden=1,4 + write(msg,'(3a)') ch10,"value of LS in the Slm basis for " ,trim(dspin6(ispden+2*(4/4))) + call wrtout(std_out,msg,'COLL') + do im=1,ll*2+1 + write(msg,'(12(1x,9(1x,"(",f7.3,",",f7.3,")")))') (mat_inp_c(im,jm,ispden),jm=1,ll*2+1) + call wrtout(std_out,msg,'COLL') + end do + end do +! change into n,m basis + mat_ls_ylm(:,:,1)=(mat_inp_c(:,:,1)+mat_inp_c(:,:,2)) + mat_ls_ylm(:,:,2)=(mat_inp_c(:,:,3)+mat_inp_c(:,:,4)) + mat_ls_ylm(:,:,3)=-cmplx(0.d0,1.d0)*(mat_inp_c(:,:,4)-mat_inp_c(:,:,3)) + mat_ls_ylm(:,:,4)=(mat_inp_c(:,:,1)-mat_inp_c(:,:,2)) + do ispden=1,4 + write(msg,'(3a)') ch10,"value of LS in the Slm basis for " ,trim(dspinm(ispden+2*(4/4))) + call wrtout(std_out,msg,'COLL') + do im=1,ll*2+1 + write(msg,'(12(1x,9(1x,"(",f7.3,",",f7.3,")")))') (mat_ls_ylm(im,jm,ispden),jm=1,ll*2+1) + call wrtout(std_out,msg,'COLL') + end do + end do + LIBPAW_DEALLOCATE(mat_inp_c) + LIBPAW_DEALLOCATE(mat_ls_ylm) + LIBPAW_DEALLOCATE(mat_jmj) + LIBPAW_DEALLOCATE(mat_out_c) + end if ! tso + + LIBPAW_DEALLOCATE(ls_cplx) + LIBPAW_DEALLOCATE(slm2ylm) + +! End loop on l + end do + + end subroutine lsylm +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_sphharm/plm_coeff +!! NAME +!! plm_coeff +!! +!! FUNCTION +!! Compute coefficients depending on Plm and its derivatives where P_lm is a legendre polynomial. +!! They are used to compute the second derivatives of spherical harmonics +!! +!! INPUTS +!! mpsang=1+ maximum l quantum number +!! xx= input value +!! +!! OUTPUT +!! blm(5,mpsang*mpsang)=coefficients depending on Plm and its derivatives where P_lm is a legendre polynome +!! +!! SOURCE + +subroutine plm_coeff(blm,mpsang,xx) + +!Arguments --------------------------------------------- +!scalars + integer,intent(in) :: mpsang + real(dp),intent(in) :: xx +!arrays + real(dp),intent(out) :: blm(5,mpsang*mpsang) + +!Local variables --------------------------------------- +!scalars + integer :: il,ilm,ilm0,ilm1,im + real(dp) :: dplm_dt,d2plm_dt2,llp1,onemx2,plm,sqrx,xsqrx,xx2,yy + logical :: is_one + character(len=500) :: msg +!arrays + real(dp) :: pl_d2(mpsang),plm_d2t(mpsang*mpsang) + +!************************************************************************ + + if (abs(xx).gt.1.d0) then + msg = ' plm_coeff : xx > 1 !' + LIBPAW_ERROR(msg) + end if + + blm=zero + is_one=(abs(abs(xx)-one)<=tol12) + xx2=xx**2 + onemx2=abs(one-xx2) + sqrx=sqrt(onemx2) + xsqrx=xx*sqrt(onemx2) + + call plm_d2theta(mpsang,plm_d2t,xx) + if (is_one) then + yy=sign(one,xx) + call pl_deriv(mpsang,pl_d2,yy) + end if + + do il=0,mpsang-1 + llp1=dble(il*(il+1)) + ilm0=il*il+il+1 + do im=0,il + ilm=ilm0+im;ilm1=ilm0-im + + plm =(-1)**im*ass_leg_pol(il,im,xx) + dplm_dt =(-1)**im*plm_dtheta(il,im,xx) + d2plm_dt2= plm_d2t(ilm) + + blm(1,ilm)= two*xsqrx *dplm_dt+onemx2*d2plm_dt2 + blm(2,ilm)= (one-two*xx2)*dplm_dt-xsqrx *d2plm_dt2 + blm(3,ilm)=llp1*plm+ d2plm_dt2 + blm(4,ilm)= -two*xsqrx *dplm_dt+xx2 *d2plm_dt2 + + + if (is_one) then + if (im==1) then + blm(5,ilm)=llp1*plm+d2plm_dt2 + end if + if (im==2) then + blm(5,ilm)=d2plm_dt2-three*pl_d2(il+1) + end if + else + if(im>0) then + blm(5,ilm)=plm/onemx2-dplm_dt*xx/sqrx + end if + end if + + if (im>0) then + blm(1,ilm1)=blm(1,ilm) + blm(2,ilm1)=blm(2,ilm) + blm(3,ilm1)=blm(3,ilm) + blm(4,ilm1)=blm(4,ilm) + blm(5,ilm1)=blm(5,ilm) + end if + + end do + end do + +end subroutine plm_coeff +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_sphharm/ass_leg_pol +!! NAME +!! ass_leg_pol +!! +!! FUNCTION +!! Compute the associated Legendre Polynomial Plm(x), +!! using a stable recursion formula. +!! Here m and l are integers satisfying 0<=m<=l, +!! while x lies in the range -1<=x<=1 +!! +!! INPUTS +!! l,m= l,m numbers +!! xarg=argument of the polynom +!! +!! OUTPUT +!! +!! SOURCE + +function ass_leg_pol(l,m,xarg) + +!Arguments ------------------------------------ +!scalars + integer, intent(in) :: l,m + real(dp), intent(in) :: xarg + real(dp) :: ass_leg_pol + +!Local variables------------------------------- +!scalars + integer :: i,ll + real(dp) :: pll,polmm,tmp1,sqrx,x + character(len=100) :: msg + +! ************************************************************************* + + x=xarg + if (m.lt.0.or.m.gt.l.or.abs(x).gt.1.d0) then + if (m.lt.0.or.m.gt.l.or.abs(x).gt.1.d0+1.d-10) then + msg='Bad choice of l, m or x !' + LIBPAW_BUG(msg) + endif + x=1.d0 + endif + + polmm=1.d0 + if (m>0) then + sqrx=sqrt(abs((1.d0-x)*(1.d0+x))) + do i=1,m + polmm=polmm*(1.0d0-2.0d0*i)*sqrx + enddo + endif + + if (l==m) then + ass_leg_pol=polmm + else + tmp1=x*(2.0d0*m+1.0d0)*polmm + if (l==(m+1)) then + ass_leg_pol=tmp1 + else + do ll=m+2,l + pll=(x*(2.0d0*ll-1.0d0)*tmp1-(ll+m-1.0d0)*polmm)/dble(ll-m) + polmm=tmp1 + tmp1=pll + enddo + ass_leg_pol=pll + endif + endif + +end function ass_leg_pol +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_sphharm/plm_dphi +!! NAME +!! plm_dphi +!! +!! FUNCTION +!! Compute m*P_lm(x)/sqrt((1-x^2)where P_lm is a legendre polynome +!! +!! INPUTS +!! ll= l quantum number +!! mm= m quantum number +!! xx= input value +!! +!! OUTPUT +!! plm_dphi(xx) +!! +!! NOTES +!! This routine comes from Function Der_Phi_P(L,m,x) +!! (pwpaw code from N. Holzwarth, implemented by Y. Abraham)) +!! +!! SOURCE + +function plm_dphi(ll,mm,xx) + +!Arguments --------------------------------------------- +!scalars + integer,intent(in) :: ll,mm + real(dp) :: plm_dphi + real(dp),intent(in) :: xx + +!Local variables --------------------------------------- +!scalars + integer :: il,im + real(dp) :: dosomx2,fact,pll,pmm,pmmp1,somx2 + character(len=500) :: msg + +! ********************************************************************* + + if (mm.lt.0.or.mm.gt.ll.or.abs(xx).gt.1.d0) then + msg = 'plm_dphi : mm < 0 or mm > ll or xx > 1 !' + LIBPAW_ERROR(msg) + end if + + plm_dphi=zero + if (mm==0) return + + pmm=one + dosomx2=one + if (mm > 0) then + somx2=sqrt((1-xx)*(1+xx)) + fact=one + do im=1,mm + pmm=-pmm*fact + fact=fact+2 + end do + if (mm > 1) then + do im=2,mm + dosomx2=somx2*dosomx2 + end do + end if + pmm=pmm*dosomx2 !due to one more term (-1^M) + end if + if(ll==mm) then + plm_dphi=pmm*mm + else + pmmp1=xx*(2*mm+1)*pmm + if(ll==mm+1) then + plm_dphi=pmmp1*mm + else if(ll>=mm+2) then + do il=mm+2,ll + pll=(xx*(2*il-1)*pmmp1-(il+mm-1)*pmm)/(il-mm) + pmm=pmmp1 + pmmp1=pll + end do + plm_dphi=pll*mm + end if + end if + +end function plm_dphi +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_sphharm/plm_dtheta +!! NAME +!! plm_dtheta +!! +!! FUNCTION +!! Compute -(1-x^2)^1/2*d/dx{P_lm(x)} where P_lm is a legendre polynome +!! +!! INPUTS +!! ll= l quantum number +!! mm= m quantum number +!! xx= input value +!! +!! OUTPUT +!! plm_dtheta(xx) +!! +!! NOTES +!! This routine comes from Function Der_Theta_P(L,m,x) +!! (pwpaw code from N. Holzwarth, implemented by Y. Abraham)) +!! +!! SOURCE + +function plm_dtheta(ll,mm,xx) + +!Arguments --------------------------------------------- +!scalars + integer,intent(in) :: ll,mm + real(dp) :: plm_dtheta + real(dp),intent(in) :: xx + +!Local variables --------------------------------------- +!scalars + integer :: il,im + real(dp) :: dosomx2,dpll,dpmm,dpmmp1,fact,pll,pmm,pmmp1,somx2 + character(len=500) :: msg + +! ********************************************************************* + + if (mm.lt.0.or.mm.gt.ll.or.abs(xx).gt.1.d0) then + msg = 'plm_dtheta : mm < 0 or mm > ll or xx > 1 !' + LIBPAW_ERROR(msg) + end if + + plm_dtheta=zero + pmm=one + dpmm=one + dosomx2=one + somx2=sqrt((1-xx)*(1+xx)) + if(mm==0)then + dpmm=zero + elseif (mm > 0) then + fact=one + do im=1,mm + pmm=-pmm*fact*somx2 + dpmm=-dpmm*fact + fact=fact+2 + end do + if(mm>1)then + do im=2,mm + dosomx2=dosomx2*somx2 + end do + end if + dpmm= dpmm*mm*xx*dosomx2 + end if + if(ll==mm)then + plm_dtheta=dpmm + else + pmmp1=xx*(2*mm+1)*pmm + dpmmp1=-(2*mm+1)*somx2*pmm+xx*(2*mm+1)*dpmm + if(ll==mm+1) then + plm_dtheta=dpmmp1 + else if(ll>=mm+2)then + do il=mm+2,ll + pll=(xx*(2*il-1)*pmmp1-(il+mm-1)*pmm)/(il-mm) + dpll=(-somx2*(2*il-1)*pmmp1+(xx*(2*il-1)*dpmmp1-(il+mm-1)*dpmm))/(il-mm) + pmm=pmmp1 + pmmp1=pll + dpmm=dpmmp1 + dpmmp1=dpll + end do + plm_dtheta=dpll + end if + end if + +end function plm_dtheta +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_sphharm/plm_d2theta +!! NAME +!! plm_d2theta +!! +!! FUNCTION +!! Compute d2(Plm (cos(theta)))/d(theta)2 where P_lm is a legendre polynome +!! +!! INPUTS +!! mpsang=1+ maximum l quantum number +!! xx= input value +!! +!! OUTPUT +!! plm_d2t(mpsang*mpsang) +!! +!! SOURCE + +subroutine plm_d2theta(mpsang,plm_d2t,xx) + +!Arguments --------------------------------------------- +!scalars + integer,intent(in) :: mpsang + real(dp),intent(in) :: xx +!arrays + real(dp),intent(out) :: plm_d2t(mpsang*mpsang) + +!Local variables --------------------------------------- +!scalars + integer :: il,ilm,ilmm1,ilmm2,im + real(dp) :: sqrx + character(len=500) :: msg + +!************************************************************************ + if (abs(xx).gt.1.d0) then + msg = 'plm_d2theta : xx > 1 !' + LIBPAW_ERROR(msg) + end if + + plm_d2t=zero + if (mpsang>1) then + sqrx=sqrt(abs((1.d0-xx)*(1.d0+xx))) + + do il=1,mpsang-1 + ilm=il*il+2*il+1 + ilmm1=(il-1)*(il-1)+2*(il-1)+1 +! terme d2(Pll)/dtet2 + plm_d2t(ilm)=(2*il-1)*(sqrx*(plm_d2t(ilmm1)-(-1)**(il-1)*ass_leg_pol(il-1,il-1,xx))+& +& 2.d0*xx*(-1)**(il-1)*plm_dtheta(il-1,il-1,xx)) + plm_d2t(ilm-2*il)=plm_d2t(ilm) +! terme d2(Pl(l-1))/dtet2 + plm_d2t(ilm-1)=(2*il-1)*(xx*(plm_d2t(ilmm1)-(-1)**(il-1)*ass_leg_pol(il-1,il-1,xx))-& +& 2.d0*sqrx*(-1)**(il-1)*plm_dtheta(il-1,il-1,xx)) + if(il>1) plm_d2t(il*il+2)=plm_d2t(ilm-1) + end do +! terme d2(Plm)/dtet2 + if(mpsang>2) then + do il=2,mpsang-1 + do im=0,il-2 + ilm=il*il+il+1+im + ilmm1=(il-1)*(il-1)+il+im + ilmm2=(il-2)*(il-2)+il-1+im + plm_d2t(ilm)=dble(2*il-1)/dble(il-im)*(xx*(plm_d2t(ilmm1)-(-1)**im*ass_leg_pol(il-1,im,xx))-& +& 2.d0*sqrx*(-1)**im*plm_dtheta(il-1,im,xx))-& +& dble(il+im-1)/dble(il-im)*plm_d2t(ilmm2) + plm_d2t(ilm-2*im)=plm_d2t(ilm) + end do + end do + end if + end if + +end subroutine plm_d2theta +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_sphharm/pl_deriv +!! NAME +!! pl_deriv +!! +!! FUNCTION +!! Compute d2(Pl (x)))/d(x)2 where P_l is a legendre polynomial +!! +!! INPUTS +!! mpsang=1+ maximum l quantum number +!! xx= input value +!! +!! OUTPUT +!! pl_d2(mpsang*mpsang) +!! +!! SOURCE + +subroutine pl_deriv(mpsang,pl_d2,xx) + +!Arguments --------------------------------------------- +!scalars + integer,intent(in) :: mpsang + real(dp),intent(in) :: xx +!arrays + real(dp),intent(out) :: pl_d2(mpsang) + +!Local variables --------------------------------------- +!scalars + integer :: il,ilm + real(dp) :: il_,il_m1,il_2m1 + character(len=500) :: msg +!arrays + real(dp) :: pl(mpsang),pl_d1(mpsang) + +! ********************************************************************* + + if (abs(xx).gt.1.d0) then + msg = 'pl_deriv : xx > 1 !' + LIBPAW_ERROR(msg) + end if + + pl_d2=zero; pl_d1=zero; pl=zero + pl(1)=one; pl(2)=xx + pl_d1(1)=zero; pl_d1(2)=one + pl_d2(1)=zero; pl_d2(2)=zero + if (mpsang>2) then + do il=2,mpsang-1 + il_=dble(il);il_m1=dble(il-1);il_2m1=dble(2*il-1) + ilm=il+1 + pl(ilm)=(il_2m1*xx*pl(ilm-1)-il_m1*pl(ilm-2))/il_ + pl_d1(ilm)=(il_2m1*(xx*pl_d1(ilm-1)+pl(ilm-1))-il_m1*pl_d1(ilm-2))/il_ + pl_d2(ilm)=(il_2m1*(xx*pl_d2(ilm-1)+two*pl_d1(ilm-1))-il_m1*pl_d2(ilm-2))/il_ + end do + end if + +end subroutine pl_deriv +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_sphharm/ylm_angular_mesh +!! NAME +!! ylm_angular_mesh +!! +!! FUNCTION +!! Build (theta, phi) angular mesh from (ntheta, nphi) +!! +!! INPUTS +!! ntheta= number of sample points in the theta dir +!! nphi= number of sample points in the phi dir +!! +!! OUTPUT +!! angl_size= total number of sample points in the angular mesh, i.e. (ntheta * nphi) +!! cart_coord(3, angl_size)= for each point of the angular mesh, gives the Cartesian coordinates +!! of the corresponding point on an unitary sphere. +!! ang_wgth(angl_size)= for each point of the angular mesh, gives the weight +!! of the corresponding point on an unitary sphere. +!! +!! NOTE +!! Summing over f * angwgth gives the spherical average 1/(4pi) \int domega f(omega) +!! +!! SOURCE + +subroutine ylm_angular_mesh(ntheta, nphi, angl_size, cart_coord, ang_wgth) + +!Arguments ------------------------------------ + integer,intent(in) :: ntheta, nphi + integer,intent(out) :: angl_size + real(dp),allocatable,intent(out) :: cart_coord(:,:) + real(dp),allocatable,intent(out) :: ang_wgth(:) + +!Local variables ------------------------------ +!scalars + integer :: it, ip, npoints + real(dp) :: ang, con, cos_phi, cos_theta, sin_phi, sin_theta + character(len=500) :: msg +!arrays + real(dp),allocatable :: th(:),wth(:) + +! ************************************************************************* + + LIBPAW_ALLOCATE(th, (ntheta)) + LIBPAW_ALLOCATE(wth, (ntheta)) + + con = two_pi / nphi + call gauleg(-one, one, th, wth, ntheta) + + angl_size = ntheta * nphi + LIBPAW_ALLOCATE(cart_coord, (3, angl_size)) + LIBPAW_ALLOCATE(ang_wgth, (angl_size)) + npoints = 0 + do it = 1, ntheta + cos_theta = th(it) + sin_theta = sqrt(one - cos_theta*cos_theta) + do ip = 1, nphi + ang = con * (ip-1) + cos_phi = cos(ang); sin_phi = sin(ang) + npoints = npoints + 1 + cart_coord(1, npoints) = sin_theta * cos_phi + cart_coord(2, npoints) = sin_theta * sin_phi + cart_coord(3, npoints) = cos_theta + ! Normalization required + ang_wgth(npoints) = wth(it) / (two * nphi) + end do + end do + + LIBPAW_DEALLOCATE(th) + LIBPAW_DEALLOCATE(wth) + +!Error if npoints exceeds angl_size + if (npoints > angl_size) then + write(msg, '(a,i4,a,a,i4)' ) 'npoints =',npoints,ch10,& +& 'angl_size =',angl_size + LIBPAW_BUG(msg) + end if + +end subroutine ylm_angular_mesh +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_sphharm/mat_mlms2jmj +!! NAME +!! mat_mlms2jmj +!! +!! FUNCTION +!! For a given angular momentum lcor, change a matrix of dimension 2(2*lcor+1) +!! from the Ylm basis to the J,M_J basis if option==1 +!! +!! INPUTS +!! lcor= angular momentum +!! ndij= ndij = 4 +!! option= 1 matrix in |l,s,m_l,m_s> basis is changed into |l,s,j,m_j> basis +!! 2 matrix in |l,s,j,m_j> basis is changed into |l,s,m_l,m_s> basis +!! optspin= 1 Spin up are first +!! 2 Spin dn are first +!! prtvol=printing volume +!! unitfi=printing file unit ; -1 for no printing +!! wrt_mode=printing mode in parallel ('COLL' or 'PERS') +!! +!! SIDE EFFECTS +!! mat_mlms= Input/Output matrix in the Ylm basis, size of the matrix is (2*lcor+1,2*lcor+1,ndij) +!! mat_jmj= Input/Output matrix in the J,M_J basis, size is 2*(2*lcor+1),2*(2*lcor+1) +!! +!! NOTES +!! usefull only in ndij==4 +!! +!! SOURCE + +subroutine mat_mlms2jmj(lcor,mat_mlms,mat_jmj,ndij,option,optspin,prtvol,unitfi,wrt_mode) + +!Arguments --------------------------------------------- +!scalars + integer,intent(in) :: ndij,lcor,option,optspin,prtvol,unitfi + character(len=4),intent(in) :: wrt_mode +!arrays + complex(dpc),intent(inout) :: mat_mlms(2*lcor+1,2*lcor+1,ndij) + complex(dpc),intent(inout) :: mat_jmj(2*(2*lcor+1),2*(2*lcor+1)) + +!Local variables --------------------------------------- +!scalars + integer :: ii,im,im1,im2,ispden,jc1,jc2,jj,jm,ll,ml1,ml2,ms1,ms2 + real(dp),parameter :: invsqrt2=one/sqrt2 + real(dp) :: invsqrt2lp1,xj,xmj + complex(dpc) :: mat_tmp,tmp2 + character(len=9),parameter :: dspinold(6)=(/"up ","down ","up-up ","down-down","up-dn ","dn-up "/) + character(len=9),parameter :: dspin(6)=(/"dn ","up ","dn-dn ","up-up ","dn-up ","up-dn "/) + character(len=500) :: msg +!arrays + integer, allocatable :: ind_msml(:,:) + complex(dpc),allocatable :: mat_mlms2(:,:),mlms2jmj(:,:) + +!********************************************************************* + + if(ndij/=4) then + msg=" ndij/=4 !" + LIBPAW_BUG(msg) + end if + if (option/=1.and.option/=2) then + msg=' option=/1 and =/2 !' + LIBPAW_BUG(msg) + end if + if (optspin/=1.and.optspin/=2) then + msg=' optspin=/1 and =/2 !' + LIBPAW_BUG(msg) + end if + + if (unitfi/=-1) then + if(option==1) then + write(msg,'(3a)') ch10,& +& "matrix in |l,s,m_l,m_s> basis is changed into |l,s,j,m_j> basis" + call wrtout(unitfi,msg,wrt_mode) + else if(option==2) then + write(msg,'(3a)') ch10,& +& "matrix in |l,s,j,m_j> basis is changed into |l,s,m_l,m_s> basis" + call wrtout(unitfi,msg,wrt_mode) + end if + end if + + if(option==1) then + if(optspin==2) then + if(abs(prtvol)>2.and.unitfi/=-1)& +& write(msg,'(3a)') ch10,"assume spin dn is the first in the array" + else if (optspin==1) then + if(abs(prtvol)>2.and.unitfi/=-1)& +& write(msg,'(3a)') ch10,"change array in order that spin dn is the first in the array" + do ii=1,2*lcor+1 + do jj=1,2*lcor+1 + mat_tmp=mat_mlms(ii,jj,2) + mat_mlms(ii,jj,2)=mat_mlms(ii,jj,1) + mat_mlms(ii,jj,1)=mat_tmp + mat_tmp=mat_mlms(ii,jj,4) + mat_mlms(ii,jj,4)=mat_mlms(ii,jj,3) + mat_mlms(ii,jj,3)=mat_tmp + end do + end do +! mat_tmp(:,:,1)=mat_mlms(:,:,2);mat_tmp(:,:,2)=mat_mlms(:,:,1) +! mat_tmp(:,:,3)=mat_mlms(:,:,4);mat_tmp(:,:,4)=mat_mlms(:,:,3) +! mat_mlms(:,:,:)=mat_tmp(:,:,:) + end if + if(abs(prtvol)>2.and.unitfi/=-1) then + call wrtout(unitfi,msg,wrt_mode) + end if + end if + + if(option==1.and.abs(prtvol)>2.and.unitfi/=-1) then + do ispden=1,ndij + write(msg,'(3a)') ch10,& +& "Input matrix in the Ylm basis for component ",trim(dspin(ispden+2*(ndij/4))) + call wrtout(unitfi,msg,wrt_mode) + do im1=1,lcor*2+1 + write(msg,'(12(1x,9(1x,"(",f7.3,",",f7.3,")")))')& +& (mat_mlms(im1,im2,ispden),im2=1,lcor*2+1) + call wrtout(unitfi,msg,wrt_mode) + end do + end do + end if ! option==1 + +!--------------- Built indices + allocations + ll=lcor + LIBPAW_ALLOCATE(mlms2jmj,(2*(2*ll+1),2*(2*ll+1))) + mlms2jmj=czero + LIBPAW_BOUND2_ALLOCATE(ind_msml,BOUNDS(1,2),BOUNDS(-ll,ll)) + LIBPAW_ALLOCATE(mat_mlms2,(2*(2*lcor+1),2*(2*lcor+1))) + mlms2jmj=czero + jc1=0 + do ms1=1,2 + do ml1=-ll,ll + jc1=jc1+1 + ind_msml(ms1,ml1)=jc1 + end do + end do +!--------------- Change representation of input matrix for ndij==4 + if(option==1) then + jc1=0 + do ms1=1,2 + do ml1=1,2*ll+1 + jc1=jc1+1 + jc2=0 + do ms2=1,2 + do ml2=1,2*ll+1 + jc2=jc2+1 + if(ms1==ms2) mat_mlms2(jc1,jc2)=mat_mlms(ml1,ml2,ms1) + if(ms1ms2) mat_mlms2(jc1,jc2)=mat_mlms(ml1,ml2,4) + end do + end do + end do + end do + if(abs(prtvol)>1.and.unitfi/=-1) then + write(msg,'(3a)') ch10,"Input matrix in the lms basis for all component" + call wrtout(unitfi,msg,wrt_mode) + do im1=1,2*(lcor*2+1) + write(msg,'(12(1x,18(1x,"(",f7.3,",",f7.3,")")))')& +& (mat_mlms2(im1,im2),im2=1,2*(lcor*2+1)) + call wrtout(unitfi,msg,wrt_mode) + end do + end if + end if ! option==1 + +!--------------- built mlms2jmj +!do jj=ll,ll+1 ! the physical value of j are ll-0.5,ll+0.5 +!xj(jj)=jj-0.5 + if(ll==0)then + msg=' ll should not be equal to zero !' + LIBPAW_BUG(msg) + end if + jc1=0 + invsqrt2lp1=one/sqrt(float(2*lcor+1)) + do jj=ll,ll+1 + xj=float(jj)-half + do jm=-jj,jj-1 + xmj=float(jm)+half + jc1=jc1+1 + if(nint(xj+0.5)==ll+1) then + if(nint(xmj+0.5)==ll+1) then + mlms2jmj(ind_msml(2,ll),jc1)=1.0 ! J=L+0.5 and m_J=L+0.5 + else if(nint(xmj-0.5)==-ll-1) then + mlms2jmj(ind_msml(1,-ll),jc1)=1.0 ! J=L+0.5 and m_J=-L-0.5 + else + mlms2jmj(ind_msml(2,nint(xmj-0.5)),jc1)=invsqrt2lp1*(sqrt(float(ll)+xmj+0.5)) + mlms2jmj(ind_msml(1,nint(xmj+0.5)),jc1)=invsqrt2lp1*(sqrt(float(ll)-xmj+0.5)) + end if + end if + if(nint(xj+0.5)==ll) then + mlms2jmj(ind_msml(1,nint(xmj+0.5)),jc1)=invsqrt2lp1*(sqrt(float(ll)+xmj+0.5)) + mlms2jmj(ind_msml(2,nint(xmj-0.5)),jc1)=-invsqrt2lp1*(sqrt(float(ll)-xmj+0.5)) + end if + end do + end do + if(abs(prtvol)>2.and.unitfi/=-1) then + write(msg,'(3a)') ch10,"Matrix to go from |M_L,M_S> to |J,M_J>" + call wrtout(unitfi,msg,wrt_mode) + do im1=1,2*(lcor*2+1) + write(msg,'(12(1x,18(1x,"(",f7.3,",",f7.3,")")))') (mlms2jmj(im1,im2),im2=1,2*(lcor*2+1)) + call wrtout(unitfi,msg,wrt_mode) + end do + end if + + do jm=1,2*(2*ll+1) + do im=1,2*(2*ll+1) + tmp2=czero + do ii=1,2*(2*ll+1) + do jj=1,2*(2*ll+1) + if(option==1) then + tmp2=tmp2+mat_mlms2(ii,jj)*CONJG(mlms2jmj(ii,im))*(mlms2jmj(jj,jm)) + else if(option==2) then + tmp2=tmp2+mat_jmj(ii,jj)*(mlms2jmj(im,ii))*CONJG(mlms2jmj(jm,jj)) ! inv=t* + end if + end do + end do + if(option==1) then + mat_jmj(im,jm)=tmp2 + else if(option==2) then + mat_mlms2(im,jm)=tmp2 + end if + end do + end do + if(option==1) then + if (abs(prtvol)>=1.and.unitfi/=-1) then + write(msg,'(3a)') ch10," Matrix in the J,M_J basis" + call wrtout(unitfi,msg,wrt_mode) + do im1=1,2*(lcor*2+1) + write(msg,'(12(1x,18(1x,"(",f7.3,",",f7.3,")")))') (mat_jmj(im1,im2),im2=1,2*(lcor*2+1)) + call wrtout(unitfi,msg,wrt_mode) + end do + end if + else if(option==2) then + if (abs(prtvol)>=1.and.unitfi/=-1) then + write(msg,'(3a)') ch10," Matrix in the m_s m_l basis" + call wrtout(unitfi,msg,wrt_mode) + do im1=1,2*(lcor*2+1) + write(msg,'(12(1x,18(1x,"(",f7.3,",",f7.3,")")))') (mat_mlms2(im1,im2),im2=1,2*(lcor*2+1)) + call wrtout(unitfi,msg,wrt_mode) + end do + end if + jc1=0 + do ms1=1,2 + do ml1=1,2*ll+1 + jc1=jc1+1 + jc2=0 + do ms2=1,2 + do ml2=1,2*ll+1 + jc2=jc2+1 + if(ms1==ms2) mat_mlms(ml1,ml2,ms1)=mat_mlms2(jc1,jc2) + if(ms1ms2) mat_mlms(ml1,ml2,4)=mat_mlms2(jc1,jc2) + end do + end do + end do + end do + end if + LIBPAW_DEALLOCATE(mlms2jmj) + LIBPAW_DEALLOCATE(mat_mlms2) + LIBPAW_DEALLOCATE(ind_msml) + + end subroutine mat_mlms2jmj +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_sphharm/mat_slm2ylm +!! NAME +!! mat_slm2ylm +!! +!! FUNCTION +!! For a given angular momentum lcor, change a matrix of dimension (2*lcor+1) +!! from the Slm to the Ylm basis if option==1 or from Ylm to Slm if !option==2 +!! +!! INPUTS +!! lcor= angular momentum, size of the matrix is 2(2*lcor+1) +!! mat_inp_c= Input matrix +!! ndij= ndij = 4 +!! option= -1 Change matrix from Slm to Ylm basis +!! 1 Change matrix from Ylm to Slm basis +!! optspin= 1 Spin up are first +!! 2 Spin dn are first +!! prtvol=printing volume +!! unitfi=printing file unit ; -1 for no printing +!! wrt_mode=printing mode in parallel ('COLL' or 'PERS') +!! +!! OUTPUT +!! mat_inp_c= Output matrix in Ylm or Slm basis according to option +!! +!! NOTES +!! usefull only in ndij==4 +!! +!! SOURCE + +subroutine mat_slm2ylm(lcor,mat_inp_c,mat_out_c,ndij,option,optspin,prtvol,unitfi,wrt_mode) + +!Arguments --------------------------------------------- +!scalars + integer,intent(in) :: ndij,lcor,option,optspin,prtvol,unitfi + character(len=4),intent(in) :: wrt_mode +!arrays + complex(dpc) :: mat_inp_c(2*lcor+1,2*lcor+1,ndij),mat_out(2*lcor+1,2*lcor+1,ndij) + complex(dpc) :: mat_out_c(2*lcor+1,2*lcor+1,ndij) + +!Local variables --------------------------------------- +!scalars + integer :: jm,ii,jj,ll,mm,ispden,im,im1,im2 + real(dp),parameter :: invsqrt2=one/sqrt2 + real(dp) :: onem + complex(dpc) :: tmp2 + character(len=9),parameter :: dspinc(6)=(/"up ","down ","up-up ","down-down","up-dn ","dn-up "/)! optspin 1 + character(len=9),parameter :: dspinc2(6)=(/"up ","down ","dn-dn ","up-up ","dn-up ","up-dn "/)! optspin 2 + character(len=500) :: msg +!arrays + complex(dpc),allocatable :: slm2ylm(:,:) + +! ********************************************************************* + + if(ndij/=4) then + msg=' ndij:=4 !' + LIBPAW_BUG(msg) + end if + if (option/=1.and.option/=2.and.option/=3.and.option/=4) then + msg=' option=/1 or 2 or 3 or 4 !' + LIBPAW_BUG(msg) + end if + + if(abs(prtvol)>2.and.unitfi/=-1) then + write(msg,'(3a)') ch10, " mat_slm2ylm" + call wrtout(unitfi,msg,wrt_mode) + end if + + if(abs(prtvol)>2.and.unitfi/=-1) then + if(option==1.or.option==3) then + write(msg,'(3a)') ch10,"matrix in Slm basis is changed into Ylm basis" + call wrtout(unitfi,msg,wrt_mode) + else if(option==2.or.option==4) then + write(msg,'(3a)') ch10,"matrix in Ylm basis is changed into Slm basis" + call wrtout(unitfi,msg,wrt_mode) + end if + end if + + ll=lcor + LIBPAW_ALLOCATE(slm2ylm,(2*ll+1,2*ll+1)) + slm2ylm=czero + mat_out=zero + mat_out_c=czero + do im=1,2*ll+1 + mm=im-ll-1;jm=-mm+ll+1 + onem=dble((-1)**mm) + if (mm> 0) then + slm2ylm(im,im)= cmplx(onem*invsqrt2,zero,kind=dp) + slm2ylm(jm,im)= cmplx(invsqrt2, zero,kind=dp) + end if + if (mm==0) then + slm2ylm(im,im)=cone + end if + if (mm< 0) then + slm2ylm(im,im)= cmplx(zero, invsqrt2,kind=dp) + slm2ylm(jm,im)=-cmplx(zero,onem*invsqrt2,kind=dp) + end if + end do + if(abs(prtvol)>2.and.unitfi/=-1) then + do ispden=1,ndij + if(optspin==1) then + if(option==1.or.option==3)& +& write(msg,'(3a)') ch10,& +& "Input matrix in the Slm basis for component ",trim(dspinc(ispden+2*(ndij/4))) + if(option==2.or.option==3)& +& write(msg,'(3a)') ch10,& +& "Input matrix in the Ylm basis for component ",trim(dspinc(ispden+2*(ndij/4))) + else + if(option==1.or.option==3)& +& write(msg,'(3a)') ch10,& +& "Input matrix in the Slm basis for component ",trim(dspinc2(ispden+2*(ndij/4))) + if(option==2.or.option==3)& +& write(msg,'(3a)') ch10,& +& "Input matrix in the Ylm basis for component ",trim(dspinc2(ispden+2*(ndij/4))) + end if + call wrtout(unitfi,msg,wrt_mode) + do im1=1,lcor*2+1 + write(msg,'(12(1x,9(1x,"(",f9.5,",",f9.5,")")))')& +& (mat_inp_c(im1,im2,ispden),im2=1,lcor*2+1) + call wrtout(unitfi,msg,wrt_mode) + end do + end do + end if + do ispden=1,ndij + do jm=1,2*ll+1 + do im=1,2*ll+1 + tmp2=czero + do ii=1,2*ll+1 + do jj=1,2*ll+1 + if(option==1) then + tmp2=tmp2+mat_inp_c(ii,jj,ispden)*(slm2ylm(im,ii))*CONJG(slm2ylm(jm,jj)) + else if(option==2) then + tmp2=tmp2+mat_inp_c(ii,jj,ispden)*CONJG(slm2ylm(ii,im))*(slm2ylm(jj,jm)) + end if + end do + end do + mat_out_c(im,jm,ispden)=tmp2 + end do + end do + end do ! ispden + do ii=1,2*ll+1 + do jj=1,2*ll+1 + mat_out(ii,jj,1)=real(mat_out_c(ii,jj,1)) + mat_out(ii,jj,2)=real(mat_out_c(ii,jj,2)) + mat_out(ii,jj,3)=real(mat_out_c(ii,jj,3)) + mat_out(ii,jj,4)=aimag(mat_out_c(ii,jj,3)) +! check that n_{m,m'}^{alpha,beta}=conjg(n_{m',m"}^{beta,alpha}). + if((abs(aimag(mat_out_c(ii,jj,3))+aimag(mat_out_c(jj,ii,4))).ge.0.0001).or. & +& (abs(real(mat_out_c(ii,jj,3))-real(mat_out_c(jj,ii,4))).ge.0.0001)) then + write(msg,'(a,4f10.4)') & +& ' prb with mat_out_c ',mat_out_c(ii,jj,3),mat_out_c(ii,jj,4) + LIBPAW_BUG(msg) + end if + end do + end do + + LIBPAW_DEALLOCATE(slm2ylm) + +end subroutine mat_slm2ylm +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_sphharm/setsym_ylm +!! NAME +!! setsym_ylm +!! +!! FUNCTION +!! Compute rotation matrices expressed in the basis of real spherical harmonics +!! This coefficients are used later to symmetrize PAW on-site quantities (rhoij, dij, ...). +!! +!! INPUTS +!! gprimd(3,3)==dimensional primitive translations for reciprocal space (bohr^-1) +!! lmax=value of lmax mentioned at the second line of the psp file +!! nsym=number of symmetry elements in space group +!! pawprtvol=control print volume and debugging output +!! rprimd(3,3)=dimensional primitive translations in real space (bohr) +!! sym(3,3,nsym)=symmetries of group in terms of operations on primitive translations +!! +!! OUTPUT +!! zarot(2*lmax+1,2*lmax+1,lmax+1,nsym)=coefficients of the +!! transformation of real spherical harmonics +!! under the symmetry operations +!! +!! NOTES +!! Typical use: sym(:,:,:) is symrec(:,:,:) (rotations in reciprocal space) +!! because we need symrel^-1 (=transpose[symrec]) +!! to symmetrize quantities. +!! +!! - This file comes from the file crystal_symmetry.f +!! by N.A.W. Holzwarth and A. Tackett for the code pwpaw +!! - Uses sign & phase convension of M. E. Rose, Elementary Theory of Angular +!! Momentum, John Wiley & Sons,. inc. 1957) +!! zalpha = exp(-i*alpha) zgamma = exp (-i*gamma) +!! - Assumes each transformation can be expressed in terms of 3 Euler +!! angles with or without inversion +!! +!! Reference for evaluation of rotation matrices in the basis of real SH: +!! Blanco M.A., Florez M. and Bermejo M. +!! Journal of Molecular Structure: THEOCHEM, Volume 419, Number 1, 8 December 1997 , pp. 19-27(9) +!! http://www.unioviedo.es/qcg/art/Theochem419-19-ov-BF97-rotation-matrices.pdf +!! +!! SOURCE + +subroutine setsym_ylm(gprimd,lmax,nsym,pawprtvol,rprimd,sym,zarot) + +!Arguments --------------------------------------------- +!scalars + integer,intent(in) :: lmax,nsym,pawprtvol +!arrays + integer,intent(in) :: sym(3,3,nsym) + real(dp),intent(in) :: gprimd(3,3),rprimd(3,3) + real(dp),intent(out) :: zarot(2*lmax+1,2*lmax+1,lmax+1,nsym) + +!Local variables ------------------------------ +!scalars + integer :: i1,ii,il,irot,isn,j1,jj,k1,ll,mm,mp + real(dp) :: cosalp,cosbeta,cosgam,sinalp,sinbeta,singam + character(len=1000) :: msg +!arrays + real(dp) :: prod(3,3),rot(3,3) + +!************************************************************************ + + if (abs(pawprtvol)>=3) then + write(msg,'(8a,i4)') ch10,& +& ' PAW TEST:',ch10,& +& ' ==== setsym_ylm: rotation matrices in the basis ============',ch10,& +& ' ==== of real spherical harmonics ============',ch10,& +& ' > Number of symmetries (nsym)=',nsym + call wrtout(std_out,msg,'COLL') + end if + + zarot=zero + + do irot=1,nsym + + if (abs(pawprtvol)>=3) then + write(msg,'(a,i2,a,9i2,a)') ' >For symmetry ',irot,' (',sym(:,:,irot),')' + call wrtout(std_out,msg,'COLL') + end if + +! === l=0 case === + zarot(1,1,1,irot)=one + +! === l>0 case === + if (lmax>0) then +! Calculate the rotations in the cartesian basis + rot=zero;prod=zero + do k1=1,3 + do j1=1,3 + do i1=1,3 + prod(i1,j1)=prod(i1,j1)+sym(i1,k1,irot)*rprimd(j1,k1) + end do + end do + end do + do j1=1,3 + do i1=1,3 + do k1=1,3 + rot(i1,j1)=rot(i1,j1)+gprimd(i1,k1)*prod(k1,j1) + end do + if(abs(rot(i1,j1))=3) then + if(lmax>0) then + write(msg,'(2a,3(3(2x,f7.3),a))') & +& ' Rotation matrice for l=1:',ch10,& +& (zarot(1,jj,2,irot),jj=1,3),ch10,& +& (zarot(2,jj,2,irot),jj=1,3),ch10,& +& (zarot(3,jj,2,irot),jj=1,3) + call wrtout(std_out,msg,'COLL') + end if + if(lmax>1) then + write(msg,'(2a,5(5(2x,f7.3),a))') & +& ' Rotation matrice for l=2:',ch10,& +& (zarot(1,jj,3,irot),jj=1,5),ch10,& +& (zarot(2,jj,3,irot),jj=1,5),ch10,& +& (zarot(3,jj,3,irot),jj=1,5),ch10,& +& (zarot(4,jj,3,irot),jj=1,5),ch10,& +& (zarot(5,jj,3,irot),jj=1,5) + call wrtout(std_out,msg,'COLL') + end if + if(lmax>2) then + write(msg,'(2a,7(7(2x,f7.3),a))') & +& ' Rotation matrice for l=3:',ch10,& +& (zarot(1,jj,4,irot),jj=1,7),ch10,& +& (zarot(2,jj,4,irot),jj=1,7),ch10,& +& (zarot(3,jj,4,irot),jj=1,7),ch10,& +& (zarot(4,jj,4,irot),jj=1,7),ch10,& +& (zarot(5,jj,4,irot),jj=1,7),ch10,& +& (zarot(6,jj,4,irot),jj=1,7),ch10,& +& (zarot(7,jj,4,irot),jj=1,7) + call wrtout(std_out,msg,'COLL') + end if + end if + + end do ! isym loop + +end subroutine setsym_ylm +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_sphharm/setnabla_ylm +!! NAME +!! setnabla_ylm +!! +!! FUNCTION +!! Evaluate several inegrals involving spherical harmonics and their gradient. +!! These integrals are angular part for and . +!! +!! INPUTS +!! mpsang=1+ max. angular momentum +!! +!! OUTPUT +!! ang_phipphj :: angular part for and +!! ang_phipphj(i,j,1)=\int sin\theta cos\phi Si Sj d\omega +!! ang_phipphj(i,j,2)=\int cos\theta cos\phi Si \frac{d}{d\theta}Sj d\Omega +!! ang_phipphj(i,j,3)=\int -sin\phi Si \frac{d}{d\phi}Sj d\Omega +!! ang_phipphj(i,j,4)=\int sin\theta sin\phi Si Sj d\Omega +!! ang_phipphj(i,j,5)=\int cos\theta sin\phi Si \frac{d}{d\theta}Sj d\Omega +!! ang_phipphj(i,j,6)=\int cos\phi Si \frac{d}{d\phi}Sj d\Omega +!! ang_phipphj(i,j,7)=\int cos\theta Si Sj d\Omega +!! ang_phipphj(i,j,8)=\int -sin\theta Si \frac{d}{d\theta}Sj d\Omega +!! +!! NOTES +!! See : Mazevet, S., Torrent, M., Recoules, V. and Jollet, F., High Energy Density Physics, 6, 84-88 (2010) +!! Calculations of the Transport Properties within the PAW Formalism +!! SOURCE + + subroutine setnabla_ylm(ang_phipphj,mpsang) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: mpsang +!arrays + real(dp),intent(out) :: ang_phipphj(mpsang**2,mpsang**2,8) + +!Local variables------------------------------- + character(len=500) :: msg + real(dp) :: ang_phipphj_tmp(16,16,8) + +! ************************************************************************ + + if (mpsang>4) then + msg=' Not designed for angular momentum greater than 3!' + LIBPAW_ERROR(msg) + end if + +!8 angular integrals for l=0..3, m=-l..+l +!ang_phipphj(1,4,1)=\frac{1}{\sqrt{3}} +!ang_phipphj(2,5,1)=\frac{1}{\sqrt{5}} +!ang_phipphj(3,8,1)=\frac{1}{\sqrt{5}} +!ang_phipphj(4,1,1)=\frac{1}{\sqrt{3}} +!ang_phipphj(4,7,1)=-\frac{1}{\sqrt{15}} +!ang_phipphj(4,9,1)=\frac{1}{\sqrt{5}} +!ang_phipphj(5,2,1)=\frac{1}{\sqrt{5}} +!ang_phipphj(5,10,1)=\sqrt{\frac{3}{14}} +!ang_phipphj(5,12,1)=-\frac{1}{\sqrt{70}} +!ang_phipphj(6,11,1)=\frac{1}{\sqrt{7}} +!ang_phipphj(7,4,1)=-\frac{1}{\sqrt{15}} +!ang_phipphj(7,14,1)=\sqrt{\frac{6}{35}} +!ang_phipphj(8,3,1)=\frac{1}{\sqrt{5}} +!ang_phipphj(8,13,1)=-\sqrt{\frac{3}{35}} +!ang_phipphj(8,15,1)=\frac{1}{\sqrt{7}} +!ang_phipphj(9,4,1)=\frac{1}{\sqrt{5}} +!ang_phipphj(9,14,1)=-\frac{1}{\sqrt{70}} +!ang_phipphj(9,16,1)=\sqrt{\frac{3}{14}} +!ang_phipphj(10,5,1)=\sqrt{\frac{3}{14}} +!ang_phipphj(11,6,1)=\frac{1}{\sqrt{7}} +!ang_phipphj(12,5,1)=-\frac{1}{\sqrt{70}} +!ang_phipphj(13,8,1)=-\sqrt{\frac{3}{35}} +!ang_phipphj(14,7,1)=\sqrt{\frac{6}{35}} +!ang_phipphj(14,9,1)=-\frac{1}{\sqrt{70}} +!ang_phipphj(15,8,1)=\frac{1}{\sqrt{7}} +!ang_phipphj(16,9,1)=\sqrt{\frac{3}{14}} +!ang_phipphj(1,4,2)=\frac{1}{2 \sqrt{3}} +!ang_phipphj(1,14,2)=-\frac{\sqrt{\frac{7}{6}}}{2} +!ang_phipphj(2,5,2)=\frac{1}{2 \sqrt{5}} +!ang_phipphj(3,8,2)=\frac{1}{2 \sqrt{5}} +!ang_phipphj(4,7,2)=-\sqrt{\frac{3}{5}} +!ang_phipphj(4,9,2)=\frac{1}{2 \sqrt{5}} +!ang_phipphj(5,2,2)=\frac{1}{4 \sqrt{5}} +!ang_phipphj(5,10,2)=\frac{\sqrt{\frac{3}{14}}}{2} +!ang_phipphj(5,12,2)=-2 \sqrt{\frac{2}{35}} +!ang_phipphj(6,11,2)=\frac{1}{2 \sqrt{7}} +!ang_phipphj(7,4,2)=\frac{1}{\sqrt{15}} +!ang_phipphj(7,14,2)=\frac{13}{2 \sqrt{210}} +!ang_phipphj(8,3,2)=-\frac{1}{\sqrt{5}} +!ang_phipphj(8,13,2)=-4 \sqrt{\frac{3}{35}} +!ang_phipphj(8,15,2)=\frac{1}{2 \sqrt{7}} +!ang_phipphj(9,4,2)=\frac{1}{4 \sqrt{5}} +!ang_phipphj(9,14,2)=-2 \sqrt{\frac{2}{35}} +!ang_phipphj(9,16,2)=\frac{\sqrt{\frac{3}{14}}}{2} +!ang_phipphj(10,5,2)=\frac{1}{\sqrt{42}} +!ang_phipphj(11,6,2)=-\frac{1}{4 \sqrt{7}} +!ang_phipphj(12,5,2)=\sqrt{\frac{2}{35}} +!ang_phipphj(13,8,2)=2 \sqrt{\frac{3}{35}} +!ang_phipphj(14,7,2)=-2 \sqrt{\frac{6}{35}} +!ang_phipphj(14,9,2)=\sqrt{\frac{2}{35}} +!ang_phipphj(15,8,2)=-\frac{1}{4 \sqrt{7}} +!ang_phipphj(16,9,2)=\frac{1}{\sqrt{42}} +!ang_phipphj(1,4,3)=\frac{\sqrt{3}}{2} +!ang_phipphj(1,14,3)=\frac{\sqrt{\frac{7}{6}}}{2} +!ang_phipphj(2,5,3)=\frac{\sqrt{5}}{2} +!ang_phipphj(3,8,3)=\frac{\sqrt{5}}{2} +!ang_phipphj(4,9,3)=\frac{\sqrt{5}}{2} +!ang_phipphj(5,2,3)=-\frac{\sqrt{5}}{4} +!ang_phipphj(5,10,3)=\frac{\sqrt{\frac{21}{2}}}{2} +!ang_phipphj(6,11,3)=\frac{\sqrt{7}}{2} +!ang_phipphj(7,14,3)=\frac{\sqrt{\frac{35}{6}}}{2} +!ang_phipphj(8,15,3)=\frac{\sqrt{7}}{2} +!ang_phipphj(9,4,3)=-\frac{\sqrt{5}}{4} +!ang_phipphj(9,16,3)=\frac{\sqrt{\frac{21}{2}}}{2} +!ang_phipphj(10,5,3)=-\sqrt{\frac{7}{6}} +!ang_phipphj(11,6,3)=-\frac{\sqrt{7}}{4} +!ang_phipphj(15,8,3)=-\frac{\sqrt{7}}{4} +!ang_phipphj(16,9,3)=-\sqrt{\frac{7}{6}} +!ang_phipphj(1,2,4)=\frac{1}{\sqrt{3}} +!ang_phipphj(2,1,4)=\frac{1}{\sqrt{3}} +!ang_phipphj(2,7,4)=-\frac{1}{\sqrt{15}} +!ang_phipphj(2,9,4)=-\frac{1}{\sqrt{5}} +!ang_phipphj(3,6,4)=\frac{1}{\sqrt{5}} +!ang_phipphj(4,5,4)=\frac{1}{\sqrt{5}} +!ang_phipphj(5,4,4)=\frac{1}{\sqrt{5}} +!ang_phipphj(5,14,4)=-\frac{1}{\sqrt{70}} +!ang_phipphj(5,16,4)=-\sqrt{\frac{3}{14}} +!ang_phipphj(6,3,4)=\frac{1}{\sqrt{5}} +!ang_phipphj(6,13,4)=-\sqrt{\frac{3}{35}} +!ang_phipphj(6,15,4)=-\frac{1}{\sqrt{7}} +!ang_phipphj(7,2,4)=-\frac{1}{\sqrt{15}} +!ang_phipphj(7,12,4)=\sqrt{\frac{6}{35}} +!ang_phipphj(8,11,4)=\frac{1}{\sqrt{7}} +!ang_phipphj(9,2,4)=-\frac{1}{\sqrt{5}} +!ang_phipphj(9,10,4)=\sqrt{\frac{3}{14}} +!ang_phipphj(9,12,4)=\frac{1}{\sqrt{70}} +!ang_phipphj(10,9,4)=\sqrt{\frac{3}{14}} +!ang_phipphj(11,8,4)=\frac{1}{\sqrt{7}} +!ang_phipphj(12,7,4)=\sqrt{\frac{6}{35}} +!ang_phipphj(12,9,4)=\frac{1}{\sqrt{70}} +!ang_phipphj(13,6,4)=-\sqrt{\frac{3}{35}} +!ang_phipphj(14,5,4)=-\frac{1}{\sqrt{70}} +!ang_phipphj(15,6,4)=-\frac{1}{\sqrt{7}} +!ang_phipphj(16,5,4)=-\sqrt{\frac{3}{14}} +!ang_phipphj(1,2,5)=\frac{1}{2 \sqrt{3}} +!ang_phipphj(1,12,5)=-\frac{\sqrt{\frac{7}{6}}}{2} +!ang_phipphj(2,7,5)=-\sqrt{\frac{3}{5}} +!ang_phipphj(2,9,5)=-\frac{1}{2 \sqrt{5}} +!ang_phipphj(3,6,5)=\frac{1}{2 \sqrt{5}} +!ang_phipphj(4,5,5)=\frac{1}{2 \sqrt{5}} +!ang_phipphj(5,4,5)=\frac{1}{4 \sqrt{5}} +!ang_phipphj(5,14,5)=-2 \sqrt{\frac{2}{35}} +!ang_phipphj(5,16,5)=-\frac{\sqrt{\frac{3}{14}}}{2} +!ang_phipphj(6,3,5)=-\frac{1}{\sqrt{5}} +!ang_phipphj(6,13,5)=-4 \sqrt{\frac{3}{35}} +!ang_phipphj(6,15,5)=-\frac{1}{2 \sqrt{7}} +!ang_phipphj(7,2,5)=\frac{1}{\sqrt{15}} +!ang_phipphj(7,12,5)=\frac{13}{2 \sqrt{210}} +!ang_phipphj(8,11,5)=\frac{1}{2 \sqrt{7}} +!ang_phipphj(9,2,5)=-\frac{1}{4 \sqrt{5}} +!ang_phipphj(9,10,5)=\frac{\sqrt{\frac{3}{14}}}{2} +!ang_phipphj(9,12,5)=2 \sqrt{\frac{2}{35}} +!ang_phipphj(10,9,5)=\frac{1}{\sqrt{42}} +!ang_phipphj(11,8,5)=-\frac{1}{4 \sqrt{7}} +!ang_phipphj(12,7,5)=-2 \sqrt{\frac{6}{35}} +!ang_phipphj(12,9,5)=-\sqrt{\frac{2}{35}} +!ang_phipphj(13,6,5)=2 \sqrt{\frac{3}{35}} +!ang_phipphj(14,5,5)=\sqrt{\frac{2}{35}} +!ang_phipphj(15,6,5)=\frac{1}{4 \sqrt{7}} +!ang_phipphj(16,5,5)=-\frac{1}{\sqrt{42}} +!ang_phipphj(1,2,6)=\frac{\sqrt{3}}{2} +!ang_phipphj(1,12,6)=\frac{\sqrt{\frac{7}{6}}}{2} +!ang_phipphj(2,9,6)=-\frac{\sqrt{5}}{2} +!ang_phipphj(3,6,6)=\frac{\sqrt{5}}{2} +!ang_phipphj(4,5,6)=\frac{\sqrt{5}}{2} +!ang_phipphj(5,4,6)=-\frac{\sqrt{5}}{4} +!ang_phipphj(5,16,6)=-\frac{\sqrt{\frac{21}{2}}}{2} +!ang_phipphj(6,15,6)=-\frac{\sqrt{7}}{2} +!ang_phipphj(7,12,6)=\frac{\sqrt{\frac{35}{6}}}{2} +!ang_phipphj(8,11,6)=\frac{\sqrt{7}}{2} +!ang_phipphj(9,2,6)=\frac{\sqrt{5}}{4} +!ang_phipphj(9,10,6)=\frac{\sqrt{\frac{21}{2}}}{2} +!ang_phipphj(10,9,6)=-\sqrt{\frac{7}{6}} +!ang_phipphj(11,8,6)=-\frac{\sqrt{7}}{4} +!ang_phipphj(15,6,6)=\frac{\sqrt{7}}{4} +!ang_phipphj(16,5,6)=\sqrt{\frac{7}{6}} +!ang_phipphj(1,3,7)=\frac{1}{\sqrt{3}} +!ang_phipphj(2,6,7)=\frac{1}{\sqrt{5}} +!ang_phipphj(3,1,7)=\frac{1}{\sqrt{3}} +!ang_phipphj(3,7,7)=\frac{2}{\sqrt{15}} +!ang_phipphj(4,8,7)=\frac{1}{\sqrt{5}} +!ang_phipphj(5,11,7)=\frac{1}{\sqrt{7}} +!ang_phipphj(6,2,7)=\frac{1}{\sqrt{5}} +!ang_phipphj(6,12,7)=2 \sqrt{\frac{2}{35}} +!ang_phipphj(7,3,7)=\frac{2}{\sqrt{15}} +!ang_phipphj(7,13,7)=\frac{3}{\sqrt{35}} +!ang_phipphj(8,4,7)=\frac{1}{\sqrt{5}} +!ang_phipphj(8,14,7)=2 \sqrt{\frac{2}{35}} +!ang_phipphj(9,15,7)=\frac{1}{\sqrt{7}} +!ang_phipphj(11,5,7)=\frac{1}{\sqrt{7}} +!ang_phipphj(12,6,7)=2 \sqrt{\frac{2}{35}} +!ang_phipphj(13,7,7)=\frac{3}{\sqrt{35}} +!ang_phipphj(14,8,7)=2 \sqrt{\frac{2}{35}} +!ang_phipphj(15,9,7)=\frac{1}{\sqrt{7}} +!ang_phipphj(1,3,8)=\frac{2}{\sqrt{3}} +!ang_phipphj(2,6,8)=\frac{3}{\sqrt{5}} +!ang_phipphj(3,7,8)=2 \sqrt{\frac{3}{5}} +!ang_phipphj(4,8,8)=\frac{3}{\sqrt{5}} +!ang_phipphj(5,11,8)=\frac{4}{\sqrt{7}} +!ang_phipphj(6,2,8)=-\frac{1}{\sqrt{5}} +!ang_phipphj(6,12,8)=8 \sqrt{\frac{2}{35}} +!ang_phipphj(7,3,8)=-\frac{2}{\sqrt{15}} +!ang_phipphj(7,13,8)=\frac{12}{\sqrt{35}} +!ang_phipphj(8,4,8)=-\frac{1}{\sqrt{5}} +!ang_phipphj(8,14,8)=8 \sqrt{\frac{2}{35}} +!ang_phipphj(9,15,8)=\frac{4}{\sqrt{7}} +!ang_phipphj(11,5,8)=-\frac{2}{\sqrt{7}} +!ang_phipphj(12,6,8)=-4 \sqrt{\frac{2}{35}} +!ang_phipphj(13,7,8)=-\frac{6}{\sqrt{35}} +!ang_phipphj(14,8,8)=-4 \sqrt{\frac{2}{35}} +!ang_phipphj(15,9,8)=-\frac{2}{\sqrt{7}} + + + ang_phipphj_tmp=zero +! + ang_phipphj_tmp(1,4,1)=0.57735026918962576451_dp + ang_phipphj_tmp(2,5,1)=0.44721359549995793928_dp + ang_phipphj_tmp(3,8,1)=0.44721359549995793928_dp + ang_phipphj_tmp(4,1,1)=0.57735026918962576451_dp + ang_phipphj_tmp(4,7,1)=-0.25819888974716112568_dp + ang_phipphj_tmp(4,9,1)=0.44721359549995793928_dp + ang_phipphj_tmp(5,2,1)=0.44721359549995793928_dp + ang_phipphj_tmp(5,10,1)=0.46291004988627573078_dp + ang_phipphj_tmp(5,12,1)=-0.11952286093343936400_dp + ang_phipphj_tmp(6,11,1)=0.37796447300922722721_dp + ang_phipphj_tmp(7,4,1)=-0.25819888974716112568_dp + ang_phipphj_tmp(7,14,1)=0.41403933560541253068_dp + ang_phipphj_tmp(8,3,1)=0.44721359549995793928_dp + ang_phipphj_tmp(8,13,1)=-0.29277002188455995381_dp + ang_phipphj_tmp(8,15,1)=0.37796447300922722721_dp + ang_phipphj_tmp(9,4,1)=0.44721359549995793928_dp + ang_phipphj_tmp(9,14,1)=-0.11952286093343936400_dp + ang_phipphj_tmp(9,16,1)=0.46291004988627573078_dp + ang_phipphj_tmp(10,5,1)=0.46291004988627573078_dp + ang_phipphj_tmp(11,6,1)=0.37796447300922722721_dp + ang_phipphj_tmp(12,5,1)=-0.11952286093343936400_dp + ang_phipphj_tmp(13,8,1)=-0.29277002188455995381_dp + ang_phipphj_tmp(14,7,1)=0.41403933560541253068_dp + ang_phipphj_tmp(14,9,1)=-0.11952286093343936400_dp + ang_phipphj_tmp(15,8,1)=0.37796447300922722721_dp + ang_phipphj_tmp(16,9,1)=0.46291004988627573078_dp +! + ang_phipphj_tmp(1,4,2)=0.28867513459481288225_dp + ang_phipphj_tmp(1,14,2)=-0.54006172486732168591_dp + ang_phipphj_tmp(2,5,2)=0.22360679774997896964_dp + ang_phipphj_tmp(3,8,2)=0.22360679774997896964_dp + ang_phipphj_tmp(4,7,2)=-0.77459666924148337704_dp + ang_phipphj_tmp(4,9,2)=0.22360679774997896964_dp + ang_phipphj_tmp(5,2,2)=0.11180339887498948482_dp + ang_phipphj_tmp(5,10,2)=0.23145502494313786539_dp + ang_phipphj_tmp(5,12,2)=-0.47809144373375745599_dp + ang_phipphj_tmp(6,11,2)=0.18898223650461361361_dp + ang_phipphj_tmp(7,4,2)=0.25819888974716112568_dp + ang_phipphj_tmp(7,14,2)=0.44854261357253024157_dp + ang_phipphj_tmp(8,3,2)=-0.44721359549995793928_dp + ang_phipphj_tmp(8,13,2)=-1.1710800875382398152_dp + ang_phipphj_tmp(8,15,2)=0.18898223650461361361_dp + ang_phipphj_tmp(9,4,2)=0.11180339887498948482_dp + ang_phipphj_tmp(9,14,2)=-0.47809144373375745599_dp + ang_phipphj_tmp(9,16,2)=0.23145502494313786539_dp + ang_phipphj_tmp(10,5,2)=0.15430334996209191026_dp + ang_phipphj_tmp(11,6,2)=-0.094491118252306806804_dp + ang_phipphj_tmp(12,5,2)=0.23904572186687872799_dp + ang_phipphj_tmp(13,8,2)=0.58554004376911990761_dp + ang_phipphj_tmp(14,7,2)=-0.82807867121082506136_dp + ang_phipphj_tmp(14,9,2)=0.23904572186687872799_dp + ang_phipphj_tmp(15,8,2)=-0.094491118252306806804_dp + ang_phipphj_tmp(16,9,2)=0.15430334996209191026_dp +! + ang_phipphj_tmp(1,4,3)=0.86602540378443864676_dp + ang_phipphj_tmp(1,14,3)=0.54006172486732168591_dp + ang_phipphj_tmp(2,5,3)=1.1180339887498948482_dp + ang_phipphj_tmp(3,8,3)=1.1180339887498948482_dp + ang_phipphj_tmp(4,9,3)=1.1180339887498948482_dp + ang_phipphj_tmp(5,2,3)=-0.55901699437494742410_dp + ang_phipphj_tmp(5,10,3)=1.6201851746019650577_dp + ang_phipphj_tmp(6,11,3)=1.3228756555322952953_dp + ang_phipphj_tmp(7,14,3)=1.2076147288491198811_dp + ang_phipphj_tmp(8,15,3)=1.3228756555322952953_dp + ang_phipphj_tmp(9,4,3)=-0.55901699437494742410_dp + ang_phipphj_tmp(9,16,3)=1.6201851746019650577_dp + ang_phipphj_tmp(10,5,3)=-1.0801234497346433718_dp + ang_phipphj_tmp(11,6,3)=-0.66143782776614764763_dp + ang_phipphj_tmp(15,8,3)=-0.66143782776614764763_dp + ang_phipphj_tmp(16,9,3)=-1.0801234497346433718_dp +! + ang_phipphj_tmp(1,2,4)=0.57735026918962576451_dp + ang_phipphj_tmp(2,1,4)=0.57735026918962576451_dp + ang_phipphj_tmp(2,7,4)=-0.25819888974716112568_dp + ang_phipphj_tmp(2,9,4)=-0.44721359549995793928_dp + ang_phipphj_tmp(3,6,4)=0.44721359549995793928_dp + ang_phipphj_tmp(4,5,4)=0.44721359549995793928_dp + ang_phipphj_tmp(5,4,4)=0.44721359549995793928_dp + ang_phipphj_tmp(5,14,4)=-0.11952286093343936400_dp + ang_phipphj_tmp(5,16,4)=-0.46291004988627573078_dp + ang_phipphj_tmp(6,3,4)=0.44721359549995793928_dp + ang_phipphj_tmp(6,13,4)=-0.29277002188455995381_dp + ang_phipphj_tmp(6,15,4)=-0.37796447300922722721_dp + ang_phipphj_tmp(7,2,4)=-0.25819888974716112568_dp + ang_phipphj_tmp(7,12,4)=0.41403933560541253068_dp + ang_phipphj_tmp(8,11,4)=0.37796447300922722721_dp + ang_phipphj_tmp(9,2,4)=-0.44721359549995793928_dp + ang_phipphj_tmp(9,10,4)=0.46291004988627573078_dp + ang_phipphj_tmp(9,12,4)=0.11952286093343936400_dp + ang_phipphj_tmp(10,9,4)=0.46291004988627573078_dp + ang_phipphj_tmp(11,8,4)=0.37796447300922722721_dp + ang_phipphj_tmp(12,7,4)=0.41403933560541253068_dp + ang_phipphj_tmp(12,9,4)=0.11952286093343936400_dp + ang_phipphj_tmp(13,6,4)=-0.29277002188455995381_dp + ang_phipphj_tmp(14,5,4)=-0.11952286093343936400_dp + ang_phipphj_tmp(15,6,4)=-0.37796447300922722721_dp + ang_phipphj_tmp(16,5,4)=-0.46291004988627573078_dp +! + ang_phipphj_tmp(1,2,5)=0.28867513459481288225_dp + ang_phipphj_tmp(1,12,5)=-0.54006172486732168591_dp + ang_phipphj_tmp(2,7,5)=-0.77459666924148337704_dp + ang_phipphj_tmp(2,9,5)=-0.22360679774997896964_dp + ang_phipphj_tmp(3,6,5)=0.22360679774997896964_dp + ang_phipphj_tmp(4,5,5)=0.22360679774997896964_dp + ang_phipphj_tmp(5,4,5)=0.11180339887498948482_dp + ang_phipphj_tmp(5,14,5)=-0.47809144373375745599_dp + ang_phipphj_tmp(5,16,5)=-0.23145502494313786539_dp + ang_phipphj_tmp(6,3,5)=-0.44721359549995793928_dp + ang_phipphj_tmp(6,13,5)=-1.1710800875382398152_dp + ang_phipphj_tmp(6,15,5)=-0.18898223650461361361_dp + ang_phipphj_tmp(7,2,5)=0.25819888974716112568_dp + ang_phipphj_tmp(7,12,5)=0.44854261357253024157_dp + ang_phipphj_tmp(8,11,5)=0.18898223650461361361_dp + ang_phipphj_tmp(9,2,5)=-0.11180339887498948482_dp + ang_phipphj_tmp(9,10,5)=0.23145502494313786539_dp + ang_phipphj_tmp(9,12,5)=0.47809144373375745599_dp + ang_phipphj_tmp(10,9,5)=0.15430334996209191026_dp + ang_phipphj_tmp(11,8,5)=-0.094491118252306806804_dp + ang_phipphj_tmp(12,7,5)=-0.82807867121082506136_dp + ang_phipphj_tmp(12,9,5)=-0.23904572186687872799_dp + ang_phipphj_tmp(13,6,5)=0.58554004376911990761_dp + ang_phipphj_tmp(14,5,5)=0.23904572186687872799_dp + ang_phipphj_tmp(15,6,5)=0.094491118252306806804_dp + ang_phipphj_tmp(16,5,5)=-0.15430334996209191026_dp +! + ang_phipphj_tmp(1,2,6)=0.86602540378443864676_dp + ang_phipphj_tmp(1,12,6)=0.54006172486732168591_dp + ang_phipphj_tmp(2,9,6)=-1.1180339887498948482_dp + ang_phipphj_tmp(3,6,6)=1.1180339887498948482_dp + ang_phipphj_tmp(4,5,6)=1.1180339887498948482_dp + ang_phipphj_tmp(5,4,6)=-0.55901699437494742410_dp + ang_phipphj_tmp(5,16,6)=-1.6201851746019650577_dp + ang_phipphj_tmp(6,15,6)=-1.3228756555322952953_dp + ang_phipphj_tmp(7,12,6)=1.2076147288491198811_dp + ang_phipphj_tmp(8,11,6)=1.3228756555322952953_dp + ang_phipphj_tmp(9,2,6)=0.55901699437494742410_dp + ang_phipphj_tmp(9,10,6)=1.6201851746019650577_dp + ang_phipphj_tmp(10,9,6)=-1.0801234497346433718_dp + ang_phipphj_tmp(11,8,6)=-0.66143782776614764763_dp + ang_phipphj_tmp(15,6,6)=0.66143782776614764763_dp + ang_phipphj_tmp(16,5,6)=1.0801234497346433718_dp +! + ang_phipphj_tmp(1,3,7)=0.57735026918962576451_dp + ang_phipphj_tmp(2,6,7)=0.44721359549995793928_dp + ang_phipphj_tmp(3,1,7)=0.57735026918962576451_dp + ang_phipphj_tmp(3,7,7)=0.51639777949432225136_dp + ang_phipphj_tmp(4,8,7)=0.44721359549995793928_dp + ang_phipphj_tmp(5,11,7)=0.37796447300922722721_dp + ang_phipphj_tmp(6,2,7)=0.44721359549995793928_dp + ang_phipphj_tmp(6,12,7)=0.47809144373375745599_dp + ang_phipphj_tmp(7,3,7)=0.51639777949432225136_dp + ang_phipphj_tmp(7,13,7)=0.50709255283710994651_dp + ang_phipphj_tmp(8,4,7)=0.44721359549995793928_dp + ang_phipphj_tmp(8,14,7)=0.47809144373375745599_dp + ang_phipphj_tmp(9,15,7)=0.37796447300922722721_dp + ang_phipphj_tmp(11,5,7)=0.37796447300922722721_dp + ang_phipphj_tmp(12,6,7)=0.47809144373375745599_dp + ang_phipphj_tmp(13,7,7)=0.50709255283710994651_dp + ang_phipphj_tmp(14,8,7)=0.47809144373375745599_dp + ang_phipphj_tmp(15,9,7)=0.37796447300922722721_dp +! + ang_phipphj_tmp(1,3,8)=1.1547005383792515290_dp + ang_phipphj_tmp(2,6,8)=1.3416407864998738178_dp + ang_phipphj_tmp(3,7,8)=1.5491933384829667541_dp + ang_phipphj_tmp(4,8,8)=1.3416407864998738178_dp + ang_phipphj_tmp(5,11,8)=1.5118578920369089089_dp + ang_phipphj_tmp(6,2,8)=-0.44721359549995793928_dp + ang_phipphj_tmp(6,12,8)=1.9123657749350298240_dp + ang_phipphj_tmp(7,3,8)=-0.51639777949432225136_dp + ang_phipphj_tmp(7,13,8)=2.0283702113484397860_dp + ang_phipphj_tmp(8,4,8)=-0.44721359549995793928_dp + ang_phipphj_tmp(8,14,8)=1.9123657749350298240_dp + ang_phipphj_tmp(9,15,8)=1.5118578920369089089_dp + ang_phipphj_tmp(11,5,8)=-0.75592894601845445443_dp + ang_phipphj_tmp(12,6,8)=-0.95618288746751491198_dp + ang_phipphj_tmp(13,7,8)=-1.0141851056742198930_dp + ang_phipphj_tmp(14,8,8)=-0.95618288746751491198_dp + ang_phipphj_tmp(15,9,8)=-0.75592894601845445443_dp + + ang_phipphj(:,:,:)=ang_phipphj_tmp(1:mpsang**2,1:mpsang**2,:) + + end subroutine setnabla_ylm +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_sphharm/gaunt +!! NAME +!! gaunt +!! +!! FUNCTION +!! Returns gaunt coefficient, i.e. +!! the integral of Sqrt[4 \pi] Y*(l_i,m_i) Y*(ll,mm) Y(l_j,m_j) +!! See the 3-j and 6-j symbols by Rotenberg, etc., (Technology Press, 1959), pg.5. +!! +!! INPUTS +!! ll,mm,l1,l2,m1,m2= six quantum numbers defining the Gaunt coef. +!! +!! OUTPUT +!! gaunt(ll,mm,l1,l2,m1,m2)=the value of the integral +!! +!! SOURCE + +function gaunt(ll,mm,l1,m1,l2,m2) + +!Arguments --------------------------------------------- +!scalars + integer,intent(in) :: l1,l2,ll,m1,m2,mm + real(dp) :: gaunt + +!Local variables ------------------------------ +!scalars + integer :: i1,i2,j1,j1half,j2,j2half,j3,j3half,j_half,jj,k1,k2,n1,n2 + real(dp) :: argument,sign,sum,xx,yy + logical :: ok + +!************************************************************************ + + gaunt=zero;sum=zero;ok =.true. + + if((-m1-mm+m2) /= 0) ok = .false. + if(abs(m1) > l1) ok = .false. + if(abs(mm) > ll) ok = .false. + if(abs(m2) > l2) ok = .false. + + jj = l1 + ll + l2 + if (mod(jj,2)/=0) ok = .false. + j1 = jj-2*l2 + j2 = jj-2*ll + j3 = jj-2*l1 + + if (j1<0 .or. j2<0 .or. j3<0) ok = .false. + + if (ok) then + + xx = (2 * l1 + 1) * (2 * ll + 1) * (2 * l2 + 1) + + j1half = j1/2 + j2half = j2/2 + j3half = j3/2 + j_half = jj/2 + + gaunt = (-1)**j1half * sqrt(xx) + gaunt = gaunt * rfactorial(j2)*rfactorial(j3)/rfactorial(jj+1) + gaunt = gaunt * rfactorial(j_half)/(rfactorial(j1half)& +& * rfactorial(j2half)*rfactorial(j3half)) + + yy = rfactorial(l2 + m2) * rfactorial(l2 - m2) + + if (mm>=0) then + yy = yy * perms(ll+mm,2*mm) + else + yy = yy / perms(ll-mm,-2*mm) + end if + + if (m1>=0) then + yy = yy / perms(l1+m1,2*m1) + else + yy = yy * perms(l1-m1,-2*m1) + end if + + gaunt = gaunt * sqrt(yy) + + i1 = l2 - ll - m1 + i2 = l2 - l1 + mm + k1 = -min(0, i1, i2) + n1 = l1 + m1 + n2 = ll - mm + k2 = min(j1, n1, n2) + + sign = 1._dp + if(k1>0) sign = (-1._dp)**k1 + + argument = sign * perms(n1,k1)/rfactorial(k1) + argument = argument * perms(n2,k1)/rfactorial(i1 + k1) + argument = argument * perms(j1,k1)/rfactorial(i2 + k1) + sum = sum + argument + + sign = -sign + k1 = k1 + 1 + do while(k1 <= k2) + argument = sign * perms(n1, k1)/rfactorial(k1) + argument = argument * perms(n2, k1)/rfactorial(i1 + k1) + argument = argument * perms(j1, k1)/rfactorial(i2 + k1) + sum = sum + argument + sign = -sign + k1 = k1 + 1 + end do + + end if + + gaunt = gaunt * sum + + end function gaunt +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawsphharm/realgaunt +!! NAME +!! realgaunt +!! +!! FUNCTION +!! This routine compute "real Gaunt coefficients", i.e. gaunt +!! coefficients according to "real spherical harmonics" +!! RealGaunt(ilm,ilm_i,ilm_j) = Int[ S_lm Slm_i Slm_j] +!! +!! INPUTS +!! l_max= max. value of ang. momentum l+1; Gaunt coeffs up to +!! [(2*l_max-1,m),(l_max,m),(l_max,m)] are computed +!! +!! OUTPUT +!! gntselect((2*l_max-1)**2,l_max**2*(l_max**2+1)/2)= +!! selection rules for Gaunt coefficients +!! if Gaunt coeff. is zero, gntselect=0 +!! if Gaunt coeff. is non-zero, gntselect is the index of +!! the coeff. in realgnt(:) array +!! ngnt= number of non-zero Gaunt coefficients +!! realgnt((2*l_max-1)**2*l_max**4)= non-zero real Gaunt coefficients +!! +!! NOTE +!! Second index of gntselect is in "upper triangle" format. +!! Its formula is klm_ij = ilm_i*(ilm_i-1)/2 + ilm_j, +!! corresponding to the two index pairs: (ilm_i,ilm_j) and (ilm_j,ilmj) +!! +!! SOURCE + +subroutine realgaunt(l_max,ngnt,gntselect,realgnt) + +!Arguments --------------------------------------------- +!scalars + integer,intent(in) :: l_max + integer,intent(out) :: ngnt +!arrays + integer,intent(out) :: gntselect(:,:) + real(dp),intent(out) :: realgnt(:) + +!Local variables ------------------------------ +!scalars + integer :: ilm1,ilm2,ilmp1,k0lm1,klm1,l1,l2,ll,lp1,m1,m2,mm,mm1,mm2,mm3,mp1 + real(dp) :: c11,c12,c21,c22,c31,c32,fact,realgnt_tmp + character(len=500) :: msg +!arrays + integer,allocatable :: ssgn(:) + type(coeff3_type), allocatable :: coeff(:) + +!************************************************************************ + + if ( size(gntselect)<(2*l_max-1)**2*(l_max**2*(l_max**2+1))/2 .or. & +& size(realgnt) <(2*l_max-1)**2*(l_max**2*(l_max**2+1))/2 ) then + msg='Too small sizes for gntselect/realgnt!' + LIBPAW_BUG(msg) + end if + +!Initialize output arrays with zeros. + gntselect = 0; realgnt = zero + +!Compute matrix cc where Sl=cc*Yl (Sl=real sph. harm.) +!------------------------------------------------ + LIBPAW_DATATYPE_ALLOCATE(coeff,(4*l_max-3)) + do ll=1,4*l_max-3 + LIBPAW_ALLOCATE(coeff(ll)%value,(2,2*ll-1,2*ll-1)) + coeff(ll)%value(:,:,:)=zero + coeff(ll)%value(1,ll,ll)=one + do mm=1,ll-1 + coeff(ll)%value(1,ll+mm,ll+mm)= (-1._dp)**mm/sqrt(2._dp) + coeff(ll)%value(1,ll-mm,ll+mm)= ( 1._dp) /sqrt(2._dp) + coeff(ll)%value(2,ll+mm,ll-mm)=-(-1._dp)**mm/sqrt(2._dp) + coeff(ll)%value(2,ll-mm,ll-mm)= ( 1._dp) /sqrt(2._dp) + end do + end do + + LIBPAW_ALLOCATE(ssgn,(l_max**2)) + ssgn(:)=1 + if (l_max>0) then + do l1=1,l_max-1 + ilm1=1+l1**2+l1 + do m1=-l1,-1 + ssgn(ilm1+m1)=-1 + end do + end do + end if + + ngnt=0 + +!Loop on (lp1,mp1) +!------------------------------------------------ + do lp1=0,l_max-1 + do mp1=-lp1,lp1 + ilmp1=1+lp1**2+lp1+mp1 + k0lm1=ilmp1*(ilmp1-1)/2 + +! Loop on (l1,m1)<=(lp1,mp1) +! ------------------------------------------------ + do l1=0,l_max-1 + do m1=-l1,l1 + ilm1=1+l1**2+l1+m1 + + if (ilm1<=ilmp1) then + + klm1=k0lm1+ilm1 + gntselect(:,klm1)=0 + +! Loop on (l2,m2) +! ------------------------------------------------ + do l2=abs(l1-lp1),l1+lp1,2 + do m2=-l2,l2 + ilm2=1+l2**2+l2+m2 + +! Real Gaunt coeffs selection rules +! ------------------------------------------------ + if ((l2<=l1+lp1).and.& +& (((m1== mp1).and.((m2==0).or.(m2==2*abs(mp1)))).or.& +& ((m1==-mp1).and.(m2==-abs(m1)-abs(mp1))).or.& +& ((abs(m1)/=(abs(mp1)).and.& +& ((m2==ssgn(ilm1)*ssgn(ilmp1)* (abs(m1)+abs(mp1))).or.& +& (m2==ssgn(ilm1)*ssgn(ilmp1)*abs(abs(m1)-abs(mp1)))& + ))))) then + +! Compute selected real Gaunt coefficient +! ------------------------------------------------ + realgnt_tmp=zero + do mm1=-l1,l1 + c11=coeff(l1+1)%value(1,l1+mm1+1,l1+m1+1) + c12=coeff(l1+1)%value(2,l1+mm1+1,l1+m1+1) + do mm2= -lp1,lp1 + c21=coeff(lp1+1)%value(1,lp1+mm2+1,lp1+mp1+1) + c22=coeff(lp1+1)%value(2,lp1+mm2+1,lp1+mp1+1) + do mm3= -l2,l2 + c31=coeff(l2+1)%value(1,l2+mm3+1,l2+m2+1) + c32=coeff(l2+1)%value(2,l2+mm3+1,l2+m2+1) + fact=c11*c21*c31 - c12*c22*c31& +& -c11*c22*c32 - c12*c21*c32 + if((abs(fact)>=tol12).and.(mm3==-mm2-mm1)) & +& realgnt_tmp=realgnt_tmp+fact*(-1)**mm2 & +& *gaunt(l2,mm3,l1,mm1,lp1,-mm2) + end do + end do + end do + +! Count additional non-zero real Gaunt coeffs +! ------------------------------------------------ + if (abs(realgnt_tmp)>=tol12) then + ngnt=ngnt+1 + gntselect(ilm2,klm1)=ngnt + realgnt(ngnt)=realgnt_tmp/sqrt(four_pi) + end if + +! End loops +! ------------------------------------------------ + end if + end do + end do + end if + end do + end do + end do + end do + +!Deallocate memory +!------------------------------------------------ + do ll=1,4*l_max-3 + LIBPAW_DEALLOCATE(coeff(ll)%value) + end do + LIBPAW_DATATYPE_DEALLOCATE(coeff) + LIBPAW_DEALLOCATE(ssgn) + +end subroutine realgaunt +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_sphharm/nablarealgaunt +!! NAME +!! nablarealgaunt +!! +!! FUNCTION +!! Evaluate integrals involving spherical harmonics and their gradient. +!! These integrals are angular part for and +!! Nabla_RealGaunt(ilm,ilm_i,ilm_j) = Int[ Slm Grad(Slm_i).Grad(Slm_j)] +!! +!! INPUTS +!! l_max = 1 + max. l value for Slm (see description above) +!! l_max_ij = 1 + max. l value for Slm_i and Slm_j (see description above) +!! +!! OUTPUT +!! nnablagnt= number of non-zero integrals +!! nabgauntselect(l_max**2,l_max_ij**2,l_max_ij**2)= indexes of the non-zero integrals +!! nablagaunt(l_max**2*l_max_ij**4)= values of the integrals +!! +!! SOURCE + +subroutine nablarealgaunt(l_max,l_max_ij,nnablagnt,nabgauntselect,nablagaunt) + +!Arguments --------------------------------------------- +!scalars + integer, intent(in) :: l_max,l_max_ij + integer, intent(out) :: nnablagnt +!array + integer,intent(out) :: nabgauntselect(:,:,:) + real(dp),intent(out) :: nablagaunt(:) + +!Local variables --------------------------------------- + logical,parameter :: debug=.false. + integer :: angl_size,ii,ilm,ilm_i,ilm_j,ipt,mpsang,ntheta,nphi,ylm_size + real(dp) :: nabla_rg, yylmgr + character(len=500) :: msg + real(dp),allocatable :: ang_wgth(:),cart_coord(:,:),ylmr(:,:),ylmrgr(:,:,:) + +!************************************************************************ + + if ( size(nabgauntselect)< (l_max**2)*(l_max_ij**4) .or. & +& size(nablagaunt) < (l_max**2)*(l_max_ij**4) ) then + msg='Too small sizes for nabgauntselect/nablagaunt!' + LIBPAW_BUG(msg) + end if + + nabgauntselect(:,:,:)=-1 + nablagaunt(:)=zero + + ii=0 + if (l_max>1) then + if (l_max_ij>=1) then + ii=ii+1 ; nabgauntselect(1,2,2)=ii ; nablagaunt(ii)=0.5641895835477563_dp !(1/sqrt(pi)) + ii=ii+1 ; nabgauntselect(1,3,3)=ii ; nablagaunt(ii)=0.5641895835477563_dp !(1/sqrt(pi)) + ii=ii+1 ; nabgauntselect(1,4,4)=ii ; nablagaunt(ii)=0.5641895835477563_dp !(1/sqrt(pi)) + end if + if (l_max_ij>2) then + ii=ii+1 ; nabgauntselect(1,5,5)=ii ; nablagaunt(ii)=1.692568750643269_dp !\frac{3}{\sqrt{\pi}} + ii=ii+1 ; nabgauntselect(1,6,6)=ii ; nablagaunt(ii)=1.692568750643269_dp !\dfrac{3}{\sqrt{\pi}} + ii=ii+1 ; nabgauntselect(1,7,7)=ii ; nablagaunt(ii)=1.692568750643269_dp !\frac{3}{\sqrt{\pi}} + ii=ii+1 ; nabgauntselect(1,8,8)=ii ; nablagaunt(ii)=1.692568750643269_dp !\frac{3}{\sqrt{\pi}} + ii=ii+1 ; nabgauntselect(1,9,9)=ii ; nablagaunt(ii)=1.692568750643269_dp !\frac{3}{\sqrt{\pi}} + ii=ii+1 ; nabgauntselect(2,2,7)=ii ; nablagaunt(ii)=-0.37846987830302403_dp !\frac{-3}{2\sqrt{5\pi}} + ii=ii+1 ; nabgauntselect(2,2,9)=ii ; nablagaunt(ii)=-0.6555290583552474_dp !\frac{-1.5\sqrt{3}}{\sqrt{5\pi}} + ii=ii+1 ; nabgauntselect(2,3,6)=ii ; nablagaunt(ii)=0.6555290583552474_dp !\frac{1.5\sqrt{3}}{\sqrt{5\pi}} + ii=ii+1 ; nabgauntselect(2,4,5)=ii ; nablagaunt(ii)=0.6555290583552474_dp !\frac{1.5\sqrt{3}}{\sqrt{5\pi}} + ii=ii+1 ; nabgauntselect(2,5,4)=ii ; nablagaunt(ii)=0.6555290583552474_dp !\frac{1.5\sqrt{3}}{\sqrt{5\pi}} + ii=ii+1 ; nabgauntselect(2,6,3)=ii ; nablagaunt(ii)=0.6555290583552474_dp !\frac{1.5\sqrt{3}}{\sqrt{5\pi}} + ii=ii+1 ; nabgauntselect(2,7,2)=ii ; nablagaunt(ii)=-0.37846987830302403_dp!\frac{-3}{2\sqrt{5\pi}} + ii=ii+1 ; nabgauntselect(2,9,2)=ii ; nablagaunt(ii)=-0.6555290583552474_dp !\frac{3}{2}\sqrt{\frac{3}{5\pi}} + ii=ii+1 ; nabgauntselect(3,2,6)=ii ; nablagaunt(ii)=0.6555290583552474_dp !\frac{1.5\sqrt{3}}{\sqrt{5\pi}} + ii=ii+1 ; nabgauntselect(3,3,7)=ii ; nablagaunt(ii)=0.75693974607408354_dp !\frac{3}{\sqrt{5\pi} + ii=ii+1 ; nabgauntselect(3,4,8)=ii ; nablagaunt(ii)=0.6555290583552474_dp !\frac{1.5\sqrt{3}}{\sqrt{5\pi}} + ii=ii+1 ; nabgauntselect(3,6,2)=ii ; nablagaunt(ii)=0.6555290583552474_dp !\frac{1.5\sqrt{3}}{\sqrt{5\pi}} + ii=ii+1 ; nabgauntselect(3,7,3)=ii ; nablagaunt(ii)=0.7569397566060481_dp !\frac{3}{\sqrt{5\pi}} + ii=ii+1 ; nabgauntselect(3,8,4)=ii ; nablagaunt(ii)=0.6555290583552474_dp !\frac{3}{2}\sqrt{\frac{3}{5\pi}} + ii=ii+1 ; nabgauntselect(4,2,5)=ii ; nablagaunt(ii)=0.6555290583552474_dp !\frac{1.5\sqrt{3}}{\sqrt{5\pi}} + ii=ii+1 ; nabgauntselect(4,3,8)=ii ; nablagaunt(ii)=0.6555290583552474_dp !\frac{1.5\sqrt{3}}{\sqrt{5\pi}} + ii=ii+1 ; nabgauntselect(4,4,7)=ii ; nablagaunt(ii)=-0.37846987830302403_dp !\frac{-3}{2\sqrt{5\pi}} + ii=ii+1 ; nabgauntselect(4,4,9)=ii ; nablagaunt(ii)=0.6555290583552474_dp !\frac{1.5\sqrt{3}}{\sqrt{5\pi}} + ii=ii+1 ; nabgauntselect(4,5,2)=ii ; nablagaunt(ii)=0.6555290583552474_dp !\frac{1.5\sqrt{3}}{\sqrt{5\pi}} + ii=ii+1 ; nabgauntselect(4,7,4)=ii ; nablagaunt(ii)=-0.37846987830302403_dp!\frac{-3}{2\sqrt{5\pi}} + ii=ii+1 ; nabgauntselect(4,8,3)=ii ; nablagaunt(ii)=0.6555290583552474_dp !\frac{3}{2}\sqrt{\frac{3}{5\pi}} + ii=ii+1 ; nabgauntselect(4,9,4)=ii ; nablagaunt(ii)=0.6555290583552474_dp !\frac{3}{2}\sqrt{\frac{3}{5\pi}} + end if + end if + + if (l_max>2) then + if (l_max_ij>1) then + ii=ii+1 ; nabgauntselect(5,2,4)=ii ; nablagaunt(ii)=-0.2185096861184158_dp !-\frac{0.5\sqrt{3}}{\sqrt{5\pi}} + ii=ii+1 ; nabgauntselect(5,4,2)=ii ; nablagaunt(ii)=-0.2185096861184158_dp !-\frac{0.5\sqrt{3}}{\sqrt{5\pi}} + ii=ii+1 ; nabgauntselect(6,2,3)=ii ; nablagaunt(ii)=-0.2185096861184158_dp !-\frac{0.5\sqrt{3}}{\sqrt{5\pi}} + ii=ii+1 ; nabgauntselect(6,3,2)=ii ; nablagaunt(ii)=-0.2185096861184158_dp !-\frac{0.5\sqrt{3}}{\sqrt{5\pi}} + ii=ii+1 ; nabgauntselect(7,2,2)=ii ; nablagaunt(ii)=0.126156626101008_dp !\frac{1}{2\sqrt{5\pi}} + ii=ii+1 ; nabgauntselect(7,3,3)=ii ; nablagaunt(ii)=-0.252313252202016_dp !-\frac{1}{\sqrt{5\pi}} + ii=ii+1 ; nabgauntselect(7,4,4)=ii ; nablagaunt(ii)=0.126156626101008_dp !\frac{1}{2\sqrt{5\pi}} + ii=ii+1 ; nabgauntselect(8,3,4)=ii ; nablagaunt(ii)=-0.2185096861184158_dp !-\frac{0.5\sqrt{3}}{\sqrt{5\pi}} + ii=ii+1 ; nabgauntselect(8,4,3)=ii ; nablagaunt(ii)=-0.2185096861184158_dp !-\frac{0.5\sqrt{3}}{\sqrt{5\pi}} + ii=ii+1 ; nabgauntselect(9,2,2)=ii ; nablagaunt(ii)=0.2185096861184158_dp !\frac{0.5\sqrt{3}}{\sqrt{5\pi}} + ii=ii+1 ; nabgauntselect(9,4,4)=ii ; nablagaunt(ii)=-0.2185096861184158_dp !-\frac{0.5\sqrt{3}}{\sqrt{5\pi}} + end if + if (l_max_ij>2) then + ii=ii+1 ; nabgauntselect(5,5,7)=ii ; nablagaunt(ii)=-0.5406712547186058_dp !-\frac{3}{7}\sqrt{\frac{5}{\pi}} + ii=ii+1 ; nabgauntselect(5,6,8)=ii ; nablagaunt(ii)=0.4682350416823196_dp !\frac{3}{14}\sqrt{\frac{15}{\pi}} + ii=ii+1 ; nabgauntselect(5,7,5)=ii ; nablagaunt(ii)=-0.5406712547186058_dp !-\frac{3}{7}\sqrt{\frac{5}{\pi}} + ii=ii+1 ; nabgauntselect(5,8,6)=ii ; nablagaunt(ii)=0.4682350416823196_dp !\frac{3}{14}\sqrt{\frac{15}{\pi}} + ii=ii+1 ; nabgauntselect(6,5,8)=ii ; nablagaunt(ii)=0.4682350416823196_dp !\frac{3}{14}\sqrt{\frac{15}{\pi}} + ii=ii+1 ; nabgauntselect(6,6,7)=ii ; nablagaunt(ii)=0.2703356273593029_dp !\frac{3}{14}\sqrt{\frac{5}{\pi}} + ii=ii+1 ; nabgauntselect(6,6,9)=ii ; nablagaunt(ii)=-0.4682350416823196_dp !-\frac{3}{14}\sqrt{\frac{15}{\pi}} + ii=ii+1 ; nabgauntselect(6,7,6)=ii ; nablagaunt(ii)=0.2703356273593029_dp !\frac{3}{14}\sqrt{\frac{5}{\pi}} + ii=ii+1 ; nabgauntselect(6,8,5)=ii ; nablagaunt(ii)=0.4682350416823196_dp !\frac{3}{14}\sqrt{\frac{15}{\pi}} + ii=ii+1 ; nabgauntselect(6,9,6)=ii ; nablagaunt(ii)=-0.4682350416823196_dp !-\frac{3}{14}\sqrt{\frac{15}{\pi}} + ii=ii+1 ; nabgauntselect(7,5,5)=ii ; nablagaunt(ii)=-0.5406712547186058_dp !-\frac{3}{7}\sqrt{\frac{5}{\pi}} + ii=ii+1 ; nabgauntselect(7,6,6)=ii ; nablagaunt(ii)=0.2703356273593029_dp !\frac{3}{14}\sqrt{\frac{5}{\pi}} + ii=ii+1 ; nabgauntselect(7,7,7)=ii ; nablagaunt(ii)=0.5406712547186058_dp !\frac{3}{7}\sqrt{\frac{5}{\pi}} + ii=ii+1 ; nabgauntselect(7,8,8)=ii ; nablagaunt(ii)=0.2703356273593029_dp !\frac{3}{14}\sqrt{\frac{5}{\pi}} + ii=ii+1 ; nabgauntselect(7,9,9)=ii ; nablagaunt(ii)=-0.5406712547186058_dp !-\frac{3}{7}\sqrt{\frac{5}{\pi}} + ii=ii+1 ; nabgauntselect(8,5,6)=ii ; nablagaunt(ii)=0.4682350416823196_dp !\frac{3}{14}\sqrt{\frac{15}{\pi}} + ii=ii+1 ; nabgauntselect(8,6,5)=ii ; nablagaunt(ii)=0.4682350416823196_dp !\frac{3}{14}\sqrt{\frac{15}{\pi}} + ii=ii+1 ; nabgauntselect(8,7,8)=ii ; nablagaunt(ii)=0.2703356273593029_dp !\frac{3}{14}\sqrt{\frac{5}{\pi}} + ii=ii+1 ; nabgauntselect(8,8,7)=ii ; nablagaunt(ii)=0.2703356273593029_dp !\frac{3}{14}\sqrt{\frac{5}{\pi}} + ii=ii+1 ; nabgauntselect(8,8,9)=ii ; nablagaunt(ii)=0.4682350416823196_dp !\frac{3}{14}\sqrt{\frac{15}{\pi}} + ii=ii+1 ; nabgauntselect(8,9,8)=ii ; nablagaunt(ii)=0.4682350416823196_dp !\frac{3}{14}\sqrt{\frac{15}{\pi}} + ii=ii+1 ; nabgauntselect(9,6,6)=ii ; nablagaunt(ii)=-0.4682350416823196_dp !\frac{3}{14}\sqrt{\frac{15}{\pi}} + ii=ii+1 ; nabgauntselect(9,7,9)=ii ; nablagaunt(ii)=-0.5406712547186058_dp !-\frac{3}{7}\sqrt{\frac{5}{\pi}} + ii=ii+1 ; nabgauntselect(9,8,8)=ii ; nablagaunt(ii)=0.4682350416823196_dp !\frac{3}{14}\sqrt{\frac{15}{\pi}} + ii=ii+1 ; nabgauntselect(9,9,7)=ii ; nablagaunt(ii)=-0.5406712547186058_dp !-\frac{3}{7}\sqrt{\frac{5}{\pi}} + end if + end if + + nnablagnt=ii + +!If not tabulated, compute the integrals + if (l_max>3.or.l_max_ij>3) then + + ntheta=25 ; nphi=25 + call ylm_angular_mesh(ntheta,nphi,angl_size,cart_coord,ang_wgth) + + mpsang=1+max(l_max,l_max_ij) + ylm_size=mpsang**2 + LIBPAW_ALLOCATE(ylmr,(ylm_size,angl_size)) + LIBPAW_ALLOCATE(ylmrgr,(3,ylm_size,angl_size)) + call initylmr(mpsang,0,angl_size,ang_wgth,2,cart_coord,ylmr,ylmr_gr=ylmrgr) + + if (debug) open(unit=111,file='nablarealgaunt.dat',form='formatted') + + do ilm=1,l_max**2 + do ilm_i=1,l_max_ij**2 + do ilm_j=1,l_max_ij**2 + + if (ilm<10.and.ilm_i<10.and.ilm_j<10) cycle ! Already stored (tabulated) + + ! Compute integral + nabla_rg=zero + do ipt=1,angl_size + yylmgr=ylmrgr(1,ilm_i,ipt)*ylmrgr(1,ilm_j,ipt) & +& +ylmrgr(2,ilm_i,ipt)*ylmrgr(2,ilm_j,ipt) & +& +ylmrgr(3,ilm_i,ipt)*ylmrgr(3,ilm_j,ipt) + nabla_rg=nabla_rg+ang_wgth(ipt)*ylmr(ilm,ipt)*yylmgr + end do + nabla_rg=four_pi*nabla_rg + + ! Store it if non-zero + if (abs(nabla_rg)>tol12) then + if (debug) then + write(111,'(5x,a,i2,a,i2,a,i2,a,f19.15,a)') & +& "ii=ii+1 ; nabgauntselect(",ilm,",",ilm_i,",",ilm_j, & +& ")=ii ; nablagaunt(ii)=",nabla_rg,"_dp" + end if + nnablagnt=nnablagnt+1 + nabgauntselect(ilm,ilm_i,ilm_j)=nnablagnt + nablagaunt(nnablagnt)=nabla_rg + end if + + end do ! ilm_j + end do ! ilm_i + end do !ilm + + if (debug) close(111) + LIBPAW_DEALLOCATE(ylmr) + LIBPAW_DEALLOCATE(ylmrgr) + LIBPAW_DEALLOCATE(cart_coord) + LIBPAW_DEALLOCATE(ang_wgth) + end if + +end subroutine nablarealgaunt +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_sphharm/create_slm2ylm +!! NAME +!! create_slm2ylm +!! +!! FUNCTION +!! For a given angular momentum lcor, compute slm2ylm. +!! +!! INPUTS +!! lcor= angular momentum, size of the matrix is 2(2*lcor+1) +!! +!! OUTPUT +!! slm2ylm(2lcor+1,2lcor+1) = rotation matrix. +!! +!! NOTES +!! useful only in ndij==4 +!! +!! SOURCE + +subroutine create_slm2ylm(lcor,slmtwoylm) + +!Arguments --------------------------------------------- +!scalars + integer,intent(in) :: lcor +!arrays + complex(dpc),intent(out) :: slmtwoylm(2*lcor+1,2*lcor+1) + +!Local variables --------------------------------------- +!scalars + integer :: jm,ll,mm,im + real(dp),parameter :: invsqrt2=one/sqrt2 + real(dp) :: onem +!arrays + +! ********************************************************************* + + ll=lcor + slmtwoylm=czero + do im=1,2*ll+1 + mm=im-ll-1;jm=-mm+ll+1 + onem=dble((-1)**mm) + if (mm> 0) then + slmtwoylm(im,im)= cmplx(onem*invsqrt2,zero,kind=dp) + slmtwoylm(jm,im)= cmplx(invsqrt2, zero,kind=dp) + end if + if (mm==0) then + slmtwoylm(im,im)=cone + end if + if (mm< 0) then + slmtwoylm(im,im)= cmplx(zero, invsqrt2,kind=dp) + slmtwoylm(jm,im)=-cmplx(zero,onem*invsqrt2,kind=dp) + end if + end do + +end subroutine create_slm2ylm +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_sphharm/create_mlms2jmj +!! NAME +!! create_mlms2jmj +!! +!! FUNCTION +!! For a given angular momentum lcor, give the rotation matrix msml2jmj +!! +!! INPUTS +!! lcor= angular momentum +!! +!! SIDE EFFECTS +!! mlms2jmj= rotation matrix +!! +!! SOURCE + +subroutine create_mlms2jmj(lcor,mlmstwojmj) + +!Arguments --------------------------------------------- +!scalars + integer,intent(in) :: lcor +!arrays + complex(dpc),intent(out) :: mlmstwojmj(2*(2*lcor+1),2*(2*lcor+1)) + +!Local variables --------------------------------------- +!scalars + integer :: jc1,jj,jm,ll,ml1,ms1 + real(dp) :: invsqrt2lp1,xj,xmj + character(len=500) :: msg +!arrays + integer, allocatable :: ind_msml(:,:) + complex(dpc),allocatable :: mat_mlms2(:,:) + +!********************************************************************* + +!--------------- Built indices + allocations + ll=lcor + mlmstwojmj=czero + LIBPAW_BOUND2_ALLOCATE(ind_msml,BOUNDS(1,2),BOUNDS(-ll,ll)) + LIBPAW_ALLOCATE(mat_mlms2,(2*(2*lcor+1),2*(2*lcor+1))) + mlmstwojmj=czero + jc1=0 + do ms1=1,2 + do ml1=-ll,ll + jc1=jc1+1 + ind_msml(ms1,ml1)=jc1 + end do + end do + +!--------------- built mlmstwojmj +!do jj=ll,ll+1 ! the physical value of j are ll-0.5,ll+0.5 +!xj(jj)=jj-0.5 + if(ll==0)then + msg=' ll should not be equal to zero !' + LIBPAW_BUG(msg) + end if + jc1=0 + invsqrt2lp1=one/sqrt(float(2*lcor+1)) + do jj=ll,ll+1 + xj=float(jj)-half + do jm=-jj,jj-1 + xmj=float(jm)+half + jc1=jc1+1 + if(nint(xj+0.5)==ll+1) then + if(nint(xmj+0.5)==ll+1) then + mlmstwojmj(ind_msml(2,ll),jc1)=1.0 ! J=L+0.5 and m_J=L+0.5 + else if(nint(xmj-0.5)==-ll-1) then + mlmstwojmj(ind_msml(1,-ll),jc1)=1.0 ! J=L+0.5 and m_J=-L-0.5 + else + mlmstwojmj(ind_msml(2,nint(xmj-0.5)),jc1)=invsqrt2lp1*(sqrt(float(ll)+xmj+0.5)) + mlmstwojmj(ind_msml(1,nint(xmj+0.5)),jc1)=invsqrt2lp1*(sqrt(float(ll)-xmj+0.5)) + end if + end if + if(nint(xj+0.5)==ll) then + mlmstwojmj(ind_msml(1,nint(xmj+0.5)),jc1)=invsqrt2lp1*(sqrt(float(ll)+xmj+0.5)) + mlmstwojmj(ind_msml(2,nint(xmj-0.5)),jc1)=-invsqrt2lp1*(sqrt(float(ll)-xmj+0.5)) + end if + end do + end do + + LIBPAW_DEALLOCATE(ind_msml) + LIBPAW_DEALLOCATE(mat_mlms2) + +end subroutine create_mlms2jmj +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_sphharm/mkeuler +!! NAME +!! mkeuler +!! +!! FUNCTION +!! Private function +!! For a given symmetry operation, determines the corresponding Euler angles +!! +!! INPUTS +!! rot(3,3)= symmetry matrix +!! +!! OUTPUT +!! cosalp= cos(alpha) with alpha=Euler angle 1 +!! cosbeta= cos(beta) with beta =Euler angle 2 +!! cosgam= cos(gamma) with gamma=Euler angle 3 +!! isn= error code (0 if the routine exit normally) +!! sinalp= sin(alpha) with alpha=Euler angle 1 +!! sinbeta= sin(beta) with beta=Euler angle 2 +!! singam= sin(gamma) with gamma=Euler angle 3 +!! +!! NOTES +!! This file comes from the file crystal_symmetry.f +!! by N.A.W. Holzwarth and A. Tackett for the code pwpaw +!! XG20200718 However, this routine was not accurate in the determination +!! of beta when cosbeta was close to one (indeed this is a special case). +!! This has been corrected. Moreover, sinbeta has been made an output in order +!! to allow accurate calculations in dbeta. Also, tolerances have been made consistent. +!! +!! SOURCE + +subroutine mkeuler(rot,cosbeta,sinbeta,cosalp,sinalp,cosgam,singam,isn) + +!Arguments --------------------------------------------- +!scalars + integer,intent(out) :: isn + real(dp),intent(out) :: cosalp,cosbeta,cosgam,sinalp,sinbeta,singam +!arrays + real(dp),intent(in) :: rot(3,3) + +!Local variables --------------------------------------- +!scalars + integer :: ier + real(dp) :: check,sinbeta2 + character(len=500) :: msg + +! ********************************************************************* + + do isn= -1,1,2 + +!Old coding, inaccurate +! cosbeta=real(isn)*rot(3,3) +! if(abs(1._dp-cosbeta*cosbeta)tol8) ier=ier+1 + check=sinalp*cosbeta*cosgam+cosalp*singam + if (abs(check-isn*rot(1,2))>tol8) ier=ier+1 + check=-sinbeta*cosgam + if (abs(check-isn*rot(1,3))>tol8) ier=ier+1 + check=-cosalp*cosbeta*singam-sinalp*cosgam + if (abs(check-isn*rot(2,1))>tol8) ier=ier+1 + check=-sinalp*cosbeta*singam+cosalp*cosgam + if (abs(check-isn*rot(2,2))>tol8) ier=ier+1 + check=sinbeta*singam + if (abs(check-isn*rot(2,3))>tol8) ier=ier+1 + check=cosalp*sinbeta + if (abs(check-isn*rot(3,1))>tol8) ier=ier+1 + check=sinalp*sinbeta + if (abs(check-isn*rot(3,2))>tol8) ier=ier+1 + if (ier.eq.0) return + end do + + isn=0 + write(msg, '(7a)' )& +& 'Error during determination of symetries!',ch10,& +& 'Action: check your input file:',ch10,& +& 'unit cell vectors and/or atoms positions',ch10,& +& 'have to be given with a better precision.' + LIBPAW_ERROR(msg) + +end subroutine mkeuler +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_sphharm/phim +!! NAME +!! phim +!! +!! FUNCTION +!! Computes Phi_m[theta]=Sqrt[2] cos[m theta], if m>0 +!! Sqrt[2] sin[Abs(m) theta], if m<0 +!! 1 , if m=0 +!! +!! INPUTS +!! costeta= cos(theta) (theta= input angle) +!! mm = index m +!! sinteta= sin(theta) (theta= input angle) +!! +!! OUTPUT +!! phim= Phi_m(theta) (see above) +!! +!! NOTES +!! - This file comes from the file crystal_symmetry.f +!! by N.A.W. Holzwarth and A. Tackett for the code pwpaw +!! +!! SOURCE + +pure function phim(costheta,sintheta,mm) + +!Arguments --------------------------------------------- +!scalars + integer,intent(in) :: mm + real(dp) :: phim + real(dp),intent(in) :: costheta,sintheta + +! ********************************************************************* + + if (mm==0) phim=one + if (mm==1) phim=sqrt2*costheta + if (mm==-1) phim=sqrt2*sintheta + if (mm==2) phim=sqrt2*(costheta*costheta-sintheta*sintheta) + if (mm==-2) phim=sqrt2*two*sintheta*costheta + if (mm==3) phim=sqrt2*& +& (costheta*(costheta*costheta-sintheta*sintheta)& +& -sintheta*two*sintheta*costheta) + if (mm==-3) phim=sqrt2*& +& (sintheta*(costheta*costheta-sintheta*sintheta)& +& +costheta*two*sintheta*costheta) + + end function phim +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_sphharm/dbeta +!! NAME +!! dbeta +!! +!! FUNCTION +!! Calculate the rotation matrix d^l_{m{\prim}m}(beta) using Eq. 4.14 of +!! M.E. Rose, Elementary Theory of Angular Momentum, +!! John Wiley & Sons, New-York, 1957 +!! +!! INPUTS +!! cosbeta= cosinus of beta (=Euler angle) +!! sinbeta= sinus of beta (=Euler angle) +!! ll= index l +!! mm= index m +!! mp= index m_prime +!! +!! OUTPUT +!! dbeta= rotation matrix +!! +!! NOTES +!! - This file comes from the file crystal_symmetry.f +!! by N.A.W. Holzwarth and A. Tackett for the code pwpaw +!! - Assume l relatively small so that factorials do not cause +!! roundoff error +!! - XG20200718 This routine was inaccurate when cosbeta was close to one or minus one. +!! This has been fixed by adding sinbeta argument obtained from mkeuler. +!! Tolerances have been adjusted as well. +!! +!! SOURCE + +function dbeta(cosbeta,sinbeta,ll,mp,mm) + +!Arguments --------------------------------------------- +!scalars + integer,intent(in) :: ll,mm,mp + real(dp) :: dbeta + real(dp),intent(in) :: cosbeta,sinbeta + +!Local variables ------------------------------ +!scalars + integer,parameter :: mxterms=200 + integer :: ii,ina,inb,inc,ml,ms + real(dp) :: arg,cosbetab2,pref,sinbetab2,sum,tt + +!************************************************************************ + dbeta=zero + +!Special cases + if (abs(cosbeta-1._dp).lt.tol10) then + if (mp.eq.mm) dbeta=1 + else if (abs(cosbeta+1._dp).lt.tol10) then + if (mp.eq.-mm) dbeta=(-1)**(ll+mm) + else +! General case + +!!!!! Old coding +!! This is inaccurate when cosbeta is close to -1 +! cosbetab2=sqrt((1+cosbeta)*0.5_dp) +!! This is inaccurate when cosbeta is close to +1 +! sinbetab2=sqrt((1-cosbeta)*0.5_dp) +!!!!! End old coding, begin new coding + if(cosbeta>-tol8)then + !If cosbeta is positive, cosbeta2 is positive with value >0.7, so one can divide by cosbetab2 + cosbetab2=sqrt((1+cosbeta)*half) + sinbetab2=sinbeta*half/cosbetab2 + else + !If cosbeta is negative, sinbeta2 is positive with value >0.7, so one can divide by sinbetab2 + sinbetab2=sqrt((1-cosbeta)*half) + cosbetab2=sinbeta*half/sinbetab2 + endif +!!!!! End of new coding + + ml=max(mp,mm) + ms=min(mp,mm) + if (ml.ne.mp) sinbetab2=-sinbetab2 + tt=-(sinbetab2/cosbetab2)**2 + pref=sqrt((rfactorial(ll-ms)*rfactorial(ll+ml))& +& /(rfactorial(ll+ms)*rfactorial(ll-ml)))& +& /rfactorial(ml-ms)*(cosbetab2**(2*ll+ms-ml))& +& *((-sinbetab2)**(ml-ms)) + sum=1._dp + arg=1._dp + ina=ml-ll + inb=-ms-ll + inc=ml-ms+1 + do ii=1,mxterms + if (ina.eq.0.or.inb.eq.0) exit + arg=(arg*ina*inb*tt)/(ii*inc) + sum=sum+arg + ina=ina+1 + inb=inb+1 + inc=inc+1 + end do + dbeta=pref*sum + end if + +end function dbeta +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_sphharm/gauleg +!! NAME +!! gauleg +!! +!! FUNCTION +!! Private function +!! Compute the coefficients (supports and weights) for Gauss-Legendre integration +!! +!! INPUTS +!! xmin=lower bound of integration +!! xmax=upper bound of integration +!! nn=order of integration +!! +!! OUTPUT +!! x(nn)=array of support points +!! weights(n)=array of integration weights +!! +!! SOURCE + + subroutine gauleg(xmin,xmax,x,weights,nn) + +!Arguments --------------------------------------------- +!scalars + integer,intent(in) :: nn + real(dp),intent(in) :: xmax,xmin +!arrays + real(dp),intent(out) :: weights(nn),x(nn) + +!Local variables ------------------------------ +!scalars + integer :: ii,jj + real(dp),parameter :: tol=1.d-13 + real(dp) :: p1,p2,p3,pi,xl,pp,xmean,z,z1 + +!************************************************************************ + + pi=4._dp*atan(1._dp) + xl=(xmax-xmin)*0.5_dp + xmean=(xmax+xmin)*0.5_dp + + do ii=1,(nn+1)/2 + z=cos(pi*(ii-0.25_dp)/(nn+0.5_dp)) + do + p1=1._dp + p2=0._dp + do jj=1,nn + p3=p2 + p2=p1 + p1=((2._dp*jj-1._dp)*z*p2-(jj-1._dp)*p3)/jj + end do + pp=nn*(p2-z*p1)/(1._dp-z**2) + z1=z + z=z1-p1/pp + if(abs(z-z1) < tol) exit + end do + x(ii)=xmean-xl*z + x(nn+1-ii)=xmean+xl*z + weights(ii)=2._dp*xl/((1._dp-z**2)*pp**2) + weights(nn+1-ii)=weights(ii) + end do + + end subroutine gauleg +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_sphharm/perms +!! NAME +!! perms +!! +!! FUNCTION +!! Private function +!! Returns N!/(N-k)! if N>=0 and N>k ; otherwise 0 is returned +!! +!! INPUTS +!! kk=number k to use +!! nn=number N to use +!! +!! OUTPUT +!! perms= n!/(n-k)! +!! +!! SOURCE + +function perms(nn,kk) + +!Arguments --------------------------------------------- +!scalars + integer,intent(in) :: kk,nn + real(dp) :: perms + +!Local variables --------------------------------------- +!scalars + integer :: ii + real(dp) :: pp + +! ********************************************************************* + + if (nn>=0.and.nn>=kk) then + pp=1._dp + do ii=nn-kk+1,nn + pp=pp*ii + end do + else + pp=0._dp + end if + + perms=pp + +end function perms +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_paw_sphharm/rfactorial +!! NAME +!! rfactorial +!! +!! FUNCTION +!! Private function +!! Calculates N! as a double precision real. +!! +!! INPUTS +!! nn=number to use +!! +!! OUTPUT +!! factorial= n! (real) +!! +!! SOURCE + +elemental function rfactorial(nn) + +!Arguments --------------------------------------------- +!scalars + integer,intent(in) :: nn + real(dp) :: rfactorial + +!Local variables --------------------------------------- +!scalars + integer :: ii + +! ********************************************************************* + + rfactorial=one + do ii=2,nn + rfactorial=rfactorial*ii + end do + +end function rfactorial +!!*** + +END MODULE m_paw_sphharm +!!*** diff --git a/GX-PAW/libpaw/src/m_paw_sphharm.o b/GX-PAW/libpaw/src/m_paw_sphharm.o new file mode 100644 index 00000000..f03dc12a Binary files /dev/null and b/GX-PAW/libpaw/src/m_paw_sphharm.o differ diff --git a/GX-PAW/libpaw/src/m_pawang.F90 b/GX-PAW/libpaw/src/m_pawang.F90 new file mode 100644 index 00000000..b3f45176 --- /dev/null +++ b/GX-PAW/libpaw/src/m_pawang.F90 @@ -0,0 +1,366 @@ +!!****m* ABINIT/m_pawang +!! NAME +!! m_pawang +!! +!! FUNCTION +!! This module contains the definition of the pawang_type structured datatype, +!! as well as related functions and methods. +!! pawang_type variables define ANGular mesh discretization of PAW augmentation +!! regions and related data. +!! +!! COPYRIGHT +!! Copyright (C) 2013-2024 ABINIT group (MT, FJ, BA) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! NOTES +!! FOR DEVELOPPERS: in order to preserve the portability of libPAW library, +!! please consult ~abinit/src/??_libpaw/libpaw-coding-rules.txt +!! +!! SOURCE + +#include "libpaw.h" + +MODULE m_pawang + + USE_DEFS + USE_MSG_HANDLING + USE_MPI_WRAPPERS + USE_MEMORY_PROFILING + + use m_paw_sphharm, only : initylmr, ylm_angular_mesh, mat_mlms2jmj, mat_slm2ylm, & +& lsylm, realgaunt, nablarealgaunt + + implicit none + + private + +!Public procedures. + public :: pawang_init ! Constructor + public :: pawang_free ! Free memory + +!!*** + +!---------------------------------------------------------------------- + + +!!****t* m_pawang/pawang_type +!! NAME +!! pawang_type +!! +!! FUNCTION +!! For PAW: ANGular mesh discretization of PAW augmentation regions and related data. +!! +!! SOURCE + + type,public :: pawang_type + +!Integer scalars + + integer :: angl_size=0 + ! Dimension of paw angular mesh + ! angl_size=ntheta*nphi + + integer :: l_max=-1 + ! Maximum value of angular momentum l+1 + + integer :: l_size_max=-1 + ! Maximum value of angular momentum +1 + ! leading to non-zero Gaunt coefficients + ! l_size_max = 2*l_max-1 + + integer :: ngnt=0 + ! Number of non zero Gaunt coefficients + + integer :: nnablagnt=0 + ! Number of non zero Gaunt coefficient derivatives + + integer :: ntheta, nphi + ! Dimensions of paw angular mesh + + integer :: nsym + ! Number of symmetry elements in space group + + integer :: nabgnt_option=-1 + ! Option for nablarealgaunt coefficients: + ! nabgnt_option==0, nablarealgaunt coeffs are not computed (and not allocated) + ! nabgnt_option==1, nablarealgaunt coeffs are computed up to l_max + + integer :: gnt_option=-1 + ! Option for Gaunt coefficients: + ! gnt_option==0, Gaunt coeffs are not computed (and not allocated) + ! gnt_option==1, Gaunt coeffs are computed up to 2*l_size_max-1 + ! gnt_option==2, Gaunt coeffs are computed up to l_size_max + + integer :: use_ls_ylm=0 + ! Flag: use_ls_ylm=1 if pawang%ls_ylm is allocated + + integer :: ylm_size=0 + ! Size of ylmr/ylmrgr arrays + +!Integer arrays + + integer, allocatable :: gntselect(:,:) + ! gntselect(l_size_max**2,l_max**2*(l_max**2+1)/2) + ! Selection rules for Gaunt coefficients stored as (LM,ij) where ij is in packed form. + ! (if gntselect>0, Gaunt coeff. is non-zero) + + integer, allocatable :: nablagntselect(:,:,:) + ! nablagntselect(l_size_max**2,l_max**2,l_max**2) + ! Selection rules for nablaGaunt coefficients + ! (if nablagntselect>0, nablGaunt coeff. is non-zero) + +!Real (real(dp)) arrays + + real(dp), allocatable :: anginit(:,:) + ! anginit(3,angl_size) + ! For each point of the angular mesh, gives the coordinates + ! of the corresponding point on an unitary sphere + ! Not used in present version (5.3) + + real(dp), allocatable :: angwgth(:) + ! angwgth(angl_size) + ! For each point of the angular mesh, gives the weight + ! of the corresponding point on an unitary sphere + + real(dp), allocatable :: ls_ylm(:,:,:) + ! ls_ylm(2,l_max**2*(l_max**2+1)/2,2) + ! LS operator in the real spherical harmonics basis + ! ls_ylm(ilm1m2,ispin)= + + real(dp), allocatable :: nablarealgnt(:) + ! nablarealgnt(2,nnablagnt) + ! Non zero real nablaGaunt coefficients + + real(dp), allocatable :: realgnt(:) + ! realgnt(ngnt) + ! Non zero real Gaunt coefficients + + real(dp), allocatable :: ylmr(:,:) + ! ylmr(ylm_size,angl_size) + ! Real Ylm calculated in real space + + real(dp), allocatable :: ylmrgr(:,:,:) + ! ylmrgr(1:3,ylm_size,angl_size) + ! First gradients of real Ylm calculated in real space (cart. coordinates) + + real(dp), allocatable :: zarot(:,:,:,:) + ! zarot(l_size_max,l_size_max,l_max,nsym) + ! Coeffs of the transformation of real spherical + ! harmonics under the symmetry operations symrec. + + end type pawang_type +!!*** + +CONTAINS + +!=========================================================== +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawang/pawang_init +!! NAME +!! pawang_init +!! +!! FUNCTION +!! Initialize a pawang datastructure +!! +!! INPUTS +!! gnt_option=flag activated if pawang%gntselect and pawang%realgnt have to be allocated +!! also determine the size of these pointers +!! nabgnt_option=flag activated if pawang%nablagntselect and pawang%nablarealgnt have to be allocated +!! lmax=maximum value of angular momentum l +!! nphi,ntheta=dimensions of paw angular mesh +!! nsym=number of symetries +!! ngrad2_ylm=order of spherical harmonics gradients to be stored (0, 1 or 2) +!! use_angular_grid=flag activated if angular grid data have to be allocated +!! (pawang%angwgth, pawang%anginit) +!! use_ylm=flag activated if spherical harmonics have to be allocated and computed +!! (pawang%ylmr, pawang%ylmrgr) +!! use_ls_ylm=flag activated if LS operator has to be allocated and computed +!! (pawang%ls_ylm) +!! +!! OUTPUT +!! Pawang =ANGular mesh discretization and related data +!! +!! SOURCE + +subroutine pawang_init(Pawang,gnt_option,nabgnt_option,lmax,nphi,ntheta,nsym,ngrad2_ylm,& +& use_angular_grid,use_ylm,use_ls_ylm) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: gnt_option,nabgnt_option,lmax,nphi,nsym,ntheta,ngrad2_ylm + integer,intent(in) :: use_angular_grid,use_ylm,use_ls_ylm + type(Pawang_type),intent(inout) :: Pawang + +!Local variables------------------------------- +!scalars + integer :: ll,sz1,sz2 +!arrays + real(dp),allocatable :: rgnt_tmp(:) + real(dp),allocatable :: nablargnt_tmp(:) + +! ************************************************************************* + + !@Pawang_type + + Pawang%l_max=lmax+1 + Pawang%l_size_max=2*Pawang%l_max-1 + Pawang%nsym=nsym + + if (use_angular_grid==1) then + Pawang%nphi=nphi + Pawang%ntheta=ntheta + call ylm_angular_mesh(Pawang%ntheta,Pawang%nphi,Pawang%angl_size,Pawang%anginit,Pawang%angwgth) + else + Pawang%nphi=0 + Pawang%ntheta=0 + Pawang%angl_size=0 + end if + + if (use_ylm>0.and.Pawang%angl_size>0) then + ll=Pawang%l_size_max+1 + Pawang%ylm_size=ll**2 + LIBPAW_ALLOCATE(Pawang%ylmr,(Pawang%ylm_size,Pawang%angl_size)) + if (ngrad2_ylm==2) then + LIBPAW_ALLOCATE(pawang%ylmrgr,(9,Pawang%ylm_size,Pawang%angl_size)) + call initylmr(ll,0,pawang%angl_size,pawang%angwgth,3,pawang%anginit,pawang%ylmr,& +& ylmr_gr=pawang%ylmrgr) + else if (ngrad2_ylm==1) then + LIBPAW_ALLOCATE(Pawang%ylmrgr,(3,Pawang%ylm_size,Pawang%angl_size)) + call initylmr(ll,0,pawang%angl_size,pawang%angwgth,2,pawang%anginit,pawang%ylmr,& +& ylmr_gr=pawang%ylmrgr) + else + call initylmr(ll,0,pawang%angl_size,pawang%angwgth,1,pawang%anginit,pawang%ylmr) + end if + else + Pawang%ylm_size=0 + end if + + Pawang%gnt_option=gnt_option + if (Pawang%gnt_option==1.or.Pawang%gnt_option==2) then + if (Pawang%gnt_option==1) then + sz1=(Pawang%l_size_max)**2 + sz2=((Pawang%l_max**2)*(Pawang%l_max**2+1))/2 + LIBPAW_ALLOCATE(rgnt_tmp,(sz1*sz2)) + LIBPAW_ALLOCATE(pawang%gntselect,(sz1,sz2)) + call realgaunt(Pawang%l_max,Pawang%ngnt,Pawang%gntselect,rgnt_tmp) + else if (Pawang%gnt_option==2) then + sz1=(2*Pawang%l_size_max-1)**2 + sz2=((Pawang%l_size_max)**2*(Pawang%l_size_max**2+1))/2 + LIBPAW_ALLOCATE(rgnt_tmp,(sz1*sz2)) + LIBPAW_ALLOCATE(pawang%gntselect,(sz1,sz2)) + call realgaunt(Pawang%l_size_max,Pawang%ngnt,Pawang%gntselect,rgnt_tmp) + end if + if (allocated(pawang%realgnt)) then + LIBPAW_DEALLOCATE(pawang%realgnt) + end if + LIBPAW_ALLOCATE(Pawang%realgnt,(Pawang%ngnt)) + Pawang%realgnt(1:Pawang%ngnt)=rgnt_tmp(1:Pawang%ngnt) + LIBPAW_DEALLOCATE(rgnt_tmp) + end if + + Pawang%nabgnt_option=nabgnt_option + if (Pawang%nabgnt_option==1) then + sz1=(Pawang%l_size_max)**2 + sz2=(Pawang%l_max)**2 + LIBPAW_ALLOCATE(nablargnt_tmp,(sz1*sz2*sz2)) + LIBPAW_ALLOCATE(pawang%nablagntselect,(sz1,sz2,sz2)) + call nablarealgaunt(pawang%l_size_max,pawang%l_max, & +& pawang%nnablagnt,pawang%nablagntselect,nablargnt_tmp) + if (allocated(pawang%nablarealgnt)) then + LIBPAW_DEALLOCATE(pawang%nablarealgnt) + end if + LIBPAW_ALLOCATE(pawang%nablarealgnt,(pawang%nnablagnt)) + Pawang%nablarealgnt(1:Pawang%nnablagnt)=nablargnt_tmp(1:Pawang%nnablagnt) + LIBPAW_DEALLOCATE(nablargnt_tmp) + end if + + Pawang%use_ls_ylm=use_ls_ylm + if (use_ls_ylm>0) then + LIBPAW_ALLOCATE(pawang%ls_ylm,(2,Pawang%l_max**2*(Pawang%l_max**2+1)/2,2)) + call lsylm(pawang%ls_ylm,lmax) + end if + + if (nsym>0) then + if (.not.allocated(Pawang%zarot)) then + LIBPAW_ALLOCATE(Pawang%zarot,(Pawang%l_size_max,Pawang%l_size_max,Pawang%l_max,nsym)) + end if + end if + +end subroutine pawang_init +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawang/pawang_free +!! NAME +!! pawang_free +!! +!! FUNCTION +!! Free all dynamic memory and reset all flags stored in a pawang datastructure +!! +!! SIDE EFFECTS +!! Pawang =ANGular mesh discretization and related data +!! +!! SOURCE + +subroutine pawang_free(Pawang) + +!Arguments ------------------------------------ +!scalars + type(Pawang_type),intent(inout) :: Pawang + +! ************************************************************************* + + !@Pawang_type + if (allocated(pawang%angwgth)) then + LIBPAW_DEALLOCATE(pawang%angwgth) + end if + if (allocated(pawang%anginit)) then + LIBPAW_DEALLOCATE(pawang%anginit) + end if + if (allocated(pawang%zarot)) then + LIBPAW_DEALLOCATE(pawang%zarot) + end if + if (allocated(pawang%gntselect)) then + LIBPAW_DEALLOCATE(pawang%gntselect) + end if + if (allocated(pawang%nablagntselect)) then + LIBPAW_DEALLOCATE(pawang%nablagntselect) + end if + if (allocated(pawang%realgnt)) then + LIBPAW_DEALLOCATE(pawang%realgnt) + end if + if (allocated(pawang%nablarealgnt)) then + LIBPAW_DEALLOCATE(pawang%nablarealgnt) + end if + if (allocated(pawang%ylmr)) then + LIBPAW_DEALLOCATE(pawang%ylmr) + end if + if (allocated(pawang%ylmrgr)) then + LIBPAW_DEALLOCATE(pawang%ylmrgr) + end if + if (allocated(pawang%ls_ylm)) then + LIBPAW_DEALLOCATE(pawang%ls_ylm) + end if + + pawang%angl_size =0 + pawang%ylm_size =0 + pawang%use_ls_ylm=0 + pawang%l_max=-1 + pawang%l_size_max=-1 + pawang%gnt_option=-1 + pawang%nabgnt_option=-1 + pawang%ngnt=0 + +end subroutine pawang_free +!!*** + +!---------------------------------------------------------------------- + +END MODULE m_pawang +!!*** diff --git a/GX-PAW/libpaw/src/m_pawang.o b/GX-PAW/libpaw/src/m_pawang.o new file mode 100644 index 00000000..926343ac Binary files /dev/null and b/GX-PAW/libpaw/src/m_pawang.o differ diff --git a/GX-PAW/libpaw/src/m_pawcprj.F90 b/GX-PAW/libpaw/src/m_pawcprj.F90 new file mode 100644 index 00000000..d1f40f13 --- /dev/null +++ b/GX-PAW/libpaw/src/m_pawcprj.F90 @@ -0,0 +1,2959 @@ +!!****m* abinit/m_pawcprj +!! NAME +!! m_pawcprj +!! +!! FUNCTION +!! This module contains functions used to manipulate variables of +!! structured datatype pawcprj_type. +!! pawcprj_type variables are projected quantities, +!! where |p_lmn> are non-local projectors +!! |Cnk> are wave functions +!! +!! COPYRIGHT +!! Copyright (C) 2012-2024 ABINIT group (MT,JWZ) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! NOTES +!! FOR DEVELOPPERS: in order to preserve the portability of libPAW library, +!! please consult ~abinit/src/??_libpaw/libpaw-coding-rules.txt +!! +!! SOURCE + +#include "libpaw.h" + +module m_pawcprj + + USE_DEFS + USE_MSG_HANDLING + USE_MPI_WRAPPERS + USE_MEMORY_PROFILING + + use m_pawtab, only : pawtab_type + + implicit none + + private +!!*** + +!!****t* m_pawcprj/pawcprj_type +!! NAME +!! pawcprj_type +!! +!! FUNCTION +!! This structured datatype contains projected scalars and derivatives +!! where |p_lmn> are non-local projectors for a given atom +!! |Cnk> is a wave function +!! Used only for PAW calculations. +!! +!! SOURCE + + type,public :: pawcprj_type + +!Integer scalars + + integer :: ncpgr=0 + ! Number of gradients of cp= + + integer :: nlmn=0 + ! Number of (l,m,n) non-local projectors + +!Real (real(dp)) arrays + + real(dp), allocatable :: cp (:,:) + ! cp(2,nlmn) + ! projected scalars for a given atom and wave function + + real(dp), allocatable :: dcp (:,:,:) + ! dcp(2,ncpgr,nlmn) + ! derivatives of projected scalars for a given atom and wave function + + end type pawcprj_type + +!public procedures. + public :: pawcprj_alloc ! Allocation + public :: pawcprj_free ! Deallocation + public :: pawcprj_set_zero ! Set to zero all arrays in a cprj datastructure + public :: pawcprj_copy ! Copy a cprj datastructure into another + public :: pawcprj_axpby ! cprjy(:,:) <- alpha.cprjx(:,:)+beta.cprjy(:,:) + public :: pawcprj_zaxpby ! cprjy(:,:) <- alpha.cprjx(:,:)+beta.cprjy(:,:), alpha and beta are COMPLEX scalars + public :: pawcprj_projbd ! cprjy(:,:) <- alpha.cprjx(:,:)+beta.cprjy(:,:), alpha and beta are COMPLEX scalars + public :: pawcprj_conjg ! cprj(:,:) <- conjugate(cprj(:,:)) + public :: pawcprj_symkn ! construct cprj from that at a symmetry related k point + public :: pawcprj_lincom ! Compute a LINear COMbination of cprj datastructure: + public :: pawcprj_output ! Output a cprj. Useful for debugging. + public :: pawcprj_get ! Read the cprj for a given k-point from memory or from a temporary file + public :: pawcprj_put ! Write the cprj for a given set of (n,k) into memory or into a temporary file + public :: pawcprj_reorder ! Change the order of a cprj datastructure + public :: pawcprj_mpi_allgather ! Perform MPI_ALLGATHER on a pawcprj_type inside a MPI communicator. + public :: pawcprj_bcast ! Broadcast a pawcprj_type from master to all nodes inside a MPI communicator. + public :: pawcprj_transpose ! Transpose a cprj datastructure FOR A GIVEN (K,SPIN) + public :: pawcprj_gather_spin ! Collect spin distributed cprjs. + public :: pawcprj_mpi_exch ! Exchange a pawcprj_type between two processors inside a MPI communicator. + public :: pawcprj_mpi_send ! Send a pawcprj_type inside a MPI communicator. + public :: pawcprj_mpi_recv ! Receive a pawcprj_type inside a MPI communicator. + public :: pawcprj_mpi_sum ! Perform MPI_SUM on a pawcprj_type inside a MPI communicator. + public :: pawcprj_getdim ! Returns the number of lmn components in the for the i-th atom. + public :: paw_overlap ! Compute the onsite contribution to the overlap between two states. + public :: pawcprj_pack ! Copy data from a cprj to a simple real buffer + public :: pawcprj_unpack ! Copy data from a simple real buffer to a cprj +!!*** + +CONTAINS + +!=========================================================== +!!*** + +!!****f* m_pawcprj/pawcprj_alloc +!! NAME +!! pawcprj_alloc +!! +!! FUNCTION +!! Allocation of a cprj datastructure +!! +!! INPUTS +!! ncpgr=number of gradients to be allocated +!! nlmn(:)=sizes of cprj%cp +!! +!! SIDE EFFECTS +!! cprj(:,:) = cprj datastructure +!! +!! SOURCE + + subroutine pawcprj_alloc(cprj,ncpgr,nlmn) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: ncpgr +!arrays + integer,intent(in) :: nlmn(:) + type(pawcprj_type),intent(inout) :: cprj(:,:) + +!Local variables------------------------------- +!scalars + integer :: ii,jj,n1dim,n2dim,nn + character(len=500) :: msg + +! ************************************************************************* + + n1dim=size(cprj,dim=1);n2dim=size(cprj,dim=2);nn=size(nlmn,dim=1) + if (nn/=n1dim) then + write(msg,*) 'wrong sizes (pawcprj_alloc)! :',nn,n1dim + LIBPAW_ERROR(msg) + end if + + do jj=1,n2dim + do ii=1,n1dim + if (allocated(cprj(ii,jj)%cp)) then + LIBPAW_DEALLOCATE(cprj(ii,jj)%cp) + end if + if (allocated(cprj(ii,jj)%dcp)) then + LIBPAW_DEALLOCATE(cprj(ii,jj)%dcp) + end if + nn=nlmn(ii) + cprj(ii,jj)%nlmn=nn + LIBPAW_ALLOCATE(cprj(ii,jj)%cp,(2,nn)) + cprj(ii,jj)%cp=zero + cprj(ii,jj)%ncpgr=ncpgr + if (ncpgr>0) then + LIBPAW_ALLOCATE(cprj(ii,jj)%dcp,(2,ncpgr,nn)) + cprj(ii,jj)%dcp=zero + end if + end do + end do + +end subroutine pawcprj_alloc +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawcprj/pawcprj_free +!! NAME +!! pawcprj_free +!! +!! FUNCTION +!! Deallocation of a cprj datastructure +!! +!! SIDE EFFECTS +!! cprj(:,:) = cprj datastructure +!! +!! SOURCE + + subroutine pawcprj_free(cprj) + +!Arguments ------------------------------------ +!scalars +!arrays + type(pawcprj_type),intent(inout) :: cprj(:,:) + +!Local variables------------------------------- +!scalars + integer :: ii,jj,n1dim,n2dim + +! ************************************************************************* + + n1dim=size(cprj,dim=1);n2dim=size(cprj,dim=2) + + do jj=1,n2dim + do ii=1,n1dim + if (allocated(cprj(ii,jj)%cp)) then + LIBPAW_DEALLOCATE(cprj(ii,jj)%cp) + end if + if (allocated(cprj(ii,jj)%dcp)) then + LIBPAW_DEALLOCATE(cprj(ii,jj)%dcp) + end if + end do + end do + +end subroutine pawcprj_free +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawcprj/pawcprj_set_zero +!! NAME +!! pawcprj_set_zero +!! +!! FUNCTION +!! Set to zero all arrays in a cprj datastructure +!! +!! SIDE EFFECTS +!! cprj(:,:) = cprj datastructure +!! +!! SOURCE + + subroutine pawcprj_set_zero(cprj) + +!Arguments ------------------------------------ +!scalars +!arrays + type(pawcprj_type),intent(inout) :: cprj(:,:) + +!Local variables------------------------------- +!scalars + integer :: ii,jj,n1dim,n2dim + +! ************************************************************************* + + n1dim=size(cprj,dim=1);n2dim=size(cprj,dim=2) + + do jj=1,n2dim + do ii=1,n1dim + if (cprj(ii,jj)%nlmn>0) cprj(ii,jj)%cp(:,:)=zero + if (cprj(ii,jj)%ncpgr>0) cprj(ii,jj)%dcp(:,:,:)=zero + end do + end do + +end subroutine pawcprj_set_zero +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawcprj/pawcprj_copy +!! NAME +!! pawcprj_copy +!! +!! FUNCTION +!! Copy a cprj datastructure into another +!! +!! INPUTS +!! icpgr= (optional argument) if present, only component icpgr of +!! input cprj gradient is copied into output cprj +!! Not used if cprj(:,:)%ncpgr= input cprj datastructure +!! +!! OUTPUT +!! cprj_out(:,:) = output cprj datastructure +!! +!! NOTES +!! MG: What about an option to report a pointer to cprj_in? +!! +!! SOURCE + + subroutine pawcprj_copy(cprj_in,cprj_out,& +& icpgr) ! optional argument + +!Arguments ------------------------------------ +!scalars + integer,intent(in),optional :: icpgr +!arrays + type(pawcprj_type),intent(in) :: cprj_in(:,:) + type(pawcprj_type),intent(inout) :: cprj_out(:,:) + +!Local variables------------------------------- +!scalars + integer :: ii,jj,kk,n1dim_in,n1dim_out,n2dim_in,n2dim_out,ncpgr_in,ncpgr_out,nlmn + logical :: has_icpgr,copy_dcp + character(len=500) :: msg + +! ************************************************************************* + + n1dim_in=size(cprj_in,dim=1); n1dim_out=size(cprj_out,dim=1) + n2dim_in=size(cprj_in,dim=2); n2dim_out=size(cprj_out,dim=2) + ncpgr_in=cprj_in(1,1)%ncpgr; ncpgr_out=cprj_out(1,1)%ncpgr + + if (n1dim_in/=n1dim_out) then + write(msg,'(a,2(1x,i0))')" Error in pawcprj_copy: n1 wrong sizes ",n1dim_in,n1dim_out + LIBPAW_ERROR(msg) + end if + if (n2dim_in/=n2dim_out) then + write(msg,'(a,2(1x,i0))')" Error in pawcprj_copy: n2 wrong sizes ",n2dim_in,n2dim_out + LIBPAW_ERROR(msg) + end if + if (ncpgr_in=0 + end if + + do jj=1,n2dim_in + do ii=1,n1dim_in + nlmn=cprj_in(ii,jj)%nlmn + cprj_out(ii,jj)%nlmn =nlmn + do kk=1,nlmn + cprj_out(ii,jj)%cp(1:2,kk)=cprj_in(ii,jj)%cp(1:2,kk) + end do + end do + end do + + if (ncpgr_in>0.and.copy_dcp) then + if (has_icpgr) has_icpgr=(ncpgr_out>0.and.icpgr>0.or.icpgr<=ncpgr_in) + + if (has_icpgr) then + do jj=1,n2dim_in + do ii=1,n1dim_in + nlmn=cprj_in(ii,jj)%nlmn + do kk=1,nlmn + cprj_out(ii,jj)%dcp(1:2,1,kk)=cprj_in(ii,jj)%dcp(1:2,icpgr,kk) + end do + end do + end do + else + if (ncpgr_out>=ncpgr_in) then + do jj=1,n2dim_in + do ii=1,n1dim_in + nlmn=cprj_in(ii,jj)%nlmn + do kk=1,nlmn + cprj_out(ii,jj)%dcp(1:2,1:ncpgr_in,kk)=cprj_in(ii,jj)%dcp(1:2,1:ncpgr_in,kk) + end do + end do + end do + end if + end if + end if + +end subroutine pawcprj_copy +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawcprj/pawcprj_axpby +!! NAME +!! pawcprj_axpby +!! +!! FUNCTION +!! Apply AXPBY (blas-like) operation with 2 cprj datastructures: +!! cprjy(:,:) <- alpha.cprjx(:,:)+beta.cprjy(:,:) +!! alpha and beta are REAL scalars +!! +!! INPUTS +!! alpha,beta= alpha,beta REAL factors +!! cprjx(:,:) = input cprjx datastructure +!! +!! SIDE EFFECTS +!! cprjy(:,:) = input/output cprjy datastructure +!! +!! SOURCE + + subroutine pawcprj_axpby(alpha,beta,cprjx,cprjy) + +!Arguments ------------------------------------ +!scalars + real(dp),intent(in) :: alpha,beta +!arrays + type(pawcprj_type),intent(in) :: cprjx(:,:) + type(pawcprj_type),intent(inout) :: cprjy(:,:) + +!Local variables------------------------------- +!scalars + integer :: ii,jj,kk,n1dimx,n1dimy,n2dimx,n2dimy,ncpgrx,ncpgry,nlmn + character(len=500) :: msg + +! ************************************************************************* + + n1dimy=size(cprjy,dim=1);n2dimy=size(cprjy,dim=2);ncpgry=cprjy(1,1)%ncpgr + if (abs(alpha)>tol16) then + n1dimx=size(cprjx,dim=1);n2dimx=size(cprjx,dim=2);ncpgrx=cprjx(1,1)%ncpgr + msg = "" + if (n1dimx/=n1dimy) msg = TRIM(msg)//"Error in pawcprj_axpby: n1 wrong sizes !"//ch10 + if (n2dimx/=n2dimy) msg = TRIM(msg)//"Error in pawcprj_axpby: n2 wrong sizes !"//ch10 + if (ncpgrx/=ncpgry) msg = TRIM(msg)//"Error in pawcprj_axpby: ncpgr wrong sizes !"//ch10 + if (LEN_TRIM(msg) > 0) then + LIBPAW_ERROR(msg) + end if + else + n1dimx=0;n2dimx=0;ncpgrx=0 + end if + + if (abs(alpha)<=tol16) then + do jj=1,n2dimy + do ii=1,n1dimy + nlmn=cprjy(ii,jj)%nlmn + do kk=1,nlmn + cprjy(ii,jj)%cp(1:2,kk)=beta*cprjy(ii,jj)%cp(1:2,kk) + end do + end do + end do + if (ncpgry>0) then + do jj=1,n2dimy + do ii=1,n1dimy + nlmn=cprjy(ii,jj)%nlmn + do kk=1,nlmn + cprjy(ii,jj)%dcp(1:2,1:ncpgry,kk)=beta*cprjy(ii,jj)%dcp(1:2,1:ncpgry,kk) + end do + end do + end do + end if + else if (abs(beta)<=tol16) then + do jj=1,n2dimx + do ii=1,n1dimx + nlmn=cprjx(ii,jj)%nlmn + cprjy(ii,jj)%nlmn=nlmn + do kk=1,nlmn + cprjy(ii,jj)%cp(1:2,kk)=alpha*cprjx(ii,jj)%cp(1:2,kk) + end do + end do + end do + if (ncpgrx>0) then + do jj=1,n2dimx + do ii=1,n1dimx + nlmn=cprjx(ii,jj)%nlmn + do kk=1,nlmn + cprjy(ii,jj)%dcp(1:2,1:ncpgrx,kk)=alpha*cprjx(ii,jj)%dcp(1:2,1:ncpgrx,kk) + end do + end do + end do + end if + else ! alpha/=0 and beta/=0 + do jj=1,n2dimx + do ii=1,n1dimx + nlmn=cprjx(ii,jj)%nlmn + cprjy(ii,jj)%nlmn=nlmn + do kk=1,nlmn + cprjy(ii,jj)%cp(1:2,kk)=alpha*cprjx(ii,jj)%cp(1:2,kk) & +& +beta *cprjy(ii,jj)%cp(1:2,kk) + end do + end do + end do + if (ncpgrx>0) then + do jj=1,n2dimx + do ii=1,n1dimx + nlmn=cprjx(ii,jj)%nlmn + do kk=1,nlmn + cprjy(ii,jj)%dcp(1:2,1:ncpgrx,kk)=alpha*cprjx(ii,jj)%dcp(1:2,1:ncpgrx,kk) & +& +beta *cprjy(ii,jj)%dcp(1:2,1:ncpgrx,kk) + end do + end do + end do + end if + end if + +end subroutine pawcprj_axpby +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawcprj/pawcprj_zaxpby +!! NAME +!! pawcprj_zaxpby +!! +!! FUNCTION +!! Apply ZAXPBY (blas-like) operation with 2 cprj datastructures: +!! cprjy(:,:) <- alpha.cprjx(:,:)+beta.cprjy(:,:) +!! alpha and beta are COMPLEX scalars +!! +!! INPUTS +!! alpha(2),beta(2)= alpha,beta COMPLEX factors +!! cprjx(:,:) = input cprjx datastructure +!! +!! SIDE EFFECTS +!! cprjy(:,:) = input/output cprjy datastructure +!! +!! SOURCE + + subroutine pawcprj_zaxpby(alpha,beta,cprjx,cprjy) + +!Arguments ------------------------------------ +!scalars + real(dp),intent(in) :: alpha(2),beta(2) +!arrays + type(pawcprj_type),intent(in) :: cprjx(:,:) + type(pawcprj_type),intent(inout) :: cprjy(:,:) + +!Local variables------------------------------- +!scalars + integer :: ii,jj,kk,ll,n1dimx,n1dimy,n2dimx,n2dimy,ncpgrx,ncpgry,nlmn + real(dp) :: cp1,cp2,norma,normb + character(len=500) :: msg + +! ************************************************************************* + + norma=alpha(1)**2+alpha(2)**2 + normb=beta(1) **2+beta(2) **2 + n1dimy=size(cprjy,dim=1);n2dimy=size(cprjy,dim=2);ncpgry=cprjy(1,1)%ncpgr + if (norma>tol16*tol16) then + n1dimx=size(cprjx,dim=1);n2dimx=size(cprjx,dim=2);ncpgrx=cprjx(1,1)%ncpgr + msg = "" + if (n1dimx/=n1dimy) msg = TRIM(msg)//"Error in pawcprj_zaxpby: n1 wrong sizes !"//ch10 + if (n2dimx/=n2dimy) msg = TRIM(msg)//"Error in pawcprj_zaxpby: n2 wrong sizes !"//ch10 + if (ncpgrx/=ncpgry) msg = TRIM(msg)//"Error in pawcprj_zaxpby: ncpgr wrong sizes !"//ch10 + if (LEN_TRIM(msg) > 0) then + LIBPAW_ERROR(msg) + end if + end if + + if (norma<=tol16*tol16) then + do jj=1,n2dimy + do ii=1,n1dimy + nlmn=cprjy(ii,jj)%nlmn + do kk=1,nlmn + cp1=beta(1)*cprjy(ii,jj)%cp(1,kk)-beta(2)*cprjy(ii,jj)%cp(2,kk) + cp2=beta(1)*cprjy(ii,jj)%cp(2,kk)+beta(2)*cprjy(ii,jj)%cp(1,kk) + cprjy(ii,jj)%cp(1,kk)=cp1 + cprjy(ii,jj)%cp(2,kk)=cp2 + end do + end do + end do + if (ncpgry>0) then + do jj=1,n2dimy + do ii=1,n1dimy + nlmn=cprjy(ii,jj)%nlmn + do kk=1,nlmn + do ll=1,ncpgry + cp1=beta(1)*cprjy(ii,jj)%dcp(1,ll,kk)-beta(2)*cprjy(ii,jj)%dcp(2,ll,kk) + cp2=beta(1)*cprjy(ii,jj)%dcp(2,ll,kk)+beta(2)*cprjy(ii,jj)%dcp(1,ll,kk) + cprjy(ii,jj)%dcp(1,ll,kk)=cp1 + cprjy(ii,jj)%dcp(2,ll,kk)=cp2 + end do + end do + end do + end do + end if + else if (normb<=tol16*tol16) then + do jj=1,n2dimx + do ii=1,n1dimx + nlmn=cprjx(ii,jj)%nlmn + cprjy(ii,jj)%nlmn=nlmn + do kk=1,nlmn + cprjy(ii,jj)%cp(1,kk)=alpha(1)*cprjx(ii,jj)%cp(1,kk)-alpha(2)*cprjx(ii,jj)%cp(2,kk) + cprjy(ii,jj)%cp(2,kk)=alpha(1)*cprjx(ii,jj)%cp(2,kk)+alpha(2)*cprjx(ii,jj)%cp(1,kk) + end do + end do + end do + if (ncpgrx>0) then + do jj=1,n2dimx + do ii=1,n1dimx + nlmn=cprjx(ii,jj)%nlmn + do kk=1,nlmn + cprjy(ii,jj)%dcp(1,1:ncpgrx,kk)=alpha(1)*cprjx(ii,jj)%dcp(1,1:ncpgrx,kk) & +& -alpha(2)*cprjx(ii,jj)%dcp(2,1:ncpgrx,kk) + cprjy(ii,jj)%dcp(2,1:ncpgrx,kk)=alpha(1)*cprjx(ii,jj)%dcp(2,1:ncpgrx,kk) & +& +alpha(2)*cprjx(ii,jj)%dcp(1,1:ncpgrx,kk) + end do + end do + end do + end if +! else if (abs(beta(1)-one)0) then +! do jj=1,n2dimx +! do ii=1,n1dimx +! nlmn=cprjx(ii,jj)%nlmn +! do kk=1,nlmn +! do ll=1,ncpgrx +! cp1=cprjy(ii,jj)%dcp(1,ll,kk) +! cp2=cprjy(ii,jj)%dcp(2,ll,kk) +! cp1=cp1+alpha(1)*cprjx(ii,jj)%dcp(1,ll,kk)-alpha(2)*cprjx(ii,jj)%dcp(2,ll,kk) +! cp2=cp2+alpha(1)*cprjx(ii,jj)%dcp(2,ll,kk)+alpha(2)*cprjx(ii,jj)%dcp(1,ll,kk) +! cprjy(ii,jj)%dcp(1,ll,kk)=cp1 +! cprjy(ii,jj)%dcp(2,ll,kk)=cp2 +! end do +! end do +! end do +! end do +! end if + else + do jj=1,n2dimx + do ii=1,n1dimx + nlmn=cprjx(ii,jj)%nlmn + cprjy(ii,jj)%nlmn =nlmn + do kk=1,nlmn + cp1=alpha(1)*cprjx(ii,jj)%cp(1,kk)-alpha(2)*cprjx(ii,jj)%cp(2,kk) & +& +beta(1) *cprjy(ii,jj)%cp(1,kk)-beta(2) *cprjy(ii,jj)%cp(2,kk) + cp2=alpha(1)*cprjx(ii,jj)%cp(2,kk)+alpha(2)*cprjx(ii,jj)%cp(1,kk) & +& +beta(1) *cprjy(ii,jj)%cp(2,kk)+beta(2) *cprjy(ii,jj)%cp(1,kk) +! cp1=beta(1) *cprjy(ii,jj)%cp(1,kk)-beta(2) *cprjy(ii,jj)%cp(2,kk) +! cp1=cp1+alpha(1)*cprjx(ii,jj)%cp(1,kk)-alpha(2)*cprjx(ii,jj)%cp(2,kk) +! cp2=beta(1) *cprjy(ii,jj)%cp(2,kk)+beta(2) *cprjy(ii,jj)%cp(1,kk) +! cp2=cp2+alpha(1)*cprjx(ii,jj)%cp(2,kk)+alpha(2)*cprjx(ii,jj)%cp(1,kk) + cprjy(ii,jj)%cp(1,kk)=cp1 + cprjy(ii,jj)%cp(2,kk)=cp2 + end do + end do + end do + if (ncpgrx>0) then + do jj=1,n2dimx + do ii=1,n1dimx + nlmn=cprjx(ii,jj)%nlmn + do kk=1,nlmn + do ll=1,ncpgrx + cp1=alpha(1)*cprjx(ii,jj)%dcp(1,ll,kk)-alpha(2)*cprjx(ii,jj)%dcp(2,ll,kk) & +& +beta(1) *cprjy(ii,jj)%dcp(1,ll,kk)-beta(2) *cprjy(ii,jj)%dcp(2,ll,kk) + cp2=alpha(1)*cprjx(ii,jj)%dcp(2,ll,kk)+alpha(2)*cprjx(ii,jj)%dcp(1,ll,kk) & +& +beta(1) *cprjy(ii,jj)%dcp(2,ll,kk)+beta(2) *cprjy(ii,jj)%dcp(1,ll,kk) +! cp1=beta(1) *cprjy(ii,jj)%dcp(1,ll,kk)-beta(2) *cprjy(ii,jj)%dcp(2,ll,kk) +! cp1=cp1+alpha(1)*cprjx(ii,jj)%dcp(1,ll,kk)-alpha(2)*cprjx(ii,jj)%dcp(2,ll,kk) +! cp2=beta(1) *cprjy(ii,jj)%dcp(2,ll,kk)+beta(2) *cprjy(ii,jj)%dcp(1,ll,kk) +! cp2=cp2+alpha(1)*cprjx(ii,jj)%dcp(2,ll,kk)+alpha(2)*cprjx(ii,jj)%dcp(1,ll,kk) + cprjy(ii,jj)%dcp(1,ll,kk)=cp1 + cprjy(ii,jj)%dcp(2,ll,kk)=cp2 + end do + end do + end do + end do + end if + end if + +end subroutine pawcprj_zaxpby +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawcprj/pawcprj_projbd +!! NAME +!! pawcprj_projbd +!! +!! FUNCTION +!! Apply ZAXPBY (blas-like) operation with 2 cprj datastructures: +!! cprjy(:,:) <- alpha.cprjx(:,:)+beta.cprjy(:,:) +!! alpha and beta are COMPLEX scalars +!! +!! INPUTS +!! alpha(2),beta(2)= alpha,beta COMPLEX factors +!! cprjx(:,:) = input cprjx datastructure +!! +!! SIDE EFFECTS +!! cprjy(:,:) = input/output cprjy datastructure +!! +!! SOURCE + + subroutine pawcprj_projbd(alpha,cprjx,cprjy) + +!Arguments ------------------------------------ +!scalars + real(dp),intent(in) :: alpha(:,:) +!arrays + type(pawcprj_type),intent(in) :: cprjx(:,:) + type(pawcprj_type),intent(inout) :: cprjy(:,:) + +!Local variables------------------------------- +!scalars + integer :: ia,ii,jj,kk,ll,n1dima,n1dimx,n1dimy,n2dimx,n2dimy,n2dima,ncpgrx,ncpgry,nlmn + real(dp) :: cp1,cp2,norma + character(len=500) :: msg + +! ************************************************************************* + + n1dimy=size(cprjy,dim=1);n2dimy=size(cprjy,dim=2);ncpgry=cprjy(1,1)%ncpgr + n1dimx=size(cprjx,dim=1);n2dimx=size(cprjx,dim=2);ncpgrx=cprjx(1,1)%ncpgr + n1dima=size(alpha,dim=1);n2dima=size(alpha,dim=2) + msg = "" + if (n1dima/=2) msg = TRIM(msg)//"Error in pawcprj_projbd: alpha n1 wrong sizes !"//ch10 + if (n1dimx/=n1dimy) msg = TRIM(msg)//"Error in pawcprj_projbd: n1 wrong sizes !"//ch10 + if (n2dimx/=n2dimy*n2dima) msg = TRIM(msg)//"Error in pawcprj_projbd: n2 wrong sizes !"//ch10 + if (ncpgrx/=ncpgry) msg = TRIM(msg)//"Error in pawcprj_projbd: ncpgr wrong sizes !"//ch10 + if (LEN_TRIM(msg) > 0) then + LIBPAW_ERROR(msg) + end if + + do ia=1,n2dima + norma=alpha(1,ia)**2+alpha(2,ia)**2 + if (norma>tol16*tol16) then + do jj=1,n2dimy + do ii=1,n1dimx + nlmn=cprjy(ii,jj)%nlmn + cprjy(ii,jj)%nlmn =nlmn + do kk=1,nlmn + cp1=alpha(1,ia)*cprjx(ii,jj+(ia-1)*n2dimy)%cp(1,kk)-alpha(2,ia)*cprjx(ii,jj+(ia-1)*n2dimy)%cp(2,kk) + cp2=alpha(1,ia)*cprjx(ii,jj+(ia-1)*n2dimy)%cp(2,kk)+alpha(2,ia)*cprjx(ii,jj+(ia-1)*n2dimy)%cp(1,kk) + cprjy(ii,jj)%cp(1,kk)=cprjy(ii,jj)%cp(1,kk)+cp1 + cprjy(ii,jj)%cp(2,kk)=cprjy(ii,jj)%cp(2,kk)+cp2 + end do + end do + end do + if (ncpgrx>0) then + do jj=1,n2dimy + do ii=1,n1dimx + nlmn=cprjy(ii,jj)%nlmn + do kk=1,nlmn + do ll=1,ncpgrx + cp1=alpha(1,ia)*cprjx(ii,jj+(ia-1)*n2dimy)%dcp(1,ll,kk)-alpha(2,ia)*cprjx(ii,jj+(ia-1)*n2dimy)%dcp(2,ll,kk) + cp2=alpha(1,ia)*cprjx(ii,jj+(ia-1)*n2dimy)%dcp(2,ll,kk)+alpha(2,ia)*cprjx(ii,jj+(ia-1)*n2dimy)%dcp(1,ll,kk) + cprjy(ii,jj)%dcp(1,ll,kk)=cprjy(ii,jj)%dcp(1,ll,kk)+cp1 + cprjy(ii,jj)%dcp(2,ll,kk)=cprjy(ii,jj)%dcp(2,ll,kk)+cp2 + end do + end do + end do + end do + end if + end if + end do + +end subroutine pawcprj_projbd +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawcprj/pawcprj_symkn +!! NAME +!! pawcprj_symkn +!! +!! FUNCTION +!! compute cprj for a given band and k point based on cprj at a symmetry-related +!! k point. +!! +!! INPUTS +!! cprj_ikn (pawcprj_type) :: cprj for a single band and k point, typically a k point in the IBZ +!! cprj_sym(4,nsym,natom) :: 1:3 shift, and 4 final atom, of symmetry isym operating on iatom +!! (S^{-1}(R - t) = r0 + L, see symatm.F90 +!! dimlmn(natom) :: ln dimension of each atom +!! iband :: number of bands to treat, use -1 to treat all nband bands +!! indlmn(6,lmnmax,ntypat) :: n,l,m dimensions for each atom type (see psps type) +!! isym :: symmetry element used in current application +!! itim :: 1 if time reversal also used, 0 else +!! kpt(3) :: kpt vector used +!! lmax :: max l value +!! lmnmax :: max lmn value +!! mband :: maximum number of bands +!! natom :: number of atoms in cell +!! nband :: number of bands in cprj_ikn +!! nspinor :: number of spinors +!! nsym :: total number of symmetry elements +!! ntypat :: number of types of atoms +!! typat(natom) :: type of each atom +!! zarot(2*lmax+1,2*lmax+1,lmax+1,nsym) :: elements of rotation matrix for angular momentum states +!! and symmetry operations. See m_paw_sphharm/setsym_ylm. +!! +!! OUTPUT +!! cprj_fkn (pawcprj_type) :: cprj for a single band and k point where the k point is related to +!! the input k point by a symmetry operation +!! +!! SIDE EFFECTS +!! +!! NOTES +!! This routine is based on M. Giantomassi's doctoral dissertation, formula 7.77. It is not clear +!! whether it is implemented correctly for nonsymmorphic symmetries. +!! +!! SOURCE + + subroutine pawcprj_symkn(cprj_fkn,cprj_ikn,cprj_sym,dimlmn,iband,indlmn,& +& isym,itim,kpt,lmax,lmnmax,mband,natom,nband,nspinor,nsym,ntypat,& +& typat,zarot) + +!Arguments--------------------------- +!scalars + integer,intent(in) :: iband,isym,itim,lmax,lmnmax,mband + integer,intent(in) :: natom,nband,nspinor,nsym,ntypat + +!arrays + integer,intent(in) :: cprj_sym(4,nsym,natom),dimlmn(natom) + integer,intent(in) :: indlmn(6,lmnmax,ntypat),typat(natom) + real(dp),intent(in) :: kpt(3) + real(dp),intent(in) :: zarot(2*lmax+1,2*lmax+1,lmax+1,nsym) + type(pawcprj_type),intent(in) :: cprj_ikn(natom,mband*nspinor) + type(pawcprj_type),intent(inout) :: cprj_fkn(natom,mband*nspinor) !vz_i + +!Local variables--------------------------- +!scalars + integer :: iatm,iatom, ibct, ibnd, ibsp, ibst, icpgr, iin, il, il0, im + integer :: ilmn, iln, iln0, ilpm, indexi, ispinor, itypat, jatm,jatom, mm, nlmn + real(dp) :: kdotL, phr, phi +!arrays + real(dp) :: rl(3), t1(2), t2(2) + +! ************************************************************************* + + if (iband == -1) then + ibst = 1 + ibnd = nband + else + ibst = iband + ibnd = iband + end if + + do iatom = 1, natom + iatm=iatom + itypat = typat(iatom) + nlmn = dimlmn(iatm) + jatom = cprj_sym(4,isym,iatom) + jatm=jatom + rl(:) = cprj_sym(1:3,isym,iatom) + kdotL = dot_product(rl,kpt) + phr = cos(two_pi*kdotL) + phi = sin(two_pi*kdotL) + + il0 = -1; iln0 = -1; indexi = 1 + do ilmn = 1, nlmn + + il = indlmn(1,ilmn,itypat) + im = indlmn(2,ilmn,itypat) + iin = indlmn(3,ilmn,itypat) + iln = indlmn(5,ilmn,itypat) + ilpm = 1 + il + im + if (iln /= iln0) indexi = indexi + 2*il0 + 1 + + do ibct = ibst, ibnd + + do ispinor = 1, nspinor + + ibsp = nspinor*(ibct-1) + ispinor + + t1(:) = zero + do mm = 1, 2*il+1 + t1(1) = t1(1) + zarot(mm,ilpm,il+1,isym)*cprj_ikn(jatm,ibsp)%cp(1,indexi+mm) + t1(2) = t1(2) + zarot(mm,ilpm,il+1,isym)*cprj_ikn(jatm,ibsp)%cp(2,indexi+mm) + end do + t2(1) = t1(1)*phr - t1(2)*phi + t2(2) = t1(2)*phr + t1(1)*phi + + if (itim == 1) t2(2) = -t2(2) + + cprj_fkn(iatm,ibsp)%cp(1,ilmn) = t2(1) + cprj_fkn(iatm,ibsp)%cp(2,ilmn) = t2(2) + +! do same transformations for gradients of cprj_ikn +! note that ncpgr = 0 if no gradients present so this loop will not be executed +! in this case + + do icpgr = 1, cprj_ikn(jatom,ibsp)%ncpgr + t1(:) = zero + + do mm = 1, 2*il+1 + t1(1) = t1(1) + zarot(mm,ilpm,il+1,isym)*cprj_ikn(jatm,ibsp)%dcp(1,icpgr,indexi+mm) + t1(2) = t1(2) + zarot(mm,ilpm,il+1,isym)*cprj_ikn(jatm,ibsp)%dcp(2,icpgr,indexi+mm) + end do + + t2(1) = t1(1)*phr - t1(2)*phi + t2(2) = t1(2)*phr + t1(1)*phi + + if (itim == 1) t2(2) = -t2(2) + + cprj_fkn(iatm,ibsp)%dcp(1,icpgr,ilmn) = t2(1) + cprj_fkn(iatm,ibsp)%dcp(2,icpgr,ilmn) = t2(2) + + end do ! end loop over ncpgr + + end do ! end loop over nspinor + + end do ! end loop over bands + + il0 = il; iln0 = iln + end do ! end loop over ilmn + end do ! end loop over atoms + + end subroutine pawcprj_symkn +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawcprj/pawcprj_conjg +!! NAME +!! pawcprj_conjg +!! +!! FUNCTION +!! conjugate a cprj datastructures: +!! cprj(:,:) <- conjugate(cprj(:,:)) +!! +!! INPUTS +!! +!! SIDE EFFECTS +!! cprj(:,:) = input/output cprj datastructure +!! +!! SOURCE + + subroutine pawcprj_conjg(cprj) + +!Arguments ------------------------------------ +!scalars +!arrays + type(pawcprj_type),intent(inout) :: cprj(:,:) + +!Local variables------------------------------- +!scalars + integer :: ii,jj,kk,n1dim,n2dim,ncpgr,nlmn + +! ************************************************************************* + + + n1dim=size(cprj,dim=1);n2dim=size(cprj,dim=2);ncpgr=cprj(1,1)%ncpgr + + do jj=1,n2dim + do ii=1,n1dim + nlmn=cprj(ii,jj)%nlmn + do kk=1,nlmn + cprj(ii,jj)%cp(2,kk)=-cprj(ii,jj)%cp(2,kk) + end do + end do + end do + if (ncpgr>0) then + do jj=1,n2dim + do ii=1,n1dim + nlmn=cprj(ii,jj)%nlmn + do kk=1,nlmn + cprj(ii,jj)%dcp(2,1:ncpgr,kk)=-cprj(ii,jj)%dcp(2,1:ncpgr,kk) + end do + end do + end do + end if + +end subroutine pawcprj_conjg +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawcprj/pawcprj_lincom +!! NAME +!! pawcprj_lincom +!! +!! FUNCTION +!! Compute a LINear COMbination of cprj datastructure: +!! cprj_out(:,:) <--- Sum_i [ alpha_i . cprj_i(:,:) ] +!! alpha_i are COMPLEX scalars +!! +!! INPUTS +!! alpha(2,nn)= alpha COMPLEX factors +!! cprj_in(:,:) = input cprj_in datastructure +!! nn= number of cprj involved in the linear combination +!! +!! OUTPUT +!! cprj_out(:,:) = output cprj_out datastructure +!! +!! NOTES +!! cprj_in and cprj_out must be dimensionned as cprj_in(n1,n2*nn) and cprj_in(n1,n2) +!! +!! SOURCE + + subroutine pawcprj_lincom(alpha,cprj_in,cprj_out,nn) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: nn + real(dp),intent(in) :: alpha(2,nn) +!arrays + type(pawcprj_type),intent(in) :: cprj_in(:,:) + type(pawcprj_type),intent(inout) :: cprj_out(:,:) + +!Local variables------------------------------- +!scalars + integer :: ii,in,jj,jn,kk,ll,n1in,n1out,n2in,n2out,ncpgrin,ncpgrout,nlmn + real(dp) :: cp1,cp2 + character(len=500) :: msg + +! ************************************************************************* + + n1in=size(cprj_in,dim=1);n1out=size(cprj_out,dim=1) + n2in=size(cprj_in,dim=2);n2out=size(cprj_out,dim=2) + ncpgrin=cprj_in(1,1)%ncpgr;ncpgrout=cprj_out(1,1)%ncpgr + + msg = "" + if (n1in/=n1out) msg = TRIM(msg)//"Bug in pawcprj_lincom: n1 wrong sizes!"//ch10 + if (n2in/=n2out*nn) msg = TRIM(msg)//"Bug in pawcprj_lincom: n2 wrong sizes!"//ch10 + if (ncpgrin/=ncpgrout) msg = TRIM(msg)//"Bug in pawcprj_lincom: ncpgr wrong sizes!"//ch10 + if (LEN_TRIM(msg) > 0) then + LIBPAW_ERROR(msg) + end if + + do jj=1,n2out + do ii=1,n1out + nlmn=cprj_in(ii,jj)%nlmn + cprj_out(ii,jj)%nlmn=nlmn + cprj_out(ii,jj)%cp(1:2,1:nlmn)=zero + jn=jj + do in=1,nn + do kk=1,nlmn + cp1=cprj_out(ii,jj)%cp(1,kk) & +& +alpha(1,in)*cprj_in(ii,jn)%cp(1,kk)-alpha(2,in)*cprj_in(ii,jn)%cp(2,kk) + cp2=cprj_out(ii,jj)%cp(2,kk) & +& +alpha(1,in)*cprj_in(ii,jn)%cp(2,kk)+alpha(2,in)*cprj_in(ii,jn)%cp(1,kk) + cprj_out(ii,jj)%cp(1,kk)=cp1 + cprj_out(ii,jj)%cp(2,kk)=cp2 + end do + jn=jn+n2out + end do + end do + end do + + if (ncpgrin>0) then + do jj=1,n2out + do ii=1,n1out + nlmn=cprj_in(ii,jj)%nlmn + cprj_out(ii,jj)%dcp(1:2,1:ncpgrin,1:nlmn)=zero + jn=jj + do in=1,nn + do kk=1,nlmn + do ll=1,ncpgrin + cp1=cprj_out(ii,jj)%dcp(1,ll,kk) & +& +alpha(1,in)*cprj_in(ii,jn)%dcp(1,ll,kk) & +& -alpha(2,in)*cprj_in(ii,jn)%dcp(2,ll,kk) + cp2=cprj_out(ii,jj)%dcp(2,ll,kk) & +& +alpha(1,in)*cprj_in(ii,jn)%dcp(2,ll,kk) & + +alpha(2,in)*cprj_in(ii,jn)%dcp(1,ll,kk) + cprj_out(ii,jj)%dcp(1,ll,kk)=cp1 + cprj_out(ii,jj)%dcp(2,ll,kk)=cp2 + end do + end do + jn=jn+n2out + end do + end do + end do + end if + +end subroutine pawcprj_lincom +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawcprj/pawcprj_output +!! NAME +!! pawcprj_output +!! +!! FUNCTION +!! Output a cprj. Useful for debugging. +!! +!! INPUTS +!! cprj(:,:) = cprj datastructure +!! prtgrads :: optional, 1 to print gradients also +!! +!! OUTPUT +!! +!! SOURCE + + subroutine pawcprj_output(cprj,prtgrads) + +!Arguments ------------------------------------ +!scalar +integer,optional :: prtgrads +!arrays + type(pawcprj_type),intent(in) :: cprj(:,:) + +!Local variables------------------------------- +!scalar + integer :: ii,jj,kk,nlmn,n1dim,n2dim + logical :: gradoutput + +! ************************************************************************* + + n1dim=size(cprj,dim=1) + n2dim=size(cprj,dim=2) + gradoutput = .FALSE. + if(present(prtgrads)) then + gradoutput = (prtgrads .EQ. 1) + end if + + write(std_out,'(a)')' pawcprj_output ' + + do jj=1,n2dim + do ii=1,n1dim + write(std_out,'(a,i4,a,i4)')'atom ',ii,' band*k ',jj + nlmn=cprj(ii,jj)%nlmn + do kk=1,nlmn + write(std_out,'(2f12.8)')cprj(ii,jj)%cp(1,kk),cprj(ii,jj)%cp(2,kk) + if(gradoutput) then + write(std_out,'(6f12.8)')cprj(ii,jj)%dcp(1,1,kk),cprj(ii,jj)%dcp(2,1,kk),& + &cprj(ii,jj)%dcp(1,2,kk),cprj(ii,jj)%dcp(2,2,kk),& + &cprj(ii,jj)%dcp(1,3,kk),cprj(ii,jj)%dcp(2,3,kk) + end if + end do + end do + end do + +end subroutine pawcprj_output +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawcprj/pawcprj_get +!! NAME +!! pawcprj_get +!! +!! FUNCTION +!! Read the cprj_k for a given k-point from memory in cprj or from a temporary file +!! +!! INPUTS +!! atind(natom)=index table for atoms (see iorder below) +!! cprj(dimcp,nspinor*mband*mkmem*nsppol)=input cprj (used if mkmem/=0) +!! dimcp=first dimension of cprj_k,cprj arrays (1 or natom) +!! iband1=index of first band in cprj +!! ibg=shift in cprj array to locate current k-point +!! [icpgr]= (optional argument) if present, only component icpgr of +!! input cprj gradient is copied into output cprj +!! Not used if cprj(:,:)%ncpgr0) +!! or ncpgr(optional)unsorted) +!! - if atind=atindx1 (unsorted=>type-sorted) +!! isppol=index of current spin component +!! mband=maximum number of bands +!! mkmem=number of k points which can fit in memory; set to 0 if use disk +!! [mpi_comm]=(optional argument) MPI communicator over (k-pts,bands,spins) +!! Must be used in association with proc_distrb argument +!! natom=number of atoms in cell +!! nband=number of bands to import (usually 1 or nband_k) +!! nband_k=total number of bands for this k-point +!! [ncpgr]=(optional argument) second dimension of cprj%dcp(2,ncpgr,nlmn +!! stored in memory (mkmem>0) or present on disk (mkmem=0)) +!! needed only when optional argument icpgr is present +!! nspinor=number of spinorial components of the wavefunctions (on current proc) +!! nsppol=1 for unpolarized, 2 for spin-polarized +!! [proc_distrb(nkpt,nband,nsppol)]=(optional argument) processor distribution +!! Describe how cprj datastructures are distributed over processors +!! When present, mpicomm argument must be also present +!! uncp=unit number for cprj data (used if mkmem=0) +!! +!! OUTPUT +!! cprj_k(dimcp,nspinor*nband) = output cprj datastructure +!! +!! SOURCE + + subroutine pawcprj_get(atind,cprj_k,cprj,dimcp,iband1,ibg,ikpt,iorder,isppol,mband,& +& mkmem,natom,nband,nband_k,nspinor,nsppol,uncp,& +& icpgr,ncpgr,mpicomm,proc_distrb) ! optionals arguments + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: dimcp,iband1,ibg,ikpt,iorder,isppol,mband,mkmem,natom + integer,intent(in) :: nband,nband_k,nspinor,nsppol,uncp + integer,intent(in),optional :: icpgr,mpicomm,ncpgr +!arrays + integer,intent(in) :: atind(natom) + integer,intent(in),optional :: proc_distrb(:,:,:) + type(pawcprj_type),intent(in) :: cprj(dimcp,nspinor*mband*mkmem*nsppol) + type(pawcprj_type),intent(inout) :: cprj_k(dimcp,nspinor*nband) + +!Local variables------------------------------- +!scalars + integer :: iatm,iatom,ib,ibsp,icpgr_,isp,ispinor,jband,me,nband0,ncpgr_ + logical :: has_distrb,has_icpgr + character(len=500) :: msg +!arrays + real(dp),allocatable :: tmp(:,:,:) + +! ************************************************************************* + + ncpgr_=cprj_k(1,1)%ncpgr;if (present(ncpgr)) ncpgr_=ncpgr + icpgr_=-1;if(present(icpgr)) icpgr_=icpgr + has_icpgr=(icpgr_>0.and.icpgr_<=ncpgr_) + if (present(icpgr).and.(.not.present(ncpgr))) then + msg='ncpgr must be present when icpgr is present (pawcprj_get)!' + LIBPAW_BUG(msg) + end if + if (has_icpgr.and.cprj_k(1,1)%ncpgr<1) then + msg='cprj_k%ncpgr not consistent with icpgr (pawcprj_get)!' + LIBPAW_BUG(msg) + end if + +!MPI data + has_distrb=present(proc_distrb) + if (has_distrb) then + if (.not.present(mpicomm)) then + msg='mpicomm must be present when proc_distrb is present (pawcprj_get)!' + LIBPAW_BUG(msg) + end if + me=xmpi_comm_rank(mpicomm) + end if + + if (mkmem==0) then + + if (iband1==1) then + read(uncp) nband0 + if (nband_k/=nband0) then + msg='_PAW file was not created with the right options (pawcprj_get)!' + LIBPAW_BUG(msg) + end if + end if + + isp=0;jband=iband1-1 + do ib=1,nband + jband=jband+1 + if (has_distrb) then + if (abs(proc_distrb(ikpt,jband,isppol)-me)/=0) then + isp=isp+nspinor + cycle + end if + end if + do ispinor=1,nspinor + isp=isp+1 + if (iorder==0) then + if (ncpgr_==0) then + do iatom=1,dimcp + read(uncp) cprj_k(iatom,isp)%cp(:,:) + end do + else + if (has_icpgr) then + do iatom=1,dimcp + LIBPAW_ALLOCATE(tmp,(2,ncpgr_,cprj_k(iatom,1)%nlmn)) + read(uncp) cprj_k(iatom,isp)%cp(:,:),tmp(:,:,:) + cprj_k(iatom,isp)%dcp(:,1,:)=tmp(:,icpgr_,:) + LIBPAW_DEALLOCATE(tmp) + end do + else + do iatom=1,dimcp + read(uncp) cprj_k(iatom,isp)%cp(:,:),cprj_k(iatom,isp)%dcp(:,:,:) + end do + end if + end if + else + if (ncpgr_==0) then + do iatom=1,dimcp + iatm=min(atind(iatom),dimcp) + read(uncp) cprj_k(iatm,isp)%cp(:,:) + end do + else + if (has_icpgr) then + do iatom=1,dimcp + iatm=min(atind(iatom),dimcp) + LIBPAW_ALLOCATE(tmp,(2,ncpgr_,cprj_k(iatm,1)%nlmn)) + read(uncp) cprj_k(iatm,isp)%cp(:,:),tmp(:,:,:) + cprj_k(iatm,isp)%dcp(:,1,:)=tmp(:,icpgr_,:) + LIBPAW_DEALLOCATE(tmp) + end do + else + do iatom=1,dimcp + iatm=min(atind(iatom),dimcp) + read(uncp) cprj_k(iatm,isp)%cp(:,:),cprj_k(iatm,isp)%dcp(:,:,:) + end do + end if + end if + end if + end do + end do + + else + + isp=0;ibsp=ibg+nspinor*(iband1-1);jband=iband1-1 + do ib=1,nband + jband=jband+1 + if (has_distrb) then + if (abs(proc_distrb(ikpt,jband,isppol)-me)/=0) then + isp=isp+nspinor;ibsp=ibsp+nspinor + cycle + end if + end if + do ispinor=1,nspinor + isp=isp+1;ibsp=ibsp+1 + if (iorder==0) then + if (ncpgr_==0) then + do iatom=1,dimcp + cprj_k(iatom,isp)%cp(:,:)=cprj(iatom,ibsp)%cp(:,:) + end do + else + if (has_icpgr) then + do iatom=1,dimcp + cprj_k(iatom,isp)%cp(:,:) =cprj(iatom,ibsp)%cp(:,:) + cprj_k(iatom,isp)%dcp(:,1,:)=cprj(iatom,ibsp)%dcp(:,icpgr_,:) + end do + else + do iatom=1,dimcp + cprj_k(iatom,isp)%cp(:,:) =cprj(iatom,ibsp)%cp(:,:) + cprj_k(iatom,isp)%dcp(:,:,:)=cprj(iatom,ibsp)%dcp(:,:,:) + end do + end if + end if + else + if (ncpgr_==0) then + do iatom=1,dimcp + iatm=min(atind(iatom),dimcp) + cprj_k(iatm,isp)%cp(:,:)=cprj(iatom,ibsp)%cp(:,:) + end do + else + if (has_icpgr) then + do iatom=1,dimcp + iatm=min(atind(iatom),dimcp) + cprj_k(iatm,isp)%cp(:,:) =cprj(iatom,ibsp)%cp(:,:) + cprj_k(iatm,isp)%dcp(:,1,:)=cprj(iatom,ibsp)%dcp(:,icpgr_,:) + end do + else + do iatom=1,dimcp + iatm=min(atind(iatom),dimcp) + cprj_k(iatm,isp)%cp(:,:) =cprj(iatom,ibsp)%cp(:,:) + cprj_k(iatm,isp)%dcp(:,:,:)=cprj(iatom,ibsp)%dcp(:,:,:) + end do + end if + end if + end if + end do + end do + + end if + +end subroutine pawcprj_get +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawcprj/pawcprj_put +!! NAME +!! pawcprj_put +!! +!! FUNCTION +!! Write cprj_k for a given set of (n,k) into memory in cprj, or into a temporary file +!! +!! INPUTS +!! atind(natom)=index table for atoms (see iorder below) +!! cprj_k(dimcp,nspinor*nband) = input cprj datastructure +!! dimcp=first dimension of cprj_k,cprjnk arrays (1 or natom) +!! iband1=index of first band in cprj +!! ibg=shift in cprj array to locate current k-point +!! ikpt=index of current k-point (only needed for the parallel distribution) +!! iorder=0 if cprj ordering does not change during reading +!! 1 if cprj ordering changes during writing, depending on content of atind array: +!! - if atind=atindx (type-sorted->unsorted) +!! - if atind=atindx1 (unsorted->type-sorted) +!! isppol=index of current spin component +!! mband=maximum number of bands +!! mkmem=number of k points which can fit in memory; set to 0 if use disk +!! [mpi_comm]=(optional argument) MPI communicator over (k-pts,bands,spins) +!! Must be used in association with proc_distrb argument +!! [mpi_comm_band]=(optional argument) MPI communicator over bands +!! Must be used in association with proc_distrb argument +!! natom=number of atoms in cell +!! nband=number of bands to export (usually 1, nband_k or nblockbd) +!! nband_k=total number of bands for this k-point +!! nlmn(dimcp)=array of dimensions of cprj_k,cprjnk datastructures +!! nspinor=number of spinorial components of the wavefunctions (on current proc) +!! nsppol=1 for unpolarized, 2 for spin-polarized +!! [proc_distrb(nkpt,nband,nsppol)]=(optional argument) processor distribution +!! Describe how cprj datastructures are distributed over processors +!! When present, mpicomm argument must be also present +!! [to_be_gathered]=(optional argument) TRUE if cprj_k arrays have to be +!! gathered between procs (band-fft parallelism only) +!! uncp=unit number for cprj data (used if mkmem=0) +!! +!! SIDE EFFECTS +!! cprj(dimcp,nspinor*mband*mkmem*nsppol)=output cprj (used if mkmem/=0) +!! +!! SOURCE + + subroutine pawcprj_put(atind,cprj_k,cprj,dimcp,iband1,ibg,ikpt,iorder,isppol,mband,& +& mkmem,natom,nband,nband_k,nlmn,nspinor,nsppol,uncp,& +& mpicomm,mpi_comm_band,proc_distrb,to_be_gathered) ! Optional arguments + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: iband1,ibg,ikpt,iorder,isppol,dimcp,mband,mkmem + integer,intent(in) :: natom,nband,nband_k,nspinor,nsppol,uncp + integer,intent(in),optional :: mpicomm,mpi_comm_band + logical,optional,intent(in) :: to_be_gathered +!arrays + integer,intent(in) :: atind(natom),nlmn(dimcp) + integer,intent(in),optional :: proc_distrb(:,:,:) + type(pawcprj_type),intent(inout) :: cprj(dimcp,nspinor*mband*mkmem*nsppol) + type(pawcprj_type),intent(in) :: cprj_k(dimcp,nspinor*nband) + +!Local variables------------------------------- +!scalars + integer :: iatm,iatom,iband,ibsp,icpgr,ierr,ii,ilmn,isp,ispinor,jband,jj + integer :: lmndim,me,ncpgr,nproc_band + logical :: has_distrb,to_be_gathered_ + character(len=500) :: msg +!arrays + real(dp),allocatable :: buffer1(:),buffer2(:) +! ************************************************************************* + + ncpgr=cprj_k(1,1)%ncpgr + to_be_gathered_=.false.;if (present(to_be_gathered)) to_be_gathered_=to_be_gathered + +!MPI data + nproc_band=1;if (present(mpi_comm_band)) nproc_band=xmpi_comm_size(mpi_comm_band) + has_distrb=present(proc_distrb) + if (has_distrb) then + if (.not.present(mpicomm)) then + msg='mpicomm must be present when proc_distrb is present (pawcprj_put)!' + LIBPAW_BUG(msg) + end if + me=xmpi_comm_rank(mpicomm) + end if + + if (nproc_band==1.or.(.not.to_be_gathered_)) then + + if (mkmem==0) then + + if (iband1==1) write(uncp) nband_k + + isp=0;jband=iband1-1 + do iband=1,nband + jband=jband+1 + if (has_distrb) then + if (abs(proc_distrb(ikpt,jband,isppol)-me)/=0) then + isp=isp+nspinor + cycle + end if + end if + do ispinor=1,nspinor + isp=isp+1 + if (iorder==0) then + do iatom=1,dimcp + if (ncpgr==0) then + write(uncp) cprj_k(iatom,isp)%cp(:,:) + else + write(uncp) cprj_k(iatom,isp)%cp(:,:),cprj_k(iatom,isp)%dcp(:,:,:) + end if + end do + else + do iatom=1,dimcp + iatm=min(atind(iatom),dimcp) + if (ncpgr==0) then + write(uncp) cprj_k(iatm,isp)%cp(:,:) + else + write(uncp) cprj_k(iatm,isp)%cp(:,:),cprj_k(iatm,isp)%dcp(:,:,:) + end if + end do + end if + end do + end do + + else + + isp=0;ibsp=ibg+nspinor*(iband1-1);jband=iband1-1 + do iband=1,nband + jband=jband+1 + if (has_distrb) then + if (abs(proc_distrb(ikpt,jband,isppol)-me)/=0) then + isp=isp+nspinor;ibsp=ibsp+nspinor + cycle + end if + end if + do ispinor=1,nspinor + isp=isp+1;ibsp=ibsp+1 + if (iorder==0) then + do iatom=1,dimcp + cprj(iatom,ibsp)%cp(:,:)=cprj_k(iatom,isp)%cp(:,:) + if (ncpgr>0) cprj(iatom,ibsp)%dcp(:,:,:)=cprj_k(iatom,isp)%dcp(:,:,:) + end do + else + do iatom=1,dimcp + iatm=min(atind(iatom),dimcp) + cprj(iatom,ibsp)%cp(:,:)=cprj_k(iatm,isp)%cp(:,:) + if (ncpgr>0) cprj(iatom,ibsp)%dcp(:,:,:)=cprj_k(iatm,isp)%dcp(:,:,:) + end do + end if + end do + end do + + end if + + else ! np_band>1 + + lmndim=2*sum(nlmn(1:dimcp))*(1+ncpgr)*nspinor + LIBPAW_ALLOCATE(buffer1,(lmndim)) + LIBPAW_ALLOCATE(buffer2,(lmndim*nproc_band)) + isp=0;ibsp=ibg+nspinor*(iband1-1) + do iband=1,nband ! must be nblockbd for band-fft parallelism + jj=1 + do ispinor=1,nspinor + isp=isp+1 + do iatom=1,dimcp + if (iorder==0) then + iatm=iatom + else + iatm=min(atind(iatom),dimcp) + end if + do ilmn=1,nlmn(iatm) + buffer1(jj:jj+1)=cprj_k(iatm,isp)%cp(1:2,ilmn) + jj=jj+2 + end do + if (ncpgr>0) then + do ilmn=1,nlmn(iatm) + do icpgr=1,ncpgr + buffer1(jj:jj+1)=cprj_k(iatm,isp)%dcp(1:2,icpgr,ilmn) + jj=jj+2 + end do + end do + end if + end do !iatom + end do !ispinor + call xmpi_allgather(buffer1,lmndim,buffer2,mpi_comm_band,ierr) + jj=1 + do ii=1,nproc_band + do ispinor=1,nspinor + ibsp=ibsp+1 + do iatom=1,dimcp + if (iorder==0) then + iatm=iatom + else + iatm=min(atind(iatom),dimcp) + end if + do ilmn=1,nlmn(iatm) + cprj(iatom,ibsp)%cp(1:2,ilmn)=buffer2(jj:jj+1) + jj=jj+2 + end do + if (ncpgr>0) then + do ilmn=1,nlmn(iatm) + do icpgr=1,ncpgr + cprj(iatom,ibsp)%dcp(1:2,icpgr,ilmn)=buffer2(jj:jj+1) + jj=jj+2 + end do + end do + end if + end do !iatom + end do !ispinor + end do !ii=1,nproc_band + end do !iband + LIBPAW_DEALLOCATE(buffer1) + LIBPAW_DEALLOCATE(buffer2) + + end if ! mode_para=b, nband + +end subroutine pawcprj_put +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawcprj/pawcprj_reorder +!! NAME +!! pawcprj_reorder +!! +!! FUNCTION +!! Change the order of a cprj datastructure +!! From unsorted cprj to atom-sorted cprj (atm_indx=atindx) +!! From atom-sorted cprj to unsorted cprj (atm_indx=atindx1) +!! +!! INPUTS +!! atm_indx(natom)=index table for atoms +!! From unsorted cprj to atom-sorted cprj (atm_indx=atindx) +!! From atom-sorted cprj to unsorted cprj (atm_indx=atindx1) +!! +!! OUTPUT +!! +!! SIDE EFFECTS +!! cprj(:,:) = cprj datastructure +!! +!! SOURCE + + subroutine pawcprj_reorder(cprj,atm_indx) + +!Arguments ------------------------------------ +!scalars +!arrays + integer,intent(in) :: atm_indx(:) + type(pawcprj_type),intent(inout) :: cprj(:,:) + +!Local variables------------------------------- +!scalars + integer :: iexit,ii,jj,kk,n1atindx,n1cprj,n2cprj,ncpgr + character(len=100) :: msg +!arrays + integer,allocatable :: nlmn(:) + type(pawcprj_type),allocatable :: cprj_tmp(:,:) + +! ************************************************************************* + + n1cprj=size(cprj,dim=1);n2cprj=size(cprj,dim=2) + n1atindx=size(atm_indx,dim=1) + if (n1cprj==0.or.n2cprj==0.or.n1atindx<=1) return + + if (n1cprj/=n1atindx) then + msg='wrong sizes (pawcprj_reorder)!' + LIBPAW_BUG(msg) + end if + +!Nothing to do when the atoms are already sorted + iexit=1;ii=0 + do while (iexit==1.and.ii0) then + LIBPAW_ALLOCATE(cprj(kk,jj)%dcp,(2,ncpgr,nlmn(ii))) + cprj(kk,jj)%dcp(:,:,:)=cprj_tmp(ii,jj)%dcp(:,:,:) + end if + end do + end do + + call pawcprj_free(cprj_tmp) + LIBPAW_DATATYPE_DEALLOCATE(cprj_tmp) + LIBPAW_DEALLOCATE(nlmn) + +end subroutine pawcprj_reorder +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawcprj/pawcprj_mpi_exch +!! NAME +!! pawcprj_mpi_exch +!! +!! FUNCTION +!! Exchange a pawcprj_type between two processors inside a MPI communicator. +!! +!! INPUTS +!! natom=Number of atoms (size of first dimension of Cprj_send and Cprj_recv). +!! n2dim=Size of the second dimension. +!! nlmn(natom)=Number of nlm partial waves for each atom. +!! Cprj_send= The datatype to be transmitted. +!! receiver=ID of the receiver in spaceComm. +!! sender=ID of the sender in spaceComm. +!! spaceComm=MPI Communicator. +!! mtag= message tag +!! +!! OUTPUT +!! ierr=Error status. +!! Cprj_recv=The datatype copied on proc. receiver. +!! +!! NOTES +!! If sender==receiver, Cprj_send is copied into Cprj_recv. +!! It should be easy to avoid this additional copy in the calling routine. +!! +!! SOURCE + +subroutine pawcprj_mpi_exch(natom,n2dim,nlmn,ncpgr,Cprj_send,Cprj_recv,sender,receiver,spaceComm,mtag,ierr) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: mtag,natom,n2dim,ncpgr + integer,intent(in) :: sender,receiver,spaceComm + integer,intent(out) :: ierr +!arrays + integer,intent(in) :: nlmn(natom) + type(pawcprj_type),intent(in) :: Cprj_send(:,:) + type(pawcprj_type),intent(inout) :: Cprj_recv(:,:) + +!Local variables------------------------------- +!scalars + integer :: iat,jj,t2dim,tcpgr,n1dim,nn + integer :: ntotcp,ipck,rank + character(len=500) :: msg +!arrays + real(dp),allocatable :: buffer_cp(:,:),buffer_cpgr(:,:,:) + +! ************************************************************************* + + n1dim=0 + t2dim=0 + tcpgr=0 + ierr=0 + if (sender==receiver) then + call pawcprj_copy(Cprj_send,Cprj_recv) + return + end if + + rank = xmpi_comm_rank(spaceComm) + + nn=size(nlmn,dim=1) + if (rank==sender) then + n1dim=size(Cprj_send,dim=1) + t2dim=size(Cprj_send,dim=2) + tcpgr=Cprj_send(1,1)%ncpgr + end if + if (rank==receiver) then + n1dim=size(Cprj_recv,dim=1) + t2dim=size(Cprj_recv,dim=2) + tcpgr=Cprj_recv(1,1)%ncpgr + end if + if (rank/=sender.and.rank/=receiver) then + write(msg,'(a,3i0)') & +& 'rank is not equal to sender or receiver (pawcprj_mpi_exch): ',rank, sender, receiver + LIBPAW_BUG(msg) + end if + + ntotcp=n2dim*SUM(nlmn(:)) + + LIBPAW_ALLOCATE(buffer_cp,(2,ntotcp)) + if (ncpgr/=0) then + LIBPAW_ALLOCATE(buffer_cpgr,(2,ncpgr,ntotcp)) + end if + +!=== Pack Cprj_send === + if (rank==sender) then + ipck=0 + do jj=1,n2dim + do iat=1,natom + nn=nlmn(iat) + buffer_cp(:,ipck+1:ipck+nn)=Cprj_send(iat,jj)%cp(:,1:nn) + if (ncpgr/=0) buffer_cpgr(:,:,ipck+1:ipck+nn)=Cprj_send(iat,jj)%dcp(:,:,1:nn) + ipck=ipck+nn + end do + end do + end if + +!=== Transmit data === + call xmpi_exch(buffer_cp,2*ntotcp,sender,buffer_cp,receiver,spaceComm,2*mtag,ierr) + if (ncpgr/=0) then + call xmpi_exch(buffer_cpgr,2*ncpgr*ntotcp,sender,buffer_cpgr,receiver,spaceComm,2*mtag+1,ierr) + end if + +!=== UnPack buffers into Cprj_recv === + if (rank==receiver) then + ipck=0 + do jj=1,n2dim + do iat=1,natom + nn=nlmn(iat) + Cprj_recv(iat,jj)%cp(:,1:nn)=buffer_cp(:,ipck+1:ipck+nn) + if (ncpgr/=0) Cprj_recv(iat,jj)%dcp(:,:,1:nn)=buffer_cpgr(:,:,ipck+1:ipck+nn) + ipck=ipck+nn + end do + end do + end if + + LIBPAW_DEALLOCATE(buffer_cp) + if (ncpgr/=0) then + LIBPAW_DEALLOCATE(buffer_cpgr) + end if + +end subroutine pawcprj_mpi_exch +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawcprj/pawcprj_mpi_send +!! NAME +!! pawcprj_mpi_send +!! +!! FUNCTION +!! Send a pawcprj_type inside a MPI communicator. +!! +!! INPUTS +!! natom=Number of atoms (size of first dimension of cprj_out). +!! n2dim=Size of the second dimension. +!! nlmn(natom)=Number of nlm partial waves for each atom. +!! ncpgr = number of gradients in cprj_out +!! cprj_out= The datatype to be transmitted. +!! receiver=ID of the receiver in spaceComm. +!! spaceComm=MPI Communicator. +!! +!! OUTPUT +!! ierr=Error status. +!! +!! NOTES +!! perhaps in general it is more efficient to use pawcprj_mpi_exch but it is +!! convenient for coding to have separate send and recieve routines. +!! +!! SOURCE + +subroutine pawcprj_mpi_send(natom,n2dim,nlmn,ncpgr,cprj_out,receiver,spaceComm,ierr) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: natom,n2dim,ncpgr + integer,intent(in) :: receiver,spaceComm + integer,intent(out) :: ierr +!arrays + integer,intent(in) :: nlmn(natom) + type(pawcprj_type),intent(in) :: cprj_out(:,:) + +!Local variables------------------------------- +!scalars + integer :: iat,jj,t2dim,tcpgr,n1dim,nn + integer :: ntotcp,ipck,tag + character(len=100) :: msg +!arrays + real(dp),allocatable :: buffer_cp(:,:),buffer_cpgr(:,:,:) + +! ************************************************************************* + + n1dim=0 + t2dim=0 + tcpgr=0 + ierr=0 + + nn=size(nlmn,dim=1) + n1dim=size(cprj_out,dim=1) + t2dim=size(cprj_out,dim=2) + tcpgr=cprj_out(1,1)%ncpgr + + if (nn/=n1dim) then + msg='size mismatch in natom (pawcprj_mpi_send)!' + LIBPAW_BUG(msg) + end if + if (t2dim/=n2dim) then + msg='size mismatch in dim=2 (pawcprj_mpi_send)!' + LIBPAW_BUG(msg) + end if + if (tcpgr/=ncpgr) then + msg='size mismatch in ncpgr (pawcprj_mpi_send)!' + LIBPAW_BUG(msg) + end if + + ntotcp=n2dim*SUM(nlmn(:)) + + LIBPAW_ALLOCATE(buffer_cp,(2,ntotcp)) + if (ncpgr/=0) then + LIBPAW_ALLOCATE(buffer_cpgr,(2,ncpgr,ntotcp)) + end if + +!=== Pack cprj_out ==== + ipck=0 + do jj=1,n2dim + do iat=1,natom + nn=nlmn(iat) + buffer_cp(:,ipck+1:ipck+nn)=cprj_out(iat,jj)%cp(:,1:nn) + if (ncpgr/=0) buffer_cpgr(:,:,ipck+1:ipck+nn)=cprj_out(iat,jj)%dcp(:,:,1:nn) + ipck=ipck+nn + end do + end do + +!=== Transmit data === + tag = 2*ntotcp + call xmpi_send(buffer_cp,receiver,tag,spaceComm,ierr) + if (ncpgr/=0) then + tag=tag*ncpgr + call xmpi_send(buffer_cpgr,receiver,tag,spaceComm,ierr) + end if + +!=== Clean up === + LIBPAW_DEALLOCATE(buffer_cp) + if (ncpgr/=0) then + LIBPAW_DEALLOCATE(buffer_cpgr) + end if + +end subroutine pawcprj_mpi_send +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawcprj/pawcprj_mpi_recv +!! NAME +!! pawcprj_mpi_recv +!! +!! FUNCTION +!! Receive a pawcprj_type inside a MPI communicator. +!! +!! INPUTS +!! natom=Number of atoms (size of first dimension of Cprj_in). +!! n2dim=Size of the second dimension. +!! nlmn(natom)=Number of nlm partial waves for each atom. +!! ncpgr = number of gradients in cprj_in +!! sender=ID of the sender in spaceComm. +!! spaceComm=MPI Communicator. +!! +!! OUTPUT +!! ierr=Error status. +!! cprj_in=The datatype copied on proc. receiver. +!! +!! NOTES +!! Perhaps in general it is more efficient to use pawcprj_mpi_exch but it is +!! convenient for coding to have separate send and receive routines. +!! +!! SOURCE + +subroutine pawcprj_mpi_recv(natom,n2dim,nlmn,ncpgr,cprj_in,sender,spaceComm,ierr) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: natom,n2dim,ncpgr + integer,intent(in) :: sender,spaceComm + integer,intent(out) :: ierr +!arrays + integer,intent(in) :: nlmn(natom) + type(pawcprj_type),intent(inout) :: cprj_in(:,:) + +!Local variables------------------------------- +!scalars + integer :: iat,jj,t2dim,tcpgr,n1dim,nn + integer :: ntotcp,ipck,tag + character(len=100) :: msg +!arrays + real(dp),allocatable :: buffer_cp(:,:),buffer_cpgr(:,:,:) + +! ************************************************************************* + + n1dim=0 + t2dim=0 + tcpgr=0 + ierr=0 + + nn=size(nlmn,dim=1) + n1dim=size(cprj_in,dim=1) + t2dim=size(cprj_in,dim=2) + tcpgr=cprj_in(1,1)%ncpgr + + if (nn/=n1dim) then + msg='size mismatch in natom (pawcprj_mpi_recv)!' + LIBPAW_BUG(msg) + end if + if (t2dim/=n2dim) then + msg='size mismatch in dim=2 (pawcprj_mpi_recv)!' + LIBPAW_BUG(msg) + end if + if (tcpgr/=ncpgr) then + msg='size mismatch in ncpgr (pawcprj_mpi_recv)!' + LIBPAW_BUG(msg) + end if + + ntotcp=n2dim*SUM(nlmn(:)) + + LIBPAW_ALLOCATE(buffer_cp,(2,ntotcp)) + if (ncpgr/=0) then + LIBPAW_ALLOCATE(buffer_cpgr,(2,ncpgr,ntotcp)) + end if + +!=== Receive data === + tag = 2*ntotcp + call xmpi_recv(buffer_cp,sender,tag,spaceComm,ierr) + if (ncpgr/=0) then + tag=tag*ncpgr + call xmpi_recv(buffer_cpgr,sender,tag,spaceComm,ierr) + end if + +!=== UnPack buffers into cprj_in === + ipck=0 + do jj=1,n2dim + do iat=1,natom + nn=nlmn(iat) + cprj_in(iat,jj)%cp(:,1:nn)=buffer_cp(:,ipck+1:ipck+nn) + if (ncpgr/=0) cprj_in(iat,jj)%dcp(:,:,1:nn)=buffer_cpgr(:,:,ipck+1:ipck+nn) + ipck=ipck+nn + end do + end do + +!=== Clean up === + LIBPAW_DEALLOCATE(buffer_cp) + if (ncpgr/=0) then + LIBPAW_DEALLOCATE(buffer_cpgr) + end if + +end subroutine pawcprj_mpi_recv +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawcprj/pawcprj_mpi_sum +!! NAME +!! pawcprj_mpi_sum +!! +!! FUNCTION +!! Perform MPI_SUM on a pawcprj_type inside a MPI communicator. +!! +!! INPUTS +!! spaceComm=MPI Communicator. +!! +!! SIDE EFFECTS +!! cprj=the cprj datastructure +!! ierr=Error status. +!! +!! SOURCE + +subroutine pawcprj_mpi_sum(cprj,spaceComm,ierr) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: spaceComm + integer,intent(out) :: ierr +!arrays + type(pawcprj_type),intent(inout) :: cprj(:,:) + +!Local variables------------------------------- +!scalars + integer,parameter :: maxBytes=100*1024*1024 ! 100 MBytes + integer :: ii,ipck,jj,ncpgr,nlmn,nn,n1dim,n2dim,n2dim1,n2dim2,sizeBytes,step + logical,parameter :: save_memory=.true. +!arrays + real(dp),allocatable :: buffer_cprj(:,:,:) + +! ************************************************************************* + + if (xmpi_comm_size(spaceComm)<2) return + + n1dim=size(cprj,1);n2dim=size(cprj,2) + nlmn=sum(cprj(:,:)%nlmn) + ncpgr=maxval(cprj(:,:)%ncpgr) + + step=n2dim + if (save_memory) then + sizeBytes=2*(1+ncpgr)*nlmn *8 + step=n2dim/max(1,sizeBytes/maxBytes) + if (step==0) step=1 + end if + + do n2dim1=1,n2dim,step + + n2dim2=min(n2dim1+step-1,n2dim) + nlmn=sum(cprj(:,n2dim1:n2dim2)%nlmn) + LIBPAW_ALLOCATE(buffer_cprj,(2,1+ncpgr,nlmn)) + + ipck=0 ; buffer_cprj=zero + do jj=n2dim1,n2dim2 + do ii=1,n1dim + nn=cprj(ii,jj)%nlmn + buffer_cprj(:,1,ipck+1:ipck+nn)=cprj(ii,jj)%cp(:,1:nn) + if (cprj(ii,jj)%ncpgr/=0) buffer_cprj(:,2:1+ncpgr,ipck+1:ipck+nn)=cprj(ii,jj)%dcp(:,1:ncpgr,1:nn) + ipck=ipck+nn + end do + end do + + call xmpi_sum(buffer_cprj,spaceComm,ierr) + + ipck=0 + do jj=n2dim1,n2dim2 + do ii=1,n1dim + nn=cprj(ii,jj)%nlmn + cprj(ii,jj)%cp(:,1:nn)=buffer_cprj(:,1,ipck+1:ipck+nn) + if (cprj(ii,jj)%ncpgr/=0) cprj(ii,jj)%dcp(:,1:ncpgr,1:nn)=buffer_cprj(:,2:1+ncpgr,ipck+1:ipck+nn) + ipck=ipck+nn + end do + end do + + LIBPAW_DEALLOCATE(buffer_cprj) + + end do + +end subroutine pawcprj_mpi_sum +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawcprj/pawcprj_mpi_allgather +!! NAME +!! pawcprj_mpi_allgather +!! +!! FUNCTION +!! Perform MPI_ALLGATHER on a pawcprj_type inside a MPI communicator. +!! +!! INPUTS +!! cprj_loc= The cprj on the local proc being all-gathered +!! natom=Number of atoms (size of first dimension of cprj_loc). +!! n2dim=Size of the second dimension of cprj_loc. +!! n2std=Stride of n2 dimension +!! if n2std=1, cprj_loc(:,1) is on proc 0, cprj_loc(:,2) is on proc 1, cprj_loc(:,3) is on proc 2, etc. +!! if n2std>1, cprj_loc(:,1:n2std) are on proc 0, cprj_loc(:,n2std+1,2*n2std) are on proc 1, etc. +!! nlmn(natom)=Number of nlm partial waves for each atom. +!! ncpgr = number of gradients in cprj_loc +!! nproc=number of processors being gathered +!! spaceComm=MPI Communicator. +!! [rank_ordered]= optional, default=FALSE +!! TRUE: second dimension of gathered datastructure is rank-ordered +!! FALSE: second dimension of gathered datastructure is not rank-ordered +!! +!! OUTPUT +!! cprj_gat=the gathered cprjs +!! ierr=Error status. +!! +!! SOURCE + +subroutine pawcprj_mpi_allgather(cprj_loc,cprj_gat,natom,n2dim,n2std,nlmn,ncpgr,nproc,spaceComm,ierr,& +& rank_ordered) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: natom,n2dim,n2std,ncpgr,nproc,spaceComm + integer,intent(out) :: ierr + logical,optional,intent(in) :: rank_ordered +!arrays + integer,intent(in) :: nlmn(natom) + type(pawcprj_type),intent(in) :: cprj_loc(:,:) + type(pawcprj_type),intent(inout) :: cprj_gat(:,:) + +!Local variables------------------------------- +!scalars + integer :: iat,ii,jj,t2dim,tcpgr,tg2dim,n1dim,nn + integer :: ntotcp,ibuf,ipck,iproc + logical :: rank_ordered_ + character(len=100) :: msg +!arrays + real(dp),allocatable :: buffer_cpgr(:,:,:),buffer_cpgr_all(:,:,:) + +! ************************************************************************* + + n1dim=0 + t2dim=0 + tg2dim=0 + tcpgr=0 + ierr=0 + + nn=size(nlmn,dim=1) + n1dim=size(cprj_loc,dim=1) + t2dim=size(cprj_loc,dim=2) + tg2dim=size(cprj_gat,dim=2) + tcpgr=cprj_loc(1,1)%ncpgr + + if (nn/=n1dim) then + msg='size mismatch in natom (pawcprj_mpi_allgather)!' + LIBPAW_BUG(msg) + end if + if (t2dim/=n2dim) then + msg='size mismatch in dim=2 (pawcprj_mpi_allgather)!' + LIBPAW_BUG(msg) + end if + if (tg2dim/=n2dim*nproc) then + msg='size mismatch in dim=2 (pawcprj_mpi_allgather)!' + LIBPAW_BUG(msg) + end if + if (tcpgr/=ncpgr) then + msg='size mismatch in ncpgr (pawcprj_mpi_allgather)!' + LIBPAW_BUG(msg) + end if + if (mod(n2dim,n2std)/=0) then + msg='n2std should divide n2dim (pawcprj_mpi_allgather)!' + LIBPAW_BUG(msg) + end if + + rank_ordered_=.false.;if(present(rank_ordered)) rank_ordered_=rank_ordered + + ntotcp=n2dim*SUM(nlmn(:)) + LIBPAW_ALLOCATE(buffer_cpgr,(2,1+ncpgr,ntotcp)) + LIBPAW_ALLOCATE(buffer_cpgr_all,(2,1+ncpgr,nproc*ntotcp)) + +!=== Pack cprj_loc ==== + ipck=0 + do jj=1,n2dim + do iat=1,natom + nn=nlmn(iat) + buffer_cpgr(:,1,ipck+1:ipck+nn)=cprj_loc(iat,jj)%cp(:,1:nn) + if (ncpgr/=0) buffer_cpgr(:,2:1+ncpgr,ipck+1:ipck+nn)=cprj_loc(iat,jj)%dcp(:,:,1:nn) + ipck=ipck+nn + end do + end do + +!=== allgather data === + call xmpi_allgather(buffer_cpgr,2*(ncpgr+1)*ntotcp,buffer_cpgr_all,spaceComm,ierr) + +!=== unpack gathered data into cprj(natom,n2dim*nproc) +!=== second dimension is rank-ordered if rank_ordered_=true + ipck=0 + do iproc=1,nproc + do jj=1,n2dim/n2std + do ii=1,n2std + if (rank_ordered_) then + ibuf=(iproc-1)*n2dim+(jj-1)*n2std+ii + else + ibuf=(iproc+(jj-1)*nproc-1)*n2std+ii + end if + do iat=1,natom + nn=nlmn(iat) + cprj_gat(iat,ibuf)%cp(:,1:nn)=buffer_cpgr_all(:,1,ipck+1:ipck+nn) + if (ncpgr/=0) cprj_gat(iat,ibuf)%dcp(:,1:ncpgr,1:nn)=& +& buffer_cpgr_all(:,2:1+ncpgr,ipck+1:ipck+nn) + ipck=ipck+nn + end do + end do + end do + end do + +!=== Clean up === + LIBPAW_DEALLOCATE(buffer_cpgr) + LIBPAW_DEALLOCATE(buffer_cpgr_all) + +end subroutine pawcprj_mpi_allgather +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawcprj/pawcprj_bcast +!! NAME +!! pawcprj_bcast +!! +!! FUNCTION +!! Broadcast a pawcprj_type from master to all nodes inside a MPI communicator. +!! +!! INPUTS +!! natom=Number of atoms (size of the first dimension of Cprj). +!! n2dim=Size of the second dimension of Cprj. +!! ncpgr=Number of gradients that have to be cast. It is a bit redundant but, it can be used to +!! broad cast only the %cp"s without caring about the gradients. Just set it to 0 but be careful! +!! nlmn(natom)=Number of nlm partial waves for each atom. +!! master=ID of the sending node in spaceComm. +!! spaceComm=MPI Communicator. +!! +!! OUTPUT +!! ierr=Error status. +!! Cprj(natom,n2dim)=The datatype to be transmitted by master and received by the others nodes. +!! +!! SOURCE + +subroutine pawcprj_bcast(Cprj,natom,n2dim,nlmn,ncpgr,master,spaceComm,ierr) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: natom,n2dim,ncpgr,master,spaceComm + integer,intent(out) :: ierr +!arrays + integer,intent(in) :: nlmn(natom) + type(pawcprj_type),intent(inout) :: Cprj(natom,n2dim) + +!Local variables------------------------------- +!scalars + integer :: iat,jj,n1dim,nn + integer :: ntotcp,ipck,rank,nprocs + character(len=100) :: msg +!arrays + real(dp),allocatable :: buffer_cp(:,:),buffer_cpgr(:,:,:) + +! ************************************************************************* + + ierr=0 + nprocs = xmpi_comm_size(spaceComm) + if (nprocs==1) return + + rank = xmpi_comm_rank(spaceComm) + + nn=size(nlmn,dim=1) + n1dim=size(Cprj,dim=1) + if (nn/=n1dim) then + msg='size mismatch in natom (pawcprj_bcast)!' + LIBPAW_BUG(msg) + end if + + ntotcp=n2dim*SUM(nlmn(:)) + + LIBPAW_ALLOCATE(buffer_cp,(2,ntotcp)) + if (ncpgr/=0) then + LIBPAW_ALLOCATE(buffer_cpgr,(2,ncpgr,ntotcp)) + end if + +!=== Master packs Cprj === +!Write a routine to pack/unpack? + if (rank==master) then + ipck=0 + do jj=1,n2dim + do iat=1,natom + nn=nlmn(iat) + buffer_cp(:,ipck+1:ipck+nn)=Cprj(iat,jj)%cp(:,1:nn) + if (ncpgr/=0) buffer_cpgr(:,:,ipck+1:ipck+nn)=Cprj(iat,jj)%dcp(:,:,1:nn) + ipck=ipck+nn + end do + end do + end if + +!=== Transmit data === + call xmpi_bcast(buffer_cp,master,spaceComm,ierr) + if (ncpgr/=0) then + call xmpi_bcast(buffer_cpgr,master,spaceComm,ierr) + end if + +!=== UnPack the received buffer === + if (rank/=master) then + ipck=0 + do jj=1,n2dim + do iat=1,natom + nn=nlmn(iat) + Cprj(iat,jj)%cp(:,1:nn)=buffer_cp(:,ipck+1:ipck+nn) + if (ncpgr/=0) Cprj(iat,jj)%dcp(:,:,1:nn)=buffer_cpgr(:,:,ipck+1:ipck+nn) + ipck=ipck+nn + end do + end do + end if + + LIBPAW_DEALLOCATE(buffer_cp) + if (ncpgr/=0) then + LIBPAW_DEALLOCATE(buffer_cpgr) + end if + +end subroutine pawcprj_bcast +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawcprj/pawcprj_transpose +!! NAME +!! pawcprj_transpose +!! +!! FUNCTION +!! Transpose a cprj datastructure FOR A GIVEN (K,SPIN) +!! in order to change the parallel distribution from atom to band (or the contrary). +!! At input, cprj is distributed over bands (or atoms); at output, it is distributed over atoms (or bands) +!! +!! INPUTS +!! cprjin(n1indim,n2indim)=the input cprj datastructure +!! cprj_bandpp=number of bands to be treated simultaneoulsy by a processor +!! natom=number of atoms in cell +!! nband=number of bands +!! nspinor=number of spinorial components +!! spaceComm=MPI Communicator. +!! +!! OUTPUT +!! cprjout(n1outdim,n2outdim)=the output cprj datastructure with another distribution +!! +!! NOTES +!! On the dimensions: +!! To transfer cprj from band distribution to atom distribution, dimensions should be: +!! n1indim =natom n2indim =nband/nproc*nspinor +!! n1outdim=natom/nproc n2outdim=nband*nspinor +!! To transfer cprj from atom distribution to band distribution, dimensions should be: +!! n1indim =natom n2indim =nband/nproc*nspinor +!! n1outdim=natom/nproc n2outdim=nband*nspinor +!! +!! SOURCE + + subroutine pawcprj_transpose(cprjin,cprjout,cprj_bandpp,natom,nband,nspinor,spaceComm) + +!Arguments------------------------------------- +!scalars + integer :: cprj_bandpp,natom,nband,nspinor,spaceComm +!arrays + type(pawcprj_type),intent(in) :: cprjin(:,:) + type(pawcprj_type),intent(out) :: cprjout(:,:) + +!Local variables------------------------------- +!scalars + integer :: bpp,buf_indx + integer :: iashft,iatom,iatom_max_sd,iatom_max_rc,iatom_1,iatom_2,iatm1_sd,iatm1_rc,iatm2_sd,iatm2_rc + integer :: ib,iband,iband_1,iband_2,iband_shift,iblock_atom,iblock_band,ibshft + integer :: ierr,ip,ispinor,me,nba,nbb,nbnp_sd,nbnp_rc,ncpgr,nlmn,np + integer :: rbufsize,sbufsize,size11,size12,size21,size22,transpose_mode + character(len=100) :: msg +!arrays + integer,allocatable :: cprjsz_atom(:),cprjsz_block(:,:) + integer,allocatable,target :: count_atom(:),count_band(:),displ_atom(:),displ_band(:) + integer,pointer :: scount(:),sdispl(:),rcount(:),rdispl(:) + real(dp),allocatable :: rbuf(:),sbuf(:) + +! ************************************************************************* + +!MPI data + me = xmpi_comm_rank(spaceComm) + np = xmpi_comm_size(spaceComm) + +!Nothing to do if nprocs=1 + if (np==1) then + call pawcprj_copy(cprjin,cprjout) + return + end if + +!Compute bloc sizes + bpp=cprj_bandpp + nba=natom/np;if (mod(natom,np)/=0) nba=nba+1 + nbb=nband/(np*bpp) + +!Check sizes, select direction of transposition + transpose_mode=0 + size11=size(cprjin,1);size12=size(cprjin,2) + size21=size(cprjout,1);size22=size(cprjout,2) + if (size11==natom.and.size12==nbb*bpp*nspinor.and.& +& size21==nba.and.size22==nband*nspinor) then + transpose_mode=1 + else if (size11==nba.and.size12==nband*nspinor.and.& +& size21==natom.and.size22==nbb*bpp*nspinor) then + else + msg='wrong cprjin/cprjout sizes (pawcprj_transpose)!' + LIBPAW_BUG(msg) + end if + +!Compute size of atom bloc (wr to cprj) + LIBPAW_ALLOCATE(cprjsz_atom,(natom)) + LIBPAW_ALLOCATE(cprjsz_block,(np,nba)) + cprjsz_atom=0;cprjsz_block=0 + if (transpose_mode==1) then + do iatom=1,natom + cprjsz_atom(iatom)=2*cprjin(iatom,1)%nlmn*(1+cprjin(iatom,1)%ncpgr) + end do + else + do iblock_atom=1,nba + iatom=(iblock_atom-1)*np+1+me + if (iatom<=natom) cprjsz_atom(iatom)=2*cprjin(iblock_atom,1)%nlmn*(1+cprjin(iblock_atom,1)%ncpgr) + end do + call xmpi_sum(cprjsz_atom,spaceComm,ierr) + end if + do iblock_atom=1,nba + iashft=(iblock_atom-1)*np + iatom_1=iashft+1;iatom_2=iashft+np + if (iatom_1>natom) cycle + if (iatom_2>natom) iatom_2=natom + do iatom=iatom_1,iatom_2 + cprjsz_block(iatom-iashft,iblock_atom)=cprjsz_atom(iatom)+2 ! +2 for nlmn et ncpgr + end do + end do + LIBPAW_DEALLOCATE(cprjsz_atom) + +!Allocations for MPI_ALLTOALL + LIBPAW_ALLOCATE(count_atom,(np)) + LIBPAW_ALLOCATE(displ_atom,(np)) + LIBPAW_ALLOCATE(count_band,(np)) + LIBPAW_ALLOCATE(displ_band,(np)) + +!Loop on blocks of bands + do iblock_band=1,nbb !(note: np divides nband) + ibshft=(iblock_band-1)*np*bpp + iband_1=ibshft+1;iband_2=ibshft+np*bpp + if (iband_1>nband.or.iband_2>nband) cycle ! for security + +! Loop on blocks of atoms + do iblock_atom=1,nba + iashft=(iblock_atom-1)*np + iatom_1=iashft+1;iatom_2=iashft+np + if (iatom_1>natom) cycle + if (iatom_2>natom) iatom_2=natom + +! Computation of displacements and sizes of blocks when data are band-distributed + count_band(1)=cprjsz_block(1,iblock_atom)*nspinor*bpp;displ_band(1)=0 + do ip=2,np + count_band(ip)=cprjsz_block(ip,iblock_atom)*nspinor*bpp + displ_band(ip)=displ_band(ip-1)+count_band(ip-1) + end do + +! Computation of displacements and sizes of blocks when data are atom-distributed + count_atom(1)=cprjsz_block(1+me,iblock_atom)*bpp*nspinor;displ_atom(1)=0 + do ip=2,np + count_atom(ip)=count_atom(1) + displ_atom(ip)=displ_atom(ip-1)+count_atom(ip-1) + end do + +! According to transposition mode, select +! - displacements and sizes of blocks +! - shifts in arrays + if (transpose_mode==1) then + scount => count_band ; sdispl => displ_band + rcount => count_atom ; rdispl => displ_atom + nbnp_sd=bpp;nbnp_rc=np*bpp + iatm1_sd=iatom_1;iatm2_sd=iatom_2 + iatm1_rc=iblock_atom;iatm2_rc=iatm1_rc + iatom_max_sd=iatom_2;iatom_max_rc=iashft+1+me + else + scount => count_atom ; sdispl => displ_atom + rcount => count_band ; rdispl => displ_band + nbnp_sd=np*bpp;nbnp_rc=bpp + iatm1_sd=iblock_atom;iatm2_sd=iatm1_sd + iatm1_rc=iatom_1;iatm2_rc=iatom_2 + iatom_max_sd=iashft+1+me;iatom_max_rc=iatom_2 + end if + +! Allocation of buffers + sbufsize=sdispl(np)+scount(np) + rbufsize=rdispl(np)+rcount(np) + LIBPAW_ALLOCATE(sbuf,(sbufsize)) + LIBPAW_ALLOCATE(rbuf,(rbufsize)) + +! Coying of input cprj to buffer for sending + buf_indx=0 + iband_shift=(iblock_band-1)*nbnp_sd-1 + if (iatom_max_sd<=natom) then + do iatom=iatm1_sd,iatm2_sd + do ib=1,nbnp_sd + iband=(iband_shift+ib)*nspinor + do ispinor=1,nspinor + iband=iband+1 + nlmn=cprjin(iatom,iband)%nlmn;ncpgr=cprjin(iatom,iband)%ncpgr + sbuf(buf_indx+1)=dble(nlmn) ;buf_indx=buf_indx+1 + sbuf(buf_indx+1)=dble(ncpgr);buf_indx=buf_indx+1 + sbuf(buf_indx+1:buf_indx+2*nlmn)=reshape(cprjin(iatom,iband)%cp(1:2,1:nlmn),(/2*nlmn/)) + buf_indx=buf_indx+2*nlmn + if (ncpgr>0) then + sbuf(buf_indx+1:buf_indx+2*ncpgr*nlmn)=reshape(cprjin(iatom,iband)%dcp(1:2,1:ncpgr,1:nlmn),(/2*ncpgr*nlmn/)) + buf_indx=buf_indx+2*ncpgr*nlmn + end if + end do + end do + end do + end if + if (buf_indx/=sbufsize) then + msg='wrong buffer size for sending (pawcprj_transpose)!' + LIBPAW_BUG(msg) + end if + +! Main call to MPI_ALLTOALL + call xmpi_alltoallv(sbuf,scount,sdispl,rbuf,rcount,rdispl,spaceComm,ierr) + +! Retrieving of output cprj for received buffer + buf_indx=0 + iband_shift=(iblock_band-1)*nbnp_rc-1 + if (iatom_max_rc<=natom) then + do iatom=iatm1_rc,iatm2_rc + do ib=1,nbnp_rc + iband=(iband_shift+ib)*nspinor + do ispinor=1,nspinor + iband=iband+1 + nlmn =int(rbuf(buf_indx+1));buf_indx=buf_indx+1 + ncpgr=int(rbuf(buf_indx+1));buf_indx=buf_indx+1 + cprjout(iatom,iband)%nlmn=nlmn;cprjout(iatom,iband)%ncpgr=ncpgr + cprjout(iatom,iband)%cp(1:2,1:nlmn)=reshape(rbuf(buf_indx+1:buf_indx+2*nlmn),(/2,nlmn/)) + buf_indx=buf_indx+2*nlmn + if (ncpgr>0) then + cprjout(iatom,iband)%dcp(1:2,1:ncpgr,1:nlmn)=reshape(rbuf(buf_indx+1:buf_indx+2*nlmn*ncpgr),(/2,ncpgr,nlmn/)) + buf_indx=buf_indx+2*nlmn*ncpgr + end if + end do + end do + end do + else + cprjout(iatom,iband)%nlmn=0;cprjout(iatom,iband)%ncpgr=0 + end if + if (buf_indx/=rbufsize) then + msg='wrong buffer size for receiving (pawcprj_transpose)!' + LIBPAW_BUG(msg) + end if + +! Deallocation of buffers + LIBPAW_DEALLOCATE(sbuf) + LIBPAW_DEALLOCATE(rbuf) + +! End of loops + end do ! do iblock_atom + end do ! do iblock_atom + +!Free memory + LIBPAW_DEALLOCATE(count_atom) + LIBPAW_DEALLOCATE(displ_atom) + LIBPAW_DEALLOCATE(count_band) + LIBPAW_DEALLOCATE(displ_band) + LIBPAW_DEALLOCATE(cprjsz_block) + nullify(scount,rcount,sdispl,rdispl) + + end subroutine pawcprj_transpose +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawcprj/pawcprj_gather_spin +!! NAME +!! pawcprj_gather_spin +!! +!! FUNCTION +!! +!! INPUTS +!! cprj(:,:)=the input cprj datastructure +!! n2size=number of cprj datastructures to be gathered (second dim) +!! nspinor : number of spinorial component (on current proc) +!! nspinortot : total number of spinorial component +!! +!! OUTPUT +!! cprj_gat(:,:) = the cprj containing all nspinor componants +!! +!! NOTES +!! The cprj has been built like the following: +!! loop on nsppol +!! loop on k point +!! loop over band or block of band +!! These quantities were build only if treated by the current proc +!! the inner quantities being nspinor +!! +!! SOURCE + subroutine pawcprj_gather_spin(cprj,cprj_gat,natom,n2size,nspinor,nspinortot,& +& spaceComm_spin,ierr) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: natom,nspinor,nspinortot,n2size + integer,intent(in) :: spaceComm_spin + integer,intent(out) :: ierr +!arrays + type(pawcprj_type),intent(in) :: cprj(:,:) + type(pawcprj_type),intent(inout) :: cprj_gat(:,:) + +!Local variables------------------------------- +!scalars + integer :: i1,iatom,ibsp,icpgr,ilmn,isp,ispinor,jj,lmndim,n2dim,n2dim_gat,ncpgr + character(len=100) :: msg +!arrays + integer :: nlmn(natom) + real(dp),allocatable :: buffer1(:),buffer2(:) + +! ************************************************************************* + + n2dim =size(cprj,dim=2) + n2dim_gat=size(cprj_gat,dim=2) + if (n2dim_gat/=(nspinortot/nspinor)*n2dim) then + msg='wrong dims (pawcprj_gather_spin)!' + LIBPAW_BUG(msg) + end if + + do iatom=1,natom + nlmn(iatom)=size(cprj(iatom,1)%cp(1,:)) + end do + ncpgr=cprj(1,1)%ncpgr + lmndim=2*n2size*sum(nlmn(1:natom))*(1+ncpgr) + LIBPAW_ALLOCATE(buffer1,(lmndim)) + LIBPAW_ALLOCATE(buffer2,(lmndim*nspinortot)) + + isp=0;ibsp=0 + jj=1 + do i1=1,n2size + isp=isp+1 + do iatom=1,natom + do ilmn=1,nlmn(iatom) + buffer1(jj:jj+1)=cprj(iatom,isp)%cp(1:2,ilmn) + jj=jj+2 + end do + if (ncpgr>0) then + do ilmn=1,nlmn(iatom) + do icpgr=1,ncpgr + buffer1(jj:jj+1)=cprj(iatom,isp)%dcp(1:2,icpgr,ilmn) + jj=jj+2 + end do + end do + end if + end do + end do + + call xmpi_allgather(buffer1,lmndim,buffer2,spaceComm_spin,ierr) + + jj=1 + do ispinor=1,nspinortot + do i1 =1,n2size + ibsp=(i1-1)*nspinortot + ispinor + do iatom=1,natom + do ilmn=1,nlmn(iatom) + cprj_gat(iatom,ibsp)%cp(1:2,ilmn)=buffer2(jj:jj+1) + jj=jj+2 + end do + if (ncpgr>0) then + do ilmn=1,nlmn(iatom) + do icpgr=1,ncpgr + cprj_gat(iatom,ibsp)%dcp(1:2,icpgr,ilmn)=buffer2(jj:jj+1) + jj=jj+2 + end do + end do + end if + end do + end do + end do + + LIBPAW_DEALLOCATE(buffer1) + LIBPAW_DEALLOCATE(buffer2) + + end subroutine pawcprj_gather_spin +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawcprj/pawcprj_getdim +!! NAME +!! pawcprj_getdim +!! +!! FUNCTION +!! Helper function returning the number of lmn components in the for the i-th atom. +!! Used to initialize the dimensioning array that is passed to the pawcprj_alloc routines when the +!! pawcprj_type structure is allocated and initialized. +!! +!! INPUTS +!! natom=number of atoms in the unit cell +!! nattyp(ntypat)=number of atoms of each type +!! ntypat=number of atom types +!! typat(natom-= type of each atom +!! Pawtab(ntypat)=PAW tabulated starting data. +!! sort_mode(len=*)=String defining the sorting of the atoms in the Cprj arrays. +!! Two modes are possible: +!! -- "O[rdered]", if atoms are sorted by atom type. +!! -- "R[andom]", if atoms are sorted randomly i.e. according the values of typat specified in the input file. +!! +!! OUTPUT +!! dimcprj(natom)=Number of nlm elements in the matrix elements for i=1,...,natom. +!! +!! SOURCE + +subroutine pawcprj_getdim(dimcprj,natom,nattyp,ntypat,typat,Pawtab,sort_mode) + +!Arguments ------------------------------------ + integer,intent(in) :: natom,ntypat + character(len=*),intent(in) :: sort_mode +!arrays + integer,intent(in) :: nattyp(:),typat(natom) + integer,intent(inout) :: dimcprj(natom) + type(Pawtab_type),intent(in) :: Pawtab(ntypat) + +!Local variables------------------------------- + integer :: iatom,itypat + character(len=500) :: msg + +! ************************************************************************* + + SELECT CASE (sort_mode(1:1)) + + CASE ("o","O") ! Ordered by atom-type + + iatom=0 + do itypat=1,ntypat + dimcprj(iatom+1:iatom+nattyp(itypat))=Pawtab(itypat)%lmn_size + iatom=iatom+nattyp(itypat) + end do + + CASE ("r","R") ! Randomly ordered (typat from input file) + + do iatom=1,natom + itypat=typat(iatom) + dimcprj(iatom)=Pawtab(itypat)%lmn_size + end do + + CASE DEFAULT + msg='Wrong value for sort_mode: '//TRIM(sort_mode) + LIBPAW_ERROR(msg) + END SELECT + +end subroutine pawcprj_getdim +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawcprj/paw_overlap +!! NAME +!! paw_overlap +!! +!! FUNCTION +!! Helper function returning the onsite contribution to the overlap between two states. +!! +!! INPUTS +!! spinor_comm= (optional) communicator over spinorial components +!! typat(:)=The type of each atom. +!! Pawtab(ntypat)=paw tabulated starting data. +!! cprj1,cprj2 +!! Projected wave functions with all NL projectors for the left and the right wavefunction,respectively. +!! +!! OUTPUT +!! +!! SOURCE + +function paw_overlap(cprj1,cprj2,typat,pawtab,spinor_comm) result(onsite) + +!Arguments ------------------------------------ +!scalars + integer,intent(in),optional :: spinor_comm +!arrays + integer,intent(in) :: typat(:) + real(dp) :: onsite(2) + type(pawcprj_type),intent(in) :: cprj1(:,:),cprj2(:,:) + type(pawtab_type),intent(in) :: pawtab(:) + +!Local variables------------------------------- +!scalars + integer :: iatom,ilmn,itypat,j0lmn,jlmn,klmn,natom,nspinor,isp + real(dp) :: sij + character(len=500) :: msg +!arrays + +! ************************************************************************* + + natom=SIZE(typat) + + if (SIZE(cprj1,DIM=1)/=SIZE(cprj2,DIM=1) .or. SIZE(cprj1,DIM=1)/=natom) then + write(msg,'(a,3i4)')' Wrong size in typat, cprj1, cprj2 : ',natom,SIZE(cprj1),SIZE(cprj2) + LIBPAW_ERROR(msg) + end if + + nspinor = SIZE(cprj1,DIM=2) + + onsite=zero + do iatom=1,natom + itypat=typat(iatom) + do jlmn=1,pawtab(itypat)%lmn_size + j0lmn=jlmn*(jlmn-1)/2 + do ilmn=1,jlmn + klmn=j0lmn+ilmn + sij=pawtab(itypat)%sij(klmn); if (jlmn==ilmn) sij=sij*half + if (ABS(sij)>tol16) then + do isp=1,nspinor + + onsite(1)=onsite(1) + sij*( & +& cprj1(iatom,isp)%cp(1,ilmn) * cprj2(iatom,isp)%cp(1,jlmn) & +& +cprj1(iatom,isp)%cp(2,ilmn) * cprj2(iatom,isp)%cp(2,jlmn) & +& +cprj1(iatom,isp)%cp(1,jlmn) * cprj2(iatom,isp)%cp(1,ilmn) & +& +cprj1(iatom,isp)%cp(2,jlmn) * cprj2(iatom,isp)%cp(2,ilmn) & +& ) + + onsite(2)=onsite(2) + sij*( & +& cprj1(iatom,isp)%cp(1,ilmn) * cprj2(iatom,isp)%cp(2,jlmn) & +& -cprj1(iatom,isp)%cp(2,ilmn) * cprj2(iatom,isp)%cp(1,jlmn) & +& +cprj1(iatom,isp)%cp(1,jlmn) * cprj2(iatom,isp)%cp(2,ilmn) & +& -cprj1(iatom,isp)%cp(2,jlmn) * cprj2(iatom,isp)%cp(1,ilmn) & +& ) + end do + end if + end do + end do + end do + + if (present(spinor_comm)) then + call xmpi_sum(onsite,spinor_comm,isp) + end if + +end function paw_overlap +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawcprj/pawcprj_pack +!! NAME +!! pawcprj_pack +!! +!! FUNCTION +!! Pack structured data into a simple buffer +!! +!! INPUTS +!! nlmn(natom)=Number of nlm partial waves for each atom. +!! ncpgr = number of gradients in cprj_out +!! cprj= The datatype to be packed. +!! +!! OUTPUT +!! buffer = the data packed, dim : (2, n2dim*sum(nlmn)) +!! [buffer_gr] = if present the gradient data packed, dim : (2, ncpgr, n2dim*sum(nlmn)) +!! +!! SOURCE + +subroutine pawcprj_pack(nlmn,cprj,buffer,buffer_gr) + +!Arguments ------------------------------------ +!scalars +!arrays + integer,intent(in) :: nlmn(:) + type(pawcprj_type),intent(in) :: cprj(:,:) + real(dp),intent(out) :: buffer(:,:) + real(dp),intent(out),optional :: buffer_gr(:,:,:) + +!Local variables------------------------------- +!scalars + integer :: natom,n2buffer,ncpgr,n2dim + integer :: iat,jj,n1dim,nn + integer :: ipck + character(len=100) :: msg +!arrays + +! ************************************************************************* + + natom=size(nlmn,dim=1) + n2buffer=size(buffer,dim=2) + n1dim=size(cprj,dim=1) + n2dim=size(cprj,dim=2) + + if (natom/=n1dim) then + msg='size mismatch in natom (pawcprj_pack)!' + LIBPAW_BUG(msg) + end if + if (n2dim*SUM(nlmn)/=n2buffer) then + msg='size mismatch in dim=2 (pawcprj_pack)!' + LIBPAW_BUG(msg) + end if + ncpgr=0 + if (present(buffer_gr)) then + ncpgr=size(buffer_gr,dim=2) + end if + +!=== Pack cprj ==== + ipck=0 + do jj=1,n2dim + do iat=1,natom + nn=nlmn(iat) + buffer(:,ipck+1:ipck+nn)=cprj(iat,jj)%cp(:,1:nn) + if (ncpgr/=0) then + buffer_gr(:,:,ipck+1:ipck+nn)=cprj(iat,jj)%dcp(:,:,1:nn) + end if + ipck=ipck+nn + end do + end do + +end subroutine pawcprj_pack +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawcprj/pawcprj_unpack +!! NAME +!! pawcprj_unpack +!! +!! FUNCTION +!! Unpack structured data from a simple buffer +!! +!! INPUTS +!! nlmn(natom)=Number of nlm partial waves for each atom. +!! ncpgr = number of gradients in cprj_in +!! buffer = the data to be unpacked, dim : (2, n2dim*sum(nlmn)) +!! [buffer_gr] = if present the gradient data to be unpacked, dim : (2, ncpgr, n2dim*sum(nlmn)) +!! +!! OUTPUT +!! cprj=The datatype unpacked +!! +!! SOURCE + +subroutine pawcprj_unpack(nlmn,cprj,buffer,buffer_gr) + +!Arguments ------------------------------------ +!scalars +!arrays + integer,intent(in) :: nlmn(:) + real(dp),intent(in) :: buffer(:,:) + real(dp),intent(in),optional :: buffer_gr(:,:,:) + type(pawcprj_type),intent(inout) :: cprj(:,:) + +!Local variables------------------------------- +!scalars + integer :: natom,n2buffer,ncpgr,n2dim + integer :: iat,jj,n1dim,nn + integer :: ipck + character(len=100) :: msg +!arrays + +! ************************************************************************* + + natom=size(nlmn,dim=1) + n2buffer=size(buffer,dim=2) + n1dim=size(cprj,dim=1) + n2dim=size(cprj,dim=2) + + if (natom/=n1dim) then + msg='size mismatch in natom (pawcprj_unpack)!' + LIBPAW_BUG(msg) + end if + if (n2dim*SUM(nlmn)/=n2buffer) then + msg='size mismatch in dim=2 (pawcprj_unpack)!' + LIBPAW_BUG(msg) + end if + ncpgr=0 + if (present(buffer_gr)) then + ncpgr=size(buffer_gr,dim=2) + end if + +!=== Unpack buffers into cprj === + ipck=0 + do jj=1,n2dim + do iat=1,natom + nn=nlmn(iat) + cprj(iat,jj)%cp(:,1:nn)=buffer(:,ipck+1:ipck+nn) + if (ncpgr/=0) then + cprj(iat,jj)%dcp(:,:,1:nn)=buffer_gr(:,:,ipck+1:ipck+nn) + end if + ipck=ipck+nn + end do + end do + +end subroutine pawcprj_unpack + +end module m_pawcprj +!!*** diff --git a/GX-PAW/libpaw/src/m_pawcprj.o b/GX-PAW/libpaw/src/m_pawcprj.o new file mode 100644 index 00000000..a339e19e Binary files /dev/null and b/GX-PAW/libpaw/src/m_pawcprj.o differ diff --git a/GX-PAW/libpaw/src/m_pawdij.F90 b/GX-PAW/libpaw/src/m_pawdij.F90 new file mode 100644 index 00000000..39374b03 --- /dev/null +++ b/GX-PAW/libpaw/src/m_pawdij.F90 @@ -0,0 +1,5738 @@ +!!****m* ABINIT/m_pawdij +!! NAME +!! m_pawdij +!! +!! FUNCTION +!! This module contains several routines used to compute the PAW pseudopotential +!! strengths Dij. The Dijs define the non-local PAW operator: +!! VNL = Sum_ij [ Dij |pi>0) +!! enunit=choice for units of output Dij +!! gprimd(3,3)=dimensional primitive translations for reciprocal space +!! [hyb_mixing, hyb_mixing_sr]= -- optional-- mixing factors for the global (resp. screened) XC hybrid functional +!! ipert=index of perturbation (used only for RF calculation ; set ipert<=0 for GS calculations. +!! my_natom=number of atoms treated by current processor +!! natom=total number of atoms in cell +!! nfft=number of real space grid points (for current proc) +!! nfftot=total number of real space grid points +!! nspden=number of spin-density components +!! ntypat=number of types of atoms in unit cell. +!! paw_an(my_natom) =paw arrays given on angular mesh +!! paw_ij(my_natom) =paw arrays given on (i,j) channels +!! pawang =paw angular mesh and related data +!! pawfgrtab(my_natom) =atomic data given on fine rectangular grid +!! pawprtvol=control print volume and debugging output for PAW +!! pawrad(ntypat) =paw radial mesh and related data +!! pawrhoij(my_natom) = paw rhoij occupancies and related data +!! pawspnorb=flag: 1 if spin-orbit coupling is activated +!! pawtab(ntypat) =paw tabulated starting data +!! pawxcdev=Choice of XC development (0=no dev. (use of angular mesh) ; 1 or 2=dev. on moments) +!! qphon(3)=wavevector of the phonon +!! spnorbscl=scaling factor for spin-orbit coupling +!! ucvol=unit cell volume +!! vtrial(cplex*nfft,nspden)=GS potential on real space grid +!! vxc(cplex*nfft,nspden)=XC potential (Hartree) on real space grid +!! xred(3,my_natom)= reduced atomic coordinates +!! ======== Optional arguments ============== +!! Parallelism over atomic sites: +!! mpi_atmtab(:)=indexes of the atoms treated by current proc +!! comm_atom=MPI communicator over atoms +!! mpi_comm_grid=MPI communicator over real space grid points +!! Application of a potential energy shift on atomic sites: +!! natvshift=number of atomic potential energy shifts (per atom) ; default=0 +!! atvshift(natvshift,nsppol,natom)=potential energy shift for lm channel & spin & atom +!! fatvshift=factor that multiplies atvshift +!! Electrons-positron 2-component DFT: +!! electronpositron_calctype=type of calculation for electron-positron 2component-DFT: +!! 0: standard DFT (no positron) ; default value +!! 1: positron in the constant electrons potential +!! 2: electrons in the constant positron potential +!! electronpositron_pawrhoij(my_natom) = +!! PAW occupation matrix of the "constant" particle(s) +!! (electrons if calctype=1, positron if calctype=2) +!! electronpositron_lmselect(lmmax,my_natom)= +!! Flags selecting the non-zero LM-moments of on-site densities +!! for the "constant" particle(s) +!! (electrons if calctype=1, positron if calctype=2) +!! +!! OUTPUT +!! paw_ij(iatom)%dij(cplex_dij*qphase*lmn2_size,ndij)= total Dij terms (GS calculation, ipert=0) +!! total 1st-order Dij terms (RF ccalc., ipert>0) +!! May be complex if cplex_dij=2 +!! dij(:,1) contains Dij^up-up +!! dij(:,2) contains Dij^dn-dn +!! dij(:,3) contains Dij^up-dn (only if nspinor=2) +!! dij(:,4) contains Dij^dn-up (only if nspinor=2) +!! May also compute paw_ij(iatom)%dij0,paw_ij(iatom)%dijhartree,paw_ij(iatom)%dijxc, +!! paw_ij(iatom)%dijxc_hat,paw_ij(iatom)%dijxc_val, +!! paw_ij(iatom)%dijhat,paw_ij(iatom)dijso, +!! paw_ij(iatom)%dijU,paw_ij(iatom)%dijexxc,paw_ij(iatom)%dijfock +!! +!! NOTES +!! Response function calculations: +!! In order to compute first-order Dij, paw_an (resp. paw_ij) datastructures +!! must contain first-order quantities, namely paw_an1 (resp. paw_ij1). +!! +!! SOURCE + +subroutine pawdij(cplex,enunit,gprimd,ipert,my_natom,natom,nfft,nfftot,nspden,ntypat,& +& paw_an,paw_ij,pawang,pawfgrtab,pawprtvol,pawrad,pawrhoij,pawspnorb,pawtab,& +& pawxcdev,qphon,spnorbscl,ucvol,charge,vtrial,vxc,xred,& +& electronpositron_calctype,electronpositron_pawrhoij,electronpositron_lmselect,& +& atvshift,fatvshift,natvshift,nucdipmom,& +& mpi_atmtab,comm_atom,mpi_comm_grid,hyb_mixing,hyb_mixing_sr) + +!Arguments --------------------------------------------- +!scalars + integer,intent(in) :: cplex,enunit,ipert,my_natom,natom,nfft,nfftot + integer,intent(in) :: nspden,ntypat,pawprtvol,pawspnorb,pawxcdev + integer,optional,intent(in) :: electronpositron_calctype + integer,optional,intent(in) :: comm_atom,mpi_comm_grid,natvshift + real(dp),intent(in) :: spnorbscl,ucvol,charge + real(dp),intent(in),optional ::fatvshift,hyb_mixing,hyb_mixing_sr + type(pawang_type),intent(in) :: pawang +!arrays + integer,optional,target,intent(in) :: mpi_atmtab(:) + logical,optional,intent(in) :: electronpositron_lmselect(:,:) + real(dp),intent(in) :: gprimd(3,3),qphon(3) + real(dp),intent(in) :: vxc(:,:),xred(3,natom) + real(dp),intent(in),target :: vtrial(cplex*nfft,nspden) + real(dp),intent(in),optional :: atvshift(:,:,:) + real(dp),intent(in),optional :: nucdipmom(3,natom) + type(paw_an_type),intent(in) :: paw_an(my_natom) + type(paw_ij_type),target,intent(inout) :: paw_ij(my_natom) + type(pawfgrtab_type),intent(inout) :: pawfgrtab(my_natom) + type(pawrad_type),intent(in) :: pawrad(ntypat) + type(pawrhoij_type),intent(inout) :: pawrhoij(my_natom) + type(pawrhoij_type),intent(in),optional :: electronpositron_pawrhoij(:) + type(pawtab_type),intent(in) :: pawtab(ntypat) + +!Local variables --------------------------------------- +!scalars +!Possible algos for PAW+U: 1=using occupation matrix n_i,,2=using PAW matrix rho_ij + integer, parameter :: PAWU_ALGO_1=1,PAWU_ALGO_2=2 + integer, parameter :: PAWU_FLL=1,PAWU_AMF=2 + integer :: cplex_dij,iatom,iatom_tot,idij,ipositron,itypat,klmn,klmn1,lm_size,lmn2_size + integer :: lpawu,my_comm_atom,my_comm_grid,natvshift_,ndij,nsploop,nsppol + integer :: pawu_algo,pawu_dblec,qphase,usekden,usepawu,usexcnhat + logical :: dij_available,dij_need,dij_prereq + logical :: dij0_available,dij0_need,dij0_prereq + logical :: dijexxc_available,dijexxc_need,dijexxc_prereq + logical :: dijfock_available,dijfock_need,dijfock_prereq + logical :: dijhartree_available,dijhartree_need,dijhartree_prereq + logical :: dijhat_available,dijhat_need,dijhat_prereq + logical :: dijhatfr_available,dijhatfr_need,dijhatfr_prereq + logical :: dijnd_available,dijnd_need,dijnd_prereq + logical :: dijso_available,dijso_need,dijso_prereq + logical :: dijxc_available,dijxc_need,dijxc_prereq + logical :: dijxchat_available,dijxchat_need,dijxchat_prereq + logical :: dijxcval_available,dijxcval_need,dijxcval_prereq + logical :: dijU_available,dijU_need,dijU_prereq + logical :: has_nucdipmom,my_atmtab_allocated + logical :: need_to_print,paral_atom,v_dijhat_allocated + real(dp) :: hyb_mixing_,hyb_mixing_sr_ + character(len=500) :: msg +!arrays + integer,pointer :: my_atmtab(:) + logical,allocatable :: lmselect(:) + real(dp),allocatable :: dij0(:),dijhartree(:) + real(dp),allocatable :: dijhat(:,:),dijexxc(:,:),dijfock_cv(:,:),dijfock_vv(:,:),dijpawu(:,:) + real(dp),allocatable :: dijnd(:,:),dijso(:,:) + real(dp),allocatable :: dijxc(:,:),dij_ep(:),dijxchat(:,:),dijxcval(:,:) + real(dp),pointer :: v_dijhat(:,:),vpawu(:,:,:,:),vpawx(:,:,:) + +! ************************************************************************* + +!------------------------------------------------------------------------ +!----- Check consistency of arguments +!------------------------------------------------------------------------ + +! === Check optional arguments === + + hyb_mixing_ =zero ; if(present(hyb_mixing)) hyb_mixing_ =hyb_mixing + hyb_mixing_sr_=zero ; if(present(hyb_mixing_sr)) hyb_mixing_sr_=hyb_mixing_sr + + natvshift_=0;if (present(natvshift)) natvshift_=natvshift + if (natvshift_>0) then + if ((.not.present(atvshift)).or.(.not.present(fatvshift))) then + msg='when natvshift>0, atvshift and fatvshift arguments must be present!' + LIBPAW_BUG(msg) + end if + end if + + ipositron=0;if (present(electronpositron_calctype)) ipositron=electronpositron_calctype + if (ipositron/=0) then + if ((.not.present(electronpositron_pawrhoij)).or.& +& (.not.present(electronpositron_lmselect))) then + msg='ep_pawrhoij and ep_lmselect must be present for electron-positron calculations!' + LIBPAW_BUG(msg) + end if + end if + + has_nucdipmom=present(nucdipmom) + +! === Check complex character of arguments === + + if (nspden==4.and.cplex==2) then + msg='nspden=4 probably not compatible with cplex=2!' + LIBPAW_BUG(msg) + end if + if (my_natom>0) then + if (paw_ij(1)%ndij==4.and.paw_ij(1)%cplex_dij/=2) then + msg='invalid cplex size for Dij (4 Dij components)!' + LIBPAW_BUG(msg) + end if + if (paw_ij(1)%qphase/=paw_an(1)%cplex) then + msg='paw_ij()%qphase and paw_an()%cplex must be equal!' + LIBPAW_BUG(msg) + end if + if (ipert<=0.and.paw_ij(1)%qphase/=1) then + msg='qphase must be 1 for GS calculations!' + LIBPAW_BUG(msg) + end if + if (ipert>0.and.paw_ij(1)%qphase/=cplex) then + msg='paw_ij()%qphase must be equal to cplex!' + LIBPAW_BUG(msg) + end if + if (paw_an(1)%has_vxcval>0.and.paw_an(1)%has_vxctau==2) then + msg='kinetic energy density not available for vxc_val!' + LIBPAW_BUG(msg) + end if + end if + +!------------------------------------------------------------------------ +!----- Initializations +!------------------------------------------------------------------------ + +!Nothing to do for some perturbations (RF case) + if (ipert==natom+1.or.ipert==natom+10) then + do iatom=1,my_natom + if (paw_ij(iatom)%has_dij==1) paw_ij(iatom)%dij=zero + if (paw_ij(iatom)%has_dij0==1) paw_ij(iatom)%dij0=zero + if (paw_ij(iatom)%has_dijfock==1) paw_ij(iatom)%dijfock=zero + if (paw_ij(iatom)%has_dijhartree==1) paw_ij(iatom)%dijhartree=zero + if (paw_ij(iatom)%has_dijxc==1) paw_ij(iatom)%dijxc=zero + if (paw_ij(iatom)%has_dijhat==1) paw_ij(iatom)%dijhat=zero + if (paw_ij(iatom)%has_dijso==1) paw_ij(iatom)%dijso=zero + if (paw_ij(iatom)%has_dijU==1) paw_ij(iatom)%dijU=zero + if (paw_ij(iatom)%has_dijexxc==1) paw_ij(iatom)%dijexxc=zero + if (paw_ij(iatom)%has_dijxc_hat==1) paw_ij(iatom)%dijxc_hat=zero + if (paw_ij(iatom)%has_dijxc_val==1) paw_ij(iatom)%dijxc_val=zero + end do + return + end if + +!Set up parallelism over atoms + paral_atom=(present(comm_atom).and.(my_natom/=natom)) + nullify(my_atmtab);if (present(mpi_atmtab)) my_atmtab => mpi_atmtab + my_comm_atom=xmpi_comm_self;if (present(comm_atom)) my_comm_atom=comm_atom + call get_my_atmtab(my_comm_atom,my_atmtab,my_atmtab_allocated,paral_atom,natom,my_natom_ref=my_natom) + +!----- Various initializations + nsppol=1;nsploop=1 + if (my_natom>0) then + nsppol=paw_ij(1)%nsppol + nsploop=nsppol;if (paw_ij(1)%ndij==4) nsploop=4 + end if + usexcnhat=maxval(pawtab(1:ntypat)%usexcnhat) + my_comm_grid=xmpi_comm_self;if (present(mpi_comm_grid)) my_comm_grid=mpi_comm_grid + +!------ Select potential for Dij^hat computation + v_dijhat_allocated=.false. + if (my_natom>0) then + if ((paw_ij(1)%has_dij==1).or.(paw_ij(1)%has_dijhat==1).or. & +& (paw_ij(1)%has_dijhat==0.and.pawprtvol/=0)) then + if (usexcnhat==0) then + if (size(vxc,1)/=cplex*nfft.or.size(vxc,2)/=nspden) then + msg='invalid size for vxc!' + LIBPAW_BUG(msg) + end if + LIBPAW_POINTER_ALLOCATE(v_dijhat,(cplex*nfft,nspden)) + v_dijhat_allocated=.true. + !v_dijhat=vtrial-vxc + do idij=1,nspden + do klmn=1,cplex*nfft + v_dijhat(klmn,idij)=vtrial(klmn,idij)-vxc(klmn,idij) + end do + end do + else + v_dijhat => vtrial + end if + end if + end if + +!------------------------------------------------------------------------ +!----- Loop over atoms +!------------------------------------------------------------------------ + + do iatom=1,my_natom + iatom_tot=iatom;if (paral_atom) iatom_tot=my_atmtab(iatom) + +! === Atom-dependent data === + + itypat=paw_ij(iatom)%itypat + cplex_dij=paw_ij(iatom)%cplex_dij + qphase=paw_ij(iatom)%qphase + lm_size=paw_an(iatom)%lm_size + lmn2_size=paw_ij(iatom)%lmn2_size + ndij=paw_ij(iatom)%ndij + usepawu=pawtab(itypat)%usepawu + pawu_algo=merge(PAWU_ALGO_1,PAWU_ALGO_2,ipert<=0.and.usepawu>=0) + pawu_dblec=merge(PAWU_FLL,PAWU_AMF,abs(usepawu)==1.or.abs(usepawu)==4) + usekden=merge(0,1,paw_an(iatom)%has_vxctau/=2) + need_to_print=((abs(pawprtvol)>=1).and. & +& (iatom_tot==1.or.iatom_tot==natom.or.pawprtvol<0)) + +! === Determine which conditions and prerequisites are fulfilled for Dij === + + if (my_natom>0) then +! Total Dij: no condition ; no prerequisites + dij_available=.true.;dij_prereq=.true. +! Dij0: not available for RF ; need kij for the positron + dij0_available=(ipert<=0);dij0_prereq=(ipositron/=1.or.pawtab(itypat)%has_kij==2) +! DijFock:not available for RF, positron; only for Fock exact exch. ; Vxc_ex needed + dijfock_available=(paw_ij(iatom)%has_dijfock>0.and.ipert<=0.and.ipositron/=1) + dijfock_prereq=(paw_ij(iatom)%has_dijfock==2) +! DijHartree: no condition ; no prerequisites + dijhartree_available=.true.;dijhartree_prereq=.true. +! DijXC: no condition ; Vxc needed + dijxc_available=.true. + dijxc_prereq=(paw_ij(iatom)%has_dijxc==2.or.paw_an(iatom)%has_vxc>0) +! Dij^hat: no condition ; no prerequisites + dijhat_available=.true.;dijhat_prereq=.true. +! Dij^hat_FR: only for RF and when it was previously computed + dijhatfr_available=(ipert>0.and.paw_ij(iatom)%has_dijfr==2) ; dijhatfr_prereq=.true. +! DijND: requires non-zero nucdipmom + dijnd_available=.false. ; dijnd_prereq=(cplex_dij==2) + if (has_nucdipmom) dijnd_available=(any(abs(nucdipmom(:,iatom))>tol8)) +! DijSO: not available for RF, positron; only for spin-orbit ; VHartree and Vxc needed + dijso_available=(pawspnorb>0.and.ipert<=0.and.ipositron/=1) + dijso_prereq=(paw_ij(iatom)%has_dijso==2.or.& +& (paw_an(iatom)%has_vhartree>0.and.paw_an(iatom)%has_vxc>0)) +! DijU: not available for positron; only for DFT+U + dijU_available=(pawtab(itypat)%usepawu/=0.and.ipositron/=1) + dijU_prereq=(paw_ij(iatom)%has_dijU==2.or.paw_ij(iatom)%has_pawu_occ>0.or. & +& (paw_ij(iatom)%has_dijU>0)) +! DijExxc: not available for RF, positron; only for local exact exch. ; Vxc_ex needed + dijexxc_available=(pawtab(itypat)%useexexch/=0.and.ipert<=0.and.ipositron/=1) + dijexxc_prereq=(paw_ij(iatom)%has_dijexxc==2.or.paw_ij(iatom)%has_exexch_pot>0) +! DijXC^hat: not available for RF ; Vxc needed + dijxchat_available=(ipert<=0) + dijxchat_prereq=(paw_ij(iatom)%has_dijxc_hat==2.or.paw_an(iatom)%has_vxc>0) +! DijXC_val: not available for RF ; Vxc_val needed + dijxcval_available=(ipert<=0) + dijxcval_prereq=(paw_ij(iatom)%has_dijxc_val==2.or.paw_an(iatom)%has_vxcval>0) + end if + +! === Determine which parts of Dij have to be computed === + + dij_need=.false.;dij0_need=.false.;dijexxc_need=.false.;dijfock_need=.false. + dijhartree_need=.false.;dijhat_need=.false.;dijhatfr_need=.false.; + dijso_need=.false.;dijU_need=.false.;dijxc_need=.false. + dijxchat_need=.false.;dijxcval_need=.false.; dijnd_need=.false. + + if (dij_available) then + if (paw_ij(iatom)%has_dij==1) then + dij_need=.true.;paw_ij(iatom)%dij(:,:)=zero + else if (paw_ij(iatom)%has_dij==0.and.need_to_print) then + LIBPAW_ALLOCATE(paw_ij(iatom)%dij,(cplex_dij*qphase*lmn2_size,ndij)) + dij_need=.true.;paw_ij(iatom)%dij(:,:)=zero + paw_ij(iatom)%has_dij=-1 + end if + else if (paw_ij(iatom)%has_dij==1) then + paw_ij(iatom)%dij=zero + end if + + if (dij0_available) then + if (paw_ij(iatom)%has_dij0==1) then + dij0_need=.true.;paw_ij(iatom)%dij0(:)=zero + else if (paw_ij(iatom)%has_dij0==0.and.need_to_print) then + LIBPAW_ALLOCATE(paw_ij(iatom)%dij0,(lmn2_size)) + dij0_need=.true.;paw_ij(iatom)%dij0(:)=zero + paw_ij(iatom)%has_dij0=-1 + end if + else if (paw_ij(iatom)%has_dij0==1) then + paw_ij(iatom)%dij0=zero + end if + + if (dijfock_available) then + if (paw_ij(iatom)%has_dijfock==1) then + dijfock_need=.true.;paw_ij(iatom)%dijfock(:,:)=zero + else if (paw_ij(iatom)%has_dijfock==0.and.need_to_print) then + LIBPAW_ALLOCATE(paw_ij(iatom)%dijfock,(cplex_dij*lmn2_size,ndij)) + dijfock_need=.true.;paw_ij(iatom)%dijfock(:,:)=zero + paw_ij(iatom)%has_dijfock=-1 + end if + else if (paw_ij(iatom)%has_dijfock==1) then + paw_ij(iatom)%dijfock=zero + end if + + if (dijhartree_available) then + if (paw_ij(iatom)%has_dijhartree==1) then + dijhartree_need=.true.;paw_ij(iatom)%dijhartree(:)=zero + else if (paw_ij(iatom)%has_dijhartree==0) then + LIBPAW_ALLOCATE(paw_ij(iatom)%dijhartree,(qphase*lmn2_size)) + dijhartree_need=.true.;paw_ij(iatom)%dijhartree(:)=zero + paw_ij(iatom)%has_dijhartree=-1 + end if + else if (paw_ij(iatom)%has_dijhartree==1) then + paw_ij(iatom)%dijhartree=zero + end if + + if (dijxc_available) then + if (paw_ij(iatom)%has_dijxc==1) then + dijxc_need=.true.;paw_ij(iatom)%dijxc(:,:)=zero + else if (paw_ij(iatom)%has_dijxc==0.and.need_to_print) then + LIBPAW_ALLOCATE(paw_ij(iatom)%dijxc,(cplex_dij*qphase*lmn2_size,ndij)) + dijxc_need=.true.;paw_ij(iatom)%dijxc(:,:)=zero + paw_ij(iatom)%has_dijxc=-1 + end if + else if (paw_ij(iatom)%has_dijxc==1) then + paw_ij(iatom)%dijxc=zero + end if + + if (dijhat_available) then + if (paw_ij(iatom)%has_dijhat==1) then + dijhat_need=.true.;paw_ij(iatom)%dijhat(:,:)=zero + else if (paw_ij(iatom)%has_dijhat==0.and.need_to_print) then + LIBPAW_ALLOCATE(paw_ij(iatom)%dijhat,(cplex_dij*qphase*lmn2_size,ndij)) + dijhat_need=.true.;paw_ij(iatom)%dijhat(:,:)=zero + paw_ij(iatom)%has_dijhat=-1 + end if + else if (paw_ij(iatom)%has_dijhat==1) then + paw_ij(iatom)%dijhat=zero + end if + + if (dijnd_available) then + if (paw_ij(iatom)%has_dijnd==1) then + dijnd_need=.true.;paw_ij(iatom)%dijnd(:,:)=zero + else if (paw_ij(iatom)%has_dijnd==0.and.need_to_print) then + LIBPAW_ALLOCATE(paw_ij(iatom)%dijnd,(cplex_dij*lmn2_size,ndij)) + dijnd_need=.true.;paw_ij(iatom)%dijnd(:,:)=zero + paw_ij(iatom)%has_dijnd=-1 + end if + else if (paw_ij(iatom)%has_dijnd==1) then + paw_ij(iatom)%dijnd=zero + end if + + if (dijso_available) then + if (paw_ij(iatom)%has_dijso==1) then + dijso_need=.true.;paw_ij(iatom)%dijso(:,:)=zero + else if (paw_ij(iatom)%has_dijso==0.and.need_to_print) then + LIBPAW_ALLOCATE(paw_ij(iatom)%dijso,(cplex_dij*qphase*lmn2_size,ndij)) + dijso_need=.true.;paw_ij(iatom)%dijso(:,:)=zero + paw_ij(iatom)%has_dijso=-1 + end if + else if (paw_ij(iatom)%has_dijso==1) then + paw_ij(iatom)%dijso=zero + end if + + if (dijU_available) then + if (paw_ij(iatom)%has_dijU==1) then + dijU_need=.true.;paw_ij(iatom)%dijU(:,:)=zero + else if (paw_ij(iatom)%has_dijU==0.and.need_to_print) then + LIBPAW_ALLOCATE(paw_ij(iatom)%dijU,(cplex_dij*qphase*lmn2_size,ndij)) + dijU_need=.true.;paw_ij(iatom)%dijU(:,:)=zero + paw_ij(iatom)%has_dijU=-1 + end if + else if (paw_ij(iatom)%has_dijU==1) then + paw_ij(iatom)%dijU=zero + end if + + if (dijexxc_available.and.paw_ij(iatom)%has_dijexxc/=2) then + if (paw_ij(iatom)%has_dijexxc==1) then + dijexxc_need=.true.;paw_ij(iatom)%dijexxc(:,:)=zero + else if (paw_ij(iatom)%has_dijexxc==0.and.need_to_print) then + LIBPAW_ALLOCATE(paw_ij(iatom)%dijexxc,(cplex_dij*lmn2_size,ndij)) + dijexxc_need=.true.;paw_ij(iatom)%dijexxc(:,:)=zero + paw_ij(iatom)%has_dijexxc=-1 + end if + else if (paw_ij(iatom)%has_dijexxc==1) then + paw_ij(iatom)%dijexxc=zero + end if + + if (dijxchat_available) then + if (paw_ij(iatom)%has_dijxc_hat==1) then + dijxchat_need=.true.;paw_ij(iatom)%dijxc_hat(:,:)=zero +! else if (paw_ij(iatom)%has_dijxc_hat==0.and.need_to_print) then +! LIBPAW_ALLOCATE(paw_ij(iatom)%dijxc_hat,(cplex_dij*qphase*lmn2_size,ndij)) +! dijxchat_need=.true.;paw_ij(iatom)%dijxc_hat(:,:)=zero +! paw_ij(iatom)%has_dijxc_hat=-1 + end if + else if (paw_ij(iatom)%has_dijxc_hat==1) then + paw_ij(iatom)%dijxc_hat=zero + end if + + if (dijxcval_available) then + if (paw_ij(iatom)%has_dijxc_val==1) then + dijxcval_need=.true.;paw_ij(iatom)%dijxc_val(:,:)=zero +! else if (paw_ij(iatom)%has_dijxc_val==0.and.need_to_print) then +! LIBPAW_ALLOCATE(paw_ij(iatom)%dijxc_val,(cplex_dij*qphase*lmn2_size,ndij)) +! dijxcval_need=.true.;paw_ij(iatom)%dijxc_val(:,:)=zero +! paw_ij(iatom)%has_dijxc_val=-1 + end if + else if (paw_ij(iatom)%has_dijxc_val==1) then + paw_ij(iatom)%dijxc_val=zero + end if + +! === Print error messages if prerequisites are not fulfilled === + + if (dij_need.and.(.not.dij_prereq)) then + msg='Dij prerequisites missing!' + LIBPAW_BUG(msg) + end if + if (dij0_need.and.(.not.dij0_prereq)) then + msg='Dij0 prerequisites missing!' + LIBPAW_BUG(msg) + end if + if (dijfock_need.and.(.not.dijfock_prereq)) then + msg='DijFock prerequisites missing!' + LIBPAW_BUG(msg) + end if + + if (dijhartree_need.and.(.not.dijhartree_prereq)) then + msg='DijHartree prerequisites missing!' + LIBPAW_BUG(msg) + end if + if (dijxc_need.and.(.not.dijxc_prereq)) then + msg='Dij^XC prerequisites missing!' + LIBPAW_BUG(msg) + end if + if (dijhat_need.and.(.not.dijhat_prereq)) then + msg='Dij^hat prerequisites missing!' + LIBPAW_BUG(msg) + end if + if (dijhatfr_need.and.(.not.dijhatfr_prereq)) then + msg='DijFR^hat prerequisites missing!' + LIBPAW_BUG(msg) + end if + if (dijnd_need.and.(.not.dijnd_prereq)) then + msg='DijND prerequisites missing!' + LIBPAW_BUG(msg) + end if + if (dijso_need.and.(.not.dijso_prereq)) then + msg='DijSO prerequisites missing!' + LIBPAW_BUG(msg) + end if + if (dijU_need.and.(.not.dijU_prereq)) then + msg='DijU prerequisites missing!' + LIBPAW_BUG(msg) + end if + if (dijexxc_need.and.(.not.dijexxc_prereq)) then + msg='DijExcc prerequisites missing!' + LIBPAW_BUG(msg) + end if + if (dijxchat_need.and.(.not.dijxchat_prereq)) then + msg='DijXC^hat prerequisites missing!' + LIBPAW_BUG(msg) + end if + if (dijxcval_need.and.(.not.dijxcval_prereq)) then + msg='DijXC_val prerequisites missing!' + LIBPAW_BUG(msg) + end if + +! ------------------------------------------------------------------------ +! ----------- Add atomic Dij0 to Dij +! ------------------------------------------------------------------------ + + if ((dij0_need.or.dij_need).and.dij0_available) then + + LIBPAW_ALLOCATE(dij0,(lmn2_size)) +! ===== Dij0 already computed + if (paw_ij(iatom)%has_dij0==2) then + dij0(:)=paw_ij(iatom)%dij0(:) + else +! ===== Need to compute Dij0 + dij0(:)=pawtab(itypat)%dij0(:) + if (ipositron==1) dij0(:)=two*pawtab(itypat)%kij(:)-dij0(:) + if (pawu_algo==PAWU_ALGO_2.and.pawu_dblec==PAWU_FLL) dij0(:)=dij0(:)+pawtab(itypat)%euij_fll(:) + if (dij0_need) paw_ij(iatom)%dij0(:)=dij0(:) + end if + + if (dij_need) then + do idij=1,min(nsploop,2) + klmn1=1 + do klmn=1,lmn2_size + paw_ij(iatom)%dij(klmn1,idij)=paw_ij(iatom)%dij(klmn1,idij)+dij0(klmn) + klmn1=klmn1+cplex_dij + end do + end do + end if + LIBPAW_DEALLOCATE(dij0) + end if + +! ------------------------------------------------------------------------ +! ------------------------------------------------------------------------ +! ----------- Add Dij_{Fock exact-exchange} to Dij +! ------------------------------------------------------------------------ + + if ((dijfock_need.or.dij_need).and.dijfock_available) then + +! ===== DijFock already computed + if (paw_ij(iatom)%has_dijfock==2) then + if (dij_need) paw_ij(iatom)%dij(1:cplex_dij*lmn2_size,:)= & +& paw_ij(iatom)%dij(1:cplex_dij*lmn2_size,:) & +& +paw_ij(iatom)%dijfock(1:cplex_dij*lmn2_size,:) + + else + +! ===== Need to compute DijFock + LIBPAW_ALLOCATE(dijfock_vv,(cplex_dij*lmn2_size,ndij)) + LIBPAW_ALLOCATE(dijfock_cv,(cplex_dij*lmn2_size,ndij)) + dijfock_vv(:,:)=zero ; dijfock_cv(:,:)=zero +! Exact exchange is evaluated for electrons only + if (ipositron/=1) then + call pawdijfock(dijfock_vv,dijfock_cv,cplex_dij,qphase,hyb_mixing_,hyb_mixing_sr_, & +& ndij,pawrhoij(iatom),pawtab(itypat)) + end if + if (dijfock_need) paw_ij(iatom)%dijfock(:,:)=dijfock_vv(:,:)+dijfock_cv(:,:) + if (dij_need) paw_ij(iatom)%dij(1:cplex_dij*lmn2_size,:)= & +& paw_ij(iatom)%dij(1:cplex_dij*lmn2_size,:) & +& +dijfock_vv(1:cplex_dij*lmn2_size,:)+dijfock_cv(1:cplex_dij*lmn2_size,:) + LIBPAW_DEALLOCATE(dijfock_vv) + LIBPAW_DEALLOCATE(dijfock_cv) + end if + end if + +! ----------- Add Dij_Hartree to Dij +! ------------------------------------------------------------------------ + + if ((dijhartree_need.or.dij_need).and.dijhartree_available) then + + LIBPAW_ALLOCATE(dijhartree,(qphase*lmn2_size)) +! ===== DijHartree already computed + if (paw_ij(iatom)%has_dijhartree==2) then + dijhartree(:)=paw_ij(iatom)%dijhartree(:) + else +! ===== Need to compute DijHartree + if (ipositron/=1) then + call pawdijhartree(dijhartree,qphase,nspden,pawrhoij(iatom),pawtab(itypat)) + else + dijhartree(:)=zero + end if + if (ipositron/=0) then + LIBPAW_ALLOCATE(dij_ep,(qphase*lmn2_size)) + call pawdijhartree(dij_ep,qphase,nspden,electronpositron_pawrhoij(iatom),pawtab(itypat)) + dijhartree(:)=dijhartree(:)-dij_ep(:) + LIBPAW_DEALLOCATE(dij_ep) + end if + if (dijhartree_need) paw_ij(iatom)%dijhartree(:)=dijhartree(:) + end if + + if (dij_need) then + do idij=1,min(nsploop,2) + klmn1=1 + do klmn=1,qphase*lmn2_size + paw_ij(iatom)%dij(klmn1,idij)=paw_ij(iatom)%dij(klmn1,idij)+dijhartree(klmn) + klmn1=klmn1+cplex_dij + end do + end do + end if + + LIBPAW_DEALLOCATE(dijhartree) + end if + +! ------------------------------------------------------------------------ +! ----------- Add Dij_xc to Dij +! ------------------------------------------------------------------------ + + if ((dijxc_need.or.dij_need).and.dijxc_available) then + +! ===== Dijxc already computed + if (paw_ij(iatom)%has_dijxc==2) then + if (dij_need) paw_ij(iatom)%dij(:,:)=paw_ij(iatom)%dij(:,:)+paw_ij(iatom)%dijxc(:,:) + else + +! ===== Need to compute DijXC + LIBPAW_ALLOCATE(dijxc,(cplex_dij*qphase*lmn2_size,ndij)) + if (pawxcdev/=0) then + LIBPAW_ALLOCATE(lmselect,(lm_size)) + lmselect(:)=paw_an(iatom)%lmselect(:) + if (ipositron/=0) lmselect(:)=(lmselect(:).or.electronpositron_lmselect(1:lm_size,iatom)) + call pawdijxcm(dijxc,cplex_dij,qphase,lmselect,ndij,nspden,nsppol,pawang,& +& pawrad(itypat),pawtab(itypat),paw_an(iatom)%vxc1,& +& paw_an(iatom)%vxct1,usexcnhat) + LIBPAW_DEALLOCATE(lmselect) + else + call pawdijxc(dijxc,cplex_dij,qphase,ndij,nspden,nsppol,& +& pawang,pawrad(itypat),pawtab(itypat),paw_an(iatom)%vxc1,& +& paw_an(iatom)%vxct1,usexcnhat,usekden,& +& vxctau1=paw_an(iatom)%vxctau1,vxcttau1=paw_an(iatom)%vxcttau1) + end if + if (dijxc_need) paw_ij(iatom)%dijxc(:,:)=dijxc(:,:) + if (dij_need) paw_ij(iatom)%dij(:,:)=paw_ij(iatom)%dij(:,:)+dijxc(:,:) + LIBPAW_DEALLOCATE(dijxc) + end if + + end if + +! ------------------------------------------------------------------------ +! ----------- Add Dij_hat to Dij +! ------------------------------------------------------------------------ + + if ((dijhat_need.or.dij_need).and.dijhat_available) then + +! ===== Dijhat already computed + if (paw_ij(iatom)%has_dijhat==2) then + if (dij_need) paw_ij(iatom)%dij(:,:)=paw_ij(iatom)%dij(:,:)+paw_ij(iatom)%dijhat(:,:) + else + +! ===== Need to compute Dijhat + LIBPAW_ALLOCATE(dijhat,(cplex_dij*qphase*lmn2_size,ndij)) + call pawdijhat(dijhat,cplex_dij,qphase,gprimd,iatom_tot,& +& natom,ndij,nfft,nfftot,nspden,nsppol,pawang,pawfgrtab(iatom),& +& pawtab(itypat),v_dijhat,qphon,ucvol,xred,mpi_comm_grid=my_comm_grid) + if (dijhat_need) paw_ij(iatom)%dijhat(:,:)=dijhat(:,:) + if (dij_need) paw_ij(iatom)%dij(:,:)=paw_ij(iatom)%dij(:,:)+dijhat(:,:) + LIBPAW_DEALLOCATE(dijhat) + end if + +! ===== RF: add frozen part of 1st-order Dij + if (dijhatfr_available) then + do idij=1,nsploop + if (dij_need) paw_ij(iatom)%dij(:,idij)=paw_ij(iatom)%dij(:,idij) & +& +paw_ij(iatom)%dijfr(:,idij) + if (dijhat_need) paw_ij(iatom)%dijhat(:,idij)=paw_ij(iatom)%dijhat(:,idij) & +& +paw_ij(iatom)%dijfr(:,idij) + end do + end if + + end if + +! ------------------------------------------------------------------------ +! ----------- Add Dij nuclear dipole moments to Dij +! ------------------------------------------------------------------------ + + if ((dijnd_need.or.dij_need).and.dijnd_available) then + +! ===== Dijnd already computed + if (paw_ij(iatom)%has_dijnd==2) then + if (dij_need) then + paw_ij(iatom)%dij(1:cplex_dij*lmn2_size,:)= & +& paw_ij(iatom)%dij(1:cplex_dij*lmn2_size,:) + & +& paw_ij(iatom)%dijnd(1:cplex_dij*lmn2_size,:) + end if + + else + +! ===== Need to compute Dijnd + LIBPAW_ALLOCATE(dijnd,(cplex_dij*lmn2_size,ndij)) + call pawdijnd(dijnd,cplex_dij,ndij,nucdipmom(:,iatom),pawrad(itypat),pawtab(itypat)) + if (dijnd_need) paw_ij(iatom)%dijnd(:,:)=dijnd(:,:) + if (dij_need) then + paw_ij(iatom)%dij(1:cplex_dij*lmn2_size,:)= & +& paw_ij(iatom)%dij(1:cplex_dij*lmn2_size,:) + & +& dijnd(1:cplex_dij*lmn2_size,:) + end if + LIBPAW_DEALLOCATE(dijnd) + end if + + end if + +! ------------------------------------------------------------------------ +! ----------- Add Dij spin-orbit to Dij +! ------------------------------------------------------------------------ + + if ((dijso_need.or.dij_need).and.dijso_available) then + +! ===== DijSO already computed + if (paw_ij(iatom)%has_dijso==2) then + if (dij_need) paw_ij(iatom)%dij(:,:)=paw_ij(iatom)%dij(:,:)+paw_ij(iatom)%dijso(:,:) + else + +! ===== Need to compute DijSO + LIBPAW_ALLOCATE(dijso,(cplex_dij*qphase*lmn2_size,ndij)) + call pawdijso(dijso,cplex_dij,qphase,ndij,nspden,& +& pawang,pawrad(itypat),pawtab(itypat),pawxcdev,spnorbscl,& +& paw_an(iatom)%vh1,paw_an(iatom)%vxc1) + if (dijso_need) paw_ij(iatom)%dijso(:,:)=dijso(:,:) + if (dij_need) paw_ij(iatom)%dij(:,:)=paw_ij(iatom)%dij(:,:)+dijso(:,:) + LIBPAW_DEALLOCATE(dijso) + end if + + end if + +! ------------------------------------------------------------------------ +! ----------- Add Dij_{DFT+U} to Dij +! ------------------------------------------------------------------------ + + if ((dijU_need.or.dij_need).and.dijU_available) then + +! ===== DijU already computed + if (paw_ij(iatom)%has_dijU==2) then + if (dij_need) paw_ij(iatom)%dij(:,:)=paw_ij(iatom)%dij(:,:)+paw_ij(iatom)%dijU(:,:) + else + +! ===== Need to compute DijU + LIBPAW_ALLOCATE(dijpawu,(cplex_dij*qphase*lmn2_size,ndij)) + if (pawu_algo==PAWU_ALGO_2) then + call pawdiju_euijkl(dijpawu,cplex_dij,qphase,ndij,pawrhoij(iatom),pawtab(itypat)) + else + lpawu=pawtab(itypat)%lpawu + LIBPAW_POINTER_ALLOCATE(vpawu,(cplex_dij,lpawu*2+1,lpawu*2+1,ndij)) + if (usepawu>=10) vpawu=zero ! if dmft, do not apply U in DFT+U + if (usepawu< 10) then + call pawpupot(cplex_dij,ndij,paw_ij(iatom)%noccmmp,paw_ij(iatom)%nocctot,& +& pawprtvol,pawtab(itypat),vpawu) + end if + if (natvshift_==0) then + call pawdiju(dijpawu,cplex_dij,qphase,ndij,nsppol,pawtab(itypat),vpawu) + else + call pawdiju(dijpawu,cplex_dij,qphase,ndij,nsppol,pawtab(itypat),vpawu,& +& natvshift=natvshift_,atvshift=atvshift(:,:,iatom_tot),& +& fatvshift=fatvshift) + end if + LIBPAW_POINTER_DEALLOCATE(vpawu) + end if + if (dijU_need) paw_ij(iatom)%dijU(:,:)=dijpawu(:,:) + if (dij_need) paw_ij(iatom)%dij(:,:)=paw_ij(iatom)%dij(:,:)+dijpawu(:,:) + LIBPAW_DEALLOCATE(dijpawu) + end if + + end if + +! ------------------------------------------------------------------------ +! ----------- Add Dij_{local exact-exchange} to Dij +! ------------------------------------------------------------------------ + + if ((dijexxc_need.or.dij_need).and.dijexxc_available) then + +! ===== DijEXXC already computed + if (paw_ij(iatom)%has_dijexxc==2) then + if (dij_need) paw_ij(iatom)%dij(1:cplex_dij*lmn2_size,:)= & +& paw_ij(iatom)%dij(1:cplex_dij*lmn2_size,:) & +& +paw_ij(iatom)%dijexxc(1:cplex_dij*lmn2_size,:) + else + +! ===== Need to compute DijEXXC + LIBPAW_ALLOCATE(dijexxc,(cplex_dij*lmn2_size,ndij)) + if (pawxcdev/=0) then + if (paw_ij(iatom)%has_exexch_pot/=2) then + LIBPAW_POINTER_ALLOCATE(vpawx,(1,lmn2_size,ndij)) + call pawxpot(ndij,pawprtvol,pawrhoij(iatom),pawtab(itypat),vpawx) + else + vpawx=>paw_ij(iatom)%vpawx + end if + LIBPAW_ALLOCATE(lmselect,(lm_size)) + lmselect(:)=paw_an(iatom)%lmselect(:) + if (ipositron/=0) lmselect(:)=(lmselect(:).or.electronpositron_lmselect(1:lm_size,iatom)) + call pawdijexxc(dijexxc,cplex_dij,qphase,lmselect,ndij,nspden,nsppol,& +& pawang,pawrad(itypat),pawtab(itypat),vpawx,paw_an(iatom)%vxc_ex) + LIBPAW_DEALLOCATE(lmselect) + if (paw_ij(iatom)%has_exexch_pot/=2) then + LIBPAW_POINTER_DEALLOCATE(vpawx) + end if + if (dijexxc_need) paw_ij(iatom)%dijexxc(:,:)=dijexxc(:,:) + if (dij_need) paw_ij(iatom)%dij(1:cplex_dij*lmn2_size,:)= & +& paw_ij(iatom)%dij(1:cplex_dij*lmn2_size,:) & +& +dijexxc(1:cplex_dij*lmn2_size,:) + LIBPAW_DEALLOCATE(dijexxc) + end if + end if + + end if + +! ------------------------------------------------------------------------ +! ----------- Add Dij background contribution to the total Dij +! ------------------------------------------------------------------------ + + if (dij_need.and.pawtab(itypat)%usepotzero==1 ) then + do idij=1,min(nsploop,2) + klmn1=1 + do klmn=1,lmn2_size + paw_ij(iatom)%dij(klmn1,idij)=paw_ij(iatom)%dij(klmn1,idij)+pawtab(itypat)%gammaij(klmn)*charge/ucvol + klmn1=klmn1+cplex_dij*qphase + end do + end do + end if + + +! ------------------------------------------------------------------------ +! ----------- Compute Dijxc_hat +! ------------------------------------------------------------------------ + + if (dijxchat_need) then + + if (usexcnhat/=0) then + LIBPAW_ALLOCATE(dijxchat,(cplex_dij*lmn2_size,ndij)) + call pawdijhat(dijxchat,cplex_dij,1,gprimd,iatom_tot,& +& natom,ndij,nfft,nfftot,nspden,nsppol,pawang,pawfgrtab(iatom),& +& pawtab(itypat),vxc,qphon,ucvol,xred,mpi_comm_grid=my_comm_grid) + paw_ij(iatom)%dijxc_hat(1:cplex_dij*lmn2_size,:)=dijxchat(1:cplex_dij*lmn2_size,:) + LIBPAW_DEALLOCATE(dijxchat) + + else ! usexcnhat=0 + paw_ij(iatom)%dijxc_hat=zero + end if + + end if + +! ------------------------------------------------------------------------ +! ----------- Compute Dijxc_val +! ------------------------------------------------------------------------ + + if (dijxcval_need) then + + LIBPAW_ALLOCATE(dijxcval,(cplex_dij*lmn2_size,ndij)) +! Note that usexcnhat=0 for this call (no compensation term) + if (pawxcdev/=0) then + LIBPAW_ALLOCATE(lmselect,(lm_size)) + lmselect(:)=paw_an(iatom)%lmselect(:) + if (ipositron/=0) lmselect(:)=(lmselect(:).or.electronpositron_lmselect(1:lm_size,iatom)) + call pawdijxcm(dijxcval,cplex_dij,1,lmselect,ndij,nspden,nsppol,& +& pawang,pawrad(itypat),pawtab(itypat),paw_an(iatom)%vxc1_val,& +& paw_an(iatom)%vxct1_val,0) + LIBPAW_DEALLOCATE(lmselect) + else + call pawdijxc(dijxcval,cplex_dij,1,ndij,nspden,nsppol,& +& pawang,pawrad(itypat),pawtab(itypat),paw_an(iatom)%vxc1_val,& +& paw_an(iatom)%vxct1_val,0,0) + end if + paw_ij(iatom)%dijxc_val(1:cplex_dij*lmn2_size,:)=dijxcval(1:cplex_dij*lmn2_size,:) + LIBPAW_DEALLOCATE(dijxcval) + + end if + +! ------------------------------------------------------------------------ + +! Update some flags + if (dij_need.and.paw_ij(iatom)%has_dij>=1) paw_ij(iatom)%has_dij=2 + if (dij0_need.and.paw_ij(iatom)%has_dij0>=1) paw_ij(iatom)%has_dij0=2 + if (dijfock_need.and.paw_ij(iatom)%has_dijfock>=1) paw_ij(iatom)%has_dijfock=2 + + if (dijhartree_need.and.paw_ij(iatom)%has_dijhartree>=1) paw_ij(iatom)%has_dijhartree=2 + if (dijxc_need.and.paw_ij(iatom)%has_dijxc>=1) paw_ij(iatom)%has_dijxc=2 + if (dijhat_need.and.paw_ij(iatom)%has_dijhat>=1) paw_ij(iatom)%has_dijhat=2 + if (dijnd_need.and.paw_ij(iatom)%has_dijnd>=1) paw_ij(iatom)%has_dijnd=2 + if (dijso_need.and.paw_ij(iatom)%has_dijso>=1) paw_ij(iatom)%has_dijso=2 + if (dijU_need.and.paw_ij(iatom)%has_dijU>=1) paw_ij(iatom)%has_dijU=2 + if (dijexxc_need.and.paw_ij(iatom)%has_dijexxc>=1) paw_ij(iatom)%has_dijexxc=2 + if (dijxchat_need.and.paw_ij(iatom)%has_dijxc_hat>=1) paw_ij(iatom)%has_dijxc_hat=2 + if (dijxcval_need.and.paw_ij(iatom)%has_dijxc_val>=1) paw_ij(iatom)%has_dijxc_val=2 + +!End loop over atoms + end do ! iatom + +!------------------------------------------------------------------------ + +!Final printing + if (paral_atom) then + call paw_ij_print(paw_ij,unit=std_out,pawprtvol=pawprtvol,pawspnorb=pawspnorb,& +& comm_atom=my_comm_atom,mpi_atmtab=my_atmtab,natom=natom,& +& mode_paral='PERS',enunit=enunit,ipert=ipert) + else + call paw_ij_print(paw_ij,unit=std_out,pawprtvol=pawprtvol,pawspnorb=pawspnorb,& +& mode_paral='COLL',enunit=enunit,ipert=ipert) + end if + +!Free temporary storage + if (v_dijhat_allocated) then + LIBPAW_POINTER_DEALLOCATE(v_dijhat) + end if + do iatom=1,my_natom + if (paw_ij(iatom)%has_dij0==-1) then + LIBPAW_DEALLOCATE(paw_ij(iatom)%dij0) + paw_ij(iatom)%has_dij0=0 + end if + if (paw_ij(iatom)%has_dijfock==-1) then + LIBPAW_DEALLOCATE(paw_ij(iatom)%dijfock) + paw_ij(iatom)%has_dijfock=0 + end if + + if (paw_ij(iatom)%has_dijhartree==-1) then + LIBPAW_DEALLOCATE(paw_ij(iatom)%dijhartree) + paw_ij(iatom)%has_dijhartree=0 + end if + if (paw_ij(iatom)%has_dijxc==-1) then + LIBPAW_DEALLOCATE(paw_ij(iatom)%dijxc) + paw_ij(iatom)%has_dijxc=0 + end if + if (paw_ij(iatom)%has_dijhat==-1) then + LIBPAW_DEALLOCATE(paw_ij(iatom)%dijhat) + paw_ij(iatom)%has_dijhat=0 + end if + if (paw_ij(iatom)%has_dijfr==-1) then + LIBPAW_DEALLOCATE(paw_ij(iatom)%dijfr) + paw_ij(iatom)%has_dijfr=0 + end if + if (paw_ij(iatom)%has_dijso==-1) then + LIBPAW_DEALLOCATE(paw_ij(iatom)%dijso) + paw_ij(iatom)%has_dijso=0 + end if + if (paw_ij(iatom)%has_dijU==-1) then + LIBPAW_DEALLOCATE(paw_ij(iatom)%dijU) + paw_ij(iatom)%has_dijU=0 + end if + if (paw_ij(iatom)%has_dijexxc==-1) then + LIBPAW_DEALLOCATE(paw_ij(iatom)%dijexxc) + paw_ij(iatom)%has_dijexxc=0 + end if + if (paw_ij(iatom)%has_dijxc_hat==-1) then + LIBPAW_DEALLOCATE(paw_ij(iatom)%dijxc_hat) + paw_ij(iatom)%has_dijxc_hat=0 + end if + if (paw_ij(iatom)%has_dijxc_val==-1) then + LIBPAW_DEALLOCATE(paw_ij(iatom)%dijxc_val) + paw_ij(iatom)%has_dijxc_val=0 + end if + end do + +!Destroy atom table used for parallelism + call free_my_atmtab(my_atmtab,my_atmtab_allocated) + +end subroutine pawdij +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawdij/pawdijhartree +!! NAME +!! pawdijhartree +!! +!! FUNCTION +!! Compute the Hartree contribution to the PAW pseudopotential strength Dij +!! (for one atom only) +!! +!! INPUTS +!! qphase=2 if dij contains a exp(-i.q.r) phase (as in the q<>0 RF case), 1 if not +!! nspden=number of spin density components +!! pawrhoij = paw rhoij occupancies (and related data) for current atom +!! pawtab =paw tabulated starting data, for current atom +!! +!! OUTPUT +!! dijhartree(qphase*lmn2_size)= D_ij^Hartree terms +!! When a exp(-i.q.r) phase is included (qphase=2): +!! dij(1:lmn2_size,:) +!! contains the real part of the phase, i.e. D_ij*cos(q.r) +!! dij(lmn2_size+1:2*lmn2_size,:) +!! contains the imaginary part of the phase, i.e. D_ij*sin(q.r) +!! +!! SOURCE + +subroutine pawdijhartree(dijhartree,qphase,nspden,pawrhoij,pawtab) + +!Arguments --------------------------------------------- +!scalars + integer,intent(in) :: nspden,qphase +!arrays + real(dp),intent(out) :: dijhartree(:) + type(pawrhoij_type),intent(in) :: pawrhoij + type(pawtab_type),intent(in) :: pawtab + +!Local variables --------------------------------------- +!scalars + integer :: cplex_rhoij,iq,iq0_dij,iq0_rhoij,irhoij,ispden,jrhoij,klmn,klmn1,lmn2_size,nspdiag + real(dp) :: ro + character(len=500) :: msg +!arrays + +! ************************************************************************* + +!Check data consistency + if (size(dijhartree,1)/=qphase*pawtab%lmn2_size) then + msg='invalid size for DijHartree!' + LIBPAW_BUG(msg) + end if + if (pawrhoij%qphase lmn2_size) + !2nd loop: we store the imaginary part in dij(lmn2_size+1 -> 2*lmn2_size) + iq0_dij=merge(0,lmn2_size,iq==1) + iq0_rhoij=cplex_rhoij*iq0_dij + + !Loop over rhoij elements + jrhoij=iq0_rhoij+1 + do irhoij=1,pawrhoij%nrhoijsel + klmn=pawrhoij%rhoijselect(irhoij) + + ro=pawrhoij%rhoijp(jrhoij,ispden)*pawtab%dltij(klmn) + !print *, "debug: irhoij, ro, pawtab%eijkl(klmn,klmn)", irhoij, ro, pawtab%eijkl(klmn,klmn) + + !Diagonal k=l + dijhartree(iq0_dij+klmn)=dijhartree(iq0_dij+klmn)+ro*pawtab%eijkl(klmn,klmn) + + !k<=l + do klmn1=1,klmn-1 + dijhartree(iq0_dij+klmn1)=dijhartree(iq0_dij+klmn1)+ro*pawtab%eijkl(klmn1,klmn) + end do + + !k>l + do klmn1=klmn+1,lmn2_size + dijhartree(iq0_dij+klmn1)=dijhartree(iq0_dij+klmn1)+ro*pawtab%eijkl(klmn,klmn1) + end do + + jrhoij=jrhoij+cplex_rhoij + end do !End loop over rhoij + + end do !End loop over q phase + + end do !End loop over spin + +end subroutine pawdijhartree +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawdij/pawdijfock +!! NAME +!! pawdijfock +!! +!! FUNCTION +!! Compute Fock exact-exchange contribution(s) to the PAW pseudopotential strength Dij +!! (for one atom only) +!! +!! INPUTS +!! hyb_mixing=hybrid mixing coefficient for the Fock contribution +!! hyb_mixing_sr=hybrid mixing coefficient for the short-range Fock contribution +!! qphase=2 if dij contains a exp(-i.q.r) phase (as in the q<>0 RF case), 1 if not +!! ndij= number of spin components dor Fdij +!! pawrhoij = paw rhoij occupancies (and related data) for current atom +!! pawtab =paw tabulated starting data, for current atom +!! +!! OUTPUT +!! dijfock_vv(qphase*lmn2_size,ndij)= D_ij^fock terms for valence-valence interactions +!! dijfock_cv(qphase*lmn2_size,ndij)= D_ij^fock terms for core-valence interactions +!! When a exp(-i.q.r) phase is included (qphase=2): +!! dij(1:lmn2_size,:) +!! contains the real part of the phase, i.e. D_ij*cos(q.r) +!! dij(lmn2_size+1:2*lmn2_size,:) +!! contains the imaginary part of the phase, i.e. D_ij*sin(q.r) +!! +!! NOTES: +!! WARNING: What follows has been tested only for cases where nsppol=1 and 2, nspden=1 and 2 with nspinor=1. +!! +!! SOURCE + +subroutine pawdijfock(dijfock_vv,dijfock_cv,cplex_dij,qphase,hyb_mixing,hyb_mixing_sr,ndij,pawrhoij,pawtab) + +!Arguments --------------------------------------------- +!scalars + integer,intent(in) :: cplex_dij,ndij,qphase + real(dp),intent(in) :: hyb_mixing,hyb_mixing_sr +!arrays + real(dp),intent(out) :: dijfock_vv(:,:),dijfock_cv(:,:) + type(pawrhoij_type),intent(in) :: pawrhoij + type(pawtab_type),intent(in),target :: pawtab + +!Local variables --------------------------------------- +!scalars + integer :: cplex_rhoij,iq,iq0_dij,iq0_rhoij,ispden,irhokl,jrhokl,ilmn_i,jlmn_j,ilmn_k,jlmn_l + integer :: klmn_kl,klmn_ij,klmn_il,klmn_kj,klmn1,nsp,lmn2_size + real(dp) :: ro,dij_up,dij_dn,dij_updn_r,dij_updn_i + character(len=500) :: msg +!arrays + real(dp),allocatable :: dijfock_vv_tmp(:,:) + real(dp),pointer :: eijkl(:,:) + +! ************************************************************************* + +!Useful data + lmn2_size=pawtab%lmn2_size + cplex_rhoij=pawrhoij%cplex_rhoij + +!Check data consistency + if (size(dijfock_vv,1)/=qphase*cplex_dij*lmn2_size.or.size(dijfock_vv,2)/=ndij) then + msg='invalid sizes for Dijfock_vv!' + LIBPAW_BUG(msg) + end if + if (size(dijfock_cv,1)/=qphase*cplex_dij*lmn2_size.or.size(dijfock_cv,2)/=ndij) then + msg='invalid sizes for Dijfock_cv!' + LIBPAW_BUG(msg) + end if + if (pawrhoij%qphasetol8 .and. abs(hyb_mixing_sr)>tol8) then + msg='invalid hybrid functional' + LIBPAW_BUG(msg) + else + if (abs(hyb_mixing)>tol8) then + eijkl => pawtab%eijkl + else if (abs(hyb_mixing_sr)>tol8) then + eijkl => pawtab%eijkl_sr + end if + end if + +!Init memory + dijfock_vv=zero ; dijfock_cv=zero + +! ===== Valence-valence contribution ===== + + nsp=pawrhoij%nsppol;if (pawrhoij%nspden==4) nsp=4 + LIBPAW_ALLOCATE(dijfock_vv_tmp,(lmn2_size,nsp)) + dijfock_vv_tmp=zero + +!Loop over phase exp(iqr) phase real/imaginary part + do iq=1,qphase + !First loop: we store the real part in dij(1 -> lmn2_size) + !2nd loop: we store the imaginary part in dij(lmn2_size+1 -> 2*lmn2_size) + iq0_dij=merge(0,lmn2_size,iq==1) ; iq0_rhoij=cplex_rhoij*iq0_dij + + !Loop over spin components + do ispden=1,nsp + + !Loop on the non-zero elements rho_kl + jrhokl=iq0_rhoij+1 + do irhokl=1,pawrhoij%nrhoijsel + klmn_kl=pawrhoij%rhoijselect(irhokl) + ilmn_k=pawtab%indklmn(7,klmn_kl) + jlmn_l=pawtab%indklmn(8,klmn_kl) + + ro=pawrhoij%rhoijp(jrhokl,ispden)*pawtab%dltij(klmn_kl) + + !Contribution to the element (k,l) of dijfock + dijfock_vv_tmp(klmn_kl,ispden)=dijfock_vv_tmp(klmn_kl,ispden)-ro*eijkl(klmn_kl,klmn_kl) + + !Contribution to the element (i,j) of dijfock with (i,j) < (k,l) + ! We remind that ijlmn_j) then + klmn_kj=ilmn_k*(ilmn_k-1)/2+jlmn_j + else + klmn_kj=jlmn_j*(jlmn_j-1)/2+ilmn_k + end if + dijfock_vv_tmp(klmn_ij,ispden)=dijfock_vv_tmp(klmn_ij,ispden)-ro*eijkl(klmn_il,klmn_kj) + end do + + !Contribution to the element (i,j) of dijfock with (i,j) > (k,l) + ! We remind that ijlmn_l) then + klmn_il=ilmn_i*(ilmn_i-1)/2+jlmn_l + else + klmn_il=jlmn_l*(jlmn_l-1)/2+ilmn_i + end if + dijfock_vv_tmp(klmn_ij,ispden)=dijfock_vv_tmp(klmn_ij,ispden)-ro*eijkl(klmn_kj,klmn_il) + end do + + jrhokl=jrhokl+cplex_rhoij + end do !End loop over rhoij + + end do !ispden + +! Regular case: copy spin component into Dij + if (ndij/=4.or.nsp/=4) then + do ispden=1,nsp + klmn1=iq0_dij+1 + do klmn_ij=1,lmn2_size + dijfock_vv(klmn1,ispden)=dijfock_vv_tmp(klmn_ij,ispden) + klmn1=klmn1+cplex_dij + end do + end do +! Antiferro case: copy up component into down one + if (ndij==2.and.nsp==1) then + klmn1=iq0_dij+1 + do klmn_ij=1,lmn2_size + dijfock_vv(klmn1,2)=dijfock_vv_tmp(klmn_ij,1) + klmn1=klmn1+cplex_dij + end do + end if + else + !Non-collinear: from (rhoij,m_ij) to rhoij^(alpha,beta) + !rhoij= (rhoij^11+rhoij^22) + !mij_x= (rhoij^12+rhoij^21) + !mij_y=i.(rhoij^12+rhoij^21) + !mij_z= (rhoij^11-rhoij^22) + klmn1=iq0_dij+1 + do klmn_ij=1,lmn2_size + dij_up=half*(dijfock_vv_tmp(klmn_ij,1)+dijfock_vv_tmp(klmn_ij,4)) + dij_dn=half*(dijfock_vv_tmp(klmn_ij,1)-dijfock_vv_tmp(klmn_ij,4)) + dij_updn_r= half*dijfock_vv_tmp(klmn_ij,2) + dij_updn_i=-half*dijfock_vv_tmp(klmn_ij,3) + dijfock_vv(klmn1 ,1)= dij_up + dijfock_vv(klmn1 ,2)= dij_dn + dijfock_vv(klmn1 ,3)= dij_updn_r + dijfock_vv(klmn1+1,3)= dij_updn_i + dijfock_vv(klmn1 ,4)= dij_updn_r + dijfock_vv(klmn1+1,4)=-dij_updn_i + klmn1=klmn1+cplex_dij + end do + end if + + end do ! qphase + +! ===== Core-valence contribution ===== + + do ispden=1,pawrhoij%nsppol + do iq=1,qphase + iq0_dij=merge(0,cplex_dij*lmn2_size,iq==1) + klmn1=iq0_dij+1 + do klmn_ij=1,lmn2_size + dijfock_cv(klmn1,ispden)=pawtab%ex_cvij(klmn_ij) + klmn1=klmn1+cplex_dij + end do + end do + end do + +!Antiferro case: copy up component into down one + if (ndij==2.and.pawrhoij%nsppol==1) then + dijfock_cv(:,2)=dijfock_cv(:,1) + end if + +!Apply mixing factors + if (abs(hyb_mixing)>tol8) then + dijfock_vv(:,:) = hyb_mixing*dijfock_vv(:,:) + else if (abs(hyb_mixing_sr)>tol8) then + dijfock_vv(:,:) = hyb_mixing_sr*dijfock_vv(:,:) + end if + dijfock_cv(:,:) = (hyb_mixing+hyb_mixing_sr)*dijfock_cv(:,:) + +!Free temporary memory spaces + LIBPAW_DEALLOCATE(dijfock_vv_tmp) + +end subroutine pawdijfock +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawdij/pawdijxc +!! NAME +!! pawdijxc +!! +!! FUNCTION +!! Compute the eXchange-Correlation contribution to the PAW pseudopotential strength Dij, +!! using densities and potential expressed on a (r,theta,phi) grid +!! (for one atom only): +!! D_ij^XC= < Phi_i|Vxc( n1+ nc[+nhat])| Phi_j> +!! - +!! -Intg_omega [ Vxc(tn1+tnc[+nhat])(r). Sum_L(Qij^L(r)). dr] +!! +!! INPUTS +!! cplex_dij=2 if dij is COMPLEX (as in the spin-orbit case), 1 if dij is REAL +!! qphase=2 if dij contains a exp(-i.q.r) phase (as in the q<>0 RF case), 1 if not +!! ndij= number of spin components +!! nspden=number of spin density components +!! nsppol=number of independent spin WF components +!! pawang =paw angular mesh and related data, for current atom +!! pawrad =paw radial mesh and related data, for current atom +!! pawtab =paw tabulated starting data +!! usekden=1 if kinetic energy density contribution has to be included (mGGA) +!! usexcnhat= 1 if compensation density is included in Vxc, 0 otherwise +!! vxc1(qphase*mesh_size,angl_size,nspden)=all-electron on-site XC potential for current atom +!! given on a (r,theta,phi) grid +!! vxct1(qphase*mesh_size,angl_size,nspden)=all-electron on-site XC potential for current atom +!! given on a (r,theta,phi) grid +!! [vxctau1(qphase*mesh_size,angl_size,nspden)]=1st deriv. of XC energy wrt to kinetic energy density +!! (all electron) - metaGGA only +!! [vxcttau1(qphase*mesh_size,angl_size,nspden)]=1st deriv. of XC energy wrt to kinetic energy density +!! (pseudo) - metaGGA only +!! +!! OUTPUT +!! dijxc(cplex_dij*qphase*lmn2_size,ndij)= D_ij^XC terms +!! When Dij is complex (cplex_dij=2): +!! dij(2*i-1,:) contains the real part, dij(2*i,:) contains the imaginary part +!! When a exp(-i.q.r) phase is included (qphase=2): +!! dij(1:cplex_dij*lmn2_size,:) +!! contains the real part of the phase, i.e. D_ij*cos(q.r) +!! dij(cplex_dij*lmn2_size+1:2*cplex_dij*lmn2_size,:) +!! contains the imaginary part of the phase, i.e. D_ij*sin(q.r) +!! +!! SOURCE + +subroutine pawdijxc(dijxc,cplex_dij,qphase,ndij,nspden,nsppol,& +& pawang,pawrad,pawtab,vxc1,vxct1,usexcnhat,usekden,& +& vxctau1,vxcttau1) ! optional + +!Arguments --------------------------------------------- +!scalars + integer,intent(in) :: cplex_dij,ndij,nspden,nsppol,qphase,usekden,usexcnhat + type(pawang_type),intent(in) :: pawang +!arrays + real(dp),intent(in) :: vxc1(:,:,:),vxct1(:,:,:) + real(dp),intent(in),optional :: vxctau1(:,:,:),vxcttau1(:,:,:) + real(dp),intent(out) :: dijxc(:,:) + type(pawrad_type),intent(in) :: pawrad + type(pawtab_type),intent(in) :: pawtab + +!Local variables --------------------------------------- +!scalars + integer :: angl_size,basis_size,idij,idijend + integer :: ii,ij_size,ilm,ils,ils1,ilslm,ipts,ir,ir1,isel,ispden + integer :: jlm,j0lm,klmn1,klmn2,klmn,klm,kln,l_size,lm0,lmax,lmin,lm_size,lmn2_size + integer :: iln,jln,j0ln + integer :: mesh_size,mm,nsploop + real(dp) :: tmp,vi,vr,vxcijhat,vxcijhat_i,vxctauij + character(len=500) :: msg +!arrays + real(dp),allocatable :: dijxc_idij(:),ff(:),gg(:) + real(dp),allocatable :: vxcij1(:),vxcij2(:),vxctauij1(:),yylmr(:,:),yylmgr(:,:) + +! ************************************************************************* + +!Useful data + lm_size=pawtab%lcut_size**2 + lmn2_size=pawtab%lmn2_size + basis_size=pawtab%basis_size + ij_size=pawtab%ij_size + l_size=pawtab%l_size + mesh_size=pawtab%mesh_size + angl_size=pawang%angl_size + +!Check data consistency + if (size(dijxc,1)/=cplex_dij*qphase*lmn2_size.or.size(dijxc,2)/=ndij) then + msg='invalid sizes for Dijxc !' + LIBPAW_BUG(msg) + end if + if (size(vxc1,1)/=qphase*mesh_size.or.size(vxct1,1)/=qphase*mesh_size.or.& +& size(vxc1,2)/=angl_size.or.size(vxct1,2)/=angl_size.or.& +& size(vxc1,3)/=nspden.or.size(vxct1,3)/=nspden) then + msg='invalid sizes for vxc1 or vxct1 !' + LIBPAW_BUG(msg) + end if + +!Check if MetaGGA is activated + if (usekden==1) then + if (.not.present(vxctau1)) then + msg="vxctau1 needs to be present!" + LIBPAW_BUG(msg) + else if (size(vxctau1)==0) then + msg="vxctau1 needs to be allocated!" + LIBPAW_BUG(msg) + end if + if (.not.present(vxcttau1)) then + msg="vxcttau1 needs to be present!" + LIBPAW_BUG(msg) + else if (size(vxcttau1)==0) then + msg="vxcttau1 needs to be allocated!" + LIBPAW_BUG(msg) + end if + end if + +!Precompute products Ylm*Ylpmp (and Grad(Ylm).Grad(Ylpmp) if mGGA) + lmax=1+maxval(pawtab%indklmn(4,1:lmn2_size)) + LIBPAW_ALLOCATE(yylmr,(lmax**2*(lmax**2+1)/2,angl_size)) + LIBPAW_ALLOCATE(yylmgr,(lmax**2*(lmax**2+1)/2,angl_size*usekden)) + do ipts=1,angl_size + do jlm=1,lmax**2 + j0lm=jlm*(jlm-1)/2 + do ilm=1,jlm + klm=j0lm+ilm + yylmr(klm,ipts)=pawang%ylmr(ilm,ipts)*pawang%ylmr(jlm,ipts) + end do + end do + end do + if (usekden==1) then + yylmgr(:,:)=zero + do ipts=1,angl_size + do jlm=1,lmax**2 + j0lm=jlm*(jlm-1)/2 + do ilm=1,jlm + klm=j0lm+ilm + do ii=1,3 + yylmgr(klm,ipts)=yylmgr(klm,ipts) & +& +pawang%ylmrgr(ii,ilm,ipts)*pawang%ylmrgr(ii,jlm,ipts) + end do + end do + end do + end do + end if + +!Init memory + dijxc=zero + LIBPAW_ALLOCATE(dijxc_idij,(qphase*lmn2_size)) + LIBPAW_ALLOCATE(vxcij1,(qphase*ij_size)) + LIBPAW_ALLOCATE(vxcij2,(qphase*l_size)) + LIBPAW_ALLOCATE(vxctauij1,(qphase*ij_size*usekden)) + LIBPAW_ALLOCATE(ff,(mesh_size)) + LIBPAW_ALLOCATE(gg,(mesh_size)) + vxcij1=zero;vxcij2=zero;vxctauij1=zero + +!---------------------------------------------------------- +!Loop over spin components +!---------------------------------------------------------- + nsploop=nsppol;if (ndij==4) nsploop=4 + do idij=1,nsploop + if (idij<=nsppol.or.(nspden==4.and.idij<=3)) then + + idijend=idij+idij/3 + do ispden=idij,idijend + + dijxc_idij=zero + +! ---------------------------------------------------------- +! Loop on angular mesh +! ---------------------------------------------------------- + do ipts=1,angl_size + +! ===== Vxc_ij_1 (tmp) ===== + vxcij1=zero + if (qphase==1) then + do kln=1,ij_size + ff(1:mesh_size)= & +& vxc1(1:mesh_size,ipts,ispden)*pawtab%phiphj(1:mesh_size,kln) & +& -vxct1(1:mesh_size,ipts,ispden)*pawtab%tphitphj(1:mesh_size,kln) + call simp_gen(vxcij1(kln),ff,pawrad) + end do + !if Meta GGA add 1/2*[ + ! -] + if (usekden==1) then + do jln=1,basis_size + j0ln=jln*(jln-1)/2 + do iln=1,jln + kln=j0ln+iln + ff(2:mesh_size)=(vxctau1(2:mesh_size,ipts,ispden)*pawtab%phiphj(2:mesh_size,kln) & +& -vxcttau1(2:mesh_size,ipts,ispden)*pawtab%tphitphj(2:mesh_size,kln)) & +& /pawrad%rad(2:mesh_size)**2 + call pawrad_deducer0(ff,mesh_size,pawrad) + call simp_gen(vxctauij1(kln),ff,pawrad) + ff(1:mesh_size)=vxctau1(1:mesh_size,ipts,ispden) & +& *pawtab%nablaphi(1:mesh_size,iln)*pawtab%nablaphi(1:mesh_size,jln) & +& -vxcttau1(1:mesh_size,ipts,ispden) & +& *pawtab%tnablaphi(1:mesh_size,iln)*pawtab%tnablaphi(1:mesh_size,jln) + call simp_gen(vxctauij,ff,pawrad) + vxcij1(kln)=vxcij1(kln)+half*vxctauij + end do + end do + end if + + else + do kln=1,ij_size + do ir=1,mesh_size + ir1=2*ir + ff(ir)= & +& vxc1(ir1-1,ipts,ispden)*pawtab%phiphj(ir,kln) & +& -vxct1(ir1-1,ipts,ispden)*pawtab%tphitphj(ir,kln) + gg(ir)= & +& vxc1(ir1,ipts,ispden)*pawtab%phiphj(ir,kln) & +& -vxct1(ir1,ipts,ispden)*pawtab%tphitphj(ir,kln) + end do + call simp_gen(vxcij1(2*kln-1),ff,pawrad) + call simp_gen(vxcij1(2*kln ),gg,pawrad) + end do + !if Meta GGA add 1/2*[ + ! -] + if (usekden==1) then + do jln=1,basis_size + j0ln=jln*(jln-1)/2 + do iln=1,jln + kln=j0ln+iln + do ir=2,mesh_size + ir1=2*ir + ff(ir)=vxctau1(ir1-1,ipts,ispden)*pawtab%phiphj(ir,kln) & +& -vxcttau1(ir1-1,ipts,ispden)*pawtab%tphitphj(ir,kln) + gg(ir)=vxctau1(ir1,ipts,ispden)*pawtab%phiphj(ir,kln) & +& -vxcttau1(ir1,ipts,ispden)*pawtab%tphitphj(ir,kln) + end do + call pawrad_deducer0(ff,mesh_size,pawrad) + call pawrad_deducer0(gg,mesh_size,pawrad) + call simp_gen(vxctauij1(2*kln-1),ff,pawrad) + call simp_gen(vxctauij1(2*kln ),gg,pawrad) + do ir=1,mesh_size + ir1=2*ir + ff(ir)=vxctau1(ir1-1,ipts,ispden) & +& *pawtab%nablaphi(ir,iln)*pawtab%nablaphi(ir,jln) & +& -vxcttau1(ir1-1,ipts,ispden) & +& *pawtab%tnablaphi(ir,iln)*pawtab%tnablaphi(ir,jln) + gg(ir)=vxctau1(ir1,ipts,ispden) & +& *pawtab%nablaphi(ir,iln)*pawtab%nablaphi(ir,jln) & +& -vxcttau1(ir1,ipts,ispden) & +& *pawtab%tnablaphi(ir,iln)*pawtab%tnablaphi(ir,jln) + end do + call simp_gen(vxctauij,ff,pawrad) + vxcij1(2*kln-1)=vxcij1(2*kln-1)+half*vxctauij + call simp_gen(vxctauij,gg,pawrad) + vxcij1(2*kln)=vxcij1(2*kln)+half*vxctauij + end do + end do + end if + + end if + +! ===== Vxc_ij_2 (tmp) ===== + vxcij2=zero + if (usexcnhat/=0) then + if (qphase==1) then + do ils=1,l_size + ff(1:mesh_size)=vxct1(1:mesh_size,ipts,ispden) & +& *pawtab%shapefunc(1:mesh_size,ils) & +& *pawrad%rad(1:mesh_size)**2 + call simp_gen(vxcij2(ils),ff,pawrad) + end do + else + do ils=1,l_size + do ir=1,mesh_size + ir1=2*ir + tmp=pawtab%shapefunc(ir,ils)*pawrad%rad(ir)**2 + ff(ir)=vxct1(ir1-1,ipts,ispden)*tmp + gg(ir)=vxct1(ir1 ,ipts,ispden)*tmp + end do + call simp_gen(vxcij2(2*ils-1),ff,pawrad) + call simp_gen(vxcij2(2*ils ),gg,pawrad) + end do + end if + end if + +! ===== Integrate Vxc_ij_1 and Vxc_ij_2 over the angular mesh ===== +! ===== and accummulate in total Vxc_ij ===== + if (qphase==1) then + do klmn=1,lmn2_size + klm=pawtab%indklmn(1,klmn);kln=pawtab%indklmn(2,klmn) + lmin=pawtab%indklmn(3,klmn);lmax=pawtab%indklmn(4,klmn) + dijxc_idij(klmn)=dijxc_idij(klmn)+vxcij1(kln) & +& *pawang%angwgth(ipts)*yylmr(klm,ipts)*four_pi + if (usekden==1) then + dijxc_idij(klmn)=dijxc_idij(klmn)+half*vxctauij1(kln) & +& *pawang%angwgth(ipts)*yylmgr(klm,ipts)*four_pi + end if + if (usexcnhat/=0) then + vxcijhat=zero + do ils=lmin,lmax,2 + lm0=ils**2+ils+1 + vr=four_pi*pawang%angwgth(ipts)*vxcij2(ils+1) + do mm=-ils,ils + ilslm=lm0+mm;isel=pawang%gntselect(ilslm,klm) + if (isel>0) then + tmp=pawang%ylmr(ilslm,ipts)*pawtab%qijl(ilslm,klmn) + vxcijhat=vxcijhat+vr*tmp + end if + end do + end do + dijxc_idij(klmn)=dijxc_idij(klmn)-vxcijhat + end if + end do ! Loop klmn + else + klmn1=1 + do klmn=1,lmn2_size + klm=pawtab%indklmn(1,klmn);kln=pawtab%indklmn(2,klmn) + lmin=pawtab%indklmn(3,klmn);lmax=pawtab%indklmn(4,klmn) + tmp=pawang%angwgth(ipts)*yylmr(klm,ipts)*four_pi + dijxc_idij(klmn1 )=dijxc_idij(klmn1 )+vxcij1(2*kln-1)*tmp + dijxc_idij(klmn1+1)=dijxc_idij(klmn1+1)+vxcij1(2*kln )*tmp + if (usekden==1) then + tmp=pawang%angwgth(ipts)*yylmgr(klm,ipts)*four_pi + dijxc_idij(klmn1 )=dijxc_idij(klmn1 )+half*vxctauij1(2*kln-1)*tmp + dijxc_idij(klmn1+1)=dijxc_idij(klmn1+1)+half*vxctauij1(2*kln )*tmp + end if + if (usexcnhat/=0) then + vxcijhat=zero;vxcijhat_i=zero + do ils=lmin,lmax,2 + lm0=ils**2+ils+1;ils1=2*(ils+1) + vr=four_pi*pawang%angwgth(ipts)*vxcij2(ils1-1) + vi=four_pi*pawang%angwgth(ipts)*vxcij2(ils1 ) + do mm=-ils,ils + ilslm=lm0+mm;isel=pawang%gntselect(ilslm,klm) + if (isel>0) then + tmp=pawang%ylmr(ilslm,ipts)*pawtab%qijl(ilslm,klmn) + vxcijhat =vxcijhat +vr*tmp + vxcijhat_i=vxcijhat_i+vi*tmp + end if + end do + end do + dijxc_idij(klmn1 )=dijxc_idij(klmn1 )-vxcijhat + dijxc_idij(klmn1+1)=dijxc_idij(klmn1+1)-vxcijhat_i + end if + klmn1=klmn1+qphase + end do ! Loop klmn + end if + +! ---------------------------------------------------------- +! End loop on angular points + end do + +! ---------------------------------------------------------- +! Deduce some part of Dij according to symmetries +! ---------------------------------------------------------- + + !if ispden=1 => real part of D^11_ij + !if ispden=2 => real part of D^22_ij + !if ispden=3 => real part of D^12_ij + !if ispden=4 => imaginary part of D^12_ij + klmn1=max(1,ispden-2);klmn2=1 + do klmn=1,lmn2_size + dijxc(klmn1,idij)=dijxc_idij(klmn2) + klmn1=klmn1+cplex_dij + klmn2=klmn2+qphase + end do + if (qphase==2) then + !Same storage with exp^(-i.q.r) phase + klmn1=max(1,ispden-2)+lmn2_size*cplex_dij;klmn2=2 + do klmn=1,lmn2_size + dijxc(klmn1,idij)=dijxc_idij(klmn2) + klmn1=klmn1+cplex_dij + klmn2=klmn2+qphase + end do + endif + + end do !ispden + + !Non-collinear: D_ij(:,4)=D^21_ij=D^12_ij^* + else if (nspden==4.and.idij==4) then + dijxc(:,idij)=dijxc(:,idij-1) + if (cplex_dij==2) then + do klmn=2,lmn2_size*cplex_dij,cplex_dij + dijxc(klmn,idij)=-dijxc(klmn,idij) + end do + if (qphase==2) then + do klmn=2+lmn2_size*cplex_dij,2*lmn2_size*cplex_dij,cplex_dij + dijxc(klmn,idij)=-dijxc(klmn,idij) + end do + end if + end if + + !Antiferro: D_ij(:,2)=D^down_ij=D^up_ij + else if (nsppol==1.and.idij==2) then + dijxc(:,idij)=dijxc(:,idij-1) + end if + +!---------------------------------------------------------- +!End loop on spin density components + end do + +!Free temporary memory spaces + LIBPAW_DEALLOCATE(yylmr) + LIBPAW_DEALLOCATE(yylmgr) + LIBPAW_DEALLOCATE(dijxc_idij) + LIBPAW_DEALLOCATE(vxcij1) + LIBPAW_DEALLOCATE(vxcij2) + LIBPAW_DEALLOCATE(vxctauij1) + LIBPAW_DEALLOCATE(ff) + LIBPAW_DEALLOCATE(gg) + +end subroutine pawdijxc +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawdij/pawdijxcm +!! NAME +!! pawdijxcm +!! +!! FUNCTION +!! Compute the eXchange-Correlation contribution to the PAW pseudopotential strength Dij, +!! using densities and potential expressed as (l,m) spherical moments +!! (for one atom only): +!! D_ij^XC= < Phi_i|Vxc( n1+ nc[+nhat])| Phi_j> +!! - +!! -Intg_omega [ Vxc(tn1+tnc[+nhat])(r). Sum_L(Qij^L(r)). dr] +!! +!! INPUTS +!! cplex_dij=2 if dij is COMPLEX (as in the spin-orbit case), 1 if dij is REAL +!! qphase=2 if dij contains a exp(-i.q.r) phase (as in the q<>0 RF case), 1 if not +!! lmselect(lm_size)=select the non-zero LM-moments of on-site potentials +!! ndij= number of spin components +!! nspden=number of spin density components +!! nsppol=number of independent spin WF components +!! pawang =paw angular mesh and related data, for current atom +!! pawrad =paw radial mesh and related data, for current atom +!! pawtab =paw tabulated starting data +!! vxc1(qphase*mesh_size,lm_size,nspden)=all-electron on-site XC potential for current atom +!! given on (l,m) spherical moments +!! vxct1(qphase*mesh_size,lm_size,nspden)=all-electron on-site XC potential for current atom +!! given on (l,m) spherical moments +!! usexcnhat= 1 if compensation density is included in Vxc, 0 otherwise +!! +!! OUTPUT +!! dijxc(cplex_dij*qphase*lmn2_size,ndij)= D_ij^XC terms +!! When Dij is complex (cplex_dij=2): +!! dij(2*i-1,:) contains the real part, dij(2*i,:) contains the imaginary part +!! When a exp(-i.q.r) phase is included (qphase=2): +!! dij(1:cplex_dij*lmn2_size,:) +!! contains the real part of the phase, i.e. D_ij*cos(q.r) +!! dij(cplex_dij*lmn2_size+1:2*cplex_dij*lmn2_size,:) +!! contains the imaginary part of the phase, i.e. D_ij*sin(q.r) +!! +!! SOURCE + +subroutine pawdijxcm(dijxc,cplex_dij,qphase,lmselect,ndij,nspden,nsppol,& +& pawang,pawrad,pawtab,vxc1,vxct1,usexcnhat) + +!Arguments --------------------------------------------- +!scalars + integer,intent(in) :: cplex_dij,ndij,nspden,nsppol,qphase,usexcnhat + type(pawang_type),intent(in) :: pawang +!arrays + logical :: lmselect(:) + real(dp),intent(in) :: vxc1(:,:,:),vxct1(:,:,:) + real(dp),intent(out) :: dijxc(:,:) + type(pawrad_type),intent(in) :: pawrad + type(pawtab_type),intent(in) :: pawtab + +!Local variables --------------------------------------- +!scalars + integer :: idij,idijend,ij_size,ir,ir1,isel,ispden,klm,klm1,klmn,klmn1,klmn2,kln + integer :: lm_size,lmn2_size,ll,mesh_size,nsploop + real(dp) :: tmp,vxcij2,vxcij2_i + character(len=500) :: msg +!arrays + real(dp),allocatable :: dijxc_idij(:),ff(:),gg(:),vxcij1(:) + +! ************************************************************************* + +!Useful data + lm_size=pawtab%lcut_size**2 + lmn2_size=pawtab%lmn2_size + ij_size=pawtab%ij_size + mesh_size=pawtab%mesh_size + +!Check data consistency + if (size(dijxc,1)/=cplex_dij*qphase*lmn2_size.or.size(dijxc,2)/=ndij) then + msg='invalid sizes for Dijxc !' + LIBPAW_BUG(msg) + end if + if (size(lmselect)/=lm_size) then + msg='invalid size for lmselect !' + LIBPAW_BUG(msg) + end if + if (size(vxc1,1)/=qphase*mesh_size.or.size(vxct1,1)/=qphase*mesh_size.or.& +& size(vxc1,2)/=lm_size.or.size(vxct1,2)/=lm_size.or.& +& size(vxc1,3)/=nspden.or.size(vxct1,3)/=nspden) then + msg='invalid sizes for vxc1 or vxct1 !' + LIBPAW_BUG(msg) + end if + +!Init memory + dijxc=zero + LIBPAW_ALLOCATE(dijxc_idij,(qphase*lmn2_size)) + LIBPAW_ALLOCATE(vxcij1,(qphase*ij_size)) + LIBPAW_ALLOCATE(ff,(mesh_size)) + LIBPAW_ALLOCATE(gg,(mesh_size)) + +!---------------------------------------------------------- +!Loop over spin components +!---------------------------------------------------------- + nsploop=nsppol;if (ndij==4) nsploop=4 + do idij=1,nsploop + if (idij<=nsppol.or.(nspden==4.and.idij<=3)) then + + idijend=idij+idij/3 + do ispden=idij,idijend + + dijxc_idij=zero + +! ---------------------------------------------------------- +! Summing over (l,m) moments +! ---------------------------------------------------------- + do klm=1,lm_size + if (lmselect(klm)) then + +! ===== Vxc_ij_1 (tmp) ===== + vxcij1=zero + if (qphase==1) then + do kln=1,ij_size + ff(1:mesh_size)= & +& vxc1(1:mesh_size,klm,ispden)*pawtab%phiphj(1:mesh_size,kln) & +& -vxct1(1:mesh_size,klm,ispden)*pawtab%tphitphj(1:mesh_size,kln) + call simp_gen(vxcij1(kln),ff,pawrad) + end do + else ! qphase==2 + do kln=1,ij_size + do ir=1,mesh_size + ir1=2*ir + ff(ir)= & +& vxc1(ir1-1,klm,ispden)*pawtab%phiphj(ir,kln) & +& -vxct1(ir1-1,klm,ispden)*pawtab%tphitphj(ir,kln) + gg(ir)= & +& vxc1(ir1,klm,ispden)*pawtab%phiphj(ir,kln) & +& -vxct1(ir1,klm,ispden)*pawtab%tphitphj(ir,kln) + end do + call simp_gen(vxcij1(2*kln-1),ff,pawrad) + call simp_gen(vxcij1(2*kln ),gg,pawrad) + end do + end if + +! ===== Vxc_ij_2 (tmp) ===== + vxcij2=zero;vxcij2_i=zero + if (usexcnhat/=0) then + ll=1+int(sqrt(dble(klm)-0.1_dp)) + if (qphase==1) then + ff(1:mesh_size)=vxct1(1:mesh_size,klm,ispden) & +& *pawtab%shapefunc(1:mesh_size,ll) & +& *pawrad%rad(1:mesh_size)**2 + call simp_gen(vxcij2,ff,pawrad) + else ! qphase==2 + do ir=1,mesh_size + ir1=2*ir + tmp=pawtab%shapefunc(ir,ll)*pawrad%rad(ir)**2 + ff(ir)=vxct1(ir1-1,klm,ispden)*tmp + gg(ir)=vxct1(ir1 ,klm,ispden)*tmp + end do + call simp_gen(vxcij2 ,ff,pawrad) + call simp_gen(vxcij2_i,gg,pawrad) + end if + end if + +! ===== Accumulate over klm moments Vxc_ij_1 and Vxc_ij_2 ===== +! ===== into total Vxc_ij ===== + if (qphase==1) then + do klmn=1,lmn2_size + klm1=pawtab%indklmn(1,klmn) + kln=pawtab%indklmn(2,klmn) + isel=pawang%gntselect(klm,klm1) + if (isel>0) & +& dijxc_idij(klmn)=dijxc_idij(klmn)+vxcij1(kln)*pawang%realgnt(isel) + if (usexcnhat/=0) & + dijxc_idij(klmn)=dijxc_idij(klmn)-pawtab%qijl(klm,klmn)*vxcij2 + end do ! Loop klmn + else ! qphase==2 + klmn1=1 + do klmn=1,lmn2_size + klm1=pawtab%indklmn(1,klmn) + kln=pawtab%indklmn(2,klmn) + isel=pawang%gntselect(klm,klm1) + if (isel>0) then + dijxc_idij(klmn1 )=dijxc_idij(klmn1) & +& +vxcij1(2*kln-1)*pawang%realgnt(isel) + dijxc_idij(klmn1+1)=dijxc_idij(klmn1+1) & +& +vxcij1(2*kln )*pawang%realgnt(isel) + end if + if (usexcnhat/=0) then + dijxc_idij(klmn1 )=dijxc_idij(klmn1) & +& -pawtab%qijl(klm,klmn)*vxcij2 + dijxc_idij(klmn1+1)=dijxc_idij(klmn1+1) & +& -pawtab%qijl(klm,klmn)*vxcij2_i + end if + klmn1=klmn1+qphase + end do ! Loop klmn + end if + + end if ! klm selection + end do ! Loop klm + +! ---------------------------------------------------------- +! Deduce some part of Dij according to symmetries +! ---------------------------------------------------------- + + !if ispden=1 => real part of D^11_ij + !if ispden=2 => real part of D^22_ij + !if ispden=3 => real part of D^12_ij + !if ispden=4 => imaginary part of D^12_ij + klmn1=max(1,ispden-2);klmn2=1 + do klmn=1,lmn2_size + dijxc(klmn1,idij)=dijxc_idij(klmn2) + klmn1=klmn1+cplex_dij + klmn2=klmn2+qphase + end do + if (qphase==2) then + !Same storage with exp^(-i.q.r) phase + klmn1=max(1,ispden-2)+lmn2_size*cplex_dij;klmn2=2 + do klmn=1,lmn2_size + dijxc(klmn1,idij)=dijxc_idij(klmn2) + klmn1=klmn1+cplex_dij + klmn2=klmn2+qphase + end do + endif + + end do !ispden + + !Non-collinear: D_ij(:,4)=D^21_ij=D^12_ij^* + else if (nspden==4.and.idij==4) then + dijxc(:,idij)=dijxc(:,idij-1) + if (cplex_dij==2) then + do klmn=2,lmn2_size*cplex_dij,cplex_dij + dijxc(klmn,idij)=-dijxc(klmn,idij) + end do + if (qphase==2) then + do klmn=2+lmn2_size*cplex_dij,2*lmn2_size*cplex_dij,cplex_dij + dijxc(klmn,idij)=-dijxc(klmn,idij) + end do + end if + end if + + !Antiferro: D_ij(:,2)=D^down_ij=D^up_ij + else if (nsppol==1.and.idij==2) then + dijxc(:,idij)=dijxc(:,idij-1) + end if + +!---------------------------------------------------------- +!End loop on spin density components + end do + +!Free temporary memory spaces + LIBPAW_DEALLOCATE(dijxc_idij) + LIBPAW_DEALLOCATE(vxcij1) + LIBPAW_DEALLOCATE(ff) + LIBPAW_DEALLOCATE(gg) + +end subroutine pawdijxcm +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawdij/pawdijhat +!! NAME +!! pawdijhat +!! +!! FUNCTION +!! Compute the "hat" contribution to the PAW pseudopotential strength Dij, +!! i.e. the compensation charge contribution (for one atom only): +!! D_ij^hat=Intg_R [ V(r). Sum_L(Qij^L(r)). dr] +!! +!! INPUTS +!! cplex_dij=2 if dij is COMPLEX (as in the spin-orbit case), 1 if dij is REAL +!! qphase=2 if dij contains a exp(-i.q.r) phase (as in the q<>0 RF case), 1 if not +!! gprimd(3,3)=dimensional primitive translations for reciprocal space +!! iatom=absolute index of current atom (between 1 and natom) +!! natom=total number of atoms +!! ndij= number of spin components +!! ngrid=number of points of the real space grid (FFT, WVL, ...) treated by current proc +!! ngridtot=total number of points of the real space grid (FFT, WVL, ...) +!! For the FFT grid, thi should be equal to ngfft1*ngfft2*ngfft3 +!! nspden=number of spin density components +!! nsppol=number of independent spin WF components +!! pawang =paw angular mesh and related data +!! pawfgrtab=atomic data given on fine rectangular grid for current atom +!! pawtab(ntypat) =paw tabulated starting data, for current atom +!! Pot(qphase*ngrid,nspden)=potential on real space grid +!! qphon(3)=(RF calculations only) - wavevector of the phonon +!! ucvol=unit cell volume +!! xred(3,my_natom)= reduced atomic coordinates +!! +!! OUTPUT +!! dijhat(cplex_dij*qphase*lmn2_size,ndij)= D_ij^hat terms +!! When Dij is complex (cplex_dij=2): +!! dij(2*i-1,:) contains the real part, dij(2*i,:) contains the imaginary part +!! When a exp(-i.q.r) phase is included (qphase=2): +!! dij(1:cplex_dij*lmn2_size,:) +!! contains the real part of the phase, i.e. D_ij*cos(q.r) +!! dij(cplex_dij*lmn2_size+1:2*cplex_dij*lmn2_size,:) +!! contains the imaginary part of the phase, i.e. D_ij*sin(q.r) +!! +!! SOURCE + +subroutine pawdijhat(dijhat,cplex_dij,qphase,gprimd,iatom,& +& natom,ndij,ngrid,ngridtot,nspden,nsppol,pawang,pawfgrtab,& +& pawtab,Pot,qphon,ucvol,xred,& +& mpi_comm_grid) ! Optional argument + +!Arguments --------------------------------------------- +!scalars + integer,intent(in) :: cplex_dij,iatom,natom,ndij + integer,intent(in) :: ngrid,ngridtot,nspden,nsppol,qphase + integer,intent(in),optional :: mpi_comm_grid + real(dp),intent(in) :: ucvol + type(pawang_type),intent(in) :: pawang + type(pawfgrtab_type),intent(inout) :: pawfgrtab +!arrays + real(dp),intent(in) :: gprimd(3,3),Pot(qphase*ngrid,nspden),qphon(3),xred(3,natom) + real(dp),intent(out) :: dijhat(:,:) + type(pawtab_type),intent(in) :: pawtab + +!Local variables --------------------------------------- +!scalars + integer :: ic,idij,idijend,ier,ils,ilslm,ilslm1,isel,ispden,jc,klm,klmn,klmn1,klmn2 + integer :: lm0,lm_size,lmax,lmin,lmn2_size,mm,my_comm_grid,nfgd,nsploop,optgr0 + logical :: has_qphase,qne0 + real(dp) :: vi,vr + character(len=500) :: msg +!arrays + real(dp) :: rdum1(1),rdum2(2) + real(dp),allocatable :: dijhat_idij(:),prod(:) + +! ************************************************************************* + +!Useful data + lm_size=pawtab%lcut_size**2 + lmn2_size=pawtab%lmn2_size + nfgd=pawfgrtab%nfgd + qne0=(qphon(1)**2+qphon(2)**2+qphon(3)**2>=1.d-15) + has_qphase=(qne0.and.qphase==2) + my_comm_grid=xmpi_comm_self;if (present(mpi_comm_grid)) my_comm_grid=mpi_comm_grid + +!Check data consistency + if (size(dijhat,1)/=cplex_dij*qphase*lmn2_size.or.size(dijhat,2)/=ndij) then + msg='invalid sizes for Dijhat !' + LIBPAW_BUG(msg) + end if + +!Eventually compute g_l(r).Y_lm(r) factors for the current atom (if not already done) + if (pawfgrtab%gylm_allocated==0) then + if (allocated(pawfgrtab%gylm)) then + LIBPAW_DEALLOCATE(pawfgrtab%gylm) + end if + LIBPAW_ALLOCATE(pawfgrtab%gylm,(nfgd,lm_size)) + pawfgrtab%gylm_allocated=2;optgr0=1 + call pawgylm(pawfgrtab%gylm,rdum1,rdum2,lm_size,nfgd,optgr0,0,0,pawtab,pawfgrtab%rfgd) + end if + +!Eventually compute exp(i.q.r) factors for the current atom (if not already done) + if (has_qphase.and.pawfgrtab%expiqr_allocated==0) then + if (pawfgrtab%rfgd_allocated==0) then + msg='pawfgrtab()%rfgd array must be allocated !' + LIBPAW_BUG(msg) + end if + if (allocated(pawfgrtab%expiqr)) then + LIBPAW_DEALLOCATE(pawfgrtab%expiqr) + end if + LIBPAW_ALLOCATE(pawfgrtab%expiqr,(2,nfgd)) + call pawexpiqr(pawfgrtab%expiqr,gprimd,nfgd,qphon,pawfgrtab%rfgd,xred(:,iatom)) + pawfgrtab%expiqr_allocated=2 + end if + +!Init memory + dijhat=zero + LIBPAW_ALLOCATE(prod,(qphase*lm_size)) + LIBPAW_ALLOCATE(dijhat_idij,(qphase*lmn2_size)) + +!---------------------------------------------------------- +!Loop over spin components +!---------------------------------------------------------- + nsploop=nsppol;if (ndij==4) nsploop=4 + do idij=1,nsploop + if (idij<=nsppol.or.(nspden==4.and.idij<=3)) then + + idijend=idij+idij/3 + do ispden=idij,idijend + +! ------------------------------------------------------ +! Compute Int[V(r).g_l(r).Y_lm(r)] +! ------------------------------------------------------ +! Note for non-collinear magnetism: +! We compute Int[V^(alpha,beta)(r).g_l(r).Y_lm(r)] +! Remember: if nspden=4, V is stored as : V^11, V^22, V^12, i.V^21 + + prod=zero + +! ===== Standard case ============================ + if (.not.has_qphase) then + if (qphase==1) then + do ilslm=1,lm_size + do ic=1,nfgd + vr=Pot(pawfgrtab%ifftsph(ic),ispden) + prod(ilslm)=prod(ilslm)+vr*pawfgrtab%gylm(ic,ilslm) + end do + end do + else + ilslm1=1 + do ilslm=1,lm_size + do ic=1,nfgd + jc=2*pawfgrtab%ifftsph(ic) + vr=Pot(jc-1,ispden);vi=Pot(jc,ispden) + prod(ilslm1 )=prod(ilslm1 )+vr*pawfgrtab%gylm(ic,ilslm) + prod(ilslm1+1)=prod(ilslm1+1)+vi*pawfgrtab%gylm(ic,ilslm) + end do + ilslm1=ilslm1+qphase + end do + end if + +! ===== Including Exp(iqr) phase (DFPT only) ===== + else + if (qphase==1) then + do ilslm=1,lm_size + do ic=1,nfgd + vr=Pot(pawfgrtab%ifftsph(ic),ispden) + prod(ilslm)=prod(ilslm)+vr*pawfgrtab%gylm(ic,ilslm)& +& *pawfgrtab%expiqr(1,ic) + end do + end do + else + ilslm1=1 + do ilslm=1,lm_size + do ic=1,nfgd + jc=2*pawfgrtab%ifftsph(ic) + vr=Pot(jc-1,ispden);vi=Pot(jc,ispden) + prod(ilslm1 )=prod(ilslm1 )+pawfgrtab%gylm(ic,ilslm)& +& *(vr*pawfgrtab%expiqr(1,ic)-vi*pawfgrtab%expiqr(2,ic)) + prod(ilslm1+1)=prod(ilslm1+1)+pawfgrtab%gylm(ic,ilslm)& +& *(vr*pawfgrtab%expiqr(2,ic)+vi*pawfgrtab%expiqr(1,ic)) + end do + ilslm1=ilslm1+qphase + end do + end if + end if + +! Scaling factor (unit volume) + prod=prod*ucvol/dble(ngridtot) + +! Reduction in case of parallelism + if (xmpi_comm_size(my_comm_grid)>1) then + call xmpi_sum(prod,my_comm_grid,ier) + end if + +! ---------------------------------------------------------- +! Compute Sum_(i,j)_LM { q_ij^L Int[V(r).g_l(r).Y_lm(r)] } +! ---------------------------------------------------------- +! Note for non-collinear magnetism: +! We compute Sum_(i,j)_LM { q_ij^L Int[V^(alpha,beta)(r).g_l(r).Y_lm(r)] } + + dijhat_idij=zero + + if (qphase==1) then + do klmn=1,lmn2_size + klm =pawtab%indklmn(1,klmn) + lmin=pawtab%indklmn(3,klmn) + lmax=pawtab%indklmn(4,klmn) + do ils=lmin,lmax,2 + lm0=ils**2+ils+1 + do mm=-ils,ils + ilslm=lm0+mm;isel=pawang%gntselect(ilslm,klm) + if (isel>0) dijhat_idij(klmn)=dijhat_idij(klmn) & +& +prod(ilslm)*pawtab%qijl(ilslm,klmn) + end do + end do + end do + else + do klmn=1,lmn2_size + klmn1=2*klmn-1 + klm =pawtab%indklmn(1,klmn) + lmin=pawtab%indklmn(3,klmn) + lmax=pawtab%indklmn(4,klmn) + do ils=lmin,lmax,2 + lm0=ils**2+ils+1 + do mm=-ils,ils + ilslm=lm0+mm;ilslm1=2*ilslm;isel=pawang%gntselect(ilslm,klm) + if (isel>0) then + dijhat_idij(klmn1 )=dijhat_idij(klmn1 )+prod(ilslm1-1)*pawtab%qijl(ilslm,klmn) + dijhat_idij(klmn1+1)=dijhat_idij(klmn1+1)+prod(ilslm1 )*pawtab%qijl(ilslm,klmn) + end if + end do + end do + end do + end if + +! ---------------------------------------------------------- +! Deduce some part of Dij according to symmetries +! ---------------------------------------------------------- + + !if ispden=1 => real part of D^11_ij + !if ispden=2 => real part of D^22_ij + !if ispden=3 => real part of D^12_ij + !if ispden=4 => imaginary part of D^12_ij + klmn1=max(1,ispden-2);klmn2=1 + do klmn=1,lmn2_size + dijhat(klmn1,idij)=dijhat_idij(klmn2) + klmn1=klmn1+cplex_dij + klmn2=klmn2+qphase + end do + if (qphase==2) then + !Same storage with exp^(-i.q.r) phase + klmn1=max(1,ispden-2)+lmn2_size*cplex_dij;klmn2=2 + do klmn=1,lmn2_size + dijhat(klmn1,idij)=dijhat_idij(klmn2) + klmn1=klmn1+cplex_dij + klmn2=klmn2+qphase + end do + endif + + end do !ispden + + !Non-collinear: D_ij(:,4)=D^21_ij=D^12_ij^* + else if (nspden==4.and.idij==4) then + dijhat(:,idij)=dijhat(:,idij-1) + if (cplex_dij==2) then + do klmn=2,lmn2_size*cplex_dij,cplex_dij + dijhat(klmn,idij)=-dijhat(klmn,idij) + end do + if (qphase==2) then + do klmn=2+lmn2_size*cplex_dij,2*lmn2_size*cplex_dij,cplex_dij + dijhat(klmn,idij)=-dijhat(klmn,idij) + end do + end if + end if + + !Antiferro: D_ij(:,2)=D^down_ij=D^up_ij + else if (nsppol==1.and.idij==2) then + dijhat(:,idij)=dijhat(:,idij-1) + end if + +!---------------------------------------------------------- +!End loop on spin density components + end do + +!Free temporary memory spaces + LIBPAW_DEALLOCATE(prod) + LIBPAW_DEALLOCATE(dijhat_idij) + if (pawfgrtab%gylm_allocated==2) then + LIBPAW_DEALLOCATE(pawfgrtab%gylm) + LIBPAW_ALLOCATE(pawfgrtab%gylm,(0,0)) + pawfgrtab%gylm_allocated=0 + end if + if (pawfgrtab%expiqr_allocated==2) then + LIBPAW_DEALLOCATE(pawfgrtab%expiqr) + LIBPAW_ALLOCATE(pawfgrtab%expiqr,(0,0)) + pawfgrtab%expiqr_allocated=0 + end if + +end subroutine pawdijhat +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawdij/pawdijnd +!! NAME +!! pawdijnd +!! +!! FUNCTION +!! Compute the nuclear dipole contribution to the PAW +!! pseudopotential strength Dij +!! (for one atom only) +!! +!! INPUTS +!! cplex_dij=2 if dij is COMPLEX (as in the spin-orbit case), 1 if dij is REAL +!! ndij= number of spin components +!! nucdipmom(3) nuclear magnetic dipole moment for current atom +!! pawrad =paw radial mesh and related data, for current atom +!! pawtab =paw tabulated starting data, for current atom +!! +!! OUTPUT +!! dijnd(cplex_dij*lmn2_size,ndij)= nuclear dipole moment Dij terms +!! cplex_dij=2 must be 2 +!! dij(2*i-1,:) contains the real part, +!! dij(2*i ,:) contains the imaginary part +!! +!! NOTES +!! On-site contribution of a nuclear magnetic dipole moment at $R$. Hamiltonian is +!! $H=(1/2m_e)(p - q_e A)^2 + V$ in SI units, and vector potential $A$ is +!! $A=(\mu_0/4\pi) m\times (r-R)/|r-R|^3 = (\mu_0/4\pi) L_R\cdot m/|r-R|^3$ where +!! $L_R$ is the on-site orbital angular momentum and $m$ is the nuclear magnetic +!! dipole moment. Second order term in A is ignored. In atomic units the on-site term +!! is \alpha^2 L_R\cdot m/|r-R|^3, where \alpha is the fine structure constant. +!! +!! +!! SOURCE + +subroutine pawdijnd(dijnd,cplex_dij,ndij,nucdipmom,pawrad,pawtab) + +!Arguments --------------------------------------------- +!scalars + integer,intent(in) :: cplex_dij,ndij + type(pawrad_type),intent(in) :: pawrad + type(pawtab_type),target,intent(in) :: pawtab +!arrays + real(dp),intent(out) :: dijnd(:,:) + real(dp),intent(in) :: nucdipmom(3) + +!Local variables --------------------------------------- +!scalars + integer :: idir,ij_size,il,ilmn,im,imesh,jl,jlmn,jm,klmn,kln,lmn2_size,mesh_size + real(dp) :: rr + complex(dpc) :: cmatrixelement,lms +!arrays + integer,pointer :: indlmn(:,:),indklmn(:,:) + real(dp),allocatable :: ff(:),intgr3(:) + character(len=500) :: msg + +! ************************************************************************* + +!Useful data + indklmn => pawtab%indklmn + indlmn => pawtab%indlmn + mesh_size=pawtab%mesh_size + ij_size=pawtab%ij_size + lmn2_size=pawtab%lmn2_size + +!Check data consistency + if (cplex_dij/=2) then + msg='cplex_dij must be 2 for nuclear dipole moments !' + LIBPAW_BUG(msg) + end if + if (size(dijnd,1)/=cplex_dij*pawtab%lmn2_size.or.size(dijnd,2)/=ndij) then + msg='invalid sizes for Dijnd !' + LIBPAW_BUG(msg) + end if + + dijnd = zero + + !------------------------------------------------------------------- + ! Computation of (-)/r^3 radial integral + !------------------------------------------------------------------- + + LIBPAW_ALLOCATE(intgr3,(ij_size)) + + LIBPAW_ALLOCATE(ff,(mesh_size)) + do kln=1,ij_size + do imesh = 2, mesh_size + rr = pawrad%rad(imesh) + ff(imesh)=(pawtab%phiphj(imesh,kln)- pawtab%tphitphj(imesh,kln))/(rr**3) + end do !imesh + call pawrad_deducer0(ff,mesh_size,pawrad) + call simp_gen(intgr3(kln),ff,pawrad) + end do + LIBPAW_DEALLOCATE(ff) + + !--------------------------- + ! accumulate matrix elements + !--------------------------- + do klmn=1,lmn2_size + + ilmn=indklmn(7,klmn) + jlmn=indklmn(8,klmn) + + il=indlmn(1,ilmn) + jl=indlmn(1,jlmn) + + im=indlmn(2,ilmn) + jm=indlmn(2,jlmn) + kln=indklmn(2,klmn) + + ! Matrix elements of interest are + ! these are zero if l' /= l and also if l' == l == 0 + if ( il /= jl ) cycle + if ( il == 0 ) cycle + + do idir = 1, 3 + + ! this loop accumulates a dot product so if no dipole moment in direction idir, nothing to do + if( ABS(nucdipmom(idir)) .LT. tol8 ) cycle + + call slxyzs(il,im,idir,jl,jm,lms) + + cmatrixelement = FineStructureConstant2*lms*nucdipmom(idir)*intgr3(kln) + dijnd(2*klmn-1,1) = dijnd(2*klmn-1,1) + real(cmatrixelement) + dijnd(2*klmn ,1) = dijnd(2*klmn ,1) + aimag(cmatrixelement) + + end do ! end loop over idir + + end do ! end loop over basis states + + LIBPAW_DEALLOCATE(intgr3) + + ! in case of ndij > 1, note that there is no spin-flip in this term + ! so therefore down-down = up-up, and up-down and down-up terms are still zero + if(ndij > 1) dijnd(:,2)=dijnd(:,1) + +end subroutine pawdijnd +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawdij/pawdijso +!! NAME +!! pawdijso +!! +!! FUNCTION +!! Compute the spin-orbit contribution to the PAW +!! pseudopotential strength Dij +!! (for one atom only) +!! +!! INPUTS +!! cplex_dij=2 if dij is COMPLEX (as in the spin-orbit case), 1 if dij is REAL +!! qphase=2 if dij contains a exp(-i.q.r) phase (as in the q<>0 RF case), 1 if not +!! ndij= number of spin components for Dij^SO +!! nspden=number of spin density components +!! paw_an =paw arrays given on angular mesh, for current atom +!! pawang =paw angular mesh and related data +!! pawrad =paw radial mesh and related data, for current atom +!! pawtab =paw tabulated starting data, for current atom +!! pawxcdev=Choice of XC development (0=no dev. (use of angular mesh) ; 1 or 2=dev. on moments) +!! spnorbscl=scaling factor for spin-orbit coupling +!! vh1(qphase*mesh_size,v_size,nspden)=all-electron on-site Hartree potential for current atom +!! only spherical moment is used +!! vxc1(qphase*mesh_size,v_size,nspden)=all-electron on-site XC potential for current atom +!! given on a (r,theta,phi) grid (v_size=angl_size) +!! or on (l,m) spherical moments (v_size=lm_size) +!! +!! OUTPUT +!! dijso(cplex_dij*qphase*lmn2_size,ndij)= spin-orbit Dij terms +!! Dij^SO is complex, so cplex_dij=2 must be 2: +!! dij(2*i-1,:) contains the real part +!! dij(2*i,:) contains the imaginary part +!! Dij^SO is represented with 4 components: +!! dijso(:,:,1) contains Dij_SO^up-up +!! dijso(:,:,2) contains Dij_SO^dn-dn +!! dijso(:,:,3) contains Dij_SO^up-dn +!! dijso(:,:,4) contains Dij_SO^dn-up +!! When a exp(-i.q.r) phase is included (qphase=2): +!! dij(1:cplex_dij*lmn2_size,:) +!! contains the real part of the phase, i.e. D_ij*cos(q.r) +!! dij(cplex_dij*lmn2_size+1:2*cplex_dij*lmn2_size,:) +!! contains the imaginary part of the phase, i.e. D_ij*sin(q.r) +!! +!! SOURCE + +subroutine pawdijso(dijso,cplex_dij,qphase,ndij,nspden,& +& pawang,pawrad,pawtab,pawxcdev,spnorbscl,vh1,vxc1) + +!Arguments --------------------------------------------- +!scalars + integer,intent(in) :: cplex_dij,ndij,nspden,pawxcdev,qphase + real(dp), intent(in) :: spnorbscl + type(pawang_type),intent(in) :: pawang +!arrays + real(dp),intent(out) :: dijso(:,:) + real(dp),intent(in) :: vh1(:,:,:),vxc1(:,:,:) + type(pawrad_type),intent(in) :: pawrad + type(pawtab_type),target,intent(in) :: pawtab +!Local variables --------------------------------------- +!scalars + integer :: angl_size,idij,ij_size,ilm,ipts,ispden,jlm,klm,klmn,klmn1,kln + integer :: lm_size,lmn2_size,mesh_size,nsploop + real(dp), parameter :: HalfFineStruct2=half/InvFineStruct**2 + real(dp) :: fact + character(len=500) :: msg +!arrays + integer, pointer :: indklmn(:,:) + real(dp),allocatable :: dijso_rad(:),dv1dr(:),ff(:) + +! ************************************************************************* + +!Useful data + lm_size=pawtab%lcut_size**2 + lmn2_size=pawtab%lmn2_size + ij_size=pawtab%ij_size + angl_size=pawang%angl_size + mesh_size=pawtab%mesh_size + indklmn => pawtab%indklmn + nsploop=4 + +!Check data consistency + if (qphase/=1) then + msg='qphase=2 not yet available in pawdijso!' + LIBPAW_BUG(msg) + end if + if (cplex_dij/=2) then + msg='cplex_dij must be 2 for spin-orbit coupling!' + LIBPAW_BUG(msg) + end if + if (ndij/=4) then + msg='ndij must be 4 for spin-orbit coupling!' + LIBPAW_BUG(msg) + end if + if (pawang%use_ls_ylm==0) then + msg='pawang%use_ls_ylm should be /=0!' + LIBPAW_BUG(msg) + end if + if (size(dijso,1)/=cplex_dij*qphase*lmn2_size.or.size(dijso,2)/=ndij) then + msg='invalid sizes for DijSO!' + LIBPAW_BUG(msg) + end if + if (size(vh1,1)/=qphase*mesh_size.or.size(vh1,2)<1.or.size(vh1,3)<1) then + msg='invalid sizes for vh1!' + LIBPAW_BUG(msg) + end if + if (size(vxc1,1)/=qphase*mesh_size.or.size(vxc1,3)/=nspden.or.& +& (size(vxc1,2)/=angl_size.and.pawxcdev==0).or.& +& (size(vxc1,2)/=lm_size.and.pawxcdev/=0)) then + msg='invalid sizes for vxc1!' + LIBPAW_BUG(msg) + end if + +!------------------------------------------------------------------------ +!----------- Allocations and initializations +!------------------------------------------------------------------------ + +!Eventually compute *alpha2/2*Y_00 (for spin-orbit) + LIBPAW_ALLOCATE(dv1dr,(mesh_size)) + LIBPAW_ALLOCATE(dijso_rad,(ij_size)) + LIBPAW_ALLOCATE(ff,(mesh_size)) + fact=one/sqrt(four_pi) ! Y_00 + if (pawxcdev/=0) then + if (nspden==1) then + ff(1:mesh_size)=vxc1(1:mesh_size,1,1) + else + ff(1:mesh_size)=half*(vxc1(1:mesh_size,1,1)+vxc1(1:mesh_size,1,2)) + end if + else + ff(1:mesh_size)=zero + if (nspden==1) then + do ipts=1,angl_size + ff(1:mesh_size)=ff(1:mesh_size) & +& +vxc1(1:mesh_size,ipts,1)*pawang%angwgth(ipts) + end do + else + do ipts=1,angl_size + ff(1:mesh_size)=ff(1:mesh_size) & +& +half*(vxc1(1:mesh_size,ipts,1)+vxc1(1:mesh_size,ipts,2)) & +& *pawang%angwgth(ipts) + end do + end if + ff(1:mesh_size)=sqrt(four_pi)*ff(1:mesh_size) + end if + ff(1:mesh_size)=fact*(ff(1:mesh_size)+vh1(1:mesh_size,1,1)) + call nderiv_gen(dv1dr,ff,pawrad) + dv1dr(2:mesh_size)=HalfFineStruct2*(one/(one-ff(2:mesh_size)*half/InvFineStruct**2)**2) & +& *dv1dr(2:mesh_size)/pawrad%rad(2:mesh_size) + call pawrad_deducer0(dv1dr,mesh_size,pawrad) + do kln=1,ij_size + ff(1:mesh_size)= dv1dr(1:mesh_size)*pawtab%phiphj(1:mesh_size,kln) + call simp_gen(dijso_rad(kln),ff,pawrad) + end do + LIBPAW_DEALLOCATE(dv1dr) + LIBPAW_DEALLOCATE(ff) + dijso_rad(:)=spnorbscl*dijso_rad(:) + +!------------------------------------------------------------------------ +!----- Loop over density components +!------------------------------------------------------------------------ + do idij=1,nsploop + +! ------------------------------------------------------------------------ +! ----- Computation of Dij_so +! ------------------------------------------------------------------------ + klmn1=1 + dijso(:,idij)=zero + if (mod(idij,2)==1) then + ispden=(1+idij)/2 + do klmn=1,lmn2_size + if (indklmn(3,klmn)==0) then ! il==jl + klm=indklmn(1,klmn);kln=indklmn(2,klmn) + ilm=indklmn(5,klmn);jlm=indklmn(6,klmn) + fact=dijso_rad(kln);if (ilm>jlm) fact=-fact + dijso(klmn1 ,idij)=fact*pawang%ls_ylm(1,klm,ispden) + dijso(klmn1+1,idij)=fact*pawang%ls_ylm(2,klm,ispden) + end if + klmn1=klmn1+cplex_dij + end do + else if (idij==2) then + do klmn=1,lmn2_size + if (indklmn(3,klmn)==0) then ! il==jl + dijso(klmn1 ,2)=-dijso(klmn1 ,1) + dijso(klmn1+1,2)=-dijso(klmn1+1,1) + end if + klmn1=klmn1+cplex_dij + end do + else if (idij==4) then + do klmn=1,lmn2_size + if (indklmn(3,klmn)==0) then ! il==jl + dijso(klmn1 ,4)=-dijso(klmn1 ,3) + dijso(klmn1+1,4)= dijso(klmn1+1,3) + end if + klmn1=klmn1+cplex_dij + end do + end if + +! ----- End loop over idij + end do + + LIBPAW_DEALLOCATE(dijso_rad) + +end subroutine pawdijso + +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawdij/pawdiju +!! NAME +!! pawdiju +!! +!! FUNCTION +!! Compute the DFT+U contribution to the PAW pseudopotential strength Dij, +!! (for one atom only): +!! Dijpawu^{\sigma}_{mi,ni,mj,nj}= +!! \sum_{m,m'} [vpawu^{\sigma}_{m,m'}*phiphjint_{ni,nj}^{m,m'}]= +!! [vpawu^{\sigma}_{mi,mj}*phiphjint_{ni,nj}] +!! +!! INPUTS +!! cplex_dij=2 if dij is COMPLEX (as in the spin-orbit case), 1 if dij is REAL +!! qphase=2 if dij contains a exp(-i.q.r) phase (as in the q<>0 RF case), 1 if not +!! ndij= number of spin components +!! nsppol=number of independent spin WF components +!! pawtab =paw tabulated starting data, for current atom +!! vpawu(cplex_dij,lpawu*2+1,lpawu*2+1,ndij)=moments of DFT+U potential for current atom +!! --- Optional arguments --- +!! atvshift(natvshift,nsppol)=potential energy shift for lm channel & spin (current atom) +!! fatvshift=factor that multiplies atvshift +!! natvshift=number of atomic potential energy shifts (per atom) +!! +!! OUTPUT +!! dijpawu(cplex_dij*qphase*lmn2_size,ndij)= D_ij^U terms +!! When Dij is complex (cplex_dij=2): +!! dij(2*i-1,:) contains the real part, dij(2*i,:) contains the imaginary part +!! When a exp(-i.q.r) phase is included (qphase=2): +!! dij(1:cplex_dij*lmn2_size,:) +!! contains the real part of the phase, i.e. D_ij*cos(q.r) +!! dij(cplex_dij*lmn2_size+1:2*cplex_dij*lmn2_size,:) +!! contains the imaginary part of the phase, i.e. D_ij*sin(q.r) +!! +!! SOURCE + +subroutine pawdiju(dijpawu,cplex_dij,qphase,ndij,nsppol,pawtab,vpawu,& +& natvshift,atvshift,fatvshift) ! optional arguments + +!Arguments --------------------------------------------- +!scalars + integer,intent(in) :: cplex_dij,ndij,nsppol,qphase + integer,intent(in),optional :: natvshift + real(dp),intent(in),optional :: fatvshift +!arrays + real(dp),intent(out) :: dijpawu(:,:) + real(dp),intent(in) :: vpawu(:,:,:,:) + real(dp),intent(in),optional :: atvshift(:,:) + type(pawtab_type),intent(in) :: pawtab + +!Local variables --------------------------------------- +!scalars + integer :: icount,idij,idijeff,idijend,im1,im2,in1,in2,klmn,klmn1,lmax,lmin,lmn2_size + integer :: lpawu,natvshift_,nsploop + character(len=500) :: msg +!arrays + real(dp),allocatable :: coeffpawu(:),dijpawu_idij(:),dijsymU(:,:) + +! ************************************************************************* + +!Useful data + lpawu=pawtab%lpawu + lmn2_size=pawtab%lmn2_size + natvshift_=0;if (present(natvshift)) natvshift_=natvshift + +!Check data consistency + if (qphase/=1) then + msg='qphase=2 not available in pawdiju!' + LIBPAW_BUG(msg) + end if + if (size(dijpawu,1)/=cplex_dij*qphase*lmn2_size.or.size(dijpawu,2)/=ndij) then + msg='invalid sizes for dijpawu !' + LIBPAW_BUG(msg) + end if + if (size(vpawu,1)/=cplex_dij.or.size(vpawu,2)/=2*lpawu+1.or.& +& size(vpawu,3)/=2*lpawu+1.or.size(vpawu,4)/=ndij) then + msg='invalid sizes for vpawu !' + LIBPAW_BUG(msg) + end if + if (natvshift_>0) then + if ((.not.present(atvshift)).or.(.not.present(fatvshift))) then + msg='when natvshift>0, atvshift and fatvshift arguments must be present !' + LIBPAW_BUG(msg) + end if + if (size(atvshift,1)/=natvshift.or.size(atvshift,2)/=nsppol) then + msg='invalid sizes for atvshift !' + LIBPAW_BUG(msg) + end if + end if + +!Init memory + dijpawu=zero + LIBPAW_ALLOCATE(dijpawu_idij,(cplex_dij*lmn2_size)) + LIBPAW_ALLOCATE(coeffpawu,(cplex_dij)) + if (ndij==4) then + LIBPAW_ALLOCATE(dijsymU,(cplex_dij*lmn2_size,4)) + end if + +!Loop over spin components +!---------------------------------------------------------- + nsploop=nsppol;if (ndij==4) nsploop=4 + do idij=1,nsploop + if (idij<=nsppol.or.(ndij==4.and.idij<=3)) then + + idijend=idij+idij/3 + do idijeff=idij,idijend ! if ndij==4, idijeff is used to compute updn and dnup contributions + + dijpawu_idij=zero + +! Loop over (l,m,n) moments +! ---------------------------------------------------------- + klmn1=1 + do klmn=1,lmn2_size + im1=pawtab%klmntomn(1,klmn) + im2=pawtab%klmntomn(2,klmn) + lmin=pawtab%indklmn(3,klmn) + lmax=pawtab%indklmn(4,klmn) + +! Select l=lpawu + if (lmin==0.and.lmax==2*lpawu) then + +! Check consistency + in1=pawtab%klmntomn(3,klmn) + in2=pawtab%klmntomn(4,klmn) + icount=in1+(in2*(in2-1))/2 + if (pawtab%ij_proj0 RF case), 1 if not +!! nspden=number of spin density components +!! pawrhoij = paw rhoij occupancies (and related data) for current atom +!! pawtab =paw tabulated starting data, for current atom +!! +!! OUTPUT +!! diju(cplex_dij*qphase*lmn2_size,ndij)= D_ij^U terms +!! diju_im(cplex_dij*qphase*lmn2_size,ndij)= (see below) +!! When Dij is complex (cplex_dij=2): +!! dij(2*i-1,:) contains the real part, dij(2*i,:) contains the imaginary part +!! When a exp(-i.q.r) phase is included (qphase=2): +!! dij(1:cplex_dij*lmn2_size,:) +!! contains the real part of the phase, i.e. D_ij*cos(q.r) +!! dij(cplex_dij*lmn2_size+1:2*cplex_dij*lmn2_size,:) +!! contains the imaginary part of the phase, i.e. D_ij*sin(q.r) +!! +!! NOTES +!! There are some subtleties : +!! Contrary to eijkl, eu_ijkl is not invariant with respect to the permutation of i <--> j or k <--> l. +!! Also, we have to deal with spin polarization. +!! In the non-collinear magnetism case, the correct expression of Dij^st (s and t being spin indexes) is: +!! +!! D_kl^st = delta_st sum_ij rho_ij^ss eu_ijkl(1) +!! + delta_st sum_ij rho_ij^-s-s eu_ijkl(2) +!! + (1-delta_st) sum_ij rho_ij^st eu_ijkl(3) +!! +!! As only the lower triangular part of the Dij matrix is stored (i<=j), in practice we have: +!! +!! D_kl^st = delta_st sum_i<=j ( rho_ij^ss eu_ijkl(1) + (1-delta_ij) rho_ji^ss eu_jikl(1) ) +!! + delta_st sum_i<=j ( rho_ij^-s-s eu_ijkl(2) + (1-delta_ij) rho_ji^-s-s eu_jikl(2) ) +!! + (1-delta_st) sum_i<=j ( rho_ij^st eu_ijkl(3) + (1-delta_ij) rho_ji^st eu_jikl(3) ) +!! +!! In the following, we will use that: (according to the rules in pawpuxinit.F90) +!! (a) eu_ijkl + eu_jikl = eu_ijlk + eu_jilk (invariant when exchanging k <--> l) +!! (b) eu_ijkl - eu_jikl = - eu_ijlk + eu_jilk (change of sign when exchanging k <--> l) +!! and : +!! (c) eu_iikl = eu_iilk (if i=j, invariant when exchanging k <--> l) +!! (d) eu_ijkk = eu_jikk (if k=l, invariant when exchanging i <--> j) +!! +!! qphase=1 (ipert=0 or q=0): +!! -------------------------- +!! +!! --- Non-collinear case: +!! +!! We have: +!! rho_ji^st = (rho_ij^ts)^* +!! Re(rho_ji^st) = Re(rho_ij^ts) +!! Im(rho_ji^st) = -Im(rho_ij^ts) +!! +!! As eu_ijkl is real one gets: +!! +!! Re(D_kl^st) = delta_st sum_i<=j Re(rho_ij^ss) ( eu_ijkl(1) + (1-delta_ij) eu_jikl(1) ) +!! + delta_st sum_i<=j Re(rho_ij^-s-s) ( eu_ijkl(2) + (1-delta_ij) eu_jikl(2) ) +!! + (1-delta_st) sum_i<=j ( Re(rho_ij^st) eu_ijkl(3) + (1-delta_ij) Re(rho_ij^ts) eu_jikl(3) ) +!! +!! Im(D_kl^st) = delta_st sum_i<=j Im(rho_ij^ss) ( eu_ijkl(1) - (1-delta_ij) eu_jikl(1) ) +!! + delta_st sum_i<=j Im(rho_ij^-s-s) ( eu_ijkl(2) - (1-delta_ij) eu_jikl(2) ) +!! + (1-delta_st) sum_i<=j ( Im(rho_ij^st) eu_ijkl(3) - (1-delta_ij) Im(rho_ij^ts) eu_jikl(3) ) +!! +!! --- Collinear case: +!! +!! Re(D_kl^s) = sum_i<=j Re(rho_ij^s) ( eu_ijkl(1) + (1-delta_ij) eu_jikl(1) ) +!! + sum_i<=j Re(rho_ij^-s) ( eu_ijkl(2) + (1-delta_ij) eu_jikl(2) ) +!! +!! Im(D_kl^s) = sum_i<=j Im(rho_ij^s) ( eu_ijkl(1) - (1-delta_ij) eu_jikl(1) ) +!! + sum_i<=j Im(rho_ij^-s) ( eu_ijkl(2) - (1-delta_ij) eu_jikl(2) ) +!! +!! Using (a) and (c) one gets: +!! Re(D_kl^s) = Re(D_lk^s) +!! Using (b) and (c) one gets: +!! Im(D_kl^s) = -Im(D_lk^s) +!! +!! --- Without magnetism (rho_ij^up = rho_ij^down = 1/2 rho_ij^tot): +!! +!! Re(D_kl) = 1/2 sum_i<=j Re(rho_ij) ( eu_ijkl(1) + eu_ijkl(2) + (1-delta_ij) ( eu_jikl(1) + euijkl(2) ) ) +!! +!! Im(D_kl) = 1/2 sum_i<=j Im(rho_ij) ( eu_ijkl(1) + eu_ijkl(2) - (1-delta_ij) ( eu_jikl(1) + euijkl(2) ) ) +!! +!! qphase=2 (ipert>0 and q/=0) - no magnetism or collinear: +!! ------------------------------------------------------- +!! We have: +!! rho_ji = rhoA_ji + rhoB_ji +!! where: +!! rhoA_ji = rhoA_ij^* +!! rhoB_ji = rhoB_ij +!! So: +!! D_kl = sum_i<=j ( rho_ij eu_ijkl + (1-delta_ij) (rhoA_ij^* + rhoB_ij) eu_jikl ) +!! As eu_ijkl is real: +!! Re(D_kl) = sum_i<=j Re(rho_ij) ( eu_ijkl + (1-delta_ij) eu_jikl ) +!! Im(D_kl) = sum_i<=j Im(rhoB_ij) ( eu_ijkl + (1-delta_ij) eu_jikl ) +!! + sum_i<=j Im(rhoA_ij) ( eu_ijkl - (1-delta_ij) eu_jikl ) +!! We note: +!! Im(D_kl^A) = sum_i<=j Im(rhoA_ij) ( eu_ijkl - (1-delta_ij) eu_jikl ) +!! Im(D_kl^B) = sum_i<=j Im(rhoB_ij) ( eu_ijkl + (1-delta_ij) eu_jikl ) +!! We still have: +!! Re(D_kl) = Re(D_lk) +!! but: +!! Im(D_kl^A) = -Im(D_lk^A) ( using (b) and (c) ) +!! Im(D_kl^B) = Im(D_lk^B) ( using (a) and (c) ) +!! +!! SOURCE + +subroutine pawdiju_euijkl(diju,cplex_dij,qphase,ndij,pawrhoij,pawtab) + +!Arguments --------------------------------------------- +!scalars + integer,intent(in) :: cplex_dij,ndij,qphase +!arrays + real(dp),intent(out) :: diju(:,:) + type(pawrhoij_type),intent(in) :: pawrhoij + type(pawtab_type),intent(in) :: pawtab + +!Local variables --------------------------------------- +!scalars + integer :: cplex_rhoij,iq,iq0_dij,iq0_rhoij,ilmn,ilmnp,irhoij,j0lmnp,jlmn,jlmnp,jrhoij,select_euijkl + integer :: klmn,klmnp,klmn1,lmn2_size,max_euijkl,min_euijkl,sig1,sig2,sig2p + logical :: compute_im + character(len=500) :: msg +!arrays + real(dp) :: ro(2,ndij),euijkl_temp(3,2) + +! ************************************************************************* + +!Check data consistency + lmn2_size=pawrhoij%lmn2_size + if (size(diju,1)/=qphase*cplex_dij*lmn2_size.or.size(diju,2)/=ndij) then + msg='invalid sizes for diju!' + LIBPAW_BUG(msg) + end if + if (pawrhoij%qphase lmn2_size) + !2nd loop: we store the imaginary part in dij(lmn2_size+1 -> 2*lmn2_size) + iq0_dij=merge(0,cplex_dij*lmn2_size,iq==1) + iq0_rhoij=merge(0,cplex_rhoij*lmn2_size,iq==1) + + !Loop over rhoij elements + jrhoij=iq0_rhoij+1 + do irhoij=1,pawrhoij%nrhoijsel + klmn=pawrhoij%rhoijselect(irhoij) + ilmn=pawtab%indklmn(7,klmn) + jlmn=pawtab%indklmn(8,klmn) + + !Storage of rhoij in ro (with a change of representation if nspinor=2) + if (ndij==1) then ! rho_up = rho_down = 1/2 rho_tot + ro(1:cplex_rhoij,1)=half*pawrhoij%rhoijp(jrhoij:jrhoij+cplex_rhoij-1,1) + else if (ndij==2) then + do sig2=1,ndij + ro(1:cplex_rhoij,sig2)=pawrhoij%rhoijp(jrhoij:jrhoij+cplex_rhoij-1,sig2) + end do + else ! ndij=4 + !up up = 1/2 ( tot + z ) + ro(1:cplex_rhoij,1)=half*(pawrhoij%rhoijp(jrhoij:jrhoij+cplex_rhoij-1,1)+pawrhoij%rhoijp(jrhoij:jrhoij+cplex_rhoij-1,4)) + !down down = 1/2 ( tot - z ) + ro(1:cplex_rhoij,2)=half*(pawrhoij%rhoijp(jrhoij:jrhoij+cplex_rhoij-1,1)-pawrhoij%rhoijp(jrhoij:jrhoij+cplex_rhoij-1,4)) + if (cplex_rhoij==1) ro(2,1:2) = zero + !up down = 1/2 ( x - i y ) + ro(1,3)= half*pawrhoij%rhoijp(jrhoij,2) + ro(2,3)=-half*pawrhoij%rhoijp(jrhoij,3) + if (cplex_rhoij==2) then + ro(1,3)=ro(1,3)+half*pawrhoij%rhoijp(jrhoij+1,3) + ro(2,3)=ro(2,3)+half*pawrhoij%rhoijp(jrhoij+1,2) + end if + !down up = 1/2 ( x + i y ) + ro(1,4)=half*pawrhoij%rhoijp(jrhoij,2) + ro(2,4)=half*pawrhoij%rhoijp(jrhoij,3) + if (cplex_rhoij==2) then + ro(1,4)=ro(1,4)-half*pawrhoij%rhoijp(jrhoij+1,3) + ro(2,4)=ro(2,4)+half*pawrhoij%rhoijp(jrhoij+1,2) + end if + end if + + do jlmnp=1,pawtab%lmn_size + j0lmnp=jlmnp*(jlmnp-1)/2 + do ilmnp=1,jlmnp + klmnp=j0lmnp+ilmnp + klmn1=iq0_dij+cplex_dij*(klmnp-1)+1 + + euijkl_temp(:,1) = pawtab%euijkl(:,ilmn,jlmn,ilmnp,jlmnp) + euijkl_temp(:,2) = pawtab%euijkl(:,jlmn,ilmn,ilmnp,jlmnp) + + !Loop over spin-components (rhoij) + do select_euijkl=min_euijkl,max_euijkl + if (sig1<=2) then ! up/up and down/down Dij components + if (ndij==1) then + sig2=1 + else + if (select_euijkl==1) then ! Diagonal part of the spin matrix + sig2=sig1 + else if (select_euijkl==2) then ! Non-diagonal part + if (sig1==1) sig2=2 + if (sig1==2) sig2=1 + end if + end if + sig2p = sig2 + else ! select_euijkl = 3 + sig2 = sig1 + if (sig1==3) sig2p=4 + if (sig1==4) sig2p=3 + end if + !Re(D_kl) = sum_i<=j Re(rho_ij) ( eu_ijlk + (1-delta_ij) eu_jilk ) = Re(D_lk) + diju(klmn1,sig1)=diju(klmn1,sig1)+ro(1,sig2)*euijkl_temp(select_euijkl,1) + if (ilmn/=jlmn) then + diju(klmn1,sig1)=diju(klmn1,sig1)+ro(1,sig2p)*euijkl_temp(select_euijkl,2) + end if + !Im(D_kl) = sum_i<=j Im(rho_ij) ( eu_ijlk - (1-delta_ij) eu_jilk ) = -Im(D_lk) + if (compute_im) then + diju(klmn1+1,sig1)=diju(klmn1+1,sig1)+ro(2,sig2)*euijkl_temp(select_euijkl,1) + if (ilmn/=jlmn) then + diju(klmn1+1,sig1)=diju(klmn1+1,sig1)-ro(2,sig2p)*euijkl_temp(select_euijkl,2) + end if + end if + end do + + end do + end do ! k,l + + jrhoij=jrhoij+cplex_rhoij + end do ! i,j + + end do ! q phase + + end do !sig1 + +end subroutine pawdiju_euijkl +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawdij/pawdijexxc +!! NAME +!! pawdijexxc +!! +!! FUNCTION +!! Compute the local Exact-Exchange contribution to the PAW pseudopotential strength Dij, +!! using a potential expressed as (l,m) spherical moments +!! (for one atom only; only for correlated electrons): +!! D_ij^EXXC= < Phi_i|alpha*(VFock(correlated)-Vxc(n1_correlated)|Phi_j> +!! +!! INPUTS +!! cplex_dij=2 if dij is COMPLEX (as in the spin-orbit case), 1 if dij is REAL +!! qphase=2 if dij contains a exp(-i.q.r) phase (as in the q<>0 RF case), 1 if not +!! lmselect(lm_size)=select the non-zero LM-moments of on-site potentials +!! ndij= number of spin components +!! nsppol=number of independent spin WF components +!! pawang =paw angular mesh and related data +!! pawrad =paw radial mesh and related data, for current atom +!! pawtab =paw tabulated starting data, for current atom +!! vpawx(1,lmn2_size,ndij)=moments of exact exchange potential +!! for current atom and for correlated electrons +!! vxc_ex(qphase*mesh_size,lm_size,nspden)=all-electron on-site XC potential for current atom +!! taken into account only valence correlated electrons +!! +!! OUTPUT +!! dijexxc(cplex_dij*lmn2_size,ndij)= D_ij^Exact-Exchange terms +!! When Dij is complex (cplex_dij=2): +!! dij(2*i-1,:) contains the real part, dij(2*i,:) contains the imaginary part +!! When a exp(-i.q.r) phase is included (qphase=2): +!! dij(1:cplex_dij*lmn2_size,:) +!! contains the real part of the phase, i.e. D_ij*cos(q.r) +!! dij(cplex_dij*lmn2_size+1:2*cplex_dij*lmn2_size,:) +!! contains the imaginary part of the phase, i.e. D_ij*sin(q.r) +!! +!! SOURCE + +subroutine pawdijexxc(dijexxc,cplex_dij,qphase,lmselect,ndij,nspden,nsppol,& +& pawang,pawrad,pawtab,vpawx,vxc_ex) + +!Arguments --------------------------------------------- +!scalars + integer,intent(in) :: cplex_dij,ndij,nspden,nsppol,qphase + type(pawang_type),intent(in) :: pawang +!arrays + logical :: lmselect(:) + real(dp),intent(in) :: vpawx(:,:,:),vxc_ex(:,:,:) + real(dp),intent(out) :: dijexxc(:,:) + type(pawrad_type),intent(in) :: pawrad + type(pawtab_type),intent(in) :: pawtab + +!Local variables --------------------------------------- +!scalars + integer :: icount,idij,idijend,ij_size,iln,in1,in2,ir,ir1,isel,ispden,ivxc + integer :: jln,j0ln,klm,klm1,klmn,klmn1,klmn2,kln,lexexch,ln_min,ln_max,lmax,lmin + integer :: lm_size,lmn2_size,mesh_size,nsploop + character(len=500) :: msg +!arrays + real(dp),allocatable :: dijexxc_idij(:),ff(:),gg(:),vxcij1(:) + +! ************************************************************************* + +!Useful data + lm_size=pawtab%lcut_size**2 + lmn2_size=pawtab%lmn2_size + ij_size=pawtab%ij_size + mesh_size=pawtab%mesh_size + lexexch=pawtab%lexexch + ln_min=pawtab%lnproju(1) + ln_max=pawtab%lnproju(pawtab%nproju) + +!Check data consistency + if (qphase==2) then + msg='pawdijexx not available for qphase=2!' + LIBPAW_BUG(msg) + end if + if (size(dijexxc,1)/=cplex_dij*qphase*lmn2_size.or.size(dijexxc,2)/=ndij) then + msg='invalid sizes for dijexxc!' + LIBPAW_BUG(msg) + end if + if (size(lmselect)/=lm_size) then + msg='invalid size for lmselect!' + LIBPAW_BUG(msg) + end if + if (size(vxc_ex,1)/=qphase*mesh_size.or.size(vxc_ex,2)/=lm_size.or.& +& size(vxc_ex,3)/=nspden) then + msg='invalid sizes for vxc_ex!' + LIBPAW_BUG(msg) + end if + if (size(vpawx,1)/=1.or.size(vpawx,2)/=lmn2_size.or.& +& size(vpawx,3)/=ndij) then + msg='invalid sizes for vpawx!' + LIBPAW_BUG(msg) + end if + +!Init memory + dijexxc=zero + LIBPAW_ALLOCATE(dijexxc_idij,(qphase*lmn2_size)) + LIBPAW_ALLOCATE(vxcij1,(qphase*ij_size)) + LIBPAW_ALLOCATE(ff,(mesh_size)) + LIBPAW_ALLOCATE(gg,(mesh_size)) + +!---------------------------------------------------------- +!Loop over spin components +!---------------------------------------------------------- + nsploop=nsppol;if (ndij==4) nsploop=4 + do idij=1,nsploop + + if (idij<=nsppol.or.(ndij==4.and.idij<=3)) then + + idijend=idij+idij/3 + do ispden=idij,idijend + + dijexxc_idij=zero + + ivxc=ispden + !Take into account nspden=1/nspinor=2 case + if (ndij/=nspden.and.ispden==2) ivxc=1 + if (ndij/=nspden.and.ispden> 2) cycle + +! ---------------------------------------------------------- +! Summing over (l,m) moments +! ---------------------------------------------------------- + do klm=1,lm_size + if (lmselect(klm)) then + +! ===== Vxc_ij_1 (tmp) ===== + vxcij1=zero + if (qphase==1) then + do jln=ln_min,ln_max + j0ln=jln*(jln-1)/2 + do iln=ln_min,jln + kln=j0ln+iln + ff(1:mesh_size)= & +& vxc_ex(1:mesh_size,klm,ivxc)*pawtab%phiphj(1:mesh_size,kln) + call simp_gen(vxcij1(kln),ff,pawrad) + end do + end do + else + do jln=ln_min,ln_max + j0ln=jln*(jln-1)/2 + do iln=ln_min,jln + kln=j0ln+iln + do ir=1,mesh_size + ir1=2*ir + ff(ir)= & +& vxc_ex(ir1-1,klm,ivxc)*pawtab%phiphj(ir,kln) + gg(ir)= & +& vxc_ex(ir1,klm,ivxc)*pawtab%phiphj(ir,kln) + end do + call simp_gen(vxcij1(2*kln-1),ff,pawrad) + call simp_gen(vxcij1(2*kln ),gg,pawrad) + end do + end do + end if + +! ===== Accumulate Vxc_ij_1 over klm moments ===== + if (qphase==1) then + do klmn=1,lmn2_size + lmin=pawtab%indklmn(3,klmn) + lmax=pawtab%indklmn(4,klmn) + if (lmin==0.and.lmax==2*lexexch) then + klm1=pawtab%indklmn(1,klmn) + kln=pawtab%indklmn(2,klmn) + isel=pawang%gntselect(klm,klm1) + if (isel>0) dijexxc_idij(klmn)=dijexxc_idij(klmn) & +& +vxcij1(kln)*pawang%realgnt(isel) + end if + end do ! Loop klmn + else ! qphase==2 + klmn1=1 + do klmn=1,lmn2_size + lmin=pawtab%indklmn(3,klmn) + lmax=pawtab%indklmn(4,klmn) + if (lmin==0.and.lmax==2*lexexch) then + klm1=pawtab%indklmn(1,klmn) + kln=pawtab%indklmn(2,klmn) + isel=pawang%gntselect(klm,klm1) + if (isel>0) then + dijexxc_idij(klmn1 )=dijexxc_idij(klmn1) & +& +vxcij1(2*kln-1)*pawang%realgnt(isel) + dijexxc_idij(klmn1+1)=dijexxc_idij(klmn1+1) & +& +vxcij1(2*kln )*pawang%realgnt(isel) + end if + end if + klmn1=klmn1+qphase + end do ! Loop klmn + end if + + end if ! lmselect + end do ! Loop klm + +! Mix Hartree and GGA terms + if (qphase==1) then + do klmn=1,lmn2_size + lmin=pawtab%indklmn(3,klmn) + lmax=pawtab%indklmn(4,klmn) + if (lmin==0.and.lmax==2*lexexch) then + in1=pawtab%klmntomn(3,klmn) + in2=pawtab%klmntomn(4,klmn) + icount=in1+(in2*(in2-1))/2 + if(pawtab%ij_proj real part of D^11_ij + !if ispden=2 => real part of D^22_ij + !if ispden=3 => real part of D^12_ij + !if ispden=4 => imaginary part of D^12_ij + klmn1=max(1,ispden-2);klmn2=1 + do klmn=1,lmn2_size + dijexxc(klmn1,idij)=dijexxc_idij(klmn2) + klmn1=klmn1+cplex_dij + klmn2=klmn2+qphase + end do + if (qphase==2) then + !Same storage with exp^(-i.q.r) phase + klmn1=max(1,ispden-2)+lmn2_size*cplex_dij;klmn2=2 + do klmn=1,lmn2_size + dijexxc(klmn1,idij)=dijexxc_idij(klmn2) + klmn1=klmn1+cplex_dij + klmn2=klmn2+qphase + end do + endif + + end do !ispden + + !Non-collinear: D_ij(:,4)=D^21_ij=D^12_ij^* + else if (nspden==4.and.idij==4) then + dijexxc(:,idij)=dijexxc(:,idij-1) + if (cplex_dij==2) then + do klmn=2,lmn2_size*cplex_dij,cplex_dij + dijexxc(klmn,idij)=-dijexxc(klmn,idij) + end do + if (qphase==2) then + do klmn=2+lmn2_size*cplex_dij,2*lmn2_size*cplex_dij,cplex_dij + dijexxc(klmn,idij)=-dijexxc(klmn,idij) + end do + end if + end if + + !Antiferro: D_ij(:,2)=D^down_ij=D^up_ij + else if (nsppol==1.and.idij==2) then + dijexxc(:,idij)=dijexxc(:,idij-1) + end if + +!---------------------------------------------------------- +!End loop on spin density components + end do + +!Free temporary memory spaces + LIBPAW_DEALLOCATE(dijexxc_idij) + LIBPAW_DEALLOCATE(vxcij1) + LIBPAW_DEALLOCATE(ff) + LIBPAW_DEALLOCATE(gg) + +end subroutine pawdijexxc +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawdij/pawdijfr +!! +!! NAME +!! pawdijfr +!! +!! FUNCTION +!! PAW, Response Function only: +!! Compute frozen part of psp strength Dij due to 1st-order compensation density +!! and first order local potential: +!! Dijfr =Int_R^3{vtrial*Sum_LM[Q_ij_q^LM^(1)] + Vloc^(1)*Sum_LM[Q_ij_q^LM]} +!! Depends on q wave vector but not on first-order wave-function. +!! +!! INPUTS +!! gprimd(3,3)=dimensional primitive translations for reciprocal space +!! idir=direction of atomic displacement (in case of phonons perturb.) +!! ipert=index of perturbation +!! mpi_atmtab(:)=--optional-- indexes of the atoms treated by current proc +!! comm_atom=--optional-- MPI communicator over atoms +!! mpi_comm_grid=--optional-- MPI communicator over real space grid components +!! my_natom=number of atoms treated by current processor +!! natom=total number of atoms in cell +!! nfft=(effective) number of FFT grid points (for this processor) +!! nspden=number of spin-density components +!! nsppol=number of independent spin WF components +!! ntypat=number of types of atoms +!! option=0: computes full frozen part of Dij +!! 1: computes frozen part of Dij without contribution from Vpsp1 +!! pawang =paw angular mesh and related data +!! pawfgrtab(my_natom) =atomic data given on fine rectangular grid +!! pawrad(ntypat*usepaw) =paw radial mesh and related data +!! pawtab(ntypat) =paw tabulated starting data +!! qphase=2 if dij contains a exp(-i.q.r) phase (as in the q<>0 RF case), 1 if not +!! qphon(3)=wavevector of the phonon +!! rprimd(3,3)=dimensional primitive translations for real space +!! ucvol=unit cell volume (bohr^3) +!! vpsp1(qphase*nfft)= first-order change of local potential +!! vtrial(nfft,nspden)= total GS potential +!! vxc(nfft,nspden)=XC potential +!! xred(3,my_natom)= reduced atomic coordinates +!! +!! OUTPUT +!! paw_ij1(iatom)%dijfr(cplex_dij*qphase*lmn2_size,nspden)= +!! frozen contribution to psp strength Dij +!! =Int_R^3{vtrial*Sum_LM[Q_ij_q^LM^(1)] + Vloc^(1)*Sum_LM[Q_ij_q^LM]} +!! When Dij is complex (cplex_dij=2): +!! dij(2*i-1,:) contains the real part, dij(2*i,:) contains the imaginary part +!! When a exp(-i.q.r) phase is included (qphase=2): +!! dij(1:cplex_dij*lmn2_size,:) +!! contains the real part of the phase, i.e. D_ij*cos(q.r) +!! dij(cplex_dij*lmn2_size+1:2*cplex_dij*lmn2_size,:) +!! contains the imaginary part of the phase, i.e. D_ij*sin(q.r) +!! +!! SOURCE + +subroutine pawdijfr(gprimd,idir,ipert,my_natom,natom,nfft,ngfft,nspden,nsppol,ntypat,& +& option,paw_ij1,pawang,pawfgrtab,pawrad,pawtab,qphase,qphon,rprimd,ucvol,& +& vpsp1,vtrial,vxc,xred,& +& mpi_atmtab,comm_atom,mpi_comm_grid) ! optional arguments (parallelism) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: idir,ipert,my_natom,natom,nfft,nspden,nsppol,ntypat,option,qphase + integer,optional,intent(in) :: comm_atom,mpi_comm_grid + real(dp),intent(in) :: ucvol + type(pawang_type),intent(in) :: pawang +!arrays + integer,intent(in) :: ngfft(18) + integer,optional,target,intent(in) :: mpi_atmtab(:) + real(dp),intent(in) :: gprimd(3,3),qphon(3),rprimd(3,3) + real(dp),intent(in) :: vpsp1(qphase*nfft),vtrial(nfft,nspden),vxc(nfft,nspden) + real(dp),intent(in) :: xred(3,natom) + type(paw_ij_type),intent(inout) :: paw_ij1(my_natom) + type(pawfgrtab_type),intent(inout) :: pawfgrtab(my_natom) + type(pawrad_type),intent(in) :: pawrad(ntypat) + type(pawtab_type),intent(in) :: pawtab(ntypat) + +!Local variables------------------------------- +!scalars + integer :: cplex_dij,cplex_nspden,cplex_p1,iatom,iatom_tot,ic,idij,idijend,ier,ils,ilslm,isel + integer :: ispden,istr,itypat,jc,klm,klmn,klmn1,klmn2,kln,lm_size,lmn2_size,lm0,lmax,lmin,mesh_size + integer :: mm,my_comm_atom,my_comm_grid,mu,mua,mub,ndij,nfftot,nfgd,nsploop + integer :: optgr0,optgr1,optgr2,usexcnhat + logical :: has_qphase,my_atmtab_allocated,need_dijfr_1,need_dijfr_2,need_dijfr_3,need_dijfr_4 + logical :: paral_atom,qne0,testdij1,testdij2,testdij3 + real(dp) :: c1,fact,intg,rg1 + character(len=500) :: msg +!arrays + integer,parameter :: m_index(3)=(/1,-1,0/) + integer,pointer :: my_atmtab(:) + integer,parameter :: alpha(9)=(/1,2,3,3,3,2,2,1,1/),beta(9)=(/1,2,3,2,1,1,3,3,2/) + real(dp) :: contrib(2) + real(dp),allocatable :: ff(:),intv(:,:),intv1(:,:),intv2(:,:),intvloc(:,:),intv_tmp(:,:) + real(dp),allocatable :: rg(:),vloc(:,:) + +! ************************************************************************* + +!Nothing to be done for DDK + if (ipert==natom+1.or.ipert==natom+10) return + +!Set up parallelism over atoms + paral_atom=(present(comm_atom).and.(my_natom/=natom)) + nullify(my_atmtab);if (present(mpi_atmtab)) my_atmtab => mpi_atmtab + my_comm_atom=xmpi_comm_self;if (present(comm_atom)) my_comm_atom=comm_atom + my_comm_grid=xmpi_comm_self;if (present(mpi_comm_grid)) my_comm_grid=mpi_comm_grid + call get_my_atmtab(my_comm_atom,my_atmtab,my_atmtab_allocated,paral_atom,natom,my_natom_ref=my_natom) + +!Compatibility tests + qne0=(qphon(1)**2+qphon(2)**2+qphon(3)**2>=1.d-15) + if (my_natom>0) then + if (qne0.and.qphase==1) then + msg='qphase must be 2 when q<>0!' + LIBPAW_BUG(msg) + end if + if (paw_ij1(1)%qphase/=qphase) then + msg='paw_ij1()%qphase and qphase must be equal !' + LIBPAW_BUG(msg) + end if + if (paw_ij1(1)%has_dijfr==0) then + msg='pawdij1()%dijfr must be allocated !' + LIBPAW_BUG(msg) + end if + testdij1=(ipert<=natom.and.option==0.and.pawfgrtab(1)%gylm_allocated==0) + testdij2=(ipert<=natom.and.pawfgrtab(1)%gylmgr_allocated==0) + testdij3=(testdij2.and.qne0.and.pawfgrtab(1)%expiqr_allocated==0) + if ((testdij1.or.testdij2.or.testdij3).and.pawfgrtab(1)%rfgd_allocated==0) then + msg='pawfgrtab()%rfgd array must be allocated !' + LIBPAW_BUG(msg) + end if + end if + +!Get correct index of strain pertubation + if (ipert==natom+3) istr = idir + if (ipert==natom+4) istr = idir + 3 + +!Some inits + usexcnhat=maxval(pawtab(1:ntypat)%usexcnhat) + nfftot=ngfft(1)*ngfft(2)*ngfft(3) + fact=ucvol/dble(nfftot) + cplex_nspden=merge(1,2,nspden/=4) + +!Loops over atoms + do iatom=1,my_natom + iatom_tot=iatom;if (paral_atom) iatom_tot=my_atmtab(iatom) + +! Select which part of Dijfr to compute + need_dijfr_1=(ipert==iatom_tot.and.paw_ij1(iatom)%has_dijfr==1) + need_dijfr_2=(ipert<=natom.and.paw_ij1(iatom)%has_dijfr==1.and.(option==0)) + need_dijfr_3=((ipert==natom+2.or.ipert==natom+11).and.paw_ij1(iatom)%has_dijfr==1) + need_dijfr_4=((ipert==natom+3.or.ipert==natom+4).and.paw_ij1(iatom)%has_dijfr==1) + + if ((.not.need_dijfr_1).and.(.not.need_dijfr_2).and.(.not.need_dijfr_3).and.(.not.need_dijfr_4)) then + if (paw_ij1(iatom)%has_dijfr>0) then + paw_ij1(iatom)%dijfr=zero ; paw_ij1(iatom)%has_dijfr=2 + end if + cycle + end if + +! Some atom-dependent quantities + itypat=pawfgrtab(iatom)%itypat + lm_size=pawtab(itypat)%lcut_size**2 + lmn2_size=pawtab(itypat)%lmn2_size + cplex_dij=paw_ij1(iatom)%cplex_dij + ndij=paw_ij1(iatom)%ndij + +! Eventually compute g_l(r).Y_lm(r) factors for the current atom (if not already done) + nfgd=0 + if (need_dijfr_1.or.need_dijfr_2.or.need_dijfr_4) then + nfgd=pawfgrtab(iatom)%nfgd + if (((need_dijfr_2.or.need_dijfr_4).and.(pawfgrtab(iatom)%gylm_allocated==0)).or.& +& ((need_dijfr_1).and.(pawfgrtab(iatom)%gylmgr_allocated==0))) then + optgr0=0;optgr1=0;optgr2=0 + if ((need_dijfr_2.or. need_dijfr_4).and.(pawfgrtab(iatom)%gylm_allocated==0)) then + if (allocated(pawfgrtab(iatom)%gylm)) then + LIBPAW_DEALLOCATE(pawfgrtab(iatom)%gylm) + end if + LIBPAW_ALLOCATE(pawfgrtab(iatom)%gylm,(nfgd,lm_size)) + pawfgrtab(iatom)%gylm_allocated=2;optgr0=1 + end if + if ((need_dijfr_1.or.need_dijfr_4).and.(pawfgrtab(iatom)%gylmgr_allocated==0)) then + if (allocated(pawfgrtab(iatom)%gylmgr)) then + LIBPAW_DEALLOCATE(pawfgrtab(iatom)%gylmgr) + end if + LIBPAW_ALLOCATE(pawfgrtab(iatom)%gylmgr,(3,nfgd,lm_size)) + pawfgrtab(iatom)%gylmgr_allocated=2;optgr1=1 + end if + if (optgr0+optgr1+optgr2>0) then + call pawgylm(pawfgrtab(iatom)%gylm,pawfgrtab(iatom)%gylmgr,pawfgrtab(iatom)%gylmgr2,& +& lm_size,nfgd,optgr0,optgr1,optgr2,pawtab(itypat),pawfgrtab(iatom)%rfgd) + end if + end if + end if + +! Eventually compute exp(-i.q.r) factors for the current atom (if not already done) + has_qphase=(qne0.and.qphase==2) + if (need_dijfr_2) then + if (has_qphase.and.(pawfgrtab(iatom)%expiqr_allocated==0)) then + if (allocated(pawfgrtab(iatom)%expiqr)) then + LIBPAW_DEALLOCATE(pawfgrtab(iatom)%expiqr) + end if + LIBPAW_ALLOCATE(pawfgrtab(iatom)%expiqr,(2,nfgd)) + call pawexpiqr(pawfgrtab(iatom)%expiqr,gprimd,nfgd,qphon,& +& pawfgrtab(iatom)%rfgd,xred(:,iatom_tot)) + pawfgrtab(iatom)%expiqr_allocated=2 + end if + has_qphase=(pawfgrtab(iatom)%expiqr_allocated/=0) + end if + +! Loop over spin components + nsploop=nsppol;if (ndij==4) nsploop=4 + do idij=1,nsploop + if (idij<=nsppol.or.(nspden==4.and.idij<=3)) then + + idijend=idij+idij/3 + do ispden=idij,idijend + + LIBPAW_ALLOCATE(intv,(qphase*cplex_nspden,lm_size)) + intv(:,:) = zero + +! ============ Phonons ==================================== + if (ipert<=natom) then + + if (need_dijfr_1.or.need_dijfr_2) then + + LIBPAW_ALLOCATE(intv1,(cplex_nspden,lm_size)) + LIBPAW_ALLOCATE(intv2,(qphase,lm_size)) + intv1(:,:)=zero ; intv2(:,:)=zero + +! First part: Int_R^3{vtrial*Sum_LM[Q_ij_q^LM^(1)]} + if (need_dijfr_1) then + +! ----- Retrieve potential Vlocal (subtle if nspden=4 ;-) + LIBPAW_ALLOCATE(vloc,(cplex_nspden,nfgd)) + if (nspden/=4) then + if (usexcnhat==0) then + do ic=1,nfgd + jc=pawfgrtab(iatom)%ifftsph(ic) + vloc(1,ic)=vtrial(jc,ispden)-vxc(jc,ispden) + end do + else + do ic=1,nfgd + vloc(1,ic)=vtrial(pawfgrtab(iatom)%ifftsph(ic),ispden) + end do + end if + else ! nspden==4 + if (ispden<=2) then + if (usexcnhat==0) then + do ic=1,nfgd + jc=pawfgrtab(iatom)%ifftsph(ic) + vloc(1,ic)=vtrial(jc,ispden)-vxc(jc,ispden) + vloc(2,ic)=zero + end do + else + do ic=1,nfgd + jc=pawfgrtab(iatom)%ifftsph(ic) + vloc(1,ic)=vtrial(jc,ispden) + vloc(2,ic)=zero + end do + end if + else if (ispden==3) then + if (usexcnhat==0) then + vloc(:,:)=zero + else + do ic=1,nfgd + jc=pawfgrtab(iatom)%ifftsph(ic) + vloc(1,ic)=vtrial(jc,3) + vloc(2,ic)=vtrial(jc,4) + end do + end if + else ! ispden=4 + vloc(2,1:nfgd)=-vloc(2,1:nfgd) + end if + end if + +! ----- Compute Integral [ Vtrial(r).(g_l(r).Y_lm(r))^(1) dr ] + LIBPAW_ALLOCATE(intv_tmp,(cplex_nspden,3)) + do ilslm=1,lm_size + intv_tmp=zero + do ic=1,nfgd + do mu=1,3 +! Minus sign because dg(r-R)/dR = -dg(r-R)/dr + contrib(1:cplex_nspden)=-vloc(1:cplex_nspden,ic)*pawfgrtab(iatom)%gylmgr(mu,ic,ilslm) + intv_tmp(1:cplex_nspden,mu)=intv_tmp(1:cplex_nspden,mu)+contrib(1:cplex_nspden) + end do + end do +! Convert from cartesian to reduced coordinates + intv1(1:cplex_nspden,ilslm)=intv1(1:cplex_nspden,ilslm) & +& +(rprimd(1,idir)*intv_tmp(1:cplex_nspden,1) & +& +rprimd(2,idir)*intv_tmp(1:cplex_nspden,2) & +& +rprimd(3,idir)*intv_tmp(1:cplex_nspden,3)) + end do + LIBPAW_DEALLOCATE(vloc) + LIBPAW_DEALLOCATE(intv_tmp) + end if ! need_dijfr_1 + +! 2nd part: Int_R^3{Vloc^(1)*Sum_LM[Q_ij_q^LM]} + if (need_dijfr_2) then + + if (ispden==1) then + +! ----- Retrieve potential Vloc^(1) + LIBPAW_ALLOCATE(vloc,(qphase,nfgd)) + if (qphase==1) then + do ic=1,nfgd + jc=qphase*pawfgrtab(iatom)%ifftsph(ic) + vloc(1,ic)=vpsp1(jc) + end do + else + do ic=1,nfgd + jc=2*pawfgrtab(iatom)%ifftsph(ic)-1 + vloc(1,ic)=vpsp1(jc ) + vloc(2,ic)=vpsp1(jc+1) + end do + end if + +! ----- Compute Integral [ Vloc^(1)(r).g_l(r).Y_lm(r) ] + LIBPAW_ALLOCATE(intvloc,(qphase,lm_size)) + intvloc=zero + if (has_qphase) then + if (qphase==1) then + do ilslm=1,lm_size + do ic=1,nfgd + contrib(1)=vloc(1,ic)*pawfgrtab(iatom)%gylm(ic,ilslm) + intvloc(1,ilslm)=intvloc(1,ilslm)+contrib(1)*pawfgrtab(iatom)%expiqr(1,ic) + end do + end do + else + do ilslm=1,lm_size + do ic=1,nfgd + contrib(1:2)=vloc(1:2,ic)*pawfgrtab(iatom)%gylm(ic,ilslm) + intvloc(1,ilslm)=intvloc(1,ilslm)+contrib(1)*pawfgrtab(iatom)%expiqr(1,ic) & +& -contrib(2)*pawfgrtab(iatom)%expiqr(2,ic) + intvloc(2,ilslm)=intvloc(2,ilslm)+contrib(1)*pawfgrtab(iatom)%expiqr(2,ic) & +& +contrib(2)*pawfgrtab(iatom)%expiqr(1,ic) + end do + end do + end if + else ! no phase + do ilslm=1,lm_size + do ic=1,nfgd + contrib(1:qphase)=vloc(1:qphase,ic)*pawfgrtab(iatom)%gylm(ic,ilslm) + intvloc(1:qphase,ilslm)=intvloc(1:qphase,ilslm)+contrib(1:qphase) + end do + end do + end if + LIBPAW_DEALLOCATE(vloc) + end if ! ispden=1 + + !Add to previous contribution + if (ispden<=min(nspden,2)) then + intv2(1:qphase,1:lm_size)=intv2(1:qphase,1:lm_size)+intvloc(1:qphase,1:lm_size) + if (ispden==min(nspden,2)) then + LIBPAW_DEALLOCATE(intvloc) + end if + end if + end if ! need_dijfr_2 + +! Sum contributions and apply ucvol/nfft factor on integral + intv(1:cplex_nspden,1:lm_size)=intv1(1:cplex_nspden,1:lm_size) + intv(1,1:lm_size)=intv(1,1:lm_size)+intv2(1,1:lm_size) + if (qphase==2) intv(cplex_nspden+1,1:lm_size)=intv(cplex_nspden+1,1:lm_size)+intv2(2,1:lm_size) + intv(:,:)=fact*intv(:,:) + LIBPAW_DEALLOCATE(intv1) + LIBPAW_DEALLOCATE(intv2) + +! --- Reduction in case of parallelization --- + call xmpi_sum(intv,my_comm_grid,ier) + + paw_ij1(iatom)%dijfr(:,ispden)=zero + +! ---- Loop over (i,j) components + klmn1=1;klmn2=1+lmn2_size*cplex_dij ; cplex_p1=cplex_nspden+1 + do klmn=1,lmn2_size + klm =pawtab(itypat)%indklmn(1,klmn) + lmin=pawtab(itypat)%indklmn(3,klmn) + lmax=pawtab(itypat)%indklmn(4,klmn) + do ils=lmin,lmax,2 + lm0=ils**2+ils+1 + do mm=-ils,ils + ilslm=lm0+mm;isel=pawang%gntselect(ilslm,klm) + if (isel>0) then + !The following works only because cplex_nspden<=cplex_dij + paw_ij1(iatom)%dijfr(klmn1,ispden)=paw_ij1(iatom)%dijfr(klmn1,ispden) & + & +pawtab(itypat)%qijl(ilslm,klmn)*intv(1,ilslm) + if (cplex_nspden==2) then + paw_ij1(iatom)%dijfr(klmn1+1,ispden)=paw_ij1(iatom)%dijfr(klmn1+1,ispden) & + & +pawtab(itypat)%qijl(ilslm,klmn)*intv(2,ilslm) + end if + if (qphase==2) then + paw_ij1(iatom)%dijfr(klmn2,ispden)=paw_ij1(iatom)%dijfr(klmn2,ispden) & + & +pawtab(itypat)%qijl(ilslm,klmn)*intv(cplex_p1,ilslm) + if (cplex_nspden==2) then + paw_ij1(iatom)%dijfr(klmn2+1,ispden)=paw_ij1(iatom)%dijfr(klmn2+1,ispden) & + & +pawtab(itypat)%qijl(ilslm,klmn)*intv(4,ilslm) + end if + end if +!Previous version +! dplex_nsp=cplex_nspden-1 +! paw_ij1(iatom)%dijfr(klmn1:klmn1+dplex_nsp,ispden)= & +! & paw_ij1(iatom)%dijfr(klmn1:klmn1+dplex_nsp,ispden) & +! & +pawtab(itypat)%qijl(ilslm,klmn)*intv(1:cplex_nspden,ilslm) +! if (qphase==2) then +! paw_ij1(iatom)%dijfr(klmn2:klmn2+dplex_nsp,ispden)= & +! & paw_ij1(iatom)%dijfr(klmn2:klmn2+dplex_nsp,ispden) & +! & +pawtab(itypat)%qijl(ilslm,klmn)*intv(1+cplex_nspden:2*cplex_nspden,ilslm) +! end if + end if + end do + end do + klmn1=klmn1+cplex_dij;klmn2=klmn2+cplex_dij + end do + +! Dijfr is marked as computed + paw_ij1(iatom)%has_dijfr=2 + + end if + +! ============ Electric field perturbation ======================= + else if (ipert==natom+2.or.ipert==natom+11) then + + if (need_dijfr_3) then + +! The following factor arises in expanding the angular dependence of the dipole +! vector in terms of real spherical harmonics. The real spherical harmonics are as +! in the routine initylmr.F90; +! see http://www.unioviedo.es/qcg/art/Theochem419-19-ov-BF97-rotation-matrices.pdf + c1 = sqrt(four_pi/three) + mesh_size=pawtab(itypat)%mesh_size + + if (ispden==1) then + + LIBPAW_ALLOCATE(ff,(mesh_size)) + LIBPAW_ALLOCATE(rg,(3)) + +! loop over basis state pairs for this atom + klmn1=1 + do klmn = 1, paw_ij1(iatom)%lmn2_size + klm =pawtab(itypat)%indklmn(1,klmn) + kln =pawtab(itypat)%indklmn(2,klmn) + lmin=pawtab(itypat)%indklmn(3,klmn) + lmax=pawtab(itypat)%indklmn(4,klmn) + +! Select only l=1, because the dipole is a vector operator + if (lmin==1) then + lm0=3 ! (l^2+l+1) for l=1 + +! Computation of - +! the dipole vector has radial dependence r + ff(1:mesh_size)=(pawtab(itypat)%phiphj(1:mesh_size,kln)& +& -pawtab(itypat)%tphitphj(1:mesh_size,kln))& +& *pawrad(itypat)%rad(1:mesh_size) +! call pawrad_deducer0(ff,mesh_size,pawrad(itypat)) + call simp_gen(intg,ff,pawrad(itypat)) + +! Compute : use a real Gaunt expression (with selection rule) + rg(1:3)=zero + do ic=1,3 + isel=pawang%gntselect(lm0+m_index(ic),klm) + if (isel>0) rg(ic)=pawang%realgnt(isel) + end do + +! Translate from cartesian to reduced coordinates (in idir direction) + rg1=gprimd(1,idir)*rg(1)+gprimd(2,idir)*rg(2)+gprimd(3,idir)*rg(3) + +! Build sqrt(4pi/3)..(- + paw_ij1(iatom)%dijfr(klmn1,ispden)=c1*rg1*intg + if (cplex_dij==2) paw_ij1(iatom)%dijfr(klmn1+1,ispden)=zero + + else + paw_ij1(iatom)%dijfr(klmn1,ispden)=zero + end if ! end gaunt constraint + + klmn1=klmn1+cplex_dij + end do ! end loop over lmn2_size pairs of basis states + LIBPAW_DEALLOCATE(ff) + LIBPAW_DEALLOCATE(rg) + +! Dijfr is spin-independent for electric field case + else if (ispden==2) then + paw_ij1(iatom)%dijfr(:,ispden)=paw_ij1(iatom)%dijfr(:,1) + else + paw_ij1(iatom)%dijfr(:,ispden)=zero + end if + +! Dijfr is marked as computed + paw_ij1(iatom)%has_dijfr=2 + end if + +! ============ Elastic tensor =============================== + else if (ipert==natom+3.or.ipert==natom+4) then + +! ----- Retrieve potential Vlocal (subtle if nspden=4 ;-) + LIBPAW_ALLOCATE(vloc,(cplex_nspden,nfgd)) + if (nspden/=4) then + if (usexcnhat==0) then + do ic=1,nfgd + jc=pawfgrtab(iatom)%ifftsph(ic) + vloc(1,ic)=vtrial(jc,ispden)-vxc(jc,ispden) + end do + else + do ic=1,nfgd + vloc(1,ic)=vtrial(pawfgrtab(iatom)%ifftsph(ic),ispden) + end do + end if + else ! nspden/=4 + if (ispden<=2) then + if (usexcnhat==0) then + do ic=1,nfgd + jc=pawfgrtab(iatom)%ifftsph(ic) + vloc(1,ic)=vtrial(jc,ispden)-vxc(jc,ispden) + vloc(2,ic)=zero + end do + else + do ic=1,nfgd + jc=pawfgrtab(iatom)%ifftsph(ic) + vloc(1,ic)=vtrial(jc,ispden) + vloc(2,ic)=zero + end do + end if + else if (ispden==3) then + if (usexcnhat==0) then + vloc(:,:)=zero + else + do ic=1,nfgd + jc=pawfgrtab(iatom)%ifftsph(ic) + vloc(1,ic)=vtrial(jc,3) + vloc(2,ic)=vtrial(jc,4) + end do + end if + else ! ispden=4 + vloc(2,1:nfgd)=-vloc(2,1:nfgd) + end if + end if + +! option = 0 Insulator case + if(option==0)then + do ilslm=1,lm_size + do ic=1,nfgd + jc=pawfgrtab(iatom)%ifftsph(ic) + contrib(1:cplex_nspden) = zero + +! Int_R^3{vtrial*Sum_LM[Q_ij_q^LM^(1)]} + mua=alpha(istr);mub=beta(istr) + contrib(1:cplex_nspden)=contrib(1:cplex_nspden)+half*vloc(1:cplex_nspden,ic)& +& *(pawfgrtab(iatom)%gylmgr(mua,ic,ilslm)*pawfgrtab(iatom)%rfgd(mub,ic)& +& + pawfgrtab(iatom)%gylmgr(mub,ic,ilslm)*pawfgrtab(iatom)%rfgd(mua,ic)) + +! Int_R^3{Vloc^(1)*Sum_LM[Q_ij_q^LM]} + contrib(1)=contrib(1)+vpsp1(jc)*pawfgrtab(iatom)%gylm(ic,ilslm) + +! delta_{alphabeta}Int_R^3{Vloc*Sum_LM[Q_ij_q^LM]} + if(istr<=3)then + contrib(1:cplex_nspden)=contrib(1:cplex_nspden) & +& +vloc(1:cplex_nspden,ic)*pawfgrtab(iatom)%gylm(ic,ilslm) + end if + + intv(1:cplex_nspden,ilslm)=intv(1:cplex_nspden,ilslm)+contrib(1:cplex_nspden) + end do + end do + +! option = 1 Metal case (without Vpsp1) + else if (option==1)then + do ilslm=1,lm_size + do ic=1,nfgd + jc=pawfgrtab(iatom)%ifftsph(ic) + contrib(1) = zero + +! Int_R^3{vtrial*Sum_LM[Q_ij_q^LM^(1)]} + mua=alpha(istr);mub=beta(istr) + contrib(1:cplex_nspden)=contrib(1:cplex_nspden)+half*vloc(1:cplex_nspden,ic)& +& *(pawfgrtab(iatom)%gylmgr(mua,ic,ilslm)*pawfgrtab(iatom)%rfgd(mub,ic)& +& + pawfgrtab(iatom)%gylmgr(mub,ic,ilslm)*pawfgrtab(iatom)%rfgd(mua,ic)) + +! delta_{alphabeta}Int_R^3{Vtrial*Sum_LM[Q_ij_q^LM]} + if(istr<=3)then + contrib(1:cplex_nspden)=contrib(1:cplex_nspden) & +& +vloc(1:cplex_nspden,ic)*pawfgrtab(iatom)%gylm(ic,ilslm) + end if + + intv(1:cplex_nspden,ilslm)=intv(1:cplex_nspden,ilslm)+contrib(1:cplex_nspden) + end do + end do + end if + LIBPAW_DEALLOCATE(vloc) + +! Apply ucvol/nfft factor on integral + intv(:,:)=fact*intv(:,:) + +! --- Reduction in case of parallelization --- + call xmpi_sum(intv,my_comm_grid,ier) + + paw_ij1(iatom)%dijfr(:,ispden)=zero + +! ---- Loop over (i,j) components + klmn1=1 + do klmn=1,lmn2_size + klm =pawtab(itypat)%indklmn(1,klmn) + lmin=pawtab(itypat)%indklmn(3,klmn) + lmax=pawtab(itypat)%indklmn(4,klmn) + do ils=lmin,lmax,2 + lm0=ils**2+ils+1 + do mm=-ils,ils + ilslm=lm0+mm;isel=pawang%gntselect(ilslm,klm) + if (isel>0) then + !The following works only because cplex_nspden<=cplex_dij + paw_ij1(iatom)%dijfr(klmn1,ispden)=paw_ij1(iatom)%dijfr(klmn1,ispden) & +& +pawtab(itypat)%qijl(ilslm,klmn)*intv(1,ilslm) + if (cplex_nspden==2) then + paw_ij1(iatom)%dijfr(klmn1+1,ispden)=paw_ij1(iatom)%dijfr(klmn1+1,ispden) & +& +pawtab(itypat)%qijl(ilslm,klmn)*intv(2,ilslm) + end if +!Previous version +! dplex_nsp=cplex_nspden-1 +! paw_ij1(iatom)%dijfr(klmn1:klmn1+dplex_nsp,ispden)= & +!& paw_ij1(iatom)%dijfr(klmn1:klmn1+dplex_nsp,ispden) & +!& +pawtab(itypat)%qijl(ilslm,klmn)*intv(1:cplex_nspden,ilslm) + end if + end do + end do + klmn1=klmn1+cplex_dij + end do + +! Dijfr is marked as computed + paw_ij1(iatom)%has_dijfr=2 + + end if ! ipert + + LIBPAW_DEALLOCATE(intv) + +!---------------------------------------------------------- +! End loops over spin components + end do ! ispden + +! ---------------------------------------------------------- +! Deduce some part of Dij according to symmetries +! ---------------------------------------------------------- + + !Non-collinear: D_ij(:,4)=D^21_ij=D^12_ij^* + else if (nspden==4.and.idij==4) then + paw_ij1(iatom)%dijfr(:,idij)=paw_ij1(iatom)%dijfr(:,idij-1) + if (cplex_dij==2) then + do klmn=2,lmn2_size*cplex_dij,cplex_dij + paw_ij1(iatom)%dijfr(klmn,idij)=-paw_ij1(iatom)%dijfr(klmn,idij) + end do + if (qphase==2) then + do klmn=2+lmn2_size*cplex_dij,2*lmn2_size*cplex_dij,cplex_dij + paw_ij1(iatom)%dijfr(klmn,idij)=-paw_ij1(iatom)%dijfr(klmn,idij) + end do + end if + end if + + !Antiferro: D_ij(:,2)=D^down_ij=D^up_ij + else if (nsppol==1.and.idij==2) then + paw_ij1(iatom)%dijfr(:,idij)=paw_ij1(iatom)%dijfr(:,idij-1) + end if + +! End loop on Dij components + end do ! idij + +!---------------------------------------------------------- + +! Eventually free temporary space for g_l(r).Y_lm(r) gradients and exp(-i.q.r) + if (need_dijfr_1.or.need_dijfr_2) then + if (pawfgrtab(iatom)%gylm_allocated==2) then + LIBPAW_DEALLOCATE(pawfgrtab(iatom)%gylm) + LIBPAW_ALLOCATE(pawfgrtab(iatom)%gylm,(0,0)) + pawfgrtab(iatom)%gylm_allocated=0 + end if + if (pawfgrtab(iatom)%gylmgr_allocated==2) then + LIBPAW_DEALLOCATE(pawfgrtab(iatom)%gylmgr) + LIBPAW_ALLOCATE(pawfgrtab(iatom)%gylmgr,(0,0,0)) + pawfgrtab(iatom)%gylmgr_allocated=0 + end if + if (pawfgrtab(iatom)%expiqr_allocated==2) then + LIBPAW_DEALLOCATE(pawfgrtab(iatom)%expiqr) + LIBPAW_ALLOCATE(pawfgrtab(iatom)%expiqr,(0,0)) + pawfgrtab(iatom)%expiqr_allocated=0 + end if + end if + +! End loop on atoms + end do + +!Destroy atom table used for parallelism + call free_my_atmtab(my_atmtab,my_atmtab_allocated) + +end subroutine pawdijfr +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawdij/pawpupot +!! NAME +!! pawpupot +!! +!! FUNCTION +!! Compute the PAW DFT+U on-site potential +!! +!! INPUTS +!! cplex_dij=2 if DFT+U pot. is COMPLEX (as in the spin-orbit case), 1 if dij is REAL +!! ndij=number of spin components for Dij +!! pawprtvol=control print volume and debugging output for PAW +!! noccmmp(cplex_dij,2*lpawu+1,2*lpawu+1,ndij)=density matrix in the augm. region +!! nocctot(ndij)=number of electrons in the correlated subspace +!! pawtab(ntypat) =paw tabulated starting data: +!! %usepawu, %upawu, %jpau +!! %vee(2*lpawu+1*4)=screened coulomb matrix +!! +!! OUTPUT +!! vpawu(cplex_dij,lpawu*2+1,lpawu*2+1,ndij)=lda+u potential +!! (see eg PRB 52, 5467 (1995) [[cite:Liechenstein1995]]) +!! When vpawu is complex (cplex_dij=2): +!! vpawu(2*i-1,:) contains the real part +!! vpawu(2*i,:) contains the imaginary part +!! +!! SOURCE + + subroutine pawpupot(cplex_dij,ndij,noccmmp,nocctot,& +& pawprtvol,pawtab,vpawu) + +!Arguments --------------------------------------------- +!scalars + integer,intent(in) :: cplex_dij,ndij,pawprtvol + type(pawtab_type),intent(in) :: pawtab +!arrays + real(dp),intent(in) :: noccmmp(:,:,:,:),nocctot(:) + real(dp),intent(out) :: vpawu(:,:,:,:) + +!Local variables --------------------------------------- +!scalars +!Option for interaction energy in case of non-collinear magnetism: +! 1: E_int=-J/4.N.(N-2) (better) +! 2: E_int=-J/2.(Nup.(Nup-1)+Ndn.(Ndn-1)) (Nup and Ndn are ill-defined) +! integer,parameter :: option_interaction=3 + + integer :: iplex,ispden,jspden,lpawu,m1,m11,m2,m21,m3,m31,m4,m41,nspden_eff + real(dp) :: mnorm,mx,my,mz,n_sig,n_msig,n_tot,VUKStemp,n_sigs,n_msigs + real(dp),save :: VUKS + character(len=500) :: msg +!arrays + real(dp),parameter :: factcg(3:4)=(/one,-one/) + real(dp) :: n34_msig(cplex_dij),n34_sig(cplex_dij) +!real(dp) :: n43_sig(cplex_dij) + +! ***************************************************** + +!Useful data + lpawu=pawtab%lpawu + +!Check data consistency + if(pawtab%usepawu<0) then + msg = "usepawu<0 not allowed!" + LIBPAW_BUG(msg) + end if + if(ndij==4.and.pawtab%option_interaction_pawu==3.and.pawtab%usepawu>=10) then + msg = "Option_interaction==3 is not compatible with usepawu>=10 in pawpupot" + LIBPAW_ERROR(msg) + end if + if (size(vpawu,1)/=cplex_dij.or.size(vpawu,2)/=2*lpawu+1.or.& +& size(vpawu,3)/=2*lpawu+1.or.size(vpawu,4)/=ndij) then + write (msg,'(a,4I5, a,4I5)') ' invalid sizes for vpawu !',cplex_dij,2*lpawu+1,2*lpawu+1,ndij, & +& ' /= ', size(vpawu,1), size(vpawu,2), size(vpawu,3), size(vpawu,4) + LIBPAW_BUG(msg) + end if + if (size(noccmmp,1)/=cplex_dij.or.size(noccmmp,2)/=2*lpawu+1.or.& +& size(noccmmp,3)/=2*lpawu+1.or.size(noccmmp,4)/=ndij) then + write (msg,'(a,4I5, a,4I5)') ' invalid sizes for noccmmp !',cplex_dij,2*lpawu+1,2*lpawu+1,ndij, & +& ' /= ', size(noccmmp,1), size(noccmmp,2), size(noccmmp,3), size(noccmmp,4) + LIBPAW_BUG(msg) + end if + if (size(nocctot,1)/=ndij) then + msg='invalid size for nocctot !' + LIBPAW_BUG(msg) + end if + +!===================================================== +!Compute DFT+U Potential on the basis of projectors +!cf PRB 52 5467 (1995) [[cite:Liechenstein1995]] +!----------------------------------------------------- + + vpawu=zero ; nspden_eff=ndij + do ispden=1,nspden_eff + + if (ispden<=2) then ! cases ndij=4, ispden=1,2 or ndij<4 + jspden=min(nspden_eff,2)-ispden+1 ! (ispden,ndij)=(1,4)=>jspden=2 + + if (nspden_eff<=2) then + n_sig =nocctot(ispden) + n_msig=nocctot(jspden) + n_tot =n_sig+n_msig + else + n_tot=nocctot(1) + mx=nocctot(2) + my=nocctot(3) + mz=nocctot(4) + mnorm=sqrt(mx*mx+my*my+mz*mz) + if (ispden==1) then +! n_sig =half*(n_tot+mnorm) +! n_msig=half*(n_tot-mnorm) + n_sig =half*(n_tot+sign(mnorm,mz)) + n_msig=half*(n_tot-sign(mnorm,mz)) + else +! n_sig =half*(n_tot-mnorm) +! n_msig=half*(n_tot+mnorm) + n_sig =half*(n_tot-sign(mnorm,mz)) + n_msig=half*(n_tot+sign(mnorm,mz)) + end if + end if + + n_sigs =n_sig/(float(2*lpawu+1)) + n_msigs =n_msig/(float(2*lpawu+1)) + do m1=-lpawu,lpawu + m11=m1+lpawu+1 + do m2=-lpawu,lpawu + m21=m2+lpawu+1 + do m3=-lpawu,lpawu + m31=m3+lpawu+1 + do m4=-lpawu,lpawu + m41=m4+lpawu+1 + n34_sig(:) =noccmmp(:,m31,m41,ispden) ! spin sigma + n34_msig(:)=noccmmp(:,m31,m41,jspden) ! opposite spin (-sigma) + if(m31==m41.and.pawtab%usepawu==3) then + n34_sig(1)= n34_sig(1) - n_sigs + n34_msig(1)= n34_msig(1) - n_msigs + end if + do iplex=1,cplex_dij + vpawu(iplex,m11,m21,ispden)=vpawu(iplex,m11,m21,ispden) & +& +n34_msig(iplex)*pawtab%vee(m11,m31,m21,m41) & +& +n34_sig(iplex)*(pawtab%vee(m11,m31,m21,m41)-pawtab%vee(m11,m31,m41,m21)) + end do +! if(abs(pawprtvol)>=3.and.m11==1.and.m21==1) then +! write(msg,'(a,i4,i4,2e20.10)') "m31,m41,vu=",m31,m41,& +! & vpawu(:,m11,m21,ispden) +! call wrtout(std_out,msg,'COLL') +! write(msg,'(a,4e20.10)') "vee",pawtab%vee(m11,m31,m21,m41),& +! & pawtab%vee(m11,m31,m41,m21) +! call wrtout(std_out,msg,'COLL') +! write(msg,'(a,4e20.10)') "n34_msig,n34_sig",n34_msig(1),n34_sig(1) +! call wrtout(std_out,msg,'COLL') +! end if + end do + end do +! if(abs(pawprtvol)>=3) then +! if(m11/=m21) then +! write(msg,'(a,i4,i4,2e20.10)') "vu=",m11,m21,vpawu(:,m11,m21,ispden) +! call wrtout(std_out,msg,'COLL') +! write(msg,'(a,2e20.10)') "vupred=",-pawtab%upawu*noccmmp(:,m21,m11,ispden) +! call wrtout(std_out,msg,'COLL') +! end if +! end if + end do ! m2 + if(abs(pawprtvol)>=3) then + write(msg,'(a,i3,14f11.5)') & +& "vpawu ",m11, (vpawu(:,m11,m21,ispden),m21=1,2*lpawu+1) + call wrtout(std_out, msg,'COLL') + write(msg,'(a,i3,14f11.5)') & +& "noccmmp ",m11, (noccmmp(:,m11,m21,ispden),m21=1,2*lpawu+1) + call wrtout(std_out, msg,'COLL') + end if + +! Full localized limit + if(pawtab%usepawu==1.or.pawtab%usepawu==4) then ! not activated if usepawu=10 !! +! Here we compute vpawu=vpawu-v_dc + vpawu(1,m11,m11,ispden)=vpawu(1,m11,m11,ispden)-pawtab%upawu*(n_tot-half) + if (ndij/=4.or.pawtab%option_interaction_pawu==2) then + if(pawtab%usepawu/=4) then + vpawu(1,m11,m11,ispden)=vpawu(1,m11,m11,ispden)+pawtab%jpawu*(n_sig-half) + else + vpawu(1,m11,m11,ispden)=vpawu(1,m11,m11,ispden)+half*pawtab%jpawu*(n_tot-one) + endif + else if (ndij==4.and.(pawtab%usepawu==4.or.pawtab%option_interaction_pawu==1)) then + vpawu(1,m11,m11,ispden)=vpawu(1,m11,m11,ispden)+half*pawtab%jpawu*(n_tot-one) + else if (ndij==4.and.pawtab%option_interaction_pawu==3) then +! Here vdc^{alpha,beta}=\vect{m}.\vect{sigma}^{\beta,\alpha} + vpawu(1,m11,m11,ispden)=vpawu(1,m11,m11,ispden)+half*pawtab%jpawu*(n_tot-one) + if (ispden==1) then + vpawu(1,m11,m11,ispden)=vpawu(1,m11,m11,ispden)+half*pawtab%jpawu*mz + else + vpawu(1,m11,m11,ispden)=vpawu(1,m11,m11,ispden)-half*pawtab%jpawu*mz + end if + end if + +! Around mean field + else if(pawtab%usepawu==2) then + vpawu(1,m11,m11,ispden)=vpawu(1,m11,m11,ispden)-n_msig*pawtab%upawu & +& -n_sig*(pawtab%upawu-pawtab%jpawu) & +& *(dble(2*lpawu)/dble(2*lpawu+1)) + end if + +! if (abs(pawprtvol)>=3) then +! write(msg,'(a,i4,i4,2x,e20.10)') "vudiag= ",m11,m11,vpawu(1,m11,m11,ispden) +! call wrtout(std_out, msg,'COLL') +! write(msg,'(a,2e20.10)') "vudiagpred= ",pawtab%upawu*(half-noccmmp(:,m11,m11,ispden)) +! call wrtout(std_out, msg,'COLL') +! end if + if(abs(pawprtvol)>=3) then + write(msg,*) "nocctot",nocctot + call wrtout(std_out, msg,'COLL') + write(msg,'(a,i3,14f11.5)') & +& "vpawu 2",m11, (vpawu(:,m11,m21,ispden),m21=1,2*lpawu+1) + call wrtout(std_out, msg,'COLL') + write(msg,'(a,i3,14f11.5)') & +& "noccmmp2",m11, (noccmmp(:,m11,m21,ispden),m21=1,2*lpawu+1) + call wrtout(std_out, msg,'COLL') + end if + end do ! m1 + + end if ! ispden<=2 + +! Non-collinear magnetism: add non-diagonal term; see (Eq 6) in PRB 72, 024458 (2005) [[cite:Shurikov2005]] +! BA Here, we compute the transpose --- with respect to spin indices --- of +! BA equation (6) of this reference, because of differences in notations, +! BA namely Eband=\sum rhoij^{alpha,beta}*Dij(beta,alpha) contrary to PRB 72, 024458 (2005) [[cite:Shurikov2005]] + if (ispden>=3) then + mx=nocctot(2) + my=nocctot(3) + do m1=-lpawu,lpawu + m11=m1+lpawu+1 + do m2=-lpawu,lpawu + m21=m2+lpawu+1 + do m3=-lpawu,lpawu + m31=m3+lpawu+1 + do m4=-lpawu,lpawu + m41=m4+lpawu+1 +! n43_sig(:) =noccmmp(:,m41,m31,ispden) +! vpawu(1,m11,m21,ispden)=vpawu(1,m11,m21,ispden)-n43_sig(1)*pawtab%vee(m11,m31,m41,m21) +! vpawu(2,m11,m21,ispden)=vpawu(2,m11,m21,ispden)+n43_sig(2)*pawtab%vee(m11,m31,m41,m21) + n34_sig(:) =noccmmp(:,m31,m41,ispden) + vpawu(1,m11,m21,ispden)=vpawu(1,m11,m21,ispden)-n34_sig(1)*pawtab%vee(m11,m31,m41,m21) + vpawu(2,m11,m21,ispden)=vpawu(2,m11,m21,ispden)-n34_sig(2)*pawtab%vee(m11,m31,m41,m21) + end do + end do + end do + if(pawtab%usepawu==1.and.pawtab%option_interaction_pawu==3) then ! not activated if usepawu=10 !! + vpawu(1,m11,m11,ispden)=vpawu(1,m11,m11,ispden)+half*pawtab%jpawu*mx + if(ispden==3) then + vpawu(2,m11,m11,ispden)=vpawu(2,m11,m11,ispden)-half*pawtab%jpawu*my + else + vpawu(2,m11,m11,ispden)=vpawu(2,m11,m11,ispden)+half*pawtab%jpawu*my + end if + end if + end do + end if + + if(abs(pawprtvol)>=3) then + write(std_out,*) "vpawu, ispden",ispden + do m11=1,2*lpawu+1 + write(msg,'(12(1x,9(1x,"(",f10.7,",",f10.7,")")))') & +& (vpawu(1:cplex_dij,m11,m21,ispden),m21=1,2*lpawu+1) + call wrtout(std_out,msg,'COLL') + end do + end if + +! Printing for test + if (abs(pawprtvol)>=3) then + if (ispden==1) VUKS=zero + VUKStemp=zero + do m1=-lpawu,lpawu + m11=m1+lpawu+1 + do m2=-lpawu,lpawu + m21=m2+lpawu+1 + VUKStemp=VUKStemp+vpawu(1,m11,m21,ispden)*noccmmp(1,m11,m21,ispden) + if (cplex_dij == 2) then + VUKStemp=VUKStemp-vpawu(2,m11,m21,ispden)*noccmmp(2,m11,m21,ispden) + end if + write(msg,'(a,2e20.10,2e20.10)') "m1,m2,vpawu,noccmmp= ", & +& vpawu(:,m11,m21,ispden),noccmmp(:,m11,m21,ispden) + call wrtout(std_out, msg,'COLL') + end do + end do + VUKS=VUKS+VUKStemp + write(msg,*) "pawpupot: VUKStemp= ",ispden,VUKStemp + call wrtout(std_out, msg,'COLL') + if (ispden==nspden_eff) then + write(msg,*) "pawpupot: VUKS= ",ispden,VUKS + call wrtout(std_out, msg,'COLL') + end if + end if + + end do ! Loop on ispden + + end subroutine pawpupot +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawdij/pawxpot +!! NAME +!! pawxpot +!! +!! FUNCTION +!! Compute the PAW Local Exact-Exchange on-site potential +!! +!! INPUTS +!! ndij=number of spin components for Dij +!! pawprtvol=control print volume and debugging output for PAW +!! paw_ij =paw arrays given on (i,j) channels +!! pawtab =paw tabulated starting data: +!! pawrhoij = paw rhoij occupancies and related data +!! +!! OUTPUT +!! paw_ij%vpawx(pawtab%lexexch*2+1,pawtab%lexexch*2+1)=local exact-exchange potential +!! +!! SOURCE + + subroutine pawxpot(ndij,pawprtvol,pawrhoij,pawtab,vpawx) + +!Arguments --------------------------------------------- +!scalars + integer,intent(in) :: ndij,pawprtvol + type(pawrhoij_type),intent(in) :: pawrhoij + type(pawtab_type),intent(in) :: pawtab + real(dp),intent(out) :: vpawx(:,:,:) + +!Local variables --------------------------------------- +!scalars + integer :: cplex_rhoij,irhoij,irhoij1,ispden,jrhoij,jrhoij1,klmn,klmn1,lexexch,ll,lmn2_size + integer :: m11,m21,m31,m41,n1,n2,n3,n4,nk,nn1,nn2,nspden_eff + real(dp) :: tot + character(len=500) :: msg +!arrays + integer :: indn(3,3) + real(dp) :: factnk(6) + +! ***************************************************** + +!Useful data + lexexch=pawtab%lexexch + cplex_rhoij=pawrhoij%cplex_rhoij + lmn2_size=pawtab%lmn2_size + if (pawtab%nproju==1) nk=1 + if (pawtab%nproju==2) nk=6 + factnk(1)=one;factnk(2)=one;factnk(3)=one + factnk(4)=two;factnk(5)=two;factnk(6)=two + indn(1,1)=1;indn(1,2)=4;indn(1,3)=5 + indn(2,1)=4;indn(2,2)=2;indn(2,3)=6 + indn(3,1)=5;indn(3,2)=6;indn(3,3)=3 + +!Check data consistency + if (size(vpawx,1)/=1.or.size(vpawx,2)/=lmn2_size.or.& +& size(vpawx,3)/=ndij) then + msg='invalid sizes for vpawx !' + LIBPAW_BUG(msg) + end if + if (pawrhoij%qphase==2) then + msg='pawxpot not compatible with qphase=2 (DFPT)!' + LIBPAW_BUG(msg) + end if + +!===================================================== +!Compute local exact exchange Potential +!on the basis of projectors. +!----------------------------------------------------- + + vpawx=zero ; nspden_eff=ndij + do ispden=1,nspden_eff + jrhoij=1 + do irhoij=1,pawrhoij%nrhoijsel + klmn=pawrhoij%rhoijselect(irhoij) + if(pawtab%indklmn(3,klmn)==0.and.pawtab%indklmn(4,klmn)==2*lexexch) then + m11=pawtab%klmntomn(1,klmn);m21=pawtab%klmntomn(2,klmn) + n1=pawtab%klmntomn(3,klmn);n2=pawtab%klmntomn(4,klmn) + nn1=(n1*n2)/2+1 + jrhoij1=1 + do irhoij1=1,pawrhoij%nrhoijsel + klmn1=pawrhoij%rhoijselect(irhoij1) + if(pawtab%indklmn(3,klmn1)==0.and.pawtab%indklmn(4,klmn1)==2*lexexch) then + m31=pawtab%klmntomn(1,klmn1);m41=pawtab%klmntomn(2,klmn1) + n3=pawtab%klmntomn(3,klmn1);n4=pawtab%klmntomn(4,klmn1) + nn2=(n3*n4)/2+1 + do ll=1,lexexch+1 + vpawx(1,klmn,ispden)=vpawx(1,klmn,ispden)& +& -pawtab%vex(m11,m31,m41,m21,ll)*pawtab%dltij(klmn1) & +& *pawtab%fk(indn(nn1,nn2),ll)*pawrhoij%rhoijp(jrhoij1,ispden) + end do + + end if + jrhoij1=jrhoij1+cplex_rhoij + end do !irhoij1 + end if + jrhoij=jrhoij+cplex_rhoij + end do !irhoij + end do !ispden + +!Test + if (abs(pawprtvol)>=2) then + tot=zero + do ispden=1,pawrhoij%nspden + jrhoij=1 + do irhoij=1,pawrhoij%nrhoijsel + klmn=pawrhoij%rhoijselect(irhoij) + tot=tot+vpawx(1,klmn,ispden)*pawrhoij%rhoijp(jrhoij,ispden)*pawtab%dltij(klmn) + jrhoij=jrhoij+cplex_rhoij + end do + end do + write(msg, '(a,es22.15)' )" Vpawx: tot=",tot*half + call wrtout(std_out,msg,'COLL') + end if + + end subroutine pawxpot +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawdij/symdij +!! NAME +!! symdij +!! +!! FUNCTION +!! Symmetrize PAW non-local strengths Dij +!! Symmetrize total Dij or one part of it +!! +!! INPUTS +!! gprimd(3,3)=dimensional primitive translations for reciprocal space(bohr^-1). +!! indsym(4,nsym,natom)=indirect indexing array for atom labels +!! ipert=index of perturbation if pawrhoij is a pertubed rhoij +!! no meaning for ground-state calculations (should be 0) +!! [mpi_atmtab(:)]=--optional-- indexes of the atoms treated by current proc +!! [comm_atom]=--optional-- MPI communicator over atoms +!! my_natom=number of atoms treated by current processor +!! natom=number of atoms in cell +!! nsym=number of symmetry elements in space group +!! ntypat=number of types of atoms in unit cell. +!! option_dij=choose which part of Dij has to be symmetrized (which paw_ij(:)%dijxxx): +!! 0: total dij (dij) +!! 1: dij due to compensation charge (dijhat) +!! 2: dij due to +U (dijU) +!! 3: dij XC (dijxc) +!! 4: dij XC due to compensation charge (dijxc_hat) +!! 5: dij XC valence only (dijxc_val) +!! 6: dij spin-orbit (dijso) +!! 7: dij exact exchange (dijexxc) +!! 8: dij, RF frozen part (dijfr) +!! 9: dij due to nuclear dipoles +!! 10: dij Hartree +!! 11: dij Fock +!! paw_ij(natom)%cplex_dij=1 if dij are REAL, 2 if they are COMPLEX +!! paw_ij(natom)%qphase=2 if exp^(-i.q.r) phase from RF at q<>0, 1 otherwise +!! paw_ij(natom)%lmn_size=number of (l,m,n) elements for the paw basis +!! paw_ij(natom)%nspden=number of spin-density components +!! paw_ij(natom)%nsppol=number of independant spin-density components +!! paw_ij(natom)%dij(lmn2_size,nspden)=non-symmetrized paw dij quantities +!! pawang =angular mesh discretization and related data +!! pawprtvol=control print volume and debugging output for PAW +!! pawtab(ntypat) =paw tabulated starting data +!! [qphon(3)]=--optional-- (RF calculations only) - wavevector of the phonon +!! rprimd(3,3)=real space primitive translations. +!! symafm(nsym)=(anti)ferromagnetic part of symmetry operations +!! symrec(3,3,nsym)=symmetries of group in terms of operations on +!! reciprocal space primitive translations +!! +!! SIDE EFFECTS +!! paw_ij(natom)%dij???(cplex_dij*lmn2_size,nspden)=symmetrized dij quantities as output +!! +!! SOURCE + +subroutine symdij(gprimd,indsym,ipert,my_natom,natom,nsym,ntypat,option_dij,& +& paw_ij,pawang,pawprtvol,pawtab,rprimd,symafm,symrec, & +& mpi_atmtab,comm_atom,qphon) ! optional arguments (parallelism) + +!Arguments --------------------------------------------- +!scalars + integer,intent(in) :: ipert,my_natom,natom,nsym,ntypat,option_dij,pawprtvol + integer,optional,intent(in) :: comm_atom + type(pawang_type),intent(in) :: pawang +!arrays + integer,intent(in) :: indsym(4,nsym,natom),symafm(nsym),symrec(3,3,nsym) + integer,optional,target,intent(in) :: mpi_atmtab(:) + real(dp),intent(in) :: gprimd(3,3),rprimd(3,3) + real(dp),intent(in),optional :: qphon(3) + type(paw_ij_type),intent(inout) :: paw_ij(my_natom) + type(pawtab_type),target,intent(in) :: pawtab(ntypat) + +!Local variables --------------------------------------- +!scalars + integer :: at_indx,cplex_dij,iafm,iatom,iatom_tot,ii + integer :: il,il0,ilmn,iln,iln0,ilpm,indexi,indexii,indexj,indexjj,indexjj0,indexk,indexkc,indexkc_q + integer :: iplex,iq,irot,ispden,itypat,j0lmn,jl,jl0,jlmn,jln,jln0,jlpm,jspden + integer :: klmn,klmnc,kspden,lmn_size,lmn2_size,mi,mj,my_comm_atom,my_cplex_dij,my_ndij,my_qphase + integer :: mu,natinc,ndij0,ndij1,nu,qphase,sz1,sz2 + logical,parameter :: afm_noncoll=.true. ! TRUE if antiferro symmetries are used with non-collinear magnetism + logical :: antiferro,has_qphase,my_atmtab_allocated,noncoll,paral_atom,use_afm +!DEBUG_ALTERNATE_ALGO +!Set to TRUE to choose an alternate algorithm (with another representation) +!to symmetrize Dij within non-collinear magnetism or spin-orbit + logical,parameter :: lsymnew=.false. +!DEBUG_ALTERNATE_ALGO + real(dp) :: arg,factafm,zarot2 + character(len=6) :: pertstrg,wrt_mode + character(len=500) :: msg +!arrays + integer :: nsym_used(2) + integer, pointer :: indlmn(:,:) + integer,pointer :: my_atmtab(:) + real(dp) :: dijc(2),fact(2),factsym(2),phase(2) + real(dp) :: rotdij(2,2,2),rotmag(2,3,2),sumdij(2,2,2),summag(2,3,2) + real(dp),allocatable :: dijnew(:,:,:),dijtmp(:,:),symrec_cart(:,:,:) + type(coeff2_type),target, allocatable :: my_tmp_dij(:) + type(coeff2_type),pointer :: tmp_dij(:) + +!DEBUG_ALTERNATE_ALGO +!integer :: i1,i2,i3,i4,symrel_conv(3,3) +!real(dp) :: spinrot(4) +!real(dp),allocatable :: dijtemp(:,:),sumrhoso(:,:) +!complex(dpc) :: dijt(2,2),dijt2(2,2),Rspinrot(2,2) +!DEBUG_ALTERNATE_ALGO + +! ********************************************************************* + +!Tests consistency of options + if (my_natom>0) then + if ((option_dij==1.and.paw_ij(1)%has_dijhat==0).or.& +& (option_dij==2.and.paw_ij(1)%has_dijU==0).or.& +& (option_dij==3.and.paw_ij(1)%has_dijxc==0).or.& +& (option_dij==4.and.paw_ij(1)%has_dijxc_hat==0).or.& +& (option_dij==5.and.paw_ij(1)%has_dijxc_val==0).or.& +& (option_dij==6.and.paw_ij(1)%has_dijso==0).or.& +& (option_dij==7.and.paw_ij(1)%has_dijexxc==0).or.& +& (option_dij==8.and.paw_ij(1)%has_dijfr==0).or.& +& (option_dij==9.and.paw_ij(1)%has_dijnd==0).or.& +& (option_dij==10.and.paw_ij(1)%has_dijhartree==0).or.& +& (option_dij==11.and.paw_ij(1)%has_dijfock==0)) then + msg='Incompatibilty between option_dij and allocation of Dij!' + LIBPAW_BUG(msg) + end if + end if + +!Set up parallelism over atoms + paral_atom=(present(comm_atom).and.(my_natom/=natom)) + nullify(my_atmtab);if (present(mpi_atmtab)) my_atmtab => mpi_atmtab + my_comm_atom=xmpi_comm_self;if (present(comm_atom)) my_comm_atom=comm_atom + call get_my_atmtab(my_comm_atom,my_atmtab,my_atmtab_allocated,paral_atom,natom,my_natom_ref=my_natom) + +!Determine sizes of dij array according to options + my_qphase=1;my_cplex_dij=1;my_ndij=1 + if (my_natom>0) then + my_qphase=paw_ij(1)%qphase + my_cplex_dij=paw_ij(1)%cplex_dij + my_ndij=paw_ij(1)%ndij + if (option_dij==4.or.option_dij==5.or.option_dij==9) my_qphase=1 + if (option_dij==10) my_cplex_dij=1 + if (option_dij==10) my_ndij=1 + end if + +!Antiferro case ? + antiferro=.false.;if (my_natom>0) antiferro=(paw_ij(1)%nspden==2.and.paw_ij(1)%nsppol==1.and.my_ndij/=4) +! Non-collinear case + noncoll=.false.;if (my_natom>0) noncoll=(my_ndij==4) + if (my_natom>0) then + if (noncoll.and.paw_ij(1)%cplex_dij/=2) then + msg='cplex_dij must be 2 with ndij=4!' + LIBPAW_BUG(msg) + end if + end if +!Do we use antiferro symmetries ? + use_afm=((antiferro).or.(noncoll.and.afm_noncoll)) + +!Do we have a phase due to q-vector? + has_qphase=.false. + if (my_natom>0) then + has_qphase=(paw_ij(1)%qphase==2) + if (present(qphon)) then + if (any(abs(qphon(1:3))>tol8).and.(.not.has_qphase)) then + msg='Should have qphase=2 for a non-zero q!' + LIBPAW_BUG(msg) + end if + end if +!DEBUG_ALTERNATE_ALGO +! if(lsymnew.and.has_qphase) then +! msg='symdij: alternate algo not available for phonons at q<>0!' +! LIBPAW_BUG(msg) +! end if +!DEBUG_ALTERNATE_ALGO + end if + +!Printing of unsymetrized Dij + if (abs(pawprtvol)>=1.and.option_dij==0.and.ipert/=natom+1.and.ipert/=natom+10) then + wrt_mode='COLL';if (paral_atom) wrt_mode='PERS' + pertstrg="DIJ";if (ipert>0) pertstrg="DIJ(1)" + natinc=1;if(my_natom>1.and.pawprtvol>=0) natinc=my_natom-1 + write(msg, '(7a)') ch10," PAW TEST:",ch10,& +& ' ========= Values of ',trim(pertstrg),' before symetrization =========',ch10 + call wrtout(std_out,msg,wrt_mode) + do iatom=1,my_natom,natinc + iatom_tot=iatom; if (paral_atom) iatom_tot=my_atmtab(iatom) + call pawdij_print_dij(paw_ij(iatom)%dij,paw_ij(iatom)%cplex_dij,paw_ij(iatom)%qphase,& +& iatom_tot,natom,paw_ij(iatom)%nspden,opt_prtvol=pawprtvol,mode_paral=wrt_mode) + end do + call wrtout(std_out,"",wrt_mode) + end if + +!Symmetrization occurs only when nsym>1 + if (nsym>1.and.ipert/=natom+1.and.ipert/=natom+10) then + + if (pawang%nsym==0) then + msg='pawang%zarot must be allocated!' + LIBPAW_BUG(msg) + end if + +! Have to make a temporary copy of dij + LIBPAW_DATATYPE_ALLOCATE(my_tmp_dij,(my_natom)) + if (my_natom>0) then + do iatom=1,my_natom + lmn2_size=paw_ij(iatom)%lmn2_size + sz1=my_qphase*my_cplex_dij*lmn2_size;sz2=my_ndij + LIBPAW_ALLOCATE(my_tmp_dij(iatom)%value,(sz1,sz2)) + LIBPAW_ALLOCATE(dijtmp,(sz1,sz2)) + if (option_dij==0) then + dijtmp(:,:)=paw_ij(iatom)%dij(:,:) + else if (option_dij==1) then + dijtmp(:,:)=paw_ij(iatom)%dijhat(:,:) + else if (option_dij==2) then + dijtmp(:,:)=paw_ij(iatom)%dijU(:,:) + else if (option_dij==3) then + dijtmp(:,:)=paw_ij(iatom)%dijxc(:,:) + else if (option_dij==4) then + dijtmp(:,:)=paw_ij(iatom)%dijxc_hat(:,:) + else if (option_dij==5) then + dijtmp(:,:)=paw_ij(iatom)%dijxc_val(:,:) + else if (option_dij==6) then + dijtmp(:,:)=paw_ij(iatom)%dijso(:,:) + else if (option_dij==7) then + dijtmp(:,:)=paw_ij(iatom)%dijexxc(:,:) + else if (option_dij==8) then + dijtmp(:,:)=paw_ij(iatom)%dijfr(:,:) + else if (option_dij==9) then + dijtmp(:,:)=paw_ij(iatom)%dijnd(:,:) + else if (option_dij==10) then + dijtmp(:,1)=paw_ij(iatom)%dijhartree(:) + else if (option_dij==11) then + dijtmp(:,:)=paw_ij(iatom)%dijfock(:,:) + end if + !Has to translate Dij^{alpha,beta} into (Dij, Dij magnetic field) format + if (my_ndij==4) then + my_tmp_dij(iatom)%value(:,1)=dijtmp(:,1)+dijtmp(:,2) + my_tmp_dij(iatom)%value(:,2)=dijtmp(:,3)+dijtmp(:,4) + my_tmp_dij(iatom)%value(:,4)=dijtmp(:,1)-dijtmp(:,2) + do klmn=1,paw_ij(iatom)%lmn2_size + my_tmp_dij(iatom)%value(2*klmn-1,3)=-dijtmp(2*klmn ,3)+dijtmp(2*klmn ,4) + my_tmp_dij(iatom)%value(2*klmn ,3)= dijtmp(2*klmn-1,3)-dijtmp(2*klmn-1,4) + end do +!DEBUG_ALTERNATE_ALGO +! if(lsymnew) my_tmp_dij(iatom)%value(:,:)=dijtmp(:,:) +!DEBUG_ALTERNATE_ALGO + else + my_tmp_dij(iatom)%value(:,:)=dijtmp(:,:) + end if + LIBPAW_DEALLOCATE(dijtmp) + end do + end if + +! Parallelism: gather all Dij + if (paral_atom) then + LIBPAW_DATATYPE_ALLOCATE(tmp_dij,(natom)) + call pawdij_gather(my_tmp_dij,tmp_dij,my_comm_atom,my_atmtab) + do iatom=1,my_natom + LIBPAW_DEALLOCATE(my_tmp_dij(iatom)%value) + end do + LIBPAW_DATATYPE_DEALLOCATE(my_tmp_dij) + else + tmp_dij=>my_tmp_dij + end if + + if (noncoll) then + LIBPAW_ALLOCATE(symrec_cart,(3,3,nsym)) + do irot=1,nsym + symrec_cart(:,:,irot)=symdij_symcart(gprimd,rprimd,symrec(:,:,irot)) + end do +!DEBUG_ALTERNATE_ALGO +! if(lsymnew) then +! LIBPAW_ALLOCATE(sumrhoso,(my_cplex_dij,4)) +! end if +!DEBUG_ALTERNATE_ALGO + end if + + ndij1=1 + if (antiferro) ndij1=2 + if (noncoll) ndij1=4 + ndij1=min(ndij1,my_ndij) + ndij0=ndij1-1 + LIBPAW_ALLOCATE(dijnew,(my_cplex_dij,ndij1,my_qphase)) + +! Loops over atoms and spin components + do iatom=1,my_natom + iatom_tot=iatom;if (paral_atom) iatom_tot=my_atmtab(iatom) + itypat=paw_ij(iatom)%itypat + lmn_size=paw_ij(iatom)%lmn_size + lmn2_size=paw_ij(iatom)%lmn2_size + cplex_dij=min(paw_ij(iatom)%cplex_dij,my_cplex_dij) + qphase=min(paw_ij(iatom)%qphase,my_qphase) + indlmn => pawtab(itypat)%indlmn + +!DEBUG_ALTERNATE_ALGO +! if (noncoll.and.lsymnew) then +! LIBPAW_ALLOCATE(dijtemp,(cplex_dij,my_ndij)) +! end if +!DEBUG_ALTERNATE_ALGO + + do ispden=1,paw_ij(iatom)%nsppol + jspden=min(3-ispden,paw_ij(iatom)%nsppol) + +! Loops over (il,im) and (jl,jm) + jl0=-1;jln0=-1;indexj=1 + do jlmn=1,lmn_size + jl=indlmn(1,jlmn) + jlpm=1+jl+indlmn(2,jlmn) + jln=indlmn(5,jlmn) + if (jln/=jln0) indexj=indexj+2*jl0+1 + j0lmn=jlmn*(jlmn-1)/2 + il0=-1;iln0=-1;indexi=1 + do ilmn=1,jlmn + il=indlmn(1,ilmn) + ilpm=1+il+indlmn(2,ilmn) + iln=indlmn(5,ilmn) + if (iln/=iln0) indexi=indexi+2*il0+1 + klmn=j0lmn+ilmn;klmnc=cplex_dij*(klmn-1) + + nsym_used(:)=0 + + rotdij(:,:,:)=zero + if (noncoll) rotmag(:,:,:)=zero +!DEBUG_ALTERNATE_ALGO +! if (noncoll.and.lsymnew) sumrhoso(:,:)=zero +!DEBUG_ALTERNATE_ALGO + +! Loop over symmetries + do irot=1,nsym +!DEBUG_ALTERNATE_ALGO +! if(lsymnew) then +! call mati3inv(symrec(:,:,irot),symrel_conv) +! call getspinrot(rprimd,spinrot,symrel_conv) +! Rspinrot(1,1)=cmplx(spinrot(1),-spinrot(4)) +! Rspinrot(1,2)=cmplx(-spinrot(3),-spinrot(2)) +! Rspinrot(2,1)=cmplx(spinrot(3),-spinrot(2)) +! Rspinrot(2,2)=cmplx(spinrot(1),spinrot(4)) +! end if +!DEBUG_ALTERNATE_ALGO + if ((symafm(irot)/=1).and.(.not.use_afm)) cycle + kspden=ispden;if (symafm(irot)==-1) kspden=jspden + iafm=1;if ((antiferro).and.(symafm(irot)==-1)) iafm=2 + factafm=dble(symafm(irot)) + + nsym_used(iafm)=nsym_used(iafm)+1 + at_indx=indsym(4,irot,iatom_tot) + + if (has_qphase) then + arg=two_pi*(qphon(1)*indsym(1,irot,iatom)+qphon(2)*indsym(2,irot,iatom) & +& +qphon(3)*indsym(3,irot,iatom)) + phase(1)=cos(arg);phase(2)=sin(arg) + end if + + sumdij(:,:,:)=zero + if (noncoll) summag(:,:,:)=zero + +! Accumulate values over (mi,mj) and symmetries + do mj=1,2*jl+1 + indexjj=indexj+mj;indexjj0=indexjj*(indexjj-1)/2 + do mi=1,2*il+1 + indexii=indexi+mi + factsym(:)=one + if (indexii<=indexjj) then + indexk=indexjj0+indexii + factsym(2)=one + else + indexk=indexii*(indexii-1)/2+indexjj + factsym(2)=-one + end if + indexkc=cplex_dij*(indexk-1) + indexkc_q=indexkc+cplex_dij*lmn2_size + +!DEBUG_ALTERNATE_ALGO +! if (noncoll.and.lsymnew) then +! do iplex=1,cplex_dij +! if(factafm>zero) then +! dijtemp(iplex,1)=factsym(iplex)*tmp_dij(at_indx)%value(indexkc+iplex,1) +! dijtemp(iplex,2)=factsym(iplex)*tmp_dij(at_indx)%value(indexkc+iplex,2) +! else +! dijtemp(iplex,1)=factsym(iplex)*tmp_dij(at_indx)%value(indexkc+iplex,2) +! dijtemp(iplex,2)=factsym(iplex)*tmp_dij(at_indx)%value(indexkc+iplex,1) +! end if +! if(factsym(2)0) then + do iq=1,qphase + do iplex=1,cplex_dij + dijnew(iplex,2,iq)=rotdij(iplex,2,iq)/nsym_used(2) + if (abs(dijnew(iplex,2,iq))<=tol10) dijnew(iplex,2,iq)=zero + end do + end do + end if +!DEBUG_ALTERNATE_ALGO +! else if (noncoll.and.(lsymnew)) then +! do mu=1,4 +! do iplex=1,cplex_dij +! dijnew(iplex,mu,1)=sumrhoso(iplex,mu)/nsym_used(1) +! if (abs(dijnew(iplex,mu,1))<=tol10) dijnew(iplex,mu,1)=zero +! end do +! end do +!DEBUG_ALTERNATE_ALGO + end if + +! Non-collinear case: store new values of Dij magnetization + if (noncoll.and.(.not.lsymnew)) then +! Select on-zero elements + do iq=1,qphase + do mu=1,3 + do iplex=1,cplex_dij + rotmag(iplex,mu,iq)=rotmag(iplex,mu,iq)/nsym_used(1) + if (abs(rotmag(iplex,mu,iq))<=tol10) rotmag(iplex,mu,iq)=zero + end do + end do + end do +! Transfer back to Dij^{alpha,beta} + if(.not.lsymnew) then + !Remember: cplex_dij is 2 in that case + do iq=1,qphase + dijnew(1,1,iq)=half*(dijnew(1,1,iq)+rotmag(1,3,iq)) + dijnew(2,1,iq)=half*(dijnew(2,1,iq)+rotmag(2,3,iq)) + dijnew(1,2,iq)= dijnew(1,1,iq)-rotmag(1,3,iq) + dijnew(2,2,iq)= dijnew(2,1,iq)-rotmag(2,3,iq) + dijnew(1,3,iq)=half*(rotmag(1,1,iq)+rotmag(2,2,iq)) + dijnew(2,3,iq)=half*(rotmag(2,1,iq)-rotmag(1,2,iq)) + dijnew(1,4,iq)=half*(rotmag(1,1,iq)-rotmag(2,2,iq)) + dijnew(2,4,iq)=half*(rotmag(2,1,iq)+rotmag(1,2,iq)) + end do + end if + end if +! Transfer new value of Dij in suitable pointer + ii=klmnc + do iq=1,qphase + if (option_dij==0) then + paw_ij(iatom)%dij(ii+1:ii+cplex_dij,ispden:ispden+ndij0)=dijnew(1:cplex_dij,1:ndij1,iq) + else if (option_dij==1) then + paw_ij(iatom)%dijhat(ii+1:ii+cplex_dij,ispden:ispden+ndij0)=dijnew(1:cplex_dij,1:ndij1,iq) + else if (option_dij==2) then + paw_ij(iatom)%dijU(ii+1:ii+cplex_dij,ispden:ispden+ndij0)=dijnew(1:cplex_dij,1:ndij1,iq) + else if (option_dij==3) then + paw_ij(iatom)%dijxc(ii+1:ii+cplex_dij,ispden:ispden+ndij0)=dijnew(1:cplex_dij,1:ndij1,iq) + else if (option_dij==4) then + paw_ij(iatom)%dijxc_hat(ii+1:ii+cplex_dij,ispden:ispden+ndij0)=dijnew(1:cplex_dij,1:ndij1,iq) + else if (option_dij==5) then + paw_ij(iatom)%dijxc_val(ii+1:ii+cplex_dij,ispden:ispden+ndij0)=dijnew(1:cplex_dij,1:ndij1,iq) + else if (option_dij==6) then + paw_ij(iatom)%dijso(ii+1:ii+cplex_dij,ispden:ispden+ndij0)=dijnew(1:cplex_dij,1:ndij1,iq) + else if (option_dij==7) then + paw_ij(iatom)%dijexxc(ii+1:ii+cplex_dij,ispden:ispden+ndij0)=dijnew(1:cplex_dij,1:ndij1,iq) + else if (option_dij==8) then + paw_ij(iatom)%dijfr(ii+1:ii+cplex_dij,ispden:ispden+ndij0)=dijnew(1:cplex_dij,1:ndij1,iq) + else if (option_dij==9) then + paw_ij(iatom)%dijnd(ii+1:ii+cplex_dij,ispden:ispden+ndij0)=dijnew(1:cplex_dij,1:ndij1,iq) + else if (option_dij==10) then + paw_ij(iatom)%dijhartree(ii+1:ii+cplex_dij)=dijnew(1:cplex_dij,1,iq) + else if (option_dij==11) then + paw_ij(iatom)%dijfock(ii+1:ii+cplex_dij,ispden:ispden+ndij0)=dijnew(1:cplex_dij,1:ndij1,iq) + end if + ii=ii+lmn2_size*cplex_dij + end do + + il0=il;iln0=iln ! End loops over (il,im) and (jl,jm) + end do + jl0=jl;jln0=jln + end do + + end do ! ispden + +!DEBUG_ALTERNATE_ALGO +! if (noncoll.and.lsymnew) then +! LIBPAW_DEALLOCATE(dijtemp) +! end if +!DEBUG_ALTERNATE_ALGO + + end do ! iatom + + LIBPAW_DEALLOCATE(dijnew) + if (noncoll) then + LIBPAW_DEALLOCATE(symrec_cart) +!DEBUG_ALTERNATE_ALGO +! if (lsymnew) then +! LIBPAW_DEALLOCATE(sumrhoso) +! end if +!DEBUG_ALTERNATE_ALGO + end if + + if (paral_atom) then + do iatom=1,natom + LIBPAW_DEALLOCATE(tmp_dij(iatom)%value) + end do + LIBPAW_DATATYPE_DEALLOCATE(tmp_dij) + else + do iatom=1,my_natom + LIBPAW_DEALLOCATE(my_tmp_dij(iatom)%value) + end do + LIBPAW_DATATYPE_DEALLOCATE(my_tmp_dij) + end if + + else if (ipert/=natom+1.and.ipert/=natom+10) then ! nsym>1 + +! ********************************************************************* +! If nsym==1, only cut small components of dij + + if (antiferro) then + msg='In the antiferromagnetic case, nsym cannot be 1' + LIBPAW_BUG(msg) + end if + + do iatom=1,my_natom + do ispden=1,my_ndij + qphase=paw_ij(iatom)%qphase + cplex_dij=paw_ij(iatom)%cplex_dij + lmn2_size=paw_ij(iatom)%lmn2_size + if (option_dij==0) then + do klmn=1,lmn2_size*cplex_dij*qphase + if (abs(paw_ij(iatom)%dij(klmn,ispden))<=tol10) paw_ij(iatom)%dij(klmn,ispden)=zero + end do + else if (option_dij==1) then + do klmn=1,lmn2_size*cplex_dij*qphase + if (abs(paw_ij(iatom)%dijhat(klmn,ispden))<=tol10) paw_ij(iatom)%dijhat(klmn,ispden)=zero + end do + else if (option_dij==2) then + do klmn=1,lmn2_size*cplex_dij*qphase + if (abs(paw_ij(iatom)%dijU(klmn,ispden))<=tol10) paw_ij(iatom)%dijU(klmn,ispden)=zero + end do + else if (option_dij==3) then + do klmn=1,lmn2_size*cplex_dij*qphase + if (abs(paw_ij(iatom)%dijxc(klmn,ispden))<=tol10) paw_ij(iatom)%dijxc(klmn,ispden)=zero + end do + else if (option_dij==4) then + do klmn=1,lmn2_size*cplex_dij + if (abs(paw_ij(iatom)%dijxc_hat(klmn,ispden))<=tol10) paw_ij(iatom)%dijxc_hat(klmn,ispden)=zero + end do + else if (option_dij==5) then + do klmn=1,lmn2_size*cplex_dij + if (abs(paw_ij(iatom)%dijxc_val(klmn,ispden))<=tol10) paw_ij(iatom)%dijxc_val(klmn,ispden)=zero + end do + else if (option_dij==6) then + do klmn=1,lmn2_size*cplex_dij*qphase + if (abs(paw_ij(iatom)%dijso(klmn,ispden))<=tol10) paw_ij(iatom)%dijso(klmn,ispden)=zero + end do + else if (option_dij==7) then + do klmn=1,lmn2_size*cplex_dij*qphase + if (abs(paw_ij(iatom)%dijexxc(klmn,ispden))<=tol10) paw_ij(iatom)%dijexxc(klmn,ispden)=zero + end do + else if (option_dij==8) then + do klmn=1,lmn2_size*cplex_dij*qphase + if (abs(paw_ij(iatom)%dijfr(klmn,ispden))<=tol10) paw_ij(iatom)%dijfr(klmn,ispden)=zero + end do + else if (option_dij==9) then + do klmn=1,lmn2_size*cplex_dij + if (abs(paw_ij(iatom)%dijnd(klmn,ispden))<=tol10) paw_ij(iatom)%dijnd(klmn,ispden)=zero + end do + else if (option_dij==10.and.ispden==1) then + do klmn=1,lmn2_size*qphase + if (abs(paw_ij(iatom)%dijhartree(klmn))<=tol10) paw_ij(iatom)%dijhartree(klmn)=zero + end do + else if (option_dij==11) then + do klmn=1,lmn2_size*cplex_dij*qphase + if (abs(paw_ij(iatom)%dijfock(klmn,ispden))<=tol10) paw_ij(iatom)%dijfock(klmn,ispden)=zero + end do + end if + end do + end do + + end if ! nsym>1 + +!********************************************************************* +!Printing of Dij + + if (abs(pawprtvol)>=1.and.option_dij==0.and.ipert/=natom+1.and.ipert/=natom+10) then + wrt_mode='COLL';if (paral_atom) wrt_mode='PERS' + pertstrg="DIJ";if (ipert>0) pertstrg="DIJ(1)" + natinc=1;if(my_natom>1.and.pawprtvol>=0) natinc=my_natom-1 + write(msg, '(7a)') ch10," PAW TEST:",ch10,& +& ' ========= Values of ',trim(pertstrg),' after symetrization =========',ch10 + call wrtout(std_out,msg,wrt_mode) + do iatom=1,my_natom,natinc + iatom_tot=iatom; if (paral_atom) iatom_tot=my_atmtab(iatom) + call pawdij_print_dij(paw_ij(iatom)%dij,paw_ij(iatom)%cplex_dij,paw_ij(iatom)%qphase,& +& iatom_tot,natom,paw_ij(iatom)%nspden,opt_prtvol=pawprtvol,mode_paral=wrt_mode) + end do + call wrtout(std_out,"",wrt_mode) + end if + +!Destroy atom table used for parallelism + call free_my_atmtab(my_atmtab,my_atmtab_allocated) + +!********************************************************************* +!Small function: convert a symmetry operation +!from reduced coordinates (integers) to cartesian coordinates (reals) + contains + function symdij_symcart(aprim,bprim,symred) + + real(dp) :: symdij_symcart(3,3) + integer,intent(in) :: symred(3,3) + real(dp),intent(in) :: aprim(3,3),bprim(3,3) + integer :: ii,jj,kk + real(dp) :: tmp(3,3) + symdij_symcart=zero;tmp=zero + do kk=1,3 + do jj=1,3 + do ii=1,3 + tmp(ii,jj)=tmp(ii,jj)+bprim(ii,kk)*dble(symred(jj,kk)) + end do + end do + end do + do kk=1,3 + do jj=1,3 + do ii=1,3 + symdij_symcart(ii,jj)=symdij_symcart(ii,jj)+aprim(ii,kk)*tmp(jj,kk) + end do + end do + end do + end function symdij_symcart + +end subroutine symdij +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawdij/symdij_all +!! NAME +!! symdij_all +!! +!! FUNCTION +!! Symmetrize all contributions to PAW non-local strengths Dij +!! +!! INPUTS +!! gprimd(3,3)=dimensional primitive translations for reciprocal space(bohr^-1). +!! indsym(4,nsym,natom)=indirect indexing array for atom labels +!! ipert=index of perturbation if pawrhoij is a pertubed rhoij +!! no meaning for ground-state calculations (should be 0) +!! mpi_atmtab(:)=--optional-- indexes of the atoms treated by current proc +!! comm_atom=--optional-- MPI communicator over atoms +!! my_natom=number of atoms treated by current processor +!! natom=number of atoms in cell +!! nsym=number of symmetry elements in space group +!! ntypat=number of types of atoms in unit cell. +!! paw_ij(natom)%cplex_dij=1 if dij are REAL, 2 if they are COMPLEX +!! paw_ij(natom)%qphase=2 if exp^(-i.q.r) phase from RF at q<>0, 1 otherwise +!! paw_ij(natom)%lmn_size=number of (l,m,n) elements for the paw basis +!! paw_ij(natom)%nspden=number of spin-density components +!! paw_ij(natom)%nsppol=number of independant spin-density components +!! paw_ij(natom)%dij(lmn2_size,nspden)=non-symmetrized paw dij quantities +!! pawang =angular mesh discretization and related data +!! pawprtvol=control print volume and debugging output for PAW +!! pawtab(ntypat) =paw tabulated starting data +!! rprimd(3,3)=real space primitive translations. +!! symafm(nsym)=(anti)ferromagnetic part of symmetry operations +!! symrec(3,3,nsym)=symmetries of group in terms of operations on +!! reciprocal space primitive translations +!! +!! SIDE EFFECTS +!! paw_ij(natom)%dij???(cplex_dij*qphase*lmn2_size,nspden)=symmetrized dij quantities as output +!! +!! SOURCE + +subroutine symdij_all(gprimd,indsym,ipert,my_natom,natom,nsym,ntypat,& +& paw_ij,pawang,pawprtvol,pawtab,rprimd,symafm,symrec,& +& mpi_atmtab,comm_atom) ! optional arguments (parallelism) + +!Arguments --------------------------------------------- +!scalars + integer,intent(in) :: ipert,my_natom,natom,nsym,ntypat,pawprtvol + integer,optional,intent(in) :: comm_atom + type(pawang_type),intent(in) :: pawang +!arrays + integer,intent(in) :: indsym(4,nsym,natom),symafm(nsym),symrec(3,3,nsym) + integer,optional,target,intent(in) :: mpi_atmtab(:) + real(dp),intent(in) :: gprimd(3,3),rprimd(3,3) + type(paw_ij_type),intent(inout) :: paw_ij(my_natom) + type(pawtab_type),intent(in) :: pawtab(ntypat) + +!Local variables --------------------------------------- +!scalars + integer,parameter :: MAX_NOPTS=12 + integer :: ii,option_dij,my_comm_atom,nopt + logical :: my_atmtab_allocated,paral_atom + character(len=500) :: msg +!arrays + integer :: options(MAX_NOPTS) + integer,pointer :: my_atmtab(:) + +! ********************************************************************* + + nopt = 0 + if (ANY(paw_ij(:)%has_dij==2)) then + nopt = nopt + 1 + options(nopt) = 0 + end if + + if (ANY(paw_ij(:)%has_dijhat==2)) then + nopt = nopt + 1 + options(nopt) = 1 + end if + + if (ANY(paw_ij(:)%has_dijU==2)) then + nopt = nopt + 1 + options(nopt) = 2 + end if + + if (ANY(paw_ij(:)%has_dijxc==2)) then + nopt = nopt + 1 + options(nopt) = 3 + end if + + if (ANY(paw_ij(:)%has_dijxc_hat==2)) then + nopt = nopt + 1 + options(nopt) = 4 + end if + + if (ANY(paw_ij(:)%has_dijxc_val==2)) then + nopt = nopt + 1 + options(nopt) = 5 + end if + + if (ANY(paw_ij(:)%has_dijso==2)) then + nopt = nopt + 1 + options(nopt) = 6 + end if + + if (ANY(paw_ij(:)%has_dijexxc==2)) then + nopt = nopt + 1 + options(nopt) = 7 + end if + + if (ANY(paw_ij(:)%has_dijfr==2)) then + nopt = nopt + 1 + options(nopt) = 8 + end if + + if (ANY(paw_ij(:)%has_dijnd==2)) then + nopt = nopt + 1 + options(nopt) = 9 + end if + + if (ANY(paw_ij(:)%has_dijhartree==2)) then + nopt = nopt + 1 + options(nopt) = 10 + end if + + if (ANY(paw_ij(:)%has_dijfock==2)) then + nopt = nopt + 1 + options(nopt) = 11 + end if + + if (ANY(paw_ij(:)%has_exexch_pot==2)) then + nopt = nopt + 1 + options(nopt) = 10 + msg='symetrization of dij_exexch not coded!' + LIBPAW_ERROR(msg) + end if + +!Set up parallelism over atoms + paral_atom=(present(comm_atom)) + nullify(my_atmtab);if (present(mpi_atmtab)) my_atmtab => mpi_atmtab + my_comm_atom=xmpi_comm_self;if (present(comm_atom)) my_comm_atom=comm_atom + call get_my_atmtab(my_comm_atom,my_atmtab,my_atmtab_allocated,paral_atom,natom,my_natom_ref=my_natom) + + do ii=1,nopt + option_dij = options(ii) + if (paral_atom) then + call symdij(gprimd,indsym,ipert,my_natom,natom,nsym,ntypat,option_dij,& +& paw_ij,pawang,pawprtvol,pawtab,rprimd,symafm,symrec,& +& comm_atom=my_comm_atom,mpi_atmtab=my_atmtab) + else + call symdij(gprimd,indsym,ipert,my_natom,natom,nsym,ntypat,option_dij,& +& paw_ij,pawang,pawprtvol,pawtab,rprimd,symafm,symrec) + end if + end do + +!Destroy atom table used for parallelism + call free_my_atmtab(my_atmtab,my_atmtab_allocated) + +end subroutine symdij_all +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawdij/pawdij_gather +!! NAME +!! pawdij_gather +!! +!! FUNCTION +!! Performs a ALLGATHER operation (over atomic sites) on Dij data +!! stored as a 1D array of Dij arrays. +!! +!! INPUTS +!! dij_in = coeff2d_type array containing the input Dij +!! comm_atom= MPI communicator over atoms +!! mpi_atmtab(:)=indexes of the atoms treated by current proc +!! +!! OUTPUT +!! dij_out = coeff2d_type array containing the gathered Dij +!! +!! SOURCE + +subroutine pawdij_gather(dij_in,dij_out,comm_atom,mpi_atmtab) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: comm_atom +!arrays + integer,intent(in) :: mpi_atmtab(:) + type(coeff2_type),intent(in) :: dij_in(:) + type(coeff2_type),intent(out) :: dij_out(:) + +!Local variables------------------------------- +!scalars + integer :: buf_dp_size,buf_dp_size_all,buf_int_size,buf_int_size_all + integer :: dij_size,dij_size_out,ierr,ii,i2,indx_dp,indx_int,ival,n1,n2,nproc +!arrays + integer :: bufsz(2) + integer, allocatable :: buf_int(:),buf_int_all(:) + integer, allocatable :: count_dp(:),count_int(:),count_tot(:),displ_dp(:),displ_int(:) + integer, allocatable :: dimdij(:,:) + real(dp),allocatable :: buf_dp(:),buf_dp_all(:) + +! ************************************************************************* + + nproc=xmpi_comm_size(comm_atom) + dij_size=size(dij_in,dim=1) + + buf_dp_size=0 + LIBPAW_ALLOCATE(dimdij,(dij_size,2)) + do ii=1,dij_size + dimdij(ii,1)=size(dij_in(ii)%value,dim=1) + dimdij(ii,2)=size(dij_in(ii)%value,dim=2) + buf_dp_size=buf_dp_size+dimdij(ii,1)*dimdij(ii,2) + end do + +!If only one proc, perform a single copy + if (nproc==1) then + do ii=1,dij_size + ival=mpi_atmtab(ii) + if (allocated(dij_out(ival)%value)) then + LIBPAW_DEALLOCATE(dij_out(ival)%value) + end if + LIBPAW_ALLOCATE(dij_out(ival)%value,(n1,n2)) + dij_out(ii)%value=dij_in(ival)%value + end do + LIBPAW_DEALLOCATE(dimdij) + return + end if + +!Fill in integer buffer + buf_int_size=3*dij_size + LIBPAW_ALLOCATE(buf_int,(buf_int_size)) + indx_int=1 + do ii=1,dij_size + buf_int(indx_int )=dimdij(ii,1) + buf_int(indx_int+1)=dimdij(ii,2) + buf_int(indx_int+2)=mpi_atmtab(ii) + indx_int=indx_int+3 + end do + +!Fill in real buffer + LIBPAW_ALLOCATE(buf_dp,(buf_dp_size)) + indx_dp=1 + do ii=1,dij_size + n1=dimdij(ii,1); n2=dimdij(ii,2) + do i2=1,n2 + buf_dp(indx_dp:indx_dp+n1-1)=dij_in(ii)%value(1:n1,i2) + indx_dp=indx_dp+n1 + end do + end do + +!Communicate (1 gather for integers, 1 gather for reals) + LIBPAW_ALLOCATE(count_int,(nproc)) + LIBPAW_ALLOCATE(displ_int,(nproc)) + LIBPAW_ALLOCATE(count_dp ,(nproc)) + LIBPAW_ALLOCATE(displ_dp ,(nproc)) + LIBPAW_ALLOCATE(count_tot,(2*nproc)) + bufsz(1)=buf_int_size; bufsz(2)=buf_dp_size + call xmpi_allgather(bufsz,2,count_tot,comm_atom,ierr) + do ii=1,nproc + count_int(ii)=count_tot(2*ii-1) + count_dp (ii)=count_tot(2*ii) + end do + displ_int(1)=0;displ_dp(1)=0 + do ii=2,nproc + displ_int(ii)=displ_int(ii-1)+count_int(ii-1) + displ_dp (ii)=displ_dp (ii-1)+count_dp (ii-1) + end do + buf_int_size_all=sum(count_int) + buf_dp_size_all =sum(count_dp) + LIBPAW_DEALLOCATE(count_tot) + LIBPAW_ALLOCATE(buf_int_all,(buf_int_size_all)) + LIBPAW_ALLOCATE(buf_dp_all ,(buf_dp_size_all)) + call xmpi_allgatherv(buf_int,buf_int_size,buf_int_all,count_int,displ_int,comm_atom,ierr) + call xmpi_allgatherv(buf_dp ,buf_dp_size ,buf_dp_all ,count_dp ,displ_dp ,comm_atom,ierr) + LIBPAW_DEALLOCATE(count_int) + LIBPAW_DEALLOCATE(displ_int) + LIBPAW_DEALLOCATE(count_dp) + LIBPAW_DEALLOCATE(displ_dp) + +!Retrieve gathered data + dij_size_out=buf_int_size_all/3 + indx_int=1;indx_dp=1 + do ii=1,dij_size_out + n1=buf_int_all(indx_int) + n2=buf_int_all(indx_int+1) + ival=buf_int_all(indx_int+2) + indx_int=indx_int+3 + if (allocated(dij_out(ival)%value)) then + LIBPAW_DEALLOCATE(dij_out(ival)%value) + end if + LIBPAW_ALLOCATE(dij_out(ival)%value,(n1,n2)) + do i2=1,n2 + dij_out(ival)%value(1:n1,i2)=buf_dp_all(indx_dp:indx_dp+n1-1) + indx_dp=indx_dp+n1 + end do + end do + + LIBPAW_DEALLOCATE(buf_dp_all) + LIBPAW_DEALLOCATE(buf_int_all) + LIBPAW_DEALLOCATE(buf_int) + LIBPAW_DEALLOCATE(buf_dp) + LIBPAW_DEALLOCATE(dimdij) + +end subroutine pawdij_gather +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawdij/pawdij_print_ij +!! NAME +!! pawdij_print_dij +!! +!! FUNCTION +!! Print out the content of a Dij matrix (total Dij) in a suitable format +!! +!! INPUTS +!! dij(cplex_dij*qphase*lmn2_size,ndij)= input matrix to be printed +!! cplex_dij=1 if Dij is real, 2 if Dij is complex +!! qphase=1 if Dij contains no RF phase, 2 if it contains a exp(-iqr) RF phase +!! iatom=current atom +!! natom=total number of atoms in the system +!! nspden=number of spin density components +!! [Ha_or_eV]= 1: output in hartrees, 2: output in eV +!! [opt_prtvol]= >=0 if up to 12 components of _ij matrix have to be printed +!! <0 if all components of ij_ matrix have to be printed (optional) +!! [mode_paral]= parallel printing mode (optional, default='COLL') +!! [test_value]=(real number) if positive, print a warning when the magnitude of Dij is greater (optional) +!! [title_msg]=message to print as title (optional) +!! [unit]=the unit number for output (optional) +!! +!! OUTPUT +!! (Only writing) +!! +!! SOURCE + +subroutine pawdij_print_dij(dij,cplex_dij,qphase,iatom,natom,nspden,& +& test_value,title_msg,unit,Ha_or_eV,opt_prtvol,mode_paral) ! Optional arguments + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: cplex_dij,iatom,natom,nspden,qphase + integer,optional,intent(in) :: Ha_or_eV,opt_prtvol,unit + real(dp),intent(in),optional :: test_value + character(len=4),optional,intent(in) :: mode_paral + character(len=100),optional,intent(in) :: title_msg +!arrays + real(dp),intent(in),target :: dij(:,:) + +!Local variables------------------------------- + character(len=7),parameter :: dspin(6)=(/"up ","down ","up-up ","dwn-dwn","up-dwn ","dwn-up "/) + integer :: idij,idij_sym,kk,lmn_size,lmn2_size,my_idij,my_idij_sym + integer :: my_prtvol,my_unt,my_Ha_or_eV,ndij,tmp_cplex_dij + real(dp) :: my_test_value,test_value_eff + character(len=4) :: my_mode + character(len=2000) :: msg +!arrays + integer :: idum(0) + real(dp),allocatable,target :: dij1(:),dij2(:) + real(dp),pointer :: dij2p(:),dij2p_(:) + +! ************************************************************************* + +!Optional arguments + my_unt =std_out ; if (PRESENT(unit )) my_unt =unit + my_mode ='COLL' ; if (PRESENT(mode_paral)) my_mode =mode_paral + my_prtvol=1 ; if (PRESENT(opt_prtvol)) my_prtvol=opt_prtvol + my_test_value=-one; if (PRESENT(test_value)) my_test_value=test_value + my_Ha_or_eV=1 ; if (PRESENT(Ha_or_eV)) my_Ha_or_eV=Ha_or_eV + +!Title + if (present(title_msg)) then + if (trim(title_msg)/='') then + write(msg, '(2a)') ch10,trim(title_msg) + call wrtout(my_unt,msg,my_mode) + end if + end if + +!Inits + ndij=size(dij,2) + lmn2_size=size(dij,1)/(cplex_dij*qphase) + lmn_size=int(dsqrt(two*dble(lmn2_size))) + if (qphase==2) then + LIBPAW_ALLOCATE(dij1,(2*lmn2_size)) + LIBPAW_ALLOCATE(dij2,(2*lmn2_size)) + end if + +! === Loop over Dij components === + do idij=1,ndij + + idij_sym=idij;if (ndij==4.and.idij>2) idij_sym=7-idij + + !Subtitle + if (natom>1.or.nspden>1.or.ndij==4) then + if (nspden==1.and.ndij/=4) write(msg,'(a,i3)') ' Atom #',iatom + if (nspden==2) write(msg,'(a,i3,a,i1)')' Atom #',iatom,' - Spin component ',idij + if (ndij==4) write(msg,'(a,i3,2a)') ' Atom #',iatom,' - Component ',trim(dspin(idij+2*(ndij/4))) + call wrtout(my_unt,msg,my_mode) + end if + + !Select upper and lower triangular parts + my_idij=min(size(dij,2),idij) + my_idij_sym=min(size(dij,2),idij_sym) + if (qphase==1) then + tmp_cplex_dij=cplex_dij + dij2p => dij(1:cplex_dij*lmn2_size:1,my_idij) + dij2p_ => dij(1:cplex_dij*lmn2_size:1,my_idij_sym) + else + tmp_cplex_dij=2 + if (cplex_dij==1) then + do kk=1,lmn2_size + dij1(2*kk-1)= dij(kk,my_idij) + dij1(2*kk )= dij(kk+lmn2_size,my_idij) + dij2(2*kk-1)= dij(kk,my_idij_sym) + dij2(2*kk )=-dij(kk+lmn2_size,my_idij_sym) + end do + else + do kk=1,lmn2_size + dij1(2*kk-1)= dij(2*kk-1,my_idij)-dij(2*kk +2*lmn2_size,my_idij) + dij1(2*kk )= dij(2*kk ,my_idij)+dij(2*kk-1+2*lmn2_size,my_idij) + dij2(2*kk-1)= dij(2*kk-1,my_idij_sym)+dij(2*kk +2*lmn2_size,my_idij_sym) + dij2(2*kk )= dij(2*kk ,my_idij_sym)-dij(2*kk-1+2*lmn2_size,my_idij_sym) + end do + end if + dij2p => dij1 ; dij2p_ => dij2 + end if + + !Printing + test_value_eff=-one;if(my_test_value>zero.and.idij==1) test_value_eff=my_test_value + call pawio_print_ij(my_unt,dij2p,lmn2_size,tmp_cplex_dij,lmn_size,-1,idum,0,& +& my_prtvol,idum,test_value_eff,my_Ha_or_eV,& +& opt_sym=2,asym_ij=dij2p_,mode_paral=my_mode) + + end do !idij + + if (qphase==2) then + LIBPAW_DEALLOCATE(dij1) + LIBPAW_DEALLOCATE(dij2) + end if + +end subroutine pawdij_print_dij +!!*** + +!---------------------------------------------------------------------- + +END MODULE m_pawdij +!!*** diff --git a/GX-PAW/libpaw/src/m_pawdij.o b/GX-PAW/libpaw/src/m_pawdij.o new file mode 100644 index 00000000..ff25b84c Binary files /dev/null and b/GX-PAW/libpaw/src/m_pawdij.o differ diff --git a/GX-PAW/libpaw/src/m_pawfgrtab.F90 b/GX-PAW/libpaw/src/m_pawfgrtab.F90 new file mode 100644 index 00000000..705b8eda --- /dev/null +++ b/GX-PAW/libpaw/src/m_pawfgrtab.F90 @@ -0,0 +1,1571 @@ +!!****m* ABINIT/m_pawfgrtab +!! NAME +!! m_pawfgrtab +!! +!! FUNCTION +!! This module contains the definition of the pawfgrtab_type structured datatype, +!! as well as related functions and methods. +!! pawfgrtab_type variables contain various data expressed on the fine grid +!! for a given atom. +!! +!! COPYRIGHT +!! Copyright (C) 2013-2024 ABINIT group (MT, FJ) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! NOTES +!! FOR DEVELOPPERS: in order to preserve the portability of libPAW library, +!! please consult ~abinit/src/??_libpaw/libpaw-coding-rules.txt +!! +!! SOURCE + +#include "libpaw.h" + +MODULE m_pawfgrtab + + USE_DEFS + USE_MSG_HANDLING + USE_MPI_WRAPPERS + USE_MEMORY_PROFILING + + use m_paral_atom, only : get_my_atmtab, free_my_atmtab, get_my_natom + + implicit none + + private +!!*** + +!---------------------------------------------------------------------- + + +!!****t* m_pawfgrtab/pawfgrtab_type +!! NAME +!! pawfgrtab_type +!! +!! FUNCTION +!! For PAW, various arrays giving data related to fine grid for a given atom +!! +!! SOURCE + + type,public :: pawfgrtab_type + +!Integer scalars + + integer :: cplex + ! cplex=1 if potentials/densities are real, 2 if they are complex + + integer :: expiqr_allocated + ! 1 if expiqr() is allocated (and computed) + + integer :: itypat + ! itypat=type of the atom + + integer :: l_size + ! 1+maximum value of l leading to non zero Gaunt coeffs + ! for the considered atom type + + integer :: gylm_allocated + ! 1 if gylm() is allocated (and computed) + + integer :: gylmgr_allocated + ! 1 if gylmgr() is allocated (and computed) + + integer :: gylmgr2_allocated + ! 1 if gylmgr2() is allocated (and computed) + + integer :: nfgd + ! Number of Fine rectangular GriD points + ! in the paw sphere around considered atom + + integer :: nhatfr_allocated + ! 1 if nhatfr() is allocated (and computed) + + integer :: nhatfrgr_allocated + ! 1 if nhatfrgr() is allocated (and computed) + + integer :: nspden + ! Number of spin-density components + + integer :: rfgd_allocated + ! 1 if rfgd() is allocated (and computed) + +!Integer arrays + !integer :: ngfftf(18) + ! Info on the dense FFT mesh. + + integer, allocatable :: ifftsph(:) + ! ifftsph(nfgd) + ! Array giving the FFT index (fine grid) of a point in the paw + ! sphere around considered atom (ifftsph=ix+n1*(iy-1+n2*(iz-1)) + +!Real (real(dp)) arrays + + real(dp), allocatable :: expiqr(:,:) + ! expiqr(2,nfgd) + ! Gives exp(-i.q.r) on the fine rectangular grid + ! where q is the phonons wavevector + + real(dp), allocatable :: gylm(:,:) + ! gylm(nfgd,l_size*l_size) + ! Gives g_l(r)*Y_lm(r) on the fine rectangular grid + ! around considered atom + + real(dp), allocatable :: gylmgr(:,:,:) + ! gylmgr(3,nfgd,l_size*l_size) + ! Gives the gradient of g_l(r)*Y_lm(r) wrt cart. coordinates + ! on the fine rectangular grid around considered atom + + real(dp), allocatable :: gylmgr2(:,:,:) + ! gylmgr(6,nfgd,l_size*l_size) + ! Gives the second gradient of g_l(r)*Y_lm(r) wrt cart. coordinates + ! on the fine rectangular grid around considered atom + + real(dp), allocatable :: nhatfr(:,:) + ! nhatfr(nfgd,nspden) + ! Gives the "frozen part" of 1st-order compensation charge density + ! on the fine rectangular grid around considered atom + ! Only used in response function calculations + + real(dp), allocatable :: nhatfrgr(:,:,:) + ! nhatfrgr(3,nfgd,nspden) + ! Gives the gradients (wrt cart. coordinates) + ! of "frozen part" of 1st-order compensation charge density + ! on the fine rectangular grid around considered atom + ! Only used in response function calculations + + real(dp), allocatable :: rfgd(:,:) + ! r(3,nfgd) + ! Gives all R vectors (r-r_atom) on the Fine rectangular GriD + ! around considered atom in Cartesian coordinates. + + end type pawfgrtab_type + +!public procedures. + public :: pawfgrtab_init ! Constructor + public :: pawfgrtab_free ! Free memory + public :: pawfgrtab_nullify + public :: pawfgrtab_copy ! Copy the object + public :: pawfgrtab_print ! Print the content of the object. + public :: pawfgrtab_gather ! MPI gather + public :: pawfgrtab_redistribute ! MPI redistribution + +!private procedures. + private :: pawfgrtab_isendreceive_getbuffer + private :: pawfgrtab_isendreceive_fillbuffer +!!*** + +CONTAINS + +!=========================================================== +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawfgrtab/pawfgrtab_init +!! NAME +!! pawfgrtab_init +!! +!! FUNCTION +!! Initialize a pawfgrtab datastructure +!! +!! OUTPUT +!! Pawfgrtab(natom) =atomic data given on fine rectangular grid +!! +!! SOURCE + +subroutine pawfgrtab_init(Pawfgrtab,cplex,l_size_atm,nspden,typat,& +& mpi_atmtab,comm_atom) ! optional arguments (parallelism) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: cplex,nspden +!arrays + integer,intent(in) :: l_size_atm(:),typat(:) + integer,optional,intent(in) :: comm_atom + integer,optional,target,intent(in) :: mpi_atmtab(:) + type(Pawfgrtab_type),intent(inout) :: Pawfgrtab(:) + +!Local variables------------------------------- +!scalars + integer :: iat,iatom_tot,my_comm_atom,my_natom,natom + logical :: my_atmtab_allocated,paral_atom + character(len=500) :: msg +!arrays + integer,pointer :: my_atmtab(:) + +! ************************************************************************* + +!@Pawfgrtab_type + + my_natom=SIZE(Pawfgrtab);if (my_natom==0) return + natom=SIZE(typat) + if (my_natom/=SIZE(l_size_atm)) then + msg='Sizes of assumed shape arrays do not match' + LIBPAW_BUG(msg) + end if + +!Set up parallelism over atoms + paral_atom=(present(comm_atom).and.(my_natom/=natom)) + nullify(my_atmtab);if (present(mpi_atmtab)) my_atmtab => mpi_atmtab + my_comm_atom=xmpi_comm_self;if (present(comm_atom)) my_comm_atom=comm_atom + call get_my_atmtab(my_comm_atom,my_atmtab,my_atmtab_allocated,paral_atom,natom,my_natom_ref=my_natom) + + call pawfgrtab_nullify(Pawfgrtab) + + do iat=1,my_natom + iatom_tot=iat; if (paral_atom) iatom_tot=my_atmtab(iat) + + Pawfgrtab(iat)%cplex = cplex + Pawfgrtab(iat)%itypat = typat(iatom_tot) + Pawfgrtab(iat)%nspden = nspden + Pawfgrtab(iat)%l_size = l_size_atm(iat) + Pawfgrtab(iat)%nfgd = 0 + LIBPAW_ALLOCATE(Pawfgrtab(iat)%ifftsph,(0)) + Pawfgrtab(iat)%gylm_allocated = 0 + LIBPAW_ALLOCATE(Pawfgrtab(iat)%gylm,(0,0)) + Pawfgrtab(iat)%gylmgr_allocated = 0 + LIBPAW_ALLOCATE(Pawfgrtab(iat)%gylmgr,(0,0,0)) + Pawfgrtab(iat)%gylmgr2_allocated = 0 + LIBPAW_ALLOCATE(Pawfgrtab(iat)%gylmgr2,(0,0,0)) + Pawfgrtab(iat)%nhatfr_allocated = 0 + LIBPAW_ALLOCATE(Pawfgrtab(iat)%nhatfr,(0,0)) + Pawfgrtab(iat)%nhatfrgr_allocated = 0 + LIBPAW_ALLOCATE(Pawfgrtab(iat)%nhatfrgr,(0,0,0)) + Pawfgrtab(iat)%rfgd_allocated = 0 + LIBPAW_ALLOCATE(Pawfgrtab(iat)%rfgd,(0,0)) + Pawfgrtab(iat)%expiqr_allocated = 0 + LIBPAW_ALLOCATE(Pawfgrtab(iat)%expiqr,(0,0)) + end do + +!Destroy atom table used for parallelism + call free_my_atmtab(my_atmtab,my_atmtab_allocated) + +end subroutine pawfgrtab_init +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawfgrtab/pawfgrtab_free +!! NAME +!! pawfgrtab_free +!! +!! FUNCTION +!! Free all dynamic memory stored in a pawfgrtab datastructure +!! +!! SIDE EFFECTS +!! Pawfgrtab(natom) =atomic data given on fine rectangular grid +!! +!! SOURCE + +subroutine pawfgrtab_free(Pawfgrtab) + +!Arguments ------------------------------------ +!arrays + type(Pawfgrtab_type),intent(inout) :: Pawfgrtab(:) + +!Local variables------------------------------- +!scalars + integer :: iat,natom + +! ************************************************************************* + +!@Pawfgrtab_type + + natom=SIZE(Pawfgrtab);if (natom==0) return + do iat=1,natom + if (allocated(Pawfgrtab(iat)%ifftsph)) then + LIBPAW_DEALLOCATE(Pawfgrtab(iat)%ifftsph) + end if + if (allocated(Pawfgrtab(iat)%gylm )) then + LIBPAW_DEALLOCATE(Pawfgrtab(iat)%gylm) + end if + if (allocated(Pawfgrtab(iat)%gylmgr )) then + LIBPAW_DEALLOCATE(Pawfgrtab(iat)%gylmgr) + end if + if (allocated(Pawfgrtab(iat)%gylmgr2)) then + LIBPAW_DEALLOCATE(Pawfgrtab(iat)%gylmgr2) + end if + if (allocated(Pawfgrtab(iat)%nhatfr )) then + LIBPAW_DEALLOCATE(Pawfgrtab(iat)%nhatfr) + end if + if (allocated(Pawfgrtab(iat)%nhatfrgr)) then + LIBPAW_DEALLOCATE(Pawfgrtab(iat)%nhatfrgr) + end if + if (allocated(Pawfgrtab(iat)%rfgd )) then + LIBPAW_DEALLOCATE(Pawfgrtab(iat)%rfgd) + end if + if (allocated(Pawfgrtab(iat)%expiqr)) then + LIBPAW_DEALLOCATE(Pawfgrtab(iat)%expiqr) + end if + Pawfgrtab(iat)%gylm_allocated=0 + Pawfgrtab(iat)%gylmgr_allocated=0 + Pawfgrtab(iat)%gylmgr2_allocated=0 + Pawfgrtab(iat)%nhatfr_allocated=0 + Pawfgrtab(iat)%nhatfrgr_allocated=0 + Pawfgrtab(iat)%rfgd_allocated=0 + Pawfgrtab(iat)%expiqr_allocated=0 + end do + +end subroutine pawfgrtab_free +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawfgrtab/pawfgrtab_nullify +!! NAME +!! pawfgrtab_nullify +!! +!! FUNCTION +!! Nullify the pointers in a pawfgrtab datastructure +!! +!! SIDE EFFECTS +!! Pawfgrtab(:) =atomic data given on fine rectangular grid +!! +!! SOURCE + +subroutine pawfgrtab_nullify(Pawfgrtab) + +!Arguments ------------------------------------ +!arrays + type(Pawfgrtab_type),intent(inout) :: Pawfgrtab(:) + +!Local variables------------------------------- +!scalars + integer :: iat,natom + +! ************************************************************************* + +!@Pawfgrtab_type + +! MGPAW: This one could be removed/renamed, +! variables can be initialized in the datatype declaration +! Do we need to expose this in the public API? + + natom=SIZE(Pawfgrtab);if (natom==0) return + do iat=1,natom + Pawfgrtab(iat)%nfgd = 0 + Pawfgrtab(iat)%gylm_allocated = 0 + Pawfgrtab(iat)%gylmgr_allocated = 0 + Pawfgrtab(iat)%gylmgr2_allocated = 0 + Pawfgrtab(iat)%nhatfr_allocated = 0 + Pawfgrtab(iat)%nhatfrgr_allocated= 0 + Pawfgrtab(iat)%rfgd_allocated = 0 + Pawfgrtab(iat)%expiqr_allocated = 0 + end do + +end subroutine pawfgrtab_nullify +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawfgrtab/pawfgrtab_copy +!! NAME +!! pawfgrtab_copy +!! +!! FUNCTION +!! Copy one pawfgrtab datastructure into another +!! Can take into accound changes of dimensions +!! Can copy a shared pawfgrtab into distributed ones (when parallelism is activated) +!! +!! INPUTS +!! mpi_atmtab(:)=--optional-- indexes of the atoms treated by current proc +!! comm_atom=--optional-- MPI communicator over atoms +!! pawfgrtab_in(:)= input paw_an datastructure +!! +!! SIDE EFFECTS +!! pawfgrtab_copy(:)= output pawfgrtab datastructure +!! +!! NOTES +!! paw_fgrtab_copy must have been allocated in the calling function. +!! +!! SOURCE + +subroutine pawfgrtab_copy(pawfgrtab_in,pawfgrtab_cp, & +& mpi_atmtab,comm_atom) ! optional arguments + +!Arguments ------------------------------------ +!scalars +integer,optional,intent(in) :: comm_atom +!arrays + integer,optional,target,intent(in) :: mpi_atmtab(:) + type(Pawfgrtab_type),intent(in) :: pawfgrtab_in(:) + type(Pawfgrtab_type),intent(inout),target :: pawfgrtab_cp(:) + +!Local variables------------------------------- +!scalars + integer :: ij,ij1,istat,l_size,l_size2,my_comm_atom,my_natom,nfgd,nspden,paral_case + integer :: siz_in, siz_max, siz_out + logical :: my_atmtab_allocated,paral_atom + character(len=500) :: msg +!arrays + integer,pointer :: my_atmtab(:) + type(Pawfgrtab_type), pointer :: pawfgrtab_out(:) + +! ************************************************************************* + +!@Pawfgrtab_type + +!Retrieve sizes + siz_in=size(pawfgrtab_in);siz_out=size(pawfgrtab_cp) + +!Set up parallelism over atoms + paral_atom=(present(comm_atom));if (paral_atom) paral_atom=(xmpi_comm_size(comm_atom)>1) + nullify(my_atmtab);if (present(mpi_atmtab)) my_atmtab => mpi_atmtab + my_comm_atom=xmpi_comm_self;if (present(comm_atom)) my_comm_atom=comm_atom + my_atmtab_allocated=.false. + +!Determine in which case we are (parallelism, ...) +!No parallelism: a single copy operation + paral_case=0;siz_max=siz_in + pawfgrtab_out => pawfgrtab_cp + if (paral_atom) then + if (siz_out pawfgrtab_cp + else + msg=' siz_out should be equal to my_natom !' + LIBPAW_BUG(msg) + end if + else ! Parallelism: the copy operation is a gather + call get_my_natom(my_comm_atom,my_natom,siz_out) + if (my_natom==siz_in) then + paral_case=2;siz_max=siz_in + else + msg=' siz_in should be equal to my_natom !' + LIBPAW_BUG(msg) + end if + end if + end if + +!First case: a simple copy or a scatter + if (siz_max > 0 .and. ((paral_case== 0).or.(paral_case==1))) then + call pawfgrtab_nullify(pawfgrtab_out) + +! Loop on pawfgrtab components + do ij1=1,siz_max + ij=ij1; if (paral_case==1)ij=my_atmtab(ij1) + + pawfgrtab_out(ij1)%cplex=pawfgrtab_in(ij)%cplex + pawfgrtab_out(ij1)%expiqr_allocated=pawfgrtab_in(ij)%expiqr_allocated + pawfgrtab_out(ij1)%itypat=pawfgrtab_in(ij)%itypat + l_size=pawfgrtab_in(ij)%l_size + l_size2=l_size*l_size + pawfgrtab_out(ij1)%l_size=l_size + pawfgrtab_out(ij1)%gylm_allocated=pawfgrtab_in(ij)%gylm_allocated + pawfgrtab_out(ij1)%gylmgr_allocated=pawfgrtab_in(ij)%gylmgr_allocated + pawfgrtab_out(ij1)%gylmgr2_allocated=pawfgrtab_in(ij)%gylmgr2_allocated + pawfgrtab_out(ij1)%nfgd=pawfgrtab_in(ij)%nfgd + pawfgrtab_out(ij1)%nhatfr_allocated=pawfgrtab_in(ij)%nhatfr_allocated + pawfgrtab_out(ij1)%nhatfrgr_allocated=pawfgrtab_in(ij)%nhatfrgr_allocated + nspden=pawfgrtab_in(ij)%nspden + pawfgrtab_out(ij1)%nspden=nspden + pawfgrtab_out(ij1)%rfgd_allocated=pawfgrtab_in(ij)%rfgd_allocated + nfgd=pawfgrtab_in(ij)%nfgd + LIBPAW_ALLOCATE(pawfgrtab_out(ij1)%ifftsph,(nfgd)) + pawfgrtab_out(ij1)%ifftsph(:)=pawfgrtab_in(ij)%ifftsph(:) + if (pawfgrtab_out(ij1)%expiqr_allocated>0) then + LIBPAW_ALLOCATE(pawfgrtab_out(ij1)%expiqr,(2,nfgd)) + pawfgrtab_out(ij1)%expiqr(:,:)=pawfgrtab_in(ij)%expiqr(:,:) + end if + if (pawfgrtab_out(ij1)%gylm_allocated>0) then + LIBPAW_ALLOCATE(pawfgrtab_out(ij1)%gylm,(nfgd,l_size2)) + pawfgrtab_out(ij1)%gylm(:,:)=pawfgrtab_in(ij)%gylm(:,:) + end if + if (pawfgrtab_out(ij1)%gylmgr_allocated>0) then + LIBPAW_ALLOCATE(pawfgrtab_out(ij1)%gylmgr,(3,nfgd,l_size2)) + pawfgrtab_out(ij1)%gylmgr(:,:,:)=pawfgrtab_in(ij)%gylmgr(:,:,:) + end if + if (pawfgrtab_out(ij1)%gylmgr2_allocated>0) then + LIBPAW_ALLOCATE(pawfgrtab_out(ij1)%gylmgr2,(6,nfgd,l_size2)) + pawfgrtab_out(ij1)%gylmgr2(:,:,:)=pawfgrtab_in(ij)%gylmgr2(:,:,:) + end if + if (pawfgrtab_out(ij1)%nhatfrgr_allocated>0) then + LIBPAW_ALLOCATE(pawfgrtab_out(ij1)%nhatfrgr,(3,nfgd,nspden)) + pawfgrtab_out(ij1)%nhatfrgr(:,:,:)=pawfgrtab_in(ij)%nhatfrgr(:,:,:) + end if + if (pawfgrtab_out(ij1)%rfgd_allocated>0) then + LIBPAW_ALLOCATE(pawfgrtab_out(ij1)%rfgd,(3,nfgd)) + pawfgrtab_out(ij1)%rfgd(:,:)=pawfgrtab_in(ij)%rfgd(:,:) + end if + + end do + end if + +!Second case: a gather + if (paral_case==2) then + call pawfgrtab_gather(pawfgrtab_in,pawfgrtab_cp,my_comm_atom,istat,my_atmtab) + end if + +!Destroy atom table used for parallelism + call free_my_atmtab(my_atmtab,my_atmtab_allocated) + +end subroutine pawfgrtab_copy +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawfgrtab/pawfgrtab_print +!! NAME +!! pawfgrtab_print +!! +!! FUNCTION +!! Reports basic info on the pawfgrtab datatype. +!! +!! INPUTS +!! Pawfgrtab=The datatype to be printed +!! [mode_paral]=either "COLL" or "PERS", "COLL" if None. +!! [unit]=Unit number for output, std_out if None. +!! [prtvol]=Verbosity level, lowest if None. +!! [mpi_atmtab(:)]=indexes of the atoms treated by current proc +!! [comm_atom]=MPI communicator over atoms +!! [natom]=total number of atom (needed if parallelism over atoms is activated) +!! if Pawfgrtab is distributed, natom is different from size(Pawfgrtab). +!! +!! OUTPUT +!! (only writing) +!! +!! SOURCE + +subroutine pawfgrtab_print(Pawfgrtab,natom,unit,prtvol,mode_paral,mpi_atmtab,comm_atom) + +!Arguments ------------------------------------ +!scalars + integer,optional,intent(in) :: comm_atom,natom,prtvol,unit + character(len=4),optional,intent(in) :: mode_paral +!arrays + type(Pawfgrtab_type),intent(inout) :: Pawfgrtab(:) + integer,optional,target,intent(in) :: mpi_atmtab(:) + +!Local variables------------------------------- +!scalars + integer :: iat,iatom_tot,my_comm_atom,my_natom,my_unt,my_prtvol,size_Pawfgrtab + logical :: my_atmtab_allocated,paral_atom + character(len=4) :: my_mode + character(len=500) :: msg +!arrays + integer,pointer :: my_atmtab(:) + +! ************************************************************************* + +!@Pawfgrtab_type + + size_Pawfgrtab=SIZE(Pawfgrtab);if (size_Pawfgrtab==0) return + + my_prtvol=0 ; if (PRESENT(prtvol )) my_prtvol=prtvol + my_unt =std_out; if (PRESENT(unit )) my_unt =unit + my_mode ='PERS' ; if (PRESENT(mode_paral)) my_mode =mode_paral + my_natom=size_Pawfgrtab; if (PRESENT(natom)) my_natom=natom + +!Set up parallelism over atoms + paral_atom=(present(comm_atom).and.my_natom/=size_Pawfgrtab) + nullify(my_atmtab);if (present(mpi_atmtab)) my_atmtab => mpi_atmtab + my_comm_atom=xmpi_comm_self;if (present(comm_atom)) my_comm_atom=comm_atom + call get_my_atmtab(my_comm_atom,my_atmtab,my_atmtab_allocated,paral_atom,& +& my_natom,my_natom_ref=size_Pawfgrtab) + + write(msg,'(3a)')ch10,' === Content of the pawfgrtab datatype === ',ch10 + call wrtout(my_unt,msg,my_mode) + do iat=1,my_natom + iatom_tot=iat;if(paral_atom) iatom_tot=my_atmtab(iat) + + write(msg,'(6(2a,i0))')ch10,& +& ' > For atom number : ',iatom_tot,ch10,& +& ' cplex= ',Pawfgrtab(iat)%cplex,ch10,& +& ' # of spins components for density= ',Pawfgrtab(iat)%nspden,ch10,& +& ' Type of atom= ',Pawfgrtab(iat)%itypat,ch10,& +& ' 1+ Max l in Gaunt coefficients= ',Pawfgrtab(iat)%l_size,ch10,& +& ' Number of fine FFT points in PAW sphere= ',Pawfgrtab(iat)%nfgd + call wrtout(my_unt,msg,my_mode) + + if (my_prtvol>=3) then + write(msg,'(a,7(a,i2,a))')ch10,& +& ' rfgd_allocated : ',Pawfgrtab(iat)%rfgd_allocated,ch10,& +& ' gylm_allocated : ',Pawfgrtab(iat)%gylm_allocated,ch10,& +& ' gylmgr_allocated : ',Pawfgrtab(iat)%gylmgr_allocated,ch10,& +& ' gylmgr2_allocated : ',Pawfgrtab(iat)%gylmgr2_allocated,ch10,& +& ' nhatgr_allocated : ',Pawfgrtab(iat)%nhatfr_allocated,ch10,& +& ' nhatfrgr_allocated: ',Pawfgrtab(iat)%nhatfrgr_allocated,ch10,& +& ' expiqr_allocated : ',Pawfgrtab(iat)%expiqr_allocated,ch10 + call wrtout(my_unt,msg,my_mode) + + end if + +! These huge arrays are not printed out! +! Pawfgrtab(iat)%ifftsph +! Pawfgrtab(iat)%rfgd +! Pawfgrtab(iat)%gylm +! Pawfgrtab(iat)%gylmgr +! Pawfgrtab(iat)%gylmgr2 +! Pawfgrtab(ia)%nhatfr +! Pawfgrtab(ia)%nhatfrgr +! Pawfgrtab(ia)%expiqr + end do + +!Destroy atom table + call free_my_atmtab(my_atmtab,my_atmtab_allocated) + +end subroutine pawfgrtab_print +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawfgrtab/pawfgrtab_gather +!! NAME +!! pawfgrtab_gather +!! +!! FUNCTION +!! gather a pawfgrtab +!! istat =1 if pawfgrtab is yet gathered +!! +!! INPUTS +!! mpi_atmtab(:)=--optional-- indexes of the atoms treated by current proc +!! mpicomm=MPI communicator +!! pawfgrtab(:) = pawfgrtab to be gathered +!! +!! OUTPUT +!! istat : 1 if yet gathered in that case, pawfgrtab_gathered contains nothing +!! pawfgrtab_gathered : pawfgrtab gathered between comm_atom +!! +!! SOURCE + +subroutine pawfgrtab_gather(pawfgrtab,pawfgrtab_gathered,comm_atom,istat, & +& mpi_atmtab) ! optional argument + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: comm_atom + integer, intent(out) :: istat +!arrays + integer,optional,target,intent(in) :: mpi_atmtab(:) + type(pawfgrtab_type),intent(in) :: pawfgrtab(:) + type(pawfgrtab_type),intent(inout) :: pawfgrtab_gathered(:) + +!Local variables------------------------------- +!scalars + integer :: buf_int_size,buf_int_size_all,buf_dp_size,buf_dp_size_all,i1,i2,iat,iatot + integer :: ierr,ij,indx_int,indx_dp,l_size,l_size2,my_natom,natom,nfgd,nproc_atom,nspden + logical :: my_atmtab_allocated,paral_atom + character(len=500) :: msg +!arrays + integer :: bufsz(2) + integer,allocatable :: buf_int(:),buf_int_all(:) + integer,allocatable :: count_dp(:),count_int(:),count_tot(:),displ_dp(:),displ_int(:) + integer,pointer :: my_atmtab(:) + real(dp),allocatable :: buf_dp(:),buf_dp_all(:) + +! ************************************************************************* + +!@Pawfgrtab_type + + istat=0 + my_natom=size(pawfgrtab);natom=size(pawfgrtab_gathered) + +!Set up parallelism over atoms + paral_atom=(my_natom/=natom) + nullify(my_atmtab);if (present(mpi_atmtab)) my_atmtab => mpi_atmtab + my_atmtab_allocated = .False. + if (paral_atom) then + call get_my_atmtab(comm_atom,my_atmtab,my_atmtab_allocated,paral_atom,natom,my_natom_ref=my_natom) + end if + nproc_atom=xmpi_comm_size(comm_atom) + +!Without parallelism, just copy input to output + if (.not.paral_atom) then + istat=1;return + end if + +!Compute size of buffers + buf_int_size=0 + do iat=1,my_natom + buf_int_size=buf_int_size+pawfgrtab(iat)%nfgd+13 + end do + buf_dp_size=0 + do iat=1,my_natom + if (pawfgrtab(iat)%expiqr_allocated>0) then + buf_dp_size=buf_dp_size + size(pawfgrtab(iat)%expiqr(:,:)) + end if + if (pawfgrtab(iat)%gylm_allocated>0) then + buf_dp_size=buf_dp_size+size(pawfgrtab(iat)%gylm(:,:)) + end if + if (pawfgrtab(iat)%gylmgr_allocated>0) then + buf_dp_size=buf_dp_size+size(pawfgrtab(iat)%gylmgr(:,:,:)) + end if + if (pawfgrtab(iat)%gylmgr2_allocated>0) then + buf_dp_size=buf_dp_size+size(pawfgrtab(iat)%gylmgr2(:,:,:)) + end if + if (pawfgrtab(iat)%nhatfr_allocated>0) then + buf_dp_size=buf_dp_size+size(pawfgrtab(iat)%nhatfr(:,:)) + end if + if (pawfgrtab(iat)%nhatfrgr_allocated>0) then + buf_dp_size=buf_dp_size+size(pawfgrtab(iat)%nhatfrgr(:,:,:)) + end if + if (pawfgrtab(iat)%rfgd_allocated>0) then + buf_dp_size=buf_dp_size+size(pawfgrtab(iat)%rfgd(:,:)) + end if + end do + +!Fill in input buffers + LIBPAW_ALLOCATE(buf_int,(buf_int_size)) + LIBPAW_ALLOCATE(buf_dp,(buf_dp_size)) + indx_int=1;indx_dp=1 + do iat=1,my_natom + l_size=pawfgrtab(iat)%l_size + nfgd=pawfgrtab(iat)%nfgd + nspden=pawfgrtab(iat)%nspden + buf_int(indx_int)=my_atmtab(iat); indx_int=indx_int+1; + buf_int(indx_int)=pawfgrtab(iat)%cplex; indx_int=indx_int+1; + buf_int(indx_int)=pawfgrtab(iat)%itypat; indx_int=indx_int+1; + buf_int(indx_int)=pawfgrtab(iat)%expiqr_allocated; indx_int=indx_int+1; + buf_int(indx_int)=pawfgrtab(iat)%l_size; indx_int=indx_int+1; + buf_int(indx_int)=pawfgrtab(iat)%gylm_allocated; indx_int=indx_int+1; + buf_int(indx_int)=pawfgrtab(iat)%gylmgr_allocated; indx_int=indx_int+1; + buf_int(indx_int)=pawfgrtab(iat)%gylmgr2_allocated; indx_int=indx_int+1; + buf_int(indx_int)=pawfgrtab(iat)%nfgd; indx_int=indx_int+1; + buf_int(indx_int)=pawfgrtab(iat)%nhatfr_allocated; indx_int=indx_int+1; + buf_int(indx_int)=pawfgrtab(iat)%nhatfrgr_allocated; indx_int=indx_int+1; + buf_int(indx_int)=pawfgrtab(iat)%nspden; indx_int=indx_int+1; + buf_int(indx_int)=pawfgrtab(iat)%rfgd_allocated; indx_int=indx_int+1; + if (nfgd>0) then + buf_int(indx_int:indx_int+nfgd-1)=pawfgrtab(iat)%ifftsph(1:nfgd) + indx_int=indx_int+nfgd; + end if + if (pawfgrtab(iat)%expiqr_allocated>0) then + do i1=1,nfgd + buf_dp(indx_dp:indx_dp+1)=pawfgrtab(iat)%expiqr(1:2,i1) + indx_dp=indx_dp+2 + end do + end if + l_size2=l_size*l_size + if (pawfgrtab(iat)%gylm_allocated>0) then + do i1=1,l_size2 + buf_dp(indx_dp:indx_dp+nfgd-1)=pawfgrtab(iat)%gylm(1:nfgd,i1) + indx_dp=indx_dp+nfgd + end do + end if + if (pawfgrtab(iat)%gylmgr_allocated>0) then + do i1=1,l_size2 + do i2=1,nfgd + buf_dp(indx_dp:indx_dp+2)=pawfgrtab(iat)%gylmgr(1:3,i2,i1) + indx_dp=indx_dp+3 + end do + end do + end if + if (pawfgrtab(iat)%gylmgr2_allocated>0) then + do i1=1,l_size2 + do i2=1,nfgd + buf_dp(indx_dp:indx_dp+5)=pawfgrtab(iat)%gylmgr2(1:6,i2,i1) + indx_dp=indx_dp+6 + end do + end do + end if + if (pawfgrtab(iat)%nhatfr_allocated>0) then + do i1=1,nspden + buf_dp(indx_dp:indx_dp+nfgd-1)=pawfgrtab(iat)%nhatfr(1:nfgd,i1) + indx_dp=indx_dp+nfgd + end do + end if + if (pawfgrtab(iat)%nhatfrgr_allocated>0) then + do i1=1,nspden + do i2=1,nfgd + buf_dp(indx_dp:indx_dp+2)=pawfgrtab(iat)%nhatfrgr(1:3,i2,i1) + indx_dp=indx_dp+3 + end do + end do + end if + if (pawfgrtab(iat)%rfgd_allocated>0) then + do i1=1,nfgd + buf_dp(indx_dp:indx_dp+2)=pawfgrtab(iat)%rfgd(1:3,i1) + indx_dp=indx_dp+3 + end do + end if + end do + if (indx_int/=1+buf_int_size) then + msg='Error (1) in pawfgrtab_gather: wrong buffer sizes !' + LIBPAW_BUG(msg) + end if + if (indx_dp/=1+buf_dp_size) then + msg='Error (2) in pawfgrtab_gather: wrong buffer sizes !' + LIBPAW_BUG(msg) + end if + +!Communicate (1 gather for integers, 1 gather for reals) + LIBPAW_ALLOCATE(count_int,(nproc_atom)) + LIBPAW_ALLOCATE(displ_int,(nproc_atom)) + LIBPAW_ALLOCATE(count_dp ,(nproc_atom)) + LIBPAW_ALLOCATE(displ_dp ,(nproc_atom)) + LIBPAW_ALLOCATE(count_tot,(2*nproc_atom)) + bufsz(1)=buf_int_size; bufsz(2)=buf_dp_size + call xmpi_allgather(bufsz,2,count_tot,comm_atom,ierr) + do ij=1,nproc_atom + count_int(ij)=count_tot(2*ij-1) + count_dp (ij)=count_tot(2*ij) + end do + displ_int(1)=0;displ_dp(1)=0 + do ij=2,nproc_atom + displ_int(ij)=displ_int(ij-1)+count_int(ij-1) + displ_dp (ij)=displ_dp (ij-1)+count_dp (ij-1) + end do + buf_int_size_all=sum(count_int) + buf_dp_size_all =sum(count_dp) + LIBPAW_DEALLOCATE(count_tot) + LIBPAW_ALLOCATE(buf_int_all,(buf_int_size_all)) + LIBPAW_ALLOCATE(buf_dp_all ,(buf_dp_size_all)) + call xmpi_allgatherv(buf_int,buf_int_size,buf_int_all,count_int,displ_int,comm_atom,ierr) + call xmpi_allgatherv(buf_dp ,buf_dp_size ,buf_dp_all ,count_dp ,displ_dp ,comm_atom,ierr) + LIBPAW_DEALLOCATE(count_int) + LIBPAW_DEALLOCATE(displ_int) + LIBPAW_DEALLOCATE(count_dp) + LIBPAW_DEALLOCATE(displ_dp) + +!Retrieve output datastructures + indx_int=1; indx_dp=1 + call pawfgrtab_free(pawfgrtab_gathered) + call pawfgrtab_nullify(pawfgrtab_gathered) + do iat=1,natom + iatot=buf_int_all(indx_int); indx_int=indx_int+1 + pawfgrtab_gathered(iatot)%cplex=buf_int_all(indx_int); indx_int=indx_int+1; + pawfgrtab_gathered(iatot)%itypat=buf_int_all(indx_int); indx_int=indx_int+1; + pawfgrtab_gathered(iatot)%expiqr_allocated=buf_int_all(indx_int); indx_int=indx_int+1; + pawfgrtab_gathered(iatot)%l_size=buf_int_all(indx_int); indx_int=indx_int+1; + pawfgrtab_gathered(iatot)%gylm_allocated=buf_int_all(indx_int); indx_int=indx_int+1; + pawfgrtab_gathered(iatot)%gylmgr_allocated=buf_int_all(indx_int); indx_int=indx_int+1; + pawfgrtab_gathered(iatot)%gylmgr2_allocated=buf_int_all(indx_int); indx_int=indx_int+1; + pawfgrtab_gathered(iatot)%nfgd=buf_int_all(indx_int); indx_int=indx_int+1; + pawfgrtab_gathered(iatot)%nhatfr_allocated=buf_int_all(indx_int); indx_int=indx_int+1; + pawfgrtab_gathered(iatot)%nhatfrgr_allocated=buf_int_all(indx_int); indx_int=indx_int+1; + pawfgrtab_gathered(iatot)%nspden=buf_int_all(indx_int); indx_int=indx_int+1; + pawfgrtab_gathered(iatot)%rfgd_allocated=buf_int_all(indx_int); indx_int=indx_int+1; + nfgd=pawfgrtab_gathered(iatot)%nfgd + l_size=pawfgrtab_gathered(iatot)%l_size + nspden= pawfgrtab_gathered(iatot)%nspden + l_size2=l_size*l_size + if (nfgd>0) then + LIBPAW_ALLOCATE(pawfgrtab_gathered(iatot)%ifftsph,(nfgd)) + pawfgrtab_gathered(iatot)%ifftsph(1:nfgd)=buf_int_all(indx_int:indx_int+nfgd-1) + indx_int=indx_int+nfgd + end if + if (pawfgrtab_gathered(iatot)%expiqr_allocated>0) then + LIBPAW_ALLOCATE(pawfgrtab_gathered(iatot)%expiqr,(2,nfgd)) + do i1=1,nfgd + pawfgrtab_gathered(iatot)%expiqr(1:2,i1)= buf_dp_all(indx_dp:indx_dp+1) + indx_dp=indx_dp+2 + end do + end if + if (pawfgrtab_gathered(iatot)%gylm_allocated>0) then + LIBPAW_ALLOCATE(pawfgrtab_gathered(iatot)%gylm,(nfgd,l_size2)) + do i1=1,l_size2 + pawfgrtab_gathered(iatot)%gylm(1:nfgd,i1)=buf_dp_all(indx_dp:indx_dp+nfgd-1) + indx_dp=indx_dp+nfgd + end do + end if + if (pawfgrtab_gathered(iatot)%gylmgr_allocated>0) then + LIBPAW_ALLOCATE(pawfgrtab_gathered(iatot)%gylmgr,(3,nfgd,l_size2)) + do i1=1,l_size2 + do i2=1,nfgd + pawfgrtab_gathered(iatot)%gylmgr(1:3,i2,i1)=buf_dp_all(indx_dp:indx_dp+2) + indx_dp=indx_dp+3 + end do + end do + end if + if (pawfgrtab_gathered(iatot)%gylmgr2_allocated>0) then + LIBPAW_ALLOCATE(pawfgrtab_gathered(iatot)%gylmgr2,(6,nfgd,l_size2)) + do i1=1,l_size2 + do i2=1,nfgd + pawfgrtab_gathered(iatot)%gylmgr2(1:6,i2,i1)=buf_dp_all(indx_dp:indx_dp+5) + indx_dp=indx_dp+6 + end do + end do + end if + if (pawfgrtab_gathered(iatot)%nhatfr_allocated>0) then + LIBPAW_ALLOCATE(pawfgrtab_gathered(iatot)%nhatfr,(nfgd,nspden)) + do i1=1,nspden + pawfgrtab_gathered(iatot)%nhatfr(1:nfgd,i1)=buf_dp_all(indx_dp:indx_dp+nfgd-1) + indx_dp=indx_dp+nfgd + end do + end if + if (pawfgrtab_gathered(iatot)%nhatfrgr_allocated>0) then + LIBPAW_ALLOCATE(pawfgrtab_gathered(iatot)%nhatfrgr,(3,nfgd,nspden)) + do i1=1,nspden + do i2=1,nfgd + pawfgrtab_gathered(iatot)%nhatfrgr(1:3,i2,i1)=buf_dp_all(indx_dp:indx_dp+2) + indx_dp=indx_dp+3 + end do + end do + end if + if (pawfgrtab_gathered(iatot)%rfgd_allocated>0) then + LIBPAW_ALLOCATE(pawfgrtab_gathered(iatot)%rfgd,(3,nfgd)) + do i1=1,nfgd + pawfgrtab_gathered(iatot)%rfgd(1:3,i1)=buf_dp_all(indx_dp:indx_dp+2) + indx_dp=indx_dp+3 + end do + end if + end do + +!Free memory + LIBPAW_DEALLOCATE(buf_int) + LIBPAW_DEALLOCATE(buf_int_all) + LIBPAW_DEALLOCATE(buf_dp) + LIBPAW_DEALLOCATE(buf_dp_all) + +!Destroy atom table + call free_my_atmtab(my_atmtab,my_atmtab_allocated) + +end subroutine pawfgrtab_gather +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawfgrtab/pawfgrtab_redistribute +!! NAME +!! pawfgrtab_redistribute +!! +!! FUNCTION +!! Redistribute an array of pawfgrtab datastructures +!! Input pawfgrtab is given on a MPI communicator +!! Output pawfgrtab is redistributed on another MPI communicator +!! +!! INPUTS +!! mpi_comm_in= input MPI (atom) communicator +!! mpi_comm_out= output MPI (atom) communicator +!! mpi_atmtab_in= --optional-- indexes of the input pawfgrtab treated by current proc +!! if not present, will be calculated in the present routine +!! mpi_atmtab_out= --optional-- indexes of the output pawfgrtab treated by current proc +!! if not present, will be calculated in the present routine +!! natom= --optional-- total number of atoms +!! ----- Optional arguments used only for asynchronous communications ----- +!! RecvAtomProc(:)= rank of processor from which I expect atom (in mpi_comm_in) +!! RecvAtomList(:)= indexes of atoms to be received by me +!! RecvAtomList(irecv) are the atoms I expect from RecvAtomProc(irecv) +!! SendAtomProc(:)= ranks of process destination of atom (in mpi_comm_in) +!! SendAtomList(:)= indexes of atoms to be sent by me +!! SendAtomList(isend) are the atoms sent to SendAtomProc(isend) + +!! OUTPUT +!! [pawfgrtab_out(:)]= --optional-- +!! if present, the redistributed datastructure does not replace +!! the input one but is delivered in pawfgrtab_out +!! if not present, input and output datastructure are the same. +!! +!! SIDE EFFECTS +!! pawfgrtab(:)= input (and eventually output) pawfgrtab datastructures +!! +!! SOURCE + +subroutine pawfgrtab_redistribute(pawfgrtab,mpi_comm_in,mpi_comm_out,& +& natom,mpi_atmtab_in,mpi_atmtab_out,pawfgrtab_out,& +& SendAtomProc,SendAtomList,RecvAtomProc,RecvAtomList) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: mpi_comm_in,mpi_comm_out + integer,optional,intent(in) :: natom +!arrays + integer,intent(in),optional,target :: mpi_atmtab_in(:),mpi_atmtab_out(:) + integer,intent(in),optional :: SendAtomProc(:),SendAtomList(:),RecvAtomProc(:),RecvAtomList(:) + type(pawfgrtab_type),allocatable,intent(inout) :: pawfgrtab(:) + type(pawfgrtab_type),pointer,optional :: pawfgrtab_out(:) + +!Local variables------------------------------- +!scalars + integer :: algo_option,iat_in,iat_out,iatom,i1,ierr,iircv,iisend,imsg,imsg1,imsg_current + integer :: iproc_rcv,iproc_send,ireq,me_exch,mpi_comm_exch,my_natom_in,my_natom_out,my_tag,natom_tot,nb_dp + integer :: nb_int,nb_msg,nbmsg_incoming,nbrecvmsg,nbsendreq,nbsend,nbsent,nbrecv,next,npawfgrtab_sent + integer :: nproc_in,nproc_out + logical :: flag,in_place,message_yet_prepared,my_atmtab_in_allocated,my_atmtab_out_allocated,paral_atom +!arrays + integer :: buf_size(3),request1(3) + integer,pointer :: my_atmtab_in(:),my_atmtab_out(:) + integer,allocatable :: atmtab_send(:),atm_indx_in(:),atm_indx_out(:),buf_int1(:),From(:),request(:) + integer,allocatable,target:: buf_int(:) + integer,pointer :: buf_ints(:) + logical,allocatable :: msg_pick(:) + real(dp),allocatable :: buf_dp1(:) + real(dp),allocatable,target :: buf_dp(:) + real(dp),pointer :: buf_dps(:) + type(coeffi1_type),target,allocatable :: tab_buf_int(:),tab_buf_atom(:) + type(coeff1_type),target,allocatable :: tab_buf_dp(:) + type(pawfgrtab_type),allocatable :: pawfgrtab_all(:) + type(pawfgrtab_type),pointer :: pawfgrtab_out1(:) + +! ************************************************************************* + +!@pawfgrtab_type + + in_place=(.not.present(pawfgrtab_out)) + my_natom_in=size(pawfgrtab) + +!If not "in_place", destroy ) then + if (.not.in_place) then + if (associated(pawfgrtab_out)) then + call pawfgrtab_free(pawfgrtab_out) + LIBPAW_DATATYPE_DEALLOCATE(pawfgrtab_out) + end if + end if + +!Special sequential case + if (mpi_comm_in==xmpi_comm_self.and.mpi_comm_out==xmpi_comm_self) then + if ((.not.in_place).and.(my_natom_in>0)) then + LIBPAW_DATATYPE_ALLOCATE(pawfgrtab_out,(my_natom_in)) + call pawfgrtab_nullify(pawfgrtab_out) + call pawfgrtab_copy(pawfgrtab,pawfgrtab_out) + end if + return + end if + +!Get total natom + if (present(natom)) then + natom_tot=natom + else + natom_tot=my_natom_in + call xmpi_sum(natom_tot,mpi_comm_in,ierr) + end if + +!Select input distribution + if (present(mpi_atmtab_in)) then + my_atmtab_in => mpi_atmtab_in + my_atmtab_in_allocated=.false. + else + call get_my_atmtab(mpi_comm_in,my_atmtab_in,my_atmtab_in_allocated,& +& paral_atom,natom_tot,my_natom_in) + end if + +!Select output distribution + if (present(mpi_atmtab_out)) then + my_natom_out=size(mpi_atmtab_out) + my_atmtab_out => mpi_atmtab_out + my_atmtab_out_allocated=.false. + else + call get_my_natom(mpi_comm_out,my_natom_out,natom_tot) + call get_my_atmtab(mpi_comm_out,my_atmtab_out,my_atmtab_out_allocated,& +& paral_atom,natom_tot) + end if + +!Select algo according to optional input arguments + algo_option=1 + if (present(SendAtomProc).and.present(SendAtomList).and.& +& present(RecvAtomProc).and.present(RecvAtomList)) algo_option=2 + + +!Brute force algorithm (allgather + scatter) +!--------------------------------------------------------- + if (algo_option==1) then + + LIBPAW_DATATYPE_ALLOCATE(pawfgrtab_all,(natom_tot)) + call pawfgrtab_nullify(pawfgrtab_all) + call pawfgrtab_copy(pawfgrtab,pawfgrtab_all,comm_atom=mpi_comm_in,mpi_atmtab=my_atmtab_in) + if (in_place) then + call pawfgrtab_free(pawfgrtab) + LIBPAW_DATATYPE_DEALLOCATE(pawfgrtab) + LIBPAW_DATATYPE_ALLOCATE(pawfgrtab,(my_natom_out)) + call pawfgrtab_nullify(pawfgrtab) + call pawfgrtab_copy(pawfgrtab_all,pawfgrtab,comm_atom=mpi_comm_out,mpi_atmtab=my_atmtab_out) + else + LIBPAW_DATATYPE_ALLOCATE(pawfgrtab_out,(my_natom_out)) + call pawfgrtab_nullify(pawfgrtab_out) + call pawfgrtab_copy(pawfgrtab_all,pawfgrtab_out,comm_atom=mpi_comm_out,mpi_atmtab=my_atmtab_out) + end if + call pawfgrtab_free(pawfgrtab_all) + LIBPAW_DATATYPE_DEALLOCATE(pawfgrtab_all) + + +!Asynchronous algorithm (asynchronous communications) +!--------------------------------------------------------- + else if (algo_option==2) then + + nbsend=size(SendAtomProc) ; nbrecv=size(RecvAtomProc) + + if (in_place) then + if (my_natom_out > 0) then + LIBPAW_DATATYPE_ALLOCATE(pawfgrtab_out1,(my_natom_out)) + call pawfgrtab_nullify(pawfgrtab_out1) + else + LIBPAW_DATATYPE_ALLOCATE(pawfgrtab_out1,(0)) + end if + else + LIBPAW_DATATYPE_ALLOCATE(pawfgrtab_out,(my_natom_out)) + call pawfgrtab_nullify(pawfgrtab_out) + pawfgrtab_out1=>pawfgrtab_out + end if + + nproc_in=xmpi_comm_size(mpi_comm_in) + nproc_out=xmpi_comm_size(mpi_comm_out) + if (nproc_in<=nproc_out) mpi_comm_exch=mpi_comm_out + if (nproc_in>nproc_out) mpi_comm_exch=mpi_comm_in + me_exch=xmpi_comm_rank(mpi_comm_exch) + +! Dimension put to the maximum to send + LIBPAW_ALLOCATE(atmtab_send,(nbsend)) + LIBPAW_ALLOCATE(atm_indx_in,(natom_tot)) + atm_indx_in=-1 + do iatom=1,my_natom_in + atm_indx_in(my_atmtab_in(iatom))=iatom + end do + LIBPAW_ALLOCATE(atm_indx_out,(natom_tot)) + atm_indx_out=-1 + do iatom=1,my_natom_out + atm_indx_out(my_atmtab_out(iatom))=iatom + end do + + LIBPAW_DATATYPE_ALLOCATE(tab_buf_int,(nbsend)) + LIBPAW_DATATYPE_ALLOCATE(tab_buf_dp,(nbsend)) + LIBPAW_DATATYPE_ALLOCATE(tab_buf_atom,(nbsend)) + LIBPAW_ALLOCATE(request,(3*nbsend)) + +! A send buffer in an asynchrone communication couldn't be deallocate before it has been receive + nbsent=0 ; ireq=0 ; iisend=0 ; nbsendreq=0 ; nb_msg=0 + do iisend=1,nbsend + iproc_rcv=SendAtomProc(iisend) + next=-1 + if (iisend < nbsend) next=SendAtomProc(iisend+1) + if (iproc_rcv /= me_exch) then + nbsent=nbsent+1 + atmtab_send(nbsent)=SendAtomList(iisend) ! we groups the atoms sends to the same process + if (iproc_rcv /= next) then + if (nbsent > 0) then +! Check if message has been yet prepared + message_yet_prepared=.false. + do imsg=1,nb_msg + if (size(tab_buf_atom(imsg)%value) /= nbsent) then + cycle + else + do imsg1=1,nbsent + if (tab_buf_atom(imsg)%value(imsg1)/=atmtab_send(imsg1)) exit + message_yet_prepared=.true. + imsg_current=imsg + end do + end if + enddo +! Create the message + if (.not.message_yet_prepared) then + nb_msg=nb_msg+1 + call pawfgrtab_isendreceive_fillbuffer( & +& pawfgrtab,atmtab_send,atm_indx_in,nbsent,buf_int,nb_int,buf_dp,nb_dp) + LIBPAW_ALLOCATE(tab_buf_int(nb_msg)%value,(nb_int)) + LIBPAW_ALLOCATE(tab_buf_dp(nb_msg)%value,(nb_dp)) + tab_buf_int(nb_msg)%value(1:nb_int)=buf_int(1:nb_int) + tab_buf_dp(nb_msg)%value(1:nb_dp)=buf_dp(1:nb_dp) + LIBPAW_DEALLOCATE(buf_int) + LIBPAW_DEALLOCATE(buf_dp) + LIBPAW_ALLOCATE(tab_buf_atom(nb_msg)%value, (nbsent)) + tab_buf_atom(nb_msg)%value(1:nbsent)=atmtab_send(1:nbsent) + imsg_current=nb_msg + end if +! Communicate + buf_size(1)=size(tab_buf_int(imsg_current)%value) + buf_size(2)=size(tab_buf_dp(imsg_current)%value) + buf_size(3)=nbsent + buf_ints=>tab_buf_int(imsg_current)%value + buf_dps=>tab_buf_dp(imsg_current)%value + my_tag=400 + ireq=ireq+1 + call xmpi_isend(buf_size,iproc_rcv,my_tag,mpi_comm_exch,request(ireq),ierr) + my_tag=401 + ireq=ireq+1 + call xmpi_isend(buf_ints,iproc_rcv,my_tag,mpi_comm_exch,request(ireq),ierr) + my_tag=402 + ireq=ireq+1 + call xmpi_isend(buf_dps,iproc_rcv,my_tag,mpi_comm_exch,request(ireq),ierr) + nbsendreq=ireq + nbsent=0 + end if + end if + else ! Just a renumbering, not a sending + iat_in=atm_indx_in(SendAtomList(iisend)) + iat_out=atm_indx_out(my_atmtab_in(iat_in)) + call pawfgrtab_copy(pawfgrtab(iat_in:iat_in),pawfgrtab_out1(iat_out:iat_out)) + nbsent=0 + end if + end do + + LIBPAW_ALLOCATE(From,(nbrecv)) + From(:)=-1 ; nbrecvmsg=0 + do iircv=1,nbrecv + iproc_send=RecvAtomProc(iircv) !receive from (RcvAtomProc is sorted by growing process) + next=-1 + if (iircv < nbrecv) next=RecvAtomProc(iircv+1) + if (iproc_send /= me_exch .and. iproc_send/=next) then + nbrecvmsg=nbrecvmsg+1 + From(nbrecvmsg)=iproc_send + end if + end do + + LIBPAW_ALLOCATE(msg_pick,(nbrecvmsg)) + msg_pick=.false. + nbmsg_incoming=nbrecvmsg + do while (nbmsg_incoming > 0) + do i1=1,nbrecvmsg + if (.not.msg_pick(i1)) then + iproc_send=From(i1) + flag=.false. + my_tag=400 + call xmpi_iprobe(iproc_send,my_tag,mpi_comm_exch,flag,ierr) + if (flag) then + msg_pick(i1)=.true. + call xmpi_irecv(buf_size,iproc_send,my_tag,mpi_comm_exch,request1(1),ierr) + call xmpi_wait(request1(1),ierr) + nb_int=buf_size(1) + nb_dp=buf_size(2) + npawfgrtab_sent=buf_size(3) + LIBPAW_ALLOCATE(buf_int1,(nb_int)) + LIBPAW_ALLOCATE(buf_dp1,(nb_dp)) + my_tag=401 + call xmpi_irecv(buf_int1,iproc_send,my_tag,mpi_comm_exch,request1(2),ierr) + my_tag=402 + call xmpi_irecv(buf_dp1,iproc_send,my_tag,mpi_comm_exch,request1(3),ierr) + call xmpi_waitall(request1(2:3),ierr) + call pawfgrtab_isendreceive_getbuffer(pawfgrtab_out1,npawfgrtab_sent,atm_indx_out, buf_int1,buf_dp1) + nbmsg_incoming=nbmsg_incoming-1 + LIBPAW_DEALLOCATE(buf_int1) + LIBPAW_DEALLOCATE(buf_dp1) + end if + end if + end do + end do + LIBPAW_DEALLOCATE(msg_pick) + + if (in_place) then + call pawfgrtab_free(pawfgrtab) + LIBPAW_DATATYPE_DEALLOCATE(pawfgrtab) + LIBPAW_DATATYPE_ALLOCATE(pawfgrtab,(my_natom_out)) + call pawfgrtab_nullify(pawfgrtab) + call pawfgrtab_copy(pawfgrtab_out1,pawfgrtab) + call pawfgrtab_free(pawfgrtab_out1) + LIBPAW_DATATYPE_DEALLOCATE(pawfgrtab_out1) + end if + +! Wait for deallocating arrays that all sending operations has been realized + if (nbsendreq > 0) then + call xmpi_waitall(request(1:nbsendreq),ierr) + end if + +! Deallocate buffers + do i1=1,nb_msg + LIBPAW_DEALLOCATE(tab_buf_int(i1)%value) + LIBPAW_DEALLOCATE(tab_buf_dp(i1)%value) + LIBPAW_DEALLOCATE(tab_buf_atom(i1)%value) + end do + LIBPAW_DATATYPE_DEALLOCATE(tab_buf_int) + LIBPAW_DATATYPE_DEALLOCATE(tab_buf_dp) + LIBPAW_DATATYPE_DEALLOCATE(tab_buf_atom) + LIBPAW_DEALLOCATE(From) + LIBPAW_DEALLOCATE(request) + LIBPAW_DEALLOCATE(atmtab_send) + LIBPAW_DEALLOCATE(atm_indx_in) + LIBPAW_DEALLOCATE(atm_indx_out) + + end if !algo_option + +!Eventually release temporary pointers + call free_my_atmtab(my_atmtab_in,my_atmtab_in_allocated) + call free_my_atmtab(my_atmtab_out,my_atmtab_out_allocated) + +end subroutine pawfgrtab_redistribute +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawfgrtab/pawfgrtab_isendreceive_getbuffer +!! NAME +!! pawfgrtab_isendreceive_getbuffer +!! +!! FUNCTION +!! Fill a pawfgrtab structure with the buffers received in a receive operation +!! This buffer should have been first extracted by a call to pawfgrtab_isendreceive_fillbuffer +!! +!! INPUTS +!! atm_indx_recv(1:total number of atoms)= array for receive operation +!! Given an index of atom in global numbering, give its index +!! in the table of atoms treated by current processor +!! or -1 if the atoms is not treated by current processor +!! buf_int= buffer of receive integers +!! buf_dp= buffer of receive double precision numbers +!! npawfgrtab_send= number of sent atoms +!! +!! OUTPUT +!! pawfgrtab= output datastructure filled with buffers receive in a receive operation +!! +!! SOURCE + +subroutine pawfgrtab_isendreceive_getbuffer(pawfgrtab,npawfgrtab_send,atm_indx_recv,buf_int,buf_dp) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: npawfgrtab_send +!arrays + integer,intent(in) ::atm_indx_recv(:),buf_int(:) + real(dp),intent(in) :: buf_dp(:) + type(pawfgrtab_type),target,intent(inout) :: pawfgrtab(:) + +!Local variables------------------------------- +!scalars + integer :: buf_dp_size,buf_int_size,i1,i2,iat,iatom_tot,ij,indx_int,indx_dp + integer :: l_size,l_size2,nfgd,nspden + character(len=500) :: msg + type(pawfgrtab_type),pointer :: pawfgrtab1 + +! ********************************************************************* + + buf_int_size=size(buf_int) + buf_dp_size=size(buf_dp) + indx_int=1; indx_dp=1 + + do ij=1,npawfgrtab_send + iatom_tot=buf_int(indx_int); indx_int=indx_int+1 + iat= atm_indx_recv(iatom_tot) + pawfgrtab1=>pawfgrtab(iat) + pawfgrtab1%cplex=buf_int(indx_int); indx_int=indx_int+1; + pawfgrtab1%itypat=buf_int(indx_int); indx_int=indx_int+1; + pawfgrtab1%expiqr_allocated=buf_int(indx_int); indx_int=indx_int+1; + pawfgrtab1%l_size=buf_int(indx_int); indx_int=indx_int+1; + pawfgrtab1%gylm_allocated=buf_int(indx_int); indx_int=indx_int+1; + pawfgrtab1%gylmgr_allocated=buf_int(indx_int); indx_int=indx_int+1; + pawfgrtab1%gylmgr2_allocated=buf_int(indx_int); indx_int=indx_int+1; + pawfgrtab1%nfgd=buf_int(indx_int); indx_int=indx_int+1; + pawfgrtab1%nhatfr_allocated=buf_int(indx_int); indx_int=indx_int+1; + pawfgrtab1%nhatfrgr_allocated=buf_int(indx_int); indx_int=indx_int+1; + pawfgrtab1%nspden=buf_int(indx_int); indx_int=indx_int+1; + pawfgrtab1%rfgd_allocated=buf_int(indx_int); indx_int=indx_int+1; + nfgd=pawfgrtab1%nfgd + l_size=pawfgrtab1%l_size + nspden= pawfgrtab1%nspden + l_size2=l_size*l_size + if (nfgd>0) then + LIBPAW_ALLOCATE(pawfgrtab1%ifftsph,(nfgd)) + pawfgrtab1%ifftsph(1:nfgd)=buf_int(indx_int:indx_int+nfgd-1) + indx_int=indx_int+nfgd + end if + if (pawfgrtab1%expiqr_allocated>0) then + LIBPAW_ALLOCATE(pawfgrtab1%expiqr,(2,nfgd)) + do i1=1,nfgd + pawfgrtab1%expiqr(1:2,i1)= buf_dp(indx_dp:indx_dp+1) + indx_dp=indx_dp+2 + end do + end if + if (pawfgrtab1%gylm_allocated>0) then + LIBPAW_ALLOCATE(pawfgrtab1%gylm,(nfgd,l_size2)) + do i1=1,l_size2 + pawfgrtab1%gylm(1:nfgd,i1)=buf_dp(indx_dp:indx_dp+nfgd-1) + indx_dp=indx_dp+nfgd + end do + end if + if (pawfgrtab1%gylmgr_allocated>0) then + LIBPAW_ALLOCATE(pawfgrtab1%gylmgr,(3,nfgd,l_size2)) + do i1=1,l_size2 + do i2=1,nfgd + pawfgrtab1%gylmgr(1:3,i2,i1)=buf_dp(indx_dp:indx_dp+2) + indx_dp=indx_dp+3 + end do + end do + end if + if (pawfgrtab1%gylmgr2_allocated>0) then + LIBPAW_ALLOCATE(pawfgrtab1%gylmgr2,(6,nfgd,l_size2)) + do i1=1,l_size2 + do i2=1,nfgd + pawfgrtab1%gylmgr2(1:6,i2,i1)=buf_dp(indx_dp:indx_dp+5) + indx_dp=indx_dp+6 + end do + end do + end if + if (pawfgrtab1%nhatfr_allocated>0) then + LIBPAW_ALLOCATE(pawfgrtab1%nhatfr,(nfgd,nspden)) + do i1=1,nspden + pawfgrtab1%nhatfr(1:nfgd,i1)=buf_dp(indx_dp:indx_dp+nfgd-1) + indx_dp=indx_dp+nfgd + end do + end if + if (pawfgrtab1%nhatfrgr_allocated>0) then + LIBPAW_ALLOCATE(pawfgrtab1%nhatfrgr,(3,nfgd,nspden)) + do i1=1,nspden + do i2=1,nfgd + pawfgrtab1%nhatfrgr(1:3,i2,i1)=buf_dp(indx_dp:indx_dp+2) + indx_dp=indx_dp+3 + end do + end do + end if + if (pawfgrtab1%rfgd_allocated>0) then + LIBPAW_ALLOCATE(pawfgrtab1%rfgd,(3,nfgd)) + do i1=1,nfgd + pawfgrtab1%rfgd(1:3,i1)=buf_dp(indx_dp:indx_dp+2) + indx_dp=indx_dp+3 + end do + end if + end do + if ((indx_int/=1+buf_int_size).or.(indx_dp/=1+buf_dp_size)) then + write(msg,'(a,i10,a,i10)') 'Wrong buffer sizes: buf_int_size=',buf_int_size,' buf_dp_size=',buf_dp_size + LIBPAW_BUG(msg) + end if + +end subroutine pawfgrtab_isendreceive_getbuffer +!!*** + +!---------------------------------------------------------------------- +!!****f* m_pawfgrtab/pawfgrtab_isendreceive_fillbuffer +!! NAME +!! pawfgrtab_isendreceive_fillbuffer +!! +!! FUNCTION +!! Extract from pawfgrtab and from the global index of atoms +!! the buffers to send in a sending operation +!! This function has to be coupled with a call to pawfgrtab_isendreceive_getbuffer +!! +!! INPUTS +!! atm_indx_send(1:total number of atoms)= array for send operation, +!! Given an index of atom in global numbering, give its index +!! in the table of atoms treated by current processor +!! or -1 if the atoms is not treated by current processor +!! npawfgrtab_send= number of sent atoms +!! pawfgrtab= data structure from which are extract buffer int and buffer dp +!! +!! OUTPUT +!! buf_int= buffer of integers to be sent +!! buf_int_size= size of buffer of integers +!! buf_dp= buffer of double precision numbers to be sent +!! buf_dp_size= size of buffer of double precision numbers +!! +!! SOURCE +!! +subroutine pawfgrtab_isendreceive_fillbuffer(pawfgrtab, atmtab_send,atm_indx_send,npawfgrtab_send,& +& buf_int,buf_int_size,buf_dp,buf_dp_size) + +!Arguments ------------------------------------ +!scalars + integer,intent(out) :: buf_int_size,buf_dp_size + integer,intent(in) :: npawfgrtab_send +!arrays + integer,intent(in) :: atmtab_send(:),atm_indx_send(:) + integer,intent(out),allocatable :: buf_int(:) + real(dp),intent(out),allocatable :: buf_dp(:) + type(pawfgrtab_type),target,intent(inout) :: pawfgrtab(:) + +!Local variables------------------------------- +!scalars + integer :: i1,i2,iat,iat1,iatom_tot,indx_int,indx_dp,l_size,l_size2,nfgd,nspden + character(len=500) :: msg + type(pawfgrtab_type),pointer :: pawfgrtab1 + +! ********************************************************************* + +!Compute size of buffers + buf_int_size=0;buf_dp_size=0 + do iat1=1,npawfgrtab_send + iatom_tot=atmtab_send(iat1) + iat=atm_indx_send(iatom_tot) + pawfgrtab1=>pawfgrtab(iat) + buf_int_size=buf_int_size+pawfgrtab1%nfgd+13 + if (pawfgrtab1%expiqr_allocated>0) then + buf_dp_size=buf_dp_size + size(pawfgrtab1%expiqr(:,:)) + end if + if (pawfgrtab1%gylm_allocated>0) then + buf_dp_size=buf_dp_size+size(pawfgrtab1%gylm(:,:)) + end if + if (pawfgrtab1%gylmgr_allocated>0) then + buf_dp_size=buf_dp_size+size(pawfgrtab1%gylmgr(:,:,:)) + end if + if (pawfgrtab1%gylmgr2_allocated>0 ) then + buf_dp_size=buf_dp_size+size(pawfgrtab1%gylmgr2(:,:,:)) + end if + if (pawfgrtab1%nhatfr_allocated>0) then + buf_dp_size=buf_dp_size+size(pawfgrtab1%nhatfr(:,:)) + end if + if (pawfgrtab1%nhatfrgr_allocated>0) then + buf_dp_size=buf_dp_size+size(pawfgrtab1%nhatfrgr(:,:,:)) + end if + if (pawfgrtab1%rfgd_allocated>0) then + buf_dp_size=buf_dp_size+size(pawfgrtab1%rfgd(:,:)) + end if + end do + +!Fill in input buffers + LIBPAW_ALLOCATE(buf_int,(buf_int_size)) + LIBPAW_ALLOCATE(buf_dp,(buf_dp_size)) + indx_int=1;indx_dp=1 + do iat1=1,npawfgrtab_send + iatom_tot=atmtab_send(iat1) + iat=atm_indx_send(iatom_tot) + pawfgrtab1=>pawfgrtab(iat) + l_size=pawfgrtab1%l_size + nfgd=pawfgrtab1%nfgd + nspden=pawfgrtab1%nspden + buf_int(indx_int)=iatom_tot; indx_int=indx_int+1; + buf_int(indx_int)=pawfgrtab1%cplex; indx_int=indx_int+1; + buf_int(indx_int)=pawfgrtab1%itypat; indx_int=indx_int+1; + buf_int(indx_int)=pawfgrtab1%expiqr_allocated; indx_int=indx_int+1; + buf_int(indx_int)=pawfgrtab1%l_size; indx_int=indx_int+1; + buf_int(indx_int)=pawfgrtab1%gylm_allocated; indx_int=indx_int+1; + buf_int(indx_int)=pawfgrtab1%gylmgr_allocated; indx_int=indx_int+1; + buf_int(indx_int)=pawfgrtab1%gylmgr2_allocated; indx_int=indx_int+1; + buf_int(indx_int)=pawfgrtab1%nfgd; indx_int=indx_int+1; + buf_int(indx_int)=pawfgrtab1%nhatfr_allocated; indx_int=indx_int+1; + buf_int(indx_int)=pawfgrtab1%nhatfrgr_allocated; indx_int=indx_int+1; + buf_int(indx_int)=pawfgrtab1%nspden; indx_int=indx_int+1; + buf_int(indx_int)=pawfgrtab1%rfgd_allocated; indx_int=indx_int+1; + if (nfgd>0) then + buf_int(indx_int:indx_int+nfgd-1)=pawfgrtab1%ifftsph(1:nfgd) + indx_int=indx_int+nfgd; + end if + if (pawfgrtab1%expiqr_allocated>0) then + do i1=1,nfgd + buf_dp(indx_dp:indx_dp+1)=pawfgrtab1%expiqr(1:2,i1) + indx_dp=indx_dp+2 + end do + end if + l_size2=l_size*l_size + if (pawfgrtab1%gylm_allocated>0) then + do i1=1,l_size2 + buf_dp(indx_dp:indx_dp+nfgd-1)=pawfgrtab1%gylm(1:nfgd,i1) + indx_dp=indx_dp+nfgd + end do + end if + if (pawfgrtab1%gylmgr_allocated>0) then + do i1=1,l_size2 + do i2=1,nfgd + buf_dp(indx_dp:indx_dp+2)=pawfgrtab1%gylmgr(1:3,i2,i1) + indx_dp=indx_dp+3 + end do + end do + end if + if (pawfgrtab1%gylmgr2_allocated>0) then + do i1=1,l_size2 + do i2=1,nfgd + buf_dp(indx_dp:indx_dp+5)=pawfgrtab1%gylmgr2(1:6,i2,i1) + indx_dp=indx_dp+6 + end do + end do + end if + if (pawfgrtab1%nhatfr_allocated>0) then + do i1=1,nspden + buf_dp(indx_dp:indx_dp+nfgd-1)=pawfgrtab1%nhatfr(1:nfgd,i1) + indx_dp=indx_dp+nfgd + end do + end if + if (pawfgrtab1%nhatfrgr_allocated>0) then + do i1=1,nspden + do i2=1,nfgd + buf_dp(indx_dp:indx_dp+2)=pawfgrtab1%nhatfrgr(1:3,i2,i1) + indx_dp=indx_dp+3 + end do + end do + end if + if (pawfgrtab1%rfgd_allocated>0) then + do i1=1,nfgd + buf_dp(indx_dp:indx_dp+2)=pawfgrtab1%rfgd(1:3,i1) + indx_dp=indx_dp+3 + end do + end if + end do + if ((indx_int-1/=buf_int_size).or.(indx_dp-1/=buf_dp_size)) then + write(msg,'(a,i10,a,i10)') 'Wrong buffer sizes: buf_int_size=',buf_int_size,' buf_dp_size=',buf_dp_size + LIBPAW_BUG(msg) + end if + +end subroutine pawfgrtab_isendreceive_fillbuffer +!!*** + +!---------------------------------------------------------------------- + +END MODULE m_pawfgrtab +!!*** diff --git a/GX-PAW/libpaw/src/m_pawfgrtab.o b/GX-PAW/libpaw/src/m_pawfgrtab.o new file mode 100644 index 00000000..f0154aee Binary files /dev/null and b/GX-PAW/libpaw/src/m_pawfgrtab.o differ diff --git a/GX-PAW/libpaw/src/m_pawpsp.F90 b/GX-PAW/libpaw/src/m_pawpsp.F90 new file mode 100644 index 00000000..68ed8223 --- /dev/null +++ b/GX-PAW/libpaw/src/m_pawpsp.F90 @@ -0,0 +1,5135 @@ +!!****m* ABINIT/m_pawpsp +!! NAME +!! m_pawpsp +!! +!! FUNCTION +!! Module to read PAW atomic data +!! +!! COPYRIGHT +!! Copyright (C) 2012-2024 ABINIT group (MT, FJ,TR, GJ, FB, FrD, AF, GMR, DRH) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! NOTES +!! FOR DEVELOPERS: in order to preserve the portability of libPAW library, +!! please consult ~abinit/src/??_libpaw/libpaw-coding-rules.txt +!! +!! SOURCE + +#include "libpaw.h" + +module m_pawpsp + + USE_DEFS + USE_MSG_HANDLING + USE_MPI_WRAPPERS + USE_MEMORY_PROFILING + + use m_libpaw_libxc +#if defined LIBPAW_HAVE_FOX + use fox_sax +#endif + + use m_libpaw_tools, only : libpaw_basename, libpaw_get_free_unit + + use m_pawang, only: pawang_type + use m_pawtab, only: pawtab_type, wvlpaw_type, wvlpaw_allocate, wvlpaw_rholoc_free, & +& pawtab_free, wvlpaw_free, wvlpaw_rholoc_nullify, pawtab_bcast, & +& pawtab_set_flags, wvlpaw_allocate, wvlpaw_free, wvlpaw_rholoc_nullify, & +& wvlpaw_rholoc_free + use m_pawxmlps, only: rdpawpsxml_core, paw_setup_t, paw_setuploc, paw_setup_free + use m_pawrad, only: pawrad_type, pawrad_init, pawrad_free, pawrad_copy, & +& pawrad_bcast, pawrad_ifromr, simp_gen, nderiv_gen, bound_deriv, pawrad_deducer0, poisson + use m_paw_numeric, only: paw_splint, paw_spline, paw_smooth, paw_jbessel_4spline + use m_paw_atom, only: atompaw_shapebes, atompaw_vhnzc, atompaw_shpfun, & +& atompaw_dij0, atompaw_kij + use m_pawxc, only: pawxc, pawxcm, pawxc_get_usekden + use m_paw_gaussfit, only: gaussfit_projector + + implicit none + + private + + public:: pawpsp_calc_d5 !calculate up to the 5th derivative + public:: pawpsp_main !main routine to read psp + public:: pawpsp_nl !make paw projector form factors f_l(q) + public:: pawpsp_read !read psp from file + public:: pawpsp_read_header !read header of psp file + public:: pawpsp_read_corewf !read core wavefunction + public:: pawpsp_read_header_2 !reads pspversion, basis_size and lmn_size + public:: pawpsp_rw_atompaw !read and writes ATOMPAW psp with gaussian |p> + public:: pawpsp_wvl !wavelet and icoulomb>0 related operations + public:: pawpsp_wvl_calc !wavelet related operations + public:: pawpsp_7in !reads non-XML atomic data + public:: pawpsp_17in !reads XML atomic data + public:: pawpsp_calc !calculates atomic quantities from psp info + public:: pawpsp_read_header_xml !read header of psp file for XML + public:: pawpsp_read_pawheader !read header variables from XML objects + public:: pawpsp_bcast ! broadcast PAW psp data + public:: pawpsp_cg !compute sin FFT transform of a density + public:: pawpsp_lo !compute sin FFT transform of local potential + +! Private procedures + private:: pawpsp_wvl_sin2gauss !convert sin/cos to gaussians +!!*** + +!------------------------------------------------------------------------- + +!!****t* m_pawpsp/pawpsp_header_type +!! NAME +!! pawpsp_header_type +!! +!! FUNCTION +!! For PAW, header related data +!! +!! SOURCE + + type, public :: pawpsp_header_type + +!Integer scalars + integer :: basis_size ! Number of elements of the wf basis ((l,n) quantum numbers) + integer :: l_size ! Maximum value of l+1 leading to a non zero Gaunt coefficient + integer :: lmn_size ! Number of elements of the paw basis + integer :: mesh_size ! Dimension of (main) radial mesh + integer :: pawver ! Version number of paw psp format + integer :: shape_type ! Type of shape function + real(dp) :: rpaw ! Radius for paw spheres + real(dp) :: rshp ! Cut-off radius of shape function + + end type pawpsp_header_type +!!*** + +CONTAINS +!=========================================================== +!!*** + +!------------------------------------------------------------------------- + +!!****f* m_pawpsp/pawpsp_nl +!! NAME +!! pawpsp_nl +!! +!! FUNCTION +!! Make paw projector form factors f_l(q) for each l +!! +!! INPUTS +!! indlmn(6,lmnmax)= array giving l,m,n,lm,ln,s for i=lmn +!! lmnmax=max number of (l,m,n) components +!! lnmax=max number of (l,n) components +!! mqgrid=number of grid points for q grid +!! qgrid(mqgrid)=values at which form factors are returned +!! radmesh =data containing radial grid information +!! wfll(:,lnmax)=paw projector on radial grid +!! +!! OUTPUT +!! ffspl(mqgrid,2,lnmax)= form factor f_l(q) and second derivative +!! +!! NOTES +!! u_l(r) is the paw projector (input as wfll); +!! j_l(q) is a spherical Bessel function; +!! f_l(q) = $ \int_0^{rmax}[j_l(2\pi q r) u_l(r) r dr]$ +!! +!! SOURCE + +subroutine pawpsp_nl(ffspl,indlmn,lmnmax,lnmax,mqgrid,qgrid,radmesh,wfll) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: lmnmax,lnmax,mqgrid + type(pawrad_type),intent(in) :: radmesh +!arrays + integer,intent(in) :: indlmn(6,lmnmax) + real(dp),intent(in) :: qgrid(mqgrid) + real(dp),intent(in) :: wfll(:,:) + real(dp),intent(inout) :: ffspl(mqgrid,2,lnmax) + +!Local variables------------------------------- +!scalars + integer :: ilmn,iln,iln0,iq,ir,ll,meshsz,mmax + real(dp),parameter :: eps=tol14**4,TOLJ=0.001_dp + real(dp) :: arg,argn,bes + real(dp) :: besp,qr + real(dp) :: yp1,ypn + character(len=100) :: msg + type(pawrad_type) :: tmpmesh +!arrays + real(dp),allocatable :: ff(:),gg(:),rr(:),rr2(:),rr2wf(:),rrwf(:),work(:) + +!************************************************************************* + +!Is mesh beginning with r=0 ? + if (radmesh%rad(1)>tol10) then + msg='Radial mesh cannot begin with r<>0!' + LIBPAW_BUG(msg) + end if + + meshsz=size(wfll,1) + if (meshsz>radmesh%mesh_size) then + msg='wrong size for wfll!' + LIBPAW_BUG(msg) + end if + +!Init. temporary arrays and variables + LIBPAW_ALLOCATE(ff,(meshsz)) + LIBPAW_ALLOCATE(gg,(meshsz)) + LIBPAW_ALLOCATE(rr,(meshsz)) + LIBPAW_ALLOCATE(rr2,(meshsz)) + LIBPAW_ALLOCATE(rrwf,(meshsz)) + LIBPAW_ALLOCATE(rr2wf,(meshsz)) + LIBPAW_ALLOCATE(work,(mqgrid)) + rr(1:meshsz) =radmesh%rad(1:meshsz) + rr2(1:meshsz)=two_pi*rr(1:meshsz)*rr(1:meshsz) + argn=two_pi*qgrid(mqgrid) + mmax=meshsz + +!Loop on (l,n) projectors + iln0=0 + do ilmn=1,lmnmax + iln=indlmn(5,ilmn) + if(iln>iln0) then + iln0=iln;ll=indlmn(1,ilmn) + + ir=meshsz + do while (abs(wfll(ir,iln))2) then + do iq=2,mqgrid-1 + arg=two_pi*qgrid(iq) + do ir=1,mmax + qr=arg*rr(ir) + call paw_jbessel_4spline(bes,besp,ll,0,qr,TOLJ) + ff(ir)=bes*rrwf(ir) + end do + call simp_gen(ffspl(iq,1,iln),ff,tmpmesh) + end do + end if + +! 2-Compute f_l(q=0) and first derivative + ffspl(1,1,iln)=zero;yp1=zero + if (ll==0) then + call simp_gen(ffspl(1,1,iln),rrwf,tmpmesh) + end if + if (ll==1) then + call simp_gen(yp1,rr2wf,tmpmesh) + yp1=yp1*third + end if + +! 3-Compute f_l(q=qmax) and first derivative + if (mqgrid>1) then +! if (ll==0.or.ll==1) then + do ir=1,mmax + qr=argn*rr(ir) + call paw_jbessel_4spline(bes,besp,ll,1,qr,TOLJ) + ff(ir)=bes*rrwf(ir) + gg(ir)=besp*rr2wf(ir) + end do + call simp_gen(ffspl(mqgrid,1,iln),ff,tmpmesh) + call simp_gen(ypn,gg,tmpmesh) + else + ypn=yp1 + end if + +! 4-Compute second derivative of f_l(q) + call paw_spline(qgrid,ffspl(:,1,iln),mqgrid,yp1,ypn,ffspl(:,2,iln)) + + call pawrad_free(tmpmesh) + +! End loop on (l,n) projectors + end if + end do + + LIBPAW_DEALLOCATE(ff) + LIBPAW_DEALLOCATE(gg) + LIBPAW_DEALLOCATE(rr) + LIBPAW_DEALLOCATE(rr2) + LIBPAW_DEALLOCATE(rrwf) + LIBPAW_DEALLOCATE(rr2wf) + LIBPAW_DEALLOCATE(work) + +end subroutine pawpsp_nl +!!*** + +!------------------------------------------------------------------------- + +!!****f* m_pawpsp/pawpsp_lo +!! NAME +!! pawpsp_lo +!! +!! FUNCTION +!! Compute sine transform to transform from V(r) to q^2 V(q). +!! Computes integrals on (generalized) grid using corrected trapezoidal integration. +!! +!! INPUTS +!! mqgrid=number of grid points in q from 0 to qmax. +!! qgrid(mqgrid)=q grid values (bohr**-1). +!! radmesh =data containing radial grid information +!! vloc(:)=V(r) on radial grid. +!! zion=nominal valence charge of atom. +!! +!! OUTPUT +!! epsatm=$ 4\pi\int[r^2 (V(r)+\frac{Zv}{r}dr]$. +!!{{\\ \begin{equation} +!! q2vq(mqgrid) +!! =q^2 V(q) +!! = -\frac{Zv}{\pi} +!! + q^2 4\pi\int[(\frac{\sin(2\pi q r)}{2\pi q r})(r^2 V(r)+r Zv)dr]. +!!\end{equation} }} +!! yp1,ypn=derivatives of q^2 V(q) wrt q at q=0 and q=qmax (needed for spline fitter). +!! +!! SOURCE + +subroutine pawpsp_lo(epsatm,mqgrid,qgrid,q2vq,radmesh,vloc,yp1,ypn,zion) + +!Arguments---------------------------------------------------------- +!scalars + integer,intent(in) :: mqgrid + real(dp),intent(in) :: zion + real(dp),intent(out) :: epsatm,yp1,ypn + type(pawrad_type),intent(in) :: radmesh +!arrays + real(dp),intent(in) :: qgrid(mqgrid) + real(dp),intent(in) :: vloc(:) + real(dp),intent(out) :: q2vq(mqgrid) + +!Local variables ------------------------------ +!scalars + integer :: iq,ir,irmax,mesh_size + real(dp) :: arg,r0tor1,r1torm,rmtoin + logical :: begin_r0 +!arrays + real(dp),allocatable :: ff(:),rvpz(:) + +!************************************************************************ + + mesh_size=size(vloc) + irmax=pawrad_ifromr(radmesh,min(20._dp,radmesh%rmax)) + irmax=min(irmax,mesh_size) + +!Particular case of a zero potential + if (maxval(abs(vloc(1:irmax)))<=1.e-20_dp) then + q2vq=zero;yp1=zero;ypn=zero;epsatm=zero + return + end if + + LIBPAW_ALLOCATE(ff,(mesh_size)) + LIBPAW_ALLOCATE(rvpz,(mesh_size)) + ff=zero;rvpz=zero + +!Is mesh beginning with r=0 ? + begin_r0=(radmesh%rad(1)<1.e-20_dp) + +!Store r.V+Z + do ir=1,irmax + rvpz(ir)=radmesh%rad(ir)*vloc(ir)+zion + end do + +!=========================================== +!=== Compute q^2 v(q) for q=0 separately +!=========================================== + +!Integral from 0 to r1 (only if r1<>0) + r0tor1=zero;if (.not.begin_r0) & +& r0tor1=(zion*0.5_dp+radmesh%rad(1)*vloc(1)/3._dp)*radmesh%rad(1)**2 + +!Integral from r1 to rmax + do ir=1,irmax + if (abs(rvpz(ir))>1.e-20_dp) then + ff(ir)=radmesh%rad(ir)*rvpz(ir) + end if + end do + + call simp_gen(r1torm,ff,radmesh) + +!Integral from rmax to infinity +!This part is neglected... might be improved. + rmtoin=zero + +!Some of the three parts + epsatm=four_pi*(r0tor1+r1torm+rmtoin) + + q2vq(1)=-zion/pi + +!=========================================== +!=== Compute q^2 v(q) for other q''s +!=========================================== + +!Loop over q values + do iq=2,mqgrid + arg=two_pi*qgrid(iq) + +! Integral from 0 to r1 (only if r1<>0) + r0tor1=zero;if (.not.begin_r0) & +& r0tor1=( vloc(1)/arg*sin(arg*radmesh%rad(1)) & +& -rvpz(1) *cos(arg*radmesh%rad(1)) +zion )/pi + +! Integral from r1 to rmax + do ir=1,irmax + if (abs(rvpz(ir))>1.e-20_dp) ff(ir)=sin(arg*radmesh%rad(ir))*rvpz(ir) + end do + call simp_gen(r1torm,ff,radmesh) + +! Integral from rmax to infinity +! This part is neglected... might be improved. + rmtoin=zero + +! Store q^2 v(q) + q2vq(iq)=-zion/pi + two*qgrid(iq)*(r0tor1+r1torm+rmtoin) + end do + +!=========================================== +!=== Compute derivatives of q^2 v(q) +!=== at ends of interval +!=========================================== + +!yp(0)=zero + yp1=zero + +!yp(qmax)=$ 2\int_0^\infty[(\sin(2\pi qmax r)+(2\pi qmax r)*\cos(2\pi qmax r)(r V(r)+Z) dr]$ + arg=two_pi*qgrid(mqgrid) + +!Integral from 0 to r1 (only if r1<>0) + r0tor1=zero;if (.not.begin_r0) & +& r0tor1=zion*radmesh%rad(1) *sin(arg*radmesh%rad(1)) & +& +three*radmesh%rad(1)*vloc(1)/arg *cos(arg*radmesh%rad(1)) & +& +(radmesh%rad(1)**2-one/arg**2)*vloc(1)*sin(arg*radmesh%rad(1)) + +!Integral from r1 to rmax + do ir=1,irmax + if (abs(rvpz(ir))>1.e-20_dp) ff(ir)=( arg*radmesh%rad(ir)*cos(arg*radmesh%rad(ir)) & +& + sin(arg*radmesh%rad(ir))) *rvpz(ir) + end do + call simp_gen(r1torm,ff,radmesh) + +!Integral from rmax to infinity +!This part is neglected... might be improved. + rmtoin=zero + +!Some of the three parts + ypn=two*(r0tor1+r1torm+rmtoin) + + LIBPAW_DEALLOCATE(ff) + LIBPAW_DEALLOCATE(rvpz) + +end subroutine pawpsp_lo +!!*** + +!------------------------------------------------------------------------- + +!!****f* m_pawpsp/pawpsp_cg +!! NAME +!! pawpsp_cg +!! +!! FUNCTION +!! Compute sine transform to transform from n(r) to n(q). +!! Computes integrals on (generalized) grid using corrected trapezoidal integration. +!! +!! INPUTS +!! mqgrid=number of grid points in q from 0 to qmax. +!! qgrid(mqgrid)=q grid values (bohr**-1). +!! radmesh =data containing radial grid information +!! nr(:)=n(r) on radial grid. +!! +!! OUTPUT +!! dnqdq0= 1/q dn(q)/dq for q=0 +!! d2nqdq0 = Gives contribution of d2(tNcore(q))/d2q for q=0 +!! compute \int{(16/15)*pi^5*n(r)*r^6* dr} +!!{{\\ \begin{equation} +!! nq(mqgrid)= n(q) +!! = 4\pi\int[(\frac{\sin(2\pi q r)}{2\pi q r})(r^2 n(r))dr]. +!!\end{equation} }} +!! yp1,ypn=derivatives of n(q) wrt q at q=0 and q=qmax (needed for spline fitter). +!! +!! SOURCE + +subroutine pawpsp_cg(dnqdq0,d2nqdq0,mqgrid,qgrid,nq,radmesh,nr,yp1,ypn) + +!Arguments---------------------------------------------------------- +!scalars + integer,intent(in) :: mqgrid + real(dp),intent(out) :: dnqdq0,d2nqdq0,yp1,ypn + type(pawrad_type),intent(in) :: radmesh +!arrays + real(dp),intent(in) :: nr(:) + real(dp),intent(in) :: qgrid(mqgrid) + real(dp),intent(out) :: nq(mqgrid) + +!Local variables------------------------------- +!scalars + integer :: iq,ir,mesh_size + real(dp) :: aexp,arg,bexp,dn,r0tor1,r1torm,rm,rmtoin + logical :: begin_r0 + !character(len=500) :: msg +!arrays + real(dp),allocatable :: ff(:),rnr(:) + +! ************************************************************************* + + mesh_size=min(size(nr),radmesh%mesh_size) + LIBPAW_ALLOCATE(ff,(mesh_size)) + LIBPAW_ALLOCATE(rnr,(mesh_size)) + ff=zero;rnr=zero + + do ir=1,mesh_size + rnr(ir)=radmesh%rad(ir)*nr(ir) + end do + +!Is mesh beginning with r=0 ? + begin_r0=(radmesh%rad(1)<1.d-20) + +!Adjustment of an exponentional at r_max (n_exp(r)=aexp*Exp[-bexp*r]) + rm=radmesh%rad(mesh_size) + dn=one/(12._dp*radmesh%stepint*radmesh%radfact(mesh_size)) & +& *( 3._dp*nr(mesh_size-4) & +& -16._dp*nr(mesh_size-3) & +& +36._dp*nr(mesh_size-2) & +& -48._dp*nr(mesh_size-1) & +& +25._dp*nr(mesh_size)) + if (dn<0._dp.and. & +& abs(radmesh%rad(mesh_size)*nr(mesh_size))>1.d-20) then + bexp=-dn/nr(mesh_size) + if (bexp * rm > 50._dp) then + ! This solves the problem with the weird core charge used in v4[62] in which bexp x rm ~= 10^3 + !write(msg,"(a,es16.8)")"Tooooo large bexp * rm: ", bexp*rm, ", setting aexp to 0" + !LIBPAW_WARNING(msg) + bexp=0.001_dp;aexp=zero + else + aexp=nr(mesh_size)*exp(bexp*rm) + if (abs(aexp)<1.d-20) then + bexp=0.001_dp;aexp=zero + end if + end if + else + bexp=0.001_dp;aexp=zero + end if + +!=========================================== +!=== Compute n(q) for q=0 separately +!=========================================== + +!Integral from 0 to r1 (only if r1<>0) + r0tor1=zero + if (.not.begin_r0) r0tor1=(rnr(1)*radmesh%rad(1)**2)/3.d0 + +!Integral from r1 to rmax + do ir=1,mesh_size + if (abs(rnr(ir))>1.d-20) ff(ir)=rnr(ir)*radmesh%rad(ir) + end do + call simp_gen(r1torm,ff,radmesh) + +!Integral from rmax to infinity +!This part is approximated using an exponential density aexp*Exp[-bexp*r] +!(formulae obtained with mathematica) + rmtoin=aexp*exp(-bexp*rm)/bexp**3*(two+two*bexp*rm+bexp*bexp*rm*rm) + +!Some of the three parts + nq(1)=four_pi*(r0tor1+r1torm+rmtoin) + +!=========================================== +!=== Compute n(q) for other q''s +!=========================================== + +!Loop over q values + do iq=2,mqgrid + arg=two_pi*qgrid(iq) + +! Integral from 0 to r1 (only if r1<>0) + r0tor1=zero;if (.not.begin_r0) & +& r0tor1=nr(1)*(sin(arg*radmesh%rad(1))/arg/arg& +& -radmesh%rad(1)*cos(arg*radmesh%rad(1))/arg) + +! Integral from r1 to rmax + do ir=1,mesh_size + if (abs(rnr(ir))>1.d-20) ff(ir)=sin(arg*radmesh%rad(ir))*rnr(ir) + end do + call simp_gen(r1torm,ff,radmesh) + +! Integral from rmax to infinity +! This part is approximated using an exponential density aexp*Exp[-bexp*r] +! (formulae obtained with mathematica) + rmtoin=aexp*exp(-bexp*rm)/(arg**2+bexp**2)**2 & +& *(arg*(two*bexp+arg**2*rm+bexp**2*rm)*cos(arg*rm) & +& +(arg**2*(bexp*rm-one)+bexp**2*(bexp*rm+one))*sin(arg*rm)) + +! Store q^2 v(q) + nq(iq)=two/qgrid(iq)*(r0tor1+r1torm+rmtoin) + end do + +!=========================================== +!=== Compute derivatives of n(q) +!=== at ends of interval +!=========================================== + +!yp(0)=zero + yp1=zero + +!yp(qmax)=$ 2\int_0^\infty[(-\sin(2\pi qmax r)+(2\pi qmax r)*\cos(2\pi qmax r) r n(r) dr]$ + arg=two_pi*qgrid(mqgrid) + +!Integral from 0 to r1 (only if r1<>0) + r0tor1=zero;if (.not.begin_r0) & +& r0tor1=two_pi*nr(1)*(3.d0*radmesh%rad(1)/arg /arg*cos(arg*radmesh%rad(1))+ & +& (radmesh%rad(1)**2/arg-3.0d0/arg**3)*sin(arg*radmesh%rad(1))) + +!Integral from r1 to rmax + do ir=1,mesh_size + if (abs(rnr(ir))>1.d-20) ff(ir)=(two_pi*radmesh%rad(ir)*cos(arg*radmesh%rad(ir)) & +& - sin(arg*radmesh%rad(ir))/qgrid(mqgrid)) *rnr(ir) + end do + call simp_gen(r1torm,ff,radmesh) + +!Integral from rmax to infinity +!This part is approximated using an exponential density aexp*Exp[-bexp*r] +!(formulae obtained with mathematica) + rmtoin=-one/(qgrid(mqgrid)*(arg**2+bexp**2)**3) & +& *aexp*exp(-bexp*rm) & +& *((arg**5*rm-two_pi*arg**4*qgrid(mqgrid)*rm*(bexp*rm-two) & +& +two*arg**3*bexp*(bexp*rm+one)+arg*bexp**3*(bexp*rm+two) & +& -four_pi*arg**2*bexp*qgrid(mqgrid)*(bexp**2*rm**2-three) & +& -two_pi*bexp**3*qgrid(mqgrid)*(bexp**2*rm**2+two*bexp*rm+two))*cos(arg*rm) & +& +(two*arg**2*bexp**3*rm+two_pi*arg**5*qgrid(mqgrid)*rm**2 & +& +arg**4*(bexp*rm-one)+bexp**4*(bexp*rm+one) & +& +four_pi*arg**3*qgrid(mqgrid)*(bexp**2*rm**2+two*bexp*rm-one) & +& +two_pi*arg*bexp**2*qgrid(mqgrid)*(bexp**2*rm**2+four*bexp*rm+6._dp))*sin(arg*rm)) + +!Some of the three parts + ypn=two/qgrid(mqgrid)*(r0tor1+r1torm+rmtoin) + +!=========================================== +!=== Compute 1/q dn(q)/dq at q=0 +!=========================================== + +!Integral from 0 to r1 (only if r1<>0) + r0tor1=zero + if (.not.begin_r0) r0tor1=(rnr(1)*radmesh%rad(1)**4)/5.d0 + +!Integral from r1 to rmax + do ir=1,mesh_size + if (abs(rnr(ir))>1.d-20) ff(ir)=rnr(ir)*radmesh%rad(ir)**3 + end do + call simp_gen(r1torm,ff,radmesh) + +!Integral from rmax to infinity +!This part is approximated using an exponential density aexp*Exp[-bexp*r] +!(formulae obtained with mathematica) + rmtoin=aexp*exp(-bexp*rm)/bexp**5 & +& *(24._dp+24._dp*bexp*rm+12._dp*bexp**2*rm**2+four*bexp**3*rm**3+bexp**4*rm**4) + +!Some of the three parts + dnqdq0=-(2.d0/3.d0)*two_pi**3*(r0tor1+r1torm+rmtoin) + + LIBPAW_DEALLOCATE(ff) + LIBPAW_DEALLOCATE(rnr) + + d2nqdq0 = 1_dp + +end subroutine pawpsp_cg +!!*** + +!------------------------------------------------------------------------- + +!!****f* m_pawpsp/pawpsp_read +!! NAME +!! pawpsp_read +!! +!! FUNCTION +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SIDE EFFECTS +!! +!! NOTES +!! File format of formatted PAW psp input (the 3 first lines +!! have already been read in calling -pspatm- routine) : +!! (1) title (character) line +!! (2) psps%znuclpsp(ipsp), zion, pspdat +!! (3) pspcod, pspxc, lmax, lloc, mmax, r2well +!! (4) psp_version, creatorID +!! (5) basis_size, lmn_size +!! (6) orbitals (for l=1 to basis_size) +!! (7) number_of_meshes +!! For imsh=1 to number_of_meshes +!! (8) mesh_index, mesh_type ,mesh_size, rad_step[, log_step] +!! (9) r_cut(SPH) +!! (10) shape_type, r_shape[, shapefunction arguments] +!! For iln=1 to basis_size +!! (11) comment(character) +!! (12) radial mesh index for phi +!! (13) phi(r) (for ir=1 to phi_meshsz) +!! For iln=1 to basis_size +!! (14) comment(character) +!! (15) radial mesh index for tphi +!! (16) tphi(r) (for ir=1 to phi_mesh_size) +!! For iln=1 to basis_size +!! (17) comment(character) +!! (18) radial mesh index for tproj +!! (19) tproj(r) (for ir=1 to proj_mesh_size) +!! (20) comment(character) +!! (21) radial mesh index for core_density +!! (22) core_density (for ir=1 to core_mesh_size) +!! (23) comment(character) +!! (24) radial mesh index for pseudo_core_density +!! (25) tcore_density (for ir=1 to core_mesh_size) +!! (26) comment(character) +!! (27) Dij0 (for ij=1 to lmn_size*(lmn_size+1)/2) +!! (28) comment(character) +!! (29) Rhoij0 (for ij=1 to lmn_size*(lmn_size+1)/2) +!! (30) comment(character) +!! (31) radial mesh index for Vloc, format of Vloc (0=Vbare, 1=VH(tnzc), 2=VH(tnzc) without nhat in XC) +!! (32) Vloc(r) (for ir=1 to vloc_mesh_size) +!! ===== Following lines only if shape_type=-1 ===== +!! For il=1 to 2*max(orbitals)+1 +!! (33) comment(character) +!! (34) radial mesh index for shapefunc +!! (35) shapefunc(r)*gnorm(l)*r**l (for ir=1 to shape_mesh_size) +!! (36) comment(character) +!! (37) radial mesh index for pseudo_valence_density +!! (38) tvale(r) (for ir=1 to vale_mesh_size) +!! +!! Comments: +!! * psp_version= ID of PAW_psp version +!! 4 characters string of the form 'pawn' (with n varying) +!! * creatorID= ID of psp generator +!! creatorid=1xyz : psp generated from Holzwarth AtomPAW generator version x.yz +!! creatorid=2xyz : psp generated from Vanderbilt ultra-soft generator version x.yz +!! creatorid=-1: psp for tests (for developpers only) +!! * mesh_type= type of radial mesh +!! mesh_type=1 (regular grid): rad(i)=(i-1)*AA +!! mesh_type=2 (logari. grid): rad(i)=AA*(exp[BB*(i-1)]-1) +!! mesh_type=3 (logari. grid): rad(i>1)=AA*exp[BB*(i-2)] and rad(1)=0 +!! mesh_type=4 (logari. grid): rad(i)=-AA*ln[1-BB*(i-1)] with BB=1/n +!! * radial shapefunction type +!! shape_type=-1 ; gl(r)=numeric (read from psp file) +!! shape_type= 1 ; gl(r)=k(r).r^l; k(r)=exp[-(r/sigma)**lambda] +!! shape_type= 2 ; gl(r)=k(r).r^l; k(r)=[sin(pi*r/rshp)/(pi*r/rshp)]**2 if r<=rshp +!! shape_type= 3 ; gl(r)=Alpha(1,l)*jl(q(1,l)*r)+Alpha(2,l)*jl(q(2,l)*r) for each l +!! +!! SOURCE + +subroutine pawpsp_read(core_mesh,funit,imainmesh,lmax,& +& ncore,nmesh,pawrad,pawtab,pspversion,radmesh,save_core_msz,& +& tcoretau,tncore,tnvale,tproj,tproj_mesh,usexcnhat_in,usexcnhat_out,vale_mesh,& +& vlocopt,vlocr,vloc_mesh,znucl) + +!Arguments ------------------------------------ + integer,intent(in):: funit,lmax,usexcnhat_in + integer,intent(out) :: imainmesh,pspversion,usexcnhat_out,vlocopt + logical,intent(in) :: save_core_msz + real(dp),intent(in):: znucl +!arrays + real(dp),pointer :: ncore(:),tcoretau(:),tncore(:),tnvale(:),tproj(:,:),vlocr(:) + type(pawrad_type),intent(inout) :: pawrad + type(pawrad_type),intent(out) :: core_mesh,tproj_mesh,vale_mesh,vloc_mesh + type(pawrad_type),pointer :: radmesh(:) + type(pawtab_type),intent(inout) :: pawtab + integer,intent(out)::nmesh + +!Local variables------------------------------- + integer :: creatorid,imsh + integer :: icoremesh,ishpfmesh,ivalemesh,ivlocmesh + integer :: ib,il,ilm,ilmn,iln,iprojmesh + integer :: ii,ir,iread1,iread2,jj + integer :: msz,pngau_,ptotgau_ + real(dp):: rc,rread1,rread2 + real(dp) :: yp1,ypn +!arrays + integer,allocatable :: nprj(:) + real(dp),allocatable :: shpf(:,:),val(:),vhnzc(:) + real(dp),allocatable :: work1(:),work2(:),work3(:),work4(:) + character :: blank=' ',numb=' ' + character(len=80) :: pspline + character(len=500) :: msg,submsg + logical :: read_gauss=.false. + type(pawrad_type)::shpf_mesh + +! ************************************************************************* + +!========================================================== +!Read lines 4 to 11 of the header + +!This is important for BigDFT in standalone mode + call pawpsp_read_header_2(funit,pspversion,pawtab%basis_size,pawtab%lmn_size) + +!Check pspversion for wvl-paw + if(pspversion<4 .and. pawtab%has_wvl>0)then + write(msg, '(a,i2,a,a)' )& +& 'In reading atomic psp file, finds pspversion=',pspversion,ch10,& +& 'For WVL-PAW, pspversion >= 4 is required.' + LIBPAW_BUG(msg) + end if + + +!Have to maintain compatibility with Abinit v4.2.x + if (pspversion==1) then + LIBPAW_ALLOCATE(pawtab%orbitals,(pawtab%basis_size)) + read(funit,*) (pawtab%orbitals(ib), ib=1,pawtab%basis_size) + pawtab%l_size=2*maxval(pawtab%orbitals)+1 + nmesh=3 + LIBPAW_DATATYPE_ALLOCATE(radmesh,(nmesh)) + read(funit,'(a80)') pspline + radmesh(1)%lstep=zero + read(unit=pspline,fmt=*,err=10,end=10) radmesh(1)%mesh_type,& +& radmesh(1)%rstep,radmesh(1)%lstep + 10 read(funit,*) pawtab%rpaw + read(funit,*) radmesh(1)%mesh_size,radmesh(2)%mesh_size,& +& radmesh(3)%mesh_size + read(funit,'(a80)') pspline + pawtab%shape_lambda=-1;pawtab%shape_sigma=1.d99 + read(unit=pspline,fmt=*,err=11,end=11) pawtab%shape_type,& +& pawtab%shape_lambda,pawtab%shape_sigma + 11 read(funit,*) creatorid + if (pawtab%shape_type==3) pawtab%shape_type=-1 + radmesh(2)%mesh_type=radmesh(1)%mesh_type + radmesh(3)%mesh_type=radmesh(1)%mesh_type + radmesh(2)%rstep=radmesh(1)%rstep + radmesh(3)%rstep=radmesh(1)%rstep + radmesh(2)%lstep=radmesh(1)%lstep + radmesh(3)%lstep=radmesh(1)%lstep + else + +! Here psp file for Abinit 4.3+ + LIBPAW_ALLOCATE(pawtab%orbitals,(pawtab%basis_size)) + read(funit,*) (pawtab%orbitals(ib), ib=1,pawtab%basis_size) + pawtab%l_size=2*maxval(pawtab%orbitals)+1 + read(funit,*) nmesh + LIBPAW_DATATYPE_ALLOCATE(radmesh,(nmesh)) + do imsh=1,nmesh + rread2=zero + read(funit,'(a80)') pspline + read(unit=pspline,fmt=*,err=20,end=20) ii,iread1,iread2,rread1,rread2 + 20 continue + if (ii<=nmesh) then + radmesh(ii)%mesh_type=iread1 + radmesh(ii)%mesh_size=iread2 + radmesh(ii)%rstep=rread1 + radmesh(ii)%lstep=rread2 + else + write(msg, '(3a)' )& +& 'Index of mesh out of range !',ch10,& +& 'Action : check your pseudopotential file.' + LIBPAW_ERROR(msg) + end if + end do + read(funit,*) pawtab%rpaw + read(funit,'(a80)') pspline + read(unit=pspline,fmt=*) pawtab%shape_type + pawtab%shape_lambda=-1;pawtab%shape_sigma=1.d99 + end if + +!Initialize radial meshes + do imsh=1,nmesh + call pawrad_init(radmesh(imsh)) + end do + +!========================================================== +!Initialize various dims and indexes + + pawtab%l_size=2*maxval(pawtab%orbitals)+1 + pawtab%lmn2_size=pawtab%lmn_size*(pawtab%lmn_size+1)/2 + pawtab%ij_size=pawtab%basis_size*(pawtab%basis_size+1)/2 + pawtab%usexcnhat=usexcnhat_in + +!indlmn calculation (indices for (l,m,n) basis) + if (allocated(pawtab%indlmn)) then + LIBPAW_DEALLOCATE(pawtab%indlmn) + end if + LIBPAW_ALLOCATE(pawtab%indlmn,(6,pawtab%lmn_size)) + LIBPAW_BOUND1_ALLOCATE(nprj,BOUNDS(0,maxval(pawtab%orbitals))) + pawtab%indlmn(:,:)=0 + ilmn=0;iln=0;nprj=0 + do ib=1,pawtab%basis_size + il=pawtab%orbitals(ib) + nprj(il)=nprj(il)+1 + iln=iln+1 + do ilm=1,2*il+1 + pawtab%indlmn(1,ilmn+ilm)=il + pawtab%indlmn(2,ilmn+ilm)=ilm-(il+1) + pawtab%indlmn(3,ilmn+ilm)=nprj(il) + pawtab%indlmn(4,ilmn+ilm)=il*il+ilm + pawtab%indlmn(5,ilmn+ilm)=iln + pawtab%indlmn(6,ilmn+ilm)=1 + end do + ilmn=ilmn+2*il+1 + end do + LIBPAW_DEALLOCATE(nprj) +!Are ilmn (found here) and pawtab%lmn_size compatibles ? + if (ilmn/=pawtab%lmn_size) then + write(msg, '(a,a,a,a,a)' )& +& 'Calculated lmn size differs from',ch10,& +& 'lmn_size read from pseudo !',ch10,& +& 'Action: check your pseudopotential file.' + LIBPAW_ERROR(msg) + end if + +!========================================================== +!Here reading shapefunction parameters + +!Shapefunction parameters for Abinit 4.3...4.5 + if (pspversion==2) then + if (pawtab%shape_type==1) read(unit=pspline,fmt=*) ii,pawtab%shape_lambda,pawtab%shape_sigma + if (pawtab%shape_type==3) pawtab%shape_type=-1 + pawtab%rshp=zero + +!Shapefunction parameters for Abinit 4.6+ + else if (pspversion>=3) then + pawtab%rshp=zero + if (pawtab%shape_type==-1) read(unit=pspline,fmt=*,err=21,end=21) ii,pawtab%rshp + if (pawtab%shape_type== 1) read(unit=pspline,fmt=*,err=21,end=21) ii,pawtab%rshp, & +& pawtab%shape_lambda,pawtab%shape_sigma + if (pawtab%shape_type== 2) read(unit=pspline,fmt=*,err=21,end=21) ii,pawtab%rshp + if (pawtab%shape_type== 3) read(unit=pspline,fmt=*,err=21,end=21) ii,pawtab%rshp + end if + 21 continue +!If shapefunction type is gaussian, check exponent + if (pawtab%shape_type==1) then + if (pawtab%shape_lambda<2) then + write(msg, '(3a)' )& +& 'For a gaussian shape function, exponent lambda must be >1 !',ch10,& +& 'Action: check your psp file.' + LIBPAW_ERROR(msg) + end if + end if +!If shapefunction type is Bessel, deduce here its parameters from rc + if (pawtab%shape_type==3) then + LIBPAW_ALLOCATE(pawtab%shape_alpha,(2,pawtab%l_size)) + LIBPAW_ALLOCATE(pawtab%shape_q,(2,pawtab%l_size)) + rc=pawtab%rshp;if (rc<1.d-8) rc=pawtab%rpaw + do il=1,pawtab%l_size + call atompaw_shapebes(pawtab%shape_alpha(1:2,il),pawtab%shape_q(1:2,il),il-1,rc) + end do + end if + +!========================================================== +!Mirror pseudopotential parameters to the output and log files + + write(msg,'(a,i1)')' Pseudopotential format is: paw',pspversion + call wrtout(ab_out,msg,'COLL') + call wrtout(std_out, msg,'COLL') + write(msg,'(2(a,i3),a,64i4)') & +& ' basis_size (lnmax)=',pawtab%basis_size,' (lmn_size=',& +& pawtab%lmn_size,'), orbitals=',pawtab%orbitals(1:pawtab%basis_size) + call wrtout(ab_out,msg,'COLL') + call wrtout(std_out, msg,'COLL') + write(msg,'(a,f11.8)')' Spheres core radius: rc_sph=',pawtab%rpaw + call wrtout(ab_out,msg,'COLL') + call wrtout(std_out, msg,'COLL') + write(msg,'(a,i1,a)')' ',nmesh,' radial meshes are used:' + call wrtout(ab_out,msg,'COLL') + call wrtout(std_out, msg,'COLL') + do imsh=1,nmesh + if (radmesh(imsh)%mesh_type==1) & +& write(msg,'(a,i1,a,i4,a,g12.5)') & +& ' - mesh ',imsh,': r(i)=step*(i-1), size=',radmesh(imsh)%mesh_size,& +& ' , step=',radmesh(imsh)%rstep + if (radmesh(imsh)%mesh_type==2) & +& write(msg,'(a,i1,a,i4,2(a,g12.5))') & +& ' - mesh ',imsh,': r(i)=AA*[exp(BB*(i-1))-1], size=',radmesh(imsh)%mesh_size,& +& ' , AA=',radmesh(imsh)%rstep,' BB=',radmesh(imsh)%lstep + if (radmesh(imsh)%mesh_type==3) & +& write(msg,'(a,i1,a,i4,2(a,g12.5))') & +& ' - mesh ',imsh,': r(i)=AA*exp(BB*(i-2)), size=',radmesh(imsh)%mesh_size,& +& ' , AA=',radmesh(imsh)%rstep,' BB=',radmesh(imsh)%lstep + if (radmesh(imsh)%mesh_type==4) & +& write(msg,'(a,i1,a,i4,a,g12.5)') & +& ' - mesh ',imsh,': r(i)=-AA*ln(1-(i-1)/n), n=size=',radmesh(imsh)%mesh_size,& +& ' , AA=',radmesh(imsh)%rstep + call wrtout(ab_out,msg,'COLL') + call wrtout(std_out, msg,'COLL') + end do + if (pawtab%shape_type==-1) then + write(msg,'(a)')& + ' Shapefunction is NUMERIC type: directly read from atomic data file' + call wrtout(ab_out,msg,'COLL') + call wrtout(std_out, msg,'COLL') + end if + if (pawtab%shape_type==1) then + write(msg,'(2a,a,f6.3,a,i3)')& +& ' Shapefunction is EXP type: shapef(r)=exp(-(r/sigma)**lambda)',ch10,& +& ' with sigma=',pawtab%shape_sigma,' and lambda=',pawtab%shape_lambda + call wrtout(ab_out,msg,'COLL') + call wrtout(std_out, msg,'COLL') + end if + if (pawtab%shape_type==2) then + write(msg,'(a)')& + ' Shapefunction is SIN type: shapef(r)=[sin(pi*r/rshp)/(pi*r/rshp)]**2' + call wrtout(ab_out,msg,'COLL') + call wrtout(std_out, msg,'COLL') + end if + if (pawtab%shape_type==3) then + write(msg,'(a)')& +& ' Shapefunction is BESSEL type: shapef(r,l)=aa(1,l)*jl(q(1,l)*r)+aa(2,l)*jl(q(2,l)*r)' + call wrtout(ab_out,msg,'COLL') + call wrtout(std_out, msg,'COLL') + end if + if (pawtab%rshp<1.d-8) then + write(msg,'(a)') ' Radius for shape functions = sphere core radius' + else + write(msg,'(a,f11.8)') ' Radius for shape functions = ',pawtab%rshp + end if + call wrtout(ab_out,msg,'COLL') + call wrtout(std_out, msg,'COLL') + +!========================================================== +!Perfom tests + +!Are lmax and orbitals compatibles ? + if (lmax/=maxval(pawtab%orbitals)) then + write(msg, '(a,a,a)' )& +& 'lmax /= MAX(orbitals) !',ch10,& +& 'Action: check your pseudopotential file.' + LIBPAW_ERROR(msg) + end if + +!Only mesh_type=1,2, 3 or 4 allowed + do imsh=1,nmesh + if (radmesh(imsh)%mesh_type>4) then + write(msg, '(a,a,a)' )& +& 'Only mesh types 1,2, 3 or 4 allowed !',ch10,& +& 'Action : check your pseudopotential or input file.' + LIBPAW_ERROR(msg) + end if + end do + +!========================================================== +!Read tabulated atomic data + +!--------------------------------- +!Read wave-functions (phi) + do ib=1,pawtab%basis_size + read (funit,*) + if (pspversion==1) iread1=1 + if (pspversion>1) read (funit,*) iread1 + if (ib==1) then + call pawrad_free(pawrad) + call pawrad_init(pawrad,mesh_size=radmesh(iread1)%mesh_size,mesh_type=radmesh(iread1)%mesh_type,& +& rstep=radmesh(iread1)%rstep,lstep=radmesh(iread1)%lstep,r_for_intg=pawtab%rpaw) + pawtab%partialwave_mesh_size=pawrad%mesh_size + pawtab%mesh_size=pawrad_ifromr(pawrad,pawtab%rpaw)+5 + pawtab%mesh_size=min(pawtab%mesh_size,pawrad%mesh_size) + if (pawtab%mesh_size>pawrad%mesh_size-2) pawtab%mesh_size=pawrad%mesh_size + imainmesh=iread1 + LIBPAW_ALLOCATE(pawtab%phi,(pawtab%partialwave_mesh_size,pawtab%basis_size)) + else if (iread1/=imainmesh) then + write(msg, '(a,a,a)' )& +& 'All Phi and tPhi must be given on the same radial mesh !',ch10,& +& 'Action: check your pseudopotential file.' + LIBPAW_ERROR(msg) + end if + read (funit,*) (pawtab%phi(ir,ib),ir=1,pawtab%partialwave_mesh_size) + end do + +!--------------------------------- +!Read pseudo wave-functions (tphi) + LIBPAW_ALLOCATE(pawtab%tphi,(pawtab%partialwave_mesh_size,pawtab%basis_size)) + do ib=1,pawtab%basis_size + read (funit,*) + if (pspversion==1) iread1=1 + if (pspversion>1) read (funit,*) iread1 + if (iread1/=imainmesh) then + write(msg, '(a,a,a)' )& +& 'All Phi and tPhi must be given on the same radial mesh !',ch10,& +& 'Action: check your pseudopotential file.' + LIBPAW_ERROR(msg) + end if + read (funit,*) (pawtab%tphi(ir,ib),ir=1,pawtab%partialwave_mesh_size) + end do + write(msg,'(a,i1)') & +& ' Radial grid used for partial waves is grid ',imainmesh + call wrtout(ab_out,msg,'COLL') + call wrtout(std_out, msg,'COLL') + +!--------------------------------- +!Read projectors (tproj) + do ib=1,pawtab%basis_size + read (funit,*) + if (pspversion==1) iread1=2 + if (pspversion>1) read (funit,*) iread1 + if (ib==1) then + iprojmesh=iread1 + call pawrad_copy(radmesh(iprojmesh),tproj_mesh) + LIBPAW_POINTER_ALLOCATE(tproj,(tproj_mesh%mesh_size,pawtab%basis_size)) + else if (iread1/=iprojmesh) then + write(msg, '(a,a,a)' )& +& 'All tprojectors must be given on the same radial mesh !',ch10,& +& 'Action: check your pseudopotential file.' + LIBPAW_ERROR(msg) + end if +! read projectors from a mesh + read (funit,*) (tproj(ir,ib),ir=1,tproj_mesh%mesh_size) + end do + write(msg,'(a,i2)') & +& ' Radial grid used for projectors is grid ',iprojmesh + call wrtout(ab_out,msg,'COLL') + call wrtout(std_out, msg,'COLL') + +!--------------------------------- +!Read gaussian projectors for wavelets +! -- only if pawtab%has_wvl flag is on +! -- if not, we skip the lines + read(funit,'(a80)') pspline + if(index(trim(pspline),'GAUSSIAN')/=0) read_gauss=.true. + if (read_gauss) then + if (pawtab%has_wvl>0) then + call wvlpaw_allocate(pawtab%wvl) + jj=0 + do ib=1,pawtab%basis_size + if(ib/=1) read(funit,*) pspline +! read Gaussian coefficients + read(funit,*) pngau_, ptotgau_ !total number of gaussians + if(ib==1) then + pawtab%wvl%ptotgau=ptotgau_ + LIBPAW_ALLOCATE(pawtab%wvl%pngau,(pawtab%basis_size)) + LIBPAW_ALLOCATE(pawtab%wvl%parg,(2,pawtab%wvl%ptotgau)) + LIBPAW_ALLOCATE(pawtab%wvl%pfac,(2,pawtab%wvl%ptotgau)) + else + if(pawtab%wvl%ptotgau/=ptotgau_) then + write(msg,'(3a)')& +& 'Total number of gaussians, should be the same for all projectors !',ch10,& +& 'Action: check your pseudopotential file.' + LIBPAW_ERROR(msg) + end if + end if !ib==1 + read(funit,*)(pawtab%wvl%parg(:,ii),ii=jj+1,jj+pngau_) + read(funit,*)(pawtab%wvl%pfac(:,ii),ii=jj+1,jj+pngau_) + pawtab%wvl%pngau(ib)=pngau_ + jj=jj+pngau_ + end do + pawtab%has_wvl=2 + else +! If pawtab%has_wvl=0, we skip the lines + do ib=1,pawtab%basis_size + if(ib/=1) read(funit,*) + read(funit,*) pngau_, ptotgau_ + LIBPAW_ALLOCATE(val, (pngau_ *2)) + read(funit,*) val + read(funit,*) val + LIBPAW_DEALLOCATE(val) + end do + end if + end if + +!--------------------------------- +!Read core density (coredens) + if(read_gauss) read (funit,*) !if not read_gauss, this line was already read + if (pspversion==1) iread1=1 + if (pspversion>1) read (funit,*) iread1 + icoremesh=iread1 + call pawrad_copy(radmesh(icoremesh),core_mesh) + if ((radmesh(icoremesh)%mesh_type/=pawrad%mesh_type).or.& +& (radmesh(icoremesh)%rstep /=pawrad%rstep) .or.& +& (radmesh(icoremesh)%lstep /=pawrad%lstep)) then + write(msg, '(a,a,a,a,a)' )& +& 'Ncore must be given on a radial mesh with the same',ch10,& +& 'type and step(s) than the main radial mesh (mesh for Phi) !',ch10,& +& 'Action: check your pseudopotential file.' + LIBPAW_ERROR(msg) + end if + LIBPAW_POINTER_ALLOCATE(ncore,(core_mesh%mesh_size)) + read (funit,*) (ncore(ir),ir=1,core_mesh%mesh_size) + +!Construct and save VH[z_NC] if requested + if (pawtab%has_vhnzc==1) then + LIBPAW_ALLOCATE(pawtab%VHnZC,(pawtab%mesh_size)) + LIBPAW_ALLOCATE(vhnzc,(core_mesh%mesh_size)) + call atompaw_vhnzc(ncore,core_mesh,vhnzc,znucl) + pawtab%VHnZC(1:pawtab%mesh_size)=vhnzc(1:pawtab%mesh_size) + pawtab%has_vhnzc=2 + LIBPAW_DEALLOCATE(vhnzc) + end if + + pawtab%core_mesh_size=pawrad%mesh_size + if(save_core_msz) pawtab%core_mesh_size=core_mesh%mesh_size + LIBPAW_ALLOCATE(pawtab%coredens,(pawtab%core_mesh_size)) + pawtab%rcore=core_mesh%rad(pawtab%core_mesh_size) + pawtab%coredens(1:pawtab%core_mesh_size)=ncore(1:pawtab%core_mesh_size) + +!--------------------------------- +!Read pseudo core density (tcoredens) + if(save_core_msz) then + LIBPAW_ALLOCATE(pawtab%tcoredens,(pawtab%core_mesh_size,6)) + else + LIBPAW_ALLOCATE(pawtab%tcoredens,(pawtab%core_mesh_size,1)) + end if + pawtab%tcoredens=zero + read (funit,*) + if (pspversion==1) iread1=1 + if (pspversion>1) read (funit,*) iread1 + if (iread1/=icoremesh) then + write(msg, '(a,a,a,a,a,a,a,a)' )& +& 'Pseudized core density (tNcore) must be given',ch10,& +& 'on the same radial mesh as core density (Ncore) !',ch10,& +& 'Action: check your pseudopotential file.' + LIBPAW_ERROR(msg) + end if + LIBPAW_POINTER_ALLOCATE(tncore,(core_mesh%mesh_size)) + read (funit,*) (tncore(ir),ir=1,core_mesh%mesh_size) + if (maxval(abs(tncore(:)))2) then +! read (funit,fmt=*,err=30,end=30) ivlocmesh,vlocopt + msg=blank + read (funit,fmt='(a)') msg + read (msg,fmt=*) ivlocmesh + write(numb,'(i1)')ivlocmesh + ii=index(msg,numb) + if(len_trim(trim(msg(ii+1:)))/=0)then + submsg=trim(msg(ii+1:)) + if(len_trim(submsg)/=0)then + do ii=1,len_trim(submsg) + numb=submsg(ii:ii) + if(numb==blank)cycle + jj=index('0123456789',numb) + if(jj<1 .or. jj>10)exit + vlocopt=jj-1 + end do + end if + end if + end if + usexcnhat_out=0;if (vlocopt==1) usexcnhat_out=1 + call pawrad_copy(radmesh(ivlocmesh),vloc_mesh) + LIBPAW_POINTER_ALLOCATE(vlocr,(vloc_mesh%mesh_size)) + read (funit,*) (vlocr(ir),ir=1,vloc_mesh%mesh_size) + write(msg,'(a,i1)') & +& ' Radial grid used for Vloc is grid ',ivlocmesh + call wrtout(ab_out,msg,'COLL') + call wrtout(std_out, msg,'COLL') + +!--------------------------------- +!Eventually read "numeric" shapefunctions (if shape_type=-1) + if (pawtab%shape_type==-1) then + LIBPAW_ALLOCATE(pawtab%shapefunc,(pawtab%mesh_size,pawtab%l_size)) + do il=1,pawtab%l_size + read (funit,*) + if (pspversion==1) iread1=1 + if (pspversion>1) read (funit,*) iread1 + if (il==1) then + call pawrad_copy(radmesh(iread1),shpf_mesh) + ishpfmesh=iread1 + LIBPAW_ALLOCATE(shpf,(shpf_mesh%mesh_size,pawtab%l_size)) + else if (iread1/=ishpfmesh) then + write(msg, '(a,a,a)' )& +& 'All shape functions must be given on the same radial mesh !',ch10,& +& 'Action: check your pseudopotential file.' + LIBPAW_ERROR(msg) + end if + read (funit,*) (shpf(ir,il),ir=1,shpf_mesh%mesh_size) + end do + write(msg,'(a,i1)') & +& ' Radial grid used for shape functions is grid ',iread1 + call wrtout(ab_out,msg,'COLL') + call wrtout(std_out, msg,'COLL') + +! Has to spline shape functions if mesh is not the "main" mesh + if (ishpfmesh/=imainmesh) then + msz=shpf_mesh%mesh_size + LIBPAW_ALLOCATE(work1,(msz)) + LIBPAW_ALLOCATE(work2,(msz)) + LIBPAW_ALLOCATE(work3,(msz)) + LIBPAW_ALLOCATE(work4,(pawtab%mesh_size)) + work3(1:pawtab%mesh_size)=shpf_mesh%rad(1:pawtab%mesh_size) + work4(1:pawtab%mesh_size)=pawrad%rad(1:pawtab%mesh_size) + do il=1,pawtab%l_size + call bound_deriv(shpf(1:msz,il),shpf_mesh,msz,yp1,ypn) + call paw_spline(work3,shpf(:,il),msz,yp1,ypn,work1) + call paw_splint(msz,work3,shpf(:,il),work1,pawtab%mesh_size,work4,pawtab%shapefunc(:,il)) + end do + LIBPAW_DEALLOCATE(work1) + LIBPAW_DEALLOCATE(work2) + LIBPAW_DEALLOCATE(work3) + LIBPAW_DEALLOCATE(work4) + else + pawtab%shapefunc(:,:)=shpf(:,:) + end if + LIBPAW_DEALLOCATE(shpf) + call pawrad_free(shpf_mesh) + end if + +!--------------------------------- +!Read pseudo valence density (if psp version >=4) + if (pspversion>=4) then + read (funit,*) + read (funit,*) iread1 + ivalemesh=iread1 + call pawrad_copy(radmesh(iread1),vale_mesh) + LIBPAW_POINTER_ALLOCATE(tnvale,(vale_mesh%mesh_size)) + read (funit,*) (tnvale(ir),ir=1,vale_mesh%mesh_size) + pawtab%has_tvale=1 + write(msg,'(a,i1)') & +& ' Radial grid used for pseudo valence density is grid ',ivalemesh + call wrtout(ab_out,msg,'COLL') + call wrtout(std_out, msg,'COLL') + else + pawtab%has_tvale=0 + LIBPAW_POINTER_ALLOCATE(tnvale,(0)) + end if + +!--------------------------------- +!Initialize (to zero) kinetic energy densities (for testing purpose) + if (pawtab%has_coretau>0) then + write(msg,'(5a)' )& +& 'Kinetic energy density is requested but the core kinetic energy density',ch10,& +& 'is not present in the pseudopotential file!',ch10,& +& 'We assume that it is zero (for testing purpose).' + LIBPAW_WARNING(msg) + pawtab%coretau_mesh_size=pawtab%mesh_size + if(save_core_msz) pawtab%coretau_mesh_size=core_mesh%mesh_size + LIBPAW_ALLOCATE(pawtab%coretau,(pawtab%coretau_mesh_size)) + LIBPAW_ALLOCATE(pawtab%tcoretau,(pawtab%coretau_mesh_size)) + LIBPAW_POINTER_ALLOCATE(tcoretau,(core_mesh%mesh_size)) + pawtab%rcoretau=core_mesh%rad(pawtab%coretau_mesh_size) + pawtab%coretau=zero ; pawtab%tcoretau=zero ; tcoretau=zero + endif + +end subroutine pawpsp_read +!!*** + +!------------------------------------------------------------------------- + +!!****f* m_pawpsp/pawpsp_read_corewf +!! NAME +!! pawpsp_read_corewf +!! +!! FUNCTION +!! +!! INPUTS +!! [filename]= (optional) core WF file name +!! +!! OUTPUT +!! +!! SIDE EFFECTS +!! +!! NOTES +!! +!! SOURCE +subroutine pawpsp_read_corewf(energy_cor,indlmn_core,lcor,lmncmax,ncor,nphicor,radmesh,phi_cor,& +& filename,kappacor) ! optional arguments + +!Arguments ------------------------------------ + integer,intent(out) :: lmncmax,nphicor + character(len=*),optional :: filename +!arrays + integer,allocatable,intent(inout) :: indlmn_core(:,:),lcor(:),ncor(:) + integer,allocatable,intent(inout),optional :: kappacor(:) + real(dp),allocatable,intent(inout) :: phi_cor(:,:),energy_cor(:) + type(pawrad_type),intent(in) :: radmesh + +!Local variables------------------------------- + integer :: ib,i1,i2,il,im,ilm,ilmn,iln,ios,jln + integer :: nmesh,npts,unt,flagrel,tmp1,tmp2,tmp3,kappa,spinor,i2j,i2mj + real(dp) :: noccor,r1,r2 + logical :: ex,oldformat,usexml,diracrel + character(len=8) :: dum,dum1,dum2,dum3,dum4 + character(len=80) :: fline + character(len=500) :: msg + character(len=fnlen) :: filename_ + +!arrays + integer,allocatable :: meshtp(:),meshsz(:) + real(dp),allocatable :: rad(:),radstp(:),work(:) + real(dp),allocatable :: logstp(:),phitmp(:) + type(pawrad_type) :: tmpmesh + +! ************************************************************************ + +!Check for core WF file existence and XML format + usexml=.false.;oldformat=.false. + if (present(filename)) then +! Core WF file given as optional argument + filename_=filename;ex=.false. + inquire(file=trim(filename_),iostat=ios,exist=ex) + if (ios/=0) then + write(msg,'(2a)') 'INQUIRE returns an error for file ',trim(filename_) + LIBPAW_ERROR(msg) + end if + if (.not.ex) then + write(msg,'(3a)') 'This file does not exist: ',trim(filename_),'!' + LIBPAW_ERROR(msg) + end if + unt = libpaw_get_free_unit() + open(unit=unt,file=trim(filename_),form='formatted',status='old', action="read") + read(unt,*) fline + close(unt) + usexml=(fline(1:5)=='= radial mesh for the core density +!! [coretau_mesh]=radial mesh for the core kinetic energy density +!! imainmesh= serial number of the main mesh +!! ixc=exchange-correlation choice from main routine data file +!! lnmax=max. number of (l,n) components over all type of psps +!! angular momentum of nonlocal pseudopotential +!! mqgrid_ff=dimension of q (or G) grid for nl form factors (array ffspl) +!! mqgrid_vl=dimension of q (or G) grid for Vloc (array vlspl) +!! ncore(core_mesh%mesh_size)= core density +!! nmesh= number of radial meshes +!! pawrad =paw radial mesh and related data +!! pawxcdev=choice of XC development (0=no dev. (use of angular mesh) ; 1 or 2=dev. on moments) +!! pspversion= version of the atompaw code used to generate paw data. +!! qgrid_ff(mqgrid_ff)=values of q on grid from 0 to qmax (bohr^-1) for nl form factors +!! qgrid_vl(mqgrid_vl)=values of q on grid from 0 to qmax (bohr^-1) for Vloc +!! radmesh(nmesh)=paw radial meshes and related data +!! tncore(core_mesh%mesh_size)= pseudo core density +!! [tcoretau(coretau_mesh%mesh_size)]= pseudo core kinetic energy density +!! tproj(tproj_mesh%mesh_size)= non-local projectors in real space +!! tproj_mesh= radial mesh for the projectors +!! usexcnhat=0 if compensation charge density is not included in XC terms +!! 1 if compensation charge density is included in XC terms +!! vale_mesh= radial mesh for the valence density +!! xc_denpos= lowest allowed density (usually for the computation of the XC functionals) +!! [xc_taupos]= lowest allowed kinetic energy density (for mGGA XC functionals) +!! vlocopt= option for the local potential.(0=Vbare, 1=VH(tnzc) with hat in XC, 2=VH(tnzc) w/o hat in XC) +!! vlocr(vloc_mesh%mesh_size)= local potential according to vlocopt. +!! xclevel= XC functional level +!! zion=nominal valence of atom as specified in psp file +!! znucl=atomic number of atom as specified in input file to main routine +!! +!! OUTPUT +!! epsatm=$ (4\pi)\int_0^\infty [r^2 (V(r)+\frac{Zv}{r}) dr]$(hartree) +!! ffspl(mqgrid_ff,2,lnmax)=form factor f_l(q) and second derivative +!! from spline fit for each angular momentum and each projector; +!! vlspl(mqgrid_vl,2)=q^2 Vloc(q) and second derivatives from spline fit +!! xcccrc=XC core correction cutoff radius (bohr) from psp file +!! +!! SIDE EFFECTS +!! pawtab =paw tabulated starting data +!! tnvale(vale_mesh%mesh_size)= pseudo valence density (+ nhat in output) +!! vloc_mesh= radial mesh for the local potential +!! +!! NOTES +!! +!! +!! SOURCE + +subroutine pawpsp_calc(core_mesh,epsatm,ffspl,imainmesh,hyb_mixing,ixc,lnmax,& +& mmax,mqgrid_ff,mqgrid_vl,ncore,nmesh,pawrad,pawtab,pawxcdev,pspversion,& +& qgrid_ff,qgrid_vl,radmesh,tncore,tnvale,tproj,tproj_mesh,usexcnhat,vale_mesh,& +& vloc_mesh,vlocopt,vlocr,vlspl,xcccrc,xclevel,xc_denpos,zion,znucl,& +& tcoretau,coretau_mesh,xc_taupos) !optional + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: imainmesh,ixc,lnmax,mqgrid_ff,mqgrid_vl + integer,intent(in) :: nmesh,pawxcdev,pspversion,usexcnhat,vlocopt + integer,intent(in) ::mmax + integer,intent(in) :: xclevel + real(dp),intent(in) :: hyb_mixing,xc_denpos,zion,znucl + real(dp),intent(in),optional :: xc_taupos + real(dp),intent(out) :: epsatm,xcccrc + type(pawrad_type),intent(in) :: core_mesh,tproj_mesh,vale_mesh + type(pawrad_type),intent(in),optional :: coretau_mesh + type(pawrad_type),intent(inout) ::pawrad,vloc_mesh + type(pawtab_type),intent(inout) :: pawtab +!arrays + real(dp),intent(in) :: ncore(core_mesh%mesh_size),tncore(core_mesh%mesh_size) + real(dp),intent(in),optional :: tcoretau(:) + real(dp),intent(in) :: qgrid_vl(mqgrid_vl),qgrid_ff(mqgrid_ff) + real(dp),intent(inout) :: ffspl(mqgrid_ff,2,lnmax) + real(dp),intent(out) :: vlspl(mqgrid_vl,2) + real(dp),intent(inout) :: tnvale(vale_mesh%mesh_size*pawtab%has_tvale) + real(dp),intent(inout) :: tproj(tproj_mesh%mesh_size,pawtab%basis_size) + real(dp),intent(inout) :: vlocr(vloc_mesh%mesh_size) + type(pawrad_type),intent(in) :: radmesh(nmesh) + +!Local variables ------------------------------ +!scalars + integer,parameter :: reduced_mshsz=2501 + integer :: ib,il,ilm,ilmn,iln,ir,isnotzero,itest + integer :: j0lmn,jlm,jlmn,jln,klmn,msz,msz1,msz_tmp,mst_tmp,nspden,usekden + logical :: has_dij0,non_magnetic_xc,reduced_ncor,reduced_taucor,reduced_nval,reduced_vloc,testval + real(dp),parameter :: reduced_rstep=0.00025_dp,rm_vloc=20.0_dp + real(dp) :: d2nvdq0,intg,intvh,lstep_tmp,my_xc_taupos,qcore,qq,rstep_tmp,yp1,ypn + character(len=500) :: msg + type(pawang_type) :: pawang_tmp + type(pawrad_type) :: rcore_mesh,rcoretau_mesh,rvale_mesh,rvloc_mesh,tproj_mesh_new +!arrays + real(dp) :: tmp_qgrid(1),tmp_q2vq(1) + real(dp),allocatable :: ncorwk(:),nhat(:),nhatwk(:),nwk(:),r2k(:) + real(dp),allocatable :: rtncor(:),rttaucor(:),rtnval(:),rvlocr(:) + real(dp),allocatable :: vbare(:),vh(:),vhnzc(:),vxc1(:),vxc2(:) + real(dp),allocatable,target :: work1(:),work2(:),work3(:) + real(dp),pointer :: tmp1(:),tmp2(:) + logical :: tmp_lmselect(1) + +! ************************************************************************* + +!========================================================== +!Perfom tests on meshes + +!Are radial meshes for Phi and Vloc compatibles ? +! if (vloc_mesh%rmax=1) then + if (.not.(present(coretau_mesh))) then + msg='tcoretau present but not coretau_mesh!' + LIBPAW_BUG(msg) + end if + if (size(tcoretau)>coretau_mesh%mesh_size) then + msg='wrong size for tcoretau!' + LIBPAW_BUG(msg) + end if + if (coretau_mesh%mesh_size=1.and.core_mesh%mesh_sizepawrad%rmax+tol8) then + write(msg, '(a,a,a)' )& +& 'Radius of PAW sphere is outside the radial mesh !',ch10,& +& 'Action: check your pseudopotential file.' + LIBPAW_ERROR(msg) + end if + +!Max. radius of mesh for Vloc has to be "small" in order to avoid numeric noise ? + if (vloc_mesh%rmax>rm_vloc) then + msz_tmp=pawrad_ifromr(vloc_mesh,rm_vloc);mst_tmp=vloc_mesh%mesh_type + rstep_tmp=vloc_mesh%rstep;lstep_tmp=vloc_mesh%lstep + call pawrad_free(vloc_mesh) + call pawrad_init(vloc_mesh,mesh_size=msz_tmp,mesh_type=mst_tmp,& +& rstep=rstep_tmp,lstep=lstep_tmp,r_for_intg=rm_vloc) + write(msg, '(a,i4,a)' ) ' Mesh size for Vloc has been set to ', & +& vloc_mesh%mesh_size,' to avoid numerical noise.' + call wrtout(std_out,msg,'COLL') + call wrtout(ab_out,msg,'COLL') + end if + +!This test has been disable... MT 2006-25-10 +!For Simpson rule, it is better to have odd mesh sizes +!itest=0 +!do imsh=1,nmesh +!if (mod(radmesh(imsh)%mesh_size,2)==0.and.radmesh(imsh)%mesh_type==1) itest=1 +!end do +!if (itest==1) then +! write(msg, '(5a)' ) & +!& 'Regular radial meshes should have odd number of points ',ch10,& +!& 'for better accuracy of integration sheme (Simpson rule).',ch10,& +!& 'Althought it''s not compulsory, you should change mesh sizes in psp file.' +! LIBPAW_WARNING(msg) +!end if + +!Test the compatibilty between Rpaw and mesh for (t)Phi + if (pspversion>=3) then + itest=pawrad_ifromr(radmesh(imainmesh),pawtab%rpaw) +! This test has been disable... MT 2015-02-12 +! if (itest+2>radmesh(imainmesh)%mesh_size) then +! write(msg, '(9a)' ) & +!& 'Atomic data could produce inaccurate results:',ch10,& +!& 'Wavefunctions and pseudo-wavefunctions should',ch10,& +!& 'be given on a radial mesh larger than the PAW',ch10,& +!& 'spheres (at least 2 additional points) !',ch10,& +!& 'Action: check your pseudopotential file.' +! LIBPAW_WARNING(msg) +! end if + if (abs(pawtab%rpaw-radmesh(imainmesh)%rad(itest))tol8) isnotzero=1 + end do + end do + if (isnotzero>0) then + write(msg, '(7a)' )& +& 'Atomic data are inconsistent:',ch10,& +& 'For r>=r_paw, pseudo wavefunctions are not',ch10,& +& 'equal to wave functions (Phi(r)/=tPhi(r)) !',ch10,& +& 'Action: check your pseudopotential file.' + LIBPAW_ERROR(msg) + end if + else +! For compatibility reasons set PAW radius at the end of mesh (older versions) + if (pawtab%rpaw/=pawrad%rmax) then + msz_tmp=pawrad%mesh_size;mst_tmp=pawrad%mesh_type + rstep_tmp=pawrad%rstep;lstep_tmp=pawrad%lstep + call pawrad_free(pawrad) + call pawrad_init(pawrad,mesh_size=msz_tmp,mesh_type=mst_tmp,rstep=rstep_tmp,lstep=lstep_tmp) + pawtab%rpaw=pawrad%rmax + end if + end if +!If Vloc is a "Vbare" potential, it has to be localized inside PAW spheres + if (vlocopt==0.and.(vloc_mesh%rmax>pawtab%rpaw+tol10)) then + if(vlocr(pawrad_ifromr(vloc_mesh,pawtab%rpaw))>tol10) then + write(msg, '(7a)' )& +& 'Atomic data are inconsistent:',ch10,& +& 'Local potential is a "Vbare" potential',ch10,& +& 'and is not localized inside PAW sphere !',ch10,& +& 'Vbare is set to zero if r>rpaw.' + LIBPAW_WARNING(msg) + do ir=pawrad_ifromr(vloc_mesh,pawtab%rpaw),vloc_mesh%mesh_size + vlocr(ir)=zero + end do + end if + end if + +!========================================================== +!Initializations + + has_dij0=(allocated(pawtab%dij0)) + +!Allocate/initialize some dummy variables + tmp_lmselect(1)=.true. + non_magnetic_xc=.false. + if (pawxcdev==0) then + pawang_tmp%l_size_max=1;pawang_tmp%angl_size=1;pawang_tmp%ylm_size=1 + pawang_tmp%use_ls_ylm=0;pawang_tmp%gnt_option=0;pawang_tmp%ngnt=0;pawang_tmp%nsym=0 + LIBPAW_ALLOCATE(pawang_tmp%angwgth,(1)) + pawang_tmp%angwgth(1)=one + LIBPAW_ALLOCATE(pawang_tmp%anginit,(3,1)) + pawang_tmp%anginit(1,1)=one + pawang_tmp%anginit(2:3,1)=zero + LIBPAW_ALLOCATE(pawang_tmp%ylmr,(1,1)) + pawang_tmp%ylmr(1,1)=1._dp/sqrt(four_pi) + LIBPAW_ALLOCATE(pawang_tmp%ylmrgr,(9,1,1)) + pawang_tmp%ylmrgr(1:9,1,1)=zero + end if + +!========================================================== +!Compute ffspl(q) (and derivatives) + + ffspl=zero + if (mqgrid_ff>0) then + call pawpsp_nl(ffspl,pawtab%indlmn,pawtab%lmn_size,lnmax,mqgrid_ff,qgrid_ff,& +& tproj_mesh,tproj) + end if + +!========================================================== +!Compute eventually compensation charge radius (i.e. radius for shape functions) + + if (pawtab%shape_type>0.and.pawtab%rshp<1.d-8) then + pawtab%rshp=pawtab%rpaw + else if (pawtab%shape_type==-1) then + ir=pawrad_ifromr(radmesh(imainmesh),pawtab%rpaw)+1;isnotzero=0 + do while ((isnotzero==0).and.(ir>1)) + ir=ir-1;il=0 + do while ((isnotzero==0).and.(iltol16) isnotzero=1 + end do + end do + ir=min(ir+1,pawrad_ifromr(radmesh(imainmesh),pawtab%rpaw)) + pawtab%rshp=radmesh(imainmesh)%rad(ir) + do il=1,pawtab%l_size + if (pawtab%shapefunc(ir,il)>tol6) then + write(msg, '(a,a,a)' )& +& 'Shape function is not zero at PAW radius !',ch10,& +& 'Action: check your pseudopotential file.' + LIBPAW_ERROR(msg) + end if + end do + end if + +!========================================================== +!Compute compensation charge density (nhat) +!Add it to pseudo valence density + + if (pawtab%has_tvale==1) then + msz=vale_mesh%mesh_size + LIBPAW_ALLOCATE(nhat,(msz)) +! A-Has to compute norm of nhat (Int[n-tild_n]) + testval=(abs(tnvale(msz))msz)then + vlocr(msz+1:vloc_mesh%mesh_size)=vh(msz)*vloc_mesh%rad(msz)/vloc_mesh%rad(msz+1:vloc_mesh%mesh_size) + end if + LIBPAW_DEALLOCATE(vbare) + LIBPAW_DEALLOCATE(vh) + +! Compute and int[VH(tnzc)*Qijhat(r)dr] parts of Dij0 +! Note: it is possible as core_mesh and radmesh(imainmesh) have the same steps + if (has_dij0) then + msz=radmesh(imainmesh)%mesh_size + LIBPAW_ALLOCATE(work1,(msz)) + work1(1:msz)=vlocr(1:msz)*r2k(1:msz) + call simp_gen(intvh,work1,radmesh(imainmesh)) + do jlmn=1,pawtab%lmn_size + j0lmn=jlmn*(jlmn-1)/2;jlm=pawtab%indlmn(4,jlmn);jln=pawtab%indlmn(5,jlmn) + do ilmn=1,jlmn + klmn=j0lmn+ilmn;ilm=pawtab%indlmn(4,ilmn);iln=pawtab%indlmn(5,ilmn) + if (jlm==ilm) then + work1(1:msz)=pawtab%tphi(1:msz,iln)*pawtab%tphi(1:msz,jln)*(vlocr(1:msz)-intvh) & +& -pawtab%phi (1:msz,iln)*pawtab%phi (1:msz,jln)*intvh + call simp_gen(intg,work1,radmesh(imainmesh)) + pawtab%dij0(klmn)=pawtab%dij0(klmn)+intg + end if + end do + end do + LIBPAW_DEALLOCATE(work1) + end if + LIBPAW_DEALLOCATE(r2k) + end if + +!========================================================== +!If usexcnhat in psp file is different from usexcnhat chosen +!by user, convert VH(tnzc) and Dij0 + + if (pawtab%usexcnhat==-1) then + pawtab%usexcnhat=usexcnhat + else if (usexcnhat/=pawtab%usexcnhat) then + if (pawtab%has_tvale==0) then + write(msg, '(5a)' ) & +& 'It is only possible to modify the use of compensation charge density',ch10,& +& 'for a file format containing the pseudo valence density (format>=paw4 or XML)!',ch10,& +& 'Action: use usexcnhat=-1 in input file or change psp file format.' + LIBPAW_ERROR(msg) + else if (usekden>=1) then + write(msg, '(5a)' ) & +& 'It is not possible to modify the use of compensation charge density',ch10,& +& 'within the metaGGA XC functional (need valence kinetic density)!',ch10,& +& 'Action: use usexcnhat=-1 in input file or change psp file format.' + LIBPAW_ERROR(msg) + else + msz=vloc_mesh%mesh_size +! Retrieve tvale and nhat onto vloc mesh + LIBPAW_ALLOCATE(nwk,(msz)) + LIBPAW_ALLOCATE(ncorwk,(msz)) + LIBPAW_ALLOCATE(nhatwk,(msz)) + nwk=zero;ncorwk=zero;nhatwk=zero + if ((core_mesh%mesh_type/=vloc_mesh%mesh_type).or.& +& (core_mesh%rstep /=vloc_mesh%rstep) .or.& +& (core_mesh%lstep /=vloc_mesh%lstep)) then + LIBPAW_ALLOCATE(work1,(core_mesh%mesh_size)) + msz1=msz;if (core_mesh%rmax work1 + work2(1:msz)=nwk + work3(1:msz)=nhatwk + if (nspden==2) work2(msz+1:2*msz)=half*nwk + if (nspden==2) work3(msz+1:2*msz)=half*nhatwk + if (pawxcdev/=0) then + call pawxcm(ncorwk,yp1,ypn,0,hyb_mixing,ixc,work1,1,tmp_lmselect,work3,0,non_magnetic_xc,msz,nspden,5,& +& pawang_tmp,vloc_mesh,pawxcdev,work2,pawtab%usetcore,0,vxc1,xclevel,xc_denpos) + call pawxcm(ncorwk,yp1,ypn,0,hyb_mixing,ixc,work1,1,tmp_lmselect,work3,0,non_magnetic_xc,msz,nspden,5,& +& pawang_tmp,vloc_mesh,pawxcdev,work2,pawtab%usetcore,2,vxc2,xclevel,xc_denpos) + vxc1=vxc1/sqrt(four_pi);vxc2=vxc2/sqrt(four_pi) ! Deduce Vxc from its first moment + else + call pawxc(ncorwk,yp1,ypn,hyb_mixing,ixc,work1,tmp1,1,tmp_lmselect,work3,0,0,non_magnetic_xc,msz,nspden,5,& +& pawang_tmp,vloc_mesh,work2,pawtab%usetcore,0,vxc1,xclevel,xc_denpos) + call pawxc(ncorwk,yp1,ypn,hyb_mixing,ixc,work1,tmp1,1,tmp_lmselect,work3,0,0,non_magnetic_xc,msz,nspden,5,& +& pawang_tmp,vloc_mesh,work2,pawtab%usetcore,2,vxc2,xclevel,xc_denpos) + end if + LIBPAW_DEALLOCATE(nwk) + LIBPAW_DEALLOCATE(ncorwk) + LIBPAW_DEALLOCATE(nhatwk) + LIBPAW_DEALLOCATE(work1) + LIBPAW_DEALLOCATE(work2) + LIBPAW_DEALLOCATE(work3) + else + LIBPAW_ALLOCATE(vxc1,(msz)) + LIBPAW_ALLOCATE(vxc2,(msz)) + LIBPAW_ALLOCATE(work1,(msz)) + tmp1 => work1 + if (pawxcdev/=0) then + call pawxcm(ncorwk,yp1,ypn,0,hyb_mixing,ixc,work1,1,tmp_lmselect,nhatwk,0,non_magnetic_xc,msz,1,5,& +& pawang_tmp,vloc_mesh,pawxcdev,nwk,pawtab%usetcore,0,vxc1,xclevel,xc_denpos) + call pawxcm(ncorwk,yp1,ypn,0,hyb_mixing,ixc,work1,1,tmp_lmselect,nhatwk,0,non_magnetic_xc,msz,1,5,& +& pawang_tmp,vloc_mesh,pawxcdev,nwk,pawtab%usetcore,2,vxc2,xclevel,xc_denpos) + vxc1=vxc1/sqrt(four_pi);vxc2=vxc2/sqrt(four_pi) ! Deduce Vxc from its first moment + else + call pawxc(ncorwk,yp1,ypn,hyb_mixing,ixc,work1,tmp1,1,tmp_lmselect,nhatwk,0,0,non_magnetic_xc,msz,1,5,& +& pawang_tmp,vloc_mesh,nwk,pawtab%usetcore,0,vxc1,xclevel,xc_denpos) + call pawxc(ncorwk,yp1,ypn,hyb_mixing,ixc,work1,tmp1,1,tmp_lmselect,nhatwk,0,0,non_magnetic_xc,msz,1,5,& +& pawang_tmp,vloc_mesh,nwk,pawtab%usetcore,2,vxc2,xclevel,xc_denpos) + end if + LIBPAW_DEALLOCATE(nwk) + LIBPAW_DEALLOCATE(ncorwk) + LIBPAW_DEALLOCATE(nhatwk) + LIBPAW_DEALLOCATE(work1) + endif +! Compute difference of XC potentials + if (usexcnhat==0.and.pawtab%usexcnhat/=0) vxc1(1:msz)=vxc2(1:msz)-vxc1(1:msz) + if (usexcnhat/=0.and.pawtab%usexcnhat==0) vxc1(1:msz)=vxc1(1:msz)-vxc2(1:msz) +! Modify VH(tnzc) + vlocr(1:msz)=vlocr(1:msz)-vxc1(1:msz) + if (has_dij0) then +! Modify Dij0 + LIBPAW_ALLOCATE(work2,(pawtab%lmn2_size)) + call atompaw_kij(pawtab%indlmn,work2,pawtab%lmn_size,ncore,0,0,pawtab,pawrad,& +& core_mesh,vloc_mesh,vxc1(1:msz),znucl) + pawtab%dij0=work2 + LIBPAW_DEALLOCATE(work2) + end if + LIBPAW_DEALLOCATE(vxc1) + LIBPAW_DEALLOCATE(vxc2) + end if ! has_tvale/=0 + end if + if (pawtab%usexcnhat==0) then + write(msg,'(a)') & +& ' Compensation charge density is not taken into account in XC energy/potential' + call wrtout(ab_out,msg,'COLL') + call wrtout(std_out, msg,'COLL') + end if + if (pawtab%usexcnhat==1) then + write(msg,'(a)') & +& ' Compensation charge density is taken into account in XC energy/potential' + call wrtout(ab_out,msg,'COLL') + call wrtout(std_out, msg,'COLL') + end if + +!========================================================== +! Calculate the coefficient beta = \int { vH[nZc](r) - vloc(r) } 4pi r^2 dr +! + LIBPAW_ALLOCATE(vhnzc,(core_mesh%mesh_size)) + LIBPAW_ALLOCATE(nwk,(core_mesh%mesh_size)) +! get vH[nZc] + call atompaw_vhnzc(ncore,core_mesh,vhnzc,znucl) + +!Transpose vlocr mesh into core mesh + nwk(:)=zero + if ((core_mesh%mesh_type/=vloc_mesh%mesh_type).or.& +& (core_mesh%rstep /=vloc_mesh%rstep) .or.& +& (core_mesh%lstep /=vloc_mesh%lstep)) then + msz=core_mesh%mesh_size;if (vloc_mesh%rmaxint(reduced_mshsz)) + if (reduced_vloc) then + msz=vloc_mesh%mesh_size + lstep_tmp=log(0.9999999_dp*vloc_mesh%rmax/reduced_rstep)/dble(reduced_mshsz-2) + call pawrad_init(rvloc_mesh,mesh_size=reduced_mshsz,mesh_type=3,& +& rstep=reduced_rstep,lstep=lstep_tmp) + LIBPAW_ALLOCATE(rvlocr,(reduced_mshsz)) + call bound_deriv(vlocr(1:msz),vloc_mesh,msz,yp1,ypn) + LIBPAW_ALLOCATE(work1,(msz)) + LIBPAW_ALLOCATE(work2,(msz)) + LIBPAW_ALLOCATE(work3,(msz)) + work3(1:msz)=vloc_mesh%rad(1:msz) + call paw_spline(work3,vlocr,msz,yp1,ypn,work1) + call paw_splint(msz,work3,vlocr,work1,reduced_mshsz,rvloc_mesh%rad,rvlocr) + LIBPAW_DEALLOCATE(work1) + LIBPAW_DEALLOCATE(work2) + LIBPAW_DEALLOCATE(work3) + end if + +!Keep VH(tnZc) eventually in memory + if (pawtab%has_vhtnzc==1) then + LIBPAW_ALLOCATE(pawtab%vhtnzc,(pawtab%mesh_size)) + if ((reduced_vloc).and.(rvloc_mesh%mesh_type==pawrad%mesh_type)& +& .and.(rvloc_mesh%rstep==pawrad%rstep).and.(rvloc_mesh%lstep==pawrad%lstep)) then + pawtab%vhtnzc(1:pawtab%mesh_size)=rvlocr(1:pawtab%mesh_size) + pawtab%has_vhtnzc=2 + else if ((vloc_mesh%mesh_type==pawrad%mesh_type)& +& .and.(vloc_mesh%rstep==pawrad%rstep).and.(vloc_mesh%lstep==pawrad%lstep)) then + pawtab%vhtnzc(1:pawtab%mesh_size)=vlocr(1:pawtab%mesh_size) + pawtab%has_vhtnzc=2 + else + msg = 'Vloc mesh is not right !' + LIBPAW_ERROR(msg) + end if + end if + +!========================================================== +!Try to optimize CPU time: +!If ncore mesh size is big, spline tncore into a smaller log. mesh + + reduced_ncor=(core_mesh%mesh_size>int(reduced_mshsz)).and.(pawtab%usetcore/=0) + if (reduced_ncor) then + msz=core_mesh%mesh_size + lstep_tmp=log(0.9999999_dp*core_mesh%rmax/reduced_rstep)/dble(reduced_mshsz-2) + call pawrad_init(rcore_mesh,mesh_size=reduced_mshsz,mesh_type=3,& +& rstep=reduced_rstep,lstep=lstep_tmp) + LIBPAW_ALLOCATE(rtncor,(reduced_mshsz)) + call bound_deriv(tncore(1:msz),core_mesh,msz,yp1,ypn) + LIBPAW_ALLOCATE(work1,(msz)) + LIBPAW_ALLOCATE(work2,(msz)) + LIBPAW_ALLOCATE(work3,(msz)) + work3(1:msz)=core_mesh%rad(1:msz) + call paw_spline(work3,tncore,msz,yp1,ypn,work1) + call paw_splint(msz,work3,tncore,work1,reduced_mshsz,rcore_mesh%rad,rtncor) + LIBPAW_DEALLOCATE(work1) + LIBPAW_DEALLOCATE(work2) + LIBPAW_DEALLOCATE(work3) + end if + +!========================================================== +!Try to optimize CPU time: +!If coretau mesh size is big, spline tcoretau into a smaller log. mesh + + reduced_taucor=.false. + if (usekden>=1.and.present(tcoretau)) then + reduced_taucor=(coretau_mesh%mesh_size>int(reduced_mshsz)).and.(pawtab%usetcore/=0) + if (reduced_taucor) then + msz=coretau_mesh%mesh_size + lstep_tmp=log(0.9999999_dp*coretau_mesh%rmax/reduced_rstep)/dble(reduced_mshsz-2) + call pawrad_init(rcoretau_mesh,mesh_size=reduced_mshsz,mesh_type=3,& +& rstep=reduced_rstep,lstep=lstep_tmp) + LIBPAW_ALLOCATE(rttaucor,(reduced_mshsz)) + call bound_deriv(tcoretau(1:msz),coretau_mesh,msz,yp1,ypn) + LIBPAW_ALLOCATE(work1,(msz)) + LIBPAW_ALLOCATE(work2,(msz)) + LIBPAW_ALLOCATE(work3,(msz)) + work3(1:msz)=coretau_mesh%rad(1:msz) + call paw_spline(work3,tcoretau,msz,yp1,ypn,work1) + call paw_splint(msz,work3,tcoretau,work1,reduced_mshsz,rcoretau_mesh%rad,rttaucor) + LIBPAW_DEALLOCATE(work1) + LIBPAW_DEALLOCATE(work2) + LIBPAW_DEALLOCATE(work3) + end if + end if + +!========================================================== +!Try to optimize CPU time: +!If vale mesh size is big, spline tnvale into a smaller log. mesh + + if (pawtab%has_tvale==1) then + reduced_nval=(vale_mesh%mesh_size>int(reduced_mshsz)) + if (reduced_nval) then + msz=vale_mesh%mesh_size + lstep_tmp=log(0.9999999_dp*vale_mesh%rmax/reduced_rstep)/dble(reduced_mshsz-2) + call pawrad_init(rvale_mesh,mesh_size=reduced_mshsz,mesh_type=3,& +& rstep=reduced_rstep,lstep=lstep_tmp) + LIBPAW_ALLOCATE(rtnval,(reduced_mshsz)) + call bound_deriv(tnvale(1:msz),vale_mesh,msz,yp1,ypn) + LIBPAW_ALLOCATE(work1,(msz)) + LIBPAW_ALLOCATE(work2,(msz)) + LIBPAW_ALLOCATE(work3,(msz)) + work3(1:msz)=vale_mesh%rad(1:msz) + call paw_spline(work3,tnvale,msz,yp1,ypn,work1) + call paw_splint(msz,work3,tnvale,work1,reduced_mshsz,rvale_mesh%rad,rtnval) + LIBPAW_DEALLOCATE(work1) + LIBPAW_DEALLOCATE(work2) + LIBPAW_DEALLOCATE(work3) + end if + else + reduced_nval=.false. + end if +!========================================================== +!Compute Vlspl(q) (and second derivative) from Vloc(r) + +!Compute Vlspl(q)=q^2.Vloc(q) from vloc(r) + if(mqgrid_vl>0) then + if (reduced_vloc) then + call pawpsp_lo(epsatm,mqgrid_vl,qgrid_vl,vlspl(:,1),rvloc_mesh,rvlocr,yp1,ypn,zion) + else + call pawpsp_lo(epsatm,mqgrid_vl,qgrid_vl,vlspl(:,1),vloc_mesh,vlocr,yp1,ypn,zion) + end if +! Compute second derivative of Vlspl(q) + call paw_spline(qgrid_vl,vlspl(:,1),mqgrid_vl,yp1,ypn,vlspl(:,2)) + else + ! Only to compute epsatm + epsatm=zero + if (reduced_vloc) then + call pawpsp_lo(epsatm,1,tmp_qgrid,tmp_q2vq,rvloc_mesh,rvlocr,yp1,ypn,zion) + else + call pawpsp_lo(epsatm,1,tmp_qgrid,tmp_q2vq,vloc_mesh,vlocr,yp1,ypn,zion) + end if + end if +!========================================================== +!Compute tcorespl(q) (and second derivative) from tNcore(r) + + pawtab%mqgrid=mqgrid_vl + xcccrc=core_mesh%rmax + LIBPAW_ALLOCATE(pawtab%tcorespl,(pawtab%mqgrid,2)) + + if(mqgrid_vl>0.and.pawtab%usetcore/=0) then +! Compute tcorespl(q)=tNc(q) from tNcore(r) + if (reduced_ncor) then + call pawpsp_cg(pawtab%dncdq0,pawtab%d2ncdq0,mqgrid_vl,qgrid_vl,pawtab%tcorespl(:,1),rcore_mesh,rtncor,yp1,ypn) + else + call pawpsp_cg(pawtab%dncdq0,pawtab%d2ncdq0,mqgrid_vl,qgrid_vl,pawtab%tcorespl(:,1),core_mesh,tncore,yp1,ypn) + end if +! Compute second derivative of tcorespl(q) + call paw_spline(qgrid_vl,pawtab%tcorespl(:,1),mqgrid_vl,yp1,ypn,pawtab%tcorespl(:,2)) + else + pawtab%tcorespl=zero + pawtab%dncdq0=zero + pawtab%d2ncdq0=zero + end if + +!========================================================== +!Compute tcoretauspl(q) + + if (present(tcoretau)) then + LIBPAW_ALLOCATE(pawtab%tcoretauspl,(pawtab%mqgrid,2*usekden)) + if (usekden==1) then + if (coretau_mesh%rmax/=xcccrc) then + write(msg, '(a,a,a)' )& +& 'Core density and core kinetic density should be given on the same grid!',ch10,& +& 'Action : check your pseudopotential (increase tNvale meshSize).' + LIBPAW_ERROR(msg) + end if + if(mqgrid_vl>0) then +! Compute tcorespl(q)=tNc(q) from tNcore(r) + if (reduced_taucor) then + call pawpsp_cg(pawtab%dtaucdq0,qq,mqgrid_vl,qgrid_vl,pawtab%tcoretauspl(:,1),rcoretau_mesh,rttaucor,yp1,ypn) + else + call pawpsp_cg(pawtab%dtaucdq0,qq,mqgrid_vl,qgrid_vl,pawtab%tcoretauspl(:,1),coretau_mesh,tcoretau,yp1,ypn) + end if +! Compute second derivative of tcorespl(q) + call paw_spline(qgrid_vl,pawtab%tcoretauspl(:,1),mqgrid_vl,yp1,ypn,pawtab%tcoretauspl(:,2)) + else + pawtab%tcoretauspl=zero + pawtab%dtaucdq0=zero + end if + end if + end if + +!========================================================== +!Compute tvalespl(q) (and second derivative) from tNvale(r) + + if (pawtab%has_tvale/=0.and.mqgrid_vl>0) then + LIBPAW_ALLOCATE(pawtab%tvalespl,(pawtab%mqgrid,2)) + if (reduced_nval) then + call pawpsp_cg(pawtab%dnvdq0,d2nvdq0,mqgrid_vl,qgrid_vl,pawtab%tvalespl(:,1),rvale_mesh,rtnval,yp1,ypn) + pawtab%tnvale_mesh_size=rvale_mesh%mesh_size + else + call pawpsp_cg(pawtab%dnvdq0,d2nvdq0,mqgrid_vl,qgrid_vl,pawtab%tvalespl(:,1),vale_mesh,tnvale,yp1,ypn) + pawtab%tnvale_mesh_size=vale_mesh%mesh_size + end if +! Compute second derivative of tvalespl(q) + call paw_spline(qgrid_vl,pawtab%tvalespl(:,1),mqgrid_vl,yp1,ypn,pawtab%tvalespl(:,2)) + else + pawtab%dnvdq0=zero + pawtab%tnvale_mesh_size=0 + end if + +!================================================== +!Compute Ex-correlation energy for the core density + + nspden=1 +#if defined LIBPAW_HAVE_LIBXC + if (ixc<0) nspden=libxc_functionals_nspin() +#endif + + LIBPAW_ALLOCATE(work1,(core_mesh%mesh_size*nspden)) + LIBPAW_ALLOCATE(work2,(core_mesh%mesh_size)) + LIBPAW_ALLOCATE(work3,(1)) + work1(:)=zero;work2(:)=zero;work3(:)=zero + tmp1 => work1 ; tmp2 => work1 + + if (pawxcdev/=0) then + call pawxcm(ncore,pawtab%exccore,yp1,0,hyb_mixing,ixc,work2,1,tmp_lmselect,work3,0,non_magnetic_xc,core_mesh%mesh_size,& +& nspden,4,pawang_tmp,core_mesh,pawxcdev,work1,1,0,tmp1,xclevel,xc_denpos) + else + if (present(tcoretau)) then + call pawxc(ncore,pawtab%exccore,yp1,hyb_mixing,ixc,work2,work1,1,tmp_lmselect,work3,0,0,non_magnetic_xc,core_mesh%mesh_size,& +& nspden,4,pawang_tmp,core_mesh,tmp1,1,0,tmp2,xclevel,xc_denpos,coretau=tcoretau,xc_taupos=my_xc_taupos) + else + call pawxc(ncore,pawtab%exccore,yp1,hyb_mixing,ixc,work2,work1,1,tmp_lmselect,work3,0,0,non_magnetic_xc,core_mesh%mesh_size,& +& nspden,4,pawang_tmp,core_mesh,tmp1,1,0,tmp2,xclevel,xc_denpos) + end if + end if + + LIBPAW_DEALLOCATE(work1) + LIBPAW_DEALLOCATE(work2) + LIBPAW_DEALLOCATE(work3) + +!================================================== +!Compute atomic contribution to Dij (Dij0) +!if not already in memory + if ((.not.has_dij0).and.(pawtab%has_kij==2.or.pawtab%has_kij==-1)) then + LIBPAW_ALLOCATE(pawtab%dij0,(pawtab%lmn2_size)) + if (reduced_vloc) then + call atompaw_dij0(pawtab%indlmn,pawtab%kij,pawtab%lmn_size,ncore,0,pawtab,pawrad,core_mesh,& +& rvloc_mesh,rvlocr,znucl) + else + call atompaw_dij0(pawtab%indlmn,pawtab%kij,pawtab%lmn_size,ncore,0,pawtab,pawrad,core_mesh,& +& vloc_mesh,vlocr,znucl) + end if + has_dij0=.true. + end if +!================================================== +!Compute kinetic operator contribution to Dij + + if (pawtab%has_kij==1.and.has_dij0) then + LIBPAW_ALLOCATE(pawtab%kij,(pawtab%lmn2_size)) + call atompaw_kij(pawtab%indlmn,pawtab%kij,pawtab%lmn_size,ncore,0,1,pawtab,pawrad,core_mesh,& +& vloc_mesh,vlocr,znucl) + pawtab%has_kij=2 + end if + +!pawtab%has_kij=-1 means that kij does not have to be kept in memory + if (pawtab%has_kij==-1) then + LIBPAW_DEALLOCATE(pawtab%kij) + pawtab%has_kij=0 + end if + +!========================================================== +!If projectors have to be kept in memory, we need +!them on the main radial mesh (so, spline them if necessary) + + if (pawtab%has_tproj>0) then + if ((tproj_mesh%mesh_type/=pawrad%mesh_type).or.& +& (tproj_mesh%rstep /=pawrad%rstep).or.& +& (tproj_mesh%lstep /=pawrad%lstep)) then + ir=pawrad_ifromr(pawrad,tproj_mesh%rmax) + call pawrad_init(tproj_mesh_new,mesh_size=ir,mesh_type=pawrad%mesh_type,& +& rstep=pawrad%rstep,lstep=pawrad%lstep) + LIBPAW_ALLOCATE(pawtab%tproj,(tproj_mesh_new%mesh_size,pawtab%basis_size)) + LIBPAW_ALLOCATE(work1,(tproj_mesh%mesh_size)) + do ib=1,pawtab%basis_size + call bound_deriv(tproj(:,ib),tproj_mesh,tproj_mesh%mesh_size,yp1,ypn) + call paw_spline(tproj_mesh%rad,tproj(:,ib),tproj_mesh%mesh_size,yp1,ypn,work1) + call paw_splint(tproj_mesh%mesh_size,tproj_mesh%rad,tproj(:,ib),work1,& +& tproj_mesh_new%mesh_size,tproj_mesh_new%rad,pawtab%tproj(:,ib)) + end do + LIBPAW_DEALLOCATE(work1) + call pawrad_free(tproj_mesh_new) + else + LIBPAW_ALLOCATE(pawtab%tproj,(tproj_mesh%mesh_size,pawtab%basis_size)) + pawtab%tproj(:,:)=tproj(:,:) + end if + pawtab%has_tproj=2 + end if + +!========================================================== +!Free temporary allocated space + + if (pawtab%has_tvale==1) then + LIBPAW_DEALLOCATE(nhat) + end if + if (reduced_vloc) then + call pawrad_free(rvloc_mesh) + LIBPAW_DEALLOCATE(rvlocr) + end if + if (reduced_ncor) then + call pawrad_free(rcore_mesh) + LIBPAW_DEALLOCATE(rtncor) + end if + if (reduced_taucor) then + call pawrad_free(rcoretau_mesh) + LIBPAW_DEALLOCATE(rttaucor) + end if + if (reduced_nval) then + call pawrad_free(rvale_mesh) + LIBPAW_DEALLOCATE(rtnval) + end if + if (pawxcdev==0) then + LIBPAW_DEALLOCATE(pawang_tmp%angwgth) + LIBPAW_DEALLOCATE(pawang_tmp%anginit) + LIBPAW_DEALLOCATE(pawang_tmp%ylmr) + LIBPAW_DEALLOCATE(pawang_tmp%ylmrgr) + end if + +end subroutine pawpsp_calc +!!*** + +!------------------------------------------------------------------------- + +!!****f* m_pawpsp/pawpsp_calc_d5 +!! NAME +!! pawpsp_calc_d5 +!! +!! FUNCTION +!! Compute the first to the 5th derivatives of +!! a given function in a pawrad mesh +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SIDE EFFECTS +!! +!! NOTES +!! +!! SOURCE + +subroutine pawpsp_calc_d5(mesh,mesh_size,tcoredens) + +!Arguments ------------------------------------ + integer,intent(in) :: mesh_size + type(pawrad_type),intent(in) :: mesh + real(dp),intent(inout) :: tcoredens(mesh_size,6) + +!Local variables------------------------------- + integer,parameter :: it=1 !number of steps for smoothing function + logical,parameter :: use_smooth=.true. + +! ************************************************************************* + +!calculate first derivative from density, +!and store it + call nderiv_gen(tcoredens(:,2),tcoredens(:,1),mesh) + +!get second derivative from density, and store it + call paw_spline(mesh%rad,tcoredens(:,1),mesh_size,& +& zero,zero,tcoredens(:,3)) + +!smooth functions, to avoid numerical instabilities + if(use_smooth) then + call paw_smooth(tcoredens(:,2),mesh_size,it) + call paw_smooth(tcoredens(:,3),mesh_size,it) + end if + +!get third derivative from first derivative: + call paw_spline(mesh%rad,tcoredens(:,2),mesh_size,& +& zero,zero,tcoredens(:,4)) + +!get fourth derivative from second derivative: + call paw_spline(mesh%rad,tcoredens(:,3),mesh_size,& +& zero,zero,tcoredens(:,5)) + +!smooth 3rd and 4th order derivatives + if(use_smooth) then + call paw_smooth(tcoredens(:,4),mesh_size,it) + call paw_smooth(tcoredens(:,5),mesh_size,it) + end if + +!get fifth derivative from third derivative: + call paw_spline(mesh%rad,tcoredens(:,4),mesh_size,& +& zero,zero,tcoredens(:,6)) + +!smooth 5th order derivative + if(use_smooth) then + call paw_smooth(tcoredens(:,6),mesh_size,it) + end if + +end subroutine pawpsp_calc_d5 +!!*** + +!------------------------------------------------------------------------- + +!!****f* m_pawpsp/pawpsp_vhar2rho +!! NAME +!! pawpsp_vhar2rho +!! +!! FUNCTION +!! gets rho(r) from v(r), solving the Poisson equation +!! \lap v(r) = 4 \pi rho(r) +!! +!! INPUTS +!! radmesh = radial grid (datastructure) +!! vv(:)= potential +!! +!! OUTPUT +!! rho(:)= density +!! +!! SIDE EFFECTS +!! +!! NOTES +!! +!! SOURCE + +subroutine pawpsp_vhar2rho(radmesh,rho,vv) + +!Arguments ------------------------------------ + type(pawrad_type),intent(in) :: radmesh + real(dp), intent(in) :: vv(:) + real(dp), intent(out):: rho(:) + +!Local variables------------------------------- + integer :: nr + real(dp) :: dfdr(radmesh%mesh_size),d2fdr(radmesh%mesh_size) + +! ************************************************************************* + + nr=size(vv) + if (nr/=size(rho)) then + LIBPAW_BUG('wrong sizes!') + end if + +!Laplacian = +!\frac{\partial^2}{\partial r^2} + 2/r \frac{\partial}{\partial r} + +!Calculate derivatives + call nderiv_gen(dfdr(1:nr),vv,radmesh,der2=d2fdr(1:nr)) + + rho(2:nr)=d2fdr(2:nr) + 2._dp*dfdr(2:nr)/radmesh%rad(2:nr) + call pawrad_deducer0(rho,nr,radmesh) + + rho(1:nr)=-rho(1:nr)/(4._dp*pi) + +end subroutine pawpsp_vhar2rho +!!*** + +!------------------------------------------------------------------------- + +!!****f* m_pawpsp/pawpsp_wvl_calc +!! NAME +!! pawpsp_wvl_calc +!! +!! FUNCTION +!! Performs tests and compute data related to pspcod=7 or 17 ("PAW pseudopotentials") +!! +!! INPUTS +!! tnvale(vale_mesh%mesh_size)= pseudo valence density (+ nhat in output) +!! usewvl= flag for wavelets method +!! vale_mesh= radial mesh for the valence density +!! vloc_mesh= radial mesh for the local potential +!! vlocr(vloc_mesh%mesh_size)= local potential according to vlocopt. +!! +!! OUTPUT +!! Sets pawtab%rholoc +!! +!! SIDE EFFECTS +!! pawtab = objects are modified +!! +!! NOTES +!! +!! SOURCE + +subroutine pawpsp_wvl_calc(pawtab,tnvale,usewvl,vale_mesh,vloc_mesh,vlocr) + +!Arguments ------------------------------------ +!scalars + integer,intent(in)::usewvl + type(pawrad_type),intent(in) :: vale_mesh + type(pawtab_type),intent(inout) :: pawtab + type(pawrad_type),intent(in) ::vloc_mesh + +!arrays + real(dp),intent(in) :: tnvale(vale_mesh%mesh_size*pawtab%has_tvale) + real(dp),intent(in) :: vlocr(vloc_mesh%mesh_size) + + +!Local variables ------------------------------ +!scalars + integer :: msz + character(len=500) :: msg +!arrays + +! ************************************************************************* + +!If usewvl flag is on, we must have the pawtab%wvl pointer allocated + if (pawtab%has_wvl==0) then + msg='pawtab%has_wvl flag should be on o entry' + LIBPAW_BUG(msg) + end if + call wvlpaw_allocate(pawtab%wvl) + +!========================================================== +!Change mesh_size of tvalespl +!Compute second derivative from tNvale(r) + + if (pawtab%has_tvale/=0) then + if(usewvl==1) then + if(allocated(pawtab%tvalespl)) then + LIBPAW_DEALLOCATE(pawtab%tvalespl) + end if + LIBPAW_ALLOCATE(pawtab%tvalespl,(vale_mesh%mesh_size,2)) + pawtab%tnvale_mesh_size=vale_mesh%mesh_size + pawtab%tvalespl(:,1)=tnvale +! Compute second derivative of tvalespl(r) + call paw_spline(vale_mesh%rad,pawtab%tvalespl(:,1),vale_mesh%mesh_size,zero,zero,pawtab%tvalespl(:,2)) + end if + else + pawtab%dnvdq0=zero + pawtab%tnvale_mesh_size=0 + end if + +!========================================================== +!Save rholoc: +!Get local density from local potential +!use the poisson eq. + msz=vloc_mesh%mesh_size + call wvlpaw_rholoc_free(pawtab%wvl%rholoc) + LIBPAW_ALLOCATE(pawtab%wvl%rholoc%d,(msz,4)) + LIBPAW_ALLOCATE(pawtab%wvl%rholoc%rad,(msz)) + pawtab%wvl%rholoc%msz=msz + pawtab%wvl%rholoc%rad(1:msz)=vloc_mesh%rad(1:msz) + +!get rho from v: + call pawpsp_vhar2rho(vloc_mesh,pawtab%wvl%rholoc%d(:,1),vlocr) +! +!get second derivative, and store it + call paw_spline(pawtab%wvl%rholoc%rad,pawtab%wvl%rholoc%d(:,1),pawtab%wvl%rholoc%msz,& +& zero,zero,pawtab%wvl%rholoc%d(:,2)) + +!save also vlocr: + pawtab%wvl%rholoc%d(:,3)=vlocr + +!get second derivative, and store it + call paw_spline(pawtab%wvl%rholoc%rad,vlocr,pawtab%wvl%rholoc%msz,& +& zero,zero,pawtab%wvl%rholoc%d(:,4)) + +!Test +!do ii=1,pawtab%wvl%rholoc%msz +!write(503,'(3(f16.10,x))')pawtab%wvl%rholoc%rad(ii),pawtab%wvl%rholoc%d(ii,1),pawtab%wvl%rholoc%d(ii,3) +!end do +! +!Do splint +! +!nmesh=4000 +!rread1= (9.9979999d0/real(nmesh-1,dp)) ! 0.0025001d0 !step +!allocate(raux1(nmesh),raux2(nmesh)) +!do ii=1,nmesh +!raux1(ii)=rread1*real(ii-1,dp) !mesh +!end do +!call splint(pawtab%wvl%rholoc%msz,pawtab%wvl%rholoc%rad,pawtab%wvl%rholoc%d(:,1),pawtab%wvl%rholoc%d(:,2),& +!& nmesh,raux1,raux2,ierr) +!do ii=1,nmesh +!write(401,'(10(f20.7,x))')raux1(ii),raux2(ii),raux2(ii)*raux1(ii)**2 +!end do +!deallocate(raux1,raux2) + +end subroutine pawpsp_wvl_calc +!!*** + +!------------------------------------------------------------------------- + +!!****f* m_pawpsp/pawpsp_17in +!! NAME +!! pawpsp_17in +!! +!! FUNCTION +!! Initialize pspcod=17 ("PAW XML pseudopotentials"): +!! continue to read the corresponding file and compute the form factors +!! +!! INPUTS +!! ipsp= id in the array of the currently read pseudo. +!! ixc=exchange-correlation choice from main routine data file +!! lmax=value of lmax mentioned at the second line of the psp file +!! lnmax=max. number of (l,n) components over all type of psps +!! angular momentum of nonlocal pseudopotential +!! mmax=max number of pts in real space grid (already read in the psp file header) +!! mqgrid_ff=dimension of q (or G) grid for nl form factors (array ffspl) +!! mqgrid_vl=dimension of q (or G) grid for Vloc (array vlspl) +!! pawxcdev=choice of XC development (0=no dev. (use of angular mesh) ; 1 or 2=dev. on moments) +!! pspheads= header of the current pseudopotential +!! qgrid_ff(psps%mqgrid_ff)=values of q on grid from 0 to qmax (bohr^-1) for nl form factors +!! qgrid_vl(psps%mqgrid_vl)=values of q on grid from 0 to qmax (bohr^-1) for Vloc +!! xclevel= XC functional level +!! xc_denpos= lowest allowed density (usually for the computation of the XC functionals) +!! [xc_taupos]= lowest allowed kinetic energy density (for mGGA XC functionals) +!! zion=nominal valence of atom as specified in psp file +!! znucl=atomic number of atom as specified in input file to main routine +!! +!! OUTPUT +!! epsatm=$ (4\pi)\int_0^\infty [r^2 (V(r)+\frac{Zv}{r}) dr]$(hartree) +!! ffspl(psps%mqgrid_ff,2,psps%lnmax)=form factor f_l(q) and second derivative +!! from spline fit for each angular momentum and each projector; +!! pawrad =paw radial mesh and related data +!! pawtab =paw tabulated starting data +!! vlspl(psps%mqgrid_vl,2)=q^2 Vloc(q) and second derivatives from spline fit +!! wvl_crmult,wvl_frmult= variables definining the fine and coarse grids in a wavelets calculation +!! xcccrc=XC core correction cutoff radius (bohr) from psp file +!! +!! NOTES +!! Spin-orbit not yet implemented (to be done) +!! Comments: +!! * mesh_type= type of radial mesh +!! mesh_type=1 (regular grid): rad(i)=(i-1)*AA +!! mesh_type=2 (logari. grid): rad(i)=AA*(exp[BB*(i-1)]-1) +!! mesh_type=3 (logari. grid): rad(i>1)=AA*exp[BB*(i-2)] and rad(1)=0 +!! mesh_type=4 (logari. grid): rad(i)=-AA*ln[1-BB*(i-1)] with BB=1/n +!! * radial shapefunction type +!! shape_type=-1 ; gl(r)=numeric (read from psp file) +!! shape_type= 1 ; gl(r)=k(r).r^l; k(r)=exp[-(r/sigma)**lambda] +!! shape_type= 2 ; gl(r)=k(r).r^l; k(r)=[sin(pi*r/rshp)/(pi*r/rshp)]**2 if r<=rshp +!! shape_type= 3 ; gl(r)=Alpha(1,l)*jl(q(1,l)*r)+Alpha(2,l)*jl(q(2,l)*r) for each l +!! +!! SOURCE + +subroutine pawpsp_17in(epsatm,ffspl,icoulomb,ipsp,hyb_mixing,ixc,lmax,& +& lnmax,mmax,mqgrid_ff,mqgrid_vl,pawpsp_header,pawrad,pawtab,& +& pawxcdev, qgrid_ff,qgrid_vl,usewvl,usexcnhat_in,vlspl,xcccrc,& +& xclevel,xc_denpos,zion,znucl,& +& xc_taupos) ! Optional argument + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: ipsp,ixc,lmax,lnmax,mqgrid_ff,mqgrid_vl,pawxcdev,usexcnhat_in + integer,intent(inout) ::mmax + integer,intent(in) :: xclevel,icoulomb,usewvl + real(dp),intent(in) :: hyb_mixing,xc_denpos,zion,znucl + real(dp),intent(in),optional :: xc_taupos + real(dp),intent(out) :: epsatm,xcccrc + type(pawpsp_header_type),intent(in) :: pawpsp_header + type(pawrad_type),intent(inout) :: pawrad + type(pawtab_type),intent(inout) :: pawtab +!arrays + real(dp),intent(in) :: qgrid_ff(mqgrid_ff),qgrid_vl(mqgrid_vl) + real(dp),intent(inout) :: ffspl(mqgrid_ff,2,lnmax) + real(dp),intent(out) :: vlspl(mqgrid_vl,2) + +!Local variables ------------------------------ +!scalars + integer :: has_v_minushalf,ib,icoremesh,icoretaumesh,il,ilm,ilmn,ilmn0,iln,imainmesh,imsh,iprojmesh + integer :: ir,iread1,ishpfmesh,ivalemesh,ivlocmesh,j0lmn,jlm,pngau + integer :: jlmn,jln,klmn,msz,nmesh,nval,pspversion,shft,sz10,usexcnhat,vlocopt + real(dp), parameter :: rmax_vloc=10.0_dp + real(dp) :: fourpi,my_xc_taupos,occ,rc,yp1,ypn + logical :: save_core_msz + character(len=500) :: msg + type(pawrad_type) :: core_mesh,coretau_mesh,shpf_mesh,tproj_mesh,vale_mesh,vloc_mesh +!arrays + integer,allocatable :: mesh_shift(:),nprj(:) + real(dp),allocatable :: kij(:),ncore(:),shpf(:,:),tncore(:),coretau(:) + real(dp),allocatable :: tcoretau(:),tnvale(:),tproj(:,:),vhnzc(:),vlocr(:) + real(dp),allocatable :: work1(:),work2(:),work3(:),work4(:) + type(pawrad_type),allocatable :: radmesh(:) + +!************************************************************************ + + if (.False.) write(std_out,*) ipsp + +!========================================================== +!Destroy everything in pawtab but optional flags + call pawtab_free(pawtab) +!Destroy everything in pawrad + call pawrad_free(pawrad) + +!========================================================== +!Initialize useful data + + pawtab%usexcnhat=usexcnhat_in + fourpi=4*acos(-1.d0) + pspversion=pawpsp_header%pawver + save_core_msz=(usewvl==1 .or. icoulomb .ne. 0) + imainmesh=-1;icoremesh=-1;icoretaumesh=-1;iprojmesh=-1 + ishpfmesh=-1;ivalemesh=-1;ivlocmesh=-1 + my_xc_taupos=xc_denpos;if(present(xc_taupos)) my_xc_taupos=xc_taupos + +!========================================================== +!Initialize partial waves quantum numbers + + pawtab%basis_size=pawpsp_header%basis_size + LIBPAW_ALLOCATE(pawtab%orbitals,(pawtab%basis_size)) + do ib=1,pawtab%basis_size + pawtab%orbitals(ib)=paw_setuploc%valence_states%state(ib)%ll + end do + +!========================================================== +!Initialize various dims and indexes + + pawtab%lmn_size=pawpsp_header%lmn_size + pawtab%lmn2_size=pawtab%lmn_size*(pawtab%lmn_size+1)/2 + pawtab%l_size=2*maxval(pawtab%orbitals)+1 + pawtab%ij_size=pawtab%basis_size*(pawtab%basis_size+1)/2 + +!indlmn calculation (indices for (l,m,n) basis) + if (allocated(pawtab%indlmn)) then + LIBPAW_DEALLOCATE(pawtab%indlmn) + end if + LIBPAW_ALLOCATE(pawtab%indlmn,(6,pawtab%lmn_size)) + pawtab%indlmn(:,:)=0 + LIBPAW_BOUND1_ALLOCATE(nprj,BOUNDS(0,maxval(pawtab%orbitals))) + ilmn=0;iln=0;nprj=0 + do ib=1,pawtab%basis_size + il=pawtab%orbitals(ib) + nprj(il)=nprj(il)+1 + iln=iln+1 + do ilm=1,2*il+1 + pawtab%indlmn(1,ilmn+ilm)=il + pawtab%indlmn(2,ilmn+ilm)=ilm-(il+1) + pawtab%indlmn(3,ilmn+ilm)=nprj(il) + pawtab%indlmn(4,ilmn+ilm)=il*il+ilm + pawtab%indlmn(5,ilmn+ilm)=iln + pawtab%indlmn(6,ilmn+ilm)=1 + end do + ilmn=ilmn+2*il+1 + end do + LIBPAW_DEALLOCATE(nprj) +!Are ilmn (found here) and pawtab%lmn_size compatibles ? + if (ilmn/=pawtab%lmn_size) then + write(msg, '(a,a,a,a,a)' )& +& 'Calculated lmn size differs from',ch10,& +& 'lmn_size read from pseudo !',ch10,& +& 'Action: check your pseudopotential file.' + LIBPAW_ERROR(msg) + end if + +!========================================================== +!Read and initialize radial meshes + + nmesh=paw_setuploc%ngrid + LIBPAW_DATATYPE_ALLOCATE(radmesh,(nmesh)) + LIBPAW_ALLOCATE(mesh_shift,(nmesh)) + do imsh=1,nmesh + radmesh(imsh)%mesh_type=-1 + radmesh(imsh)%rstep=zero + radmesh(imsh)%lstep=zero + mesh_shift(imsh)=0 + select case(trim(paw_setuploc%radial_grid(imsh)%eq)) + case("r=a*exp(d*i)") + mesh_shift(imsh)=1 + radmesh(imsh)%mesh_type=3 + radmesh(imsh)%mesh_size=paw_setuploc%radial_grid(imsh)%iend & +& -paw_setuploc%radial_grid(imsh)%istart+1+mesh_shift(imsh) + radmesh(imsh)%rstep=paw_setuploc%radial_grid(imsh)%aa + radmesh(imsh)%lstep=paw_setuploc%radial_grid(imsh)%dd + case("r=a*i/(1-b*i)") + write(msg, '(3a)' )& +& 'The grid r=a*i/(1-b*i) is not implemented in ABINIT !',ch10,& +& 'Action: check your psp file.' + LIBPAW_ERROR(msg) + case("r=a*i/(n-i)") + mesh_shift(imsh)=0 + radmesh(imsh)%mesh_type=5 + radmesh(imsh)%mesh_size=paw_setuploc%radial_grid(imsh)%iend & +& -paw_setuploc%radial_grid(imsh)%istart+1+mesh_shift(imsh) + radmesh(imsh)%rstep=paw_setuploc%radial_grid(imsh)%aa + radmesh(imsh)%lstep=dble(paw_setuploc%radial_grid(imsh)%nn) + case("r=a*(exp(d*i)-1)") + mesh_shift(imsh)=0 + radmesh(imsh)%mesh_type=2 + radmesh(imsh)%mesh_size=paw_setuploc%radial_grid(imsh)%iend & +& -paw_setuploc%radial_grid(imsh)%istart+1+mesh_shift(imsh) + if(paw_setuploc%radial_grid(imsh)%istart==1)radmesh(imsh)%mesh_size=radmesh(imsh)%mesh_size+1 + radmesh(imsh)%rstep=paw_setuploc%radial_grid(imsh)%aa + radmesh(imsh)%lstep=paw_setuploc%radial_grid(imsh)%dd + case("r=d*i") + mesh_shift(imsh)=0 + radmesh(imsh)%mesh_type=1 + radmesh(imsh)%mesh_size=paw_setuploc%radial_grid(imsh)%iend & +& -paw_setuploc%radial_grid(imsh)%istart+1+mesh_shift(imsh) + if(paw_setuploc%radial_grid(imsh)%istart==1)radmesh(imsh)%mesh_size=radmesh(imsh)%mesh_size+1 + radmesh(imsh)%rstep=paw_setuploc%radial_grid(imsh)%dd + case("r=(i/n+a)^5/a-a^4") + write(msg, '(3a)' )& +& 'The grid r=(i/n+a)^5/a-a^4 is not implemented in ABINIT !',ch10,& +& 'Action: check your psp file.' + LIBPAW_ERROR(msg) + end select + end do + +!Initialize radial meshes + do imsh=1,nmesh + call pawrad_init(radmesh(imsh)) + end do + + pawtab%rpaw=pawpsp_header%rpaw + +!========================================================== +!Here reading shapefunction parameters + + pawtab%shape_type=pawpsp_header%shape_type + pawtab%shape_lambda=-1;pawtab%shape_sigma=1.d99 + pawtab%rshp=pawpsp_header%rshp + pawtab%shape_lambda=paw_setuploc%shape_function%lamb + if(trim(paw_setuploc%shape_function%gtype)=="gauss")pawtab%shape_lambda=2 + pawtab%shape_sigma=paw_setuploc%shape_function%rc +!If shapefunction type is gaussian, check exponent + if (pawtab%shape_type==1) then + if (pawtab%shape_lambda<2) then + write(msg, '(3a)' )& +& 'For a gaussian shape function, exponent lambda must be >1 !',ch10,& +& 'Action: check your psp file.' + LIBPAW_ERROR(msg) + end if + end if + +!If shapefunction type is Bessel, deduce here its parameters from rc + if (pawtab%shape_type==3) then + LIBPAW_ALLOCATE(pawtab%shape_alpha,(2,pawtab%l_size)) + LIBPAW_ALLOCATE(pawtab%shape_q,(2,pawtab%l_size)) + rc=pawtab%rshp;if (rc<1.d-8) rc=pawtab%rpaw + do il=1,pawtab%l_size + call atompaw_shapebes(pawtab%shape_alpha(1:2,il),pawtab%shape_q(1:2,il),il-1,rc) + end do + end if + +!========================================================== +!Mirror pseudopotential parameters to the output and log files + + write(msg,'(a,i2)')' Pseudopotential format is: paw',pspversion + call wrtout(ab_out,msg,'COLL') + call wrtout(std_out, msg,'COLL') + write(msg,'(2(a,i3),a,64i4)') & +& ' basis_size (lnmax)=',pawtab%basis_size,' (lmn_size=',& +& pawtab%lmn_size,'), orbitals=',pawtab%orbitals(1:pawtab%basis_size) + call wrtout(ab_out,msg,'COLL') + call wrtout(std_out, msg,'COLL') + write(msg,'(a,f11.8)')' Spheres core radius: rc_sph=',pawtab%rpaw + call wrtout(ab_out,msg,'COLL') + call wrtout(std_out, msg,'COLL') + write(msg,'(a,i1,a)')' ',nmesh,' radial meshes are used:' + call wrtout(ab_out,msg,'COLL') + call wrtout(std_out, msg,'COLL') + + do imsh=1,nmesh + if (radmesh(imsh)%mesh_type==1) & +& write(msg,'(a,i1,a,i4,a,g12.5)') & +& ' - mesh ',imsh,': r(i)=step*(i-1), size=',radmesh(imsh)%mesh_size,& +& ' , step=',radmesh(imsh)%rstep + if (radmesh(imsh)%mesh_type==2) & +& write(msg,'(a,i1,a,i4,2(a,g12.5))') & +& ' - mesh ',imsh,': r(i)=AA*[exp(BB*(i-1))-1], size=',radmesh(imsh)%mesh_size,& +& ' , AA=',radmesh(imsh)%rstep,' BB=',radmesh(imsh)%lstep + if (radmesh(imsh)%mesh_type==3) & +& write(msg,'(a,i1,a,i4,2(a,g12.5))') & +& ' - mesh ',imsh,': r(i)=AA*exp(BB*(i-2)), size=',radmesh(imsh)%mesh_size,& +& ' , AA=',radmesh(imsh)%rstep,' BB=',radmesh(imsh)%lstep + if (radmesh(imsh)%mesh_type==4) & +& write(msg,'(a,i1,a,i4,a,g12.5)') & +& ' - mesh ',imsh,': r(i)=-AA*ln(1-(i-1)/n), n=size=',radmesh(imsh)%mesh_size,& +& ' , AA=',radmesh(imsh)%rstep + if (radmesh(imsh)%mesh_type==5) & +& write(msg,'(a,i1,a,i4,2(a,g12.5))') & +& ' - mesh ',imsh,': r(i)=-AA*i/(NN-i)), n=size=',radmesh(imsh)%mesh_size,& +& ' , AA=',radmesh(imsh)%rstep,' NN=',radmesh(imsh)%lstep + call wrtout(ab_out,msg,'COLL') + call wrtout(std_out, msg,'COLL') + end do + if (pawtab%shape_type==-1) then + write(msg,'(a)')& + ' Shapefunction is NUMERIC type: directly read from atomic data file' + call wrtout(ab_out,msg,'COLL') + call wrtout(std_out, msg,'COLL') + end if + if (pawtab%shape_type==1) then + write(msg,'(2a,a,f6.3,a,i3)')& +& ' Shapefunction is EXP type: shapef(r)=exp(-(r/sigma)**lambda)',ch10,& +& ' with sigma=',pawtab%shape_sigma,' and lambda=',pawtab%shape_lambda + call wrtout(ab_out,msg,'COLL') + call wrtout(std_out, msg,'COLL') + end if + if (pawtab%shape_type==2) then + write(msg,'(a)')& + ' Shapefunction is SIN type: shapef(r)=[sin(pi*r/rshp)/(pi*r/rshp)]**2' + call wrtout(ab_out,msg,'COLL') + call wrtout(std_out, msg,'COLL') + end if + if (pawtab%shape_type==3) then + write(msg,'(a)')& +& ' Shapefunction is BESSEL type: shapef(r,l)=aa(1,l)*jl(q(1,l)*r)+aa(2,l)*jl(q(2,l)*r)' + call wrtout(ab_out,msg,'COLL') + call wrtout(std_out, msg,'COLL') + end if + if (pawtab%rshp<1.d-8) then + write(msg,'(a)') ' Radius for shape functions = sphere core radius' + else + write(msg,'(a,f11.8)') ' Radius for shape functions = ',pawtab%rshp + end if + call wrtout(ab_out,msg,'COLL') + call wrtout(std_out, msg,'COLL') + +!========================================================== +!Perfom tests + +!Are lmax and orbitals compatibles ? + if (lmax/=maxval(pawtab%orbitals)) then + write(msg, '(a,a,a)' )& +& 'lmax /= MAX(orbitals) !',ch10,& +& 'Action: check your pseudopotential file.' + LIBPAW_ERROR(msg) + end if + +!Only mesh_type=1,2, 3 or 5 allowed + do imsh=1,nmesh + if (radmesh(imsh)%mesh_type>5) then + write(msg, '(a,a,a)' )& +& 'Only mesh types 1,2,3 or 5 allowed !',ch10,& +& 'Action : check your pseudopotential or input file.' + LIBPAW_ERROR(msg) + end if + end do + +!========================================================== +!Read tabulated atomic data + +!--------------------------------- +!Read wave-functions (phi) + + do ib=1,pawtab%basis_size + if (ib==1) then + do imsh=1,nmesh + if(trim(paw_setuploc%ae_partial_wave(1)%grid)==trim(paw_setuploc%radial_grid(imsh)%id)) then + mmax=radmesh(imsh)%mesh_size + call pawrad_init(pawrad,mesh_size=mmax,mesh_type=radmesh(imsh)%mesh_type, & +& rstep=radmesh(imsh)%rstep,lstep=radmesh(imsh)%lstep,r_for_intg=pawtab%rpaw) + pawtab%partialwave_mesh_size=pawrad%mesh_size + pawtab%mesh_size=pawrad_ifromr(pawrad,pawtab%rpaw)+5 + pawtab%mesh_size=min(pawtab%mesh_size,pawrad%mesh_size) + if (pawtab%mesh_size>pawrad%mesh_size-2) pawtab%mesh_size=pawrad%mesh_size + imainmesh=imsh + exit + end if + end do + LIBPAW_ALLOCATE(pawtab%phi,(pawtab%partialwave_mesh_size,pawtab%basis_size)) + else if (trim(paw_setuploc%ae_partial_wave(ib)%grid)/=trim(paw_setuploc%radial_grid(imainmesh)%id)) then + write(msg, '(a,a,a)' )& +& 'All Phi and tPhi must be given on the same radial mesh !',ch10,& +& 'Action: check your pseudopotential file.' + LIBPAW_ERROR(msg) + end if + shft=mesh_shift(imainmesh) + pawtab%phi(1+shft:pawtab%partialwave_mesh_size,ib)= & +& paw_setuploc%ae_partial_wave(ib)%data(1:pawtab%partialwave_mesh_size-shft) & +& *pawrad%rad(1+shft:pawtab%partialwave_mesh_size) + if (shft==1) pawtab%phi(1,ib)=zero + end do + write(msg,'(a,i4)') ' mmax= ',mmax + call wrtout(ab_out,msg,'COLL') + call wrtout(std_out,msg,'COLL') + +!--------------------------------- +!Read pseudo wave-functions (tphi) + + LIBPAW_ALLOCATE(pawtab%tphi,(pawtab%partialwave_mesh_size,pawtab%basis_size)) + do ib=1,pawtab%basis_size + + if(trim(paw_setuploc%pseudo_partial_wave(ib)%grid)/=trim(paw_setuploc%radial_grid(imainmesh)%id)) then + write(msg, '(a,a,a)' )& +& 'All Phi and tPhi must be given on the same radial mesh !',ch10,& +& 'Action: check your pseudopotential file.' + LIBPAW_ERROR(msg) + end if + shft=mesh_shift(imainmesh) + pawtab%tphi(1+shft:pawtab%partialwave_mesh_size,ib)=& +& paw_setuploc%pseudo_partial_wave(ib)%data(1:pawtab%partialwave_mesh_size-shft) & +& *pawrad%rad(1+shft:pawtab%partialwave_mesh_size) + if (shft==1) pawtab%tphi(1,ib)=zero + end do + write(msg,'(a,i1)') & +& ' Radial grid used for partial waves is grid ',imainmesh + call wrtout(ab_out,msg,'COLL') + call wrtout(std_out, msg,'COLL') + +!--------------------------------- +!Read projectors (tproj) + + if (allocated(paw_setuploc%projector_fit)) then + call wvlpaw_allocate(pawtab%wvl) + LIBPAW_ALLOCATE(pawtab%wvl%pngau,(pawtab%basis_size)) + do ib=1,pawtab%basis_size + pawtab%wvl%pngau(ib) = paw_setuploc%projector_fit(ib)%ngauss + end do + pawtab%wvl%ptotgau = sum(pawtab%wvl%pngau) * 2 + LIBPAW_ALLOCATE(pawtab%wvl%parg,(2,pawtab%wvl%ptotgau)) + LIBPAW_ALLOCATE(pawtab%wvl%pfac,(2,pawtab%wvl%ptotgau)) + pngau = 1 + do ib=1,pawtab%basis_size + ! Complex gaussian + pawtab%wvl%parg(:,pngau:pngau + pawtab%wvl%pngau(ib) - 1) = & + & paw_setuploc%projector_fit(ib)%expos(:,1:pawtab%wvl%pngau(ib)) + pawtab%wvl%pfac(:,pngau:pngau + pawtab%wvl%pngau(ib) - 1) = & + & paw_setuploc%projector_fit(ib)%factors(:,1:pawtab%wvl%pngau(ib)) + pngau = pngau + pawtab%wvl%pngau(ib) + ! Conjugate gaussian + pawtab%wvl%parg(1,pngau:pngau + pawtab%wvl%pngau(ib) - 1) = & + & paw_setuploc%projector_fit(ib)%expos(1,1:pawtab%wvl%pngau(ib)) + pawtab%wvl%parg(2,pngau:pngau + pawtab%wvl%pngau(ib) - 1) = & + & -paw_setuploc%projector_fit(ib)%expos(2,1:pawtab%wvl%pngau(ib)) + pawtab%wvl%pfac(1,pngau:pngau + pawtab%wvl%pngau(ib) - 1) = & + & paw_setuploc%projector_fit(ib)%factors(1,1:pawtab%wvl%pngau(ib)) + pawtab%wvl%pfac(2,pngau:pngau + pawtab%wvl%pngau(ib) - 1) = & + & -paw_setuploc%projector_fit(ib)%factors(2,1:pawtab%wvl%pngau(ib)) + pngau = pngau + pawtab%wvl%pngau(ib) + pawtab%wvl%pngau(ib) = pawtab%wvl%pngau(ib) * 2 + end do + pawtab%has_wvl=2 + else + !Nullify wavelet objects for safety: + pawtab%has_wvl=0 + call wvlpaw_free(pawtab%wvl) + end if + do ib=1,pawtab%basis_size + if (ib==1) then + do imsh=1,nmesh + if(trim(paw_setuploc%projector_function(1)%grid)==trim(paw_setuploc%radial_grid(imsh)%id)) then + iprojmesh=imsh + exit + end if + end do + call pawrad_copy(radmesh(iprojmesh),tproj_mesh) + LIBPAW_ALLOCATE(tproj,(tproj_mesh%mesh_size,pawtab%basis_size)) + else if (trim(paw_setuploc%projector_function(ib)%grid)/=trim(paw_setuploc%radial_grid(iprojmesh)%id)) then + write(msg, '(a,a,a)' )& +& 'All tprojectors must be given on the same radial mesh !',ch10,& +& 'Action: check your pseudopotential file.' + LIBPAW_ERROR(msg) + end if + shft=mesh_shift(iprojmesh) + tproj(1+shft:tproj_mesh%mesh_size,ib)=paw_setuploc%projector_function(ib)%data(1:tproj_mesh%mesh_size-shft)& +& *tproj_mesh%rad(1+shft:tproj_mesh%mesh_size) + if (shft==1) tproj(1,ib)=zero + end do + write(msg,'(a,i1)') & +& ' Radial grid used for projectors is grid ',iprojmesh + call wrtout(ab_out,msg,'COLL') + call wrtout(std_out, msg,'COLL') + +!--------------------------------- +!Read core density (coredens) + + do imsh=1,nmesh + if(trim(paw_setuploc%ae_core_density%grid)==trim(paw_setuploc%radial_grid(imsh)%id)) then + icoremesh=imsh + exit + end if + end do + call pawrad_copy(radmesh(icoremesh),core_mesh) + if ((radmesh(icoremesh)%mesh_type/=pawrad%mesh_type).or.& +& (radmesh(icoremesh)%rstep /=pawrad%rstep) .or.& +& (radmesh(icoremesh)%lstep /=pawrad%lstep)) then + write(msg, '(a,a,a,a,a)' )& +& 'Ncore must be given on a radial mesh with the same',ch10,& +& 'type and step(s) than the main radial mesh (mesh for Phi) !',ch10,& +& 'Action: check your pseudopotential file.' + LIBPAW_ERROR(msg) + end if + LIBPAW_ALLOCATE(ncore,(core_mesh%mesh_size)) + shft=mesh_shift(icoremesh) + ncore(1+shft:core_mesh%mesh_size)=paw_setuploc%ae_core_density%data(1:core_mesh%mesh_size-shft)/sqrt(fourpi) + if (shft==1) call pawrad_deducer0(ncore,core_mesh%mesh_size,core_mesh) + +!Construct and save VH[z_NC] if requested + if (pawtab%has_vhnzc==1) then + LIBPAW_ALLOCATE(pawtab%VHnZC,(pawtab%mesh_size)) + LIBPAW_ALLOCATE(vhnzc,(core_mesh%mesh_size)) + call atompaw_vhnzc(ncore,core_mesh,vhnzc,znucl) + pawtab%VHnZC(1:pawtab%mesh_size)=vhnzc(1:pawtab%mesh_size) + pawtab%has_vhnzc=2 + LIBPAW_DEALLOCATE(vhnzc) + end if + + pawtab%core_mesh_size=pawtab%mesh_size + if(save_core_msz) pawtab%core_mesh_size=core_mesh%mesh_size + LIBPAW_ALLOCATE(pawtab%coredens,(pawtab%core_mesh_size)) + pawtab%rcore=core_mesh%rad(pawtab%core_mesh_size) + pawtab%coredens(1:pawtab%core_mesh_size)=ncore(1:pawtab%core_mesh_size) + +!--------------------------------- +!Read pseudo core density (tcoredens) + + do imsh=1,nmesh + if(trim(paw_setuploc%pseudo_core_density%grid)==trim(paw_setuploc%radial_grid(imsh)%id)) then + iread1=imsh + exit + end if + end do + if (iread1/=icoremesh) then + write(msg, '(a,a,a,a,a,a,a,a)' )& +& 'Pseudized core density (tNcore) must be given',ch10,& +& 'on the same radial mesh as core density (Ncore) !',ch10,& +& 'Action: check your pseudopotential file.' + LIBPAW_ERROR(msg) + end if + LIBPAW_ALLOCATE(tncore,(core_mesh%mesh_size)) + shft=mesh_shift(icoremesh) + tncore(1+shft:core_mesh%mesh_size)=paw_setuploc%pseudo_core_density%data(1:core_mesh%mesh_size-shft)/sqrt(fourpi) + if (shft==1) call pawrad_deducer0(tncore,core_mesh%mesh_size,core_mesh) + if(save_core_msz) then + LIBPAW_ALLOCATE(pawtab%tcoredens,(pawtab%core_mesh_size,6)) + else + LIBPAW_ALLOCATE(pawtab%tcoredens,(pawtab%core_mesh_size,1)) + end if + if (maxval(abs(tncore(:)))=1) then + do imsh=1,nmesh + if(trim(paw_setuploc%ae_core_kinetic_energy_density%grid)==trim(paw_setuploc%radial_grid(imsh)%id)) then + icoretaumesh=imsh + exit + end if + end do + call pawrad_copy(radmesh(icoretaumesh),coretau_mesh) + if (icoretaumesh/=icoremesh) then + write(msg, '(5a)' )& +& 'Core kinetic density (TAUcore) must be given',ch10,& +& 'on the same radial mesh as core density (Ncore) !',ch10,& +& 'Action: check your pseudopotential file.' + LIBPAW_ERROR(msg) + end if + LIBPAW_ALLOCATE(coretau,(coretau_mesh%mesh_size)) + shft=mesh_shift(icoretaumesh) + coretau(1+shft:coretau_mesh%mesh_size)= & +& paw_setuploc%ae_core_kinetic_energy_density%data(1:coretau_mesh%mesh_size-shft)/sqrt(fourpi) + if (shft==1) call pawrad_deducer0(coretau,coretau_mesh%mesh_size,coretau_mesh) + pawtab%coretau_mesh_size=pawtab%mesh_size + if(save_core_msz) pawtab%coretau_mesh_size=coretau_mesh%mesh_size + LIBPAW_ALLOCATE(pawtab%coretau,(pawtab%coretau_mesh_size)) + pawtab%rcoretau=coretau_mesh%rad(pawtab%coretau_mesh_size) + pawtab%coretau(1:pawtab%coretau_mesh_size)=coretau(1:pawtab%coretau_mesh_size) + else if (pawtab%has_coretau>=1) then + write(msg, '(5a)' )& +& 'metaGGA exchange-correlation is requested but the core kinetic energy density',ch10,& +& 'is not present in the pseudopotential file!',ch10,& +& 'Action: check your pseudopotential file.' + LIBPAW_ERROR(msg) + end if + +!--------------------------------- +!Read pseudo core kinetic energy density (tcoretau) + + if (paw_setuploc%pseudo_core_kinetic_energy_density%tread.and.pawtab%has_coretau>=1) then + do imsh=1,nmesh + if(trim(paw_setuploc%pseudo_core_kinetic_energy_density%grid)==trim(paw_setuploc%radial_grid(imsh)%id)) then + iread1=imsh + exit + end if + end do + if (iread1/=icoretaumesh) then + write(msg, '(5a)' )& +& 'Pseudized core kinetic energy density (tTAUcore) must be given',ch10,& +& 'on the same radial mesh as core kinetic density (TAUcore) !',ch10,& +& 'Action: check your pseudopotential file.' + LIBPAW_ERROR(msg) + end if + LIBPAW_ALLOCATE(tcoretau,(coretau_mesh%mesh_size)) + shft=mesh_shift(icoretaumesh) + tcoretau(1+shft:coretau_mesh%mesh_size)= & +& paw_setuploc%pseudo_core_kinetic_energy_density%data(1:coretau_mesh%mesh_size-shft)/sqrt(fourpi) + if (shft==1) call pawrad_deducer0(tcoretau,coretau_mesh%mesh_size,coretau_mesh) + LIBPAW_ALLOCATE(pawtab%tcoretau,(pawtab%coretau_mesh_size)) + pawtab%tcoretau(1:pawtab%coretau_mesh_size)=tcoretau(1:pawtab%coretau_mesh_size) + pawtab%has_coretau=2 + write(msg,'(a,i1)') & +& ' Radial grid used for (t)coretau kinetic density is grid ',icoretaumesh + call wrtout(ab_out,msg,'COLL') + call wrtout(std_out, msg,'COLL') + else if (pawtab%has_coretau>=1) then + write(msg, '(5a)' )& +& 'metaGGA exchange-correlation is requested but the pseudo core kinetic energy density',ch10,& +& 'is not present in the pseudopotential file!',ch10,& +& 'Action: check your pseudopotential file.' + LIBPAW_ERROR(msg) + end if + +!--------------------------------- +!Read local pseudopotential=Vh(tn_zc) or Vbare + + if ((paw_setuploc%blochl_local_ionic_potential%tread).and.& +& (pawtab%usexcnhat==-1.or.pawtab%usexcnhat==0.or.(pawtab%usexcnhat==1.and.& +& ((.not.paw_setuploc%zero_potential%tread).or.(.not.paw_setuploc%kresse_joubert_local_ionic_potential%tread))))) then + usexcnhat=0;vlocopt=2 + do imsh=1,nmesh + if(trim(paw_setuploc%blochl_local_ionic_potential%grid)==trim(paw_setuploc%radial_grid(imsh)%id)) then + iread1=imsh + exit + end if + end do + ivlocmesh=iread1 + call pawrad_copy(radmesh(ivlocmesh),vloc_mesh) + LIBPAW_ALLOCATE(vlocr,(vloc_mesh%mesh_size)) + shft=mesh_shift(ivlocmesh) + vlocr(1+shft:vloc_mesh%mesh_size)=paw_setuploc%blochl_local_ionic_potential%data(1:vloc_mesh%mesh_size-shft)/sqrt(fourpi) + if (shft==1) call pawrad_deducer0(vlocr,vloc_mesh%mesh_size,vloc_mesh) + else if((paw_setuploc%kresse_joubert_local_ionic_potential%tread).and.& +& (pawtab%usexcnhat==-1.or.pawtab%usexcnhat==1.or.(pawtab%usexcnhat==0.and.& +& (.not.paw_setuploc%zero_potential%tread)))) then + usexcnhat=1;vlocopt=1 + do imsh=1,nmesh + if(trim(paw_setuploc%kresse_joubert_local_ionic_potential%grid)==trim(paw_setuploc%radial_grid(imsh)%id)) then + iread1=imsh + exit + end if + end do + ivlocmesh=iread1 + call pawrad_copy(radmesh(ivlocmesh),vloc_mesh) + LIBPAW_ALLOCATE(vlocr,(vloc_mesh%mesh_size)) + shft=mesh_shift(ivlocmesh) + vlocr(1+shft:vloc_mesh%mesh_size)= & +& paw_setuploc%kresse_joubert_local_ionic_potential%data(1:vloc_mesh%mesh_size-shft)/sqrt(fourpi) + if (shft==1) call pawrad_deducer0(vlocr,vloc_mesh%mesh_size,vloc_mesh) + else if(paw_setuploc%zero_potential%tread) then + usexcnhat=0;vlocopt=0 + do imsh=1,nmesh + if(trim(paw_setuploc%zero_potential%grid)==trim(paw_setuploc%radial_grid(imsh)%id)) then + iread1=imsh + exit + end if + end do + ivlocmesh=iread1 +! vloc_mesh%mesh_type=radmesh(ivlocmesh)%mesh_type +! vloc_mesh%rstep=radmesh(ivlocmesh)%rstep +! vloc_mesh%lstep=radmesh(ivlocmesh)%lstep +! vloc_mesh%mesh_size=radmesh(ivlocmesh)%mesh_size +! vloc_mesh%mesh_size=pawrad_ifromr(radmesh(ivlocmesh),rmax_vloc) + call pawrad_copy(radmesh(ivlocmesh),vloc_mesh) + LIBPAW_ALLOCATE(vlocr,(vloc_mesh%mesh_size)) + vlocr=zero + shft=mesh_shift(ivlocmesh) + vlocr(1+shft:vloc_mesh%mesh_size)=paw_setuploc%zero_potential%data(1:vloc_mesh%mesh_size-shft)/sqrt(fourpi) + if (shft==1) call pawrad_deducer0(vlocr,vloc_mesh%mesh_size,vloc_mesh) + else + write(msg, '(a,a,a,a,a)' )& +& 'At least one local potential must be given',ch10,& +& 'Action: check your pseudopotential file.' + LIBPAW_ERROR(msg) + end if + + write(msg,'(a,i1)') & +& ' Radial grid used for Vloc is grid ',ivlocmesh + call wrtout(ab_out,msg,'COLL') + call wrtout(std_out, msg,'COLL') + +!------------------------------------------------- +!Read LDA-1/2 potential + + if (paw_setuploc%LDA_minus_half_potential%tread) then + do imsh=1,nmesh + if(trim(paw_setuploc%LDA_minus_half_potential%grid)==trim(paw_setuploc%radial_grid(imsh)%id)) then + iread1=imsh + exit + end if + end do + if(iread1/=ivlocmesh) then + write(msg, '(a)' )& +& 'The LDA-1/2 potential must be given on the same grid as the local potential.' + LIBPAW_ERROR(msg) + end if + has_v_minushalf=1 + LIBPAW_ALLOCATE(pawtab%vminushalf,(vloc_mesh%mesh_size)) + shft=mesh_shift(ivlocmesh) + pawtab%vminus_mesh_size=vloc_mesh%mesh_size + pawtab%vminushalf(1+shft:vloc_mesh%mesh_size)= & +& paw_setuploc%LDA_minus_half_potential%data(1:vloc_mesh%mesh_size-shft)/sqrt(fourpi) + if (shft==1) call pawrad_deducer0(pawtab%vminushalf,vloc_mesh%mesh_size,vloc_mesh) + write(msg,'(a,i1)') & +& ' Radial grid used for LDA-1/2 potential is grid ',ivlocmesh + call wrtout(ab_out,msg,'COLL') + call wrtout(std_out, msg,'COLL') + else + has_v_minushalf=0 + end if + if(has_v_minushalf==0.and.pawtab%has_vminushalf==1) then + write(msg, '(a)' )& +& 'The LDA-1/2 potential must be given in the XML PAW datafile.' + LIBPAW_ERROR(msg) + end if + +!--------------------------------- +!Eventually read "numeric" shapefunctions (if shape_type=-1) + + if (pawtab%shape_type==-1) then + LIBPAW_ALLOCATE(pawtab%shapefunc,(pawtab%mesh_size,pawtab%l_size)) + do imsh=1,nmesh + if(trim(paw_setuploc%shape_function%grid)==trim(paw_setuploc%radial_grid(imsh)%id)) then + iread1=imsh + exit + end if + end do + call pawrad_copy(radmesh(iread1),shpf_mesh) + ishpfmesh=iread1 + LIBPAW_ALLOCATE(shpf,(shpf_mesh%mesh_size,pawtab%l_size)) + shft=mesh_shift(ishpfmesh) + shpf(1,1)=one + do ir=2,shpf_mesh%mesh_size + shpf(ir,1)=paw_setuploc%shape_function%data(ir-shft,1) + end do + sz10=size(paw_setuploc%shape_function%data,2) + if(sz10>=2) then + do il=2,pawtab%l_size + shpf(1,il)=zero + do ir=2,shpf_mesh%mesh_size + shpf(ir,il)=paw_setuploc%shape_function%data(ir-shft,il) + end do + end do + else + do il=2,pawtab%l_size + shpf(1,il)=zero + do ir=2,shpf_mesh%mesh_size + shpf(ir,il)=paw_setuploc%shape_function%data(ir-shft,1)*shpf_mesh%rad(ir)**(il-1) + end do + end do + end if + write(msg,'(a,i1)') & +& ' Radial grid used for shape functions is grid ',iread1 + call wrtout(ab_out,msg,'COLL') + call wrtout(std_out, msg,'COLL') + +! Has to spline shape functions if mesh is not the "main" mesh + if (ishpfmesh/=imainmesh) then + msz=shpf_mesh%mesh_size + LIBPAW_ALLOCATE(work1,(msz)) + LIBPAW_ALLOCATE(work2,(msz)) + LIBPAW_ALLOCATE(work3,(msz)) + LIBPAW_ALLOCATE(work4,(pawrad%mesh_size)) + work3(1:msz)=shpf_mesh%rad(1:msz) + work4(1:pawrad%mesh_size)=pawrad%rad(1:pawrad%mesh_size) + do il=1,pawtab%l_size + call bound_deriv(shpf(1:msz,il),shpf_mesh,msz,yp1,ypn) + call paw_spline(work3,shpf(:,il),msz,yp1,ypn,work1) + call paw_splint(msz,work3,shpf(:,il),work1,pawrad%mesh_size,work4,pawtab%shapefunc(:,il)) + end do + LIBPAW_DEALLOCATE(work1) + LIBPAW_DEALLOCATE(work2) + LIBPAW_DEALLOCATE(work3) + LIBPAW_DEALLOCATE(work4) + else + pawtab%shapefunc(:,:)=shpf(:,:) + end if + LIBPAW_DEALLOCATE(shpf) + end if + +!--------------------------------- +!Read pseudo valence density + + if (paw_setuploc%pseudo_valence_density%tread) then + do imsh=1,nmesh + if(trim(paw_setuploc%pseudo_valence_density%grid)==trim(paw_setuploc%radial_grid(imsh)%id)) then + iread1=imsh + exit + end if + end do + ivalemesh=iread1 + call pawrad_copy(radmesh(iread1),vale_mesh) + LIBPAW_ALLOCATE(tnvale,(vale_mesh%mesh_size)) + shft=mesh_shift(ivalemesh) + tnvale(1+shft:vale_mesh%mesh_size)=paw_setuploc%pseudo_valence_density%data(1:vale_mesh%mesh_size-shft)/sqrt(fourpi) + if (shft==1) call pawrad_deducer0(tnvale,vale_mesh%mesh_size,vale_mesh) + pawtab%has_tvale=1 + write(msg,'(a,i1)') & +& ' Radial grid used for pseudo valence density is grid ',ivalemesh + call wrtout(ab_out,msg,'COLL') + call wrtout(std_out, msg,'COLL') + else + pawtab%has_tvale=0 + LIBPAW_ALLOCATE(tnvale,(0)) + end if + +!--------------------------------- +!Read initial guess of rhoij (rhoij0) + + LIBPAW_ALLOCATE(pawtab%rhoij0,(pawtab%lmn2_size)) + pawtab%rhoij0=zero + ilmn0=0 + do ib=1,pawtab%basis_size + il=2*pawtab%orbitals(ib)+1 + occ=paw_setuploc%valence_states%state(ib)%ff + if (occ0) then + LIBPAW_ALLOCATE(pawtab%dij0,(pawtab%lmn2_size)) + if (allocated(pawtab%vminushalf).and.pawtab%has_vminushalf==1) then + vlocr(1:vloc_mesh%mesh_size)=vlocr(1:vloc_mesh%mesh_size)+pawtab%vminushalf(1:vloc_mesh%mesh_size) + end if + call atompaw_dij0(pawtab%indlmn,kij,pawtab%lmn_size,ncore,0,pawtab,pawrad,core_mesh,& +& vloc_mesh,vlocr,znucl) + end if + +!Keep eventualy Kij in memory + if (pawtab%has_kij==1.or.vlocopt==0) then + LIBPAW_ALLOCATE(pawtab%kij,(pawtab%lmn2_size)) + pawtab%kij(:)=kij(:) + if (vlocopt> 0) pawtab%has_kij=2 +! This -1 means that pawtab%kij will be freed later + if (vlocopt==0) pawtab%has_kij=-1 + end if + + LIBPAW_DEALLOCATE(kij) + +!--------------------------------- +!Read exact-exchange Fock terms for core-valence interactions (ex_cvij) + + if (paw_setuploc%exact_exchange_matrix%tread.eqv..true.) then + pawtab%has_fock=2 + LIBPAW_ALLOCATE(pawtab%ex_cvij,(pawtab%lmn2_size)) + pawtab%ex_cvij=zero + nval=paw_setuploc%valence_states%nval + do jlmn=1,pawtab%lmn_size + j0lmn=jlmn*(jlmn-1)/2 + jlm=pawtab%indlmn(4,jlmn);jln=pawtab%indlmn(5,jlmn) + do ilmn=1,jlmn + klmn=j0lmn+ilmn + ilm=pawtab%indlmn(4,ilmn);iln=pawtab%indlmn(5,ilmn) + if (ilm==jlm) pawtab%ex_cvij(klmn)=paw_setuploc%exact_exchange_matrix%data(jln+(iln-1)*nval) + end do + end do + pawtab%ex_cc=paw_setuploc%ex_cc + end if + +!---------------------------------------- +! store Lamb shielding +pawtab%lamb_shielding=paw_setuploc%lamb_shielding + +!========================================================== +!Compute additional atomic data only depending on present DATASET + + call pawpsp_calc(core_mesh,epsatm,ffspl,imainmesh,hyb_mixing,ixc,lnmax,& +& mmax,mqgrid_ff,mqgrid_vl,ncore,nmesh,pawrad,pawtab,pawxcdev,pspversion,& +& qgrid_ff,qgrid_vl,radmesh,tncore,tnvale,tproj,tproj_mesh,usexcnhat,vale_mesh,& +& vloc_mesh,vlocopt,vlocr,vlspl,xcccrc,xclevel,xc_denpos,zion,znucl,& +& tcoretau=tcoretau,coretau_mesh=coretau_mesh,xc_taupos=my_xc_taupos) + + if(usewvl==1 .or. icoulomb > 0) then +! Calculate up to the 5th derivative of tcoredens + call pawpsp_calc_d5(core_mesh,pawtab%core_mesh_size,pawtab%tcoredens) +! Other wvl related operations + call pawpsp_wvl_calc(pawtab,tnvale,usewvl,vale_mesh,vloc_mesh,vlocr) + else if (pawtab%has_wvl>0) then + call wvlpaw_rholoc_nullify(pawtab%wvl%rholoc) + end if + +!========================================================== +!Free temporary allocated space + + call pawrad_free(radmesh) + LIBPAW_DATATYPE_DEALLOCATE(radmesh) + LIBPAW_DEALLOCATE(mesh_shift) + + call pawrad_free(tproj_mesh) + call pawrad_free(core_mesh) + call pawrad_free(vloc_mesh) + call pawrad_free(coretau_mesh) + + if (allocated(vlocr)) then + LIBPAW_DEALLOCATE(vlocr) + end if + if (allocated(ncore)) then + LIBPAW_DEALLOCATE(ncore) + end if + if (allocated(tncore)) then + LIBPAW_DEALLOCATE(tncore) + end if + if (allocated(coretau)) then + LIBPAW_DEALLOCATE(coretau) + end if + if (allocated(tcoretau)) then + LIBPAW_DEALLOCATE(tcoretau) + end if + if (allocated(tproj)) then + LIBPAW_DEALLOCATE(tproj) + end if + + if(pawtab%shape_type==-1) then + call pawrad_free(shpf_mesh) + end if + if (paw_setuploc%pseudo_valence_density%tread) then + call pawrad_free(vale_mesh) + end if + if (paw_setuploc%ae_core_kinetic_energy_density%tread.and.pawtab%has_coretau>=1) then + call pawrad_free(coretau_mesh) + end if + if (allocated(tnvale)) then + LIBPAW_DEALLOCATE(tnvale) + end if + +end subroutine pawpsp_17in +!!*** + +!------------------------------------------------------------------------- + +!!****f* m_pawpsp/pawpsp_7in +!! NAME +!! pawpsp_7in +!! +!! FUNCTION +!! Initialize pspcod=7 ("PAW pseudopotentials"): +!! continue to read the corresponding file and compute the form factors +!! +!! INPUTS +!! icoulomb==0 : usual reciprocal space computation +!! =1 : free boundary conditions are used +!! ipsp=id in the array of the currently read pseudo. +!! ixc=exchange-correlation choice from main routine data file +!! lloc=angular momentum choice of local pseudopotential +!! lmax=value of lmax mentioned at the second line of the psp file +!! pawxcdev=choice of XC development (0=no dev. (use of angular mesh) ; 1 or 2=dev. on moments) +!! xclevel= XC functional level +!! xc_denpos= lowest allowed density (usually for the computation of the XC functionals) +!! [xc_taupos]= lowest allowed kinetic energy density (for mGGA XC functionals) +!! zion=nominal valence of atom as specified in psp file +!! +!! OUTPUT +!! epsatm=$ (4\pi)\int_0^\infty [r^2 (V(r)+\frac{Zv}{r}) dr]$(hartree) +!! ffspl(psps%mqgrid_ff,2,psps%lnmax)=form factor f_l(q) and second derivative +!! from spline fit for each angular momentum and each projector; +!! pawrad =paw radial mesh and related data +!! pawtab =paw tabulated starting data +!! vlspl(mqgrid_vl,2)=q^2 Vloc(q) and second derivatives from spline fit +!! xcccrc=XC core correction cutoff radius (bohr) from psp file +!! +!! NOTES +!! Spin-orbit not yet implemented (to be done) +!! +!! SOURCE + +subroutine pawpsp_7in(epsatm,ffspl,icoulomb,hyb_mixing,ixc,& +& lmax,lnmax,mmax,mqgrid_ff,mqgrid_vl,& +& pawrad,pawtab,pawxcdev,qgrid_ff,qgrid_vl,& +& usewvl,usexcnhat_in,vlspl,xcccrc,xclevel,xc_denpos,zion,znucl,& +& xc_taupos) ! Optional argument + +!Arguments ------------------------------------ +!scalars + integer, intent(in):: icoulomb,ixc + integer, intent(in):: lmax,lnmax,mmax + integer, intent(in):: mqgrid_ff,mqgrid_vl,pawxcdev + integer, intent(in):: usewvl,usexcnhat_in,xclevel + real(dp), intent(in):: hyb_mixing,xc_denpos,zion,znucl + real(dp), intent(in),optional:: xc_taupos + real(dp), intent(out):: epsatm,xcccrc + type(pawrad_type), intent(inout):: pawrad + type(pawtab_type), intent(inout) :: pawtab +!arrays + real(dp),intent(in):: qgrid_ff(mqgrid_ff),qgrid_vl(mqgrid_vl) + real(dp),intent(inout) :: ffspl(mqgrid_ff,2,lnmax) + real(dp),intent(out) :: vlspl(mqgrid_vl,2) + +!Local variables ------------------------------ +!scalars + integer :: imainmesh,nmesh + integer :: pspversion,usexcnhat,vlocopt + logical :: save_core_msz + real(dp) :: my_xc_taupos + type(pawrad_type) :: core_mesh,tproj_mesh,vale_mesh,vloc_mesh +!arrays + real(dp),pointer :: ncore(:),tncore(:),tcoretau(:),tnvale(:),tproj(:,:),vlocr(:) + type(pawrad_type),pointer :: radmesh(:) + +!************************************************************************ + +!Destroy everything in pawtab but optional flags + call pawtab_free(pawtab) +!Destroy everything in pawrad + call pawrad_free(pawrad) + + save_core_msz=(usewvl==1 .or. icoulomb .ne. 0) + nullify(ncore);nullify(tncore);nullify(tcoretau);nullify(tnvale) + nullify(tproj);nullify(vlocr) + nullify(radmesh) + + call pawpsp_read(core_mesh,tmp_unit,imainmesh,lmax,& +& ncore,nmesh,pawrad,pawtab,pspversion,radmesh,save_core_msz,& +& tcoretau,tncore,tnvale,tproj,tproj_mesh,usexcnhat_in,usexcnhat,& +& vale_mesh,vlocopt,vlocr,vloc_mesh,znucl) + + my_xc_taupos=xc_denpos;if(present(xc_taupos)) my_xc_taupos=xc_taupos + call pawpsp_calc(core_mesh,epsatm,ffspl,imainmesh,hyb_mixing,ixc,lnmax,& +& mmax,mqgrid_ff,mqgrid_vl,ncore,nmesh,pawrad,pawtab,pawxcdev,pspversion,& +& qgrid_ff,qgrid_vl,radmesh,tncore,tnvale,tproj,tproj_mesh,usexcnhat,vale_mesh,& +& vloc_mesh,vlocopt,vlocr,vlspl,xcccrc,xclevel,xc_denpos,zion,znucl,& +& tcoretau=tcoretau,coretau_mesh=core_mesh,xc_taupos=my_xc_taupos) + + if(usewvl==1 .or. icoulomb > 0) then +! Calculate up to the 5th derivative of tcoredens + call pawpsp_calc_d5(core_mesh,pawtab%core_mesh_size,pawtab%tcoredens) +! Other wvl related operations + call pawpsp_wvl_calc(pawtab,tnvale,usewvl,vale_mesh,vloc_mesh,vlocr) + else if (pawtab%has_wvl>0) then + call wvlpaw_rholoc_nullify(pawtab%wvl%rholoc) + end if + +!========================================================== +!Free temporary allocated space + call pawrad_free(radmesh) + call pawrad_free(tproj_mesh) + call pawrad_free(core_mesh) + call pawrad_free(vloc_mesh) + LIBPAW_DATATYPE_DEALLOCATE(radmesh) + if (associated(vlocr)) then + LIBPAW_POINTER_DEALLOCATE(vlocr) + end if + if (associated(ncore)) then + LIBPAW_POINTER_DEALLOCATE(ncore) + end if + if (associated(tncore)) then + LIBPAW_POINTER_DEALLOCATE(tncore) + end if + if (associated(tnvale)) then + LIBPAW_POINTER_DEALLOCATE(tnvale) + end if + if (associated(tcoretau)) then + LIBPAW_POINTER_DEALLOCATE(tcoretau) + end if + if (associated(tproj)) then + LIBPAW_POINTER_DEALLOCATE(tproj) + end if + if (pspversion>=4) then + call pawrad_free(vale_mesh) + end if + +end subroutine pawpsp_7in +!!*** + +!------------------------------------------------------------------------- + +!!****f* m_pawpsp/pawpsp_wvl_sin2gauss +!! NAME +!! pawpsp_wvl_sin2gauss +!! +!! FUNCTION +!! Converts a f(x)=sum_i^N_i a_i sin(b_i x)+ c_i cos( d_i x) to +!! f(x)=sum_j e_j exp(f_j x), where e and f are complex numbers. +!! +!! INPUTS +!! basis_size = size of the lmn basis +!! mparam = number of terms in the summatory (N_i, see the expression above) +!! nparam = Array containing the parameters (a_i, b_i,c_i,d_i) +!! wvl = wavelets data type +!! +!! OUTPUT +!! +!! SIDE EFFECTS +!! On output wvl%pfac and wvl%parg are filled with complex parameters (e_i, f_i) +!! +!! NOTES +!! +!! SOURCE + + subroutine pawpsp_wvl_sin2gauss(basis_size,mparam,nparam,& +& param,wvl) + +!Arguments ------------------------------------ + integer,intent(in) :: mparam,basis_size + integer,intent(in) :: nparam(basis_size) + real(dp),intent(in) :: param(mparam,basis_size) + type(wvlpaw_type),intent(inout):: wvl + +!Local variables ------------------------------ + integer :: i,ii,ib,ngauss,nterm + real(dp) :: sep + real(dp) :: a1(mparam),a2(mparam),a3(mparam),a4(mparam),a5(mparam) + real(dp) :: b1r(mparam),b2r(mparam),b1i(mparam),b2i(mparam) + character(len=500) :: message + ! + !extra variables, use to debug + ! + !integer::igau,nr,unitp + !real(dp)::step,rmax + !real(dp),allocatable::r(:), y(:) + !complex::fac,arg + !complex(dp),allocatable::f(:) +!************************************************************************ + +! Convert from \sum(sin+cos) expressions to sums of complex gaussians +! (only works for option=4, see fit_gen) + +! get number of coefficients: + ii=0 + do ib=1,basis_size + nterm=nparam(ib)/4 !option=4, there are 4 parameters for each term + ii=ii+nterm*2 !two gaussians for each term + end do +! +! Allocate objects +! + ngauss=ii + wvl%ptotgau=ngauss !total number of complex gaussians + LIBPAW_ALLOCATE(wvl%pfac,(2,ngauss)) + LIBPAW_ALLOCATE(wvl%parg,(2,ngauss)) + LIBPAW_ALLOCATE(wvl%pngau,(basis_size)) + wvl%pngau(1:basis_size)=nparam(1:basis_size)/2 !option=4 +! + ii=0 + do ib=1,basis_size +! +! Get parameters in sin+cos expansion: +! Option4: \sum a1 exp(-a2 x^2) ( a3 sin(k x^2) + a4 cos(k x^2)) +! + nterm=nparam(ib)/4 !option=4 +! + a1(1:nterm)=param(1:nterm,ib) + a2(1:nterm)=param(nterm+1:nterm*2,ib) + a3(1:nterm)=param(nterm*2+1:nterm*3,ib) + a4(1:nterm)=param(nterm*3+1:nterm*4,ib) + sep=1.1d0 + do i=1,nterm + a5(i)=sep**(i) + end do + +! First check that "a2" is a positive number (it is multiplied by -1, so +! that gaussians decay to zero: + if( any(a2(1:nterm) < tol12) ) then + message = 'Real part of Gaussians should be a negative number (they should go to zero at infty)' + LIBPAW_ERROR(message) + end if + +! +! Now translate them to a sum of complex gaussians: +! pngau(ib)=nterm*2 +! Two gaussians by term: +! +! First gaussian + b1r(1:nterm)= a1(1:nterm)*a4(1:nterm)/2.d0 !coefficient, real + b1i(1:nterm)=-a1(1:nterm)*a3(1:nterm)/2.d0 !coefficient, imag + b2r(1:nterm)=-a2(1:nterm) !exponential, real + b2i(1:nterm)= a5(1:nterm) !exponential, imag +! + wvl%pfac(1,ii+1:ii+nterm)=b1r(1:nterm) + wvl%pfac(2,ii+1:ii+nterm)=b1i(1:nterm) + wvl%parg(1,ii+1:ii+nterm)=b2r(1:nterm) + wvl%parg(2,ii+1:ii+nterm)=b2i(1:nterm) +! Second gaussian + wvl%pfac(1,ii+nterm+1:ii+nterm*2)= b1r(1:nterm) + wvl%pfac(2,ii+nterm+1:ii+nterm*2)=-b1i(1:nterm) + wvl%parg(1,ii+nterm+1:ii+nterm*2)= b2r(1:nterm) + wvl%parg(2,ii+nterm+1:ii+nterm*2)=-b2i(1:nterm) +! + ii=ii+nterm*2 + end do + +! begin debug +! write(*,*)'pawpsp_wvl_sin2gauss, comment me' +! nr=3000 +! rmax=10.d0 +! LIBPAW_ALLOCATE(r,(nr)) +! LIBPAW_ALLOCATE(f,(nr)) +! LIBPAW_ALLOCATE(y,(nr)) +! step=rmax/real(nr-1,dp) +! do ir=1,nr +! r(ir)=real(ir-1,dp)*step +! end do +! ! +! ii=0 +! do ib=1,basis_size +! unitp=500+ib +! f(:)=czero +! ! +! do igau=1,wvl%pngau(ib) +! ii=ii+1 +! arg=cmplx(wvl%parg(1,ii),wvl%parg(2,ii)) +! fac=cmplx(wvl%pfac(1,ii),wvl%pfac(2,ii)) +! f(:)=f(:)+fac*exp(arg*r(:)**2) +! end do +! do ir=1,nr +! write(unitp,'(3f16.7)')r(ir),real(f(ir))!,y(ir) +! end do +! end do +! LIBPAW_DEALLOCATE(r) +! LIBPAW_DEALLOCATE(f) +! LIBPAW_DEALLOCATE(y) +! end debug + + end subroutine pawpsp_wvl_sin2gauss +!!*** + +!------------------------------------------------------------------------- + +!!****f* m_pawpsp/pawpsp_read_header +!! NAME +!! pawpsp_read_header +!! +!! FUNCTION +!! +!! INPUTS +!! +!! OUTPUT +!! +!! +!! SIDE EFFECTS +!! +!! NOTES +!! +!! SOURCE + + +subroutine pawpsp_read_header(funit,lloc,lmax,mmax,pspcod,pspxc,r2well,zion,znucl) + +!Arguments ------------------------------------ +!scalars + integer,intent(in):: funit + integer,intent(out):: lloc,lmax,mmax,pspcod,pspxc + real(dp),intent(out):: r2well,zion,znucl +!Local variables------------------------------- + integer:: pspdat + character(len=fnlen):: title + character(len=500) :: msg + +! ************************************************************************* + +!Read and write some description of file from first line (character data) + read (funit,'(a)') title + write(msg, '(a,a)' ) '- ',trim(title) + call wrtout(ab_out,msg,'COLL') + call wrtout(std_out, msg,'COLL') + +!Read and write more data describing psp parameters + read (funit,*) znucl,zion,pspdat + write(msg, '(a,f9.5,f10.5,2x,i8,t47,a)' ) & +& '-',znucl,zion,pspdat,'znucl, zion, pspdat' + call wrtout(ab_out,msg,'COLL') + call wrtout(std_out, msg,'COLL') + + read (funit,*) pspcod,pspxc,lmax,lloc,mmax,r2well + if(pspxc<0) then + write(msg, '(i5,i8,2i5,i10,f10.5,t47,a)' ) & +& pspcod,pspxc,lmax,lloc,mmax,r2well,& +& 'pspcod,pspxc,lmax,lloc,mmax,r2well' + else + write(msg, '(4i5,i10,f10.5,t47,a)' ) & +& pspcod,pspxc,lmax,lloc,mmax,r2well,& +& 'pspcod,pspxc,lmax,lloc,mmax,r2well' + end if + call wrtout(ab_out,msg,'COLL') + call wrtout(std_out, msg,'COLL') + +end subroutine pawpsp_read_header +!!*** + +!------------------------------------------------------------------------- + +!!****f* m_pawpsp/pawpsp_read_header_2 +!! NAME +!! pawpsp_read_header_2 +!! +!! FUNCTION +!! +!! INPUTS +!! +!! OUTPUT +!! +!! +!! SIDE EFFECTS +!! +!! NOTES +!! Reads pspversion, basis_size and lmn_size +!! +!! SOURCE + + +subroutine pawpsp_read_header_2(funit,pspversion,basis_size,lmn_size) + +!Arguments ------------------------------------ +!scalars + integer,intent(in):: funit + integer,intent(out) :: pspversion,basis_size,lmn_size + +!Local variables------------------------------- + integer :: creatorid + character(len=80) :: pspline + character(len=500) :: msg + +! ************************************************************************* + +!Read psp version in line 4 of the header + pspversion=1 + read (funit,'(a80)') pspline;pspline=adjustl(pspline) + if (pspline(1:3)=="paw".or.pspline(1:3)=="PAW") & +& read(unit=pspline(4:80),fmt=*) pspversion + if (pspversion<1.or.pspversion>5) then + write(msg, '(a,i2,a,a,a)' )& +& 'This version of PAW psp file (',pspversion,') is not compatible with',ch10,& +& 'current version of Abinit.' + LIBPAW_ERROR(msg) + end if + + if (pspversion==1) then + read (unit=pspline,fmt=*) basis_size,lmn_size + else +! Here psp file for Abinit 4.3+ + read (unit=pspline(5:80),fmt=*) creatorid + read (funit,*) basis_size,lmn_size + end if + +end subroutine pawpsp_read_header_2 +!!*** + +!------------------------------------------------------------------------- + +!!****f* m_pawpsp/pawpsp_wvl +!! NAME +!! pawpsp_wvl +!! +!! FUNCTION +!! WVL+PAW related operations +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SIDE EFFECTS +!! +!! NOTES +!! +!! SOURCE + + +subroutine pawpsp_wvl(filpsp,pawrad, pawtab,usewvl, wvl_ngauss, comm_mpi) + +!Arguments------------------------------------ +!scalars + integer, optional,intent(in):: comm_mpi + integer, intent(in):: usewvl, wvl_ngauss(2) + character(len=fnlen),intent(in)::filpsp + type(pawrad_type),intent(in) :: pawrad + type(pawtab_type),intent(inout):: pawtab +!arrays + +!Local variables------------------------------- +!scalars + integer:: ii, me, mparam, nterm_bounds(2) + type(pawrad_type)::tproj_mesh + character(len=500) :: msg +!arrays + integer,allocatable:: ngauss_param(:) + real(dp),allocatable:: gauss_param(:,:) + +! ************************************************************************* + + me=0; if (present(comm_mpi))me=xmpi_comm_rank(comm_mpi) + +!If usewvl flag is on, we must have the pawtab%wvl pointer allocated + if (usewvl==1.and.pawtab%has_wvl==0) then + call wvlpaw_allocate(pawtab%wvl) + pawtab%has_wvl=1 + end if + +!Fit projectors to a sum of Gaussians: + if (usewvl ==1 .and. pawtab%wvl%ptotgau==0 ) then + + if (pawtab%has_tproj==0) then + msg='pawtab%tproj must be allocated' + LIBPAW_BUG(msg) + end if + +! 1) fit projectors to gaussians + write(msg,'(a,a)')ch10,'Fitting tproj to Gaussians' + call wrtout(std_out,msg,'COLL') + +! See fit_gen (option==4): + do ii=1,2 + nterm_bounds(ii)=ceiling(wvl_ngauss(ii)/2.0) + end do + mparam=nterm_bounds(2)*4 + LIBPAW_ALLOCATE(gauss_param,(mparam,pawtab%basis_size)) + LIBPAW_ALLOCATE(ngauss_param,(pawtab%basis_size)) +! compute tproj_mesh + call pawrad_init(tproj_mesh,mesh_size=size(pawtab%tproj,1),& +& mesh_type=pawrad%mesh_type,rstep=pawrad%rstep, lstep=pawrad%lstep) + + if(present(comm_mpi)) then + call gaussfit_projector(pawtab%basis_size,mparam,& +& ngauss_param,nterm_bounds,pawtab%orbitals,& +& gauss_param,tproj_mesh,& +& pawtab%rpaw,pawtab%tproj,comm_mpi) + else + call gaussfit_projector(pawtab%basis_size,mparam,& +& ngauss_param,nterm_bounds,pawtab%orbitals,& +& gauss_param,tproj_mesh,& +& pawtab%rpaw,pawtab%tproj) + end if +! tproj is now as a sum of sin+cos functions, +! convert it to a sum of complex gaussians and fill %wvl object: + call pawpsp_wvl_sin2gauss(pawtab%basis_size,mparam,& +& ngauss_param,gauss_param,pawtab%wvl) + LIBPAW_DEALLOCATE(gauss_param) + LIBPAW_DEALLOCATE(ngauss_param) + + if(me==0) then + call pawpsp_rw_atompaw(pawtab%basis_size,filpsp,pawtab%wvl) + end if + + pawtab%has_wvl=2 + + end if + +!Projectors in real space are no more needed + call pawrad_free(tproj_mesh) + if(allocated(pawtab%tproj)) then + LIBPAW_DEALLOCATE(pawtab%tproj) + pawtab%has_tproj=0 + end if + +end subroutine pawpsp_wvl +!!*** + +!------------------------------------------------------------------------- + +!!****f* m_pawpsp/pawpsp_read_header_xml +!! NAME +!! pawpsp_read_header_xml +!! +!! FUNCTION +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SIDE EFFECTS +!! +!! NOTES +!! This is done instead of: call pawpsxml2ab( psxml, pspheads,1) +!! since pspheads does not exist in PAW library. +!! should we include it to avoid the following code replica? +!! check pspheads commented out in pawpsp_17in, and routine pawpsp_read_xml_2 +!! +!! SOURCE + +subroutine pawpsp_read_header_xml(lloc,lmax,pspcod,pspxc,& +& psxml,r2well,zion,znucl) + +!Arguments ------------------------------------ +!scalars + type(paw_setup_t),intent(in) :: psxml + integer,intent(out):: lloc,lmax,pspcod,pspxc + real(dp),intent(out):: r2well,zion,znucl +!Local variables------------------------------- + integer :: il +#if defined LIBPAW_HAVE_LIBXC + integer :: ii,id +#endif + character(len=100) :: xclibxc + character(len=500) :: msg +!arrays + +! ************************************************************************* + + lloc = 0 + r2well = 0 + pspcod=17 + znucl=psxml%atom%znucl + zion =psxml%atom%zval + +!lmax: + lmax = 0 + do il=1,psxml%valence_states%nval + if(psxml%valence_states%state(il)%ll>lmax) lmax=psxml%valence_states%state(il)%ll + end do +!pspxc + select case(trim(psxml%xc_functional%name)) + case('PZ') + pspxc = 2 +#if defined LIBPAW_HAVE_LIBXC + pspxc = -(libxc_functionals_getid('XC_LDA_X')*1000 & +& +libxc_functionals_getid('XC_LDA_C_PZ')) +#endif + case('W') + pspxc = 4 +#if defined LIBPAW_HAVE_LIBXC + pspxc = -(libxc_functionals_getid('XC_LDA_X')*1000 & +& +libxc_functionals_getid('XC_LDA_C_WIGNER')) +#endif + case('HL') + pspxc = 5 +#if defined LIBPAW_HAVE_LIBXC + pspxc = -(libxc_functionals_getid('XC_LDA_X')*1000 & +& +libxc_functionals_getid('XC_LDA_C_HL')) +#endif + case('GL') +#if defined LIBPAW_HAVE_LIBXC + pspxc = -(libxc_functionals_getid('XC_LDA_X')*1000 & +& +libxc_functionals_getid('XC_LDA_C_GL')) +#else + write(msg, '(7a)' )& +& 'The exchange and correlation functional by Gunnarson-Lundqvist', ch10,& +& 'is not implemented in Abinit.',ch10,& +& 'Action : choose another XC functional in the pseudopotential',ch10, & +& ' generation or compile ABINIT with the libXC library.' + LIBPAW_ERROR(msg) +#endif + case('VWN') +#if defined LIBPAW_HAVE_LIBXC + pspxc = -(libxc_functionals_getid('XC_LDA_X')*1000 & +& +libxc_functionals_getid('XC_LDA_C_VWN')) +#else + write(msg, '(7a)' )& +& 'The exchange and correlation functional by Vosko,Wilk and Nusair', ch10,& +& 'is not implemented in Abinit.',ch10,& +& 'Action : choose another XC functional in the pseudopotential',ch10, & +& ' generation or compile ABINIT with the libXC library.' + LIBPAW_ERROR(msg) +#endif + case('PW') + pspxc = 7 +#if defined LIBPAW_HAVE_LIBXC + pspxc = -(libxc_functionals_getid('XC_LDA_X')*1000 & +& +libxc_functionals_getid('XC_LDA_C_PW')) +#endif + case('PBE') + pspxc = 11 +#if defined LIBPAW_HAVE_LIBXC + pspxc = -(libxc_functionals_getid('XC_GGA_X_PBE')*1000 & +& +libxc_functionals_getid('XC_GGA_C_PBE')) +#endif + case('revPBE') + pspxc = 14 +#if defined LIBPAW_HAVE_LIBXC + pspxc = -(libxc_functionals_getid('XC_GGA_X_PBE_R')*1000 & +& +libxc_functionals_getid('XC_GGA_C_PBE')) +#endif + case('RPBE') + pspxc = 15 +#if defined LIBPAW_HAVE_LIBXC + pspxc = -(libxc_functionals_getid('XC_GGA_X_RPBE')*1000 & +& +libxc_functionals_getid('XC_GGA_C_PBE')) +#endif + case('PW91') +#if defined LIBPAW_HAVE_LIBXC + pspxc = -(libxc_functionals_getid('XC_GGA_X_PW91')*1000 & +& +libxc_functionals_getid('XC_GGA_C_PW91')) +#else + write(msg, '(7a)' )& +& 'The exchange and correlation functional by Perdew and Wang 91', ch10,& +& 'is not implemented in Abinit.',ch10,& +& 'Action : choose another XC functional in the pseudopotential',ch10, & +& ' generation or compile ABINIT with the libXC library.' + LIBPAW_ERROR(msg) +#endif + case('BLYP') +#if defined LIBPAW_HAVE_LIBXC + pspxc = -(libxc_functionals_getid('XC_GGA_X_B88')*1000 & +& +libxc_functionals_getid('XC_GGA_C_LYP')) +#else + write(msg, '(7a)' )& +& 'The exchange and correlation functional BLYP', ch10,& +& 'is not implemented in Abinit.',ch10,& +& 'Action : choose another XC functional in the pseudopotential',ch10, & +& ' generation or compile ABINIT with the libXC library.' + LIBPAW_ERROR(msg) +#endif + case DEFAULT + xclibxc=trim(psxml%xc_functional%name) + if (xclibxc(1:3)=='XC_' .or.xclibxc(1:3)=='xc_' .or. & +& xclibxc(1:5)=='LDA_X'.or.xclibxc(1:5)=='LDA_C'.or. & +& xclibxc(1:5)=='lda_x'.or.xclibxc(1:5)=='lda_c'.or. & +& xclibxc(1:5)=='GGA_X'.or.xclibxc(1:5)=='GGA_C'.or. & +& xclibxc(1:5)=='gga_x'.or.xclibxc(1:5)=='gga_c'.or. & +& xclibxc(1:6)=='MGGA_X'.or.xclibxc(1:6)=='MGGA_C'.or. & +& xclibxc(1:6)=='mgga_x'.or.xclibxc(1:6)=='mgga_c') then +#if defined LIBPAW_HAVE_LIBXC + pspxc=0 + ii=index(xclibxc,'+') ; if (ii<=0) ii=0 + if (ii>0) then + id=libxc_functionals_getid(xclibxc(1:ii-1)) + if (id<=0) then + write(msg, '(3a)' ) 'The ',xclibxc(1:ii-1), & +& ' functional (read from PAW-XML file) was not found in the libXC library!' + LIBPAW_ERROR(msg) + end if + pspxc=pspxc-id*1000 + end if + id=libxc_functionals_getid(xclibxc(ii+1:)) + if (id<=0) then + write(msg, '(3a)' ) 'The ',xclibxc(ii+1:), & +& ' functional (read from PAW-XML file) was not found in the libXC library!' + LIBPAW_ERROR(msg) + end if + pspxc=pspxc-id +#else + msg='Cannot use LibXC functional because ABINIT is not compiled with LibXC !' + LIBPAW_ERROR(msg) +#endif +! To be eliminated later (temporary) + else if(trim(psxml%xc_functional%functionaltype)=='LIBXC')then +#if defined LIBPAW_HAVE_LIBXC + xclibxc=trim(psxml%xc_functional%name) + read(unit=xclibxc,fmt=*) pspxc + pspxc=-pspxc +#else + msg='Cannot use LibXC functional because ABINIT is not compiled with LibXC !' + LIBPAW_ERROR(msg) +#endif + else + write(msg, '(3a)') 'Unknown XC functional in psp file: ',trim(xclibxc),' !' + LIBPAW_ERROR(msg) + end if + end select + +end subroutine pawpsp_read_header_xml +!!*** + +!------------------------------------------------------------------------- + +!!****f* m_pawpsp/pawpsp_read_pawheader +!! NAME +!! pawpsp_read_pawheader +!! +!! FUNCTION +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SIDE EFFECTS +!! +!! NOTES +!! +!! SOURCE + +subroutine pawpsp_read_pawheader(basis_size,lmax,lmn_size,& +& l_size,mesh_size,pspversion,psxml,rpaw,rshp,shape_type) + +!Arguments ------------------------------------ +!scalars + integer,intent(in):: lmax + integer,intent(out):: basis_size,mesh_size,lmn_size,l_size + integer,intent(out):: pspversion,shape_type + real(dp),intent(out)::rpaw,rshp + type(paw_setup_t),intent(in) :: psxml +!Local variables------------------------------- + integer::il + +! ************************************************************************* + +!All of this was moved from pawpsxml2ab, +!basis_size + basis_size=psxml%valence_states%nval +!mesh_size + do il=1,psxml%ngrid + if(psxml%radial_grid(il)%id==psxml%idgrid) & +& mesh_size=psxml%radial_grid(il)%iend-psxml%radial_grid(il)%istart+1 + end do +!lmn_size: + lmn_size=0 + do il=1,psxml%valence_states%nval + lmn_size=lmn_size+2*psxml%valence_states%state(il)%ll+1 + end do +!lsize + l_size=2*lmax+1 +!pspversion + pspversion=10 +!rpaw: + rpaw=0.d0 + if (psxml%rpaw<0.d0) then + do il=1,psxml%valence_states%nval + if(psxml%valence_states%state(il)%rc>rpaw) rpaw=psxml%valence_states%state(il)%rc + end do + else + rpaw=psxml%rpaw + end if +!shape_type, rshp: + select case(trim(psxml%shape_function%gtype)) + case('gauss') + shape_type=1 + rshp=rpaw + case('bessel') + shape_type=3 + rshp=psxml%shape_function%rc + case('sinc') + shape_type=2 + rshp=psxml%shape_function%rc + case('exp') + shape_type=1 + rshp=rpaw + case('num') + shape_type=-1 + rshp=rpaw + end select + +end subroutine pawpsp_read_pawheader +!!*** + +!------------------------------------------------------------------------- + +!!****f* m_pawpsp/pawpsp_bcast +!! NAME +!! pawpsp_bcast +!! +!! FUNCTION +!! Communicate paw data to all processors +!! +!! INPUTS +!! comm_mpi= communicator used to broadcast data +!! lnmax= Max. number of (l,n) components over all type of psps +!! mqgrid_ff= dimension of ffspl +!! mqgrid_vl= dimension of vlspl +!! +!! OUTPUT +!! epsatm=$ (4\pi)\int_0^\infty [r^2 (V(r)+\frac{Zv}{r}) dr]$(hartree) +!! ffspl(mqgrid_ff,2,lnmax)=Kleinman-Bylander form factor f_l(q) and derivative +!! pawrad= +!! pawtab= +!! vlspl(mqgrid_vl,2)=q^2 Vloc(q) and second derivatives from spline fit +!! xcccrc=XC core correction cutoff radius (bohr) from psp file +!! +!! SOURCE + +subroutine pawpsp_bcast(comm_mpi,epsatm,ffspl,pawrad,pawtab,vlspl,xcccrc) + +!Arguments ------------------------------------ + integer,intent(in) :: comm_mpi + real(dp),intent(inout) :: epsatm,xcccrc + real(dp),intent(inout) :: ffspl(:,:,:),vlspl(:,:) + type(pawrad_type),intent(inout) :: pawrad + type(pawtab_type),intent(inout) :: pawtab + +!Local variables------------------------------- + integer :: ierr,ii,me,nn_dpr + integer :: siz_ffspl,siz1_ffspl,siz2_ffspl,siz3_ffspl,siz_vlspl,siz1_vlspl,siz2_vlspl + integer,allocatable :: list_int(:) + real(dp),allocatable :: list_dpr(:) + +!************************************************************************* + + me=xmpi_comm_rank(comm_mpi) + +!Broadcast pawrad + call pawrad_bcast(pawrad,comm_mpi) + +!Broadcast pawtab (only data read from file) + call pawtab_bcast(pawtab,comm_mpi,only_from_file=.true.) + +!Broadcast the sizes of the arrays + LIBPAW_ALLOCATE(list_int,(5)) + if (me==0) then + siz1_vlspl=size(vlspl,1); list_int(1)=siz1_vlspl + siz2_vlspl=size(vlspl,2); list_int(2)=siz2_vlspl + siz1_ffspl=size(ffspl,1); list_int(3)=siz1_ffspl + siz2_ffspl=size(ffspl,2); list_int(4)=siz2_ffspl + siz3_ffspl=size(ffspl,3); list_int(5)=siz3_ffspl + end if + call xmpi_bcast(list_int,0,comm_mpi,ierr) + if (me/=0) then + siz1_vlspl=list_int(1) + siz2_vlspl=list_int(2) + siz1_ffspl=list_int(3) + siz2_ffspl=list_int(4) + siz3_ffspl=list_int(5) + end if + siz_vlspl=siz1_vlspl*siz2_vlspl + siz_ffspl=siz1_ffspl*siz2_ffspl*siz3_ffspl + LIBPAW_DEALLOCATE(list_int) + +!Broadcast the reals + nn_dpr=2+siz_vlspl+siz_ffspl + LIBPAW_ALLOCATE(list_dpr,(nn_dpr)) + if (me==0) then + ii=1 + list_dpr(ii)=epsatm ;ii=ii+1 + list_dpr(ii)=xcccrc ;ii=ii+1 + list_dpr(ii:ii+siz_vlspl-1)=reshape(vlspl,(/siz_vlspl/)) ;ii=ii+siz_vlspl + list_dpr(ii:ii+siz_ffspl-1)=reshape(ffspl,(/siz_ffspl/)) ;ii=ii+siz_ffspl + end if + call xmpi_bcast(list_dpr,0,comm_mpi,ierr) + if (me/=0) then + ii=1 + epsatm=list_dpr(ii) ;ii=ii+1 + xcccrc=list_dpr(ii) ;ii=ii+1 + vlspl=reshape(list_dpr(ii:ii+siz_vlspl-1),(/siz1_vlspl,siz2_vlspl/)) + ii=ii+siz_vlspl + ffspl=reshape(list_dpr(ii:ii+siz_ffspl-1),(/siz1_ffspl,siz2_ffspl,siz3_ffspl/)) + ii=ii+siz_ffspl + end if + LIBPAW_DEALLOCATE(list_dpr) + +end subroutine pawpsp_bcast +!!*** + +!------------------------------------------------------------------------- + +!!****f* m_pawpsp/pawpsp_main +!! NAME +!! pawpsp_main +!! +!! FUNCTION +!! Reads a PAW dataset (atomic data) +!! +!! INPUTS +!! filpsp=name of the file containing the PAW dataset +!! usewvl=1 if we use a wavelet basis, 0 other wise (plane waves) +!! icoulomb=1 if we use a Poisson routine with wavelets, 0 otherwise +!! ixc=index of the XC correlation functional +!! xclevel=type of XC functional (1=LDA, 2=GGA, ...) +!! pawxcdev=order of the developement of the PAW on-site terms +!! (0: full calculation, 1: order 1, 2:order 2) +!! usexcnhat=flag controlling the use of compensation charge (nhat) in XC potential +!! qgrid_ff=size of the mesh for the sin FFT transform of the non-local projectors (form factors) +!! (plane waves only, 0 otherwise) +!! qgrid_vl=size of the mesh for the sin FFT transform of the local potential +!! (plane waves only, 0 otherwise) +!! ffspl=sin FFT transform of the non-local projectors (form factors) (plane waves only) +!! vlspl=sin FFT transform of the local potential (plane waves only) +!! epsatm=$ 4\pi\int[r^2 (V(r)+\frac{Zv}{r}dr]$. +!! xcccrc=XC core correction cutoff radius (bohr) +!! zionpsp=valence of atom as specified in input file +!! znuclpsp=atomic number of atom as specified in input file +!! ===== Optional arguments for wvl ===== +!! [wvl_ngauss] +!! ===== Other optional arguments ===== +!! [psxml]=datastructure containing a XMP PAW dataset +!! [comm_mpi]=MPI communicator +!! [xc_denpos]=tolerance on density for the calculation of XC potential +!! (if density=data containing PAW radial grid information +!! pawtab =data containing the PAW dataset (partial waves...) +!! +!! SIDE EFFECTS +!! +!! NOTES +!! +!! +!! SOURCE + +subroutine pawpsp_main( & +& pawrad,pawtab,& +& filpsp,usewvl,icoulomb,hyb_mixing,ixc,xclevel,pawxcdev,usexcnhat,& +& qgrid_ff,qgrid_vl,ffspl,vlspl,epsatm,xcccrc,zionpsp,znuclpsp,& +& wvl_ngauss,psxml,comm_mpi,xc_denpos,xc_taupos) ! Optional arguments + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: icoulomb,ixc + integer,intent(in) :: pawxcdev,usewvl,usexcnhat,xclevel + integer,optional,intent(in) :: comm_mpi + real(dp),intent(in):: hyb_mixing,zionpsp,znuclpsp + real(dp),optional,intent(in) :: xc_denpos,xc_taupos + real(dp),intent(out) :: epsatm,xcccrc + character(len=fnlen),intent(in):: filpsp ! name of the psp file + type(pawrad_type),intent(inout) :: pawrad + type(pawtab_type),intent(inout) :: pawtab + type(paw_setup_t),optional,intent(in) :: psxml +!arrays + integer,optional,intent(in) :: wvl_ngauss(2) + real(dp),intent(in) :: qgrid_ff(:),qgrid_vl(:) + real(dp),intent(inout) :: ffspl(:,:,:) + real(dp),intent(out) :: vlspl(:,:) + +!Local variables------------------------------- + integer :: has_coretau,has_tproj,has_wvl,ipsp,lmax,lloc,lnmax,mmax,me,mqgrid_ff,mqgrid_vl + integer :: pspcod,pspxc,usexml + real(dp),parameter :: xc_denpos_default=tol14 + real(dp) :: my_xc_denpos,my_xc_taupos,r2well,zion,znucl + character(len=500) :: msg + type(pawpsp_header_type) :: pawpsp_header +!arrays + +! ************************************************************************* + +!Check consistency of parameters + if (icoulomb/= 0.or.usewvl==1) then + if (.not.present(wvl_ngauss)) then + msg='usewvl==1 or icoulomb/=0: a mandatory argument is missing!' + LIBPAW_BUG(msg) + end if + end if + + mqgrid_ff=size(qgrid_ff) + mqgrid_vl=size(qgrid_vl) + lnmax=size(ffspl,3) + if (size(ffspl,1)/=mqgrid_ff.or.size(ffspl,2)/=2) then + msg='invalid sizes for ffspl!' + LIBPAW_BUG(msg) + end if + if (size(vlspl,1)/=mqgrid_vl.or.size(vlspl,2)/=2) then + msg='invalid sizes for vlspl!' + LIBPAW_BUG(msg) + end if + + my_xc_denpos=xc_denpos_default;if (present(xc_denpos)) my_xc_denpos=xc_denpos + my_xc_taupos=my_xc_denpos;if (present(xc_taupos)) my_xc_taupos=xc_taupos + pawtab%usexcnhat=usexcnhat + me=0;if (present(comm_mpi))me=xmpi_comm_rank(comm_mpi) + + has_wvl=0; if (usewvl==1.or.icoulomb/=0) has_wvl=1 + has_tproj=0; if (usewvl==1) has_tproj=1 + has_coretau=0 ; if (pawxc_get_usekden(ixc)>=1) has_coretau=1 + call pawtab_set_flags(pawtab,has_coretau=has_coretau,has_tvale=1,has_wvl=has_wvl,has_tproj=has_tproj) + + if(me==0) then + write(msg, '(a,t38,a)' )'- pspatm: opening atomic psp file',trim(filpsp) + call wrtout(ab_out, msg,'COLL') + call wrtout(std_out, msg,'COLL') + +! This checks if file is xml or UPF +! It sets usexml as well + call pawpsp_check_xml_upf(filpsp) + +! ---------------------------------------------------------------------------- + if (usexml /= 1) then +! Open the atomic data file, and read the three first lines + open (unit=tmp_unit,file=filpsp,form='formatted',status='old') + rewind (unit=tmp_unit) +! Read first 3 lines of psp file: + call pawpsp_read_header(tmp_unit,lloc,lmax,mmax,pspcod,& +& pspxc,r2well,zion,znucl) + + else if (usexml == 1 .and. present(psxml)) then + write(msg,'(a,a)') & +& '- pawpsp : Reading pseudopotential header in XML form from ', trim(filpsp) + call wrtout(ab_out,msg,'COLL') + call wrtout(std_out, msg,'COLL') + +! Return header information + call pawpsp_read_header_xml(lloc,lmax,pspcod,& +& pspxc,psxml,r2well,zion,znucl) +! Fill in pawpsp_header object: + call pawpsp_read_pawheader(pawpsp_header%basis_size,& +& lmax,pawpsp_header%lmn_size,& +& pawpsp_header%l_size,pawpsp_header%mesh_size,& +& pawpsp_header%pawver,psxml,& +& pawpsp_header%rpaw,pawpsp_header%rshp,pawpsp_header%shape_type) + end if + +! Check data for consistency against main routine input + call pawpsp_consistency() + +! Read rest of the PSP file + if (pspcod==7) then +! ABINIT proprietary format + call pawpsp_7in(epsatm,ffspl,icoulomb,hyb_mixing,ixc,& +& lmax,lnmax,mmax,mqgrid_ff,mqgrid_vl,& +& pawrad,pawtab,pawxcdev,qgrid_ff,qgrid_vl,& +& usewvl,usexcnhat,vlspl,xcccrc,xclevel,my_xc_denpos,zion,znucl,xc_taupos=my_xc_taupos) + + else if (pspcod==17)then +! XML format + ipsp=1 + call pawpsp_17in(epsatm,ffspl,icoulomb,ipsp,hyb_mixing,ixc,lmax,& +& lnmax,mmax,mqgrid_ff,mqgrid_vl,pawpsp_header,pawrad,pawtab,& +& pawxcdev,qgrid_ff,qgrid_vl,usewvl,usexcnhat,vlspl,xcccrc,& +& xclevel,my_xc_denpos,zion,znucl,xc_taupos=my_xc_taupos) + + end if + end if!me==0 + + close(unit=tmp_unit) + + write(msg,'(3a)') ' pawpsp: atomic psp has been read ',& +& ' and splines computed',ch10 + call wrtout(ab_out,msg,'COLL') + call wrtout(std_out, msg,'COLL') + +!Communicate PAW objects + if(present(comm_mpi)) then + if(xmpi_comm_size(comm_mpi)>1) then + call pawpsp_bcast(comm_mpi,epsatm,ffspl,pawrad,pawtab,vlspl,xcccrc) + end if + end if + +!WVL+PAW: + if(icoulomb/=0.or.usewvl==1) then + if(present(comm_mpi))then + call pawpsp_wvl(filpsp,pawrad,pawtab,usewvl,wvl_ngauss,comm_mpi) + else + call pawpsp_wvl(filpsp,pawrad,pawtab,usewvl,wvl_ngauss) + end if + end if + +contains +!!*** + +!------------------------------------------------------------------------- + +!!****f* pawpsp_main/pawpsp_check_xml_upf +!! NAME +!! pawpsp_main_checks +!! +!! FUNCTION +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SIDE EFFECTS +!! +!! NOTES +!! +!! SOURCE + + +subroutine pawpsp_check_xml_upf(filpsp) + +!Arguments ------------------------------------ +!scalars + character(len=fnlen),intent(in):: filpsp ! name of the psp file + +!Local variables------------------------------- + integer :: unt + character(len=70):: testxml + +! ************************************************************************* + +! Check if the file pseudopotential file is written in XML + usexml = 0 + unt = libpaw_get_free_unit() + open (unit=unt,file=filpsp,form='formatted',status='old',action="read") + rewind (unit=unt) + read(unt,*) testxml + if(testxml(1:5)=='')then + msg='UPF format not allowed with PAW (USPP part not read yet)!' + LIBPAW_ERROR(msg) + end if + close (unit=unt) + +end subroutine pawpsp_check_xml_upf +!!*** + +!------------------------------------------------------------------------- + +!!****f* pawpsp_main/pawpsp_consistency +!! NAME +!! pawpsp_consistency +!! +!! FUNCTION +!! +!! INPUTS +!! +!! OUTPUT +!! +!! SIDE EFFECTS +!! +!! NOTES +!! +!! SOURCE + + +subroutine pawpsp_consistency() + +! ************************************************************************* + +!Check pspcod=7 or 17 + if(pspcod/=7 .and. pspcod/=17)then + write(msg, '(a,i2,a,a)' )& +& 'In reading atomic psp file, finds pspcod=',pspcod,ch10,& +& 'This is not an allowed value within PAW.' + LIBPAW_BUG(msg) + end if + +!Does nuclear charge znuclpsp agree with psp input znucl + if (abs(znuclpsp-znucl)>tol8) then + write(msg, '(a,f10.5,2a,f10.5,5a)' )& +& 'Pseudopotential file znucl=',znucl,ch10,& +& 'does not equal input znuclpsp=',znuclpsp,' better than 1e-08 .',ch10,& +& 'znucl is read from the psp file in pspatm_abinit, while',ch10,& +& 'znuclpsp is read in iofn2.' + LIBPAW_BUG(msg) + end if + +!Does nuclear charge zionpsp agree with psp input zion + if (abs(zionpsp-zion)>tol8) then + write(msg, '(a,f10.5,2a,f10.5,5a)' )& +& 'Pseudopotential file zion=',zion,ch10,& +& 'does not equal input zionpsp=',zionpsp,' better than 1e-08 .',ch10,& +& 'zion is read from the psp file in pawpsp_main, while',ch10,& +& 'zionpsp is read in iofn2.' + LIBPAW_BUG(msg) + end if + +!Check several choices for ixc against pspxc +!ixc is from ABINIT code; pspxc is from atomic psp file + if (ixc==0) then + msg='Note that input ixc=0 => no xc is being used.' + LIBPAW_WARNING(msg) + else if(ixc/=pspxc) then + write(msg, '(a,i8,a,a,a,i8,a,a,a,a,a,a,a,a,a,a)' ) & +& 'Pseudopotential file pspxc=',pspxc,',',ch10,& +& 'not equal to input ixc=',ixc,'.',ch10,& +& 'These parameters must agree to get the same xc ',ch10,& +& 'in ABINIT code as in psp construction.',ch10,& +& 'Action : check psp design or input file.',ch10,& +& 'Assume experienced user. Execution will continue.',ch10 + LIBPAW_WARNING(msg) + end if + + if (lloc>lmax ) then + write(msg, '(a,2i12,a,a,a,a)' )& +& 'lloc,lmax=',lloc,lmax,ch10,& +& 'chosen l of local psp exceeds range from input data.',ch10,& +& 'Action : check pseudopotential input file.' + LIBPAW_ERROR(msg) + end if + +end subroutine pawpsp_consistency +!!*** + +end subroutine pawpsp_main +!!*** + +!------------------------------------------------------------------------- + +end module m_pawpsp +!!*** diff --git a/GX-PAW/libpaw/src/m_pawpsp.o b/GX-PAW/libpaw/src/m_pawpsp.o new file mode 100644 index 00000000..331013e3 Binary files /dev/null and b/GX-PAW/libpaw/src/m_pawpsp.o differ diff --git a/GX-PAW/libpaw/src/m_pawrad.F90 b/GX-PAW/libpaw/src/m_pawrad.F90 new file mode 100644 index 00000000..d5264dc6 --- /dev/null +++ b/GX-PAW/libpaw/src/m_pawrad.F90 @@ -0,0 +1,1758 @@ +!!****m* ABINIT/m_pawrad +!! NAME +!! m_pawrad +!! +!! FUNCTION +!! Module containing all the functions related to the PAW radial meshes +!! +!! COPYRIGHT +!! Copyright (C) 2013-2024 ABINIT group (MT,FJ,MG) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! NOTES +!! * Routines tagged with "@type_name" are strongly connected to the definition of the data type. +!! Strongly connected means that the proper functioning of the implementation relies on the +!! assumption that the tagged procedure is consistent with the type declaration. +!! Every time a developer changes the structure "type_name" adding new entries, he/she has to make sure +!! that all the strongly connected routines are changed accordingly to accommodate the modification of the data type +!! Typical examples of strongly connected routines are creation, destruction or reset methods. +!! +!! * FOR DEVELOPERS: in order to preserve the portability of libPAW library, +!! please consult ~abinit/src/??_libpaw/libpaw-coding-rules.txt +!! +!! SOURCE + +#include "libpaw.h" + +MODULE m_pawrad + + USE_DEFS + USE_MSG_HANDLING + USE_MPI_WRAPPERS + USE_MEMORY_PROFILING + + use m_paw_numeric, only : paw_derfc + + implicit none + + private + +!public procedures. + public :: pawrad_init ! Main creation method + public :: pawrad_free ! Free the allocated memory + public :: pawrad_print ! Printout of the basic info + public :: pawrad_isame ! Checks whether two meshes are equivalent or have the same equation. + public :: pawrad_copy ! Returns a copy of the mesh. + public :: pawrad_ifromr ! Retrieve the Index FROM a given R value in a radial grid. + public :: pawrad_deducer0 ! Extrapolate r=0 value of a function from values near r=0. + public :: pawrad_bcast ! Broadcast pawrad datastructure over a given MPI communicator + public :: simp_gen ! Performs integral on a given (generalized) grid using Simpson rule. + public :: nderiv_gen ! Do corrected first (and 2nd) derivation on a given (generalized) grid. + public :: nderiv_lin ! Do corrected first (and 2nd) derivation on a given linear grid. + public :: bound_deriv ! Computes derivatives at boundaries of the mesh + public :: poisson ! Solves Poisson eq. for angularly dependent charge distribution of angular momentum l + public :: screened_coul_kernel ! Kernel used to compute short-range screened Coulomb integrals + public :: calc_slatradl ! Calculates the radial part of Slater integrals. + + interface pawrad_free + module procedure pawrad_free_0D + module procedure pawrad_free_1D + end interface pawrad_free + + ! TODO: Might use bit flags, but all radmesh stuff should be encapsulated here! + integer,private,parameter :: RMESH_LINEAR = 1 + integer,private,parameter :: RMESH_LOG1 = 2 + integer,private,parameter :: RMESH_LOG2 = 3 + integer,private,parameter :: RMESH_LOG3 = 4 + integer,private,parameter :: RMESH_NL = 5 +!!*** + +!------------------------------------------------------------------------- + +!!****t* m_pawrad/pawrad_type +!! NAME +!! pawrad_type +!! +!! FUNCTION +!! For PAW, RADial mesh discretization and related data +!! +!! SOURCE + + type, public :: pawrad_type + +!Integer scalars + + integer :: int_meshsz=0 + ! Mesh size used in integrals computation + ! Integrals will be computed up to r(int_meshsz) + + integer :: mesh_size=0 + ! Dimension of radial mesh + + integer :: mesh_type=-1 + ! Type of mesh + ! 1=regular grid: r(i)=(i-1)*AA + ! 2=logarithmic grid: r(i)=AA*(exp[BB*(i-1)]-1) + ! 3=logarithmic grid: r(i>1)=AA*exp[BB*(i-1)] and r(1)=0 + ! 4=logarithmic grid: r(i)=-AA*ln[1-BB*(i-1)] with BB=1/n + +!Real (real(dp)) scalars + + real(dp) :: lstep=zero + ! Exponential step of the mesh (BB parameter above) + ! Defined only if mesh type is logarithmic + + real(dp) :: rmax=zero + ! Max. value of r = rad(mesh_size) + + real(dp) :: rstep=zero + ! Radial step of the mesh (AA parameter above) + + real(dp) :: stepint=zero + ! Radial step used to convert any function from the + ! present grid onto a regular grid in order to + ! integrate it using trapeze method + +!Real (real(dp)) arrays + + real(dp), allocatable :: rad(:) + ! rad(mesh_size) + ! Coordinates of all the points of the mesh + + real(dp), allocatable :: radfact(:) + ! radfact(mesh_size) + ! Factor used to compute radial integrals + ! Before being integrated on the present mesh, + ! any function is multiplied by this factor + + real(dp), allocatable :: simfact(:) + ! simfact(mesh_size) + ! Factor used to compute radial integrals by the a Simpson scheme + ! Integral[f] = Sum_i [simfact(i)*f(i)] + + end type pawrad_type +!!*** + +CONTAINS +!=========================================================== +!!*** + +!!****f* m_pawrad/pawrad_init +!! NAME +!! pawrad_init +!! +!! FUNCTION +!! Creation method for radial meshes. +!! Compute all points (and related weights) of a radial mesh. +!! Grid can be regular or logarithimc. +!! +!! INPUTS +!! [mesh_size]=Dimension of the radial mesh +!! If not present, take mesh%mesh_size +!! [mesh_type]=Type of mesh +!! If not present, take mesh%mesh_type +!! [rstep]=Radial step of the mesh (AA parameter above) +!! If not present, take mesh%rstep +!! [lstep]=Exponential step of the mesh (BB parameter above) +!! If not present, take mesh%lstep +!! Needed only if mesh type is logarithmic. +!! [r_for_intg]=Mesh size used in integrals computation +!! If not present, take mesh%r_for_intg +!! Integrals will be computed up to rr(r_for_intg) +!! (can be negative for an integration over the whole grid) +!! +!! OUTPUT +!! +!! SIDE EFFECTS +!! mesh=The object completely initialized (containing radial grid information). +!! The following quantities are calculated inside the routine: +!! %stepint = Radial step used to convert any function from the +!! present grid onto a regular grid in order to integrate it using trapeze method +!! %rad(mesh_size) = Coordinates of all the points of the mesh. +!! %radfact(mesh_size) = Factors used to compute radial integrals. +!! %int_meshsz = Integrals will be computed up to r(int_meshsz) +!! %simfact(mesh_size) = Factor used to compute radial integrals by the a Simpson scheme +!! Integral[f] = Sum_i [simfact(i)*f(i)] +!! %rmax = Max. value of r = rad(mesh_size) +!! +!! NOTES +!! Possible mesh types (mesh%mesh_type) +!! mesh_type=1 (regular grid): rad(i)=(i-1)*AA +!! mesh_type=2 (logari. grid): rad(i)=AA*(exp[BB*(i-1)]-1) +!! mesh_type=3 (logari. grid): rad(i>1)=AA*exp[BB*(i-2)] and rad(1)=0 +!! mesh_type=4 (logari. grid): rad(i)=-AA*ln[1-BB*(i-1)] with BB=1/n +!! mesh_type=5 ( grid): rad(i)=AA*i/(n-i) +!! +!! SOURCE + +subroutine pawrad_init(mesh,mesh_size,mesh_type,rstep,lstep,r_for_intg) + +!Arguments ------------------------------------ +!scalars + integer,intent(in),optional :: mesh_size,mesh_type + real(dp),intent(in),optional :: rstep,lstep + real(dp),intent(in),optional :: r_for_intg + type(pawrad_type),intent(inout) :: mesh + +!Local variables------------------------------- +!scalars + integer :: ir,ir_last,isim,mesh_size_,mesh_type_ + real(dp) :: hh,lstep_,rstep_,r_for_intg_ + character(len=500) :: msg + +! ************************************************************************* + + !@pawrad_type + +!Retrieve mesh data + mesh_size_ = mesh%mesh_size ; if (present(mesh_size)) mesh_size_ = mesh_size + mesh_type_ = mesh%mesh_type ; if (present(mesh_type)) mesh_type_ = mesh_type + rstep_ = mesh%rstep ; if (present(rstep)) rstep_ = rstep + lstep_ = mesh%lstep ; if (present(lstep)) lstep_ = lstep + + r_for_intg_=-1._dp;if (present(r_for_intg)) r_for_intg_=r_for_intg + + mesh%mesh_size = mesh_size_ + mesh%mesh_type = mesh_type_ + mesh%rstep = rstep_ + mesh%lstep = lstep_ + LIBPAW_ALLOCATE(mesh%rad ,(mesh%mesh_size)) + LIBPAW_ALLOCATE(mesh%radfact,(mesh%mesh_size)) + LIBPAW_ALLOCATE(mesh%simfact,(mesh%mesh_size)) + mesh%simfact=zero + if (mesh%mesh_type==1) then + isim=3 + mesh%stepint=mesh%rstep + mesh%rad(1)=zero;mesh%radfact(1)=one + do ir=2,mesh%mesh_size + mesh%rad(ir) =mesh%rstep*dble(ir-1) + mesh%radfact(ir)=one + end do + else if (mesh%mesh_type==2) then + isim=3 + mesh%stepint=mesh%lstep + mesh%rad(1)=zero;mesh%radfact(1)=mesh%rstep + do ir=2,mesh%mesh_size + mesh%rad(ir) =mesh%rstep*(exp(mesh%lstep*dble(ir-1))-one) + mesh%radfact(ir)=mesh%rad(ir)+mesh%rstep + end do + else if (mesh%mesh_type==3) then + isim=4 + mesh%stepint=mesh%lstep + mesh%rad(1)=zero;mesh%radfact(1)=zero + do ir=2,mesh%mesh_size + mesh%rad(ir) =mesh%rstep*exp(mesh%lstep*dble(ir-2)) + mesh%radfact(ir)=mesh%rad(ir) + end do + else if (mesh%mesh_type==4) then + isim=3 + mesh%lstep=one/dble(mesh%mesh_size) + mesh%stepint=mesh%lstep + mesh%rad(1)=zero;mesh%radfact(1)=mesh%rstep + do ir=2,mesh%mesh_size + mesh%rad(ir) =-mesh%rstep*log(one-mesh%lstep*dble(ir-1)) + mesh%radfact(ir)=mesh%rstep/(one-mesh%lstep*dble(ir-1)) + end do + else if (mesh%mesh_type==5) then + isim=3 + mesh%stepint=mesh%rstep + mesh%rad(1)=zero;mesh%radfact(1)=1/mesh%lstep + do ir=2,mesh%mesh_size + mesh%rad(ir) =mesh%rstep*dble(ir-1)/(mesh%lstep-dble(ir-1)) + mesh%radfact(ir)=(mesh%rstep+mesh%rad(ir))/(mesh%lstep-dble(ir-1))/mesh%rstep + end do + + else ! Other values of mesh_type are not allowed (see psp7in.F90) + write(msg,'(a,i0)')" Unknown value of mesh_type: ",mesh%mesh_type + LIBPAW_ERROR(msg) + end if + + mesh%int_meshsz=mesh%mesh_size + if (r_for_intg_>0.d0) then + ir=min(pawrad_ifromr(mesh,r_for_intg_),mesh%mesh_size) + if (ir1) then + if (abs(mesh%rad(ir-1)-r_for_intg_)=Object defining the radial mesh +!! header=String for the header provided by the user. +!! [unit]=Unit number for output, defaults to std_out +!! [prtvol]=Verbosity level, minimal if not specified. +!! [mode_paral]=Either "COLL" or "PERS". Passed to wrtout. Defaults to "COLL" +!! +!! OUTPUT +!! Only writing. +!! +!! SOURCE + +subroutine pawrad_print(Rmesh,header,unit,prtvol,mode_paral) + +!Arguments ------------------------------------ + integer,intent(in),optional :: prtvol,unit + character(len=4),intent(in),optional :: mode_paral + character(len=*),intent(in),optional :: header + type(pawrad_type),intent(in) :: Rmesh + +!Local variables------------------------------- +!scalars + integer :: my_unt,my_prtvol + character(len=4) :: my_mode + character(len=500) :: msg + +! ************************************************************************* + + !@pawrad_type + my_unt =std_out; if (PRESENT(unit )) my_unt =unit + my_prtvol=0 ; if (PRESENT(prtvol )) my_prtvol=prtvol + my_mode ='COLL' ; if (PRESENT(mode_paral)) my_mode =mode_paral + + msg=ch10//' ==== Info on the Radial Mesh ==== ' + if (PRESENT(header)) msg=ch10//' ==== '//TRIM(ADJUSTL(header))//' ==== ' + call wrtout(my_unt,msg,my_mode) + + SELECT CASE (Rmesh%mesh_type) + + CASE (RMESH_LINEAR) + write(msg,'(a,i4,a,g12.5)')& +& ' - Linear mesh: r(i)=step*(i-1), size=',Rmesh%mesh_size,', step=',Rmesh%rstep + + CASE (RMESH_LOG1) + write(msg,'(a,i4,2(a,g12.5))')& +& ' - Logarithimc mesh: r(i)=AA*[exp(BB*(i-1))-1], size=',Rmesh%mesh_size,', AA=',Rmesh%rstep,' BB=',Rmesh%lstep + + CASE (RMESH_LOG2) + write(msg,'(a,i4,2(a,g12.5))')& +& ' - Logarithimc mesh: r(i)=AA*exp(BB*(i-2)), size=',Rmesh%mesh_size,', AA=',Rmesh%rstep,' BB=',Rmesh%lstep + + CASE (RMESH_LOG3) + write(msg,'(a,i1,a,i4,a,g12.5)')& +& ' - Logarithimc mesh: r(i)=-AA*ln(1-(i-1)/n), n=size=',Rmesh%mesh_size,', AA=',Rmesh%rstep + + CASE (RMESH_NL) + write(msg,'(a,i1,a,i4,a,g12.5)')& +& ' - Non-linear mesh: r(i)=-AA*i/(n-i), n=size=',Rmesh%mesh_size,', AA=',Rmesh%rstep + + CASE DEFAULT + msg = ' Unknown mesh type! Action : check your pseudopotential or input file.' + LIBPAW_ERROR(msg) + END SELECT + + call wrtout(my_unt,msg,my_mode) + + if (my_prtvol>1) then + write(msg,'(a,i4)')' Mesh size for integrals = ',Rmesh%int_meshsz + call wrtout(my_unt,msg,my_mode) + write(msg,'(a,g12.5)')' rmax=rad(mesh_size) = ',Rmesh%rmax + call wrtout(my_unt,msg,my_mode) + write(msg,'(a,g12.5)')' Value of stepint = ',Rmesh%stepint + call wrtout(my_unt,msg,my_mode) + end if + +end subroutine pawrad_print +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawrad/pawrad_isame +!! NAME +!! pawrad_isame +!! +!! FUNCTION +!! Check two radial meshes, returns a logical flag defining +!! whether the meshes have the same equation and an integer +!! flag +!! +!! INPUTS +!! Rmesh1,Rmesh2=The two radial meshes. +!! +!! OUTPUT +!! hasameq=.true. if the two meshes are defined by the same equation. +!! whichdenser= +!! * 0 if meshes are not compatible +!! * 1 if Rmesh1 is denser than Rmesh2 +!! * 2 if Rmesh2 is denser than Rmesh1 +!! +!! SOURCE + +subroutine pawrad_isame(Rmesh1,Rmesh2,hasameq,whichdenser) + +!Arguments ------------------------------------ + integer,intent(out) :: whichdenser + logical,intent(out) :: hasameq + type(pawrad_type),intent(in) :: Rmesh1 + type(pawrad_type),intent(in) :: Rmesh2 + +!Local variables------------------------------- + character(len=50) :: msg + +! ************************************************************************* + + !@pawrad_type + + whichdenser =0 ; hasameq=.FALSE. + + if (Rmesh1%mesh_type /= Rmesh2%mesh_type) RETURN + + SELECT CASE (Rmesh1%mesh_type) + + CASE (RMESH_LINEAR) !check for linear meshes + hasameq = (Rmesh1%rstep == Rmesh2%rstep) + + CASE (RMESH_LOG1,& !check for logarithmic meshes +& RMESH_LOG2,& +& RMESH_LOG3) + + hasameq = ( Rmesh1%rstep == Rmesh2%rstep & +& .and.Rmesh1%lstep == Rmesh2%lstep ) + + CASE (RMESH_NL) !check for linear meshes + hasameq = (Rmesh1%rstep == Rmesh2%rstep) + + CASE DEFAULT + msg='Unknown mesh type' + LIBPAW_ERROR(msg) + + END SELECT + + ! === If meshes have same equation, check whether they are equal === + ! * Note that also int_meshsz must be equal + if (hasameq) then + whichdenser= 1 + if (Rmesh2%mesh_size > Rmesh1%mesh_size ) whichdenser = 2 + !if (Rmesh1%int_meshsz == Rmesh2%int_meshsz) whichdenser = 2 + end if + +end subroutine pawrad_isame +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawrad/pawrad_copy +!! NAME +!! pawrad_copy +!! +!! FUNCTION +!! Copy one radial mesh (in a generalized format) to another +!! +!! INPUTS +!! mesh1 =data containing radial grid information of input mesh +!! +!! OUTPUT +!! mesh2 =data containing radial grid information of output mesh +!! +!! NOTES +!! Possible mesh types (mesh%mesh_type) +!! mesh_type=1 (regular grid): rad(i)=(i-1)*AA +!! mesh_type=2 (logari. grid): rad(i)=AA*(exp[BB*(i-1)]-1) +!! mesh_type=3 (logari. grid): rad(i>1)=AA*exp[BB*(i-2)] and rad(1)=0 +!! mesh_type=4 (logari. grid): rad(i)=-AA*ln[1-BB*(i-1)] with BB=1/n +!! mesh_type=5 ( grid): rad(i)=AA*i/(n-i) +!! +!! SOURCE + +subroutine pawrad_copy(mesh1,mesh2) + +!Arguments ------------------------------------ +!scalars + type(pawrad_type),intent(in) :: mesh1 + type(pawrad_type),intent(out) :: mesh2 + +!Local variables------------------------------- +!scalars + integer :: ir + +! ************************************************************************* + + mesh2%mesh_type =mesh1%mesh_type + mesh2%mesh_size =mesh1%mesh_size + mesh2%int_meshsz=mesh1%int_meshsz + mesh2%lstep =mesh1%lstep + mesh2%rstep =mesh1%rstep + mesh2%stepint =mesh1%stepint + mesh2%rmax =mesh1%rmax + + LIBPAW_ALLOCATE(mesh2%rad,(mesh1%mesh_size)) + LIBPAW_ALLOCATE(mesh2%radfact,(mesh1%mesh_size)) + LIBPAW_ALLOCATE(mesh2%simfact,(mesh1%mesh_size)) + do ir=1,mesh1%mesh_size + mesh2%rad(ir) =mesh1%rad(ir) + mesh2%radfact(ir)=mesh1%radfact(ir) + mesh2%simfact(ir)=mesh1%simfact(ir) + end do + +end subroutine pawrad_copy +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawrad/pawrad_deducer0 +!! NAME +!! pawrad_deducer0 +!! +!! FUNCTION +!! Extrapolate r=0 value of a function from values near r=0 +!! using a 3 points formula +!! +!! INPUTS +!! funcsz=size of array func +!! radmesh =data containing radial grid information +!! +!! SIDE EFFECTS +!! func(funcsz)=array containing values of function to extrapolate +!! +!! SOURCE + +subroutine pawrad_deducer0(func,funcsz,radmesh) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: funcsz + type(pawrad_type),intent(in) :: radmesh +!arrays + real(dp),intent(inout) :: func(funcsz) + +! ************************************************************************* + + if (radmesh%mesh_type==1.or.radmesh%mesh_type==2.or.radmesh%mesh_type==4.or.radmesh%mesh_type==5) then + func(1)=func(4)+3*(func(2)-func(3)) + else if (radmesh%mesh_type==3) then + func(1)=func(4)+exp(two*radmesh%lstep)/(exp(radmesh%lstep)-one)*(func(2)-func(3)) + end if + +end subroutine pawrad_deducer0 +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawrad/pawrad_bcast +!! NAME +!! pawrad_bcast +!! +!! FUNCTION +!! Communicate pawrad data over a given MPI communicator +!! +!! INPUTS +!! comm_mpi= communicator used to broadcast data +!! +!! SIDE EFFECTS +!! pawrad== a radial mesh datastructure for PAW +!! +!! SOURCE + +subroutine pawrad_bcast(pawrad,comm_mpi) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: comm_mpi + type(pawrad_type),intent(inout) :: pawrad + +!Local variables------------------------------- +!scalars + integer :: ierr,indx,me,nn,isz1 + integer :: if_rad,if_radfact,if_simfact !flags used to communicate + character(len=500) :: msg +!arrays + integer,allocatable :: list_int(:) + real(dp),allocatable :: list_dpr(:) + +!************************************************************************* + + me=xmpi_comm_rank(comm_mpi) + +!Initializations + if_rad=0; if_radfact=0; if_simfact=0 + +!calculate the size of the reals + if(me==0) then + if (allocated(pawrad%rad)) then + if_rad=1 !communicate rad + isz1=size(pawrad%rad) + if(isz1/=pawrad%mesh_size) then + msg='rad: sz1 /= pawrad%mesh_size (1)' + LIBPAW_BUG(msg) + end if + end if + if (allocated(pawrad%radfact)) then + if_radfact=1 !communicate radfact + isz1=size(pawrad%radfact) + if(isz1/=pawrad%mesh_size) then + msg='radfact: sz1 /= pawrad%mesh_size (2)' + LIBPAW_BUG(msg) + end if + end if + if (allocated(pawrad%simfact)) then + if_simfact=1 !communicate simfact + isz1=size(pawrad%simfact) + if(isz1/=pawrad%mesh_size) then + msg='simfact: sz1 /= pawrad%mesh_size (3)' + LIBPAW_BUG(msg) + end if + end if + end if + +!Brodcast the integers + LIBPAW_ALLOCATE(list_int,(6)) + if(me==0) then + list_int(1)=pawrad%int_meshsz + list_int(2)=pawrad%mesh_size + list_int(3)=pawrad%mesh_type + list_int(4)=if_rad + list_int(5)=if_radfact + list_int(6)=if_simfact + end if + call xmpi_bcast(list_int,0,comm_mpi,ierr) + if(me/=0) then + pawrad%int_meshsz =list_int(1) + pawrad%mesh_size =list_int(2) + pawrad%mesh_type =list_int(3) + if_rad=list_int(4) + if_radfact=list_int(5) + if_simfact=list_int(6) + end if + LIBPAW_DEALLOCATE(list_int) + +!Broadcast the reals + nn=4+pawrad%mesh_size*(if_rad+if_radfact+if_simfact) + LIBPAW_ALLOCATE(list_dpr,(nn)) + if(me==0) then + list_dpr(1)=pawrad%lstep + list_dpr(2)=pawrad%rmax + list_dpr(3)=pawrad%rstep + list_dpr(4)=pawrad%stepint + indx=5 + if (if_rad==1) then + isz1=pawrad%mesh_size + list_dpr(indx:indx+isz1-1)=pawrad%rad(1:isz1) + indx=indx+isz1 + end if + if (if_radfact==1) then + isz1=pawrad%mesh_size + list_dpr(indx:indx+isz1-1)=pawrad%radfact(1:isz1) + indx=indx+isz1 + end if + if (if_simfact==1) then + isz1=pawrad%mesh_size + list_dpr(indx:indx+isz1-1)=pawrad%simfact(1:isz1) + indx=indx+isz1 + end if + end if + call xmpi_bcast(list_dpr,0,comm_mpi,ierr) + if(me/=0) then + pawrad%lstep=list_dpr(1) + pawrad%rmax=list_dpr(2) + pawrad%rstep=list_dpr(3) + pawrad%stepint=list_dpr(4) + indx=5 +! Deallocate all arrays: + if (allocated(pawrad%rad)) then + LIBPAW_DEALLOCATE(pawrad%rad) + end if + if (allocated(pawrad%radfact)) then + LIBPAW_DEALLOCATE(pawrad%radfact) + end if + if (allocated(pawrad%simfact)) then + LIBPAW_DEALLOCATE(pawrad%simfact) + end if +! Communicate if flag is set to 1: + if(if_rad==1) then + isz1=pawrad%mesh_size + LIBPAW_ALLOCATE(pawrad%rad,(isz1)) + pawrad%rad(1:isz1)=list_dpr(indx:indx+isz1-1) + indx=indx+isz1 + end if + if(if_radfact==1) then + isz1=pawrad%mesh_size + LIBPAW_ALLOCATE(pawrad%radfact,(isz1)) + pawrad%radfact(1:isz1)=list_dpr(indx:indx+isz1-1) + indx=indx+isz1 + end if + if(if_simfact==1) then + isz1=pawrad%mesh_size + LIBPAW_ALLOCATE(pawrad%simfact,(isz1)) + pawrad%simfact(1:isz1)=list_dpr(indx:indx+isz1-1) + indx=indx+isz1 + end if + end if + LIBPAW_DEALLOCATE(list_dpr) + +end subroutine pawrad_bcast +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawrad/simp_gen +!! NAME +!! simp_gen +!! +!! FUNCTION +!! Do integral on a given (generalized) grid using Simpson rule +!! +!! INPUTS +!! radmesh =data containing radial grid information +!! func(:)=integrand values +!! r_for_intg=upper boundary for (future) integration over the radial grid +!! (can be negative for an integration over the whole grid) +!! +!! OUTPUT +!! intg=resulting integral by Simpson rule +!! +!! NOTES +!! Possible mesh types (radmesh%mesh_type) +!! mesh_type=1 (regular grid): rad(i)=(i-1)*AA +!! mesh_type=2 (logari. grid): rad(i)=AA*(exp[BB*(i-1)]-1) +!! mesh_type=3 (logari. grid): rad(i>1)=AA*exp[BB*(i-2)] and rad(1)=0 +!! mesh_type=4 (logari. grid): rad(i)=-AA*ln[1-BB*(i-1)] with BB=1/n +!! mesh_type=5 ( grid): rad(i)=AA*i/(n-i) +!! +!! SOURCE + +subroutine simp_gen(intg,func,radmesh,r_for_intg) + +#if defined HAVE_AVX_SAFE_MODE +!DEC$ NOOPTIMIZE +#endif + +!Arguments ------------------------------------ +!scalars + real(dp),intent(out) :: intg + real(dp),intent(in),optional :: r_for_intg + type(pawrad_type),intent(in) :: radmesh +!arrays + real(dp),intent(in) :: func(:) + +!Local variables------------------------------- +!scalars + integer :: ii,int_meshsz,ir,ir_last,isim,nn + real(dp) :: hh,resid,simp + real(dp),allocatable :: simfact(:) + character(len=500) :: msg + +! ************************************************************************* + + if (present(r_for_intg)) then + if (r_for_intg>0.d0) then + ir=min(pawrad_ifromr(radmesh,r_for_intg),radmesh%mesh_size) + if (ir1) then + if (abs(radmesh%rad(ir-1)-r_for_intg)radmesh%mesh_size.or.int_meshsz>size(func)) then + write(msg,'(3(a,i4))')"int_meshsz= ",int_meshsz," > mesh_size=",radmesh%mesh_size,& +& ", size(func)=",size(func) + LIBPAW_BUG(msg) + end if + isim=3; if (radmesh%mesh_type==3)isim=4 + LIBPAW_ALLOCATE(simfact,(radmesh%mesh_size)) + hh=radmesh%stepint/3.d0 + simfact(int_meshsz)=hh*radmesh%radfact(int_meshsz) + simfact(1:isim-2)=zero + ir_last=1 + do ir=int_meshsz,isim,-2 + simfact(ir-1)=4.d0*hh*radmesh%radfact(ir-1) + simfact(ir-2)=2.d0*hh*radmesh%radfact(ir-2) + ir_last=ir-2 + end do + simfact(ir_last)=half*simfact(ir_last) + if (int_meshszsize(func)) then + write(msg,'(2(a,i4))')"int_meshsz= ",int_meshsz," > size(func)=",size(func) + LIBPAW_BUG(msg) + end if + nn=radmesh%int_meshsz + simp=zero + do ii=1,nn + simp=simp+func(ii)*radmesh%simfact(ii) + end do + end if + + resid=zero + if (radmesh%mesh_type==3) then + resid=half*(func(2)+func(1))*(radmesh%rad(2)-radmesh%rad(1)) + if (mod(nn,2)==1) resid=resid+radmesh%stepint/3.d0*(1.25d0*func(2)*radmesh%radfact(2) & +& +2.d0*func(3)*radmesh%radfact(3)-0.25d0*func(4)*radmesh%radfact(4)) + else if (mod(nn,2)==0) then + resid=radmesh%stepint/3.d0*(1.25d0*func(1)*radmesh%radfact(1)+2.d0*func(2)*radmesh%radfact(2) & +& -0.25d0*func(3)*radmesh%radfact(3)) + end if + + intg=simp+resid + +end subroutine simp_gen +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawrad/nderiv_gen +!! NAME +!! nderiv_gen +!! +!! FUNCTION +!! Do corrected first (and -if requested- second) derivation on a given (generalized) grid. +!! This routine interfaces nderiv_lin (derivation on a linear grid). +!! +!! INPUTS +!! func(:)=input function +!! radmesh =data containing radial grid information +!! +!! OUTPUT +!! der(:)= 1st derivative of input function +!! [der2(:)]= -- optional -- 2nd derivative of input function +!! +!! NOTES +!! Possible mesh types (radmesh%mesh_type) +!! mesh_type=1 (regular grid): rad(i)=(i-1)*AA +!! mesh_type=2 (logari. grid): rad(i)=AA*(exp[BB*(i-1)]-1) +!! mesh_type=3 (logari. grid): rad(i>1)=AA*exp[BB*(i-2)] and rad(1)=0 +!! mesh_type=4 (logari. grid): rad(i)=-AA*ln[1-BB*(i-1)] with BB=1/n +!! +!! SOURCE + +subroutine nderiv_gen(der,func,radmesh,der2) + +!Arguments ------------------------------------ +!scalars + type(pawrad_type),intent(in) :: radmesh +!arrays + real(dp),intent(in) :: func(:) + real(dp),intent(out) :: der(:) + real(dp),optional,intent(out) :: der2(:) + +!Local variables------------------------------- +!scalars + integer :: msz + logical :: compute_2der + character(len=500) :: msg + +! ************************************************************************* + + msz=size(func) + if (size(der)/=msz.or.msz>radmesh%mesh_size) then + msg='wrong sizes for in/out arrays!' + LIBPAW_BUG(msg) + end if + + compute_2der=(present(der2)) + + if (radmesh%mesh_type==1) then + + call nderiv_lin(radmesh%rstep,func,der,msz,1) + if (compute_2der) then + call nderiv_lin(radmesh%rstep,func,der2,msz,2) + end if + + else if (radmesh%mesh_type==2) then + + call nderiv_lin(radmesh%lstep,func,der,msz,1) + der(1:msz)=der(1:msz)/radmesh%radfact(1:msz) + if (compute_2der)then + call nderiv_lin(radmesh%lstep,func,der2,msz,2) + der2(1:msz)=(der2(1:msz)/radmesh%radfact(1:msz)-der(1:msz))/radmesh%radfact(1:msz) + end if + + else if (radmesh%mesh_type==3) then + + call nderiv_lin(radmesh%lstep,func(2:msz),der(2:msz),msz-1,1) + der(2:msz)=der(2:msz)/radmesh%radfact(2:msz) + call pawrad_deducer0(der,msz,radmesh) + if (compute_2der)then + call nderiv_lin(radmesh%lstep,func(2:msz),der2(2:msz),msz-1,2) + der2(2:msz)=(der2(2:msz)/radmesh%radfact(2:msz)-der(2:msz))/radmesh%radfact(2:msz) + call pawrad_deducer0(der2,msz,radmesh) + end if + + else if (radmesh%mesh_type==4) then + + call nderiv_lin(radmesh%lstep,func,der,msz,1) + der(1:msz)=der(1:msz)/radmesh%radfact(1:msz) + if (compute_2der)then + call nderiv_lin(radmesh%lstep,func,der2,msz,2) + der2(1:msz)=der2(1:msz)/radmesh%radfact(1:msz)**2-der(1:msz)/radmesh%rstep + end if + + else if (radmesh%mesh_type==5) then + + call nderiv_lin(one,func,der,msz,1) + der(1:msz)=der(1:msz)/(radmesh%radfact(1:msz)*radmesh%rstep) + if (compute_2der)then + call nderiv_lin(one,func,der2,msz,2) + der2(1:msz)=der2(1:msz)/(radmesh%radfact(1:msz)*radmesh%rstep)**2-two*der(1:msz)/& +& (radmesh%rstep+radmesh%rad(1:msz)) + end if + end if + +end subroutine nderiv_gen +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawrad/nderiv_lin +!! NAME +!! nderiv_lin +!! +!! FUNCTION +!! Do corrected first (and -if requested- second) derivation on a given LINEAR grid. +!! +!! INPUTS +!! hh= radial step +!! ndim= radial mesh size +!! yy(ndim)= input function +!! norder= order of derivation (1 or 2) +!! +!! OUTPUT +!! zz(ndim)= first or second derivative of y +!! +!! SOURCE + +subroutine nderiv_lin(hh,yy,zz,ndim,norder) + +!Arguments --------------------------------------------- +!scalars + integer,intent(in) :: ndim,norder + real(dp),intent(in) :: hh +!arrays + real(dp),intent(in) :: yy(ndim) + real(dp),intent(out) :: zz(ndim) + +!Local variables --------------------------------------- +!scalars + integer :: ier,ii + real(dp) :: aa,bb,cc,h1,y1 + +! ************************************************************************* + +!Initialization (common to 1st and 2nd derivative) + h1=one/(12.d0*hh) + y1=yy(ndim-4) + +!FIRST DERIVATIVE +!================ + if (norder==1) then + +! Prepare differentiation loop + bb=h1*(-25.d0*yy(1)+48.d0*yy(2)-36.d0*yy(3)+16.d0*yy(4)-3.d0*yy(5)) + cc=h1*(-3.d0*yy(1)-10.d0*yy(2)+18.d0*yy(3)-6.d0*yy(4)+yy(5)) +! Start differentiation loop + do ii=5,ndim + aa=bb;bb=cc + cc=h1*(yy(ii-4)-yy(ii)+8.d0*(yy(ii-1)-yy(ii-3))) + zz(ii-4)=aa + end do +! Normal exit + ier=0 + aa=h1*(-y1+6.d0*yy(ndim-3)-18.d0*yy(ndim-2)+10.d0*yy(ndim-1)+3.d0*yy(ndim)) + zz(ndim)=h1*(3.d0*y1-16.d0*yy(ndim-3)+36.d0*yy(ndim-2) -48.d0*yy(ndim-1)+25.d0*yy(ndim)) + zz(ndim-1)=aa + zz(ndim-2)=cc + zz(ndim-3)=bb + +! SECOND DERIVATIVE +! ================= + else + h1=h1/hh +! Prepare differentiation loop + bb=h1*(35.d0*yy(1)-104.d0*yy(2)+114.d0*yy(3)-56.d0*yy(4)+11.d0*yy(5)) + cc=h1*(11.d0*yy(1)-20.d0*yy(2)+6.d0*yy(3)+4.d0*yy(4)-yy(5)) +! Start differentiation loop + do ii=5,ndim + aa=bb;bb=cc + cc=h1*(-yy(ii-4)-yy(ii)+16.d0*(yy(ii-1)+yy(ii-3))-30.d0*yy(ii-2)) + zz(ii-4)=aa + end do +! Normal exit + ier=0 + aa=h1*(-y1+4.d0*yy(ndim-3)+6.d0*yy(ndim-2)-20.d0*yy(ndim-1)+11.d0*yy(ndim)) + zz(ndim)=h1*(11.d0*y1-56.d0*yy(ndim-3)+114.d0*yy(ndim-2) -104.d0*yy(ndim-1)+35.d0*yy(ndim)) + zz(ndim-1)=aa + zz(ndim-2)=cc + zz(ndim-3)=bb + + end if !norder + +end subroutine nderiv_lin +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawrad/bound_deriv +!! NAME +!! bound_deriv +!! +!! FUNCTION +!! Computes derivatives of a function a boundaries of interval (first and last derivative) +!! +!! INPUTS +!! func(n)= array containing function +!! mesh = radial mesh and related data +!! nn= size of intervall +!! +!! OUTPUT +!! yp1,ypn= derivatives of func at r(1) and r(n) +!! +!! SOURCE + + subroutine bound_deriv(func,mesh,nn,yp1,ypn) + +!Arguments---------------------- + integer, intent(in) :: nn + real(dp), intent(in) :: func(nn) + real(dp), intent(out) :: yp1,ypn + type(pawrad_type),intent(in) :: mesh + +!************************************************************************* + + if (mesh%radfact(1)>zero) then + yp1=1._dp/12._dp/mesh%stepint/mesh%radfact(1) & +& *(-25._dp*func(1)+48._dp*func(2)-36._dp*func(3)+16._dp*func(4)-3._dp*func(5)) + else + yp1=(func(2)-func(1))/(mesh%rad(2)-mesh%rad(1)) + end if + ypn=1._dp/12._dp/mesh%stepint & +& *( 3._dp*func(nn-4)-16._dp*func(nn-3)+36._dp*func(nn-2)-48._dp*func(nn-1) & +& +25._dp*func(nn))/mesh%radfact(nn) + +end subroutine bound_deriv + +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawrad/poisson +!! NAME +!! poisson +!! +!! FUNCTION +!! Solve poisson equation for angularly dependent charge +!! distribution of angular momentum l +!! Densities and potentials are given on a (generalized) radial grid +!! +!! INPUTS +!! den(:)= electron density * (4*pi*r**2) appropriate for l +!! ll= l quantum number +!! radmesh =data containing radial grid information +!! [screened_sr_separation]= --optional-- separation for screened short-range kernel +!! no screening by default +!! +!! OUTPUT +!! [qq]= --optional-- lth moment of the charge; not compatible with screened Coulomb interaction +!! rv(:)= electrostatic potential * r in (Hartree*Bohr) units +!! where v(r)=\frac{1}{2l+1}(\frac{int[(r''^(l+2))g(r'')dr'']} {r^(l+1)} +!! +(r^l) int[r''^(1-l)g(r'')dr'']) +!! +!! SOURCE + +subroutine poisson(den,ll,radmesh,rv,screened_sr_separation,qq) + +!Arguments --------------------------------------------- +!scalars + integer,intent(in) :: ll + real(dp),intent(out),optional :: qq + real(dp),intent(in),optional :: screened_sr_separation + type(pawrad_type),intent(in) :: radmesh +!arrays + real(dp),intent(in) :: den(:) + real(dp),intent(out) :: rv(:) + +!Local variables --------------------------------------- +!scalars + integer :: ir,jr,mesh_size,mm,nn + logical :: use_numerov,use_screened + real(dp) :: angm,hh,intg,qq_,ri,rj,rr,sr_omega +!arrays + real(dp) :: ee(4) + real(dp),allocatable :: aa(:),bb(:),cc(:),dd(:),radl(:),radl1(:) + +! *************************************************************************** + + mesh_size=size(den) + if (size(rv)/=mesh_size.or.mesh_size>radmesh%mesh_size) then + LIBPAW_BUG('wrong sizes!') + end if + + use_numerov=(radmesh%mesh_type==1) + + use_screened=.false.;sr_omega=zero + if (present(screened_sr_separation)) then + sr_omega=screened_sr_separation + use_screened=(sr_omega>tol8) +! Numerov method not coded for screened Coulomb interaction + if (use_numerov.and.use_screened) use_numerov=.false. + end if + +!============================================== +!UNIFORM GRID - NUMEROV ALGORITHM +!============================================== + if (use_numerov) then + hh=radmesh%rstep + nn=radmesh%int_meshsz-1 + LIBPAW_ALLOCATE(aa,(nn)) + LIBPAW_ALLOCATE(bb,(nn)) + LIBPAW_ALLOCATE(cc,(nn+1)) + do ir=1,nn + aa(ir)=two*hh*den(ir+1)/(ir) + bb(ir)=den(ir+1)*((ir*hh)**ll) + end do + cc(1)=zero + cc(2:nn+1)=bb(1:nn) + call simp_gen(qq_,cc,radmesh) + qq_=qq_/dble(2*ll+1) + rv(1)=aa(1)+0.1_dp*aa(2) + do ir=2,nn-1 + rv(ir)=aa(ir)+0.1_dp*(aa(ir+1)+aa(ir-1)) + end do + rv(nn)=aa(nn)+0.1_dp*aa(nn-1) + angm=dble(ll*(ll+1)) + rr=(nn+1)*hh + rv(nn)=rv(nn)+(2.4_dp-0.2_dp*angm/((nn+1)**2))*qq_/(rr**ll) + do ir=1,nn + aa(ir)=angm/(ir*ir) + bb(ir)=2.4_dp+aa(ir) + end do + do ir=1,nn-1 + cc(ir)=-1.2_dp+0.1_dp*aa(ir+1) + end do + do ir=nn,2,-1 + aa(ir)=-1.2_dp+0.1_dp*aa(ir-1) + end do + if (nn.eq.1) then + rv(2)=rv(1)/bb(1) + rv(1)=zero + else + do ir=2,nn + bb(ir)=bb(ir)-aa(ir)*cc(ir-1)/bb(ir-1) + end do + rv(1)=rv(1)/bb(1) + do ir=2,nn + rv(ir)=(rv(ir)-aa(ir)*rv(ir-1))/bb(ir) + end do + do ir=nn-1,1,-1 + rv(ir)=rv(ir)-cc(ir)*rv(ir+1)/bb(ir) + end do + do ir=nn+1,2,-1 + rv(ir)=rv(ir-1) + end do + rv(1)=zero + if (nn+1radmesh%int_meshsz) + nn=nn-1 + end do + mm=nn;if (radmesh%mesh_type==3) mm=mm-1 + LIBPAW_ALLOCATE(aa,(nn)) + LIBPAW_ALLOCATE(bb,(nn)) + LIBPAW_ALLOCATE(cc,(nn)) + LIBPAW_ALLOCATE(dd,(nn)) + + if (.not.use_screened) then + +! Standard Coulomb integral + LIBPAW_ALLOCATE(radl,(nn)) + LIBPAW_ALLOCATE(radl1,(nn)) + do jr=nn,2,-1 + ir=nn-jr+1 + radl(jr) =radmesh%rad(jr)**ll + radl1(jr)=radmesh%rad(jr)*radl(jr) + aa(ir)=den(jr)*radmesh%radfact(jr)*radl(jr) + bb(ir)=den(jr)*radmesh%radfact(jr)/radl1(jr) + end do + radl(1)=zero;radl1(1)=zero + ee(2)=aa(nn-1);ee(3)=aa(nn-2);ee(4)=aa(nn-3) + call pawrad_deducer0(ee,4,radmesh) + aa(nn)=ee(1) + ee(2)=bb(nn-1);ee(3)=bb(nn-2);ee(4)=bb(nn-3) + call pawrad_deducer0(ee,4,radmesh) + bb(nn)=ee(1) + cc(1)=zero;dd(1)=zero + do ir=3,mm,2 + cc(ir) =cc(ir-2)+hh*(aa(ir-2)+four*aa(ir-1)+aa(ir)) + cc(ir-1)=cc(ir-2)+hh*(1.25_dp*aa(ir-2)+two*aa(ir-1)-quarter*aa(ir)) + dd(ir) =dd(ir-2)+hh*(bb(ir-2)+four*bb(ir-1)+bb(ir)) + dd(ir-1)=dd(ir-2)+hh*(1.25_dp*bb(ir-2)+two*bb(ir-1)-quarter*bb(ir)) + end do + if (mod(mm,2)==0) then +! cc(mm)=cc(mm-2)+hh*(aa(mm-2)+four*aa(mm-1)+aa(mm)) +! dd(mm)=dd(mm-2)+hh*(bb(mm-2)+four*bb(mm-1)+bb(mm)) + cc(mm)=cc(mm-1)+hh*(1.25_dp*aa(mm-2)+two*aa(mm-1)-quarter*aa(mm)) + dd(mm)=dd(mm-1)+hh*(1.25_dp*bb(mm-2)+two*bb(mm-1)-quarter*bb(mm)) + end if + if (mm2) then + do jr=ir-2,1,-2 + intg=intg+hh*(aa(jr)+four*aa(jr+1)+aa(jr+2)) + end do + if (mod(ir,2)==0) intg=intg+hh*(-quarter*aa(1)+two*aa(2)+1.25_dp*aa(3)) + else if (ir==2) then + if (nn >2) intg=intg+hh*(+1.25_dp*aa(1)+two*aa(2)-quarter*aa(3)) + if (nn==2) intg=intg+(aa(1)+aa(2))*hh*half + end if + if (mm=data containing radial grid information +!! +!! OUTPUT +!! pawrad_ifromr=index of rr in radial grid +!! +!! NOTES +!! Possible mesh types (radmesh%mesh_type) +!! mesh_type=1 (regular grid): rad(i)=(i-1)*AA +!! mesh_type=2 (logari. grid): rad(i)=AA*(exp[BB*(i-1)]-1) +!! mesh_type=3 (logari. grid): rad(i>1)=AA*exp[BB*(i-2)] and rad(1)=0 +!! mesh_type=4 (logari. grid): rad(i)=-AA*ln[1-BB*(i-1)] with BB=1/n +!! mesh_type=5 ( grid): rad(i)=AA*i/(n-i) +!! +!! SOURCE + +function pawrad_ifromr(radmesh,rr) + +!Arguments ------------------------------------ +!scalars + integer :: pawrad_ifromr + real(dp),intent(in) :: rr + type(pawrad_type),intent(in) :: radmesh + +!Local variables------------------------------- + character(len=500) :: msg + +! ************************************************************************* + + if (radmesh%mesh_type==1) then + pawrad_ifromr=int(tol8+rr/radmesh%rstep)+1 + else if (radmesh%mesh_type==2) then + pawrad_ifromr=int(tol8+log(1.d0+rr/radmesh%rstep)/radmesh%lstep)+1 + else if (radmesh%mesh_type==3) then + if (rr6) then + msg='PAW screened exchange not coded for l>2!' + LIBPAW_ERROR(msg) + end if + +!Use max and min of arguments + xx=max(r1,r2) ; yy=min(r1,r2) + +!Unscreened Coulomb interaction for very small (or negative) arguments + if (xx0 +!J. Phys. A 39, 8613 (2006) - Eq. (28), (29), (30) [[cite:Angyan2006]] +!------------------------------------------------------------------ + case(2) + sqrtpi=sqrt(pi) + if (order==0) then + screened_coul_kernel = paw_derfc(xx)/xx + exp(-xx**2)/sqrtpi * & +& (two/three *yy**2 & +& +(two*xx**2-three)/15._dp*yy**4) + else if(order==1) then + screened_coul_kernel = paw_derfc(xx)*yy/xx**2 + exp(-xx**2)/sqrtpi * & +& (two/xx *yy & +& +four*xx/5._dp *yy**3 & +& +two*xx*(two*xx**2-5._dp)/35._dp*yy**5) + else if (order==2) then + screened_coul_kernel = paw_derfc(xx)*yy**2/xx**3 + exp(-xx**2)/sqrtpi * & +& (two*(two*xx**2+three)/(three*xx**2) *yy**2 & +& +8._dp*xx**2/21._dp *yy**4 & +& +four*xx**2*(two*xx**2-7._dp)/189._dp*yy**6) + else if (order==3) then + screened_coul_kernel = paw_derfc(xx)*yy**3/xx**4 + exp(-xx**2)/sqrtpi * & +& (two*(four*xx**4+10._dp*xx**2+15._dp)/(15._dp*xx**3)*yy**3 & +& +16._dp*xx**3/135._dp *yy**5 & +& +8._dp*xx**3*(two*xx**2-9._dp)/1485._dp *yy**7) + else if (order==4) then + screened_coul_kernel = paw_derfc(xx)*yy**4/xx**5 + exp(-xx**2)/sqrtpi * & +& (two*(8._dp*xx**6+28._dp*xx**4+70._dp*xx**2+105._dp)/(105._dp*xx**4)*yy**4 & +& +32._dp*xx**4/1155._dp *yy**6 & +& +16._dp*xx**4*(two*xx**2-11._dp)/15015._dp *yy**8) + else if (order==5) then + screened_coul_kernel = paw_derfc(xx)*yy**5/xx**6 + exp(-xx**2)/sqrtpi * & +& (two*(16._dp*xx**8+72._dp*xx**6+252._dp*xx**4+630._dp*xx**2+945._dp)/(945._dp*xx**5)*yy**5 & +& +64._dp*xx**5/12285._dp *yy**7 & +& +32._dp*xx**5*(two*xx**2-13._dp)/184275._dp *yy**9) + else if (order==6) then + screened_coul_kernel = paw_derfc(xx)*yy**6/xx**7 + exp(-xx**2)/sqrtpi * & +& (two*(32._dp*xx**10+176._dp*xx**8+792._dp*xx**6+2772._dp*xx**4+6930._dp*xx**2+10395._dp)/(10395._dp*xx**6)*yy**6 & +& +128._dp*xx**6/155925._dp *yy**8 & +& +64._dp*xx**6*(two*xx**2-15._dp)/2650725._dp *yy**10) + end if + +!Development for xx*yy->0 +!J. Phys. A 39, 8613 (2006) - Eq. (24), (26) [[cite:Angyan2006]] +! Note: typo in the paper: (2n+3)! should be (2n+3)!! +!------------------------------------------------------------------ + case(3) + xy=xx*yy ; sqrtpi=sqrt(pi) + sumexp=exp(-(xx**2+yy**2)) + erfcp=paw_derfc(xx+yy) ; erfcm=paw_derfc(xx-yy) + if (order==0) then + f0 = two *(three +two*xy**2)/(three *sqrtpi)*sumexp + hh=((xx+yy)*erfcp-(xx-yy)*erfcm)/(two*xy) + screened_coul_kernel = hh + f0 + else if(order==1) then + f0 = two *(three +two*xy**2)/(three *sqrtpi)*sumexp + f1 = four *xy *(5._dp +two*xy**2)/(15._dp *sqrtpi)*sumexp + hh=((xx**3+yy**3)*erfcp-(xx**3-yy**3)*erfcm)/(two*xy**2) + screened_coul_kernel = hh + f1 + f0*(xx**2+yy**2)/xy + else if (order==2) then + f0 = two *(three +two*xy**2)/(three *sqrtpi)*sumexp + f1 = four *xy *(5._dp +two*xy**2)/(15._dp *sqrtpi)*sumexp + f2 = 8._dp *xy**2*(7._dp +two*xy**2)/(105._dp *sqrtpi)*sumexp + hh=((xx**5+yy**5)*erfcp-(xx**5-yy**5)*erfcm)/(two*xy**3) + screened_coul_kernel = hh + f2 + f1*(xx**2+yy**2)/xy + f0*(xx**4+yy**4)/xy**2 + else if (order==3) then + f0 = two *(three +two*xy**2)/(three *sqrtpi)*sumexp + f1 = four *xy *(5._dp +two*xy**2)/(15._dp *sqrtpi)*sumexp + f2 = 8._dp *xy**2*(7._dp +two*xy**2)/(105._dp *sqrtpi)*sumexp + f3 = 16._dp *xy**2*(9._dp +two*xy**2)/(945._dp *sqrtpi)*sumexp + hh=((xx**7+yy**7)*erfcp-(xx**7-yy**7)*erfcm)/(two*xy**4) + screened_coul_kernel = hh + f3 + f2*(xx**2+yy**2)/xy + f1*(xx**4+yy**4)/xy**2 & +& + f0*(xx**6+yy**6)/xy**3 + else if (order==4) then + f0 = two *(three +two*xy**2)/(three *sqrtpi)*sumexp + f1 = four *xy *(5._dp +two*xy**2)/(15._dp *sqrtpi)*sumexp + f2 = 8._dp *xy**2*(7._dp +two*xy**2)/(105._dp *sqrtpi)*sumexp + f3 = 16._dp *xy**2*(9._dp +two*xy**2)/(945._dp *sqrtpi)*sumexp + f4 = 32._dp *xy**2*(11._dp+two*xy**2)/(10395._dp *sqrtpi)*sumexp + hh=((xx**9+yy**9)*erfcp-(xx**9-yy**9)*erfcm)/(two*xy**5) + screened_coul_kernel = hh + f4 + f3*(xx**2+yy**2)/xy + f2*(xx**4+yy**4)/xy**2 & +& + f1*(xx**6+yy**6)/xy**3 + f0*(xx**8+yy**8)/xy**4 + else if (order==5) then + f0 = two *(three +two*xy**2)/(three *sqrtpi)*sumexp + f1 = four *xy *(5._dp +two*xy**2)/(15._dp *sqrtpi)*sumexp + f2 = 8._dp *xy**2*(7._dp +two*xy**2)/(105._dp *sqrtpi)*sumexp + f3 = 16._dp *xy**2*(9._dp +two*xy**2)/(945._dp *sqrtpi)*sumexp + f4 = 32._dp *xy**2*(11._dp+two*xy**2)/(10395._dp *sqrtpi)*sumexp + f5 = 64._dp *xy**2*(13._dp+two*xy**2)/(135135._dp *sqrtpi)*sumexp + hh=((xx**11+yy**11)*erfcp-(xx**11-yy**11)*erfcm)/(two*xy**6) + screened_coul_kernel = hh + f5 + f4*(xx**2+yy**2) /xy + f3*(xx**4+yy**4)/xy**2 & +& + f2*(xx**6+yy**6) /xy**3 + f1*(xx**8+yy**8)/xy**4 & +& + f0*(xx**10+yy**10)/xy**5 + else if (order==6) then + f0 = two *(three +two*xy**2)/(three *sqrtpi)*sumexp + f1 = four *xy *(5._dp +two*xy**2)/(15._dp *sqrtpi)*sumexp + f2 = 8._dp *xy**2*(7._dp +two*xy**2)/(105._dp *sqrtpi)*sumexp + f3 = 16._dp *xy**2*(9._dp +two*xy**2)/(945._dp *sqrtpi)*sumexp + f4 = 32._dp *xy**2*(11._dp+two*xy**2)/(10395._dp *sqrtpi)*sumexp + f5 = 64._dp *xy**2*(13._dp+two*xy**2)/(135135._dp *sqrtpi)*sumexp + f6 = 128._dp*xy**2*(15._dp+two*xy**2)/(1027025._dp*sqrtpi)*sumexp + hh=((xx**13+yy**13)*erfcp-(xx**13-yy**13)*erfcm)/(two*xy**7) + screened_coul_kernel = hh + f6 + f5*(xx**2+yy**2) /xy + f4*(xx**4+yy**4) /xy**2 & +& + f3*(xx**6+yy**6) /xy**3 + f1*(xx**8+yy**8) /xy**4 & +& + f1*(xx**10+yy**10)/xy**5 + f0*(xx**12+yy**12)/xy**6 + end if + + end select + +end function screened_coul_kernel +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawrad/calc_slatradl +!! NAME +!! calc_slatradl +!! +!! FUNCTION +!! Calculate the radial part of Slater integrals. See below. +!! +!! INPUTS +!! ll= l quantum number in the expansion of the Coulomb term. +!! mesh_size=Number of points on the radial mesh. +!! ff1(radmesh), ff2(radmesh)= The two functions to be integrated. +!! Pawrad =Structure containing radial grid information. +!! +!! OUTPUT +!! integral = +!! $ \dfrac{4\pi}{2L+1} \int ff1(r1) \dfrac{r_<^L}{r_>^{L+1}} ff2(r2) dr1 dr2 $ +!! where $r_< = min(r1,r2)$ and $r_> = Max(r1,r2)$. +!! +!! SOURCE + +subroutine calc_slatradl(ll,mesh_size,ff1,ff2,Pawrad,integral) + +!scalars + integer,intent(in) :: mesh_size,ll + real(dp),intent(out) :: integral +!arrays + real(dp),intent(in) :: ff1(mesh_size),ff2(mesh_size) + type(pawrad_type),intent(in) :: Pawrad + +!Local variables --------------------------------------- +!scalars + integer :: int_meshsz + character(len=100) :: msg +!arrays + real(dp),allocatable :: hh(:),gg(:) + +! ************************************************************************* + + if (mesh_size > Pawrad%mesh_size) then + msg='mesh_size > pawrad%mesh_size!' + LIBPAW_BUG(msg) + end if + + LIBPAW_ALLOCATE(hh,(mesh_size)) + LIBPAW_ALLOCATE(gg,(mesh_size)) + !hh = zero + !gg = zero + + int_meshsz=Pawrad%int_meshsz + !$int_meshsz=Pawrad%mesh_size + + ! the line below requires hh as work array. + hh = ff2 + + ! TODO find where int_meshsz is calculated and if it can affects the results. + if (int_meshsz0 RF case), 1 if not + ! (this may change the ij symmetry) + + integer :: use_rhoij_=0 + ! 1 if pawrhoij%rhoij_ is allocated + + integer :: use_rhoijp=0 + ! 1 if pawrhoij%rhoijp and pawrhoij%rhoijselect are allocated + + integer :: use_rhoijres=0 + ! 1 if pawrhoij%rhoijres is allocated + +!Integer arrays + + integer, allocatable :: kpawmix(:) + ! kpawmix(lmnmix_sz) + ! Indirect array selecting the elements of rhoij + ! being mixed during SCF cycle + + integer, allocatable :: rhoijselect(:) + ! rhoijselect(lmn2_size) + ! Indirect array selecting the non-zero elements of rhoij: + ! rhoijselect(isel,ispden)=klmn if rhoij(klmn,ispden) is non-zero + +!Real (real(dp)) arrays + + real(dp), allocatable :: grhoij (:,:,:) + ! grhoij(ngrhoij,cplex_rhoij*qphase*lmn2_size,nspden) + ! Gradients of Rho_ij wrt xred, strains, ... (non-packed storage) + + real(dp), allocatable :: rhoij_ (:,:) + ! rhoij_(cplex_rhoij*qphase*lmn2_size,nspden) + ! Array used to (temporary) store Rho_ij in a non-packed storage mode + + real(dp), allocatable :: rhoijp (:,:) + ! rhoijp(cplex_rhoij*qphase*lmn2_size,nspden) + ! Augmentation waves occupancies Rho_ij in PACKED STORAGE (only non-zero elements are stored) + + real(dp), allocatable :: rhoijres (:,:) + ! rhoijres(cplex_rhoij*qphase*lmn2_size,nspden) + ! Rho_ij residuals during SCF cycle (non-packed storage) + + ! ==== Storage for the 1st dimension ==== + ! For each klmn=ij: + ! When RHOij is complex (cplex=2): + ! rhoij(2*ij-1,:) contains the real part + ! rhoij(2*ij ,:) contains the imaginary part + ! When a exp(-i.q.r) phase is included (qphase=2): + ! rhoij(1:cplex_dij*lmn2_size,:) + ! contains the real part of the phase, i.e. RHO_ij*cos(q.r) + ! rhoij(cplex_dij*lmn2_size+1:2*cplex_dij*lmn2_size,:) + ! contains the imaginary part of the phase, i.e. RHO_ij*sin(q.r) + ! ==== Storage for the 2nd dimension ==== + ! No magnetism + ! rhoij(:,1) contains rhoij + ! Collinear magnetism + ! rhoij(:,1) contains rhoij^up + ! rhoij(:,2) contains rhoij^dowm + ! Non-collinear magnetism + ! rhoij(:,1) contains rhoij + ! rhoij(:,2) contains rhoij magnetization along x + ! rhoij(:,3) contains rhoij magnetization along y + ! rhoij(:,4) contains rhoij magnetization along z + + end type pawrhoij_type +!!*** + +CONTAINS + +!=========================================================== +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawrhoij/pawrhoij_alloc +!! NAME +!! pawrhoij_alloc +!! +!! FUNCTION +!! Initialize and allocate a pawrhoij datastructure +!! +!! INPUTS +!! [comm_atom] = communicator over atoms (OPTIONAL) +!! cplex_rhoij=1 if rhoij are real, 2 if rhoij are complex (spin-orbit, pawcpxocc=2, ...) +!! [my_atmtab(:)] = Index of atoms treated by current proc (OPTIONAL) +!! nspden=number of spin-components for rhoij +!! nsppol=number of spinorial components for rhoij +!! nsppol=number of independant spin-components for rhoij +!! typat(:)=types of atoms +!! [lmnsize(:)]=array of (l,m,n) sizes for rhoij for each type of atom (OPTIONAL) +!! must be present if [pawtab] argument is not passed +!! [ngrhoij]=number of gradients to be allocated (OPTIONAL, default=0) +!! [nlmnmix]=number of rhoij elements to be mixed during SCF cycle (OPTIONAL, default=0) +!! [pawtab(:)] =paw tabulated starting data (OPTIONAL) +!! must be present if [lmnsize(:)] argument is not passed +!! [qphase]=2 if the rhoij contain a exp(iqR) phase, 1 otherwise (OPTIONAL, default=1) +!! Typical use: 1st-order rhoij at q<>0 +!! [use_rhoij_]=1 if pawrhoij(:)%rhoij_ has to be allocated (OPTIONAL, default=0) +!! [use_rhoijp]=1 if pawrhoij(:)%rhoijp has to be allocated (OPTIONAL, default=1) +!! (in that case, pawrhoij%rhoijselect is also allocated) +!! [use_rhoijres]=1 if pawrhoij(:)%rhoijres has to be allocated (OPTIONAL, default=0) +!! +!! SIDE EFFECTS +!! pawrhoij(:)= rhoij datastructure +!! +!! NOTES +!! One of the two optional arguments lmnsize(:) or pawtab(:) must be present ! +!! If both are present, only pawtab(:) is used. +!! +!! SOURCE + +subroutine pawrhoij_alloc(pawrhoij,cplex_rhoij,nspden,nspinor,nsppol,typat,& +& lmnsize,ngrhoij,nlmnmix,pawtab,qphase,use_rhoij_,use_rhoijp,& ! Optional +& use_rhoijres,comm_atom,mpi_atmtab) ! Optional + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: cplex_rhoij,nspden,nspinor,nsppol + integer,optional,intent(in):: comm_atom,ngrhoij,nlmnmix,qphase + integer,optional,intent(in):: use_rhoij_,use_rhoijp,use_rhoijres + integer,optional,target,intent(in) :: mpi_atmtab(:) +!arrays + integer,intent(in) :: typat(:) + integer,optional,target,intent(in) :: lmnsize(:) + type(pawrhoij_type),intent(inout) :: pawrhoij(:) + type(pawtab_type),optional,intent(in) :: pawtab(:) + +!Local variables------------------------------- +!scalars + integer :: irhoij,irhoij_,itypat,lmn2_size,my_comm_atom,my_qphase, nn1,natom,nrhoij + logical :: has_rhoijp,my_atmtab_allocated,paral_atom + character(len=500) :: msg +!array + integer,pointer :: lmn_size(:),my_atmtab(:) + +! ************************************************************************* + + nrhoij=size(pawrhoij);natom=size(typat) + if (nrhoij>natom) then + msg=' wrong sizes (1) !' + LIBPAW_BUG(msg) + end if + +!Select lmn_size for each atom type + if (present(pawtab)) then + nn1=size(pawtab) + if (maxval(typat)>nn1) then + msg=' wrong sizes (2) !' + LIBPAW_BUG(msg) + end if + LIBPAW_POINTER_ALLOCATE(lmn_size,(nn1)) + do itypat=1,nn1 + lmn_size(itypat)=pawtab(itypat)%lmn_size + end do + else if (present(lmnsize)) then + nn1=size(lmnsize) + if (maxval(typat)>nn1) then + msg=' wrong sizes (3) !' + LIBPAW_BUG(msg) + end if + lmn_size => lmnsize + else + msg=' one of the 2 arguments pawtab or lmnsize must be present !' + LIBPAW_BUG(msg) + end if + +!Set up parallelism over atoms + paral_atom=(present(comm_atom).and.(nrhoij/=natom)) + nullify(my_atmtab);if (present(mpi_atmtab)) my_atmtab => mpi_atmtab + my_comm_atom=xmpi_comm_self;if (present(comm_atom)) my_comm_atom=comm_atom + call get_my_atmtab(my_comm_atom,my_atmtab,my_atmtab_allocated,paral_atom,natom) + + my_qphase=1;if (present(qphase)) my_qphase=qphase + + if (nrhoij>0) then + do irhoij=1,nrhoij + irhoij_=irhoij;if (paral_atom) irhoij_=my_atmtab(irhoij) + itypat=typat(irhoij_) + + lmn2_size=lmn_size(itypat)*(lmn_size(itypat)+1)/2 + +! Scalars initializations + pawrhoij(irhoij)%cplex_rhoij=cplex_rhoij + pawrhoij(irhoij)%qphase=my_qphase + pawrhoij(irhoij)%itypat=itypat + pawrhoij(irhoij)%lmn_size=lmn_size(itypat) + pawrhoij(irhoij)%lmn2_size=lmn2_size + pawrhoij(irhoij)%nspden=nspden + pawrhoij(irhoij)%nspinor=nspinor + pawrhoij(irhoij)%nsppol=nsppol + pawrhoij(irhoij)%nrhoijsel=0 + pawrhoij(irhoij)%lmnmix_sz=0 + pawrhoij(irhoij)%ngrhoij=0 + pawrhoij(irhoij)%use_rhoij_=0 + pawrhoij(irhoij)%use_rhoijres=0 + +! Arrays allocations + has_rhoijp=.true.; if (present(use_rhoijp)) has_rhoijp=(use_rhoijp>0) + if (has_rhoijp) then + pawrhoij(irhoij)%use_rhoijp=1 + LIBPAW_ALLOCATE(pawrhoij(irhoij)%rhoijselect,(lmn2_size)) + LIBPAW_ALLOCATE(pawrhoij(irhoij)%rhoijp,(cplex_rhoij*my_qphase*lmn2_size,nspden)) + pawrhoij(irhoij)%rhoijselect(:)=0 + pawrhoij(irhoij)%rhoijp(:,:)=zero + end if + + if (present(ngrhoij)) then + if (ngrhoij>0) then + pawrhoij(irhoij)%ngrhoij=ngrhoij + LIBPAW_ALLOCATE(pawrhoij(irhoij)%grhoij,(ngrhoij,cplex_rhoij*my_qphase*lmn2_size,nspden)) + pawrhoij(irhoij)%grhoij=zero + end if + end if + if (present(nlmnmix)) then + if (nlmnmix>0) then + pawrhoij(irhoij)%lmnmix_sz=nlmnmix + LIBPAW_ALLOCATE(pawrhoij(irhoij)%kpawmix,(nlmnmix)) + pawrhoij(irhoij)%kpawmix=0 + end if + end if + if (present(use_rhoij_)) then + if (use_rhoij_>0) then + pawrhoij(irhoij)%use_rhoij_=use_rhoij_ + LIBPAW_ALLOCATE(pawrhoij(irhoij)%rhoij_,(cplex_rhoij*my_qphase*lmn2_size,nspden)) + pawrhoij(irhoij)%rhoij_=zero + end if + end if + if (present(use_rhoijres)) then + if (use_rhoijres>0) then + pawrhoij(irhoij)%use_rhoijres=use_rhoijres + LIBPAW_ALLOCATE(pawrhoij(irhoij)%rhoijres,(cplex_rhoij*my_qphase*lmn2_size,nspden)) + pawrhoij(irhoij)%rhoijres=zero + end if + end if + + end do + end if + + if (present(pawtab)) then + LIBPAW_POINTER_DEALLOCATE(lmn_size) + end if + +!Destroy atom table used for parallelism + call free_my_atmtab(my_atmtab,my_atmtab_allocated) + +end subroutine pawrhoij_alloc +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawrhoij/pawrhoij_free +!! NAME +!! pawrhoij_free +!! +!! FUNCTION +!! Destroy a pawrhoij datastructure +!! +!! SIDE EFFECTS +!! pawrhoij(:)= rhoij datastructure +!! +!! SOURCE + +subroutine pawrhoij_free(pawrhoij) + +!Arguments ------------------------------------ +!arrays + type(pawrhoij_type),intent(inout) :: pawrhoij(:) + +!Local variables------------------------------- +!scalars + integer :: irhoij,nrhoij + +! ************************************************************************* + + nrhoij=size(pawrhoij) + + if (nrhoij>0) then + do irhoij=1,nrhoij + pawrhoij(irhoij)%cplex_rhoij=1 + pawrhoij(irhoij)%qphase=1 + pawrhoij(irhoij)%nrhoijsel=0 + pawrhoij(irhoij)%ngrhoij=0 + pawrhoij(irhoij)%lmnmix_sz=0 + pawrhoij(irhoij)%use_rhoij_=0 + pawrhoij(irhoij)%use_rhoijp=0 + pawrhoij(irhoij)%use_rhoijres=0 + if (allocated(pawrhoij(irhoij)%rhoijp)) then + LIBPAW_DEALLOCATE(pawrhoij(irhoij)%rhoijp) + end if + if (allocated(pawrhoij(irhoij)%rhoijselect)) then + LIBPAW_DEALLOCATE(pawrhoij(irhoij)%rhoijselect) + end if + if (allocated(pawrhoij(irhoij)%grhoij)) then + LIBPAW_DEALLOCATE(pawrhoij(irhoij)%grhoij) + end if + if (allocated(pawrhoij(irhoij)%kpawmix)) then + LIBPAW_DEALLOCATE(pawrhoij(irhoij)%kpawmix) + end if + if (allocated(pawrhoij(irhoij)%rhoij_)) then + LIBPAW_DEALLOCATE(pawrhoij(irhoij)%rhoij_) + end if + if (allocated(pawrhoij(irhoij)%rhoijres)) then + LIBPAW_DEALLOCATE(pawrhoij(irhoij)%rhoijres) + end if + end do + end if + +end subroutine pawrhoij_free +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawrhoij/pawrhoij_nullify +!! NAME +!! pawrhoij_nullify +!! +!! FUNCTION +!! Nullify (initialize to null) a pawrhoij datastructure +!! +!! SIDE EFFECTS +!! pawrhoij(:)= rhoij datastructure +!! +!! SOURCE + +subroutine pawrhoij_nullify(pawrhoij) + +!Arguments ------------------------------------ +!arrays + type(pawrhoij_type),intent(inout) :: pawrhoij(:) + +!Local variables------------------------------- +!scalars + integer :: irhoij,nrhoij + +! ************************************************************************* + + ! MGPAW: This one could be removed/renamed, + ! variables can be initialized in the datatype declaration + ! Do we need to expose this in the public API? + + nrhoij=size(pawrhoij) + + if (nrhoij>0) then + do irhoij=1,nrhoij + pawrhoij(irhoij)%cplex_rhoij=1 + pawrhoij(irhoij)%qphase=1 + pawrhoij(irhoij)%nrhoijsel=0 + pawrhoij(irhoij)%ngrhoij=0 + pawrhoij(irhoij)%lmnmix_sz=0 + pawrhoij(irhoij)%use_rhoij_=0 + pawrhoij(irhoij)%use_rhoijp=0 + pawrhoij(irhoij)%use_rhoijres=0 + end do + end if + +end subroutine pawrhoij_nullify +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawrhoij/pawrhoij_copy +!! NAME +!! pawrhoij_copy +!! +!! FUNCTION +!! Copy one pawrhoij datastructure into another +!! Can take into accound changes of dimensions +!! Can copy a shared pawrhoij into distributed ones (when parallelism is activated) +!! +!! INPUTS +!! keep_cplex= optional argument (logical, default=.TRUE.) +!! if .TRUE. pawrhoij_out(:)%cplex_rhoij is NOT MODIFIED, +!! even if different from pawrhoij_in(:)%cplex_rhoij +!! keep_qphase= optional argument (logical, default=.TRUE.) +!! if .TRUE. pawrhoij_out(:)%cplex_rhoij is NOT MODIFIED, +!! even if different from pawrhoij_in(:)%qphase +!! keep_itypat= optional argument (logical, default=.FALSE.) +!! if .TRUE. pawrhoij_out(:)%ityp is NOT MODIFIED, +!! even if different from pawrhoij_in(:)%ityp +!! keep_nspden= optional argument (logical, default=.TRUE.) +!! if .TRUE. pawrhoij_out(:)%nspden is NOT MODIFIED, +!! even if different from pawrhoij_in(:)%nspden +!! mpi_atmtab(:)=--optional-- indexes of the atoms treated by current proc +!! comm_atom=--optional-- MPI communicator over atoms +!! pawrhoij_in(:)= input rhoij datastructure +!! +!! SIDE EFFECTS +!! pawrhoij_out(:)= output rhoij datastructure +!! +!! NOTES +!! In case of a single copy operation pawrhoij_out must have been allocated. +!! +!! SOURCE + +subroutine pawrhoij_copy(pawrhoij_in,pawrhoij_cpy, & +& keep_cplex,keep_qphase,keep_itypat,keep_nspden,& ! optional arguments +& mpi_atmtab,comm_atom) ! optional arguments (parallelism) + +!Arguments ------------------------------------ +!scalars + integer,optional,intent(in) :: comm_atom + logical,intent(in),optional :: keep_cplex,keep_qphase,keep_itypat,keep_nspden +!arrays + integer,optional,target,intent(in) :: mpi_atmtab(:) + type(pawrhoij_type),intent(in) :: pawrhoij_in(:) + type(pawrhoij_type),intent(inout),target :: pawrhoij_cpy(:) + +!Local variables------------------------------- +!scalars + integer :: cplex,cplex_in,cplex_out,i_in,i_out,ilmn,iphase + integer :: irhoij,ispden,jrhoij,lmn2_size_in,lmn2_size_out,lmnmix,my_comm_atom,my_nrhoij + integer :: ngrhoij,nrhoij_in,nrhoij_max,nrhoij_out,nselect,nselect_out + integer :: nspden_in,nspden_out,paral_case,qphase,qphase_in,qphase_out + integer :: use_rhoij_,use_rhoijp,use_rhoijres + logical :: change_dim,keep_cplex_,keep_qphase_,keep_itypat_,keep_nspden_,my_atmtab_allocated,paral_atom + character(len=500) :: msg +!arrays + integer,pointer :: my_atmtab(:) + integer,allocatable :: nlmn(:),typat(:) + type(pawrhoij_type),pointer :: pawrhoij_out(:) + +! ************************************************************************* + +!Retrieve sizes + nrhoij_in=size(pawrhoij_in);nrhoij_out=size(pawrhoij_cpy) + +!Init flags + keep_cplex_=.true. + if (present(keep_cplex)) keep_cplex_=keep_cplex + keep_qphase_=.true. + if (present(keep_qphase)) keep_qphase_=keep_qphase + keep_itypat_=.false. + if (present(keep_itypat)) keep_itypat_=keep_itypat + keep_nspden_=.true. + if (present(keep_nspden)) keep_nspden_=keep_nspden + +!Set up parallelism over atoms + paral_atom=(present(comm_atom));if (paral_atom) paral_atom=(xmpi_comm_size(comm_atom)>1) + nullify(my_atmtab);if (present(mpi_atmtab)) my_atmtab => mpi_atmtab + my_comm_atom=xmpi_comm_self;if (present(comm_atom)) my_comm_atom=comm_atom + my_atmtab_allocated=.false. + +!Determine in which case we are (parallelism, ...) +!No parallelism: a single copy operation + paral_case=0;nrhoij_max=nrhoij_in + pawrhoij_out => pawrhoij_cpy + if (paral_atom) then + if (nrhoij_out pawrhoij_cpy + else + msg=' nrhoij_out should be equal to my_natom !' + LIBPAW_BUG(msg) + end if + else ! Parallelism: the copy operation is a gather + call get_my_natom(my_comm_atom,my_nrhoij,nrhoij_out) + if (my_nrhoij==nrhoij_in) then + paral_case=2;nrhoij_max=nrhoij_in + LIBPAW_DATATYPE_ALLOCATE(pawrhoij_out,(nrhoij_in)) + call pawrhoij_nullify(pawrhoij_out) + if (nrhoij_in>0) then + LIBPAW_ALLOCATE(typat,(nrhoij_in)) + LIBPAW_ALLOCATE(nlmn,(nrhoij_in)) + do irhoij=1,nrhoij_in + typat(irhoij)=irhoij;nlmn(irhoij)=pawrhoij_in(irhoij)%lmn_size + end do + call pawrhoij_alloc(pawrhoij_out,pawrhoij_cpy(1)%cplex_rhoij,& +& pawrhoij_cpy(1)%nspden,pawrhoij_cpy(1)%nspinor,pawrhoij_cpy(1)%nsppol,typat,& +& lmnsize=nlmn,ngrhoij=pawrhoij_cpy(1)%ngrhoij,nlmnmix=pawrhoij_cpy(1)%lmnmix_sz,& +& qphase=pawrhoij_cpy(1)%qphase,& +& use_rhoij_=pawrhoij_cpy(1)%use_rhoij_,& +& use_rhoijp=pawrhoij_cpy(1)%use_rhoijp,& +& use_rhoijres=pawrhoij_cpy(1)%use_rhoijres) + LIBPAW_DEALLOCATE(typat) + LIBPAW_DEALLOCATE(nlmn) + end if + else + msg=' nrhoij_in should be equal to my_natom!' + LIBPAW_BUG(msg) + end if + end if + end if + +!Loop on rhoij components + if (nrhoij_max>0) then + do irhoij=1,nrhoij_max + jrhoij=irhoij;if (paral_case==1) jrhoij=my_atmtab(irhoij) + + lmn2_size_in=pawrhoij_in(jrhoij)%lmn2_size + lmn2_size_out=lmn2_size_in + cplex_in=pawrhoij_in(jrhoij)%cplex_rhoij + cplex_out=cplex_in;if(keep_cplex_)cplex_out=pawrhoij_out(irhoij)%cplex_rhoij + qphase_in=pawrhoij_in(jrhoij)%qphase + qphase_out=qphase_in;if(keep_qphase_)qphase_out=pawrhoij_out(irhoij)%qphase + nspden_in=pawrhoij_in(jrhoij)%nspden + nselect=pawrhoij_in(jrhoij)%nrhoijsel + nselect_out=pawrhoij_out(irhoij)%nrhoijsel + nspden_out=nspden_in;if(keep_nspden_)nspden_out=pawrhoij_out(irhoij)%nspden + + change_dim=(pawrhoij_out(irhoij)%cplex_rhoij/=cplex_out.or. & +& pawrhoij_out(irhoij)%qphase/=qphase_out.or. & +& pawrhoij_out(irhoij)%lmn2_size/=lmn2_size_out.or. & +& pawrhoij_out(irhoij)%nspden/=nspden_out.or. & +& nselect/=nselect_out) + cplex=min(cplex_in,cplex_out) + qphase=min(qphase_in,qphase_out) + +! Scalars + pawrhoij_out(irhoij)%cplex_rhoij=cplex_out+0 + pawrhoij_out(irhoij)%qphase=qphase_out+0 + pawrhoij_out(irhoij)%nspden=nspden_out+0 + pawrhoij_out(irhoij)%lmn2_size=lmn2_size_out+0 + pawrhoij_out(irhoij)%lmn_size=pawrhoij_in(jrhoij)%lmn_size+0 + if(.not.keep_itypat_) pawrhoij_out(irhoij)%itypat =pawrhoij_in(jrhoij)%itypat+0 + if(.not.keep_nspden_) pawrhoij_out(irhoij)%nsppol =pawrhoij_in(jrhoij)%nsppol+0 + if(.not.keep_nspden_) pawrhoij_out(irhoij)%nspinor=pawrhoij_in(jrhoij)%nspinor+0 + pawrhoij_out(irhoij)%nrhoijsel=nselect+0 +! if (pawrhoij_out(irhoij)%itypat/=pawrhoij_in(jrhoij)%itypat) then +! write(unit=msg,fmt='(a,i3,a)') 'Type of atom ',jrhoij,' is different (dont copy it) !' +! LIBPAW_COMMENT(msg) +! end if + +! Optional pointer: non-zero elements of rhoij + use_rhoijp=pawrhoij_in(jrhoij)%use_rhoijp + if (pawrhoij_out(irhoij)%use_rhoijp/=use_rhoijp) then + if (pawrhoij_out(irhoij)%use_rhoijp>0) then + LIBPAW_DEALLOCATE(pawrhoij_out(irhoij)%rhoijp) + LIBPAW_DEALLOCATE(pawrhoij_out(irhoij)%rhoijselect) + end if + if (use_rhoijp>0) then + LIBPAW_ALLOCATE(pawrhoij_out(irhoij)%rhoijp,(cplex_out*qphase_out*lmn2_size_out,nspden_out)) + LIBPAW_ALLOCATE(pawrhoij_out(irhoij)%rhoijselect,(lmn2_size_out)) + pawrhoij_out(irhoij)%rhoijselect=0 + end if + end if + pawrhoij_out(irhoij)%use_rhoijp=use_rhoijp + if (use_rhoijp>0) then + if (change_dim) then + if(allocated(pawrhoij_out(irhoij)%rhoijp)) then + LIBPAW_DEALLOCATE(pawrhoij_out(irhoij)%rhoijp) + end if + LIBPAW_ALLOCATE(pawrhoij_out(irhoij)%rhoijp,(cplex_out*qphase_out*lmn2_size_out,nspden_out)) + end if + pawrhoij_out(irhoij)%rhoijp(:,:)=zero + if (nspden_out==1) then + if (nspden_in==2) then + do iphase=1,qphase + i_in=(iphase-1)*lmn2_size_in;i_out=(iphase-1)*lmn2_size_out + do ilmn=1,nselect + pawrhoij_out(irhoij)%rhoijp(i_out+1:i_out+cplex,1)= & +& pawrhoij_in(jrhoij)%rhoijp(i_in+1:i_in+cplex,1) & +& +pawrhoij_in(jrhoij)%rhoijp(i_in+1:i_in+cplex,2)+zero + i_in=i_in+cplex_in;i_out=i_out+cplex_out + end do + end do + else ! nspden_in==1 or 4 + do iphase=1,qphase + i_in=(iphase-1)*lmn2_size_in;i_out=(iphase-1)*lmn2_size_out + do ilmn=1,nselect + pawrhoij_out(irhoij)%rhoijp(i_out+1:i_out+cplex,1)= & +& pawrhoij_in(jrhoij)%rhoijp(i_in+1:i_in+cplex,1)+zero + i_in=i_in+cplex_in;i_out=i_out+cplex_out + end do + end do + end if + else if (nspden_out==2) then + if (nspden_in==1) then + do iphase=1,qphase + i_in=(iphase-1)*lmn2_size_in;i_out=(iphase-1)*lmn2_size_out + do ilmn=1,nselect + pawrhoij_out(irhoij)%rhoijp(i_out+1:i_out+cplex,1)= & +& half*pawrhoij_in(jrhoij)%rhoijp(i_in+1:i_in+cplex,1)+zero + pawrhoij_out(irhoij)%rhoijp(i_out+1:i_out+cplex,2)= & +& half*pawrhoij_in(jrhoij)%rhoijp(i_in+1:i_in+cplex,1)+zero + i_in=i_in+cplex_in;i_out=i_out+cplex_out + end do + end do + else if (nspden_in==2) then + do ispden=1,nspden_out + do iphase=1,qphase + i_in=(iphase-1)*lmn2_size_in;i_out=(iphase-1)*lmn2_size_out + do ilmn=1,nselect + pawrhoij_out(irhoij)%rhoijp(i_out+1:i_out+cplex,ispden)= & +& pawrhoij_in(jrhoij)%rhoijp(i_in+1:i_in+cplex,ispden)+zero + i_in=i_in+cplex_in;i_out=i_out+cplex_out + end do + end do + end do + else ! nspden_in==4 + do iphase=1,qphase + i_in=(iphase-1)*lmn2_size_in;i_out=(iphase-1)*lmn2_size_out + do ilmn=1,nselect + pawrhoij_out(irhoij)%rhoijp(i_out+1:i_out+cplex,1)= & +& half*(pawrhoij_in(jrhoij)%rhoijp(i_in+1:i_in+cplex,1) & +& +pawrhoij_in(jrhoij)%rhoijp(i_in+1:i_in+cplex,4))+zero + pawrhoij_out(irhoij)%rhoijp(i_out+1:i_out+cplex,2)= & +& half*(pawrhoij_in(jrhoij)%rhoijp(i_in+1:i_in+cplex,1) & +& -pawrhoij_in(jrhoij)%rhoijp(i_in+1:i_in+cplex,4))+zero + i_in=i_in+cplex_in;i_out=i_out+cplex_out + end do + end do + end if + else if (nspden_out==4) then + if (nspden_in==1) then + do iphase=1,qphase + i_in=(iphase-1)*lmn2_size_in;i_out=(iphase-1)*lmn2_size_out + do ilmn=1,nselect + pawrhoij_out(irhoij)%rhoijp(i_out+1:i_out+cplex,1)= & +& pawrhoij_in(jrhoij)%rhoijp(i_in+1:i_in+cplex,1)+zero + pawrhoij_out(irhoij)%rhoijp(i_out+1:i_out+cplex,2:4)=zero + i_in=i_in+cplex_in;i_out=i_out+cplex_out + end do + end do + else if (nspden_in==2) then + do iphase=1,qphase + i_in=(iphase-1)*lmn2_size_in;i_out=(iphase-1)*lmn2_size_out + do ilmn=1,nselect + pawrhoij_out(irhoij)%rhoijp(i_out+1:i_out+cplex,1)= & +& pawrhoij_in(jrhoij)%rhoijp(i_in+1:i_in+cplex,1) & +& +pawrhoij_in(jrhoij)%rhoijp(i_in+1:i_in+cplex,2)+zero + pawrhoij_out(irhoij)%rhoijp(i_out+1:i_out+cplex,4)= & +& pawrhoij_in(jrhoij)%rhoijp(i_in+1:i_in+cplex,1) & +& -pawrhoij_in(jrhoij)%rhoijp(i_in+1:i_in+cplex,2)+zero + pawrhoij_out(irhoij)%rhoijp(i_out+1:i_out+cplex,2:3)=zero + i_in=i_in+cplex_in;i_out=i_out+cplex_out + end do + end do + else ! nspden_in==4 + do ispden=1,nspden_out + do iphase=1,qphase + i_in=(iphase-1)*lmn2_size_in;i_out=(iphase-1)*lmn2_size_out + do ilmn=1,nselect + pawrhoij_out(irhoij)%rhoijp(i_out+1:i_out+cplex,ispden)= & +& pawrhoij_in(jrhoij)%rhoijp(i_in+1:i_in+cplex,ispden)+zero + i_in=i_in+cplex_in;i_out=i_out+cplex_out + end do + end do + end do + end if + end if + end if + +! Optional pointer: indexes for non-zero elements selection + if (use_rhoijp>0) then + if (change_dim) then + if(allocated(pawrhoij_out(irhoij)%rhoijselect)) then + LIBPAW_DEALLOCATE(pawrhoij_out(irhoij)%rhoijselect) + end if + LIBPAW_ALLOCATE(pawrhoij_out(irhoij)%rhoijselect,(lmn2_size_out)) + end if + pawrhoij_out(irhoij)%rhoijselect=0 + pawrhoij_out(irhoij)%rhoijselect(1:nselect)=pawrhoij_in(jrhoij)%rhoijselect(1:nselect)+0 + end if + +! Optional pointer: indexes of rhoij to be mixed + lmnmix=pawrhoij_in(jrhoij)%lmnmix_sz + if (pawrhoij_out(irhoij)%lmnmix_sz/=lmnmix) then + if (pawrhoij_out(irhoij)%lmnmix_sz>0) then + LIBPAW_DEALLOCATE(pawrhoij_out(irhoij)%kpawmix) + end if + if (lmnmix>0) then + LIBPAW_ALLOCATE(pawrhoij_out(irhoij)%kpawmix,(lmnmix)) + pawrhoij_out(irhoij)%kpawmix=0 + end if + pawrhoij_out(irhoij)%lmnmix_sz=lmnmix + end if + if (lmnmix>0) pawrhoij_out(irhoij)%kpawmix(1:lmnmix)=pawrhoij_in(jrhoij)%kpawmix(1:lmnmix) + +! Optional pointer: gradients of rhoij + ngrhoij=pawrhoij_in(jrhoij)%ngrhoij + if (pawrhoij_out(irhoij)%ngrhoij/=ngrhoij) then + if (pawrhoij_out(irhoij)%ngrhoij>0) then + LIBPAW_DEALLOCATE(pawrhoij_out(irhoij)%grhoij) + end if + if (ngrhoij>0) then + LIBPAW_ALLOCATE(pawrhoij_out(irhoij)%grhoij,(ngrhoij,cplex_out*qphase_out*lmn2_size_out,nspden_out)) + end if + pawrhoij_out(irhoij)%ngrhoij=ngrhoij + end if + if (ngrhoij>0) then + if (change_dim) then + LIBPAW_DEALLOCATE(pawrhoij_out(irhoij)%grhoij) + LIBPAW_ALLOCATE(pawrhoij_out(irhoij)%grhoij,(ngrhoij,cplex_out*qphase_out*lmn2_size_out,nspden_out)) + end if + pawrhoij_out(irhoij)%grhoij(:,:,:)=zero + if (nspden_out==1) then + if (nspden_in==2) then + do iphase=1,qphase + i_in=(iphase-1)*lmn2_size_in;i_out=(iphase-1)*lmn2_size_out + do ilmn=1,lmn2_size_out + pawrhoij_out(irhoij)%grhoij(1:ngrhoij,i_out+1:i_out+cplex,1)= & +& pawrhoij_in(jrhoij)%grhoij(1:ngrhoij,i_in+1:i_in+cplex,1) & +& +pawrhoij_in(jrhoij)%grhoij(1:ngrhoij,i_in+1:i_in+cplex,2)+zero + i_in=i_in+cplex_in;i_out=i_out+cplex_out + end do + end do + else ! nspden_in==1 or 4 + do iphase=1,qphase + i_in=(iphase-1)*lmn2_size_in;i_out=(iphase-1)*lmn2_size_out + do ilmn=1,lmn2_size_out + pawrhoij_out(irhoij)%grhoij(1:ngrhoij,i_out+1:i_out+cplex,1)= & +& pawrhoij_in(jrhoij)%grhoij(1:ngrhoij,i_in+1:i_in+cplex,1)+zero + i_in=i_in+cplex_in;i_out=i_out+cplex_out + end do + end do + end if + else if (nspden_out==2) then + if (nspden_in==1) then + do iphase=1,qphase + i_in=(iphase-1)*lmn2_size_in;i_out=(iphase-1)*lmn2_size_out + do ilmn=1,lmn2_size_out + pawrhoij_out(irhoij)%grhoij(1:ngrhoij,i_out+1:i_out+cplex,1)= & +& half*pawrhoij_in(jrhoij)%grhoij(1:ngrhoij,i_in+1:i_in+cplex,1)+zero + pawrhoij_out(irhoij)%grhoij(1:ngrhoij,i_out+1:i_out+cplex,2)= & +& half*pawrhoij_in(jrhoij)%grhoij(1:ngrhoij,i_in+1:i_in+cplex,1)+zero + i_in=i_in+cplex_in;i_out=i_out+cplex_out + end do + end do + else if (nspden_in==2) then + do ispden=1,nspden_out + do iphase=1,qphase + i_in=(iphase-1)*lmn2_size_in;i_out=(iphase-1)*lmn2_size_out + do ilmn=1,lmn2_size_out + pawrhoij_out(irhoij)%grhoij(1:ngrhoij,i_out+1:i_out+cplex,ispden)= & +& pawrhoij_in(jrhoij)%grhoij(1:ngrhoij,i_in+1:i_in+cplex,ispden)+zero + i_in=i_in+cplex_in;i_out=i_out+cplex_out + end do + end do + end do + else ! nspden_in==4 + do iphase=1,qphase + i_in=(iphase-1)*lmn2_size_in;i_out=(iphase-1)*lmn2_size_out + do ilmn=1,lmn2_size_out + pawrhoij_out(irhoij)%grhoij(1:ngrhoij,i_out+1:i_out+cplex,1)= & +& half*(pawrhoij_in(jrhoij)%grhoij(1:ngrhoij,i_in+1:i_in+cplex,1) & +& +pawrhoij_in(jrhoij)%grhoij(1:ngrhoij,i_in+1:i_in+cplex,4))+zero + pawrhoij_out(irhoij)%grhoij(1:ngrhoij,i_out+1:i_out+cplex,2)= & +& half*(pawrhoij_in(jrhoij)%grhoij(1:ngrhoij,i_in+1:i_in+cplex,1) & +& -pawrhoij_in(jrhoij)%grhoij(1:ngrhoij,i_in+1:i_in+cplex,4))+zero + i_in=i_in+cplex_in;i_out=i_out+cplex_out + end do + end do + end if + else if (nspden_out==4) then + if (nspden_in==1) then + do iphase=1,qphase + i_in=(iphase-1)*lmn2_size_in;i_out=(iphase-1)*lmn2_size_out + do ilmn=1,lmn2_size_out + pawrhoij_out(irhoij)%grhoij(1:ngrhoij,i_out+1:i_out+cplex,1)= & +& pawrhoij_in(jrhoij)%grhoij(1:ngrhoij,i_in+1:i_in+cplex,1)+zero + pawrhoij_out(irhoij)%grhoij(1:ngrhoij,i_out+1:i_out+cplex,2:4)=zero + i_in=i_in+cplex_in;i_out=i_out+cplex_out + end do + end do + else if (nspden_in==2) then + do iphase=1,qphase + i_in=(iphase-1)*lmn2_size_in;i_out=(iphase-1)*lmn2_size_out + do ilmn=1,lmn2_size_out + pawrhoij_out(irhoij)%grhoij(1:ngrhoij,i_out+1:i_out+cplex,1)= & +& pawrhoij_in(jrhoij)%grhoij(1:ngrhoij,i_in+1:i_in+cplex,1) & +& +pawrhoij_in(jrhoij)%grhoij(1:ngrhoij,i_in+1:i_in+cplex,2)+zero + pawrhoij_out(irhoij)%grhoij(1:ngrhoij,i_out+1:i_out+cplex,4)= & +& pawrhoij_in(jrhoij)%grhoij(1:ngrhoij,i_in+1:i_in+cplex,1) & +& -pawrhoij_in(jrhoij)%grhoij(1:ngrhoij,i_in+1:i_in+cplex,2)+zero + pawrhoij_out(irhoij)%grhoij(1:ngrhoij,i_out+1:i_out+cplex,2:3)=zero + i_in=i_in+cplex_in;i_out=i_out+cplex_out + end do + end do + else ! nspden_in==4 + do ispden=1,nspden_out + do iphase=1,qphase + i_in=(iphase-1)*lmn2_size_in;i_out=(iphase-1)*lmn2_size_out + do ilmn=1,lmn2_size_out + pawrhoij_out(irhoij)%grhoij(1:ngrhoij,i_out+1:i_out+cplex,ispden)= & +& pawrhoij_in(jrhoij)%grhoij(1:ngrhoij,i_in+1:i_in+cplex,ispden)+zero + i_in=i_in+cplex_in;i_out=i_out+cplex_out + end do + end do + end do + end if + end if + end if + +! Optional pointer: residuals of rhoij + use_rhoijres=pawrhoij_in(jrhoij)%use_rhoijres + if (pawrhoij_out(irhoij)%use_rhoijres/=use_rhoijres) then + if (pawrhoij_out(irhoij)%use_rhoijres>0) then + LIBPAW_DEALLOCATE(pawrhoij_out(irhoij)%rhoijres) + end if + if (use_rhoijres>0) then + LIBPAW_ALLOCATE(pawrhoij_out(irhoij)%rhoijres,(cplex_out*qphase_out*lmn2_size_out,nspden_out)) + end if + pawrhoij_out(irhoij)%use_rhoijres=use_rhoijres + end if + if (use_rhoijres>0) then + if (change_dim) then + LIBPAW_DEALLOCATE(pawrhoij_out(irhoij)%rhoijres) + LIBPAW_ALLOCATE(pawrhoij_out(irhoij)%rhoijres,(cplex_out*qphase_out*lmn2_size_out,nspden_out)) + end if + pawrhoij_out(irhoij)%rhoijres(:,:)=zero + if (nspden_out==1) then + if (nspden_in==2) then + do iphase=1,qphase + i_in=(iphase-1)*lmn2_size_in;i_out=(iphase-1)*lmn2_size_out + do ilmn=1,lmn2_size_out + pawrhoij_out(irhoij)%rhoijres(i_out+1:i_out+cplex,1)= & +& pawrhoij_in(jrhoij)%rhoijres(i_in+1:i_in+cplex,1) & +& +pawrhoij_in(jrhoij)%rhoijres(i_in+1:i_in+cplex,2)+zero + i_in=i_in+cplex_in;i_out=i_out+cplex_out + end do + end do + else ! nspden_in==1 or 4 + do iphase=1,qphase + i_in=(iphase-1)*lmn2_size_in;i_out=(iphase-1)*lmn2_size_out + do ilmn=1,lmn2_size_out + pawrhoij_out(irhoij)%rhoijres(i_out+1:i_out+cplex,1)= & +& pawrhoij_in(jrhoij)%rhoijres(i_in+1:i_in+cplex,1)+zero + i_in=i_in+cplex_in;i_out=i_out+cplex_out + end do + end do + end if + else if (nspden_out==2) then + if (nspden_in==1) then + do iphase=1,qphase + i_in=(iphase-1)*lmn2_size_in;i_out=(iphase-1)*lmn2_size_out + do ilmn=1,lmn2_size_out + pawrhoij_out(irhoij)%rhoijres(i_out+1:i_out+cplex,1)= & +& half*pawrhoij_in(jrhoij)%rhoijres(i_in+1:i_in+cplex,1)+zero + pawrhoij_out(irhoij)%rhoijres(i_out+1:i_out+cplex,2)= & +& half*pawrhoij_in(jrhoij)%rhoijres(i_in+1:i_in+cplex,1)+zero + i_in=i_in+cplex_in;i_out=i_out+cplex_out + end do + end do + else if (nspden_in==2) then + do ispden=1,nspden_out + do iphase=1,qphase + i_in=(iphase-1)*lmn2_size_in;i_out=(iphase-1)*lmn2_size_out + do ilmn=1,lmn2_size_out + pawrhoij_out(irhoij)%rhoijres(i_out+1:i_out+cplex,ispden)= & +& pawrhoij_in(jrhoij)%rhoijres(i_in+1:i_in+cplex,ispden)+zero + i_in=i_in+cplex_in;i_out=i_out+cplex_out + end do + end do + end do + else ! nspden_in==4 + do iphase=1,qphase + i_in=(iphase-1)*lmn2_size_in;i_out=(iphase-1)*lmn2_size_out + do ilmn=1,lmn2_size_out + pawrhoij_out(irhoij)%rhoijres(i_out+1:i_out+cplex,1)= & +& half*(pawrhoij_in(jrhoij)%rhoijres(i_in+1:i_in+cplex,1) & +& +pawrhoij_in(jrhoij)%rhoijres(i_in+1:i_in+cplex,4))+zero + pawrhoij_out(irhoij)%rhoijres(i_out+1:i_out+cplex,2)= & +& half*(pawrhoij_in(jrhoij)%rhoijres(i_in+1:i_in+cplex,1) & +& -pawrhoij_in(jrhoij)%rhoijres(i_in+1:i_in+cplex,4))+zero + i_in=i_in+cplex_in;i_out=i_out+cplex_out + end do + end do + end if + else if (nspden_out==4) then + if (nspden_in==1) then + do iphase=1,qphase + i_in=(iphase-1)*lmn2_size_in;i_out=(iphase-1)*lmn2_size_out + do ilmn=1,lmn2_size_out + pawrhoij_out(irhoij)%rhoijres(i_out+1:i_out+cplex,1)= & +& pawrhoij_in(jrhoij)%rhoijres(i_in+1:i_in+cplex,1)+zero + pawrhoij_out(irhoij)%rhoijres(i_out+1:i_out+cplex,2:4)=zero + i_in=i_in+cplex_in;i_out=i_out+cplex_out + end do + end do + else if (nspden_in==2) then + do iphase=1,qphase + i_in=(iphase-1)*lmn2_size_in;i_out=(iphase-1)*lmn2_size_out + do ilmn=1,lmn2_size_out + pawrhoij_out(irhoij)%rhoijres(i_out+1:i_out+cplex,1)= & +& pawrhoij_in(jrhoij)%rhoijres(i_in+1:i_in+cplex,1) & +& +pawrhoij_in(jrhoij)%rhoijres(i_in+1:i_in+cplex,2)+zero + pawrhoij_out(irhoij)%rhoijres(i_out+1:i_out+cplex,4)= & +& pawrhoij_in(jrhoij)%rhoijres(i_in+1:i_in+cplex,1) & +& -pawrhoij_in(jrhoij)%rhoijres(i_in+1:i_in+cplex,2)+zero + pawrhoij_out(irhoij)%rhoijres(i_out+1:i_out+cplex,2:3)=zero + i_in=i_in+cplex_in;i_out=i_out+cplex_out + end do + end do + else ! nspden_in==4 + do ispden=1,nspden_out + do iphase=1,qphase + i_in=(iphase-1)*lmn2_size_in;i_out=(iphase-1)*lmn2_size_out + do ilmn=1,lmn2_size_out + pawrhoij_out(irhoij)%rhoijres(i_out+1:i_out+cplex,ispden)= & +& pawrhoij_in(jrhoij)%rhoijres(i_in+1:i_in+cplex,ispden)+zero + i_in=i_in+cplex_in;i_out=i_out+cplex_out + end do + end do + end do + end if + end if + end if + +! Optional pointer: non-symmetrized rhoij + use_rhoij_=pawrhoij_in(jrhoij)%use_rhoij_ + if (pawrhoij_out(irhoij)%use_rhoij_/=use_rhoij_) then + if (pawrhoij_out(irhoij)%use_rhoij_>0) then + LIBPAW_DEALLOCATE(pawrhoij_out(irhoij)%rhoij_) + end if + if (use_rhoij_>0) then + LIBPAW_ALLOCATE(pawrhoij_out(irhoij)%rhoij_,(cplex_out*qphase_out*lmn2_size_out,nspden_out)) + end if + pawrhoij_out(irhoij)%use_rhoij_=use_rhoij_ + end if + if (use_rhoij_>0) then + if (change_dim) then + if(allocated(pawrhoij_out(irhoij)%rhoij_)) then + LIBPAW_DEALLOCATE(pawrhoij_out(irhoij)%rhoij_) + end if + LIBPAW_ALLOCATE(pawrhoij_out(irhoij)%rhoij_,(cplex_out*qphase_out*lmn2_size_out,nspden_out)) + end if + pawrhoij_out(irhoij)%rhoij_(:,:)=zero + if (nspden_out==1) then + if (nspden_in==2) then + do iphase=1,qphase + i_in=(iphase-1)*lmn2_size_in;i_out=(iphase-1)*lmn2_size_out + do ilmn=1,lmn2_size_out + pawrhoij_out(irhoij)%rhoij_(i_out+1:i_out+cplex,1)= & +& pawrhoij_in(jrhoij)%rhoij_(i_in+1:i_in+cplex,1) & +& +pawrhoij_in(jrhoij)%rhoij_(i_in+1:i_in+cplex,2)+zero + i_in=i_in+cplex_in;i_out=i_out+cplex_out + end do + end do + else ! nspden_in==1 or 4 + do iphase=1,qphase + i_in=(iphase-1)*lmn2_size_in;i_out=(iphase-1)*lmn2_size_out + do ilmn=1,lmn2_size_out + pawrhoij_out(irhoij)%rhoij_(i_out+1:i_out+cplex,1)= & +& pawrhoij_in(jrhoij)%rhoij_(i_in+1:i_in+cplex,1)+zero + i_in=i_in+cplex_in;i_out=i_out+cplex_out + end do + end do + end if + else if (nspden_out==2) then + if (nspden_in==1) then + do iphase=1,qphase + i_in=(iphase-1)*lmn2_size_in;i_out=(iphase-1)*lmn2_size_out + do ilmn=1,lmn2_size_out + pawrhoij_out(irhoij)%rhoij_(i_out+1:i_out+cplex,1)= & +& half*pawrhoij_in(jrhoij)%rhoij_(i_in+1:i_in+cplex,1)+zero + pawrhoij_out(irhoij)%rhoij_(i_out+1:i_out+cplex,2)= & +& half*pawrhoij_in(irhoij)%rhoij_(i_in+1:i_in+cplex,1)+zero + i_in=i_in+cplex_in;i_out=i_out+cplex_out + end do + end do + else if (nspden_in==2) then + do ispden=1,nspden_out + do iphase=1,qphase + i_in=(iphase-1)*lmn2_size_in;i_out=(iphase-1)*lmn2_size_out + do ilmn=1,lmn2_size_out + pawrhoij_out(irhoij)%rhoij_(i_out+1:i_out+cplex,ispden)= & +& pawrhoij_in(jrhoij)%rhoij_(i_in+1:i_in+cplex,ispden)+zero + i_in=i_in+cplex_in;i_out=i_out+cplex_out + end do + end do + end do + else ! nspden_in==4 + do iphase=1,qphase + i_in=(iphase-1)*lmn2_size_in;i_out=(iphase-1)*lmn2_size_out + do ilmn=1,lmn2_size_out + pawrhoij_out(irhoij)%rhoij_(i_out+1:i_out+cplex,1)= & +& half*(pawrhoij_in(jrhoij)%rhoij_(i_in+1:i_in+cplex,1) & +& +pawrhoij_in(jrhoij)%rhoij_(i_in+1:i_in+cplex,4))+zero + pawrhoij_out(irhoij)%rhoij_(i_out+1:i_out+cplex,2)= & +& half*(pawrhoij_in(jrhoij)%rhoij_(i_in+1:i_in+cplex,1) & +& -pawrhoij_in(jrhoij)%rhoij_(i_in+1:i_in+cplex,4))+zero + i_in=i_in+cplex_in;i_out=i_out+cplex_out + end do + end do + end if + else if (nspden_out==4) then + if (nspden_in==1) then + do iphase=1,qphase + i_in=(iphase-1)*lmn2_size_in;i_out=(iphase-1)*lmn2_size_out + do ilmn=1,lmn2_size_out + pawrhoij_out(irhoij)%rhoij_(i_out+1:i_out+cplex,1)= & +& pawrhoij_in(jrhoij)%rhoij_(i_in+1:i_in+cplex,1)+zero + pawrhoij_out(irhoij)%rhoij_(i_out+1:i_out+cplex,2:4)=zero + i_in=i_in+cplex_in;i_out=i_out+cplex_out + end do + end do + else if (nspden_in==2) then + do iphase=1,qphase + i_in=(iphase-1)*lmn2_size_in;i_out=(iphase-1)*lmn2_size_out + do ilmn=1,lmn2_size_out + pawrhoij_out(irhoij)%rhoij_(i_out+1:i_out+cplex,1)= & +& pawrhoij_in(jrhoij)%rhoij_(i_in+1:i_in+cplex,1) & +& +pawrhoij_in(jrhoij)%rhoij_(i_in+1:i_in+cplex,2)+zero + pawrhoij_out(irhoij)%rhoij_(i_out+1:i_out+cplex,4)= & +& pawrhoij_in(jrhoij)%rhoij_(i_in+1:i_in+cplex,1) & +& -pawrhoij_in(jrhoij)%rhoij_(i_in+1:i_in+cplex,2)+zero + pawrhoij_out(irhoij)%rhoij_(i_out+1:i_out+cplex,2:3)=zero + i_in=i_in+cplex_in;i_out=i_out+cplex_out + end do + end do + else ! nspden_in==4 + do ispden=1,nspden_out + do iphase=1,qphase + i_in=(iphase-1)*lmn2_size_in;i_out=(iphase-1)*lmn2_size_out + do ilmn=1,lmn2_size_out + pawrhoij_out(irhoij)%rhoij_(i_out+1:i_out+cplex,ispden)= & +& pawrhoij_in(jrhoij)%rhoij_(i_in+1:i_in+cplex,ispden)+zero + i_in=i_in+cplex_in;i_out=i_out+cplex_out + end do + end do + end do + end if + end if + end if + + end do ! irhoij + end if + +!Parallel case: do a gather if needed + if (paral_case==2) then + call pawrhoij_free(pawrhoij_cpy) + call pawrhoij_gather(pawrhoij_out,pawrhoij_cpy,-1,my_comm_atom) + call pawrhoij_free(pawrhoij_out) + LIBPAW_DATATYPE_DEALLOCATE(pawrhoij_out) + +! Sequential case: fill missing elements + else if (paral_case==0) then + if (nrhoij_in0) then + pawrhoij_cpy(irhoij)%rhoijselect=0 + pawrhoij_cpy(irhoij)%rhoijp=zero + end if + if (pawrhoij_cpy(irhoij)%lmnmix_sz>0) pawrhoij_cpy(irhoij)%kpawmix=0 + if (pawrhoij_cpy(irhoij)%ngrhoij>0) pawrhoij_cpy(irhoij)%grhoij=zero + if (pawrhoij_cpy(irhoij)%use_rhoij_>0) pawrhoij_cpy(irhoij)%rhoij_=zero + if (pawrhoij_cpy(irhoij)%use_rhoijres>0) pawrhoij_cpy(irhoij)%rhoijres=zero + end do + end if + end if + +!Destroy atom table used for parallelism + call free_my_atmtab(my_atmtab,my_atmtab_allocated) + +end subroutine pawrhoij_copy +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawrhoij/pawrhoij_gather +!! NAME +!! pawrhoij_gather +!! +!! FUNCTION +!! (All)Gather pawrhoij datastructures +!! +!! INPUTS +!! master=master communicator receiving data ; if -1 do a ALLGATHER +!! comm_atom= communicator +!! pawrhoij_in(:)= input rhoij datastructures on every process +!! with_grhoij : optional argument (logical, default=.TRUE.) +!! TRUE if pawrhoij%grhoij field is included in the gather operation +!! with_lmnmix : optional argument (logical, default=.TRUE.) +!! TRUE if pawrhoij%lmnmix field is included in the gather operation +!! with_rhoijp : optional argument (logical, default=.TRUE.) +!! TRUE if pawrhoij%rhoijp and pawrhoij%rhoijselect fields +!! are included in the gather operation +!! with_rhoijres : optional argument (logical, default=.TRUE.) +!! TRUE if pawrhoij%rhoijres field is included in the gather operation +!! with_rhoij_ : optional argument (logical, default=.TRUE.) +!! TRUE if pawrhoij%rhoij_ field is included in the gather operation +!! +!! OUTPUT +!! pawrhoij_gathered(:)= output rhoij datastructure +!! +!! NOTES +!! The gathered structure are ordered like in sequential mode. +!! +!! SOURCE + + + subroutine pawrhoij_gather(pawrhoij_in,pawrhoij_gathered,master,comm_atom, & +& with_grhoij,with_lmnmix,with_rhoijp,with_rhoijres,with_rhoij_) ! optional arguments + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: master,comm_atom + logical,intent(in),optional :: with_grhoij,with_lmnmix,with_rhoijp,with_rhoijres,with_rhoij_ +!arrays + type(pawrhoij_type),intent(in) :: pawrhoij_in(:) + type(pawrhoij_type),intent(inout) :: pawrhoij_gathered(:) +!Local variables------------------------------- +!scalars + integer :: buf_dp_size,buf_dp_size_all,buf_int_size,buf_int_size_all + integer :: cplex,ierr,ii,indx_dp,indx_int,irhoij,isp,jj,jrhoij,lmn2_size,lmnmix,me_atom + integer :: ngrhoij,nproc_atom,nrhoij_in,nrhoij_in_sum,nrhoij_out,nselect,nspden + integer :: qphase,rhoij_size2,use_rhoijp,use_rhoijres,use_rhoij_ + logical :: my_atmtab_allocated,paral_atom + logical :: with_grhoij_,with_lmnmix_,with_rhoijp_,with_rhoijres_,with_rhoij__ + character(len=500) :: msg +!arrays + integer :: bufsz(2) + integer,allocatable :: buf_int(:),buf_int_all(:) + integer,allocatable :: count_dp(:),count_int(:),count_tot(:),displ_dp(:),displ_int(:) + integer, pointer :: my_atmtab(:) + real(dp),allocatable :: buf_dp(:),buf_dp_all(:) + +! ************************************************************************* + + nrhoij_in=size(pawrhoij_in);nrhoij_out=size(pawrhoij_gathered) + + nproc_atom=xmpi_comm_size(comm_atom) + me_atom=xmpi_comm_rank(comm_atom) + + if (nproc_atom==1) then + if (master==-1.or.me_atom==master) then + call pawrhoij_copy(pawrhoij_in,pawrhoij_gathered,.false.,.false.,.false.) + end if + return + end if + +!Test on sizes + nrhoij_in_sum=nrhoij_in + call xmpi_sum(nrhoij_in_sum,comm_atom,ierr) + if (master==-1) then + if (nrhoij_out/=nrhoij_in_sum) then + msg='Wrong sizes sum[nrhoij_ij]/=nrhoij_out !' + LIBPAW_BUG(msg) + end if + else + if (me_atom==master.and.nrhoij_out/=nrhoij_in_sum) then + msg='(2) pawrhoij_gathered wrongly allocated !' + LIBPAW_BUG(msg) + end if + end if + +!Optional arguments + with_grhoij_ =.true.;if (present(with_grhoij)) with_grhoij_ =with_grhoij + with_lmnmix_ =.true.;if (present(with_lmnmix)) with_lmnmix_ =with_lmnmix + with_rhoijp_ =.true.;if (present(with_rhoijp)) with_rhoijp_ =with_rhoijp + with_rhoijres_=.true.;if (present(with_rhoijres))with_rhoijres_=with_rhoijres + with_rhoij__ =.true.;if (present(with_rhoij_)) with_rhoij__ =with_rhoij_ + +!Retrieve table of atoms + paral_atom=.true.;nullify(my_atmtab) + call get_my_atmtab(comm_atom,my_atmtab,my_atmtab_allocated,paral_atom,nrhoij_in_sum, & +& my_natom_ref=nrhoij_in) + +!Compute sizes of buffers + buf_int_size=0;buf_dp_size=0 + nselect=0;lmnmix=0;ngrhoij=0;rhoij_size2=0 + use_rhoijp=0;use_rhoijres=0;use_rhoij_=0 + do irhoij=1,nrhoij_in + cplex =pawrhoij_in(irhoij)%cplex_rhoij + qphase =pawrhoij_in(irhoij)%qphase + lmn2_size=pawrhoij_in(irhoij)%lmn2_size + nspden =pawrhoij_in(irhoij)%nspden + if (with_lmnmix_) lmnmix=pawrhoij_in(irhoij)%lmnmix_sz + if (with_grhoij_) ngrhoij=pawrhoij_in(irhoij)%ngrhoij + if (with_rhoijp_) use_rhoijp=pawrhoij_in(irhoij)%use_rhoijp + if (with_rhoijres_)use_rhoijres=pawrhoij_in(irhoij)%use_rhoijres + if (with_rhoij__) use_rhoij_=pawrhoij_in(irhoij)%use_rhoij_ + buf_int_size=buf_int_size+16 + if (use_rhoijp>0) then + nselect=pawrhoij_in(irhoij)%nrhoijsel + buf_int_size=buf_int_size+nselect + buf_dp_size=buf_dp_size + cplex*qphase*nselect*nspden + end if + if (lmnmix>0) buf_int_size=buf_int_size+lmnmix + if (ngrhoij>0) buf_dp_size=buf_dp_size + cplex*qphase*lmn2_size*nspden*ngrhoij + if (use_rhoijres>0) buf_dp_size=buf_dp_size + cplex*qphase*lmn2_size*nspden + if (use_rhoij_>0) then + rhoij_size2=size(pawrhoij_in(irhoij)%rhoij_,dim=2) + buf_dp_size=buf_dp_size + cplex*qphase*lmn2_size*rhoij_size2 + end if + end do + +!Fill input buffers + LIBPAW_ALLOCATE(buf_int,(buf_int_size)) + LIBPAW_ALLOCATE(buf_dp ,(buf_dp_size)) + indx_int=1;indx_dp =1 + lmnmix=0;ngrhoij=0;nselect=0;rhoij_size2=0 + use_rhoijp=0;use_rhoijres=0;use_rhoij_=0 + do irhoij=1,nrhoij_in + cplex =pawrhoij_in(irhoij)%cplex_rhoij + qphase =pawrhoij_in(irhoij)%qphase + lmn2_size=pawrhoij_in(irhoij)%lmn2_size + nspden =pawrhoij_in(irhoij)%nspden + if (with_lmnmix_) lmnmix=pawrhoij_in(irhoij)%lmnmix_sz + if (with_grhoij_) ngrhoij=pawrhoij_in(irhoij)%ngrhoij + if (with_rhoijp_) use_rhoijp=pawrhoij_in(irhoij)%use_rhoijp + if (use_rhoijp > 0) nselect=pawrhoij_in(irhoij)%nrhoijsel + if (with_rhoijres_)use_rhoijres=pawrhoij_in(irhoij)%use_rhoijres + if (with_rhoij__) use_rhoij_ =pawrhoij_in(irhoij)%use_rhoij_ + if (use_rhoij_> 0) rhoij_size2 =size(pawrhoij_in(irhoij)%rhoij_,dim=2) + buf_int(indx_int)=my_atmtab(irhoij) ;indx_int=indx_int+1 + buf_int(indx_int)=cplex ;indx_int=indx_int+1 + buf_int(indx_int)=qphase ;indx_int=indx_int+1 + buf_int(indx_int)=lmn2_size ;indx_int=indx_int+1 + buf_int(indx_int)=nspden ;indx_int=indx_int+1 + buf_int(indx_int)=nselect ;indx_int=indx_int+1 + buf_int(indx_int)=lmnmix ;indx_int=indx_int+1 + buf_int(indx_int)=ngrhoij ;indx_int=indx_int+1 + buf_int(indx_int)=use_rhoijp ;indx_int=indx_int+1 + buf_int(indx_int)=use_rhoijres ;indx_int=indx_int+1 + buf_int(indx_int)=use_rhoij_ ;indx_int=indx_int+1 + buf_int(indx_int)=rhoij_size2 ;indx_int=indx_int+1 + buf_int(indx_int)=pawrhoij_in(irhoij)%itypat ;indx_int=indx_int+1 + buf_int(indx_int)=pawrhoij_in(irhoij)%lmn_size ;indx_int=indx_int+1 + buf_int(indx_int)=pawrhoij_in(irhoij)%nsppol ;indx_int=indx_int+1 + buf_int(indx_int)=pawrhoij_in(irhoij)%nspinor ;indx_int=indx_int+1 + if (use_rhoijp>0) then + buf_int(indx_int:indx_int+nselect-1)=pawrhoij_in(irhoij)%rhoijselect(1:nselect) + indx_int=indx_int+nselect + do isp=1,nspden + do ii=1,qphase + jj=(ii-1)*cplex*lmn2_size + buf_dp(indx_dp:indx_dp+cplex*nselect-1)= & +& pawrhoij_in(irhoij)%rhoijp(jj+1:jj+cplex*nselect,isp) + indx_dp=indx_dp+cplex*nselect + end do + end do + end if + if (lmnmix>0) then + buf_int(indx_int:indx_int+lmnmix-1)=pawrhoij_in(irhoij)%kpawmix(1:lmnmix) + indx_int=indx_int+lmnmix + end if + if (ngrhoij>0) then + do isp=1,nspden + do ii=1,cplex*qphase*lmn2_size + buf_dp(indx_dp:indx_dp+ngrhoij-1)=pawrhoij_in(irhoij)%grhoij(1:ngrhoij,ii,isp) + indx_dp=indx_dp+ngrhoij + end do + end do + end if + if (use_rhoijres>0) then + do isp=1,nspden + buf_dp(indx_dp:indx_dp+cplex*qphase*lmn2_size-1)= & + pawrhoij_in(irhoij)%rhoijres(1:cplex*qphase*lmn2_size,isp) + indx_dp=indx_dp+cplex*qphase*lmn2_size + end do + end if + if (use_rhoij_>0) then + do isp=1,rhoij_size2 + buf_dp(indx_dp:indx_dp+cplex*qphase*lmn2_size-1)= & +& pawrhoij_in(irhoij)%rhoij_(1:cplex*qphase*lmn2_size,isp) + indx_dp=indx_dp+cplex*qphase*lmn2_size + end do + end if + end do + +!Check + if ((indx_int-1/=buf_int_size).or.(indx_dp-1/=buf_dp_size)) then + write(msg,*) 'Wrong buffer sizes: buf_int_size=',buf_int_size,' buf_dp_size=',buf_dp_size + LIBPAW_BUG(msg) + end if + +!Communicate (1 gather for integers, 1 gather for reals) + LIBPAW_ALLOCATE(count_int,(nproc_atom)) + LIBPAW_ALLOCATE(displ_int,(nproc_atom)) + LIBPAW_ALLOCATE(count_dp ,(nproc_atom)) + LIBPAW_ALLOCATE(displ_dp ,(nproc_atom)) + LIBPAW_ALLOCATE(count_tot,(2*nproc_atom)) + bufsz(1)=buf_int_size; bufsz(2)=buf_dp_size + call xmpi_allgather(bufsz,2,count_tot,comm_atom,ierr) + do ii=1,nproc_atom + count_int(ii)=count_tot(2*ii-1) + count_dp (ii)=count_tot(2*ii) + end do + displ_int(1)=0;displ_dp(1)=0 + do ii=2,nproc_atom + displ_int(ii)=displ_int(ii-1)+count_int(ii-1) + displ_dp (ii)=displ_dp (ii-1)+count_dp (ii-1) + end do + buf_int_size_all=sum(count_int) + buf_dp_size_all =sum(count_dp) + LIBPAW_DEALLOCATE(count_tot) + if (master==-1.or.me_atom==master) then + LIBPAW_ALLOCATE(buf_int_all,(buf_int_size_all)) + LIBPAW_ALLOCATE(buf_dp_all ,(buf_dp_size_all)) + else + LIBPAW_ALLOCATE(buf_int_all,(0)) + LIBPAW_ALLOCATE(buf_dp_all ,(0)) + end if + if (master==-1) then + call xmpi_allgatherv(buf_int,buf_int_size,buf_int_all,count_int,displ_int,comm_atom,ierr) + call xmpi_allgatherv(buf_dp ,buf_dp_size ,buf_dp_all ,count_dp ,displ_dp ,comm_atom,ierr) + else + call xmpi_gatherv(buf_int,buf_int_size,buf_int_all,count_int,displ_int,master,comm_atom,ierr) + call xmpi_gatherv(buf_dp ,buf_dp_size ,buf_dp_all ,count_dp ,displ_dp ,master,comm_atom,ierr) + end if + LIBPAW_DEALLOCATE(count_int) + LIBPAW_DEALLOCATE(displ_int) + LIBPAW_DEALLOCATE(count_dp) + LIBPAW_DEALLOCATE(displ_dp) + +!Retrieve data from output buffer + if (master==-1.or.me_atom==master) then + indx_int=1;indx_dp=1 + call pawrhoij_free(pawrhoij_gathered) + do irhoij=1,nrhoij_out + jrhoij =buf_int_all(indx_int) ;indx_int=indx_int+1 + cplex =buf_int_all(indx_int) ;indx_int=indx_int+1 + qphase =buf_int_all(indx_int) ;indx_int=indx_int+1 + lmn2_size =buf_int_all(indx_int) ;indx_int=indx_int+1 + nspden =buf_int_all(indx_int) ;indx_int=indx_int+1 + nselect =buf_int_all(indx_int) ;indx_int=indx_int+1 + lmnmix =buf_int_all(indx_int) ;indx_int=indx_int+1 + ngrhoij =buf_int_all(indx_int) ;indx_int=indx_int+1 + use_rhoijp =buf_int_all(indx_int) ;indx_int=indx_int+1 + use_rhoijres=buf_int_all(indx_int) ;indx_int=indx_int+1 + use_rhoij_ =buf_int_all(indx_int) ;indx_int=indx_int+1 + rhoij_size2 =buf_int_all(indx_int) ;indx_int=indx_int+1 + pawrhoij_gathered(jrhoij)%itypat=buf_int_all(indx_int) ;indx_int=indx_int+1 + pawrhoij_gathered(jrhoij)%lmn_size=buf_int_all(indx_int) ;indx_int=indx_int+1 + pawrhoij_gathered(jrhoij)%nsppol=buf_int_all(indx_int) ;indx_int=indx_int+1 + pawrhoij_gathered(jrhoij)%nspinor=buf_int_all(indx_int) ;indx_int=indx_int+1 + pawrhoij_gathered(jrhoij)%cplex_rhoij=cplex + pawrhoij_gathered(jrhoij)%qphase=qphase + pawrhoij_gathered(jrhoij)%lmn2_size=lmn2_size + pawrhoij_gathered(jrhoij)%nspden=nspden + pawrhoij_gathered(jrhoij)%nrhoijsel=nselect + pawrhoij_gathered(jrhoij)%lmnmix_sz=lmnmix + pawrhoij_gathered(jrhoij)%ngrhoij=ngrhoij + pawrhoij_gathered(jrhoij)%use_rhoijp=use_rhoijp + pawrhoij_gathered(jrhoij)%use_rhoijres=use_rhoijres + pawrhoij_gathered(jrhoij)%use_rhoij_=use_rhoij_ + if (use_rhoijp>0) then + LIBPAW_ALLOCATE(pawrhoij_gathered(jrhoij)%rhoijselect,(lmn2_size)) + pawrhoij_gathered(jrhoij)%rhoijselect(1:nselect)=buf_int_all(indx_int:indx_int+nselect-1) + if (nselect < lmn2_size )pawrhoij_gathered(jrhoij)%rhoijselect(nselect+1:lmn2_size)=0 + indx_int=indx_int+nselect + LIBPAW_ALLOCATE(pawrhoij_gathered(jrhoij)%rhoijp,(qphase*cplex*lmn2_size,nspden)) + do isp=1,nspden + do ii=1,qphase + jj=(ii-1)*cplex*lmn2_size + pawrhoij_gathered(jrhoij)%rhoijp(jj+1:jj+cplex*nselect,isp)= & +& buf_dp_all(indx_dp:indx_dp+cplex*nselect-1) + if (nselect0) then + LIBPAW_ALLOCATE(pawrhoij_gathered(jrhoij)%kpawmix,(lmnmix)) + pawrhoij_gathered(jrhoij)%kpawmix(1:lmnmix)=buf_int_all(indx_int:indx_int+lmnmix-1) + indx_int=indx_int+lmnmix + end if + if (ngrhoij>0) then + LIBPAW_ALLOCATE(pawrhoij_gathered(jrhoij)%grhoij,(ngrhoij,qphase*cplex*lmn2_size,nspden)) + do isp=1,nspden + do ii=1,cplex*qphase*lmn2_size + pawrhoij_gathered(jrhoij)%grhoij(1:ngrhoij,ii,isp)=buf_dp_all(indx_dp:indx_dp+ngrhoij-1) + indx_dp=indx_dp+ngrhoij + end do + end do + end if + if (use_rhoijres>0) then + LIBPAW_ALLOCATE(pawrhoij_gathered(jrhoij)%rhoijres,(qphase*cplex*lmn2_size,nspden)) + do isp=1,nspden + pawrhoij_gathered(jrhoij)%rhoijres(1:cplex*qphase*lmn2_size,isp)= & +& buf_dp_all(indx_dp:indx_dp+cplex*qphase*lmn2_size-1) + indx_dp=indx_dp+cplex*qphase*lmn2_size + end do + end if + if (use_rhoij_>0) then + LIBPAW_ALLOCATE(pawrhoij_gathered(jrhoij)%rhoij_,(qphase*cplex*lmn2_size,rhoij_size2)) + do isp=1,rhoij_size2 + pawrhoij_gathered(jrhoij)%rhoij_(1:cplex*qphase*lmn2_size,isp)= & +& buf_dp_all(indx_dp:indx_dp+cplex*qphase*lmn2_size-1) + indx_dp=indx_dp+cplex*qphase*lmn2_size + end do + end if + end do + if ((indx_int/=1+buf_int_size_all).or.(indx_dp/=1+buf_dp_size_all)) then + write(msg,*) 'Wrong buffer sizes: buf_int_size_all=',buf_int_size_all,' buf_dp_size_all=',buf_dp_size_all + LIBPAW_BUG(msg) + end if + end if + +!Free memory + call free_my_atmtab(my_atmtab,my_atmtab_allocated) + LIBPAW_DEALLOCATE(buf_int) + LIBPAW_DEALLOCATE(buf_dp) + LIBPAW_DEALLOCATE(buf_int_all) + LIBPAW_DEALLOCATE(buf_dp_all) + +end subroutine pawrhoij_gather +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawrhoij/pawrhoij_bcast +!! NAME +!! pawrhoij_bcast +!! +!! FUNCTION +!! Broadcast pawrhoij datastructures +!! Can take into account a distribution of data over a "atom" communicator +!! +!! INPUTS +!! master=master communicator receiving data +!! mpicomm= MPI communicator +!! comm_atom= --optional-- MPI communicator over atoms +!! pawrhoij_in(:)= input rhoij datastructures on master process +!! +!! OUTPUT +!! pawrhoij_out(:)= output rhoij datastructure on every process +!! Eventually distributed according to comm_atom communicator +!! +!! SOURCE + + subroutine pawrhoij_bcast(pawrhoij_in,pawrhoij_out,master,mpicomm,comm_atom) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: master,mpicomm + integer,intent(in),optional :: comm_atom +!arrays + type(pawrhoij_type),intent(in) :: pawrhoij_in(:) + type(pawrhoij_type),intent(inout) :: pawrhoij_out(:) +!Local variables------------------------------- +!scalars + integer :: buf_dp_size,buf_dp_size_all,buf_int_size,buf_int_size_all + integer :: cplex,ierr,ii,indx_dp,indx_int,iproc,irhoij,isp,jj,jrhoij,lmn2_size,lmnmix,me,me_atom + integer :: my_comm_atom,ngrhoij,nproc,nproc_atom,nrhoij_in,nrhoij_out,nrhoij_out_all + integer :: nselect,nspden,qphase,rhoij_size2,use_rhoijp,use_rhoijres,use_rhoij_ + logical :: my_atmtab_allocated,paral_atom + character(len=500) :: msg +!arrays + integer :: buf_size(2) + integer,allocatable :: atmtab(:),buf_int_size_i(:),buf_dp_size_i(:) + integer,allocatable :: count_dp(:),count_int(:),disp_dp(:),disp_int(:),nrhoij_out_i(:) + integer,allocatable,target :: buf_int(:) + integer,pointer :: buf_int_all(:),my_atmtab(:) + real(dp),allocatable,target :: buf_dp(:) + real(dp),pointer :: buf_dp_all(:) + +! ************************************************************************* + +!Load MPI "atom" distribution data + my_comm_atom=xmpi_comm_self;nproc_atom=1;me_atom=0 + if (present(comm_atom)) then + my_comm_atom=comm_atom + me_atom=xmpi_comm_rank(my_comm_atom) + nproc_atom=xmpi_comm_size(my_comm_atom) + paral_atom=(nproc_atom>1) + if (my_comm_atom/=mpicomm.and.nproc_atom/=1) then + msg='wrong comm_atom communicator !' + LIBPAW_BUG(msg) + end if + end if + +!Load global MPI data + me=xmpi_comm_rank(mpicomm) + nproc=xmpi_comm_size(mpicomm) + +!Just copy in case of a sequential run + if (nproc==1.and.nproc_atom==1) then + call pawrhoij_copy(pawrhoij_in,pawrhoij_out,.false.,.false.,.false.) + return + end if + +!Retrieve and test pawrhoij sizes + nrhoij_in=0;if (me==master) nrhoij_in=size(pawrhoij_in) + nrhoij_out=size(pawrhoij_out);nrhoij_out_all=nrhoij_out + if (paral_atom) then + LIBPAW_ALLOCATE(nrhoij_out_i,(nproc_atom)) + buf_size(1)=nrhoij_out + call xmpi_allgather(buf_size,1,nrhoij_out_i,my_comm_atom,ierr) + nrhoij_out_all=sum(nrhoij_out_i) + end if + if (me==master.and.nrhoij_in/=nrhoij_out_all) then + msg='pawrhoij_in or pawrhoij_out wrongly allocated!' + LIBPAW_BUG(msg) + end if + +!Retrieve table(s) of atoms (if necessary) + if (paral_atom) then + nullify(my_atmtab) + call get_my_atmtab(my_comm_atom,my_atmtab,my_atmtab_allocated,paral_atom, & +& nrhoij_out_all,my_natom_ref=nrhoij_out) + LIBPAW_ALLOCATE(disp_int,(nproc_atom)) + disp_int(1)=0 + do iproc=2,nproc_atom + disp_int(iproc)=disp_int(iproc-1)+nrhoij_out_i(iproc-1) + end do + LIBPAW_ALLOCATE(atmtab,(nrhoij_in)) + call xmpi_gatherv(my_atmtab,nrhoij_out,atmtab,nrhoij_out_i,disp_int,& +& master,my_comm_atom,ierr) + LIBPAW_DEALLOCATE(disp_int) + end if + +!Compute sizes of input buffers and broadcast them + LIBPAW_ALLOCATE(buf_int_size_i,(nrhoij_out_all)) + LIBPAW_ALLOCATE(buf_dp_size_i ,(nrhoij_out_all)) + if (me==master) then + buf_int_size_i(:)=0;buf_dp_size_i(:)=0 + do irhoij=1,nrhoij_in + jrhoij=irhoij;if (paral_atom) jrhoij=atmtab(irhoij) + cplex =pawrhoij_in(jrhoij)%cplex_rhoij + qphase =pawrhoij_in(jrhoij)%qphase + lmn2_size =pawrhoij_in(jrhoij)%lmn2_size + nspden =pawrhoij_in(jrhoij)%nspden + lmnmix =pawrhoij_in(jrhoij)%lmnmix_sz + ngrhoij =pawrhoij_in(jrhoij)%ngrhoij + use_rhoijp =pawrhoij_in(jrhoij)%use_rhoijp + use_rhoijres=pawrhoij_in(jrhoij)%use_rhoijres + use_rhoij_ =pawrhoij_in(jrhoij)%use_rhoij_ + buf_int_size_i(irhoij)=buf_int_size_i(irhoij)+16 + if (ngrhoij>0) buf_dp_size_i(irhoij)=buf_dp_size_i(irhoij)+cplex*qphase*lmn2_size*nspden*ngrhoij + if (use_rhoijres>0) buf_dp_size_i(irhoij)=buf_dp_size_i(irhoij)+cplex*qphase*lmn2_size*nspden + if (use_rhoijp>0) then + nselect=pawrhoij_in(jrhoij)%nrhoijsel + buf_int_size_i(irhoij)=buf_int_size_i(irhoij)+nselect + buf_dp_size_i(irhoij)=buf_dp_size_i(irhoij)+cplex*qphase*nselect*nspden + end if + if (use_rhoij_>0) then + rhoij_size2=size(pawrhoij_in(jrhoij)%rhoij_,dim=2) + buf_dp_size_i(irhoij)=buf_dp_size_i(irhoij)+cplex*qphase*lmn2_size*rhoij_size2 + end if + end do + end if + call xmpi_bcast(buf_int_size_i,master,mpicomm,ierr) + call xmpi_bcast(buf_dp_size_i,master,mpicomm,ierr) + buf_int_size_all=sum(buf_int_size_i) ; buf_dp_size_all=sum(buf_dp_size_i) + +!Prepare buffers/tabs for communication + if (paral_atom) then + LIBPAW_ALLOCATE(count_int,(nproc_atom)) + LIBPAW_ALLOCATE(count_dp,(nproc_atom)) + LIBPAW_ALLOCATE(disp_int,(nproc_atom)) + LIBPAW_ALLOCATE(disp_dp,(nproc_atom)) + indx_int=0 + do iproc=1,nproc_atom + ii=nrhoij_out_i(iproc) + count_int(iproc)=sum(buf_int_size_i(indx_int+1:indx_int+ii)) + count_dp (iproc)=sum(buf_dp_size_i (indx_int+1:indx_int+ii)) + indx_int=indx_int+ii + end do + disp_int(1)=0;disp_dp(1)=0 + do iproc=2,nproc_atom + disp_int(iproc)=disp_int(iproc-1)+count_int(iproc-1) + disp_dp (iproc)=disp_dp (iproc-1)+count_dp (iproc-1) + end do + if (buf_int_size_all/=sum(count_int).or.buf_dp_size_all/=sum(count_dp)) then + msg='(1) Wrong buffer sizes !' + LIBPAW_BUG(msg) + end if + buf_int_size=count_int(me_atom+1) + buf_dp_size =count_dp(me_atom+1) + LIBPAW_ALLOCATE(buf_int,(buf_int_size)) + LIBPAW_ALLOCATE(buf_dp ,(buf_dp_size)) + if (me==master) then + LIBPAW_POINTER_ALLOCATE(buf_int_all,(buf_int_size_all)) + LIBPAW_POINTER_ALLOCATE(buf_dp_all ,(buf_dp_size_all)) + else + LIBPAW_POINTER_ALLOCATE(buf_int_all,(1)) + LIBPAW_POINTER_ALLOCATE(buf_dp_all ,(1)) + end if + LIBPAW_DEALLOCATE(nrhoij_out_i) + else + buf_int_size=buf_int_size_all + buf_dp_size =buf_dp_size_all + LIBPAW_ALLOCATE(buf_int,(buf_int_size)) + LIBPAW_ALLOCATE(buf_dp ,(buf_dp_size)) + buf_int_all => buf_int + buf_dp_all => buf_dp + end if + LIBPAW_DEALLOCATE(buf_int_size_i) + LIBPAW_DEALLOCATE(buf_dp_size_i) + +!Fill input buffers + if (me==master) then + indx_int=1;indx_dp =1 + do irhoij=1,nrhoij_in + jrhoij=irhoij;if (paral_atom) jrhoij=atmtab(irhoij) + cplex =pawrhoij_in(jrhoij)%cplex_rhoij + qphase =pawrhoij_in(jrhoij)%qphase + lmn2_size =pawrhoij_in(jrhoij)%lmn2_size + nspden =pawrhoij_in(jrhoij)%nspden + lmnmix =pawrhoij_in(jrhoij)%lmnmix_sz + ngrhoij =pawrhoij_in(jrhoij)%ngrhoij + use_rhoijp =pawrhoij_in(jrhoij)%use_rhoijp + nselect =pawrhoij_in(jrhoij)%nrhoijsel + use_rhoijres=pawrhoij_in(jrhoij)%use_rhoijres + use_rhoij_ =pawrhoij_in(jrhoij)%use_rhoij_ + rhoij_size2 =size(pawrhoij_in(jrhoij)%rhoij_,dim=2) + buf_int_all(indx_int)=jrhoij ;indx_int=indx_int+1 ! Not used ! + buf_int_all(indx_int)=cplex ;indx_int=indx_int+1 + buf_int_all(indx_int)=qphase ;indx_int=indx_int+1 + buf_int_all(indx_int)=lmn2_size ;indx_int=indx_int+1 + buf_int_all(indx_int)=nspden ;indx_int=indx_int+1 + buf_int_all(indx_int)=nselect ;indx_int=indx_int+1 + buf_int_all(indx_int)=lmnmix ;indx_int=indx_int+1 + buf_int_all(indx_int)=ngrhoij ;indx_int=indx_int+1 + buf_int_all(indx_int)=use_rhoijp ;indx_int=indx_int+1 + buf_int_all(indx_int)=use_rhoijres ;indx_int=indx_int+1 + buf_int_all(indx_int)=use_rhoij_ ;indx_int=indx_int+1 + buf_int_all(indx_int)=rhoij_size2 ;indx_int=indx_int+1 + buf_int_all(indx_int)=pawrhoij_in(jrhoij)%itypat ;indx_int=indx_int+1 + buf_int_all(indx_int)=pawrhoij_in(jrhoij)%lmn_size;indx_int=indx_int+1 + buf_int_all(indx_int)=pawrhoij_in(jrhoij)%nsppol ;indx_int=indx_int+1 + buf_int_all(indx_int)=pawrhoij_in(jrhoij)%nspinor ;indx_int=indx_int+1 + if (use_rhoijp>0) then + buf_int_all(indx_int:indx_int+nselect-1)=pawrhoij_in(jrhoij)%rhoijselect(1:nselect) + indx_int=indx_int+nselect + do isp=1,nspden + do ii=1,qphase + jj=(ii-1)*cplex*lmn2_size + buf_dp_all(indx_dp:indx_dp+cplex*nselect-1)= & +& pawrhoij_in(jrhoij)%rhoijp(jj+1:jj+cplex*nselect,isp) + indx_dp=indx_dp+cplex*nselect + end do + end do + end if + if (lmnmix>0) then + buf_int_all(indx_int:indx_int+lmnmix-1)=pawrhoij_in(jrhoij)%kpawmix(1:lmnmix) + indx_int=indx_int+lmnmix + end if + if (ngrhoij>0) then + do isp=1,nspden + do ii=1,cplex*qphase*lmn2_size + buf_dp_all(indx_dp:indx_dp+ngrhoij-1)=pawrhoij_in(jrhoij)%grhoij(1:ngrhoij,ii,isp) + indx_dp=indx_dp+ngrhoij + end do + end do + end if + if (use_rhoijres>0) then + do isp=1,nspden + buf_dp_all(indx_dp:indx_dp+cplex*qphase*lmn2_size-1)= & +& pawrhoij_in(jrhoij)%rhoijres(1:cplex*qphase*lmn2_size,isp) + indx_dp=indx_dp+cplex*qphase*lmn2_size + end do + end if + if (use_rhoij_>0) then + do isp=1,rhoij_size2 + buf_dp_all(indx_dp:indx_dp+cplex*qphase*lmn2_size-1)= & +& pawrhoij_in(jrhoij)%rhoij_(1:cplex*qphase*lmn2_size,isp) + indx_dp=indx_dp+cplex*qphase*lmn2_size + end do + end if + end do +! Check + if ((indx_int-1/=buf_int_size_all).or.(indx_dp-1/=buf_dp_size_all)) then + msg='(2) Wrong buffer sizes !' + LIBPAW_BUG(msg) + end if + end if ! me=master + +!Communicate + if (paral_atom) then + call xmpi_scatterv(buf_int_all,count_int,disp_int,buf_int,buf_int_size,master,mpicomm,ierr) + call xmpi_scatterv(buf_dp_all ,count_dp ,disp_dp ,buf_dp ,buf_dp_size ,master,mpicomm,ierr) + else + call xmpi_bcast(buf_int,master,mpicomm,ierr) + call xmpi_bcast(buf_dp ,master,mpicomm,ierr) + end if + +!Retrieve data from output buffer + indx_int=1;indx_dp=1 + call pawrhoij_free(pawrhoij_out) + do irhoij=1,nrhoij_out + jrhoij =buf_int(indx_int);indx_int=indx_int+1 ! Not used ! + cplex =buf_int(indx_int);indx_int=indx_int+1 + qphase =buf_int(indx_int);indx_int=indx_int+1 + lmn2_size =buf_int(indx_int);indx_int=indx_int+1 + nspden =buf_int(indx_int);indx_int=indx_int+1 + nselect =buf_int(indx_int);indx_int=indx_int+1 + lmnmix =buf_int(indx_int);indx_int=indx_int+1 + ngrhoij =buf_int(indx_int);indx_int=indx_int+1 + use_rhoijp =buf_int(indx_int);indx_int=indx_int+1 + use_rhoijres=buf_int(indx_int);indx_int=indx_int+1 + use_rhoij_ =buf_int(indx_int);indx_int=indx_int+1 + rhoij_size2 =buf_int(indx_int);indx_int=indx_int+1 + pawrhoij_out(irhoij)%itypat=buf_int(indx_int) ;indx_int=indx_int+1 + pawrhoij_out(irhoij)%lmn_size=buf_int(indx_int);indx_int=indx_int+1 + pawrhoij_out(irhoij)%nsppol=buf_int(indx_int) ;indx_int=indx_int+1 + pawrhoij_out(irhoij)%nspinor=buf_int(indx_int) ;indx_int=indx_int+1 + pawrhoij_out(irhoij)%cplex_rhoij=cplex + pawrhoij_out(irhoij)%qphase=qphase + pawrhoij_out(irhoij)%lmn2_size=lmn2_size + pawrhoij_out(irhoij)%nspden=nspden + pawrhoij_out(irhoij)%nrhoijsel=nselect + pawrhoij_out(irhoij)%lmnmix_sz=lmnmix + pawrhoij_out(irhoij)%ngrhoij=ngrhoij + pawrhoij_out(irhoij)%use_rhoijp=use_rhoijp + pawrhoij_out(irhoij)%use_rhoijres=use_rhoijres + pawrhoij_out(irhoij)%use_rhoij_=use_rhoij_ + if (use_rhoijp>0) then + LIBPAW_ALLOCATE(pawrhoij_out(irhoij)%rhoijselect,(nselect)) + pawrhoij_out(irhoij)%rhoijselect=0 + pawrhoij_out(irhoij)%rhoijselect(1:nselect)=buf_int(indx_int:indx_int+nselect-1) + indx_int=indx_int+nselect + LIBPAW_ALLOCATE(pawrhoij_out(irhoij)%rhoijp,(qphase*cplex*nselect,nspden)) + do isp=1,nspden + do ii=1,qphase + jj=(ii-1)*cplex*lmn2_size + pawrhoij_out(irhoij)%rhoijp(jj+1:jj+cplex*nselect,isp)= & +& buf_dp(indx_dp:indx_dp+cplex*nselect-1) + indx_dp=indx_dp+cplex*nselect + end do + end do + end if + if (lmnmix>0) then + LIBPAW_ALLOCATE(pawrhoij_out(irhoij)%kpawmix,(lmnmix)) + pawrhoij_out(irhoij)%kpawmix(1:lmnmix)=buf_int(indx_int:indx_int+lmnmix-1) + indx_int=indx_int+lmnmix + end if + if (ngrhoij>0) then + LIBPAW_ALLOCATE(pawrhoij_out(irhoij)%grhoij,(ngrhoij,cplex*qphase*lmn2_size,nspden)) + do isp=1,nspden + do ii=1,cplex*qphase*lmn2_size + pawrhoij_out(irhoij)%grhoij(1:ngrhoij,ii,isp)=buf_dp(indx_dp:indx_dp+ngrhoij-1) + indx_dp=indx_dp+ngrhoij + end do + end do + end if + if (use_rhoijres>0) then + LIBPAW_ALLOCATE(pawrhoij_out(irhoij)%rhoijres,(cplex*qphase*lmn2_size,nspden)) + do isp=1,nspden + pawrhoij_out(irhoij)%rhoijres(1:cplex*qphase*lmn2_size,isp)= & +& buf_dp(indx_dp:indx_dp+cplex*qphase*lmn2_size-1) + indx_dp=indx_dp+cplex*qphase*lmn2_size + end do + end if + if (use_rhoij_>0) then + LIBPAW_ALLOCATE(pawrhoij_out(irhoij)%rhoij_,(cplex*qphase*lmn2_size,rhoij_size2)) + do isp=1,rhoij_size2 + pawrhoij_out(irhoij)%rhoij_(1:cplex*qphase*lmn2_size,isp)= & +& buf_dp(indx_dp:indx_dp+cplex*qphase*lmn2_size-1) + indx_dp=indx_dp+cplex*qphase*lmn2_size + end do + end if + end do +!Check + if ((indx_int/=1+buf_int_size).or.(indx_dp/=1+buf_dp_size)) then + msg='(3) Wrong buffer sizes !' + LIBPAW_BUG(msg) + end if + +!Free memory + LIBPAW_DEALLOCATE(buf_int) + LIBPAW_DEALLOCATE(buf_dp) + if (paral_atom) then + LIBPAW_POINTER_DEALLOCATE(buf_int_all) + LIBPAW_POINTER_DEALLOCATE(buf_dp_all) + LIBPAW_DEALLOCATE(count_int) + LIBPAW_DEALLOCATE(count_dp) + LIBPAW_DEALLOCATE(disp_int) + LIBPAW_DEALLOCATE(disp_dp) + LIBPAW_DEALLOCATE(atmtab) + call free_my_atmtab(my_atmtab,my_atmtab_allocated) + end if + +end subroutine pawrhoij_bcast +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawrhoij/pawrhoij_redistribute +!! NAME +!! pawrhoij_redistribute +!! +!! FUNCTION +!! Redistribute an array of pawrhoij datastructures +!! Input pawrhoij is given on a MPI communicator +!! Output pawrhoij is redistributed on another MPI communicator +!! +!! INPUTS +!! mpi_comm_in= input MPI (atom) communicator +!! mpi_comm_out= output MPI (atom) communicator +!! mpi_atmtab_in= --optional-- indexes of the input pawrhoij treated by current proc +!! if not present, will be calculated in the present routine +!! mpi_atmtab_out= --optional-- indexes of the output pawrhoij treated by current proc +!! if not present, will be calculated in the present routine +!! natom= --optional-- total number of atoms +!! ----- Optional arguments used only for asynchronous communications ----- +!! RecvAtomProc(:)= rank of processor from which I expect atom (in mpi_comm_in) +!! RecvAtomList(:)= indexes of atoms to be received by me +!! RecvAtomList(irecv) are the atoms I expect from RecvAtomProc(irecv) +!! SendAtomProc(:)= ranks of process destination of atom (in mpi_comm_in) +!! SendAtomList(:)= indexes of atoms to be sent by me +!! SendAtomList(isend) are the atoms sent to SendAtomProc(isend) +!! +!! OUTPUT +!! [pawrhoij_out(:)]= --optional-- +!! if present, the redistributed datastructure does not replace +!! the input one but is delivered in pawrhoij_out +!! if not present, input and output datastructure are the same. +!! +!! SIDE EFFECTS +!! pawrhoij(:)= input (and eventually output) pawrhoij datastructures +!! +!! SOURCE + + subroutine pawrhoij_redistribute(pawrhoij,mpi_comm_in,mpi_comm_out,& +& natom,mpi_atmtab_in,mpi_atmtab_out,pawrhoij_out,& +& SendAtomProc,SendAtomList,RecvAtomProc,RecvAtomList) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: mpi_comm_in,mpi_comm_out + integer,optional,intent(in) :: natom +!arrays + integer,intent(in),optional,target :: mpi_atmtab_in(:),mpi_atmtab_out(:) + integer,intent(in),optional :: SendAtomProc(:),SendAtomList(:),RecvAtomProc(:),RecvAtomList(:) + type(pawrhoij_type),allocatable,intent(inout) :: pawrhoij(:) + type(pawrhoij_type),pointer,intent(out),optional :: pawrhoij_out(:) + +!Local variables------------------------------- +!scalars + integer :: algo_option,i1,iat_in,iat_out,iatom,ierr,ireq,iircv,iisend,imsg,imsg_current,imsg1 + integer :: iproc_rcv,iproc_send,me_exch,mpi_comm_exch,my_natom_in,my_natom_out,my_tag,natom_tot,nb_dp,nb_int + integer :: nb_msg,nbmsg_incoming,nbrecv,nbrecvmsg,nbsend,nbsendreq,nbsent,next,npawrhoij_sent + integer :: nproc_in,nproc_out + logical :: flag,in_place,message_yet_prepared,my_atmtab_in_allocated,my_atmtab_out_allocated,paral_atom +!arrays + integer :: buf_size(3),request1(3) + integer,pointer :: my_atmtab_in(:),my_atmtab_out(:) + integer,allocatable :: atmtab_send(:),atm_indx_in(:),atm_indx_out(:),buf_int1(:),From(:),request(:) + integer,allocatable,target :: buf_int(:) + integer,pointer:: buf_ints(:) + logical,allocatable :: msg_pick(:) + real(dp),allocatable :: buf_dp1(:) + real(dp),allocatable,target :: buf_dp(:) + real(dp),pointer :: buf_dps(:) + type(coeffi1_type),target,allocatable :: tab_buf_int(:),tab_buf_atom(:) + type(coeff1_type),target,allocatable :: tab_buf_dp(:) + type(pawrhoij_type),pointer :: pawrhoij_out1(:) + type(pawrhoij_type),allocatable :: pawrhoij_all(:) + +! ************************************************************************* + +!@pawrhoij_type + + in_place=(.not.present(pawrhoij_out)) + my_natom_in=size(pawrhoij) + +!If not "in_place", destroy the output datastructure + if (.not.in_place) then + if (associated(pawrhoij_out)) then + call pawrhoij_free(pawrhoij_out) + LIBPAW_DATATYPE_DEALLOCATE(pawrhoij_out) + end if + end if + +!Special sequential case + if (mpi_comm_in==xmpi_comm_self.and.mpi_comm_out==xmpi_comm_self) then + if ((.not.in_place).and.(my_natom_in>0)) then + LIBPAW_DATATYPE_ALLOCATE(pawrhoij_out,(my_natom_in)) + call pawrhoij_nullify(pawrhoij_out) + call pawrhoij_copy(pawrhoij,pawrhoij_out,& +& keep_cplex=.false.,keep_qphase=.false.,keep_itypat=.false.,keep_nspden=.false.) + end if + return + end if + +!Get total natom + if (present(natom)) then + natom_tot=natom + else + natom_tot=my_natom_in + call xmpi_sum(natom_tot,mpi_comm_in,ierr) + end if + +!Select input distribution + if (present(mpi_atmtab_in)) then + my_atmtab_in => mpi_atmtab_in + my_atmtab_in_allocated=.false. + else + call get_my_atmtab(mpi_comm_in,my_atmtab_in,my_atmtab_in_allocated,& +& paral_atom,natom_tot,my_natom_in) + end if + +!Select output distribution + if (present(mpi_atmtab_out)) then + my_natom_out=size(mpi_atmtab_out) + my_atmtab_out => mpi_atmtab_out + my_atmtab_out_allocated=.false. + else + call get_my_atmtab(mpi_comm_out,my_atmtab_out,my_atmtab_out_allocated,& +& paral_atom,natom_tot) + end if + +!Select algo according to optional input arguments + algo_option=1 + if (present(SendAtomProc).and.present(SendAtomList).and.& +& present(RecvAtomProc).and.present(RecvAtomList)) algo_option=2 + + +!Brute force algorithm (allgather + scatter) +!--------------------------------------------------------- + if (algo_option==1) then + + LIBPAW_DATATYPE_ALLOCATE(pawrhoij_all,(natom_tot)) + call pawrhoij_nullify(pawrhoij_all) + call pawrhoij_copy(pawrhoij,pawrhoij_all,comm_atom=mpi_comm_in,mpi_atmtab=my_atmtab_in,& +& keep_cplex=.false.,keep_qphase=.false.,keep_itypat=.false.,keep_nspden=.false.) + if (in_place) then + call pawrhoij_free(pawrhoij) + LIBPAW_DATATYPE_DEALLOCATE(pawrhoij) + LIBPAW_DATATYPE_ALLOCATE(pawrhoij,(my_natom_out)) + call pawrhoij_nullify(pawrhoij) + call pawrhoij_copy(pawrhoij_all,pawrhoij,comm_atom=mpi_comm_out,mpi_atmtab=my_atmtab_out,& +& keep_cplex=.false.,keep_qphase=.false.,keep_itypat=.false.,keep_nspden=.false.) + else + LIBPAW_DATATYPE_ALLOCATE(pawrhoij_out,(my_natom_out)) + call pawrhoij_nullify(pawrhoij_out) + call pawrhoij_copy(pawrhoij_all,pawrhoij_out,comm_atom=mpi_comm_out,mpi_atmtab=my_atmtab_out,& +& keep_cplex=.false.,keep_qphase=.false.,keep_itypat=.false.,keep_nspden=.false.) + end if + call pawrhoij_free(pawrhoij_all) + LIBPAW_DATATYPE_DEALLOCATE(pawrhoij_all) + + +!Asynchronous algorithm (asynchronous communications) +!--------------------------------------------------------- + else if (algo_option==2) then + + nbsend=size(SendAtomProc) ; nbrecv=size(RecvAtomProc) + + if (in_place) then + if ( my_natom_out > 0 ) then + LIBPAW_DATATYPE_ALLOCATE(pawrhoij_out1,(my_natom_out)) + call pawrhoij_nullify(pawrhoij_out1) + else + LIBPAW_DATATYPE_ALLOCATE(pawrhoij_out1,(0)) + end if + else + LIBPAW_DATATYPE_ALLOCATE(pawrhoij_out,(my_natom_out)) + call pawrhoij_nullify(pawrhoij_out) + pawrhoij_out1=>pawrhoij_out + end if + + nproc_in=xmpi_comm_size(mpi_comm_in) + nproc_out=xmpi_comm_size(mpi_comm_out) + if (nproc_in<=nproc_out) mpi_comm_exch=mpi_comm_out + if (nproc_in>nproc_out) mpi_comm_exch=mpi_comm_in + me_exch=xmpi_comm_rank(mpi_comm_exch) + +! Dimension put to the maximum to send + LIBPAW_ALLOCATE(atmtab_send,(nbsend)) + LIBPAW_ALLOCATE(atm_indx_in,(natom_tot)) + atm_indx_in=-1 + do iatom=1,my_natom_in + atm_indx_in(my_atmtab_in(iatom))=iatom + end do + LIBPAW_ALLOCATE(atm_indx_out,(natom_tot)) + atm_indx_out=-1 + do iatom=1,my_natom_out + atm_indx_out(my_atmtab_out(iatom))=iatom + end do + + LIBPAW_DATATYPE_ALLOCATE(tab_buf_int,(nbsend)) + LIBPAW_DATATYPE_ALLOCATE(tab_buf_dp,(nbsend)) + LIBPAW_DATATYPE_ALLOCATE(tab_buf_atom,(nbsend)) + LIBPAW_ALLOCATE(request,(3*nbsend)) + +! A send buffer in an asynchrone communication couldn't be deallocate before it has been receive + nbsent=0 ; ireq=0 ; iisend=0 ; nbsendreq=0 ; nb_msg=0 + do iisend=1,nbsend + iproc_rcv=SendAtomProc(iisend) + next=-1 + if (iisend < nbsend) next=SendAtomProc(iisend+1) + if (iproc_rcv /= me_exch) then + nbsent=nbsent+1 + atmtab_send(nbsent)=SendAtomList(iisend) ! we groups the atoms sends to the same process + if (iproc_rcv /= next) then + if (nbsent > 0) then +! Check if message has been yet prepared + message_yet_prepared=.false. + do imsg=1,nb_msg + if (size(tab_buf_atom(imsg)%value) /= nbsent) then + cycle + else + do imsg1=1,nbsent + if (tab_buf_atom(imsg)%value(imsg1)/=atmtab_send(imsg1)) exit + message_yet_prepared=.true. + imsg_current=imsg + end do + end if + end do +! Create the message + if (.not.message_yet_prepared) then + nb_msg=nb_msg+1 + call pawrhoij_isendreceive_fillbuffer( & +& pawrhoij,atmtab_send,atm_indx_in,nbsent,buf_int,nb_int,buf_dp,nb_dp) + LIBPAW_ALLOCATE(tab_buf_int(nb_msg)%value,(nb_int)) + LIBPAW_ALLOCATE(tab_buf_dp(nb_msg)%value,(nb_dp)) + tab_buf_int(nb_msg)%value(1:nb_int)=buf_int(1:nb_int) + tab_buf_dp(nb_msg)%value(1:nb_dp)=buf_dp(1:nb_dp) + LIBPAW_DEALLOCATE(buf_int) + LIBPAW_DEALLOCATE(buf_dp) + LIBPAW_ALLOCATE(tab_buf_atom(nb_msg)%value, (nbsent)) + tab_buf_atom(nb_msg)%value(1:nbsent)=atmtab_send(1:nbsent) + imsg_current=nb_msg + end if +! Communicate + buf_size(1)=size(tab_buf_int(imsg_current)%value) + buf_size(2)=size(tab_buf_dp(imsg_current)%value) + buf_size(3)=nbsent + buf_ints=>tab_buf_int(imsg_current)%value + buf_dps=>tab_buf_dp(imsg_current)%value + my_tag=100 + ireq=ireq+1 + call xmpi_isend(buf_size,iproc_rcv,my_tag,mpi_comm_exch,request(ireq),ierr) + my_tag=101 + ireq=ireq+1 + call xmpi_isend(buf_ints,iproc_rcv,my_tag,mpi_comm_exch,request(ireq),ierr) + my_tag=102 + ireq=ireq+1 + call xmpi_isend(buf_dps,iproc_rcv,my_tag,mpi_comm_exch,request(ireq),ierr) + nbsendreq=ireq + nbsent=0 + end if + end if + else ! Just a renumbering, not a sending + iat_in=atm_indx_in(SendAtomList(iisend)) + iat_out=atm_indx_out(my_atmtab_in(iat_in)) + call pawrhoij_copy(pawrhoij(iat_in:iat_in),pawrhoij_out1(iat_out:iat_out), & +& keep_cplex=.false.,keep_qphase=.false.,keep_itypat=.false.,keep_nspden=.false.) + nbsent=0 + end if + end do + + LIBPAW_ALLOCATE(From,(nbrecv)) + From(:)=-1 ; nbrecvmsg=0 + do iircv=1,nbrecv + iproc_send=RecvAtomProc(iircv) !receive from (RcvAtomProc is sorted by growing process) + next=-1 + if (iircv < nbrecv) next=RecvAtomProc(iircv+1) + if (iproc_send /= me_exch .and. iproc_send/=next) then + nbrecvmsg=nbrecvmsg+1 + From(nbrecvmsg)=iproc_send + end if + end do + + LIBPAW_ALLOCATE(msg_pick,(nbrecvmsg)) + msg_pick=.false. + nbmsg_incoming=nbrecvmsg + do while (nbmsg_incoming > 0) + do i1=1,nbrecvmsg + if (.not.msg_pick(i1)) then + iproc_send=From(i1) + flag=.false. + my_tag=100 + call xmpi_iprobe(iproc_send,my_tag,mpi_comm_exch,flag,ierr) + if (flag) then + msg_pick(i1)=.true. + call xmpi_irecv(buf_size,iproc_send,my_tag,mpi_comm_exch,request1(1),ierr) + call xmpi_wait(request1(1),ierr) + nb_int=buf_size(1) + nb_dp=buf_size(2) + npawrhoij_sent=buf_size(3) + LIBPAW_ALLOCATE(buf_int1,(nb_int)) + LIBPAW_ALLOCATE(buf_dp1,(nb_dp)) + my_tag=101 + call xmpi_irecv(buf_int1,iproc_send,my_tag,mpi_comm_exch,request1(2),ierr) + my_tag=102 + call xmpi_irecv(buf_dp1,iproc_send,my_tag,mpi_comm_exch,request1(3),ierr) + call xmpi_waitall(request1(2:3),ierr) + call pawrhoij_isendreceive_getbuffer(pawrhoij_out1,npawrhoij_sent,atm_indx_out,buf_int1,buf_dp1) + nbmsg_incoming=nbmsg_incoming-1 + LIBPAW_DEALLOCATE(buf_int1) + LIBPAW_DEALLOCATE(buf_dp1) + end if + end if + end do + end do + LIBPAW_DEALLOCATE(msg_pick) + + if (in_place) then + call pawrhoij_free(pawrhoij) + LIBPAW_DATATYPE_DEALLOCATE(pawrhoij) + LIBPAW_DATATYPE_ALLOCATE(pawrhoij,(my_natom_out)) + call pawrhoij_nullify(pawrhoij) + call pawrhoij_copy(pawrhoij_out1,pawrhoij, & +& keep_cplex=.false.,keep_qphase=.false.,keep_itypat=.false.,keep_nspden=.false.) + call pawrhoij_free(pawrhoij_out1) + LIBPAW_DATATYPE_DEALLOCATE(pawrhoij_out1) + end if + +! Wait for deallocating arrays that all sending operations has been realized + if (nbsendreq > 0) then + call xmpi_waitall(request(1:nbsendreq),ierr) + end if + +! Deallocate buffers + do i1=1,nb_msg + LIBPAW_DEALLOCATE(tab_buf_int(i1)%value) + LIBPAW_DEALLOCATE(tab_buf_dp(i1)%value) + LIBPAW_DEALLOCATE(tab_buf_atom(i1)%value) + end do + LIBPAW_DATATYPE_DEALLOCATE(tab_buf_int) + LIBPAW_DATATYPE_DEALLOCATE(tab_buf_dp) + LIBPAW_DATATYPE_DEALLOCATE(tab_buf_atom) + LIBPAW_DEALLOCATE(From) + LIBPAW_DEALLOCATE(request) + LIBPAW_DEALLOCATE(atmtab_send) + LIBPAW_DEALLOCATE(atm_indx_in) + LIBPAW_DEALLOCATE(atm_indx_out) + + end if !algo_option + +!Eventually release temporary pointers + call free_my_atmtab(my_atmtab_in,my_atmtab_in_allocated) + call free_my_atmtab(my_atmtab_out,my_atmtab_out_allocated) + +end subroutine pawrhoij_redistribute +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawrhoij/pawrhoij_io +!! NAME +!! pawrhoij_io +!! +!! FUNCTION +!! IO method for pawrhoij datastructures. +!! +!! INPUTS +!! unitfi=Unit number for IO file or netcdf file handler (already opened in the caller). +!! nsppol_in=Number of independent spin polarizations. Only used for reading. +!! nspinor_in=Number of spinorial components. Only used for reading. +!! nspden_in=Number of spin-density components. only used for reading. +!! nlmn_type(ntypat)= Number of (l,m,n) elements for the paw basis for each type of atom. Only used for reading. +!! typat(natom) =Type of each atom. +!! headform=Format of the abinit header (only used for reading as we need to know how to read +!! the data. Writing is always done using the latest headform. +!! rdwr_mode(len=*)=String defining the IO mode. Possible values (not case sensitive): +!! "W"= For writing to unitfi +!! "R"= For reading from unitfi +!! "E"= For echoing. +!! "D"= for debug +!! [form(len=*)]= String defining the file format. Defaults to Fortran binary mode i.e., "unformatted" +!! Other possible values are (case insensitive): +!! "formatted"=For IO on a file open in formatted mode. +!! "netcdf"=For IO on a netcdf file. +!! [natinc]=Defines the increment in the loop over natom used for echoing the pawrhoij(natom) datastructures. +!! If not specified, only the first and the last atom will be printed. +!! +!! SIDE EFFECTS +!! pawrhoij(:)= rhoij datastructure. +!! if rdwr_mode="W", it will be written on unit unitfi using the file format given by form. +!! if rdwr_mode="R", pawrhoij will be read and initialized from unit unitfi that has been +!! opened with form=form. +!! if rdwr_mode="E", the routines only echoes the content of the structure. +!! +!! SOURCE + +subroutine pawrhoij_io(pawrhoij,unitfi,nsppol_in,nspinor_in,nspden_in,nlmn_type,typat,& +& headform,rdwr_mode,form,natinc,mpi_atmtab) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: unitfi,headform,nspden_in,nspinor_in,nsppol_in + integer,optional,intent(in) :: natinc + character(len=*),intent(in) :: rdwr_mode + character(len=*),optional,intent(in) :: form + integer, intent(in), optional, pointer :: mpi_atmtab(:) +!arrays + integer,intent(in) :: typat(:),nlmn_type(:) + type(pawrhoij_type),intent(inout),target :: pawrhoij(:) + +!Local variables------------------------------- +!scalars + integer,parameter :: fort_formatted=1,fort_binary=2,netcdf_io=3 + integer :: cplex,qphase,i1,i2,iatom,iatom_tot,natom,ispden,bsize,ii,jj,lmn2_size + integer :: nselect,my_cplex,my_cplex_eff,my_qphase,my_natinc,my_natom,my_nspden,ngrhoijmx,size_rhoij2 + integer :: iomode,ncid,natom_id,cplex_id,qphase_id,nspden_id,nsel56_id + integer :: buffer_id,ibuffer_id,ncerr,bsize_id,bufsize_id + logical :: paral_atom + character(len=500) :: msg +!arrays + integer,allocatable :: ibuffer(:),nsel44(:,:),nsel56(:) + integer,pointer :: my_atmtab(:) + real(dp), allocatable :: buffer(:) + real(dp),pointer :: rhoij_tmp(:) + +! ************************************************************************* + + my_natom=SIZE(pawrhoij);if (my_natom==0) return + my_nspden=nspden_in + natom=size(typat) + paral_atom=(my_natom/=natom) + if (present(mpi_atmtab)) then + if (.not.associated(mpi_atmtab)) then + msg='mpi_atmtab not associated (pawrhoij_io)' + LIBPAW_BUG(msg) + end if + my_atmtab=>mpi_atmtab + else if (my_natom/=natom) then + msg='my_natom /=natom, mpi_atmtab should be in argument (pawrhoij_io)' + LIBPAW_BUG(msg) + end if + + iomode = fort_binary + if (PRESENT(form)) then + select case (libpaw_to_upper(form)) + case ("FORMATTED") + iomode = fort_formatted + case ("NETCDF") + iomode = netcdf_io + case default + LIBPAW_ERROR("Wrong form: "//trim(form)) + end select + end if + +#ifndef LIBPAW_HAVE_NETCDF + if (iomode == netcdf_io) then + LIBPAW_ERROR("iomode == netcdf_io but netcdf library is missing.") + end if +#endif + ncid = unitfi + + select case (rdwr_mode(1:1)) + + case ("R","r") ! Reading the Rhoij tab + + if ((headform>=44).and.(headform<56)) then + LIBPAW_ALLOCATE(nsel44,(nspden_in,natom)) + if (iomode == fort_binary) then + read(unitfi ) ((nsel44(ispden,iatom),ispden=1,nspden_in),iatom=1,natom) + else if (iomode == fort_formatted) then + read(unitfi,*) ((nsel44(ispden,iatom),ispden=1,nspden_in),iatom=1,natom) +#ifdef LIBPAW_HAVE_NETCDF + else if (iomode == netcdf_io) then + LIBPAW_ERROR("header in 44-56 not compatible with Netcdf") +#endif + end if + call pawrhoij_alloc(pawrhoij,1,nspden_in,nspinor_in,nsppol_in,typat,lmnsize=nlmn_type) + do iatom=1,natom + pawrhoij(iatom)%nrhoijsel=nsel44(1,iatom) + end do + bsize=sum(nsel44) + LIBPAW_ALLOCATE(ibuffer,(bsize)) + LIBPAW_ALLOCATE(buffer,(bsize)) + if (iomode == fort_binary) then + read(unitfi ) ibuffer(:),buffer(:) + else if (iomode == fort_formatted) then + read(unitfi,*) ibuffer(:),buffer(:) + end if + ii=0 + do iatom=1,natom + nselect=nsel44(1,iatom) + pawrhoij(iatom)%rhoijselect(:)=0 + pawrhoij(iatom)%rhoijselect(1:nselect)=ibuffer(ii+1:ii+nselect) + do ispden=1,nspden_in + pawrhoij(iatom)%rhoijp(1:nselect,ispden)=buffer(ii+1:ii+nselect) + ii=ii+nselect + end do + end do + LIBPAW_DEALLOCATE(ibuffer) + LIBPAW_DEALLOCATE(buffer) + LIBPAW_DEALLOCATE(nsel44) + else if (headform>=56) then + LIBPAW_ALLOCATE(nsel56,(natom)) + my_cplex=1;my_nspden=1;my_qphase=1 + if (headform==56) then + if (iomode == fort_binary) then + read(unitfi ) (nsel56(iatom),iatom=1,natom),my_cplex + else if (iomode == fort_formatted) then + read(unitfi,*) (nsel56(iatom),iatom=1,natom),my_cplex +#ifdef LIBPAW_HAVE_NETCDF + else if (iomode == netcdf_io) then + NCF_CHECK(nf90_inq_dimid(ncid, "pawrhoij_cplex", cplex_id)) + NCF_CHECK(nf90_inquire_dimension(ncid, cplex_id, len=my_cplex)) + + NCF_CHECK(nf90_inq_varid(ncid, "rhoijsel_atoms", nsel56_id)) + NCF_CHECK(nf90_get_var(ncid, nsel56_id, nsel56)) +#endif + end if + else + if (iomode == fort_binary) then + read(unitfi,err=10,end=10) (nsel56(iatom),iatom=1,natom),my_cplex,my_nspden,my_qphase + 10 continue + else if (iomode == fort_formatted) then + read(unitfi,fmt=*,err=11,end=11) (nsel56(iatom),iatom=1,natom),my_cplex,my_nspden,my_qphase + 11 continue +#ifdef LIBPAW_HAVE_NETCDF + else if (iomode == netcdf_io) then + NCF_CHECK(nf90_inq_dimid(ncid, "pawrhoij_cplex", cplex_id)) + NCF_CHECK(nf90_inquire_dimension(ncid, cplex_id, len=my_cplex)) + NCF_CHECK(nf90_inq_dimid(ncid, "pawrhoij_nspden", nspden_id)) + NCF_CHECK(nf90_inquire_dimension(ncid, nspden_id, len=my_nspden)) + NCF_CHECK(nf90_inq_varid(ncid, "nrhoijsel_atoms", nsel56_id)) + NCF_CHECK(nf90_get_var(ncid, nsel56_id, nsel56)) + if (nf90_inq_dimid(ncid, "pawrhoij_qphase", qphase_id)==NF90_NOERR) then + NCF_CHECK(nf90_inquire_dimension(ncid, qphase_id, len=my_qphase)) + else + my_qphase=1 + end if +#endif + end if + end if + call pawrhoij_alloc(pawrhoij,my_cplex,my_nspden,nspinor_in,nsppol_in,typat,& +& lmnsize=nlmn_type,qphase=my_qphase) + do iatom=1,natom + pawrhoij(iatom)%nrhoijsel=nsel56(iatom) + end do + bsize=sum(nsel56) + LIBPAW_ALLOCATE(ibuffer,(bsize)) + LIBPAW_ALLOCATE(buffer,(bsize*my_nspden*my_cplex*my_qphase)) + if (iomode == fort_binary) then + read(unitfi ) ibuffer(:),buffer(:) + else if (iomode == fort_formatted) then + read(unitfi,*) ibuffer(:),buffer(:) +#ifdef LIBPAW_HAVE_NETCDF + else if (iomode == netcdf_io) then + if (bsize > 0) then + NCF_CHECK(nf90_inq_varid(ncid, "rhoijselect_atoms", ibuffer_id)) + NCF_CHECK(nf90_get_var(ncid, ibuffer_id, ibuffer)) + NCF_CHECK(nf90_inq_varid(ncid, "rhoijp_atoms", buffer_id)) + NCF_CHECK(nf90_get_var(ncid, buffer_id, buffer)) + end if +#endif + end if + ii=0;jj=0 + do iatom=1,natom + nselect=nsel56(iatom) + pawrhoij(iatom)%rhoijselect(:)=0 + pawrhoij(iatom)%rhoijselect(1:nselect)=ibuffer(ii+1:ii+nselect) + ii=ii+nselect + do ispden=1,my_nspden + pawrhoij(iatom)%rhoijp(1:my_cplex*my_qphase*nselect,ispden)= & +& buffer(jj+1:jj+my_cplex*my_qphase*nselect) + jj=jj+my_cplex*my_qphase*nselect + end do + end do + LIBPAW_DEALLOCATE(ibuffer) + LIBPAW_DEALLOCATE(buffer) + LIBPAW_DEALLOCATE(nsel56) + end if + + case ("W","w") ! Writing the Rhoij tab (latest format is used) + + LIBPAW_ALLOCATE(nsel56,(natom)) + my_cplex =pawrhoij(1)%cplex_rhoij + my_nspden=pawrhoij(1)%nspden + my_qphase=pawrhoij(1)%qphase + do iatom=1,natom + nsel56(iatom)=pawrhoij(iatom)%nrhoijsel + end do + bsize=sum(nsel56) + + if (iomode == fort_binary) then + write(unitfi ) (nsel56(iatom),iatom=1,natom),my_cplex,my_nspden,my_qphase + else if (iomode == fort_formatted) then + write(unitfi,*) (nsel56(iatom),iatom=1,natom),my_cplex,my_nspden,my_qphase +#ifdef LIBPAW_HAVE_NETCDF + else if (iomode == netcdf_io) then + ncerr = nf90_redef(ncid) + + ! Define dimensions. + ncerr = nf90_inq_dimid(ncid, "number_of_atoms", natom_id) + if (ncerr /= nf90_noerr) then + NCF_CHECK(nf90_def_dim(ncid, "number_of_atoms", natom, natom_id)) + end if + ncerr = nf90_inq_varid(ncid, "nrhoijsel_atoms", nsel56_id) + if (ncerr /= nf90_noerr) then + NCF_CHECK(nf90_def_var(ncid, "nrhoijsel_atoms", NF90_INT, natom_id, nsel56_id)) + end if + ncerr = nf90_inq_dimid(ncid, "pawrhoij_cplex", cplex_id) + if (ncerr /= nf90_noerr) then + NCF_CHECK(nf90_def_dim(ncid, "pawrhoij_cplex", my_cplex, cplex_id)) + end if + ncerr = nf90_inq_dimid(ncid, "pawrhoij_nspden", nspden_id) + if (ncerr /= nf90_noerr) then + NCF_CHECK(nf90_def_dim(ncid, "pawrhoij_nspden", my_nspden, nspden_id)) + end if + ncerr = nf90_inq_dimid(ncid, "pawrhoij_qphase", qphase_id) + if (ncerr /= nf90_noerr) then + NCF_CHECK(nf90_def_dim(ncid, "pawrhoij_qphase", my_qphase, qphase_id)) + end if + if (bsize > 0) then + ncerr = nf90_inq_dimid(ncid, "rhoijselect_atoms_dim", bsize_id) + if (ncerr /= nf90_noerr) then + NCF_CHECK(nf90_def_dim(ncid, "rhoijselect_atoms_dim", bsize, bsize_id)) + end if + ncerr = nf90_inq_dimid(ncid, "rhoijp_atoms_dim", bufsize_id) + if (ncerr /= nf90_noerr) then + NCF_CHECK(nf90_def_dim(ncid, "rhoijp_atoms_dim", bsize*my_nspden*my_qphase*my_cplex, bufsize_id)) + end if + ncerr = nf90_inq_varid(ncid, "rhoijselect_atoms", ibuffer_id) + if (ncerr /= nf90_noerr) then + NCF_CHECK(nf90_def_var(ncid, "rhoijselect_atoms", NF90_INT, bsize_id, ibuffer_id)) + end if + ncerr = nf90_inq_varid(ncid, "rhoijp_atoms", buffer_id) + if (ncerr /= nf90_noerr) then + NCF_CHECK(nf90_def_var(ncid, "rhoijp_atoms", NF90_DOUBLE, bufsize_id, buffer_id)) + end if + else + ! This happens in v5[40] and bsize == 0 corresponds to NC_UNLIMITED + LIBPAW_COMMENT("All rhoij entries are zero. No netcdf entry produced") + end if + + ! Write nsel56 + NCF_CHECK(nf90_enddef(ncid)) + NCF_CHECK(nf90_put_var(ncid, nsel56_id, nsel56)) +#endif + end if + + LIBPAW_ALLOCATE(ibuffer,(bsize)) + LIBPAW_ALLOCATE(buffer,(bsize*my_nspden*my_cplex*my_qphase)) + ii=0;jj=0 + do iatom=1,natom + nselect=nsel56(iatom) + ibuffer(ii+1:ii+nselect)=pawrhoij(iatom)%rhoijselect(1:nselect) + ii=ii+nselect + do ispden=1,my_nspden + buffer(jj+1:jj+my_cplex*my_qphase*nselect)= & +& pawrhoij(iatom)%rhoijp(1:my_cplex*my_qphase*nselect,ispden) + jj=jj+my_cplex*my_qphase*nselect + end do + end do + if (iomode == fort_binary) then + write(unitfi ) ibuffer(:),buffer(:) + else if (iomode == fort_formatted) then + write(unitfi,*) ibuffer(:),buffer(:) +#ifdef LIBPAW_HAVE_NETCDF + else if (iomode == netcdf_io) then + if (bsize > 0) then + NCF_CHECK(nf90_put_var(ncid, ibuffer_id, ibuffer)) + NCF_CHECK(nf90_put_var(ncid, buffer_id, buffer)) + end if +#endif + end if + LIBPAW_DEALLOCATE(ibuffer) + LIBPAW_DEALLOCATE(buffer) + LIBPAW_DEALLOCATE(nsel56) + + case ("E","e") ! Echoing the Rhoij tab + + my_natinc=1; if(natom>1) my_natinc=natom-1 + my_qphase=pawrhoij(1)%qphase + nselect=maxval(pawrhoij(:)%nrhoijsel) + if (PRESENT(natinc)) my_natinc = natinc ! user-defined increment. + LIBPAW_ALLOCATE(ibuffer,(0)) + nselect=maxval(pawrhoij(:)%nrhoijsel) + if (my_qphase==2) then + LIBPAW_POINTER_ALLOCATE(rhoij_tmp,(2*nselect)) + end if + do iatom=1,my_natom,my_natinc + iatom_tot=iatom;if(paral_atom)iatom_tot=my_atmtab(iatom) + my_cplex =pawrhoij(iatom)%cplex_rhoij + my_nspden=pawrhoij(iatom)%nspden + my_qphase=pawrhoij(iatom)%qphase + nselect=pawrhoij(iatom)%nrhoijsel + do ispden=1,pawrhoij(iatom)%nspden + if (my_qphase==1) then + my_cplex_eff=my_cplex + rhoij_tmp => pawrhoij(iatom)%rhoijp(1:my_cplex*nselect,ispden) + else + my_cplex_eff=2 + rhoij_tmp=zero + jj=my_cplex*pawrhoij(iatom)%lmn2_size + if (my_cplex==1) then + do ii=1,nselect + rhoij_tmp(2*ii-1)=pawrhoij(iatom)%rhoijp(ii,ispden) + rhoij_tmp(2*ii )=pawrhoij(iatom)%rhoijp(jj+ii,ispden) + end do + else + do ii=1,nselect + rhoij_tmp(2*ii-1)=pawrhoij(iatom)%rhoijp(2*ii-1,ispden) & + & -pawrhoij(iatom)%rhoijp(jj+2*ii ,ispden) + rhoij_tmp(2*ii )=pawrhoij(iatom)%rhoijp(2*ii ,ispden) & + & +pawrhoij(iatom)%rhoijp(jj+2*ii-1,ispden) + end do + end if + end if + write(unitfi, '(a,i4,a,i1,a)' ) ' rhoij(',iatom_tot,',',ispden,')= (max 12 non-zero components will be written)' + call pawio_print_ij(unitfi,rhoij_tmp,nselect,my_cplex_eff,& +& pawrhoij(iatom)%lmn_size,-1,ibuffer,1,0,& +& pawrhoij(iatom)%rhoijselect,-1.d0,1,& +& opt_sym=2,mode_paral='PERS') + end do ! end nspden do + end do ! end iatom do + LIBPAW_DEALLOCATE(ibuffer) + if (my_qphase==2) then + LIBPAW_POINTER_DEALLOCATE(rhoij_tmp) + end if + + case ("D","d") ! Debug + + write(unitfi,'(a,i4)' ) 'size pawmkrhoij , natom = ' , my_natom + my_natinc=1; if(natom>1) my_natinc=natom-1 + if (PRESENT(natinc)) my_natinc = natinc ! user-defined increment. + LIBPAW_ALLOCATE(ibuffer,(0)) + do iatom=1,my_natom,my_natinc + iatom_tot=iatom;if(paral_atom) iatom_tot=my_atmtab(iatom) + if (iatom_tot/=1) cycle + write(unitfi,'(a,i4,a)' ) ' ******* rhoij (Atom # ',iatom_tot,' ********)' + write(unitfi,'(a,i4,a,i4)' ) 'cplex_rhoij=',pawrhoij(iatom)%cplex_rhoij, ' nselect=', pawrhoij(iatom)%nrhoijsel + write(unitfi,'(a,i4,a,i4)' ) 'nspden=',pawrhoij(iatom)%nspden, ' lmn2size=',pawrhoij(iatom)%lmn2_size + write(unitfi,'(a,i4,a,i4)' ) 'lmnmix=',pawrhoij(iatom)%lmnmix_sz, ' ngrhoij=',pawrhoij(iatom)%ngrhoij + write(unitfi,'(a,i4,a,i4)' ) 'use_rhoijres=',pawrhoij(iatom)%use_rhoijres, & +& 'use_rhoij_=',pawrhoij(iatom)%use_rhoij_ + write(unitfi,'(a,i4,a,i4)' ) 'itypat=',pawrhoij(iatom)%itypat, ' lmn_size=',pawrhoij(iatom)%lmn_size + write(unitfi,'(a,i4,a,i4)' ) 'nsppol=',pawrhoij(iatom)%nsppol, ' nspinor=',pawrhoij(iatom)%nspinor + write(unitfi,'(a,i4)' ) 'qphase=',pawrhoij(iatom)%qphase + cplex=pawrhoij(iatom)%cplex_rhoij + qphase=pawrhoij(iatom)%qphase + lmn2_size=pawrhoij(iatom)%lmn2_size + do i2=1,pawrhoij(iatom)%nrhoijsel + write(unitfi,'(a,i4,a,i4,a,i4,a,f9.5)') 'rhoijselect(,',i2,')=',& +& pawrhoij(iatom)%rhoijselect(i2) + end do + if (pawrhoij(iatom)%ngrhoij>0) then + ngrhoijmx=2; if (pawrhoij(iatom)%ngrhoij0) then + size_rhoij2=size(pawrhoij(iatom)%rhoij_,2) + do ispden=1,size_rhoij2 + do ii=1,qphase + do i2=(ii-1)*cplex*lmn2_size+cplex*lmn2_size,(ii-1)*cplex*lmn2_size+cplex*lmn2_size + write(unitfi,'(a,i4,a,i4,a,f9.5)') ' rhoij_(,',i2,',ispden=',ispden,')=',& +& pawrhoij(iatom)%rhoij_(i2,ispden) + end do + end do + end do + end if + call libpaw_flush(unitfi) + if (pawrhoij(iatom)%lmnmix_sz>0) then + write(unitfi,'(a)') 'kpawmix ' + write(unitfi,'(i4,i4,i4,i4)') pawrhoij(iatom)%kpawmix(:) + end if + call libpaw_flush(unitfi) + end do + + case default + msg='Wrong rdwr_mode'//TRIM(rdwr_mode) + LIBPAW_ERROR(msg) + + end select + +end subroutine pawrhoij_io +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawrhoij/pawrhoij_unpack +!! NAME +!! pawrhoij_unpack +!! +!! FUNCTION +!! Unpack the values store in rhoijp copying them to the rhoij_ array. +!! +!! SIDE EFFECTS +!! rhoij(:) = input/output datastructure +!! * In output the rhoij_ array is filled with the values stored in the packed array rhoijp. +!! * If use_rhoij_/=1, rhoij_ is allocated and the corresponding flag is set to 1. +!! +!! SOURCE + +subroutine pawrhoij_unpack(rhoij) + +!Arguments ------------------------------------ +!scalars +!arrays + type(pawrhoij_type),intent(inout) :: rhoij(:) + +!Local variables------------------------------- + integer :: cplex_rhoij,natom,lmn2_size,nsp2,qphase + integer :: i0,iat,iphase,isel,isppol,klmn + +! ************************************************************************* + + natom = SIZE(rhoij) ; if (natom==0) return + + do iat=1,natom + + lmn2_size =rhoij(iat)%lmn2_size + cplex_rhoij = rhoij(iat)%cplex_rhoij + qphase = rhoij(iat)%qphase + nsp2 = rhoij(iat)%nsppol;if (rhoij(iat)%nspden==4) nsp2=4 + + if (rhoij(iat)%use_rhoij_/=1) then ! Have to allocate rhoij + LIBPAW_ALLOCATE(rhoij(iat)%rhoij_,(cplex_rhoij*qphase*lmn2_size,nsp2)) + rhoij(iat)%use_rhoij_=1 + end if + rhoij(iat)%rhoij_ = zero + + do isppol=1,nsp2 + do iphase=1,qphase + i0=(iphase-1)*lmn2_size*cplex_rhoij + if (cplex_rhoij==1) then + do isel=1,rhoij(iat)%nrhoijsel ! Looping over non-zero ij elements. + klmn = rhoij(iat)%rhoijselect(isel) + rhoij(iat)%rhoij_(i0+klmn,isppol) = rhoij(iat)%rhoijp(i0+isel,isppol) + end do + else + do isel=1,rhoij(iat)%nrhoijsel ! Looping over non-zero ij elements. + klmn = rhoij(iat)%rhoijselect(isel) + rhoij(iat)%rhoij_(i0+2*klmn-1:i0+2*klmn,isppol) = & +& rhoij(iat)%rhoijp(i0+2*isel-1:i0+2*isel,isppol) + end do + end if + end do + end do + + end do ! natom + +end subroutine pawrhoij_unpack +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawrhoij/pawrhoij_init_unpacked +!! NAME +!! pawrhoij_init_unpacked +!! +!! FUNCTION +!! Initialize field of rhoij datastructure for unpacked values (pawrhoij%rhoij_ array) +!! +!! SIDE EFFECTS +!! rhoij(:) = input/output datastructure +!! * In output the rhoij_ array is allocated +!! +!! SOURCE + +subroutine pawrhoij_init_unpacked(rhoij) + +!Arguments ------------------------------------ +!scalars +!arrays + type(pawrhoij_type),intent(inout) :: rhoij(:) + +!Local variables------------------------------- + integer :: cplex_rhoij,iat,lmn2_size,nrhoij,nsp2,qphase + +! ************************************************************************* + + nrhoij=SIZE(rhoij);if (nrhoij==0) return + + do iat=1,nrhoij + + lmn2_size =rhoij(iat)%lmn2_size + cplex_rhoij = rhoij(iat)%cplex_rhoij + qphase = rhoij(iat)%qphase + nsp2 = rhoij(iat)%nsppol;if (rhoij(iat)%nspden==4) nsp2=4 + + if (allocated(rhoij(iat)%rhoij_)) then + LIBPAW_DEALLOCATE(rhoij(iat)%rhoij_) + end if + LIBPAW_ALLOCATE(rhoij(iat)%rhoij_,(cplex_rhoij*qphase*lmn2_size,nsp2)) + rhoij(iat)%use_rhoij_=1 + rhoij(iat)%rhoij_=zero + + end do + +end subroutine pawrhoij_init_unpacked +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawrhoij/pawrhoij_free_unpacked +!! NAME +!! pawrhoij_free_unpacked +!! +!! FUNCTION +!! Destroy field of rhoij datastructure for unpacked values (pawrhoij%rhoij_ array) +!! +!! SIDE EFFECTS +!! rhoij(:) = input/output datastructure +!! * In output the rhoij_ array is deallocated +!! +!! SOURCE + +subroutine pawrhoij_free_unpacked(rhoij) + +!Arguments ------------------------------------ +!scalars +!arrays + type(pawrhoij_type),intent(inout) :: rhoij(:) + +!Local variables------------------------------- + integer :: iat,nrhoij + +! ************************************************************************* + + nrhoij=SIZE(rhoij);if (nrhoij==0) return + + do iat=1,nrhoij + + if (allocated(rhoij(iat)%rhoij_)) then + LIBPAW_DEALLOCATE(rhoij(iat)%rhoij_) + end if + rhoij(iat)%use_rhoij_=0 + + end do + +end subroutine pawrhoij_free_unpacked +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawrhoij/pawrhoij_mpisum_unpacked_1D +!! NAME +!! pawrhoij_mpisum_unpacked_1D +!! +!! FUNCTION +!! Build the MPI sum of the unsymmetrized PAW rhoij_ (augmentation occupancies) +!! Remember:for each atom, rho_ij=Sum_{n,k} {occ(n,k)*} +!! Target: 1D array of pawrhoij datastructures +!! +!! INPUTS +!! comm1=MPI communicator. Data will be MPI summed inside comm1 +!! [comm2]=second MPI communicator. If present, rhoij_ will be +!! MPI summed inside comm2 after the collective sum in comm1. +!! +!! SIDE EFFECTS +!! pawrhoij(:) = paw rhoij occupancies and related data +!! Input: the data calculateed by this processor. +!! Output: the final MPI sum over comm1 and comm2. +!! +!! SOURCE + +subroutine pawrhoij_mpisum_unpacked_1D(pawrhoij,comm1,comm2) + +!Arguments --------------------------------------------- +!scalars + integer,intent(in) :: comm1 + integer,optional,intent(in) :: comm2 +!arrays + type(pawrhoij_type),intent(inout) :: pawrhoij(:) + +!Local variables --------------------------------------- +!scalars + integer :: bufdim,iatom,ierr,isppol,jdim,nsp2,natom + integer :: nproc1,nproc2 + !character(len=500) :: msg +!arrays + integer,allocatable :: dimlmn(:) + real(dp),allocatable :: buffer(:) + +!************************************************************************ + + natom=SIZE(pawrhoij);if (natom==0) return + + nproc1 = xmpi_comm_size(comm1) + nproc2=1; if (PRESENT(comm2)) nproc2 = xmpi_comm_size(comm2) + if (nproc1==1.and.nproc2==1) RETURN + +!Fill the MPI buffer from the local rhoij_ + LIBPAW_ALLOCATE(dimlmn,(natom)) + dimlmn(1:natom)=pawrhoij(1:natom)%cplex_rhoij & +& *pawrhoij(1:natom)%qphase & +& *pawrhoij(1:natom)%lmn2_size + nsp2=pawrhoij(1)%nsppol; if (pawrhoij(1)%nspden==4) nsp2=4 + bufdim=sum(dimlmn)*nsp2 + LIBPAW_ALLOCATE(buffer,(bufdim)) + jdim=0 + do iatom=1,natom + do isppol=1,nsp2 + buffer(jdim+1:jdim+dimlmn(iatom))=pawrhoij(iatom)%rhoij_(:,isppol) + jdim=jdim+dimlmn(iatom) + end do + end do + +!Build sum of pawrhoij%rhoij_ + call xmpi_sum(buffer,comm1,ierr) ! Sum over the first communicator. + if (PRESENT(comm2)) then + call xmpi_sum(buffer,comm2,ierr) ! Sum over the second communicator. + end if + +!Unpack the MPI packet filling rhoij_ + jdim=0 + do iatom=1,natom + do isppol=1,nsp2 + pawrhoij(iatom)%rhoij_(:,isppol)=buffer(jdim+1:jdim+dimlmn(iatom)) + jdim=jdim+dimlmn(iatom) + end do + end do + + LIBPAW_DEALLOCATE(buffer) + LIBPAW_DEALLOCATE(dimlmn) + +end subroutine pawrhoij_mpisum_unpacked_1D +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawrhoij/pawrhoij_mpisum_unpacked_2D +!! NAME +!! pawrhoij_mpisum_unpacked_2D +!! +!! FUNCTION +!! Build the MPI sum of the unsymmetrized PAW rhoij_ (augmentation occupancies) +!! Remember:for each atom, rho_ij=Sum_{n,k} {occ(n,k)*} +!! Target: 2D array of pawrhoij datastructures +!! +!! INPUTS +!! comm1=MPI communicator. Data will be MPI summed inside comm1 +!! [comm2]=second MPI communicator. If present, rhoij_ will be +!! MPI summed inside comm2 after the collective sum in comm1. +!! +!! SIDE EFFECTS +!! pawrhoij(:,:) = paw rhoij occupancies and related data +!! Input: the data calculateed by this processor. +!! Output: the final MPI sum over comm1 and comm2. +!! +!! SOURCE + +subroutine pawrhoij_mpisum_unpacked_2D(pawrhoij,comm1,comm2) + +!Arguments --------------------------------------------- +!scalars + integer,intent(in) :: comm1 + integer,optional,intent(in) :: comm2 +!arrays + type(pawrhoij_type),intent(inout) :: pawrhoij(:,:) + +!Local variables --------------------------------------- +!scalars + integer :: bufdim,iatom,ierr,irhoij,isppol,jdim,nsp2,natom,nrhoij + integer :: nproc1,nproc2 + !character(len=500) :: msg +!arrays + integer,allocatable :: dimlmn(:,:) + real(dp),allocatable :: buffer(:) + +!************************************************************************ + + natom =SIZE(pawrhoij,1);if (natom ==0) return + nrhoij=SIZE(pawrhoij,2);if (nrhoij==0) return + + nproc1 = xmpi_comm_size(comm1) + nproc2=1; if (PRESENT(comm2)) nproc2 = xmpi_comm_size(comm2) + if (nproc1==1.and.nproc2==1) RETURN + +!Fill the MPI buffer from the local rhoij_ + LIBPAW_ALLOCATE(dimlmn,(natom,nrhoij)) + dimlmn(1:natom,1:nrhoij)=pawrhoij(1:natom,1:nrhoij)%cplex_rhoij & +& *pawrhoij(1:natom,1:nrhoij)%qphase & +& *pawrhoij(1:natom,1:nrhoij)%lmn2_size + nsp2=pawrhoij(1,1)%nsppol; if (pawrhoij(1,1)%nspden==4) nsp2=4 + bufdim=sum(dimlmn)*nsp2 + LIBPAW_ALLOCATE(buffer,(bufdim)) + jdim=0 + do irhoij=1,nrhoij + do iatom=1,natom + do isppol=1,nsp2 + buffer(jdim+1:jdim+dimlmn(iatom,irhoij))=pawrhoij(iatom,irhoij)%rhoij_(:,isppol) + jdim=jdim+dimlmn(iatom,irhoij) + end do + end do + end do + +!Build sum of pawrhoij%rhoij_ + call xmpi_sum(buffer,comm1,ierr) ! Sum over the first communicator. + if (PRESENT(comm2)) then + call xmpi_sum(buffer,comm2,ierr) ! Sum over the second communicator. + end if + +!Unpack the MPI packet filling rhoij_ + jdim=0 + do irhoij=1,nrhoij + do iatom=1,natom + do isppol=1,nsp2 + pawrhoij(iatom,irhoij)%rhoij_(:,isppol)=buffer(jdim+1:jdim+dimlmn(iatom,irhoij)) + jdim=jdim+dimlmn(iatom,irhoij) + end do + end do + end do + + LIBPAW_DEALLOCATE(buffer) + LIBPAW_DEALLOCATE(dimlmn) + +end subroutine pawrhoij_mpisum_unpacked_2D +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawrhoij/pawrhoij_filter +!! NAME +!! pawrhoij_filter +!! +!! FUNCTION +!! Filter a "rhoij" array (PAW on-site occupancies), +!! i.e. select only the non-zero elements. +!! +!! INPUT +!! cplex=1 if Rhoij is real, 2 if Rhoij is complex +!! qphase=2 if rhoij has a exp(iqR) phase, 1 if not +!! lmn2_size=dimension of rhoij=number of (i,j) pairs with i<=j +!! nspden=number of rhoij spin components +!! [rhoij_input(cplex*qphase*lmn2_size,nspden)]= -- optional argument-- +!! input values for rhoij (including zero values) +!! If this argument is not provided, that the input values from rhoij() +!! +!! OUTPUT +!! nselect=number of non-zero values of rhoij +!! rhoijselect(lmn2_size)=contains the indices of the selected (i,j) pairs +!! rhoijselect(nselect+1:lmn2_size)=0 +!! +!! SIDE EFFECTS +!! rhoij(cplex*qphase*lmn2_size,nspden)= +!! * Input: the array is filled with all rhoij values (only if rhoij_input is not present) +!! * Output: the nselect first elements contain the non-zero rhoij values, +!! next value are irrelevant +!! +!! SOURCE + +subroutine pawrhoij_filter(rhoij,rhoijselect,nselect,cplex,qphase,lmn2_size,nspden, & +& rhoij_input) ! optional argument + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: lmn2_size,cplex,qphase,nspden + integer,intent(out) :: nselect +!arrays + integer,intent(out) :: rhoijselect(lmn2_size) + real(dp),intent(inout),target :: rhoij(cplex*qphase*lmn2_size,nspden) + real(dp),intent(in),optional,target :: rhoij_input(cplex*qphase*lmn2_size,nspden) + +!Local variables------------------------------- +!scalars + real(dp),parameter :: tol_rhoij=tol10 + integer :: isp,klmn,klmn1,klmn2,nsel1,nsel2 +!arrays + real(dp),pointer :: rhoij_in(:,:) + +! ************************************************************************* + + nselect=0 + rhoijselect(:)=0 + + if (present(rhoij_input)) then + rhoij_in => rhoij_input + else + rhoij_in => rhoij + end if + +!Treat each cplex/qphase case separately + + if (cplex==1) then + + if (qphase==1) then + + do klmn=1,lmn2_size + if (any(abs(rhoij_in(klmn,:))>tol_rhoij)) then + nselect=nselect+1 + rhoijselect(nselect)=klmn + do isp=1,nspden + rhoij(nselect,isp)=rhoij_in(klmn,isp) + end do + end if + end do + + else if (qphase==2) then + + do klmn=1,lmn2_size + klmn2=klmn+lmn2_size + if (any(abs(rhoij_in(klmn,:))>tol_rhoij).or. & +& any(abs(rhoij_in(klmn2,:))>tol_rhoij)) then + nselect=nselect+1 ; nsel2=nselect+lmn2_size + rhoijselect(nselect)=klmn + do isp=1,nspden + rhoij(nselect,isp)=rhoij_in(klmn ,isp) + rhoij(nsel2 ,isp)=rhoij_in(klmn2,isp) + end do + end if + end do + + end if + + else ! cplex=2 + + if (qphase==1) then + do klmn=1,lmn2_size + klmn1=2*klmn + if (any(abs(rhoij_in(klmn1-1:klmn1,:))>tol_rhoij)) then + nselect=nselect+1 ; nsel1=2*nselect + rhoijselect(nselect)=klmn + do isp=1,nspden + rhoij(nsel1-1,isp)=rhoij_in(klmn1-1,isp) + rhoij(nsel1 ,isp)=rhoij_in(klmn1 ,isp) + end do + end if + end do + + else if (qphase==2) then + + do klmn=1,lmn2_size + klmn1=2*klmn ; klmn2=klmn1+lmn2_size + if (any(abs(rhoij_in(klmn1-1:klmn1,:))>tol_rhoij).or. & +& any(abs(rhoij_in(klmn2-1:klmn2,:))>tol_rhoij)) then + nselect=nselect+1 ; nsel1=2*nselect ; nsel2=nsel1+lmn2_size + rhoijselect(nselect)=klmn + do isp=1,nspden + rhoij(nsel1-1,isp)=rhoij_in(klmn1-1,isp) + rhoij(nsel1 ,isp)=rhoij_in(klmn1 ,isp) + rhoij(nsel2-1,isp)=rhoij_in(klmn2-1,isp) + rhoij(nsel2 ,isp)=rhoij_in(klmn2 ,isp) + end do + end if + end do + + end if + endif + +end subroutine pawrhoij_filter +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawrhoij/pawrhoij_inquire_dim +!! NAME +!! pawrhoij_inquire_dim +!! +!! FUNCTION +!! Compute the values f the dimensions (cplex_rhoij, qphase, nspden) for a pawrhoij datastructure. +!! These ones depend on the parameters of the calculation +!! +!! INPUTS +!! [cplex]= flag controlling the use of a exp(iqR) phase. 1=no phase, 2=phase +!! [cpxocc]= 2 if rhoij is required to be imaginary +!! [nspden]= number of spin-density components +!! [qpt(3)]= q-vector, if any +!! [spnorb]= flag: 1 if spin-orbit coupling is activated +!! +!! OUTPUT +!! [cplex_rhoij] = value of cplex_rhoij associated to pawrhoij +!! [qphase_rhoij]= value of qphase associated to pawrhoij +!! [nspden_rhoij]= value of nspden associated to pawrhoij +!! +!! SOURCE + +subroutine pawrhoij_inquire_dim(cplex,cpxocc,nspden,qpt,spnorb, & +& cplex_rhoij,qphase_rhoij,nspden_rhoij) + +!Arguments --------------------------------------------- +!scalars + integer,optional,intent(in) :: cplex,cpxocc,nspden,spnorb + integer,optional,intent(out) :: cplex_rhoij,qphase_rhoij,nspden_rhoij +!arrays + real(dp),optional,intent(in) :: qpt(3) + +!Local variables --------------------------------------- + character(len=100) :: msg + +!************************************************************************ + +!cplex_rhoij + if (present(cplex_rhoij)) then + cplex_rhoij=1 + if (present(cpxocc)) cplex_rhoij=max(cplex_rhoij,cpxocc) + end if + +!qphase_rhoij + if (present(qphase_rhoij)) then + qphase_rhoij=1 + if (present(cplex).and.present(qpt)) then + msg='only one argument cplex or qpt should be passed!' + LIBPAW_BUG(msg) + end if + if (present(cplex)) qphase_rhoij=merge(1,2,cplex==1) + if (present(qpt)) then + if (any(abs(qpt(:))>tol8)) qphase_rhoij=2 + end if + end if + +!nspden_rhoij + if (present(nspden_rhoij)) then + nspden_rhoij=1 + if (present(nspden)) nspden_rhoij=nspden + if (present(spnorb)) nspden_rhoij=merge(nspden_rhoij,4,spnorb<=0) + end if + +end subroutine pawrhoij_inquire_dim +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawdij/pawrhoij_print_rhoij +!! NAME +!! pawrhoij_print_rhoij +!! +!! FUNCTION +!! Print out the content of a Rho_ij matrix (occupation matrix) in a suitable format +!! +!! INPUTS +!! rhoij(cplex*lmn2_size,nspden)= input matrix to be printed +!! cplex=1 if Rhoij is real, 2 if Rhoij is complex +!! qphase=2 if rhoij has a exp(iqR) phase, 1 if not +!! iatom=current atom +!! natom=total number of atoms in the system +!! [opt_prtvol]= >=0 if up to 12 components of _ij matrix have to be printed +!! <0 if all components of ij_ matrix have to be printed (optional) +!! [mode_paral]= parallel printing mode (optional, default='COLL') +! [rhoijselect(lmn2_size)]=Indirect array selecting the non-zero elements of rhoij +!! [test_value]=(real number) if positive, print a warning when the magnitude of Dij is greater (optional) +!! [l_only]=if >=0 only parts of rhoij corresponding to li=l_only are printed (optional); +!! Needs indlmn(:,:) optional argument. +!! [title_msg]=message to print as title (optional) +!! [unit]=the unit number for output (optional) +!! [indlmn(6,lmn_size)]= array giving l,m,n,lm,ln,s +!! +!! OUTPUT +!! (Only writing) +!! +!! NOTES +!! +!! SOURCE + +subroutine pawrhoij_print_rhoij(rhoij,cplex,qphase,iatom,natom,& +& rhoijselect,test_value,title_msg,unit,opt_prtvol,& +& l_only,indlmn,mode_paral) ! Optional arguments + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: cplex,qphase,iatom,natom + integer,optional,intent(in) :: opt_prtvol,l_only,unit + real(dp),intent(in),optional :: test_value + character(len=4),optional,intent(in) :: mode_paral + character(len=100),optional,intent(in) :: title_msg +!arrays + integer,optional,intent(in) :: indlmn(:,:) + integer,optional,intent(in),target :: rhoijselect(:) + real(dp),intent(in),target :: rhoij(:,:) + +!Local variables------------------------------- +!scalars + character(len=8),parameter :: dspin(6)=(/"up ","down ","dens (n)","magn (x)","magn (y)","magn (z)"/) + integer :: irhoij,kk,my_cplex,my_lmn_size,my_lmn2_size,my_l_only,my_nspden + integer :: my_opt_pack,my_opt_sym,my_prtvol,my_unt,nrhoijsel,rhoij_size + real(dp) :: my_test_value,test_value_eff + character(len=4) :: my_mode + character(len=2000) :: msg +!arrays + integer,target :: idum(0) + integer,pointer :: l_index(:),my_rhoijselect(:) + real(dp),pointer :: rhoij_(:) + +! ************************************************************************* + +!Optional arguments + my_unt =std_out ; if (PRESENT(unit )) my_unt =unit + my_mode ='COLL' ; if (PRESENT(mode_paral)) my_mode =mode_paral + my_prtvol=1 ; if (PRESENT(opt_prtvol)) my_prtvol=opt_prtvol + my_test_value=-one; if (PRESENT(test_value)) my_test_value=test_value + my_l_only=-1 ; if (PRESENT(l_only)) my_l_only=l_only + + if (my_l_only>=0.and.(.not.present(indlmn))) then + msg='pawrhoij_print_rhoij: l_only>=0 and indlmn not present!' + LIBPAW_BUG(msg) + end if + +!Title + if (present(title_msg)) then + if (trim(title_msg)/='') then + write(msg, '(2a)') ch10,trim(title_msg) + call wrtout(my_unt,msg,my_mode) + end if + end if + +!Inits + my_nspden=size(rhoij,2) + my_lmn2_size=size(rhoij,1)/cplex/qphase + my_lmn_size=int(dsqrt(two*dble(my_lmn2_size))) + my_cplex=merge(cplex,2,qphase==1) + my_opt_sym=2 + +!Packed storage + my_opt_pack=0 + rhoij_size=my_lmn2_size + my_rhoijselect => idum + if (PRESENT(rhoijselect)) then + nrhoijsel=count(rhoijselect(:)>0) + if (nrhoijsel>0) then + my_opt_pack=1 + rhoij_size=nrhoijsel + my_rhoijselect => rhoijselect(1:nrhoijsel) + end if + end if + + if (my_l_only<0) then + l_index => idum + else + LIBPAW_POINTER_ALLOCATE(l_index,(my_lmn_size)) + do kk=1,my_lmn_size + l_index(kk)=indlmn(1,kk) + end do + end if + + if (qphase==2) then + LIBPAW_DATATYPE_ALLOCATE(rhoij_,(2*rhoij_size)) + end if + +! === Loop over Rho_ij components === + do irhoij=1,my_nspden + + !Rebuild rhoij according to qphase + if (qphase==1) then + rhoij_ => rhoij(1:cplex*rhoij_size,irhoij) + else + if (cplex==1) then + do kk=1,rhoij_size + rhoij_(2*kk-1)=rhoij(kk,irhoij) + rhoij_(2*kk )=rhoij(kk+my_lmn2_size,irhoij) + end do + else + do kk=1,rhoij_size + rhoij_(2*kk-1)=rhoij(2*kk-1,irhoij)-rhoij(2*kk +2*my_lmn2_size,irhoij) + rhoij_(2*kk )=rhoij(2*kk ,irhoij)+rhoij(2*kk-1+2*my_lmn2_size,irhoij) + end do + end if + end if + + !Subtitle + if (natom>1.or.my_nspden>1) then + if (my_l_only<0) then + if (my_nspden==1) write(msg,'(a,i3)') ' Atom #',iatom + if (my_nspden==2) write(msg,'(a,i3,a,i1)')' Atom #',iatom,' - Spin component ',irhoij + if (my_nspden==4) write(msg,'(a,i3,2a)') ' Atom #',iatom,' - Component ',trim(dspin(irhoij+2*(my_nspden/4))) + else + if (my_nspden==1) write(msg,'(a,i3,a,i1,a)') ' Atom #',iatom,& +& ' - L=',my_l_only,' ONLY' + if (my_nspden==2) write(msg,'(a,i3,a,i1,a,i1)')' Atom #',iatom,& +& ' - L=',my_l_only,' ONLY - Spin component ',irhoij + if (my_nspden==4) write(msg,'(a,i3,a,i1,3a)') ' Atom #',iatom,& +& ' - L=',my_l_only,' ONLY - Component ',trim(dspin(irhoij+2*(my_nspden/4))) + end if + call wrtout(my_unt,msg,my_mode) + else if (my_l_only>=0) then + write(msg,'(a,i1,a)') ' L=',my_l_only,' ONLY' + call wrtout(my_unt,msg,my_mode) + end if + + !Printing + test_value_eff=-one;if(my_test_value>zero.and.irhoij==1) test_value_eff=my_test_value + call pawio_print_ij(my_unt,rhoij_,rhoij_size,my_cplex,my_lmn_size,my_l_only,l_index,my_opt_pack,& +& my_prtvol,my_rhoijselect,test_value_eff,1,opt_sym=my_opt_sym,& +& mode_paral=my_mode) + + end do !irhoij + + if (qphase==2) then + LIBPAW_DATATYPE_DEALLOCATE(rhoij_) + end if + if (my_l_only>=0) then + LIBPAW_POINTER_DEALLOCATE(l_index) + end if + +end subroutine pawrhoij_print_rhoij +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawrhoij/pawrhoij_symrhoij +!! NAME +!! pawrhoij_symrhoij +!! +!! FUNCTION +!! Symmetrize rhoij quantities (augmentation occupancies) and/or gradients +!! Compute also rhoij residuals (new-old values of rhoij and gradients) +!! +!! INPUTS +!! choice=select then type of rhoij gradients to symmetrize. +!! choice=1 => no gradient +!! choice=2 => gradient with respect to atomic position(s) +!! =3 => a gradient with respect to strain(s) +!! =4 => 2nd gradient with respect to atomic position(s) +!! =23=> a gradient with respect to atm. pos. and strain(s) +!! =24=> 1st and 2nd gradient with respect to atomic position(s) +!! gprimd(3,3)=dimensional primitive translations for reciprocal space(bohr^-1). +!! indsym(4,nsym,natom)=indirect indexing array for atom labels +!! ipert=index of perturbation if pawrhoij is a pertubed rhoij +!! no meaning for ground-state calculations (should be 0) +!! [mpi_atmtab(:)]=--optional-- indexes of the atoms treated by current proc +!! [comm_atom]=--optional-- MPI communicator over atoms +!! natom=number of atoms in cell +!! nsym=number of symmetry elements in space group +!! ntypat=number of types of atoms in unit cell. +!! optrhoij= 1 if rhoij quantities have to be symmetrized +!! pawrhoij_unsym(:) = datastructure containing PAW rhoij occupancies +!! (and related data) non symmetrized in an unpacked storage (pawrhoij_unsym%rhoij_) +!! Contains eventually unsymmetrized rhoij gradients (grhoij) +!! pawang =angular mesh discretization and related data +!! pawprtvol=control print volume and debugging output for PAW +!! Note: if pawprtvol=-10001, nothing is printed out +!! pawtab(ntypat) =paw tabulated starting data +!! [qphon(3)]=--optional-- (RF calculations only) - wavevector of the phonon +!! rprimd(3,3)=real space primitive translations. +!! symafm(nsym)=(anti)ferromagnetic part of symmetry operations +!! symrec(3,3,nsym)=symmetries of group in terms of operations on +!! reciprocal space primitive translations +!! typat(natom)=type for each atom +!! [use_zeromag]=--optional-- .TRUE. if rhoij "magnetization" is enforced to be zero +!! Applies only when nspden_rhoij=4 (note: only the real part is set to zero) +!! +!! OUTPUT +!! +!! SIDE EFFECTS +!! pawrhoij(natom) = datastructure containing PAW rhoij occupancies +!! (and related data) SYMMETRIZED in a packed storage (pawrhoij%rhoijp). +!! if (optrhoij==1) +!! pawrhoij(natom)%nrhoijsel=number of non-zero values of rhoij +!! pawrhoij(natom)%rhoijp(:,:)=symetrized paw rhoij quantities in PACKED STORAGE (only non-zero values) +!! pawrhoij(natom)%rhoijres(:,:)=paw rhoij quantities residuals (new values - old values) +!! pawrhoij(natom)%rhoijselect(:)=select the non-zero values of rhoij!! +!! if (pawrhoij(:)%ngrhoij>0) (equivalent to choice>1) +!! pawrhoij(natom)%grhoij(:,:)=symetrized gradients of rhoij +!! +!! NOTES +!! pawrhoij and pawrhoij_unsym can be identical (refer to the same pawrhoij datastructure). +!! They should be different only if pawrhoij is distributed over atomic sites +!! (in that case pawrhoij_unsym should not be distributed over atomic sites). +!! +!! SOURCE + +subroutine pawrhoij_symrhoij(pawrhoij,pawrhoij_unsym,choice,gprimd,indsym,ipert,natom,nsym,& +& ntypat,optrhoij,pawang,pawprtvol,pawtab,rprimd,symafm,symrec,typat, & +& mpi_atmtab,comm_atom,qphon,use_zeromag) ! optional arguments (parallelism) + +!Arguments --------------------------------------------- +!scalars + integer,intent(in) :: choice,ipert,natom,nsym,ntypat,optrhoij,pawprtvol + integer,optional,intent(in) :: comm_atom + logical,optional,intent(in) :: use_zeromag + type(pawang_type),intent(in) :: pawang +!arrays + integer,intent(in) :: indsym(4,nsym,natom) + integer,optional,target,intent(in) :: mpi_atmtab(:) + integer,intent(in) :: symafm(nsym),symrec(3,3,nsym),typat(natom) + real(dp),intent(in) :: gprimd(3,3),rprimd(3,3) + real(dp),intent(in),optional :: qphon(3) + type(pawrhoij_type),intent(inout) :: pawrhoij(:) + type(pawrhoij_type),target,intent(inout) :: pawrhoij_unsym(:) + type(pawtab_type),target,intent(in) :: pawtab(ntypat) + +!Local variables --------------------------------------- +!scalars + integer :: at_indx,cplex_eff,cplex_rhoij,iafm,iatm,iatom,il,il0,ilmn,iln,iln0,ilpm,indexi + integer :: indexii,indexj,indexjj,indexjj0,indexk,indexkc,indexkc_q,iplex,iq,iq0 + integer :: irhoij,irot,ishift2,ishift3,ishift4,ispden,itypat + integer :: j0lmn,jl,jl0,jlmn,jln,jln0,jlpm,jrhoij,jspden,klmn,klmn1,klmn1q,kspden + integer :: lmn_size,lmn2_size,mi,mj,my_comm_atom,mu,mua,mub,mushift + integer :: natinc,ngrhoij,nrhoij,nrhoij1,nrhoij_unsym + integer :: nselect,nu,nushift,qphase,sz1,sz2 + logical,parameter :: afm_noncoll=.true. ! TRUE if antiferro symmetries are used with non-collinear magnetism + logical :: use_zeromag_ + real(dp) :: arg,factafm,ro,syma,zarot2 + logical :: antiferro,has_qphase,my_atmtab_allocated,noncoll + logical :: paral_atom,paral_atom_unsym,use_afm,use_res + character(len=8) :: pertstrg,wrt_mode + character(len=500) :: msg +!arrays + integer,parameter :: alpha(6)=(/1,2,3,3,3,2/),beta(6)=(/1,2,3,2,1,1/) + integer :: nsym_used(2) + integer, pointer :: indlmn(:,:) + integer,pointer :: my_atmtab(:) + real(dp) :: fact(2),factsym(2),phase(2),rhoijc(2),rotmag(2,3,2),rotrho(2,2,2) + real(dp) :: summag(2,3,2),sumrho(2,2,2),sum1(2),work1(2,3,3),xsym(3) + real(dp),allocatable :: rotgr(:,:,:,:),rotmaggr(:,:,:,:),sumgr(:,:,:),summaggr(:,:,:,:) + real(dp),allocatable :: symrec_cart(:,:,:) + real(dp),pointer :: grad(:,:,:) + type(coeff3_type),target,allocatable :: tmp_grhoij(:) + type(pawrhoij_type),pointer :: pawrhoij_unsym_all(:) + +! ********************************************************************* + +!Sizes of pawrhoij datastructures + nrhoij=size(pawrhoij) + nrhoij_unsym=size(pawrhoij_unsym) + +!Set up parallelism over atoms + paral_atom=(present(comm_atom).and.(nrhoij/=natom)) + paral_atom_unsym=(present(comm_atom).and.(nrhoij_unsym/=natom)) + nullify(my_atmtab);if (present(mpi_atmtab)) my_atmtab => mpi_atmtab + my_comm_atom=xmpi_comm_self;if (present(comm_atom)) my_comm_atom=comm_atom + call get_my_atmtab(my_comm_atom,my_atmtab,my_atmtab_allocated,paral_atom,natom) + +!Test: consistency between choice and ngrhoij + ngrhoij=0 + if (nrhoij>0) then + ngrhoij=pawrhoij(1)%ngrhoij + if(choice==2) ngrhoij=min(3,pawrhoij(1)%ngrhoij) + if(choice==3.or.choice==4) ngrhoij=min(6,pawrhoij(1)%ngrhoij) + if(choice==23.or.choice==24) ngrhoij=min(9,pawrhoij(1)%ngrhoij) + if ((choice==1.and.ngrhoij/=0).or.(choice==2.and.ngrhoij/=3).or. & +& (choice==3.and.ngrhoij/=6).or.(choice==23.and.ngrhoij/=9).or. & +& (choice==4.and.ngrhoij/=6).or.(choice==24.and.ngrhoij/=9) ) then + msg='Inconsistency between variables choice and ngrhoij !' + LIBPAW_BUG(msg) + end if + end if + +!Antiferro case ? + antiferro=.false.;if (nrhoij>0) antiferro=(pawrhoij(1)%nspden==2.and.pawrhoij(1)%nsppol==1) +!Non-collinear case + noncoll=.false.;if (nrhoij>0) noncoll=(pawrhoij(1)%nspden==4) +!Do we use antiferro symmetries ? + use_afm=((antiferro).or.(noncoll.and.afm_noncoll)) +!Do we impose zero magnetization? + use_zeromag_=.false. ; if (present(use_zeromag)) use_zeromag_=use_zeromag + +! Does not symmetrize imaginary part for GS calculations + cplex_eff=1 + if (nrhoij>0.and.(ipert>0.or.antiferro.or.noncoll)) cplex_eff=pawrhoij(1)%cplex_rhoij + +!Do we have a phase due to q-vector? + has_qphase=.false. + if (nrhoij>0) then + has_qphase=(pawrhoij(1)%qphase==2) + if (present(qphon)) then + if (any(abs(qphon(1:3))>tol8).and.(.not.has_qphase)) then + msg='Should have qphase=2 for a non-zero q!' + LIBPAW_BUG(msg) + end if + end if + end if + +!Printing of unsymetrized Rhoij + if (nrhoij>0.and.optrhoij==1.and.pawprtvol/=-10001) then + wrt_mode='COLL';if (paral_atom) wrt_mode='PERS' + pertstrg="RHOIJ";if (ipert>0) pertstrg="RHOIJ(1)" + natinc=1;if(nrhoij>1.and.pawprtvol>=0) natinc=nrhoij-1 + write(msg, '(7a)') ch10," PAW TEST:",ch10,& +& ' ========= Values of ',trim(pertstrg),' before symetrization =========',ch10 + call wrtout(std_out,msg,wrt_mode) + do iatm=1,nrhoij,natinc + iatom=iatm; if (paral_atom) iatom=my_atmtab(iatm) + if (nrhoij==1.and.ipert>0.and.ipert<=natom) iatom=ipert + call pawrhoij_print_rhoij(pawrhoij_unsym(iatm)%rhoij_,pawrhoij_unsym(iatm)%cplex_rhoij,& +& pawrhoij_unsym(iatm)%qphase,iatom,natom,& +& unit=std_out,opt_prtvol=pawprtvol,mode_paral=wrt_mode) + end do + call wrtout(std_out,"",wrt_mode) + end if + +!Symetrization occurs only when nsym>1 + if (nsym>1) then + +! Symetrization of gradients not compatible with nspden=4 + if (nrhoij>0) then + if (choice>2.and.pawrhoij(1)%nspden==4) then + msg='For the time being, choice>2 is not compatible with nspden=4 !' + LIBPAW_BUG(msg) + end if + end if + +! Symetry matrixes must be in memory + if (pawang%nsym==0) then + msg='pawang%zarot must be allocated !' + LIBPAW_BUG(msg) + end if + + if (has_qphase.and.choice>1) then + msg='choice>1 not compatible with q-phase !' + LIBPAW_BUG(msg) + end if + +! Several inits/allocations + if (noncoll) then + LIBPAW_ALLOCATE(symrec_cart,(3,3,nsym)) + do irot=1,nsym + symrec_cart(:,:,irot)=symrhoij_symcart(gprimd,rprimd,symrec(:,:,irot)) + end do + end if + ishift2=0;ishift3=0;ishift4=0 + if (choice>1) then + iafm=merge(2,1,antiferro) + qphase=merge(2,1,has_qphase) + LIBPAW_ALLOCATE(sumgr,(cplex_eff,ngrhoij,qphase)) + LIBPAW_ALLOCATE(rotgr,(cplex_eff,ngrhoij,iafm,qphase)) + if (noncoll) then + LIBPAW_ALLOCATE(summaggr,(cplex_eff,ngrhoij,3,qphase)) + LIBPAW_ALLOCATE(rotmaggr,(cplex_eff,ngrhoij,3,qphase)) + end if + if (choice==23) ishift2=6 + if (choice==24) ishift4=3 + if (.not.paral_atom_unsym) then +! Have to make a temporary copy of grhoij + LIBPAW_DATATYPE_ALLOCATE(tmp_grhoij,(nrhoij)) + do iatm=1,nrhoij + sz1=pawrhoij_unsym(iatm)%cplex_rhoij*pawrhoij_unsym(iatm)%qphase & +& *pawrhoij_unsym(iatm)%lmn2_size + sz2=pawrhoij_unsym(iatm)%nspden + LIBPAW_ALLOCATE(tmp_grhoij(iatm)%value,(ngrhoij,sz1,sz2)) + tmp_grhoij(iatm)%value(1:ngrhoij,1:sz1,1:sz2)= & +& pawrhoij_unsym(iatm)%grhoij(1:ngrhoij,1:sz1,1:sz2) + end do + end if + end if + +! In case of paw_rhoij_unsym distributed over atomic sites, gather it + if (paral_atom_unsym) then + LIBPAW_DATATYPE_ALLOCATE(pawrhoij_unsym_all,(natom)) + call pawrhoij_nullify(pawrhoij_unsym_all) + call pawrhoij_gather(pawrhoij_unsym,pawrhoij_unsym_all,-1,my_comm_atom,& +& with_lmnmix=.false.,with_rhoijp=.false.,& +& with_rhoijres=.false.,with_grhoij=(choice>1)) + nrhoij1=natom + else + pawrhoij_unsym_all=>pawrhoij_unsym + nrhoij1=nrhoij_unsym + end if + + +! Loops over atoms and spin components +! ------------------------------------ + do iatm=1,nrhoij + iatom=iatm;if (paral_atom) iatom=my_atmtab(iatm) + if (nrhoij==1.and.ipert>0.and.ipert<=natom.and.(.not.paral_atom)) iatom=ipert + itypat=typat(iatom) + lmn_size=pawrhoij(iatm)%lmn_size + lmn2_size=pawrhoij(iatm)%lmn2_size + qphase=pawrhoij(iatm)%qphase + cplex_rhoij=pawrhoij(iatm)%cplex_rhoij + cplex_eff=1;if (ipert>0.or.antiferro.or.noncoll) cplex_eff=cplex_rhoij + use_res=(pawrhoij(iatm)%use_rhoijres>0) + indlmn => pawtab(itypat)%indlmn + + nselect=0 + do ispden=1,pawrhoij(iatm)%nsppol + jspden=min(3-ispden,pawrhoij(iatm)%nsppol) + +! Store old -rhoij in residual + if (optrhoij==1.and.use_res) then + pawrhoij(iatm)%rhoijres(:,ispden)=zero + if (noncoll) pawrhoij(iatm)%rhoijres(:,2:4)=zero + if (antiferro) pawrhoij(iatm)%rhoijres(:,2)=zero + do iq=1,qphase + iq0=(iq-1)*cplex_rhoij*lmn2_size + if (cplex_rhoij==1) then + do irhoij=1,pawrhoij(iatm)%nrhoijsel + klmn1=iq0+pawrhoij(iatm)%rhoijselect(irhoij);jrhoij=iq0+irhoij + pawrhoij(iatm)%rhoijres(klmn1,ispden)=-pawrhoij(iatm)%rhoijp(jrhoij,ispden) + end do + else + do irhoij=1,pawrhoij(iatm)%nrhoijsel + klmn1=iq0+2*pawrhoij(iatm)%rhoijselect(irhoij);jrhoij=iq0+2*irhoij + pawrhoij(iatm)%rhoijres(klmn1-1:klmn1,ispden)=-pawrhoij(iatm)%rhoijp(jrhoij-1:jrhoij,ispden) + end do + end if + if (noncoll) then + if (cplex_rhoij==1) then + do mu=2,4 + do irhoij=1,pawrhoij(iatm)%nrhoijsel + klmn1=iq0+pawrhoij(iatm)%rhoijselect(irhoij);jrhoij=iq0+irhoij + pawrhoij(iatm)%rhoijres(klmn1,mu)=-pawrhoij(iatm)%rhoijp(jrhoij,mu) + end do + end do + else + do mu=2,4 + do irhoij=1,pawrhoij(iatm)%nrhoijsel + klmn1=iq0+2*pawrhoij(iatm)%rhoijselect(irhoij);jrhoij=iq0+2*irhoij + pawrhoij(iatm)%rhoijres(klmn1-1:klmn1,mu)=-pawrhoij(iatm)%rhoijp(jrhoij-1:jrhoij,mu) + end do + end do + end if + end if + if (antiferro) then + if (cplex_rhoij==1) then + do irhoij=1,pawrhoij(iatm)%nrhoijsel + klmn1=iq0+pawrhoij(iatm)%rhoijselect(irhoij);jrhoij=iq0+irhoij + pawrhoij(iatm)%rhoijres(klmn1,2)=-pawrhoij(iatm)%rhoijp(jrhoij,2) + end do + else + do irhoij=1,pawrhoij(iatm)%nrhoijsel + klmn1=iq0+2*pawrhoij(iatm)%rhoijselect(irhoij);jrhoij=iq0+2*irhoij + pawrhoij(iatm)%rhoijres(klmn1-1:klmn1,2)=-pawrhoij(iatm)%rhoijp(jrhoij-1:jrhoij,2) + end do + end if + end if + end do + end if + + +! Loops over (il,im) and (jl,jm) +! ------------------------------ + jl0=-1;jln0=-1;indexj=1 + do jlmn=1,lmn_size + jl=indlmn(1,jlmn) + jlpm=1+jl+indlmn(2,jlmn) + jln=indlmn(5,jlmn) + if (jln/=jln0) indexj=indexj+2*jl0+1 + j0lmn=jlmn*(jlmn-1)/2 + il0=-1;iln0=-1;indexi=1 + do ilmn=1,jlmn + il=indlmn(1,ilmn) + ilpm=1+il+indlmn(2,ilmn) + iln=indlmn(5,ilmn) + if (iln/=iln0) indexi=indexi+2*il0+1 + klmn=j0lmn+ilmn + klmn1=merge(klmn,2*klmn-1,cplex_rhoij==1) + + nsym_used(:)=0 + if (optrhoij==1) rotrho=zero + if (optrhoij==1.and.noncoll) rotmag=zero + if (choice>1) rotgr=zero + if (choice>1.and.noncoll) rotmaggr=zero + + +! Loop over symmetries +! -------------------- + do irot=1,nsym + + if ((symafm(irot)/=1).and.(.not.use_afm)) cycle + kspden=ispden;if (symafm(irot)==-1) kspden=jspden + iafm=1;if ((antiferro).and.(symafm(irot)==-1)) iafm=2 + factafm=dble(symafm(irot)) + + nsym_used(iafm)=nsym_used(iafm)+1 + at_indx=min(indsym(4,irot,iatom),nrhoij1) + + if (has_qphase) then + arg=two_pi*(qphon(1)*indsym(1,irot,iatom)+qphon(2)*indsym(2,irot,iatom) & +& +qphon(3)*indsym(3,irot,iatom)) + phase(1)=cos(arg);phase(2)=sin(arg) + end if + + if (optrhoij==1) sumrho=zero + if (optrhoij==1.and.noncoll) summag=zero + if (choice>1) sumgr=zero + if (choice>1.and.noncoll) summaggr=zero + + if (choice>1) then + if (paral_atom_unsym) then + grad => pawrhoij_unsym_all(at_indx)%grhoij + else + grad => tmp_grhoij(at_indx)%value + end if + end if + + +! Accumulate values over (mi,mj) +! ------------------------------ + do mj=1,2*jl+1 + indexjj=indexj+mj;indexjj0=indexjj*(indexjj-1)/2 + do mi=1,2*il+1 + factsym(:)=one + indexii=indexi+mi + if (indexii<=indexjj) then + indexk=indexjj0+indexii + factsym(2)=one + else + indexk=indexii*(indexii-1)/2+indexjj + factsym(2)=-one + end if + indexkc=cplex_rhoij*(indexk-1) + indexkc_q=indexkc+cplex_rhoij*lmn2_size + +! Be careful: use here R_rel^-1 in term of spherical harmonics +! which is tR_rec in term of spherical harmonics +! so, use transpose[zarot] + zarot2=pawang%zarot(mi,ilpm,il+1,irot)*pawang%zarot(mj,jlpm,jl+1,irot) +! zarot2=pawang%zarot(ilpm,mi,il+1,irot)*pawang%zarot(jlpm,mj,jl+1,irot) + +! Rotate rhoij + if (optrhoij==1) then + fact(1)=factsym(1);fact(2)=factsym(2)*factafm !????? What? MT + sumrho(1:cplex_eff,iafm,1)=sumrho(1:cplex_eff,iafm,1) & +& +fact(1:cplex_eff)*zarot2 & +& *pawrhoij_unsym_all(at_indx)%rhoij_(indexkc+1:indexkc+cplex_eff,kspden) + if (qphase==2) & +& sumrho(1:cplex_eff,iafm,2)=sumrho(1:cplex_eff,iafm,2) & +& +fact(1:cplex_eff)*zarot2 & +& *pawrhoij_unsym_all(at_indx)%rhoij_(indexkc_q+1:indexkc_q+cplex_eff,kspden) + end if + +! Rotate rhoij magnetization + if (optrhoij==1.and.noncoll) then + fact(1)=factsym(1)*factafm;fact(2)=factsym(2) + do mu=1,3 + summag(1:cplex_eff,mu,1)=summag(1:cplex_eff,mu,1) & +& +fact(1:cplex_eff)*zarot2 & +& *pawrhoij_unsym_all(at_indx)%rhoij_(indexkc+1:indexkc+cplex_eff,1+mu) + end do + if (qphase==2) then + do mu=1,3 + summag(1:cplex_eff,mu,2)=summag(1:cplex_eff,mu,2) & +& +fact(1:cplex_eff)*zarot2 & +& *pawrhoij_unsym_all(at_indx)%rhoij_(indexkc_q+1:indexkc_q+cplex_eff,1+mu) + end do + end if + end if + +! Rotate gradients of rhoij + if (choice>1) then + fact(1)=factsym(1);fact(2)=factsym(2)*factafm !????? What? MT + do mu=1,ngrhoij + sumgr(1:cplex_eff,mu,1)=sumgr(1:cplex_eff,mu,1) & +& +fact(1:cplex_eff)*zarot2*grad(mu,indexkc+1:indexkc+cplex_eff,kspden) + end do + if (qphase==2) then + do mu=1,ngrhoij + sumgr(1:cplex_eff,mu,2)=sumgr(1:cplex_eff,mu,2) & +& +fact(1:cplex_eff)*zarot2*grad(mu,indexkc_q+1:indexkc_q+cplex_eff,kspden) + end do + end if + end if + +! Rotate gradients of rhoij magnetization + if (choice>1.and.noncoll) then + fact(1)=factsym(1)*factafm;fact(2)=factsym(2) + do mu=1,3 + do nu=1,ngrhoij + summaggr(1:cplex_eff,nu,mu,1)=summaggr(1:cplex_eff,nu,mu,1) & +& +fact(1:cplex_eff)*zarot2*grad(nu,indexkc+1:indexkc+cplex_eff,1+mu) + end do + end do + if (qphase==2) then + do mu=1,3 + do nu=1,ngrhoij + summaggr(1:cplex_eff,nu,mu,2)=summaggr(1:cplex_eff,nu,mu,2) & + & +fact(1:cplex_eff)*zarot2*grad(nu,indexkc_q+1:indexkc_q+cplex_eff,1+mu) + end do + end do + end if + end if + + end do ! mi + end do ! mj + +! Apply phase for phonons + if (has_qphase) then + !Remember, RHOij is stored as follows: + ! RHOij= [rhoij(2klmn-1)+i.rhoij(2klmn)] + ! +i.[rhoij(lnm2_size+2klmn-1)+i.rhoij(lmn2_size+2klmn)] + if (optrhoij==1) then + do iplex=1,cplex_rhoij + rhoijc(1)=sumrho(iplex,iafm,1) + rhoijc(2)=sumrho(iplex,iafm,2) + sumrho(iplex,iafm,1)=phase(1)*rhoijc(1)-phase(2)*rhoijc(2) + sumrho(iplex,iafm,2)=phase(1)*rhoijc(2)+phase(2)*rhoijc(1) + end do + if (noncoll) then + do iplex=1,cplex_rhoij + do mu=1,3 + rhoijc(1)=summag(iplex,mu,1) + rhoijc(2)=summag(iplex,mu,2) + summag(iplex,mu,1)=phase(1)*rhoijc(1)-phase(2)*rhoijc(2) + summag(iplex,mu,2)=phase(1)*rhoijc(2)+phase(2)*rhoijc(1) + end do + end do + end if + end if + if (choice>1) then + do iplex=1,cplex_rhoij + do mu=1,3 + rhoijc(1)=sumgr(iplex,mu,1) + rhoijc(2)=sumgr(iplex,mu,2) + sumgr(iplex,mu,1)=phase(1)*rhoijc(1)-phase(2)*rhoijc(2) + sumgr(iplex,mu,2)=phase(1)*rhoijc(2)+phase(2)*rhoijc(1) + end do + end do + if (noncoll) then + do iplex=1,cplex_rhoij + do mu=1,3 + do nu=1,ngrhoij + rhoijc(1)=summaggr(iplex,nu,mu,1) + rhoijc(2)=summaggr(iplex,nu,mu,2) + summaggr(iplex,nu,mu,1)=phase(1)*rhoijc(1)-phase(2)*rhoijc(2) + summaggr(iplex,nu,mu,2)=phase(1)*rhoijc(2)+phase(2)*rhoijc(1) + end do + end do + end do + end if + end if + end if + +! Add contribution of this rotation + if (optrhoij==1) then + do iq=1,qphase + rotrho(1:cplex_eff,iafm,iq)=rotrho(1:cplex_eff,iafm,iq) & +& +sumrho(1:cplex_eff,iafm,iq) + end do + end if + + +! Rotate vector fields in real space (forces, magnetization, etc...) +! Should use symrel^-1 but use transpose[symrec] instead +! ===== Rhoij magnetization ==== + if (noncoll.and.optrhoij==1) then + do iq=1,qphase + do nu=1,3 + do mu=1,3 + rotmag(1:cplex_eff,mu,iq)=rotmag(1:cplex_eff,mu,iq) & +& +symrec_cart(mu,nu,irot)*summag(1:cplex_eff,nu,iq) + end do + end do + end do + end if +! ===== Derivatives vs atomic positions ==== + if (choice==2.or.choice==23.or.choice==24) then + do iq=1,qphase + do nu=1,3 + nushift=nu+ishift2 + do mu=1,3 + mushift=mu+ishift2 + rotgr(1:cplex_eff,mushift,iafm,iq)=rotgr(1:cplex_eff,mushift,iafm,iq) & +& +dble(symrec(mu,nu,irot))*sumgr(1:cplex_eff,nushift,iq) + end do + end do + end do + if (noncoll) then + do iq=1,qphase + do mub=1,3 ! Loop on magnetization components + do mua=1,3 ! Loop on gradients + mushift=mua+ishift2 + sum1(:)=zero;xsym(1:3)=dble(symrec(mua,1:3,irot)) + do nu=1,3 + syma=symrec_cart(mub,nu,irot) + sum1(1:cplex_eff)=sum1(1:cplex_eff)+syma & +& *(summaggr(1:cplex_eff,ishift2+1,nu,iq)*xsym(1) & +& +summaggr(1:cplex_eff,ishift2+2,nu,iq)*xsym(2) & +& +summaggr(1:cplex_eff,ishift2+3,nu,iq)*xsym(3)) + end do + rotmaggr(1:cplex_eff,mushift,mub,iq)= & +& rotmaggr(1:cplex_eff,mushift,mub,iq)+sum1(1:cplex_eff) + end do + end do + end do + end if + end if +! ===== Derivatives vs strain ==== + if (choice==3.or.choice==23) then + do iq=1,qphase + work1(1:cplex_eff,1,1)=sumgr(1:cplex_eff,1+ishift3,iq);work1(1:cplex_eff,2,2)=sumgr(1:cplex_eff,2+ishift3,iq) + work1(1:cplex_eff,3,3)=sumgr(1:cplex_eff,3+ishift3,iq);work1(1:cplex_eff,2,3)=sumgr(1:cplex_eff,4+ishift3,iq) + work1(1:cplex_eff,1,3)=sumgr(1:cplex_eff,5+ishift3,iq);work1(1:cplex_eff,1,2)=sumgr(1:cplex_eff,6+ishift3,iq) + work1(1:cplex_eff,3,1)=work1(1:cplex_eff,1,3);work1(1:cplex_eff,3,2)=work1(1:cplex_eff,2,3) + work1(1:cplex_eff,2,1)=work1(1:cplex_eff,1,2) + do mu=1,6 + mushift=mu+ishift3 + mua=alpha(mu);mub=beta(mu) + sum1(:)=zero;xsym(1:3)=dble(symrec(mub,1:3,irot)) + do nu=1,3 + syma=dble(symrec(mua,nu,irot)) + sum1(1:cplex_eff)=sum1(1:cplex_eff) & +& +syma*(work1(1:cplex_eff,nu,1)*xsym(1) & +& +work1(1:cplex_eff,nu,2)*xsym(2) & +& +work1(1:cplex_eff,nu,3)*xsym(3)) + end do + rotgr(1:cplex_eff,mushift,iafm,iq)= & +& rotgr(1:cplex_eff,mushift,iafm,iq)+sum1(1:cplex_eff) + end do + end do + end if +! ===== Second derivatives vs atomic positions ==== + if (choice==4.or.choice==24) then + do iq=1,qphase + work1(1:cplex_eff,1,1)=sumgr(1:cplex_eff,1+ishift4,iq);work1(1:cplex_eff,2,2)=sumgr(1:cplex_eff,2+ishift4,iq) + work1(1:cplex_eff,3,3)=sumgr(1:cplex_eff,3+ishift4,iq);work1(1:cplex_eff,2,3)=sumgr(1:cplex_eff,4+ishift4,iq) + work1(1:cplex_eff,1,3)=sumgr(1:cplex_eff,5+ishift4,iq);work1(1:cplex_eff,1,2)=sumgr(1:cplex_eff,6+ishift4,iq) + work1(1:cplex_eff,3,1)=work1(1:cplex_eff,1,3);work1(1:cplex_eff,3,2)=work1(1:cplex_eff,2,3) + work1(1:cplex_eff,2,1)=work1(1:cplex_eff,1,2) + do mu=1,6 + mushift=mu+ishift4 + mua=alpha(mu);mub=beta(mu) + sum1(:)=zero + xsym(1:3)=dble(symrec(mub,1:3,irot)) + do nu=1,3 + syma=dble(symrec(mua,nu,irot)) + sum1(1:cplex_eff)=sum1(1:cplex_eff) & +& +syma*(work1(1:cplex_eff,nu,1)*xsym(1) & +& +work1(1:cplex_eff,nu,2)*xsym(2) & +& +work1(1:cplex_eff,nu,3)*xsym(3)) + end do + rotgr(1:cplex_eff,mushift,iafm,iq)= & +& rotgr(1:cplex_eff,mushift,iafm,iq)+sum1(1:cplex_eff) + end do + end do + end if + + end do ! End loop over symmetries + + +! Store average result (over symmetries) +! -------------------------------------- + +! Rhoij + if (optrhoij==1) then + do iq=1,qphase + klmn1q=klmn1+(iq-1)*lmn2_size + pawrhoij(iatm)%rhoijp(klmn1q,ispden)=rotrho(1,1,iq)/nsym_used(1) + if (cplex_rhoij==2) then + if (cplex_eff==1) ro=pawrhoij_unsym_all(iatom)%rhoij_(klmn1q+1,ispden) + if (cplex_eff==2) ro=rotrho(2,1,iq)/nsym_used(1) + pawrhoij(iatm)%rhoijp(klmn1q+1,ispden)=ro + end if + end do + end if + +! Rhoij magnetization + if (noncoll.and.optrhoij==1) then + do mu=2,4 + do iq=1,qphase + klmn1q=klmn1+(iq-1)*lmn2_size + if (use_zeromag_) then + pawrhoij(iatm)%rhoijp(klmn1q,mu)=zero + else + pawrhoij(iatm)%rhoijp(klmn1q,mu)=rotmag(1,mu-1,iq)/nsym_used(1) + end if + if (cplex_rhoij==2) then + if (cplex_eff==1) ro=pawrhoij_unsym_all(iatom)%rhoij_(klmn1q+1,mu) + if (cplex_eff==2) ro=rotmag(2,mu-1,iq)/nsym_used(1) + pawrhoij(iatm)%rhoijp(klmn1q+1,mu)=ro + end if + end do + end do + end if + +! Rhoij^down when antiferro + if (antiferro.and.optrhoij==1) then + if (nsym_used(2)>0) then + do iq=1,qphase + klmn1q=klmn1+(iq-1)*lmn2_size + pawrhoij(iatm)%rhoijp(klmn1q,2)=rotrho(1,2,iq)/nsym_used(2) + if (cplex_rhoij==2) then + if (cplex_eff==1) ro=pawrhoij_unsym_all(iatom)%rhoij_(klmn1q+1,2) + if (cplex_eff==2) ro=rotrho(2,2,iq)/nsym_used(2) + pawrhoij(iatm)%rhoijp(klmn1q+1,2)=ro + end if + end do + end if + end if + +! Gradients of rhoij + if (choice>1) then + do iq=1,qphase + klmn1q=klmn1+(iq-1)*lmn2_size + do iplex=1,cplex_eff + do mu=1,ngrhoij + pawrhoij(iatm)%grhoij(mu,klmn1q,ispden)=rotgr(iplex,mu,1,iq)/nsym_used(1) + end do + if (noncoll) then + if (use_zeromag_.and.iplex==1) then + pawrhoij(iatm)%grhoij(mu,klmn1q,2:4)=zero + else + do nu=1,3 + pawrhoij(iatm)%grhoij(mu,klmn1q,1+nu)=rotmaggr(iplex,mu,nu,iq)/nsym_used(1) + end do + end if + end if + if (antiferro.and.nsym_used(2)>0) then + do mu=1,ngrhoij + pawrhoij(iatm)%grhoij(mu,klmn1q,ispden)=rotgr(iplex,mu,2,iq)/nsym_used(2) + end do + end if + klmn1q=klmn1q+1 + end do + !if cplex_eff1) then + if (.not.paral_atom_unsym) then + do iatm=1,nrhoij + LIBPAW_DEALLOCATE(tmp_grhoij(iatm)%value) + end do + LIBPAW_DATATYPE_DEALLOCATE(tmp_grhoij) + end if + LIBPAW_DEALLOCATE(sumgr) + LIBPAW_DEALLOCATE(rotgr) + if (noncoll) then + LIBPAW_DEALLOCATE(summaggr) + LIBPAW_DEALLOCATE(rotmaggr) + end if + end if + if(paral_atom_unsym) then + call pawrhoij_free(pawrhoij_unsym_all) + LIBPAW_DATATYPE_DEALLOCATE(pawrhoij_unsym_all) + end if + + + else ! nsym>1 + +! ********************************************************************* +! If nsym==1, only copy rhoij_ into rhoij +! also has to fill rhoijselect array + + if (antiferro) then + msg=' In the antiferromagnetic case, nsym cannot be 1' + LIBPAW_BUG(msg) + end if + + if (optrhoij==1) then + + do iatm=1,nrhoij + iatom=iatm;if ((paral_atom).and.(.not.paral_atom_unsym)) iatom=my_atmtab(iatm) + cplex_rhoij=pawrhoij(iatm)%cplex_rhoij + qphase=pawrhoij(iatm)%qphase + lmn2_size=pawrhoij(iatm)%lmn2_size + use_res=(pawrhoij(iatm)%use_rhoijres>0) + +! Store -rhoij_input in rhoij residual + if (use_res) then + pawrhoij(iatm)%rhoijres(:,:)=zero + do iq=1,qphase + iq0=(iq-1)*lmn2_size + if (cplex_rhoij==1) then + do ispden=1,pawrhoij(iatm)%nspden + do irhoij=1,pawrhoij(iatm)%nrhoijsel + klmn=iq0+pawrhoij(iatm)%rhoijselect(irhoij);jrhoij=iq0+irhoij + pawrhoij(iatm)%rhoijres(klmn,ispden)=-pawrhoij(iatm)%rhoijp(jrhoij,ispden) + end do + end do + else + do ispden=1,pawrhoij(iatm)%nspden + do irhoij=1,pawrhoij(iatm)%nrhoijsel + klmn1=iq0+2*pawrhoij(iatm)%rhoijselect(irhoij);jrhoij=iq0+2*irhoij + pawrhoij(iatm)%rhoijres(klmn1-1,ispden)=-pawrhoij(iatm)%rhoijp(jrhoij-1,ispden) + pawrhoij(iatm)%rhoijres(klmn1 ,ispden)=-pawrhoij(iatm)%rhoijp(jrhoij ,ispden) + end do + end do + end if + end do + end if + +! Select non-zero elements of input rhoij + call pawrhoij_filter(pawrhoij(iatm)%rhoijp,pawrhoij(iatm)%rhoijselect,& +& pawrhoij(iatm)%nrhoijsel,cplex_rhoij,qphase,lmn2_size,& +& pawrhoij(iatm)%nspden,rhoij_input=pawrhoij_unsym(iatom)%rhoij_) + +! Add new rhoij to rhoij residual + if (use_res) then + do ispden=1,pawrhoij(iatm)%nspden + do iq=1,qphase + iq0=(iq-1)*lmn2_size + if (cplex_rhoij==1) then + do irhoij=1,pawrhoij(iatm)%nrhoijsel + klmn1=iq0+pawrhoij(iatm)%rhoijselect(irhoij) ; jrhoij=iq0+irhoij + pawrhoij(iatm)%rhoijres(klmn1,ispden)= & +& pawrhoij(iatm)%rhoijres(klmn1,ispden) & +& +pawrhoij(iatm)%rhoijp(jrhoij,ispden) + end do + else + do irhoij=1,pawrhoij(iatm)%nrhoijsel + klmn1=iq0+2*pawrhoij(iatm)%rhoijselect(irhoij) ; jrhoij=iq0+2*irhoij + pawrhoij(iatm)%rhoijres(klmn1-1:klmn1,ispden)= & +& pawrhoij(iatm)%rhoijres(klmn1-1:klmn1,ispden) & +& +pawrhoij(iatm)%rhoijp(jrhoij-1:jrhoij,ispden) + end do + end if + end do + end do + end if + + end do ! iatm + end if ! optrhoij + + end if + +!********************************************************************* +!Printing of symetrized Rhoij + if (nrhoij>0.and.optrhoij==1.and.pawprtvol/=-10001) then + wrt_mode='COLL';if (paral_atom) wrt_mode='PERS' + pertstrg="RHOIJ";if (ipert>0) pertstrg="RHOIJ(1)" + natinc=1;if(nrhoij>1.and.pawprtvol>=0) natinc=nrhoij-1 + write(msg, '(7a)') ch10," PAW TEST:",ch10,& +& ' ========= Values of ',trim(pertstrg),' after symetrization =========',ch10 + call wrtout(std_out,msg,wrt_mode) + do iatm=1,nrhoij,natinc + iatom=iatm; if (paral_atom) iatom=my_atmtab(iatm) + if (nrhoij==1.and.ipert>0.and.ipert<=natom) iatom=ipert + call pawrhoij_print_rhoij(pawrhoij(iatm)%rhoijp,pawrhoij(iatm)%cplex_rhoij,& +& pawrhoij(iatm)%qphase,iatom,natom,& +& rhoijselect=pawrhoij(iatm)%rhoijselect,unit=std_out,& +& opt_prtvol=pawprtvol,mode_paral=wrt_mode) + end do + call wrtout(std_out,"",wrt_mode) + end if + +!Destroy atom table used for parallelism + call free_my_atmtab(my_atmtab,my_atmtab_allocated) + +!********************************************************************* +!Small function: convert a symmetry operation +!from reduced coordinates (integers) to cartesian coordinates (reals) + contains + function symrhoij_symcart(aprim,bprim,symred) + + real(dp) :: symrhoij_symcart(3,3) + integer,intent(in) :: symred(3,3) + real(dp),intent(in) :: aprim(3,3),bprim(3,3) + integer :: ii,jj,kk + real(dp) :: tmp(3,3) + symrhoij_symcart=zero;tmp=zero + do kk=1,3 + do jj=1,3 + do ii=1,3 + tmp(ii,jj)=tmp(ii,jj)+bprim(ii,kk)*dble(symred(jj,kk)) + end do + end do + end do + do kk=1,3 + do jj=1,3 + do ii=1,3 + symrhoij_symcart(ii,jj)=symrhoij_symcart(ii,jj)+aprim(ii,kk)*tmp(jj,kk) + end do + end do + end do + end function symrhoij_symcart + +end subroutine pawrhoij_symrhoij +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawrhoij/pawrhoij_isendreceive_getbuffer +!! NAME +!! pawrhoij_isendreceive_getbuffer +!! +!! FUNCTION +!! Fill a pawrhoij structure with the buffers received in a receive operation +!! This buffer should have been first extracted by a call to pawrhoij_isendreceive_fillbuffer +!! +!! INPUTS +!! atm_indx_recv(1:total number of atoms)= array for receive operation +!! Given an index of atom in global numbering, give its index +!! in the table of atoms treated by current processor +!! or -1 if the atoms is not treated by current processor +!! buf_int= buffer of receive integers +!! buf_dp= buffer of receive double precision numbers +!! nrhoij_send= number of sent atoms +!! +!! OUTPUT +!! pawrhoij= output datastructure filled with buffers receive in a receive operation +!! +!! SOURCE + +subroutine pawrhoij_isendreceive_getbuffer(pawrhoij,nrhoij_send,atm_indx_recv,buf_int,buf_dp) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: nrhoij_send +!arrays + integer,intent(in) ::atm_indx_recv(:),buf_int(:) + real(dp),intent(in) :: buf_dp(:) + type(pawrhoij_type),target,intent(inout) :: pawrhoij(:) + +!Local variables------------------------------- +!scalars + integer :: buf_dp_size,buf_int_size,cplex,ii,indx_int,indx_dp,iatom_tot,irhoij_send + integer :: isp,jj,jrhoij,lmn2_size,lmnmix,ngrhoij,nselect,nspden,qphase,rhoij_size2 + integer :: use_rhoijp,use_rhoijres,use_rhoij_ + character(len=500) :: msg + type(pawrhoij_type),pointer :: pawrhoij1 +!arrays + +! ********************************************************************* + + buf_int_size=size(buf_int) + buf_dp_size=size(buf_dp) + indx_int=1;indx_dp=1 + + do irhoij_send=1,nrhoij_send + + iatom_tot=buf_int(indx_int) ; indx_int=indx_int+1 + jrhoij= atm_indx_recv(iatom_tot) + if (jrhoij==-1) then + msg="Error in pawrhoij_isendreceive_getbuffer atom not found" + LIBPAW_BUG(msg) + end if + pawrhoij1=>pawrhoij(jrhoij) + + cplex =buf_int(indx_int) ;indx_int=indx_int+1 + qphase =buf_int(indx_int) ;indx_int=indx_int+1 + lmn2_size =buf_int(indx_int) ;indx_int=indx_int+1 + nspden =buf_int(indx_int) ;indx_int=indx_int+1 + nselect =buf_int(indx_int) ;indx_int=indx_int+1 + lmnmix =buf_int(indx_int) ;indx_int=indx_int+1 + ngrhoij =buf_int(indx_int) ;indx_int=indx_int+1 + use_rhoijp =buf_int(indx_int) ;indx_int=indx_int+1 + use_rhoijres=buf_int(indx_int) ;indx_int=indx_int+1 + use_rhoij_ =buf_int(indx_int) ;indx_int=indx_int+1 + rhoij_size2 =buf_int(indx_int) ;indx_int=indx_int+1 + pawrhoij1%itypat=buf_int(indx_int) ;indx_int=indx_int+1 + pawrhoij1%lmn_size=buf_int(indx_int) ;indx_int=indx_int+1 + pawrhoij1%nsppol=buf_int(indx_int) ;indx_int=indx_int+1 + pawrhoij1%nspinor=buf_int(indx_int) ;indx_int=indx_int+1 + pawrhoij1%cplex_rhoij=cplex + pawrhoij1%qphase=qphase + pawrhoij1%lmn2_size=lmn2_size + pawrhoij1%nspden=nspden + pawrhoij1%nrhoijsel=nselect + pawrhoij1%lmnmix_sz=lmnmix + pawrhoij1%ngrhoij=ngrhoij + pawrhoij1%use_rhoijp=use_rhoijp + pawrhoij1%use_rhoijres=use_rhoijres + pawrhoij1%use_rhoij_=use_rhoij_ + if (use_rhoijp>0) then + LIBPAW_ALLOCATE(pawrhoij1%rhoijselect,(lmn2_size)) + pawrhoij1%rhoijselect(1:nselect)=buf_int(indx_int:indx_int+nselect-1) + if (nselect < lmn2_size )pawrhoij1%rhoijselect(nselect+1:lmn2_size)=zero + indx_int=indx_int+nselect + LIBPAW_ALLOCATE(pawrhoij1%rhoijp,(cplex*qphase*lmn2_size,nspden)) + do isp=1,nspden + do ii=1,qphase + jj=(ii-1)*cplex*lmn2_size + pawrhoij1%rhoijp(jj+1:jj+cplex*nselect,isp)=buf_dp(indx_dp:indx_dp+cplex*nselect-1) + if (nselect0) then + LIBPAW_ALLOCATE(pawrhoij1%kpawmix,(lmnmix)) + pawrhoij1%kpawmix(1:lmnmix)=buf_int(indx_int:indx_int+lmnmix-1) + indx_int=indx_int+lmnmix + end if + if (ngrhoij>0) then + LIBPAW_ALLOCATE(pawrhoij1%grhoij,(ngrhoij,cplex*qphase*lmn2_size,nspden)) + do isp=1,nspden + do ii=1,cplex*qphase*lmn2_size + pawrhoij1%grhoij(1:ngrhoij,ii,isp)=buf_dp(indx_dp:indx_dp+ngrhoij-1) + indx_dp=indx_dp+ngrhoij + end do + end do + end if + if (use_rhoijres>0) then + LIBPAW_ALLOCATE(pawrhoij1%rhoijres,(cplex*qphase*lmn2_size,nspden)) + do isp=1,nspden + pawrhoij1%rhoijres(1:cplex*qphase*lmn2_size,isp)=buf_dp(indx_dp:indx_dp+cplex*qphase*lmn2_size-1) + indx_dp=indx_dp+cplex*qphase*lmn2_size + end do + end if + if (use_rhoij_>0) then + LIBPAW_ALLOCATE(pawrhoij1%rhoij_,(cplex*qphase*lmn2_size,rhoij_size2)) + do isp=1,rhoij_size2 + pawrhoij1%rhoij_(1:cplex*qphase*lmn2_size,isp)=buf_dp(indx_dp:indx_dp+cplex*qphase*lmn2_size-1) + indx_dp=indx_dp+cplex*qphase*lmn2_size + end do + end if + end do !irhoij_send + if ((indx_int/=1+buf_int_size).or.(indx_dp/=1+buf_dp_size)) then + write(msg,'(a,i10,a,i10)') 'Wrong buffer sizes: buf_int_size=',buf_int_size,' buf_dp_size=',buf_dp_size + LIBPAW_BUG(msg) + end if + +end subroutine pawrhoij_isendreceive_getbuffer +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawrhoij/pawrhoij_isendreceive_fillbuffer +!! NAME +!! pawrhoij_isendreceive_fillbuffer +!! +!! FUNCTION +!! Extract from pawrhoij and from the global index of atoms +!! the buffers to send in a sending operation +!! This function has to be coupled with a call to pawrhoij_isendreceive_getbuffer +!! +!! INPUTS +!! atm_indx_send(1:total number of atoms)= array for send operation, +!! Given an index of atom in global numbering, give its index +!! in the table of atoms treated by current processor +!! or -1 if the atoms is not treated by current processor +!! nrhoij_send= number of sent atoms +!! pawrhoij= data structure from which are extract buffer int and buffer dp +!! +!! OUTPUT +!! buf_int= buffer of integers to be sent +!! buf_int_size= size of buffer of integers +!! buf_dp= buffer of double precision numbers to be sent +!! buf_dp_size= size of buffer of double precision numbers +!! +!! SOURCE +!! +subroutine pawrhoij_isendreceive_fillbuffer(pawrhoij,atmtab_send, atm_indx_send,nrhoij_send,& +& buf_int,buf_int_size,buf_dp,buf_dp_size) + +!Arguments ------------------------------------ +!scalars + integer,intent(out) :: buf_dp_size,buf_int_size + integer,intent(in) :: nrhoij_send +!arrays + integer,intent(in) :: atmtab_send(:),atm_indx_send(:) + integer,intent(out),allocatable :: buf_int(:) + real(dp),intent(out),allocatable :: buf_dp(:) + type(pawrhoij_type),target,intent(in) :: pawrhoij(:) + +!Local variables------------------------------- +!scalars + integer :: cplex,ii,indx_int,indx_dp, iatom_tot,irhoij,irhoij_send,isp,jj,lmn2_size,lmnmix + integer :: ngrhoij,nselect,nspden,qphase,rhoij_size2 + integer :: use_rhoijp,use_rhoijres,use_rhoij_ + character(len=500) :: msg + type(pawrhoij_type),pointer :: pawrhoij1 +!arrays + +! ********************************************************************* + +!Compute sizes of buffers + buf_int_size=0;buf_dp_size=0 + nselect=0;lmnmix=0;ngrhoij=0;rhoij_size2=0 + use_rhoijp=0;use_rhoijres=0;use_rhoij_=0 + do irhoij_send=1,nrhoij_send + iatom_tot=atmtab_send(irhoij_send) + irhoij=atm_indx_send(iatom_tot) + if (irhoij == -1) then + msg="Error in pawrhoij_isendreceive_fillbuffer atom not found" + LIBPAW_BUG(msg) + end if + pawrhoij1=>pawrhoij(irhoij) + cplex =pawrhoij1%cplex_rhoij + qphase =pawrhoij1%qphase + lmn2_size=pawrhoij1%lmn2_size + nspden =pawrhoij1%nspden + lmnmix=pawrhoij1%lmnmix_sz + ngrhoij=pawrhoij1%ngrhoij + use_rhoijp=pawrhoij1%use_rhoijp + use_rhoijres=pawrhoij1%use_rhoijres + use_rhoij_=pawrhoij1%use_rhoij_ + buf_int_size=buf_int_size+16 + if (use_rhoijp>0) then + nselect=pawrhoij1%nrhoijsel + buf_int_size=buf_int_size+nselect + buf_dp_size=buf_dp_size + cplex*qphase*nselect*nspden + end if + if (lmnmix>0) buf_int_size=buf_int_size+lmnmix + if (ngrhoij>0) buf_dp_size=buf_dp_size + cplex*qphase*lmn2_size*nspden*ngrhoij + if (use_rhoijres>0) buf_dp_size=buf_dp_size + cplex*qphase*lmn2_size*nspden + if (use_rhoij_>0) then + rhoij_size2=size(pawrhoij1%rhoij_,dim=2) + buf_dp_size=buf_dp_size + cplex*qphase*lmn2_size*rhoij_size2 + end if + end do + +!Fill input buffers + LIBPAW_ALLOCATE(buf_int,(buf_int_size)) + LIBPAW_ALLOCATE(buf_dp,(buf_dp_size)) + indx_int=1;indx_dp =1 + lmnmix=0;ngrhoij=0;nselect=0;rhoij_size2=0 + use_rhoijp=0;use_rhoijres=0;use_rhoij_=0 + do irhoij_send=1,nrhoij_send + iatom_tot=atmtab_send(irhoij_send) + irhoij=atm_indx_send(iatom_tot) + pawrhoij1=>pawrhoij(irhoij) + cplex =pawrhoij1%cplex_rhoij + qphase =pawrhoij1%qphase + lmn2_size=pawrhoij1%lmn2_size + nspden =pawrhoij1%nspden + lmnmix=pawrhoij1%lmnmix_sz + ngrhoij=pawrhoij1%ngrhoij + use_rhoijp=pawrhoij1%use_rhoijp + nselect=pawrhoij1%nrhoijsel + use_rhoijres=pawrhoij1%use_rhoijres + use_rhoij_ =pawrhoij1%use_rhoij_ + if (use_rhoij_ > 0) then + rhoij_size2 =size(pawrhoij1%rhoij_,dim=2) + end if + buf_int(indx_int)=atmtab_send(irhoij_send) ;indx_int=indx_int+1 + buf_int(indx_int)=cplex ;indx_int=indx_int+1 + buf_int(indx_int)=qphase ;indx_int=indx_int+1 + buf_int(indx_int)=lmn2_size ;indx_int=indx_int+1 + buf_int(indx_int)=nspden ;indx_int=indx_int+1 + buf_int(indx_int)=nselect ;indx_int=indx_int+1 + buf_int(indx_int)=lmnmix ;indx_int=indx_int+1 + buf_int(indx_int)=ngrhoij ;indx_int=indx_int+1 + buf_int(indx_int)=use_rhoijp ;indx_int=indx_int+1 + buf_int(indx_int)=use_rhoijres ;indx_int=indx_int+1 + buf_int(indx_int)=use_rhoij_ ;indx_int=indx_int+1 + buf_int(indx_int)=rhoij_size2 ;indx_int=indx_int+1 + buf_int(indx_int)=pawrhoij1%itypat ;indx_int=indx_int+1 + buf_int(indx_int)=pawrhoij1%lmn_size ;indx_int=indx_int+1 + buf_int(indx_int)=pawrhoij1%nsppol ;indx_int=indx_int+1 + buf_int(indx_int)=pawrhoij1%nspinor ;indx_int=indx_int+1 + if (use_rhoijp>0) then + buf_int(indx_int:indx_int+nselect-1)=pawrhoij1%rhoijselect(1:nselect) + indx_int=indx_int+nselect + do isp=1,nspden + do ii=1,qphase + jj=(ii-1)*cplex*lmn2_size + buf_dp(indx_dp:indx_dp+cplex*nselect-1)=pawrhoij1%rhoijp(jj+1:jj+cplex*nselect,isp) + indx_dp=indx_dp+cplex*nselect + end do + end do + end if + if (lmnmix>0) then + buf_int(indx_int:indx_int+lmnmix-1)=pawrhoij1%kpawmix(1:lmnmix) + indx_int=indx_int+lmnmix + end if + if (ngrhoij>0) then + do isp=1,nspden + do ii=1,cplex*qphase*lmn2_size + buf_dp(indx_dp:indx_dp+ngrhoij-1)=pawrhoij1%grhoij(1:ngrhoij,ii,isp) + indx_dp=indx_dp+ngrhoij + end do + end do + end if + if (use_rhoijres>0) then + do isp=1,nspden + buf_dp(indx_dp:indx_dp+cplex*qphase*lmn2_size-1)=pawrhoij1%rhoijres(1:cplex*qphase*lmn2_size,isp) + indx_dp=indx_dp+cplex*qphase*lmn2_size + end do + end if + if (use_rhoij_>0) then + do isp=1,rhoij_size2 + buf_dp(indx_dp:indx_dp+cplex*qphase*lmn2_size-1)=pawrhoij1%rhoij_(1:cplex*qphase*lmn2_size,isp) + indx_dp=indx_dp+cplex*qphase*lmn2_size + end do + end if + end do !irhoij_send + +!Check + if ((indx_int-1/=buf_int_size).or.(indx_dp-1/=buf_dp_size)) then + write(msg,'(a,i10,a,i10)') 'Wrong buffer sizes: buf_int_size=',buf_int_size,' buf_dp_size=',buf_dp_size + LIBPAW_BUG(msg) + end if + +end subroutine pawrhoij_isendreceive_fillbuffer +!!*** + +!---------------------------------------------------------------------- + +END MODULE m_pawrhoij +!!*** diff --git a/GX-PAW/libpaw/src/m_pawrhoij.o b/GX-PAW/libpaw/src/m_pawrhoij.o new file mode 100644 index 00000000..26cd4771 Binary files /dev/null and b/GX-PAW/libpaw/src/m_pawrhoij.o differ diff --git a/GX-PAW/libpaw/src/m_pawtab.F90 b/GX-PAW/libpaw/src/m_pawtab.F90 new file mode 100644 index 00000000..1d3e1778 --- /dev/null +++ b/GX-PAW/libpaw/src/m_pawtab.F90 @@ -0,0 +1,3110 @@ +!!****m* ABINIT/m_pawtab +!! NAME +!! m_pawtab +!! +!! FUNCTION +!! This module contains the definition of the pawtab_type structured datatype, +!! as well as related functions and methods. +!! pawtab_type variables define TABulated data for PAW (from pseudopotential) +!! +!! COPYRIGHT +!! Copyright (C) 2013-2024 ABINIT group (MT) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! NOTES +!! FOR DEVELOPPERS: in order to preserve the portability of libPAW library, +!! please consult ~abinit/src/??_libpaw/libpaw-coding-rules.txt +!! +!! SOURCE + +#include "libpaw.h" + +MODULE m_pawtab + + USE_DEFS + USE_MSG_HANDLING + USE_MPI_WRAPPERS + USE_MEMORY_PROFILING + + implicit none + + private +!!*** + +!---------------------------------------------------------------------- + +!!****t* m_pawtab/wvlpaw_rholoc_type +!! NAME +!! wvlpaw_rholoc_type +!! +!! FUNCTION +!! Objects for WVL+PAW +!! +!! SOURCE + + type,public :: wvlpaw_rholoc_type + + integer :: msz +! mesh size + + real(dp),allocatable :: d(:,:) +! local rho and derivatives + + real(dp),allocatable :: rad(:) +! radial mesh + + end type wvlpaw_rholoc_type + + public :: wvlpaw_rholoc_free ! Free memory + public :: wvlpaw_rholoc_nullify ! Nullify content +!!*** + +!---------------------------------------------------------------------- + +!!****t* m_pawtab/wvlpaw_type +!! NAME +!! wvlpaw_type +!! +!! FUNCTION +!! Objects for WVL+PAW +!! +!! SOURCE + + type,public :: wvlpaw_type + +! WARNING : if you modify this datatype, please check whether there might be creation/destruction/copy routines, +! declared in another part of ABINIT, that might need to take into account your modification. + +!Integer scalars + + integer :: npspcode_init_guess + ! This is for the PAW-WVL case, only for the initial guess + + integer :: ptotgau + ! total number of complex gaussians + ! for tproj + + integer,allocatable :: pngau(:) + ! number of complex gaussians per basis element + ! for tproj + +!Real pointers + + real(dp),allocatable :: parg(:,:) + !argument of Gaussians + + real(dp),allocatable :: pfac(:,:) + !factors of Gaussians + +!Other scalars + + type(wvlpaw_rholoc_type) :: rholoc + ! local density + ! d(:,1): local rho + ! d(:,2): local rho 2nd-derivative + ! d(:,3): local pot + ! d(:,4): local pot 2nd-derivative + + end type wvlpaw_type + + public :: wvlpaw_allocate ! Allocate memory + public :: wvlpaw_free ! Free memory + public :: wvlpaw_nullify +!!*** + +!---------------------------------------------------------------------- + +!!****t* m_pawtab/pawtab_type +!! NAME +!! pawtab_type +!! +!! FUNCTION +!! This structured datatype contains TABulated data for PAW (from pseudopotential) +!! used in PAW calculations. +!! +!! SOURCE + + type,public :: pawtab_type + +! WARNING : if you modify this datatype, please check whether there might be creation/destruction/copy routines, +! declared in another part of ABINIT, that might need to take into account your modification. + +!Integer scalars + + integer :: basis_size + ! Number of elements for the paw nl basis on the considered atom type + + integer :: has_coretau + ! Flag controling use of core kinetic enrgy density (AE and pseudo) + ! if 1, [t]coretau() is allocated. + ! if 2, [t]coretau() is computed and stored. + + integer :: has_fock + ! if 1, onsite matrix elements of the core-valence Fock operator are allocated + ! if 2, onsite matrix elements of the core-valence Fock operator are computed and stored + + integer :: has_kij + ! if 1, onsite matrix elements of the kinetic operator are allocated + ! if 2, onsite matrix elements of the kinetic operator are computed and stored + + integer :: has_shapefncg + ! if 1, the spherical Fourier transforms of the radial shape functions are allocated + ! if 2, the spherical Fourier transforms of the radial shape functions are computed and stored + + integer :: has_nabla + ! if 1, onsite matrix elements of the nabla operator are allocated. + ! if 2, onsite matrix elements of the nabla operator are computed and stored. + ! if 3, onsite matrix elements of the nabla operator between valence and core states are computed and stored. + ! if 4, onsite matrix elements of the nabla operator between valence and core spinor states are are computed and stored. + + integer :: has_nablaphi + ! if 1, nablaphi are allocated + ! if 2, nablaphi are computed for MetaGGA and stored. + + integer :: has_tproj + ! Flag controling use of projectors in real space (0 if tnval is unknown) + ! if 1, tproj() is allocated. + ! if 2, tproj() is computed and stored. + + integer :: has_tvale + ! Flag controling use of pseudized valence density (0 if tnval is unknown) + ! if 1, tvalespl() is allocated. + ! if 2, tvalespl() is computed and stored. + + integer :: has_vhtnzc + ! if 1, space for vhtnzc is allocated + ! if 2, vhtnzc has been read from PAW file and stored + + integer :: has_vhnzc + ! if 1, space for vhnzc is allocated + ! if 2, vhnzc has been computed and stored + + integer :: has_vminushalf + ! has_vminushalf=0 ; vminushal is not allocated + ! has_vminushalf=1 ; vminushal is not allocated and stored + + integer :: has_wvl + ! if 1, data for wavelets (pawwvl) are allocated + ! if 2, data for wavelets (pawwvl) are computed and stored + + integer :: ij_proj + ! Number of (i,j) elements for the orbitals on which U acts (PAW+U only) + ! on the considered atom type (ij_proj=1 (1 projector), 3 (2 projectors)...) + ! Also used for local exact-exchange + + integer :: ij_size + ! Number of (i,j) elements for the symetric paw basis + ! on the considered atom type (ij_size=basis_size*(basis_size+1)/2) + + integer :: lcut_size + ! Maximum value of l+1 leading to non zero Gaunt coeffs + ! modified by dtset%pawlcutd + ! lcut_size=min(2*l_max,dtset%pawlcutd)+1 + + integer :: l_size + ! Maximum value of l+1 leading to non zero Gaunt coeffs + ! l_size=2*l_max-1 + + integer :: lexexch + ! lexexch gives l on which local exact-exchange is applied for a given type of atom. + + integer :: lmn_size + ! Number of (l,m,n) elements for the paw basis + + integer :: lmn2_size + ! lmn2_size=lmn_size*(lmn_size+1)/2 + ! where lmn_size is the number of (l,m,n) elements for the paw basis + + integer :: lmnmix_sz + ! lmnmix_sz=number of klmn=(lmn,lmn_prime) verifying l<=lmix and l_prime<=lmix + + integer :: lpawu + ! lpawu gives l on which U is applied for a given type of atom. + + integer :: nproju + ! nproju is the number of projectors for orbitals on which paw+u acts. + ! Also used for local exact-exchange + + integer :: option_interaction_pawu + ! Option for interaction energy (PAW+U) in case of non-collinear magnetism: + ! 1: E_int=-J/4.N.(N-2) + ! 2: E_int=-J/2.(Nup.(Nup-1)+Ndn.(Ndn-1)) (Nup and Ndn are ill-defined) + ! 3: E_int=-J/4.( N.(N-2) + mx^2 + my^2 + mz^2 ) + + integer :: mesh_size + ! Dimension of radial mesh for generic arrays contained in this pawtab datastructure + ! The mesh is usually defined up to the PAW augmentation region boundary + ! (+ a few additional points). May be different from pawrad%mesh_size + + integer :: core_mesh_size + ! Dimension of radial mesh for core density + + integer :: coretau_mesh_size + ! Dimension of radial mesh for core density + + integer :: vminus_mesh_size + ! Dimension of radial mesh for vminushalf + + integer :: partialwave_mesh_size + ! Dimension of radial mesh for partial waves (phi, tphi) + ! May be different from pawrad%mesh_size and pawtab%mesh_size + + integer :: tnvale_mesh_size + ! Dimension of radial mesh for tnvale + + integer :: mqgrid + ! Number of points in the reciprocal space grid on which + ! the radial functions (tcorespl, tvalespl...) are specified + ! Same as psps%mqgrid_vl + + integer :: mqgrid_shp + ! Number of points in the reciprocal space grid on which + ! the radial shape functions (shapefncg) are given + + integer :: usespnorb + ! usespnorb=0 ; no spin-orbit coupling + ! usespnorb=1 ; spin-orbit coupling + + integer :: shape_lambda + ! Lambda parameter in gaussian shapefunction (shape_type=2) + + integer :: shape_type + ! Radial shape function type + ! shape_type=-1 ; g(r)=numeric (read from psp file) + ! shape_type= 1 ; g(r)=[sin(pi*r/rshp)/(pi*r/rshp)]**2 if r<=rshp, zero if r>rshp + ! shape_type= 2 ; g(r)=exp[-(r/sigma)**lambda] + ! shape_type= 3 ; gl(r)=Alpha(1,l)*jl(q(1,l)*r)+Alpha(2,l)*jl(q(2,l)*r) for each l + + integer :: useexexch + ! useexexch=0 ; do not use local exact-exchange + ! useexexch=1 ; use local exact-exchange + + integer :: usepawu + ! usepawu= 0 ; do not use PAW+U formalism + ! usepawu= 1 ; use PAW+U formalism (Full localized limit) + ! usepawu= 2 ; use PAW+U formalism (Around Mean Field) + ! usepawu= 3 ; use PAW+U formalism (Around Mean Field) - Alternative + ! usepawu= 4 ; use PAW+U formalism (FLL) without polarization in the XC + ! usepawu=-1 ; use PAW+U formalism (FLL) - No use of the occupation matrix - Experimental + ! usepawu=-2 ; use PAW+U formalism (AMF) - No use of the occupation matrix - Experimental + ! usepawu=-4 ; use PAW+U formalism (FLL) without polarization in the XC - No use of the occupation matrix - Experimental + ! usepawu=10 ; use PAW+U within DMFT + ! usepawu=14 ; use PAW+U within DMFT without polarization in the XC + + integer :: usepotzero + ! usepotzero=0 if it is the Kresse-Joubert convention + ! usepotzero=1 if it is the new convention + ! usepotzero=2 if it is the PWscf convention + + integer :: usetcore + ! Flag controling use of pseudized core density (0 if tncore=zero) + + integer :: usexcnhat + ! 0 if compensation charge density is not included in XC terms + ! 1 if compensation charge density is included in XC terms + +!Real (real(dp)) scalars + + real(dp) :: beta + ! contains the integral of the difference between vH[nZc] and vH[tnZc] + + real(dp) :: dncdq0 + ! Gives 1/q d(tNcore(q))/dq for q=0 + ! (tNcore(q) = FT of pseudo core density) + + real(dp) :: d2ncdq0 + ! Gives contribution of d2(tNcore(q))/d2q for q=0 + ! \int{(16/15)*pi^5*n(r)*r^6* dr} + ! (tNcore(q) = FT of pseudo core density) + + real(dp) :: dnvdq0 + ! Gives 1/q d(tNvale(q))/dq for q=0 + ! (tNvale(q) = FT of pseudo valence density) + + real(dp) :: dtaucdq0 + ! Gives 1/q d(tTAUcore(q))/dq for q=0 + ! (tTAUcore(q) = FT of pseudo core kinetic density) + + real(dp) :: ex_cc + ! Exchange energy for the core-core interaction of the Fock operator + + real(dp) :: exccore + ! Exchange-correlation energy for the core density + + real(dp) :: exchmix + ! mixing of exact exchange; default is 0.25 (PBE0) + + real(dp) :: f4of2_sla + ! Ratio of Slater Integrals F4 and F2 + + real(dp) :: f6of2_sla + ! Ratio of Slater Integrals F6 and F4 + + real(dp) :: jpawu + ! Value of J parameter for paw+u for a given type. + + real(dp) :: lamb_shielding=0.0D0 + ! Lamb shielding used in NMR shielding calcs (see m_orbmag.F90) + + real(dp) :: rpaw + ! Radius of PAW sphere + + real(dp) :: rshp + ! Compensation charge radius (if r>rshp, g(r)=zero) + + real(dp) :: rcore + ! Radius of core corrections (rcore >= rpaw) + + real(dp) :: rcoretau + ! Radius of kinetic core corrections (rcoretau >= rpaw) + + real(dp) :: shape_sigma + ! Sigma parameter in gaussian shapefunction (shape_type=2) + + real(dp) :: upawu + ! Value of U parameter for paw+u for a given type. + +!Objects + type(wvlpaw_type), pointer :: wvl + !variable containing objects needed + !for wvl+paw implementation + !Warning: it is a pointer; it has to be allocated before use + +!Integer arrays + + integer, allocatable :: indklmn(:,:) + ! indklmn(8,lmn2_size) + ! Array giving klm, kln, abs(il-jl), (il+jl), ilm and jlm, ilmn and jlmn for each klmn=(ilmn,jlmn) + ! Note: ilmn=(il,im,in) and ilmn<=jlmn + + integer, allocatable :: indlmn(:,:) + ! indlmn(6,lmn_size) + ! For each type of psp, + ! array giving l,m,n,lm,ln,spin for i=lmn (if useylm=1) + + integer, allocatable :: klmntomn(:,:) + ! klmntomn(4,lmn2_size) + ! Array giving im, jm ,in, and jn for each klmn=(ilmn,jlmn) + ! Note: ilmn=(il,im,in) and ilmn<=jlmn + ! NB: klmntomn is an application and not a bijection + + integer, allocatable :: kmix(:) + ! kmix(lmnmix_sz) + ! Indirect array selecting the klmn=(lmn,lmn_prime) verifying l<=lmix and l_prime<=lmix + + integer, allocatable :: lnproju(:) + ! lnproju(nproju) gives ln (index for phi) for each projectors on which U acts (PAW+U only) + ! nproju is 1 or 2 and is the number of projectors for correlated orbitals + ! Also used for local exact-exchange + + integer, allocatable :: orbitals(:) + ! (basis_size) + ! gives the l quantum number per basis element + +!Real (real(dp)) arrays + + real(dp), allocatable :: coredens(:) + ! coredens(mesh_size) + ! Gives the core density of the atom + + real(dp), allocatable :: coretau(:) + ! coretau(mesh_size) + ! Gives the kinetic energy density of the atom + + real(dp), allocatable :: dij0(:) + ! dij0(lmn2_size) + ! Part of the Dij term (non-local operator) completely + ! calculated in the atomic data part + + real(dp), allocatable :: dltij(:) + ! dltij(lmn2_size) + ! Factor used to compute sums over klmn=(ilmn,jlmn) + ! ((ilmn,ilmn) term has to be added once) + ! dltij(klmn)=1 if ilmn=jlmn, else dltij(klmn)=2 + + real(dp), allocatable :: dshpfunc(:,:,:) + ! shapefunc(mesh_size,l_size,4) + ! Gives the 4 first derivatives of radial shape function + ! for each l component; used only if shape_type=-1 + + real(dp), allocatable :: eijkl(:,:) + ! eijkl(lmn2_size,lmn2_size) + ! Hartree kernel for the on-site terms (E_hartree=Sum_ijkl[rho_ij rho_kl e_ijkl]) + ! Used for Hartree and/or Fock contributions + + real(dp), allocatable :: eijkl_sr(:,:) + ! eijkl_sr(lmn2_size,lmn2_size) + ! Screened Hartree kernel for the on-site terms (E_hartree=Sum_ijkl[rho_ij rho_kl e_ijkl_sr]) + ! Used for screened Fock contributions + + real(dp), allocatable :: euijkl(:,:,:,:,:) + ! euijkl(3,lmn_size,lmn_size,lmn_size,lmn_size) + ! PAW+U kernel for the on-site terms ( E_PAW+U = 0.5 * Sum_ijkl Sum_s1s2 [rho_ij^s1 rho_kl^s2 euijkl(s1,s2)] ) + ! Contrary to eijkl and eijkl_sr, euijkl is not invariant with respect to the permutations i <--> j or k <--> l + ! However, it is still invariant with respect to the permutation i,k <--> j,l, see pawpuxinit.F90 + ! Also, it depends on two spin indexes + ! Used for PAW+U contributions + + real(dp), allocatable :: euij_fll(:) + ! euij_fll(lmn2_size) + ! Double counting part of the PAW+U kernel in the "fully localized limit".This term is only linear with respect to rho_ij, + ! while euijkl is quadratic. + ! Used for PAW+U contributions + + real(dp), allocatable :: ex_cvij(:) + ! ex_cvij(lmn2_size)) + ! Onsite exact_exchange matrix elements for core-valence interactions of the Fock operator + + real(dp), allocatable :: fk(:,:) + ! fk(6,4) + ! Slater integrals used for local exact exchange + + real(dp), allocatable :: gammaij(:) + ! gammaij(lmn2_size) + ! background contribution from the densities + + real(dp), allocatable :: gnorm(:) + ! gnorm(l_size) + ! Give the the normalization factor of each radial shape function + + real(dp), allocatable :: kij(:) + ! kij(lmn2_size)) + ! Onsite matrix elements - + + real(dp), allocatable :: nabla_ij(:,:,:) + ! nabla_ij(3,lmn_size,lmn_size) + ! Onsite matrix elements - + + real(dp), allocatable :: nabla_im_ij(:,:,:) + ! nabla_im_ij(3,lmn_size,lmn_size) + ! Imaginary part of onsite matrix elements - + ! Used in case of core spinor wave functions + + real(dp), allocatable :: nablaphi(:,:) + ! nablaphi(partialwave_mesh_size, basis_size) + ! store the results of dphi/dr-(1/r)phi + + real(dp), allocatable :: phi(:,:) + ! phi(partialwave_mesh_size, basis_size) + ! Gives the paw electron wavefunctions on the radial grid + + real(dp), allocatable :: phiphj(:,:) + ! phiphj(mesh_size,ij_size) + ! Useful product Phi(:,i)*Phi(:,j) + + real(dp), allocatable :: phiphjint(:) + ! phiphjint(ij_proj) + ! Integration of Phi(:,i)*Phi(:,j) for DFT+U/local exact-exchange occupation matrix + + real(dp), allocatable :: ph0phiint(:) + ! ph0phjint(ij_proj) + ! Integration of Phi(:,1)*Phi(:,j) for LDA+DMFT projections + + real(dp), allocatable :: qgrid_shp(:) + ! qgrid_shp(mqgrid_shp) + ! Grid of points in reciprocal space on which the shape functions are given + + real(dp), allocatable :: qijl(:,:) + ! qijl(l_size**2,lmn2_size) + ! The qijl are the moments of the charge density difference between + ! the AE and PS partial wave for each channel (i,j). They take part + ! to the building of the compensation charge + + real(dp), allocatable :: rad_for_spline(:) + ! rad_for_spline(mesh_size) + ! Radial mesh used to spline quantities on radial mesh; + ! Allocated and used only when + ! shape_type=-1 (numerical shape function) + ! or usedvloc=1 (use of vloc derivative) + + real(dp), allocatable :: rhoij0(:) + ! rhoij0(lmn2_size) + ! Initial guess for rhoij + + real(dp), allocatable :: shape_alpha(:,:) + ! shape_alpha(2,l_size) + ! Alpha_i parameters in Bessel shapefunctions (shape_type=3) + + real(dp), allocatable :: shape_q(:,:) + ! shape_q(2,l_size) + ! Q_i parameters in Bessel shapefunctions (shape_type=3) + + real(dp), allocatable :: shapefunc(:,:) + ! shapefunc(mesh_size,l_size) + ! Gives the normalized radial shape function for each l component + + real(dp), allocatable :: shapefncg(:,:,:) + ! shapefncg(mqgrid_shp,2,l_size) + ! Gives the spherical Fourier transform of the radial shape function + ! for each l component (for each qgrid_shp(i)) + second derivative + + real(dp), allocatable :: sij(:) + ! sij(lmn2_size) + ! Nonlocal part of the overlap operator + + real(dp), allocatable :: tcoredens(:,:) + ! tcoredens(core_mesh_size,1) + ! Gives the pseudo core density of the atom + ! In PAW+WVL: + ! tcoredens(core_mesh_size,2:6) + ! are the first to the fifth derivatives of the pseudo core density. + + real(dp), allocatable :: tcoretau(:) + ! tcoretau(coretau_mesh_size) + ! Gives the pseudo core kinetic energy density of the atom + + real(dp), allocatable :: tcorespl(:,:) + ! tcorespl(mqgrid,2) + ! Gives the pseudo core density in reciprocal space on a regular grid + + real(dp), allocatable :: tcoretauspl(:,:) + ! tcoretauspl(mqgrid,2) + ! Gives the pseudo kinetic core density in reciprocal space on a regular grid + + real(dp), allocatable :: tnablaphi(:,:) + ! tphi(partialwave_mesh_size,basis_size) + ! Gives, on the radial grid, the paw atomic pseudowavefunctions + + real(dp), allocatable :: tphi(:,:) + ! tphi(partialwave_mesh_size,basis_size) + ! Gives, on the radial grid, the paw atomic pseudowavefunctions + + real(dp), allocatable :: tphitphj(:,:) + ! tphitphj(mesh_size,ij_size) + ! Useful product tPhi(:,i)*tPhi(:,j) + + real(dp), allocatable :: tproj(:,:) + ! non-local projectors + + real(dp), allocatable :: tvalespl(:,:) + ! tvalespl(mqgrid,2) + ! Gives the pseudo valence density in reciprocal space on a regular grid + + real(dp), allocatable :: Vee(:,:,:,:) + ! PAW+U: + ! Screened interaction matrix deduced from U and J parameters + ! computed on the basis of orbitals on which U acts. + + real(dp), allocatable :: Vex(:,:,:,:,:) + ! Local exact-exchange: + ! Screened interaction matrix deduced from calculation of Slater integrals + ! computed on the basis of orbitals on which local exact exchange acts. + + real(dp), allocatable :: vhtnzc(:) + ! vhtnzc(mesh_size) + ! Hartree potential for pseudized Zc density, v_H[\tilde{n}_{Zc}] + ! read in from PAW file + + real(dp), allocatable :: VHnZC(:) + ! VHnZC(mesh_size) + ! Hartree potential for Zc density, v_H[n_{Zc}] + ! constructed from core density in PAW file (see psp7in.F90) + + real(dp), allocatable :: vminushalf(:) + ! vminushalf(mesh_size) + ! External potential for LDA minus half calculation + ! read in from PAW file + + real(dp), allocatable :: zioneff(:) + ! zioneff(ij_proj) + ! "Effective charge"*n "seen" at r_paw, deduced from Phi at r_paw, n: + ! pricipal quantum number + ! good approximation to model wave function outside PAW-sphere through + + end type pawtab_type + + public :: pawtab_free ! Free memory + public :: pawtab_nullify ! Nullify content + public :: pawtab_get_lsize ! Get the max. l for a product of 2 partial waves + public :: pawtab_set_flags ! Set the value of the internal flags + public :: pawtab_print ! Printout of the object. + public :: pawtab_bcast ! MPI broadcast the object + + interface pawtab_nullify + module procedure pawtab_nullify_0D + module procedure pawtab_nullify_1D + end interface pawtab_nullify + + interface pawtab_free + module procedure pawtab_free_0D + module procedure pawtab_free_1D + end interface pawtab_free + + interface pawtab_set_flags + module procedure pawtab_set_flags_0D + module procedure pawtab_set_flags_1D + end interface pawtab_set_flags +!!*** + +CONTAINS !=========================================================== +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawtab/pawtab_nullify_0D +!! NAME +!! pawtab_nullify_0D +!! +!! FUNCTION +!! Nullify pointers and flags in a pawtab structure +!! +!! SIDE EFFECTS +!! Pawtab=PAW arrays tabulated. +!! Nullified in output +!! +!! SOURCE + +subroutine pawtab_nullify_0D(Pawtab) + +!Arguments ------------------------------------ +!arrays + type(Pawtab_type),intent(inout) :: Pawtab + +!Local variables------------------------------- + +! ************************************************************************* + + !@Pawtab_type + nullify(Pawtab%wvl) + + ! === Reset all flags and sizes === + +!Flags controlling optional arrays + Pawtab%has_fock=0 + Pawtab%has_kij=0 + Pawtab%has_tproj=0 + Pawtab%has_tvale=0 + Pawtab%has_coretau=0 + Pawtab%has_vhtnzc=0 + Pawtab%has_vhnzc=0 + Pawtab%has_vminushalf=0 + Pawtab%has_nabla=0 + Pawtab%has_nablaphi=0 + Pawtab%has_shapefncg=0 + Pawtab%has_wvl=0 + + Pawtab%usetcore=0 + Pawtab%usexcnhat=0 + Pawtab%useexexch=0 + Pawtab%usepawu=0 + Pawtab%usepotzero=0 + Pawtab%usespnorb=0 + Pawtab%mqgrid=0 + Pawtab%mqgrid_shp=0 + + Pawtab%basis_size=0 + Pawtab%ij_proj=0 + Pawtab%ij_size=0 + Pawtab%lcut_size=0 + Pawtab%l_size=0 + Pawtab%lexexch=-1 + Pawtab%lmn_size=0 + Pawtab%lmn2_size=0 + Pawtab%lmnmix_sz=0 + Pawtab%lpawu=-1 + Pawtab%nproju=0 + Pawtab%option_interaction_pawu=0 + Pawtab%mesh_size=0 + Pawtab%partialwave_mesh_size=0 + Pawtab%core_mesh_size=0 + Pawtab%coretau_mesh_size=0 + Pawtab%vminus_mesh_size=0 + Pawtab%tnvale_mesh_size=0 + Pawtab%shape_type=-10 + +end subroutine pawtab_nullify_0D +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawtab/pawtab_nullify_1D +!! NAME +!! pawtab_nullify_1D +!! +!! FUNCTION +!! Nullify all pointers in an array of pawtab data structures +!! +!! SOURCE + +subroutine pawtab_nullify_1D(Pawtab) + +!Arguments ------------------------------------ + type(pawtab_type),intent(inout) :: Pawtab(:) + +!Local variables------------------------------- + integer :: ii,nn + +! ************************************************************************* + + !@pawtab_type + + nn=size(Pawtab) + if (nn==0) return + + do ii=1,nn + call pawtab_nullify_0D(Pawtab(ii)) + end do + +end subroutine pawtab_nullify_1D +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawtab/pawtab_free_0D +!! NAME +!! pawtab_free_0D +!! +!! FUNCTION +!! Deallocate pointers and nullify flags in a pawtab structure +!! +!! SIDE EFFECTS +!! Pawtab=PAW arrays tabulated. +!! All allocated arrays in Pawtab are deallocated +!! +!! SOURCE + +subroutine pawtab_free_0D(Pawtab) + +!Arguments ------------------------------------ +!arrays + type(Pawtab_type),intent(inout) :: Pawtab + +!Local variables------------------------------- + +! ************************************************************************* + + !@Pawtab_type + + if (allocated(Pawtab%indklmn)) then + LIBPAW_DEALLOCATE(Pawtab%indklmn) + end if + if (allocated(Pawtab%indlmn)) then + LIBPAW_DEALLOCATE(Pawtab%indlmn) + end if + if (allocated(Pawtab%klmntomn)) then + LIBPAW_DEALLOCATE(Pawtab%klmntomn) + end if + if (allocated(Pawtab%kmix)) then + LIBPAW_DEALLOCATE(Pawtab%kmix) + end if + if (allocated(Pawtab%lnproju)) then + LIBPAW_DEALLOCATE(Pawtab%lnproju) + end if + if (allocated(Pawtab%coredens)) then + LIBPAW_DEALLOCATE(Pawtab%coredens) + end if + if (allocated(Pawtab%coretau)) then + LIBPAW_DEALLOCATE(Pawtab%coretau) + end if + if (allocated(Pawtab%dij0)) then + LIBPAW_DEALLOCATE(Pawtab%dij0) + end if + if (allocated(Pawtab%dltij)) then + LIBPAW_DEALLOCATE(Pawtab%dltij) + end if + if (allocated(Pawtab%dshpfunc)) then + LIBPAW_DEALLOCATE(Pawtab%dshpfunc) + end if + if (allocated(Pawtab%eijkl)) then + LIBPAW_DEALLOCATE(Pawtab%eijkl) + end if + if (allocated(Pawtab%eijkl_sr)) then + LIBPAW_DEALLOCATE(Pawtab%eijkl_sr) + end if + if (allocated(Pawtab%euijkl)) then + LIBPAW_DEALLOCATE(Pawtab%euijkl) + end if + if (allocated(Pawtab%euij_fll)) then + LIBPAW_DEALLOCATE(Pawtab%euij_fll) + end if + if (allocated(Pawtab%fk)) then + LIBPAW_DEALLOCATE(Pawtab%fk) + end if + if (allocated(Pawtab%gammaij)) then + LIBPAW_DEALLOCATE(Pawtab%gammaij) + end if + if (allocated(Pawtab%gnorm)) then + LIBPAW_DEALLOCATE(Pawtab%gnorm) + end if + if (allocated(Pawtab%ex_cvij)) then + LIBPAW_DEALLOCATE(Pawtab%ex_cvij) + end if + if (allocated(Pawtab%kij)) then + LIBPAW_DEALLOCATE(Pawtab%kij) + end if + if (allocated(Pawtab%nabla_ij)) then + LIBPAW_DEALLOCATE(Pawtab%nabla_ij) + end if + if (allocated(Pawtab%nabla_im_ij)) then + LIBPAW_DEALLOCATE(Pawtab%nabla_im_ij) + end if + if (allocated(Pawtab%nablaphi)) then + LIBPAW_DEALLOCATE(Pawtab%nablaphi) + end if + if (allocated(Pawtab%orbitals)) then + LIBPAW_DEALLOCATE(Pawtab%orbitals) + end if + if (allocated(Pawtab%phi)) then + LIBPAW_DEALLOCATE(Pawtab%phi) + end if + if (allocated(Pawtab%phiphj)) then + LIBPAW_DEALLOCATE(Pawtab%phiphj) + end if + if (allocated(Pawtab%phiphjint)) then + LIBPAW_DEALLOCATE(Pawtab%phiphjint) + end if + if (allocated(Pawtab%ph0phiint)) then + LIBPAW_DEALLOCATE(Pawtab%ph0phiint) + end if + if (allocated(Pawtab%qgrid_shp)) then + LIBPAW_DEALLOCATE(Pawtab%qgrid_shp) + end if + if (allocated(Pawtab%qijl)) then + LIBPAW_DEALLOCATE(Pawtab%qijl) + end if + if (allocated(Pawtab%rad_for_spline)) then + LIBPAW_DEALLOCATE(Pawtab%rad_for_spline) + end if + if (allocated(Pawtab%rhoij0)) then + LIBPAW_DEALLOCATE(Pawtab%rhoij0) + end if + if (allocated(Pawtab%shape_alpha)) then + LIBPAW_DEALLOCATE(Pawtab%shape_alpha) + end if + if (allocated(Pawtab%shape_q)) then + LIBPAW_DEALLOCATE(Pawtab%shape_q) + end if + if (allocated(Pawtab%shapefunc)) then + LIBPAW_DEALLOCATE(Pawtab%shapefunc) + end if + if (allocated(Pawtab%shapefncg)) then + LIBPAW_DEALLOCATE(Pawtab%shapefncg) + end if + if (allocated(Pawtab%sij)) then + LIBPAW_DEALLOCATE(Pawtab%sij) + end if + if (allocated(Pawtab%tcoredens)) then + LIBPAW_DEALLOCATE(Pawtab%tcoredens) + end if + if (allocated(Pawtab%tcoretau)) then + LIBPAW_DEALLOCATE(Pawtab%tcoretau) + end if + if (allocated(Pawtab%tcorespl)) then + LIBPAW_DEALLOCATE(Pawtab%tcorespl) + end if + if (allocated(Pawtab%tcoretauspl)) then + LIBPAW_DEALLOCATE(Pawtab%tcoretauspl) + end if + if (allocated(Pawtab%tnablaphi)) then + LIBPAW_DEALLOCATE(Pawtab%tnablaphi) + end if + if (allocated(Pawtab%tphi)) then + LIBPAW_DEALLOCATE(Pawtab%tphi) + end if + if (allocated(Pawtab%tphitphj)) then + LIBPAW_DEALLOCATE(Pawtab%tphitphj) + end if + if (allocated(Pawtab%tproj)) then + LIBPAW_DEALLOCATE(Pawtab%tproj) + end if + if (allocated(Pawtab%tvalespl)) then + LIBPAW_DEALLOCATE(Pawtab%tvalespl) + end if + if (allocated(Pawtab%vee)) then + LIBPAW_DEALLOCATE(Pawtab%vee) + end if + if (allocated(Pawtab%Vex)) then + LIBPAW_DEALLOCATE(Pawtab%Vex) + end if + if (allocated(Pawtab%vhtnzc)) then + LIBPAW_DEALLOCATE(Pawtab%vhtnzc) + end if + if (allocated(Pawtab%VHnZC)) then + LIBPAW_DEALLOCATE(Pawtab%VHnZC) + end if + if (allocated(Pawtab%vminushalf)) then + LIBPAW_DEALLOCATE(Pawtab%vminushalf) + end if + if (allocated(Pawtab%zioneff)) then + LIBPAW_DEALLOCATE(Pawtab%zioneff) + end if + + call wvlpaw_free(Pawtab%wvl) + + ! === Reset all flags and sizes === + +!CAUTION: do not reset these flags +!They are set from input data and must be kept +!Pawtab%has_kij=0 +!Pawtab%has_tproj=0 +!Pawtab%has_coretau=0 +!Pawtab%has_tvale=0 +!Pawtab%has_vhtnzc=0 +!Pawtab%has_vhnzc=0 +!Pawtab%has_vminushalf=0 +!Pawtab%has_nabla=0 +!Pawtab%has_nablaphi=0 +!Pawtab%has_shapefncg=0 +!Pawtab%has_wvl=0 + + Pawtab%usetcore=0 + Pawtab%usexcnhat=0 + Pawtab%useexexch=0 + Pawtab%usepawu=0 + Pawtab%usepotzero=0 + Pawtab%usespnorb=0 + Pawtab%mqgrid=0 + Pawtab%mqgrid_shp=0 + + Pawtab%basis_size=0 + Pawtab%ij_proj=0 + Pawtab%ij_size=0 + Pawtab%lcut_size=0 + Pawtab%l_size=0 + Pawtab%lexexch=-1 + Pawtab%lmn_size=0 + Pawtab%lmn2_size=0 + Pawtab%lmnmix_sz=0 + Pawtab%lpawu=-1 + Pawtab%nproju=0 + Pawtab%option_interaction_pawu=0 + Pawtab%mesh_size=0 + Pawtab%partialwave_mesh_size=0 + Pawtab%core_mesh_size=0 + Pawtab%coretau_mesh_size=0 + Pawtab%vminus_mesh_size=0 + Pawtab%tnvale_mesh_size=0 + Pawtab%shape_type=-10 + +end subroutine pawtab_free_0D +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawtab/pawtab_free_1D +!! NAME +!! pawtab_free_1D +!! +!! FUNCTION +!! Destroy (deallocate) all pointers in an array of pawtab data structures +!! +!! SOURCE + +subroutine pawtab_free_1D(Pawtab) + +!Arguments ------------------------------------ + type(pawtab_type),intent(inout) :: Pawtab(:) + +!Local variables------------------------------- + integer :: ii,nn + +! ************************************************************************* + + !@pawtab_type + + nn=size(Pawtab) + if (nn==0) return + + do ii=1,nn + call pawtab_free_0D(Pawtab(ii)) + end do + +end subroutine pawtab_free_1D +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawtab/pawtab_set_flags_0D +!! NAME +!! pawtab_set_flags_0D +!! +!! FUNCTION +!! Set flags controlling optional arrays in a pawtab datastructure +!! +!! SOURCE + +subroutine pawtab_set_flags_0D(Pawtab,has_coretau,has_fock,has_kij,has_tproj,has_tvale,has_vhnzc,& +& has_vhtnzc,has_nabla,has_nablaphi,has_shapefncg,has_vminushalf,has_wvl) + +!Arguments ------------------------------------ + integer,intent(in),optional :: has_coretau,has_fock,has_kij,has_tproj,has_tvale + integer,intent(in),optional :: has_vhnzc,has_vhtnzc,has_vminushalf + integer,intent(in),optional :: has_nabla,has_nablaphi,has_shapefncg,has_wvl + type(pawtab_type),intent(inout) :: Pawtab + +!Local variables------------------------------- + +! ************************************************************************* + + !@pawtab_type + + Pawtab%has_fock =0 + Pawtab%has_kij =0 + Pawtab%has_tproj =0 + Pawtab%has_tvale =0 + Pawtab%has_coretau =0 + Pawtab%has_vhnzc =0 + Pawtab%has_vhtnzc =0 + Pawtab%has_nabla =0 + Pawtab%has_nablaphi =0 + Pawtab%has_shapefncg =0 + Pawtab%has_vminushalf=0 + Pawtab%has_wvl =0 + if (present(has_fock)) Pawtab%has_fock=has_fock + if (present(has_kij)) Pawtab%has_kij=has_kij + if (present(has_tproj)) Pawtab%has_tproj=has_tproj + if (present(has_tvale)) Pawtab%has_tvale=has_tvale + if (present(has_coretau)) Pawtab%has_coretau=has_coretau + if (present(has_vhnzc)) Pawtab%has_vhnzc=has_vhnzc + if (present(has_vhtnzc)) Pawtab%has_vhtnzc=has_vhtnzc + if (present(has_nabla)) Pawtab%has_nabla=has_nabla + if (present(has_nablaphi)) Pawtab%has_nablaphi=has_nablaphi + if (present(has_shapefncg) )Pawtab%has_shapefncg=has_shapefncg + if (present(has_vminushalf))Pawtab%has_vminushalf=has_vminushalf + if (present(has_wvl)) Pawtab%has_wvl=has_wvl + +end subroutine pawtab_set_flags_0D +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawtab/pawtab_set_flags_1D +!! NAME +!! pawtab_set_flags_1D +!! +!! FUNCTION +!! Set flags controlling optional arrays in an array of pawtab datastructures +!! if (present(has_tvale)) Pawtab%has_tvale=has_tvale + +!! SOURCE + +subroutine pawtab_set_flags_1D(Pawtab,has_coretau,has_fock,has_kij,has_tproj,has_tvale,has_vhnzc,& +& has_vhtnzc,has_nabla,has_nablaphi,has_shapefncg,has_vminushalf,has_wvl) + +!Arguments ------------------------------------ + integer,intent(in),optional :: has_coretau,has_fock,has_kij,has_tproj,has_tvale,has_vhnzc,has_vhtnzc + integer,intent(in),optional :: has_nabla,has_nablaphi,has_shapefncg,has_vminushalf,has_wvl + type(pawtab_type),intent(inout) :: Pawtab(:) + +!Local variables------------------------------- + integer :: ii,nn + +! ************************************************************************* + + !@pawtab_type + + nn=size(Pawtab) + if (nn==0) return + + do ii=1,nn + Pawtab(ii)%has_fock =0 + Pawtab(ii)%has_kij =0 + Pawtab(ii)%has_tproj =0 + Pawtab(ii)%has_tvale =0 + Pawtab(ii)%has_coretau =0 + Pawtab(ii)%has_vhnzc =0 + Pawtab(ii)%has_vhtnzc =0 + Pawtab(ii)%has_nabla =0 + Pawtab(ii)%has_nablaphi =0 + Pawtab(ii)%has_shapefncg =0 + Pawtab(ii)%has_vminushalf=0 + Pawtab(ii)%has_wvl =0 + if (present(has_fock)) Pawtab(ii)%has_fock=has_fock + if (present(has_kij)) Pawtab(ii)%has_kij=has_kij + if (present(has_tproj)) Pawtab(ii)%has_tproj=has_tproj + if (present(has_tvale)) Pawtab(ii)%has_tvale=has_tvale + if (present(has_coretau)) Pawtab(ii)%has_coretau=has_coretau + if (present(has_vhnzc)) Pawtab(ii)%has_vhnzc=has_vhnzc + if (present(has_vhtnzc)) Pawtab(ii)%has_vhtnzc=has_vhtnzc + if (present(has_nabla)) Pawtab(ii)%has_nabla=has_nabla + if (present(has_nablaphi)) Pawtab(ii)%has_nablaphi=has_nablaphi + if (present(has_shapefncg)) Pawtab(ii)%has_shapefncg=has_shapefncg + if (present(has_vminushalf))Pawtab(ii)%has_vminushalf=has_vminushalf + if (present(has_wvl)) Pawtab(ii)%has_wvl=has_wvl + end do + +end subroutine pawtab_set_flags_1D +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawtab/pawtab_print +!! NAME +!! pawtab_print +!! +!! FUNCTION +!! Print out the content of a pawtab datastructure +!! +!! INPUTS +!! Pawtab Only for PAW, TABulated data initialized at start +!! +!! OUTPUT +!! Only writing +!! +!! SOURCE + +subroutine pawtab_print(Pawtab,header,unit,prtvol,mode_paral) + +!Arguments ------------------------------------ +!scalars + integer,optional,intent(in) :: unit,prtvol + character(len=4),optional,intent(in) :: mode_paral + character(len=*),optional,intent(in) :: header +!arrays + type(Pawtab_type) :: Pawtab(:) + +!Local variables------------------------------- +!scalars + integer :: ityp,ntypat,my_unt,my_prtvol + character(len=4) :: my_mode + character(len=500) :: msg + +! ************************************************************************* + + my_unt =ab_out ; if (PRESENT(unit )) my_unt =unit + my_prtvol=0 ; if (PRESENT(prtvol )) my_prtvol=prtvol + my_mode ='COLL' ; if (PRESENT(mode_paral)) my_mode =mode_paral + + write(msg,'(6a)')& +& ' ==================================== ',ch10,& +& ' ==== Info on PAW TABulated data ==== ',ch10,& +& ' ==================================== ',ch10 + if (PRESENT(header)) msg=' ==== '//TRIM(ADJUSTL(header))//' ==== ' + call wrtout(my_unt,msg,my_mode) + + ntypat=SIZE(Pawtab(:)) + + do ityp=1,ntypat + + ! Print out integer values (dimensions) + write(msg,'(a)')' ' + call wrtout(my_unt,msg,my_mode) + write(msg,'(a)')' ****************************** ' + call wrtout(my_unt,msg,my_mode) + write(msg,'(a,i4,a)')' **** Atom type ',ityp,' **** ' + call wrtout(my_unt,msg,my_mode) + write(msg,'(a)')' ****************************** ' + call wrtout(my_unt,msg,my_mode) + write(msg,'(a,i4)')' Number of (n,l) elements ....................... ',Pawtab(ityp)%basis_size + call wrtout(my_unt,msg,my_mode) + write(msg,'(a,i4)')' Number of (l,m,n) elements ..................... ',Pawtab(ityp)%lmn_size + call wrtout(my_unt,msg,my_mode) + write(msg,'(a,i4)')' Number of (i,j) elements (packed form) ......... ',Pawtab(ityp)%ij_size + call wrtout(my_unt,msg,my_mode) + write(msg,'(a,i4)')' Max L+1 leading to non-zero Gaunt .............. ',Pawtab(ityp)%l_size + call wrtout(my_unt,msg,my_mode) + write(msg,'(a,i4)')' Max L+1 leading to non-zero Gaunt (pawlcutd) ... ',Pawtab(ityp)%lcut_size + call wrtout(my_unt,msg,my_mode) + write(msg,'(a,i4)')' lmn2_size ...................................... ',Pawtab(ityp)%lmn2_size + call wrtout(my_unt,msg,my_mode) + write(msg,'(a,i4)')' lmnmix_sz ...................................... ',Pawtab(ityp)%lmnmix_sz + call wrtout(my_unt,msg,my_mode) + write(msg,'(a,i4)')' Size of radial mesh ............................ ',Pawtab(ityp)%mesh_size + call wrtout(my_unt,msg,my_mode) + write(msg,'(a,i4)')' Size of radial mesh for partial waves........... ',Pawtab(ityp)%partialwave_mesh_size + call wrtout(my_unt,msg,my_mode) + write(msg,'(a,i4)')' Size of radial mesh for [pseudo] core density... ',Pawtab(ityp)%core_mesh_size + call wrtout(my_unt,msg,my_mode) + write(msg,'(a,i4)')' Size of radial mesh for [pseudo] kin core density',Pawtab(ityp)%coretau_mesh_size + call wrtout(my_unt,msg,my_mode) + write(msg,'(a,i4)')' Size of radial mesh for pseudo valence density.. ',Pawtab(ityp)%tnvale_mesh_size + call wrtout(my_unt,msg,my_mode) + write(msg,'(a,i4)')' No of Q-points for tcorespl/tvalespl/tcoretauspl ',Pawtab(ityp)%mqgrid + call wrtout(my_unt,msg,my_mode) + write(msg,'(a,i4)')' No of Q-points for the radial shape functions .. ',Pawtab(ityp)%mqgrid_shp + call wrtout(my_unt,msg,my_mode) + write(msg,'(a,i4)')' Radial shape function type ..................... ',Pawtab(ityp)%shape_type + call wrtout(my_unt,msg,my_mode) + write(msg,'(a,i4)')' shape_lambda ................................... ',Pawtab(ityp)%shape_lambda + call wrtout(my_unt,msg,my_mode) + write(msg,'(a,i4)')' Use pseudized core density ..................... ',Pawtab(ityp)%usetcore + call wrtout(my_unt,msg,my_mode) + write(msg,'(a,i4)')' Option for the use of hat density in XC terms .. ',Pawtab(ityp)%usexcnhat + call wrtout(my_unt,msg,my_mode) + write(msg,'(a,i4)')' Use DFT+U ...................................... ',Pawtab(ityp)%usepawu + call wrtout(my_unt,msg,my_mode) + if (Pawtab(ityp)%usepawu/=0) then + write(msg,'(a,i4)')' L on which U is applied ........................ ',Pawtab(ityp)%lpawu + call wrtout(my_unt,msg,my_mode) + end if + write(msg,'(a,i4)')' Use Local Exact exchange ....................... ',Pawtab(ityp)%useexexch + call wrtout(my_unt,msg,my_mode) + if (Pawtab(ityp)%useexexch/=0) then + write(msg,'(a,i4)')' L on which local exact-exchange is applied ..... ',Pawtab(ityp)%lexexch + call wrtout(my_unt,msg,my_mode) + end if + if (Pawtab(ityp)%usepawu/=0.or.Pawtab(ityp)%useexexch/=0) then + write(msg,'(a,i4)')' Number of (i,j) elements for PAW+U or EXX ..... ',Pawtab(ityp)%ij_proj + call wrtout(my_unt,msg,my_mode) + write(msg,'(a,i4)')' Number of projectors on which U or EXX acts .... ',Pawtab(ityp)%nproju + call wrtout(my_unt,msg,my_mode) + write(msg,'(a,i4)')' Option interaction for PAW+U (double-counting).. ',Pawtab(ityp)%option_interaction_pawu + call wrtout(my_unt,msg,my_mode) + end if + write(msg,'(a,i4)')' Use potential zero ............................. ',Pawtab(ityp)%usepotzero + call wrtout(my_unt,msg,my_mode) + write(msg,'(a,i4)')' Use spin-orbit coupling ........................ ',Pawtab(ityp)%usespnorb + call wrtout(my_unt,msg,my_mode) + + ! "Has" flags + write(msg,'(a,i4)')' Has Fock ...................................... ',Pawtab(ityp)%has_fock + call wrtout(my_unt,msg,my_mode) + write(msg,'(a,i4)')' Has kij ...................................... ',Pawtab(ityp)%has_kij + call wrtout(my_unt,msg,my_mode) + write(msg,'(a,i4)')' Has tproj ...................................... ',Pawtab(ityp)%has_tproj + call wrtout(my_unt,msg,my_mode) + write(msg,'(a,i4)')' Has tvale ...................................... ',Pawtab(ityp)%has_tvale + call wrtout(my_unt,msg,my_mode) + write(msg,'(a,i4)')' Has coretau .................................... ',Pawtab(ityp)%has_coretau + call wrtout(my_unt,msg,my_mode) + write(msg,'(a,i4)')' Has vhtnzc ..................................... ',Pawtab(ityp)%has_vhtnzc + call wrtout(my_unt,msg,my_mode) + write(msg,'(a,i4)')' Has vhnzc ...................................... ',Pawtab(ityp)%has_vhnzc + call wrtout(my_unt,msg,my_mode) + write(msg,'(a,i4)')' Has vminushalf ................................. ',Pawtab(ityp)%has_vminushalf + call wrtout(my_unt,msg,my_mode) + write(msg,'(a,i4)')' Has nabla ...................................... ',Pawtab(ityp)%has_nabla + call wrtout(my_unt,msg,my_mode) + write(msg,'(a,i4)')' Has nablaphi ................................... ',Pawtab(ityp)%has_nablaphi + call wrtout(my_unt,msg,my_mode) + write(msg,'(a,i4)')' Has shapefuncg ................................. ',Pawtab(ityp)%has_shapefncg + call wrtout(my_unt,msg,my_mode) + write(msg,'(a,i4)')' Has wvl ........................................ ',Pawtab(ityp)%has_wvl + call wrtout(my_unt,msg,my_mode) + ! + ! Real scalars + write(msg,'(a,es16.8)')' beta ............................................',Pawtab(ityp)%beta + call wrtout(my_unt,msg,my_mode) + write(msg,'(a,es16.8)')' 1/q d(tNcore(q))/dq for q=0 .....................',Pawtab(ityp)%dncdq0 + call wrtout(my_unt,msg,my_mode) + write(msg,'(a,es16.8)')' d^2(tNcore(q))/dq^2 for q=0 .....................',Pawtab(ityp)%d2ncdq0 + call wrtout(my_unt,msg,my_mode) + write(msg,'(a,es16.8)')' 1/q d(tNvale(q))/dq for q=0 .....................',Pawtab(ityp)%dnvdq0 + call wrtout(my_unt,msg,my_mode) + if (Pawtab(ityp)%has_coretau/=0) then + write(msg,'(a,es16.8)')' 1/q d(tTAUcore(q))/dq for q=0 ...................',Pawtab(ityp)%dtaucdq0 + call wrtout(my_unt,msg,my_mode) + end if + if (Pawtab(ityp)%has_fock/=0) then + write(msg,'(a,es16.8)')' Core-core Fock energy ..........................',Pawtab(ityp)%ex_cc + call wrtout(my_unt,msg,my_mode) + end if + write(msg,'(a,es16.8)')' XC energy for the core density ..................',Pawtab(ityp)%exccore + call wrtout(my_unt,msg,my_mode) + write(msg,'(a,es16.8)')' Lamb shielding due to core density ..............',Pawtab(ityp)%lamb_shielding + call wrtout(my_unt,msg,my_mode) + write(msg,'(a,es16.8)')' Radius of the PAW sphere ........................',Pawtab(ityp)%rpaw + call wrtout(my_unt,msg,my_mode) + write(msg,'(a,es16.8)')' Compensation charge radius (if >rshp, g(r)=0) ...',Pawtab(ityp)%rshp !(if r>rshp, g(r)=zero) + call wrtout(my_unt,msg,my_mode) + if (Pawtab(ityp)%shape_type==2) then + write(msg,'(a,es16.8)')' Sigma parameter in gaussian shape function ......',Pawtab(ityp)%shape_sigma !(shape_type=2) + call wrtout(my_unt,msg,my_mode) + end if + if (Pawtab(ityp)%usepawu/=0) then + write(msg,'(a,es16.8)')' Value of the U parameter [eV] ...................',Pawtab(ityp)%upawu*Ha_eV + call wrtout(my_unt,msg,my_mode) + write(msg,'(a,es16.8)')' Value of the J parameter [eV] ...................',Pawtab(ityp)%jpawu*Ha_eV + call wrtout(my_unt,msg,my_mode) + end if + if (Pawtab(ityp)%useexexch/=0) then + write(msg,'(a,es16.8)')' Mixing of exact exchange (PBE0) .................',Pawtab(ityp)%exchmix + call wrtout(my_unt,msg,my_mode) + end if + if (associated(Pawtab(ityp)%wvl)) then + write(msg,'(a,es16.8)')' WARNING: This Pawtab structure contains WVL data.' + call wrtout(my_unt,msg,my_mode) + end if + + end do ! ityp + + ! The other (huge) arrays are not reported.. + +end subroutine pawtab_print +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawtap/pawtab_get_lsize +!! NAME +!! pawtab_get_lsize +!! +!! FUNCTION +!! From an array of pawtab datastructures, get, for each atom, the value +!! of "l_size" parameter. +!! l_size is the maximum value of l accessible by a product of 2 partial waves; +!! it may be cut by dtset%pawlcutd parameter +!! +!! INPUTS +!! [mpi_atmtab(:)]=--optional-- indexes of the atoms treated by current proc +!! natom= number of atoms (may be a local or absolute number of atoms) +!! typat(:)= list of atom types +!! +!! OUTPUT +!! l_size_atm(natom)=output array of l_size values (for each atom) +!! +!! NOTES +!! This function returns an allocatable integer array which may be allocated +!! on the fly. +!! +!! SOURCE + +subroutine pawtab_get_lsize(Pawtab,l_size_atm,natom,typat, & +& mpi_atmtab) ! Optional argument + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: natom +!arrays + integer,intent(in) :: typat(:) + integer,optional,intent(in) :: mpi_atmtab(:) + integer,allocatable,intent(inout) :: l_size_atm(:) + type(pawtab_type),intent(in) :: pawtab(:) + +!Local variables------------------------------- + integer :: ia,ityp,natom_typat + character(len=100) :: msg + +! ************************************************************************* + + !@pawtab_type + + natom_typat=count(typat>0) + if (size(pawtab)=a pawtab datastructure +!! +!! SOURCE + +subroutine pawtab_bcast(pawtab,comm_mpi,only_from_file) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: comm_mpi + logical,optional,intent(in) :: only_from_file + type(pawtab_type),intent(inout) :: pawtab + +!Local variables------------------------------- +!scalars + integer :: ierr,ii,me,nn_dpr,nn_dpr_arr,nn_int,nn_int_arr + integer :: siz_indklmn,siz_indlmn,siz_klmntomn,siz_kmix,siz_lnproju,siz_orbitals + integer :: siz_coredens,siz_coretau,siz_dij0,siz_dltij,siz_dshpfunc,siz_eijkl,siz_eijkl_sr + integer :: siz_euijkl,siz_euij_fll,siz_fk,siz_gammaij,siz_gnorm,siz_fock,siz_kij + integer :: siz_nabla_ij,siz_nabla_im_ij,siz_nablaphi,siz_phi,siz_phiphj,siz_phiphjint + integer :: siz_ph0phiint,siz_qgrid_shp,siz_qijl,siz_rad_for_spline,siz_rhoij0 + integer :: siz_shape_alpha,siz_shape_q,siz_shapefunc,siz_shapefncg,siz_sij,siz_tcoredens + integer :: siz_tcoretau,siz_tcorespl,siz_tcoretauspl,siz_tnablaphi,siz_tphi,siz_tphitphj + integer :: siz_tproj,siz_tvalespl,siz_vee,siz_vex,siz_vhtnzc,siz_vhnzc,siz_vminushalf + integer :: siz_zioneff,siz_wvlpaw,siz_wvl_pngau,siz_wvl_parg,siz_wvl_pfac + integer :: siz_wvl_rholoc_rad,siz_wvl_rholoc_d,sz1,sz2 + logical :: full_broadcast + character (len=500) :: msg,msg0 +!arrays + integer :: nn(4) + integer,allocatable :: list_int(:) + real(dp),allocatable :: list_dpr(:) + +!************************************************************************* + + me=xmpi_comm_rank(comm_mpi) + full_broadcast=.true.;if (present(only_from_file)) full_broadcast=(.not.only_from_file) + + nn_int=0 ; nn_int_arr=0 ; nn_dpr=0 ; nn_dpr_arr=0 + +!========================================================================= +!Compute the amount of data to communicate +!========================================================================= + + if (me==0) then + msg='' + +!Integers (read from psp file) +!------------------------------------------------------------------------- +! basis_size,has_coretau,has_fock,has_kij,has_shapefncg,has_nabla,has_nablaphi,has_tproj +! has_tvale,has_vhtnzc,has_vhnzc,has_vminushalf,has_wvl,ij_size,l_size,lmn_size,lmn2_size +! mesh_size,partialwave_mesh_size,core_mesh_size,coretau_mesh_size,vminus_mesh_size +! tnvale_mesh_size,mqgrid,shape_lambda,shape_type,usetcore,usexcnhat + nn_int=nn_int+28 + +!Integers (depending on the parameters of the calculation) +!------------------------------------------------------------------------- +! ij_proj,lcut_size,lexexch,lmnmix_sz,lpawu,mqgrid_shp,nproju,useexexch,usepawu,usepotzero, +! option_interaction_pawu,usespnorb + if (full_broadcast) nn_int=nn_int+12 + +!Reals (read from psp file) +!------------------------------------------------------------------------- +! beta,dncdq0,d2ncdq0,dnvdq0,dtaucdq0,ex_cc,exccore,lamb_shielding,rpaw,rshp,rcore,rcoretau,shape_sigma + nn_dpr=nn_dpr+13 + +!Reals (depending on the parameters of the calculation) +!------------------------------------------------------------------------- +! exchmix,f4of2_sla,f6of2_sla,jpawu,upawu + if (full_broadcast) nn_dpr=nn_dpr+5 + +!Integers arrays (read from psp file) +!------------------------------------------------------------------------- + siz_indlmn=0 ; siz_orbitals=0 + nn_int=nn_int+2 + if (allocated(pawtab%indlmn)) then + siz_indlmn=size(pawtab%indlmn) !(6,lmn_size) + if (siz_indlmn/=6*pawtab%lmn_size) msg=trim(msg)//' indlmn' + nn_int_arr=nn_int_arr+siz_indlmn + end if + if (allocated(pawtab%orbitals)) then + siz_orbitals=size(pawtab%orbitals) !(basis_size) + if (siz_orbitals/=pawtab%basis_size) msg=trim(msg)//' orbitals' + nn_int_arr=nn_int_arr+siz_orbitals + end if + +!Integers arrays (depending on the parameters of the calculation) +!------------------------------------------------------------------------- + siz_indklmn=0 ; siz_klmntomn=0 ; siz_kmix=0 ; siz_lnproju=0 + if (full_broadcast) then + nn_int=nn_int+4 + if (allocated(pawtab%indklmn)) then + siz_indklmn=size(pawtab%indklmn) !(6,lmn2_size) + if (siz_indklmn/=8*pawtab%lmn2_size) msg=trim(msg)//' indklmn' + nn_int_arr=nn_int_arr+siz_indklmn + end if + if (allocated(pawtab%klmntomn)) then + siz_klmntomn=size(pawtab%klmntomn) !(4,lmn2_size) + if (siz_klmntomn/=4*pawtab%lmn2_size) msg=trim(msg)//' klmntomn' + nn_int_arr=nn_int_arr+siz_klmntomn + end if + if (allocated(pawtab%kmix)) then + siz_kmix=size(pawtab%kmix) !(lmnmix_sz) + if (siz_kmix/=6*pawtab%lmnmix_sz) msg=trim(msg)//' kmix' + nn_int_arr=nn_int_arr+siz_kmix + end if + if (allocated(pawtab%lnproju)) then + siz_lnproju=size(pawtab%lnproju) !(nproju) + if (siz_lnproju/=pawtab%nproju) msg=trim(msg)//' lnproju' + nn_int_arr=nn_int_arr+siz_lnproju + end if + end if ! full_broadcast + +!Reals arrays (read from psp file) +!------------------------------------------------------------------------- + siz_coredens=0 ; siz_coretau=0 ; siz_dij0=0 ; siz_kij=0 ; siz_fock=0 + siz_phi=0 ; siz_rhoij0=0 ; siz_shape_alpha=0 + siz_shape_q=0 ; siz_shapefunc=0 ; siz_tcoredens=0; siz_tcoretau=0 + siz_tcorespl=0 ; siz_tcoretauspl=0; siz_tphi=0 ; siz_tproj=0 + siz_tvalespl=0 ; siz_vhtnzc=0 ; siz_vhnzc=0 ; siz_vminushalf=0 + nn_int=nn_int+20 + + if (allocated(pawtab%coredens)) then + siz_coredens=size(pawtab%coredens) !(core_mesh_size) + if (siz_coredens/=pawtab%core_mesh_size) & +& msg=trim(msg)//' coredens' + nn_dpr=nn_dpr+siz_coredens + end if + if (allocated(pawtab%coretau)) then + siz_coretau=size(pawtab%coretau) !(coretau_mesh_size) + if (siz_coretau/=pawtab%coretau_mesh_size) & +& msg=trim(msg)//' coretau' + nn_dpr=nn_dpr+siz_coretau + end if + if (allocated(pawtab%dij0)) then + siz_dij0=size(pawtab%dij0) !(lmn2_size) + if (siz_dij0/=pawtab%lmn2_size) msg=trim(msg)//' dij0' + nn_dpr=nn_dpr+siz_dij0 + end if + if (allocated(pawtab%ex_cvij)) then + siz_fock=size(pawtab%ex_cvij) !(lmn2_size) + if (siz_fock/=pawtab%lmn2_size) msg=trim(msg)//' fock' + nn_dpr=nn_dpr+siz_fock + end if + if (allocated(pawtab%kij)) then + siz_kij=size(pawtab%kij) !(lmn2_size) + if (siz_kij/=pawtab%lmn2_size) msg=trim(msg)//' kij' + nn_dpr=nn_dpr+siz_kij + end if + if (allocated(pawtab%phi)) then + siz_phi=size(pawtab%phi) !(partialwave_mesh_size, basis_size) + if (siz_phi/=pawtab%partialwave_mesh_size*pawtab%basis_size) msg=trim(msg)//' phi' + nn_dpr=nn_dpr+siz_phi + end if + if (allocated(pawtab%rhoij0)) then + siz_rhoij0=size(pawtab%rhoij0) !(lmn2_size) + if (siz_rhoij0/=pawtab%lmn2_size) msg=trim(msg)//' rhoij0' + nn_dpr=nn_dpr+siz_rhoij0 + end if + if (allocated(pawtab%shape_alpha)) then + siz_shape_alpha=size(pawtab%shape_alpha) !(2,l_size) + if (siz_shape_alpha/=pawtab%l_size*2) msg=trim(msg)//' shape_alpha' + nn_dpr=nn_dpr+siz_shape_alpha + end if + if (allocated(pawtab%shape_q)) then + siz_shape_q=size(pawtab%shape_q) !(2,l_size) + if (siz_shape_q/=pawtab%l_size*2) msg=trim(msg)//' shape_q' + nn_dpr=nn_dpr+siz_shape_q + end if + if (allocated(pawtab%shapefunc)) then + siz_shapefunc=size(pawtab%shapefunc) !(mesh_size,l_size) + if (siz_shapefunc/=pawtab%mesh_size*pawtab%l_size) msg=trim(msg)//' shapefunc' + nn_dpr=nn_dpr+siz_shapefunc + end if + if (allocated(pawtab%tcoredens)) then + siz_tcoredens=size(pawtab%tcoredens) !(core_mesh_size,1 or 6) + if (siz_tcoredens/=pawtab%core_mesh_size.and.siz_tcoredens/=6*pawtab%core_mesh_size) & +& msg=trim(msg)//' tcoredens' + nn_dpr=nn_dpr+siz_tcoredens + end if + if (allocated(pawtab%tcoretau)) then + siz_tcoretau=size(pawtab%tcoretau) !(coretau_mesh_size,1) + if (siz_tcoretau/=pawtab%coretau_mesh_size) & +& msg=trim(msg)//' tcoretau' + nn_dpr=nn_dpr+siz_tcoretau + end if + if (allocated(pawtab%tcorespl)) then + siz_tcorespl=size(pawtab%tcorespl) !(mqgrid,2) + if (siz_tcorespl/=pawtab%mqgrid*2) msg=trim(msg)//' tcorespl' + nn_dpr=nn_dpr+siz_tcorespl + end if + if (allocated(pawtab%tcoretauspl)) then + siz_tcoretauspl=size(pawtab%tcoretauspl) !(mqgrid,2) + if (siz_tcoretauspl/=pawtab%mqgrid*2.and.siz_tcoretauspl/=0) msg=trim(msg)//' tcoretauspl' + nn_dpr=nn_dpr+siz_tcoretauspl + end if + if (allocated(pawtab%tphi)) then + siz_tphi=size(pawtab%tphi) !(partialwave_mesh_size, basis_size) + if (siz_tphi/=pawtab%partialwave_mesh_size*pawtab%basis_size) msg=trim(msg)//' tphi' + nn_dpr=nn_dpr+siz_tphi + end if + if (allocated(pawtab%tproj)) then + siz_tproj=size(pawtab%tproj) !(???,basis_size) + if (mod(siz_tproj,pawtab%basis_size)/=0) msg=trim(msg)//' tproj' + nn_dpr=nn_dpr+siz_tproj + end if + if (allocated(pawtab%tvalespl)) then + siz_tvalespl=size(pawtab%tvalespl) !(mqgrid or mesh_size or tnvale_mesh_size,2) + if (siz_tvalespl/=2*pawtab%mqgrid.and.siz_tvalespl/=2*pawtab%mesh_size.and. & +& siz_tvalespl/=2*pawtab%tnvale_mesh_size) msg=trim(msg)//' tvalespl' + nn_dpr=nn_dpr+siz_tvalespl + end if + if (allocated(pawtab%vhtnzc)) then + siz_vhtnzc=size(pawtab%vhtnzc) !(mesh_size) + if (siz_vhtnzc/=pawtab%mesh_size) msg=trim(msg)//' vhtnzc' + nn_dpr=nn_dpr+siz_vhtnzc + end if + if (allocated(pawtab%vhnzc)) then + siz_vhnzc=size(pawtab%vhnzc) !(mesh_size) + if (siz_vhnzc/=pawtab%mesh_size) msg=trim(msg)//' vhnzc' + nn_dpr=nn_dpr+siz_vhnzc + end if + if (allocated(pawtab%vminushalf)) then + siz_vminushalf=size(pawtab%vminushalf) !(mesh_size) + if (siz_vminushalf/=pawtab%vminus_mesh_size) msg=trim(msg)//' vvminushalf' + nn_dpr=nn_dpr+siz_vminushalf + end if + +!Reals arrays (depending on the parameters of the calculation) +!------------------------------------------------------------------------- + siz_dltij=0 ; siz_dshpfunc=0 + siz_eijkl=0 ; siz_eijkl_sr=0 ; siz_euijkl=0 ; siz_euij_fll=0 + siz_fk=0 ; siz_gammaij=0 ; siz_gnorm=0 + siz_nabla_ij=0 ; siz_nabla_im_ij=0 + siz_nablaphi=0 ; siz_phiphj=0 ; siz_phiphjint=0 ; siz_ph0phiint=0 + siz_qgrid_shp=0; siz_qijl=0 ; siz_rad_for_spline=0 + siz_shapefncg=0; siz_sij=0 ; siz_tnablaphi=0 ; siz_tphitphj=0 + siz_vee=0 ; siz_vex=0 ; siz_zioneff=0 + if (full_broadcast) then + nn_int=nn_int+25 + if (allocated(pawtab%dltij)) then + siz_dltij=size(pawtab%dltij) !(lmn2_size) + if (siz_dltij/=pawtab%lmn2_size) msg=trim(msg)//' dltij' + nn_dpr=nn_dpr+siz_dltij + end if + if (allocated(pawtab%dshpfunc)) then + siz_dshpfunc=size(pawtab%dshpfunc) !(mesh_size,l_size,4) + if (siz_dshpfunc/=pawtab%mesh_size*pawtab%l_size*4) msg=trim(msg)//' dshpfunc' + nn_dpr=nn_dpr+siz_dshpfunc + end if + if (allocated(pawtab%eijkl)) then + siz_eijkl=size(pawtab%eijkl) !(lmn2_size,lmn2_size) + if (siz_eijkl/=pawtab%lmn2_size*pawtab%lmn2_size) msg=trim(msg)//' eijkl' + nn_dpr=nn_dpr+siz_eijkl + end if + if (allocated(pawtab%eijkl_sr)) then + siz_eijkl_sr=size(pawtab%eijkl_sr) !(lmn2_size,lmn2_size) + if (siz_eijkl_sr/=pawtab%lmn2_size*pawtab%lmn2_size) msg=trim(msg)//' eijkl_sr' + nn_dpr=nn_dpr+siz_eijkl_sr + end if + if (allocated(pawtab%euijkl)) then + siz_euijkl=size(pawtab%euijkl) !(3,lmn_size,lmn_size,lmn_size,lmn_size) + if (siz_euijkl/=3*pawtab%lmn_size*pawtab%lmn_size*pawtab%lmn_size*pawtab%lmn_size) msg=trim(msg)//' euijkl' + nn_dpr=nn_dpr+siz_euijkl + end if + if (allocated(pawtab%euij_fll)) then + siz_euij_fll=size(pawtab%euij_fll) !(2,2,lmn_size,lmn_size,lmn_size,lmn_size) + if (siz_euij_fll/=4*pawtab%lmn_size*pawtab%lmn_size*pawtab%lmn_size*pawtab%lmn_size) msg=trim(msg)//' euij_fll' + nn_dpr=nn_dpr+siz_euij_fll + end if + if (allocated(pawtab%fk)) then + siz_fk=size(pawtab%fk) !(6,4) + if (siz_fk/=24) msg=trim(msg)//' fk' + nn_dpr=nn_dpr+siz_fk + end if + if (allocated(pawtab%gammaij)) then + siz_gammaij=size(pawtab%gammaij) !(l_size) + if (siz_gammaij/=pawtab%l_size) msg=trim(msg)//' gammaij' + nn_dpr=nn_dpr+siz_gammaij + end if + if (allocated(pawtab%gnorm)) then + siz_gnorm=size(pawtab%gnorm) !(l_size) + if (siz_gnorm/=pawtab%l_size) msg=trim(msg)//' gnorm' + nn_dpr=nn_dpr+siz_gnorm + end if + if (allocated(pawtab%nabla_ij)) then + siz_nabla_ij=size(pawtab%nabla_ij) !(3,lmn_size,lmn_size) + if (siz_nabla_ij/=pawtab%lmn_size) msg=trim(msg)//' nabla_ij' + nn_dpr=nn_dpr+siz_nabla_ij + end if + if (allocated(pawtab%nabla_im_ij)) then + siz_nabla_im_ij=size(pawtab%nabla_im_ij) !(3,lmn_size,lmn_size) + if (siz_nabla_im_ij/=pawtab%lmn_size) msg=trim(msg)//' nabla_im_ij' + nn_dpr=nn_dpr+siz_nabla_im_ij + end if + if (allocated(pawtab%nablaphi)) then + siz_phi=size(pawtab%nablaphi) !(partialwave_mesh_size, basis_size) + if (siz_nablaphi/=pawtab%partialwave_mesh_size*pawtab%basis_size) msg=trim(msg)//' nablaphi' + nn_dpr=nn_dpr+siz_nablaphi + end if + if (allocated(pawtab%phiphj)) then + siz_phiphj=size(pawtab%phiphj) !(mesh_size,ij_size) + if (siz_phiphj/=pawtab%mesh_size*pawtab%ij_size) msg=trim(msg)//' phiphj' + nn_dpr=nn_dpr+siz_phiphj + end if + if (allocated(pawtab%phiphjint)) then + siz_phiphjint=size(pawtab%phiphjint) !(ij_proj) + if (siz_phiphjint/=pawtab%ij_proj) msg=trim(msg)//' phiphjint' + nn_dpr=nn_dpr+siz_phiphjint + end if + if (allocated(pawtab%ph0phiint)) then + siz_ph0phiint=size(pawtab%ph0phiint) !(ij_proj) + if (siz_ph0phiint/=pawtab%ij_proj) msg=trim(msg)//' ph0phiint' + nn_dpr=nn_dpr+siz_ph0phiint + end if + if (allocated(pawtab%qgrid_shp)) then + siz_qgrid_shp=size(pawtab%qgrid_shp) !(mqgrid_shp) + if (siz_qgrid_shp/=pawtab%mqgrid_shp) msg=trim(msg)//' qgrid_shp' + nn_dpr=nn_dpr+siz_qgrid_shp + end if + if (allocated(pawtab%qijl)) then + siz_qijl=size(pawtab%qijl) !(l_size**2,lmn2_size) + if (siz_qijl/=pawtab%l_size**2*pawtab%lmn2_size) msg=trim(msg)//' qijl' + nn_dpr=nn_dpr+siz_qijl + end if + if (allocated(pawtab%rad_for_spline)) then + siz_rad_for_spline=size(pawtab%rad_for_spline) !(mesh_size) + if (siz_rad_for_spline/=pawtab%mesh_size) msg=trim(msg)//' rad_for_spline' + nn_dpr=nn_dpr+siz_rad_for_spline + end if + if (allocated(pawtab%shapefncg)) then + siz_shapefncg=size(pawtab%shapefncg) !(mqgrid_shp,2,l_size) + if (siz_shapefncg/=2*pawtab%mqgrid_shp*pawtab%l_size) msg=trim(msg)//' shapefncg' + nn_dpr=nn_dpr+siz_shapefncg + end if + if (allocated(pawtab%sij)) then + siz_sij=size(pawtab%sij) !(lmn2_size) + if (siz_sij/=pawtab%lmn2_size) msg=trim(msg)//' sij' + nn_dpr=nn_dpr+siz_sij + end if + if (allocated(pawtab%tnablaphi)) then + siz_tnablaphi=size(pawtab%tnablaphi) !(partialwave_mesh_size, basis_size) + if (siz_tnablaphi/=pawtab%partialwave_mesh_size*pawtab%basis_size) msg=trim(msg)//' tnablaphi' + nn_dpr=nn_dpr+siz_tnablaphi + end if + if (allocated(pawtab%tphitphj)) then + siz_tphitphj=size(pawtab%tphitphj) !(mesh_size,ij_size) + if (siz_tphitphj/=pawtab%mesh_size*pawtab%ij_size) msg=trim(msg)//' tphitphj' + nn_dpr=nn_dpr+siz_tphitphj + end if + if (allocated(pawtab%vee)) then + siz_vee=size(pawtab%vee) !(2*lpawu+1,2*lpawu+1,2*lpawu+1,2*lpawu+1) + if (siz_vee/=(2*pawtab%lpawu+1)**4) msg=trim(msg)//' vee' + nn_dpr=nn_dpr+siz_vee + end if + if (allocated(pawtab%vex)) then + siz_vex=size(pawtab%vex) !(2*lexexch+1,2*lexexch+1,2*lexexch+1,2*lexexch+1,4) + if (siz_vex/=4*(2*pawtab%lpawu+1)**4) msg=trim(msg)//' vex' + nn_dpr=nn_dpr+siz_vex + end if + if (allocated(pawtab%zioneff)) then + siz_zioneff=size(pawtab%zioneff) !(ij_proj) + if (siz_zioneff/=pawtab%ij_proj) msg=trim(msg)//' zioneff' + nn_dpr=nn_dpr+siz_zioneff + end if + end if ! full_broadcast + +!Datastructures (read from psp file) +!------------------------------------------------------------------------- + siz_wvl_pngau=0 ; siz_wvl_parg=0 ; siz_wvl_pfac=0 + siz_wvl_rholoc_rad=0 ; siz_wvl_rholoc_d=0 + siz_wvlpaw=0 + nn_int=nn_int+1 + if (associated(pawtab%wvl)) then + siz_wvlpaw=1 + nn_int=nn_int+3 +! wvl%npspcode_init_guess,wvl%ptotgau + nn_int=nn_int+2 + if (allocated(pawtab%wvl%pngau)) then + siz_wvl_pngau=size(pawtab%wvl%pngau) !(basis_size) + if (siz_wvl_pngau/=pawtab%basis_size) msg=trim(msg)//' wvl_pngau' + nn_int_arr=nn_int_arr+siz_wvl_pngau + end if + if (allocated(pawtab%wvl%parg)) then + siz_wvl_parg=size(pawtab%wvl%parg) !(2,ptotgau) + if (siz_wvl_parg/=2*pawtab%wvl%ptotgau) msg=trim(msg)//' wvl_parg' + nn_dpr_arr=nn_dpr_arr+siz_wvl_parg + end if + if (allocated(pawtab%wvl%pfac)) then + siz_wvl_pfac=size(pawtab%wvl%pfac ) !(2,ptotgau) + if (siz_wvl_pfac/=2*pawtab%wvl%ptotgau) msg=trim(msg)//' wvl_pfac' + nn_dpr_arr=nn_dpr_arr+siz_wvl_pfac + end if +! wvl%rholoc%msz + nn_int=nn_int+3 + if (pawtab%wvl%rholoc%msz>0) then + if (allocated(pawtab%wvl%rholoc%rad)) then + siz_wvl_rholoc_rad=size(pawtab%wvl%rholoc%rad) !(msz) + if (siz_wvl_rholoc_rad/=pawtab%wvl%rholoc%msz) msg=trim(msg)//' wvl_rholoc_rad' + nn_dpr_arr=nn_dpr_arr+siz_wvl_rholoc_rad + end if + if (allocated(pawtab%wvl%rholoc%d)) then + siz_wvl_rholoc_d=size(pawtab%wvl%rholoc%d) !(msz,4) + if (siz_wvl_rholoc_d/=4*pawtab%wvl%rholoc%msz) msg=trim(msg)//' wvl_rholoc_d' + nn_dpr_arr=nn_dpr_arr+siz_wvl_rholoc_d + end if + end if + end if + +!Datastructures (depending on the parameters of the calculation) +!------------------------------------------------------------------------- +! Nothing + +! Are the sizes OK ? + if (trim(msg)/='') then + write(msg0,'(3a)') & +& 'There is a problem with the size of the following array(s):',ch10,trim(msg) + LIBPAW_BUG(msg0) + end if + + end if ! me=0 + +!Broadcast the sizes of buffers +!========================================================================= + + if (me==0) then + nn(1)=nn_int ; nn(2)=nn_int_arr + nn(3)=nn_dpr ; nn(4)=nn_dpr_arr + end if + call xmpi_bcast(nn,0,comm_mpi,ierr) + if (me/=0) then + nn_int=nn(1) ; nn_int_arr=nn(2) + nn_dpr=nn(3) ; nn_dpr_arr=nn(4) + end if + +!Broadcast all the integer: sizes, integer scalars, integer arrays +!========================================================================= + + LIBPAW_ALLOCATE(list_int,(nn_int+nn_int_arr)) + +!Fill the buffer of the sender +!------------------------------------------------------------------------- + if (me==0) then + ii=1 + +!First the data read from a psp file +!................................... + +!Sizes of arrays (read from psp file) + list_int(ii)=siz_indlmn ;ii=ii+1 + list_int(ii)=siz_orbitals ;ii=ii+1 + list_int(ii)=siz_coredens ;ii=ii+1 + list_int(ii)=siz_coretau ;ii=ii+1 + list_int(ii)=siz_dij0 ;ii=ii+1 + list_int(ii)=siz_kij ;ii=ii+1 + list_int(ii)=siz_fock ;ii=ii+1 + list_int(ii)=siz_phi ;ii=ii+1 + list_int(ii)=siz_rhoij0 ;ii=ii+1 + list_int(ii)=siz_shape_alpha ;ii=ii+1 + list_int(ii)=siz_shape_q ;ii=ii+1 + list_int(ii)=siz_shapefunc ;ii=ii+1 + list_int(ii)=siz_tcoredens ;ii=ii+1 + list_int(ii)=siz_tcoretau ;ii=ii+1 + list_int(ii)=siz_tcorespl ;ii=ii+1 + list_int(ii)=siz_tcoretauspl ;ii=ii+1 + list_int(ii)=siz_tphi ;ii=ii+1 + list_int(ii)=siz_tproj ;ii=ii+1 + list_int(ii)=siz_tvalespl ;ii=ii+1 + list_int(ii)=siz_vhtnzc ;ii=ii+1 + list_int(ii)=siz_vhnzc ;ii=ii+1 + list_int(ii)=siz_vminushalf ;ii=ii+1 + list_int(ii)=siz_wvlpaw ;ii=ii+1 +!Integers (read from psp file) + list_int(ii)=pawtab%basis_size ;ii=ii+1 + list_int(ii)=pawtab%has_fock ;ii=ii+1 + list_int(ii)=pawtab%has_kij ;ii=ii+1 + list_int(ii)=pawtab%has_shapefncg ;ii=ii+1 + list_int(ii)=pawtab%has_nabla ;ii=ii+1 + list_int(ii)=pawtab%has_nablaphi ; ii=ii+1 + list_int(ii)=pawtab%has_tproj ;ii=ii+1 + list_int(ii)=pawtab%has_tvale ;ii=ii+1 + list_int(ii)=pawtab%has_coretau ;ii=ii+1 + list_int(ii)=pawtab%has_vhtnzc ;ii=ii+1 + list_int(ii)=pawtab%has_vhnzc ;ii=ii+1 + list_int(ii)=pawtab%has_vminushalf ;ii=ii+1 + list_int(ii)=pawtab%has_wvl ;ii=ii+1 + list_int(ii)=pawtab%ij_size ;ii=ii+1 + list_int(ii)=pawtab%l_size ;ii=ii+1 + list_int(ii)=pawtab%lmn_size ;ii=ii+1 + list_int(ii)=pawtab%lmn2_size ;ii=ii+1 + list_int(ii)=pawtab%mesh_size ;ii=ii+1 + list_int(ii)=pawtab%partialwave_mesh_size ;ii=ii+1 + list_int(ii)=pawtab%core_mesh_size ;ii=ii+1 + list_int(ii)=pawtab%coretau_mesh_size ;ii=ii+1 + list_int(ii)=pawtab%vminus_mesh_size ;ii=ii+1 + list_int(ii)=pawtab%tnvale_mesh_size ;ii=ii+1 + list_int(ii)=pawtab%mqgrid ;ii=ii+1 + list_int(ii)=pawtab%shape_lambda ;ii=ii+1 + list_int(ii)=pawtab%shape_type ;ii=ii+1 + list_int(ii)=pawtab%usetcore ;ii=ii+1 + list_int(ii)=pawtab%usexcnhat ;ii=ii+1 +!Integer arrays (read from psp file) + if (siz_indlmn>0) then + list_int(ii:ii+siz_indlmn-1)=reshape(pawtab%indlmn,(/siz_indlmn/)) + ii=ii+siz_indlmn + end if + if (siz_orbitals>0) then + list_int(ii:ii+siz_orbitals-1)=pawtab%orbitals(1:siz_orbitals) + ii=ii+siz_orbitals + end if +!Integers in datastructures (read from psp file) + if (siz_wvlpaw==1) then + list_int(ii)=siz_wvl_pngau ;ii=ii+1 + list_int(ii)=siz_wvl_parg ;ii=ii+1 + list_int(ii)=siz_wvl_pfac ;ii=ii+1 + list_int(ii)=pawtab%wvl%npspcode_init_guess ;ii=ii+1 + list_int(ii)=pawtab%wvl%ptotgau ;ii=ii+1 + if (siz_wvl_pngau>0) then + list_int(ii:ii+siz_wvl_pngau-1)=pawtab%wvl%pngau(1:siz_wvl_pngau) + ii=ii+siz_wvl_pngau + end if + list_int(ii)=siz_wvl_rholoc_rad ;ii=ii+1 + list_int(ii)=siz_wvl_rholoc_d ;ii=ii+1 + list_int(ii)=pawtab%wvl%rholoc%msz ;ii=ii+1 + end if + +!Then the data initialized later +!................................... + if (full_broadcast) then + +!Sizes of arrays + list_int(ii)=siz_indklmn ;ii=ii+1 + list_int(ii)=siz_klmntomn ;ii=ii+1 + list_int(ii)=siz_kmix ;ii=ii+1 + list_int(ii)=siz_lnproju ;ii=ii+1 + list_int(ii)=siz_dltij ;ii=ii+1 + list_int(ii)=siz_dshpfunc ;ii=ii+1 + list_int(ii)=siz_eijkl ;ii=ii+1 + list_int(ii)=siz_eijkl_sr ;ii=ii+1 + list_int(ii)=siz_euijkl ;ii=ii+1 + list_int(ii)=siz_euij_fll ;ii=ii+1 + list_int(ii)=siz_fk ;ii=ii+1 + list_int(ii)=siz_gammaij ;ii=ii+1 + list_int(ii)=siz_gnorm ;ii=ii+1 + list_int(ii)=siz_nabla_ij ;ii=ii+1 + list_int(ii)=siz_nabla_im_ij ;ii=ii+1 + list_int(ii)=siz_nablaphi; ii=ii+1 + list_int(ii)=siz_phiphj ;ii=ii+1 + list_int(ii)=siz_phiphjint ;ii=ii+1 + list_int(ii)=siz_ph0phiint ;ii=ii+1 + list_int(ii)=siz_qgrid_shp ;ii=ii+1 + list_int(ii)=siz_qijl ;ii=ii+1 + list_int(ii)=siz_rad_for_spline ;ii=ii+1 + list_int(ii)=siz_shapefncg ;ii=ii+1 + list_int(ii)=siz_sij ;ii=ii+1 + list_int(ii)=siz_tnablaphi; ii=ii+1 + list_int(ii)=siz_tphitphj ;ii=ii+1 + list_int(ii)=siz_vee ;ii=ii+1 + list_int(ii)=siz_vex ;ii=ii+1 + list_int(ii)=siz_zioneff ;ii=ii+1 +!Integers + list_int(ii)=pawtab%ij_proj ;ii=ii+1 + list_int(ii)=pawtab%lcut_size ;ii=ii+1 + list_int(ii)=pawtab%lexexch ;ii=ii+1 + list_int(ii)=pawtab%lmnmix_sz ;ii=ii+1 + list_int(ii)=pawtab%lpawu ;ii=ii+1 + list_int(ii)=pawtab%mqgrid_shp ;ii=ii+1 + list_int(ii)=pawtab%nproju ;ii=ii+1 + list_int(ii)=pawtab%option_interaction_pawu ;ii=ii+1 + list_int(ii)=pawtab%useexexch ;ii=ii+1 + list_int(ii)=pawtab%usepawu ;ii=ii+1 + list_int(ii)=pawtab%usepotzero ;ii=ii+1 + list_int(ii)=pawtab%usespnorb ;ii=ii+1 +!Integer arrays + if (siz_indklmn>0) then + list_int(ii:ii+siz_indklmn-1)=reshape(pawtab%indklmn,(/siz_indklmn/)) + ii=ii+siz_indklmn + end if + if (siz_klmntomn>0) then + list_int(ii:ii+siz_klmntomn-1)=reshape(pawtab%klmntomn,(/siz_klmntomn/)) + ii=ii+siz_klmntomn + end if + if (siz_kmix>0) then + list_int(ii:ii+siz_kmix-1)=pawtab%kmix(1:siz_kmix) + ii=ii+siz_kmix + end if + if (siz_lnproju>0) then + list_int(ii:ii+siz_lnproju-1)=pawtab%lnproju(1:siz_lnproju) + ii=ii+siz_lnproju + end if + end if ! full_broadcast + ii=ii-1 + + if (ii/=nn_int+nn_int_arr) then + msg='the number of loaded integers is not correct!' + LIBPAW_BUG(msg) + end if + + end if ! me=0 + +!Perfom the communication +!------------------------------------------------------------------------- + + call xmpi_bcast(list_int,0,comm_mpi,ierr) + +!Fill the receiver from the buffer +!------------------------------------------------------------------------- + if (me/=0) then + ii=1 + +!First the data read from a psp file +!................................... + +!Sizes of arrays (read from psp file) + siz_indlmn=list_int(ii) ;ii=ii+1 + siz_orbitals=list_int(ii) ;ii=ii+1 + siz_coredens=list_int(ii) ;ii=ii+1 + siz_coretau=list_int(ii) ;ii=ii+1 + siz_dij0=list_int(ii) ;ii=ii+1 + siz_kij=list_int(ii) ;ii=ii+1 + siz_fock=list_int(ii) ;ii=ii+1 + siz_phi=list_int(ii) ;ii=ii+1 + siz_rhoij0=list_int(ii) ;ii=ii+1 + siz_shape_alpha=list_int(ii) ;ii=ii+1 + siz_shape_q=list_int(ii) ;ii=ii+1 + siz_shapefunc=list_int(ii) ;ii=ii+1 + siz_tcoredens=list_int(ii) ;ii=ii+1 + siz_tcoretau=list_int(ii) ;ii=ii+1 + siz_tcorespl=list_int(ii) ;ii=ii+1 + siz_tcoretauspl=list_int(ii) ;ii=ii+1 + siz_tphi=list_int(ii) ;ii=ii+1 + siz_tproj=list_int(ii) ;ii=ii+1 + siz_tvalespl=list_int(ii) ;ii=ii+1 + siz_vhtnzc=list_int(ii) ;ii=ii+1 + siz_vhnzc=list_int(ii) ;ii=ii+1 + siz_vminushalf=list_int(ii) ;ii=ii+1 + siz_wvlpaw=list_int(ii) ;ii=ii+1 +!Integers (read from psp file) + pawtab%basis_size=list_int(ii) ;ii=ii+1 + pawtab%has_fock=list_int(ii) ;ii=ii+1 + pawtab%has_kij=list_int(ii) ;ii=ii+1 + pawtab%has_shapefncg=list_int(ii) ;ii=ii+1 + pawtab%has_nabla=list_int(ii) ;ii=ii+1 + pawtab%has_nablaphi=list_int(ii) ; ii=ii+1 + pawtab%has_tproj=list_int(ii) ;ii=ii+1 + pawtab%has_tvale=list_int(ii) ;ii=ii+1 + pawtab%has_coretau=list_int(ii) ;ii=ii+1 + pawtab%has_vhtnzc=list_int(ii) ;ii=ii+1 + pawtab%has_vhnzc=list_int(ii) ;ii=ii+1 + pawtab%has_vminushalf=list_int(ii) ;ii=ii+1 + pawtab%has_wvl=list_int(ii) ;ii=ii+1 + pawtab%ij_size=list_int(ii) ;ii=ii+1 + pawtab%l_size=list_int(ii) ;ii=ii+1 + pawtab%lmn_size=list_int(ii) ;ii=ii+1 + pawtab%lmn2_size=list_int(ii) ;ii=ii+1 + pawtab%mesh_size=list_int(ii) ;ii=ii+1 + pawtab%partialwave_mesh_size=list_int(ii) ;ii=ii+1 + pawtab%core_mesh_size=list_int(ii) ;ii=ii+1 + pawtab%coretau_mesh_size=list_int(ii) ;ii=ii+1 + pawtab%vminus_mesh_size=list_int(ii) ;ii=ii+1 + pawtab%tnvale_mesh_size=list_int(ii) ;ii=ii+1 + pawtab%mqgrid=list_int(ii) ;ii=ii+1 + pawtab%shape_lambda=list_int(ii) ;ii=ii+1 + pawtab%shape_type=list_int(ii) ;ii=ii+1 + pawtab%usetcore=list_int(ii) ;ii=ii+1 + pawtab%usexcnhat=list_int(ii) ;ii=ii+1 +!Integer arrays (read from psp file) + if (allocated(pawtab%indlmn)) then + LIBPAW_DEALLOCATE(pawtab%indlmn) + end if + if (siz_indlmn>0) then + LIBPAW_ALLOCATE(pawtab%indlmn,(6,pawtab%lmn_size)) + pawtab%indlmn=reshape(list_int(ii:ii+siz_indlmn-1),(/6,pawtab%lmn_size/)) + ii=ii+siz_indlmn + end if + if (allocated(pawtab%orbitals)) then + LIBPAW_DEALLOCATE(pawtab%orbitals) + end if + if (siz_orbitals>0) then + LIBPAW_ALLOCATE(pawtab%orbitals,(pawtab%basis_size)) + pawtab%orbitals=list_int(ii:ii+pawtab%basis_size-1) + ii=ii+siz_orbitals + end if +!Integers in datastructures (read from psp file) + if (siz_wvlpaw==1) then + call wvlpaw_allocate(pawtab%wvl) + siz_wvl_pngau=list_int(ii) ;ii=ii+1 + siz_wvl_parg=list_int(ii) ;ii=ii+1 + siz_wvl_pfac=list_int(ii) ;ii=ii+1 + pawtab%wvl%npspcode_init_guess=list_int(ii) ;ii=ii+1 + pawtab%wvl%ptotgau=list_int(ii) ;ii=ii+1 + if (allocated(pawtab%wvl%pngau)) then + LIBPAW_DEALLOCATE(pawtab%wvl%pngau) + end if + if (siz_wvl_pngau>0) then + LIBPAW_ALLOCATE(pawtab%wvl%pngau,(pawtab%basis_size)) + pawtab%wvl%pngau=list_int(ii:ii+pawtab%basis_size-1) + ii=ii+siz_wvl_pngau + end if + siz_wvl_rholoc_rad=list_int(ii) ;ii=ii+1 + siz_wvl_rholoc_d=list_int(ii) ;ii=ii+1 + pawtab%wvl%rholoc%msz=list_int(ii) ;ii=ii+1 + end if + +!Then the data initialized later +!................................... + if (full_broadcast) then + +!Sizes of arrays + siz_indklmn=list_int(ii) ;ii=ii+1 + siz_klmntomn=list_int(ii) ;ii=ii+1 + siz_kmix=list_int(ii) ;ii=ii+1 + siz_lnproju=list_int(ii) ;ii=ii+1 + siz_dltij=list_int(ii) ;ii=ii+1 + siz_dshpfunc=list_int(ii) ;ii=ii+1 + siz_eijkl=list_int(ii) ;ii=ii+1 + siz_eijkl_sr=list_int(ii) ;ii=ii+1 + siz_euijkl=list_int(ii) ;ii=ii+1 + siz_euij_fll=list_int(ii) ;ii=ii+1 + siz_fk=list_int(ii) ;ii=ii+1 + siz_gammaij=list_int(ii) ;ii=ii+1 + siz_gnorm=list_int(ii) ;ii=ii+1 + siz_nabla_ij=list_int(ii) ;ii=ii+1 + siz_nabla_im_ij=list_int(ii) ;ii=ii+1 + siz_nablaphi=list_int(ii) ;ii=ii+1 + siz_phiphj=list_int(ii) ;ii=ii+1 + siz_phiphjint=list_int(ii) ;ii=ii+1 + siz_ph0phiint=list_int(ii) ;ii=ii+1 + siz_qgrid_shp=list_int(ii) ;ii=ii+1 + siz_qijl=list_int(ii) ;ii=ii+1 + siz_rad_for_spline=list_int(ii) ;ii=ii+1 + siz_shapefncg=list_int(ii) ;ii=ii+1 + siz_sij=list_int(ii) ;ii=ii+1 + siz_tnablaphi=list_int(ii) ;ii=ii+1 + siz_tphitphj=list_int(ii) ;ii=ii+1 + siz_vee=list_int(ii) ;ii=ii+1 + siz_vex=list_int(ii) ;ii=ii+1 + siz_zioneff=list_int(ii) ;ii=ii+1 +!Integers + pawtab%ij_proj=list_int(ii) ;ii=ii+1 + pawtab%lcut_size=list_int(ii) ;ii=ii+1 + pawtab%lexexch=list_int(ii) ;ii=ii+1 + pawtab%lmnmix_sz=list_int(ii) ;ii=ii+1 + pawtab%lpawu=list_int(ii) ;ii=ii+1 + pawtab%mqgrid_shp=list_int(ii) ;ii=ii+1 + pawtab%nproju=list_int(ii) ;ii=ii+1 + pawtab%option_interaction_pawu=list_int(ii) ;ii=ii+1 + pawtab%useexexch=list_int(ii) ;ii=ii+1 + pawtab%usepawu=list_int(ii) ;ii=ii+1 + pawtab%usepotzero=list_int(ii) ;ii=ii+1 + pawtab%usespnorb=list_int(ii) ;ii=ii+1 +!Integer arrays + if (allocated(pawtab%indklmn)) then + LIBPAW_DEALLOCATE(pawtab%indklmn) + end if + if (siz_indklmn>0) then + LIBPAW_ALLOCATE(pawtab%indklmn,(8,pawtab%lmn2_size)) + pawtab%indklmn=reshape(list_int(ii:ii+siz_indklmn-1),(/8,pawtab%lmn2_size/)) + ii=ii+siz_indklmn + end if + if (allocated(pawtab%klmntomn)) then + LIBPAW_DEALLOCATE(pawtab%klmntomn) + end if + if (siz_klmntomn>0) then + LIBPAW_ALLOCATE(pawtab%klmntomn,(4,pawtab%lmn2_size)) + pawtab%klmntomn=reshape(list_int(ii:ii+siz_klmntomn-1),(/4,pawtab%lmn2_size/)) + ii=ii+siz_klmntomn + end if + if (allocated(pawtab%kmix)) then + LIBPAW_DEALLOCATE(pawtab%kmix) + end if + if (siz_kmix>0) then + LIBPAW_ALLOCATE(pawtab%kmix,(pawtab%lmnmix_sz)) + pawtab%kmix=list_int(ii:ii+pawtab%lmnmix_sz-1) + ii=ii+siz_kmix + end if + if (allocated(pawtab%lnproju)) then + LIBPAW_DEALLOCATE(pawtab%lnproju) + end if + if (siz_lnproju>0) then + LIBPAW_ALLOCATE(pawtab%lnproju,(pawtab%nproju)) + pawtab%lnproju=list_int(ii:ii+pawtab%nproju-1) + ii=ii+siz_lnproju + end if + end if ! full_broadcast + ii=ii-1 + + if (ii/=nn_int+nn_int_arr) then + msg='the number of broadcasted integers is not correct!' + LIBPAW_BUG(msg) + end if + + end if ! me/=0 + LIBPAW_DEALLOCATE(list_int) + +!Broadcast all the reals +!========================================================================= + + LIBPAW_ALLOCATE(list_dpr,(nn_dpr+nn_dpr_arr)) + +!Fill the buffer of the sender +!------------------------------------------------------------------------- + if (me==0) then + ii=1 + +!First the data read from a psp file +!................................... + +!Reals (read from psp file) + list_dpr(ii)=pawtab%beta ;ii=ii+1 + list_dpr(ii)=pawtab%dncdq0 ;ii=ii+1 + list_dpr(ii)=pawtab%d2ncdq0 ;ii=ii+1 + list_dpr(ii)=pawtab%dnvdq0 ;ii=ii+1 + list_dpr(ii)=pawtab%dtaucdq0 ;ii=ii+1 + list_dpr(ii)=pawtab%ex_cc ;ii=ii+1 + list_dpr(ii)=pawtab%exccore ;ii=ii+1 + list_dpr(ii)=pawtab%lamb_shielding ;ii=ii+1 + list_dpr(ii)=pawtab%rpaw ;ii=ii+1 + list_dpr(ii)=pawtab%rshp ;ii=ii+1 + list_dpr(ii)=pawtab%rcore ;ii=ii+1 + list_dpr(ii)=pawtab%rcoretau ;ii=ii+1 + list_dpr(ii)=pawtab%shape_sigma ;ii=ii+1 +!Reals arrays (read from psp file) + if (siz_coredens>0) then + list_dpr(ii:ii+siz_coredens-1)=pawtab%coredens(1:siz_coredens) + ii=ii+siz_coredens + end if + if (siz_coretau>0) then + list_dpr(ii:ii+siz_coretau-1)=pawtab%coretau(1:siz_coretau) + ii=ii+siz_coretau + end if + if (siz_dij0>0) then + list_dpr(ii:ii+siz_dij0-1)=pawtab%dij0(1:siz_dij0) + ii=ii+siz_dij0 + end if + if (siz_fock>0) then + list_dpr(ii:ii+siz_fock-1)=pawtab%ex_cvij(1:siz_fock) + ii=ii+siz_fock + end if + if (siz_kij>0) then + list_dpr(ii:ii+siz_kij-1)=pawtab%kij(1:siz_kij) + ii=ii+siz_kij + end if + if (siz_phi>0) then + list_dpr(ii:ii+siz_phi-1)=reshape(pawtab%phi,(/siz_phi/)) + ii=ii+siz_phi + end if + if (siz_rhoij0>0) then + list_dpr(ii:ii+siz_rhoij0-1)=pawtab%rhoij0(1:siz_rhoij0) + ii=ii+siz_rhoij0 + end if + if (siz_shape_alpha>0) then + list_dpr(ii:ii+siz_shape_alpha-1)=reshape(pawtab%shape_alpha,(/siz_shape_alpha/)) + ii=ii+siz_shape_alpha + end if + if (siz_shape_q>0) then + list_dpr(ii:ii+siz_shape_q-1)=reshape(pawtab%shape_q,(/siz_shape_q/)) + ii=ii+siz_shape_q + end if + if (siz_shapefunc>0) then + list_dpr(ii:ii+siz_shapefunc-1)=reshape(pawtab%shapefunc,(/siz_shapefunc/)) + ii=ii+siz_shapefunc + end if + if (siz_tcoredens>0) then + list_dpr(ii:ii+siz_tcoredens-1)=reshape(pawtab%tcoredens,(/siz_tcoredens/)) + ii=ii+siz_tcoredens + end if + if (siz_tcoretau>0) then + list_dpr(ii:ii+siz_tcoretau-1)=reshape(pawtab%tcoretau,(/siz_tcoretau/)) + ii=ii+siz_tcoretau + end if + if (siz_tcorespl>0) then + list_dpr(ii:ii+siz_tcorespl-1)=reshape(pawtab%tcorespl,(/siz_tcorespl/)) + ii=ii+siz_tcorespl + end if + if (siz_tcoretauspl>0) then + list_dpr(ii:ii+siz_tcoretauspl-1)=reshape(pawtab%tcoretauspl,(/siz_tcoretauspl/)) + ii=ii+siz_tcoretauspl + end if + if (siz_tphi>0) then + list_dpr(ii:ii+siz_tphi-1)=reshape(pawtab%tphi,(/siz_tphi/)) + ii=ii+siz_tphi + end if + if (siz_tproj>0) then + list_dpr(ii:ii+siz_tproj-1)=reshape(pawtab%tproj,(/siz_tproj/)) + ii=ii+siz_tproj + end if + if (siz_tvalespl>0) then + list_dpr(ii:ii+siz_tvalespl-1)=reshape(pawtab%tvalespl,(/siz_tvalespl/)) + ii=ii+siz_tvalespl + end if + if (siz_vhtnzc>0) then + list_dpr(ii:ii+siz_vhtnzc-1)=pawtab%vhtnzc(1:siz_vhtnzc) + ii=ii+siz_vhtnzc + end if + if (siz_vhnzc>0) then + list_dpr(ii:ii+siz_vhnzc-1)=pawtab%vhnzc(1:siz_vhnzc) + ii=ii+siz_vhnzc + end if + if (siz_vminushalf>0) then + list_dpr(ii:ii+siz_vminushalf-1)=pawtab%vminushalf(1:siz_vminushalf) + ii=ii+siz_vminushalf + end if +!Reals in datastructures (read from psp file) + if (siz_wvlpaw==1) then + if (siz_wvl_parg>0) then + list_dpr(ii:ii+siz_wvl_parg-1)=reshape(pawtab%wvl%parg,(/siz_wvl_parg/)) + ii=ii+siz_wvl_parg + end if + if (siz_wvl_pfac>0) then + list_dpr(ii:ii+siz_wvl_pfac-1)=reshape(pawtab%wvl%pfac,(/siz_wvl_pfac/)) + ii=ii+siz_wvl_pfac + end if + if (siz_wvl_rholoc_rad>0) then + list_dpr(ii:ii+siz_wvl_rholoc_rad-1)=pawtab%wvl%rholoc%rad(1:siz_wvl_rholoc_rad) + ii=ii+siz_wvl_rholoc_rad + end if + if (siz_wvl_rholoc_d>0) then + list_dpr(ii:ii+siz_wvl_rholoc_d-1)=reshape(pawtab%wvl%rholoc%d,(/siz_wvl_rholoc_d/)) + ii=ii+siz_wvl_rholoc_d + end if + end if + +!Then the data initialized later +!................................... + if (full_broadcast) then + +!Reals + list_dpr(ii)=pawtab%exchmix ;ii=ii+1 + list_dpr(ii)=pawtab%f4of2_sla ;ii=ii+1 + list_dpr(ii)=pawtab%f6of2_sla ;ii=ii+1 + list_dpr(ii)=pawtab%jpawu ;ii=ii+1 + list_dpr(ii)=pawtab%upawu ;ii=ii+1 +!Reals arrays + if (siz_dltij>0) then + list_dpr(ii:ii+siz_dltij-1)=pawtab%dltij(1:siz_dltij) + ii=ii+siz_dltij + end if + if (siz_dshpfunc>0) then + list_dpr(ii:ii+siz_dshpfunc-1)=reshape(pawtab%dshpfunc,(/siz_dshpfunc/)) + ii=ii+siz_dshpfunc + end if + if (siz_eijkl>0) then + list_dpr(ii:ii+siz_eijkl-1)=reshape(pawtab%eijkl,(/siz_eijkl/)) + ii=ii+siz_eijkl + end if + if (siz_eijkl_sr>0) then + list_dpr(ii:ii+siz_eijkl_sr-1)=reshape(pawtab%eijkl_sr,(/siz_eijkl_sr/)) + ii=ii+siz_eijkl_sr + end if + if (siz_euijkl>0) then + list_dpr(ii:ii+siz_euijkl-1)=reshape(pawtab%euijkl,(/siz_euijkl/)) + ii=ii+siz_euijkl + end if + if (siz_euij_fll>0) then + list_dpr(ii:ii+siz_euij_fll-1)=reshape(pawtab%euij_fll,(/siz_euij_fll/)) + ii=ii+siz_euij_fll + end if + if (siz_fk>0) then + list_dpr(ii:ii+siz_fk-1)=reshape(pawtab%fk,(/siz_fk/)) + ii=ii+siz_fk + end if + if (siz_gammaij>0) then + list_dpr(ii:ii+siz_gammaij-1)=pawtab%gammaij(1:siz_gammaij) + ii=ii+siz_gammaij + end if + if (siz_gnorm>0) then + list_dpr(ii:ii+siz_gnorm-1)=pawtab%gnorm(1:siz_gnorm) + ii=ii+siz_gnorm + end if + if (siz_nabla_ij>0) then + list_dpr(ii:ii+siz_nabla_ij-1)=reshape(pawtab%nabla_ij,(/siz_nabla_ij/)) + ii=ii+siz_nabla_ij + end if + if (siz_nabla_im_ij>0) then + list_dpr(ii:ii+siz_nabla_im_ij-1)=reshape(pawtab%nabla_im_ij,(/siz_nabla_im_ij/)) + ii=ii+siz_nabla_im_ij + end if + if (siz_nablaphi>0) then + list_dpr(ii:ii+siz_nablaphi-1)=reshape(pawtab%nablaphi,(/siz_nablaphi/)) + ii=ii+siz_nablaphi + end if + if (siz_phiphj>0) then + list_dpr(ii:ii+siz_phiphj-1)=reshape(pawtab%phiphj,(/siz_phiphj/)) + ii=ii+siz_phiphj + end if + if (siz_phiphjint>0) then + list_dpr(ii:ii+siz_phiphjint-1)=pawtab%phiphjint(1:siz_phiphjint) + ii=ii+siz_phiphjint + end if + if (siz_ph0phiint>0) then + list_dpr(ii:ii+siz_ph0phiint-1)=pawtab%ph0phiint(1:siz_ph0phiint) + ii=ii+siz_ph0phiint + end if + if (siz_qgrid_shp>0) then + list_dpr(ii:ii+siz_qgrid_shp-1)=pawtab%qgrid_shp(1:siz_qgrid_shp) + ii=ii+siz_qgrid_shp + end if + if (siz_qijl>0) then + list_dpr(ii:ii+siz_qijl-1)=reshape(pawtab%qijl,(/siz_qijl/)) + ii=ii+siz_qijl + end if + if (siz_rad_for_spline>0) then + list_dpr(ii:ii+siz_rad_for_spline-1)=pawtab%rad_for_spline(1:siz_rad_for_spline) + ii=ii+siz_rad_for_spline + end if + if (siz_shapefncg>0) then + list_dpr(ii:ii+siz_shapefncg-1)=reshape(pawtab%shapefncg,(/siz_shapefncg/)) + ii=ii+siz_shapefncg + end if + if (siz_sij>0) then + list_dpr(ii:ii+siz_sij-1)=pawtab%sij(1:siz_sij) + ii=ii+siz_sij + end if + if (siz_tnablaphi>0) then + list_dpr(ii:ii+siz_tnablaphi-1)=reshape(pawtab%tnablaphi,(/siz_tnablaphi/)) + ii=ii+siz_tnablaphi + end if + if (siz_tphitphj>0) then + list_dpr(ii:ii+siz_tphitphj-1)=reshape(pawtab%tphitphj,(/siz_tphitphj/)) + ii=ii+siz_tphitphj + end if + if (siz_vee>0) then + list_dpr(ii:ii+siz_vee-1)=reshape(pawtab%vee,(/siz_vee/)) + ii=ii+siz_vee + end if + if (siz_vex>0) then + list_dpr(ii:ii+siz_vex-1)=reshape(pawtab%vex,(/siz_vex/)) + ii=ii+siz_vex + end if + if (siz_zioneff>0) then + list_dpr(ii:ii+siz_zioneff-1)=pawtab%zioneff(1:siz_zioneff) + ii=ii+siz_zioneff + end if + + end if ! full_broadcast + ii=ii-1 + if (ii/=nn_dpr+nn_dpr_arr) then + msg='the number of loaded reals is not correct!' + LIBPAW_BUG(msg) + end if + + end if ! me=0 + +!Perfom the communication +!------------------------------------------------------------------------- + + call xmpi_bcast(list_dpr,0,comm_mpi,ierr) + +!Fill the receiver from the buffer +!------------------------------------------------------------------------- + if (me/=0) then + ii=1 + +!First the data read from a psp file +!................................... + +!Reals (read from psp file) + pawtab%beta=list_dpr(ii) ;ii=ii+1 + pawtab%dncdq0=list_dpr(ii) ;ii=ii+1 + pawtab%d2ncdq0=list_dpr(ii) ;ii=ii+1 + pawtab%dnvdq0=list_dpr(ii) ;ii=ii+1 + pawtab%dtaucdq0=list_dpr(ii) ;ii=ii+1 + pawtab%ex_cc=list_dpr(ii) ;ii=ii+1 + pawtab%exccore=list_dpr(ii) ;ii=ii+1 + pawtab%lamb_shielding=list_dpr(ii) ;ii=ii+1 + pawtab%rpaw=list_dpr(ii) ;ii=ii+1 + pawtab%rshp=list_dpr(ii) ;ii=ii+1 + pawtab%rcore=list_dpr(ii) ;ii=ii+1 + pawtab%rcoretau=list_dpr(ii) ;ii=ii+1 + pawtab%shape_sigma=list_dpr(ii) ;ii=ii+1 +!Reals arrays (read from psp file) + if (allocated(pawtab%coredens)) then + LIBPAW_DEALLOCATE(pawtab%coredens) + end if + if (siz_coredens>0) then + LIBPAW_ALLOCATE(pawtab%coredens,(pawtab%core_mesh_size)) + pawtab%coredens=list_dpr(ii:ii+pawtab%core_mesh_size-1) + ii=ii+siz_coredens + end if + if (allocated(pawtab%coretau)) then + LIBPAW_DEALLOCATE(pawtab%coretau) + end if + if (siz_coretau>0) then + LIBPAW_ALLOCATE(pawtab%coretau,(pawtab%coretau_mesh_size)) + pawtab%coretau=list_dpr(ii:ii+pawtab%coretau_mesh_size-1) + ii=ii+siz_coretau + end if + if (allocated(pawtab%dij0)) then + LIBPAW_DEALLOCATE(pawtab%dij0) + end if + if (siz_dij0>0) then + LIBPAW_ALLOCATE(pawtab%dij0,(pawtab%lmn2_size)) + pawtab%dij0=list_dpr(ii:ii+pawtab%lmn2_size-1) + ii=ii+siz_dij0 + end if + if (allocated(pawtab%ex_cvij)) then + LIBPAW_DEALLOCATE(pawtab%ex_cvij) + end if + if (siz_fock>0) then + LIBPAW_ALLOCATE(pawtab%ex_cvij,(pawtab%lmn2_size)) + pawtab%ex_cvij=list_dpr(ii:ii+pawtab%lmn2_size-1) + ii=ii+siz_fock + end if + if (allocated(pawtab%kij)) then + LIBPAW_DEALLOCATE(pawtab%kij) + end if + if (siz_kij>0) then + LIBPAW_ALLOCATE(pawtab%kij,(pawtab%lmn2_size)) + pawtab%kij=list_dpr(ii:ii+pawtab%lmn2_size-1) + ii=ii+siz_kij + end if + if (allocated(pawtab%phi)) then + LIBPAW_DEALLOCATE(pawtab%phi) + end if + if (siz_phi>0) then + LIBPAW_ALLOCATE(pawtab%phi,(pawtab%partialwave_mesh_size,pawtab%basis_size)) + pawtab%phi=reshape(list_dpr(ii:ii+siz_phi-1),(/pawtab%partialwave_mesh_size,pawtab%basis_size/)) + ii=ii+siz_phi + end if + if (allocated(pawtab%rhoij0)) then + LIBPAW_DEALLOCATE(pawtab%rhoij0) + end if + if (siz_rhoij0>0) then + LIBPAW_ALLOCATE(pawtab%rhoij0,(pawtab%lmn2_size)) + pawtab%rhoij0=list_dpr(ii:ii+pawtab%lmn2_size-1) + ii=ii+siz_rhoij0 + end if + if (allocated(pawtab%shape_alpha)) then + LIBPAW_DEALLOCATE(pawtab%shape_alpha) + end if + if (siz_shape_alpha>0) then + LIBPAW_ALLOCATE(pawtab%shape_alpha,(2,pawtab%l_size)) + pawtab%shape_alpha=reshape(list_dpr(ii:ii+siz_shape_alpha-1),(/2,pawtab%l_size/)) + ii=ii+siz_shape_alpha + end if + if (allocated(pawtab%shape_q)) then + LIBPAW_DEALLOCATE(pawtab%shape_q) + end if + if (siz_shape_q>0) then + LIBPAW_ALLOCATE(pawtab%shape_q,(2,pawtab%l_size)) + pawtab%shape_q=reshape(list_dpr(ii:ii+siz_shape_q-1),(/2,pawtab%l_size/)) + ii=ii+siz_shape_q + end if + if (allocated(pawtab%shapefunc)) then + LIBPAW_DEALLOCATE(pawtab%shapefunc) + end if + if (siz_shapefunc>0) then + LIBPAW_ALLOCATE(pawtab%shapefunc,(pawtab%mesh_size,pawtab%l_size)) + pawtab%shapefunc=reshape(list_dpr(ii:ii+siz_shapefunc-1),(/pawtab%mesh_size,pawtab%l_size/)) + ii=ii+siz_shapefunc + end if + if (allocated(pawtab%tcoredens)) then + LIBPAW_DEALLOCATE(pawtab%tcoredens) + end if + if (siz_tcoredens>0) then + sz2=siz_tcoredens/pawtab%core_mesh_size + LIBPAW_ALLOCATE(pawtab%tcoredens,(pawtab%core_mesh_size,sz2)) + pawtab%tcoredens=reshape(list_dpr(ii:ii+siz_tcoredens-1),(/pawtab%core_mesh_size,sz2/)) + ii=ii+siz_tcoredens + end if + if (allocated(pawtab%tcoretau)) then + LIBPAW_DEALLOCATE(pawtab%tcoretau) + end if + if (siz_tcoretau>0) then + LIBPAW_ALLOCATE(pawtab%tcoretau,(pawtab%coretau_mesh_size)) + pawtab%tcoretau=list_dpr(ii:ii+siz_tcoretau-1) + ii=ii+siz_tcoretau + end if + if (allocated(pawtab%tcorespl)) then + LIBPAW_DEALLOCATE(pawtab%tcorespl) + end if + if (siz_tcorespl>0) then + LIBPAW_ALLOCATE(pawtab%tcorespl,(pawtab%mqgrid,2)) + pawtab%tcorespl=reshape(list_dpr(ii:ii+siz_tcorespl-1),(/pawtab%mqgrid,2/)) + ii=ii+siz_tcorespl + end if + if (allocated(pawtab%tcoretauspl)) then + LIBPAW_DEALLOCATE(pawtab%tcoretauspl) + end if + if (siz_tcoretauspl>0) then + LIBPAW_ALLOCATE(pawtab%tcoretauspl,(pawtab%mqgrid,2)) + pawtab%tcoretauspl=reshape(list_dpr(ii:ii+siz_tcoretauspl-1),(/pawtab%mqgrid,2/)) + ii=ii+siz_tcoretauspl + else + LIBPAW_ALLOCATE(pawtab%tcoretauspl,(pawtab%mqgrid,0)) + end if + if (allocated(pawtab%tphi)) then + LIBPAW_DEALLOCATE(pawtab%tphi) + end if + if (siz_tphi>0) then + LIBPAW_ALLOCATE(pawtab%tphi,(pawtab%partialwave_mesh_size,pawtab%basis_size)) + pawtab%tphi=reshape(list_dpr(ii:ii+siz_tphi-1),(/pawtab%partialwave_mesh_size,pawtab%basis_size/)) + ii=ii+siz_tphi + end if + if (allocated(pawtab%tproj)) then + LIBPAW_DEALLOCATE(pawtab%tproj) + end if + if (siz_tproj>0) then + sz1=siz_tproj/pawtab%basis_size + LIBPAW_ALLOCATE(pawtab%tproj,(sz1,pawtab%basis_size)) + pawtab%tproj=reshape(list_dpr(ii:ii+siz_tproj-1),(/sz1,pawtab%basis_size/)) + ii=ii+siz_tproj + end if + if (allocated(pawtab%tvalespl)) then + LIBPAW_DEALLOCATE(pawtab%tvalespl) + end if + if (siz_tvalespl>0) then + sz1=siz_tvalespl/2 + LIBPAW_ALLOCATE(pawtab%tvalespl,(sz1,2)) + pawtab%tvalespl=reshape(list_dpr(ii:ii+siz_tvalespl-1),(/sz1,2/)) + ii=ii+siz_tvalespl + end if + if (allocated(pawtab%vhtnzc)) then + LIBPAW_DEALLOCATE(pawtab%vhtnzc) + end if + if (siz_vhtnzc>0) then + LIBPAW_ALLOCATE(pawtab%vhtnzc,(pawtab%mesh_size)) + pawtab%vhtnzc=list_dpr(ii:ii+pawtab%mesh_size-1) + ii=ii+siz_vhtnzc + end if + if (allocated(pawtab%vhnzc)) then + LIBPAW_DEALLOCATE(pawtab%vhnzc) + end if + if (siz_vhnzc>0) then + LIBPAW_ALLOCATE(pawtab%vhnzc,(pawtab%mesh_size)) + pawtab%vhnzc=list_dpr(ii:ii+pawtab%mesh_size-1) + ii=ii+siz_vhnzc + end if + if (allocated(pawtab%vminushalf)) then + LIBPAW_DEALLOCATE(pawtab%vminushalf) + end if + if (siz_vminushalf>0) then + LIBPAW_ALLOCATE(pawtab%vminushalf,(pawtab%mesh_size)) + pawtab%vminushalf=list_dpr(ii:ii+pawtab%mesh_size-1) + ii=ii+siz_vminushalf + end if +!Reals in datastructures (read from psp file) + if (siz_wvlpaw==1) then + if (allocated(pawtab%wvl%parg)) then + LIBPAW_DEALLOCATE(pawtab%wvl%parg) + end if + if (siz_wvl_parg>0) then + LIBPAW_ALLOCATE(pawtab%wvl%parg,(2,pawtab%wvl%ptotgau)) + pawtab%wvl%parg=reshape(list_dpr(ii:ii+siz_wvl_parg-1),(/2,pawtab%wvl%ptotgau/)) + ii=ii+siz_wvl_parg + end if + if (allocated(pawtab%wvl%pfac)) then + LIBPAW_DEALLOCATE(pawtab%wvl%pfac) + end if + if (siz_wvl_pfac>0) then + LIBPAW_ALLOCATE(pawtab%wvl%pfac,(2,pawtab%wvl%ptotgau)) + pawtab%wvl%pfac=reshape(list_dpr(ii:ii+siz_wvl_pfac-1),(/2,pawtab%wvl%ptotgau/)) + ii=ii+siz_wvl_pfac + end if + if (allocated(pawtab%wvl%rholoc%rad)) then + LIBPAW_DEALLOCATE(pawtab%wvl%rholoc%rad) + end if + if (siz_wvl_rholoc_rad>0) then + sz1=pawtab%wvl%rholoc%msz + LIBPAW_ALLOCATE(pawtab%wvl%rholoc%rad,(sz1)) + pawtab%wvl%rholoc%rad=list_dpr(ii:ii+sz1-1) + ii=ii+siz_wvl_rholoc_rad + end if + if (allocated(pawtab%wvl%rholoc%d)) then + LIBPAW_DEALLOCATE(pawtab%wvl%rholoc%d) + end if + if (siz_wvl_rholoc_d>0) then + sz1=pawtab%wvl%rholoc%msz + LIBPAW_ALLOCATE(pawtab%wvl%rholoc%d,(sz1,4)) + pawtab%wvl%rholoc%d=reshape(list_dpr(ii:ii+siz_wvl_rholoc_d-1),(/sz1,4/)) + ii=ii+siz_wvl_rholoc_d + end if + end if + +!Then the data initialized later +!................................... + if (full_broadcast) then + +!Reals + pawtab%exchmix=list_dpr(ii) ;ii=ii+1 + pawtab%f4of2_sla=list_dpr(ii) ;ii=ii+1 + pawtab%f6of2_sla=list_dpr(ii) ;ii=ii+1 + pawtab%jpawu=list_dpr(ii) ;ii=ii+1 + pawtab%upawu=list_dpr(ii) ;ii=ii+1 +!Reals arrays + if (allocated(pawtab%dltij)) then + LIBPAW_DEALLOCATE(pawtab%dltij) + end if + if (siz_dltij>0) then + LIBPAW_ALLOCATE(pawtab%dltij,(pawtab%lmn2_size)) + pawtab%dltij=list_dpr(ii:ii+pawtab%lmn2_size-1) + ii=ii+siz_dltij + end if + if (allocated(pawtab%dshpfunc)) then + LIBPAW_DEALLOCATE(pawtab%dshpfunc) + end if + if (siz_dshpfunc>0) then + LIBPAW_ALLOCATE(pawtab%dshpfunc,(pawtab%mesh_size,pawtab%l_size,4)) + pawtab%dshpfunc=reshape(list_dpr(ii:ii+siz_dshpfunc-1),(/pawtab%mesh_size,pawtab%l_size,4/)) + ii=ii+siz_dshpfunc + end if + if (allocated(pawtab%eijkl)) then + LIBPAW_DEALLOCATE(pawtab%eijkl) + end if + if (siz_eijkl>0) then + LIBPAW_ALLOCATE(pawtab%eijkl,(pawtab%lmn2_size,pawtab%lmn2_size)) + pawtab%eijkl=reshape(list_dpr(ii:ii+siz_eijkl-1),(/pawtab%lmn2_size,pawtab%lmn2_size/)) + ii=ii+siz_eijkl + end if + if (allocated(pawtab%eijkl_sr)) then + LIBPAW_DEALLOCATE(pawtab%eijkl_sr) + end if + if (siz_eijkl_sr>0) then + LIBPAW_ALLOCATE(pawtab%eijkl_sr,(pawtab%lmn2_size,pawtab%lmn2_size)) + pawtab%eijkl_sr=reshape(list_dpr(ii:ii+siz_eijkl_sr-1),(/pawtab%lmn2_size,pawtab%lmn2_size/)) + ii=ii+siz_eijkl_sr + end if + if (allocated(pawtab%euijkl)) then + LIBPAW_DEALLOCATE(pawtab%euijkl) + end if + if (siz_euijkl>0) then + LIBPAW_ALLOCATE(pawtab%euijkl,(3,pawtab%lmn_size,pawtab%lmn_size,pawtab%lmn_size,pawtab%lmn_size)) + pawtab%euijkl=reshape(list_dpr(ii:ii+siz_euijkl-1),(/3,pawtab%lmn_size,pawtab%lmn_size,pawtab%lmn_size,pawtab%lmn_size/)) + ii=ii+siz_euijkl + end if + if (allocated(pawtab%euij_fll)) then + LIBPAW_DEALLOCATE(pawtab%euij_fll) + end if + if (siz_euij_fll>0) then + LIBPAW_ALLOCATE(pawtab%euij_fll,(pawtab%lmn2_size)) + pawtab%euij_fll=reshape(list_dpr(ii:ii+siz_euij_fll-1),(/pawtab%lmn2_size/)) + ii=ii+siz_euij_fll + end if + if (allocated(pawtab%fk)) then + LIBPAW_DEALLOCATE(pawtab%fk) + end if + if (siz_fk>0) then + LIBPAW_ALLOCATE(pawtab%fk,(6,4)) + pawtab%fk=reshape(list_dpr(ii:ii+siz_fk-1),(/6,4/)) + ii=ii+siz_fk + end if + if (allocated(pawtab%gammaij)) then + LIBPAW_DEALLOCATE(pawtab%gammaij) + end if + if (siz_gammaij>0) then + LIBPAW_ALLOCATE(pawtab%gammaij,(pawtab%l_size)) + pawtab%gammaij=list_dpr(ii:ii+pawtab%l_size-1) + ii=ii+siz_gammaij + end if + if (allocated(pawtab%gnorm)) then + LIBPAW_DEALLOCATE(pawtab%gnorm) + end if + if (siz_gnorm>0) then + LIBPAW_ALLOCATE(pawtab%gnorm,(pawtab%l_size)) + pawtab%gnorm=list_dpr(ii:ii+pawtab%l_size-1) + ii=ii+siz_gnorm + end if + if (allocated(pawtab%nabla_ij)) then + LIBPAW_DEALLOCATE(pawtab%nabla_ij) + end if + if (siz_nabla_ij>0) then + LIBPAW_ALLOCATE(pawtab%nabla_ij,(3,pawtab%lmn_size,pawtab%lmn_size)) + pawtab%nabla_ij=reshape(list_dpr(ii:ii+siz_nabla_ij-1),(/3,pawtab%lmn_size,pawtab%lmn_size/)) + ii=ii+siz_nabla_ij + end if + if (allocated(pawtab%nabla_im_ij)) then + LIBPAW_DEALLOCATE(pawtab%nabla_im_ij) + end if + if (siz_nabla_im_ij>0) then + LIBPAW_ALLOCATE(pawtab%nabla_im_ij,(3,pawtab%lmn_size,pawtab%lmn_size)) + pawtab%nabla_im_ij=reshape(list_dpr(ii:ii+siz_nabla_im_ij-1),(/3,pawtab%lmn_size,pawtab%lmn_size/)) + ii=ii+siz_nabla_im_ij + end if + if (allocated(pawtab%nablaphi)) then + LIBPAW_DEALLOCATE(pawtab%nablaphi) + end if + if (siz_nablaphi>0) then + LIBPAW_ALLOCATE(pawtab%nablaphi,(pawtab%partialwave_mesh_size,pawtab%basis_size)) + pawtab%nablaphi=reshape(list_dpr(ii:ii+siz_nablaphi-1),(/pawtab%partialwave_mesh_size,pawtab%basis_size/)) + ii=ii+siz_nablaphi + end if + if (allocated(pawtab%phiphj)) then + LIBPAW_DEALLOCATE(pawtab%phiphj) + end if + if (siz_phiphj>0) then + LIBPAW_ALLOCATE(pawtab%phiphj,(pawtab%mesh_size,pawtab%ij_size)) + pawtab%phiphj=reshape(list_dpr(ii:ii+siz_phiphj-1),(/pawtab%mesh_size,pawtab%ij_size/)) + ii=ii+siz_phiphj + end if + if (allocated(pawtab%phiphjint)) then + LIBPAW_DEALLOCATE(pawtab%phiphjint) + end if + if (siz_phiphjint>0) then + LIBPAW_ALLOCATE(pawtab%phiphjint,(pawtab%ij_proj)) + pawtab%phiphjint=list_dpr(ii:ii+pawtab%ij_proj-1) + ii=ii+siz_phiphjint + end if + if (allocated(pawtab%ph0phiint)) then + LIBPAW_DEALLOCATE(pawtab%ph0phiint) + end if + if (siz_ph0phiint>0) then + LIBPAW_ALLOCATE(pawtab%ph0phiint,(pawtab%ij_proj)) + pawtab%ph0phiint=list_dpr(ii:ii+pawtab%ij_proj-1) + ii=ii+siz_ph0phiint + end if + if (allocated(pawtab%qgrid_shp)) then + LIBPAW_DEALLOCATE(pawtab%qgrid_shp) + end if + if (siz_qgrid_shp>0) then + LIBPAW_ALLOCATE(pawtab%qgrid_shp,(pawtab%mqgrid_shp)) + pawtab%qgrid_shp=list_dpr(ii:ii+pawtab%mqgrid_shp-1) + ii=ii+siz_qgrid_shp + end if + if (allocated(pawtab%qijl)) then + LIBPAW_DEALLOCATE(pawtab%qijl) + end if + if (siz_qijl>0) then + LIBPAW_ALLOCATE(pawtab%qijl,(pawtab%l_size**2,pawtab%lmn2_size)) + pawtab%qijl=reshape(list_dpr(ii:ii+siz_qijl-1),(/pawtab%l_size**2,pawtab%lmn2_size/)) + ii=ii+siz_qijl + end if + if (allocated(pawtab%rad_for_spline)) then + LIBPAW_DEALLOCATE(pawtab%rad_for_spline) + end if + if (siz_rad_for_spline>0) then + LIBPAW_ALLOCATE(pawtab%rad_for_spline,(pawtab%mesh_size)) + pawtab%rad_for_spline=list_dpr(ii:ii+pawtab%mesh_size-1) + ii=ii+siz_rad_for_spline + end if + if (allocated(pawtab%shapefncg)) then + LIBPAW_DEALLOCATE(pawtab%shapefncg) + end if + if (siz_shapefncg>0) then + LIBPAW_ALLOCATE(pawtab%shapefncg,(pawtab%mqgrid_shp,2,pawtab%l_size)) + pawtab%shapefncg=reshape(list_dpr(ii:ii+siz_shapefncg-1),(/pawtab%mqgrid_shp,2,pawtab%l_size/)) + ii=ii+siz_shapefncg + end if + if (allocated(pawtab%sij)) then + LIBPAW_DEALLOCATE(pawtab%sij) + end if + if (siz_sij>0) then + LIBPAW_ALLOCATE(pawtab%sij,(pawtab%lmn2_size)) + pawtab%sij=list_dpr(ii:ii+pawtab%lmn2_size-1) + ii=ii+siz_sij + end if + if (allocated(pawtab%tnablaphi)) then + LIBPAW_DEALLOCATE(pawtab%tnablaphi) + end if + if (siz_tnablaphi>0) then + LIBPAW_ALLOCATE(pawtab%tnablaphi,(pawtab%partialwave_mesh_size,pawtab%basis_size)) + pawtab%tphi=reshape(list_dpr(ii:ii+siz_tnablaphi-1),(/pawtab%partialwave_mesh_size,pawtab%basis_size/)) + ii=ii+siz_tnablaphi + end if + if (allocated(pawtab%tphitphj)) then + LIBPAW_DEALLOCATE(pawtab%tphitphj) + end if + if (siz_tphitphj>0) then + LIBPAW_ALLOCATE(pawtab%tphitphj,(pawtab%mesh_size,pawtab%ij_size)) + pawtab%tphitphj=reshape(list_dpr(ii:ii+siz_tphitphj-1),(/pawtab%mesh_size,pawtab%ij_size/)) + ii=ii+siz_tphitphj + end if + if (allocated(pawtab%vee)) then + LIBPAW_DEALLOCATE(pawtab%vee) + end if + if (siz_vee>0) then + sz1=2*pawtab%lpawu+1 + LIBPAW_ALLOCATE(pawtab%vee,(sz1,sz1,sz1,sz1)) + pawtab%vee=reshape(list_dpr(ii:ii+siz_vee-1),(/sz1,sz1,sz1,sz1/)) + ii=ii+siz_vee + end if + if (allocated(pawtab%vex)) then + LIBPAW_DEALLOCATE(pawtab%vex) + end if + if (siz_vex>0) then + sz1=2*pawtab%lexexch+1 + LIBPAW_ALLOCATE(pawtab%vex,(sz1,sz1,sz1,sz1,4)) + pawtab%vex=reshape(list_dpr(ii:ii+siz_vex-1),(/sz1,sz1,sz1,sz1,4/)) + ii=ii+siz_vex + end if + if (allocated(pawtab%zioneff)) then + LIBPAW_DEALLOCATE(pawtab%zioneff) + end if + if (siz_zioneff>0) then + LIBPAW_ALLOCATE(pawtab%zioneff,(pawtab%ij_proj)) + pawtab%zioneff=list_dpr(ii:ii+pawtab%ij_proj-1) + ii=ii+siz_zioneff + end if + + end if ! full_broadcast + ii=ii-1 + + if (ii/=nn_dpr+nn_dpr_arr) then + msg='the number of broadcasted reals is not correct!' + LIBPAW_BUG(msg) + end if + + end if ! me/=0 + LIBPAW_DEALLOCATE(list_dpr) + +end subroutine pawtab_bcast +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawtab/wvlpaw_allocate +!! NAME +!! wvlpaw_allocate +!! +!! FUNCTION +!! Allocate (if necessary) and nullify content of a wvlpaw pointer +!! +!! SIDE EFFECTS +!! wvlpaw=datastructure to be allocated. +!! +!! SOURCE + +subroutine wvlpaw_allocate(wvlpaw) + +!Arguments ------------------------------------ + type(wvlpaw_type),pointer :: wvlpaw + +! ************************************************************************* + + !@wvlpaw_type + + if (.not.associated(wvlpaw)) then + LIBPAW_DATATYPE_ALLOCATE(wvlpaw,) + call wvlpaw_nullify(wvlpaw) + end if + + wvlpaw%npspcode_init_guess=10 + +end subroutine wvlpaw_allocate +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawtab/wvlpaw_free +!! NAME +!! wvlpaw_free +!! +!! FUNCTION +!! Deallocate arrays and nullify flags in a wvlpaw structure +!! +!! SIDE EFFECTS +!! wvlpaw=datastructure to be destroyed. +!! All allocated arrays are deallocated. +!! +!! SOURCE + +subroutine wvlpaw_free(wvlpaw) + +!Arguments ------------------------------------ + type(wvlpaw_type),pointer :: wvlpaw + +! ************************************************************************* + + !@wvlpaw_type + + if (.not.associated(wvlpaw)) return + + if(allocated(wvlpaw%pngau)) then + LIBPAW_DEALLOCATE(wvlpaw%pngau) + end if + if(allocated(wvlpaw%parg)) then + LIBPAW_DEALLOCATE(wvlpaw%parg) + end if + if(allocated(wvlpaw%pfac)) then + LIBPAW_DEALLOCATE(wvlpaw%pfac) + end if + + wvlpaw%npspcode_init_guess=0 + wvlpaw%ptotgau=0 + + call wvlpaw_rholoc_free(wvlpaw%rholoc) + + LIBPAW_DATATYPE_DEALLOCATE(wvlpaw) + +end subroutine wvlpaw_free +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawtab/wvlpaw_nullify +!! NAME +!! wvlpaw_nullify +!! +!! FUNCTION +!! Nullify flags in a wvlpaw structure +!! +!! SIDE EFFECTS +!! wvlpaw=datastructure to be nullified +!! +!! SOURCE + +subroutine wvlpaw_nullify(wvlpaw) + +!Arguments ------------------------------------ + type(wvlpaw_type),pointer :: wvlpaw + +! ************************************************************************* + + !@wvlpaw_type + if (.not.associated(wvlpaw)) return + + wvlpaw%npspcode_init_guess=0 + wvlpaw%ptotgau=0 + + call wvlpaw_rholoc_nullify(wvlpaw%rholoc) + +end subroutine wvlpaw_nullify +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawtab/wvlpaw_rholoc_free +!! NAME +!! wvlpaw_rholoc_free +!! +!! FUNCTION +!! Deallocate arrays and nullify flags in a wvlpaw%rholoc structure +!! +!! SIDE EFFECTS +!! wvlpaw_rholoc=datastructure to be destroyed. +!! All allocated arrays are deallocated. +!! +!! SOURCE + +subroutine wvlpaw_rholoc_free(wvlpaw_rholoc) + +!Arguments ------------------------------------ + type(wvlpaw_rholoc_type),intent(inout) :: wvlpaw_rholoc + +! ************************************************************************* + + !@wvlpaw_rholoc_type + + if(allocated(wvlpaw_rholoc%d)) then + LIBPAW_DEALLOCATE(wvlpaw_rholoc%d) + end if + if(allocated(wvlpaw_rholoc%rad)) then + LIBPAW_DEALLOCATE(wvlpaw_rholoc%rad) + end if + + wvlpaw_rholoc%msz=0 + +end subroutine wvlpaw_rholoc_free +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawtab/wvlpaw_rholoc_nullify +!! NAME +!! wvlpaw_rholoc_nullify +!! +!! FUNCTION +!! Nullify flags in a wvlpaw%rholoc structure +!! +!! SIDE EFFECTS +!! wvlpaw_rholoc=datastructure to be nullified. +!! +!! SOURCE + +subroutine wvlpaw_rholoc_nullify(wvlpaw_rholoc) + +!Arguments ------------------------------------ + type(wvlpaw_rholoc_type),intent(inout) :: wvlpaw_rholoc + +! ************************************************************************* + + !@wvlpaw_rholoc_type + + wvlpaw_rholoc%msz=0 + +end subroutine wvlpaw_rholoc_nullify +!!*** + +!---------------------------------------------------------------------- + +END MODULE m_pawtab +!!*** diff --git a/GX-PAW/libpaw/src/m_pawtab.o b/GX-PAW/libpaw/src/m_pawtab.o new file mode 100644 index 00000000..28ffe865 Binary files /dev/null and b/GX-PAW/libpaw/src/m_pawtab.o differ diff --git a/GX-PAW/libpaw/src/m_pawxc.F90 b/GX-PAW/libpaw/src/m_pawxc.F90 new file mode 100644 index 00000000..05c21526 --- /dev/null +++ b/GX-PAW/libpaw/src/m_pawxc.F90 @@ -0,0 +1,6159 @@ +!!****m* ABINIT/m_pawxc +!! NAME +!! m_pawxc +!! +!! FUNCTION +!! XC+PAW related operations +!! +!! COPYRIGHT +!! Copyright (C) 2013-2024 ABINIT group (MT, FJ, TR, GJ, TD) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! NOTES +!! FOR DEVELOPERS: in order to preserve the portability of libPAW library, +!! please consult ~abinit/src/??_libpaw/libpaw-coding-rules.txt +!! +!! SOURCE + +#include "libpaw.h" + +module m_pawxc + + USE_DEFS + USE_MSG_HANDLING + USE_MEMORY_PROFILING + +#ifdef LIBPAW_ISO_C_BINDING + use, intrinsic :: iso_c_binding, only : c_ptr,c_loc,c_f_pointer +#endif + +#ifdef HAVE_LIBPAW_ABINIT + use m_xcpositron, only : xcpositron + use m_drivexc, only : drivexc,size_dvxc,xcmult,mkdenpos + use m_xc_noncoll, only : rotate_mag,rotate_back_mag,rotate_back_mag_dfpt +#endif + + use m_libpaw_libxc + + use m_pawang, only : pawang_type + use m_pawrad, only : pawrad_type,nderiv_gen,pawrad_deducer0,simp_gen + + implicit none + + private + + public :: pawxc ! Compute xc correlation potential and energies inside a paw sphere. USE (r,theta,phi) + public :: pawxcpositron ! Compute electron-positron correlation potential and energies inside a PAW sphere. USE (r,theta,phi) + public :: pawxc_dfpt ! Compute first-order change of XC potential and contribution to + ! 2nd-order change of XC energy inside a PAW sphere. USE (r,theta,phi) + public :: pawxcsum ! Compute useful sums of moments of densities needed to compute on-site contributions to XC energy and potential + public :: pawxcm ! Compute xc correlation potential and energies inside a paw sphere. USE (L,M) MOMENTS + public :: pawxcmpositron ! Compute electron-positron correlation potential and energies inside a PAW sphere. USE (L,M) MOMENTS + public :: pawxcm_dfpt ! Compute 1st-order change of XC potential and contrib + ! to 2nd-order change of XC ene inside a PAW sphere. USE (L,M) MOMENTS + public :: pawxc_get_nkxc ! Compute size of XC kernel (Kxc) according to spin polarization and XC type + public :: pawxc_get_xclevel ! Get XC level (1=LDA, 2=GGA/mGGA, 3=TDDFT) + public :: pawxc_get_usekden ! Assess whether kinetic energy density is used in XC functional + public :: pawxc_get_uselaplacian ! Assess whether laplacian of density is used in XC functional + public :: pawxc_is_tb09 ! Assess whether the XC functional is Tran-Blaha 09 (modified BJ) + +!Private procedures + private :: pawxcsph ! Compute XC energy and potential for a spherical density rho(r) given as (up,dn) + private :: pawxcsphpositron ! Compute electron-positron XC energy and potential for spherical densities rho_el(r) rho_pos(r) + private :: pawxcsph_dfpt ! Compute XC 1st-order potential for a 1st-order spherical density rho1(r) + private :: pawxc_rotate_mag ! Rotate a non-collinear density wrt a magnetization + private :: pawxc_rotate_back_mag ! Rotate back a collinear XC potential wrt a magnetization + private :: pawxc_rotate_back_mag_dfpt ! Rotate back a collinear 1st-order XC potential wrt a magnetization + +!Wrappers + private :: pawxc_drivexc_wrapper ! wrapper for drivexc + private :: pawxc_mkdenpos_wrapper ! wrapper for mkdenpos + private :: pawxc_xcmult_wrapper ! wrapper for xcmult + private :: pawxc_size_dvxc_wrapper ! wrapper for size_dvxc + private :: pawxc_xcpositron_wrapper ! wrapper for xcpositron + +!Zero of density + real(dp),parameter :: rho_min=tol14 +!!*** + +CONTAINS !=========================================================== +!!*** + +!!****f* m_pawxc/pawxc_xcpositron_wrapper +!! NAME +!! pawxc_xcpositron_wrapper +!! +!! FUNCTION +!! Compute electron-positron correlation potentials and energy density. +!! Used electron-positron correlation functional is controlled by ipawxc_xcpositron_wrapper argument. +!! Returns Fxc, Vxc_pos, Vxc_el from input rhor_pos and rhor_el for positron and electrons. +!! +!! INPUTS +!! grhoe2(ngr)=square of the gradient of electronic density rhoe (needed for GGA) +!! ixcpositron=type of electron-positron correlation functional: +!! 1 or -1: LDA zero positron density limit parametrized by Arponen & Pajanne +!! and provided by Boronski & Nieminen [1,2] +!! 11: LDA zero positron density limit parametrized by Arponen & Pajanne +!! and fitted by Sterne & Kaiser [1,3] +!! 2: LDA electron-positron correlation +!! provided by Puska, Seitsonen, and Nieminen [1,4] +!! 3: GGA zero positron density limit parametrized by Arponen & Pajanne +!! and provided by Boronski & Nieminen [1,2,5] +!! 31: GGA zero positron density limit parametrized by Arponen & Pajanne +!! and fitted by Sterne & Kaiser [1,3,5] +!! See references below +!! ngr=size of grho2 array (0 if LDA, npt if GGA) +!! npt=number of real space points on which density is provided +!! posdensity0_limit=True if we are in the zero positron density limit +!! rhoer(npt)=electron density (bohr^-3) +!! rhopr(npt)=positron density (bohr^-3) +!! +!! OUTPUT +!! fnxc(npt)=correlation energy per unit volume fxc +!! vxce(npt)=correlation potential for electron dfxc/drhoe (hartree) +!! vxcp(npt)=correlation potential for positron dfxc/drhop (hartree) +!! vxcegr(ngr)= 1/|gradRhoe| dfxc/d|gradRhoe| (empty if LDA, i.e. ngr=0) +!! Optional outputs: +!! dvxce(npt)=partial second derivatives of the xc energy wr to the electronic density +!! dvxce(:)=dVxce/dRhoe +!! dvxcp(npt)=partial second derivatives of the xc energy wr to the positronic density +!! dvxcp(:)=dVxcp/drhop +!! +!! NOTES +!! References for electron-positron correlation functionals: +!! [1] J. Arponen and E. Pajanne, Ann. Phys. (N.Y.) 121, 343 (1979) [[cite:Arponen1979a]]. +!! [2] E. Boronski and R.M. Nieminen, Phys. Rev. B 34, 3820 (1986) [[cite:Boronski1986]]. +!! [3] P.A. Sterne and J.H. Kaiser, Phys. Rev. B 43, 13892 (1991) [[cite:Sterne1991]]. +!! [4] M.J. Puska, A.P. Seitsonen and R.M. Nieminen, Phys. Rev. B 52, 10947 (1994) [[cite:Puska1994]]. +!! [5] B. Barbiellini, M.J. Puska, T. Torsti and R.M.Nieminen, Phys. Rev. B 51, 7341 (1995) [[cite:Barbiellini1995]] +!! +!! SOURCE + +subroutine pawxc_xcpositron_wrapper(fnxc,grhoe2,ixcpositron,ngr,npt,posdensity0_limit,& +& rhoer,rhopr,vxce,vxcegr,vxcp,& +& dvxce,dvxcp) ! optional arguments + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: ixcpositron,ngr,npt + logical,intent(in) :: posdensity0_limit +!arrays + real(dp),intent(in) :: grhoe2(ngr),rhoer(npt),rhopr(npt) + real(dp),intent(out) :: fnxc(npt),vxce(npt),vxcegr(ngr),vxcp(npt) + real(dp),intent(out),optional :: dvxce(npt),dvxcp(npt) + +!Local variables------------------------------- + +! ************************************************************************* + +#if defined HAVE_LIBPAW_ABINIT + call pawxc_xcpositron_abinit() +#else + call pawxc_xcpositron_local() +#endif +!!*** + +contains +!!*** + +#if defined HAVE_LIBPAW_ABINIT +!!****f* pawxc_xcpositron_wrapper/pawxc_xcpositron_abinit +!! NAME +!! pawxc_xcpositron_abinit +!! +!! FUNCTION +!! ABINIT version of electron-positron correlation +!! +!! SOURCE + +subroutine pawxc_xcpositron_abinit() + +! ************************************************************************* + + if(present(dvxce) .and. present(dvxcp)) then + call xcpositron(fnxc,grhoe2,ixcpositron,ngr,npt,posdensity0_limit,rhoer,rhopr,vxce,vxcegr,vxcp,& +& dvxce=dvxce,dvxcp=dvxcp) ! optional arguments + elseif( present(dvxce) .and. .not. present(dvxcp)) then + call xcpositron(fnxc,grhoe2,ixcpositron,ngr,npt,posdensity0_limit,rhoer,rhopr,vxce,vxcegr,vxcp,& +& dvxce=dvxce) ! optional arguments + elseif( .not. present(dvxce) .and. present(dvxcp)) then + call xcpositron(fnxc,grhoe2,ixcpositron,ngr,npt,posdensity0_limit,rhoer,rhopr,vxce,vxcegr,vxcp,& +& dvxcp=dvxcp) ! optional arguments + else + call xcpositron(fnxc,grhoe2,ixcpositron,ngr,npt,posdensity0_limit,rhoer,rhopr,vxce,vxcegr,vxcp) + end if + +end subroutine pawxc_xcpositron_abinit +!!*** + +#else +!!****f* pawxc_xcpositron_wrapper/pawxc_xcpositron_local +!! NAME +!! pawxc_xcpositron_local +!! +!! FUNCTION +!! Local version of electron-positron correlation (to use outside ABINIT) +!! NOT AVAILABLE +!! +!! SOURCE + +subroutine pawxc_xcpositron_local() + + character(len=*), parameter :: msg='xcpositron only available in ABINIT!' + +! ************************************************************************* + + LIBPAW_BUG(msg) + +end subroutine pawxc_xcpositron_local +!!*** +#endif + +end subroutine pawxc_xcpositron_wrapper +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawxc/pawxc_size_dvxc_wrapper +!! NAME +!! pawxc_size_dvxc_wrapper +!! +!! FUNCTION +!! Give the sizes of the several arrays involved in exchange-correlation calculation +!! needed to allocated them for the drivexc routine +!! +!! INPUTS +!! ixc= choice of exchange-correlation scheme +!! order= gives the maximal derivative of Exc computed. +!! 1=usual value (return exc and vxc) +!! 2=also computes the kernel (return exc,vxc,kxc) +!! -2=like 2, except (to be described) +!! 3=also computes the derivative of the kernel (return exc,vxc,kxc,k3xc) +!! nspden= number of spin components +!! [xc_funcs(2)]= +!! [add_tfw]= optional flag controling the addition of Weiszacker gradient correction to Thomas-Fermi XC energy +!! +!! OUTPUT +!! --- All optionals +!! [usegradient]= [flag] 1 if the XC functional needs the gradient of the density (grho2_updn) +!! [uselaplacian]= [flag] 1 if the XC functional needs the laplacian of the density (lrho_updn) +!! [usekden]= [flag] 1 if the XC functional needs the kinetic energy density (lrho_updn) +!! [nvxcgrho]= size of the array dvxcdgr(npts,nvxcgrho) (derivative of Exc wrt to gradient) +!! [nvxclrho]= size of the array dvxclpl(npts,nvxclrho) (derivative of Exc wrt to laplacian) +!! [nvxctau]= size of the array dvxctau(npts,nvxctau) (derivative of Exc wrt to kin. ener. density) +!! [ndvxc]= size of the array dvxc(npts,ndvxc) (second derivatives of Exc wrt to density and gradient) +!! [nd2vxc]= size of the array d2vxc(npts,nd2vxc) (third derivatives of Exc wrt density) +!! +!! SOURCE + +subroutine pawxc_size_dvxc_wrapper(ixc,order,nspden,& +& usegradient,uselaplacian,usekden,& +& nvxcgrho,nvxclrho,nvxctau,ndvxc,nd2vxc) + +!Arguments---------------------- + integer,intent(in) :: ixc,nspden,order + integer,intent(out),optional :: nvxcgrho,nvxclrho,nvxctau,ndvxc,nd2vxc + integer,intent(out),optional :: usegradient,uselaplacian,usekden +!Local variables---------------- + integer :: nvxcgrho_,nvxclrho_,nvxctau_,ndvxc_,nd2vxc_ + integer :: usegradient_,uselaplacian_,usekden_ + +! ************************************************************************* + +#if defined HAVE_LIBPAW_ABINIT + call size_dvxc(ixc,order,nspden,& +& usegradient=usegradient_,uselaplacian=uselaplacian_,usekden=usekden_,& + nvxcgrho=nvxcgrho_,nvxclrho=nvxclrho_,nvxctau=nvxctau_,& +& ndvxc=ndvxc_,nd2vxc=nd2vxc_) +#else + call pawxc_size_dvxc_local() +#endif + if (present(usegradient)) usegradient=usegradient_ + if (present(uselaplacian)) uselaplacian=uselaplacian_ + if (present(usekden)) usekden=usekden_ + if (present(nvxcgrho)) nvxcgrho=nvxcgrho_ + if (present(nvxclrho)) nvxclrho=nvxclrho_ + if (present(nvxctau)) nvxctau=nvxctau_ + if (present(ndvxc)) ndvxc=ndvxc_ + if (present(nd2vxc)) nd2vxc=nd2vxc_ +!!*** + +#if ! defined HAVE_LIBPAW_ABINIT +contains +!!*** + +!!****f* pawxc_size_dvxc_wrapper/pawxc_size_dvxc_local +!! NAME +!! pawxc_size_dvxc_local +!! +!! FUNCTION +!! Local version of size_dvxc routine (to use outside ABINIT) +!! +!! SOURCE + +subroutine pawxc_size_dvxc_local() + +!Local variables---------------- + logical :: need_gradient,need_kden,need_laplacian + +! ************************************************************************* + +!Do we use the gradient? + need_gradient=((ixc>=11.and.ixc<=17).or.(ixc==23.or.ixc==24).or. & +& (ixc==26.or.ixc==27).or.(ixc>=31.and.ixc<=35).or. & +& (ixc==41.or.ixc==42).or.ixc==1402000) + if (ixc<0) then + if (libxc_functionals_isgga().or.libxc_functionals_ismgga().or. & +& libxc_functionals_is_hybrid()) need_gradient=.true. + end if + usegradient_=0 ; if (need_gradient) usegradient_=2*min(nspden,2)-1 + +!Do we use the laplacian? + need_laplacian=(ixc==32.or.ixc==35) + if (ixc<0) need_laplacian=libxc_functionals_needs_laplacian() + uselaplacian_=0 ; if (need_laplacian) uselaplacian_=min(nspden,2) + +!Do we use the kinetic energy density? + need_kden=(ixc==31.or.ixc==34.or.ixc==35) + if (ixc<0) need_kden=libxc_functionals_ismgga() + usekden_=0 ; if (need_kden) usekden_=min(nspden,2) + +!First derivative(s) of XC functional wrt gradient of density + nvxcgrho_=0 + if (abs(order)>=1) then + if (need_gradient) nvxcgrho_=3 + if (ixc==16.or.ixc==17.or.ixc==26.or.ixc==27) nvxcgrho_=2 + end if + +!First derivative(s) of XC functional wrt laplacian of density + nvxclrho_=0 + if (abs(order)>=1) then + if (need_laplacian) nvxclrho_=min(nspden,2) + end if + +!First derivative(s) of XC functional wrt kinetic energy density + nvxctau_=0 + if (abs(order)>=1) then + if (need_kden) nvxctau_=min(nspden,2) + end if + +!Second derivative(s) of XC functional wrt density + ndvxc_=0 + if (abs(order)>=2) then + if (ixc==1.or.ixc==7.or.ixc==8.or.ixc==9.or.ixc==10.or.ixc==13.or. & +& ixc==21.or.ixc==22) then + ndvxc_=min(nspden,2)+1 + else if ((ixc>=2.and.ixc<=6).or.(ixc>=31.and.ixc<=35).or.ixc==50) then + ndvxc_=1 + else if (ixc==12.or.ixc==24) then + ndvxc_=8 + else if (ixc==11.or.ixc==12.or.ixc==14.or.ixc==15.or. & +& ixc==23.or.ixc==41.or.ixc==42.or.ixc==1402000) then + ndvxc_=15 + else if (ixc<0) then + if (libxc_functionals_has_kxc() then + ndvxc_=2*min(nspden,2)+1 ; if (order==-2) ndvxc_=2 + if (need_gradient) ndvxc_=15 + end if + end if + end if + +!Third derivative(s) of XC functional wrt density + nd2vxc_=0 + if (abs(order)>=3) then + if (ixc==3.or.(ixc>=11.and.ixc<=15.and.ixc/=13).or. & +& ixc==23.or.ixc==24.or.ixc==41.or.ixc==42) then + nd2vxc_=1 + else if ((ixc>=7.and.ixc<=10).or.ixc==13.or.ixc==1402000) then + nd2vxc_=3*min(nspden,2)-2 + else if (ixc<0) then + if (libxc_functionals_has_k3xc() then + if (.not.need_gradient) nd2vxc_=3*min(nspden,2)-2 + end if + end if + end if + +end subroutine pawxc_size_dvxc_local +!!*** +#endif + +end subroutine pawxc_size_dvxc_wrapper +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawxc/pawxc_xcmult_wrapper +!! NAME +!! pawxc_xcmult_wrapper +!! +!! FUNCTION +!! In the case of GGA, multiply the different gradient of spin-density +!! by the derivative of the XC functional with respect +!! to the norm of the gradient, then divide it by the +!! norm of the gradient +!! +!! INPUTS +!! depsxc(nfft,nspgrad)=derivative of Exc with respect to the (spin-)density, +!! or to the norm of the gradient of the (spin-)density, +!! further divided by the norm of the gradient of the (spin-)density +!! The different components of depsxc will be +!! for nspden=1, depsxc(:,1)=d(rho.exc)/d(rho) +!! and if ngrad=2, depsxc(:,2)=1/2*1/|grad rho_up|*d(rho.exc)/d(|grad rho_up|) +!! + 1/|grad rho|*d(rho.exc)/d(|grad rho|) +!! (do not forget : |grad rho| /= |grad rho_up| + |grad rho_down| +!! for nspden=2, depsxc(:,1)=d(rho.exc)/d(rho_up) +!! depsxc(:,2)=d(rho.exc)/d(rho_down) +!! and if ngrad=2, depsxc(:,3)=1/|grad rho_up|*d(rho.exc)/d(|grad rho_up|) +!! depsxc(:,4)=1/|grad rho_down|*d(rho.exc)/d(|grad rho_down|) +!! depsxc(:,5)=1/|grad rho|*d(rho.exc)/d(|grad rho|) +!! nfft=(effective) number of FFT grid points (for this processor) +!! ngrad = must be 2 +!! nspden=number of spin-density components +!! nspgrad=number of spin-density and spin-density-gradient components +!! +!! OUTPUT +!! (see side effects) +!! +!! SIDE EFFECTS +!! rhonow(nfft,nspden,ngrad*ngrad)= +!! at input : +!! electron (spin)-density in real space and its gradient, +!! either on the unshifted grid (if ishift==0, +!! then equal to rhor), or on the shifted grid +!! rhonow(:,:,1)=electron density in electrons/bohr**3 +!! rhonow(:,:,2:4)=gradient of electron density in el./bohr**4 +!! at output : +!! rhonow(:,:,2:4) has been multiplied by the proper factor, +!! described above. +!! +!! SOURCE + +subroutine pawxc_xcmult_wrapper(depsxc,nfft,ngrad,nspden,nspgrad,rhonow) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: nfft,ngrad,nspden,nspgrad +!arrays + real(dp),intent(in) :: depsxc(nfft,nspgrad) + real(dp),intent(inout) :: rhonow(nfft,nspden,ngrad*ngrad) + +! ************************************************************************* + +#if defined HAVE_LIBPAW_ABINIT + call xcmult(depsxc,nfft,ngrad,nspden,nspgrad,rhonow) +#else + call pawxc_xcmult_local() +#endif +!!*** + +#if ! defined HAVE_LIBPAW_ABINIT +contains +!!*** + +!!****f* pawxc_xcmult_wrapper/pawxc_xcmult_local +!! NAME +!! pawxc_xcmult_local +!! +!! FUNCTION +!! Local version of xcmult routine (to use outside ABINIT) +!! +!! SOURCE + +subroutine pawxc_xcmult_local() + +!Local variables------------------------------- +!scalars + integer :: idir,ifft + real(dp) :: rho_tot,rho_up + +! ************************************************************************* + + do idir=1,3 + + if(nspden==1)then +!$OMP PARALLEL DO PRIVATE(ifft) SHARED(depsxc,idir,nfft,rhonow) + do ifft=1,nfft + rhonow(ifft,1,1+idir)=rhonow(ifft,1,1+idir)*depsxc(ifft,2) + end do + else +! In the spin-polarized case, there are more factors to take into account +!$OMP PARALLEL DO PRIVATE(ifft,rho_tot,rho_up) SHARED(depsxc,idir,nfft,rhonow) + do ifft=1,nfft + rho_tot=rhonow(ifft,1,1+idir) + rho_up =rhonow(ifft,2,1+idir) + rhonow(ifft,1,1+idir)=rho_up *depsxc(ifft,3) + rho_tot*depsxc(ifft,5) + rhonow(ifft,2,1+idir)=(rho_tot-rho_up)*depsxc(ifft,4)+ rho_tot*depsxc(ifft,5) + end do + end if ! nspden==1 + end do ! End loop on directions + +end subroutine pawxc_xcmult_local +!!*** +#endif + +end subroutine pawxc_xcmult_wrapper +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawxc/pawxc_mkdenpos_wrapper +!! NAME +!! pawxc_mkdenpos_wrapper +!! +!! FUNCTION +!! Make a density positive everywhere : +!! when the density (or spin-density) is smaller than xc_denpos, +!! set it to the value of xc_denpos +!! +!! INPUTS +!! nfft=(effective) number of FFT grid points (for this processor) +!! nspden=number of spin-density components (max. 2) +!! option=0 if density rhonow is stored as (up,dn) +!! 1 if density rhonow is stored as (up+dn,up) +!! Active only when nspden=2 +!! xc_denpos= lowest allowed density (usually for the computation of the XC functionals) +!! +!! OUTPUT +!! +!! SIDE EFFECTS +!! Input/output +!! iwarn=At input: iwarn=0 a warning will be printed when rho is negative +!! iwarn>0 no warning will be printed out +!! At output: iwarn is increased by 1 +!! rhonow(nfft,nspden)=electron (spin)-density in real space, +!! either on the unshifted grid (if ishift==0, +!! then equal to rhor),or on the shifted grid +!! +!! SOURCE + +subroutine pawxc_mkdenpos_wrapper(iwarn,nfft,nspden,option,rhonow,xc_denpos) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: nfft,nspden,option + integer,intent(inout) :: iwarn + real(dp),intent(in) :: xc_denpos +!arrays + real(dp),intent(inout) :: rhonow(nfft,nspden) + +! ************************************************************************* + +#if defined HAVE_LIBPAW_ABINIT + call mkdenpos(iwarn,nfft,nspden,option,rhonow,xc_denpos) +#else + call pawxc_mkdenpos_local() +#endif +!!*** + +#if ! defined HAVE_LIBPAW_ABINIT +contains +!!*** + +!!****f* pawxc_mkdenpos_wrapper/pawxc_mkdenpos_local +!! NAME +!! pawxc_mkdenpos_local +!! +!! FUNCTION +!! Local version of mkdenpos routine (to use outside ABINIT) +!! +!! SOURCE + +subroutine pawxc_mkdenpos_local() + +!Local variables------------------------------- +!scalars + integer :: ifft,ispden,numneg + real(dp) :: rhotmp,worst + character(len=500) :: msg +!arrays + real(dp) :: rho(2) + +! ************************************************************************* + + numneg=0;worst=zero + + if(nspden==1)then +! Non spin-polarized +!$OMP PARALLEL DO PRIVATE(ifft,rhotmp) REDUCTION(MIN:worst) REDUCTION(+:numneg) SHARED(nfft,rhonow) +!$OMP&SHARED(nfft,rhonow) + do ifft=1,nfft + rhotmp=rhonow(ifft,1) + if(rhotmp0) then + if (iwarn==0) then + write(msg,'(a,i10,a,a,a,es10.2,a,e10.2,a,a,a,a)')& +& 'Density went too small (lower than xc_denpos) at',numneg,' points',ch10,& +& 'and was set to xc_denpos=',xc_denpos,'. Lowest was ',worst,'.',ch10,& +& 'Likely due to too low boxcut or too low ecut for','pseudopotential core charge.' + LIBPAW_WARNING(msg) + end if + iwarn=iwarn+1 + end if + +end subroutine pawxc_mkdenpos_local +!!*** +#endif + +end subroutine pawxc_mkdenpos_wrapper +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawxc/pawxc_get_xclevel +!! NAME +!! pawxc_get_xclevel +!! +!! FUNCTION +!! Give the eXchange-Correlation "level" (1=LDA, 2=GGA/mGGA, 3=TDDFT) +!! +!! INPUTS +!! ixc= choice of exchange-correlation scheme +!! +!! SOURCE + +function pawxc_get_xclevel(ixc) +!Arguments ------------------------------------ + integer,intent(in) :: ixc + integer :: pawxc_get_xclevel + +! ************************************************************************* + + pawxc_get_xclevel=0 + +!ABINIT + if ((1<=ixc.and.ixc<=10).or.(30<=ixc.and.ixc<=39).or.(ixc==50)) pawxc_get_xclevel=1 ! ABINIT LDA + if ((11<=ixc.and.ixc<=19).or.(23<=ixc.and.ixc<=29).or.ixc==1402000) pawxc_get_xclevel=2 ! ABINIT GGA + if (20<=ixc.and.ixc<=22) pawxc_get_xclevel=3 ! ABINIT TDDFT kernel tests + if (ixc>=31.and.ixc<=35) pawxc_get_xclevel=2 ! ABINIT internal fake mGGA + if (ixc>=41.and.ixc<=42) pawxc_get_xclevel=2 ! ABINIT internal hybrids using GGA + +!LibXC functionals + if (ixc<0) then + pawxc_get_xclevel=1 + if (libxc_functionals_isgga()) pawxc_get_xclevel=2 + if (libxc_functionals_ismgga()) pawxc_get_xclevel=2 + if (libxc_functionals_is_hybrid()) pawxc_get_xclevel=2 + end if + +end function pawxc_get_xclevel +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawxc/pawxc_get_usekden +!! NAME +!! pawxc_get_usekden +!! +!! FUNCTION +!! Check if kinetic energy density is used in XC functional +!! +!! INPUTS +!! ixc= choice of exchange-correlation scheme +!! +!! SOURCE + +function pawxc_get_usekden(ixc) +!Arguments ------------------------------------ + integer,intent(in) :: ixc + integer :: pawxc_get_usekden + +! ************************************************************************* + + pawxc_get_usekden=0 + if (ixc<0) then + if (libxc_functionals_ismgga()) pawxc_get_usekden=1 + else if (ixc==31.or.ixc==34.or.ixc==35) then + pawxc_get_usekden=1 + end if + +end function pawxc_get_usekden +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawxc/pawxc_get_uselaplacian +!! NAME +!! pawxc_get_uselaplacian +!! +!! FUNCTION +!! Check if laplacian of density is used in XC functional +!! +!! INPUTS +!! ixc= choice of exchange-correlation scheme +!! +!! SOURCE + +function pawxc_get_uselaplacian(ixc) +!Arguments ------------------------------------ + integer,intent(in) :: ixc + integer :: pawxc_get_uselaplacian + +! ************************************************************************* + + pawxc_get_uselaplacian=0 + if (ixc<0) then + if (libxc_functionals_needs_laplacian()) pawxc_get_uselaplacian=1 + else if (ixc==32.or.ixc==35) then + pawxc_get_uselaplacian=1 + end if + +end function pawxc_get_uselaplacian +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawxc/pawxc_is_tb09 +!! NAME +!! pawxc_is_tb09 +!! +!! FUNCTION +!! Check if the XC functional is Tran-Blaha 09 (modified BJ) +!! +!! INPUTS +!! ixc= choice of exchange-correlation scheme +!! +!! SOURCE + +function pawxc_is_tb09(ixc) +!Arguments ------------------------------------ + integer,intent(in) :: ixc + logical :: pawxc_is_tb09 + +! ************************************************************************* + + pawxc_is_tb09=.false. + if (ixc<0) then + pawxc_is_tb09 = libxc_functionals_is_tb09() + end if + +end function pawxc_is_tb09 +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawxc/pawxc +!! NAME +!! pawxc +!! +!! FUNCTION +!! Start from the density or spin-density, and compute xc correlation +!! potential and energies inside a paw sphere. +!! USE THE DENSITY OVER A WHOLE SPHERICAL GRID (r,theta,phi) +!! Driver of XC functionals. +!! +!! INPUTS +!! corexc(nrad)=core density on radial grid +!! ixc= choice of exchange-correlation scheme +!! lm_size=size of density array rhor (see below) +!! lmselect(lm_size)=select the non-zero LM-moments of input density rhor +!! nhat(nrad,lm_size,nspden)=compensation density +!! (total in 1st half and spin-up in 2nd half if nspden=2) +!! nkxc=second dimension of the kxc array. If /=0, the exchange-correlation kernel must be computed +!! non_magnetic_xc= if true, handle density/potential as non-magnetic (even if it is) +!! nrad=size of radial mesh for densities/potentials (might be different from pawrad%mesh_size) +!! nspden=number of spin-density components +!! option=0 compute both XC energies (direct+double-counting) and potential +!! 1 compute only XC potential +!! 2 compute only XC energies (direct+double-counting) +!! 3 compute only XC energy by direct scheme +!! 4 compute only XC energy by direct scheme for spherical part of the density +!! 5 compute only XC potential for spherical part of the density +!! pawang =paw angular mesh and related data +!! pawrad =paw radial mesh and related data +!! rhor(nrad,lm_size,nspden)=electron density in real space in electrons/bohr**3 +!! (total in 1st half and spin-up in 2nd half if nspden=2) +!! usecore= 1 if core density has to be used in Exc/Vxc ; 0 otherwise +!! usexcnhat= 0 if compensation density does not have to be used +!! 1 if compensation density has to be used in double counting energy term only +!! 2 if compensation density (nhat) has to be used in Exc/Vxc and double counting energy term +!! xclevel= XC functional level +!! xc_denpos= lowest allowed density (usually for the computation of the XC functionals) +!! ----- Optional arguments ----- +!! [coretau(nrad*usekden)]= core kinetic energy density (optional) +!! [taur(nrad,lm_size,nspden*usekden)]= kinetic energy density on radial mesh (optional) +!! [xc_taupos]= lowest allowed kinetic energy density (for mGGA XC functionals) +!! +!! OUTPUT +!! == if option=0, 2, 3, or 4 == +!! enxc=returned exchange and correlation energy (hartree) +!! == if option=0 or 2 == +!! enxcdc=returned exchange-cor. contribution to double-counting energy +!! == if option=0, 1 or 5 == +!! vxc(nrad,pawang%angl_size,nspden)=xc potential +!! (spin up in 1st half and spin-down in 2nd half if nspden=2) +!! == if option=0, 1 or 5 and usekden=1 == +!! [vxctau(nrad,pawang%angl_size,nspden*usekden)]=xc potential due to kinetic energy density +!! (spin up in 1st half and spin-down in 2nd half if nspden=2) (optional) +!! == if nkxc>0 == +!! kxc(nrad,pawang%angl_size,nkxc)=xc kernel +!! (see notes below for nkxc) +!! == if nk3xc>0 == +!! k3xc(nrad,pawang%angl_size,nk3xc)= derivative of xc kernel +!! (see notes below for nk3xc) +!! == For the TB09 XC functional (modified Becke-Johnson) +!! [grho1_over_rho1]=Integral of |Grad(rho^1)|/rho^1 over the augmentation region +!! Used to compute the c parameter of the TB09 XC functional +!! +!! NOTES +!! Content of Kxc array: +!! ===== if LDA +!! if nspden==1: kxc(:,1)= d2Exc/drho2 +!! (kxc(:,2)= d2Exc/drho_up drho_dn) +!! if nspden>=2: kxc(:,1)= d2Exc/drho_up drho_up +!! kxc(:,2)= d2Exc/drho_up drho_dn +!! kxc(:,3)= d2Exc/drho_dn drho_dn +!! if nspden==4: kxc(:,4:6)= (m_x, m_y, m_z) (magnetization) +!! ===== if GGA or mGGA +!! if nspden==1: +!! kxc(:,1)= d2Exc/drho2 +!! kxc(:,2)= 1/|grad(rho)| dExc/d|grad(rho)| +!! kxc(:,3)= 1/|grad(rho)| d2Exc/d|grad(rho)| drho +!! kxc(:,4)= 1/|grad(rho)| * d/d|grad(rho)| ( 1/|grad(rho)| dExc/d|grad(rho)| ) +!! kxc(:,5)= gradx(rho) +!! kxc(:,6)= grady(rho) +!! kxc(:,7)= gradz(rho) +!! if nspden>=2: +!! kxc(:,1)= d2Exc/drho_up drho_up +!! kxc(:,2)= d2Exc/drho_up drho_dn +!! kxc(:,3)= d2Exc/drho_dn drho_dn +!! kxc(:,4)= 1/|grad(rho_up)| dEx/d|grad(rho_up)| +!! kxc(:,5)= 1/|grad(rho_dn)| dEx/d|grad(rho_dn)| +!! kxc(:,6)= 1/|grad(rho_up)| d2Ex/d|grad(rho_up)| drho_up +!! kxc(:,7)= 1/|grad(rho_dn)| d2Ex/d|grad(rho_dn)| drho_dn +!! kxc(:,8)= 1/|grad(rho_up)| * d/d|grad(rho_up)| ( 1/|grad(rho_up)| dEx/d|grad(rho_up)| ) +!! kxc(:,9)= 1/|grad(rho_dn)| * d/d|grad(rho_dn)| ( 1/|grad(rho_dn)| dEx/d|grad(rho_dn)| ) +!! kxc(:,10)=1/|grad(rho)| dEc/d|grad(rho)| +!! kxc(:,11)=1/|grad(rho)| d2Ec/d|grad(rho)| drho_up +!! kxc(:,12)=1/|grad(rho)| d2Ec/d|grad(rho)| drho_dn +!! kxc(:,13)=1/|grad(rho)| * d/d|grad(rho)| ( 1/|grad(rho)| dEc/d|grad(rho)| ) +!! kxc(:,14)=gradx(rho_up) +!! kxc(:,15)=gradx(rho_dn) +!! kxc(:,16)=grady(rho_up) +!! kxc(:,17)=grady(rho_dn) +!! kxc(:,18)=gradz(rho_up) +!! kxc(:,19)=gradz(rho_dn) +!! if nspden==4: +!! kxc(:,20:22)= (m_x, m_y, m_z) (magnetization) +!! Note about mGGA: 2nd derivatives involving Tau or Laplacian are not output +!! Content of K3xc array: +!! ===== if LDA (xclevel=1) : +!! if nspden==1: return k3xc(:,1)=d3Exc/drho3 +!! if nspden>=2, return k3xc(:,1)=d3Exc/drho_up drho_up drho_up +!! k3xc(:,2)=d3Exc/drho_up drho_up drho_dn +!! k3xc(:,3)=d3Exc/drho_up drho_dn drho_dn +!! k3xc(:,4)=d3Exc/drho_dn drho_dn drho_dn +!! +!! SOURCE +subroutine pawxc(corexc,enxc,enxcdc,hyb_mixing,ixc,kxc,k3xc,lm_size,lmselect,nhat,nkxc,nk3xc,non_magnetic_xc,& +& nrad,nspden,option,pawang,pawrad,rhor,usecore,usexcnhat,vxc,xclevel,xc_denpos,& +& coretau,taur,vxctau,xc_taupos,grho1_over_rho1) ! optional arguments + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: ixc,lm_size,nkxc,nk3xc,nrad,nspden,option,usecore,usexcnhat,xclevel + logical,intent(in) :: non_magnetic_xc + real(dp),intent(in) :: hyb_mixing,xc_denpos + real(dp),intent(in),optional :: xc_taupos + real(dp),intent(out) :: enxc,enxcdc + real(dp),intent(out),optional :: grho1_over_rho1 + type(pawang_type),intent(in) :: pawang + type(pawrad_type),intent(in) :: pawrad +!arrays + logical,intent(in) :: lmselect(lm_size) + real(dp),intent(in) :: corexc(nrad) + real(dp),intent(in) :: nhat(nrad,lm_size,nspden*((usexcnhat+1)/2)) + real(dp),intent(in),target :: rhor(nrad,lm_size,nspden) + real(dp),intent(in),target,optional:: coretau(:),taur(:,:,:) + real(dp),intent(out) :: kxc(nrad,pawang%angl_size,nkxc) + real(dp),intent(out) :: k3xc(nrad,pawang%angl_size,nk3xc) + real(dp),intent(out),target :: vxc(nrad,pawang%angl_size,nspden) + real(dp),intent(out),target,optional :: vxctau(:,:,:) + +!Local variables------------------------------- +!scalars + integer,parameter :: mu(3,3)=reshape([4,9,8,9,5,7,8,7,6],[3,3]) ! Voigt indices + integer :: ii,ilm,ipts,ir,ispden,iwarn,jj,lm_size_eff,ndvxc,nd2vxc,ngrad + integer :: nkxc_updn,npts,nspden_eff,nspden_updn,nspgrad,nu + integer :: nvxcgrho,nvxclrho,nvxctau,order + integer :: usecoretau,usegradient,usekden,uselaplacian + logical :: need_vxctau,with_taur + real(dp) :: enxcr,factor,my_xc_taupos,rhotot,sumg,vxcrho + character(len=500) :: msg +!arrays + real(dp),allocatable :: dgxc(:),dlxc(:),d2lxc(:),dnexcdn(:,:),drho(:),d2rho(:),drhocore(:) + real(dp),allocatable :: vxci(:,:),vxci_grho(:,:),vxci_lrho(:,:),vxci_tau(:,:) + real(dp),allocatable :: dvxci(:,:),d2vxci(:,:),dylmdr(:,:,:) + real(dp),allocatable :: exci(:),ff(:),grho2_updn(:,:),gxc(:,:,:,:),lxc(:,:,:) + real(dp),allocatable :: rhoarr(:,:),rho_updn(:,:),lrho_updn(:,:),lrhocore(:) + real(dp),allocatable :: tauarr(:,:),tau_updn(:,:),ylmlapl(:,:) + real(dp),allocatable,target :: mag(:,:,:),rhohat(:,:,:),rhonow(:,:,:) + real(dp),pointer :: mag_(:,:),rho_(:,:,:),tau_(:,:,:),vxctau_(:,:,:) + real(dp), LIBPAW_CONTIGUOUS pointer :: vxc_diag(:,:),vxc_nc(:,:),vxc_updn(:,:,:) +#ifdef LIBPAW_ISO_C_BINDING + type(C_PTR) :: cptr +#endif + +! ************************************************************************* + +!---------------------------------------------------------------------- +!----- Check options +!---------------------------------------------------------------------- + +!Some dimensions + nkxc_updn=merge(nkxc-3,nkxc,nkxc==6.or.nkxc==22) + +!Compatibility tests + if(nspden==4.and.nk3xc>0) then + msg='K3xc for nspden=4 not implemented!' + LIBPAW_ERROR(msg) + end if + if(nk3xc>0.and.nkxc_updn==0) then + msg='nkxc must be non-zero if nk3xc is!' + LIBPAW_ERROR(msg) + end if + if(nspden==4.and.xclevel==2.and..not.non_magnetic_xc) then + msg='GGA/mGGA for nspden=4 not fully implemented! (only works if usepawu=4 or pawxcdev/=0)' + LIBPAW_ERROR(msg) + end if + if(pawang%angl_size==0) then + msg='pawang%angl_size=0!' + LIBPAW_BUG(msg) + end if + if(.not.allocated(pawang%ylmr)) then + msg='pawang%ylmr must be allocated!' + LIBPAW_BUG(msg) + end if + if(xclevel==2.and.(.not.allocated(pawang%ylmrgr))) then + msg='pawang%ylmrgr must be allocated!' + LIBPAW_BUG(msg) + end if + if(option==4.or.option==5) then + if (pawang%angl_size/=1) then + msg='When option=4 or 5, pawang%angl_size must be 1!' + LIBPAW_BUG(msg) + end if + if (pawang%ylm_size/=1) then + msg='When option=4 or 5, pawang%ylm_size must be 1!' + LIBPAW_BUG(msg) + end if + if (abs(pawang%anginit(1,1)-one)>tol12.or.abs(pawang%anginit(2,1))>tol12.or. & +& abs(pawang%anginit(3,1))>tol12) then + msg='When option=4 or 5, pawang%anginit must be (1 0 0)!' + LIBPAW_BUG(msg) + end if + end if + if (option/=1.and.option/=5) then + if (nrad0) kxc(:,:,:)=zero + if (nk3xc>0) k3xc(:,:,:)=zero + order=1;if (nkxc_updn>0) order=2;if (nk3xc>0) order=3 ! to which der. of the energy the computation must be done + if (present(grho1_over_rho1)) grho1_over_rho1=zero + my_xc_taupos=xc_denpos;if(present(xc_taupos)) my_xc_taupos=xc_taupos + + if (xclevel==0.or.ixc==0) then + msg='Note that no xc is applied (ixc=0).' + LIBPAW_WARNING(msg) + + else + +! Determine several flags/sizes defining the XCfunctional + call pawxc_size_dvxc_wrapper(ixc,order,nspden_updn,& +& usegradient=usegradient,uselaplacian=uselaplacian,usekden=usekden,& +& nvxcgrho=nvxcgrho,nvxclrho=nvxclrho,nvxctau=nvxctau,ndvxc=ndvxc,nd2vxc=nd2vxc) + +! Allocation of temporary memory space + LIBPAW_ALLOCATE(rhonow,(nrad,nspden,ngrad*ngrad+uselaplacian)) + LIBPAW_ALLOCATE(rhoarr,(nrad,nspden)) + if (usexcnhat>0) then + LIBPAW_ALLOCATE(rhohat,(nrad,lm_size,nspden)) + rhohat(:,:,:)=rhor(:,:,:)+nhat(:,:,:) + end if + if (usexcnhat< 2) rho_=> rhor + if (usexcnhat==2) rho_=> rhohat + if (option/=3.and.option/=4) then + if (nspden/=4) then + vxc_updn => vxc + else + LIBPAW_POINTER_ALLOCATE(vxc_updn,(nrad,npts,nspden_updn)) + LIBPAW_ALLOCATE(mag,(nrad,npts,3)) + end if + end if + +! Meta-GGA: allocation of temporary space + with_taur=.false. ; tau_ => null() + usecoretau=0 ; need_vxctau=.false. + LIBPAW_ALLOCATE(tauarr,(nrad,nspden*usekden)) + if (usekden==1) then + if (present(taur)) then + with_taur=.true. ; tau_=> taur + if (size(taur)/=nrad*lm_size*nspden) then + msg='wrong size for taur!' + LIBPAW_BUG(msg) + end if + end if + if (present(vxctau)) then + need_vxctau=.true. ; vxctau_ => vxctau + if (size(vxctau)/=nrad*pawang%angl_size*nspden) then + msg='wrong size for vxctau!' + LIBPAW_BUG(msg) + end if + else if (option==0.or.option==2) then + !Need to compute vxctau temporarily + need_vxctau=.true. + LIBPAW_ALLOCATE(vxctau_,(nrad,pawang%angl_size,nspden)) + end if + if (present(coretau)) then + usecoretau=usecore + if (size(coretau)/=nrad) then + msg='wrong size for coretau!' + LIBPAW_BUG(msg) + end if + end if + end if + +! Need derivative of core density for GGA/mGGA + if (xclevel==2.and.usecore==1) then + LIBPAW_ALLOCATE(drhocore,(nrad)) + call nderiv_gen(drhocore,corexc,pawrad) + if (uselaplacian==1) then + LIBPAW_ALLOCATE(lrhocore,(nrad)) + LIBPAW_ALLOCATE(d2rho,(nrad)) + call nderiv_gen(d2rho,drhocore,pawrad) + lrhocore(2:nrad)=d2rho(2:nrad)+two*drhocore(2:nrad)/pawrad%rad(2:nrad) + call pawrad_deducer0(lrhocore,nrad,pawrad) + LIBPAW_DEALLOCATE(d2rho) + end if + end if + +! Allocation of mandatory arguments of drivexc + LIBPAW_ALLOCATE(exci,(nrad)) + LIBPAW_ALLOCATE(vxci,(nrad,nspden_updn)) + LIBPAW_ALLOCATE(rho_updn,(nrad,nspden_updn)) + +! Allocation of optional arguments of drivexc + LIBPAW_ALLOCATE(grho2_updn,(nrad,(2*nspden_updn-1)*usegradient)) + LIBPAW_ALLOCATE(lrho_updn,(nrad,nspden_updn*uselaplacian)) + LIBPAW_ALLOCATE(tau_updn,(nrad,nspden_updn*usekden)) + LIBPAW_ALLOCATE(vxci_grho,(nrad,nvxcgrho)) + LIBPAW_ALLOCATE(vxci_lrho,(nrad,nvxclrho)) + LIBPAW_ALLOCATE(vxci_tau,(nrad,nvxctau)) + LIBPAW_ALLOCATE(dvxci,(nrad,ndvxc)) + LIBPAW_ALLOCATE(d2vxci,(nrad,nd2vxc)) + LIBPAW_ALLOCATE(dnexcdn,(nrad,nspgrad)) + +! GGA/mGGA: convert Ylm derivatives from normalized (r_i^hat) +! to standard cartesian coordinates (r_i) +! dYlm/dr_i = { dYlm/dr_i^hat - r_i^hat * Sum_j[dYlm/dr_j^hat r_j^hat] } * (1/r) +! Laplacian: convert Ylm second derivatives from normalized to standard cartesian coordinates +! Sum_i[d^2Ylm/dr_i^2] = { Sum_j[dYlm/dr_j^hat r_j^hat] +! - Sum_j>k[d^2Ylm/dr_j^hat.dr_k^hat r_j^hat r_k^hat] } * (-2/r^2) +! Note that we consider here r=1 (r will be used later)... + if (xclevel==2) then + LIBPAW_ALLOCATE(dylmdr,(3,npts,pawang%ylm_size)) + do ilm=1,pawang%ylm_size + do ipts=1,npts + factor=sum(pawang%ylmrgr(1:3,ilm,ipts)*pawang%anginit(1:3,ipts)) + dylmdr(1:3,ipts,ilm)=pawang%ylmrgr(1:3,ilm,ipts)-factor*pawang%anginit(1:3,ipts) + end do + end do + LIBPAW_ALLOCATE(gxc,(nrad,3,pawang%ylm_size,nspden_updn)) + gxc=zero + if (uselaplacian==1) then + LIBPAW_ALLOCATE(ylmlapl,(npts,pawang%ylm_size)) + ylmlapl(:,:)=zero + do ilm=1,pawang%ylm_size + do ipts=1,npts + do ii=1,3 + factor=zero + do jj=1,ii + nu=mu(jj,ii) + factor=factor+pawang%ylmrgr(nu,ilm,ipts)*pawang%anginit(jj,ipts) + end do + ylmlapl(ipts,ilm)=ylmlapl(ipts,ilm) & +& -two*(pawang%ylmrgr(ii,ilm,ipts)+factor)*pawang%anginit(ii,ipts) + end do + end do + end do + LIBPAW_ALLOCATE(lxc,(nrad,pawang%ylm_size,nspden_updn)) + lxc=zero + end if + end if + +! ---------------------------------------------------------------------- +! ----- Loop on the angular part and inits +! ---------------------------------------------------------------------- + +! Do loop on the angular part + do ipts=1,npts + +! Copy the input density for this (theta,phi) + rhoarr(:,:)=zero + do ispden=1,nspden + do ilm=1,lm_size_eff + if (lmselect(ilm)) then + rhoarr(1:nrad,ispden)=rhoarr(1:nrad,ispden) & +& +rho_(1:nrad,ilm,ispden)*pawang%ylmr(ilm,ipts) + end if + end do + end do + if (usekden==1) then + tauarr(:,:)=zero + if (with_taur) then + do ispden=1,nspden + do ilm=1,lm_size_eff + tauarr(1:nrad,ispden)=tauarr(1:nrad,ispden) & + & +tau_(1:nrad,ilm,ispden)*pawang%ylmr(ilm,ipts) + end do + end do + end if + end if + if (usecore==1) then + rhoarr(1:nrad,1)=rhoarr(1:nrad,1)+corexc(1:nrad) + if (nspden==2) rhoarr(1:nrad,2)=rhoarr(1:nrad,2)+half*corexc(1:nrad) + end if + if (usecoretau==1) then + tauarr(1:nrad,1)=tauarr(1:nrad,1)+coretau(1:nrad) + if (nspden==2) tauarr(1:nrad,2)=tauarr(1:nrad,2)+half*coretau(1:nrad) + end if + +! Optionally suppress magnetic part + if (non_magnetic_xc) then + if(nspden==2) rhoarr(:,2)=rhoarr(:,1)*half + if(nspden==4) rhoarr(:,2:4)=zero + if (usekden==1) then + if(nspden==2) tauarr(:,2)=tauarr(:,1)*half + if(nspden==4) tauarr(:,2:4)=zero + end if + endif + + rhonow(1:nrad,1:nspden,1)=rhoarr(1:nrad,1:nspden) + +! GGA: compute gradient (and possibly laplacian) of density + if (xclevel==2) then + LIBPAW_ALLOCATE(drho,(nrad)) + LIBPAW_ALLOCATE(d2rho,(nrad*uselaplacian)) + LIBPAW_ALLOCATE(ff,(nrad)) + rhonow(:,:,2:4+uselaplacian)=zero + do ispden=1,nspden + do ilm=1,lm_size_eff + if (lmselect(ilm)) then + ff(1:nrad)=rho_(1:nrad,ilm,ispden) + call nderiv_gen(drho,ff,pawrad) + ff(2:nrad)=ff(2:nrad)/pawrad%rad(2:nrad) + call pawrad_deducer0(ff,nrad,pawrad) + do ii=1,3 + rhonow(1:nrad,ispden,1+ii)=rhonow(1:nrad,ispden,1+ii) & +& +drho(1:nrad)*pawang%ylmr(ilm,ipts)*pawang%anginit(ii,ipts) & +& +ff(1:nrad)*dylmdr(ii,ipts,ilm) + end do + if (uselaplacian==1) then + call nderiv_gen(d2rho,drho,pawrad) + ff(2:nrad)=ff(2:nrad)/pawrad%rad(2:nrad) + call pawrad_deducer0(ff,nrad,pawrad) + drho(2:nrad)=drho(2:nrad)/pawrad%rad(2:nrad) + call pawrad_deducer0(drho,nrad,pawrad) + rhonow(1:nrad,ispden,5)=rhonow(1:nrad,ispden,5) & +& +ff(1:nrad)*ylmlapl(ipts,ilm) & +& +(d2rho(1:nrad)+two*drho(1:nrad))*pawang%ylmr(ilm,ipts) + end if + end if + end do + end do + LIBPAW_DEALLOCATE(d2rho) + LIBPAW_DEALLOCATE(drho) + LIBPAW_DEALLOCATE(ff) + if (non_magnetic_xc) then + do ii=1,3 + if(nspden==2) rhonow(1:nrad,2,1+ii)=rhonow(1:nrad,1,1+ii)*half + if(nspden==4) rhonow(1:nrad,2:4,1+ii)=zero + end do + if (uselaplacian==1) then + if(nspden==2) rhonow(1:nrad,2,5)=rhonow(1:nrad,1,5)*half + if(nspden==4) rhonow(1:nrad,2:4,5)=zero + end if + end if + if (usecore==1) then + do ii=1,3 + rhonow(1:nrad,1,1+ii)=rhonow(1:nrad,1,1+ii) & +& +drhocore(1:nrad)*pawang%anginit(ii,ipts) + end do + if (nspden==2) then + do ii=1,3 + rhonow(1:nrad,2,1+ii)=rhonow(1:nrad,2,1+ii) & +& +half*drhocore(1:nrad)*pawang%anginit(ii,ipts) + end do + end if + if (uselaplacian==1) then + rhonow(1:nrad,1,5)=rhonow(1:nrad,1,5)+lrhocore(1:nrad) + if (nspden==2) rhonow(1:nrad,2,5)=rhonow(1:nrad,2,5)+half*lrhocore(1:nrad) + end if + end if + end if + +! Storage of density (and gradient) in (up,dn) format + if (nspden==1) then + rho_updn(1:nrad,1)=rhonow(1:nrad,1,1)*half + if (xclevel==2) grho2_updn(1:nrad,1)= & +& quarter*(rhonow(1:nrad,1,2)**2+rhonow(1:nrad,1,3)**2+rhonow(1:nrad,1,4)**2) + if (usekden==1) tau_updn(1:nrad,1)=tauarr(1:nrad,1)*half + if (uselaplacian==1) lrho_updn(1:nrad,1)=rhonow(1:nrad,1,5)*half + else if (nspden==2) then + rho_updn(1:nrad,1)=rhonow(1:nrad,2,1) + rho_updn(1:nrad,2)=rhonow(1:nrad,1,1)-rhonow(1:nrad,2,1) + if (xclevel==2) then + grho2_updn(1:nrad,1)=rhonow(1:nrad,2,2)**2+rhonow(1:nrad,2,3)**2+rhonow(1:nrad,2,4)**2 + grho2_updn(1:nrad,2)=(rhonow(1:nrad,1,2)-rhonow(1:nrad,2,2))**2 + & +& (rhonow(1:nrad,1,3)-rhonow(1:nrad,2,3))**2 + & +& (rhonow(1:nrad,1,4)-rhonow(1:nrad,2,4))**2 + grho2_updn(1:nrad,3)=rhonow(1:nrad,1,2)**2+rhonow(1:nrad,1,3)**2+rhonow(1:nrad,1,4)**2 + end if + if (usekden==1) then + tau_updn(1:nrad,1)=tauarr(1:nrad,2) + tau_updn(1:nrad,2)=tauarr(1:nrad,1)-tauarr(1:nrad,2) + end if + if (uselaplacian==1) then + lrho_updn(1:nrad,1)=rhonow(1:nrad,2,5) + lrho_updn(1:nrad,2)=rhonow(1:nrad,1,5)-rhonow(1:nrad,2,5) + end if + else if (nspden==4) then + mag_ => rhonow(1:nrad,2:4,1) + mag(1:nrad,ipts,1:3)=mag_(1:nrad,1:3) + call pawxc_rotate_mag(rhonow(:,:,1),rho_updn,mag_,nrad) ! Note : gradients are not computed there + if (non_magnetic_xc.and.xclevel==2) then ! In this case grho2_updn is easy to compute + grho2_updn(1:nrad,1)=quarter*(rhonow(1:nrad,1,2)**2+rhonow(1:nrad,1,3)**2+rhonow(1:nrad,1,4)**2) + grho2_updn(1:nrad,2)=grho2_updn(1:nrad,1) + grho2_updn(1:nrad,3)=rhonow(1:nrad,1,2)**2+rhonow(1:nrad,1,3)**2+rhonow(1:nrad,1,4)**2 + end if + end if + +! Make the density positive everywhere (but do not care about gradients) + call pawxc_mkdenpos_wrapper(iwarn,nrad,nspden_updn,0,rho_updn,xc_denpos) + if (usekden==1) then + call pawxc_mkdenpos_wrapper(iwarn,nrad,nspden_updn,0,tau_updn,my_xc_taupos) + end if + +! Call to main XC driver + call pawxc_drivexc_wrapper(hyb_mixing,ixc,order,nrad,nspden_updn,& +& usegradient,uselaplacian,usekden,rho_updn,exci,vxci,& +& nvxcgrho,nvxclrho,nvxctau,ndvxc,nd2vxc,& +& grho2=grho2_updn,vxcgrho=vxci_grho,& +& lrho=lrho_updn,vxclrho=vxci_lrho,& +& tau=tau_updn,vxctau=vxci_tau,& +& dvxc=dvxci,d2vxc=d2vxci) + +! If fake meta-GGA, has to remove the core contribution +! when electronic effective mass has been modified + if (usecoretau==1.and.(ixc==31.or.ixc==35)) then + if (ixc==31.or.ixc==35) then + factor=one-(one/1.01_dp) + if (nspden_updn==1) then + factor=factor*half + do ii=1,nrad + exci(ii)=exci(ii)-factor*coretau(ii)/rho_updn(ii,1) + end do + else + do ii=1,nrad + exci(ii)=exci(ii)-factor*coretau(ii)/(rho_updn(ii,1)+rho_updn(ii,2)) + end do + end if + else + msg='MetaGGA ixc=34 is not yet allowed with a core kinetic energy density!' + LIBPAW_ERROR(msg) + end if + end if + +! ---------------------------------------------------------------------- +! ----- Store XC kernel and its derivative +! ---------------------------------------------------------------------- + if (nkxc_updn>0.and.ndvxc>0) then + if (nkxc_updn==1.and.ndvxc==15) then + kxc(1:nrad,ipts,1)=half*(dvxci(1:nrad,1)+dvxci(1:nrad,9)+dvxci(1:nrad,10)) + else if (nkxc_updn==3.and.ndvxc==15) then + kxc(1:nrad,ipts,1)=dvxci(1:nrad,1)+dvxci(1:nrad,9) + kxc(1:nrad,ipts,2)=dvxci(1:nrad,10) + kxc(1:nrad,ipts,3)=dvxci(1:nrad,2)+dvxci(1:nrad,11) + else if (nkxc_updn==7.and.ndvxc==8) then + kxc(1:nrad,ipts,1)=half*dvxci(1:nrad,1) + kxc(1:nrad,ipts,2)=half*dvxci(1:nrad,3) + kxc(1:nrad,ipts,3)=quarter*dvxci(1:nrad,5) + kxc(1:nrad,ipts,4)=eighth*dvxci(1:nrad,7) + else if (nkxc_updn==7.and.ndvxc==15) then + kxc(1:nrad,ipts,1)=half*(dvxci(1:nrad,1)+dvxci(1:nrad,9)+dvxci(1:nrad,10)) + kxc(1:nrad,ipts,2)=half*dvxci(1:nrad,3)+dvxci(1:nrad,12) + kxc(1:nrad,ipts,3)=quarter*dvxci(1:nrad,5)+dvxci(1:nrad,13) + kxc(1:nrad,ipts,4)=eighth*dvxci(1:nrad,7)+dvxci(1:nrad,15) + else if (nkxc_updn==19.and.ndvxc==15) then + kxc(1:nrad,ipts,1)=dvxci(1:nrad,1)+dvxci(1:nrad,9) + kxc(1:nrad,ipts,2)=dvxci(1:nrad,10) + kxc(1:nrad,ipts,3)=dvxci(1:nrad,2)+dvxci(1:nrad,11) + kxc(1:nrad,ipts,4)=dvxci(1:nrad,3) + kxc(1:nrad,ipts,5)=dvxci(1:nrad,4) + kxc(1:nrad,ipts,6)=dvxci(1:nrad,5) + kxc(1:nrad,ipts,7)=dvxci(1:nrad,6) + kxc(1:nrad,ipts,8)=dvxci(1:nrad,7) + kxc(1:nrad,ipts,9)=dvxci(1:nrad,8) + kxc(1:nrad,ipts,10)=dvxci(1:nrad,12) + kxc(1:nrad,ipts,11)=dvxci(1:nrad,13) + kxc(1:nrad,ipts,12)=dvxci(1:nrad,14) + kxc(1:nrad,ipts,13)=dvxci(1:nrad,15) + else ! Other cases + kxc(1:nrad,ipts,1:nkxc)=zero + kxc(1:nrad,ipts,1:min(nkxc,ndvxc))=dvxci(1:nrad,1:min(nkxc,ndvxc)) + end if + if (nkxc_updn==7) then + kxc(1:nrad,ipts,5)=rhonow(1:nrad,1,2) + kxc(1:nrad,ipts,6)=rhonow(1:nrad,1,3) + kxc(1:nrad,ipts,7)=rhonow(1:nrad,1,4) + else if (nkxc_updn==19) then + kxc(1:nrad,ipts,14)=rhonow(1:nrad,1,2) + kxc(1:nrad,ipts,15)=rhonow(1:nrad,2,2) + kxc(1:nrad,ipts,16)=rhonow(1:nrad,1,3) + kxc(1:nrad,ipts,17)=rhonow(1:nrad,2,3) + kxc(1:nrad,ipts,18)=rhonow(1:nrad,1,4) + kxc(1:nrad,ipts,19)=rhonow(1:nrad,2,4) + end if + end if + if (nkxc>=nkxc_updn+3) then + kxc(1:nrad,ipts,nkxc_updn+1)=rhonow(1:nrad,2,1) + kxc(1:nrad,ipts,nkxc_updn+2)=rhonow(1:nrad,3,1) + kxc(1:nrad,ipts,nkxc_updn+3)=rhonow(1:nrad,4,1) + end if + +! kernel derivative : + if (nk3xc>0.and.nd2vxc>0) then + k3xc(1:nrad,ipts,1:min(nk3xc,nd2vxc))=d2vxci(1:nrad,1:min(nk3xc,nd2vxc)) + end if + +! ---------------------------------------------------------------------- +! ----- Store derivative of Exc wrt kinetic energy density +! ---------------------------------------------------------------------- + if (need_vxctau) then + do ispden=1,nspden_updn + vxctau_(1:nrad,ipts,ispden)=vxci_tau(1:nrad,ispden) + end do + end if + +! ---------------------------------------------------------------------- +! ----- Accumulate and store XC potential +! ---------------------------------------------------------------------- + + if (option/=3.and.option/=4) then + + do ispden=1,nspden_updn + vxc_updn(1:nrad,ipts,ispden)=vxci(1:nrad,ispden) + end do + +! For GGAs, additional terms appear + if (xclevel==2.and.ixc/=13)then + dnexcdn(1:nrad,1:nspden_updn)=vxci(1:nrad,1:nspden_updn) +! Treat explicitely spin up, spin down and total spin for spin-polarized + do ii=1,3 + if(nspden_updn==1.and.ii>=2)exit !exit when ii=1 is finished if non-spin-polarized + do ir=1,nrad +! If the norm of the gradient vanishes, then the different terms vanishes + if(grho2_updn(ir,ii)<1.0d-24) then + dnexcdn(ir,ii+nspden_updn)=zero;cycle + end if +! Compute the derivative of n.e_xc wrt spin up, spin down, or total density + if(nspden_updn==1)then + dnexcdn(ir,ii+nspden_updn)=half*vxci_grho(ir,1) !Definition of vxci_grho changed in v3.3 + if (nvxcgrho==3) dnexcdn(ir,ii+nspden_updn)=dnexcdn(ir,ii+nspden_updn)+vxci_grho(ir,3) + else if(nspden_updn==2)then + if (nvxcgrho==3) then + dnexcdn(ir,ii+nspden_updn)=vxci_grho(ir,ii) + else if (ii/=3) then + dnexcdn(ir,ii+nspden_updn)=vxci_grho(ir,ii) + else if (ii==3) then + dnexcdn(ir,ii+nspden_updn)=zero + end if + end if + end do + end do + call pawxc_xcmult_wrapper(dnexcdn,nrad,ngrad,nspden_eff,nspgrad,rhonow) + factor=one;if (nspden_updn==1) factor=half + if (option/=4.and.option/=5) then + factor=factor*four_pi +! Accumulate moments of gxc=1/grad(rho).dVxc/dgrad(rho) + do ispden=1,nspden_updn + do ilm=1,pawang%ylm_size + do ii=1,3 + gxc(1:nrad,ii,ilm,ispden)=gxc(1:nrad,ii,ilm,ispden)+rhonow(1:nrad,ispden,1+ii) & +& *pawang%ylmr(ilm,ipts)*pawang%angwgth(ipts)*factor + end do + end do + end do + else + do ispden=1,nspden_updn + gxc(1:nrad,1,1,ispden)=factor*rhonow(1:nrad,ispden,2) + end do + end if + end if + +! For laplacian-dependent functionals, additional terms appear + if (xclevel==2.and.uselaplacian==1) then + factor=one;if (nspden_updn==1) factor=half + if (option/=4.and.option/=5) then + factor=factor*four_pi +! Accumulate moments of lxc=dVxc/dlaplacian(rho) + do ispden=1,nspden_updn + do ilm=1,pawang%ylm_size + lxc(1:nrad,ilm,ispden)=lxc(1:nrad,ilm,ispden)+vxci_lrho(1:nrad,ispden) & +& *pawang%ylmr(ilm,ipts)*pawang%angwgth(ipts)*factor + end do + end do + else + do ispden=1,nspden_updn + lxc(1:nrad,1,ispden)=factor*vxci_lrho(1:nrad,ispden) + end do + end if + end if + + end if !option + +! ---------------------------------------------------------------------- +! ----- Accumulate and store XC energy +! ---------------------------------------------------------------------- + if (option/=1.and.option/=5) then + LIBPAW_ALLOCATE(ff,(nrad)) + ff(1:nrad)=rhoarr(1:nrad,1)*exci(1:nrad)*pawrad%rad(1:nrad)**2 + call simp_gen(enxcr,ff,pawrad) + if (option/=4) enxc=enxc+enxcr*pawang%angwgth(ipts) + if (option==4) enxc=enxc+enxcr + LIBPAW_DEALLOCATE(ff) + end if + +! ---------------------------------------------------------------------- +! ----- Accumulate integral of |Grad_rho|/Rho (to be used for TB09 XC) +! ---------------------------------------------------------------------- + if (present(grho1_over_rho1).and.pawxc_is_tb09(ixc).and.option<4) then + LIBPAW_ALLOCATE(ff,(nrad)) + if (nspden_updn==1) then + do ir=1,nrad + rhotot=two*rho_updn(ir,1) + if (abs(rhotot)>tol10) ff(ir)=sqrt(four*grho2_updn(ir,1))/rhotot + end do + else ! nspden_updn=2 + do ir=1,nrad + rhotot=rho_updn(ir,1)+rho_updn(ir,2) + if (abs(rhotot)>tol10) ff(ir)=sqrt(grho2_updn(ir,3))/rhotot + end do + end if + ff(1:nrad)=ff(1:nrad)*pawrad%rad(1:nrad)**2 + call simp_gen(sumg,ff,pawrad) + grho1_over_rho1=grho1_over_rho1+sumg*four_pi*pawang%angwgth(ipts) + LIBPAW_DEALLOCATE(ff) + end if + +! ---------------------------------------------------------------------- +! ----- End of the loop on npts (angular part) +! ---------------------------------------------------------------------- + end do + +! Deallocate temporary memory space + LIBPAW_DEALLOCATE(exci) + LIBPAW_DEALLOCATE(vxci) + LIBPAW_DEALLOCATE(rho_updn) + LIBPAW_DEALLOCATE(tau_updn) + LIBPAW_DEALLOCATE(lrho_updn) + LIBPAW_DEALLOCATE(dvxci) + LIBPAW_DEALLOCATE(d2vxci) + LIBPAW_DEALLOCATE(vxci_grho) + LIBPAW_DEALLOCATE(vxci_lrho) + LIBPAW_DEALLOCATE(vxci_tau) + LIBPAW_DEALLOCATE(grho2_updn) + LIBPAW_DEALLOCATE(dnexcdn) + LIBPAW_DEALLOCATE(rhonow) + if (allocated(drhocore)) then + LIBPAW_DEALLOCATE(drhocore) + end if + if (allocated(lrhocore)) then + LIBPAW_DEALLOCATE(lrhocore) + end if + +! ---------------------------------------------------------------------- +! ----- If GGA, modify potential with term from density gradient +! ---------------------------------------------------------------------- + if (option/=3.and.option/=4.and.xclevel==2.and.ixc/=13) then +! Compute divergence of gxc and substract it from Vxc + LIBPAW_ALLOCATE(dgxc,(nrad)) +! Need to multiply gxc by 2 in the non-polarised case + factor=one;if (nspden_updn==1) factor=two + if (option/=4.and.option/=5) then + LIBPAW_ALLOCATE(ff,(nrad)) + do ispden=1,nspden_updn + do ilm=1,pawang%ylm_size + do ii=1,3 + ff(1:nrad)=gxc(1:nrad,ii,ilm,ispden) + call nderiv_gen(dgxc,ff,pawrad) + ff(2:nrad)=ff(2:nrad)/pawrad%rad(2:nrad) + call pawrad_deducer0(ff,nrad,pawrad) + do ipts=1,npts + vxc_updn(1:nrad,ipts,ispden)=vxc_updn(1:nrad,ipts,ispden) & +& -factor*(dgxc(1:nrad)*pawang%anginit(ii,ipts)*pawang%ylmr(ilm,ipts) & +& +ff(1:nrad)*dylmdr(ii,ipts,ilm)) + end do + end do + end do + end do + LIBPAW_DEALLOCATE(ff) + else ! option==4 or option==5 + do ispden=1,nspden_updn + call nderiv_gen(dgxc,gxc(:,1,1,ispden),pawrad) + vxc_updn(2:nrad,1,ispden)=vxc_updn(2:nrad,1,ispden) & +& -factor*(dgxc(2:nrad)+two*gxc(2:nrad,1,1,ispden)/pawrad%rad(2:nrad)) + call pawrad_deducer0(vxc(:,1,ispden),nrad,pawrad) + end do + end if + LIBPAW_DEALLOCATE(dgxc) + end if ! GGA + +! ---------------------------------------------------------------------- +! ----- If mGGA, modify potential with term from density laplacian +! ---------------------------------------------------------------------- + if (option/=3.and.option/=4.and.xclevel==2.and.uselaplacian==1.and.ixc/=13) then +! Compute laplacian of lxc and add it to Vxc + LIBPAW_ALLOCATE(dlxc,(nrad)) + LIBPAW_ALLOCATE(d2lxc,(nrad)) +! Need to multiply lxc by 2 in the non-polarised case + factor=one;if (nspden_updn==1) factor=two + if (option/=4.and.option/=5) then + LIBPAW_ALLOCATE(ff,(nrad)) + do ispden=1,nspden_updn + do ilm=1,pawang%ylm_size + ff(1:nrad)=lxc(1:nrad,ilm,ispden) + call nderiv_gen(dlxc,ff,pawrad) + call nderiv_gen(d2lxc,dlxc,pawrad) + ff(2:nrad)=ff(2:nrad)/(pawrad%rad(2:nrad)**2) + call pawrad_deducer0(ff,nrad,pawrad) + dlxc(2:nrad)=dlxc(2:nrad)/pawrad%rad(2:nrad) + call pawrad_deducer0(dlxc,nrad,pawrad) + do ipts=1,npts + vxc_updn(1:nrad,ipts,ispden)=vxc_updn(1:nrad,ipts,ispden) & +& +factor*(ff(1:nrad)*ylmlapl(ipts,ilm) & +& +(d2lxc(1:nrad)+two*dlxc(1:nrad))*pawang%ylmr(ilm,ipts)) + end do + end do + end do + LIBPAW_DEALLOCATE(ff) + else ! option==4 or option==5 + do ispden=1,nspden_updn + call nderiv_gen(dlxc,lxc(:,1,ispden),pawrad) + call nderiv_gen(d2lxc,dlxc,pawrad) + vxc_updn(2:nrad,1,ispden)=vxc_updn(2:nrad,1,ispden) & +& +factor*(d2lxc(2:nrad)+two*dlxc(2:nrad)/pawrad%rad(2:nrad)) + call pawrad_deducer0(vxc(:,1,ispden),nrad,pawrad) + end do + end if + LIBPAW_DEALLOCATE(dlxc) + LIBPAW_DEALLOCATE(d2lxc) + end if ! mGGA + +! ---------------------------------------------------------------------- +! ----- If non-collinear, rotate back potential according to magnetization +! ---------------------------------------------------------------------- + if (option/=3.and.option/=4.and.nspden==4) then + ! Use of C pointers to avoid copies (when ISO C bindings are available) + ! %@1$ xlf v15 compiler requires a auxilliary cptr variable +#ifdef LIBPAW_ISO_C_BINDING + cptr=c_loc(vxc_updn(1,1,1)) + call c_f_pointer(cptr,vxc_diag,shape=[nrad*npts,nspden_updn]) + cptr=c_loc(vxc(1,1,1)) + call c_f_pointer(cptr,vxc_nc,shape=[nrad*npts,nspden]) + cptr=c_loc(mag(1,1,1)) + call c_f_pointer(cptr,mag_,shape=[nrad*npts,3]) +#else + LIBPAW_ALLOCATE(vxc_diag,(nrad*npts,nspden_updn)) + LIBPAW_ALLOCATE(vxc_nc,(nrad*npts,nspden)) + LIBPAW_ALLOCATE(mag_,(nrad*npts,3)) + vxc_diag=reshape(vxc_updn,[nrad*npts,nspden_updn]) + mag_=reshape(mag,[nrad*npts,3]) +#endif + call pawxc_rotate_back_mag(vxc_diag,vxc_nc,mag_,nrad*npts) +#ifndef LIBPAW_ISO_C_BINDING + vxc=reshape(vxc_nc,[nrad,npts,nspden]) + LIBPAW_DEALLOCATE(vxc_diag) + LIBPAW_DEALLOCATE(mag_) + LIBPAW_DEALLOCATE(vxc_nc) +#endif + LIBPAW_POINTER_DEALLOCATE(vxc_updn) + LIBPAW_DEALLOCATE(mag) + end if + +! ---------------------------------------------------------------------- +! ----- Accumulate and store XC double-counting energy +! ---------------------------------------------------------------------- + if (option==0.or.option==2) then + LIBPAW_ALLOCATE(ff,(nrad)) + do ipts=1,npts ! Do loop on the angular part +! Compute density for this (theta,phi) + rhoarr(:,:)=zero + if (usexcnhat==0) rho_=>rhor + if (usexcnhat/=0) rho_=>rhohat + do ispden=1,nspden + do ilm=1,lm_size_eff + if (lmselect(ilm)) then + rhoarr(1:nrad,ispden)=rhoarr(1:nrad,ispden)+rho_(1:nrad,ilm,ispden)*pawang%ylmr(ilm,ipts) + end if + end do + end do +! Compute kinetic energy density for this (theta,phi) + if (with_taur.and.need_vxctau) then + tauarr(:,:)=zero + do ispden=1,nspden + do ilm=1,lm_size_eff + tauarr(1:nrad,ispden)=tauarr(1:nrad,ispden) & + & +tau_(1:nrad,ilm,ispden)*pawang%ylmr(ilm,ipts) + end do + end do + end if +! Compute integral of Vxc*rho + if (nspden/=4) then + ff(:)=vxc(:,ipts,1)*rhoarr(:,nspden) + if (nspden==2) ff(:)=ff(:)+vxc(:,ipts,2)*(rhoarr(:,1)-rhoarr(:,2)) + else + ff(:)=half*(vxc(:,ipts,1)*(rhoarr(:,1)+rhoarr(:,4)) & + +vxc(:,ipts,2)*(rhoarr(:,1)-rhoarr(:,4))) & +& +vxc(:,ipts,3)*rhoarr(:,2)-vxc(:,ipts,4)*rhoarr(:,3) + end if +! Possibly add integral of Vxctau*tau + if (with_taur.and.need_vxctau) then + ff(:)=ff(:)+vxctau_(:,ipts,1)*tauarr(:,nspden) + if (nspden==2) ff(:)=ff(:)+vxctau_(:,ipts,2)*(tauarr(:,1)-tauarr(:,2)) + end if + ff(1:nrad)=ff(1:nrad)*pawrad%rad(1:nrad)**2 + call simp_gen(vxcrho,ff,pawrad) + enxcdc=enxcdc+vxcrho*pawang%angwgth(ipts) + end do ! End of the loop on npts (angular part) + LIBPAW_DEALLOCATE(ff) + end if ! option + +! ---------------------------------------------------------------------- +! ----- End +! ---------------------------------------------------------------------- +! Add the four*pi factor of the Exc and Excdc angular integration + if (option/=1.and.option/=5) enxc=enxc*four_pi + if (option==0.or.option==2) enxcdc=enxcdc*four_pi + +!TESTDEBUG +! Compute difference between fake mGGA=32 Exc=Int[Grad[rho]**2.dr] +! and mGGA=33 Exc=-Int[Laplacian[rho]*rho.dr] +! i.e. contour integral Int_contour[rho.Grad[rho].DS]=rc^2.Sum_L[rho_L(rc)*drho_L(rc)] +! if (option<4) then +! enxcr=zero +! ir=pawrad%int_meshsz +! LIBPAW_ALLOCATE(drho,(nrad)) +! LIBPAW_ALLOCATE(ff,(nrad)) +! enxcr=zero +! do ilm=1,lm_size_eff +! ff(1:nrad)=rho_(1:nrad,ilm,1) +! call nderiv_gen(drho,ff,pawrad) +! enxcr=enxcr+ff(ir)*drho(ir) +! end do +! LIBPAW_DEALLOCATE(drho) +! LIBPAW_DEALLOCATE(ff) +! enxcr=enxcr*0.01_dp*pawrad%rad(ir)**2 +! write(100,*) "Contour integral=",enxcr +! end if + +! Final memory deallocation + LIBPAW_DEALLOCATE(rhoarr) + LIBPAW_DEALLOCATE(tauarr) + if (usexcnhat>0) then + LIBPAW_DEALLOCATE(rhohat) + end if + if (xclevel==2) then + LIBPAW_DEALLOCATE(gxc) + LIBPAW_DEALLOCATE(dylmdr) + if (uselaplacian==1) then + LIBPAW_DEALLOCATE(lxc) + LIBPAW_DEALLOCATE(ylmlapl) + end if + end if + if (usekden==1.and.(.not.present(vxctau)).and.(option==0.or.option==2)) then + LIBPAW_DEALLOCATE(vxctau_) + end if + +! ------------------------------------ +! End IF a xc part has to be computed + end if + +end subroutine pawxc +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawxc/pawxcpositron +!! NAME +!! pawxcpositron +!! +!! FUNCTION +!! Compute electron-positron correlation potential and energies inside a PAW sphere +!! LDA ONLY - USE THE DENSITY OVER A WHOLE SPHERICAL GRID (r,theta,phi) +!! Driver of XC functionals. +!! +!! INPUTS +!! calctype=type of electronpositron calculation: +!! calctype=1 : positron in electronic density +!! calctype=2 : electrons in positronic density +!! corexc(nrad)=electron core density on radial grid +!! ixcpositron=choice of electron-positron XC scheme +!! lm_size=size of density array rhor (see below) +!! lmselect (lm_size)=select the non-zero LM-moments of input density rhor (see below) +!! lmselect_ep(lm_size)=select the non-zero LM-moments of input density rhor_ep (see below) +!! nhat (nrad,lm_size,nspden)=compensation density corresponding to rhor +!! nhat_ep(nrad,lm_size,nspden)=compensation density corresponding to rhor_ep +!! nrad=size of radial mesh for densities/potentials (might be different from pawrad%mesh_size) +!! nspden=number of spin-density components +!! option=0 compute both XC energies (direct+double-counting) and potential +!! 1 compute only XC potential +!! 2 compute only XC energies (direct+double-counting) +!! 3 compute only XC energy by direct scheme +!! 4 compute only XC energy by direct scheme for spherical part of the density +!! pawang =paw angular mesh and related data +!! pawrad =paw radial mesh and related data +!! posdensity0_limit=True if we are in the zero positron density limit +!! rhor(nrad,lm_size,nspden)=electron (or positron) density in real space +!! (total in 1st half and spin-up in 2nd half if nspden=2) +!! Contents depends on calctype value: +!! calctype=1: rhor is the positronic density +!! calctype=2: rhor is the electronic density +!! rhor_ep(nrad,lm_size,nspden)=electron (or positron) density in real space +!! (total in 1st half and spin-up in 2nd half if nspden=2) +!! Contents depends on calctype value: +!! calctype=1: rhor_ep is the electronic density +!! calctype=2: rhor_ep is the positronic density +!! usecore= 1 if core density has to be used in Exc/Vxc for the electronic density ; 0 otherwise +!! usexcnhat= 0 if compensation density does not have to be used +!! 1 if compensation density has to be used in double counting energy term only +!! 2 if compensation density (nhat) has to be used in Exc/Vxc and double counting energy term +!! xc_denpos= lowest allowed density (usually for the computation of the XC functionals) +!! +!! OUTPUT +!! == if option==0, 2, 3, or 4 == +!! enxc=returned exchange and correlation energy (hartree) +!! == if option==0 or 2 == +!! enxcdc=returned exchange-cor. contribution to double-counting energy +!! == if option==0 or 1 == +!! vxc(nrad,pawang%angl_size,nspden)=xc potential +!! (spin up in 1st half and spin-down in 2nd half if nspden=2) +!! +!! SIDE EFFECTS +!! electronpositron =quantities for the electron-positron annihilation +!! +!! SOURCE + +subroutine pawxcpositron(calctype,corexc,enxc,enxcdc,ixcpositron,lm_size,lmselect,lmselect_ep,& +& nhat,nhat_ep,nrad,nspden,option,pawang,pawrad,posdensity0_limit,& +& rhor,rhor_ep,usecore,usexcnhat,vxc,xc_denpos) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: calctype,ixcpositron,lm_size,nrad,nspden,option,usecore,usexcnhat + logical,intent(in) :: posdensity0_limit + real(dp),intent(in) :: xc_denpos + real(dp),intent(out) :: enxc,enxcdc + type(pawang_type),intent(in) :: pawang + type(pawrad_type),intent(in) :: pawrad +!arrays + logical,intent(in) :: lmselect(lm_size),lmselect_ep(lm_size) + real(dp),intent(in) :: corexc(nrad) + real(dp),intent(in) :: nhat(nrad,lm_size,nspden*((usexcnhat+1)/2)) + real(dp),intent(in) :: nhat_ep(nrad,lm_size,nspden*((usexcnhat+1)/2)) + real(dp),intent(in) :: rhor(nrad,lm_size,nspden) + real(dp),intent(in) :: rhor_ep(nrad,lm_size,nspden) + real(dp),intent(out) :: vxc(nrad,pawang%angl_size,nspden) + +!Local variables------------------------------- +!scalars + integer :: ilm,ipts,iwarn,iwarnp,ngr,ngrad,npts,order + real(dp) :: enxcr,vxcrho + character(len=500) :: msg +!arrays + real(dp),allocatable :: ff(:),fxci(:),grho2(:),rhoarr(:),rhoarr_ep(:),rhoarrdc(:),vxci(:),vxci_ep(:),vxcigr(:) + +! ************************************************************************* + +!----- Check options + if(ixcpositron==3.or.ixcpositron==31) then + msg='GGA is not implemented (use pawxcdev/=0)!' + LIBPAW_ERROR(msg) + end if + if(calctype/=1.and.calctype/=2) then + msg='Invalid value for calctype!' + LIBPAW_BUG(msg) + end if + if(pawang%angl_size==0) then + msg='pawang%angl_size=0!' + LIBPAW_BUG(msg) + end if + if(.not.allocated(pawang%ylmr)) then + msg='pawang%ylmr must be allocated!' + LIBPAW_BUG(msg) + end if + if (option/=1) then + if (nrad=2) vxc(:,ipts,2)=vxci(:) + if (nspden==4) vxc(:,ipts,3:4)=zero + end if + +! ---------------------------------------------------------------------- +! ----- Accumulate and store XC energies +! ---------------------------------------------------------------------- + +! ----- Calculate Exc term + if (option/=1) then + LIBPAW_ALLOCATE(ff,(nrad)) + ff(1:nrad)=fxci(1:nrad)*pawrad%rad(1:nrad)**2 + call simp_gen(enxcr,ff,pawrad) + LIBPAW_DEALLOCATE(ff) + if (option/=4) enxc=enxc+enxcr*pawang%angwgth(ipts) + if (option==4) enxc=enxc+enxcr + end if + +! ----- Calculate Excdc double counting term + if (option==0.or.option==2) then + if (usexcnhat==1) then + do ilm=1,lm_size + if (lmselect(ilm)) then + rhoarrdc(:)=rhoarrdc(:)+nhat(:,ilm,1)*pawang%ylmr(ilm,ipts) + end if + end do + end if + LIBPAW_ALLOCATE(ff,(nrad)) + ff(1:nrad)=vxci(1:nrad)*rhoarrdc(1:nrad)*pawrad%rad(1:nrad)**2 + call simp_gen(vxcrho,ff,pawrad) + LIBPAW_DEALLOCATE(ff) + enxcdc=enxcdc+vxcrho*pawang%angwgth(ipts) + end if + +! --------------------------------------------------- +! ----- End of the loop on npts (angular part) + end do + +!Add the four*pi factor of the angular integration + if (option/=1) enxc=enxc*four_pi + if (option==0.or.option==2) enxcdc=enxcdc*four_pi + +!Deallocations + LIBPAW_DEALLOCATE(fxci) + LIBPAW_DEALLOCATE(vxci) + LIBPAW_DEALLOCATE(rhoarr) + LIBPAW_DEALLOCATE(rhoarr_ep) + if (option==0.or.option==2) then + LIBPAW_DEALLOCATE(rhoarrdc) + end if + +end subroutine pawxcpositron +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawxc/pawxc_dfpt +!! NAME +!! pawxc_dfpt +!! +!! FUNCTION +!! Compute first-order change of XC potential and contribution to +!! 2nd-order change of XC energy inside a PAW sphere. +!! LDA+GGA - USE THE DENSITY OVER A WHOLE SPHERICAL GRID (r,theta,phi) +!! +!! INPUTS +!! corexc1(cplex_den*nrad)=first-order change of core density on radial grid +!! cplex_den= if 1, 1st-order densities are REAL, if 2, COMPLEX +!! cplex_vxc= if 1, 1st-order XC potential is complex, if 2, COMPLEX +!! ixc= choice of exchange-correlation scheme +!! kxc(nrad,pawang%angl_size,nkxc)=GS xc kernel +!! lm_size=size of density array rhor (see below) +!! lmselect(lm_size)=select the non-zero LM-moments of input density rhor1 +!! nhat1(cplex_den*nrad,lm_size,nspden)=first-order change of compensation density +!! (total in 1st half and spin-up in 2nd half if nspden=2) +!! nkxc=second dimension of the kxc array +!! non_magnetic_xc= if true, handle density/potential as non-magnetic (even if it is) +!! nrad=size of radial mesh for densities/potentials (might be different from pawrad%mesh_size) +!! nspden=number of spin-density components +!! option=0 compute both 2nd-order XC energy and 1st-order potential +!! 1 compute only 1st-order XC potential +!! 2 compute only 2nd-order XC energy, XC potential is temporary computed here +!! 3 compute only 2nd-order XC energy, XC potential is input in vxc1(:) +!! pawang =paw angular mesh and related data +!! pawrad =paw radial mesh and related data +!! rhor1(cplex_den*nrad,lm_size,nspden)=first-order change of density +!! usecore= 1 if core density has to be used in Exc/Vxc ; 0 otherwise +!! usexcnhat= 0 if compensation density does not have to be used +!! 1 if compensation density has to be used in d2Exc only +!! 2 if compensation density (nhat) has to be used in d2Exc and Vxc1 +!! vxc(nrad,pawang%angl_size,nspden)=GS xc potential +!! xclevel= XC functional level +!! +!! OUTPUT +!! == if option=0 or 2 or 3 == +!! d2enxc =returned exchange-cor. contribution to 2nd-order XC energy +!! d2enxc_im=returned IMAGINARY PART of exchange-cor. contribution to 2nd-order XC energy +!! (optional argument) +!! +!! SIDE EFFECTS +!! vxc1(cplex_vxc*nrad,pawang%angl_size,nspden)=1st-order XC potential +!! Output if option==0 or 1 +!! Unused if option==2 +!! Input if option==3 +!! +!! NOTES +!! Content of Kxc array: +!! ===== if LDA +!! if nspden==1: kxc(:,1)= d2Exc/drho2 +!! (kxc(:,2)= d2Exc/drho_up drho_dn) +!! if nspden>=2: kxc(:,1)= d2Exc/drho_up drho_up +!! kxc(:,2)= d2Exc/drho_up drho_dn +!! kxc(:,3)= d2Exc/drho_dn drho_dn +!! if nspden==4: kxc(:,4:6)= (m_x, m_y, m_z) (magnetization) +!! ===== if GGA +!! if nspden==1: +!! kxc(:,1)= d2Exc/drho2 +!! kxc(:,2)= 1/|grad(rho)| dExc/d|grad(rho)| +!! kxc(:,3)= 1/|grad(rho)| d2Exc/d|grad(rho)| drho +!! kxc(:,4)= 1/|grad(rho)| * d/d|grad(rho)| ( 1/|grad(rho)| dExc/d|grad(rho)| ) +!! kxc(:,5)= gradx(rho) +!! kxc(:,6)= grady(rho) +!! kxc(:,7)= gradz(rho) +!! if nspden>=2: +!! kxc(:,1)= d2Exc/drho_up drho_up +!! kxc(:,2)= d2Exc/drho_up drho_dn +!! kxc(:,3)= d2Exc/drho_dn drho_dn +!! kxc(:,4)= 1/|grad(rho_up)| dEx/d|grad(rho_up)| +!! kxc(:,5)= 1/|grad(rho_dn)| dEx/d|grad(rho_dn)| +!! kxc(:,6)= 1/|grad(rho_up)| d2Ex/d|grad(rho_up)| drho_up +!! kxc(:,7)= 1/|grad(rho_dn)| d2Ex/d|grad(rho_dn)| drho_dn +!! kxc(:,8)= 1/|grad(rho_up)| * d/d|grad(rho_up)| ( 1/|grad(rho_up)| dEx/d|grad(rho_up)| ) +!! kxc(:,9)= 1/|grad(rho_dn)| * d/d|grad(rho_dn)| ( 1/|grad(rho_dn)| dEx/d|grad(rho_dn)| ) +!! kxc(:,10)=1/|grad(rho)| dEc/d|grad(rho)| +!! kxc(:,11)=1/|grad(rho)| d2Ec/d|grad(rho)| drho_up +!! kxc(:,12)=1/|grad(rho)| d2Ec/d|grad(rho)| drho_dn +!! kxc(:,13)=1/|grad(rho)| * d/d|grad(rho)| ( 1/|grad(rho)| dEc/d|grad(rho)| ) +!! kxc(:,14)=gradx(rho_up) +!! kxc(:,15)=gradx(rho_dn) +!! kxc(:,16)=grady(rho_up) +!! kxc(:,17)=grady(rho_dn) +!! kxc(:,18)=gradz(rho_up) +!! kxc(:,19)=gradz(rho_dn) +!! if nspden==4: +!! kxc(:,20:22)= (m_x, m_y, m_z) (magnetization) +!! +!! SOURCE + +subroutine pawxc_dfpt(corexc1,cplex_den,cplex_vxc,d2enxc,ixc,kxc,lm_size,lmselect,nhat1,& +& nkxc,non_magnetic_xc,nrad,nspden,option,pawang,pawrad,rhor1,& +& usecore,usexcnhat,vxc,vxc1,xclevel,& +& d2enxc_im) ! optional + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: cplex_den,cplex_vxc,ixc,lm_size,nkxc,nrad,nspden,option + integer,intent(in) :: usecore,usexcnhat,xclevel + logical,intent(in) :: non_magnetic_xc + real(dp),intent(out) :: d2enxc + real(dp),intent(out),optional :: d2enxc_im + type(pawang_type),intent(in) :: pawang + type(pawrad_type),intent(in) :: pawrad +!arrays + logical,intent(in) :: lmselect(lm_size) + real(dp),intent(in) :: corexc1(cplex_den*nrad) + real(dp),intent(in) :: nhat1(cplex_den*nrad,lm_size,nspden*((usexcnhat+1)/2)) + real(dp),intent(in),target :: kxc(nrad,pawang%angl_size,nkxc) + real(dp),intent(in),target :: vxc(nrad,pawang%angl_size,nspden) + real(dp),intent(in),target :: rhor1(cplex_den*nrad,lm_size,nspden) + real(dp),intent(inout),target :: vxc1(cplex_vxc*nrad,pawang%angl_size,nspden) + +!Local variables------------------------------- +!scalars + integer :: ii,ilm,ipts,ir,ispden,jr,kr,lm_size_eff,nkxc_cur,npts,nspden_updn + logical :: need_impart + real(dp),parameter :: tol24=tol12*tol12 + real(dp) :: coeff_grho,coeff_grho_corr,coeff_grho_dn,coeff_grho_up + real(dp) :: coeff_grhoim,coeff_grhoim_corr,coeff_grhoim_dn,coeff_grhoim_up + real(dp) :: dylmdr_ii,factor,factor_ang_intg,ylm_ii + real(dp) :: grho_grho1,grho_grho1_up,grho_grho1_dn + real(dp) :: grho_grho1im,grho_grho1im_up,grho_grho1im_dn + real(dp) :: rho1_dn,rho1_up,rho1im_dn,rho1im_up + real(dp) :: ro11i,ro11r,ro12i,ro12r,ro21i,ro21r,ro22i,ro22r + real(dp) :: v11i,v11r,v12i,v12r,v21i,v21r,v22i,v22r,vxcrho + character(len=500) :: msg +!arrays + real(dp) :: g0(3),g0_dn(3),g0_up(3),g1(3),g1_dn(3),g1_up(3) + real(dp) :: g1im(3),g1im_dn(3),g1im_up(3) + real(dp) :: gxc1i(3,2),gxc1r(3,2) + real(dp),allocatable :: dgxc1(:),drho1(:,:),drho1core(:,:),dylmdr(:,:,:) + real(dp),allocatable :: ff(:),gg(:),grho1arr(:,:,:),gxc1(:,:,:,:) + real(dp),allocatable,target :: rhohat1(:,:,:),rho1arr(:,:) + real(dp), LIBPAW_CONTIGUOUS pointer :: kxc_(:,:),mag(:,:) + real(dp), LIBPAW_CONTIGUOUS pointer :: rho1_(:,:,:),rho1_nc(:,:),rho1_updn(:,:) + real(dp), LIBPAW_CONTIGUOUS pointer :: vxc_(:,:),vxc1_(:,:,:),vxc1_diag(:,:) + real(dp), LIBPAW_CONTIGUOUS pointer :: vxc1_nc(:,:),vxc1_updn(:,:,:) +#ifdef LIBPAW_ISO_C_BINDING + type(C_PTR) :: cptr +#endif + +! ************************************************************************* + +!---------------------------------------------------------------------- +!----- Check options +!---------------------------------------------------------------------- + + if(option<0.or.option>3) then + msg='wrong option!' + LIBPAW_BUG(msg) + end if + if(option/=3) then + call pawxc_get_nkxc(nkxc_cur,nspden,xclevel) + if (nkxc/=nkxc_cur) then + msg='Wrong dimension for array kxc!' + LIBPAW_BUG(msg) + end if + if(xclevel==2.and.nspden==4) then + msg='PAW non-collinear magnetism not compatible with GGA!' + LIBPAW_ERROR(msg) + end if + end if + if(pawang%angl_size==0) then + msg='pawang%angl_size=0!' + LIBPAW_BUG(msg) + end if + if(.not.allocated(pawang%ylmr)) then + msg='pawang%ylmr must be allocated!' + LIBPAW_BUG(msg) + end if + if(xclevel==2.and.(.not.allocated(pawang%ylmrgr))) then + msg='pawang%ylmrgr must be allocated!' + LIBPAW_BUG(msg) + end if + if (option/=1) then + if (nrad0) then + LIBPAW_ALLOCATE(rhohat1,(cplex_den*nrad,lm_size,nspden)) + rhohat1(:,:,:)=rhor1(:,:,:)+nhat1(:,:,:) + end if + + if (option==2) then + LIBPAW_POINTER_ALLOCATE(vxc1_,(cplex_vxc*nrad,npts,nspden)) + else + vxc1_ => vxc1 + end if + +!Need gradients and additional allocations in case of GGA + if (xclevel==2.and.option/=3) then + LIBPAW_ALLOCATE(gxc1,(cplex_vxc*nrad,3,pawang%ylm_size,nspden)) + gxc1=zero + if (usecore==1) then + LIBPAW_ALLOCATE(drho1core,(nrad,cplex_den)) + if (cplex_den==1) then + call nderiv_gen(drho1core(:,1),corexc1,pawrad) + else + LIBPAW_ALLOCATE(ff,(nrad)) + LIBPAW_ALLOCATE(gg,(nrad)) + do ir=1,nrad + ff(ir)=corexc1(2*ir-1) + gg(ir)=corexc1(2*ir ) + end do + call nderiv_gen(drho1core(:,1),ff,pawrad) + call nderiv_gen(drho1core(:,2),gg,pawrad) + LIBPAW_DEALLOCATE(ff) + LIBPAW_DEALLOCATE(gg) + end if + end if +! Convert Ylm derivatives from normalized to standard cartesian coordinates +! dYlm/dr_i = { dYlm/dr_i^hat - Sum_j[ dYlm/dr_j^hat (r_j/r)] } * (1/r) + LIBPAW_ALLOCATE(dylmdr,(3,npts,pawang%ylm_size)) + do ilm=1,pawang%ylm_size + do ipts=1,npts + factor=sum(pawang%ylmrgr(1:3,ilm,ipts)*pawang%anginit(1:3,ipts)) + dylmdr(1:3,ipts,ilm)=pawang%ylmrgr(1:3,ilm,ipts)-factor*pawang%anginit(1:3,ipts) + end do + end do + end if + +!---------------------------------------------------------------------- +!----- Accumulate and store 1st-order change of XC potential +!---------------------------------------------------------------------- + + if (option/=3) then + + if (nspden/=4) then + rho1_updn => rho1arr + vxc1_updn => vxc1_ + else + LIBPAW_POINTER_ALLOCATE(rho1_updn,(cplex_den*nrad,nspden_updn)) + LIBPAW_POINTER_ALLOCATE(vxc1_updn,(cplex_vxc*nrad,npts,nspden_updn)) + LIBPAW_POINTER_ALLOCATE(rho1_nc,(cplex_den*nrad*npts,nspden)) + LIBPAW_POINTER_ALLOCATE(mag,(nrad,3)) + end if + +! Do loop on the angular part (theta,phi) + do ipts=1,npts + +! Copy the input 1st-order density for this (theta,phi) + rho1arr(:,:)=zero + if (usexcnhat< 2) rho1_=>rhor1 + if (usexcnhat==2) rho1_=>rhohat1 + do ispden=1,nspden + do ilm=1,lm_size_eff + if (lmselect(ilm)) rho1arr(:,ispden)=rho1arr(:,ispden) & +& +rho1_(:,ilm,ispden)*pawang%ylmr(ilm,ipts) + end do + end do + if (usecore==1) then + rho1arr(:,1)=rho1arr(:,1)+corexc1(:) + if (nspden==2) rho1arr(:,2)=rho1arr(:,2)+half*corexc1(:) + end if + +! Optionally suppress magnetic part + if(non_magnetic_xc) then + if(nspden==2) rho1arr(:,2)=rho1arr(:,1)*half + if(nspden==4) rho1arr(:,2:4)=zero + endif + +! Non-collinear magnetism: rotate magnetization and get a collinear density + if (nspden==4) then + !Store non rotated rho^(1) for future use + ii=(ipts-1)*cplex_den*nrad + do ispden=1,nspden + rho1_nc(ii+1:ii+cplex_den*nrad,ispden)=rho1arr(1:cplex_den*nrad,ispden) + end do + !Extract magnetization from kxc + do ii=1,3 + mag(1:nrad,ii)=kxc(:,ipts,ii) + end do + !Rotate rhoarr1 -> rhoarr1_ + !Should use cplex_den + call pawxc_rotate_mag(rho1arr,rho1_updn,mag,nrad,rho_out_format=2) + end if + +! ======================================================================= +! ======================= LDA =========================================== +! ======================================================================= + if (xclevel==1.or.ixc==13) then + +! Non-spin-polarized + if (nspden_updn==1) then + if (cplex_vxc==1) then + if (cplex_den==1) then ! cplex_vxc==1 and cplex_den==1 + vxc1_updn(1:nrad,ipts,1)=kxc(1:nrad,ipts,1)*rho1_updn(1:nrad,1) + else ! cplex_vxc==1 and cplex_den==2 + do ir=1,nrad + vxc1_updn(ir,ipts,1)=kxc(ir,ipts,1)*rho1_updn(2*ir-1,1) + end do + end if + else + if (cplex_den==1) then ! cplex_vxc==2 and cplex_den==1 + do ir=1,nrad + vxc1_updn(2*ir-1,ipts,1)=kxc(ir,ipts,1)*rho1_updn(ir,1) + vxc1_updn(2*ir ,ipts,1)=zero + end do + else ! cplex_vxc==2 and cplex_den==2 + do ir=1,nrad + vxc1_updn(2*ir-1,ipts,1)=kxc(ir,ipts,1)*rho1_updn(2*ir-1,1) + vxc1_updn(2*ir ,ipts,1)=kxc(ir,ipts,1)*rho1_updn(2*ir ,1) + end do + end if + end if + +! Spin-polarized + else + if (cplex_vxc==1) then + if (cplex_den==1) then ! cplex_vxc==1 and cplex_den==1 + do ir=1,nrad + rho1_up=rho1_updn(ir,2);rho1_dn=rho1_updn(ir,1)-rho1_up + vxc1_updn(ir,ipts,1)=kxc(ir,ipts,1)*rho1_up+kxc(ir,ipts,2)*rho1_dn + vxc1_updn(ir,ipts,2)=kxc(ir,ipts,2)*rho1_up+kxc(ir,ipts,3)*rho1_dn + end do + else ! cplex_vxc==1 and cplex_den==2 + do ir=1,nrad + jr=2*ir-1 + rho1_up=rho1_updn(jr,2);rho1_dn=rho1_updn(jr,1)-rho1_up + vxc1_updn(ir,ipts,1)=kxc(ir,ipts,1)*rho1_up+kxc(ir,ipts,2)*rho1_dn + vxc1_updn(ir,ipts,2)=kxc(ir,ipts,2)*rho1_up+kxc(ir,ipts,3)*rho1_dn + end do + end if + else + if (cplex_den==1) then ! cplex_vxc==2 and cplex_den==1 + do ir=1,nrad + jr=2*ir-1 + rho1_up=rho1_updn(ir,2);rho1_dn=rho1_updn(ir,1)-rho1_up + vxc1_updn(jr,ipts,1)=kxc(ir,ipts,1)*rho1_up+kxc(ir,ipts,2)*rho1_dn + vxc1_updn(jr,ipts,2)=kxc(ir,ipts,2)*rho1_up+kxc(ir,ipts,3)*rho1_dn + end do + else ! cplex_vxc==2 and cplex_den==2 + do ir=1,nrad + jr=2*ir + rho1_up =rho1_updn(jr-1,2);rho1_dn =rho1_updn(jr-1,1)-rho1_up + rho1im_up=rho1_updn(jr ,2);rho1im_dn=rho1_updn(jr ,1)-rho1im_up + vxc1_updn(jr-1,ipts,1)=kxc(ir,ipts,1)*rho1_up +kxc(ir,ipts,2)*rho1_dn + vxc1_updn(jr ,ipts,1)=kxc(ir,ipts,1)*rho1im_up+kxc(ir,ipts,2)*rho1im_dn + vxc1_updn(jr-1,ipts,2)=kxc(ir,ipts,2)*rho1_up +kxc(ir,ipts,3)*rho1_dn + vxc1_updn(jr ,ipts,2)=kxc(ir,ipts,2)*rho1im_up+kxc(ir,ipts,3)*rho1im_dn + end do + end if + end if + end if + + else +! ======================================================================= +! ======================= GGA =========================================== +! ======================================================================= + +! Compute the gradient of the first-order density + LIBPAW_ALLOCATE(drho1,(nrad,cplex_den)) + LIBPAW_ALLOCATE(grho1arr,(cplex_den*nrad,nspden,3)) + grho1arr(:,:,1:3)=zero + if (cplex_den==1) then + LIBPAW_ALLOCATE(ff,(nrad)) + do ispden=1,nspden_updn + do ilm=1,lm_size_eff + if (lmselect(ilm)) then + ff(1:nrad)=rho1_(1:nrad,ilm,ispden) + call nderiv_gen(drho1(:,1),ff,pawrad) + ff(2:nrad)=ff(2:nrad)/pawrad%rad(2:nrad) + call pawrad_deducer0(ff,nrad,pawrad) + do ii=1,3 + ylm_ii=pawang%ylmr(ilm,ipts)*pawang%anginit(ii,ipts) + dylmdr_ii=dylmdr(ii,ipts,ilm) + grho1arr(1:nrad,ispden,ii)=grho1arr(1:nrad,ispden,ii) & +& +drho1(1:nrad,1)*ylm_ii+ff(1:nrad)*dylmdr_ii + end do + end if + end do + end do + LIBPAW_DEALLOCATE(ff) + else + LIBPAW_ALLOCATE(ff,(nrad)) + LIBPAW_ALLOCATE(gg,(nrad)) + do ispden=1,nspden_updn + do ilm=1,lm_size_eff + if (lmselect(ilm)) then + do ir=1,nrad + ff(ir)=rho1_(2*ir-1,ilm,ispden) + gg(ir)=rho1_(2*ir ,ilm,ispden) + end do + call nderiv_gen(drho1(:,1),ff,pawrad) + call nderiv_gen(drho1(:,2),gg,pawrad) + ff(2:nrad)=ff(2:nrad)/pawrad%rad(2:nrad) + gg(2:nrad)=gg(2:nrad)/pawrad%rad(2:nrad) + call pawrad_deducer0(ff,nrad,pawrad) + call pawrad_deducer0(gg,nrad,pawrad) + do ii=1,3 + ylm_ii=pawang%ylmr(ilm,ipts)*pawang%anginit(ii,ipts) + dylmdr_ii=dylmdr(ii,ipts,ilm) + do ir=2,nrad + jr=2*ir + grho1arr(jr-1,ispden,ii)=grho1arr(jr-1,ispden,ii) & +& +drho1(ir,1)*ylm_ii+ff(ir)*dylmdr_ii + grho1arr(jr ,ispden,ii)=grho1arr(jr ,ispden,ii) & +& +drho1(ir,2)*ylm_ii+gg(ir)*dylmdr_ii + end do + end do + end if + end do + end do + LIBPAW_DEALLOCATE(ff) + LIBPAW_DEALLOCATE(gg) + end if + if (usecore==1) then + factor=one;if (nspden_updn==2) factor=half + if (cplex_den==1) then + do ispden=1,nspden_updn + do ii=1,3 + grho1arr(1:nrad,ispden,ii)=grho1arr(1:nrad,ispden,ii) & +& +factor*drho1core(1:nrad,1)*pawang%anginit(ii,ipts) + end do + end do + else + do ispden=1,nspden_updn + do ii=1,3 + do ir=1,nrad + jr=2*ir + grho1arr(jr-1,ispden,ii)=grho1arr(jr-1,ispden,ii) & +& +factor*drho1core(ir,1)*pawang%anginit(ii,ipts) + grho1arr(jr ,ispden,ii)=grho1arr(jr ,ispden,ii) & +& +factor*drho1core(ir,2)*pawang%anginit(ii,ipts) + end do + end do + end do + end if + end if + LIBPAW_DEALLOCATE(drho1) + +! Optionally suppress magnetic part + if(non_magnetic_xc) then + do ii=1,3 + if(nspden==2) grho1arr(:,2,ii)=grho1arr(:,1,ii)*half + if(nspden==4) grho1arr(:,2:4,ii)=zero + end do + endif + +! Apply XC kernel +! Will compute Vxc^(1) as: vxc1 - Nabla .dot. gxc1 + +! Scaling factor for angular integrals: four_pi x spin_factor + factor_ang_intg=four_pi;if (nspden_updn==1) factor_ang_intg=two_pi + +! A- NON POLARIZED SYSTEMS + if (nspden_updn==1) then + + do ir=1,nrad + jr=cplex_den*(ir-1)+1 ; kr=cplex_vxc*(ir-1)+1 + + g0(:)=kxc(ir,ipts,5:7) ; g1(:)=grho1arr(jr,1,1:3) + grho_grho1=dot_product(g0,g1) + coeff_grho=kxc(ir,ipts,3)*rho1_updn(jr,1)+kxc(ir,ipts,4)*grho_grho1 + vxc1_updn(kr,ipts,1)=kxc(ir,ipts,1)*rho1_updn(jr,1)+kxc(ir,ipts,3)*grho_grho1 + gxc1r(:,1)=g1(:)*kxc(ir,ipts,2)+g0(:)*coeff_grho + !Accumulate gxc1_lm moments as Intg[gxc1(omega).Ylm(omega).d_omega] + do ilm=1,pawang%ylm_size + ylm_ii=pawang%ylmr(ilm,ipts)*pawang%angwgth(ipts)*factor_ang_intg + do ii=1,3 + gxc1(kr,ii,ilm,1)=gxc1(ir,ii,ilm,1)+gxc1r(ii,1)*ylm_ii + end do + end do + if (cplex_vxc==2) then + if (cplex_den==2) then + g1im(:)=grho1arr(jr+1,1,1:3) + grho_grho1im=dot_product(g0,g1im) + coeff_grhoim=kxc(ir,ipts,3)*rho1_updn(jr+1,1)+kxc(ir,ipts,4)*grho_grho1im + vxc1_updn(kr+1,ipts,1)=kxc(ir,ipts,1)*rho1_updn(jr+1,1)+kxc(ir,ipts,3)*grho_grho1im + gxc1i(:,1)=g1im(:)*kxc(ir,ipts,2)+g0(:)*coeff_grhoim + !Accumulate gxc1_lm moments as Intg[gxc1(omega).Ylm(omega).d_omega] + do ilm=1,pawang%ylm_size + ylm_ii=pawang%ylmr(ilm,ipts)*pawang%angwgth(ipts)*factor_ang_intg + do ii=1,3 + gxc1(kr+1,ii,ilm,1)=gxc1(kr+1,ii,ilm,1)+gxc1i(ii,1)*ylm_ii + end do + end do + else + vxc1_updn(kr+1,ipts,1)=zero ; gxc1i(:,1)=zero + end if + end if + end do ! ir + +! B- POLARIZED SYSTEMS (COLLINEAR) + else ! nspden_updn==2 + + do ir=1,nrad + jr=cplex_den*(ir-1)+1 ; kr=cplex_vxc*(ir-1)+1 + + rho1_up=rho1_updn(jr,2);rho1_dn=rho1_updn(jr,1)-rho1_up + g0_up(1)=kxc(ir,ipts,15);g0_dn(1)=kxc(ir,ipts,14)-kxc(ir,ipts,15) + g0_up(2)=kxc(ir,ipts,17);g0_dn(2)=kxc(ir,ipts,16)-kxc(ir,ipts,17) + g0_up(3)=kxc(ir,ipts,19);g0_dn(3)=kxc(ir,ipts,18)-kxc(ir,ipts,19) + g1_up(:)=grho1arr(jr,2,:);g1_dn(:)=grho1arr(jr,1,:)-grho1arr(jr,2,:) + g0(:)=g0_up(:)+g0_dn(:);g1(:)=g1_up(:)+g1_dn(:) + grho_grho1_up=dot_product(g0_up,g1_up) + grho_grho1_dn=dot_product(g0_dn,g1_dn) + grho_grho1 =dot_product(g0,g1) + coeff_grho_corr=kxc(ir,ipts,11)*rho1_up & +& +kxc(ir,ipts,12)*rho1_dn & +& +kxc(ir,ipts,13)*grho_grho1 + coeff_grho_up=kxc(ir,ipts,6)*rho1_up & +& +kxc(ir,ipts,8)*grho_grho1_up + coeff_grho_dn=kxc(ir,ipts,7)*rho1_dn & +& +kxc(ir,ipts,9)*grho_grho1_dn + vxc1_updn(kr,ipts,1)=kxc(ir,ipts, 1)*rho1_up & +& +kxc(ir,ipts, 2)*rho1_dn & +& +kxc(ir,ipts, 6)*grho_grho1_up & +& +kxc(ir,ipts,11)*grho_grho1 + vxc1_updn(kr,ipts,2)=kxc(ir,ipts, 3)*rho1_dn & +& +kxc(ir,ipts, 2)*rho1_up & +& +kxc(ir,ipts, 7)*grho_grho1_dn & +& +kxc(ir,ipts,12)*grho_grho1 + gxc1r(:,1)=(kxc(ir,ipts,4)+kxc(ir,ipts,10))*g1_up(:) & +& +kxc(ir,ipts,10) *g1_dn(:) & +& +coeff_grho_up *g0_up(:) & +& +coeff_grho_corr *g0(:) + gxc1r(:,2)=(kxc(ir,ipts,5)+kxc(ir,ipts,10))*g1_dn(:) & +& +kxc(ir,ipts,10) *g1_up(:) & +& +coeff_grho_dn *g0_dn(:) & +& +coeff_grho_corr *g0(:) + !Accumulate gxc1_lm moments as Intg[gxc1(omega).Ylm(omega).d_omega] + do ispden=1,nspden_updn + do ilm=1,pawang%ylm_size + ylm_ii=pawang%ylmr(ilm,ipts)*pawang%angwgth(ipts)*factor_ang_intg + do ii=1,3 + gxc1(kr,ii,ilm,ispden)=gxc1(kr,ii,ilm,ispden)+gxc1r(ii,ispden)*ylm_ii + end do + end do + end do + + if (cplex_vxc==2) then + if (cplex_den==2) then + rho1im_up=rho1_updn(jr+1,2);rho1im_dn=rho1_updn(jr+1,1)-rho1im_up + g1im_up(:)=grho1arr(jr+1,2,:);g1im_dn(:)=grho1arr(jr+1,1,:)-grho1arr(jr+1,2,:) + g1im(:)=g1im_up(:)+g1im_dn(:) + grho_grho1im_up=dot_product(g0_up,g1im_up) + grho_grho1im_dn=dot_product(g0_dn,g1im_dn) + grho_grho1im =dot_product(g0,g1im) + coeff_grhoim_corr=kxc(ir,ipts,11)*rho1im_up & +& +kxc(ir,ipts,12)*rho1im_dn & +& +kxc(ir,ipts,13)*grho_grho1im + coeff_grhoim_up=kxc(ir,ipts,6)*rho1im_up & +& +kxc(ir,ipts,8)*grho_grho1im_up + coeff_grhoim_dn=kxc(ir,ipts,7)*rho1im_dn & +& +kxc(ir,ipts,9)*grho_grho1im_dn + vxc1_updn(kr+1,ipts,1)=kxc(ir,ipts, 1)*rho1im_up & +& +kxc(ir,ipts, 2)*rho1im_dn & +& +kxc(ir,ipts, 6)*grho_grho1im_up & +& +kxc(ir,ipts,11)*grho_grho1im + vxc1_updn(kr+1,ipts,2)=kxc(ir,ipts, 3)*rho1im_dn & +& +kxc(ir,ipts, 2)*rho1im_up & +& +kxc(ir,ipts, 7)*grho_grho1im_dn & +& +kxc(ir,ipts,12)*grho_grho1im + gxc1i(:,1)=(kxc(ir,ipts,4)+kxc(ir,ipts,10))*g1im_up(:) & +& +kxc(ir,ipts,10) *g1im_dn(:) & +& +coeff_grhoim_up *g0_up(:) & +& +coeff_grhoim_corr *g0(:) + gxc1i(:,2)=(kxc(ir,ipts,5)+kxc(ir,ipts,10))*g1im_dn(:) & +& +kxc(ir,ipts,10) *g1im_up(:) & +& +coeff_grhoim_dn *g0_dn(:) & +& +coeff_grhoim_corr *g0(:) + !Accumulate gxc1_lm moments as Intg[gxc1(omega).Ylm(omega).d_omega] + do ispden=1,nspden_updn + do ilm=1,pawang%ylm_size + ylm_ii=pawang%ylmr(ilm,ipts)*pawang%angwgth(ipts)*factor_ang_intg + do ii=1,3 + gxc1(kr+1,ii,ilm,ispden)=gxc1(kr+1,ii,ilm,ispden)+gxc1i(ii,ispden)*ylm_ii + end do + end do + end do + else + vxc1_updn(kr+1,ipts,1:2)=zero ; gxc1i(:,1:2)=zero + end if + end if + + end do ! ir + + end if ! nspden_updn + + LIBPAW_DEALLOCATE(grho1arr) + + end if ! LDA or GGA + +! ----- End of the loop on npts (angular part) + end do + +! Deallocate memory + if (xclevel==2.and.usecore==1) then + LIBPAW_DEALLOCATE(drho1core) + end if + if (nspden==4) then + LIBPAW_POINTER_DEALLOCATE(rho1_updn) + LIBPAW_POINTER_DEALLOCATE(mag) + end if + + end if ! option/=3 + +!---------------------------------------------------------------------- +!----- If GGA, modify 1st-order potential with term from density gradient +!---------------------------------------------------------------------- + if (xclevel==2.and.ixc/=13.and.option/=3) then +! Compute divergence of gxc1 and substract it from Vxc1 + +! Need to multiply gxc1 by 2 in the non-polarised case + factor=one;if (nspden_updn==1) factor=two + + LIBPAW_ALLOCATE(dgxc1,(nrad)) + LIBPAW_ALLOCATE(gg,(nrad)) + do ispden=1,nspden_updn + do ilm=1,pawang%ylm_size + do ii=1,3 + do ir=1,nrad + jr=cplex_vxc*(ir-1)+1 + gg(ir)=gxc1(jr,ii,ilm,ispden) + end do + call nderiv_gen(dgxc1,gg,pawrad) + gg(2:nrad)=gg(2:nrad)/pawrad%rad(2:nrad) + call pawrad_deducer0(gg,nrad,pawrad) + do ipts=1,npts + ylm_ii=pawang%ylmr(ilm,ipts)*pawang%anginit(ii,ipts) + dylmdr_ii=dylmdr(ii,ipts,ilm) + do ir=1,nrad + jr=cplex_vxc*(ir-1)+1 + vxc1_(jr,ipts,ispden)=vxc1_(jr,ipts,ispden) & +& -factor*(dgxc1(ir)*ylm_ii+gg(ir)*dylmdr_ii) + end do + end do ! ipts + end do ! ii + end do ! ilm + end do ! ispden + if (cplex_vxc==2) then + do ispden=1,nspden_updn + do ilm=1,pawang%ylm_size + do ii=1,3 + do ir=1,nrad + gg(ir)=gxc1(2*ir,ii,ilm,ispden) + end do + call nderiv_gen(dgxc1,gg,pawrad) + gg(2:nrad)=gg(2:nrad)/pawrad%rad(2:nrad) + call pawrad_deducer0(gg,nrad,pawrad) + do ipts=1,npts + ylm_ii=pawang%ylmr(ilm,ipts)*pawang%anginit(ii,ipts) + dylmdr_ii=dylmdr(ii,ipts,ilm) + do ir=1,nrad + vxc1_(2*ir,ipts,ispden)=vxc1_(2*ir,ipts,ispden) & + & -factor*(dgxc1(ir)*ylm_ii+gg(ir)*dylmdr_ii) + end do + end do ! ipts + end do ! ii + end do ! ilm + end do ! ispden + end if ! cplex_vxc + LIBPAW_DEALLOCATE(dgxc1) + LIBPAW_DEALLOCATE(gg) + + end if ! GGA + +! ---------------------------------------------------------------------- +! ----- If non-collinear, rotate back potential according to magnetization +! ---------------------------------------------------------------------- + if (option/=3.and.nspden==4) then + ! Use of C pointers to avoid copies (when ISO C bindings are available) + ! %@1$ xlf v15 compiler requires a auxilliary cptr variable +#ifdef LIBPAW_ISO_C_BINDING + cptr=c_loc(vxc1_updn(1,1,1)) + call c_f_pointer(cptr,vxc1_diag,shape=[cplex_vxc*nrad*npts,nspden_updn]) + cptr=c_loc(vxc1_(1,1,1)) + call c_f_pointer(cptr,vxc1_nc,shape=[cplex_vxc*nrad*npts,nspden]) + cptr=c_loc(vxc(1,1,1)) + call c_f_pointer(cptr,vxc_,shape=[nrad*npts,nspden]) + cptr=c_loc(kxc(1,1,1)) + call c_f_pointer(cptr,kxc_,shape=[nrad*npts,3]) + cptr=c_loc(kxc(1,1,nkxc-2)) + call c_f_pointer(cptr,mag,shape=[nrad*npts,3]) +#else + LIBPAW_ALLOCATE(vxc1_diag,(cplex_vxc*nrad*npts,nspden_updn)) + LIBPAW_ALLOCATE(vxc1_nc,(cplex_vxc*nrad*npts,nspden)) + LIBPAW_ALLOCATE(vxc_,(nrad*npts,nspden)) + LIBPAW_ALLOCATE(kxc_,(nrad*npts,3)) + LIBPAW_ALLOCATE(mag,(nrad*npts,3)) + vxc1_diag=reshape(vxc1_updn,[cplex_vxc*nrad*npts,nspden_updn]) + vxc_=reshape(vxc(1:cplex_vxc*nrad,1:npts,1:nspden),[cplex_vxc*nrad*npts,nspden]) + kxc_=reshape(kxc(1:nrad,1:npts,1:3),[nrad*npts,3]) + mag=reshape(kxc(1:nrad,1:npts,nkxc-2:nkxc),[nrad*npts,3]) +#endif + !Should use cplex_den and cplex_vxc + call pawxc_rotate_back_mag_dfpt(vxc1_diag,vxc1_nc,vxc_,kxc_,rho1_nc,mag,nrad*npts) +#ifndef LIBPAW_ISO_C_BINDING + vxc1_=reshape(vxc1_nc,[cplex_vxc*nrad,npts,nspden]) + LIBPAW_DEALLOCATE(vxc1_diag) + LIBPAW_DEALLOCATE(vxc1_nc) + LIBPAW_DEALLOCATE(vxc_) + LIBPAW_DEALLOCATE(kxc_) + LIBPAW_DEALLOCATE(mag) +#endif + LIBPAW_POINTER_DEALLOCATE(rho1_nc) + LIBPAW_POINTER_DEALLOCATE(vxc1_updn) + end if + +!---------------------------------------------------------------------- +!----- Accumulate and store 2nd-order change of XC energy +!---------------------------------------------------------------------- + if (option/=1) then + +! Do loop on the angular part (theta,phi) + do ipts=1,npts + +! Copy the input 1st-order density for this (theta,phi) + rho1arr(:,:)=zero + if (usexcnhat< 1) rho1_=>rhor1 + if (usexcnhat>=1) rho1_=>rhohat1 + do ispden=1,nspden + do ilm=1,lm_size_eff + if (lmselect(ilm)) rho1arr(:,ispden)=rho1arr(:,ispden) & + & +rho1_(:,ilm,ispden)*pawang%ylmr(ilm,ipts) + end do + end do + if (usecore==1) then + rho1arr(:,1)=rho1arr(:,1)+corexc1(:) + if (nspden==2) rho1arr(:,2)=rho1arr(:,2)+half*corexc1(:) + end if + +! ----- Calculate d2Exc=Int[Vxc^(1)^*(r).n^(1)(r).dr] + LIBPAW_ALLOCATE(ff,(nrad)) + if (need_impart) then + LIBPAW_ALLOCATE(gg,(nrad)) + end if + +! COLLINEAR MAGNETISM + if (nspden/=4) then + if (cplex_vxc==1.and.cplex_den==1) then ! cplex_vxc==1 and cplex_den==1 + ff(:)=vxc1_(:,ipts,1)*rho1arr(:,nspden) + if (nspden==2) ff(:)=ff(:)+vxc1_(:,ipts,2)*(rho1arr(:,1)-rho1arr(:,2)) + if (need_impart) gg(:)=zero + else if (cplex_vxc==2.and.cplex_den==2) then ! cplex_vxc==2 and cplex_den==2 + if (.not.need_impart) then ! Real part only + do ir=1,nrad + jr=2*ir;v11r=vxc1_(jr-1,ipts,1);v11i=vxc1_(jr,ipts,1) + ro11r=rho1arr(jr-1,nspden);ro11i=rho1arr(jr,nspden) + ff(ir)=v11r*ro11r+v11i*ro11i + end do + if (nspden==2) then + do ir=1,nrad + jr=2*ir;v22r=vxc1_(jr-1,ipts,2);v22i=vxc1_(jr,ipts,2) + ro22r=rho1arr(jr-1,1)-rho1arr(jr-1,2) + ro22i=rho1arr(jr ,1)-rho1arr(jr ,2) + ff(ir)=ff(ir)+v22r*ro22r+v22i*ro22i + end do + end if + else + do ir=1,nrad ! Real and imaginary parts + jr=2*ir;v11r=vxc1_(jr-1,ipts,1);v11i=vxc1_(jr,ipts,1) + ro11r=rho1arr(jr-1,nspden);ro11i=rho1arr(jr,nspden) + ff(ir)=v11r*ro11r+v11i*ro11i + gg(ir)=v11r*ro11i-v11i*ro11r + end do + if (nspden==2) then + do ir=1,nrad + jr=2*ir;v22r=vxc1_(jr-1,ipts,2);v22i=vxc1_(jr,ipts,2) + ro22r=rho1arr(jr-1,1)-rho1arr(jr-1,2) + ro22i=rho1arr(jr ,1)-rho1arr(jr ,2) + ff(ir)=ff(ir)+v22r*ro22r+v22i*ro22i + gg(ir)=gg(ir)+v22r*ro22i-v22i*ro22r + end do + end if + end if + else ! other cases for cplex_vxc and cplex_den + v11i=zero;ro11i=zero + do ir=1,nrad + jr=cplex_den*(ir-1)+1 ; kr=cplex_vxc*(ir-1)+1 + ro11r=rho1arr(jr,nspden);if (cplex_den==2) ro11i=rho1arr(jr+1,nspden) + v11r=vxc1_(kr,ipts,1);if (cplex_vxc==2) v11i=vxc1_(kr+1,ipts,1) + ff(ir)=v11r*ro11r+v11i*ro11i + if (need_impart) gg(ir)=v11r*ro11i-v11i*ro11r + end do + if (nspden==2) then + v22i=zero;ro22i=zero + do ir=1,nrad + jr=cplex_den*(ir-1)+1 ; kr=cplex_vxc*(ir-1)+1 + ro22r=rho1arr(jr,1)-rho1arr(jr,2) + if (cplex_den==2) ro22i=rho1arr(jr+1,1)-rho1arr(jr+1,2) + v22r=vxc1_(kr,ipts,2);if (cplex_vxc==2) v22i=vxc1_(kr+1,ipts,2) + ff(ir)=ff(ir)+v22r*ro22r+v22i*ro22i + gg(ir)=gg(ir)+v22r*ro22i-v22i*ro22r + end do + end if + end if ! cplex_vxc and cplex_den + +! NON-COLLINEAR MAGNETISM + else + if (cplex_vxc==1.and.cplex_den==1) then ! cplex_vxc==1 and cplex_den==1 + ff(:)=half*(vxc1_(:,ipts,1)*(rho1arr(:,1)+rho1arr(:,4)) & +& +vxc1_(:,ipts,2)*(rho1arr(:,1)-rho1arr(:,4))) & +& +vxc1_(:,ipts,3)*rho1arr(:,2) & +& -vxc1_(:,ipts,4)*rho1arr(:,3) + if (need_impart) gg(:)=zero + else ! other cases for cplex_vxc and cplex_den + +! V is stored as : v^11, v^22, V^12, i.V^21 (each are complex) +! N is stored as : n, m_x, m_y, mZ (each are complex) + do ir=1,nrad + jr=cplex_den*(ir-1)+1 ; kr=cplex_vxc*(ir-1)+1 + ro11r= rho1arr(jr,1)+rho1arr(jr,4) + ro22r= rho1arr(jr,1)-rho1arr(jr,4) + ro12r= rho1arr(jr,2);ro12i=-rho1arr(jr,3) + ro21r= rho1arr(jr,2);ro21i= rho1arr(jr,3) + if (cplex_den==2) then + ro11i=rho1arr(jr+1,1)+rho1arr(jr+1,4) + ro22i=rho1arr(jr+1,1)-rho1arr(jr+1,4) + ro12r=ro12r+rho1arr(jr+1,3);ro12i=ro12i+rho1arr(jr+1,2) + ro21r=ro21r-rho1arr(jr+1,3);ro21i=ro21i+rho1arr(jr+1,2) + else + ro11i=zero;ro22i=zero + end if + v11r= vxc1_(kr,ipts,1);v22r= vxc1_(kr,ipts,2) + v12r= vxc1_(kr,ipts,3);v21i=-vxc1_(kr,ipts,1) + if (cplex_vxc==2) then + v11i= vxc1_(kr+1,ipts,1);v22i= vxc1_(kr+1,ipts,2) + v12i= vxc1_(kr+1,ipts,3);v21r= vxc1_(kr+1,ipts,1) + else + v11i=zero;v22i=zero + v12i=zero;v21i=zero + end if +! Real part + ff(ir)=half*(v11r*ro11r+v11i*ro11i+v22r*ro22r+v22i*ro22i & +& +v12r*ro12r+v12i*ro12i+v21r*ro21r+v21i*ro21i) +! Imaginary part + if (need_impart) & +& gg(ir)=half*(v11r*ro11i-v11i*ro11r+v22r*ro22i-v22i*ro22r & +& +v12r*ro12i-v12i*ro12r+v21r*ro21i-v21i*ro21r) + end do + end if ! cplex_vxc and cplex_den + end if ! nspden + + ff(1:nrad)=ff(1:nrad)*pawrad%rad(1:nrad)**2 + call simp_gen(vxcrho,ff,pawrad) + d2enxc=d2enxc+vxcrho*pawang%angwgth(ipts) + LIBPAW_DEALLOCATE(ff) + + if (need_impart) then + gg(1:nrad)=gg(1:nrad)*pawrad%rad(1:nrad)**2 + call simp_gen(vxcrho,gg,pawrad) + d2enxc_im=d2enxc_im+vxcrho*pawang%angwgth(ipts) + LIBPAW_DEALLOCATE(gg) + end if + +! ----- End of the loop on npts (angular part) + end do + + end if ! option/=1 + +!Add the four*pi factor of the angular integration + if (option/=1) then + d2enxc=d2enxc*four_pi + if (need_impart) d2enxc_im=d2enxc_im*four_pi + end if + +!Free memory + if (usexcnhat>0) then + LIBPAW_DEALLOCATE(rhohat1) + end if + LIBPAW_DEALLOCATE(rho1arr) + if (option==2) then + LIBPAW_POINTER_DEALLOCATE(vxc1_) + end if + if (xclevel==2.and.option/=3) then + LIBPAW_DEALLOCATE(gxc1) + LIBPAW_DEALLOCATE(dylmdr) + end if + +end subroutine pawxc_dfpt +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawxc/pawxcsph +!! NAME +!! pawxcsph +!! +!! FUNCTION +!! Compute XC energy and potential for a spherical density rho(r) given as (up,dn) +!! Driver of XC functionals. Only treat collinear spins. LDA and GGA +!! +!! INPUTS +!! exexch= choice of <<>> exact exchange. Active if exexch>0 (only for GGA) +!! ixc= choice of exchange-correlation scheme (see above and below) +!! nkxc= size of kxc(nrad,nkxc) (XC kernel) +!! nrad= dimension of the radial mesh +!! nspden=number of spin-density components +!! pawrad =paw radial mesh and related data +!! rho_updn(nrad,lm_size,nspden)=electron density in real space +!! up (ispden=1) and down (ispden=2) parts +!! If nspden=1, rho_updn(:,:,1) contains (1/2).rho_total +!! xclevel= XC functional level +!! +!! OUTPUT +!! exc(nrad)= XC energy density +!! vxc((nrad,nspden)= XC potential +!! === Only if nkxc>0 === +!! kxc(nrad,nkxc)=exchange and correlation kernel (returned only if nkxc/=0) +!! Content of Kxc array: +!! ===== if LDA +!! if nspden==1: kxc(:,1)= d2Exc/drho2 +!! (kxc(:,2)= d2Exc/drho_up drho_dn) +!! if nspden>=2: kxc(:,1)=d2Exc/drho_up drho_up +!! kxc(:,2)=d2Exc/drho_up drho_dn +!! kxc(:,3)=d2Exc/drho_dn drho_dn +!! +!! SOURCE + + subroutine pawxcsph(exc,exexch,hyb_mixing,ixc,kxc,nkxc,nrad,nspden,pawrad,rho_updn,vxc,xclevel) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: exexch,ixc,nkxc,nrad,nspden,xclevel + real(dp),intent(in) :: hyb_mixing + type(pawrad_type),intent(in) :: pawrad +!arrays + real(dp),intent(in) :: rho_updn(nrad,nspden) + real(dp),intent(out) :: exc(nrad),kxc(nrad,nkxc),vxc(nrad,nspden) + +!Local variables------------------------------- +!scalars + integer :: ir,ispden,ndvxc,nspgrad,nvxcdgr,order + integer :: usegradient,uselaplacian,usekden + real(dp),parameter :: tol24=tol12*tol12 + real(dp) :: coeff,grho_tot,grho_up,fact + character(len=500) :: msg +!arrays + real(dp) :: d2vxc(1,1) + real(dp),allocatable :: dff(:),dnexcdn(:,:),dvxcdgr(:,:),dvxci(:,:) + real(dp),allocatable :: grho2(:,:),grho_updn(:,:) + +! ************************************************************************* + + if(nspden>2)then + write(msg, '(a,a,a,i0)' )& +& 'Only non-spin-polarised or collinear spin-densities are allowed,',ch10,& +& 'while the argument nspden=',nspden + LIBPAW_BUG(msg) + end if + if(nkxc>3)then + msg='nkxc>3 not allowed (GGA)!' + LIBPAW_ERROR(msg) + end if + if(nrad>pawrad%mesh_size)then + msg='nrad > mesh size!' + LIBPAW_BUG(msg) + end if + +!Compute sizes of arrays and flags + order=1;if (nkxc>0) order=2 + nspgrad=0;if (xclevel==2) nspgrad=3*nspden-1 + call pawxc_size_dvxc_wrapper(ixc,order,nspden,& +& usegradient=usegradient,nvxcgrho=nvxcdgr,ndvxc=ndvxc) + uselaplacian=0 ; usekden=0 !metaGGA contributions are not taken into account here + +!-------------------------------------------------------------------------- +!-------------- GGA: computation of the gradient of the density +!-------------------------------------------------------------------------- + + LIBPAW_ALLOCATE(grho2,(nrad,(2*nspden-1)*usegradient)) + if (xclevel==2) then + +! grho_updn contains the gradient of the radial part +! grho2(:,1:3) contains the squared norm of this gradient (up, dn and total) + LIBPAW_ALLOCATE(grho_updn,(nrad,nspden)) + +! Gradient of radial part of density + LIBPAW_ALLOCATE(dff,(nrad)) + do ispden=1,nspden + call nderiv_gen(dff,rho_updn(:,ispden),pawrad) + grho_updn(:,ispden)=dff(:) + end do + LIBPAW_DEALLOCATE(dff) + +! Squared norm of the gradient + grho2(:,1)=grho_updn(:,1)**2 + if (nspden==2) then + grho2(:,2)=grho_updn(:,2)**2 + grho2(:,3)=(grho_updn(:,1)+grho_updn(:,2))**2 + end if + + end if + +!-------------------------------------------------------------------------- +!-------------- Computation of Exc, Vxc (and Kxc) +!-------------------------------------------------------------------------- + +!Allocate arrays + LIBPAW_ALLOCATE(dvxci,(nrad,ndvxc)) + LIBPAW_ALLOCATE(dvxcdgr,(nrad,nvxcdgr)) + +!Call to main XC driver + call pawxc_drivexc_wrapper(hyb_mixing,ixc,order,nrad,nspden,& +& usegradient,uselaplacian,usekden,rho_updn,exc,vxc,& +& nvxcdgr,0,0,ndvxc,0,grho2=grho2,vxcgrho=dvxcdgr,& +& dvxc=dvxci,d2vxc=d2vxc,exexch=exexch) + +!Transfer the XC kernel + if (nkxc>0.and.ndvxc>0) then + if (nkxc==1.and.ndvxc==15) then + kxc(1:nrad,1)=half*(dvxci(1:nrad,1)+dvxci(1:nrad,9)+dvxci(1:nrad,10)) + else if (nkxc==3.and.ndvxc==15) then + kxc(1:nrad,1)=dvxci(1:nrad,1)+dvxci(1:nrad,9) + kxc(1:nrad,2)=dvxci(1:nrad,10) + kxc(1:nrad,3)=dvxci(1:nrad,2)+dvxci(1:nrad,11) + else if (nkxc==7.and.ndvxc==8) then + kxc(1:nrad,1)=half*dvxci(1:nrad,1) + kxc(1:nrad,2)=half*dvxci(1:nrad,3) + kxc(1:nrad,3)=quarter*dvxci(1:nrad,5) + kxc(1:nrad,4)=eighth*dvxci(1:nrad,7) + else if (nkxc==7.and.ndvxc==15) then + kxc(1:nrad,1)=half*(dvxci(1:nrad,1)+dvxci(1:nrad,9)+dvxci(1:nrad,10)) + kxc(1:nrad,2)=half*dvxci(1:nrad,3)+dvxci(1:nrad,12) + kxc(1:nrad,3)=quarter*dvxci(1:nrad,5)+dvxci(1:nrad,13) + kxc(1:nrad,4)=eighth*dvxci(1:nrad,7)+dvxci(1:nrad,15) + else if (nkxc==19.and.ndvxc==15) then + kxc(1:nrad,1)=dvxci(1:nrad,1)+dvxci(1:nrad,9) + kxc(1:nrad,2)=dvxci(1:nrad,10) + kxc(1:nrad,3)=dvxci(1:nrad,2)+dvxci(1:nrad,11) + kxc(1:nrad,4)=dvxci(1:nrad,3) + kxc(1:nrad,5)=dvxci(1:nrad,4) + kxc(1:nrad,6)=dvxci(1:nrad,5) + kxc(1:nrad,7)=dvxci(1:nrad,6) + kxc(1:nrad,8)=dvxci(1:nrad,7) + kxc(1:nrad,9)=dvxci(1:nrad,8) + kxc(1:nrad,10)=dvxci(1:nrad,12) + kxc(1:nrad,11)=dvxci(1:nrad,13) + kxc(1:nrad,12)=dvxci(1:nrad,14) + kxc(1:nrad,13)=dvxci(1:nrad,15) + else ! Other cases + kxc(1:nrad,1:nkxc)=zero + kxc(1:nrad,1:min(nkxc,ndvxc))=dvxci(1:nrad,1:min(nkxc,ndvxc)) + end if + if (nkxc==7) then + kxc(1:nrad,5)=grho_updn(1:nrad,1) ! Not correct + kxc(1:nrad,6)=grho_updn(1:nrad,1) ! Not correct + kxc(1:nrad,7)=grho_updn(1:nrad,1) ! Not correct + else if (nkxc==19) then + kxc(1:nrad,14)=grho_updn(1:nrad,1) ! Not correct + kxc(1:nrad,15)=grho_updn(1:nrad,2) ! Not correct + kxc(1:nrad,16)=grho_updn(1:nrad,1) ! Not correct + kxc(1:nrad,17)=grho_updn(1:nrad,2) ! Not correct + kxc(1:nrad,18)=grho_updn(1:nrad,1) ! Not correct + kxc(1:nrad,19)=grho_updn(1:nrad,2) ! Not correct + end if + end if + LIBPAW_DEALLOCATE(dvxci) + +!-------------------------------------------------------------------------- +!-------------- GGA: gardient corrections +!-------------------------------------------------------------------------- + + if (xclevel==2.and.ixc/=13) then + +! Compute the derivative of Exc with respect to the (spin-)density, +! or to the norm of the gradient of the (spin-)density, +! Further divided by the norm of the gradient of the (spin-)density +! The different components of dnexcdn will be +! for nspden=1, dnexcdn(:,1)=d(n.exc)/d(n) +! and if xclevel=2, dnexcdn(:,2)=1/2*1/|grad n_up|*d(n.exc)/d(|grad n_up|) +! + 1/|grad n|*d(n.exc)/d(|grad n|) +! (do not forget : |grad n| /= |grad n_up| + |grad n_down| +! for nspden=2, dnexcdn(:,1)=d(n.exc)/d(n_up) +! dnexcdn(:,2)=d(n.exc)/d(n_down) +! and if xclevel=2, dnexcdn(:,3)=1/|grad n_up|*d(n.exc)/d(|grad n_up|) +! dnexcdn(:,4)=1/|grad n_down|*d(n.exc)/d(|grad n_down|) +! dnexcdn(:,5)=1/|grad n|*d(n.exc)/d(|grad n|) + LIBPAW_ALLOCATE(dnexcdn,(nrad,nspgrad)) +! LDA term + dnexcdn(:,1:nspden)=vxc(:,1:nspden) +! Additional GGA terms + do ir=1,nrad + do ispden=1,3 ! spin_up, spin_down and total spin density + if (nspden==1.and.ispden>=2) exit +! If the norm of the gradient vanishes, then the different terms +! vanishes, but the inverse of the gradient diverges, +! so skip the update. + if(grho2(ir,ispden)=paw radial mesh and related data +!! rho_updn(nrad,lm_size,nspden)=electron density in real space +!! up (ispden=1) and down (ispden=2) parts +!! If nspden=1, rho_updn(:,:,1) contains (1/2).rho_total +!! rho1_updn(nrad,lm_size,nspden)=electron 1st-order density in real space +!! up (ispden=1) and down (ispden=2) parts +!! If nspden=1, rho_updn(:,:,1) contains (1/2).rho1_total +!! xclevel= XC functional level +!! +!! OUTPUT +!! vxc1((nrad,nspden)= XC 1st-order potential +!! +!! SOURCE + + +subroutine pawxcsph_dfpt(cplex_den,cplex_vxc,ixc,nrad,nspden,pawrad,rho_updn,rho1_updn,vxc1,xclevel) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: cplex_den,cplex_vxc,ixc,nrad,nspden,xclevel + type(pawrad_type),intent(in) :: pawrad +!arrays + real(dp),intent(in) :: rho_updn(nrad,nspden),rho1_updn(cplex_den*nrad,nspden) + real(dp),intent(out) :: vxc1(cplex_vxc*nrad,nspden) + +!Local variables------------------------------- +!scalars + integer :: ii,ir,ispden,ivxc,jr,kr,ndvxc,ngrad,nkxc,nvxcdgr,order,usegradient + real(dp),parameter :: tol24=tol12*tol12 +!real(dp) :: coeff_grho_corr,coeff_grho_dn,coeff_grho_up,fact +!real(dp) :: grho_grho1,grho_grho1_dn,grho_grho1_up + character(len=500) :: msg + real(dp),parameter :: hyb_mixing_ = 0.0_dp +!arrays + integer,parameter :: ikxc(4)=(/1,2,2,3/),irho(4)=(/1,2,1,2/) + real(dp),allocatable :: dff(:),dgg(:),dvxcdgr(:,:),dvxc(:,:),exc(:),ff(:),gg(:) + real(dp),allocatable :: grho_updn(:,:),grho1_updn(:,:),grho2(:,:) + real(dp),allocatable :: kxc(:,:),vxc(:,:) +!real(dp),allocatable :: gxc1i(:,:),gxc1r(:,:),vxc1i(:,:),vxc1r(:,:) + +! ************************************************************************* + + if(nspden>2)then + write(msg, '(a,a,a,i0)' )& +& 'Only non-spin-polarised or collinear spin-densities are allowed,',ch10,& +& 'while the argument nspden=',nspden + LIBPAW_BUG(msg) + end if + if(nrad>pawrad%mesh_size)then + msg='nrad > mesh size!' + LIBPAW_BUG(msg) + end if + +!Compute sizes of arrays and flags + order=2 ! We need Kxc + ngrad=1;if (xclevel==2) ngrad=2 ! ngrad=1 is for LDAs or LSDs; ngrad=2 is for GGAs + nkxc=2*nspden-1;if (xclevel==2) nkxc=15 ! Not correct for nspden=1 + call pawxc_size_dvxc_wrapper(ixc,order,nspden,usegradient=usegradient,nvxcgrho=nvxcdgr,ndvxc=ndvxc) + +!-------------------------------------------------------------------------- +!-------------- GGA: computation of the gradients of the densities +!-------------------------------------------------------------------------- + + LIBPAW_ALLOCATE(grho2,(nrad,(2*nspden-1)*usegradient)) + if (ngrad==2) then + + LIBPAW_ALLOCATE(grho_updn,(nrad,nspden)) + LIBPAW_ALLOCATE(grho1_updn,(cplex_den*nrad,nspden)) + +! Gradient of density + LIBPAW_ALLOCATE(dff,(nrad)) + do ispden=1,nspden + call nderiv_gen(dff,rho_updn(:,ispden),pawrad) + grho_updn(:,ispden)=dff(:) + end do +! Gradient of 1st-order density + if (cplex_den==1) then + do ispden=1,nspden + call nderiv_gen(dff,rho1_updn(:,ispden),pawrad) + grho1_updn(:,ispden)=dff(:) + end do + else + LIBPAW_ALLOCATE(ff,(nrad)) + LIBPAW_ALLOCATE(gg,(nrad)) + LIBPAW_ALLOCATE(dgg,(nrad)) + do ispden=1,nspden + do ir=1,nrad + ff(ir)=rho1_updn(2*ir-1,ispden) + gg(ir)=rho1_updn(2*ir ,ispden) + end do + call nderiv_gen(dff,ff,pawrad) + call nderiv_gen(dgg,gg,pawrad) + do ir=1,nrad + grho1_updn(2*ir-1,ispden)=dff(ir) + grho1_updn(2*ir ,ispden)=dgg(ir) + end do + end do + LIBPAW_DEALLOCATE(ff) + LIBPAW_DEALLOCATE(gg) + LIBPAW_DEALLOCATE(dgg) + end if + LIBPAW_DEALLOCATE(dff) + +! Squared norm of the gradient + grho2(:,1)=grho_updn(:,1)**2 + if (nspden==2) then + grho2(:,2)=grho_updn(:,2)**2 + grho2(:,3)=(grho_updn(:,1)+grho_updn(:,2))**2 + end if + + end if + +!-------------------------------------------------------------------------- +!-------------- Computation of Kxc (and Exc, Vxc) +!-------------------------------------------------------------------------- + + LIBPAW_ALLOCATE(exc,(nrad)) + LIBPAW_ALLOCATE(vxc,(nrad,nspden)) + LIBPAW_ALLOCATE(dvxc,(nrad,ndvxc)) + LIBPAW_ALLOCATE(dvxcdgr,(nrad,nvxcdgr)) + +!Call to main XC driver + call pawxc_drivexc_wrapper(hyb_mixing_,ixc,order,nrad,nspden,usegradient,0,0,& +& rho_updn,exc,vxc,nvxcdgr,0,0,ndvxc,0,& +& grho2=grho2,vxcgrho=dvxcdgr,dvxc=dvxc) + +!Transfer the XC kernel + LIBPAW_ALLOCATE(kxc,(nrad,nkxc)) + if (nkxc>0.and.ndvxc>0) then + if (nkxc==1.and.ndvxc==15) then + kxc(1:nrad,1)=half*(dvxc(1:nrad,1)+dvxc(1:nrad,9)+dvxc(1:nrad,10)) + else if (nkxc==3.and.ndvxc==15) then + kxc(1:nrad,1)=dvxc(1:nrad,1)+dvxc(1:nrad,9) + kxc(1:nrad,2)=dvxc(1:nrad,10) + kxc(1:nrad,3)=dvxc(1:nrad,2)+dvxc(1:nrad,11) + else if (nkxc==7.and.ndvxc==8) then + kxc(1:nrad,1)=half*dvxc(1:nrad,1) + kxc(1:nrad,2)=half*dvxc(1:nrad,3) + kxc(1:nrad,3)=quarter*dvxc(1:nrad,5) + kxc(1:nrad,4)=eighth*dvxc(1:nrad,7) + else if (nkxc==7.and.ndvxc==15) then + kxc(1:nrad,1)=half*(dvxc(1:nrad,1)+dvxc(1:nrad,9)+dvxc(1:nrad,10)) + kxc(1:nrad,2)=half*dvxc(1:nrad,3)+dvxc(1:nrad,12) + kxc(1:nrad,3)=quarter*dvxc(1:nrad,5)+dvxc(1:nrad,13) + kxc(1:nrad,4)=eighth*dvxc(1:nrad,7)+dvxc(1:nrad,15) + else if (nkxc==19.and.ndvxc==15) then + kxc(1:nrad,1)=dvxc(1:nrad,1)+dvxc(1:nrad,9) + kxc(1:nrad,2)=dvxc(1:nrad,10) + kxc(1:nrad,3)=dvxc(1:nrad,2)+dvxc(1:nrad,11) + kxc(1:nrad,4)=dvxc(1:nrad,3) + kxc(1:nrad,5)=dvxc(1:nrad,4) + kxc(1:nrad,6)=dvxc(1:nrad,5) + kxc(1:nrad,7)=dvxc(1:nrad,6) + kxc(1:nrad,8)=dvxc(1:nrad,7) + kxc(1:nrad,9)=dvxc(1:nrad,8) + kxc(1:nrad,10)=dvxc(1:nrad,12) + kxc(1:nrad,11)=dvxc(1:nrad,13) + kxc(1:nrad,12)=dvxc(1:nrad,14) + kxc(1:nrad,13)=dvxc(1:nrad,15) + else ! Other cases + kxc(1:nrad,1:nkxc)=zero + kxc(1:nrad,1:min(nkxc,ndvxc))=dvxc(1:nrad,1:min(nkxc,ndvxc)) + end if + if (nkxc==7) then + kxc(1:nrad,5)=zero ! Not correct + kxc(1:nrad,6)=zero ! Not correct + kxc(1:nrad,7)=zero ! Not correct + else if (nkxc==19) then + kxc(1:nrad,14)=zero ! Not correct + kxc(1:nrad,15)=zero ! Not correct + kxc(1:nrad,16)=zero ! Not correct + kxc(1:nrad,17)=zero ! Not correct + kxc(1:nrad,18)=zero ! Not correct + kxc(1:nrad,19)=zero ! Not correct + end if + end if + + LIBPAW_DEALLOCATE(exc) + LIBPAW_DEALLOCATE(vxc) + LIBPAW_DEALLOCATE(dvxc) + LIBPAW_DEALLOCATE(dvxcdgr) + +!-------------------------------------------------------------------------- +!-------------- LDA +!-------------------------------------------------------------------------- + if (ngrad==1.or.ixc==13) then + + do ispden=1,3*nspden-2 + ivxc=1;if (ispden>2) ivxc=2 + if (cplex_vxc==1.and.cplex_den==1) then + vxc1(:,ivxc)=vxc1(:,ivxc)+kxc(:,ikxc(ii))*rho1_updn(:,irho(ii)) + else + do ir=1,nrad + jr=cplex_den*(ir-1);kr=cplex_vxc*(ir-1) + do ii=1,1+(cplex_den*cplex_vxc)/4 + jr=jr+1;kr=kr+1 + vxc1(kr,ivxc)=vxc1(kr,ivxc)+kxc(ir,ikxc(ii))*rho1_updn(jr,irho(ii)) + end do + end do + end if + end do + +! -------------------------------------------------------------------------- +! -------------- GGA +! -------------------------------------------------------------------------- + else + +! FOR NSPDEN=1, should eliminate computation of gxc1i(...), vxc1i(...) + +! LIBPAW_ALLOCATE(vxc1r,(nrad,2)) +! LIBPAW_ALLOCATE(vxc1i,(nrad,2)) +! LIBPAW_ALLOCATE(gxc1r,(nrad,2)) +! LIBPAW_ALLOCATE(gxc1i,(nrad,2)) +! do ir=1,nrad +! if (cplex_vxc==1) then ! cplex_vxc==1 and (cplex_den==1 or cplex_den=2) +! jr=cplex_den*(ir-1)+1 +! grho_grho1_up=grho_updn(ir,1)*grho1_updn(jr,1) +! grho_grho1_dn=grho_updn(ir,2)*grho1_updn(jr,2) +! vxc1r(ir,1)=(kxc(ir, 1)+kxc(ir, 9))*rho1_updn(jr,1)+kxc(ir,10)*rho1_updn(jr,2) & +! & +kxc(ir, 5)*grho_grho1_up+kxc(ir,13)*grho_grho1 +! vxc1r(ir,2)=(kxc(ir, 2)+kxc(ir,11))*rho1_updn(jr,2)+kxc(ir,10)*rho1_updn(jr,1) & +! & +kxc(ir, 6)*grho_grho1_dn+kxc(ir,14)*grho_grho1 +! coeff_grho_corr=kxc(ir,13)*rho1_updn(jr,1)+kxc(ir,14)*rho1_updn(jr,2)+kxc(ir,15)*grho_grho1 +! coeff_grho_up =kxc(ir, 5)*rho1_updn(jr,1)+kxc(ir, 7)*grho_grho1_up +! coeff_grho_dn =kxc(ir, 6)*rho1_updn(jr,2)+kxc(ir, 8)*grho_grho1_dn +! gxc1r(ir,1)=(kxc(ir, 3)+kxc(ir,12))*grho1_updn(jr,1)+kxc(ir,12)*grho1_updn(jr,2) & +! & +coeff_grho_up*grho_updn(jr,1)+coeff_grho_corr*(grho_updn(jr,1)+grho_updn(jr,2)) +! gxc1r(ir,2)=(kxc(ir, 4)+kxc(ir,12))*grho1_updn(jr,2)+kxc(ir,12)*grho1_updn(jr,1) & +! & +coeff_grho_dn*grho_updn(jr,2)+coeff_grho_corr*(grho_updn(jr,1)+grho_updn(jr,2)) +! end if +! if (grho2(ir,1)=paw radial mesh and related data +!! posdensity0_limit=True if we are in the zero positron density limit +!! rho(nrad,lm_size)=electron (or positron) density in real space +!! Contents depends on calctype value: +!! calctype=1: rho is the positronic density +!! calctype=2: rho is the electronic density +!! rho_ep(nrad,lm_size)=electron (or positron) density in real space +!! Contents depends on calctype value: +!! calctype=1: rho_ep is the electronic density +!! calctype=2: rho_ep is the positronic density +!! +!! OUTPUT +!! fxc(nrad)= electron-positron XC energy per unit volume +!! vxce(nrad)= electron-positron XC potential for the electron +!! vxcp(nrad)= electron-positron XC potential for the positron +!! +!! SOURCE + + subroutine pawxcsphpositron(calctype,fxc,ixcpositron,nrad,pawrad,posdensity0_limit,rho,rho_ep,vxce,vxcp) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: calctype,ixcpositron,nrad + logical,intent(in) :: posdensity0_limit + type(pawrad_type),intent(in) :: pawrad +!arrays + real(dp),intent(in) :: rho(nrad),rho_ep(nrad) + real(dp),intent(out) :: fxc(nrad),vxce(nrad),vxcp(nrad) + +!Local variables------------------------------- +!scalars + integer :: ngr + character(len=500) :: msg +!arrays + real(dp),allocatable :: dff(:),rhograd(:),rhograd2(:),vxcegr(:) + +! ************************************************************************* + + if(nrad>pawrad%mesh_size)then + msg='nrad > mesh size!' + LIBPAW_BUG(msg) + end if + +!Need gradient of density for GGA + ngr=0;if (ixcpositron==3.or.ixcpositron==31) ngr=nrad + LIBPAW_ALLOCATE(rhograd,(ngr)) + LIBPAW_ALLOCATE(rhograd2,(ngr)) + LIBPAW_ALLOCATE(vxcegr,(ngr)) + if (ngr==nrad) then + if (calctype==1) then + call nderiv_gen(rhograd,rho_ep,pawrad) + else if (calctype==2) then + call nderiv_gen(rhograd,rho,pawrad) + end if + rhograd2(:)=rhograd(:)**2 + end if + +!---- Computation of Fxc and Vxc for the positron +!rho is the positronic density +!rho_ep is the electronic density + if (calctype==1) then + call pawxc_xcpositron_wrapper(fxc,rhograd2,ixcpositron,ngr,nrad,posdensity0_limit,rho_ep,rho,vxce,vxcegr,vxcp) + +! ---- Computation of Exc and Vxc for the electron +! rho is the electronic density +! rho_ep is the positronic density + else if (calctype==2) then + call pawxc_xcpositron_wrapper(fxc,rhograd2,ixcpositron,ngr,nrad,posdensity0_limit,rho,rho_ep,vxce,vxcegr,vxcp) + end if + + LIBPAW_DEALLOCATE(rhograd2) + +!---- GGA - gradient corrections + if (ngr==nrad) then + LIBPAW_ALLOCATE(dff,(nrad)) + vxcegr(1:nrad)=vxcegr(1:nrad)*rhograd(1:nrad) + call nderiv_gen(dff,vxcegr,pawrad) + vxcp(2:nrad)=vxcp(2:nrad)-(dff(2:nrad)+two*vxcegr(2:nrad)/pawrad%rad(2:nrad)) + call pawrad_deducer0(vxcp,nrad,pawrad) + LIBPAW_DEALLOCATE(dff) + end if + + LIBPAW_DEALLOCATE(vxcegr) + LIBPAW_DEALLOCATE(rhograd) + +end subroutine pawxcsphpositron +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawxc/pawxcsum +!! NAME +!! pawxcsum +!! +!! FUNCTION +!! Compute useful sums of moments of densities needed to compute on-site contributions to XC energy and potential +!! First order sums: +!! Sum1(1)=Sum_L{Rho1_L(r)**2} +!! Sum1(2)=Sum_L{Rho1_L(r)*Rho2_L(r)} +!! Sum1(3)=Sum_L{Rho2_L(r)**2} +!! With L>0 +!! Second order sums: +!! Sum2(L,1)=Sum_L1_L2{Rho1_L1(r)*Rho1_L1(r)*Gaunt_(L,L1,L2)} +!! Sum2(L,2)=Sum_L1_L2{Rho1_L1(r)*Rho2_L2(r)*Gaunt_(L,L1,L2)} +!! Sum2(L,3)=Sum_L1_L2{Rho2_L2(r)*Rho2_L2(r)*Gaunt_(L,L1,L2)} +!! With L1>0, L2>0 +!! +!! INPUTS +!! cplex1=if 1, density Rho1 is REAL, if 2, COMPLEX +!! cplex2=if 1, density Rho2 is REAL, if 2, COMPLEX +!! cplexsum=if 1, output sums (Sum1 and Sum2) are REAL, if 2, COMPLEX +!! lmselect1(lm_size)=select the non-zero LM-moments of input density Rho1 +!! lmselect2(lm_size)=select the non-zero LM-moments of input density Rho2 +!! lm_size=number of moments of the density +!! nrad=number of radial points +!! nsums=number of sums to compute: +!! if nsums=1, computes only +!! Sum1(1)=Sum_L{Rho1_L(r)*Rho2_L(r)} +!! Sum2(L,1)=Sum_L1_L2{Rho1_L1(r)*Rho2_L2(r)*Gaunt_(L,L1,L2)} +!! if nsums=3, computes all sums (Sum1(1:3), Sum2(1:3) +!! option= 1: compute first order sums +!! 2: compute first and second order sums +!! pawang =paw angular mesh and related data +!! rho1(cplex1*nrad,lm_size)=moments of first density on each radial point +!! rho2(cplex2*nrad,lm_size)=moments of 2nd density on each radial point +!! +!! OUTPUT +!! sum1(cplexsum*nrad,nsums)=first order sums +!! === if option>=2 +!! sum2(cplexsum*nrad,lm_size,nsums)=second order sums +!! +!! SOURCE + + subroutine pawxcsum(cplex1,cplex2,cplexsum,lmselect1,lmselect2,lm_size,nrad,nsums,& +& option,pawang,rho1,rho2,sum1,sum2) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: cplex1,cplex2,cplexsum,lm_size,nrad,nsums,option +!arrays + logical,intent(in) :: lmselect1(lm_size),lmselect2(lm_size) + real(dp),intent(in) :: rho1(cplex1*nrad,lm_size),rho2(cplex2*nrad,lm_size) + real(dp),intent(out) :: sum1(cplexsum*nrad,nsums),sum2(cplexsum*nrad,lm_size,nsums*(option/2)) + type(pawang_type),intent(in) :: pawang + +!Local variables------------------------------- +!scalars + integer :: ilm,ilm1,ilm2,ir,i1r,i2r,i3r,isel + real(dp) :: fact,ro1i,ro1r,ro2i,ro2r + character(len=500) :: msg +!arrays + +!************************************************************************ + + if(nsums/=1.and.nsums/=3) then + msg='nsums must be 1 or 3!' + LIBPAW_BUG(msg) + end if + if(pawang%gnt_option==0) then + msg='pawang%gnt_option=0!' + LIBPAW_BUG(msg) + end if + + if (option>=1) then + +! SUM1(r)= Sum_L{Rho1_L(r)*Rho2_L(r)} (L>0) +! -------------------------------------------------- + sum1=zero + +! ===== All input/output densities are REAL ==== + if (cplex1==1.and.cplex2==1.and.cplexsum==1) then +! One sum to compute + if (nsums==1) then + do ilm=2,lm_size + if (lmselect1(ilm).and.lmselect2(ilm)) then + sum1(:,1)=sum1(:,1)+rho1(:,ilm)*rho2(:,ilm) + end if + end do +! Three sums to compute + else + do ilm=2,lm_size + if (lmselect1(ilm)) then + sum1(:,1)=sum1(:,1)+rho1(:,ilm)**2 + if (lmselect2(ilm)) sum1(:,2)=sum1(:,2)+rho1(:,ilm)*rho2(:,ilm) + end if + if (lmselect2(ilm)) sum1(:,3)=sum1(:,3)+rho2(:,ilm)**2 + end do + end if + +! ===== At least one of Rho1 and Rho2 is COMPLEX ==== + else +! One sum to compute + if (nsums==1) then + do ilm=2,lm_size + if (lmselect1(ilm).and.lmselect2(ilm)) then + do ir=1,nrad + i1r=cplex1*(ir-1)+1;i2r=cplex2*(ir-1)+1;i3r=cplexsum*(ir-1)+1 + ro1r=rho1(i1r,ilm);ro1i=zero;if (cplex1==2) ro1i=rho1(i1r+1,ilm) + ro2r=rho2(i2r,ilm);ro2i=zero;if (cplex2==2) ro2i=rho2(i2r+1,ilm) + sum1(i3r,1)=sum1(i3r,1)+ro1r*ro2r-ro1i*ro2i + if (cplexsum==2) sum1(i3r+1,1)=sum1(i3r+1,1)+ro1r*ro2i+ro1i*ro2r + end do + end if + end do +! Three sums to compute + else + do ilm=2,lm_size + do ir=1,nrad + i1r=cplex1*(ir-1)+1;i2r=cplex2*(ir-1)+1;i3r=cplexsum*(ir-1)+1 + ro1r=rho1(i1r,ilm);ro1i=zero;if (cplex1==2) ro1i=rho1(i1r+1,ilm) + ro2r=rho2(i2r,ilm);ro2i=zero;if (cplex2==2) ro2i=rho2(i2r+1,ilm) + if (lmselect1(ilm)) then + sum1(i3r,1)=sum1(i3r,1)+ro1r**2-ro1i**2 + if (lmselect2(ilm)) sum1(i3r,2)=sum1(i3r,2)+ro1r*ro2r-ro1i*ro2i + end if + if (lmselect2(ilm)) sum1(i3r,3)=sum1(i3r,3)+ro2r**2-ro2i**2 + if (cplexsum==2) then + if (lmselect1(ilm)) then + sum1(i3r+1,1)=sum1(i3r+1,1)+two*ro1r*ro1i + if (lmselect2(ilm)) sum1(i3r+1,2)=sum1(i3r+1,2)+ro1r*ro2i+ro1i*ro2r + end if + if (lmselect2(ilm)) sum1(i3r+1,3)=sum1(i3r+1,3)+two*ro2r*ro2i + end if + end do + end do + end if ! nsums + end if ! cplex + + end if !option + + if (option>=2) then + +! SUM2(r,L)= Sum_L1_L2{Rho1_L1(r)*Rho2_L2(r)*Gaunt_(L,L1,L2)} (L1>0, L2>0) +! -------------------------------------------------- + sum2=zero +! ===== All input/output densities are REAL ==== + if (cplex1==1.and.cplex2==1.and.cplexsum==1) then +! One sum to compute + if (nsums==1) then + do ilm=1,lm_size + do ilm1=2,lm_size + if (lmselect1(ilm1)) then + do ilm2=2,ilm1 + if (lmselect2(ilm2)) then + isel=pawang%gntselect(ilm,ilm2+ilm1*(ilm1-1)/2) + if (isel>0) then + fact=pawang%realgnt(isel);if (ilm1/=ilm2) fact=two*fact + sum2(:,ilm,1)=sum2(:,ilm,1)+fact*rho1(:,ilm1)*rho2(:,ilm2) + end if + end if + end do + end if + end do + end do +! Three sums to compute + else + do ilm=1,lm_size + do ilm1=2,lm_size + if (lmselect1(ilm1)) then + do ilm2=2,ilm1 + if (lmselect1(ilm2)) then + isel=pawang%gntselect(ilm,ilm2+ilm1*(ilm1-1)/2) + if (isel>0) then + fact=pawang%realgnt(isel);if (ilm1/=ilm2) fact=two*fact + sum2(:,ilm,1)=sum2(:,ilm,1)+fact*rho1(:,ilm1)*rho1(:,ilm2) + end if + end if + end do + end if + end do + do ilm1=2,lm_size + if (lmselect2(ilm1)) then + do ilm2=2,ilm1 + if (lmselect2(ilm2)) then + isel=pawang%gntselect(ilm,ilm2+ilm1*(ilm1-1)/2) + if (isel>0) then + fact=pawang%realgnt(isel);if (ilm1/=ilm2) fact=two*fact + sum2(:,ilm,3)=sum2(:,ilm,3)+fact*rho2(:,ilm1)*rho2(:,ilm2) + end if + end if + end do + end if + end do + do ilm1=2,lm_size + if (lmselect1(ilm1)) then + do ilm2=2,ilm1 + if (lmselect2(ilm2)) then + isel=pawang%gntselect(ilm,ilm2+ilm1*(ilm1-1)/2) + if (isel>0) then + fact=pawang%realgnt(isel) + sum2(:,ilm,2)=sum2(:,ilm,2)+fact*rho1(:,ilm1)*rho2(:,ilm2) + end if + end if + end do + if (ilm10) then + fact=pawang%realgnt(isel) + sum2(:,ilm,2)=sum2(:,ilm,2)+fact*rho1(:,ilm1)*rho2(:,ilm2) + end if + end if + end do + end if + end if + end do + end do + end if ! nsums + +! ===== At least one of Rho1 and Rho2 is COMPLEX ==== + else +! One sum to compute + if (nsums==1) then + do ilm=1,lm_size + do ilm1=2,lm_size + if (lmselect1(ilm1)) then + do ilm2=2,ilm1 + if (lmselect2(ilm2)) then + isel=pawang%gntselect(ilm,ilm2+ilm1*(ilm1-1)/2) + if (isel>0) then + fact=pawang%realgnt(isel);if (ilm1/=ilm2) fact=two*fact + do ir=1,nrad + i1r=cplex1*(ir-1)+1;i2r=cplex2*(ir-1)+1;i3r=cplexsum*(ir-1)+1 + ro1r=rho1(i1r,ilm1);ro1i=zero;if (cplex1==2) ro1i=rho1(i1r+1,ilm1) + ro2r=rho2(i2r,ilm2);ro2i=zero;if (cplex2==2) ro2i=rho2(i2r+1,ilm2) + sum2(i3r,ilm,1)=sum2(i3r,ilm,1)+fact*(ro1r*ro2r-ro1i*ro2i) + if (cplexsum==2) sum2(i3r+1,ilm,1)=sum2(i3r+1,ilm,1)+fact*(ro1r*ro2i+ro1i*ro2r) + end do + end if + end if + end do + end if + end do + end do +! Three sums to compute + else + do ilm=2,lm_size + do ir=1,nrad + i1r=cplex1*(ir-1)+1;i2r=cplex2*(ir-1)+1;i3r=cplexsum*(ir-1)+1 + do ilm1=2,lm_size + if (lmselect1(ilm1)) then + ro1r=rho1(i1r,ilm1);ro1i=zero;if (cplex1==2) ro1i=rho1(i1r+1,ilm1) + do ilm2=2,ilm1 + if (lmselect1(ilm2)) then + isel=pawang%gntselect(ilm,ilm2+ilm1*(ilm1-1)/2) + if (isel>0) then + fact=pawang%realgnt(isel);if (ilm1/=ilm2) fact=two*fact + ro2r=rho1(i1r,ilm2);ro2i=zero;if (cplex1==2) ro2i=rho1(i1r+1,ilm2) + sum2(i3r,ilm,1)=sum2(i3r,ilm,1)+fact*(ro1r*ro2r-ro1i*ro2i) + if (cplexsum==2) sum2(i3r+1,ilm,1)=sum2(i3r+1,ilm,1)+fact*(ro1r*ro2i+ro1i*ro2r) + end if + end if + end do + end if + end do + do ilm1=2,lm_size + if (lmselect2(ilm1)) then + ro1r=rho2(i2r,ilm1);ro1i=zero;if (cplex2==2) ro1i=rho2(i2r+1,ilm1) + do ilm2=2,ilm1 + if (lmselect2(ilm2)) then + isel=pawang%gntselect(ilm,ilm2+ilm1*(ilm1-1)/2) + if (isel>0) then + fact=pawang%realgnt(isel);if (ilm1/=ilm2) fact=two*fact + ro2r=rho2(i2r,ilm2);ro2i=zero;if (cplex2==2) ro2i=rho2(i2r+1,ilm2) + sum2(i3r,ilm,3)=sum2(i3r,ilm,3)+fact*(ro1r*ro2r-ro1i*ro2i) + if (cplexsum==2) sum2(i3r+1,ilm,3)=sum2(i3r+1,ilm,3)+fact*(ro1r*ro2i+ro1i*ro2r) + end if + end if + end do + end if + end do + do ilm1=2,lm_size + if (lmselect1(ilm1)) then + ro1r=rho1(i1r,ilm1);ro1i=zero;if (cplex1==2) ro1i=rho1(i1r+1,ilm1) + do ilm2=2,ilm1 + if (lmselect2(ilm2)) then + isel=pawang%gntselect(ilm,ilm2+ilm1*(ilm1-1)/2) + if (isel>0) then + fact=pawang%realgnt(isel) + ro2r=rho2(i2r,ilm2);ro2i=zero;if (cplex2==2) ro2i=rho2(i2r+1,ilm2) + sum2(i3r,ilm,2)=sum2(i3r,ilm,2)+fact*(ro1r*ro2r-ro1i*ro2i) + if (cplexsum==2) sum2(i3r+1,ilm,2)=sum2(i3r+1,ilm,2)+fact*(ro1r*ro2i+ro1i*ro2r) + end if + end if + end do + if (ilm10) then + fact=pawang%realgnt(isel) + ro2r=rho2(i2r,ilm2);ro2i=zero;if (cplex2==2) ro2i=rho2(i2r+1,ilm2) + sum2(i3r,ilm,2)=sum2(i3r,ilm,2)+fact*(ro1r*ro2r-ro1i*ro2i) + if (cplexsum==2) sum2(i3r+1,ilm,2)=sum2(i3r+1,ilm,2)+fact*(ro1r*ro2i+ro1i*ro2r) + end if + end if + end do + end if + end if + end do + end do + end do + end if ! nsums + + end if ! cplex + + end if !option + + end subroutine pawxcsum +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawxc/pawxcm +!! NAME +!! pawxcm +!! +!! FUNCTION +!! Start from the density or spin-density, and compute xc correlation +!! potential and energies inside a paw sphere. +!! LDA+GGA - USE A DEVELOPMENT OF THE DENSITY OVER (L,M) MOMENTS +!! Driver of XC functionals. +!! +!! INPUTS +!! corexc(nrad)=core density on radial grid +!! exexch= choice of <<>> exact exchange. Active if exexch=3 (only for PBE) +!! ixc= choice of exchange-correlation scheme +!! lm_size=size of density array rhor (see below) +!! lmselect(lm_size)=select the non-zero LM-moments of input density rhor +!! nhat(nrad,lm_size,nspden)=compensation density +!! (total in 1st half and spin-up in 2nd half if nspden=2) +!! nkxc=second dimension of the kxc array. If /=0, the exchange-correlation kernel must be computed +!! non_magnetic_xc= if true, handle density/potential as non-magnetic (even if it is) +!! nrad=size of radial mesh for densities/potentials (might be different from pawrad%mesh_size) +!! nspden=number of spin-density components +!! option=0 compute both XC energies (direct+double-counting) and potential (and Kernel) +!! 1 compute only XC potential (and Kernel) +!! 2 compute only XC energies (direct+double-counting) +!! 3 compute only XC energy by direct scheme +!! 4 compute only XC energy by direct scheme for spherical part of the density +!! 5 compute only XC potential (and Kernel) for spherical part of the density +!! pawang =paw angular mesh and related data +!! pawrad =paw radial mesh and related data +!! pawxcdev=order of Vxc development +!! rhor(nrad,lm_size,nspden)=electron density in real space in electrons/bohr**3 +!! (total in 1st half and spin-up in 2nd half if nspden=2) +!! usecore= 1 if core density has to be used in Exc/Vxc ; 0 otherwise +!! usexcnhat= 0 if compensation density does not have to be used +!! 1 if compensation density has to be used in double counting energy term only +!! 2 if compensation density (nhat) has to be used in Exc/Vxc and double counting energy term +!! xclevel= XC functional level +!! xc_denpos= lowest allowed density (usually for the computation of the XC functionals) +!! +!! OUTPUT +!! == if option==0, 2, 3, or 4 == +!! enxc=returned exchange and correlation energy (hartree) +!! == if option==0 or 2 == +!! enxcdc=returned exchange-cor. contribution to double-counting energy +!! == if option==0 or 1 == +!! vxc(nrad,lm_size,nspden)=xc potential +!! (spin up in 1st half and spin-down in 2nd half if nspden=2) +!! == if nkxc>0 == +!! kxc(nrad,lm_size,nkxc)=xc kernel (see notes below for nkxc) +!! == For the TB09 XC functional (modified Becke-Johnson) +!! [grho1_over_rho1]=Integral of |Grad(rho^1)|/rho^1 over the augmentation region +!! Used to compute the c parameter of the TB09 XC functional +!! WARNING: NOT YET IMPLEMENTED! +!! +!! NOTES +!! Content of Kxc array: +!! ===== if LDA +!! if nspden==1: kxc(:,1)= d2Exc/drho2 +!! (kxc(:,2)= d2Exc/drho_up drho_dn) +!! if nspden>=2: kxc(:,1)= d2Exc/drho_up drho_up +!! kxc(:,2)= d2Exc/drho_up drho_dn +!! kxc(:,3)= d2Exc/drho_dn drho_dn +!! if nspden==4: kxc(:,4:6)= (m_x, m_y, m_z) (magnetization) +!! ===== if GGA +!! if nspden==1: +!! kxc(:,1)= d2Exc/drho2 +!! kxc(:,2)= 1/|grad(rho)| dExc/d|grad(rho)| +!! kxc(:,3)= 1/|grad(rho)| d2Exc/d|grad(rho)| drho +!! kxc(:,4)= 1/|grad(rho)| * d/d|grad(rho)| ( 1/|grad(rho)| dExc/d|grad(rho)| ) +!! kxc(:,5)= gradx(rho) +!! kxc(:,6)= grady(rho) +!! kxc(:,7)= gradz(rho) +!! if nspden>=2: +!! kxc(:,1)= d2Exc/drho_up drho_up +!! kxc(:,2)= d2Exc/drho_up drho_dn +!! kxc(:,3)= d2Exc/drho_dn drho_dn +!! kxc(:,4)= 1/|grad(rho_up)| dEx/d|grad(rho_up)| +!! kxc(:,5)= 1/|grad(rho_dn)| dEx/d|grad(rho_dn)| +!! kxc(:,6)= 1/|grad(rho_up)| d2Ex/d|grad(rho_up)| drho_up +!! kxc(:,7)= 1/|grad(rho_dn)| d2Ex/d|grad(rho_dn)| drho_dn +!! kxc(:,8)= 1/|grad(rho_up)| * d/d|grad(rho_up)| ( 1/|grad(rho_up)| dEx/d|grad(rho_up)| ) +!! kxc(:,9)= 1/|grad(rho_dn)| * d/d|grad(rho_dn)| ( 1/|grad(rho_dn)| dEx/d|grad(rho_dn)| ) +!! kxc(:,10)=1/|grad(rho)| dEc/d|grad(rho)| +!! kxc(:,11)=1/|grad(rho)| d2Ec/d|grad(rho)| drho_up +!! kxc(:,12)=1/|grad(rho)| d2Ec/d|grad(rho)| drho_dn +!! kxc(:,13)=1/|grad(rho)| * d/d|grad(rho)| ( 1/|grad(rho)| dEc/d|grad(rho)| ) +!! kxc(:,14)=gradx(rho_up) +!! kxc(:,15)=gradx(rho_dn) +!! kxc(:,16)=grady(rho_up) +!! kxc(:,17)=grady(rho_dn) +!! kxc(:,18)=gradz(rho_up) +!! kxc(:,19)=gradz(rho_dn) +!! if nspden==4: +!! kxc(:,20:22)= (m_x, m_y, m_z) (magnetization) +!! +!! SOURCE + + subroutine pawxcm(corexc,enxc,enxcdc,exexch,hyb_mixing,ixc,kxc,lm_size,lmselect,nhat,nkxc,& +& non_magnetic_xc,nrad,nspden,option,pawang,pawrad,pawxcdev,rhor,& +& usecore,usexcnhat,vxc,xclevel,xc_denpos,grho1_over_rho1) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: exexch,ixc,lm_size,nkxc,nrad,nspden,option,pawxcdev,usecore + integer,intent(in) :: usexcnhat,xclevel + logical,intent(in) :: non_magnetic_xc + real(dp),intent(in) :: hyb_mixing,xc_denpos + real(dp),intent(out) :: enxc,enxcdc + real(dp),intent(out),optional :: grho1_over_rho1 + type(pawang_type),intent(in) :: pawang + type(pawrad_type),intent(in) :: pawrad +!arrays + logical,intent(in) :: lmselect(lm_size) + real(dp),intent(in) :: corexc(nrad) + real(dp),intent(in) :: nhat(nrad,lm_size,nspden*((usexcnhat+1)/2)) + real(dp),intent(in) :: rhor(nrad,lm_size,nspden) + real(dp),intent(out) :: kxc(nrad,lm_size,nkxc) + real(dp),intent(out) :: vxc(nrad,lm_size,nspden) + +!Local variables------------------------------- +!scalars + integer :: ilm,ir,ir1,ir2,ispden,iwarn,jr,nspden_updn,nsums + real(dp),parameter :: delta=1.d-4 + real(dp) :: dvxc1,dvxc2,dvxc3,dvxc4,dvxca,dvxcb,dvxcc,dvxcd + real(dp) :: fact,invsqfpi,invsqfpi2,sqfpi,sqfpi2,tol_rho + character(len=500) :: msg +!arrays + real(dp),allocatable :: d1kxc(:,:),d2kxc(:,:),d1vxc(:,:),d2vxc(:,:) + real(dp),allocatable :: exc_(:),exci(:),ff(:),gg(:) + real(dp),allocatable :: kxc1(:,:),kxc2(:,:),kxcdn1(:,:),kxcdn2(:,:),kxci(:,:) + real(dp),allocatable :: m_norm_inv(:),rho_(:,:),rhoinv(:,:),rhosph(:,:) + real(dp),allocatable :: v1sum(:,:),v2sum(:,:,:) + real(dp),allocatable :: vxc1(:,:),vxc2(:,:),vxcdn1(:,:),vxcdn2(:,:),vxci(:,:) + real(dp),allocatable,target :: rho_nc(:,:),rho_updn(:,:,:),vxc_diag(:,:),vxc_nc(:,:) + real(dp), LIBPAW_CONTIGUOUS pointer :: mag_nc(:,:),rho_dn(:,:),rho_up(:,:) + +!************************************************************************ + + if(nkxc>3) then + msg='Kxc not implemented for GGA! Use pawxcdev 0 ' + LIBPAW_ERROR(msg) + end if + if(nkxc>0.and.nspden==4) then + msg='Kxc not implemented for non-collinear magnetism!' + LIBPAW_ERROR(msg) + end if + if (option/=1.and.option/=5) then + if (nrad rho_updn(:,:,1) + rho_dn => rho_updn(:,:,nspden_updn) + +!rhoSPH contains the spherical part of effective density +!(including Y00 spherical harmonic) +!----------------------------------------------------------------- + LIBPAW_ALLOCATE(rhosph,(nrad,nspden_updn)) + +! Non-magnetic system: rhoSPH(;,1)=(1/2).rhoSPH_total + if (nspden==1) then + rhosph(:,1)=rho_updn(:,1,1)*invsqfpi2 + +! Collinear magnetism: rhoSPH = (rhoSPH_up, rhoSPH_dn) + else if (nspden==2) then + rhosph(:,1:2)=rho_updn(:,1,1:2)*invsqfpi + +! Non-collinear magnetism: rhoSPH = (rhoSPH_up, rhoSPH_dn) +! obtained by rotating rho_updn + else if (nspden==4) then + LIBPAW_ALLOCATE(m_norm_inv,(nrad)) + LIBPAW_ALLOCATE(rho_nc,(nrad,nspden)) + do ispden=1,nspden + rho_nc(1:nrad,ispden)=rho_updn(1:nrad,1,ispden)*invsqfpi + end do + mag_nc => rho_nc(:,2:4) + call pawxc_rotate_mag(rho_nc,rhosph,mag_nc,nrad,mag_norm_out=m_norm_inv) + do ir=1,nrad + m_norm_inv(ir)=merge(invsqfpi/m_norm_inv(ir),zero,m_norm_inv(ir)>rho_min) + end do + end if + +!Make spherical density positive + call pawxc_mkdenpos_wrapper(iwarn,nrad,nspden_updn,0,rhosph,xc_denpos) + +!---------------------------------------------------------------------- +!----- Compute Exc(rhoSPH) and Vxc(rhoSPH) +!---------------------------------------------------------------------- + + LIBPAW_ALLOCATE(exci,(nrad)) + LIBPAW_ALLOCATE(vxci,(nrad,nspden_updn)) + LIBPAW_ALLOCATE(kxci,(nrad,nkxc)) + call pawxcsph(exci,exexch,hyb_mixing,ixc,kxci,nkxc,nrad,nspden_updn,pawrad,rhosph,vxci,xclevel) + +!---------------------------------------------------------------------- +!----- Compute numerical derivatives of Vxc,Kxc (by finite diff. scheme) +!---------------------------------------------------------------------- + + if (option/=4.and.option/=5) then + LIBPAW_ALLOCATE(exc_,(nrad)) + LIBPAW_ALLOCATE(rho_,(nrad,nspden_updn)) + + if (nspden_updn==2) rho_(:,2)=rhosph(:,2) + +! Compute Exc, Vxc for rho+delta_rho + LIBPAW_ALLOCATE(vxc1,(nrad,nspden_updn)) + LIBPAW_ALLOCATE(kxc1,(nrad,nkxc)) + rho_(:,1)=(one+delta)*rhosph(:,1) + call pawxcsph(exc_,exexch,hyb_mixing,ixc,kxc1,nkxc,nrad,nspden_updn,pawrad,rho_,vxc1,xclevel) + +! Compute Exc, Vxc for rho-delta_rho + LIBPAW_ALLOCATE(vxc2,(nrad,nspden_updn)) + LIBPAW_ALLOCATE(kxc2,(nrad,nkxc)) + rho_(:,1)=(one-delta)*rhosph(:,1) + call pawxcsph(exc_,exexch,hyb_mixing,ixc,kxc2,nkxc,nrad,nspden_updn,pawrad,rho_,vxc2,xclevel) + +! Additional terms for spin-polarized systems + if (nspden_updn==2) then + rho_(:,1)=rhosph(:,1) + +! Compute Exc, Vxc for rho+delta_rho_down + LIBPAW_ALLOCATE(vxcdn1,(nrad,nspden_updn)) + LIBPAW_ALLOCATE(kxcdn1,(nrad,nkxc)) + rho_(:,2)=(one+delta)*rhosph(:,2) + call pawxcsph(exc_,exexch,hyb_mixing,ixc,kxcdn1,nkxc,nrad,nspden_updn,pawrad,rho_,vxcdn1,xclevel) + +! Compute Exc, Vxc for rho-delta_rho_down + LIBPAW_ALLOCATE(vxcdn2,(nrad,nspden_updn)) + LIBPAW_ALLOCATE(kxcdn2,(nrad,nkxc)) + rho_(:,2)=(one-delta)*rhosph(:,2) + call pawxcsph(exc_,exexch,hyb_mixing,ixc,kxcdn2,nkxc,nrad,nspden_updn,pawrad,rho_,vxcdn2,xclevel) + + end if !nspden_updn==2 + LIBPAW_DEALLOCATE(exc_) + LIBPAW_DEALLOCATE(rho_) + +! Store inverse of density finite step + LIBPAW_ALLOCATE(rhoinv,(nrad,nspden_updn)) + fact=one/delta;if (nspden_updn==1) fact=half*fact + do ispden=1,nspden_updn + do ir=1,nrad + if (rhosph(ir,ispden)>rho_min) then + rhoinv(ir,ispden)=fact/rhosph(ir,ispden) + else + rhoinv(ir,ispden)=zero + end if + end do + end do + +! Compute numerical first derivatives of Vxc (by finite difference scheme) + LIBPAW_ALLOCATE(d1vxc,(nrad,2*nspden_updn-1)) +! Non-magnetic system: compute dVxc/dn + if (nspden==1) then + d1vxc(1:nrad,1)=(vxc1(1:nrad,1)-vxc2(1:nrad,1))*half*rhoinv(1:nrad,1) +! Collinear magnetism: compute dVxc_up/dn_up,dVxc_dn/dn_up,dVxc_dn/dn_dn + else if (nspden==2) then + d1vxc(1:nrad,1)=(vxc1(1:nrad,1)-vxc2(1:nrad,1))*half*rhoinv(1:nrad,1) + d1vxc(1:nrad,2)=(vxc1(1:nrad,2)-vxc2(1:nrad,2))*half*rhoinv(1:nrad,1) + d1vxc(1:nrad,3)=(vxcdn1(1:nrad,2)-vxcdn2(1:nrad,2))*half*rhoinv(1:nrad,2) +! Non-collinear magnetism: compute 1/2 d(Vxc_up+Vxc_dn)/dn,1/2 d(Vxc_up-Vxc_dn)/dn +! 1/2 d(Vxc_up-Vxc_dn)/dm + else if (nspden==4) then + do ir=1,nrad + fact=half*rhoinv(ir,1) + dvxc1=(vxc1 (ir,1)-vxc2 (ir,1))*fact !dVxc_up/dn_up + dvxc2=(vxc1 (ir,2)-vxc2 (ir,2))*fact !dVxc_dn/dn_up + fact=half*rhoinv(ir,2) + dvxc3=(vxcdn1(ir,2)-vxcdn2(ir,2))*fact !dVxc_dn/dn_dn + dvxca=dvxc1+dvxc3;dvxcb=dvxc1-dvxc3;dvxcc=two*dvxc2 !Temporary terms + d1vxc(ir,1)=quarter*(dvxca+dvxcc) ! 1/2 d(Vxc_up+Vxc_dn)/dn + d1vxc(ir,2)=quarter* dvxcb ! 1/2 d(Vxc_up-Vxc_dn)/dn + d1vxc(ir,3)=quarter*(dvxca-dvxcc) ! 1/2 d(Vxc_up-Vxc_dn)/dm + end do + end if + +! Compute numerical second derivatives of Vxc (by finite difference scheme) + if (option/=3.or.pawxcdev>=2) then + LIBPAW_ALLOCATE(d2vxc,(nrad,3*nspden_updn-2)) +! Non-magnetic system: compute d2Vxc/dn2 + if (nspden==1) then + d2vxc(1:nrad,1)=(vxc1(1:nrad,1)+vxc2(1:nrad,1)-two*vxci(1:nrad,1))*rhoinv(1:nrad,1)**2 +! Collinear magnetism: compute d2Vxc_up/dn_up2,d2Vxc_dn/dn_up2,d2Vxc_up/dn_dn2,d2Vxc_dn/dn_dn2 + else if (nspden==2) then + d2vxc(1:nrad,1)=(vxc1(1:nrad,1)+vxc2(1:nrad,1)-two*vxci(1:nrad,1))*rhoinv(1:nrad,1)**2 + d2vxc(1:nrad,2)=(vxc1(1:nrad,2)+vxc2(1:nrad,2)-two*vxci(1:nrad,2))*rhoinv(1:nrad,1)**2 + d2vxc(1:nrad,3)=(vxcdn1(1:nrad,1)+vxcdn2(1:nrad,1)-two*vxci(1:nrad,1))*rhoinv(1:nrad,2)**2 + d2vxc(1:nrad,4)=(vxcdn1(1:nrad,2)+vxcdn2(1:nrad,2)-two*vxci(1:nrad,2))*rhoinv(1:nrad,2)**2 +! Non-collinear magnetism: compute 1/2 d2(Vxc_up+Vxc_dn)/dn2,1/2 d2(Vxc_up-Vxc_dn)/dn2 +! 1/2 d2(Vxc_up+Vxc_dn)/dm2,1/2 d2(Vxc_up-Vxc_dn)/dm2 + else if (nspden==4) then + do ir=1,nrad + fact=rhoinv(ir,1)**2 + dvxc1=(vxc1 (ir,1)+vxc2 (ir,1)-two*vxci(ir,1))*fact !d2Vxc_up/dn_up2 + dvxc2=(vxc1 (ir,2)+vxc2 (ir,2)-two*vxci(ir,2))*fact !d2Vxc_dn/dn_up2 + fact=rhoinv(ir,2)**2 + dvxc3=(vxcdn1(ir,1)+vxcdn2(ir,1)-two*vxci(ir,1))*fact !d2Vxc_up/dn_dn2 + dvxc4=(vxcdn1(ir,2)+vxcdn2(ir,2)-two*vxci(ir,2))*fact !d2Vxc_dn/dn_dn2 + dvxca=dvxc1+dvxc4;dvxcb=dvxc1-dvxc4 !Temporary terms + dvxcc=dvxc2+dvxc3;dvxcd=dvxc2-dvxc3 !Temporary terms + d2vxc(ir,1)=(dvxca+three*dvxcc)/8._dp ! 1/2 d2(Vxc_up+Vxc_dn)/dn2 + d2vxc(ir,2)=(dvxcb+dvxcd)/8._dp ! 1/2 d2(Vxc_up-Vxc_dn)/dn2 + d2vxc(ir,3)=(dvxca-dvxcc)/8._dp ! 1/2 d2(Vxc_up+Vxc_dn)/dm2 + d2vxc(ir,4)=(dvxcb-three*dvxcd)/8._dp ! 1/2 d2(Vxc_up-Vxc_dn)/dm2 + end do + end if + end if + +! Compute numerical first and second derivatives of Kxc (by finite difference scheme) + if (nkxc>0) then +! Non-magnetic system: compute dKxc/dn, d2Kxc/dn2 + if (nspden==1) then + LIBPAW_ALLOCATE(d1kxc,(nrad,1)) + LIBPAW_ALLOCATE(d2kxc,(nrad,1)) + d1kxc(1:nrad,1)=(kxc1(1:nrad,1)-kxc2(1:nrad,1))*half*rhoinv(1:nrad,1) + d2kxc(1:nrad,1)=(kxc1(1:nrad,1)+kxc2(1:nrad,1)-two*kxci(1:nrad,1))*rhoinv(1:nrad,1)**2 +! Collinear magnetism: compute dKxc_upup/dn_up,dKxc_updn/dn_up,dKxc_updn/dn_dn,dKxc_dndn/dn_dn +! compute d2Kxc_upup/dn_up2,d2Kxc_updn/dn_up2,d2Kxc_upup/dn_dn2,d2Kxc_updn/dn_dn2,d2Kxc_dndn/dn_dn2 + else if (nspden==2) then + LIBPAW_ALLOCATE(d1kxc,(nrad,4)) + LIBPAW_ALLOCATE(d2kxc,(nrad,5)) + d1kxc(1:nrad,1)=(kxc1(1:nrad,1)-kxc2(1:nrad,1))*half*rhoinv(1:nrad,1) ! dKxc_upup/dn_up + d1kxc(1:nrad,2)=(kxc1(1:nrad,2)-kxc2(1:nrad,2))*half*rhoinv(1:nrad,1) ! dKxc_updn/dn_up + d1kxc(1:nrad,3)=(kxc1(1:nrad,3)-kxc2(1:nrad,3))*half*rhoinv(1:nrad,1) ! dKxc_dndn/dn_up + d1kxc(1:nrad,4)=(kxcdn1(1:nrad,3)-kxcdn2(1:nrad,3))*half*rhoinv(1:nrad,2) ! dKxc_dndn/dn_dn + d2kxc(1:nrad,1)=(kxc1(1:nrad,1)+kxc2(1:nrad,1)-two*kxci(1:nrad,1))*rhoinv(1:nrad,1)**2 ! d2Kxc_upup/dn_up2 + d2kxc(1:nrad,2)=(kxc1(1:nrad,2)+kxc2(1:nrad,2)-two*kxci(1:nrad,2))*rhoinv(1:nrad,1)**2 ! d2Kxc_updn/dn_up2 + d2kxc(1:nrad,3)=(kxcdn1(1:nrad,1)+kxcdn2(1:nrad,1)-two*kxci(1:nrad,1))*rhoinv(1:nrad,2)**2 ! d2Kxc_upup/dn_dn2 + d2kxc(1:nrad,4)=(kxcdn1(1:nrad,2)+kxcdn2(1:nrad,2)-two*kxci(1:nrad,2))*rhoinv(1:nrad,2)**2 ! d2Kxc_updn/dn_dn2 + d2kxc(1:nrad,5)=(kxcdn1(1:nrad,3)+kxcdn2(1:nrad,3)-two*kxci(1:nrad,3))*rhoinv(1:nrad,2)**2 ! d2Kxc_dndn/dn_dn2 + end if + end if + + LIBPAW_DEALLOCATE(rhoinv) + LIBPAW_DEALLOCATE(vxc1) + LIBPAW_DEALLOCATE(vxc2) + LIBPAW_DEALLOCATE(kxc1) + LIBPAW_DEALLOCATE(kxc2) + if (nspden_updn==2) then + LIBPAW_DEALLOCATE(vxcdn1) + LIBPAW_DEALLOCATE(vxcdn2) + LIBPAW_DEALLOCATE(kxcdn1) + LIBPAW_DEALLOCATE(kxcdn2) + end if + + end if ! (option/=4 and option/=5) + + LIBPAW_DEALLOCATE(rhosph) + +!If non-collinear magnetism, store 1/2(Vxc_up+Vxc_dn) and 1/2(Vxc_up-Vxc_dn) + if (nspden==4) then + vxci(:,1)=half*(vxci(:,1)+vxci(:,2)) + vxci(:,2)=vxci(:,1)-vxci(:,2) + end if + +!---------------------------------------------------------------------- +!----- Compute useful sums of densities +!---------------------------------------------------------------------- + + if (option/=4.and.option/=5) then + +! Non-collinear magnetism: replace rho_dn by (m_0.dot.m)/|m_0| + if (nspden==4) then + LIBPAW_POINTER_ALLOCATE(rho_dn,(nrad,lm_size)) + rho_dn(:,1)=zero + do ilm=2,lm_size + rho_dn(1:nrad,ilm)=m_norm_inv(1:nrad) & +& *(rho_updn(1:nrad,1,2)*rho_updn(1:nrad,ilm,2) & +& +rho_updn(1:nrad,1,3)*rho_updn(1:nrad,ilm,3) & +& +rho_updn(1:nrad,1,4)*rho_updn(1:nrad,ilm,4)) + end do + end if + +! Non-magnetic system: +! Compute +! V1SUM1(r)=Sum_L{n_L(r)^2} +! V2SUM1(r,L)=Sum_L1_L2{n_L1(r)*n_L2(r)*Gaunt_(L,L1,L2)} +! Collinear magnetism: +! Compute +! V1SUM1(r)=Sum_L{n^up_L(r)^2} +! V1SUM2(r)=Sum_L{n^up_L(r)*n^dn_L(r)} +! V1SUM3(r)=Sum_L{n^dn_L(r)^2} +! V2SUM1(r,L)=Sum_L1_L2{n^up_L1(r)*n^up_L2(r)*Gaunt_(L,L1,L2)} +! V2SUM2(r,L)=Sum_L1_L2{n^up_L1(r)*n^dn_L2(r)*Gaunt_(L,L1,L2)} +! V2SUM3(r,L)=Sum_L1_L2{n^dn_L1(r)*n^dn_L2(r)*Gaunt_(L,L1,L2)} +! Non-collinear magnetism: +! Compute +! V1SUM1(r)=Sum_L{n_L(r)^2} +! V1SUM2(r)=Sum_L{n_L(r) (m_0.m_L)}/|m_0| +! V1SUM3(r)=Sum_L{(m_0.m_L)^2}/|m_0|^2 +! V2SUM1(r,L)=Sum_L1_L2{n_L1(r)*n_L2(r)*Gaunt_(L,L1,L2)} +! V2SUM2(r,L)=Sum_L1_L2{n_L1(r) (m_0.m_L2)*Gaunt_(L,L1,L2)}/|m_0| +! V2SUM3(r,L)=Sum_L1_L2{(m_0.m_L1)*(m_0.m_L2)*Gaunt_(L,L1,L2)}/|m_0|^2 + if (pawxcdev>=1) then + LIBPAW_ALLOCATE(v1sum,(nrad,nsums)) + else + LIBPAW_ALLOCATE(v1sum,(0,0)) + end if + if (pawxcdev>=2) then + LIBPAW_ALLOCATE(v2sum,(nrad,lm_size,nsums)) + else + LIBPAW_ALLOCATE(v2sum,(0,0,0)) + end if + call pawxcsum(1,1,1,lmselect,lmselect,lm_size,nrad,nsums,pawxcdev,pawang,& +& rho_up,rho_dn,v1sum,v2sum) + + end if !option + +!---------------------------------------------------------------------- +!----- Accumulate and store XC potential +!---------------------------------------------------------------------- + + if (option/=3.and.option/=4) then + +! === First order development +! --------------------------- + if (pawxcdev>=1) then + +! Non-magnetic system + if (nspden_updn==1) then + vxc(1:nrad,1,1)=vxci(1:nrad,1)*sqfpi + if (option/=5) then + vxc(1:nrad,1,1)=vxc(1:nrad,1,1)+v1sum(1:nrad,1)*d2vxc(1:nrad,1)*invsqfpi2 + do ilm=2,lm_size + if (lmselect(ilm)) then + vxc(1:nrad,ilm,1)=d1vxc(1:nrad,1)*rho_up(1:nrad,ilm) + end if + end do + end if + +! Magnetic system (including non-collinear magn.) + else if (nspden_updn==2) then + vxc(1:nrad,1,1)=vxci(1:nrad,1)*sqfpi + vxc(1:nrad,1,2)=vxci(1:nrad,2)*sqfpi + if (option/=5) then + vxc(1:nrad,1,1)=vxc(1:nrad,1,1)+invsqfpi2*(v1sum(1:nrad,1)*d2vxc(1:nrad,1) & +& +two*v1sum(1:nrad,2)*d2vxc(1:nrad,2)+v1sum(1:nrad,3)*d2vxc(1:nrad,3)) + vxc(1:nrad,1,2)=vxc(1:nrad,1,2)+invsqfpi2*(v1sum(1:nrad,1)*d2vxc(1:nrad,2) & +& +two*v1sum(1:nrad,2)*d2vxc(1:nrad,3)+v1sum(1:nrad,3)*d2vxc(1:nrad,4)) + do ilm=2,lm_size + if (lmselect(ilm)) then + vxc(1:nrad,ilm,1)=vxc(1:nrad,ilm,1) & +& +d1vxc(1:nrad,1)*rho_up(1:nrad,ilm)+d1vxc(1:nrad,2)*rho_dn(1:nrad,ilm) + vxc(1:nrad,ilm,2)=vxc(1:nrad,ilm,2) & +& +d1vxc(1:nrad,2)*rho_up(1:nrad,ilm)+d1vxc(1:nrad,3)*rho_dn(1:nrad,ilm) + end if + end do + end if + end if + end if ! pawxcdev>=1 + +! == 2nd order development +! --------------------------- + if (pawxcdev>=2.and.option/=5) then + +! Non-magnetic system + if (nspden_updn==1) then + do ilm=2,lm_size + vxc(1:nrad,ilm,1)=vxc(1:nrad,ilm,1)+half*d2vxc(1:nrad,1)*v2sum(1:nrad,ilm,1) + end do + +! Magnetic system (including non-collinear magn.) + else if (nspden_updn==2) then + do ilm=2,lm_size + vxc(1:nrad,ilm,1)=vxc(1:nrad,ilm,1)+d2vxc(1:nrad,2)*v2sum(1:nrad,ilm,2) & +& +half*(d2vxc(1:nrad,1)*v2sum(1:nrad,ilm,1)+d2vxc(1:nrad,3)*v2sum(1:nrad,ilm,3)) + vxc(1:nrad,ilm,2)=vxc(1:nrad,ilm,2)+d2vxc(1:nrad,3)*v2sum(1:nrad,ilm,2) & +& +half*(d2vxc(1:nrad,2)*v2sum(1:nrad,ilm,1)+d2vxc(1:nrad,4)*v2sum(1:nrad,ilm,3)) + end do + end if + end if !pawxcdev=2 + +! === Pathological case: if rho(r) is negative, interpolate Vxc +! ------------------------------------------------------------- + if (lmselect(1)) then + tol_rho=xc_denpos*(one+tol6) + do ispden=1,nspden_updn + ir1=0;ir2=0 + do ir=1,nrad + if (rho_updn(ir,1,ispden)0) then + if (ir1>1.or.ir20) then + +! === First order development +! --------------------------- + if (pawxcdev>=1) then +! Non-magnetic system: + if (nspden_updn==1) then + kxc(1:nrad,1,1)=kxci(1:nrad,1)*sqfpi + if (option/=5.and.option/=4) then + kxc(1:nrad,1,1)=kxc(1:nrad,1,1)+invsqfpi2*v1sum(1:nrad,1)*d2kxc(1:nrad,1) + do ilm=2,lm_size + if (lmselect(ilm)) then + kxc(1:nrad,ilm,1)=d1kxc(1:nrad,1)*rho_up(1:nrad,ilm) + end if + end do + end if +! Magnetic system: + else if (nspden==2) then + kxc(1:nrad,1,1)=kxci(1:nrad,1)*sqfpi + kxc(1:nrad,1,2)=kxci(1:nrad,2)*sqfpi + kxc(1:nrad,1,3)=kxci(1:nrad,3)*sqfpi + if (option/=5.and.option/=4) then + kxc(1:nrad,1,1)=kxc(1:nrad,1,1)+invsqfpi2*(v1sum(1:nrad,1)*d2kxc(1:nrad,1) & +& +two*v1sum(1:nrad,2)*d2kxc(1:nrad,2)+v1sum(1:nrad,3)*d2kxc(1:nrad,3)) + kxc(1:nrad,1,2)=kxc(1:nrad,1,2)+invsqfpi2*(v1sum(1:nrad,1)*d2kxc(1:nrad,2) & +& +two*v1sum(1:nrad,2)*d2kxc(1:nrad,3)+v1sum(1:nrad,3)*d2kxc(1:nrad,4)) + kxc(1:nrad,1,3)=kxc(1:nrad,1,3)+invsqfpi2*(v1sum(1:nrad,1)*d2kxc(1:nrad,3) & +& +two*v1sum(1:nrad,2)*d2kxc(1:nrad,4)+v1sum(1:nrad,3)*d2kxc(1:nrad,5)) + do ilm=2,lm_size + if (lmselect(ilm)) then + kxc(1:nrad,ilm,1)=kxc(1:nrad,ilm,1) & +& +d1kxc(1:nrad,1)*rho_up(1:nrad,ilm)+d1kxc(1:nrad,2)*rho_dn(1:nrad,ilm) + kxc(1:nrad,ilm,2)=kxc(1:nrad,ilm,2) & +& +d1kxc(1:nrad,2)*rho_up(1:nrad,ilm)+d1kxc(1:nrad,3)*rho_dn(1:nrad,ilm) + kxc(1:nrad,ilm,3)=kxc(1:nrad,ilm,3) & +& +d1kxc(1:nrad,3)*rho_up(1:nrad,ilm)+d1kxc(1:nrad,4)*rho_dn(1:nrad,ilm) + end if + end do + end if + end if + end if ! pawxcdev>=1 + +! == 2nd order development +! --------------------------- + if (pawxcdev>=2.and.option/=4.and.option/=5) then + +! Non-magnetic system: + if (nspden_updn==1) then + do ilm=2,lm_size + kxc(1:nrad,ilm,1)=kxc(1:nrad,ilm,1)+half*d2kxc(1:nrad,1)*v2sum(1:nrad,ilm,1) + end do +! Magnetic system: + else if (nspden==2) then + do ilm=2,lm_size + kxc(1:nrad,ilm,1)=kxc(1:nrad,ilm,1)+d2kxc(1:nrad,2)*v2sum(1:nrad,ilm,2) & +& +half*(d2kxc(1:nrad,1)*v2sum(1:nrad,ilm,1)+d2kxc(1:nrad,3)*v2sum(1:nrad,ilm,3)) + kxc(1:nrad,ilm,2)=kxc(1:nrad,ilm,2)+d2kxc(1:nrad,3)*v2sum(1:nrad,ilm,2) & +& +half*(d2kxc(1:nrad,2)*v2sum(1:nrad,ilm,1)+d2kxc(1:nrad,4)*v2sum(1:nrad,ilm,3)) + kxc(1:nrad,ilm,3)=kxc(1:nrad,ilm,3)+d2kxc(1:nrad,4)*v2sum(1:nrad,ilm,2) & +& +half*(d2kxc(1:nrad,3)*v2sum(1:nrad,ilm,1)+d2kxc(1:nrad,5)*v2sum(1:nrad,ilm,3)) + end do + end if + end if !pawxcdev=2 + +! === Pathological case: if rho(r) is negative, interpolate Kxc +! ------------------------------------------------------------- + +! NOT OK for spin polarized + if (lmselect(1)) then + tol_rho=xc_denpos*(one+tol6) + do ispden=1,nspden_updn + ir1=0;ir2=0 + do ir=1,nrad + if (rho_updn(ir,1,ispden)0) then + if (ir1>1.or.ir20 + + if (nspden==4) then + LIBPAW_DEALLOCATE(rho_nc) + LIBPAW_DEALLOCATE(m_norm_inv) + end if + + LIBPAW_DEALLOCATE(kxci) + if (nkxc>0.and.option/=4.and.option/=5) then + LIBPAW_DEALLOCATE(d1kxc) + LIBPAW_DEALLOCATE(d2kxc) + end if + +!---------------------------------------------------------------------- +!----- Accumulate and store XC energies +!---------------------------------------------------------------------- + +!----- Calculate Exc (direct scheme) term +!---------------------------------------- + if (option/=1.and.option/=5) then + LIBPAW_ALLOCATE(ff,(nrad)) + +! Contribution from spherical part of rho + if (nspden==1.or.nspden==4) then + ff(1:nrad)=rho_updn(1:nrad,1,1)*exci(1:nrad)*sqfpi + else if (nspden==2) then + ff(1:nrad)=(rho_updn(1:nrad,1,1)+rho_updn(1:nrad,1,2))*exci(1:nrad)*sqfpi + end if + +! Contribution from aspherical part of rho + if (option/=4) then + +! First order development + if (pawxcdev>=1) then + if (nspden_updn==1) then + ff(1:nrad)=ff(1:nrad)+half*v1sum(1:nrad,1)*d1vxc(1:nrad,1) + else if (nspden_updn==2) then + ff(1:nrad)=ff(1:nrad)+v1sum(1:nrad,2)*d1vxc(1:nrad,2) & +& +half*(v1sum(1:nrad,1)*d1vxc(1:nrad,1)+v1sum(1:nrad,3)*d1vxc(1:nrad,3)) + end if + end if + +! Second order development + if (pawxcdev>=2) then + LIBPAW_ALLOCATE(gg,(nrad)) + + gg=zero + do ilm=2,lm_size + if (lmselect(ilm)) then + gg(1:nrad)=gg(1:nrad)+v2sum(1:nrad,ilm,1)*rho_up(1:nrad,ilm) + end if + end do + ff(1:nrad)=ff(1:nrad)+gg(1:nrad)*d2vxc(1:nrad,1)/6._dp + + if (nspden_updn==2) then ! Spin polarized (including non-coll. magn.) + gg=zero + do ilm=2,lm_size + if (lmselect(ilm)) then + gg(1:nrad)=gg(1:nrad)+v2sum(1:nrad,ilm,3)*rho_dn(1:nrad,ilm) + end if + end do + ff(1:nrad)=ff(1:nrad)+gg(1:nrad)*d2vxc(1:nrad,4)/6._dp + gg=zero + do ilm=2,lm_size + if (lmselect(ilm)) then + gg(1:nrad)=gg(1:nrad)+v2sum(1:nrad,ilm,2)*rho_up(1:nrad,ilm) + end if + end do + ff(1:nrad)=ff(1:nrad)+half*gg(1:nrad)*d2vxc(1:nrad,2) + gg=zero + do ilm=2,lm_size + if (lmselect(ilm)) then + gg(1:nrad)=gg(1:nrad)+v2sum(1:nrad,ilm,3)*rho_up(1:nrad,ilm) + end if + end do + ff(1:nrad)=ff(1:nrad)+half*gg(1:nrad)*d2vxc(1:nrad,3) + end if + LIBPAW_DEALLOCATE(gg) + end if + + end if ! option/=4 + + ff(1:nrad)=ff(1:nrad)*pawrad%rad(1:nrad)**2 + call simp_gen(enxc,ff,pawrad) + LIBPAW_DEALLOCATE(ff) + end if ! option/=1 and option/=5 + + LIBPAW_DEALLOCATE(exci) + LIBPAW_DEALLOCATE(vxci) + if (nspden==4.and.option/=4.and.option/=5) then + LIBPAW_POINTER_DEALLOCATE(rho_dn) + end if + if (allocated(v1sum)) then + LIBPAW_DEALLOCATE(v1sum) + end if + if (allocated(v2sum)) then + LIBPAW_DEALLOCATE(v2sum) + end if + if (allocated(d1vxc)) then + LIBPAW_DEALLOCATE(d1vxc) + end if + if (allocated(d2vxc)) then + LIBPAW_DEALLOCATE(d2vxc) + end if + +!----- Calculate Excdc double counting term +!------------------------------------------ + if (option==0.or.option==2) then + + LIBPAW_ALLOCATE(ff,(nrad)) + +! Build appropriate density (without core density) + rho_updn(:,:,:)=rhor(:,:,:) + if (usexcnhat>0) rho_updn(:,:,:)=rho_updn(:,:,:)+nhat(:,:,:) + if (nspden==2) then + do ilm=1,lm_size + ff(:)=rho_updn(:,ilm,2) + rho_updn(:,ilm,2)=rho_updn(:,ilm,1)-ff(:) + rho_updn(:,ilm,1)=ff(:) + end do + end if + + ff(1:nrad)=zero + +! Non magnetic or collinear magnetic system: + if (nspden/=4) then + do ispden=1,nspden_updn + do ilm=1,lm_size + if (lmselect(ilm)) ff(1:nrad)=ff(1:nrad)+vxc(1:nrad,ilm,ispden)*rho_updn(1:nrad,ilm,ispden) + end do + end do + else +! Non-collinear magnetic system: + do ilm=1,lm_size + if (lmselect(ilm)) then + do ir=1,nrad + dvxca=vxc(ir,ilm,1)+vxc(ir,ilm,2);dvxcb=vxc(ir,ilm,1)-vxc(ir,ilm,2) + ff(ir)=ff(ir)+half*(dvxca*rho_updn(ir,ilm,1)+dvxcb*rho_updn(ir,ilm,4)) & +& +vxc(ir,ilm,3)*rho_updn(ir,ilm,2)-vxc(ir,ilm,4)*rho_updn(ir,ilm,3) + end do + end if + end do + end if + + ff(1:nrad)=ff(1:nrad)*pawrad%rad(1:nrad)**2 + call simp_gen(enxcdc,ff,pawrad) + LIBPAW_DEALLOCATE(ff) + + end if ! option + + LIBPAW_DEALLOCATE(rho_updn) + + end subroutine pawxcm +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawxc/pawxcm_dfpt +!! NAME +!! pawxcm_dfpt +!! +!! FUNCTION +!! Compute first-order change of XC potential and contribution to +!! 2nd-order change of XC energy inside a PAW sphere. +!! LDA+GGA - USE A DEVELOPMENT OF THE DENSITY OVER (L,M) MOMENTS +!! +!! INPUTS +!! corexc1(cplex_den*nrad)=first-order change of core density on radial grid +!! cplex_den= if 1, 1st-order densities are REAL, if 2, COMPLEX +!! cplex_vxc= if 1, 1st-order XC potential is complex, if 2, COMPLEX +!! ixc= choice of exchange-correlation scheme +!! kxc(nrad,lm_size,nkxc)=GS xc kernel +!! lm_size=size of density array rhor (see below) +!! lmselect(lm_size)=select the non-zero LM-moments of input density rhor1 +!! nhat1(cplex_den*nrad,lm_size,nspden)=first-order change of compensation density +!! (total in 1st half and spin-up in 2nd half if nspden=2) +!! nkxc=second dimension of the kxc array +!! non_magnetic_xc= if true, handle density/potential as non-magnetic (even if it is) +!! nrad=size of radial mesh for densities/potentials (might be different from pawrad%mesh_size) +!! nspden=number of spin-density components +!! option=0 compute both 2nd-order XC energy and 1st-order potential +!! 1 compute only 1st-order XC potential +!! 2 compute only 2nd-order XC energy, XC potential is temporary computed here +!! 3 compute only 2nd-order XC energy, XC potential is input in vxc1(:) +!! pawang =paw angular mesh and related data +!! pawrad =paw radial mesh and related data +!! rhor1(cplex_den*nrad,lm_size,nspden)=first-order change of density +!! usecore= 1 if core density has to be used in Exc/Vxc ; 0 otherwise +!! usexcnhat= 0 if compensation density does not have to be used +!! 1 if compensation density has to be used in d2Exc only +!! 2 if compensation density (nhat) has to be used in d2Exc and Vxc1 +!! xclevel= XC functional level +!! +!! OUTPUT +!! == if option=0 or 2 or 3 ==rho1_updn +!! d2enxc=returned exchange-cor. contribution to 2nd-order XC energy +!! +!! SIDE EFFECTS +!! vxc1(cplex_vxc*nrad,pawang%angl_size,nspden)=1st-order XC potential +!! Output if option==0 or 1 +!! Unused if option==2 +!! Input if option==3 +!! +!! SOURCE + + subroutine pawxcm_dfpt(corexc1,cplex_den,cplex_vxc,d2enxc,ixc,kxc,lm_size,lmselect,nhat1,& +& nkxc,non_magnetic_xc,nrad,nspden,option,pawang,pawrad,rhor1,usecore,& +& usexcnhat,vxc1,xclevel,& +& d2enxc_im) ! optional + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: cplex_den,cplex_vxc,ixc,lm_size,nkxc,nrad,nspden,option + integer,intent(in) :: usecore,usexcnhat,xclevel + logical,intent(in) :: non_magnetic_xc + real(dp),intent(out) :: d2enxc + real(dp),intent(out),optional :: d2enxc_im + type(pawang_type),intent(in) :: pawang + type(pawrad_type),intent(in) :: pawrad +!arrays + logical,intent(in) :: lmselect(lm_size) + real(dp),intent(in) :: corexc1(cplex_den*nrad) + real(dp),intent(in) :: kxc(nrad,lm_size,nkxc) + real(dp),intent(in) :: nhat1(cplex_den*nrad,lm_size,nspden*((usexcnhat+1)/2)) + real(dp),intent(in) :: rhor1(cplex_den*nrad,lm_size,nspden) + real(dp),intent(inout),target :: vxc1(cplex_vxc*nrad,lm_size,nspden) + +!Local variables------------------------------- +!scalars + integer :: ii,ilm,iplex,ir,ivxc,jr,kr,nkxc_cur + logical :: need_impart + real(dp) :: invsqfpi,ro1i,ro1r,sqfpi,sqfpi2,v1i,v1r,vxcrho + character(len=500) :: msg +!arrays + integer,parameter :: ikxc(4)=(/1,2,2,3/),irho(4)=(/1,2,1,2/) +! real(dp) :: tsec(2) + real(dp),allocatable :: ff(:),gg(:),rho1_updn(:,:,:) + real(dp),allocatable :: v1sum(:),v2sum(:,:) + real(dp),pointer :: vxc1_(:,:,:) + +!************************************************************************ + +!NOTE (MT) +!lmselect and lm_size are not necessarily the same for densities, kxc and vxc1 +!This is not taken into account for the moment, but has to be programmed... + +!---------------------------------------------------------------------- +!----- Check options +!---------------------------------------------------------------------- + + if(option<0.or.option>3) then + msg='wrong option!' + LIBPAW_BUG(msg) + end if + if(option/=3) then + call pawxc_get_nkxc(nkxc_cur,nspden,xclevel) + if(nkxc/=nkxc_cur) then + msg='Wrong size for kxc array!' + LIBPAW_BUG(msg) + end if + end if + if(nspden==4.and.option/=3) then + msg='nspden=4 not implemented (for vxc)!' + LIBPAW_ERROR(msg) + end if + if (option/=1) then + if (nrad vxc1 + end if + + if (option/=3) then + + vxc1_=zero + LIBPAW_ALLOCATE(v1sum,(cplex_vxc*nrad)) + LIBPAW_ALLOCATE(v2sum,(cplex_vxc*nrad,lm_size)) + + do ii=1,3*nspden-2 + ivxc=1;if (ii>2) ivxc=2 + +! === Vxc1 and Rho1 are REAL + if (cplex_vxc==1.and.cplex_den==1) then ! cplex_vxc==1 and cplex_den==1 + call pawxcsum(1,1,1,lmselect,lmselect,lm_size,nrad,1,2,pawang,& +& kxc(:,:,ikxc(ii)),rho1_updn(:,:,irho(ii)),v1sum,v2sum) + vxc1_(:,1,ivxc)=vxc1_(:,1,ivxc)+invsqfpi*(v1sum(:)+kxc(:,1,ikxc(ii))*rho1_updn(:,1,irho(ii))) + do ilm=2,lm_size + vxc1_(:,ilm,ivxc)=vxc1_(:,ilm,ivxc)+v2sum(:,ilm) & +& +invsqfpi*(kxc(:,ilm,ikxc(ii))*rho1_updn(:,1 ,irho(ii)) & +& +kxc(:,1 ,ikxc(ii))*rho1_updn(:,ilm,irho(ii))) + end do + +! === At least one of Vxc1 or Rho1 is COMPLEX + else + call pawxcsum(1,cplex_den,cplex_vxc,lmselect,lmselect,lm_size,nrad,1,2,pawang,& +& kxc(:,:,ikxc(ii)),rho1_updn(:,:,irho(ii)),v1sum,v2sum) + do ir=1,nrad + jr=cplex_den*(ir-1);kr=cplex_vxc*(ir-1) + do iplex=1,1+(cplex_den*cplex_vxc)/4 + jr=jr+1;kr=kr+1 + vxc1_(kr,1,ivxc)=vxc1_(kr,1,ivxc)+invsqfpi*(v1sum(kr)+kxc(ir,1,ikxc(ii))*rho1_updn(jr,1,irho(ii))) + do ilm=2,lm_size + vxc1_(kr,ilm,ivxc)=vxc1_(kr,ilm,ivxc)+v2sum(kr,ilm) & +& +invsqfpi*(kxc(ir,ilm,ikxc(ii))*rho1_updn(jr,1 ,irho(ii)) & +& +kxc(ir,1 ,ikxc(ii))*rho1_updn(jr,ilm,irho(ii))) + end do + end do + end do + + end if ! cplex_den and vxc_den + end do ! ii=1,3*nspden-2 + + LIBPAW_DEALLOCATE(v1sum) + LIBPAW_DEALLOCATE(v2sum) + + end if + +!---------------------------------------------------------------------- +!----- Accumulate and store 2nd-order change of XC energy +!---------------------------------------------------------------------- + if (option/=1) then + + if (.not.non_magnetic_xc) then +! For usexnhat=1 particular case, add now compensation density + if (usexcnhat==1) then + rho1_updn(:,:,1)=rho1_updn(:,:,1)+nhat1(:,:,nspden) + if (nspden==2) rho1_updn(:,:,2)=rho1_updn(:,:,2)+nhat1(:,:,1)-nhat1(:,:,2) + end if + else +! Has to be magnetic here + rho1_updn(:,:,:)=rhor1(:,:,:) + if (usexcnhat>0) rho1_updn(:,:,:)=rho1_updn(:,:,:)+nhat1(:,:,:) + if (usecore==1) then + if (nspden==1.or.nspden==4) then + rho1_updn(:,1,1)=rho1_updn(:,1,1)+sqfpi*corexc1(:) + else if (nspden==2) then + rho1_updn(:,1,1)=rho1_updn(:,1,1)+sqfpi*corexc1(:) + rho1_updn(:,1,2)=rho1_updn(:,1,2)+sqfpi2*corexc1(:) + end if + end if + end if + + LIBPAW_ALLOCATE(ff,(nrad)) + ff=zero + if (need_impart) then + LIBPAW_ALLOCATE(gg,(nrad)) + gg=zero + end if + +! ----- Calculate d2Exc=Int[Vxc^(1)^*(r).n^(1)(r).dr] + do ii=1,nspden +! === Vxc1 and Rho1 are REAL + if (cplex_vxc==1.and.cplex_den==1) then + do ilm=1,lm_size + if (lmselect(ilm)) ff(:)=ff(:)+vxc1_(:,ilm,ii)*rho1_updn(:,ilm,ii) + end do +! === Vxc1 and Rho1 are COMPLEX + else if (cplex_vxc==2.and.cplex_den==2) then ! cplex_vxc==2 and cplex_den==2 + if (.not.need_impart) then ! Real part only + do ilm=1,lm_size + if (lmselect(ilm)) then + do ir=1,nrad + jr=2*ir;v1r=vxc1_(jr-1,ilm,ii);v1i=vxc1_(jr,ilm,ii) + ro1r=rho1_updn(jr-1,ilm,ii);ro1i=rho1_updn(jr,ilm,ii) + ff(ir)=ff(ir)+v1r*ro1r+v1i*ro1i + end do + end if + end do + else ! Real and imaginary parts + do ilm=1,lm_size + if (lmselect(ilm)) then + do ir=1,nrad + jr=2*ir;v1r=vxc1_(jr-1,ilm,ii);v1i=vxc1_(jr,ilm,ii) + ro1r=rho1_updn(jr-1,ilm,ii);ro1i=rho1_updn(jr,ilm,ii) + ff(ir)=ff(ir)+v1r*ro1r+v1i*ro1i + gg(ir)=gg(ir)+v1r*ro1i-v1i*ro1r + end do + end if + end do + end if ! need_impart +! === Vxc1 and Rho1 are REAL and COMPLEX + else + v1i=zero;ro1i=zero + do ilm=1,lm_size + if (lmselect(ilm)) then + do ir=1,nrad + jr=cplex_vxc*(ir-1)+1;v1r=vxc1_(jr,ilm,ii);;if(cplex_vxc==2)v1i=vxc1_(jr+1,ilm,ii) + jr=cplex_den*(ir-1)+1;ro1r=rho1_updn(jr,ilm,ii);if(cplex_den==2)ro1i=rho1_updn(jr+1,ilm,ii) + ff(ir)=ff(ir)+v1r*ro1r+v1i*ro1i + if (need_impart) gg(ir)=gg(ir)+v1r*ro1i-v1i*ro1r + end do + end if + end do + end if ! cplex_vxc and cplex_den + end do ! ii=1,nspden + + ff(1:nrad)=ff(1:nrad)*pawrad%rad(1:nrad)**2 + call simp_gen(vxcrho,ff,pawrad) + d2enxc=d2enxc+vxcrho + LIBPAW_DEALLOCATE(ff) + + if (need_impart) then + gg(1:nrad)=gg(1:nrad)*pawrad%rad(1:nrad)**2 + call simp_gen(vxcrho,gg,pawrad) + d2enxc_im=d2enxc_im+vxcrho + LIBPAW_DEALLOCATE(gg) + end if + + end if + + LIBPAW_DEALLOCATE(rho1_updn) + if (option==2) then + LIBPAW_POINTER_DEALLOCATE(vxc1_) + end if + + end subroutine pawxcm_dfpt +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawxc/pawxcmpositron +!! NAME +!! pawxcmpositron +!! +!! FUNCTION +!! Compute electron-positron correlation potential and energies inside a PAW sphere +!! LDA+GGA - USE A DEVELOPMENT OF THE DENSITY OVER (L,M) MOMENTS +!! Driver of XC functionals. +!! +!! INPUTS +!! calctype=type of electron-positron calculation: +!! calctype=1 : positron in electronic density +!! calctype=2 : electrons in positronic density +!! corexc(nrad)=electron core density on radial grid +!! ixcpositron=choice of electron-positron XC scheme +!! lm_size=size of density array rhor (see below) +!! lmselect (lm_size)=select the non-zero LM-moments of input density rhor (see below) +!! lmselect_ep(lm_size)=select the non-zero LM-moments of input density rhor_ep (see below) +!! nhat (nrad,lm_size,nspden)=compensation density corresponding to rhor +!! nhat_ep(nrad,lm_size,nspden)=compensation density corresponding to rhor_ep +!! nrad=size of radial mesh for densities/potentials (might be different from pawrad%mesh_size) +!! nspden=number of spin-density components +!! option=0 compute both XC energies (direct+double-counting) and potential +!! 1 compute only XC potential +!! 2 compute only XC energies (direct+double-counting) +!! 3 compute only XC energy by direct scheme +!! 4 compute only XC energy by direct scheme for spherical part of the density +!! pawang =paw angular mesh and related data +!! pawrad =paw radial mesh and related data +!! pawxcdev=order of Vxc development +!! posdensity0_limit=True if we are in the zero positron density limit +!! rhor(nrad,lm_size,nspden)=electron (or positron) density in real space +!! (total in 1st half and spin-up in 2nd half if nspden=2) +!! Contents depends on calctype value: +!! calctype=1: rhor is the positronic density +!! calctype=2: rhor is the electronic density +!! rhor_ep(nrad,lm_size,nspden)=electron (or positron) density in real space +!! (total in 1st half and spin-up in 2nd half if nspden=2) +!! Contents depends on calctype value: +!! calctype=1: rhor_ep is the electronic density +!! calctype=2: rhor_ep is the positronic density +!! usecore= 1 if core density has to be used in Exc/Vxc for the electronic density ; 0 otherwise +!! usexcnhat= 0 if compensation density does not have to be used +!! 1 if compensation density has to be used in double counting energy term only +!! 2 if compensation density (nhat) has to be used in Exc/Vxc and double counting energy term +!! xc_denpos= lowest allowed density (usually for the computation of the XC functionals) +!! +!! OUTPUT +!! == if option==0, 2, 3, or 4 == +!! enxc=returned exchange and correlation energy (hartree) +!! == if option==0 or 2 == +!! enxcdc=returned exchange-cor. contribution to double-counting energy +!! == if option==0 or 1 == +!! vxc(nrad,lm_size,nspden)=xc potential +!! (spin up in 1st half and spin-down in 2nd half if nspden=2) +!! +!! NOTES +!! +!! SOURCE + +subroutine pawxcmpositron(calctype,corexc,enxc,enxcdc,ixcpositron,lm_size,lmselect,lmselect_ep,& +& nhat,nhat_ep,nrad,nspden,option,pawang,pawrad,pawxcdev,posdensity0_limit,& +& rhor,rhor_ep,usecore,usexcnhat,vxc,xc_denpos) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: calctype,ixcpositron,lm_size,nrad,nspden,option,pawxcdev,usecore + integer,intent(in) :: usexcnhat + logical,intent(in) :: posdensity0_limit + real(dp),intent(in) :: xc_denpos + real(dp),intent(out) :: enxc,enxcdc + type(pawang_type),intent(in) :: pawang + type(pawrad_type),intent(in) :: pawrad +!arrays + logical,intent(in) :: lmselect(lm_size),lmselect_ep(lm_size) + real(dp),intent(in) :: corexc(nrad) + real(dp),intent(in) :: nhat (nrad,lm_size,nspden*((usexcnhat+1)/2)) + real(dp),intent(in) :: nhat_ep(nrad,lm_size,nspden*((usexcnhat+1)/2)) + real(dp),intent(in) :: rhor (nrad,lm_size,nspden) + real(dp),intent(in) :: rhor_ep(nrad,lm_size,nspden) + real(dp),intent(out) :: vxc(nrad,lm_size,nspden) + +!Local variables------------------------------- +!scalars + integer :: ilm,ir,ir1,ir2,iwarn,iwarnp,jr + real(dp),parameter :: delta=1.d-4 + real(dp) :: fact,invsqfpi,sqfpi,rhomin + character(len=500) :: msg +!arrays + real(dp),allocatable :: d1vxc(:,:),d2vxc(:,:),fxc_(:),ff(:),fxci(:),gg(:) + real(dp),allocatable :: rho_(:),rhotot(:,:),rhotot_ep(:,:),rhoinv(:),rhoinv_ep(:) + real(dp),allocatable :: rhosph(:),rhosph_ep(:),v1sum(:,:),v2sum(:,:,:) + real(dp),allocatable :: vxce1(:),vxce1_ep(:),vxce2(:),vxce2_ep(:) + real(dp),allocatable :: vxcp1(:),vxcp1_ep(:),vxcp2(:),vxcp2_ep(:) + real(dp),allocatable :: vxcei(:),vxcpi(:) + +!************************************************************************ + +!----- Check options + if(calctype/=1.and.calctype/=2) then + msg='Invalid value for calctype' + LIBPAW_BUG(msg) + end if + if (option/=1) then + if (nradrho_min) then + rhoinv(ir)=fact/rhosph(ir) + else + rhoinv(ir)=zero + end if + if (rhosph_ep(ir)>rho_min) then + rhoinv_ep(ir)=fact/rhosph_ep(ir) + else + rhoinv_ep(ir)=zero + end if + end do + +! Compute numerical first derivatives of Vxc (by finite difference scheme) + LIBPAW_ALLOCATE(d1vxc,(nrad,3)) + if (calctype==1) then + d1vxc(:,1)=(vxcp1 (:)-vxcp2 (:))*half*rhoinv (:) ! dVxc+/drho+ + d1vxc(:,2)=(vxcp1_ep(:)-vxcp2_ep(:))*half*rhoinv_ep(:) ! dVxc+/drho- + d1vxc(:,3)=(vxce1_ep(:)-vxce2_ep(:))*half*rhoinv_ep(:) ! dVxc-/drho- + else if (calctype==2) then + d1vxc(:,1)=(vxce1 (:)-vxce2 (:))*half*rhoinv (:) ! dVxc-/drho- + d1vxc(:,2)=(vxcp1 (:)-vxcp2 (:))*half*rhoinv (:) ! dVxc+/drho- +! d1vxc(:,2)=(vxce1_ep(:)-vxce2_ep(:))*half*rhoinv_ep(:) ! dVxc-/drho+ + d1vxc(:,3)=(vxcp1_ep(:)-vxcp2_ep(:))*half*rhoinv_ep(:) ! dVxc+/drho+ + end if + +! Compute numerical second derivatives of Vxc (by finite difference scheme) + if (option<3.or.pawxcdev>1) then + LIBPAW_ALLOCATE(d2vxc,(nrad,4)) + if (calctype==1) then + d2vxc(:,1)=(vxcp1 (:)+vxcp2 (:)-two*vxcpi(:))*rhoinv (:)**2 ! d2Vxc+/drho+_drho+ + d2vxc(:,2)=(vxce1 (:)+vxce2 (:)-two*vxcei(:))*rhoinv (:)**2 ! d2Vxc-/drho+_drho+ + d2vxc(:,3)=(vxcp1_ep(:)+vxcp2_ep(:)-two*vxcpi(:))*rhoinv_ep(:)**2 ! d2Vxc+/drho-_drho- + d2vxc(:,4)=(vxce1_ep(:)+vxce2_ep(:)-two*vxcei(:))*rhoinv_ep(:)**2 ! d2Vxc-/drho-_drho- + else if (calctype==2) then + d2vxc(:,1)=(vxce1 (:)+vxce2 (:)-two*vxcei(:))*rhoinv (:)**2 ! d2Vxc-/drho-_drho- + d2vxc(:,2)=(vxcp1 (:)+vxcp2 (:)-two*vxcpi(:))*rhoinv (:)**2 ! d2Vxc+/drho-_drho- + d2vxc(:,3)=(vxce1_ep(:)+vxce2_ep(:)-two*vxcei(:))*rhoinv_ep(:)**2 ! d2Vxc-/drho+_drho+ + d2vxc(:,4)=(vxcp1_ep(:)+vxcp2_ep(:)-two*vxcpi(:))*rhoinv_ep(:)**2 ! d2Vxc+/drho+_drho+ + end if + end if ! option + + LIBPAW_DEALLOCATE(rhoinv) + LIBPAW_DEALLOCATE(rhoinv_ep) + LIBPAW_DEALLOCATE(vxce1) + LIBPAW_DEALLOCATE(vxcp1) + LIBPAW_DEALLOCATE(vxce2) + LIBPAW_DEALLOCATE(vxcp2) + LIBPAW_DEALLOCATE(vxce1_ep) + LIBPAW_DEALLOCATE(vxcp1_ep) + LIBPAW_DEALLOCATE(vxce2_ep) + LIBPAW_DEALLOCATE(vxcp2_ep) + + end if ! option/=4 + + LIBPAW_DEALLOCATE(rhosph) + LIBPAW_DEALLOCATE(rhosph_ep) + +!---------------------------------------------------------------------- +!----- Compute useful sums of densities +!---------------------------------------------------------------------- + + if (option<3.or.option/=1) then + +! Compute V1SUM1(r)=Sum_L{n^el_L(r)^2} +! V1SUM2(r)=Sum_L{n^el_L(r)*n^pos_L(r)} +! V1SUM3(r)=Sum_L{n^pos_L(r)^2} +! V2SUM1(r,L)=Sum_L1_L2{n^el_L1(r)*n^el_L2(r)*Gaunt_(L,L1,L2)} +! V2SUM2(r,L)=Sum_L1_L2{n^el_L1(r)*n^pos_L2(r)*Gaunt_(L,L1,L2)} +! V2SUM3(r,L)=Sum_L1_L2{n^pos_L1(r)*n^pos_L2(r)*Gaunt_(L,L1,L2)} + if (pawxcdev>=1) then + LIBPAW_ALLOCATE(v1sum,(nrad,3)) + else + LIBPAW_ALLOCATE(v1sum,(0,0)) + end if + if (pawxcdev>=2) then + LIBPAW_ALLOCATE(v2sum,(nrad,lm_size,3)) + else + LIBPAW_ALLOCATE(v2sum,(0,0,0)) + end if + call pawxcsum(1,1,1,lmselect,lmselect_ep,lm_size,nrad,3,pawxcdev,pawang,rhotot,rhotot_ep,v1sum,v2sum) + + end if !option + +!---------------------------------------------------------------------- +!----- Accumulate and store XC potential +!---------------------------------------------------------------------- + + if (option<3) then + +! if (option==0.or.option==2) allocate(vxc_ep(nrad,lm_size)) + +! === First order development +! --------------------------- + if (pawxcdev>=1) then + if (calctype==1) vxc(:,1,1)=vxcpi(:)*sqfpi + if (calctype==2) vxc(:,1,1)=vxcei(:)*sqfpi + vxc(:,1,1)=vxc(:,1,1)+invsqfpi*(d2vxc(:,2)*v1sum(:,2) & +& +half*(d2vxc(:,1)*v1sum(:,1)+d2vxc(:,3)*v1sum(:,3))) + do ilm=2,lm_size + if (lmselect(ilm)) vxc(:,ilm,1)=vxc(:,ilm,1)+d1vxc(:,1)*rhotot (:,ilm) + if (lmselect_ep(ilm)) vxc(:,ilm,1)=vxc(:,ilm,1)+d1vxc(:,2)*rhotot_ep(:,ilm) + end do +! if (option==0.or.option==2) then +! if (calctype==1) vxc_ep(:,1)=vxcei(:)*sqfpi +! if (calctype==2) vxc_ep(:,1)=vxcpi(:)*sqfpi +! vxc_ep(:,1)=vxc_ep(:,1,1)+invsqfpi*(d2vxc(:,3)*v1sum(:,2) & +! & +half*(d2vxc(:,2)*v1sum(:,1)+d2vxc(:,4)*v1sum(:,3))) +! do ilm=2,lm_size +! if (lmselect(ilm)) vxc_ep(:,ilm)=vxc_ep(:,ilm)+d1vxc(:,2)*rhotot (:,ilm) +! if (lmselect_ep(ilm)) vxc_ep(:,ilm)=vxc_ep(:,ilm)+d1vxc(:,3)*rhotot_ep(:,ilm) +! end do +! end if + end if ! pawxcdev>=1 + +! == 2nd order development +! --------------------------- + if (pawxcdev>=2) then + do ilm=2,lm_size + vxc(:,ilm,1)=vxc(:,ilm,1)+d2vxc(:,2)*v2sum(:,ilm,2) & +& +half*(d2vxc(:,1)*v2sum(:,ilm,1)+d2vxc(:,3)*v2sum(:,ilm,3)) + end do +! if (option==0.or.option==2) then +! do ilm=2,lm_size +! vxc_ep(:,ilm)=vxc_ep(:,ilm)+d2vxc(:,3)*v2sum(:,ilm,2) & +! & +half*(d2vxc(:,2)*v2sum(:,ilm,1)+d2vxc(:,4)*v2sum(:,ilm,3)) +! end do +! end if + end if !pawxcdev=2 + +! === Pathological case: if rho(r) is negative, interpolate Vxc +! ------------------------------------------------------------- + if (lmselect(1)) then + rhomin=xc_denpos*(one+tol6) + ir1=0;ir2=0 + do ir=1,nrad + if (rhotot(ir,1)0) then + if (ir1>1.or.ir20) then +! if (ir1>1.or.ir2=2) vxc(:,:,2)=vxc(:,:,1) + if (nspden==4) vxc(:,:,3:4)=zero + + end if !option<3 + + LIBPAW_DEALLOCATE(vxcei) + LIBPAW_DEALLOCATE(vxcpi) + +!---------------------------------------------------------------------- +!----- Accumulate and store XC energies +!---------------------------------------------------------------------- + +!----- Calculate Exc (direct scheme) term +!---------------------------------------- + + if (option/=1) then + LIBPAW_ALLOCATE(ff,(nrad)) + +! Contribution from spherical part of rho + ff(:)=fxci(:)*four_pi + +! Contribution from aspherical part of rho + if (option/=4) then + +! First order development + if (pawxcdev>=1) then + ff(:)=ff(:)+v1sum(:,2)*d1vxc(:,2) & +& +half*(v1sum(:,1)*d1vxc(:,1)+v1sum(:,3)*d1vxc(:,3)) + end if + +! Second order development + if (pawxcdev>=2) then + LIBPAW_ALLOCATE(gg,(nrad)) + gg=zero + do ilm=2,lm_size + if (lmselect(ilm)) gg(:)=gg(:)+v2sum(:,ilm,1)*rhotot(:,ilm) + end do + ff(:)=ff(:)+gg(:)*d2vxc(:,1)/6._dp + gg=zero + do ilm=2,lm_size + if (lmselect(ilm)) gg(:)=gg(:)+v2sum(:,ilm,2)*rhotot(:,ilm) + end do + ff(:)=ff(:) +half*gg(:)*d2vxc(:,2) + gg=zero + do ilm=2,lm_size + if (lmselect(ilm)) gg(:)=gg(:)+v2sum(:,ilm,3)*rhotot(:,ilm) + end do + ff(:)=ff(:) +half*gg(:)*d2vxc(:,3) + gg=zero + do ilm=2,lm_size + if (lmselect_ep(ilm)) gg(:)=gg(:)+v2sum(:,ilm,3)*rhotot_ep(:,ilm) + end do + ff(:)=ff(:)+gg(:)*d2vxc(:,4)/6._dp + LIBPAW_DEALLOCATE(gg) + end if ! pawxcdev>=2 + + end if ! option/=4 + + ff(1:nrad)=ff(1:nrad)*pawrad%rad(1:nrad)**2 + call simp_gen(enxc,ff,pawrad) + LIBPAW_DEALLOCATE(ff) + end if ! option/=1 + + LIBPAW_DEALLOCATE(fxci) + if (option<3.or.option/=1) then + LIBPAW_DEALLOCATE(v1sum) + LIBPAW_DEALLOCATE(v2sum) + end if + if (option<3.or.(option/=4.and.pawxcdev>1)) then + LIBPAW_DEALLOCATE(d2vxc) + end if + if (option/=4) then + LIBPAW_DEALLOCATE(d1vxc) + end if + +!----- Calculate Excdc double counting term +!------------------------------------------ + if (option==0.or.option==2) then + +! Build appropriate density + if (usexcnhat==1) rhotot(:,:)=rhotot(:,:)+nhat(:,:,1) + if (usecore==1.and.calctype==2) rhotot(:,1)=rhotot(:,1)-sqfpi*corexc(:) + +! Integrate with potential + LIBPAW_ALLOCATE(ff,(nrad)) + ff(:)=zero + do ilm=1,lm_size + if (lmselect(ilm)) ff(:)=ff(:)+vxc(:,ilm,1)*rhotot(:,ilm) + end do + ff(1:nrad)=ff(1:nrad)*pawrad%rad(1:nrad)**2 + call simp_gen(enxcdc,ff,pawrad) + LIBPAW_DEALLOCATE(ff) + end if ! option + + LIBPAW_DEALLOCATE(rhotot) + LIBPAW_DEALLOCATE(rhotot_ep) + +end subroutine pawxcmpositron +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawxc/pawxc_get_nkxc +!! NAME +!! pawxc_get_nkxc +!! +!! FUNCTION +!! Get size of XC kernel array (Kxc) according to spin polarization and XC type +!! +!! INPUTS +!! nspden= nmber of density spin components +!! xclevel= XC type +!! +!! OUTPUT +!! nkxc= size of XC kernel (kxc array) +!! +!! NOTES +!! Content of Kxc array: +!! ===== if LDA +!! if nspden==1: kxc(:,1)= d2Exc/drho2 +!! (kxc(:,2)= d2Exc/drho_up drho_dn) +!! if nspden>=2: kxc(:,1)= d2Exc/drho_up drho_up +!! kxc(:,2)= d2Exc/drho_up drho_dn +!! kxc(:,3)= d2Exc/drho_dn drho_dn +!! if nspden==4: kxc(:,4:6)= (m_x, m_y, m_z) (magnetization) +!! ===== if GGA +!! if nspden==1: +!! kxc(:,1)= d2Exc/drho2 +!! kxc(:,2)= 1/|grad(rho)| dExc/d|grad(rho)| +!! kxc(:,3)= 1/|grad(rho)| d2Exc/d|grad(rho)| drho +!! kxc(:,4)= 1/|grad(rho)| * d/d|grad(rho)| ( 1/|grad(rho)| dExc/d|grad(rho)| ) +!! kxc(:,5)= gradx(rho) +!! kxc(:,6)= grady(rho) +!! kxc(:,7)= gradz(rho) +!! if nspden>=2: +!! kxc(:,1)= d2Exc/drho_up drho_up +!! kxc(:,2)= d2Exc/drho_up drho_dn +!! kxc(:,3)= d2Exc/drho_dn drho_dn +!! kxc(:,4)= 1/|grad(rho_up)| dEx/d|grad(rho_up)| +!! kxc(:,5)= 1/|grad(rho_dn)| dEx/d|grad(rho_dn)| +!! kxc(:,6)= 1/|grad(rho_up)| d2Ex/d|grad(rho_up)| drho_up +!! kxc(:,7)= 1/|grad(rho_dn)| d2Ex/d|grad(rho_dn)| drho_dn +!! kxc(:,8)= 1/|grad(rho_up)| * d/d|grad(rho_up)| ( 1/|grad(rho_up)| dEx/d|grad(rho_up)| ) +!! kxc(:,9)= 1/|grad(rho_dn)| * d/d|grad(rho_dn)| ( 1/|grad(rho_dn)| dEx/d|grad(rho_dn)| ) +!! kxc(:,10)=1/|grad(rho)| dEc/d|grad(rho)| +!! kxc(:,11)=1/|grad(rho)| d2Ec/d|grad(rho)| drho_up +!! kxc(:,12)=1/|grad(rho)| d2Ec/d|grad(rho)| drho_dn +!! kxc(:,13)=1/|grad(rho)| * d/d|grad(rho)| ( 1/|grad(rho)| dEc/d|grad(rho)| ) +!! kxc(:,14)=gradx(rho_up) +!! kxc(:,15)=gradx(rho_dn) +!! kxc(:,16)=grady(rho_up) +!! kxc(:,17)=grady(rho_dn) +!! kxc(:,18)=gradz(rho_up) +!! kxc(:,19)=gradz(rho_dn) +!! if nspden==4: +!! kxc(:,20:22)= (m_x, m_y, m_z) (magnetization) +!! +!! SOURCE + + subroutine pawxc_get_nkxc(nkxc,nspden,xclevel) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: nspden,xclevel + integer,intent(out) :: nkxc +!arrays + +!Local variables------------------------------- +!scalars +!arrays + +!************************************************************************ + + nkxc=0 + + if (nspden==1) then ! Non polarized + + if (xclevel==1) nkxc=1 + if (xclevel==2) nkxc=7 + + else if (nspden==2) then ! Polarized + + if (xclevel==1) nkxc=3 + if (xclevel==2) nkxc=19 + + else if (nspden==4) then ! Non-collinear + + ! Store magnetization in the 3 last terms of Kxc + if (xclevel==1) nkxc=6 + if (xclevel==2) nkxc=22 + + end if + + end subroutine pawxc_get_nkxc +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawxc/pawxc_drivexc_wrapper +!! NAME +!! pawxc_drivexc_wrapper +!! +!! FUNCTION +!! PAW only +!! Wrapper for drivexc routines +!! +!! NOTES +!! PENDING. Need to manage properly optional arguments: +!! Check that these are present before calling drivexc +!! Probably use better interfaces of fortran 2003 to avoid +!! numerous if/then sentences. +!! +!! SOURCE + + subroutine pawxc_drivexc_wrapper(hyb_mixing,ixc,order,npts,nspden,usegradient,uselaplacian,usekden,& +& rho,exc,vxcrho,nvxcgrho,nvxclrho,nvxctau,ndvxc,nd2vxc, & ! mandatory arguments +& grho2,vxcgrho,lrho,vxclrho,tau,vxctau,dvxc,d2vxc, & ! optional arguments +& exexch,el_temp,fxcT) ! optional arguments + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: ixc,ndvxc,nd2vxc,npts,nspden,nvxcgrho,nvxclrho,nvxctau,order + integer,intent(in) :: usegradient,uselaplacian,usekden + real(dp),intent(in) :: hyb_mixing +!arrays + real(dp),intent(in) :: rho(npts,nspden) + real(dp),intent(out) :: exc(npts),vxcrho(npts,nspden) + integer,intent(in),optional :: exexch + real(dp),intent(in),optional :: el_temp + real(dp),intent(in),optional :: grho2(npts,(2*nspden-1)*usegradient) + real(dp),intent(in),optional :: lrho(npts,nspden*uselaplacian) + real(dp),intent(in),optional :: tau(npts,nspden*usekden) + real(dp),intent(out),optional:: dvxc(npts,ndvxc),d2vxc(npts,nd2vxc),fxcT(npts) + real(dp),intent(out),optional:: vxcgrho(npts,nvxcgrho),vxclrho(npts,nvxclrho),vxctau(npts,nvxctau) + +!Local variables------------------------------- + character(len=100) :: msg + +! ************************************************************************* + + +!One could add here a section for other codes (i.e. BigDFT, ...) +#if defined HAVE_LIBPAW_ABINIT + call pawxc_drivexc_abinit() +#elif defined LIBPAW_HAVE_LIBXC + call pawxc_drivexc_libxc() +#else + write(msg,'(5a)') 'libPAW XC driving routine only implemented in the following cases:',ch10, & +& ' - ABINIT',ch10,' - libXC' + LIBPAW_BUG(msg) +#endif + + if (.false.) write(std_out,*) el_temp +!!*** + +contains +!!*** + +#if defined HAVE_LIBPAW_ABINIT +!!****f* m_pawxc/pawxc_drivexc_abinit +!! NAME +!! pawxc_drivexc_abinit +!! +!! FUNCTION +!! ABINIT version of XC driving routine +!! +!! SOURCE + +subroutine pawxc_drivexc_abinit() + + logical :: test_args + +! ************************************************************************* + + test_args=(present(dvxc).and.present(d2vxc)) + if (usegradient==1) test_args=(test_args.and.present(grho2).and.present(vxcgrho)) + if (uselaplacian==1) test_args=(test_args.and.present(lrho).and.present(vxclrho)) + if (usekden==1) test_args=(test_args.and.present(tau).and.present(vxctau)) + if (.not.test_args) then + msg='missing mandatory arguments in pawxc_drivexc_wrapper' + LIBPAW_BUG(msg) + end if + + if (uselaplacian==1.or.usekden==1) then + if (uselaplacian==1.and.usekden==1) then + call drivexc(ixc,order,npts,nspden,usegradient,uselaplacian,usekden,& +& rho,exc,vxcrho,nvxcgrho,nvxclrho,nvxctau,ndvxc,nd2vxc, & +& grho2_updn=grho2,vxcgrho=vxcgrho,& +& lrho_updn=lrho,vxclrho=vxclrho,& +& tau_updn=tau,vxctau=vxctau,& +& dvxc=dvxc,d2vxc=d2vxc,hyb_mixing=hyb_mixing) + else if (uselaplacian==1) then + call drivexc(ixc,order,npts,nspden,usegradient,uselaplacian,usekden,& +& rho,exc,vxcrho,nvxcgrho,nvxclrho,nvxctau,ndvxc,nd2vxc, & +& grho2_updn=grho2,vxcgrho=vxcgrho,& +& lrho_updn=lrho,vxclrho=vxclrho,& +& dvxc=dvxc,d2vxc=d2vxc,hyb_mixing=hyb_mixing) + else if (usekden==1) then + call drivexc(ixc,order,npts,nspden,usegradient,uselaplacian,usekden,& +& rho,exc,vxcrho,nvxcgrho,nvxclrho,nvxctau,ndvxc,nd2vxc, & +& grho2_updn=grho2,vxcgrho=vxcgrho,& +& tau_updn=tau,vxctau=vxctau,& +& dvxc=dvxc,d2vxc=d2vxc,hyb_mixing=hyb_mixing) + end if + else if (usegradient==1) then + if (present(exexch)) then + call drivexc(ixc,order,npts,nspden,usegradient,uselaplacian,usekden,& +& rho,exc,vxcrho,nvxcgrho,nvxclrho,nvxctau,ndvxc,nd2vxc, & +& grho2_updn=grho2,vxcgrho=vxcgrho,& +& dvxc=dvxc,d2vxc=d2vxc,& +& exexch=exexch,hyb_mixing=hyb_mixing) + else + call drivexc(ixc,order,npts,nspden,usegradient,uselaplacian,usekden,& +& rho,exc,vxcrho,nvxcgrho,nvxclrho,nvxctau,ndvxc,nd2vxc, & +& grho2_updn=grho2,vxcgrho=vxcgrho,& +& dvxc=dvxc,d2vxc=d2vxc,hyb_mixing=hyb_mixing) + end if + else + call drivexc(ixc,order,npts,nspden,usegradient,uselaplacian,usekden,& +& rho,exc,vxcrho,nvxcgrho,nvxclrho,nvxctau,ndvxc,nd2vxc, & +& dvxc=dvxc,d2vxc=d2vxc,hyb_mixing=hyb_mixing) + end if + +end subroutine pawxc_drivexc_abinit +!!*** +#endif + +#if defined LIBPAW_HAVE_LIBXC +!!****f* m_pawxc/pawxc_drivexc_libxc +!! NAME +!! pawxc_drivexc_libxc +!! +!! FUNCTION +!! LibXC version of XC driving routine +!! +!! SOURCE + +subroutine pawxc_drivexc_libxc() + +! ************************************************************************* + +!Check the compatibility of input arguments + if (ixc>=0) then + msg='ixc argument should be negative!' + LIBPAW_BUG(msg) + end if + if (ixc/=libxc_functionals_ixc()) then + msg='The value of ixc differs from the one used to initialize the functional!' + LIBPAW_BUG(msg) + end if + if ((order<1.and.order/=-2).or.order>4) then + msg='The only allowed values for order are 1, 2, -2, or 3!' + LIBPAW_BUG(msg) + end if + if ((order**2>1).and.(.not.present(dvxc))) then + msg='The value of order is not compatible with the presence of the array dvxc!' + LIBPAW_BUG(msg) + end if + if ((order==3).and.(.not.present(d2vxc))) then + msg='The value of order is not compatible with the presence of the array d2vxc!' + LIBPAW_BUG(msg) + end if + if (libxc_functionals_isgga().or.libxc_functionals_ismgga()) then + if ((.not.present(grho2)).or.(.not.present(vxcgrho)).or.& +& (usegradient==0).or.(nvxcgrho==0)) then + write(msg,'(3a)') 'At least one of the functionals is a GGA,',ch10, & +& 'but not all the necessary optional arguments are present.' + LIBPAW_BUG(msg) + end if + if (libxc_functionals_needs_laplacian()) then + if ((.not.present(lrho)).or.(.not.present(vxclrho)).or.& +& (uselaplacian==0).or.(nvxclrho==0)) then + write(msg,'(3a)') 'At least one of the functionals is a mGGA,',ch10, & +& 'but not all the necessary optional arguments are present.' + LIBPAW_BUG(msg) + end if + end if + if (libxc_functionals_ismgga()) then + if ((.not.present(tau)).or.(.not.present(vxctau)).or.& +& (usekden==0).or.(nvxctau==0)) then + write(msg,'(3a)') 'At least one of the functionals is a mGGA,',ch10, & +& 'but not all the necessary optional arguments are present.' + LIBPAW_BUG(msg) + end if + end if + end if + if ((uselaplacian==1.or.usekden==1).and.(usegradient==0)) then + msg='Laplacian or kinetic energy density needs gradient!' + LIBPAW_BUG(msg) + end if + +!Call LibXC routines + if (uselaplacian==1.or.usekden==1) then ! meta-GGA + if (uselaplacian==1.and.usekden==1) then + call libxc_functionals_getvxc(ndvxc,nd2vxc,npts,nspden,order,rho,exc,vxcrho,& +& grho2=grho2,vxcgr=vxcgrho,lrho=lrho,vxclrho=vxclrho,tau=tau,vxctau=vxctau) + else if (uselaplacian==1) then + call libxc_functionals_getvxc(ndvxc,nd2vxc,npts,nspden,order,rho,exc,vxcrho,& +& grho2=grho2,vxcgr=vxcgrho,lrho=lrho,vxclrho=vxclrho) + else if (usekden==1) then + call libxc_functionals_getvxc(ndvxc,nd2vxc,npts,nspden,order,rho,exc,vxcrho,& +& grho2=grho2,vxcgr=vxcgrho,tau=tau,vxctau=vxctau) + end if + else if (usegradient==1) then ! GGA + if (abs(order)<=1) then + call libxc_functionals_getvxc(ndvxc,nd2vxc,npts,nspden,order,rho,exc,vxcrho,& +& grho2=grho2,vxcgr=vxcgrho) + else + call libxc_functionals_getvxc(ndvxc,nd2vxc,npts,nspden,order,rho,exc,vxcrho,& +& grho2=grho2,vxcgr=vxcgrho,dvxc=dvxc) + end if + else ! LDA + if (abs(order)<=1) then + call libxc_functionals_getvxc(ndvxc,nd2vxc,npts,nspden,order,rho,exc,vxcrho) + else if (abs(order)<=2) then + call libxc_functionals_getvxc(ndvxc,nd2vxc,npts,nspden,order,rho,exc,vxcrho,& +& dvxc=dvxc) + else + call libxc_functionals_getvxc(ndvxc,nd2vxc,npts,nspden,order,rho,exc,vxcrho,& +& d2vxc=d2vxc) + end if + end if + +end subroutine pawxc_drivexc_libxc +!!*** +#endif + +end subroutine pawxc_drivexc_wrapper +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawxc/pawxc_rotate_mag +!! NAME +!! pawxc_rotate_mag +!! +!! FUNCTION +!! Project (rotate) a non-collinear density (stored as density+magn.) +!! on a magnetization and give a collinear density (stored as [up,dn] or [up+dn,up]). +!! +!! INPUTS +!! rho_in(vectsize,4)=input non-collinear density and magnetization +!! mag(vectsize,3)=magnetization used for projection +!! vectsize=size of vector fields +!! [rho_out_format]= 1=rho_out is stored as [up,dn] +!! 2=rho_out is stored as [up+dn,up] +!! Default=1 +!! +!! OUTPUT +!! rho_out(vectsize,2)=output (projected, collinear) density +!! [mag_norm_out(vectsize)]= --optional-- norm of mag(:) at each point of the grid +!! SOURCE + + subroutine pawxc_rotate_mag(rho_in,rho_out,mag,vectsize,mag_norm_out,rho_out_format) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: vectsize + integer,intent(in),optional :: rho_out_format +!arrays + real(dp),intent(in) :: rho_in(vectsize,4),mag(vectsize,3) + real(dp),intent(out) :: rho_out(vectsize,2) + real(dp),intent(out),optional :: mag_norm_out(vectsize) + +!Local variables------------------------------- +!scalars +#if ! defined HAVE_LIBPAW_ABINIT + integer :: ipt + real(dp),parameter :: m_norm_min=tol8 + real(dp) :: m_norm,rhoin_dot_mag,rho_up +#endif +!arrays + +! ************************************************************************* + +!One could add here a section for other codes (i.e. BigDFT, ...) +#if defined HAVE_LIBPAW_ABINIT + if (present(rho_out_format).and.present(mag_norm_out)) then + call rotate_mag(rho_in,rho_out,mag,vectsize,1, & +& rho_out_format=rho_out_format,mag_norm_out=mag_norm_out) + else if (present(rho_out_format).and..not.present(mag_norm_out)) then + call rotate_mag(rho_in,rho_out,mag,vectsize,1,rho_out_format=rho_out_format) + else if (.not.present(rho_out_format).and.present(mag_norm_out)) then + call rotate_mag(rho_in,rho_out,mag,vectsize,1,mag_norm_out=mag_norm_out) + else + call rotate_mag(rho_in,rho_out,mag,vectsize,1) + end if +#else + do ipt=1,vectsize + m_norm=sqrt(mag(ipt,1)**2+mag(ipt,2)**2+mag(ipt,3)**2) + rhoin_dot_mag=rho_in(ipt,2)*mag(ipt,1)+rho_in(ipt,3)*mag(ipt,2) & +& +rho_in(ipt,4)*mag(ipt,3) + if(m_norm>m_norm_min)then + rho_out(ipt,1)=half*(rho_in(ipt,1)+rhoin_dot_mag/m_norm) + rho_out(ipt,2)=half*(rho_in(ipt,1)-rhoin_dot_mag/m_norm) + else + rho_out(ipt,1)=half*rho_in(ipt,1) + rho_out(ipt,2)=half*rho_in(ipt,1) + end if + if (present(mag_norm_out).and.m_norm> m_norm_min) mag_norm_out(ipt)=m_norm + if (present(mag_norm_out).and.m_norm<=m_norm_min) mag_norm_out(ipt)=zero + end do + if (present(rho_out_format)) then + if (rho_out_format==2) then + do ipt=1,vectsize + rho_up=rho_out(ipt,1) + rho_out(ipt,1)=rho_up+rho_out(ipt,2) + rho_out(ipt,2)=rho_up + end do + end if + end if +#endif + +end subroutine pawxc_rotate_mag +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawxc/pawxc_rotate_back_mag +!! NAME +!! pawxc_rotate_back_mag +!! +!! FUNCTION +!! Rotate back a collinear XC potential (stored as up+dn) with respect to +!! a magnetization and give a non-collinear XC potential +!! (stored as up_up, dn_dn, Re{up_dn}, Im{up_dn}). +!! +!! INPUTS +!! vxc_in(vectsize,2)=input collinear XC potential +!! mag(vectsize,3)=magnetization used for projection +!! vectsize=size of vector fields +!! +!! OUTPUT +!! vxc_out(vectsize,4)=output non-collinear XC potential +!! +!! SOURCE + + subroutine pawxc_rotate_back_mag(vxc_in,vxc_out,mag,vectsize) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: vectsize +!arrays + real(dp),intent(in) :: vxc_in(vectsize,2),mag(vectsize,3) + real(dp),intent(out) :: vxc_out(vectsize,4) + +!Local variables------------------------------- +!scalars +#if ! defined HAVE_LIBPAW_ABINIT + integer :: ipt + real(dp),parameter :: m_norm_min=tol8 + real(dp) :: dvdn,dvdz,m_norm +#endif +!arrays + +! ************************************************************************* + +!One could add here a section for other codes (i.e. BigDFT, ...) +#if defined HAVE_LIBPAW_ABINIT + call rotate_back_mag(vxc_in,vxc_out,mag,vectsize) +#else + do ipt=1,vectsize + m_norm=sqrt(mag(ipt,1)**2+mag(ipt,2)**2+mag(ipt,3)**2) + dvdn=half*(vxc_in(ipt,1)+vxc_in(ipt,2)) + if (m_norm>m_norm_min) then + dvdz=half*(vxc_in(ipt,1)-vxc_in(ipt,2))/m_norm + vxc_out(ipt,1)=dvdn+mag(ipt,3)*dvdz + vxc_out(ipt,2)=dvdn-mag(ipt,3)*dvdz + vxc_out(ipt,3)= mag(ipt,1)*dvdz + vxc_out(ipt,4)=-mag(ipt,2)*dvdz + else + vxc_out(ipt,1:2)=dvdn + vxc_out(ipt,3:4)=zero + end if + end do +#endif + +end subroutine pawxc_rotate_back_mag +!!*** + +!---------------------------------------------------------------------- + +!!****f* m_pawxc/pawxc_rotate_back_mag_dfpt +!! NAME +!! pawxc_rotate_back_mag_dfpt +!! +!! FUNCTION +!! Rotate back a 1st-order collinear XC potential (stored as up+dn) with respect to +!! a magnetization and give a 1st-order non-collinear XC potential +!! (stored as up_up, dn_dn, Re{up_dn}, Im{up_dn}). +!! +!! INPUTS +!! mag(vectsize,3)=0-order magnetization used for projection +!! rho1(vectsize,4)=1st-order non-collinear density and magnetization +!! vxc(vectsize,4)=0-order non-collinear XC potential +!! kxc(vectsize,nkxc)=0-order XC kernel (associated to vxc) +!! vxc1_in(vectsize,2)=input 1st-order collinear XC potential +!! vectsize=size of vector fields +!! +!! OUTPUT +!! vxc1_out(vectsize,4)=output 1st-order non-collinear XC potential +!! +!! SOURCE + + subroutine pawxc_rotate_back_mag_dfpt(vxc1_in,vxc1_out,vxc,kxc,rho1,mag,vectsize) + +!Arguments ------------------------------------ +!scalars + integer,intent(in) :: vectsize +!arrays + real(dp),intent(in) :: kxc(:,:),mag(vectsize,3),rho1(vectsize,4) + real(dp),intent(in) :: vxc(vectsize,4),vxc1_in(vectsize,2) + real(dp),intent(out) :: vxc1_out(vectsize,4) + +!Local variables------------------------------- +!scalars +#if ! defined HAVE_LIBPAW_ABINIT + character(len=100) :: msg +#endif +!arrays + +! ************************************************************************* + +!One could add here a section for other codes (i.e. BigDFT, ...) +#if defined HAVE_LIBPAW_ABINIT + call rotate_back_mag_dfpt(1,vxc1_in,vxc1_out,vxc,kxc,rho1,mag,vectsize,1) +#else + msg='[LIBPAW] Non-collinear DFPT not available (only in ABINIT)!' + LIBPAW_ERROR(msg) +#endif + +end subroutine pawxc_rotate_back_mag_dfpt +!!*** + +!---------------------------------------------------------------------- + +end module m_pawxc +!!*** diff --git a/GX-PAW/libpaw/src/m_pawxc.o b/GX-PAW/libpaw/src/m_pawxc.o new file mode 100644 index 00000000..6e269a28 Binary files /dev/null and b/GX-PAW/libpaw/src/m_pawxc.o differ diff --git a/GX-PAW/libpaw/src/m_pawxmlps.F90 b/GX-PAW/libpaw/src/m_pawxmlps.F90 new file mode 100644 index 00000000..a1922cbc --- /dev/null +++ b/GX-PAW/libpaw/src/m_pawxmlps.F90 @@ -0,0 +1,3110 @@ +!!****m* ABINIT/m_pawxmlps +!! NAME +!! m_pawxmlps +!! +!! FUNCTION +!! This module reads a PAW pseudopotential file written in XML. +!! Can use either FoX or pure Fortran routines. +!! +!! COPYRIGHT +!! Copyright (C) 2005-2024 ABINIT group (MT, FJ) +!! This file is distributed under the terms of the +!! GNU General Public License, see ~abinit/COPYING +!! or http://www.gnu.org/copyleft/gpl.txt . +!! +!! NOTES +!! FOR DEVELOPPERS: in order to preserve the portability of libPAW library, +!! please consult ~abinit/src/??_libpaw/libpaw-coding-rules.txt +!! +!! SOURCE + +#include "libpaw.h" + +module m_pawxmlps + + USE_DEFS + USE_MSG_HANDLING + USE_MEMORY_PROFILING + +#if defined LIBPAW_HAVE_FOX + use fox_sax +#endif + + use m_pawrad , only : pawrad_type, pawrad_init, pawrad_free, pawrad_ifromr, bound_deriv + use m_paw_numeric, only : paw_spline, paw_splint + + implicit none + + private + +!Procedures used for the Fortran reader + public :: rdpawpsxml + public :: rdpawpsxml_header + public :: rdpawpsxml_core + +!Procedures used for the FoX reader (called from xml_parser in response to events) +#if defined LIBPAW_HAVE_FOX + public :: paw_begin_element1 + public :: paw_end_element1 + public :: pawdata_chunk +#endif + +! private procedures and global variables. + private :: paw_rdfromline + +! This type of real is used by the datatypes below + integer,parameter,private :: dpxml = selected_real_kind(14) + +! The maximum length of a record in a file connected for sequential access. + integer,parameter,private :: XML_RECL = 50000 + integer,parameter,private :: NGAUSSIAN_MAX = 100 +!!*** + +!!****t* m_pawxmlps/radial_grid_t +!! NAME +!! radial_grid_t +!! +!! FUNCTION +!! Radial grid type for the FoX XML reader +!! +!! SOURCE + +type, public :: radial_grid_t + logical :: tread=.false. + character(len=20) :: eq + character(len=4) :: id + real(dpxml) :: aa + real(dpxml) :: bb + real(dpxml) :: dd + integer :: nn + integer :: istart + integer :: iend +end type radial_grid_t +!!*** + +!------------------------------------------------------------------------- + +!!****t* m_pawxmlps/radial_func_t +!! NAME +!! radial_func_t +!! +!! FUNCTION +!! Radial function type for the FoX XML reader +!! +!! SOURCE + +type, public :: radialfunc_t + logical :: tread=.false. + character(len=6) :: grid=' ' !vz_z + character(len=6) :: state=' ' !vz_z + real(dpxml),allocatable :: data(:) +end type radialfunc_t +!!*** + +!------------------------------------------------------------------------- + +!!****t* m_pawxmlps/gaussian_expansion_t +!! NAME +!! radial_func_t +!! +!! FUNCTION +!! Radial function type for the FoX XML reader +!! +!! SOURCE + +type, public :: gaussian_expansion_t + logical :: tread=.false. + integer :: ngauss=0 + character(len=6) :: state=' ' + real(dpxml), dimension(2, NGAUSSIAN_MAX) :: factors + real(dpxml), dimension(2, NGAUSSIAN_MAX) :: expos +end type gaussian_expansion_t +!!*** + +!------------------------------------------------------------------------- + +!!****t* m_pawxmlps/shape_function_t +!! NAME +!! shape_function_t +!! +!! FUNCTION +!! Shape function type for the FoX XML reader +!! +!! SOURCE + +type, public :: shape_function_t + logical :: tread=.false. + character(len=20) :: gtype + real(dpxml) :: rc=0 + character(len=6) :: grid + integer :: lamb + real(dpxml), allocatable :: data(:,:) +end type shape_function_t +!!*** + +!------------------------------------------------------------------------- + +!!****t* m_pawxmlps/state_t +!! NAME +!! state_t +!! +!! FUNCTION +!! State type for the FoX XML reader +!! +!! SOURCE + +type, public :: state_t + logical :: tread=.false. + character(len=6) :: id + real(dpxml) :: ff + real(dpxml) :: rc + real(dpxml) :: ee + integer :: nn + integer :: ll + integer :: kk +end type state_t +!!*** + +!------------------------------------------------------------------------- + +!!****t* m_pawxmlps/valence_states_t +!! NAME +!! valence_states_t +!! +!! FUNCTION +!! Valence state type for the FoX XML reader +!! +!! SOURCE + +type, public :: valence_states_t + logical :: tread=.false. + integer :: nval + type(state_t),allocatable :: state(:) +end type valence_states_t +!!*** + +!------------------------------------------------------------------------- + +!!****t* m_pawxmlps/generator_t +!! NAME +!! generator_t +!! +!! FUNCTION +!! Generator type for the FoX XML reader +!! +!! SOURCE + +type, public :: generator_t + logical :: tread=.false. + character(len=20) :: gen + character(len=20) :: name +end type generator_t +!!*** + +!------------------------------------------------------------------------- + +!!****t* m_pawxmlps/xc_functional_t +!! NAME +!! xc_functional_t function_t +!! +!! FUNCTION +!! XC functional type for the FoX XML reader +!! +!! SOURCE + +type, public :: xc_functional_t + logical :: tread=.false. + character(len=12) :: functionaltype + character(len=100) :: name +end type xc_functional_t +!!*** + +!------------------------------------------------------------------------- + +!!****t* m_pawxmlps/atom_t +!! NAME +!! atom_t +!! +!! FUNCTION +!! Atom type for the FoX XML reader +!! +!! SOURCE + +type, public :: atom_t + logical :: tread=.false. + character(len=2) :: symbol + real(dpxml) :: znucl + real(dpxml) :: zion + real(dpxml) :: zval +end type atom_t +!!*** + +!------------------------------------------------------------------------- + +!!****t* m_pawxmlps/paw_setup_t +!! NAME +!! paw_setup_t +!! +!! FUNCTION +!! PAW setup type (contain all the data for a PAW setup) +!! +!! SOURCE + +type, public :: paw_setup_t + character(len=3) :: version + logical :: tread=.false. + integer :: ngrid + real(dpxml) :: rpaw + real(dpxml) :: ex_cc + real(dpxml) :: lamb_shielding=0.0D0 + character(len=4) :: idgrid + character(len=12) :: optortho + type(atom_t) :: atom + type(xc_functional_t) :: xc_functional + type(generator_t) :: generator + type(valence_states_t) :: valence_states + type(radial_grid_t), allocatable :: radial_grid(:) + type(shape_function_t) :: shape_function + type(radialfunc_t) :: ae_core_density + type(radialfunc_t) :: pseudo_core_density + type(radialfunc_t) :: pseudo_valence_density + type(radialfunc_t) :: zero_potential + type(radialfunc_t) :: LDA_minus_half_potential + type(radialfunc_t) :: ae_core_kinetic_energy_density + type(radialfunc_t) :: pseudo_core_kinetic_energy_density + type(radialfunc_t),allocatable :: ae_partial_wave(:) + type(radialfunc_t),allocatable :: pseudo_partial_wave(:) + type(radialfunc_t),allocatable :: projector_function(:) + type(gaussian_expansion_t),allocatable :: projector_fit(:) + type(radialfunc_t) :: kresse_joubert_local_ionic_potential + type(radialfunc_t) :: blochl_local_ionic_potential + type(radialfunc_t) :: kinetic_energy_differences + type(radialfunc_t) :: exact_exchange_matrix +end type paw_setup_t + + public :: paw_setup_free ! Free memory + public :: paw_setup_copy ! Copy object +!!*** + + +!------------------------------------------------------------------------- +!------------------------------------------------------------------------- +!------------- PUBLIC AND PRIVATE VARIABLES ------------------------------ +!------------------------------------------------------------------------- +!------------------------------------------------------------------------- + +!Public variables (common to both readers) +integer,save,public,allocatable :: ipsp2xml(:) +integer,save,public :: npsp_pawxml +type(paw_setup_t),public,target,allocatable,save :: paw_setup(:) +type(paw_setup_t),public,target,save :: paw_setuploc + +!Private variables (for the FoX reader) +#if defined LIBPAW_HAVE_FOX +logical,private,save :: in_valenceStates = .false.,in_data=.false. +logical,private,save :: in_generator =.false. +integer,private,save :: ndata +integer,private,save :: ii,ival,igrid,ishpf,lmax,mesh_size +!Pointers to make it easier to manage the data +type(radialfunc_t),private,save,pointer :: rp +type(state_t),private,save,pointer :: valstate (:) +type(radial_grid_t),private,save,pointer :: grids (:) +type(radialfunc_t),private,save,pointer :: shpf(:) +#endif +!!*** + + +CONTAINS +!=========================================================== +!!*** + +!------------------------------------------------------------------------- +!------------------------------------------------------------------------- +!------------- ROUTINES AND FUNCTIONS FOR THE FOX READER ----------------- +!------------------------------------------------------------------------- +!------------------------------------------------------------------------- +#if defined LIBPAW_HAVE_FOX + +!!****f* m_pawxmlps/paw_begin_element1 +!! NAME +!! begin_element +!! +!! FUNCTION +!! Read an XML tag with a given name. +!! Fills the present module private data. +!! +!! INPUTS +!! namespaceURI = universal resource indicator for XML namespace??? Not used. +!! localName = local equivalent of tag name?? Not used. +!! name = name of XML tag which has been read in +!! attributes = attributes of XML tag +!! +!! OUTPUT +!! Fills private data in present module. +!! +!! SOURCE +subroutine paw_begin_element1(namespaceURI,localName,name,attributes) + +character(len=*),intent(in) :: namespaceURI,localName,name +type(dictionary_t),intent(in) :: attributes + +character(len=100) :: msg,value +integer ::iaewf=0,iproj=0,ipswf=0,iprojfit=0,igauss=0 +!Just to fool abirules + value=localName + value=namespaceURI + +select case(name) + + case ("paw_setup") + paw_setuploc%tread=.true. + igrid=0;ishpf=0 + paw_setuploc%rpaw=-1.d0 + LIBPAW_DATATYPE_ALLOCATE(grids,(10)) + LIBPAW_DATATYPE_ALLOCATE(shpf,(7)) + value = getValue(attributes,"version") + write(std_out,'(3a)') "Processing a PSEUDO version ",trim(value)," XML file" + paw_setuploc%version=trim(value) + + + case ("atom") + paw_setuploc%atom%tread=.true. + value = getValue(attributes,"symbol") + if (value == "" ) then + msg="Cannot determine atomic symbol" + LIBPAW_ERROR(msg) + end if + paw_setuploc%atom%symbol = trim(value) + + value = getValue(attributes,"Z") + if (value == "" ) then + msg="Cannot determine znucl" + LIBPAW_ERROR(msg) + end if + read(unit=value,fmt=*) paw_setuploc%atom%znucl + + value = getValue(attributes,"core") + if (value == "" ) then + msg="Cannot determine zion" + LIBPAW_ERROR(msg) + end if + read(unit=value,fmt=*) paw_setuploc%atom%zion + + value = getValue(attributes,"valence") + if (value == "" ) then + msg="Cannot determine zval" + LIBPAW_ERROR(msg) + end if + read(unit=value,fmt=*) paw_setuploc%atom%zval + + + case ("xc_functional") + paw_setuploc%xc_functional%tread=.true. + value = getValue(attributes,"type") + if (value == "" ) then + msg="Cannot determine xc-functional-type" + LIBPAW_ERROR(msg) + end if + paw_setuploc%xc_functional%functionaltype = trim(value) + + value = getValue(attributes,"name") + if (value == "" ) then + msg="Cannot determine xc-functional-name " + LIBPAW_ERROR(msg) + end if + paw_setuploc%xc_functional%name= trim(value) + + case ("generator") + paw_setuploc%generator%tread=.true. + in_generator =.true. + value = getValue(attributes,"type") + if (value == "" ) value = "unknown" + paw_setuploc%generator%gen = trim(value) + + value = getValue(attributes,"name") + if (value == "" ) value = "unknown" + paw_setuploc%generator%name = trim(value) + + case ("PAW_radius") + value = getValue(attributes,"rpaw") + if (value == "" ) then + msg="Cannot determine rpaw" + LIBPAW_ERROR(msg) + end if + read(unit=value,fmt=*) paw_setuploc%rpaw + + case ("valence_states") + paw_setuploc%valence_states%tread=.true. + in_valenceStates=.true. + ival=0 + lmax=0 + LIBPAW_DATATYPE_ALLOCATE(valstate,(50)) + + case ("state") + ival=ival+1 + + value = getValue(attributes,"n") + if (value == "" ) then + valstate(ival)%nn=-1 + else + read(unit=value,fmt=*) valstate(ival)%nn + end if + + value = getValue(attributes,"l") + if (value == "" ) then + msg="Cannot determine l" + LIBPAW_ERROR(msg) + end if + read(unit=value,fmt=*) valstate(ival)%ll + if(valstate(ival)%ll>lmax) lmax=valstate(ival)%ll + + value = getValue(attributes,"f") + if (value == "" ) then + valstate(ival)%ff=-1.d0 + else + read(unit=value,fmt=*) valstate(ival)%ff + end if + + value = getValue(attributes,"rc") + if (value == "" ) then + msg="Cannot determine rc" + LIBPAW_ERROR(msg) + end if + read(unit=value,fmt=*) valstate(ival)%rc + + value = getValue(attributes,"e") + if (value == "" ) then + msg="Cannot determine e" + LIBPAW_ERROR(msg) + end if + read(unit=value,fmt=*) valstate(ival)%ee + + value = getValue(attributes,"id") + if (value == "" ) value = "unknown" + valstate(ival)%id = trim(value) + + case ("radial_grid") + igrid=igrid+1 + value = getValue(attributes,"eq") + if (value == "" ) value = "unknown" + grids(igrid)%eq = trim(value) + + value = getValue(attributes,"a") + if (value == "" ) then + grids(igrid)%aa=0.d0 + else + read(unit=value,fmt=*) grids(igrid)%aa + end if + + value = getValue(attributes,"n") + if (value == "" ) then + grids(igrid)%nn=0 + else + read(unit=value,fmt=*) grids(igrid)%nn + end if + + value = getValue(attributes,"d") + if (value == "" ) then + grids(igrid)%dd=0.d0 + else + read(unit=value,fmt=*) grids(igrid)%dd + end if + + value = getValue(attributes,"b") + if (value == "" ) then + grids(igrid)%bb=0.d0 + else + read(unit=value,fmt=*) grids(igrid)%bb + end if + + value = getValue(attributes,"istart") + if (value == "" ) then + msg="Cannot determine istart" + LIBPAW_ERROR(msg) + end if + read(unit=value,fmt=*) grids(igrid)%istart + + value = getValue(attributes,"iend") + if (value == "" ) then + msg="Cannot determine iend" + LIBPAW_ERROR(msg) + end if + read(unit=value,fmt=*) grids(igrid)%iend + + value = getValue(attributes,"id") + if (value == "" ) value = "unknown" + grids(igrid)%id = trim(value) + +end select + +select case(name) + case ("shape_function") + paw_setuploc%shape_function%tread=.true. + value = getValue(attributes,"type") + if (value == "" ) value = "unknown" + paw_setuploc%shape_function%gtype = trim(value) + + value = getValue(attributes,"grid") + paw_setuploc%shape_function%grid=trim(value) + if (value /= "" ) then + paw_setuploc%shape_function%gtype ="num" + do ii=1,igrid + if(trim(paw_setuploc%shape_function%grid)==trim(grids(ii)%id)) then + mesh_size=grids(ii)%iend-grids(ii)%istart+1 + end if + end do + ishpf=ishpf+1 + LIBPAW_ALLOCATE(shpf(ishpf)%data,(mesh_size)) + rp=>shpf(ishpf) + in_data=.true. + ndata = 0 + end if + + value = getValue(attributes,"rc") + if (value == "" ) then + if(paw_setuploc%shape_function%gtype /="num") then + msg="Cannot determine rc" + LIBPAW_ERROR(msg) + end if + else + read(unit=value,fmt=*) paw_setuploc%shape_function%rc + end if + + value = getValue(attributes,"lamb") + if (value == "" ) then + paw_setuploc%shape_function%lamb=0 + else + read(unit=value,fmt=*) paw_setuploc%shape_function%lamb + end if + + case ("pseudo_partial_wave") + ipswf=ipswf+1 + paw_setuploc%pseudo_partial_wave(ipswf)%tread=.true. + value = getValue(attributes,"grid") + if (value == "" ) value = "unknown" + paw_setuploc%idgrid = trim(value) + paw_setuploc%pseudo_partial_wave(ipswf)%grid=trim(value) + + value = getValue(attributes,"state") + if (value == "" ) then + msg="Cannot determine pseudo_partial_wave state" + LIBPAW_ERROR(msg) + end if + paw_setuploc%pseudo_partial_wave(ipswf)%state=trim(value) + + do ii=1,igrid + if(trim(paw_setuploc%pseudo_partial_wave(ipswf)%grid)==trim(grids(ii)%id)) then + mesh_size=grids(ii)%iend-grids(ii)%istart+1 + end if + end do + + LIBPAW_ALLOCATE(paw_setuploc%pseudo_partial_wave(ipswf)%data,(mesh_size)) + rp=>paw_setuploc%pseudo_partial_wave(ipswf) + if(ipswf==paw_setuploc%valence_states%nval) ipswf=0 + in_data=.true. + ndata = 0 + + case ("ae_partial_wave") + iaewf=iaewf+1 + paw_setuploc%ae_partial_wave(iaewf)%tread=.true. + value = getValue(attributes,"grid") + if (value == "" ) value = "unknown" + paw_setuploc%ae_partial_wave(iaewf)%grid=trim(value) + + value = getValue(attributes,"state") + if (value == "" ) then + LIBPAW_ERROR("Cannot determine ae_partial_wave state") + end if + paw_setuploc%ae_partial_wave(iaewf)%state=trim(value) + + do ii=1,igrid + if(trim(paw_setuploc%ae_partial_wave(iaewf)%grid)==trim(grids(ii)%id)) then + mesh_size=grids(ii)%iend-grids(ii)%istart+1 + end if + end do + + LIBPAW_ALLOCATE(paw_setuploc%ae_partial_wave(iaewf)%data,(mesh_size)) + rp=>paw_setuploc%ae_partial_wave(iaewf) + if(iaewf==paw_setuploc%valence_states%nval) iaewf=0 + in_data=.true. + ndata = 0 + + case ("projector_function") + iproj=iproj+1 + paw_setuploc%projector_function(iproj)%tread=.true. + value = getValue(attributes,"grid") + if (value == "" ) value = "unknown" + paw_setuploc%projector_function(iproj)%grid=trim(value) + + value = getValue(attributes,"state") + if (value == "" ) then + msg="Cannot determine projector_function state" + LIBPAW_ERROR(msg) + end if + paw_setuploc%projector_function(iproj)%state=trim(value) + + do ii=1,igrid + if(trim(paw_setuploc%projector_function(iproj)%grid)==trim(grids(ii)%id)) then + mesh_size=grids(ii)%iend-grids(ii)%istart+1 + end if + end do + + LIBPAW_ALLOCATE(paw_setuploc%projector_function(iproj)%data,(mesh_size)) + rp=>paw_setuploc%projector_function(iproj) + if(iproj==paw_setuploc%valence_states%nval) iproj=0 + in_data=.true. + ndata = 0 + + case ("projector_fit") + if(.not.allocated(paw_setuploc%projector_fit)) then + LIBPAW_DATATYPE_ALLOCATE(paw_setuploc%projector_fit,(paw_setuploc%valence_states%nval)) + end if + + iprojfit=iprojfit+1 + paw_setuploc%projector_fit(iprojfit)%tread=.true. + value = getValue(attributes,"state") + if (value == "" ) then + msg="Cannot determine projector_fit state" + LIBPAW_ERROR(msg) + end if + paw_setuploc%projector_fit(iprojfit)%state=trim(value) + + if(iprojfit==paw_setuploc%valence_states%nval) iprojfit=0 + igauss = 0 + + case ("gaussian") + igauss = igauss + 1 + value = getValue(attributes,"factor") + if (value == "" ) then + msg="Cannot determine gaussian factor" + LIBPAW_ERROR(msg) + end if + read(value(2:100), *) paw_setuploc%projector_fit(iprojfit)%factors(1, igauss) + read(value(index(value, ',') + 1:100), *) paw_setuploc%projector_fit(iprojfit)%factors(2, igauss) + value = getValue(attributes,"exponent") + if (value == "" ) then + msg="Cannot determine gaussian exponent" + LIBPAW_ERROR(msg) + end if + read(value(2:100), *) paw_setuploc%projector_fit(iprojfit)%expos(1, igauss) + read(value(index(value, ',') + 1:100), *) paw_setuploc%projector_fit(iprojfit)%expos(2, igauss) + + case ("ae_core_density") + paw_setuploc%ae_core_density%tread=.true. + value = getValue(attributes,"grid") + if (value == "" ) value = "unknown" + paw_setuploc%ae_core_density%grid=trim(value) + + value = getValue(attributes,"state") + if (value == "" ) value = "unknown" + paw_setuploc%ae_core_density%state=trim(value) + + do ii=1,igrid + if(trim(paw_setuploc%ae_core_density%grid)==trim(grids(ii)%id)) then + mesh_size=grids(ii)%iend-grids(ii)%istart+1 + end if + end do + + LIBPAW_ALLOCATE(paw_setuploc%ae_core_density%data,(mesh_size)) + rp=>paw_setuploc%ae_core_density + in_data=.true. + ndata = 0 + + case ("pseudo_core_density") + paw_setuploc%pseudo_core_density%tread=.true. + value = getValue(attributes,"grid") + if (value == "" ) value = "unknown" + paw_setuploc%pseudo_core_density%grid=trim(value) + + value = getValue(attributes,"state") + if (value == "" ) value = "unknown" + paw_setuploc%pseudo_core_density%state=trim(value) + + do ii=1,igrid + if(trim(paw_setuploc%pseudo_core_density%grid)==trim(grids(ii)%id)) then + mesh_size=grids(ii)%iend-grids(ii)%istart+1 + end if + end do + + LIBPAW_ALLOCATE(paw_setuploc%pseudo_core_density%data,(mesh_size)) + rp=>paw_setuploc%pseudo_core_density + in_data=.true. + ndata = 0 + + case ("pseudo_valence_density") + paw_setuploc%pseudo_valence_density%tread=.true. + value = getValue(attributes,"grid") + if (value == "" ) value = "unknown" + paw_setuploc%pseudo_valence_density%grid=trim(value) + + value = getValue(attributes,"state") + if (value == "" ) value = "unknown" + paw_setuploc%pseudo_valence_density%state=trim(value) + + do ii=1,igrid + if(trim(paw_setuploc%pseudo_valence_density%grid)==trim(grids(ii)%id)) then + mesh_size=grids(ii)%iend-grids(ii)%istart+1 + end if + end do + + LIBPAW_ALLOCATE(paw_setuploc%pseudo_valence_density%data,(mesh_size)) + rp=>paw_setuploc%pseudo_valence_density + in_data=.true. + ndata = 0 + + case ("zero_potential") + paw_setuploc%zero_potential%tread=.true. + value = getValue(attributes,"grid") + if (value == "" ) value = "unknown" + paw_setuploc%zero_potential%grid=trim(value) + + value = getValue(attributes,"state") + if (value == "" ) value = "unknown" + paw_setuploc%zero_potential%state=trim(value) + + do ii=1,igrid + if(trim(paw_setuploc%zero_potential%grid)==trim(grids(ii)%id)) then + mesh_size=grids(ii)%iend-grids(ii)%istart+1 + end if + end do + + LIBPAW_ALLOCATE(paw_setuploc%zero_potential%data,(mesh_size)) + rp=>paw_setuploc%zero_potential + in_data=.true. + ndata = 0 + + case ("LDA_minus_half_potential") + paw_setuploc%LDA_minus_half_potential%tread=.true. + value = getValue(attributes,"grid") + if (value == "" ) value = "unknown" + paw_setuploc%LDA_minus_half_potential%grid=trim(value) + + value = getValue(attributes,"state") + if (value == "" ) value = "unknown" + paw_setuploc%LDA_minus_half_potential%state=trim(value) + + do ii=1,igrid + if(trim(paw_setuploc%LDA_minus_half_potential%grid)==trim(grids(ii)%id)) then + mesh_size=grids(ii)%iend-grids(ii)%istart+1 + end if + end do + + LIBPAW_ALLOCATE(paw_setuploc%LDA_minus_half_potential%data,(mesh_size)) + rp=>paw_setuploc%LDA_minus_half_potential + in_data=.true. + ndata = 0 + + case ("ae_core_kinetic_energy_density") + paw_setuploc%ae_core_kinetic_energy_density%tread=.true. + value = getValue(attributes,"grid") + if (value == "" ) value = "unknown" + paw_setuploc%ae_core_kinetic_energy_density%grid=trim(value) + + value = getValue(attributes,"state") + if (value == "" ) value = "unknown" + paw_setuploc%ae_core_kinetic_energy_density%state=trim(value) + + do ii=1,igrid + if(trim(paw_setuploc%ae_core_kinetic_energy_density%grid)==trim(grids(ii)%id)) then + mesh_size=grids(ii)%iend-grids(ii)%istart+1 + end if + end do + + LIBPAW_ALLOCATE(paw_setuploc%ae_core_kinetic_energy_density%data,(mesh_size)) + rp=>paw_setuploc%ae_core_kinetic_energy_density + in_data=.true. + ndata = 0 + + case ("pseudo_core_kinetic_energy_density") + paw_setuploc%pseudo_core_kinetic_energy_density%tread=.true. + value = getValue(attributes,"grid") + if (value == "" ) value = "unknown" + paw_setuploc%pseudo_core_kinetic_energy_density%grid=trim(value) + + value = getValue(attributes,"state") + if (value == "" ) value = "unknown" + paw_setuploc%pseudo_core_kinetic_energy_density%state=trim(value) + + do ii=1,igrid + if(trim(paw_setuploc%pseudo_core_kinetic_energy_density%grid)==trim(grids(ii)%id)) then + mesh_size=grids(ii)%iend-grids(ii)%istart+1 + end if + end do + + LIBPAW_ALLOCATE(paw_setuploc%pseudo_core_kinetic_energy_density%data,(mesh_size)) + rp=>paw_setuploc%pseudo_core_kinetic_energy_density + in_data=.true. + ndata = 0 + + case ("kresse_joubert_local_ionic_potential") + paw_setuploc%kresse_joubert_local_ionic_potential%tread=.true. + value = getValue(attributes,"grid") + if (value == "" ) value = "unknown" + paw_setuploc%kresse_joubert_local_ionic_potential%grid=trim(value) + + value = getValue(attributes,"state") + if (value == "" ) value = "unknown" + paw_setuploc%kresse_joubert_local_ionic_potential%state=trim(value) + + do ii=1,igrid + if(trim(paw_setuploc%kresse_joubert_local_ionic_potential%grid)==trim(grids(ii)%id)) then + mesh_size=grids(ii)%iend-grids(ii)%istart+1 + end if + end do + + LIBPAW_ALLOCATE(paw_setuploc%kresse_joubert_local_ionic_potential%data,(mesh_size)) + rp=>paw_setuploc%kresse_joubert_local_ionic_potential + in_data=.true. + ndata = 0 + + case ("blochl_local_ionic_potential") + paw_setuploc%blochl_local_ionic_potential%tread=.true. + value = getValue(attributes,"grid") + if (value == "" ) value = "unknown" + paw_setuploc%blochl_local_ionic_potential%grid=trim(value) + + value = getValue(attributes,"state") + if (value == "" ) value = "unknown" + paw_setuploc%blochl_local_ionic_potential%state=trim(value) + + do ii=1,igrid + if(trim(paw_setuploc%blochl_local_ionic_potential%grid)==trim(grids(ii)%id)) then + mesh_size=grids(ii)%iend-grids(ii)%istart+1 + end if + end do + + LIBPAW_ALLOCATE(paw_setuploc%blochl_local_ionic_potential%data,(mesh_size)) + rp=>paw_setuploc%blochl_local_ionic_potential + in_data=.true. + ndata = 0 + + case ("kinetic_energy_differences") + paw_setuploc%kinetic_energy_differences%tread=.true. + mesh_size=paw_setuploc%valence_states%nval*paw_setuploc%valence_states%nval + LIBPAW_ALLOCATE(paw_setuploc%kinetic_energy_differences%data,(mesh_size)) + rp=>paw_setuploc%kinetic_energy_differences + in_data=.true. + ndata = 0 + +end select + +end subroutine paw_begin_element1 +!!*** + +!------------------------------------------------------------------------- + +!!****f* m_pawxmlps/paw_end_element1 +!! NAME +!! end_element +!! +!! FUNCTION +!! End XML tag effect: switches flags in private data of this module +!! +!! INPUTS +!! namespaceURI = universal resource indicator for XML namespace??? Not used. +!! localName = local equivalent of tag name?? Not used. +!! name = name of XML tag which has been read in +!! +!! OUTPUT +!! side effect: private data flags in present module are turned to .false. +!! +!! SOURCE +subroutine paw_end_element1(namespaceURI,localName,name) + +character(len=*),intent(in) :: namespaceURI,localName,name +character(len=100) :: msg,value + +!Just to fool abirules + value=localName + value=namespaceURI + +select case(name) + + case ("generator") + in_generator = .false. + + case ("valence_states") + in_valenceStates = .false. + if(ival>50) then + msg="ival>50" + LIBPAW_ERROR(msg) + end if + if(ival>0)then + LIBPAW_DATATYPE_ALLOCATE(paw_setuploc%valence_states%state,(ival)) + paw_setuploc%valence_states%state(ival)%tread=.true. + paw_setuploc%valence_states%nval=ival + do ii=1,ival + paw_setuploc%valence_states%state(ii)=valstate(ii) + end do + end if + LIBPAW_DATATYPE_DEALLOCATE(valstate) + if(.not.allocated(paw_setuploc%ae_partial_wave)) then + LIBPAW_DATATYPE_ALLOCATE(paw_setuploc%ae_partial_wave,(paw_setuploc%valence_states%nval)) + end if + if(.not.allocated(paw_setuploc%pseudo_partial_wave)) then + LIBPAW_DATATYPE_ALLOCATE(paw_setuploc%pseudo_partial_wave,(paw_setuploc%valence_states%nval)) + end if + if(.not.allocated(paw_setuploc%projector_function)) then + LIBPAW_DATATYPE_ALLOCATE(paw_setuploc%projector_function,(paw_setuploc%valence_states%nval)) + end if + + case ("paw_setup") + if(igrid>10) then + msg="igrid>10" + LIBPAW_ERROR(msg) + end if + LIBPAW_DATATYPE_ALLOCATE(paw_setuploc%radial_grid,(igrid)) + paw_setuploc%radial_grid(igrid)%tread=.true. + paw_setuploc%ngrid=igrid + do ii=1,igrid + paw_setuploc%radial_grid(ii)=grids(ii) + end do + LIBPAW_DATATYPE_DEALLOCATE(grids) + do ii=1,igrid + if(trim(paw_setuploc%shape_function%grid)==trim(paw_setuploc%radial_grid(ii)%id)) then + mesh_size=paw_setuploc%radial_grid(ii)%iend-paw_setuploc%radial_grid(ii)%istart+1 + end if + end do + if(ishpf>10) then + msg="ishpf>7" + LIBPAW_ERROR(msg) + end if + LIBPAW_ALLOCATE(paw_setuploc%shape_function%data,(mesh_size,ishpf)) + do ii=1,ishpf + paw_setuploc%shape_function%data(:,ii)=shpf(ii)%data(:) + LIBPAW_DEALLOCATE(shpf(ii)%data) + end do + LIBPAW_DATATYPE_DEALLOCATE(shpf) + + case ("shape_function") + in_data=.false. + + case ("pseudo_partial_wave") + in_data=.false. + + case ("ae_partial_wave") + in_data=.false. + + case ("projector_function") + in_data=.false. + + case ("ae_core_density") + in_data=.false. + + case ("pseudo_core_density") + in_data=.false. + + case ("pseudo_valence_density") + in_data=.false. + + case ("zero_potential") + in_data=.false. + + case ("LDA_minus_half_potential") + in_data=.false. + + case ("ae_core_kinetic_energy_density") + in_data=.false. + + case ("pseudo_core_kinetic_energy_density") + in_data=.false. + + case ("kresse_joubert_local_ionic_potential") + in_data=.false. + + case ("blochl_local_ionic_potential") + in_data=.false. + + case ("kinetic_energy_differences") + in_data=.false. + +end select + +end subroutine paw_end_element1 +!!*** + +!------------------------------------------------------------------------- + +!!****f* m_pawxmlps/pawdata_chunk +!! NAME +!! pawdata_chunk +!! +!! FUNCTION +!! Take a string and turn it into useful data structure (reals) +!! +!! INPUTS +!! chunk=raw data for chunk of XML data +!! +!! OUTPUT +!! +!! SIDE EFFECTS +!! Copied and translated into module data (side effect) +!! +!! SOURCE +subroutine pawdata_chunk(chunk) + +character(len=*),intent(in) :: chunk + +integer :: ii,ntokens,status,last_pos +logical :: in_token +character(len=len(chunk)) :: str +character(len=50) :: msg +character(len=1) :: cc +real(dpxml),pointer :: x(:) + + +if (len_trim(chunk) == 0) RETURN ! skip empty chunk + +if (in_data) then + str = chunk ; x => rp%data + +! Check the contents of the string and find the number of tokens it contains +! The standard separator is generalized whitespace (space, tab, CR, or LF) + in_token=.false.;ntokens=0;last_pos=0 + do ii=1,len_trim(str) + cc=str(ii:ii) + if (in_token) then + if (cc==char(9).or.cc==char(10).or.cc==char(13).or.cc==char(32)) then + in_token = .false. + if (cc==char(10).or.cc==char(13)) str(ii:ii) = " " + else + last_pos=ii + end if + else + if (cc==char(9).or.cc==char(10).or.cc==char(13).or.cc==char(32)) then + if (cc==char(10).or.cc==char(13)) str(ii:ii) = " " + else + in_token=.true. + last_pos=ii + ntokens=ntokens + 1 + end if + end if + end do + + if ((ndata+ntokens)>size(x)) then + msg="data array full" + LIBPAW_ERROR(msg) + end if + +! Take the string and turn it into useful reals + read(unit=str(1:last_pos),fmt=*,iostat=status) x(ndata+1:ndata+ntokens) + if (status/=0) then + msg="real conversion error" + LIBPAW_ERROR(msg) + end if + ndata=ndata+ntokens + +end if + +end subroutine pawdata_chunk +!!*** + +#endif + +!------------------------------------------------------------------------- +!------------------------------------------------------------------------- +!------------- ROUTINES AND FUNCTIONS FOR THE FORTRAN READER ------------- +!------------------------------------------------------------------------- +!------------------------------------------------------------------------- + +!!****f* m_pawxmlps/paw_setup_free +!! NAME +!! paw_setup_free +!! +!! FUNCTION +!! Destroy a paw_setup datastructure +!! +!! SIDE EFFECTS +!! paw_setup=Datatype gathering information on XML paw setup. +!! +!! SOURCE + +subroutine paw_setup_free(paw_setupin) + +!Arguments ------------------------------------ +!scalars + type(paw_setup_t),intent(inout) :: paw_setupin + +!Local variables------------------------------- + integer :: ii + +! ********************************************************************* + + paw_setupin%tread=.false. + paw_setupin%atom%tread=.false. + paw_setupin%xc_functional%tread=.false. + paw_setupin%generator%tread=.false. + paw_setupin%valence_states%tread=.false. + paw_setupin%shape_function%tread=.false. + paw_setupin%ae_core_density%tread=.false. + paw_setupin%pseudo_core_density%tread=.false. + paw_setupin%pseudo_valence_density%tread=.false. + paw_setupin%zero_potential%tread=.false. + paw_setupin%LDA_minus_half_potential%tread=.false. + paw_setupin%ae_core_kinetic_energy_density%tread=.false. + paw_setupin%pseudo_core_kinetic_energy_density%tread=.false. + paw_setupin%kresse_joubert_local_ionic_potential%tread=.false. + paw_setupin%blochl_local_ionic_potential%tread=.false. + paw_setupin%kinetic_energy_differences%tread=.false. + paw_setupin%exact_exchange_matrix%tread=.false. + + if(allocated( paw_setupin%shape_function%data)) then + LIBPAW_DEALLOCATE(paw_setupin%shape_function%data) + end if + if(allocated( paw_setupin%ae_core_density%data)) then + LIBPAW_DEALLOCATE(paw_setupin%ae_core_density%data) + end if + if(allocated( paw_setupin%pseudo_core_density%data)) then + LIBPAW_DEALLOCATE(paw_setupin%pseudo_core_density%data) + end if + if(allocated( paw_setupin%pseudo_valence_density%data)) then + LIBPAW_DEALLOCATE(paw_setupin%pseudo_valence_density%data) + end if + if(allocated( paw_setupin%zero_potential%data)) then + LIBPAW_DEALLOCATE(paw_setupin%zero_potential%data) + end if + if(allocated( paw_setupin%LDA_minus_half_potential%data)) then + LIBPAW_DEALLOCATE(paw_setupin%LDA_minus_half_potential%data) + end if + if(allocated( paw_setupin%ae_core_kinetic_energy_density%data)) then + LIBPAW_DEALLOCATE(paw_setupin%ae_core_kinetic_energy_density%data) + end if + if(allocated( paw_setupin%pseudo_core_kinetic_energy_density%data)) then + LIBPAW_DEALLOCATE(paw_setupin%pseudo_core_kinetic_energy_density%data) + end if + if(allocated( paw_setupin%kresse_joubert_local_ionic_potential%data)) then + LIBPAW_DEALLOCATE(paw_setupin%kresse_joubert_local_ionic_potential%data) + end if + if(allocated( paw_setupin%blochl_local_ionic_potential%data)) then + LIBPAW_DEALLOCATE(paw_setupin%blochl_local_ionic_potential%data) + end if + if(allocated( paw_setupin%kinetic_energy_differences%data)) then + LIBPAW_DEALLOCATE(paw_setupin%kinetic_energy_differences%data) + end if + if(allocated( paw_setupin%exact_exchange_matrix%data)) then + LIBPAW_DEALLOCATE(paw_setupin%exact_exchange_matrix%data) + end if + if (allocated( paw_setupin%ae_partial_wave)) then + do ii=1,paw_setupin%valence_states%nval + if(allocated( paw_setupin%ae_partial_wave(ii)%data)) then + LIBPAW_DEALLOCATE(paw_setupin%ae_partial_wave(ii)%data) + end if + end do + LIBPAW_DATATYPE_DEALLOCATE(paw_setupin%ae_partial_wave) + end if + if (allocated( paw_setupin%pseudo_partial_wave)) then + do ii=1,paw_setupin%valence_states%nval + if(allocated( paw_setupin%pseudo_partial_wave(ii)%data)) then + LIBPAW_DEALLOCATE(paw_setupin%pseudo_partial_wave(ii)%data) + end if + end do + LIBPAW_DATATYPE_DEALLOCATE(paw_setupin%pseudo_partial_wave) + end if + if (allocated( paw_setupin%projector_function)) then + do ii=1,paw_setupin%valence_states%nval + if(allocated( paw_setupin%projector_function(ii)%data)) then + LIBPAW_DEALLOCATE(paw_setupin%projector_function(ii)%data) + end if + end do + LIBPAW_DATATYPE_DEALLOCATE(paw_setupin%projector_function) + end if + if (allocated( paw_setupin%projector_fit)) then + LIBPAW_DATATYPE_DEALLOCATE(paw_setupin%projector_fit) + end if + if(allocated(paw_setupin%valence_states%state)) then + LIBPAW_DATATYPE_DEALLOCATE(paw_setupin%valence_states%state) + end if + if(allocated( paw_setupin%radial_grid)) then + LIBPAW_DATATYPE_DEALLOCATE(paw_setupin%radial_grid) + end if + +end subroutine paw_setup_free +!!*** + +!------------------------------------------------------------------------- + +!!****f* m_pawxmlps/paw_setup_copy +!! NAME +!! paw_setup_copy +!! +!! FUNCTION +!! Copy a paw_setup datastructure into another +!! +!! INPUTS +!! +!! paw_setupin=input paw_setup datastructure +!! +!! OUTPUT +!! paw_setupout=output paw_setup datastructure +!! +!! SOURCE + +subroutine paw_setup_copy(paw_setupin,paw_setupout) + +!Arguments ------------------------------------ +!scalars + type(paw_setup_t),intent(in) :: paw_setupin + type(paw_setup_t),intent(out) :: paw_setupout + +!Local variables------------------------------- +!scalars + integer :: ii,sz1,sz2 + +! ********************************************************************* + +!scalars + paw_setupout%version=paw_setupin%version + paw_setupout%tread=paw_setupin%tread + paw_setupout%ngrid=paw_setupin%ngrid + paw_setupout%idgrid=paw_setupin%idgrid + paw_setupout%optortho=paw_setupin%optortho + paw_setupout%rpaw=paw_setupin%rpaw + paw_setupout%ex_cc=paw_setupin%ex_cc + paw_setupout%lamb_shielding=paw_setupin%lamb_shielding + paw_setupout%atom%tread=paw_setupin%atom%tread + paw_setupout%atom%symbol=paw_setupin%atom%symbol + paw_setupout%atom%znucl=paw_setupin%atom%znucl + paw_setupout%atom%zion=paw_setupin%atom%zion + paw_setupout%atom%zval=paw_setupin%atom%zval + paw_setupout%xc_functional%tread=paw_setupin%xc_functional%tread + paw_setupout%xc_functional%functionaltype=paw_setupin%xc_functional%functionaltype + paw_setupout%xc_functional%name=paw_setupin%xc_functional%name + paw_setupout%generator%tread=paw_setupin%generator%tread + paw_setupout%generator%gen=paw_setupin%generator%gen + paw_setupout%generator%name=paw_setupin%generator%name + paw_setupout%valence_states%tread=paw_setupin%valence_states%tread + paw_setupout%valence_states%nval=paw_setupin%valence_states%nval + paw_setupout%shape_function%tread=paw_setupin%shape_function%tread + paw_setupout%shape_function%gtype=paw_setupin%shape_function%gtype + paw_setupout%shape_function%grid=paw_setupin%shape_function%grid + paw_setupout%shape_function%rc=paw_setupin%shape_function%rc + paw_setupout%shape_function%lamb=paw_setupin%shape_function%lamb + paw_setupout%ae_core_density%tread=paw_setupin%ae_core_density%tread + paw_setupout%ae_core_density%grid=paw_setupin%ae_core_density%grid + paw_setupout%ae_core_density%state=paw_setupin%ae_core_density%state + paw_setupout%pseudo_core_density%tread=paw_setupin%pseudo_core_density%tread + paw_setupout%pseudo_core_density%grid=paw_setupin%pseudo_core_density%grid + paw_setupout%pseudo_core_density%state=paw_setupin%pseudo_core_density%state + paw_setupout%pseudo_valence_density%tread=paw_setupin%pseudo_valence_density%tread + paw_setupout%pseudo_valence_density%grid=paw_setupin%pseudo_valence_density%grid + paw_setupout%pseudo_valence_density%state=paw_setupin%pseudo_valence_density%state + paw_setupout%zero_potential%tread=paw_setupin%zero_potential%tread + paw_setupout%zero_potential%grid=paw_setupin%zero_potential%grid + paw_setupout%zero_potential%state=paw_setupin%zero_potential%state + paw_setupout%LDA_minus_half_potential%tread=paw_setupin%LDA_minus_half_potential%tread + paw_setupout%LDA_minus_half_potential%grid=paw_setupin%LDA_minus_half_potential%grid + paw_setupout%LDA_minus_half_potential%state=paw_setupin%LDA_minus_half_potential%state + paw_setupout%ae_core_kinetic_energy_density%tread=& +& paw_setupin%ae_core_kinetic_energy_density%tread + paw_setupout%ae_core_kinetic_energy_density%grid=& +& paw_setupin%ae_core_kinetic_energy_density%grid + paw_setupout%ae_core_kinetic_energy_density%state=& +& paw_setupin%ae_core_kinetic_energy_density%state + paw_setupout%pseudo_core_kinetic_energy_density%tread=& +& paw_setupin%pseudo_core_kinetic_energy_density%tread + paw_setupout%pseudo_core_kinetic_energy_density%grid=& +& paw_setupin%pseudo_core_kinetic_energy_density%grid + paw_setupout%pseudo_core_kinetic_energy_density%state=& +& paw_setupin%pseudo_core_kinetic_energy_density%state + paw_setupout%kresse_joubert_local_ionic_potential%tread=& +& paw_setupin%kresse_joubert_local_ionic_potential%tread + paw_setupout%kresse_joubert_local_ionic_potential%grid=& +& paw_setupin%kresse_joubert_local_ionic_potential%grid + paw_setupout%kresse_joubert_local_ionic_potential%state=& +& paw_setupin%kresse_joubert_local_ionic_potential%state + paw_setupout%blochl_local_ionic_potential%tread=& +& paw_setupin%blochl_local_ionic_potential%tread + paw_setupout%blochl_local_ionic_potential%grid=& +& paw_setupin%blochl_local_ionic_potential%grid + paw_setupout%blochl_local_ionic_potential%state=& +& paw_setupin%blochl_local_ionic_potential%state + paw_setupout%kinetic_energy_differences%tread=paw_setupin%kinetic_energy_differences%tread + paw_setupout%kinetic_energy_differences%grid=paw_setupin%kinetic_energy_differences%grid + paw_setupout%kinetic_energy_differences%state=paw_setupin%kinetic_energy_differences%state + paw_setupout%exact_exchange_matrix%tread=paw_setupin%exact_exchange_matrix%tread +! allocatable arrays + if (allocated(paw_setupin%shape_function%data)) then + sz1=size(paw_setupin%shape_function%data,1) + sz2=size(paw_setupin%shape_function%data,2) + LIBPAW_ALLOCATE(paw_setupout%shape_function%data,(sz1,sz2)) + paw_setupout%shape_function%data=paw_setupin%shape_function%data + end if + if (allocated(paw_setupin%ae_core_density%data)) then + sz1=size(paw_setupin%ae_core_density%data,1) + LIBPAW_ALLOCATE(paw_setupout%ae_core_density%data,(sz1)) + paw_setupout%ae_core_density%data=paw_setupin%ae_core_density%data + end if + if (allocated(paw_setupin%pseudo_core_density%data)) then + sz1=size(paw_setupin%pseudo_core_density%data,1) + LIBPAW_ALLOCATE(paw_setupout%pseudo_core_density%data,(sz1)) + paw_setupout%pseudo_core_density%data=paw_setupin%pseudo_core_density%data + end if + if (allocated(paw_setupin%pseudo_valence_density%data)) then + sz1=size(paw_setupin%pseudo_valence_density%data,1) + LIBPAW_ALLOCATE(paw_setupout%pseudo_valence_density%data,(sz1)) + paw_setupout%pseudo_valence_density%data=paw_setupin%pseudo_valence_density%data + end if + if (allocated(paw_setupin%zero_potential%data)) then + sz1=size(paw_setupin%zero_potential%data,1) + LIBPAW_ALLOCATE(paw_setupout%zero_potential%data,(sz1)) + paw_setupout%zero_potential%data=paw_setupin%zero_potential%data + end if + if (allocated(paw_setupin%LDA_minus_half_potential%data)) then + sz1=size(paw_setupin%LDA_minus_half_potential%data,1) + LIBPAW_ALLOCATE(paw_setupout%LDA_minus_half_potential%data,(sz1)) + paw_setupout%LDA_minus_half_potential%data=paw_setupin%LDA_minus_half_potential%data + end if + if (allocated(paw_setupin%ae_core_kinetic_energy_density%data)) then + sz1=size(paw_setupin%ae_core_kinetic_energy_density%data,1) + LIBPAW_ALLOCATE(paw_setupout%ae_core_kinetic_energy_density%data,(sz1)) + paw_setupout%ae_core_kinetic_energy_density%data=paw_setupin%ae_core_kinetic_energy_density%data + end if + if (allocated(paw_setupin%pseudo_core_kinetic_energy_density%data)) then + sz1=size(paw_setupin%pseudo_core_kinetic_energy_density%data,1) + LIBPAW_ALLOCATE(paw_setupout%pseudo_core_kinetic_energy_density%data,(sz1)) + paw_setupout%pseudo_core_kinetic_energy_density%data=paw_setupin%pseudo_core_kinetic_energy_density%data + end if + if (allocated(paw_setupin%kresse_joubert_local_ionic_potential%data)) then + sz1=size(paw_setupin%kresse_joubert_local_ionic_potential%data,1) + LIBPAW_ALLOCATE(paw_setupout%kresse_joubert_local_ionic_potential%data,(sz1)) + paw_setupout%kresse_joubert_local_ionic_potential%data=paw_setupin%kresse_joubert_local_ionic_potential%data + end if + if (allocated(paw_setupin%blochl_local_ionic_potential%data)) then + sz1=size(paw_setupin%blochl_local_ionic_potential%data,1) + LIBPAW_ALLOCATE(paw_setupout%blochl_local_ionic_potential%data,(sz1)) + paw_setupout%blochl_local_ionic_potential%data=paw_setupin%blochl_local_ionic_potential%data + end if + if (allocated(paw_setupin%exact_exchange_matrix%data)) then + sz1=size(paw_setupin%exact_exchange_matrix%data,1) + LIBPAW_ALLOCATE(paw_setupout%exact_exchange_matrix%data,(sz1)) + paw_setupout%exact_exchange_matrix%data=paw_setupin%exact_exchange_matrix%data + end if + if (allocated(paw_setupin%kinetic_energy_differences%data)) then + sz1=size(paw_setupin%kinetic_energy_differences%data,1) + LIBPAW_ALLOCATE(paw_setupout%kinetic_energy_differences%data,(sz1)) + paw_setupout%kinetic_energy_differences%data=paw_setupin%kinetic_energy_differences%data + end if + if(allocated( paw_setupin%radial_grid)) then + sz1=size(paw_setupin%radial_grid,1) + LIBPAW_DATATYPE_ALLOCATE(paw_setupout%radial_grid,(sz1)) + paw_setupout%radial_grid=paw_setupin%radial_grid + end if + if(allocated(paw_setupin%valence_states%state)) then + sz1=size(paw_setupin%valence_states%state,1) + LIBPAW_DATATYPE_ALLOCATE(paw_setupout%valence_states%state,(sz1)) + paw_setupout%valence_states%state=paw_setupin%valence_states%state + end if + + if (allocated( paw_setupin%ae_partial_wave)) then + sz1=size(paw_setupin%ae_partial_wave,1) + LIBPAW_DATATYPE_ALLOCATE(paw_setupout%ae_partial_wave,(sz1)) + do ii=1,paw_setupin%valence_states%nval + paw_setupout%ae_partial_wave(ii)%tread=paw_setupin%ae_partial_wave(ii)%tread + paw_setupout%ae_partial_wave(ii)%grid=paw_setupin%ae_partial_wave(ii)%grid + paw_setupout%ae_partial_wave(ii)%state=paw_setupin%ae_partial_wave(ii)%state + if(allocated( paw_setupin%ae_partial_wave(ii)%data)) then + sz1=size(paw_setupin%ae_partial_wave(ii)%data,1) + LIBPAW_ALLOCATE(paw_setupout%ae_partial_wave(ii)%data,(sz1)) + paw_setupout%ae_partial_wave(ii)%data=paw_setupin%ae_partial_wave(ii)%data + end if + end do + end if + if (allocated( paw_setupin%pseudo_partial_wave)) then + sz1=size(paw_setupin%pseudo_partial_wave,1) + LIBPAW_DATATYPE_ALLOCATE(paw_setupout%pseudo_partial_wave,(sz1)) + do ii=1,paw_setupin%valence_states%nval + paw_setupout%pseudo_partial_wave(ii)%tread=paw_setupin%pseudo_partial_wave(ii)%tread + paw_setupout%pseudo_partial_wave(ii)%grid=paw_setupin%pseudo_partial_wave(ii)%grid + paw_setupout%pseudo_partial_wave(ii)%state=paw_setupin%pseudo_partial_wave(ii)%state + if(allocated( paw_setupin%pseudo_partial_wave(ii)%data)) then + sz1=size(paw_setupin%pseudo_partial_wave(ii)%data,1) + LIBPAW_ALLOCATE(paw_setupout%pseudo_partial_wave(ii)%data,(sz1)) + paw_setupout%pseudo_partial_wave(ii)%data=paw_setupin%pseudo_partial_wave(ii)%data + end if + end do + end if + if (allocated( paw_setupin%projector_function)) then + sz1=size(paw_setupin%projector_function,1) + LIBPAW_DATATYPE_ALLOCATE(paw_setupout%projector_function,(sz1)) + do ii=1,paw_setupin%valence_states%nval + paw_setupout%projector_function(ii)%tread=paw_setupin%projector_function(ii)%tread + paw_setupout%projector_function(ii)%grid=paw_setupin%projector_function(ii)%grid + paw_setupout%projector_function(ii)%state=paw_setupin%projector_function(ii)%state + if(allocated( paw_setupin%projector_function(ii)%data)) then + sz1=size(paw_setupin%projector_function(ii)%data,1) + LIBPAW_ALLOCATE(paw_setupout%projector_function(ii)%data,(sz1)) + paw_setupout%projector_function(ii)%data=paw_setupin%projector_function(ii)%data + end if + end do + end if + if (allocated( paw_setupin%projector_fit)) then + sz1=size(paw_setupin%projector_fit,1) + LIBPAW_DATATYPE_ALLOCATE(paw_setupout%projector_fit,(sz1)) + do ii=1,paw_setupin%valence_states%nval + paw_setupout%projector_fit(ii)%tread=paw_setupin%projector_fit(ii)%tread + paw_setupout%projector_fit(ii)%ngauss=paw_setupin%projector_fit(ii)%ngauss + paw_setupout%projector_fit(ii)%state=paw_setupin%projector_fit(ii)%state + paw_setupout%projector_fit(ii)%factors=paw_setupin%projector_fit(ii)%factors + paw_setupout%projector_fit(ii)%expos=paw_setupin%projector_fit(ii)%expos + end do + end if + +end subroutine paw_setup_copy +!!*** + +!------------------------------------------------------------------------- + +!!****f* m_pawxmlps/paw_rdfromline +!! NAME +!! paw_rdfromline +!! +!! FUNCTION +!! Read the value of a keyword from a XML line +!! +!! INPUTS +!! keyword= keyword which value has to be read +!! line= string from which the data are read (line from a XML) +!! +!! OUTPUT +!! ierr= error code +!! output= (string) value of the keyword +!! +!! SOURCE + + subroutine paw_rdfromline(keyword,line,output,ierr) + +!Arguments --------------------------------------------- + character(len=*), intent(in) :: keyword,line + character(len=*), intent(out) :: output + integer, intent(out) :: ierr +!Local variables --------------------------------------- + character(len=len(line)) :: temp + integer :: pos,pos2 + +! ********************************************************************* + + ierr=1;output="" + pos=index(line,trim(keyword)) + if (pos>0) then + temp=line(pos+len_trim(keyword):len_trim(line)) + pos=index(temp,char(34)) + if (pos>0) then + pos2=index(temp(pos+1:len_trim(temp)),char(34)) + if (pos2>0) then + output=temp(pos+1:pos+pos2-1) + end if + end if + end if + + end subroutine paw_rdfromline +!!*** + +!------------------------------------------------------------------------- + +!!****f* m_pawxmlps/rdpawpsxml_header +!! NAME +!! rdpawpsxml_header +!! +!! FUNCTION +!! Read the header of a PAW pseudopotential XML file generated by AtomPAW +!! +!! INPUTS +!! filename= input file name (atomicdata XML) +!! +!! OUTPUT +!! paw_setup=pseudopotential data structure +!! +!! SOURCE + + subroutine rdpawpsxml_header(ecut_tmp,filename,paw_setup) + +!Arguments --------------------------------------------- + + character (len=fnlen),intent(in) :: filename + real(dp), intent(inout) :: ecut_tmp(3,2) + type(paw_setup_t),intent(inout) :: paw_setup +!Local variables --------------------------------------- + integer :: funit,ii,ir,igrid,ival,ierr,ishpf,lmax,mesh_size + logical :: endfile,found + character(len=100) :: msg + character (len=XML_RECL) :: line,readline + character (len=XML_RECL) :: strg + character (len=30) :: strg1 + real(dp) :: rc(6) + real(dp), allocatable :: shpf(:,:) + type(state_t), pointer :: valstate (:) + type(radial_grid_t), pointer :: grids (:) + +! ************************************************************************* + +!Open the atomicdata XML file for reading + open(newunit=funit,file=filename,form='formatted',status='old', recl=XML_RECL) + +!Start a reading loop + endfile=.false. + found=.false. + paw_setup%rpaw=-1.d0 + rc=-1.d0 + + do while ((.not.endfile).and.(.not.found)) + read(funit,'(a)',err=10,end=10) readline + line=adjustl(readline);goto 20 + 10 line="";endfile=.true. + 20 continue + +! --Read VERSION + if ((line(1:10)=='') then + paw_setup%valence_states%tread=.true. + LIBPAW_DATATYPE_ALLOCATE(valstate,(50)) + ival=0 + lmax=0 + do while (line(1:17)/='') + read(funit,'(a)') readline;line=adjustl(readline) + if (line(1:6)=='50) then + close(funit) + msg="Error in rdpawps1xml: basis size too large (>50)!" + LIBPAW_ERROR(msg) + end if + call paw_rdfromline(" n",line,strg,ierr) + if (strg == "" ) then + valstate(ival)%nn=-1 + else + if (len(trim(strg))<=30) then + strg1=trim(strg) + read(unit=strg1,fmt=*) valstate(ival)%nn + else + read(unit=strg,fmt=*) valstate(ival)%nn + end if + end if + call paw_rdfromline(" l",line,strg,ierr) + if (len(trim(strg))<=30) then + strg1=trim(strg) + read(unit=strg1,fmt=*) valstate(ival)%ll + else + read(unit=strg,fmt=*) valstate(ival)%ll + end if + if(valstate(ival)%ll>lmax) lmax=valstate(ival)%ll + call paw_rdfromline(" f",line,strg,ierr) + if (strg == "" ) then + valstate(ival)%ff=-1.d0 + else + if (len(trim(strg))<=30) then + strg1=trim(strg) + read(unit=strg1,fmt=*) valstate(ival)%ff + else + read(unit=strg,fmt=*) valstate(ival)%ff + end if + end if + call paw_rdfromline(" rc",line,strg,ierr) + if (len(trim(strg))<=30) then + strg1=trim(strg) + read(unit=strg1,fmt=*) valstate(ival)%rc + else + read(unit=strg,fmt=*) valstate(ival)%rc + end if + call paw_rdfromline(" e",line,strg,ierr) + if (len(trim(strg))<=30) then + strg1=trim(strg) + read(unit=strg1,fmt=*) valstate(ival)%ee + else + read(unit=strg,fmt=*) valstate(ival)%ee + end if + call paw_rdfromline(" id",line,strg,ierr) + valstate(ival)%id = trim(strg) + end if + end do + cycle + end if + +! --Read MESH_STEP AND NUMBER OF POINTS + if (line(1:12)=='10)then + close(funit) + msg="igrid>10" + LIBPAW_ERROR(msg) + end if + cycle + end if + +! --Read SHAPE TYPE + if (line(1:15)=='0)then + LIBPAW_DATATYPE_ALLOCATE(paw_setup%valence_states%state,(ival)) + paw_setup%valence_states%state(ival)%tread=.true. + paw_setup%valence_states%nval=ival + do ii=1,ival + paw_setup%valence_states%state(ii)=valstate(ii) + end do + end if + LIBPAW_DATATYPE_DEALLOCATE(valstate) + LIBPAW_DATATYPE_ALLOCATE(paw_setup%radial_grid,(igrid)) + paw_setup%radial_grid(igrid)%tread=.true. + paw_setup%ngrid=igrid + do ii=1,igrid + paw_setup%radial_grid(ii)=grids(ii) + end do + LIBPAW_DATATYPE_DEALLOCATE(grids) + if(allocated(shpf)) then + LIBPAW_DEALLOCATE(shpf) + end if + close(funit) + + end subroutine rdpawpsxml_header +!!*** + +!------------------------------------------------------------------------- + +!!****f* m_pawxmlps/rdpawpsxml +!! NAME +!! rdpawpsxml +!! +!! FUNCTION +!! Read the PAW pseudopotential XML file generated by AtomPAW +!! +!! INPUTS +!! filename= input file name (atomicdata XML) +!! +!! OUTPUT +!! paw_setup=pseudopotential data structure +!! +!! SOURCE + + subroutine rdpawpsxml(filename,paw_setup) + +!Arguments --------------------------------------------- + character (len=fnlen),intent(in) :: filename + type(paw_setup_t),intent(inout) :: paw_setup +!Local variables --------------------------------------- + integer :: funit, iaewf,ii,ipswf,iproj,ir,igrid,ival,ierr,ishpf,lmax,mesh_size,igauss,iprojfit + logical :: endfile,found,endgauss + character(len=100) :: msg + character (len=XML_RECL) :: line,readline + character (len=XML_RECL) :: strg + character (len=30) :: strg1 + real(dp) :: rc(6) + real(dp), allocatable :: shpf(:,:) + type(state_t), pointer :: valstate (:) + type(radial_grid_t), pointer :: grids (:) + +! ************************************************************************* + +!Open the atomicdata XML file for reading + open(newunit=funit,file=filename,form='formatted',status='old', recl=XML_RECL) + +!Start a reading loop + endfile=.false. + found=.false. + paw_setup%rpaw=-1.d0 + rc=-1.d0 + + do while ((.not.endfile).and.(.not.found)) + read(funit,'(a)',err=10,end=10) readline + line=adjustl(readline);goto 20 + 10 line="";endfile=.true. + 20 continue + +! --Read VERSION + if ((line(1:10)=='') then + paw_setup%valence_states%tread=.true. + LIBPAW_DATATYPE_ALLOCATE(valstate,(50)) + ival=0 + lmax=0 + do while (line(1:17)/='') + read(funit,'(a)') readline;line=adjustl(readline) + if (line(1:6)=='50) then + close(funit) + msg="Error in rdpawps1xml: basis size too large (>50)!" + LIBPAW_ERROR(msg) + end if + call paw_rdfromline(" n",line,strg,ierr) + if (strg == "" ) then + valstate(ival)%nn=-1 + else + if (len(trim(strg))<=30) then + strg1=trim(strg) + read(unit=strg1,fmt=*) valstate(ival)%nn + else + read(unit=strg,fmt=*) valstate(ival)%nn + end if + end if + call paw_rdfromline(" l",line,strg,ierr) + if (len(trim(strg))<=30) then + strg1=trim(strg) + read(unit=strg1,fmt=*) valstate(ival)%ll + else + read(unit=strg,fmt=*) valstate(ival)%ll + end if + if(valstate(ival)%ll>lmax) lmax=valstate(ival)%ll + call paw_rdfromline(" f",line,strg,ierr) + if (strg == "" ) then + valstate(ival)%ff=-1.d0 + else + if (len(trim(strg))<=30) then + strg1=trim(strg) + read(unit=strg1,fmt=*) valstate(ival)%ff + else + read(unit=strg,fmt=*) valstate(ival)%ff + end if + end if + call paw_rdfromline(" rc",line,strg,ierr) + if (len(trim(strg))<=30) then + strg1=trim(strg) + read(unit=strg1,fmt=*) valstate(ival)%rc + else + read(unit=strg,fmt=*) valstate(ival)%rc + end if + call paw_rdfromline(" e",line,strg,ierr) + if (len(trim(strg))<=30) then + strg1=trim(strg) + read(unit=strg1,fmt=*) valstate(ival)%ee + else + read(unit=strg,fmt=*) valstate(ival)%ee + end if + call paw_rdfromline(" id",line,strg,ierr) + valstate(ival)%id = trim(strg) + end if + end do + cycle + end if + +! --Read MESH_STEP AND NUMBER OF POINTS + if (line(1:12)=='10)then + close(funit) + msg="igrid>10" + LIBPAW_ERROR(msg) + end if + cycle + end if + +! --Read SHAPE TYPE + if (line(1:15)=='0)then + LIBPAW_ALLOCATE(paw_setup%shape_function%data,(mesh_size,ishpf)) + do ii=1,ishpf + paw_setup%shape_function%data(:,ii)=shpf(:,ii) + end do + LIBPAW_DEALLOCATE(shpf) + end if + + if(ival>0)then + LIBPAW_DATATYPE_ALLOCATE(paw_setup%valence_states%state,(ival)) + paw_setup%valence_states%state(ival)%tread=.true. + paw_setup%valence_states%nval=ival + do ii=1,ival + paw_setup%valence_states%state(ii)=valstate(ii) + end do + end if + LIBPAW_DATATYPE_DEALLOCATE(valstate) + if(.not.allocated(paw_setup%ae_partial_wave)) then + LIBPAW_DATATYPE_ALLOCATE(paw_setup%ae_partial_wave,(paw_setup%valence_states%nval)) + end if + if(.not.allocated(paw_setup%pseudo_partial_wave)) then + LIBPAW_DATATYPE_ALLOCATE(paw_setup%pseudo_partial_wave,(paw_setup%valence_states%nval)) + end if + if(.not.allocated(paw_setup%projector_function)) then + LIBPAW_DATATYPE_ALLOCATE(paw_setup%projector_function,(paw_setup%valence_states%nval)) + end if + + LIBPAW_DATATYPE_ALLOCATE(paw_setup%radial_grid,(igrid)) + paw_setup%radial_grid(igrid)%tread=.true. + paw_setup%ngrid=igrid + do ii=1,igrid + paw_setup%radial_grid(ii)=grids(ii) + end do + LIBPAW_DATATYPE_DEALLOCATE(grids) + +!Start a reading loop + ipswf=0;iaewf=0;iproj=0;iprojfit=0 + endfile=.false. + do while (.not.endfile) + read(funit,'(a)',err=11,end=11) readline + line=adjustl(readline);goto 21 + 11 line="";endfile=.true. + 21 continue + +! --Read core density CORE_DENSITY + if (line(1:16)=='') then + paw_setup%kinetic_energy_differences%tread=.true. + mesh_size=paw_setup%valence_states%nval*paw_setup%valence_states%nval + LIBPAW_ALLOCATE(paw_setup%kinetic_energy_differences%data,(mesh_size)) + read(funit,*) (paw_setup%kinetic_energy_differences%data(ir),ir=1,mesh_size) + cycle + end if + +! --Read Exact exchange term EXACT_EXCHANGE_X_MATRIX + if (line(1:25)=='') then + paw_setup%exact_exchange_matrix%tread=.true. + mesh_size=paw_setup%valence_states%nval*paw_setup%valence_states%nval + LIBPAW_ALLOCATE(paw_setup%exact_exchange_matrix%data,(mesh_size)) + read(funit,*) (paw_setup%exact_exchange_matrix%data(ir),ir=1,mesh_size) + cycle + end if + +! --Read Exact exchange core-core energy + if (line(1:25)=='') then + tread=.true. + LIBPAW_DATATYPE_ALLOCATE(corestate,(50)) + icor=0 + do while (line(1:14)/='') + read(funit,'(a)') readline;line=adjustl(readline) + if (line(1:6)=='50) then + close(funit) + msg="basis size too large (>50)!" + LIBPAW_ERROR(msg) + end if + call paw_rdfromline(" n",line,strg,ierr) + if (strg == "" ) then + corestate(icor)%nn=-1 + else + if (len(trim(strg))<=30) then + strg1=trim(strg) + read(unit=strg1,fmt=*) corestate(icor)%nn + else + read(unit=strg,fmt=*) corestate(icor)%nn + end if + end if + call paw_rdfromline(" l",line,strg,ierr) + if (len(trim(strg))<=30) then + strg1=trim(strg) + read(unit=strg1,fmt=*) corestate(icor)%ll + else + read(unit=strg,fmt=*) corestate(icor)%ll + end if + if(diracrel) then!does not work if xml file is in the wrong order, which is bad xml, alternatives? + call paw_rdfromline(" kappa",line,strg,ierr) + if(present(kappacor)) then + if (len(trim(strg))<=30) then + strg1=trim(strg) + read(unit=strg1,fmt=*) corestate(icor)%kk + else + read(unit=strg,fmt=*) corestate(icor)%kk + end if + endif + endif + call paw_rdfromline(" f",line,strg,ierr) + if (strg == "" ) then + corestate(icor)%ff=-1.d0 + else + if (len(trim(strg))<=30) then + strg1=trim(strg) + read(unit=strg1,fmt=*) corestate(icor)%ff + else + read(unit=strg,fmt=*) corestate(icor)%ff + end if + end if + call paw_rdfromline(" rc",line,strg,ierr) + if (strg == "" ) then + corestate(icor)%rc=-1 + else + if (len(trim(strg))<=30) then + strg1=trim(strg) + read(unit=strg1,fmt=*) corestate(icor)%rc + else + read(unit=strg,fmt=*) corestate(icor)%rc + end if + end if + call paw_rdfromline(" e",line,strg,ierr) + if (len(trim(strg))<=30) then + strg1=trim(strg) + read(unit=strg1,fmt=*) corestate(icor)%ee + else + read(unit=strg,fmt=*) corestate(icor)%ee + end if + call paw_rdfromline(" id",line,strg,ierr) + corestate(icor)%id = trim(strg) + end if + end do + cycle + end if + +! --Read MESH_STEP AND NUMBER OF POINTS + if (line(1:12)=='10)then + close(funit) + msg="igrid>10" + LIBPAW_ERROR(msg) + end if + found=.true. + cycle + end if + +! End of reading loop + end do + + nphicor=icor + nmesh=igrid + if(nmesh>0)then + LIBPAW_DATATYPE_ALLOCATE(radmesh,(nmesh)) + LIBPAW_ALLOCATE(mesh_shift,(nmesh)) + do imsh=1,nmesh + radmesh(imsh)%mesh_type=-1 + radmesh(imsh)%rstep=zero + radmesh(imsh)%lstep=zero + mesh_shift(imsh)=0 + select case(trim(grids(imsh)%eq)) + case("r=a*exp(d*i)") + mesh_shift(imsh)=1 + radmesh(imsh)%mesh_type=3 + radmesh(imsh)%mesh_size=grids(imsh)%iend-grids(imsh)%istart+1+mesh_shift(imsh) + radmesh(imsh)%rstep=grids(imsh)%aa + radmesh(imsh)%lstep=grids(imsh)%dd + case("r=a*i/(1-b*i)") + write(msg, '(3a)' )& +& ' the grid r=a*i/(1-b*i) is not implemented in ABINIT !',ch10,& +& ' Action: check your psp file.' + LIBPAW_ERROR(msg) + case("r=a*i/(n-i)") + mesh_shift(imsh)=0 + radmesh(imsh)%mesh_type=5 + radmesh(imsh)%mesh_size=grids(imsh)%iend-grids(imsh)%istart+1+mesh_shift(imsh) + radmesh(imsh)%rstep=grids(imsh)%aa + radmesh(imsh)%lstep=dble(grids(imsh)%nn) + case("r=a*(exp(d*i)-1)") + mesh_shift(imsh)=0 + radmesh(imsh)%mesh_type=2 + radmesh(imsh)%mesh_size=grids(imsh)%iend-grids(imsh)%istart+1+mesh_shift(imsh) + if(grids(imsh)%istart==1)radmesh(imsh)%mesh_size=radmesh(imsh)%mesh_size+1 + radmesh(imsh)%rstep=grids(imsh)%aa + radmesh(imsh)%lstep=grids(imsh)%dd + case("r=d*i") + mesh_shift(imsh)=0 + radmesh(imsh)%mesh_type=1 + radmesh(imsh)%mesh_size=grids(imsh)%iend-grids(imsh)%istart+1+mesh_shift(imsh) + if(grids(imsh)%istart==1)radmesh(imsh)%mesh_size=radmesh(imsh)%mesh_size+1 + radmesh(imsh)%rstep=grids(imsh)%dd + case("r=(i/n+a)^5/a-a^4") + write(msg, '(3a)' )& +& ' the grid r=(i/n+a)^5/a-a^4 is not implemented in ABINIT !',ch10,& +& ' Action: check your psp file.' + LIBPAW_ERROR(msg) + end select + end do + end if + +!Initialize radial meshes + do imsh=1,nmesh + call pawrad_init(radmesh(imsh)) + end do + + maxmeshz=maxval(radmesh(:)%mesh_size) + LIBPAW_DATATYPE_ALLOCATE(gridwf,(nphicor)) + LIBPAW_DATATYPE_ALLOCATE(statewf,(nphicor)) + LIBPAW_ALLOCATE(phitmp,(maxmeshz,nphicor)) + phitmp(:,:)=zero + +!Start of reading loop + iaewf=0 ; endfile=.false. + do while (.not.endfile) + read(funit,'(a)',err=11,end=11) readline + line=adjustl(readline);goto 21 + 11 line="";endfile=.true. + 21 continue + +! --Read CORE WAVE FUNCTIONS PHI + if (line(1:21)=='0)then + LIBPAW_ALLOCATE(ncor,(nphicor)) + LIBPAW_ALLOCATE(lcor,(nphicor)) + LIBPAW_ALLOCATE(energy_cor,(nphicor)) + LIBPAW_ALLOCATE(phi_cor,(pawrad%mesh_size,nphicor)) + if (present(kappacor)) then + LIBPAW_ALLOCATE(kappacor,(nphicor)) + endif + phi_cor(:,:)=zero + do ii=1,nphicor + ncor(ii)=corestate(ii)%nn + lcor(ii)=corestate(ii)%ll + if(present(kappacor)) kappacor(ii)=corestate(ii)%kk + energy_cor(ii)=corestate(ii)%ee + do imsh=1,nmesh + if(trim(gridwf(ii))==trim(grids(imsh)%id)) imeshae=imsh + end do + if ((pawrad%mesh_type/=radmesh(imeshae)%mesh_type) & +& .or.(pawrad%rstep/=radmesh(imeshae)%rstep) & +& .or.(pawrad%lstep/=radmesh(imeshae)%lstep)) then + mesh_size=radmesh(imeshae)%mesh_size + LIBPAW_ALLOCATE(work,(mesh_size)) + call bound_deriv(phitmp(1:mesh_size,ii),radmesh(imeshae),mesh_size,yp1,ypn) + call paw_spline(radmesh(imeshae)%rad(1:mesh_size),phitmp(1:mesh_size,ii),mesh_size,yp1,ypn,work(1:mesh_size)) + ir=pawrad%mesh_size + if (radmesh(imeshae)%rmax&1 + +libpaw-install: libpaw-mklib | libpaw-mkbuilddir + @$(ECHO) -n "Installing library and modules in "$(INSTALL_DIR) + @if ! $(TEST) -d $(INSTALL_LIB_DIR); then $(MKDIR) $(INSTALL_LIB_DIR);fi + @$(RM) -rf $(INSTALL_LIB_DIR)/* + @$(CP) -rf $(BUILD_DIR)/libpaw.a $(INSTALL_LIB_DIR) + @if ! $(TEST) -d $(INSTALL_INC_DIR); then $(MKDIR) $(INSTALL_INC_DIR);fi + @$(RM) -rf $(INSTALL_INC_DIR)/* + @$(CP) $(SRC_BUILD_DIR)/*.mod $(INSTALL_INC_DIR) + @$(RM) -rf $(INSTALL_INC_DIR)/interfaces_??_libpaw.mod + @$(ECHO) " done!" + +libpaw-objs: libpaw-mkbuilddir + @$(CD) $(SRC_BUILD_DIR); \ + $(MAKE) $(LIBPAW_OBJ) INCS=-I$(SRC_DIR) + +#Generic rules +%.o: %.F90 + $(FC) $(FCFLAGS) -o $(@F) -c $< +%.o: %.c + $(CC) $(CFLAGS) -o $(@F) -c $< + +#Force sequential compilation (this should be corrected) +.NOTPARALLEL: diff --git a/GX-PAW/libpaw/utils/Makefile.src b/GX-PAW/libpaw/utils/Makefile.src new file mode 100644 index 00000000..d5406178 --- /dev/null +++ b/GX-PAW/libpaw/utils/Makefile.src @@ -0,0 +1,21 @@ +# =========================================== +# Makefile.src +# Generic make file to be used when +# building LIBPAW library +# M.T. June 13 +# =========================================== + +include ../../makefile.in + +all: + +default: + +clean: + @rm -rf *.o *.mod + +%.o: %.F90 + $(FC) ${FCFLAGS} $(INCS) -o $(@F) -c $< +%.o: %.c + $(CC) ${CFLAGS} $(INCS) -o $(@F) -c $< + diff --git a/GX-PAW/libpaw/utils/VERSION b/GX-PAW/libpaw/utils/VERSION new file mode 100644 index 00000000..bd73f470 --- /dev/null +++ b/GX-PAW/libpaw/utils/VERSION @@ -0,0 +1 @@ +0.4 diff --git a/GX-PAW/libpaw/utils/check-libpaw.py b/GX-PAW/libpaw/utils/check-libpaw.py new file mode 100755 index 00000000..aa9a04ea --- /dev/null +++ b/GX-PAW/libpaw/utils/check-libpaw.py @@ -0,0 +1,94 @@ +#!/usr/bin/env python +# encoding=utf8 +from __future__ import unicode_literals, division, print_function, absolute_import + +import tempfile +from subprocess import Popen +import string +import glob,os +import re +import sys +#reload(sys) +try: + sys.setdefaultencoding('utf8') +except AttributeError: + pass +from shutil import rmtree + +def main(home_dir=""): + # create tarball + sys.stdout.write("Creating tarball...\n") + + if home_dir!="": + bdir = os.path.join(home_dir,"bindings") + cmd = "cd "+bdir+" && ./configure && make libpaw-bindings && cp libpaw/*tar.gz /tmp" + else: + cmd = "cd bindings && ../../bindings/configure && make libpaw-bindings && cp libpaw/*tar.gz /tmp" + ou = tempfile.TemporaryFile() + er = tempfile.TemporaryFile() + + process = Popen(cmd, shell=True, stdout=ou, stderr=er) + process.wait() + process.communicate() + rc=process.returncode + if rc != 0: + ou.seek(0) + er.seek(0) + sys.stdout.write("%s\n" % ou.read()) + sys.stderr.write("%s\n" % er.read()) + ou.close() + er.close() + retval = 1 + return retval + + ou.close() + er.close() + sys.stdout.write(" done...\n") + + # test tarball + sys.stdout.write("\nTesting tarball...\n") + + cmd = "cd /tmp;libpaw=`ls libpaw*.tar.gz`; tar xzf $libpaw; cd libpaw; make" + ou = tempfile.TemporaryFile() + er = tempfile.TemporaryFile() + + process = Popen(cmd, shell=True, stdout=ou, stderr=er) + process.wait() + process.communicate() + rc=process.returncode + if rc != 0: + ou.seek(0) + er.seek(0) + sys.stdout.write("%s\n" % ou.read()) + sys.stderr.write("%s\n" % er.read()) + ou.close() + er.close() + retval = 1 + return retval + + ou.seek(0) + er.seek(0) + sys.stdout.write("%s\n" % ou.read()) +# sys.stderr.write("%s\n" % er.read()) + ou.close() + er.close() + + # cleaning + retval = 0 + try: + rmtree("/tmp/libpaw") + f = glob.glob("/tmp/libpaw*.tar.gz") + os.remove(f[0]) + except: + sys.stderr.write("cleaning error") + retval = 1 + + return retval + +if __name__ == "__main__": + if len(sys.argv) == 1: + home_dir = "." + else: + home_dir = sys.argv[1] + + sys.exit(main(home_dir)) diff --git a/GX-PAW/libpaw/utils/libpaw.am b/GX-PAW/libpaw/utils/libpaw.am new file mode 100644 index 00000000..67e12b72 --- /dev/null +++ b/GX-PAW/libpaw/utils/libpaw.am @@ -0,0 +1,103 @@ +# =========================================== +# Makefile +# Use it to create a tar.gz containing +# a standalone LIBPAW library +# M.T. jan 15 - Rev oct 18 +# =========================================== + +#Define main directories +LIBPAW_DIR = $(top_builddir)/libpaw/libpaw +LIBPAW_UTIL_DIR = $(top_srcdir)/libpaw/libpaw-utils +LIBPAW_SRC_DIR = $(LIBPAW_DIR)/src +LIBPAW_CFG_DIR = $(LIBPAW_DIR)/config + +#Define ABINIT directories +ABINIT_SRC_DIR = $(abinit_srcdir) +LIBPAW_ABINIT_DIR = $(ABINIT_SRC_DIR)/shared/libpaw/src + +#Useful names +LIBPAW_VERSION = @libpaw_version@ +LIBPAW_TAR_NAME = libpaw-$(LIBPAW_VERSION) + +#Abilint interfaces +DO_COPY_INTERFACES=''`$(GREP) -s -m1 ^\ *interface\ * $(LIBPAW_ABINIT_DIR)/interfaces_*.F90 2>/dev/null` + +bindings-ready: dist + +default: dist + +dist: libpaw-tarball + +libpaw-tarball: libpaw | clean-tarball + @$(TAR) -czvf $(LIBPAW_TAR_NAME).tar.gz libpaw >>/dev/null + @rm -rf $(LIBPAW_DIR) + @echo "Making libPAW tarball... done!" + +clean: clean-tarball clean-src + @rm -rf $(LIBPAW_DIR) $(LIBPAW_TAR_NAME).tar.gz + +clean-src: + @rm -rf $(LIBPAW_DIR) + @echo "Cleaning libPAW source files... done!" + +clean-tarball: + @rm -rf $(LIBPAW_TAR_NAME).tar.gz + +libpaw: libpaw_src_processing libpaw_copy_makefile libpaw_build_src_list + +libpaw_create_dirs: clean-src check_interfaces + @if ! test -d $(LIBPAW_DIR); then $(INSTALL) -d -m 755 $(LIBPAW_DIR);fi + @if ! test -d $(LIBPAW_SRC_DIR); then $(INSTALL) -d -m 755 $(LIBPAW_SRC_DIR);fi + @if ! test -d $(LIBPAW_CFG_DIR); then $(INSTALL) -d -m 755 $(LIBPAW_CFG_DIR);fi + @echo "Creating libpaw dir... done!" + +libpaw_copy_src: | libpaw_create_dirs + @cp -rf $(LIBPAW_ABINIT_DIR)/*.F90 $(LIBPAW_SRC_DIR) + @cp -rf $(LIBPAW_ABINIT_DIR)/*.c $(LIBPAW_SRC_DIR) + @cp -rf $(LIBPAW_ABINIT_DIR)/*.h $(LIBPAW_SRC_DIR) + @cp -rf $(LIBPAW_ABINIT_DIR)/*.txt $(LIBPAW_SRC_DIR) + @if test -z $(DO_COPY_INTERFACES); then rm -rf $(LIBPAW_SRC_DIR)/interfaces_*.F90; fi + @echo "Copying libpaw source files... done!" + +libpaw_copy_makefile: | libpaw_create_dirs + @cp -rf $(LIBPAW_UTIL_DIR)/VERSION $(LIBPAW_DIR) + @cp -rf $(LIBPAW_UTIL_DIR)/Makefile.main $(LIBPAW_DIR)/Makefile + @cp -rf $(LIBPAW_UTIL_DIR)/makefile.in $(LIBPAW_DIR) + @cp -rf $(LIBPAW_UTIL_DIR)/Makefile.src $(LIBPAW_CFG_DIR) + @echo "Copying libpaw makefiles... done!" + +libpaw_build_src_list: | libpaw_create_dirs +# Build abinit.src file from abinit.amf and abinit.src file + @echo 'LIBPAW_SRC_FILES= \' > $(LIBPAW_CFG_DIR)/libpaw.src + @if ! test -z $(DO_COPY_INTERFACES) ; then \ + ls -1 $(LIBPAW_SRC_DIR)/interfaces_*.F90 | $(SED) -e 's/.*\///' -e 's/$$/\ \\/' \ + >> $(LIBPAW_CFG_DIR)/libpaw.src ; \ + fi + @$(GREP) -e '\.F90' -e '\.h' $(LIBPAW_ABINIT_DIR)/abinit.amf | \ + $(SED) -e 's/\ \\//g' -e 's/$$/\ \\/g' \ + >> $(LIBPAW_CFG_DIR)/libpaw.src + @$(GREP) -e '\.F90' -e '\.c' $(LIBPAW_ABINIT_DIR)/abinit.src | \ + $(SED) -e 's/,/\ \\/g' | $(SED) -e 's/\"//g' \ + >> $(LIBPAW_CFG_DIR)/libpaw.src + @echo "Creating libpaw source files list... done!" + +libpaw_src_processing: libpaw_copy_src +# Rename MPI objects beginning with xmpi + @$(FIND) $(LIBPAW_SRC_DIR) -name '*.F90' -exec \ + $(SED) -i'.orig' -e 's/xmpi_/xpaw_mpi_/g' {} \; + @rm -rf $(LIBPAW_SRC_DIR)/*.orig + @echo "Renaming libpaw MPI statements... done!" +# Eliminate unwanted "use interfaces_*" statements + @$(FIND) $(LIBPAW_SRC_DIR) -name '*.F90' -exec \ + $(SED) -i'.orig' -e '/use[ ]*interfaces_.*\(libpaw\)/!s/use[ ]*interfaces_/\!&/g' {} \; + @rm -rf $(LIBPAW_SRC_DIR)/*.orig + @echo "Eliminating ABINIT interfaces in libpaw... done!" + +check_interfaces: + @if ! test -z $(DO_COPY_INTERFACES) ; then \ + if ! test -f $(LIBPAW_ABINIT_DIR)/interfaces_*.F90; then \ + echo 'Before building the libPAW library, you must execute'; \ + echo 'the "*/*/makemake" script in ABINIT root dir!'; \ + echo ; exit 2; \ + fi; \ + fi diff --git a/GX-PAW/libpaw/utils/makefile.in b/GX-PAW/libpaw/utils/makefile.in new file mode 100644 index 00000000..4852fae0 --- /dev/null +++ b/GX-PAW/libpaw/utils/makefile.in @@ -0,0 +1,15 @@ +# =========================================== +# Makefile (include) +# Use it to build a standalone LIBPAW library +# M.T. Dec 15 +# =========================================== + +# FC : Fortran compiler (use mpif90 to include MPI) +# CC : Fortran compiler (use mpicc to include MPI) +# FCFLAGS= Fortran compiler flags +# CFLAGS= C compiler flags + +FC = gfortran +CC = gcc +FCFLAGS = -O2 -ffree-line-length-none +CFLAGS = -O2 diff --git a/GX-PAW/libpaw/wipeout.sh b/GX-PAW/libpaw/wipeout.sh new file mode 100755 index 00000000..29310da9 --- /dev/null +++ b/GX-PAW/libpaw/wipeout.sh @@ -0,0 +1,58 @@ +#!/bin/sh +# +## Copyright (C) 2017-2024 ABINIT group (Yann Pouillon ) + +# +# IMPORTANT NOTE: +# +# For maintainer use only! +# +# PLEASE DO NOT EDIT THIS FILE, AS IT COULD CAUSE A SERIOUS LOSS OF DATA. +# *** YOU HAVE BEEN WARNED! *** +# + +# Check that we are in the right directory +if test ! -s "./configure.ac" -o ! -s "src/m_paw_atom.F90"; then + echo "wipeout: Cowardly refusing to remove something from here!" >&2 + exit 1 +fi + +# Make sure the whole directory tree is writable +chmod -R u+w . + +# Remove temporary directories and files +echo "Removing temporary directories and files..." +find . -depth -name 'tmp*' -exec rm -rf {} \; +find . -depth -name '*.tmp' -exec rm -rf {} \; +echo "done." + +# Remove autotools files +echo "Removing autotools files..." +rm -f core config.log config.status stamp-h1 config.h config.h.in* +rm -rf aclocal.m4 autom4te.cache configure confstat* +(test -d config/gnu && cd config/gnu && rm -f compile config.guess config.sub depcomp install-sh ltmain.sh missing test-driver) +(cd config/m4 && rm -f libtool.m4 ltoptions.m4 ltsugar.m4 ltversion.m4 lt~obsolete.m4) +echo "done." + +# Remove Makefiles and machine-generated files +echo "Removing files produced by the configure script..." +rm -f libtool +find . -name Makefile -exec rm {} \; +find . -name Makefile.in -exec rm {} \; +find . -name '*.log' -exec rm {} \; +find . -name '*.trs' -exec rm {} \; +echo "done." + +# Remove object files, libraries and programs +echo "Removing object files, libraries and programs..." +find . -depth -name '.deps' -exec rm -rf {} \; +find . -depth -name '.libs' -exec rm -rf {} \; +find . -name '*.la' -exec rm {} \; +find . -name '*.lo' -exec rm {} \; +find . -name '*.a' -exec rm {} \; +find . -name '*.o' -exec rm {} \; +echo "done." + +# Remove built documentation files +echo "Removing built documentation files..." +echo "done."